chainlesschain 0.166.157 → 0.166.160

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,14 +1,16 @@
1
1
  # chainlesschain CLI
2
2
 
3
- Documentation checked 2026-11-19 against source `bfc3c849093d67aebfc1cc92843cf8a9229b24d6`; CLI candidate is **0.166.157**, paired with public Open VSX **0.37.192** and JetBrains **0.4.207**. Historical PC/mobile .145 download URLs currently return 404. [Current installation and limits](https://docs.chainlesschain.com/chainlesschain/cli-ide-update-2026-11-19-156.html).
3
+ Documentation checked 2026-11-22 against the release candidate source; candidate CLI is **0.166.160**, paired with candidate Open VSX **0.37.195** and JetBrains **0.4.210**. Public baseline remains CLI **0.166.159**, Open VSX **0.37.194** and JetBrains **0.4.209** pending Marketplace listing. [Current installation and limits](https://docs.chainlesschain.com/chainlesschain/cli-ide-update-2026-11-19-157.html).
4
4
 
5
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.
6
6
 
7
- ## CLI 0.166.157 candidate (2026-11-19)
7
+ ## Release candidate CLI 0.166.160 (2026-11-22)
8
8
 
9
- CLI **0.166.157** is a candidate and is not public. Exact source `bfc3c849093d67aebfc1cc92843cf8a9229b24d6` passed all 75 CLI CI jobs and all 6 Strict Sandbox jobs before Actions OIDC publication and registry readback. See [CLI CI](https://github.com/longfa/chainlesschain/actions/runs/44222103058), [Strict Sandbox](https://github.com/longfa/chainlesschain/actions/runs/44222103031), and [Actions OIDC publication](https://github.com/longfa/chainlesschain/actions/runs/44222103142). The candidate contains the governed evolution storage audit and the current 202-entry LK catalog, including 86 chat models, with `gpt-6.1-sol` at `https://api.vv666.ai/v1` and backup `https://api.lk666.ai`.
9
+ CLI **0.166.160** contains the unified task lifecycle and CLI/IDE review implementation. It is unpublished until the exact-source CLI CI, Strict Sandbox, Native Validation and OIDC publication workflows pass. The paired IDE candidates are Open VSX **0.37.195** and JetBrains **0.4.210**.
10
10
 
11
- Child npm versions remain unchanged. The new pairing is a candidate and is not public Open VSX **0.37.192**, verified byte-for-byte against its immutable candidate; JetBrains **0.4.207** is approved, listed and publicly verified, with both candidate JAR payloads preserved. Until publication, install `npm i -g chainlesschain@0.166.156 --registry https://registry.npmjs.org` then 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).
11
+ ## Public CLI 0.166.159 (2026-11-21)
12
+
13
+ CLI **0.166.159** is public on npm from exact source `2aa00100a73f9b170b719c7f79e986470643485f`. GitHub Actions workflow [`44845885665`](https://github.com/chainlesschain/chainlesschain/actions/runs/44845885665) passed the exact-SHA gate, Linux/Windows/macOS CLI CI and Strict Sandbox gates, child-package order, OIDC publication and public npm readback (`0.166.159`). Install `npm i -g chainlesschain@0.166.159 --registry https://registry.npmjs.org`, restart IDE hosts, then run `cc --version`. Open VSX **0.37.194** is public; JetBrains **0.4.209** was uploaded successfully and remains pending Marketplace approval/listing. Native clients remain outside this release. The immutable failed candidate tag `.158` is retained.
12
14
 
13
15
  ## Historical CLI 0.166.150 / IDE pairing (2026-11-15)
14
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.166.157",
3
+ "version": "0.166.160",
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": "0ad9968f0498fce77e538f6e5e64bba35db184c8"
9
+ "commit": "1dd4f2c6cc7128995312be08738ae5d6d692ad25"
10
10
  }
@@ -6,5 +6,5 @@
6
6
  "imageDigest": "sha256:051b817c5f4e4849a98c55f64d1ee8dee980ec92decc23c2829b9bce217a8d47",
7
7
  "bytes": 934112,
8
8
  "linkage": "static",
9
- "commit": "0ad9968f0498fce77e538f6e5e64bba35db184c8"
9
+ "commit": "1dd4f2c6cc7128995312be08738ae5d6d692ad25"
10
10
  }