@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
|
@@ -0,0 +1,557 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.RuntimeProtocolValidationError = exports.RUNTIME_EVENT_DEFINITIONS_V1 = exports.AGENT_RUNTIME_COMMAND_DEFINITIONS_V1 = void 0;
|
|
4
|
+
exports.createRuntimeId = createRuntimeId;
|
|
5
|
+
exports.isRuntimeId = isRuntimeId;
|
|
6
|
+
exports.getAgentRuntimeProtocolSchemaV1 = getAgentRuntimeProtocolSchemaV1;
|
|
7
|
+
exports.assertAgentRuntimeCommandV1 = assertAgentRuntimeCommandV1;
|
|
8
|
+
exports.assertRuntimeEventEnvelopeV1 = assertRuntimeEventEnvelopeV1;
|
|
9
|
+
const crypto_1 = require("crypto");
|
|
10
|
+
const string = { type: 'string' };
|
|
11
|
+
const nonEmptyString = { type: 'string', minLength: 1 };
|
|
12
|
+
const nonNegativeInteger = { type: 'integer', minimum: 0 };
|
|
13
|
+
/**
|
|
14
|
+
* The protocol definitions are the single source used for both TypeScript
|
|
15
|
+
* payload inference and the JSON Schema exposed to renderer/runtime adapters.
|
|
16
|
+
*/
|
|
17
|
+
exports.AGENT_RUNTIME_COMMAND_DEFINITIONS_V1 = {
|
|
18
|
+
initialize: {
|
|
19
|
+
type: 'object',
|
|
20
|
+
properties: {
|
|
21
|
+
clientId: nonEmptyString,
|
|
22
|
+
cwd: string,
|
|
23
|
+
},
|
|
24
|
+
required: ['clientId'],
|
|
25
|
+
additionalProperties: false,
|
|
26
|
+
},
|
|
27
|
+
'thread.start': {
|
|
28
|
+
type: 'object',
|
|
29
|
+
properties: {
|
|
30
|
+
threadId: nonEmptyString,
|
|
31
|
+
input: string,
|
|
32
|
+
},
|
|
33
|
+
required: ['input'],
|
|
34
|
+
additionalProperties: false,
|
|
35
|
+
},
|
|
36
|
+
'thread.resume': {
|
|
37
|
+
type: 'object',
|
|
38
|
+
properties: {
|
|
39
|
+
threadId: nonEmptyString,
|
|
40
|
+
cursor: nonNegativeInteger,
|
|
41
|
+
},
|
|
42
|
+
required: ['threadId'],
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
},
|
|
45
|
+
'thread.fork': {
|
|
46
|
+
type: 'object',
|
|
47
|
+
properties: {
|
|
48
|
+
sourceThreadId: nonEmptyString,
|
|
49
|
+
sourceSeq: nonNegativeInteger,
|
|
50
|
+
threadId: nonEmptyString,
|
|
51
|
+
},
|
|
52
|
+
required: ['sourceThreadId'],
|
|
53
|
+
additionalProperties: false,
|
|
54
|
+
},
|
|
55
|
+
'turn.start': {
|
|
56
|
+
type: 'object',
|
|
57
|
+
properties: {
|
|
58
|
+
input: nonEmptyString,
|
|
59
|
+
mode: { type: 'string', enum: ['build', 'plan', 'auto', 'goal'] },
|
|
60
|
+
authorityId: nonEmptyString,
|
|
61
|
+
},
|
|
62
|
+
required: ['input', 'mode'],
|
|
63
|
+
additionalProperties: false,
|
|
64
|
+
},
|
|
65
|
+
'turn.steer': {
|
|
66
|
+
type: 'object',
|
|
67
|
+
properties: { input: nonEmptyString },
|
|
68
|
+
required: ['input'],
|
|
69
|
+
additionalProperties: false,
|
|
70
|
+
},
|
|
71
|
+
'turn.follow_up': {
|
|
72
|
+
type: 'object',
|
|
73
|
+
properties: { input: nonEmptyString },
|
|
74
|
+
required: ['input'],
|
|
75
|
+
additionalProperties: false,
|
|
76
|
+
},
|
|
77
|
+
'turn.interrupt': {
|
|
78
|
+
type: 'object',
|
|
79
|
+
properties: { reason: string },
|
|
80
|
+
additionalProperties: false,
|
|
81
|
+
},
|
|
82
|
+
'approval.respond': {
|
|
83
|
+
type: 'object',
|
|
84
|
+
properties: {
|
|
85
|
+
requestId: nonEmptyString,
|
|
86
|
+
approved: { type: 'boolean' },
|
|
87
|
+
scope: { type: 'string', enum: ['once', 'session', 'project'] },
|
|
88
|
+
},
|
|
89
|
+
required: ['requestId', 'approved'],
|
|
90
|
+
additionalProperties: false,
|
|
91
|
+
},
|
|
92
|
+
};
|
|
93
|
+
exports.RUNTIME_EVENT_DEFINITIONS_V1 = {
|
|
94
|
+
'thread.started': {
|
|
95
|
+
type: 'object',
|
|
96
|
+
properties: { projectPath: string },
|
|
97
|
+
additionalProperties: false,
|
|
98
|
+
},
|
|
99
|
+
'thread.resumed': {
|
|
100
|
+
type: 'object',
|
|
101
|
+
properties: { fromSeq: nonNegativeInteger },
|
|
102
|
+
required: ['fromSeq'],
|
|
103
|
+
additionalProperties: false,
|
|
104
|
+
},
|
|
105
|
+
'thread.forked': {
|
|
106
|
+
type: 'object',
|
|
107
|
+
properties: {
|
|
108
|
+
sourceThreadId: nonEmptyString,
|
|
109
|
+
sourceSeq: nonNegativeInteger,
|
|
110
|
+
},
|
|
111
|
+
required: ['sourceThreadId', 'sourceSeq'],
|
|
112
|
+
additionalProperties: false,
|
|
113
|
+
},
|
|
114
|
+
'turn.started': {
|
|
115
|
+
type: 'object',
|
|
116
|
+
properties: {
|
|
117
|
+
input: nonEmptyString,
|
|
118
|
+
mode: { type: 'string', enum: ['build', 'plan', 'auto', 'goal', 'maintenance'] },
|
|
119
|
+
queueId: nonEmptyString,
|
|
120
|
+
},
|
|
121
|
+
required: ['input', 'mode'],
|
|
122
|
+
additionalProperties: false,
|
|
123
|
+
},
|
|
124
|
+
'turn.queued': {
|
|
125
|
+
type: 'object',
|
|
126
|
+
properties: {
|
|
127
|
+
queueId: nonEmptyString,
|
|
128
|
+
input: nonEmptyString,
|
|
129
|
+
mode: { type: 'string', enum: ['build', 'plan', 'auto', 'goal', 'maintenance'] },
|
|
130
|
+
kind: { type: 'string', enum: ['regular', 'goal', 'maintenance'] },
|
|
131
|
+
source: { type: 'string', enum: ['start', 'follow_up'] },
|
|
132
|
+
enqueuedAt: nonNegativeInteger,
|
|
133
|
+
deadline: nonNegativeInteger,
|
|
134
|
+
},
|
|
135
|
+
required: ['queueId', 'input', 'mode', 'kind', 'source', 'enqueuedAt', 'deadline'],
|
|
136
|
+
additionalProperties: false,
|
|
137
|
+
},
|
|
138
|
+
'turn.queue_expired': {
|
|
139
|
+
type: 'object',
|
|
140
|
+
properties: { queueId: nonEmptyString },
|
|
141
|
+
required: ['queueId'],
|
|
142
|
+
additionalProperties: false,
|
|
143
|
+
},
|
|
144
|
+
'turn.steered': {
|
|
145
|
+
type: 'object',
|
|
146
|
+
properties: { itemId: nonEmptyString, input: nonEmptyString },
|
|
147
|
+
required: ['itemId', 'input'],
|
|
148
|
+
additionalProperties: false,
|
|
149
|
+
},
|
|
150
|
+
'turn.interrupt_requested': {
|
|
151
|
+
type: 'object',
|
|
152
|
+
properties: { intentId: nonEmptyString, reason: string },
|
|
153
|
+
required: ['intentId'],
|
|
154
|
+
additionalProperties: false,
|
|
155
|
+
},
|
|
156
|
+
'turn.committed': {
|
|
157
|
+
type: 'object',
|
|
158
|
+
properties: {
|
|
159
|
+
commitId: nonEmptyString,
|
|
160
|
+
terminal: { type: 'string', enum: ['completed', 'failed', 'interrupted'] },
|
|
161
|
+
digest: nonEmptyString,
|
|
162
|
+
receipt: nonEmptyString,
|
|
163
|
+
outcome: string,
|
|
164
|
+
error: string,
|
|
165
|
+
reason: string,
|
|
166
|
+
},
|
|
167
|
+
required: ['commitId', 'terminal', 'digest', 'receipt'],
|
|
168
|
+
additionalProperties: false,
|
|
169
|
+
},
|
|
170
|
+
'turn.completed': {
|
|
171
|
+
type: 'object',
|
|
172
|
+
properties: { outcome: string },
|
|
173
|
+
additionalProperties: false,
|
|
174
|
+
},
|
|
175
|
+
'turn.failed': {
|
|
176
|
+
type: 'object',
|
|
177
|
+
properties: { error: nonEmptyString },
|
|
178
|
+
required: ['error'],
|
|
179
|
+
additionalProperties: false,
|
|
180
|
+
},
|
|
181
|
+
'turn.interrupted': {
|
|
182
|
+
type: 'object',
|
|
183
|
+
properties: { reason: string },
|
|
184
|
+
additionalProperties: false,
|
|
185
|
+
},
|
|
186
|
+
'item.started': {
|
|
187
|
+
type: 'object',
|
|
188
|
+
properties: {
|
|
189
|
+
kind: {
|
|
190
|
+
type: 'string',
|
|
191
|
+
enum: ['message', 'reasoning', 'command', 'file_change', 'mcp', 'plan', 'compact'],
|
|
192
|
+
},
|
|
193
|
+
parentItemId: nonEmptyString,
|
|
194
|
+
role: { type: 'string', enum: ['user', 'assistant', 'system', 'tool'] },
|
|
195
|
+
name: nonEmptyString,
|
|
196
|
+
inputDigest: nonEmptyString,
|
|
197
|
+
intent: string,
|
|
198
|
+
},
|
|
199
|
+
required: ['kind'],
|
|
200
|
+
additionalProperties: false,
|
|
201
|
+
},
|
|
202
|
+
'item.delta': {
|
|
203
|
+
type: 'object',
|
|
204
|
+
properties: {
|
|
205
|
+
delta: string,
|
|
206
|
+
channel: { type: 'string', enum: ['content', 'reasoning', 'output'] },
|
|
207
|
+
},
|
|
208
|
+
required: ['delta'],
|
|
209
|
+
additionalProperties: false,
|
|
210
|
+
},
|
|
211
|
+
'item.completed': {
|
|
212
|
+
type: 'object',
|
|
213
|
+
properties: {
|
|
214
|
+
content: string,
|
|
215
|
+
summary: string,
|
|
216
|
+
outputDigest: nonEmptyString,
|
|
217
|
+
receipt: string,
|
|
218
|
+
},
|
|
219
|
+
additionalProperties: false,
|
|
220
|
+
},
|
|
221
|
+
'item.failed': {
|
|
222
|
+
type: 'object',
|
|
223
|
+
properties: { error: nonEmptyString, receipt: string },
|
|
224
|
+
required: ['error'],
|
|
225
|
+
additionalProperties: false,
|
|
226
|
+
},
|
|
227
|
+
'item.interrupted': {
|
|
228
|
+
type: 'object',
|
|
229
|
+
properties: { reason: string, receipt: string },
|
|
230
|
+
additionalProperties: false,
|
|
231
|
+
},
|
|
232
|
+
'item.indeterminate': {
|
|
233
|
+
type: 'object',
|
|
234
|
+
properties: { reason: nonEmptyString, receipt: string },
|
|
235
|
+
required: ['reason'],
|
|
236
|
+
additionalProperties: false,
|
|
237
|
+
},
|
|
238
|
+
'compact.started': {
|
|
239
|
+
type: 'object',
|
|
240
|
+
properties: {
|
|
241
|
+
sourceSeq: nonNegativeInteger,
|
|
242
|
+
transactionId: nonEmptyString,
|
|
243
|
+
sourceReceiptDigest: nonEmptyString,
|
|
244
|
+
startedProjectionDigest: nonEmptyString,
|
|
245
|
+
},
|
|
246
|
+
required: ['sourceSeq', 'transactionId', 'sourceReceiptDigest', 'startedProjectionDigest'],
|
|
247
|
+
additionalProperties: false,
|
|
248
|
+
},
|
|
249
|
+
'compact.completed': {
|
|
250
|
+
type: 'object',
|
|
251
|
+
properties: {
|
|
252
|
+
checkpointId: nonEmptyString,
|
|
253
|
+
sourceSeq: nonNegativeInteger,
|
|
254
|
+
transactionId: nonEmptyString,
|
|
255
|
+
commitReceiptDigest: nonEmptyString,
|
|
256
|
+
nextModelVisibleHistoryDigest: nonEmptyString,
|
|
257
|
+
},
|
|
258
|
+
required: [
|
|
259
|
+
'checkpointId',
|
|
260
|
+
'sourceSeq',
|
|
261
|
+
'transactionId',
|
|
262
|
+
'commitReceiptDigest',
|
|
263
|
+
'nextModelVisibleHistoryDigest',
|
|
264
|
+
],
|
|
265
|
+
additionalProperties: false,
|
|
266
|
+
},
|
|
267
|
+
'compact.failed': {
|
|
268
|
+
type: 'object',
|
|
269
|
+
properties: {
|
|
270
|
+
error: nonEmptyString,
|
|
271
|
+
transactionId: nonEmptyString,
|
|
272
|
+
sourceSeq: nonNegativeInteger,
|
|
273
|
+
failureCode: nonEmptyString,
|
|
274
|
+
failureReceiptDigest: nonEmptyString,
|
|
275
|
+
},
|
|
276
|
+
required: ['error', 'transactionId', 'sourceSeq', 'failureCode', 'failureReceiptDigest'],
|
|
277
|
+
additionalProperties: false,
|
|
278
|
+
},
|
|
279
|
+
'approval.requested': {
|
|
280
|
+
type: 'object',
|
|
281
|
+
properties: {
|
|
282
|
+
requestId: nonEmptyString,
|
|
283
|
+
toolName: nonEmptyString,
|
|
284
|
+
},
|
|
285
|
+
required: ['requestId', 'toolName'],
|
|
286
|
+
additionalProperties: false,
|
|
287
|
+
},
|
|
288
|
+
'step.snapshot': {
|
|
289
|
+
type: 'object',
|
|
290
|
+
properties: {
|
|
291
|
+
snapshotId: nonEmptyString,
|
|
292
|
+
digest: nonEmptyString,
|
|
293
|
+
receipt: nonEmptyString,
|
|
294
|
+
},
|
|
295
|
+
required: ['snapshotId', 'digest', 'receipt'],
|
|
296
|
+
additionalProperties: false,
|
|
297
|
+
},
|
|
298
|
+
'capability.receipt': {
|
|
299
|
+
type: 'object',
|
|
300
|
+
properties: {
|
|
301
|
+
receiptId: nonEmptyString,
|
|
302
|
+
digest: nonEmptyString,
|
|
303
|
+
receipt: nonEmptyString,
|
|
304
|
+
},
|
|
305
|
+
required: ['receiptId', 'digest', 'receipt'],
|
|
306
|
+
additionalProperties: false,
|
|
307
|
+
},
|
|
308
|
+
'tool.receipt': {
|
|
309
|
+
type: 'object',
|
|
310
|
+
properties: {
|
|
311
|
+
invocationId: nonEmptyString,
|
|
312
|
+
terminal: { type: 'string', enum: ['completed', 'failed', 'interrupted', 'indeterminate'] },
|
|
313
|
+
success: { type: 'boolean' },
|
|
314
|
+
outputDigest: nonEmptyString,
|
|
315
|
+
receiptDigest: nonEmptyString,
|
|
316
|
+
intentDigest: nonEmptyString,
|
|
317
|
+
},
|
|
318
|
+
required: [
|
|
319
|
+
'invocationId',
|
|
320
|
+
'terminal',
|
|
321
|
+
'success',
|
|
322
|
+
'outputDigest',
|
|
323
|
+
'receiptDigest',
|
|
324
|
+
'intentDigest',
|
|
325
|
+
],
|
|
326
|
+
additionalProperties: false,
|
|
327
|
+
},
|
|
328
|
+
};
|
|
329
|
+
class RuntimeProtocolValidationError extends Error {
|
|
330
|
+
constructor(problems) {
|
|
331
|
+
super(`Runtime protocol validation failed: ${problems.join('; ')}`);
|
|
332
|
+
this.problems = problems;
|
|
333
|
+
this.code = 'ORION_RUNTIME_PROTOCOL_INVALID';
|
|
334
|
+
this.name = 'RuntimeProtocolValidationError';
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
exports.RuntimeProtocolValidationError = RuntimeProtocolValidationError;
|
|
338
|
+
const UUID_PATTERN = '^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$';
|
|
339
|
+
const UUID_REGEXP = new RegExp(UUID_PATTERN);
|
|
340
|
+
function createRuntimeId() {
|
|
341
|
+
return (0, crypto_1.randomUUID)();
|
|
342
|
+
}
|
|
343
|
+
function isRuntimeId(value) {
|
|
344
|
+
return typeof value === 'string' && UUID_REGEXP.test(value);
|
|
345
|
+
}
|
|
346
|
+
function getAgentRuntimeProtocolSchemaV1() {
|
|
347
|
+
const commandVariants = Object.entries(exports.AGENT_RUNTIME_COMMAND_DEFINITIONS_V1).map(([type, data]) => ({
|
|
348
|
+
type: 'object',
|
|
349
|
+
properties: {
|
|
350
|
+
protocolVersion: { const: 1 },
|
|
351
|
+
commandId: { type: 'string', pattern: UUID_PATTERN },
|
|
352
|
+
type: { const: type },
|
|
353
|
+
data,
|
|
354
|
+
},
|
|
355
|
+
required: ['protocolVersion', 'commandId', 'type', 'data'],
|
|
356
|
+
additionalProperties: false,
|
|
357
|
+
}));
|
|
358
|
+
const eventVariants = Object.entries(exports.RUNTIME_EVENT_DEFINITIONS_V1).map(([type, data]) => ({
|
|
359
|
+
type: 'object',
|
|
360
|
+
properties: {
|
|
361
|
+
type: { const: type },
|
|
362
|
+
data,
|
|
363
|
+
},
|
|
364
|
+
required: ['type', 'data'],
|
|
365
|
+
additionalProperties: false,
|
|
366
|
+
}));
|
|
367
|
+
return deepFreeze({
|
|
368
|
+
protocolVersion: 1,
|
|
369
|
+
command: { oneOf: commandVariants },
|
|
370
|
+
eventEnvelope: {
|
|
371
|
+
type: 'object',
|
|
372
|
+
properties: {
|
|
373
|
+
protocolVersion: { const: 1 },
|
|
374
|
+
eventId: { type: 'string', pattern: UUID_PATTERN },
|
|
375
|
+
seq: { type: 'integer', minimum: 0 },
|
|
376
|
+
threadId: { type: 'string', pattern: UUID_PATTERN },
|
|
377
|
+
turnId: { type: 'string', pattern: UUID_PATTERN },
|
|
378
|
+
stepId: { type: 'string', pattern: UUID_PATTERN },
|
|
379
|
+
itemId: { type: 'string', pattern: UUID_PATTERN },
|
|
380
|
+
durability: { enum: ['durable', 'ephemeral'] },
|
|
381
|
+
timestamp: { type: 'integer', minimum: 0 },
|
|
382
|
+
payload: { oneOf: eventVariants },
|
|
383
|
+
},
|
|
384
|
+
required: [
|
|
385
|
+
'protocolVersion',
|
|
386
|
+
'eventId',
|
|
387
|
+
'seq',
|
|
388
|
+
'threadId',
|
|
389
|
+
'durability',
|
|
390
|
+
'timestamp',
|
|
391
|
+
'payload',
|
|
392
|
+
],
|
|
393
|
+
additionalProperties: false,
|
|
394
|
+
},
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
function assertAgentRuntimeCommandV1(value) {
|
|
398
|
+
const problems = [];
|
|
399
|
+
if (!isRecord(value)) {
|
|
400
|
+
throw new RuntimeProtocolValidationError(['command must be an object']);
|
|
401
|
+
}
|
|
402
|
+
if (value.protocolVersion !== 1)
|
|
403
|
+
problems.push('protocolVersion must equal 1');
|
|
404
|
+
if (!isRuntimeId(value.commandId))
|
|
405
|
+
problems.push('commandId must be a UUID');
|
|
406
|
+
if (typeof value.type !== 'string' || !(value.type in exports.AGENT_RUNTIME_COMMAND_DEFINITIONS_V1)) {
|
|
407
|
+
problems.push('type must be a known command');
|
|
408
|
+
}
|
|
409
|
+
else {
|
|
410
|
+
validateSchema(value.data, exports.AGENT_RUNTIME_COMMAND_DEFINITIONS_V1[value.type], 'data', problems);
|
|
411
|
+
}
|
|
412
|
+
if (problems.length > 0)
|
|
413
|
+
throw new RuntimeProtocolValidationError(problems);
|
|
414
|
+
}
|
|
415
|
+
function assertRuntimeEventEnvelopeV1(value) {
|
|
416
|
+
const problems = [];
|
|
417
|
+
if (!isRecord(value)) {
|
|
418
|
+
throw new RuntimeProtocolValidationError(['event envelope must be an object']);
|
|
419
|
+
}
|
|
420
|
+
if (value.protocolVersion !== 1)
|
|
421
|
+
problems.push('protocolVersion must equal 1');
|
|
422
|
+
if (!isRuntimeId(value.eventId))
|
|
423
|
+
problems.push('eventId must be a UUID');
|
|
424
|
+
if (!isRuntimeId(value.threadId))
|
|
425
|
+
problems.push('threadId must be a UUID');
|
|
426
|
+
for (const field of ['turnId', 'stepId', 'itemId']) {
|
|
427
|
+
if (value[field] !== undefined && !isRuntimeId(value[field])) {
|
|
428
|
+
problems.push(`${field} must be a UUID when present`);
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
if (!Number.isSafeInteger(value.seq) || value.seq < 0) {
|
|
432
|
+
problems.push('seq must be a non-negative safe integer');
|
|
433
|
+
}
|
|
434
|
+
if (!Number.isSafeInteger(value.timestamp) || value.timestamp < 0) {
|
|
435
|
+
problems.push('timestamp must be a non-negative safe integer');
|
|
436
|
+
}
|
|
437
|
+
if (value.durability !== 'durable' && value.durability !== 'ephemeral') {
|
|
438
|
+
problems.push('durability must be durable or ephemeral');
|
|
439
|
+
}
|
|
440
|
+
if (!isRecord(value.payload) || typeof value.payload.type !== 'string') {
|
|
441
|
+
problems.push('payload must be a typed event object');
|
|
442
|
+
}
|
|
443
|
+
else if (!(value.payload.type in exports.RUNTIME_EVENT_DEFINITIONS_V1)) {
|
|
444
|
+
problems.push('payload.type must be a known event');
|
|
445
|
+
}
|
|
446
|
+
else {
|
|
447
|
+
validateSchema(value.payload.data, exports.RUNTIME_EVENT_DEFINITIONS_V1[value.payload.type], 'payload.data', problems);
|
|
448
|
+
validateEventIdentity(value, value.payload.type, problems);
|
|
449
|
+
}
|
|
450
|
+
if (problems.length > 0)
|
|
451
|
+
throw new RuntimeProtocolValidationError(problems);
|
|
452
|
+
}
|
|
453
|
+
function validateEventIdentity(value, type, problems) {
|
|
454
|
+
if (type === 'item.delta') {
|
|
455
|
+
if (value.durability !== 'ephemeral')
|
|
456
|
+
problems.push('item.delta must be ephemeral');
|
|
457
|
+
}
|
|
458
|
+
else if (value.durability !== 'durable') {
|
|
459
|
+
problems.push(`${type} must be durable`);
|
|
460
|
+
}
|
|
461
|
+
if (value.durability === 'durable' && (!Number.isSafeInteger(value.seq) || value.seq === 0)) {
|
|
462
|
+
problems.push('durable events require seq >= 1');
|
|
463
|
+
}
|
|
464
|
+
if (type.startsWith('turn.') &&
|
|
465
|
+
type !== 'turn.queued' &&
|
|
466
|
+
type !== 'turn.queue_expired' &&
|
|
467
|
+
!isRuntimeId(value.turnId)) {
|
|
468
|
+
problems.push(`${type} requires turnId`);
|
|
469
|
+
}
|
|
470
|
+
if (type.startsWith('item.')) {
|
|
471
|
+
if (!isRuntimeId(value.turnId))
|
|
472
|
+
problems.push(`${type} requires turnId`);
|
|
473
|
+
if (!isRuntimeId(value.stepId))
|
|
474
|
+
problems.push(`${type} requires stepId`);
|
|
475
|
+
if (!isRuntimeId(value.itemId))
|
|
476
|
+
problems.push(`${type} requires itemId`);
|
|
477
|
+
}
|
|
478
|
+
if (type.startsWith('compact.') && !isRuntimeId(value.turnId)) {
|
|
479
|
+
problems.push(`${type} requires turnId`);
|
|
480
|
+
}
|
|
481
|
+
}
|
|
482
|
+
function validateSchema(value, schema, path, problems) {
|
|
483
|
+
if (schema.type === 'string') {
|
|
484
|
+
if (typeof value !== 'string') {
|
|
485
|
+
problems.push(`${path} must be a string`);
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (schema.minLength !== undefined && value.length < schema.minLength) {
|
|
489
|
+
problems.push(`${path} must not be empty`);
|
|
490
|
+
}
|
|
491
|
+
if (schema.enum && !schema.enum.includes(value)) {
|
|
492
|
+
problems.push(`${path} must be one of ${schema.enum.join(', ')}`);
|
|
493
|
+
}
|
|
494
|
+
return;
|
|
495
|
+
}
|
|
496
|
+
if (schema.type === 'number' || schema.type === 'integer') {
|
|
497
|
+
if (typeof value !== 'number' ||
|
|
498
|
+
!Number.isFinite(value) ||
|
|
499
|
+
(schema.type === 'integer' && !Number.isSafeInteger(value))) {
|
|
500
|
+
problems.push(`${path} must be a ${schema.type}`);
|
|
501
|
+
return;
|
|
502
|
+
}
|
|
503
|
+
if (schema.minimum !== undefined && value < schema.minimum) {
|
|
504
|
+
problems.push(`${path} must be >= ${schema.minimum}`);
|
|
505
|
+
}
|
|
506
|
+
return;
|
|
507
|
+
}
|
|
508
|
+
if (schema.type === 'boolean') {
|
|
509
|
+
if (typeof value !== 'boolean')
|
|
510
|
+
problems.push(`${path} must be a boolean`);
|
|
511
|
+
return;
|
|
512
|
+
}
|
|
513
|
+
if (schema.type === 'array') {
|
|
514
|
+
if (!Array.isArray(value)) {
|
|
515
|
+
problems.push(`${path} must be an array`);
|
|
516
|
+
return;
|
|
517
|
+
}
|
|
518
|
+
if (schema.maxItems !== undefined && value.length > schema.maxItems) {
|
|
519
|
+
problems.push(`${path} must contain at most ${schema.maxItems} items`);
|
|
520
|
+
}
|
|
521
|
+
value.forEach((entry, index) => validateSchema(entry, schema.items, `${path}[${index}]`, problems));
|
|
522
|
+
return;
|
|
523
|
+
}
|
|
524
|
+
if (schema.type !== 'object') {
|
|
525
|
+
problems.push(`${path} uses an unsupported schema`);
|
|
526
|
+
return;
|
|
527
|
+
}
|
|
528
|
+
if (!isRecord(value)) {
|
|
529
|
+
problems.push(`${path} must be an object`);
|
|
530
|
+
return;
|
|
531
|
+
}
|
|
532
|
+
const required = new Set(schema.required ?? []);
|
|
533
|
+
for (const key of required) {
|
|
534
|
+
if (!(key in value))
|
|
535
|
+
problems.push(`${path}.${key} is required`);
|
|
536
|
+
}
|
|
537
|
+
for (const [key, entry] of Object.entries(value)) {
|
|
538
|
+
const propertySchema = schema.properties[key];
|
|
539
|
+
if (!propertySchema) {
|
|
540
|
+
problems.push(`${path}.${key} is not allowed`);
|
|
541
|
+
continue;
|
|
542
|
+
}
|
|
543
|
+
validateSchema(entry, propertySchema, `${path}.${key}`, problems);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
function isRecord(value) {
|
|
547
|
+
return typeof value === 'object' && value !== null && !Array.isArray(value);
|
|
548
|
+
}
|
|
549
|
+
function deepFreeze(value) {
|
|
550
|
+
if (typeof value !== 'object' || value === null || Object.isFrozen(value))
|
|
551
|
+
return value;
|
|
552
|
+
Object.freeze(value);
|
|
553
|
+
for (const entry of Object.values(value))
|
|
554
|
+
deepFreeze(entry);
|
|
555
|
+
return value;
|
|
556
|
+
}
|
|
557
|
+
//# sourceMappingURL=runtime-protocol-v1.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"runtime-protocol-v1.js","sourceRoot":"","sources":["../../../src/runtime/protocol/runtime-protocol-v1.ts"],"names":[],"mappings":";;;AA2aA,0CAEC;AAED,kCAEC;AAED,0EAqDC;AAED,kEAyBC;AAED,oEAsCC;AA3iBD,mCAAoC;AA4DpC,MAAM,MAAM,GAAG,EAAE,IAAI,EAAE,QAAQ,EAAW,CAAC;AAC3C,MAAM,cAAc,GAAG,EAAE,IAAI,EAAE,QA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