chainlesschain 0.166.44 → 0.166.46

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 (195) hide show
  1. package/package.json +3 -3
  2. package/src/assets/web-panel/.build-hash +1 -1
  3. package/src/assets/web-panel/assets/{AIOps-HiHMDVK3.js → AIOps-Cp8KiMmv.js} +1 -1
  4. package/src/assets/web-panel/assets/{ActionButton-H2RKuS8V.js → ActionButton-B4d9BGsm.js} +1 -1
  5. package/src/assets/web-panel/assets/{Analytics-CBPFBB61.js → Analytics-Cf9yXTkv.js} +3 -3
  6. package/src/assets/web-panel/assets/{AppLayout-Da-3Laze.js → AppLayout-40UkmxtP.js} +4 -4
  7. package/src/assets/web-panel/assets/{Artifacts-DiRQ9yzD.js → Artifacts-Ckkb4oOA.js} +1 -1
  8. package/src/assets/web-panel/assets/{Audit-C9LtWEBh.js → Audit-Dnf569k5.js} +1 -1
  9. package/src/assets/web-panel/assets/{BackgroundAgents-4rpi7fVg.js → BackgroundAgents-CA6bLem4.js} +1 -1
  10. package/src/assets/web-panel/assets/{Backup-B8VQmHys.js → Backup-ChQU0I_Q.js} +1 -1
  11. package/src/assets/web-panel/assets/{BaseInput-iCVpF2DK.js → BaseInput-BHeZXnNN.js} +1 -1
  12. package/src/assets/web-panel/assets/{Chat-BrQaXBwC.js → Chat-DcFVYB2E.js} +5 -5
  13. package/src/assets/web-panel/assets/{ChatBubbleRenderer-HIyU-9c0.js → ChatBubbleRenderer-Bi2SY9E_.js} +1 -1
  14. package/src/assets/web-panel/assets/{Checkbox-CsV__0_R.js → Checkbox-2PDbejv2.js} +1 -1
  15. package/src/assets/web-panel/assets/{Codegen-BvFeCIAE.js → Codegen-DJBn1RAu.js} +1 -1
  16. package/src/assets/web-panel/assets/{Col-CagxV1O8.js → Col-CPRq7n6y.js} +1 -1
  17. package/src/assets/web-panel/assets/{Community-DAWr4ahG.js → Community-axvINFMi.js} +1 -1
  18. package/src/assets/web-panel/assets/{Compact-Ba49Tdc2.js → Compact-_OX4Qbe0.js} +1 -1
  19. package/src/assets/web-panel/assets/{Compliance-Brk-MSO4.js → Compliance-DWAkvzRL.js} +1 -1
  20. package/src/assets/web-panel/assets/{Cowork-DeKH1v0o.js → Cowork-CUIJ25oj.js} +2 -2
  21. package/src/assets/web-panel/assets/{Cron-AHB-T-VL.js → Cron-nR0m7H3_.js} +2 -2
  22. package/src/assets/web-panel/assets/{Crosschain-Zbcrtimh.js → Crosschain-CgTLXzh_.js} +1 -1
  23. package/src/assets/web-panel/assets/{DID-ByFa1MWG.js → DID-BllzRB6Q.js} +2 -2
  24. package/src/assets/web-panel/assets/{Dashboard-9jKovyuH.js → Dashboard-C9f0IIBN.js} +2 -2
  25. package/src/assets/web-panel/assets/{Dropdown-DY8TaXi5.js → Dropdown-BkahetiO.js} +1 -1
  26. package/src/assets/web-panel/assets/EmailListRenderer-rartVC-k.js +1 -0
  27. package/src/assets/web-panel/assets/EvolutionSettings-BqpG3XHV.js +1 -0
  28. package/src/assets/web-panel/assets/{FamilyGuardDashboard-5ao8smvA.js → FamilyGuardDashboard-DgUdFvw1.js} +1 -1
  29. package/src/assets/web-panel/assets/{Federation-RTpNXXHT.js → Federation-oFpIQU6g.js} +1 -1
  30. package/src/assets/web-panel/assets/{FormItemContext-DWZvRMWv.js → FormItemContext-BUH5xlyP.js} +1 -1
  31. package/src/assets/web-panel/assets/{GenericCardRenderer-CWi8SGvx.js → GenericCardRenderer-ilRa-ueg.js} +1 -1
  32. package/src/assets/web-panel/assets/{Git-CCLgDIqs.js → Git-DlHHSF8j.js} +2 -2
  33. package/src/assets/web-panel/assets/{Governance-DUuyKrQl.js → Governance-yQiiXIWe.js} +1 -1
  34. package/src/assets/web-panel/assets/{Inference-RkFcM2A0.js → Inference-BUDRVGOP.js} +1 -1
  35. package/src/assets/web-panel/assets/{KnowledgeGraph-C-QTauZr.js → KnowledgeGraph-BaGyIoN1.js} +1 -1
  36. package/src/assets/web-panel/assets/Logs-C1cO6zE0.js +2 -0
  37. package/src/assets/web-panel/assets/{MarkdownRenderer-CgiHBe0A.js → MarkdownRenderer-_z_Iaoes.js} +1 -1
  38. package/src/assets/web-panel/assets/{Marketplace-CK1kSFDt.js → Marketplace-CM8cGL0K.js} +1 -1
  39. package/src/assets/web-panel/assets/{McpTools-BcaVwoY6.js → McpTools-CDqAMU0U.js} +3 -3
  40. package/src/assets/web-panel/assets/{Memory-QEI4xRwF.js → Memory-CfB0-Ofv.js} +2 -2
  41. package/src/assets/web-panel/assets/{MobileBridge-BqD-R0Ek.js → MobileBridge-BL18ytvB.js} +1 -1
  42. package/src/assets/web-panel/assets/{MobileProjects-CwFoXf1M.js → MobileProjects-PIyyxbuJ.js} +1 -1
  43. package/src/assets/web-panel/assets/{Mtc-CTZ6qICG.js → Mtc-BTTrFCol.js} +4 -4
  44. package/src/assets/web-panel/assets/{MtcAudit-Cn7y2BzO.js → MtcAudit-JHZn037c.js} +4 -4
  45. package/src/assets/web-panel/assets/{Multisig-BCjsdGiN.js → Multisig-CMf9NEdB.js} +3 -3
  46. package/src/assets/web-panel/assets/{NLProgramming-CupTVNtA.js → NLProgramming-Dhk3qaus.js} +1 -1
  47. package/src/assets/web-panel/assets/{Notes-C8kO3mGt.js → Notes-6F8EarNN.js} +3 -3
  48. package/src/assets/web-panel/assets/{NotificationSettings-Cn-MJ8sQ.js → NotificationSettings-gxdaVEit.js} +1 -1
  49. package/src/assets/web-panel/assets/{OrderTableRenderer-BX4PrVfN.js → OrderTableRenderer-gVgXQWdc.js} +1 -1
  50. package/src/assets/web-panel/assets/{Organization-G_RjOL7M.js → Organization-CzvHcDNO.js} +4 -4
  51. package/src/assets/web-panel/assets/{Overflow-BvX644ya.js → Overflow-Dclx30Vv.js} +1 -1
  52. package/src/assets/web-panel/assets/{P2P-yWmLgYgQ.js → P2P-CM0Wm9vZ.js} +2 -2
  53. package/src/assets/web-panel/assets/PdhVaultBrowser-fYmQzmTA.js +7 -0
  54. package/src/assets/web-panel/assets/{Permissions-DtU8fhcZ.js → Permissions-B_oATenG.js} +4 -4
  55. package/src/assets/web-panel/assets/{PersonalDataHub-B17Vyk-x.js → PersonalDataHub-CptiVBh5.js} +5 -5
  56. package/src/assets/web-panel/assets/{Pipeline-BZUsTyhP.js → Pipeline-DkHzgyyI.js} +1 -1
  57. package/src/assets/web-panel/assets/{Privacy-BswdhlPL.js → Privacy-DzZvwcKh.js} +1 -1
  58. package/src/assets/web-panel/assets/{ProjectInit-sJxSlY0C.js → ProjectInit-CzkCs-5G.js} +2 -2
  59. package/src/assets/web-panel/assets/{ProjectSettings-BnbpdOke.js → ProjectSettings-BB8dcxRD.js} +2 -2
  60. package/src/assets/web-panel/assets/{Projects-DUjauf-6.js → Projects-B7PW9CFY.js} +1 -1
  61. package/src/assets/web-panel/assets/{Providers-DhF5I-UR.js → Providers-Tfx-ti1V.js} +1 -1
  62. package/src/assets/web-panel/assets/{QrScannerModal-B3PeCAGo.js → QrScannerModal-EvWlNhfX.js} +1 -1
  63. package/src/assets/web-panel/assets/{QuickAsk-Cpaxrabg.js → QuickAsk-CUspgbNC.js} +1 -1
  64. package/src/assets/web-panel/assets/{Recommend-DqXFF66-.js → Recommend-COY2g77J.js} +1 -1
  65. package/src/assets/web-panel/assets/{RemoteSession-DtDQ76Ox.js → RemoteSession-BzMBU6E6.js} +2 -2
  66. package/src/assets/web-panel/assets/{Reputation-BgLLKwu2.js → Reputation-RtYRF4YP.js} +1 -1
  67. package/src/assets/web-panel/assets/{Row-BuMLhd8M.js → Row-Bva3l9Lc.js} +1 -1
  68. package/src/assets/web-panel/assets/{RssFeed-BizxUzBA.js → RssFeed-BhjzLvW3.js} +2 -2
  69. package/src/assets/web-panel/assets/{Search-CYNrJAQY.js → Search-BYzT2PTR.js} +1 -1
  70. package/src/assets/web-panel/assets/{Security-CIC02soH.js → Security-Bcl4-KTv.js} +4 -4
  71. package/src/assets/web-panel/assets/{Services-DD3WxXxw.js → Services-BRRa4A0f.js} +2 -2
  72. package/src/assets/web-panel/assets/{Skeleton-C-d9Mbos.js → Skeleton-DYQ016qy.js} +1 -1
  73. package/src/assets/web-panel/assets/Skills-CAUKL9JA.js +1 -0
  74. package/src/assets/web-panel/assets/{Sla-DgrqUhns.js → Sla-BTyUqfuD.js} +1 -1
  75. package/src/assets/web-panel/assets/{SpeechSettings-CDXFwOHX.js → SpeechSettings-CUjMihrs.js} +1 -1
  76. package/src/assets/web-panel/assets/{SyncSettings-BBio_v8M.js → SyncSettings-CvfOSupr.js} +2 -2
  77. package/src/assets/web-panel/assets/Tasks-EvjNXrWH.js +1 -0
  78. package/src/assets/web-panel/assets/{Templates-RAPdM85o.js → Templates-wPAp0EoM.js} +1 -1
  79. package/src/assets/web-panel/assets/{Tenant-2jI745PC.js → Tenant-CP0D-q9Q.js} +1 -1
  80. package/src/assets/web-panel/assets/{Terminal-ZCtYBMAe.js → Terminal-CQ0f2iFg.js} +2 -2
  81. package/src/assets/web-panel/assets/{TimelineRenderer-DfI36Yg6.js → TimelineRenderer-D3JrGSPb.js} +1 -1
  82. package/src/assets/web-panel/assets/{Tokens-NQ1VaO0W.js → Tokens-yXf2PPp9.js} +1 -1
  83. package/src/assets/web-panel/assets/{Trigger-DwFh5AMe.js → Trigger-DfmMOoZ2.js} +1 -1
  84. package/src/assets/web-panel/assets/{Trust-Dr0v45uH.js → Trust-BTCyMgf1.js} +1 -1
  85. package/src/assets/web-panel/assets/{UkeySign-i7Q1Bdqr.js → UkeySign-DKCwIBHi.js} +1 -1
  86. package/src/assets/web-panel/assets/{VideoEditing-CXSkk4gl.js → VideoEditing-CQpDSzLO.js} +1 -1
  87. package/src/assets/web-panel/assets/{Wallet-8_cAjou4.js → Wallet-CyFrzC3K.js} +4 -4
  88. package/src/assets/web-panel/assets/{WebAuthn-jn_3Gma7.js → WebAuthn-D6Nr_1kd.js} +4 -4
  89. package/src/assets/web-panel/assets/{WorkflowEditor-BmvodVLl.js → WorkflowEditor-CgR9tNrB.js} +1 -1
  90. package/src/assets/web-panel/assets/{chat-DGi3bmwL.js → chat-CRG_IeyP.js} +1 -1
  91. package/src/assets/web-panel/assets/{colors-D8OSTOU0.js → colors-MdE3TStI.js} +1 -1
  92. package/src/assets/web-panel/assets/{compact-item-DfNygJU_.js → compact-item-B0LRuiNV.js} +1 -1
  93. package/src/assets/web-panel/assets/{createContext-B0lT0dbj.js → createContext-B_V5fjcX.js} +1 -1
  94. package/src/assets/web-panel/assets/devWarning-BtFLt3qI.js +1 -0
  95. package/src/assets/web-panel/assets/{hasIn-Xtzg_EDR.js → hasIn-DSL-c_hr.js} +1 -1
  96. package/src/assets/web-panel/assets/{index-BBegBTDb.js → index-0200QxC4.js} +1 -1
  97. package/src/assets/web-panel/assets/{index-BBR-_Pkv.js → index-B3iW-mhn.js} +1 -1
  98. package/src/assets/web-panel/assets/{index-BFRkiqtr.js → index-BD0w-888.js} +1 -1
  99. package/src/assets/web-panel/assets/{index-B4-hl9Rw.js → index-BHp1nSur.js} +1 -1
  100. package/src/assets/web-panel/assets/{index-BJ6nxb18.js → index-BIDCNwy6.js} +1 -1
  101. package/src/assets/web-panel/assets/{index-Cx_EAQEh.js → index-BMm8tO2X.js} +1 -1
  102. package/src/assets/web-panel/assets/{index-BhS9-r8Z.js → index-BNhWoD6d.js} +1 -1
  103. package/src/assets/web-panel/assets/{index-CShl59Um.js → index-BQAsL19t.js} +1 -1
  104. package/src/assets/web-panel/assets/{index-DEH5ms1R.js → index-BbZZ7P_c.js} +1 -1
  105. package/src/assets/web-panel/assets/index-BhuWQHeG.js +1 -0
  106. package/src/assets/web-panel/assets/{index-DVfE2S0f.js → index-BpwGsAA-.js} +1 -1
  107. package/src/assets/web-panel/assets/{index-B3ittRaJ.js → index-Bq8-2Ibv.js} +1 -1
  108. package/src/assets/web-panel/assets/{index-DWpRgQvO.js → index-BsAEd-Do.js} +1 -1
  109. package/src/assets/web-panel/assets/{index-B0kDqFPU.js → index-C-aKWR2v.js} +1 -1
  110. package/src/assets/web-panel/assets/{index-CyVOaMS7.js → index-C5dqieYX.js} +1 -1
  111. package/src/assets/web-panel/assets/{index-De9jsBiC.js → index-C67dPW0L.js} +1 -1
  112. package/src/assets/web-panel/assets/{index-Cp-yGWti.js → index-CEOAZm5j.js} +1 -1
  113. package/src/assets/web-panel/assets/{index-B-B7DDjX.js → index-CNytQuFq.js} +1 -1
  114. package/src/assets/web-panel/assets/{index-ConAvib0.js → index-CPYshcic.js} +1 -1
  115. package/src/assets/web-panel/assets/{index-EV-o-rTH.js → index-CS3bOhV7.js} +1 -1
  116. package/src/assets/web-panel/assets/{index-4s8GZJ73.js → index-CVDi4rS9.js} +1 -1
  117. package/src/assets/web-panel/assets/{index-Byto86PA.js → index-CXMeisJK.js} +1 -1
  118. package/src/assets/web-panel/assets/{index-DXNWsfbw.js → index-CZICtYJ0.js} +1 -1
  119. package/src/assets/web-panel/assets/{index-BpsIkWwQ.js → index-CdHMc9LQ.js} +1 -1
  120. package/src/assets/web-panel/assets/{index-CIbYQLD-.js → index-CdplnAS9.js} +1 -1
  121. package/src/assets/web-panel/assets/{index-DVnowoxR.js → index-CkN53KiJ.js} +1 -1
  122. package/src/assets/web-panel/assets/index-D-4tFek3.js +1 -0
  123. package/src/assets/web-panel/assets/{index-CLRMkKeD.js → index-D3pJBTvo.js} +1 -1
  124. package/src/assets/web-panel/assets/{index-BVOyO-ZV.js → index-DBwBZwio.js} +1 -1
  125. package/src/assets/web-panel/assets/{index-DFkgqRqx.js → index-DE7bSYmW.js} +1 -1
  126. package/src/assets/web-panel/assets/{index-hDo9-qDw.js → index-DRRY44XP.js} +1 -1
  127. package/src/assets/web-panel/assets/{index-BbTx5wo1.js → index-DVgTf7CZ.js} +1 -1
  128. package/src/assets/web-panel/assets/{index-BhYM_Rzp.js → index-Didyuq2Z.js} +1 -1
  129. package/src/assets/web-panel/assets/{index-DZKM2nm2.js → index-DtOTppk8.js} +1 -1
  130. package/src/assets/web-panel/assets/{index-kdyFlPZw.js → index-KaSejHjf.js} +1 -1
  131. package/src/assets/web-panel/assets/{index-svr-L6NS.js → index-OBhlHSMN.js} +3 -3
  132. package/src/assets/web-panel/assets/{index-B2bgL5vL.js → index-SmQfEHjp.js} +1 -1
  133. package/src/assets/web-panel/assets/{index-Bujix_OR.js → index-Tg3yl8wc.js} +1 -1
  134. package/src/assets/web-panel/assets/{index-BhhS0xnV.js → index-c8OqO3rq.js} +1 -1
  135. package/src/assets/web-panel/assets/{initDefaultProps-CPsOp_T6.js → initDefaultProps-P8SBN6Di.js} +1 -1
  136. package/src/assets/web-panel/assets/{motion-8Jakob3_.js → motion-BubbjUT_.js} +1 -1
  137. package/src/assets/web-panel/assets/{move-DAogsEBs.js → move-Chcykv0I.js} +1 -1
  138. package/src/assets/web-panel/assets/{mtc-parser-CkA9zZB_.js → mtc-parser-DyiYuGDu.js} +1 -1
  139. package/src/assets/web-panel/assets/{omit-DMHNkosQ.js → omit-Rdwb_Neb.js} +1 -1
  140. package/src/assets/web-panel/assets/{pickAttrs-ByIvo_lk.js → pickAttrs-CCr0MYHl.js} +1 -1
  141. package/src/assets/web-panel/assets/{placementArrow-CafMUHzz.js → placementArrow-B1ZXz3bb.js} +1 -1
  142. package/src/assets/web-panel/assets/{responsiveObserve-CTehELUQ.js → responsiveObserve-BGEdwej6.js} +1 -1
  143. package/src/assets/web-panel/assets/{slide-BQISQ1KV.js → slide-CpnsUMaT.js} +1 -1
  144. package/src/assets/web-panel/assets/{statusUtils-Drm4jUoK.js → statusUtils-C7x-TVp_.js} +1 -1
  145. package/src/assets/web-panel/assets/{styleChecker-DGniLRqn.js → styleChecker-CC5k_791.js} +1 -1
  146. package/src/assets/web-panel/assets/{useFlexGapSupport-DYz_z9wn.js → useFlexGapSupport-BpZFKsJW.js} +1 -1
  147. package/src/assets/web-panel/assets/{useFs-DRAPQMjC.js → useFs-CVq5HySy.js} +1 -1
  148. package/src/assets/web-panel/assets/{usePersonalDataHub-CpgGLb8q.js → usePersonalDataHub-BGkdLryu.js} +1 -1
  149. package/src/assets/web-panel/assets/{vnode-p6925VWJ.js → vnode-uLtOUEK-.js} +1 -1
  150. package/src/assets/web-panel/assets/{zoom-ClpO8REK.js → zoom-BfVC9iUs.js} +1 -1
  151. package/src/assets/web-panel/index.html +1 -1
  152. package/src/command-help-index.json +1 -1
  153. package/src/commands/agent.js +14 -1
  154. package/src/commands/ask.js +13 -8
  155. package/src/commands/chat.js +8 -5
  156. package/src/commands/cowork.js +18 -9
  157. package/src/commands/eval.js +100 -45
  158. package/src/commands/evolution-deployment.js +58 -0
  159. package/src/commands/hub.js +13 -7
  160. package/src/commands/setup.js +31 -1
  161. package/src/data/changelog.json +18 -5
  162. package/src/gateways/ws/personal-data-hub-protocol.js +12 -5
  163. package/src/lazy-dispatch.js +42 -6
  164. package/src/lib/agent-router.js +25 -23
  165. package/src/lib/chat-intent-service.js +3 -13
  166. package/src/lib/context-memory-kernel/provider-context.js +19 -3
  167. package/src/lib/cowork-adapter.js +9 -4
  168. package/src/lib/doctor-checkup.js +42 -0
  169. package/src/lib/eval/evidence.js +203 -0
  170. package/src/lib/eval/runner.js +16 -2
  171. package/src/lib/eval/trend.js +4 -3
  172. package/src/lib/evolution/agent-evolution-ingress.js +60 -8
  173. package/src/lib/evolution/evolution-deployment-config.js +217 -10
  174. package/src/lib/evolution/evolution-deployment-descriptor-revocations.js +131 -0
  175. package/src/lib/evolution/evolution-deployment-loader.js +126 -11
  176. package/src/lib/evolution/evolution-deployment-profile.js +281 -37
  177. package/src/lib/evolution/evolution-deployment-root-rotation.js +154 -0
  178. package/src/lib/evolution/governed-hub-llm.js +18 -12
  179. package/src/lib/evolution/governed-hub-skill.js +4 -17
  180. package/src/lib/evolution/governed-model-turn.js +7 -8
  181. package/src/lib/orchestrator.js +14 -8
  182. package/src/lib/personal-data-hub-wiring.js +7 -1
  183. package/src/lib/sub-agent-context.js +5 -1
  184. package/src/repl/chat-repl.js +8 -4
  185. package/src/runtime/agent-core.js +14 -0
  186. package/src/runtime/headless-runner.js +16 -0
  187. package/src/assets/web-panel/assets/EmailListRenderer-rcaSveQ8.js +0 -1
  188. package/src/assets/web-panel/assets/EvolutionSettings-B3dcSq1H.js +0 -1
  189. package/src/assets/web-panel/assets/Logs-B-7Dz5Ui.js +0 -2
  190. package/src/assets/web-panel/assets/PdhVaultBrowser-yYL7-rno.js +0 -7
  191. package/src/assets/web-panel/assets/Skills-BBkg1Eqr.js +0 -1
  192. package/src/assets/web-panel/assets/Tasks-QQWSk-tc.js +0 -1
  193. package/src/assets/web-panel/assets/devWarning-BUooUkHH.js +0 -1
  194. package/src/assets/web-panel/assets/index-DVu4QCII.js +0 -1
  195. package/src/assets/web-panel/assets/index-XYnz-yJ_.js +0 -1
