chainlesschain 0.166.156 → 0.166.159

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/README.md CHANGED
@@ -1,20 +1,24 @@
1
1
  # chainlesschain CLI
2
2
 
3
+ Documentation checked 2026-11-20 against release source `0ad9968f0498fce77e538f6e5e64bba35db184c8`; public CLI is **0.166.157**, paired with public Open VSX **0.37.193** and JetBrains **0.4.208**, both recommending CLI **0.166.157**. Historical PC/mobile .145 download URLs remain unavailable. [Current installation and limits](https://docs.chainlesschain.com/chainlesschain/cli-ide-update-2026-11-19-157.html).
4
+
3
5
  Command-line interface for installing, configuring, and managing [ChainlessChain](https://www.chainlesschain.com), including the coding agent, governed tools, sessions, memory, and IDE integrations.
4
6
 
5
- ## CLI 0.166.156 release candidate (2026-11-18)
7
+ ## Next release candidate: CLI 0.166.159 (2026-11-21)
8
+
9
+ CLI **0.166.159** is a source candidate and is not public yet. It restores supported macOS 15 release runners and fixes the DMM-09 native SQLite business acceptance drill from unpublished candidate .158. The drill uses a consistent fixture clock, derives acceptance counts from stored records, closes SQLite after errors, and checks incomplete-outcome refusal, durable completion evidence, database-reopen recovery and idempotent replay. Publish only after the exact CLI CI and Strict Sandbox matrices pass, then use Actions OIDC and public npm readback. The paired IDE candidates are Open VSX **0.37.194** and JetBrains **0.4.209**; native clients remain outside this release. The immutable .158 tag is retained as a failed candidate.
6
10
 
7
- CLI **0.166.156** fixes LK model selection and account queries using the current API catalog: 202 models, including 86 chat models. The OpenAI-compatible default is `gpt-6.1-sol`; primary `https://api.vv666.ai`, backup `https://api.lk666.ai`. Retired aliases migrate to the same model family. Publication requires complete exact-source CLI CI and Strict Sandbox matrices, Actions OIDC and public registry readback. Until verified, the public CLI remains **0.166.150**.
11
+ ## Public CLI 0.166.157 (2026-11-20)
8
12
 
9
- Child npm versions remain unchanged. The new pairing is VS Code **0.37.192** / JetBrains **0.4.207**, after CLI publication. Install `npm i -g chainlesschain@0.166.156 --registry https://registry.npmjs.org` after registry verification, restart IDE hosts, then run `cc --version`. Native installers and media task execution are outside this release. [Release scope](../../docs-site/docs/chainlesschain/cli-ide-update-2026-11-18-156.md).
13
+ CLI **0.166.157** is public on npm from exact source `0ad9968f0498fce77e538f6e5e64bba35db184c8`. The GitHub Actions OIDC release workflow passed the exact SHA gate, all required CLI CI and Strict Sandbox gates, immutable tarball verification, signed npm provenance and public registry readback. Install `npm i -g chainlesschain@0.166.157 --registry https://registry.npmjs.org`, restart IDE hosts, then run `cc --version`. The release adds the governed evolution storage audit and is paired with the public IDE releases **0.37.193** and **0.4.208**; native clients remain outside this release. [Publication evidence](../../docs/research/cli/evidence/release157-public/chainlesschain-release.json) · [npm provenance](../../docs/research/cli/evidence/release157-public/chainlesschain-npm-provenance.json) · [public registry readback](../../docs/research/cli/evidence/release157-public/chainlesschain-npm-readback.json).
10
14
 
11
- ## Public CLI 0.166.150 / IDE pairing (2026-11-15)
15
+ ## Historical CLI 0.166.150 / IDE pairing (2026-11-15)
12
16
 
13
- CLI **0.166.150** is public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43642085522). Exact source `b2af25c65d34f1ee34cdddf308b5a8e57bb4f198` passed all configured CLI CI and Strict Sandbox jobs on Linux, Windows and macOS. Public archive byte identity, signed provenance and registry-only child dependencies are verified.
17
+ CLI **0.166.150** is a candidate and is not public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43642085522). Exact source `b2af25c65d34f1ee34cdddf308b5a8e57bb4f198` passed all configured CLI CI and Strict Sandbox jobs on Linux, Windows and macOS. Public archive byte identity, signed provenance and registry-only child dependencies are verified.
14
18
 
15
19
  Install `npm i -g chainlesschain@0.166.150 --registry https://registry.npmjs.org`, restart CLI/IDE hosts, then run `cc --version` and `cc doctor`.
16
20
 
17
- Open VSX **0.37.189** is [public](https://github.com/chainlesschain/chainlesschain/actions/runs/43646453630) and byte-identical to the official VSIX. JetBrains **0.4.204** is publicly verified. Both recommend CLI **0.166.150**. Child package versions remain unchanged. Microsoft Marketplace is not published by these tag workflows; public PC/mobile clients remain **v5.0.3.145**.
21
+ Open VSX **0.37.189** is [public](https://github.com/chainlesschain/chainlesschain/actions/runs/43646453630) and byte-identical to the official VSIX. JetBrains **0.4.204** is a candidate and is not publicly verified. Both recommend CLI **0.166.150**. Child package versions remain unchanged. Microsoft Marketplace is not published by these tag workflows; public PC/mobile clients remain **v5.0.3.145**.
18
22
 
19
23
  This release adds fresh LK model prices, balance, Key quota and actual API billing (`cc llm account`), plus saved credentials for every configured channel, including Volcengine. Saved connections restore the Key when switching back; LK hosts and protocols share one credential. Desktop source supports the same account queries and encrypted connection history; a new desktop installer is not part of this release.
20
24
 
@@ -26,29 +30,29 @@ CLI setup, `cc ui` and IDE settings offer the LK primary/backup endpoints and 83
26
30
 
27
31
  Development after the historical .149 release added original source-journal and manifest-witness directory checks to retained-history reports, including rechecks after final journal verification. These changes were unreleased at the .149 snapshot; the current .150 source includes them. Legacy single-file witnesses report only their original state directory; wrapped/custom manifest witnesses remain usable without claiming original-directory ownership. Directory metadata does not establish complete retention/storage graphs or production authority; automatic promotion remains **HOLD**. [Implementation progress, section 40](../../docs/research/agents/rrsi-implementation-progress-2026-10-07.md).
28
32
 
29
- CLI **0.166.149** is public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43475425890). Exact source `168a3d561b5a16e9d27b060944c63b2264c99df0` passed all **76 CLI CI** and **6 Strict Sandbox** jobs on all configured systems. The official workflow verified child registry bytes, registry-only dependencies and CLI provenance. An independent public download is byte-identical to the immutable official tarball. [Publication evidence](../../docs/research/cli/evidence/release149-public/publication.json).
33
+ CLI **0.166.149** is a candidate and is not public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43475425890). Exact source `168a3d561b5a16e9d27b060944c63b2264c99df0` passed all **76 CLI CI** and **6 Strict Sandbox** jobs on all configured systems. The official workflow verified child registry bytes, registry-only dependencies and CLI provenance. An independent public download is byte-identical to the immutable official tarball. [Publication evidence](../../docs/research/cli/evidence/release149-public/publication.json).
30
34
 
31
35
  Install `npm i -g chainlesschain@0.166.149 --registry https://registry.npmjs.org`, restart CLI/IDE hosts, then run `cc --version` and `cc doctor`.
32
36
 
33
37
  This version binds retained observed-text and signed-anchor history to genuine original catalog/head directory boundaries, including a recheck after final journal verification. Temporary reports add manifestDirectoryBoundaryDigest, manifestDirectoryBoundaryRechecked and manifestBoundaryScope; persistent schemas, signatures, CAS and localCompositionDigest remain unchanged. Custom or wrapped backends cannot claim original-directory ownership.
