open-multi-agent-kit 0.99.0 → 1.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 +30 -1
- package/README.md +3 -3
- package/dist/bun/cli.d.ts.map +1 -1
- package/dist/bun/cli.js +1 -0
- package/dist/bun/cli.js.map +1 -1
- package/dist/bun/register-bundled-coding-agent.d.ts +10 -0
- package/dist/bun/register-bundled-coding-agent.d.ts.map +1 -0
- package/dist/bun/register-bundled-coding-agent.js +12 -0
- package/dist/bun/register-bundled-coding-agent.js.map +1 -0
- package/dist/cli/args.d.ts +1 -1
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +1 -1
- package/dist/cli/args.js.map +1 -1
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +2 -1
- package/dist/cli/help.js.map +1 -1
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +14 -2
- package/dist/cli.js.map +1 -1
- package/dist/commands/neo-cli.d.ts +9 -0
- package/dist/commands/neo-cli.d.ts.map +1 -0
- package/dist/commands/neo-cli.js +61 -0
- package/dist/commands/neo-cli.js.map +1 -0
- package/dist/coordination/awareness.d.ts +32 -0
- package/dist/coordination/awareness.d.ts.map +1 -0
- package/dist/coordination/awareness.js +55 -0
- package/dist/coordination/awareness.js.map +1 -0
- package/dist/coordination/broker.d.ts +79 -0
- package/dist/coordination/broker.d.ts.map +1 -0
- package/dist/coordination/broker.js +195 -0
- package/dist/coordination/broker.js.map +1 -0
- package/dist/coordination/index.d.ts +16 -0
- package/dist/coordination/index.d.ts.map +1 -0
- package/dist/coordination/index.js +16 -0
- package/dist/coordination/index.js.map +1 -0
- package/dist/coordination/integration.d.ts +59 -0
- package/dist/coordination/integration.d.ts.map +1 -0
- package/dist/coordination/integration.js +126 -0
- package/dist/coordination/integration.js.map +1 -0
- package/dist/coordination/operation.d.ts +106 -0
- package/dist/coordination/operation.d.ts.map +1 -0
- package/dist/coordination/operation.js +179 -0
- package/dist/coordination/operation.js.map +1 -0
- package/dist/coordination/resource.d.ts +33 -0
- package/dist/coordination/resource.d.ts.map +1 -0
- package/dist/coordination/resource.js +89 -0
- package/dist/coordination/resource.js.map +1 -0
- package/dist/coordination/session.d.ts +74 -0
- package/dist/coordination/session.d.ts.map +1 -0
- package/dist/coordination/session.js +143 -0
- package/dist/coordination/session.js.map +1 -0
- package/dist/coordination/types.d.ts +68 -0
- package/dist/coordination/types.d.ts.map +1 -0
- package/dist/coordination/types.js +26 -0
- package/dist/coordination/types.js.map +1 -0
- package/dist/core/agent-session.d.ts +29 -2
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +135 -37
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bundled-skills.d.ts +4 -0
- package/dist/core/bundled-skills.d.ts.map +1 -0
- package/dist/core/bundled-skills.js +32 -0
- package/dist/core/bundled-skills.js.map +1 -0
- package/dist/core/cli-diagnostics.d.ts +6 -0
- package/dist/core/cli-diagnostics.d.ts.map +1 -0
- package/dist/core/cli-diagnostics.js +20 -0
- package/dist/core/cli-diagnostics.js.map +1 -0
- package/dist/core/compaction/control-state.d.ts +41 -0
- package/dist/core/compaction/control-state.d.ts.map +1 -0
- package/dist/core/compaction/control-state.js +85 -0
- package/dist/core/compaction/control-state.js.map +1 -0
- package/dist/core/compaction/fallback.d.ts +60 -0
- package/dist/core/compaction/fallback.d.ts.map +1 -0
- package/dist/core/compaction/fallback.js +117 -0
- package/dist/core/compaction/fallback.js.map +1 -0
- package/dist/core/compaction/index.d.ts +2 -0
- package/dist/core/compaction/index.d.ts.map +1 -1
- package/dist/core/compaction/index.js +2 -0
- package/dist/core/compaction/index.js.map +1 -1
- package/dist/core/context-budget-headroom-candidates.d.ts +16 -1
- package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -1
- package/dist/core/context-budget-headroom-candidates.js +31 -13
- package/dist/core/context-budget-headroom-candidates.js.map +1 -1
- package/dist/core/context-budget-headroom-types.d.ts +7 -1
- package/dist/core/context-budget-headroom-types.d.ts.map +1 -1
- package/dist/core/context-budget-headroom-types.js +0 -1
- package/dist/core/context-budget-headroom-types.js.map +1 -1
- package/dist/core/context-budget-headroom.d.ts +22 -0
- package/dist/core/context-budget-headroom.d.ts.map +1 -1
- package/dist/core/context-budget-headroom.js +46 -2
- package/dist/core/context-budget-headroom.js.map +1 -1
- package/dist/core/context-budget-v2-global-pass.d.ts +21 -0
- package/dist/core/context-budget-v2-global-pass.d.ts.map +1 -0
- package/dist/core/context-budget-v2-global-pass.js +203 -0
- package/dist/core/context-budget-v2-global-pass.js.map +1 -0
- package/dist/core/context-budget-v2-input-validation.d.ts +4 -0
- package/dist/core/context-budget-v2-input-validation.d.ts.map +1 -0
- package/dist/core/context-budget-v2-input-validation.js +79 -0
- package/dist/core/context-budget-v2-input-validation.js.map +1 -0
- package/dist/core/context-budget-v2-observability.d.ts +15 -0
- package/dist/core/context-budget-v2-observability.d.ts.map +1 -0
- package/dist/core/context-budget-v2-observability.js +35 -0
- package/dist/core/context-budget-v2-observability.js.map +1 -0
- package/dist/core/context-budget-v2-planned-items.d.ts +17 -0
- package/dist/core/context-budget-v2-planned-items.d.ts.map +1 -0
- package/dist/core/context-budget-v2-planned-items.js +59 -0
- package/dist/core/context-budget-v2-planned-items.js.map +1 -0
- package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
- package/dist/core/context-budget-v2-planner.js +69 -51
- package/dist/core/context-budget-v2-planner.js.map +1 -1
- package/dist/core/context-budget-v2-scoring.d.ts +7 -1
- package/dist/core/context-budget-v2-scoring.d.ts.map +1 -1
- package/dist/core/context-budget-v2-scoring.js.map +1 -1
- package/dist/core/context-budget-v2-selection.d.ts +22 -3
- package/dist/core/context-budget-v2-selection.d.ts.map +1 -1
- package/dist/core/context-budget-v2-selection.js +41 -59
- package/dist/core/context-budget-v2-selection.js.map +1 -1
- package/dist/core/context-budget-v2-tiers.d.ts.map +1 -1
- package/dist/core/context-budget-v2-tiers.js +9 -42
- package/dist/core/context-budget-v2-tiers.js.map +1 -1
- package/dist/core/context-budget-v2-types.d.ts +14 -2
- package/dist/core/context-budget-v2-types.d.ts.map +1 -1
- package/dist/core/context-budget-v2-types.js +6 -1
- package/dist/core/context-budget-v2-types.js.map +1 -1
- package/dist/core/extensions/bundled-virtual-modules.d.ts +15 -0
- package/dist/core/extensions/bundled-virtual-modules.d.ts.map +1 -0
- package/dist/core/extensions/bundled-virtual-modules.js +63 -0
- package/dist/core/extensions/bundled-virtual-modules.js.map +1 -0
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +2 -42
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/runner.d.ts +1 -0
- package/dist/core/extensions/runner.d.ts.map +1 -1
- package/dist/core/extensions/runner.js +6 -0
- package/dist/core/extensions/runner.js.map +1 -1
- package/dist/core/extensions/types.d.ts +10 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/index.d.ts +2 -1
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +2 -1
- package/dist/core/index.js.map +1 -1
- package/dist/core/loadout-runtime.d.ts +2 -8
- package/dist/core/loadout-runtime.d.ts.map +1 -1
- package/dist/core/loadout-runtime.js.map +1 -1
- package/dist/core/mcp/client.d.ts +27 -6
- package/dist/core/mcp/client.d.ts.map +1 -1
- package/dist/core/mcp/client.js +80 -20
- package/dist/core/mcp/client.js.map +1 -1
- package/dist/core/mcp/manager.d.ts +10 -1
- package/dist/core/mcp/manager.d.ts.map +1 -1
- package/dist/core/mcp/manager.js +68 -9
- package/dist/core/mcp/manager.js.map +1 -1
- package/dist/core/mcp/protocol.d.ts +9 -3
- package/dist/core/mcp/protocol.d.ts.map +1 -1
- package/dist/core/mcp/protocol.js +61 -15
- package/dist/core/mcp/protocol.js.map +1 -1
- package/dist/core/mcp/stdio-transport.d.ts +12 -1
- package/dist/core/mcp/stdio-transport.d.ts.map +1 -1
- package/dist/core/mcp/stdio-transport.js +30 -2
- package/dist/core/mcp/stdio-transport.js.map +1 -1
- package/dist/core/mcp-descriptor-injection.d.ts +26 -0
- package/dist/core/mcp-descriptor-injection.d.ts.map +1 -0
- package/dist/core/mcp-descriptor-injection.js +25 -0
- package/dist/core/mcp-descriptor-injection.js.map +1 -0
- package/dist/core/mcp-public-presets.d.ts +1 -3
- package/dist/core/mcp-public-presets.d.ts.map +1 -1
- package/dist/core/mcp-public-presets.js +3 -15
- package/dist/core/mcp-public-presets.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +24 -3
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/neo/catalog.d.ts +20 -0
- package/dist/core/neo/catalog.d.ts.map +1 -0
- package/dist/core/neo/catalog.js +50 -0
- package/dist/core/neo/catalog.js.map +1 -0
- package/dist/core/neo/setup.d.ts +3 -0
- package/dist/core/neo/setup.d.ts.map +1 -0
- package/dist/core/neo/setup.js +47 -0
- package/dist/core/neo/setup.js.map +1 -0
- package/dist/core/provider-default-models.d.ts +2 -0
- package/dist/core/provider-default-models.d.ts.map +1 -1
- package/dist/core/provider-default-models.js +2 -0
- package/dist/core/provider-default-models.js.map +1 -1
- package/dist/core/provider-display-names.d.ts.map +1 -1
- package/dist/core/provider-display-names.js +2 -0
- package/dist/core/provider-display-names.js.map +1 -1
- package/dist/core/provider-error-classification.d.ts +57 -0
- package/dist/core/provider-error-classification.d.ts.map +1 -0
- package/dist/core/provider-error-classification.js +103 -0
- package/dist/core/provider-error-classification.js.map +1 -0
- package/dist/core/provider-resilience.d.ts +10 -0
- package/dist/core/provider-resilience.d.ts.map +1 -1
- package/dist/core/provider-resilience.js +36 -3
- package/dist/core/provider-resilience.js.map +1 -1
- package/dist/core/provider-usage-commandcode.d.ts +9 -0
- package/dist/core/provider-usage-commandcode.d.ts.map +1 -0
- package/dist/core/provider-usage-commandcode.js +198 -0
- package/dist/core/provider-usage-commandcode.js.map +1 -0
- package/dist/core/provider-usage-devin.d.ts +5 -3
- package/dist/core/provider-usage-devin.d.ts.map +1 -1
- package/dist/core/provider-usage-devin.js +15 -5
- package/dist/core/provider-usage-devin.js.map +1 -1
- package/dist/core/provider-usage-types.d.ts +1 -1
- package/dist/core/provider-usage-types.d.ts.map +1 -1
- package/dist/core/provider-usage-types.js.map +1 -1
- package/dist/core/provider-usage.d.ts.map +1 -1
- package/dist/core/provider-usage.js +6 -0
- package/dist/core/provider-usage.js.map +1 -1
- package/dist/core/reasoning-router-resolver.d.ts +7 -0
- package/dist/core/reasoning-router-resolver.d.ts.map +1 -1
- package/dist/core/reasoning-router-resolver.js +21 -3
- package/dist/core/reasoning-router-resolver.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts +8 -5
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +8 -5
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/resource-admission.d.ts +36 -0
- package/dist/core/resource-admission.d.ts.map +1 -1
- package/dist/core/resource-admission.js +59 -0
- package/dist/core/resource-admission.js.map +1 -1
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +2 -2
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/run-usage-ledger.d.ts +47 -0
- package/dist/core/run-usage-ledger.d.ts.map +1 -0
- package/dist/core/run-usage-ledger.js +162 -0
- package/dist/core/run-usage-ledger.js.map +1 -0
- package/dist/core/run-usage-operation.d.ts +8 -0
- package/dist/core/run-usage-operation.d.ts.map +1 -0
- package/dist/core/run-usage-operation.js +12 -0
- package/dist/core/run-usage-operation.js.map +1 -0
- package/dist/core/sdk.d.ts.map +1 -1
- package/dist/core/sdk.js +5 -6
- package/dist/core/sdk.js.map +1 -1
- package/dist/core/session-compaction-service.d.ts +15 -0
- package/dist/core/session-compaction-service.d.ts.map +1 -1
- package/dist/core/session-compaction-service.js +17 -4
- package/dist/core/session-compaction-service.js.map +1 -1
- package/dist/core/session-failure-cause.d.ts.map +1 -1
- package/dist/core/session-failure-cause.js +14 -5
- package/dist/core/session-failure-cause.js.map +1 -1
- package/dist/core/session-prompt-lifecycle.d.ts +6 -0
- package/dist/core/session-prompt-lifecycle.d.ts.map +1 -1
- package/dist/core/session-prompt-lifecycle.js +47 -2
- package/dist/core/session-prompt-lifecycle.js.map +1 -1
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +4 -2
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/subagent-lane-authority.d.ts +28 -0
- package/dist/core/subagent-lane-authority.d.ts.map +1 -0
- package/dist/core/subagent-lane-authority.js +119 -0
- package/dist/core/subagent-lane-authority.js.map +1 -0
- package/dist/core/subagent-lane-contract.d.ts +114 -0
- package/dist/core/subagent-lane-contract.d.ts.map +1 -0
- package/dist/core/subagent-lane-contract.js +18 -0
- package/dist/core/subagent-lane-contract.js.map +1 -0
- package/dist/core/subagent-lane-launcher.d.ts +3 -6
- package/dist/core/subagent-lane-launcher.d.ts.map +1 -1
- package/dist/core/subagent-lane-launcher.js +53 -12
- package/dist/core/subagent-lane-launcher.js.map +1 -1
- package/dist/core/subagent-orchestration.d.ts +4 -17
- package/dist/core/subagent-orchestration.d.ts.map +1 -1
- package/dist/core/subagent-orchestration.js.map +1 -1
- package/dist/core/todo-runtime-state.d.ts +12 -0
- package/dist/core/todo-runtime-state.d.ts.map +1 -1
- package/dist/core/todo-runtime-state.js +23 -0
- package/dist/core/todo-runtime-state.js.map +1 -1
- package/dist/core/verified-run/broker.d.ts.map +1 -1
- package/dist/core/verified-run/broker.js +4 -1
- package/dist/core/verified-run/broker.js.map +1 -1
- package/dist/core/workload-permit-pool.d.ts +1 -1
- package/dist/core/workload-permit-pool.d.ts.map +1 -1
- package/dist/core/workload-permit-pool.js +3 -0
- package/dist/core/workload-permit-pool.js.map +1 -1
- package/dist/guardrails/strict-evidence-approval-adapter.d.ts +34 -0
- package/dist/guardrails/strict-evidence-approval-adapter.d.ts.map +1 -0
- package/dist/guardrails/strict-evidence-approval-adapter.js +70 -0
- package/dist/guardrails/strict-evidence-approval-adapter.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +11 -18
- package/dist/main.js.map +1 -1
- package/dist/metacognition/calibration-selective.d.ts +78 -0
- package/dist/metacognition/calibration-selective.d.ts.map +1 -0
- package/dist/metacognition/calibration-selective.js +161 -0
- package/dist/metacognition/calibration-selective.js.map +1 -0
- package/dist/metacognition/calibration.d.ts +62 -0
- package/dist/metacognition/calibration.d.ts.map +1 -0
- package/dist/metacognition/calibration.js +122 -0
- package/dist/metacognition/calibration.js.map +1 -0
- package/dist/metacognition/checkpoint.d.ts +60 -0
- package/dist/metacognition/checkpoint.d.ts.map +1 -0
- package/dist/metacognition/checkpoint.js +57 -0
- package/dist/metacognition/checkpoint.js.map +1 -0
- package/dist/metacognition/context7.d.ts +48 -0
- package/dist/metacognition/context7.d.ts.map +1 -0
- package/dist/metacognition/context7.js +154 -0
- package/dist/metacognition/context7.js.map +1 -0
- package/dist/metacognition/decision.d.ts +44 -0
- package/dist/metacognition/decision.d.ts.map +1 -0
- package/dist/metacognition/decision.js +111 -0
- package/dist/metacognition/decision.js.map +1 -0
- package/dist/metacognition/evaluation.d.ts +73 -0
- package/dist/metacognition/evaluation.d.ts.map +1 -0
- package/dist/metacognition/evaluation.js +97 -0
- package/dist/metacognition/evaluation.js.map +1 -0
- package/dist/metacognition/index.d.ts +31 -0
- package/dist/metacognition/index.d.ts.map +1 -0
- package/dist/metacognition/index.js +31 -0
- package/dist/metacognition/index.js.map +1 -0
- package/dist/metacognition/knowledge-action.d.ts +43 -0
- package/dist/metacognition/knowledge-action.d.ts.map +1 -0
- package/dist/metacognition/knowledge-action.js +60 -0
- package/dist/metacognition/knowledge-action.js.map +1 -0
- package/dist/metacognition/knowledge.d.ts +84 -0
- package/dist/metacognition/knowledge.d.ts.map +1 -0
- package/dist/metacognition/knowledge.js +165 -0
- package/dist/metacognition/knowledge.js.map +1 -0
- package/dist/metacognition/obligations.d.ts +82 -0
- package/dist/metacognition/obligations.d.ts.map +1 -0
- package/dist/metacognition/obligations.js +139 -0
- package/dist/metacognition/obligations.js.map +1 -0
- package/dist/metacognition/observation-validity.d.ts +83 -0
- package/dist/metacognition/observation-validity.d.ts.map +1 -0
- package/dist/metacognition/observation-validity.js +118 -0
- package/dist/metacognition/observation-validity.js.map +1 -0
- package/dist/metacognition/observe.d.ts +45 -0
- package/dist/metacognition/observe.d.ts.map +1 -0
- package/dist/metacognition/observe.js +59 -0
- package/dist/metacognition/observe.js.map +1 -0
- package/dist/metacognition/policy.d.ts +53 -0
- package/dist/metacognition/policy.d.ts.map +1 -0
- package/dist/metacognition/policy.js +155 -0
- package/dist/metacognition/policy.js.map +1 -0
- package/dist/metacognition/predictions.d.ts +78 -0
- package/dist/metacognition/predictions.d.ts.map +1 -0
- package/dist/metacognition/predictions.js +181 -0
- package/dist/metacognition/predictions.js.map +1 -0
- package/dist/metacognition/retrieval.d.ts +53 -0
- package/dist/metacognition/retrieval.d.ts.map +1 -0
- package/dist/metacognition/retrieval.js +170 -0
- package/dist/metacognition/retrieval.js.map +1 -0
- package/dist/metacognition/risk.d.ts +48 -0
- package/dist/metacognition/risk.d.ts.map +1 -0
- package/dist/metacognition/risk.js +165 -0
- package/dist/metacognition/risk.js.map +1 -0
- package/dist/metacognition/route-economics.d.ts +95 -0
- package/dist/metacognition/route-economics.d.ts.map +1 -0
- package/dist/metacognition/route-economics.js +110 -0
- package/dist/metacognition/route-economics.js.map +1 -0
- package/dist/metacognition/runtime-bridge.d.ts +54 -0
- package/dist/metacognition/runtime-bridge.d.ts.map +1 -0
- package/dist/metacognition/runtime-bridge.js +140 -0
- package/dist/metacognition/runtime-bridge.js.map +1 -0
- package/dist/metacognition/skills.d.ts +42 -0
- package/dist/metacognition/skills.d.ts.map +1 -0
- package/dist/metacognition/skills.js +220 -0
- package/dist/metacognition/skills.js.map +1 -0
- package/dist/metacognition/state.d.ts +110 -0
- package/dist/metacognition/state.d.ts.map +1 -0
- package/dist/metacognition/state.js +52 -0
- package/dist/metacognition/state.js.map +1 -0
- package/dist/metacognition/validation.d.ts +19 -0
- package/dist/metacognition/validation.d.ts.map +1 -0
- package/dist/metacognition/validation.js +58 -0
- package/dist/metacognition/validation.js.map +1 -0
- package/dist/metacognition/verification.d.ts +93 -0
- package/dist/metacognition/verification.d.ts.map +1 -0
- package/dist/metacognition/verification.js +132 -0
- package/dist/metacognition/verification.js.map +1 -0
- package/dist/metacognition/verifier.d.ts +49 -0
- package/dist/metacognition/verifier.d.ts.map +1 -0
- package/dist/metacognition/verifier.js +88 -0
- package/dist/metacognition/verifier.js.map +1 -0
- package/dist/modes/acp/acp-agent.d.ts +24 -0
- package/dist/modes/acp/acp-agent.d.ts.map +1 -0
- package/dist/modes/acp/acp-agent.js +133 -0
- package/dist/modes/acp/acp-agent.js.map +1 -0
- package/dist/modes/acp/acp-mode.d.ts +4 -0
- package/dist/modes/acp/acp-mode.d.ts.map +1 -0
- package/dist/modes/acp/acp-mode.js +34 -0
- package/dist/modes/acp/acp-mode.js.map +1 -0
- package/dist/modes/acp/acp-session.d.ts +4 -0
- package/dist/modes/acp/acp-session.d.ts.map +1 -0
- package/dist/modes/acp/acp-session.js +76 -0
- package/dist/modes/acp/acp-session.js.map +1 -0
- package/dist/modes/acp/acp-transport.d.ts +5 -0
- package/dist/modes/acp/acp-transport.d.ts.map +1 -0
- package/dist/modes/acp/acp-transport.js +90 -0
- package/dist/modes/acp/acp-transport.js.map +1 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +1 -0
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/observation/identity.d.ts +14 -0
- package/dist/observation/identity.d.ts.map +1 -0
- package/dist/observation/identity.js +29 -0
- package/dist/observation/identity.js.map +1 -0
- package/dist/observation/index.d.ts +13 -0
- package/dist/observation/index.d.ts.map +1 -0
- package/dist/observation/index.js +13 -0
- package/dist/observation/index.js.map +1 -0
- package/dist/observation/observe-mode.d.ts +46 -0
- package/dist/observation/observe-mode.d.ts.map +1 -0
- package/dist/observation/observe-mode.js +83 -0
- package/dist/observation/observe-mode.js.map +1 -0
- package/dist/observation/store.d.ts +53 -0
- package/dist/observation/store.d.ts.map +1 -0
- package/dist/observation/store.js +126 -0
- package/dist/observation/store.js.map +1 -0
- package/dist/observation/types.d.ts +72 -0
- package/dist/observation/types.d.ts.map +1 -0
- package/dist/observation/types.js +9 -0
- package/dist/observation/types.js.map +1 -0
- package/dist/observation/view.d.ts +39 -0
- package/dist/observation/view.d.ts.map +1 -0
- package/dist/observation/view.js +173 -0
- package/dist/observation/view.js.map +1 -0
- package/docs/audit-revalidation-2026-09-17.md +77 -0
- package/docs/devin-harness.md +33 -4
- package/docs/ecraf-normalization.md +83 -0
- package/docs/metacognition.md +51 -0
- package/docs/model-catalog-refresh.md +110 -1
- package/docs/models.md +1 -1
- package/docs/neo.md +134 -0
- package/docs/providers.md +125 -6
- package/docs/run-usage-ledger.md +56 -0
- package/docs/runtime-algorithms.md +151 -3
- package/docs/skills.md +1 -1
- package/docs/usage.md +2 -1
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/adaptive-agent-runtime.ts +14 -1
- package/examples/extensions/subagent/graph-result.ts +48 -0
- package/examples/extensions/subagent/index.ts +246 -111
- package/examples/extensions/subagent/managed-process-tree.ts +42 -0
- package/examples/extensions/subagent/managed-process.test.ts +24 -0
- package/examples/extensions/subagent/managed-process.ts +93 -112
- package/examples/extensions/subagent/subagent-runtime-types.ts +17 -1
- package/examples/extensions/subagent/subagent-stream.ts +161 -0
- package/examples/extensions/terminal-browser/README.md +54 -0
- package/examples/extensions/terminal-browser/bridge-protocol.ts +29 -0
- package/examples/extensions/terminal-browser/bridge.ts +219 -0
- package/examples/extensions/terminal-browser/browser-surface.ts +288 -0
- package/examples/extensions/terminal-browser/index.ts +215 -0
- package/examples/extensions/terminal-browser/placeholders.ts +49 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +18 -18
- package/package.json +8 -7
- package/resources/neo/skills/omk-browser/SKILL.md +32 -0
- package/resources/neo/skills/omk-code-review/SKILL.md +24 -0
- package/resources/neo/skills/omk-computeruse/SKILL.md +34 -0
- package/resources/neo/skills/omk-mcp-setup/SKILL.md +48 -0
- package/resources/neo/skills/omk-research/SKILL.md +24 -0
- package/resources/neo/skills/omk-site/SKILL.md +28 -0
|
@@ -1,5 +1,81 @@
|
|
|
1
1
|
# Runtime Algorithms and Direction
|
|
2
2
|
|
|
3
|
+
## Current feature status (audit §19.3)
|
|
4
|
+
|
|
5
|
+
"Implemented", "wired", "enabled", "verified in CI", "released", and
|
|
6
|
+
"measured benefit" are different gates. A pure function passing unit tests is
|
|
7
|
+
not a live product path, and a live path is not a measured improvement. This
|
|
8
|
+
table records each mechanism's actual gate at the pinned commit; the dated
|
|
9
|
+
baseline below is history, not current truth.
|
|
10
|
+
|
|
11
|
+
| Mechanism | Implemented | Wired into live path | Enabled by default | Verified in CI | Released | Measured benefit |
|
|
12
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
13
|
+
| DAG claim scheduler (`tool-dag-scheduler`) | yes | `agent-loop` frontier executor | `toolScheduler: "dag-v2"` | unit + integration tests | v0.99.x line | not measured |
|
|
14
|
+
| Ready-frontier admission (`runDagFrontier`) | yes | `agent-loop` | same | `tool-dag-ready-frontier`, `tool-dag-hook-replan` tests | working tree | not measured |
|
|
15
|
+
| Dynamic-claim conflict check (`conflictsWithUnsettledClaim`) | yes | `agent-loop` | same | `tool-dag-dependencies` + hook tests | working tree | not measured |
|
|
16
|
+
| ECRAF admission planner (`tool-dag-ecraf`) | yes | **no** — no call path wires it | n/a | unit tests only | unreleased | not measured |
|
|
17
|
+
| Context Budget V2 | yes | system-prompt assembly | opt-in policy | planner/selection/cache tests | working tree | not measured |
|
|
18
|
+
| Tier floor reservation | yes | context-budget-v2 planner | when V2 enabled | `context-budget-v2-tier-floor` tests | working tree | not measured |
|
|
19
|
+
| Reasoning router v4 | yes | `/think auto` lane | opt-in | router tests | released | classification only, not success-probability calibration |
|
|
20
|
+
| Workload permit pool | yes | resource admission | default | pool tests | released | not measured |
|
|
21
|
+
| Provider retry/failover classification | yes | `provider-retry`, `session-failure-cause` | default | resilience/classification tests | released | not measured |
|
|
22
|
+
| MCP descriptor injection screen | yes | `mcp/manager` import path | default | quarantine tests | released | pattern rule score, not calibrated risk |
|
|
23
|
+
| verified-run coordinator + evidence | yes | verified-run paths | opt-in command | coordinator/evidence tests | working tree | scope-limited binding, not general correctness |
|
|
24
|
+
|
|
25
|
+
Gates are reported per row so a green "implemented" never upgrades itself to
|
|
26
|
+
"released" or "measured".
|
|
27
|
+
|
|
28
|
+
## ECRAF arithmetic boundary (2026-09-17)
|
|
29
|
+
|
|
30
|
+
The internal `planEcrafAdmissions()` planner rejects non-finite derived density
|
|
31
|
+
denominators, scores, and reserved usage with `RangeError`, even when each input
|
|
32
|
+
number is finite. Scores are computed once per candidate before sorting or
|
|
33
|
+
calling the conflict predicate; singleton and zero-slot batches receive the same
|
|
34
|
+
validation. A bounded resource overflow still defers the candidate and allows
|
|
35
|
+
later feasible candidates. An unbounded resource has no capacity limit, but its
|
|
36
|
+
usage must remain representable as a finite number. Failed passes return no
|
|
37
|
+
partial admission plan and do not mutate caller input.
|
|
38
|
+
|
|
39
|
+
Regression coverage is in
|
|
40
|
+
`packages/agent/test/tool-dag-ecraf-arithmetic.test.ts`; existing numeric and
|
|
41
|
+
property tests remain in `packages/agent/test/tool-dag-ecraf.test.ts`.
|
|
42
|
+
This is local pure-planner validation, not live frontier wiring, CI confirmation,
|
|
43
|
+
a release, or evidence of latency/quality improvement. Resource normalization,
|
|
44
|
+
slot-aware ranking, fairness, and equal-budget runtime comparisons remain separate
|
|
45
|
+
work.
|
|
46
|
+
|
|
47
|
+
## Final claim resolution is abort-bound (2026-09-19 audit F02)
|
|
48
|
+
|
|
49
|
+
The dag-v2 frontier re-resolves each prepared call's resource claims from its
|
|
50
|
+
exact post-hook arguments before admission. That wait was a bare `await`; the
|
|
51
|
+
initial scheduling pass in `tool-dag-memo` was already raced against the run's
|
|
52
|
+
abort signal, so an extension `resourceClaims()` that never settled on the
|
|
53
|
+
second call pinned a cancelled run until the callback returned on its own.
|
|
54
|
+
`resolveFinalResolution` now uses the same `awaitWithAbort` boundary. The
|
|
55
|
+
callback itself is not killed — a plain Promise cannot be — but the aborted
|
|
56
|
+
outcome settles the call, the frontier loop exits on the same signal, and a late
|
|
57
|
+
fulfilment or rejection lands in a finished batch and admits nothing. In-flight
|
|
58
|
+
peers keep the existing abort contract (`aborted`, `executionStarted: true`),
|
|
59
|
+
and the authorization hook still runs once. Coverage:
|
|
60
|
+
`packages/agent/test/tool-dag-final-claims-abort.test.ts`. This is the wait
|
|
61
|
+
boundary only; isolating a non-cooperative extension needs a killable execution
|
|
62
|
+
boundary, which this change does not add.
|
|
63
|
+
|
|
64
|
+
## Reasoning router resolver contract (2026-09-19 audit F05/F06)
|
|
65
|
+
|
|
66
|
+
The low-confidence escalation in `resolveThinkingLevelV4WithUncertainty` is
|
|
67
|
+
monotone at a fixed bias and hint only; it is not a floor at the class base
|
|
68
|
+
level, because a negative learning bias is applied before the +1 step (`debug`
|
|
69
|
+
with `bias=-2` still resolves to `medium`). The docstring previously claimed the
|
|
70
|
+
stronger floor. A policy that must never drop below the base level needs an
|
|
71
|
+
explicit safety floor, which is a cost decision not taken here. The shared
|
|
72
|
+
resolver also normalizes `bias` and `escalationSteps` to finite integers
|
|
73
|
+
(non-finite → 0, fractions truncated toward zero) so a corrupted value keeps the
|
|
74
|
+
class's own level instead of walking the ladder lookup off its rungs to the
|
|
75
|
+
lowest available level; the session's bias-snapshot validator already rejects
|
|
76
|
+
such values before they reach the resolver. Coverage:
|
|
77
|
+
`packages/coding-agent/test/reasoning-router-resolver-contract.test.ts`.
|
|
78
|
+
|
|
3
79
|
## Working-tree shared run budgets
|
|
4
80
|
|
|
5
81
|
The SDK `prompt(..., { runBudget })` path now shares a monotonic deadline and
|
|
@@ -130,21 +206,93 @@ The planner:
|
|
|
130
206
|
4. scores optional items for relevance, recency, evidence, redundancy,
|
|
131
207
|
priority, and full-text token cost;
|
|
132
208
|
5. sorts optional items by
|
|
133
|
-
`density -> effectiveScore -> priorityRank -> fullTokens -> id`;
|
|
209
|
+
`density -> effectiveScore -> priorityRank -> fullTokens -> id`;
|
|
134
210
|
6. selects a full, summary, headroom-compressed, pointer, or omitted
|
|
135
|
-
representation that fits
|
|
211
|
+
representation that fits (floor pass per tier, then the global pass);
|
|
212
|
+
7. lets each still-omitted item buy its cheapest admissible form by stepping
|
|
213
|
+
selected items down to theirs, applied all-or-nothing; and
|
|
214
|
+
8. re-offers each remaining item its costlier representations against the
|
|
215
|
+
leftover budget and promotes only when the selection policy prefers the
|
|
216
|
+
costlier form and it fits both the tier ceiling and the global remainder
|
|
217
|
+
(`context-budget-v2-global-pass.ts`; never touches hard items).
|
|
218
|
+
|
|
219
|
+
Breadth is settled before quality: step 7 runs before step 8, so an exchange
|
|
220
|
+
that admits another item cannot be undone by a promotion.
|
|
136
221
|
|
|
137
222
|
Density divides effective score by the cheapest non-omit representation
|
|
138
223
|
(`admissibleTokens`), not by full-text size. This avoids penalizing an item that
|
|
139
224
|
can be represented by a small evidence pointer. Stable item IDs and explicit
|
|
140
|
-
selection policy `sel-
|
|
225
|
+
selection policy `sel-3` make tie-breaking and plan-cache invalidation
|
|
141
226
|
deterministic.
|
|
142
227
|
|
|
228
|
+
### Representation cost accounting (2026-09-19 audit F01/F03)
|
|
229
|
+
|
|
230
|
+
Every derived representation is priced by counting the string it materializes
|
|
231
|
+
with the planner's own token counter, the same counter that priced the full
|
|
232
|
+
text. The former `ceil(0.15 * full) + 8` summary price was a compression target,
|
|
233
|
+
not a cost: a 100-character "summary" identical to its source was recorded at
|
|
234
|
+
12 tokens against the source's 25 and admitted into a 12-token budget. A
|
|
235
|
+
representation whose text equals the source, or whose counted cost is not below
|
|
236
|
+
the full text, is no longer offered. `createPlannedItems` stores the priced
|
|
237
|
+
candidates on each planned item so ranking and selection read one cost; the
|
|
238
|
+
selection policy token moved from `sel-2` to `sel-3` so plans and
|
|
239
|
+
representation entries cached under the old prices are not served.
|
|
240
|
+
|
|
241
|
+
### Representation exchange (2026-09-19 audit F04)
|
|
242
|
+
|
|
243
|
+
Items are ranked by their cheapest admissible representation but admitted at
|
|
244
|
+
whatever the selector prefers, so a high-priority item priced at 10 for ordering
|
|
245
|
+
could consume 100 and displace two 45-token items. On the audit's counterexample
|
|
246
|
+
that scored 121 against 169.5 for `A-pointer + B-full + C-full` at the same 100
|
|
247
|
+
tokens, measured with the selector's own preference score.
|
|
248
|
+
|
|
249
|
+
The repair is bounded. After the global pass, each still-omitted item in rank
|
|
250
|
+
order may pay for its admission by stepping already-selected items down to their
|
|
251
|
+
cheapest admissible representation. Donors yield in order of the preference the
|
|
252
|
+
policy loses per token freed, the whole exchange is applied or none of it is,
|
|
253
|
+
and a donor is skipped when stepping it down would drop its tier below the floor
|
|
254
|
+
it is currently honouring. An item admitted this way leaves the omitted list, so
|
|
255
|
+
it is never reported as both included and omitted.
|
|
256
|
+
|
|
257
|
+
This is not joint `(item, representation)` optimization: donor choice is greedy
|
|
258
|
+
and admission order is unchanged, so the planner can still trail a brute-force
|
|
259
|
+
oracle on instances the bounded repair cannot reach. It does reach the oracle on
|
|
260
|
+
the audit counterexample, and a 200-instance randomized property check holds
|
|
261
|
+
feasibility (global and tier caps), disjoint included/omitted sets, and
|
|
262
|
+
maximality: no omitted item still fits at its cheapest admissible form.
|
|
263
|
+
|
|
264
|
+
The quality-policy field `preferFullForHighPriority` is deprecated: nothing
|
|
265
|
+
reads it, and flipping it changes no candidate or choice
|
|
266
|
+
(`context-budget-quality-policy-semantics.test.ts`). The priority weight already
|
|
267
|
+
prefers full text for high-priority items.
|
|
268
|
+
|
|
269
|
+
Evidence:
|
|
270
|
+
|
|
271
|
+
- `packages/coding-agent/test/context-budget-representation-accounting.test.ts`
|
|
272
|
+
- `packages/coding-agent/test/context-budget-representation-exchange.test.ts`
|
|
273
|
+
- `packages/coding-agent/test/context-budget-representation-promotion.test.ts`
|
|
274
|
+
- `packages/coding-agent/test/context-budget-quality-policy-semantics.test.ts`
|
|
275
|
+
|
|
143
276
|
When enabled, representation and negative-result entries persist under
|
|
144
277
|
`.omk/cache/context-budget-v2`; plan entries remain session-memory-only.
|
|
145
278
|
`OMK_CONTEXT_GOVERNOR_CACHE=memory` keeps every cache entry in session memory,
|
|
146
279
|
and `OMK_CONTEXT_GOVERNOR_CACHE_DIR` relocates the representation snapshot.
|
|
147
280
|
|
|
281
|
+
Cache keys are bound to the counter that produced the prices. Two of the three
|
|
282
|
+
layers bind it implicitly — a plan key hashes each planned item's token counts,
|
|
283
|
+
and an exact representation key hashes a fingerprint containing
|
|
284
|
+
`estimatedTokens` — but the materialized (semantic) key is bucketed at 100
|
|
285
|
+
tokens and carries the tokenizer as a field, and no caller passed one, so every
|
|
286
|
+
counter shared the static `heuristic-v1` key space and the entry's
|
|
287
|
+
`tokenizer_mismatch` check compared that constant against itself. Since F01 made
|
|
288
|
+
every representation price counter-dependent, that let one estimator's price be
|
|
289
|
+
admitted in another estimator's run. The planner now resolves the key's
|
|
290
|
+
tokenizer from the counter's own `adapterId`
|
|
291
|
+
(`resolveEffectiveTokenizerIdV2`, probing a non-empty string because
|
|
292
|
+
`countText("")` short-circuits to the fallback estimator); an explicit
|
|
293
|
+
`tokenizerId` input still wins. Coverage:
|
|
294
|
+
`packages/coding-agent/test/context-budget-cache-tokenizer-binding.test.ts`.
|
|
295
|
+
|
|
148
296
|
Evidence:
|
|
149
297
|
|
|
150
298
|
- `packages/coding-agent/src/core/context-budget-v2-planner.ts`
|
package/docs/skills.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
This source tree includes six public [Neo skills](neo.md) in `resources/neo/skills`. They fill names not supplied by user, project, or explicit skills. `--no-skills` disables automatic loading, while `OMK_BUNDLED_SKILLS=0` disables only the bundled set. Explicit `--skill` paths remain available. Bundled instructions do not install or connect MCP servers; MCP setup remains opt-in. This source integration does not imply that older published packages include Neo.
|
|
8
8
|
|
|
9
9
|
OMK implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. OMK allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
|
|
10
10
|
|
package/docs/usage.md
CHANGED
|
@@ -146,7 +146,8 @@ When the resolved model ID is exactly `gpt-6-astra`, the built-in preset appends
|
|
|
146
146
|
such as `openai/gpt-6-astra` and `openrouter/openai/gpt-6-astra` match the same
|
|
147
147
|
model. Similar names, dated variants, and other GPT models do not select this
|
|
148
148
|
preset. Select the configured model through `/model`; the preset does not add
|
|
149
|
-
model availability to an account.
|
|
149
|
+
model availability to an account. `--thinking ultra` is a selector alias for
|
|
150
|
+
Astra's documented ceiling `max`; OMK does not send `reasoning.effort: "ultra"`.
|
|
150
151
|
|
|
151
152
|
The Astra guidance encourages completing authorized work, asking only material
|
|
152
153
|
clarifying questions, explaining any skill instruction that blocks progress,
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-custom-provider-anthropic",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-custom-provider-anthropic",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sdk": "0.52.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-gondolin",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-gondolin",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-sandbox",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "1.2.0",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-sandbox",
|
|
9
|
-
"version": "
|
|
9
|
+
"version": "1.2.0",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "0.0.26"
|
|
12
12
|
}
|
|
@@ -28,6 +28,7 @@ import {
|
|
|
28
28
|
remainingExecutionMs,
|
|
29
29
|
} from "./deadline-budget.ts";
|
|
30
30
|
import type { DeadlineProfileStore } from "./deadline-profile-store.ts";
|
|
31
|
+
import type { ManagedProcessResult } from "./managed-process.ts";
|
|
31
32
|
import type {
|
|
32
33
|
DeadlineAttemptMetadata,
|
|
33
34
|
DeadlineOutcome,
|
|
@@ -99,6 +100,7 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
99
100
|
let duplicateResumeBlocked = false;
|
|
100
101
|
let lastCheckpoint: Awaited<ReturnType<typeof readCheckpoint>> | undefined;
|
|
101
102
|
let terminalOutcome: DeadlineOutcome = "budget-exhausted";
|
|
103
|
+
let unsettledProcess: ManagedProcessResult | undefined;
|
|
102
104
|
const checkpointPrefix = options.checkpointPrefix ?? path.join(os.tmpdir(), "omk-subagent-checkpoint-");
|
|
103
105
|
const workspace = await createCheckpointWorkspace(checkpointPrefix);
|
|
104
106
|
|
|
@@ -183,7 +185,11 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
183
185
|
processReason: attempt.process.reason,
|
|
184
186
|
cleanup: attempt.process.cleanup,
|
|
185
187
|
});
|
|
186
|
-
|
|
188
|
+
if (attempt.process.terminationObserved === false) {
|
|
189
|
+
unsettledProcess = attempt.result.process;
|
|
190
|
+
terminalOutcome = "failed";
|
|
191
|
+
break outer;
|
|
192
|
+
}
|
|
187
193
|
if (outcome === "completed") {
|
|
188
194
|
completedShardIds.push(shard.id);
|
|
189
195
|
terminalOutcome = "completed";
|
|
@@ -228,6 +234,13 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
228
234
|
attempts,
|
|
229
235
|
...(lastCheckpoint === undefined ? {} : { checkpoint: lastCheckpoint }),
|
|
230
236
|
};
|
|
237
|
+
if (unsettledProcess) {
|
|
238
|
+
aggregate.exitCode = 1;
|
|
239
|
+
aggregate.stopReason = "unsettled";
|
|
240
|
+
aggregate.errorMessage = "Subagent termination unconfirmed (unsettled)";
|
|
241
|
+
aggregate.process = unsettledProcess;
|
|
242
|
+
return aggregate;
|
|
243
|
+
}
|
|
231
244
|
return aggregate;
|
|
232
245
|
}
|
|
233
246
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { createHash } from "node:crypto";
|
|
2
|
+
import { emptyUsage, type SingleResult } from "./subagent-runtime-types.ts";
|
|
3
|
+
import type { GraphTask } from "./workflow-graph.ts";
|
|
4
|
+
|
|
5
|
+
export function failedResult(result: SingleResult): boolean {
|
|
6
|
+
return (
|
|
7
|
+
result.process?.terminationObserved === false ||
|
|
8
|
+
result.exitCode !== 0 ||
|
|
9
|
+
result.stopReason === "error" ||
|
|
10
|
+
result.stopReason === "aborted"
|
|
11
|
+
);
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
export function laneResult(
|
|
15
|
+
result: SingleResult,
|
|
16
|
+
): void | { status: "failed" } | { status: "unsettled"; settlement: Promise<void> } {
|
|
17
|
+
if (result.process?.terminationObserved === false)
|
|
18
|
+
return { status: "unsettled", settlement: result.process.settlement };
|
|
19
|
+
if (failedResult(result)) return { status: "failed" };
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function blockedResult(task: GraphTask, reason = "blocked-dependency"): SingleResult {
|
|
23
|
+
return {
|
|
24
|
+
nodeId: task.id,
|
|
25
|
+
agent: task.agent,
|
|
26
|
+
agentSource: "unknown",
|
|
27
|
+
task: task.task,
|
|
28
|
+
exitCode: 1,
|
|
29
|
+
messages: [],
|
|
30
|
+
stderr: reason,
|
|
31
|
+
stopReason: reason,
|
|
32
|
+
usage: emptyUsage(),
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export function dependencyDigests(
|
|
37
|
+
task: GraphTask,
|
|
38
|
+
outputs: ReadonlyMap<string, string>,
|
|
39
|
+
): Readonly<Record<string, string>> {
|
|
40
|
+
return Object.fromEntries(
|
|
41
|
+
(task.dependsOn ?? []).map((id) => [
|
|
42
|
+
id,
|
|
43
|
+
createHash("sha256")
|
|
44
|
+
.update(outputs.get(id) ?? "")
|
|
45
|
+
.digest("hex"),
|
|
46
|
+
]),
|
|
47
|
+
);
|
|
48
|
+
}
|