chainlesschain 0.166.141 → 0.166.142

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
@@ -2,19 +2,40 @@
2
2
 
3
3
  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
4
 
5
- <!-- release141-pairing:start -->
5
+ ## CLI 0.166.142 / authorized goal events and history
6
6
 
7
- ## CLI 0.166.141 / complete source preview recovery
7
+ Release pairing: Session Core **0.3.25**, CLI **0.166.142**, Open VSX **0.37.178**
8
+ and JetBrains **0.4.195**. This adds authorized goal observation, transactional
9
+ retained history, durable replay checkpoints, explicit recovery in both IDEs and
10
+ the data-only `project-delivery-assistant` 0.2.0 scenario. Separate desktop consent
11
+ and native confirmation remain required; replay is at least once and does not
12
+ prove business completion. Real GUI/business-effect evaluation remains separate.
8
13
 
9
- Release candidate **0.166.141** preserves legitimate source spread expressions in complete file-read previews and keeps read-recovery guidance actionable. Launcher-owned hermetic evaluations use the same exact mutation scope through the CLI and IDE gateway; ordinary interactive permissions and the IDE protocol retain their existing behavior.
14
+ Publication requires exact-source three-OS CLI CI / Strict Sandbox and OIDC.
15
+ Publish and verify Session Core first, then CLI, then IDE extensions. After public
16
+ verification install `npm i -g chainlesschain@0.166.142 --registry https://registry.npmjs.org`.
17
+ PC/mobile releases follow the verified IDE stage. The block below retains the
18
+ previous verified public pairing.
10
19
 
11
- The intended pairing is VS Code **0.37.177** and JetBrains **0.4.194**. Child npm versions are unchanged. Publication remains pending until this exact source passes every configured Linux, Windows and macOS CLI CI / CLI Strict Sandbox job, then GitHub Actions OIDC publishes and verifies the public npm archive. IDE publication follows verified CLI installation.
20
+ <!-- release141-current:start -->
12
21
 
13
- After public availability is verified, install `npm i -g chainlesschain@0.166.141 --registry https://registry.npmjs.org`, restart the CLI and IDE hosts, and run `cc --version` and `cc doctor`.
22
+ ## CLI 0.166.141 / verified public pairing
14
23
 
15
- This release does not run additional model-task retests or rescore historical results. Volcengine historical coverage remains 36/45 with its original qualification limits; the latest complete round is 24/45. Sol original-project history is 41/45, the latest repaired-source four-case cohort is 2/4, and cross-version coverage is 45/45. Diagnostic future budgets remain finite; these are not automatic increases to ordinary user requests.
24
+ 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.
16
25
 
17
- <!-- release141-pairing:end -->
26
+ Exact release source:`df9295e33ad04aec0aa74cab4dd242766d5556a4`。CLI CI **76/76** / Strict Sandbox **6/6** passed across Linux, Windows and macOS.
27
+
28
+ This release preserves valid spread expressions in complete source previews, keeps read recovery actionable, and shares launcher-owned exact file scope across CLI and IDE evaluations. The diagnostic broker rejects a formal budget scope before reading options. Existing interactive permissions, IDE protocol and finite diagnostic limits remain.
29
+
30
+ Install `npm i -g chainlesschain@0.166.141 --registry https://registry.npmjs.org`; restart CLI / IDE chat hosts, then run `cc --version` and `cc doctor`.
31
+
32
+ No additional model-task retests were run. Volcengine corrected .140 round: generation **39/45**, strict acceptance **24/45**; historical automatic-deliverable union **36/45**, with **9** remaining and the verify-06 candidate-only qualification preserved. Sol original frozen-project history **41/45**, cross-version coverage including repaired sources **45/45**, and the separate .140 repaired-project four-case result **2/4** retain distinct scopes.
33
+
34
+ [Publication evidence](../../docs/research/cli/evidence/release141-public/README.md) · [45-task ledger](../../docs/research/cli/verify01-36-plus-9-task-list.md)
35
+
36
+ SDK **0.2.17**, Protocol **0.1.12**, Kernel **0.1.11** and child npm versions are unchanged; public child bytes and dependency installation were verified before CLI publication. PC/mobile **v5.0.3.144** remain independent. Microsoft Marketplace is deferred. NOT_PAID_READY / NOT_ADMITTED / HOLD remain.
37
+
38
+ <!-- release141-current:end -->
18
39
 
19
40
  <!-- release140-pairing:start -->
20
41
 
@@ -2714,6 +2735,105 @@ cc plugin consent goal-progress-viewer --scope project --grant --json
2714
2735
  cc goal panels <id> --plugin goal-progress-viewer --scope project
