chainlesschain 0.166.138 → 0.166.140
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 +37 -11
- package/package.json +1 -1
- package/src/assets/linux-subreaper/linux-arm64/manifest.json +1 -1
- package/src/assets/linux-subreaper/linux-x64/manifest.json +1 -1
- package/src/assets/web-panel/assets/{AIOps-CHItp4vg.js → AIOps-BefmcZw2.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-nhMNWW_d.js → ActionButton-BBlS9rmj.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-DRc81BBI.js → Analytics-DfNjXT9e.js} +1 -1
- package/src/assets/web-panel/assets/{AppLayout-CVt7HMkp.js → AppLayout-CIBZPPMS.js} +2 -2
- package/src/assets/web-panel/assets/{Artifacts-BuJgG5jf.js → Artifacts-CE66rTTZ.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-msNg0aH-.js → Audit-DOC8Lt8U.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-BpcV8yWC.js → BackgroundAgents-9TMG041Q.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-P53DADwG.js → Backup-us3KWb9F.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-DFxT2yWN.js → BaseInput-D6Q95Wr5.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-BXoHisHW.js → Chat-BPrM5ARp.js} +1 -1
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-DMGtSdDx.js → ChatBubbleRenderer-Drs9vSc4.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-B4g_ckJq.js → Checkbox-DqZGMV0o.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-C6SSSOfp.js → Codegen-CmolL6wr.js} +1 -1
- package/src/assets/web-panel/assets/{Col-IO1NEUYL.js → Col-BwHSmoYQ.js} +1 -1
- package/src/assets/web-panel/assets/{Community-CdEBl93F.js → Community-DGWqobpd.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-DYs0a9k7.js → Compact-t_yy09-r.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-BPnk7948.js → Compliance-D0S8-EsN.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-VLOTGbza.js → Cowork-Y1LiuRwP.js} +1 -1
- package/src/assets/web-panel/assets/{Cron-_9GgQLJo.js → Cron-FTqEw7QV.js} +1 -1
- package/src/assets/web-panel/assets/{Crosschain-B21yn0qy.js → Crosschain-C3rPZ4Qu.js} +1 -1
- package/src/assets/web-panel/assets/{DID-mBeDgRZ7.js → DID-Ba2zySM-.js} +1 -1
- package/src/assets/web-panel/assets/{Dashboard-BckYYzhP.js → Dashboard-D6xyN2ND.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-DEedqFiE.js → Dropdown-BF4QuXJw.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-CMs0k9TB.js → EmailListRenderer-s9dUxq14.js} +1 -1
- package/src/assets/web-panel/assets/{EvolutionSettings-B00Qd0fN.js → EvolutionSettings-CoAKOfqZ.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DxMTAMa8.js → FamilyGuardDashboard-CEznwH1c.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-B-UZw0LO.js → Federation-rIzOt8-a.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CkafazEw.js → FormItemContext-BARFiExr.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-DEUG25ZJ.js → GenericCardRenderer-DI0A4swS.js} +1 -1
- package/src/assets/web-panel/assets/{Git-D7dr9oz9.js → Git-DdmysND4.js} +1 -1
- package/src/assets/web-panel/assets/{Governance-DKlUJ1wg.js → Governance-DrdhwUz2.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-BJKqplap.js → Inference-Scm8tumd.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-B78fB-bz.js → KnowledgeGraph-_6bgPs4W.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-DJGcHYH_.js → Logs-DW_v7bSo.js} +1 -1
- package/src/assets/web-panel/assets/{MarkdownRenderer-DkcG_MxW.js → MarkdownRenderer-7JABuv1j.js} +1 -1
- package/src/assets/web-panel/assets/{Marketplace-ucTbwByD.js → Marketplace-0h3YSvME.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Cu1xZYYk.js → McpTools-Byrg0Y3e.js} +1 -1
- package/src/assets/web-panel/assets/{Memory-DCGpXmi-.js → Memory-Cyoq-o29.js} +1 -1
- package/src/assets/web-panel/assets/{MobileBridge-BnKr0aAS.js → MobileBridge-ISIlploU.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-C5UvYJTP.js → MobileProjects-04EncaRx.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-D1UUl4WH.js → Mtc-BMzkpyOF.js} +1 -1
- package/src/assets/web-panel/assets/{MtcAudit-D3aa8XP4.js → MtcAudit-Cx7BR5sz.js} +1 -1
- package/src/assets/web-panel/assets/{Multisig-DiXdfJjO.js → Multisig-D4pmkSX4.js} +1 -1
- package/src/assets/web-panel/assets/{NLProgramming-DbWABgSE.js → NLProgramming-CCfaaWNu.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-BP1DPl-R.js → Notes-Mq-1ZyaH.js} +1 -1
- package/src/assets/web-panel/assets/{NotificationSettings-xaB6ONe7.js → NotificationSettings-rzf5V1TR.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-D1uNcz3b.js → OrderTableRenderer-OREUs5ue.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-DMLDGaf1.js → Organization-BQfOATgw.js} +1 -1
- package/src/assets/web-panel/assets/{Overflow-DH4QPEoI.js → Overflow-D7Pa6aaA.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-Bl4OS10o.js → P2P-CaJ79ZsC.js} +1 -1
- package/src/assets/web-panel/assets/{PdhVaultBrowser-D9XSE2YI.js → PdhVaultBrowser-CtimQQN3.js} +2 -2
- package/src/assets/web-panel/assets/{Permissions-CUaPlr6d.js → Permissions-AzmmkLZ0.js} +1 -1
- package/src/assets/web-panel/assets/{PersonalDataHub-Ba92dZk-.js → PersonalDataHub-BRU8ME7z.js} +1 -1
- package/src/assets/web-panel/assets/{Pipeline-Bh2okm-8.js → Pipeline-BnNqutXh.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-Bmq3p4gC.js → Privacy-gMyZcxsz.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-BPu2fdKR.js → ProjectInit-CkK-Fvr0.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectSettings-D6ABLpmt.js → ProjectSettings-CGY_uiIX.js} +1 -1
- package/src/assets/web-panel/assets/{Projects-qWHEve0z.js → Projects-DBNC7xXG.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-D9DI-2hc.js → Providers-BVgWawtE.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-CxifoeD5.js → QrScannerModal-DZILESCa.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-DC1BvwR7.js → QuickAsk-DwRBzFWW.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-CKqbMB5o.js → Recommend-B3VxvUih.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-BGGzPdS5.js → RemoteSession-DM74lufU.js} +1 -1
- package/src/assets/web-panel/assets/{Reputation-DH90O9-5.js → Reputation-DOOEuGHh.js} +1 -1
- package/src/assets/web-panel/assets/{Row-h7ovueJc.js → Row-BZJYAo0S.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DaHxXTZg.js → RssFeed-CYw44jcD.js} +1 -1
- package/src/assets/web-panel/assets/{Search-Bn6Nqpn4.js → Search-CbypjDNG.js} +1 -1
- package/src/assets/web-panel/assets/{Security-ClbBmPJi.js → Security-0rSBDrXh.js} +1 -1
- package/src/assets/web-panel/assets/{Services-ChHLQwRn.js → Services-kqP79CBD.js} +1 -1
- package/src/assets/web-panel/assets/{Skeleton-DfN6BFzt.js → Skeleton-BjxvGVfI.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-C926wDev.js → Skills-SOoWyPCO.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-DJzi1l1M.js → Sla-kdRVAT19.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-_GSyVjm_.js → SpeechSettings-DILtcMaJ.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-B67xnERe.js → SyncSettings-C98Jauc4.js} +1 -1
- package/src/assets/web-panel/assets/{Tasks-BaYZadcG.js → Tasks-Bw-KaQAs.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-Bu8kN1Xt.js → Templates-CDJ027Hd.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BM9qufw1.js → Tenant-BqNV62UA.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-MEdd5DjB.js → Terminal-B8aQ3GLO.js} +1 -1
- package/src/assets/web-panel/assets/{TimelineRenderer-C27kL2oU.js → TimelineRenderer-BSpccq11.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-Cvjd98VC.js → Tokens-BbGMoFO6.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-CLym84HI.js → Trigger-D75Mawa_.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-Bv2JTaNN.js → Trust-BiK_Pk05.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-CSCkNbtm.js → UkeySign-Dv2xX_b9.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-BFDXB4xh.js → VideoEditing-CdBWfeEE.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-CMEFrG_b.js → Wallet-Cvrp4agg.js} +1 -1
- package/src/assets/web-panel/assets/{WebAuthn-x4eO_Q4y.js → WebAuthn-D0Htlf3v.js} +1 -1
- package/src/assets/web-panel/assets/{WorkflowEditor-ClWEPgV1.js → WorkflowEditor-nuUBOHIF.js} +1 -1
- package/src/assets/web-panel/assets/{chat-BdYOI4gM.js → chat-C6MLShIo.js} +1 -1
- package/src/assets/web-panel/assets/{colors-DcTBrGvS.js → colors-9G5FqFOC.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-Dn2ktVuj.js → compact-item-0M49EurU.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-XTreuyqp.js → createContext-CiDDLED_.js} +1 -1
- package/src/assets/web-panel/assets/{hasIn-CFRNsYQd.js → hasIn-wZvUczmn.js} +1 -1
- package/src/assets/web-panel/assets/{index-ir2ZwWz5.js → index-8jz-X3xg.js} +1 -1
- package/src/assets/web-panel/assets/{index-DFl_a0n5.js → index-B0JZ_ccM.js} +1 -1
- package/src/assets/web-panel/assets/{index-kzyCd8a0.js → index-B6TAOS4G.js} +1 -1
- package/src/assets/web-panel/assets/{index-CsnYp4qF.js → index-BCfxxScC.js} +1 -1
- package/src/assets/web-panel/assets/{index-CbaPXyNc.js → index-BTCIIdoS.js} +1 -1
- package/src/assets/web-panel/assets/{index-ma-rJkfE.js → index-BVV2mBbo.js} +1 -1
- package/src/assets/web-panel/assets/{index-DQEu7uW0.js → index-BWTcG128.js} +1 -1
- package/src/assets/web-panel/assets/{index-DW9XncMy.js → index-BXIY2BIN.js} +1 -1
- package/src/assets/web-panel/assets/{index-D45vulkq.js → index-B_XOMujL.js} +1 -1
- package/src/assets/web-panel/assets/{index-DNdiAymC.js → index-BfwJm0DU.js} +1 -1
- package/src/assets/web-panel/assets/{index-CjHA_Q7s.js → index-BlcOkfzz.js} +1 -1
- package/src/assets/web-panel/assets/{index-Daa1yCt_.js → index-BmS2P_eX.js} +1 -1
- package/src/assets/web-panel/assets/{index-DdVpoNEQ.js → index-BzeA3eRQ.js} +1 -1
- package/src/assets/web-panel/assets/index-C101Sec6.js +1 -0
- package/src/assets/web-panel/assets/{index-BBd64wj8.js → index-C63qiwQz.js} +1 -1
- package/src/assets/web-panel/assets/{index-lnTt0Jps.js → index-CTy9gD3m.js} +1 -1
- package/src/assets/web-panel/assets/{index-CRW3AWdS.js → index-CdUmgLxP.js} +1 -1
- package/src/assets/web-panel/assets/{index-Vo7A4aiN.js → index-CdaLWIz-.js} +1 -1
- package/src/assets/web-panel/assets/{index-CUT4h5JB.js → index-CoxzvhoN.js} +1 -1
- package/src/assets/web-panel/assets/{index-3RqDry-K.js → index-Cs66y4oC.js} +3 -3
- package/src/assets/web-panel/assets/{index-BMLpP8QQ.js → index-CtbFv3Et.js} +1 -1
- package/src/assets/web-panel/assets/{index-CG9YLDmI.js → index-Cz1SAgnb.js} +1 -1
- package/src/assets/web-panel/assets/index-D23TaGOp.js +1 -0
- package/src/assets/web-panel/assets/{index-Brc0BF-k.js → index-D2wN6VIq.js} +1 -1
- package/src/assets/web-panel/assets/{index-BSqydcDa.js → index-D51V5vmz.js} +1 -1
- package/src/assets/web-panel/assets/{index-CXMa7Z-S.js → index-D9J_tLGk.js} +1 -1
- package/src/assets/web-panel/assets/{index-BV6LojRv.js → index-DN9t1qjW.js} +1 -1
- package/src/assets/web-panel/assets/{index-CNHWMMDX.js → index-DOxTmc3k.js} +1 -1
- package/src/assets/web-panel/assets/{index-BEyVNbNE.js → index-DcZxOXd8.js} +1 -1
- package/src/assets/web-panel/assets/{index-D9kPBEqD.js → index-Dclwd_lj.js} +1 -1
- package/src/assets/web-panel/assets/{index-DDTSgpXz.js → index-DeHSwWVG.js} +1 -1
- package/src/assets/web-panel/assets/{index-XdlYkgCa.js → index-DvWRS-s7.js} +1 -1
- package/src/assets/web-panel/assets/{index-r5sNECM5.js → index-DwUOiN8M.js} +1 -1
- package/src/assets/web-panel/assets/{index-8METW_Wr.js → index-DwX9cOL6.js} +1 -1
- package/src/assets/web-panel/assets/{index-uT4fRDzU.js → index-JhfNEldK.js} +1 -1
- package/src/assets/web-panel/assets/{index-BbMWvjLZ.js → index-dJ_V_Fqy.js} +1 -1
- package/src/assets/web-panel/assets/{index-COuEJdmr.js → index-k0BVfcwQ.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dhi4Oybt.js → index-qJcOtd8J.js} +1 -1
- package/src/assets/web-panel/assets/{index-oE4jTpHK.js → index-sBsJaBmM.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-mdL0oeZa.js → initDefaultProps-DyIyjurJ.js} +1 -1
- package/src/assets/web-panel/assets/{motion-ZgVCKcEX.js → motion-B2D0PuTM.js} +1 -1
- package/src/assets/web-panel/assets/{move-A_28O5T2.js → move-B22T5MnN.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-0zlMjabo.js → mtc-parser-i4b7HNzF.js} +1 -1
- package/src/assets/web-panel/assets/{omit-DF7mU3yG.js → omit-ByNIr_gz.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-Cmt8liJP.js → pickAttrs-_xP2RvxA.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-DaMDC57b.js → placementArrow-CVDvzK0z.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-CHw_f2d3.js → responsiveObserve-CI1toXJ_.js} +1 -1
- package/src/assets/web-panel/assets/{slide-DJS9fFQq.js → slide-2_VosSRQ.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-Bk3XdZwh.js → statusUtils-CMiWWrZC.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-DMybAFsA.js → styleChecker-DY8wTVCe.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-_tbIIFMu.js → useFlexGapSupport-DkdcgIyl.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-KPklVptS.js → useFs-gpl11PEF.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-C7FrKDhD.js → usePersonalDataHub-DqnQ0H9y.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-DB3JBusp.js → vnode-CgY9xUvr.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-C8rAdf81.js → zoom-Ch0jan5_.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/data/changelog.json +26 -0
- package/src/gateways/ws/ws-server.js +16 -0
- package/src/lib/coding-change-review-context.js +51 -0
- package/src/lib/coding-task-guidance.js +1 -1
- package/src/lib/evolution/agent-model-projection.js +17 -0
- package/src/lib/evolution/evolution-evidence-projector.js +85 -8
- package/src/lib/read-file-loop-guard.js +13 -10
- package/src/lib/read-file-page.js +4 -1
- package/src/lib/source-read-recovery.js +89 -0
- package/src/lib/tool-result-preview.js +7 -3
- package/src/runtime/agent-core.js +104 -52
- package/src/runtime/tool-argument-recovery.js +111 -0
- package/src/assets/web-panel/assets/index-DoVoNjtJ.js +0 -1
- package/src/assets/web-panel/assets/index-xlS8pDS2.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{i as e}from"./index-
|
|
1
|
+
import{i as e}from"./index-Cs66y4oC.js";function r(a,s,t){return e({[`${a}-status-success`]:s==="success",[`${a}-status-warning`]:s==="warning",[`${a}-status-error`]:s==="error",[`${a}-status-validating`]:s==="validating",[`${a}-has-feedback`]:t})}const c=(a,s)=>s||a;export{c as a,r as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{B as d}from"./index-
|
|
1
|
+
import{B as d}from"./index-Cs66y4oC.js";const i=()=>d()&&window.document.documentElement,c=e=>{if(d()&&window.document.documentElement){const t=Array.isArray(e)?e:[e],{documentElement:n}=window.document;return t.some(r=>r in n.style)}return!1},u=(e,t)=>{if(!c(e))return!1;const n=document.createElement("div"),r=n.style[e];return n.style[e]=t,n.style[e]!==r};function s(e,t){return!Array.isArray(e)&&t!==void 0?u(e,t):c(e)}let o;const p=()=>{if(!i())return!1;if(o!==void 0)return o;const e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.rowGap="1px",e.appendChild(document.createElement("div")),e.appendChild(document.createElement("div")),document.body.appendChild(e),o=e.scrollHeight===1,document.body.removeChild(e),o};export{i as c,p as d,s as i};
|
package/src/assets/web-panel/assets/{useFlexGapSupport-_tbIIFMu.js → useFlexGapSupport-DkdcgIyl.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{d as o}from"./styleChecker-
|
|
1
|
+
import{d as o}from"./styleChecker-DY8wTVCe.js";import{o as t,s}from"./vendor-BXcBOG8b.js";const r=(()=>{const e=s(!1);return t(()=>{e.value=o()}),e});export{r as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as d}from"./index-
|
|
1
|
+
import{u as d}from"./index-Cs66y4oC.js";import{u as c}from"./useShellMode-CgR0wCYM.js";function u({accept:l=""}={}){return new Promise(a=>{if(typeof document>"u"){a({canceled:!0,path:null,content:null});return}const n=document.createElement("input");n.type="file",l&&(n.accept=l),n.style.display="none",document.body.appendChild(n);let o=!1;const i=()=>{n.parentNode&&n.parentNode.removeChild(n)},r=()=>{if(o)return;o=!0;const e=n.files&&n.files[0];if(!e){i(),a({canceled:!0,path:null,content:null});return}const t=new FileReader;t.onload=()=>{i(),a({canceled:!1,path:e.name,size:e.size,content:typeof t.result=="string"?t.result:""})},t.onerror=()=>{i(),a({canceled:!1,path:e.name,size:e.size,content:null,reason:"read_failed"})},t.readAsText(e)};n.addEventListener("change",r),n.click()})}function f(l,{defaultPath:a="download.txt"}={}){if(typeof document>"u")return{canceled:!0,path:null};const n=new Blob([l],{type:"text/plain"}),o=URL.createObjectURL(n),i=document.createElement("a");return i.href=o,i.download=a,document.body.appendChild(i),i.click(),document.body.removeChild(i),URL.revokeObjectURL(o),{canceled:!1,path:a}}function p(l){if(!Array.isArray(l))return"";const a=[];for(const n of l)if(Array.isArray(n.extensions))for(const o of n.extensions)a.push(`.${o.replace(/^\./,"")}`);return a.join(",")}function m(){const l=d();async function a(r={}){if(c().isEmbedded){const e=await l.sendRaw({type:"fs.openDialog",title:r.title,filters:r.filters},6e4);if(e&&e.ok===!1)throw new Error(e.error||"fs.openDialog failed");const t=e?.result??e;return{canceled:!!t.canceled,path:t.path??null,content:t.content??null,size:t.size,reason:t.reason}}return u({accept:p(r.filters)})}async function n(r,e={}){if(typeof r!="string")throw new Error("content must be a string");if(c().isEmbedded){const t=await l.sendRaw({type:"fs.saveDialog",title:e.title,defaultPath:e.defaultPath,filters:e.filters,content:r},6e4);if(t&&t.ok===!1)throw new Error(t.error||"fs.saveDialog failed");const s=t?.result??t;return{canceled:!!s.canceled,path:s.path??null}}return f(r,{defaultPath:e.defaultPath})}async function o(r,e={}){const t=JSON.stringify(r,null,2),s={...e,defaultPath:e.defaultPath||"data.json",filters:e.filters||[{name:"JSON",extensions:["json"]}]};return n(t,s)}async function i(r={}){if(!c().isEmbedded)return{canceled:!0,path:null,initialized:!1,unsupported:!0};const e=await l.sendRaw({type:"fs.openDirectory",title:r.title},6e4);if(e&&e.ok===!1)throw new Error(e.error||"fs.openDirectory failed");const t=e?.result??e;return{canceled:!!t.canceled,path:t.path??null,initialized:!!t.initialized}}return{pickFileText:a,saveText:n,saveJson:o,pickDirectory:i}}export{m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as v}from"./index-
|
|
1
|
+
import{u as v}from"./index-Cs66y4oC.js";import{u as _}from"./useShellMode-CgR0wCYM.js";function d(r){if(!r)return r;if(r.error)throw new Error(r.error);return r.result!==void 0?r.result:r}async function p(r,s={},e=!0){try{if(e!==!0||!r||typeof r.sendRaw!="function")return{status:"unavailable",path:null};const a=await r.sendRaw({type:"fs.openDirectory",title:s.title},6e4);if(a&&(a.ok===!1||a.error))return{status:"unavailable",path:null};const t=a&&a.result!==void 0?a.result:a;return t&&(t.ok===!1||t.error||t.unsupported===!0)?{status:"unavailable",path:null}:t&&t.canceled===!0?{status:"cancelled",path:null}:t&&typeof t.path=="string"&&t.path.length>0?{status:"selected",path:t.path}:{status:"unavailable",path:null}}catch{return{status:"unavailable",path:null}}}function b(r,s,e,a,t){return typeof r.onMessage!="function"||typeof r.sendRaw!="function"?r.sendRaw({type:s,...e},t).then(d):new Promise((n,u)=>{const l=typeof crypto<"u"&&crypto.randomUUID?crypto.randomUUID():`${Date.now()}-${Math.random().toString(36).slice(2)}`,w=`${s}.event`,m=`${s}.end`;let c=!1,h=()=>{};const o=(i,f)=>{if(!c){c=!0,clearTimeout(g);try{h()}catch{}i(f)}},g=setTimeout(()=>{o(u,new Error(`stream timeout (${t}ms): ${s}`))},t),y=r.onMessage(i=>{if(!(c||!i)&&!(i.id!==l&&i.requestId!==l)){if(i.type===w){if(typeof a=="function")try{a(i.event||i)}catch{}return}if(i.type===m){o(n,d(i));return}i.type==="error"&&o(u,new Error(i.message||"stream error"))}});h=typeof y=="function"?y:()=>{},Promise.resolve(r.sendRaw({id:l,type:s,...e},t)).catch(()=>{})})}function k(){const r=v(),s=_(),e=(a,t={},n=3e4)=>r.sendRaw({type:a,...t},n).then(d);return{async health(){return await e("personal-data-hub.health",{},8e3)},async stats(){return await e("personal-data-hub.stats",{},8e3)},async listAdapters(){return await e("personal-data-hub.list-adapters",{},5e3)},async pickFile(a={}){try{const t=await r.sendRaw({type:"fs.openDialog",title:a.title,filters:a.filters},6e4),n=t&&t.result!==void 0?t.result:t,u=n&&typeof n.path=="string"?n.path:n&&typeof n.filePath=="string"?n.filePath:null;return n&&n.canceled!==!0&&u?u:null}catch{return null}},async pickDirectoryResult(a={}){return await p(r,a,s.isEmbedded)},async pickDirectory(a={}){const t=await p(r,a,s.isEmbedded);return t.status==="selected"?t.path:null},async adapterReadiness(a){return await e("personal-data-hub.adapter-readiness",Number.isInteger(a)?{timeoutMs:a}:{},15e3)},async syncAdapter(a,t={}){return await e("personal-data-hub.sync-adapter",{name:a,options:t},6e5)},async syncAll(a={}){return await e("personal-data-hub.sync-all",{options:a},6e5)},async registerMock({name:a="mock",count:t=20,seed:n=1}={}){return await e("personal-data-hub.register-mock",{name:a,count:t,seed:n})},async unregister(a){return await e("personal-data-hub.unregister",{name:a})},async ask(a,t={}){return await e("personal-data-hub.ask",{question:a,options:t},18e4)},async queryEvents(a={}){return await e("personal-data-hub.query-events",a,1e4)},async recentAudit(a={}){return await e("personal-data-hub.recent-audit",a,1e4)},async searchEvents(a={}){return await e("personal-data-hub.search-events",a,15e3)},async facetCounts(a={}){return await e("personal-data-hub.facet-counts",a,1e4)},async testEmailAuth(a){return await e("personal-data-hub.test-email-auth",{account:a},3e4)},async registerEmail(a,t={}){return await e("personal-data-hub.register-email",{account:a,opts:t},15e3)},async unregisterEmail(a){return await e("personal-data-hub.unregister-email",{email:a},5e3)},async listEmailAccounts(){return await e("personal-data-hub.list-email-accounts",{},5e3)},async activateEmail(a){return await e("personal-data-hub.activate-email",{email:a},5e3)},async eventDetail(a){return await e("personal-data-hub.event-detail",{eventId:a},5e3)},async syncAdapterStream(a,t={},n){return await b(r,"personal-data-hub.sync-adapter-stream",{name:a,options:t},n,6e5)},async syncAllStream(a={},t){return await b(r,"personal-data-hub.sync-all-stream",{options:a},t,9e5)},async registerAlipay(a,t={}){return await e("personal-data-hub.register-alipay",{account:a,opts:t},15e3)},async unregisterAlipay(a){return await e("personal-data-hub.unregister-alipay",{email:a},5e3)},async listAlipayAccounts(){return await e("personal-data-hub.list-alipay-accounts",{},5e3)},async activateAlipay(a){return await e("personal-data-hub.activate-alipay",{email:a},5e3)},async importAlipayBill({zipPath:a,csvPath:t,zipPassword:n}={}){return await e("personal-data-hub.import-alipay-bill",{zipPath:a,csvPath:t,zipPassword:n},3e5)},async reviewQueueList(a=50){return await e("personal-data-hub.review-queue-list",{limit:a},5e3)},async reviewDecision(a,t){return await e("personal-data-hub.review-decision",{reviewId:a,decision:t},5e3)},async manualMerge(a,t){return await e("personal-data-hub.manual-merge",{aId:a,bId:t},5e3)},async manualUnmerge(a){return await e("personal-data-hub.manual-unmerge",{personId:a},5e3)},async resolverDrain(a=50){return await e("personal-data-hub.resolver-drain",{limit:a},18e4)},async resolverStats(){return await e("personal-data-hub.resolver-stats",{},5e3)},async skillsList(){return await e("personal-data-hub.skills-list",{},5e3)},async runSkill(a,t={}){return await e("personal-data-hub.run-skill",{name:a,options:t},12e4)},async openAichatLogin(a,t={}){return await e("personal-data-hub.aichat-open-login",{vendor:a,opts:t},1e4)},async probeAichatCookies(a,t){return await e("personal-data-hub.aichat-probe-cookies",{vendor:a,cookieHeader:t},1e4)},async registerAichatVendor(a,t,n={}){return await e("personal-data-hub.aichat-register-vendor",{vendor:a,cookies:t,opts:n},3e4)},async rotateAichatLogin(a){return await e("personal-data-hub.aichat-rotate-login",{vendor:a},1e4)},async listAichatAccounts(){return await e("personal-data-hub.list-aichat-accounts",{},5e3)},async unregisterAichat(a){return await e("personal-data-hub.unregister-aichat",{vendor:a},5e3)},async aichatHealthCheckOnce(){return await e("personal-data-hub.aichat-health-check-once",{},3e4)},async probeWechatEnv(){return await e("personal-data-hub.wechat-env-probe",{},15e3)},async registerWechat({account:a,dbPath:t,wechatDataPath:n,fridaOpts:u,keyProviderOverride:l}={}){return await e("personal-data-hub.register-wechat",{account:a,dbPath:t,wechatDataPath:n,fridaOpts:u,keyProviderOverride:l},45e3)},async listWechatAccounts(){return await e("personal-data-hub.list-wechat-accounts",{},5e3)},async activateWechat(a,t={}){return await e("personal-data-hub.activate-wechat",{uin:a,fridaOpts:t.fridaOpts,keyProviderOverride:t.keyProviderOverride},45e3)},async unregisterWechat(a){return await e("personal-data-hub.unregister-wechat",{uin:a},5e3)},async bilibiliAdbSync(a={}){return await e("personal-data-hub.bilibili-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},12e4)},async bilibiliAdbDoctor(){return await e("personal-data-hub.bilibili-adb-doctor",{},15e3)},async weiboAdbSync(a={}){return await e("personal-data-hub.weibo-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)},async xhsAdbSync(a={}){return await e("personal-data-hub.xhs-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)},async toutiaoAdbSync(a={}){return await e("personal-data-hub.toutiao-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},9e4)},async kuaishouAdbSync(a={}){return await e("personal-data-hub.kuaishou-adb-sync",{limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},12e4)},async bridgeDoctor(){return await e("personal-data-hub.bridge-doctor",{},6e4)},async douyinAdbSync(a={}){return await e("personal-data-hub.douyin-adb-sync",{uid:a.uid,limits:a.limits,stagingDir:a.stagingDir,displayName:a.displayName},6e4)}}}export{k as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{N as i,h as a,w as l}from"./index-
|
|
1
|
+
import{N as i,h as a,w as l}from"./index-Cs66y4oC.js";import{a6 as o,k as d,C as g,F as f,A as p}from"./vendor-BXcBOG8b.js";function c(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,s=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,u=e;if(Array.isArray(e)&&(u=i(e)[0]),!u)return null;const n=o(u,r,s);return n.props=t?a(a({},n.props),r):n.props,l(typeof n.props.class!="object"),n}function V(e){let r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},t=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0;return e.map(s=>c(s,r,t))}function v(e,r,t){p(o(e,a({},r)),t)}const m=e=>(e||[]).some(r=>d(r)?!(r.type===g||r.type===f&&!m(r.children)):!0)?e:null;function h(e,r,t,s){var u;const n=(u=e[r])===null||u===void 0?void 0:u.call(e,t);return m(n)?n:s?.()}export{h as a,V as b,c,v as t};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{K as o}from"./index-
|
|
1
|
+
import{K as o}from"./index-Cs66y4oC.js";import{i as f}from"./motion-B2D0PuTM.js";const c=new o("antZoomIn",{"0%":{transform:"scale(0.2)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),y=new o("antZoomOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.2)",opacity:0}}),a=new o("antZoomBigIn",{"0%":{transform:"scale(0.8)",opacity:0},"100%":{transform:"scale(1)",opacity:1}}),s=new o("antZoomBigOut",{"0%":{transform:"scale(1)"},"100%":{transform:"scale(0.8)",opacity:0}}),g=new o("antZoomUpIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 0%"}}),O=new o("antZoomUpOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 0%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 0%",opacity:0}}),l=new o("antZoomLeftIn",{"0%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"0% 50%"}}),u=new o("antZoomLeftOut",{"0%":{transform:"scale(1)",transformOrigin:"0% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"0% 50%",opacity:0}}),p=new o("antZoomRightIn",{"0%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"100% 50%"}}),z=new o("antZoomRightOut",{"0%":{transform:"scale(1)",transformOrigin:"100% 50%"},"100%":{transform:"scale(0.8)",transformOrigin:"100% 50%",opacity:0}}),K=new o("antZoomDownIn",{"0%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0},"100%":{transform:"scale(1)",transformOrigin:"50% 100%"}}),w=new o("antZoomDownOut",{"0%":{transform:"scale(1)",transformOrigin:"50% 100%"},"100%":{transform:"scale(0.8)",transformOrigin:"50% 100%",opacity:0}}),I={zoom:{inKeyframes:c,outKeyframes:y},"zoom-big":{inKeyframes:a,outKeyframes:s},"zoom-big-fast":{inKeyframes:a,outKeyframes:s},"zoom-left":{inKeyframes:l,outKeyframes:u},"zoom-right":{inKeyframes:p,outKeyframes:z},"zoom-up":{inKeyframes:g,outKeyframes:O},"zoom-down":{inKeyframes:K,outKeyframes:w}},h=(n,r)=>{const{antCls:m}=n,t=`${m}-${r}`,{inKeyframes:i,outKeyframes:e}=I[r];return[f(t,i,e,r==="zoom-big-fast"?n.motionDurationFast:n.motionDurationMid),{[`
|
|
2
2
|
${t}-enter,
|
|
3
3
|
${t}-appear
|
|
4
4
|
`]:{transform:"scale(0)",opacity:0,animationTimingFunction:n.motionEaseOutCirc,"&-prepare":{transform:"none"}},[`${t}-leave`]:{animationTimingFunction:n.motionEaseInOutCirc}}]};export{h as i,c as z};
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
// Injected by web-ui-server.js at serve time
|
|
9
9
|
window.__CC_CONFIG__ = __CC_CONFIG_PLACEHOLDER__;
|
|
10
10
|
</script>
|
|
11
|
-
<script type="module" crossorigin src="./assets/index-
|
|
11
|
+
<script type="module" crossorigin src="./assets/index-Cs66y4oC.js"></script>
|
|
12
12
|
<link rel="modulepreload" crossorigin href="./assets/vendor-BXcBOG8b.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="./assets/icons-DlxlFL4g.js">
|
|
14
14
|
<link rel="stylesheet" crossorigin href="./assets/index-CfX1DEtk.css">
|
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.140",
|
|
7
|
+
"cliVersions": ["0.166.140"],
|
|
8
|
+
"date": "2026-11-03",
|
|
9
|
+
"title": "",
|
|
10
|
+
"sections": [
|
|
11
|
+
{
|
|
12
|
+
"heading": "Fixed - cc CLI 0.166.140: recover tool arguments and opaque digest scanning (candidate, 2026-11-03)",
|
|
13
|
+
"body": "- Reject malformed JSON and non-object provider tool arguments before checkpoints, hooks or tool execution instead of executing an empty-object fallback.\n- Derive model-only placeholders for uniquely paired explicit pre-execution rejections, including legacy run_code snapshot denials. Preserve original durable history and never replay the rejected call.\n- Keep valid object argument handling, duplicate-key and nested JSON rejection, redaction and projection budgets unchanged.\n- Prevent genuine image and reasoning transport SHA-256 digests from being mistaken for phone numbers. Internal Agent projection v10 uses a scan view for authenticated protocol metadata while preserving exact digest/byte-length restoration, real PII checks, forged-marker rejection, and the unchanged v1-v9 historical rules.\n- Pair with Open VSX 0.37.176 and JetBrains 0.4.193. Child npm versions are unchanged; require exact-source three-platform CLI CI / Strict Sandbox, Actions OIDC publication, public package readback and downstream IDE host gates.\n- Focused local validation passed 129 checks; two bounded real Volcengine recovery scenarios passed with five physical requests and 6,401 tokens. This is defect-specific recovery evidence, not a new broad model-task acceptance result."
|
|
14
|
+
}
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"productVersion": null,
|
|
19
|
+
"cliVersion": "0.166.139",
|
|
20
|
+
"cliVersions": ["0.166.139"],
|
|
21
|
+
"date": "2026-11-02",
|
|
22
|
+
"title": "",
|
|
23
|
+
"sections": [
|
|
24
|
+
{
|
|
25
|
+
"heading": "Fixed - cc CLI 0.166.139: complete author work and independent review within one budget (released, 2026-11-02)",
|
|
26
|
+
"body": "- Reserve fresh independent inspection, repair, read-back and final reporting inside the original model-turn limit, including when the author continues calling tools. Unknown usage and insufficient remaining review capacity fail explicitly; last-turn tool calls cannot become a successful terminal result.\n- Recover complete surrounding JavaScript statements from the same file snapshot when a partial page cannot be projected. Preserve the original requested range and actual returned range, the existing JSON/source validation, provider delivery accounting and output metadata headroom.\n- Preserve focused explicit read ranges instead of silently substituting an unrelated unread section. Broad truncated scans retain bounded cursor progress.\n- Pair CLI 0.166.139 with Open VSX 0.37.175 and JetBrains 0.4.192 after complete exact-source release gates and verified upstream publication. SDK 0.2.17 and Kernel 0.1.11 remain unchanged and must pass upstream reuse checks.\n- Retest only verify-08 and verify-36 with the new package set, keeping independent review and the original budget. Prior CLI .138 result remains 2/4; previously accepted samples are not repeated. These engineering repairs do not claim new real-model success."
|
|
27
|
+
}
|
|
28
|
+
]
|
|
29
|
+
},
|
|
4
30
|
{
|
|
5
31
|
"productVersion": null,
|
|
6
32
|
"cliVersion": "0.166.138",
|
|
@@ -388,6 +388,22 @@ export class ChainlessChainWSServer extends EventEmitter {
|
|
|
388
388
|
);
|
|
389
389
|
this.resolveEvolutionCompositionFactory =
|
|
390
390
|
options.resolveEvolutionCompositionFactory || null;
|
|
391
|
+
// Standalone embedders use the same host-owned optional Evolution policy
|
|
392
|
+
// as cc ui. Explicit policy hooks/factories (including null) still win.
|
|
393
|
+
if (
|
|
394
|
+
options.prepareUiModelTurn === undefined &&
|
|
395
|
+
options.evolutionCompositionFactory === undefined &&
|
|
396
|
+
options.resolveEvolutionCompositionFactory === undefined
|
|
397
|
+
) {
|
|
398
|
+
this.prepareUiModelTurn = async (context) => {
|
|
399
|
+
const { prepareConfiguredUiModelTurn } = await import(
|
|
400
|
+
"../../lib/evolution/optional-ui-model-turn.js"
|
|
401
|
+
);
|
|
402
|
+
return prepareConfiguredUiModelTurn(context, {
|
|
403
|
+
cwd: this.projectRoot,
|
|
404
|
+
});
|
|
405
|
+
};
|
|
406
|
+
}
|
|
391
407
|
this.runtimeAdmissionDependencies =
|
|
392
408
|
captureSkillRuntimeDependencies(options);
|
|
393
409
|
this.skillOutcomeIndex =
|
|
@@ -140,6 +140,57 @@ function pendingCalls(messages) {
|
|
|
140
140
|
* unmarked system messages must already be trusted host instructions.
|
|
141
141
|
* This journal neither replaces durable history nor grants any authority.
|
|
142
142
|
*/
|
|
143
|
+
export function changeReviewRequestReserve(limit) {
|
|
144
|
+
// Inspection, repair, read-back and a terminal account share the original
|
|
145
|
+
// budget. Tiny runs retain at least one author request, never extra credit.
|
|
146
|
+
return Number.isFinite(limit) ? Math.min(4, Math.max(0, limit - 1)) : 4;
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export function changeReviewBudgetNotice(budget, reviewing) {
|
|
150
|
+
const available = budget.remaining() + 1;
|
|
151
|
+
if (reviewing)
|
|
152
|
+
return available === 1
|
|
153
|
+
? " Independent change review: this is the final model request. Give a concise terminal account based on observations already obtained. Report unresolved requirements as incomplete. A tool call now cannot receive another model response and will not count as completion."
|
|
154
|
+
: " Independent change review is active. Inspect current files, repair concrete requirement gaps, then read back the repair. Reserve the final request for a concise terminal account of results and limitations; further exploration cannot extend this budget.";
|
|
155
|
+
const reserve = changeReviewRequestReserve(budget.limit);
|
|
156
|
+
const authorRequests = Math.max(0, available - reserve);
|
|
157
|
+
return (
|
|
158
|
+
` Author allocation: ${authorRequests} requests remain before the ${reserve}-request independent change-review reserve (including this request when positive). Write the deliverable early; author completion is provisional. Review needs fresh inspection and a terminal response and does not receive extra requests. ` +
|
|
159
|
+
(authorRequests === 0
|
|
160
|
+
? "The preferred author allocation is exhausted; further inspection without a delivered change may leave insufficient budget for review."
|
|
161
|
+
: "The runtime will hand changed files to independent review when the reserve is reached.")
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
export function changeReviewBudgetInsufficientError(remaining) {
|
|
166
|
+
const error = new Error(
|
|
167
|
+
`Independent change review requires at least two remaining model requests for fresh inspection and a terminal response; only ${remaining} remain. The task has not completed independent review.`,
|
|
168
|
+
);
|
|
169
|
+
error.code = "CC_CHANGE_REVIEW_BUDGET_INSUFFICIENT";
|
|
170
|
+
return error;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
export function canReserveChangeReview({
|
|
174
|
+
enabled,
|
|
175
|
+
changed,
|
|
176
|
+
requested,
|
|
177
|
+
usageKnown,
|
|
178
|
+
pendingMutations,
|
|
179
|
+
pendingChildren,
|
|
180
|
+
remaining,
|
|
181
|
+
limit,
|
|
182
|
+
}) {
|
|
183
|
+
return (
|
|
184
|
+
enabled === true &&
|
|
185
|
+
changed === true &&
|
|
186
|
+
!requested &&
|
|
187
|
+
usageKnown !== false &&
|
|
188
|
+
pendingMutations === 0 &&
|
|
189
|
+
pendingChildren === 0 &&
|
|
190
|
+
remaining <= changeReviewRequestReserve(limit)
|
|
191
|
+
);
|
|
192
|
+
}
|
|
193
|
+
|
|
143
194
|
export class CodingChangeReviewContext {
|
|
144
195
|
#initial;
|
|
145
196
|
#journal = [];
|
|
@@ -11,7 +11,7 @@ export const CODING_TASK_QUALITY_GUIDANCE = `Coding task quality:
|
|
|
11
11
|
- Trace rejection before asserting its aftermath: it may precede registration or persistence. Inspect whether state stays unchanged, a failed record exists or an event is emitted. Compare independently recorded identities and provenance; equal text does not prove ownership.
|
|
12
12
|
- Inspect persistence projections before comparing histories. Host notices, lineage and imports may accompany user/assistant messages; verify their provenance separately. Report defects that cannot be repaired within the permitted scope instead of inventing passing behavior.
|
|
13
13
|
- Run focused checks with permitted execution tools. With file tools only, inspect imports, contracts and fixtures and say tests were not run. Read-back or static inspection is not a passing test.
|
|
14
|
-
- Finish requested edits and read-back before the final reply; reserve the last available model request for a concise terminal account. For large files, write a small complete section, await its result, then extend it with a unique edit anchor rather than rewriting the growing file. Report delivery, actual checks and limitations once.`;
|
|
14
|
+
- Finish requested edits and read-back before the final reply; reserve the last available model request for a concise terminal account. If an independent review allocation is announced, finish the author deliverable within the author allocation: the review must inspect current files, repair gaps and report within the same total budget. Do not spend the review allocation on additional author discovery. For large files, write a small complete section, await its result, then extend it with a unique edit anchor rather than rewriting the growing file. Report delivery, actual checks and limitations once.`;
|
|
15
15
|
|
|
16
16
|
export const HERMETIC_CODING_SYSTEM_PROMPT = `You are a hermetic coding assistant. The exposed file tools are the complete tool surface. Inspect and mutate only the exact paths authorized by the user request. Do not invoke hidden tools, commands, language servers or other execution paths.
|
|
17
17
|
|
|
@@ -188,6 +188,23 @@ function isOpaqueBlock(value) {
|
|
|
188
188
|
);
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
+
// A structural check for already-projected Agent protocol data, not proof of
|
|
192
|
+
// provenance. Callers must still authenticate its bundle and bind restoration
|
|
193
|
+
// to the original block's exact digest and byte length.
|
|
194
|
+
export function isAgentOpaqueTransportBlockAtPath(value, path) {
|
|
195
|
+
if (!isOpaqueBlock(value)) return false;
|
|
196
|
+
if (/^messages\.\d+\.content\.\d+$/u.test(path)) {
|
|
197
|
+
return value.kind === "image";
|
|
198
|
+
}
|
|
199
|
+
if (/^messages\.\d+\._thinkingBlocks\.\d+$/u.test(path)) {
|
|
200
|
+
return value.kind === "thinking" || value.kind === "redacted_thinking";
|
|
201
|
+
}
|
|
202
|
+
return (
|
|
203
|
+
/^messages\.\d+\._openaiReasoningItems\.\d+$/u.test(path) &&
|
|
204
|
+
value.kind === "openai_reasoning"
|
|
205
|
+
);
|
|
206
|
+
}
|
|
207
|
+
|
|
191
208
|
function openAIReasoningItem(value) {
|
|
192
209
|
if (
|
|
193
210
|
!value ||
|
|
@@ -14,6 +14,7 @@ import {
|
|
|
14
14
|
AGENT_MODEL_REQUEST_LIMITS,
|
|
15
15
|
AGENT_MODEL_IMAGE_LIMITS,
|
|
16
16
|
projectAgentOpaqueTransportBlock,
|
|
17
|
+
isAgentOpaqueTransportBlockAtPath,
|
|
17
18
|
snapshotAgentModelRequest,
|
|
18
19
|
} from "./agent-model-projection.js";
|
|
19
20
|
import { snapshotSkillDecisionPayload } from "./skill-decision-projection.js";
|
|
@@ -632,7 +633,7 @@ export const EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_V8_DIGEST = `sha256:${crea
|
|
|
632
633
|
"utf8",
|
|
633
634
|
)
|
|
634
635
|
.digest("hex")}`;
|
|
635
|
-
const
|
|
636
|
+
const AGENT_MODEL_RULESET_V9 = Object.freeze({
|
|
636
637
|
...AGENT_MODEL_RULESET_V8,
|
|
637
638
|
schema: "chainlesschain.evolution-agent-model-projection-rules/v9",
|
|
638
639
|
version: 9,
|
|
@@ -643,6 +644,20 @@ const AGENT_MODEL_RULESET = Object.freeze({
|
|
|
643
644
|
maxSourceTokens: 32768,
|
|
644
645
|
}),
|
|
645
646
|
});
|
|
647
|
+
export const EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_V9_DIGEST = `sha256:${createHash(
|
|
648
|
+
"sha256",
|
|
649
|
+
)
|
|
650
|
+
.update(
|
|
651
|
+
`${AGENT_MODEL_RULESET_V9.schema}\0${JSON.stringify(AGENT_MODEL_RULESET_V9)}`,
|
|
652
|
+
"utf8",
|
|
653
|
+
)
|
|
654
|
+
.digest("hex")}`;
|
|
655
|
+
const AGENT_MODEL_RULESET = Object.freeze({
|
|
656
|
+
...AGENT_MODEL_RULESET_V9,
|
|
657
|
+
schema: "chainlesschain.evolution-agent-model-projection-rules/v10",
|
|
658
|
+
version: 10,
|
|
659
|
+
opaqueDigestScanPolicy: "authenticated-protocol-block-digest-scan-view-v1",
|
|
660
|
+
});
|
|
646
661
|
export const EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_DIGEST = `sha256:${createHash(
|
|
647
662
|
"sha256",
|
|
648
663
|
)
|
|
@@ -668,6 +683,7 @@ export const EVOLUTION_SKILL_DECISION_PROJECTION_RULESET_DIGEST = `sha256:${crea
|
|
|
668
683
|
.digest("hex")}`;
|
|
669
684
|
|
|
670
685
|
const SUPPORTED_RULESETS = new Map([
|
|
686
|
+
[EVOLUTION_AGENT_MODEL_PROJECTION_RULESET_V9_DIGEST, AGENT_MODEL_RULESET_V9],
|
|
671
687
|
[EVOLUTION_SKILL_DECISION_PROJECTION_RULESET_DIGEST, SKILL_DECISION_RULESET],
|
|
672
688
|
[RULESET_DIGEST, RULESET],
|
|
673
689
|
[RAW_RULESET_V3_DIGEST, RAW_RULESET_V3],
|
|
@@ -754,6 +770,7 @@ const AGENT_VALUE_PATTERNS = Object.freeze([
|
|
|
754
770
|
function valuePatterns(ruleset) {
|
|
755
771
|
return ruleset === SKILL_DECISION_RULESET ||
|
|
756
772
|
ruleset === AGENT_MODEL_RULESET ||
|
|
773
|
+
ruleset === AGENT_MODEL_RULESET_V9 ||
|
|
757
774
|
ruleset === AGENT_MODEL_RULESET_V8 ||
|
|
758
775
|
ruleset === AGENT_MODEL_RULESET_V7 ||
|
|
759
776
|
ruleset === AGENT_MODEL_RULESET_V6 ||
|
|
@@ -963,9 +980,35 @@ function deepFreeze(value, seen = new WeakSet()) {
|
|
|
963
980
|
return Object.freeze(value);
|
|
964
981
|
}
|
|
965
982
|
|
|
966
|
-
function
|
|
983
|
+
function opaqueDigestScanView(value, opaqueBlocks) {
|
|
984
|
+
if (!value || typeof value !== "object") return value;
|
|
985
|
+
if (opaqueBlocks.has(value)) {
|
|
986
|
+
// Only the digest is protocol metadata; continue scanning every other
|
|
987
|
+
// field. The real commitment remains unchanged in the persisted content.
|
|
988
|
+
return { ...value, digest: "[OPAQUE_TRANSPORT_DIGEST]" };
|
|
989
|
+
}
|
|
990
|
+
if (Array.isArray(value)) {
|
|
991
|
+
return value.map((entry) => opaqueDigestScanView(entry, opaqueBlocks));
|
|
992
|
+
}
|
|
993
|
+
return Object.fromEntries(
|
|
994
|
+
Object.entries(value).map(([key, entry]) => [
|
|
995
|
+
key,
|
|
996
|
+
opaqueDigestScanView(entry, opaqueBlocks),
|
|
997
|
+
]),
|
|
998
|
+
);
|
|
999
|
+
}
|
|
1000
|
+
|
|
1001
|
+
function assertNoKnownSecrets(
|
|
1002
|
+
content,
|
|
1003
|
+
patterns = VALUE_PATTERNS,
|
|
1004
|
+
opaqueBlocks = null,
|
|
1005
|
+
) {
|
|
967
1006
|
const serialized =
|
|
968
|
-
typeof content === "string"
|
|
1007
|
+
typeof content === "string"
|
|
1008
|
+
? content
|
|
1009
|
+
: canonicalJson(
|
|
1010
|
+
opaqueBlocks ? opaqueDigestScanView(content, opaqueBlocks) : content,
|
|
1011
|
+
);
|
|
969
1012
|
for (const pattern of patterns) {
|
|
970
1013
|
pattern.regex.lastIndex = 0;
|
|
971
1014
|
if (pattern.regex.test(serialized)) {
|
|
@@ -1521,7 +1564,15 @@ function sanitizePayload(
|
|
|
1521
1564
|
payload,
|
|
1522
1565
|
ruleset = RULESET,
|
|
1523
1566
|
patterns = valuePatterns(ruleset),
|
|
1567
|
+
projectedOpaqueBlocks = null,
|
|
1524
1568
|
) {
|
|
1569
|
+
// Raw Agent inputs cannot contain opaque markers. Only the v10 bundle
|
|
1570
|
+
// verifier supplies a set for already-projected, protocol-validated blocks;
|
|
1571
|
+
// its result is never published without successful attestation verification.
|
|
1572
|
+
const opaqueBlocks =
|
|
1573
|
+
ruleset === AGENT_MODEL_RULESET
|
|
1574
|
+
? (projectedOpaqueBlocks ?? new WeakSet())
|
|
1575
|
+
: null;
|
|
1525
1576
|
const findings = [];
|
|
1526
1577
|
const injections = [];
|
|
1527
1578
|
let nodes = 0;
|
|
@@ -1545,8 +1596,17 @@ function sanitizePayload(
|
|
|
1545
1596
|
return "[TRUNCATED:CONTENT_BUDGET]";
|
|
1546
1597
|
}
|
|
1547
1598
|
const toolArguments = jsonText && isAgentToolArgumentsPath(path);
|
|
1599
|
+
if (
|
|
1600
|
+
opaqueBlocks &&
|
|
1601
|
+
projectedOpaqueBlocks &&
|
|
1602
|
+
isAgentOpaqueTransportBlockAtPath(value, path.join("."))
|
|
1603
|
+
) {
|
|
1604
|
+
opaqueBlocks.add(value);
|
|
1605
|
+
return value;
|
|
1606
|
+
}
|
|
1548
1607
|
const opaqueTransportBlock =
|
|
1549
1608
|
ruleset === AGENT_MODEL_RULESET ||
|
|
1609
|
+
ruleset === AGENT_MODEL_RULESET_V9 ||
|
|
1550
1610
|
ruleset === AGENT_MODEL_RULESET_V8 ||
|
|
1551
1611
|
ruleset === AGENT_MODEL_RULESET_V7 ||
|
|
1552
1612
|
ruleset === AGENT_MODEL_RULESET_V6 ||
|
|
@@ -1555,7 +1615,10 @@ function sanitizePayload(
|
|
|
1555
1615
|
ruleset === AGENT_MODEL_RULESET_V3
|
|
1556
1616
|
? projectAgentOpaqueTransportBlock(value, path.join("."))
|
|
1557
1617
|
: null;
|
|
1558
|
-
if (opaqueTransportBlock !== null)
|
|
1618
|
+
if (opaqueTransportBlock !== null) {
|
|
1619
|
+
opaqueBlocks?.add(opaqueTransportBlock);
|
|
1620
|
+
return opaqueTransportBlock;
|
|
1621
|
+
}
|
|
1559
1622
|
if (toolArguments && typeof value !== "string" && !isPlainRecord(value)) {
|
|
1560
1623
|
throw projectionError(
|
|
1561
1624
|
EVOLUTION_PROJECTION_INVALID_CODE,
|
|
@@ -1766,7 +1829,7 @@ function sanitizePayload(
|
|
|
1766
1829
|
byType,
|
|
1767
1830
|
paths: [...paths].sort(),
|
|
1768
1831
|
};
|
|
1769
|
-
assertNoKnownSecrets(content, patterns);
|
|
1832
|
+
assertNoKnownSecrets(content, patterns, opaqueBlocks);
|
|
1770
1833
|
return deepFreeze({
|
|
1771
1834
|
content,
|
|
1772
1835
|
redactionSummary,
|
|
@@ -3435,6 +3498,8 @@ function validateBundleIntegrity(bundle) {
|
|
|
3435
3498
|
);
|
|
3436
3499
|
}
|
|
3437
3500
|
if (model.content !== null) {
|
|
3501
|
+
const projectedOpaqueBlocks =
|
|
3502
|
+
ruleset === AGENT_MODEL_RULESET ? new WeakSet() : null;
|
|
3438
3503
|
if (ruleset === SKILL_DECISION_RULESET) {
|
|
3439
3504
|
snapshotSkillDecisionPayload(model.content);
|
|
3440
3505
|
if (
|
|
@@ -3449,6 +3514,7 @@ function validateBundleIntegrity(bundle) {
|
|
|
3449
3514
|
}
|
|
3450
3515
|
if (
|
|
3451
3516
|
ruleset === AGENT_MODEL_RULESET ||
|
|
3517
|
+
ruleset === AGENT_MODEL_RULESET_V9 ||
|
|
3452
3518
|
ruleset === AGENT_MODEL_RULESET_V8 ||
|
|
3453
3519
|
ruleset === AGENT_MODEL_RULESET_V7 ||
|
|
3454
3520
|
ruleset === AGENT_MODEL_RULESET_V6 ||
|
|
@@ -3462,6 +3528,7 @@ function validateBundleIntegrity(bundle) {
|
|
|
3462
3528
|
allowStructuredArgumentText: ruleset !== AGENT_MODEL_RULESET_V1,
|
|
3463
3529
|
allowOpaqueTransportBlocks:
|
|
3464
3530
|
ruleset === AGENT_MODEL_RULESET ||
|
|
3531
|
+
ruleset === AGENT_MODEL_RULESET_V9 ||
|
|
3465
3532
|
ruleset === AGENT_MODEL_RULESET_V8 ||
|
|
3466
3533
|
ruleset === AGENT_MODEL_RULESET_V7 ||
|
|
3467
3534
|
ruleset === AGENT_MODEL_RULESET_V6 ||
|
|
@@ -3481,15 +3548,25 @@ function validateBundleIntegrity(bundle) {
|
|
|
3481
3548
|
}
|
|
3482
3549
|
if (
|
|
3483
3550
|
(ruleset.jsonTextPolicy || ruleset.numericScalarPolicy) &&
|
|
3484
|
-
canonicalJson(
|
|
3485
|
-
|
|
3551
|
+
canonicalJson(
|
|
3552
|
+
sanitizePayload(
|
|
3553
|
+
model.content,
|
|
3554
|
+
ruleset,
|
|
3555
|
+
valuePatterns(ruleset),
|
|
3556
|
+
projectedOpaqueBlocks,
|
|
3557
|
+
).content,
|
|
3558
|
+
) !== canonicalJson(model.content)
|
|
3486
3559
|
) {
|
|
3487
3560
|
throw projectionError(
|
|
3488
3561
|
EVOLUTION_PROJECTION_INVALID_CODE,
|
|
3489
3562
|
"Agent model JSON content is not a safe projection",
|
|
3490
3563
|
);
|
|
3491
3564
|
}
|
|
3492
|
-
assertNoKnownSecrets(
|
|
3565
|
+
assertNoKnownSecrets(
|
|
3566
|
+
model.content,
|
|
3567
|
+
valuePatterns(ruleset),
|
|
3568
|
+
projectedOpaqueBlocks,
|
|
3569
|
+
);
|
|
3493
3570
|
assertNoInjectionText(model.content);
|
|
3494
3571
|
}
|
|
3495
3572
|
if (trusted.content !== null) {
|
|
@@ -267,11 +267,9 @@ export class ReadFileLoopGuard {
|
|
|
267
267
|
const covered = entry.spans.some(
|
|
268
268
|
([start, end]) => start <= span.start && end >= span.end,
|
|
269
269
|
);
|
|
270
|
-
|
|
271
|
-
Number(args.offset) > 0 &&
|
|
272
|
-
|
|
273
|
-
Number(args.limit) <= 200 &&
|
|
274
|
-
!page.truncated;
|
|
270
|
+
const explicitRange =
|
|
271
|
+
Number(args.offset) > 0 && Number(args.limit) > 0 && !page.truncated;
|
|
272
|
+
let targeted = explicitRange;
|
|
275
273
|
const coveredPrefix = entry.spans.some(
|
|
276
274
|
([start, end]) => start <= span.start && end > span.start,
|
|
277
275
|
);
|
|
@@ -327,7 +325,7 @@ export class ReadFileLoopGuard {
|
|
|
327
325
|
if (restoring) page.readRecovery.fileVersion = fileVersion;
|
|
328
326
|
} else {
|
|
329
327
|
const unread = entry.spans[0]?.[0] === 0 ? entry.spans[0][1] : 0;
|
|
330
|
-
if (unread < span.total) {
|
|
328
|
+
if (unread < span.total && !explicitRange) {
|
|
331
329
|
const requestedRange = page.range;
|
|
332
330
|
page = continuePage(unread);
|
|
333
331
|
if (page.error || !page.readSpan) return page;
|
|
@@ -340,7 +338,12 @@ export class ReadFileLoopGuard {
|
|
|
340
338
|
} else {
|
|
341
339
|
const confirmedEnd =
|
|
342
340
|
entry.confirmedSpans[0]?.[0] === 0 ? entry.confirmedSpans[0][1] : 0;
|
|
343
|
-
if (
|
|
341
|
+
if (
|
|
342
|
+
this.visiblePages !== null &&
|
|
343
|
+
!entry.confirmedSpans.some(
|
|
344
|
+
([start, end]) => start <= span.start && end >= span.end,
|
|
345
|
+
)
|
|
346
|
+
) {
|
|
344
347
|
return {
|
|
345
348
|
path: filePath,
|
|
346
349
|
fileVersion,
|
|
@@ -358,7 +361,7 @@ export class ReadFileLoopGuard {
|
|
|
358
361
|
hashed: args.hashed === true,
|
|
359
362
|
alreadyRead: true,
|
|
360
363
|
contentOmitted: true,
|
|
361
|
-
reachedEnd:
|
|
364
|
+
reachedEnd: confirmedEnd >= span.total,
|
|
362
365
|
readProgress: { newContent: false },
|
|
363
366
|
readRecovery: { action: "use-findings" },
|
|
364
367
|
...(entry.summary?.outline
|
|
@@ -366,12 +369,12 @@ export class ReadFileLoopGuard {
|
|
|
366
369
|
: {}),
|
|
367
370
|
recoveryRead: {
|
|
368
371
|
path: filePath,
|
|
369
|
-
offset: 1,
|
|
372
|
+
offset: explicitRange ? page.range.startLine : 1,
|
|
370
373
|
limit: 80,
|
|
371
374
|
...(args.hashed === true ? { hashed: true } : {}),
|
|
372
375
|
...(args.raw === true ? { raw: true } : {}),
|
|
373
376
|
},
|
|
374
|
-
hint: "
|
|
377
|
+
hint: "This requested range was read earlier, but historical coverage does not mean its source is visible now. The runtime has not substituted an unrelated file range. Use source actually present in this request; recover missing details with a focused search or the bounded recoveryRead. Reading the file is not task completion.",
|
|
375
378
|
};
|
|
376
379
|
}
|
|
377
380
|
}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { recoverCompleteSourceRead } from "./source-read-recovery.js";
|
|
2
|
+
|
|
1
3
|
/** Build a bounded read result with a cursor describing what was actually read. */
|
|
2
4
|
export function buildReadFilePage(
|
|
3
5
|
rendered,
|
|
@@ -61,7 +63,7 @@ export function buildReadFilePage(
|
|
|
61
63
|
const charEnd = truncated
|
|
62
64
|
? charStart + count
|
|
63
65
|
: lines.slice(0, end).reduce((n, line) => n + line.length + 1, 0);
|
|
64
|
-
|
|
66
|
+
const page = {
|
|
65
67
|
path: filePath,
|
|
66
68
|
...(fileVersion ? { fileVersion } : {}),
|
|
67
69
|
...(offset || limit || column > 1 || truncated
|
|
@@ -96,6 +98,7 @@ export function buildReadFilePage(
|
|
|
96
98
|
hashed: args.hashed === true,
|
|
97
99
|
content,
|
|
98
100
|
};
|
|
101
|
+
return recoverCompleteSourceRead(page, rendered, args, maxChars);
|
|
99
102
|
}
|
|
100
103
|
|
|
101
104
|
/** A bounded navigation index, not a substitute for reading the cited lines. */
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
import { parse } from "acorn";
|
|
2
|
+
import { canProjectHostToolExcerpt } from "./tool-result-preview.js";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A cut source container is not safe evidence. Recover its complete top-level
|
|
6
|
+
* statements from the very same read snapshot, with explicit range metadata.
|
|
7
|
+
* This does not exempt source from either projection or provider sanitization.
|
|
8
|
+
*/
|
|
9
|
+
export function recoverCompleteSourceRead(page, source, args, maxChars) {
|
|
10
|
+
if (
|
|
11
|
+
typeof page?.content !== "string" ||
|
|
12
|
+
typeof page.fileVersion !== "string" ||
|
|
13
|
+
!/\.(?:[cm]?js)$/iu.test(page.path || "") ||
|
|
14
|
+
args.hashed === true ||
|
|
15
|
+
!page.range ||
|
|
16
|
+
!page.readSpan ||
|
|
17
|
+
source.length > 512 * 1024 ||
|
|
18
|
+
canProjectHostToolExcerpt(page.content, "read_file")
|
|
19
|
+
)
|
|
20
|
+
return page;
|
|
21
|
+
|
|
22
|
+
let program;
|
|
23
|
+
let tokens = 0;
|
|
24
|
+
try {
|
|
25
|
+
program = parse(source, {
|
|
26
|
+
ecmaVersion: "latest",
|
|
27
|
+
sourceType: "module",
|
|
28
|
+
allowReturnOutsideFunction: true,
|
|
29
|
+
onToken() {
|
|
30
|
+
if (++tokens > 32768)
|
|
31
|
+
throw new RangeError("Source recovery token bound");
|
|
32
|
+
},
|
|
33
|
+
});
|
|
34
|
+
} catch {
|
|
35
|
+
// Malformed or oversized source retains the ordinary omission boundary.
|
|
36
|
+
return page;
|
|
37
|
+
}
|
|
38
|
+
const statements = program.body.filter(
|
|
39
|
+
(node) => node.start < page.readSpan.end && node.end > page.readSpan.start,
|
|
40
|
+
);
|
|
41
|
+
if (!statements.length) return page;
|
|
42
|
+
const start = Math.min(
|
|
43
|
+
page.readSpan.start,
|
|
44
|
+
source.lastIndexOf("\n", statements[0].start - 1) + 1,
|
|
45
|
+
);
|
|
46
|
+
const followingNewline = source.indexOf("\n", statements.at(-1).end);
|
|
47
|
+
const end = Math.max(
|
|
48
|
+
page.readSpan.end,
|
|
49
|
+
followingNewline < 0 ? source.length : followingNewline + 1,
|
|
50
|
+
);
|
|
51
|
+
const content = source.slice(start, end);
|
|
52
|
+
if (
|
|
53
|
+
content === page.content ||
|
|
54
|
+
!canProjectHostToolExcerpt(content, "read_file")
|
|
55
|
+
)
|
|
56
|
+
return page;
|
|
57
|
+
const startLine = 1 + (source.slice(0, start).match(/\n/gu) || []).length;
|
|
58
|
+
const endLine =
|
|
59
|
+
startLine +
|
|
60
|
+
(content.match(/\n/gu) || []).length -
|
|
61
|
+
(content.endsWith("\n") ? 1 : 0);
|
|
62
|
+
const recovered = {
|
|
63
|
+
...page,
|
|
64
|
+
content,
|
|
65
|
+
range: { startLine, endLine, totalLines: page.range.totalLines },
|
|
66
|
+
readSpan: { start, end, total: source.length },
|
|
67
|
+
sourceRecovery: {
|
|
68
|
+
action: "complete-source-container",
|
|
69
|
+
fileVersion: page.fileVersion,
|
|
70
|
+
requestedRange: { ...page.range },
|
|
71
|
+
requestedSpan: { ...page.readSpan },
|
|
72
|
+
note: "The requested excerpt cut a source container. These complete surrounding statements come from the same file version; the range and readSpan describe the content actually returned.",
|
|
73
|
+
},
|
|
74
|
+
};
|
|
75
|
+
delete recovered.truncated;
|
|
76
|
+
delete recovered.size;
|
|
77
|
+
delete recovered.nextRead;
|
|
78
|
+
delete recovered.hint;
|
|
79
|
+
if (end < source.length) {
|
|
80
|
+
recovered.nextRead = { ...args, offset: endLine + 1, column: 1 };
|
|
81
|
+
recovered.hint = "Continue with nextRead only if more source is needed.";
|
|
82
|
+
}
|
|
83
|
+
// The read guard, host telemetry and delivery envelope still add metadata.
|
|
84
|
+
// Reuse the ordinary page's headroom: an almost-full recovery would be
|
|
85
|
+
// projected back to an omission by the final cap before reaching a provider.
|
|
86
|
+
return JSON.stringify(recovered).length <= Math.max(0, maxChars - 2048)
|
|
87
|
+
? recovered
|
|
88
|
+
: page;
|
|
89
|
+
}
|