open-multi-agent-kit 0.95.0 → 0.95.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -0
- package/README.md +1 -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 +169 -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 +97 -29
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +583 -199
- 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-plan-cache-keys.d.ts.map +1 -1
- package/dist/core/context-budget-v2-plan-cache-keys.js +39 -5
- package/dist/core/context-budget-v2-plan-cache-keys.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.bak-sharedjiti-20260812-111246 +553 -0
- 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/headroom.d.ts.map +1 -1
- package/dist/core/headroom.js +7 -2
- package/dist/core/headroom.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/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/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/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/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 +39 -0
- package/dist/guardrails/replay-ledger-lock-owner.js.map +1 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +6 -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/docs/compaction.md +25 -3
- package/docs/containerization.md +14 -2
- package/docs/docs.json +8 -0
- package/docs/environment-variables.md +1 -1
- package/docs/extensions.md +75 -16
- package/docs/mcp.md +97 -0
- package/docs/metrics.md +87 -0
- package/docs/packages.md +25 -4
- package/docs/providers.md +1 -1
- package/docs/sdk.md +25 -4
- package/docs/settings.md +8 -7
- package/docs/usage.md +13 -3
- 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 +1 -3
- package/examples/extensions/subagent/agents/reviewer.md +1 -3
- package/examples/extensions/subagent/agents/scout.md +1 -3
- 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 +253 -439
- package/package.json +8 -8
package/docs/sdk.md
CHANGED
|
@@ -5,6 +5,7 @@
|
|
|
5
5
|
The SDK provides programmatic access to omk's agent capabilities. Use it to embed omk in other applications, build custom interfaces, or integrate with automated workflows.
|
|
6
6
|
|
|
7
7
|
**Example use cases:**
|
|
8
|
+
|
|
8
9
|
- Build a custom UI (web, desktop, mobile)
|
|
9
10
|
- Integrate agent capabilities into existing applications
|
|
10
11
|
- Create automated pipelines with agent reasoning
|
|
@@ -112,6 +113,7 @@ interface AgentSession {
|
|
|
112
113
|
thinkingLevel: ThinkingLevel;
|
|
113
114
|
messages: AgentMessage[];
|
|
114
115
|
isStreaming: boolean;
|
|
116
|
+
getSessionStats(): SessionStats;
|
|
115
117
|
|
|
116
118
|
// In-place tree navigation within the current session file
|
|
117
119
|
navigateTree(targetId: string, options?: { summarize?: boolean; customInstructions?: string; replaceInstructions?: boolean; label?: string }): Promise<{ editorText?: string; cancelled: boolean }>;
|
|
@@ -128,6 +130,8 @@ interface AgentSession {
|
|
|
128
130
|
}
|
|
129
131
|
```
|
|
130
132
|
|
|
133
|
+
`getSessionStats()` returns message, token, and cost totals. Its `promptCache` field includes provider-eligible input tokens, provider hit rate (`cacheRead / (input + cacheRead + cacheWrite)`), stable-prefix characters, cache-key changes, boundary bypasses, and the last local break reason. These values diagnose cache-affinity changes; only provider-reported `cacheRead` proves a hit.
|
|
134
|
+
|
|
131
135
|
Session replacement APIs such as new-session, resume, fork, and import live on `AgentSessionRuntime`, not on `AgentSession`.
|
|
132
136
|
|
|
133
137
|
### createAgentSessionRuntime() and AgentSessionRuntime
|
|
@@ -250,6 +254,7 @@ await session.prompt("After you're done, also check X", { streamingBehavior: "fo
|
|
|
250
254
|
```
|
|
251
255
|
|
|
252
256
|
**Behavior:**
|
|
257
|
+
|
|
253
258
|
- **Extension commands** (e.g., `/mycommand`): Execute immediately, even during streaming. They manage their own LLM interaction via `omk.sendMessage()`.
|
|
254
259
|
- **File-based prompt templates** (from `.md` files): Expanded to their content before sending or queueing.
|
|
255
260
|
- **During streaming without `streamingBehavior`**: Throws an error. Use `steer()` or `followUp()` directly, or specify the option.
|
|
@@ -280,6 +285,8 @@ const state = session.agent.state;
|
|
|
280
285
|
// state.model: Model - current model
|
|
281
286
|
// state.thinkingLevel: ThinkingLevel - current thinking level
|
|
282
287
|
// state.systemPrompt: string - system prompt
|
|
288
|
+
// state.systemPromptCacheBoundary?: number - stable-prefix UTF-16 offset
|
|
289
|
+
// state.systemPromptCacheBoundaryBypass?: boolean - suppress explicit cache affinity/markers
|
|
283
290
|
// state.tools: AgentTool[] - available tools
|
|
284
291
|
// state.streamingMessage?: AgentMessage - current partial assistant message
|
|
285
292
|
// state.errorMessage?: string - latest assistant error
|
|
@@ -294,6 +301,8 @@ session.agent.state.tools = tools; // copies the top-level array
|
|
|
294
301
|
await session.agent.waitForIdle();
|
|
295
302
|
```
|
|
296
303
|
|
|
304
|
+
The cache boundary must be a positive safe integer no greater than `systemPrompt.length`. Missing, invalid, or bypassed boundaries suppress explicit stable-prefix cache metadata. Providers may still ignore valid metadata, so inspect provider usage before claiming a hit.
|
|
305
|
+
|
|
297
306
|
### Events
|
|
298
307
|
|
|
299
308
|
Subscribe to events to receive streaming output and lifecycle notifications.
|
|
@@ -380,6 +389,7 @@ const { session } = await createAgentSession({
|
|
|
380
389
|
```
|
|
381
390
|
|
|
382
391
|
`cwd` is used by `DefaultResourceLoader` for:
|
|
392
|
+
|
|
383
393
|
- Project extensions (`.omk/extensions/`)
|
|
384
394
|
- Project skills:
|
|
385
395
|
- `.omk/skills/`
|
|
@@ -389,6 +399,7 @@ const { session } = await createAgentSession({
|
|
|
389
399
|
- Session directory naming
|
|
390
400
|
|
|
391
401
|
`agentDir` is used by `DefaultResourceLoader` for:
|
|
402
|
+
|
|
392
403
|
- Global extensions (`extensions/`)
|
|
393
404
|
- Global skills:
|
|
394
405
|
- `skills/` under `agentDir` (for example `~/.omk/agent/skills/`)
|
|
@@ -438,6 +449,7 @@ const { session } = await createAgentSession({
|
|
|
438
449
|
```
|
|
439
450
|
|
|
440
451
|
If no model is provided:
|
|
452
|
+
|
|
441
453
|
1. Tries to restore from session (if continuing)
|
|
442
454
|
2. Uses default from settings
|
|
443
455
|
3. Falls back to first available model
|
|
@@ -447,6 +459,7 @@ If no model is provided:
|
|
|
447
459
|
### API Keys and OAuth
|
|
448
460
|
|
|
449
461
|
API key resolution priority (handled by AuthStorage):
|
|
462
|
+
|
|
450
463
|
1. Runtime overrides (via `setRuntimeApiKey`, not persisted)
|
|
451
464
|
2. Stored credentials in `auth.json` (API keys or OAuth tokens)
|
|
452
465
|
3. Environment variables (`ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, etc.)
|
|
@@ -499,6 +512,8 @@ await loader.reload();
|
|
|
499
512
|
const { session } = await createAgentSession({ resourceLoader: loader });
|
|
500
513
|
```
|
|
501
514
|
|
|
515
|
+
OMK records a stable cache boundary before loaded context files, selected skill content, the date, and the working directory. A turn-level extension that replaces the built prompt bypasses explicit stable-prefix caching unless it returns the prompt unchanged. See [Compaction & Branch Summarization](compaction.md#context-reduction-and-prompt-caching) for provider behavior and diagnostics.
|
|
516
|
+
|
|
502
517
|
> See [examples/sdk/03-custom-prompt.ts](../examples/sdk/03-custom-prompt.ts)
|
|
503
518
|
|
|
504
519
|
### Tools
|
|
@@ -847,12 +862,14 @@ const { session } = await createAgentSession({
|
|
|
847
862
|
```
|
|
848
863
|
|
|
849
864
|
**Static factories:**
|
|
865
|
+
|
|
850
866
|
- `SettingsManager.create(cwd?, agentDir?)` - Load from files
|
|
851
867
|
- `SettingsManager.inMemory(settings?)` - No file I/O
|
|
852
868
|
|
|
853
869
|
**Project-specific settings:**
|
|
854
870
|
|
|
855
871
|
Settings load from two locations and merge:
|
|
872
|
+
|
|
856
873
|
1. Global: `~/.omk/agent/settings.json`
|
|
857
874
|
2. Project: `<cwd>/.omk/settings.json`
|
|
858
875
|
|
|
@@ -1120,12 +1137,14 @@ omk --mode rpc --no-session
|
|
|
1120
1137
|
See [RPC documentation](rpc.md) for the JSON protocol.
|
|
1121
1138
|
|
|
1122
1139
|
The SDK is preferred when:
|
|
1140
|
+
|
|
1123
1141
|
- You want type safety
|
|
1124
1142
|
- You're in the same Node.js process
|
|
1125
1143
|
- You need direct access to agent state
|
|
1126
1144
|
- You want to customize tools/extensions programmatically
|
|
1127
1145
|
|
|
1128
1146
|
RPC mode is preferred when:
|
|
1147
|
+
|
|
1129
1148
|
- You're integrating from another language
|
|
1130
1149
|
- You want process isolation
|
|
1131
1150
|
- You're building a language-agnostic client
|
|
@@ -1134,14 +1153,16 @@ RPC mode is preferred when:
|
|
|
1134
1153
|
|
|
1135
1154
|
Execution-bound evidence records a declared verification command and reported outcome between two artifact-set snapshots, then binds that record to a tamper-evident ledger. `VerifiedEvidenceExecutor` never executes the declared command. `executeVerifiedBash()` invokes caller-supplied `BashOperations`; `executeVerifiedLocalBash()` derives the shell identity and runner from OMK's built-in local backend.
|
|
1136
1155
|
|
|
1137
|
-
**Default path (opt-out):** when an AgentSession has a replay ledger (persisted sessions create one automatically), LLM-callable `bash` and interactive/RPC `executeBash` bind through `executeVerifiedBash` with `executor: "bash-tool"` and receipts under `<sessionFile>.evidence/receipts` (or `cwd/.omk/session-evidence/<goalId>/receipts` for ephemeral sessions). Session workspace scope is git-aware: inside a worktree, the receipt binds the toplevel plus
|
|
1156
|
+
**Default path (opt-out):** when an AgentSession has a replay ledger (persisted sessions create one automatically), LLM-callable `bash` and interactive/RPC `executeBash` bind through `executeVerifiedBash` with `executor: "bash-tool"` and receipts under `<sessionFile>.evidence/receipts` (or `cwd/.omk/session-evidence/<goalId>/receipts` for ephemeral sessions). Session workspace scope is git-aware: inside a worktree, the receipt binds the toplevel plus up to 32 sorted dirty file paths (1 s TTL). Git status expands ordinary untracked directories to files; untracked nested repositories remain outside the parent scope. Set `OMK_VERIFIED_BASH=0` to restore the legacy unverified path. Custom `createBashTool()` calls stay unverified unless the caller wraps operations with `createVerifiedBashOperations()`. CI still runs release-consistency through `executeVerifiedLocalBash()` with `executor: "ci-runner"`.
|
|
1157
|
+
|
|
1158
|
+
**Default sandbox (opt-out):** session bash defaults to `enforce`. Every built-in local spawn is wrapped by macOS `sandbox-exec` or Linux `bwrap`, writes are limited to the session workspace and OS temp directory, and network access is disabled. If the platform is unsupported or the backend is unavailable, the spawn fails closed with `sandbox.backend_missing`. Set `OMK_BASH_SANDBOX=audit` only for an unwrapped compatibility path that records each decision as a `sandbox_audit` replay event; set `OMK_BASH_SANDBOX=0` to disable the preflight entirely. Unknown values resolve to `enforce`.
|
|
1138
1159
|
|
|
1139
|
-
|
|
1160
|
+
This boundary applies to AgentSession's built-in local bash operations. Custom `createBashTool()` calls remain unsandboxed unless they receive a `sandboxPolicy`, and injected or remote `BashOperations` own their own isolation. The default workspace-write profile is not a read-confidentiality boundary or whole-process container; use [Containerization](containerization.md) when every tool and extension must be isolated.
|
|
1140
1161
|
|
|
1141
1162
|
### Recorded and invoked inputs
|
|
1142
1163
|
|
|
1143
1164
|
| Input | SDK behavior |
|
|
1144
|
-
|
|
1165
|
+
| ------- | -------------- |
|
|
1145
1166
|
| `request.command` (`EvidenceCommandDescriptor`) | Validates, hashes, and records the structured descriptor; never executes it |
|
|
1146
1167
|
| `request.executor` (`"bash-tool" \| "ci-runner" \| "mcp" \| "internal"`) | Records a label only |
|
|
1147
1168
|
| `request.workspaceScope` (`WorkspaceScope`) | Captures the selected artifact set before and after the callback |
|
|
@@ -1196,7 +1217,7 @@ Ledger and receipt publication are fail-closed but not one filesystem transactio
|
|
|
1196
1217
|
`EvidenceGate` (default `receiptMode: "prefer"`) gates a `TaskContract` against its satisfied receipts. Pass `executor.createGateOptions()` so the gate resolves receipts, ledger events, and workspace fingerprints from the same store and ledger.
|
|
1197
1218
|
|
|
1198
1219
|
| Mode | Soft missing data | Tamper-grade mismatch | Legacy `hash` / `command` |
|
|
1199
|
-
|
|
1220
|
+
| ------ | ------------------- | ----------------------- | ---------------------------- |
|
|
1200
1221
|
| `strict` | blocked | blocked | n/a |
|
|
1201
1222
|
| `prefer` (default) | conditional | blocked | n/a |
|
|
1202
1223
|
| `legacy` | receipt checks skipped | receipt checks skipped | checked by legacy options (enabled by default) |
|
package/docs/settings.md
CHANGED
|
@@ -17,7 +17,7 @@ Edit directly or use `/settings` for common options.
|
|
|
17
17
|
| --------- | ------ | --------- | ------------- |
|
|
18
18
|
| `defaultProvider` | string | - | Default provider (e.g., `"anthropic"`, `"openai"`) |
|
|
19
19
|
| `defaultModel` | string | - | Default model ID |
|
|
20
|
-
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"` |
|
|
20
|
+
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"`, `"max"`, `"ultra"` |
|
|
21
21
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
22
22
|
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
23
23
|
| `reasoningRouterLearning` | object | - | Opt-in v4 router learning bias (global settings file only) |
|
|
@@ -41,16 +41,16 @@ Edit directly or use `/settings` for common options.
|
|
|
41
41
|
```json
|
|
42
42
|
{
|
|
43
43
|
"reasoningRouterLearning": {
|
|
44
|
-
"enabled": false
|
|
45
|
-
"biasSnapshotPath": "~/.omk/agent/router-bias.json",
|
|
46
|
-
"feedbackLedgerPath": "~/.omk/agent/router-feedback.jsonl"
|
|
44
|
+
"enabled": false
|
|
47
45
|
}
|
|
48
46
|
}
|
|
49
47
|
```
|
|
50
48
|
|
|
49
|
+
This opt-in remains global-only, but its default data is isolated per repository or git worktree under `~/.omk/agent/router-feedback/repositories/<opaque-scope>/`. The scope is derived from the canonical worktree root and never stores the raw path. Set `biasSnapshotPath` or `feedbackLedgerPath` only when intentionally overriding that isolation with fixed paths.
|
|
50
|
+
|
|
51
51
|
#### adaptorchBridge
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
Global-only, default-off lifecycle for a future v4 advisory source. The timeout, TTL, consult-budget, and circuit-breaker controls are wired, but the current transport is a no-op and cannot change the resolved level. A project-scope `.omk/settings.json` value is ignored by design.
|
|
54
54
|
|
|
55
55
|
```json
|
|
56
56
|
{
|
|
@@ -70,7 +70,8 @@ Advisory-only hint source for the v4 auto thinking-level resolver. Read from the
|
|
|
70
70
|
| --------- | ------ | --------- | ------------- |
|
|
71
71
|
| `theme` | string | `"dark"` | Theme name (`"dark"`, `"light"`, or custom) |
|
|
72
72
|
| `quietStartup` | boolean | `false` | Hide startup header |
|
|
73
|
-
| `collapseChangelog` | boolean | `
|
|
73
|
+
| `collapseChangelog` | boolean | `true` | Show condensed changelog after updates (set `false` for the full "What's New" block) |
|
|
74
|
+
| `footerSystemMetrics` | boolean | `false` | Show system-wide CPU/MEM usage in the footer stats line |
|
|
74
75
|
| `enableInstallTelemetry` | boolean | `true` | Send an anonymous install/update version ping after first install or changelog-detected updates. This does not control update checks |
|
|
75
76
|
| `doubleEscapeAction` | string | `"tree"` | Action for double-escape: `"tree"`, `"fork"`, or `"none"` |
|
|
76
77
|
| `treeFilterMode` | string | `"default"` | Default filter for `/tree`: `"default"`, `"no-tools"`, `"user-only"`, `"labeled-only"`, `"all"` |
|
|
@@ -156,7 +157,7 @@ This setting is global-only: `.omk/settings.json` cannot enable or disable it. U
|
|
|
156
157
|
| `agent.toolTimeoutMs` | number | `0` | Fallback tool execution timeout in milliseconds; `0` disables the fallback timer |
|
|
157
158
|
| `agent.toolTimeouts` | object | built-in defaults | Per-tool-name timeout overrides; `0` disables that tool's timer |
|
|
158
159
|
|
|
159
|
-
Built-in defaults are 30 seconds for `read`, `grep`, `find`, and `ls`; 60 seconds for `edit` and `write`; and 300 seconds for `bash`. Explicit `agent.toolTimeouts` entries override these defaults. Extension
|
|
160
|
+
Built-in defaults are 30 seconds for `read`, `grep`, `find`, and `ls`; 60 seconds for `edit` and `write`; and 300 seconds for `bash`. Explicit `agent.toolTimeouts` entries override these defaults. Extension tools may override settings per call with `resolveTimeoutMs(ctx)`; otherwise custom tools without a per-name value use `agent.toolTimeoutMs`. Timeout values must be integer milliseconds from `0` through `2147483647`.
|
|
160
161
|
|
|
161
162
|
```json
|
|
162
163
|
{
|
package/docs/usage.md
CHANGED
|
@@ -87,9 +87,19 @@ Precedence:
|
|
|
87
87
|
|
|
88
88
|
Resolved levels are clamped to the model's capabilities: models without `xhigh`/`max` are capped at their highest supported level, and models without reasoning support bypass the router entirely.
|
|
89
89
|
|
|
90
|
-
The v4 learning path is available only through the global `reasoningRouterLearning` setting and is off by default. When
|
|
90
|
+
The v4 learning path is available only through the global `reasoningRouterLearning` setting and is off by default. When enabled, `/think auto` loads one validated, session-pinned bias snapshot, applies a bounded `-2..2` ladder-step bias, and appends a privacy-safe record containing only bounded enums, booleans, and buckets. A later explicit `/think <level>` choice adds one directional `s1-override` record for the same decision. Project-local settings cannot enable the feature, and records never contain raw prompts, repository paths, diffs, session identifiers, provider payloads, tool output, or hook output.
|
|
91
91
|
|
|
92
|
-
|
|
92
|
+
Default ledgers and snapshots are isolated by an opaque hash of the canonical repository or git worktree root. Compile the current repository's accumulated records between sessions:
|
|
93
|
+
|
|
94
|
+
```bash
|
|
95
|
+
omk router-feedback compile-bias --cwd /path/to/repository
|
|
96
|
+
```
|
|
97
|
+
|
|
98
|
+
Compilation is deterministic. It creates a randomized same-directory temporary file exclusively, enforces POSIX mode `0600`, then atomically renames it over the snapshot; this is atomic replacement, not `fsync`-backed crash durability, and explicit output paths should use a trusted directory. Snapshot loading fails closed on malformed or internally inconsistent cells, including any nonzero bias backed by fewer than five strong records. A session pins either a snapshot or a miss on its first learning-enabled auto turn, so later compilations are observed only by sessions that have not yet attempted that load. Fixed `biasSnapshotPath` or `feedbackLedgerPath` session settings remain explicit compatibility overrides and can intentionally share state across repositories; pass matching `--out` or `--ledger` paths to the compiler when using them.
|
|
99
|
+
|
|
100
|
+
The ledger intentionally keeps causal buckets instead of free-form memories or raw trajectories. This follows CLIN's causal-abstraction approach ([arXiv:2310.10134](https://arxiv.org/abs/2310.10134)) and session-boundary updates from the Red Queen Gödel Machine ([arXiv:2606.26294](https://arxiv.org/abs/2606.26294)); CTIM-Rover found that repository-level episodic memories could add distracting noise and failed to improve its base coding agent ([arXiv:2505.23422](https://arxiv.org/abs/2505.23422)).
|
|
101
|
+
|
|
102
|
+
The Adaptorch advisory bridge is also global-only and default-off. Its timeout, TTL, consult-budget, and circuit-breaker lifecycle is wired, but the current advisory transport is a no-op and cannot change the router level.
|
|
93
103
|
|
|
94
104
|
## Message Queue
|
|
95
105
|
|
|
@@ -242,7 +252,7 @@ cat README.md | omk -p "Summarize this text"
|
|
|
242
252
|
| `--provider <name>` | Provider, such as `anthropic`, `openai`, or `google` |
|
|
243
253
|
| `--model <pattern>` | Model pattern or ID; supports `provider/id` and optional `:<thinking>` |
|
|
244
254
|
| `--api-key <key>` | API key, overriding environment variables |
|
|
245
|
-
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh` |
|
|
255
|
+
| `--thinking <level>` | `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`, `ultra` |
|
|
246
256
|
| `--models <patterns>` | Comma-separated patterns for Ctrl+P cycling |
|
|
247
257
|
| `--list-models [search]` | List available models |
|
|
248
258
|
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-custom-provider-anthropic",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-custom-provider-anthropic",
|
|
9
|
-
"version": "0.95.
|
|
9
|
+
"version": "0.95.2",
|
|
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": "0.95.
|
|
3
|
+
"version": "0.95.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-gondolin",
|
|
9
|
-
"version": "0.95.
|
|
9
|
+
"version": "0.95.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@earendil-works/gondolin": "0.12.0"
|
|
12
12
|
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import { readFileSync, realpathSync, statSync } from "node:fs";
|
|
2
|
+
import { isAbsolute, join, relative, resolve, sep } from "node:path";
|
|
3
|
+
import {
|
|
4
|
+
ApprovalReceiptStore,
|
|
5
|
+
type ExtensionAPI,
|
|
6
|
+
type ExtensionCommandContext,
|
|
7
|
+
type ExtensionContext,
|
|
8
|
+
PlannotatorApprovalBridge,
|
|
9
|
+
} from "open-multi-agent-kit";
|
|
10
|
+
|
|
11
|
+
interface LoadedPlan {
|
|
12
|
+
path: string;
|
|
13
|
+
content: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
function loadWorkspacePlan(cwd: string, input: string): LoadedPlan {
|
|
17
|
+
const workspaceRoot = realpathSync(cwd);
|
|
18
|
+
const planPath = realpathSync(resolve(workspaceRoot, input));
|
|
19
|
+
const relativePath = relative(workspaceRoot, planPath);
|
|
20
|
+
if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${sep}`) || isAbsolute(relativePath)) {
|
|
21
|
+
throw new Error("Plan must be a file inside the current workspace");
|
|
22
|
+
}
|
|
23
|
+
if (!statSync(planPath).isFile()) throw new Error("Plan must be a regular file");
|
|
24
|
+
return { path: relativePath.split(sep).join("/"), content: readFileSync(planPath, "utf8") };
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export default function plannotatorApprovalBridgeExtension(omk: ExtensionAPI): void {
|
|
28
|
+
let bridge: PlannotatorApprovalBridge | undefined;
|
|
29
|
+
|
|
30
|
+
function initializeBridge(ctx: ExtensionContext): void {
|
|
31
|
+
bridge?.dispose();
|
|
32
|
+
bridge = new PlannotatorApprovalBridge({
|
|
33
|
+
eventBus: omk.events,
|
|
34
|
+
store: new ApprovalReceiptStore(join(ctx.sessionManager.getSessionDir(), "approval-receipts")),
|
|
35
|
+
workspaceRoot: ctx.cwd,
|
|
36
|
+
sessionId: ctx.sessionManager.getSessionId(),
|
|
37
|
+
interactive: ctx.mode === "tui" && ctx.hasUI,
|
|
38
|
+
requestTimeoutMs: 5_000,
|
|
39
|
+
onReceipt: (receipt, write) => {
|
|
40
|
+
omk.appendEntry("approval-receipt-v1", receipt);
|
|
41
|
+
ctx.ui.notify(
|
|
42
|
+
`Approval ${receipt.core.decision}; immutable receipt ${write.created ? "created" : "verified"}. No execution was started.`,
|
|
43
|
+
receipt.core.decision === "approved" ? "info" : "warning",
|
|
44
|
+
);
|
|
45
|
+
},
|
|
46
|
+
onError: () => ctx.ui.notify("Ignored an invalid or uncorrelated Plannotator event.", "warning"),
|
|
47
|
+
});
|
|
48
|
+
bridge.start();
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
omk.on("session_start", async (_event, ctx) => initializeBridge(ctx));
|
|
52
|
+
omk.on("session_shutdown", async () => {
|
|
53
|
+
bridge?.dispose();
|
|
54
|
+
bridge = undefined;
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
omk.registerCommand("approval-review", {
|
|
58
|
+
description: "Review a workspace plan with Plannotator and persist a non-executing approval receipt",
|
|
59
|
+
handler: async (args: string, ctx: ExtensionCommandContext) => {
|
|
60
|
+
if (ctx.mode !== "tui" || !ctx.hasUI) {
|
|
61
|
+
ctx.ui.notify("Approval review requires interactive TUI mode.", "error");
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
if (!bridge) initializeBridge(ctx);
|
|
65
|
+
const input = args.trim();
|
|
66
|
+
if (!input) {
|
|
67
|
+
ctx.ui.notify("Usage: /approval-review <workspace-relative-plan.md>", "warning");
|
|
68
|
+
return;
|
|
69
|
+
}
|
|
70
|
+
try {
|
|
71
|
+
const plan = loadWorkspacePlan(ctx.cwd, input);
|
|
72
|
+
const correlation = await bridge?.requestReview({ planPath: plan.path, planContent: plan.content });
|
|
73
|
+
if (!correlation) throw new Error("Approval bridge is unavailable");
|
|
74
|
+
ctx.ui.notify(
|
|
75
|
+
`Plannotator review opened (${correlation.reviewId}); waiting for an explicit decision.`,
|
|
76
|
+
"info",
|
|
77
|
+
);
|
|
78
|
+
} catch {
|
|
79
|
+
ctx.ui.notify("Approval review failed. Confirm the plan path and that Plannotator is loaded.", "error");
|
|
80
|
+
}
|
|
81
|
+
},
|
|
82
|
+
});
|
|
83
|
+
}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omk-extension-sandbox",
|
|
3
|
-
"version": "0.95.
|
|
3
|
+
"version": "0.95.2",
|
|
4
4
|
"lockfileVersion": 3,
|
|
5
5
|
"requires": true,
|
|
6
6
|
"packages": {
|
|
7
7
|
"": {
|
|
8
8
|
"name": "omk-extension-sandbox",
|
|
9
|
-
"version": "0.95.
|
|
9
|
+
"version": "0.95.2",
|
|
10
10
|
"dependencies": {
|
|
11
11
|
"@anthropic-ai/sandbox-runtime": "0.0.26"
|
|
12
12
|
}
|
|
@@ -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.
|
|
@@ -10,7 +8,7 @@ You are a planning specialist. You receive context (from a scout) and requiremen
|
|
|
10
8
|
You must NOT make any changes. Only read, analyze, and plan.
|
|
11
9
|
|
|
12
10
|
Assigned capabilities (see ~/.omk/agent/SUBAGENTS.md for the full routing reference):
|
|
13
|
-
- Skills: ulw-plan
|
|
11
|
+
- Skills: ulw-plan, packages, deep-interview
|
|
14
12
|
|
|
15
13
|
Input format you'll receive:
|
|
16
14
|
- Context/findings from a scout agent
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: reviewer
|
|
3
3
|
description: Code review specialist for quality and security analysis
|
|
4
|
-
tools: read, grep, find, ls, bash
|
|
5
|
-
model: claude-sonnet-4-5
|
|
6
4
|
---
|
|
7
5
|
|
|
8
6
|
You are a senior code reviewer. Analyze code for quality, security, and maintainability.
|
|
@@ -11,7 +9,7 @@ Bash is for read-only commands only: `git diff`, `git log`, `git show`. Do NOT m
|
|
|
11
9
|
Assume tool permissions are not perfectly enforceable; keep all bash usage strictly read-only.
|
|
12
10
|
|
|
13
11
|
Assigned capabilities (see ~/.omk/agent/SUBAGENTS.md for the full routing reference):
|
|
14
|
-
- Skills: review-work
|
|
12
|
+
- Skills: review-work, security-review
|
|
15
13
|
|
|
16
14
|
Strategy:
|
|
17
15
|
1. Run `git diff` to see recent changes (if applicable)
|
|
@@ -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.
|
|
@@ -10,7 +8,7 @@ You are a scout. Quickly investigate a codebase and return structured findings t
|
|
|
10
8
|
Your output will be passed to an agent who has NOT seen the files you explored.
|
|
11
9
|
|
|
12
10
|
Assigned capabilities (see ~/.omk/agent/SUBAGENTS.md for the full routing reference):
|
|
13
|
-
- Skills: understand-anything
|
|
11
|
+
- Skills: understand-anything, ast-grep, headroom
|
|
14
12
|
|
|
15
13
|
Thoroughness (infer from task, default medium):
|
|
16
14
|
- Quick: Targeted lookups, key files only
|
|
@@ -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
|
+
});
|