34
38
 
35
- Open VSX **0.37.188** is public through its [official tag workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43478454182), with complete native, Remote-SSH and browser gates. Independent public readback confirms the VSIX is listed, downloadable and byte-identical to the official candidate. It recommends CLI **0.166.149**. JetBrains **0.4.203** also recommends CLI **0.166.149** and has been uploaded and awaits Marketplace approval and public download verification; verified public JetBrains **0.4.202** retains CLI **0.166.148** pairing. Agent Protocol **0.1.13**, Agent SDK **0.2.18**, Context/Memory Kernel **0.1.12** and Session Core **0.3.27** remain unchanged.
39
+ Open VSX **0.37.188** is a candidate and is not public through its [official tag workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43478454182), with complete native, Remote-SSH and browser gates. Independent public readback confirms the VSIX is listed, downloadable and byte-identical to the official candidate. It recommends CLI **0.166.149**. JetBrains **0.4.203** also recommends CLI **0.166.149** and has been uploaded and awaits Marketplace approval and public download verification; verified public JetBrains **0.4.202** retains CLI **0.166.148** pairing. Agent Protocol **0.1.13**, Agent SDK **0.2.18**, Context/Memory Kernel **0.1.12** and Session Core **0.3.27** remain unchanged.
36
40
 
37
41
  The [upgrade guide](../../docs-site/docs/chainlesschain/cli-ide-update-2026-11-13-149.md) records each channel separately. This release checks local directory metadata. Complete runtime producer/storage graphs, independent installer/pins, A/B/C evaluation, business effects and automatic promotion remain incomplete; productionAuthority and runtimeEvidence remain false, and automaticPromotion remains **HOLD**. No new model-task acceptance is claimed. Microsoft Marketplace remains deferred; public PC/mobile clients remain **v5.0.3.145**. **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain.
38
42
 
39
43
  ## Previous public CLI 0.166.148 / verified IDE pairing (2026-11-13)
40
44
 
41
- CLI **0.166.148** is public through [Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43314842279), including public archive/provenance and registry-only dependency verification. Exact source `146b3fbd438eece981aa14327d9481156683acd4` passed all 76 CLI CI and six Strict Sandbox jobs. Install `npm i -g chainlesschain@0.166.148 --registry https://registry.npmjs.org`, restart hosts, then run `cc --version` and `cc doctor`.
45
+ CLI **0.166.148** is a candidate and is not public through [Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/43314842279), including public archive/provenance and registry-only dependency verification. Exact source `146b3fbd438eece981aa14327d9481156683acd4` passed all 76 CLI CI and six Strict Sandbox jobs. Install `npm i -g chainlesschain@0.166.148 --registry https://registry.npmjs.org`, restart hosts, then run `cc --version` and `cc doctor`.
42
46
 
