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 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/costs/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lesson 25: Default Configurations
|
|
3
|
+
*
|
|
4
|
+
* Sensible defaults for all features. Everything is enabled by default
|
|
5
|
+
* for educational purposes, but can be disabled for production use.
|
|
6
|
+
*/
|
|
7
|
+
import type { HooksConfig, PluginsConfig, RulesConfig, MemoryConfig, PlanningConfig, ReflectionConfig, ObservabilityConfig, RoutingConfig, SandboxConfig, HumanInLoopConfig, MultiAgentConfig, ReActPatternConfig, ExecutionPolicyConfig, ThreadsConfig, CancellationConfig, ResourceConfig, LSPAgentConfig, SemanticCacheAgentConfig, SkillsAgentConfig, CodebaseContextAgentConfig, CompactionAgentConfig, ProductionAgentConfig } from './types.js';
|
|
8
|
+
/**
|
|
9
|
+
* Default hooks configuration.
|
|
10
|
+
* Console output is DISABLED by default - enable explicitly when needed.
|
|
11
|
+
*/
|
|
12
|
+
export declare const DEFAULT_HOOKS_CONFIG: HooksConfig;
|
|
13
|
+
/**
|
|
14
|
+
* Default plugins configuration.
|
|
15
|
+
*/
|
|
16
|
+
export declare const DEFAULT_PLUGINS_CONFIG: PluginsConfig;
|
|
17
|
+
/**
|
|
18
|
+
* Default rules configuration.
|
|
19
|
+
*/
|
|
20
|
+
export declare const DEFAULT_RULES_CONFIG: RulesConfig;
|
|
21
|
+
/**
|
|
22
|
+
* Default memory configuration.
|
|
23
|
+
*/
|
|
24
|
+
export declare const DEFAULT_MEMORY_CONFIG: MemoryConfig;
|
|
25
|
+
/**
|
|
26
|
+
* Default planning configuration.
|
|
27
|
+
*/
|
|
28
|
+
export declare const DEFAULT_PLANNING_CONFIG: PlanningConfig;
|
|
29
|
+
/**
|
|
30
|
+
* Default reflection configuration.
|
|
31
|
+
*/
|
|
32
|
+
export declare const DEFAULT_REFLECTION_CONFIG: ReflectionConfig;
|
|
33
|
+
/**
|
|
34
|
+
* Default observability configuration.
|
|
35
|
+
* Console output is DISABLED by default - enable explicitly when needed.
|
|
36
|
+
*/
|
|
37
|
+
export declare const DEFAULT_OBSERVABILITY_CONFIG: ObservabilityConfig;
|
|
38
|
+
/**
|
|
39
|
+
* Default routing configuration.
|
|
40
|
+
*/
|
|
41
|
+
export declare const DEFAULT_ROUTING_CONFIG: RoutingConfig;
|
|
42
|
+
/**
|
|
43
|
+
* Default sandbox configuration.
|
|
44
|
+
*/
|
|
45
|
+
export declare const DEFAULT_SANDBOX_CONFIG: SandboxConfig;
|
|
46
|
+
/**
|
|
47
|
+
* Default human-in-the-loop configuration.
|
|
48
|
+
*/
|
|
49
|
+
export declare const DEFAULT_HUMAN_IN_LOOP_CONFIG: HumanInLoopConfig;
|
|
50
|
+
/**
|
|
51
|
+
* Default multi-agent configuration.
|
|
52
|
+
*/
|
|
53
|
+
export declare const DEFAULT_MULTI_AGENT_CONFIG: MultiAgentConfig;
|
|
54
|
+
/**
|
|
55
|
+
* Default ReAct pattern configuration.
|
|
56
|
+
*/
|
|
57
|
+
export declare const DEFAULT_REACT_CONFIG: ReActPatternConfig;
|
|
58
|
+
/**
|
|
59
|
+
* Default execution policy configuration.
|
|
60
|
+
*/
|
|
61
|
+
export declare const DEFAULT_EXECUTION_POLICY_CONFIG: ExecutionPolicyConfig;
|
|
62
|
+
/**
|
|
63
|
+
* Default threads configuration.
|
|
64
|
+
*/
|
|
65
|
+
export declare const DEFAULT_THREADS_CONFIG: ThreadsConfig;
|
|
66
|
+
/**
|
|
67
|
+
* Default cancellation configuration.
|
|
68
|
+
*/
|
|
69
|
+
export declare const DEFAULT_CANCELLATION_CONFIG: CancellationConfig;
|
|
70
|
+
/**
|
|
71
|
+
* Default resource monitoring configuration.
|
|
72
|
+
*/
|
|
73
|
+
export declare const DEFAULT_RESOURCE_CONFIG: ResourceConfig;
|
|
74
|
+
/**
|
|
75
|
+
* Default LSP (Language Server Protocol) configuration.
|
|
76
|
+
*/
|
|
77
|
+
export declare const DEFAULT_LSP_CONFIG: LSPAgentConfig;
|
|
78
|
+
/**
|
|
79
|
+
* Default semantic cache configuration.
|
|
80
|
+
*/
|
|
81
|
+
export declare const DEFAULT_SEMANTIC_CACHE_CONFIG: SemanticCacheAgentConfig;
|
|
82
|
+
/**
|
|
83
|
+
* Default skills configuration.
|
|
84
|
+
*/
|
|
85
|
+
export declare const DEFAULT_SKILLS_CONFIG: SkillsAgentConfig;
|
|
86
|
+
/**
|
|
87
|
+
* Default compaction configuration.
|
|
88
|
+
*/
|
|
89
|
+
export declare const DEFAULT_COMPACTION_CONFIG: CompactionAgentConfig;
|
|
90
|
+
/**
|
|
91
|
+
* Merge user config with defaults.
|
|
92
|
+
* User values override defaults; false disables the feature.
|
|
93
|
+
*/
|
|
94
|
+
export declare function mergeConfig<T extends object>(defaults: T, userConfig: Partial<T> | false | undefined): T | false;
|
|
95
|
+
/**
|
|
96
|
+
* Default codebase context configuration.
|
|
97
|
+
*/
|
|
98
|
+
export declare const DEFAULT_CODEBASE_CONTEXT_CONFIG: CodebaseContextAgentConfig;
|
|
99
|
+
/**
|
|
100
|
+
* Build complete configuration from partial user config.
|
|
101
|
+
*/
|
|
102
|
+
export declare function buildConfig(userConfig: Partial<ProductionAgentConfig>): Required<Omit<ProductionAgentConfig, 'provider' | 'tools' | 'toolResolver' | 'mcpToolSummaries'>> & Pick<ProductionAgentConfig, 'provider' | 'tools' | 'toolResolver' | 'mcpToolSummaries'>;
|
|
103
|
+
export declare const DEFAULT_SYSTEM_PROMPT = "You are Attocode, a production coding agent with full access to the filesystem and development tools.\n\n## Your Capabilities\n\n**File Operations:**\n- read_file: Read file contents\n- write_file: Create or overwrite files\n- edit_file: Make targeted edits to existing files\n- list_files: List directory contents\n- glob: Find files by pattern (e.g., \"**/*.ts\")\n- grep: Search file contents with regex\n\n**Command Execution:**\n- bash: Run shell commands (git, npm, make, etc.)\n\n**Code Intelligence:**\n- Built-in subagents: researcher, coder, reviewer, architect, debugger, documenter\n- You can spawn subagents for specialized tasks\n- MCP servers may provide additional tools (check with mcp_tool_search)\n\n**Context Management:**\n- Memory system retains information across conversation\n- Checkpoints allow rollback to previous states\n- Context compaction prevents overflow on long sessions\n\n## Guidelines\n\n1. **Use your tools** - You have real filesystem access. Read files, run commands, make changes.\n2. **Batch operations** - Call multiple tools in parallel when they're independent.\n3. **Verify changes** - After editing, read the file back or run tests to confirm.\n4. **Be direct** - You can actually do things, not just explain how. Do them.\n5. **Ask if unclear** - Request clarification for ambiguous tasks.\n\n## Tool Usage Pattern\n\nWhen exploring a codebase:\n```\n1. glob(\"**/*.ts\") to find TypeScript files\n2. read_file on key files (package.json, README, main entry)\n3. grep for specific patterns\n```\n\nWhen making changes:\n```\n1. read_file to understand current state\n2. edit_file to make changes\n3. bash(\"npm run typecheck\") to verify\n```";
|
|
104
|
+
/**
|
|
105
|
+
* Check if a feature is enabled in config.
|
|
106
|
+
*/
|
|
107
|
+
export declare function isFeatureEnabled<T extends {
|
|
108
|
+
enabled?: boolean;
|
|
109
|
+
}>(config: T | false | undefined): config is T;
|
|
110
|
+
/**
|
|
111
|
+
* Get enabled features from config.
|
|
112
|
+
*/
|
|
113
|
+
export declare function getEnabledFeatures(config: ReturnType<typeof buildConfig>): string[];
|
|
114
|
+
//# sourceMappingURL=defaults.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
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|
+
/**
|
|
2
|
+
* Lesson 25: Default Configurations
|
|
3
|
+
*
|
|
4
|
+
* Sensible defaults for all features. Everything is enabled by default
|
|
5
|
+
* for educational purposes, but can be disabled for production use.
|
|
6
|
+
*/
|
|
7
|
+
// =============================================================================
|
|
8
|
+
// FEATURE DEFAULTS
|
|
9
|
+
// =============================================================================
|
|
10
|
+
/**
|
|
11
|
+
* Default hooks configuration.
|
|
12
|
+
* Console output is DISABLED by default - enable explicitly when needed.
|
|
13
|
+
*/
|
|
14
|
+
export const DEFAULT_HOOKS_CONFIG = {
|
|
15
|
+
enabled: true,
|
|
16
|
+
builtIn: {
|
|
17
|
+
logging: false, // Disabled by default - prints [Hook] logs to console
|
|
18
|
+
metrics: true,
|
|
19
|
+
timing: false, // Disabled by default - prints [Hook] timing to console
|
|
20
|
+
},
|
|
21
|
+
custom: [],
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Default plugins configuration.
|
|
25
|
+
*/
|
|
26
|
+
export const DEFAULT_PLUGINS_CONFIG = {
|
|
27
|
+
enabled: true,
|
|
28
|
+
plugins: [],
|
|
29
|
+
discoveryPaths: [],
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Default rules configuration.
|
|
33
|
+
*/
|
|
34
|
+
export const DEFAULT_RULES_CONFIG = {
|
|
35
|
+
enabled: true,
|
|
36
|
+
sources: [
|
|
37
|
+
{ type: 'file', path: 'CLAUDE.md', priority: 1 },
|
|
38
|
+
{ type: 'file', path: '.agent/rules.md', priority: 2 },
|
|
39
|
+
],
|
|
40
|
+
watch: false,
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Default memory configuration.
|
|
44
|
+
*/
|
|
45
|
+
export const DEFAULT_MEMORY_CONFIG = {
|
|
46
|
+
enabled: true,
|
|
47
|
+
types: {
|
|
48
|
+
episodic: true,
|
|
49
|
+
semantic: true,
|
|
50
|
+
working: true,
|
|
51
|
+
},
|
|
52
|
+
retrievalStrategy: 'hybrid',
|
|
53
|
+
retrievalLimit: 10,
|
|
54
|
+
persistPath: undefined, // In-memory by default
|
|
55
|
+
};
|
|
56
|
+
/**
|
|
57
|
+
* Default planning configuration.
|
|
58
|
+
*/
|
|
59
|
+
export const DEFAULT_PLANNING_CONFIG = {
|
|
60
|
+
enabled: true,
|
|
61
|
+
autoplan: true,
|
|
62
|
+
complexityThreshold: 5,
|
|
63
|
+
maxDepth: 3,
|
|
64
|
+
allowReplan: true,
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Default reflection configuration.
|
|
68
|
+
*/
|
|
69
|
+
export const DEFAULT_REFLECTION_CONFIG = {
|
|
70
|
+
enabled: true,
|
|
71
|
+
autoReflect: false, // Manual reflection by default
|
|
72
|
+
maxAttempts: 3,
|
|
73
|
+
confidenceThreshold: 0.8,
|
|
74
|
+
};
|
|
75
|
+
/**
|
|
76
|
+
* Default observability configuration.
|
|
77
|
+
* Console output is DISABLED by default - enable explicitly when needed.
|
|
78
|
+
*/
|
|
79
|
+
export const DEFAULT_OBSERVABILITY_CONFIG = {
|
|
80
|
+
enabled: true,
|
|
81
|
+
tracing: {
|
|
82
|
+
enabled: false, // Disabled by default - prints trace tree to console
|
|
83
|
+
serviceName: 'production-agent',
|
|
84
|
+
exporter: 'console',
|
|
85
|
+
},
|
|
86
|
+
metrics: {
|
|
87
|
+
enabled: true,
|
|
88
|
+
collectTokens: true,
|
|
89
|
+
collectCosts: true,
|
|
90
|
+
collectLatencies: true,
|
|
91
|
+
},
|
|
92
|
+
logging: {
|
|
93
|
+
enabled: false, // Disabled by default - prints JSON logs to console
|
|
94
|
+
level: 'info',
|
|
95
|
+
structured: true,
|
|
96
|
+
},
|
|
97
|
+
};
|
|
98
|
+
/**
|
|
99
|
+
* Default routing configuration.
|
|
100
|
+
*/
|
|
101
|
+
export const DEFAULT_ROUTING_CONFIG = {
|
|
102
|
+
enabled: false, // Disabled by default (requires multiple providers)
|
|
103
|
+
models: [],
|
|
104
|
+
strategy: 'balanced',
|
|
105
|
+
rules: [],
|
|
106
|
+
fallbackChain: [],
|
|
107
|
+
circuitBreaker: true,
|
|
108
|
+
};
|
|
109
|
+
/**
|
|
110
|
+
* Default sandbox configuration.
|
|
111
|
+
*/
|
|
112
|
+
export const DEFAULT_SANDBOX_CONFIG = {
|
|
113
|
+
enabled: true,
|
|
114
|
+
isolation: 'process',
|
|
115
|
+
mode: 'auto', // Auto-detect best sandbox (seatbelt on macOS, docker on Linux, basic fallback)
|
|
116
|
+
allowedCommands: [
|
|
117
|
+
'node', 'npm', 'npx', 'yarn', 'pnpm', 'bun',
|
|
118
|
+
'git', 'ls', 'cat', 'head', 'tail', 'grep', 'find', 'wc',
|
|
119
|
+
'echo', 'pwd', 'which', 'env', 'mkdir', 'cp', 'mv', 'touch',
|
|
120
|
+
'tsc', 'eslint', 'prettier', 'jest', 'vitest', 'mocha',
|
|
121
|
+
],
|
|
122
|
+
blockedCommands: [
|
|
123
|
+
'rm -rf /',
|
|
124
|
+
'rm -rf ~',
|
|
125
|
+
'sudo',
|
|
126
|
+
'chmod 777',
|
|
127
|
+
'curl | sh',
|
|
128
|
+
'curl | bash',
|
|
129
|
+
'wget | sh',
|
|
130
|
+
'wget | bash',
|
|
131
|
+
],
|
|
132
|
+
resourceLimits: {
|
|
133
|
+
maxCpuSeconds: 30,
|
|
134
|
+
maxMemoryMB: 512,
|
|
135
|
+
maxOutputBytes: 1024 * 1024, // 1MB
|
|
136
|
+
timeout: 60000, // 1 minute
|
|
137
|
+
},
|
|
138
|
+
allowedPaths: ['.', process.cwd()],
|
|
139
|
+
readablePaths: ['/'],
|
|
140
|
+
networkAllowed: false, // Network disabled by default for security
|
|
141
|
+
dockerImage: 'node:20-slim', // Default Docker image
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Default human-in-the-loop configuration.
|
|
145
|
+
*/
|
|
146
|
+
export const DEFAULT_HUMAN_IN_LOOP_CONFIG = {
|
|
147
|
+
enabled: true,
|
|
148
|
+
riskThreshold: 'high', // Only require approval for high-risk actions
|
|
149
|
+
alwaysApprove: [
|
|
150
|
+
'delete_file',
|
|
151
|
+
'rm',
|
|
152
|
+
'drop_table',
|
|
153
|
+
'truncate',
|
|
154
|
+
],
|
|
155
|
+
neverApprove: [
|
|
156
|
+
'read_file',
|
|
157
|
+
'list_directory',
|
|
158
|
+
'search',
|
|
159
|
+
],
|
|
160
|
+
approvalTimeout: 300000, // 5 minutes
|
|
161
|
+
approvalHandler: undefined, // Will use default console prompt
|
|
162
|
+
auditLog: true,
|
|
163
|
+
};
|
|
164
|
+
/**
|
|
165
|
+
* Default multi-agent configuration.
|
|
166
|
+
*/
|
|
167
|
+
export const DEFAULT_MULTI_AGENT_CONFIG = {
|
|
168
|
+
enabled: false, // Disabled by default (requires explicit role setup)
|
|
169
|
+
roles: [],
|
|
170
|
+
consensusStrategy: 'voting',
|
|
171
|
+
communicationMode: 'broadcast',
|
|
172
|
+
coordinatorRole: undefined,
|
|
173
|
+
};
|
|
174
|
+
/**
|
|
175
|
+
* Default ReAct pattern configuration.
|
|
176
|
+
*/
|
|
177
|
+
export const DEFAULT_REACT_CONFIG = {
|
|
178
|
+
enabled: false, // Disabled by default (use runWithReAct() explicitly)
|
|
179
|
+
maxSteps: 15,
|
|
180
|
+
stopOnAnswer: true,
|
|
181
|
+
includeReasoning: true,
|
|
182
|
+
};
|
|
183
|
+
/**
|
|
184
|
+
* Default execution policy configuration.
|
|
185
|
+
*/
|
|
186
|
+
export const DEFAULT_EXECUTION_POLICY_CONFIG = {
|
|
187
|
+
enabled: true, // Enabled by default for safety
|
|
188
|
+
defaultPolicy: 'prompt',
|
|
189
|
+
toolPolicies: {
|
|
190
|
+
read_file: { policy: 'allow' },
|
|
191
|
+
list_directory: { policy: 'allow' },
|
|
192
|
+
search: { policy: 'allow' },
|
|
193
|
+
},
|
|
194
|
+
intentAware: true,
|
|
195
|
+
intentConfidenceThreshold: 0.7,
|
|
196
|
+
preset: 'balanced',
|
|
197
|
+
};
|
|
198
|
+
/**
|
|
199
|
+
* Default threads configuration.
|
|
200
|
+
*/
|
|
201
|
+
export const DEFAULT_THREADS_CONFIG = {
|
|
202
|
+
enabled: true, // Enabled by default for safety and recovery
|
|
203
|
+
autoCheckpoint: true,
|
|
204
|
+
checkpointFrequency: 5, // Every 5 iterations
|
|
205
|
+
maxCheckpoints: 10,
|
|
206
|
+
enableRollback: true,
|
|
207
|
+
enableForking: true,
|
|
208
|
+
};
|
|
209
|
+
/**
|
|
210
|
+
* Default cancellation configuration.
|
|
211
|
+
*/
|
|
212
|
+
export const DEFAULT_CANCELLATION_CONFIG = {
|
|
213
|
+
enabled: true, // Enabled by default for graceful interruption
|
|
214
|
+
defaultTimeout: 0, // No timeout by default (controlled by maxIterations)
|
|
215
|
+
gracePeriod: 5000, // 5 seconds for cleanup after cancellation
|
|
216
|
+
};
|
|
217
|
+
/**
|
|
218
|
+
* Default resource monitoring configuration.
|
|
219
|
+
*/
|
|
220
|
+
export const DEFAULT_RESOURCE_CONFIG = {
|
|
221
|
+
enabled: true, // Enabled by default for resource protection
|
|
222
|
+
maxMemoryMB: 512, // 512MB default memory limit
|
|
223
|
+
maxCpuTimeSec: 900, // 15 minutes default CPU time limit (was 5 min - too strict for complex tasks)
|
|
224
|
+
maxConcurrentOps: 10, // Max 10 concurrent operations
|
|
225
|
+
warnThreshold: 0.7, // Warn at 70% usage
|
|
226
|
+
criticalThreshold: 0.9, // Critical at 90% usage
|
|
227
|
+
};
|
|
228
|
+
/**
|
|
229
|
+
* Default LSP (Language Server Protocol) configuration.
|
|
230
|
+
*/
|
|
231
|
+
export const DEFAULT_LSP_CONFIG = {
|
|
232
|
+
enabled: false, // Disabled by default (requires language servers to be installed)
|
|
233
|
+
autoDetect: true, // Auto-detect languages when enabled
|
|
234
|
+
servers: undefined, // Use built-in server configs
|
|
235
|
+
timeout: 30000, // 30 second timeout for LSP requests
|
|
236
|
+
};
|
|
237
|
+
/**
|
|
238
|
+
* Default semantic cache configuration.
|
|
239
|
+
*/
|
|
240
|
+
export const DEFAULT_SEMANTIC_CACHE_CONFIG = {
|
|
241
|
+
enabled: false, // Disabled by default (optimization, not critical)
|
|
242
|
+
threshold: 0.95, // High similarity threshold for cache hits
|
|
243
|
+
maxSize: 1000, // Max 1000 cached entries
|
|
244
|
+
ttl: 0, // No expiry by default
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* Default skills configuration.
|
|
248
|
+
*/
|
|
249
|
+
export const DEFAULT_SKILLS_CONFIG = {
|
|
250
|
+
enabled: true, // Enabled by default for discoverable capabilities
|
|
251
|
+
directories: undefined, // Uses getDefaultSkillDirectories() from skills.ts
|
|
252
|
+
loadBuiltIn: true, // Load built-in skills
|
|
253
|
+
autoActivate: false, // Manual activation by default
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* Default compaction configuration.
|
|
257
|
+
*/
|
|
258
|
+
export const DEFAULT_COMPACTION_CONFIG = {
|
|
259
|
+
enabled: true, // Enabled by default for context management
|
|
260
|
+
tokenThreshold: 80000, // Trigger at 80K tokens
|
|
261
|
+
preserveRecentCount: 10, // Keep last 10 messages verbatim
|
|
262
|
+
preserveToolResults: true, // Keep tool results
|
|
263
|
+
summaryMaxTokens: 2000, // Summary size limit
|
|
264
|
+
summaryModel: undefined, // Uses default model
|
|
265
|
+
mode: 'auto', // Auto-compact without prompting
|
|
266
|
+
};
|
|
267
|
+
// =============================================================================
|
|
268
|
+
// MERGE HELPERS
|
|
269
|
+
// =============================================================================
|
|
270
|
+
/**
|
|
271
|
+
* Merge user config with defaults.
|
|
272
|
+
* User values override defaults; false disables the feature.
|
|
273
|
+
*/
|
|
274
|
+
export function mergeConfig(defaults, userConfig) {
|
|
275
|
+
if (userConfig === false) {
|
|
276
|
+
return false;
|
|
277
|
+
}
|
|
278
|
+
if (userConfig === undefined) {
|
|
279
|
+
return defaults;
|
|
280
|
+
}
|
|
281
|
+
return {
|
|
282
|
+
...defaults,
|
|
283
|
+
...userConfig,
|
|
284
|
+
// Deep merge nested objects
|
|
285
|
+
...Object.fromEntries(Object.entries(userConfig).map(([key, value]) => {
|
|
286
|
+
const defaultValue = defaults[key];
|
|
287
|
+
if (typeof value === 'object' &&
|
|
288
|
+
value !== null &&
|
|
289
|
+
!Array.isArray(value) &&
|
|
290
|
+
typeof defaultValue === 'object' &&
|
|
291
|
+
defaultValue !== null &&
|
|
292
|
+
!Array.isArray(defaultValue)) {
|
|
293
|
+
return [key, { ...defaultValue, ...value }];
|
|
294
|
+
}
|
|
295
|
+
return [key, value];
|
|
296
|
+
})),
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Default codebase context configuration.
|
|
301
|
+
*/
|
|
302
|
+
export const DEFAULT_CODEBASE_CONTEXT_CONFIG = {
|
|
303
|
+
enabled: false, // Disabled by default (optimization, not critical)
|
|
304
|
+
includePatterns: ['**/*.ts', '**/*.tsx', '**/*.js', '**/*.jsx', '**/*.py', '**/*.go', '**/*.rs'],
|
|
305
|
+
excludePatterns: ['**/node_modules/**', '**/dist/**', '**/build/**', '**/.git/**'],
|
|
306
|
+
maxFileSize: 100 * 1024, // 100KB
|
|
307
|
+
maxTokens: 50000,
|
|
308
|
+
strategy: 'importance_first',
|
|
309
|
+
};
|
|
310
|
+
/**
|
|
311
|
+
* Build complete configuration from partial user config.
|
|
312
|
+
*/
|
|
313
|
+
export function buildConfig(userConfig) {
|
|
314
|
+
return {
|
|
315
|
+
provider: userConfig.provider,
|
|
316
|
+
tools: userConfig.tools || [],
|
|
317
|
+
systemPrompt: userConfig.systemPrompt || DEFAULT_SYSTEM_PROMPT,
|
|
318
|
+
model: userConfig.model || 'default',
|
|
319
|
+
maxTokens: userConfig.maxTokens ?? 4096,
|
|
320
|
+
temperature: userConfig.temperature ?? 0.7,
|
|
321
|
+
hooks: mergeConfig(DEFAULT_HOOKS_CONFIG, userConfig.hooks),
|
|
322
|
+
plugins: mergeConfig(DEFAULT_PLUGINS_CONFIG, userConfig.plugins),
|
|
323
|
+
rules: mergeConfig(DEFAULT_RULES_CONFIG, userConfig.rules),
|
|
324
|
+
memory: mergeConfig(DEFAULT_MEMORY_CONFIG, userConfig.memory),
|
|
325
|
+
planning: mergeConfig(DEFAULT_PLANNING_CONFIG, userConfig.planning),
|
|
326
|
+
reflection: mergeConfig(DEFAULT_REFLECTION_CONFIG, userConfig.reflection),
|
|
327
|
+
observability: mergeConfig(DEFAULT_OBSERVABILITY_CONFIG, userConfig.observability),
|
|
328
|
+
routing: mergeConfig(DEFAULT_ROUTING_CONFIG, userConfig.routing),
|
|
329
|
+
sandbox: mergeConfig(DEFAULT_SANDBOX_CONFIG, userConfig.sandbox),
|
|
330
|
+
humanInLoop: mergeConfig(DEFAULT_HUMAN_IN_LOOP_CONFIG, userConfig.humanInLoop),
|
|
331
|
+
multiAgent: mergeConfig(DEFAULT_MULTI_AGENT_CONFIG, userConfig.multiAgent),
|
|
332
|
+
react: mergeConfig(DEFAULT_REACT_CONFIG, userConfig.react),
|
|
333
|
+
executionPolicy: mergeConfig(DEFAULT_EXECUTION_POLICY_CONFIG, userConfig.executionPolicy),
|
|
334
|
+
threads: mergeConfig(DEFAULT_THREADS_CONFIG, userConfig.threads),
|
|
335
|
+
cancellation: mergeConfig(DEFAULT_CANCELLATION_CONFIG, userConfig.cancellation),
|
|
336
|
+
resources: mergeConfig(DEFAULT_RESOURCE_CONFIG, userConfig.resources),
|
|
337
|
+
lsp: mergeConfig(DEFAULT_LSP_CONFIG, userConfig.lsp),
|
|
338
|
+
semanticCache: mergeConfig(DEFAULT_SEMANTIC_CACHE_CONFIG, userConfig.semanticCache),
|
|
339
|
+
skills: mergeConfig(DEFAULT_SKILLS_CONFIG, userConfig.skills),
|
|
340
|
+
codebaseContext: mergeConfig(DEFAULT_CODEBASE_CONTEXT_CONFIG, userConfig.codebaseContext),
|
|
341
|
+
compaction: mergeConfig(DEFAULT_COMPACTION_CONFIG, userConfig.compaction),
|
|
342
|
+
maxContextTokens: userConfig.maxContextTokens ?? 100000, // 100k tokens default
|
|
343
|
+
maxIterations: userConfig.maxIterations ?? 50,
|
|
344
|
+
timeout: userConfig.timeout ?? 300000, // 5 minutes
|
|
345
|
+
toolResolver: userConfig.toolResolver, // Optional: for lazy-loading MCP tools
|
|
346
|
+
mcpToolSummaries: userConfig.mcpToolSummaries, // Optional: MCP tool summaries for system prompt
|
|
347
|
+
};
|
|
348
|
+
}
|
|
349
|
+
// =============================================================================
|
|
350
|
+
// DEFAULT SYSTEM PROMPT
|
|
351
|
+
// =============================================================================
|
|
352
|
+
export const DEFAULT_SYSTEM_PROMPT = `You are Attocode, a production coding agent with full access to the filesystem and development tools.
|
|
353
|
+
|
|
354
|
+
## Your Capabilities
|
|
355
|
+
|
|
356
|
+
**File Operations:**
|
|
357
|
+
- read_file: Read file contents
|
|
358
|
+
- write_file: Create or overwrite files
|
|
359
|
+
- edit_file: Make targeted edits to existing files
|
|
360
|
+
- list_files: List directory contents
|
|
361
|
+
- glob: Find files by pattern (e.g., "**/*.ts")
|
|
362
|
+
- grep: Search file contents with regex
|
|
363
|
+
|
|
364
|
+
**Command Execution:**
|
|
365
|
+
- bash: Run shell commands (git, npm, make, etc.)
|
|
366
|
+
|
|
367
|
+
**Code Intelligence:**
|
|
368
|
+
- Built-in subagents: researcher, coder, reviewer, architect, debugger, documenter
|
|
369
|
+
- You can spawn subagents for specialized tasks
|
|
370
|
+
- MCP servers may provide additional tools (check with mcp_tool_search)
|
|
371
|
+
|
|
372
|
+
**Context Management:**
|
|
373
|
+
- Memory system retains information across conversation
|
|
374
|
+
- Checkpoints allow rollback to previous states
|
|
375
|
+
- Context compaction prevents overflow on long sessions
|
|
376
|
+
|
|
377
|
+
## Guidelines
|
|
378
|
+
|
|
379
|
+
1. **Use your tools** - You have real filesystem access. Read files, run commands, make changes.
|
|
380
|
+
2. **Batch operations** - Call multiple tools in parallel when they're independent.
|
|
381
|
+
3. **Verify changes** - After editing, read the file back or run tests to confirm.
|
|
382
|
+
4. **Be direct** - You can actually do things, not just explain how. Do them.
|
|
383
|
+
5. **Ask if unclear** - Request clarification for ambiguous tasks.
|
|
384
|
+
|
|
385
|
+
## Tool Usage Pattern
|
|
386
|
+
|
|
387
|
+
When exploring a codebase:
|
|
388
|
+
\`\`\`
|
|
389
|
+
1. glob("**/*.ts") to find TypeScript files
|
|
390
|
+
2. read_file on key files (package.json, README, main entry)
|
|
391
|
+
3. grep for specific patterns
|
|
392
|
+
\`\`\`
|
|
393
|
+
|
|
394
|
+
When making changes:
|
|
395
|
+
\`\`\`
|
|
396
|
+
1. read_file to understand current state
|
|
397
|
+
2. edit_file to make changes
|
|
398
|
+
3. bash("npm run typecheck") to verify
|
|
399
|
+
\`\`\``;
|
|
400
|
+
// =============================================================================
|
|
401
|
+
// FEATURE DETECTION
|
|
402
|
+
// =============================================================================
|
|
403
|
+
/**
|
|
404
|
+
* Check if a feature is enabled in config.
|
|
405
|
+
*/
|
|
406
|
+
export function isFeatureEnabled(config) {
|
|
407
|
+
if (config === false || config === undefined) {
|
|
408
|
+
return false;
|
|
409
|
+
}
|
|
410
|
+
return config.enabled !== false;
|
|
411
|
+
}
|
|
412
|
+
/**
|
|
413
|
+
* Get enabled features from config.
|
|
414
|
+
*/
|
|
415
|
+
export function getEnabledFeatures(config) {
|
|
416
|
+
const features = [];
|
|
417
|
+
if (isFeatureEnabled(config.hooks))
|
|
418
|
+
features.push('hooks');
|
|
419
|
+
if (isFeatureEnabled(config.plugins))
|
|
420
|
+
features.push('plugins');
|
|
421
|
+
if (isFeatureEnabled(config.rules))
|
|
422
|
+
features.push('rules');
|
|
423
|
+
if (isFeatureEnabled(config.memory))
|
|
424
|
+
features.push('memory');
|
|
425
|
+
if (isFeatureEnabled(config.planning))
|
|
426
|
+
features.push('planning');
|
|
427
|
+
if (isFeatureEnabled(config.reflection))
|
|
428
|
+
features.push('reflection');
|
|
429
|
+
if (isFeatureEnabled(config.observability))
|
|
430
|
+
features.push('observability');
|
|
431
|
+
if (isFeatureEnabled(config.routing))
|
|
432
|
+
features.push('routing');
|
|
433
|
+
if (isFeatureEnabled(config.sandbox))
|
|
434
|
+
features.push('sandbox');
|
|
435
|
+
if (isFeatureEnabled(config.humanInLoop))
|
|
436
|
+
features.push('humanInLoop');
|
|
437
|
+
if (isFeatureEnabled(config.multiAgent))
|
|
438
|
+
features.push('multiAgent');
|
|
439
|
+
if (isFeatureEnabled(config.react))
|
|
440
|
+
features.push('react');
|
|
441
|
+
if (isFeatureEnabled(config.executionPolicy))
|
|
442
|
+
features.push('executionPolicy');
|
|
443
|
+
if (isFeatureEnabled(config.threads))
|
|
444
|
+
features.push('threads');
|
|
445
|
+
if (isFeatureEnabled(config.cancellation))
|
|
446
|
+
features.push('cancellation');
|
|
447
|
+
if (isFeatureEnabled(config.resources))
|
|
448
|
+
features.push('resources');
|
|
449
|
+
if (isFeatureEnabled(config.lsp))
|
|
450
|
+
features.push('lsp');
|
|
451
|
+
if (isFeatureEnabled(config.semanticCache))
|
|
452
|
+
features.push('semanticCache');
|
|
453
|
+
if (isFeatureEnabled(config.skills))
|
|
454
|
+
features.push('skills');
|
|
455
|
+
return features;
|
|
456
|
+
}
|
|
457
|
+
//# sourceMappingURL=defaults.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"defaults.js","sourceRoot":"","sources":["../../src/defaults.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AA2BH,gFAAgF;AAChF,mBAAmB;AACnB,gFAAgF;AAEhF;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAgB;IAC/C,OAAO,EAAE,IAAI;IACb,OAAO,EAAE;QACP,OAAO,EAAE,KAAK,EAAE,sDAAsD;QACtE,OAAO,EAAE,IAAI;QACb,MAAM,EAAE,KAAK,EAAG,wDAAwD;KACzE;IACD,MAAM,EAAE,EAAE;CACX,CAAC;AAEF;;GAEG;AACH,MAAM,CAAC,MAAM,sBAAsB,GAAkB;IACnD,OAAO,EAAE,IAAI;IACb,OAAO,EAAE,EAA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AgB,CAAC,MAAM,CAAC,aAAa,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC;IAC3E,IAAI,gBAAgB,CAAC,MAAM,CAAC,MAAM,CAAC;QAAE,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;IAE7D,OAAO,QAAQ,CAAC;AAClB,CAAC"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* First-run detection and setup for attocode.
|
|
3
|
+
*
|
|
4
|
+
* Detects available API keys and guides users through initial setup.
|
|
5
|
+
*/
|
|
6
|
+
export interface DetectedProvider {
|
|
7
|
+
name: 'anthropic' | 'openrouter' | 'openai';
|
|
8
|
+
source: 'env' | 'config';
|
|
9
|
+
hasKey: boolean;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Detect available providers from environment variables.
|
|
13
|
+
*/
|
|
14
|
+
export declare function detectProviders(): DetectedProvider[];
|
|
15
|
+
/**
|
|
16
|
+
* Check if this is the first run (no config exists).
|
|
17
|
+
*/
|
|
18
|
+
export declare function isFirstRun(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Check if we have any usable provider.
|
|
21
|
+
*/
|
|
22
|
+
export declare function hasUsableProvider(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* Get the default provider based on available keys.
|
|
25
|
+
*/
|
|
26
|
+
export declare function getDefaultProvider(): DetectedProvider | null;
|
|
27
|
+
/**
|
|
28
|
+
* Create initial config file with detected settings.
|
|
29
|
+
*/
|
|
30
|
+
export declare function createInitialConfig(): Promise<void>;
|
|
31
|
+
/**
|
|
32
|
+
* Show first-run message with setup instructions.
|
|
33
|
+
*/
|
|
34
|
+
export declare function getFirstRunMessage(): string;
|
|
35
|
+
//# sourceMappingURL=first-run.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"first-run.d.ts","sourceRoot":"","sources":["../../src/first-run.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAKH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,WAAW,GAAG,YAAY,GAAG,QAAQ,CAAC;IAC5C,MAAM,EAAE,KAAK,GAAG,QAAQ,CAAC;IACzB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;GAEG;AACH,wBAAgB,eAAe,IAAI,gBAAgB,EAAE,CAcpD;AAED;;GAEG;AACH,wBAAgB,UAAU,IAAI,OAAO,CAEpC;AAED;;GAEG;AACH,wBAAgB,iBAAiB,IAAI,OAAO,CAE3C;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,gBAAgB,GAAG,IAAI,CAO5D;AAED;;GAEG;AACH,wBAAsB,mBAAmB,IAAI,OAAO,CAAC,IAAI,CAAC,CAezD;AAED;;GAEG;AACH,wBAAgB,kBAAkB,IAAI,MAAM,CA4B3C"}
|