open-multi-agent-kit 0.98.1 → 0.98.3

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 (86) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/README.md +2 -2
  3. package/dist/cli/mcp-attach.d.ts +15 -0
  4. package/dist/cli/mcp-attach.d.ts.map +1 -0
  5. package/dist/cli/mcp-attach.js +14 -0
  6. package/dist/cli/mcp-attach.js.map +1 -0
  7. package/dist/core/advisory-judge-model.d.ts.map +1 -1
  8. package/dist/core/advisory-judge-model.js +8 -1
  9. package/dist/core/advisory-judge-model.js.map +1 -1
  10. package/dist/core/advisory-judge-types.d.ts +18 -1
  11. package/dist/core/advisory-judge-types.d.ts.map +1 -1
  12. package/dist/core/advisory-judge-types.js.map +1 -1
  13. package/dist/core/advisory-judge.d.ts.map +1 -1
  14. package/dist/core/advisory-judge.js +41 -6
  15. package/dist/core/advisory-judge.js.map +1 -1
  16. package/dist/core/agent-session.d.ts +7 -0
  17. package/dist/core/agent-session.d.ts.map +1 -1
  18. package/dist/core/agent-session.js +66 -14
  19. package/dist/core/agent-session.js.map +1 -1
  20. package/dist/core/auth-storage.d.ts +19 -2
  21. package/dist/core/auth-storage.d.ts.map +1 -1
  22. package/dist/core/auth-storage.js +57 -6
  23. package/dist/core/auth-storage.js.map +1 -1
  24. package/dist/core/compaction/oauth-recovery.d.ts +29 -0
  25. package/dist/core/compaction/oauth-recovery.d.ts.map +1 -0
  26. package/dist/core/compaction/oauth-recovery.js +40 -0
  27. package/dist/core/compaction/oauth-recovery.js.map +1 -0
  28. package/dist/core/model-registry.d.ts +10 -1
  29. package/dist/core/model-registry.d.ts.map +1 -1
  30. package/dist/core/model-registry.js +16 -2
  31. package/dist/core/model-registry.js.map +1 -1
  32. package/dist/core/provider-resilience.d.ts +8 -0
  33. package/dist/core/provider-resilience.d.ts.map +1 -1
  34. package/dist/core/provider-resilience.js +17 -0
  35. package/dist/core/provider-resilience.js.map +1 -1
  36. package/dist/core/provider-usage.d.ts +1 -1
  37. package/dist/core/provider-usage.d.ts.map +1 -1
  38. package/dist/core/provider-usage.js +3 -2
  39. package/dist/core/provider-usage.js.map +1 -1
  40. package/dist/core/session-bash-runtime.d.ts +7 -0
  41. package/dist/core/session-bash-runtime.d.ts.map +1 -1
  42. package/dist/core/session-bash-runtime.js +10 -1
  43. package/dist/core/session-bash-runtime.js.map +1 -1
  44. package/dist/core/session-failure-cause.d.ts.map +1 -1
  45. package/dist/core/session-failure-cause.js +7 -1
  46. package/dist/core/session-failure-cause.js.map +1 -1
  47. package/dist/core/session-termination.d.ts.map +1 -1
  48. package/dist/core/session-termination.js +3 -1
  49. package/dist/core/session-termination.js.map +1 -1
  50. package/dist/core/verified-bash-runtime.d.ts +40 -0
  51. package/dist/core/verified-bash-runtime.d.ts.map +1 -1
  52. package/dist/core/verified-bash-runtime.js +66 -17
  53. package/dist/core/verified-bash-runtime.js.map +1 -1
  54. package/dist/guardrails/workspace-fingerprint.d.ts +2 -0
  55. package/dist/guardrails/workspace-fingerprint.d.ts.map +1 -1
  56. package/dist/guardrails/workspace-fingerprint.js +12 -10
  57. package/dist/guardrails/workspace-fingerprint.js.map +1 -1
  58. package/dist/index.d.ts +2 -0
  59. package/dist/index.d.ts.map +1 -1
  60. package/dist/index.js +1 -0
  61. package/dist/index.js.map +1 -1
  62. package/dist/main.d.ts.map +1 -1
  63. package/dist/main.js +7 -0
  64. package/dist/main.js.map +1 -1
  65. package/docs/advisory-selection.md +112 -0
  66. package/docs/book-to-skill.md +17 -0
  67. package/docs/docs.json +4 -0
  68. package/docs/index.md +2 -0
  69. package/docs/mcp.md +10 -2
  70. package/docs/release-audit-0.98.3.md +97 -0
  71. package/docs/run-protocol.md +3 -1
  72. package/docs/runtime-algorithms.md +19 -2
  73. package/docs/sdk.md +24 -1
  74. package/docs/security.md +4 -9
  75. package/examples/extensions/custom-provider-anthropic/index.ts +4 -1
  76. package/examples/extensions/custom-provider-anthropic/package-lock.json +2 -2
  77. package/examples/extensions/custom-provider-anthropic/package.json +1 -1
  78. package/examples/extensions/custom-provider-gitlab-duo/package.json +1 -1
  79. package/examples/extensions/gondolin/package-lock.json +2 -2
  80. package/examples/extensions/gondolin/package.json +1 -1
  81. package/examples/extensions/sandbox/package-lock.json +2 -2
  82. package/examples/extensions/sandbox/package.json +1 -1
  83. package/examples/extensions/with-deps/package-lock.json +2 -2
  84. package/examples/extensions/with-deps/package.json +1 -1
  85. package/npm-shrinkwrap.json +18 -18
  86. package/package.json +6 -6
