chainlesschain 0.166.45 → 0.166.47
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 +6 -4
- package/package.json +3 -1
- package/src/assets/web-panel/assets/{AIOps-CrMhYNeH.js → AIOps-CDpT0WXV.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-DLY5blZ3.js → ActionButton-BNfUljWx.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-C0NhKQB0.js → Analytics-C9323DEx.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-DLyepgMq.js → AppLayout-CRrjb2db.js} +5 -5
- package/src/assets/web-panel/assets/{Artifacts-Depk01Sa.js → Artifacts-Db-DGqJS.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-jKe6NQ3J.js → Audit-CJdHRJ0W.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-CG4GKT9s.js → BackgroundAgents-_RSCnTYs.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-DYWCkzwM.js → Backup-8GFQi-dM.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-xm5vodmJ.js → BaseInput-C87NtgUZ.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-B20_PNd3.js → Chat-DcTMWS8G.js} +5 -5
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-D4d-eh0F.js → ChatBubbleRenderer-5ZDPTW_H.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-CfgwkV_r.js → Checkbox-DM9EmYee.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-DbnoWI44.js → Codegen-M2YqDRNN.js} +1 -1
- package/src/assets/web-panel/assets/{Col-CfzzhgGw.js → Col-oB1LLxyf.js} +1 -1
- package/src/assets/web-panel/assets/{Community-BU7mGM8p.js → Community-TcVZK5tF.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DpYim0an.js → Compact-XKmq-3K_.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-BNJcO6ra.js → Compliance-C6CBiDRy.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CecZ-pWj.js → Cowork-Dz9CGqXH.js} +4 -4
- package/src/assets/web-panel/assets/{Cron-BG_C1fe3.js → Cron-CxJDgDVL.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BAeILQLL.js → Crosschain-DMP0JsaQ.js} +1 -1
- package/src/assets/web-panel/assets/{DID-CYqOEkXi.js → DID-I5IQeogb.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-BYU8wmL1.js → Dashboard-BfLW2MXj.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DYlJeTTa.js → Dropdown-BK8EjAlh.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-C0M6py3K.js → EmailListRenderer-C3iqSv5I.js} +1 -1
- package/src/assets/web-panel/assets/EvolutionSettings-BJmBzpW6.js +1 -0
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-Du90iDch.js → FamilyGuardDashboard-T19rnqm-.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DkFp_hzB.js → Federation-CozrbPMy.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-BGgtGTfG.js → FormItemContext-k1dCLNNJ.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BIDsSCei.js → GenericCardRenderer-DbaW_Jvt.js} +1 -1
- package/src/assets/web-panel/assets/{Git--d3Te93J.js → Git-CQHRyEIt.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CZwD0vmO.js → Governance-BMJYZgMy.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-DiDcSFEW.js → Inference-B7mpNU7V.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-Bi0hSfzg.js → KnowledgeGraph-Br0Blg6B.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-C8NHSc0K.js → Logs-HIdk0S6M.js} +2 -2
- package/src/assets/web-panel/assets/{MarkdownRenderer-DfDuADqF.js → MarkdownRenderer-HxeocBHy.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-D6kD0bNf.js → Marketplace-Bkfq69UP.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-mTSamCr5.js → McpTools-dtmx0bHO.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-YQBXfLjU.js → Memory-CrRlOuEf.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-D2awuupp.js → MobileBridge-D4ZIZiAH.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-Bl7lZc_-.js → MobileProjects-C90Rw7GE.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-CBqjLK2Q.js → Mtc-CC6k_uh4.js} +5 -5
- package/src/assets/web-panel/assets/{MtcAudit-C4poRInZ.js → MtcAudit-T_CUIYUy.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-C_J0zXYZ.js → Multisig-N_e0RRWk.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-Ci43sWOU.js → NLProgramming-Iq3VzEv0.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-DN7A-GFZ.js → Notes-B5sKJUJt.js} +4 -4
- package/src/assets/web-panel/assets/{NotificationSettings-D5jNm71V.js → NotificationSettings-K8UVp8qQ.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-C9UsPOG8.js → OrderTableRenderer-BWNyM-6m.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-BapYMJrP.js → Organization-DMO1NJxI.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-BwxwjhFw.js → Overflow-BBY6b31Z.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-TObXXOu3.js → P2P-DmsL0y0v.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-UwJvMbFO.js → PdhVaultBrowser-C65AX_RY.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-Damnxv-O.js → Permissions-CWcpRtWa.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-d_7jlBb-.js → PersonalDataHub--ZNDIdsn.js} +3 -3
- package/src/assets/web-panel/assets/{Pipeline-DA87VjLw.js → Pipeline-DCdj5NGb.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-DzO_UvWn.js → Privacy-BRKu7Q3E.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-CwqECDhs.js → ProjectInit-BJ7ozIAb.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-CT5YdIl6.js → ProjectSettings-B2cVLiXW.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-D3KdZPCv.js → Projects-Ce9r_W-p.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-BjBIS8kk.js → Providers-BDespvGZ.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-mMFqiKkI.js → QrScannerModal-BUNO4fDU.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-BwGi9ZU1.js → QuickAsk-D2TUqeBV.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BY65SR5s.js → Recommend-BNNQPHBH.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BGsVH_XU.js → RemoteSession-D2t1V_Cm.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-DpPbxSgI.js → Reputation-DVK5hEqI.js} +1 -1
- package/src/assets/web-panel/assets/{Row-B5YBYoVz.js → Row-BB9RTwmE.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DvM5jaoh.js → RssFeed-DmEO7liZ.js} +2 -2
- package/src/assets/web-panel/assets/{Search-6RX39EPO.js → Search-UwEYjnDB.js} +1 -1
- package/src/assets/web-panel/assets/{Security-Beal-7cM.js → Security-DebqSsMp.js} +4 -4
- package/src/assets/web-panel/assets/{Services-D6rjVLe-.js → Services-CuuPts3C.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-Dur7R7vz.js → Skeleton-DbWpmbgf.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-D1QkGwMk.js → Skills-BaK7SxzT.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-3ObrX8Es.js → Sla-BFHv51Jb.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-DG_KAiH1.js → SpeechSettings-B9b1R6uK.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-BaHq0SJ2.js → SyncSettings-BnO0CN02.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-BDpAkBAB.js → Tasks-Dy01Vq49.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-tYdoRd-c.js → Templates-BCy2AMHc.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-yGS5zIQ1.js → Tenant-4Tx9y_Y1.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-B3QbmVFa.js → Terminal-CPOoUH8J.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-B_7Pr5dS.js → TimelineRenderer-C85GlJzu.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-DPvpDa53.js → Tokens-_xneFBGF.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-DcSAD0GZ.js → Trigger-BizG4rTr.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-BBzEq-uy.js → Trust-Dh8EIn3n.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-Dssav7-5.js → UkeySign-C5NWoHWQ.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-CPOZf4yi.js → VideoEditing-0YfrySL6.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-BzBVRXEq.js → Wallet-BZVH8Ags.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-DdSGaCCh.js → WebAuthn-kNofa6vm.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-CKjBFoSs.js → WorkflowEditor-BNO34_j0.js} +1 -1
- package/src/assets/web-panel/assets/{chat-B9aMGLg0.js → chat-ifQ2FlwD.js} +1 -1
- package/src/assets/web-panel/assets/{colors-GFCMctSV.js → colors-1TL8H6EH.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-BqSDFAYJ.js → compact-item-DBfRjs_T.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-BwUm3Ffp.js → createContext-Bs6V4iBf.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-BHnbnuYL.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-DN1kMJOT.js → hasIn-Bz6LMY_0.js} +1 -1
- package/src/assets/web-panel/assets/{index-B4dI_csl.js → index--WvT2Il3.js} +1 -1
- package/src/assets/web-panel/assets/{index-B7Yu5wwV.js → index-84mi5rsv.js} +1 -1
- package/src/assets/web-panel/assets/{index-DAK28GY8.js → index-B5SJCUZ7.js} +1 -1
- package/src/assets/web-panel/assets/{index-CmEHzOsw.js → index-B6RClMZl.js} +1 -1
- package/src/assets/web-panel/assets/{index-By9GbJhu.js → index-BB1Af7Fv.js} +1 -1
- package/src/assets/web-panel/assets/{index-7W1e9Vi4.js → index-BQL_tldd.js} +1 -1
- package/src/assets/web-panel/assets/{index-BDL2MwxN.js → index-BXJXMaZe.js} +1 -1
- package/src/assets/web-panel/assets/{index-CEMl-Qte.js → index-BhPDhmvN.js} +1 -1
- package/src/assets/web-panel/assets/{index-BCnbC2z7.js → index-BiZ7Nz5-.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cwih67e8.js → index-BoCTDcn6.js} +1 -1
- package/src/assets/web-panel/assets/{index-DI90Wo_P.js → index-BxqC3LiO.js} +1 -1
- package/src/assets/web-panel/assets/{index-THsr_UUJ.js → index-C6c0j-Ki.js} +1 -1
- package/src/assets/web-panel/assets/{index-PKwZkQDC.js → index-C7d6QlfR.js} +1 -1
- package/src/assets/web-panel/assets/{index-rCTtYCGu.js → index-C9QYxq61.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ci0zIpSX.js → index-CBh48_Mh.js} +1 -1
- package/src/assets/web-panel/assets/{index-tMF_deZb.js → index-CNKHoXWI.js} +1 -1
- package/src/assets/web-panel/assets/{index-B9Pe-EyB.js → index-CXVBQ82k.js} +3 -3
- package/src/assets/web-panel/assets/{index-B4MfxM5W.js → index-CXtiLagi.js} +1 -1
- package/src/assets/web-panel/assets/{index-DaFr7XB1.js → index-Cn7EIWmI.js} +1 -1
- package/src/assets/web-panel/assets/index-CsRz9-ZH.js +1 -0
- package/src/assets/web-panel/assets/{index-D8jcp9Rj.js → index-CtB45Hok.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cli0VREv.js → index-Cu_V6ZJH.js} +1 -1
- package/src/assets/web-panel/assets/{index-DO-IKERp.js → index-Cykt9BbN.js} +1 -1
- package/src/assets/web-panel/assets/{index-y7cfh9rP.js → index-DDhy4eCS.js} +1 -1
- package/src/assets/web-panel/assets/{index-CH2wK5dx.js → index-DEPPzM8I.js} +1 -1
- package/src/assets/web-panel/assets/{index-BeycSy7n.js → index-DMVktlxG.js} +1 -1
- package/src/assets/web-panel/assets/{index-BwssFWI1.js → index-DOww5Qny.js} +1 -1
- package/src/assets/web-panel/assets/{index-PJt1Zrx2.js → index-DWPp-d07.js} +1 -1
- package/src/assets/web-panel/assets/index-DnjMFf3m.js +1 -0
- package/src/assets/web-panel/assets/{index-BPGlcDvs.js → index-DvM2xBUA.js} +1 -1
- package/src/assets/web-panel/assets/{index-BL_0ndQc.js → index-EK3XtMxA.js} +1 -1
- package/src/assets/web-panel/assets/{index-DnJt9DaX.js → index-XJIV7HEw.js} +1 -1
- package/src/assets/web-panel/assets/{index-BpiR6uzH.js → index-cNwsev6n.js} +1 -1
- package/src/assets/web-panel/assets/{index-bwb4cg_D.js → index-f_7L9GvP.js} +1 -1
- package/src/assets/web-panel/assets/{index-DbDhKroq.js → index-lUL3bD2z.js} +1 -1
- package/src/assets/web-panel/assets/{index-DvvJWwT8.js → index-pOUFfRdN.js} +1 -1
- package/src/assets/web-panel/assets/{index-BBMW8bQO.js → index-rGhS02f8.js} +1 -1
- package/src/assets/web-panel/assets/{index-CRikhGgx.js → index-vHtnQsnV.js} +1 -1
- package/src/assets/web-panel/assets/{index-BHUxz4dy.js → index-vb1XIxEB.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-B6e5CZ5p.js → initDefaultProps-DpRIjwTt.js} +1 -1
- package/src/assets/web-panel/assets/{motion-riMM1KfJ.js → motion-CG4_9o-Z.js} +1 -1
- package/src/assets/web-panel/assets/{move-C1NSDMjc.js → move-Dku1fXtf.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-Bibuny9B.js → mtc-parser-BvAVeX-3.js} +1 -1
- package/src/assets/web-panel/assets/{omit-Cmf6FoRn.js → omit-DFu0x78D.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-BSsYBUCY.js → pickAttrs-CmI-FNcK.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-gSB7-GAS.js → placementArrow-CGERYewB.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-qaqttvKa.js → responsiveObserve-D7G8bF5J.js} +1 -1
- package/src/assets/web-panel/assets/{slide-RX2gxl3k.js → slide-B2sXwWXy.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-DEJmkhqw.js → statusUtils-DI5yh0n3.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-CIWmJ78O.js → styleChecker-deGJ5dp_.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-D-UPSQBE.js → useFlexGapSupport-OqHBXEmi.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-9QFtqADc.js → useFs-Dqgx0Qv_.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DM6kyift.js → usePersonalDataHub-Be-lveh2.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-C-q6FNSJ.js → vnode-CFxB876W.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-D4WJY2m8.js → zoom-BFOYrl4e.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +3 -3
- package/src/commands/agent.js +11 -7
- package/src/commands/background-session.js +31 -3
- package/src/commands/chat.js +5 -1
- package/src/commands/eval.js +86 -28
- package/src/commands/llm.js +104 -1
- package/src/commands/plugin.js +130 -1
- package/src/commands/sandbox.js +121 -2
- package/src/commands/serve.js +11 -2
- package/src/commands/skill.js +29 -0
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/session-protocol.js +13 -0
- package/src/gateways/ws/ws-agent-handler.js +17 -0
- package/src/gateways/ws/ws-server.js +3 -0
- package/src/gateways/ws/ws-session-state.js +131 -0
- package/src/generated/cc-agent-protocol.schema.json +4 -0
- package/src/lazy-dispatch.js +8 -1
- package/src/lib/agent-sandbox.js +337 -53
- package/src/lib/app-server/cli-agent-kernel-adapter.js +28 -0
- package/src/lib/app-server/server.js +93 -0
- package/src/lib/background-agent-keeper-client.js +2 -0
- package/src/lib/background-agent-keeper-protocol.js +7 -0
- package/src/lib/background-agent-supervisor.js +194 -47
- package/src/lib/codex-app-server-adapter.js +81 -27
- package/src/lib/context-memory-kernel/durable-memory-port.js +31 -8
- package/src/lib/context-memory-kernel/provider-context.js +53 -19
- package/src/lib/deferred-question-context.js +122 -0
- package/src/lib/eval/evidence.js +202 -64
- package/src/lib/eval/plugin-suite.js +917 -0
- package/src/lib/eval/runner.js +10 -3
- package/src/lib/evolution/agent-evolution-ingress.js +60 -8
- package/src/lib/evolution/agent-evolution-runtime-composition.js +236 -1
- package/src/lib/evolution/agent-model-projection.js +97 -1
- package/src/lib/evolution/evidence-backed-wiki-maintainer.js +154 -1
- package/src/lib/evolution/evolution-artifact-ports.js +6 -0
- package/src/lib/evolution/evolution-deployment-loader.js +188 -10
- package/src/lib/evolution/evolution-eval-gate.js +8 -0
- package/src/lib/evolution/evolution-eval-runtime-composition.js +255 -0
- package/src/lib/evolution/evolution-evidence-artifact-adapter.js +58 -2
- package/src/lib/evolution/evolution-ledger-file-backend.js +23 -2
- package/src/lib/evolution/evolution-ledger-manifest-chain.js +223 -7
- package/src/lib/evolution/evolution-ledger-v2-journal.js +525 -0
- package/src/lib/evolution/evolution-ledger-v2-manifest-backend.js +46 -2
- package/src/lib/evolution/evolution-ledger.js +57 -1
- package/src/lib/evolution/evolution-run-ledger-adapter.js +93 -0
- package/src/lib/evolution/evolution-run-wiki-evidence-resolver.js +259 -0
- package/src/lib/evolution/governed-hub-llm.js +238 -5
- package/src/lib/evolution/governed-hub-resolver.js +82 -4
- package/src/lib/evolution/governed-hub-skill.js +11 -5
- package/src/lib/evolution/governed-skill-synthesis-provider-chat.js +10 -1
- package/src/lib/evolution/skill-runtime-revalidation-ledger-adapter.js +254 -0
- package/src/lib/evolution/skill-runtime-revalidation.js +530 -0
- package/src/lib/evolution/skill-target-matrix-eval.js +4 -4
- package/src/lib/evolution/wiki-evidence-commit-guard.js +366 -0
- package/src/lib/evolution/wiki-informed-skill-proposer.js +13 -1
- package/src/lib/goal-context.js +14 -5
- package/src/lib/interaction-adapter.js +166 -1
- package/src/lib/model-capabilities.js +271 -0
- package/src/lib/model-context-catalog.js +105 -0
- package/src/lib/model-context-window.js +4 -49
- package/src/lib/openai-responses.js +428 -0
- package/src/lib/plugin-runtime/scopes.js +7 -1
- package/src/lib/remote-read-loop-guard.js +2 -2
- package/src/lib/runtime-usage-ledger.js +16 -0
- package/src/lib/skill-loader.js +12 -0
- package/src/lib/with-file-lock.js +3 -1
- package/src/repl/agent-repl.js +6 -2
- package/src/runtime/agent-core.js +357 -44
- package/src/runtime/agent-runtime.js +7 -0
- package/src/runtime/coding-agent-contract-shared.cjs +13 -1
- package/src/runtime/headless-runner.js +4 -1
- package/src/runtime/headless-stream.js +133 -44
- package/src/runtime/runtime-factory.js +26 -2
- package/src/workers/background-agent-keeper.js +23 -13
- package/src/workers/background-agent-worker.js +27 -13
- package/src/assets/web-panel/assets/EvolutionSettings-_QnjPFZJ.js +0 -1
- package/src/assets/web-panel/assets/devWarning-LxtRBsCm.js +0 -1
- package/src/assets/web-panel/assets/index-36hxBH-o.js +0 -1
- package/src/assets/web-panel/assets/index-C0b78zWZ.js +0 -1
|
@@ -123,6 +123,7 @@ import { withQuietStdout } from "./quiet-stdout.js";
|
|
|
123
123
|
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
124
124
|
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
125
125
|
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
126
|
+
import { captureSkillRuntimeDependencies } from "../lib/evolution/skill-runtime-revalidation.js";
|
|
126
127
|
import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
|
|
127
128
|
import { CostBudget } from "../lib/cost-budget.js";
|
|
128
129
|
import { estimateTokens } from "../harness/prompt-compressor.js";
|
|
@@ -1777,7 +1778,8 @@ async function runAgentHeadlessInWorkspace(
|
|
|
1777
1778
|
let _skillCacheLedger = null;
|
|
1778
1779
|
const _runtimeSkillLoader = hermeticExecution
|
|
1779
1780
|
? HERMETIC_SKILL_LOADER
|
|
1780
|
-
: options.skillLoader ||
|
|
1781
|
+
: options.skillLoader ||
|
|
1782
|
+
new CLISkillLoader(captureSkillRuntimeDependencies(options));
|
|
1781
1783
|
const systemContent = hermeticExecution
|
|
1782
1784
|
? composeSystemPrompt(
|
|
1783
1785
|
"You are a hermetic code fixer. The exposed file tools are the complete tool surface. Inspect and mutate only the exact paths authorized in the user request, then return a concise completion message.",
|
|
@@ -2511,6 +2513,7 @@ async function runAgentHeadlessInWorkspace(
|
|
|
2511
2513
|
apiKey,
|
|
2512
2514
|
cwd,
|
|
2513
2515
|
skillLoader: _runtimeSkillLoader,
|
|
2516
|
+
...captureSkillRuntimeDependencies(options, evolutionIngress?.tenantId),
|
|
2514
2517
|
...(skillOutcomeIndex === null ? {} : { skillOutcomeIndex }),
|
|
2515
2518
|
...(skillVectorAuthority === null ? {} : { skillVectorAuthority }),
|
|
2516
2519
|
...(skillRetrievalRevocationReader === null
|
|
@@ -32,6 +32,8 @@ import {
|
|
|
32
32
|
normalizeInteractionBinding,
|
|
33
33
|
sameInteractionBinding,
|
|
34
34
|
} from "../lib/interaction-binding.js";
|
|
35
|
+
import { DeferredQuestionContext } from "../lib/deferred-question-context.js";
|
|
36
|
+
import { composePrepareCall } from "../lib/goal-context.js";
|
|
35
37
|
import {
|
|
36
38
|
addHooksV2EventObserver,
|
|
37
39
|
emitHooksV2Event,
|
|
@@ -82,6 +84,7 @@ import {
|
|
|
82
84
|
} from "../lib/evolution/agent-evolution-ingress.js";
|
|
83
85
|
import { captureAgentSkillOutcomeIndex } from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
84
86
|
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
87
|
+
import { captureSkillRuntimeDependencies } from "../lib/evolution/skill-runtime-revalidation.js";
|
|
85
88
|
import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
|
|
86
89
|
import {
|
|
87
90
|
resolveAgentMcp,
|
|
@@ -2468,6 +2471,7 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
2468
2471
|
options.interactiveQuestions === true ||
|
|
2469
2472
|
process.env.CC_INTERACTIVE_QUESTIONS === "1";
|
|
2470
2473
|
const pendingQuestions = new Map();
|
|
2474
|
+
const deferredQuestionContext = new DeferredQuestionContext({ sessionId });
|
|
2471
2475
|
let questionSeq = 0;
|
|
2472
2476
|
const questionTimeoutMs =
|
|
2473
2477
|
Number(process.env.CC_QUESTION_TIMEOUT_MS) > 0
|
|
@@ -2478,7 +2482,25 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
2478
2482
|
if (!p) return;
|
|
2479
2483
|
pendingQuestions.delete(id);
|
|
2480
2484
|
clearTimeout(p.timer);
|
|
2481
|
-
emit({
|
|
2485
|
+
emit({
|
|
2486
|
+
type: "question_resolved",
|
|
2487
|
+
id,
|
|
2488
|
+
via,
|
|
2489
|
+
mode: p.mode,
|
|
2490
|
+
blocking: p.mode === "blocking",
|
|
2491
|
+
session_id: sessionId,
|
|
2492
|
+
});
|
|
2493
|
+
if (p.mode === "deferred") {
|
|
2494
|
+
deferredQuestionContext.record({
|
|
2495
|
+
questionId: id,
|
|
2496
|
+
question: p.question,
|
|
2497
|
+
answer,
|
|
2498
|
+
binding: p.binding,
|
|
2499
|
+
requestedRevision: p.contextRevision,
|
|
2500
|
+
resolvedRevision: turns,
|
|
2501
|
+
});
|
|
2502
|
+
return;
|
|
2503
|
+
}
|
|
2482
2504
|
p.resolve(answer);
|
|
2483
2505
|
};
|
|
2484
2506
|
const failQuestion = (id, via) => {
|
|
@@ -2486,7 +2508,15 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
2486
2508
|
if (!p) return;
|
|
2487
2509
|
pendingQuestions.delete(id);
|
|
2488
2510
|
clearTimeout(p.timer);
|
|
2489
|
-
emit({
|
|
2511
|
+
emit({
|
|
2512
|
+
type: "question_resolved",
|
|
2513
|
+
id,
|
|
2514
|
+
via,
|
|
2515
|
+
mode: p.mode,
|
|
2516
|
+
blocking: p.mode === "blocking",
|
|
2517
|
+
session_id: sessionId,
|
|
2518
|
+
});
|
|
2519
|
+
if (p.mode === "deferred") return;
|
|
2490
2520
|
const e = new Error(`ask_user_question ${via}`);
|
|
2491
2521
|
e.code = "USER_TIMEOUT"; // handler → user_timeout (model proceeds, not a failure)
|
|
2492
2522
|
p.reject(e);
|
|
@@ -2517,50 +2547,100 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
2517
2547
|
pendingQuestions.delete(id);
|
|
2518
2548
|
clearTimeout(pending.timer);
|
|
2519
2549
|
try {
|
|
2520
|
-
emit({
|
|
2550
|
+
emit({
|
|
2551
|
+
type: "question_resolved",
|
|
2552
|
+
id,
|
|
2553
|
+
via,
|
|
2554
|
+
mode: pending.mode,
|
|
2555
|
+
blocking: pending.mode === "blocking",
|
|
2556
|
+
session_id: sessionId,
|
|
2557
|
+
});
|
|
2521
2558
|
} catch {
|
|
2522
2559
|
// Best-effort cleanup notification.
|
|
2523
2560
|
}
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2561
|
+
if (pending.mode === "blocking") {
|
|
2562
|
+
const error = new Error(`ask_user_question ${via}`);
|
|
2563
|
+
error.code = "USER_TIMEOUT";
|
|
2564
|
+
pending.reject(error);
|
|
2565
|
+
}
|
|
2527
2566
|
}
|
|
2567
|
+
deferredQuestionContext.clear();
|
|
2528
2568
|
});
|
|
2529
|
-
const
|
|
2530
|
-
|
|
2531
|
-
|
|
2532
|
-
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2554
|
-
|
|
2555
|
-
|
|
2556
|
-
|
|
2557
|
-
|
|
2558
|
-
question: typeof question === "string" ? question : "",
|
|
2559
|
-
options: Array.isArray(qOptions) ? qOptions : null,
|
|
2560
|
-
multiSelect: multiSelect === true,
|
|
2561
|
-
...(metadata && typeof metadata === "object" ? { metadata } : {}),
|
|
2562
|
-
});
|
|
2569
|
+
const registerInteractiveQuestion = (
|
|
2570
|
+
{
|
|
2571
|
+
question,
|
|
2572
|
+
options: qOptions,
|
|
2573
|
+
multiSelect,
|
|
2574
|
+
timeoutMs,
|
|
2575
|
+
metadata,
|
|
2576
|
+
purpose = "decision",
|
|
2577
|
+
sessionId: requestedSessionId,
|
|
2578
|
+
turnId,
|
|
2579
|
+
toolUseId,
|
|
2580
|
+
} = {},
|
|
2581
|
+
mode = "blocking",
|
|
2582
|
+
) => {
|
|
2583
|
+
let resolve = null;
|
|
2584
|
+
let reject = null;
|
|
2585
|
+
const promise =
|
|
2586
|
+
mode === "blocking"
|
|
2587
|
+
? new Promise((resolvePromise, rejectPromise) => {
|
|
2588
|
+
resolve = resolvePromise;
|
|
2589
|
+
reject = rejectPromise;
|
|
2590
|
+
})
|
|
2591
|
+
: null;
|
|
2592
|
+
const id = `q-${++questionSeq}`;
|
|
2593
|
+
const binding = normalizeInteractionBinding({
|
|
2594
|
+
sessionId: requestedSessionId ?? sessionId,
|
|
2595
|
+
turnId,
|
|
2596
|
+
toolUseId,
|
|
2597
|
+
sequence: questionSeq,
|
|
2563
2598
|
});
|
|
2599
|
+
const ms = Number(timeoutMs) > 0 ? Number(timeoutMs) : questionTimeoutMs;
|
|
2600
|
+
const timer = setTimeout(() => failQuestion(id, "timeout"), ms);
|
|
2601
|
+
timer.unref?.();
|
|
2602
|
+
pendingQuestions.set(id, {
|
|
2603
|
+
resolve,
|
|
2604
|
+
reject,
|
|
2605
|
+
timer,
|
|
2606
|
+
binding,
|
|
2607
|
+
mode,
|
|
2608
|
+
purpose,
|
|
2609
|
+
question: typeof question === "string" ? question : "",
|
|
2610
|
+
contextRevision: turns,
|
|
2611
|
+
});
|
|
2612
|
+
emit({
|
|
2613
|
+
type: "question_request",
|
|
2614
|
+
id,
|
|
2615
|
+
session_id: sessionId,
|
|
2616
|
+
binding,
|
|
2617
|
+
...(binding.turnId ? { turn_id: binding.turnId } : {}),
|
|
2618
|
+
...(binding.toolUseId ? { tool_use_id: binding.toolUseId } : {}),
|
|
2619
|
+
mode,
|
|
2620
|
+
blocking: mode === "blocking",
|
|
2621
|
+
purpose,
|
|
2622
|
+
context_revision: turns,
|
|
2623
|
+
question: typeof question === "string" ? question : "",
|
|
2624
|
+
options: Array.isArray(qOptions) ? qOptions : null,
|
|
2625
|
+
multiSelect: multiSelect === true,
|
|
2626
|
+
...(metadata && typeof metadata === "object" ? { metadata } : {}),
|
|
2627
|
+
});
|
|
2628
|
+
return mode === "blocking"
|
|
2629
|
+
? promise
|
|
2630
|
+
: Object.freeze({
|
|
2631
|
+
questionId: id,
|
|
2632
|
+
status: "pending",
|
|
2633
|
+
mode: "deferred",
|
|
2634
|
+
purpose,
|
|
2635
|
+
authorization: false,
|
|
2636
|
+
binding,
|
|
2637
|
+
contextRevision: turns,
|
|
2638
|
+
});
|
|
2639
|
+
};
|
|
2640
|
+
const interactionAskUser = (request = {}) =>
|
|
2641
|
+
registerInteractiveQuestion(request, "blocking");
|
|
2642
|
+
const interactionDeferUserQuestion = (request = {}) =>
|
|
2643
|
+
registerInteractiveQuestion(request, "deferred");
|
|
2564
2644
|
|
|
2565
2645
|
// --output-style (or settings.json `outputStyle`) persona, appended.
|
|
2566
2646
|
let outputStyleBody = null;
|
|
@@ -3173,7 +3253,10 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3173
3253
|
}
|
|
3174
3254
|
|
|
3175
3255
|
const streamInteraction = {};
|
|
3176
|
-
if (interactiveQuestions)
|
|
3256
|
+
if (interactiveQuestions) {
|
|
3257
|
+
streamInteraction.askUser = interactionAskUser;
|
|
3258
|
+
streamInteraction.deferUserQuestion = interactionDeferUserQuestion;
|
|
3259
|
+
}
|
|
3177
3260
|
if (options.includeHookEvents === true) {
|
|
3178
3261
|
streamInteraction.emit = (kind, payload = {}) => {
|
|
3179
3262
|
const subAgentId =
|
|
@@ -3257,6 +3340,7 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3257
3340
|
cwd,
|
|
3258
3341
|
additionalDirectories,
|
|
3259
3342
|
...(skillOutcomeIndex === null ? {} : { skillOutcomeIndex }),
|
|
3343
|
+
...captureSkillRuntimeDependencies(options, evolutionIngress?.tenantId),
|
|
3260
3344
|
...(skillVectorAuthority === null ? {} : { skillVectorAuthority }),
|
|
3261
3345
|
...(skillRetrievalRevocationReader === null
|
|
3262
3346
|
? {}
|
|
@@ -3294,7 +3378,10 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3294
3378
|
// Absent → agent-core returns user_not_reachable (graceful proceed).
|
|
3295
3379
|
interaction:
|
|
3296
3380
|
Object.keys(streamInteraction).length > 0 ? streamInteraction : undefined,
|
|
3297
|
-
prepareCall:
|
|
3381
|
+
prepareCall: composePrepareCall([
|
|
3382
|
+
goalPrepareCallFn,
|
|
3383
|
+
() => deferredQuestionContext.prepareCall({ currentRevision: turns }),
|
|
3384
|
+
]),
|
|
3298
3385
|
// --mcp-config wiring (tool defs + dispatch map + live client).
|
|
3299
3386
|
mcpClient: mcp?.mcpClient || null,
|
|
3300
3387
|
mcpHostClient: mcpRecoveryRuntime.client || mcp?.mcpClient || null,
|
|
@@ -3587,8 +3674,10 @@ async function runAgentHeadlessStreamInWorkspace(
|
|
|
3587
3674
|
continue;
|
|
3588
3675
|
}
|
|
3589
3676
|
if (parsed.answer) {
|
|
3590
|
-
// Answers settle
|
|
3591
|
-
// value (user cancelled the
|
|
3677
|
+
// Answers settle their bound ask_user_question out of band and are
|
|
3678
|
+
// never queued as a new turn. A null value (user cancelled the UI)
|
|
3679
|
+
// resolves as user_timeout for blocking questions and as no context
|
|
3680
|
+
// for deferred questions.
|
|
3592
3681
|
const pending = pendingQuestions.get(parsed.answer.id);
|
|
3593
3682
|
if (
|
|
3594
3683
|
!pending ||
|
|
@@ -5,6 +5,7 @@ import {
|
|
|
5
5
|
captureAgentSkillOutcomeIndex,
|
|
6
6
|
} from "../lib/evolution/agent-evolution-runtime-composition-brand.js";
|
|
7
7
|
import { captureSkillVectorAuthority } from "../lib/skill-vector-authority.js";
|
|
8
|
+
import { captureSkillRuntimeDependencies } from "../lib/evolution/skill-runtime-revalidation.js";
|
|
8
9
|
import { captureSkillRetrievalRevocationReader } from "../lib/evolution/skill-retrieval-revocation-authority.js";
|
|
9
10
|
import {
|
|
10
11
|
resolveAgentPolicy,
|
|
@@ -18,6 +19,8 @@ export function createAgentRuntimeFactory({
|
|
|
18
19
|
evolutionComposition = null,
|
|
19
20
|
skillOutcomeIndex = null,
|
|
20
21
|
skillVectorAuthority = null,
|
|
22
|
+
skillRuntimeAdmission = null,
|
|
23
|
+
skillRuntimeAdmissionRequired = false,
|
|
21
24
|
skillRetrievalRevocationReader = null,
|
|
22
25
|
} = {}) {
|
|
23
26
|
const composition =
|
|
@@ -57,6 +60,23 @@ export function createAgentRuntimeFactory({
|
|
|
57
60
|
}
|
|
58
61
|
const retrievalTenant =
|
|
59
62
|
composition?.tenantId ?? outcomeIndex?.tenantId ?? null;
|
|
63
|
+
if (
|
|
64
|
+
skillRuntimeAdmission &&
|
|
65
|
+
deps.skillRuntimeAdmission &&
|
|
66
|
+
skillRuntimeAdmission !== deps.skillRuntimeAdmission
|
|
67
|
+
)
|
|
68
|
+
throw new TypeError(
|
|
69
|
+
"Skill runtime admission cannot be overridden through deps",
|
|
70
|
+
);
|
|
71
|
+
const runtimeAdmissionDependencies = captureSkillRuntimeDependencies(
|
|
72
|
+
{
|
|
73
|
+
skillRuntimeAdmission:
|
|
74
|
+
skillRuntimeAdmission ?? deps.skillRuntimeAdmission,
|
|
75
|
+
skillRuntimeAdmissionRequired:
|
|
76
|
+
skillRuntimeAdmissionRequired || deps.skillRuntimeAdmissionRequired,
|
|
77
|
+
},
|
|
78
|
+
retrievalTenant,
|
|
79
|
+
);
|
|
60
80
|
if (
|
|
61
81
|
retrievalTenant !== null &&
|
|
62
82
|
vectorAuthority !== null &&
|
|
@@ -95,10 +115,12 @@ export function createAgentRuntimeFactory({
|
|
|
95
115
|
composition === null &&
|
|
96
116
|
outcomeIndex === null &&
|
|
97
117
|
vectorAuthority === null &&
|
|
98
|
-
revocationReader === null
|
|
118
|
+
revocationReader === null &&
|
|
119
|
+
Object.keys(runtimeAdmissionDependencies).length === 0
|
|
99
120
|
? deps
|
|
100
121
|
: Object.freeze({
|
|
101
122
|
...deps,
|
|
123
|
+
...runtimeAdmissionDependencies,
|
|
102
124
|
...(composition === null
|
|
103
125
|
? {}
|
|
104
126
|
: { evolutionIngress: composition.evolutionIngress }),
|
|
@@ -113,10 +135,12 @@ export function createAgentRuntimeFactory({
|
|
|
113
135
|
const serverDeps =
|
|
114
136
|
outcomeIndex === null &&
|
|
115
137
|
vectorAuthority === null &&
|
|
116
|
-
revocationReader === null
|
|
138
|
+
revocationReader === null &&
|
|
139
|
+
Object.keys(runtimeAdmissionDependencies).length === 0
|
|
117
140
|
? deps
|
|
118
141
|
: Object.freeze({
|
|
119
142
|
...deps,
|
|
143
|
+
...runtimeAdmissionDependencies,
|
|
120
144
|
...(outcomeIndex === null ? {} : { skillOutcomeIndex: outcomeIndex }),
|
|
121
145
|
...(vectorAuthority === null
|
|
122
146
|
? {}
|
|
@@ -183,7 +183,13 @@ export function runBackgroundAgentKeeperHeartbeat({
|
|
|
183
183
|
return false;
|
|
184
184
|
}
|
|
185
185
|
try {
|
|
186
|
-
|
|
186
|
+
// A heartbeat is advisory liveness telemetry. Keep ownership strict but
|
|
187
|
+
// never wait behind another state writer or invoke the synchronous Windows
|
|
188
|
+
// owner probe; the next one-second heartbeat retries if the lock is busy.
|
|
189
|
+
persistKeeper(
|
|
190
|
+
{ keeperHeartbeatAt: currentTime },
|
|
191
|
+
{ timeoutMs: 0, probeLockOwner: false },
|
|
192
|
+
);
|
|
187
193
|
return true;
|
|
188
194
|
} catch (error) {
|
|
189
195
|
try {
|
|
@@ -455,18 +461,22 @@ export async function runBackgroundAgentKeeper(jobFile, options = {}) {
|
|
|
455
461
|
finishResolve = resolvePromise;
|
|
456
462
|
});
|
|
457
463
|
|
|
458
|
-
const persistKeeper = (patch) =>
|
|
459
|
-
mutateBackgroundAgentState(
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
464
|
+
const persistKeeper = (patch, options = {}) =>
|
|
465
|
+
mutateBackgroundAgentState(
|
|
466
|
+
job.id,
|
|
467
|
+
(current) => {
|
|
468
|
+
if (
|
|
469
|
+
!current ||
|
|
470
|
+
current.workerGeneration !== job.workerGeneration ||
|
|
471
|
+
current.keeperGeneration !== job.keeperGeneration ||
|
|
472
|
+
Number(current.keeperPid) !== process.pid
|
|
473
|
+
) {
|
|
474
|
+
return null;
|
|
475
|
+
}
|
|
476
|
+
return { ...current, ...patch };
|
|
477
|
+
},
|
|
478
|
+
options,
|
|
479
|
+
);
|
|
470
480
|
|
|
471
481
|
const finishForWorkerDisconnect = () => {
|
|
472
482
|
if (finishing) return false;
|
|
@@ -75,6 +75,11 @@ const TURN_BOOTSTRAP_MODULE_URL = new URL(
|
|
|
75
75
|
import.meta.url,
|
|
76
76
|
).href;
|
|
77
77
|
const TURN_BOOTSTRAP_IMPORT_ARGUMENT = `--import=${TURN_BOOTSTRAP_MODULE_URL}`;
|
|
78
|
+
// A periodic heartbeat is telemetry, not a turn-ownership transition. On a
|
|
79
|
+
// busy Windows runner it must never block the worker's IPC loop long enough to
|
|
80
|
+
// starve a keeper ARM/RETIRE reply; startup and terminal claims keep the
|
|
81
|
+
// supervisor's full strict-lock deadline.
|
|
82
|
+
const PERIODIC_HEARTBEAT_STATE_LOCK_TIMEOUT_MS = 0;
|
|
78
83
|
|
|
79
84
|
const jobFile = process.argv[2];
|
|
80
85
|
let job;
|
|
@@ -534,18 +539,22 @@ function mergeState(patch) {
|
|
|
534
539
|
})).state;
|
|
535
540
|
}
|
|
536
541
|
|
|
537
|
-
function writeHeartbeat() {
|
|
538
|
-
const mutation = claimBackgroundAgentHeartbeat(
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
542
|
-
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
542
|
+
function writeHeartbeat(options = {}) {
|
|
543
|
+
const mutation = claimBackgroundAgentHeartbeat(
|
|
544
|
+
job.id,
|
|
545
|
+
{
|
|
546
|
+
workerGeneration: job.workerGeneration,
|
|
547
|
+
pid: process.pid,
|
|
548
|
+
workerPid: process.pid,
|
|
549
|
+
...(child?.pid ? { agentPid: child.pid } : {}),
|
|
550
|
+
...(turnLaunchUncertainty || {}),
|
|
551
|
+
heartbeatAt: Date.now(),
|
|
552
|
+
// Re-assert the transport endpoint so a launcher write racing the
|
|
553
|
+
// worker's initial merge self-heals within one heartbeat.
|
|
554
|
+
...(transportState ? { transport: transportState } : {}),
|
|
555
|
+
},
|
|
556
|
+
options,
|
|
557
|
+
);
|
|
549
558
|
const applied =
|
|
550
559
|
mutation.applied &&
|
|
551
560
|
mutation.state?.status === "running" &&
|
|
@@ -1798,7 +1807,12 @@ async function main() {
|
|
|
1798
1807
|
}
|
|
1799
1808
|
heartbeat = setInterval(() => {
|
|
1800
1809
|
try {
|
|
1801
|
-
if (
|
|
1810
|
+
if (
|
|
1811
|
+
!writeHeartbeat({
|
|
1812
|
+
timeoutMs: PERIODIC_HEARTBEAT_STATE_LOCK_TIMEOUT_MS,
|
|
1813
|
+
probeLockOwner: false,
|
|
1814
|
+
})
|
|
1815
|
+
) {
|
|
1802
1816
|
if (turnLaunchSettlement) {
|
|
1803
1817
|
// The owned tree is already in explicit settlement. Keep the worker
|
|
1804
1818
|
// alive until confirmed termination evidence is durably recorded;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as l,J as C,U as i,c as a,K as o,o as D,r as k,a as L,b as O,P as S,Q as _,R as u,F as B,Z as q,V as I,S as H}from"./vendor-Bn1JzzAn.js";import{_ as U,u as V,d as y}from"./index-B9Pe-EyB.js";import{R as W}from"./icons-DG5UD-6K.js";function N(p){return["ask","agent"].map(t=>{const s=p?.readiness?.[t],e=s?.state==="admitted",d=s?.scope==="deployment-admission"&&s.runtimeVerification==="not_checked"&&Array.isArray(s.requiredCommands)&&s.requiredCommands.includes(t)&&(e?s.ready===!0&&s.taskReady===null:["not_configured","disabled","invalid","command_not_allowed"].includes(s.state)&&s.ready===!1&&s.taskReady===!1);return{command:t,state:d?s.state:"unknown",summary:d?e?"部署准入通过":"部署准入被阻断":"未提供准入诊断",detail:d&&typeof s.detail=="string"?s.detail:"当前 CLI 未提供可识别的部署准入诊断,请更新 CLI。",remediation:d&&typeof s.remediation=="string"?s.remediation:""}})}function j(p,t){for(const s of Object.keys(p))delete p[s];Object.assign(p,{source:"none",effectiveEnabled:!1,profileEnabled:!1,verified:!1,commands:[],readiness:null},t||{})}const A={__name:"EvolutionSettings",setup(p,{expose:t}){t();const s=V(),e=k(!1),d=k(!1),w=k(!1),m=k(""),g=k(""),c=L({source:"none",effectiveEnabled:!1,profileEnabled:!1,verified:!1,commands:[]}),h=O(()=>e.value||d.value||w.value),x=O(()=>N(c));function b(r){j(c,r),m.value=c.descriptorPath||"",g.value=c.trustRootPath||""}async function v(r,n=3e4){return await s.waitConnected(8e3),(await s.sendRaw(r,n)).result}async function R(){e.value=!0;try{b(await v({type:"evolution.deployment.status"}))}catch(r){y.error("读取配置失败:"+r.message)}finally{e.value=!1}}async function E(){if(!m.value.trim()||!g.value.trim()){y.warning("请填写描述符和信任根公钥的绝对路径");return}d.value=!0;try{b(await v({type:"evolution.deployment.configure",descriptorPath:m.value.trim(),trustRootPath:g.value.trim()},6e4)),y.success("签名校验通过,配置已保存并启用;自动发布仍为 HOLD")}catch(r){y.error("配置失败:"+r.message)}finally{d.value=!1}}async function f(){w.value=!0;try{b(await v({type:"evolution.deployment.set-enabled",enabled:!c.profileEnabled})),y.success(c.profileEnabled?"已启用":"已停用")}catch(r){y.error("更新失败:"+r.message)}finally{w.value=!1}}D(R);const P={ws:s,loading:e,saving:d,toggling:w,descriptorPath:m,trustRootPath:g,status:c,busy:h,readinessRows:x,apply:b,request:v,loadStatus:R,save:E,toggle:f,computed:O,onMounted:D,reactive:L,ref:k,get ReloadOutlined(){return W},get message(){return y},get useWsStore(){return V},get deploymentReadinessRows(){return N},get replaceDeploymentStatus(){return j}};return Object.defineProperty(P,"__isScriptSetup",{enumerable:!1,value:!0}),P}},F={class:"page-head"},J={class:"mono"},T={class:"mono"},z={class:"admission-status","aria-live":"polite"},G=["data-admission-command"],K={class:"mono"},M={key:0,class:"mono"};function Q(p,t,s,e,d,w){const m=l("a-button"),g=l("a-alert"),c=l("a-input"),h=l("a-form-item"),x=l("a-space"),b=l("a-form"),v=l("a-card"),R=l("a-col"),E=l("a-tag"),f=l("a-descriptions-item"),P=l("a-descriptions"),r=l("a-row");return S(),C("div",null,[i("div",F,[t[3]||(t[3]=i("div",null,[i("h2",{class:"page-title"},"Skill 自进化配置"),i("p",{class:"page-sub"},"统一配置受治理部署;CLI、IDE 插件与 cc ui 共享。")],-1)),a(m,{loading:e.loading,onClick:e.loadStatus},{icon:o(()=>[a(e.ReloadOutlined)]),default:o(()=>[t[2]||(t[2]=_("刷新 ",-1))]),_:1},8,["loading"])]),a(g,{message:"不会开启自动发布",description:"此开关只启用经过签名的 Skill 自进化运行时。候选项进入 active 前仍需人工审核,自动发布始终保持 HOLD。",type:"warning","show-icon":"",class:"notice"}),a(r,{gutter:16},{default:o(()=>[a(R,{xs:24,xl:15},{default:o(()=>[a(v,{title:"签名部署",class:"panel-card"},{default:o(()=>[a(b,{layout:"vertical"},{default:o(()=>[a(h,{label:"签名部署描述符"},{extra:o(()=>[...t[4]||(t[4]=[_("Web 页面不能读取本机文件选择器,请填写运行 cc ui 的机器上的绝对路径。",-1)])]),default:o(()=>[a(c,{value:e.descriptorPath,"onUpdate:value":t[0]||(t[0]=n=>e.descriptorPath=n),disabled:e.busy,placeholder:"deployment descriptor JSON 的服务器绝对路径"},null,8,["value","disabled"])]),_:1}),a(h,{label:"Ed25519 信任根公钥"},{default:o(()=>[a(c,{value:e.trustRootPath,"onUpdate:value":t[1]||(t[1]=n=>e.trustRootPath=n),disabled:e.busy,placeholder:"信任根 public key 的服务器绝对路径"},null,8,["value","disabled"])]),_:1}),a(x,null,{default:o(()=>[a(m,{type:"primary",loading:e.saving,onClick:e.save},{default:o(()=>[...t[5]||(t[5]=[_("校验、保存并启用",-1)])]),_:1},8,["loading"]),a(m,{danger:e.status.profileEnabled,disabled:!e.status.descriptorPath,loading:e.toggling,onClick:e.toggle},{default:o(()=>[_(u(e.status.profileEnabled?"停用":"启用"),1)]),_:1},8,["danger","disabled","loading"])]),_:1})]),_:1})]),_:1})]),_:1}),a(R,{xs:24,xl:9},{default:o(()=>[a(v,{title:"治理状态",class:"panel-card status-card"},{default:o(()=>[a(P,{column:1,size:"small"},{default:o(()=>[a(f,{label:"生效状态"},{default:o(()=>[a(E,{color:e.status.effectiveEnabled?"green":"default"},{default:o(()=>[_(u(e.status.effectiveEnabled?"已启用":"未启用"),1)]),_:1},8,["color"])]),_:1}),a(f,{label:"生效来源"},{default:o(()=>[_(u(e.status.source||"none"),1)]),_:1}),a(f,{label:"签名校验"},{default:o(()=>[a(E,{color:e.status.verified?"green":"red"},{default:o(()=>[_(u(e.status.verified?"已通过":"未通过"),1)]),_:1},8,["color"])]),_:1}),a(f,{label:"自动发布"},{default:o(()=>[a(E,{color:"orange"},{default:o(()=>[...t[6]||(t[6]=[_("HOLD",-1)])]),_:1})]),_:1}),a(f,{label:"配置文件"},{default:o(()=>[i("span",J,u(e.status.profilePath||"—"),1)]),_:1}),a(f,{label:"允许命令"},{default:o(()=>[i("span",T,u((e.status.commands||[]).join(", ")||"—"),1)]),_:1})]),_:1}),i("section",z,[t[7]||(t[7]=i("h3",null,"模型命令部署准入",-1)),t[8]||(t[8]=i("p",null,"这里只检查部署准入,实际任务运行尚未验证。",-1)),(S(!0),C(B,null,q(e.readinessRows,n=>(S(),C("div",{key:n.command,"data-admission-command":n.command},[i("strong",null,u(n.command)+":"+u(n.summary),1),i("p",K,u(n.detail),1),n.remediation?(S(),C("p",M,u(n.remediation),1)):I("v-if",!0)],8,G))),128))]),e.status.error?(S(),H(g,{key:0,message:e.status.error,type:"error","show-icon":"",class:"error"},null,8,["message"])):I("v-if",!0)]),_:1})]),_:1})]),_:1})])}const ee=U(A,[["render",Q],["__scopeId","data-v-5a42105e"],["__file","/tmp/cc-web-panel-GsTgbo/repo/packages/web-panel/src/views/EvolutionSettings.vue"]]);export{ee as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as r}from"./index-B9Pe-EyB.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./Row-B5YBYoVz.js";import{a0 as t}from"./index-B9Pe-EyB.js";import"./vendor-Bn1JzzAn.js";import"./responsiveObserve-qaqttvKa.js";import"./useFlexGapSupport-D-UPSQBE.js";import"./styleChecker-CIWmJ78O.js";import"./index-D8jcp9Rj.js";import"./icons-DG5UD-6K.js";const l=t(o);export{l as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./Col-CfzzhgGw.js";import{a0 as t}from"./index-B9Pe-EyB.js";import"./vendor-Bn1JzzAn.js";import"./index-D8jcp9Rj.js";import"./icons-DG5UD-6K.js";const s=t(o);export{s as default};
|