@orion-agents/orion-code 0.1.9 → 0.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/README.md +142 -323
- package/README.zh-CN.md +118 -578
- package/dist/cli.js +65 -84
- package/dist/cli.js.map +1 -1
- package/dist/commands/context-commands.d.ts.map +1 -1
- package/dist/commands/context-commands.js +14 -7
- package/dist/commands/context-commands.js.map +1 -1
- package/dist/commands/context-tool-command-handlers.d.ts +4 -5
- package/dist/commands/context-tool-command-handlers.d.ts.map +1 -1
- package/dist/commands/context-tool-command-handlers.js +132 -208
- package/dist/commands/context-tool-command-handlers.js.map +1 -1
- package/dist/commands/core-command-handlers.d.ts +3 -6
- package/dist/commands/core-command-handlers.d.ts.map +1 -1
- package/dist/commands/core-command-handlers.js +66 -664
- package/dist/commands/core-command-handlers.js.map +1 -1
- package/dist/commands/diagnostic-command-handlers.d.ts +1 -2
- package/dist/commands/diagnostic-command-handlers.d.ts.map +1 -1
- package/dist/commands/diagnostic-command-handlers.js +3 -17
- package/dist/commands/diagnostic-command-handlers.js.map +1 -1
- package/dist/commands/diagnostic-commands.d.ts.map +1 -1
- package/dist/commands/diagnostic-commands.js +0 -45
- package/dist/commands/diagnostic-commands.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/index.d.ts.map +1 -1
- package/dist/commands/index.js +2 -7
- package/dist/commands/index.js.map +1 -1
- package/dist/commands/model-command-handlers.d.ts +1 -1
- package/dist/commands/model-command-handlers.js +2 -2
- package/dist/commands/model-command-handlers.js.map +1 -1
- package/dist/commands/model-commands.d.ts.map +1 -1
- package/dist/commands/model-commands.js +0 -11
- package/dist/commands/model-commands.js.map +1 -1
- package/dist/commands/registry.d.ts.map +1 -1
- package/dist/commands/registry.js +1 -139
- package/dist/commands/registry.js.map +1 -1
- package/dist/commands/session-command-handlers.d.ts +1 -1
- package/dist/commands/session-command-handlers.d.ts.map +1 -1
- package/dist/commands/session-command-handlers.js +52 -214
- package/dist/commands/session-command-handlers.js.map +1 -1
- package/dist/commands/session-commands.d.ts.map +1 -1
- package/dist/commands/session-commands.js +0 -48
- package/dist/commands/session-commands.js.map +1 -1
- package/dist/commands/target-command.d.ts +9 -15
- package/dist/commands/target-command.d.ts.map +1 -1
- package/dist/commands/target-command.js +16 -130
- package/dist/commands/target-command.js.map +1 -1
- package/dist/commands/tool-commands.d.ts.map +1 -1
- package/dist/commands/tool-commands.js +0 -10
- package/dist/commands/tool-commands.js.map +1 -1
- package/dist/commands/types.d.ts +10 -14
- package/dist/commands/types.d.ts.map +1 -1
- package/dist/commands/types.js +1 -1
- package/dist/commands/types.js.map +1 -1
- package/dist/commands/workflow-command-handlers.d.ts.map +1 -1
- package/dist/commands/workflow-command-handlers.js +1 -3
- package/dist/commands/workflow-command-handlers.js.map +1 -1
- package/dist/commands/workflow-commands.d.ts.map +1 -1
- package/dist/commands/workflow-commands.js +2 -24
- package/dist/commands/workflow-commands.js.map +1 -1
- package/dist/framework/agent-mode.d.ts +2 -3
- package/dist/framework/agent-mode.d.ts.map +1 -1
- package/dist/framework/agent-mode.js +8 -31
- package/dist/framework/agent-mode.js.map +1 -1
- package/dist/framework/index.d.ts +3 -3
- package/dist/framework/index.d.ts.map +1 -1
- package/dist/framework/index.js +6 -9
- package/dist/framework/index.js.map +1 -1
- package/dist/framework/loop-budget-contract.d.ts +20 -0
- package/dist/framework/loop-budget-contract.d.ts.map +1 -0
- package/dist/framework/loop-budget-contract.js +13 -0
- package/dist/framework/loop-budget-contract.js.map +1 -0
- package/dist/framework/prompt.d.ts.map +1 -1
- package/dist/framework/prompt.js +5 -4
- package/dist/framework/prompt.js.map +1 -1
- package/dist/framework/query.d.ts +45 -22
- package/dist/framework/query.d.ts.map +1 -1
- package/dist/framework/query.js +64 -52
- package/dist/framework/query.js.map +1 -1
- package/dist/framework/store.d.ts +4 -2
- package/dist/framework/store.d.ts.map +1 -1
- package/dist/framework/store.js +1 -0
- package/dist/framework/store.js.map +1 -1
- package/dist/framework/tool-call-orchestrator.d.ts +80 -0
- package/dist/framework/tool-call-orchestrator.d.ts.map +1 -0
- package/dist/framework/tool-call-orchestrator.js +192 -0
- package/dist/framework/tool-call-orchestrator.js.map +1 -0
- package/dist/framework/tool-state.d.ts +12 -11
- package/dist/framework/tool-state.d.ts.map +1 -1
- package/dist/framework/tool-state.js +36 -28
- package/dist/framework/tool-state.js.map +1 -1
- package/dist/framework/tool.d.ts +0 -9
- package/dist/framework/tool.d.ts.map +1 -1
- package/dist/framework/tool.js.map +1 -1
- package/dist/index.d.ts +70 -26
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +64 -65
- package/dist/index.js.map +1 -1
- package/dist/print-ui/launch.d.ts.map +1 -1
- package/dist/print-ui/launch.js +9 -2
- package/dist/print-ui/launch.js.map +1 -1
- package/dist/product/paths.d.ts +7 -0
- package/dist/product/paths.d.ts.map +1 -1
- package/dist/product/paths.js +19 -0
- package/dist/product/paths.js.map +1 -1
- package/dist/runtime/agent-loop.d.ts +80 -0
- package/dist/runtime/agent-loop.d.ts.map +1 -0
- package/dist/runtime/agent-loop.js +419 -0
- package/dist/runtime/agent-loop.js.map +1 -0
- package/dist/runtime/agent-runtime-controller.d.ts +10 -57
- package/dist/runtime/agent-runtime-controller.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-controller.js +270 -1216
- package/dist/runtime/agent-runtime-controller.js.map +1 -1
- package/dist/runtime/agent-runtime-protocol.d.ts +4 -5
- package/dist/runtime/agent-runtime-protocol.d.ts.map +1 -1
- package/dist/runtime/agent-runtime-protocol.js.map +1 -1
- package/dist/runtime/agent-runtime-runner.d.ts +36 -0
- package/dist/runtime/agent-runtime-runner.d.ts.map +1 -0
- package/dist/runtime/agent-runtime-runner.js +3 -0
- package/dist/runtime/agent-runtime-runner.js.map +1 -0
- package/dist/runtime/batch-read-service.d.ts +29 -0
- package/dist/runtime/batch-read-service.d.ts.map +1 -0
- package/dist/runtime/batch-read-service.js +212 -0
- package/dist/runtime/batch-read-service.js.map +1 -0
- package/dist/runtime/builtin-tool-provider.d.ts +30 -0
- package/dist/runtime/builtin-tool-provider.d.ts.map +1 -0
- package/dist/runtime/builtin-tool-provider.js +233 -0
- package/dist/runtime/builtin-tool-provider.js.map +1 -0
- package/dist/runtime/capabilities/compiler.d.ts +11 -0
- package/dist/runtime/capabilities/compiler.d.ts.map +1 -0
- package/dist/runtime/capabilities/compiler.js +719 -0
- package/dist/runtime/capabilities/compiler.js.map +1 -0
- package/dist/runtime/capabilities/index.d.ts +3 -0
- package/dist/runtime/capabilities/index.d.ts.map +1 -0
- package/dist/runtime/capabilities/index.js +9 -0
- package/dist/runtime/capabilities/index.js.map +1 -0
- package/dist/runtime/capabilities/types.d.ts +175 -0
- package/dist/runtime/capabilities/types.d.ts.map +1 -0
- package/dist/runtime/capabilities/types.js +3 -0
- package/dist/runtime/capabilities/types.js.map +1 -0
- package/dist/runtime/capability-receipt-journal.d.ts +29 -0
- package/dist/runtime/capability-receipt-journal.d.ts.map +1 -0
- package/dist/runtime/capability-receipt-journal.js +264 -0
- package/dist/runtime/capability-receipt-journal.js.map +1 -0
- package/dist/runtime/capability-step-factory.d.ts +73 -0
- package/dist/runtime/capability-step-factory.d.ts.map +1 -0
- package/dist/runtime/capability-step-factory.js +302 -0
- package/dist/runtime/capability-step-factory.js.map +1 -0
- package/dist/runtime/compact-transaction.d.ts +225 -0
- package/dist/runtime/compact-transaction.d.ts.map +1 -0
- package/dist/runtime/compact-transaction.js +622 -0
- package/dist/runtime/compact-transaction.js.map +1 -0
- package/dist/runtime/composer/buffer.d.ts +3 -4
- package/dist/runtime/composer/buffer.d.ts.map +1 -1
- package/dist/runtime/composer/buffer.js +3 -4
- package/dist/runtime/composer/buffer.js.map +1 -1
- package/dist/runtime/composer/grapheme.d.ts +2 -4
- package/dist/runtime/composer/grapheme.d.ts.map +1 -1
- package/dist/runtime/composer/grapheme.js +2 -4
- package/dist/runtime/composer/grapheme.js.map +1 -1
- package/dist/runtime/composer/layout.d.ts +1 -3
- package/dist/runtime/composer/layout.d.ts.map +1 -1
- package/dist/runtime/composer/layout.js +1 -3
- package/dist/runtime/composer/layout.js.map +1 -1
- package/dist/runtime/core-tools/descriptors.d.ts +17 -0
- package/dist/runtime/core-tools/descriptors.d.ts.map +1 -0
- package/dist/runtime/core-tools/descriptors.js +185 -0
- package/dist/runtime/core-tools/descriptors.js.map +1 -0
- package/dist/runtime/first-party-core-provider.d.ts +55 -0
- package/dist/runtime/first-party-core-provider.d.ts.map +1 -0
- package/dist/runtime/first-party-core-provider.js +197 -0
- package/dist/runtime/first-party-core-provider.js.map +1 -0
- package/dist/runtime/first-party-long-tail-provider.d.ts +57 -0
- package/dist/runtime/first-party-long-tail-provider.d.ts.map +1 -0
- package/dist/runtime/first-party-long-tail-provider.js +238 -0
- package/dist/runtime/first-party-long-tail-provider.js.map +1 -0
- package/dist/runtime/first-party-tool-services.d.ts +43 -0
- package/dist/runtime/first-party-tool-services.d.ts.map +1 -0
- package/dist/runtime/first-party-tool-services.js +200 -0
- package/dist/runtime/first-party-tool-services.js.map +1 -0
- package/dist/runtime/first-party-tool-universe.d.ts +14 -0
- package/dist/runtime/first-party-tool-universe.d.ts.map +1 -0
- package/dist/runtime/first-party-tool-universe.js +20 -0
- package/dist/runtime/first-party-tool-universe.js.map +1 -0
- package/dist/runtime/goal-lifecycle-v2.d.ts +63 -0
- package/dist/runtime/goal-lifecycle-v2.d.ts.map +1 -0
- package/dist/runtime/goal-lifecycle-v2.js +253 -0
- package/dist/runtime/goal-lifecycle-v2.js.map +1 -0
- package/dist/runtime/goal-runtime-coordinator.d.ts +111 -0
- package/dist/runtime/goal-runtime-coordinator.d.ts.map +1 -0
- package/dist/runtime/goal-runtime-coordinator.js +511 -0
- package/dist/runtime/goal-runtime-coordinator.js.map +1 -0
- package/dist/runtime/harness-confluence.d.ts +165 -0
- package/dist/runtime/harness-confluence.d.ts.map +1 -0
- package/dist/runtime/harness-confluence.js +807 -0
- package/dist/runtime/harness-confluence.js.map +1 -0
- package/dist/runtime/harness-eval.d.ts +96 -0
- package/dist/runtime/harness-eval.d.ts.map +1 -0
- package/dist/runtime/harness-eval.js +181 -0
- package/dist/runtime/harness-eval.js.map +1 -0
- package/dist/runtime/harness-metrics.d.ts +202 -0
- package/dist/runtime/harness-metrics.d.ts.map +1 -0
- package/dist/runtime/harness-metrics.js +415 -0
- package/dist/runtime/harness-metrics.js.map +1 -0
- package/dist/runtime/legacy-session-importer.d.ts +99 -0
- package/dist/runtime/legacy-session-importer.d.ts.map +1 -0
- package/dist/runtime/legacy-session-importer.js +455 -0
- package/dist/runtime/legacy-session-importer.js.map +1 -0
- package/dist/runtime/legacy-thread-materializer.d.ts +72 -0
- package/dist/runtime/legacy-thread-materializer.d.ts.map +1 -0
- package/dist/runtime/legacy-thread-materializer.js +553 -0
- package/dist/runtime/legacy-thread-materializer.js.map +1 -0
- package/dist/runtime/long-tail-tools/descriptors.d.ts +23 -0
- package/dist/runtime/long-tail-tools/descriptors.d.ts.map +1 -0
- package/dist/runtime/long-tail-tools/descriptors.js +423 -0
- package/dist/runtime/long-tail-tools/descriptors.js.map +1 -0
- package/dist/runtime/loop-budget.d.ts +1 -1
- package/dist/runtime/loop-budget.d.ts.map +1 -1
- package/dist/runtime/loop-budget.js +2 -2
- package/dist/runtime/loop-budget.js.map +1 -1
- package/dist/runtime/mcp/first-party-mcp-adapter.d.ts +75 -0
- package/dist/runtime/mcp/first-party-mcp-adapter.d.ts.map +1 -0
- package/dist/runtime/mcp/first-party-mcp-adapter.js +484 -0
- package/dist/runtime/mcp/first-party-mcp-adapter.js.map +1 -0
- package/dist/runtime/mcp/first-party-mcp-config.d.ts +13 -0
- package/dist/runtime/mcp/first-party-mcp-config.d.ts.map +1 -0
- package/dist/runtime/mcp/first-party-mcp-config.js +139 -0
- package/dist/runtime/mcp/first-party-mcp-config.js.map +1 -0
- package/dist/runtime/mcp/index.d.ts +5 -0
- package/dist/runtime/mcp/index.d.ts.map +1 -0
- package/dist/{skills → runtime/mcp}/index.js +3 -9
- package/dist/runtime/mcp/index.js.map +1 -0
- package/dist/runtime/mcp/lazy-mcp-runtime.d.ts +95 -0
- package/dist/runtime/mcp/lazy-mcp-runtime.d.ts.map +1 -0
- package/dist/runtime/mcp/lazy-mcp-runtime.js +854 -0
- package/dist/runtime/mcp/lazy-mcp-runtime.js.map +1 -0
- package/dist/runtime/mcp/types.d.ts +128 -0
- package/dist/runtime/mcp/types.d.ts.map +1 -0
- package/dist/runtime/mcp/types.js +5 -0
- package/dist/runtime/mcp/types.js.map +1 -0
- package/dist/runtime/orion-runtime-v1.d.ts +322 -0
- package/dist/runtime/orion-runtime-v1.d.ts.map +1 -0
- package/dist/runtime/orion-runtime-v1.js +959 -0
- package/dist/runtime/orion-runtime-v1.js.map +1 -0
- package/dist/runtime/orion-session-runner.d.ts +38 -0
- package/dist/runtime/orion-session-runner.d.ts.map +1 -0
- package/dist/runtime/orion-session-runner.js +168 -0
- package/dist/runtime/orion-session-runner.js.map +1 -0
- package/dist/runtime/product-orion-runtime.d.ts +35 -0
- package/dist/runtime/product-orion-runtime.d.ts.map +1 -0
- package/dist/runtime/product-orion-runtime.js +1047 -0
- package/dist/runtime/product-orion-runtime.js.map +1 -0
- package/dist/runtime/prompts/index.d.ts +3 -0
- package/dist/runtime/prompts/index.d.ts.map +1 -0
- package/dist/{ink-ui/types.js → runtime/prompts/index.js} +3 -2
- package/dist/runtime/prompts/index.js.map +1 -0
- package/dist/runtime/prompts/prompt-registry.d.ts +22 -0
- package/dist/runtime/prompts/prompt-registry.d.ts.map +1 -0
- package/dist/runtime/prompts/prompt-registry.js +356 -0
- package/dist/runtime/prompts/prompt-registry.js.map +1 -0
- package/dist/runtime/prompts/types.d.ts +111 -0
- package/dist/runtime/prompts/types.d.ts.map +1 -0
- package/dist/runtime/prompts/types.js +5 -0
- package/dist/runtime/prompts/types.js.map +1 -0
- package/dist/runtime/protocol/canonical.d.ts +3 -0
- package/dist/runtime/protocol/canonical.d.ts.map +1 -0
- package/dist/runtime/protocol/canonical.js +21 -0
- package/dist/runtime/protocol/canonical.js.map +1 -0
- package/dist/runtime/protocol/index.d.ts +4 -0
- package/dist/runtime/protocol/index.d.ts.map +1 -0
- package/dist/runtime/protocol/index.js +16 -0
- package/dist/runtime/protocol/index.js.map +1 -0
- package/dist/runtime/protocol/runtime-protocol-v1.d.ts +671 -0
- package/dist/runtime/protocol/runtime-protocol-v1.d.ts.map +1 -0
- package/dist/runtime/protocol/runtime-protocol-v1.js +557 -0
- package/dist/runtime/protocol/runtime-protocol-v1.js.map +1 -0
- package/dist/runtime/release-receipts.d.ts +110 -0
- package/dist/runtime/release-receipts.d.ts.map +1 -0
- package/dist/runtime/release-receipts.js +305 -0
- package/dist/runtime/release-receipts.js.map +1 -0
- package/dist/runtime/resource-scope.d.ts +123 -0
- package/dist/runtime/resource-scope.d.ts.map +1 -0
- package/dist/runtime/resource-scope.js +363 -0
- package/dist/runtime/resource-scope.js.map +1 -0
- package/dist/runtime/runtime-event-buffer.d.ts +78 -0
- package/dist/runtime/runtime-event-buffer.d.ts.map +1 -0
- package/dist/runtime/runtime-event-buffer.js +237 -0
- package/dist/runtime/runtime-event-buffer.js.map +1 -0
- package/dist/runtime/runtime-services.d.ts +87 -0
- package/dist/runtime/runtime-services.d.ts.map +1 -0
- package/dist/runtime/runtime-services.js +180 -0
- package/dist/runtime/runtime-services.js.map +1 -0
- package/dist/runtime/session-history-recovery.d.ts +19 -0
- package/dist/runtime/session-history-recovery.d.ts.map +1 -0
- package/dist/runtime/session-history-recovery.js +45 -0
- package/dist/runtime/session-history-recovery.js.map +1 -0
- package/dist/runtime/skills/bounded-lru-cache.d.ts +34 -0
- package/dist/runtime/skills/bounded-lru-cache.d.ts.map +1 -0
- package/dist/runtime/skills/bounded-lru-cache.js +100 -0
- package/dist/runtime/skills/bounded-lru-cache.js.map +1 -0
- package/dist/runtime/skills/filesystem-skill-provider.d.ts +96 -0
- package/dist/runtime/skills/filesystem-skill-provider.d.ts.map +1 -0
- package/dist/runtime/skills/filesystem-skill-provider.js +829 -0
- package/dist/runtime/skills/filesystem-skill-provider.js.map +1 -0
- package/dist/runtime/skills/index.d.ts +5 -0
- package/dist/runtime/skills/index.d.ts.map +1 -0
- package/dist/{ink-ui/controllers/chat-controller.js → runtime/skills/index.js} +5 -2
- package/dist/runtime/skills/index.js.map +1 -0
- package/dist/runtime/skills/lazy-skill-runtime.d.ts +77 -0
- package/dist/runtime/skills/lazy-skill-runtime.d.ts.map +1 -0
- package/dist/runtime/skills/lazy-skill-runtime.js +673 -0
- package/dist/runtime/skills/lazy-skill-runtime.js.map +1 -0
- package/dist/runtime/skills/types.d.ts +137 -0
- package/dist/runtime/skills/types.d.ts.map +1 -0
- package/dist/runtime/skills/types.js +13 -0
- package/dist/runtime/skills/types.js.map +1 -0
- package/dist/runtime/step-snapshot.d.ts +183 -0
- package/dist/runtime/step-snapshot.d.ts.map +1 -0
- package/dist/runtime/step-snapshot.js +286 -0
- package/dist/runtime/step-snapshot.js.map +1 -0
- package/dist/runtime/subagent-thread-runtime.d.ts +239 -0
- package/dist/runtime/subagent-thread-runtime.d.ts.map +1 -0
- package/dist/runtime/subagent-thread-runtime.js +876 -0
- package/dist/runtime/subagent-thread-runtime.js.map +1 -0
- package/dist/runtime/subagents/index.d.ts +4 -1
- package/dist/runtime/subagents/index.d.ts.map +1 -1
- package/dist/runtime/subagents/index.js +10 -2
- package/dist/runtime/subagents/index.js.map +1 -1
- package/dist/runtime/subagents/parent-step-fork.d.ts +36 -0
- package/dist/runtime/subagents/parent-step-fork.d.ts.map +1 -0
- package/dist/runtime/subagents/parent-step-fork.js +83 -0
- package/dist/runtime/subagents/parent-step-fork.js.map +1 -0
- package/dist/runtime/subagents/production.d.ts +65 -46
- package/dist/runtime/subagents/production.d.ts.map +1 -1
- package/dist/runtime/subagents/production.js +494 -170
- package/dist/runtime/subagents/production.js.map +1 -1
- package/dist/runtime/subagents/receipt-journal.d.ts +20 -0
- package/dist/runtime/subagents/receipt-journal.d.ts.map +1 -0
- package/dist/runtime/subagents/receipt-journal.js +74 -0
- package/dist/runtime/subagents/receipt-journal.js.map +1 -0
- package/dist/runtime/subagents/runtime-contract.d.ts +29 -0
- package/dist/runtime/subagents/runtime-contract.d.ts.map +1 -0
- package/dist/runtime/subagents/runtime-contract.js +3 -0
- package/dist/runtime/subagents/runtime-contract.js.map +1 -0
- package/dist/runtime/subagents/runtime-integration.d.ts +41 -56
- package/dist/runtime/subagents/runtime-integration.d.ts.map +1 -1
- package/dist/runtime/subagents/runtime-integration.js +34 -198
- package/dist/runtime/subagents/runtime-integration.js.map +1 -1
- package/dist/runtime/subagents/supervisor.d.ts +19 -7
- package/dist/runtime/subagents/supervisor.d.ts.map +1 -1
- package/dist/runtime/subagents/supervisor.js +83 -40
- package/dist/runtime/subagents/supervisor.js.map +1 -1
- package/dist/runtime/subagents/types.d.ts +1 -1
- package/dist/runtime/subagents/types.js +1 -1
- package/dist/runtime/task-context-service.d.ts +91 -0
- package/dist/runtime/task-context-service.d.ts.map +1 -0
- package/dist/runtime/task-context-service.js +122 -0
- package/dist/runtime/task-context-service.js.map +1 -0
- package/dist/runtime/thread-admission.d.ts +130 -0
- package/dist/runtime/thread-admission.d.ts.map +1 -0
- package/dist/runtime/thread-admission.js +276 -0
- package/dist/runtime/thread-admission.js.map +1 -0
- package/dist/runtime/thread-compact-persistence.d.ts +50 -0
- package/dist/runtime/thread-compact-persistence.d.ts.map +1 -0
- package/dist/runtime/thread-compact-persistence.js +176 -0
- package/dist/runtime/thread-compact-persistence.js.map +1 -0
- package/dist/runtime/thread-event-store.d.ts +98 -0
- package/dist/runtime/thread-event-store.d.ts.map +1 -0
- package/dist/runtime/thread-event-store.js +737 -0
- package/dist/runtime/thread-event-store.js.map +1 -0
- package/dist/runtime/thread-projection.d.ts +91 -0
- package/dist/runtime/thread-projection.d.ts.map +1 -0
- package/dist/runtime/thread-projection.js +407 -0
- package/dist/runtime/thread-projection.js.map +1 -0
- package/dist/runtime/thread-runtime.d.ts +165 -0
- package/dist/runtime/thread-runtime.d.ts.map +1 -0
- package/dist/runtime/thread-runtime.js +704 -0
- package/dist/runtime/thread-runtime.js.map +1 -0
- package/dist/runtime/thread-session-view.d.ts +45 -0
- package/dist/runtime/thread-session-view.d.ts.map +1 -0
- package/dist/runtime/thread-session-view.js +264 -0
- package/dist/runtime/thread-session-view.js.map +1 -0
- package/dist/runtime/thread-tool-journal.d.ts +11 -0
- package/dist/runtime/thread-tool-journal.d.ts.map +1 -0
- package/dist/runtime/thread-tool-journal.js +131 -0
- package/dist/runtime/thread-tool-journal.js.map +1 -0
- package/dist/runtime/thread-ui-adapter.d.ts +87 -0
- package/dist/runtime/thread-ui-adapter.d.ts.map +1 -0
- package/dist/runtime/thread-ui-adapter.js +580 -0
- package/dist/runtime/thread-ui-adapter.js.map +1 -0
- package/dist/runtime/tool-gateway.d.ts +159 -0
- package/dist/runtime/tool-gateway.d.ts.map +1 -0
- package/dist/runtime/tool-gateway.js +311 -0
- package/dist/runtime/tool-gateway.js.map +1 -0
- package/dist/runtime/turn-commit.d.ts +103 -0
- package/dist/runtime/turn-commit.d.ts.map +1 -0
- package/dist/runtime/turn-commit.js +321 -0
- package/dist/runtime/turn-commit.js.map +1 -0
- package/dist/runtime/ui-events.d.ts +15 -5
- package/dist/runtime/ui-events.d.ts.map +1 -1
- package/dist/runtime/ui-events.js +0 -1
- package/dist/runtime/ui-events.js.map +1 -1
- package/dist/runtime/ui-view-model.d.ts +2 -1
- package/dist/runtime/ui-view-model.d.ts.map +1 -1
- package/dist/runtime/ui-view-model.js +6 -5
- package/dist/runtime/ui-view-model.js.map +1 -1
- package/dist/services/config-dir.d.ts +1 -1
- package/dist/services/config-dir.d.ts.map +1 -1
- package/dist/services/config-dir.js +2 -1
- package/dist/services/config-dir.js.map +1 -1
- package/dist/services/config.d.ts +2 -16
- package/dist/services/config.d.ts.map +1 -1
- package/dist/services/config.js +2 -29
- package/dist/services/config.js.map +1 -1
- package/dist/services/doctor.d.ts +0 -2
- package/dist/services/doctor.d.ts.map +1 -1
- package/dist/services/doctor.js +39 -64
- package/dist/services/doctor.js.map +1 -1
- package/dist/services/file-lock.d.ts.map +1 -1
- package/dist/services/file-lock.js +42 -17
- package/dist/services/file-lock.js.map +1 -1
- package/dist/services/global-config.d.ts +2 -2
- package/dist/services/global-config.d.ts.map +1 -1
- package/dist/services/session-storage.d.ts +8 -0
- package/dist/services/session-storage.d.ts.map +1 -1
- package/dist/services/session-storage.js +76 -12
- package/dist/services/session-storage.js.map +1 -1
- package/dist/skills/builtin/code-review/SKILL.md +51 -0
- package/dist/skills/builtin/security-check/SKILL.md +54 -0
- package/dist/skills/builtin/test-gen/SKILL.md +49 -0
- package/dist/terminal-ui/launch.d.ts +3 -1
- package/dist/terminal-ui/launch.d.ts.map +1 -1
- package/dist/terminal-ui/launch.js +21 -3
- package/dist/terminal-ui/launch.js.map +1 -1
- package/dist/tools/core/common.d.ts +34 -0
- package/dist/tools/core/common.d.ts.map +1 -0
- package/dist/tools/core/common.js +164 -0
- package/dist/tools/core/common.js.map +1 -0
- package/dist/tools/core/edit-file.d.ts +10 -0
- package/dist/tools/core/edit-file.d.ts.map +1 -0
- package/dist/tools/core/edit-file.js +301 -0
- package/dist/tools/core/edit-file.js.map +1 -0
- package/dist/tools/core/exec-command.d.ts +2 -0
- package/dist/tools/core/exec-command.d.ts.map +1 -0
- package/dist/tools/core/exec-command.js +347 -0
- package/dist/tools/core/exec-command.js.map +1 -0
- package/dist/tools/core/glob.d.ts +2 -0
- package/dist/tools/core/glob.d.ts.map +1 -0
- package/dist/tools/core/glob.js +133 -0
- package/dist/tools/core/glob.js.map +1 -0
- package/dist/tools/core/grep.d.ts +12 -0
- package/dist/tools/core/grep.d.ts.map +1 -0
- package/dist/tools/core/grep.js +223 -0
- package/dist/tools/core/grep.js.map +1 -0
- package/dist/tools/core/index.d.ts +15 -0
- package/dist/tools/core/index.d.ts.map +1 -0
- package/dist/tools/core/index.js +31 -0
- package/dist/tools/core/index.js.map +1 -0
- package/dist/tools/core/list-files.d.ts +2 -0
- package/dist/tools/core/list-files.d.ts.map +1 -0
- package/dist/tools/core/list-files.js +87 -0
- package/dist/tools/core/list-files.js.map +1 -0
- package/dist/tools/core/read-file.d.ts +2 -0
- package/dist/tools/core/read-file.d.ts.map +1 -0
- package/dist/tools/core/read-file.js +129 -0
- package/dist/tools/core/read-file.js.map +1 -0
- package/dist/tools/core/write-file.d.ts +2 -0
- package/dist/tools/core/write-file.d.ts.map +1 -0
- package/dist/tools/core/write-file.js +65 -0
- package/dist/tools/core/write-file.js.map +1 -0
- package/dist/tools/todo.d.ts +3 -4
- package/dist/tools/todo.d.ts.map +1 -1
- package/dist/tools/todo.js +80 -79
- package/dist/tools/todo.js.map +1 -1
- package/dist/tools/web.js +1 -1
- package/dist/tools/web.js.map +1 -1
- package/dist/tui-ui/chrome-view-model.d.ts.map +1 -1
- package/dist/tui-ui/chrome-view-model.js +22 -8
- package/dist/tui-ui/chrome-view-model.js.map +1 -1
- package/dist/tui-ui/launch.d.ts.map +1 -1
- package/dist/tui-ui/launch.js +13 -0
- package/dist/tui-ui/launch.js.map +1 -1
- package/dist/tui-ui/layout.js +1 -1
- package/dist/tui-ui/layout.js.map +1 -1
- package/dist/tui-ui/state.d.ts.map +1 -1
- package/dist/tui-ui/state.js +2 -0
- package/dist/tui-ui/state.js.map +1 -1
- package/docs/migration/v0.1.9-to-v0.2.0.md +98 -0
- package/docs/orion.example.json +79 -0
- package/docs/plan/v0.2.0-dsh-harness-redesign-plan.md +1234 -0
- package/docs/plan/v0.2.0-release-checklist.md +91 -0
- package/docs/readme.md +8 -8
- package/npm-shrinkwrap.json +45 -450
- package/package.json +17 -13
- package/dist/agents/coder.d.ts +0 -12
- package/dist/agents/coder.d.ts.map +0 -1
- package/dist/agents/coder.js +0 -48
- package/dist/agents/coder.js.map +0 -1
- package/dist/agents/coordinator.d.ts +0 -86
- package/dist/agents/coordinator.d.ts.map +0 -1
- package/dist/agents/coordinator.js +0 -291
- package/dist/agents/coordinator.js.map +0 -1
- package/dist/agents/fork.d.ts +0 -73
- package/dist/agents/fork.d.ts.map +0 -1
- package/dist/agents/fork.js +0 -163
- package/dist/agents/fork.js.map +0 -1
- package/dist/agents/leader.d.ts +0 -12
- package/dist/agents/leader.d.ts.map +0 -1
- package/dist/agents/leader.js +0 -49
- package/dist/agents/leader.js.map +0 -1
- package/dist/agents/router.d.ts +0 -59
- package/dist/agents/router.d.ts.map +0 -1
- package/dist/agents/router.js +0 -193
- package/dist/agents/router.js.map +0 -1
- package/dist/agents/worker-pool.d.ts +0 -72
- package/dist/agents/worker-pool.d.ts.map +0 -1
- package/dist/agents/worker-pool.js +0 -229
- package/dist/agents/worker-pool.js.map +0 -1
- package/dist/commands/legacy-commands.d.ts +0 -4
- package/dist/commands/legacy-commands.d.ts.map +0 -1
- package/dist/commands/legacy-commands.js +0 -44
- package/dist/commands/legacy-commands.js.map +0 -1
- package/dist/core/agent.d.ts +0 -84
- package/dist/core/agent.d.ts.map +0 -1
- package/dist/core/agent.js +0 -58
- package/dist/core/agent.js.map +0 -1
- package/dist/core/brain.d.ts +0 -50
- package/dist/core/brain.d.ts.map +0 -1
- package/dist/core/brain.js +0 -95
- package/dist/core/brain.js.map +0 -1
- package/dist/framework/tool-scheduler.d.ts +0 -191
- package/dist/framework/tool-scheduler.d.ts.map +0 -1
- package/dist/framework/tool-scheduler.js +0 -573
- package/dist/framework/tool-scheduler.js.map +0 -1
- package/dist/harness/harness.d.ts +0 -58
- package/dist/harness/harness.d.ts.map +0 -1
- package/dist/harness/harness.js +0 -195
- package/dist/harness/harness.js.map +0 -1
- package/dist/harness/safety.d.ts +0 -101
- package/dist/harness/safety.d.ts.map +0 -1
- package/dist/harness/safety.js +0 -322
- package/dist/harness/safety.js.map +0 -1
- package/dist/init.d.ts +0 -108
- package/dist/init.d.ts.map +0 -1
- package/dist/init.js +0 -393
- package/dist/init.js.map +0 -1
- package/dist/ink-ui/App.d.ts +0 -9
- package/dist/ink-ui/App.d.ts.map +0 -1
- package/dist/ink-ui/App.js +0 -12
- package/dist/ink-ui/App.js.map +0 -1
- package/dist/ink-ui/components/Markdown.d.ts +0 -10
- package/dist/ink-ui/components/Markdown.d.ts.map +0 -1
- package/dist/ink-ui/components/Markdown.js +0 -210
- package/dist/ink-ui/components/Markdown.js.map +0 -1
- package/dist/ink-ui/components/NativeCursor.d.ts +0 -12
- package/dist/ink-ui/components/NativeCursor.d.ts.map +0 -1
- package/dist/ink-ui/components/NativeCursor.js +0 -35
- package/dist/ink-ui/components/NativeCursor.js.map +0 -1
- package/dist/ink-ui/components/PixelHorseBanner.d.ts +0 -8
- package/dist/ink-ui/components/PixelHorseBanner.d.ts.map +0 -1
- package/dist/ink-ui/components/PixelHorseBanner.js +0 -97
- package/dist/ink-ui/components/PixelHorseBanner.js.map +0 -1
- package/dist/ink-ui/components/PromptInput.d.ts +0 -13
- package/dist/ink-ui/components/PromptInput.d.ts.map +0 -1
- package/dist/ink-ui/components/PromptInput.js +0 -30
- package/dist/ink-ui/components/PromptInput.js.map +0 -1
- package/dist/ink-ui/components/RunningHorseIndicator.d.ts +0 -13
- package/dist/ink-ui/components/RunningHorseIndicator.d.ts.map +0 -1
- package/dist/ink-ui/components/RunningHorseIndicator.js +0 -53
- package/dist/ink-ui/components/RunningHorseIndicator.js.map +0 -1
- package/dist/ink-ui/components/SelectList.d.ts +0 -16
- package/dist/ink-ui/components/SelectList.d.ts.map +0 -1
- package/dist/ink-ui/components/SelectList.js +0 -60
- package/dist/ink-ui/components/SelectList.js.map +0 -1
- package/dist/ink-ui/components/StatusLine.d.ts +0 -11
- package/dist/ink-ui/components/StatusLine.d.ts.map +0 -1
- package/dist/ink-ui/components/StatusLine.js +0 -70
- package/dist/ink-ui/components/StatusLine.js.map +0 -1
- package/dist/ink-ui/components/ToolActivity.d.ts +0 -19
- package/dist/ink-ui/components/ToolActivity.d.ts.map +0 -1
- package/dist/ink-ui/components/ToolActivity.js +0 -134
- package/dist/ink-ui/components/ToolActivity.js.map +0 -1
- package/dist/ink-ui/components/Transcript.d.ts +0 -14
- package/dist/ink-ui/components/Transcript.d.ts.map +0 -1
- package/dist/ink-ui/components/Transcript.js +0 -66
- package/dist/ink-ui/components/Transcript.js.map +0 -1
- package/dist/ink-ui/controllers/chat-controller.d.ts +0 -2
- package/dist/ink-ui/controllers/chat-controller.d.ts.map +0 -1
- package/dist/ink-ui/controllers/chat-controller.js.map +0 -1
- package/dist/ink-ui/hooks/use-raw-input-bridge.d.ts +0 -6
- package/dist/ink-ui/hooks/use-raw-input-bridge.d.ts.map +0 -1
- package/dist/ink-ui/hooks/use-raw-input-bridge.js +0 -27
- package/dist/ink-ui/hooks/use-raw-input-bridge.js.map +0 -1
- package/dist/ink-ui/hooks/use-terminal-size.d.ts +0 -7
- package/dist/ink-ui/hooks/use-terminal-size.d.ts.map +0 -1
- package/dist/ink-ui/hooks/use-terminal-size.js +0 -34
- package/dist/ink-ui/hooks/use-terminal-size.js.map +0 -1
- package/dist/ink-ui/launch.d.ts +0 -9
- package/dist/ink-ui/launch.d.ts.map +0 -1
- package/dist/ink-ui/launch.js +0 -101
- package/dist/ink-ui/launch.js.map +0 -1
- package/dist/ink-ui/runtime/grapheme.d.ts +0 -10
- package/dist/ink-ui/runtime/grapheme.d.ts.map +0 -1
- package/dist/ink-ui/runtime/grapheme.js +0 -17
- package/dist/ink-ui/runtime/grapheme.js.map +0 -1
- package/dist/ink-ui/runtime/input-buffer.d.ts +0 -10
- package/dist/ink-ui/runtime/input-buffer.d.ts.map +0 -1
- package/dist/ink-ui/runtime/input-buffer.js +0 -18
- package/dist/ink-ui/runtime/input-buffer.js.map +0 -1
- package/dist/ink-ui/runtime/layout-budget.d.ts +0 -13
- package/dist/ink-ui/runtime/layout-budget.d.ts.map +0 -1
- package/dist/ink-ui/runtime/layout-budget.js +0 -25
- package/dist/ink-ui/runtime/layout-budget.js.map +0 -1
- package/dist/ink-ui/runtime/native-cursor.d.ts +0 -62
- package/dist/ink-ui/runtime/native-cursor.d.ts.map +0 -1
- package/dist/ink-ui/runtime/native-cursor.js +0 -398
- package/dist/ink-ui/runtime/native-cursor.js.map +0 -1
- package/dist/ink-ui/runtime/prompt-layout.d.ts +0 -10
- package/dist/ink-ui/runtime/prompt-layout.d.ts.map +0 -1
- package/dist/ink-ui/runtime/prompt-layout.js +0 -21
- package/dist/ink-ui/runtime/prompt-layout.js.map +0 -1
- package/dist/ink-ui/runtime/raw-input.d.ts +0 -4
- package/dist/ink-ui/runtime/raw-input.d.ts.map +0 -1
- package/dist/ink-ui/runtime/raw-input.js +0 -15
- package/dist/ink-ui/runtime/raw-input.js.map +0 -1
- package/dist/ink-ui/runtime/transcript-state.d.ts +0 -37
- package/dist/ink-ui/runtime/transcript-state.d.ts.map +0 -1
- package/dist/ink-ui/runtime/transcript-state.js +0 -91
- package/dist/ink-ui/runtime/transcript-state.js.map +0 -1
- package/dist/ink-ui/screens/ReplScreen.d.ts +0 -27
- package/dist/ink-ui/screens/ReplScreen.d.ts.map +0 -1
- package/dist/ink-ui/screens/ReplScreen.js +0 -781
- package/dist/ink-ui/screens/ReplScreen.js.map +0 -1
- package/dist/ink-ui/types.d.ts +0 -2
- package/dist/ink-ui/types.d.ts.map +0 -1
- package/dist/ink-ui/types.js.map +0 -1
- package/dist/runtime/chat-checkpoint.d.ts +0 -17
- package/dist/runtime/chat-checkpoint.d.ts.map +0 -1
- package/dist/runtime/chat-checkpoint.js +0 -105
- package/dist/runtime/chat-checkpoint.js.map +0 -1
- package/dist/runtime/chat-command-scope.d.ts +0 -5
- package/dist/runtime/chat-command-scope.d.ts.map +0 -1
- package/dist/runtime/chat-command-scope.js +0 -22
- package/dist/runtime/chat-command-scope.js.map +0 -1
- package/dist/runtime/chat-compact.d.ts +0 -26
- package/dist/runtime/chat-compact.d.ts.map +0 -1
- package/dist/runtime/chat-compact.js +0 -132
- package/dist/runtime/chat-compact.js.map +0 -1
- package/dist/runtime/chat-controller.d.ts +0 -62
- package/dist/runtime/chat-controller.d.ts.map +0 -1
- package/dist/runtime/chat-controller.js +0 -1620
- package/dist/runtime/chat-controller.js.map +0 -1
- package/dist/runtime/chat-effort.d.ts +0 -5
- package/dist/runtime/chat-effort.d.ts.map +0 -1
- package/dist/runtime/chat-effort.js +0 -47
- package/dist/runtime/chat-effort.js.map +0 -1
- package/dist/runtime/chat-presentation.d.ts +0 -63
- package/dist/runtime/chat-presentation.d.ts.map +0 -1
- package/dist/runtime/chat-presentation.js +0 -561
- package/dist/runtime/chat-presentation.js.map +0 -1
- package/dist/runtime/chat-trace.d.ts +0 -52
- package/dist/runtime/chat-trace.d.ts.map +0 -1
- package/dist/runtime/chat-trace.js +0 -234
- package/dist/runtime/chat-trace.js.map +0 -1
- package/dist/runtime/chat-workspace.d.ts +0 -22
- package/dist/runtime/chat-workspace.d.ts.map +0 -1
- package/dist/runtime/chat-workspace.js +0 -154
- package/dist/runtime/chat-workspace.js.map +0 -1
- package/dist/runtime/goals/accounting.d.ts +0 -45
- package/dist/runtime/goals/accounting.d.ts.map +0 -1
- package/dist/runtime/goals/accounting.js +0 -114
- package/dist/runtime/goals/accounting.js.map +0 -1
- package/dist/runtime/goals/coordinator.d.ts +0 -92
- package/dist/runtime/goals/coordinator.d.ts.map +0 -1
- package/dist/runtime/goals/coordinator.js +0 -1471
- package/dist/runtime/goals/coordinator.js.map +0 -1
- package/dist/runtime/goals/lifecycle.d.ts +0 -13
- package/dist/runtime/goals/lifecycle.d.ts.map +0 -1
- package/dist/runtime/goals/lifecycle.js +0 -46
- package/dist/runtime/goals/lifecycle.js.map +0 -1
- package/dist/runtime/goals/prompt.d.ts +0 -16
- package/dist/runtime/goals/prompt.d.ts.map +0 -1
- package/dist/runtime/goals/prompt.js +0 -88
- package/dist/runtime/goals/prompt.js.map +0 -1
- package/dist/runtime/goals/stop-policy.d.ts +0 -9
- package/dist/runtime/goals/stop-policy.d.ts.map +0 -1
- package/dist/runtime/goals/stop-policy.js +0 -83
- package/dist/runtime/goals/stop-policy.js.map +0 -1
- package/dist/runtime/goals/tools.d.ts +0 -61
- package/dist/runtime/goals/tools.d.ts.map +0 -1
- package/dist/runtime/goals/tools.js +0 -568
- package/dist/runtime/goals/tools.js.map +0 -1
- package/dist/sdk/index.d.ts +0 -10
- package/dist/sdk/index.d.ts.map +0 -1
- package/dist/sdk/index.js +0 -23
- package/dist/sdk/index.js.map +0 -1
- package/dist/sdk/init.d.ts +0 -24
- package/dist/sdk/init.d.ts.map +0 -1
- package/dist/sdk/init.js +0 -48
- package/dist/sdk/init.js.map +0 -1
- package/dist/sdk/query.d.ts +0 -19
- package/dist/sdk/query.d.ts.map +0 -1
- package/dist/sdk/query.js +0 -42
- package/dist/sdk/query.js.map +0 -1
- package/dist/sdk/sessions.d.ts +0 -19
- package/dist/sdk/sessions.d.ts.map +0 -1
- package/dist/sdk/sessions.js +0 -57
- package/dist/sdk/sessions.js.map +0 -1
- package/dist/sdk/types.d.ts +0 -47
- package/dist/sdk/types.d.ts.map +0 -1
- package/dist/sdk/types.js +0 -8
- package/dist/sdk/types.js.map +0 -1
- package/dist/services/agent-runner.d.ts +0 -71
- package/dist/services/agent-runner.d.ts.map +0 -1
- package/dist/services/agent-runner.js +0 -185
- package/dist/services/agent-runner.js.map +0 -1
- package/dist/services/task-manager.d.ts +0 -161
- package/dist/services/task-manager.d.ts.map +0 -1
- package/dist/services/task-manager.js +0 -315
- package/dist/services/task-manager.js.map +0 -1
- package/dist/skills/discovery.d.ts +0 -22
- package/dist/skills/discovery.d.ts.map +0 -1
- package/dist/skills/discovery.js +0 -75
- package/dist/skills/discovery.js.map +0 -1
- package/dist/skills/index.d.ts +0 -11
- package/dist/skills/index.d.ts.map +0 -1
- package/dist/skills/index.js.map +0 -1
- package/dist/skills/loader.d.ts +0 -53
- package/dist/skills/loader.d.ts.map +0 -1
- package/dist/skills/loader.js +0 -421
- package/dist/skills/loader.js.map +0 -1
- package/dist/skills/registry.d.ts +0 -41
- package/dist/skills/registry.d.ts.map +0 -1
- package/dist/skills/registry.js +0 -157
- package/dist/skills/registry.js.map +0 -1
- package/dist/skills/runtime.d.ts +0 -46
- package/dist/skills/runtime.d.ts.map +0 -1
- package/dist/skills/runtime.js +0 -363
- package/dist/skills/runtime.js.map +0 -1
- package/dist/skills/types.d.ts +0 -112
- package/dist/skills/types.d.ts.map +0 -1
- package/dist/skills/types.js +0 -24
- package/dist/skills/types.js.map +0 -1
- package/dist/tools/index.d.ts +0 -52
- package/dist/tools/index.d.ts.map +0 -1
- package/dist/tools/index.js +0 -2268
- package/dist/tools/index.js.map +0 -1
- package/dist/tools/mcp.d.ts +0 -99
- package/dist/tools/mcp.d.ts.map +0 -1
- package/dist/tools/mcp.js +0 -695
- package/dist/tools/mcp.js.map +0 -1
- package/dist/tools/plan.d.ts +0 -17
- package/dist/tools/plan.d.ts.map +0 -1
- package/dist/tools/plan.js +0 -84
- package/dist/tools/plan.js.map +0 -1
- package/docs/migration/v0.1.8-to-v0.1.9.md +0 -60
- package/docs/plan/v0.1.9-release-checklist.md +0 -64
|
@@ -1,781 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
-
}
|
|
8
|
-
Object.defineProperty(o, k2, desc);
|
|
9
|
-
}) : (function(o, m, k, k2) {
|
|
10
|
-
if (k2 === undefined) k2 = k;
|
|
11
|
-
o[k2] = m[k];
|
|
12
|
-
}));
|
|
13
|
-
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
-
}) : function(o, v) {
|
|
16
|
-
o["default"] = v;
|
|
17
|
-
});
|
|
18
|
-
var __importStar = (this && this.__importStar) || (function () {
|
|
19
|
-
var ownKeys = function(o) {
|
|
20
|
-
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
21
|
-
var ar = [];
|
|
22
|
-
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
23
|
-
return ar;
|
|
24
|
-
};
|
|
25
|
-
return ownKeys(o);
|
|
26
|
-
};
|
|
27
|
-
return function (mod) {
|
|
28
|
-
if (mod && mod.__esModule) return mod;
|
|
29
|
-
var result = {};
|
|
30
|
-
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
31
|
-
__setModuleDefault(result, mod);
|
|
32
|
-
return result;
|
|
33
|
-
};
|
|
34
|
-
})();
|
|
35
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
36
|
-
exports.stopAndShutdownInkRuntime = stopAndShutdownInkRuntime;
|
|
37
|
-
exports.visibleCommandItems = visibleCommandItems;
|
|
38
|
-
exports.hasRecognizedCommandArguments = hasRecognizedCommandArguments;
|
|
39
|
-
exports.getFileQuery = getFileQuery;
|
|
40
|
-
exports.visibleFileItems = visibleFileItems;
|
|
41
|
-
exports.sessionItems = sessionItems;
|
|
42
|
-
exports.modelItems = modelItems;
|
|
43
|
-
exports.permissionItems = permissionItems;
|
|
44
|
-
exports.editPreviewTitle = editPreviewTitle;
|
|
45
|
-
exports.editPreviewItems = editPreviewItems;
|
|
46
|
-
exports.normalizePastedInput = normalizePastedInput;
|
|
47
|
-
exports.isMultilinePasteValue = isMultilinePasteValue;
|
|
48
|
-
exports.ReplScreen = ReplScreen;
|
|
49
|
-
const react_1 = __importStar(require("react"));
|
|
50
|
-
const ink_1 = require("ink");
|
|
51
|
-
const commands_1 = require("../../commands");
|
|
52
|
-
const types_1 = require("../../commands/types");
|
|
53
|
-
const agent_runtime_controller_1 = require("../../runtime/agent-runtime-controller");
|
|
54
|
-
const ui_events_1 = require("../../runtime/ui-events");
|
|
55
|
-
const ui_view_model_1 = require("../../runtime/ui-view-model");
|
|
56
|
-
const global_config_1 = require("../../services/global-config");
|
|
57
|
-
const format_1 = require("../../services/format");
|
|
58
|
-
const file_glob_1 = require("../../services/file-glob");
|
|
59
|
-
const NativeCursor_1 = require("../components/NativeCursor");
|
|
60
|
-
const PromptInput_1 = require("../components/PromptInput");
|
|
61
|
-
const PixelHorseBanner_1 = require("../components/PixelHorseBanner");
|
|
62
|
-
const SelectList_1 = require("../components/SelectList");
|
|
63
|
-
const StatusLine_1 = require("../components/StatusLine");
|
|
64
|
-
const Transcript_1 = require("../components/Transcript");
|
|
65
|
-
const use_raw_input_bridge_1 = require("../hooks/use-raw-input-bridge");
|
|
66
|
-
const use_terminal_size_1 = require("../hooks/use-terminal-size");
|
|
67
|
-
const input_buffer_1 = require("../runtime/input-buffer");
|
|
68
|
-
const layout_budget_1 = require("../runtime/layout-budget");
|
|
69
|
-
const raw_input_1 = require("../runtime/raw-input");
|
|
70
|
-
const transcript_state_1 = require("../runtime/transcript-state");
|
|
71
|
-
let nextTranscriptId = 1;
|
|
72
|
-
function createId() {
|
|
73
|
-
return `ui-${nextTranscriptId++}`;
|
|
74
|
-
}
|
|
75
|
-
/** Stop the active agent state machine before releasing runtime resources. */
|
|
76
|
-
async function stopAndShutdownInkRuntime(controller, runtime) {
|
|
77
|
-
let stopError;
|
|
78
|
-
try {
|
|
79
|
-
await controller.stopActiveTurn();
|
|
80
|
-
}
|
|
81
|
-
catch (error) {
|
|
82
|
-
stopError = error;
|
|
83
|
-
}
|
|
84
|
-
try {
|
|
85
|
-
await runtime.shutdown();
|
|
86
|
-
}
|
|
87
|
-
catch (shutdownError) {
|
|
88
|
-
if (stopError) {
|
|
89
|
-
throw new Error(`Failed to stop active turn and shut down runtime: ${String(stopError)}; ${String(shutdownError)}`);
|
|
90
|
-
}
|
|
91
|
-
throw shutdownError;
|
|
92
|
-
}
|
|
93
|
-
if (stopError)
|
|
94
|
-
throw stopError;
|
|
95
|
-
}
|
|
96
|
-
function visibleCommandItems(input) {
|
|
97
|
-
return (0, ui_view_model_1.createCommandPickerState)({
|
|
98
|
-
input,
|
|
99
|
-
commands: (0, commands_1.getVisibleCommands)('ink'),
|
|
100
|
-
maxVisibleItems: 10,
|
|
101
|
-
categoryLabel: commands_1.getCommandCategoryLabel,
|
|
102
|
-
}).visibleItems.map(item => ({
|
|
103
|
-
value: item.value,
|
|
104
|
-
label: item.label,
|
|
105
|
-
description: item.description,
|
|
106
|
-
}));
|
|
107
|
-
}
|
|
108
|
-
function hasRecognizedCommandArguments(input) {
|
|
109
|
-
const match = input.trim().match(/^\/([^\s]+)\s+\S/u);
|
|
110
|
-
if (!match)
|
|
111
|
-
return false;
|
|
112
|
-
const name = match[1].toLowerCase();
|
|
113
|
-
return (0, commands_1.findCommand)(name) !== undefined;
|
|
114
|
-
}
|
|
115
|
-
function getFileQuery(input) {
|
|
116
|
-
return (0, ui_view_model_1.getFileMentionQuery)(input);
|
|
117
|
-
}
|
|
118
|
-
function visibleFileItems(cwd, input) {
|
|
119
|
-
const fileQuery = getFileQuery(input);
|
|
120
|
-
if (!fileQuery)
|
|
121
|
-
return [];
|
|
122
|
-
const state = (0, ui_view_model_1.createFilePickerState)({
|
|
123
|
-
input,
|
|
124
|
-
files: (0, file_glob_1.matchFiles)(fileQuery.query, cwd, { limit: 80 }),
|
|
125
|
-
maxVisibleItems: 80,
|
|
126
|
-
});
|
|
127
|
-
return (state?.visibleItems.map(item => ({
|
|
128
|
-
value: item.value,
|
|
129
|
-
label: item.label,
|
|
130
|
-
description: item.description,
|
|
131
|
-
})) ?? []);
|
|
132
|
-
}
|
|
133
|
-
function sessionTitle(session) {
|
|
134
|
-
return session.name || session.taskSummary || '(untitled)';
|
|
135
|
-
}
|
|
136
|
-
function sessionItems(request) {
|
|
137
|
-
return request.sessions.map(session => ({
|
|
138
|
-
value: session.id,
|
|
139
|
-
label: `${session.id.slice(0, 8)} ${sessionTitle(session)}`,
|
|
140
|
-
description: [
|
|
141
|
-
`${session.messageCount ?? 0} msgs`,
|
|
142
|
-
(0, format_1.formatBytes)(session.historySizeBytes ?? 0),
|
|
143
|
-
session.model,
|
|
144
|
-
request.showProject ? session.projectPath : '',
|
|
145
|
-
]
|
|
146
|
-
.filter(Boolean)
|
|
147
|
-
.join(' '),
|
|
148
|
-
}));
|
|
149
|
-
}
|
|
150
|
-
function formatModelTokenLabel(tokens) {
|
|
151
|
-
if (tokens >= 1000000)
|
|
152
|
-
return `${tokens / 1000000}M ctx`;
|
|
153
|
-
if (tokens >= 1000)
|
|
154
|
-
return `${Math.round(tokens / 1000)}K ctx`;
|
|
155
|
-
return `${tokens} ctx`;
|
|
156
|
-
}
|
|
157
|
-
function modelItems(request) {
|
|
158
|
-
const current = (request.currentModel ?? '').toLowerCase();
|
|
159
|
-
return request.models.map(model => {
|
|
160
|
-
const alias = model.alias ? ` (${model.alias})` : '';
|
|
161
|
-
const isCurrent = Boolean(current) &&
|
|
162
|
-
(model.name.toLowerCase() === current ||
|
|
163
|
-
(model.alias ? model.alias.toLowerCase() === current : false));
|
|
164
|
-
const context = model.contextWindow ? formatModelTokenLabel(model.contextWindow) : '';
|
|
165
|
-
const output = model.maxOutputTokens
|
|
166
|
-
? formatModelTokenLabel(model.maxOutputTokens).replace('ctx', 'out')
|
|
167
|
-
: '';
|
|
168
|
-
return {
|
|
169
|
-
value: model.name,
|
|
170
|
-
label: `${model.name}${alias}${isCurrent ? ' (current)' : ''}`,
|
|
171
|
-
description: [model.provider, context, output].filter(Boolean).join(' '),
|
|
172
|
-
};
|
|
173
|
-
});
|
|
174
|
-
}
|
|
175
|
-
function permissionItems(request) {
|
|
176
|
-
return (0, ui_view_model_1.createPermissionDecisionPickerState)(request).visibleItems.map(item => ({
|
|
177
|
-
value: item.value,
|
|
178
|
-
label: item.label,
|
|
179
|
-
description: item.description,
|
|
180
|
-
}));
|
|
181
|
-
}
|
|
182
|
-
function editPreviewTitle(request) {
|
|
183
|
-
return (0, ui_view_model_1.createEditPreviewPickerState)({ request }).title;
|
|
184
|
-
}
|
|
185
|
-
function editPreviewItems(request) {
|
|
186
|
-
return (0, ui_view_model_1.createEditPreviewPickerState)({ request }).visibleItems.map(item => ({
|
|
187
|
-
value: item.value,
|
|
188
|
-
label: item.label,
|
|
189
|
-
description: item.description,
|
|
190
|
-
}));
|
|
191
|
-
}
|
|
192
|
-
function normalizePastedInput(value) {
|
|
193
|
-
return value
|
|
194
|
-
.replace(/\x1b\[200~/g, '')
|
|
195
|
-
.replace(/\x1b\[201~/g, '')
|
|
196
|
-
.replace(/\[200~/g, '')
|
|
197
|
-
.replace(/\[201~/g, '')
|
|
198
|
-
.replace(/\r\n/g, '\n')
|
|
199
|
-
.replace(/\r/g, '\n');
|
|
200
|
-
}
|
|
201
|
-
function isMultilinePasteValue(value) {
|
|
202
|
-
if (!value)
|
|
203
|
-
return false;
|
|
204
|
-
const normalized = normalizePastedInput(value);
|
|
205
|
-
return normalized.length > 1 && normalized.includes('\n');
|
|
206
|
-
}
|
|
207
|
-
function ReplScreen({ runtime, cursorController, resizeEpoch = 0, }) {
|
|
208
|
-
const app = (0, ink_1.useApp)();
|
|
209
|
-
const { stdout } = (0, ink_1.useStdout)();
|
|
210
|
-
const terminalSize = (0, use_terminal_size_1.useTerminalSize)(stdout);
|
|
211
|
-
const terminalHeight = terminalSize.height;
|
|
212
|
-
const terminalWidth = terminalSize.width;
|
|
213
|
-
const [transcriptState, dispatchTranscript] = (0, react_1.useReducer)(transcript_state_1.transcriptReducer, transcript_state_1.initialTranscriptState);
|
|
214
|
-
const [inputBuffer, dispatchInputState] = (0, react_1.useReducer)(input_buffer_1.reduceInputBuffer, input_buffer_1.initialInputBuffer);
|
|
215
|
-
const input = inputBuffer.value;
|
|
216
|
-
const inputCursor = inputBuffer.cursor;
|
|
217
|
-
const [overlay, setOverlay] = (0, react_1.useState)(null);
|
|
218
|
-
const layout = (0, react_1.useMemo)(() => (0, layout_budget_1.getInkLayoutBudget)(terminalWidth, terminalHeight, { overlayVisible: overlay !== null }), [terminalWidth, terminalHeight, overlay]);
|
|
219
|
-
const { layoutWidth, maxLiveTranscriptItems, maxOverlayItems, maxPromptRows } = layout;
|
|
220
|
-
const [processing, setProcessing] = (0, react_1.useState)(false);
|
|
221
|
-
const [statusMessage, setStatusMessage] = (0, react_1.useState)('');
|
|
222
|
-
// R8: typed subagent timeline, keyed by taskId (last write wins).
|
|
223
|
-
const [, setSubtaskTimeline] = (0, react_1.useState)([]);
|
|
224
|
-
const [exiting, setExiting] = (0, react_1.useState)(false);
|
|
225
|
-
const [history, setHistory] = (0, react_1.useState)(() => (0, global_config_1.getInputHistory)());
|
|
226
|
-
const [historyIndex, setHistoryIndex] = (0, react_1.useState)(-1);
|
|
227
|
-
const [, setStoreVersion] = (0, react_1.useState)(0);
|
|
228
|
-
const shuttingDownRef = (0, react_1.useRef)(false);
|
|
229
|
-
const lastCtrlCEventAtRef = (0, react_1.useRef)(0);
|
|
230
|
-
const inputRef = (0, react_1.useRef)(input_buffer_1.initialInputBuffer);
|
|
231
|
-
const promptBoxRef = (0, react_1.useRef)(null);
|
|
232
|
-
const bracketedPasteActiveRef = (0, react_1.useRef)(false);
|
|
233
|
-
const dispatchInput = (0, react_1.useCallback)((action) => {
|
|
234
|
-
inputRef.current = (0, input_buffer_1.reduceInputBuffer)(inputRef.current, action);
|
|
235
|
-
dispatchInputState(action);
|
|
236
|
-
}, [dispatchInputState]);
|
|
237
|
-
(0, react_1.useEffect)(() => {
|
|
238
|
-
inputRef.current = inputBuffer;
|
|
239
|
-
}, [inputBuffer]);
|
|
240
|
-
(0, react_1.useEffect)(() => runtime.store.subscribe(() => setStoreVersion(version => version + 1)), [runtime.store]);
|
|
241
|
-
const append = (0, react_1.useCallback)((entry) => {
|
|
242
|
-
const id = createId();
|
|
243
|
-
const next = { id, ...entry };
|
|
244
|
-
dispatchTranscript({ type: 'append', entry: next });
|
|
245
|
-
return id;
|
|
246
|
-
}, []);
|
|
247
|
-
const update = (0, react_1.useCallback)((id, patch) => {
|
|
248
|
-
dispatchTranscript({ type: 'update', id, patch });
|
|
249
|
-
}, []);
|
|
250
|
-
const finalize = (0, react_1.useCallback)((id, patch) => {
|
|
251
|
-
dispatchTranscript({ type: 'finalize', id, patch });
|
|
252
|
-
}, []);
|
|
253
|
-
const remove = (0, react_1.useCallback)((id) => {
|
|
254
|
-
dispatchTranscript({ type: 'remove', id });
|
|
255
|
-
}, []);
|
|
256
|
-
const events = (0, react_1.useMemo)(() => ({
|
|
257
|
-
append,
|
|
258
|
-
update,
|
|
259
|
-
finalize,
|
|
260
|
-
remove,
|
|
261
|
-
replaceTranscript: entries => {
|
|
262
|
-
dispatchTranscript({ type: 'replace', entries });
|
|
263
|
-
},
|
|
264
|
-
clearTranscript: () => {
|
|
265
|
-
dispatchTranscript({ type: 'clear' });
|
|
266
|
-
},
|
|
267
|
-
clearView: () => {
|
|
268
|
-
dispatchTranscript({ type: 'clear' });
|
|
269
|
-
},
|
|
270
|
-
setStatus: setStatusMessage,
|
|
271
|
-
showSessionPicker: request => setOverlay({ type: 'sessions', selectedIndex: 0, request }),
|
|
272
|
-
showModelPicker: request => setOverlay({ type: 'model', selectedIndex: 0, request }),
|
|
273
|
-
showEditPreview: request => setOverlay({ type: 'edit', selectedIndex: 0, request }),
|
|
274
|
-
showPermissionRequest: request => setOverlay({ type: 'permission', selectedIndex: 0, request }),
|
|
275
|
-
setProcessing,
|
|
276
|
-
sessionRestored: event => {
|
|
277
|
-
const view = (0, ui_view_model_1.createSessionRestoredView)(event);
|
|
278
|
-
const lines = [view.headline];
|
|
279
|
-
if (view.summary)
|
|
280
|
-
lines.push(`Summary: ${view.summary}`);
|
|
281
|
-
if (view.summaryGeneratedAt) {
|
|
282
|
-
lines.push(`Generated: ${new Date(view.summaryGeneratedAt).toLocaleString()} (${view.checkpointId ? 'compact checkpoint' : 'generated on resume'})`);
|
|
283
|
-
}
|
|
284
|
-
if (typeof view.summaryCoveredMessages === 'number') {
|
|
285
|
-
lines.push(`Covers: ${view.summaryCoveredMessages} source messages`);
|
|
286
|
-
}
|
|
287
|
-
lines.push(`✔ Restored ${event.restoredMessages} model-context messages / ${event.transcriptMessages ?? event.messageCount ?? event.restoredMessages} transcript messages`);
|
|
288
|
-
dispatchTranscript({
|
|
289
|
-
type: 'append',
|
|
290
|
-
entry: {
|
|
291
|
-
id: `resume-${event.sessionId}`,
|
|
292
|
-
role: 'status',
|
|
293
|
-
title: 'resume',
|
|
294
|
-
content: lines.join('\n'),
|
|
295
|
-
errorLayer: undefined,
|
|
296
|
-
},
|
|
297
|
-
});
|
|
298
|
-
},
|
|
299
|
-
// R8: consume the typed subagent event into the shared timeline. Keyed by
|
|
300
|
-
// taskId so state advances queued -> running -> terminal without duplicates.
|
|
301
|
-
subtaskEvent: (event) => {
|
|
302
|
-
const entry = (0, ui_view_model_1.subtaskEventToTimelineEntry)(event);
|
|
303
|
-
setSubtaskTimeline(prev => {
|
|
304
|
-
const without = prev.filter(e => e.taskId !== entry.taskId);
|
|
305
|
-
return [...without, entry];
|
|
306
|
-
});
|
|
307
|
-
},
|
|
308
|
-
}), [append, finalize, remove, stdout, update]);
|
|
309
|
-
const agentController = (0, react_1.useMemo)(() => new agent_runtime_controller_1.AgentRuntimeController({
|
|
310
|
-
runtime,
|
|
311
|
-
events,
|
|
312
|
-
uiCapabilities: (0, ui_events_1.resolveUiRendererCapabilities)(undefined, 'ink'),
|
|
313
|
-
uiRenderer: 'ink',
|
|
314
|
-
exitConfirmWindowMs: 5000,
|
|
315
|
-
useRuntimeToolPermissions: true,
|
|
316
|
-
beforeTurn: () => setStatusMessage(''),
|
|
317
|
-
}), [runtime, events]);
|
|
318
|
-
const shutdown = (0, react_1.useCallback)(() => {
|
|
319
|
-
if (shuttingDownRef.current)
|
|
320
|
-
return;
|
|
321
|
-
shuttingDownRef.current = true;
|
|
322
|
-
cursorController.disable();
|
|
323
|
-
runtime.store.setProcessing(false);
|
|
324
|
-
setProcessing(false);
|
|
325
|
-
setExiting(true);
|
|
326
|
-
void stopAndShutdownInkRuntime(agentController, runtime)
|
|
327
|
-
.catch(error => {
|
|
328
|
-
const message = error instanceof Error ? error.message : String(error);
|
|
329
|
-
process.stderr.write(`Orion Code shutdown warning: ${message}\n`);
|
|
330
|
-
})
|
|
331
|
-
.finally(() => {
|
|
332
|
-
setTimeout(() => {
|
|
333
|
-
app.exit();
|
|
334
|
-
}, 50);
|
|
335
|
-
});
|
|
336
|
-
}, [agentController, app, cursorController, runtime]);
|
|
337
|
-
const submit = (0, react_1.useCallback)((value) => {
|
|
338
|
-
const submitted = value.trim();
|
|
339
|
-
if (!submitted)
|
|
340
|
-
return;
|
|
341
|
-
dispatchInput({ type: 'clear' });
|
|
342
|
-
setOverlay(null);
|
|
343
|
-
(0, global_config_1.addToInputHistory)(submitted);
|
|
344
|
-
setHistory((0, global_config_1.getInputHistory)());
|
|
345
|
-
setHistoryIndex(-1);
|
|
346
|
-
const result = agentController.handle({
|
|
347
|
-
type: 'submit',
|
|
348
|
-
text: submitted,
|
|
349
|
-
source: 'composer',
|
|
350
|
-
});
|
|
351
|
-
if (result.type === 'exit_requested') {
|
|
352
|
-
void shutdown();
|
|
353
|
-
}
|
|
354
|
-
}, [agentController, shutdown]);
|
|
355
|
-
const answerPermission = (0, react_1.useCallback)((request, approved, scope = 'once') => {
|
|
356
|
-
setOverlay(null);
|
|
357
|
-
agentController.handle({
|
|
358
|
-
type: 'permission_decision',
|
|
359
|
-
requestId: request.id,
|
|
360
|
-
approved,
|
|
361
|
-
scope,
|
|
362
|
-
source: 'keyboard',
|
|
363
|
-
});
|
|
364
|
-
}, [agentController]);
|
|
365
|
-
const closeOverlay = (0, react_1.useCallback)(() => {
|
|
366
|
-
if (!overlay)
|
|
367
|
-
return false;
|
|
368
|
-
if (overlay.type === 'permission') {
|
|
369
|
-
answerPermission(overlay.request, false);
|
|
370
|
-
return true;
|
|
371
|
-
}
|
|
372
|
-
setOverlay(null);
|
|
373
|
-
return true;
|
|
374
|
-
}, [answerPermission, overlay]);
|
|
375
|
-
const handleCtrlC = (0, react_1.useCallback)(() => {
|
|
376
|
-
if (closeOverlay()) {
|
|
377
|
-
agentController.handle({ type: 'clear_exit_intent' });
|
|
378
|
-
return;
|
|
379
|
-
}
|
|
380
|
-
const result = agentController.handle({ type: 'interrupt', source: 'keyboard' });
|
|
381
|
-
if (result.type === 'exit_requested') {
|
|
382
|
-
void shutdown();
|
|
383
|
-
}
|
|
384
|
-
}, [agentController, closeOverlay, shutdown]);
|
|
385
|
-
const handleCtrlCEvent = (0, react_1.useCallback)((options = {}) => {
|
|
386
|
-
const now = Date.now();
|
|
387
|
-
const delta = now - lastCtrlCEventAtRef.current;
|
|
388
|
-
if (!options.allowRapidRepeat && delta < 30) {
|
|
389
|
-
return;
|
|
390
|
-
}
|
|
391
|
-
lastCtrlCEventAtRef.current = now;
|
|
392
|
-
handleCtrlC();
|
|
393
|
-
}, [handleCtrlC]);
|
|
394
|
-
const lastRawInputRef = (0, use_raw_input_bridge_1.useRawInputBridge)(handleCtrlCEvent);
|
|
395
|
-
const commandItems = visibleCommandItems(input);
|
|
396
|
-
const fileItems = visibleFileItems(runtime.cwd, input);
|
|
397
|
-
const completeCommand = (0, react_1.useCallback)((item, submitImmediately) => {
|
|
398
|
-
const command = (0, commands_1.getCommands)().find(candidate => candidate.name === item.value);
|
|
399
|
-
const value = `/${item.value}${command?.argumentHint || command?.params?.some(param => param.required) ? ' ' : ''}`;
|
|
400
|
-
setOverlay(null);
|
|
401
|
-
if (submitImmediately && value.trim() === `/${item.value}`) {
|
|
402
|
-
submit(value);
|
|
403
|
-
}
|
|
404
|
-
else {
|
|
405
|
-
dispatchInput({ type: 'set', value });
|
|
406
|
-
}
|
|
407
|
-
}, [submit]);
|
|
408
|
-
const completeFile = (0, react_1.useCallback)((item) => {
|
|
409
|
-
const fileQuery = getFileQuery(inputRef.current.value);
|
|
410
|
-
if (!fileQuery)
|
|
411
|
-
return;
|
|
412
|
-
dispatchInput({ type: 'set', value: `${fileQuery.base}@${item.value}` });
|
|
413
|
-
setOverlay(null);
|
|
414
|
-
}, []);
|
|
415
|
-
const selectSession = (0, react_1.useCallback)((request, index) => {
|
|
416
|
-
const session = request.sessions[index];
|
|
417
|
-
if (!session)
|
|
418
|
-
return;
|
|
419
|
-
setOverlay(null);
|
|
420
|
-
const result = agentController.handle({
|
|
421
|
-
type: 'select_session',
|
|
422
|
-
sessionId: session.id,
|
|
423
|
-
allProjects: request.allProjects,
|
|
424
|
-
source: 'picker',
|
|
425
|
-
});
|
|
426
|
-
if (result.type === 'exit_requested') {
|
|
427
|
-
void shutdown();
|
|
428
|
-
}
|
|
429
|
-
}, [agentController, shutdown]);
|
|
430
|
-
const selectModel = (0, react_1.useCallback)((request, index) => {
|
|
431
|
-
const model = request.models[index];
|
|
432
|
-
if (!model)
|
|
433
|
-
return;
|
|
434
|
-
setOverlay(null);
|
|
435
|
-
const result = agentController.handle({
|
|
436
|
-
type: 'submit',
|
|
437
|
-
text: `/model ${model.name}`,
|
|
438
|
-
source: 'composer',
|
|
439
|
-
});
|
|
440
|
-
if (result.type === 'exit_requested') {
|
|
441
|
-
void shutdown();
|
|
442
|
-
}
|
|
443
|
-
}, [agentController, shutdown]);
|
|
444
|
-
(0, ink_1.useInput)((value, key) => {
|
|
445
|
-
const isReturn = key?.return || value === '\r' || value === '\n';
|
|
446
|
-
if (key?.ctrl && value === 'c') {
|
|
447
|
-
handleCtrlCEvent();
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
450
|
-
agentController.handle({ type: 'clear_exit_intent' });
|
|
451
|
-
const rawInput = lastRawInputRef.current || '';
|
|
452
|
-
const pasteSource = value || rawInput;
|
|
453
|
-
const startsBracketedPaste = rawInput.includes('\x1b[200~') ||
|
|
454
|
-
pasteSource.includes('\x1b[200~') ||
|
|
455
|
-
pasteSource.includes('[200~');
|
|
456
|
-
const endsBracketedPaste = rawInput.includes('\x1b[201~') ||
|
|
457
|
-
pasteSource.includes('\x1b[201~') ||
|
|
458
|
-
pasteSource.includes('[201~');
|
|
459
|
-
if (!key?.ctrl &&
|
|
460
|
-
(bracketedPasteActiveRef.current || startsBracketedPaste || endsBracketedPaste)) {
|
|
461
|
-
bracketedPasteActiveRef.current = true;
|
|
462
|
-
const normalized = normalizePastedInput(value || rawInput);
|
|
463
|
-
if (normalized) {
|
|
464
|
-
dispatchInput({ type: 'inputChunk', text: normalized });
|
|
465
|
-
}
|
|
466
|
-
setOverlay(null);
|
|
467
|
-
if (endsBracketedPaste) {
|
|
468
|
-
bracketedPasteActiveRef.current = false;
|
|
469
|
-
}
|
|
470
|
-
return;
|
|
471
|
-
}
|
|
472
|
-
if (!key?.ctrl && isMultilinePasteValue(value)) {
|
|
473
|
-
dispatchInput({ type: 'inputChunk', text: normalizePastedInput(value) });
|
|
474
|
-
setOverlay(null);
|
|
475
|
-
return;
|
|
476
|
-
}
|
|
477
|
-
if (overlay?.type === 'shortcuts') {
|
|
478
|
-
if (key?.escape || isReturn || value === '?')
|
|
479
|
-
setOverlay(null);
|
|
480
|
-
return;
|
|
481
|
-
}
|
|
482
|
-
if (overlay?.type === 'commands') {
|
|
483
|
-
const items = commandItems;
|
|
484
|
-
if (key?.escape) {
|
|
485
|
-
setOverlay(null);
|
|
486
|
-
return;
|
|
487
|
-
}
|
|
488
|
-
if (key?.upArrow) {
|
|
489
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
490
|
-
return;
|
|
491
|
-
}
|
|
492
|
-
if (key?.downArrow) {
|
|
493
|
-
setOverlay({
|
|
494
|
-
...overlay,
|
|
495
|
-
selectedIndex: Math.min(Math.max(0, items.length - 1), overlay.selectedIndex + 1),
|
|
496
|
-
});
|
|
497
|
-
return;
|
|
498
|
-
}
|
|
499
|
-
if (key?.tab && items[overlay.selectedIndex]) {
|
|
500
|
-
completeCommand(items[overlay.selectedIndex], false);
|
|
501
|
-
return;
|
|
502
|
-
}
|
|
503
|
-
if (isReturn && hasRecognizedCommandArguments(inputRef.current.value)) {
|
|
504
|
-
setOverlay(null);
|
|
505
|
-
submit(inputRef.current.value);
|
|
506
|
-
return;
|
|
507
|
-
}
|
|
508
|
-
if (isReturn && items[overlay.selectedIndex]) {
|
|
509
|
-
completeCommand(items[overlay.selectedIndex], true);
|
|
510
|
-
return;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
if (overlay?.type === 'files') {
|
|
514
|
-
const items = fileItems;
|
|
515
|
-
if (key?.escape) {
|
|
516
|
-
setOverlay(null);
|
|
517
|
-
return;
|
|
518
|
-
}
|
|
519
|
-
if (key?.upArrow) {
|
|
520
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
521
|
-
return;
|
|
522
|
-
}
|
|
523
|
-
if (key?.downArrow) {
|
|
524
|
-
setOverlay({
|
|
525
|
-
...overlay,
|
|
526
|
-
selectedIndex: Math.min(Math.max(0, items.length - 1), overlay.selectedIndex + 1),
|
|
527
|
-
});
|
|
528
|
-
return;
|
|
529
|
-
}
|
|
530
|
-
if ((key?.tab || isReturn) && items[overlay.selectedIndex]) {
|
|
531
|
-
completeFile(items[overlay.selectedIndex]);
|
|
532
|
-
return;
|
|
533
|
-
}
|
|
534
|
-
}
|
|
535
|
-
if (overlay?.type === 'sessions') {
|
|
536
|
-
const total = overlay.request.sessions.length;
|
|
537
|
-
if (key?.escape) {
|
|
538
|
-
setOverlay(null);
|
|
539
|
-
return;
|
|
540
|
-
}
|
|
541
|
-
if (key?.upArrow) {
|
|
542
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
543
|
-
return;
|
|
544
|
-
}
|
|
545
|
-
if (key?.downArrow) {
|
|
546
|
-
setOverlay({
|
|
547
|
-
...overlay,
|
|
548
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 1),
|
|
549
|
-
});
|
|
550
|
-
return;
|
|
551
|
-
}
|
|
552
|
-
if (key?.pageUp) {
|
|
553
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 10) });
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
|
-
if (key?.pageDown) {
|
|
557
|
-
setOverlay({
|
|
558
|
-
...overlay,
|
|
559
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 10),
|
|
560
|
-
});
|
|
561
|
-
return;
|
|
562
|
-
}
|
|
563
|
-
if (isReturn) {
|
|
564
|
-
selectSession(overlay.request, overlay.selectedIndex);
|
|
565
|
-
return;
|
|
566
|
-
}
|
|
567
|
-
}
|
|
568
|
-
if (overlay?.type === 'model') {
|
|
569
|
-
const total = overlay.request.models.length;
|
|
570
|
-
if (key?.escape) {
|
|
571
|
-
setOverlay(null);
|
|
572
|
-
return;
|
|
573
|
-
}
|
|
574
|
-
if (key?.upArrow) {
|
|
575
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
576
|
-
return;
|
|
577
|
-
}
|
|
578
|
-
if (key?.downArrow) {
|
|
579
|
-
setOverlay({
|
|
580
|
-
...overlay,
|
|
581
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 1),
|
|
582
|
-
});
|
|
583
|
-
return;
|
|
584
|
-
}
|
|
585
|
-
if (key?.pageUp) {
|
|
586
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 10) });
|
|
587
|
-
return;
|
|
588
|
-
}
|
|
589
|
-
if (key?.pageDown) {
|
|
590
|
-
setOverlay({
|
|
591
|
-
...overlay,
|
|
592
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 10),
|
|
593
|
-
});
|
|
594
|
-
return;
|
|
595
|
-
}
|
|
596
|
-
if (isReturn) {
|
|
597
|
-
selectModel(overlay.request, overlay.selectedIndex);
|
|
598
|
-
return;
|
|
599
|
-
}
|
|
600
|
-
}
|
|
601
|
-
if (overlay?.type === 'edit') {
|
|
602
|
-
const total = overlay.request.candidates.length;
|
|
603
|
-
if (key?.escape || isReturn) {
|
|
604
|
-
setOverlay(null);
|
|
605
|
-
return;
|
|
606
|
-
}
|
|
607
|
-
if (key?.upArrow) {
|
|
608
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
609
|
-
return;
|
|
610
|
-
}
|
|
611
|
-
if (key?.downArrow) {
|
|
612
|
-
setOverlay({
|
|
613
|
-
...overlay,
|
|
614
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 1),
|
|
615
|
-
});
|
|
616
|
-
return;
|
|
617
|
-
}
|
|
618
|
-
if (key?.pageUp) {
|
|
619
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 10) });
|
|
620
|
-
return;
|
|
621
|
-
}
|
|
622
|
-
if (key?.pageDown) {
|
|
623
|
-
setOverlay({
|
|
624
|
-
...overlay,
|
|
625
|
-
selectedIndex: Math.min(Math.max(0, total - 1), overlay.selectedIndex + 10),
|
|
626
|
-
});
|
|
627
|
-
return;
|
|
628
|
-
}
|
|
629
|
-
}
|
|
630
|
-
if (overlay?.type === 'permission') {
|
|
631
|
-
const items = permissionItems(overlay.request);
|
|
632
|
-
if (key?.escape || value?.toLowerCase() === 'n') {
|
|
633
|
-
answerPermission(overlay.request, false);
|
|
634
|
-
return;
|
|
635
|
-
}
|
|
636
|
-
if (value?.toLowerCase() === 'y') {
|
|
637
|
-
answerPermission(overlay.request, true, 'once');
|
|
638
|
-
return;
|
|
639
|
-
}
|
|
640
|
-
if (value?.toLowerCase() === 'p') {
|
|
641
|
-
answerPermission(overlay.request, true, 'project');
|
|
642
|
-
return;
|
|
643
|
-
}
|
|
644
|
-
if (value?.toLowerCase() === 'g') {
|
|
645
|
-
answerPermission(overlay.request, true, 'global');
|
|
646
|
-
return;
|
|
647
|
-
}
|
|
648
|
-
if (key?.upArrow) {
|
|
649
|
-
setOverlay({ ...overlay, selectedIndex: Math.max(0, overlay.selectedIndex - 1) });
|
|
650
|
-
return;
|
|
651
|
-
}
|
|
652
|
-
if (key?.downArrow || key?.tab) {
|
|
653
|
-
setOverlay({
|
|
654
|
-
...overlay,
|
|
655
|
-
selectedIndex: Math.min(items.length - 1, overlay.selectedIndex + 1),
|
|
656
|
-
});
|
|
657
|
-
return;
|
|
658
|
-
}
|
|
659
|
-
if (isReturn) {
|
|
660
|
-
const item = (0, ui_view_model_1.createPermissionDecisionPickerState)(overlay.request).visibleItems[overlay.selectedIndex];
|
|
661
|
-
answerPermission(overlay.request, item?.approved ?? false, item?.scope ?? 'once');
|
|
662
|
-
return;
|
|
663
|
-
}
|
|
664
|
-
return;
|
|
665
|
-
}
|
|
666
|
-
if (isReturn && key?.meta) {
|
|
667
|
-
dispatchInput({ type: 'insert', text: '\n' });
|
|
668
|
-
return;
|
|
669
|
-
}
|
|
670
|
-
if (key?.leftArrow) {
|
|
671
|
-
dispatchInput({ type: 'move', direction: 'left' });
|
|
672
|
-
return;
|
|
673
|
-
}
|
|
674
|
-
if (key?.rightArrow) {
|
|
675
|
-
dispatchInput({ type: 'move', direction: 'right' });
|
|
676
|
-
return;
|
|
677
|
-
}
|
|
678
|
-
if (key?.ctrl && value === 'a') {
|
|
679
|
-
dispatchInput({ type: 'move', direction: 'home' });
|
|
680
|
-
return;
|
|
681
|
-
}
|
|
682
|
-
if (key?.ctrl && value === 'e') {
|
|
683
|
-
dispatchInput({ type: 'move', direction: 'end' });
|
|
684
|
-
return;
|
|
685
|
-
}
|
|
686
|
-
if (key?.ctrl && value === 'u') {
|
|
687
|
-
const rawInput = lastRawInputRef.current;
|
|
688
|
-
dispatchInput({ type: 'inputChunk', text: rawInput.startsWith('\x15') ? rawInput : '\x15' });
|
|
689
|
-
setOverlay(null);
|
|
690
|
-
return;
|
|
691
|
-
}
|
|
692
|
-
if (isReturn) {
|
|
693
|
-
submit(inputRef.current.value);
|
|
694
|
-
return;
|
|
695
|
-
}
|
|
696
|
-
if (value && (0, raw_input_1.hasDeletionRawInput)(value)) {
|
|
697
|
-
dispatchInput({ type: 'inputChunk', text: value });
|
|
698
|
-
return;
|
|
699
|
-
}
|
|
700
|
-
if (key?.backspace) {
|
|
701
|
-
dispatchInput({ type: 'backspace' });
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
if (key?.delete) {
|
|
705
|
-
dispatchInput({ type: (0, raw_input_1.deleteActionFromRawInput)(value || lastRawInputRef.current) });
|
|
706
|
-
return;
|
|
707
|
-
}
|
|
708
|
-
if (key?.upArrow && inputRef.current.value === '' && history.length > 0) {
|
|
709
|
-
const nextIndex = Math.min(history.length - 1, historyIndex + 1);
|
|
710
|
-
setHistoryIndex(nextIndex);
|
|
711
|
-
dispatchInput({ type: 'set', value: history[nextIndex]?.content ?? '' });
|
|
712
|
-
return;
|
|
713
|
-
}
|
|
714
|
-
if (key?.downArrow && historyIndex >= 0) {
|
|
715
|
-
const nextIndex = historyIndex - 1;
|
|
716
|
-
setHistoryIndex(nextIndex);
|
|
717
|
-
dispatchInput({
|
|
718
|
-
type: 'set',
|
|
719
|
-
value: nextIndex >= 0 ? (history[nextIndex]?.content ?? '') : '',
|
|
720
|
-
});
|
|
721
|
-
return;
|
|
722
|
-
}
|
|
723
|
-
if (key?.tab) {
|
|
724
|
-
if (inputRef.current.value.startsWith('/')) {
|
|
725
|
-
setOverlay({ type: 'commands', selectedIndex: 0 });
|
|
726
|
-
}
|
|
727
|
-
else if (getFileQuery(inputRef.current.value)) {
|
|
728
|
-
setOverlay({ type: 'files', selectedIndex: 0 });
|
|
729
|
-
}
|
|
730
|
-
return;
|
|
731
|
-
}
|
|
732
|
-
if (value === '/' && inputRef.current.value === '' && !agentController.hasActiveTurn()) {
|
|
733
|
-
dispatchInput({ type: 'set', value: '/' });
|
|
734
|
-
setOverlay({ type: 'commands', selectedIndex: 0 });
|
|
735
|
-
return;
|
|
736
|
-
}
|
|
737
|
-
if (value === '@' && !agentController.hasActiveTurn()) {
|
|
738
|
-
dispatchInput({ type: 'insert', text: '@' });
|
|
739
|
-
setOverlay({ type: 'files', selectedIndex: 0 });
|
|
740
|
-
return;
|
|
741
|
-
}
|
|
742
|
-
if (value === '?' && inputRef.current.value === '') {
|
|
743
|
-
setOverlay({ type: 'shortcuts' });
|
|
744
|
-
return;
|
|
745
|
-
}
|
|
746
|
-
if (value && !key?.ctrl) {
|
|
747
|
-
dispatchInput({ type: 'inputChunk', text: value });
|
|
748
|
-
}
|
|
749
|
-
});
|
|
750
|
-
const modeText = (0, types_1.getModeDisplayText)(runtime.store.getSnapshot().agentMode);
|
|
751
|
-
const staticItems = (0, react_1.useMemo)(() => [
|
|
752
|
-
{ id: 'orion-code-banner', type: 'banner' },
|
|
753
|
-
...(0, transcript_state_1.staticTranscriptEntries)(transcriptState).map(entry => ({
|
|
754
|
-
...entry,
|
|
755
|
-
type: 'entry',
|
|
756
|
-
})),
|
|
757
|
-
], [transcriptState]);
|
|
758
|
-
const liveEntries = (0, react_1.useMemo)(() => (0, transcript_state_1.liveTranscriptEntries)(transcriptState), [transcriptState]);
|
|
759
|
-
if (exiting) {
|
|
760
|
-
return react_1.default.createElement(ink_1.Box, { flexDirection: "column" });
|
|
761
|
-
}
|
|
762
|
-
return (react_1.default.createElement(ink_1.Box, { flexDirection: "column" },
|
|
763
|
-
react_1.default.createElement(ink_1.Static, { key: `${transcriptState.generation}:${resizeEpoch}`, items: staticItems }, item => item.type === 'banner' ? (react_1.default.createElement(ink_1.Box, { key: item.id, flexDirection: "column", marginBottom: 1 },
|
|
764
|
-
react_1.default.createElement(PixelHorseBanner_1.PixelHorseBanner, { runtime: runtime, width: layoutWidth }))) : (react_1.default.createElement(Transcript_1.TranscriptEntryBlock, { key: item.id, entry: item, width: layoutWidth }))),
|
|
765
|
-
react_1.default.createElement(Transcript_1.Transcript, { entries: liveEntries, maxItems: maxLiveTranscriptItems, width: layoutWidth, emptyMessage: null }),
|
|
766
|
-
overlay?.type === 'commands' ? (react_1.default.createElement(SelectList_1.SelectList, { title: `Commands ${input.slice(1) ? `"${input.slice(1)}"` : ''}`, items: commandItems, selectedIndex: overlay.selectedIndex, maxVisibleItems: maxOverlayItems, footer: "\u2191\u2193 navigate Tab complete Enter select Esc cancel", width: layoutWidth })) : null,
|
|
767
|
-
overlay?.type === 'files' ? (react_1.default.createElement(SelectList_1.SelectList, { title: "Files", items: fileItems, selectedIndex: overlay.selectedIndex, maxVisibleItems: maxOverlayItems, footer: "\u2191\u2193 navigate Tab/Enter complete Esc cancel", width: layoutWidth })) : null,
|
|
768
|
-
overlay?.type === 'sessions' ? (react_1.default.createElement(SelectList_1.SelectList, { title: overlay.request.title, items: sessionItems(overlay.request), selectedIndex: overlay.selectedIndex, maxVisibleItems: Math.min(overlay.request.maxVisibleItems ?? maxOverlayItems, maxOverlayItems), footer: "\u2191\u2193 scroll PgUp/PgDn Enter resume Esc cancel", width: layoutWidth })) : null,
|
|
769
|
-
overlay?.type === 'model' ? (react_1.default.createElement(SelectList_1.SelectList, { title: overlay.request.title ?? 'Switch Model', items: modelItems(overlay.request), selectedIndex: overlay.selectedIndex, maxVisibleItems: Math.min(overlay.request.maxVisibleItems ?? maxOverlayItems, maxOverlayItems), footer: "\u2191\u2193 scroll PgUp/PgDn Enter switch Esc cancel", width: layoutWidth })) : null,
|
|
770
|
-
overlay?.type === 'edit' ? (react_1.default.createElement(SelectList_1.SelectList, { title: editPreviewTitle(overlay.request), items: editPreviewItems(overlay.request), selectedIndex: overlay.selectedIndex, maxVisibleItems: maxOverlayItems, footer: "\u2191\u2193 scroll PgUp/PgDn Enter/Esc close", width: layoutWidth })) : null,
|
|
771
|
-
overlay?.type === 'permission' ? (react_1.default.createElement(SelectList_1.SelectList, { title: "Tool Permission", items: permissionItems(overlay.request), selectedIndex: overlay.selectedIndex, maxVisibleItems: 2, footer: "\u2191\u2193 choose Enter select y allow n/Esc deny", width: layoutWidth })) : null,
|
|
772
|
-
overlay?.type === 'shortcuts' ? (react_1.default.createElement(ink_1.Box, { width: layoutWidth, borderStyle: "single", borderColor: "gray", paddingX: 1, flexDirection: "column" },
|
|
773
|
-
react_1.default.createElement(ink_1.Text, { color: "cyan" }, "Shortcuts"),
|
|
774
|
-
react_1.default.createElement(ink_1.Text, null, "/ commands @ file picker ? shortcuts"),
|
|
775
|
-
react_1.default.createElement(ink_1.Text, null, "Alt+Enter newline Ctrl+C interrupt / twice exits \u2191\u2193 history or picker navigation"),
|
|
776
|
-
react_1.default.createElement(ink_1.Text, { color: "gray" }, "Enter or Esc closes this panel."))) : null,
|
|
777
|
-
react_1.default.createElement(StatusLine_1.StatusLine, { runtime: runtime, running: processing, statusMessage: statusMessage, width: layoutWidth }),
|
|
778
|
-
react_1.default.createElement(PromptInput_1.PromptInput, { ref: promptBoxRef, value: input, cursor: inputCursor, running: processing, modeText: modeText, width: layoutWidth, maxRows: maxPromptRows }),
|
|
779
|
-
react_1.default.createElement(NativeCursor_1.NativeCursor, { cursorController: cursorController, promptRef: promptBoxRef, value: input, cursor: inputCursor, maxRows: maxPromptRows, terminalWidth: layoutWidth })));
|
|
780
|
-
}
|
|
781
|
-
//# sourceMappingURL=ReplScreen.js.map
|