chainlesschain 0.166.26 → 0.166.28
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/assets/{AIOps-Z8_dnLd8.js → AIOps-TeJoc3XQ.js} +1 -1
- package/src/assets/web-panel/assets/{ActionButton-C4bKCISV.js → ActionButton-SZ9klC71.js} +1 -1
- package/src/assets/web-panel/assets/{Analytics-GztAv2jy.js → Analytics-BvxMGhXs.js} +3 -3
- package/src/assets/web-panel/assets/{AppLayout-DEqNcuVx.js → AppLayout-5zUWvYnk.js} +4 -4
- package/src/assets/web-panel/assets/{Artifacts-D-R4Ehap.js → Artifacts-0BfSQj3N.js} +1 -1
- package/src/assets/web-panel/assets/{Audit-mzzdTIlM.js → Audit-cScBdt3p.js} +1 -1
- package/src/assets/web-panel/assets/{BackgroundAgents-DS2QupIC.js → BackgroundAgents-022mS_uG.js} +1 -1
- package/src/assets/web-panel/assets/{Backup-CQSirC39.js → Backup-CWnqpCpj.js} +1 -1
- package/src/assets/web-panel/assets/{BaseInput-Bhuc-eOV.js → BaseInput-BCp80_Kc.js} +1 -1
- package/src/assets/web-panel/assets/{Chat-B-RLVGnt.js → Chat-B2rj5NdZ.js} +6 -6
- package/src/assets/web-panel/assets/{ChatBubbleRenderer-CBbMoVuE.js → ChatBubbleRenderer-2Lw_8bkr.js} +1 -1
- package/src/assets/web-panel/assets/{Checkbox-DxwgBryW.js → Checkbox-BTHrb0x7.js} +1 -1
- package/src/assets/web-panel/assets/{Codegen-Cwrm-7nh.js → Codegen-Y17WGsCF.js} +1 -1
- package/src/assets/web-panel/assets/{Col-DrSCT-nF.js → Col-BBBucqHI.js} +1 -1
- package/src/assets/web-panel/assets/{Community-DY2D9WNs.js → Community-B2qcNGY4.js} +1 -1
- package/src/assets/web-panel/assets/{Compact-o-tV0URw.js → Compact-BhDyZd93.js} +1 -1
- package/src/assets/web-panel/assets/{Compliance-Bndh6S8f.js → Compliance-BUEgTVrI.js} +1 -1
- package/src/assets/web-panel/assets/{Cowork-CSNQODak.js → Cowork-_wey4IKY.js} +3 -3
- package/src/assets/web-panel/assets/{Cron-CTgxRHdy.js → Cron-BSO7RSdx.js} +2 -2
- package/src/assets/web-panel/assets/{Crosschain-BJoGQzDI.js → Crosschain-DawYCk-u.js} +1 -1
- package/src/assets/web-panel/assets/{DID-V0Ztm8ne.js → DID-DvtgImFY.js} +2 -2
- package/src/assets/web-panel/assets/{Dashboard-B-38THOj.js → Dashboard-DYAyw4yL.js} +2 -2
- package/src/assets/web-panel/assets/{Dropdown-B3FdOwMO.js → Dropdown-CIaenBpM.js} +1 -1
- package/src/assets/web-panel/assets/{EmailListRenderer-YQDz4mUF.js → EmailListRenderer-jKv7wz64.js} +1 -1
- package/src/assets/web-panel/assets/{FamilyGuardDashboard-DYE45IF9.js → FamilyGuardDashboard-BxQggJuN.js} +1 -1
- package/src/assets/web-panel/assets/{Federation-DjBFjdRZ.js → Federation-CDi_BOHj.js} +1 -1
- package/src/assets/web-panel/assets/{FormItemContext-CVTXEa0R.js → FormItemContext-C-7XWf-w.js} +1 -1
- package/src/assets/web-panel/assets/{GenericCardRenderer-B6Tkke8X.js → GenericCardRenderer-D8PAhWue.js} +1 -1
- package/src/assets/web-panel/assets/{Git-CD0hyAzT.js → Git-yhajzO5I.js} +2 -2
- package/src/assets/web-panel/assets/{Governance-CWOQQJr8.js → Governance-DjM6hZK3.js} +1 -1
- package/src/assets/web-panel/assets/{Inference-lHYwUk-C.js → Inference-C-gVn1ci.js} +1 -1
- package/src/assets/web-panel/assets/{KnowledgeGraph-Cledxv7t.js → KnowledgeGraph-CyG5TgH-.js} +1 -1
- package/src/assets/web-panel/assets/{Logs-D45mt-rM.js → Logs-CnIbZJc3.js} +2 -2
- package/src/assets/web-panel/assets/MarkdownRenderer-BDfOgqr1.js +1 -0
- package/src/assets/web-panel/assets/{Marketplace-Yy30UZPw.js → Marketplace-BQry6ziq.js} +1 -1
- package/src/assets/web-panel/assets/{McpTools-Cil5l-bh.js → McpTools-7MBu8YsX.js} +3 -3
- package/src/assets/web-panel/assets/{Memory-DdJcnyqy.js → Memory-BlaZL_vM.js} +2 -2
- package/src/assets/web-panel/assets/{MobileBridge-IrzFYHEv.js → MobileBridge-iUYdZA22.js} +1 -1
- package/src/assets/web-panel/assets/{MobileProjects-D8q64LMd.js → MobileProjects-CUO-OpoO.js} +1 -1
- package/src/assets/web-panel/assets/{Mtc-CpdTJzW7.js → Mtc-6sD7414H.js} +4 -4
- package/src/assets/web-panel/assets/{MtcAudit-C7Tvw2m6.js → MtcAudit-BW8hjlD8.js} +4 -4
- package/src/assets/web-panel/assets/{Multisig-Dmj9F5Kr.js → Multisig-BA7_DWLu.js} +3 -3
- package/src/assets/web-panel/assets/{NLProgramming-C9Xchob5.js → NLProgramming-7P7H52-B.js} +1 -1
- package/src/assets/web-panel/assets/{Notes-Bzq6Yry5.js → Notes-D2O2aG0R.js} +4 -4
- package/src/assets/web-panel/assets/{NotificationSettings-DxG9eKb4.js → NotificationSettings-SD4fdxcr.js} +1 -1
- package/src/assets/web-panel/assets/{OrderTableRenderer-BS_IYoCe.js → OrderTableRenderer-BbXM4Ueq.js} +1 -1
- package/src/assets/web-panel/assets/{Organization-kazsRvcq.js → Organization-DNabgtKX.js} +4 -4
- package/src/assets/web-panel/assets/{Overflow-i4wP-hwn.js → Overflow-B7Bqrhq0.js} +1 -1
- package/src/assets/web-panel/assets/{P2P-CfGeU3h-.js → P2P-Dh0Df0zq.js} +2 -2
- package/src/assets/web-panel/assets/{PdhVaultBrowser-CS-VhVUx.js → PdhVaultBrowser-DHfJarF9.js} +5 -5
- package/src/assets/web-panel/assets/{Permissions-DnEHXs0I.js → Permissions-Bz3ddnZ9.js} +4 -4
- package/src/assets/web-panel/assets/{PersonalDataHub-DeD82qke.js → PersonalDataHub-Dfe0X6p8.js} +5 -5
- package/src/assets/web-panel/assets/{Pipeline-CMGGLgBY.js → Pipeline-kCnDqnwc.js} +1 -1
- package/src/assets/web-panel/assets/{Privacy-CvHoFv32.js → Privacy-CPveUX9G.js} +1 -1
- package/src/assets/web-panel/assets/{ProjectInit-DnJapCc1.js → ProjectInit-ddXd7WTL.js} +2 -2
- package/src/assets/web-panel/assets/{ProjectSettings-CqVdv3-g.js → ProjectSettings-DnXcEjyu.js} +2 -2
- package/src/assets/web-panel/assets/{Projects-B_o8vcs_.js → Projects-O2yaPDuU.js} +1 -1
- package/src/assets/web-panel/assets/{Providers-CPKseoDW.js → Providers-hJpcyGxR.js} +1 -1
- package/src/assets/web-panel/assets/{QrScannerModal-_iBfKbPQ.js → QrScannerModal-CkbMoodn.js} +1 -1
- package/src/assets/web-panel/assets/{QuickAsk-CMrlZ69a.js → QuickAsk-CyFailNZ.js} +1 -1
- package/src/assets/web-panel/assets/{Recommend-BwDtSZ0l.js → Recommend-jpIDoqHs.js} +1 -1
- package/src/assets/web-panel/assets/{RemoteSession-DomUAtn4.js → RemoteSession-CieiVXM-.js} +2 -2
- package/src/assets/web-panel/assets/{Reputation-Cuu2GCHr.js → Reputation-DHtgC0AY.js} +1 -1
- package/src/assets/web-panel/assets/{Row-C7GVts31.js → Row-CSUyTUkR.js} +1 -1
- package/src/assets/web-panel/assets/{RssFeed-DRKvgEog.js → RssFeed-CkHylSMs.js} +3 -3
- package/src/assets/web-panel/assets/{Search-BGI9wOeA.js → Search-ykyn3OaJ.js} +1 -1
- package/src/assets/web-panel/assets/{Security-BlLaHy_L.js → Security-DjM95Eyb.js} +3 -3
- package/src/assets/web-panel/assets/{Services-DFqZbjmX.js → Services-Cf4UMvka.js} +2 -2
- package/src/assets/web-panel/assets/{Skeleton-BCGxdooP.js → Skeleton-BnR-ZNiM.js} +1 -1
- package/src/assets/web-panel/assets/{Skills-CwFKgcmm.js → Skills-oC5jYJgK.js} +1 -1
- package/src/assets/web-panel/assets/{Sla-CiXXh9eS.js → Sla-CTc_YFxW.js} +1 -1
- package/src/assets/web-panel/assets/{SpeechSettings-WSx2CLqO.js → SpeechSettings-31rddoaP.js} +1 -1
- package/src/assets/web-panel/assets/{SyncSettings-BBIqQOtW.js → SyncSettings-C-h00U59.js} +2 -2
- package/src/assets/web-panel/assets/{Tasks-D1BGLjO1.js → Tasks-CGn_IiAO.js} +1 -1
- package/src/assets/web-panel/assets/{Templates-CUIl9axA.js → Templates-B9Hz_RuF.js} +1 -1
- package/src/assets/web-panel/assets/{Tenant-BFZJ0hNz.js → Tenant-CJnIeKrI.js} +1 -1
- package/src/assets/web-panel/assets/{Terminal-Cw-3eYVn.js → Terminal-DfGtwDMA.js} +2 -2
- package/src/assets/web-panel/assets/{TimelineRenderer-bOVPB56L.js → TimelineRenderer-CISmCIFj.js} +1 -1
- package/src/assets/web-panel/assets/{Tokens-Czfyq2VY.js → Tokens-DNr-VU6W.js} +1 -1
- package/src/assets/web-panel/assets/{Trigger-C-o4uJY0.js → Trigger-CCYolBXm.js} +1 -1
- package/src/assets/web-panel/assets/{Trust-BKq_S6iF.js → Trust-DD75_Hjo.js} +1 -1
- package/src/assets/web-panel/assets/{UkeySign-fKlWUvMx.js → UkeySign-BXulgGCu.js} +1 -1
- package/src/assets/web-panel/assets/{VideoEditing-DB5MLuS7.js → VideoEditing-B0DgHQiZ.js} +1 -1
- package/src/assets/web-panel/assets/{Wallet-WGXBn7IS.js → Wallet-BV3CEPVS.js} +4 -4
- package/src/assets/web-panel/assets/{WebAuthn-B8TC4EMF.js → WebAuthn-CI9bXloP.js} +4 -4
- package/src/assets/web-panel/assets/{WorkflowEditor-DLY--KmM.js → WorkflowEditor-B4z18zZp.js} +1 -1
- package/src/assets/web-panel/assets/{chat-Crw3XQaA.js → chat-BsQ4S4Nh.js} +1 -1
- package/src/assets/web-panel/assets/{colors-CxhWauPV.js → colors-C0Jsl3u8.js} +1 -1
- package/src/assets/web-panel/assets/{compact-item-Cp3ojtk5.js → compact-item-CMZ_5Gdj.js} +1 -1
- package/src/assets/web-panel/assets/{createContext-CRuRXjSo.js → createContext-VeTZ9pjJ.js} +1 -1
- package/src/assets/web-panel/assets/devWarning-ChXQhXs6.js +1 -0
- package/src/assets/web-panel/assets/{hasIn-XGW474dj.js → hasIn-R2ip_4t-.js} +1 -1
- package/src/assets/web-panel/assets/{index-38TRdZb6.js → index-02inSVeg.js} +1 -1
- package/src/assets/web-panel/assets/{index-C73pqyDb.js → index-0LEUdXks.js} +1 -1
- package/src/assets/web-panel/assets/{index-B5fJS-kn.js → index-4i3UILe7.js} +1 -1
- package/src/assets/web-panel/assets/{index-DoUC5_ry.js → index-6vvyh4N2.js} +1 -1
- package/src/assets/web-panel/assets/{index-DHNixOg_.js → index-B53MC1iz.js} +1 -1
- package/src/assets/web-panel/assets/{index-CDIpH_8Q.js → index-BDl3jun-.js} +1 -1
- package/src/assets/web-panel/assets/{index-DfPLIA-f.js → index-BGFKUUsv.js} +1 -1
- package/src/assets/web-panel/assets/{index-DxOtBFVy.js → index-BGKhfuHU.js} +1 -1
- package/src/assets/web-panel/assets/{index-BXnNbbwa.js → index-BJvl_XUa.js} +1 -1
- package/src/assets/web-panel/assets/{index-qzmihx1d.js → index-BPTTGRU9.js} +1 -1
- package/src/assets/web-panel/assets/{index-BetOkRLs.js → index-BX_8_UFn.js} +1 -1
- package/src/assets/web-panel/assets/{index-CTE32qol.js → index-BdwYZI-H.js} +1 -1
- package/src/assets/web-panel/assets/{index-Ctu98x57.js → index-Bhz0a_oU.js} +1 -1
- package/src/assets/web-panel/assets/{index-jrIcbPUa.js → index-BjW7Qlh-.js} +1 -1
- package/src/assets/web-panel/assets/index-BpqhSIKB.js +1 -0
- package/src/assets/web-panel/assets/{index-BUWZ57T4.js → index-BtV-unhh.js} +1 -1
- package/src/assets/web-panel/assets/{index-C8UOVaUH.js → index-ByPe74vs.js} +1 -1
- package/src/assets/web-panel/assets/{index-BElgeKJ0.js → index-Bz4O8exa.js} +3 -3
- package/src/assets/web-panel/assets/{index-DUSVsOGS.js → index-C3oYV_lA.js} +1 -1
- package/src/assets/web-panel/assets/{index-De2FN0xN.js → index-CIanQUmB.js} +1 -1
- package/src/assets/web-panel/assets/{index-CdlfrcC-.js → index-CNMfIBsh.js} +1 -1
- package/src/assets/web-panel/assets/{index-QqAuH7-S.js → index-CsoYgCfM.js} +1 -1
- package/src/assets/web-panel/assets/{index-CPFam-me.js → index-CuIo38St.js} +1 -1
- package/src/assets/web-panel/assets/index-Cv9p7aNY.js +1 -0
- package/src/assets/web-panel/assets/{index-DhomnuaB.js → index-D4DUCUMd.js} +1 -1
- package/src/assets/web-panel/assets/{index-BYkjs7eP.js → index-DF8AVnyq.js} +1 -1
- package/src/assets/web-panel/assets/{index-DBcBsJYg.js → index-DUfRaQ2R.js} +1 -1
- package/src/assets/web-panel/assets/{index-BW028Pwn.js → index-DdXJoar7.js} +1 -1
- package/src/assets/web-panel/assets/{index-Yq3bFbYX.js → index-DjkLws9g.js} +1 -1
- package/src/assets/web-panel/assets/{index-J_08R33H.js → index-Dqf95oif.js} +1 -1
- package/src/assets/web-panel/assets/{index-BVmSfIkJ.js → index-Du20UePt.js} +1 -1
- package/src/assets/web-panel/assets/{index-BuVA26SD.js → index-DvYF07ij.js} +1 -1
- package/src/assets/web-panel/assets/{index-rsACoVT9.js → index-DwfM7rYW.js} +1 -1
- package/src/assets/web-panel/assets/{index-WvNZXbIO.js → index-WJ_YxlwK.js} +1 -1
- package/src/assets/web-panel/assets/{index-E-RSfImO.js → index-Zlt4hVX9.js} +1 -1
- package/src/assets/web-panel/assets/{index-Dp2nC5On.js → index-iHgBGK8l.js} +1 -1
- package/src/assets/web-panel/assets/{index-nJR64pA_.js → index-nM2lMEZ4.js} +1 -1
- package/src/assets/web-panel/assets/{index-B45Vkh3T.js → index-q_5BV7Pj.js} +1 -1
- package/src/assets/web-panel/assets/{index-W8_0yAi_.js → index-yIN1stc7.js} +1 -1
- package/src/assets/web-panel/assets/{initDefaultProps-DAu-hgme.js → initDefaultProps-D1uCn3z4.js} +1 -1
- package/src/assets/web-panel/assets/{motion-Db8yk0Hu.js → motion-5TP3EY0Q.js} +1 -1
- package/src/assets/web-panel/assets/{move-Cii2jOin.js → move-C_bi-KUq.js} +1 -1
- package/src/assets/web-panel/assets/{mtc-parser-CnZBDkyZ.js → mtc-parser-CmdzT6ro.js} +1 -1
- package/src/assets/web-panel/assets/{omit-Buzt1FTL.js → omit-Ce0_wQke.js} +1 -1
- package/src/assets/web-panel/assets/{pickAttrs-CpZ_NmE6.js → pickAttrs-DG8auaWM.js} +1 -1
- package/src/assets/web-panel/assets/{placementArrow-mBrx3dYm.js → placementArrow-CaWVLdLv.js} +1 -1
- package/src/assets/web-panel/assets/{responsiveObserve-DC_QzljB.js → responsiveObserve-Bot4LFBx.js} +1 -1
- package/src/assets/web-panel/assets/{slide-DT_UVED-.js → slide-HCFYDpKc.js} +1 -1
- package/src/assets/web-panel/assets/{statusUtils-78t6eNLV.js → statusUtils-CWNqwWxQ.js} +1 -1
- package/src/assets/web-panel/assets/{styleChecker-CV_T1ULL.js → styleChecker-BUyR4PCy.js} +1 -1
- package/src/assets/web-panel/assets/{useFlexGapSupport-s8edGuXD.js → useFlexGapSupport-C4XRVB5s.js} +1 -1
- package/src/assets/web-panel/assets/{useFs-Pk9dH2HC.js → useFs-D2VOJbk-.js} +1 -1
- package/src/assets/web-panel/assets/{usePersonalDataHub-B_GqAm8c.js → usePersonalDataHub-dN8G1tq6.js} +1 -1
- package/src/assets/web-panel/assets/{vnode-Cxyss24q.js → vnode-DSQKKZnw.js} +1 -1
- package/src/assets/web-panel/assets/{zoom-0UY3cOuc.js → zoom-Dl0bVMqQ.js} +1 -1
- package/src/assets/web-panel/index.html +1 -1
- package/src/commands/ask.js +84 -5
- package/src/commands/chat.js +67 -1
- package/src/commands/compact.js +81 -2
- package/src/commands/complete.js +64 -5
- package/src/commands/cowork.js +133 -0
- package/src/commands/orchestrate.js +18 -7
- package/src/data/changelog.json +13 -0
- package/src/gateways/ws/action-protocol.js +2 -0
- package/src/lib/agent-router.js +116 -36
- package/src/lib/cowork-task-runner.js +107 -4
- package/src/lib/evolution/agent-evolution-ingress.js +231 -40
- package/src/lib/evolution/agent-evolution-runtime-composition.js +85 -5
- package/src/lib/evolution/evolution-deployment-loader.js +17 -1
- package/src/lib/evolution/evolution-evidence-projector.js +25 -6
- package/src/lib/model-failure-policy.js +10 -0
- package/src/lib/orchestrator.js +97 -27
- package/src/lib/read-file-loop-guard.js +21 -1
- package/src/lib/sub-agent-context.js +34 -2
- package/src/repl/chat-repl.js +60 -10
- package/src/runtime/agent-core.js +96 -5
- package/src/runtime/agent-runtime.js +20 -1
- package/src/runtime/runtime-factory.js +1 -1
- package/src/assets/web-panel/assets/MarkdownRenderer-DJjPaOnM.js +0 -1
- package/src/assets/web-panel/assets/devWarning-CKAQY2zn.js +0 -1
- package/src/assets/web-panel/assets/index-Cetfwq8j.js +0 -1
- package/src/assets/web-panel/assets/index-DOpcRO2-.js +0 -1
|
@@ -27,6 +27,7 @@ import { createHash, randomUUID } from "node:crypto";
|
|
|
27
27
|
import skillInvocationReceipt from "@chainlesschain/session-core/skill-invocation-receipt";
|
|
28
28
|
import { isProxy } from "node:util/types";
|
|
29
29
|
import { captureAgentEvolutionIngress } from "../lib/evolution/agent-evolution-ingress.js";
|
|
30
|
+
import { isEvolutionIngressFailure } from "../lib/model-failure-policy.js";
|
|
30
31
|
|
|
31
32
|
const { startSkillInvocation, settleSkillInvocation } = skillInvocationReceipt;
|
|
32
33
|
import sharedCodingAgentPolicy from "./coding-agent-policy.cjs";
|
|
@@ -1092,6 +1093,7 @@ Key behaviors:
|
|
|
1092
1093
|
- When asked about git status, diff, log, or other repository operations, use the git tool instead of run_shell
|
|
1093
1094
|
- When asked about files or code, use search_files to locate relevant sections, then read_file with offset/limit. Follow nextRead for large files. Reuse unchanged content already in context instead of repeatedly reading the same page; re-read when the file changes or the earlier content is no longer available.
|
|
1094
1095
|
- Large task documents include a sampled outline with line numbers. Use it to locate relevant unfinished work and inspect those sections instead of scanning the entire document unless the task requires full coverage. File coverage and excerpts survive compaction; reading to EOF is not completing the user's task.
|
|
1096
|
+
- For task counts or completion status, search the named document for the latest status/summary table first, then read that section. Distinguish historical entries from current status and repository work from external acceptance. Once the relevant entries are verified, answer; do not read every implementation detail just to count tasks.
|
|
1095
1097
|
- Before renaming or changing a symbol, use code_intelligence (action: references/definition) to find every real usage instead of guessing with text search. It degrades to "unavailable" when no language server is installed — fall back to search_files then.
|
|
1096
1098
|
- After an edit, if the tool result includes a "newDiagnostics" array, you just introduced (or exposed) those errors/warnings — read them and fix before moving on. You can also run code_intelligence (action: diagnostics) on any file to check it on demand.
|
|
1097
1099
|
- If a tool result includes a "subtreeInstructions" array, you just entered a subdirectory that carries its own cc.md/CLAUDE.md/AGENTS.md — treat that content as authoritative project rules for work in that subtree (it is injected once, the first time you touch the subtree).
|
|
@@ -1101,6 +1103,7 @@ Key behaviors:
|
|
|
1101
1103
|
|
|
1102
1104
|
When the user's problem involves data processing, calculations, file operations, text parsing, API calls, web scraping, or any task that can be solved programmatically:
|
|
1103
1105
|
- Proactively write and execute code using run_code tool
|
|
1106
|
+
- For long documents, scripts should filter/count locally and print only the relevant rows, totals and source line numbers. Do not print an entire file or repeatedly dump its prefix through run_code/run_shell; use read_file offset/limit for missing sections. Truncated output is not full-file evidence.
|
|
1104
1107
|
- Choose the best language: Python for data/math/scraping, Node.js for JSON/API, Bash for system tasks
|
|
1105
1108
|
- Missing Python packages are NOT auto-installed by default; the tool result tells you (and the user) how to opt in (settings runCode.autoInstall)
|
|
1106
1109
|
- Scripts run from a temp file by default; pass persist:true to keep one in .chainlesschain/agent-scripts/ for reference
|
|
@@ -8227,6 +8230,7 @@ async function executeToolInner(
|
|
|
8227
8230
|
});
|
|
8228
8231
|
} catch (err) {
|
|
8229
8232
|
if (
|
|
8233
|
+
isEvolutionIngressFailure(err) ||
|
|
8230
8234
|
err?.runtimeLedgerPersistence === true ||
|
|
8231
8235
|
err?.workflowEffectOutcomeUnknown === true
|
|
8232
8236
|
) {
|
|
@@ -9226,7 +9230,7 @@ async function _executeRunCode(args, cwd) {
|
|
|
9226
9230
|
|
|
9227
9231
|
return {
|
|
9228
9232
|
success: true,
|
|
9229
|
-
|
|
9233
|
+
...boundedCodeOutput(retryOutput),
|
|
9230
9234
|
language: lang,
|
|
9231
9235
|
duration: `${retryDuration}ms`,
|
|
9232
9236
|
autoInstalled: [packageName],
|
|
@@ -9269,7 +9273,7 @@ async function _executeRunCode(args, cwd) {
|
|
|
9269
9273
|
const duration = Date.now() - start;
|
|
9270
9274
|
return {
|
|
9271
9275
|
success: true,
|
|
9272
|
-
output
|
|
9276
|
+
...boundedCodeOutput(output),
|
|
9273
9277
|
language: lang,
|
|
9274
9278
|
duration: `${duration}ms`,
|
|
9275
9279
|
scriptPath: persist ? scriptPath : undefined,
|
|
@@ -9347,9 +9351,66 @@ export function capToolResultString(serialized, max = MAX_TOOL_RESULT_CHARS) {
|
|
|
9347
9351
|
);
|
|
9348
9352
|
}
|
|
9349
9353
|
|
|
9354
|
+
/** Leave room for JSON escaping and execution metadata, including the hint. */
|
|
9355
|
+
export function boundedCodeOutput(value) {
|
|
9356
|
+
const output = String(value ?? "");
|
|
9357
|
+
const budget = Math.max(0, MAX_TOOL_RESULT_CHARS - 4096);
|
|
9358
|
+
let low = 0;
|
|
9359
|
+
let high = Math.min(output.length, 50000);
|
|
9360
|
+
while (low < high) {
|
|
9361
|
+
const mid = Math.ceil((low + high) / 2);
|
|
9362
|
+
if (JSON.stringify(output.slice(0, mid)).length <= budget) low = mid;
|
|
9363
|
+
else high = mid - 1;
|
|
9364
|
+
}
|
|
9365
|
+
if (low === output.length) return { output };
|
|
9366
|
+
if (low > 0 && /[\uD800-\uDBFF]/.test(output[low - 1])) low--;
|
|
9367
|
+
return {
|
|
9368
|
+
truncated: true,
|
|
9369
|
+
outputChars: output.length,
|
|
9370
|
+
returnedChars: low,
|
|
9371
|
+
hint: "Only an output prefix is shown. Do not rerun the same full-file print: filter/count locally and print a bounded summary with source line numbers, or use read_file with offset/limit for a missing section. This prefix is not evidence of the entire file.",
|
|
9372
|
+
output: output.slice(0, low),
|
|
9373
|
+
};
|
|
9374
|
+
}
|
|
9375
|
+
|
|
9350
9376
|
/** Avoid injecting the same file page twice while its original is still visible. */
|
|
9351
9377
|
export function toolResultForModel(tool, result, messages) {
|
|
9352
9378
|
const serialized = capToolResultString(safeStringifyToolResult(result));
|
|
9379
|
+
if (
|
|
9380
|
+
(tool === "run_code" || tool === "run_shell") &&
|
|
9381
|
+
!result?.error &&
|
|
9382
|
+
typeof result?.output === "string" &&
|
|
9383
|
+
result.output.length >= 8000
|
|
9384
|
+
) {
|
|
9385
|
+
const callIds = new Set(
|
|
9386
|
+
messages.flatMap((message) =>
|
|
9387
|
+
(message.tool_calls || [])
|
|
9388
|
+
.filter((call) => call.function?.name === tool)
|
|
9389
|
+
.map((call) => call.id),
|
|
9390
|
+
),
|
|
9391
|
+
);
|
|
9392
|
+
const previous = messages.find((message) => {
|
|
9393
|
+
if (message.role !== "tool" || !callIds.has(message.tool_call_id))
|
|
9394
|
+
return false;
|
|
9395
|
+
try {
|
|
9396
|
+
const prior = JSON.parse(message.content.split("\n\n[Budget ")[0]);
|
|
9397
|
+
return !prior.error && prior.output === result.output;
|
|
9398
|
+
} catch {
|
|
9399
|
+
return false;
|
|
9400
|
+
}
|
|
9401
|
+
});
|
|
9402
|
+
if (previous) {
|
|
9403
|
+
return capToolResultString(
|
|
9404
|
+
safeStringifyToolResult({
|
|
9405
|
+
...result,
|
|
9406
|
+
output: undefined,
|
|
9407
|
+
outputOmitted: true,
|
|
9408
|
+
previousToolCallId: previous.tool_call_id,
|
|
9409
|
+
hint: "This command executed again and returned the same large output already visible in the referenced tool result. Reuse that output; filter/count locally or read a specific missing section instead of dumping it again. This does not establish that files or other command side effects are unchanged.",
|
|
9410
|
+
}),
|
|
9411
|
+
);
|
|
9412
|
+
}
|
|
9413
|
+
}
|
|
9353
9414
|
if (
|
|
9354
9415
|
tool !== "read_file" ||
|
|
9355
9416
|
result?.error ||
|
|
@@ -9547,6 +9608,7 @@ function _backgroundSubAgentResultText(entry) {
|
|
|
9547
9608
|
function _throwBackgroundSubAgentUsageFailure(entry) {
|
|
9548
9609
|
const error = entry?.outcome?.fatalError;
|
|
9549
9610
|
if (
|
|
9611
|
+
isEvolutionIngressFailure(error) ||
|
|
9550
9612
|
error?.runtimeLedgerPersistence === true ||
|
|
9551
9613
|
error?.workflowEffectOutcomeUnknown === true
|
|
9552
9614
|
) {
|
|
@@ -10497,7 +10559,8 @@ async function _executeSpawnSubAgent(args, ctx) {
|
|
|
10497
10559
|
return {
|
|
10498
10560
|
result: subCtx.result,
|
|
10499
10561
|
error: err.message,
|
|
10500
|
-
...(err
|
|
10562
|
+
...(isEvolutionIngressFailure(err) ||
|
|
10563
|
+
err?.runtimeLedgerPersistence === true ||
|
|
10501
10564
|
err?.workflowEffectOutcomeUnknown === true
|
|
10502
10565
|
? { fatalError: err }
|
|
10503
10566
|
: {}),
|
|
@@ -10632,6 +10695,7 @@ async function _executeSpawnSubAgent(args, ctx) {
|
|
|
10632
10695
|
});
|
|
10633
10696
|
|
|
10634
10697
|
if (
|
|
10698
|
+
isEvolutionIngressFailure(err) ||
|
|
10635
10699
|
err?.runtimeLedgerPersistence === true ||
|
|
10636
10700
|
err?.workflowEffectOutcomeUnknown === true
|
|
10637
10701
|
) {
|
|
@@ -13743,7 +13807,7 @@ export async function* agentLoop(messages, options) {
|
|
|
13743
13807
|
);
|
|
13744
13808
|
yield* _drainSubAgentUsage(subAgentUsageSink);
|
|
13745
13809
|
const error = new Error(
|
|
13746
|
-
"Repeated
|
|
13810
|
+
"Repeated file reads or identical large command outputs: the model did not resume the task after six no-progress batches and recovery guidance. The task is not complete. Use a targeted section or compute a bounded summary before retrying.",
|
|
13747
13811
|
);
|
|
13748
13812
|
error.code = "CC_AGENT_REPEATED_FILE_READ";
|
|
13749
13813
|
throw error;
|
|
@@ -14626,6 +14690,29 @@ export async function* agentLoop(messages, options) {
|
|
|
14626
14690
|
}
|
|
14627
14691
|
|
|
14628
14692
|
const toolCalls = msg.tool_calls;
|
|
14693
|
+
if (Array.isArray(toolCalls) && toolCalls.length > 0) {
|
|
14694
|
+
// Allocate missing provider IDs once, before transcript insertion and
|
|
14695
|
+
// any evidence or execution boundary. This is only local correlation,
|
|
14696
|
+
// not a provider receipt or an exactly-once execution guarantee.
|
|
14697
|
+
const usedIds = new Set();
|
|
14698
|
+
for (const call of toolCalls) {
|
|
14699
|
+
if (!call || typeof call !== "object") continue;
|
|
14700
|
+
if (call.id == null || call.id === "") {
|
|
14701
|
+
// Letter-only encoding retains UUID entropy without introducing
|
|
14702
|
+
// number-like control IDs into sensitive-data classification.
|
|
14703
|
+
const localId = randomUUID()
|
|
14704
|
+
.replaceAll("-", "")
|
|
14705
|
+
.replace(/[0-9]/g, (digit) =>
|
|
14706
|
+
String.fromCharCode(103 + Number(digit)),
|
|
14707
|
+
);
|
|
14708
|
+
call.id = `cc_tool_${localId}`;
|
|
14709
|
+
}
|
|
14710
|
+
if (typeof call.id !== "string" || usedIds.has(call.id)) {
|
|
14711
|
+
throw new Error("Malformed or duplicate tool call identity");
|
|
14712
|
+
}
|
|
14713
|
+
usedIds.add(call.id);
|
|
14714
|
+
}
|
|
14715
|
+
}
|
|
14629
14716
|
|
|
14630
14717
|
if (!toolCalls || toolCalls.length === 0) {
|
|
14631
14718
|
// A final answer while background sub-agents are still outstanding is
|
|
@@ -15263,7 +15350,11 @@ export async function* agentLoop(messages, options) {
|
|
|
15263
15350
|
"tool_error",
|
|
15264
15351
|
);
|
|
15265
15352
|
} catch (err) {
|
|
15266
|
-
if (
|
|
15353
|
+
if (
|
|
15354
|
+
isEvolutionIngressFailure(err) ||
|
|
15355
|
+
err?.runtimeLedgerPersistence === true
|
|
15356
|
+
)
|
|
15357
|
+
throw err;
|
|
15267
15358
|
toolResult = {
|
|
15268
15359
|
error: err.message,
|
|
15269
15360
|
...(workflowBinding
|
|
@@ -379,6 +379,9 @@ export class AgentRuntime {
|
|
|
379
379
|
}
|
|
380
380
|
|
|
381
381
|
async startChatSession() {
|
|
382
|
+
if (this.evolutionIngress !== null) {
|
|
383
|
+
await this.evolutionIngress.start();
|
|
384
|
+
}
|
|
382
385
|
this.emit(RUNTIME_EVENTS.RUNTIME_START, {
|
|
383
386
|
kind: this.kind,
|
|
384
387
|
policy: this.policy,
|
|
@@ -387,7 +390,23 @@ export class AgentRuntime {
|
|
|
387
390
|
kind: this.kind,
|
|
388
391
|
sessionId: this.policy.sessionId || null,
|
|
389
392
|
});
|
|
390
|
-
|
|
393
|
+
const result = await this.deps.startChatRepl({
|
|
394
|
+
...this.policy,
|
|
395
|
+
...(this.evolutionIngress === null
|
|
396
|
+
? {}
|
|
397
|
+
: { evolutionIngress: this.evolutionIngress }),
|
|
398
|
+
});
|
|
399
|
+
if (this.evolutionIngress !== null) {
|
|
400
|
+
if (result?.schema === AGENT_EVOLUTION_SESSION_SCHEMA) {
|
|
401
|
+
return await waitForAgentEvolutionSession(
|
|
402
|
+
result,
|
|
403
|
+
this.evolutionIngress,
|
|
404
|
+
);
|
|
405
|
+
}
|
|
406
|
+
if (result?.started === false) return result;
|
|
407
|
+
await this.evolutionIngress.complete();
|
|
408
|
+
}
|
|
409
|
+
return result;
|
|
391
410
|
}
|
|
392
411
|
|
|
393
412
|
async startServer() {
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{P as c,J as p,b as s}from"./vendor-Bn1JzzAn.js";import{r as a}from"./markdown-Yo_c6Krv.js";import{_ as d}from"./index-BElgeKJ0.js";const _={__name:"MarkdownRenderer",props:{content:{type:String,default:""}},setup(t,{expose:o}){o();const e=t,r=s(()=>a(e.content||"")),n={props:e,rendered:r,computed:s,get renderMarkdown(){return a}};return Object.defineProperty(n,"__isScriptSetup",{enumerable:!1,value:!0}),n}},i=["innerHTML"];function m(t,o,e,r,n,u){return c(),p("div",{class:"markdown-content",innerHTML:r.rendered},null,8,i)}const w=d(_,[["render",m],["__scopeId","data-v-0b0b9f63"],["__file","/tmp/cc-web-panel-svJYvI/repo/packages/web-panel/src/components/MarkdownRenderer.vue"]]);export{w as M};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{Q as r}from"./index-BElgeKJ0.js";const o=((n,a,e)=>{r(n,`[ant-design-vue: ${a}] ${e}`)});export{o as d};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{C as o}from"./Col-DrSCT-nF.js";import{a0 as t}from"./index-BElgeKJ0.js";import"./vendor-Bn1JzzAn.js";import"./index-DoUC5_ry.js";import"./icons-DG5UD-6K.js";const s=t(o);export{s as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{A as o}from"./Row-C7GVts31.js";import{a0 as t}from"./index-BElgeKJ0.js";import"./vendor-Bn1JzzAn.js";import"./responsiveObserve-DC_QzljB.js";import"./useFlexGapSupport-s8edGuXD.js";import"./styleChecker-CV_T1ULL.js";import"./index-DoUC5_ry.js";import"./icons-DG5UD-6K.js";const l=t(o);export{l as default};
|