open-multi-agent-kit 0.90.9 → 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.
- package/CHANGELOG.md +39 -4
- package/README.md +14 -1
- package/dist/core/agent-session.d.ts +27 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +196 -32
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/command-safety.d.ts.map +1 -1
- package/dist/core/command-safety.js +0 -58
- package/dist/core/command-safety.js.map +1 -1
- package/dist/core/compaction/transaction.d.ts.map +1 -1
- package/dist/core/compaction/transaction.js +7 -3
- package/dist/core/compaction/transaction.js.map +1 -1
- package/dist/core/context-budget-headroom-candidates.d.ts.map +1 -1
- package/dist/core/context-budget-headroom-candidates.js +21 -11
- package/dist/core/context-budget-headroom-candidates.js.map +1 -1
- package/dist/core/context-budget-system-prompt-items.d.ts +1 -0
- package/dist/core/context-budget-system-prompt-items.d.ts.map +1 -1
- package/dist/core/context-budget-system-prompt-items.js +7 -8
- package/dist/core/context-budget-system-prompt-items.js.map +1 -1
- package/dist/core/footer-data-provider.d.ts +7 -1
- package/dist/core/footer-data-provider.d.ts.map +1 -1
- package/dist/core/footer-data-provider.js +12 -0
- package/dist/core/footer-data-provider.js.map +1 -1
- package/dist/core/index.d.ts +1 -0
- package/dist/core/index.d.ts.map +1 -1
- package/dist/core/index.js +1 -0
- package/dist/core/index.js.map +1 -1
- package/dist/core/loadouts.d.ts.map +1 -1
- package/dist/core/loadouts.js +27 -48
- package/dist/core/loadouts.js.map +1 -1
- package/dist/core/metrics-sampler.d.ts +20 -0
- package/dist/core/metrics-sampler.d.ts.map +1 -1
- package/dist/core/metrics-sampler.js +52 -0
- package/dist/core/metrics-sampler.js.map +1 -1
- package/dist/core/model-registry.d.ts.map +1 -1
- package/dist/core/model-registry.js +4 -1
- package/dist/core/model-registry.js.map +1 -1
- package/dist/core/model-resolver.d.ts.map +1 -1
- package/dist/core/model-resolver.js +15 -6
- package/dist/core/model-resolver.js.map +1 -1
- package/dist/core/provider-resilience.d.ts +51 -0
- package/dist/core/provider-resilience.d.ts.map +1 -0
- package/dist/core/provider-resilience.js +86 -0
- package/dist/core/provider-resilience.js.map +1 -0
- package/dist/core/run-journal.d.ts.map +1 -1
- package/dist/core/run-journal.js +14 -22
- package/dist/core/run-journal.js.map +1 -1
- package/dist/core/session-termination.d.ts +8 -2
- package/dist/core/session-termination.d.ts.map +1 -1
- package/dist/core/session-termination.js +45 -3
- package/dist/core/session-termination.js.map +1 -1
- package/dist/core/settings-manager.d.ts +30 -0
- package/dist/core/settings-manager.d.ts.map +1 -1
- package/dist/core/settings-manager.js +17 -0
- package/dist/core/settings-manager.js.map +1 -1
- package/dist/core/system-prompt.d.ts.map +1 -1
- package/dist/core/system-prompt.js +35 -30
- package/dist/core/system-prompt.js.map +1 -1
- package/dist/core/tools/grep.d.ts.map +1 -1
- package/dist/core/tools/grep.js +47 -0
- package/dist/core/tools/grep.js.map +1 -1
- package/dist/core/tools/omp-pure-seams.d.ts +41 -0
- package/dist/core/tools/omp-pure-seams.d.ts.map +1 -0
- package/dist/core/tools/omp-pure-seams.js +142 -0
- package/dist/core/tools/omp-pure-seams.js.map +1 -0
- package/dist/core/tools/omp-seam-runtime.d.ts +100 -0
- package/dist/core/tools/omp-seam-runtime.d.ts.map +1 -0
- package/dist/core/tools/omp-seam-runtime.js +40 -0
- package/dist/core/tools/omp-seam-runtime.js.map +1 -0
- package/dist/core/tools/read.d.ts.map +1 -1
- package/dist/core/tools/read.js +34 -1
- package/dist/core/tools/read.js.map +1 -1
- package/dist/main.d.ts.map +1 -1
- package/dist/main.js +112 -11
- package/dist/main.js.map +1 -1
- package/dist/modes/interactive/components/footer.d.ts +1 -1
- package/dist/modes/interactive/components/footer.d.ts.map +1 -1
- package/dist/modes/interactive/components/footer.js +11 -8
- package/dist/modes/interactive/components/footer.js.map +1 -1
- package/dist/modes/interactive/theme/omk-aurora-dark.json +80 -0
- package/dist/modes/interactive/theme/omk-aurora-light.json +80 -0
- package/dist/modes/interactive/theme/theme.d.ts.map +1 -1
- package/dist/modes/interactive/theme/theme.js +5 -0
- package/dist/modes/interactive/theme/theme.js.map +1 -1
- package/dist/modes/print-mode.d.ts.map +1 -1
- package/dist/modes/print-mode.js +9 -0
- package/dist/modes/print-mode.js.map +1 -1
- package/docs/adaptorch-preview-spec.md +174 -0
- package/docs/adaptorch-preview.md +2 -2
- package/docs/compaction.md +13 -13
- package/docs/correctness-wall.md +13 -5
- package/docs/custom-provider.md +8 -8
- package/docs/development.md +2 -2
- package/docs/extensions.md +8 -8
- package/docs/json.md +4 -4
- package/docs/provider-resilience.md +87 -0
- package/docs/providers.md +1 -1
- package/docs/session-format.md +5 -5
- package/docs/settings.md +30 -0
- package/docs/skills.md +2 -0
- package/docs/themes.md +4 -2
- package/docs/tui.md +4 -4
- package/docs/usage.md +4 -0
- package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
- package/examples/extensions/custom-provider-anthropic/package.json +1 -1
- package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
- package/examples/extensions/gondolin/package-lock.json +2 -2
- package/examples/extensions/gondolin/package.json +1 -1
- package/examples/extensions/sandbox/package-lock.json +2 -2
- package/examples/extensions/sandbox/package.json +1 -1
- package/examples/extensions/subagent/README.md +35 -10
- package/examples/extensions/subagent/adaptive-agent-runtime.test.ts +234 -0
- package/examples/extensions/subagent/adaptive-agent-runtime.ts +240 -0
- package/examples/extensions/subagent/adaptive-result.ts +112 -0
- package/examples/extensions/subagent/checkpoint-runtime.test.ts +125 -0
- package/examples/extensions/subagent/checkpoint-runtime.ts +198 -0
- package/examples/extensions/subagent/deadline-budget.test.ts +135 -0
- package/examples/extensions/subagent/deadline-budget.ts +242 -0
- package/examples/extensions/subagent/deadline-profile-store.test.ts +72 -0
- package/examples/extensions/subagent/deadline-profile-store.ts +172 -0
- package/examples/extensions/subagent/fixtures/fake-omk-json.mjs +13 -0
- package/examples/extensions/subagent/fixtures/hanging-process-tree.mjs +40 -0
- package/examples/extensions/subagent/index.ts +253 -137
- package/examples/extensions/subagent/managed-process.test.ts +178 -0
- package/examples/extensions/subagent/managed-process.ts +236 -0
- package/examples/extensions/subagent/subagent-extension-smoke.test.ts +112 -0
- package/examples/extensions/subagent/subagent-runtime-types.ts +76 -0
- package/examples/extensions/with-deps/package-lock.json +2 -2
- package/examples/extensions/with-deps/package.json +1 -1
- package/npm-shrinkwrap.json +28 -19
- package/package.json +6 -5
|
@@ -0,0 +1,174 @@
|
|
|
1
|
+
# Lane F — AdaptTorch Preview Algorithm (structured spec)
|
|
2
|
+
|
|
3
|
+
**Status:** documentation / interface blueprint only.
|
|
4
|
+
**Evidence roots:** `packages/adaptorch-wpl/`, `.omk/runs/adaptorch-native-loop-algorithm-20260701/final-part1-core-algorithm.md`, `packages/coding-agent/src/core/adaptorch-bridge.ts`, `packages/coding-agent/docs/loadout-domains/README.md`.
|
|
5
|
+
**Not a shipped runtime:** this spec describes a **preview** path (planning, routing, and evidence contracts) unless a future implementation lane wires it.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Inputs
|
|
10
|
+
|
|
11
|
+
| Input | Type | Source | Notes |
|
|
12
|
+
| --- | --- | --- | --- |
|
|
13
|
+
| `task_text` | string | user / lane kickoff | Primary routing signal; may be truncated for headroom. |
|
|
14
|
+
| `path_hints` | string[] | cwd, owned paths, globs | Optional; used for domain triggers and write-scope checks. |
|
|
15
|
+
| `upstream_tags` | string[] | goal id, lane role, preset | e.g. `grok-adaptorch-prod`, `omk-planner`. |
|
|
16
|
+
| `payload_shape` | object | planner / DAG artifact | Sanitized shape for topology preview only — **no** raw prompts, secrets, or session ids. |
|
|
17
|
+
| `provider_profile` | enum | session | `grok-oauth-proxy` \| `default` \| other registered provider. |
|
|
18
|
+
| `adaptorch_transport` | optional | MCP grant | If absent, preview runs **local-only** (OMK compose + deterministic fallbacks). |
|
|
19
|
+
| `lane_grants[]` | object[] | root coordinator | Each: scope, authority, skills, MCP, acceptance, evidence path. |
|
|
20
|
+
| `budget_caps` | object | loop / goal | `max_lanes`, `max_dispatch_preview_calls`, wall-clock cap (immutable per preview instance). |
|
|
21
|
+
|
|
22
|
+
**Hard input exclusions (never pass into AdaptOrch advisory or preview payloads):** prompt text/hash, file paths as bulk lists, model/provider identifiers in advisory bridge shape, session/user ids, tool names from live turns, hook stderr, credentials, `.env` material.
|
|
23
|
+
|
|
24
|
+
---
|
|
25
|
+
|
|
26
|
+
## Stage A — Signal intake and domain preview
|
|
27
|
+
|
|
28
|
+
**Purpose:** Normalize the kickoff into scored domain signals and a confidence band before any external control-plane call.
|
|
29
|
+
|
|
30
|
+
**Steps:**
|
|
31
|
+
|
|
32
|
+
1. Lowercase and tokenize `task_text`; merge `path_hints` and `upstream_tags` into the scoring buffer.
|
|
33
|
+
2. Score each registered domain profile (keyword, regex, extension, path triggers) per `loadout-domains` rules.
|
|
34
|
+
3. Emit `domain_leader`, `confidence` (`confident` \| `tentative` \| `fallback`), and `ambiguous` flag (runner-up within margin).
|
|
35
|
+
4. Attach recommended **read-only** skills tier (max 2–3) from domain + task class — do not bulk-load the catalog.
|
|
36
|
+
|
|
37
|
+
**Outputs:** `PreviewSignalRecord { domain_id, confidence, ambiguous, suggested_skills[] }`.
|
|
38
|
+
|
|
39
|
+
---
|
|
40
|
+
|
|
41
|
+
## Stage B — Topology preview (AdaptOrch read/local)
|
|
42
|
+
|
|
43
|
+
**Purpose:** Classify execution topology **without** submitting `adaptorch_run`.
|
|
44
|
+
|
|
45
|
+
**Precondition:** `adaptorch_transport` granted **and** `payload_shape` is sanitized.
|
|
46
|
+
|
|
47
|
+
**Steps:**
|
|
48
|
+
|
|
49
|
+
1. Call `adaptorch_capabilities` once per preview session (cache TTL).
|
|
50
|
+
2. Call `adaptorch_route_topology` with `{ payload_shape }`.
|
|
51
|
+
3. Map classification to one of: `singleton`, `pipeline`, `DAG`, `ensemble` (closed enum).
|
|
52
|
+
4. If transport missing: set `classification = unknown_local` and record `skipped_reason = no_verified_transport`.
|
|
53
|
+
|
|
54
|
+
**Outputs:** `TopologyPreview { classification, raw_redacted_summary }`.
|
|
55
|
+
|
|
56
|
+
---
|
|
57
|
+
|
|
58
|
+
## Stage C — Lane grant and loadout compose
|
|
59
|
+
|
|
60
|
+
**Purpose:** Turn topology + domain into non-overlapping lane grants for parallel workers.
|
|
61
|
+
|
|
62
|
+
**Steps:**
|
|
63
|
+
|
|
64
|
+
1. If `classification` is `DAG` or `ensemble`, decompose into lane candidates along **write-scope boundaries** (one writer per file).
|
|
65
|
+
2. Compose each lane: `scope`, `authority`, `skills[]`, `mcp[]`, relevant hooks, `acceptance`, `evidence_output_path`.
|
|
66
|
+
3. Run read-only authority stripping and always-on security hooks policy.
|
|
67
|
+
4. Reject parallel grants that share the same write path.
|
|
68
|
+
|
|
69
|
+
**Outputs:** `LaneGrantTable[]`, `compose_diagnostics[]`.
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## Stage D — Dispatch cardinality preview
|
|
74
|
+
|
|
75
|
+
**Purpose:** Preview how many `adaptorch_run` invocations a full loop **might** need without issuing them.
|
|
76
|
+
|
|
77
|
+
**Steps:**
|
|
78
|
+
|
|
79
|
+
1. Read `observed_cardinality_mode` if configured (`single_call` \| `fanout_n` \| `uncalibrated`).
|
|
80
|
+
2. Under `single_call`: `expected_run_ids = 1` per dispatch record.
|
|
81
|
+
3. Under `fanout_n`: derive N from topology template (ensemble = N parallel; pipeline = stage count) — **labeled as hypothesis** until calibrated.
|
|
82
|
+
4. Flag `cardinality_anomaly` if prior observations disagree with mode.
|
|
83
|
+
|
|
84
|
+
**Outputs:** `DispatchPreview { cardinality_mode, expected_run_ids, anomaly_flag }`.
|
|
85
|
+
|
|
86
|
+
---
|
|
87
|
+
|
|
88
|
+
## Stage E — Verification preview (adjudicator contract)
|
|
89
|
+
|
|
90
|
+
**Purpose:** State what evidence the Outcome Adjudicator would require **before** any run exists.
|
|
91
|
+
|
|
92
|
+
**Steps:**
|
|
93
|
+
|
|
94
|
+
1. Select verifier registry entry by packet `kind` (string class, stable across retries).
|
|
95
|
+
2. List required checks: terminal run status, artifact presence, trace sanity, scope/schema/content gates.
|
|
96
|
+
3. Map foreseeable `reason_code` values to disposition classes (`escalate`, `reroute_on_recurrence`, `retry_same_topology`) — preview only, no `adjudicate()` call.
|
|
97
|
+
|
|
98
|
+
**Outputs:** `VerificationPreview { kind, required_checks[], reason_code_map_summary }`.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Stage F — Evidence and synthesis contract
|
|
103
|
+
|
|
104
|
+
**Purpose:** Fix the artifact paths and synthesis inputs for the root coordinator.
|
|
105
|
+
|
|
106
|
+
**Steps:**
|
|
107
|
+
|
|
108
|
+
1. Require per-lane evidence files under `.omk/goals/<goal-id>/evidence/` (or lane grant path).
|
|
109
|
+
2. Define synthesis inputs: explorer facts, planner DAG, tester output, reviewer verdict — **no** success claims without attached evidence class.
|
|
110
|
+
3. Optional: if synthesis is explicitly authorized post-evidence, list allowed tools; else local `SYNTHESIS.md` merge.
|
|
111
|
+
4. Emit `PreviewResult` bundle for operators and doc cross-links.
|
|
112
|
+
|
|
113
|
+
**Outputs:** `PreviewResult`, pointers to `packages/coding-agent/docs/adaptorch-preview.md` and this file.
|
|
114
|
+
|
|
115
|
+
---
|
|
116
|
+
|
|
117
|
+
## Algorithm 1 — PreviewOrchestrate
|
|
118
|
+
|
|
119
|
+
```
|
|
120
|
+
function PreviewOrchestrate(inputs):
|
|
121
|
+
assert inputs.task_text is non-empty
|
|
122
|
+
A <- StageA_SignalIntake(inputs.task_text, inputs.path_hints, inputs.upstream_tags)
|
|
123
|
+
if inputs.adaptorch_transport is granted and inputs.payload_shape is sanitized:
|
|
124
|
+
B <- StageB_TopologyPreview(inputs.adaptorch_transport, inputs.payload_shape)
|
|
125
|
+
else:
|
|
126
|
+
B <- { classification: unknown_local, skipped_reason: transport_or_shape }
|
|
127
|
+
C <- StageC_ComposeLanes(A, B, inputs.lane_grants, inputs.budget_caps)
|
|
128
|
+
D <- StageD_DispatchCardinalityPreview(B, loop_config.observed_cardinality_mode)
|
|
129
|
+
E <- StageE_VerificationPreview(C.default_kind)
|
|
130
|
+
F <- StageF_EvidenceContract(inputs.goal_id, C.lanes)
|
|
131
|
+
return PreviewResult(A, B, C, D, E, F)
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
## Algorithm 2 — TopologyClassifyPreview
|
|
137
|
+
|
|
138
|
+
```
|
|
139
|
+
function TopologyClassifyPreview(transport, payload_shape):
|
|
140
|
+
caps <- transport.call("adaptorch_capabilities", {})
|
|
141
|
+
if caps indicates unsupported connector:
|
|
142
|
+
return { classification: unknown_local, skipped_reason: capabilities }
|
|
143
|
+
raw <- transport.call("adaptorch_route_topology", { payload_shape: payload_shape })
|
|
144
|
+
class <- extract_enum(raw.classification, {singleton, pipeline, DAG, ensemble})
|
|
145
|
+
if class is missing:
|
|
146
|
+
return { classification: unknown_local, skipped_reason: unparseable }
|
|
147
|
+
return { classification: class, raw_redacted_summary: redact(raw) }
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
---
|
|
151
|
+
|
|
152
|
+
## Algorithm 3 — ClaimSafeNarration
|
|
153
|
+
|
|
154
|
+
```
|
|
155
|
+
function ClaimSafeNarration(preview_result, utterance):
|
|
156
|
+
FORBIDDEN <- phrases implying production AdaptOrch execution without run evidence
|
|
157
|
+
ALLOWED <- planning, routing preview, lane grants, read/local tool names, fallback paths
|
|
158
|
+
if utterance matches any FORBIDDEN pattern:
|
|
159
|
+
return { ok: false, rewrite_hint: use ALLOWED framing + cite evidence path }
|
|
160
|
+
if utterance claims "done" or "verified":
|
|
161
|
+
require preview_result.F.evidence_paths exist and tester evidence class satisfied
|
|
162
|
+
return { ok: true, utterance }
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
---
|
|
166
|
+
|
|
167
|
+
## Acceptance (Lane F)
|
|
168
|
+
|
|
169
|
+
| Criterion | Evidence |
|
|
170
|
+
| --- | --- |
|
|
171
|
+
| This spec exists at the path above | read in session |
|
|
172
|
+
| adaptorch-preview.md links here | link check in intro doc |
|
|
173
|
+
| No adaptorch-wpl src edits | git status scoped to docs + goal only |
|
|
174
|
+
| Algorithms 1–3 present as pseudocode | this file Algorithms section |
|
|
@@ -14,7 +14,7 @@ Do **not** treat preview output as proof that `adaptorch_run` completed; termina
|
|
|
14
14
|
|
|
15
15
|
Related packages:
|
|
16
16
|
|
|
17
|
-
-
|
|
17
|
+
- WPL loop package: `packages/adaptorch-wpl/` (stable since 0.91.0; ships with the CLI as a runtime dependency).
|
|
18
18
|
- Advisory bridge (default-off): `packages/coding-agent/src/core/adaptorch-bridge.ts`.
|
|
19
19
|
- Grok + AdaptOrch presets: [grok-harness.md](./grok-harness.md).
|
|
20
20
|
|
|
@@ -59,7 +59,7 @@ When in doubt, cite an evidence class from `AGENTS.md` (read, diff, test output,
|
|
|
59
59
|
|
|
60
60
|
The canonical stage breakdown (Inputs, Stages A–F, Algorithms 1–3 as pseudocode) lives in the goal artifact:
|
|
61
61
|
|
|
62
|
-
**[
|
|
62
|
+
**[adaptorch-preview-spec.md](./adaptorch-preview-spec.md)**
|
|
63
63
|
|
|
64
64
|
Use that file for implementation planning; this page is the operator-facing intro and claim boundary.
|
|
65
65
|
|
package/docs/compaction.md
CHANGED
|
@@ -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/
|
|
6
|
-
- [`packages/coding-agent/src/core/compaction/compaction.ts`](https://github.com/
|
|
7
|
-
- [`packages/coding-agent/src/core/compaction/branch-summarization.ts`](https://github.com/
|
|
8
|
-
- [`packages/coding-agent/src/core/compaction/utils.ts`](https://github.com/
|
|
9
|
-
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/
|
|
10
|
-
- [`packages/coding-agent/src/core/extensions/types.ts`](https://github.com/
|
|
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. **
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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
|
|
package/docs/correctness-wall.md
CHANGED
|
@@ -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**
|
|
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
|
-
**
|
|
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)
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
package/docs/custom-provider.md
CHANGED
|
@@ -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/
|
|
376
|
-
- [mistral.ts](https://github.com/
|
|
377
|
-
- [openai-completions.ts](https://github.com/
|
|
378
|
-
- [openai-responses.ts](https://github.com/
|
|
379
|
-
- [google.ts](https://github.com/
|
|
380
|
-
- [amazon-bedrock.ts](https://github.com/
|
|
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/
|
|
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/
|
|
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
|
|------|---------|
|
package/docs/development.md
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
# Development
|
|
2
2
|
|
|
3
|
-
See [AGENTS.md](https://github.com/
|
|
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/
|
|
8
|
+
git clone https://github.com/dmae97/omk
|
|
9
9
|
cd omk-mono
|
|
10
10
|
npm install
|
|
11
11
|
npm run build
|
package/docs/extensions.md
CHANGED
|
@@ -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/
|
|
1872
|
-
- [bash.ts](https://github.com/
|
|
1873
|
-
- [edit.ts](https://github.com/
|
|
1874
|
-
- [write.ts](https://github.com/
|
|
1875
|
-
- [grep.ts](https://github.com/
|
|
1876
|
-
- [find.ts](https://github.com/
|
|
1877
|
-
- [ls.ts](https://github.com/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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/
|
|
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)
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Provider resilience (root-level)
|
|
2
|
+
|
|
3
|
+
Built into OMK core — not an optional extension.
|
|
4
|
+
|
|
5
|
+
## What it does
|
|
6
|
+
|
|
7
|
+
1. **Blocks sticky safety models** (e.g. `claude-fable-5`) from being selected as the session chat model.
|
|
8
|
+
2. **Ejects** them at prompt time if a resumed session still has one loaded.
|
|
9
|
+
3. On **content/safety stop** (`stop_reason=refusal`), **auto-failovers** to `k3 → grok-4.5 → deepseek` before retry.
|
|
10
|
+
4. Works with message sanitize (`transform-messages` orphan `tool_call_id` drop) so K3 protocol 400s can heal on retry.
|
|
11
|
+
|
|
12
|
+
This is session survival engineering, not a jailbreak.
|
|
13
|
+
|
|
14
|
+
## Settings (`~/.omk/agent/settings.json`)
|
|
15
|
+
|
|
16
|
+
```json
|
|
17
|
+
{
|
|
18
|
+
"defaultProvider": "kimi-coding",
|
|
19
|
+
"defaultModel": "k3",
|
|
20
|
+
"providerResilience": {
|
|
21
|
+
"blockStickySafetyModels": true,
|
|
22
|
+
"autoFailoverOnSafetyStop": true,
|
|
23
|
+
"failoverCandidates": [
|
|
24
|
+
{ "provider": "kimi-coding", "id": "k3" },
|
|
25
|
+
{ "provider": "grok-oauth-proxy", "id": "grok-4.5" },
|
|
26
|
+
{ "provider": "deepseek", "id": "deepseek-v4-pro" }
|
|
27
|
+
]
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
| Key | Default | Meaning |
|
|
33
|
+
|---|---|---|
|
|
34
|
+
| `blockStickySafetyModels` | `true` | Refuse `setModel` / initial pick of Fable-class ids |
|
|
35
|
+
| `autoFailoverOnSafetyStop` | `true` | Switch model before auto-retry on safety stop |
|
|
36
|
+
| `failoverCandidates` | k3→grok→deepseek… | Ordered targets |
|
|
37
|
+
|
|
38
|
+
Disable only if you intentionally want Fable:
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
"providerResilience": { "blockStickySafetyModels": false, "autoFailoverOnSafetyStop": false }
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Code
|
|
45
|
+
|
|
46
|
+
| Module | Role |
|
|
47
|
+
|---|---|
|
|
48
|
+
| `src/core/provider-resilience.ts` | Shared detectors + failover pick |
|
|
49
|
+
| `src/core/agent-session.ts` | eject / failover / retry wiring |
|
|
50
|
+
| `src/core/model-resolver.ts` | skip sticky on initial model pick |
|
|
51
|
+
| `src/core/settings-manager.ts` | `providerResilience` settings |
|
|
52
|
+
| `packages/ai/.../transform-messages.ts` | drop orphan tool results |
|
|
53
|
+
|
|
54
|
+
## How Fable is neutralized (not "jailbroken")
|
|
55
|
+
|
|
56
|
+
Server-side content/safety stops cannot be removed by OAuth RE or local patches.
|
|
57
|
+
OMK **deletes Fable from the operational surface**:
|
|
58
|
+
|
|
59
|
+
| Layer | Kill switch |
|
|
60
|
+
|---|---|
|
|
61
|
+
| `models.json` | `claude-fable-5` removed from anthropic catalog |
|
|
62
|
+
| `model-registry.loadModels` | `/fable/i` filtered unless `OMK_ALLOW_STICKY_SAFETY_MODELS=1` |
|
|
63
|
+
| `model-resolver` | sticky skipped; k3 preferred |
|
|
64
|
+
| `setModel` | throws if sticky + block on |
|
|
65
|
+
| `cycleModel` (scoped + available) | sticky filtered; goes through `setModel` |
|
|
66
|
+
| prompt boundary | ejects leftover Fable session model → k3 |
|
|
67
|
+
| safety-stop retry | failover chain before continue |
|
|
68
|
+
|
|
69
|
+
**You don't fight Fable. You never load it.**
|
|
70
|
+
|
|
71
|
+
## Operator
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
# after rebuild — restart OMK session (required)
|
|
75
|
+
|
|
76
|
+
/model k3 # if still on a bad model
|
|
77
|
+
/new # if transcript is corrupted (orphan tool ids)
|
|
78
|
+
|
|
79
|
+
# emergency re-enable Fable (not recommended)
|
|
80
|
+
OMK_ALLOW_STICKY_SAFETY_MODELS=1 omk
|
|
81
|
+
# and settings: providerResilience.blockStickySafetyModels=false
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
## arXiv note (2026-07)
|
|
85
|
+
|
|
86
|
+
Recent cs.CL hits on refusal/jailbreak are mostly attack-ASR / weight-edit / prefill studies.
|
|
87
|
+
No immediate ops patch beyond routing+sanitize already in-tree. Skip theory-only papers.
|
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/
|
|
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
|
|
package/docs/session-format.md
CHANGED
|
@@ -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/
|
|
32
|
-
- [`packages/coding-agent/src/core/session-manager.ts`](https://github.com/
|
|
33
|
-
- [`packages/coding-agent/src/core/messages.ts`](https://github.com/
|
|
34
|
-
- [`packages/ai/src/types.ts`](https://github.com/
|
|
35
|
-
- [`packages/agent/src/types.ts`](https://github.com/
|
|
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/settings.md
CHANGED
|
@@ -20,6 +20,8 @@ Edit directly or use `/settings` for common options.
|
|
|
20
20
|
| `defaultThinkingLevel` | string | - | `"off"`, `"minimal"`, `"low"`, `"medium"`, `"high"`, `"xhigh"` |
|
|
21
21
|
| `hideThinkingBlock` | boolean | `false` | Hide thinking blocks in output |
|
|
22
22
|
| `thinkingBudgets` | object | - | Custom token budgets per thinking level |
|
|
23
|
+
| `reasoningRouterLearning` | object | - | Opt-in v4 router learning bias (global settings file only) |
|
|
24
|
+
| `adaptorchBridge` | object | - | Opt-in AdaptOrch advisory bridge for the auto thinking-level resolver (global settings file only) |
|
|
23
25
|
|
|
24
26
|
#### thinkingBudgets
|
|
25
27
|
|
|
@@ -34,6 +36,34 @@ Edit directly or use `/settings` for common options.
|
|
|
34
36
|
}
|
|
35
37
|
```
|
|
36
38
|
|
|
39
|
+
#### reasoningRouterLearning
|
|
40
|
+
|
|
41
|
+
```json
|
|
42
|
+
{
|
|
43
|
+
"reasoningRouterLearning": {
|
|
44
|
+
"enabled": false,
|
|
45
|
+
"biasSnapshotPath": "~/.omk/agent/router-bias.json",
|
|
46
|
+
"feedbackLedgerPath": "~/.omk/agent/router-feedback.jsonl"
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
#### adaptorchBridge
|
|
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.
|
|
54
|
+
|
|
55
|
+
```json
|
|
56
|
+
{
|
|
57
|
+
"adaptorchBridge": {
|
|
58
|
+
"enabled": false,
|
|
59
|
+
"ttlMs": 300000,
|
|
60
|
+
"timeoutMs": 1500,
|
|
61
|
+
"maxConsultsPerSession": 5,
|
|
62
|
+
"failureThreshold": 3
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
```
|
|
66
|
+
|
|
37
67
|
### UI & Display
|
|
38
68
|
|
|
39
69
|
| Setting | Type | Default | Description |
|
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
|