3.4 KiB
Symbol Index (Agent Quick-Jump)
This is a curated index of the most important exported types and functions, organized for fast navigation.
It is intentionally short: if something isn't here, it's probably not a primary control surface.
See also:
docs/architecture/TYPESCRIPT_MAP.md(conceptual map + diagrams)docs/architecture/AGENT_DIAGRAM.md(runtime flow)
Daemon Entry Points
-
src/daemon/index.ts- Creates/wires: config, tool registry, tool executor, skill registry, model router, gateway, channels.
-
src/daemon/routing.tscreateMessageRouter(deps)- Main router factory used by channel adapters + gateway.
Routing / Intents / Agents
-
src/agents/router.tsAgentRouter.resolve(channel, senderId)- Picks an agent config for a sender/channel.
-
src/agents/registry.tsAgentConfigRegistry.get(name)- Loads agent configs.
-
src/intents/registry.tsIntentRegistry.match(text)- Matches text to intent rules (targets: agent or skill).
Native Agent Loop
-
src/backends/native/orchestrator.tsAgentOrchestrator.process(message, options)- Top-level entry for “run agent on this message”.
-
src/backends/native/agent.tsNativeAgent(class)- Internal hot path: tool loop that:
- asks model
- executes tools
- returns tool results
- repeats
Models
-
src/models/router.tsModelRouter.chat(request)- Chooses tier/provider fallback chain.
-
src/models/types.ts- Core request/response types shared by providers.
Tools
-
src/tools/types.tsToolToolResult
-
src/tools/registry.tsToolRegistry.register(tool)ToolRegistry.list()ToolRegistry.clone()/ToolRegistry.replace(tool)(used for sandbox substitution)
-
src/tools/policy.tsToolPolicy(class)ToolPolicy.resolveAllowedNames(allToolNames, context)ToolPolicyContext(type)TOOL_GROUPS(group expansion)
-
src/tools/executor.tsToolExecutor.execute(toolName, args, context)- Central enforcement point:
- policy allow/deny
- hooks/autonomy confirmations
- skill fs/net/secret constraints
- untrusted-content injection guard
- audit events w/ redaction
- Central enforcement point:
Skills
-
src/skills/types.tsSkillManifestSkillPermissions
-
src/skills/loader.tsloadSkill(dir, tier)loadAllSkills(...)- Validates manifests.
-
src/skills/registry.tsSkillRegistry.get(name)SkillRegistry.getSystemPromptAdditions()
Hooks / Approval
-
src/hooks/engine.tsHookEngine.getAction(toolName)HookEngine.requestConfirmation(toolName, args)
-
src/hooks/autonomy.tsresolveAutonomy(toolName, baseAction, autonomyLevel)
Sandbox
-
src/sandbox/manager.ts- Manages per-session sandbox lifecycle.
-
src/sandbox/tools.ts- Creates sandboxed tool implementations for
shell.exec/process.start.
- Creates sandboxed tool implementations for
-
src/sandbox/docker.ts- Docker-specific implementation.
Audit
-
src/audit/index.tsauditLoggersingleton.
-
src/audit/types.ts- Event types (
tool.start,tool.success,tool.denied,tool.approval, ...)
- Event types (
-
src/audit/logger.tsAuditLoggermethods:toolStart,toolDenied,toolApproval, ...
-
src/audit/redact.tsredactForAudit(value)
Gateway
-
src/gateway/server.ts- WebSocket server lifecycle.
-
src/gateway/handlers/*- JSON-RPC methods grouped by area.
Protocol:
docs/api/PROTOCOL.md