@tea-agent/loop-agent 0.52.0-next.1 → 0.52.0-next.11
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/CHANGELOG.md +99 -21
- package/dist/build-stamp.json +3 -3
- package/dist/cli/command-definitions.js +1 -75
- package/dist/cli/help.js +1 -1
- package/dist/cli/program.js +1 -28
- package/dist/commands/init-accepted-merge.js +46 -0
- package/dist/commands/init-upgrade.js +115 -2
- package/dist/commands/init.js +79 -12
- package/dist/executors/pi-sdk-executor.js +3 -3
- package/dist/governance/path-guard.js +2 -0
- package/dist/records/harvest.js +1 -1
- package/dist/shared/git-progress.js +3 -0
- package/dist/shared/operator/capabilities.js +0 -122
- package/dist/shared/pi-context-pressure/checkpoint.js +94 -24
- package/dist/shared/pi-context-pressure/compaction-policy.js +152 -66
- package/dist/shared/pi-context-pressure/extension.js +32 -8
- package/dist/shared/pi-context-pressure/index.js +1 -1
- package/dist/shared/pi-context-pressure/telemetry.js +15 -0
- package/dist/shared/update/npm-client.js +14 -3
- package/dist/task/config-types.js +5 -10
- package/dist/task/delegate.js +1 -1
- package/dist/task/read-model.js +0 -4
- package/dist/task/runtime.js +0 -1
- package/dist/task/worktree.js +1 -1
- package/dist/worker/console/chat/api-workbench-core.js +17 -6
- package/dist/worker/console/chat/api-workbench.js +2 -0
- package/dist/worker/console/chat/assistant-content.js +21 -3
- package/dist/worker/console/chat/chat-event-projection.js +6 -0
- package/dist/worker/console/chat/chat-event-store.js +32 -2
- package/dist/worker/console/chat/chat-references.js +4 -0
- package/dist/worker/console/chat/compaction-errors.js +14 -2
- package/dist/worker/console/chat/context-insights.js +41 -4
- package/dist/worker/console/chat/context-usage.js +4 -1
- package/dist/worker/console/chat/pi-runtime/custom-tools/apiworkbench-tools.js +65 -3
- package/dist/worker/console/chat/pi-runtime/custom-tools/browser-tools.js +2 -2
- package/dist/worker/console/chat/pi-runtime/extension-bindings.js +39 -0
- package/dist/worker/console/chat/pi-runtime/sdk-bindings.js +4 -0
- package/dist/worker/console/chat/pi-runtime.js +389 -191
- package/dist/worker/console/chat/repo-browser.js +5 -2
- package/dist/worker/console/chat/repo-preview-kind.js +16 -6
- package/dist/worker/console/chat/routes.js +299 -25
- package/dist/worker/console/chat/scheduled-goal-request.js +1 -1
- package/dist/worker/console/chat/subagents/jobs.js +115 -4
- package/dist/worker/console/chat/terminal-sessions.js +52 -6
- package/dist/worker/console/chat/tool-exposure-catalog.js +1 -1
- package/dist/worker/console/chat/tool-presentation.js +17 -10
- package/dist/worker/console/chat/tool-preview.js +22 -0
- package/dist/worker/console/chat/turn-process.js +49 -0
- package/dist/worker/console/chat/vcp-prompt.js +14 -9
- package/dist/worker/console/chat/workspace-changes.js +17 -0
- package/dist/worker/console/console-update-runtime.js +5 -1
- package/dist/worker/console/operator-actions.js +7 -6
- package/dist/worker/console/operator-user-error.js +5 -1
- package/dist/worker/console/pi-compaction-settings.js +220 -0
- package/dist/worker/console/routes.js +1 -1
- package/dist/worker/console/server.js +148 -6
- package/dist/worker/console/static/assets/FilePreviewDocx-ybM3ZqSl.js +9 -0
- package/dist/worker/console/static/assets/abnfDiagram-N423BO3Z-CT26sIgH.js +1 -0
- package/dist/worker/console/static/assets/{arc-Bkf_oc0_.js → arc-CPwLqDB0.js} +1 -1
- package/dist/worker/console/static/assets/architectureDiagram-T3A2C74G-CzTSMPU_.js +36 -0
- package/dist/worker/console/static/assets/{blockDiagram-VBNYF7ZC-D62uVvbI.js → blockDiagram-VBNYF7ZC-BfgbtJLH.js} +1 -1
- package/dist/worker/console/static/assets/{c4Diagram-5PPSVZJV-Iq0Y8Afx.js → c4Diagram-5PPSVZJV-B9pTjB8U.js} +1 -1
- package/dist/worker/console/static/assets/channel-DtYRMDck.js +1 -0
- package/dist/worker/console/static/assets/{chunk-2GRJ4B5K-D1TxRE3k.js → chunk-2GRJ4B5K-xORV8QsC.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-2Q5K7J3B-BE-DHkAO.js → chunk-2Q5K7J3B-BzpYWAHK.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5RXB4S5H-t0iYO8Cc.js → chunk-5RXB4S5H-D8zcRP6c.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-5VM5RSS4-Clo2nExi.js → chunk-5VM5RSS4-DVEXxzQJ.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-6Q2QTUOP-C7bSpo-3.js → chunk-6Q2QTUOP-CKZOJU2z.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-GF5L2VYU-DorZaymh.js → chunk-GF5L2VYU-Cgx34Dj8.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-JWPE2WC7-Ch_4HvyJ.js → chunk-JWPE2WC7-ehcSKOcx.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-KBJHAD2P-yaSoFe-3.js → chunk-KBJHAD2P-CiY9emCG.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-RYQCIY6F-QpjaXecS.js → chunk-RYQCIY6F-Bk9X-ksQ.js} +1 -1
- package/dist/worker/console/static/assets/{chunk-XXDRQBXY-B3t6cycg.js → chunk-XXDRQBXY-DC0xXfHy.js} +1 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-DyesHbs5.js +1 -0
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-DyesHbs5.js +1 -0
- package/dist/worker/console/static/assets/cose-bilkent-JH36ORCC-C_EVg5l9.js +1 -0
- package/dist/worker/console/static/assets/{cynefin-VYW2F7L2-CP8LtrOl.js → cynefin-VYW2F7L2-BIFL8KrA.js} +1 -1
- package/dist/worker/console/static/assets/cynefinDiagram-MW4NZA55-DjtUYOlE.js +62 -0
- package/dist/worker/console/static/assets/{dagre-VZM6K2ZE-BK0ua9V8.js → dagre-VZM6K2ZE-D2aN2V9t.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-7IWD3JNH-t9-HP13j.js → diagram-7IWD3JNH-D_twhmFi.js} +1 -1
- package/dist/worker/console/static/assets/{diagram-B4RE2ZJO-L5Sg9jMD.js → diagram-B4RE2ZJO-ChzncqLV.js} +1 -1
- package/dist/worker/console/static/assets/diagram-LBJQPF4R-B6LO-bF2.js +24 -0
- package/dist/worker/console/static/assets/diagram-Q27KOJAE-GrzM7AFc.js +24 -0
- package/dist/worker/console/static/assets/diagram-UB23O5K3-Bv-lntaq.js +41 -0
- package/dist/worker/console/static/assets/docx-preview-CAbT0VNs.js +23 -0
- package/dist/worker/console/static/assets/docxPreview-D_T4B7qe.js +1 -0
- package/dist/worker/console/static/assets/ebnfDiagram-BXEA7PRR-BvD2jkO_.js +1 -0
- package/dist/worker/console/static/assets/{erDiagram-JOGREHBK-CNOuj3BO.js → erDiagram-JOGREHBK-BirPCcmA.js} +1 -1
- package/dist/worker/console/static/assets/{flowDiagram-UKHOOZJN-h_Cyayai.js → flowDiagram-UKHOOZJN-Chu1YnGQ.js} +1 -1
- package/dist/worker/console/static/assets/ganttDiagram-PKOTCBZU-Djn17xhB.js +292 -0
- package/dist/worker/console/static/assets/gitGraphDiagram-DS77QQ5N-Bx1qbGHx.js +106 -0
- package/dist/worker/console/static/assets/infoDiagram-6WML65LV-D-TLMqmb.js +2 -0
- package/dist/worker/console/static/assets/{ishikawaDiagram-WSZJBQD7-DAdf5lHp.js → ishikawaDiagram-WSZJBQD7-DbJoh-6T.js} +1 -1
- package/dist/worker/console/static/assets/{journeyDiagram-NVQOT4AX-BQbGtg66.js → journeyDiagram-NVQOT4AX-DsyokZ6e.js} +1 -1
- package/dist/worker/console/static/assets/{kanban-definition-27J2QSJJ-CetLubYc.js → kanban-definition-27J2QSJJ-DlzXTxic.js} +1 -1
- package/dist/worker/console/static/assets/{linear-DLZOjaVz.js → linear-ClnZn3vw.js} +1 -1
- package/dist/worker/console/static/assets/main-D-ZQ4gLb.css +1 -0
- package/dist/worker/console/static/assets/main-fc3P1HID.js +645 -0
- package/dist/worker/console/static/assets/{mermaid.core-B_xZl_gM.js → mermaid.core-DqSlcvbf.js} +5 -5
- package/dist/worker/console/static/assets/{mindmap-definition-FAOFIHXS-Dzo3dzp0.js → mindmap-definition-FAOFIHXS-CSFbzpiX.js} +1 -1
- package/dist/worker/console/static/assets/pegDiagram-VL7TDLO6-DK80yQqe.js +1 -0
- package/dist/worker/console/static/assets/{pieDiagram-7S7Q4E2Y-Cp3YrVzQ.js → pieDiagram-7S7Q4E2Y-DWX7SFGb.js} +1 -1
- package/dist/worker/console/static/assets/{quadrantDiagram-CIZ2JOQS-4tI5mUgW.js → quadrantDiagram-CIZ2JOQS-BEPPhtXs.js} +1 -1
- package/dist/worker/console/static/assets/railroadDiagram-AXF67PYL-Ck_s6fQn.js +1 -0
- package/dist/worker/console/static/assets/{requirementDiagram-LRYGKXZP-DY-0JqdT.js → requirementDiagram-LRYGKXZP-CYig27Rj.js} +1 -1
- package/dist/worker/console/static/assets/{sankeyDiagram-W5VNT64P-DuJIzRKC.js → sankeyDiagram-W5VNT64P-u-0aSx5s.js} +1 -1
- package/dist/worker/console/static/assets/{sequenceDiagram-SI44F4Z6-BTbVJ85l.js → sequenceDiagram-SI44F4Z6-NsEJI9sM.js} +1 -1
- package/dist/worker/console/static/assets/{sheet-workbook-BPPh1uLw.js → sheet-workbook-kZ_HK4Sg.js} +2 -2
- package/dist/worker/console/static/assets/sizeCapture-X5ZJPWSS-8vneVM5U.js +1 -0
- package/dist/worker/console/static/assets/stateDiagram-OKZ733FA-CMIobUBh.js +1 -0
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-Bd0pHHKP.js +1 -0
- package/dist/worker/console/static/assets/swimlanes-SLNWSIFB-D4Qzt6ug.js +2 -0
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-BzmSZnl_.js +8 -0
- package/dist/worker/console/static/assets/{timeline-definition-Z64GVDOM-GR6lxokn.js → timeline-definition-Z64GVDOM-DMb1LpED.js} +1 -1
- package/dist/worker/console/static/assets/{vennDiagram-T6HMQDX7-DEkwyzsF.js → vennDiagram-T6HMQDX7-C_9eFOs3.js} +1 -1
- package/dist/worker/console/static/assets/{wardleyDiagram-T6FBY63Y-W5jnvEJ3.js → wardleyDiagram-T6FBY63Y-DJYMe3uT.js} +1 -1
- package/dist/worker/console/static/assets/{xychartDiagram-ELKLHX3M-cqsloioo.js → xychartDiagram-ELKLHX3M-Cv_1Mi3u.js} +1 -1
- package/dist/worker/console/static/docx-preview.html +25 -0
- package/dist/worker/console/static/index.html +3 -2
- package/dist/worker/console/static/vcp/fonts/README.md +28 -0
- package/dist/worker/console/static/vcp/vendor/vcp-engine-v1.js +4 -4
- package/dist/worker/console/static-src/operator-chat/StateDot.js +17 -0
- package/dist/worker/console/static-src/operator-chat/changed-file-diff.js +15 -0
- package/dist/worker/console/static-src/operator-chat/chat-font-size.js +90 -0
- package/dist/worker/console/static-src/operator-chat/chat-session-order.js +96 -0
- package/dist/worker/console/static-src/operator-chat/chat-sse-events.js +8 -1
- package/dist/worker/console/static-src/operator-chat/compaction-message.js +4 -0
- package/dist/worker/console/static-src/operator-chat/details-rail-surfaces.js +2 -0
- package/dist/worker/console/static-src/operator-chat/file-touch.js +107 -0
- package/dist/worker/console/static-src/operator-chat/format-file-size.js +26 -0
- package/dist/worker/console/static-src/operator-chat/open-preview-in-browser.js +44 -0
- package/dist/worker/console/static-src/operator-chat/reference-display.js +7 -1
- package/dist/worker/console/static-src/operator-chat/tasks-auto-open.js +100 -0
- package/dist/worker/console/static-src/operator-chat/tasks-layout-tween.js +103 -0
- package/dist/worker/console/static-src/operator-chat/tasks-model.js +657 -0
- package/dist/worker/console/static-src/operator-chat/tasks-view-glide.js +96 -0
- package/dist/worker/console/static-src/operator-chat/turn-group-equality.js +1 -0
- package/dist/worker/console/static-src/operator-chat/use-auto-animate.js +61 -0
- package/dist/worker/console/static-src/operator-chat/useChatSessions.js +194 -47
- package/dist/worker/console/static-src/operator-chat/useChatStream.js +4 -0
- package/dist/worker/console/static-src/operator-chat/useChatThread.js +18 -0
- package/dist/worker/console/static-src/operator-chat/useRepoBrowser.js +111 -21
- package/dist/worker/console/static-src/operator-chat/useRuntimeControls.js +91 -47
- package/dist/worker/console/static-src/operator-chat/useVcpPreferences.js +1 -1
- package/dist/worker/console/static-src/operator-chat/user-turn-anchors-merge.js +50 -0
- package/dist/worker/console/static-src/operator-chat/vcp-fonts.js +180 -22
- package/dist/worker/console/static-src/operator-chat/vcp-frame.js +3 -3
- package/dist/worker/console/static-src/shell/console-update-progress.js +16 -0
- package/dist/worker/console/static-src/shell/console-update-reload.js +4 -1
- package/dist/worker/console/static-src/shell/workspace-route.js +0 -2
- package/dist/worker/console/vite.config.js +5 -1
- package/dist/worker/console/workspace-registry.js +62 -19
- package/dist/worker/observe/static/operator-chrome.js +0 -1
- package/dist/worker/scheduler/git-base.js +3 -0
- package/dist/worker/scheduler/night-git-finalizer.js +1 -1
- package/dist/worker/scheduler/night-harvest.js +1 -1
- package/dist/worker/scheduler/prepared-attempt-recovery.js +1 -1
- package/dist/worker/scheduler/scheduled-goal-evidence.js +1 -1
- package/dist/workflows/dag/backend-test-scenario-param.js +60 -4
- package/dist/workflows/dag/dynamic-runtime/reduction.js +7 -2
- package/dist/workflows/dag/frontend-test-framework-adapters.js +11 -2
- package/dist/workflows/script/windows/guest.js +13 -2
- package/dist/workflows/script/windows/native.js +21 -3
- package/docs/architecture/dag-execution.md +2 -13
- package/docs/architecture/facts-and-state.md +2 -3
- package/docs/architecture/runtime-boundaries.md +2 -2
- package/package.json +9 -7
- package/resource-catalog.v1.json +6 -6
- package/scripts/patch-pi-sdk-windows-hide.mjs +3 -3
- package/skills/loop-agent/references/command-reference.md +2 -41
- package/skills/loop-agent/references/harness-policy.md +3 -30
- package/skills/loop-agent/references/long-running-loop.md +6 -54
- package/dist/application/loop/run-action.js +0 -19
- package/dist/commands/dag-workflow-compile.js +0 -93
- package/dist/commands/dag-workflow-plan.js +0 -132
- package/dist/commands/dag-workflow-validate.js +0 -68
- package/dist/commands/loop-benchmark.js +0 -74
- package/dist/commands/loop.js +0 -251
- package/dist/commands/workflow.js +0 -259
- package/dist/infrastructure/harness/loop-store.js +0 -41
- package/dist/worker/console/static/assets/abnfDiagram-N423BO3Z-FQePHM07.js +0 -1
- package/dist/worker/console/static/assets/architectureDiagram-T3A2C74G-p_mwm8cd.js +0 -36
- package/dist/worker/console/static/assets/channel-CIBAg8WF.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-JCYQIIEL-B4xQrSmv.js +0 -1
- package/dist/worker/console/static/assets/classDiagram-v2-OCEON4UE-B4xQrSmv.js +0 -1
- package/dist/worker/console/static/assets/cose-bilkent-JH36ORCC-BPXf8ZYr.js +0 -1
- package/dist/worker/console/static/assets/cynefinDiagram-MW4NZA55-CNsL9N2-.js +0 -62
- package/dist/worker/console/static/assets/diagram-LBJQPF4R-BipWFRgs.js +0 -24
- package/dist/worker/console/static/assets/diagram-Q27KOJAE-T2p4xa38.js +0 -24
- package/dist/worker/console/static/assets/diagram-UB23O5K3-CVwz6LVu.js +0 -41
- package/dist/worker/console/static/assets/ebnfDiagram-BXEA7PRR-CybQrGSA.js +0 -1
- package/dist/worker/console/static/assets/ganttDiagram-PKOTCBZU-D411_55h.js +0 -292
- package/dist/worker/console/static/assets/gitGraphDiagram-DS77QQ5N-DpVtzs9z.js +0 -106
- package/dist/worker/console/static/assets/index-B7cwOTL9.js +0 -649
- package/dist/worker/console/static/assets/index-CATbSkPc.css +0 -1
- package/dist/worker/console/static/assets/infoDiagram-6WML65LV-D74Uvx6K.js +0 -2
- package/dist/worker/console/static/assets/pegDiagram-VL7TDLO6-CSwoBOpM.js +0 -1
- package/dist/worker/console/static/assets/railroadDiagram-AXF67PYL-n0Mt3Yia.js +0 -1
- package/dist/worker/console/static/assets/sizeCapture-X5ZJPWSS-Dmf1pC7B.js +0 -1
- package/dist/worker/console/static/assets/stateDiagram-OKZ733FA-4-jdPUHD.js +0 -1
- package/dist/worker/console/static/assets/stateDiagram-v2-UEYNNEHI-DojWfYnC.js +0 -1
- package/dist/worker/console/static/assets/swimlanes-SLNWSIFB-DNhjjaAU.js +0 -2
- package/dist/worker/console/static/assets/swimlanesDiagram-ULZ7WXOC-CJo4AKWH.js +0 -8
- package/dist/worker/console/static/vcp/fonts/Lanxi-/345/217/257/345/256/213.woff2 +0 -0
- package/dist/worker/console/static/vcp/fonts/Lanxi-/346/234/227/345/256/213.woff2 +0 -0
- package/dist/worker/console/static/vcp/fonts/Lanxi-/350/266/205/347/262/227/351/273/221.woff2 +0 -0
- package/dist/workflows/dynamic/compile.js +0 -371
- package/dist/workflows/dynamic/compileTypes.js +0 -1
- package/dist/workflows/dynamic/errors.js +0 -5
- package/dist/workflows/dynamic/profiles.js +0 -156
- package/dist/workflows/dynamic/spec.js +0 -115
- package/dist/workflows/dynamic/validate.js +0 -275
- package/dist/workflows/loop/actions/dag-action.js +0 -129
- package/dist/workflows/loop/actions/pi-review.js +0 -267
- package/dist/workflows/loop/actions/shared.js +0 -157
- package/dist/workflows/loop/actions/shell-verify.js +0 -82
- package/dist/workflows/loop/actions/types.js +0 -1
- package/dist/workflows/loop/actions/workflow-action.js +0 -255
- package/dist/workflows/loop/actions.js +0 -160
- package/dist/workflows/loop/benchmark.js +0 -513
- package/dist/workflows/loop/closeout.js +0 -135
- package/dist/workflows/loop/context.js +0 -47
- package/dist/workflows/loop/events.js +0 -26
- package/dist/workflows/loop/hash.js +0 -32
- package/dist/workflows/loop/index.js +0 -8
- package/dist/workflows/loop/paths.js +0 -17
- package/dist/workflows/loop/policy/auto-policy.js +0 -112
- package/dist/workflows/loop/policy/path-patterns.js +0 -13
- package/dist/workflows/loop/rounds.js +0 -81
- package/dist/workflows/loop/signals.js +0 -52
- package/dist/workflows/loop/state.js +0 -116
- package/dist/workflows/loop/templates.js +0 -54
- package/dist/workflows/loop/types.js +0 -28
- /package/dist/workflows/{dynamic/artifacts.js → dag/dynamic-runtime/reduction-artifacts.js} +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -4,34 +4,113 @@
|
|
|
4
4
|
|
|
5
5
|
## [Unreleased]
|
|
6
6
|
|
|
7
|
+
### 重点更新
|
|
8
|
+
|
|
9
|
+
- 移除了旧的 JSON 工作流命令:`dag workflow-plan`、`dag workflow-validate`、`dag workflow-compile`、`workflow save|run|diff|replay`。
|
|
10
|
+
- 编写脚本工作流改用 JavaScript,任务执行仍在 DAG 里进行。
|
|
11
|
+
- 移除了任务级 `loop` 与 `loop-benchmark` 命令。持续目标改在对话里用 `/goal` 推进,不再使用单独的 loop 状态。
|
|
12
|
+
|
|
7
13
|
### 改进
|
|
8
14
|
|
|
9
|
-
-
|
|
10
|
-
-
|
|
11
|
-
-
|
|
12
|
-
-
|
|
13
|
-
-
|
|
14
|
-
-
|
|
15
|
-
-
|
|
16
|
-
-
|
|
17
|
-
-
|
|
15
|
+
- Console 更新为较慢的依赖安装预留更多时间,失败后区分原因并提供明确重试入口;修复进度一直停在 0% 的问题,并按更新阶段显示百分比与用时。有对话、DAG 或 Worker 正在执行时,可确认中断风险后继续更新。
|
|
16
|
+
- 对话详情在历史无新事件时优先复用投影检查点,长对话二次打开和切换更迅速。
|
|
17
|
+
- 重命名或归档会话立即在列表中生效,不再因后台网络刷新延迟而闪烁旧标题。
|
|
18
|
+
- 工作区切换和首次加载文件目录时复用本地缓存并合并并发请求,浏览和选择项目更快。
|
|
19
|
+
- 新建对话后模型栏和上下文概览立即显示,不再等待插件加载完成,点开后可以直接输入。
|
|
20
|
+
- 右侧栏任务管理可按树状或拓扑图查看子代理,拓扑图的连线从主会话卡片底部成扇形连到各子代理,穿过卡片的部分由卡片遮挡,不再有线条挤在列间缝隙里。
|
|
21
|
+
- 任务管理底部的后台任务列表改为单行显示,每行依次是状态点、终端类型、任务名、状态和耗时;运行中的任务显示数量并用强调色标出。
|
|
22
|
+
- 点击后台任务会打开可拖动、可缩放的输出窗口,按终端配色显示完整输出,可复制、跟随最新输出,运行中的任务还能在窗口内终止;窗口可随时关闭。
|
|
23
|
+
- 子代理详情改为顶部概览、可滚动正文和底部输入三段式,连续调用的同类工具折叠显示,长内容可以上下滚动。
|
|
24
|
+
- 子代理运行中可以停止,第一次点击变为「确认停止」,三秒内再次点击才真正停止,避免误触。
|
|
25
|
+
- 会话中出现子代理时右侧栏自动打开任务管理;已经打开的侧栏不会被接管,窗口宽度小于 768 像素时不会自动打开。设置中新增「侧边栏」分区可以分别关闭这些行为。
|
|
26
|
+
- 对话正文和右侧栏的字号统一为一套层级,正文不再比代码更大;文件路径按等宽字体显示,鼠标移上去才高亮。
|
|
27
|
+
- 右侧栏打开的文件在模型改动后会显示最新内容;预览顶部新增重新读取按钮,用外部工具改完文件也能立刻看到。
|
|
28
|
+
- 会话的调用记录不再固定占用一个标签页,需要时可在洞察页点「查看调用记录」打开。
|
|
29
|
+
- 顶层回复完成后展示已编辑文件汇总卡片,并可直接在右侧栏定位和预览改动。
|
|
30
|
+
- 侧边栏的文件预览现在能直接打开 Word 文档(`.docx`),按页显示正文、标题、表格、图片、页眉页脚和脚注。打开后在预览里划词选中一段文字,就能像引用源码和表格那样把它连同评论一起引用到对话里。旧版 `.doc` 格式仍不在支持范围。
|
|
31
|
+
- 视觉卡片不再使用超粗的展示字体。标题与数据默认改用系统字体,字重限制在常规与半粗之间,之前那种糊成一团的黑字不会再出现。
|
|
32
|
+
- 视觉卡片可以按需选用系统宋体、楷体和等宽字体,macOS 与 Windows 都能直接显示,不必再为不同系统分别指定字体。
|
|
33
|
+
- 视觉卡片的字体文件从 5 个减到 3 个,随包体积减少约 4.5 MB;移除的字体不再随安装包下载。
|
|
34
|
+
- 在 macOS 上选择工作区目录时,可以在对话框的「前往文件夹」「搜索」「标签」输入框里粘贴、全选和使用撤销,之前这些框无法粘贴路径。
|
|
18
35
|
|
|
19
36
|
### 修复
|
|
20
37
|
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
38
|
+
- 修复继续之前的对话后,本次会话按需加载的工具(例如脚本工具和工具搜索)会丢失、需要重新启用的问题。
|
|
39
|
+
- 修复未安装 Python 时,检查后端代码的测试参数无法自动改对的问题。
|
|
40
|
+
- 修复会话列表因历史遗留的已删除工作区而变慢的问题,打开和刷新列表更快。
|
|
41
|
+
- 修复任务管理把已收起的子代理仍然画在图上,导致聚合卡片和成员卡片同时出现、连线交叉杂乱的问题。
|
|
42
|
+
- 修复点击子代理详情后跳到仓库文件页而不是子代理内容的问题。
|
|
43
|
+
- 修复自建网关在模型声明的上下文窗口之下就拒绝请求时,压缩始终不触发、长对话只能退回本地摘要的问题。设置里可调整「触发窗口比例」与「额外余量」,换用其他窗口大小的模型同样适用。
|
|
44
|
+
- 修复压缩时网关连摘要请求一起拒绝后界面没有任何说明的问题;现在消息流会说明这次用的是本地摘要以及原因。
|
|
45
|
+
- 无法请求模型摘要时的本地兜底摘要保留更多内容:范围更大的近期对话、更长的上一轮摘要,待办列表不再挤占目标与文件清单的空间;中文对话拿到的篇幅与英文一致。
|
|
46
|
+
- 修复轨迹面板显示大量「模型步骤完成」这类空行的问题。
|
|
47
|
+
- 修复会话列表在后台刷新时顺序跳动的问题;设置里可以把当前顺序固定下来。
|
|
48
|
+
- 修复只有最新一轮对话可以分叉的问题;现在每个已结束的轮次都能分叉。
|
|
49
|
+
- 修复终端输出窗口丢失命令首行的问题。
|
|
50
|
+
- 修复扩展自带的界面主题不生效的问题。
|
|
51
|
+
- 修复向上翻阅历史后发送消息,看不到自己刚发内容的问题;现在发送后自动回到底部。
|
|
52
|
+
- 修复每轮用量里缓存命中率可能算错的问题;缓存写入部分现在计入分母,部分命中不会显示成 100%。
|
|
53
|
+
- 修复 PDF、压缩包等非图片附件显示成「图片加载失败」的问题;现在按文件卡片显示名称与大小。
|
|
54
|
+
- 修复思考过程中手动收起后又被自动展开的问题;收起状态不再被流式输出打断。
|
|
55
|
+
- 修复模型返回无法识别的新内容块时聊天流里完全看不到的问题;现在会显示可展开的原始内容。
|
|
56
|
+
- 系统级条目不再显示成模型的回答。
|
|
57
|
+
|
|
58
|
+
## [0.52.0-next.11] - 2026-10-23
|
|
24
59
|
|
|
25
|
-
|
|
26
|
-
- 修复浏览器工具在元素引用过期时未提供恢复线索的问题;现在会返回当前可用快照与具体失效原因,避免调用方盲目重试。
|
|
27
|
-
- 修复因上游依赖包导出变更导致后台服务启动时偶发崩溃的问题。
|
|
28
|
-
- 修复前端任务因验证职责误判、并行检查重名、已有测试命令未识别、工具依赖过多或计划文件过大而无法继续的问题。重试会复用已完成步骤并保留完整计划读取材料,无效入口路径可在检查时修正。
|
|
29
|
-
- 初始化更新会保留有效的项目调度配置,不再因此反复要求合并配置文件。
|
|
30
|
-
- 需求检查失败时保留逐条判定和审核理由,并准确区分未解决条款与背景说明,便于定位阻塞原因。
|
|
60
|
+
本预发布快照记录构建时已整理的待发布变化,不表示相对上一构建全部新增。
|
|
31
61
|
|
|
32
|
-
|
|
62
|
+
### 重点更新
|
|
33
63
|
|
|
34
|
-
|
|
64
|
+
- 移除了旧的 JSON 工作流命令:`dag workflow-plan`、`dag workflow-validate`、`dag workflow-compile`、`workflow save|run|diff|replay`。
|
|
65
|
+
- 编写脚本工作流改用 JavaScript,任务执行仍在 DAG 里进行。
|
|
66
|
+
- 移除了任务级 `loop` 与 `loop-benchmark` 命令。持续目标改在对话里用 `/goal` 推进,不再使用单独的 loop 状态。
|
|
67
|
+
|
|
68
|
+
### 改进
|
|
69
|
+
|
|
70
|
+
- Console 更新为较慢的依赖安装预留更多时间,失败后区分原因并提供明确重试入口;修复进度一直停在 0% 的问题,并按更新阶段显示百分比与用时。有对话、DAG 或 Worker 正在执行时,可确认中断风险后继续更新。
|
|
71
|
+
- 对话详情在历史无新事件时优先复用投影检查点,长对话二次打开和切换更迅速。
|
|
72
|
+
- 重命名或归档会话立即在列表中生效,不再因后台网络刷新延迟而闪烁旧标题。
|
|
73
|
+
- 工作区切换和首次加载文件目录时复用本地缓存并合并并发请求,浏览和选择项目更快。
|
|
74
|
+
- 新建对话后模型栏和上下文概览立即显示,不再等待插件加载完成,点开后可以直接输入。
|
|
75
|
+
- 右侧栏任务管理可按树状或拓扑图查看子代理,拓扑图的连线从主会话卡片底部成扇形连到各子代理,穿过卡片的部分由卡片遮挡,不再有线条挤在列间缝隙里。
|
|
76
|
+
- 任务管理底部的后台任务列表改为单行显示,每行依次是状态点、终端类型、任务名、状态和耗时;运行中的任务显示数量并用强调色标出。
|
|
77
|
+
- 点击后台任务会打开可拖动、可缩放的输出窗口,按终端配色显示完整输出,可复制、跟随最新输出,运行中的任务还能在窗口内终止;窗口可随时关闭。
|
|
78
|
+
- 子代理详情改为顶部概览、可滚动正文和底部输入三段式,连续调用的同类工具折叠显示,长内容可以上下滚动。
|
|
79
|
+
- 子代理运行中可以停止,第一次点击变为「确认停止」,三秒内再次点击才真正停止,避免误触。
|
|
80
|
+
- 会话中出现子代理时右侧栏自动打开任务管理;已经打开的侧栏不会被接管,窗口宽度小于 768 像素时不会自动打开。设置中新增「侧边栏」分区可以分别关闭这些行为。
|
|
81
|
+
- 对话正文和右侧栏的字号统一为一套层级,正文不再比代码更大;文件路径按等宽字体显示,鼠标移上去才高亮。
|
|
82
|
+
- 右侧栏打开的文件在模型改动后会显示最新内容;预览顶部新增重新读取按钮,用外部工具改完文件也能立刻看到。
|
|
83
|
+
- 会话的调用记录不再固定占用一个标签页,需要时可在洞察页点「查看调用记录」打开。
|
|
84
|
+
- 顶层回复完成后展示已编辑文件汇总卡片,并可直接在右侧栏定位和预览改动。
|
|
85
|
+
- 侧边栏的文件预览现在能直接打开 Word 文档(`.docx`),按页显示正文、标题、表格、图片、页眉页脚和脚注。打开后在预览里划词选中一段文字,就能像引用源码和表格那样把它连同评论一起引用到对话里。旧版 `.doc` 格式仍不在支持范围。
|
|
86
|
+
- 视觉卡片不再使用超粗的展示字体。标题与数据默认改用系统字体,字重限制在常规与半粗之间,之前那种糊成一团的黑字不会再出现。
|
|
87
|
+
- 视觉卡片可以按需选用系统宋体、楷体和等宽字体,macOS 与 Windows 都能直接显示,不必再为不同系统分别指定字体。
|
|
88
|
+
- 视觉卡片的字体文件从 5 个减到 3 个,随包体积减少约 4.5 MB;移除的字体不再随安装包下载。
|
|
89
|
+
- 在 macOS 上选择工作区目录时,可以在对话框的「前往文件夹」「搜索」「标签」输入框里粘贴、全选和使用撤销,之前这些框无法粘贴路径。
|
|
90
|
+
|
|
91
|
+
### 修复
|
|
92
|
+
|
|
93
|
+
- 修复继续之前的对话后,本次会话按需加载的工具(例如脚本工具和工具搜索)会丢失、需要重新启用的问题。
|
|
94
|
+
- 修复未安装 Python 时,检查后端代码的测试参数无法自动改对的问题。
|
|
95
|
+
- 修复会话列表因历史遗留的已删除工作区而变慢的问题,打开和刷新列表更快。
|
|
96
|
+
- 修复任务管理把已收起的子代理仍然画在图上,导致聚合卡片和成员卡片同时出现、连线交叉杂乱的问题。
|
|
97
|
+
- 修复点击子代理详情后跳到仓库文件页而不是子代理内容的问题。
|
|
98
|
+
- 修复自建网关在模型声明的上下文窗口之下就拒绝请求时,压缩始终不触发、长对话只能退回本地摘要的问题。设置里可调整「触发窗口比例」与「额外余量」,换用其他窗口大小的模型同样适用。
|
|
99
|
+
- 修复压缩时网关连摘要请求一起拒绝后界面没有任何说明的问题;现在消息流会说明这次用的是本地摘要以及原因。
|
|
100
|
+
- 无法请求模型摘要时的本地兜底摘要保留更多内容:范围更大的近期对话、更长的上一轮摘要,待办列表不再挤占目标与文件清单的空间;中文对话拿到的篇幅与英文一致。
|
|
101
|
+
- 修复轨迹面板显示大量「模型步骤完成」这类空行的问题。
|
|
102
|
+
- 修复会话列表在后台刷新时顺序跳动的问题;设置里可以把当前顺序固定下来。
|
|
103
|
+
- 修复只有最新一轮对话可以分叉的问题;现在每个已结束的轮次都能分叉。
|
|
104
|
+
- 修复终端输出窗口丢失命令首行的问题。
|
|
105
|
+
- 修复扩展自带的界面主题不生效的问题。
|
|
106
|
+
- 修复向上翻阅历史后发送消息,看不到自己刚发内容的问题;现在发送后自动回到底部。
|
|
107
|
+
- 修复每轮用量里缓存命中率可能算错的问题;缓存写入部分现在计入分母,部分命中不会显示成 100%。
|
|
108
|
+
- 修复 PDF、压缩包等非图片附件显示成「图片加载失败」的问题;现在按文件卡片显示名称与大小。
|
|
109
|
+
- 修复思考过程中手动收起后又被自动展开的问题;收起状态不再被流式输出打断。
|
|
110
|
+
- 修复模型返回无法识别的新内容块时聊天流里完全看不到的问题;现在会显示可展开的原始内容。
|
|
111
|
+
- 系统级条目不再显示成模型的回答。
|
|
112
|
+
|
|
113
|
+
## [0.51.0] - 2026-10-17
|
|
35
114
|
|
|
36
115
|
### 改进
|
|
37
116
|
|
|
@@ -50,7 +129,6 @@
|
|
|
50
129
|
- 修复较长文件读取和搜索结果在上下文整理后丢失原文的问题;普通日志仍可压缩,精确文件修改会保留必要源码。
|
|
51
130
|
- 修复 provider 拒绝过大上下文时重复发送完整摘要请求的问题;现在优先使用 provider 摘要,超限时改用本地 checkpoint 继续恢复。
|
|
52
131
|
- 手动压缩不再因为保留窗口过大而拒绝已有少量历史的会话。
|
|
53
|
-
|
|
54
132
|
- 修复切换对话后停在顶部或回复中间的问题,默认显示最新助手回复末尾;主动上翻后,调整窗口宽度仍保留阅读位置。
|
|
55
133
|
- 修复浏览器工具在元素引用过期时未提供恢复线索的问题;现在会返回当前可用快照与具体失效原因,避免调用方盲目重试。
|
|
56
134
|
- 修复因上游依赖包导出变更导致后台服务启动时偶发崩溃的问题。
|
package/dist/build-stamp.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"schemaVersion": 1,
|
|
3
|
-
"version": "0.52.0-next.
|
|
4
|
-
"gitSha": "
|
|
5
|
-
"builtAt": "2026-10-
|
|
3
|
+
"version": "0.52.0-next.11",
|
|
4
|
+
"gitSha": "a5feda7f8d7ae0ce31d4a983d1824e98268d09e6",
|
|
5
|
+
"builtAt": "2026-10-23T08:10:44.940Z"
|
|
6
6
|
}
|
|
@@ -29,9 +29,6 @@ import { readInitRuntimeActivity } from "./update/runtime-activity.js";
|
|
|
29
29
|
import { runRunDag } from "../commands/run-dag.js";
|
|
30
30
|
import { runDagInitHybrid } from "../commands/dag-init-hybrid.js";
|
|
31
31
|
import { runDagValidate } from "../commands/dag-validate.js";
|
|
32
|
-
import { runDagWorkflowValidate } from "../commands/dag-workflow-validate.js";
|
|
33
|
-
import { runDagWorkflowCompile } from "../commands/dag-workflow-compile.js";
|
|
34
|
-
import { runDagWorkflowPlan } from "../commands/dag-workflow-plan.js";
|
|
35
32
|
import { runDagApprove } from "../commands/dag-approve.js";
|
|
36
33
|
import { runDagArtifact } from "../commands/dag-artifact.js";
|
|
37
34
|
import { runDagReject } from "../commands/dag-reject.js";
|
|
@@ -48,11 +45,8 @@ import { runDagCloseoutDraft, runDagReport } from "../commands/dag-report.js";
|
|
|
48
45
|
import { runDagFinalVerification } from "../commands/dag-final-verification.js";
|
|
49
46
|
import { runDagContext } from "../commands/dag-context.js";
|
|
50
47
|
import { runKnowledge } from "../commands/knowledge.js";
|
|
51
|
-
import { runLoopBenchmark } from "../commands/loop-benchmark.js";
|
|
52
48
|
import { runPiReuseBenchmark } from "../commands/pi-reuse-benchmark.js";
|
|
53
49
|
import { runGoal } from "../commands/goal.js";
|
|
54
|
-
import { runLoop } from "../commands/loop.js";
|
|
55
|
-
import { runWorkflowCommand } from "../commands/workflow.js";
|
|
56
50
|
import { runReferenceIndex } from "../commands/reference-index.js";
|
|
57
51
|
import { runStudyInit } from "../commands/study-init.js";
|
|
58
52
|
export function formatSubcommandUsage(name, subcommands) {
|
|
@@ -129,9 +123,6 @@ const DAG_SUBCOMMANDS = [
|
|
|
129
123
|
"init-hybrid",
|
|
130
124
|
"execute",
|
|
131
125
|
"validate",
|
|
132
|
-
"workflow-plan",
|
|
133
|
-
"workflow-validate",
|
|
134
|
-
"workflow-compile",
|
|
135
126
|
"approve",
|
|
136
127
|
"reject",
|
|
137
128
|
"resume",
|
|
@@ -152,23 +143,6 @@ const DAG_SUBCOMMANDS = [
|
|
|
152
143
|
];
|
|
153
144
|
const TASK_SUBCOMMANDS = ["advance", "status", "source"];
|
|
154
145
|
const OPERATOR_SUBCOMMANDS = ["capabilities", "guide"];
|
|
155
|
-
const WORKFLOW_SUBCOMMANDS = [
|
|
156
|
-
"list",
|
|
157
|
-
"inspect",
|
|
158
|
-
"save",
|
|
159
|
-
"run",
|
|
160
|
-
"diff",
|
|
161
|
-
"replay",
|
|
162
|
-
];
|
|
163
|
-
const WORKFLOW_USAGE = "workflow <list|inspect|save|run|diff|replay> [name] [options]";
|
|
164
|
-
const LOOP_SUBCOMMANDS = [
|
|
165
|
-
"init",
|
|
166
|
-
"status",
|
|
167
|
-
"run",
|
|
168
|
-
"record-round",
|
|
169
|
-
"add-signal",
|
|
170
|
-
"closeout",
|
|
171
|
-
];
|
|
172
146
|
/** Order remains stable for compatibility; tiers provide the selection signal. */
|
|
173
147
|
export const COMMAND_DEFINITIONS = [
|
|
174
148
|
{
|
|
@@ -524,7 +498,7 @@ export const COMMAND_DEFINITIONS = [
|
|
|
524
498
|
name: "dag",
|
|
525
499
|
adapter: "required",
|
|
526
500
|
tier: "primary",
|
|
527
|
-
intent: "Generate, validate, inspect, recover, close out Agent DAG runs
|
|
501
|
+
intent: "Generate, validate, inspect, recover, and close out Agent DAG runs.",
|
|
528
502
|
usage: formatSubcommandUsage("dag", DAG_SUBCOMMANDS),
|
|
529
503
|
subcommands: [...DAG_SUBCOMMANDS],
|
|
530
504
|
handler: async ({ repoRoot, subcommand, rest }) => {
|
|
@@ -538,21 +512,6 @@ export const COMMAND_DEFINITIONS = [
|
|
|
538
512
|
await runDagValidate(repoRoot, validateArgs);
|
|
539
513
|
return;
|
|
540
514
|
}
|
|
541
|
-
if (subcommand === "workflow-validate") {
|
|
542
|
-
const validateArgs = rest.filter((arg) => Boolean(arg));
|
|
543
|
-
await runDagWorkflowValidate(repoRoot, validateArgs);
|
|
544
|
-
return;
|
|
545
|
-
}
|
|
546
|
-
if (subcommand === "workflow-plan") {
|
|
547
|
-
const planArgs = rest.filter((arg) => Boolean(arg));
|
|
548
|
-
await runDagWorkflowPlan(repoRoot, planArgs);
|
|
549
|
-
return;
|
|
550
|
-
}
|
|
551
|
-
if (subcommand === "workflow-compile") {
|
|
552
|
-
const compileArgs = rest.filter((arg) => Boolean(arg));
|
|
553
|
-
await runDagWorkflowCompile(repoRoot, compileArgs);
|
|
554
|
-
return;
|
|
555
|
-
}
|
|
556
515
|
if (subcommand === "approve") {
|
|
557
516
|
const approveArgs = rest.filter((arg) => Boolean(arg));
|
|
558
517
|
await runDagApprove(repoRoot, approveArgs);
|
|
@@ -654,28 +613,6 @@ export const COMMAND_DEFINITIONS = [
|
|
|
654
613
|
throw new Error(formatSubcommandUsageError("dag", DAG_SUBCOMMANDS));
|
|
655
614
|
},
|
|
656
615
|
},
|
|
657
|
-
{
|
|
658
|
-
name: "workflow",
|
|
659
|
-
adapter: "required",
|
|
660
|
-
tier: "experimental",
|
|
661
|
-
intent: "List, save, inspect, run, diff, and replay saved dynamic workflows.",
|
|
662
|
-
usage: WORKFLOW_USAGE,
|
|
663
|
-
subcommands: [...WORKFLOW_SUBCOMMANDS],
|
|
664
|
-
handler: async ({ repoRoot, subcommand, rest }) => {
|
|
665
|
-
await runWorkflowCommand(repoRoot, [subcommand, ...rest].filter((arg) => Boolean(arg)));
|
|
666
|
-
},
|
|
667
|
-
},
|
|
668
|
-
{
|
|
669
|
-
name: "loop",
|
|
670
|
-
adapter: "required",
|
|
671
|
-
tier: "experimental",
|
|
672
|
-
intent: "Manage durable long-running task loop state above Agent DAG rounds.",
|
|
673
|
-
usage: "loop <init|status|run|record-round|add-signal|closeout> <task-id> [options]",
|
|
674
|
-
subcommands: [...LOOP_SUBCOMMANDS],
|
|
675
|
-
handler: async ({ repoRoot, subcommand, rest }) => {
|
|
676
|
-
await runLoop(repoRoot, [subcommand, ...rest].filter((arg) => Boolean(arg)));
|
|
677
|
-
},
|
|
678
|
-
},
|
|
679
616
|
{
|
|
680
617
|
name: "cursor-prompt",
|
|
681
618
|
adapter: "none",
|
|
@@ -701,17 +638,6 @@ export const COMMAND_DEFINITIONS = [
|
|
|
701
638
|
await runPiReuseBenchmark(repoRoot, benchmarkArgs);
|
|
702
639
|
},
|
|
703
640
|
},
|
|
704
|
-
{
|
|
705
|
-
name: "loop-benchmark",
|
|
706
|
-
adapter: "required",
|
|
707
|
-
tier: "operator",
|
|
708
|
-
intent: "Generate deterministic loop convergence benchmark baseline evidence.",
|
|
709
|
-
usage: "loop-benchmark [--json|--markdown] [--output <path>]",
|
|
710
|
-
handler: async ({ repoRoot, subcommand, rest }) => {
|
|
711
|
-
const benchmarkArgs = [subcommand, ...rest].filter((arg) => Boolean(arg));
|
|
712
|
-
await runLoopBenchmark(repoRoot, benchmarkArgs);
|
|
713
|
-
},
|
|
714
|
-
},
|
|
715
641
|
];
|
|
716
642
|
export function toCommandManifestEntry(definition) {
|
|
717
643
|
const { handler: _handler, ...manifest } = definition;
|
package/dist/cli/help.js
CHANGED
|
@@ -27,7 +27,7 @@ export function formatCommandTierSummary(manifest = CODE_AGENT_COMMAND_MANIFEST)
|
|
|
27
27
|
" 2. review writeSet gate digest from JSON",
|
|
28
28
|
" 3. task advance <task-id> --approve-gate write-set-review:<digest> --json",
|
|
29
29
|
" 4. task status <task-id> --json # optional read-only",
|
|
30
|
-
"Advanced DAG authoring/forensics: dag validate|execute|report
|
|
30
|
+
"Advanced DAG authoring/forensics: dag validate|execute|report (not the standard happy path)",
|
|
31
31
|
`Primary commands: ${primary}`,
|
|
32
32
|
`Operator commands: ${operator}`,
|
|
33
33
|
compatibility ? `Legacy compatibility commands: ${compatibility}` : "",
|
package/dist/cli/program.js
CHANGED
|
@@ -21,9 +21,6 @@ import { runDagReject } from "../commands/dag-reject.js";
|
|
|
21
21
|
import { runDagCloseoutDraft, runDagReport } from "../commands/dag-report.js";
|
|
22
22
|
import { runDagResume } from "../commands/dag-resume.js";
|
|
23
23
|
import { runDagValidate } from "../commands/dag-validate.js";
|
|
24
|
-
import { runDagWorkflowCompile } from "../commands/dag-workflow-compile.js";
|
|
25
|
-
import { runDagWorkflowPlan } from "../commands/dag-workflow-plan.js";
|
|
26
|
-
import { runDagWorkflowValidate } from "../commands/dag-workflow-validate.js";
|
|
27
24
|
import { runDelegate } from "../commands/delegate.js";
|
|
28
25
|
import { runDocsArchive } from "../commands/docs-archive.js";
|
|
29
26
|
import { runDocsAudit } from "../commands/docs-audit.js";
|
|
@@ -41,8 +38,6 @@ import { runInspect } from "../commands/inspect.js";
|
|
|
41
38
|
import { runInspectNext } from "../commands/inspect-next.js";
|
|
42
39
|
import { runInstructions } from "../commands/instructions.js";
|
|
43
40
|
import { runKnowledge } from "../commands/knowledge.js";
|
|
44
|
-
import { runLoop } from "../commands/loop.js";
|
|
45
|
-
import { runLoopBenchmark } from "../commands/loop-benchmark.js";
|
|
46
41
|
import { runTaskAdvance, TASK_ADVANCE_USAGE } from "../commands/task-advance.js";
|
|
47
42
|
import { runTaskStatus, TASK_STATUS_USAGE } from "../commands/task-status.js";
|
|
48
43
|
import { runTaskSourcePrepare, TASK_SOURCE_PREPARE_USAGE, } from "../commands/task-source-prepare.js";
|
|
@@ -56,7 +51,6 @@ import { runRunDag } from "../commands/run-dag.js";
|
|
|
56
51
|
import { runSpine } from "../commands/spine.js";
|
|
57
52
|
import { runStats } from "../commands/stats.js";
|
|
58
53
|
import { runStudyInit } from "../commands/study-init.js";
|
|
59
|
-
import { runWorkflowCommand } from "../commands/workflow.js";
|
|
60
54
|
import { runWorktreeCreate } from "../commands/worktree-create.js";
|
|
61
55
|
import { runWorktreeList } from "../commands/worktree-list.js";
|
|
62
56
|
import { runWorktreeRemove } from "../commands/worktree-remove.js";
|
|
@@ -227,18 +221,9 @@ async function runCommanderAction(ctx, command, subcommand, rest) {
|
|
|
227
221
|
case "dag":
|
|
228
222
|
await runDagAction(ctx.repoRoot, subcommand, rest);
|
|
229
223
|
return;
|
|
230
|
-
case "workflow":
|
|
231
|
-
await runWorkflowCommand(ctx.repoRoot, compactArgs([subcommand, ...rest]));
|
|
232
|
-
return;
|
|
233
|
-
case "loop":
|
|
234
|
-
await runLoop(ctx.repoRoot, compactArgs([subcommand, ...rest]));
|
|
235
|
-
return;
|
|
236
224
|
case "pi-reuse-benchmark":
|
|
237
225
|
await runPiReuseBenchmark(ctx.repoRoot, compactArgs([subcommand, ...rest]));
|
|
238
226
|
return;
|
|
239
|
-
case "loop-benchmark":
|
|
240
|
-
await runLoopBenchmark(ctx.repoRoot, compactArgs([subcommand, ...rest]));
|
|
241
|
-
return;
|
|
242
227
|
default:
|
|
243
228
|
throw new Error(`commander command is not wired to an action: ${command}`);
|
|
244
229
|
}
|
|
@@ -324,15 +309,6 @@ async function runDagAction(repoRoot, subcommand, rest) {
|
|
|
324
309
|
case "validate":
|
|
325
310
|
await runDagValidate(repoRoot, args);
|
|
326
311
|
return;
|
|
327
|
-
case "workflow-validate":
|
|
328
|
-
await runDagWorkflowValidate(repoRoot, args);
|
|
329
|
-
return;
|
|
330
|
-
case "workflow-plan":
|
|
331
|
-
await runDagWorkflowPlan(repoRoot, args);
|
|
332
|
-
return;
|
|
333
|
-
case "workflow-compile":
|
|
334
|
-
await runDagWorkflowCompile(repoRoot, args);
|
|
335
|
-
return;
|
|
336
312
|
case "approve":
|
|
337
313
|
await runDagApprove(repoRoot, args);
|
|
338
314
|
return;
|
|
@@ -397,7 +373,7 @@ async function runDagAction(repoRoot, subcommand, rest) {
|
|
|
397
373
|
throw new Error("usage: dag decision <inspect|validate> --run-id <id> [--node-id <node-id>]");
|
|
398
374
|
}
|
|
399
375
|
default:
|
|
400
|
-
throw new Error("usage: dag <init-hybrid|execute|validate|
|
|
376
|
+
throw new Error("usage: dag <init-hybrid|execute|validate|approve|reject|resume|status|doctor|report|closeout-draft|reconcile-run|request-interrupt|rerun|rerun-task|reconcile-tasks|final-verification|context|artifact|decision> ...");
|
|
401
377
|
}
|
|
402
378
|
}
|
|
403
379
|
function compactArgs(args) {
|
|
@@ -554,9 +530,6 @@ function addDagCommand(program, defaultRepoRoot) {
|
|
|
554
530
|
const dag = new Command("dag").description("Agent DAG commands");
|
|
555
531
|
addRawSubcommands(dag, [
|
|
556
532
|
"init-hybrid",
|
|
557
|
-
"workflow-plan",
|
|
558
|
-
"workflow-validate",
|
|
559
|
-
"workflow-compile",
|
|
560
533
|
"approve",
|
|
561
534
|
"reject",
|
|
562
535
|
"resume",
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Accepted-merge normalization for `harness.json`.
|
|
3
|
+
*
|
|
4
|
+
* Extracted from `init.ts` so the edge-following rule can be tested directly:
|
|
5
|
+
* a wrong rule here does not fail loudly, it silently forces every
|
|
6
|
+
* `init upgrade` run back into the same merge task forever.
|
|
7
|
+
*/
|
|
8
|
+
/**
|
|
9
|
+
* Actions that rewrite `harness.json` in place.
|
|
10
|
+
*
|
|
11
|
+
* `migrate-harness-governance-root` and `migrate-harness-model-fields` were
|
|
12
|
+
* missing here. A legacy project receives the governance-root migration and
|
|
13
|
+
* the structural reconciliation in the same apply-safe batch, so the first
|
|
14
|
+
* action moves the file off the accepted hash and the second no longer
|
|
15
|
+
* matches it. The chain then stopped at the original hash, the recorded
|
|
16
|
+
* acceptance never matched the on-disk file, and every run regenerated the
|
|
17
|
+
* same merge task.
|
|
18
|
+
*
|
|
19
|
+
* Any future action that rewrites `harness.json` must be registered here.
|
|
20
|
+
*/
|
|
21
|
+
export const HARNESS_REWRITE_ACTIONS = new Set([
|
|
22
|
+
"migrate-harness-governance-root",
|
|
23
|
+
"migrate-harness-model-fields",
|
|
24
|
+
"reconcile-harness-structure",
|
|
25
|
+
]);
|
|
26
|
+
/**
|
|
27
|
+
* Follow exact controller normalization edges, never infer acceptance from
|
|
28
|
+
* shape equality.
|
|
29
|
+
*
|
|
30
|
+
* A receipt advances the chain only when it targets `harness.json`, is a
|
|
31
|
+
* registered rewrite action, and its `beforeSha256` equals the hash reached
|
|
32
|
+
* so far. Receipts without a `beforeSha256` cannot be proven consecutive and
|
|
33
|
+
* are ignored rather than trusted.
|
|
34
|
+
*/
|
|
35
|
+
export function normalizedAcceptedHarnessHash(acceptedHash, actions) {
|
|
36
|
+
let current = acceptedHash;
|
|
37
|
+
for (const action of actions) {
|
|
38
|
+
if (action.path === "harness.json" &&
|
|
39
|
+
HARNESS_REWRITE_ACTIONS.has(action.type) &&
|
|
40
|
+
action.beforeSha256 === current &&
|
|
41
|
+
action.afterSha256) {
|
|
42
|
+
current = action.afterSha256;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
return current;
|
|
46
|
+
}
|
|
@@ -409,6 +409,7 @@ function runGitQuery(cwd, args) {
|
|
|
409
409
|
return new Promise((resolve) => {
|
|
410
410
|
const child = spawn("git", ["-C", cwd, ...args], {
|
|
411
411
|
stdio: ["ignore", "pipe", "pipe"],
|
|
412
|
+
windowsHide: true,
|
|
412
413
|
});
|
|
413
414
|
const stdoutChunks = [];
|
|
414
415
|
const stderrChunks = [];
|
|
@@ -545,6 +546,62 @@ function runDirectory(repoRoot, runId) {
|
|
|
545
546
|
throw new Error("invalid init upgrade run id");
|
|
546
547
|
return path.join(runRoot(repoRoot), runId);
|
|
547
548
|
}
|
|
549
|
+
/**
|
|
550
|
+
* Pick the single interrupted run for `--continue` when `--run-id` is absent.
|
|
551
|
+
*
|
|
552
|
+
* Repeated interrupted attempts leave several directories under
|
|
553
|
+
* `.harness/init-upgrades`, and asking the user to copy a run id out of a
|
|
554
|
+
* state file is both error-prone and pointless when only one run can be
|
|
555
|
+
* resumed. This never guesses among candidates: two live runs mean the caller
|
|
556
|
+
* must decide, so the error lists them instead of picking the newest.
|
|
557
|
+
*
|
|
558
|
+
* Only `in-progress` runs qualify; a `failed` run stays opt-in so a broken
|
|
559
|
+
* run cannot be resumed by accident.
|
|
560
|
+
*/
|
|
561
|
+
/**
|
|
562
|
+
* Decide which interrupted run `--continue` should resume.
|
|
563
|
+
*
|
|
564
|
+
* Exported as a pure decision so the 0/1/many cases are testable without
|
|
565
|
+
* building a fixture repository. Never guesses: two live runs mean the caller
|
|
566
|
+
* must choose, and a `failed` run stays opt-in.
|
|
567
|
+
*/
|
|
568
|
+
export function selectInterruptedRun(candidates) {
|
|
569
|
+
if (candidates.length === 0) {
|
|
570
|
+
return {
|
|
571
|
+
error: "init upgrade --continue found no interrupted run; run `loop-agent init upgrade` to start one, or pass --run-id",
|
|
572
|
+
};
|
|
573
|
+
}
|
|
574
|
+
if (candidates.length === 1)
|
|
575
|
+
return { runId: candidates[0].runId };
|
|
576
|
+
const sorted = [...candidates].sort((left, right) => String(right.updatedAt ?? "").localeCompare(String(left.updatedAt ?? "")));
|
|
577
|
+
const listed = sorted
|
|
578
|
+
.map((candidate) => ` ${candidate.runId}${candidate.phase ? ` (${candidate.phase})` : ""}${candidate.updatedAt ? ` updated ${candidate.updatedAt}` : ""}`)
|
|
579
|
+
.join("\n");
|
|
580
|
+
return {
|
|
581
|
+
error: `init upgrade --continue found ${candidates.length} interrupted runs; pass --run-id with one of:\n${listed}`,
|
|
582
|
+
};
|
|
583
|
+
}
|
|
584
|
+
async function resolveInterruptedRunId(repoRoot) {
|
|
585
|
+
const root = runRoot(repoRoot);
|
|
586
|
+
const entries = await readdir(root, { withFileTypes: true }).catch(() => []);
|
|
587
|
+
const candidates = [];
|
|
588
|
+
for (const entry of entries) {
|
|
589
|
+
if (!entry.isDirectory() || !validRunId(entry.name))
|
|
590
|
+
continue;
|
|
591
|
+
const state = await readState(repoRoot, entry.name).catch(() => undefined);
|
|
592
|
+
if (!state || state.status !== "in-progress")
|
|
593
|
+
continue;
|
|
594
|
+
candidates.push({
|
|
595
|
+
runId: entry.name,
|
|
596
|
+
...(typeof state.phase === "string" ? { phase: state.phase } : {}),
|
|
597
|
+
...(typeof state.updatedAt === "string" ? { updatedAt: state.updatedAt } : {}),
|
|
598
|
+
});
|
|
599
|
+
}
|
|
600
|
+
const selection = selectInterruptedRun(candidates);
|
|
601
|
+
if ("error" in selection)
|
|
602
|
+
throw new Error(selection.error);
|
|
603
|
+
return selection.runId;
|
|
604
|
+
}
|
|
548
605
|
async function exists(filePath) {
|
|
549
606
|
return Boolean(await stat(filePath).catch(() => undefined));
|
|
550
607
|
}
|
|
@@ -1182,6 +1239,46 @@ async function assertSafeMergePath(repoRoot, relativePath) {
|
|
|
1182
1239
|
throw new Error(`init upgrade merge realpath escapes repo: ${normalized}`);
|
|
1183
1240
|
}
|
|
1184
1241
|
}
|
|
1242
|
+
/**
|
|
1243
|
+
* Directories whose contents never participate in the merge guard.
|
|
1244
|
+
*
|
|
1245
|
+
* The guard exists to prove that a merge touched only its declared paths, so
|
|
1246
|
+
* it only needs the governance surface. Walking dependency trees and build
|
|
1247
|
+
* output turned `DISCOVER` into a multi-minute scan on real projects (a
|
|
1248
|
+
* `node_modules` alone is tens of thousands of entries), which surfaced as an
|
|
1249
|
+
* external timeout with the run stuck in `DISCOVER`.
|
|
1250
|
+
*
|
|
1251
|
+
* Matching is by directory *name* only, so a file such as `src/dist.ts` or
|
|
1252
|
+
* `src/node_modules.ts` is still hashed normally. Skipping a directory also
|
|
1253
|
+
* excludes the directory entry itself from the snapshot, so no baseline bloat.
|
|
1254
|
+
*/
|
|
1255
|
+
const SNAPSHOT_SKIP_DIRECTORY_NAMES = new Set(["node_modules",
|
|
1256
|
+
"dist",
|
|
1257
|
+
"build",
|
|
1258
|
+
"coverage",
|
|
1259
|
+
".next",
|
|
1260
|
+
".nuxt",
|
|
1261
|
+
".turbo",
|
|
1262
|
+
".cache",
|
|
1263
|
+
".venv",
|
|
1264
|
+
"venv",
|
|
1265
|
+
"__pycache__",
|
|
1266
|
+
".pytest_cache",
|
|
1267
|
+
".mypy_cache",
|
|
1268
|
+
"target",
|
|
1269
|
+
".gradle",
|
|
1270
|
+
"vendor",
|
|
1271
|
+
]);
|
|
1272
|
+
/**
|
|
1273
|
+
* Whether a directory entry should be pruned from the workspace snapshot.
|
|
1274
|
+
*
|
|
1275
|
+
* Matches by directory name so `src/node_modules.ts` is still hashed. Exported
|
|
1276
|
+
* for direct testing: the guard's correctness depends on this staying narrow,
|
|
1277
|
+
* and an over-broad rule would silently stop protecting real files.
|
|
1278
|
+
*/
|
|
1279
|
+
export function shouldSkipSnapshotDirectory(entry) {
|
|
1280
|
+
return entry.isDirectory() && SNAPSHOT_SKIP_DIRECTORY_NAMES.has(entry.name);
|
|
1281
|
+
}
|
|
1185
1282
|
async function snapshotWorkspace(repoRoot) {
|
|
1186
1283
|
const snapshot = {};
|
|
1187
1284
|
async function visit(directory) {
|
|
@@ -1200,6 +1297,10 @@ async function snapshotWorkspace(repoRoot) {
|
|
|
1200
1297
|
continue;
|
|
1201
1298
|
if (relative === RUN_ROOT || relative.startsWith(`${RUN_ROOT}/`))
|
|
1202
1299
|
continue;
|
|
1300
|
+
// Prune dependency/build directories before recording or descending,
|
|
1301
|
+
// so neither their entry nor their contents enter the baseline.
|
|
1302
|
+
if (shouldSkipSnapshotDirectory(entry))
|
|
1303
|
+
continue;
|
|
1203
1304
|
if (entry.isSymbolicLink()) {
|
|
1204
1305
|
snapshot[relative] = `symlink:${await readlink(absolute)}`;
|
|
1205
1306
|
continue;
|
|
@@ -3594,7 +3695,19 @@ async function executeUpgrade(directory, state, input) {
|
|
|
3594
3695
|
});
|
|
3595
3696
|
}
|
|
3596
3697
|
export async function runInitUpgrade(input) {
|
|
3597
|
-
|
|
3698
|
+
// Canonicalize exactly once, the same way the decision-resume authority and
|
|
3699
|
+
// the controller anchor do. `path.resolve` alone keeps the Windows 8.3
|
|
3700
|
+
// short form (`MICROS~1`) that `realpath` expands, so the repo root
|
|
3701
|
+
// recorded into a pending decision never matched the one checked on
|
|
3702
|
+
// resume — the run then failed as "resume authority does not match
|
|
3703
|
+
// pending actions" even though every other field agreed.
|
|
3704
|
+
// Canonicalize exactly once, the same way the decision-resume authority and
|
|
3705
|
+
// the controller anchor do. `path.resolve` alone keeps the Windows 8.3
|
|
3706
|
+
// short form (`MICROS~1`) that `fs.promises.realpath` expands, so the repo
|
|
3707
|
+
// root recorded into a pending decision never matched the one checked on
|
|
3708
|
+
// resume — the run then failed as "resume authority does not match pending
|
|
3709
|
+
// actions" even though every other field agreed.
|
|
3710
|
+
const repoRoot = await realpath(path.resolve(input.repoRoot)).catch(() => path.resolve(input.repoRoot));
|
|
3598
3711
|
const mode = input.mode ?? "start";
|
|
3599
3712
|
if (input.decisionFile && mode !== "continue") {
|
|
3600
3713
|
throw new Error("init upgrade --decision-file requires --continue and --run-id");
|
|
@@ -3621,7 +3734,7 @@ export async function runInitUpgrade(input) {
|
|
|
3621
3734
|
};
|
|
3622
3735
|
}
|
|
3623
3736
|
const runId = mode === "continue"
|
|
3624
|
-
? input.runId
|
|
3737
|
+
? input.runId ?? (await resolveInterruptedRunId(repoRoot))
|
|
3625
3738
|
: input.runId ??
|
|
3626
3739
|
`init-upgrade-${new Date().toISOString().replace(/[-:.TZ]/g, "").slice(0, 14)}-${randomUUID().slice(0, 8)}`;
|
|
3627
3740
|
if (!runId)
|