@@ -0,0 +1,112 @@
1
+ # Advisory selection integrity
2
+
3
+ **Introduced in v0.98.3.** This strengthens the existing explicit SDK
4
+ `chooseWithAdvisoryJudge()` and `createModelAdvisoryJudge()` path. It does not add a default
5
+ AgentSession/TUI judge, start subagents, or activate the separate AdaptOrch service.
6
+
7
+ See [SDK usage](sdk.md#advisory-best-of-n-selection), [Run Protocol](run-protocol.md), and
8
+ [spec 021](https://github.com/dmae97/omk/blob/v0.98.3/specs/021-advisory-selection-integrity/spec.md).
9
+
10
+ ## Decision path
11
+
12
+ 1. Parse every caller-supplied `EvaluationResult`; admit only semantic `pass` candidates.
13
+ 2. Keep the caller's unique `deterministicRank`. Zero eligible candidates select nothing;
14
+ one selects that candidate without a judge call.
15
+ 3. Bound and force-redact the goal, rubric and eligible material before comparing.
16
+ 4. Honor cancellation before invoking the judge and after awaiting its response.
17
+ 5. The first-party model adapter requires an explicit normal `stop`, nonempty bounded text
18
+ and no tool calls. Complete JSON with `length`, `aborted`, `toolUse`, `error`, missing or
19
+ unknown completion metadata is not a completed evaluation.
20
+ 6. Accept only a complete matrix covering exactly the known candidate and criterion IDs.
21
+ Each score is an integer from 0 to 4; criterion weights remain unchanged.
22
+ 7. Select the highest weighted score. If the top group ties, select its lowest deterministic
23
+ rank, retaining `status: "selected"` but reporting `reason: "judge-tied"` and
24
+ `source: "deterministic"`. A unique top reports `judge-ranked` / `llm-judge`.
25
+
26
+ A tied top group is not the global fallback: if rank-zero A scores below tied B and C, choose
27
+ B or C by their explicit ranks, never A. No content hash, majority vote, or guessed confidence
28
+ replaces the caller's ranking policy.
29
+
30
+ ## Missing evidence is not a zero score
31
+
32
+ The built-in chooser attaches `diagnostics` on every returned decision. The property is optional
33
+ in the TypeScript contract so historical or caller-constructed decisions still type-check.
34
+
35
+ | Field | Meaning |
36
+ | --- | --- |
37
+ | `submittedCandidates` | Complete validated intake, including non-passes |
38
+ | `eligibleCandidates` | Number of deterministic passes |
39
+ | `excludedCandidates.fail` | Excluded semantic failures |
40
+ | `excludedCandidates.inconclusive` | Excluded unknown/incomplete semantic evaluations |
41
+ | `comparison` | `not-compared`, `unavailable`, `invalid`, or `scored` |
42
+ | `ranking.distinctScores` | Distinct weighted scores in an accepted matrix |
43
+ | `ranking.topScoreTieCount` | Candidates sharing its highest score |
44
+ | `ranking.scoreMargin` | Highest score minus second-ranked score, including ties |
45
+
46
+ `ranking` exists only when `comparison === "scored"`. Skipped, unavailable and invalid
47
+ comparisons do not invent a margin of zero. A valid all-zero matrix, by contrast, is scored
48
+ and tied. A score or margin is a rubric preference, not a probability of correctness.
49
+
50
+ Example diagnostics for two passing candidates that tie, with one failure and one unknown:
51
+
52
+ ```json
53
+ {
54
+ "submittedCandidates": 4,
55
+ "eligibleCandidates": 2,
56
+ "excludedCandidates": { "fail": 1, "inconclusive": 1 },
57
+ "comparison": "scored",
58
+ "ranking": { "distinctScores": 1, "topScoreTieCount": 2, "scoreMargin": 0 }
59
+ }
60
+ ```
61
+
62
+ No raw candidate material or provider exception text is added to the decision. Counts do not
63
+ establish independent corroboration: duplicate/correlated candidates are not automatically
64
+ deduplicated or treated as independent evidence.
65
+
66
+ ## Cancellation and failure
67
+
68
+ The first-party adapter checks cancellation before authentication, after authentication, and
69
+ after completion. A late normal response from a non-cooperative provider cannot become a usable
70
+ score after an observed abort. The chooser also checks before and after custom judge callbacks.
71
+ It cannot forcibly terminate an arbitrary callback; cancellation cooperation remains the
72
+ callback owner's responsibility.
73
+
74
+ `AdvisoryJudgeModelError("completion-failed")` remains the sanitized adapter error. The chooser
75
+ uses its existing `judge-unavailable` deterministic fallback. Malformed matrices use
76
+ `judge-response-invalid`. Neither is a failed task or new verification result. An abort fallback
77
+ is advice only; it does not authorize the caller to apply a patch after cancellation.
78
+
79
+ A custom `AdvisoryJudge` still returns raw score JSON. Its author owns provider completion
80
+ metadata; only `createModelAdvisoryJudge()` can enforce the first-party message envelope.
81
+ There are still no model retries or cache retention. No extra provider call is introduced.
82
+
83
+ ## Authority and activation
84
+
85
+ `parseEvaluationResult()` checks the record structure, not the truth of its evidence. Supply
86
+ trusted, fresh results from `evaluateTask()` and preserve receipt, workspace-freshness, isolation,
87
+ permission and release gates. The judge never changes an evaluation, waiver, observation or
88
+ `RuntimeDecision`; apply a selected candidate only through the caller's existing controls and
89
+ then rerun deterministic verification.
90
+
91
+ This is a local reliability/observability improvement, not measured general accuracy or a
92
+ calibrated publish/abstain policy. MC/scalar answer extraction, automatic continuation and
93
+ risk-bound enforcement are deliberately not inserted into the 0–4 rubric contract.
94
+
95
+ Install `open-multi-agent-kit@0.98.3` or build from the matching source tag.
96
+ An already-running process is not hot-patched. Use a new SDK process to load the updated
97
+ package; no setting or automatic TUI policy is enabled by this change.
98
+
99
+ ## Offline verification
100
+
101
+ ```bash
102
+ LIVE_E2E=0 node node_modules/vitest/dist/cli.js --run \
103
+ packages/coding-agent/test/advisory-judge.test.ts \
104
+ packages/coding-agent/test/advisory-judge-model.test.ts \
105
+ packages/coding-agent/test/advisory-judge-integrity.test.ts \
106
+ packages/coding-agent/test/advisory-judge-integrity.property.test.ts \
107
+ packages/protocol/test/protocol.test.ts
108
+ ```
109
+
110
+ These tests use injected completions and synthetic evaluations. They exercise the public SDK
111
+ and real model adapter without provider credentials, including non-normal terminal states,
112
+ cancellation, weighted ties, full intake accounting and seeded permutation properties.
@@ -44,6 +44,23 @@ The compile and update commands start an agent turn with the bundled workflow. T
44
44
 
45
45
  Generated personal skills default to `~/.omk/agent/skills/`; project skills use `.omk/skills/`. The workflow asks when scope is ambiguous.
46
46
 
47
+ ## Reading an OpenKB knowledge base
48
+
49
+ The package bundles a second skill, `openkb`, for the other shape of document knowledge: a wiki compiled by the [OpenKB](https://github.com/VectifyAI/OpenKB) CLI rather than a generated skill. It resolves the active knowledge base with `openkb status`, reads `wiki/index.md` to pick relevant slugs, then reads concept, entity, and summary pages and follows their wikilinks.
50
+
51
+ ```text
52
+ /skill:openkb
53
+ !openkb
54
+ ```
55
+
56
+ Routing between the two is fixed. Compiling a document into a reusable skill stays on `/book-to-skill-compile`, which produces a provenance record that `/book-to-skill-verify` checks; the `openkb` skill routes away from OpenKB's own Skill Factory so the request has one answer. Reading an already-compiled knowledge base is the `openkb` skill's job.
57
+
58
+ The skill is read-only by construction. Ingest (`openkb add`), removal, `lint --fix`, and the interactive and watch modes are proposed to the user with the exact command and its effect, never run on the agent's initiative. Compiled pages are model-generated from documents the user ingested, so the skill treats them as untrusted data rather than instructions, and prefers reading pages directly over `openkb query` — routing wiki text through a second model call gives an injected instruction another chance to be obeyed.
59
+
60
+ OpenKB is a separate Python CLI (3.10+) with its own model credentials. OMK installs neither, and the skill stops and says so when `openkb` is absent instead of guessing a path. Nothing is vendored from OpenKB; the skill is original prose pinned to an upstream commit, recorded in `skills/openkb/SOURCE.md` in the package.
61
+
62
+ Despite the similar name, this is unrelated to OMK's own [`openwiki/`](../../../README.md#repository-understanding) corpus, which is generated from source code rather than documents.
63
+
47
64
  ## Provenance and verification
48
65
 
49
66
  After generation, the skill runs the upstream advisory scanner and records `.book-to-skill-provenance.json`. The bundled workflow resolves `scripts/provenance.mjs` from the skill directory, so it does not depend on an npm bin path. If `omk-book-to-skill` is on `PATH`, the standalone CLI can repeat the checks:
package/docs/docs.json CHANGED
@@ -64,6 +64,10 @@
64
64
  "title": "Extensions",
65
65
  "path": "extensions.md"
66
66
  },
67
+ {
68
+ "title": "Extension Security",
69
+ "path": "security.md"
70
+ },
67
71
  {
68
72
  "title": "Skills",
69
73
  "path": "skills.md"
package/docs/index.md CHANGED
@@ -49,8 +49,10 @@ For the full first-run flow, see [Quickstart](quickstart.md).
49
49
  ## Customization
50
50
 
51
51
  - [Extensions](extensions.md) - TypeScript modules for tools, commands, events, and custom UI.
52
+ - [Extension security](security.md) - the extension runtime threat model and what a loaded extension can reach.
52
53
  - [Skills](skills.md) - Agent Skills for reusable on-demand capabilities.
53
54
  - [Book to Skill](book-to-skill.md) - optional document-to-skill compiler with local provenance checks.
55
+ - [MCP](mcp.md) - attach Model Context Protocol servers and expose their tools to the model.
54
56
  - [Prompt templates](prompt-templates.md) - reusable prompts that expand from slash commands.
55
57
  - [Themes](themes.md) - built-in and custom terminal themes.
56
58
  - [OMK packages](packages.md) - bundle and share extensions, skills, prompts, and themes.
package/docs/mcp.md CHANGED
@@ -47,6 +47,14 @@ Servers are read from three files, later wins on a name collision:
47
47
 
48
48
  ## Using it
49
49
 
50
+ The `omk` CLI calls `attachMcpServers()` for every session it creates —
51
+ interactive, `-p`, and RPC, including `/new`, `/resume`, and forks — so a
52
+ configured server's tools reach the model without further setup. A server that
53
+ fails to start is reported as a startup warning and the session continues.
54
+ `--help` and `--list-models` never spawn servers.
55
+
56
+ SDK callers attach explicitly:
57
+
50
58
  ```ts
51
59
  const status = await session.attachMcpServers();
52
60
  // [{ name: "playwright", state: "ready", toolCount: 24, serverVersion: "1.62.0" }]
@@ -54,8 +62,8 @@ const status = await session.attachMcpServers();
54
62
  session.getToolDefinition("playwright__navigate");
55
63
  ```
56
64
 
57
- - **Nothing is spawned until `attachMcpServers()` is called.** A workspace can
58
- configure 25 servers without paying for them at startup.
65
+ - **Nothing is spawned until `attachMcpServers()` is called.** An SDK session
66
+ can configure 25 servers without paying for them until it attaches.
59
67
  - Tools are exposed as `<server>__<tool>`, truncated to 64 characters with the
60
68
  server prefix preserved.
61
69
  - A built-in tool always wins a name collision; MCP can never shadow `bash`.
@@ -0,0 +1,97 @@
1
+ # Release audit: v0.98.3
2
+
3
+ Date: 2026-09-06. Target: seven lockstep npm packages, GitHub Release and a tag on `main`.
4
+ This audit is release engineering evidence, not algorithm accuracy or correctness proof.
5
+
6
+ ## Source and scope
7
+
8
+ The published v0.98.2 tag was `7e10858f5ecfeee1eea5364a2f21336c5c416f11`.
9
+ The working algorithm branch at `60f520f0c103888ef27438ac5058bdfc78b3e409` had forked before
10
+ that release and still declared 0.98.1. Its four committed evidence-library changes were
11
+ merged with remote main `92dca0f598243a38de156bbe4d099e3e60414cb6` in a separate clean
12
+ publication checkout. The merge preserves the original release ancestry; it does not move
13
+ the v0.98.2 tag or rewrite published changelogs.
14
+
15
+ Included new work:
16
+
17
+ - the four committed trace/effect/claim-closure/VERA projection changes;
18
+ - the reviewed advisory SDK integrity patch, tests and specification;
19
+ - release-facing documentation, manifest/lock/shrinkwrap alignment and publication-auth truth.
20
+
21
+ Excluded: unrelated uncommitted provider integrations, UI, context-init and reverse-skill
22
+ changes, private agent-home material, the untracked algorithm-copy document, research data,
23
+ sessions, local temporary output and optional generated wiki corpora. The original dirty
24
+ working tree was not reset, stashed, broadly staged or copied into the release.
25
+
26
+ ## Public package manifest
27
+
28
+ | Package | Version | Role |
29
+ | --- | --- | --- |
30
+ | `open-multi-agent-kit` | `0.98.3` | CLI and explicit advisory/evidence SDK |
31
+ | `omk-ai` | `0.98.3` | Provider API; lockstep, no catalog refresh in this release |
32
+ | `omk-agent-core` | `0.98.3` | Runtime; internal trace/effect primitives |
33
+ | `omk-tui` | `0.98.3` | TUI; lockstep |
34
+ | `omk-protocol` | `0.98.3` | Run and claim-closure contracts |
35
+ | `omk-adaptorch-wpl` | `0.98.3` | Explicit WPL and proof/VERA projections |
36
+ | `omk-book-to-skill` | `0.98.3` | Optional document compiler; lockstep |
37
+
38
+ The root/workspace manifests, internal dependency ranges, root/example lockfiles,
39
+ book compiler version constant and CLI `npm-shrinkwrap.json` are synchronized.
40
+ Model catalogs are not fetched or regenerated. No API is intentionally removed.
41
+ The new `judge-tied` reason and stricter normal-stop requirement are documented in
42
+ [Advisory selection integrity](advisory-selection.md).
43
+
44
+ ## Changelog and document audit
45
+
46
+ - Each public package has a changelog; new protocol/book changelogs explicitly state their
47
+ historical limits instead of fabricating entries for old versions.
48
+ - Root/package README release links and document-compiler install pins name v0.98.3.
49
+ - The runtime-algorithm audit distinguishes its historical v0.97.0 snapshot from subsequent
50
+ v0.98.0 guards and the new v0.98.3 library scope.
51
+ - Internal agent modules are not advertised as default runtime authority or root exports.
52
+ - The actual workflow is token-authenticated GitHub CI. The earlier constitution claimed
53
+ OIDC despite an existing token-only job. A failing-first test exposed that mismatch; the
54
+ documentation now matches the unchanged workflow. No token was read or replaced.
55
+
56
+ ## Local verification
57
+
58
+ The first full keyless pass used an isolated temporary HOME. All affected tests passed but
59
+ one Rust diagnostics test could not find its rustup toolchain. Supplying the non-secret
60
+ `RUSTUP_HOME` path restored that fixture: 6/6 diagnostics tests passed. No production code
61
+ was changed to suppress this environment failure. Final release checks are run again on the
62
+ bumped candidate with the isolated HOME and explicit toolchain path.
63
+
64
+ Final local results on the 0.98.3 candidate:
65
+
66
+ | Gate | Result |
67
+ | --- | --- |
68
+ | Seven-workspace build | PASS |
69
+ | `npm run check` | PASS; informational legacy switch-case findings only |
70
+ | `check-release-consistency --release` | PASS; v0.98.2 ancestor, all surfaces 0.98.3, no drift |
71
+ | Full keyless workspace tests | 7,124 passed, 821 skipped, 0 failed |
72
+ | Test breakdown | WPL 116, agent 640, AI 487, book compiler 22, coding-agent 5,109, protocol 25, TUI 725 |
73
+ | Go initcheck vet/race/shuffle + native symbol validation | PASS |
74
+ | Committed algorithm/staged patch gitleaks | No leaks found |
75
+ | Seven npm dry-run packs | 0.98.3, each carries CHANGELOG.md, restricted-path matches 0 |
76
+ | Existing five changelog histories from v0.98.2 | Byte-preserved |
77
+ | Clean-environment compiled CLI | Reports 0.98.3 |
78
+
79
+ The first tarball inspection exposed that six package `files` allowlists omitted changelogs.
80
+ A failing-first release test now requires each public package to ship its current dated
81
+ changelog; all six allowlists were corrected. The publication helper's misleading automatic
82
+ CI-provenance message was also corrected without changing authentication behavior.
83
+
84
+ An inherited `OMK_PACKAGE_DIR` pointed the local smoke command at older package metadata.
85
+ Unsetting only that override changed its reported version from 0.98.1 to 0.98.3, and a fully
86
+ clean environment confirmed 0.98.3. The override was not changed globally; the isolated build
87
+ and package manifests are the release subject.
88
+
89
+ A local pass is not a completed npm publication: the matching tag workflow must still pass,
90
+ and npm `latest` plus GitHub Release must agree on the version.
91
+
92
+ ## Publication boundary
93
+
94
+ The existing `build-binaries.yml` workflow verifies source/tag identity, builds six platform
95
+ archives, validates and publishes npm packages, then creates the GitHub Release. Publishing
96
+ uses the existing environment-scoped granular token; OIDC/Sigstore provenance is not claimed.
97
+ No local `npm publish`, credential rotation, gate bypass or force-push is part of this release.
@@ -69,7 +69,9 @@ Required, unwaived violations reduce to `fail`. Required, unwaived missing obser
69
69
 
70
70
  Candidate material, the task goal, and rubric descriptions are forced-redacted and bounded before the judge receives them. The model adapter uses a tool-free prompt, treats candidate text as untrusted data, disables retries and cache retention, and accepts only a complete matrix of known candidate and criterion IDs. A provider error, timeout, malformed JSON, unknown ID, or incomplete score matrix selects the existing deterministic first choice and reports a sanitized fallback reason.
71
71
 
72
- The sidecar never creates an `Observation`, changes `EvaluationResult.semanticVerdict`, supplies independent-verifier evidence, waives a claim, or changes `RuntimeDecision`. Run fresh tests, integrity checks, security gates, and evidence freshness checks after applying the selected candidate.
72
+ Since v0.98.3, the first-party model adapter requires a normal `stop`, cancellation discards late advice, and top-score ties report their deterministic rank source. Diagnostic counts preserve intake and missingness; they are not independent verification. See [Advisory selection integrity](advisory-selection.md).
73
+
74
+ The sidecar never creates an `Observation`, changes `EvaluationResult.semanticVerdict`, supplies independent-verifier evidence, waives a claim, or changes `RuntimeDecision`. Parsing the evaluation checks structure, not the truth of its evidence. Run fresh tests, integrity checks, security gates, and evidence freshness checks after applying the selected candidate.
73
75
 
74
76
  ## Waivers
75
77
 
@@ -1,7 +1,24 @@
1
1
  # Runtime Algorithms and Direction
2
2
 
3
- This page separates OMK's released behavior from internal mechanisms, current
4
- working-tree candidates, and proposals. Source and tests remain authoritative.
3
+ ## v0.98.3 release delta (2026-09-06)
4
+
5
+ The explicit advisory SDK requires normal first-party model completion, honors cancellation,
6
+ reports caller-rank top ties, and preserves intake/missingness diagnostics. See
7
+ [Advisory selection integrity](advisory-selection.md). No default AgentSession/TUI judge,
8
+ additional completion calls/retries, or calibrated risk policy is activated.
9
+
10
+ `omk-protocol` also exports Claim Closure Graph v1 evaluation; `omk-adaptorch-wpl` exports
11
+ proof-result/VERA projections. They consume caller-supplied evidence, not authenticated
12
+ runner truth. The operation-trace and Effect Journal V2 modules in `omk-agent-core` remain
13
+ internal primitives: this release does not wire them into a new live authority loop.
14
+
15
+ The dated audit below preserves the v0.97.0 baseline and its then-working-tree classifications.
16
+ The context floors, explicit-rule compactor, resource report, settlement notifications and
17
+ OpenWiki guards described as working-tree changes below subsequently shipped in v0.98.0.
18
+ That does not ship a generated OpenWiki corpus or promote the blocked lane/memory policies.
19
+ Source and tests remain authoritative.
20
+
21
+ ## Historical v0.97.0 baseline audit
5
22
 
6
23
  - **Snapshot date:** 2026-08-27
7
24
  - **Released baseline:** OMK `v0.97.0` (`b38a2c8c84`)
package/docs/sdk.md CHANGED
@@ -1248,9 +1248,30 @@ Ledger and receipt publication are fail-closed but not one filesystem transactio
1248
1248
  ### Freshness, ledger load, and store hardening
1249
1249
 
1250
1250
  - **Freshness** compares only the caller-selected artifact set (`WorkspaceScope.artifactPaths`). It issues no Git command and carries no Git fingerprint.
1251
+ - **Scope completeness**: a session scope is bounded on purpose, so a receipt captured from one proves its selected paths and nothing more. `resolveSessionWorkspaceScopeReport(cwd)` returns the scope together with what it could not bind, and `SessionBashRuntime.workspaceScopeReport()` exposes the same for the current session.
1251
1252
  - **Ledger**: `ReplayLedgerManager` verifies an existing ledger on construction (sequence order, prev-hash chain, payload hash, event hash) and **fails closed** on any violation.
1252
1253
  - **Store**: `EvidenceReceiptStore` uses an owner-only directory, symlink rejection, no-overwrite hard-link publication, and identity rechecks to detect observed path replacement. These checks assume same-UID path mutation is quiescent; they are **not** filesystem sandbox isolation.
1253
1254
 
1255
+ ### Session scope completeness
1256
+
1257
+ `resolveSessionWorkspaceScope()` drops dirty paths two ways: a hard cap (32 by default) that keeps one enormous working tree from stalling every receipt, and the normalized-path filter the receipt parser forces, which rejects names carrying a backslash, `..`, or an empty segment. Both drops are deliberate; reporting them is what stops a partial view from reading like a whole-workspace proof.
1258
+
1259
+ `resolveSessionWorkspaceScopeReport(cwd, options?)` returns:
1260
+
1261
+ | Field | Meaning |
1262
+ | --- | --- |
1263
+ | `scope` | Exactly what `resolveSessionWorkspaceScope()` returns |
1264
+ | `totalDirtyPathCount` | Unique dirty entries Git reported, before the cap and the filter |
1265
+ | `selectedPathCount` | Entries the scope binds (`scope.artifactPaths.length`) |
1266
+ | `excludedPathCount` | Unique dirty entries no receipt can bind |
1267
+ | `truncated` | True when the cap, not the filter, kept an eligible path out |
1268
+ | `completeness` | `complete`, `partial_truncated`, `partial_excluded`, or `unavailable` |
1269
+ | `excludedPathSetSha256` | Digest of the sorted excluded set; absent when nothing was excluded |
1270
+
1271
+ `unavailable` is not `complete`: outside a worktree, or when Git cannot be read, nothing was enumerated, so the empty artifact set is an absence of evidence rather than evidence of a clean tree. Truncation outranks exclusion in `completeness` because an excluded path is named by the digest while a capped one is an unbounded unknown.
1272
+
1273
+ The report is cached per `(cwd, maxPaths)` for one second, so a capped probe never serves a later full request a truncated answer.
1274
+
1254
1275
  ### Protocol-first semantic evaluation
1255
1276
 
1256
1277
  New integrations should use `TaskSpec`, `ExecutionAttempt`, `Observation`, `EvaluationResult`, `RuntimeDecision`, and `WaiverRecord` from `omk-protocol`. `evaluateTask()` derives the semantic verdict from current observations; `reduceRuntimeDecision()` derives the next runtime action. See [Run Protocol v1](run-protocol.md) for the rules and current migration boundary.
@@ -1288,7 +1309,9 @@ const decision = await chooseWithAdvisoryJudge({
1288
1309
 
1289
1310
  The sidecar makes no call when zero or one candidate passes. For multiple passing candidates it sends only bounded, forced-redacted material through a tool-free request and requires a complete 0–4 score matrix. Invalid output or provider failure returns `status: "fallback"` with the deterministic first candidate and a sanitized reason. It never persists model prose. Re-run fresh deterministic gates after applying the selected result.
1290
1311
 
1291
- `createModelAdvisoryJudge()` resolves current auth through `ModelRegistry` for each explicit call, uses no cache retention, and performs no model retry. Tests can inject `AdvisoryJudgeCompletion`; production defaults to `completeSimple()`.
1312
+ **Since v0.98.3:** the first-party `createModelAdvisoryJudge()` adapter requires an explicit normal `stop`; valid JSON from truncated, aborted or missing completion metadata cannot supply scores. The chooser checks cancellation before and after judge work. Top-score ties retain the caller's deterministic rank but report `judge-tied` / `deterministic`. Additive `diagnostics` preserve submitted/eligible/excluded counts and distinguish unmeasured comparisons from scored ties. See [Advisory selection integrity](advisory-selection.md).
1313
+
1314
+ `createModelAdvisoryJudge()` resolves current auth through `ModelRegistry` for each non-aborted explicit call, uses no cache retention, and performs no model retry. Tests can inject `AdvisoryJudgeCompletion`; production defaults to `completeSimple()`. Custom judges still own completion metadata. This remains an explicit SDK API, not a default AgentSession/TUI judge.
1292
1315
 
1293
1316
  ### Durable-goal seam checkpoints
1294
1317
 
package/docs/security.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Extension Runtime Threat Model
2
2
 
3
3
  > **Scope**: This document covers every OMK extension. OMK does not currently provide extension permission tiers or an extension-specific OS sandbox.
4
- >
5
- > **Version**: 0.96.1
6
4
 
7
5
  ## 1. Overview
8
6
 
@@ -126,10 +124,7 @@ If a malicious or compromised extension is suspected:
126
124
 
127
125
  ## 8. References
128
126
 
129
- - OMK Extension Manifest Specification: `packages/coding-agent/docs/extensions.md`
130
- - OMK Session Format: `packages/coding-agent/docs/session-format.md`
131
- - OMK Settings and Configuration: `packages/coding-agent/docs/settings.md`
132
-
133
- ---
134
-
135
- *Last updated: 2026-08-19*
127
+ - [Extensions](extensions.md) - extension manifest, loading, and the tool/command API.
128
+ - [Session format](session-format.md) - what a session file records on disk.
129
+ - [Settings](settings.md) - global and project configuration.
130
+ - [Containerization](containerization.md) - running the whole process under an OS sandbox.
@@ -375,7 +375,10 @@ function streamCustomAnthropic(
375
375
  accept: "application/json",
376
376
  "anthropic-dangerous-direct-browser-access": "true",
377
377
  "anthropic-beta": `claude-code-20250219,oauth-2025-04-20,${betaFeatures.join(",")}`,
378
- "user-agent": "claude-cli/2.1.2 (external, cli)",
378
+ // Anthropic gates newer models on this version (400
379
+ // claude_code_version_too_old). Canonical value: CLAUDE_CODE_VERSION
380
+ // in omk-ai (packages/ai/src/utils/claude-code-identity.ts).
381
+ "user-agent": "claude-cli/2.1.258 (external, cli)",
379
382
  "x-app": "cli",
380
383
  };
381
384
  } else {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "omk-extension-custom-provider-anthropic",
3
- "version": "0.98.1",
3
+ "version": "0.98.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-custom-provider-anthropic",
9
- "version": "0.98.1",
9
+ "version": "0.98.3",
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.98.1",
4
+ "version": "0.98.3",
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.98.1",
4
+ "version": "0.98.3",
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.98.1",
3
+ "version": "0.98.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-gondolin",
9
- "version": "0.98.1",
9
+ "version": "0.98.3",
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.98.1",
4
+ "version": "0.98.3",
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.98.1",
3
+ "version": "0.98.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-sandbox",
9
- "version": "0.98.1",
9
+ "version": "0.98.3",
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.98.1",
4
+ "version": "0.98.3",
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-with-deps",
3
- "version": "0.98.1",
3
+ "version": "0.98.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "omk-extension-with-deps",
9
- "version": "0.98.1",
9
+ "version": "0.98.3",
10
10
  "dependencies": {
11
11
  "ms": "2.1.3"
12
12
  },
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "omk-extension-with-deps",
3
3
  "private": true,
4
- "version": "0.98.1",
4
+ "version": "0.98.3",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "clean": "echo 'nothing to clean'",
@@ -1,17 +1,17 @@
1
1
  {
2
2
  "name": "open-multi-agent-kit",
3
- "version": "0.98.1",
3
+ "version": "0.98.3",
4
4
  "lockfileVersion": 3,
5
5
  "requires": true,
6
6
  "packages": {
7
7
  "": {
8
8
  "name": "open-multi-agent-kit",
9
- "version": "0.98.1",
9
+ "version": "0.98.3",
10
10
  "license": "MIT",
11
11
  "dependencies": {
12
- "omk-agent-core": "^0.98.1",
13
- "omk-ai": "^0.98.1",
14
- "omk-tui": "^0.98.1",
12
+ "omk-agent-core": "^0.98.3",
13
+ "omk-ai": "^0.98.3",
14
+ "omk-tui": "^0.98.3",
15
15
  "@silvia-odwyer/photon-node": "0.3.4",
16
16
  "canonicalize": "4.0.0",
17
17
  "chalk": "5.6.2",
@@ -27,8 +27,8 @@
27
27
  "typebox": "1.3.11",
28
28
  "undici": "8.10.0",
29
29
  "yaml": "2.9.0",
30
- "omk-adaptorch-wpl": "^0.98.1",
31
- "omk-protocol": "^0.98.1"
30
+ "omk-adaptorch-wpl": "^0.98.3",
31
+ "omk-protocol": "^0.98.3"
32
32
  },
33
33
  "optionalDependencies": {
34
34
  "@mariozechner/clipboard": "0.3.9"
@@ -1285,19 +1285,19 @@
1285
1285
  }
1286
1286
  },
1287
1287
  "node_modules/omk-adaptorch-wpl": {
1288
- "version": "0.98.1",
1289
- "resolved": "https://registry.npmjs.org/omk-adaptorch-wpl/-/omk-adaptorch-wpl-0.98.1.tgz",
1288
+ "version": "0.98.3",
1289
+ "resolved": "https://registry.npmjs.org/omk-adaptorch-wpl/-/omk-adaptorch-wpl-0.98.3.tgz",
1290
1290
  "license": "MIT",
1291
1291
  "engines": {
1292
1292
  "node": ">=22.19.0"
1293
1293
  }
1294
1294
  },
1295
1295
  "node_modules/omk-agent-core": {
1296
- "version": "0.98.1",
1297
- "resolved": "https://registry.npmjs.org/omk-agent-core/-/omk-agent-core-0.98.1.tgz",
1296
+ "version": "0.98.3",
1297
+ "resolved": "https://registry.npmjs.org/omk-agent-core/-/omk-agent-core-0.98.3.tgz",
1298
1298
  "license": "MIT",
1299
1299
  "dependencies": {
1300
- "omk-ai": "^0.98.1",
1300
+ "omk-ai": "^0.98.3",
1301
1301
  "ignore": "7.0.6",
1302
1302
  "typebox": "1.3.11",
1303
1303
  "yaml": "2.9.0"
@@ -1307,8 +1307,8 @@
1307
1307
  }
1308
1308
  },
1309
1309
  "node_modules/omk-ai": {
1310
- "version": "0.98.1",
1311
- "resolved": "https://registry.npmjs.org/omk-ai/-/omk-ai-0.98.1.tgz",
1310
+ "version": "0.98.3",
1311
+ "resolved": "https://registry.npmjs.org/omk-ai/-/omk-ai-0.98.3.tgz",
1312
1312
  "license": "MIT",
1313
1313
  "dependencies": {
1314
1314
  "@anthropic-ai/sdk": "0.91.1",
@@ -1330,16 +1330,16 @@
1330
1330
  }
1331
1331
  },
1332
1332
  "node_modules/omk-protocol": {
1333
- "version": "0.98.1",
1334
- "resolved": "https://registry.npmjs.org/omk-protocol/-/omk-protocol-0.98.1.tgz",
1333
+ "version": "0.98.3",
1334
+ "resolved": "https://registry.npmjs.org/omk-protocol/-/omk-protocol-0.98.3.tgz",
1335
1335
  "license": "MIT",
1336
1336
  "engines": {
1337
1337
  "node": ">=22.19.0"
1338
1338
  }
1339
1339
  },
1340
1340
  "node_modules/omk-tui": {
1341
- "version": "0.98.1",
1342
- "resolved": "https://registry.npmjs.org/omk-tui/-/omk-tui-0.98.1.tgz",
1341
+ "version": "0.98.3",
1342
+ "resolved": "https://registry.npmjs.org/omk-tui/-/omk-tui-0.98.3.tgz",
1343
1343
  "license": "MIT",
1344
1344
  "dependencies": {
1345
1345
  "get-east-asian-width": "1.6.0",