open-multi-agent-kit 0.91.0 → 0.92.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. package/CHANGELOG.md +17 -1
  2. package/README.md +2 -2
  3. package/dist/core/agent-session.d.ts.map +1 -1
  4. package/dist/core/agent-session.js +8 -7
  5. package/dist/core/agent-session.js.map +1 -1
  6. package/dist/core/command-safety.d.ts.map +1 -1
  7. package/dist/core/command-safety.js +0 -50
  8. package/dist/core/command-safety.js.map +1 -1
  9. package/dist/core/compaction/transaction.d.ts.map +1 -1
  10. package/dist/core/compaction/transaction.js +7 -3
  11. package/dist/core/compaction/transaction.js.map +1 -1
  12. package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -1
  13. package/dist/core/context-budget-headroom-candidates.js +21 -11
  14. package/dist/core/context-budget-headroom-candidates.js.map +1 -1
  15. package/dist/core/context-budget-system-prompt-items.d.ts +1 -0
  16. package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -1
  17. package/dist/core/context-budget-system-prompt-items.js +7 -8
  18. package/dist/core/context-budget-system-prompt-items.js.map +1 -1
  19. package/dist/core/loadouts.d.ts.map +1 -1
  20. package/dist/core/loadouts.js +27 -48
  21. package/dist/core/loadouts.js.map +1 -1
  22. package/dist/core/system-prompt.d.ts.map +1 -1
  23. package/dist/core/system-prompt.js +35 -30
  24. package/dist/core/system-prompt.js.map +1 -1
  25. package/dist/main.d.ts.map +1 -1
  26. package/dist/main.js +112 -11
  27. package/dist/main.js.map +1 -1
  28. package/dist/modes/print-mode.d.ts.map +1 -1
  29. package/dist/modes/print-mode.js +9 -0
  30. package/dist/modes/print-mode.js.map +1 -1
  31. package/docs/adaptorch-preview-spec.md +174 -0
  32. package/docs/adaptorch-preview.md +1 -1
  33. package/docs/compaction.md +13 -13
  34. package/docs/correctness-wall.md +13 -5
  35. package/docs/custom-provider.md +8 -8
  36. package/docs/development.md +2 -2
  37. package/docs/extensions.md +8 -8
  38. package/docs/json.md +4 -4
  39. package/docs/providers.md +1 -1
  40. package/docs/session-format.md +5 -5
  41. package/docs/skills.md +2 -0
  42. package/docs/themes.md +2 -2
  43. package/docs/tui.md +4 -4
  44. package/docs/usage.md +4 -0
  45. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  46. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  47. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  48. package/examples/extensions/gondolin/package-lock.json +2 -2
  49. package/examples/extensions/gondolin/package.json +1 -1
  50. package/examples/extensions/sandbox/package-lock.json +2 -2
  51. package/examples/extensions/sandbox/package.json +1 -1
  52. package/examples/extensions/subagent/README.md +35 -10
  53. package/examples/extensions/subagent/adaptive-agent-runtime.test.ts +234 -0
  54. package/examples/extensions/subagent/adaptive-agent-runtime.ts +240 -0
  55. package/examples/extensions/subagent/adaptive-result.ts +112 -0
  56. package/examples/extensions/subagent/checkpoint-runtime.test.ts +125 -0
  57. package/examples/extensions/subagent/checkpoint-runtime.ts +198 -0
  58. package/examples/extensions/subagent/deadline-budget.test.ts +135 -0
  59. package/examples/extensions/subagent/deadline-budget.ts +242 -0
  60. package/examples/extensions/subagent/deadline-profile-store.test.ts +72 -0
  61. package/examples/extensions/subagent/deadline-profile-store.ts +172 -0
  62. package/examples/extensions/subagent/fixtures/fake-omk-json.mjs +13 -0
  63. package/examples/extensions/subagent/fixtures/hanging-process-tree.mjs +40 -0
  64. package/examples/extensions/subagent/index.ts +253 -137
  65. package/examples/extensions/subagent/managed-process.test.ts +178 -0
  66. package/examples/extensions/subagent/managed-process.ts +236 -0
  67. package/examples/extensions/subagent/subagent-extension-smoke.test.ts +112 -0
  68. package/examples/extensions/subagent/subagent-runtime-types.ts +76 -0
  69. package/examples/extensions/with-deps/package-lock.json +2 -2
  70. package/examples/extensions/with-deps/package.json +1 -1
  71. package/npm-shrinkwrap.json +21 -21
  72. package/package.json +5 -5
