chainlesschain 0.166.46 → 0.166.48

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.
Files changed (232) hide show
  1. package/README.md +6 -4
  2. package/package.json +4 -2
  3. package/src/assets/web-panel/assets/{AIOps-Cp8KiMmv.js → AIOps-BLGEffkh.js} +1 -1
  4. package/src/assets/web-panel/assets/{ActionButton-B4d9BGsm.js → ActionButton-Cz1z2VGD.js} +1 -1
  5. package/src/assets/web-panel/assets/{Analytics-Cf9yXTkv.js → Analytics-C3j9cf6q.js} +3 -3
  6. package/src/assets/web-panel/assets/{AppLayout-40UkmxtP.js → AppLayout-BR9ERuCA.js} +4 -4
  7. package/src/assets/web-panel/assets/{Artifacts-Ckkb4oOA.js → Artifacts-CozJCm4y.js} +1 -1
  8. package/src/assets/web-panel/assets/{Audit-Dnf569k5.js → Audit-DC5g9Ra2.js} +1 -1
  9. package/src/assets/web-panel/assets/{BackgroundAgents-CA6bLem4.js → BackgroundAgents-B1zrQ0dW.js} +1 -1
  10. package/src/assets/web-panel/assets/{Backup-ChQU0I_Q.js → Backup-ChVnfjpm.js} +1 -1
  11. package/src/assets/web-panel/assets/{BaseInput-BHeZXnNN.js → BaseInput-8_vLQsLf.js} +1 -1
  12. package/src/assets/web-panel/assets/{Chat-DcFVYB2E.js → Chat-Dct9bm6L.js} +5 -5
  13. package/src/assets/web-panel/assets/ChatBubbleRenderer-BvoSsCKh.js +1 -0
  14. package/src/assets/web-panel/assets/{Checkbox-2PDbejv2.js → Checkbox-DZQIsCIC.js} +1 -1
  15. package/src/assets/web-panel/assets/{Codegen-DJBn1RAu.js → Codegen-CdzHxmnq.js} +1 -1
  16. package/src/assets/web-panel/assets/{Col-CPRq7n6y.js → Col-DdAN8LeW.js} +1 -1
  17. package/src/assets/web-panel/assets/{Community-axvINFMi.js → Community-CNgjT9MA.js} +1 -1
  18. package/src/assets/web-panel/assets/{Compact-_OX4Qbe0.js → Compact-BtQiX6G-.js} +1 -1
  19. package/src/assets/web-panel/assets/{Compliance-DWAkvzRL.js → Compliance-OGX5ma3j.js} +1 -1
  20. package/src/assets/web-panel/assets/{Cowork-CUIJ25oj.js → Cowork-CgugQnGM.js} +3 -3
  21. package/src/assets/web-panel/assets/{Cron-nR0m7H3_.js → Cron-Bpg7cPFD.js} +2 -2
  22. package/src/assets/web-panel/assets/{Crosschain-CgTLXzh_.js → Crosschain-D1hsuswf.js} +1 -1
  23. package/src/assets/web-panel/assets/{DID-BllzRB6Q.js → DID-miDRsMBw.js} +2 -2
  24. package/src/assets/web-panel/assets/{Dashboard-C9f0IIBN.js → Dashboard-CGcl8htP.js} +2 -2
  25. package/src/assets/web-panel/assets/{Dropdown-BkahetiO.js → Dropdown-BFaxTdVE.js} +1 -1
  26. package/src/assets/web-panel/assets/{EmailListRenderer-rartVC-k.js → EmailListRenderer-BQdGLZIO.js} +1 -1
  27. package/src/assets/web-panel/assets/{EvolutionSettings-BqpG3XHV.js → EvolutionSettings-bMvgBk6r.js} +1 -1
  28. package/src/assets/web-panel/assets/{FamilyGuardDashboard-DgUdFvw1.js → FamilyGuardDashboard-c1WVC_--.js} +1 -1
  29. package/src/assets/web-panel/assets/{Federation-oFpIQU6g.js → Federation-DyAcFrQY.js} +1 -1
  30. package/src/assets/web-panel/assets/{FormItemContext-BUH5xlyP.js → FormItemContext-CfwpfD2B.js} +1 -1
  31. package/src/assets/web-panel/assets/{GenericCardRenderer-ilRa-ueg.js → GenericCardRenderer-DkJcbBpS.js} +1 -1
  32. package/src/assets/web-panel/assets/{Git-DlHHSF8j.js → Git-DgYIrPJh.js} +2 -2
  33. package/src/assets/web-panel/assets/{Governance-yQiiXIWe.js → Governance-BF1tYPJ6.js} +1 -1
  34. package/src/assets/web-panel/assets/{Inference-BUDRVGOP.js → Inference-BFkwRIrU.js} +1 -1
  35. package/src/assets/web-panel/assets/{KnowledgeGraph-BaGyIoN1.js → KnowledgeGraph-DpCoqhBa.js} +1 -1
  36. package/src/assets/web-panel/assets/{Logs-C1cO6zE0.js → Logs-DU2qAJmD.js} +2 -2
  37. package/src/assets/web-panel/assets/{MarkdownRenderer-_z_Iaoes.js → MarkdownRenderer-QWv7UJLq.js} +1 -1
  38. package/src/assets/web-panel/assets/{Marketplace-CM8cGL0K.js → Marketplace-Dz9NUrfo.js} +1 -1
  39. package/src/assets/web-panel/assets/{McpTools-CDqAMU0U.js → McpTools-B67I3d5v.js} +3 -3
  40. package/src/assets/web-panel/assets/{Memory-CfB0-Ofv.js → Memory-crkElJSy.js} +2 -2
  41. package/src/assets/web-panel/assets/{MobileBridge-BL18ytvB.js → MobileBridge-BO20VbdX.js} +1 -1
  42. package/src/assets/web-panel/assets/{MobileProjects-PIyyxbuJ.js → MobileProjects-Ba-3gZZd.js} +1 -1
  43. package/src/assets/web-panel/assets/{Mtc-BTTrFCol.js → Mtc-BAHZM084.js} +4 -4
  44. package/src/assets/web-panel/assets/{MtcAudit-JHZn037c.js → MtcAudit-CL3DzajL.js} +4 -4
  45. package/src/assets/web-panel/assets/{Multisig-CMf9NEdB.js → Multisig-BSWWzvWH.js} +3 -3
  46. package/src/assets/web-panel/assets/{NLProgramming-Dhk3qaus.js → NLProgramming-fnxqXM_3.js} +1 -1
  47. package/src/assets/web-panel/assets/{Notes-6F8EarNN.js → Notes-qUZPIQXT.js} +3 -3
  48. package/src/assets/web-panel/assets/{NotificationSettings-gxdaVEit.js → NotificationSettings-x9Xrixqu.js} +1 -1
  49. package/src/assets/web-panel/assets/{OrderTableRenderer-gVgXQWdc.js → OrderTableRenderer-BtMtQUt7.js} +1 -1
  50. package/src/assets/web-panel/assets/{Organization-CzvHcDNO.js → Organization-C946Hzna.js} +4 -4
  51. package/src/assets/web-panel/assets/{Overflow-Dclx30Vv.js → Overflow-BYf8KIts.js} +1 -1
  52. package/src/assets/web-panel/assets/{P2P-CM0Wm9vZ.js → P2P-Cbqf5dnv.js} +2 -2
  53. package/src/assets/web-panel/assets/PdhVaultBrowser-rmxp0cuF.js +7 -0
  54. package/src/assets/web-panel/assets/{Permissions-B_oATenG.js → Permissions-CZBw45EW.js} +3 -3
  55. package/src/assets/web-panel/assets/{PersonalDataHub-CptiVBh5.js → PersonalDataHub-BKwUAt43.js} +4 -4
  56. package/src/assets/web-panel/assets/{Pipeline-DkHzgyyI.js → Pipeline-DmFD2QW4.js} +1 -1
  57. package/src/assets/web-panel/assets/{Privacy-DzZvwcKh.js → Privacy-KpuwWvt5.js} +1 -1
  58. package/src/assets/web-panel/assets/{ProjectInit-CzkCs-5G.js → ProjectInit-Bt8UheX6.js} +2 -2
  59. package/src/assets/web-panel/assets/{ProjectSettings-BB8dcxRD.js → ProjectSettings-2ZeAn9CP.js} +2 -2
  60. package/src/assets/web-panel/assets/{Projects-B7PW9CFY.js → Projects-zBuet8Zs.js} +1 -1
  61. package/src/assets/web-panel/assets/{Providers-Tfx-ti1V.js → Providers-DcEAnw6L.js} +1 -1
  62. package/src/assets/web-panel/assets/{QrScannerModal-EvWlNhfX.js → QrScannerModal-qF7liYG9.js} +1 -1
  63. package/src/assets/web-panel/assets/{QuickAsk-CUspgbNC.js → QuickAsk-qiESlVBJ.js} +1 -1
  64. package/src/assets/web-panel/assets/{Recommend-COY2g77J.js → Recommend-Bk-cQyi9.js} +1 -1
  65. package/src/assets/web-panel/assets/{RemoteSession-BzMBU6E6.js → RemoteSession-CwrekErS.js} +2 -2
  66. package/src/assets/web-panel/assets/{Reputation-RtYRF4YP.js → Reputation-Bmw_UQtW.js} +1 -1
  67. package/src/assets/web-panel/assets/{Row-Bva3l9Lc.js → Row-CPdqZIUX.js} +1 -1
  68. package/src/assets/web-panel/assets/{RssFeed-BhjzLvW3.js → RssFeed-D_W-xxvS.js} +2 -2
  69. package/src/assets/web-panel/assets/{Search-BYzT2PTR.js → Search-Hu0oDFj_.js} +1 -1
  70. package/src/assets/web-panel/assets/{Security-Bcl4-KTv.js → Security-DeRxUwmq.js} +3 -3
  71. package/src/assets/web-panel/assets/{Services-BRRa4A0f.js → Services-CsNmHFkf.js} +2 -2
  72. package/src/assets/web-panel/assets/{Skeleton-DYQ016qy.js → Skeleton-gv_Vz0tN.js} +1 -1
  73. package/src/assets/web-panel/assets/{Skills-CAUKL9JA.js → Skills-Dgg-_rCB.js} +1 -1
  74. package/src/assets/web-panel/assets/{Sla-BTyUqfuD.js → Sla-Bpu-bsEJ.js} +1 -1
  75. package/src/assets/web-panel/assets/{SpeechSettings-CUjMihrs.js → SpeechSettings-CrhleHuF.js} +1 -1
  76. package/src/assets/web-panel/assets/{SyncSettings-CvfOSupr.js → SyncSettings-JHjUN6I9.js} +2 -2
  77. package/src/assets/web-panel/assets/{Tasks-EvjNXrWH.js → Tasks-DKRWKkl9.js} +1 -1
  78. package/src/assets/web-panel/assets/{Templates-wPAp0EoM.js → Templates-leiWntLq.js} +1 -1
  79. package/src/assets/web-panel/assets/{Tenant-CP0D-q9Q.js → Tenant--1bYulvn.js} +1 -1
  80. package/src/assets/web-panel/assets/{Terminal-CQ0f2iFg.js → Terminal-C0y6FvSS.js} +2 -2
  81. package/src/assets/web-panel/assets/{TimelineRenderer-D3JrGSPb.js → TimelineRenderer-CQK4PVv4.js} +1 -1
  82. package/src/assets/web-panel/assets/{Tokens-yXf2PPp9.js → Tokens-DbIvF-DV.js} +1 -1
  83. package/src/assets/web-panel/assets/{Trigger-DfmMOoZ2.js → Trigger-CkXJ2vuq.js} +1 -1
  84. package/src/assets/web-panel/assets/{Trust-BTCyMgf1.js → Trust-B02WXJPw.js} +1 -1
  85. package/src/assets/web-panel/assets/{UkeySign-DKCwIBHi.js → UkeySign-VPMkfzmw.js} +1 -1
  86. package/src/assets/web-panel/assets/{VideoEditing-CQpDSzLO.js → VideoEditing-C5ezUnah.js} +1 -1
  87. package/src/assets/web-panel/assets/{Wallet-CyFrzC3K.js → Wallet-CYfvYRrY.js} +4 -4
  88. package/src/assets/web-panel/assets/{WebAuthn-D6Nr_1kd.js → WebAuthn-DtKl-kpr.js} +4 -4
  89. package/src/assets/web-panel/assets/{WorkflowEditor-CgR9tNrB.js → WorkflowEditor-DACITF-u.js} +1 -1
  90. package/src/assets/web-panel/assets/{chat-CRG_IeyP.js → chat-qnygfnLi.js} +1 -1
  91. package/src/assets/web-panel/assets/{colors-MdE3TStI.js → colors-D4mISLBD.js} +1 -1
  92. package/src/assets/web-panel/assets/{compact-item-B0LRuiNV.js → compact-item-BBPfxYGL.js} +1 -1
  93. package/src/assets/web-panel/assets/{createContext-B_V5fjcX.js → createContext-Byx4ndHp.js} +1 -1
  94. package/src/assets/web-panel/assets/devWarning-DBy6gsuI.js +1 -0
  95. package/src/assets/web-panel/assets/{hasIn-DSL-c_hr.js → hasIn-CGjLkkn3.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-DE7bSYmW.js → index-B8UpadHC.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-BD0w-888.js → index-B9jH-h4X.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-BbZZ7P_c.js → index-BN7_TSgU.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-BIDCNwy6.js → index-BNe2lCk6.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-CkN53KiJ.js → index-B_fHPZ8E.js} +1 -1
  101. package/src/assets/web-panel/assets/index-BfEDXk_E.js +1 -0
  102. package/src/assets/web-panel/assets/{index-BsAEd-Do.js → index-BklGH3YI.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-CS3bOhV7.js → index-BmKYaaGP.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-B3iW-mhn.js → index-BxQF1wCU.js} +1 -1
  105. package/src/assets/web-panel/assets/{index-SmQfEHjp.js → index-ByA1NyFP.js} +1 -1
  106. package/src/assets/web-panel/assets/{index-0200QxC4.js → index-BzeBBAl5.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-c8OqO3rq.js → index-C3abGsSW.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-C-aKWR2v.js → index-C9tcHs46.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-BNhWoD6d.js → index-CD5Btq6p.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-CVDi4rS9.js → index-CFMWjuav.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-CEOAZm5j.js → index-CMj8qmpX.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-C67dPW0L.js → index-CVUJjQAT.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-D3pJBTvo.js → index-CWhI8G14.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-DtOTppk8.js → index-CZjNamSU.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-DRRY44XP.js → index-CmHE-lY_.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-Tg3yl8wc.js → index-CoA8WsVr.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-CXMeisJK.js → index-Cpg3AWRy.js} +1 -1
  118. package/src/assets/web-panel/assets/index-CrxUwNM8.js +1 -0
  119. package/src/assets/web-panel/assets/{index-Bq8-2Ibv.js → index-CsVuQsY1.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-BHp1nSur.js → index-CydHMjwc.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-CPYshcic.js → index-DH6iC5b2.js} +1 -1
  122. package/src/assets/web-panel/assets/{index-DBwBZwio.js → index-DZXhKAk9.js} +1 -1
  123. package/src/assets/web-panel/assets/{index-Didyuq2Z.js → index-D_g9mA1N.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-CdHMc9LQ.js → index-DboTeuPF.js} +1 -1
  125. package/src/assets/web-panel/assets/{index-C5dqieYX.js → index-DfgpKd64.js} +1 -1
  126. package/src/assets/web-panel/assets/{index-CdplnAS9.js → index-Dmfe0L2Z.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-KaSejHjf.js → index-Dzni_5Qw.js} +1 -1
  128. package/src/assets/web-panel/assets/{index-BpwGsAA-.js → index-J5JkStvY.js} +1 -1
  129. package/src/assets/web-panel/assets/{index-OBhlHSMN.js → index-Ne8UGllV.js} +3 -3
  130. package/src/assets/web-panel/assets/{index-CZICtYJ0.js → index-O09jXbir.js} +1 -1
  131. package/src/assets/web-panel/assets/{index-DVgTf7CZ.js → index-Y7el_3WS.js} +1 -1
  132. package/src/assets/web-panel/assets/{index-BQAsL19t.js → index-c_tBkIlU.js} +1 -1
  133. package/src/assets/web-panel/assets/{index-BMm8tO2X.js → index-lKJWAmd4.js} +1 -1
  134. package/src/assets/web-panel/assets/{index-CNytQuFq.js → index-xzRKTy0R.js} +1 -1
  135. package/src/assets/web-panel/assets/{initDefaultProps-P8SBN6Di.js → initDefaultProps-XuhfEIhB.js} +1 -1
  136. package/src/assets/web-panel/assets/{motion-BubbjUT_.js → motion-Cbxh6AxO.js} +1 -1
  137. package/src/assets/web-panel/assets/{move-Chcykv0I.js → move-C7IEnFly.js} +1 -1
  138. package/src/assets/web-panel/assets/{mtc-parser-DyiYuGDu.js → mtc-parser-lLADx4LL.js} +1 -1
  139. package/src/assets/web-panel/assets/{omit-Rdwb_Neb.js → omit-mIbic_k-.js} +1 -1
  140. package/src/assets/web-panel/assets/{pickAttrs-CCr0MYHl.js → pickAttrs-_xIYEqu3.js} +1 -1
  141. package/src/assets/web-panel/assets/{placementArrow-B1ZXz3bb.js → placementArrow-ClB-E0ny.js} +1 -1
  142. package/src/assets/web-panel/assets/{responsiveObserve-BGEdwej6.js → responsiveObserve-D36Bg2ut.js} +1 -1
  143. package/src/assets/web-panel/assets/{slide-CpnsUMaT.js → slide-CUuO08Bl.js} +1 -1
  144. package/src/assets/web-panel/assets/{statusUtils-C7x-TVp_.js → statusUtils-BKahwLbv.js} +1 -1
  145. package/src/assets/web-panel/assets/{styleChecker-CC5k_791.js → styleChecker-2pT-T8vy.js} +1 -1
  146. package/src/assets/web-panel/assets/{useFlexGapSupport-BpZFKsJW.js → useFlexGapSupport-DyH5g7Rg.js} +1 -1
  147. package/src/assets/web-panel/assets/{useFs-CVq5HySy.js → useFs-CTOauB3X.js} +1 -1
  148. package/src/assets/web-panel/assets/{usePersonalDataHub-BGkdLryu.js → usePersonalDataHub-B02JYIMe.js} +1 -1
  149. package/src/assets/web-panel/assets/{vnode-uLtOUEK-.js → vnode-Do22wQrc.js} +1 -1
  150. package/src/assets/web-panel/assets/{zoom-BfVC9iUs.js → zoom-BfnL7rit.js} +1 -1
  151. package/src/assets/web-panel/index.html +1 -1
  152. package/src/command-help-index.json +3 -3
  153. package/src/commands/agent.js +8 -0
  154. package/src/commands/background-session.js +31 -3
  155. package/src/commands/chat.js +5 -1
  156. package/src/commands/eval.js +86 -28
  157. package/src/commands/llm.js +104 -1
  158. package/src/commands/plugin.js +161 -1
  159. package/src/commands/sandbox.js +121 -2
  160. package/src/commands/serve.js +11 -2
  161. package/src/commands/skill.js +29 -0
  162. package/src/data/changelog.json +26 -0
  163. package/src/gateways/ws/session-protocol.js +13 -0
  164. package/src/gateways/ws/ws-agent-handler.js +17 -0
  165. package/src/gateways/ws/ws-server.js +3 -0
  166. package/src/gateways/ws/ws-session-state.js +131 -0
  167. package/src/generated/cc-agent-protocol.schema.json +48 -1
  168. package/src/lazy-dispatch.js +8 -1
  169. package/src/lib/agent-sandbox.js +337 -53
  170. package/src/lib/app-server/cli-agent-kernel-adapter.js +28 -0
  171. package/src/lib/app-server/server.js +93 -0
  172. package/src/lib/background-agent-keeper-client.js +2 -0
  173. package/src/lib/background-agent-keeper-protocol.js +7 -0
  174. package/src/lib/background-agent-list-index.js +222 -0
  175. package/src/lib/background-agent-supervisor.js +232 -47
  176. package/src/lib/codex-app-server-adapter.js +82 -27
  177. package/src/lib/context-memory-kernel/durable-memory-port.js +31 -8
  178. package/src/lib/context-memory-kernel/provider-context.js +118 -19
  179. package/src/lib/deferred-question-context.js +278 -0
  180. package/src/lib/eval/evidence.js +202 -64
  181. package/src/lib/eval/plugin-suite.js +1181 -0
  182. package/src/lib/eval/runner.js +10 -3
  183. package/src/lib/evolution/agent-evolution-runtime-composition.js +236 -1
  184. package/src/lib/evolution/agent-model-projection.js +97 -1
  185. package/src/lib/evolution/evidence-backed-wiki-maintainer.js +154 -1
  186. package/src/lib/evolution/evolution-artifact-ports.js +6 -0
  187. package/src/lib/evolution/evolution-deployment-loader.js +87 -3
  188. package/src/lib/evolution/evolution-eval-gate.js +8 -0
  189. package/src/lib/evolution/evolution-eval-runtime-composition.js +255 -0
  190. package/src/lib/evolution/evolution-evidence-artifact-adapter.js +58 -2
  191. package/src/lib/evolution/evolution-ledger-file-backend.js +23 -2
  192. package/src/lib/evolution/evolution-ledger-manifest-chain.js +223 -7
  193. package/src/lib/evolution/evolution-ledger-v2-journal.js +525 -0
  194. package/src/lib/evolution/evolution-ledger-v2-manifest-backend.js +46 -2
  195. package/src/lib/evolution/evolution-ledger.js +57 -1
  196. package/src/lib/evolution/evolution-run-ledger-adapter.js +93 -0
  197. package/src/lib/evolution/evolution-run-wiki-evidence-resolver.js +259 -0
  198. package/src/lib/evolution/governed-hub-llm.js +238 -5
  199. package/src/lib/evolution/governed-hub-resolver.js +82 -4
  200. package/src/lib/evolution/governed-hub-skill.js +11 -5
  201. package/src/lib/evolution/governed-skill-synthesis-provider-chat.js +10 -1
  202. package/src/lib/evolution/skill-runtime-revalidation-ledger-adapter.js +254 -0
  203. package/src/lib/evolution/skill-runtime-revalidation.js +530 -0
  204. package/src/lib/evolution/skill-target-matrix-eval.js +4 -4
  205. package/src/lib/evolution/wiki-evidence-commit-guard.js +366 -0
  206. package/src/lib/evolution/wiki-informed-skill-proposer.js +13 -1
  207. package/src/lib/goal-context.js +14 -5
  208. package/src/lib/interaction-adapter.js +166 -1
  209. package/src/lib/model-capabilities.js +271 -0
  210. package/src/lib/model-context-catalog.js +105 -0
  211. package/src/lib/model-context-window.js +4 -49
  212. package/src/lib/openai-responses.js +428 -0
  213. package/src/lib/plugin-runtime/scopes.js +7 -1
  214. package/src/lib/remote-read-loop-guard.js +2 -2
  215. package/src/lib/runtime-usage-ledger.js +16 -0
  216. package/src/lib/session-host-snapshot.js +16 -0
  217. package/src/lib/skill-loader.js +12 -0
  218. package/src/lib/with-file-lock.js +3 -1
  219. package/src/repl/agent-repl.js +5 -1
  220. package/src/runtime/agent-core.js +348 -23
  221. package/src/runtime/agent-runtime.js +7 -0
  222. package/src/runtime/coding-agent-contract-shared.cjs +13 -1
  223. package/src/runtime/headless-runner.js +4 -1
  224. package/src/runtime/headless-stream.js +283 -45
  225. package/src/runtime/runtime-factory.js +26 -2
  226. package/src/workers/background-agent-keeper.js +23 -13
  227. package/src/workers/background-agent-worker.js +27 -13
  228. package/src/assets/web-panel/assets/ChatBubbleRenderer-Bi2SY9E_.js +0 -1
  229. package/src/assets/web-panel/assets/PdhVaultBrowser-fYmQzmTA.js +0 -7
  230. package/src/assets/web-panel/assets/devWarning-BtFLt3qI.js +0 -1
  231. package/src/assets/web-panel/assets/index-BhuWQHeG.js +0 -1
  232. package/src/assets/web-panel/assets/index-D-4tFek3.js +0 -1
