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,306 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Image Renderer
|
|
3
|
+
*
|
|
4
|
+
* Renders images inline in the terminal using the best available protocol.
|
|
5
|
+
* Supports Kitty, iTerm2/WezTerm, and falls back to block characters.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```typescript
|
|
9
|
+
* const renderer = createImageRenderer();
|
|
10
|
+
* await renderer.renderFile('/path/to/image.png');
|
|
11
|
+
* ```
|
|
12
|
+
*/
|
|
13
|
+
import { readFile } from 'node:fs/promises';
|
|
14
|
+
import { existsSync } from 'node:fs';
|
|
15
|
+
import { extname } from 'node:path';
|
|
16
|
+
/**
|
|
17
|
+
* Supported image formats.
|
|
18
|
+
*/
|
|
19
|
+
const SUPPORTED_FORMATS = new Set(['.png', '.jpg', '.jpeg', '.gif', '.webp', '.bmp']);
|
|
20
|
+
// =============================================================================
|
|
21
|
+
// PROTOCOL DETECTION
|
|
22
|
+
// =============================================================================
|
|
23
|
+
/**
|
|
24
|
+
* Detect the best available image protocol for the current terminal.
|
|
25
|
+
*/
|
|
26
|
+
export function detectProtocol() {
|
|
27
|
+
const env = process.env;
|
|
28
|
+
// Kitty terminal
|
|
29
|
+
if (env.KITTY_WINDOW_ID) {
|
|
30
|
+
return 'kitty';
|
|
31
|
+
}
|
|
32
|
+
// iTerm2 (also used by WezTerm)
|
|
33
|
+
if (env.ITERM_SESSION_ID || env.TERM_PROGRAM === 'iTerm.app') {
|
|
34
|
+
return 'iterm';
|
|
35
|
+
}
|
|
36
|
+
// WezTerm (uses iTerm protocol)
|
|
37
|
+
if (env.TERM_PROGRAM === 'WezTerm') {
|
|
38
|
+
return 'iterm';
|
|
39
|
+
}
|
|
40
|
+
// Check for sixel support via TERM
|
|
41
|
+
if (env.TERM && (env.TERM.includes('sixel') ||
|
|
42
|
+
env.TERM === 'xterm' ||
|
|
43
|
+
env.TERM === 'xterm-256color')) {
|
|
44
|
+
// Note: Sixel detection is imperfect; many terminals don't advertise it
|
|
45
|
+
return 'sixel';
|
|
46
|
+
}
|
|
47
|
+
// Fall back to block characters
|
|
48
|
+
return 'block';
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Check if a protocol is available.
|
|
52
|
+
*/
|
|
53
|
+
export function isProtocolAvailable(protocol) {
|
|
54
|
+
const detected = detectProtocol();
|
|
55
|
+
if (protocol === 'block')
|
|
56
|
+
return true;
|
|
57
|
+
if (protocol === 'none')
|
|
58
|
+
return true;
|
|
59
|
+
if (protocol === detected)
|
|
60
|
+
return true;
|
|
61
|
+
// Kitty protocol requires Kitty terminal
|
|
62
|
+
if (protocol === 'kitty')
|
|
63
|
+
return detected === 'kitty';
|
|
64
|
+
// iTerm protocol works in iTerm2 and WezTerm
|
|
65
|
+
if (protocol === 'iterm')
|
|
66
|
+
return detected === 'iterm';
|
|
67
|
+
// Sixel is harder to detect reliably
|
|
68
|
+
if (protocol === 'sixel')
|
|
69
|
+
return detected === 'sixel';
|
|
70
|
+
return false;
|
|
71
|
+
}
|
|
72
|
+
// =============================================================================
|
|
73
|
+
// IMAGE RENDERER
|
|
74
|
+
// =============================================================================
|
|
75
|
+
/**
|
|
76
|
+
* Image renderer class.
|
|
77
|
+
*/
|
|
78
|
+
export class ImageRenderer {
|
|
79
|
+
config;
|
|
80
|
+
protocol;
|
|
81
|
+
constructor(config = {}) {
|
|
82
|
+
this.config = {
|
|
83
|
+
protocol: config.protocol ?? 'auto',
|
|
84
|
+
maxWidth: config.maxWidth ?? 80,
|
|
85
|
+
maxHeight: config.maxHeight ?? 24,
|
|
86
|
+
preserveAspectRatio: config.preserveAspectRatio ?? true,
|
|
87
|
+
};
|
|
88
|
+
this.protocol = this.config.protocol === 'auto'
|
|
89
|
+
? detectProtocol()
|
|
90
|
+
: this.config.protocol;
|
|
91
|
+
}
|
|
92
|
+
/**
|
|
93
|
+
* Get the current protocol.
|
|
94
|
+
*/
|
|
95
|
+
getProtocol() {
|
|
96
|
+
return this.protocol;
|
|
97
|
+
}
|
|
98
|
+
/**
|
|
99
|
+
* Check if image rendering is supported.
|
|
100
|
+
*/
|
|
101
|
+
isSupported() {
|
|
102
|
+
return this.protocol !== 'none';
|
|
103
|
+
}
|
|
104
|
+
/**
|
|
105
|
+
* Check if a file is a supported image format.
|
|
106
|
+
*/
|
|
107
|
+
isSupportedFormat(filePath) {
|
|
108
|
+
const ext = extname(filePath).toLowerCase();
|
|
109
|
+
return SUPPORTED_FORMATS.has(ext);
|
|
110
|
+
}
|
|
111
|
+
/**
|
|
112
|
+
* Render an image from a file path.
|
|
113
|
+
*/
|
|
114
|
+
async renderFile(filePath) {
|
|
115
|
+
if (!existsSync(filePath)) {
|
|
116
|
+
return {
|
|
117
|
+
output: '',
|
|
118
|
+
protocol: this.protocol,
|
|
119
|
+
success: false,
|
|
120
|
+
error: `File not found: ${filePath}`,
|
|
121
|
+
};
|
|
122
|
+
}
|
|
123
|
+
if (!this.isSupportedFormat(filePath)) {
|
|
124
|
+
return {
|
|
125
|
+
output: '',
|
|
126
|
+
protocol: this.protocol,
|
|
127
|
+
success: false,
|
|
128
|
+
error: `Unsupported image format: ${extname(filePath)}`,
|
|
129
|
+
};
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
const data = await readFile(filePath);
|
|
133
|
+
return this.renderBuffer(data, filePath);
|
|
134
|
+
}
|
|
135
|
+
catch (err) {
|
|
136
|
+
return {
|
|
137
|
+
output: '',
|
|
138
|
+
protocol: this.protocol,
|
|
139
|
+
success: false,
|
|
140
|
+
error: `Failed to read file: ${err.message}`,
|
|
141
|
+
};
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
/**
|
|
145
|
+
* Render an image from a buffer.
|
|
146
|
+
*/
|
|
147
|
+
async renderBuffer(data, filename) {
|
|
148
|
+
switch (this.protocol) {
|
|
149
|
+
case 'kitty':
|
|
150
|
+
return this.renderKitty(data);
|
|
151
|
+
case 'iterm':
|
|
152
|
+
return this.renderITerm(data, filename);
|
|
153
|
+
case 'sixel':
|
|
154
|
+
return this.renderSixel(data);
|
|
155
|
+
case 'block':
|
|
156
|
+
return this.renderBlock(data);
|
|
157
|
+
case 'none':
|
|
158
|
+
return {
|
|
159
|
+
output: '[Image display not supported in this terminal]',
|
|
160
|
+
protocol: 'none',
|
|
161
|
+
success: false,
|
|
162
|
+
error: 'No image protocol available',
|
|
163
|
+
};
|
|
164
|
+
}
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Render using Kitty graphics protocol.
|
|
168
|
+
* @see https://sw.kovidgoyal.net/kitty/graphics-protocol/
|
|
169
|
+
*/
|
|
170
|
+
renderKitty(data) {
|
|
171
|
+
const base64 = data.toString('base64');
|
|
172
|
+
const chunks = [];
|
|
173
|
+
// Split into 4096-byte chunks for transmission
|
|
174
|
+
const chunkSize = 4096;
|
|
175
|
+
for (let i = 0; i < base64.length; i += chunkSize) {
|
|
176
|
+
const chunk = base64.slice(i, i + chunkSize);
|
|
177
|
+
const isLast = i + chunkSize >= base64.length;
|
|
178
|
+
// Kitty graphics protocol escape sequence
|
|
179
|
+
// a=T (transmit), f=100 (PNG), m=0/1 (more chunks coming)
|
|
180
|
+
const params = i === 0
|
|
181
|
+
? `a=T,f=100,m=${isLast ? 0 : 1}`
|
|
182
|
+
: `m=${isLast ? 0 : 1}`;
|
|
183
|
+
chunks.push(`\x1b_G${params};${chunk}\x1b\\`);
|
|
184
|
+
}
|
|
185
|
+
return {
|
|
186
|
+
output: chunks.join(''),
|
|
187
|
+
protocol: 'kitty',
|
|
188
|
+
success: true,
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
/**
|
|
192
|
+
* Render using iTerm2 inline images protocol.
|
|
193
|
+
* @see https://iterm2.com/documentation-images.html
|
|
194
|
+
*/
|
|
195
|
+
renderITerm(data, filename) {
|
|
196
|
+
const base64 = data.toString('base64');
|
|
197
|
+
// iTerm2 inline image format
|
|
198
|
+
// name=<base64 filename>, size=<bytes>, width=auto, height=auto, inline=1
|
|
199
|
+
const name = filename ? Buffer.from(filename).toString('base64') : '';
|
|
200
|
+
const params = [
|
|
201
|
+
`name=${name}`,
|
|
202
|
+
`size=${data.length}`,
|
|
203
|
+
`width=${this.config.maxWidth}`,
|
|
204
|
+
`height=${this.config.maxHeight}`,
|
|
205
|
+
`preserveAspectRatio=${this.config.preserveAspectRatio ? 1 : 0}`,
|
|
206
|
+
'inline=1',
|
|
207
|
+
].join(';');
|
|
208
|
+
const output = `\x1b]1337;File=${params}:${base64}\x07`;
|
|
209
|
+
return {
|
|
210
|
+
output,
|
|
211
|
+
protocol: 'iterm',
|
|
212
|
+
success: true,
|
|
213
|
+
};
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Render using Sixel graphics (limited support).
|
|
217
|
+
* This is a stub - full sixel encoding is complex.
|
|
218
|
+
*/
|
|
219
|
+
renderSixel(_data) {
|
|
220
|
+
// Sixel encoding is complex and requires image processing
|
|
221
|
+
// Fall back to block rendering for now
|
|
222
|
+
return {
|
|
223
|
+
output: '[Sixel rendering not implemented - install terminal-image for fallback]',
|
|
224
|
+
protocol: 'sixel',
|
|
225
|
+
success: false,
|
|
226
|
+
error: 'Sixel encoding not implemented',
|
|
227
|
+
};
|
|
228
|
+
}
|
|
229
|
+
/**
|
|
230
|
+
* Render using block characters (fallback).
|
|
231
|
+
* Uses terminal-image if available.
|
|
232
|
+
*/
|
|
233
|
+
async renderBlock(data) {
|
|
234
|
+
try {
|
|
235
|
+
// Dynamic import to avoid bundling issues
|
|
236
|
+
const terminalImage = await import('terminal-image');
|
|
237
|
+
const output = await terminalImage.default.buffer(data, {
|
|
238
|
+
width: this.config.maxWidth,
|
|
239
|
+
height: this.config.maxHeight,
|
|
240
|
+
preserveAspectRatio: this.config.preserveAspectRatio,
|
|
241
|
+
});
|
|
242
|
+
return {
|
|
243
|
+
output,
|
|
244
|
+
protocol: 'block',
|
|
245
|
+
success: true,
|
|
246
|
+
};
|
|
247
|
+
}
|
|
248
|
+
catch (err) {
|
|
249
|
+
return {
|
|
250
|
+
output: '[Image: terminal-image package not available]',
|
|
251
|
+
protocol: 'block',
|
|
252
|
+
success: false,
|
|
253
|
+
error: `Block rendering failed: ${err.message}`,
|
|
254
|
+
};
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
/**
|
|
258
|
+
* Render an image with a caption.
|
|
259
|
+
*/
|
|
260
|
+
async renderWithCaption(filePath, caption) {
|
|
261
|
+
const result = await this.renderFile(filePath);
|
|
262
|
+
const lines = [];
|
|
263
|
+
if (result.success) {
|
|
264
|
+
lines.push(result.output);
|
|
265
|
+
}
|
|
266
|
+
else {
|
|
267
|
+
lines.push(`[Image: ${result.error}]`);
|
|
268
|
+
}
|
|
269
|
+
if (caption) {
|
|
270
|
+
lines.push(` ${caption}`);
|
|
271
|
+
}
|
|
272
|
+
return lines.join('\n');
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
// =============================================================================
|
|
276
|
+
// FACTORY
|
|
277
|
+
// =============================================================================
|
|
278
|
+
/**
|
|
279
|
+
* Create an image renderer with auto-detected protocol.
|
|
280
|
+
*/
|
|
281
|
+
export function createImageRenderer(config) {
|
|
282
|
+
return new ImageRenderer(config);
|
|
283
|
+
}
|
|
284
|
+
// =============================================================================
|
|
285
|
+
// UTILITIES
|
|
286
|
+
// =============================================================================
|
|
287
|
+
/**
|
|
288
|
+
* Get protocol info for display.
|
|
289
|
+
*/
|
|
290
|
+
export function getProtocolInfo() {
|
|
291
|
+
const detected = detectProtocol();
|
|
292
|
+
const terminal = process.env.TERM_PROGRAM || process.env.TERM;
|
|
293
|
+
return {
|
|
294
|
+
detected,
|
|
295
|
+
terminal,
|
|
296
|
+
supported: detected !== 'none',
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
/**
|
|
300
|
+
* Check if a file can be rendered as an image.
|
|
301
|
+
*/
|
|
302
|
+
export function canRenderImage(filePath) {
|
|
303
|
+
const ext = extname(filePath).toLowerCase();
|
|
304
|
+
return SUPPORTED_FORMATS.has(ext);
|
|
305
|
+
}
|
|
306
|
+
//# sourceMappingURL=image-renderer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"image-renderer.js","sourceRoot":"","sources":["../../../src/integrations/image-renderer.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AACrC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuCpC;;GAEG;AACH,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC;AAEtF,gFAAgF;AAChF,qBAAqB;AACrB,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC;IAExB,iBAAiB;IACjB,IAAI,GAAG,CAAC,eAAe,EAAE,CAAC;QACxB,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,gCAAgC;IAChC,IAAI,GAAG,CAAC,gBAAgB,IAAI,GAAG,CAAC,YAAY,KAAK,WAAW,EAAE,CAAC;QAC7D,OAAO,OAAO,CAAC;IACjB,CAAC;IAED,gCAA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AAE,CAAC;YACnB,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAC5B,CAAC;aAAM,CAAC;YACN,KAAK,CAAC,IAAI,CAAC,WAAW,MAAM,CAAC,KAAK,GAAG,CAAC,CAAC;QACzC,CAAC;QAED,IAAI,OAAO,EAAE,CAAC;YACZ,KAAK,CAAC,IAAI,CAAC,KAAK,OAAO,EAAE,CAAC,CAAC;QAC7B,CAAC;QAED,OAAO,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;IAC1B,CAAC;CACF;AAED,gFAAgF;AAChF,UAAU;AACV,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,mBAAmB,CAAC,MAA4B;IAC9D,OAAO,IAAI,aAAa,CAAC,MAAM,CAAC,CAAC;AACnC,CAAC;AAED,gFAAgF;AAChF,YAAY;AACZ,gFAAgF;AAEhF;;GAEG;AACH,MAAM,UAAU,eAAe;IAK7B,MAAM,QAAQ,GAAG,cAAc,EAAE,CAAC;IAClC,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;IAE9D,OAAO;QACL,QAAQ;QACR,QAAQ;QACR,SAAS,EAAE,QAAQ,KAAK,MAAM;KAC/B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,QAAgB;IAC7C,MAAM,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC,WAAW,EAAE,CAAC;IAC5C,OAAO,iBAAiB,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lesson 25: Integration Module Exports
|
|
3
|
+
*
|
|
4
|
+
* Clean re-exports of all integration modules.
|
|
5
|
+
*/
|
|
6
|
+
export { HookManager, createHookManager } from './hooks.js';
|
|
7
|
+
export { MemoryManager, createMemoryManager } from './memory.js';
|
|
8
|
+
export { PlanningManager, createPlanningManager, type ReflectionResult } from './planning.js';
|
|
9
|
+
export { Tracer, MetricsCollector, Logger, ObservabilityManager, createObservabilityManager, } from './observability.js';
|
|
10
|
+
export { SandboxManager, HumanInLoopManager, SafetyManager, createSafetyManager, } from './safety.js';
|
|
11
|
+
export { RoutingManager, createRoutingManager } from './routing.js';
|
|
12
|
+
export { RulesManager, createRulesManager, parseRulesFromMarkdown, DEFAULT_RULE_SOURCES, type RuleSource, type RulesConfig, type LoadedRule, type RulesEvent, type RulesEventListener, } from './rules.js';
|
|
13
|
+
export { ExecutionEconomicsManager, createEconomicsManager, QUICK_BUDGET, STANDARD_BUDGET, LARGE_BUDGET, UNLIMITED_BUDGET, type ExecutionBudget, type ExecutionUsage, type BudgetCheckResult, type ExtensionRequest, type EconomicsEvent, type EconomicsEventListener, } from './economics.js';
|
|
14
|
+
export { AgentRegistry, createAgentRegistry, filterToolsForAgent, formatAgentList, type AgentDefinition, type LoadedAgent, type SpawnOptions, type SpawnResult, type RegistryEvent, type RegistryEventListener, } from './agent-registry.js';
|
|
15
|
+
export { MultiAgentManager, createMultiAgentManager, CODER_ROLE, REVIEWER_ROLE, ARCHITECT_ROLE, RESEARCHER_ROLE, type AgentRole, type TeamConfig, type TeamTask, type TeamResult, type ConsensusStrategy, type MultiAgentEvent, type MultiAgentEventListener, } from './multi-agent.js';
|
|
16
|
+
export { ReActManager, createReActManager, extractThoughts, extractActions, hasCoherentReasoning, type ReActConfig, type ReActStep, type ReActAction, type ReActTrace, type ReActEvent, type ReActEventListener, } from './react.js';
|
|
17
|
+
export { ExecutionPolicyManager, createExecutionPolicyManager, STRICT_POLICY, BALANCED_POLICY, PERMISSIVE_POLICY, type PolicyLevel, type IntentType, type ExecutionPolicyConfig, type PolicyEvaluation, type PermissionGrant, type IntentClassification, type PolicyEvent, type PolicyEventListener, } from './execution-policy.js';
|
|
18
|
+
export { ThreadManager, createThreadManager, createWithHistory, exportThread, getThreadLineage, type Thread, type Checkpoint, type CheckpointState, type MergeStrategy, type ThreadEvent, type ThreadEventListener, } from './thread-manager.js';
|
|
19
|
+
export { SessionStore, createSessionStore, formatSessionList, type SessionMetadata, type SessionEntry, type SessionStoreConfig, type SessionEvent, type SessionEventListener, } from './session-store.js';
|
|
20
|
+
export { SQLiteStore, createSQLiteStore, type SQLiteStoreConfig, type Goal, type GoalStatus, type Juncture, type JunctureType, type WorkerResult, type WorkerResultStatus, type WorkerResultRef, type SessionManifest, } from './sqlite-store.js';
|
|
21
|
+
export { MIGRATIONS, applyMigrations as applySchemaMigrations, getMigrationStatus as getSchemaMigrationStatus, needsMigration as schemaNeedsMigration, detectFeatures, type Migration, type MigrationResult, type SchemaFeatures, } from '../persistence/schema.js';
|
|
22
|
+
export { StreamHandler, createStreamHandler, formatChunkForTerminal, adaptOpenRouterStream, adaptAnthropicStream, type StreamChunk, type StreamCallback, type StreamConfig, type StreamEvent, type StreamEventListener, } from './streaming.js';
|
|
23
|
+
export { Compactor, createCompactor, formatCompactionResult, getContextUsage, getContextBreakdown, formatContextBreakdown, type CompactionConfig, type CompactionResult, type CompactionEvent, type CompactionEventListener, type ContextBreakdown, type ToolDefinition, } from './compaction.js';
|
|
24
|
+
export { MCPClient, createMCPClient, formatServerList, getSampleMCPConfig, type MCPServerConfig, type MCPConfigFile, type MCPClientConfig, type MCPServerInfo, type MCPEvent, type MCPEventListener, type MCPToolSummary, type MCPContextStats, } from './mcp-client.js';
|
|
25
|
+
export { createMCPToolSearchTool, createMCPToolListTool, createMCPContextStatsTool, createMCPMetaTools, formatToolSummaries, formatContextStats, type MCPToolSearchResult, type MCPToolSearchOptions, } from './mcp-tool-search.js';
|
|
26
|
+
export { CancellationManager, createCancellationManager, createCancellationTokenSource, createTimeoutToken, createLinkedToken, withCancellation, sleep, race, toAbortSignal, isCancellationError, CancellationError, CancellationToken, type CancellationToken as CancellationTokenType, type CancellationTokenSource, type CancellableOptions, type CancellationEvent, type CancellationEventListener, } from './cancellation.js';
|
|
27
|
+
export { ResourceManager, createResourceManager, createStrictResourceManager, createLenientResourceManager, combinedShouldContinue, isResourceLimitError, ResourceLimitError, type ResourceLimitsConfig, type ResourceUsage, type ResourceStatus, type ResourceCheck, type ResourceEvent, type ResourceEventListener, } from './resources.js';
|
|
28
|
+
export { HierarchicalConfigManager, createHierarchicalConfig, createAndLoadConfig, getSampleGlobalConfig, getSampleWorkspaceConfig, ensureConfigDirectories, type ConfigLevel, type LevelConfig, type ResolvedConfig, type ConfigEvent, type ConfigEventListener, type HierarchicalConfigOptions, } from './hierarchical-config.js';
|
|
29
|
+
export { LSPManager, createLSPManager, createAndStartLSPManager, type LSPConfig, type LanguageServerConfig, type LSPPosition, type LSPRange, type LSPLocation, type LSPDiagnostic, type LSPCompletion, type DiagnosticSeverity, type CompletionKind, type LSPEvent, type LSPEventListener, } from './lsp.js';
|
|
30
|
+
export { SemanticCacheManager, createSemanticCacheManager, createStrictCache, createLenientCache, withSemanticCache, cosineSimilarity, type SemanticCacheConfig, type CacheEntry, type CacheHit, type CacheStats, type EmbeddingFunction, type CacheEvent, type CacheEventListener, } from './semantic-cache.js';
|
|
31
|
+
export { SandboxManager as OSSandboxManager, createSandboxManager as createOSSandboxManager, createSandbox, sandboxExec, SeatbeltSandbox, DockerSandbox, BasicSandbox, type Sandbox, type ExecResult, type SandboxOptions, type SandboxMode, type SandboxManagerConfig as OSSandboxManagerConfig, type SandboxEvent as OSSandboxEvent, type SandboxEventListener as OSSandboxEventListener, } from './sandbox/index.js';
|
|
32
|
+
export { SkillManager, createSkillManager, formatSkillList, getSampleSkillContent, getDefaultSkillDirectories, type Skill, type SkillTrigger, type SkillsConfig, type SkillEvent, type SkillEventListener, } from './skills.js';
|
|
33
|
+
export { IgnoreManager, createIgnoreManager, quickShouldIgnore, getSampleAgentignore, getBuiltinIgnorePatterns, type IgnorePattern, type IgnoreConfig, type IgnoreEvent, type IgnoreEventListener, } from './ignore.js';
|
|
34
|
+
export { PTYShellManager, createPTYShell, createAndStartPTYShell, createPTYShellTool, formatShellState, type PTYShellConfig, type CommandResult, type ShellState, type PTYEvent, type PTYEventListener, } from './pty-shell.js';
|
|
35
|
+
export { ContextEngineeringManager, createContextEngineering, createMinimalContextEngineering, createFullContextEngineering, stableStringify, calculateOptimalFrequency, createReconstructionPrompt, extractInsights, type ContextEngineeringConfig, type ContextMessage, type ContextEngineeringStats, type ContextEngineeringEvent, type ContextEngineeringEventListener, } from './context-engineering.js';
|
|
36
|
+
export { CodebaseContextManager, createCodebaseContext, buildContextFromChunks, summarizeRepoStructure, type CodeChunk, type MinimalCodeChunk, type CodeChunkType, type RepoMap, type CodebaseContextConfig, type SelectionOptions, type SelectionStrategy, type SelectionResult, type CodebaseContextEvent, type CodebaseContextEventListener, } from './codebase-context.js';
|
|
37
|
+
export { SharedBlackboard, createSharedBlackboard, createFindingFromOutput, extractFindings, type Finding, type FindingType, type ResourceClaim, type ClaimType, type Subscription, type FindingFilter, type BlackboardConfig, type BlackboardEvent, type BlackboardEventListener, type BlackboardStats, } from './shared-blackboard.js';
|
|
38
|
+
export { SmartDecomposer, createSmartDecomposer, createDecompositionPrompt, parseDecompositionResponse, type SmartSubtask, type SubtaskStatus, type SubtaskType, type DependencyGraph, type ResourceConflict, type SmartDecompositionResult, type DecompositionStrategy, type SmartDecomposerConfig, type LLMDecomposeFunction, type DecomposeContext, type LLMDecomposeResult, type SmartDecomposerEvent, type SmartDecomposerEventListener, } from './smart-decomposer.js';
|
|
39
|
+
export { ResultSynthesizer, createResultSynthesizer, createSynthesisPrompt, type AgentOutput, type OutputType, type FileChange, type Hunk, type ResultConflict, type ConflictType, type ConflictResolution, type ResolutionStrategy, type SynthesisResult, type SynthesisStats, type SynthesisMethod, type ResultSynthesizerConfig, type LLMSynthesizeFunction, type LLMSynthesisResult, type ResultSynthesizerEvent, type ResultSynthesizerEventListener, } from './result-synthesizer.js';
|
|
40
|
+
export { PendingPlanManager, createPendingPlanManager, formatPlanStatus, type PendingPlan, type ProposedChange, type PlanStatus, type PlanApprovalResult, type PendingPlanEvent, type PendingPlanEventListener, } from './pending-plan.js';
|
|
41
|
+
export { PersistenceDebugger, persistenceDebug, saveCheckpointToStore, loadSessionState, type AnySessionStore, type CheckpointData, } from './persistence.js';
|
|
42
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAGH,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,KAAK,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAC9F,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAmB,GACpB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAGpE,OAAO,EACL,YAAY,EACZ,kBAAkB,EAClB,sBAAsB,EACtB,oBAAoB,EACpB,KAAK,UAAU,EACf,KAAK,WAAW,EAChB,KAAK,UAAU,EACf,KAAK,UAAU,EACf,KAAK,kBAAkB,GACxB,MAAM,YAAY,CAAC;AAGpB,OAAO,EACL,yBAAyB,EACzB,sBAAsB,EACtB,YAAY,EACZ,eAAe,EACf,YAAY,EACZ,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,EACnB,KAAK,iBAAiB,EACtB,KAAK,gBAAgB,EACrB,KAAK,cAAc,EACnB,KAAK,sBAAsB,GAC5B,MAAM,gBAAgB,CAAC;AAGxB,OAAO,EACL,aAAa,EACb,mBAAmB,EACnB,mBAAmB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ACnB,KAAK,eAAe,EACpB,KAAK,uBAAuB,EAC5B,KAAK,qBAAqB,EAC1B,KAAK,kBAAkB,EACvB,KAAK,sBAAsB,EAC3B,KAAK,8BAA8B,GACpC,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EACL,kBAAkB,EAClB,wBAAwB,EACxB,gBAAgB,EAChB,KAAK,WAAW,EAChB,KAAK,cAAc,EACnB,KAAK,UAAU,EACf,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACrB,KAAK,wBAAwB,GAC9B,MAAM,mBAAmB,CAAC;AAG3B,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,EAChB,KAAK,eAAe,EACpB,KAAK,cAAc,GACpB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lesson 25: Integration Module Exports
|
|
3
|
+
*
|
|
4
|
+
* Clean re-exports of all integration modules.
|
|
5
|
+
*/
|
|
6
|
+
// Core integrations (Lessons 10-22)
|
|
7
|
+
export { HookManager, createHookManager } from './hooks.js';
|
|
8
|
+
export { MemoryManager, createMemoryManager } from './memory.js';
|
|
9
|
+
export { PlanningManager, createPlanningManager } from './planning.js';
|
|
10
|
+
export { Tracer, MetricsCollector, Logger, ObservabilityManager, createObservabilityManager, } from './observability.js';
|
|
11
|
+
export { SandboxManager, HumanInLoopManager, SafetyManager, createSafetyManager, } from './safety.js';
|
|
12
|
+
export { RoutingManager, createRoutingManager } from './routing.js';
|
|
13
|
+
// Rules system (from Lesson 12)
|
|
14
|
+
export { RulesManager, createRulesManager, parseRulesFromMarkdown, DEFAULT_RULE_SOURCES, } from './rules.js';
|
|
15
|
+
// Economics system (token budgets, progress detection)
|
|
16
|
+
export { ExecutionEconomicsManager, createEconomicsManager, QUICK_BUDGET, STANDARD_BUDGET, LARGE_BUDGET, UNLIMITED_BUDGET, } from './economics.js';
|
|
17
|
+
// Extensible agent registry
|
|
18
|
+
export { AgentRegistry, createAgentRegistry, filterToolsForAgent, formatAgentList, } from './agent-registry.js';
|
|
19
|
+
// Multi-agent coordination (from Lesson 17)
|
|
20
|
+
export { MultiAgentManager, createMultiAgentManager, CODER_ROLE, REVIEWER_ROLE, ARCHITECT_ROLE, RESEARCHER_ROLE, } from './multi-agent.js';
|
|
21
|
+
// ReAct pattern (from Lesson 18)
|
|
22
|
+
export { ReActManager, createReActManager, extractThoughts, extractActions, hasCoherentReasoning, } from './react.js';
|
|
23
|
+
// Execution policies (from Lesson 23)
|
|
24
|
+
export { ExecutionPolicyManager, createExecutionPolicyManager, STRICT_POLICY, BALANCED_POLICY, PERMISSIVE_POLICY, } from './execution-policy.js';
|
|
25
|
+
// Thread management (from Lesson 24)
|
|
26
|
+
export { ThreadManager, createThreadManager, createWithHistory, exportThread, getThreadLineage, } from './thread-manager.js';
|
|
27
|
+
// Session persistence
|
|
28
|
+
export { SessionStore, createSessionStore, formatSessionList, } from './session-store.js';
|
|
29
|
+
// SQLite session persistence (preferred for production)
|
|
30
|
+
export { SQLiteStore, createSQLiteStore, } from './sqlite-store.js';
|
|
31
|
+
// Schema management (embedded migrations)
|
|
32
|
+
export { MIGRATIONS, applyMigrations as applySchemaMigrations, getMigrationStatus as getSchemaMigrationStatus, needsMigration as schemaNeedsMigration, detectFeatures, } from '../persistence/schema.js';
|
|
33
|
+
// Streaming responses
|
|
34
|
+
export { StreamHandler, createStreamHandler, formatChunkForTerminal, adaptOpenRouterStream, adaptAnthropicStream, } from './streaming.js';
|
|
35
|
+
// Context compaction
|
|
36
|
+
export { Compactor, createCompactor, formatCompactionResult, getContextUsage, getContextBreakdown, formatContextBreakdown, } from './compaction.js';
|
|
37
|
+
// MCP client
|
|
38
|
+
export { MCPClient, createMCPClient, formatServerList, getSampleMCPConfig, } from './mcp-client.js';
|
|
39
|
+
// MCP tool search (dynamic tool discovery)
|
|
40
|
+
export { createMCPToolSearchTool, createMCPToolListTool, createMCPContextStatsTool, createMCPMetaTools, formatToolSummaries, formatContextStats, } from './mcp-tool-search.js';
|
|
41
|
+
// Cancellation tokens
|
|
42
|
+
export { CancellationManager, createCancellationManager, createCancellationTokenSource, createTimeoutToken, createLinkedToken, withCancellation, sleep, race, toAbortSignal, isCancellationError, CancellationError, CancellationToken, } from './cancellation.js';
|
|
43
|
+
// Resource monitoring
|
|
44
|
+
export { ResourceManager, createResourceManager, createStrictResourceManager, createLenientResourceManager, combinedShouldContinue, isResourceLimitError, ResourceLimitError, } from './resources.js';
|
|
45
|
+
// Hierarchical configuration
|
|
46
|
+
export { HierarchicalConfigManager, createHierarchicalConfig, createAndLoadConfig, getSampleGlobalConfig, getSampleWorkspaceConfig, ensureConfigDirectories, } from './hierarchical-config.js';
|
|
47
|
+
// LSP (Language Server Protocol)
|
|
48
|
+
export { LSPManager, createLSPManager, createAndStartLSPManager, } from './lsp.js';
|
|
49
|
+
// Semantic Cache
|
|
50
|
+
export { SemanticCacheManager, createSemanticCacheManager, createStrictCache, createLenientCache, withSemanticCache, cosineSimilarity, } from './semantic-cache.js';
|
|
51
|
+
// OS-Specific Sandbox (renamed to avoid conflict with SandboxManager from safety.js)
|
|
52
|
+
export { SandboxManager as OSSandboxManager, createSandboxManager as createOSSandboxManager, createSandbox, sandboxExec, SeatbeltSandbox, DockerSandbox, BasicSandbox, } from './sandbox/index.js';
|
|
53
|
+
// Skills Standard
|
|
54
|
+
export { SkillManager, createSkillManager, formatSkillList, getSampleSkillContent, getDefaultSkillDirectories, } from './skills.js';
|
|
55
|
+
// Ignore File Support
|
|
56
|
+
export { IgnoreManager, createIgnoreManager, quickShouldIgnore, getSampleAgentignore, getBuiltinIgnorePatterns, } from './ignore.js';
|
|
57
|
+
// Persistent PTY Shell
|
|
58
|
+
export { PTYShellManager, createPTYShell, createAndStartPTYShell, createPTYShellTool, formatShellState, } from './pty-shell.js';
|
|
59
|
+
// Context Engineering (Manus-inspired tricks P, Q, R, S, T)
|
|
60
|
+
export { ContextEngineeringManager, createContextEngineering, createMinimalContextEngineering, createFullContextEngineering, stableStringify, calculateOptimalFrequency, createReconstructionPrompt, extractInsights, } from './context-engineering.js';
|
|
61
|
+
// Codebase Context (intelligent code selection)
|
|
62
|
+
export { CodebaseContextManager, createCodebaseContext, buildContextFromChunks, summarizeRepoStructure, } from './codebase-context.js';
|
|
63
|
+
// Shared Blackboard (subagent coordination)
|
|
64
|
+
export { SharedBlackboard, createSharedBlackboard, createFindingFromOutput, extractFindings, } from './shared-blackboard.js';
|
|
65
|
+
// Smart Decomposer (semantic task decomposition)
|
|
66
|
+
export { SmartDecomposer, createSmartDecomposer, createDecompositionPrompt, parseDecompositionResponse, } from './smart-decomposer.js';
|
|
67
|
+
// Result Synthesizer (structured result merging)
|
|
68
|
+
export { ResultSynthesizer, createResultSynthesizer, createSynthesisPrompt, } from './result-synthesizer.js';
|
|
69
|
+
// Pending Plan (plan mode write interception)
|
|
70
|
+
export { PendingPlanManager, createPendingPlanManager, formatPlanStatus, } from './pending-plan.js';
|
|
71
|
+
// Persistence utilities (debug logging, checkpoint management)
|
|
72
|
+
export { PersistenceDebugger, persistenceDebug, saveCheckpointToStore, loadSessionState, } from './persistence.js';
|
|
73
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/integrations/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,oCAAoC;AACpC,OAAO,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAyB,MAAM,eAAe,CAAC;AAC9F,OAAO,EACL,MAAM,EACN,gBAAgB,EAChB,MAAM,EACN,oBAAoB,EACpB,0BAA0B,GAC3B,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EACL,cAAc,EACd,kBAAkB,EAClB,aAAa,EACb,mBAAm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CAAC;AAE3B,+DAA+D;AAC/D,OAAO,EACL,mBAAmB,EACnB,gBAAgB,EAChB,qBAAqB,EACrB,gBAAgB,GAGjB,MAAM,kBAAkB,CAAC"}
|
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LSP Integration
|
|
3
|
+
*
|
|
4
|
+
* Language Server Protocol client manager for code intelligence.
|
|
5
|
+
* Provides definitions, completions, hover info, and references.
|
|
6
|
+
* Wraps and extends the SimpleLSPClient from tricks/lsp-client.ts.
|
|
7
|
+
*
|
|
8
|
+
* Usage:
|
|
9
|
+
* const lsp = createLSPManager({ autoDetect: true });
|
|
10
|
+
* await lsp.autoStart('/path/to/project');
|
|
11
|
+
* const def = await lsp.getDefinition('file.ts', 10, 5);
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Position in a document (0-indexed).
|
|
15
|
+
*/
|
|
16
|
+
export interface LSPPosition {
|
|
17
|
+
line: number;
|
|
18
|
+
character: number;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Range in a document.
|
|
22
|
+
*/
|
|
23
|
+
export interface LSPRange {
|
|
24
|
+
start: LSPPosition;
|
|
25
|
+
end: LSPPosition;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Location in a document.
|
|
29
|
+
*/
|
|
30
|
+
export interface LSPLocation {
|
|
31
|
+
uri: string;
|
|
32
|
+
range: LSPRange;
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Diagnostic severity.
|
|
36
|
+
*/
|
|
37
|
+
export type DiagnosticSeverity = 'error' | 'warning' | 'information' | 'hint';
|
|
38
|
+
/**
|
|
39
|
+
* Diagnostic message.
|
|
40
|
+
*/
|
|
41
|
+
export interface LSPDiagnostic {
|
|
42
|
+
range: LSPRange;
|
|
43
|
+
message: string;
|
|
44
|
+
severity: DiagnosticSeverity;
|
|
45
|
+
source?: string;
|
|
46
|
+
code?: string | number;
|
|
47
|
+
}
|
|
48
|
+
/**
|
|
49
|
+
* Completion item kind.
|
|
50
|
+
*/
|
|
51
|
+
export type CompletionKind = 'text' | 'method' | 'function' | 'constructor' | 'field' | 'variable' | 'class' | 'interface' | 'module' | 'property' | 'keyword' | 'snippet';
|
|
52
|
+
/**
|
|
53
|
+
* Completion item.
|
|
54
|
+
*/
|
|
55
|
+
export interface LSPCompletion {
|
|
56
|
+
label: string;
|
|
57
|
+
kind: CompletionKind;
|
|
58
|
+
detail?: string;
|
|
59
|
+
documentation?: string;
|
|
60
|
+
insertText?: string;
|
|
61
|
+
}
|
|
62
|
+
/**
|
|
63
|
+
* Language server configuration.
|
|
64
|
+
*/
|
|
65
|
+
export interface LanguageServerConfig {
|
|
66
|
+
/** Command to start the server */
|
|
67
|
+
command: string;
|
|
68
|
+
/** Arguments for the server */
|
|
69
|
+
args?: string[];
|
|
70
|
+
/** File extensions this server handles */
|
|
71
|
+
extensions: string[];
|
|
72
|
+
/** Language ID for the server */
|
|
73
|
+
languageId: string;
|
|
74
|
+
}
|
|
75
|
+
/**
|
|
76
|
+
* LSP manager configuration.
|
|
77
|
+
*/
|
|
78
|
+
export interface LSPConfig {
|
|
79
|
+
/** Enable/disable LSP support */
|
|
80
|
+
enabled?: boolean;
|
|
81
|
+
/** Custom server configurations */
|
|
82
|
+
servers?: Record<string, LanguageServerConfig>;
|
|
83
|
+
/** Auto-detect and start servers based on file types */
|
|
84
|
+
autoDetect?: boolean;
|
|
85
|
+
/** Request timeout in ms */
|
|
86
|
+
timeout?: number;
|
|
87
|
+
/** Root URI of the workspace */
|
|
88
|
+
rootUri?: string;
|
|
89
|
+
}
|
|
90
|
+
/**
|
|
91
|
+
* LSP event types.
|
|
92
|
+
*/
|
|
93
|
+
export type LSPEvent = {
|
|
94
|
+
type: 'lsp.started';
|
|
95
|
+
languageId: string;
|
|
96
|
+
command: string;
|
|
97
|
+
} | {
|
|
98
|
+
type: 'lsp.stopped';
|
|
99
|
+
languageId: string;
|
|
100
|
+
} | {
|
|
101
|
+
type: 'lsp.error';
|
|
102
|
+
languageId: string;
|
|
103
|
+
error: string;
|
|
104
|
+
} | {
|
|
105
|
+
type: 'lsp.diagnostics';
|
|
106
|
+
uri: string;
|
|
107
|
+
diagnostics: LSPDiagnostic[];
|
|
108
|
+
};
|
|
109
|
+
export type LSPEventListener = (event: LSPEvent) => void;
|
|
110
|
+
/**
|
|
111
|
+
* Manages multiple LSP clients for different languages.
|
|
112
|
+
*/
|
|
113
|
+
export declare class LSPManager {
|
|
114
|
+
private clients;
|
|
115
|
+
private config;
|
|
116
|
+
private eventListeners;
|
|
117
|
+
private diagnosticsCache;
|
|
118
|
+
constructor(config?: LSPConfig);
|
|
119
|
+
/**
|
|
120
|
+
* Auto-detect and start LSP servers based on project files.
|
|
121
|
+
*/
|
|
122
|
+
autoStart(workspaceRoot?: string): Promise<string[]>;
|
|
123
|
+
/**
|
|
124
|
+
* Start a specific language server.
|
|
125
|
+
*/
|
|
126
|
+
startServer(languageId: string, rootUri?: string): Promise<void>;
|
|
127
|
+
/**
|
|
128
|
+
* Stop a specific language server.
|
|
129
|
+
*/
|
|
130
|
+
stopServer(languageId: string): Promise<void>;
|
|
131
|
+
/**
|
|
132
|
+
* Stop all language servers.
|
|
133
|
+
*/
|
|
134
|
+
stopAll(): Promise<void>;
|
|
135
|
+
/**
|
|
136
|
+
* Get definition for a symbol.
|
|
137
|
+
*/
|
|
138
|
+
getDefinition(file: string, line: number, col: number): Promise<LSPLocation | null>;
|
|
139
|
+
/**
|
|
140
|
+
* Get completions at a position.
|
|
141
|
+
*/
|
|
142
|
+
getCompletions(file: string, line: number, col: number): Promise<LSPCompletion[]>;
|
|
143
|
+
/**
|
|
144
|
+
* Get hover information.
|
|
145
|
+
*/
|
|
146
|
+
getHover(file: string, line: number, col: number): Promise<string | null>;
|
|
147
|
+
/**
|
|
148
|
+
* Get all references to a symbol.
|
|
149
|
+
*/
|
|
150
|
+
getReferences(file: string, line: number, col: number, includeDeclaration?: boolean): Promise<LSPLocation[]>;
|
|
151
|
+
/**
|
|
152
|
+
* Get cached diagnostics for a file.
|
|
153
|
+
*/
|
|
154
|
+
getDiagnostics(file: string): LSPDiagnostic[];
|
|
155
|
+
/**
|
|
156
|
+
* Notify about a file being opened.
|
|
157
|
+
*/
|
|
158
|
+
notifyFileOpened(file: string, content: string): void;
|
|
159
|
+
/**
|
|
160
|
+
* Notify about a file being changed.
|
|
161
|
+
*/
|
|
162
|
+
notifyFileChanged(file: string, content: string, version?: number): void;
|
|
163
|
+
/**
|
|
164
|
+
* Notify about a file being closed.
|
|
165
|
+
*/
|
|
166
|
+
notifyFileClosed(file: string): void;
|
|
167
|
+
/**
|
|
168
|
+
* Get list of active language servers.
|
|
169
|
+
*/
|
|
170
|
+
getActiveServers(): string[];
|
|
171
|
+
/**
|
|
172
|
+
* Check if a language server is running.
|
|
173
|
+
*/
|
|
174
|
+
isServerRunning(languageId: string): boolean;
|
|
175
|
+
/**
|
|
176
|
+
* Subscribe to LSP events.
|
|
177
|
+
*/
|
|
178
|
+
subscribe(listener: LSPEventListener): () => void;
|
|
179
|
+
/**
|
|
180
|
+
* Cleanup all resources.
|
|
181
|
+
*/
|
|
182
|
+
cleanup(): Promise<void>;
|
|
183
|
+
private getClientForFile;
|
|
184
|
+
private detectLanguages;
|
|
185
|
+
private commandExists;
|
|
186
|
+
private emit;
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Create an LSP manager.
|
|
190
|
+
*/
|
|
191
|
+
export declare function createLSPManager(config?: LSPConfig): LSPManager;
|
|
192
|
+
/**
|
|
193
|
+
* Create an LSP manager and auto-start servers.
|
|
194
|
+
*/
|
|
195
|
+
export declare function createAndStartLSPManager(workspaceRoot?: string, config?: LSPConfig): Promise<LSPManager>;
|
|
196
|
+
//# sourceMappingURL=lsp.d.ts.map
|