chainlesschain 0.165.4 → 0.165.6
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/package.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-C__nnraW.js → AIOps-vfoDb6HZ.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-CsKWHEZ-.js → ActionButton-Cm5f7p93.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-BhIjfjWO.js → Analytics-yRuvgWxa.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-BjuXFzWZ.js → AppLayout-BROsC4h1.js} +4 -4
- package/src/assets/web-panel/assets/{Artifacts-k6whDkZJ.js → Artifacts-CimHApb1.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-C4FBMYRh.js → Audit-DI8kr8zI.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-C_vRrSXk.js → BackgroundAgents-DSLzKy-n.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CngFZeVp.js → Backup-DkH_n2r1.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-B_H9EBRm.js → BaseInput-CKSrUoRA.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-DLEC5kt7.js → Chat-ClwfMXUS.js} +3 -3
- package/src/assets/web-panel/assets/ChatBubbleRenderer-CjMaqfL7.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-m3ClR4xh.js → Checkbox-BYTehcQG.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-CmLSFrgp.js → Codegen-B8AMcp6J.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DFGQteHN.js → Col-BNSogPo3.js} +1 -1
- package/src/assets/web-panel/assets/{Community-EUUVORHE.js → Community-JxPvGb8O.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-2PSg0Yr7.js → Compact-DF7bFAgE.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-CcKur7gB.js → Compliance-Bvhqnwrq.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-DK_Fezfa.js → Cowork-BDS0CJvM.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-Dbw89xl7.js → Cron-DqvRfxoQ.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-CH66h_Ec.js → Crosschain-CDcIvnqS.js} +1 -1
- package/src/assets/web-panel/assets/{DID-D1igRb17.js → DID-D7jaUxU3.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-DVAsrobk.js → Dashboard-B5A18wEV.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-Dl7W8AQs.js → Dropdown-_6IVkGag.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-D5tpaEQC.js → EmailListRenderer-C9PeiKCG.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-O_VQf8gq.js → FamilyGuardDashboard-DXjuEHrX.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-BTVcgS9n.js → Federation-B4IAR9zv.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BRnkJAIz.js → FormItemContext-CxQeSNx1.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-8OWSCkDj.js → GenericCardRenderer-B8GS-Y3N.js} +1 -1
- package/src/assets/web-panel/assets/{Git-WXLYTQj2.js → Git-BS8SouUX.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-BezaUhtc.js → Governance-Dq9aYb5Q.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-CuRay3Gu.js → Inference-BrCEe9AJ.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DfWLDW1m.js → KnowledgeGraph-DybOpiY2.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-C55y2pPY.js → Logs-DBpzbRfx.js} +2 -2
- package/src/assets/web-panel/assets/MarkdownRenderer-CFyt8iUd.js +1 -0
- package/src/assets/web-panel/assets/{Marketplace-Dk08Uycg.js → Marketplace-Cc7CCSCu.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-C11fSB5V.js → McpTools-DFaIhOfu.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-mr0eZc97.js → Memory-KCqlp9ol.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-C0iCSRbb.js → MobileBridge-Bys84ySN.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-CY-xMG8Z.js → MobileProjects-B-6qU-je.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-Bplqc_Wc.js → Mtc-BgY-fvCq.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-BlzwsoSM.js → MtcAudit-B8pCmqQJ.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-BBLmTty6.js → Multisig-BbOmYutA.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-DtT1uf1W.js → NLProgramming-BocLQz_M.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DcqQAxTK.js → Notes-CSwbxEop.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-cb0kWoZe.js → NotificationSettings-CqFNSYG3.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-kw9HZQNN.js → OrderTableRenderer-C6gMfAk7.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-DlTlbkUN.js → Organization-QrDXVdMJ.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-pp1qs-oY.js → Overflow-Cxntotjt.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-BESLnyYz.js → P2P-CIdBOwNq.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-B-J1mGuf.js → PdhVaultBrowser-CT5aP8rD.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-B36PeT1_.js → Permissions-DH7OM8XU.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-CTK2ad-3.js → PersonalDataHub-CnJqbWce.js} +3 -3
- package/src/assets/web-panel/assets/{Pipeline-zJNGXsac.js → Pipeline-5C3HG1kH.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-b9fz0Qf0.js → Privacy-B4yIp7xK.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-DjZbZgiB.js → ProjectInit-BMvt-2M0.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-C-hHJXlD.js → ProjectSettings-CvSTEMRG.js} +2 -2
- package/src/assets/web-panel/assets/Projects-BKBJxEek.js +1 -0
- package/src/assets/web-panel/assets/Providers-BdwUqFWN.js +1 -0
- package/src/assets/web-panel/assets/{QrScannerModal-A0yoQ3-3.js → QrScannerModal-DtnCKlTm.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-DrFgFJNC.js → QuickAsk-sTbgwyNr.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-KC8hF1g4.js → Recommend-Bzr14gSb.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-DGTPIk6u.js → RemoteSession-C_TF5IaJ.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-QmbwM7Yk.js → Reputation-GCAM4H2K.js} +1 -1
- package/src/assets/web-panel/assets/{Row-BxjJylia.js → Row-Dir0r6OQ.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-B7Wda1J6.js → RssFeed-CpGnlecX.js} +2 -2
- package/src/assets/web-panel/assets/{Search-_plQ_YSA.js → Search-DMMamC6u.js} +1 -1
- package/src/assets/web-panel/assets/{Security-CD2YJZfx.js → Security-yqay5yG-.js} +4 -4
- package/src/assets/web-panel/assets/{Services-qQE7NmwE.js → Services-C5i2wh9G.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-DgQqkFf7.js → Skeleton-vUqk35yj.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-C4C0oFFt.js → Skills-DzcSkhot.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Px2N2B5c.js → Sla-CB6qbYNr.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-DN6C3lQd.js → SpeechSettings-BHUI7cox.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-jm5aH_m7.js → SyncSettings-D-RrsxTJ.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-DlkJcv67.js → Tasks-DFxdOJiq.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-DyrTHUBs.js → Templates-SKAob_Aq.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-mC434PtL.js → Tenant-BPfsfHQ-.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-o0_s3NgK.js → Terminal-8iw7FpUf.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-DAGlAXOw.js → TimelineRenderer-C4Gjj5Su.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-BnulS_bs.js → Tokens-COYhN18e.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-suQbVXYM.js → Trigger-B-JzXcf6.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-DbIJAPo5.js → Trust-BJ5bg0nI.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CQNpbIHi.js → UkeySign-BG_ByRMf.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-D8aWCERk.js → VideoEditing-B3kOnSiU.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-CuLpYfZc.js → Wallet-CcoGFnK7.js} +2 -2
- package/src/assets/web-panel/assets/{WebAuthn-CsfG8ZMc.js → WebAuthn-DdT8vRC_.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-BYsEAZbd.js → WorkflowEditor-CZu3M9N8.js} +1 -1
- package/src/assets/web-panel/assets/{chat-FT4Um3-I.js → chat-DxJt3Qba.js} +1 -1
- package/src/assets/web-panel/assets/{colors-CKbS_Wlt.js → colors-DdYfwJaB.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-CFJtzuJM.js → compact-item-BG3SUzwj.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-B9kSRW6K.js → createContext-By51z2-1.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-DorRZcI9.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-DR-x0Xpi.js → hasIn-B0apZ3KJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-DjEP7WkH.js → index-3jWkIu5j.js} +1 -1
- package/src/assets/web-panel/assets/{index-7jHr_A_k.js → index-B3rWuPMW.js} +1 -1
- package/src/assets/web-panel/assets/{index-DcfxhKXR.js → index-B5rLiEo0.js} +1 -1
- package/src/assets/web-panel/assets/{index-tqSEHPRT.js → index-BBPf3TpM.js} +1 -1
- package/src/assets/web-panel/assets/index-BETiL0a3.js +1 -0
- package/src/assets/web-panel/assets/{index-Cr2FLUsD.js → index-BIrJfqO4.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bt4fS2eL.js → index-BLIbGOLX.js} +1 -1
- package/src/assets/web-panel/assets/{index-BwR7yc2h.js → index-BP94CrBV.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVPU43b1.js → index-BWF8_mkx.js} +1 -1
- package/src/assets/web-panel/assets/{index-DShSkww-.js → index-BYINoRLK.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bzz0C1BZ.js → index-BZ_0qm4g.js} +1 -1
- package/src/assets/web-panel/assets/{index-KqDaCApw.js → index-BewKYrX9.js} +1 -1
- package/src/assets/web-panel/assets/{index-BW-t9n-q.js → index-BfWYsB9t.js} +1 -1
- package/src/assets/web-panel/assets/index-BhAVHuW8.js +1 -0
- package/src/assets/web-panel/assets/{index-B7osrXqy.js → index-Bissefox.js} +3 -3
- package/src/assets/web-panel/assets/{index-DW4BWjTk.js → index-BkvcEo4p.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdkIhfi-.js → index-Bos5_aMV.js} +1 -1
- package/src/assets/web-panel/assets/{index-DTxNy0ZU.js → index-C1C9i79A.js} +1 -1
- package/src/assets/web-panel/assets/{index-QBSeNVO3.js → index-CAhHirVH.js} +1 -1
- package/src/assets/web-panel/assets/{index-D4LfPvWA.js → index-CNIxXMmN.js} +1 -1
- package/src/assets/web-panel/assets/{index-C_enk9I_.js → index-CW93tZDv.js} +1 -1
- package/src/assets/web-panel/assets/{index-WE08gMJP.js → index-CWEuZWCK.js} +1 -1
- package/src/assets/web-panel/assets/{index-r2VI1Ikk.js → index-Cp6e-hGw.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dap9c3eD.js → index-CpjZhgNd.js} +1 -1
- package/src/assets/web-panel/assets/{index-DWdqx7zI.js → index-CzmQElZy.js} +1 -1
- package/src/assets/web-panel/assets/{index-BGbPnC5x.js → index-DCn8IcxV.js} +1 -1
- package/src/assets/web-panel/assets/{index-DiNUEpSQ.js → index-DE76D-kA.js} +1 -1
- package/src/assets/web-panel/assets/{index-DtkFqPVA.js → index-DaIz0NAW.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGaXUsIs.js → index-Da_WBdLX.js} +1 -1
- package/src/assets/web-panel/assets/{index-B3ZX81mK.js → index-Dz49VOyQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-BK3TiKVq.js → index-Q2SCX-MI.js} +1 -1
- package/src/assets/web-panel/assets/{index-CJmIQ9XR.js → index-RD6O-0C6.js} +1 -1
- package/src/assets/web-panel/assets/{index-CvrCCqJt.js → index-SQqOlR3d.js} +1 -1
- package/src/assets/web-panel/assets/{index-BI5hP_qy.js → index-ZFbps9po.js} +1 -1
- package/src/assets/web-panel/assets/{index-DeSgw-WV.js → index-ZxtP8jG7.js} +1 -1
- package/src/assets/web-panel/assets/{index-DMGmg497.js → index-bP_VlDb4.js} +1 -1
- package/src/assets/web-panel/assets/{index-BfFCQHL3.js → index-kf57LJ93.js} +1 -1
- package/src/assets/web-panel/assets/{index-OSzjTzGM.js → index-oxRrmFO9.js} +1 -1
- package/src/assets/web-panel/assets/{index-C2JvmYRc.js → index-p1_8SbI1.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-Dd7n7VgI.js → initDefaultProps-BWJktcg8.js} +1 -1
- package/src/assets/web-panel/assets/{motion-BwxouRw1.js → motion-BEXBzUFV.js} +1 -1
- package/src/assets/web-panel/assets/{move-DObN0PG9.js → move-BUKwn2sx.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-B3nOUQc7.js → mtc-parser-FTI7btqQ.js} +1 -1
- package/src/assets/web-panel/assets/{omit-o9WU2Nbl.js → omit-CsLtSPH3.js} +1 -1
- package/src/assets/web-panel/assets/parsers-YNLm7sQ0.js +4 -0
- package/src/assets/web-panel/assets/{pickAttrs-CL_vvfQ_.js → pickAttrs-DWZxsT_S.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-CYrM2tyK.js → placementArrow-Bcfs43CX.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-k_06cQ96.js → responsiveObserve-a9bcC1p-.js} +1 -1
- package/src/assets/web-panel/assets/{slide-CPKG0pxS.js → slide-BDTzgOXN.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-BDDEeLTw.js → statusUtils-Iq1j_HUg.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-Cmb7RTh7.js → styleChecker-DAZEYxeh.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-e2IedC4N.js → useFlexGapSupport-DVkjyDrh.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-CE_gxVnm.js → useFs-wXTpNTHt.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-BkMIIKMz.js → usePersonalDataHub-CtQM_aZr.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DW886XV1.js → vnode-hjEoG85v.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-Dwo_adaf.js → zoom-BHVpyKg_.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +3 -3
- package/src/commands/agent.js +14 -2
- package/src/commands/artifacts.js +235 -0
- package/src/commands/background-session.js +100 -10
- package/src/commands/cowork.js +86 -57
- package/src/commands/mcp.js +5 -0
- package/src/commands/plugin.js +145 -29
- package/src/commands/remote-control.js +295 -110
- package/src/commands/session-location.js +20 -1
- package/src/commands/session-message.js +171 -0
- package/src/commands/session.js +75 -69
- package/src/data/changelog.json +29 -3
- package/src/gateways/ws/message-dispatcher.js +57 -0
- package/src/harness/mcp-client.js +141 -10
- package/src/lib/artifact-access-ledger.js +1 -0
- package/src/lib/artifact-deletion-ledger.js +1 -0
- package/src/lib/artifact-recovery.js +970 -0
- package/src/lib/artifact-workbench-projection.js +171 -0
- package/src/lib/background-session-transport.js +153 -27
- package/src/lib/dynamic-workflow-runtime.js +408 -1
- package/src/lib/execution-location-target.js +4 -2
- package/src/lib/mcp-client.js +2 -0
- package/src/lib/mcp-headers-helper.js +47 -5
- package/src/lib/mcp-oauth.js +55 -6
- package/src/lib/mcp-stdio-executable-identity.js +16 -0
- package/src/lib/mcp-stdio-native-code-policy.js +74 -0
- package/src/lib/mcp-stdio-package-materialization.js +12 -3
- package/src/lib/mcp-tls.js +230 -0
- package/src/lib/output-styles.js +12 -0
- package/src/lib/plugin-runtime/install.js +614 -71
- package/src/lib/plugin-runtime/marketplace-archive-source.js +331 -0
- package/src/lib/plugin-runtime/marketplace-catalog.js +52 -6
- package/src/lib/plugin-runtime/marketplace-remote-artifacts.js +1 -0
- package/src/lib/plugin-runtime/marketplace-source-adapter.js +163 -0
- package/src/lib/plugin-runtime/marketplace-source-cache.js +11 -1
- package/src/lib/plugin-runtime/remote-source.js +435 -55
- package/src/lib/plugin-security.js +393 -41
- package/src/lib/plugin-source-identity.js +850 -0
- package/src/lib/process-execution-broker/index.js +112 -0
- package/src/lib/process-execution-broker/platform-sandbox.js +57 -3
- package/src/lib/process-execution-broker/workspace-transaction.js +26 -0
- package/src/lib/remote-approval-bridge.js +136 -46
- package/src/lib/remote-control.js +217 -31
- package/src/lib/session-message-fabric.js +1105 -0
- package/src/lib/session-projection.js +171 -12
- package/src/lib/session-runtime-retention.js +155 -0
- package/src/lib/settings-loader.cjs +29 -0
- package/src/repl/agent-repl.js +51 -14
- package/src/repl/permission-prompt.js +31 -8
- package/src/repl/repl-keybindings.js +55 -0
- package/src/runtime/agent-core.js +63 -2
- package/src/runtime/headless-runner.js +47 -66
- package/src/runtime/headless-stream.js +18 -24
- package/src/runtime/mcp-config.js +2 -0
- package/src/runtime/policies/agent-policy.js +2 -0
- package/src/assets/web-panel/assets/ChatBubbleRenderer-xijcWkJe.js +0 -1
- package/src/assets/web-panel/assets/MarkdownRenderer-hDpWdiBc.js +0 -1
- package/src/assets/web-panel/assets/Projects-BC9KSDM6.js +0 -1
- package/src/assets/web-panel/assets/Providers-Dz-CAYYU.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DJZ0gAMu.js +0 -1
- package/src/assets/web-panel/assets/index-Bizb4hkw.js +0 -1
- package/src/assets/web-panel/assets/index-OHSl-xCh.js +0 -1
- package/src/assets/web-panel/assets/parsers-UEvh_ShA.js +0 -4
package/src/commands/agent.js
CHANGED
|
@@ -445,7 +445,7 @@ export function registerAgentCommand(program) {
|
|
|
445
445
|
)
|
|
446
446
|
.option(
|
|
447
447
|
"--output-style <name>",
|
|
448
|
-
"Apply a named output-style persona (.claude/output-styles/<name>.md or a built-in: explanatory | learning)",
|
|
448
|
+
"Apply a named output-style persona (.claude/output-styles/<name>.md or a built-in: concise | explanatory | learning)",
|
|
449
449
|
)
|
|
450
450
|
.option(
|
|
451
451
|
"--input-format <fmt>",
|
|
@@ -530,7 +530,11 @@ export function registerAgentCommand(program) {
|
|
|
530
530
|
)
|
|
531
531
|
.option(
|
|
532
532
|
"--remote-control",
|
|
533
|
-
"Route confirm-tier approvals to paired mobile/web devices —
|
|
533
|
+
"Route confirm-tier approvals to paired mobile/web devices — requires a relay or explicit LAN opt-in; headless waits fail-closed, interactive races the terminal prompt (also /remote-control)",
|
|
534
|
+
)
|
|
535
|
+
.option(
|
|
536
|
+
"--remote-control-allow-lan",
|
|
537
|
+
"Permit --remote-control to expose its authenticated WS endpoint on a trusted LAN",
|
|
534
538
|
)
|
|
535
539
|
.option(
|
|
536
540
|
"--channels <list>",
|
|
@@ -1383,6 +1387,7 @@ export function registerAgentCommand(program) {
|
|
|
1383
1387
|
cwd,
|
|
1384
1388
|
permissionPromptTool: options.permissionPromptTool || null,
|
|
1385
1389
|
remoteControl: options.remoteControl === true,
|
|
1390
|
+
remoteControlAllowLan: options.remoteControlAllowLan === true,
|
|
1386
1391
|
interactiveApprovals: options.interactiveApprovals === true,
|
|
1387
1392
|
settingsFile: options.settings || null,
|
|
1388
1393
|
outputStyle: options.outputStyle || null,
|
|
@@ -1685,6 +1690,7 @@ export function registerAgentCommand(program) {
|
|
|
1685
1690
|
permissionPromptTool: options.permissionPromptTool || null,
|
|
1686
1691
|
// --remote-control: approvals from paired mobile/web devices
|
|
1687
1692
|
remoteControl: options.remoteControl === true,
|
|
1693
|
+
remoteControlAllowLan: options.remoteControlAllowLan === true,
|
|
1688
1694
|
// --strict-mcp-config: only --mcp-config servers (ignore registered + IDE)
|
|
1689
1695
|
strictMcpConfig: options.strictMcpConfig === true,
|
|
1690
1696
|
// --settings: extra .claude/settings.json permission rules
|
|
@@ -1836,6 +1842,11 @@ export function registerAgentCommand(program) {
|
|
|
1836
1842
|
// === false suppresses the auto-loaded rules.md + cc.md/CLAUDE.md block
|
|
1837
1843
|
// in the REPL's composed system prompt. Absent (undefined) = default-on.
|
|
1838
1844
|
projectMemory: options.projectMemory,
|
|
1845
|
+
// Output styles and the one-shot settings layer are also consumed by
|
|
1846
|
+
// the interactive REPL. Keep them on the runtime-policy allowlist so
|
|
1847
|
+
// `--output-style concise` and `--settings` are not silently dropped.
|
|
1848
|
+
outputStyle: options.outputStyle || null,
|
|
1849
|
+
settingsFile: options.settings || null,
|
|
1839
1850
|
// --fallback-model also applies interactively (wrapper built in the
|
|
1840
1851
|
// REPL). Pass the fully resolved chain (flag + config default).
|
|
1841
1852
|
fallbackModels: fallbackModels.length ? fallbackModels : null,
|
|
@@ -1854,6 +1865,7 @@ export function registerAgentCommand(program) {
|
|
|
1854
1865
|
// --remote-control: start the paired-device approval bridge for the
|
|
1855
1866
|
// interactive session too (terminal prompt races the device).
|
|
1856
1867
|
remoteControl: options.remoteControl === true,
|
|
1868
|
+
remoteControlAllowLan: options.remoteControlAllowLan === true,
|
|
1857
1869
|
// --channels: inbound channel listeners (webhook/telegram) whose
|
|
1858
1870
|
// events become user turns in this session.
|
|
1859
1871
|
channels: options.channels || null,
|
|
@@ -33,6 +33,13 @@ import {
|
|
|
33
33
|
readArtifactCleanupLedger,
|
|
34
34
|
settleArtifactCleanup,
|
|
35
35
|
} from "../lib/artifact-cleanup-ledger.js";
|
|
36
|
+
import {
|
|
37
|
+
ARTIFACT_RECOVERY_DECISIONS,
|
|
38
|
+
adjudicateArtifactRecovery,
|
|
39
|
+
buildArtifactRecoveryPlan,
|
|
40
|
+
readArtifactOrphanGcLedger,
|
|
41
|
+
} from "../lib/artifact-recovery.js";
|
|
42
|
+
import { buildArtifactWorkbenchProjection } from "../lib/artifact-workbench-projection.js";
|
|
36
43
|
import {
|
|
37
44
|
assessDeliveryEvidence,
|
|
38
45
|
createDeliveryEvidenceRecord,
|
|
@@ -167,6 +174,56 @@ export function registerArtifactsCommand(program) {
|
|
|
167
174
|
process.exitCode = runArtifactsCleanupLog(options);
|
|
168
175
|
});
|
|
169
176
|
|
|
177
|
+
cmd
|
|
178
|
+
.command("recovery-plan")
|
|
179
|
+
.description(
|
|
180
|
+
"Inventory pending settlements and orphaned managed copies without mutating them",
|
|
181
|
+
)
|
|
182
|
+
.option(
|
|
183
|
+
"--timeout-ms <ms>",
|
|
184
|
+
"Age after which a pending settlement is reported as timed out",
|
|
185
|
+
)
|
|
186
|
+
.option("--json", "Machine-readable content-free recovery plan")
|
|
187
|
+
.action((options) => {
|
|
188
|
+
process.exitCode = runArtifactsRecoveryPlan(options);
|
|
189
|
+
});
|
|
190
|
+
|
|
191
|
+
cmd
|
|
192
|
+
.command("workbench")
|
|
193
|
+
.description(
|
|
194
|
+
"Project artifacts, returned-result lineage, history, and recovery risk for product clients",
|
|
195
|
+
)
|
|
196
|
+
.option("--json", "Machine-readable canonical workbench projection")
|
|
197
|
+
.action((options) => {
|
|
198
|
+
process.exitCode = runArtifactsWorkbench(options);
|
|
199
|
+
});
|
|
200
|
+
|
|
201
|
+
cmd
|
|
202
|
+
.command("recovery-adjudicate <item>")
|
|
203
|
+
.description(
|
|
204
|
+
"Apply one explicit, plan-bound administrator recovery decision",
|
|
205
|
+
)
|
|
206
|
+
.requiredOption("--plan-digest <digest>", "Exact recovery plan digest")
|
|
207
|
+
.requiredOption(
|
|
208
|
+
"--decision <decision>",
|
|
209
|
+
`Decision (${ARTIFACT_RECOVERY_DECISIONS.join("|")})`,
|
|
210
|
+
)
|
|
211
|
+
.option("--adjudication-id <id>", "Stable id for response-loss recovery")
|
|
212
|
+
.option("--approve", "Confirm the reviewed recovery mutation")
|
|
213
|
+
.option("--json", "Machine-readable adjudication receipt")
|
|
214
|
+
.action((item, options) => {
|
|
215
|
+
process.exitCode = runArtifactsRecoveryAdjudicate(item, options);
|
|
216
|
+
});
|
|
217
|
+
|
|
218
|
+
cmd
|
|
219
|
+
.command("orphan-gc-log")
|
|
220
|
+
.description("Verify and display the content-free orphan GC ledger")
|
|
221
|
+
.option("--adjudication <id>", "Only events for one adjudication id")
|
|
222
|
+
.option("--json", "Machine-readable verified ledger projection")
|
|
223
|
+
.action((options) => {
|
|
224
|
+
process.exitCode = runArtifactsOrphanGcLog(options);
|
|
225
|
+
});
|
|
226
|
+
|
|
170
227
|
cmd
|
|
171
228
|
.command("select-gates <input>")
|
|
172
229
|
.description(
|
|
@@ -612,6 +669,184 @@ export function runArtifactsCleanupLog(options = {}, deps = {}) {
|
|
|
612
669
|
}
|
|
613
670
|
}
|
|
614
671
|
|
|
672
|
+
export function runArtifactsRecoveryPlan(options = {}, deps = {}) {
|
|
673
|
+
const store = deps.store || new ArtifactStore();
|
|
674
|
+
try {
|
|
675
|
+
const parsedTimeout =
|
|
676
|
+
options.timeoutMs == null ? undefined : Number(options.timeoutMs);
|
|
677
|
+
const plan = (deps.buildArtifactRecoveryPlan || buildArtifactRecoveryPlan)(
|
|
678
|
+
store,
|
|
679
|
+
{
|
|
680
|
+
...(parsedTimeout == null ? {} : { timeoutMs: parsedTimeout }),
|
|
681
|
+
...(deps.recoveryOptions || {}),
|
|
682
|
+
},
|
|
683
|
+
);
|
|
684
|
+
if (options.json) {
|
|
685
|
+
console.log(JSON.stringify(plan, null, 2));
|
|
686
|
+
} else if (plan.items.length === 0) {
|
|
687
|
+
console.log(
|
|
688
|
+
chalk.dim(`Artifact recovery is clear (${plan.planDigest}).`),
|
|
689
|
+
);
|
|
690
|
+
} else {
|
|
691
|
+
console.log(
|
|
692
|
+
chalk.yellow(
|
|
693
|
+
`Artifact recovery requires review: ${plan.summary.itemCount} item(s), ${plan.summary.criticalCount} critical (${plan.planDigest}).`,
|
|
694
|
+
),
|
|
695
|
+
);
|
|
696
|
+
for (const item of plan.items) {
|
|
697
|
+
console.log(
|
|
698
|
+
`${item.severity}\t${item.kind}\t${item.recommendedDecision}\t${item.itemId}`,
|
|
699
|
+
);
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
return plan.summary.itemCount > 0 ? 2 : 0;
|
|
703
|
+
} catch (error) {
|
|
704
|
+
if (options.json) {
|
|
705
|
+
console.error(
|
|
706
|
+
JSON.stringify({
|
|
707
|
+
schema: "cc-artifact-recovery-plan-error/v1",
|
|
708
|
+
verified: false,
|
|
709
|
+
error: error.message,
|
|
710
|
+
}),
|
|
711
|
+
);
|
|
712
|
+
} else {
|
|
713
|
+
console.error(
|
|
714
|
+
chalk.red(`Artifact recovery inventory failed: ${error.message}`),
|
|
715
|
+
);
|
|
716
|
+
}
|
|
717
|
+
return 1;
|
|
718
|
+
}
|
|
719
|
+
}
|
|
720
|
+
|
|
721
|
+
export function runArtifactsWorkbench(options = {}, deps = {}) {
|
|
722
|
+
const store = deps.store || new ArtifactStore();
|
|
723
|
+
try {
|
|
724
|
+
const projection = (
|
|
725
|
+
deps.buildArtifactWorkbenchProjection || buildArtifactWorkbenchProjection
|
|
726
|
+
)(store, deps.workbenchOptions || {});
|
|
727
|
+
if (options.json) {
|
|
728
|
+
console.log(JSON.stringify(projection, null, 2));
|
|
729
|
+
} else {
|
|
730
|
+
console.log(
|
|
731
|
+
`${projection.artifacts.length} artifact(s); ${projection.recovery.summary.itemCount} recovery item(s); ${projection.history.totalEventCount} history event(s).`,
|
|
732
|
+
);
|
|
733
|
+
console.log(chalk.dim(projection.recovery.planDigest));
|
|
734
|
+
}
|
|
735
|
+
return 0;
|
|
736
|
+
} catch (error) {
|
|
737
|
+
if (options.json) {
|
|
738
|
+
console.error(
|
|
739
|
+
JSON.stringify({
|
|
740
|
+
schema: "cc-artifact-workbench-error/v1",
|
|
741
|
+
verified: false,
|
|
742
|
+
error: error.message,
|
|
743
|
+
}),
|
|
744
|
+
);
|
|
745
|
+
} else {
|
|
746
|
+
console.error(
|
|
747
|
+
chalk.red(`Artifact workbench projection failed: ${error.message}`),
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
return 1;
|
|
751
|
+
}
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
export function runArtifactsRecoveryAdjudicate(item, options = {}, deps = {}) {
|
|
755
|
+
const store = deps.store || new ArtifactStore();
|
|
756
|
+
try {
|
|
757
|
+
if (options.decision !== "defer" && options.approve !== true) {
|
|
758
|
+
throw new Error("recovery mutation requires explicit --approve");
|
|
759
|
+
}
|
|
760
|
+
const result = (
|
|
761
|
+
deps.adjudicateArtifactRecovery || adjudicateArtifactRecovery
|
|
762
|
+
)(
|
|
763
|
+
store,
|
|
764
|
+
{
|
|
765
|
+
itemId: item,
|
|
766
|
+
planDigest: options.planDigest,
|
|
767
|
+
decision: options.decision,
|
|
768
|
+
adjudicationId: options.adjudicationId,
|
|
769
|
+
},
|
|
770
|
+
deps.recoveryOptions || {},
|
|
771
|
+
);
|
|
772
|
+
if (options.json) {
|
|
773
|
+
console.log(JSON.stringify(result, null, 2));
|
|
774
|
+
} else {
|
|
775
|
+
console.log(
|
|
776
|
+
result.settled
|
|
777
|
+
? chalk.green(
|
|
778
|
+
`Artifact recovery adjudication ${result.adjudicationId || options.adjudicationId || ""} settled.`,
|
|
779
|
+
)
|
|
780
|
+
: chalk.dim("Artifact recovery item was deferred without mutation."),
|
|
781
|
+
);
|
|
782
|
+
}
|
|
783
|
+
return result.settled || options.decision === "defer" ? 0 : 1;
|
|
784
|
+
} catch (error) {
|
|
785
|
+
if (options.json) {
|
|
786
|
+
console.error(
|
|
787
|
+
JSON.stringify({
|
|
788
|
+
schema: "cc-artifact-recovery-adjudication-error/v1",
|
|
789
|
+
itemId: String(item),
|
|
790
|
+
settled: false,
|
|
791
|
+
error: error.message,
|
|
792
|
+
}),
|
|
793
|
+
);
|
|
794
|
+
} else {
|
|
795
|
+
console.error(
|
|
796
|
+
chalk.red(`Artifact recovery adjudication failed: ${error.message}`),
|
|
797
|
+
);
|
|
798
|
+
}
|
|
799
|
+
return 1;
|
|
800
|
+
}
|
|
801
|
+
}
|
|
802
|
+
|
|
803
|
+
export function runArtifactsOrphanGcLog(options = {}, deps = {}) {
|
|
804
|
+
const store = deps.store || new ArtifactStore();
|
|
805
|
+
try {
|
|
806
|
+
const ledger = (
|
|
807
|
+
deps.readArtifactOrphanGcLedger || readArtifactOrphanGcLedger
|
|
808
|
+
)(store, deps.recoveryOptions || {});
|
|
809
|
+
const events = ledger.events.filter(
|
|
810
|
+
(event) =>
|
|
811
|
+
!options.adjudication ||
|
|
812
|
+
event.adjudicationId === String(options.adjudication),
|
|
813
|
+
);
|
|
814
|
+
const projection = {
|
|
815
|
+
...ledger,
|
|
816
|
+
filtered: Boolean(options.adjudication),
|
|
817
|
+
matchedEventCount: events.length,
|
|
818
|
+
events,
|
|
819
|
+
};
|
|
820
|
+
if (options.json) {
|
|
821
|
+
console.log(JSON.stringify(projection, null, 2));
|
|
822
|
+
} else if (events.length === 0) {
|
|
823
|
+
console.log(chalk.dim("No artifact orphan GC settlement events."));
|
|
824
|
+
} else {
|
|
825
|
+
for (const event of events) {
|
|
826
|
+
console.log(
|
|
827
|
+
`${event.sequence}\t${event.phase}\t${event.outcome}\t${event.adjudicationId}\t${event.eventDigest}`,
|
|
828
|
+
);
|
|
829
|
+
}
|
|
830
|
+
}
|
|
831
|
+
return 0;
|
|
832
|
+
} catch (error) {
|
|
833
|
+
if (options.json) {
|
|
834
|
+
console.error(
|
|
835
|
+
JSON.stringify({
|
|
836
|
+
schema: "cc-artifact-orphan-gc-ledger-error/v1",
|
|
837
|
+
verified: false,
|
|
838
|
+
error: error.message,
|
|
839
|
+
}),
|
|
840
|
+
);
|
|
841
|
+
} else {
|
|
842
|
+
console.error(
|
|
843
|
+
chalk.red(`Artifact orphan GC log failed: ${error.message}`),
|
|
844
|
+
);
|
|
845
|
+
}
|
|
846
|
+
return 1;
|
|
847
|
+
}
|
|
848
|
+
}
|
|
849
|
+
|
|
615
850
|
function readJsonFile(inputPath, deps = {}) {
|
|
616
851
|
const readFileSync = deps.readFileSync || fs.readFileSync;
|
|
617
852
|
return JSON.parse(readFileSync(inputPath, "utf-8"));
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { closeSync, openSync, readSync, statSync } from "node:fs";
|
|
2
2
|
import chalk from "chalk";
|
|
3
3
|
import { logger } from "../lib/logger.js";
|
|
4
4
|
import { readPrLinkLedger } from "../lib/pr-link-ledger.js";
|
|
@@ -350,22 +350,112 @@ export async function retryBackgroundNeedsInputNotification(
|
|
|
350
350
|
export const LOG_TRUNCATION_NOTICE =
|
|
351
351
|
"--- log truncated/rotated, resuming from tail ---";
|
|
352
352
|
const TRUNCATION_RESUME_TAIL_BYTES = 4096;
|
|
353
|
+
export const MAX_BACKGROUND_LOG_DELTA_BYTES = 1024 * 1024;
|
|
354
|
+
|
|
355
|
+
function backgroundLogSize(file) {
|
|
356
|
+
try {
|
|
357
|
+
return statSync(file).size;
|
|
358
|
+
} catch {
|
|
359
|
+
return null;
|
|
360
|
+
}
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
function completeUtf8PrefixLength(buffer) {
|
|
364
|
+
if (buffer.length === 0) return 0;
|
|
365
|
+
let leadIndex = buffer.length - 1;
|
|
366
|
+
let continuationBytes = 0;
|
|
367
|
+
while (
|
|
368
|
+
leadIndex >= 0 &&
|
|
369
|
+
(buffer[leadIndex] & 0xc0) === 0x80 &&
|
|
370
|
+
continuationBytes < 3
|
|
371
|
+
) {
|
|
372
|
+
continuationBytes += 1;
|
|
373
|
+
leadIndex -= 1;
|
|
374
|
+
}
|
|
375
|
+
if (leadIndex < 0) return buffer.length;
|
|
376
|
+
const lead = buffer[leadIndex];
|
|
377
|
+
const expectedBytes =
|
|
378
|
+
(lead & 0x80) === 0
|
|
379
|
+
? 1
|
|
380
|
+
: (lead & 0xe0) === 0xc0
|
|
381
|
+
? 2
|
|
382
|
+
: (lead & 0xf0) === 0xe0
|
|
383
|
+
? 3
|
|
384
|
+
: (lead & 0xf8) === 0xf0
|
|
385
|
+
? 4
|
|
386
|
+
: 1;
|
|
387
|
+
return buffer.length - leadIndex < expectedBytes ? leadIndex : buffer.length;
|
|
388
|
+
}
|
|
389
|
+
|
|
390
|
+
function readBackgroundLogRange(
|
|
391
|
+
file,
|
|
392
|
+
start,
|
|
393
|
+
length,
|
|
394
|
+
preserveTrailingUtf8 = false,
|
|
395
|
+
) {
|
|
396
|
+
if (length <= 0) return { text: "", bytesRead: 0 };
|
|
397
|
+
let fd;
|
|
398
|
+
try {
|
|
399
|
+
fd = openSync(file, "r");
|
|
400
|
+
const buffer = Buffer.allocUnsafe(length);
|
|
401
|
+
let bytesRead = 0;
|
|
402
|
+
while (bytesRead < length) {
|
|
403
|
+
const count = readSync(
|
|
404
|
+
fd,
|
|
405
|
+
buffer,
|
|
406
|
+
bytesRead,
|
|
407
|
+
length - bytesRead,
|
|
408
|
+
start + bytesRead,
|
|
409
|
+
);
|
|
410
|
+
if (count === 0) break;
|
|
411
|
+
bytesRead += count;
|
|
412
|
+
}
|
|
413
|
+
const completeBytes = preserveTrailingUtf8
|
|
414
|
+
? completeUtf8PrefixLength(buffer.subarray(0, bytesRead))
|
|
415
|
+
: bytesRead;
|
|
416
|
+
return {
|
|
417
|
+
text: buffer.subarray(0, completeBytes).toString("utf8"),
|
|
418
|
+
bytesRead: completeBytes,
|
|
419
|
+
};
|
|
420
|
+
} catch {
|
|
421
|
+
return { text: "", bytesRead: 0 };
|
|
422
|
+
} finally {
|
|
423
|
+
if (fd !== undefined) closeSync(fd);
|
|
424
|
+
}
|
|
425
|
+
}
|
|
353
426
|
|
|
354
427
|
export function readLogFromOffset(file, offset) {
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
428
|
+
const normalizedOffset = Number.isSafeInteger(offset)
|
|
429
|
+
? Math.max(0, offset)
|
|
430
|
+
: 0;
|
|
431
|
+
const size = backgroundLogSize(file);
|
|
432
|
+
if (size === null) return { text: "", offset: normalizedOffset };
|
|
433
|
+
if (normalizedOffset > size) {
|
|
358
434
|
// Gap 3: the log shrank under us (rotation/truncation). Resetting the
|
|
359
435
|
// offset to 0 used to REPLAY the entire new file into the follow stream;
|
|
360
436
|
// resume from the current tail instead, with an explicit marker.
|
|
361
|
-
const from = Math.max(0,
|
|
437
|
+
const from = Math.max(0, size - TRUNCATION_RESUME_TAIL_BYTES);
|
|
438
|
+
const tail = readBackgroundLogRange(file, from, size - from);
|
|
362
439
|
return {
|
|
363
|
-
text: `\n${LOG_TRUNCATION_NOTICE}\n${text
|
|
364
|
-
offset:
|
|
440
|
+
text: `\n${LOG_TRUNCATION_NOTICE}\n${tail.text}`,
|
|
441
|
+
offset: from + tail.bytesRead,
|
|
365
442
|
truncated: true,
|
|
366
443
|
};
|
|
367
444
|
}
|
|
368
|
-
|
|
445
|
+
const length = Math.min(
|
|
446
|
+
size - normalizedOffset,
|
|
447
|
+
MAX_BACKGROUND_LOG_DELTA_BYTES,
|
|
448
|
+
);
|
|
449
|
+
const delta = readBackgroundLogRange(
|
|
450
|
+
file,
|
|
451
|
+
normalizedOffset,
|
|
452
|
+
length,
|
|
453
|
+
normalizedOffset + length < size,
|
|
454
|
+
);
|
|
455
|
+
return {
|
|
456
|
+
text: delta.text,
|
|
457
|
+
offset: normalizedOffset + delta.bytesRead,
|
|
458
|
+
};
|
|
369
459
|
}
|
|
370
460
|
|
|
371
461
|
/** Content-free JSONL authority exposed at the real background attach seam. */
|
|
@@ -390,7 +480,7 @@ async function followBackgroundAgent(id, options = {}) {
|
|
|
390
480
|
const initial = readBackgroundAgentLog(id, { lines });
|
|
391
481
|
if (initial)
|
|
392
482
|
process.stdout.write(initial.endsWith("\n") ? initial : `${initial}\n`);
|
|
393
|
-
let offset =
|
|
483
|
+
let offset = backgroundLogSize(logFile) ?? 0;
|
|
394
484
|
|
|
395
485
|
if (options.follow === false || state.status !== "running") {
|
|
396
486
|
return state;
|
|
@@ -597,7 +687,7 @@ export async function interactiveAttach(id, state, options = {}) {
|
|
|
597
687
|
if (initial)
|
|
598
688
|
process.stdout.write(initial.endsWith("\n") ? initial : `${initial}\n`);
|
|
599
689
|
const logFile = logPath(id);
|
|
600
|
-
let offset =
|
|
690
|
+
let offset = backgroundLogSize(logFile) ?? 0;
|
|
601
691
|
logger.log(
|
|
602
692
|
chalk.gray(
|
|
603
693
|
`Attached to ${id} (interactive). Type a prompt to continue the session; /stop · /status · Ctrl-C detaches.`,
|