@@ -1,6 +1,6 @@
1
1
  /**
2
2
  * LLM management commands
3
- * chainlesschain llm models|test|providers|add-provider|switch
3
+ * chainlesschain llm models|test|capabilities|providers|add-provider|switch
4
4
  */
5
5
 
6
6
  import ora from "ora";
@@ -48,6 +48,7 @@ import {
48
48
  saveLlmConnection,
49
49
  } from "../lib/llm-connection-config.js";
50
50
  import { probeLlmConnection } from "../lib/llm-connection-probe.js";
51
+ import { resolveModelCapabilityProfile } from "../lib/model-capabilities.js";
51
52
 
52
53
  /**
53
54
  * Resolve the effective `cc llm test` target from CLI flags + persisted config.
@@ -111,9 +112,111 @@ export function resolveLlmTestTarget(
111
112
  };
112
113
  }
113
114
 
115
+ /** Resolve a static profile without reading credentials or provider key envs. */
116
+ export function resolveLlmCapabilities(
117
+ options = {},
118
+ config = {},
119
+ builtIns = BUILT_IN_PROVIDERS,
120
+ ) {
121
+ if (options.baseUrl !== undefined) {
122
+ try {
123
+ const endpoint = new URL(options.baseUrl);
124
+ if (!["http:", "https:"].includes(endpoint.protocol)) throw new Error();
125
+ } catch {
126
+ throw new TypeError("--base-url must be an absolute HTTP(S) URL");
127
+ }
128
+ }
129
+ const llm = config.llm || {};
130
+ const { provider, model, baseUrl } = resolveLlmTestTarget(
131
+ {
132
+ provider: options.provider,
133
+ model: options.model,
134
+ baseUrl: options.baseUrl,
135
+ },
136
+ {
137
+ llm: { provider: llm.provider, model: llm.model, baseUrl: llm.baseUrl },
138
+ },
139
+ builtIns,
140
+ {},
141
+ );
142
+ return resolveModelCapabilityProfile({
143
+ provider,
144
+ model,
145
+ baseUrl,
146
+ contextMemoryModelWindowTokens: options.contextWindow,
147
+ maxOutputTokens: options.maxOutputTokens,
148
+ });
149
+ }
150
+
151
+ export function formatLlmCapabilities(profile) {
152
+ const protocolNote =
153
+ profile.runtimeProtocol === "openai-responses"
154
+ ? "native Responses adapter selected from the static profile; runtime not verified"
155
+ : "transport selection is static; runtime not verified";
156
+ return [
157
+ "LLM capability profile (static; runtime not verified)",
158
+ `Provider: ${profile.provider}`,
159
+ `Model: ${profile.model}`,
160
+ `Context window: ${profile.contextWindowTokens} tokens (${profile.windowSource}; ${profile.windowAssumed ? "assumed/operator-declared, not runtime verified" : "static metadata, not runtime verified"})`,
161
+ `Runtime protocol: ${profile.runtimeProtocol}; ${protocolNote}`,
162
+ `Request output cap: ${profile.requestMaxOutputTokens ?? "not explicitly set"}`,
163
+ `Planned output reserve: ${profile.plannedOutputReserveTokens} tokens (${profile.outputReserveSource}); planning reserve is not an enforced request cap`,
164
+ `Advertised maximum output: ${profile.advertisedMaxOutputTokens ?? "unknown"}`,
165
+ "Fallback values are estimates, not a readiness or execution guarantee.",
166
+ ...profile.limitations.map((limitation) => `Note: ${limitation}`),
167
+ `Profile digest: ${profile.digest}`,
168
+ ].join("\n");
169
+ }
170
+
114
171
  export function registerLlmCommand(program) {
115
172
  const llm = program.command("llm").description("LLM provider management");
116
173
 
174
+ llm
175
+ .command("capabilities")
176
+ .description(
177
+ "Inspect a static model capability profile without network or runtime verification",
178
+ )
179
+ .option("--provider <provider>", "LLM provider (default: configured)")
180
+ .option("--model <model>", "Model (default: configured/provider)")
181
+ .option(
182
+ "--base-url <url>",
183
+ "API base URL for static profile selection only",
184
+ )
185
+ .option(
186
+ "--context-window <tokens>",
187
+ "Operator-declared context window, not runtime verified",
188
+ )
189
+ .option(
190
+ "--max-output-tokens <tokens>",
191
+ "Explicit request output cap for this diagnostic profile",
192
+ )
193
+ .option("--json", "Output the static capability profile as JSON")
194
+ .action((options) => {
195
+ let config;
196
+ try {
197
+ // Do not resolve OS secrets or create .corrupted backups on a read-only
198
+ // diagnostic. Also avoid echoing JSON parser errors containing secrets.
199
+ config = loadConfig({ resolveSecrets: false, failIfUnavailable: true });
200
+ } catch {
201
+ logger.error(
202
+ "Could not read LLM configuration; repair the configuration before inspecting capabilities.",
203
+ );
204
+ process.exitCode = 1;
205
+ return;
206
+ }
207
+ try {
208
+ const profile = resolveLlmCapabilities(options, config);
209
+ if (options.json) {
210
+ console.log(JSON.stringify(profile, null, 2));
211
+ } else {
212
+ logger.log(formatLlmCapabilities(profile));
213
+ }
214
+ } catch (error) {
215
+ logger.error(error.message);
216
+ process.exitCode = 1;
217
+ }
218
+ });
219
+
117
220
  llm
118
221
  .command("configure")
119
222
  .description(
@@ -1,10 +1,11 @@
1
1
  /**
2
2
  * Plugin management commands
3
- * chainlesschain plugin list|install|remove|enable|disable|update|info|search|registry|summary
3
+ * chainlesschain plugin list|install|remove|enable|disable|update|info|search|registry|summary|eval
4
4
  */
5
5
 
6
6
  import chalk from "chalk";
7
7
  import fs from "node:fs";
8
+ import path from "node:path";
8
9
  import { logger } from "../lib/logger.js";
9
10
  import {
10
11
  enforcePluginPolicy,
@@ -1435,6 +1436,165 @@ export function registerPluginCommand(program) {
1435
1436
  // component it contributes (skills/agents/hooks/mcp/lsp/monitors/bin/settings),
1436
1437
  // plus path-traversal / schema problems. Optional signature/hash verification
1437
1438
  // reuses the real crypto in plugin-security. No DB, no install — pure inspection.
1439
+ plugin
1440
+ .command("eval <dir>")
1441
+ .description(
1442
+ "Run a local control/candidate effectiveness eval for a plugin",
1443
+ )
1444
+ .option(
1445
+ "--suite <file>",
1446
+ "Suite JSON inside the plugin root (default: evals/suite.json)",
1447
+ )
1448
+ .option(
1449
+ "--holdout <file>",
1450
+ "Reviewer-owned holdout suite outside the plugin payload",
1451
+ )
1452
+ .option("--provider <provider>", "Fixed provider for both eval arms")
1453
+ .option("--model <model>", "Fixed model for both eval arms")
1454
+ .option(
1455
+ "--min-pass-rate-delta <pct>",
1456
+ "Override the suite's minimum candidate gain in percentage points",
1457
+ )
1458
+ .option(
1459
+ "--samples <n>",
1460
+ "Run each control/candidate task 1-20 times (default: suite or 1)",
1461
+ )
1462
+ .option(
1463
+ "--arm-order <order>",
1464
+ "balanced, control-first, or candidate-first (default: balanced)",
1465
+ )
1466
+ .option("--json", "Output the bound report as JSON")
1467
+ .option("--html <file>", "Write a local HTML report")
1468
+ .option("--keep", "Keep per-task temporary workspaces")
1469
+ .option(
1470
+ "--dry-run",
1471
+ "Validate and exercise both arms without a model (never passes the evidence gate)",
1472
+ )
1473
+ .action(async (dir, options) => {
1474
+ try {
1475
+ if (!options.dryRun && (!options.provider || !options.model)) {
1476
+ throw new Error(
1477
+ "plugin eval requires explicit --provider and --model for comparable real runs",
1478
+ );
1479
+ }
1480
+ let minPassRateDelta;
1481
+ if (options.minPassRateDelta !== undefined) {
1482
+ const percentage = Number(options.minPassRateDelta);
1483
+ if (
1484
+ !Number.isFinite(percentage) ||
1485
+ percentage < -100 ||
1486
+ percentage > 100
1487
+ ) {
1488
+ throw new Error(
1489
+ "--min-pass-rate-delta must be between -100 and 100",
1490
+ );
1491
+ }
1492
+ minPassRateDelta = percentage / 100;
1493
+ }
1494
+ let sampleRuns;
1495
+ if (options.samples !== undefined) {
1496
+ sampleRuns = Number(options.samples);
1497
+ if (
1498
+ !Number.isSafeInteger(sampleRuns) ||
1499
+ sampleRuns < 1 ||
1500
+ sampleRuns > 20
1501
+ ) {
1502
+ throw new Error("--samples must be an integer between 1 and 20");
1503
+ }
1504
+ }
1505
+ const {
1506
+ attachPluginEvalHoldout,
1507
+ loadPluginEvalDefinition,
1508
+ renderPluginEvalHtml,
1509
+ runPluginEval,
1510
+ } = await import("../lib/eval/plugin-suite.js");
1511
+ const { makeHeadlessRunAgent } = await import("./eval.js");
1512
+ const definition = attachPluginEvalHoldout(
1513
+ loadPluginEvalDefinition(dir, {
1514
+ suiteFile: options.suite,
1515
+ }),
1516
+ options.holdout,
1517
+ );
1518
+ const dryRunAgent = async () => ({
1519
+ ok: true,
1520
+ output: `${JSON.stringify({
1521
+ type: "result",
1522
+ subtype: "success",
1523
+ is_error: false,
1524
+ result: "(dry-run: no agent)",
1525
+ tool_calls: [],
1526
+ usage: {},
1527
+ total_cost_usd: 0,
1528
+ num_turns: 0,
1529
+ })}\n`,
1530
+ });
1531
+ const shared = {
1532
+ provider: options.provider,
1533
+ model: options.model,
1534
+ ephemeral: true,
1535
+ };
1536
+ const controlRunAgent = options.dryRun
1537
+ ? dryRunAgent
1538
+ : makeHeadlessRunAgent({
1539
+ ...shared,
1540
+ env: { CC_PLUGINS: "0", CC_PLUGIN_SCOPES: "" },
1541
+ });
1542
+ const candidateRunAgent = options.dryRun
1543
+ ? dryRunAgent
1544
+ : makeHeadlessRunAgent({
1545
+ ...shared,
1546
+ env: { CC_PLUGINS: "1", CC_PLUGIN_SCOPES: "project" },
1547
+ });
1548
+ const report = await runPluginEval(definition, {
1549
+ controlRunAgent,
1550
+ candidateRunAgent,
1551
+ provider: options.provider || null,
1552
+ model: options.model || null,
1553
+ dryRun: options.dryRun === true,
1554
+ keepWorkspaces: options.keep === true,
1555
+ ...(minPassRateDelta === undefined ? {} : { minPassRateDelta }),
1556
+ ...(sampleRuns === undefined ? {} : { sampleRuns }),
1557
+ ...(options.armOrder === undefined
1558
+ ? {}
1559
+ : { armOrder: options.armOrder }),
1560
+ onResult: options.json
1561
+ ? undefined
1562
+ : ({ arm, sample, result }) =>
1563
+ logger.info(
1564
+ ` ${arm.padEnd(9)} #${sample} ${result.pass ? "✔" : "✗"} ${result.id} (${result.ms}ms)`,
1565
+ ),
1566
+ });
1567
+ if (options.html) {
1568
+ fs.writeFileSync(
1569
+ path.resolve(options.html),
1570
+ renderPluginEvalHtml(report),
1571
+ "utf8",
1572
+ );
1573
+ }
1574
+ if (options.json) {
1575
+ console.log(JSON.stringify(report, null, 2));
1576
+ } else {
1577
+ logger.log(
1578
+ `\nPlugin eval: ${report.status} (${report.comparison.outcome}, delta ${(report.comparison.passRateDelta * 100).toFixed(1)} points)`,
1579
+ );
1580
+ logger.log(
1581
+ ` Control: ${report.arms.control.effectivePassed}/${report.arms.control.total}; Candidate: ${report.arms.candidate.effectivePassed}/${report.arms.candidate.total}`,
1582
+ );
1583
+ logger.log(` Payload: ${report.plugin.payloadDigest}`);
1584
+ logger.log(` Suite: ${report.suite.digest}`);
1585
+ if (report.reasons.length) {
1586
+ logger.warn(` Reasons: ${report.reasons.join(", ")}`);
1587
+ }
1588
+ if (options.html)
1589
+ logger.info(` HTML: ${path.resolve(options.html)}`);
1590
+ }
1591
+ if (!report.passed) process.exitCode = 1;
1592
+ } catch (error) {
1593
+ logger.error(`Plugin eval failed: ${error.message}`);
1594
+ process.exitCode = 1;
1595
+ }
1596
+ });
1597
+
1438
1598
  plugin
1439
1599
  .command("validate <dir>")
1440
1600
  .description("Validate a plugin manifest and list its components")
@@ -4,10 +4,15 @@
4
4
  */
5
5
 
6
6
  import chalk from "chalk";
7
- import { intArg, floatArg } from "../lib/cli-arg.js";
7
+ import { intArg } from "../lib/cli-arg.js";
8
8
  import ora from "ora";
9
9
  import { logger } from "../lib/logger.js";
10
10
  import { bootstrap, shutdown } from "../runtime/bootstrap.js";
11
+ import {
12
+ assessAgentSandboxCapabilities,
13
+ normalizeAgentSandboxMode,
14
+ probeSandboxAvailability,
15
+ } from "../lib/agent-sandbox.js";
11
16
  import {
12
17
  createSandbox,
13
18
  acquireSandbox,
@@ -38,11 +43,125 @@ import {
38
43
  getSandboxStatsV2,
39
44
  } from "../lib/sandbox-v2.js";
40
45
 
41
- export function registerSandboxCommand(program) {
46
+ function csvList(value) {
47
+ return String(value || "")
48
+ .split(",")
49
+ .map((entry) => entry.trim())
50
+ .filter(Boolean);
51
+ }
52
+
53
+ function printCapabilityEntries(label, entries) {
54
+ logger.log(`${chalk.bold(label)} (${entries.length})`);
55
+ if (entries.length === 0) {
56
+ logger.log(" none");
57
+ return;
58
+ }
59
+ for (const entry of entries) {
60
+ const suffix = entry.message
61
+ ? ` — ${entry.message}`
62
+ : entry.enforcement
63
+ ? ` — ${entry.enforcement}`
64
+ : entry.entries
65
+ ? ` — ${entry.entries} rule(s)`
66
+ : "";
67
+ logger.log(` ${entry.id}${suffix}`);
68
+ }
69
+ }
70
+
71
+ export function registerSandboxCommand(program, dependencies = {}) {
42
72
  const sandbox = program
43
73
  .command("sandbox")
44
74
  .description("Security sandbox v2 — isolated agent execution environments");
45
75
 
76
+ // sandbox capabilities — read-only agent-shell backend preflight
77
+ sandbox
78
+ .command("capabilities")
79
+ .description(
80
+ "Report requested, enforceable, applied, and unsupported agent-shell sandbox capabilities",
81
+ )
82
+ .option(
83
+ "--engine <engine>",
84
+ "Agent shell backend (docker|bubblewrap)",
85
+ "docker",
86
+ )
87
+ .option(
88
+ "--mode <mode>",
89
+ "Agent sandbox posture (off|workspace-write|strict)",
90
+ "workspace-write",
91
+ )
92
+ .option("--network", "Request unrestricted network access")
93
+ .option("--allow-read <paths>", "Comma-separated additional read paths")
94
+ .option("--deny-read <paths>", "Comma-separated denied read paths")
95
+ .option("--allow-write <paths>", "Comma-separated additional write paths")
96
+ .option("--deny-write <paths>", "Comma-separated denied write paths")
97
+ .option("--allowed-domains <domains>", "Comma-separated allowed domains")
98
+ .option("--denied-domains <domains>", "Comma-separated denied domains")
99
+ .option("--no-probe", "Do not probe backend availability")
100
+ .option("--json", "Output the versioned report as JSON")
101
+ .action((options) => {
102
+ try {
103
+ const sandboxConfig = normalizeAgentSandboxMode(
104
+ options.mode,
105
+ options.mode === "off" ? false : true,
106
+ {
107
+ cwd: process.cwd(),
108
+ network: options.network === true,
109
+ settings: {
110
+ engine: options.engine,
111
+ filesystem: {
112
+ allowRead: csvList(options.allowRead),
113
+ denyRead: csvList(options.denyRead),
114
+ allowWrite: csvList(options.allowWrite),
115
+ denyWrite: csvList(options.denyWrite),
116
+ },
117
+ network: {
118
+ allowedDomains: csvList(options.allowedDomains),
119
+ deniedDomains: csvList(options.deniedDomains),
120
+ },
121
+ },
122
+ },
123
+ );
124
+ const availability =
125
+ sandboxConfig && options.probe !== false
126
+ ? (
127
+ dependencies.probeSandboxAvailability ||
128
+ probeSandboxAvailability
129
+ )(sandboxConfig)
130
+ : null;
131
+ const report = assessAgentSandboxCapabilities(sandboxConfig, {
132
+ availability,
133
+ host: dependencies.host,
134
+ });
135
+
136
+ if (options.json) {
137
+ console.log(JSON.stringify(report, null, 2));
138
+ } else {
139
+ logger.log(chalk.bold("Agent Shell Sandbox Capabilities"));
140
+ logger.log(
141
+ ` Host: ${report.host.platform} ${report.host.release} (${report.host.arch})`,
142
+ );
143
+ logger.log(
144
+ ` Backend: ${report.backend.engine || "none"} (${report.backend.availabilityChecked ? (report.backend.available ? "available" : "unavailable") : "not probed"})`,
145
+ );
146
+ logger.log(` Status: ${report.status}`);
147
+ logger.log(
148
+ ` Execution observed: ${report.execution.observed ? "yes" : "no"}`,
149
+ );
150
+ printCapabilityEntries("Requested", report.requested);
151
+ printCapabilityEntries("Enforceable", report.enforceable);
152
+ printCapabilityEntries("Applied", report.applied);
153
+ printCapabilityEntries("Unsupported", report.unsupported);
154
+ }
155
+
156
+ if (["unsupported", "unavailable"].includes(report.status)) {
157
+ process.exitCode = 2;
158
+ }
159
+ } catch (error) {
160
+ logger.error(`Failed: ${error.message}`);
161
+ process.exitCode = 2;
162
+ }
163
+ });
164
+
46
165
  // sandbox create <agent-id>
47
166
  sandbox
48
167
  .command("create")
@@ -5,6 +5,7 @@
5
5
 
6
6
  import { logger } from "../lib/logger.js";
7
7
  import { createAgentRuntimeFactory } from "../runtime/runtime-factory.js";
8
+ import { captureSkillRuntimeDependencies } from "../lib/evolution/skill-runtime-revalidation.js";
8
9
  import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
9
10
  import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
10
11
  import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
@@ -184,7 +185,11 @@ export function registerServeCommand(program, dependencies = {}) {
184
185
  tlsKeyPath: opts.appServerTlsKey,
185
186
  maxConnections: parseInt(opts.maxConnections, 10),
186
187
  store,
187
- kernelFactory: () => new CliAgentKernelAdapter({ cwd }),
188
+ kernelFactory: () =>
189
+ new CliAgentKernelAdapter({
190
+ cwd,
191
+ sessionOptions: captureSkillRuntimeDependencies(dependencies),
192
+ }),
188
193
  evolutionCompositionFactory,
189
194
  skillOutcomeIndex,
190
195
  skillVectorAuthority,
@@ -218,7 +223,10 @@ export function registerServeCommand(program, dependencies = {}) {
218
223
  try {
219
224
  await runStdioAppServer({
220
225
  store,
221
- kernel: new CliAgentKernelAdapter({ cwd }),
226
+ kernel: new CliAgentKernelAdapter({
227
+ cwd,
228
+ sessionOptions: captureSkillRuntimeDependencies(dependencies),
229
+ }),
222
230
  evolutionCompositionFactory,
223
231
  skillOutcomeIndex,
224
232
  skillVectorAuthority,
@@ -232,6 +240,7 @@ export function registerServeCommand(program, dependencies = {}) {
232
240
  return;
233
241
  }
234
242
  const runtime = createAgentRuntimeFactory({
243
+ ...captureSkillRuntimeDependencies(dependencies),
235
244
  deps:
236
245
  evolutionCompositionFactory === null
237
246
  ? {}
@@ -61,6 +61,10 @@ import { CLI_PACK_DOMAINS } from "../lib/skill-packs/schema.js";
61
61
  import { registerRecordReplayCommands } from "./record-replay.js";
62
62
  import { routeSkillDescriptors } from "../lib/skill-retrieval-router.js";
63
63
  import { resolveSkillOutcomeAuthority } from "../lib/skill-outcome-authority.js";
64
+ import {
65
+ assertSkillRuntimeAdmission,
66
+ captureSkillRuntimeDependencies,
67
+ } from "../lib/evolution/skill-runtime-revalidation.js";
64
68
  import {
65
69
  captureSkillVectorAuthority,
66
70
  unavailableSkillVectorEvidence,
@@ -277,6 +281,8 @@ export async function runControlledSkill(options = {}) {
277
281
  loader,
278
282
  executeTool = null,
279
283
  llmOptions = null,
284
+ skillRuntimeAdmission = null,
285
+ skillRuntimeAdmissionRequired = false,
280
286
  signal = null,
281
287
  } = options;
282
288
  throwIfAborted(signal, "Skill command interrupted before discovery");
@@ -299,8 +305,24 @@ export async function runControlledSkill(options = {}) {
299
305
  }
300
306
  const executionLease = loader.acquireSkillExecution?.(skill, { signal });
301
307
  const executionSignal = executionLease?.signal || signal;
308
+ const selectedSkillName = skill.id || skill.dirName;
309
+ const runtimeAdmissionContext = {
310
+ llmOptions,
311
+ effectiveAllowedToolNames: ["read_file", "search_files", "list_dir"],
312
+ };
313
+ const assertRuntime = () =>
314
+ assertSkillRuntimeAdmission({
315
+ skill,
316
+ loader,
317
+ admission: skillRuntimeAdmission,
318
+ required: skillRuntimeAdmissionRequired,
319
+ expectedSkillName: selectedSkillName,
320
+ context: runtimeAdmissionContext,
321
+ });
302
322
  try {
323
+ assertRuntime();
303
324
  const executionContext = {
325
+ ...runtimeAdmissionContext,
304
326
  loadedBecause: "run_skill",
305
327
  bodyIncluded: false,
306
328
  signal: executionSignal,
@@ -315,6 +337,7 @@ export async function runControlledSkill(options = {}) {
315
337
  skill = loader.materializeSkill(skill, executionContext);
316
338
  }
317
339
  executionLease?.assertActive?.();
340
+ assertRuntime();
318
341
  if (skill.isolation !== true) {
319
342
  return {
320
343
  error:
@@ -343,6 +366,8 @@ export async function runControlledSkill(options = {}) {
343
366
  {
344
367
  cwd,
345
368
  skillLoader: loader,
369
+ skillRuntimeAdmission,
370
+ skillRuntimeAdmissionRequired,
346
371
  ...(executionSignal ? { signal: executionSignal } : {}),
347
372
  ...(llmOptions ? { llmOptions: { ...llmOptions } } : {}),
348
373
  },
@@ -369,6 +394,8 @@ export async function runControlledSkill(options = {}) {
369
394
  }
370
395
 
371
396
  export function registerSkillCommand(program, dependencies = {}) {
397
+ const runtimeAdmissionDependencies =
398
+ captureSkillRuntimeDependencies(dependencies);
372
399
  const skillVectorAuthority =
373
400
  dependencies.skillVectorAuthority == null
374
401
  ? null
@@ -641,6 +668,7 @@ export function registerSkillCommand(program, dependencies = {}) {
641
668
  .option("-y, --yes", "Authorize the current isolated skill digest")
642
669
  .action(async (name, inputParts, options) => {
643
670
  const runLoader = new CLISkillLoader({
671
+ ...runtimeAdmissionDependencies,
644
672
  reauthorizeSkill: createCliSkillReauthorizer({
645
673
  assumeYes: options.yes === true,
646
674
  }),
@@ -654,6 +682,7 @@ export function registerSkillCommand(program, dependencies = {}) {
654
682
  cwd: process.cwd(),
655
683
  loader: runLoader,
656
684
  llmOptions,
685
+ ...runtimeAdmissionDependencies,
657
686
  });
658
687
  } catch (error) {
659
688
  result = {
@@ -1,6 +1,32 @@
1
1
  {
2
2
  "source": "CHANGELOG.md",
3
3
  "releases": [
4
+ {
5
+ "productVersion": null,
6
+ "cliVersion": "0.166.48",
7
+ "cliVersions": ["0.166.48"],
8
+ "date": null,
9
+ "title": "",
10
+ "sections": [
11
+ {
12
+ "heading": "Added - cc CLI 0.166.48: make evaluation, recovery, and governed recall durable",
13
+ "body": "- Add repeated balanced sampling, confidence intervals, and reviewer-owned\n holdout suites to `cc plugin eval` through `--samples`, `--arm-order`, and\n `--holdout`.\n- Persist standalone Headless deferred questions across process restarts, with\n binding checks and one-time answer consumption.\n- Add a file-identity-bound read-only index for paged background Agent status\n queries, with authoritative full-scan fallback on cache misses or races.\n- Add host-supplied, revision/digest-bound semantic recall candidates while\n preserving canonical lifecycle, scope, expiry, and sink enforcement.\n- Publish Context Memory Kernel `0.1.3` before the CLI so public installs\n resolve the new governed semantic-recall contract."
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "productVersion": null,
19
+ "cliVersion": "0.166.47",
20
+ "cliVersions": ["0.166.47"],
21
+ "date": null,
22
+ "title": "",
23
+ "sections": [
24
+ {
25
+ "heading": "Added - cc CLI 0.166.47: govern Evolution runtime and scale background sessions",
26
+ "body": "- Add the durable Evolution ledger v2, evidence-bound Wiki maintenance, and\n runtime revalidation so governed learning and deployment decisions retain\n verifiable state across restarts.\n- Add native OpenAI Responses transport together with versioned model\n capability profiles, explicit model-egress inventory, and bounded runtime\n capability reporting.\n- Add bound plugin-evaluation and deferred-question flows for Agent sessions,\n while keeping deployment and evidence admission fail-closed.\n- Paginate `cc background session list` so installations with large background\n session histories can navigate results without loading the entire list."
27
+ }
28
+ ]
29
+ },
4
30
  {
5
31
  "productVersion": null,
6
32
  "cliVersion": "0.166.46",
@@ -535,9 +535,21 @@ async function ensureSessionHandler(
535
535
  const { WebSocketInteractionAdapter } =
536
536
  await import("../../lib/interaction-adapter.js");
537
537
  const enablePhase5Envelopes = await _isPhase5EnvelopesEnabled();
538
+ const stateSnapshot =
539
+ typeof server.sessionManager.getSessionStateSnapshot === "function"
540
+ ? server.sessionManager.getSessionStateSnapshot(session.id)
541
+ : null;
538
542
  session.interaction = new WebSocketInteractionAdapter(ws, session.id, {
539
543
  enablePhase5Envelopes,
540
544
  envelopeBus: server.envelopeBus || null,
545
+ deferredState: stateSnapshot,
546
+ onDeferredQuestionChange: ({ type, payload }) => {
547
+ server.sessionManager?.recordSessionStateEvent?.(
548
+ session.id,
549
+ type,
550
+ payload,
551
+ );
552
+ },
541
553
  onPendingApprovalChange: ({ type, payload }) => {
542
554
  if (
543
555
  server.sessionManager &&
@@ -651,6 +663,7 @@ async function ensureSessionHandler(
651
663
  evolutionCompositionFactory: server.evolutionCompositionFactory,
652
664
  skillOutcomeIndex: server.skillOutcomeIndex,
653
665
  skillVectorAuthority: server.skillVectorAuthority,
666
+ ...server.runtimeAdmissionDependencies,
654
667
  });
655
668
  sessionHostLease = null;
656
669
  sessionBudgetRoot = null;