43
- Open VSX **0.37.187** is public through its [official workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43319226240). JetBrains **0.4.202** completed its [official publication workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43323403954) and is now approved, listed and not hidden in the Marketplace API. Both recommend CLI **0.166.148**. Microsoft Marketplace remains unpublished. This release exposes the CLI-owned capability state; productionAuthority and runtimeEvidence remain false, and automaticPromotion remains HOLD.
47
+ Open VSX **0.37.187** is a candidate and is not public through its [official workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43319226240). JetBrains **0.4.202** completed its [official publication workflow](https://github.com/chainlesschain/chainlesschain/actions/runs/43323403954) and is now approved, listed and not hidden in the Marketplace API. Both recommend CLI **0.166.148**. Microsoft Marketplace remains unpublished. This release exposes the CLI-owned capability state; productionAuthority and runtimeEvidence remain false, and automaticPromotion remains HOLD.
44
48
 
45
49
  ## Public CLI 0.166.147 / IDE pairing (2026-11-12)
46
50
 
47
51
  This version retains original manifest catalog/head ownership through Evolution Ledger factories, rejecting substituted directories and mixed head ports while preserving custom-backend behavior. These local storage capabilities do not grant promotion authority. The separate original 36-task plus nine-first-run evaluation retains fixed source, model, budgets and independent acceptance; preparation is not a new task-completion result.
48
52
 
49
- CLI **0.166.147** is public through [Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/42976618525). Exact source `32451e4d568e414acdb9c956208e5cff827cd6e0` passed all **76 CLI CI** and **6 Strict Sandbox** jobs. The [public readback](https://github.com/chainlesschain/chainlesschain/actions/runs/43032767673) verified npm provenance and byte identity with the official immutable tarball. Install `npm i -g chainlesschain@0.166.147 --registry https://registry.npmjs.org`, restart hosts, then run `cc --version` and `cc doctor`.
53
+ CLI **0.166.147** is a candidate and is not public through [Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/42976618525). Exact source `32451e4d568e414acdb9c956208e5cff827cd6e0` passed all **76 CLI CI** and **6 Strict Sandbox** jobs. The [public readback](https://github.com/chainlesschain/chainlesschain/actions/runs/43032767673) verified npm provenance and byte identity with the official immutable tarball. Install `npm i -g chainlesschain@0.166.147 --registry https://registry.npmjs.org`, restart hosts, then run `cc --version` and `cc doctor`.
50
54
 
51
- Open VSX **0.37.186** is public and byte-identical to the official VSIX, recommending CLI **0.166.147**. JetBrains **0.4.201** is uploaded through its successful official tag workflow and awaits Marketplace approval/public download. Both new IDE versions recommend CLI **0.166.147**; their exact source `703b22e895bff2c0f40cd7f350aef0757dc3bdd5` passed the complete host and ARM64 gates. Session Core **0.3.27**, Protocol **0.1.13**, Agent SDK **0.2.18** and Context/Memory Kernel **0.1.12** are unchanged. [Download the public 0.37.186 VSIX](https://open-vsx.org/api/chainlesschain/chainlesschain-ide/0.37.186/file/chainlesschain.chainlesschain-ide-0.37.186.vsix).
55
+ Open VSX **0.37.186** is a candidate and is not public and byte-identical to the official VSIX, recommending CLI **0.166.147**. JetBrains **0.4.201** is uploaded through its successful official tag workflow and awaits Marketplace approval/public download. Both new IDE versions recommend CLI **0.166.147**; their exact source `703b22e895bff2c0f40cd7f350aef0757dc3bdd5` passed the complete host and ARM64 gates. Session Core **0.3.27**, Protocol **0.1.13**, Agent SDK **0.2.18** and Context/Memory Kernel **0.1.12** are unchanged. [Download the public 0.37.186 VSIX](https://open-vsx.org/api/chainlesschain/chainlesschain-ide/0.37.186/file/chainlesschain.chainlesschain-ide-0.37.186.vsix).
52
56
 
53
57
  The [upgrade and release-status guide](../../docs-site/docs/chainlesschain/cli-ide-update-2026-11-11-147.md) records each channel separately. Microsoft Marketplace was not published by this tag run; it requires an explicit exact-tag backfill and a configured VSCE_PAT. Public mobile/PC clients remain **v5.0.3.145**. Automatic promotion, independent business effects, invoice reconciliation and paid admission remain incomplete; **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain. [Publication evidence](../../docs/research/cli/evidence/release147-public/README.md).
54
58
 
@@ -157,7 +161,7 @@ previous verified public pairing.
157
161
 
158
162
  ## CLI 0.166.141 / verified public pairing
159
163
 
160
- CLI **0.166.141** is public through GitHub Actions OIDC. Open VSX **0.37.177** and JetBrains **0.4.194** are public and both recommend CLI **0.166.141**. CLI public bytes, signed provenance, registry-only `--ignore-scripts` installation and the Agent capability startup probe passed. Both public IDE payloads match their official builds.
164
+ CLI **0.166.141** is a candidate and is not public through GitHub Actions OIDC. Open VSX **0.37.177** and JetBrains **0.4.194** are public and both recommend CLI **0.166.141**. CLI public bytes, signed provenance, registry-only `--ignore-scripts` installation and the Agent capability startup probe passed. Both public IDE payloads match their official builds.
161
165
 
162
166
  Exact release source:`df9295e33ad04aec0aa74cab4dd242766d5556a4`。CLI CI **76/76** / Strict Sandbox **6/6** passed across Linux, Windows and macOS.
163
167
 
@@ -179,7 +183,7 @@ SDK **0.2.17**, Protocol **0.1.12**, Kernel **0.1.11** and child npm versions ar
179
183
 
180
184
  As checked at **2026-11-03T11:42:31.329Z**, CLI **0.166.140** is verified public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/41610020835) from exact source `e2a91bf54332ff3d252c40ecc25c5887e0f0430d`. Public npm bytes, signed provenance, installation and startup have been verified. The same source passed every configured Linux, Windows and macOS CLI CI / CLI Strict Sandbox job.
181
185
 
182
- Open VSX **0.37.176** is public, listed and downloadable; its VSIX matches the official build byte for byte. JetBrains **0.4.193** has been uploaded and awaits Marketplace review or public indexing; public availability has not been verified. The previously verified public JetBrains release remains **0.4.192**, whose recommendation is CLI **0.166.139**. Both new IDE versions recommend CLI **0.166.140**.
186
+ Open VSX **0.37.176** is a candidate and is not public, listed and downloadable; its VSIX matches the official build byte for byte. JetBrains **0.4.193** has been uploaded and awaits Marketplace review or public indexing; public availability has not been verified. The previously verified public JetBrains release remains **0.4.192**, whose recommendation is CLI **0.166.139**. Both new IDE versions recommend CLI **0.166.140**.
183
187
 
184
188
  [Publication and channel receipts](../../docs/research/cli/evidence/release140-public/publication-readback.json) · [Exact-source gates](../../docs/research/cli/evidence/release140-public/gates.json) · [CLI public readback](../../docs/research/cli/evidence/release140-public/cli.json) · [Open VSX readback](../../docs/research/cli/evidence/release140-public/open-vsx.json) · [JetBrains status](../../docs/research/cli/evidence/release140-public/jetbrains.json)
185
189
 
@@ -237,7 +241,7 @@ Exact CLI source `82aa6d703a8695721a7ccf0793a435853bc2bbf2` passed all 76 CLI CI
237
241
 
238
242
  The preceding OpenAI native cohort accepted **39/45** tasks. Runtime regression tests and this release do not change that historical result or establish formal paid/native production admission.
239
243
 
240
- A subsequent user-authorized retest used this public CLI, Open VSX 0.37.173 and the verified JetBrains 0.4.189 Actions build without waiting for Marketplace review. Only the six previously failed samples were rerun: **1/6** passed (`verify-26`), with **5** still failing independent acceptance. The cross-version cumulative result is **40/45**, not a new full 45-task success rate. All 100 upstream calls have complete usage; token-only estimate **$5.880530**, invoice unknown. The temporary task secret was deleted. [Targeted report](../../docs/research/cli/verify01-openai-135/retest-six-99b93fc209/REPORT.md).
244
+ A subsequent user-authorized retest used this a candidate and is not public CLI, Open VSX 0.37.173 and the verified JetBrains 0.4.189 Actions build without waiting for Marketplace review. Only the six previously failed samples were rerun: **1/6** passed (`verify-26`), with **5** still failing independent acceptance. The cross-version cumulative result is **40/45**, not a new full 45-task success rate. All 100 upstream calls have complete usage; token-only estimate **$5.880530**, invoice unknown. The temporary task secret was deleted. [Targeted report](../../docs/research/cli/verify01-openai-135/retest-six-99b93fc209/REPORT.md).
241
245
 
242
246
  ## CLI 0.166.133 — verified preceding release
243
247
 
@@ -251,9 +255,9 @@ Install: `npm i -g chainlesschain@0.166.132 --registry https://registry.npmjs.or
251
255
 
252
256
  This release stops tool execution on truncated responses and permits one replan when complete usage is recorded and budget remains. Recovery preserves the original task, including through role combination, asynchronous recall and readContext continuation. Filtered or incomplete terminal responses and missing task context stop with a clear failure. No independent IDE UI change is included.
253
257
 
254
- Release source: [772fcdbda85bcf91df95bfced5b476dcf4c74614](https://github.com/chainlesschain/chainlesschain/commit/772fcdbda85bcf91df95bfced5b476dcf4c74614). Exact-source [validation gates](https://github.com/chainlesschain/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/gates.json), [OIDC publication run](https://github.com/chainlesschain/chainlesschain/actions/runs/40985169005), [official artifact](https://github.com/chainlesschain/chainlesschain/actions/runs/40985169005/artifacts/12946249806), [independent readback run](https://github.com/chainlesschain/chainlesschain/actions/runs/40986625203), and [public CLI readback](https://github.com/chainlesschain/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/cli.json) identify this public package. [Three-package publication evidence](https://github.com/chainlesschain/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/publication.json).
258
+ Release source: [772fcdbda85bcf91df95bfced5b476dcf4c74614](https://github.com/longfa/chainlesschain/commit/772fcdbda85bcf91df95bfced5b476dcf4c74614). Exact-source [validation gates](https://github.com/longfa/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/gates.json), [OIDC publication run](https://github.com/chainlesschain/chainlesschain/actions/runs/40985169005), [official artifact](https://github.com/chainlesschain/chainlesschain/actions/runs/40985169005/artifacts/12946249806), [independent readback run](https://github.com/chainlesschain/chainlesschain/actions/runs/40986625203), and [public CLI readback](https://github.com/longfa/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/cli.json) identify this a candidate and is not public package. [Three-package publication evidence](https://github.com/longfa/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/publication.json).
255
259
 
256
- At historical source `abbe13ad3658ff9e2e100989a4cfefc409d9261c`, the combined local suite actually ran **456 tests across 18 files + 10 real CLI tests across 3 files**, with no skips. Subsequent fixture and native-preflight repairs compared the selected runtime components byte for byte; release source `772fcdbda85bcf91df95bfced5b476dcf4c74614` did **not** repeat that combined local suite. [Component scope evidence](https://github.com/chainlesschain/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-native-preflight-2026-10-30/review.json) and the release source's [cloud gates](https://github.com/chainlesschain/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/gates.json) retain this distinction. Failed source `40753f179a3dc18760bd64a754b28a46ba718f57` and the earlier superseded `7f8ef64b4bd8b429f97d2e121c440143ed7ddf3b` remain historical; their successful checks do not transfer to this release.
260
+ At historical source `abbe13ad3658ff9e2e100989a4cfefc409d9261c`, the combined local suite actually ran **456 tests across 18 files + 10 real CLI tests across 3 files**, with no skips. Subsequent fixture and native-preflight repairs compared the selected runtime components byte for byte; release source `772fcdbda85bcf91df95bfced5b476dcf4c74614` did **not** repeat that combined local suite. [Component scope evidence](https://github.com/longfa/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-native-preflight-2026-10-30/review.json) and the release source's [cloud gates](https://github.com/longfa/chainlesschain/blob/0d57ebfea919ae941a36a1f11a9ee10964722120/docs/research/cli/evidence/release132-public/gates.json) retain this distinction. Failed source `40753f179a3dc18760bd64a754b28a46ba718f57` and the earlier superseded `7f8ef64b4bd8b429f97d2e121c440143ed7ddf3b` remain historical; their successful checks do not transfer to this release.
257
261
 
258
262
  Automatic acceptance remains **34/45**, with **11** unfinished; **3 assisted deliveries** are recorded separately and are not added to that total. The original broker **403** and Memory cold SLO remain unresolved. Publication adds no task acceptance or paid/native admission: **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain. Microsoft Marketplace remains deferred. PC/mobile **v5.0.3.143** remain independent.
259
263
 
@@ -297,7 +301,7 @@ It also adds explicit `cc agent -p "task" --review-changes` for one completion-r
297
301
 
298
302
  Install the verified public CLI: `npm i -g chainlesschain@0.166.128 --registry https://registry.npmjs.org`. Open VSX **0.37.166** and JetBrains **0.4.183** are public and recommend `.128`. Their exact-source release gates and public artifact readback passed; the VSIX matches CI byte for byte, and every original JetBrains ZIP payload entry matches. Child package pins are unchanged. [Release progress](../../docs/research/cli-ide/releases/cli-ide-release128-progress-2026-10-27.md).
299
303
 
300
- Exact source `dfa158e36171e347a40e23356c2ed7bd04e0c061` passed complete Linux, Windows and macOS CLI CI and Strict Sandbox. [GitHub Actions OIDC publication](https://github.com/chainlesschain/chainlesschain/actions/runs/40552876222) and [independent public readback](https://github.com/chainlesschain/chainlesschain/actions/runs/40556529770) passed: registry bytes match the immutable CI artifact, with signed provenance and ten direct child pins verified. [Publication evidence](../../docs/research/cli/evidence/release128-public/publication.json). Mobile and PC [v5.0.3.143](https://github.com/chainlesschain/chainlesschain/releases/tag/v5.0.3.143) is public from frozen source `036d2b8be2048c98e56e917c93380f169e6a9d7b`; five platform builds, all 22 public assets and three desktop updater metadata sets are verified in [Release 40565272034](https://github.com/chainlesschain/chainlesschain/actions/runs/40565272034). Microsoft Marketplace remains unpublished; cumulative task acceptance **32/45**, **13** unfinished, and **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain.
304
+ Exact source `dfa158e36171e347a40e23356c2ed7bd04e0c061` passed complete Linux, Windows and macOS CLI CI and Strict Sandbox. [GitHub Actions OIDC publication](https://github.com/chainlesschain/chainlesschain/actions/runs/40552876222) and [independent public readback](https://github.com/chainlesschain/chainlesschain/actions/runs/40556529770) passed: registry bytes match the immutable CI artifact, with signed provenance and ten direct child pins verified. [Publication evidence](../../docs/research/cli/evidence/release128-public/publication.json). Mobile and PC [v5.0.3.143](https://github.com/chainlesschain/chainlesschain/releases/tag/v5.0.3.143) is a candidate and is not public from frozen source `036d2b8be2048c98e56e917c93380f169e6a9d7b`; five platform builds, all 22 public assets and three desktop updater metadata sets are verified in [Release 40565272034](https://github.com/chainlesschain/chainlesschain/actions/runs/40565272034). Microsoft Marketplace remains unpublished; cumulative task acceptance **32/45**, **13** unfinished, and **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain.
301
305
 
302
306
  ## Current command and configuration references
303
307
 
@@ -317,7 +321,7 @@ Run `cc config set evolution.enabled true` to opt in, or `cc config set evolutio
317
321
 
318
322
  The **Skill 自进化配置** page in `cc ui`, VS Code and JetBrains shares this setting. Since CLI **0.166.133**, `cc ui` Chat, Agent, Quick Ask, streaming and Personal Data Hub model requests re-read it for each new request, including existing UI sessions. Stop and restart already running terminal or IDE Agent sessions to apply changes there. Switching off leaves ordinary chat, tool permissions and sandbox policy available. Enabled deployments still enforce their signatures and evidence validation; automatic candidate promotion remains `HOLD`. RRSI evaluation modules are part of the CLI evolution code, but this switch does not itself start a full RRSI campaign or publish learned candidates.
319
323
 
320
- Install this release with `npm i -g chainlesschain@0.166.127 --registry https://registry.npmjs.org`. Paired public IDE versions are Open VSX / VS Code **0.37.165** and JetBrains **0.4.182**. Their exact-source release gates and public archive readback passed; Microsoft Marketplace remains unpublished. Child package pins are unchanged. The preceding **0.166.126** JSON recovery-summary repair addresses host-truncated retained context; the same error code can also report other invalid original evidence. Exact-source Linux, Windows and macOS CLI CI and Strict Sandbox passed; GitHub Actions OIDC publication and public package readback are complete. Mobile and PC release [`v5.0.3.142`](https://github.com/chainlesschain/chainlesschain/releases/tag/v5.0.3.142) is public from frozen source `c9881a2b710cf49f0ad3d63673e0998ecc608514`; automatic promotion remains `HOLD`.
324
+ Install this release with `npm i -g chainlesschain@0.166.127 --registry https://registry.npmjs.org`. Paired public IDE versions are Open VSX / VS Code **0.37.165** and JetBrains **0.4.182**. Their exact-source release gates and public archive readback passed; Microsoft Marketplace remains unpublished. Child package pins are unchanged. The preceding **0.166.126** JSON recovery-summary repair addresses host-truncated retained context; the same error code can also report other invalid original evidence. Exact-source Linux, Windows and macOS CLI CI and Strict Sandbox passed; GitHub Actions OIDC publication and public package readback are complete. Mobile and PC release [`v5.0.3.142`](https://github.com/chainlesschain/chainlesschain/releases/tag/v5.0.3.142) is a candidate and is not public from frozen source `c9881a2b710cf49f0ad3d63673e0998ecc608514`; automatic promotion remains `HOLD`.
321
325
 
322
326
  ## CLI 0.166.126 (public, 2026-10-26)
323
327
 
@@ -325,15 +329,15 @@ Fixes `Agent model JSON text is malformed or ambiguous` after reading a worklog
325
329
 
326
330
  Install: `npm i -g chainlesschain@0.166.126 --registry https://registry.npmjs.org`. Restart the IDE chat host, then check `cc --version` and `cc doctor`. Public Open VSX **0.37.163** recommends CLI **0.166.125**; existing JetBrains **0.4.179** recommends CLI **0.166.123**. Child versions are unchanged, including Session Core **0.3.24**.
327
331
 
328
- Published through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40332695884) from exact source `1b848f7e265737b73e6f8ac99f0aeaf9ea5dadbe`. Linux, Windows and macOS **CLI CI** and **CLI Strict Sandbox** passed; the public archive matches the immutable CI artifact, and signed provenance and ten direct child pins are verified. [Publication evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release126-public/publication.json). One macOS E2E shard was rerun after GitHub could not allocate a hosted runner; its tests passed without source changes.
332
+ Published through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40332695884) from exact source `1b848f7e265737b73e6f8ac99f0aeaf9ea5dadbe`. Linux, Windows and macOS **CLI CI** and **CLI Strict Sandbox** passed; the public archive matches the immutable CI artifact, and signed provenance and ten direct child pins are verified. [Publication evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release126-public/publication.json). One macOS E2E shard was rerun after GitHub could not allocate a hosted runner; its tests passed without source changes.
329
333
 
330
- Original malformed/duplicate JSON still fails closed; credential/PII redaction and decoding budgets remain enforced. This is a CLI repair, with no native release or new live model-task acceptance. The separate [Open VSX 0.37.163 release](https://github.com/chainlesschain/chainlesschain/actions/runs/40351653016) passed three-OS browser evidence, host and Remote SSH gates; its public VSIX matches the immutable CI artifact byte for byte. [IDE readback evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release126-public/open-vsx.json). Microsoft Marketplace remains unpublished. Cumulative acceptance remains **32/45**, with **13** unfinished; **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain.
334
+ Original malformed/duplicate JSON still fails closed; credential/PII redaction and decoding budgets remain enforced. This is a CLI repair, with no native release or new live model-task acceptance. The separate [Open VSX 0.37.163 release](https://github.com/chainlesschain/chainlesschain/actions/runs/40351653016) passed three-OS browser evidence, host and Remote SSH gates; its public VSIX matches the immutable CI artifact byte for byte. [IDE readback evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release126-public/open-vsx.json). Microsoft Marketplace remains unpublished. Cumulative acceptance remains **32/45**, with **13** unfinished; **NOT_PAID_READY / NOT_ADMITTED / HOLD** remain.
331
335
 
332
336
  ## CLI 0.166.125 (public, 2026-10-26)
333
337
 
334
338
  Fixes Agent Run termination after successful Python `run_code` calls containing list unpacking such as `["git", *args]`. The next model request can project the completed tool history. Versioned v8 projection also recognizes bounded JavaScript spread, object unpacking and unary/binary expressions in known code fields and supported code fences. Strict tool argument JSON, nested malformed/duplicate JSON checks, redaction and shared budgets remain enforced; v7 evidence remains verifiable.
335
339
 
336
- CLI **0.166.125** is public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40274009347) at source `4285a55c2f4dfb0c0eddb7cb8f63fc73f2ff1a2b`. Exact-source Linux, Windows and macOS CLI CI and CLI Strict Sandbox passed. The public npm archive matches the immutable CI artifact byte for byte; registry integrity, signed provenance, ten direct child pins and the offline changelog identity were verified. [Publication evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release125-public/publication.json).
340
+ CLI **0.166.125** is a candidate and is not public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40274009347) at source `4285a55c2f4dfb0c0eddb7cb8f63fc73f2ff1a2b`. Exact-source Linux, Windows and macOS CLI CI and CLI Strict Sandbox passed. The public npm archive matches the immutable CI artifact byte for byte; registry integrity, signed provenance, ten direct child pins and the offline changelog identity were verified. [Publication evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release125-public/publication.json).
337
341
 
338
342
  Install: `npm i -g chainlesschain@0.166.125 --registry https://registry.npmjs.org`. Restart the IDE chat host, then check `cc --version` and `cc doctor`. Current public IDEs are Open VSX **0.37.162** / JetBrains **0.4.179**, whose recommendation remains CLI **0.166.123**. This release updates the CLI only; child pins remain unchanged, including Session Core **0.3.24**.
339
343
 
@@ -345,7 +349,7 @@ Candidate `.124` was stopped before publication because its committed offline ch
345
349
 
346
350
  This release addresses inherited `fable[1m]` model settings overriding a configured non-Anthropic provider, Windows model-turn preparation latency, and Python formatted-string tool evidence being rejected as ambiguous JSON. It pins Session Core **0.3.24**. The GitHub Actions OIDC release workflow requires exact-source Linux, Windows and macOS CLI CI and CLI Strict Sandbox, publishes and verifies Session Core first, and verifies the public CLI archive before reporting publication success.
347
351
 
348
- CLI **0.166.123** is public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40251206428), at source `8096acf1ec0bc5e7b25810f5cc08128ba90aca3b`. Exact-source three-OS gates, public archive bytes, signed provenance and ten direct child dependency pins are verified. [Publication evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release123-public/publication.json).
352
+ CLI **0.166.123** is a candidate and is not public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40251206428), at source `8096acf1ec0bc5e7b25810f5cc08128ba90aca3b`. Exact-source three-OS gates, public archive bytes, signed provenance and ten direct child dependency pins are verified. [Publication evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release123-public/publication.json).
349
353
 
350
354
  Install: `npm i -g chainlesschain@0.166.123 --registry https://registry.npmjs.org`. Existing IDE pairing remains VS Code **0.37.161** / JetBrains **0.4.178**, which still recommend CLI **0.166.121**; no IDE or native-client release is included. Acceptance remains **32/45**, with **13** unfinished; **NOT_PAID_READY**, **NOT_ADMITTED** and **HOLD** remain. Candidate **0.166.122** was stopped by CI before publication; its immutable source tag is retained. The preceding verified public release and its evidence are recorded below.
351
355
 
@@ -355,9 +359,9 @@ Fixes Evolution ingress rejecting ordinary display text as malformed JSON: numer
355
359
 
356
360
  Sensitive assignments with primitive-looking prefixes or concatenated strings fail closed instead of redacting only the first token and exposing a suffix.
357
361
 
358
- CLI **0.166.121** is public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40225573887). Source `4a7e5adc5e6a241434ecfa906a272e34b5ea6d2a` passed CLI CI and CLI Strict Sandbox on Linux, Windows and macOS. Public npm archive integrity, signed provenance, packaged fix sources and public child dependency pins have been verified. A separate public registry install with `--ignore-scripts` verified the CLI archive, ten direct child pins, `cc --version` and the static `cc agent --capabilities` manifest. [Publication evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release121-public/publication.json).
362
+ CLI **0.166.121** is a candidate and is not public through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/40225573887). Source `4a7e5adc5e6a241434ecfa906a272e34b5ea6d2a` passed CLI CI and CLI Strict Sandbox on Linux, Windows and macOS. Public npm archive integrity, signed provenance, packaged fix sources and public child dependency pins have been verified. A separate public registry install with `--ignore-scripts` verified the CLI archive, ten direct child pins, `cc --version` and the static `cc agent --capabilities` manifest. [Publication evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release121-public/publication.json).
359
363
 
360
- This release retains Session Core **0.3.23** and Agent SDK **0.2.16**. The new pairing is VS Code **0.37.161** / JetBrains **0.4.178**, both recommending CLI **0.166.121**. [Open VSX 0.37.161](https://github.com/chainlesschain/chainlesschain/actions/runs/40227329131) is public and its downloaded VSIX matches the immutable CI candidate, including CLI recommendation 0.166.121. [JetBrains 0.4.178 publication](https://github.com/chainlesschain/chainlesschain/actions/runs/40227329241) is approved and publicly listed; its downloaded ZIP identity and CLI recommendation are verified. Every candidate inner JAR entry matches the public package with no added entries; raw ZIP bytes differ. The preceding pairing is VS Code **0.37.160** / JetBrains **0.4.177**. No new live model-task acceptance was run: cumulative acceptance remains **32/45**, with **13** unfinished; **NOT_PAID_READY**, **NOT_ADMITTED** and automatic promotion **HOLD** remain. Microsoft Marketplace remains unpublished.
364
+ This release retains Session Core **0.3.23** and Agent SDK **0.2.16**. The new pairing is VS Code **0.37.161** / JetBrains **0.4.178**, both recommending CLI **0.166.121**. [Open VSX 0.37.161](https://github.com/chainlesschain/chainlesschain/actions/runs/40227329131) is a candidate and is not public and its downloaded VSIX matches the immutable CI candidate, including CLI recommendation 0.166.121. [JetBrains 0.4.178 publication](https://github.com/chainlesschain/chainlesschain/actions/runs/40227329241) is approved and publicly listed; its downloaded ZIP identity and CLI recommendation are verified. Every candidate inner JAR entry matches the public package with no added entries; raw ZIP bytes differ. The preceding pairing is VS Code **0.37.160** / JetBrains **0.4.177**. No new live model-task acceptance was run: cumulative acceptance remains **32/45**, with **13** unfinished; **NOT_PAID_READY**, **NOT_ADMITTED** and automatic promotion **HOLD** remain. Microsoft Marketplace remains unpublished.
361
365
 
362
366
  Install: `npm i -g chainlesschain@0.166.121 --registry https://registry.npmjs.org`, restart the IDE chat host, then run `cc --version` and `cc doctor`.
363
367
 
@@ -385,7 +389,7 @@ Cumulative 36+9 acceptance is **32/45** across versions, with **13** unfinished;
385
389
 
386
390
  [Upgrade guide](https://docs.chainlesschain.com/chainlesschain/cli-ide-update-2026-10-23.html) · [Image budgets and session recovery](https://docs.chainlesschain.com/chainlesschain/agent-input-and-recovery.html) · [Runtime design](https://design.chainlesschain.com/release-runtime-update-2026-10-23.html)
387
391
 
388
- CLI **0.166.117** was published through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/39845469661) and its public archive integrity, signed provenance and independent registry-only install have been verified. It fixes Python/JavaScript code literals being rejected as malformed JSON at Evolution ingress and persists completed tool rounds before error exits terminate the Agent Run. Genuine JSON checks and projection budgets remain enforced. The exact source commit passed the complete Linux, Windows and macOS CLI CI and Strict Sandbox gates. [Publication evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release117-public/publication.json).
392
+ CLI **0.166.117** was published through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/39845469661) and its public archive integrity, signed provenance and independent registry-only install have been verified. It fixes Python/JavaScript code literals being rejected as malformed JSON at Evolution ingress and persists completed tool rounds before error exits terminate the Agent Run. Genuine JSON checks and projection budgets remain enforced. The exact source commit passed the complete Linux, Windows and macOS CLI CI and Strict Sandbox gates. [Publication evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release117-public/publication.json).
389
393
 
390
394
  Image transport has a separate byte budget: up to eight images and 20 MiB per message, with 40 MiB of images across one model request. Base64 bytes do not consume the 1 MiB text-input budget. Vision token planning uses a separate per-image reserve; provider usage receipts determine actual consumption. Text byte pressure triggers canonical compaction before the bounded projection ceiling. Large tool outputs retain complete JSON values or an explicit omission notice, so truncation does not corrupt the next model request.
391
395
 
@@ -401,7 +405,7 @@ cc doctor
401
405
 
402
406
  The preceding CLI **0.166.115** was published through [GitHub Actions OIDC](https://github.com/chainlesschain/chainlesschain/actions/runs/39791145970). It fixes undefined tool-evidence fields; the code-literal ingress regression is addressed in .117. Candidate .116 was not published after source/public child-package drift was detected. This release aligns Session Core **0.3.22** and Personal Data Hub **0.4.66** before CLI publication.
403
407
 
404
- Open VSX **0.37.159** is public and its download verified; JetBrains **0.4.176** is approved and its public download verified. Both recommend CLI **0.166.117**. The unpublished IDE .158/.175 candidates were retired after preflight found a stale Doctor recommendation test; their immutable tags are retained. The fully verified historical IDE pairing and release limits below are retained.
408
+ Open VSX **0.37.159** is a candidate and is not public and its download verified; JetBrains **0.4.176** is approved and its public download verified. Both recommend CLI **0.166.117**. The unpublished IDE .158/.175 candidates were retired after preflight found a stale Doctor recommendation test; their immutable tags are retained. The fully verified historical IDE pairing and release limits below are retained.
405
409
 
406
410
  ### Intermediate .114 release (2026-10-22)
407
411
 
@@ -415,7 +419,7 @@ Checked on **2026-10-22**: npm CLI **0.166.112**, Open VSX **0.37.155** and JetB
415
419
 
416
420
  npm publication used GitHub Actions OIDC from source `35a2508d156152a61d74fbf8135fcfa1225fe235` ([publish run](https://github.com/chainlesschain/chainlesschain/actions/runs/39661868416)); all 71 CLI CI jobs and all 5 Strict Sandbox jobs passed on that exact source. The public tarball integrity and npm provenance source/run binding were read back. Session Core **0.3.21** was available before CLI publication.
417
421
 
418
- The IDE tags `ide-vscode-v0.37.155` and `ide-jetbrains-v0.4.172` point to `ae27ef6dfc8cf1e45bf084030816b02c77dc2a34`. [Open VSX publication](https://github.com/chainlesschain/chainlesschain/actions/runs/39673804362) passed. [JetBrains publication, attempt 2](https://github.com/chainlesschain/chainlesschain/actions/runs/39676899944/attempts/2) passed after one bounded macOS 2024.2 rerun; the original performance failure is retained. JetBrains now reports `approve=true`, `listed=true`, `hidden=false`. Both public IDE archives were downloaded and their embedded version and CLI pairing checked. [Public readback evidence](https://github.com/chainlesschain/chainlesschain/blob/main/docs/research/cli/evidence/release112-public/publication.json).
422
+ The IDE tags `ide-vscode-v0.37.155` and `ide-jetbrains-v0.4.172` point to `ae27ef6dfc8cf1e45bf084030816b02c77dc2a34`. [Open VSX publication](https://github.com/chainlesschain/chainlesschain/actions/runs/39673804362) passed. [JetBrains publication, attempt 2](https://github.com/chainlesschain/chainlesschain/actions/runs/39676899944/attempts/2) passed after one bounded macOS 2024.2 rerun; the original performance failure is retained. JetBrains now reports `approve=true`, `listed=true`, `hidden=false`. Both public IDE archives were downloaded and their embedded version and CLI pairing checked. [Public readback evidence](https://github.com/longfa/chainlesschain/blob/main/docs/research/cli/evidence/release112-public/publication.json).
419
423
 
420
424
  CLI 0.166.112 retains generated signing-key paths for explicit Evolution test deployments and the provider routing fixes prepared in 0.166.111. Gemini Quick Ask and chat use its native API; the Gemini agent and Hub compatibility clients use `/v1beta/openai`. Anthropic uses native Messages APIs, while OpenAI-compatible providers use `/chat/completions`. Provider overrides resolve their own endpoint, model and credentials. Ollama base URLs normalize an optional `/v1` suffix, and first-use local Quick Ask initializes its user-scoped signed host. Session Core 0.3.21 supplies the Windows extended-path ACL fix.
421
425
 
@@ -3624,7 +3628,7 @@ pre-provisioned binding from its registered workspace. `--check` validates
3624
3628
  identity/configuration without probing Docker or calling a model; `--prompt`
3625
3629
  runs one task with fixed `dontAsk` after sandbox preflight. This opt-in Linux
3626
3630
  entry does not enable automatic registration or Windows/macOS durable support.
3627
- See the [administrator setup and failure/stop-receipt contract](https://github.com/chainlesschain/chainlesschain/blob/main/docs/cli/NET02_CONTROLLED_HOST.md).
3631
+ See the [administrator setup and failure/stop-receipt contract](https://github.com/longfa/chainlesschain/blob/main/docs/cli/NET02_CONTROLLED_HOST.md).
3628
3632
 
3629
3633
  ## License
3630
3634
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.166.156",
3
+ "version": "0.166.159",
4
4
  "description": "CLI for ChainlessChain - install, configure, and manage your personal AI management system",
5
5
  "type": "module",
6
6
  "bin": {
@@ -21,6 +21,7 @@
21
21
  "test:scheduler-reliability-soak": "node scripts/scheduler-reliability-soak.mjs",
22
22
  "test:evolution-ledger-reliability-soak": "node scripts/evolution-ledger-reliability-soak.mjs",
23
23
  "test:pm-exploration-recovery-drill": "node scripts/pm-exploration-recovery-drill.mjs",
24
+ "test:dmm-business-acceptance": "node scripts/dmm-business-acceptance-drill.mjs --json",
24
25
  "test:pm-exploration-volcengine-live": "node scripts/pm-exploration-volcengine-live-probe.mjs --confirm-live",
25
26
  "test:pm-exploration-signed-volcengine-live": "node scripts/pm-exploration-signed-volcengine-live-probe.mjs --confirm-live",
26
27
  "test:governed-learning-volcengine-pilot": "node scripts/governed-learning-volcengine-pilot.mjs",
@@ -69,6 +70,7 @@
69
70
  "src/",
70
71
  "completions/",
71
72
  "scripts/postinstall.mjs",
73
+ "scripts/dmm-business-acceptance-drill.mjs",
72
74
  "scripts/pm-exploration-effect.mjs",
73
75
  "scripts/repair-node-pty.mjs",
74
76
  "scripts/build-windows-sandbox-helper.ps1",
@@ -0,0 +1,304 @@
1
+ #!/usr/bin/env node
2
+
3
+ /**
4
+ * Deterministic DMM-09 business acceptance drill.
5
+ *
6
+ * The project and task rows are real native SQLite rows. Only the owner DID
7
+ * and clock are fixture inputs. The drill deliberately checks an incomplete
8
+ * business outcome first, then completes the same outcome and reopens the
9
+ * database to prove durable completion and idempotent replay.
10
+ */
11
+
12
+ import { createRequire } from "node:module";
13
+ import fs from "node:fs";
14
+ import os from "node:os";
15
+ import path from "node:path";
16
+ import { fileURLToPath } from "node:url";
17
+
18
+ import { digestBusinessObjectContent as digest } from "@chainlesschain/session-core/business-object-contract";
19
+
20
+ const require = createRequire(import.meta.url);
21
+ const Database = require("better-sqlite3");
22
+ const { ApprovalGate } = require("@chainlesschain/session-core/approval-gate");
23
+ const {
24
+ ProjectGoalCompletionService,
25
+ } = require("@chainlesschain/session-core/project-goal-completion");
26
+
27
+ export const DMM_BUSINESS_ACCEPTANCE_SCHEMA =
28
+ "chainlesschain.dmm-business-acceptance/v1";
29
+
30
+ const OWNER = "did:chainless:dmm-business-acceptance";
31
+ const CLOCK = 1791244800000;
32
+
33
+ function initialize(db) {
34
+ db.exec(`
35
+ CREATE TABLE projects(
36
+ id TEXT PRIMARY KEY,
37
+ user_id TEXT NOT NULL,
38
+ status TEXT NOT NULL,
39
+ updated_at INTEGER NOT NULL,
40
+ deleted INTEGER DEFAULT 0
41
+ );
42
+ CREATE TABLE project_tasks(
43
+ id TEXT PRIMARY KEY,
44
+ project_id TEXT NOT NULL,
45
+ task_type TEXT NOT NULL,
46
+ description TEXT NOT NULL,
47
+ status TEXT NOT NULL,
48
+ created_at INTEGER NOT NULL,
49
+ updated_at INTEGER NOT NULL,
50
+ deleted INTEGER DEFAULT 0,
51
+ sync_status TEXT NOT NULL,
52
+ due_date INTEGER,
53
+ blocked_by TEXT
54
+ );
55
+ `);
56
+ db.prepare(
57
+ "INSERT INTO projects VALUES ('dmm-business-sample', ?, 'active', ?, 0)",
58
+ ).run(OWNER, CLOCK);
59
+ db.prepare(
60
+ "INSERT INTO project_tasks VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, NULL, NULL)",
61
+ ).run(
62
+ "prepare-report",
63
+ "dmm-business-sample",
64
+ "analyze_data",
65
+ "Prepare the customer report",
66
+ "pending",
67
+ CLOCK,
68
+ CLOCK,
69
+ "synced",
70
+ );
71
+ db.prepare(
72
+ "INSERT INTO project_tasks VALUES (?, ?, ?, ?, ?, ?, ?, 0, ?, NULL, NULL)",
73
+ ).run(
74
+ "verify-report",
75
+ "dmm-business-sample",
76
+ "review",
77
+ "Verify the customer report",
78
+ "pending",
79
+ CLOCK,
80
+ CLOCK,
81
+ "synced",
82
+ );
83
+ }
84
+
85
+ function taskSnapshot(db) {
86
+ return db
87
+ .prepare(
88
+ "SELECT id,status,updated_at FROM project_tasks WHERE project_id=? ORDER BY id",
89
+ )
90
+ .all("dmm-business-sample")
91
+ .map((row) => ({
92
+ id: row.id,
93
+ status: row.status,
94
+ updatedAt: row.updated_at,
95
+ }));
96
+ }
97
+
98
+ function assertDrill(result) {
99
+ if (
100
+ result.schema !== DMM_BUSINESS_ACCEPTANCE_SCHEMA ||
101
+ result.status !== "passed" ||
102
+ result.firstAttempt.completed !== false ||
103
+ result.firstAttempt.goalStatus !== "active" ||
104
+ result.firstAttempt.reportMet !== false ||
105
+ result.completedAttempt.completed !== true ||
106
+ result.completedAttempt.goalStatus !== "done" ||
107
+ result.completedAttempt.reportMet !== true ||
108
+ result.reopened.goalStatus !== "done" ||
109
+ result.replayed.replayed !== true ||
110
+ result.replayed.completed !== true ||
111
+ result.replayed.goalStatus !== "done" ||
112
+ result.falseCompletionCount !== 0 ||
113
+ result.rejectedAttemptCount !== 1 ||
114
+ result.completionCount !== 1 ||
115
+ result.reopened.completionEvidenceRefs !== 1
116
+ )
117
+ throw Object.assign(
118
+ new Error("DMM-09 business acceptance drill did not pass"),
119
+ { report: result },
120
+ );
121
+ return result;
122
+ }
123
+
124
+ export function runBusinessAcceptanceDrill({ root, output } = {}) {
125
+ const ownsRoot = !root;
126
+ const workRoot = root
127
+ ? path.resolve(root)
128
+ : fs.mkdtempSync(path.join(os.tmpdir(), "chainlesschain-dmm09-"));
129
+ fs.mkdirSync(workRoot, { recursive: true });
130
+ const databasePath = path.join(workRoot, "project.sqlite");
131
+ let db;
132
+ let now = CLOCK;
133
+ try {
134
+ db = new Database(databasePath);
135
+ db.pragma("journal_mode = WAL");
136
+ db.pragma("synchronous = FULL");
137
+ initialize(db);
138
+
139
+ const makeService = () =>
140
+ new ProjectGoalCompletionService({
141
+ db,
142
+ getActor: () => OWNER,
143
+ clock: () => now,
144
+ approvalGate: new ApprovalGate({ confirm: async () => true }),
145
+ });
146
+ let service = makeService();
147
+ let goal = service.goals.create({
148
+ projectId: "dmm-business-sample",
149
+ objective: "Deliver the customer report with independent verification",
150
+ budgetPolicy: { maxRuns: 10 },
151
+ });
152
+ goal = service.configure({
153
+ goalId: goal.id,
154
+ expectedRevision: goal.revision,
155
+ acceptanceCriteria: [
156
+ {
157
+ id: "report-delivered",
158
+ kind: "business-assertion",
159
+ description:
160
+ "The report preparation and verification tasks are complete",
161
+ },
162
+ ],
163
+ assertions: [
164
+ { criterionId: "report-delivered", type: "all-tasks-completed" },
165
+ ],
166
+ }).goal;
167
+
168
+ const pendingInput = {
169
+ goalId: goal.id,
170
+ expectedRevision: goal.revision,
171
+ requestId: "dmm09-pending-check",
172
+ };
173
+ const first = service.complete(pendingInput);
174
+ const pendingTasks = taskSnapshot(db);
175
+ if (first.completed || first.report.met || first.goal.status !== "active")
176
+ throw new Error("incomplete business outcome was accepted");
177
+
178
+ // Business rows and the verifier share a forward-moving fixture clock.
179
+ // A task updated after the verifier's as-of watermark must stay rejected.
180
+ now += 1000;
181
+ db.prepare(
182
+ "UPDATE project_tasks SET status='completed',updated_at=? WHERE project_id=?",
183
+ ).run(now, "dmm-business-sample");
184
+ const completedInput = {
185
+ goalId: goal.id,
186
+ expectedRevision: goal.revision,
187
+ requestId: "dmm09-complete",
188
+ };
189
+ const completed = service.complete(completedInput);
190
+ const completedTasks = taskSnapshot(db);
191
+ const completionEvidenceRefs =
192
+ completed.goal.completion?.evidenceRefs || [];
193
+
194
+ db.close();
195
+ db = new Database(databasePath);
196
+ db.pragma("journal_mode = WAL");
197
+ db.pragma("synchronous = FULL");
198
+ service = makeService();
199
+ const reopenedGoal = service.goals.get({ id: goal.id });
200
+ const reopened = {
201
+ goalStatus: reopenedGoal.status,
202
+ completionEvidenceRefs:
203
+ reopenedGoal.completion?.evidenceRefs?.length || 0,
204
+ taskSnapshot: taskSnapshot(db),
205
+ };
206
+ const replayed = service.complete(completedInput);
207
+ const fixtureDigest = digest({
208
+ projectId: "dmm-business-sample",
209
+ tasks: completedTasks,
210
+ acceptance: "report-delivered",
211
+ });
212
+ const result = assertDrill({
213
+ schema: DMM_BUSINESS_ACCEPTANCE_SCHEMA,
214
+ status: "passed",
215
+ generatedAt: new Date().toISOString(),
216
+ fixtureAsOf: new Date(now).toISOString(),
217
+ owner: OWNER,
218
+ projectId: "dmm-business-sample",
219
+ goalId: goal.id,
220
+ fixtureDigest,
221
+ firstAttempt: {
222
+ completed: first.completed,
223
+ goalStatus: first.goal.status,
224
+ reportMet: first.report.met,
225
+ taskSnapshot: pendingTasks,
226
+ },
227
+ completedAttempt: {
228
+ completed: completed.completed,
229
+ goalStatus: completed.goal.status,
230
+ reportMet: completed.report.met,
231
+ evidenceRefs: completionEvidenceRefs.length,
232
+ taskSnapshot: completedTasks,
233
+ },
234
+ reopened,
235
+ replayed: {
236
+ completed: replayed.completed,
237
+ replayed: replayed.replayed,
238
+ goalStatus: replayed.goal.status,
239
+ },
240
+ rejectedAttemptCount: db
241
+ .prepare(
242
+ "SELECT COUNT(*) AS n FROM cc_project_goal_acceptance WHERE kind='check' AND json_extract(record_json,'$.met')=0",
243
+ )
244
+ .get().n,
245
+ falseCompletionCount: db
246
+ .prepare(
247
+ "SELECT COUNT(*) AS n FROM cc_project_goal_acceptance WHERE kind='check' AND json_extract(record_json,'$.met')=0 AND json_extract(record_json,'$.appliedRevision') IS NOT NULL",
248
+ )
249
+ .get().n,
250
+ completionCount: db
251
+ .prepare(
252
+ "SELECT COUNT(*) AS n FROM cc_project_goal_acceptance WHERE kind='check' AND json_extract(record_json,'$.met')=1",
253
+ )
254
+ .get().n,
255
+ });
256
+ db.close();
257
+ if (output) {
258
+ const outputPath = path.resolve(output);
259
+ fs.mkdirSync(path.dirname(outputPath), { recursive: true });
260
+ fs.writeFileSync(
261
+ outputPath,
262
+ `${JSON.stringify(result, null, 2)}\n`,
263
+ "utf8",
264
+ );
265
+ result.output = outputPath;
266
+ }
267
+ return result;
268
+ } finally {
269
+ if (db?.open) db.close();
270
+ if (ownsRoot) fs.rmSync(workRoot, { recursive: true, force: true });
271
+ }
272
+ }
273
+
274
+ function parseArgs(argv) {
275
+ const options = {};
276
+ for (let index = 0; index < argv.length; index += 1) {
277
+ const arg = argv[index];
278
+ if (arg === "--root") options.root = argv[++index];
279
+ else if (arg === "--output") options.output = argv[++index];
280
+ else if (arg === "--json") options.json = true;
281
+ else throw new Error(`Unknown option: ${arg}`);
282
+ }
283
+ return options;
284
+ }
285
+
286
+ if (
287
+ process.argv[1] &&
288
+ fileURLToPath(import.meta.url) === path.resolve(process.argv[1])
289
+ ) {
290
+ try {
291
+ const options = parseArgs(process.argv.slice(2));
292
+ const result = runBusinessAcceptanceDrill(options);
293
+ process.stdout.write(
294
+ options.json
295
+ ? `${JSON.stringify(result, null, 2)}\n`
296
+ : `DMM-09 business acceptance drill passed for ${result.goalId}\n`,
297
+ );
298
+ } catch (error) {
299
+ process.stderr.write(
300
+ `DMM-09 business acceptance drill failed: ${error.message}\n`,
301
+ );
302
+ process.exitCode = 1;
303
+ }
304
+ }
@@ -3,8 +3,8 @@
3
3
  "platform": "linux",
4
4
  "arch": "arm64",
5
5
  "sourceDigest": "sha256:e920e24b4a79121484f2e8e97886755f88eaa1af93b55326dfa68c7a7f571424",
6
- "imageDigest": "sha256:6395a47a5bd9b038303e94a5e93754258c8480dab64635460f973eb93dc6f4d8",
7
- "bytes": 778808,
6
+ "imageDigest": "sha256:29035535f96301d26ccf9f1cd8757f450b052b81b1c5cf47fd401f24042904b2",
7
+ "bytes": 778760,
8
8
  "linkage": "static",
9
- "commit": "a8cae89288d3a6119b152e04b750e10d726a5c5f"
9
+ "commit": "2aa00100a73f9b170b719c7f79e986470643485f"
10
10
  }
@@ -3,8 +3,8 @@
3
3
  "platform": "linux",
4
4
  "arch": "x64",
5
5
  "sourceDigest": "sha256:e920e24b4a79121484f2e8e97886755f88eaa1af93b55326dfa68c7a7f571424",
6
- "imageDigest": "sha256:f162e55ad3f3f72f8a52e9d7f12b5b8db44506c2ca66a14d7d62d5cd4f12498e",
7
- "bytes": 934160,
6
+ "imageDigest": "sha256:051b817c5f4e4849a98c55f64d1ee8dee980ec92decc23c2829b9bce217a8d47",
7
+ "bytes": 934112,
8
8
  "linkage": "static",
9
- "commit": "a8cae89288d3a6119b152e04b750e10d726a5c5f"
9
+ "commit": "2aa00100a73f9b170b719c7f79e986470643485f"
10
10
  }
@@ -1 +1 @@
1
- dc998e352cc34ccf06fc913412f27695f19604e4dbcdb58212314a207d0009cf
1
+ 7cca0e1640cbbe190cffb0383b11e924e7ae2c501f69590e175e7a106d988236