chainlesschain 0.166.159 → 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,16 +1,16 @@
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).
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
- ## Next release candidate: CLI 0.166.159 (2026-11-21)
7
+ ## Release candidate CLI 0.166.160 (2026-11-22)
8
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.
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
- ## Public CLI 0.166.157 (2026-11-20)
11
+ ## Public CLI 0.166.159 (2026-11-21)
12
12
 
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).
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.
14
14
 
15
15
  ## Historical CLI 0.166.150 / IDE pairing (2026-11-15)
16
16
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.166.159",
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": {
@@ -6,5 +6,5 @@
6
6
  "imageDigest": "sha256:29035535f96301d26ccf9f1cd8757f450b052b81b1c5cf47fd401f24042904b2",
7
7
  "bytes": 778760,
8
8
  "linkage": "static",
9
- "commit": "2aa00100a73f9b170b719c7f79e986470643485f"
9
+ "commit": "1dd4f2c6cc7128995312be08738ae5d6d692ad25"
10
10
  }
@@ -6,5 +6,5 @@
6
6
  "imageDigest": "sha256:051b817c5f4e4849a98c55f64d1ee8dee980ec92decc23c2829b9bce217a8d47",
7
7
  "bytes": 934112,
8
8
  "linkage": "static",
9
- "commit": "2aa00100a73f9b170b719c7f79e986470643485f"
9
+ "commit": "1dd4f2c6cc7128995312be08738ae5d6d692ad25"
10
10
  }
@@ -6,6 +6,7 @@
6
6
  import chalk from "chalk";
7
7
  import fs from "node:fs";
8
8
  import path from "node:path";
9
+ import { createHash } from "node:crypto";
9
10
  import { logger } from "../lib/logger.js";
