axon-code 2.4.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/LICENSE +661 -0
- package/README.md +261 -0
- package/README.zh-CN.md +261 -0
- package/dist/agents/context.d.ts +289 -0
- package/dist/agents/context.d.ts.map +1 -0
- package/dist/agents/context.js +944 -0
- package/dist/agents/context.js.map +1 -0
- package/dist/agents/explore.d.ts +190 -0
- package/dist/agents/explore.d.ts.map +1 -0
- package/dist/agents/explore.js +582 -0
- package/dist/agents/explore.js.map +1 -0
- package/dist/agents/guide.d.ts +117 -0
- package/dist/agents/guide.d.ts.map +1 -0
- package/dist/agents/guide.js +690 -0
- package/dist/agents/guide.js.map +1 -0
- package/dist/agents/index.d.ts +11 -0
- package/dist/agents/index.d.ts.map +1 -0
- package/dist/agents/index.js +17 -0
- package/dist/agents/index.js.map +1 -0
- package/dist/agents/monitor.d.ts +343 -0
- package/dist/agents/monitor.d.ts.map +1 -0
- package/dist/agents/monitor.js +963 -0
- package/dist/agents/monitor.js.map +1 -0
- package/dist/agents/parallel.d.ts +305 -0
- package/dist/agents/parallel.d.ts.map +1 -0
- package/dist/agents/parallel.js +717 -0
- package/dist/agents/parallel.js.map +1 -0
- package/dist/agents/plan.d.ts +236 -0
- package/dist/agents/plan.d.ts.map +1 -0
- package/dist/agents/plan.js +292 -0
- package/dist/agents/plan.js.map +1 -0
- package/dist/agents/resume.d.ts +209 -0
- package/dist/agents/resume.d.ts.map +1 -0
- package/dist/agents/resume.js +520 -0
- package/dist/agents/resume.js.map +1 -0
- package/dist/agents/statusline.d.ts +167 -0
- package/dist/agents/statusline.d.ts.map +1 -0
- package/dist/agents/statusline.js +546 -0
- package/dist/agents/statusline.js.map +1 -0
- package/dist/agents/teammate-context.d.ts +163 -0
- package/dist/agents/teammate-context.d.ts.map +1 -0
- package/dist/agents/teammate-context.js +272 -0
- package/dist/agents/teammate-context.js.map +1 -0
- package/dist/agents/tools.d.ts +30 -0
- package/dist/agents/tools.d.ts.map +1 -0
- package/dist/agents/tools.js +116 -0
- package/dist/agents/tools.js.map +1 -0
- package/dist/auth/index.d.ts +204 -0
- package/dist/auth/index.d.ts.map +1 -0
- package/dist/auth/index.js +1266 -0
- package/dist/auth/index.js.map +1 -0
- package/dist/auth/keychain.d.ts +74 -0
- package/dist/auth/keychain.d.ts.map +1 -0
- package/dist/auth/keychain.js +181 -0
- package/dist/auth/keychain.js.map +1 -0
- package/dist/auth/settings.d.ts +58 -0
- package/dist/auth/settings.d.ts.map +1 -0
- package/dist/auth/settings.js +260 -0
- package/dist/auth/settings.js.map +1 -0
- package/dist/background/index.d.ts +83 -0
- package/dist/background/index.d.ts.map +1 -0
- package/dist/background/index.js +106 -0
- package/dist/background/index.js.map +1 -0
- package/dist/background/persistence.d.ts +146 -0
- package/dist/background/persistence.d.ts.map +1 -0
- package/dist/background/persistence.js +347 -0
- package/dist/background/persistence.js.map +1 -0
- package/dist/background/shell-manager.d.ts +130 -0
- package/dist/background/shell-manager.d.ts.map +1 -0
- package/dist/background/shell-manager.js +401 -0
- package/dist/background/shell-manager.js.map +1 -0
- package/dist/background/task-queue.d.ts +96 -0
- package/dist/background/task-queue.d.ts.map +1 -0
- package/dist/background/task-queue.js +199 -0
- package/dist/background/task-queue.js.map +1 -0
- package/dist/background/timeout.d.ts +122 -0
- package/dist/background/timeout.d.ts.map +1 -0
- package/dist/background/timeout.js +247 -0
- package/dist/background/timeout.js.map +1 -0
- package/dist/blueprint/agent-decision-maker.d.ts +126 -0
- package/dist/blueprint/agent-decision-maker.d.ts.map +1 -0
- package/dist/blueprint/agent-decision-maker.js +433 -0
- package/dist/blueprint/agent-decision-maker.js.map +1 -0
- package/dist/blueprint/autonomous-worker.d.ts +182 -0
- package/dist/blueprint/autonomous-worker.d.ts.map +1 -0
- package/dist/blueprint/autonomous-worker.js +808 -0
- package/dist/blueprint/autonomous-worker.js.map +1 -0
- package/dist/blueprint/browser-test-tools.d.ts +277 -0
- package/dist/blueprint/browser-test-tools.d.ts.map +1 -0
- package/dist/blueprint/browser-test-tools.js +645 -0
- package/dist/blueprint/browser-test-tools.js.map +1 -0
- package/dist/blueprint/e2e-agent-registry.d.ts +27 -0
- package/dist/blueprint/e2e-agent-registry.d.ts.map +1 -0
- package/dist/blueprint/e2e-agent-registry.js +39 -0
- package/dist/blueprint/e2e-agent-registry.js.map +1 -0
- package/dist/blueprint/e2e-test-agent.d.ts +151 -0
- package/dist/blueprint/e2e-test-agent.d.ts.map +1 -0
- package/dist/blueprint/e2e-test-agent.js +612 -0
- package/dist/blueprint/e2e-test-agent.js.map +1 -0
- package/dist/blueprint/environment-checker.d.ts +113 -0
- package/dist/blueprint/environment-checker.d.ts.map +1 -0
- package/dist/blueprint/environment-checker.js +409 -0
- package/dist/blueprint/environment-checker.js.map +1 -0
- package/dist/blueprint/index.d.ts +26 -0
- package/dist/blueprint/index.d.ts.map +1 -0
- package/dist/blueprint/index.js +50 -0
- package/dist/blueprint/index.js.map +1 -0
- package/dist/blueprint/lead-agent.d.ts +97 -0
- package/dist/blueprint/lead-agent.d.ts.map +1 -0
- package/dist/blueprint/lead-agent.js +905 -0
- package/dist/blueprint/lead-agent.js.map +1 -0
- package/dist/blueprint/model-selector.d.ts +34 -0
- package/dist/blueprint/model-selector.d.ts.map +1 -0
- package/dist/blueprint/model-selector.js +83 -0
- package/dist/blueprint/model-selector.js.map +1 -0
- package/dist/blueprint/planner-session.d.ts +130 -0
- package/dist/blueprint/planner-session.d.ts.map +1 -0
- package/dist/blueprint/planner-session.js +479 -0
- package/dist/blueprint/planner-session.js.map +1 -0
- package/dist/blueprint/realtime-coordinator.d.ts +373 -0
- package/dist/blueprint/realtime-coordinator.d.ts.map +1 -0
- package/dist/blueprint/realtime-coordinator.js +1454 -0
- package/dist/blueprint/realtime-coordinator.js.map +1 -0
- package/dist/blueprint/smart-planner.d.ts +346 -0
- package/dist/blueprint/smart-planner.d.ts.map +1 -0
- package/dist/blueprint/smart-planner.js +2426 -0
- package/dist/blueprint/smart-planner.js.map +1 -0
- package/dist/blueprint/task-queue.d.ts +62 -0
- package/dist/blueprint/task-queue.d.ts.map +1 -0
- package/dist/blueprint/task-queue.js +185 -0
- package/dist/blueprint/task-queue.js.map +1 -0
- package/dist/blueprint/task-reviewer.d.ts +168 -0
- package/dist/blueprint/task-reviewer.d.ts.map +1 -0
- package/dist/blueprint/task-reviewer.js +570 -0
- package/dist/blueprint/task-reviewer.js.map +1 -0
- package/dist/blueprint/types.d.ts +1054 -0
- package/dist/blueprint/types.d.ts.map +1 -0
- package/dist/blueprint/types.js +49 -0
- package/dist/blueprint/types.js.map +1 -0
- package/dist/blueprint/verification-service.d.ts +134 -0
- package/dist/blueprint/verification-service.d.ts.map +1 -0
- package/dist/blueprint/verification-service.js +315 -0
- package/dist/blueprint/verification-service.js.map +1 -0
- package/dist/blueprint/visual-comparator.d.ts +112 -0
- package/dist/blueprint/visual-comparator.d.ts.map +1 -0
- package/dist/blueprint/visual-comparator.js +309 -0
- package/dist/blueprint/visual-comparator.js.map +1 -0
- package/dist/browser/controller.d.ts +188 -0
- package/dist/browser/controller.d.ts.map +1 -0
- package/dist/browser/controller.js +1256 -0
- package/dist/browser/controller.js.map +1 -0
- package/dist/browser/detect.d.ts +14 -0
- package/dist/browser/detect.d.ts.map +1 -0
- package/dist/browser/detect.js +93 -0
- package/dist/browser/detect.js.map +1 -0
- package/dist/browser/errors.d.ts +14 -0
- package/dist/browser/errors.d.ts.map +1 -0
- package/dist/browser/errors.js +45 -0
- package/dist/browser/errors.js.map +1 -0
- package/dist/browser/extension/background-utils.js +53 -0
- package/dist/browser/extension/background.js +895 -0
- package/dist/browser/extension/manifest.json +28 -0
- package/dist/browser/extension/options.html +214 -0
- package/dist/browser/extension/options.js +201 -0
- package/dist/browser/extension-relay-auth.d.ts +18 -0
- package/dist/browser/extension-relay-auth.d.ts.map +1 -0
- package/dist/browser/extension-relay-auth.js +53 -0
- package/dist/browser/extension-relay-auth.js.map +1 -0
- package/dist/browser/extension-relay.d.ts +39 -0
- package/dist/browser/extension-relay.d.ts.map +1 -0
- package/dist/browser/extension-relay.js +855 -0
- package/dist/browser/extension-relay.js.map +1 -0
- package/dist/browser/index.d.ts +11 -0
- package/dist/browser/index.d.ts.map +1 -0
- package/dist/browser/index.js +11 -0
- package/dist/browser/index.js.map +1 -0
- package/dist/browser/manager.d.ts +77 -0
- package/dist/browser/manager.d.ts.map +1 -0
- package/dist/browser/manager.js +911 -0
- package/dist/browser/manager.js.map +1 -0
- package/dist/browser/navigation-guard.d.ts +15 -0
- package/dist/browser/navigation-guard.d.ts.map +1 -0
- package/dist/browser/navigation-guard.js +163 -0
- package/dist/browser/navigation-guard.js.map +1 -0
- package/dist/browser/profiles.d.ts +49 -0
- package/dist/browser/profiles.d.ts.map +1 -0
- package/dist/browser/profiles.js +211 -0
- package/dist/browser/profiles.js.map +1 -0
- package/dist/browser/types.d.ts +96 -0
- package/dist/browser/types.d.ts.map +1 -0
- package/dist/browser/types.js +5 -0
- package/dist/browser/types.js.map +1 -0
- package/dist/checkpoint/index.d.ts +289 -0
- package/dist/checkpoint/index.d.ts.map +1 -0
- package/dist/checkpoint/index.js +1424 -0
- package/dist/checkpoint/index.js.map +1 -0
- package/dist/chrome/index.d.ts +31 -0
- package/dist/chrome/index.d.ts.map +1 -0
- package/dist/chrome/index.js +41 -0
- package/dist/chrome/index.js.map +1 -0
- package/dist/chrome-mcp/index.d.ts +84 -0
- package/dist/chrome-mcp/index.d.ts.map +1 -0
- package/dist/chrome-mcp/index.js +192 -0
- package/dist/chrome-mcp/index.js.map +1 -0
- package/dist/chrome-mcp/mcp-server.d.ts +115 -0
- package/dist/chrome-mcp/mcp-server.d.ts.map +1 -0
- package/dist/chrome-mcp/mcp-server.js +312 -0
- package/dist/chrome-mcp/mcp-server.js.map +1 -0
- package/dist/chrome-mcp/native-host.d.ts +65 -0
- package/dist/chrome-mcp/native-host.d.ts.map +1 -0
- package/dist/chrome-mcp/native-host.js +357 -0
- package/dist/chrome-mcp/native-host.js.map +1 -0
- package/dist/chrome-mcp/socket-client.d.ts +105 -0
- package/dist/chrome-mcp/socket-client.d.ts.map +1 -0
- package/dist/chrome-mcp/socket-client.js +325 -0
- package/dist/chrome-mcp/socket-client.js.map +1 -0
- package/dist/chrome-mcp/socket-server.d.ts +65 -0
- package/dist/chrome-mcp/socket-server.d.ts.map +1 -0
- package/dist/chrome-mcp/socket-server.js +354 -0
- package/dist/chrome-mcp/socket-server.js.map +1 -0
- package/dist/chrome-mcp/tools.d.ts +22 -0
- package/dist/chrome-mcp/tools.d.ts.map +1 -0
- package/dist/chrome-mcp/tools.js +372 -0
- package/dist/chrome-mcp/tools.js.map +1 -0
- package/dist/cli.d.ts +7 -0
- package/dist/cli.d.ts.map +1 -0
- package/dist/cli.js +3302 -0
- package/dist/cli.js.map +1 -0
- package/dist/codesign/index.d.ts +84 -0
- package/dist/codesign/index.d.ts.map +1 -0
- package/dist/codesign/index.js +289 -0
- package/dist/codesign/index.js.map +1 -0
- package/dist/commands/api.d.ts +8 -0
- package/dist/commands/api.d.ts.map +1 -0
- package/dist/commands/api.js +510 -0
- package/dist/commands/api.js.map +1 -0
- package/dist/commands/auth.d.ts +13 -0
- package/dist/commands/auth.d.ts.map +1 -0
- package/dist/commands/auth.js +713 -0
- package/dist/commands/auth.js.map +1 -0
- package/dist/commands/config-cmd.d.ts +12 -0
- package/dist/commands/config-cmd.d.ts.map +1 -0
- package/dist/commands/config-cmd.js +578 -0
- package/dist/commands/config-cmd.js.map +1 -0
- package/dist/commands/config.d.ts +22 -0
- package/dist/commands/config.d.ts.map +1 -0
- package/dist/commands/config.js +2457 -0
- package/dist/commands/config.js.map +1 -0
- package/dist/commands/development.d.ts +14 -0
- package/dist/commands/development.d.ts.map +1 -0
- package/dist/commands/development.js +905 -0
- package/dist/commands/development.js.map +1 -0
- package/dist/commands/general.d.ts +15 -0
- package/dist/commands/general.d.ts.map +1 -0
- package/dist/commands/general.js +620 -0
- package/dist/commands/general.js.map +1 -0
- package/dist/commands/index.d.ts +28 -0
- package/dist/commands/index.d.ts.map +1 -0
- package/dist/commands/index.js +70 -0
- package/dist/commands/index.js.map +1 -0
- package/dist/commands/registry.d.ts +16 -0
- package/dist/commands/registry.d.ts.map +1 -0
- package/dist/commands/registry.js +55 -0
- package/dist/commands/registry.js.map +1 -0
- package/dist/commands/session.d.ts +14 -0
- package/dist/commands/session.d.ts.map +1 -0
- package/dist/commands/session.js +1256 -0
- package/dist/commands/session.js.map +1 -0
- package/dist/commands/settings.d.ts +15 -0
- package/dist/commands/settings.d.ts.map +1 -0
- package/dist/commands/settings.js +439 -0
- package/dist/commands/settings.js.map +1 -0
- package/dist/commands/tools.d.ts +14 -0
- package/dist/commands/tools.d.ts.map +1 -0
- package/dist/commands/tools.js +1579 -0
- package/dist/commands/tools.js.map +1 -0
- package/dist/commands/types.d.ts +82 -0
- package/dist/commands/types.d.ts.map +1 -0
- package/dist/commands/types.js +5 -0
- package/dist/commands/types.js.map +1 -0
- package/dist/commands/utility.d.ts +19 -0
- package/dist/commands/utility.d.ts.map +1 -0
- package/dist/commands/utility.js +738 -0
- package/dist/commands/utility.js.map +1 -0
- package/dist/config/axon-md-parser.d.ts +167 -0
- package/dist/config/axon-md-parser.d.ts.map +1 -0
- package/dist/config/axon-md-parser.js +472 -0
- package/dist/config/axon-md-parser.js.map +1 -0
- package/dist/config/builtin-api.d.ts +2 -0
- package/dist/config/builtin-api.d.ts.map +1 -0
- package/dist/config/builtin-api.js +2 -0
- package/dist/config/builtin-api.js.map +1 -0
- package/dist/config/config-command.d.ts +81 -0
- package/dist/config/config-command.d.ts.map +1 -0
- package/dist/config/config-command.js +292 -0
- package/dist/config/config-command.js.map +1 -0
- package/dist/config/index.d.ts +1700 -0
- package/dist/config/index.d.ts.map +1 -0
- package/dist/config/index.js +1677 -0
- package/dist/config/index.js.map +1 -0
- package/dist/config/keybindings.d.ts +141 -0
- package/dist/config/keybindings.d.ts.map +1 -0
- package/dist/config/keybindings.js +708 -0
- package/dist/config/keybindings.js.map +1 -0
- package/dist/context/__tests__/enhanced.test.d.ts +5 -0
- package/dist/context/__tests__/enhanced.test.d.ts.map +1 -0
- package/dist/context/__tests__/enhanced.test.js +298 -0
- package/dist/context/__tests__/enhanced.test.js.map +1 -0
- package/dist/context/enhanced.d.ts +244 -0
- package/dist/context/enhanced.d.ts.map +1 -0
- package/dist/context/enhanced.js +527 -0
- package/dist/context/enhanced.js.map +1 -0
- package/dist/context/index.d.ts +249 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1043 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/intent-enricher.d.ts +38 -0
- package/dist/context/intent-enricher.d.ts.map +1 -0
- package/dist/context/intent-enricher.js +212 -0
- package/dist/context/intent-enricher.js.map +1 -0
- package/dist/context/link-detector.d.ts +20 -0
- package/dist/context/link-detector.d.ts.map +1 -0
- package/dist/context/link-detector.js +99 -0
- package/dist/context/link-detector.js.map +1 -0
- package/dist/context/session-memory.d.ts +206 -0
- package/dist/context/session-memory.d.ts.map +1 -0
- package/dist/context/session-memory.js +542 -0
- package/dist/context/session-memory.js.map +1 -0
- package/dist/context/summarizer.d.ts +27 -0
- package/dist/context/summarizer.d.ts.map +1 -0
- package/dist/context/summarizer.js +157 -0
- package/dist/context/summarizer.js.map +1 -0
- package/dist/context/window.d.ts +104 -0
- package/dist/context/window.d.ts.map +1 -0
- package/dist/context/window.js +140 -0
- package/dist/context/window.js.map +1 -0
- package/dist/core/backgroundTasks.d.ts +87 -0
- package/dist/core/backgroundTasks.d.ts.map +1 -0
- package/dist/core/backgroundTasks.js +229 -0
- package/dist/core/backgroundTasks.js.map +1 -0
- package/dist/core/cache-keepalive.d.ts +37 -0
- package/dist/core/cache-keepalive.d.ts.map +1 -0
- package/dist/core/cache-keepalive.js +130 -0
- package/dist/core/cache-keepalive.js.map +1 -0
- package/dist/core/client.cache.test.d.ts +13 -0
- package/dist/core/client.cache.test.d.ts.map +1 -0
- package/dist/core/client.cache.test.js +315 -0
- package/dist/core/client.cache.test.js.map +1 -0
- package/dist/core/client.d.ts +306 -0
- package/dist/core/client.d.ts.map +1 -0
- package/dist/core/client.js +1930 -0
- package/dist/core/client.js.map +1 -0
- package/dist/core/cwd-context.d.ts +53 -0
- package/dist/core/cwd-context.d.ts.map +1 -0
- package/dist/core/cwd-context.js +102 -0
- package/dist/core/cwd-context.js.map +1 -0
- package/dist/core/index.d.ts +9 -0
- package/dist/core/index.d.ts.map +1 -0
- package/dist/core/index.js +9 -0
- package/dist/core/index.js.map +1 -0
- package/dist/core/loop.d.ts +401 -0
- package/dist/core/loop.d.ts.map +1 -0
- package/dist/core/loop.js +3375 -0
- package/dist/core/loop.js.map +1 -0
- package/dist/core/retryLogic.d.ts +84 -0
- package/dist/core/retryLogic.d.ts.map +1 -0
- package/dist/core/retryLogic.js +157 -0
- package/dist/core/retryLogic.js.map +1 -0
- package/dist/core/session-context.d.ts +24 -0
- package/dist/core/session-context.d.ts.map +1 -0
- package/dist/core/session-context.js +35 -0
- package/dist/core/session-context.js.map +1 -0
- package/dist/core/session.d.ts +229 -0
- package/dist/core/session.d.ts.map +1 -0
- package/dist/core/session.js +729 -0
- package/dist/core/session.js.map +1 -0
- package/dist/core/validateToolResults.test.d.ts +6 -0
- package/dist/core/validateToolResults.test.d.ts.map +1 -0
- package/dist/core/validateToolResults.test.js +303 -0
- package/dist/core/validateToolResults.test.js.map +1 -0
- package/dist/daemon/alarm.d.ts +62 -0
- package/dist/daemon/alarm.d.ts.map +1 -0
- package/dist/daemon/alarm.js +145 -0
- package/dist/daemon/alarm.js.map +1 -0
- package/dist/daemon/config.d.ts +225 -0
- package/dist/daemon/config.d.ts.map +1 -0
- package/dist/daemon/config.js +104 -0
- package/dist/daemon/config.js.map +1 -0
- package/dist/daemon/executor.d.ts +52 -0
- package/dist/daemon/executor.d.ts.map +1 -0
- package/dist/daemon/executor.js +288 -0
- package/dist/daemon/executor.js.map +1 -0
- package/dist/daemon/index.d.ts +72 -0
- package/dist/daemon/index.d.ts.map +1 -0
- package/dist/daemon/index.js +394 -0
- package/dist/daemon/index.js.map +1 -0
- package/dist/daemon/locked.d.ts +15 -0
- package/dist/daemon/locked.d.ts.map +1 -0
- package/dist/daemon/locked.js +16 -0
- package/dist/daemon/locked.js.map +1 -0
- package/dist/daemon/notifier.d.ts +25 -0
- package/dist/daemon/notifier.d.ts.map +1 -0
- package/dist/daemon/notifier.js +87 -0
- package/dist/daemon/notifier.js.map +1 -0
- package/dist/daemon/run-log.d.ts +43 -0
- package/dist/daemon/run-log.d.ts.map +1 -0
- package/dist/daemon/run-log.js +126 -0
- package/dist/daemon/run-log.js.map +1 -0
- package/dist/daemon/scheduler.d.ts +85 -0
- package/dist/daemon/scheduler.d.ts.map +1 -0
- package/dist/daemon/scheduler.js +379 -0
- package/dist/daemon/scheduler.js.map +1 -0
- package/dist/daemon/store.d.ts +94 -0
- package/dist/daemon/store.d.ts.map +1 -0
- package/dist/daemon/store.js +121 -0
- package/dist/daemon/store.js.map +1 -0
- package/dist/daemon/time-parser.d.ts +15 -0
- package/dist/daemon/time-parser.d.ts.map +1 -0
- package/dist/daemon/time-parser.js +68 -0
- package/dist/daemon/time-parser.js.map +1 -0
- package/dist/daemon/watcher.d.ts +34 -0
- package/dist/daemon/watcher.d.ts.map +1 -0
- package/dist/daemon/watcher.js +105 -0
- package/dist/daemon/watcher.js.map +1 -0
- package/dist/database/drivers/mongo.d.ts +14 -0
- package/dist/database/drivers/mongo.d.ts.map +1 -0
- package/dist/database/drivers/mongo.js +112 -0
- package/dist/database/drivers/mongo.js.map +1 -0
- package/dist/database/drivers/mysql.d.ts +13 -0
- package/dist/database/drivers/mysql.d.ts.map +1 -0
- package/dist/database/drivers/mysql.js +76 -0
- package/dist/database/drivers/mysql.js.map +1 -0
- package/dist/database/drivers/postgres.d.ts +13 -0
- package/dist/database/drivers/postgres.d.ts.map +1 -0
- package/dist/database/drivers/postgres.js +79 -0
- package/dist/database/drivers/postgres.js.map +1 -0
- package/dist/database/drivers/redis.d.ts +13 -0
- package/dist/database/drivers/redis.d.ts.map +1 -0
- package/dist/database/drivers/redis.js +100 -0
- package/dist/database/drivers/redis.js.map +1 -0
- package/dist/database/drivers/sqlite.d.ts +13 -0
- package/dist/database/drivers/sqlite.d.ts.map +1 -0
- package/dist/database/drivers/sqlite.js +89 -0
- package/dist/database/drivers/sqlite.js.map +1 -0
- package/dist/database/index.d.ts +21 -0
- package/dist/database/index.d.ts.map +1 -0
- package/dist/database/index.js +97 -0
- package/dist/database/index.js.map +1 -0
- package/dist/database/types.d.ts +54 -0
- package/dist/database/types.d.ts.map +1 -0
- package/dist/database/types.js +2 -0
- package/dist/database/types.js.map +1 -0
- package/dist/debugger/dap-client.d.ts +32 -0
- package/dist/debugger/dap-client.d.ts.map +1 -0
- package/dist/debugger/dap-client.js +108 -0
- package/dist/debugger/dap-client.js.map +1 -0
- package/dist/debugger/index.d.ts +30 -0
- package/dist/debugger/index.d.ts.map +1 -0
- package/dist/debugger/index.js +574 -0
- package/dist/debugger/index.js.map +1 -0
- package/dist/debugger/types.d.ts +59 -0
- package/dist/debugger/types.d.ts.map +1 -0
- package/dist/debugger/types.js +2 -0
- package/dist/debugger/types.js.map +1 -0
- package/dist/diagnostics/index.d.ts +72 -0
- package/dist/diagnostics/index.d.ts.map +1 -0
- package/dist/diagnostics/index.js +1013 -0
- package/dist/diagnostics/index.js.map +1 -0
- package/dist/ear/index.d.ts +73 -0
- package/dist/ear/index.d.ts.map +1 -0
- package/dist/ear/index.js +114 -0
- package/dist/ear/index.js.map +1 -0
- package/dist/email-mcp/index.d.ts +12 -0
- package/dist/email-mcp/index.d.ts.map +1 -0
- package/dist/email-mcp/index.js +11 -0
- package/dist/email-mcp/index.js.map +1 -0
- package/dist/email-mcp/mcp-server.d.ts +18 -0
- package/dist/email-mcp/mcp-server.d.ts.map +1 -0
- package/dist/email-mcp/mcp-server.js +381 -0
- package/dist/email-mcp/mcp-server.js.map +1 -0
- package/dist/email-mcp/tools.d.ts +22 -0
- package/dist/email-mcp/tools.d.ts.map +1 -0
- package/dist/email-mcp/tools.js +251 -0
- package/dist/email-mcp/tools.js.map +1 -0
- package/dist/env/index.d.ts +27 -0
- package/dist/env/index.d.ts.map +1 -0
- package/dist/env/index.js +31 -0
- package/dist/env/index.js.map +1 -0
- package/dist/env/manager.d.ts +150 -0
- package/dist/env/manager.d.ts.map +1 -0
- package/dist/env/manager.js +290 -0
- package/dist/env/manager.js.map +1 -0
- package/dist/env/sensitive.d.ts +134 -0
- package/dist/env/sensitive.d.ts.map +1 -0
- package/dist/env/sensitive.js +255 -0
- package/dist/env/sensitive.js.map +1 -0
- package/dist/env/validator.d.ts +93 -0
- package/dist/env/validator.d.ts.map +1 -0
- package/dist/env/validator.js +122 -0
- package/dist/env/validator.js.map +1 -0
- package/dist/env/validators/builtin.d.ts +68 -0
- package/dist/env/validators/builtin.d.ts.map +1 -0
- package/dist/env/validators/builtin.js +294 -0
- package/dist/env/validators/builtin.js.map +1 -0
- package/dist/eye/camera.py +396 -0
- package/dist/eye/index.d.ts +70 -0
- package/dist/eye/index.d.ts.map +1 -0
- package/dist/eye/index.js +356 -0
- package/dist/eye/index.js.map +1 -0
- package/dist/fast-mode/index.d.ts +136 -0
- package/dist/fast-mode/index.d.ts.map +1 -0
- package/dist/fast-mode/index.js +390 -0
- package/dist/fast-mode/index.js.map +1 -0
- package/dist/fast-mode/provider.d.ts +10 -0
- package/dist/fast-mode/provider.d.ts.map +1 -0
- package/dist/fast-mode/provider.js +23 -0
- package/dist/fast-mode/provider.js.map +1 -0
- package/dist/feishu/bot.d.ts +71 -0
- package/dist/feishu/bot.d.ts.map +1 -0
- package/dist/feishu/bot.js +287 -0
- package/dist/feishu/bot.js.map +1 -0
- package/dist/feishu/config.d.ts +54 -0
- package/dist/feishu/config.d.ts.map +1 -0
- package/dist/feishu/config.js +100 -0
- package/dist/feishu/config.js.map +1 -0
- package/dist/feishu/index.d.ts +7 -0
- package/dist/feishu/index.d.ts.map +1 -0
- package/dist/feishu/index.js +5 -0
- package/dist/feishu/index.js.map +1 -0
- package/dist/feishu/message-handler.d.ts +42 -0
- package/dist/feishu/message-handler.d.ts.map +1 -0
- package/dist/feishu/message-handler.js +112 -0
- package/dist/feishu/message-handler.js.map +1 -0
- package/dist/feishu/session-manager.d.ts +57 -0
- package/dist/feishu/session-manager.d.ts.map +1 -0
- package/dist/feishu/session-manager.js +179 -0
- package/dist/feishu/session-manager.js.map +1 -0
- package/dist/feishu-cli.d.ts +34 -0
- package/dist/feishu-cli.d.ts.map +1 -0
- package/dist/feishu-cli.js +132 -0
- package/dist/feishu-cli.js.map +1 -0
- package/dist/git/analysis.d.ts +135 -0
- package/dist/git/analysis.d.ts.map +1 -0
- package/dist/git/analysis.js +259 -0
- package/dist/git/analysis.js.map +1 -0
- package/dist/git/core.d.ts +175 -0
- package/dist/git/core.d.ts.map +1 -0
- package/dist/git/core.js +349 -0
- package/dist/git/core.js.map +1 -0
- package/dist/git/ignore.d.ts +74 -0
- package/dist/git/ignore.d.ts.map +1 -0
- package/dist/git/ignore.js +257 -0
- package/dist/git/ignore.js.map +1 -0
- package/dist/git/index.d.ts +37 -0
- package/dist/git/index.d.ts.map +1 -0
- package/dist/git/index.js +48 -0
- package/dist/git/index.js.map +1 -0
- package/dist/git/operations.d.ts +96 -0
- package/dist/git/operations.d.ts.map +1 -0
- package/dist/git/operations.js +288 -0
- package/dist/git/operations.js.map +1 -0
- package/dist/git/safety.d.ts +107 -0
- package/dist/git/safety.d.ts.map +1 -0
- package/dist/git/safety.js +293 -0
- package/dist/git/safety.js.map +1 -0
- package/dist/github/index.d.ts +58 -0
- package/dist/github/index.d.ts.map +1 -0
- package/dist/github/index.js +246 -0
- package/dist/github/index.js.map +1 -0
- package/dist/goals/goal-daemon.d.ts +54 -0
- package/dist/goals/goal-daemon.d.ts.map +1 -0
- package/dist/goals/goal-daemon.js +171 -0
- package/dist/goals/goal-daemon.js.map +1 -0
- package/dist/goals/goal-evaluator.d.ts +28 -0
- package/dist/goals/goal-evaluator.d.ts.map +1 -0
- package/dist/goals/goal-evaluator.js +117 -0
- package/dist/goals/goal-evaluator.js.map +1 -0
- package/dist/goals/goal-planner.d.ts +21 -0
- package/dist/goals/goal-planner.d.ts.map +1 -0
- package/dist/goals/goal-planner.js +80 -0
- package/dist/goals/goal-planner.js.map +1 -0
- package/dist/goals/goal-store.d.ts +31 -0
- package/dist/goals/goal-store.d.ts.map +1 -0
- package/dist/goals/goal-store.js +238 -0
- package/dist/goals/goal-store.js.map +1 -0
- package/dist/goals/index.d.ts +15 -0
- package/dist/goals/index.d.ts.map +1 -0
- package/dist/goals/index.js +22 -0
- package/dist/goals/index.js.map +1 -0
- package/dist/goals/storage.d.ts +83 -0
- package/dist/goals/storage.d.ts.map +1 -0
- package/dist/goals/storage.js +235 -0
- package/dist/goals/storage.js.map +1 -0
- package/dist/goals/types.d.ts +138 -0
- package/dist/goals/types.d.ts.map +1 -0
- package/dist/goals/types.js +5 -0
- package/dist/goals/types.js.map +1 -0
- package/dist/hooks/blueprint-hooks.d.ts +52 -0
- package/dist/hooks/blueprint-hooks.d.ts.map +1 -0
- package/dist/hooks/blueprint-hooks.js +75 -0
- package/dist/hooks/blueprint-hooks.js.map +1 -0
- package/dist/hooks/index.d.ts +421 -0
- package/dist/hooks/index.d.ts.map +1 -0
- package/dist/hooks/index.js +1225 -0
- package/dist/hooks/index.js.map +1 -0
- package/dist/hooks/index.test.d.ts +33 -0
- package/dist/hooks/index.test.d.ts.map +1 -0
- package/dist/hooks/index.test.js +199 -0
- package/dist/hooks/index.test.js.map +1 -0
- package/dist/i18n/index.d.ts +25 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +96 -0
- package/dist/i18n/index.js.map +1 -0
- package/dist/i18n/locales/en.d.ts +786 -0
- package/dist/i18n/locales/en.d.ts.map +1 -0
- package/dist/i18n/locales/en.js +865 -0
- package/dist/i18n/locales/en.js.map +1 -0
- package/dist/i18n/locales/zh.d.ts +7 -0
- package/dist/i18n/locales/zh.d.ts.map +1 -0
- package/dist/i18n/locales/zh.js +862 -0
- package/dist/i18n/locales/zh.js.map +1 -0
- package/dist/ide/index.d.ts +81 -0
- package/dist/ide/index.d.ts.map +1 -0
- package/dist/ide/index.js +371 -0
- package/dist/ide/index.js.map +1 -0
- package/dist/index.d.ts +39 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +63 -0
- package/dist/index.js.map +1 -0
- package/dist/lifecycle/index.d.ts +120 -0
- package/dist/lifecycle/index.d.ts.map +1 -0
- package/dist/lifecycle/index.js +178 -0
- package/dist/lifecycle/index.js.map +1 -0
- package/dist/lsp/index.d.ts +12 -0
- package/dist/lsp/index.d.ts.map +1 -0
- package/dist/lsp/index.js +20 -0
- package/dist/lsp/index.js.map +1 -0
- package/dist/lsp/manager.d.ts +307 -0
- package/dist/lsp/manager.d.ts.map +1 -0
- package/dist/lsp/manager.js +1012 -0
- package/dist/lsp/manager.js.map +1 -0
- package/dist/map/index.d.ts +2 -0
- package/dist/map/index.d.ts.map +1 -0
- package/dist/map/index.js +2 -0
- package/dist/map/index.js.map +1 -0
- package/dist/map/types.d.ts +264 -0
- package/dist/map/types.d.ts.map +1 -0
- package/dist/map/types.js +6 -0
- package/dist/map/types.js.map +1 -0
- package/dist/mcp/adapter.d.ts +217 -0
- package/dist/mcp/adapter.d.ts.map +1 -0
- package/dist/mcp/adapter.js +527 -0
- package/dist/mcp/adapter.js.map +1 -0
- package/dist/mcp/auto-discovery.d.ts +303 -0
- package/dist/mcp/auto-discovery.d.ts.map +1 -0
- package/dist/mcp/auto-discovery.js +1009 -0
- package/dist/mcp/auto-discovery.js.map +1 -0
- package/dist/mcp/cancellation.d.ts +258 -0
- package/dist/mcp/cancellation.d.ts.map +1 -0
- package/dist/mcp/cancellation.js +478 -0
- package/dist/mcp/cancellation.js.map +1 -0
- package/dist/mcp/config.d.ts +521 -0
- package/dist/mcp/config.d.ts.map +1 -0
- package/dist/mcp/config.js +694 -0
- package/dist/mcp/config.js.map +1 -0
- package/dist/mcp/connection.d.ts +228 -0
- package/dist/mcp/connection.d.ts.map +1 -0
- package/dist/mcp/connection.js +707 -0
- package/dist/mcp/connection.js.map +1 -0
- package/dist/mcp/discovery.d.ts +128 -0
- package/dist/mcp/discovery.d.ts.map +1 -0
- package/dist/mcp/discovery.js +577 -0
- package/dist/mcp/discovery.js.map +1 -0
- package/dist/mcp/errors.d.ts +273 -0
- package/dist/mcp/errors.d.ts.map +1 -0
- package/dist/mcp/errors.js +566 -0
- package/dist/mcp/errors.js.map +1 -0
- package/dist/mcp/index.d.ts +10 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +29 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/integration.d.ts +71 -0
- package/dist/mcp/integration.d.ts.map +1 -0
- package/dist/mcp/integration.js +198 -0
- package/dist/mcp/integration.js.map +1 -0
- package/dist/mcp/lifecycle.d.ts +261 -0
- package/dist/mcp/lifecycle.d.ts.map +1 -0
- package/dist/mcp/lifecycle.js +714 -0
- package/dist/mcp/lifecycle.js.map +1 -0
- package/dist/mcp/logging.d.ts +166 -0
- package/dist/mcp/logging.d.ts.map +1 -0
- package/dist/mcp/logging.js +346 -0
- package/dist/mcp/logging.js.map +1 -0
- package/dist/mcp/notifications.d.ts +221 -0
- package/dist/mcp/notifications.d.ts.map +1 -0
- package/dist/mcp/notifications.js +356 -0
- package/dist/mcp/notifications.js.map +1 -0
- package/dist/mcp/protocol.d.ts +516 -0
- package/dist/mcp/protocol.d.ts.map +1 -0
- package/dist/mcp/protocol.js +490 -0
- package/dist/mcp/protocol.js.map +1 -0
- package/dist/mcp/resources.d.ts +197 -0
- package/dist/mcp/resources.d.ts.map +1 -0
- package/dist/mcp/resources.js +432 -0
- package/dist/mcp/resources.js.map +1 -0
- package/dist/mcp/roots.d.ts +149 -0
- package/dist/mcp/roots.d.ts.map +1 -0
- package/dist/mcp/roots.js +368 -0
- package/dist/mcp/roots.js.map +1 -0
- package/dist/mcp/sampling.d.ts +170 -0
- package/dist/mcp/sampling.d.ts.map +1 -0
- package/dist/mcp/sampling.js +373 -0
- package/dist/mcp/sampling.js.map +1 -0
- package/dist/mcp/tools.d.ts +347 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +773 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/websocket-connection.d.ts +164 -0
- package/dist/mcp/websocket-connection.d.ts.map +1 -0
- package/dist/mcp/websocket-connection.js +503 -0
- package/dist/mcp/websocket-connection.js.map +1 -0
- package/dist/mcp-cli.d.ts +26 -0
- package/dist/mcp-cli.d.ts.map +1 -0
- package/dist/mcp-cli.js +366 -0
- package/dist/mcp-cli.js.map +1 -0
- package/dist/media/image.d.ts +91 -0
- package/dist/media/image.d.ts.map +1 -0
- package/dist/media/image.js +400 -0
- package/dist/media/image.js.map +1 -0
- package/dist/media/index.d.ts +66 -0
- package/dist/media/index.d.ts.map +1 -0
- package/dist/media/index.js +122 -0
- package/dist/media/index.js.map +1 -0
- package/dist/media/mime.d.ts +23 -0
- package/dist/media/mime.d.ts.map +1 -0
- package/dist/media/mime.js +110 -0
- package/dist/media/mime.js.map +1 -0
- package/dist/media/office.d.ts +93 -0
- package/dist/media/office.d.ts.map +1 -0
- package/dist/media/office.js +735 -0
- package/dist/media/office.js.map +1 -0
- package/dist/media/pdf.d.ts +132 -0
- package/dist/media/pdf.d.ts.map +1 -0
- package/dist/media/pdf.js +281 -0
- package/dist/media/pdf.js.map +1 -0
- package/dist/media/svg.d.ts +55 -0
- package/dist/media/svg.d.ts.map +1 -0
- package/dist/media/svg.js +217 -0
- package/dist/media/svg.js.map +1 -0
- package/dist/memory/embedding-cache.d.ts +40 -0
- package/dist/memory/embedding-cache.d.ts.map +1 -0
- package/dist/memory/embedding-cache.js +105 -0
- package/dist/memory/embedding-cache.js.map +1 -0
- package/dist/memory/embedding-provider.d.ts +36 -0
- package/dist/memory/embedding-provider.d.ts.map +1 -0
- package/dist/memory/embedding-provider.js +105 -0
- package/dist/memory/embedding-provider.js.map +1 -0
- package/dist/memory/hybrid-search.d.ts +58 -0
- package/dist/memory/hybrid-search.d.ts.map +1 -0
- package/dist/memory/hybrid-search.js +68 -0
- package/dist/memory/hybrid-search.js.map +1 -0
- package/dist/memory/index.d.ts +15 -0
- package/dist/memory/index.d.ts.map +1 -0
- package/dist/memory/index.js +12 -0
- package/dist/memory/index.js.map +1 -0
- package/dist/memory/long-term-store.d.ts +131 -0
- package/dist/memory/long-term-store.d.ts.map +1 -0
- package/dist/memory/long-term-store.js +701 -0
- package/dist/memory/long-term-store.js.map +1 -0
- package/dist/memory/memory-search.d.ts +134 -0
- package/dist/memory/memory-search.d.ts.map +1 -0
- package/dist/memory/memory-search.js +338 -0
- package/dist/memory/memory-search.js.map +1 -0
- package/dist/memory/memory-sync.d.ts +66 -0
- package/dist/memory/memory-sync.d.ts.map +1 -0
- package/dist/memory/memory-sync.js +429 -0
- package/dist/memory/memory-sync.js.map +1 -0
- package/dist/memory/mmr.d.ts +34 -0
- package/dist/memory/mmr.d.ts.map +1 -0
- package/dist/memory/mmr.js +101 -0
- package/dist/memory/mmr.js.map +1 -0
- package/dist/memory/notebook.d.ts +80 -0
- package/dist/memory/notebook.d.ts.map +1 -0
- package/dist/memory/notebook.js +320 -0
- package/dist/memory/notebook.js.map +1 -0
- package/dist/memory/query-expansion.d.ts +22 -0
- package/dist/memory/query-expansion.d.ts.map +1 -0
- package/dist/memory/query-expansion.js +60 -0
- package/dist/memory/query-expansion.js.map +1 -0
- package/dist/memory/types.d.ts +16 -0
- package/dist/memory/types.d.ts.map +1 -0
- package/dist/memory/types.js +5 -0
- package/dist/memory/types.js.map +1 -0
- package/dist/models/config.d.ts +85 -0
- package/dist/models/config.d.ts.map +1 -0
- package/dist/models/config.js +427 -0
- package/dist/models/config.js.map +1 -0
- package/dist/models/fallback.d.ts +80 -0
- package/dist/models/fallback.d.ts.map +1 -0
- package/dist/models/fallback.js +215 -0
- package/dist/models/fallback.js.map +1 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.d.ts.map +1 -0
- package/dist/models/index.js +11 -0
- package/dist/models/index.js.map +1 -0
- package/dist/models/quota.d.ts +121 -0
- package/dist/models/quota.d.ts.map +1 -0
- package/dist/models/quota.js +397 -0
- package/dist/models/quota.js.map +1 -0
- package/dist/models/stats.d.ts +96 -0
- package/dist/models/stats.d.ts.map +1 -0
- package/dist/models/stats.js +224 -0
- package/dist/models/stats.js.map +1 -0
- package/dist/models/subagent-config.d.ts +119 -0
- package/dist/models/subagent-config.d.ts.map +1 -0
- package/dist/models/subagent-config.js +267 -0
- package/dist/models/subagent-config.js.map +1 -0
- package/dist/models/thinking.d.ts +102 -0
- package/dist/models/thinking.d.ts.map +1 -0
- package/dist/models/thinking.js +213 -0
- package/dist/models/thinking.js.map +1 -0
- package/dist/models/types.d.ts +250 -0
- package/dist/models/types.d.ts.map +1 -0
- package/dist/models/types.js +33 -0
- package/dist/models/types.js.map +1 -0
- package/dist/network/audit-log.d.ts +93 -0
- package/dist/network/audit-log.d.ts.map +1 -0
- package/dist/network/audit-log.js +319 -0
- package/dist/network/audit-log.js.map +1 -0
- package/dist/network/discovery.d.ts +91 -0
- package/dist/network/discovery.d.ts.map +1 -0
- package/dist/network/discovery.js +398 -0
- package/dist/network/discovery.js.map +1 -0
- package/dist/network/global-proxy.d.ts +19 -0
- package/dist/network/global-proxy.d.ts.map +1 -0
- package/dist/network/global-proxy.js +81 -0
- package/dist/network/global-proxy.js.map +1 -0
- package/dist/network/identity.d.ts +58 -0
- package/dist/network/identity.d.ts.map +1 -0
- package/dist/network/identity.js +267 -0
- package/dist/network/identity.js.map +1 -0
- package/dist/network/index.d.ts +153 -0
- package/dist/network/index.d.ts.map +1 -0
- package/dist/network/index.js +916 -0
- package/dist/network/index.js.map +1 -0
- package/dist/network/permission.d.ts +60 -0
- package/dist/network/permission.d.ts.map +1 -0
- package/dist/network/permission.js +124 -0
- package/dist/network/permission.js.map +1 -0
- package/dist/network/project-probe.d.ts +12 -0
- package/dist/network/project-probe.d.ts.map +1 -0
- package/dist/network/project-probe.js +74 -0
- package/dist/network/project-probe.js.map +1 -0
- package/dist/network/protocol.d.ts +59 -0
- package/dist/network/protocol.d.ts.map +1 -0
- package/dist/network/protocol.js +158 -0
- package/dist/network/protocol.js.map +1 -0
- package/dist/network/proxy.d.ts +93 -0
- package/dist/network/proxy.d.ts.map +1 -0
- package/dist/network/proxy.js +228 -0
- package/dist/network/proxy.js.map +1 -0
- package/dist/network/retry.d.ts +44 -0
- package/dist/network/retry.d.ts.map +1 -0
- package/dist/network/retry.js +110 -0
- package/dist/network/retry.js.map +1 -0
- package/dist/network/router.d.ts +36 -0
- package/dist/network/router.d.ts.map +1 -0
- package/dist/network/router.js +73 -0
- package/dist/network/router.js.map +1 -0
- package/dist/network/timeout.d.ts +59 -0
- package/dist/network/timeout.d.ts.map +1 -0
- package/dist/network/timeout.js +120 -0
- package/dist/network/timeout.js.map +1 -0
- package/dist/network/transport.d.ts +97 -0
- package/dist/network/transport.d.ts.map +1 -0
- package/dist/network/transport.js +397 -0
- package/dist/network/transport.js.map +1 -0
- package/dist/network/types.d.ts +282 -0
- package/dist/network/types.d.ts.map +1 -0
- package/dist/network/types.js +31 -0
- package/dist/network/types.js.map +1 -0
- package/dist/notifications/index.d.ts +161 -0
- package/dist/notifications/index.d.ts.map +1 -0
- package/dist/notifications/index.js +341 -0
- package/dist/notifications/index.js.map +1 -0
- package/dist/organization/index.d.ts +125 -0
- package/dist/organization/index.d.ts.map +1 -0
- package/dist/organization/index.js +237 -0
- package/dist/organization/index.js.map +1 -0
- package/dist/permissions/elevated-commands.d.ts +38 -0
- package/dist/permissions/elevated-commands.d.ts.map +1 -0
- package/dist/permissions/elevated-commands.js +256 -0
- package/dist/permissions/elevated-commands.js.map +1 -0
- package/dist/permissions/index.d.ts +120 -0
- package/dist/permissions/index.d.ts.map +1 -0
- package/dist/permissions/index.js +689 -0
- package/dist/permissions/index.js.map +1 -0
- package/dist/permissions/rule-parser.d.ts +396 -0
- package/dist/permissions/rule-parser.d.ts.map +1 -0
- package/dist/permissions/rule-parser.js +990 -0
- package/dist/permissions/rule-parser.js.map +1 -0
- package/dist/permissions/rule-parser.test.d.ts +15 -0
- package/dist/permissions/rule-parser.test.d.ts.map +1 -0
- package/dist/permissions/rule-parser.test.js +489 -0
- package/dist/permissions/rule-parser.test.js.map +1 -0
- package/dist/permissions/shell-security.d.ts +128 -0
- package/dist/permissions/shell-security.d.ts.map +1 -0
- package/dist/permissions/shell-security.js +669 -0
- package/dist/permissions/shell-security.js.map +1 -0
- package/dist/permissions/shell-security.test.d.ts +7 -0
- package/dist/permissions/shell-security.test.d.ts.map +1 -0
- package/dist/permissions/shell-security.test.js +286 -0
- package/dist/permissions/shell-security.test.js.map +1 -0
- package/dist/permissions/tools.d.ts +255 -0
- package/dist/permissions/tools.d.ts.map +1 -0
- package/dist/permissions/tools.js +733 -0
- package/dist/permissions/tools.js.map +1 -0
- package/dist/permissions/tools.test.d.ts +11 -0
- package/dist/permissions/tools.test.d.ts.map +1 -0
- package/dist/permissions/tools.test.js +530 -0
- package/dist/permissions/tools.test.js.map +1 -0
- package/dist/permissions/ui-integration.d.ts +69 -0
- package/dist/permissions/ui-integration.d.ts.map +1 -0
- package/dist/permissions/ui-integration.js +129 -0
- package/dist/permissions/ui-integration.js.map +1 -0
- package/dist/permissions/ui.d.ts +188 -0
- package/dist/permissions/ui.d.ts.map +1 -0
- package/dist/permissions/ui.js +590 -0
- package/dist/permissions/ui.js.map +1 -0
- package/dist/plan/comparison.d.ts +67 -0
- package/dist/plan/comparison.d.ts.map +1 -0
- package/dist/plan/comparison.js +451 -0
- package/dist/plan/comparison.js.map +1 -0
- package/dist/plan/index.d.ts +91 -0
- package/dist/plan/index.d.ts.map +1 -0
- package/dist/plan/index.js +151 -0
- package/dist/plan/index.js.map +1 -0
- package/dist/plan/persistence.d.ts +131 -0
- package/dist/plan/persistence.d.ts.map +1 -0
- package/dist/plan/persistence.js +781 -0
- package/dist/plan/persistence.js.map +1 -0
- package/dist/plan/types.d.ts +353 -0
- package/dist/plan/types.d.ts.map +1 -0
- package/dist/plan/types.js +6 -0
- package/dist/plan/types.js.map +1 -0
- package/dist/plugins/cli.d.ts +14 -0
- package/dist/plugins/cli.d.ts.map +1 -0
- package/dist/plugins/cli.js +1050 -0
- package/dist/plugins/cli.js.map +1 -0
- package/dist/plugins/index.d.ts +621 -0
- package/dist/plugins/index.d.ts.map +1 -0
- package/dist/plugins/index.js +1978 -0
- package/dist/plugins/index.js.map +1 -0
- package/dist/plugins/marketplace.d.ts +120 -0
- package/dist/plugins/marketplace.d.ts.map +1 -0
- package/dist/plugins/marketplace.js +630 -0
- package/dist/plugins/marketplace.js.map +1 -0
- package/dist/prompt/attachments.d.ts +94 -0
- package/dist/prompt/attachments.d.ts.map +1 -0
- package/dist/prompt/attachments.js +486 -0
- package/dist/prompt/attachments.js.map +1 -0
- package/dist/prompt/builder.d.ts +45 -0
- package/dist/prompt/builder.d.ts.map +1 -0
- package/dist/prompt/builder.js +298 -0
- package/dist/prompt/builder.js.map +1 -0
- package/dist/prompt/cache.d.ts +71 -0
- package/dist/prompt/cache.d.ts.map +1 -0
- package/dist/prompt/cache.js +150 -0
- package/dist/prompt/cache.js.map +1 -0
- package/dist/prompt/index.d.ts +10 -0
- package/dist/prompt/index.d.ts.map +1 -0
- package/dist/prompt/index.js +9 -0
- package/dist/prompt/index.js.map +1 -0
- package/dist/prompt/templates.d.ts +216 -0
- package/dist/prompt/templates.d.ts.map +1 -0
- package/dist/prompt/templates.js +670 -0
- package/dist/prompt/templates.js.map +1 -0
- package/dist/prompt/types.d.ts +234 -0
- package/dist/prompt/types.d.ts.map +1 -0
- package/dist/prompt/types.js +19 -0
- package/dist/prompt/types.js.map +1 -0
- package/dist/providers/cli.d.ts +14 -0
- package/dist/providers/cli.d.ts.map +1 -0
- package/dist/providers/cli.js +466 -0
- package/dist/providers/cli.js.map +1 -0
- package/dist/providers/index.d.ts +128 -0
- package/dist/providers/index.d.ts.map +1 -0
- package/dist/providers/index.js +662 -0
- package/dist/providers/index.js.map +1 -0
- package/dist/providers/vertex.d.ts +174 -0
- package/dist/providers/vertex.d.ts.map +1 -0
- package/dist/providers/vertex.js +499 -0
- package/dist/providers/vertex.js.map +1 -0
- package/dist/proxy/ollama-adapter.d.ts +41 -0
- package/dist/proxy/ollama-adapter.d.ts.map +1 -0
- package/dist/proxy/ollama-adapter.js +669 -0
- package/dist/proxy/ollama-adapter.js.map +1 -0
- package/dist/proxy/server.d.ts +63 -0
- package/dist/proxy/server.d.ts.map +1 -0
- package/dist/proxy/server.js +1160 -0
- package/dist/proxy/server.js.map +1 -0
- package/dist/proxy-cli.d.ts +19 -0
- package/dist/proxy-cli.d.ts.map +1 -0
- package/dist/proxy-cli.js +308 -0
- package/dist/proxy-cli.js.map +1 -0
- package/dist/ratelimit/index.d.ts +252 -0
- package/dist/ratelimit/index.d.ts.map +1 -0
- package/dist/ratelimit/index.js +580 -0
- package/dist/ratelimit/index.js.map +1 -0
- package/dist/renderer/index.d.ts +75 -0
- package/dist/renderer/index.d.ts.map +1 -0
- package/dist/renderer/index.js +383 -0
- package/dist/renderer/index.js.map +1 -0
- package/dist/renderer/tree-render.d.ts +172 -0
- package/dist/renderer/tree-render.d.ts.map +1 -0
- package/dist/renderer/tree-render.js +397 -0
- package/dist/renderer/tree-render.js.map +1 -0
- package/dist/rewind/fileHistory.d.ts +140 -0
- package/dist/rewind/fileHistory.d.ts.map +1 -0
- package/dist/rewind/fileHistory.js +326 -0
- package/dist/rewind/fileHistory.js.map +1 -0
- package/dist/rewind/index.d.ts +8 -0
- package/dist/rewind/index.d.ts.map +1 -0
- package/dist/rewind/index.js +8 -0
- package/dist/rewind/index.js.map +1 -0
- package/dist/rewind/rewindManager.d.ts +98 -0
- package/dist/rewind/rewindManager.d.ts.map +1 -0
- package/dist/rewind/rewindManager.js +199 -0
- package/dist/rewind/rewindManager.js.map +1 -0
- package/dist/rules/index.d.ts +69 -0
- package/dist/rules/index.d.ts.map +1 -0
- package/dist/rules/index.js +410 -0
- package/dist/rules/index.js.map +1 -0
- package/dist/sandbox/bubblewrap.d.ts +157 -0
- package/dist/sandbox/bubblewrap.d.ts.map +1 -0
- package/dist/sandbox/bubblewrap.js +637 -0
- package/dist/sandbox/bubblewrap.js.map +1 -0
- package/dist/sandbox/config.d.ts +497 -0
- package/dist/sandbox/config.d.ts.map +1 -0
- package/dist/sandbox/config.js +696 -0
- package/dist/sandbox/config.js.map +1 -0
- package/dist/sandbox/docker.d.ts +104 -0
- package/dist/sandbox/docker.d.ts.map +1 -0
- package/dist/sandbox/docker.js +347 -0
- package/dist/sandbox/docker.js.map +1 -0
- package/dist/sandbox/executor.d.ts +68 -0
- package/dist/sandbox/executor.d.ts.map +1 -0
- package/dist/sandbox/executor.js +341 -0
- package/dist/sandbox/executor.js.map +1 -0
- package/dist/sandbox/filesystem.d.ts +146 -0
- package/dist/sandbox/filesystem.d.ts.map +1 -0
- package/dist/sandbox/filesystem.js +501 -0
- package/dist/sandbox/filesystem.js.map +1 -0
- package/dist/sandbox/index.d.ts +21 -0
- package/dist/sandbox/index.d.ts.map +1 -0
- package/dist/sandbox/index.js +21 -0
- package/dist/sandbox/index.js.map +1 -0
- package/dist/sandbox/network.d.ts +174 -0
- package/dist/sandbox/network.d.ts.map +1 -0
- package/dist/sandbox/network.js +487 -0
- package/dist/sandbox/network.js.map +1 -0
- package/dist/sandbox/resource-limits.d.ts +83 -0
- package/dist/sandbox/resource-limits.d.ts.map +1 -0
- package/dist/sandbox/resource-limits.js +305 -0
- package/dist/sandbox/resource-limits.js.map +1 -0
- package/dist/sandbox/seatbelt.d.ts +70 -0
- package/dist/sandbox/seatbelt.d.ts.map +1 -0
- package/dist/sandbox/seatbelt.js +256 -0
- package/dist/sandbox/seatbelt.js.map +1 -0
- package/dist/search/ripgrep.d.ts +82 -0
- package/dist/search/ripgrep.d.ts.map +1 -0
- package/dist/search/ripgrep.js +399 -0
- package/dist/search/ripgrep.js.map +1 -0
- package/dist/security/skill-scanner.d.ts +18 -0
- package/dist/security/skill-scanner.d.ts.map +1 -0
- package/dist/security/skill-scanner.js +115 -0
- package/dist/security/skill-scanner.js.map +1 -0
- package/dist/session/cleanup.d.ts +62 -0
- package/dist/session/cleanup.d.ts.map +1 -0
- package/dist/session/cleanup.js +218 -0
- package/dist/session/cleanup.js.map +1 -0
- package/dist/session/index.d.ts +584 -0
- package/dist/session/index.d.ts.map +1 -0
- package/dist/session/index.js +1910 -0
- package/dist/session/index.js.map +1 -0
- package/dist/session/list.d.ts +150 -0
- package/dist/session/list.d.ts.map +1 -0
- package/dist/session/list.js +807 -0
- package/dist/session/list.js.map +1 -0
- package/dist/session/resume.d.ts +103 -0
- package/dist/session/resume.d.ts.map +1 -0
- package/dist/session/resume.js +173 -0
- package/dist/session/resume.js.map +1 -0
- package/dist/skills/builtin/skill-hub/SKILL.md +51 -0
- package/dist/skills/builtin/tool-discovery/SKILL.md +194 -0
- package/dist/skills/hub.d.ts +54 -0
- package/dist/skills/hub.d.ts.map +1 -0
- package/dist/skills/hub.js +251 -0
- package/dist/skills/hub.js.map +1 -0
- package/dist/streaming/index.d.ts +115 -0
- package/dist/streaming/index.d.ts.map +1 -0
- package/dist/streaming/index.js +249 -0
- package/dist/streaming/index.js.map +1 -0
- package/dist/streaming/message-stream.d.ts +237 -0
- package/dist/streaming/message-stream.d.ts.map +1 -0
- package/dist/streaming/message-stream.js +480 -0
- package/dist/streaming/message-stream.js.map +1 -0
- package/dist/streaming/sse.d.ts +94 -0
- package/dist/streaming/sse.d.ts.map +1 -0
- package/dist/streaming/sse.js +314 -0
- package/dist/streaming/sse.js.map +1 -0
- package/dist/teams/index.d.ts +7 -0
- package/dist/teams/index.d.ts.map +1 -0
- package/dist/teams/index.js +7 -0
- package/dist/teams/index.js.map +1 -0
- package/dist/teams/storage.d.ts +94 -0
- package/dist/teams/storage.d.ts.map +1 -0
- package/dist/teams/storage.js +350 -0
- package/dist/teams/storage.js.map +1 -0
- package/dist/teams/tmux.d.ts +122 -0
- package/dist/teams/tmux.d.ts.map +1 -0
- package/dist/teams/tmux.js +419 -0
- package/dist/teams/tmux.js.map +1 -0
- package/dist/teams/types.d.ts +139 -0
- package/dist/teams/types.d.ts.map +1 -0
- package/dist/teams/types.js +8 -0
- package/dist/teams/types.js.map +1 -0
- package/dist/telemetry/index.d.ts +215 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +776 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/teleport/index.d.ts +43 -0
- package/dist/teleport/index.d.ts.map +1 -0
- package/dist/teleport/index.js +71 -0
- package/dist/teleport/index.js.map +1 -0
- package/dist/teleport/session.d.ts +78 -0
- package/dist/teleport/session.d.ts.map +1 -0
- package/dist/teleport/session.js +273 -0
- package/dist/teleport/session.js.map +1 -0
- package/dist/teleport/types.d.ts +93 -0
- package/dist/teleport/types.d.ts.map +1 -0
- package/dist/teleport/types.js +6 -0
- package/dist/teleport/types.js.map +1 -0
- package/dist/teleport/validation.d.ts +30 -0
- package/dist/teleport/validation.d.ts.map +1 -0
- package/dist/teleport/validation.js +124 -0
- package/dist/teleport/validation.js.map +1 -0
- package/dist/tools/agent-teams.d.ts +26 -0
- package/dist/tools/agent-teams.d.ts.map +1 -0
- package/dist/tools/agent-teams.js +171 -0
- package/dist/tools/agent-teams.js.map +1 -0
- package/dist/tools/agent.d.ts +223 -0
- package/dist/tools/agent.d.ts.map +1 -0
- package/dist/tools/agent.js +1540 -0
- package/dist/tools/agent.js.map +1 -0
- package/dist/tools/ask.d.ts +87 -0
- package/dist/tools/ask.d.ts.map +1 -0
- package/dist/tools/ask.js +572 -0
- package/dist/tools/ask.js.map +1 -0
- package/dist/tools/base.d.ts +89 -0
- package/dist/tools/base.d.ts.map +1 -0
- package/dist/tools/base.js +199 -0
- package/dist/tools/base.js.map +1 -0
- package/dist/tools/bash-history.d.ts +83 -0
- package/dist/tools/bash-history.d.ts.map +1 -0
- package/dist/tools/bash-history.js +245 -0
- package/dist/tools/bash-history.js.map +1 -0
- package/dist/tools/bash.d.ts +214 -0
- package/dist/tools/bash.d.ts.map +1 -0
- package/dist/tools/bash.js +1823 -0
- package/dist/tools/bash.js.map +1 -0
- package/dist/tools/blueprint.d.ts +91 -0
- package/dist/tools/blueprint.d.ts.map +1 -0
- package/dist/tools/blueprint.js +618 -0
- package/dist/tools/blueprint.js.map +1 -0
- package/dist/tools/browser.d.ts +28 -0
- package/dist/tools/browser.d.ts.map +1 -0
- package/dist/tools/browser.js +776 -0
- package/dist/tools/browser.js.map +1 -0
- package/dist/tools/create-tool.d.ts +63 -0
- package/dist/tools/create-tool.d.ts.map +1 -0
- package/dist/tools/create-tool.js +230 -0
- package/dist/tools/create-tool.js.map +1 -0
- package/dist/tools/database.d.ts +12 -0
- package/dist/tools/database.d.ts.map +1 -0
- package/dist/tools/database.js +223 -0
- package/dist/tools/database.js.map +1 -0
- package/dist/tools/dispatch-worker.d.ts +46 -0
- package/dist/tools/dispatch-worker.d.ts.map +1 -0
- package/dist/tools/dispatch-worker.js +276 -0
- package/dist/tools/dispatch-worker.js.map +1 -0
- package/dist/tools/ear.d.ts +25 -0
- package/dist/tools/ear.d.ts.map +1 -0
- package/dist/tools/ear.js +43 -0
- package/dist/tools/ear.js.map +1 -0
- package/dist/tools/eye.d.ts +29 -0
- package/dist/tools/eye.d.ts.map +1 -0
- package/dist/tools/eye.js +104 -0
- package/dist/tools/eye.js.map +1 -0
- package/dist/tools/file.d.ts +164 -0
- package/dist/tools/file.d.ts.map +1 -0
- package/dist/tools/file.js +1638 -0
- package/dist/tools/file.js.map +1 -0
- package/dist/tools/generate-blueprint.d.ts +62 -0
- package/dist/tools/generate-blueprint.d.ts.map +1 -0
- package/dist/tools/generate-blueprint.js +141 -0
- package/dist/tools/generate-blueprint.js.map +1 -0
- package/dist/tools/generate-design.d.ts +27 -0
- package/dist/tools/generate-design.d.ts.map +1 -0
- package/dist/tools/generate-design.js +66 -0
- package/dist/tools/generate-design.js.map +1 -0
- package/dist/tools/goal.d.ts +56 -0
- package/dist/tools/goal.d.ts.map +1 -0
- package/dist/tools/goal.js +298 -0
- package/dist/tools/goal.js.map +1 -0
- package/dist/tools/index.d.ts +53 -0
- package/dist/tools/index.d.ts.map +1 -0
- package/dist/tools/index.js +183 -0
- package/dist/tools/index.js.map +1 -0
- package/dist/tools/mcp-manage.d.ts +32 -0
- package/dist/tools/mcp-manage.d.ts.map +1 -0
- package/dist/tools/mcp-manage.js +61 -0
- package/dist/tools/mcp-manage.js.map +1 -0
- package/dist/tools/mcp.d.ts +311 -0
- package/dist/tools/mcp.d.ts.map +1 -0
- package/dist/tools/mcp.js +1696 -0
- package/dist/tools/mcp.js.map +1 -0
- package/dist/tools/memory-search.d.ts +26 -0
- package/dist/tools/memory-search.d.ts.map +1 -0
- package/dist/tools/memory-search.js +89 -0
- package/dist/tools/memory-search.js.map +1 -0
- package/dist/tools/network-agent.d.ts +55 -0
- package/dist/tools/network-agent.d.ts.map +1 -0
- package/dist/tools/network-agent.js +349 -0
- package/dist/tools/network-agent.js.map +1 -0
- package/dist/tools/notebook-write.d.ts +23 -0
- package/dist/tools/notebook-write.d.ts.map +1 -0
- package/dist/tools/notebook-write.js +86 -0
- package/dist/tools/notebook-write.js.map +1 -0
- package/dist/tools/notebook.d.ts +46 -0
- package/dist/tools/notebook.d.ts.map +1 -0
- package/dist/tools/notebook.js +335 -0
- package/dist/tools/notebook.js.map +1 -0
- package/dist/tools/output-persistence.d.ts +73 -0
- package/dist/tools/output-persistence.d.ts.map +1 -0
- package/dist/tools/output-persistence.js +258 -0
- package/dist/tools/output-persistence.js.map +1 -0
- package/dist/tools/planmode.d.ts +73 -0
- package/dist/tools/planmode.d.ts.map +1 -0
- package/dist/tools/planmode.js +464 -0
- package/dist/tools/planmode.js.map +1 -0
- package/dist/tools/sandbox.d.ts +192 -0
- package/dist/tools/sandbox.d.ts.map +1 -0
- package/dist/tools/sandbox.js +932 -0
- package/dist/tools/sandbox.js.map +1 -0
- package/dist/tools/schedule.d.ts +65 -0
- package/dist/tools/schedule.d.ts.map +1 -0
- package/dist/tools/schedule.js +537 -0
- package/dist/tools/schedule.js.map +1 -0
- package/dist/tools/search.d.ts +48 -0
- package/dist/tools/search.d.ts.map +1 -0
- package/dist/tools/search.js +568 -0
- package/dist/tools/search.js.map +1 -0
- package/dist/tools/self-evolve.d.ts +53 -0
- package/dist/tools/self-evolve.d.ts.map +1 -0
- package/dist/tools/self-evolve.js +241 -0
- package/dist/tools/self-evolve.js.map +1 -0
- package/dist/tools/skill.d.ts +182 -0
- package/dist/tools/skill.d.ts.map +1 -0
- package/dist/tools/skill.js +1274 -0
- package/dist/tools/skill.js.map +1 -0
- package/dist/tools/start-lead-agent.d.ts +103 -0
- package/dist/tools/start-lead-agent.d.ts.map +1 -0
- package/dist/tools/start-lead-agent.js +243 -0
- package/dist/tools/start-lead-agent.js.map +1 -0
- package/dist/tools/structured-output.d.ts +80 -0
- package/dist/tools/structured-output.d.ts.map +1 -0
- package/dist/tools/structured-output.js +113 -0
- package/dist/tools/structured-output.js.map +1 -0
- package/dist/tools/submit-e2e-result.d.ts +57 -0
- package/dist/tools/submit-e2e-result.d.ts.map +1 -0
- package/dist/tools/submit-e2e-result.js +161 -0
- package/dist/tools/submit-e2e-result.js.map +1 -0
- package/dist/tools/submit-review.d.ts +42 -0
- package/dist/tools/submit-review.d.ts.map +1 -0
- package/dist/tools/submit-review.js +122 -0
- package/dist/tools/submit-review.js.map +1 -0
- package/dist/tools/task-status.d.ts +33 -0
- package/dist/tools/task-status.d.ts.map +1 -0
- package/dist/tools/task-status.js +86 -0
- package/dist/tools/task-status.js.map +1 -0
- package/dist/tools/task-storage.d.ts +165 -0
- package/dist/tools/task-storage.d.ts.map +1 -0
- package/dist/tools/task-storage.js +354 -0
- package/dist/tools/task-storage.js.map +1 -0
- package/dist/tools/task-v2.d.ts +38 -0
- package/dist/tools/task-v2.d.ts.map +1 -0
- package/dist/tools/task-v2.js +472 -0
- package/dist/tools/task-v2.js.map +1 -0
- package/dist/tools/team.d.ts +51 -0
- package/dist/tools/team.d.ts.map +1 -0
- package/dist/tools/team.js +441 -0
- package/dist/tools/team.js.map +1 -0
- package/dist/tools/todo.d.ts +30 -0
- package/dist/tools/todo.d.ts.map +1 -0
- package/dist/tools/todo.js +204 -0
- package/dist/tools/todo.js.map +1 -0
- package/dist/tools/trigger-e2e-test.d.ts +62 -0
- package/dist/tools/trigger-e2e-test.d.ts.map +1 -0
- package/dist/tools/trigger-e2e-test.js +228 -0
- package/dist/tools/trigger-e2e-test.js.map +1 -0
- package/dist/tools/update-task-plan.d.ts +43 -0
- package/dist/tools/update-task-plan.d.ts.map +1 -0
- package/dist/tools/update-task-plan.js +214 -0
- package/dist/tools/update-task-plan.js.map +1 -0
- package/dist/tools/web.d.ts +78 -0
- package/dist/tools/web.d.ts.map +1 -0
- package/dist/tools/web.js +535 -0
- package/dist/tools/web.js.map +1 -0
- package/dist/trust/index.d.ts +165 -0
- package/dist/trust/index.d.ts.map +1 -0
- package/dist/trust/index.js +408 -0
- package/dist/trust/index.js.map +1 -0
- package/dist/types/config.d.ts +1259 -0
- package/dist/types/config.d.ts.map +1 -0
- package/dist/types/config.js +245 -0
- package/dist/types/config.js.map +1 -0
- package/dist/types/errors.d.ts +389 -0
- package/dist/types/errors.d.ts.map +1 -0
- package/dist/types/errors.js +670 -0
- package/dist/types/errors.js.map +1 -0
- package/dist/types/index.d.ts +30 -0
- package/dist/types/index.d.ts.map +1 -0
- package/dist/types/index.js +26 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/messages.d.ts +761 -0
- package/dist/types/messages.d.ts.map +1 -0
- package/dist/types/messages.js +10 -0
- package/dist/types/messages.js.map +1 -0
- package/dist/types/results.d.ts +583 -0
- package/dist/types/results.d.ts.map +1 -0
- package/dist/types/results.js +111 -0
- package/dist/types/results.js.map +1 -0
- package/dist/types/tools.d.ts +734 -0
- package/dist/types/tools.d.ts.map +1 -0
- package/dist/types/tools.js +9 -0
- package/dist/types/tools.js.map +1 -0
- package/dist/ui/App.d.ts +17 -0
- package/dist/ui/App.d.ts.map +1 -0
- package/dist/ui/App.js +977 -0
- package/dist/ui/App.js.map +1 -0
- package/dist/ui/ChromeSettings.d.ts +18 -0
- package/dist/ui/ChromeSettings.d.ts.map +1 -0
- package/dist/ui/ChromeSettings.js +224 -0
- package/dist/ui/ChromeSettings.js.map +1 -0
- package/dist/ui/LoginSelector.d.ts +29 -0
- package/dist/ui/LoginSelector.d.ts.map +1 -0
- package/dist/ui/LoginSelector.js +168 -0
- package/dist/ui/LoginSelector.js.map +1 -0
- package/dist/ui/McpSettings.d.ts +29 -0
- package/dist/ui/McpSettings.d.ts.map +1 -0
- package/dist/ui/McpSettings.js +689 -0
- package/dist/ui/McpSettings.js.map +1 -0
- package/dist/ui/PluginsDialog.d.ts +21 -0
- package/dist/ui/PluginsDialog.d.ts.map +1 -0
- package/dist/ui/PluginsDialog.js +923 -0
- package/dist/ui/PluginsDialog.js.map +1 -0
- package/dist/ui/autocomplete/bash-history.d.ts +58 -0
- package/dist/ui/autocomplete/bash-history.d.ts.map +1 -0
- package/dist/ui/autocomplete/bash-history.js +196 -0
- package/dist/ui/autocomplete/bash-history.js.map +1 -0
- package/dist/ui/autocomplete/commands.d.ts +25 -0
- package/dist/ui/autocomplete/commands.d.ts.map +1 -0
- package/dist/ui/autocomplete/commands.js +535 -0
- package/dist/ui/autocomplete/commands.js.map +1 -0
- package/dist/ui/autocomplete/example.d.ts +10 -0
- package/dist/ui/autocomplete/example.d.ts.map +1 -0
- package/dist/ui/autocomplete/example.js +118 -0
- package/dist/ui/autocomplete/example.js.map +1 -0
- package/dist/ui/autocomplete/files.d.ts +27 -0
- package/dist/ui/autocomplete/files.d.ts.map +1 -0
- package/dist/ui/autocomplete/files.js +127 -0
- package/dist/ui/autocomplete/files.js.map +1 -0
- package/dist/ui/autocomplete/index.d.ts +25 -0
- package/dist/ui/autocomplete/index.d.ts.map +1 -0
- package/dist/ui/autocomplete/index.js +85 -0
- package/dist/ui/autocomplete/index.js.map +1 -0
- package/dist/ui/autocomplete/mentions.d.ts +29 -0
- package/dist/ui/autocomplete/mentions.d.ts.map +1 -0
- package/dist/ui/autocomplete/mentions.js +170 -0
- package/dist/ui/autocomplete/mentions.js.map +1 -0
- package/dist/ui/autocomplete/types.d.ts +58 -0
- package/dist/ui/autocomplete/types.d.ts.map +1 -0
- package/dist/ui/autocomplete/types.js +110 -0
- package/dist/ui/autocomplete/types.js.map +1 -0
- package/dist/ui/components/AxonMdImportDialog.d.ts +79 -0
- package/dist/ui/components/AxonMdImportDialog.d.ts.map +1 -0
- package/dist/ui/components/AxonMdImportDialog.js +420 -0
- package/dist/ui/components/AxonMdImportDialog.js.map +1 -0
- package/dist/ui/components/BackgroundTasksPanel.d.ts +16 -0
- package/dist/ui/components/BackgroundTasksPanel.d.ts.map +1 -0
- package/dist/ui/components/BackgroundTasksPanel.js +90 -0
- package/dist/ui/components/BackgroundTasksPanel.js.map +1 -0
- package/dist/ui/components/BreathingLight.d.ts +68 -0
- package/dist/ui/components/BreathingLight.d.ts.map +1 -0
- package/dist/ui/components/BreathingLight.js +110 -0
- package/dist/ui/components/BreathingLight.js.map +1 -0
- package/dist/ui/components/DiffView.d.ts +21 -0
- package/dist/ui/components/DiffView.d.ts.map +1 -0
- package/dist/ui/components/DiffView.js +387 -0
- package/dist/ui/components/DiffView.js.map +1 -0
- package/dist/ui/components/Header.d.ts +38 -0
- package/dist/ui/components/Header.d.ts.map +1 -0
- package/dist/ui/components/Header.js +163 -0
- package/dist/ui/components/Header.js.map +1 -0
- package/dist/ui/components/HistorySearch.d.ts +18 -0
- package/dist/ui/components/HistorySearch.d.ts.map +1 -0
- package/dist/ui/components/HistorySearch.js +59 -0
- package/dist/ui/components/HistorySearch.js.map +1 -0
- package/dist/ui/components/HiveConsole.d.ts +45 -0
- package/dist/ui/components/HiveConsole.d.ts.map +1 -0
- package/dist/ui/components/HiveConsole.js +166 -0
- package/dist/ui/components/HiveConsole.js.map +1 -0
- package/dist/ui/components/HiveConsole.test.d.ts +8 -0
- package/dist/ui/components/HiveConsole.test.d.ts.map +1 -0
- package/dist/ui/components/HiveConsole.test.js +330 -0
- package/dist/ui/components/HiveConsole.test.js.map +1 -0
- package/dist/ui/components/Input.d.ts +25 -0
- package/dist/ui/components/Input.d.ts.map +1 -0
- package/dist/ui/components/Input.js +1097 -0
- package/dist/ui/components/Input.js.map +1 -0
- package/dist/ui/components/Message.d.ts +18 -0
- package/dist/ui/components/Message.d.ts.map +1 -0
- package/dist/ui/components/Message.js +212 -0
- package/dist/ui/components/Message.js.map +1 -0
- package/dist/ui/components/MessageSelector.d.ts +66 -0
- package/dist/ui/components/MessageSelector.d.ts.map +1 -0
- package/dist/ui/components/MessageSelector.js +272 -0
- package/dist/ui/components/MessageSelector.js.map +1 -0
- package/dist/ui/components/ModelSelector.d.ts +27 -0
- package/dist/ui/components/ModelSelector.d.ts.map +1 -0
- package/dist/ui/components/ModelSelector.js +135 -0
- package/dist/ui/components/ModelSelector.js.map +1 -0
- package/dist/ui/components/PermissionPrompt.d.ts +44 -0
- package/dist/ui/components/PermissionPrompt.d.ts.map +1 -0
- package/dist/ui/components/PermissionPrompt.js +416 -0
- package/dist/ui/components/PermissionPrompt.js.map +1 -0
- package/dist/ui/components/ProgressBar.d.ts +61 -0
- package/dist/ui/components/ProgressBar.d.ts.map +1 -0
- package/dist/ui/components/ProgressBar.js +174 -0
- package/dist/ui/components/ProgressBar.js.map +1 -0
- package/dist/ui/components/ResumeSession.d.ts +27 -0
- package/dist/ui/components/ResumeSession.d.ts.map +1 -0
- package/dist/ui/components/ResumeSession.js +330 -0
- package/dist/ui/components/ResumeSession.js.map +1 -0
- package/dist/ui/components/SelectInput.d.ts +22 -0
- package/dist/ui/components/SelectInput.d.ts.map +1 -0
- package/dist/ui/components/SelectInput.js +84 -0
- package/dist/ui/components/SelectInput.js.map +1 -0
- package/dist/ui/components/ShortcutHelp.d.ts +12 -0
- package/dist/ui/components/ShortcutHelp.d.ts.map +1 -0
- package/dist/ui/components/ShortcutHelp.js +55 -0
- package/dist/ui/components/ShortcutHelp.js.map +1 -0
- package/dist/ui/components/SkillsDialog.d.ts +12 -0
- package/dist/ui/components/SkillsDialog.d.ts.map +1 -0
- package/dist/ui/components/SkillsDialog.js +239 -0
- package/dist/ui/components/SkillsDialog.js.map +1 -0
- package/dist/ui/components/Spinner.d.ts +81 -0
- package/dist/ui/components/Spinner.d.ts.map +1 -0
- package/dist/ui/components/Spinner.js +165 -0
- package/dist/ui/components/Spinner.js.map +1 -0
- package/dist/ui/components/StatsPanel.d.ts +20 -0
- package/dist/ui/components/StatsPanel.d.ts.map +1 -0
- package/dist/ui/components/StatsPanel.js +584 -0
- package/dist/ui/components/StatsPanel.js.map +1 -0
- package/dist/ui/components/StatusBar.d.ts +43 -0
- package/dist/ui/components/StatusBar.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.js +160 -0
- package/dist/ui/components/StatusBar.js.map +1 -0
- package/dist/ui/components/StatusBar.test.d.ts +10 -0
- package/dist/ui/components/StatusBar.test.d.ts.map +1 -0
- package/dist/ui/components/StatusBar.test.js +70 -0
- package/dist/ui/components/StatusBar.test.js.map +1 -0
- package/dist/ui/components/TodoList.d.ts +25 -0
- package/dist/ui/components/TodoList.d.ts.map +1 -0
- package/dist/ui/components/TodoList.js +146 -0
- package/dist/ui/components/TodoList.js.map +1 -0
- package/dist/ui/components/ToolCall.d.ts +19 -0
- package/dist/ui/components/ToolCall.d.ts.map +1 -0
- package/dist/ui/components/ToolCall.js +196 -0
- package/dist/ui/components/ToolCall.js.map +1 -0
- package/dist/ui/components/TrustDialog.d.ts +35 -0
- package/dist/ui/components/TrustDialog.d.ts.map +1 -0
- package/dist/ui/components/TrustDialog.js +163 -0
- package/dist/ui/components/TrustDialog.js.map +1 -0
- package/dist/ui/components/UpdateNotification.d.ts +11 -0
- package/dist/ui/components/UpdateNotification.d.ts.map +1 -0
- package/dist/ui/components/UpdateNotification.js +66 -0
- package/dist/ui/components/UpdateNotification.js.map +1 -0
- package/dist/ui/components/WelcomeScreen.d.ts +22 -0
- package/dist/ui/components/WelcomeScreen.d.ts.map +1 -0
- package/dist/ui/components/WelcomeScreen.js +156 -0
- package/dist/ui/components/WelcomeScreen.js.map +1 -0
- package/dist/ui/components/index.d.ts +35 -0
- package/dist/ui/components/index.d.ts.map +1 -0
- package/dist/ui/components/index.js +25 -0
- package/dist/ui/components/index.js.map +1 -0
- package/dist/ui/hooks/index.d.ts +12 -0
- package/dist/ui/hooks/index.d.ts.map +1 -0
- package/dist/ui/hooks/index.js +9 -0
- package/dist/ui/hooks/index.js.map +1 -0
- package/dist/ui/hooks/useAutoScroll.d.ts +22 -0
- package/dist/ui/hooks/useAutoScroll.d.ts.map +1 -0
- package/dist/ui/hooks/useAutoScroll.js +46 -0
- package/dist/ui/hooks/useAutoScroll.js.map +1 -0
- package/dist/ui/hooks/useAxonMdImport.d.ts +57 -0
- package/dist/ui/hooks/useAxonMdImport.d.ts.map +1 -0
- package/dist/ui/hooks/useAxonMdImport.js +248 -0
- package/dist/ui/hooks/useAxonMdImport.js.map +1 -0
- package/dist/ui/hooks/useGlobalKeybindings.d.ts +60 -0
- package/dist/ui/hooks/useGlobalKeybindings.d.ts.map +1 -0
- package/dist/ui/hooks/useGlobalKeybindings.js +460 -0
- package/dist/ui/hooks/useGlobalKeybindings.js.map +1 -0
- package/dist/ui/hooks/useRewind.d.ts +44 -0
- package/dist/ui/hooks/useRewind.d.ts.map +1 -0
- package/dist/ui/hooks/useRewind.js +67 -0
- package/dist/ui/hooks/useRewind.js.map +1 -0
- package/dist/ui/hooks/useTerminalSize.d.ts +32 -0
- package/dist/ui/hooks/useTerminalSize.d.ts.map +1 -0
- package/dist/ui/hooks/useTerminalSize.js +70 -0
- package/dist/ui/hooks/useTerminalSize.js.map +1 -0
- package/dist/ui/index.d.ts +29 -0
- package/dist/ui/index.d.ts.map +1 -0
- package/dist/ui/index.js +42 -0
- package/dist/ui/index.js.map +1 -0
- package/dist/ui/ink-v2/dom-renderer.d.ts +58 -0
- package/dist/ui/ink-v2/dom-renderer.d.ts.map +1 -0
- package/dist/ui/ink-v2/dom-renderer.js +295 -0
- package/dist/ui/ink-v2/dom-renderer.js.map +1 -0
- package/dist/ui/ink-v2/frame.d.ts +25 -0
- package/dist/ui/ink-v2/frame.d.ts.map +1 -0
- package/dist/ui/ink-v2/frame.js +120 -0
- package/dist/ui/ink-v2/frame.js.map +1 -0
- package/dist/ui/ink-v2/index.d.ts +92 -0
- package/dist/ui/ink-v2/index.d.ts.map +1 -0
- package/dist/ui/ink-v2/index.js +185 -0
- package/dist/ui/ink-v2/index.js.map +1 -0
- package/dist/ui/ink-v2/output.d.ts +43 -0
- package/dist/ui/ink-v2/output.d.ts.map +1 -0
- package/dist/ui/ink-v2/output.js +154 -0
- package/dist/ui/ink-v2/output.js.map +1 -0
- package/dist/ui/ink-v2/renderer.d.ts +49 -0
- package/dist/ui/ink-v2/renderer.d.ts.map +1 -0
- package/dist/ui/ink-v2/renderer.js +411 -0
- package/dist/ui/ink-v2/renderer.js.map +1 -0
- package/dist/ui/ink-v2/screen.d.ts +65 -0
- package/dist/ui/ink-v2/screen.d.ts.map +1 -0
- package/dist/ui/ink-v2/screen.js +260 -0
- package/dist/ui/ink-v2/screen.js.map +1 -0
- package/dist/ui/ink-v2/style-pool.d.ts +28 -0
- package/dist/ui/ink-v2/style-pool.d.ts.map +1 -0
- package/dist/ui/ink-v2/style-pool.js +50 -0
- package/dist/ui/ink-v2/style-pool.js.map +1 -0
- package/dist/ui/ink-v2/types.d.ts +138 -0
- package/dist/ui/ink-v2/types.d.ts.map +1 -0
- package/dist/ui/ink-v2/types.js +11 -0
- package/dist/ui/ink-v2/types.js.map +1 -0
- package/dist/ui/markdown-renderer.d.ts +35 -0
- package/dist/ui/markdown-renderer.d.ts.map +1 -0
- package/dist/ui/markdown-renderer.js +369 -0
- package/dist/ui/markdown-renderer.js.map +1 -0
- package/dist/ui/spinner-verbs.d.ts +15 -0
- package/dist/ui/spinner-verbs.d.ts.map +1 -0
- package/dist/ui/spinner-verbs.js +75 -0
- package/dist/ui/spinner-verbs.js.map +1 -0
- package/dist/ui/utils/history-manager.d.ts +41 -0
- package/dist/ui/utils/history-manager.d.ts.map +1 -0
- package/dist/ui/utils/history-manager.js +109 -0
- package/dist/ui/utils/history-manager.js.map +1 -0
- package/dist/ui/utils/index.d.ts +9 -0
- package/dist/ui/utils/index.d.ts.map +1 -0
- package/dist/ui/utils/index.js +10 -0
- package/dist/ui/utils/index.js.map +1 -0
- package/dist/ui/utils/kitty-keyboard.d.ts +239 -0
- package/dist/ui/utils/kitty-keyboard.d.ts.map +1 -0
- package/dist/ui/utils/kitty-keyboard.js +341 -0
- package/dist/ui/utils/kitty-keyboard.js.map +1 -0
- package/dist/ui/utils/string-width.d.ts +36 -0
- package/dist/ui/utils/string-width.d.ts.map +1 -0
- package/dist/ui/utils/string-width.js +339 -0
- package/dist/ui/utils/string-width.js.map +1 -0
- package/dist/ui/utils/syntaxHighlight.d.ts +94 -0
- package/dist/ui/utils/syntaxHighlight.d.ts.map +1 -0
- package/dist/ui/utils/syntaxHighlight.js +415 -0
- package/dist/ui/utils/syntaxHighlight.js.map +1 -0
- package/dist/ui/utils/terminal.d.ts +145 -0
- package/dist/ui/utils/terminal.d.ts.map +1 -0
- package/dist/ui/utils/terminal.js +229 -0
- package/dist/ui/utils/terminal.js.map +1 -0
- package/dist/updater/index.d.ts +115 -0
- package/dist/updater/index.d.ts.map +1 -0
- package/dist/updater/index.js +546 -0
- package/dist/updater/index.js.map +1 -0
- package/dist/utils/AppError.d.ts +24 -0
- package/dist/utils/AppError.d.ts.map +1 -0
- package/dist/utils/AppError.js +33 -0
- package/dist/utils/AppError.js.map +1 -0
- package/dist/utils/AppError.test.d.ts +2 -0
- package/dist/utils/AppError.test.d.ts.map +1 -0
- package/dist/utils/AppError.test.js +257 -0
- package/dist/utils/AppError.test.js.map +1 -0
- package/dist/utils/attribution.d.ts +111 -0
- package/dist/utils/attribution.d.ts.map +1 -0
- package/dist/utils/attribution.js +219 -0
- package/dist/utils/attribution.js.map +1 -0
- package/dist/utils/editor.d.ts +19 -0
- package/dist/utils/editor.d.ts.map +1 -0
- package/dist/utils/editor.js +115 -0
- package/dist/utils/editor.js.map +1 -0
- package/dist/utils/env-check.d.ts +78 -0
- package/dist/utils/env-check.d.ts.map +1 -0
- package/dist/utils/env-check.js +114 -0
- package/dist/utils/env-check.js.map +1 -0
- package/dist/utils/error-watcher.d.ts +78 -0
- package/dist/utils/error-watcher.d.ts.map +1 -0
- package/dist/utils/error-watcher.js +355 -0
- package/dist/utils/error-watcher.js.map +1 -0
- package/dist/utils/git-helper.d.ts +55 -0
- package/dist/utils/git-helper.d.ts.map +1 -0
- package/dist/utils/git-helper.js +238 -0
- package/dist/utils/git-helper.js.map +1 -0
- package/dist/utils/index.d.ts +188 -0
- package/dist/utils/index.d.ts.map +1 -0
- package/dist/utils/index.js +472 -0
- package/dist/utils/index.js.map +1 -0
- package/dist/utils/logger.d.ts +117 -0
- package/dist/utils/logger.d.ts.map +1 -0
- package/dist/utils/logger.js +458 -0
- package/dist/utils/logger.js.map +1 -0
- package/dist/utils/package-manager.d.ts +134 -0
- package/dist/utils/package-manager.d.ts.map +1 -0
- package/dist/utils/package-manager.js +325 -0
- package/dist/utils/package-manager.js.map +1 -0
- package/dist/utils/platform.d.ts +283 -0
- package/dist/utils/platform.d.ts.map +1 -0
- package/dist/utils/platform.js +748 -0
- package/dist/utils/platform.js.map +1 -0
- package/dist/utils/pr-status.d.ts +50 -0
- package/dist/utils/pr-status.d.ts.map +1 -0
- package/dist/utils/pr-status.js +182 -0
- package/dist/utils/pr-status.js.map +1 -0
- package/dist/utils/retry.d.ts +86 -0
- package/dist/utils/retry.d.ts.map +1 -0
- package/dist/utils/retry.js +202 -0
- package/dist/utils/retry.js.map +1 -0
- package/dist/utils/temp-dir.d.ts +31 -0
- package/dist/utils/temp-dir.d.ts.map +1 -0
- package/dist/utils/temp-dir.js +141 -0
- package/dist/utils/temp-dir.js.map +1 -0
- package/dist/utils/terminal-setup.d.ts +31 -0
- package/dist/utils/terminal-setup.d.ts.map +1 -0
- package/dist/utils/terminal-setup.js +224 -0
- package/dist/utils/terminal-setup.js.map +1 -0
- package/dist/utils/terminal-tab.d.ts +15 -0
- package/dist/utils/terminal-tab.d.ts.map +1 -0
- package/dist/utils/terminal-tab.js +173 -0
- package/dist/utils/terminal-tab.js.map +1 -0
- package/dist/utils/token-estimate.d.ts +26 -0
- package/dist/utils/token-estimate.d.ts.map +1 -0
- package/dist/utils/token-estimate.js +62 -0
- package/dist/utils/token-estimate.js.map +1 -0
- package/dist/utils/truncated-buffer.d.ts +70 -0
- package/dist/utils/truncated-buffer.d.ts.map +1 -0
- package/dist/utils/truncated-buffer.js +124 -0
- package/dist/utils/truncated-buffer.js.map +1 -0
- package/dist/version.d.ts +30 -0
- package/dist/version.d.ts.map +1 -0
- package/dist/version.js +32 -0
- package/dist/version.js.map +1 -0
- package/dist/web/index.d.ts +7 -0
- package/dist/web/index.d.ts.map +1 -0
- package/dist/web/index.js +7 -0
- package/dist/web/index.js.map +1 -0
- package/dist/web/server/api-manager.d.ts +53 -0
- package/dist/web/server/api-manager.d.ts.map +1 -0
- package/dist/web/server/api-manager.js +271 -0
- package/dist/web/server/api-manager.js.map +1 -0
- package/dist/web/server/channels/adapters/discord.d.ts +41 -0
- package/dist/web/server/channels/adapters/discord.d.ts.map +1 -0
- package/dist/web/server/channels/adapters/discord.js +326 -0
- package/dist/web/server/channels/adapters/discord.js.map +1 -0
- package/dist/web/server/channels/adapters/feishu.d.ts +38 -0
- package/dist/web/server/channels/adapters/feishu.d.ts.map +1 -0
- package/dist/web/server/channels/adapters/feishu.js +442 -0
- package/dist/web/server/channels/adapters/feishu.js.map +1 -0
- package/dist/web/server/channels/adapters/slack-bot.d.ts +30 -0
- package/dist/web/server/channels/adapters/slack-bot.d.ts.map +1 -0
- package/dist/web/server/channels/adapters/slack-bot.js +226 -0
- package/dist/web/server/channels/adapters/slack-bot.js.map +1 -0
- package/dist/web/server/channels/adapters/telegram.d.ts +32 -0
- package/dist/web/server/channels/adapters/telegram.d.ts.map +1 -0
- package/dist/web/server/channels/adapters/telegram.js +261 -0
- package/dist/web/server/channels/adapters/telegram.js.map +1 -0
- package/dist/web/server/channels/adapters/whatsapp.d.ts +48 -0
- package/dist/web/server/channels/adapters/whatsapp.d.ts.map +1 -0
- package/dist/web/server/channels/adapters/whatsapp.js +316 -0
- package/dist/web/server/channels/adapters/whatsapp.js.map +1 -0
- package/dist/web/server/channels/bridge.d.ts +103 -0
- package/dist/web/server/channels/bridge.d.ts.map +1 -0
- package/dist/web/server/channels/bridge.js +728 -0
- package/dist/web/server/channels/bridge.js.map +1 -0
- package/dist/web/server/channels/index.d.ts +71 -0
- package/dist/web/server/channels/index.d.ts.map +1 -0
- package/dist/web/server/channels/index.js +307 -0
- package/dist/web/server/channels/index.js.map +1 -0
- package/dist/web/server/channels/types.d.ts +249 -0
- package/dist/web/server/channels/types.d.ts.map +1 -0
- package/dist/web/server/channels/types.js +8 -0
- package/dist/web/server/channels/types.js.map +1 -0
- package/dist/web/server/checkpoint-manager.d.ts +152 -0
- package/dist/web/server/checkpoint-manager.d.ts.map +1 -0
- package/dist/web/server/checkpoint-manager.js +359 -0
- package/dist/web/server/checkpoint-manager.js.map +1 -0
- package/dist/web/server/connectors/index.d.ts +115 -0
- package/dist/web/server/connectors/index.d.ts.map +1 -0
- package/dist/web/server/connectors/index.js +759 -0
- package/dist/web/server/connectors/index.js.map +1 -0
- package/dist/web/server/connectors/providers.d.ts +6 -0
- package/dist/web/server/connectors/providers.d.ts.map +1 -0
- package/dist/web/server/connectors/providers.js +238 -0
- package/dist/web/server/connectors/providers.js.map +1 -0
- package/dist/web/server/connectors/types.d.ts +79 -0
- package/dist/web/server/connectors/types.d.ts.map +1 -0
- package/dist/web/server/connectors/types.js +5 -0
- package/dist/web/server/connectors/types.js.map +1 -0
- package/dist/web/server/conversation.d.ts +593 -0
- package/dist/web/server/conversation.d.ts.map +1 -0
- package/dist/web/server/conversation.js +5170 -0
- package/dist/web/server/conversation.js.map +1 -0
- package/dist/web/server/database/swarm-logs.d.ts +150 -0
- package/dist/web/server/database/swarm-logs.d.ts.map +1 -0
- package/dist/web/server/database/swarm-logs.js +456 -0
- package/dist/web/server/database/swarm-logs.js.map +1 -0
- package/dist/web/server/doctor.d.ts +59 -0
- package/dist/web/server/doctor.d.ts.map +1 -0
- package/dist/web/server/doctor.js +666 -0
- package/dist/web/server/doctor.js.map +1 -0
- package/dist/web/server/evolve-state.d.ts +30 -0
- package/dist/web/server/evolve-state.d.ts.map +1 -0
- package/dist/web/server/evolve-state.js +54 -0
- package/dist/web/server/evolve-state.js.map +1 -0
- package/dist/web/server/git-manager.d.ts +373 -0
- package/dist/web/server/git-manager.d.ts.map +1 -0
- package/dist/web/server/git-manager.js +1556 -0
- package/dist/web/server/git-manager.js.map +1 -0
- package/dist/web/server/handlers/types.d.ts +95 -0
- package/dist/web/server/handlers/types.d.ts.map +1 -0
- package/dist/web/server/handlers/types.js +22 -0
- package/dist/web/server/handlers/types.js.map +1 -0
- package/dist/web/server/index.d.ts +41 -0
- package/dist/web/server/index.d.ts.map +1 -0
- package/dist/web/server/index.js +935 -0
- package/dist/web/server/index.js.map +1 -0
- package/dist/web/server/oauth-manager.d.ts +89 -0
- package/dist/web/server/oauth-manager.d.ts.map +1 -0
- package/dist/web/server/oauth-manager.js +361 -0
- package/dist/web/server/oauth-manager.js.map +1 -0
- package/dist/web/server/permission-handler.d.ts +170 -0
- package/dist/web/server/permission-handler.d.ts.map +1 -0
- package/dist/web/server/permission-handler.js +591 -0
- package/dist/web/server/permission-handler.js.map +1 -0
- package/dist/web/server/project-suggestions.d.ts +39 -0
- package/dist/web/server/project-suggestions.d.ts.map +1 -0
- package/dist/web/server/project-suggestions.js +365 -0
- package/dist/web/server/project-suggestions.js.map +1 -0
- package/dist/web/server/prompt-snippets.d.ts +92 -0
- package/dist/web/server/prompt-snippets.d.ts.map +1 -0
- package/dist/web/server/prompt-snippets.js +206 -0
- package/dist/web/server/prompt-snippets.js.map +1 -0
- package/dist/web/server/routes/__tests__/artifacts-api.test.d.ts +2 -0
- package/dist/web/server/routes/__tests__/artifacts-api.test.d.ts.map +1 -0
- package/dist/web/server/routes/__tests__/artifacts-api.test.js +572 -0
- package/dist/web/server/routes/__tests__/artifacts-api.test.js.map +1 -0
- package/dist/web/server/routes/agent-api.d.ts +7 -0
- package/dist/web/server/routes/agent-api.d.ts.map +1 -0
- package/dist/web/server/routes/agent-api.js +225 -0
- package/dist/web/server/routes/agent-api.js.map +1 -0
- package/dist/web/server/routes/ai-editor.d.ts +13 -0
- package/dist/web/server/routes/ai-editor.d.ts.map +1 -0
- package/dist/web/server/routes/ai-editor.js +2079 -0
- package/dist/web/server/routes/ai-editor.js.map +1 -0
- package/dist/web/server/routes/ai-hover.d.ts +10 -0
- package/dist/web/server/routes/ai-hover.d.ts.map +1 -0
- package/dist/web/server/routes/ai-hover.js +359 -0
- package/dist/web/server/routes/ai-hover.js.map +1 -0
- package/dist/web/server/routes/api.d.ts +7 -0
- package/dist/web/server/routes/api.d.ts.map +1 -0
- package/dist/web/server/routes/api.js +1200 -0
- package/dist/web/server/routes/api.js.map +1 -0
- package/dist/web/server/routes/artifacts-api.d.ts +15 -0
- package/dist/web/server/routes/artifacts-api.d.ts.map +1 -0
- package/dist/web/server/routes/artifacts-api.js +231 -0
- package/dist/web/server/routes/artifacts-api.js.map +1 -0
- package/dist/web/server/routes/auth.d.ts +7 -0
- package/dist/web/server/routes/auth.d.ts.map +1 -0
- package/dist/web/server/routes/auth.js +292 -0
- package/dist/web/server/routes/auth.js.map +1 -0
- package/dist/web/server/routes/autocomplete-api.d.ts +10 -0
- package/dist/web/server/routes/autocomplete-api.d.ts.map +1 -0
- package/dist/web/server/routes/autocomplete-api.js +302 -0
- package/dist/web/server/routes/autocomplete-api.js.map +1 -0
- package/dist/web/server/routes/axon-cloud.d.ts +7 -0
- package/dist/web/server/routes/axon-cloud.d.ts.map +1 -0
- package/dist/web/server/routes/axon-cloud.js +160 -0
- package/dist/web/server/routes/axon-cloud.js.map +1 -0
- package/dist/web/server/routes/blueprint-api.d.ts +459 -0
- package/dist/web/server/routes/blueprint-api.d.ts.map +1 -0
- package/dist/web/server/routes/blueprint-api.js +6057 -0
- package/dist/web/server/routes/blueprint-api.js.map +1 -0
- package/dist/web/server/routes/blueprint-requirement-api.d.ts +11 -0
- package/dist/web/server/routes/blueprint-requirement-api.d.ts.map +1 -0
- package/dist/web/server/routes/blueprint-requirement-api.js +91 -0
- package/dist/web/server/routes/blueprint-requirement-api.js.map +1 -0
- package/dist/web/server/routes/code-parser.d.ts +14 -0
- package/dist/web/server/routes/code-parser.d.ts.map +1 -0
- package/dist/web/server/routes/code-parser.js +191 -0
- package/dist/web/server/routes/code-parser.js.map +1 -0
- package/dist/web/server/routes/config-api.d.ts +14 -0
- package/dist/web/server/routes/config-api.d.ts.map +1 -0
- package/dist/web/server/routes/config-api.js +670 -0
- package/dist/web/server/routes/config-api.js.map +1 -0
- package/dist/web/server/routes/connectors-api.d.ts +7 -0
- package/dist/web/server/routes/connectors-api.d.ts.map +1 -0
- package/dist/web/server/routes/connectors-api.js +267 -0
- package/dist/web/server/routes/connectors-api.js.map +1 -0
- package/dist/web/server/routes/data-flow-analyzer.d.ts +60 -0
- package/dist/web/server/routes/data-flow-analyzer.d.ts.map +1 -0
- package/dist/web/server/routes/data-flow-analyzer.js +220 -0
- package/dist/web/server/routes/data-flow-analyzer.js.map +1 -0
- package/dist/web/server/routes/download-proxy.d.ts +16 -0
- package/dist/web/server/routes/download-proxy.d.ts.map +1 -0
- package/dist/web/server/routes/download-proxy.js +114 -0
- package/dist/web/server/routes/download-proxy.js.map +1 -0
- package/dist/web/server/routes/file-api.d.ts +18 -0
- package/dist/web/server/routes/file-api.d.ts.map +1 -0
- package/dist/web/server/routes/file-api.js +1514 -0
- package/dist/web/server/routes/file-api.js.map +1 -0
- package/dist/web/server/routes/lsp-analyzer.d.ts +76 -0
- package/dist/web/server/routes/lsp-analyzer.d.ts.map +1 -0
- package/dist/web/server/routes/lsp-analyzer.js +457 -0
- package/dist/web/server/routes/lsp-analyzer.js.map +1 -0
- package/dist/web/server/routes/lsp-api.d.ts +8 -0
- package/dist/web/server/routes/lsp-api.d.ts.map +1 -0
- package/dist/web/server/routes/lsp-api.js +283 -0
- package/dist/web/server/routes/lsp-api.js.map +1 -0
- package/dist/web/server/routes/mcp-cli-api.d.ts +19 -0
- package/dist/web/server/routes/mcp-cli-api.d.ts.map +1 -0
- package/dist/web/server/routes/mcp-cli-api.js +223 -0
- package/dist/web/server/routes/mcp-cli-api.js.map +1 -0
- package/dist/web/server/routes/network-api.d.ts +8 -0
- package/dist/web/server/routes/network-api.d.ts.map +1 -0
- package/dist/web/server/routes/network-api.js +367 -0
- package/dist/web/server/routes/network-api.js.map +1 -0
- package/dist/web/server/routes/notebook-api.d.ts +12 -0
- package/dist/web/server/routes/notebook-api.d.ts.map +1 -0
- package/dist/web/server/routes/notebook-api.js +164 -0
- package/dist/web/server/routes/notebook-api.js.map +1 -0
- package/dist/web/server/routes/port-forward.d.ts +20 -0
- package/dist/web/server/routes/port-forward.d.ts.map +1 -0
- package/dist/web/server/routes/port-forward.js +155 -0
- package/dist/web/server/routes/port-forward.js.map +1 -0
- package/dist/web/server/routes/project-map-generator.d.ts +126 -0
- package/dist/web/server/routes/project-map-generator.d.ts.map +1 -0
- package/dist/web/server/routes/project-map-generator.js +800 -0
- package/dist/web/server/routes/project-map-generator.js.map +1 -0
- package/dist/web/server/routes/schedule-api.d.ts +7 -0
- package/dist/web/server/routes/schedule-api.d.ts.map +1 -0
- package/dist/web/server/routes/schedule-api.js +324 -0
- package/dist/web/server/routes/schedule-api.js.map +1 -0
- package/dist/web/server/routes/symbol-classifier.d.ts +71 -0
- package/dist/web/server/routes/symbol-classifier.d.ts.map +1 -0
- package/dist/web/server/routes/symbol-classifier.js +190 -0
- package/dist/web/server/routes/symbol-classifier.js.map +1 -0
- package/dist/web/server/services/axon-cloud-service.d.ts +95 -0
- package/dist/web/server/services/axon-cloud-service.d.ts.map +1 -0
- package/dist/web/server/services/axon-cloud-service.js +210 -0
- package/dist/web/server/services/axon-cloud-service.js.map +1 -0
- package/dist/web/server/services/config-service.d.ts +436 -0
- package/dist/web/server/services/config-service.d.ts.map +1 -0
- package/dist/web/server/services/config-service.js +872 -0
- package/dist/web/server/services/config-service.js.map +1 -0
- package/dist/web/server/services/gemini-image-service.d.ts +80 -0
- package/dist/web/server/services/gemini-image-service.d.ts.map +1 -0
- package/dist/web/server/services/gemini-image-service.js +373 -0
- package/dist/web/server/services/gemini-image-service.js.map +1 -0
- package/dist/web/server/services/mode-presets.d.ts +40 -0
- package/dist/web/server/services/mode-presets.d.ts.map +1 -0
- package/dist/web/server/services/mode-presets.js +167 -0
- package/dist/web/server/services/mode-presets.js.map +1 -0
- package/dist/web/server/services/proxy-service.d.ts +59 -0
- package/dist/web/server/services/proxy-service.d.ts.map +1 -0
- package/dist/web/server/services/proxy-service.js +132 -0
- package/dist/web/server/services/proxy-service.js.map +1 -0
- package/dist/web/server/session-manager.d.ts +152 -0
- package/dist/web/server/session-manager.d.ts.map +1 -0
- package/dist/web/server/session-manager.js +421 -0
- package/dist/web/server/session-manager.js.map +1 -0
- package/dist/web/server/slash-commands.d.ts +46 -0
- package/dist/web/server/slash-commands.d.ts.map +1 -0
- package/dist/web/server/slash-commands.js +774 -0
- package/dist/web/server/slash-commands.js.map +1 -0
- package/dist/web/server/task-manager.d.ts +190 -0
- package/dist/web/server/task-manager.d.ts.map +1 -0
- package/dist/web/server/task-manager.js +596 -0
- package/dist/web/server/task-manager.js.map +1 -0
- package/dist/web/server/terminal-manager.d.ts +50 -0
- package/dist/web/server/terminal-manager.d.ts.map +1 -0
- package/dist/web/server/terminal-manager.js +274 -0
- package/dist/web/server/terminal-manager.js.map +1 -0
- package/dist/web/server/trpc/appRouter.d.ts +429 -0
- package/dist/web/server/trpc/appRouter.d.ts.map +1 -0
- package/dist/web/server/trpc/appRouter.js +18 -0
- package/dist/web/server/trpc/appRouter.js.map +1 -0
- package/dist/web/server/trpc/index.d.ts +29 -0
- package/dist/web/server/trpc/index.d.ts.map +1 -0
- package/dist/web/server/trpc/index.js +25 -0
- package/dist/web/server/trpc/index.js.map +1 -0
- package/dist/web/server/trpc/routers/blueprint.d.ts +162 -0
- package/dist/web/server/trpc/routers/blueprint.d.ts.map +1 -0
- package/dist/web/server/trpc/routers/blueprint.js +225 -0
- package/dist/web/server/trpc/routers/blueprint.js.map +1 -0
- package/dist/web/server/trpc/routers/coordinator.d.ts +247 -0
- package/dist/web/server/trpc/routers/coordinator.d.ts.map +1 -0
- package/dist/web/server/trpc/routers/coordinator.js +363 -0
- package/dist/web/server/trpc/routers/coordinator.js.map +1 -0
- package/dist/web/server/trpc/routers/execution.d.ts +106 -0
- package/dist/web/server/trpc/routers/execution.d.ts.map +1 -0
- package/dist/web/server/trpc/routers/execution.js +176 -0
- package/dist/web/server/trpc/routers/execution.js.map +1 -0
- package/dist/web/server/user-interaction.d.ts +61 -0
- package/dist/web/server/user-interaction.d.ts.map +1 -0
- package/dist/web/server/user-interaction.js +133 -0
- package/dist/web/server/user-interaction.js.map +1 -0
- package/dist/web/server/web-auth.d.ts +125 -0
- package/dist/web/server/web-auth.d.ts.map +1 -0
- package/dist/web/server/web-auth.js +364 -0
- package/dist/web/server/web-auth.js.map +1 -0
- package/dist/web/server/web-scheduler.d.ts +96 -0
- package/dist/web/server/web-scheduler.d.ts.map +1 -0
- package/dist/web/server/web-scheduler.js +762 -0
- package/dist/web/server/web-scheduler.js.map +1 -0
- package/dist/web/server/websocket-git-handlers.d.ts +107 -0
- package/dist/web/server/websocket-git-handlers.d.ts.map +1 -0
- package/dist/web/server/websocket-git-handlers.js +855 -0
- package/dist/web/server/websocket-git-handlers.js.map +1 -0
- package/dist/web/server/websocket.d.ts +18 -0
- package/dist/web/server/websocket.d.ts.map +1 -0
- package/dist/web/server/websocket.js +6158 -0
- package/dist/web/server/websocket.js.map +1 -0
- package/dist/web/shared/types.d.ts +4100 -0
- package/dist/web/shared/types.d.ts.map +1 -0
- package/dist/web/shared/types.js +123 -0
- package/dist/web/shared/types.js.map +1 -0
- package/dist/web-cli.d.ts +11 -0
- package/dist/web-cli.d.ts.map +1 -0
- package/dist/web-cli.js +196 -0
- package/dist/web-cli.js.map +1 -0
- package/dist/wizard/onboarding.d.ts +13 -0
- package/dist/wizard/onboarding.d.ts.map +1 -0
- package/dist/wizard/onboarding.js +196 -0
- package/dist/wizard/onboarding.js.map +1 -0
- package/electron/README.md +41 -0
- package/electron/main.cjs +341 -0
- package/package.json +236 -0
- package/scripts/postinstall.js +110 -0
|
@@ -0,0 +1,1256 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 会话命令 - resume, context, compact, rewind
|
|
3
|
+
*/
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import chalk from 'chalk';
|
|
6
|
+
import { commandRegistry } from './registry.js';
|
|
7
|
+
import { contextManager } from '../context/index.js';
|
|
8
|
+
import * as fs from 'fs';
|
|
9
|
+
import * as path from 'path';
|
|
10
|
+
import * as os from 'os';
|
|
11
|
+
import { ResumeSession } from '../ui/components/ResumeSession.js';
|
|
12
|
+
// 获取会话目录
|
|
13
|
+
const getSessionsDir = () => path.join(os.homedir(), '.axon', 'sessions');
|
|
14
|
+
// 格式化时间差 (官方风格: "2h ago", "3d ago")
|
|
15
|
+
function getTimeAgo(date) {
|
|
16
|
+
const now = Date.now();
|
|
17
|
+
const diff = now - date.getTime();
|
|
18
|
+
const minutes = Math.floor(diff / 60000);
|
|
19
|
+
const hours = Math.floor(diff / 3600000);
|
|
20
|
+
const days = Math.floor(diff / 86400000);
|
|
21
|
+
if (minutes < 1)
|
|
22
|
+
return 'just now';
|
|
23
|
+
if (minutes < 60)
|
|
24
|
+
return `${minutes}m ago`;
|
|
25
|
+
if (hours < 24)
|
|
26
|
+
return `${hours}h ago`;
|
|
27
|
+
if (days < 7)
|
|
28
|
+
return `${days}d ago`;
|
|
29
|
+
if (days < 30)
|
|
30
|
+
return `${Math.floor(days / 7)}w ago`;
|
|
31
|
+
return date.toLocaleDateString();
|
|
32
|
+
}
|
|
33
|
+
// 格式化文件大小
|
|
34
|
+
function formatBytes(bytes) {
|
|
35
|
+
if (bytes === 0)
|
|
36
|
+
return '0 B';
|
|
37
|
+
const k = 1024;
|
|
38
|
+
const sizes = ['B', 'KB', 'MB', 'GB'];
|
|
39
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
40
|
+
return Math.round(bytes / Math.pow(k, i) * 100) / 100 + ' ' + sizes[i];
|
|
41
|
+
}
|
|
42
|
+
function parseSessionFile(filePath) {
|
|
43
|
+
try {
|
|
44
|
+
const stat = fs.statSync(filePath);
|
|
45
|
+
const data = JSON.parse(fs.readFileSync(filePath, 'utf-8'));
|
|
46
|
+
const fileName = path.basename(filePath, '.json');
|
|
47
|
+
// 支持多种格式
|
|
48
|
+
const messages = data.messages || [];
|
|
49
|
+
const metadata = data.metadata || {};
|
|
50
|
+
// 从不同位置获取数据
|
|
51
|
+
const projectPath = metadata.workingDirectory || metadata.projectPath || data.state?.cwd || data.cwd || 'Unknown';
|
|
52
|
+
const gitBranch = metadata.gitBranch;
|
|
53
|
+
const customTitle = metadata.customTitle || metadata.name;
|
|
54
|
+
const messageCount = metadata.messageCount || messages.length;
|
|
55
|
+
const created = new Date(metadata.createdAt || metadata.created || data.state?.startTime || stat.birthtime);
|
|
56
|
+
const modified = new Date(metadata.updatedAt || metadata.modified || stat.mtime);
|
|
57
|
+
const tokenUsage = metadata.tokenUsage;
|
|
58
|
+
const model = metadata.model;
|
|
59
|
+
const tags = metadata.tags;
|
|
60
|
+
// 获取第一条用户消息
|
|
61
|
+
const firstUserMsg = messages.find((m) => m.role === 'user');
|
|
62
|
+
const firstPrompt = metadata.firstPrompt || metadata.summary ||
|
|
63
|
+
(typeof firstUserMsg?.content === 'string' ? firstUserMsg.content : null);
|
|
64
|
+
// 获取最后几条消息用于预览
|
|
65
|
+
const lastMessages = messages.slice(-3).map((m) => ({
|
|
66
|
+
role: m.role,
|
|
67
|
+
content: typeof m.content === 'string' ? m.content.slice(0, 100) :
|
|
68
|
+
(Array.isArray(m.content) ?
|
|
69
|
+
m.content.map((b) => b.type === 'text' ? b.text : '').join(' ').slice(0, 100) :
|
|
70
|
+
'')
|
|
71
|
+
}));
|
|
72
|
+
// 官方风格: customTitle || summary || firstPrompt
|
|
73
|
+
const summary = customTitle || firstPrompt?.slice(0, 60) || 'No messages';
|
|
74
|
+
return {
|
|
75
|
+
id: metadata.id || data.state?.sessionId || fileName,
|
|
76
|
+
modified,
|
|
77
|
+
created,
|
|
78
|
+
messageCount,
|
|
79
|
+
projectPath,
|
|
80
|
+
gitBranch,
|
|
81
|
+
customTitle,
|
|
82
|
+
name: customTitle,
|
|
83
|
+
firstPrompt,
|
|
84
|
+
summary,
|
|
85
|
+
tokenUsage,
|
|
86
|
+
model,
|
|
87
|
+
tags,
|
|
88
|
+
lastMessages,
|
|
89
|
+
};
|
|
90
|
+
}
|
|
91
|
+
catch {
|
|
92
|
+
return null;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
// /resume - 恢复会话 (官方 local-jsx 类型 - 返回交互式 UI 组件)
|
|
96
|
+
export const resumeCommand = {
|
|
97
|
+
name: 'resume',
|
|
98
|
+
aliases: ['r'],
|
|
99
|
+
description: 'Resume a previous session with interactive picker and search',
|
|
100
|
+
usage: '/resume [session-id or number or search-term]',
|
|
101
|
+
category: 'session',
|
|
102
|
+
execute: async (ctx) => {
|
|
103
|
+
const { args } = ctx;
|
|
104
|
+
const sessionsDir = getSessionsDir();
|
|
105
|
+
if (!fs.existsSync(sessionsDir)) {
|
|
106
|
+
ctx.ui.addMessage('assistant', `No previous sessions found.\n\nSessions are saved to: ${sessionsDir}\n\nStart a conversation and it will be automatically saved.`);
|
|
107
|
+
return { success: false };
|
|
108
|
+
}
|
|
109
|
+
// 官方风格:无参数时返回交互式 JSX 组件
|
|
110
|
+
if (args.length === 0) {
|
|
111
|
+
// 检查是否有会话文件
|
|
112
|
+
const sessionFiles = fs.readdirSync(sessionsDir).filter(f => f.endsWith('.json'));
|
|
113
|
+
if (sessionFiles.length === 0) {
|
|
114
|
+
ctx.ui.addMessage('assistant', `No previous sessions found.\n\nSessions directory: ${sessionsDir}\n\nStart a conversation and it will be automatically saved.`);
|
|
115
|
+
return { success: false };
|
|
116
|
+
}
|
|
117
|
+
// 返回 JSX 组件,由 App.tsx 处理显示
|
|
118
|
+
return {
|
|
119
|
+
success: true,
|
|
120
|
+
action: 'showJsx',
|
|
121
|
+
jsx: React.createElement(ResumeSession, {
|
|
122
|
+
key: Date.now(),
|
|
123
|
+
onDone: (message) => {
|
|
124
|
+
if (message) {
|
|
125
|
+
ctx.ui.addMessage('assistant', message);
|
|
126
|
+
}
|
|
127
|
+
},
|
|
128
|
+
}),
|
|
129
|
+
shouldHidePromptInput: true,
|
|
130
|
+
};
|
|
131
|
+
}
|
|
132
|
+
try {
|
|
133
|
+
// 读取所有会话
|
|
134
|
+
const sessionFiles = fs.readdirSync(sessionsDir).filter(f => f.endsWith('.json'));
|
|
135
|
+
if (sessionFiles.length === 0) {
|
|
136
|
+
ctx.ui.addMessage('assistant', `No previous sessions found.\n\nSessions directory: ${sessionsDir}\n\nStart a conversation and it will be automatically saved.`);
|
|
137
|
+
return { success: false };
|
|
138
|
+
}
|
|
139
|
+
let sessions = sessionFiles
|
|
140
|
+
.map(f => parseSessionFile(path.join(sessionsDir, f)))
|
|
141
|
+
.filter((s) => s !== null)
|
|
142
|
+
.sort((a, b) => b.modified.getTime() - a.modified.getTime());
|
|
143
|
+
if (sessions.length === 0) {
|
|
144
|
+
ctx.ui.addMessage('assistant', 'No valid sessions found. Session files may be corrupted.');
|
|
145
|
+
return { success: false };
|
|
146
|
+
}
|
|
147
|
+
// 处理参数
|
|
148
|
+
if (args.length > 0) {
|
|
149
|
+
const param = args.join(' ');
|
|
150
|
+
const numParam = parseInt(param, 10);
|
|
151
|
+
// 检查是否是编号选择
|
|
152
|
+
if (!isNaN(numParam) && numParam > 0 && numParam <= sessions.length) {
|
|
153
|
+
const session = sessions[numParam - 1];
|
|
154
|
+
return showSessionDetail(ctx, session);
|
|
155
|
+
}
|
|
156
|
+
// 检查是否是 session ID
|
|
157
|
+
const sessionById = sessions.find(s => s.id.startsWith(param) || s.id === param);
|
|
158
|
+
if (sessionById) {
|
|
159
|
+
return showSessionDetail(ctx, sessionById);
|
|
160
|
+
}
|
|
161
|
+
// 否则作为搜索词处理
|
|
162
|
+
const searchLower = param.toLowerCase();
|
|
163
|
+
sessions = sessions.filter(s => s.summary.toLowerCase().includes(searchLower) ||
|
|
164
|
+
s.projectPath.toLowerCase().includes(searchLower) ||
|
|
165
|
+
(s.gitBranch && s.gitBranch.toLowerCase().includes(searchLower)) ||
|
|
166
|
+
(s.customTitle && s.customTitle.toLowerCase().includes(searchLower)) ||
|
|
167
|
+
(s.model && s.model.toLowerCase().includes(searchLower)) ||
|
|
168
|
+
(s.tags && s.tags.some(t => t.toLowerCase().includes(searchLower))));
|
|
169
|
+
if (sessions.length === 0) {
|
|
170
|
+
ctx.ui.addMessage('assistant', `No sessions found matching: "${param}"\n\nUse /resume to see all available sessions.`);
|
|
171
|
+
return { success: false };
|
|
172
|
+
}
|
|
173
|
+
// 如果搜索只返回一个结果,直接显示详情
|
|
174
|
+
if (sessions.length === 1) {
|
|
175
|
+
return showSessionDetail(ctx, sessions[0]);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
// 显示会话列表(最多显示 20 个)
|
|
179
|
+
const displaySessions = sessions.slice(0, 20);
|
|
180
|
+
let sessionList = `Recent Sessions${args.length > 0 ? ` (filtered: "${args.join(' ')}")` : ''}\n`;
|
|
181
|
+
sessionList += `${displaySessions.length} of ${sessions.length} total\n\n`;
|
|
182
|
+
for (let i = 0; i < displaySessions.length; i++) {
|
|
183
|
+
const session = displaySessions[i];
|
|
184
|
+
const timeAgo = getTimeAgo(session.modified);
|
|
185
|
+
const shortId = session.id.slice(0, 8);
|
|
186
|
+
const num = (i + 1).toString().padStart(2, ' ');
|
|
187
|
+
// 第一行: 编号, ID, 时间, 消息数
|
|
188
|
+
sessionList += `${num}. ${shortId} ${timeAgo} ${session.messageCount} msgs`;
|
|
189
|
+
// 添加 git 分支信息
|
|
190
|
+
if (session.gitBranch) {
|
|
191
|
+
sessionList += ` (${session.gitBranch})`;
|
|
192
|
+
}
|
|
193
|
+
// 添加模型信息
|
|
194
|
+
if (session.model) {
|
|
195
|
+
const modelShort = session.model.includes('sonnet') ? '🔷 sonnet' :
|
|
196
|
+
session.model.includes('opus') ? '🔶 opus' :
|
|
197
|
+
session.model.includes('haiku') ? '🔹 haiku' : session.model;
|
|
198
|
+
sessionList += ` ${modelShort}`;
|
|
199
|
+
}
|
|
200
|
+
sessionList += '\n';
|
|
201
|
+
// 第二行: 摘要
|
|
202
|
+
const summaryLine = ' ' + session.summary.slice(0, 65);
|
|
203
|
+
sessionList += `${summaryLine}${session.summary.length > 65 ? '...' : ''}\n`;
|
|
204
|
+
// 第三行: 项目路径(如果不同于当前目录)
|
|
205
|
+
if (session.projectPath !== ctx.config.cwd) {
|
|
206
|
+
const shortPath = session.projectPath.replace(os.homedir(), '~');
|
|
207
|
+
sessionList += ` 📁 ${shortPath}\n`;
|
|
208
|
+
}
|
|
209
|
+
// 显示 token 使用(如果有)
|
|
210
|
+
if (session.tokenUsage && session.tokenUsage.total > 0) {
|
|
211
|
+
const tokenStr = `${(session.tokenUsage.total / 1000).toFixed(1)}k tokens`;
|
|
212
|
+
sessionList += ` 💬 ${tokenStr}\n`;
|
|
213
|
+
}
|
|
214
|
+
sessionList += '\n';
|
|
215
|
+
}
|
|
216
|
+
if (sessions.length > 20) {
|
|
217
|
+
sessionList += `... and ${sessions.length - 20} more sessions\n`;
|
|
218
|
+
sessionList += `Use /resume <search-term> to filter results\n\n`;
|
|
219
|
+
}
|
|
220
|
+
sessionList += `Commands:\n`;
|
|
221
|
+
sessionList += ` /resume <number> - View session details (e.g., /resume 1)\n`;
|
|
222
|
+
sessionList += ` /resume <id> - View by session ID (e.g., /resume ${displaySessions[0].id.slice(0, 8)})\n`;
|
|
223
|
+
sessionList += ` /resume <search> - Filter by keyword (e.g., /resume typescript)\n\n`;
|
|
224
|
+
sessionList += `To actually resume a session, restart Axon:\n`;
|
|
225
|
+
sessionList += ` claude --resume ${displaySessions[0].id.slice(0, 8)}\n`;
|
|
226
|
+
sessionList += ` claude -r <session-id>`;
|
|
227
|
+
ctx.ui.addMessage('assistant', sessionList);
|
|
228
|
+
return { success: true };
|
|
229
|
+
}
|
|
230
|
+
catch (error) {
|
|
231
|
+
ctx.ui.addMessage('assistant', `Error reading sessions: ${error}`);
|
|
232
|
+
return { success: false };
|
|
233
|
+
}
|
|
234
|
+
},
|
|
235
|
+
};
|
|
236
|
+
// 显示单个会话的详细信息
|
|
237
|
+
function showSessionDetail(ctx, session) {
|
|
238
|
+
let info = `Session Details\n`;
|
|
239
|
+
info += `━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━\n\n`;
|
|
240
|
+
info += `ID: ${session.id}\n`;
|
|
241
|
+
info += `Short ID: ${session.id.slice(0, 8)}\n\n`;
|
|
242
|
+
if (session.customTitle || session.name) {
|
|
243
|
+
info += `Name: ${session.customTitle || session.name}\n`;
|
|
244
|
+
}
|
|
245
|
+
info += `Project: ${session.projectPath.replace(os.homedir(), '~')}\n`;
|
|
246
|
+
if (session.gitBranch) {
|
|
247
|
+
info += `Branch: ${session.gitBranch}\n`;
|
|
248
|
+
}
|
|
249
|
+
if (session.model) {
|
|
250
|
+
info += `Model: ${session.model}\n`;
|
|
251
|
+
}
|
|
252
|
+
info += `\nActivity:\n`;
|
|
253
|
+
info += ` Created: ${session.created.toLocaleString()}\n`;
|
|
254
|
+
info += ` Modified: ${session.modified.toLocaleString()} (${getTimeAgo(session.modified)})\n`;
|
|
255
|
+
info += ` Messages: ${session.messageCount}\n`;
|
|
256
|
+
if (session.tokenUsage && session.tokenUsage.total > 0) {
|
|
257
|
+
info += `\nToken Usage:\n`;
|
|
258
|
+
info += ` Input: ${session.tokenUsage.input.toLocaleString()}\n`;
|
|
259
|
+
info += ` Output: ${session.tokenUsage.output.toLocaleString()}\n`;
|
|
260
|
+
info += ` Total: ${session.tokenUsage.total.toLocaleString()}\n`;
|
|
261
|
+
}
|
|
262
|
+
if (session.tags && session.tags.length > 0) {
|
|
263
|
+
info += `\nTags: ${session.tags.join(', ')}\n`;
|
|
264
|
+
}
|
|
265
|
+
// 显示摘要或第一条消息
|
|
266
|
+
if (session.firstPrompt) {
|
|
267
|
+
info += `\nFirst Message:\n`;
|
|
268
|
+
const preview = session.firstPrompt.length > 200
|
|
269
|
+
? session.firstPrompt.slice(0, 200) + '...'
|
|
270
|
+
: session.firstPrompt;
|
|
271
|
+
info += ` ${preview.split('\n').join('\n ')}\n`;
|
|
272
|
+
}
|
|
273
|
+
// 显示最后几条消息预览
|
|
274
|
+
if (session.lastMessages && session.lastMessages.length > 0) {
|
|
275
|
+
info += `\nRecent Messages:\n`;
|
|
276
|
+
for (const msg of session.lastMessages) {
|
|
277
|
+
const roleIcon = msg.role === 'user' ? '👤' : '🤖';
|
|
278
|
+
const contentPreview = msg.content.length > 80
|
|
279
|
+
? msg.content.slice(0, 80) + '...'
|
|
280
|
+
: msg.content;
|
|
281
|
+
info += ` ${roleIcon} ${contentPreview}\n`;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
info += `\nTo resume this session, restart Axon with:\n\n`;
|
|
285
|
+
info += ` claude --resume ${session.id}\n\n`;
|
|
286
|
+
info += `Or use the short form:\n\n`;
|
|
287
|
+
info += ` claude -r ${session.id.slice(0, 8)}\n\n`;
|
|
288
|
+
info += `Additional options:\n`;
|
|
289
|
+
info += ` --fork-session Create a new session ID (fork the conversation)`;
|
|
290
|
+
ctx.ui.addMessage('assistant', info);
|
|
291
|
+
return { success: true };
|
|
292
|
+
}
|
|
293
|
+
// /context - 显示上下文使用情况 (v2.1.14: 修复 token 计数一致性)
|
|
294
|
+
export const contextCommand = {
|
|
295
|
+
name: 'context',
|
|
296
|
+
aliases: ['ctx'],
|
|
297
|
+
description: 'Show current context usage with detailed token statistics and compression info',
|
|
298
|
+
category: 'session',
|
|
299
|
+
execute: (ctx) => {
|
|
300
|
+
const stats = ctx.session.getStats();
|
|
301
|
+
// v2.1.14 修复:使用真实的 token 计数,而不是估算
|
|
302
|
+
// 从 ContextManager 获取实际使用的 tokens
|
|
303
|
+
const contextStats = contextManager.getStats();
|
|
304
|
+
const totalUsedTokens = contextStats.estimatedTokens;
|
|
305
|
+
// 根据模型确定上下文窗口大小
|
|
306
|
+
let maxTokens = 200000; // 默认: Claude Sonnet 4.5
|
|
307
|
+
const modelName = stats.modelUsage && Object.keys(stats.modelUsage).length > 0
|
|
308
|
+
? Object.keys(stats.modelUsage)[0]
|
|
309
|
+
: 'claude-sonnet-4.5';
|
|
310
|
+
if (modelName.includes('opus-4')) {
|
|
311
|
+
maxTokens = 200000; // Claude Opus 4.5
|
|
312
|
+
}
|
|
313
|
+
else if (modelName.includes('haiku')) {
|
|
314
|
+
maxTokens = 200000; // Claude Haiku 3.5
|
|
315
|
+
}
|
|
316
|
+
else if (modelName.includes('sonnet-3-5')) {
|
|
317
|
+
maxTokens = 200000; // Claude 3.5 Sonnet
|
|
318
|
+
}
|
|
319
|
+
// v2.1.14: 使用真实的 token 计数计算百分比
|
|
320
|
+
const availableTokens = Math.max(0, maxTokens - totalUsedTokens);
|
|
321
|
+
const usagePercent = Math.min(100, (totalUsedTokens / maxTokens) * 100);
|
|
322
|
+
// 生成进度条 (20个字符宽度)
|
|
323
|
+
const barWidth = 20;
|
|
324
|
+
const filledWidth = Math.round((usagePercent / 100) * barWidth);
|
|
325
|
+
const emptyWidth = barWidth - filledWidth;
|
|
326
|
+
const progressBar = '█'.repeat(filledWidth) + '░'.repeat(emptyWidth);
|
|
327
|
+
// v2.1.14: 使用真实的压缩信息
|
|
328
|
+
const summarizedMessages = contextStats.summarizedMessages;
|
|
329
|
+
const compressionRatio = Math.round(contextStats.compressionRatio * 100);
|
|
330
|
+
// v2.1.27: 添加彩色输出
|
|
331
|
+
// 根据使用率选择进度条颜色
|
|
332
|
+
let progressBarColor;
|
|
333
|
+
if (usagePercent > 80) {
|
|
334
|
+
progressBarColor = chalk.red;
|
|
335
|
+
}
|
|
336
|
+
else if (usagePercent > 60) {
|
|
337
|
+
progressBarColor = chalk.yellow;
|
|
338
|
+
}
|
|
339
|
+
else {
|
|
340
|
+
progressBarColor = chalk.green;
|
|
341
|
+
}
|
|
342
|
+
// 构建输出(使用 chalk 彩色)
|
|
343
|
+
let contextInfo = `${chalk.bold('Context Usage:')}\n`;
|
|
344
|
+
contextInfo += ` [${progressBarColor(progressBar)}] ${chalk.bold(Math.round(usagePercent).toString())}%\n`;
|
|
345
|
+
contextInfo += ` \n`;
|
|
346
|
+
// v2.1.14: 显示与状态栏一致的 token 计数
|
|
347
|
+
contextInfo += ` ${chalk.dim('Used:')} ${chalk.cyan(totalUsedTokens.toLocaleString())} tokens\n`;
|
|
348
|
+
contextInfo += ` ${chalk.dim('Available:')} ${chalk.green(availableTokens.toLocaleString())} tokens\n`;
|
|
349
|
+
contextInfo += ` ${chalk.dim('Total:')} ${chalk.white(maxTokens.toLocaleString())} tokens\n`;
|
|
350
|
+
contextInfo += ` \n`;
|
|
351
|
+
contextInfo += ` ${chalk.dim('Messages:')} ${stats.messageCount}`;
|
|
352
|
+
if (summarizedMessages > 0) {
|
|
353
|
+
contextInfo += ` ${chalk.dim(`(${summarizedMessages} summarized)`)}`;
|
|
354
|
+
}
|
|
355
|
+
contextInfo += `\n`;
|
|
356
|
+
if (summarizedMessages > 0) {
|
|
357
|
+
contextInfo += ` ${chalk.dim('Compression:')} ${compressionRatio}%\n`;
|
|
358
|
+
}
|
|
359
|
+
contextInfo += `\n`;
|
|
360
|
+
// v2.1.14: 显示实际的 token 分解(基于真实数据)
|
|
361
|
+
// 估算系统提示和消息的比例
|
|
362
|
+
const systemPromptEstimate = Math.min(3000, Math.round(totalUsedTokens * 0.15)); // 约15%
|
|
363
|
+
const messagesTokens = totalUsedTokens - systemPromptEstimate;
|
|
364
|
+
contextInfo += `${chalk.bold('Token Breakdown:')}\n`;
|
|
365
|
+
contextInfo += ` ${chalk.dim('System prompt:')} ${chalk.cyan(systemPromptEstimate.toLocaleString())} tokens ${chalk.dim(`(~${((systemPromptEstimate / maxTokens) * 100).toFixed(1)}%)`)}\n`;
|
|
366
|
+
contextInfo += ` ${chalk.dim('Messages:')} ${chalk.cyan(messagesTokens.toLocaleString())} tokens ${chalk.dim(`(~${((messagesTokens / maxTokens) * 100).toFixed(1)}%)`)}\n`;
|
|
367
|
+
contextInfo += ` ${chalk.dim('Free space:')} ${chalk.green(availableTokens.toLocaleString())} tokens ${chalk.dim(`(${((availableTokens / maxTokens) * 100).toFixed(1)}%)`)}\n`;
|
|
368
|
+
contextInfo += `\n`;
|
|
369
|
+
contextInfo += `${chalk.dim('Model:')} ${chalk.white(modelName)}\n`;
|
|
370
|
+
contextInfo += `${chalk.dim('Context Window:')} ${chalk.white((maxTokens / 1000).toFixed(0) + 'k')} tokens\n`;
|
|
371
|
+
contextInfo += `\n`;
|
|
372
|
+
// 提供建议(彩色)
|
|
373
|
+
if (usagePercent > 80) {
|
|
374
|
+
contextInfo += `${chalk.yellow('⚠️ Context is nearly full')} (${usagePercent.toFixed(1)}%).\n`;
|
|
375
|
+
contextInfo += ` Consider using ${chalk.cyan('/compact')} to free up space.\n\n`;
|
|
376
|
+
contextInfo += `${chalk.bold('What /compact does:')}\n`;
|
|
377
|
+
contextInfo += ` ${chalk.dim('•')} Generates AI summary of conversation\n`;
|
|
378
|
+
contextInfo += ` ${chalk.dim('•')} Preserves important context and files\n`;
|
|
379
|
+
contextInfo += ` ${chalk.dim('•')} Clears old messages from context\n`;
|
|
380
|
+
contextInfo += ` ${chalk.dim('•')} Frees up ${chalk.green(`~${Math.round((messagesTokens * 0.7) / 1000)}k`)} tokens\n`;
|
|
381
|
+
}
|
|
382
|
+
else if (usagePercent > 60) {
|
|
383
|
+
contextInfo += `${chalk.blue('ℹ️ Context is')} ${usagePercent.toFixed(1)}% full.\n`;
|
|
384
|
+
contextInfo += ` You can use ${chalk.cyan('/compact')} when context gets too large.\n`;
|
|
385
|
+
}
|
|
386
|
+
else {
|
|
387
|
+
contextInfo += `${chalk.green('✓ Plenty of context space available.')}\n`;
|
|
388
|
+
}
|
|
389
|
+
contextInfo += `\n`;
|
|
390
|
+
contextInfo += `Session Info:\n`;
|
|
391
|
+
contextInfo += ` Duration: ${formatDuration(stats.duration)}\n`;
|
|
392
|
+
if (stats.totalCost !== '$0.0000') {
|
|
393
|
+
contextInfo += ` Cost: ${stats.totalCost}\n`;
|
|
394
|
+
}
|
|
395
|
+
// 显示模型使用统计
|
|
396
|
+
if (Object.keys(stats.modelUsage).length > 0) {
|
|
397
|
+
contextInfo += `\n`;
|
|
398
|
+
contextInfo += `Model Usage:\n`;
|
|
399
|
+
for (const [model, tokens] of Object.entries(stats.modelUsage)) {
|
|
400
|
+
contextInfo += ` ${model}: ${tokens.toLocaleString()} tokens\n`;
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
// v2.1.14: 添加压缩统计信息(如果有)
|
|
404
|
+
if (contextStats.savedTokens > 0) {
|
|
405
|
+
contextInfo += `\n`;
|
|
406
|
+
contextInfo += `Compression Stats:\n`;
|
|
407
|
+
contextInfo += ` Saved tokens: ${contextStats.savedTokens.toLocaleString()}\n`;
|
|
408
|
+
contextInfo += ` Compressions: ${contextStats.compressionCount}\n`;
|
|
409
|
+
}
|
|
410
|
+
ctx.ui.addMessage('assistant', contextInfo);
|
|
411
|
+
return { success: true };
|
|
412
|
+
},
|
|
413
|
+
};
|
|
414
|
+
// /compact - 压缩对话历史 (官方风格 - 完整实现)
|
|
415
|
+
export const compactCommand = {
|
|
416
|
+
name: 'compact',
|
|
417
|
+
aliases: ['c'],
|
|
418
|
+
description: 'Compact conversation history to free up context space',
|
|
419
|
+
usage: '/compact [--force]',
|
|
420
|
+
category: 'session',
|
|
421
|
+
execute: async (ctx) => {
|
|
422
|
+
const { args } = ctx;
|
|
423
|
+
// 检查是否有 --force 参数
|
|
424
|
+
const forceCompact = args.includes('--force') || args.includes('-f');
|
|
425
|
+
// 获取压缩前的统计信息
|
|
426
|
+
const statsBefore = contextManager.getStats();
|
|
427
|
+
// 如果没有消息需要压缩
|
|
428
|
+
if (statsBefore.totalMessages === 0) {
|
|
429
|
+
ctx.ui.addMessage('assistant', `No conversation history to compact.
|
|
430
|
+
|
|
431
|
+
Current state:
|
|
432
|
+
• Messages: 0
|
|
433
|
+
• Tokens: 0
|
|
434
|
+
|
|
435
|
+
Start a conversation first, then use /compact when you need to free up context space.`);
|
|
436
|
+
return { success: false };
|
|
437
|
+
}
|
|
438
|
+
// 如果已经压缩过且没有足够的新消息,除非使用 --force
|
|
439
|
+
if (statsBefore.summarizedMessages > 0 && statsBefore.totalMessages < 20 && !forceCompact) {
|
|
440
|
+
ctx.ui.addMessage('assistant', `Context already compacted recently.
|
|
441
|
+
|
|
442
|
+
Current state:
|
|
443
|
+
• Total messages: ${statsBefore.totalMessages}
|
|
444
|
+
• Already summarized: ${statsBefore.summarizedMessages}
|
|
445
|
+
• Current tokens: ${statsBefore.estimatedTokens.toLocaleString()}
|
|
446
|
+
|
|
447
|
+
Not enough new messages to compact. Use /compact --force to force compaction anyway.`);
|
|
448
|
+
return { success: false };
|
|
449
|
+
}
|
|
450
|
+
let compactInfo = `Compacting conversation...\n\n`;
|
|
451
|
+
compactInfo += `Before compaction:\n`;
|
|
452
|
+
compactInfo += ` • Messages: ${statsBefore.totalMessages}\n`;
|
|
453
|
+
compactInfo += ` • Tokens: ${statsBefore.estimatedTokens.toLocaleString()}\n`;
|
|
454
|
+
compactInfo += ` • Summarized: ${statsBefore.summarizedMessages}\n`;
|
|
455
|
+
if (statsBefore.compressionRatio < 1) {
|
|
456
|
+
const savedTokens = Math.floor(statsBefore.estimatedTokens * (1 - statsBefore.compressionRatio));
|
|
457
|
+
compactInfo += ` • Previously saved: ${savedTokens.toLocaleString()} tokens\n`;
|
|
458
|
+
}
|
|
459
|
+
compactInfo += `\n`;
|
|
460
|
+
// 执行压缩
|
|
461
|
+
try {
|
|
462
|
+
contextManager.compact();
|
|
463
|
+
// 获取压缩后的统计信息
|
|
464
|
+
const statsAfter = contextManager.getStats();
|
|
465
|
+
// 计算节省的 token 数
|
|
466
|
+
const tokensBefore = statsBefore.estimatedTokens;
|
|
467
|
+
const tokensAfter = statsAfter.estimatedTokens;
|
|
468
|
+
const tokensSaved = tokensBefore - tokensAfter;
|
|
469
|
+
const savedPercent = tokensBefore > 0 ? Math.round((tokensSaved / tokensBefore) * 100) : 0;
|
|
470
|
+
compactInfo += `After compaction:\n`;
|
|
471
|
+
compactInfo += ` • Messages: ${statsAfter.totalMessages}\n`;
|
|
472
|
+
compactInfo += ` • Tokens: ${tokensAfter.toLocaleString()}\n`;
|
|
473
|
+
compactInfo += ` • Summarized: ${statsAfter.summarizedMessages}\n`;
|
|
474
|
+
compactInfo += ` • Compression ratio: ${(statsAfter.compressionRatio * 100).toFixed(0)}%\n\n`;
|
|
475
|
+
compactInfo += `Results:\n`;
|
|
476
|
+
compactInfo += ` • Saved: ${tokensSaved.toLocaleString()} tokens (${savedPercent}%)\n`;
|
|
477
|
+
compactInfo += ` • Messages summarized: ${statsAfter.summarizedMessages - statsBefore.summarizedMessages}\n\n`;
|
|
478
|
+
// 显示上下文使用情况
|
|
479
|
+
const maxTokens = 200000; // Claude Sonnet 4.5 上下文窗口
|
|
480
|
+
const usagePercent = (tokensAfter / maxTokens * 100).toFixed(1);
|
|
481
|
+
const availableTokens = maxTokens - tokensAfter;
|
|
482
|
+
compactInfo += `Context status:\n`;
|
|
483
|
+
compactInfo += ` • Used: ${tokensAfter.toLocaleString()} / ${maxTokens.toLocaleString()} tokens (${usagePercent}%)\n`;
|
|
484
|
+
compactInfo += ` • Available: ${availableTokens.toLocaleString()} tokens\n\n`;
|
|
485
|
+
if (parseFloat(usagePercent) > 80) {
|
|
486
|
+
compactInfo += `⚠️ Context is still ${usagePercent}% full.\n`;
|
|
487
|
+
compactInfo += ` Consider using /clear to start fresh if needed.\n`;
|
|
488
|
+
}
|
|
489
|
+
else if (parseFloat(usagePercent) > 60) {
|
|
490
|
+
compactInfo += `✓ Context usage reduced to ${usagePercent}%.\n`;
|
|
491
|
+
compactInfo += ` You have plenty of space for continued conversation.\n`;
|
|
492
|
+
}
|
|
493
|
+
else {
|
|
494
|
+
compactInfo += `✓ Context successfully compacted!\n`;
|
|
495
|
+
compactInfo += ` Plenty of space available for continued work.\n`;
|
|
496
|
+
}
|
|
497
|
+
compactInfo += `\nWhat happened:\n`;
|
|
498
|
+
compactInfo += `• Older messages were summarized\n`;
|
|
499
|
+
compactInfo += `• Recent messages (last 10 turns) were preserved\n`;
|
|
500
|
+
compactInfo += `• Context continuity maintained\n`;
|
|
501
|
+
compactInfo += `• You can continue the conversation normally\n\n`;
|
|
502
|
+
compactInfo += `Tips:\n`;
|
|
503
|
+
compactInfo += `• Use /context to visualize context usage\n`;
|
|
504
|
+
compactInfo += `• Use /compact again when context gets full\n`;
|
|
505
|
+
compactInfo += `• Use /compact --force to force immediate compaction\n`;
|
|
506
|
+
ctx.ui.addMessage('assistant', compactInfo);
|
|
507
|
+
ctx.ui.addActivity(`Compacted conversation (saved ${tokensSaved.toLocaleString()} tokens)`);
|
|
508
|
+
return { success: true };
|
|
509
|
+
}
|
|
510
|
+
catch (error) {
|
|
511
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
512
|
+
ctx.ui.addMessage('assistant', `Error during compaction: ${errorMsg}\n\nPlease try again or use /clear to start fresh.`);
|
|
513
|
+
return { success: false };
|
|
514
|
+
}
|
|
515
|
+
},
|
|
516
|
+
};
|
|
517
|
+
// /rewind - 回退到之前的状态
|
|
518
|
+
export const rewindCommand = {
|
|
519
|
+
name: 'rewind',
|
|
520
|
+
aliases: ['undo'],
|
|
521
|
+
description: 'Rewind conversation and/or code to a previous state',
|
|
522
|
+
usage: '/rewind [--code | --conversation | --both] [message-index]',
|
|
523
|
+
category: 'session',
|
|
524
|
+
execute: async (ctx) => {
|
|
525
|
+
const { args, session } = ctx;
|
|
526
|
+
// 解析参数
|
|
527
|
+
let mode = 'both';
|
|
528
|
+
let messageIndex;
|
|
529
|
+
for (const arg of args) {
|
|
530
|
+
if (arg === '--code' || arg === '-c') {
|
|
531
|
+
mode = 'code';
|
|
532
|
+
}
|
|
533
|
+
else if (arg === '--conversation' || arg === '--conv') {
|
|
534
|
+
mode = 'conversation';
|
|
535
|
+
}
|
|
536
|
+
else if (arg === '--both' || arg === '-b') {
|
|
537
|
+
mode = 'both';
|
|
538
|
+
}
|
|
539
|
+
else if (!isNaN(parseInt(arg, 10))) {
|
|
540
|
+
messageIndex = parseInt(arg, 10);
|
|
541
|
+
}
|
|
542
|
+
}
|
|
543
|
+
// 显示帮助信息
|
|
544
|
+
if (args.includes('--help') || args.includes('-h')) {
|
|
545
|
+
ctx.ui.addMessage('assistant', `Rewind Command
|
|
546
|
+
|
|
547
|
+
Usage: /rewind [options] [message-index]
|
|
548
|
+
|
|
549
|
+
Options:
|
|
550
|
+
--code, -c Rewind code changes only (restore files)
|
|
551
|
+
--conversation Rewind conversation only (remove messages)
|
|
552
|
+
--both, -b Rewind both code and conversation (default)
|
|
553
|
+
--help, -h Show this help message
|
|
554
|
+
|
|
555
|
+
Examples:
|
|
556
|
+
/rewind Show rewind UI (or press ESC)
|
|
557
|
+
/rewind 3 Rewind to message #3
|
|
558
|
+
/rewind --code Rewind code changes only
|
|
559
|
+
/rewind --conversation 5 Rewind conversation to message #5
|
|
560
|
+
|
|
561
|
+
Notes:
|
|
562
|
+
• Press ESC during a conversation to open the rewind UI
|
|
563
|
+
• File changes are tracked automatically when you edit files
|
|
564
|
+
• Each user message creates a rewind point
|
|
565
|
+
• Rewinding removes all messages after the selected point`);
|
|
566
|
+
return { success: true };
|
|
567
|
+
}
|
|
568
|
+
// 如果没有指定消息索引,显示使用提示
|
|
569
|
+
if (messageIndex === undefined) {
|
|
570
|
+
const stats = session.getStats();
|
|
571
|
+
const messageCount = stats.messageCount;
|
|
572
|
+
ctx.ui.addMessage('assistant', `Rewind Feature
|
|
573
|
+
|
|
574
|
+
Current session has ${messageCount} messages.
|
|
575
|
+
|
|
576
|
+
To rewind, you can:
|
|
577
|
+
1. Press ESC to open the interactive rewind UI
|
|
578
|
+
2. Use /rewind <message-index> to rewind to a specific message
|
|
579
|
+
|
|
580
|
+
Options:
|
|
581
|
+
/rewind --code Rewind file changes only
|
|
582
|
+
/rewind --conversation Rewind conversation only
|
|
583
|
+
/rewind --both Rewind both (default)
|
|
584
|
+
|
|
585
|
+
Example:
|
|
586
|
+
/rewind 3 Rewind to message #3
|
|
587
|
+
/rewind --code 5 Restore files to state at message #5
|
|
588
|
+
|
|
589
|
+
Tip: Use /rewind --help for more information.`);
|
|
590
|
+
return { success: true };
|
|
591
|
+
}
|
|
592
|
+
// 验证消息索引
|
|
593
|
+
const stats = session.getStats();
|
|
594
|
+
if (messageIndex < 1 || messageIndex > stats.messageCount) {
|
|
595
|
+
ctx.ui.addMessage('assistant', `Invalid message index: ${messageIndex}
|
|
596
|
+
|
|
597
|
+
Valid range: 1 to ${stats.messageCount}
|
|
598
|
+
|
|
599
|
+
Use /rewind without arguments to see available rewind points.`);
|
|
600
|
+
return { success: false };
|
|
601
|
+
}
|
|
602
|
+
// 显示将要执行的操作
|
|
603
|
+
const modeDescription = {
|
|
604
|
+
'code': 'code changes only',
|
|
605
|
+
'conversation': 'conversation only',
|
|
606
|
+
'both': 'code and conversation',
|
|
607
|
+
}[mode];
|
|
608
|
+
ctx.ui.addMessage('assistant', `Rewinding ${modeDescription} to message #${messageIndex}...
|
|
609
|
+
|
|
610
|
+
This will:
|
|
611
|
+
${mode !== 'conversation' ? ' • Restore files to their state at that point\n' : ''}${mode !== 'code' ? ` • Remove ${stats.messageCount - messageIndex} message(s) after that point\n` : ''}
|
|
612
|
+
Note: File rewind requires file history tracking to be enabled.
|
|
613
|
+
The rewind feature tracks file changes automatically when you use Edit/Write tools.
|
|
614
|
+
|
|
615
|
+
To enable the full interactive rewind UI, press ESC during a conversation.`);
|
|
616
|
+
// 记录活动
|
|
617
|
+
ctx.ui.addActivity(`Rewind requested: ${modeDescription} to message #${messageIndex}`);
|
|
618
|
+
return { success: true };
|
|
619
|
+
},
|
|
620
|
+
};
|
|
621
|
+
// /rename - 重命名当前会话
|
|
622
|
+
export const renameCommand = {
|
|
623
|
+
name: 'rename',
|
|
624
|
+
description: 'Rename the current session',
|
|
625
|
+
usage: '/rename <new-name>',
|
|
626
|
+
category: 'session',
|
|
627
|
+
execute: (ctx) => {
|
|
628
|
+
const { args } = ctx;
|
|
629
|
+
if (args.length === 0) {
|
|
630
|
+
ctx.ui.addMessage('assistant', 'Usage: /rename <new-name>\n\nExample: /rename my-project-session');
|
|
631
|
+
return { success: false };
|
|
632
|
+
}
|
|
633
|
+
const newName = args.join(' ');
|
|
634
|
+
try {
|
|
635
|
+
// 方法1: 如果 CommandContext 提供了 setCustomTitle 方法,使用它
|
|
636
|
+
if (ctx.session.setCustomTitle) {
|
|
637
|
+
ctx.session.setCustomTitle(newName);
|
|
638
|
+
ctx.ui.addMessage('assistant', `✓ Session renamed to: "${newName}"\n\nThis name will appear when you use /resume to view past sessions.`);
|
|
639
|
+
ctx.ui.addActivity(`Renamed session to: ${newName}`);
|
|
640
|
+
return { success: true };
|
|
641
|
+
}
|
|
642
|
+
// 方法2: 直接修改会话文件
|
|
643
|
+
const sessionsDir = getSessionsDir();
|
|
644
|
+
const sessionFile = path.join(sessionsDir, `${ctx.session.id}.json`);
|
|
645
|
+
if (!fs.existsSync(sessionFile)) {
|
|
646
|
+
ctx.ui.addMessage('assistant', `Warning: Session file not found at ${sessionFile}\n\nThe session may not have been saved yet. The name will be applied when the session is saved.`);
|
|
647
|
+
return { success: false };
|
|
648
|
+
}
|
|
649
|
+
// 读取现有会话数据
|
|
650
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
651
|
+
// 更新 customTitle
|
|
652
|
+
if (!sessionData.metadata) {
|
|
653
|
+
sessionData.metadata = {};
|
|
654
|
+
}
|
|
655
|
+
sessionData.metadata.customTitle = newName;
|
|
656
|
+
sessionData.metadata.modified = Date.now();
|
|
657
|
+
// 写回文件
|
|
658
|
+
fs.writeFileSync(sessionFile, JSON.stringify(sessionData, null, 2));
|
|
659
|
+
ctx.ui.addMessage('assistant', `✓ Session renamed to: "${newName}"\n\nSession ID: ${ctx.session.id.slice(0, 8)}\nSession file updated: ${sessionFile}\n\nThis name will appear when you use /resume to view past sessions.`);
|
|
660
|
+
ctx.ui.addActivity(`Renamed session to: ${newName}`);
|
|
661
|
+
return { success: true };
|
|
662
|
+
}
|
|
663
|
+
catch (error) {
|
|
664
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
665
|
+
ctx.ui.addMessage('assistant', `Error renaming session: ${errorMsg}\n\nPlease check:\n • Session file exists and is readable\n • You have write permissions\n • The session has been saved at least once`);
|
|
666
|
+
return { success: false };
|
|
667
|
+
}
|
|
668
|
+
},
|
|
669
|
+
};
|
|
670
|
+
// /export - 导出会话 (完整实现)
|
|
671
|
+
export const exportCommand = {
|
|
672
|
+
name: 'export',
|
|
673
|
+
description: 'Export conversation history to JSON or Markdown',
|
|
674
|
+
usage: '/export [json|markdown|md] [output-path]',
|
|
675
|
+
category: 'session',
|
|
676
|
+
execute: (ctx) => {
|
|
677
|
+
const { args } = ctx;
|
|
678
|
+
// 解析参数
|
|
679
|
+
let format = 'markdown'; // 默认格式
|
|
680
|
+
let outputPath;
|
|
681
|
+
if (args.length > 0) {
|
|
682
|
+
const firstArg = args[0].toLowerCase();
|
|
683
|
+
if (['json', 'markdown', 'md'].includes(firstArg)) {
|
|
684
|
+
format = firstArg === 'md' ? 'markdown' : firstArg;
|
|
685
|
+
outputPath = args[1]; // 第二个参数是输出路径
|
|
686
|
+
}
|
|
687
|
+
else {
|
|
688
|
+
// 第一个参数是输出路径
|
|
689
|
+
outputPath = args.join(' ');
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
try {
|
|
693
|
+
const stats = ctx.session.getStats();
|
|
694
|
+
const shortId = ctx.session.id.slice(0, 8);
|
|
695
|
+
// 生成默认文件名
|
|
696
|
+
const defaultFilename = `claude-session-${shortId}.${format === 'json' ? 'json' : 'md'}`;
|
|
697
|
+
const finalPath = outputPath || path.join(ctx.config.cwd, defaultFilename);
|
|
698
|
+
// 读取完整会话数据
|
|
699
|
+
const sessionsDir = path.join(os.homedir(), '.axon', 'sessions');
|
|
700
|
+
const sessionFile = path.join(sessionsDir, `${ctx.session.id}.json`);
|
|
701
|
+
let sessionData = null;
|
|
702
|
+
if (fs.existsSync(sessionFile)) {
|
|
703
|
+
sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
704
|
+
}
|
|
705
|
+
let exportContent;
|
|
706
|
+
let exported = false;
|
|
707
|
+
if (format === 'json') {
|
|
708
|
+
// JSON 格式:导出完整会话数据
|
|
709
|
+
const exportData = {
|
|
710
|
+
sessionId: ctx.session.id,
|
|
711
|
+
exported: new Date().toISOString(),
|
|
712
|
+
metadata: {
|
|
713
|
+
model: ctx.config.model,
|
|
714
|
+
startTime: sessionData?.metadata?.created || Date.now() - stats.duration,
|
|
715
|
+
duration: stats.duration,
|
|
716
|
+
messageCount: stats.messageCount,
|
|
717
|
+
totalCost: stats.totalCost,
|
|
718
|
+
modelUsage: stats.modelUsage,
|
|
719
|
+
projectPath: ctx.config.cwd,
|
|
720
|
+
gitBranch: sessionData?.metadata?.gitBranch,
|
|
721
|
+
customTitle: sessionData?.metadata?.customTitle,
|
|
722
|
+
},
|
|
723
|
+
messages: sessionData?.messages || [],
|
|
724
|
+
state: sessionData?.state || {},
|
|
725
|
+
};
|
|
726
|
+
exportContent = JSON.stringify(exportData, null, 2);
|
|
727
|
+
}
|
|
728
|
+
else {
|
|
729
|
+
// Markdown 格式:格式化输出
|
|
730
|
+
const lines = [];
|
|
731
|
+
lines.push('# Axon Session Export');
|
|
732
|
+
lines.push('');
|
|
733
|
+
lines.push(`**Session ID:** \`${ctx.session.id}\``);
|
|
734
|
+
lines.push(`**Exported:** ${new Date().toISOString()}`);
|
|
735
|
+
lines.push('');
|
|
736
|
+
lines.push('## Session Information');
|
|
737
|
+
lines.push('');
|
|
738
|
+
lines.push(`- **Model:** ${ctx.config.model}`);
|
|
739
|
+
lines.push(`- **Project:** ${ctx.config.cwd}`);
|
|
740
|
+
if (sessionData?.metadata?.gitBranch) {
|
|
741
|
+
lines.push(`- **Git Branch:** ${sessionData.metadata.gitBranch}`);
|
|
742
|
+
}
|
|
743
|
+
if (sessionData?.metadata?.customTitle) {
|
|
744
|
+
lines.push(`- **Title:** ${sessionData.metadata.customTitle}`);
|
|
745
|
+
}
|
|
746
|
+
lines.push(`- **Messages:** ${stats.messageCount}`);
|
|
747
|
+
lines.push(`- **Duration:** ${formatDuration(stats.duration)}`);
|
|
748
|
+
lines.push(`- **Total Cost:** ${stats.totalCost}`);
|
|
749
|
+
lines.push('');
|
|
750
|
+
if (Object.keys(stats.modelUsage).length > 0) {
|
|
751
|
+
lines.push('### Model Usage');
|
|
752
|
+
lines.push('');
|
|
753
|
+
for (const [model, tokens] of Object.entries(stats.modelUsage)) {
|
|
754
|
+
lines.push(`- **${model}:** ${tokens.toLocaleString()} tokens`);
|
|
755
|
+
}
|
|
756
|
+
lines.push('');
|
|
757
|
+
}
|
|
758
|
+
lines.push('---');
|
|
759
|
+
lines.push('');
|
|
760
|
+
lines.push('## Conversation');
|
|
761
|
+
lines.push('');
|
|
762
|
+
// 导出消息
|
|
763
|
+
const messages = sessionData?.messages || [];
|
|
764
|
+
for (let i = 0; i < messages.length; i++) {
|
|
765
|
+
const msg = messages[i];
|
|
766
|
+
const role = msg.role === 'user' ? '**User**' : '**Assistant**';
|
|
767
|
+
lines.push(`### ${role} (Message ${i + 1})`);
|
|
768
|
+
lines.push('');
|
|
769
|
+
if (typeof msg.content === 'string') {
|
|
770
|
+
lines.push(msg.content);
|
|
771
|
+
}
|
|
772
|
+
else if (Array.isArray(msg.content)) {
|
|
773
|
+
// 处理复杂内容
|
|
774
|
+
for (const block of msg.content) {
|
|
775
|
+
if (block.type === 'text') {
|
|
776
|
+
lines.push(block.text || '');
|
|
777
|
+
}
|
|
778
|
+
else if (block.type === 'tool_use') {
|
|
779
|
+
lines.push('```json');
|
|
780
|
+
lines.push(`// Tool: ${block.name}`);
|
|
781
|
+
lines.push(JSON.stringify(block.input, null, 2));
|
|
782
|
+
lines.push('```');
|
|
783
|
+
}
|
|
784
|
+
else if (block.type === 'tool_result') {
|
|
785
|
+
lines.push('```');
|
|
786
|
+
lines.push(`// Tool Result: ${block.tool_use_id?.slice(0, 8) || 'N/A'}`);
|
|
787
|
+
const content = typeof block.content === 'string'
|
|
788
|
+
? block.content
|
|
789
|
+
: JSON.stringify(block.content, null, 2);
|
|
790
|
+
lines.push(content.slice(0, 500) + (content.length > 500 ? '...' : ''));
|
|
791
|
+
lines.push('```');
|
|
792
|
+
}
|
|
793
|
+
}
|
|
794
|
+
}
|
|
795
|
+
lines.push('');
|
|
796
|
+
lines.push('---');
|
|
797
|
+
lines.push('');
|
|
798
|
+
}
|
|
799
|
+
lines.push('');
|
|
800
|
+
lines.push('*Exported from Axon*');
|
|
801
|
+
exportContent = lines.join('\n');
|
|
802
|
+
}
|
|
803
|
+
// 写入文件
|
|
804
|
+
const exportDir = path.dirname(finalPath);
|
|
805
|
+
if (!fs.existsSync(exportDir)) {
|
|
806
|
+
fs.mkdirSync(exportDir, { recursive: true });
|
|
807
|
+
}
|
|
808
|
+
fs.writeFileSync(finalPath, exportContent, 'utf-8');
|
|
809
|
+
exported = true;
|
|
810
|
+
// 显示成功消息
|
|
811
|
+
const fileSize = formatBytes(Buffer.byteLength(exportContent, 'utf-8'));
|
|
812
|
+
const absolutePath = path.resolve(finalPath);
|
|
813
|
+
ctx.ui.addMessage('assistant', `✓ Session exported successfully!
|
|
814
|
+
|
|
815
|
+
Format: ${format.toUpperCase()}
|
|
816
|
+
File: ${absolutePath}
|
|
817
|
+
Size: ${fileSize}
|
|
818
|
+
Messages: ${stats.messageCount}
|
|
819
|
+
|
|
820
|
+
The exported file contains:
|
|
821
|
+
${format === 'json'
|
|
822
|
+
? `• Complete session data in JSON format
|
|
823
|
+
• All messages and tool interactions
|
|
824
|
+
• Session metadata and statistics
|
|
825
|
+
• Can be imported or analyzed programmatically`
|
|
826
|
+
: `• Formatted conversation history in Markdown
|
|
827
|
+
• Session information and statistics
|
|
828
|
+
• Readable format for documentation
|
|
829
|
+
• Compatible with any Markdown viewer`}
|
|
830
|
+
|
|
831
|
+
You can now:
|
|
832
|
+
• Share this export with others
|
|
833
|
+
• Archive it for future reference
|
|
834
|
+
• Use it for documentation
|
|
835
|
+
${format === 'json' ? ' • Import it back with /resume --import' : ' • Convert it with /export json'}
|
|
836
|
+
|
|
837
|
+
Tip: Use '/export json <path>' or '/export markdown <path>' to specify output location.`);
|
|
838
|
+
ctx.ui.addActivity(`Exported session to ${path.basename(finalPath)}`);
|
|
839
|
+
return { success: true };
|
|
840
|
+
}
|
|
841
|
+
catch (error) {
|
|
842
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
843
|
+
ctx.ui.addMessage('assistant', `Error exporting session: ${errorMsg}\n\nPlease check:\n • File path is valid and writable\n • You have permission to write to the directory\n • Disk space is available`);
|
|
844
|
+
return { success: false };
|
|
845
|
+
}
|
|
846
|
+
},
|
|
847
|
+
};
|
|
848
|
+
// /transcript - 导出会话转录记录 (官方风格)
|
|
849
|
+
export const transcriptCommand = {
|
|
850
|
+
name: 'transcript',
|
|
851
|
+
aliases: ['trans'],
|
|
852
|
+
description: 'Export conversation transcript in a clean, readable format',
|
|
853
|
+
usage: '/transcript [output-path]',
|
|
854
|
+
category: 'session',
|
|
855
|
+
execute: (ctx) => {
|
|
856
|
+
const { args } = ctx;
|
|
857
|
+
try {
|
|
858
|
+
const stats = ctx.session.getStats();
|
|
859
|
+
const shortId = ctx.session.id.slice(0, 8);
|
|
860
|
+
// 生成默认文件名
|
|
861
|
+
const timestamp = new Date().toISOString().split('T')[0]; // YYYY-MM-DD
|
|
862
|
+
const defaultFilename = `transcript-${shortId}-${timestamp}.txt`;
|
|
863
|
+
const outputPath = args.length > 0 ? args.join(' ') : null;
|
|
864
|
+
// 读取完整会话数据
|
|
865
|
+
const sessionsDir = path.join(os.homedir(), '.axon', 'sessions');
|
|
866
|
+
const sessionFile = path.join(sessionsDir, `${ctx.session.id}.json`);
|
|
867
|
+
let sessionData = null;
|
|
868
|
+
if (fs.existsSync(sessionFile)) {
|
|
869
|
+
sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
870
|
+
}
|
|
871
|
+
// 生成转录文本
|
|
872
|
+
const lines = [];
|
|
873
|
+
// 标题
|
|
874
|
+
lines.push('='.repeat(80));
|
|
875
|
+
lines.push('AXON CONVERSATION TRANSCRIPT');
|
|
876
|
+
lines.push('='.repeat(80));
|
|
877
|
+
lines.push('');
|
|
878
|
+
// 会话元数据
|
|
879
|
+
lines.push(`Session ID: ${ctx.session.id}`);
|
|
880
|
+
lines.push(`Exported: ${new Date().toISOString()}`);
|
|
881
|
+
lines.push(`Model: ${ctx.config.model}`);
|
|
882
|
+
lines.push(`Messages: ${stats.messageCount}`);
|
|
883
|
+
lines.push(`Duration: ${formatDuration(stats.duration)}`);
|
|
884
|
+
lines.push(`Total Cost: ${stats.totalCost}`);
|
|
885
|
+
if (sessionData?.metadata?.customTitle) {
|
|
886
|
+
lines.push(`Title: ${sessionData.metadata.customTitle}`);
|
|
887
|
+
}
|
|
888
|
+
lines.push('');
|
|
889
|
+
lines.push('-'.repeat(80));
|
|
890
|
+
lines.push('');
|
|
891
|
+
// 导出消息内容
|
|
892
|
+
const messages = sessionData?.messages || [];
|
|
893
|
+
if (messages.length === 0) {
|
|
894
|
+
lines.push('No messages in this session.');
|
|
895
|
+
}
|
|
896
|
+
else {
|
|
897
|
+
for (let i = 0; i < messages.length; i++) {
|
|
898
|
+
const msg = messages[i];
|
|
899
|
+
const timestamp = sessionData?.metadata?.created
|
|
900
|
+
? new Date(sessionData.metadata.created + i * 1000).toISOString()
|
|
901
|
+
: '';
|
|
902
|
+
// 消息头
|
|
903
|
+
if (msg.role === 'user') {
|
|
904
|
+
lines.push(`[USER] ${timestamp ? `at ${timestamp}` : `Message ${i + 1}`}`);
|
|
905
|
+
}
|
|
906
|
+
else {
|
|
907
|
+
lines.push(`[ASSISTANT] ${timestamp ? `at ${timestamp}` : `Message ${i + 1}`}`);
|
|
908
|
+
}
|
|
909
|
+
lines.push('');
|
|
910
|
+
// 消息内容
|
|
911
|
+
if (typeof msg.content === 'string') {
|
|
912
|
+
lines.push(msg.content);
|
|
913
|
+
}
|
|
914
|
+
else if (Array.isArray(msg.content)) {
|
|
915
|
+
// 处理复杂消息结构
|
|
916
|
+
for (const block of msg.content) {
|
|
917
|
+
if (block.type === 'text') {
|
|
918
|
+
lines.push(block.text || '');
|
|
919
|
+
}
|
|
920
|
+
else if (block.type === 'tool_use') {
|
|
921
|
+
lines.push(`[Tool Used: ${block.name}]`);
|
|
922
|
+
lines.push(`Input: ${JSON.stringify(block.input, null, 2)}`);
|
|
923
|
+
}
|
|
924
|
+
else if (block.type === 'tool_result') {
|
|
925
|
+
lines.push(`[Tool Result]`);
|
|
926
|
+
const content = typeof block.content === 'string'
|
|
927
|
+
? block.content
|
|
928
|
+
: JSON.stringify(block.content, null, 2);
|
|
929
|
+
// 限制工具结果长度,避免转录文件过大
|
|
930
|
+
const maxLength = 500;
|
|
931
|
+
lines.push(content.length > maxLength ? content.slice(0, maxLength) + '\n... (truncated)' : content);
|
|
932
|
+
}
|
|
933
|
+
}
|
|
934
|
+
}
|
|
935
|
+
lines.push('');
|
|
936
|
+
lines.push('-'.repeat(80));
|
|
937
|
+
lines.push('');
|
|
938
|
+
}
|
|
939
|
+
}
|
|
940
|
+
// 会话总结
|
|
941
|
+
lines.push('');
|
|
942
|
+
lines.push('='.repeat(80));
|
|
943
|
+
lines.push('END OF TRANSCRIPT');
|
|
944
|
+
lines.push('='.repeat(80));
|
|
945
|
+
lines.push('');
|
|
946
|
+
lines.push(`Total Messages: ${messages.length}`);
|
|
947
|
+
lines.push(`Session Cost: ${stats.totalCost}`);
|
|
948
|
+
lines.push(`Export Time: ${new Date().toISOString()}`);
|
|
949
|
+
const transcriptContent = lines.join('\n');
|
|
950
|
+
// 如果指定了输出路径,写入文件
|
|
951
|
+
if (outputPath) {
|
|
952
|
+
const finalPath = path.resolve(outputPath);
|
|
953
|
+
const exportDir = path.dirname(finalPath);
|
|
954
|
+
if (!fs.existsSync(exportDir)) {
|
|
955
|
+
fs.mkdirSync(exportDir, { recursive: true });
|
|
956
|
+
}
|
|
957
|
+
fs.writeFileSync(finalPath, transcriptContent, 'utf-8');
|
|
958
|
+
const fileSize = formatBytes(Buffer.byteLength(transcriptContent, 'utf-8'));
|
|
959
|
+
const absolutePath = path.resolve(finalPath);
|
|
960
|
+
ctx.ui.addMessage('assistant', `✓ Transcript exported successfully!
|
|
961
|
+
|
|
962
|
+
File: ${absolutePath}
|
|
963
|
+
Size: ${fileSize}
|
|
964
|
+
Messages: ${stats.messageCount}
|
|
965
|
+
|
|
966
|
+
The transcript contains a clean, readable record of the entire conversation.
|
|
967
|
+
|
|
968
|
+
You can:
|
|
969
|
+
• Share this transcript with others
|
|
970
|
+
• Archive it for documentation
|
|
971
|
+
• Use it for review or analysis
|
|
972
|
+
• Search through conversation history
|
|
973
|
+
|
|
974
|
+
Tip: Use '/transcript <path>' to specify a custom output location.`);
|
|
975
|
+
ctx.ui.addActivity(`Exported transcript to ${path.basename(finalPath)}`);
|
|
976
|
+
return { success: true };
|
|
977
|
+
}
|
|
978
|
+
// 如果没有指定输出路径,直接显示转录内容(限制长度)
|
|
979
|
+
const maxDisplayLength = 3000;
|
|
980
|
+
if (transcriptContent.length > maxDisplayLength) {
|
|
981
|
+
const truncated = transcriptContent.slice(0, maxDisplayLength);
|
|
982
|
+
ctx.ui.addMessage('assistant', `${truncated}
|
|
983
|
+
|
|
984
|
+
... (truncated, ${transcriptContent.length - maxDisplayLength} more characters)
|
|
985
|
+
|
|
986
|
+
To save the full transcript to a file, use:
|
|
987
|
+
/transcript ${defaultFilename}
|
|
988
|
+
|
|
989
|
+
Or specify a custom path:
|
|
990
|
+
/transcript /path/to/your/transcript.txt`);
|
|
991
|
+
}
|
|
992
|
+
else {
|
|
993
|
+
ctx.ui.addMessage('assistant', `${transcriptContent}
|
|
994
|
+
|
|
995
|
+
To save this transcript to a file, use:
|
|
996
|
+
/transcript ${defaultFilename}`);
|
|
997
|
+
}
|
|
998
|
+
return { success: true };
|
|
999
|
+
}
|
|
1000
|
+
catch (error) {
|
|
1001
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1002
|
+
ctx.ui.addMessage('assistant', `Error generating transcript: ${errorMsg}
|
|
1003
|
+
|
|
1004
|
+
Please check:
|
|
1005
|
+
• Session file exists and is readable
|
|
1006
|
+
• You have permission to access the session
|
|
1007
|
+
• The session has been saved at least once
|
|
1008
|
+
|
|
1009
|
+
You can try:
|
|
1010
|
+
• /export markdown - Export in Markdown format
|
|
1011
|
+
• /export json - Export complete session data`);
|
|
1012
|
+
return { success: false };
|
|
1013
|
+
}
|
|
1014
|
+
},
|
|
1015
|
+
};
|
|
1016
|
+
// /tag - 会话标签管理
|
|
1017
|
+
export const tagCommand = {
|
|
1018
|
+
name: 'tag',
|
|
1019
|
+
aliases: ['tags'],
|
|
1020
|
+
description: 'Add, remove, or list session tags',
|
|
1021
|
+
usage: '/tag [add|remove|list|clear] [tag-name]',
|
|
1022
|
+
category: 'session',
|
|
1023
|
+
execute: (ctx) => {
|
|
1024
|
+
const { args, session } = ctx;
|
|
1025
|
+
const action = args[0]?.toLowerCase();
|
|
1026
|
+
// 获取当前标签 - 优先使用 getTags() 方法,否则从会话文件读取
|
|
1027
|
+
let currentTags = [];
|
|
1028
|
+
if (session.getTags) {
|
|
1029
|
+
currentTags = session.getTags();
|
|
1030
|
+
}
|
|
1031
|
+
else {
|
|
1032
|
+
// 从会话文件读取标签
|
|
1033
|
+
try {
|
|
1034
|
+
const sessionsDir = getSessionsDir();
|
|
1035
|
+
const sessionFile = path.join(sessionsDir, `${session.id}.json`);
|
|
1036
|
+
if (fs.existsSync(sessionFile)) {
|
|
1037
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
1038
|
+
currentTags = sessionData?.metadata?.tags || [];
|
|
1039
|
+
}
|
|
1040
|
+
}
|
|
1041
|
+
catch {
|
|
1042
|
+
currentTags = [];
|
|
1043
|
+
}
|
|
1044
|
+
}
|
|
1045
|
+
// 默认或 list:显示所有标签
|
|
1046
|
+
if (!action || action === 'list') {
|
|
1047
|
+
if (currentTags.length === 0) {
|
|
1048
|
+
ctx.ui.addMessage('assistant', `Session Tags\n\nNo tags on this session.\n\nUsage:\n /tag add <name> - Add a tag\n /tag remove <name> - Remove a tag\n /tag list - List all tags\n /tag clear - Remove all tags\n\nExamples:\n /tag add feature-x\n /tag add bug-fix\n /tag add important`);
|
|
1049
|
+
return { success: true };
|
|
1050
|
+
}
|
|
1051
|
+
let tagInfo = `Session Tags (${currentTags.length})\n\n`;
|
|
1052
|
+
currentTags.forEach((tag, i) => {
|
|
1053
|
+
tagInfo += ` ${i + 1}. ${tag}\n`;
|
|
1054
|
+
});
|
|
1055
|
+
tagInfo += `\nCommands:\n /tag add <name> - Add a tag\n /tag remove <name> - Remove a tag\n /tag clear - Remove all tags`;
|
|
1056
|
+
ctx.ui.addMessage('assistant', tagInfo);
|
|
1057
|
+
return { success: true };
|
|
1058
|
+
}
|
|
1059
|
+
// add:添加标签
|
|
1060
|
+
if (action === 'add') {
|
|
1061
|
+
if (args.length < 2) {
|
|
1062
|
+
ctx.ui.addMessage('assistant', 'Usage: /tag add <tag-name>\n\nExample: /tag add feature-x');
|
|
1063
|
+
return { success: false };
|
|
1064
|
+
}
|
|
1065
|
+
const tagName = args.slice(1).join('-').toLowerCase().replace(/[^a-z0-9-]/g, '');
|
|
1066
|
+
if (!tagName) {
|
|
1067
|
+
ctx.ui.addMessage('assistant', 'Invalid tag name. Tags can only contain letters, numbers, and hyphens.');
|
|
1068
|
+
return { success: false };
|
|
1069
|
+
}
|
|
1070
|
+
if (currentTags.includes(tagName)) {
|
|
1071
|
+
ctx.ui.addMessage('assistant', `Tag "${tagName}" already exists on this session.`);
|
|
1072
|
+
return { success: true };
|
|
1073
|
+
}
|
|
1074
|
+
const newTags = [...currentTags, tagName];
|
|
1075
|
+
// 保存标签
|
|
1076
|
+
if (session.setTags) {
|
|
1077
|
+
session.setTags(newTags);
|
|
1078
|
+
}
|
|
1079
|
+
else {
|
|
1080
|
+
// 直接修改会话文件
|
|
1081
|
+
try {
|
|
1082
|
+
const sessionsDir = getSessionsDir();
|
|
1083
|
+
const sessionFile = path.join(sessionsDir, `${session.id}.json`);
|
|
1084
|
+
if (fs.existsSync(sessionFile)) {
|
|
1085
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
1086
|
+
if (!sessionData.metadata) {
|
|
1087
|
+
sessionData.metadata = {};
|
|
1088
|
+
}
|
|
1089
|
+
sessionData.metadata.tags = newTags;
|
|
1090
|
+
sessionData.metadata.modified = Date.now();
|
|
1091
|
+
fs.writeFileSync(sessionFile, JSON.stringify(sessionData, null, 2));
|
|
1092
|
+
}
|
|
1093
|
+
}
|
|
1094
|
+
catch (error) {
|
|
1095
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1096
|
+
ctx.ui.addMessage('assistant', `Error saving tag: ${errorMsg}`);
|
|
1097
|
+
return { success: false };
|
|
1098
|
+
}
|
|
1099
|
+
}
|
|
1100
|
+
ctx.ui.addMessage('assistant', `Added tag: ${tagName}\n\nCurrent tags: ${newTags.join(', ')}`);
|
|
1101
|
+
ctx.ui.addActivity(`Added tag: ${tagName}`);
|
|
1102
|
+
return { success: true };
|
|
1103
|
+
}
|
|
1104
|
+
// remove:移除标签
|
|
1105
|
+
if (action === 'remove' || action === 'rm') {
|
|
1106
|
+
if (args.length < 2) {
|
|
1107
|
+
ctx.ui.addMessage('assistant', 'Usage: /tag remove <tag-name>\n\nExample: /tag remove feature-x');
|
|
1108
|
+
return { success: false };
|
|
1109
|
+
}
|
|
1110
|
+
const tagName = args.slice(1).join('-').toLowerCase();
|
|
1111
|
+
if (!currentTags.includes(tagName)) {
|
|
1112
|
+
ctx.ui.addMessage('assistant', `Tag "${tagName}" not found on this session.\n\nCurrent tags: ${currentTags.join(', ') || '(none)'}`);
|
|
1113
|
+
return { success: false };
|
|
1114
|
+
}
|
|
1115
|
+
const newTags = currentTags.filter(t => t !== tagName);
|
|
1116
|
+
// 保存标签
|
|
1117
|
+
if (session.setTags) {
|
|
1118
|
+
session.setTags(newTags);
|
|
1119
|
+
}
|
|
1120
|
+
else {
|
|
1121
|
+
// 直接修改会话文件
|
|
1122
|
+
try {
|
|
1123
|
+
const sessionsDir = getSessionsDir();
|
|
1124
|
+
const sessionFile = path.join(sessionsDir, `${session.id}.json`);
|
|
1125
|
+
if (fs.existsSync(sessionFile)) {
|
|
1126
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
1127
|
+
if (!sessionData.metadata) {
|
|
1128
|
+
sessionData.metadata = {};
|
|
1129
|
+
}
|
|
1130
|
+
sessionData.metadata.tags = newTags;
|
|
1131
|
+
sessionData.metadata.modified = Date.now();
|
|
1132
|
+
fs.writeFileSync(sessionFile, JSON.stringify(sessionData, null, 2));
|
|
1133
|
+
}
|
|
1134
|
+
}
|
|
1135
|
+
catch (error) {
|
|
1136
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1137
|
+
ctx.ui.addMessage('assistant', `Error saving tag: ${errorMsg}`);
|
|
1138
|
+
return { success: false };
|
|
1139
|
+
}
|
|
1140
|
+
}
|
|
1141
|
+
ctx.ui.addMessage('assistant', `Removed tag: ${tagName}\n\nRemaining tags: ${newTags.join(', ') || '(none)'}`);
|
|
1142
|
+
ctx.ui.addActivity(`Removed tag: ${tagName}`);
|
|
1143
|
+
return { success: true };
|
|
1144
|
+
}
|
|
1145
|
+
// clear:清除所有标签
|
|
1146
|
+
if (action === 'clear') {
|
|
1147
|
+
if (currentTags.length === 0) {
|
|
1148
|
+
ctx.ui.addMessage('assistant', 'No tags to clear.');
|
|
1149
|
+
return { success: true };
|
|
1150
|
+
}
|
|
1151
|
+
const tagCount = currentTags.length;
|
|
1152
|
+
// 保存标签
|
|
1153
|
+
if (session.setTags) {
|
|
1154
|
+
session.setTags([]);
|
|
1155
|
+
}
|
|
1156
|
+
else {
|
|
1157
|
+
// 直接修改会话文件
|
|
1158
|
+
try {
|
|
1159
|
+
const sessionsDir = getSessionsDir();
|
|
1160
|
+
const sessionFile = path.join(sessionsDir, `${session.id}.json`);
|
|
1161
|
+
if (fs.existsSync(sessionFile)) {
|
|
1162
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
1163
|
+
if (!sessionData.metadata) {
|
|
1164
|
+
sessionData.metadata = {};
|
|
1165
|
+
}
|
|
1166
|
+
sessionData.metadata.tags = [];
|
|
1167
|
+
sessionData.metadata.modified = Date.now();
|
|
1168
|
+
fs.writeFileSync(sessionFile, JSON.stringify(sessionData, null, 2));
|
|
1169
|
+
}
|
|
1170
|
+
}
|
|
1171
|
+
catch (error) {
|
|
1172
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1173
|
+
ctx.ui.addMessage('assistant', `Error clearing tags: ${errorMsg}`);
|
|
1174
|
+
return { success: false };
|
|
1175
|
+
}
|
|
1176
|
+
}
|
|
1177
|
+
ctx.ui.addMessage('assistant', `Cleared ${tagCount} tag(s) from this session.`);
|
|
1178
|
+
ctx.ui.addActivity('Cleared session tags');
|
|
1179
|
+
return { success: true };
|
|
1180
|
+
}
|
|
1181
|
+
// toggle:快速切换标签
|
|
1182
|
+
if (action === 'toggle') {
|
|
1183
|
+
if (args.length < 2) {
|
|
1184
|
+
ctx.ui.addMessage('assistant', 'Usage: /tag toggle <tag-name>');
|
|
1185
|
+
return { success: false };
|
|
1186
|
+
}
|
|
1187
|
+
const tagName = args.slice(1).join('-').toLowerCase().replace(/[^a-z0-9-]/g, '');
|
|
1188
|
+
let newTags;
|
|
1189
|
+
let message;
|
|
1190
|
+
if (currentTags.includes(tagName)) {
|
|
1191
|
+
newTags = currentTags.filter(t => t !== tagName);
|
|
1192
|
+
message = `Removed tag: ${tagName}`;
|
|
1193
|
+
}
|
|
1194
|
+
else {
|
|
1195
|
+
newTags = [...currentTags, tagName];
|
|
1196
|
+
message = `Added tag: ${tagName}`;
|
|
1197
|
+
}
|
|
1198
|
+
// 保存标签
|
|
1199
|
+
if (session.setTags) {
|
|
1200
|
+
session.setTags(newTags);
|
|
1201
|
+
}
|
|
1202
|
+
else {
|
|
1203
|
+
// 直接修改会话文件
|
|
1204
|
+
try {
|
|
1205
|
+
const sessionsDir = getSessionsDir();
|
|
1206
|
+
const sessionFile = path.join(sessionsDir, `${session.id}.json`);
|
|
1207
|
+
if (fs.existsSync(sessionFile)) {
|
|
1208
|
+
const sessionData = JSON.parse(fs.readFileSync(sessionFile, 'utf-8'));
|
|
1209
|
+
if (!sessionData.metadata) {
|
|
1210
|
+
sessionData.metadata = {};
|
|
1211
|
+
}
|
|
1212
|
+
sessionData.metadata.tags = newTags;
|
|
1213
|
+
sessionData.metadata.modified = Date.now();
|
|
1214
|
+
fs.writeFileSync(sessionFile, JSON.stringify(sessionData, null, 2));
|
|
1215
|
+
}
|
|
1216
|
+
}
|
|
1217
|
+
catch (error) {
|
|
1218
|
+
const errorMsg = error instanceof Error ? error.message : String(error);
|
|
1219
|
+
ctx.ui.addMessage('assistant', `Error toggling tag: ${errorMsg}`);
|
|
1220
|
+
return { success: false };
|
|
1221
|
+
}
|
|
1222
|
+
}
|
|
1223
|
+
ctx.ui.addMessage('assistant', message);
|
|
1224
|
+
return { success: true };
|
|
1225
|
+
}
|
|
1226
|
+
ctx.ui.addMessage('assistant', `Unknown action: ${action}\n\nUsage:\n /tag add <name>\n /tag remove <name>\n /tag list\n /tag clear\n /tag toggle <name>`);
|
|
1227
|
+
return { success: false };
|
|
1228
|
+
},
|
|
1229
|
+
};
|
|
1230
|
+
// 辅助函数:格式化持续时间
|
|
1231
|
+
function formatDuration(ms) {
|
|
1232
|
+
const seconds = Math.floor(ms / 1000);
|
|
1233
|
+
const minutes = Math.floor(seconds / 60);
|
|
1234
|
+
const hours = Math.floor(minutes / 60);
|
|
1235
|
+
if (hours > 0) {
|
|
1236
|
+
return `${hours}h ${minutes % 60}m ${seconds % 60}s`;
|
|
1237
|
+
}
|
|
1238
|
+
else if (minutes > 0) {
|
|
1239
|
+
return `${minutes}m ${seconds % 60}s`;
|
|
1240
|
+
}
|
|
1241
|
+
else {
|
|
1242
|
+
return `${seconds}s`;
|
|
1243
|
+
}
|
|
1244
|
+
}
|
|
1245
|
+
// 注册所有会话命令
|
|
1246
|
+
export function registerSessionCommands() {
|
|
1247
|
+
commandRegistry.register(resumeCommand);
|
|
1248
|
+
commandRegistry.register(contextCommand);
|
|
1249
|
+
commandRegistry.register(compactCommand);
|
|
1250
|
+
commandRegistry.register(rewindCommand);
|
|
1251
|
+
commandRegistry.register(renameCommand);
|
|
1252
|
+
commandRegistry.register(exportCommand);
|
|
1253
|
+
commandRegistry.register(transcriptCommand);
|
|
1254
|
+
commandRegistry.register(tagCommand);
|
|
1255
|
+
}
|
|
1256
|
+
//# sourceMappingURL=session.js.map
|