@@ -2,12 +2,12 @@
2
2
 
3
3
  LLMs have limited context windows. When conversations grow too long, omk uses compaction to summarize older content while preserving recent work. This page covers both auto-compaction and branch summarization.
4
4
 
5
- **Source files** ([omk-mono](https://github.com/earendil-works/omk-mono)):
6
- - [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic
7
- - [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization
8
- - [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization)
9
- - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`)
10
- - [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types
5
+ **Source files** ([omk-mono](https://github.com/dmae97/omk)):
6
+ - [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) - Auto-compaction logic
7
+ - [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) - Branch summarization
8
+ - [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/utils.ts) - Shared utilities (file tracking, serialization)
9
+ - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/session-manager.ts) - Entry types (`CompactionEntry`, `BranchSummaryEntry`)
10
+ - [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/extensions/types.ts) - Extension event types
11
11
 
12
12
  For TypeScript definitions in your project, inspect `node_modules/open-multi-agent-kit/dist/`.
13
13
 
@@ -67,7 +67,7 @@ By default, compaction uses the active session model. Set `compaction.model` to
67
67
  1. **Find cut point**: Walk backwards from newest message, accumulating token estimates until `keepRecentTokens` (default 20k, configurable in `~/.omk/agent/settings.json` or `<project-dir>/.omk/settings.json`) is reached
68
68
  2. **Extract messages**: Collect messages from the previous kept boundary (or session start) up to the cut point
69
69
  3. **Generate summary**: Call LLM to summarize with structured format, passing the previous summary as iterative context when present
70
- 4. **Append entry**: Save `CompactionEntry` with summary and `firstKeptEntryId`
70
+ 4. **Sanitize and append**: Deterministically redact sensitive values, then save the `CompactionEntry` with its summary and `firstKeptEntryId`. Exact `[REDACTED]` assignment placeholders are valid; appended data and unredacted credential-shaped literals remain rejected.
71
71
  5. **Reload**: Session reloads, using summary + messages from `firstKeptEntryId` onwards
72
72
 
73
73
  ```
@@ -144,7 +144,7 @@ Never cut at tool results (they must stay with their tool call).
144
144
 
145
145
  ### CompactionEntry Structure
146
146
 
147
- Defined in [`session-manager.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/session-manager.ts):
147
+ Defined in [`session-manager.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/session-manager.ts):
148
148
 
149
149
  ```typescript
150
150
  interface CompactionEntry<T = unknown> {
@@ -168,7 +168,7 @@ interface CompactionDetails {
168
168
 
169
169
  Extensions can store any JSON-serializable data in `details`. The default compaction tracks file operations, but custom extension implementations can use their own structure.
170
170
 
171
- See [`prepareCompaction()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation.
171
+ See [`prepareCompaction()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) and [`compact()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/compaction.ts) for the implementation.
172
172
 
173
173
  ## Branch Summarization
174
174
 
@@ -211,7 +211,7 @@ This means file tracking accumulates across multiple compactions or nested branc
211
211
 
212
212
  ### BranchSummaryEntry Structure
213
213
 
214
- Defined in [`session-manager.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/session-manager.ts):
214
+ Defined in [`session-manager.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/session-manager.ts):
215
215
 
216
216
  ```typescript
217
217
  interface BranchSummaryEntry<T = unknown> {
@@ -234,7 +234,7 @@ interface BranchSummaryDetails {
234
234
 
235
235
  Same as compaction, extensions can store custom data in `details`.
236
236
 
237
- See [`collectEntriesForBranchSummary()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation.
237
+ See [`collectEntriesForBranchSummary()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), [`prepareBranchEntries()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts), and [`generateBranchSummary()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/branch-summarization.ts) for the implementation.
238
238
 
239
239
  ## Summary Format
240
240
 
@@ -278,7 +278,7 @@ path/to/changed.ts
278
278
 
279
279
  ### Message Serialization
280
280
 
281
- Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/compaction/utils.ts):
281
+ Before summarization, messages are serialized to text via [`serializeConversation()`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/compaction/utils.ts):
282
282
 
283
283
  ```
284
284
  [User]: What they said
@@ -294,7 +294,7 @@ Tool results are truncated to 2000 characters during serialization. Content beyo
294
294
 
295
295
  ## Custom Summarization via Extensions
296
296
 
297
- Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions.
297
+ Extensions can intercept and customize both compaction and branch summarization. See [`extensions/types.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/extensions/types.ts) for event type definitions.
298
298
 
299
299
  ### session_before_compact
300
300
 
@@ -28,7 +28,7 @@ Structured next steps on the verdict card: **Apply**, **Deep Check**, **Regenera
28
28
  ## Fast wall vs deep wall
29
29
 
30
30
  - **Fast wall (default):** Pure policy — diff paths, scope globs, secret-shaped lines, preview-only limits (`BATCH1_NO_DOCKER_RUNNER`). No Docker runner in batch 1.
31
- - **Deep wall (Pro / future):** Hermetic paired base/patch replay. Today `deepWall: true` returns **unavailable** with the same batch-1 limit code.
31
+ - **Deep wall (Pro / future):** Hermetic paired base/patch replay. Today `deepWall: true` returns **unavailable** (evidence-gated: requires a valid execution receipt per ALG-003 strict mode; no Docker runner wired in batch 1).
32
32
 
33
33
  ## Relationship to Adaptorch
34
34
 
@@ -74,7 +74,7 @@ The correctness wall is **not** part of the default `omk-core-verified` preset o
74
74
  | **Role loadouts** | `code` / `executor` lanes still get `pre-shell-guard`, `protect-secrets`, and `typecheck-after-edit`; the wall **adds** a pre-apply policy gate on `edit` / `write` only when the extension is loaded |
75
75
  | **Domain router** | No dedicated domain profile today; patch-safety work may route to [`ai-agent-ops`](./loadout-domains/ai-agent-ops.md) for harness/eval discipline, but that does **not** auto-load this extension |
76
76
 
77
- **Future hook (code, not batch-1):** `packages/coding-agent/src/core/domain-loadouts.ts` could gain triggers (e.g. `patch safety`, `correctness wall`) and a curated extension entry pointing at the correctness-wall example. Until then, document-only reference do not hand-edit auto-generated files under `docs/loadout-domains/`.
77
+ **Domain router triggers (implemented):** `packages/coding-agent/src/core/domain-loadouts.ts` already contains keyword triggers (`correctness wall`, `patch safety`) and a path trigger (`correctness-wall`) that route to the PATCH SAFETY domain profile. The profile instructs operators to load the correctness-wall extension explicitly (not in default preset) and follow the shadow → soft → hard rollout. Auto-generated docs under `docs/loadout-domains/` should be regenerated via `gen-domain-docs.mjs`, not hand-edited.
78
78
 
79
79
  Regression coverage for the wall library surface lives in `packages/coding-agent/test/suite/regressions/018-b2c-correctness-wall.test.ts` (imports `omk-adaptorch-wpl` the same way the extension does).
80
80
 
@@ -105,9 +105,17 @@ Goal orchestration v2 artifacts (planner P3) live beside batch-1 plan files:
105
105
  | Three-wave execution DAG (JSON) | `.omk/goals/b2c-correctness-wall-2026-07-08/dag-v2.json` |
106
106
  | Explorer: browser-smoke vs extension load + loadout gaps | `.omk/goals/b2c-correctness-wall-2026-07-08/laneE-explorer.md` |
107
107
 
108
- **Wave 2 (prove / integrate):** wire `AdaptOrchClient` on hooks when session has run context; lift `BATCH1_NO_DOCKER_RUNNER` for non-preview deep wall; optional preset documentation in `~/.omk/runtime-preset.json` comments only (no default-on extension).
109
-
110
- **Wave 3 (productize):** publish `omk-adaptorch-wpl` from `dist/` for out-of-monorepo extensions; optional `domain-loadouts.ts` profile + `gen-domain-docs.mjs` regen; default **soft** for internal dogfood presets after Wave 2 evidence.
108
+ **Wave 2 (prove / integrate) Partial:**
109
+ - ✅ `domain-loadouts.ts` triggers for `correctness wall` / `patch safety` shipped (keyword + path patterns, PATCH SAFETY domain profile).
110
+ - Evidence receipt v3 (ALG-003 15/15) gates deep-wall availability on valid execution receipts.
111
+ - ⬜ `AdaptOrchClient` hook wiring when session has run context — not yet connected.
112
+ - ⬜ Lift `BATCH1_NO_DOCKER_RUNNER` for non-preview deep wall — still stub.
113
+ - ⬜ Preset documentation in `~/.omk/runtime-preset.json` — deferred.
114
+
115
+ **Wave 3 (productize) — Not started:**
116
+ - ⬜ Publish `omk-adaptorch-wpl` from `dist/` for out-of-monorepo extensions.
117
+ - ✅ `domain-loadouts.ts` profile exists; `gen-domain-docs.mjs` regen pending.
118
+ - ⬜ Default **soft** for internal dogfood presets after Wave 2 evidence.
111
119
 
112
120
  ## See also
113
121
 
@@ -372,12 +372,12 @@ interface OAuthCredentials {
372
372
  For providers with non-standard APIs, implement `streamSimple`. Study the existing provider implementations before writing your own:
373
373
 
374
374
  **Reference implementations:**
375
- - [anthropic.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API
376
- - [mistral.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API
377
- - [openai-completions.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions
378
- - [openai-responses.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API
379
- - [google.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI
380
- - [amazon-bedrock.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock
375
+ - [anthropic.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/anthropic.ts) - Anthropic Messages API
376
+ - [mistral.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/mistral.ts) - Mistral Conversations API
377
+ - [openai-completions.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/openai-completions.ts) - OpenAI Chat Completions
378
+ - [openai-responses.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/openai-responses.ts) - OpenAI Responses API
379
+ - [google.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/google.ts) - Google Generative AI
380
+ - [amazon-bedrock.ts](https://github.com/dmae97/omk/blob/main/packages/ai/src/providers/amazon-bedrock.ts) - AWS Bedrock
381
381
 
382
382
  ### Stream Pattern
383
383
 
@@ -540,7 +540,7 @@ When a request exceeds the model's context window, omk can recover automatically
540
540
  Detection runs on the finalized assistant message:
541
541
 
542
542
  - `stopReason === "error"`
543
- - `errorMessage` matches one of omk's known overflow patterns (see [`packages/ai/src/utils/overflow.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/utils/overflow.ts))
543
+ - `errorMessage` matches one of omk's known overflow patterns (see [`packages/ai/src/utils/overflow.ts`](https://github.com/dmae97/omk/blob/main/packages/ai/src/utils/overflow.ts))
544
544
 
545
545
  If your provider returns overflow errors with a message omk does not recognize, normalize the error from the same extension that registers the provider. Use a `message_end` handler to rewrite the assistant message so its `errorMessage` starts with a phrase omk recognizes. The generic fallback `context_length_exceeded` is the safest choice.
546
546
 
@@ -603,7 +603,7 @@ omk.registerProvider("my-provider", {
603
603
 
604
604
  ## Testing Your Implementation
605
605
 
606
- Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/earendil-works/omk-mono/tree/main/packages/ai/test):
606
+ Test your provider against the same test suites used by built-in providers. Copy and adapt these test files from [packages/ai/test/](https://github.com/dmae97/omk/tree/main/packages/ai/test):
607
607
 
608
608
  | Test | Purpose |
609
609
  |------|---------|
@@ -1,11 +1,11 @@
1
1
  # Development
2
2
 
3
- See [AGENTS.md](https://github.com/earendil-works/omk-mono/blob/main/AGENTS.md) for additional guidelines.
3
+ See [AGENTS.md](https://github.com/dmae97/omk/blob/main/AGENTS.md) for additional guidelines.
4
4
 
5
5
  ## Setup
6
6
 
7
7
  ```bash
8
- git clone https://github.com/earendil-works/omk-mono
8
+ git clone https://github.com/dmae97/omk
9
9
  cd omk-mono
10
10
  npm install
11
11
  npm run build
@@ -1868,13 +1868,13 @@ See [examples/extensions/tool-override.ts](../examples/extensions/tool-override.
1868
1868
  **Your implementation must match the exact result shape**, including the `details` type. The UI and session logic depend on these shapes for rendering and state tracking.
1869
1869
 
1870
1870
  Built-in tool implementations:
1871
- - [read.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
1872
- - [bash.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
1873
- - [edit.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/edit.ts)
1874
- - [write.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/write.ts)
1875
- - [grep.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
1876
- - [find.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails`
1877
- - [ls.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails`
1871
+ - [read.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/read.ts) - `ReadToolDetails`
1872
+ - [bash.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/bash.ts) - `BashToolDetails`
1873
+ - [edit.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/edit.ts)
1874
+ - [write.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/write.ts)
1875
+ - [grep.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/grep.ts) - `GrepToolDetails`
1876
+ - [find.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/find.ts) - `FindToolDetails`
1877
+ - [ls.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/tools/ls.ts) - `LsToolDetails`
1878
1878
 
1879
1879
  ### Remote Execution
1880
1880
 
@@ -1997,7 +1997,7 @@ export default function (omk: ExtensionAPI) {
1997
1997
 
1998
1998
  ### Custom Rendering
1999
1999
 
2000
- Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how tool rows are composed.
2000
+ Tools can provide `renderCall` and `renderResult` for custom TUI display. See [tui.md](tui.md) for the full component API and [tool-execution.ts](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/modes/interactive/components/tool-execution.ts) for how tool rows are composed.
2001
2001
 
2002
2002
  By default, tool output is wrapped in a `Box` that handles padding and background. A defined `renderCall` or `renderResult` must return a `Component`. If a slot renderer is not defined, `tool-execution.ts` uses fallback rendering for that slot.
2003
2003
 
package/docs/json.md CHANGED
@@ -8,7 +8,7 @@ Outputs all session events as JSON lines to stdout. Useful for integrating omk i
8
8
 
9
9
  ## Event Types
10
10
 
11
- Events are defined in [`AgentSessionEvent`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/agent-session.ts#L102):
11
+ Events are defined in [`AgentSessionEvent`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/agent-session.ts#L102):
12
12
 
13
13
  ```typescript
14
14
  type AgentSessionEvent =
@@ -22,7 +22,7 @@ type AgentSessionEvent =
22
22
 
23
23
  `queue_update` emits the full pending steering and follow-up queues whenever they change. `compaction_start` and `compaction_end` cover both manual and automatic compaction.
24
24
 
25
- Base events from [`AgentEvent`](https://github.com/earendil-works/omk-mono/blob/main/packages/agent/src/types.ts#L179):
25
+ Base events from [`AgentEvent`](https://github.com/dmae97/omk/blob/main/packages/agent/src/types.ts#L179):
26
26
 
27
27
  ```typescript
28
28
  type AgentEvent =
@@ -44,12 +44,12 @@ type AgentEvent =
44
44
 
45
45
  ## Message Types
46
46
 
47
- Base messages from [`packages/ai/src/types.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/types.ts#L134):
47
+ Base messages from [`packages/ai/src/types.ts`](https://github.com/dmae97/omk/blob/main/packages/ai/src/types.ts#L134):
48
48
  - `UserMessage` (line 134)
49
49
  - `AssistantMessage` (line 140)
50
50
  - `ToolResultMessage` (line 152)
51
51
 
52
- Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/messages.ts#L29):
52
+ Extended messages from [`packages/coding-agent/src/core/messages.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/messages.ts#L29):
53
53
  - `BashExecutionMessage` (line 29)
54
54
  - `CustomMessage` (line 46)
55
55
  - `BranchSummaryMessage` (line 55)
package/docs/providers.md CHANGED
@@ -89,7 +89,7 @@ omk
89
89
  | Xiaomi MiMo Token Plan (Singapore) | `XIAOMI_TOKEN_PLAN_SGP_API_KEY` | `xiaomi-token-plan-sgp` |
90
90
  | Zyloo | `ZYLOO_API_KEY` | `zyloo` |
91
91
 
92
- Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/env-api-keys.ts).
92
+ Reference for environment variables and `auth.json` keys: [`const envMap`](https://github.com/dmae97/omk/blob/main/packages/ai/src/env-api-keys.ts) in [`packages/ai/src/env-api-keys.ts`](https://github.com/dmae97/omk/blob/main/packages/ai/src/env-api-keys.ts).
93
93
 
94
94
  #### Zyloo
95
95
 
@@ -28,11 +28,11 @@ Existing sessions are automatically migrated to the current version (v3) when lo
28
28
 
29
29
  ## Source Files
30
30
 
31
- Source on GitHub ([omk-mono](https://github.com/earendil-works/omk-mono)):
32
- - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
33
- - [`packages/coding-agent/src/core/messages.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
34
- - [`packages/ai/src/types.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
35
- - [`packages/agent/src/types.ts`](https://github.com/earendil-works/omk-mono/blob/main/packages/agent/src/types.ts) - AgentMessage union type
31
+ Source on GitHub ([omk-mono](https://github.com/dmae97/omk)):
32
+ - [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/session-manager.ts) - Session entry types and SessionManager
33
+ - [`packages/coding-agent/src/core/messages.ts`](https://github.com/dmae97/omk/blob/main/packages/coding-agent/src/core/messages.ts) - Extended message types (BashExecutionMessage, CustomMessage, etc.)
34
+ - [`packages/ai/src/types.ts`](https://github.com/dmae97/omk/blob/main/packages/ai/src/types.ts) - Base message types (UserMessage, AssistantMessage, ToolResultMessage)
35
+ - [`packages/agent/src/types.ts`](https://github.com/dmae97/omk/blob/main/packages/agent/src/types.ts) - AgentMessage union type
36
36
 
37
37
  For TypeScript definitions in your project, inspect `node_modules/open-multi-agent-kit/dist/` and `node_modules/omk-ai/dist/`.
38
38
 
package/docs/skills.md CHANGED
@@ -4,6 +4,8 @@
4
4
 
5
5
  Skills are self-contained capability packages that the agent loads on-demand. A skill provides specialized workflows, setup instructions, helper scripts, and reference documentation for specific tasks.
6
6
 
7
+ OMK ships with **no built-in skills** — every skill is user-installed via the locations below, an OMK package, or `--skill`. The default session has zero skills and zero MCP servers configured.
8
+
7
9
  OMK implements the [Agent Skills standard](https://agentskills.io/specification), warning about most violations but remaining lenient. OMK allows skill names to differ from their parent directory even though the standard disallows it; that rule is suboptimal for shared skill directories used across multiple agent harnesses.
8
10
 
9
11
  ## Table of Contents
package/docs/themes.md CHANGED
@@ -56,7 +56,7 @@ vim ~/.omk/agent/themes/my-theme.json
56
56
 
57
57
  ```json
58
58
  {
59
- "$schema": "https://raw.githubusercontent.com/earendil-works/omk/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
59
+ "$schema": "https://raw.githubusercontent.com/dmae97/omk/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
60
60
  "name": "my-theme",
61
61
  "vars": {
62
62
  "primary": "#00aaff",
@@ -126,7 +126,7 @@ vim ~/.omk/agent/themes/my-theme.json
126
126
 
127
127
  ```json
128
128
  {
129
- "$schema": "https://raw.githubusercontent.com/earendil-works/omk/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
129
+ "$schema": "https://raw.githubusercontent.com/dmae97/omk/main/packages/coding-agent/src/modes/interactive/theme/theme-schema.json",
130
130
  "name": "my-theme",
131
131
  "vars": {
132
132
  "blue": "#0066cc",
package/docs/tui.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  Extensions and custom tools can render custom TUI components for interactive user interfaces. This page covers the component system and available building blocks.
6
6
 
7
- **Source:** [`omk-tui`](https://github.com/earendil-works/omk-mono/tree/main/packages/tui)
7
+ **Source:** [`omk-tui`](https://github.com/dmae97/omk/tree/main/packages/tui)
8
8
 
9
9
  ## Component Interface
10
10
 
@@ -742,7 +742,7 @@ ctx.ui.setStatus("my-ext", ctx.ui.theme.fg("accent", "● active"));
742
742
  ctx.ui.setStatus("my-ext", undefined);
743
743
  ```
744
744
 
745
- **Examples:** [status-line.ts](../examples/extensions/status-line.ts), [plan-mode.ts](../examples/extensions/plan-mode.ts), [preset.ts](../examples/extensions/preset.ts)
745
+ **Examples:** [status-line.ts](../examples/extensions/status-line.ts), [plan-mode.ts](../examples/extensions/plan-mode/index.ts), [preset.ts](../examples/extensions/preset.ts)
746
746
 
747
747
  ### Pattern 4b: Working Indicator Customization
748
748
 
@@ -802,7 +802,7 @@ ctx.ui.setWidget("my-widget", (_tui, theme) => {
802
802
  ctx.ui.setWidget("my-widget", undefined);
803
803
  ```
804
804
 
805
- **Examples:** [plan-mode.ts](../examples/extensions/plan-mode.ts)
805
+ **Examples:** [plan-mode.ts](../examples/extensions/plan-mode/index.ts)
806
806
 
807
807
  ### Pattern 6: Custom Footer
808
808
 
@@ -919,7 +919,7 @@ export default function (omk: ExtensionAPI) {
919
919
  - **Selection UI**: [examples/extensions/preset.ts](../examples/extensions/preset.ts) - SelectList with DynamicBorder framing
920
920
  - **Async with cancel**: [examples/extensions/qna.ts](../examples/extensions/qna.ts) - BorderedLoader for LLM calls
921
921
  - **Settings toggles**: [examples/extensions/tools.ts](../examples/extensions/tools.ts) - SettingsList for tool enable/disable
922
- - **Status indicators**: [examples/extensions/plan-mode.ts](../examples/extensions/plan-mode.ts) - setStatus and setWidget
922
+ - **Status indicators**: [examples/extensions/plan-mode/index.ts](../examples/extensions/plan-mode/index.ts) - setStatus and setWidget
923
923
  - **Working indicator**: [examples/extensions/working-indicator.ts](../examples/extensions/working-indicator.ts) - setWorkingIndicator
924
924
  - **Custom footer**: [examples/extensions/custom-footer.ts](../examples/extensions/custom-footer.ts) - setFooter with stats
925
925
  - **Custom editor**: [examples/extensions/modal-editor.ts](../examples/extensions/modal-editor.ts) - Vim-like modal editing
package/docs/usage.md CHANGED
@@ -151,6 +151,8 @@ OMK loads `AGENTS.md` or `CLAUDE.md` at startup from:
151
151
 
152
152
  Use context files for project conventions, commands, safety rules, and preferences. Disable loading with `--no-context-files` or `-nc`.
153
153
 
154
+ The core prompt builder places a fixed runtime trust boundary before loaded context and skill metadata. Global context can constrain project context, but loaded resources cannot expand user authorization or override active runtime/security controls. Context paths and text are XML-escaped before prompt assembly so resource content cannot break out of its structural envelope. This is defense in depth, not a code sandbox: extensions are executable trusted code and can explicitly rewrite the system prompt or final provider payload.
155
+
154
156
  ### System Prompt Files
155
157
 
156
158
  Replace the default system prompt with:
@@ -160,6 +162,8 @@ Replace the default system prompt with:
160
162
 
161
163
  Append to the default prompt without replacing it with `APPEND_SYSTEM.md` in either location.
162
164
 
165
+ Replacing or appending the default prompt does not remove the core runtime trust boundary; OMK inserts it after custom prompt text and before context files and skills.
166
+
163
167
  ## Exporting and Sharing Sessions
164
168
 
165
169
  Use `/export [file]` to write a session to HTML.
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omk-extension-custom-provider-anthropic",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-custom-provider-anthropic",
9
- "version": "0.91.0",
9
+ "version": "0.92.0",
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.91.0",
4
+ "version": "0.92.0",
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.91.0",
4
+ "version": "0.92.0",
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.91.0",
3
+ "version": "0.92.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-gondolin",
9
- "version": "0.91.0",
9
+ "version": "0.92.0",
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.91.0",
4
+ "version": "0.92.0",
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-sandbox",
3
- "version": "0.91.0",
3
+ "version": "0.92.0",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-sandbox",
9
- "version": "0.91.0",
9
+ "version": "0.92.0",
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.91.0",
4
+ "version": "0.92.0",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -9,15 +9,25 @@ Delegate tasks to specialized subagents with isolated context windows.
9
9
  - **Parallel streaming**: All parallel tasks stream updates simultaneously
10
10
  - **Markdown rendering**: Final output rendered with proper formatting (expanded view)
11
11
  - **Usage tracking**: Shows turns, tokens, cost, and context usage per agent
12
- - **Abort support**: Ctrl+C propagates to kill subagent processes
12
+ - **Abort support**: Ctrl+C propagates to the entire detached subagent process tree
13
+ - **Dual-budget planning**: Predictive sharding uses both estimated tokens and learned wall-clock demand
14
+ - **Checkpoint resume**: A cutoff resumes only the unfinished shard with bounded prior evidence
15
+ - **Cutoff learning**: Completion/cutoff history is persisted per provider and model under the agent state directory
16
+ - **Bounded cost**: At most 3 semantic shards and 1 resume across the whole logical task by default
13
17
 
14
18
  ## Structure
15
19
 
16
20
  ```
17
21
  subagent/
18
22
  ├── README.md # This file
19
- ├── index.ts # The extension (entry point)
20
- ├── agents.ts # Agent discovery logic
23
+ ├── index.ts # The extension entry point
24
+ ├── adaptive-agent-runtime.ts # Shard/checkpoint/resume coordinator
25
+ ├── checkpoint-runtime.ts # Bounded checkpoint protocol
26
+ ├── deadline-budget.ts # Token + wall-clock planning and cutoff learning
27
+ ├── deadline-profile-store.ts # Persistent provider/model profiles
28
+ ├── managed-process.ts # Process-tree termination and cleanup
29
+ ├── subagent-runtime-types.ts # Typed result/deadline metadata
30
+ ├── agents.ts # Agent discovery logic
21
31
  ├── agents/ # Sample agent definitions
22
32
  │ ├── scout.md # Fast recon, returns compressed context
23
33
  │ ├── planner.md # Creates implementation plans
@@ -36,8 +46,12 @@ From the repository root, symlink the files:
36
46
  ```bash
37
47
  # Symlink the extension (must be in a subdirectory with index.ts)
38
48
  mkdir -p ~/.omk/agent/extensions/subagent
39
- ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/index.ts" ~/.omk/agent/extensions/subagent/index.ts
40
- ln -sf "$(pwd)/packages/coding-agent/examples/extensions/subagent/agents.ts" ~/.omk/agent/extensions/subagent/agents.ts
49
+ src="$(pwd)/packages/coding-agent/examples/extensions/subagent"
50
+ for f in index.ts agents.ts agent-capability-router.ts capabilities.ts domain-profiles.ts \
51
+ 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
53
+ ln -sf "$src/$f" ~/.omk/agent/extensions/subagent/$f
54
+ done
41
55
 
42
56
  # Symlink agents
43
57
  mkdir -p ~/.omk/agent/agents
@@ -92,9 +106,16 @@ Use a chain: first have scout find the read tool, then have planner suggest impr
92
106
 
93
107
  | Mode | Parameter | Description |
94
108
  |------|-----------|-------------|
95
- | Single | `{ agent, task }` | One agent, one task |
96
- | Parallel | `{ tasks: [...] }` | Multiple agents run concurrently (max 8, 4 concurrent) |
97
- | Chain | `{ chain: [...] }` | Sequential with `{previous}` placeholder |
109
+ | 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) |
111
+ | Chain | `{ chain: [...] }` | Sequential with `{previous}` placeholder and a fair deadline share per remaining step |
112
+
113
+ Optional execution controls:
114
+
115
+ | Parameter | Default | Description |
116
+ |-----------|---------|-------------|
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 |
98
119
 
99
120
  ## Output Display
100
121
 
@@ -164,8 +185,10 @@ Project agents override user agents with the same name when `agentScope: "both"`
164
185
 
165
186
  - **Exit code != 0**: Tool returns error with stderr/output
166
187
  - **stopReason "error"**: LLM error propagated with error message
167
- - **stopReason "aborted"**: User abort (Ctrl+C) kills subprocess, throws error
168
- - **Chain mode**: Stops at first failing step, reports which step failed
188
+ - **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
190
+ - **Chain mode**: Stops at first failing step, reports which step failed, and preserves completed earlier steps
191
+ - **Duplicate prevention**: A cutoff with no new checkpoint or streamed evidence is not retried
169
192
 
170
193
  ## Limitations
171
194
 
@@ -173,3 +196,5 @@ Project agents override user agents with the same name when `agentScope: "both"`
173
196
  - Parallel model-visible output is capped at 50 KB per task; full results remain in tool details
174
197
  - Agents discovered fresh on each invocation (allows editing mid-session)
175
198
  - Parallel mode limited to 8 tasks, 4 concurrent
199
+ - Automatic semantic pre-sharding requires an explicit numbered/checklist action list; indivisible prose is checkpointed and resumed as one shard
200
+ - Checkpoints are best-effort child artifacts plus runtime-captured stream evidence; workspace side effects remain the source of truth after a cutoff