@@ -19,12 +19,23 @@ import {
19
19
  formatTelemetry,
20
20
  } from "../lib/telemetry/span-recorder.js";
21
21
  import { computeTrend, formatTrend } from "../lib/eval/trend.js";
22
+ import {
23
+ createEvalComparison,
24
+ createEvalHistoryRecord,
25
+ evalDigest,
26
+ evaluateStrictEvalGate,
27
+ EVAL_EXECUTION_PROTOCOL,
28
+ readComparisonContext,
29
+ readEvalHistory,
30
+ } from "../lib/eval/evidence.js";
22
31
 
23
32
  export const _deps = {
24
33
  platform: process.platform,
25
34
  kill: process.kill.bind(process),
26
35
  spawn: executionBroker.spawn.bind(executionBroker),
27
36
  spawnSync: executionBroker.spawnSync.bind(executionBroker),
37
+ runEvalSuite,
38
+ getSuite,
28
39
  };
29
40
 
30
41
  /** Append a run summary as one JSONL line to the history file. */
@@ -32,26 +43,21 @@ function appendHistory(file, record) {
32
43
  fs.appendFileSync(file, JSON.stringify(record) + "\n", "utf8");
33
44
  }
34
45
 
35
- /** Read a JSONL eval-history file into an array of run records (skips bad lines). */
36
- function readHistory(file) {
37
- if (!fs.existsSync(file)) return [];
38
- const out = [];
39
- for (const line of fs.readFileSync(file, "utf8").split(/\r?\n/)) {
40
- const t = line.trim();
41
- if (!t) continue;
42
- try {
43
- out.push(JSON.parse(t));
44
- } catch {
45
- /* skip a corrupt history line rather than abort the report */
46
- }
47
- }
48
- return out;
49
- }
50
-
51
46
  const __dirname = path.dirname(fileURLToPath(import.meta.url));