10
11
  import {
11
12
  enforcePluginPolicy,
@@ -39,6 +40,29 @@ function collectRepeatableOption(value, previous = []) {
39
40
  return [...previous, value];
40
41
  }
41
42
 
43
+ /** Normalize installer side effects into a stable machine-readable receipt. */
44
+ export function normalizeInstallCommandResult(value = null) {
45
+ const input = value && typeof value === "object" ? value : {};
46
+ const stderr = typeof input.stderr === "string" ? input.stderr : "";
47
+ const digest =
48
+ typeof input.stderrDigest === "string" && input.stderrDigest
49
+ ? input.stderrDigest
50
+ : createHash("sha256").update(stderr, "utf8").digest("hex");
51
+ const exitCode = Number.isSafeInteger(input.exitCode) ? input.exitCode : null;
52
+ const ran = input.ran === true || exitCode !== null || input.started === true;
53
+ return {
54
+ ran,
55
+ exitCode,
56
+ timedOut: input.timedOut === true,
57
+ signaled: input.signaled === true || input.signal != null,
58
+ printedToStderr:
59
+ input.printedToStderr === true ||
60
+ stderr.length > 0 ||
61
+ input.stderrBytes > 0,
62
+ stderrDigest: digest,
63
+ };
64
+ }
65
+
42
66
  function normalizeRegistryUrls(value) {
43
67
  if (Array.isArray(value)) return value.filter(Boolean);
44
68
  return value ? [value] : [];
@@ -169,12 +193,10 @@ async function fetchRegistryRemoteArtifacts(
169
193
  : null;
170
194
  if (!signature && !sbom) return null;
171
195
  const config = await loadOptionalPluginConfig();
172
- const { resolveRegistryToken } = await import(
173
- "../lib/plugin-runtime/remote-source.js"
174
- );
175
- const { fetchPluginMarketplaceRemoteArtifacts } = await import(
176
- "../lib/plugin-runtime/marketplace-remote-artifacts.js"
177
- );
196
+ const { resolveRegistryToken } =
197
+ await import("../lib/plugin-runtime/remote-source.js");
198
+ const { fetchPluginMarketplaceRemoteArtifacts } =
199
+ await import("../lib/plugin-runtime/marketplace-remote-artifacts.js");
178
200
  return fetchPluginMarketplaceRemoteArtifacts({
179
201
  registryUrl,
180
202
  token: resolveRegistryToken(registryUrl, { token, config }),
@@ -434,9 +456,8 @@ async function materializeRegistrySelection(
434
456
 
435
457
  async function buildRegistryInstallPreflight(url, resolved, cwd) {
436
458
  const { VERSION } = await import("../constants.js");
437
- const { buildPluginMarketplaceInstallPreflight } = await import(
438
- "../lib/plugin-runtime/marketplace-catalog.js"
439
- );
459
+ const { buildPluginMarketplaceInstallPreflight } =
460
+ await import("../lib/plugin-runtime/marketplace-catalog.js");
440
461
  const installed = await discoverInstalledPluginVersions(cwd);
441
462
  return buildPluginMarketplaceInstallPreflight({
442
463
  registryUrl: url,
@@ -585,9 +606,8 @@ async function installedCatalogAuthorityMatches(
585
606
  }
586
607
 
587
608
  async function buildInstalledMarketplaceSnapshot(name, scope, cwd) {
588
- const { listInstalled, readSourceMetadataStrict } = await import(
589
- "../lib/plugin-runtime/install.js"
590
- );
609
+ const { listInstalled, readSourceMetadataStrict } =
610
+ await import("../lib/plugin-runtime/install.js");
591
611
  const { discoverPlugins } = await import("../lib/plugin-runtime/scopes.js");
592
612
  const row = listInstalled({ cwd, scopes: [scope] }).find(
593
613
  (candidate) => candidate.name === name && candidate.scope === scope,
@@ -712,12 +732,10 @@ async function buildInstalledMarketplaceSnapshot(name, scope, cwd) {
712
732
  }
713
733
 
714
734
  async function buildRegistryUpdateImpact(preflight, name, scope, cwd) {
715
- const { buildPluginMarketplaceUpdateImpact } = await import(
716
- "../lib/plugin-runtime/marketplace-impact.js"
717
- );
718
- const { listInstalledAllScopes } = await import(
719
- "../lib/plugin-runtime/install.js"
720
- );
735
+ const { buildPluginMarketplaceUpdateImpact } =
736
+ await import("../lib/plugin-runtime/marketplace-impact.js");
737
+ const { listInstalledAllScopes } =
738
+ await import("../lib/plugin-runtime/install.js");
721
739
  const inventory = listInstalledAllScopes({ cwd }).filter(
722
740
  (entry) => entry.name === name,
723
741
  );
@@ -758,9 +776,8 @@ async function resolvePluginCapabilityNotice(
758
776
  ) {
759
777
  try {
760
778
  const { discoverPlugins } = await import("../lib/plugin-runtime/scopes.js");
761
- const { describeCapabilities } = await import(
762
- "../lib/plugin-runtime/capabilities.js"
763
- );
779
+ const { describeCapabilities } =
780
+ await import("../lib/plugin-runtime/capabilities.js");
764
781
  const consent = await import("../lib/plugin-runtime/capability-consent.js");
765
782
  const installed = discoverPlugins({
766
783
  cwd,
@@ -1056,6 +1073,9 @@ export function registerPluginCommand(program) {
1056
1073
  {
1057
1074
  ...result,
1058
1075
  skills: skillResult.installed,
1076
+ installCommand: normalizeInstallCommandResult(
1077
+ result.installCommand,
1078
+ ),
1059
1079
  integrity: verifiedManifest
1060
1080
  ? {
1061
1081
  sha256: verifiedManifest.sha256,
@@ -1147,9 +1167,8 @@ export function registerPluginCommand(program) {
1147
1167
  .action(async (name, options) => {
1148
1168
  try {
1149
1169
  if (options.scope) {
1150
- const { setPluginEnabled } = await import(
1151
- "../lib/plugin-runtime/install.js"
1152
- );
1170
+ const { setPluginEnabled } =
1171
+ await import("../lib/plugin-runtime/install.js");
1153
1172
  const result = setPluginEnabled(name, true, {
1154
1173
  scope: options.scope,
1155
1174
  cwd: process.cwd(),
@@ -1205,9 +1224,8 @@ export function registerPluginCommand(program) {
1205
1224
  .action(async (name, options) => {
1206
1225
  try {
1207
1226
  if (options.scope) {
1208
- const { setPluginEnabled } = await import(
1209
- "../lib/plugin-runtime/install.js"
1210
- );
1227
+ const { setPluginEnabled } =
1228
+ await import("../lib/plugin-runtime/install.js");
1211
1229
  const result = setPluginEnabled(name, false, {
1212
1230
  scope: options.scope,
1213
1231
  cwd: process.cwd(),
@@ -1612,13 +1630,11 @@ export function registerPluginCommand(program) {
1612
1630
  .option("--public-key <path>", "Public key for signature verification")
1613
1631
  .option("--json", "Output as JSON")
1614
1632
  .action(async (dir, options) => {
1615
- const { parsePluginManifest, summarizeComponents } = await import(
1616
- "../lib/plugin-runtime/manifest.js"
1617
- );
1633
+ const { parsePluginManifest, summarizeComponents } =
1634
+ await import("../lib/plugin-runtime/manifest.js");
1618
1635
  const manifest = parsePluginManifest(dir);
1619
- const { summarizeGoalExtension } = await import(
1620
- "../lib/plugin-runtime/goal-extension-contract.js"
1621
- );
1636
+ const { summarizeGoalExtension } =
1637
+ await import("../lib/plugin-runtime/goal-extension-contract.js");
1622
1638
  const goalExtensionSummary = summarizeGoalExtension(manifest);
1623
1639
 
1624
1640
  // Optional integrity/signature check on the manifest file itself.
@@ -1665,9 +1681,8 @@ export function registerPluginCommand(program) {
1665
1681
  if (rawManifest && rawManifest.dependencies) {
1666
1682
  const { checkPluginDependencies, formatDependencyIssues } =
1667
1683
  await import("../lib/plugin-runtime/governance.js");
1668
- const { discoverPlugins } = await import(
1669
- "../lib/plugin-runtime/scopes.js"
1670
- );
1684
+ const { discoverPlugins } =
1685
+ await import("../lib/plugin-runtime/scopes.js");
1671
1686
  const { VERSION } = await import("../constants.js");
1672
1687
  const installed = {};
1673
1688
  try {
@@ -1747,9 +1762,8 @@ export function registerPluginCommand(program) {
1747
1762
  // so a user can compare against the components it ships (the audit findings
1748
1763
  // for an under-declared manifest already surface in manifest.warnings).
1749
1764
  if (manifest.capabilitiesDeclared) {
1750
- const { describeCapabilities } = await import(
1751
- "../lib/plugin-runtime/capabilities.js"
1752
- );
1765
+ const { describeCapabilities } =
1766
+ await import("../lib/plugin-runtime/capabilities.js");
1753
1767
  const capLines = describeCapabilities(manifest.capabilities);
1754
1768
  logger.log(chalk.bold("\nCapabilities (declared):"));
1755
1769
  if (capLines.length === 0) logger.log(chalk.gray(" (none)"));
@@ -1871,9 +1885,8 @@ export function registerPluginCommand(program) {
1871
1885
  let commandSourceAuthority = null;
1872
1886
  let registryResolutionAuthority = null;
1873
1887
  const registryUrls = normalizeRegistryUrls(options.registry);
1874
- const { isRemoteSource, resolveRemoteSource } = await import(
1875
- "../lib/plugin-runtime/remote-source.js"
1876
- );
1888
+ const { isRemoteSource, resolveRemoteSource } =
1889
+ await import("../lib/plugin-runtime/remote-source.js");
1877
1890
  if (
1878
1891
  options.offline === true &&
1879
1892
  registryUrls.length === 0 &&
@@ -2212,6 +2225,9 @@ export function registerPluginCommand(program) {
2212
2225
  marketplacePreflight,
2213
2226
  marketplaceImpact,
2214
2227
  marketplaceAuthorityPersisted,
2228
+ installCommand: normalizeInstallCommandResult(
2229
+ res.installCommand,
2230
+ ),
2215
2231
  marketplaceCleanupPending: lifecycleCleanupPending,
2216
2232
  cleanupPending:
2217
2233
  res.cleanupPending === true || lifecycleCleanupPending,
@@ -2440,9 +2456,8 @@ export function registerPluginCommand(program) {
2440
2456
  return;
2441
2457
  }
2442
2458
 
2443
- const { fetchRegistry, resolveRegistryToken } = await import(
2444
- "../lib/plugin-runtime/remote-source.js"
2445
- );
2459
+ const { fetchRegistry, resolveRegistryToken } =
2460
+ await import("../lib/plugin-runtime/remote-source.js");
2446
2461
  const { buildPluginMarketplaceCatalog, MAX_MARKETPLACE_CATALOG_SOURCES } =
2447
2462
  await import("../lib/plugin-runtime/marketplace-catalog.js");
2448
2463
  if (registryUrls.length > MAX_MARKETPLACE_CATALOG_SOURCES) {
@@ -2463,9 +2478,8 @@ export function registerPluginCommand(program) {
2463
2478
  process.exitCode = 1;
2464
2479
  return;
2465
2480
  }
2466
- const { discoverPlugins } = await import(
2467
- "../lib/plugin-runtime/scopes.js"
2468
- );
2481
+ const { discoverPlugins } =
2482
+ await import("../lib/plugin-runtime/scopes.js");
2469
2483
  const { VERSION } = await import("../constants.js");
2470
2484
  let config = null;
2471
2485
  try {
@@ -2830,9 +2844,8 @@ export function registerPluginCommand(program) {
2830
2844
  )
2831
2845
  .option("--json", "Output as JSON")
2832
2846
  .action(async (options) => {
2833
- const { listInstalled, listInstalledAllScopes } = await import(
2834
- "../lib/plugin-runtime/install.js"
2835
- );
2847
+ const { listInstalled, listInstalledAllScopes } =
2848
+ await import("../lib/plugin-runtime/install.js");
2836
2849
  const rows = options.allScopes
2837
2850
  ? listInstalledAllScopes({ cwd: process.cwd() })
2838
2851
  : listInstalled({ cwd: process.cwd() });
@@ -2844,9 +2857,8 @@ export function registerPluginCommand(program) {
2844
2857
  logger.info("No plugins installed. Add one with: cc plugin add <dir>");
2845
2858
  return;
2846
2859
  }
2847
- const { isPluginTrusted } = await import(
2848
- "../lib/plugin-runtime/trust.js"
2849
- );
2860
+ const { isPluginTrusted } =
2861
+ await import("../lib/plugin-runtime/trust.js");
2850
2862
  logger.log(chalk.bold(`Installed plugins (${rows.length}):`));
2851
2863
  for (const r of rows) {
2852
2864
  if (r.runtimeBlocked === true) {
@@ -2899,9 +2911,8 @@ export function registerPluginCommand(program) {
2899
2911
  .option("--json", "Output the redacted transaction authority as JSON")
2900
2912
  .action(async (name, options) => {
2901
2913
  try {
2902
- const { inspectPluginTransaction } = await import(
2903
- "../lib/plugin-runtime/install.js"
2904
- );
2914
+ const { inspectPluginTransaction } =
2915
+ await import("../lib/plugin-runtime/install.js");
2905
2916
  const transaction = inspectPluginTransaction(name, {
2906
2917
  scope: options.scope,
2907
2918
  cwd: process.cwd(),
@@ -2944,9 +2955,8 @@ export function registerPluginCommand(program) {
2944
2955
  .option("--json", "Output the recovery result as JSON")
2945
2956
  .action(async (name, options) => {
2946
2957
  try {
2947
- const { recoverPluginTransaction } = await import(
2948
- "../lib/plugin-runtime/install.js"
2949
- );
2958
+ const { recoverPluginTransaction } =
2959
+ await import("../lib/plugin-runtime/install.js");
2950
2960
  const recovery = recoverPluginTransaction(name, {
2951
2961
  scope: options.scope,
2952
2962
  cwd: process.cwd(),
@@ -2986,9 +2996,8 @@ export function registerPluginCommand(program) {
2986
2996
  )
2987
2997
  .action(async (name, options) => {
2988
2998
  try {
2989
- const { planPluginProvenanceMigration } = await import(
2990
- "../lib/plugin-runtime/install.js"
2991
- );
2999
+ const { planPluginProvenanceMigration } =
3000
+ await import("../lib/plugin-runtime/install.js");
2992
3001
  const plan = planPluginProvenanceMigration(name, {
2993
3002
  scope: options.scope,
2994
3003
  cwd: process.cwd(),
@@ -3030,9 +3039,8 @@ export function registerPluginCommand(program) {
3030
3039
  "refusing provenance mutation without --yes after reviewing the signed plan",
3031
3040
  );
3032
3041
  }
3033
- const { migratePluginProvenance } = await import(
3034
- "../lib/plugin-runtime/install.js"
3035
- );
3042
+ const { migratePluginProvenance } =
3043
+ await import("../lib/plugin-runtime/install.js");
3036
3044
  const result = migratePluginProvenance(name, {
3037
3045
  scope: options.scope,
3038
3046
  cwd: process.cwd(),
@@ -3076,9 +3084,8 @@ export function registerPluginCommand(program) {
3076
3084
  .option("--json", "Output the versioned artifact readback as JSON")
3077
3085
  .action(async (name, options) => {
3078
3086
  try {
3079
- const { listInstalled, readSourceMetadataStrict } = await import(
3080
- "../lib/plugin-runtime/install.js"
3081
- );
3087
+ const { listInstalled, readSourceMetadataStrict } =
3088
+ await import("../lib/plugin-runtime/install.js");
3082
3089
  const installed = listInstalled({
3083
3090
  cwd: process.cwd(),
3084
3091
  scopes: [options.scope],
@@ -3098,9 +3105,8 @@ export function registerPluginCommand(program) {
3098
3105
  required: true,
3099
3106
  requireRegistryAuthority: true,
3100
3107
  });
3101
- const { buildPluginMarketplaceArtifactReadback } = await import(
3102
- "../lib/plugin-runtime/marketplace-artifact-readback.js"
3103
- );
3108
+ const { buildPluginMarketplaceArtifactReadback } =
3109
+ await import("../lib/plugin-runtime/marketplace-artifact-readback.js");
3104
3110
  const evidence = buildPluginMarketplaceArtifactReadback({
3105
3111
  root: installed.dir,
3106
3112
  scope: installed.scope,
@@ -3173,12 +3179,10 @@ export function registerPluginCommand(program) {
3173
3179
  .option("--scope <scope>", "Scope of the plugin", "project")
3174
3180
  .option("--list", "List all trusted plugins instead")
3175
3181
  .action(async (name, options) => {
3176
- const { trustPlugin, listTrust } = await import(
3177
- "../lib/plugin-runtime/trust.js"
3178
- );
3179
- const { getActiveVersion } = await import(
3180
- "../lib/plugin-runtime/install.js"
3181
- );
3182
+ const { trustPlugin, listTrust } =
3183
+ await import("../lib/plugin-runtime/trust.js");
3184
+ const { getActiveVersion } =
3185
+ await import("../lib/plugin-runtime/install.js");
3182
3186
  if (options.list) {
3183
3187
  for (const t of listTrust()) {
3184
3188
  logger.log(` ${chalk.cyan(t.name)} v${t.version} [${t.scope}]`);
@@ -3233,12 +3237,10 @@ export function registerPluginCommand(program) {
3233
3237
  .option("--list", "List all capability consent entries")
3234
3238
  .option("--json", "Output as JSON")
3235
3239
  .action(async (name, options) => {
3236
- const consent = await import(
3237
- "../lib/plugin-runtime/capability-consent.js"
3238
- );
3239
- const { describeCapabilities } = await import(
3240
- "../lib/plugin-runtime/capabilities.js"
3241
- );
3240
+ const consent =
3241
+ await import("../lib/plugin-runtime/capability-consent.js");
3242
+ const { describeCapabilities } =
3243
+ await import("../lib/plugin-runtime/capabilities.js");
3242
3244
 
3243
3245
  if (!name || options.list) {
3244
3246
  const rows = consent.listCapabilityConsent();
@@ -3275,9 +3277,8 @@ export function registerPluginCommand(program) {
3275
3277
  }
3276
3278
 
3277
3279
  // Resolve the installed plugin + its declared capabilities.
3278
- const { discoverPlugins } = await import(
3279
- "../lib/plugin-runtime/scopes.js"
3280
- );
3280
+ const { discoverPlugins } =
3281
+ await import("../lib/plugin-runtime/scopes.js");
3281
3282
  let installed = null;
3282
3283
  try {
3283
3284
  installed = discoverPlugins({
@@ -3394,9 +3395,8 @@ export function registerPluginCommand(program) {
3394
3395
  )
3395
3396
  .option("--json", "Output as JSON")
3396
3397
  .action(async (name, options) => {
3397
- const { discoverPlugins } = await import(
3398
- "../lib/plugin-runtime/scopes.js"
3399
- );
3398
+ const { discoverPlugins } =
3399
+ await import("../lib/plugin-runtime/scopes.js");
3400
3400
  const optsMod = await import("../lib/plugin-runtime/plugin-options.js");
3401
3401
 
3402
3402
  let installed = null;
@@ -3498,9 +3498,8 @@ export function registerPluginCommand(program) {
3498
3498
  .option("--run", "Actually run the monitors for a few seconds, then reap")
3499
3499
  .option("--seconds <n>", "With --run: how long to run", "3")
3500
3500
  .action(async (options) => {
3501
- const { collectPluginMonitors } = await import(
3502
- "../lib/plugin-runtime/monitors.js"
3503
- );
3501
+ const { collectPluginMonitors } =
3502
+ await import("../lib/plugin-runtime/monitors.js");
3504
3503
  const monitors = collectPluginMonitors({ cwd: process.cwd() });
3505
3504
  if (options.json && !options.run) {
3506
3505
  console.log(JSON.stringify(monitors, null, 2));
@@ -3524,9 +3523,8 @@ export function registerPluginCommand(program) {
3524
3523
  }
3525
3524
  if (!options.run) return;
3526
3525
 
3527
- const { PluginMonitorSupervisor } = await import(
3528
- "../lib/plugin-monitor-supervisor.js"
3529
- );
3526
+ const { PluginMonitorSupervisor } =
3527
+ await import("../lib/plugin-monitor-supervisor.js");
3530
3528
  const secs = Math.max(1, parseInt(options.seconds, 10) || 3);
3531
3529
  const sup = new PluginMonitorSupervisor();
3532
3530
  const started = sup.start(monitors);
@@ -3556,9 +3554,8 @@ export function registerPluginCommand(program) {
3556
3554
  "Approve a different-source fallback when removing the active version",
3557
3555
  )
3558
3556
  .action(async (name, options) => {
3559
- const { listInstalled, uninstall } = await import(
3560
- "../lib/plugin-runtime/install.js"
3561
- );
3557
+ const { listInstalled, uninstall } =
3558
+ await import("../lib/plugin-runtime/install.js");
3562
3559
  try {
3563
3560
  const blockedRow = listInstalled({
3564
3561
  cwd: process.cwd(),
@@ -3666,9 +3663,8 @@ export function registerPluginCommand(program) {
3666
3663
  let commandSourceAuthority = null;
3667
3664
  let registryResolutionAuthority = null;
3668
3665
  const registryUrls = normalizeRegistryUrls(options.registry);
3669
- const { isRemoteSource, resolveRemoteSource } = await import(
3670
- "../lib/plugin-runtime/remote-source.js"
3671
- );
3666
+ const { isRemoteSource, resolveRemoteSource } =
3667
+ await import("../lib/plugin-runtime/remote-source.js");
3672
3668
  if (
3673
3669
  options.offline === true &&
3674
3670
  registryUrls.length === 0 &&
@@ -4058,6 +4054,9 @@ export function registerPluginCommand(program) {
4058
4054
  marketplacePreflight,
4059
4055
  marketplaceImpact,
4060
4056
  marketplaceAuthorityPersisted,
4057
+ installCommand: normalizeInstallCommandResult(
4058
+ res.installCommand,
4059
+ ),
4061
4060
  capabilities: upgradeNotice,
4062
4061
  capabilitiesGranted,
4063
4062
  activationStatus,
@@ -4150,9 +4149,8 @@ export function registerPluginCommand(program) {
4150
4149
  "Approve activating an installed version from a different source",
4151
4150
  )
4152
4151
  .action(async (name, version, options) => {
4153
- const { setActiveVersion } = await import(
4154
- "../lib/plugin-runtime/install.js"
4155
- );
4152
+ const { setActiveVersion } =
4153
+ await import("../lib/plugin-runtime/install.js");
4156
4154
  try {
4157
4155
  setActiveVersion(name, version, {
4158
4156
  scope: options.scope,
@@ -0,0 +1,35 @@
1
+ import { collectTaskRecords, taskCounts } from "../lib/task-record.js";
2
+
3
+ export function registerTasksCommand(program) {
4
+ const tasks = program
5
+ .command("tasks")
6
+ .description(
7
+ "List tasks across background, MCP, agent and schedule runtimes",
8
+ );
9
+ tasks
10
+ .option("--json", "Output the canonical TaskRecord projection as JSON")
11
+ .option("--active-only", "Hide terminal tasks")
12
+ .action((options) => {
13
+ const records = collectTaskRecords();
14
+ const visible = options.activeOnly
15
+ ? records.filter((task) => !task.terminal)
16
+ : records;
17
+ if (options.json) {
18
+ console.log(
19
+ JSON.stringify({ ...taskCounts(records), tasks: visible }, null, 2),
20
+ );
21
+ return;
22
+ }
23
+ if (!visible.length) {
24
+ console.log("No tasks.");
25
+ return;
26
+ }
27
+ for (const task of visible) {
28
+ const waiting = task.waitingOn ? ` waiting on ${task.waitingOn}` : "";
29
+ const ends = task.endsAt ? ` ends ${task.endsAt}` : "";
30
+ console.log(
31
+ `${task.taskId} [${task.source}] ${task.state}${waiting}${ends}`,
32
+ );
33
+ }
34
+ });
35
+ }
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "source": "CHANGELOG.md",
3
3
  "releases": [
4
+ {
5
+ "productVersion": null,
6
+ "cliVersion": "0.166.160",
7
+ "cliVersions": ["0.166.160"],
8
+ "date": "2026-11-22",
9
+ "title": "",
10
+ "sections": [
11
+ {
12
+ "heading": "Added - cc CLI 0.166.160 and IDE pairing (candidate, 2026-11-22)",
13
+ "body": "- Add the unified task projection, lifecycle stop receipts, structured plugin installation outcomes, MCP schema admission and status-line task fields from the 2026-11-22 Codex / Claude Code review.\n- Add VS Code session fork and workflow-map commands with the 0.37.195 pairing, and update JetBrains to 0.4.210.\n- Publish only after the exact commit passes CLI CI, CLI Strict Sandbox, Native Validation, VS Code host/browser/Remote SSH and JetBrains host/build gates."
14
+ }
15
+ ]
16
+ },
4
17
  {
5
18
  "productVersion": null,
6
19
  "cliVersion": "0.166.159",
@@ -9,8 +22,8 @@
9
22
  "title": "",
10
23
  "sections": [
11
24
  {
12
- "heading": "Fixed - cc CLI 0.166.159: restore supported macOS release gates (candidate, 2026-11-21)",
13
- "body": "- Restore macOS 15 for the complete CLI CI and Strict Sandbox matrices. GitHub rejected macOS 14 ARM64 before assigning a runner; earlier macOS 15 attempts were cancelled by superseding branch runs.\n- Carry the DMM-09 native SQLite acceptance drill from unpublished candidate 0.166.158. Preserve its immutable tag and require a new exact-source three-platform validation for this candidate.\n- Advance the fixture clock with completed task timestamps so independent verification does not correctly reject a future source. Count rejected and falsely completed checks from stored records, and close SQLite on failure.\n- Pair Open VSX 0.37.194 and JetBrains 0.4.209 with CLI 0.166.159 only after Actions OIDC publication and public npm readback. Child npm versions remain unchanged."
25
+ "heading": "Released - cc CLI 0.166.159 and IDE pairing (2026-11-21)",
26
+ "body": "- Restore macOS 15 for the complete CLI CI and Strict Sandbox matrices. GitHub rejected macOS 14 ARM64 before assigning a runner; earlier macOS 15 attempts were cancelled by superseding branch runs.\n- Carry the DMM-09 native SQLite acceptance drill from unpublished candidate 0.166.158. Preserve its immutable failed tag while releasing the corrected exact-source build.\n- Advance the fixture clock with completed task timestamps so independent verification does not correctly reject a future source. Count rejected and falsely completed checks from stored records, and close SQLite on failure.\n- Pair public Open VSX 0.37.194 and uploaded JetBrains 0.4.209 with public CLI 0.166.159 after Actions OIDC publication and public readback. JetBrains Marketplace listing remains pending; child npm versions remain unchanged."
14
27
  }
15
28
  ]
16
29
  },
@@ -411,6 +411,19 @@ export class BackgroundTaskManager extends EventEmitter {
411
411
  });
412
412
 
413
413
  child.on("exit", (code) => {
414
+ if (task.stopRequestedAt) {
415
+ task.stopConfirmedAt = Date.now();
416
+ task.stopContract = {
417
+ requested: true,
418
+ confirmed: true,
419
+ orphanRisk: false,
420
+ };
421
+ this._recordHistory(task, "stop_confirmed", {
422
+ requestedAt: task.stopRequestedAt,
423
+ confirmedAt: task.stopConfirmedAt,
424
+ exitCode: code,
425
+ });
426
+ }
414
427
  if (task.status === TaskStatus.RUNNING) {
415
428
  if (code === 0) {
416
429
  this._complete(
@@ -537,7 +550,17 @@ export class BackgroundTaskManager extends EventEmitter {
537
550
  }
538
551
 
539
552
  stop(taskId) {
553
+ const task = this.tasks.get(taskId);
554
+ if (!task) return { requested: false, confirmed: false, orphanRisk: false };
540
555
  const child = this.processes.get(taskId);
556
+ const requestedAt = Date.now();
557
+ task.stopRequestedAt = task.stopRequestedAt || requestedAt;
558
+ task.stopContract = {
559
+ requested: true,
560
+ confirmed: !child || child.exitCode !== null,
561
+ orphanRisk: false,
562
+ };
563
+ this._recordHistory(task, "stop_requested", { requestedAt });
541
564
  if (child) {
542
565
  this._clearKillTimer(taskId);
543
566
  _deps.killProcessTree(child, "SIGTERM");
@@ -547,6 +570,15 @@ export class BackgroundTaskManager extends EventEmitter {
547
570
  const killTimer = setTimeout(() => {
548
571
  if (child.exitCode === null) {
549
572
  _deps.killProcessTree(child, "SIGKILL");
573
+ task.stopContract = {
574
+ requested: true,
575
+ confirmed: false,
576
+ orphanRisk: true,
577
+ };
578
+ this._recordHistory(task, "stop_timeout", {
579
+ requestedAt: task.stopRequestedAt,
580
+ orphanRisk: true,
581
+ });
550
582
  }
551
583
  }, this.killGraceMs);
552
584
  if (killTimer && typeof killTimer.unref === "function") killTimer.unref();
@@ -555,11 +587,16 @@ export class BackgroundTaskManager extends EventEmitter {
555
587
  child.once("exit", () => this._clearKillTimer(taskId));
556
588
  }
557
589
  }
558
- const task = this.tasks.get(taskId);
559
- if (task) {
560
- this._recordHistory(task, "stop-requested", { requestedBy: "user" });
590
+ if (!child) {
591
+ task.stopConfirmedAt = Date.now();
592
+ task.stopContract.confirmed = true;
593
+ this._recordHistory(task, "stop_confirmed", {
594
+ requestedAt: task.stopRequestedAt,
595
+ confirmedAt: task.stopConfirmedAt,
596
+ });
561
597
  }
562
598
  this._complete(taskId, TaskStatus.FAILED, null, "Stopped by user");
599
+ return { ...task.stopContract };
563
600
  }
564
601
 
565
602
  _stopForBudget(taskId, reason) {