attocode 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +48 -0
- package/LICENSE +21 -0
- package/README.md +164 -0
- package/dist/src/adapters.d.ts +83 -0
- package/dist/src/adapters.d.ts.map +1 -0
- package/dist/src/adapters.js +221 -0
- package/dist/src/adapters.js.map +1 -0
- package/dist/src/agent-tools/index.d.ts +7 -0
- package/dist/src/agent-tools/index.d.ts.map +1 -0
- package/dist/src/agent-tools/index.js +8 -0
- package/dist/src/agent-tools/index.js.map +1 -0
- package/dist/src/agent-tools/lsp-file-tools.d.ts +33 -0
- package/dist/src/agent-tools/lsp-file-tools.d.ts.map +1 -0
- package/dist/src/agent-tools/lsp-file-tools.js +200 -0
- package/dist/src/agent-tools/lsp-file-tools.js.map +1 -0
- package/dist/src/agent.d.ts +667 -0
- package/dist/src/agent.d.ts.map +1 -0
- package/dist/src/agent.js +2824 -0
- package/dist/src/agent.js.map +1 -0
- package/dist/src/cli.d.ts +36 -0
- package/dist/src/cli.d.ts.map +1 -0
- package/dist/src/cli.js +176 -0
- package/dist/src/cli.js.map +1 -0
- package/dist/src/commands/handler.d.ts +22 -0
- package/dist/src/commands/handler.d.ts.map +1 -0
- package/dist/src/commands/handler.js +1320 -0
- package/dist/src/commands/handler.js.map +1 -0
- package/dist/src/commands/init.d.ts +7 -0
- package/dist/src/commands/init.d.ts.map +1 -0
- package/dist/src/commands/init.js +153 -0
- package/dist/src/commands/init.js.map +1 -0
- package/dist/src/commands/types.d.ts +70 -0
- package/dist/src/commands/types.d.ts.map +1 -0
- package/dist/src/commands/types.js +8 -0
- package/dist/src/commands/types.js.map +1 -0
- package/dist/src/config.d.ts +22 -0
- package/dist/src/config.d.ts.map +1 -0
- package/dist/src/config.js +25 -0
- package/dist/src/config.js.map +1 -0
- package/dist/src/core/index.d.ts +32 -0
- package/dist/src/core/index.d.ts.map +1 -0
- package/dist/src/core/index.js +35 -0
- package/dist/src/core/index.js.map +1 -0
- package/dist/src/core/process-handlers.d.ts +43 -0
- package/dist/src/core/process-handlers.d.ts.map +1 -0
- package/dist/src/core/process-handlers.js +117 -0
- package/dist/src/core/process-handlers.js.map +1 -0
- package/dist/src/core/protocol/bridge.d.ts +117 -0
- package/dist/src/core/protocol/bridge.d.ts.map +1 -0
- package/dist/src/core/protocol/bridge.js +149 -0
- package/dist/src/core/protocol/bridge.js.map +1 -0
- package/dist/src/core/protocol/index.d.ts +8 -0
- package/dist/src/core/protocol/index.d.ts.map +1 -0
- package/dist/src/core/protocol/index.js +8 -0
- package/dist/src/core/protocol/index.js.map +1 -0
- package/dist/src/core/protocol/types.d.ts +539 -0
- package/dist/src/core/protocol/types.d.ts.map +1 -0
- package/dist/src/core/protocol/types.js +149 -0
- package/dist/src/core/protocol/types.js.map +1 -0
- package/dist/src/core/queues/atomic-counter.d.ts +36 -0
- package/dist/src/core/queues/atomic-counter.d.ts.map +1 -0
- package/dist/src/core/queues/atomic-counter.js +46 -0
- package/dist/src/core/queues/atomic-counter.js.map +1 -0
- package/dist/src/core/queues/event-queue.d.ts +126 -0
- package/dist/src/core/queues/event-queue.d.ts.map +1 -0
- package/dist/src/core/queues/event-queue.js +208 -0
- package/dist/src/core/queues/event-queue.js.map +1 -0
- package/dist/src/core/queues/index.d.ts +12 -0
- package/dist/src/core/queues/index.d.ts.map +1 -0
- package/dist/src/core/queues/index.js +15 -0
- package/dist/src/core/queues/index.js.map +1 -0
- package/dist/src/core/queues/submission-queue.d.ts +116 -0
- package/dist/src/core/queues/submission-queue.d.ts.map +1 -0
- package/dist/src/core/queues/submission-queue.js +236 -0
- package/dist/src/core/queues/submission-queue.js.map +1 -0
- package/dist/src/costs/index.d.ts +22 -0
- package/dist/src/costs/index.d.ts.map +1 -0
- package/dist/src/costs/index.js +22 -0
- package/dist/src/costs/index.js.map +1 -0
- package/dist/src/costs/model-registry.d.ts +80 -0
- package/dist/src/costs/model-registry.d.ts.map +1 -0
- package/dist/src/costs/model-registry.js +237 -0
- package/dist/src/costs/model-registry.js.map +1 -0
- package/dist/src/costs/types.d.ts +50 -0
- package/dist/src/costs/types.d.ts.map +1 -0
- package/dist/src/costs/types.js +2 -0
- package/dist/src/costs/types.js.map +1 -0
- package/dist/src/defaults.d.ts +114 -0
- package/dist/src/defaults.d.ts.map +1 -0
- package/dist/src/defaults.js +457 -0
- package/dist/src/defaults.js.map +1 -0
- package/dist/src/first-run.d.ts +35 -0
- package/dist/src/first-run.d.ts.map +1 -0
- package/dist/src/first-run.js +94 -0
- package/dist/src/first-run.js.map +1 -0
- package/dist/src/hello.d.ts +2 -0
- package/dist/src/hello.d.ts.map +1 -0
- package/dist/src/hello.js +4 -0
- package/dist/src/hello.js.map +1 -0
- package/dist/src/integrations/agent-registry.d.ts +160 -0
- package/dist/src/integrations/agent-registry.d.ts.map +1 -0
- package/dist/src/integrations/agent-registry.js +446 -0
- package/dist/src/integrations/agent-registry.js.map +1 -0
- package/dist/src/integrations/auto-compaction.d.ts +177 -0
- package/dist/src/integrations/auto-compaction.d.ts.map +1 -0
- package/dist/src/integrations/auto-compaction.js +428 -0
- package/dist/src/integrations/auto-compaction.js.map +1 -0
- package/dist/src/integrations/cancellation.d.ts +162 -0
- package/dist/src/integrations/cancellation.d.ts.map +1 -0
- package/dist/src/integrations/cancellation.js +339 -0
- package/dist/src/integrations/cancellation.js.map +1 -0
- package/dist/src/integrations/codebase-context.d.ts +319 -0
- package/dist/src/integrations/codebase-context.d.ts.map +1 -0
- package/dist/src/integrations/codebase-context.js +816 -0
- package/dist/src/integrations/codebase-context.js.map +1 -0
- package/dist/src/integrations/compaction.d.ts +192 -0
- package/dist/src/integrations/compaction.d.ts.map +1 -0
- package/dist/src/integrations/compaction.js +376 -0
- package/dist/src/integrations/compaction.js.map +1 -0
- package/dist/src/integrations/context-engineering.d.ts +246 -0
- package/dist/src/integrations/context-engineering.d.ts.map +1 -0
- package/dist/src/integrations/context-engineering.js +394 -0
- package/dist/src/integrations/context-engineering.js.map +1 -0
- package/dist/src/integrations/diff-utils.d.ts +105 -0
- package/dist/src/integrations/diff-utils.d.ts.map +1 -0
- package/dist/src/integrations/diff-utils.js +497 -0
- package/dist/src/integrations/diff-utils.js.map +1 -0
- package/dist/src/integrations/economics.d.ts +192 -0
- package/dist/src/integrations/economics.d.ts.map +1 -0
- package/dist/src/integrations/economics.js +431 -0
- package/dist/src/integrations/economics.js.map +1 -0
- package/dist/src/integrations/execution-policy.d.ts +189 -0
- package/dist/src/integrations/execution-policy.d.ts.map +1 -0
- package/dist/src/integrations/execution-policy.js +352 -0
- package/dist/src/integrations/execution-policy.js.map +1 -0
- package/dist/src/integrations/file-change-tracker.d.ts +161 -0
- package/dist/src/integrations/file-change-tracker.d.ts.map +1 -0
- package/dist/src/integrations/file-change-tracker.js +520 -0
- package/dist/src/integrations/file-change-tracker.js.map +1 -0
- package/dist/src/integrations/hierarchical-config.d.ts +212 -0
- package/dist/src/integrations/hierarchical-config.d.ts.map +1 -0
- package/dist/src/integrations/hierarchical-config.js +484 -0
- package/dist/src/integrations/hierarchical-config.js.map +1 -0
- package/dist/src/integrations/hooks.d.ts +114 -0
- package/dist/src/integrations/hooks.d.ts.map +1 -0
- package/dist/src/integrations/hooks.js +326 -0
- package/dist/src/integrations/hooks.js.map +1 -0
- package/dist/src/integrations/ignore.d.ts +143 -0
- package/dist/src/integrations/ignore.d.ts.map +1 -0
- package/dist/src/integrations/ignore.js +417 -0
- package/dist/src/integrations/ignore.js.map +1 -0
- package/dist/src/integrations/image-renderer.d.ts +119 -0
- package/dist/src/integrations/image-renderer.d.ts.map +1 -0
- package/dist/src/integrations/image-renderer.js +306 -0
- package/dist/src/integrations/image-renderer.js.map +1 -0
- package/dist/src/integrations/index.d.ts +42 -0
- package/dist/src/integrations/index.d.ts.map +1 -0
- package/dist/src/integrations/index.js +73 -0
- package/dist/src/integrations/index.js.map +1 -0
- package/dist/src/integrations/lsp.d.ts +196 -0
- package/dist/src/integrations/lsp.d.ts.map +1 -0
- package/dist/src/integrations/lsp.js +582 -0
- package/dist/src/integrations/lsp.js.map +1 -0
- package/dist/src/integrations/mcp-client.d.ts +270 -0
- package/dist/src/integrations/mcp-client.d.ts.map +1 -0
- package/dist/src/integrations/mcp-client.js +698 -0
- package/dist/src/integrations/mcp-client.js.map +1 -0
- package/dist/src/integrations/mcp-tool-search.d.ts +77 -0
- package/dist/src/integrations/mcp-tool-search.d.ts.map +1 -0
- package/dist/src/integrations/mcp-tool-search.js +220 -0
- package/dist/src/integrations/mcp-tool-search.js.map +1 -0
- package/dist/src/integrations/memory.d.ts +108 -0
- package/dist/src/integrations/memory.d.ts.map +1 -0
- package/dist/src/integrations/memory.js +288 -0
- package/dist/src/integrations/memory.js.map +1 -0
- package/dist/src/integrations/multi-agent.d.ts +150 -0
- package/dist/src/integrations/multi-agent.d.ts.map +1 -0
- package/dist/src/integrations/multi-agent.js +306 -0
- package/dist/src/integrations/multi-agent.js.map +1 -0
- package/dist/src/integrations/observability.d.ts +162 -0
- package/dist/src/integrations/observability.d.ts.map +1 -0
- package/dist/src/integrations/observability.js +406 -0
- package/dist/src/integrations/observability.js.map +1 -0
- package/dist/src/integrations/openrouter-pricing.d.ts +42 -0
- package/dist/src/integrations/openrouter-pricing.d.ts.map +1 -0
- package/dist/src/integrations/openrouter-pricing.js +124 -0
- package/dist/src/integrations/openrouter-pricing.js.map +1 -0
- package/dist/src/integrations/pending-plan.d.ts +171 -0
- package/dist/src/integrations/pending-plan.d.ts.map +1 -0
- package/dist/src/integrations/pending-plan.js +244 -0
- package/dist/src/integrations/pending-plan.js.map +1 -0
- package/dist/src/integrations/persistence.d.ts +48 -0
- package/dist/src/integrations/persistence.d.ts.map +1 -0
- package/dist/src/integrations/persistence.js +196 -0
- package/dist/src/integrations/persistence.js.map +1 -0
- package/dist/src/integrations/planning.d.ts +96 -0
- package/dist/src/integrations/planning.d.ts.map +1 -0
- package/dist/src/integrations/planning.js +338 -0
- package/dist/src/integrations/planning.js.map +1 -0
- package/dist/src/integrations/pty-shell.d.ts +169 -0
- package/dist/src/integrations/pty-shell.d.ts.map +1 -0
- package/dist/src/integrations/pty-shell.js +367 -0
- package/dist/src/integrations/pty-shell.js.map +1 -0
- package/dist/src/integrations/react.d.ts +139 -0
- package/dist/src/integrations/react.d.ts.map +1 -0
- package/dist/src/integrations/react.js +273 -0
- package/dist/src/integrations/react.js.map +1 -0
- package/dist/src/integrations/resources.d.ts +177 -0
- package/dist/src/integrations/resources.d.ts.map +1 -0
- package/dist/src/integrations/resources.js +311 -0
- package/dist/src/integrations/resources.js.map +1 -0
- package/dist/src/integrations/result-synthesizer.d.ts +389 -0
- package/dist/src/integrations/result-synthesizer.d.ts.map +1 -0
- package/dist/src/integrations/result-synthesizer.js +951 -0
- package/dist/src/integrations/result-synthesizer.js.map +1 -0
- package/dist/src/integrations/routing.d.ts +117 -0
- package/dist/src/integrations/routing.d.ts.map +1 -0
- package/dist/src/integrations/routing.js +347 -0
- package/dist/src/integrations/routing.js.map +1 -0
- package/dist/src/integrations/rules.d.ts +131 -0
- package/dist/src/integrations/rules.d.ts.map +1 -0
- package/dist/src/integrations/rules.js +284 -0
- package/dist/src/integrations/rules.js.map +1 -0
- package/dist/src/integrations/safety.d.ts +142 -0
- package/dist/src/integrations/safety.d.ts.map +1 -0
- package/dist/src/integrations/safety.js +342 -0
- package/dist/src/integrations/safety.js.map +1 -0
- package/dist/src/integrations/sandbox/basic.d.ts +74 -0
- package/dist/src/integrations/sandbox/basic.d.ts.map +1 -0
- package/dist/src/integrations/sandbox/basic.js +310 -0
- package/dist/src/integrations/sandbox/basic.js.map +1 -0
- package/dist/src/integrations/sandbox/docker.d.ts +94 -0
- package/dist/src/integrations/sandbox/docker.d.ts.map +1 -0
- package/dist/src/integrations/sandbox/docker.js +293 -0
- package/dist/src/integrations/sandbox/docker.js.map +1 -0
- package/dist/src/integrations/sandbox/index.d.ts +182 -0
- package/dist/src/integrations/sandbox/index.d.ts.map +1 -0
- package/dist/src/integrations/sandbox/index.js +382 -0
- package/dist/src/integrations/sandbox/index.js.map +1 -0
- package/dist/src/integrations/sandbox/landlock.d.ts +59 -0
- package/dist/src/integrations/sandbox/landlock.d.ts.map +1 -0
- package/dist/src/integrations/sandbox/landlock.js +326 -0
- package/dist/src/integrations/sandbox/landlock.js.map +1 -0
- package/dist/src/integrations/sandbox/seatbelt.d.ts +68 -0
- package/dist/src/integrations/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/src/integrations/sandbox/seatbelt.js +298 -0
- package/dist/src/integrations/sandbox/seatbelt.js.map +1 -0
- package/dist/src/integrations/semantic-cache.d.ts +178 -0
- package/dist/src/integrations/semantic-cache.d.ts.map +1 -0
- package/dist/src/integrations/semantic-cache.js +372 -0
- package/dist/src/integrations/semantic-cache.js.map +1 -0
- package/dist/src/integrations/session-store.d.ts +183 -0
- package/dist/src/integrations/session-store.d.ts.map +1 -0
- package/dist/src/integrations/session-store.js +345 -0
- package/dist/src/integrations/session-store.js.map +1 -0
- package/dist/src/integrations/shared-blackboard.d.ts +403 -0
- package/dist/src/integrations/shared-blackboard.d.ts.map +1 -0
- package/dist/src/integrations/shared-blackboard.js +710 -0
- package/dist/src/integrations/shared-blackboard.js.map +1 -0
- package/dist/src/integrations/skills.d.ts +171 -0
- package/dist/src/integrations/skills.d.ts.map +1 -0
- package/dist/src/integrations/skills.js +403 -0
- package/dist/src/integrations/skills.js.map +1 -0
- package/dist/src/integrations/smart-decomposer.d.ts +322 -0
- package/dist/src/integrations/smart-decomposer.d.ts.map +1 -0
- package/dist/src/integrations/smart-decomposer.js +856 -0
- package/dist/src/integrations/smart-decomposer.js.map +1 -0
- package/dist/src/integrations/sourcegraph.d.ts +169 -0
- package/dist/src/integrations/sourcegraph.d.ts.map +1 -0
- package/dist/src/integrations/sourcegraph.js +379 -0
- package/dist/src/integrations/sourcegraph.js.map +1 -0
- package/dist/src/integrations/sqlite-store.d.ts +518 -0
- package/dist/src/integrations/sqlite-store.d.ts.map +1 -0
- package/dist/src/integrations/sqlite-store.js +1423 -0
- package/dist/src/integrations/sqlite-store.js.map +1 -0
- package/dist/src/integrations/streaming.d.ts +102 -0
- package/dist/src/integrations/streaming.d.ts.map +1 -0
- package/dist/src/integrations/streaming.js +362 -0
- package/dist/src/integrations/streaming.js.map +1 -0
- package/dist/src/integrations/thread-manager.d.ts +199 -0
- package/dist/src/integrations/thread-manager.d.ts.map +1 -0
- package/dist/src/integrations/thread-manager.js +357 -0
- package/dist/src/integrations/thread-manager.js.map +1 -0
- package/dist/src/main.d.ts +26 -0
- package/dist/src/main.d.ts.map +1 -0
- package/dist/src/main.js +170 -0
- package/dist/src/main.js.map +1 -0
- package/dist/src/modes/index.d.ts +10 -0
- package/dist/src/modes/index.d.ts.map +1 -0
- package/dist/src/modes/index.js +10 -0
- package/dist/src/modes/index.js.map +1 -0
- package/dist/src/modes/repl.d.ts +19 -0
- package/dist/src/modes/repl.d.ts.map +1 -0
- package/dist/src/modes/repl.js +393 -0
- package/dist/src/modes/repl.js.map +1 -0
- package/dist/src/modes/tui.d.ts +29 -0
- package/dist/src/modes/tui.d.ts.map +1 -0
- package/dist/src/modes/tui.js +272 -0
- package/dist/src/modes/tui.js.map +1 -0
- package/dist/src/modes.d.ts +179 -0
- package/dist/src/modes.d.ts.map +1 -0
- package/dist/src/modes.js +385 -0
- package/dist/src/modes.js.map +1 -0
- package/dist/src/observability/tracer.d.ts +111 -0
- package/dist/src/observability/tracer.d.ts.map +1 -0
- package/dist/src/observability/tracer.js +300 -0
- package/dist/src/observability/tracer.js.map +1 -0
- package/dist/src/observability/types.d.ts +271 -0
- package/dist/src/observability/types.d.ts.map +1 -0
- package/dist/src/observability/types.js +24 -0
- package/dist/src/observability/types.js.map +1 -0
- package/dist/src/paths.d.ts +101 -0
- package/dist/src/paths.d.ts.map +1 -0
- package/dist/src/paths.js +148 -0
- package/dist/src/paths.js.map +1 -0
- package/dist/src/persistence/index.d.ts +38 -0
- package/dist/src/persistence/index.d.ts.map +1 -0
- package/dist/src/persistence/index.js +48 -0
- package/dist/src/persistence/index.js.map +1 -0
- package/dist/src/persistence/migrator.d.ts +135 -0
- package/dist/src/persistence/migrator.d.ts.map +1 -0
- package/dist/src/persistence/migrator.js +303 -0
- package/dist/src/persistence/migrator.js.map +1 -0
- package/dist/src/persistence/schema.d.ts +101 -0
- package/dist/src/persistence/schema.d.ts.map +1 -0
- package/dist/src/persistence/schema.js +395 -0
- package/dist/src/persistence/schema.js.map +1 -0
- package/dist/src/providers/adapters/anthropic.d.ts +20 -0
- package/dist/src/providers/adapters/anthropic.d.ts.map +1 -0
- package/dist/src/providers/adapters/anthropic.js +124 -0
- package/dist/src/providers/adapters/anthropic.js.map +1 -0
- package/dist/src/providers/adapters/mock.d.ts +25 -0
- package/dist/src/providers/adapters/mock.d.ts.map +1 -0
- package/dist/src/providers/adapters/mock.js +133 -0
- package/dist/src/providers/adapters/mock.js.map +1 -0
- package/dist/src/providers/adapters/openai.d.ts +21 -0
- package/dist/src/providers/adapters/openai.d.ts.map +1 -0
- package/dist/src/providers/adapters/openai.js +126 -0
- package/dist/src/providers/adapters/openai.js.map +1 -0
- package/dist/src/providers/adapters/openrouter.d.ts +49 -0
- package/dist/src/providers/adapters/openrouter.d.ts.map +1 -0
- package/dist/src/providers/adapters/openrouter.js +363 -0
- package/dist/src/providers/adapters/openrouter.js.map +1 -0
- package/dist/src/providers/provider.d.ts +54 -0
- package/dist/src/providers/provider.d.ts.map +1 -0
- package/dist/src/providers/provider.js +111 -0
- package/dist/src/providers/provider.js.map +1 -0
- package/dist/src/providers/resilient-fetch.d.ts +99 -0
- package/dist/src/providers/resilient-fetch.d.ts.map +1 -0
- package/dist/src/providers/resilient-fetch.js +208 -0
- package/dist/src/providers/resilient-fetch.js.map +1 -0
- package/dist/src/providers/types.d.ts +227 -0
- package/dist/src/providers/types.d.ts.map +1 -0
- package/dist/src/providers/types.js +24 -0
- package/dist/src/providers/types.js.map +1 -0
- package/dist/src/session-picker.d.ts +28 -0
- package/dist/src/session-picker.d.ts.map +1 -0
- package/dist/src/session-picker.js +256 -0
- package/dist/src/session-picker.js.map +1 -0
- package/dist/src/test-sqlite.d.ts +2 -0
- package/dist/src/test-sqlite.d.ts.map +1 -0
- package/dist/src/test-sqlite.js +114 -0
- package/dist/src/test-sqlite.js.map +1 -0
- package/dist/src/tools/agent.d.ts +44 -0
- package/dist/src/tools/agent.d.ts.map +1 -0
- package/dist/src/tools/agent.js +110 -0
- package/dist/src/tools/agent.js.map +1 -0
- package/dist/src/tools/bash.d.ts +52 -0
- package/dist/src/tools/bash.d.ts.map +1 -0
- package/dist/src/tools/bash.js +141 -0
- package/dist/src/tools/bash.js.map +1 -0
- package/dist/src/tools/file.d.ts +47 -0
- package/dist/src/tools/file.d.ts.map +1 -0
- package/dist/src/tools/file.js +263 -0
- package/dist/src/tools/file.js.map +1 -0
- package/dist/src/tools/permission.d.ts +43 -0
- package/dist/src/tools/permission.d.ts.map +1 -0
- package/dist/src/tools/permission.js +216 -0
- package/dist/src/tools/permission.js.map +1 -0
- package/dist/src/tools/registry.d.ts +63 -0
- package/dist/src/tools/registry.d.ts.map +1 -0
- package/dist/src/tools/registry.js +250 -0
- package/dist/src/tools/registry.js.map +1 -0
- package/dist/src/tools/standard.d.ts +57 -0
- package/dist/src/tools/standard.d.ts.map +1 -0
- package/dist/src/tools/standard.js +113 -0
- package/dist/src/tools/standard.js.map +1 -0
- package/dist/src/tools/types.d.ts +146 -0
- package/dist/src/tools/types.d.ts.map +1 -0
- package/dist/src/tools/types.js +28 -0
- package/dist/src/tools/types.js.map +1 -0
- package/dist/src/tools/undo.d.ts +71 -0
- package/dist/src/tools/undo.d.ts.map +1 -0
- package/dist/src/tools/undo.js +123 -0
- package/dist/src/tools/undo.js.map +1 -0
- package/dist/src/tracing/cache-boundary-tracker.d.ts +189 -0
- package/dist/src/tracing/cache-boundary-tracker.d.ts.map +1 -0
- package/dist/src/tracing/cache-boundary-tracker.js +411 -0
- package/dist/src/tracing/cache-boundary-tracker.js.map +1 -0
- package/dist/src/tracing/trace-collector.d.ts +274 -0
- package/dist/src/tracing/trace-collector.d.ts.map +1 -0
- package/dist/src/tracing/trace-collector.js +727 -0
- package/dist/src/tracing/trace-collector.js.map +1 -0
- package/dist/src/tracing/types.d.ts +657 -0
- package/dist/src/tracing/types.d.ts.map +1 -0
- package/dist/src/tracing/types.js +39 -0
- package/dist/src/tracing/types.js.map +1 -0
- package/dist/src/tricks/failure-evidence.d.ts +268 -0
- package/dist/src/tricks/failure-evidence.d.ts.map +1 -0
- package/dist/src/tricks/failure-evidence.js +544 -0
- package/dist/src/tricks/failure-evidence.js.map +1 -0
- package/dist/src/tricks/json-utils.d.ts +77 -0
- package/dist/src/tricks/json-utils.d.ts.map +1 -0
- package/dist/src/tricks/json-utils.js +247 -0
- package/dist/src/tricks/json-utils.js.map +1 -0
- package/dist/src/tricks/kv-cache-context.d.ts +227 -0
- package/dist/src/tricks/kv-cache-context.d.ts.map +1 -0
- package/dist/src/tricks/kv-cache-context.js +377 -0
- package/dist/src/tricks/kv-cache-context.js.map +1 -0
- package/dist/src/tricks/recitation.d.ts +208 -0
- package/dist/src/tricks/recitation.d.ts.map +1 -0
- package/dist/src/tricks/recitation.js +374 -0
- package/dist/src/tricks/recitation.js.map +1 -0
- package/dist/src/tricks/reversible-compaction.d.ts +251 -0
- package/dist/src/tricks/reversible-compaction.d.ts.map +1 -0
- package/dist/src/tricks/reversible-compaction.js +555 -0
- package/dist/src/tricks/reversible-compaction.js.map +1 -0
- package/dist/src/tricks/serialization-diversity.d.ts +197 -0
- package/dist/src/tricks/serialization-diversity.d.ts.map +1 -0
- package/dist/src/tricks/serialization-diversity.js +460 -0
- package/dist/src/tricks/serialization-diversity.js.map +1 -0
- package/dist/src/tui/app.d.ts +42 -0
- package/dist/src/tui/app.d.ts.map +1 -0
- package/dist/src/tui/app.js +1076 -0
- package/dist/src/tui/app.js.map +1 -0
- package/dist/src/tui/components/ApprovalDialog.d.ts +28 -0
- package/dist/src/tui/components/ApprovalDialog.d.ts.map +1 -0
- package/dist/src/tui/components/ApprovalDialog.js +59 -0
- package/dist/src/tui/components/ApprovalDialog.js.map +1 -0
- package/dist/src/tui/components/InputArea.d.ts +35 -0
- package/dist/src/tui/components/InputArea.d.ts.map +1 -0
- package/dist/src/tui/components/InputArea.js +144 -0
- package/dist/src/tui/components/InputArea.js.map +1 -0
- package/dist/src/tui/components/MessageItem.d.ts +28 -0
- package/dist/src/tui/components/MessageItem.d.ts.map +1 -0
- package/dist/src/tui/components/MessageItem.js +27 -0
- package/dist/src/tui/components/MessageItem.js.map +1 -0
- package/dist/src/tui/components/ScrollableBox.d.ts +41 -0
- package/dist/src/tui/components/ScrollableBox.d.ts.map +1 -0
- package/dist/src/tui/components/ScrollableBox.js +101 -0
- package/dist/src/tui/components/ScrollableBox.js.map +1 -0
- package/dist/src/tui/components/ToolCallItem.d.ts +33 -0
- package/dist/src/tui/components/ToolCallItem.d.ts.map +1 -0
- package/dist/src/tui/components/ToolCallItem.js +91 -0
- package/dist/src/tui/components/ToolCallItem.js.map +1 -0
- package/dist/src/tui/components/index.d.ts +13 -0
- package/dist/src/tui/components/index.d.ts.map +1 -0
- package/dist/src/tui/components/index.js +15 -0
- package/dist/src/tui/components/index.js.map +1 -0
- package/dist/src/tui/event-display.d.ts +19 -0
- package/dist/src/tui/event-display.d.ts.map +1 -0
- package/dist/src/tui/event-display.js +178 -0
- package/dist/src/tui/event-display.js.map +1 -0
- package/dist/src/tui/index.d.ts +105 -0
- package/dist/src/tui/index.d.ts.map +1 -0
- package/dist/src/tui/index.js +214 -0
- package/dist/src/tui/index.js.map +1 -0
- package/dist/src/tui/input/CommandPalette.d.ts +55 -0
- package/dist/src/tui/input/CommandPalette.d.ts.map +1 -0
- package/dist/src/tui/input/CommandPalette.js +135 -0
- package/dist/src/tui/input/CommandPalette.js.map +1 -0
- package/dist/src/tui/input/index.d.ts +7 -0
- package/dist/src/tui/input/index.d.ts.map +1 -0
- package/dist/src/tui/input/index.js +7 -0
- package/dist/src/tui/input/index.js.map +1 -0
- package/dist/src/tui/theme/index.d.ts +45 -0
- package/dist/src/tui/theme/index.d.ts.map +1 -0
- package/dist/src/tui/theme/index.js +215 -0
- package/dist/src/tui/theme/index.js.map +1 -0
- package/dist/src/tui/types.d.ts +214 -0
- package/dist/src/tui/types.d.ts.map +1 -0
- package/dist/src/tui/types.js +27 -0
- package/dist/src/tui/types.js.map +1 -0
- package/dist/src/types.d.ts +905 -0
- package/dist/src/types.d.ts.map +1 -0
- package/dist/src/types.js +9 -0
- package/dist/src/types.js.map +1 -0
- package/package.json +89 -0
|
@@ -0,0 +1,905 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lesson 25: Production Agent Types
|
|
3
|
+
*
|
|
4
|
+
* Unified configuration types for the production-ready agent
|
|
5
|
+
* that integrates all lessons into one cohesive system.
|
|
6
|
+
* Now includes multi-agent, ReAct, execution policies, and thread management.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Message in conversation.
|
|
10
|
+
*/
|
|
11
|
+
export interface Message {
|
|
12
|
+
role: 'system' | 'user' | 'assistant' | 'tool';
|
|
13
|
+
content: string;
|
|
14
|
+
toolCalls?: ToolCall[];
|
|
15
|
+
toolResults?: ToolResult[];
|
|
16
|
+
/** For tool role messages, references the tool call this responds to */
|
|
17
|
+
toolCallId?: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Tool call from LLM.
|
|
21
|
+
*/
|
|
22
|
+
export interface ToolCall {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
arguments: Record<string, unknown>;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Tool execution result.
|
|
29
|
+
*/
|
|
30
|
+
export interface ToolResult {
|
|
31
|
+
callId: string;
|
|
32
|
+
result: unknown;
|
|
33
|
+
error?: string;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Tool definition.
|
|
37
|
+
*/
|
|
38
|
+
export interface ToolDefinition {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
parameters: Record<string, unknown>;
|
|
42
|
+
execute: (args: Record<string, unknown>) => Promise<unknown>;
|
|
43
|
+
dangerLevel?: 'safe' | 'moderate' | 'dangerous';
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* LLM provider interface.
|
|
47
|
+
*/
|
|
48
|
+
export interface LLMProvider {
|
|
49
|
+
name?: string;
|
|
50
|
+
chat(messages: Message[], options?: ChatOptions): Promise<ChatResponse>;
|
|
51
|
+
stream?(messages: Message[], options?: ChatOptions): AsyncIterable<StreamChunk>;
|
|
52
|
+
}
|
|
53
|
+
export interface ChatOptions {
|
|
54
|
+
model?: string;
|
|
55
|
+
maxTokens?: number;
|
|
56
|
+
temperature?: number;
|
|
57
|
+
tools?: ToolDefinition[];
|
|
58
|
+
}
|
|
59
|
+
export interface ChatResponse {
|
|
60
|
+
content: string;
|
|
61
|
+
toolCalls?: ToolCall[];
|
|
62
|
+
usage?: TokenUsage;
|
|
63
|
+
model?: string;
|
|
64
|
+
stopReason?: 'end_turn' | 'tool_use' | 'max_tokens' | 'stop_sequence';
|
|
65
|
+
}
|
|
66
|
+
export interface StreamChunk {
|
|
67
|
+
type: 'text' | 'tool_call' | 'done' | 'error';
|
|
68
|
+
content?: string;
|
|
69
|
+
toolCall?: ToolCall;
|
|
70
|
+
error?: string;
|
|
71
|
+
}
|
|
72
|
+
export interface TokenUsage {
|
|
73
|
+
inputTokens: number;
|
|
74
|
+
outputTokens: number;
|
|
75
|
+
totalTokens: number;
|
|
76
|
+
cacheReadTokens?: number;
|
|
77
|
+
cacheWriteTokens?: number;
|
|
78
|
+
cost?: number;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* Main configuration for ProductionAgent.
|
|
82
|
+
* All features are enabled by default.
|
|
83
|
+
*/
|
|
84
|
+
export interface ProductionAgentConfig {
|
|
85
|
+
/** LLM provider (required) */
|
|
86
|
+
provider: LLMProvider;
|
|
87
|
+
/** Available tools (required) */
|
|
88
|
+
tools: ToolDefinition[];
|
|
89
|
+
/** System prompt */
|
|
90
|
+
systemPrompt?: string;
|
|
91
|
+
/** Model to use */
|
|
92
|
+
model?: string;
|
|
93
|
+
/** Maximum tokens for LLM responses */
|
|
94
|
+
maxTokens?: number;
|
|
95
|
+
/** Temperature for LLM responses */
|
|
96
|
+
temperature?: number;
|
|
97
|
+
/** Hook system configuration */
|
|
98
|
+
hooks?: HooksConfig | false;
|
|
99
|
+
/** Plugin system configuration */
|
|
100
|
+
plugins?: PluginsConfig | false;
|
|
101
|
+
/** Rules/instructions configuration */
|
|
102
|
+
rules?: RulesConfig | false;
|
|
103
|
+
/** Memory system configuration */
|
|
104
|
+
memory?: MemoryConfig | false;
|
|
105
|
+
/** Planning system configuration */
|
|
106
|
+
planning?: PlanningConfig | false;
|
|
107
|
+
/** Reflection/self-critique configuration */
|
|
108
|
+
reflection?: ReflectionConfig | false;
|
|
109
|
+
/** Observability configuration */
|
|
110
|
+
observability?: ObservabilityConfig | false;
|
|
111
|
+
/** Model routing configuration */
|
|
112
|
+
routing?: RoutingConfig | false;
|
|
113
|
+
/** Sandboxing configuration */
|
|
114
|
+
sandbox?: SandboxConfig | false;
|
|
115
|
+
/** Human-in-the-loop configuration */
|
|
116
|
+
humanInLoop?: HumanInLoopConfig | false;
|
|
117
|
+
/** Multi-agent configuration (from Lesson 17) */
|
|
118
|
+
multiAgent?: MultiAgentConfig | false;
|
|
119
|
+
/** ReAct pattern configuration (from Lesson 18) */
|
|
120
|
+
react?: ReActPatternConfig | false;
|
|
121
|
+
/** Execution policy configuration (from Lesson 23) */
|
|
122
|
+
executionPolicy?: ExecutionPolicyConfig | false;
|
|
123
|
+
/** Thread management configuration (from Lesson 24) */
|
|
124
|
+
threads?: ThreadsConfig | false;
|
|
125
|
+
/** Cancellation support configuration */
|
|
126
|
+
cancellation?: CancellationConfig | false;
|
|
127
|
+
/** Resource monitoring configuration */
|
|
128
|
+
resources?: ResourceConfig | false;
|
|
129
|
+
/** LSP (Language Server Protocol) configuration */
|
|
130
|
+
lsp?: LSPAgentConfig | false;
|
|
131
|
+
/** Semantic cache configuration */
|
|
132
|
+
semanticCache?: SemanticCacheAgentConfig | false;
|
|
133
|
+
/** Skills system configuration */
|
|
134
|
+
skills?: SkillsAgentConfig | false;
|
|
135
|
+
/** Codebase context configuration (intelligent code selection) */
|
|
136
|
+
codebaseContext?: CodebaseContextAgentConfig | false;
|
|
137
|
+
/** Compaction configuration (context management) */
|
|
138
|
+
compaction?: CompactionAgentConfig | false;
|
|
139
|
+
/** Maximum context tokens before compaction */
|
|
140
|
+
maxContextTokens?: number;
|
|
141
|
+
/** Maximum iterations for agent loop */
|
|
142
|
+
maxIterations?: number;
|
|
143
|
+
/** Request timeout in ms */
|
|
144
|
+
timeout?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Callback to resolve unknown tools on-demand.
|
|
147
|
+
* Called when a tool is not found in the registered tools.
|
|
148
|
+
* Useful for lazy-loading MCP tools - the resolver can load the tool
|
|
149
|
+
* and return its definition, which will then be registered and executed.
|
|
150
|
+
*/
|
|
151
|
+
toolResolver?: (toolName: string) => ToolDefinition | null;
|
|
152
|
+
/**
|
|
153
|
+
* MCP tool summaries to include in system prompt.
|
|
154
|
+
* These are lightweight descriptions that let the model know what MCP tools
|
|
155
|
+
* are available without loading full schemas.
|
|
156
|
+
*/
|
|
157
|
+
mcpToolSummaries?: Array<{
|
|
158
|
+
name: string;
|
|
159
|
+
description: string;
|
|
160
|
+
}>;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Hooks configuration (Lesson 10).
|
|
164
|
+
*/
|
|
165
|
+
export interface HooksConfig {
|
|
166
|
+
/** Enable/disable hooks */
|
|
167
|
+
enabled?: boolean;
|
|
168
|
+
/** Built-in hooks to enable */
|
|
169
|
+
builtIn?: {
|
|
170
|
+
logging?: boolean;
|
|
171
|
+
metrics?: boolean;
|
|
172
|
+
timing?: boolean;
|
|
173
|
+
};
|
|
174
|
+
/** Custom hooks */
|
|
175
|
+
custom?: Hook[];
|
|
176
|
+
}
|
|
177
|
+
export interface Hook {
|
|
178
|
+
/** Optional unique identifier for duplicate detection */
|
|
179
|
+
id?: string;
|
|
180
|
+
event: HookEvent;
|
|
181
|
+
handler: (data: unknown) => void | Promise<void>;
|
|
182
|
+
priority?: number;
|
|
183
|
+
}
|
|
184
|
+
export type HookEvent = 'agent.start' | 'agent.end' | 'llm.before' | 'llm.after' | 'tool.before' | 'tool.after' | 'error';
|
|
185
|
+
/**
|
|
186
|
+
* Plugins configuration (Lesson 11).
|
|
187
|
+
*/
|
|
188
|
+
export interface PluginsConfig {
|
|
189
|
+
/** Enable/disable plugins */
|
|
190
|
+
enabled?: boolean;
|
|
191
|
+
/** Plugins to load */
|
|
192
|
+
plugins?: Plugin[];
|
|
193
|
+
/** Plugin discovery paths */
|
|
194
|
+
discoveryPaths?: string[];
|
|
195
|
+
}
|
|
196
|
+
export interface Plugin {
|
|
197
|
+
name: string;
|
|
198
|
+
version: string;
|
|
199
|
+
initialize: (context: PluginContext) => Promise<void>;
|
|
200
|
+
cleanup?: () => Promise<void>;
|
|
201
|
+
}
|
|
202
|
+
export interface PluginContext {
|
|
203
|
+
registerHook: (hook: Hook) => void;
|
|
204
|
+
registerTool: (tool: ToolDefinition) => void;
|
|
205
|
+
getConfig: <T>(key: string) => T | undefined;
|
|
206
|
+
log: (level: 'debug' | 'info' | 'warn' | 'error', message: string) => void;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* Rules configuration (Lesson 12).
|
|
210
|
+
*/
|
|
211
|
+
export interface RulesConfig {
|
|
212
|
+
/** Enable/disable rules */
|
|
213
|
+
enabled?: boolean;
|
|
214
|
+
/** Rule sources to load */
|
|
215
|
+
sources?: RuleSource[];
|
|
216
|
+
/** Watch for changes */
|
|
217
|
+
watch?: boolean;
|
|
218
|
+
}
|
|
219
|
+
export interface RuleSource {
|
|
220
|
+
type: 'file' | 'inline';
|
|
221
|
+
path?: string;
|
|
222
|
+
content?: string;
|
|
223
|
+
priority?: number;
|
|
224
|
+
}
|
|
225
|
+
/**
|
|
226
|
+
* Memory configuration (Lesson 14).
|
|
227
|
+
*/
|
|
228
|
+
export interface MemoryConfig {
|
|
229
|
+
/** Enable/disable memory */
|
|
230
|
+
enabled?: boolean;
|
|
231
|
+
/** Memory types to enable */
|
|
232
|
+
types?: {
|
|
233
|
+
episodic?: boolean;
|
|
234
|
+
semantic?: boolean;
|
|
235
|
+
working?: boolean;
|
|
236
|
+
};
|
|
237
|
+
/** Retrieval strategy */
|
|
238
|
+
retrievalStrategy?: 'recency' | 'relevance' | 'importance' | 'hybrid';
|
|
239
|
+
/** Maximum memories to retrieve */
|
|
240
|
+
retrievalLimit?: number;
|
|
241
|
+
/** Persistence path */
|
|
242
|
+
persistPath?: string;
|
|
243
|
+
}
|
|
244
|
+
/**
|
|
245
|
+
* Planning configuration (Lesson 15).
|
|
246
|
+
*/
|
|
247
|
+
export interface PlanningConfig {
|
|
248
|
+
/** Enable/disable planning */
|
|
249
|
+
enabled?: boolean;
|
|
250
|
+
/** Auto-plan for complex tasks */
|
|
251
|
+
autoplan?: boolean;
|
|
252
|
+
/** Complexity threshold for auto-planning */
|
|
253
|
+
complexityThreshold?: number;
|
|
254
|
+
/** Maximum plan depth */
|
|
255
|
+
maxDepth?: number;
|
|
256
|
+
/** Allow re-planning on failure */
|
|
257
|
+
allowReplan?: boolean;
|
|
258
|
+
}
|
|
259
|
+
/**
|
|
260
|
+
* Reflection configuration (Lesson 16).
|
|
261
|
+
*/
|
|
262
|
+
export interface ReflectionConfig {
|
|
263
|
+
/** Enable/disable reflection */
|
|
264
|
+
enabled?: boolean;
|
|
265
|
+
/** Auto-reflect after each response */
|
|
266
|
+
autoReflect?: boolean;
|
|
267
|
+
/** Maximum reflection attempts */
|
|
268
|
+
maxAttempts?: number;
|
|
269
|
+
/** Confidence threshold to accept output */
|
|
270
|
+
confidenceThreshold?: number;
|
|
271
|
+
}
|
|
272
|
+
/**
|
|
273
|
+
* Observability configuration (Lesson 19).
|
|
274
|
+
*/
|
|
275
|
+
export interface ObservabilityConfig {
|
|
276
|
+
/** Enable/disable observability */
|
|
277
|
+
enabled?: boolean;
|
|
278
|
+
/** Tracing configuration */
|
|
279
|
+
tracing?: {
|
|
280
|
+
enabled?: boolean;
|
|
281
|
+
serviceName?: string;
|
|
282
|
+
exporter?: 'console' | 'otlp' | 'custom';
|
|
283
|
+
customExporter?: SpanExporter;
|
|
284
|
+
};
|
|
285
|
+
/** Metrics configuration */
|
|
286
|
+
metrics?: {
|
|
287
|
+
enabled?: boolean;
|
|
288
|
+
collectTokens?: boolean;
|
|
289
|
+
collectCosts?: boolean;
|
|
290
|
+
collectLatencies?: boolean;
|
|
291
|
+
};
|
|
292
|
+
/** Logging configuration */
|
|
293
|
+
logging?: {
|
|
294
|
+
enabled?: boolean;
|
|
295
|
+
level?: 'debug' | 'info' | 'warn' | 'error';
|
|
296
|
+
structured?: boolean;
|
|
297
|
+
};
|
|
298
|
+
/** Full trace capture configuration (from Lesson 26) */
|
|
299
|
+
traceCapture?: {
|
|
300
|
+
enabled?: boolean;
|
|
301
|
+
outputDir?: string;
|
|
302
|
+
captureMessageContent?: boolean;
|
|
303
|
+
captureToolResults?: boolean;
|
|
304
|
+
analyzeCacheBoundaries?: boolean;
|
|
305
|
+
filePattern?: string;
|
|
306
|
+
};
|
|
307
|
+
}
|
|
308
|
+
export interface SpanExporter {
|
|
309
|
+
export(spans: Span[]): Promise<void>;
|
|
310
|
+
}
|
|
311
|
+
export interface Span {
|
|
312
|
+
traceId: string;
|
|
313
|
+
spanId: string;
|
|
314
|
+
name: string;
|
|
315
|
+
startTime: number;
|
|
316
|
+
endTime?: number;
|
|
317
|
+
attributes: Record<string, unknown>;
|
|
318
|
+
}
|
|
319
|
+
/**
|
|
320
|
+
* Routing configuration (Lesson 22).
|
|
321
|
+
*/
|
|
322
|
+
export interface RoutingConfig {
|
|
323
|
+
/** Enable/disable routing */
|
|
324
|
+
enabled?: boolean;
|
|
325
|
+
/** Available models */
|
|
326
|
+
models?: ModelConfig[];
|
|
327
|
+
/** Routing strategy */
|
|
328
|
+
strategy?: 'cost' | 'quality' | 'latency' | 'balanced' | 'rules';
|
|
329
|
+
/** Routing rules */
|
|
330
|
+
rules?: RoutingRule[];
|
|
331
|
+
/** Fallback chain */
|
|
332
|
+
fallbackChain?: string[];
|
|
333
|
+
/** Enable circuit breaker */
|
|
334
|
+
circuitBreaker?: boolean;
|
|
335
|
+
}
|
|
336
|
+
export interface ModelConfig {
|
|
337
|
+
id: string;
|
|
338
|
+
provider: LLMProvider;
|
|
339
|
+
costPer1kInput?: number;
|
|
340
|
+
costPer1kOutput?: number;
|
|
341
|
+
maxTokens?: number;
|
|
342
|
+
capabilities?: string[];
|
|
343
|
+
}
|
|
344
|
+
export interface RoutingRule {
|
|
345
|
+
condition: (context: RoutingContext) => boolean;
|
|
346
|
+
model: string;
|
|
347
|
+
priority?: number;
|
|
348
|
+
}
|
|
349
|
+
export interface RoutingContext {
|
|
350
|
+
task: string;
|
|
351
|
+
complexity?: number;
|
|
352
|
+
requiredCapabilities?: string[];
|
|
353
|
+
budget?: number;
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Sandbox configuration (Lesson 20).
|
|
357
|
+
*/
|
|
358
|
+
export interface SandboxConfig {
|
|
359
|
+
/** Enable/disable sandboxing */
|
|
360
|
+
enabled?: boolean;
|
|
361
|
+
/** Isolation level (legacy, use mode for OS-specific sandboxing) */
|
|
362
|
+
isolation?: 'none' | 'process' | 'container';
|
|
363
|
+
/** Sandbox mode - auto-detects best available sandbox */
|
|
364
|
+
mode?: 'auto' | 'seatbelt' | 'docker' | 'basic' | 'none';
|
|
365
|
+
/** Allowed commands for bash (used by basic sandbox) */
|
|
366
|
+
allowedCommands?: string[];
|
|
367
|
+
/** Blocked commands */
|
|
368
|
+
blockedCommands?: string[];
|
|
369
|
+
/** Resource limits */
|
|
370
|
+
resourceLimits?: {
|
|
371
|
+
maxCpuSeconds?: number;
|
|
372
|
+
maxMemoryMB?: number;
|
|
373
|
+
maxOutputBytes?: number;
|
|
374
|
+
timeout?: number;
|
|
375
|
+
};
|
|
376
|
+
/** Allowed paths for file operations (writable) */
|
|
377
|
+
allowedPaths?: string[];
|
|
378
|
+
/** Readable paths (for OS-specific sandboxes) */
|
|
379
|
+
readablePaths?: string[];
|
|
380
|
+
/** Whether network access is allowed */
|
|
381
|
+
networkAllowed?: boolean;
|
|
382
|
+
/** Docker image to use (for docker mode) */
|
|
383
|
+
dockerImage?: string;
|
|
384
|
+
}
|
|
385
|
+
/**
|
|
386
|
+
* Human-in-the-loop configuration (Lesson 21).
|
|
387
|
+
*/
|
|
388
|
+
export interface HumanInLoopConfig {
|
|
389
|
+
/** Enable/disable human-in-the-loop */
|
|
390
|
+
enabled?: boolean;
|
|
391
|
+
/** Risk threshold requiring approval */
|
|
392
|
+
riskThreshold?: 'low' | 'moderate' | 'high' | 'critical';
|
|
393
|
+
/** Actions that always require approval */
|
|
394
|
+
alwaysApprove?: string[];
|
|
395
|
+
/** Actions that never require approval */
|
|
396
|
+
neverApprove?: string[];
|
|
397
|
+
/** Approval timeout in ms */
|
|
398
|
+
approvalTimeout?: number;
|
|
399
|
+
/** Approval handler */
|
|
400
|
+
approvalHandler?: ApprovalHandler;
|
|
401
|
+
/** Enable audit logging */
|
|
402
|
+
auditLog?: boolean;
|
|
403
|
+
}
|
|
404
|
+
export type ApprovalHandler = (request: ApprovalRequest) => Promise<ApprovalResponse>;
|
|
405
|
+
export interface ApprovalRequest {
|
|
406
|
+
id: string;
|
|
407
|
+
action: string;
|
|
408
|
+
tool?: string;
|
|
409
|
+
args?: Record<string, unknown>;
|
|
410
|
+
risk: 'low' | 'moderate' | 'high' | 'critical';
|
|
411
|
+
context: string;
|
|
412
|
+
}
|
|
413
|
+
export interface ApprovalResponse {
|
|
414
|
+
approved: boolean;
|
|
415
|
+
reason?: string;
|
|
416
|
+
modifiedArgs?: Record<string, unknown>;
|
|
417
|
+
}
|
|
418
|
+
/**
|
|
419
|
+
* Multi-agent configuration (Lesson 17).
|
|
420
|
+
*/
|
|
421
|
+
export interface MultiAgentConfig {
|
|
422
|
+
/** Enable/disable multi-agent */
|
|
423
|
+
enabled?: boolean;
|
|
424
|
+
/** Agent roles to use */
|
|
425
|
+
roles?: AgentRoleConfig[];
|
|
426
|
+
/** Consensus strategy for team decisions */
|
|
427
|
+
consensusStrategy?: 'voting' | 'authority' | 'unanimous' | 'first-complete';
|
|
428
|
+
/** Communication mode */
|
|
429
|
+
communicationMode?: 'broadcast' | 'directed';
|
|
430
|
+
/** Role name that coordinates the team */
|
|
431
|
+
coordinatorRole?: string;
|
|
432
|
+
}
|
|
433
|
+
export interface AgentRoleConfig {
|
|
434
|
+
name: string;
|
|
435
|
+
description: string;
|
|
436
|
+
systemPrompt: string;
|
|
437
|
+
capabilities: string[];
|
|
438
|
+
authority: number;
|
|
439
|
+
model?: string;
|
|
440
|
+
}
|
|
441
|
+
/**
|
|
442
|
+
* ReAct pattern configuration (Lesson 18).
|
|
443
|
+
*/
|
|
444
|
+
export interface ReActPatternConfig {
|
|
445
|
+
/** Enable/disable ReAct reasoning */
|
|
446
|
+
enabled?: boolean;
|
|
447
|
+
/** Maximum reasoning steps */
|
|
448
|
+
maxSteps?: number;
|
|
449
|
+
/** Stop on first valid answer */
|
|
450
|
+
stopOnAnswer?: boolean;
|
|
451
|
+
/** Include reasoning trace in output */
|
|
452
|
+
includeReasoning?: boolean;
|
|
453
|
+
}
|
|
454
|
+
/**
|
|
455
|
+
* Execution policy configuration (Lesson 23).
|
|
456
|
+
*/
|
|
457
|
+
export interface ExecutionPolicyConfig {
|
|
458
|
+
/** Enable/disable execution policies */
|
|
459
|
+
enabled?: boolean;
|
|
460
|
+
/** Default policy for unlisted tools */
|
|
461
|
+
defaultPolicy?: 'allow' | 'prompt' | 'forbidden';
|
|
462
|
+
/** Per-tool policies */
|
|
463
|
+
toolPolicies?: Record<string, ToolPolicyConfig>;
|
|
464
|
+
/** Enable intent-aware decisions */
|
|
465
|
+
intentAware?: boolean;
|
|
466
|
+
/** Minimum confidence for intent-based auto-allow */
|
|
467
|
+
intentConfidenceThreshold?: number;
|
|
468
|
+
/** Policy preset to use */
|
|
469
|
+
preset?: 'strict' | 'balanced' | 'permissive';
|
|
470
|
+
}
|
|
471
|
+
export interface ToolPolicyConfig {
|
|
472
|
+
policy: 'allow' | 'prompt' | 'forbidden';
|
|
473
|
+
conditions?: ToolPolicyCondition[];
|
|
474
|
+
reason?: string;
|
|
475
|
+
}
|
|
476
|
+
export interface ToolPolicyCondition {
|
|
477
|
+
argMatch?: Record<string, string | RegExp>;
|
|
478
|
+
policy: 'allow' | 'prompt' | 'forbidden';
|
|
479
|
+
reason?: string;
|
|
480
|
+
}
|
|
481
|
+
/**
|
|
482
|
+
* Thread management configuration (Lesson 24).
|
|
483
|
+
*/
|
|
484
|
+
export interface ThreadsConfig {
|
|
485
|
+
/** Enable/disable thread management */
|
|
486
|
+
enabled?: boolean;
|
|
487
|
+
/** Auto-create checkpoints at key moments */
|
|
488
|
+
autoCheckpoint?: boolean;
|
|
489
|
+
/** Checkpoint frequency (every N iterations) */
|
|
490
|
+
checkpointFrequency?: number;
|
|
491
|
+
/** Maximum checkpoints to keep */
|
|
492
|
+
maxCheckpoints?: number;
|
|
493
|
+
/** Enable rollback capability */
|
|
494
|
+
enableRollback?: boolean;
|
|
495
|
+
/** Enable forking capability */
|
|
496
|
+
enableForking?: boolean;
|
|
497
|
+
}
|
|
498
|
+
/**
|
|
499
|
+
* Cancellation configuration.
|
|
500
|
+
*/
|
|
501
|
+
export interface CancellationConfig {
|
|
502
|
+
/** Enable/disable cancellation support */
|
|
503
|
+
enabled?: boolean;
|
|
504
|
+
/** Default timeout for operations in ms (0 = no timeout) */
|
|
505
|
+
defaultTimeout?: number;
|
|
506
|
+
/** Grace period for cleanup after cancellation in ms */
|
|
507
|
+
gracePeriod?: number;
|
|
508
|
+
}
|
|
509
|
+
/**
|
|
510
|
+
* Resource monitoring configuration.
|
|
511
|
+
*/
|
|
512
|
+
export interface ResourceConfig {
|
|
513
|
+
/** Enable/disable resource monitoring */
|
|
514
|
+
enabled?: boolean;
|
|
515
|
+
/** Max memory in MB */
|
|
516
|
+
maxMemoryMB?: number;
|
|
517
|
+
/** Max CPU time in seconds */
|
|
518
|
+
maxCpuTimeSec?: number;
|
|
519
|
+
/** Max concurrent operations */
|
|
520
|
+
maxConcurrentOps?: number;
|
|
521
|
+
/** Warning threshold (0-1) */
|
|
522
|
+
warnThreshold?: number;
|
|
523
|
+
/** Critical threshold (0-1) */
|
|
524
|
+
criticalThreshold?: number;
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* LSP (Language Server Protocol) configuration.
|
|
528
|
+
*/
|
|
529
|
+
export interface LSPAgentConfig {
|
|
530
|
+
/** Enable/disable LSP support */
|
|
531
|
+
enabled?: boolean;
|
|
532
|
+
/** Auto-detect and start servers based on file types */
|
|
533
|
+
autoDetect?: boolean;
|
|
534
|
+
/** Custom server configurations (language -> {command, args, extensions}) */
|
|
535
|
+
servers?: Record<string, {
|
|
536
|
+
command: string;
|
|
537
|
+
args?: string[];
|
|
538
|
+
extensions: string[];
|
|
539
|
+
languageId: string;
|
|
540
|
+
}>;
|
|
541
|
+
/** Request timeout in ms */
|
|
542
|
+
timeout?: number;
|
|
543
|
+
}
|
|
544
|
+
/**
|
|
545
|
+
* Semantic cache configuration.
|
|
546
|
+
* Caches LLM responses based on query similarity to avoid redundant calls.
|
|
547
|
+
*/
|
|
548
|
+
export interface SemanticCacheAgentConfig {
|
|
549
|
+
/** Enable/disable semantic caching */
|
|
550
|
+
enabled?: boolean;
|
|
551
|
+
/** Similarity threshold (0-1, default 0.95) - higher = more strict */
|
|
552
|
+
threshold?: number;
|
|
553
|
+
/** Maximum cache size (entries) */
|
|
554
|
+
maxSize?: number;
|
|
555
|
+
/** Time-to-live in milliseconds (0 = no expiry) */
|
|
556
|
+
ttl?: number;
|
|
557
|
+
}
|
|
558
|
+
/**
|
|
559
|
+
* Skills configuration.
|
|
560
|
+
* Discoverable skill packages that provide specialized agent capabilities.
|
|
561
|
+
*/
|
|
562
|
+
export interface SkillsAgentConfig {
|
|
563
|
+
/** Enable/disable skills system */
|
|
564
|
+
enabled?: boolean;
|
|
565
|
+
/** Directories to search for skills */
|
|
566
|
+
directories?: string[];
|
|
567
|
+
/** Whether to load built-in skills */
|
|
568
|
+
loadBuiltIn?: boolean;
|
|
569
|
+
/** Auto-activate skills based on triggers */
|
|
570
|
+
autoActivate?: boolean;
|
|
571
|
+
}
|
|
572
|
+
/**
|
|
573
|
+
* Codebase context configuration.
|
|
574
|
+
* Intelligent code selection for context management within token budgets.
|
|
575
|
+
*/
|
|
576
|
+
export interface CodebaseContextAgentConfig {
|
|
577
|
+
/** Enable/disable codebase context */
|
|
578
|
+
enabled?: boolean;
|
|
579
|
+
/** Root directory to analyze (defaults to cwd) */
|
|
580
|
+
root?: string;
|
|
581
|
+
/** File patterns to include (glob) */
|
|
582
|
+
includePatterns?: string[];
|
|
583
|
+
/** File patterns to exclude (glob) */
|
|
584
|
+
excludePatterns?: string[];
|
|
585
|
+
/** Maximum file size in bytes (default: 100KB) */
|
|
586
|
+
maxFileSize?: number;
|
|
587
|
+
/** Maximum tokens to allocate for codebase context */
|
|
588
|
+
maxTokens?: number;
|
|
589
|
+
/** Selection strategy: importance_first, relevance_first, breadth_first, depth_first */
|
|
590
|
+
strategy?: 'importance_first' | 'relevance_first' | 'breadth_first' | 'depth_first';
|
|
591
|
+
}
|
|
592
|
+
/**
|
|
593
|
+
* Compaction configuration.
|
|
594
|
+
* Controls automatic context compaction for long sessions.
|
|
595
|
+
*/
|
|
596
|
+
export interface CompactionAgentConfig {
|
|
597
|
+
/** Enable/disable compaction */
|
|
598
|
+
enabled?: boolean;
|
|
599
|
+
/** Token threshold to trigger compaction (e.g., 80000) */
|
|
600
|
+
tokenThreshold?: number;
|
|
601
|
+
/** Number of recent messages to preserve verbatim */
|
|
602
|
+
preserveRecentCount?: number;
|
|
603
|
+
/** Whether to preserve tool results in compaction */
|
|
604
|
+
preserveToolResults?: boolean;
|
|
605
|
+
/** Maximum tokens for the summary */
|
|
606
|
+
summaryMaxTokens?: number;
|
|
607
|
+
/** Model to use for summarization (defaults to main model) */
|
|
608
|
+
summaryModel?: string;
|
|
609
|
+
/** Compaction mode: auto, approval, manual */
|
|
610
|
+
mode?: 'auto' | 'approval' | 'manual';
|
|
611
|
+
}
|
|
612
|
+
/**
|
|
613
|
+
* Configuration for trace collection.
|
|
614
|
+
*/
|
|
615
|
+
export interface TraceCollectorConfig {
|
|
616
|
+
/** Enable trace collection */
|
|
617
|
+
enabled?: boolean;
|
|
618
|
+
/** Capture full message content (can be large) */
|
|
619
|
+
captureMessageContent?: boolean;
|
|
620
|
+
/** Capture tool results (can be large) */
|
|
621
|
+
captureToolResults?: boolean;
|
|
622
|
+
/** Max result size before truncation */
|
|
623
|
+
maxResultSize?: number;
|
|
624
|
+
/** Enable cache boundary analysis */
|
|
625
|
+
analyzeCacheBoundaries?: boolean;
|
|
626
|
+
/** Output directory for traces */
|
|
627
|
+
outputDir?: string;
|
|
628
|
+
/** JSONL file name pattern */
|
|
629
|
+
filePattern?: string;
|
|
630
|
+
/** Enable console output for traces */
|
|
631
|
+
enableConsoleOutput?: boolean;
|
|
632
|
+
}
|
|
633
|
+
/**
|
|
634
|
+
* Agent execution state.
|
|
635
|
+
*/
|
|
636
|
+
export interface AgentState {
|
|
637
|
+
/** Current status */
|
|
638
|
+
status: 'idle' | 'running' | 'paused' | 'completed' | 'failed';
|
|
639
|
+
/** Conversation messages */
|
|
640
|
+
messages: Message[];
|
|
641
|
+
/** Current plan (if planning enabled) */
|
|
642
|
+
plan?: AgentPlan;
|
|
643
|
+
/** Memory context (if memory enabled) */
|
|
644
|
+
memoryContext?: string[];
|
|
645
|
+
/** Current iteration */
|
|
646
|
+
iteration: number;
|
|
647
|
+
/** Accumulated metrics */
|
|
648
|
+
metrics: AgentMetrics;
|
|
649
|
+
/** Trace ID for observability */
|
|
650
|
+
traceId?: string;
|
|
651
|
+
}
|
|
652
|
+
export interface AgentPlan {
|
|
653
|
+
goal: string;
|
|
654
|
+
tasks: PlanTask[];
|
|
655
|
+
currentTaskIndex: number;
|
|
656
|
+
}
|
|
657
|
+
export interface PlanTask {
|
|
658
|
+
id: string;
|
|
659
|
+
description: string;
|
|
660
|
+
status: 'pending' | 'in_progress' | 'completed' | 'failed';
|
|
661
|
+
dependencies: string[];
|
|
662
|
+
}
|
|
663
|
+
export interface AgentMetrics {
|
|
664
|
+
totalTokens: number;
|
|
665
|
+
inputTokens: number;
|
|
666
|
+
outputTokens: number;
|
|
667
|
+
estimatedCost: number;
|
|
668
|
+
llmCalls: number;
|
|
669
|
+
toolCalls: number;
|
|
670
|
+
duration: number;
|
|
671
|
+
reflectionAttempts?: number;
|
|
672
|
+
}
|
|
673
|
+
/**
|
|
674
|
+
* Agent run result.
|
|
675
|
+
*/
|
|
676
|
+
export interface AgentResult {
|
|
677
|
+
/** Success flag */
|
|
678
|
+
success: boolean;
|
|
679
|
+
/** Final response */
|
|
680
|
+
response: string;
|
|
681
|
+
/** Error message if failed */
|
|
682
|
+
error?: string;
|
|
683
|
+
/** Execution metrics */
|
|
684
|
+
metrics: AgentMetrics;
|
|
685
|
+
/** Full message history */
|
|
686
|
+
messages: Message[];
|
|
687
|
+
/** Trace ID for debugging */
|
|
688
|
+
traceId?: string;
|
|
689
|
+
/** Plan that was executed (if planning enabled) */
|
|
690
|
+
plan?: AgentPlan;
|
|
691
|
+
}
|
|
692
|
+
/**
|
|
693
|
+
* Events emitted during agent execution.
|
|
694
|
+
*/
|
|
695
|
+
export type AgentEvent = {
|
|
696
|
+
type: 'start';
|
|
697
|
+
task: string;
|
|
698
|
+
traceId: string;
|
|
699
|
+
} | {
|
|
700
|
+
type: 'planning';
|
|
701
|
+
plan: AgentPlan;
|
|
702
|
+
} | {
|
|
703
|
+
type: 'task.start';
|
|
704
|
+
task: PlanTask;
|
|
705
|
+
} | {
|
|
706
|
+
type: 'task.complete';
|
|
707
|
+
task: PlanTask;
|
|
708
|
+
} | {
|
|
709
|
+
type: 'llm.start';
|
|
710
|
+
model: string;
|
|
711
|
+
} | {
|
|
712
|
+
type: 'llm.chunk';
|
|
713
|
+
content: string;
|
|
714
|
+
} | {
|
|
715
|
+
type: 'llm.complete';
|
|
716
|
+
response: ChatResponse;
|
|
717
|
+
} | {
|
|
718
|
+
type: 'tool.start';
|
|
719
|
+
tool: string;
|
|
720
|
+
args: Record<string, unknown>;
|
|
721
|
+
} | {
|
|
722
|
+
type: 'tool.complete';
|
|
723
|
+
tool: string;
|
|
724
|
+
result: unknown;
|
|
725
|
+
} | {
|
|
726
|
+
type: 'tool.blocked';
|
|
727
|
+
tool: string;
|
|
728
|
+
reason: string;
|
|
729
|
+
} | {
|
|
730
|
+
type: 'approval.required';
|
|
731
|
+
request: ApprovalRequest;
|
|
732
|
+
} | {
|
|
733
|
+
type: 'approval.received';
|
|
734
|
+
response: ApprovalResponse;
|
|
735
|
+
} | {
|
|
736
|
+
type: 'reflection';
|
|
737
|
+
attempt: number;
|
|
738
|
+
satisfied: boolean;
|
|
739
|
+
} | {
|
|
740
|
+
type: 'memory.retrieved';
|
|
741
|
+
count: number;
|
|
742
|
+
} | {
|
|
743
|
+
type: 'memory.stored';
|
|
744
|
+
memoryType: string;
|
|
745
|
+
} | {
|
|
746
|
+
type: 'error';
|
|
747
|
+
error: string;
|
|
748
|
+
} | {
|
|
749
|
+
type: 'complete';
|
|
750
|
+
result: AgentResult;
|
|
751
|
+
} | {
|
|
752
|
+
type: 'react.thought';
|
|
753
|
+
step: number;
|
|
754
|
+
thought: string;
|
|
755
|
+
} | {
|
|
756
|
+
type: 'react.action';
|
|
757
|
+
step: number;
|
|
758
|
+
action: string;
|
|
759
|
+
input: Record<string, unknown>;
|
|
760
|
+
} | {
|
|
761
|
+
type: 'react.observation';
|
|
762
|
+
step: number;
|
|
763
|
+
observation: string;
|
|
764
|
+
} | {
|
|
765
|
+
type: 'react.answer';
|
|
766
|
+
answer: string;
|
|
767
|
+
} | {
|
|
768
|
+
type: 'multiagent.spawn';
|
|
769
|
+
agentId: string;
|
|
770
|
+
role: string;
|
|
771
|
+
} | {
|
|
772
|
+
type: 'multiagent.complete';
|
|
773
|
+
agentId: string;
|
|
774
|
+
success: boolean;
|
|
775
|
+
} | {
|
|
776
|
+
type: 'consensus.start';
|
|
777
|
+
strategy: string;
|
|
778
|
+
} | {
|
|
779
|
+
type: 'consensus.reached';
|
|
780
|
+
agreed: boolean;
|
|
781
|
+
result: string;
|
|
782
|
+
} | {
|
|
783
|
+
type: 'policy.evaluated';
|
|
784
|
+
tool: string;
|
|
785
|
+
policy: string;
|
|
786
|
+
reason: string;
|
|
787
|
+
} | {
|
|
788
|
+
type: 'intent.classified';
|
|
789
|
+
tool: string;
|
|
790
|
+
intent: string;
|
|
791
|
+
confidence: number;
|
|
792
|
+
} | {
|
|
793
|
+
type: 'grant.created';
|
|
794
|
+
grantId: string;
|
|
795
|
+
tool: string;
|
|
796
|
+
} | {
|
|
797
|
+
type: 'grant.used';
|
|
798
|
+
grantId: string;
|
|
799
|
+
} | {
|
|
800
|
+
type: 'thread.forked';
|
|
801
|
+
threadId: string;
|
|
802
|
+
parentId: string;
|
|
803
|
+
} | {
|
|
804
|
+
type: 'thread.switched';
|
|
805
|
+
fromId: string;
|
|
806
|
+
toId: string;
|
|
807
|
+
} | {
|
|
808
|
+
type: 'checkpoint.created';
|
|
809
|
+
checkpointId: string;
|
|
810
|
+
label?: string;
|
|
811
|
+
} | {
|
|
812
|
+
type: 'checkpoint.restored';
|
|
813
|
+
checkpointId: string;
|
|
814
|
+
} | {
|
|
815
|
+
type: 'rollback';
|
|
816
|
+
steps: number;
|
|
817
|
+
} | {
|
|
818
|
+
type: 'agent.spawn';
|
|
819
|
+
agentId: string;
|
|
820
|
+
name: string;
|
|
821
|
+
task: string;
|
|
822
|
+
} | {
|
|
823
|
+
type: 'agent.complete';
|
|
824
|
+
agentId: string;
|
|
825
|
+
success: boolean;
|
|
826
|
+
} | {
|
|
827
|
+
type: 'agent.error';
|
|
828
|
+
agentId: string;
|
|
829
|
+
error: string;
|
|
830
|
+
} | {
|
|
831
|
+
type: 'agent.registered';
|
|
832
|
+
name: string;
|
|
833
|
+
} | {
|
|
834
|
+
type: 'agent.unregistered';
|
|
835
|
+
name: string;
|
|
836
|
+
} | {
|
|
837
|
+
type: 'cancellation.requested';
|
|
838
|
+
reason?: string;
|
|
839
|
+
} | {
|
|
840
|
+
type: 'cancellation.completed';
|
|
841
|
+
cleanupDuration: number;
|
|
842
|
+
} | {
|
|
843
|
+
type: 'cache.hit';
|
|
844
|
+
query: string;
|
|
845
|
+
similarity: number;
|
|
846
|
+
} | {
|
|
847
|
+
type: 'cache.miss';
|
|
848
|
+
query: string;
|
|
849
|
+
} | {
|
|
850
|
+
type: 'cache.set';
|
|
851
|
+
query: string;
|
|
852
|
+
} | {
|
|
853
|
+
type: 'compaction.auto';
|
|
854
|
+
tokensBefore: number;
|
|
855
|
+
tokensAfter: number;
|
|
856
|
+
messagesCompacted: number;
|
|
857
|
+
} | {
|
|
858
|
+
type: 'compaction.warning';
|
|
859
|
+
currentTokens: number;
|
|
860
|
+
threshold: number;
|
|
861
|
+
} | {
|
|
862
|
+
type: 'insight.tokens';
|
|
863
|
+
inputTokens: number;
|
|
864
|
+
outputTokens: number;
|
|
865
|
+
cacheReadTokens?: number;
|
|
866
|
+
cacheWriteTokens?: number;
|
|
867
|
+
cost?: number;
|
|
868
|
+
model: string;
|
|
869
|
+
} | {
|
|
870
|
+
type: 'insight.context';
|
|
871
|
+
currentTokens: number;
|
|
872
|
+
maxTokens: number;
|
|
873
|
+
messageCount: number;
|
|
874
|
+
percentUsed: number;
|
|
875
|
+
} | {
|
|
876
|
+
type: 'insight.tool';
|
|
877
|
+
tool: string;
|
|
878
|
+
summary: string;
|
|
879
|
+
durationMs: number;
|
|
880
|
+
success: boolean;
|
|
881
|
+
} | {
|
|
882
|
+
type: 'insight.routing';
|
|
883
|
+
model: string;
|
|
884
|
+
reason: string;
|
|
885
|
+
complexity?: string;
|
|
886
|
+
} | {
|
|
887
|
+
type: 'mode.changed';
|
|
888
|
+
from: string;
|
|
889
|
+
to: string;
|
|
890
|
+
} | {
|
|
891
|
+
type: 'plan.change.queued';
|
|
892
|
+
tool: string;
|
|
893
|
+
changeId?: string;
|
|
894
|
+
} | {
|
|
895
|
+
type: 'plan.approved';
|
|
896
|
+
changeCount: number;
|
|
897
|
+
} | {
|
|
898
|
+
type: 'plan.rejected';
|
|
899
|
+
} | {
|
|
900
|
+
type: 'plan.executing';
|
|
901
|
+
changeIndex: number;
|
|
902
|
+
totalChanges: number;
|
|
903
|
+
};
|
|
904
|
+
export type AgentEventListener = (event: AgentEvent) => void;
|
|
905
|
+
//# sourceMappingURL=types.d.ts.map
|