MCPcopy Create free account
hub / github.com/bcefghj/miniClaudeCode / __init__

Method __init__

miniclaudecode/agent_loop.py:43–58  ·  view source on GitHub ↗
(
        self,
        config: Config | None = None,
        registry: ToolRegistry | None = None,
    )

Source from the content-addressed store, hash-verified

41 """
42
43 def __init__(
44 self,
45 config: Config | None = None,
46 registry: ToolRegistry | None = None,
47 ) -> None:
48 self.config = config or Config()
49 self.registry = registry or ToolRegistry.default()
50 self.permission_gate = PermissionGate(self.config)
51 self.context = ConversationContext(config=self.config)
52 self.client = anthropic.Anthropic()
53
54 system_prompt = build_system_prompt(
55 self.registry,
56 permission_mode=self.config.permission_mode.value,
57 )
58 self.context.set_system_prompt(system_prompt)
59
60 def run(self, user_message: str) -> str:
61 """Process a user message through the agent loop, returning the final text response."""

Callers

nothing calls this directly

Calls 6

ConfigClass · 0.85
PermissionGateClass · 0.85
ConversationContextClass · 0.85
build_system_promptFunction · 0.85
defaultMethod · 0.80
set_system_promptMethod · 0.80

Tested by

no test coverage detected