@orion-agents/orion-code 0.1.9 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -0
- package/README.md +142 -323
- package/README.zh-CN.md +117 -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.map +1 -1
- package/dist/commands/session-command-handlers.js +29 -205
- 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 +8 -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 +78 -0
- package/dist/runtime/agent-loop.d.ts.map +1 -0
- package/dist/runtime/agent-loop.js +418 -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 +265 -1215
- 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 +34 -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 +105 -0
- package/dist/runtime/goal-runtime-coordinator.d.ts.map +1 -0
- package/dist/runtime/goal-runtime-coordinator.js +506 -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 +321 -0
- package/dist/runtime/orion-runtime-v1.d.ts.map +1 -0
- package/dist/runtime/orion-runtime-v1.js +958 -0
- package/dist/runtime/orion-runtime-v1.js.map +1 -0
- package/dist/runtime/orion-session-runner.d.ts +37 -0
- package/dist/runtime/orion-session-runner.d.ts.map +1 -0
- package/dist/runtime/orion-session-runner.js +146 -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 +1019 -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 +109 -0
- package/dist/runtime/release-receipts.d.ts.map +1 -0
- package/dist/runtime/release-receipts.js +304 -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/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-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 +85 -0
- package/dist/runtime/thread-ui-adapter.d.ts.map +1 -0
- package/dist/runtime/thread-ui-adapter.js +514 -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 +13 -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 +1 -1
- package/dist/runtime/ui-view-model.d.ts.map +1 -1
- package/dist/runtime/ui-view-model.js +3 -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/global-config.d.ts +2 -2
- package/dist/services/global-config.d.ts.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 +19 -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/tui-ui/chrome-view-model.js +1 -1
- package/dist/tui-ui/chrome-view-model.js.map +1 -1
- package/dist/tui-ui/layout.js +1 -1
- package/dist/tui-ui/layout.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,1234 @@
|
|
|
1
|
+
# Orion Code v0.2.0 Plan — DSH + Codex-informed Lean Harness Redesign
|
|
2
|
+
|
|
3
|
+
> 状态:Implementation complete;G1–G6 已达成,发布状态由 `ReleaseReceiptV1`、Git tag 与 npm registry 回读独立证明
|
|
4
|
+
>
|
|
5
|
+
> 目标版本:`v0.2.0`;实施工作树位于 `v0.2.0`
|
|
6
|
+
>
|
|
7
|
+
> 源码基线:`1010418f24a6d07a22074435bd4d50a9d339391c`,package `0.1.9`
|
|
8
|
+
>
|
|
9
|
+
> 规划日期:2026-08-26
|
|
10
|
+
>
|
|
11
|
+
> 上位目标:[Orion Code 项目级目标](../goals/orion-code-项目级目标.md)
|
|
12
|
+
>
|
|
13
|
+
> 架构参考:[DeepSeek Harness 与 Cordis:一文读懂「一切皆插件」的 Agent 底座](../architecture/dsh/DeepSeek-Harness与Cordis插件机制科普.md)
|
|
14
|
+
>
|
|
15
|
+
> Codex 开源调研基线:[`openai/codex@2df6705423`](https://github.com/openai/codex/tree/2df67054232090af8d2fa197c46b994bc2b0dda1)
|
|
16
|
+
>
|
|
17
|
+
> 历史输入:[原 v0.2.0 Verified Project Agent 计划](v0.2.0-coding-agent-platform-plan.md)
|
|
18
|
+
|
|
19
|
+
## 0. 决策摘要
|
|
20
|
+
|
|
21
|
+
v0.2.0 被重新定义为一次 Harness 架构大改版。原计划中的 Project Mission、isolated worktree、
|
|
22
|
+
Mission Board、Zed/VS Code 同期交付不再属于 v0.2.0 P0,移到 v0.3.0+ 重新排期。本版本只解决
|
|
23
|
+
一个更底层、也更影响长期 Goal 成功率的问题:**当前 Orion 每轮携带的能力过重,扩展通过全局
|
|
24
|
+
单例和具体模块进入 Loop,Skill/MCP/Tool 的发现、加载、选择与生命周期没有统一契约。**
|
|
25
|
+
|
|
26
|
+
v0.2.0 的产品定义是:
|
|
27
|
+
|
|
28
|
+
> 将 Orion 重构为 **DSH inside、Codex outside、Orion Goal/Evidence at the center** 的 Lean Coding-Agent
|
|
29
|
+
> Runtime:DSH 的 scope/effect 思想只管理第一方内部资源生命周期;Codex 风格的
|
|
30
|
+
> `Thread → Turn → Step → Item`、不可变 Step Snapshot 与语义事件协议负责执行、持久化和客户端;
|
|
31
|
+
> Orion 的 TaskContract、Evidence、Goal 与 StopDecision 负责验证工作是否真正完成。
|
|
32
|
+
|
|
33
|
+
这里的“模块”是 Orion 的静态第一方组合单元,不是运行时插件产品。用户仍然使用 Orion、Skills、
|
|
34
|
+
MCP、Model、Tools 和 Goal,不需要理解、安装或编排内部模块。v0.2.0 不提供第三方 Plugin SDK、
|
|
35
|
+
插件包加载、插件市场、插件信任中心或“创造模式”;也不照搬 Codex 的 marketplace、remote control
|
|
36
|
+
或完整 app-server 产品面。它只吸收两者已被开源代码证明的 Harness 能力。
|
|
37
|
+
|
|
38
|
+
本版本交付七个闭环能力:
|
|
39
|
+
|
|
40
|
+
1. **Static Runtime Spine**:显式 typed `RuntimeServices`、一次性第一方 composition root、受控
|
|
41
|
+
`ResourceScope`;拒绝热路径 service locator、任意动态模块 DAG 和通用插件容器。
|
|
42
|
+
2. **Thread Runtime + Semantic Protocol**:一个 `ThreadRuntime` 拥有 active turn、输入队列、持久事件
|
|
43
|
+
与 replay;UI 只投影 `Thread/Turn/Step/Item` 语义事件。
|
|
44
|
+
3. **Atomic Step Snapshot**:每次模型请求冻结 model、Authority、execution policy、prompt、tool router、
|
|
45
|
+
Skill 与 MCP binding;模型看到的 schema 与实际 dispatch 使用同一快照。
|
|
46
|
+
4. **Orion Capability Fabric**:从任务意图编译 direct/deferred/hidden 能力,不再把所有工具与扩展塞进
|
|
47
|
+
每个模型请求,并以 recall-first 的有界扩展修复漏选。
|
|
48
|
+
5. **Lazy Skills Runtime**:catalog 只含摘要,完整 `SKILL.md` 和资源按需加载;provider、缓存、
|
|
49
|
+
失效和调用策略成为稳定契约。
|
|
50
|
+
6. **Lazy Tool/MCP/Prompt Runtime**:MCP 不再启动即全连接,tool schema 不再全量暴露,prompt
|
|
51
|
+
section 有预算、digest 和来源。
|
|
52
|
+
7. **Single Production Loop + Durable Completion**:删除旧 Brain/Agent/Harness/SDK mock 和旁路 query;
|
|
53
|
+
所有 UI、命令、Goal、Subagent 与自动化进入同一个 Loop,并在成功事件前提交 durable terminal outcome。
|
|
54
|
+
|
|
55
|
+
这不是“给现有类换成 module 名字”。若发布包仍保留旧 runtime、全局 `TOOLS`、全量 Skill prompt、
|
|
56
|
+
启动时 `connectAll()`、通用 string-token service locator,或 UI 仍直接拥有 transcript 状态,则本版本视为未完成。
|
|
57
|
+
|
|
58
|
+
### 0.1 核心目标:更轻、更稳、能完成、可恢复
|
|
59
|
+
|
|
60
|
+
v0.2.0 的核心目标不是“完成一次 Harness 重构”,而是让用户可以把一个真实 coding Goal 从输入持续运行到
|
|
61
|
+
**有证据的完成并自动退出**,同时不为无关 Skill、MCP 和工具付出启动与上下文成本;进程中断后恢复,
|
|
62
|
+
仍得到与不中断路径等价的任务状态。DSH/Codex 架构、目录调整和内部 API 都只是达成这些结果的手段。
|
|
63
|
+
|
|
64
|
+
以下六项必须同时成立,才能称为完成本次迭代:
|
|
65
|
+
|
|
66
|
+
| 核心目标 | 达成后的实际效果 | 硬性证明 |
|
|
67
|
+
| ------------------------------ | ------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
68
|
+
| **G1 Lean by default** | CLI 更快 ready;普通任务不连接无关 MCP、不读取无关 Skill body,只发送完成当前 Step 所需的 prompt/tool schema | 冷启动 p95 改善 `>= 30%`;成功任务输入 token 中位数降低 `>= 30%`;首步 schema 降低 `>= 50%`;无关 Skill/MCP 活动为 `0` |
|
|
69
|
+
| **G2 Verified completion** | 长期 Goal 能持续推进,在 criteria/evidence 满足后可靠自动退出,不再出现 Harness 已完成但 Goal 仍 active | Task success 不低于 baseline;False Completion Rate 为 `0`;20+ turn Goal、no-progress、blocked、budget、abort 与 auto-exit E2E 全绿 |
|
|
70
|
+
| **G3 Deterministic execution** | 模型看到的工具与实际可执行工具始终一致;BUILD/PLAN/AUTO 不再造成工具集合或权限漂移;所有副作用走同一安全链路 | 一个 agentic Loop 实现、一个 ToolGateway;StepSnapshot schema/router digest 绑定;所有调用经过 Capability → Policy → Approval → Sandbox → Execute |
|
|
71
|
+
| **G4 Crash-safe recovery** | compact、tool、Goal 或进程在任意提交阶段中断后,resume 不出现半新半旧状态,也不丢失 tool pairing、evidence 或下一步 | durable facts 先于 projection;TurnCommit/compact crash injection 全绿;resume projection 与 uninterrupted path digest 等价 |
|
|
72
|
+
| **G5 Predictable interaction** | TUI、terminal、print、Goal 与 subagent 对 start、steer、queue、interrupt、completed 的理解一致,慢客户端不会拖垮 Runtime | Thread/Turn/Step/Item 协议同构;每个 started Item 恰好一个终态;bounded queue/backpressure 与 renderer replay 全绿 |
|
|
73
|
+
| **G6 Maintainable foundation** | 三套 Harness、旧 Agent、全局 registries 和执行旁路被收敛;新增能力通过显式 service/contributor 接入而不继续膨胀 Loop | 一个 OrionRuntime owner、一个 TaskContext completion owner;legacy owner/adapter 不进入 tarball;1,000 次 scope churn 无资源泄漏 |
|
|
74
|
+
|
|
75
|
+
用户级最终验收场景:
|
|
76
|
+
|
|
77
|
+
> 用户启动 Orion 后立即进入可用状态,提交一个包含读取、编辑、执行测试、必要 Skill/MCP 和子任务的长期
|
|
78
|
+
> Goal。Runtime 只加载本任务需要的能力;每个工具调用可执行、可取消、可审计;Goal 依据持久 evidence
|
|
79
|
+
> 判断完成并自动退出。即使中途 compact、Ctrl+C、进程退出或 resume,Orion 仍能从 durable log 恢复到
|
|
80
|
+
> 唯一正确状态,并继续或结束任务,而不是产生 ghost continuation、重复副作用或卡在 Goal 模式。
|
|
81
|
+
|
|
82
|
+
本核心目标不包含“模型本身变聪明”、第三方插件平台、完整 Codex app-server、远程执行平台或 IDE 大纵切。
|
|
83
|
+
这些内容不能替代上述效果,也不能成为 v0.2.0 延期和扩张 P0 的理由。第 3.2 节量化门槛、AC1–AC22 与
|
|
84
|
+
Release Go/No-Go 都必须回溯到 G1–G6,无法证明核心目标的架构工作不进入本版本。
|
|
85
|
+
|
|
86
|
+
### 0.2 版本边界
|
|
87
|
+
|
|
88
|
+
| 版本 | 责任 |
|
|
89
|
+
| --------- | ------------------------------------------------------------------------------------------ |
|
|
90
|
+
| `v0.1.10` | 完成当前发布线的稳定性、回归和迁移准备;不启动 DSH-inspired Runtime 大改 |
|
|
91
|
+
| `v0.2.0` | 本计划:重构 Harness、能力组织、Skill/MCP 加载与唯一 Agent Loop,允许明确 breaking changes |
|
|
92
|
+
| `v0.3.0+` | 重新规划 Project Mission、isolated worktree、Mission Control、IDE/editor 大纵切 |
|
|
93
|
+
|
|
94
|
+
选择 v0.2.0 是因为它会删除旧公共 exports、Session/Runtime 旁路和三套 Harness owner,并改变启动、
|
|
95
|
+
能力选择、Skill/MCP 生命周期与请求 receipt;这些不是 v0.1.10 的兼容性增量。
|
|
96
|
+
|
|
97
|
+
## 1. 参考结论:DSH 管资源,Codex 管执行,Orion 管完成
|
|
98
|
+
|
|
99
|
+
### 1.1 一手资料确认的设计
|
|
100
|
+
|
|
101
|
+
DeepSeek Harness 官方架构将模型适配、工具注册、Session Log 和 Agent Loop 都定义为插件;
|
|
102
|
+
Profile 负责命名组合,Bundle 负责分发组合。运行时通过 service、typed event 和 reversible effect
|
|
103
|
+
连接插件。Skill 子系统进一步区分 catalog 与完整定义:模型先看到 name/description,只有调用时
|
|
104
|
+
才加载 Skill body 和资源,并使用 provider observation、scope layering、bounded cache 和
|
|
105
|
+
invalidation 管理生命周期。
|
|
106
|
+
|
|
107
|
+
参考:
|
|
108
|
+
|
|
109
|
+
- [DeepSeek Harness Architecture](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/architecture.md)
|
|
110
|
+
- [DeepSeek Harness Cordis Primer](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/cordis-primer.md)
|
|
111
|
+
- [DeepSeek Harness Skills Subsystem](https://github.com/deepseek-ai/deepseek-harness/blob/master/docs/subsystems/skills.md)
|
|
112
|
+
- [Cordis paper repository](https://github.com/cordiverse/paper)
|
|
113
|
+
|
|
114
|
+
### 1.2 Orion 采用的机制
|
|
115
|
+
|
|
116
|
+
| DSH/Cordis 思想 | Orion v0.2.0 落地方式 |
|
|
117
|
+
| --------------------------- | --------------------------------------------------------------------------------------------- |
|
|
118
|
+
| Everything is a Plugin | **只取静态第一方组合思想**;不把每个 turn/step 建成动态插件容器 |
|
|
119
|
+
| Reversible Effect | watcher/listener/timer/process/cache lease 登记 disposer;业务副作用不伪装成可逆 effect |
|
|
120
|
+
| Dependency-driven lifecycle | composition root 启动前静态校验;运行中只管理有所有者的资源 lease |
|
|
121
|
+
| Scope | runtime → project → thread → turn → agent 资源 scope;子 Agent 不继承无关能力 |
|
|
122
|
+
| Profile / Bundle | 收敛为代码内 `RuntimePreset`;不提供用户插件编排、热装卸或任意配置图 |
|
|
123
|
+
| Lazy Skill | summary catalog、definition on demand、resource on demand、bounded cache、digest invalidation |
|
|
124
|
+
| Agent-specific capability | 每个 root turn 和 subagent 获得不可变 capability/tool/Skill/MCP snapshot |
|
|
125
|
+
| Stable service seam | feature 不能 import/patch Loop;通过显式 service 或窄 contributor lane 接入 |
|
|
126
|
+
|
|
127
|
+
### 1.3 明确不照搬的内容
|
|
128
|
+
|
|
129
|
+
v0.2.0 不引入 Cordis npm runtime,也不承诺以下能力:
|
|
130
|
+
|
|
131
|
+
- 任意时刻热替换运行中的 Loop;
|
|
132
|
+
- Agent 自动生成并加载可执行插件;
|
|
133
|
+
- 自修改、自修复或 transactional HMR;
|
|
134
|
+
- 公共插件市场和不受信任代码沙箱;
|
|
135
|
+
- 通用 YAML patch 语言;
|
|
136
|
+
- 对任意外部副作用宣称理论上的 confluence。
|
|
137
|
+
|
|
138
|
+
Orion 只对自己管理的内存状态、registries、listeners、timers、child processes 和 caches 提供
|
|
139
|
+
“最终配置决定最终状态”的保证。Git push、npm publish、网络写入等外部副作用不属于可逆 effect,
|
|
140
|
+
仍由现有 Authority、Policy、Evidence 和幂等协议控制。
|
|
141
|
+
|
|
142
|
+
### 1.4 Orion 自己的差异化
|
|
143
|
+
|
|
144
|
+
DSH Profile 主要是静态能力组合。Orion 在此基础上新增 **Task-derived Capability Compiler**:
|
|
145
|
+
|
|
146
|
+
```text
|
|
147
|
+
TaskContract + current input + Agent mode + Authority + Model capability
|
|
148
|
+
+ Goal/Evidence state + project facts
|
|
149
|
+
↓
|
|
150
|
+
CapabilityPlanV1
|
|
151
|
+
↓
|
|
152
|
+
direct/deferred tools / prompt sections / skills / exact MCP bindings
|
|
153
|
+
↓
|
|
154
|
+
CapabilityReceiptV1
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
因此 Orion 的能力组合不是让用户手工维护一个越来越大的插件清单,而是让 Harness 在不扩大权限的
|
|
158
|
+
前提下,为每个 turn/agent 自动选择最小能力集合,并留下可恢复、可解释的 receipt。
|
|
159
|
+
|
|
160
|
+
### 1.5 Codex 开源 Harness 能力审计
|
|
161
|
+
|
|
162
|
+
调研以官方 `openai/codex@2df67054232090af8d2fa197c46b994bc2b0dda1` 为固定源码基线,而不是以
|
|
163
|
+
本机较旧 clone 或托管产品表现作为证据。当前开源代码证明了以下可复用契约:
|
|
164
|
+
|
|
165
|
+
- [`SessionServices`](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/core/src/state/service.rs)
|
|
166
|
+
是显式 typed service owner,不是热路径中的通用 service locator;
|
|
167
|
+
- [`StepContext`](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/core/src/session/step_context.rs)
|
|
168
|
+
冻结一次模型请求所用的 model、approval、sandbox、environment、tools、Skills 与 MCP binding;
|
|
169
|
+
- [`spec_plan`](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/core/src/tools/spec_plan.rs)
|
|
170
|
+
将工具分为 direct、deferred、model-only 与 hidden,并让模型可见 schema 和执行 router 来自同一计划;
|
|
171
|
+
- [`run_turn`](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/core/src/session/turn.rs)
|
|
172
|
+
维持单一 model/tool loop,并把 pre/mid-turn compact 放在正式生命周期内;
|
|
173
|
+
- [Extension Registry](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/ext/extension-api/src/registry.rs)
|
|
174
|
+
在 composition 阶段可变,启动后以窄 contributor lane 和 scoped typed state 运行;
|
|
175
|
+
- [Skills host prompt](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/ext/skills/src/host_prompt.rs)
|
|
176
|
+
只为已选择 Skill 读取 body,并对内容进行有界注入;
|
|
177
|
+
- [App Server protocol](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/app-server/README.md)
|
|
178
|
+
用 `Thread → Turn → Item`、`started → delta* → completed`、有界队列和版本化 schema 将客户端与 runtime 解耦;
|
|
179
|
+
- [Agent control](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/core/src/agent/control.rs)
|
|
180
|
+
让 child agent 使用独立 thread/context,同时共享 root-tree 级并发与预算约束;
|
|
181
|
+
- [Rollout recorder](https://github.com/openai/codex/blob/2df67054232090af8d2fa197c46b994bc2b0dda1/codex-rs/rollout/src/recorder.rs)
|
|
182
|
+
提供 append-only durable fact log,projection/index 不能领先事实源。
|
|
183
|
+
|
|
184
|
+
开源边界必须如实标注:模型权重与托管推理、server-side 行为、远程执行基础设施、插件目录后端和
|
|
185
|
+
产品实验均不在此次证据范围内。v0.2.0 不以这些不可见能力作为设计前提或验收依据。
|
|
186
|
+
|
|
187
|
+
### 1.6 DSH × Codex × Orion 综合决策
|
|
188
|
+
|
|
189
|
+
| 领域 | DSH 强项 | Codex 强项 | Orion v0.2.0 决策 |
|
|
190
|
+
| ------------ | ----------------------- | -------------------------------------------- | ------------------------------------------------------------------------------ |
|
|
191
|
+
| 内部能力组织 | scope、effect、资源退出 | 显式 services、静态 contributor composition | 显式 `RuntimeServices` + 窄 contributors + `ResourceScope`;不做通用容器 |
|
|
192
|
+
| 执行模型 | Session/Turn/Step 概念 | Thread/Turn/Item、单一 Loop、Step 快照 | `Runtime → Thread → Turn → Step → Item`;一个生产 Loop owner |
|
|
193
|
+
| 工具曝光 | 动态组合 | direct/deferred/hidden 与精确 router | 保留 Orion compiler,但输出 exact `ToolRouterSnapshot`,schema/dispatch 不漂移 |
|
|
194
|
+
| Skill/MCP | lazy provider、lease | snapshot、deferred exposure、bounded prewarm | descriptor 常驻,body/connection 按需;prewarm 绝不成为 correctness path |
|
|
195
|
+
| 状态与恢复 | lifecycle event | append-only rollout、replay、compact item | durable facts + ephemeral deltas 双平面;projection 可重建 |
|
|
196
|
+
| 权限与执行 | service seam | approval 与 sandbox 独立 | 新增统一 Execution service;Mode 不拥有权限,sandbox 不藏在 shell tool 内 |
|
|
197
|
+
| Goal 完成 | 非核心 | 以 turn 完成为主 | 保留 Orion TaskContract/Evidence/StopDecision,Goal 不成为第二套 Loop |
|
|
198
|
+
| 扩展产品 | 插件平台能力强 | 已有 plugin/marketplace 产品面 | 明确拒绝;Skills、MCP、Model 仍是唯一用户扩展面 |
|
|
199
|
+
|
|
200
|
+
最终架构原则是:**DSH 决定资源如何安全进入和退出;Codex 决定任务如何表示、执行、持久化和被
|
|
201
|
+
客户端控制;Orion 决定目标是否被证据证明完成。**
|
|
202
|
+
|
|
203
|
+
## 2. 当前基线与根因
|
|
204
|
+
|
|
205
|
+
以下是对规划基线 `v0.1.10@1010418f24a6` 的只读源码与本地运行快照。token 数使用 `bytes / 4` 粗估,
|
|
206
|
+
Phase 0 必须用实际 provider tokenizer 和固定任务集重建正式 baseline。
|
|
207
|
+
|
|
208
|
+
| 当前事实 | 证据与影响 |
|
|
209
|
+
| ---------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
|
|
210
|
+
| 静态工具共 33 个 | 全量 OpenAI tool schema JSON 为 20,596 bytes,约 5,149 tokens;连接 MCP 后继续增长 |
|
|
211
|
+
| `TOOLS` 是全局数组 | `getRuntimeTools()` 每轮返回全部 built-in + 已连接 MCP;CapabilityProfile 只是事后记录全量名字 |
|
|
212
|
+
| CLI 启动即连接所有 MCP | 所有入口都 eager `connectAll()`;interactive 不等待而产生工具集异步扩张 race,print/doctor 会等待 |
|
|
213
|
+
| Skill 启动时全量扫描 | loader 还会重复扫描并同步读取全部 `SKILL.md`;预渲染 skills string 驻留 Store 并在请求中重复发送 |
|
|
214
|
+
| Skill catalog 与 definition 未分离 | catalog、触发信息、路径、tool scope 和完整 prompt 共用 `SkillDefinition` |
|
|
215
|
+
| Loop 热路径重复计算 | 每轮重新 resolve skills、筛 tools、建 subagent、memory、prompt、Harness;每个模型 step 携带同一全量 schema |
|
|
216
|
+
| 三套 Harness + Goal 重复 owner | 旧 `Harness`、兼容 `HarnessEngine`、生产 `HarnessKernel` 并存;后两条 Goal/TaskContext 又重复持有 criteria、evidence、completion |
|
|
217
|
+
| CLI 仍启动旧 Agent runtime | `init()` 创建 Brain、Leader、Coder、Harness、Memory、Safety;主聊天却走另一套 runtime |
|
|
218
|
+
| Loop 实现与执行旁路不唯一 | 主 root/modern subagent 已共享 `query()`,但 `/run`、`/task`、legacy fork、mock SDK、`chatWithTools()` 仍有独立路径 |
|
|
219
|
+
| 主模块过度承担 orchestration | `query.ts` 1,904 行,`chat-controller.ts` 1,969 行,并直接了解 compact、skills、subagents、research 等 |
|
|
220
|
+
| 扩展类型先于扩展 runtime | Command source 已包含 `plugin`,但不存在统一 lifecycle、scope、cleanup 或 capability receipt |
|
|
221
|
+
|
|
222
|
+
当前轻量化瓶颈不是一次 `Array.filter()`,而是四类结构性成本:
|
|
223
|
+
|
|
224
|
+
1. **启动成本**:旧 runtime、全部 Skill discovery、全部 MCP connection 同时启动;
|
|
225
|
+
2. **模型上下文成本**:无关工具 schema、Skill catalog、Harness 说明反复随请求发送;
|
|
226
|
+
3. **控制流成本**:feature 判断散落在 chat/query/controller,local fast path、batch、command、research 还会旁路 ToolPipeline;
|
|
227
|
+
4. **状态成本**:全局 registry 无 scope 与 disposer,Session/TaskContext/Goal 的提交也不是一个 durable turn transaction。
|
|
228
|
+
|
|
229
|
+
## 3. 产品结果与量化成功指标
|
|
230
|
+
|
|
231
|
+
### 3.1 北极星指标
|
|
232
|
+
|
|
233
|
+
**Verified Work per Model Token(VWMT)**:
|
|
234
|
+
|
|
235
|
+
> 固定任务、模型、Authority 与成功条件下,每百万模型输入 token 能完成并通过 evidence audit 的
|
|
236
|
+
> 有效工程工作量。
|
|
237
|
+
|
|
238
|
+
只减少 prompt 而增加模型回合、工具 miss 或失败率,不算优化成功。
|
|
239
|
+
|
|
240
|
+
### 3.2 v0.2.0 准出门槛
|
|
241
|
+
|
|
242
|
+
| 指标 | 发布门槛 |
|
|
243
|
+
| ------------------ | -------------------------------------------------------------------------------------------------- |
|
|
244
|
+
| 成功任务输入 token | 固定 eval corpus 的成功任务总输入 token 中位数比 Phase 0 baseline 降低 `>= 30%` |
|
|
245
|
+
| 首步 tool schema | 默认 coding corpus 中位数比当前 20,596-byte baseline 降低 `>= 50%`;每个 omitted/selected 有原因 |
|
|
246
|
+
| Task success | 固定 corpus 不低于 baseline;False Completion Rate 仍为 `0` |
|
|
247
|
+
| Model request 数 | 每个成功任务中位数不得增长超过 `5%`;因能力 miss 触发的额外 expansion step 比例 `< 10%` |
|
|
248
|
+
| 冷启动 | `ready_for_input` p95 比 Phase 0 快 `>= 30%`;未选择 MCP 时连接数、子进程数均为 `0` |
|
|
249
|
+
| Skill lazy load | 未调用 Skill 的任务 definition load 次数为 `0`;catalog 不包含 body/resource 内容 |
|
|
250
|
+
| Loop 本地开销 | 排除 provider、tool 和持久化 I/O 后,step orchestration p95 `< 5ms` |
|
|
251
|
+
| 生命周期完整性 | 1,000 次 resource activate/scope-close/reconfigure 后无遗留 listener、timer、lease、child process |
|
|
252
|
+
| Step 一致性 | 每次请求的 model-visible schema digest 与 executable router digest 绑定;漂移、重名和越权均为 `0` |
|
|
253
|
+
| Replay 等价 | crash/resume 后 durable projection digest 与 uninterrupted path 一致;started Item 无孤儿终态 |
|
|
254
|
+
| Scope 隔离 | root、turn、subagent 并发压力下能力串用为 `0`;child 只见自己的冻结快照 |
|
|
255
|
+
| 可解释性 | 每次 model request 都有 `CapabilityReceiptV1`,解释 direct/deferred/omitted、Skill、MCP 与权限来源 |
|
|
256
|
+
| 发布质量 | Node 20/22/24 build/test;exact tarball clean install;TUI/terminal/print/Goal/subagent smoke 全绿 |
|
|
257
|
+
|
|
258
|
+
所有百分比同时报告 p50、p95、成功率和样本数,禁止只选择最有利的单次结果。
|
|
259
|
+
|
|
260
|
+
## 4. 目标架构
|
|
261
|
+
|
|
262
|
+
### 4.1 四平面与唯一所有权
|
|
263
|
+
|
|
264
|
+
```text
|
|
265
|
+
TUI / terminal / print / exec
|
|
266
|
+
│ commands + semantic notifications
|
|
267
|
+
▼
|
|
268
|
+
AgentRuntimeProtocolV1 Presentation Plane
|
|
269
|
+
│
|
|
270
|
+
▼
|
|
271
|
+
┌─────────────────────────────────────────────────────────────┐
|
|
272
|
+
│ OrionRuntime │ Control Plane
|
|
273
|
+
│ ├─ explicit RuntimeServices │
|
|
274
|
+
│ ├─ static RuntimeContributors │
|
|
275
|
+
│ ├─ ResourceScope tree │
|
|
276
|
+
│ └─ ThreadManager │
|
|
277
|
+
│ └─ ThreadRuntime │ Data Plane
|
|
278
|
+
│ ├─ durable ThreadEventStore + bounded input queue│
|
|
279
|
+
│ ├─ exactly one active Turn │
|
|
280
|
+
│ └─ immutable TurnContextV1 │
|
|
281
|
+
│ └─ Single Agent Loop │
|
|
282
|
+
│ ├─ StepSnapshotV1 │
|
|
283
|
+
│ ├─ ToolGateway / ExecutionService │
|
|
284
|
+
│ └─ TaskContext │
|
|
285
|
+
│ Goal · Evidence · StopDecision │
|
|
286
|
+
└─────────────────────────────────────────────────────────────┘
|
|
287
|
+
Model · Prompt · Skills · MCP · Policy · Capability · Compact Extension Plane
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
所有权约束:
|
|
291
|
+
|
|
292
|
+
- `OrionRuntime` 只在 composition root 构造一次 services 与 contributors;
|
|
293
|
+
- 一个 `ThreadRuntime` 独占该 thread 的 durable sequence、input queue 与 active turn;
|
|
294
|
+
- 一个普通 thread 同时最多一个 active turn;steer、queue follow-up、interrupt 是不同 command;
|
|
295
|
+
- Goal 是 durable `TaskContext` 与 continuation policy,不拥有第二套 Loop;
|
|
296
|
+
- UI Store 只消费语义事件生成 projection,不得直接修改 Loop、Session 或 transcript;
|
|
297
|
+
- append-only durable facts 是事实源,SQLite/index/UI projection 都不得领先它。
|
|
298
|
+
|
|
299
|
+
### 4.2 Static Runtime Spine
|
|
300
|
+
|
|
301
|
+
P0 不建设通用 DI 容器。核心 host 使用显式 typed 字段,使缺少依赖成为编译错误:
|
|
302
|
+
|
|
303
|
+
```ts
|
|
304
|
+
interface RuntimeServices {
|
|
305
|
+
readonly models: ModelService;
|
|
306
|
+
readonly threads: ThreadStore;
|
|
307
|
+
readonly policy: PolicyService;
|
|
308
|
+
readonly execution: ExecutionService;
|
|
309
|
+
readonly tools: ToolService;
|
|
310
|
+
readonly prompts: PromptService;
|
|
311
|
+
readonly skills: SkillService;
|
|
312
|
+
readonly mcp: McpService;
|
|
313
|
+
readonly taskContext: TaskContextService;
|
|
314
|
+
readonly capabilities: CapabilityService;
|
|
315
|
+
readonly events: RuntimeEventService;
|
|
316
|
+
readonly subagents: SubagentService;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
interface RuntimeContributors {
|
|
320
|
+
readonly context: readonly ContextContributor[];
|
|
321
|
+
readonly prompt: readonly PromptContributor[];
|
|
322
|
+
readonly tools: readonly ToolContributor[];
|
|
323
|
+
readonly threadLifecycle: readonly ThreadLifecycleContributor[];
|
|
324
|
+
readonly turnLifecycle: readonly TurnLifecycleContributor[];
|
|
325
|
+
readonly toolLifecycle: readonly ToolLifecycleContributor[];
|
|
326
|
+
}
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
contributors 只在 composition 阶段组装,启动后冻结。每条 lane 有 stable id、显式顺序、deadline、
|
|
330
|
+
failure policy 和 contract test;observer 失败不得破坏核心状态机,Policy、commit 与 StopDecision 等
|
|
331
|
+
权威阶段不得被 observer short-circuit。任何 contributor 都不能取得可变 `OrionRuntime` 或 Loop 内部对象。
|
|
332
|
+
|
|
333
|
+
`ResourceScope` 只管理真正可取消的资源:watcher、listener、timer、MCP transport/process、cache lease、
|
|
334
|
+
subagent task 与 AbortSignal。激活失败按 LIFO rollback;scope 关闭后拒绝新 lease;teardown 有 deadline,
|
|
335
|
+
stale async result 按 epoch 丢弃。Git push、npm publish、文件写入、网络 mutation 等业务副作用不属于
|
|
336
|
+
reversible effect,必须走 ToolGateway 的 authority、idempotency 与 evidence 契约。
|
|
337
|
+
|
|
338
|
+
### 4.3 Thread、Turn、Step、Item 状态层
|
|
339
|
+
|
|
340
|
+
```ts
|
|
341
|
+
interface StepSnapshotV1 {
|
|
342
|
+
readonly version: 1;
|
|
343
|
+
readonly threadId: string;
|
|
344
|
+
readonly turnId: string;
|
|
345
|
+
readonly stepId: string;
|
|
346
|
+
readonly taskEpoch: number;
|
|
347
|
+
readonly model: ModelSnapshot;
|
|
348
|
+
readonly authority: AuthoritySnapshot;
|
|
349
|
+
readonly executionPolicy: ExecutionPolicySnapshotV1;
|
|
350
|
+
readonly environment: EnvironmentSnapshot;
|
|
351
|
+
readonly capabilityPlan: CapabilityPlanV1;
|
|
352
|
+
readonly prompt: PromptSnapshotV1;
|
|
353
|
+
readonly toolRouter: ToolRouterSnapshotV1;
|
|
354
|
+
readonly skills: SkillSnapshotV1;
|
|
355
|
+
readonly mcp: McpBindingSnapshotV1;
|
|
356
|
+
readonly taskContextRevision: number;
|
|
357
|
+
readonly digest: string;
|
|
358
|
+
}
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
- `ThreadStateV2`:持久 identity、event cursor、projection digest、TaskContext 与 compact pointer;
|
|
362
|
+
- `TurnContextV1`:一个逻辑用户请求的 input、mode、deadline、budget、effective authority;
|
|
363
|
+
- `StepSnapshotV1`:在每个模型边界一次性捕获,随后深冻结;
|
|
364
|
+
- `ItemV1`:message、reasoning、command、file change、MCP call、plan、compact 等语义活动单元;
|
|
365
|
+
- `ThreadId`、`TurnId`、`StepId`、`ItemId` 使用稳定 UUID,禁止进程内递增 ID;
|
|
366
|
+
- 配置、provider 或 catalog 在运行中变化,只能影响下一 Step;已发出的工具调用继续使用原 snapshot;
|
|
367
|
+
- 模型可见 tool schema 与 executable binding 必须来自同一 `ToolRouterSnapshotV1`,不能分别查询 registry。
|
|
368
|
+
|
|
369
|
+
### 4.4 Semantic Runtime Protocol 与 durable event
|
|
370
|
+
|
|
371
|
+
```ts
|
|
372
|
+
interface RuntimeEventEnvelopeV1<T extends RuntimeEventV1> {
|
|
373
|
+
protocolVersion: 1;
|
|
374
|
+
eventId: string;
|
|
375
|
+
seq: number;
|
|
376
|
+
threadId: string;
|
|
377
|
+
turnId?: string;
|
|
378
|
+
stepId?: string;
|
|
379
|
+
itemId?: string;
|
|
380
|
+
durability: 'durable' | 'ephemeral';
|
|
381
|
+
timestamp: number;
|
|
382
|
+
payload: T;
|
|
383
|
+
}
|
|
384
|
+
```
|
|
385
|
+
|
|
386
|
+
- command 至少覆盖 initialize、thread start/resume/fork、turn start/steer/interrupt、approval response;
|
|
387
|
+
- notification 至少覆盖 turn/item started、delta、completed/failed/interrupted、compact 与 receipts;
|
|
388
|
+
- 每个 `item.started` 恰好有一个 terminal event;durable terminal outcome flush 后才可发成功通知;
|
|
389
|
+
- ephemeral delta 可有界合并或丢弃,durable event 不可丢;队列满返回 typed overload,不无限占内存;
|
|
390
|
+
- TypeScript 类型与 JSON Schema 从同一 source 生成,golden fixtures 锁定兼容性;
|
|
391
|
+
- v0.2.0 只实现 transport-neutral 内部协议,不交付完整 app-server、SDK 或 remote-control surface。
|
|
392
|
+
|
|
393
|
+
### 4.5 Typed Loop 与 Execution Pipeline
|
|
394
|
+
|
|
395
|
+
```text
|
|
396
|
+
turn.admit → turn.prepare → step.snapshot
|
|
397
|
+
→ model.request / model.stream
|
|
398
|
+
→ tool.plan → policy.decide → approval.decide → sandbox.prepare
|
|
399
|
+
→ tool.execute → durable item outcome → task-context.observe
|
|
400
|
+
→ step.decide → next step | compact transaction | turn terminal commit
|
|
401
|
+
```
|
|
402
|
+
|
|
403
|
+
`ExecutionService` 是 command、file mutation、MCP side effect 和 user shell 的唯一执行边界,receipt 必须记录
|
|
404
|
+
authority source、approval decision、sandbox backend、`full | partial | none` enforcement、timeout、abort 和
|
|
405
|
+
terminal outcome。`approval=never` 不等于 `sandbox=off`;只有显式 Full Access 才能裸执行。BUILD/PLAN/AUTO
|
|
406
|
+
只影响行为提示与交互策略,不改变 containment 或 capability universe。
|
|
407
|
+
|
|
408
|
+
### 4.6 TaskContext、Goal 与 StopDecision 的唯一权威
|
|
409
|
+
|
|
410
|
+
`HarnessKernel` 的 TaskContract、criteria、evidence ledger、capsule、progress 与 completion gate 拆入
|
|
411
|
+
`TaskContextService`,成为唯一完成语义权威。Goal 只保留长周期 identity、token/time budget、lifecycle、
|
|
412
|
+
continuation generation 与 pause/resume/terminal state;Goal 不再复制 criteria、evidence 或 completion audit。
|
|
413
|
+
|
|
414
|
+
所有 request、Goal、subagent 与 runtime stop 原因统一交给 typed `StopDecisionV1` 仲裁,优先级固定为:
|
|
415
|
+
|
|
416
|
+
```text
|
|
417
|
+
hard policy / persistence failure / user abort
|
|
418
|
+
> provider or resource budget
|
|
419
|
+
> TaskContext verified completion
|
|
420
|
+
> Goal blocked or no-progress policy
|
|
421
|
+
> request natural completion / continuation
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
同一 turn 的 transcript、TaskContext transition、Goal lifecycle、compact pointer、Capability/Tool receipts 由
|
|
425
|
+
`TurnCommitV1` 或等价 WAL/CAS 一次提交。进程崩溃后只能看到上一完整 turn 或下一完整 turn,禁止出现
|
|
426
|
+
“Harness 已完成但 Goal 未完成”、新 transcript 配旧 evidence、或 checkpoint 领先 history 的混合状态。
|
|
427
|
+
|
|
428
|
+
## 5. Orion Capability Fabric
|
|
429
|
+
|
|
430
|
+
### 5.1 从快照升级为编译结果
|
|
431
|
+
|
|
432
|
+
当前 `CapabilityProfile` 记录“本轮已经有的全部工具”。v0.2.0 将它替换为可执行计划:
|
|
433
|
+
|
|
434
|
+
```ts
|
|
435
|
+
interface CapabilityPlanV1 {
|
|
436
|
+
version: 1;
|
|
437
|
+
id: string;
|
|
438
|
+
threadId: string;
|
|
439
|
+
turnId: string;
|
|
440
|
+
taskEpoch: number;
|
|
441
|
+
preset: string;
|
|
442
|
+
promptSections: SelectedPromptSection[];
|
|
443
|
+
directTools: SelectedTool[];
|
|
444
|
+
deferredTools: SelectedToolSummary[];
|
|
445
|
+
hiddenTools: HiddenToolReason[];
|
|
446
|
+
skills: SelectedSkillSummary[];
|
|
447
|
+
mcpBindings: SelectedMcpBinding[];
|
|
448
|
+
authority: AuthoritySnapshot;
|
|
449
|
+
budgets: CapabilityBudgets;
|
|
450
|
+
omitted: CapabilityOmission[];
|
|
451
|
+
digest: string;
|
|
452
|
+
}
|
|
453
|
+
```
|
|
454
|
+
|
|
455
|
+
输入信号:
|
|
456
|
+
|
|
457
|
+
- TaskContract objective、criteria、allowed scope、current instruction;
|
|
458
|
+
- 用户明确点名的 Skill、MCP、tool 或文件;
|
|
459
|
+
- BUILD/PLAN/AUTO 与 Goal 状态;
|
|
460
|
+
- 当前 Authority 和 hard deny;
|
|
461
|
+
- model 是否支持 tool calling、并行调用、vision、reasoning;
|
|
462
|
+
- project inventory、已使用 evidence、上一步 tool outcome;
|
|
463
|
+
- static RuntimePreset 与当前 provider catalog 提供的 available universe。
|
|
464
|
+
|
|
465
|
+
选择规则:
|
|
466
|
+
|
|
467
|
+
1. 用户明确请求且已授权的能力必须 pin 为 direct,不得被意图分类器静默漏掉;
|
|
468
|
+
2. 完成普遍 coding 任务所需的 read/search/edit/exec 核心能力保持 direct;
|
|
469
|
+
3. 大型、第三方、MCP 与长尾工具先作为 deferred summary 可发现,不把完整 schema 塞进首步;
|
|
470
|
+
4. hidden 只用于 Authority 拒绝、模型不支持、scope 禁止或 hard deny,并必须记录原因;
|
|
471
|
+
5. Skill 只能请求 capability,不能扩大 Authority;
|
|
472
|
+
6. Mode 不作为禁用工具的理由。PLAN、BUILD、AUTO 共享 capability universe,权限由 Policy 独立决定;
|
|
473
|
+
7. 若模型需要 deferred 能力,调用唯一的 `capability.search`,在下一模型边界有界扩展;
|
|
474
|
+
8. 每 turn 最多一次自动 expansion;失败时可使用固定 `coding-safe` snapshot,不恢复旧 Loop 或全量 schema;
|
|
475
|
+
9. 同样输入、authority、catalog 与 TaskContext revision 必须产生确定性 plan。
|
|
476
|
+
|
|
477
|
+
Capability Compiler 只决定模型可见性,不能按 Step 装卸基础 services。available universe 的服务与资源
|
|
478
|
+
生命周期由 Static Runtime Spine 管理,Step 只捕获它们的不可变 descriptor/binding snapshot。
|
|
479
|
+
|
|
480
|
+
### 5.2 Capability Receipt
|
|
481
|
+
|
|
482
|
+
每个 model request 持久化:
|
|
483
|
+
|
|
484
|
+
```ts
|
|
485
|
+
interface CapabilityReceiptV1 {
|
|
486
|
+
version: 1;
|
|
487
|
+
compilerVersion: string;
|
|
488
|
+
requestId: string;
|
|
489
|
+
threadId: string;
|
|
490
|
+
turnId: string;
|
|
491
|
+
stepId: string;
|
|
492
|
+
durableCommitId: string;
|
|
493
|
+
planDigest: string;
|
|
494
|
+
runtimeServicesDigest: string;
|
|
495
|
+
toolSchemaDigest: string;
|
|
496
|
+
toolRouterDigest: string;
|
|
497
|
+
directToolNames: string[];
|
|
498
|
+
deferredToolNames: string[];
|
|
499
|
+
hiddenToolReasons: Record<string, string>;
|
|
500
|
+
skillCatalogDigest: string;
|
|
501
|
+
loadedSkillDigests: Record<string, string>;
|
|
502
|
+
mcpBindingDigest: string;
|
|
503
|
+
promptManifest: PromptSectionReceipt[];
|
|
504
|
+
authorityDigest: string;
|
|
505
|
+
executionPolicyDigest: string;
|
|
506
|
+
expansion?: CapabilityExpansionReceipt;
|
|
507
|
+
estimatedInputTokens: number;
|
|
508
|
+
actualPromptTokens?: number;
|
|
509
|
+
toolSchemaBytes: number;
|
|
510
|
+
createdAt: number;
|
|
511
|
+
}
|
|
512
|
+
```
|
|
513
|
+
|
|
514
|
+
Receipt 不保存 secret、Skill body 或完整 project instruction。Resume 时若 service、Authority、catalog、
|
|
515
|
+
MCP 或 execution policy digest 不匹配,Runtime 必须重新编译并显示差异;不能静默声称完全重放。
|
|
516
|
+
receipts 使用 bounded retention 与 digest chain;expansion receipt 必须保存 parent plan、reason、预算和结果。
|
|
517
|
+
|
|
518
|
+
## 6. Skill Runtime 重构
|
|
519
|
+
|
|
520
|
+
### 6.1 类型分离
|
|
521
|
+
|
|
522
|
+
```ts
|
|
523
|
+
interface SkillDescriptorV1 {
|
|
524
|
+
id: string;
|
|
525
|
+
name: string;
|
|
526
|
+
description: string;
|
|
527
|
+
providerId: string;
|
|
528
|
+
sourceScope: 'builtin' | 'user' | 'project' | 'configured' | 'remote';
|
|
529
|
+
modelInvocable: boolean;
|
|
530
|
+
userInvocable: boolean;
|
|
531
|
+
requestedCapabilities: string[];
|
|
532
|
+
digest: string;
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
interface SkillDefinitionV1 extends SkillDescriptorV1 {
|
|
536
|
+
body: string;
|
|
537
|
+
resourceManifest: SkillResourceDescriptor[];
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
interface SkillProviderV1 {
|
|
541
|
+
list(scope: SkillScope, signal: AbortSignal): Promise<SkillObservationV1>;
|
|
542
|
+
get(id: string, signal: AbortSignal): Promise<SkillDefinitionV1 | undefined>;
|
|
543
|
+
getResource(id: string, path: string, signal: AbortSignal): Promise<SkillResource>;
|
|
544
|
+
subscribe?(invalidate: (observation: SkillInvalidation) => void): Disposer;
|
|
545
|
+
}
|
|
546
|
+
```
|
|
547
|
+
|
|
548
|
+
### 6.2 运行规则
|
|
549
|
+
|
|
550
|
+
- 启动只加载 provider manifest;catalog list 可以异步完成,不能阻塞 `ready_for_input`;
|
|
551
|
+
- filesystem provider 用 bounded frontmatter/prefix 或持久 descriptor manifest 建 catalog;不得为“发现”而读取
|
|
552
|
+
完整 body,单次 cold discovery 对同一根目录最多扫描一次;
|
|
553
|
+
- 初始 prompt 只显示有界 summary catalog,不含完整 body、resource、绝对路径和 trigger 实现;
|
|
554
|
+
- model 通过 `skill({name})` 加载 body;用户 `/skill` 走同一 service,不再旁路读文件;
|
|
555
|
+
- resource 只有 Skill 明确引用时才读取;
|
|
556
|
+
- `complete=false` 的 provider observation 不进入稳定 cache;
|
|
557
|
+
- cache 同时按 entry count、bytes、TTL 和 provider digest 有界;
|
|
558
|
+
- project > configured > user > builtin 的 shadow 规则显式化,冲突保留诊断;
|
|
559
|
+
- model/user invocation policy 分离;未授权 remote/project Skill 不能被模型自动加载;
|
|
560
|
+
- `requestedCapabilities` 与 Authority 取交集,Skill 不能自己注册或放宽工具权限;
|
|
561
|
+
- transcript/receipt 记录 skill id、provider、digest 与加载原因,不持久化 body;
|
|
562
|
+
- watcher、timer 和 remote request 全部绑定 provider scope 与 AbortSignal。
|
|
563
|
+
|
|
564
|
+
### 6.3 Catalog 大小策略
|
|
565
|
+
|
|
566
|
+
- `<= 32` 个 Skill:发布全部有界 name + description;
|
|
567
|
+
- `> 32` 个 Skill:发布按意图选出的 top summaries 与分类摘要,保留 `skill.search`;
|
|
568
|
+
- 每个 description 有字符上限;catalog 默认 hard budget 为 `min(contextWindow × 2%, 1200 tokens)`,并允许
|
|
569
|
+
provider-specific 更低上限;
|
|
570
|
+
- catalog section 在每个无服务端状态的逻辑请求中仍必须完整存在;digest 稳定时通过 stable prefix/provider
|
|
571
|
+
prompt cache 降低成本,不能把“缓存可能命中”误写成从请求中省略必要上下文。
|
|
572
|
+
|
|
573
|
+
## 7. Tool、MCP、Prompt、Execution 与 Model Services
|
|
574
|
+
|
|
575
|
+
### 7.1 Tool Registry
|
|
576
|
+
|
|
577
|
+
- 删除全局 `TOOLS` 数组和 `executeTool()` 的全局 lookup;
|
|
578
|
+
- 第一方 contributor 和 MCP provider 注册 immutable `ToolDescriptorV1`;有资源的 provider lease 绑定 scope;
|
|
579
|
+
- registry 区分 available,CapabilityPlan 区分 direct/deferred/hidden,ResourceScope 区分 active/draining/failed;
|
|
580
|
+
- 每个 Step 原子构造 `ToolRouterSnapshotV1`,同时包含 model-visible specs 与 executable bindings;
|
|
581
|
+
- model request 只序列化 direct schemas;deferred 只提供有界摘要,hidden 不暴露;
|
|
582
|
+
- `capability.search` 只返回有界摘要,不一次返回所有 schema;
|
|
583
|
+
- name/alias collision、schema/binding digest 不一致或 executor 缺失全部 fail closed;
|
|
584
|
+
- batch、permission、risk、output serialization 和 evidence 仍走唯一 tool pipeline;
|
|
585
|
+
- built-in canonical name 属于保留命名空间;第一方替换必须在 static composition 中显式声明并通过架构测试。
|
|
586
|
+
|
|
587
|
+
### 7.2 MCP
|
|
588
|
+
|
|
589
|
+
- 启动只解析 server descriptor,不调用 `connectAll()`;
|
|
590
|
+
- 用户显式 `/mcp connect <name>`、显式引用或 Capability Compiler 选中时才创建 lease;
|
|
591
|
+
- 首次连接获取 tool catalog,按 config digest + server identity 缓存 summary;
|
|
592
|
+
- 只把选中的 MCP tool schema 暴露给当前 Agent scope;
|
|
593
|
+
- 无 active lease 时按 idle deadline 关闭 transport/child process;
|
|
594
|
+
- server crash 只使对应 provider failed,不污染其他 tool registry;
|
|
595
|
+
- `/mcp` 展示 dormant/activating/connected/idle/draining/failed 与 lease owner;
|
|
596
|
+
- generic MCP tool 仍不能绕过 path、network、secret 和 child-agent policy。
|
|
597
|
+
- optional prewarm 只能在能力被明确选中后有界、合并地执行;准确的 Step binding 永远是 correctness path。
|
|
598
|
+
|
|
599
|
+
### 7.3 Prompt Registry
|
|
600
|
+
|
|
601
|
+
每个 prompt section 声明:
|
|
602
|
+
|
|
603
|
+
- stable id、authority、source contributor、static/dynamic;
|
|
604
|
+
- priority、token budget、render input 与 content digest;
|
|
605
|
+
- selected/omitted reason;
|
|
606
|
+
- cacheability 与 redaction policy。
|
|
607
|
+
|
|
608
|
+
当前 `SECTIONS` 常量迁入 registry。Task Context、Skill、Memory、Project Instructions、Goal、
|
|
609
|
+
Subagent、Mode 都作为 section provider;Loop 只调用 `prompts.assemble(plan, context)`。
|
|
610
|
+
|
|
611
|
+
### 7.4 Model 与 Session
|
|
612
|
+
|
|
613
|
+
- Model registry/client pool 通过 `orion.model` 提供,不再由 Loop import provider 细节;
|
|
614
|
+
- provider fallback、usage、retry 仍由 resilience service 管理;
|
|
615
|
+
- Thread store 先 append + flush durable event,再更新 model-visible history、index、compact pointer 与 UI projection;
|
|
616
|
+
- StopDecision、CapabilityReceipt、tool terminal outcome 与 Goal/Evidence transition 都是可重放 durable facts;
|
|
617
|
+
- 各 service 状态只能写自己的 versioned payload,不能在 shared projection 中任意加字段;
|
|
618
|
+
- migration 失败时旧 store 保持只读,新 store 不发布 active index,并给出恢复诊断。
|
|
619
|
+
|
|
620
|
+
### 7.5 Execution Boundary
|
|
621
|
+
|
|
622
|
+
`ExecutionService` 统一 command、file mutation、MCP side effect 与 user shell:
|
|
623
|
+
|
|
624
|
+
```text
|
|
625
|
+
ToolRouter binding
|
|
626
|
+
→ CapabilityPlan lookup
|
|
627
|
+
→ Authority / Policy decision
|
|
628
|
+
→ Approval decision
|
|
629
|
+
→ Sandbox transform + enforcement probe
|
|
630
|
+
→ Process or operation execute
|
|
631
|
+
→ output stream + evidence
|
|
632
|
+
→ durable ExecutionReceipt
|
|
633
|
+
```
|
|
634
|
+
|
|
635
|
+
- sandbox 与 approval 是独立维度,不能用模式或“不询问”推导为无隔离执行;
|
|
636
|
+
- macOS/Linux/Windows/Docker backend 共享 contract,receipt 明确 `full | partial | none`;
|
|
637
|
+
- sandbox profile 下 backend 缺失或 enforcement 不足时 fail closed,不得静默裸跑;
|
|
638
|
+
- side effect 开始前持久化 intent/started,完成后持久化 completed/failed/interrupted/indeterminate;
|
|
639
|
+
- outcome 为 indeterminate 的非幂等操作禁止自动重试,必须交给恢复策略或用户决策。
|
|
640
|
+
|
|
641
|
+
## 8. 第一方能力组合,而不是插件平台
|
|
642
|
+
|
|
643
|
+
### 8.1 静态第一方 Composition
|
|
644
|
+
|
|
645
|
+
`createRuntimeServices()` 显式构造 events、threads、model、policy、execution、tool gateway、prompt、
|
|
646
|
+
task context、capability、agent loop 和 diagnostics;`createRuntimeContributors()` 显式收集第一方窄
|
|
647
|
+
contributors。两者在启动后冻结,不支持运行时任意 provide/get、package scan 或 hot load。
|
|
648
|
+
|
|
649
|
+
### 8.2 内部 Runtime Preset
|
|
650
|
+
|
|
651
|
+
| Preset | 用途 | 默认能力 universe |
|
|
652
|
+
| ---------- | --------------------------- | ----------------------------------------- |
|
|
653
|
+
| `minimal` | benchmark、诊断、最小自动化 | model、session、policy、read/edit/exec |
|
|
654
|
+
| `coding` | 默认日常 coding | base + Git、LSP、Goal、Compact、Skills |
|
|
655
|
+
| `research` | 需要外部资料的受控任务 | coding + web/research providers |
|
|
656
|
+
| `headless` | print/exec/CI | coding runtime,不加载交互 UI contributor |
|
|
657
|
+
|
|
658
|
+
Preset 决定“哪些静态第一方能力可用”,CapabilityPlan 决定“当前请求哪些能力 direct、deferred 或 hidden”。
|
|
659
|
+
Preset 由 Orion entry point 与任务类型选择,不提供用户插件编排 UI,也不驱动 runtime service 热装卸。
|
|
660
|
+
BUILD/PLAN/AUTO 是行为与交互状态,不是 Preset。
|
|
661
|
+
|
|
662
|
+
### 8.3 产品边界
|
|
663
|
+
|
|
664
|
+
v0.2.0 使用窄 contributor 和 resource scope 组织内部源码,但**不把它做成产品平台**:
|
|
665
|
+
|
|
666
|
+
- 不公开 `definePlugin()`、service locator、effect 或内部 Preset API;
|
|
667
|
+
- 不从 npm、project path 或网络动态加载 JavaScript 插件;
|
|
668
|
+
- 不新增 `/plugin`、插件安装器、插件选择器、trust store 或 marketplace;
|
|
669
|
+
- 不要求用户理解 Bundle、dependency graph 或 lifecycle;
|
|
670
|
+
- Skills 继续承载知识与流程扩展,MCP 继续承载外部工具扩展,Model/Provider 继续承载模型接入;
|
|
671
|
+
- 第一方 contributor 只用于 Orion 自身构建、测试和诊断,不构成第三方兼容承诺;
|
|
672
|
+
- 若未来要开放第三方插件,必须单独立项解决 API version、隔离、签名、权限和生态治理,不搭便车进入本版本。
|
|
673
|
+
|
|
674
|
+
## 9. Single Production Loop
|
|
675
|
+
|
|
676
|
+
### 9.1 Loop 内核只保留的职责
|
|
677
|
+
|
|
678
|
+
1. 接收已获准的 Turn 并建立 turn scope;
|
|
679
|
+
2. 在模型边界捕获一个 `StepSnapshotV1`;
|
|
680
|
+
3. 只使用 snapshot 中的 Prompt、ToolRouter、Skill 与 MCP binding 调用 Model;
|
|
681
|
+
4. 将 tool calls 交给唯一 ToolGateway/ExecutionService;
|
|
682
|
+
5. 将观察结果交给 TaskContext 与 StopPolicy;
|
|
683
|
+
6. 需要时启动 compact transaction,或进入下一 Step;
|
|
684
|
+
7. 先 commit durable outcome,再发 terminal event 并关闭 scope。
|
|
685
|
+
|
|
686
|
+
Architecture test 必须禁止 Agent Loop import 以下具体模块:
|
|
687
|
+
|
|
688
|
+
- `skills/*`、`tools/mcp`、`memory/*`、`runtime/subagents/*`、`research/*`;
|
|
689
|
+
- TUI/terminal/print renderer;
|
|
690
|
+
- concrete model provider、session filesystem implementation;
|
|
691
|
+
- Goal renderer 或 command handler。
|
|
692
|
+
|
|
693
|
+
### 9.2 Thread admission、steer 与 backpressure
|
|
694
|
+
|
|
695
|
+
`ThreadRuntime` 是输入并发的唯一仲裁者,返回 typed admission:
|
|
696
|
+
|
|
697
|
+
```ts
|
|
698
|
+
type TurnAdmissionV1 =
|
|
699
|
+
| { status: 'started'; turnId: string }
|
|
700
|
+
| { status: 'steered'; activeTurnId: string; itemId: string }
|
|
701
|
+
| { status: 'queued'; queueId: string; position: number }
|
|
702
|
+
| { status: 'rejected'; reason: 'overloaded' | 'non_steerable' | 'shutdown' };
|
|
703
|
+
```
|
|
704
|
+
|
|
705
|
+
- regular coding/Goal turn 可按明确规则 steer;compact、review、migration 等 maintenance turn 不可 steer;
|
|
706
|
+
- queue 有 item/byte/deadline 上限;满载时 typed reject,不无限缓存;
|
|
707
|
+
- interrupt 先持久化 intent,再传播 AbortSignal;完成或中断 terminal event 恰好一次;
|
|
708
|
+
- 当前 turn 完成后,先应用 pending mode/config boundary,再启动 follow-up 或 Goal continuation;
|
|
709
|
+
- print/headless 若定义为 single-turn,必须显式 stop continuation,不产生 ghost provider call。
|
|
710
|
+
|
|
711
|
+
### 9.3 Compact、Resume 与 Subagent
|
|
712
|
+
|
|
713
|
+
Compact 是一个 non-steerable maintenance turn 和 `contextCompaction` Item,不是原地替换数组:
|
|
714
|
+
|
|
715
|
+
```text
|
|
716
|
+
compact.started
|
|
717
|
+
→ prepare candidate + source receipt
|
|
718
|
+
→ semantic/tool-pair/evidence validation
|
|
719
|
+
→ CAS against source history + TaskContext revision
|
|
720
|
+
→ compact.committed | compact.failed
|
|
721
|
+
```
|
|
722
|
+
|
|
723
|
+
- 任一阶段失败保留旧 projection;orphan bracket 可在 resume 时识别并收敛;
|
|
724
|
+
- 下一次 model-visible history 从 committed durable facts 投影,不能让 checkpoint 领先事实日志;
|
|
725
|
+
- resume/fork/revert 使用稳定 event cursor 和 projection digest;旧 Session 只做一次性导入;
|
|
726
|
+
- child agent 拥有独立 child Thread/Turn/Step snapshot,并复用相同 Loop;
|
|
727
|
+
- root thread tree 共享并发 limiter、model/tool budget 与 cancellation;child authority 是 parent 与 role policy 的交集;
|
|
728
|
+
- fork 前必须 flush/materialize parent durable state,child 只回传 bounded result/evidence,不回传整个 transcript。
|
|
729
|
+
|
|
730
|
+
### 9.4 需要删除的平行路径
|
|
731
|
+
|
|
732
|
+
发布前直接删除,不保留双写或 fallback:
|
|
733
|
+
|
|
734
|
+
- `src/init.ts` 中 Brain/Leader/Coder/legacy Harness runtime;
|
|
735
|
+
- `src/agents/` 旧 Agent/fork/coordinator/worker pool;
|
|
736
|
+
- `src/harness/harness.ts::HarnessEngine`;
|
|
737
|
+
- 与实际 tool policy 分离的 legacy `SafetyChecker` 执行路径;
|
|
738
|
+
- command handler 直接调用 `query()` 的聊天旁路;
|
|
739
|
+
- `AgentRunner` 的独立 loop;
|
|
740
|
+
- `/task`、`/run`、dead `handleChat()` 与零调用的 `LLMService.chatWithTools()`;
|
|
741
|
+
- mock `src/sdk/query.ts` 与虚假的 public SDK 能力;
|
|
742
|
+
- global `TOOLS`、global Skill loader/registry、global `mcpManager`;
|
|
743
|
+
- Store 中预渲染的 `skillsContent`;
|
|
744
|
+
- `mcpReady` 启动阻塞语义。
|
|
745
|
+
|
|
746
|
+
下列能力不删除,但必须迁入唯一 ToolGateway,且每次 nested invocation 保存 `parentInvocationId`:
|
|
747
|
+
|
|
748
|
+
- chat local fast path;
|
|
749
|
+
- `batch_read` 内部子调用;
|
|
750
|
+
- `/edit-preview`;
|
|
751
|
+
- dedicated web research 的 search/fetch;
|
|
752
|
+
- MCP、Skill、subagent 与 command tool execution。
|
|
753
|
+
|
|
754
|
+
`/status`、`/memory`、`/safety`、`/agents`、`/harness` 等读取 legacy `CommandContext.runtime` 的命令必须有
|
|
755
|
+
逐命令迁移/删除表;迁移完成前冻结旧 owner,完成后一起删除,不能先删 runtime 再在命令层补洞。
|
|
756
|
+
|
|
757
|
+
仍有价值的类型或实现先迁入新 service/contributor;未被生产 runtime 使用且无明确公共价值的代码直接删除。
|
|
758
|
+
迁移 adapter 只允许在 feature branch 内短期存在,不能进入 v0.2.0 tarball。这里的 Single Loop 指
|
|
759
|
+
**一个 agentic model→tool recursion 实现**;root 与每个 child 使用独立 Loop instance、Thread 和预算,
|
|
760
|
+
compact summarizer 是明确标注的非 agentic model-call 例外。
|
|
761
|
+
|
|
762
|
+
### 9.5 `/harness explain` 成为控制面
|
|
763
|
+
|
|
764
|
+
现有命令扩展为同一诊断服务的 text/JSON projection:
|
|
765
|
+
|
|
766
|
+
- RuntimeServices inventory、contributor order 与 active resource scopes;
|
|
767
|
+
- active thread/turn/step/item、pending steer/queue/approval/cancellation;
|
|
768
|
+
- CapabilityPlan 的 direct/deferred/hidden/omitted/reason;
|
|
769
|
+
- StepSnapshot、ToolRouter、Authority 与 ExecutionPolicy digest;
|
|
770
|
+
- tool schema bytes/tokens 与 full-registry 对比;
|
|
771
|
+
- Skill provider/catalog/load/cache 状态;
|
|
772
|
+
- MCP lease 和 idle teardown;
|
|
773
|
+
- prompt section token/digest/authority;
|
|
774
|
+
- latest CapabilityReceipt 与 resume drift;
|
|
775
|
+
- durable event cursor、projection lag、compact 前后 digest;
|
|
776
|
+
- lifecycle leak、failed activation、slow stage 与最近 StopDecision/Evidence refs。
|
|
777
|
+
|
|
778
|
+
`/tools` 展示 available/selected/lazy,`/skills` 不触发 body load,`/mcp` 不因查看状态而连接 server。
|
|
779
|
+
|
|
780
|
+
## 10. 范围锁定
|
|
781
|
+
|
|
782
|
+
### 10.1 P0
|
|
783
|
+
|
|
784
|
+
1. 显式 RuntimeServices、静态 contributors、ResourceScope 与 deterministic composition;
|
|
785
|
+
2. versioned `AgentRuntimeProtocolV1`、ThreadEventStore、bounded queue、replay 与旧 Session importer;
|
|
786
|
+
3. Thread/Turn/Step/Item、StepSnapshot、TurnCommit 与唯一 TaskContext completion authority;
|
|
787
|
+
4. Task-derived Capability Compiler、direct/deferred/hidden tools、exact ToolRouter 与 receipts;
|
|
788
|
+
5. 统一 ExecutionService:Policy、Approval、Sandbox、ToolGateway 与 invocation lineage;
|
|
789
|
+
6. Skill provider、summary catalog、lazy definition/resource、cache/invalidation;
|
|
790
|
+
7. MCP descriptor、lazy exact binding、lease、idle teardown、selected schema;
|
|
791
|
+
8. Single Production Loop 与所有产品入口切换,删除第 9.4 节平行路径;
|
|
792
|
+
9. compact transaction、subagent child Thread、StopDecision 与 crash/replay recovery;
|
|
793
|
+
10. benchmark、property/chaos、scope isolation、真实 PTY/tarball/release evidence。
|
|
794
|
+
|
|
795
|
+
### 10.2 P1(只在 P0 指标已达标后进入)
|
|
796
|
+
|
|
797
|
+
- remote Skill provider;
|
|
798
|
+
- `/harness explain` 的 contributor/resource lifecycle flame graph;
|
|
799
|
+
- 基于历史成功 receipt 的本地 capability ranking(不得上传内容或扩大权限);
|
|
800
|
+
- MCP catalog 持久 cache 的跨 Session warm start;
|
|
801
|
+
- transport adapter 或 stdio app-server(P0 只交付 transport-neutral protocol)。
|
|
802
|
+
|
|
803
|
+
### 10.3 明确非目标
|
|
804
|
+
|
|
805
|
+
- Project Mission、Task Graph、isolated worktree、Mission Board;
|
|
806
|
+
- 多 Writer、远程 worker、团队控制台;
|
|
807
|
+
- Cordis runtime 依赖、HMR、自修改 Agent、通用 service locator;
|
|
808
|
+
- 第三方 Plugin API/SDK、动态 package loader、插件配置、插件管理 UI、trust center 和 marketplace;
|
|
809
|
+
- 任何 external/untrusted JavaScript plugin;
|
|
810
|
+
- Streamable HTTP MCP/OAuth 扩协议;
|
|
811
|
+
- 以 mode 禁用工具或重新引入 PLAN read-only;
|
|
812
|
+
- 只做目录搬迁而不减少启动/上下文/控制流成本。
|
|
813
|
+
|
|
814
|
+
## 11. 破坏性 API 与配置迁移
|
|
815
|
+
|
|
816
|
+
### 11.1 公共 API
|
|
817
|
+
|
|
818
|
+
v0.2.0 是一次明确的架构 breaking cut:
|
|
819
|
+
|
|
820
|
+
- 删除 Brain、BaseAgent、LeaderAgent、CoderAgent、Harness、HarnessEngine、legacy MemorySystem 导出;
|
|
821
|
+
- 删除 mock SDK init/query;
|
|
822
|
+
- `query()` 不再作为绕过 Runtime 的公共主入口;
|
|
823
|
+
- 新公共边界为单一 `createOrionRuntime()`、versioned runtime protocol 和已有 Skills/MCP/Model 配置;
|
|
824
|
+
- RuntimeServices、contributors、ResourceScope 与 StepSnapshot implementation 保持 package-private;
|
|
825
|
+
- release notes 给出旧 symbol → 新 Runtime 能力的迁移表,不提供运行时 shim。
|
|
826
|
+
|
|
827
|
+
### 11.2 配置
|
|
828
|
+
|
|
829
|
+
在现有 `orion.json` schema 中新增 versioned `harness`:
|
|
830
|
+
|
|
831
|
+
```json
|
|
832
|
+
{
|
|
833
|
+
"harness": {
|
|
834
|
+
"capabilities": {
|
|
835
|
+
"toolSchemaBudgetTokens": 3000,
|
|
836
|
+
"skillCatalogBudgetTokens": 1200
|
|
837
|
+
},
|
|
838
|
+
"diagnostics": {
|
|
839
|
+
"capabilityReceipts": true
|
|
840
|
+
}
|
|
841
|
+
}
|
|
842
|
+
}
|
|
843
|
+
```
|
|
844
|
+
|
|
845
|
+
- 旧 `skills.paths` 自动映射为 filesystem Skill provider config;
|
|
846
|
+
- 旧 `mcpServers` 映射为 dormant MCP descriptors,不在迁移时连接;
|
|
847
|
+
- 旧 tools/permission 配置迁入 Policy/Capability config;
|
|
848
|
+
- config migration 采用 parse → validate → preview → atomic write;失败时不修改原文件;
|
|
849
|
+
- 配置 schema 不出现 plugin package、path、enable/disable 或 trust 字段。
|
|
850
|
+
|
|
851
|
+
## 12. 实施顺序
|
|
852
|
+
|
|
853
|
+
### Phase 0 — Pin sources、冻结基线与 ADR
|
|
854
|
+
|
|
855
|
+
- 固定 DSH、Cordis、Codex 与 Orion source SHA;调研引用只指向 pinned primary source;
|
|
856
|
+
- 建立 `scripts/bench/harness-runtime.ts` 与固定 eval corpus,cold/warm 各至少 30 个样本;
|
|
857
|
+
- 记录 startup、Skill body read、MCP process/socket、tool schema、prompt token、request count、success、latency;
|
|
858
|
+
- 将当前 33 tools / 20,596 schema bytes 快照变成自动回归,不依赖手工数字;
|
|
859
|
+
- 写 ADR:DSH inside/Codex outside、静态 composition、Thread/Turn/Step/Item、durable/ephemeral 事件、
|
|
860
|
+
atomic StepSnapshot、Execution boundary、TaskContext/Goal ownership、compact transaction、single Loop cutover。
|
|
861
|
+
|
|
862
|
+
退出条件:baseline 可重复三次;ADR 明确采用/拒绝/替代方案、失败模式与回滚边界。
|
|
863
|
+
|
|
864
|
+
### Phase 1 — Versioned Protocol 与 Thread Store
|
|
865
|
+
|
|
866
|
+
- 从同一 source 生成 `AgentRuntimeProtocolV1` TypeScript 类型、JSON Schema 与 golden fixtures;
|
|
867
|
+
- 实现 UUID identity、单调 durable seq、append + flush、projection、cursor replay 与 bounded queue;
|
|
868
|
+
- 定义 start/steer/follow-up/interrupt/approval command 及 typed admission;
|
|
869
|
+
- 将 transcript/message/trace 转为同一语义事件 projection,Store 降级为可重建 UI projection;
|
|
870
|
+
- 实现旧 Session → v2 Thread 的 dry-run、side-by-side、原子索引切换 importer;
|
|
871
|
+
- crash injection 覆盖 event append、flush、projection/index 更新之间的每个边界。
|
|
872
|
+
|
|
873
|
+
退出条件:fresh replay 与 crash-resume projection digest 一致,projection 从不领先 durable log。
|
|
874
|
+
|
|
875
|
+
### Phase 2 — Static Runtime Spine 与唯一 TaskContext
|
|
876
|
+
|
|
877
|
+
- 实现显式 `RuntimeServices`、静态 `RuntimeContributors`、`ResourceScope` 和 Harness Test Rig;
|
|
878
|
+
- 迁入 model、thread、policy、execution、tools、prompt、skills、MCP、capability、events、subagents seams;
|
|
879
|
+
- 将 `HarnessKernel` 拆为 TaskContext 内部组件;Goal 删除 criteria/evidence/completion 副本,只留长周期 lifecycle;
|
|
880
|
+
- 冻结 legacy `Harness`/`HarnessEngine`,以只读 adapter 支撑尚未迁移命令,不新增调用者;
|
|
881
|
+
- `/harness explain --json` 先接 service inventory、contributor order、resource scopes 和 TaskContext revision。
|
|
882
|
+
|
|
883
|
+
退出条件:compile-time service completeness 通过;1,000 次 fake-resource scope churn 无泄漏;TaskContext/Goal
|
|
884
|
+
completion 不变量只有一个权威来源。
|
|
885
|
+
|
|
886
|
+
### Phase 3 — ThreadRuntime、Atomic Step Snapshot 与 Single Loop
|
|
887
|
+
|
|
888
|
+
- 建立一个 ThreadRuntime owner、一个 active-turn state machine 和 frozen Turn/Step contexts;
|
|
889
|
+
- 从现有 `query()` 抽取已验证的 budget、tool pairing、provider resilience、completion gate,不推倒重写;
|
|
890
|
+
- 所有 model request 从同一 StepSnapshot 取得 prompt、schemas、bindings、Authority 与 execution policy;
|
|
891
|
+
- root、modern subagent 各用独立 Loop instance,但 agentic recursion 实现只有一个;
|
|
892
|
+
- TUI、terminal、print、Goal continuation、commands 接入语义 protocol;
|
|
893
|
+
- 按第 9.4 节迁移 `/status` 等 legacy CommandContext 依赖,并建立逐命令 cutover matrix。
|
|
894
|
+
|
|
895
|
+
退出条件:所有入口产生同构 Thread/Turn/Step/Item 序列;生产 dependency graph 只有一个 agentic Loop 实现。
|
|
896
|
+
|
|
897
|
+
### Phase 4 — Execution Boundary 与唯一 ToolGateway
|
|
898
|
+
|
|
899
|
+
- 将 ToolScheduler 的 policy order、parallel groups、permission receipts 演进为唯一 ToolGateway;
|
|
900
|
+
- 新增严格 ToolDescriptor:risk/effect/network/destructive/readOnly 缺任一关键元数据即拒绝注册;
|
|
901
|
+
- Policy → Approval → Sandbox → Execute → durable receipt 全链服务化;
|
|
902
|
+
- local fast path、batch child、edit-preview、research、MCP、Skill、subagent 全部接入 invocation lineage;
|
|
903
|
+
- macOS/Linux/Windows/Docker backend contract 验证 enforcement,sandbox-required policy 下不可用时 fail closed;
|
|
904
|
+
- tool side effect 与 TurnCommit 做 crash injection,indeterminate 非幂等 outcome 不自动重试。
|
|
905
|
+
|
|
906
|
+
退出条件:不存在 direct `executeTool()` 旁路;每个 call 恰好一个 terminal receipt,sandbox/authority 可解释。
|
|
907
|
+
|
|
908
|
+
### Phase 5 — Capability Fabric、Lazy Skill/Tool/MCP/Prompt
|
|
909
|
+
|
|
910
|
+
- 编译 direct/deferred/hidden 工具、deterministic route、budget、omission reasons、bounded expansion 与 receipt;
|
|
911
|
+
- built-in tools 转为 contributors,删除 global `TOOLS`;ToolRouter schema/executor exact binding;
|
|
912
|
+
- Skill Descriptor/Definition/Resource 分离,filesystem metadata scan 最多一次,body/resource 真正按需读取;
|
|
913
|
+
- MCP 先以 server descriptor 选择,冷缓存时 connect/list,再在下一 Step 选择 exact tool;
|
|
914
|
+
- Prompt sections、stable prefix/cache、manifest、digest 与 selected schemas 接入;
|
|
915
|
+
- 无 Skill/MCP corpus 验证 0 body read、0 connect/socket/process,Huoshan/OpenAI-compatible provider matrix 验证动态工具集。
|
|
916
|
+
|
|
917
|
+
退出条件:schema 降幅、routing recall、MCP zero-connect、Skill lazy、provider compatibility 达到第 3.2 节门槛。
|
|
918
|
+
|
|
919
|
+
### Phase 6 — Compact、Resume、Subagent 与 durable completion
|
|
920
|
+
|
|
921
|
+
- compact 改为 maintenance Turn + transaction bracket,统一 prepare/validate/CAS/commit owner;
|
|
922
|
+
- `TurnCommitV1` 原子覆盖 transcript、TaskContext、Goal、compact pointer 与 receipts;
|
|
923
|
+
- resume/fork/revert 由 event log 确定性重建;未完成 Item、orphan compact、stale lock、indeterminate tool 有恢复规则;
|
|
924
|
+
- child 使用独立 Thread/Turn/Step snapshot,相同 Loop,root-tree 共享 limiter/budget/abort;fork 前 flush parent;
|
|
925
|
+
- typed StopDecision arbitration 与 Goal 20+ continuation、no-progress、blocked、provider、budget、Ctrl+C 全链验证。
|
|
926
|
+
|
|
927
|
+
退出条件:compact/resume 下一次 model-visible input digest 与 uninterrupted path 等价,Goal 不出现 ghost continuation。
|
|
928
|
+
|
|
929
|
+
### Phase 7 — Breaking Cut、诊断、性能与 RC
|
|
930
|
+
|
|
931
|
+
- 删除第 9.4 节所有 legacy runtime/commands/exports/tests/config/docs 和全部 branch adapter;
|
|
932
|
+
- `/harness explain`、`/tools`、`/skills`、`/mcp` 完成新状态投影;
|
|
933
|
+
- public exports、CLI help、config schema 不暴露 service locator、module/effect/plugin platform surface;
|
|
934
|
+
- Node 20/22/24 全量门禁、真实资源 soak、benchmark 盲比、PTY 与 exact tarball clean install;
|
|
935
|
+
- exact tarball 完成 edit/test/Skill/MCP/subagent/compact/resume 旅程并验证不存在旧 owner 或外部 plugin loader。
|
|
936
|
+
|
|
937
|
+
退出条件:第 3.2 节所有指标有 machine-readable receipt;任一硬指标未达标即 No-Go。
|
|
938
|
+
|
|
939
|
+
### 12.1 迁移与回滚纪律
|
|
940
|
+
|
|
941
|
+
| 失败点 | 处理与回滚 |
|
|
942
|
+
| ------------------------------- | ----------------------------------------------------------------------------- |
|
|
943
|
+
| Resource activation 中途失败 | LIFO 撤销本 scope 已创建资源;输入 ready 前 fail closed |
|
|
944
|
+
| config/provider 在 Turn 中变化 | 当前 Step 继续 frozen snapshot;下一模型边界重编译 |
|
|
945
|
+
| Capability router 漏选 | 一次有界 expansion;仍失败时切固定 `coding-safe` snapshot,不恢复旧 Loop |
|
|
946
|
+
| Tool 执行后 durable commit 失败 | 标记 `indeterminate`,不发成功 Item,不自动重试非幂等副作用 |
|
|
947
|
+
| Compact 崩溃 | 检测 orphan transaction;旧 projection 保持 authoritative,直至新 commit 完整 |
|
|
948
|
+
| Sandbox backend 缺失 | sandbox-required policy 下拒绝;只有显式 Full Access 可记录 `none` 后执行 |
|
|
949
|
+
| Event consumer 过慢 | 合并/丢弃 ephemeral delta;durable queue 不丢,超限 typed reject |
|
|
950
|
+
| v2 importer 失败 | legacy store 原样只读保留;新 store side-by-side;不切换 active index |
|
|
951
|
+
| RC 回滚 | 回退二进制并继续使用未修改 legacy store;旧版本禁止写已激活的 v2 store |
|
|
952
|
+
| 性能门槛失败 | 关闭 adaptive selection,使用固定 snapshot;不恢复三套 Harness、双写或双 Loop |
|
|
953
|
+
|
|
954
|
+
发布包不保留“新旧双写/双 Loop fallback”。回滚来自数据隔离、原子迁移与 release 切换,而不是长期
|
|
955
|
+
兼容层;所有 branch adapter 必须在 RC 前删除。
|
|
956
|
+
|
|
957
|
+
## 13. 验收标准
|
|
958
|
+
|
|
959
|
+
### AC1 — 部分激活回滚
|
|
960
|
+
|
|
961
|
+
Given 第一方 resource activation 已创建 listener、timer 和 process 后在第三个 registration 抛错,
|
|
962
|
+
When activation transaction 失败,
|
|
963
|
+
Then 三项资源全部按逆序撤销,scope 状态为 failed,resource digest 等于激活前。
|
|
964
|
+
|
|
965
|
+
### AC2 — 依赖驱动卸载
|
|
966
|
+
|
|
967
|
+
Given MCP tool consumer 持有 MCP provider lease,
|
|
968
|
+
When next-boundary reconfigure 移除 provider,
|
|
969
|
+
Then provider 先进入 draining、拒绝新 consumer,旧 consumer teardown 后才关闭 transport,且无 ghost tool。
|
|
970
|
+
|
|
971
|
+
### AC3 — Confluence
|
|
972
|
+
|
|
973
|
+
Given 两组不同 resource activate/reconfigure/scope-close 历史收敛到同一最终 desired state,
|
|
974
|
+
When 所有 scope stable,
|
|
975
|
+
Then services、tools、listeners、timers、processes 和 cache 的 canonical digest 与 fresh boot 完全一致。
|
|
976
|
+
|
|
977
|
+
### AC4 — Skill 按需加载
|
|
978
|
+
|
|
979
|
+
Given 100 个可发现 Skill,当前任务不需要 Skill,
|
|
980
|
+
When 完成普通文件编辑任务,
|
|
981
|
+
Then prompt 只有有界 summary catalog,definition/resource load 为 0,task success 不低于 baseline。
|
|
982
|
+
|
|
983
|
+
### AC5 — Skill scope 与权限
|
|
984
|
+
|
|
985
|
+
Given project Skill 请求 `web` 和 `exec` capability,但当前 Authority 禁止 network,
|
|
986
|
+
When Skill 被用户调用,
|
|
987
|
+
Then body 可加载,network capability 被明确 omitted,Skill 不能扩大权限,receipt 记录原因。
|
|
988
|
+
|
|
989
|
+
### AC6 — MCP lazy lifecycle
|
|
990
|
+
|
|
991
|
+
Given 配置 5 个 stdio MCP servers,
|
|
992
|
+
When 用户完成一个不涉及 MCP 的 coding turn,
|
|
993
|
+
Then 无 server connect、child process 或 tool schema;显式选择一个 server 后只连接该 server,idle 后关闭。
|
|
994
|
+
|
|
995
|
+
### AC7 — 最小 tool schema
|
|
996
|
+
|
|
997
|
+
Given 普通“读取文件并修复测试”任务,
|
|
998
|
+
When Capability Compiler 生成首步 plan,
|
|
999
|
+
Then 只暴露完成任务所需工具;schema token 至少比全量 baseline 降 50%,遗漏能力可在下一 step 有界扩展。
|
|
1000
|
+
|
|
1001
|
+
### AC8 — Mode 与 Authority 分离
|
|
1002
|
+
|
|
1003
|
+
Given 相同任务分别处于 BUILD、PLAN、AUTO,且 Authority 相同,
|
|
1004
|
+
When 编译 CapabilityPlan,
|
|
1005
|
+
Then Mode 不会因为“PLAN read-only”等旧规则移除工具;差异只来自行为 prompt 与明确 Policy。
|
|
1006
|
+
|
|
1007
|
+
### AC9 — Subagent 隔离
|
|
1008
|
+
|
|
1009
|
+
Given root turn 同时创建 research 和 review agent,
|
|
1010
|
+
When 两个 child 运行,
|
|
1011
|
+
Then 各自只有独立 agent scope、plan、budget 与 tools;不得继承 ask-user、write、generic MCP 等未选择能力。
|
|
1012
|
+
|
|
1013
|
+
### AC10 — Resume 可解释
|
|
1014
|
+
|
|
1015
|
+
Given Thread 保存 receipt 后 Skill、service、MCP 或 execution-policy digest 改变,
|
|
1016
|
+
When resume,
|
|
1017
|
+
Then Runtime 显示 capability drift、重新编译并持久化新 receipt;不静默伪装为完全相同环境。
|
|
1018
|
+
|
|
1019
|
+
### AC11 — Single Loop
|
|
1020
|
+
|
|
1021
|
+
Given TUI、terminal、print、Goal continuation、subagent 和 command invocation,
|
|
1022
|
+
When 执行请求,
|
|
1023
|
+
Then 它们都进入同一个 Agent Loop 实现;root/child 可有隔离实例,但 dependency graph 找不到第二套
|
|
1024
|
+
agentic model→tool recursion 或旁路 query owner。
|
|
1025
|
+
|
|
1026
|
+
### AC12 — 不建设插件平台
|
|
1027
|
+
|
|
1028
|
+
Given 用户从 packed tarball 安装 Orion,
|
|
1029
|
+
When 检查 public exports、CLI help、config schema 和文档,
|
|
1030
|
+
Then 不存在 plugin install/load/enable/trust/marketplace/SDK surface;Skills、MCP、Model 是明确的用户扩展边界,
|
|
1031
|
+
内部 contributor/resource lifecycle 仍通过全部 contract tests。
|
|
1032
|
+
|
|
1033
|
+
### AC13 — Atomic Step Snapshot
|
|
1034
|
+
|
|
1035
|
+
Given 一个 model request 已捕获 `StepSnapshotV1`,
|
|
1036
|
+
When provider、config、Authority、Skill catalog 或 MCP registry 在请求中途变化,
|
|
1037
|
+
Then 当前 prompt、schema、executor、approval 与 sandbox 继续使用同一 digest-bound snapshot;变化只在下一
|
|
1038
|
+
Step 生效,schema/router 不一致直接 fail closed。
|
|
1039
|
+
|
|
1040
|
+
### AC14 — Thread admission 与唯一 active turn
|
|
1041
|
+
|
|
1042
|
+
Given TUI、terminal、print、Goal 或 subagent 同时提交 start、steer、queue、interrupt,
|
|
1043
|
+
When ThreadRuntime 仲裁,
|
|
1044
|
+
Then 每个 thread 最多一个 active turn,返回 typed `started|steered|queued|rejected`;maintenance turn
|
|
1045
|
+
non-steerable,队列越界显式 overload,terminal event 恰好一次。
|
|
1046
|
+
|
|
1047
|
+
### AC15 — Event terminality 与 replay equivalence
|
|
1048
|
+
|
|
1049
|
+
Given 任意 message、reasoning、tool、file change、MCP、plan 或 compact Item,
|
|
1050
|
+
When 在 started、delta、side-effect、durable commit 任一点注入 crash,
|
|
1051
|
+
Then 每个 started Item 最终恰好一个 completed/failed/interrupted/indeterminate;resume projection digest 与
|
|
1052
|
+
durable log 重放一致,projection/index 永不领先 log。
|
|
1053
|
+
|
|
1054
|
+
### AC16 — 唯一 Execution Boundary
|
|
1055
|
+
|
|
1056
|
+
Given built-in、nested batch、local fast path、command、research、MCP、Skill 或 subagent tool call,
|
|
1057
|
+
When 执行,
|
|
1058
|
+
Then 全部经过 Capability lookup → Policy → Approval → Sandbox → Execute;receipt 含 invocation lineage、
|
|
1059
|
+
enforcement 与唯一终态,executor 不能被旁路。
|
|
1060
|
+
|
|
1061
|
+
### AC17 — Compact transaction recovery
|
|
1062
|
+
|
|
1063
|
+
Given compact 在 prepare、summary、validate、CAS 或 commit 任一点崩溃,
|
|
1064
|
+
When resume,
|
|
1065
|
+
Then 旧 projection 或新 checkpoint 恰有一个完整有效,tool call/output 配对和 TaskContext evidence 保持,
|
|
1066
|
+
下一次 model-visible history digest 与无崩溃路径一致。
|
|
1067
|
+
|
|
1068
|
+
### AC18 — TaskContext/Goal 单一完成权威
|
|
1069
|
+
|
|
1070
|
+
Given TaskContext criteria、evidence、progress 和 Goal continuation/lifecycle 同时更新,
|
|
1071
|
+
When TurnCommit,
|
|
1072
|
+
Then completion 只由 TaskContext 审计,Goal 只消费 typed decision;不存在一方 complete、另一方 active 的
|
|
1073
|
+
持久状态,失败时整个 turn 不发布成功。
|
|
1074
|
+
|
|
1075
|
+
### AC19 — Protocol identity 与 backpressure
|
|
1076
|
+
|
|
1077
|
+
Given 同一任务通过 TUI、terminal、print 或 exec 运行,
|
|
1078
|
+
When 比较语义事件,
|
|
1079
|
+
Then Thread/Turn/Step/Item 序列同构;慢 UI 或 delta 暴增只合并 ephemeral delta,durable event 不丢且内存
|
|
1080
|
+
有界。TypeScript 类型、JSON Schema 和 golden fixtures 来自同一 source。
|
|
1081
|
+
|
|
1082
|
+
### AC20 — Tool exposure recall
|
|
1083
|
+
|
|
1084
|
+
Given 核心 coding task、显式用户点名能力和长尾 MCP/Skill 能力,
|
|
1085
|
+
When Capability Compiler 运行,
|
|
1086
|
+
Then 核心/显式合法能力 direct,长尾能力 deferred 可发现,Authority 拒绝能力 hidden 且有原因;自动
|
|
1087
|
+
expansion 最多一次,routing miss 不超过第 3.2 节阈值。
|
|
1088
|
+
|
|
1089
|
+
### AC21 — UI 无运行时所有权
|
|
1090
|
+
|
|
1091
|
+
Given Store 被清空或 renderer 重启,
|
|
1092
|
+
When 从 durable event cursor 重建,
|
|
1093
|
+
Then UI projection 与原 digest 一致;Agent Loop 不 import renderer、transcript mutation 或 UI Store。
|
|
1094
|
+
|
|
1095
|
+
### AC22 — 静态组合边界
|
|
1096
|
+
|
|
1097
|
+
Given packed tarball 与 production dependency graph,
|
|
1098
|
+
When 检查 exports、config、help 和 runtime composition,
|
|
1099
|
+
Then 不存在 generic service locator、dynamic module loader、runtime plugin DAG、third-party JS 或 marketplace;
|
|
1100
|
+
所有第一方 services 在 composition root 显式可见。
|
|
1101
|
+
|
|
1102
|
+
## 14. 测试与 Benchmark 计划
|
|
1103
|
+
|
|
1104
|
+
### 14.1 Unit / Contract
|
|
1105
|
+
|
|
1106
|
+
- RuntimeServices compile-time completeness、contributor order/deadline/failure isolation;
|
|
1107
|
+
- ResourceScope ordering、partial rollback、idempotent dispose、lease/draining、deadline;
|
|
1108
|
+
- Thread admission、UUID identity、bounded queue、event terminality、cursor replay;
|
|
1109
|
+
- StepSnapshot freeze、schema/executor binding、config/Authority drift;
|
|
1110
|
+
- CapabilityPlan direct/deferred/hidden determinism、budget、authority intersection、expansion;
|
|
1111
|
+
- Skill observation completeness、shadowing、cache/invalidation、resource containment;
|
|
1112
|
+
- ToolRouter/schema digest、strict descriptor、Policy/Approval/Sandbox final authority、invocation lineage;
|
|
1113
|
+
- Prompt section ordering、budget、digest、redaction;
|
|
1114
|
+
- MCP lease、crash、idle、reconnect;
|
|
1115
|
+
- TaskContext/Goal ownership、StopDecision priority、TurnCommit CAS;
|
|
1116
|
+
- CapabilityReceipt serialization/retention/digest chain、resume drift。
|
|
1117
|
+
|
|
1118
|
+
### 14.2 Property / Chaos
|
|
1119
|
+
|
|
1120
|
+
- 随机 desired-resource-state sequence 的 confluence;
|
|
1121
|
+
- 1,000 次 scope/reconfigure churn 的 fake-resource leak,另跑小规模真实 MCP/process soak;
|
|
1122
|
+
- resource activation、durable append/flush、TurnCommit、compact 每个 stage 后 crash;
|
|
1123
|
+
- consumer teardown 与 provider removal 竞态;
|
|
1124
|
+
- Skill watcher invalidate 与并发 get;
|
|
1125
|
+
- MCP process 在 initialize/list/call/idle 各阶段退出;
|
|
1126
|
+
- schema snapshot 与 pending tool call 的 boundary race;
|
|
1127
|
+
- slow renderer/backpressure、abort、Ctrl+C、shutdown 与 Goal continuation 竞态。
|
|
1128
|
+
|
|
1129
|
+
### 14.3 Eval Corpus
|
|
1130
|
+
|
|
1131
|
+
至少覆盖:
|
|
1132
|
+
|
|
1133
|
+
1. 纯问答,无工具;
|
|
1134
|
+
2. 本地搜索/阅读;
|
|
1135
|
+
3. 单文件编辑;
|
|
1136
|
+
4. 跨文件编辑 + tests;
|
|
1137
|
+
5. Git status/diff/commit;
|
|
1138
|
+
6. 显式 Skill;
|
|
1139
|
+
7. auto-routed Skill;
|
|
1140
|
+
8. web research;
|
|
1141
|
+
9. MCP tool;
|
|
1142
|
+
10. PLAN → execution;
|
|
1143
|
+
11. 20+ turn Goal continuation;
|
|
1144
|
+
12. root + two subagents;
|
|
1145
|
+
13. compact + resume;
|
|
1146
|
+
14. permission deny/allow;
|
|
1147
|
+
15. provider fallback;
|
|
1148
|
+
16. internal preset/scope churn + resume drift;
|
|
1149
|
+
17. concurrent start/steer/queue/interrupt;
|
|
1150
|
+
18. compact crash at every transaction boundary;
|
|
1151
|
+
19. nested batch/local fast path/research invocation lineage;
|
|
1152
|
+
20. Huoshan 与 OpenAI-compatible dynamic tools/parallel calls/prompt-cache/finish-reason matrix。
|
|
1153
|
+
|
|
1154
|
+
每个 case 同时记录 success、false completion、input/output token、requests、tool calls、schema bytes、
|
|
1155
|
+
skill loads、MCP processes、startup/turn latency、event/projection lag、sandbox enforcement 和 receipt。
|
|
1156
|
+
|
|
1157
|
+
### 14.4 建议门禁命令
|
|
1158
|
+
|
|
1159
|
+
```bash
|
|
1160
|
+
npm run build
|
|
1161
|
+
npm run lint
|
|
1162
|
+
npm test -- --runInBand
|
|
1163
|
+
npm run bench:harness -- --baseline docs/archive/releases/v0.2.0/harness-baseline.json
|
|
1164
|
+
npm run test:harness-confluence
|
|
1165
|
+
npm run test:runtime-matrix
|
|
1166
|
+
npm run prepublishOnly
|
|
1167
|
+
```
|
|
1168
|
+
|
|
1169
|
+
新 script 名称可在实现时调整,但相同 gate 必须存在且 fail closed。
|
|
1170
|
+
|
|
1171
|
+
## 15. 风险与控制
|
|
1172
|
+
|
|
1173
|
+
| 风险 | 控制 |
|
|
1174
|
+
| ---------------------------------- | -------------------------------------------------------------------------------------------------------- |
|
|
1175
|
+
| 通用 Harness kernel 过度工程化 | 显式 services 和静态 contributors 优先;禁止 string-token locator、runtime arbitrary DAG/HMR |
|
|
1176
|
+
| 能力裁剪导致模型多一轮找工具 | recall + request count 双 gate;核心/显式能力 direct,一次有界 expansion,固定 safe snapshot 降级 |
|
|
1177
|
+
| schema 与 executor snapshot 漂移 | 同一个 StepSnapshot 构造并 digest-bind;pending invocation 完成前不得切换 binding |
|
|
1178
|
+
| 意图分类器静默漏掉合法能力 | classifier 只影响 direct/deferred 排序,不拥有 Authority 或 available universe;所有 omission 有 receipt |
|
|
1179
|
+
| durable event/journal 不完整 | append+flush 先于 projection;Item terminality、TurnCommit CAS、每阶段 crash injection |
|
|
1180
|
+
| TaskContext 与 Goal 再次重复所有权 | TaskContext 唯一 criteria/evidence/completion owner;Goal 只持 lifecycle/budget/continuation |
|
|
1181
|
+
| lifecycle 资源清理错误 | Harness Test Rig、resource counters、1,000-cycle property + 真实 MCP/process soak |
|
|
1182
|
+
| BUILD/PLAN/AUTO 再次耦合权限 | Mode 不决定 tool eligibility 或 containment;Policy/Execution architecture test 锁定所有权 |
|
|
1183
|
+
| Skill catalog 过大 | descriptor/body 分离、top catalog、search、token hard budget、stable prefix/cache |
|
|
1184
|
+
| MCP lazy connect 增加首用延迟 | server descriptor 先选、connect/list 后下一 Step exact binding;optional bounded prewarm |
|
|
1185
|
+
| 大爆炸迁移导致双 runtime | 分 Phase cutover但 tarball 前删除 adapter;No-Go 检查旧 owner、global singleton 和 direct query |
|
|
1186
|
+
| Codex/DSH 产品面范围蔓延 | pinned open-source contract 为证据;P0 禁 marketplace/app-server/remote execution/Rust 移植 |
|
|
1187
|
+
| 破坏公共 API 与旧 Session | 0.x breaking release、side-by-side importer、dry-run/atomic index、迁移表;不保留模糊 runtime shim |
|
|
1188
|
+
|
|
1189
|
+
## 16. Release Go / No-Go
|
|
1190
|
+
|
|
1191
|
+
### Go
|
|
1192
|
+
|
|
1193
|
+
- 第 3.2 节全部量化指标达标;
|
|
1194
|
+
- 一个 OrionRuntime owner、一个 agentic Loop 实现、一个 ToolGateway、一个 TaskContext completion owner;
|
|
1195
|
+
- Thread/Turn/Step/Item protocol、durable log、bounded queue 与 replay/crash equivalence 全绿;
|
|
1196
|
+
- 每个请求使用 atomic StepSnapshot,model-visible schema 与 executable router digest 绑定;
|
|
1197
|
+
- no-skill/no-MCP 任务确实不加载 body、不连接 server;
|
|
1198
|
+
- CapabilityReceipt 能解释每个模型请求并跨 resume 检测 drift;
|
|
1199
|
+
- legacy Brain/Agent/HarnessEngine/global registry/mock SDK 从 tarball 删除;
|
|
1200
|
+
- 第一方 services 静态可见,contributors 与 ResourceScope 能完整退出;
|
|
1201
|
+
- 所有 side effect 经过 ExecutionService,sandbox enforcement 与 outcome 可审计;
|
|
1202
|
+
- Goal、Compact、Permission、Subagent、TUI/terminal/print 语义无回归;
|
|
1203
|
+
- exact tarball 在 Node 20/22/24 clean install 验证通过。
|
|
1204
|
+
|
|
1205
|
+
### No-Go
|
|
1206
|
+
|
|
1207
|
+
- 仅把现有 class 包一层内部 module wrapper;
|
|
1208
|
+
- 默认请求仍发送全部 33+ tool schemas;
|
|
1209
|
+
- CLI 仍启动 `connectAll()` 或读取全部 Skill body;
|
|
1210
|
+
- Loop 或 chat controller 继续 import MCP/Skill/Subagent/Research 具体实现;
|
|
1211
|
+
- UI Store/transcript mutation 仍是运行时事实源,或 projection 可领先 durable log;
|
|
1212
|
+
- schema 和 executor 分别查询 live registry,导致同一 Step 可能不一致;
|
|
1213
|
+
- TaskContext 与 Goal 同时拥有 criteria/evidence/completion;
|
|
1214
|
+
- 任一 tool side effect 可旁路 Policy/Approval/Sandbox/ToolGateway;
|
|
1215
|
+
- 旧 runtime、direct query、AgentRunner 或 mock SDK 仍可成为生产执行入口;
|
|
1216
|
+
- scope/reconfigure 后有 ghost tool/listener/timer/process;
|
|
1217
|
+
- token 降低但成功率下降、请求数明显增加;
|
|
1218
|
+
- public exports、config、help 或文档出现第三方 plugin platform surface;
|
|
1219
|
+
- production 出现 generic service locator、runtime dynamic module graph 或完整 app-server scope creep;
|
|
1220
|
+
- 缺 machine-readable benchmark 与 lifecycle receipts。
|
|
1221
|
+
|
|
1222
|
+
## 17. Definition of Done
|
|
1223
|
+
|
|
1224
|
+
v0.2.0 的完成场景是:
|
|
1225
|
+
|
|
1226
|
+
> 用户在安装包中启动 Orion,CLI 在不连接无关 MCP、不加载无关 Skill body 的情况下快速进入可用
|
|
1227
|
+
> 状态。用户给出真实 coding Goal 后,ThreadRuntime 以唯一 Loop 为 root turn 与每个 child thread 运行,
|
|
1228
|
+
> 每个模型边界冻结精确 StepSnapshot,只发送 direct prompt/tool schema,并让 deferred 能力保持可发现。
|
|
1229
|
+
> 所有 side effect 经过统一 ExecutionService;所有 Item 和 Turn 先持久化终态再通知 UI。TaskContext 用
|
|
1230
|
+
> criteria/evidence 判断真正完成,Goal 只负责有界续跑。compact、crash、resume 后仍可从 durable log 重建
|
|
1231
|
+
> 等价上下文和 UI projection。固定任务集在不降低成功率和证据标准的前提下,输入 token 至少下降 30%。
|
|
1232
|
+
|
|
1233
|
+
达到这个结果,Orion 才真正拥有自己的轻量 Harness:DSH 的资源生命周期、Codex 的执行与协议契约、
|
|
1234
|
+
Orion 的证据化 Goal 完成被收敛到一个可恢复 Runtime;它仍不是插件平台。否则只是一次目录重排。
|