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.
Files changed (281) hide show
  1. package/CHANGELOG.md +33 -0
  2. package/README.md +1 -1
  3. package/dist/approvals/approval-receipt-store.d.ts +18 -0
  4. package/dist/approvals/approval-receipt-store.d.ts.map +1 -0
  5. package/dist/approvals/approval-receipt-store.js +169 -0
  6. package/dist/approvals/approval-receipt-store.js.map +1 -0
  7. package/dist/approvals/approval-receipt.d.ts +43 -0
  8. package/dist/approvals/approval-receipt.d.ts.map +1 -0
  9. package/dist/approvals/approval-receipt.js +208 -0
  10. package/dist/approvals/approval-receipt.js.map +1 -0
  11. package/dist/approvals/approval-verifier.d.ts +17 -0
  12. package/dist/approvals/approval-verifier.d.ts.map +1 -0
  13. package/dist/approvals/approval-verifier.js +23 -0
  14. package/dist/approvals/approval-verifier.js.map +1 -0
  15. package/dist/approvals/plannotator-approval-bridge.d.ts +58 -0
  16. package/dist/approvals/plannotator-approval-bridge.d.ts.map +1 -0
  17. package/dist/approvals/plannotator-approval-bridge.js +169 -0
  18. package/dist/approvals/plannotator-approval-bridge.js.map +1 -0
  19. package/dist/cli/args.d.ts.map +1 -1
  20. package/dist/cli/args.js +2 -0
  21. package/dist/cli/args.js.map +1 -1
  22. package/dist/commands/package-doctor-cli.d.ts +13 -0
  23. package/dist/commands/package-doctor-cli.d.ts.map +1 -0
  24. package/dist/commands/package-doctor-cli.js +80 -0
  25. package/dist/commands/package-doctor-cli.js.map +1 -0
  26. package/dist/commands/router-feedback-cli.d.ts +11 -0
  27. package/dist/commands/router-feedback-cli.d.ts.map +1 -0
  28. package/dist/commands/router-feedback-cli.js +99 -0
  29. package/dist/commands/router-feedback-cli.js.map +1 -0
  30. package/dist/commands/stats-cli.d.ts +20 -0
  31. package/dist/commands/stats-cli.d.ts.map +1 -0
  32. package/dist/commands/stats-cli.js +99 -0
  33. package/dist/commands/stats-cli.js.map +1 -0
  34. package/dist/core/agent-session-runtime.d.ts.map +1 -1
  35. package/dist/core/agent-session-runtime.js +4 -1
  36. package/dist/core/agent-session-runtime.js.map +1 -1
  37. package/dist/core/agent-session.d.ts +97 -29
  38. package/dist/core/agent-session.d.ts.map +1 -1
  39. package/dist/core/agent-session.js +583 -199
  40. package/dist/core/agent-session.js.map +1 -1
  41. package/dist/core/bash-executor.d.ts.map +1 -1
  42. package/dist/core/bash-executor.js +8 -2
  43. package/dist/core/bash-executor.js.map +1 -1
  44. package/dist/core/compaction/transaction.d.ts +9 -0
  45. package/dist/core/compaction/transaction.d.ts.map +1 -1
  46. package/dist/core/compaction/transaction.js +17 -2
  47. package/dist/core/compaction/transaction.js.map +1 -1
  48. package/dist/core/context-budget-governor-v2.d.ts +1 -1
  49. package/dist/core/context-budget-governor-v2.d.ts.map +1 -1
  50. package/dist/core/context-budget-governor-v2.js +1 -1
  51. package/dist/core/context-budget-governor-v2.js.map +1 -1
  52. package/dist/core/context-budget-system-prompt.d.ts.map +1 -1
  53. package/dist/core/context-budget-system-prompt.js +18 -2
  54. package/dist/core/context-budget-system-prompt.js.map +1 -1
  55. package/dist/core/context-budget-v2-cache-disk.d.ts +109 -0
  56. package/dist/core/context-budget-v2-cache-disk.d.ts.map +1 -0
  57. package/dist/core/context-budget-v2-cache-disk.js +343 -0
  58. package/dist/core/context-budget-v2-cache-disk.js.map +1 -0
  59. package/dist/core/context-budget-v2-cache-keys.d.ts +22 -0
  60. package/dist/core/context-budget-v2-cache-keys.d.ts.map +1 -1
  61. package/dist/core/context-budget-v2-cache-keys.js +4 -4
  62. package/dist/core/context-budget-v2-cache-keys.js.map +1 -1
  63. package/dist/core/context-budget-v2-cache.d.ts +1 -0
  64. package/dist/core/context-budget-v2-cache.d.ts.map +1 -1
  65. package/dist/core/context-budget-v2-cache.js +1 -0
  66. package/dist/core/context-budget-v2-cache.js.map +1 -1
  67. package/dist/core/context-budget-v2-plan-cache-keys.d.ts.map +1 -1
  68. package/dist/core/context-budget-v2-plan-cache-keys.js +39 -5
  69. package/dist/core/context-budget-v2-plan-cache-keys.js.map +1 -1
  70. package/dist/core/context-budget-v2-planner.d.ts.map +1 -1
  71. package/dist/core/context-budget-v2-planner.js +17 -14
  72. package/dist/core/context-budget-v2-planner.js.map +1 -1
  73. package/dist/core/context-budget-v2-types.d.ts +1 -0
  74. package/dist/core/context-budget-v2-types.d.ts.map +1 -1
  75. package/dist/core/context-budget-v2-types.js.map +1 -1
  76. package/dist/core/extensions/loader.d.ts.map +1 -1
  77. package/dist/core/extensions/loader.js +45 -22
  78. package/dist/core/extensions/loader.js.bak-sharedjiti-20260812-111246 +553 -0
  79. package/dist/core/extensions/loader.js.map +1 -1
  80. package/dist/core/extensions/types.d.ts +4 -0
  81. package/dist/core/extensions/types.d.ts.map +1 -1
  82. package/dist/core/extensions/types.js.map +1 -1
  83. package/dist/core/headroom.d.ts.map +1 -1
  84. package/dist/core/headroom.js +7 -2
  85. package/dist/core/headroom.js.map +1 -1
  86. package/dist/core/mcp/client.d.ts +105 -0
  87. package/dist/core/mcp/client.d.ts.map +1 -0
  88. package/dist/core/mcp/client.js +198 -0
  89. package/dist/core/mcp/client.js.map +1 -0
  90. package/dist/core/mcp/config.d.ts +23 -0
  91. package/dist/core/mcp/config.d.ts.map +1 -0
  92. package/dist/core/mcp/config.js +89 -0
  93. package/dist/core/mcp/config.js.map +1 -0
  94. package/dist/core/mcp/index.d.ts +15 -0
  95. package/dist/core/mcp/index.d.ts.map +1 -0
  96. package/dist/core/mcp/index.js +15 -0
  97. package/dist/core/mcp/index.js.map +1 -0
  98. package/dist/core/mcp/manager.d.ts +84 -0
  99. package/dist/core/mcp/manager.d.ts.map +1 -0
  100. package/dist/core/mcp/manager.js +173 -0
  101. package/dist/core/mcp/manager.js.map +1 -0
  102. package/dist/core/mcp/protocol.d.ts +59 -0
  103. package/dist/core/mcp/protocol.d.ts.map +1 -0
  104. package/dist/core/mcp/protocol.js +103 -0
  105. package/dist/core/mcp/protocol.js.map +1 -0
  106. package/dist/core/mcp/stdio-transport.d.ts +63 -0
  107. package/dist/core/mcp/stdio-transport.d.ts.map +1 -0
  108. package/dist/core/mcp/stdio-transport.js +132 -0
  109. package/dist/core/mcp/stdio-transport.js.map +1 -0
  110. package/dist/core/mcp/tools.d.ts +47 -0
  111. package/dist/core/mcp/tools.d.ts.map +1 -0
  112. package/dist/core/mcp/tools.js +102 -0
  113. package/dist/core/mcp/tools.js.map +1 -0
  114. package/dist/core/package-archive.d.ts +3 -0
  115. package/dist/core/package-archive.d.ts.map +1 -0
  116. package/dist/core/package-archive.js +161 -0
  117. package/dist/core/package-archive.js.map +1 -0
  118. package/dist/core/package-doctor-source-scan.d.ts +13 -0
  119. package/dist/core/package-doctor-source-scan.d.ts.map +1 -0
  120. package/dist/core/package-doctor-source-scan.js +124 -0
  121. package/dist/core/package-doctor-source-scan.js.map +1 -0
  122. package/dist/core/package-doctor.d.ts +41 -0
  123. package/dist/core/package-doctor.d.ts.map +1 -0
  124. package/dist/core/package-doctor.js +145 -0
  125. package/dist/core/package-doctor.js.map +1 -0
  126. package/dist/core/package-manager.d.ts +10 -1
  127. package/dist/core/package-manager.d.ts.map +1 -1
  128. package/dist/core/package-manager.js +175 -42
  129. package/dist/core/package-manager.js.map +1 -1
  130. package/dist/core/package-manifest.d.ts +26 -0
  131. package/dist/core/package-manifest.d.ts.map +1 -0
  132. package/dist/core/package-manifest.js +85 -0
  133. package/dist/core/package-manifest.js.map +1 -0
  134. package/dist/core/pi-compat.d.ts +5 -0
  135. package/dist/core/pi-compat.d.ts.map +1 -0
  136. package/dist/core/pi-compat.js +18 -0
  137. package/dist/core/pi-compat.js.map +1 -0
  138. package/dist/core/reasoning-router-bias.d.ts +10 -14
  139. package/dist/core/reasoning-router-bias.d.ts.map +1 -1
  140. package/dist/core/reasoning-router-bias.js +22 -15
  141. package/dist/core/reasoning-router-bias.js.map +1 -1
  142. package/dist/core/reasoning-router-v4.d.ts +9 -1
  143. package/dist/core/reasoning-router-v4.d.ts.map +1 -1
  144. package/dist/core/reasoning-router-v4.js +20 -5
  145. package/dist/core/reasoning-router-v4.js.map +1 -1
  146. package/dist/core/redaction.d.ts +2 -5
  147. package/dist/core/redaction.d.ts.map +1 -1
  148. package/dist/core/redaction.js +14 -1
  149. package/dist/core/redaction.js.map +1 -1
  150. package/dist/core/repository-learning-scope.d.ts +10 -0
  151. package/dist/core/repository-learning-scope.d.ts.map +1 -0
  152. package/dist/core/repository-learning-scope.js +42 -0
  153. package/dist/core/repository-learning-scope.js.map +1 -0
  154. package/dist/core/resource-loader.d.ts.map +1 -1
  155. package/dist/core/resource-loader.js +16 -1
  156. package/dist/core/resource-loader.js.map +1 -1
  157. package/dist/core/router-feedback-collector.d.ts +2 -1
  158. package/dist/core/router-feedback-collector.d.ts.map +1 -1
  159. package/dist/core/router-feedback-collector.js +2 -2
  160. package/dist/core/router-feedback-collector.js.map +1 -1
  161. package/dist/core/runtime-provenance.d.ts +54 -0
  162. package/dist/core/runtime-provenance.d.ts.map +1 -0
  163. package/dist/core/runtime-provenance.js +115 -0
  164. package/dist/core/runtime-provenance.js.map +1 -0
  165. package/dist/core/sandbox/backend.d.ts.map +1 -1
  166. package/dist/core/sandbox/backend.js +39 -21
  167. package/dist/core/sandbox/backend.js.map +1 -1
  168. package/dist/core/sandbox/default-policy.d.ts +4 -5
  169. package/dist/core/sandbox/default-policy.d.ts.map +1 -1
  170. package/dist/core/sandbox/default-policy.js +9 -11
  171. package/dist/core/sandbox/default-policy.js.map +1 -1
  172. package/dist/core/session-bash-runtime.d.ts +4 -4
  173. package/dist/core/session-bash-runtime.d.ts.map +1 -1
  174. package/dist/core/session-bash-runtime.js +6 -5
  175. package/dist/core/session-bash-runtime.js.map +1 -1
  176. package/dist/core/session-compaction-service.d.ts.map +1 -1
  177. package/dist/core/session-compaction-service.js +7 -7
  178. package/dist/core/session-compaction-service.js.map +1 -1
  179. package/dist/core/session-manager.d.ts +4 -1
  180. package/dist/core/session-manager.d.ts.map +1 -1
  181. package/dist/core/session-manager.js +47 -7
  182. package/dist/core/session-manager.js.map +1 -1
  183. package/dist/core/settings-manager.d.ts +7 -4
  184. package/dist/core/settings-manager.d.ts.map +1 -1
  185. package/dist/core/settings-manager.js +11 -3
  186. package/dist/core/settings-manager.js.map +1 -1
  187. package/dist/core/system-prompt.d.ts +9 -1
  188. package/dist/core/system-prompt.d.ts.map +1 -1
  189. package/dist/core/system-prompt.js +10 -4
  190. package/dist/core/system-prompt.js.map +1 -1
  191. package/dist/core/tools/bash.d.ts +2 -2
  192. package/dist/core/tools/bash.d.ts.map +1 -1
  193. package/dist/core/tools/bash.js +2 -1
  194. package/dist/core/tools/bash.js.map +1 -1
  195. package/dist/core/tools/tool-definition-wrapper.d.ts.map +1 -1
  196. package/dist/core/tools/tool-definition-wrapper.js +15 -0
  197. package/dist/core/tools/tool-definition-wrapper.js.map +1 -1
  198. package/dist/core/turn-metrics.d.ts +135 -0
  199. package/dist/core/turn-metrics.d.ts.map +1 -0
  200. package/dist/core/turn-metrics.js +261 -0
  201. package/dist/core/turn-metrics.js.map +1 -0
  202. package/dist/core/verified-bash-runtime.d.ts.map +1 -1
  203. package/dist/core/verified-bash-runtime.js +10 -4
  204. package/dist/core/verified-bash-runtime.js.map +1 -1
  205. package/dist/guardrails/replay-ledger-lock-owner.d.ts +7 -0
  206. package/dist/guardrails/replay-ledger-lock-owner.d.ts.map +1 -1
  207. package/dist/guardrails/replay-ledger-lock-owner.js +39 -0
  208. package/dist/guardrails/replay-ledger-lock-owner.js.map +1 -1
  209. package/dist/index.d.ts +6 -1
  210. package/dist/index.d.ts.map +1 -1
  211. package/dist/index.js +6 -1
  212. package/dist/index.js.map +1 -1
  213. package/dist/main.d.ts.map +1 -1
  214. package/dist/main.js +18 -0
  215. package/dist/main.js.map +1 -1
  216. package/dist/modes/interactive/components/control-panel-layout.d.ts.map +1 -1
  217. package/dist/modes/interactive/components/control-panel-layout.js +2 -2
  218. package/dist/modes/interactive/components/control-panel-layout.js.map +1 -1
  219. package/dist/modes/interactive/components/footer.d.ts +3 -0
  220. package/dist/modes/interactive/components/footer.d.ts.map +1 -1
  221. package/dist/modes/interactive/components/footer.js +40 -12
  222. package/dist/modes/interactive/components/footer.js.map +1 -1
  223. package/dist/modes/interactive/components/settings-selector.d.ts +2 -0
  224. package/dist/modes/interactive/components/settings-selector.d.ts.map +1 -1
  225. package/dist/modes/interactive/components/settings-selector.js +10 -0
  226. package/dist/modes/interactive/components/settings-selector.js.map +1 -1
  227. package/dist/modes/interactive/components/status-sidebar.d.ts +14 -2
  228. package/dist/modes/interactive/components/status-sidebar.d.ts.map +1 -1
  229. package/dist/modes/interactive/components/status-sidebar.js +106 -19
  230. package/dist/modes/interactive/components/status-sidebar.js.map +1 -1
  231. package/dist/modes/interactive/interactive-mode.d.ts +10 -1
  232. package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
  233. package/dist/modes/interactive/interactive-mode.js +104 -17
  234. package/dist/modes/interactive/interactive-mode.js.map +1 -1
  235. package/dist/modes/interactive/theme/dark.json +1 -1
  236. package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
  237. package/dist/modes/interactive/theme/theme.js +1 -0
  238. package/dist/modes/interactive/theme/theme.js.map +1 -1
  239. package/dist/modes/rpc/rpc-mode.d.ts.map +1 -1
  240. package/dist/modes/rpc/rpc-mode.js +1 -1
  241. package/dist/modes/rpc/rpc-mode.js.map +1 -1
  242. package/docs/compaction.md +25 -3
  243. package/docs/containerization.md +14 -2
  244. package/docs/docs.json +8 -0
  245. package/docs/environment-variables.md +1 -1
  246. package/docs/extensions.md +75 -16
  247. package/docs/mcp.md +97 -0
  248. package/docs/metrics.md +87 -0
  249. package/docs/packages.md +25 -4
  250. package/docs/providers.md +1 -1
  251. package/docs/sdk.md +25 -4
  252. package/docs/settings.md +8 -7
  253. package/docs/usage.md +13 -3
  254. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  255. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  256. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  257. package/examples/extensions/gondolin/package-lock.json +2 -2
  258. package/examples/extensions/gondolin/package.json +1 -1
  259. package/examples/extensions/plannotator-approval-bridge.ts +83 -0
  260. package/examples/extensions/sandbox/package-lock.json +2 -2
  261. package/examples/extensions/sandbox/package.json +1 -1
  262. package/examples/extensions/subagent/README.md +21 -11
  263. package/examples/extensions/subagent/adaptive-agent-runtime.ts +9 -3
  264. package/examples/extensions/subagent/agents/planner.md +1 -3
  265. package/examples/extensions/subagent/agents/reviewer.md +1 -3
  266. package/examples/extensions/subagent/agents/scout.md +1 -3
  267. package/examples/extensions/subagent/agents/worker.md +0 -1
  268. package/examples/extensions/subagent/agents.test.ts +9 -0
  269. package/examples/extensions/subagent/agents.ts +11 -4
  270. package/examples/extensions/subagent/deadline-budget.test.ts +32 -0
  271. package/examples/extensions/subagent/deadline-budget.ts +25 -1
  272. package/examples/extensions/subagent/fixtures/fake-omk-json.mjs +10 -0
  273. package/examples/extensions/subagent/index.ts +234 -55
  274. package/examples/extensions/subagent/subagent-execution-policy.test.ts +27 -0
  275. package/examples/extensions/subagent/subagent-extension-smoke.test.ts +167 -2
  276. package/examples/extensions/subagent/workflow-graph.test.ts +80 -0
  277. package/examples/extensions/subagent/workflow-graph.ts +89 -0
  278. package/examples/extensions/with-deps/package-lock.json +2 -2
  279. package/examples/extensions/with-deps/package.json +1 -1
  280. package/npm-shrinkwrap.json +253 -439
  281. 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 the sorted dirty set (capped at 32 paths, 1 s TTL). 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"`.
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
- **Default sandbox (opt-out):** session bash also carries a default `audit`-mode sandbox preflight (workspace-write policy rooted at the session cwd). The spawn stays unwrapped, but every decision is appended to the replay ledger as a `sandbox_audit` event, giving a tamper-evident audit trail. `OMK_BASH_SANDBOX=enforce` activates the real OS backend macOS `sandbox-exec` seatbelt or Linux `bwrap` bubblewrap and fails closed when neither is installed; `OMK_BASH_SANDBOX=0` disables the preflight entirely.
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
- Advisory-only hint source for the v4 auto thinking-level resolver. Read from the **global** settings file only — a project-scope `.omk/settings.json` value is ignored by design. Default is fully off; the bridge is circuit-breaker protected and TTL-cached, and its hint can only nudge the resolved level by a bounded ±2 steps.
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 | `false` | Show condensed changelog after updates |
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/custom tools without a per-name value use `agent.toolTimeoutMs`. Timeout values must be integer milliseconds from `0` through `2147483647`.
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 `reasoningRouterLearning.enabled` is `true`, `/think auto` loads one validated bias snapshot for the session, applies a bounded `-2..2` ladder-step bias, and appends a privacy-safe feedback record containing only bounded enums, booleans, and buckets. Project-local settings cannot enable or redirect this feature, and the ledger never stores raw prompts, file paths, diffs, session identifiers, model/provider payloads, tool output, or hook output.
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
- The Adaptorch advisory bridge module still ships as default-off groundwork only. It has no settings key, command, transport, or session call site yet, so it does not affect `/think auto` until a future transport and security review explicitly wire it.
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.0",
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.0",
9
+ "version": "0.95.2",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sdk": "0.52.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "omk-extension-custom-provider-anthropic",
3
3
  "private": true,
