chainlesschain 0.162.193 → 0.162.198
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 +29 -6
- package/completions/_cc +2 -2
- package/completions/cc.bash +2 -2
- package/completions/cc.fish +2 -2
- package/completions/cc.ps1 +2 -2
- package/package.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-DBLkaTje.js → AIOps-CSN-D2xb.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BAy-Qebo.js → ActionButton-CBSMlGzv.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-Dfb1Mlau.js → Analytics-3yr3Nt2t.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-BbFkN8m0.js → AppLayout-1b-o3lMH.js} +4 -4
- package/src/assets/web-panel/assets/{Artifacts-kM4-cEEH.js → Artifacts-Dr8rJi17.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-BSQfYWf3.js → Audit-2V689HC2.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-CWDbI_fG.js → BackgroundAgents-DIxkNrD_.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-BxLPbq_Q.js → Backup-Pg6BcwrE.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DuIbdrp6.js → BaseInput-CLUpqyfH.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-NEmjGahU.js → Chat-qVS8rD4G.js} +5 -5
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-DfJEo-5_.js → ChatBubbleRenderer-ti49X12Q.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-CaoeG3Ns.js → Checkbox-Bs9AaEay.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-BFf_g3xY.js → Codegen-Dvc1mq8q.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CNOd8mdQ.js → Col-C4_biO7A.js} +1 -1
- package/src/assets/web-panel/assets/{Community-BhpDqz-i.js → Community-al25XQUV.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-CQ42T7Z6.js → Compact-D-ZDB8M1.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-DI5PcLMN.js → Compliance-6lIfDz1W.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-wYYZe0wR.js → Cowork-DdI48XMJ.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-Dlq03DD_.js → Cron-DF5HZd2g.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BzqS8PP3.js → Crosschain-DuxeSvt3.js} +1 -1
- package/src/assets/web-panel/assets/{DID-It55Yem7.js → DID-B9yHkUTd.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-9HkH6oxn.js → Dashboard-Z5EuI3IM.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-00e2YWRB.js → Dropdown-vuRfO3dY.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-By-ugRDL.js → EmailListRenderer-QFLCc1uL.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-C396yu5m.js → FamilyGuardDashboard-BZ7EXkFJ.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-BME5sbZY.js → Federation-DycIEg2s.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-B4TEZCr-.js → FormItemContext-Ba0H_7yG.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-_9CX9ieY.js → GenericCardRenderer--JgSTK-C.js} +1 -1
- package/src/assets/web-panel/assets/{Git-BrS6WVSr.js → Git-DEvTbldE.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BMdCWnKF.js → Governance-BJIljy18.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-Bcp3vzcA.js → Inference-CVyW3G3q.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DlLuqGY5.js → KnowledgeGraph-v8-borge.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-D-W_6x09.js → Logs-BCdS7gGo.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-DElGPxCZ.js → MarkdownRenderer-CU-JB2Ns.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-Dzn2guvI.js → Marketplace-AN6tGA2B.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-uPict-KL.js → McpTools-DGViXASN.js} +6 -6
- package/src/assets/web-panel/assets/{Memory-BCw43kOb.js → Memory-Bpvmx9X4.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-DmV8Wv7F.js → MobileBridge-CTP-DOTC.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-C-HaCmSM.js → MobileProjects-C8qfktxn.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-C6jxJ34Y.js → Mtc-ndYr0M1s.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-Za8ExwhQ.js → MtcAudit-Ci0-YK7W.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-KKDbuEgb.js → Multisig-BehSTFW7.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-Dj97zbCk.js → NLProgramming-B91_YBLv.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DBXvMraU.js → Notes-BQlJ0-gq.js} +4 -4
- package/src/assets/web-panel/assets/{NotificationSettings-DOxITLYl.js → NotificationSettings-CDgYMjYK.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-7DVjZwMM.js → OrderTableRenderer-BJkSlKeH.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-D1i73mjb.js → Organization-B-b3cWCp.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-kW6Q3rvg.js → Overflow-CILUL4nL.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-C-v_8p2v.js → P2P-BTCFBkF0.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-tUbbY64W.js → PdhVaultBrowser-BAR6AUx5.js} +5 -5
- package/src/assets/web-panel/assets/{Permissions-DkHxEZ58.js → Permissions-RRf6HbWJ.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DWuMPGrK.js → PersonalDataHub-BGTMiICa.js} +4 -4
- package/src/assets/web-panel/assets/{Pipeline-30IYXWWm.js → Pipeline-945qY9YF.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DZNQ4RrH.js → Privacy-DPZwI6lJ.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-De2MCElf.js → ProjectInit-BPH2NRKc.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-5uHk9wsC.js → ProjectSettings-BZCRNCvb.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-XjDfrFLb.js → Projects-BTI__tBt.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-Bgwj6gcE.js → Providers-DDCf_nIw.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-gKql9umv.js → QrScannerModal-N6rbqt1r.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BWvmwkh7.js → QuickAsk-DrwjPS7M.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-Uok4hZPd.js → Recommend-Cog9Wd99.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-DLJzTk9a.js → RemoteSession-DC9pynjM.js} +3 -3
- package/src/assets/web-panel/assets/{Reputation-ZVwIPMSO.js → Reputation-D4th4gKS.js} +1 -1
- package/src/assets/web-panel/assets/{Row-CN04HxWR.js → Row-ogiWR6v9.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-BdSrEG4g.js → RssFeed-uYlk-2Oj.js} +3 -3
- package/src/assets/web-panel/assets/{Search-5PwVd0IR.js → Search-DYzzwvtM.js} +1 -1
- package/src/assets/web-panel/assets/{Security-DdBo4zjN.js → Security-Da7YOyX6.js} +4 -4
- package/src/assets/web-panel/assets/{Services-D3letU7M.js → Services-CLI1VM1X.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton--Jb83f1v.js → Skeleton-DK77dzDC.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-Bg-CulHX.js → Skills-C_z7Lmhl.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-7QOa7S-X.js → Sla-D6413Q8L.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-DQwppjRw.js → SpeechSettings-C07ydbj2.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-dNPQGL-s.js → SyncSettings-DGOm2W22.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-Ggs-Z48q.js → Tasks-Cr_PVyLM.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-78TYHgRO.js → Templates-BhL2mZ0t.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-xHwwv9vO.js → Tenant-CPk5oyUr.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-BJXSJfm4.js → Terminal-ClhqUsqV.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-fLbjRhJw.js → TimelineRenderer-BCC7MV5a.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-oMSBSBmB.js → Tokens-DD1Jt4oO.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-CfnY_wX_.js → Trigger-BCydFvN2.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-AdyTgYKO.js → Trust-DDHT1noa.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-C5K_81dS.js → UkeySign-CWPZC7oI.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-vcGVDqki.js → VideoEditing-9Ea0nJR0.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-hhOc3hlY.js → Wallet-BjxhLxTf.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-CVloC11s.js → WebAuthn-C6uCye67.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-CYeE32R5.js → WorkflowEditor-d2g4reYo.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CNROR5bN.js → chat-frTc6ScX.js} +1 -1
- package/src/assets/web-panel/assets/{colors-Cjx-cnwU.js → colors-B5K6lG3v.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DOIfelvD.js → compact-item-Cdn46r8D.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-DfA7UZ8u.js → createContext-DU1jqVQi.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-CP-jEUyw.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-BMSCzcfM.js → hasIn-DdNH-aW_.js} +1 -1
- package/src/assets/web-panel/assets/{index-CAnvhwg6.js → index-32ajXmTb.js} +1 -1
- package/src/assets/web-panel/assets/{index-BEMwBBHk.js → index-7ehytj1K.js} +1 -1
- package/src/assets/web-panel/assets/{index-CVL27kXC.js → index-BC4eGkar.js} +1 -1
- package/src/assets/web-panel/assets/{index-FBc_CJBd.js → index-BVLL-mq_.js} +1 -1
- package/src/assets/web-panel/assets/{index-dCd8cSUq.js → index-BXKhhx9V.js} +1 -1
- package/src/assets/web-panel/assets/{index-BemJ2u_E.js → index-BcGwGIaR.js} +1 -1
- package/src/assets/web-panel/assets/{index-CVm1_i3t.js → index-Be4OtL-N.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cs6l7uRu.js → index-BoFak7le.js} +1 -1
- package/src/assets/web-panel/assets/{index-DPAWBrMf.js → index-BwlIxAmX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DLmn0BoK.js → index-CGiwfwB9.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7gf77CJ.js → index-CHmkkdfT.js} +1 -1
- package/src/assets/web-panel/assets/{index-m2vG9gG_.js → index-CQorP1Ng.js} +1 -1
- package/src/assets/web-panel/assets/{index-ClNMrqEY.js → index-CUoNAmE8.js} +1 -1
- package/src/assets/web-panel/assets/{index-DHtpHZAQ.js → index-Cj6P9Nst.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2K9SNVX.js → index-CtRPi4YC.js} +1 -1
- package/src/assets/web-panel/assets/index-CzrCHrFy.js +1 -0
- package/src/assets/web-panel/assets/{index-BolaOQxx.js → index-D1qIC4GR.js} +1 -1
- package/src/assets/web-panel/assets/{index-BM1y_9hM.js → index-D23xGYjM.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cyweh0Hy.js → index-D4l82Me1.js} +1 -1
- package/src/assets/web-panel/assets/{index-By61ojUx.js → index-D4miNkWv.js} +1 -1
- package/src/assets/web-panel/assets/{index-BbQ2eQ8H.js → index-DIVyTmZ3.js} +1 -1
- package/src/assets/web-panel/assets/{index-Icdoqmzt.js → index-DM5FmPZU.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjEsxO5h.js → index-DRzBBdQ0.js} +1 -1
- package/src/assets/web-panel/assets/{index-B4iYzpkL.js → index-Dca_i7H8.js} +1 -1
- package/src/assets/web-panel/assets/{index-C3L5gdiD.js → index-DftZuyA7.js} +1 -1
- package/src/assets/web-panel/assets/{index-CdYBye8B.js → index-DtBCCkC4.js} +1 -1
- package/src/assets/web-panel/assets/{index-AWg-0M1S.js → index-HjCvXHf5.js} +1 -1
- package/src/assets/web-panel/assets/{index-CEKMcOyU.js → index-LaivuXyF.js} +1 -1
- package/src/assets/web-panel/assets/{index-BxOk9vkG.js → index-MM4Zz2OE.js} +1 -1
- package/src/assets/web-panel/assets/{index-CNC5onm4.js → index-NmEXVjzt.js} +1 -1
- package/src/assets/web-panel/assets/index-OJsGskZw.js +1 -0
- package/src/assets/web-panel/assets/{index-BUonmKSE.js → index-PjAS0sIZ.js} +1 -1
- package/src/assets/web-panel/assets/{index-B5Udeb_6.js → index-VDM2KKo9.js} +1 -1
- package/src/assets/web-panel/assets/{index-5-HXgOX5.js → index-cYaWV4Mq.js} +1 -1
- package/src/assets/web-panel/assets/{index-DBpWXFed.js → index-gg3QPC3i.js} +3 -3
- package/src/assets/web-panel/assets/{index-C7xn0Nub.js → index-kVO_MDm-.js} +1 -1
- package/src/assets/web-panel/assets/{index-ti_lnTWl.js → index-mgU3Q-lN.js} +1 -1
- package/src/assets/web-panel/assets/{index-CshQbilz.js → index-t_OBzIP4.js} +1 -1
- package/src/assets/web-panel/assets/{index-mTpHoEzr.js → index-yZRuZpwK.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-Bu8k7H1Y.js → initDefaultProps-DwLTRNdo.js} +1 -1
- package/src/assets/web-panel/assets/{motion-s3iVK41k.js → motion-BchZDXnh.js} +1 -1
- package/src/assets/web-panel/assets/{move-B6B-E5Jz.js → move-e8M-zZFl.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-BiYgTidA.js → mtc-parser-Ci40fQb3.js} +1 -1
- package/src/assets/web-panel/assets/{omit-pU1RdUDA.js → omit-C7110_f2.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-Cdoq_SeM.js → pickAttrs-skteMgnM.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-DIuvAn2K.js → placementArrow-MGZ-lh2B.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-8w16YR2D.js → responsiveObserve-N4Sd7uy-.js} +1 -1
- package/src/assets/web-panel/assets/{slide-VZ01cZe3.js → slide-C7HDGRaa.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-lh8YMN8Z.js → statusUtils-BhRexlgy.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-CmDyreec.js → styleChecker-ChEoQkN2.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-hiJWMU5y.js → useFlexGapSupport-CDbG1s2Y.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-Thnu-Iaj.js → useFs-CUIx0tcJ.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-LBdOxjwY.js → usePersonalDataHub-bkO7L7ec.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-Cg6lFY_X.js → vnode-B_ZvABIG.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-DVfsR1YO.js → zoom-D5shjpS8.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +4 -4
- package/src/command-manifest.json +214 -50
- package/src/command-surface-policy.js +115 -0
- package/src/commands/agent.js +3 -3
- package/src/commands/background-session.js +145 -0
- package/src/commands/mcp.js +125 -7
- package/src/commands/serve.js +1 -1
- package/src/commands/session-show.js +131 -0
- package/src/commands/session.js +50 -106
- package/src/commands/skill.js +87 -50
- package/src/data/changelog.json +18 -5
- package/src/gateways/ws/ws-agent-handler.js +8 -1
- package/src/harness/jsonl-session-store.js +428 -25
- package/src/harness/mcp-client.js +2652 -404
- package/src/harness/session-list-index.js +65 -7
- package/src/lazy-dispatch.js +76 -8
- package/src/lib/abort-utils.js +68 -0
- package/src/lib/agent-core.js +1 -59
- package/src/lib/chat-core.js +24 -6
- package/src/lib/cowork-mcp-tools.js +47 -2
- package/src/lib/cowork-task-runner.js +11 -3
- package/src/lib/doctor-checkup.js +9 -7
- package/src/lib/learning/skill-improver.js +21 -2
- package/src/lib/mcp-call-ledger-store.js +116 -3
- package/src/lib/mcp-call-ledger.js +59 -14
- package/src/lib/mcp-client.js +1 -0
- package/src/lib/mcp-stdio-executable-identity.js +598 -0
- package/src/lib/mcp-stdio-execution-authority.js +363 -0
- package/src/lib/mcp-tool-metadata.js +436 -0
- package/src/lib/mcp-tool-result.js +367 -0
- package/src/lib/observability/index.js +71 -0
- package/src/lib/pr-link-ledger.js +8 -27
- package/src/lib/pr-link-store.js +26 -0
- package/src/lib/process-execution-broker/index.js +14 -0
- package/src/lib/process-tree-termination.js +253 -0
- package/src/lib/public-ide-capability-manifest.js +6 -0
- package/src/lib/session-host-snapshot.js +9 -5
- package/src/lib/session-projection.js +5 -1
- package/src/lib/session-tail.js +31 -1
- package/src/lib/skill-budget.js +222 -0
- package/src/lib/skill-execution-authority.js +381 -0
- package/src/lib/skill-execution-identity.js +39 -2
- package/src/lib/skill-loader.js +322 -86
- package/src/lib/skill-mcp.js +43 -1
- package/src/repl/agent-repl.js +349 -46
- package/src/repl/bg-dashboard.js +81 -28
- package/src/repl/chat-repl.js +77 -12
- package/src/repl/prompt-interactions.js +67 -7
- package/src/repl/slash-command-registry.js +3 -4
- package/src/runtime/agent-core.js +340 -108
- package/src/runtime/agent-runtime.js +26 -3
- package/src/runtime/headless-runner.js +150 -23
- package/src/runtime/headless-stream.js +309 -59
- package/src/runtime/mcp-config.js +157 -10
- package/src/runtime/mcp-tool-search.js +0 -0
- package/src/runtime/output-backpressure.js +366 -0
- package/src/runtime/pipe-safety.js +56 -21
- package/src/assets/web-panel/assets/devWarning-ChcCBGs7.js +0 -1
- package/src/assets/web-panel/assets/index-Q2IajL54.js +0 -1
- package/src/assets/web-panel/assets/index-bRkHgOMc.js +0 -1
- package/src/lib/skill-process-broker.js +0 -85
package/src/commands/skill.js
CHANGED
|
@@ -46,6 +46,7 @@ import {
|
|
|
46
46
|
autoFailStuckExecutionsV2,
|
|
47
47
|
getSkillLoaderStatsV2,
|
|
48
48
|
} from "../lib/skill-loader.js";
|
|
49
|
+
import { raceWithAbort, throwIfAborted } from "../lib/abort-utils.js";
|
|
49
50
|
import { getElectronUserDataDir } from "../lib/paths.js";
|
|
50
51
|
import { findProjectRoot } from "../lib/project-detector.js";
|
|
51
52
|
import { loadConfig } from "../lib/config-manager.js";
|
|
@@ -130,6 +131,10 @@ export function createControlledSkillScaffold(name, targetDir, io = fs) {
|
|
|
130
131
|
|
|
131
132
|
export function createCliSkillReauthorizer(options = {}) {
|
|
132
133
|
return async (request) => {
|
|
134
|
+
throwIfAborted(
|
|
135
|
+
request?.signal,
|
|
136
|
+
"Skill authorization prompt was interrupted",
|
|
137
|
+
);
|
|
133
138
|
if (options.assumeYes === true) return { authorized: true };
|
|
134
139
|
const stdin = options.stdin || process.stdin;
|
|
135
140
|
const stdout = options.stdout || process.stdout;
|
|
@@ -140,12 +145,19 @@ export function createCliSkillReauthorizer(options = {}) {
|
|
|
140
145
|
const skillId = request?.skill?.id || "unknown";
|
|
141
146
|
const source = request?.skill?.source || "unknown";
|
|
142
147
|
const digest = String(request?.currentDigest || "").slice(0, 24);
|
|
143
|
-
const authorized = await
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
148
|
+
const authorized = await raceWithAbort(
|
|
149
|
+
confirm(
|
|
150
|
+
{
|
|
151
|
+
message:
|
|
152
|
+
`Authorize isolated skill "${skillId}" from ${source} ` +
|
|
153
|
+
`for this process (${digest || "digest unavailable"})?`,
|
|
154
|
+
default: false,
|
|
155
|
+
},
|
|
156
|
+
request?.signal ? { signal: request.signal } : undefined,
|
|
157
|
+
),
|
|
158
|
+
request?.signal,
|
|
159
|
+
"Skill authorization prompt was interrupted",
|
|
160
|
+
);
|
|
149
161
|
return { authorized: authorized === true };
|
|
150
162
|
};
|
|
151
163
|
}
|
|
@@ -179,7 +191,9 @@ export async function runControlledSkill(options = {}) {
|
|
|
179
191
|
loader,
|
|
180
192
|
executeTool = null,
|
|
181
193
|
llmOptions = null,
|
|
194
|
+
signal = null,
|
|
182
195
|
} = options;
|
|
196
|
+
throwIfAborted(signal, "Skill command interrupted before discovery");
|
|
183
197
|
if (
|
|
184
198
|
!loader ||
|
|
185
199
|
(typeof loader.getResolvedSkills !== "function" &&
|
|
@@ -197,52 +211,75 @@ export async function runControlledSkill(options = {}) {
|
|
|
197
211
|
if (!skill) {
|
|
198
212
|
return { error: `Skill not found: ${name}`, code: "CC_SKILL_NOT_FOUND" };
|
|
199
213
|
}
|
|
200
|
-
const
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
skill = loader.materializeSkill(skill, executionContext);
|
|
208
|
-
}
|
|
209
|
-
if (skill.isolation !== true) {
|
|
210
|
-
return {
|
|
211
|
-
error:
|
|
212
|
-
`Skill "${skill.id}" is not configured for controlled execution. ` +
|
|
213
|
-
"Add isolation: true before running it.",
|
|
214
|
-
code: "CC_SKILL_DIRECT_HANDLER_BLOCKED",
|
|
215
|
-
};
|
|
216
|
-
}
|
|
217
|
-
if (!canRunOnPlatform(skill)) {
|
|
218
|
-
return {
|
|
219
|
-
error: `Skill "${skill.id}" is not supported on ${process.platform}`,
|
|
220
|
-
code: "CC_SKILL_PLATFORM_UNSUPPORTED",
|
|
221
|
-
};
|
|
222
|
-
}
|
|
223
|
-
const dispatch =
|
|
224
|
-
executeTool || (await import("../runtime/agent-core.js")).executeTool;
|
|
225
|
-
const result = await dispatch(
|
|
226
|
-
"run_skill",
|
|
227
|
-
{ skill_name: skill.id, input: String(input) },
|
|
228
|
-
{
|
|
229
|
-
cwd,
|
|
230
|
-
skillLoader: loader,
|
|
231
|
-
...(llmOptions ? { llmOptions: { ...llmOptions } } : {}),
|
|
232
|
-
},
|
|
233
|
-
);
|
|
234
|
-
const nestedFailure = /^\s*Sub-agent failed:/i.test(
|
|
235
|
-
String(result?.summary || ""),
|
|
236
|
-
);
|
|
237
|
-
if (result?.error || nestedFailure) {
|
|
238
|
-
return {
|
|
239
|
-
...result,
|
|
240
|
-
success: false,
|
|
241
|
-
code: result?.code || "CC_SKILL_CONTROLLED_RUN_FAILED",
|
|
242
|
-
error: result?.error || result.summary,
|
|
214
|
+
const executionLease = loader.acquireSkillExecution?.(skill, { signal });
|
|
215
|
+
const executionSignal = executionLease?.signal || signal;
|
|
216
|
+
try {
|
|
217
|
+
const executionContext = {
|
|
218
|
+
loadedBecause: "run_skill",
|
|
219
|
+
bodyIncluded: false,
|
|
220
|
+
signal: executionSignal,
|
|
243
221
|
};
|
|
222
|
+
if (typeof loader.materializeSkillForExecution === "function") {
|
|
223
|
+
skill = await raceWithAbort(
|
|
224
|
+
loader.materializeSkillForExecution(skill, executionContext),
|
|
225
|
+
executionSignal,
|
|
226
|
+
"Skill command interrupted during authorization",
|
|
227
|
+
);
|
|
228
|
+
} else if (typeof loader.materializeSkill === "function") {
|
|
229
|
+
skill = loader.materializeSkill(skill, executionContext);
|
|
230
|
+
}
|
|
231
|
+
executionLease?.assertActive?.();
|
|
232
|
+
if (skill.isolation !== true) {
|
|
233
|
+
return {
|
|
234
|
+
error:
|
|
235
|
+
`Skill "${skill.id}" is not configured for controlled execution. ` +
|
|
236
|
+
"Add isolation: true before running it.",
|
|
237
|
+
code: "CC_SKILL_DIRECT_HANDLER_BLOCKED",
|
|
238
|
+
};
|
|
239
|
+
}
|
|
240
|
+
if (!canRunOnPlatform(skill)) {
|
|
241
|
+
return {
|
|
242
|
+
error: `Skill "${skill.id}" is not supported on ${process.platform}`,
|
|
243
|
+
code: "CC_SKILL_PLATFORM_UNSUPPORTED",
|
|
244
|
+
};
|
|
245
|
+
}
|
|
246
|
+
const dispatch =
|
|
247
|
+
executeTool || (await import("../runtime/agent-core.js")).executeTool;
|
|
248
|
+
executionLease?.assertActive?.();
|
|
249
|
+
throwIfAborted(
|
|
250
|
+
executionSignal,
|
|
251
|
+
"Skill command interrupted before execution",
|
|
252
|
+
);
|
|
253
|
+
const result = await raceWithAbort(
|
|
254
|
+
dispatch(
|
|
255
|
+
"run_skill",
|
|
256
|
+
{ skill_name: skill.id, input: String(input) },
|
|
257
|
+
{
|
|
258
|
+
cwd,
|
|
259
|
+
skillLoader: loader,
|
|
260
|
+
...(executionSignal ? { signal: executionSignal } : {}),
|
|
261
|
+
...(llmOptions ? { llmOptions: { ...llmOptions } } : {}),
|
|
262
|
+
},
|
|
263
|
+
),
|
|
264
|
+
executionSignal,
|
|
265
|
+
"Skill command interrupted during execution",
|
|
266
|
+
);
|
|
267
|
+
executionLease?.assertActive?.();
|
|
268
|
+
const nestedFailure = /^\s*Sub-agent failed:/i.test(
|
|
269
|
+
String(result?.summary || ""),
|
|
270
|
+
);
|
|
271
|
+
if (result?.error || nestedFailure) {
|
|
272
|
+
return {
|
|
273
|
+
...result,
|
|
274
|
+
success: false,
|
|
275
|
+
code: result?.code || "CC_SKILL_CONTROLLED_RUN_FAILED",
|
|
276
|
+
error: result?.error || result.summary,
|
|
277
|
+
};
|
|
278
|
+
}
|
|
279
|
+
return result;
|
|
280
|
+
} finally {
|
|
281
|
+
executionLease?.release?.();
|
|
244
282
|
}
|
|
245
|
-
return result;
|
|
246
283
|
}
|
|
247
284
|
|
|
248
285
|
export function registerSkillCommand(program) {
|
package/src/data/changelog.json
CHANGED
|
@@ -3,14 +3,27 @@
|
|
|
3
3
|
"releases": [
|
|
4
4
|
{
|
|
5
5
|
"productVersion": null,
|
|
6
|
-
"cliVersion": "0.162.
|
|
7
|
-
"cliVersions": ["0.162.
|
|
8
|
-
"date": "2026-08-
|
|
6
|
+
"cliVersion": "0.162.198",
|
|
7
|
+
"cliVersions": ["0.162.197", "0.162.198"],
|
|
8
|
+
"date": "2026-08-06",
|
|
9
9
|
"title": "",
|
|
10
10
|
"sections": [
|
|
11
11
|
{
|
|
12
|
-
"heading": "
|
|
13
|
-
"body": "> `chainlesschain` **0.162.
|
|
12
|
+
"heading": "Fixed — cc CLI 0.162.198: interactive streaming and release portability",
|
|
13
|
+
"body": "> `chainlesschain` **0.162.197 → 0.162.198** (release candidate, 2026-08-06).\n> CLI-only release metadata; `@chainlesschain/personal-data-hub` remains\n> **0.4.57** and `@chainlesschain/agent-sdk` remains **0.1.7**.\n\n- **Interactive output backpressure**: REPL, headless streaming, provider\n pacing, and TTY writers now wait for saturated output streams to drain and\n clean up pending listeners across completion, interruption, and session\n transitions instead of allowing unbounded interactive writes.\n- **Canonical session controls**: the CLI-owned session projection and bounded\n reply routes now support the completed VS Code and JetBrains workbench and\n rewind journeys while preserving CLI authority over persisted mutations.\n- **Portable release gates**: Windows path-alias fixtures, state-path mocks,\n Skill metadata fixtures, POSIX executable-bit setup, and the deprecated\n agent-core shim are aligned with the three-platform CLI CI and Strict\n Sandbox contracts.\n- **Release readback hardening**: public npm verification remains independent\n of undeclared runtime dependencies, retries bounded registry propagation,\n and binds provenance and registry bytes to the immutable publish artifact.\n- **Candidate evidence**: merged implementation SHA `0b7a5471e7a9` passed\n [CLI CI](https://github.com/chainlesschain/chainlesschain/actions/runs/31071519048)\n and [CLI Strict Sandbox](https://github.com/chainlesschain/chainlesschain/actions/runs/31071522429)\n on Ubuntu, Windows, and macOS. The final `0.162.198` version commit must pass\n both gates again on its own exact SHA before tag `v-npm-0-162-198` is\n created; local, older-SHA, and partial results remain supplementary only."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"productVersion": null,
|
|
19
|
+
"cliVersion": "0.162.197",
|
|
20
|
+
"cliVersions": ["0.162.189", "0.162.197"],
|
|
21
|
+
"date": "2026-08-05",
|
|
22
|
+
"title": "",
|
|
23
|
+
"sections": [
|
|
24
|
+
{
|
|
25
|
+
"heading": "Added — cc CLI 0.162.197: durable sessions, MCP recovery, and checkpoint safety",
|
|
26
|
+
"body": "> `chainlesschain` **0.162.189 → 0.162.197** (published,\n> 2026-08-05; `0.162.190`, `0.162.191`, and `0.162.192` were never published;\n> `0.162.193` was published outside the authoritative CLI release workflow;\n> `0.162.194`, `0.162.195`, and `0.162.196` failed before npm upload and their\n> tags remain immutable).\n> CLI-only release metadata;\n> `@chainlesschain/personal-data-hub`\n> remains **0.4.57** and `@chainlesschain/agent-sdk` remains **0.1.7**.\n\n- **Safer configuration defaults**: for CLI config writes, schema-declared\n secrets are refused by `config set` and must use `config set-secret` through\n hidden TTY/stdin and OS-store or owner-only fallback paths. Explicit\n `workspace-write` / `strict` isolation and managed-required sandbox policies\n fail closed when unavailable. `mcp add` now defaults to local scope; both\n human and JSON `status` use bounded quick probes, while full Docker Compose\n detail requires `--deep`.\n- **MCP transports and uncertain-outcome recovery**: scoped WebSocket MCP,\n trusted dynamic headers, timeout notifications, and durable recovery records\n cover REPL, stream, Cowork/host, and WebSocket paths through shared verified\n recovery authority. Ambiguous MCP outcomes require verification or\n adjudication instead of blind replay.\n- **Canonical sessions and resource budgets**: covered REPL, stream,\n WebSocket, and headless paths use verified transcript projections,\n transactional summary/compaction state, and reject stale or corrupt resume\n authority. A persistent session-budget foundation plus background/Team\n adapters adds fenced token/USD/wall-clock accounting and cleanup; it is not\n yet a universal cross-host budget authority.\n- **Agent workflow controls**: durable plan/todo state with revision and\n authority ceilings, controlled skill subagents, background launch profiles,\n semantic handoff, ephemeral side questions, manifest-driven help, and\n deterministic shell completions improve Claude Code-style daily workflows.\n CLI-owned canonical session/checkpoint/delivery projections are consumed by\n VS Code and JetBrains while mutations stay CLI-authoritative; this CLI-only\n metadata bump does not bump either IDE package.\n- **Signed native update recovery**: immutable release identity, signed updater\n rollback chains, atomic download replacement, and portable recovery/cleanup\n paths add fail-closed activation, rollback, and recovery fences for stale,\n replaced, or partial payloads.\n- **Checkpoint restore durability**: canonical workspace prestate binding,\n lifetime locks, immutable Git/copy target identity, copy tombstones and\n owner-private safety arms feed a hash-chained CAS restore saga shared by\n direct and timeline restores. A real Git/copy kill/restart matrix covers\n both the post-completion, pre-lock-release window and mutation-phase partial\n rollback recovery.\n- **Conservative recovery CLI**: `cc checkpoint recovery`\n `list/show/abort/resume/rollback/release` derives mutation authority from the\n current live owner digest or verified owner absence plus exact seq/head\n fences. `resume` remains limited to a verified already-completed settlement;\n `rollback --yes` only accepts a verified partial-mutation rollback cycle and\n dispatches the persisted Git/copy engine rather than re-detecting it.\n- **Verified partial restore rollback**: production Git and copy adapters,\n crash-safe rollback v2 phase boundaries, and the transaction-fenced\n `checkpoint_restore_recovery_resolution` event bind workspace and session\n settlement in both directions. Checkpoint delete, clear, and prune now retain\n active original/safety authority with expected-identity transactions,\n no-replace copy publication, and root-bound maintenance locks. This is a\n narrow partial-restore recovery path, not general multi-resource atomicity,\n power-loss proof, or checkpoint recovery GA.\n- **Release retry identity**: tags `v-npm-0-162-190`,\n `v-npm-0-162-191`, `v-npm-0-162-192`, `v-npm-0-162-194`, and\n `v-npm-0-162-195` / `v-npm-0-162-196` remain immutable records of\n pre-publication failures.\n Run `30790359741` exposed an Agent SDK E2E fixture that used its owner-private\n `CHAINLESSCHAIN_HOME` as the active workspace; the fixture now uses sibling\n control-state and workspace roots while production path safety remains fail\n closed. Run `30793513643` passed all tests but exposed root-monorepo\n `npm sbom` contamination from unrelated desktop/mobile peer graphs; SBOM\n generation now resolves an ignore-scripts lock from the immutable CLI\n tarball and validates its CycloneDX package/version identity. Run\n `30799974832` exposed that the exact-SHA gate queried jobs with\n `filter=all`, so an earlier failed CLI CI attempt overrode the successful\n rerun; it now verifies only GitHub's latest attempt. The first `0.162.193`\n candidate then exposed a recurring macOS two-process CAS race in run\n `30800530258`: a cooperating owner could remove its lock between the\n unlocked safety inspection steps, and the loser reported `LOCK_FAILED`\n instead of reaching the serialized stale-head `CONFLICT`. Unlocked\n pre/postflight inspection now retries that exact disappearance, while\n owner-required critical-section checks still fail closed. Deterministic\n directory/owner disappearance regressions, the full 105-test checkpoint\n saga suite, and five repeated real-process CAS runs pass locally.\n Run `30966796114` passed its exact-SHA gate but failed before package creation\n when the Agent SDK build assumed a package-local `node_modules/.bin/tsc`.\n The build now resolves the TypeScript compiler module through Node, supporting\n both independent installs and npm workspace hoisting; the consumed\n `v-npm-0-162-194` identity is not moved or reused.\n Run `30973665834` then passed the exact-SHA gate and all tests, but its\n immutable package job passed the complete `npm pack --json` result as one\n command-line argument; the 959-file metadata exceeded Linux `ARG_MAX` before\n release-manifest creation. Pack metadata now flows through a temporary file,\n and the consumed `v-npm-0-162-195` identity is also not moved or reused.\n Run `30976924860` passed all tests, immutable tarball creation, SBOM validation,\n and artifact upload, but `npm publish` interpreted the bare relative\n `release-artifacts/...tgz` argument as a GitHub `owner/repo` package spec and\n failed before upload. The publish step now discovers the tarball through the\n absolute `$GITHUB_WORKSPACE` path; `v-npm-0-162-196` is not moved or reused.\n- **Release authority containment**: a later generic workspace publisher\n replaced the dedicated CLI workflow at the same `npm-publish.yml` path.\n Manually dispatched run `30820089779` therefore auto-selected and published\n `chainlesschain@0.162.193` from `e8e7ba274b487ed491c04ec3359841a0e545debb`\n while that SHA's `CLI CI` was still running and eventually failed. The\n package has npm provenance but no `v-npm-0-162-193` tag, exact-SHA gate\n attestation, verified immutable tarball/SBOM handoff, or successful complete\n CLI matrix. The authoritative workflow is restored; the generic publisher\n is moved to a distinct workflow/tag namespace, while the live CLI path now\n requires the event ref to exactly match `v-npm-<package-version>` and its\n checked-out `GITHUB_SHA`. The generic publisher excludes `packages/cli`\n and package name `chainlesschain` both during detection and immediately\n before publish. Numeric product releases no longer contain a CLI publisher:\n they require an already-published `v-npm-*` tag, matching registry `gitHead`,\n and successful exact-SHA gates before finalizing. The two local generic\n publisher scripts also exclude and reject the CLI.\n- **Inline-chat release blocker**: the `0.162.193` source registered the six\n VS Code inline-chat commands twice, invoked non-existent methods in the\n second registration, and referenced an undefined `outputLog` during\n activation. The extension now constructs one decorator with the existing\n chat provider and module logger, registers each contributed command exactly\n once, and publishes the same six commands through the canonical IDE\n capability manifest. The activation fake now exercises the decorator path,\n so constructor or registration regressions fail the CLI matrix.\n- **Production REPL prompt interactions**: each real REPL session now owns a\n prompt interaction controller and slash-command registry for `/paste-image`,\n `/editor`, `/stash`, `/suggestions`, and `/recap`. Guarded keypress dispatch\n consumes configured interaction keys before readline, live assistant/session\n context feeds manual and automatic suggestions, and local clipboard data\n images join the existing multimodal vision-provider path while remote image\n chips fail closed. The focused REPL, prompt, keybinding, image, and provider\n matrix passes 200/200 locally; the exact-SHA three-platform release gates\n listed below also passed.\n- **Second command-surface migration batch**: eight explicitly legacy or\n in-memory governance commands (`bm25`, `ccron`, `compt`, `consol`, `fflag`,\n `pdfp`, `sganal`, and `vcheck`) now have canonical `cc lab ...` spellings.\n Their original top-level forms remain compatible through at least `0.164.0`\n and warn only on stderr. The registered graph remains 175 commands with zero\n net growth, while the recommended surface drops from 174 to 166; manifest,\n README, namespace help, and four shell completions share the same lifecycle\n source. Native manifest generation also now uses the real pure `/doctor`\n status exports instead of a nonexistent registry import.\n- **Third command-surface migration batch**: fifteen explicitly in-memory V2\n governance overlays (`execbe`, `itbudget`, `mcpscaf`, `meminj`, `orchgov`,\n `promcomp`, `seshhook`, `seshsearch`, `seshtail`, `seshu`, `slotfill`,\n `svccont`, `tms`, `topiccls`, and `uprof`) now use canonical `cc lab ...`\n spellings. Product-facing `todo`, `subagent`, `webfetch`, and `planmode`\n remain active top-level commands instead of being migrated by keyword alone.\n Legacy spellings remain compatible through at least `0.164.0` and warn only\n on stderr. The registered graph remains 175 commands with zero net growth;\n the recommended surface drops from 166 to 151, with manifest, README,\n namespace help, and four shell completions generated from one lifecycle\n policy.\n- **Published release evidence**: `0.162.193` remains an unauthorized historical\n registry record and is superseded by `0.162.197`; `0.162.194`, `0.162.195`,\n and `0.162.196` are not published and their failed tags remain immutable.\n Tag `v-npm-0-162-197` points to exact commit\n `a03ad1b548cc6f15c9bef8f82d519e9c625eef8d`. Its\n [CLI CI](https://github.com/chainlesschain/chainlesschain/actions/runs/30979565407),\n [CLI Strict Sandbox](https://github.com/chainlesschain/chainlesschain/actions/runs/30979565251),\n and [dedicated npm release](https://github.com/chainlesschain/chainlesschain/actions/runs/30979565206)\n passed across Ubuntu, Windows, and macOS, including exact-SHA, immutable\n tarball/SBOM, and provenance checks. A subsequent\n [registry readback](https://github.com/chainlesschain/chainlesschain/actions/runs/30983536627)\n verified package bytes, signed provenance, and workflow identity. Local,\n older-SHA, and partial results remain supplementary only."
|
|
14
27
|
}
|
|
15
28
|
]
|
|
16
29
|
},
|
|
@@ -98,6 +98,7 @@ export class WSAgentHandler {
|
|
|
98
98
|
this._approvalGate = approvalGate || null;
|
|
99
99
|
this._approvalGateInit = Boolean(approvalGate);
|
|
100
100
|
this._mcpRecoveryRuntime = null;
|
|
101
|
+
this._mcpRecoverySink = null;
|
|
101
102
|
this._mcpRecoveryRevision = null;
|
|
102
103
|
this._mcpRecoveryClient = null;
|
|
103
104
|
this._agentLoop = runAgentLoop || agentLoop;
|
|
@@ -361,6 +362,9 @@ export class WSAgentHandler {
|
|
|
361
362
|
},
|
|
362
363
|
);
|
|
363
364
|
}
|
|
365
|
+
this._mcpRecoverySink = createSessionMcpLedgerSink(session.id, {
|
|
366
|
+
recovery: session.mcpLedgerRecovery || null,
|
|
367
|
+
});
|
|
364
368
|
this._mcpRecoveryRuntime = createMcpHostRecoveryRuntime({
|
|
365
369
|
bundle: {
|
|
366
370
|
mcpClient: rawClient,
|
|
@@ -369,7 +373,7 @@ export class WSAgentHandler {
|
|
|
369
373
|
},
|
|
370
374
|
rawClient,
|
|
371
375
|
sessionId: session.id,
|
|
372
|
-
sink:
|
|
376
|
+
sink: this._mcpRecoverySink,
|
|
373
377
|
recovery: session.mcpLedgerRecovery || null,
|
|
374
378
|
controller,
|
|
375
379
|
});
|
|
@@ -383,6 +387,9 @@ export class WSAgentHandler {
|
|
|
383
387
|
replayDenied: [],
|
|
384
388
|
},
|
|
385
389
|
);
|
|
390
|
+
this._mcpRecoverySink?.replaceRecoveryFence?.(
|
|
391
|
+
session.mcpLedgerRecovery || null,
|
|
392
|
+
);
|
|
386
393
|
this._mcpRecoveryRevision = revision;
|
|
387
394
|
}
|
|
388
395
|
return this._mcpRecoveryRuntime;
|