open-multi-agent-kit 0.95.1 → 0.96.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 +37 -0
- package/README.md +16 -1
- package/dist/approvals/approval-receipt-store.d.ts +18 -0
- package/dist/approvals/approval-receipt-store.d.ts.map +1 -0
- package/dist/approvals/approval-receipt-store.js +194 -0
- package/dist/approvals/approval-receipt-store.js.map +1 -0
- package/dist/approvals/approval-receipt.d.ts +43 -0
- package/dist/approvals/approval-receipt.d.ts.map +1 -0
- package/dist/approvals/approval-receipt.js +208 -0
- package/dist/approvals/approval-receipt.js.map +1 -0
- package/dist/approvals/approval-verifier.d.ts +17 -0
- package/dist/approvals/approval-verifier.d.ts.map +1 -0
- package/dist/approvals/approval-verifier.js +23 -0
- package/dist/approvals/approval-verifier.js.map +1 -0
- package/dist/approvals/plannotator-approval-bridge.d.ts +58 -0
- package/dist/approvals/plannotator-approval-bridge.d.ts.map +1 -0
- package/dist/approvals/plannotator-approval-bridge.js +169 -0
- package/dist/approvals/plannotator-approval-bridge.js.map +1 -0
- package/dist/cli/args.d.ts.map +1 -1
- package/dist/cli/args.js +2 -0
- package/dist/cli/args.js.map +1 -1
- package/dist/commands/package-doctor-cli.d.ts +13 -0
- package/dist/commands/package-doctor-cli.d.ts.map +1 -0
- package/dist/commands/package-doctor-cli.js +80 -0
- package/dist/commands/package-doctor-cli.js.map +1 -0
- package/dist/commands/router-feedback-cli.d.ts +11 -0
- package/dist/commands/router-feedback-cli.d.ts.map +1 -0
- package/dist/commands/router-feedback-cli.js +99 -0
- package/dist/commands/router-feedback-cli.js.map +1 -0
- package/dist/commands/stats-cli.d.ts +20 -0
- package/dist/commands/stats-cli.d.ts.map +1 -0
- package/dist/commands/stats-cli.js +99 -0
- package/dist/commands/stats-cli.js.map +1 -0
- package/dist/core/agent-session-runtime.d.ts.map +1 -1
- package/dist/core/agent-session-runtime.js +4 -1
- package/dist/core/agent-session-runtime.js.map +1 -1
- package/dist/core/agent-session.d.ts +99 -31
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +624 -216
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/bash-executor.d.ts.map +1 -1
- package/dist/core/bash-executor.js +8 -2
- package/dist/core/bash-executor.js.map +1 -1
- package/dist/core/compaction/transaction.d.ts +9 -0
- package/dist/core/compaction/transaction.d.ts.map +1 -1
- package/dist/core/compaction/transaction.js +17 -2
- package/dist/core/compaction/transaction.js.map +1 -1
- package/dist/core/context-budget-governor-v2.d.ts +1 -1
- package/dist/core/context-budget-governor-v2.d.ts.map +1 -1
- package/dist/core/context-budget-governor-v2.js +1 -1
- package/dist/core/context-budget-governor-v2.js.map +1 -1
- package/dist/core/context-budget-system-prompt.d.ts.map +1 -1
- package/dist/core/context-budget-system-prompt.js +18 -2
- package/dist/core/context-budget-system-prompt.js.map +1 -1
- package/dist/core/context-budget-v2-cache-disk.d.ts +109 -0
- package/dist/core/context-budget-v2-cache-disk.d.ts.map +1 -0
- package/dist/core/context-budget-v2-cache-disk.js +343 -0
- package/dist/core/context-budget-v2-cache-disk.js.map +1 -0
- package/dist/core/context-budget-v2-cache-keys.d.ts +22 -0
- package/dist/core/context-budget-v2-cache-keys.d.ts.map +1 -1
- package/dist/core/context-budget-v2-cache-keys.js +4 -4
- package/dist/core/context-budget-v2-cache-keys.js.map +1 -1
- package/dist/core/context-budget-v2-cache.d.ts +1 -0
- package/dist/core/context-budget-v2-cache.d.ts.map +1 -1
- package/dist/core/context-budget-v2-cache.js +1 -0
- package/dist/core/context-budget-v2-cache.js.map +1 -1
- package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
- package/dist/core/context-budget-v2-planner.js +17 -14
- package/dist/core/context-budget-v2-planner.js.map +1 -1
- package/dist/core/context-budget-v2-types.d.ts +1 -0
- package/dist/core/context-budget-v2-types.d.ts.map +1 -1
- package/dist/core/context-budget-v2-types.js.map +1 -1
- package/dist/core/extensions/loader.d.ts.map +1 -1
- package/dist/core/extensions/loader.js +45 -22
- package/dist/core/extensions/loader.js.map +1 -1
- package/dist/core/extensions/types.d.ts +4 -0
- package/dist/core/extensions/types.d.ts.map +1 -1
- package/dist/core/extensions/types.js.map +1 -1
- package/dist/core/mcp/client.d.ts +105 -0
- package/dist/core/mcp/client.d.ts.map +1 -0
- package/dist/core/mcp/client.js +198 -0
- package/dist/core/mcp/client.js.map +1 -0
- package/dist/core/mcp/config.d.ts +23 -0
- package/dist/core/mcp/config.d.ts.map +1 -0
- package/dist/core/mcp/config.js +89 -0
- package/dist/core/mcp/config.js.map +1 -0
- package/dist/core/mcp/index.d.ts +15 -0
- package/dist/core/mcp/index.d.ts.map +1 -0
- package/dist/core/mcp/index.js +15 -0
- package/dist/core/mcp/index.js.map +1 -0
- package/dist/core/mcp/manager.d.ts +84 -0
- package/dist/core/mcp/manager.d.ts.map +1 -0
- package/dist/core/mcp/manager.js +173 -0
- package/dist/core/mcp/manager.js.map +1 -0
- package/dist/core/mcp/protocol.d.ts +59 -0
- package/dist/core/mcp/protocol.d.ts.map +1 -0
- package/dist/core/mcp/protocol.js +103 -0
- package/dist/core/mcp/protocol.js.map +1 -0
- package/dist/core/mcp/stdio-transport.d.ts +63 -0
- package/dist/core/mcp/stdio-transport.d.ts.map +1 -0
- package/dist/core/mcp/stdio-transport.js +132 -0
- package/dist/core/mcp/stdio-transport.js.map +1 -0
- package/dist/core/mcp/tools.d.ts +47 -0
- package/dist/core/mcp/tools.d.ts.map +1 -0
- package/dist/core/mcp/tools.js +102 -0
- package/dist/core/mcp/tools.js.map +1 -0
- package/dist/core/package-archive.d.ts +3 -0
- package/dist/core/package-archive.d.ts.map +1 -0
- package/dist/core/package-archive.js +161 -0
- package/dist/core/package-archive.js.map +1 -0
- package/dist/core/package-doctor-source-scan.d.ts +13 -0
- package/dist/core/package-doctor-source-scan.d.ts.map +1 -0
- package/dist/core/package-doctor-source-scan.js +124 -0
- package/dist/core/package-doctor-source-scan.js.map +1 -0
- package/dist/core/package-doctor.d.ts +41 -0
- package/dist/core/package-doctor.d.ts.map +1 -0
- package/dist/core/package-doctor.js +145 -0
- package/dist/core/package-doctor.js.map +1 -0
- package/dist/core/package-manager.d.ts +10 -1
- package/dist/core/package-manager.d.ts.map +1 -1
- package/dist/core/package-manager.js +175 -42
- package/dist/core/package-manager.js.map +1 -1
- package/dist/core/package-manifest.d.ts +26 -0
- package/dist/core/package-manifest.d.ts.map +1 -0
- package/dist/core/package-manifest.js +85 -0
- package/dist/core/package-manifest.js.map +1 -0
- package/dist/core/pi-compat.d.ts +5 -0
- package/dist/core/pi-compat.d.ts.map +1 -0
- package/dist/core/pi-compat.js +18 -0
- package/dist/core/pi-compat.js.map +1 -0
- package/dist/core/provider-resilience.d.ts +7 -0
- package/dist/core/provider-resilience.d.ts.map +1 -1
- package/dist/core/provider-resilience.js +11 -0
- package/dist/core/provider-resilience.js.map +1 -1
- package/dist/core/reasoning-router-bias.d.ts +10 -14
- package/dist/core/reasoning-router-bias.d.ts.map +1 -1
- package/dist/core/reasoning-router-bias.js +22 -15
- package/dist/core/reasoning-router-bias.js.map +1 -1
- package/dist/core/reasoning-router-v4.d.ts +9 -1
- package/dist/core/reasoning-router-v4.d.ts.map +1 -1
- package/dist/core/reasoning-router-v4.js +20 -5
- package/dist/core/reasoning-router-v4.js.map +1 -1
- package/dist/core/redaction.d.ts +2 -5
- package/dist/core/redaction.d.ts.map +1 -1
- package/dist/core/redaction.js +14 -1
- package/dist/core/redaction.js.map +1 -1
- package/dist/core/repository-learning-scope.d.ts +10 -0
- package/dist/core/repository-learning-scope.d.ts.map +1 -0
- package/dist/core/repository-learning-scope.js +42 -0
- package/dist/core/repository-learning-scope.js.map +1 -0
- package/dist/core/resource-loader.d.ts.map +1 -1
- package/dist/core/resource-loader.js +16 -1
- package/dist/core/resource-loader.js.map +1 -1
- package/dist/core/router-feedback-collector.d.ts +2 -1
- package/dist/core/router-feedback-collector.d.ts.map +1 -1
- package/dist/core/router-feedback-collector.js +2 -2
- package/dist/core/router-feedback-collector.js.map +1 -1
- package/dist/core/runtime-provenance.d.ts +54 -0
- package/dist/core/runtime-provenance.d.ts.map +1 -0
- package/dist/core/runtime-provenance.js +115 -0
- package/dist/core/runtime-provenance.js.map +1 -0
- package/dist/core/sandbox/backend.d.ts.map +1 -1
- package/dist/core/sandbox/backend.js +39 -21
- package/dist/core/sandbox/backend.js.map +1 -1
- package/dist/core/sandbox/default-policy.d.ts +4 -5
- package/dist/core/sandbox/default-policy.d.ts.map +1 -1
- package/dist/core/sandbox/default-policy.js +9 -11
- package/dist/core/sandbox/default-policy.js.map +1 -1
- package/dist/core/session-bash-runtime.d.ts +4 -4
- package/dist/core/session-bash-runtime.d.ts.map +1 -1
- package/dist/core/session-bash-runtime.js +6 -5
- package/dist/core/session-bash-runtime.js.map +1 -1
- package/dist/core/session-compaction-service.d.ts.map +1 -1
- package/dist/core/session-compaction-service.js +7 -7
- package/dist/core/session-compaction-service.js.map +1 -1
- package/dist/core/session-manager.d.ts +4 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +47 -7
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/settings-manager.d.ts +7 -4
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +11 -3
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/subagent-orchestration.d.ts.map +1 -1
- package/dist/core/subagent-orchestration.js +4 -2
- package/dist/core/subagent-orchestration.js.map +1 -1
- package/dist/core/system-prompt.d.ts +9 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +10 -4
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/bash.d.ts +2 -2
- package/dist/core/tools/bash.d.ts.map +1 -1
- package/dist/core/tools/bash.js +2 -1
- package/dist/core/tools/bash.js.map +1 -1
- package/dist/core/tools/diagnostics.d.ts.map +1 -1
- package/dist/core/tools/diagnostics.js +8 -2
- package/dist/core/tools/diagnostics.js.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
- package/dist/core/tools/tool-definition-wrapper.js +15 -0
- package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
- package/dist/core/turn-metrics.d.ts +135 -0
- package/dist/core/turn-metrics.d.ts.map +1 -0
- package/dist/core/turn-metrics.js +261 -0
- package/dist/core/turn-metrics.js.map +1 -0
- package/dist/core/verified-bash-runtime.d.ts.map +1 -1
- package/dist/core/verified-bash-runtime.js +10 -4
- package/dist/core/verified-bash-runtime.js.map +1 -1
- package/dist/guardrails/evidence-protocol.d.ts +10 -0
- package/dist/guardrails/evidence-protocol.d.ts.map +1 -0
- package/dist/guardrails/evidence-protocol.js +34 -0
- package/dist/guardrails/evidence-protocol.js.map +1 -0
- package/dist/guardrails/evidence-system.d.ts +3 -1
- package/dist/guardrails/evidence-system.d.ts.map +1 -1
- package/dist/guardrails/evidence-system.js +22 -14
- package/dist/guardrails/evidence-system.js.map +1 -1
- package/dist/guardrails/replay-ledger-lock-owner.d.ts +7 -0
- package/dist/guardrails/replay-ledger-lock-owner.d.ts.map +1 -1
- package/dist/guardrails/replay-ledger-lock-owner.js +42 -1
- package/dist/guardrails/replay-ledger-lock-owner.js.map +1 -1
- package/dist/guardrails/replay-payload-hash.d.ts +6 -0
- package/dist/guardrails/replay-payload-hash.d.ts.map +1 -0
- package/dist/guardrails/replay-payload-hash.js +24 -0
- package/dist/guardrails/replay-payload-hash.js.map +1 -0
- package/dist/index.d.ts +8 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -1
- package/dist/index.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +18 -0
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
- package/dist/modes/interactive/components/control-panel-layout.js +2 -2
- package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +3 -0
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +40 -12
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
- package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
- package/dist/modes/interactive/components/settings-selector.js +10 -0
- package/dist/modes/interactive/components/settings-selector.js.map +1 -1
- package/dist/modes/interactive/components/status-sidebar.d.ts +14 -2
- package/dist/modes/interactive/components/status-sidebar.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-sidebar.js +106 -19
- package/dist/modes/interactive/components/status-sidebar.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +10 -1
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +104 -17
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/theme/dark.json +1 -1
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +1 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
- package/dist/modes/rpc/rpc-mode.js +1 -1
- package/dist/modes/rpc/rpc-mode.js.map +1 -1
- package/dist/types/evidence.d.ts +11 -3
- package/dist/types/evidence.d.ts.map +1 -1
- package/dist/types/evidence.js.map +1 -1
- package/docs/book-to-skill.md +79 -0
- package/docs/compaction.md +35 -3
- package/docs/containerization.md +14 -2
- package/docs/docs.json +16 -0
- package/docs/environment-variables.md +1 -1
- package/docs/extensions.md +75 -16
- package/docs/index.md +3 -0
- package/docs/mcp.md +97 -0
- package/docs/metrics.md +87 -0
- package/docs/models.md +12 -0
- package/docs/packages.md +25 -4
- package/docs/provider-resilience.md +37 -56
- package/docs/providers.md +5 -1
- package/docs/run-protocol.md +72 -0
- package/docs/sdk.md +40 -6
- package/docs/sessions.md +6 -0
- package/docs/settings.md +10 -7
- package/docs/skills.md +9 -1
- package/docs/usage.md +14 -4
- 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/plannotator-approval-bridge.ts +83 -0
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +21 -11
- package/examples/extensions/subagent/adaptive-agent-runtime.ts +9 -3
- package/examples/extensions/subagent/agents/planner.md +0 -2
- package/examples/extensions/subagent/agents/reviewer.md +0 -2
- package/examples/extensions/subagent/agents/scout.md +0 -2
- package/examples/extensions/subagent/agents/worker.md +0 -1
- package/examples/extensions/subagent/agents.test.ts +9 -0
- package/examples/extensions/subagent/agents.ts +11 -4
- package/examples/extensions/subagent/deadline-budget.test.ts +32 -0
- package/examples/extensions/subagent/deadline-budget.ts +25 -1
- package/examples/extensions/subagent/fixtures/fake-omk-json.mjs +10 -0
- package/examples/extensions/subagent/index.ts +234 -55
- package/examples/extensions/subagent/subagent-execution-policy.test.ts +27 -0
- package/examples/extensions/subagent/subagent-extension-smoke.test.ts +167 -2
- package/examples/extensions/subagent/workflow-graph.test.ts +80 -0
- package/examples/extensions/subagent/workflow-graph.ts +89 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +275 -439
- package/package.json +11 -8
|
@@ -5,8 +5,11 @@ Delegate tasks to specialized subagents with isolated context windows.
|
|
|
5
5
|
## Features
|
|
6
6
|
|
|
7
7
|
- **Isolated context**: Each subagent runs in a separate `omk` process
|
|
8
|
+
- **Session model inheritance**: Agents without `model` use the parent session's currently selected model; an explicit `model` pins the child
|
|
8
9
|
- **Streaming output**: See tool calls and progress as they happen
|
|
9
10
|
- **Parallel streaming**: All parallel tasks stream updates simultaneously
|
|
11
|
+
- **Validated task graphs**: Dependency DAGs fail closed on duplicate/unknown/cyclic nodes and execute in deterministic parallel waves
|
|
12
|
+
- **Explicit handoffs**: Graph nodes receive only declared dependency output and only when their task includes `{dependencies}`
|
|
10
13
|
- **Markdown rendering**: Final output rendered with proper formatting (expanded view)
|
|
11
14
|
- **Usage tracking**: Shows turns, tokens, cost, and context usage per agent
|
|
12
15
|
- **Abort support**: Ctrl+C propagates to the entire detached subagent process tree
|
|
@@ -14,6 +17,7 @@ Delegate tasks to specialized subagents with isolated context windows.
|
|
|
14
17
|
- **Checkpoint resume**: A cutoff resumes only the unfinished shard with bounded prior evidence
|
|
15
18
|
- **Cutoff learning**: Completion/cutoff history is persisted per provider and model under the agent state directory
|
|
16
19
|
- **Bounded cost**: At most 3 semantic shards and 1 resume across the whole logical task by default
|
|
20
|
+
- **Ultra execution**: Removes task-count, concurrency, internal deadline, and outer tool-timeout caps; Ctrl+C cancellation still propagates
|
|
17
21
|
|
|
18
22
|
## Structure
|
|
19
23
|
|
|
@@ -49,7 +53,7 @@ mkdir -p ~/.omk/agent/extensions/subagent
|
|
|
49
53
|
src="$(pwd)/packages/coding-agent/examples/extensions/subagent"
|
|
50
54
|
for f in index.ts agents.ts agent-capability-router.ts capabilities.ts domain-profiles.ts \
|
|
51
55
|
adaptive-agent-runtime.ts adaptive-result.ts checkpoint-runtime.ts deadline-budget.ts \
|
|
52
|
-
deadline-profile-store.ts managed-process.ts subagent-runtime-types.ts; do
|
|
56
|
+
deadline-profile-store.ts managed-process.ts subagent-runtime-types.ts workflow-graph.ts; do
|
|
53
57
|
ln -sf "$src/$f" ~/.omk/agent/extensions/subagent/$f
|
|
54
58
|
done
|
|
55
59
|
|
|
@@ -107,15 +111,18 @@ Use a chain: first have scout find the read tool, then have planner suggest impr
|
|
|
107
111
|
| Mode | Parameter | Description |
|
|
108
112
|
|------|-----------|-------------|
|
|
109
113
|
| Single | `{ agent, task }` | One logical task; the runtime may split it into bounded semantic shards |
|
|
110
|
-
| Parallel | `{ tasks: [...] }` | Multiple logical tasks
|
|
114
|
+
| Parallel | `{ tasks: [...] }` | Multiple logical tasks; non-Ultra allows max 8 and 4 concurrent, while Ultra starts all requested tasks concurrently |
|
|
111
115
|
| Chain | `{ chain: [...] }` | Sequential with `{previous}` placeholder and a fair deadline share per remaining step |
|
|
116
|
+
| Graph | `{ graph: [{ id, agent, task, dependsOn? }] }` | Validated dependency DAG; ready nodes run in parallel waves, and any failed wave blocks downstream nodes |
|
|
117
|
+
|
|
118
|
+
Graph nodes opt in to dependency output by placing `{dependencies}` in `task`. The runtime injects only outputs named in that node's `dependsOn`; without the placeholder, no prior output is appended. Each dependency handoff is capped at 16 KiB. This keeps large or unrelated context from leaking across nodes.
|
|
112
119
|
|
|
113
120
|
Optional execution controls:
|
|
114
121
|
|
|
115
122
|
| Parameter | Default | Description |
|
|
116
123
|
|-----------|---------|-------------|
|
|
117
|
-
| `executionBudgetMs` | `840000` |
|
|
118
|
-
| `maxResumeAttempts` | `1` | Retries only the active unfinished shard; accepted range is 0-2 |
|
|
124
|
+
| `executionBudgetMs` | `840000` | Non-Ultra internal hard budget; when explicitly supplied it also bounds Ultra execution, otherwise Ultra is unbounded |
|
|
125
|
+
| `maxResumeAttempts` | `1` | Retries only the active unfinished shard; accepted range is 0-2 and ignored by unbounded Ultra execution |
|
|
119
126
|
|
|
120
127
|
## Output Display
|
|
121
128
|
|
|
@@ -152,12 +159,13 @@ Agents are markdown files with YAML frontmatter:
|
|
|
152
159
|
name: my-agent
|
|
153
160
|
description: What this agent does
|
|
154
161
|
tools: read, grep, find, ls
|
|
155
|
-
model: claude-haiku-4-5
|
|
156
162
|
---
|
|
157
163
|
|
|
158
164
|
System prompt for the agent goes here.
|
|
159
165
|
```
|
|
160
166
|
|
|
167
|
+
`model` is optional. Omit it to inherit the model currently selected in the parent session; set it only when the agent must be pinned to a specific model.
|
|
168
|
+
|
|
161
169
|
**Locations:**
|
|
162
170
|
- `~/.omk/agent/agents/*.md` - User-level (always loaded)
|
|
163
171
|
- `.omk/agents/*.md` - Project-level (only with `agentScope: "project"` or `"both"`)
|
|
@@ -168,10 +176,10 @@ Project agents override user agents with the same name when `agentScope: "both"`
|
|
|
168
176
|
|
|
169
177
|
| Agent | Purpose | Model | Tools |
|
|
170
178
|
|-------|---------|-------|-------|
|
|
171
|
-
| `scout` | Fast codebase recon |
|
|
172
|
-
| `planner` | Implementation plans |
|
|
173
|
-
| `reviewer` | Code review |
|
|
174
|
-
| `worker` | General-purpose |
|
|
179
|
+
| `scout` | Fast codebase recon | Parent session | read, grep, find, ls, bash |
|
|
180
|
+
| `planner` | Implementation plans | Parent session | read, grep, find, ls |
|
|
181
|
+
| `reviewer` | Code review | Parent session | read, grep, find, ls, bash |
|
|
182
|
+
| `worker` | General-purpose | Parent session | (all default) |
|
|
175
183
|
|
|
176
184
|
## Workflow Prompts
|
|
177
185
|
|
|
@@ -186,8 +194,10 @@ Project agents override user agents with the same name when `agentScope: "both"`
|
|
|
186
194
|
- **Exit code != 0**: Tool returns error with stderr/output
|
|
187
195
|
- **stopReason "error"**: LLM error propagated with error message
|
|
188
196
|
- **stopReason "aborted"**: User abort (Ctrl+C) terminates and reaps the subprocess tree
|
|
189
|
-
- **stopReason "deadline"**:
|
|
197
|
+
- **stopReason "deadline"**: Outside Ultra, an internal cutoff returns elapsed/deadline/checkpoint/resume metadata instead of reaching the outer tool timeout
|
|
198
|
+
- **Ultra**: No scheduler or attempt deadline is armed; provider, network, OS, and explicit caller cancellation still apply
|
|
190
199
|
- **Chain mode**: Stops at first failing step, reports which step failed, and preserves completed earlier steps
|
|
200
|
+
- **Graph mode**: Rejects malformed graphs before spawn; a failed wave prevents all downstream starts and preserves completed node evidence
|
|
191
201
|
- **Duplicate prevention**: A cutoff with no new checkpoint or streamed evidence is not retried
|
|
192
202
|
|
|
193
203
|
## Limitations
|
|
@@ -195,6 +205,6 @@ Project agents override user agents with the same name when `agentScope: "both"`
|
|
|
195
205
|
- Output truncated to last 10 items in collapsed view (expand to see all)
|
|
196
206
|
- Parallel model-visible output is capped at 50 KB per task; full results remain in tool details
|
|
197
207
|
- Agents discovered fresh on each invocation (allows editing mid-session)
|
|
198
|
-
-
|
|
208
|
+
- Outside Ultra, parallel mode is limited to 8 tasks and 4 concurrent processes; Ultra has no extension-imposed count or concurrency cap and can consume substantial host/provider resources
|
|
199
209
|
- Automatic semantic pre-sharding requires an explicit numbered/checklist action list; indivisible prose is checkpointed and resumed as one shard
|
|
200
210
|
- Checkpoints are best-effort child artifacts plus runtime-captured stream evidence; workspace side effects remain the source of truth after a cutoff
|
|
@@ -73,8 +73,8 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
73
73
|
const startedAtMs = Date.now();
|
|
74
74
|
let identity = parseProviderModel(options.model);
|
|
75
75
|
let profile = await options.profileStore.profileFor(identity.provider, identity.model);
|
|
76
|
-
const initialCutoff = cutoffFor(profile, options, remainingExecutionMs(options.budget));
|
|
77
76
|
const demand = estimateTaskDemand(options.logicalTask);
|
|
77
|
+
const initialCutoff = cutoffFor(profile, options, remainingExecutionMs(options.budget), demand.predictedMs);
|
|
78
78
|
const shards = planTaskShards(options.logicalTask, demand, {
|
|
79
79
|
attemptCutoffMs: initialCutoff,
|
|
80
80
|
maxTaskShards: options.budget.maxTaskShards,
|
|
@@ -109,7 +109,7 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
109
109
|
let checkpoint: typeof lastCheckpoint;
|
|
110
110
|
while (true) {
|
|
111
111
|
const pendingShards = shards.length - completedShardIds.length;
|
|
112
|
-
const recommended = cutoffFor(profile, options, remainingExecutionMs(taskBudget));
|
|
112
|
+
const recommended = cutoffFor(profile, options, remainingExecutionMs(taskBudget), demand.predictedMs);
|
|
113
113
|
const allocation = allocateAttemptBudget({
|
|
114
114
|
budget: taskBudget,
|
|
115
115
|
pendingSequentialTasks: 1,
|
|
@@ -231,10 +231,16 @@ export async function runAdaptiveAgent(options: RunAdaptiveAgentOptions): Promis
|
|
|
231
231
|
return aggregate;
|
|
232
232
|
}
|
|
233
233
|
|
|
234
|
-
function cutoffFor(
|
|
234
|
+
function cutoffFor(
|
|
235
|
+
profile: DeadlineProfile | undefined,
|
|
236
|
+
options: RunAdaptiveAgentOptions,
|
|
237
|
+
maximumMs: number,
|
|
238
|
+
predictedMs: number,
|
|
239
|
+
): number {
|
|
235
240
|
return recommendAttemptCutoff(profile, {
|
|
236
241
|
fallbackMs: options.policy.fallbackAttemptMs,
|
|
237
242
|
minimumMs: Math.min(options.policy.minimumAttemptMs, maximumMs),
|
|
238
243
|
maximumMs: Math.max(1, maximumMs),
|
|
244
|
+
predictedMs,
|
|
239
245
|
});
|
|
240
246
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: planner
|
|
3
3
|
description: Creates implementation plans from context and requirements
|
|
4
|
-
tools: read, grep, find, ls
|
|
5
|
-
model: claude-sonnet-4-5
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
You are a planning specialist. You receive context (from a scout) and requirements, then produce a clear implementation plan.
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: scout
|
|
3
3
|
description: Fast codebase recon that returns compressed context for handoff to other agents
|
|
4
|
-
tools: read, grep, find, ls, bash
|
|
5
|
-
model: claude-haiku-4-5
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
You are a scout. Quickly investigate a codebase and return structured findings that another agent can use without re-reading everything.
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: worker
|
|
3
3
|
description: General-purpose subagent with full capabilities, isolated context
|
|
4
|
-
model: claude-sonnet-4-5
|
|
5
4
|
---
|
|
6
5
|
|
|
7
6
|
You are a worker agent with full capabilities. You operate in an isolated context window to handle delegated tasks without polluting the main conversation.
|
|
@@ -84,3 +84,12 @@ describe("parseEnforceFlag coercion (via discoverAgents)", () => {
|
|
|
84
84
|
}
|
|
85
85
|
});
|
|
86
86
|
});
|
|
87
|
+
|
|
88
|
+
describe("bundled agent model delegation", () => {
|
|
89
|
+
it("omits model pins so bundled agents inherit the parent session model", () => {
|
|
90
|
+
for (const name of ["scout", "planner", "reviewer", "worker"]) {
|
|
91
|
+
const source = fs.readFileSync(path.join(import.meta.dirname, "agents", `${name}.md`), "utf8");
|
|
92
|
+
expect(source, `${name} must not pin a model`).not.toMatch(/^model:/m);
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
});
|
|
@@ -78,10 +78,17 @@ function loadAgentsFromDir(dir: string, source: "user" | "project"): AgentConfig
|
|
|
78
78
|
continue;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
const
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
81
|
+
const rawTools = frontmatter.tools as unknown;
|
|
82
|
+
// ponytail: frontmatter `tools:` is either a CSV string or a YAML map ({read: true}) — accept both
|
|
83
|
+
const tools =
|
|
84
|
+
typeof rawTools === "string"
|
|
85
|
+
? rawTools
|
|
86
|
+
.split(",")
|
|
87
|
+
.map((t: string) => t.trim())
|
|
88
|
+
.filter(Boolean)
|
|
89
|
+
: rawTools && typeof rawTools === "object"
|
|
90
|
+
? Object.keys(rawTools)
|
|
91
|
+
: undefined;
|
|
85
92
|
|
|
86
93
|
const capabilities = parseCapabilities(frontmatter);
|
|
87
94
|
const enforceCapabilities = parseEnforceFlag(frontmatter.enforceCapabilities);
|
|
@@ -132,4 +132,36 @@ describe("provider/model deadline learning", () => {
|
|
|
132
132
|
expect(recommendAttemptCutoff(codex, { fallbackMs: 600_000, minimumMs: 1, maximumMs: 800_000 })).toBe(180_000);
|
|
133
133
|
expect(recommendAttemptCutoff(anthropic, { fallbackMs: 600_000, minimumMs: 1, maximumMs: 800_000 })).toBe(60_000);
|
|
134
134
|
});
|
|
135
|
+
|
|
136
|
+
it("does not let a short probe collapse a larger task to the minimum cutoff", () => {
|
|
137
|
+
const db = updateDeadlineProfiles(undefined, {
|
|
138
|
+
provider: "openai-codex",
|
|
139
|
+
model: "gpt-5.6",
|
|
140
|
+
outcome: "completed",
|
|
141
|
+
elapsedMs: 10_000,
|
|
142
|
+
estimatedTokens: 10,
|
|
143
|
+
workUnits: 1,
|
|
144
|
+
});
|
|
145
|
+
const profile = getDeadlineProfile(db, "openai-codex", "gpt-5.6");
|
|
146
|
+
const demand = estimateTaskDemand(
|
|
147
|
+
[
|
|
148
|
+
"Review the release candidate:",
|
|
149
|
+
"1. Inspect the manifest.",
|
|
150
|
+
"2. Verify fixture hashes.",
|
|
151
|
+
"3. Run formatter checks.",
|
|
152
|
+
"4. Run parity tests.",
|
|
153
|
+
"5. Review production diffs.",
|
|
154
|
+
"6. Report the verdict.",
|
|
155
|
+
].join("\n"),
|
|
156
|
+
);
|
|
157
|
+
|
|
158
|
+
expect(
|
|
159
|
+
recommendAttemptCutoff(profile, {
|
|
160
|
+
fallbackMs: 600_000,
|
|
161
|
+
minimumMs: 30_000,
|
|
162
|
+
maximumMs: 800_000,
|
|
163
|
+
predictedMs: demand.predictedMs,
|
|
164
|
+
}),
|
|
165
|
+
).toBe(demand.predictedMs);
|
|
166
|
+
});
|
|
135
167
|
});
|
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
export type DeadlineSampleOutcome = "completed" | "cutoff" | "aborted" | "failed";
|
|
2
2
|
|
|
3
|
+
export interface SubagentExecutionPolicy {
|
|
4
|
+
readonly unbounded: boolean;
|
|
5
|
+
readonly maxParallelTasks: number | undefined;
|
|
6
|
+
readonly concurrency: number;
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function resolveSubagentExecutionPolicy(
|
|
10
|
+
thinkingLevel: string | undefined,
|
|
11
|
+
parallelTaskCount: number,
|
|
12
|
+
executionBudgetExplicit = false,
|
|
13
|
+
): SubagentExecutionPolicy {
|
|
14
|
+
const taskCount = Math.max(1, Math.floor(parallelTaskCount));
|
|
15
|
+
if (thinkingLevel === "ultra") {
|
|
16
|
+
return { unbounded: !executionBudgetExplicit, maxParallelTasks: undefined, concurrency: taskCount };
|
|
17
|
+
}
|
|
18
|
+
return { unbounded: false, maxParallelTasks: 8, concurrency: Math.min(4, taskCount) };
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function exceedsParallelTaskLimit(policy: SubagentExecutionPolicy, taskCount: number): boolean {
|
|
22
|
+
return policy.maxParallelTasks !== undefined && taskCount > policy.maxParallelTasks;
|
|
23
|
+
}
|
|
24
|
+
|
|
3
25
|
export interface TaskDemand {
|
|
4
26
|
readonly estimatedTokens: number;
|
|
5
27
|
readonly workUnits: number;
|
|
@@ -78,6 +100,7 @@ interface RecommendCutoffOptions {
|
|
|
78
100
|
readonly fallbackMs: number;
|
|
79
101
|
readonly minimumMs: number;
|
|
80
102
|
readonly maximumMs: number;
|
|
103
|
+
readonly predictedMs?: number;
|
|
81
104
|
}
|
|
82
105
|
|
|
83
106
|
const EXPLICIT_ACTION_LINE = /^\s*(?:\d+[.)]|\[[ xX]\])\s+(.+?)\s*$/;
|
|
@@ -216,7 +239,8 @@ export function recommendAttemptCutoff(profile: DeadlineProfile | undefined, opt
|
|
|
216
239
|
const candidates = [options.fallbackMs];
|
|
217
240
|
if (completed !== undefined) candidates.push(Math.round(completed * 1.5));
|
|
218
241
|
if (cutoff !== undefined) candidates.push(Math.round(cutoff * 0.75));
|
|
219
|
-
|
|
242
|
+
const recommendedMs = Math.max(options.predictedMs ?? 0, Math.min(...candidates));
|
|
243
|
+
return Math.max(options.minimumMs, Math.min(options.maximumMs, recommendedMs));
|
|
220
244
|
}
|
|
221
245
|
|
|
222
246
|
function extractActionUnit(line: string): string | undefined {
|
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
+
const expectedModel = process.env.OMK_EXPECTED_MODEL;
|
|
4
|
+
if (expectedModel) {
|
|
5
|
+
const modelIndex = process.argv.indexOf("--model");
|
|
6
|
+
const actualModel = modelIndex === -1 ? undefined : process.argv[modelIndex + 1];
|
|
7
|
+
if (actualModel !== expectedModel) {
|
|
8
|
+
process.stderr.write(`expected --model ${expectedModel}, received ${actualModel ?? "none"}\n`);
|
|
9
|
+
process.exit(2);
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
|
|
3
13
|
process.stdout.write(
|
|
4
14
|
`${JSON.stringify({
|
|
5
15
|
type: "message_end",
|