4
- "version": "0.95.0",
4
+ "version": "0.95.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "omk-extension-custom-provider-gitlab-duo",
3
3
  "private": true,
4
- "version": "0.95.0",
4
+ "version": "0.95.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omk-extension-gondolin",
3
- "version": "0.95.0",
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.0",
9
+ "version": "0.95.2",
10
10
  "dependencies": {
11
11
  "@earendil-works/gondolin": "0.12.0"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "omk-extension-gondolin",
3
3
  "private": true,
4
- "version": "0.95.0",
4
+ "version": "0.95.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -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.0",
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.0",
9
+ "version": "0.95.2",
10
10
  "dependencies": {
11
11
  "@anthropic-ai/sandbox-runtime": "0.0.26"
12
12
  }
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "omk-extension-sandbox",
3
3
  "private": true,
4
- "version": "0.95.0",
4
+ "version": "0.95.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -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 run concurrently (max 8, 4 concurrent) |
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` | Internal hard budget, leaving 60 seconds before a configured 900000 ms tool timeout |
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 | Haiku | read, grep, find, ls, bash |
172
- | `planner` | Implementation plans | Sonnet | read, grep, find, ls |
173
- | `reviewer` | Code review | Sonnet | read, grep, find, ls, bash |
174
- | `worker` | General-purpose | Sonnet | (all default) |
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"**: Internal cutoff returns elapsed/deadline/checkpoint/resume metadata instead of reaching the outer tool timeout
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
- - Parallel mode limited to 8 tasks, 4 concurrent
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(profile: DeadlineProfile | undefined, options: RunAdaptiveAgentOptions, maximumMs: number): number {
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 (explore-first planning, decision-complete plans), packages (if the codebase spans multiple packages), deep-interview (only if requirements are still fuzzy after reading the scout's context). Load only what the task needs; do not bulk-load the catalog.
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 (structured multi-angle review pass), security-review (when the diff touches auth, secrets, or user input). Load only what the task needs.
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 (if a knowledge-graph/dependency question, not just a file lookup), ast-grep (structural search when grep-by-text isn't precise enough), headroom (if findings would otherwise be too large to hand off compactly). Load only what the task needs.
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
+ });