chainlesschain 0.166.20 → 0.166.22
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +67 -9
- package/package.json +2 -2
- package/src/assets/web-panel/assets/{AIOps-CcJst5Zs.js → AIOps-oJ7USzMC.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-BpHPFKd3.js → ActionButton-BlgnZe_C.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DHAsASuS.js → Analytics-D2rRbTLu.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-BTKwo5RC.js → AppLayout-FwS3f0B2.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-BcCBTggA.js → Artifacts-iF-_08Hi.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-z1JvJYbT.js → Audit-D24p0zQw.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-CJ7DCMDR.js → BackgroundAgents-Cg3mRVi9.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CKpxw4uw.js → Backup-EOqht3H-.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-2jI_IlUB.js → BaseInput-9XWYq2hj.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-C_4RfBeN.js → Chat-Dq5yardA.js} +5 -5
- package/src/assets/web-panel/assets/ChatBubbleRenderer-Ds3pA-ET.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-BnF4z4N1.js → Checkbox-CuyCBoBf.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-m_LMamhM.js → Codegen-DjWtYHNe.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DzMbA760.js → Col-CrVr_iuG.js} +1 -1
- package/src/assets/web-panel/assets/{Community-SScuZUcW.js → Community-C6QxpfGc.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-CiOHRvwQ.js → Compact-B-v5r6Pa.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-97FzYz-6.js → Compliance-zNiLiFgD.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-C0ss-SRl.js → Cowork-D9K7lMOu.js} +2 -2
- package/src/assets/web-panel/assets/{Cron-CCbdc9fp.js → Cron-DAjO36z4.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BPnabXej.js → Crosschain-Bxqn0aqB.js} +1 -1
- package/src/assets/web-panel/assets/{DID-B65hFnHs.js → DID-DfRmLUe-.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-B6qR_TF2.js → Dashboard-Cz8KF3fr.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-6c-2Fxm-.js → Dropdown-C4oVfkP0.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-GD57mfiz.js → EmailListRenderer-ivyZKN8k.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-B2mxG6LN.js → FamilyGuardDashboard-DoxY1CPW.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-cZS-uvAo.js → Federation-C93gZxnb.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-UbSfBIe1.js → FormItemContext-D_lEjYJE.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BMAtvGt1.js → GenericCardRenderer-BNFN9YjN.js} +1 -1
- package/src/assets/web-panel/assets/{Git-DAlhOiDA.js → Git-mUu2HcLI.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-B-RRVaP8.js → Governance-CNuosrge.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DBl-pXYR.js → Inference-DwY5pbCB.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DjqOkvgY.js → KnowledgeGraph-aRUxhACD.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-CEV7AEAD.js → Logs-DFfsWYy_.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-BDCxa4d1.js → MarkdownRenderer-DqTx7_u1.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-oRjzfmYJ.js → Marketplace-COI-ciM-.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-BiTnznLw.js → McpTools-BJJwaIpe.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-DR0C5K4N.js → Memory-CDO6SGDZ.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge--oR8wEcp.js → MobileBridge-BlZ5tFf4.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-DKqpYMuG.js → MobileProjects-DuoxbgWz.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-Dg0D6fDQ.js → Mtc-6ec9j70b.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-D4_-yWTK.js → MtcAudit-BuL7HkC7.js} +5 -5
- package/src/assets/web-panel/assets/{Multisig-Coz55FxA.js → Multisig-CJxR85lk.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-BWVjgW9Y.js → NLProgramming-B71O1S4l.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BflVuGwr.js → Notes-Bsw5zbpV.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-CT0F_dJ7.js → NotificationSettings-BnAhXuK_.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-Dyrnqy_o.js → OrderTableRenderer-BJ0R5GGz.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-CMDTM2z5.js → Organization-B7wwNxoP.js} +2 -2
- package/src/assets/web-panel/assets/{Overflow-acKvvYpC.js → Overflow-CfAGr0gM.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CRq5j9Ax.js → P2P-KhMg22Fz.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-DmtzN6Kn.js → PdhVaultBrowser-NdAXI9ft.js} +4 -4
- package/src/assets/web-panel/assets/{Permissions-SZ-kjJDa.js → Permissions-CIYjqyT7.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DXh-ZfgJ.js → PersonalDataHub-D2ht3P_R.js} +6 -6
- package/src/assets/web-panel/assets/{Pipeline-DhBU9ftP.js → Pipeline-i6flZW1m.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-BgEXpO_V.js → Privacy-DE0lhYVc.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-B2DJ-dmK.js → ProjectInit-BL3YbyxS.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-ve3SocWc.js → ProjectSettings-CEtdg7ni.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-5ZvFasSJ.js → Projects-CvtU5peJ.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-C8fcF3BK.js → Providers-DKt_Cg-j.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-unjO8lNO.js → QrScannerModal-DA61jNSx.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BT1QtT7D.js → QuickAsk-fS9ryUmq.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BSjFrY1w.js → Recommend-CR9dZU5Y.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-CWV0bICg.js → RemoteSession-BV0BR2Dz.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-BMjiMsk2.js → Reputation-BIeGUvYD.js} +1 -1
- package/src/assets/web-panel/assets/{Row-9XCY22PM.js → Row-DHDT1aro.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DQ9PDy7Q.js → RssFeed-Cq6YKb1h.js} +3 -3
- package/src/assets/web-panel/assets/{Search-Boym2HwG.js → Search-DEF6vsy6.js} +1 -1
- package/src/assets/web-panel/assets/{Security-Gbq3lGQb.js → Security-CHtYiKY9.js} +4 -4
- package/src/assets/web-panel/assets/{Services-OcUfLdnu.js → Services-u16lvBJN.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-BjTog6cA.js → Skeleton-CGbizyDj.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-Dny4ft_1.js → Skills-BZMQcAa7.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-Cy_VnhpZ.js → Sla-Bm-CycVi.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-CrFuL_lp.js → SpeechSettings-BudpA5kr.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-k-FnjuOR.js → SyncSettings-B8q1C1eC.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-ZEqDSo0_.js → Tasks-SU1pBWc-.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CYYksYV5.js → Templates-CyOfJzmt.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BvTTRTHS.js → Tenant-xqWSm2GP.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-DMOQOtkj.js → Terminal-D1Ttgjsi.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-CnudkJxk.js → TimelineRenderer-Da2lYs5D.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-VW6Wocdp.js → Tokens-B34-SduO.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-BtOxZqP6.js → Trigger-C8zyYm4R.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-XcGJoTQx.js → Trust-D1Pvqems.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-aASNCs5j.js → UkeySign-Do3VVnAy.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-Bz89M52u.js → VideoEditing-Dz7egVIA.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-uU4dSS_N.js → Wallet-Dcuw-OxR.js} +3 -3
- package/src/assets/web-panel/assets/{WebAuthn-Brrroxgr.js → WebAuthn-DPlw-QsB.js} +3 -3
- package/src/assets/web-panel/assets/{WorkflowEditor-Cny-evI9.js → WorkflowEditor-h4OsnU5q.js} +1 -1
- package/src/assets/web-panel/assets/{chat-CJ5iSwWq.js → chat-eO9wEwrW.js} +1 -1
- package/src/assets/web-panel/assets/{colors-DWa-2flG.js → colors-34lSmOXw.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-DFwUfptU.js → compact-item-CK4kEWJ4.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-FHWWcyeB.js → createContext-E0A57xed.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-CF3xafX2.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-QY_TElrN.js → hasIn-BD9ZMGAl.js} +1 -1
- package/src/assets/web-panel/assets/{index-BcVr-LOk.js → index--N0u6kTG.js} +1 -1
- package/src/assets/web-panel/assets/{index-CUiTugu3.js → index-8qMA1DWQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-0umhind6.js → index-B0rkHxKK.js} +1 -1
- package/src/assets/web-panel/assets/{index-wqiOz655.js → index-B_G_ElKO.js} +1 -1
- package/src/assets/web-panel/assets/{index-B18zERdP.js → index-BbX_Dted.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dy2PnKZx.js → index-Bjs90Eh9.js} +1 -1
- package/src/assets/web-panel/assets/{index-th467RN6.js → index-BmNbU2Z6.js} +1 -1
- package/src/assets/web-panel/assets/{index-uRUZdL7I.js → index-Brqc9Emx.js} +1 -1
- package/src/assets/web-panel/assets/{index-hw1J_Oxs.js → index-BsGmo6v1.js} +1 -1
- package/src/assets/web-panel/assets/index-C907rPwd.js +1 -0
- package/src/assets/web-panel/assets/{index-CjejB-z9.js → index-CT1_eRL-.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaHvj4jA.js → index-CZBaqe3d.js} +1 -1
- package/src/assets/web-panel/assets/{index-B33frlaD.js → index-CZkFMeWL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BYbwQ7SP.js → index-Ch175NUw.js} +1 -1
- package/src/assets/web-panel/assets/{index-va4Rt-yM.js → index-CsrKJJcX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DDpXDi4J.js → index-CuSau5ya.js} +1 -1
- package/src/assets/web-panel/assets/{index-D-Mhq8K6.js → index-Cx3Jn1r0.js} +1 -1
- package/src/assets/web-panel/assets/{index-CKS7n6mE.js → index-Cz3unNfL.js} +1 -1
- package/src/assets/web-panel/assets/{index-BRsGZBHc.js → index-D4bB_x_v.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bd7McYpJ.js → index-DCn-ECvK.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUfILsc-.js → index-DFLE2qO9.js} +1 -1
- package/src/assets/web-panel/assets/{index-DUepuy7O.js → index-DGRxt5wj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BR4RMPnB.js → index-DONOUtlz.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dlq-u9E4.js → index-DP-UZAQN.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCHMVYG1.js → index-Da5fmOHB.js} +1 -1
- package/src/assets/web-panel/assets/{index-BiHRihC0.js → index-DcE1BspQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-CGv5In_T.js → index-DcbgVLOH.js} +1 -1
- package/src/assets/web-panel/assets/{index-BQCtBurK.js → index-DeXNCyQJ.js} +1 -1
- package/src/assets/web-panel/assets/{index-D2rPJ6Sv.js → index-DiT_REby.js} +1 -1
- package/src/assets/web-panel/assets/{index-CUoLd1dt.js → index-DpfisY1g.js} +1 -1
- package/src/assets/web-panel/assets/{index-2ufsNuVn.js → index-DrOalGut.js} +1 -1
- package/src/assets/web-panel/assets/{index-aTiI7lOQ.js → index-DrSAAuJj.js} +1 -1
- package/src/assets/web-panel/assets/{index-BUNwuu5v.js → index-DrsDA_md.js} +1 -1
- package/src/assets/web-panel/assets/{index-CkmgbT7h.js → index-DvKcroix.js} +1 -1
- package/src/assets/web-panel/assets/{index-BEjwv2x6.js → index-DzXjP44T.js} +1 -1
- package/src/assets/web-panel/assets/{index-CeGn0A4W.js → index-MIg5Z8qe.js} +1 -1
- package/src/assets/web-panel/assets/{index-C5F1vwec.js → index-o8pYehRq.js} +3 -3
- package/src/assets/web-panel/assets/index-wueRSK2d.js +1 -0
- package/src/assets/web-panel/assets/{index-w3SdYwaC.js → index-yAGBu2E0.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BeSPUFDz.js → initDefaultProps-DMTkAomF.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Dcajvjm9.js → motion-Cnti1F5g.js} +1 -1
- package/src/assets/web-panel/assets/{move-B76orau-.js → move-CGxmHUga.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-zB6yFwcX.js → mtc-parser-CuwwLoq7.js} +1 -1
- package/src/assets/web-panel/assets/{omit-BsbNjz8w.js → omit-BpdlTkPM.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-BiJ9tssQ.js → pickAttrs-D7nWrThp.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-BdfMjMeN.js → placementArrow-Bhx0TV8F.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-rV4LGpbU.js → responsiveObserve-CZ1KesZh.js} +1 -1
- package/src/assets/web-panel/assets/{slide-HsVw1qFQ.js → slide-CnldF8J6.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-D1ry8XPE.js → statusUtils-CZfo_GOA.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-B1t6aQQ_.js → styleChecker-B2QCcAv5.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-C8qbl-9w.js → useFlexGapSupport-DzzjIS4J.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-R7g_mYTC.js → useFs-B_atg9M0.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-Cd-kCe7Z.js → usePersonalDataHub-DhZs3QYN.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-9WhK5UWA.js → vnode-DcePTYAm.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-CUqppPco.js → zoom-BYmlnjRk.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +2 -2
- package/src/commands/agent.js +19 -1
- package/src/commands/evolution-knowledge.js +54 -0
- package/src/commands/evolution-workbench.js +83 -0
- package/src/commands/evolution.js +6 -1
- package/src/commands/serve.js +47 -0
- package/src/commands/skill.js +158 -16
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/session-protocol.js +2 -0
- package/src/gateways/ws/ws-agent-handler.js +124 -69
- package/src/gateways/ws/ws-server.js +19 -0
- package/src/generated/cc-agent-protocol.schema.json +7 -1
- package/src/harness/jsonl-session-store.js +25 -1
- package/src/index.js +11 -3
- package/src/lazy-dispatch.js +9 -1
- package/src/lib/app-server/cli-agent-kernel-adapter.js +8 -0
- package/src/lib/app-server/graph-runtime.js +40 -1
- package/src/lib/app-server/server.js +181 -3
- package/src/lib/app-server/websocket-transport.js +23 -0
- package/src/lib/evolution/agent-evolution-runtime-composition-brand.js +17 -0
- package/src/lib/evolution/agent-evolution-runtime-composition.js +165 -1
- package/src/lib/evolution/controlled-skill-production-pilot.js +912 -0
- package/src/lib/evolution/evolution-artifact-ports.js +30 -0
- package/src/lib/evolution/evolution-deployment-loader.js +208 -0
- package/src/lib/evolution/evolution-raw-crypto-shred.js +185 -0
- package/src/lib/evolution/evolution-release-train-ledger-adapter.js +335 -0
- package/src/lib/evolution/evolution-release-train.js +538 -0
- package/src/lib/evolution/evolution-workbench-batch-executor.js +195 -0
- package/src/lib/evolution/evolution-workbench-cli-host.js +169 -0
- package/src/lib/evolution/evolution-workbench-metrics-ledger-adapter.js +648 -0
- package/src/lib/evolution/evolution-workbench-metrics.js +943 -0
- package/src/lib/evolution/evolution-workbench-projection.js +753 -0
- package/src/lib/evolution/evolution-workbench-version-control.js +272 -0
- package/src/lib/evolution/evolvable-artifact-ledger-adapter.js +688 -0
- package/src/lib/evolution/governed-knowledge-artifact-lifecycle.js +364 -0
- package/src/lib/evolution/governed-knowledge-conflict-merge.js +352 -0
- package/src/lib/evolution/governed-knowledge-dependency-authority.js +273 -0
- package/src/lib/evolution/governed-knowledge-dependency-ledger-executor.js +646 -0
- package/src/lib/evolution/governed-knowledge-merge-ledger-executor.js +671 -0
- package/src/lib/evolution/governed-knowledge-merge-publisher-authority.js +310 -0
- package/src/lib/evolution/governed-knowledge-node-crypto-authority.js +348 -0
- package/src/lib/evolution/governed-knowledge-rbac-approval-authority.js +621 -0
- package/src/lib/evolution/governed-knowledge-review-host.js +249 -0
- package/src/lib/evolution/governed-knowledge-sync-ledger-adapter.js +729 -0
- package/src/lib/evolution/governed-knowledge-sync-merge-publisher.js +312 -0
- package/src/lib/evolution/governed-knowledge-sync.js +795 -0
- package/src/lib/evolution/governed-knowledge-trust-ledger.js +707 -0
- package/src/lib/evolution/governed-skill-marketplace.js +430 -0
- package/src/lib/evolution/governed-wiki-pruning.js +435 -0
- package/src/lib/evolution/skill-outcome-index-authority.js +268 -0
- package/src/lib/evolution/skill-outcome-source-catalog-authority.js +237 -0
- package/src/lib/evolution/skill-writer-inventory-manifest.js +7 -6
- package/src/lib/evolution/statistical-progressive-canary.js +683 -0
- package/src/lib/evolution/wikiskill-benchmark.js +510 -0
- package/src/lib/public-ide-capability-manifest.js +4 -0
- package/src/lib/session-host-lease.js +11 -16
- package/src/lib/skill-outcome-authority.js +43 -0
- package/src/lib/skill-outcome-transcript-authority.js +252 -0
- package/src/lib/skill-retrieval-router-benchmark.js +135 -0
- package/src/lib/skill-retrieval-router.js +235 -0
- package/src/lib/skill-vector-authority.js +325 -0
- package/src/lib/skill-vector-process-authority.js +386 -0
- package/src/repl/agent-repl.js +7 -1
- package/src/runtime/agent-core.js +133 -13
- package/src/runtime/agent-runtime.js +42 -0
- package/src/runtime/headless-runner.js +32 -0
- package/src/runtime/headless-stream.js +39 -1
- package/src/runtime/runtime-factory.js +62 -4
- package/src/assets/web-panel/assets/ChatBubbleRenderer-eMmw1eZF.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DxufPwXC.js +0 -1
- package/src/assets/web-panel/assets/index-ZMTB9p5z.js +0 -1
- package/src/assets/web-panel/assets/index-_PvIDelE.js +0 -1
package/src/commands/serve.js
CHANGED
|
@@ -5,11 +5,50 @@
|
|
|
5
5
|
|
|
6
6
|
import { logger } from "../lib/logger.js";
|
|
7
7
|
import { createAgentRuntimeFactory } from "../runtime/runtime-factory.js";
|
|
8
|
+
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
9
|
+
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
10
|
+
import { isEvolutionWorkbenchCliHost } from "../lib/evolution/evolution-workbench-cli-host.js";
|
|
11
|
+
import { isGovernedKnowledgeReviewHost } from "../lib/evolution/governed-knowledge-review-host.js";
|
|
8
12
|
import path from "node:path";
|
|
9
13
|
|
|
14
|
+
export function captureServeGovernanceHosts({
|
|
15
|
+
evolutionWorkbenchHost = null,
|
|
16
|
+
governedKnowledgeReviewHost = null,
|
|
17
|
+
} = {}) {
|
|
18
|
+
if (
|
|
19
|
+
evolutionWorkbenchHost !== null &&
|
|
20
|
+
!isEvolutionWorkbenchCliHost(evolutionWorkbenchHost)
|
|
21
|
+
) {
|
|
22
|
+
throw new TypeError(
|
|
23
|
+
"serve evolutionWorkbenchHost must be a branded Workbench host",
|
|
24
|
+
);
|
|
25
|
+
}
|
|
26
|
+
if (
|
|
27
|
+
governedKnowledgeReviewHost !== null &&
|
|
28
|
+
!isGovernedKnowledgeReviewHost(governedKnowledgeReviewHost)
|
|
29
|
+
) {
|
|
30
|
+
throw new TypeError(
|
|
31
|
+
"serve governedKnowledgeReviewHost must be a branded review host",
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
return Object.freeze({
|
|
35
|
+
evolutionWorkbenchHost,
|
|
36
|
+
governedKnowledgeReviewHost,
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
10
40
|
export function registerServeCommand(program, dependencies = {}) {
|
|
11
41
|
const evolutionCompositionFactory =
|
|
12
42
|
dependencies.evolutionCompositionFactory ?? null;
|
|
43
|
+
const skillOutcomeIndex =
|
|
44
|
+
dependencies.skillOutcomeIndex == null
|
|
45
|
+
? null
|
|
46
|
+
: captureAgentSkillOutcomeIndex(dependencies.skillOutcomeIndex);
|
|
47
|
+
const skillVectorAuthority =
|
|
48
|
+
dependencies.skillVectorAuthority == null
|
|
49
|
+
? null
|
|
50
|
+
: captureSkillVectorAuthority(dependencies.skillVectorAuthority);
|
|
51
|
+
const governanceHosts = captureServeGovernanceHosts(dependencies);
|
|
13
52
|
const serve = program
|
|
14
53
|
.command("serve")
|
|
15
54
|
.description("Start WebSocket server for remote CLI access")
|
|
@@ -129,6 +168,9 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
129
168
|
store,
|
|
130
169
|
kernelFactory: () => new CliAgentKernelAdapter({ cwd }),
|
|
131
170
|
evolutionCompositionFactory,
|
|
171
|
+
skillOutcomeIndex,
|
|
172
|
+
skillVectorAuthority,
|
|
173
|
+
...governanceHosts,
|
|
132
174
|
maxQueuedRequests,
|
|
133
175
|
});
|
|
134
176
|
const info = await host.start();
|
|
@@ -159,6 +201,9 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
159
201
|
store,
|
|
160
202
|
kernel: new CliAgentKernelAdapter({ cwd }),
|
|
161
203
|
evolutionCompositionFactory,
|
|
204
|
+
skillOutcomeIndex,
|
|
205
|
+
skillVectorAuthority,
|
|
206
|
+
...governanceHosts,
|
|
162
207
|
maxQueuedRequests,
|
|
163
208
|
});
|
|
164
209
|
} finally {
|
|
@@ -171,6 +216,8 @@ export function registerServeCommand(program, dependencies = {}) {
|
|
|
171
216
|
evolutionCompositionFactory === null
|
|
172
217
|
? {}
|
|
173
218
|
: { evolutionCompositionFactory },
|
|
219
|
+
skillOutcomeIndex,
|
|
220
|
+
skillVectorAuthority,
|
|
174
221
|
}).createServerRuntime({
|
|
175
222
|
port: parseInt(opts.port, 10),
|
|
176
223
|
host: opts.host,
|
package/src/commands/skill.js
CHANGED
|
@@ -59,6 +59,12 @@ import {
|
|
|
59
59
|
} from "../lib/skill-packs/generator.js";
|
|
60
60
|
import { CLI_PACK_DOMAINS } from "../lib/skill-packs/schema.js";
|
|
61
61
|
import { registerRecordReplayCommands } from "./record-replay.js";
|
|
62
|
+
import { routeSkillDescriptors } from "../lib/skill-retrieval-router.js";
|
|
63
|
+
import { resolveSkillOutcomeAuthority } from "../lib/skill-outcome-authority.js";
|
|
64
|
+
import {
|
|
65
|
+
captureSkillVectorAuthority,
|
|
66
|
+
unavailableSkillVectorEvidence,
|
|
67
|
+
} from "../lib/skill-vector-authority.js";
|
|
62
68
|
|
|
63
69
|
const LAYER_LABELS = {
|
|
64
70
|
bundled: chalk.blue("[bundled]"),
|
|
@@ -75,6 +81,84 @@ function canRunOnPlatform(skill) {
|
|
|
75
81
|
return skill.os.includes(process.platform);
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
function validateSkillSearchRequest(skills, query, options = {}) {
|
|
85
|
+
if (
|
|
86
|
+
!Array.isArray(skills) ||
|
|
87
|
+
typeof query !== "string" ||
|
|
88
|
+
query.trim().length < 1 ||
|
|
89
|
+
query.length > 4096 ||
|
|
90
|
+
!options ||
|
|
91
|
+
typeof options !== "object" ||
|
|
92
|
+
Array.isArray(options)
|
|
93
|
+
) {
|
|
94
|
+
throw new TypeError("Skill search request is invalid");
|
|
95
|
+
}
|
|
96
|
+
const limit = options.limit === undefined ? 20 : Number(options.limit);
|
|
97
|
+
if (!Number.isSafeInteger(limit) || limit < 1 || limit > 64) {
|
|
98
|
+
throw new TypeError("Skill search limit must be an integer from 1 to 64");
|
|
99
|
+
}
|
|
100
|
+
for (const [name, value] of [
|
|
101
|
+
["category", options.category],
|
|
102
|
+
["source", options.source],
|
|
103
|
+
["tag", options.tag],
|
|
104
|
+
["os", options.os],
|
|
105
|
+
]) {
|
|
106
|
+
if (
|
|
107
|
+
value !== undefined &&
|
|
108
|
+
(typeof value !== "string" || value.length < 1 || value.length > 128)
|
|
109
|
+
) {
|
|
110
|
+
throw new TypeError(`Skill search ${name} is invalid or unbounded`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
return limit;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export function routeSkillSearch(skills, query, options = {}) {
|
|
117
|
+
const limit = validateSkillSearchRequest(skills, query, options);
|
|
118
|
+
const category = options.category ?? null;
|
|
119
|
+
const routedSkills =
|
|
120
|
+
category === null
|
|
121
|
+
? skills
|
|
122
|
+
: skills.filter(
|
|
123
|
+
(candidate) =>
|
|
124
|
+
String(candidate.category || "").toLowerCase() ===
|
|
125
|
+
category.toLowerCase(),
|
|
126
|
+
);
|
|
127
|
+
return routeSkillDescriptors({
|
|
128
|
+
skills: routedSkills,
|
|
129
|
+
query,
|
|
130
|
+
namespace: options.source ?? null,
|
|
131
|
+
tags: options.tag ? [options.tag] : [],
|
|
132
|
+
target: { os: options.os || process.platform },
|
|
133
|
+
outcomeMetrics: options.outcomeMetrics ?? null,
|
|
134
|
+
vectorScores: options.vectorScores ?? null,
|
|
135
|
+
topK: limit,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
|
|
139
|
+
export async function routeSkillSearchWithVectorAuthority(
|
|
140
|
+
skills,
|
|
141
|
+
query,
|
|
142
|
+
options = {},
|
|
143
|
+
authority = null,
|
|
144
|
+
) {
|
|
145
|
+
validateSkillSearchRequest(skills, query, options);
|
|
146
|
+
const vectorAuthority =
|
|
147
|
+
authority === null ? null : captureSkillVectorAuthority(authority);
|
|
148
|
+
const vector =
|
|
149
|
+
vectorAuthority === null
|
|
150
|
+
? null
|
|
151
|
+
: await vectorAuthority.score({ query, skills });
|
|
152
|
+
const routed = routeSkillSearch(skills, query, {
|
|
153
|
+
...options,
|
|
154
|
+
vectorScores: vector?.scores ?? null,
|
|
155
|
+
});
|
|
156
|
+
return Object.freeze({
|
|
157
|
+
...routed,
|
|
158
|
+
vectorAuthority: vector?.evidence ?? unavailableSkillVectorEvidence(),
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
|
|
78
162
|
export const SKILL_TEMPLATE_MD = (name) => `---
|
|
79
163
|
name: ${name}
|
|
80
164
|
display-name: ${name}
|
|
@@ -283,7 +367,11 @@ export async function runControlledSkill(options = {}) {
|
|
|
283
367
|
}
|
|
284
368
|
}
|
|
285
369
|
|
|
286
|
-
export function registerSkillCommand(program) {
|
|
370
|
+
export function registerSkillCommand(program, dependencies = {}) {
|
|
371
|
+
const skillVectorAuthority =
|
|
372
|
+
dependencies.skillVectorAuthority == null
|
|
373
|
+
? null
|
|
374
|
+
: captureSkillVectorAuthority(dependencies.skillVectorAuthority);
|
|
287
375
|
const skill = program
|
|
288
376
|
.command("skill")
|
|
289
377
|
.description(
|
|
@@ -455,32 +543,86 @@ export function registerSkillCommand(program) {
|
|
|
455
543
|
// skill search
|
|
456
544
|
skill
|
|
457
545
|
.command("search")
|
|
458
|
-
.description("Search skills
|
|
546
|
+
.description("Search digest-bound skills with the canonical router")
|
|
459
547
|
.argument("<query>", "Search query")
|
|
460
|
-
.
|
|
548
|
+
.option("--category <category>", "Filter by exact category")
|
|
549
|
+
.option("--tag <tag>", "Require an exact tag")
|
|
550
|
+
.option(
|
|
551
|
+
"--source <layer>",
|
|
552
|
+
"Filter by source layer (bundled, marketplace, managed, workspace)",
|
|
553
|
+
)
|
|
554
|
+
.option("--limit <count>", "Maximum results (1-64)", "20")
|
|
555
|
+
.option("--json", "Output the canonical routing result as JSON")
|
|
556
|
+
.action(async (query, options) => {
|
|
461
557
|
const skills = loader.loadAll();
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
558
|
+
try {
|
|
559
|
+
validateSkillSearchRequest(skills, query, options);
|
|
560
|
+
} catch (error) {
|
|
561
|
+
logger.error(error.message);
|
|
562
|
+
process.exitCode = 1;
|
|
563
|
+
return;
|
|
564
|
+
}
|
|
565
|
+
const outcomeAuthority = resolveSkillOutcomeAuthority(
|
|
566
|
+
Object.prototype.hasOwnProperty.call(dependencies, "skillOutcomeIndex")
|
|
567
|
+
? { index: dependencies.skillOutcomeIndex }
|
|
568
|
+
: {},
|
|
469
569
|
);
|
|
570
|
+
let result;
|
|
571
|
+
try {
|
|
572
|
+
result = await routeSkillSearchWithVectorAuthority(
|
|
573
|
+
skills,
|
|
574
|
+
query,
|
|
575
|
+
{
|
|
576
|
+
...options,
|
|
577
|
+
outcomeMetrics: outcomeAuthority.metrics,
|
|
578
|
+
},
|
|
579
|
+
skillVectorAuthority,
|
|
580
|
+
);
|
|
581
|
+
result = Object.freeze({
|
|
582
|
+
...result,
|
|
583
|
+
outcomeAuthority: outcomeAuthority.evidence,
|
|
584
|
+
});
|
|
585
|
+
} catch (error) {
|
|
586
|
+
logger.error(error.message);
|
|
587
|
+
process.exitCode = 1;
|
|
588
|
+
return;
|
|
589
|
+
}
|
|
470
590
|
|
|
471
|
-
if (
|
|
591
|
+
if (options.json) {
|
|
592
|
+
console.log(JSON.stringify(result, null, 2));
|
|
593
|
+
return;
|
|
594
|
+
}
|
|
595
|
+
|
|
596
|
+
if (result.candidates.length === 0) {
|
|
472
597
|
logger.info(`No skills matching "${query}"`);
|
|
473
598
|
return;
|
|
474
599
|
}
|
|
475
600
|
|
|
601
|
+
if (!["verified", "verified-indexed"].includes(outcomeAuthority.status)) {
|
|
602
|
+
logger.warn(
|
|
603
|
+
"Verified Skill outcome history is unavailable; retrieval is not using partial transcript metrics.",
|
|
604
|
+
);
|
|
605
|
+
}
|
|
606
|
+
|
|
476
607
|
logger.log(
|
|
477
|
-
chalk.bold(
|
|
608
|
+
chalk.bold(
|
|
609
|
+
`\nSearch results for "${query}" (${result.candidates.length}):\n`,
|
|
610
|
+
),
|
|
478
611
|
);
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
|
|
612
|
+
if (result.selected === null && result.conflicts.length > 0) {
|
|
613
|
+
logger.warn(
|
|
614
|
+
"No automatic selection: narrow the query or filters to resolve the reported conflict.",
|
|
615
|
+
);
|
|
616
|
+
}
|
|
617
|
+
for (const candidate of result.candidates) {
|
|
618
|
+
const label = LAYER_LABELS[candidate.namespace] || "";
|
|
619
|
+
logger.log(
|
|
620
|
+
` ${chalk.cyan(candidate.id.padEnd(30))} ${chalk.gray(`v${candidate.version}`)} ${label}`,
|
|
621
|
+
);
|
|
482
622
|
logger.log(
|
|
483
|
-
|
|
623
|
+
chalk.gray(
|
|
624
|
+
` ${candidate.digest} score=${candidate.score.toFixed(3)} ${candidate.reason}`,
|
|
625
|
+
),
|
|
484
626
|
);
|
|
485
627
|
}
|
|
486
628
|
logger.log("");
|
package/src/data/changelog.json
CHANGED
|
@@ -1,6 +1,32 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "CHANGELOG.md",
|
|
3
3
|
"releases": [
|
|
4
|
+
{
|
|
5
|
+
"productVersion": null,
|
|
6
|
+
"cliVersion": "0.166.22",
|
|
7
|
+
"cliVersions": ["0.166.21", "0.166.22"],
|
|
8
|
+
"date": "2026-09-05",
|
|
9
|
+
"title": "",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"heading": "Fixed - cc CLI 0.166.22: keep IDE Agent streams alive during slow commands",
|
|
13
|
+
"body": "> `chainlesschain` **0.166.21 -> 0.166.22** (release candidate,\n> 2026-09-05).\n\n- **Responsive persistent IDE streams**: execute foreground shell commands\n asynchronously for `stream-json` hosts, so a slow networked command such as\n `git push` no longer blocks the Agent protocol pump or session-lease\n heartbeat.\n- **Safe late heartbeat recovery**: let the exact live local lease owner renew\n after an event-loop stall. A revocation or successor still changes the\n durable authority tuple and fences the old host before any guarded write.\n- **Regression coverage**: verify event-loop responsiveness, late renewal, and\n the IDE stream's non-blocking shell option while retaining the existing\n takeover, revocation, and delegated-writer fences.\n- **Release inventory coherence**: align the Skill-writer inventory with the\n current candidate-only sync and inactive marketplace-plugin staging paths,\n removing stale evidence for legacy active hot-loading.\n- **Release boundary**: publication requires this exact release commit to pass\n every configured Linux, Windows, and macOS job in `CLI CI` and\n `CLI Strict Sandbox`; no Session Core, Agent SDK/Protocol, Personal Data Hub,\n or other npm workspace version changes are required for this CLI-only fix."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"productVersion": null,
|
|
19
|
+
"cliVersion": "0.166.21",
|
|
20
|
+
"cliVersions": ["0.1.8", "0.2.8", "0.3.11", "0.166.20", "0.166.21"],
|
|
21
|
+
"date": "2026-09-04",
|
|
22
|
+
"title": "",
|
|
23
|
+
"sections": [
|
|
24
|
+
{
|
|
25
|
+
"heading": "Added - cc CLI 0.166.21: governed evolution knowledge and IDE review",
|
|
26
|
+
"body": "> `chainlesschain` **0.166.20 -> 0.166.21**,\n> `@chainlesschain/session-core` **0.3.10 -> 0.3.11**,\n> `@chainlesschain/agent-protocol` **0.1.7 -> 0.1.8**,\n> `@chainlesschain/agent-sdk` **0.2.7 -> 0.2.8**, and\n> `chainlesschain-agent-sdk` **0.2.7 -> 0.2.8** (release candidates,\n> 2026-09-04).\n\n- **Governed knowledge synchronization**: add tenant-scoped encrypted sharing,\n durable conflict review, human-approved merge publication, revocation\n dependency settlement, reviewer key lifecycle, and response-loss recovery.\n- **Evolution Workbench and Skill Retrieval**: expose bounded, digest-verified\n review and evidence-ranked search through CLI, App Server, Desktop, VS Code,\n and JetBrains surfaces without moving mutation authority into IDE clients.\n- **Coordinated runtime contracts**: ship durable Skill-invocation receipts in\n Session Core, refreshed Kotlin and Swift protocol projections, and the latest\n App Server pilot client behavior in both TypeScript and Python SDKs. Personal\n Data Hub remains `0.4.59` because its published source has not changed.\n- **Release boundary**: publication requires this exact release commit to pass\n every configured Linux, Windows, and macOS job in `CLI CI` and\n `CLI Strict Sandbox`, plus the affected protocol and SDK gates. Publish the\n dependency packages before the pinned CLI, followed by registry and IDE\n marketplace readback."
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
4
30
|
{
|
|
5
31
|
"productVersion": null,
|
|
6
32
|
"cliVersion": "0.166.20",
|
|
@@ -648,6 +648,8 @@ async function ensureSessionHandler(
|
|
|
648
648
|
sessionHostLease,
|
|
649
649
|
sessionBudgetRoot,
|
|
650
650
|
evolutionCompositionFactory: server.evolutionCompositionFactory,
|
|
651
|
+
skillOutcomeIndex: server.skillOutcomeIndex,
|
|
652
|
+
skillVectorAuthority: server.skillVectorAuthority,
|
|
651
653
|
});
|
|
652
654
|
sessionHostLease = null;
|
|
653
655
|
sessionBudgetRoot = null;
|
|
@@ -74,6 +74,8 @@ import {
|
|
|
74
74
|
settleWsTurnClaim,
|
|
75
75
|
} from "../../harness/jsonl-session-store.js";
|
|
76
76
|
import { sessionBudgetAdmissionError } from "../../lib/session-budget-production-root.js";
|
|
77
|
+
import { captureAgentSkillOutcomeIndex } from "../../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
78
|
+
import { captureSkillVectorAuthority } from "../../lib/skill-vector-authority.js";
|
|
77
79
|
import {
|
|
78
80
|
beginSessionBudgetUsage,
|
|
79
81
|
markSessionBudgetUsageUnknown,
|
|
@@ -178,6 +180,8 @@ export class WSAgentHandler {
|
|
|
178
180
|
sessionBudgetRoot = null,
|
|
179
181
|
hostResourceBudget = null,
|
|
180
182
|
evolutionCompositionFactory = null,
|
|
183
|
+
skillOutcomeIndex = null,
|
|
184
|
+
skillVectorAuthority = null,
|
|
181
185
|
}) {
|
|
182
186
|
this.session = session;
|
|
183
187
|
this.interaction = interaction;
|
|
@@ -252,6 +256,23 @@ export class WSAgentHandler {
|
|
|
252
256
|
throw new TypeError("evolutionCompositionFactory must be a function");
|
|
253
257
|
}
|
|
254
258
|
this._evolutionCompositionFactory = evolutionCompositionFactory;
|
|
259
|
+
this._skillOutcomeIndex =
|
|
260
|
+
skillOutcomeIndex === null
|
|
261
|
+
? null
|
|
262
|
+
: captureAgentSkillOutcomeIndex(skillOutcomeIndex);
|
|
263
|
+
this._skillVectorAuthority =
|
|
264
|
+
skillVectorAuthority === null
|
|
265
|
+
? null
|
|
266
|
+
: captureSkillVectorAuthority(skillVectorAuthority);
|
|
267
|
+
if (
|
|
268
|
+
this._skillOutcomeIndex !== null &&
|
|
269
|
+
this._skillVectorAuthority !== null &&
|
|
270
|
+
this._skillOutcomeIndex.tenantId !== this._skillVectorAuthority.tenantId
|
|
271
|
+
) {
|
|
272
|
+
throw new TypeError(
|
|
273
|
+
"WebSocket retrieval authorities must share one tenant",
|
|
274
|
+
);
|
|
275
|
+
}
|
|
255
276
|
this._compactionLlmQuery = compactionLlmQuery || null;
|
|
256
277
|
this._compactionSettlementBlock = null;
|
|
257
278
|
this._compactionChatFn =
|
|
@@ -333,6 +354,22 @@ export class WSAgentHandler {
|
|
|
333
354
|
"Agent evolution composition belongs to another WebSocket turn",
|
|
334
355
|
);
|
|
335
356
|
}
|
|
357
|
+
if (
|
|
358
|
+
this._skillOutcomeIndex !== null &&
|
|
359
|
+
composition.tenantId !== this._skillOutcomeIndex.tenantId
|
|
360
|
+
) {
|
|
361
|
+
throw new TypeError(
|
|
362
|
+
"WebSocket evolution composition and Skill outcome index must share one tenant",
|
|
363
|
+
);
|
|
364
|
+
}
|
|
365
|
+
if (
|
|
366
|
+
this._skillVectorAuthority !== null &&
|
|
367
|
+
composition.tenantId !== this._skillVectorAuthority.tenantId
|
|
368
|
+
) {
|
|
369
|
+
throw new TypeError(
|
|
370
|
+
"WebSocket evolution composition and Skill vector authority must share one tenant",
|
|
371
|
+
);
|
|
372
|
+
}
|
|
336
373
|
await composition.evolutionIngress.start();
|
|
337
374
|
return composition;
|
|
338
375
|
} catch (cause) {
|
|
@@ -821,44 +858,50 @@ export class WSAgentHandler {
|
|
|
821
858
|
let result;
|
|
822
859
|
try {
|
|
823
860
|
this._sessionHostLease?.assert?.();
|
|
824
|
-
result = await this._compactContextMemory(
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
842
|
-
|
|
843
|
-
|
|
844
|
-
|
|
845
|
-
|
|
861
|
+
result = await this._compactContextMemory(
|
|
862
|
+
session.messages,
|
|
863
|
+
{
|
|
864
|
+
provider: session.provider,
|
|
865
|
+
model: session.model,
|
|
866
|
+
baseUrl: session.baseUrl,
|
|
867
|
+
apiKey: session.apiKey,
|
|
868
|
+
signal:
|
|
869
|
+
signal ||
|
|
870
|
+
this._sessionBudgetSignal ||
|
|
871
|
+
this._sessionHostLease?.signal,
|
|
872
|
+
onlyIfNeeded: true,
|
|
873
|
+
preserveCompletedExchange: true,
|
|
874
|
+
llmQuery: this._compactionLlmQuery,
|
|
875
|
+
chatFn: this._compactionChatFn,
|
|
876
|
+
chatOptions: {
|
|
877
|
+
cwd: session.projectRoot,
|
|
878
|
+
sessionId: session.id,
|
|
879
|
+
},
|
|
880
|
+
...(meterCompaction
|
|
881
|
+
? {
|
|
882
|
+
onProviderCallStart: () => {
|
|
883
|
+
const call = this._beginCanonicalCompactionUsage();
|
|
884
|
+
compactionUsageCall = call;
|
|
885
|
+
return call.callId;
|
|
886
|
+
},
|
|
887
|
+
}
|
|
888
|
+
: {}),
|
|
889
|
+
maxMessages: session.compactionMaxMessages,
|
|
890
|
+
maxTokens: session.compactionMaxTokens,
|
|
891
|
+
maxOutputTokens: session.compactionMaxOutputTokens,
|
|
892
|
+
summaryInputMaxChars: session.compactionInputMaxChars,
|
|
893
|
+
onContextMemorySummarySettled: (summaryResult) => {
|
|
894
|
+
if (compactionUsageCall && !compactionUsageSettled) {
|
|
895
|
+
this._settleCanonicalCompactionUsage(
|
|
896
|
+
compactionUsageCall,
|
|
897
|
+
summaryResult,
|
|
898
|
+
);
|
|
899
|
+
compactionUsageSettled = true;
|
|
846
900
|
}
|
|
847
|
-
|
|
848
|
-
maxMessages: session.compactionMaxMessages,
|
|
849
|
-
maxTokens: session.compactionMaxTokens,
|
|
850
|
-
maxOutputTokens: session.compactionMaxOutputTokens,
|
|
851
|
-
summaryInputMaxChars: session.compactionInputMaxChars,
|
|
852
|
-
onContextMemorySummarySettled: (summaryResult) => {
|
|
853
|
-
if (compactionUsageCall && !compactionUsageSettled) {
|
|
854
|
-
this._settleCanonicalCompactionUsage(
|
|
855
|
-
compactionUsageCall,
|
|
856
|
-
summaryResult,
|
|
857
|
-
);
|
|
858
|
-
compactionUsageSettled = true;
|
|
859
|
-
}
|
|
901
|
+
},
|
|
860
902
|
},
|
|
861
|
-
|
|
903
|
+
"auto",
|
|
904
|
+
);
|
|
862
905
|
if (compactionUsageCall && !compactionUsageSettled) {
|
|
863
906
|
this._settleCanonicalCompactionUsage(compactionUsageCall, result);
|
|
864
907
|
compactionUsageSettled = true;
|
|
@@ -1471,6 +1514,12 @@ export class WSAgentHandler {
|
|
|
1471
1514
|
shellPolicyOverrides: session.shellPolicyOverrides || null,
|
|
1472
1515
|
slotFiller,
|
|
1473
1516
|
interaction: this.interaction,
|
|
1517
|
+
...(this._skillOutcomeIndex === null
|
|
1518
|
+
? {}
|
|
1519
|
+
: { skillOutcomeIndex: this._skillOutcomeIndex }),
|
|
1520
|
+
...(this._skillVectorAuthority === null
|
|
1521
|
+
? {}
|
|
1522
|
+
: { skillVectorAuthority: this._skillVectorAuthority }),
|
|
1474
1523
|
signal: turnSignal,
|
|
1475
1524
|
sessionBudget: this._sessionBudget,
|
|
1476
1525
|
// P0 authority: null unless opted in (byte-identical default — agent
|
|
@@ -1567,6 +1616,7 @@ export class WSAgentHandler {
|
|
|
1567
1616
|
? event.result?.skill || event.result?.skill_name || undefined
|
|
1568
1617
|
: undefined),
|
|
1569
1618
|
durationMs,
|
|
1619
|
+
invocationReceipt: event.result?.invocationReceipt,
|
|
1570
1620
|
});
|
|
1571
1621
|
if (record.providerId) activeToolCalls.delete(record.providerId);
|
|
1572
1622
|
const index = activeToolCallOrder.indexOf(record);
|
|
@@ -2183,41 +2233,46 @@ export class WSAgentHandler {
|
|
|
2183
2233
|
try {
|
|
2184
2234
|
this.assertSessionBudgetAdmission("WebSocket compaction");
|
|
2185
2235
|
this._sessionHostLease?.assert?.();
|
|
2186
|
-
result = await this._compactContextMemory(
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2236
|
+
result = await this._compactContextMemory(
|
|
2237
|
+
session.messages,
|
|
2238
|
+
{
|
|
2239
|
+
provider: session.provider,
|
|
2240
|
+
model: session.model,
|
|
2241
|
+
baseUrl: session.baseUrl,
|
|
2242
|
+
apiKey: session.apiKey,
|
|
2243
|
+
signal:
|
|
2244
|
+
this._sessionBudgetSignal || this._sessionHostLease?.signal,
|
|
2245
|
+
force: true,
|
|
2246
|
+
preserveCompletedExchange: true,
|
|
2247
|
+
llmQuery: this._compactionLlmQuery,
|
|
2248
|
+
chatFn: this._compactionChatFn,
|
|
2249
|
+
chatOptions: {
|
|
2250
|
+
cwd: session.projectRoot,
|
|
2251
|
+
sessionId: session.id,
|
|
2252
|
+
},
|
|
2253
|
+
...(meterCompaction
|
|
2254
|
+
? {
|
|
2255
|
+
onProviderCallStart: () => {
|
|
2256
|
+
const call = this._beginCanonicalCompactionUsage();
|
|
2257
|
+
compactionUsageCall = call;
|
|
2258
|
+
return call.callId;
|
|
2259
|
+
},
|
|
2260
|
+
}
|
|
2261
|
+
: {}),
|
|
2262
|
+
maxOutputTokens: session.compactionMaxOutputTokens,
|
|
2263
|
+
summaryInputMaxChars: session.compactionInputMaxChars,
|
|
2264
|
+
onContextMemorySummarySettled: (summaryResult) => {
|
|
2265
|
+
if (compactionUsageCall && !compactionUsageSettled) {
|
|
2266
|
+
this._settleCanonicalCompactionUsage(
|
|
2267
|
+
compactionUsageCall,
|
|
2268
|
+
summaryResult,
|
|
2269
|
+
);
|
|
2270
|
+
compactionUsageSettled = true;
|
|
2207
2271
|
}
|
|
2208
|
-
|
|
2209
|
-
maxOutputTokens: session.compactionMaxOutputTokens,
|
|
2210
|
-
summaryInputMaxChars: session.compactionInputMaxChars,
|
|
2211
|
-
onContextMemorySummarySettled: (summaryResult) => {
|
|
2212
|
-
if (compactionUsageCall && !compactionUsageSettled) {
|
|
2213
|
-
this._settleCanonicalCompactionUsage(
|
|
2214
|
-
compactionUsageCall,
|
|
2215
|
-
summaryResult,
|
|
2216
|
-
);
|
|
2217
|
-
compactionUsageSettled = true;
|
|
2218
|
-
}
|
|
2272
|
+
},
|
|
2219
2273
|
},
|
|
2220
|
-
|
|
2274
|
+
"manual",
|
|
2275
|
+
);
|
|
2221
2276
|
if (compactionUsageCall && !compactionUsageSettled) {
|
|
2222
2277
|
this._settleCanonicalCompactionUsage(compactionUsageCall, result);
|
|
2223
2278
|
compactionUsageSettled = true;
|
|
@@ -15,6 +15,8 @@ import { createHash, randomBytes, timingSafeEqual } from "node:crypto";
|
|
|
15
15
|
import { fileURLToPath } from "node:url";
|
|
16
16
|
import { dirname, join } from "node:path";
|
|
17
17
|
import { WebSocketServer } from "ws";
|
|
18
|
+
import { captureAgentSkillOutcomeIndex } from "../../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
19
|
+
import { captureSkillVectorAuthority } from "../../lib/skill-vector-authority.js";
|
|
18
20
|
import {
|
|
19
21
|
createEnvelope,
|
|
20
22
|
envelopeFromStreamEvent,
|
|
@@ -330,6 +332,23 @@ export class ChainlessChainWSServer extends EventEmitter {
|
|
|
330
332
|
}
|
|
331
333
|
this.evolutionCompositionFactory =
|
|
332
334
|
options.evolutionCompositionFactory || null;
|
|
335
|
+
this.skillOutcomeIndex =
|
|
336
|
+
options.skillOutcomeIndex == null
|
|
337
|
+
? null
|
|
338
|
+
: captureAgentSkillOutcomeIndex(options.skillOutcomeIndex);
|
|
339
|
+
this.skillVectorAuthority =
|
|
340
|
+
options.skillVectorAuthority == null
|
|
341
|
+
? null
|
|
342
|
+
: captureSkillVectorAuthority(options.skillVectorAuthority);
|
|
343
|
+
if (
|
|
344
|
+
this.skillOutcomeIndex !== null &&
|
|
345
|
+
this.skillVectorAuthority !== null &&
|
|
346
|
+
this.skillOutcomeIndex.tenantId !== this.skillVectorAuthority.tenantId
|
|
347
|
+
) {
|
|
348
|
+
throw new TypeError(
|
|
349
|
+
"WebSocket retrieval authorities must share one tenant",
|
|
350
|
+
);
|
|
351
|
+
}
|
|
333
352
|
|
|
334
353
|
/** Optional Phase-5 envelope bus for fan-out to hosted HTTP SSE. */
|
|
335
354
|
this.envelopeBus = options.envelopeBus || null;
|
|
@@ -3649,7 +3649,13 @@
|
|
|
3649
3649
|
"graph/status",
|
|
3650
3650
|
"graph/history",
|
|
3651
3651
|
"graph/cancel",
|
|
3652
|
-
"graph/reconcile"
|
|
3652
|
+
"graph/reconcile",
|
|
3653
|
+
"evolution/workbench/list",
|
|
3654
|
+
"evolution/workbench/compare",
|
|
3655
|
+
"evolution/workbench/review",
|
|
3656
|
+
"evolution/workbench/rollback",
|
|
3657
|
+
"evolution/knowledge/conflicts",
|
|
3658
|
+
"evolution/knowledge/merge"
|
|
3653
3659
|
]
|
|
3654
3660
|
}
|
|
3655
3661
|
}
|