chainlesschain 0.166.42 → 0.166.43
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/assets/web-panel/.build-hash +1 -1
- package/src/assets/web-panel/assets/{AIOps-CdsAAOAu.js → AIOps-BIl-Z62M.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-B8x5S-3u.js → ActionButton-BgPi_Te6.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-C1eOGwSM.js → Analytics-CaNIzlAG.js} +3 -3
- package/src/assets/web-panel/assets/AppLayout-D9GSx2hl.js +9 -0
- package/src/assets/web-panel/assets/{Artifacts-B0tiKn2i.js → Artifacts-Kq7kotzv.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-DzGqTUvG.js → Audit-e1RTJLco.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-CMXYcy56.js → BackgroundAgents-BfyNT0BW.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-DrN3N1_7.js → Backup-BEAq7i6S.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-BC9aoifZ.js → BaseInput-BHuP82DF.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-F3Z9p0vk.js → Chat-BLPgCQsB.js} +6 -6
- package/src/assets/web-panel/assets/ChatBubbleRenderer-DWXPJh-J.js +1 -0
- package/src/assets/web-panel/assets/{Checkbox-CDXlouzl.js → Checkbox-DDJrOqEh.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-9c0RpaYc.js → Codegen-CxyKcM6S.js} +1 -1
- package/src/assets/web-panel/assets/{Col-C-60iGia.js → Col-BYFh9rE1.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DXE04H2M.js → Community-D8JPppoh.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-B4jEuBmH.js → Compact-B5VGSqZe.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-uf13-dcK.js → Compliance-C7KiFcUK.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-D6hpxLI4.js → Cowork-D-F2fgA_.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-CSJobmkN.js → Cron-B6TmPqRO.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-B0_rTlsi.js → Crosschain-BeGcBXhk.js} +1 -1
- package/src/assets/web-panel/assets/{DID-D49FQsiZ.js → DID-9QklLcmQ.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-BvjvIYfC.js → Dashboard-DIadmsuS.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-BYe1gODU.js → Dropdown-0I5gks3i.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-CJ6znfiH.js → EmailListRenderer-BdTAjT2q.js} +1 -1
- package/src/assets/web-panel/assets/EvolutionSettings-Bdw8ApoT.css +1 -0
- package/src/assets/web-panel/assets/EvolutionSettings-C7_tq643.js +1 -0
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-BnoKDllh.js → FamilyGuardDashboard-DQUQWwUY.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-AqhVFmd4.js → Federation-Drgi--Zn.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CNVYBpNg.js → FormItemContext-BOf-9P8n.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-BbdYCfjH.js → GenericCardRenderer-CBBnIDaW.js} +1 -1
- package/src/assets/web-panel/assets/{Git-B_xClOR0.js → Git-BKimGd5P.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CIKCDF9F.js → Governance-DoXCXppu.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BdRSc0oa.js → Inference-DzOhGhOE.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-DknpIQPx.js → KnowledgeGraph-DawgmU58.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-BcCPhMaZ.js → Logs-Co3EJL2Y.js} +2 -2
- package/src/assets/web-panel/assets/MarkdownRenderer-VUfiDRZN.js +1 -0
- package/src/assets/web-panel/assets/{Marketplace-DEMNuvwO.js → Marketplace-BqpMHnMW.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-D-tg9wfq.js → McpTools-C7ZSokcR.js} +2 -2
- package/src/assets/web-panel/assets/{Memory-BqCLu-X9.js → Memory-DuJrpeDx.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-bN6vwbZc.js → MobileBridge-CaM744NU.js} +1 -1
- package/src/assets/web-panel/assets/MobileProjects-Bd78jDwm.js +1 -0
- package/src/assets/web-panel/assets/{Mtc-CcGXXyEn.js → Mtc-5oUB7lPh.js} +2 -2
- package/src/assets/web-panel/assets/{MtcAudit-B2Z5wPnM.js → MtcAudit-D9DNF6DB.js} +2 -2
- package/src/assets/web-panel/assets/{Multisig-DNW7dKam.js → Multisig-CfMpFQSr.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-Ciz-g5G3.js → NLProgramming-CuhPZQ7q.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-CeiEA6yF.js → Notes-NtSeMoyM.js} +3 -3
- package/src/assets/web-panel/assets/{NotificationSettings-DgeiEPwB.js → NotificationSettings-CB4e7V83.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-D9DjubGK.js → OrderTableRenderer-Bu8C6Qlj.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-CeA2EC_G.js → Organization-K_0bjm7y.js} +2 -2
- package/src/assets/web-panel/assets/{Overflow-DT40ig7t.js → Overflow-D2vwxiPv.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-K4H13K3M.js → P2P-WQMHBu8q.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-CF7TzZmx.js → PdhVaultBrowser-CTZVBMZZ.js} +3 -3
- package/src/assets/web-panel/assets/{Permissions-DYQogL6r.js → Permissions-DcLy9Nfp.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DXhXVHar.js → PersonalDataHub-zc-cm-02.js} +4 -4
- package/src/assets/web-panel/assets/{Pipeline-DQMdn5Ij.js → Pipeline-CCnI8peM.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-BiF1thop.js → Privacy-DO1Xor8L.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-C2ptWEn7.js → ProjectInit-CZqC-jyt.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-B5WCiDZD.js → ProjectSettings-DqJtyavX.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-BNH6LKU6.js → Projects-Dx14NAO3.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-CgRJ8ZT1.js → Providers-DH13a6ro.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-B3tuNJ3V.js → QrScannerModal-C9bwzVfA.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-D9CO1SNI.js → QuickAsk-Cbt-oIPf.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BGmwHY_U.js → Recommend-BYIimGcY.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-CliYaolm.js → RemoteSession-C8OWTG1H.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-sCiX2kmm.js → Reputation-DpUGT_jD.js} +1 -1
- package/src/assets/web-panel/assets/{Row-DXHx_bk0.js → Row-DZ5Izi2A.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-Bg79mIxI.js → RssFeed-CAn94No1.js} +3 -3
- package/src/assets/web-panel/assets/{Search-CnKDYqyS.js → Search-BqNaxcgj.js} +1 -1
- package/src/assets/web-panel/assets/{Security-c-0QOrC2.js → Security-Ck6vFTWn.js} +4 -4
- package/src/assets/web-panel/assets/{Services-BBBTb4YA.js → Services-Y3RdvvDj.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-CtL_5fJe.js → Skeleton-Cx9Iqcp7.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-DvqrC2_v.js → Skills-Oiqz7wLM.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-C5LGNImz.js → Sla-DaKJQADm.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-Btx0KgwX.js → SpeechSettings-BWoOpPW4.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-DFLNSWuu.js → SyncSettings-CgFle8GX.js} +2 -2
- package/src/assets/web-panel/assets/Tasks-C1tQNvWx.js +1 -0
- package/src/assets/web-panel/assets/{Templates-CIIt_k5J.js → Templates-CvvycaWi.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-Nqo1PA2a.js → Tenant-D1FwaD12.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-CGwV9hW9.js → Terminal-oorFjObO.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-Bu3xrXyf.js → TimelineRenderer-BjMs48Sj.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-3bC3zrYj.js → Tokens-BkRb95xG.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-DG84V7Xf.js → Trigger-B94RYYAF.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-rPhNXoYJ.js → Trust-DnBVpOWt.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CamNxeAp.js → UkeySign-DouHO6Up.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-CkIuH4Gm.js → VideoEditing-DDgRerWV.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-SD5W5uHT.js → Wallet-CQN9Un7X.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn--A4Sddxn.js → WebAuthn-DyHl2G3J.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-Ca7qvch8.js → WorkflowEditor-BQlN77Ey.js} +1 -1
- package/src/assets/web-panel/assets/{chat-i8OBdjCB.js → chat-0jOqe7ZD.js} +1 -1
- package/src/assets/web-panel/assets/{colors-BeYbJKQ8.js → colors-kp5TAaKx.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-BqpF-Sya.js → compact-item-DqF6Rml7.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-qXTb29t3.js → createContext-lDyLBjy5.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-IfrMTwCK.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-DOfL0KSW.js → hasIn-CkiF91kH.js} +1 -1
- package/src/assets/web-panel/assets/{index-rdW8KX_7.js → index-8Hxbv1SG.js} +1 -1
- package/src/assets/web-panel/assets/{index-B177TAO-.js → index-B6V9l2P-.js} +1 -1
- package/src/assets/web-panel/assets/{index-D8c3Ctj4.js → index-BAtpuJQ7.js} +1 -1
- package/src/assets/web-panel/assets/{index-0OxY_Nsh.js → index-BKFL4DfP.js} +1 -1
- package/src/assets/web-panel/assets/{index--TQi5102.js → index-BPcjLn2w.js} +1 -1
- package/src/assets/web-panel/assets/{index-BYzQaGnV.js → index-BPwtIqRo.js} +1 -1
- package/src/assets/web-panel/assets/{index-CLrDyxeZ.js → index-BRu6Pe98.js} +1 -1
- package/src/assets/web-panel/assets/{index-Byn_IHXR.js → index-BSAeSPQe.js} +1 -1
- package/src/assets/web-panel/assets/{index-ByHZkqj5.js → index-BUqE17wu.js} +1 -1
- package/src/assets/web-panel/assets/{index-BOwR6mHU.js → index-BnU8hi3c.js} +1 -1
- package/src/assets/web-panel/assets/{index-DCcXU9HN.js → index-Bq2s5obn.js} +5 -5
- package/src/assets/web-panel/assets/{index-czHvbhS0.js → index-Bu14YcwM.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dio2mTWq.js → index-BvFFY-2V.js} +1 -1
- package/src/assets/web-panel/assets/{index-BdbrE-hz.js → index-ByggSxTQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-CebShwk1.js → index-C-CS_-jC.js} +1 -1
- package/src/assets/web-panel/assets/index-C7nsIbMa.js +1 -0
- package/src/assets/web-panel/assets/{index-X8TXf9Bb.js → index-CI-H0ljO.js} +1 -1
- package/src/assets/web-panel/assets/{index-BmzmjSGb.js → index-CLchRTsS.js} +1 -1
- package/src/assets/web-panel/assets/{index-nl9IxLfv.js → index-CNPCAYHk.js} +1 -1
- package/src/assets/web-panel/assets/index-DFXFLdKN.js +1 -0
- package/src/assets/web-panel/assets/{index-DWLxMPZ_.js → index-DHVNtkrR.js} +1 -1
- package/src/assets/web-panel/assets/{index-C4_8KnUt.js → index-DHnFhMOL.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cy8WApMp.js → index-DK47iA2d.js} +1 -1
- package/src/assets/web-panel/assets/{index-C13IM9lj.js → index-DPHmcQWh.js} +1 -1
- package/src/assets/web-panel/assets/{index-BuzGZOAK.js → index-DQGk8bV8.js} +1 -1
- package/src/assets/web-panel/assets/{index-Cvig0IjN.js → index-DSDM-VNz.js} +1 -1
- package/src/assets/web-panel/assets/{index-CXXeOim8.js → index-DTA_B9gU.js} +1 -1
- package/src/assets/web-panel/assets/{index-BD386d6M.js → index-DX40v3aL.js} +1 -1
- package/src/assets/web-panel/assets/{index-B00rNoIx.js → index-DZU13W4o.js} +1 -1
- package/src/assets/web-panel/assets/{index-C-P0NHi4.js → index-DduPk1RS.js} +1 -1
- package/src/assets/web-panel/assets/{index-TAvlGp5l.js → index-DgGNW2ep.js} +1 -1
- package/src/assets/web-panel/assets/{index-CH7mHJoh.js → index-DnI__Fwu.js} +1 -1
- package/src/assets/web-panel/assets/{index-Bt7Ua7EC.js → index-DrVVi5jX.js} +1 -1
- package/src/assets/web-panel/assets/{index-vNYrAXO6.js → index-DzU_SfdF.js} +1 -1
- package/src/assets/web-panel/assets/{index-GGEsF-NA.js → index-INxX1TMz.js} +1 -1
- package/src/assets/web-panel/assets/{index-JxyF4KNw.js → index-X1l5-ive.js} +1 -1
- package/src/assets/web-panel/assets/{index-BKd03Rn4.js → index-aHKeys8c.js} +1 -1
- package/src/assets/web-panel/assets/{index-zmvw3Ptl.js → index-kenTha3h.js} +1 -1
- package/src/assets/web-panel/assets/{index-DIikgsI1.js → index-mkwJZMBT.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-BKpYiODg.js → initDefaultProps-CYYQ0SI1.js} +1 -1
- package/src/assets/web-panel/assets/{motion-DJ2p-V-R.js → motion--Tyo36te.js} +1 -1
- package/src/assets/web-panel/assets/{move-CmA2ejm5.js → move-D2BjgQv7.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-CAIGxQzN.js → mtc-parser-dyIu5RU_.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DJlnhA7K.js → omit-CDEAhC5H.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-CZPrJyhF.js → pickAttrs-DLKDlIQs.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-CXy74okE.js → placementArrow-BveC8fe2.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DexkLtci.js → responsiveObserve-51urgYrW.js} +1 -1
- package/src/assets/web-panel/assets/{slide-BzjBJbPV.js → slide-CCHbhZg-.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-gnHIXw2X.js → statusUtils-W4mtUXRP.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DHBjT1Gk.js → styleChecker-D4Drrz2a.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-BmMStW87.js → useFlexGapSupport-BBCd4kCM.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-BcV5VGA2.js → useFs-4Khxvw5Y.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-DBxxRRY2.js → usePersonalDataHub-7c72tleZ.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-Bt5yp9hj.js → vnode-DzZ7Y0LN.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-CMdUkOfw.js → zoom-C5jhaET3.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/command-help-index.json +1 -1
- package/src/commands/evolution-deployment.js +95 -0
- package/src/commands/evolution.js +2 -0
- package/src/data/changelog.json +13 -0
- package/src/gateways/ws/evolution-deployment-topic-handlers.js +53 -0
- package/src/lib/evolution/evolution-deployment-config.js +81 -0
- package/src/lib/evolution/evolution-deployment-loader.js +62 -13
- package/src/lib/evolution/evolution-deployment-profile.js +114 -0
- package/src/lib/public-ide-capability-manifest.js +2 -0
- package/src/lib/read-file-loop-guard.js +17 -4
- package/src/lib/remote-read-loop-guard.js +13 -0
- package/src/lib/task-progress-tracker.js +36 -1
- package/src/lib/text-file-search.js +11 -0
- package/src/runtime/agent-core.js +5 -1
- package/src/runtime/agent-runtime.js +2 -0
- package/src/assets/web-panel/assets/AppLayout-CdnpAzuo.js +0 -9
- package/src/assets/web-panel/assets/ChatBubbleRenderer-LMGrVg9Z.js +0 -1
- package/src/assets/web-panel/assets/MarkdownRenderer-H_GkKEp-.js +0 -1
- package/src/assets/web-panel/assets/MobileProjects-BTM0-1MZ.js +0 -1
- package/src/assets/web-panel/assets/Tasks-Btkyo0G7.js +0 -1
- package/src/assets/web-panel/assets/devWarning-DATyiD_X.js +0 -1
- package/src/assets/web-panel/assets/index-DmzMCELP.js +0 -1
- package/src/assets/web-panel/assets/index-TlPg2Jz6.js +0 -1
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
import chalk from "chalk";
|
|
2
|
+
import { logger } from "../lib/logger.js";
|
|
3
|
+
import {
|
|
4
|
+
configureEvolutionDeployment,
|
|
5
|
+
getEvolutionDeploymentStatus,
|
|
6
|
+
setEvolutionDeploymentEnabled,
|
|
7
|
+
} from "../lib/evolution/evolution-deployment-config.js";
|
|
8
|
+
|
|
9
|
+
function printStatus(status) {
|
|
10
|
+
logger.log(chalk.bold("Governed Skill evolution deployment"));
|
|
11
|
+
logger.log(
|
|
12
|
+
` Effective: ${status.effectiveEnabled ? "enabled" : "disabled"}`,
|
|
13
|
+
);
|
|
14
|
+
logger.log(` Source: ${status.source}`);
|
|
15
|
+
logger.log(
|
|
16
|
+
` Signature: ${status.verified ? "verified" : "not verified"}`,
|
|
17
|
+
);
|
|
18
|
+
logger.log(` Auto promotion: HOLD (manual review required)`);
|
|
19
|
+
logger.log(` Profile: ${status.profilePath}`);
|
|
20
|
+
if (status.descriptorPath)
|
|
21
|
+
logger.log(` Descriptor: ${status.descriptorPath}`);
|
|
22
|
+
if (status.trustRootPath)
|
|
23
|
+
logger.log(` Trust root: ${status.trustRootPath}`);
|
|
24
|
+
if (status.commands?.length)
|
|
25
|
+
logger.log(` Commands: ${status.commands.join(", ")}`);
|
|
26
|
+
if (status.error) logger.log(chalk.red(` Error: ${status.error}`));
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function output(status, json) {
|
|
30
|
+
if (json) console.log(JSON.stringify(status, null, 2));
|
|
31
|
+
else printStatus(status);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function fail(error, json) {
|
|
35
|
+
const message = error instanceof Error ? error.message : String(error);
|
|
36
|
+
if (json) console.log(JSON.stringify({ ok: false, error: message }, null, 2));
|
|
37
|
+
else logger.error(`Failed: ${message}`);
|
|
38
|
+
process.exitCode = 1;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export function registerEvolutionDeploymentCommands(parent) {
|
|
42
|
+
const deployment = parent
|
|
43
|
+
.command("deployment")
|
|
44
|
+
.description("Configure the signed governed Skill evolution deployment");
|
|
45
|
+
|
|
46
|
+
deployment
|
|
47
|
+
.command("status")
|
|
48
|
+
.description("Show the effective deployment and signature status")
|
|
49
|
+
.option("--json", "Output as JSON")
|
|
50
|
+
.action(async (options) => {
|
|
51
|
+
try {
|
|
52
|
+
output(await getEvolutionDeploymentStatus(), options.json);
|
|
53
|
+
} catch (error) {
|
|
54
|
+
fail(error, options.json);
|
|
55
|
+
}
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
deployment
|
|
59
|
+
.command("configure")
|
|
60
|
+
.description("Verify, save, and enable a signed deployment")
|
|
61
|
+
.requiredOption("--descriptor <path>", "Absolute signed descriptor path")
|
|
62
|
+
.requiredOption("--trust-root <path>", "Absolute Ed25519 public key path")
|
|
63
|
+
.option("--disabled", "Save without enabling")
|
|
64
|
+
.option("--json", "Output as JSON")
|
|
65
|
+
.action(async (options) => {
|
|
66
|
+
try {
|
|
67
|
+
output(
|
|
68
|
+
await configureEvolutionDeployment({
|
|
69
|
+
descriptorPath: options.descriptor,
|
|
70
|
+
trustRootPath: options.trustRoot,
|
|
71
|
+
enabled: options.disabled !== true,
|
|
72
|
+
}),
|
|
73
|
+
options.json,
|
|
74
|
+
);
|
|
75
|
+
} catch (error) {
|
|
76
|
+
fail(error, options.json);
|
|
77
|
+
}
|
|
78
|
+
});
|
|
79
|
+
|
|
80
|
+
for (const enabled of [true, false]) {
|
|
81
|
+
deployment
|
|
82
|
+
.command(enabled ? "enable" : "disable")
|
|
83
|
+
.description(
|
|
84
|
+
`${enabled ? "Enable" : "Disable"} the saved deployment profile`,
|
|
85
|
+
)
|
|
86
|
+
.option("--json", "Output as JSON")
|
|
87
|
+
.action(async (options) => {
|
|
88
|
+
try {
|
|
89
|
+
output(await setEvolutionDeploymentEnabled(enabled), options.json);
|
|
90
|
+
} catch (error) {
|
|
91
|
+
fail(error, options.json);
|
|
92
|
+
}
|
|
93
|
+
});
|
|
94
|
+
}
|
|
95
|
+
}
|
|
@@ -14,6 +14,7 @@ import { registerEvolutionWorkbenchCommands } from "./evolution-workbench.js";
|
|
|
14
14
|
import { registerEvolutionAttestorTrustCommands } from "./evolution-attestor-trust.js";
|
|
15
15
|
import { registerGovernedKnowledgeCommands } from "./evolution-knowledge.js";
|
|
16
16
|
import { registerWikiSkillBenchmarkCommands } from "./evolution-benchmark.js";
|
|
17
|
+
import { registerEvolutionDeploymentCommands } from "./evolution-deployment.js";
|
|
17
18
|
import {
|
|
18
19
|
assessCapability,
|
|
19
20
|
recordIncrementalModelMetrics,
|
|
@@ -56,6 +57,7 @@ export function registerEvolutionCommand(program, dependencies = {}) {
|
|
|
56
57
|
registerEvolutionAttestorTrustCommands(evolution, dependencies);
|
|
57
58
|
registerGovernedKnowledgeCommands(evolution, dependencies);
|
|
58
59
|
registerWikiSkillBenchmarkCommands(evolution, dependencies);
|
|
60
|
+
registerEvolutionDeploymentCommands(evolution);
|
|
59
61
|
|
|
60
62
|
// evolution assess <name> <score>
|
|
61
63
|
evolution
|
package/src/data/changelog.json
CHANGED
|
@@ -1,6 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"source": "CHANGELOG.md",
|
|
3
3
|
"releases": [
|
|
4
|
+
{
|
|
5
|
+
"productVersion": null,
|
|
6
|
+
"cliVersion": "0.166.43",
|
|
7
|
+
"cliVersions": ["0.166.43"],
|
|
8
|
+
"date": null,
|
|
9
|
+
"title": "",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"heading": "Added - cc CLI 0.166.43: configure governed Skill evolution",
|
|
13
|
+
"body": "- Add a persistent, fail-closed deployment profile for signed governed-evolution\n descriptors and Ed25519 trust roots. Environment overrides remain available\n for centrally managed installations.\n- Add `cc evolution deployment status/configure/enable/disable` so administrators\n can verify and control the deployment without maintaining process environment\n variables.\n- Expose the same bounded configuration through authenticated App Server topics\n for `cc ui`; automatic promotion remains `HOLD` and review/release authority\n stays in the signed deployment host.\n- Document defaults, triggers, review flow, storage locations, and the visual\n configuration entry points used by both IDE plugins and `cc ui`."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
4
17
|
{
|
|
5
18
|
"productVersion": null,
|
|
6
19
|
"cliVersion": "0.166.42",
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import {
|
|
2
|
+
configureEvolutionDeployment,
|
|
3
|
+
getEvolutionDeploymentStatus,
|
|
4
|
+
setEvolutionDeploymentEnabled,
|
|
5
|
+
} from "../../lib/evolution/evolution-deployment-config.js";
|
|
6
|
+
|
|
7
|
+
function assertSecureControl(context) {
|
|
8
|
+
const server = context?.server;
|
|
9
|
+
const loopback = new Set(["127.0.0.1", "localhost", "::1"]);
|
|
10
|
+
if (!server?.token && !loopback.has(server?.host)) {
|
|
11
|
+
throw new Error(
|
|
12
|
+
"Skill evolution configuration requires a token-protected or loopback-only cc ui",
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function requiredPath(value, name) {
|
|
18
|
+
if (
|
|
19
|
+
typeof value !== "string" ||
|
|
20
|
+
value.length === 0 ||
|
|
21
|
+
value.length > 4096 ||
|
|
22
|
+
/[\r\n\0]/u.test(value)
|
|
23
|
+
) {
|
|
24
|
+
throw new Error(`${name} is invalid`);
|
|
25
|
+
}
|
|
26
|
+
return value;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
export function createEvolutionDeploymentTopicHandlers(options = {}) {
|
|
30
|
+
const getStatus = options.getStatus || getEvolutionDeploymentStatus;
|
|
31
|
+
const configure = options.configure || configureEvolutionDeployment;
|
|
32
|
+
const setEnabled = options.setEnabled || setEvolutionDeploymentEnabled;
|
|
33
|
+
return {
|
|
34
|
+
"evolution.deployment.status": async (_frame, context) => {
|
|
35
|
+
assertSecureControl(context);
|
|
36
|
+
return getStatus();
|
|
37
|
+
},
|
|
38
|
+
"evolution.deployment.configure": async (frame, context) => {
|
|
39
|
+
assertSecureControl(context);
|
|
40
|
+
return configure({
|
|
41
|
+
descriptorPath: requiredPath(frame?.descriptorPath, "descriptorPath"),
|
|
42
|
+
trustRootPath: requiredPath(frame?.trustRootPath, "trustRootPath"),
|
|
43
|
+
enabled: true,
|
|
44
|
+
});
|
|
45
|
+
},
|
|
46
|
+
"evolution.deployment.set-enabled": async (frame, context) => {
|
|
47
|
+
assertSecureControl(context);
|
|
48
|
+
if (typeof frame?.enabled !== "boolean")
|
|
49
|
+
throw new Error("enabled must be a boolean");
|
|
50
|
+
return setEnabled(frame.enabled);
|
|
51
|
+
},
|
|
52
|
+
};
|
|
53
|
+
}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
import {
|
|
2
|
+
readEvolutionDeploymentProfile,
|
|
3
|
+
setEvolutionDeploymentProfileEnabled,
|
|
4
|
+
writeEvolutionDeploymentProfile,
|
|
5
|
+
} from "./evolution-deployment-profile.js";
|
|
6
|
+
import { verifyEvolutionDeployment } from "./evolution-deployment-loader.js";
|
|
7
|
+
|
|
8
|
+
function environmentSelection(env) {
|
|
9
|
+
const descriptorPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_DESCRIPTOR;
|
|
10
|
+
const trustRootPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_TRUST_ROOT;
|
|
11
|
+
if (!descriptorPath && !trustRootPath) return null;
|
|
12
|
+
return { descriptorPath, trustRootPath };
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export async function getEvolutionDeploymentStatus(options = {}) {
|
|
16
|
+
const env = options.env || process.env;
|
|
17
|
+
const saved = await readEvolutionDeploymentProfile(options);
|
|
18
|
+
const fromEnvironment = environmentSelection(env);
|
|
19
|
+
const source = fromEnvironment
|
|
20
|
+
? "environment"
|
|
21
|
+
: saved.profile?.enabled
|
|
22
|
+
? "profile"
|
|
23
|
+
: "none";
|
|
24
|
+
const selected =
|
|
25
|
+
fromEnvironment || (saved.profile?.enabled ? saved.profile : null);
|
|
26
|
+
const base = {
|
|
27
|
+
source,
|
|
28
|
+
effectiveEnabled: source !== "none",
|
|
29
|
+
profileEnabled: saved.profile?.enabled === true,
|
|
30
|
+
profilePath: saved.filePath,
|
|
31
|
+
descriptorPath:
|
|
32
|
+
selected?.descriptorPath || saved.profile?.descriptorPath || null,
|
|
33
|
+
trustRootPath:
|
|
34
|
+
selected?.trustRootPath || saved.profile?.trustRootPath || null,
|
|
35
|
+
verified: false,
|
|
36
|
+
error: saved.error,
|
|
37
|
+
autoPromotion: "hold",
|
|
38
|
+
};
|
|
39
|
+
if (!selected || saved.error) return Object.freeze(base);
|
|
40
|
+
try {
|
|
41
|
+
const verified = await verifyEvolutionDeployment(selected, options);
|
|
42
|
+
return Object.freeze({
|
|
43
|
+
...base,
|
|
44
|
+
verified: true,
|
|
45
|
+
error: null,
|
|
46
|
+
revision: verified.descriptor.revision,
|
|
47
|
+
modulePath: verified.modulePath,
|
|
48
|
+
moduleDigest: verified.descriptor.moduleDigest,
|
|
49
|
+
commands: verified.descriptor.commands,
|
|
50
|
+
});
|
|
51
|
+
} catch (error) {
|
|
52
|
+
return Object.freeze({
|
|
53
|
+
...base,
|
|
54
|
+
error: error instanceof Error ? error.message : String(error),
|
|
55
|
+
});
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export async function configureEvolutionDeployment(
|
|
60
|
+
{ descriptorPath, trustRootPath, enabled = true },
|
|
61
|
+
options = {},
|
|
62
|
+
) {
|
|
63
|
+
const verified = await verifyEvolutionDeployment(
|
|
64
|
+
{ descriptorPath, trustRootPath },
|
|
65
|
+
options,
|
|
66
|
+
);
|
|
67
|
+
await writeEvolutionDeploymentProfile(
|
|
68
|
+
{
|
|
69
|
+
enabled: enabled === true,
|
|
70
|
+
descriptorPath: verified.descriptorPath,
|
|
71
|
+
trustRootPath: verified.trustRootPath,
|
|
72
|
+
},
|
|
73
|
+
options,
|
|
74
|
+
);
|
|
75
|
+
return getEvolutionDeploymentStatus(options);
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
export async function setEvolutionDeploymentEnabled(enabled, options = {}) {
|
|
79
|
+
await setEvolutionDeploymentProfileEnabled(enabled, options);
|
|
80
|
+
return getEvolutionDeploymentStatus(options);
|
|
81
|
+
}
|
|
@@ -2,6 +2,7 @@ import { createHash, createPublicKey, verify } from "node:crypto";
|
|
|
2
2
|
import { readFile, realpath } from "node:fs/promises";
|
|
3
3
|
import { isAbsolute } from "node:path";
|
|
4
4
|
import { types as utilTypes } from "node:util";
|
|
5
|
+
import { readEvolutionDeploymentProfile } from "./evolution-deployment-profile.js";
|
|
5
6
|
|
|
6
7
|
export const EVOLUTION_DEPLOYMENT_DESCRIPTOR_SCHEMA =
|
|
7
8
|
"chainlesschain.evolution-deployment-descriptor/v1";
|
|
@@ -223,7 +224,9 @@ async function loadBuiltInFactories(commandName) {
|
|
|
223
224
|
import("./evolution-eval-process-supervisor.js"),
|
|
224
225
|
import("./governed-skill-synthesis-attestor-trust-approval-client.js"),
|
|
225
226
|
import("./governed-skill-synthesis-attestor-trust-operations-client.js"),
|
|
226
|
-
import(
|
|
227
|
+
import(
|
|
228
|
+
"./governed-skill-synthesis-attestor-trust-operations-cli-host.js"
|
|
229
|
+
),
|
|
227
230
|
]);
|
|
228
231
|
factories.createEvolutionWorkbenchCliHost = createEvolutionWorkbenchCliHost;
|
|
229
232
|
factories.createEvolutionWorkbenchReviewRuntime =
|
|
@@ -350,8 +353,9 @@ async function loadBuiltInFactories(commandName) {
|
|
|
350
353
|
commandName === "stream" ||
|
|
351
354
|
commandName === "ui"
|
|
352
355
|
) {
|
|
353
|
-
const { createAgentEvolutionRuntimeComposition } =
|
|
354
|
-
|
|
356
|
+
const { createAgentEvolutionRuntimeComposition } = await import(
|
|
357
|
+
"./agent-evolution-runtime-composition.js"
|
|
358
|
+
);
|
|
355
359
|
factories.createAgentEvolutionRuntimeComposition =
|
|
356
360
|
createAgentEvolutionRuntimeComposition;
|
|
357
361
|
}
|
|
@@ -414,20 +418,14 @@ function bindFactoriesToModule(factories, moduleDigest) {
|
|
|
414
418
|
return Object.freeze(result);
|
|
415
419
|
}
|
|
416
420
|
|
|
417
|
-
export async function
|
|
418
|
-
|
|
421
|
+
export async function verifyEvolutionDeployment(
|
|
422
|
+
{ descriptorPath, trustRootPath },
|
|
419
423
|
{
|
|
420
|
-
env = process.env,
|
|
421
424
|
read = readFile,
|
|
422
425
|
resolveRealPath = realpath,
|
|
423
|
-
|
|
424
|
-
additionalFactories = {},
|
|
426
|
+
includeModuleBytes = false,
|
|
425
427
|
} = {},
|
|
426
428
|
) {
|
|
427
|
-
if (!SUPPORTED_COMMANDS.has(commandName)) return null;
|
|
428
|
-
const descriptorPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_DESCRIPTOR;
|
|
429
|
-
const trustRootPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_TRUST_ROOT;
|
|
430
|
-
if (!descriptorPath && !trustRootPath) return null;
|
|
431
429
|
if (!descriptorPath || !trustRootPath)
|
|
432
430
|
throw new Error(
|
|
433
431
|
"evolution deployment requires both descriptor and trust root",
|
|
@@ -458,7 +456,6 @@ export async function loadEvolutionDeploymentCommandDependencies(
|
|
|
458
456
|
)
|
|
459
457
|
)
|
|
460
458
|
throw new Error("evolution deployment descriptor signature rejected");
|
|
461
|
-
if (!descriptor.commands.includes(commandName)) return null;
|
|
462
459
|
|
|
463
460
|
const modulePath = await resolveRealPath(descriptor.modulePath);
|
|
464
461
|
const moduleBytes = await read(modulePath);
|
|
@@ -466,6 +463,58 @@ export async function loadEvolutionDeploymentCommandDependencies(
|
|
|
466
463
|
throw new Error("evolution deployment module size is invalid");
|
|
467
464
|
if (sha256(moduleBytes) !== descriptor.moduleDigest)
|
|
468
465
|
throw new Error("evolution deployment module digest mismatch");
|
|
466
|
+
return Object.freeze({
|
|
467
|
+
descriptor,
|
|
468
|
+
descriptorPath: await resolveRealPath(descriptorPath),
|
|
469
|
+
trustRootPath: await resolveRealPath(trustRootPath),
|
|
470
|
+
modulePath,
|
|
471
|
+
...(includeModuleBytes ? { moduleBytes } : {}),
|
|
472
|
+
});
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
export async function loadEvolutionDeploymentCommandDependencies(
|
|
476
|
+
commandName,
|
|
477
|
+
{
|
|
478
|
+
env = process.env,
|
|
479
|
+
read = readFile,
|
|
480
|
+
resolveRealPath = realpath,
|
|
481
|
+
importModule = (url) => import(url),
|
|
482
|
+
additionalFactories = {},
|
|
483
|
+
} = {},
|
|
484
|
+
) {
|
|
485
|
+
if (!SUPPORTED_COMMANDS.has(commandName)) return null;
|
|
486
|
+
let descriptorPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_DESCRIPTOR;
|
|
487
|
+
let trustRootPath = env.CHAINLESSCHAIN_EVOLUTION_DEPLOYMENT_TRUST_ROOT;
|
|
488
|
+
let fromSavedProfile = false;
|
|
489
|
+
if (!descriptorPath && !trustRootPath) {
|
|
490
|
+
const saved = await readEvolutionDeploymentProfile({ env });
|
|
491
|
+
if (!saved.error && saved.profile?.enabled) {
|
|
492
|
+
descriptorPath = saved.profile.descriptorPath;
|
|
493
|
+
trustRootPath = saved.profile.trustRootPath;
|
|
494
|
+
fromSavedProfile = true;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
if (!descriptorPath && !trustRootPath) return null;
|
|
498
|
+
if (!descriptorPath || !trustRootPath)
|
|
499
|
+
throw new Error(
|
|
500
|
+
"evolution deployment requires both descriptor and trust root",
|
|
501
|
+
);
|
|
502
|
+
let verified;
|
|
503
|
+
try {
|
|
504
|
+
verified = await verifyEvolutionDeployment(
|
|
505
|
+
{ descriptorPath, trustRootPath },
|
|
506
|
+
{ read, resolveRealPath, includeModuleBytes: true },
|
|
507
|
+
);
|
|
508
|
+
} catch (error) {
|
|
509
|
+
// A saved profile may become stale after files are moved or rotated. Keep
|
|
510
|
+
// governed capabilities fail-closed while allowing `deployment status`,
|
|
511
|
+
// `configure`, and `disable` to start so the operator can recover. Explicit
|
|
512
|
+
// environment overrides remain strict and surface the error immediately.
|
|
513
|
+
if (fromSavedProfile) return null;
|
|
514
|
+
throw error;
|
|
515
|
+
}
|
|
516
|
+
const { descriptor, moduleBytes } = verified;
|
|
517
|
+
if (!descriptor.commands.includes(commandName)) return null;
|
|
469
518
|
// Import the exact bytes that were authenticated. Importing modulePath here
|
|
470
519
|
// would reopen a pathname-replacement window between hashing and execution.
|
|
471
520
|
// Deployment entrypoints are therefore single-file ESM bundles; any external
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { randomUUID } from "node:crypto";
|
|
2
|
+
import { readFile, rename, unlink, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, isAbsolute, join } from "node:path";
|
|
4
|
+
import { resolveConfigDataRoot } from "../paths.js";
|
|
5
|
+
import {
|
|
6
|
+
PRIVATE_FILE_MODE,
|
|
7
|
+
ensurePrivateDirectory,
|
|
8
|
+
ensurePrivateFile,
|
|
9
|
+
} from "../secure-fs.js";
|
|
10
|
+
|
|
11
|
+
export const EVOLUTION_DEPLOYMENT_PROFILE_SCHEMA =
|
|
12
|
+
"chainlesschain.evolution-deployment-profile/v1";
|
|
13
|
+
|
|
14
|
+
export function getEvolutionDeploymentProfilePath({
|
|
15
|
+
env = process.env,
|
|
16
|
+
cwd = process.cwd(),
|
|
17
|
+
} = {}) {
|
|
18
|
+
return join(
|
|
19
|
+
resolveConfigDataRoot({ env, cwd }).path,
|
|
20
|
+
"evolution",
|
|
21
|
+
"deployment-profile.json",
|
|
22
|
+
);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function normalizeProfile(value) {
|
|
26
|
+
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
27
|
+
throw new TypeError("evolution deployment profile must be an object");
|
|
28
|
+
const keys = Object.keys(value).sort();
|
|
29
|
+
const expected = ["descriptorPath", "enabled", "schema", "trustRootPath"];
|
|
30
|
+
if (JSON.stringify(keys) !== JSON.stringify(expected.sort()))
|
|
31
|
+
throw new TypeError("evolution deployment profile has unexpected fields");
|
|
32
|
+
if (value.schema !== EVOLUTION_DEPLOYMENT_PROFILE_SCHEMA)
|
|
33
|
+
throw new TypeError("evolution deployment profile schema is invalid");
|
|
34
|
+
if (typeof value.enabled !== "boolean")
|
|
35
|
+
throw new TypeError("evolution deployment profile enabled is invalid");
|
|
36
|
+
for (const [name, path] of [
|
|
37
|
+
["descriptorPath", value.descriptorPath],
|
|
38
|
+
["trustRootPath", value.trustRootPath],
|
|
39
|
+
]) {
|
|
40
|
+
if (typeof path !== "string" || !isAbsolute(path))
|
|
41
|
+
throw new TypeError(
|
|
42
|
+
`evolution deployment profile ${name} must be absolute`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
45
|
+
return Object.freeze({
|
|
46
|
+
schema: value.schema,
|
|
47
|
+
enabled: value.enabled,
|
|
48
|
+
descriptorPath: value.descriptorPath,
|
|
49
|
+
trustRootPath: value.trustRootPath,
|
|
50
|
+
});
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export async function readEvolutionDeploymentProfile(options = {}) {
|
|
54
|
+
const filePath =
|
|
55
|
+
options.filePath || getEvolutionDeploymentProfilePath(options);
|
|
56
|
+
try {
|
|
57
|
+
const profile = normalizeProfile(
|
|
58
|
+
JSON.parse(await readFile(filePath, "utf8")),
|
|
59
|
+
);
|
|
60
|
+
return Object.freeze({ filePath, profile, error: null });
|
|
61
|
+
} catch (error) {
|
|
62
|
+
if (error?.code === "ENOENT")
|
|
63
|
+
return Object.freeze({ filePath, profile: null, error: null });
|
|
64
|
+
return Object.freeze({
|
|
65
|
+
filePath,
|
|
66
|
+
profile: null,
|
|
67
|
+
error: error instanceof Error ? error.message : String(error),
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export async function writeEvolutionDeploymentProfile(input, options = {}) {
|
|
73
|
+
const profile = normalizeProfile({
|
|
74
|
+
schema: EVOLUTION_DEPLOYMENT_PROFILE_SCHEMA,
|
|
75
|
+
enabled: input?.enabled === true,
|
|
76
|
+
descriptorPath: input?.descriptorPath,
|
|
77
|
+
trustRootPath: input?.trustRootPath,
|
|
78
|
+
});
|
|
79
|
+
const filePath =
|
|
80
|
+
options.filePath || getEvolutionDeploymentProfilePath(options);
|
|
81
|
+
ensurePrivateDirectory(dirname(filePath));
|
|
82
|
+
const temporaryPath = join(
|
|
83
|
+
dirname(filePath),
|
|
84
|
+
`.deployment-profile.${randomUUID()}.tmp`,
|
|
85
|
+
);
|
|
86
|
+
try {
|
|
87
|
+
await writeFile(temporaryPath, `${JSON.stringify(profile, null, 2)}\n`, {
|
|
88
|
+
encoding: "utf8",
|
|
89
|
+
mode: PRIVATE_FILE_MODE,
|
|
90
|
+
flag: "wx",
|
|
91
|
+
});
|
|
92
|
+
ensurePrivateFile(temporaryPath);
|
|
93
|
+
await rename(temporaryPath, filePath);
|
|
94
|
+
ensurePrivateFile(filePath);
|
|
95
|
+
} catch (error) {
|
|
96
|
+
await unlink(temporaryPath).catch(() => {});
|
|
97
|
+
throw error;
|
|
98
|
+
}
|
|
99
|
+
return Object.freeze({ filePath, profile });
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
export async function setEvolutionDeploymentProfileEnabled(
|
|
103
|
+
enabled,
|
|
104
|
+
options = {},
|
|
105
|
+
) {
|
|
106
|
+
const current = await readEvolutionDeploymentProfile(options);
|
|
107
|
+
if (current.error) throw new Error(current.error);
|
|
108
|
+
if (!current.profile)
|
|
109
|
+
throw new Error("evolution deployment profile is not configured");
|
|
110
|
+
return writeEvolutionDeploymentProfile(
|
|
111
|
+
{ ...current.profile, enabled: enabled === true },
|
|
112
|
+
{ ...options, filePath: current.filePath },
|
|
113
|
+
);
|
|
114
|
+
}
|
|
@@ -61,6 +61,7 @@ const VSCODE_COMMANDS = [
|
|
|
61
61
|
"chainlesschain.plugins.manage",
|
|
62
62
|
"chainlesschain.skills.retrieve",
|
|
63
63
|
"chainlesschain.evolution.workbench",
|
|
64
|
+
"chainlesschain.evolution.configure",
|
|
64
65
|
"chainlesschain.worktree.tasks",
|
|
65
66
|
"chainlesschain.chrome.connector",
|
|
66
67
|
"chainlesschain.artifacts.show",
|
|
@@ -118,6 +119,7 @@ const JETBRAINS_ACTIONS = [
|
|
|
118
119
|
"chainlesschain.plugins.Manage",
|
|
119
120
|
"chainlesschain.skills.Retrieve",
|
|
120
121
|
"chainlesschain.evolution.Workbench",
|
|
122
|
+
"chainlesschain.evolution.Configure",
|
|
121
123
|
"chainlesschain.worktree.Tasks",
|
|
122
124
|
"chainlesschain.chrome.Connector",
|
|
123
125
|
"chainlesschain.workspace.ScanAutoExec",
|
|
@@ -75,7 +75,7 @@ export class ReadFileLoopGuard {
|
|
|
75
75
|
if (
|
|
76
76
|
targeted &&
|
|
77
77
|
!entry.rereads.has(fingerprint) &&
|
|
78
|
-
entry.rereads.size <
|
|
78
|
+
entry.rereads.size < 3
|
|
79
79
|
) {
|
|
80
80
|
entry.rereads.add(fingerprint);
|
|
81
81
|
page.readRecovery = { action: "targeted-review" };
|
|
@@ -161,8 +161,6 @@ export class ReadFileLoopGuard {
|
|
|
161
161
|
return;
|
|
162
162
|
if (tool === "read_file") {
|
|
163
163
|
if (result?.readProgress?.newContent === true) this.batch.advanced = true;
|
|
164
|
-
if (result?.readRecovery?.action === "targeted-review")
|
|
165
|
-
this.batch.advanced = true;
|
|
166
164
|
if (result?.readProgress?.newContent === false) this.batch.duplicates++;
|
|
167
165
|
} else if (
|
|
168
166
|
(tool === "run_code" || tool === "run_shell") &&
|
|
@@ -207,9 +205,24 @@ export class ReadFileLoopGuard {
|
|
|
207
205
|
);
|
|
208
206
|
}
|
|
209
207
|
|
|
208
|
+
get hasRecoveryReads() {
|
|
209
|
+
return (
|
|
210
|
+
this.hasUnreadPages ||
|
|
211
|
+
[...this.progress.values()].some((entry) => entry.rereads.size < 3)
|
|
212
|
+
);
|
|
213
|
+
}
|
|
214
|
+
|
|
210
215
|
canContinue(filePath, args = {}) {
|
|
216
|
+
const entry = this.progress.get(keyFor(filePath, args));
|
|
211
217
|
return (
|
|
212
|
-
|
|
218
|
+
entry?.summary?.reachedEnd === false ||
|
|
219
|
+
(!!entry &&
|
|
220
|
+
entry.rereads.size < 3 &&
|
|
221
|
+
Number.isSafeInteger(args.offset) &&
|
|
222
|
+
args.offset > 0 &&
|
|
223
|
+
Number.isSafeInteger(args.limit) &&
|
|
224
|
+
args.limit > 0 &&
|
|
225
|
+
args.limit <= 80)
|
|
213
226
|
);
|
|
214
227
|
}
|
|
215
228
|
|
|
@@ -429,9 +429,22 @@ export class RemoteReadLoopGuard {
|
|
|
429
429
|
this.offeredRevision = this.revision;
|
|
430
430
|
const entry = this.targets.get(this.activeKey);
|
|
431
431
|
entry.recoveryOffered = true;
|
|
432
|
+
// Keep the shell available for local reproduction and validation. Only
|
|
433
|
+
// repeated reads of the stalled remote target are narrowed below.
|
|
434
|
+
if (entry.tool === "run_shell" && entry.github) return [];
|
|
432
435
|
return [entry.tool];
|
|
433
436
|
}
|
|
434
437
|
|
|
438
|
+
shouldPause(tool, args = {}) {
|
|
439
|
+
const target = remoteReadTarget(tool, args);
|
|
440
|
+
const entry = target && this.targets.get(target.key);
|
|
441
|
+
return !!(
|
|
442
|
+
entry?.github &&
|
|
443
|
+
entry.recoveryOffered &&
|
|
444
|
+
entry.repeats >= RECOVERY_AFTER
|
|
445
|
+
);
|
|
446
|
+
}
|
|
447
|
+
|
|
435
448
|
get workflowHint() {
|
|
436
449
|
const active = this.targets.get(this.activeKey);
|
|
437
450
|
if (active?.github && !active.pullRequest) {
|
|
@@ -81,6 +81,7 @@ export class TaskProgressTracker {
|
|
|
81
81
|
this.childFindings = new Map();
|
|
82
82
|
this.lastActions = [];
|
|
83
83
|
this.remoteInspections = [];
|
|
84
|
+
this.localFindings = [];
|
|
84
85
|
}
|
|
85
86
|
|
|
86
87
|
retainChildResult(id, result, owner = "root") {
|
|
@@ -120,6 +121,32 @@ export class TaskProgressTracker {
|
|
|
120
121
|
typeof args.old_string === "string" &&
|
|
121
122
|
args.old_string === args.new_string);
|
|
122
123
|
|
|
124
|
+
if (!failed && (tool === "search_files" || tool === "read_file")) {
|
|
125
|
+
const evidence = result.content ?? result.matches ?? result.output;
|
|
126
|
+
const excerpt = boundedText(
|
|
127
|
+
typeof evidence === "string" ? evidence : JSON.stringify(evidence),
|
|
128
|
+
1000,
|
|
129
|
+
);
|
|
130
|
+
if (excerpt) {
|
|
131
|
+
const entry = {
|
|
132
|
+
owner,
|
|
133
|
+
tool,
|
|
134
|
+
path: boundedText(args.path || result.path, 320),
|
|
135
|
+
query: boundedText(args.pattern, 200),
|
|
136
|
+
range: result.range,
|
|
137
|
+
excerpt,
|
|
138
|
+
};
|
|
139
|
+
const owned = [
|
|
140
|
+
...this.localFindings.filter((item) => item.owner === owner),
|
|
141
|
+
entry,
|
|
142
|
+
].slice(-4);
|
|
143
|
+
this.localFindings = [
|
|
144
|
+
...this.localFindings.filter((item) => item.owner !== owner),
|
|
145
|
+
...owned,
|
|
146
|
+
].slice(-MAX_CHECKPOINT_OWNERS * 4);
|
|
147
|
+
}
|
|
148
|
+
}
|
|
149
|
+
|
|
123
150
|
if (tool === "spawn_sub_agent")
|
|
124
151
|
this.retainChildResult(result?.subAgentId, result, owner);
|
|
125
152
|
if (tool === "todo_write" && !failed && Array.isArray(args.todos)) {
|
|
@@ -224,6 +251,7 @@ export class TaskProgressTracker {
|
|
|
224
251
|
guidance:
|
|
225
252
|
message +
|
|
226
253
|
" For an implementation task, make the smallest justified, authorized change and validate it. " +
|
|
254
|
+
"For a bug fix, state the observed failure, your leading root-cause hypothesis and the smallest test that can disprove it. Run that focused reproduction or diagnostic next; use its actual output to choose the next step. Do not keep reading adjacent files without naming the specific missing fact. A timeout alone does not establish that increasing the timeout is the fix. " +
|
|
227
255
|
"For research/review, synthesize evidence-backed findings; do not write files merely to clear this warning. " +
|
|
228
256
|
"If evidence is insufficient, name the exact missing fact and use a focused search or bounded computation. " +
|
|
229
257
|
"Do not restart general investigation, rewrite the plan, or delegate the same research. " +
|
|
@@ -239,11 +267,15 @@ export class TaskProgressTracker {
|
|
|
239
267
|
!this.plans.size &&
|
|
240
268
|
!this.childFindings.size &&
|
|
241
269
|
!this.lastActions.length &&
|
|
242
|
-
!this.remoteInspections.length
|
|
270
|
+
!this.remoteInspections.length &&
|
|
271
|
+
!this.localFindings.length
|
|
243
272
|
)
|
|
244
273
|
return null;
|
|
245
274
|
const checkpoint = {
|
|
246
275
|
bounded: true,
|
|
276
|
+
recentLocalFindings: this.localFindings
|
|
277
|
+
.filter((entry) => entry.owner === owner)
|
|
278
|
+
.map(({ owner: _owner, ...entry }) => entry),
|
|
247
279
|
recentToolOutcomes: this.lastActions
|
|
248
280
|
.filter((entry) => entry.owner === owner)
|
|
249
281
|
.map(({ tool, path, output }) => ({ tool, path, output })),
|
|
@@ -265,6 +297,7 @@ export class TaskProgressTracker {
|
|
|
265
297
|
// Only counters are inherited across isolated child contracts. Source
|
|
266
298
|
// material belongs to the loop that observed it or received the child result.
|
|
267
299
|
if (
|
|
300
|
+
!checkpoint.recentLocalFindings.length &&
|
|
268
301
|
!checkpoint.recentToolOutcomes.length &&
|
|
269
302
|
!checkpoint.recentRemoteInspections.length &&
|
|
270
303
|
!checkpoint.reportedPlans.length &&
|
|
@@ -275,6 +308,8 @@ export class TaskProgressTracker {
|
|
|
275
308
|
if (checkpoint.reportedPlans.length > 1) checkpoint.reportedPlans.pop();
|
|
276
309
|
else if (checkpoint.childFindings.length)
|
|
277
310
|
checkpoint.childFindings.shift();
|
|
311
|
+
else if (checkpoint.recentLocalFindings.length)
|
|
312
|
+
checkpoint.recentLocalFindings.shift();
|
|
278
313
|
else if (checkpoint.recentRemoteInspections.length)
|
|
279
314
|
checkpoint.recentRemoteInspections.shift();
|
|
280
315
|
else if (checkpoint.recentToolOutcomes.length)
|