2715
2736
  ```
2716
2737
 
2738
+ The working tree also supports a bounded, explicitly started **standalone goal
2739
+ status observer**. This addition is unreleased; use the local CLI source:
2740
+
2741
+ ```bash
2742
+ node packages/cli/bin/chainlesschain.js plugin add packages/cli/src/lib/plugin-runtime/examples/goal-status-observer --scope project --json
2743
+ node packages/cli/bin/chainlesschain.js plugin trust goal-status-observer --scope project
2744
+ node packages/cli/bin/chainlesschain.js plugin consent goal-status-observer --scope project --grant --json
2745
+ node packages/cli/bin/chainlesschain.js goal watch <id> --plugin goal-status-observer --scope project --expected-store <catalog-store-id> --interval 1000 --duration 60 --json
2746
+ ```
2747
+
2748
+ Run these commands from the repository root. `watch` prints a `ready` record,
2749
+ then newline-delimited JSON for observed `goal.status.changed` transitions.
2750
+ It polls every 1000 ms for 60 seconds by default (interval 250–60000 ms,
2751
+ duration 1–900 seconds). Ctrl+C stops it. Every poll rechecks plugin trust,
2752
+ consent and policy; revocation, uninstall or an invalid source stops the stream.
2753
+ Events contain status transitions and versioned goal references, without the
2754
+ objective or task body. This is polling with no history replay: intermediate
2755
+ transitions may be missed and timestamps describe observation time. A new run
2756
+ starts from the current state. Existing summary/evidence/draft connections grant
2757
+ no event access. IDE event UI still requires separate work.
2758
+
2759
+ The working tree additionally supports a separately authorized **desktop event
2760
+ connection**. In the desktop goal connection panel choose the dedicated risk/action
2761
+ event authorization, approve the native dialog, and save a new private connection
2762
+ file. This exports v4 `goal.events`; it contains no goal objective and cannot be
2763
+ used for goal catalogs, panels or drafts. From the repository root:
2764
+
2765
+ ```bash
2766
+ node packages/cli/bin/chainlesschain.js plugin add packages/cli/src/lib/plugin-runtime/examples/goal-project-observer --scope project --json
2767
+ node packages/cli/bin/chainlesschain.js plugin trust goal-project-observer --scope project
2768
+ node packages/cli/bin/chainlesschain.js plugin consent goal-project-observer --scope project --grant --json
2769
+ node packages/cli/bin/chainlesschain.js goal watch <goal-id> --connection "<event-connection.json>" --plugin goal-project-observer --scope project --duration 60 --json
2770
+ ```
2771
+
2772
+ After `ready`, this observer emits `risk.review.completed` and
2773
+ `action.receipt.updated` summaries when new native evidence is observed. Baseline
2774
+ history is not replayed. Reads remain bounded to the latest persisted risk check
2775
+ and latest 20 receipts, so intermediate changes can be missed. Timestamps describe
2776
+ observation time, and neither a check nor an action receipt proves goal completion.
2777
+ Disconnect, logout, navigation, target revision, expiry or authorization changes
2778
+ stop the observer. Snapshot changes during projection also stop it; explicitly
2779
+ restart to observe the current state. The 15-minute connection and 512-read quota
2780
+ can end a watch before its requested duration. Cancellation interrupts pending HTTP.
2781
+ This source capability is unreleased and does not add durable event replay.
2782
+
2783
+ Matching working-tree VS Code and JetBrains builds expose **Observe desktop
2784
+ events…** in the plugin manager. Select the admitted observer plugin, choose the
2785
+ v4 file with the native picker and enter the goal ID shown in the desktop. The
2786
+ IDE starts a fixed 60-second watch, validates the NDJSON target/plugin binding,
2787
+ and shows only the latest 50 plain text observations. **Stop and clear**, plugin
2788
+ operations, refresh or closing the manager stop the owned CLI process and reject
2789
+ late output. These entries need local matching builds; real IDE GUI acceptance
2790
+ and cross-platform release gates remain separate.
2791
+
2792
+ The working tree separately supports **retained event replay**. The desktop's
2793
+ **另行授权保留的事件历史** button exports a v5 `goal.event-history` connection.
2794
+ v1–v4 grants are not expanded, and v5 does not grant catalogs, panels, live watch
2795
+ or draft submission. Use the admitted `goal-project-observer` sample above:
2796
+
2797
+ ```bash
2798
+ node packages/cli/bin/chainlesschain.js goal replay <goal-id> --connection "<history-connection.json>" --checkpoint "<new-or-existing-checkpoint.json>" --plugin goal-project-observer --scope project --json
2799
+ ```
2800
+
2801
+ Run the same command again with the same checkpoint to read the next page. Each
2802
+ page scans at most 20 retained events and stays within 16 KiB. The checkpoint
2803
+ contains only the target/plugin/declaration binding and opaque cursor, with no
2804
+ credentials or event bodies. The command holds a strict file lock, acknowledges
2805
+ stdout, rechecks current native and plugin access, then atomically advances it.
2806
+ Exit zero means the checkpoint committed. A crash after output but before commit
2807
+ can repeat the same event IDs: delivery is **at least once**, and stdout acceptance
2808
+ does not prove downstream consumption. A failed write or revoked access does not
2809
+ advance the old cursor; no automatic retry or reconnect runs.
2810
+
2811
+ `--checkpoint-mode new` refuses an existing checkpoint; `--checkpoint-mode resume`
2812
+ requires the original file and never creates a replacement. The default `auto`
2813
+ keeps the existing create-or-resume CLI behavior. All modes check the binding
2814
+ and hold the same checkpoint lock through output and commit.
2815
+
2816
+ The journal retains the newest 1000 events per actor/goal and starts with the new
2817
+ instrumentation; earlier checks, old-version writes and other execution paths are
2818
+ not backfilled. The first page reports `truncated` when older journal entries were
2819
+ evicted. An expired cursor reports `GOAL_EVENT_HISTORY_GAP`; a cursor ahead of a
2820
+ restored database reports `GOAL_EVENT_HISTORY_REGRESSED`. Neither is silently reset.
2821
+ After an explicit new desktop authorization, reconnect with the new connection
2822
+ file and the same checkpoint for the same active goal revision and plugin. Changed
2823
+ identity, goal revision/control generation or plugin declaration requires a new
2824
+ explicit checkpoint; an opaque cursor never grants access.
2825
+
2826
+ Matching working-tree VS Code and JetBrains plugin managers expose **Recover
2827
+ retained history…**, with native v5 connection and new/resume checkpoint selection.
2828
+ **Read next page / check again** runs one explicit page. Results appear only after
2829
+ successful CLI exit and validation; cancellation clears continuation and warns
2830
+ that the checkpoint may already have advanced. Keep it and explicitly resume.
2831
+ The IDE never reads credentials or checkpoint bodies. Real GUI acceptance is pending.
2832
+ This unreleased change requires matching Session Core, CLI and desktop sources.
2833
+ Release the required child package first, verify
2834
+ the exact three-OS CLI gates and OIDC publication, then align downstream IDE/client
2835
+ releases; local replay tests are not a release gate.
2836
+
2717
2837
  VS Code and JetBrains expose **CLI goal panels…** in the plugin manager. Select
2718
2838
  a goal from the native paged picker, or choose **Enter goal ID…**. The picker uses
2719
2839
  `goal catalog --json`; its opaque `nextCursor` continues with `--after <cursor>`.
@@ -2726,14 +2846,24 @@ the manual-ID path when catalog discovery is unavailable.
2726
2846
 
2727
2847
  Refresh or a new read checks current source and plugin authorization. Standalone
2728
2848
  goals provide objective/status snapshots. Historical project risk and receipt
2729
- summaries require the separate desktop evidence connection below. The broader
2730
- `project-delivery-assistant` example still requires a project host adapter.
2849
+ summaries require the separate desktop evidence connection below.
2850
+
2851
+ The working-tree [`project-delivery-assistant` 0.2.0 scenario package](src/lib/plugin-runtime/examples/project-delivery-assistant/README.md)
2852
+ now combines those evidence panels, standalone status / native risk-receipt
2853
+ observations, retained replay and pending description drafts under one installed
2854
+ plugin. Install its directory, then explicitly trust it and consent to its full
2855
+ declared capability set. Each operation still needs the separate source/connection
2856
+ for that surface; an evidence connection cannot watch events or submit drafts.
2857
+ The same installed plugin works with both IDE plugin managers. Installation and
2858
+ reinstallation do not start an observer, retry or business action. Use matching
2859
+ local CLI/Desktop/Session Core sources; these additions are unreleased. The
2860
+ package does not yet offer task-creation proposals or automatic drafting.
2731
2861
 
2732
2862
  The working-tree SDK now shares its proposal contract with Session Core's native
2733
2863
  pending-draft queue. A trusted-host SQLite integration verifies source and
2734
2864
  admission checks, idempotency and revocation; the CLI still has no authenticated
2735
2865
  live project write entry. The desktop's separately consented built-in delivery
2736
- draft rule is not an installed CLI plugin or the full `project-delivery-assistant`.
2866
+ draft rule is separate from the installed `project-delivery-assistant` scenario.
2737
2867
  The trusted desktop host can now explicitly convert a persisted draft into one
2738
2868
  native preview/intent, then use the existing native confirmation and receipt
2739
2869
  flow. Conversion IDs survive restart and lost responses; revocation blocks
@@ -2786,8 +2916,8 @@ not establish current risk or goal completion. Running actions remain unresolved
2786
2916
  The read path performs no initialization, recovery or usage settlement and
2787
2917
  exposes no task bodies, previews or approval evidence. Summary-only plugins
2788
2918
  cannot read evidence fields. Project writes and event subscriptions remain
2789
- unavailable through either connection. The complete `project-delivery-assistant`
2790
- example still requires those additional host capabilities.
2919
+ unavailable through either connection. The combined `project-delivery-assistant`
2920
+ uses separate v3 draft, v4 event and v5 replay authorization for those surfaces.
2791
2921
 
2792
2922
  The working tree also supports **request-file handoff** for task descriptions.
2793
2923
  Install the proposal-only example and explicitly trust/consent it:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chainlesschain",
3
- "version": "0.166.141",
3
+ "version": "0.166.142",
4
4
  "description": "CLI for ChainlessChain - install, configure, and manage your personal AI management system",
5
5
  "type": "module",
6
6
  "bin": {
@@ -108,7 +108,7 @@
108
108
  "@chainlesschain/core-mtc": "0.2.3",
109
109
  "@chainlesschain/core-multisig": "0.1.4",
110
110
  "@chainlesschain/personal-data-hub": "0.4.66",
111
- "@chainlesschain/session-core": "0.3.24",
111
+ "@chainlesschain/session-core": "0.3.25",
112
112
  "@chainlesschain/shared-logger": "0.1.1",
113
113
  "@inquirer/prompts": "^7.2.0",
114
114
  "@noble/curves": "^1.9.7",
@@ -6,5 +6,5 @@
6
6
  "imageDigest": "sha256:6395a47a5bd9b038303e94a5e93754258c8480dab64635460f973eb93dc6f4d8",
7
7
  "bytes": 778808,
8
8
  "linkage": "static",
9
- "commit": "df9295e33ad04aec0aa74cab4dd242766d5556a4"
9
+ "commit": "b78cf0af8c8b0491189465773b148ac77c332222"
10
10
  }
@@ -6,5 +6,5 @@
6
6
  "imageDigest": "sha256:f162e55ad3f3f72f8a52e9d7f12b5b8db44506c2ca66a14d7d62d5cd4f12498e",
7
7
  "bytes": 934160,
8
8
  "linkage": "static",
9
- "commit": "df9295e33ad04aec0aa74cab4dd242766d5556a4"
9
+ "commit": "b78cf0af8c8b0491189465773b148ac77c332222"
10
10
  }
@@ -64,7 +64,7 @@
64
64
  "fflag": "Usage: chainlesschain fflag [options] [command]\n\nFeature Flags V2 governance (in-memory, CLI v0.143.0)\n\nOptions:\n -h, --help display help for command\n\nCommands:\n enums-v2 Show V2 maturity + lifecycle enums\n register-profile-v2 [options] Register a feature flag profile (pending)\n activate-profile-v2 <id> Transition profile to active\n pause-profile-v2 <id> Transition profile to paused\n archive-profile-v2 <id> Transition profile to archived (terminal)\n touch-profile-v2 <id> Refresh lastTouchedAt\n get-profile-v2 <id> Get a profile by id\n list-profiles-v2 List all profiles\n create-eval-v2 [options] Create an eval (queued)\n evaluating-eval-v2 <id> Mark eval as evaluating\n evaluate-eval-v2 <id> Mark eval as evaluated (terminal)\n fail-eval-v2 [options] <id> Mark eval as failed (terminal)\n cancel-eval-v2 [options] <id> Mark eval as cancelled (terminal)\n get-eval-v2 <id> Get an eval by id\n list-evals-v2 List all evals\n config-v2 Show V2 config (caps + idle/stuck windows)\n set-max-active-profiles-v2 <n> Set max active profiles per owner\n set-max-pending-evals-v2 <n> Set max pending evals per profile\n set-profile-idle-ms-v2 <ms> Set profile idle window\n set-eval-stuck-ms-v2 <ms> Set eval stuck window\n auto-pause-idle-v2 Auto-pause idle active profiles\n auto-fail-stuck-v2 Auto-fail stuck evaluating evals\n gov-stats-v2 Show V2 governance stats\n help [command] display help for command\n",
65
65
  "fusion": "Usage: chainlesschain fusion [options] [command]\n\nProtocol fusion & AI social (Phase 72-73)\n\nOptions:\n -h, --help display help for command\n\nCommands:\n protocols [options] List supported protocols\n quality-levels [options] List quality levels\n send [options] Send cross-protocol message\n msg-show [options] <id> Show message details\n messages [options] List unified messages\n map-identity [options] Create identity mapping\n identity [options] <did> Look up identity mapping by DID\n identities [options] List identity mappings\n verify-identity [options] <id> Verify an identity mapping\n assess [options] <content> Assess content quality\n quality-show [options] <id> Show quality score details\n quality-scores [options] List quality scores\n quality-report [options] Content quality report\n translate [options] <text> Translate text (simulated)\n detect-lang [options] <text> Detect language of text\n translation-stats [options] Translation cache statistics\n stats [options] Protocol fusion & AI social statistics\n bridge-maturities-v2 List BRIDGE_MATURITY_V2 enum values\n translation-runs-v2 List TRANSLATION_RUN_V2 enum values\n max-active-bridges-per-operator Get current max-active-bridges-per-operator cap\n set-max-active-bridges-per-operator <n> Set max-active-bridges-per-operator cap\n max-running-translations-per-bridge Get current max-running-translations-per-bridge cap\n set-max-running-translations-per-bridge <n> Set max-running-translations-per-bridge cap\n bridge-idle-ms Get current bridge-idle-ms threshold\n set-bridge-idle-ms <n> Set bridge-idle-ms threshold\n translation-stuck-ms Get current translation-stuck-ms threshold\n set-translation-stuck-ms <n> Set translation-stuck-ms threshold\n active-bridge-count [options] Count non-retired, non-provisional bridges (optionally by operator)\n running-translation-count [options] Count RUNNING translations (optionally by bridge)\n register-bridge-v2 [options] <bridge-id> Register V2 bridge (provisional by default)\n bridge-v2 <bridge-id> Show V2 bridge state\n list-bridges-v2 [options] List V2 bridges\n set-bridge-maturity-v2 [options] <bridge-id> <status> Transition V2 bridge maturity\n activate-bridge [options] <bridge-id> Shortcut for activate transition\n degrade-bridge [options] <bridge-id> Shortcut for degrade transition\n deprecate-bridge [options] <bridge-id> Shortcut for deprecate transition\n retire-bridge [options] <bridge-id> Shortcut for retire transition\n touch-bridge-usage <bridge-id> Mark V2 bridge as used now (for idle auto-retire)\n enqueue-translation-v2 [options] <translation-id> Enqueue a V2 translation run\n translation-v2 <translation-id> Show V2 translation state\n list-translations-v2 [options] List V2 translations\n set-translation-status-v2 [options] <translation-id> <status> Transition V2 translation status\n start-translation [options] <translation-id> Shortcut for start transition\n succeed-translation [options] <translation-id> Shortcut for succeed transition\n fail-translation [options] <translation-id> Shortcut for fail transition\n cancel-translation [options] <translation-id> Shortcut for cancel transition\n auto-retire-idle-bridges Bulk-retire ACTIVE/DEGRADED/DEPRECATED bridges whose lastUsedAt is older than bridgeIdleMs\n auto-fail-stuck-running-translations Bulk-fail RUNNING translations whose startedAt is older than translationStuckMs\n stats-v2 Show V2 stats with all-enum zero-initialized counters\n help [command] display help for command\n",
66
66
  "git": "Usage: chainlesschain git [options] [command]\n\nGit integration for knowledge base versioning\n\nOptions:\n -h, --help display help for command\n\nCommands:\n gitlab-mr [options] <reference> Render a local GitLab MR/worktree footer (no\n network I/O)\n status [options] Show git status of the knowledge base\n directory\n init [options] Initialize a git repository\n auto-commit [options] Auto-commit all changes with a generated\n message\n hooks [options] Install git hooks for the knowledge base\n history-analyze [options] Analyze repository history and statistics\n enums-v2 [options] List Git V2 enums\n config-set-v2 [options] Set Git V2 caps/thresholds\n register-repo-v2 [options] <id> Register Git V2 repo\n activate-repo-v2 <id> Activate Git V2 repo\n archive-repo-v2 <id> Archive Git V2 repo\n decommission-repo-v2 <id> Decommission Git V2 repo\n touch-repo-v2 <id> Touch Git V2 repo\n get-repo-v2 [options] <id> Get Git V2 repo\n list-repos-v2 [options] List Git V2 repos\n create-commit-v2 [options] <id> Create Git V2 commit\n start-commit-v2 <id> Start Git V2 commit\n commit-commit-v2 <id> Commit Git V2 commit\n fail-commit-v2 [options] <id> Fail Git V2 commit\n cancel-commit-v2 [options] <id> Cancel Git V2 commit\n get-commit-v2 <id> Get Git V2 commit\n list-commits-v2 List Git V2 commits\n auto-archive-repos-v2 Auto-archive idle Git V2 repos\n auto-fail-commits-v2 Auto-fail stuck Git V2 commits\n gov-stats-v2 [options] Git V2 governance stats\n help [command] display help for command\n",
67
- "goal": "Usage: chainlesschain goal [options] [command]\n\nCross-session persistent goals / OKRs\n\nOptions:\n -h, --help display help for command\n\nCommands:\n set|add [options] <objective> Create a goal with an objective (and\n optional key results)\n list|ls [options] List goals (newest first)\n show [options] <id> Show a goal in full\n catalog [options] Read a bounded page of standalone goal\n metadata for selection\n panels [options] <id> Read authorized extension panels for a\n standalone CLI goal\n draft-request [options] <id> Export an untrusted description request\n for explicit desktop adoption\n draft-access [options] Export a plugin label for separate native\n pending-draft authorization\n draft-sources [options] <id> Read current source IDs under a v3\n pending-draft connection\n draft-send [options] <id> Save one pending suggestion with a durable\n submission reference\n draft-receipt [options] <id> Reconcile a recorded submission without\n resending it\n kr Manage key results\n progress [options] <id> Record progress: set a percentage and/or\n append a note\n link [options] <id> [sessionId] Attach a session to a goal (defaults to\n the latest session)\n unlink [options] <id> [sessionId] Detach a session from a goal\n pause [options] <id> Mark a goal paused\n resume [options] <id> Mark a goal resumed\n close [options] <id> Mark a goal closed (done)\n abandon [options] <id> Mark a goal abandoned\n rm|delete [options] <id> Delete a goal\n active [options] Show the goal that would bind to a run\n (resolution order)\n help [command] display help for command\n",
67
+ "goal": "Usage: chainlesschain goal [options] [command]\n\nCross-session persistent goals / OKRs\n\nOptions:\n -h, --help display help for command\n\nCommands:\n set|add [options] <objective> Create a goal with an objective (and\n optional key results)\n list|ls [options] List goals (newest first)\n show [options] <id> Show a goal in full\n catalog [options] Read a bounded page of standalone goal\n metadata for selection\n panels [options] <id> Read authorized extension panels for a\n standalone CLI goal\n replay [options] <id> Read one retained event-history page and\n checkpoint acknowledged output\n watch [options] <id> Observe authorized goal changes for a\n bounded time\n draft-request [options] <id> Export an untrusted description request\n for explicit desktop adoption\n draft-access [options] Export a plugin label for separate native\n pending-draft authorization\n draft-sources [options] <id> Read current source IDs under a v3\n pending-draft connection\n draft-send [options] <id> Save one pending suggestion with a durable\n submission reference\n draft-receipt [options] <id> Reconcile a recorded submission without\n resending it\n kr Manage key results\n progress [options] <id> Record progress: set a percentage and/or\n append a note\n link [options] <id> [sessionId] Attach a session to a goal (defaults to\n the latest session)\n unlink [options] <id> [sessionId] Detach a session from a goal\n pause [options] <id> Mark a goal paused\n resume [options] <id> Mark a goal resumed\n close [options] <id> Mark a goal closed (done)\n abandon [options] <id> Mark a goal abandoned\n rm|delete [options] <id> Delete a goal\n active [options] Show the goal that would bind to a run\n (resolution order)\n help [command] display help for command\n",
68
68
  "governance": "Usage: chainlesschain governance [options] [command]\n\nCommunity governance — proposals, voting, impact analysis, prediction\n\nOptions:\n -h, --help display help for command\n\nCommands:\n types [options] List proposal types\n statuses [options] List proposal statuses\n impact-levels [options] List impact levels\n create [options] <title> Create a governance proposal (starts as draft)\n list [options] List proposals\n show [options] <proposal-id> Show proposal details\n activate [options] <proposal-id> Activate a draft proposal for voting\n close [options] <proposal-id> Close voting — auto-resolves to passed/rejected\n expire <proposal-id> Mark a draft/active proposal as expired\n vote [options] <proposal-id> <voter-did> <yes|no|abstain> Cast a vote (replaces any prior vote by same voter)\n votes [options] <proposal-id> List votes for a proposal\n tally [options] <proposal-id> Show vote tally with quorum/threshold check\n analyze [options] <proposal-id> Run heuristic impact analysis on a proposal\n predict [options] <proposal-id> Predict voting outcome (heuristic or vote-based)\n stats [options] Governance statistics\n proposer-maturities-v2 [options] List proposer V2 maturity states\n delegation-lifecycles-v2 [options] List delegation V2 lifecycle states\n default-max-active-proposers-per-realm Default per-realm active proposer cap\n max-active-proposers-per-realm Current per-realm active proposer cap\n set-max-active-proposers-per-realm <n> Set per-realm active proposer cap\n default-max-active-delegations-per-delegator Default per-delegator active delegation cap\n max-active-delegations-per-delegator Current per-delegator active delegation cap\n set-max-active-delegations-per-delegator <n> Set per-delegator active delegation cap\n default-proposer-idle-ms Default proposer idle window (ms)\n proposer-idle-ms Current proposer idle window (ms)\n set-proposer-idle-ms <ms> Set proposer idle window (ms)\n default-pending-delegation-ms Default pending delegation window (ms)\n pending-delegation-ms Current pending delegation window (ms)\n set-pending-delegation-ms <ms> Set pending delegation window (ms)\n active-proposer-count [options] Count active V2 proposers (scope by realm)\n active-delegation-count [options] Count active V2 delegations (scope by delegator)\n register-proposer-v2 [options] <proposer-id> Register a V2 proposer\n proposer-v2 <proposer-id> Get V2 proposer record\n set-proposer-maturity-v2 [options] <proposer-id> <status> Set proposer V2 maturity status\n activate-proposer [options] <proposer-id> Activate V2 proposer\n suspend-proposer [options] <proposer-id> Suspend V2 proposer\n retire-proposer [options] <proposer-id> Retire V2 proposer (terminal)\n touch-proposer-activity <proposer-id> Touch V2 proposer lastActivityAt\n create-delegation-v2 [options] <delegation-id> Create V2 vote delegation\n delegation-v2 <delegation-id> Get V2 delegation record\n set-delegation-status-v2 [options] <delegation-id> <status> Set delegation V2 status\n activate-delegation [options] <delegation-id> Activate V2 delegation\n revoke-delegation [options] <delegation-id> Revoke V2 delegation (terminal)\n expire-delegation [options] <delegation-id> Expire V2 delegation (terminal)\n auto-retire-idle-proposers Auto-retire active/suspended proposers past idle window\n auto-expire-stale-pending-delegations Auto-expire pending delegations past window\n stats-v2 V2 governance statistics\n help [command] display help for command\n",
69
69
  "hardening": "Usage: chainlesschain hardening [options] [command]\n\nSecurity hardening — baselines, audits, regression detection\n\nOptions:\n -h, --help display help for command\n\nCommands:\n baseline Performance baseline management\n audit Security audit management\n config-check [options] <config-path> Audit a config file (presence, required keys, placeholders)\n deploy-check [options] Evaluate the 6-item production-deployment checklist\n audit-statuses-v2 [options] List V2 audit lifecycle statuses\n baseline-statuses-v2 [options] List V2 baseline lifecycle statuses\n severities-v2 [options] List V2 severity buckets\n default-max-concurrent-audits [options] Default concurrent audit cap\n max-concurrent-audits [options] Current concurrent audit cap\n set-max-concurrent-audits [options] <n> Set concurrent audit cap\n default-baseline-retention-ms [options] Default baseline retention in ms\n baseline-retention-ms [options] Current baseline retention in ms\n set-baseline-retention-ms [options] <ms> Set baseline retention in ms\n default-audit-timeout-ms [options] Default audit timeout in ms\n audit-timeout-ms [options] Current audit timeout in ms\n set-audit-timeout-ms [options] <ms> Set audit timeout in ms\n running-audit-count [options] Number of currently RUNNING audits\n register-audit-v2 [options] <name> Register a V2 audit entry (PENDING)\n start-audit [options] <audit-id> Start a PENDING audit (enforces concurrency cap)\n complete-audit [options] <audit-id> Complete a RUNNING audit\n set-audit-status-v2 [options] <audit-id> <status> Transition audit to a new status\n audit-status-v2 [options] <audit-id> Get V2 audit status\n auto-timeout-audits [options] Bulk-fail RUNNING audits past auditTimeoutMs\n create-baseline-v2 [options] <name> Create a V2 baseline (DRAFT)\n activate-baseline [options] <baseline-id> Activate a DRAFT baseline (supersedes previous ACTIVE)\n set-baseline-status-v2 [options] <baseline-id> <status> Transition baseline to a new status\n baseline-status-v2 [options] <baseline-id> Get V2 baseline status\n auto-archive-stale-baselines [options] Bulk-archive SUPERSEDED baselines past retention\n stats-v2 [options] V2 hardening statistics\n help [command] display help for command\n",
70
70
  "hmemory": "Usage: chainlesschain hmemory [options] [command]\n\nHierarchical Memory 2.0 — four-layer memory system\n\nOptions:\n -h, --help display help for command\n\nCommands:\n store [options] <content> Store a memory at the appropriate layer\n recall [options] <query> Recall memories with forgetting curve\n consolidate Promote and forget memories across layers\n search [options] <query> Search memories by type\n stats [options] Show memory statistics\n share [options] <id> <agent-id> Share a memory with another agent\n prune [options] Remove weak old memories\n layers [options] List MEMORY_LAYER enum values\n types [options] List MEMORY_TYPE enum values\n statuses [options] List CONSOLIDATION_STATUS enum values\n permissions [options] List SHARE_PERMISSION enum values\n attach-metadata [options] <id> Attach V2 metadata (scene/context/concepts) to a memory\n promote-v2 [options] <id> Promote memory one layer up (working→short-term→long-term)\n demote-v2 [options] <id> Demote memory one layer down (short-term → working)\n share-v2 [options] <id> <target> Share a memory with permissions (read,copy,modify)\n revoke-share [options] <shareId> Revoke a sharing record\n shares [options] List V2 sharing records\n search-episodic-v2 [options] [query] Search episodic memories with time/scene/context filters\n search-semantic-v2 [options] [query] Search semantic memories with concept similarity\n consolidate-v2 [options] Run V2 consolidation with status tracking\n consolidations [options] List V2 consolidation run history\n prune-v2 [options] Layer-scoped prune with custom threshold\n stats-v2 [options] Extended V2 stats with per-layer + consolidation + shares\n enums-v2 Show V2 enums (tier maturity + promotion lifecycle)\n config-v2 Show V2 config thresholds\n set-max-active-tiers-v2 <n> Set max active tiers per owner\n set-max-pending-promotions-v2 <n> Set max pending promotions per tier\n set-tier-idle-ms-v2 <n> Set tier idle threshold (ms)\n set-promotion-stuck-ms-v2 <n> Set promotion stuck threshold (ms)\n register-tier-v2 [options] <id> <owner> Register V2 memory tier\n activate-tier-v2 <id> Activate tier\n dormant-tier-v2 <id> Mark tier dormant\n retire-tier-v2 <id> Retire tier (terminal)\n touch-tier-v2 <id> Touch tier lastTouchedAt\n get-tier-v2 <id> Get V2 tier\n list-tiers-v2 List all V2 tiers\n create-promotion-v2 [options] <id> <tierId> Create V2 promotion (queued)\n start-promotion-v2 <id> Start promotion (queued→promoting)\n complete-promotion-v2 <id> Complete promotion (promoting→promoted)\n fail-promotion-v2 <id> [reason] Fail promotion\n cancel-promotion-v2 <id> [reason] Cancel promotion\n get-promotion-v2 <id> Get V2 promotion\n list-promotions-v2 List all V2 promotions\n auto-dormant-idle-v2 Auto-dormant idle active tiers\n auto-fail-stuck-v2 Auto-fail stuck promoting promotions\n gov-stats-v2 V2 governance aggregate stats\n help [command] display help for command\n",
@@ -286,6 +286,167 @@ export function registerGoalCommand(program) {
286
286
  }
287
287
  });
288
288
 
289
+ goal
290
+ .command("replay <id>")
291
+ .description(
292
+ "Read one retained event-history page and checkpoint acknowledged output",
293
+ )
294
+ .requiredOption(
295
+ "--connection <file>",
296
+ "Select a separately authorized v5 history connection",
297
+ )
298
+ .requiredOption(
299
+ "--checkpoint <file>",
300
+ "New or existing body-free event checkpoint",
301
+ )
302
+ .requiredOption("--plugin <name>", "Select the admitted event observer")
303
+ .option(
304
+ "--checkpoint-mode <mode>",
305
+ "auto|new|resume; new refuses existing files, resume requires one",
306
+ "auto",
307
+ )
308
+ .requiredOption(
309
+ "--scope <scope>",
310
+ "Select its user, project or local install scope",
311
+ )
312
+ .option(
313
+ "--expected-store <storeId>",
314
+ "Require the selected native goal store",
315
+ )
316
+ .option(
317
+ "--json",
318
+ "Output one bounded page as JSON; exit zero means checkpoint committed",
319
+ )
320
+ .action(async (id, options) => {
321
+ const controller = new AbortController(),
322
+ stop = () => controller.abort();
323
+ process.on("SIGINT", stop);
324
+ process.on("SIGTERM", stop);
325
+ const selection = {
326
+ connection: options.connection,
327
+ checkpoint: options.checkpoint,
328
+ checkpointMode: options.checkpointMode,
329
+ plugin: options.plugin,
330
+ scope: options.scope,
331
+ expectedStore: options.expectedStore,
332
+ signal: controller.signal,
333
+ };
334
+ const json = options.json;
335
+ try {
336
+ const { replayCliGoalEvents } = await import(
337
+ "../lib/plugin-runtime/cli-goal-event-history.js"
338
+ );
339
+ await replayCliGoalEvents(id, selection, async (page) => {
340
+ const output = json
341
+ ? JSON.stringify(page) + "\n"
342
+ : stripVTControlCharacters(
343
+ [
344
+ `Retained history for ${page.goalRef.id}; at-least-once delivery.`,
345
+ ...(page.truncated
346
+ ? ["Earlier history is outside the retention window."]
347
+ : []),
348
+ ...page.entries.map(
349
+ (entry) =>
350
+ `${entry.sequence} ${entry.recordedAt} ${entry.event.summary}`,
351
+ ),
352
+ page.hasMore
353
+ ? "More retained events remain; run the same command with the same checkpoint."
354
+ : "Reached this page's recorded watermark; this does not prove goal completion.",
355
+ ].join("\n") + "\n",
356
+ );
357
+ await new Promise((resolve, reject) => {
358
+ const abort = () => reject(new Error("GOAL_EVENT_REPLAY_ABORTED"));
359
+ controller.signal.addEventListener("abort", abort, { once: true });
360
+ if (controller.signal.aborted) {
361
+ controller.signal.removeEventListener("abort", abort);
362
+ abort();
363
+ return;
364
+ }
365
+ process.stdout.write(output, (error) => {
366
+ controller.signal.removeEventListener("abort", abort);
367
+ if (error) reject(error);
368
+ else resolve();
369
+ });
370
+ });
371
+ return true;
372
+ });
373
+ } catch (error) {
374
+ fail("replay", error);
375
+ } finally {
376
+ controller.abort();
377
+ process.removeListener("SIGINT", stop);
378
+ process.removeListener("SIGTERM", stop);
379
+ }
380
+ });
381
+
382
+ goal
383
+ .command("watch <id>")
384
+ .description("Observe authorized goal changes for a bounded time")
385
+ .requiredOption("--plugin <name>", "Select one installed event observer")
386
+ .option(
387
+ "--connection <file>",
388
+ "Use a separately authorized desktop event connection",
389
+ )
390
+ .option(
391
+ "--scope <scope>",
392
+ "Select its user, project or local install scope",
393
+ )
394
+ .option(
395
+ "--expected-store <storeId>",
396
+ "Require the store selected from goal catalog",
397
+ )
398
+ .option(
399
+ "--interval <ms>",
400
+ "Polling interval (250–60000 milliseconds)",
401
+ "1000",
402
+ )
403
+ .option("--duration <seconds>", "Stop after 1–900 seconds", "60")
404
+ .option(
405
+ "--json",
406
+ "Output ready and event records as newline-delimited JSON",
407
+ )
408
+ .action(async (id, options) => {
409
+ const controller = new AbortController();
410
+ const stop = () => controller.abort();
411
+ process.on("SIGINT", stop);
412
+ process.on("SIGTERM", stop);
413
+ try {
414
+ const selection = {
415
+ plugin: options.plugin,
416
+ scope: options.scope,
417
+ expectedStore: options.expectedStore,
418
+ connection: options.connection,
419
+ intervalMs: Number(options.interval),
420
+ durationMs: Number(options.duration) * 1000,
421
+ signal: controller.signal,
422
+ };
423
+ const json = options.json;
424
+ const watch =
425
+ selection.connection !== undefined
426
+ ? (await import("../lib/plugin-runtime/cli-project-goal-events.js"))
427
+ .watchCliProjectGoalEvents
428
+ : (await import("../lib/plugin-runtime/cli-goal-events.js"))
429
+ .watchCliGoalExtensionEvents;
430
+ for await (const record of watch(id, selection)) {
431
+ if (json) console.log(JSON.stringify(record));
432
+ else
433
+ logger.log(
434
+ stripVTControlCharacters(
435
+ record.kind === "ready"
436
+ ? `Observing ${record.goalRef.id}; polling, no history replay. Ctrl+C to stop.`
437
+ : `${record.observedAt} ${record.event.summary}`,
438
+ ),
439
+ );
440
+ }
441
+ } catch (err) {
442
+ fail("watch", err);
443
+ } finally {
444
+ controller.abort();
445
+ process.removeListener("SIGINT", stop);
446
+ process.removeListener("SIGTERM", stop);
447
+ }
448
+ });
449
+
289
450
  goal
290
451
  .command("draft-request <id>")
291
452
  .description(
@@ -1,6 +1,19 @@
1
1
  {
2
2
  "source": "CHANGELOG.md",
3
3
  "releases": [
4
+ {
5
+ "productVersion": null,
6
+ "cliVersion": "0.166.142",
7
+ "cliVersions": ["0.166.142"],
8
+ "date": "2026-11-05",
9
+ "title": "",
10
+ "sections": [
11
+ {
12
+ "heading": "Added - cc CLI 0.166.142: authorized goal events and retained recovery (candidate, 2026-11-05)",
13
+ "body": "- Add standalone status and separately authorized native risk/action observation, plus a transactional retained event journal in Session Core 0.3.25.\n- Add one-page CLI replay with durable new/resume checkpoints, at-least-once delivery, and explicit VS Code / JetBrains recovery controls.\n- Compose the data-only project-delivery-assistant 0.2.0 scenario with full declaration consent and per-operation capability limits; native confirmation remains separate from pending drafts.\n- Pair Open VSX 0.37.178 and JetBrains 0.4.195 only after the exact-source CLI matrices, OIDC publication and public package verification. Real GUI and business-effect acceptance remain separate."
14
+ }
15
+ ]
16
+ },
4
17
  {
5
18
  "productVersion": null,
6
19
  "cliVersion": "0.166.141",
@@ -0,0 +1,28 @@
1
+ /** Implemented CLI surfaces; source leases and per-call activation still gate use. */
2
+ import { VERSION } from "../../constants.js";
3
+
4
+ export const CLI_GOAL_CAPABILITIES = Object.freeze([
5
+ "event:goal.status.changed",
6
+ "event:risk.review.completed",
7
+ "event:action.receipt.updated",
8
+ "panel:goal.summary",
9
+ "panel:goal.evidence",
10
+ "proposal:task.description.update",
11
+ ]);
12
+
13
+ export function cliGoalExtensionHost(activeCapabilities) {
14
+ if (
15
+ !Array.isArray(activeCapabilities) ||
16
+ activeCapabilities.some(
17
+ (value) => !CLI_GOAL_CAPABILITIES.includes(value),
18
+ ) ||
19
+ new Set(activeCapabilities).size !== activeCapabilities.length
20
+ )
21
+ throw new Error("CLI_GOAL_HOST_CAPABILITIES_INVALID");
22
+ return Object.freeze({
23
+ id: "cli",
24
+ version: VERSION,
25
+ capabilities: CLI_GOAL_CAPABILITIES,
26
+ activeCapabilities: Object.freeze([...activeCapabilities]),
27
+ });
28
+ }
@@ -1,15 +1,11 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
- import { VERSION } from "../../constants.js";
3
+ import { cliGoalExtensionHost } from "./cli-goal-capabilities.js";
4
4
  import { createProjectGoalConnection } from "../project-goal-connection.js";
5
5
  import { collectGoalExtensions } from "./goal-extensions.js";
6
6
  import { createGoalDraftRequest } from "@chainlesschain/session-core/goal-draft-request-contract";
7
7
  import { digestBusinessObjectContent as digest } from "@chainlesschain/session-core/business-object-contract";
8
- const HOST = Object.freeze({
9
- id: "cli",
10
- version: VERSION,
11
- capabilities: Object.freeze(["proposal:task.description.update"]),
12
- });
8
+ const HOST = cliGoalExtensionHost(["proposal:task.description.update"]);
13
9
  function fail(code) {
14
10
  throw new Error(code);
15
11
  }
@@ -1,6 +1,6 @@
1
1
  import fs from "node:fs";
2
2
  import path from "node:path";
3
- import { VERSION } from "../../constants.js";
3
+ import { cliGoalExtensionHost } from "./cli-goal-capabilities.js";
4
4
  import { managedSettingsPath } from "../settings-loader.cjs";
5
5
  import { createProjectGoalConnection } from "../project-goal-connection.js";
6
6
  import {
@@ -20,11 +20,7 @@ import {
20
20
  validateGoalDraftSubmissionReference,
21
21
  } from "@chainlesschain/session-core/goal-draft-connection-contract";
22
22
 
23
- const HOST = Object.freeze({
24
- id: "cli",
25
- version: VERSION,
26
- capabilities: Object.freeze(["proposal:task.description.update"]),
27
- });
23
+ const HOST = cliGoalExtensionHost(["proposal:task.description.update"]);
28
24
  export const CLI_GOAL_DRAFT_SUBMISSION_SCHEMA =
29
25
  "chainlesschain.goal-draft-submission/v1";
30
26
  export const CLI_GOAL_DRAFT_SOURCES_SCHEMA =