52
47
  // This file is src/commands/eval.js → the CLI entry is bin/chainlesschain.js.
53
48
  const BIN = path.resolve(__dirname, "..", "..", "bin", "chainlesschain.js");
54
49
 
50
+ function verifyAgentTerminal(output) {
51
+ try {
52
+ const events = output.split(/\r?\n/u).filter((line) => line.trim()).map((line) => JSON.parse(line));
53
+ const results = events.filter((event) => event?.type === "result");
54
+ const terminal = results[0];
55
+ return results.length === 1 && events.at(-1) === terminal &&
56
+ terminal.subtype === "success" && terminal.is_error !== true &&
57
+ !events.some((event) => event?.type === "error");
58
+ } catch { return false; }
59
+ }
60
+
55
61
  /**
56
62
  * Kill an agent child AND its tool grandchildren. A bare child.kill("SIGTERM")
57
63
  * only reaches the direct child (and on Windows TerminateProcess never reaches
@@ -111,7 +117,7 @@ function makeHeadlessRunAgent(opts = {}) {
111
117
  "--permission-mode",
112
118
  "acceptEdits",
113
119
  "--output-format",
114
- "text",
120
+ "stream-json",
115
121
  ];
116
122
  if (opts.model) args.push("--model", opts.model);
117
123
  if (opts.provider) args.push("--provider", opts.provider);
@@ -136,7 +142,15 @@ function makeHeadlessRunAgent(opts = {}) {
136
142
  if (settled) return;
137
143
  settled = true;
138
144
  clearTimeout(graceTimer);
139
- resolve(result);
145
+ resolve({
146
+ ...result,
147
+ executionEvidence: {
148
+ protocol: EVAL_EXECUTION_PROTOCOL,
149
+ exitCode: result.exitCode ?? null,
150
+ signal: result.signal ?? null,
151
+ terminalVerified: result.terminalVerified === true,
152
+ },
153
+ });
140
154
  };
141
155
  const timer = setTimeout(() => {
142
156
  // Kill the WHOLE tree, then settle on `close` — resolving immediately
@@ -162,17 +176,27 @@ function makeHeadlessRunAgent(opts = {}) {
162
176
  clearTimeout(timer);
163
177
  done({ ok: false, output: out, error: e.message });
164
178
  });
165
- child.on("close", (code) => {
179
+ child.on("close", (code, signal) => {
166
180
  clearTimeout(timer);
167
181
  if (timedOut) {
168
182
  done({
169
183
  ok: false,
170
184
  output: out,
185
+ exitCode: code,
186
+ signal: signal || null,
171
187
  error: `timed out after ${timeoutMs || 120000}ms`,
172
188
  });
173
189
  return;
174
190
  }
175
- done({ ok: code === 0, output: out, error: code === 0 ? null : err });
191
+ const terminalVerified = !opts._argv && verifyAgentTerminal(out);
192
+ const ok = code === 0 && !signal && (opts._argv || terminalVerified);
193
+ done({
194
+ ok: Boolean(ok), output: out, exitCode: code, signal: signal || null,
195
+ terminalVerified,
196
+ error: ok ? null : code === 0 && !signal
197
+ ? "agent stream lacks a valid success terminal"
198
+ : err || `agent process exited with ${signal || code}`,
199
+ });
176
200
  });
177
201
  });
178
202
  };
@@ -211,14 +235,22 @@ export function registerEvalCommand(program, { logger } = {}) {
211
235
  )
212
236
  .option(
213
237
  "--trend",
214
- "Report the pass-rate trend from --history instead of running (CI gate)",
238
+ "Report the diagnostic pass-rate trend from --history instead of running",
215
239
  )
240
+ .option("--strict", "With --trend: require complete, comparable recent evidence; legacy history cannot pass")
241
+ .option("--max-age-hours <hours>", "With --strict: maximum age of both compared runs", "168")
242
+ .option("--comparison-context <file>", "Bind explicit provider/model to operator-declared modelRevision and environment/permission/inference digests (not production attestation)")
216
243
  .option(
217
244
  "--regression-threshold <pct>",
218
245
  "With --trend: pass-rate drop (in points) that fails the gate on its own",
219
246
  "0",
220
247
  )
221
248
  .action(async (options) => {
249
+ if (options.strict && !options.trend) {
250
+ (log.error || console.error)("--strict requires --trend --history <file>");
251
+ process.exitCode = 1;
252
+ return;
253
+ }
222
254
  // Trend mode: don't run the suite — read the recorded history and report
223
255
  // the pass-rate trend + per-task regressions. This is the release-pipeline
224
256
  // consumer (the runs themselves need a real model; the report is pure).
@@ -228,19 +260,50 @@ export function registerEvalCommand(program, { logger } = {}) {
228
260
  process.exitCode = 1;
229
261
  return;
230
262
  }
231
- const runs = readHistory(options.history);
232
- const threshold =
233
- Math.max(0, Number(options.regressionThreshold) || 0) / 100;
234
- const trend = computeTrend(runs, { regressionThreshold: threshold });
263
+ let history;
264
+ try { history = readEvalHistory(options.history); }
265
+ catch {
266
+ history = { runs: [], issues: [{ code: "history_unreadable" }] };
267
+ }
268
+ const threshold = Number(options.regressionThreshold) / 100;
269
+ if (options.strict) {
270
+ const gate = evaluateStrictEvalGate(history, {
271
+ maxAgeMs: Number(options.maxAgeHours) * 60 * 60 * 1000,
272
+ regressionThreshold: threshold,
273
+ });
274
+ if (options.json) console.log(JSON.stringify(gate, null, 2));
275
+ else (log.log || console.log)(
276
+ `Eval comparison: ${gate.status}\n` +
277
+ ` Scope: local configuration comparison; operator declarations are not production attestation.\n` +
278
+ (gate.reasons.length ? ` ${gate.reasons.join(", ")}` : " Comparable executions and candidate checks passed."),
279
+ );
280
+ if (!gate.passed) process.exitCode = 1;
281
+ return;
282
+ }
283
+ const trend = computeTrend(history.runs, { regressionThreshold: Math.max(0, threshold || 0) });
284
+ if (history.issues.length) trend.historyIssues = history.issues;
235
285
  if (options.json) console.log(JSON.stringify(trend, null, 2));
236
- else (log.log || console.log)(formatTrend(trend));
286
+ else {
287
+ (log.log || console.log)(formatTrend(trend));
288
+ if (history.issues.length) (log.error || console.error)("History contains invalid or unreadable records; this diagnostic is not release evidence.");
289
+ }
237
290
  if (trend.regressed) process.exitCode = 1;
238
291
  return;
239
292
  }
240
293
 
241
294
  let tasks;
295
+ let comparison;
242
296
  try {
243
- tasks = getSuite(options.suite);
297
+ tasks = _deps.getSuite(options.suite);
298
+ comparison = createEvalComparison({
299
+ suite: options.suite,
300
+ corpusDigest: evalDigest(fs.readFileSync(new URL("../lib/eval/tasks.js", import.meta.url))),
301
+ provider: options.provider,
302
+ model: options.model,
303
+ context: options.comparisonContext
304
+ ? readComparisonContext(options.comparisonContext, { provider: options.provider, model: options.model })
305
+ : null,
306
+ });
244
307
  } catch (err) {
245
308
  log.error ? log.error(err.message) : console.error(err.message);
246
309
  process.exitCode = 1;
@@ -256,7 +319,7 @@ export function registerEvalCommand(program, { logger } = {}) {
256
319
  // OTel-shaped telemetry for the run (per-task span + failure class).
257
320
  const recorder = new TelemetryRecorder({ serviceName: "cc-eval" });
258
321
 
259
- const summary = await runEvalSuite(tasks, {
322
+ const summary = await _deps.runEvalSuite(tasks, {
260
323
  runAgent,
261
324
  recorder,
262
325
  keepWorkspaces: options.keep === true,
@@ -272,6 +335,11 @@ export function registerEvalCommand(program, { logger } = {}) {
272
335
  : ""),
273
336
  ),
274
337
  });
338
+ const record = createEvalHistoryRecord(summary, {
339
+ comparison,
340
+ dryRun: options.dryRun === true,
341
+ label: options.label || null,
342
+ });
275
343
 
276
344
  if (options.otlp) {
277
345
  try {
@@ -296,28 +364,15 @@ export function registerEvalCommand(program, { logger } = {}) {
296
364
  // pass/fail + a timestamp/label — so `cc eval --trend` can chart it).
297
365
  if (options.history) {
298
366
  try {
299
- appendHistory(options.history, {
300
- ranAt: new Date().toISOString(),
301
- label: options.label || null,
302
- // Tagged so --trend can exclude it: a dry-run is always 0% and
303
- // would otherwise report every passing task as a regression.
304
- ...(options.dryRun ? { dryRun: true } : {}),
305
- passed: summary.passed,
306
- total: summary.total,
307
- passRate: summary.passRate,
308
- unrelatedChangeRate: summary.unrelatedChangeRate,
309
- results: (summary.results || []).map((r) => ({
310
- id: r.id,
311
- pass: r.pass,
312
- })),
313
- });
367
+ appendHistory(options.history, record);
314
368
  } catch (e) {
315
369
  (log.error || console.error)(` history write failed: ${e.message}`);
370
+ process.exitCode = 1;
316
371
  }
317
372
  }
318
373
 
319
374
  if (options.json) {
320
- console.log(JSON.stringify(summary, null, 2));
375
+ console.log(JSON.stringify({ ...summary, ...record }, null, 2));
321
376
  } else {
322
377
  // Per-task lines already streamed via onResult; print the summary +
323
378
  // the telemetry metrics (durations / failure classification).
@@ -336,7 +391,7 @@ export function registerEvalCommand(program, { logger } = {}) {
336
391
  }
337
392
  }
338
393
  // Non-zero exit when not every task passed — usable as a CI gate.
339
- if (summary.passed < summary.total) process.exitCode = 1;
394
+ if (summary.total === 0 || summary.passed < summary.total) process.exitCode = 1;
340
395
  });
341
396
  return program;
342
397
  }
@@ -3,6 +3,7 @@ import { logger } from "../lib/logger.js";
3
3
  import {
4
4
  configureEvolutionDeployment,
5
5
  getEvolutionDeploymentStatus,
6
+ revokeEvolutionDeploymentDescriptorRevisions,
6
7
  setEvolutionDeploymentEnabled,
7
8
  } from "../lib/evolution/evolution-deployment-config.js";
8
9
 
@@ -21,8 +22,24 @@ function printStatus(status) {
21
22
  logger.log(` Descriptor: ${status.descriptorPath}`);
22
23
  if (status.trustRootPath)
23
24
  logger.log(` Trust root: ${status.trustRootPath}`);
25
+ if (status.activeTrustRootDigest)
26
+ logger.log(` Active root: ${status.activeTrustRootDigest}`);
27
+ if (status.revisionFloor)
28
+ logger.log(` Revision floor: ${status.revisionFloor}`);
24
29
  if (status.commands?.length)
25
30
  logger.log(` Commands: ${status.commands.join(", ")}`);
31
+ if (status.readiness) {
32
+ for (const command of ["ask", "agent"]) {
33
+ const admission = status.readiness[command];
34
+ if (admission)
35
+ logger.log(
36
+ ` ${command} admission: ${admission.state} — ${admission.detail}`,
37
+ );
38
+ }
39
+ logger.log(
40
+ " Runtime: not checked (host composition and model execution)",
41
+ );
42
+ }
26
43
  if (status.error) logger.log(chalk.red(` Error: ${status.error}`));
27
44
  }
28
45
 
@@ -38,6 +55,16 @@ function fail(error, json) {
38
55
  process.exitCode = 1;
39
56
  }
40
57
 
58
+ /** Standalone configuration route: never assemble the configured host. */
59
+ export function registerEvolutionDeploymentCommand(program) {
60
+ const evolution = program
61
+ .command("evolution")
62
+ .description(
63
+ "Evolution metrics and governance records — not model training or active Skill promotion",
64
+ );
65
+ registerEvolutionDeploymentCommands(evolution);
66
+ }
67
+
41
68
  export function registerEvolutionDeploymentCommands(parent) {
42
69
  const deployment = parent
43
70
  .command("deployment")
@@ -60,6 +87,14 @@ export function registerEvolutionDeploymentCommands(parent) {
60
87
  .description("Verify, save, and enable a signed deployment")
61
88
  .requiredOption("--descriptor <path>", "Absolute signed descriptor path")
62
89
  .requiredOption("--trust-root <path>", "Absolute Ed25519 public key path")
90
+ .option(
91
+ "--root-rotation <path>",
92
+ "Certificate signed by the current root when changing trust roots",
93
+ )
94
+ .option(
95
+ "--descriptor-revocations <path>",
96
+ "Signed descriptor-revocation record for this trust root",
97
+ )
63
98
  .option("--disabled", "Save without enabling")
64
99
  .option("--json", "Output as JSON")
65
100
  .action(async (options) => {
@@ -68,6 +103,8 @@ export function registerEvolutionDeploymentCommands(parent) {
68
103
  await configureEvolutionDeployment({
69
104
  descriptorPath: options.descriptor,
70
105
  trustRootPath: options.trustRoot,
106
+ rootRotationPath: options.rootRotation || null,
107
+ revocationPath: options.descriptorRevocations || null,
71
108
  enabled: options.disabled !== true,
72
109
  }),
73
110
  options.json,
@@ -92,4 +129,25 @@ export function registerEvolutionDeploymentCommands(parent) {
92
129
  }
93
130
  });
94
131
  }
132
+
133
+ deployment
134
+ .command("revoke")
135
+ .description("Record signed descriptor revocations and disable the profile")
136
+ .requiredOption(
137
+ "--descriptor-revocations <path>",
138
+ "Signed descriptor-revocation record for the active trust root",
139
+ )
140
+ .option("--json", "Output as JSON")
141
+ .action(async (options) => {
142
+ try {
143
+ output(
144
+ await revokeEvolutionDeploymentDescriptorRevisions({
145
+ revocationPath: options.descriptorRevocations,
146
+ }),
147
+ options.json,
148
+ );
149
+ } catch (error) {
150
+ fail(error, options.json);
151
+ }
152
+ });
95
153
  }
@@ -3448,13 +3448,19 @@ function _defaultKnownVendors() {
3448
3448
 
3449
3449
  export function registerHubCommand(program, dependencies = {}) {
3450
3450
  const factory = readEvolutionCompositionFactory(dependencies);
3451
- const invocationOptions = (options) =>
3452
- factory === null
3453
- ? options
3454
- : {
3455
- ...options,
3456
- _getHub: () => getGovernedAnalysisHub(factory),
3457
- };
3451
+ const invocationOptions = (options) => {
3452
+ if (factory === null) {
3453
+ const error = new Error(
3454
+ "Hub model egress requires an authenticated evolution composition factory",
3455
+ );
3456
+ error.code = "CC_AGENT_EVOLUTION_INGRESS_FAILED";
3457
+ throw error;
3458
+ }
3459
+ return {
3460
+ ...options,
3461
+ _getHub: () => getGovernedAnalysisHub(factory),
3462
+ };
3463
+ };
3458
3464
  const hub = program
3459
3465
  .command("hub")
3460
3466
  .description(
@@ -26,6 +26,10 @@ import {
26
26
  askPassword,
27
27
  } from "../lib/prompts.js";
28
28
  import logger from "../lib/logger.js";
29
+ import {
30
+ assessEvolutionDeploymentReadiness,
31
+ getEvolutionDeploymentStatus,
32
+ } from "../lib/evolution/evolution-deployment-config.js";
29
33
 
30
34
  export function registerSetupCommand(program) {
31
35
  program
@@ -180,6 +184,24 @@ async function runSetup(options) {
180
184
  }
181
185
  logger.success("Configuration saved");
182
186
 
187
+ // Saving a provider setting does not itself authorize a content-bearing
188
+ // request. Check command-specific deployment admission without executing the
189
+ // host module; a successful preflight is not a model execution probe.
190
+ const modelReadiness = assessEvolutionDeploymentReadiness(
191
+ await getEvolutionDeploymentStatus(),
192
+ );
193
+ if (modelReadiness.ready) {
194
+ logger.success("Signed deployment admits ask and agent");
195
+ logger.info(
196
+ "Runtime composition and model execution will be checked when you run a task.",
197
+ );
198
+ } else {
199
+ logger.warn(
200
+ `Model deployment prerequisites not met: ${modelReadiness.detail}`,
201
+ );
202
+ logger.info(`To enable it: ${modelReadiness.remediation}`);
203
+ }
204
+
183
205
  // Step 8: Docker services
184
206
  if (!options.skipServices && dockerOk && composeOk) {
185
207
  logger.newline();
@@ -207,7 +229,15 @@ async function runSetup(options) {
207
229
 
208
230
  // Done
209
231
  logger.newline();
210
- logger.log(chalk.bold.green(" Setup complete!\n"));
232
+ logger.log(
233
+ modelReadiness.ready
234
+ ? chalk.bold.green(
235
+ " Setup saved; deployment prerequisites checked (model execution not tested).\n",
236
+ )
237
+ : chalk.bold.yellow(
238
+ " Setup saved; ask/agent deployment prerequisites remain incomplete.\n",
239
+ ),
240
+ );
211
241
  logger.log(" Next steps:");
212
242
  logger.log(
213
243
  ` ${chalk.cyan("chainlesschain start")} Launch the desktop app`,
@@ -2,8 +2,21 @@
2
2
  "source": "CHANGELOG.md",
3
3
  "releases": [
4
4
  {
5
- "productVersion": "v5.0.3.136",
6
- "cliVersion": "0.166.44",
5
+ "productVersion": null,
6
+ "cliVersion": "0.166.46",
7
+ "cliVersions": ["0.166.46"],
8
+ "date": null,
9
+ "title": "",
10
+ "sections": [
11
+ {
12
+ "heading": "Fixed - cc CLI 0.166.46: restore Agent chat before Evolution deployment",
13
+ "body": "- Restore ordinary Agent and IDE stream chat for installations with no\n Evolution deployment configured.\n- Continue authenticating configured deployments and reject invalid, disabled,\n or unauthorized Agent deployments without falling back to ordinary chat.\n- Refresh public npm metadata during release verification retries."
14
+ }
15
+ ]
16
+ },
17
+ {
18
+ "productVersion": "v5.0.3.137",
19
+ "cliVersion": "0.166.45",
7
20
  "cliVersions": [
8
21
  "0.1.1",
9
22
  "0.1.2",
@@ -107,14 +120,14 @@
107
120
  "0.166.41",
108
121
  "0.166.42",
109
122
  "0.166.43",
110
- "0.166.44"
123
+ "0.166.45"
111
124
  ],
112
125
  "date": "2026-09-11",
113
126
  "title": "DeepSeek V4 Flash GA 默认模型与全端同步发行",
114
127
  "sections": [
115
128
  {
116
- "heading": "Changed - cc CLI 0.166.44: use DeepSeek V4 Flash GA by default",
117
- "body": "- Use `deepseek-v4-flash-ga-260731` as the default Volcengine text model for\n new CLI, agent and task-model configurations.\n- Keep `deepseek-v4-flash-260425` available for existing saved settings and\n explicit model selection.\n- Pair VS Code `0.37.94` and JetBrains `0.4.121` with the same exact-gated CLI,\n and embed it in the `v5.0.3.136` desktop and mobile release artifacts."
129
+ "heading": "Changed - cc CLI 0.166.45: use DeepSeek V4 Flash GA by default",
130
+ "body": "- Use `deepseek-v4-flash-ga-260731` as the default Volcengine text model for\n new CLI, agent and task-model configurations.\n- Keep `deepseek-v4-flash-260425` available for existing saved settings and\n explicit model selection.\n- Pair VS Code `0.37.94` and JetBrains `0.4.122` with the same exact-gated CLI,\n and embed it in the `v5.0.3.137` desktop and mobile release artifacts."
118
131
  },
119
132
  {
120
133
  "heading": "Added - cc CLI 0.166.43: configure governed Skill evolution",
@@ -192,6 +192,15 @@ async function withHub(fn, loadHub = getHub) {
192
192
  }
193
193
  }
194
194
 
195
+ function governedHubLoader(factory) {
196
+ if (typeof factory === "function") return () => getGovernedAnalysisHub(factory);
197
+ const error = new Error(
198
+ "Personal Data Hub model egress requires an authenticated evolution composition factory",
199
+ );
200
+ error.code = "CC_AGENT_EVOLUTION_INGRESS_FAILED";
201
+ throw error;
202
+ }
203
+
195
204
  export const PERSONAL_DATA_HUB_HANDLERS = {
196
205
  "personal-data-hub.ask": async (msg, context = {}) => {
197
206
  const factory = context.server?.evolutionCompositionFactory;
@@ -200,7 +209,7 @@ export const PERSONAL_DATA_HUB_HANDLERS = {
200
209
  if (!hub.engine) throw new Error("Analysis engine unavailable");
201
210
  return await hub.engine.ask(msg.question, msg.options || {});
202
211
  },
203
- factory == null ? getHub : () => getGovernedAnalysisHub(factory),
212
+ governedHubLoader(factory),
204
213
  );
205
214
  },
206
215
 
@@ -614,9 +623,7 @@ export const PERSONAL_DATA_HUB_HANDLERS = {
614
623
  withHub(async (hub) => {
615
624
  if (!hub.entityResolver) throw new Error("EntityResolver not wired");
616
625
  const factory = context.server?.evolutionCompositionFactory;
617
- if (factory != null)
618
- return hub.drainResolver({ limit: msg.limit || 50 }, factory);
619
- return await hub.entityResolver.drain({ limit: msg.limit || 50 });
626
+ return await hub.drainResolver({ limit: msg.limit || 50 }, factory);
620
627
  }),
621
628
 
622
629
  "personal-data-hub.resolver-stats": async () =>
@@ -641,7 +648,7 @@ export const PERSONAL_DATA_HUB_HANDLERS = {
641
648
  const factory = context.server?.evolutionCompositionFactory;
642
649
  return withHub(
643
650
  async (hub) => await hub.runSkill(msg.name, msg.options || {}),
644
- factory == null ? getHub : () => getGovernedAnalysisHub(factory),
651
+ governedHubLoader(factory),
645
652
  );
646
653
  },
647
654
 
@@ -688,6 +688,24 @@ async function defaultLoadCommandDependencies(commandName) {
688
688
  return loadEvolutionDeploymentCommandDependencies(commandName);
689
689
  }
690
690
 
691
+ function isEvolutionDeploymentInvocation(argv, entry) {
692
+ if (entry.name !== "evolution") return false;
693
+ const location = findCommandTokenLocation(argv);
694
+ if (!location) return false;
695
+ for (let index = location.index + 1; index < argv.length;) {
696
+ const option = consumeGlobalOption(argv, index);
697
+ if (option) {
698
+ index = option.nextIndex;
699
+ continue;
700
+ }
701
+ const token = argv[index++];
702
+ if (token === "--") return argv[index] === "deployment";
703
+ if (token.startsWith("-")) continue;
704
+ return token === "deployment";
705
+ }
706
+ return false;
707
+ }
708
+
691
709
  /**
692
710
  * Load/register may fall back to the compatibility program. parseAsync is
693
711
  * intentionally outside that catch: once an action begins, any failure must
@@ -706,21 +724,39 @@ export async function dispatchManifestEntry(
706
724
  } = {},
707
725
  ) {
708
726
  let program;
709
- let allowCompatibilityFallback = true;
727
+ // Deployment inspection and repair must remain usable even when the signed
728
+ // host throws during import or dependency construction. Register only this
729
+ // configuration subtree, without executing the host or importing the eager
730
+ // program (which assembles every command's deployment dependencies).
731
+ const deploymentConfigurationOnly = isEvolutionDeploymentInvocation(
732
+ argv,
733
+ entry,
734
+ );
735
+ const registrationEntry = deploymentConfigurationOnly
736
+ ? {
737
+ ...entry,
738
+ module: "./commands/evolution-deployment.js",
739
+ register: "registerEvolutionDeploymentCommand",
740
+ }
741
+ : entry;
742
+ let allowCompatibilityFallback = !deploymentConfigurationOnly;
710
743
  try {
711
744
  program = await createBaseProgram();
712
- const mod = await loadCommandModule(entry);
713
- const registerFn = mod[entry.register];
745
+ const mod = await loadCommandModule(registrationEntry);
746
+ const registerFn = mod[registrationEntry.register];
714
747
  if (typeof registerFn !== "function") {
715
748
  throw new Error(
716
- `Register function '${entry.register}' not found in ${entry.module}`,
749
+ `Register function '${registrationEntry.register}' not found in ${registrationEntry.module}`,
717
750
  );
718
751
  }
719
752
  // Governed deployment loading may reconcile durable state. Do not hide a
720
753
  // failed trust check or retry that assembly through the eager program.
721
754
  allowCompatibilityFallback = false;
722
- const dependencies = await loadCommandDependencies(entry.name);
723
- allowCompatibilityFallback = dependencies == null;
755
+ const dependencies = deploymentConfigurationOnly
756
+ ? null
757
+ : await loadCommandDependencies(entry.name);
758
+ allowCompatibilityFallback =
759
+ !deploymentConfigurationOnly && dependencies == null;
724
760
  registerFn(program, dependencies ?? undefined);
725
761
  } catch (error) {
726
762
  if (!allowCompatibilityFallback) throw error;
@@ -22,7 +22,10 @@
22
22
  * ],
23
23
  * strategy: "round-robin",
24
24
  * });
25
- * const results = await router.dispatch(subtasks, { cwd: "/my/project" });
25
+ * const results = await router.dispatch(subtasks, {
26
+ * cwd: "/my/project",
27
+ * evolutionIngress,
28
+ * });
26
29
  */
27
30
 
28
31
  import { EventEmitter } from "events";
@@ -253,24 +256,30 @@ export class AgentRouter extends EventEmitter {
253
256
  * @param {Array<{id, description, context?, type?}>} subtasks
254
257
  * @param {object} options
255
258
  * @param {string} options.cwd
259
+ * @param {object} options.evolutionIngress authenticated model ingress
256
260
  * @returns {Promise<Array<{taskId, agentId, backendType, success, output, duration}>>}
257
261
  */
258
262
  async dispatch(subtasks, options = {}) {
259
263
  const { cwd = process.cwd() } = options;
264
+ if (this._backends.length === 0) {
265
+ throw new Error(
266
+ "No agent backends available. Install Claude Code: npm i -g @anthropic-ai/claude-code",
267
+ );
268
+ }
260
269
  const evolutionIngress =
261
270
  options.evolutionIngress == null
262
271
  ? null
263
272
  : captureAgentEvolutionIngress(options.evolutionIngress);
264
- const backends =
265
- evolutionIngress === null
266
- ? this._backends
267
- : this._backends.filter((backend) => !backend.isCLI);
268
-
269
- if (this._backends.length === 0) {
270
- throw new Error(
271
- "No agent backends available. Install Claude Code: npm i -g @anthropic-ai/claude-code",
273
+ if (evolutionIngress === null) {
274
+ const error = new Error(
275
+ "AgentRouter model dispatch requires an authenticated evolution composition",
272
276
  );
277
+ error.code = "CC_AGENT_EVOLUTION_INGRESS_FAILED";
278
+ throw error;
273
279
  }
280
+ const backends =
281
+ this._backends.filter((backend) => !backend.isCLI);
282
+
274
283
  if (backends.length === 0) {
275
284
  const error = new Error(
276
285
  "No backend can attest per-request evolution ingress; external agent CLIs are opaque",
@@ -422,20 +431,13 @@ export class AgentRouter extends EventEmitter {
422
431
  // tool, or model calls crossed this Run's durable ingress. Until an
423
432
  // authenticated child protocol can bind every such call and return
424
433
  // evidence, admitting the black box would create an unobservable model
425
- // bypass. Keep unmanaged legacy dispatch available, but fail closed for
426
- // governed evolution Runs before the process can be spawned.
427
- if (evolutionIngress !== null) {
428
- const error = new Error(
429
- `External ${backend.type} CLI does not attest per-request evolution ingress`,
430
- );
431
- error.code = AGENT_ROUTER_ERROR.EXTERNAL_MODEL_INGRESS_UNATTESTED;
432
- throw error;
433
- }
434
-
435
- // Use ClaudeCodePool for unmanaged CLI-based backends.
436
- const pool = backend._pool;
437
- const [r] = await pool.dispatch([task], { cwd });
438
- result = r;
434
+ // bypass. This is deliberately unconditional so a future internal caller
435
+ // cannot bypass dispatch()'s candidate filter by calling this helper.
436
+ const error = new Error(
437
+ `External ${backend.type} CLI does not attest per-request evolution ingress`,
438
+ );
439
+ error.code = AGENT_ROUTER_ERROR.EXTERNAL_MODEL_INGRESS_UNATTESTED;
440
+ throw error;
439
441
  } else {
440
442
  // Use LLM API for API-based backends
441
443
  result = await executeViaAPI(task, {