@qwen-code/qwen-code 0.21.3 → 0.21.4-nightly.20260804.d6f55a1c9
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/bundled/qc-helper/docs/configuration/model-providers.md +8 -7
- package/bundled/qc-helper/docs/configuration/settings.md +14 -1
- package/bundled/qc-helper/docs/features/channels/github.md +12 -8
- package/bundled/qc-helper/docs/features/code-review.md +16 -1
- package/bundled/qc-helper/docs/features/commands.md +46 -40
- package/bundled/qc-helper/docs/features/mcp.md +11 -3
- package/bundled/qc-helper/docs/qwen-serve.md +27 -26
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -19
- package/bundled/review/SKILL.md +99 -23
- package/chunks/{MaxSizedBox-OJR636GP.js → MaxSizedBox-6J7WTW2Q.js} +16 -15
- package/chunks/{StandaloneSessionPicker-AMMBF5UY.js → StandaloneSessionPicker-J3HNBNWF.js} +30 -29
- package/chunks/{acpAgent-M57LVIQA.js → acpAgent-SGIEWC4W.js} +681 -291
- package/chunks/{agent-PE37ARLM.js → agent-W6IG55Q7.js} +16 -15
- package/chunks/{agent-headless-45ASME4R.js → agent-headless-EAPKUL6K.js} +16 -15
- package/chunks/{anthropicContentGenerator-WCBYB6JG.js → anthropicContentGenerator-3CAHEZBM.js} +4 -2
- package/chunks/{artifact-tool-TBOYEKTY.js → artifact-tool-RROCCJDA.js} +1 -1
- package/chunks/{askUserQuestion-23Y5WZFJ.js → askUserQuestion-2EPPBPUZ.js} +1 -1
- package/chunks/{bridge-K3ZRPO4D.js → bridge-SNQAVLI3.js} +17 -16
- package/chunks/{ca-4OJN75WT.js → ca-NYKNH222.js} +4 -0
- package/chunks/{channel-management-service-IXJ2MZTS.js → channel-management-service-UHX56NBO.js} +1 -1
- package/chunks/{channel-settings-store-PEAR3IME.js → channel-settings-store-TR7UMQVQ.js} +22 -21
- package/chunks/{chunk-L7FTDKCD.js → chunk-23DFTW2G.js} +21 -3
- package/chunks/{chunk-PWCQRLM5.js → chunk-2AGOQ7QO.js} +1 -1
- package/chunks/{chunk-HUIQ4FYC.js → chunk-2UYGQRYZ.js} +3 -3
- package/chunks/{chunk-4K3RV3OA.js → chunk-36Q4BOUL.js} +243 -108
- package/chunks/{chunk-2MI7ZTRT.js → chunk-3KTHFE53.js} +5 -5
- package/chunks/{chunk-QDWLUXKP.js → chunk-3X3CRYEU.js} +1 -1
- package/chunks/{chunk-YXEVDA66.js → chunk-4LLUH3A7.js} +19 -18
- package/chunks/{chunk-QPSYIV2O.js → chunk-4RNMAX6B.js} +2492 -690
- package/chunks/{chunk-O2ZYHG33.js → chunk-5L6CQ4ZU.js} +131 -67
- package/chunks/{chunk-HEBW74ZW.js → chunk-5WFVHBQR.js} +3 -3
- package/chunks/{chunk-LZV2BZPL.js → chunk-6BBIRJ6Z.js} +2 -2
- package/chunks/{chunk-TZTBZ25J.js → chunk-6WBWIPBF.js} +2 -2
- package/chunks/{chunk-QWDVZH24.js → chunk-7BUWEQD3.js} +3 -3
- package/chunks/{chunk-EGYJRIDF.js → chunk-7DKCE4VO.js} +2 -2
- package/chunks/{chunk-UQDFEU47.js → chunk-7E5BCHGR.js} +1165 -385
- package/chunks/{chunk-X6QNZOTC.js → chunk-7MFQLOHZ.js} +1 -1
- package/chunks/{chunk-MCXMWLFT.js → chunk-7VZZVBW7.js} +5 -5
- package/chunks/{chunk-FF75UUB2.js → chunk-7WE7B63C.js} +1 -1
- package/chunks/{chunk-M5LIY7Y6.js → chunk-AUM6IYIZ.js} +1 -1
- package/chunks/{chunk-K2J5JZ6B.js → chunk-B452JFK7.js} +1 -1
- package/chunks/{chunk-6NE5NTHJ.js → chunk-BDUPVCHA.js} +1 -1
- package/chunks/{chunk-SKSF3LGQ.js → chunk-BH4HRGTW.js} +4 -4
- package/chunks/{chunk-3XF4WT3B.js → chunk-BKLXFYJJ.js} +1 -1
- package/chunks/{chunk-RL6J3BPE.js → chunk-BQUXJJ72.js} +3 -3
- package/chunks/{chunk-H6FIBBXK.js → chunk-C4EK5K64.js} +13 -13
- package/chunks/{chunk-VUNRNRN6.js → chunk-CE424L46.js} +5 -5
- package/chunks/{chunk-DSGJLHM3.js → chunk-CJGLCNDE.js} +3 -3
- package/chunks/{chunk-FXVHVCNA.js → chunk-CTRZ7IDH.js} +1 -1
- package/chunks/{chunk-CFDR3GNL.js → chunk-D7D7RXIJ.js} +11 -0
- package/chunks/{chunk-ZGSUFIL5.js → chunk-DMI5SX2V.js} +1 -1
- package/chunks/{chunk-X6WUYMOV.js → chunk-DTAPI453.js} +2 -2
- package/chunks/{chunk-NW57GHNL.js → chunk-EF2FDVAL.js} +5 -5
- package/chunks/{chunk-BSKUTHLO.js → chunk-EVSV25NF.js} +16 -3
- package/chunks/{chunk-3MWNROHB.js → chunk-FQL6PVUI.js} +3 -3
- package/chunks/{chunk-IF6K42YJ.js → chunk-FSHOUNV4.js} +1 -1
- package/chunks/chunk-HGCQ5SE7.js +136 -0
- package/chunks/{chunk-GMSBXEH4.js → chunk-HTCXG5RY.js} +6 -6
- package/chunks/{chunk-FG63DZQA.js → chunk-I4PRUCND.js} +10 -10
- package/chunks/{chunk-YWMDTMAU.js → chunk-J2QPGVAE.js} +2 -2
- package/chunks/{chunk-RCXCGZG6.js → chunk-KCHQQBHO.js} +4 -4
- package/chunks/{chunk-LGT3YMLN.js → chunk-LEZFUYPM.js} +1 -1
- package/chunks/{chunk-G7XXKQYS.js → chunk-LKRMNRSN.js} +27 -1
- package/chunks/{chunk-WY2ENRDN.js → chunk-LZPIUB47.js} +1 -1
- package/chunks/{chunk-HFVW54NL.js → chunk-MBEMTXQT.js} +9 -2
- package/chunks/{chunk-RPYYTL7E.js → chunk-MGSSJT27.js} +2 -2
- package/chunks/{chunk-H35Q5CEG.js → chunk-MMWH7ERH.js} +6 -6
- package/chunks/{chunk-MUEJ4R3E.js → chunk-MP2XAFAD.js} +3 -3
- package/chunks/{chunk-R7XNRHYD.js → chunk-N64L3CUV.js} +1 -1
- package/chunks/{chunk-EIMKVOSF.js → chunk-NJ4ANA44.js} +1 -1
- package/chunks/{chunk-ZJES4C3I.js → chunk-O6GB7LVR.js} +2 -2
- package/chunks/{chunk-QWW6I2UO.js → chunk-PFQWATDS.js} +410 -39
- package/chunks/{chunk-XUMAD5IT.js → chunk-PMMWMPWV.js} +1 -1
- package/chunks/{chunk-H6ZYP74A.js → chunk-PUQDGXJV.js} +1 -1
- package/chunks/{chunk-XMJO6C44.js → chunk-PYXZLKUJ.js} +3 -3
- package/chunks/{chunk-KXWERR6P.js → chunk-QIS6FQFI.js} +10 -10
- package/chunks/{chunk-22YFMJBW.js → chunk-QK6BFCAL.js} +59 -7
- package/chunks/{chunk-HIXVWF7I.js → chunk-R2JZCL4S.js} +3 -3
- package/chunks/{chunk-N42C2FU3.js → chunk-RJ2KM6NF.js} +1 -1
- package/chunks/{chunk-2LZCLQIS.js → chunk-S5VUT4K2.js} +5 -5
- package/chunks/{chunk-4AGGSHCH.js → chunk-SVR6JPEL.js} +197 -53
- package/chunks/{chunk-SQ3YD5MI.js → chunk-T4LUW2CP.js} +4 -3
- package/chunks/{chunk-BKGA75MU.js → chunk-T7AALAF5.js} +1 -1
- package/chunks/{chunk-YU6TBRTA.js → chunk-URJHXOSO.js} +2 -2
- package/chunks/{chunk-MTR4JWQJ.js → chunk-UZNJUCOI.js} +4 -4
- package/chunks/{chunk-D2GPKXCQ.js → chunk-VQHIIPVE.js} +4 -4
- package/chunks/{chunk-IWGTGH4G.js → chunk-W2W6PMZX.js} +2 -2
- package/chunks/{chunk-SRY26X4H.js → chunk-WVAESIM6.js} +12 -3
- package/chunks/{chunk-5VYFXHY2.js → chunk-XKX3PNZR.js} +3 -3
- package/chunks/{chunk-BKXTHMOZ.js → chunk-XLD2R34T.js} +1 -1
- package/chunks/{chunk-5JPVOYWA.js → chunk-YT2BQ4JH.js} +5 -5
- package/chunks/{chunk-YPUHMQXV.js → chunk-Z5ZLRJFS.js} +1 -1
- package/chunks/{chunk-VA5NLVPT.js → chunk-Z7JILXGX.js} +1 -1
- package/chunks/{chunk-RR224BUP.js → chunk-ZLJQIGCH.js} +45 -1
- package/chunks/{chunk-TXABHVZD.js → chunk-ZNCRSKRP.js} +1 -1
- package/chunks/{chunk-UEJESCS7.js → chunk-ZPPP6VCL.js} +1 -1
- package/chunks/{chunk-Q3G5L5KF.js → chunk-ZQPHKE4K.js} +1 -1
- package/chunks/{computer-use-UJMK6JQU.js → computer-use-NFBEZ73C.js} +16 -15
- package/chunks/{config-utils-7COTJMWK.js → config-utils-E3ZQTHGM.js} +2 -2
- package/chunks/{contextCommand-4YABGF4S.js → contextCommand-HJN4W5PC.js} +18 -17
- package/chunks/{core-runtime-7M4VM3DA.js → core-runtime-Z4IALQ37.js} +16 -15
- package/chunks/{create-sub-session-J32WC64U.js → create-sub-session-6EWLAZD5.js} +1 -1
- package/chunks/{create-sub-session-HOFDW4N7.js → create-sub-session-MJKTT6R4.js} +28 -21
- package/chunks/{cron-create-HMFSHIAR.js → cron-create-CCRIULJE.js} +1 -1
- package/chunks/{cron-delete-ZJFHOX57.js → cron-delete-FCFW6BGP.js} +1 -1
- package/chunks/{cron-list-ZEX2NBMN.js → cron-list-QDBVCHRF.js} +1 -1
- package/chunks/{daemon-status-provider-W2U5Q3J5.js → daemon-status-provider-GR32VNM6.js} +21 -20
- package/chunks/{daemon-trust-policy-IFICWPXP.js → daemon-trust-policy-O4DGWLR5.js} +21 -20
- package/chunks/{daemon-trust-policy-monitor-GX7EO6FW.js → daemon-trust-policy-monitor-5RHH3YSK.js} +21 -20
- package/chunks/{de-A6TI4LBB.js → de-VL76CPLV.js} +4 -0
- package/chunks/{deferred-core-runtime-U36OOOKE.js → deferred-core-runtime-A5CKPGQZ.js} +16 -15
- package/chunks/{display-image-VS3TXYQH.js → display-image-GUJA352B.js} +2 -2
- package/chunks/{dist-NEBRI7WO.js → dist-C5U4LJKW.js} +95 -0
- package/chunks/{dist-4KAX7CCL.js → dist-IKGVITP3.js} +401 -24
- package/chunks/{earlyInputCapture-5ZWDH3SB.js → earlyInputCapture-ZB4EHBSD.js} +16 -15
- package/chunks/{edit-J7SW6UP6.js → edit-QSTJ353U.js} +17 -16
- package/chunks/{en-L4UQDLWW.js → en-IRJ2WN5T.js} +4 -0
- package/chunks/{enter-worktree-NRLOHRB6.js → enter-worktree-R73VWVFF.js} +16 -15
- package/chunks/{enterPlanMode-GDSTEFSM.js → enterPlanMode-OWFAGX5J.js} +16 -15
- package/chunks/{environment-KHYEKG5W.js → environment-57MAPDBT.js} +18 -17
- package/chunks/{errors-VNLAJV3O.js → errors-5BKZ3KMI.js} +18 -17
- package/chunks/{exit-worktree-ARVID7DF.js → exit-worktree-6O2324LA.js} +16 -15
- package/chunks/{exitPlanMode-4ZFY7KUH.js → exitPlanMode-GCRUFTNX.js} +16 -15
- package/chunks/{fast-path-KA65VREJ.js → fast-path-VN3BV4WN.js} +11 -2
- package/chunks/{fr-QF7RI5ZE.js → fr-GK3HQYVB.js} +4 -0
- package/chunks/{gemini-5PMCNPF7.js → gemini-K43YNDW7.js} +50 -48
- package/chunks/{geminiContentGenerator-NFSYJ4HA.js → geminiContentGenerator-BTPPSMCF.js} +1 -1
- package/chunks/{glob-F3EAUDAX.js → glob-4MLY2HOS.js} +16 -15
- package/chunks/{goal-tools-SPQ5M6D3.js → goal-tools-3AZKX5WQ.js} +2 -18
- package/chunks/{grep-UJMPVZER.js → grep-XFBSAUJW.js} +16 -15
- package/chunks/{handleAutoUpdate-MG4FRZPN.js → handleAutoUpdate-HWVO6M65.js} +20 -19
- package/chunks/{i18n-EVHV4ZF3.js → i18n-MASWUB3I.js} +17 -16
- package/chunks/{image-gen-UC7XVHI7.js → image-gen-XLFJRDFA.js} +2 -2
- package/chunks/{initializer-O5B6HUBI.js → initializer-M6JYLRYA.js} +21 -20
- package/chunks/{installationInfo-2LIKCNVX.js → installationInfo-TEJOXP5W.js} +17 -16
- package/chunks/{ja-URQESVGW.js → ja-3FA46IKD.js} +4 -0
- package/chunks/{list-BPKIE3Z4.js → list-UABKY6YY.js} +24 -23
- package/chunks/{list-agents-TWEGRJWO.js → list-agents-GC4BRET7.js} +1 -1
- package/chunks/{loadedSettingsAdapter-NGLFF4V4.js → loadedSettingsAdapter-L7PIVGJX.js} +21 -20
- package/chunks/{loggingContentGenerator-7TFESRG5.js → loggingContentGenerator-W7QO23AD.js} +8 -8
- package/chunks/{loop-wakeup-6LLEOQYV.js → loop-wakeup-SQQSBMEY.js} +2 -2
- package/chunks/{ls-H5WX22VK.js → ls-63CC3NNX.js} +1 -1
- package/chunks/{lsp-G6FXYEIS.js → lsp-P6NVJVNT.js} +1 -1
- package/chunks/{managed-npm-update-CLZGGV7F.js → managed-npm-update-WQ2J42H7.js} +17 -16
- package/chunks/{mcp-X5OZOOXX.js → mcp-A652OREB.js} +21 -20
- package/chunks/{monitor-TGSVSAZZ.js → monitor-Y7YAHCA6.js} +16 -15
- package/chunks/{nonInteractiveCli-GUMJ5JLG.js → nonInteractiveCli-EKLP5WCN.js} +48 -46
- package/chunks/{notebook-edit-EZISE7IC.js → notebook-edit-MALKVMST.js} +17 -16
- package/chunks/{openaiContentGenerator-ZAKS5A6P.js → openaiContentGenerator-WM2TUU7E.js} +8 -8
- package/chunks/{pidfile-PCMBX4LR.js → pidfile-QBNVWD7M.js} +16 -15
- package/chunks/{processUtils-2CSVE5BW.js → processUtils-4L46PM2I.js} +2 -2
- package/chunks/{pt-EEEQXRUI.js → pt-3AOBKPIJ.js} +4 -0
- package/chunks/{qwenContentGenerator-S3H6PIC4.js → qwenContentGenerator-GG6SY4YP.js} +17 -17
- package/chunks/{qwenOAuth2-MNU425VE.js → qwenOAuth2-PE27GJRG.js} +1 -1
- package/chunks/{read-file-HXJXHBI6.js → read-file-IHXKC6D3.js} +6 -6
- package/chunks/{read-mcp-resource-DRZSI3HE.js → read-mcp-resource-RTSSEER5.js} +1 -1
- package/chunks/{record-artifact-IPIRWMFY.js → record-artifact-L3BAHQFN.js} +2 -2
- package/chunks/{resumeHistoryUtils-4QAMC2S6.js → resumeHistoryUtils-BWVAHKRZ.js} +19 -18
- package/chunks/{ripGrep-MCETPF2E.js → ripGrep-7ASLNF5O.js} +16 -15
- package/chunks/{ru-WGZDYQAB.js → ru-VJRAMC4W.js} +4 -0
- package/chunks/{run-qwen-serve-3NMODTXV.js → run-qwen-serve-JLFJHJSU.js} +82 -35
- package/chunks/{runtime-AQOV7DVP.js → runtime-DVQFRHKX.js} +24 -23
- package/chunks/{scheduler-DN7SZ6ZE.js → scheduler-WMFCKI7V.js} +16 -15
- package/chunks/{sdk-exporters-http-IKNWQJNV.js → sdk-exporters-http-IL2346MJ.js} +6 -2
- package/chunks/{sdk-impl-7CUUMQDB.js → sdk-impl-SYKGVWOZ.js} +2 -2
- package/chunks/{send-message-HGCVVDTZ.js → send-message-TL6FIMMN.js} +3 -3
- package/chunks/{serve-WZB45HVT.js → serve-NYWUO6YF.js} +22 -20
- package/chunks/{server-GOTZFEEZ.js → server-WHLRWZCG.js} +44 -42
- package/chunks/{session-23LOFLWN.js → session-EN34VEJM.js} +49 -47
- package/chunks/{settings-LI2ORVXC.js → settings-FZH5YZLH.js} +20 -19
- package/chunks/{shell-GLC6OP3C.js → shell-FQLEHJKT.js} +16 -15
- package/chunks/{skill-C7W6M4GO.js → skill-QAXTGG6F.js} +7 -7
- package/chunks/{skill-settings-W25NCK5I.js → skill-settings-SRUMUJIE.js} +20 -19
- package/chunks/{spawnChannel-OHJLEBLD.js → spawnChannel-VYQCFI7T.js} +16 -15
- package/chunks/{standalone-update-E4V5V7WT.js → standalone-update-LEPP5BOB.js} +18 -17
- package/chunks/{startInteractiveUI-FKILLW7Q.js → startInteractiveUI-IQIG2MKN.js} +77 -62
- package/chunks/{syntheticOutput-EYL7DWO7.js → syntheticOutput-BN7E626U.js} +2 -2
- package/chunks/{task-create-CSCEG4SM.js → task-create-2X4UP4F3.js} +4 -4
- package/chunks/{task-list-6CVQPORX.js → task-list-WOLJPZ64.js} +1 -1
- package/chunks/{task-stop-Y5ZTFVRX.js → task-stop-TNXRNAL2.js} +1 -1
- package/chunks/{task-update-C52LNFU5.js → task-update-VDUSN36E.js} +4 -4
- package/chunks/{team-create-HBIJ7NHT.js → team-create-7B5NKWA2.js} +16 -15
- package/chunks/{team-delete-CE7DC53R.js → team-delete-D2VMSDOT.js} +1 -1
- package/chunks/{team-plan-approval-IBJOKS4J.js → team-plan-approval-J6TURTZC.js} +16 -15
- package/chunks/{terminal-image-renderer-BOQJPVLB.js → terminal-image-renderer-KZMAF5E5.js} +17 -16
- package/chunks/{theme-manager-NSS7VLUD.js → theme-manager-NPISCKAX.js} +16 -15
- package/chunks/{todoWrite-YKAA57W2.js → todoWrite-MHWHO5UO.js} +3 -2
- package/chunks/{tool-search-DEAS54VG.js → tool-search-MFTNRTFA.js} +8 -8
- package/chunks/{total-session-admission-4LWTX3WD.js → total-session-admission-42THE4X2.js} +17 -16
- package/chunks/{trustedFolders-NF3J2TA7.js → trustedFolders-OT7IORFI.js} +17 -16
- package/chunks/{update-relaunch-WUHRH5V3.js → update-relaunch-2NJAMGWQ.js} +5 -5
- package/chunks/{updateCheck-7EG4BLBH.js → updateCheck-XSIBJXYA.js} +19 -18
- package/chunks/{useAutoAcceptIndicator-ZRV56GVP.js → useAutoAcceptIndicator-VH4DU3JR.js} +22 -21
- package/chunks/{validateNonInterActiveAuth-WC2FPE3I.js → validateNonInterActiveAuth-JD3VEJ2O.js} +45 -43
- package/chunks/{version-6SS7KCUP.js → version-F75ALUI3.js} +1 -1
- package/chunks/{web-fetch-Y5QQMPKA.js → web-fetch-Y6VEJMFN.js} +6 -6
- package/chunks/{web-search-QKKEU723.js → web-search-BTKVYWOR.js} +4 -4
- package/chunks/{workflow-PWIU6Q2M.js → workflow-LWFOBFN3.js} +17 -16
- package/chunks/{workspace-providers-status-B2DM6FNK.js → workspace-providers-status-VFEB7C5S.js} +23 -22
- package/chunks/{workspace-registration-store-7Y33TTHJ.js → workspace-registration-store-MB24E7PA.js} +1 -1
- package/chunks/{workspace-registry-TSNJKLPC.js → workspace-registry-FHFAPD74.js} +17 -16
- package/chunks/{workspace-service-4I2QHDX4.js → workspace-service-A6EFCR5H.js} +24 -23
- package/chunks/{workspace-skills-status-HVXNWVGR.js → workspace-skills-status-SDX2JT7P.js} +21 -20
- package/chunks/{workspace-trust-reconciler-RDBBGMWP.js → workspace-trust-reconciler-5NOCATAW.js} +22 -21
- package/chunks/{write-file-RQ4DG5RY.js → write-file-OHTP7KKV.js} +16 -15
- package/chunks/{zh-72XPUG5P.js → zh-ARWDLDLR.js} +4 -0
- package/chunks/{zh-TW-LTB4SRH3.js → zh-TW-Y4RGI3P7.js} +4 -0
- package/chunks/{zoom-image-O5YCB7WN.js → zoom-image-WLSVNK2C.js} +6 -6
- package/cli.js +12 -12
- package/locales/ca.js +8 -0
- package/locales/de.js +8 -0
- package/locales/en.js +8 -0
- package/locales/fr.js +8 -0
- package/locales/ja.js +8 -0
- package/locales/pt.js +8 -0
- package/locales/ru.js +8 -0
- package/locales/zh-TW.js +7 -0
- package/locales/zh.js +7 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-Bd7d781i.js → arc-Dpg66jw7.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CpnOJqNE.js → architectureDiagram-3BPJPVTR-BJ4FIBxN.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-NxVTiWnk.js → blockDiagram-GPEHLZMM-VXmYdtYT.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BWT75l82.js → c4Diagram-AAUBKEIU-BNLDb8FE.js} +1 -1
- package/web-shell/assets/channel-Bd9wOnaA.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Dzz03hk6.js → chunk-2J33WTMH-DR5yHxr0.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DRF-egfm.js → chunk-4BX2VUAB-Czkq8UZU.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-Co15vq5x.js → chunk-55IACEB6-DugUgM6s.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DHSUk1J7.js → chunk-727SXJPM-Dw6quA1K.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Br8u_E2R.js → chunk-AQP2D5EJ-BoVYOTTz.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DXbPTnqF.js → chunk-FMBD7UC4--Amcse-j.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BleQdi4d.js → chunk-ND2GUHAM-ajaEYAC8.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CqgBf-95.js → chunk-QZHKN3VN-CUNDZ7im.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-XhCT8FE3.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-XhCT8FE3.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-WS7b13Yg.js → cose-bilkent-S5V4N54A-BnfkD-m1.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-v_55ki8o.js → dagre-BM42HDAG-BuUdFk7Z.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DaYAjbdK.js → diagram-2AECGRRQ-B2ZXxoab.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-D_Hy-L64.js → diagram-5GNKFQAL-BsgOICzM.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-dB06cZyD.js → diagram-KO2AKTUF-DTTjG6U-.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DzSluD4F.js → diagram-LMA3HP47-temLf1x7.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Cvb6CeXQ.js → diagram-OG6HWLK6-CRFjScs2.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-7eB2Hmov.js → erDiagram-TEJ5UH35-D4oaY-rQ.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-B08iGCw_.js → flowDiagram-I6XJVG4X-BqG8B49b.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgsrCHq-.js → ganttDiagram-6RSMTGT7-DffQBdd5.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DQLurQ2i.js → gitGraphDiagram-PVQCEYII-CMDPfseF.js} +1 -1
- package/web-shell/assets/index-2F4RsNzd.js +1756 -0
- package/web-shell/assets/index-CaucmEO_.css +5 -0
- package/web-shell/assets/{index-B_1Z0Mgr.js → index-qTQR_smP.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-DXZGO8qB.js → infoDiagram-5YYISTIA-Cn3T83MA.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-g7gbuH2w.js → ishikawaDiagram-YF4QCWOH-ijFs7e25.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-euefICGn.js → journeyDiagram-JHISSGLW-CINTv8VB.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dws8-mjG.js → kanban-definition-UN3LZRKU-CMGRZCxx.js} +1 -1
- package/web-shell/assets/{linear-C63F0tyh.js → linear-Co-2_37d.js} +1 -1
- package/web-shell/assets/{mermaid.core-fLrhp_4-.js → mermaid.core-DijbyaN5.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-qRkydfT-.js → mindmap-definition-RKZ34NQL-k_sDYDPZ.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BZ0wQaKN.js → pieDiagram-4H26LBE5-CG-oz8V3.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Fjq6GbSZ.js → quadrantDiagram-W4KKPZXB-Baq7HIG2.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CqWvjLHU.js → requirementDiagram-4Y6WPE33-CDM3ZvBt.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-VcXX6PVZ.js → sankeyDiagram-5OEKKPKP-C2dJbWKN.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BJSRtxFr.js → sequenceDiagram-3UESZ5HK-Cf1_h59p.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-Dt9zUwmZ.js → stateDiagram-AJRCARHV-CI5clUEc.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BDc8asKD.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DQwlNRws.js → timeline-definition-PNZ67QCA-B2O8cAZX.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DwxjUEtQ.js → vennDiagram-CIIHVFJN-BLsJ_h9s.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D3QdMSpJ.js → wardley-L42UT6IY-BlPU4FTA.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BddN8oK8.js → wardleyDiagram-YWT4CUSO-D_U-RdU4.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUNuBrRJ.js → xychartDiagram-2RQKCTM6-BynXGSTl.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-A434sWK5.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwPuhldB.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwPuhldB.js +0 -1
- package/web-shell/assets/index-Bi1dP2mU.css +0 -5
- package/web-shell/assets/index-DJ-z1Oba.js +0 -1756
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CCxQt56w.js +0 -1
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
import {
|
|
4
4
|
settleChatRecording,
|
|
5
5
|
subscribeToHeadlessChatRecordingFailures
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-DMI5SX2V.js";
|
|
7
7
|
import {
|
|
8
8
|
handleAtCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PYXZLKUJ.js";
|
|
10
10
|
import {
|
|
11
11
|
JsonOutputAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-B452JFK7.js";
|
|
13
13
|
import {
|
|
14
14
|
StreamJsonOutputAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-23DFTW2G.js";
|
|
16
16
|
import {
|
|
17
17
|
buildInitialSystemReminders,
|
|
18
18
|
buildSystemMessage,
|
|
@@ -24,11 +24,11 @@ import {
|
|
|
24
24
|
insertAfterFunctionResponses,
|
|
25
25
|
isSlashCommand,
|
|
26
26
|
normalizePartList
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-SVR6JPEL.js";
|
|
28
28
|
import {
|
|
29
29
|
RunBudgetEnforcer,
|
|
30
30
|
cleanupReviewWorktreeLeases
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-4RNMAX6B.js";
|
|
32
32
|
import {
|
|
33
33
|
AlreadyReportedError,
|
|
34
34
|
handleBudgetExceededError,
|
|
@@ -36,10 +36,10 @@ import {
|
|
|
36
36
|
handleError,
|
|
37
37
|
handleMaxTurnsExceededError,
|
|
38
38
|
handleToolError
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-7DKCE4VO.js";
|
|
40
40
|
import {
|
|
41
41
|
isInlineModelOverrideAllowed
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-XKX3PNZR.js";
|
|
43
43
|
import {
|
|
44
44
|
PLAN_MODE_ENTRY_SIBLING_SKIP_MESSAGE,
|
|
45
45
|
buildSessionRecoveryPlanFromApiHistory,
|
|
@@ -57,16 +57,19 @@ import {
|
|
|
57
57
|
parseAndFormatApiError,
|
|
58
58
|
partitionByConcurrencySafety,
|
|
59
59
|
restoreWorktreeContext
|
|
60
|
-
} from "./chunk-
|
|
60
|
+
} from "./chunk-7E5BCHGR.js";
|
|
61
61
|
import {
|
|
62
62
|
parsePositiveIntegerEnv
|
|
63
63
|
} from "./chunk-6PVPNMXU.js";
|
|
64
64
|
import {
|
|
65
65
|
promptIdContext
|
|
66
66
|
} from "./chunk-O6GEWCJA.js";
|
|
67
|
+
import {
|
|
68
|
+
GoalPersistenceUnavailableError
|
|
69
|
+
} from "./chunk-MBEMTXQT.js";
|
|
67
70
|
import {
|
|
68
71
|
isSystemReminderContent
|
|
69
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-WVAESIM6.js";
|
|
70
73
|
import {
|
|
71
74
|
formatFullTurnVisionNotice,
|
|
72
75
|
formatVisionBridgeNotice,
|
|
@@ -76,21 +79,21 @@ import {
|
|
|
76
79
|
shouldRunVisionBridge,
|
|
77
80
|
splitImageParts,
|
|
78
81
|
uiTelemetryService
|
|
79
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-36Q4BOUL.js";
|
|
80
83
|
import {
|
|
81
84
|
ToolNames
|
|
82
|
-
} from "./chunk-
|
|
85
|
+
} from "./chunk-D7D7RXIJ.js";
|
|
83
86
|
import {
|
|
84
87
|
isTelemetrySdkInitialized,
|
|
85
88
|
shutdownTelemetry
|
|
86
|
-
} from "./chunk-
|
|
89
|
+
} from "./chunk-5L6CQ4ZU.js";
|
|
87
90
|
import {
|
|
88
91
|
FatalInputError,
|
|
89
92
|
createDebugLogger
|
|
90
93
|
} from "./chunk-3RXUYQJI.js";
|
|
91
94
|
import {
|
|
92
95
|
registerCleanup
|
|
93
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-3X3CRYEU.js";
|
|
94
97
|
import {
|
|
95
98
|
init_esbuild_shims
|
|
96
99
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -133,6 +136,84 @@ function formatLoopDetectedMessage(loopType) {
|
|
|
133
136
|
return `Loop detection halted the run${detail}.${hint}`;
|
|
134
137
|
}
|
|
135
138
|
__name(formatLoopDetectedMessage, "formatLoopDetectedMessage");
|
|
139
|
+
function sameGoalPermit(left, right) {
|
|
140
|
+
return left?.goalId === right.goalId && left.revision === right.revision && left.turnId === right.turnId;
|
|
141
|
+
}
|
|
142
|
+
__name(sameGoalPermit, "sameGoalPermit");
|
|
143
|
+
function buildGoalContinuationParts(turn) {
|
|
144
|
+
return [
|
|
145
|
+
{
|
|
146
|
+
text: [
|
|
147
|
+
"Continue working on the active Goal.",
|
|
148
|
+
"Use get_goal for the authoritative objective and evidence state.",
|
|
149
|
+
"Follow the objective's requested output format exactly. Do not add progress, status, or completion commentary unless the objective asks for it.",
|
|
150
|
+
"If completion depends on content delivered in this turn, deliver only that content and call get_goal in the same response before update_goal.",
|
|
151
|
+
`Runtime continuation context: ${turn.continuationContext}`,
|
|
152
|
+
...turn.verifierFeedback ? [`Verifier feedback: ${turn.verifierFeedback}`] : []
|
|
153
|
+
].join("\n")
|
|
154
|
+
}
|
|
155
|
+
];
|
|
156
|
+
}
|
|
157
|
+
__name(buildGoalContinuationParts, "buildGoalContinuationParts");
|
|
158
|
+
function projectLegacyActiveGoal(snapshot) {
|
|
159
|
+
const goal = snapshot.goal;
|
|
160
|
+
if (goal?.status !== "active") return null;
|
|
161
|
+
return {
|
|
162
|
+
condition: goal.objective,
|
|
163
|
+
iterations: goal.turnCount,
|
|
164
|
+
setAt: goal.createdAt,
|
|
165
|
+
tokensAtStart: 0,
|
|
166
|
+
hookId: `goal-v2:${goal.goalId}:${goal.revision}`,
|
|
167
|
+
...goal.lastReason === void 0 ? {} : { lastReason: goal.lastReason }
|
|
168
|
+
};
|
|
169
|
+
}
|
|
170
|
+
__name(projectLegacyActiveGoal, "projectLegacyActiveGoal");
|
|
171
|
+
function formatGoalState(snapshot, operation) {
|
|
172
|
+
const goal = snapshot.goal;
|
|
173
|
+
if (!goal) {
|
|
174
|
+
return operation === "clear" ? "Goal cleared." : "No Goal is set.";
|
|
175
|
+
}
|
|
176
|
+
const status = goal.status === "usage_limited" ? "usage limited" : goal.status;
|
|
177
|
+
const summary = `Goal ${status}: ${goal.objective}`;
|
|
178
|
+
return (goal.status === "blocked" || goal.status === "usage_limited") && goal.lastReason ? `${summary}
|
|
179
|
+
Reason: ${goal.lastReason}` : summary;
|
|
180
|
+
}
|
|
181
|
+
__name(formatGoalState, "formatGoalState");
|
|
182
|
+
async function claimUserGoalTurn(runtime, turnKey, signal) {
|
|
183
|
+
const immediate = runtime.permitForTurn(turnKey) ?? runtime.beginTurn(turnKey);
|
|
184
|
+
if (immediate || runtime.getSnapshot().goal?.status !== "active") {
|
|
185
|
+
return immediate;
|
|
186
|
+
}
|
|
187
|
+
return new Promise((resolve, reject) => {
|
|
188
|
+
let settled = false;
|
|
189
|
+
let unsubscribe = /* @__PURE__ */ __name(() => {
|
|
190
|
+
}, "unsubscribe");
|
|
191
|
+
const finish = /* @__PURE__ */ __name((permit, error) => {
|
|
192
|
+
if (settled) return;
|
|
193
|
+
settled = true;
|
|
194
|
+
unsubscribe();
|
|
195
|
+
signal.removeEventListener("abort", onAbort);
|
|
196
|
+
if (error !== void 0) reject(error);
|
|
197
|
+
else resolve(permit);
|
|
198
|
+
}, "finish");
|
|
199
|
+
const inspect = /* @__PURE__ */ __name(() => {
|
|
200
|
+
try {
|
|
201
|
+
const permit = runtime.permitForTurn(turnKey);
|
|
202
|
+
if (permit || runtime.getSnapshot().goal?.status !== "active") {
|
|
203
|
+
finish(permit);
|
|
204
|
+
}
|
|
205
|
+
} catch (error) {
|
|
206
|
+
finish(void 0, error);
|
|
207
|
+
}
|
|
208
|
+
}, "inspect");
|
|
209
|
+
const onAbort = /* @__PURE__ */ __name(() => finish(void 0), "onAbort");
|
|
210
|
+
unsubscribe = runtime.subscribe(inspect);
|
|
211
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
212
|
+
if (signal.aborted) onAbort();
|
|
213
|
+
else inspect();
|
|
214
|
+
});
|
|
215
|
+
}
|
|
216
|
+
__name(claimUserGoalTurn, "claimUserGoalTurn");
|
|
136
217
|
function skipHeadlessLoopSentinel(scheduler, job) {
|
|
137
218
|
if (!isHeadlessLoopSentinel(job.prompt)) {
|
|
138
219
|
return false;
|
|
@@ -235,10 +316,145 @@ async function runNonInteractive(config, settings, input, prompt_id, options = {
|
|
|
235
316
|
() => cleanupReviewWorktrees(1e3)
|
|
236
317
|
);
|
|
237
318
|
let turnCount = 0;
|
|
319
|
+
let limitedTurnCount = 0;
|
|
238
320
|
let totalApiDurationMs = 0;
|
|
239
321
|
const startTime = Date.now();
|
|
240
322
|
const geminiClient = config.getGeminiClient();
|
|
241
323
|
const abortController = options.abortController ?? new AbortController();
|
|
324
|
+
const queuedGoalTurns = [];
|
|
325
|
+
let activeGoalTurn;
|
|
326
|
+
let goalRuntimeUnsubscribe;
|
|
327
|
+
const emitGoalSnapshot = /* @__PURE__ */ __name((snapshot) => {
|
|
328
|
+
adapter.processEvent({
|
|
329
|
+
type: "goal_state" /* GoalState */,
|
|
330
|
+
value: snapshot
|
|
331
|
+
});
|
|
332
|
+
adapter.processEvent({
|
|
333
|
+
type: "active_goal" /* ActiveGoal */,
|
|
334
|
+
value: projectLegacyActiveGoal(snapshot)
|
|
335
|
+
});
|
|
336
|
+
}, "emitGoalSnapshot");
|
|
337
|
+
const observeGoalRuntime = /* @__PURE__ */ __name((runtime) => {
|
|
338
|
+
goalRuntimeUnsubscribe ??= runtime.subscribe(emitGoalSnapshot);
|
|
339
|
+
}, "observeGoalRuntime");
|
|
340
|
+
const enforceSessionTurnLimit = /* @__PURE__ */ __name(async (isRuntimeGoalTurn) => {
|
|
341
|
+
if (isRuntimeGoalTurn) return;
|
|
342
|
+
limitedTurnCount++;
|
|
343
|
+
const maxSessionTurns = config.getMaxSessionTurns();
|
|
344
|
+
if (maxSessionTurns >= 0 && limitedTurnCount > maxSessionTurns) {
|
|
345
|
+
await failClosedActiveGoalTurn(
|
|
346
|
+
"Headless Goal stopped after the session turn limit"
|
|
347
|
+
);
|
|
348
|
+
await settleBeforeTerminalOutput();
|
|
349
|
+
await handleMaxTurnsExceededError(config);
|
|
350
|
+
}
|
|
351
|
+
}, "enforceSessionTurnLimit");
|
|
352
|
+
let goalHostUnbind;
|
|
353
|
+
const goalHost = {
|
|
354
|
+
startGoalTurn: /* @__PURE__ */ __name(async (input2) => {
|
|
355
|
+
if (queuedGoalTurns.some(
|
|
356
|
+
({ permit }) => permit.turnId === input2.permit.turnId
|
|
357
|
+
)) {
|
|
358
|
+
return;
|
|
359
|
+
}
|
|
360
|
+
queuedGoalTurns.push({
|
|
361
|
+
permit: { ...input2.permit },
|
|
362
|
+
turnKey: `goal-runtime:${input2.permit.turnId}`,
|
|
363
|
+
controller: new AbortController(),
|
|
364
|
+
origin: "runtime",
|
|
365
|
+
continuationContext: input2.continuationContext,
|
|
366
|
+
...input2.verifierFeedback ? { verifierFeedback: input2.verifierFeedback } : {}
|
|
367
|
+
});
|
|
368
|
+
}, "startGoalTurn"),
|
|
369
|
+
preemptGoalTurn: /* @__PURE__ */ __name((reason) => {
|
|
370
|
+
for (const turn of queuedGoalTurns.splice(0)) {
|
|
371
|
+
turn.controller.abort(reason);
|
|
372
|
+
}
|
|
373
|
+
activeGoalTurn?.controller.abort(reason);
|
|
374
|
+
}, "preemptGoalTurn")
|
|
375
|
+
};
|
|
376
|
+
const bindGoalHost = /* @__PURE__ */ __name(() => {
|
|
377
|
+
goalHostUnbind ??= config.bindGoalTurnHost(goalHost);
|
|
378
|
+
}, "bindGoalHost");
|
|
379
|
+
let settlingGoalTurn;
|
|
380
|
+
let goalTurnSettlement;
|
|
381
|
+
const failClosedActiveGoalTurn = /* @__PURE__ */ __name((reason) => {
|
|
382
|
+
const turn = activeGoalTurn;
|
|
383
|
+
if (!turn) return Promise.resolve();
|
|
384
|
+
if (settlingGoalTurn === turn && goalTurnSettlement) {
|
|
385
|
+
return goalTurnSettlement;
|
|
386
|
+
}
|
|
387
|
+
settlingGoalTurn = turn;
|
|
388
|
+
goalTurnSettlement = (async () => {
|
|
389
|
+
if (!turn.controller.signal.aborted) {
|
|
390
|
+
turn.controller.abort(reason);
|
|
391
|
+
}
|
|
392
|
+
try {
|
|
393
|
+
const runtime = await config.getGoalRuntimeReady();
|
|
394
|
+
if (!sameGoalPermit(runtime.permitForTurn(turn.turnKey), turn.permit)) {
|
|
395
|
+
return;
|
|
396
|
+
}
|
|
397
|
+
if (runtime.getSnapshot().goal?.status === "active") {
|
|
398
|
+
try {
|
|
399
|
+
await runtime.dispatch({
|
|
400
|
+
action: "pause",
|
|
401
|
+
expectedGoalId: turn.permit.goalId,
|
|
402
|
+
expectedRevision: turn.permit.revision
|
|
403
|
+
});
|
|
404
|
+
} catch (error) {
|
|
405
|
+
debugLogger.warn("Failed to pause terminal headless Goal", error);
|
|
406
|
+
}
|
|
407
|
+
}
|
|
408
|
+
try {
|
|
409
|
+
await config.getChatRecordingService?.()?.flush();
|
|
410
|
+
} catch (error) {
|
|
411
|
+
debugLogger.warn("Failed to flush terminal headless Goal", error);
|
|
412
|
+
}
|
|
413
|
+
if (sameGoalPermit(runtime.permitForTurn(turn.turnKey), turn.permit)) {
|
|
414
|
+
await runtime.finishTurn(turn.permit);
|
|
415
|
+
}
|
|
416
|
+
} catch (error) {
|
|
417
|
+
debugLogger.warn("Failed to close terminal headless Goal", error);
|
|
418
|
+
} finally {
|
|
419
|
+
if (activeGoalTurn === turn) {
|
|
420
|
+
activeGoalTurn = void 0;
|
|
421
|
+
}
|
|
422
|
+
if (settlingGoalTurn === turn) {
|
|
423
|
+
settlingGoalTurn = void 0;
|
|
424
|
+
goalTurnSettlement = void 0;
|
|
425
|
+
}
|
|
426
|
+
}
|
|
427
|
+
})();
|
|
428
|
+
return goalTurnSettlement;
|
|
429
|
+
}, "failClosedActiveGoalTurn");
|
|
430
|
+
const finishGoalTurn = /* @__PURE__ */ __name(async (turn) => {
|
|
431
|
+
const runtime = await config.getGoalRuntimeReady();
|
|
432
|
+
if (!sameGoalPermit(runtime.permitForTurn(turn.turnKey), turn.permit)) {
|
|
433
|
+
return;
|
|
434
|
+
}
|
|
435
|
+
let abortSettlement;
|
|
436
|
+
const pauseOnAbort = /* @__PURE__ */ __name(() => {
|
|
437
|
+
abortSettlement ??= runtime.dispatch({
|
|
438
|
+
action: "pause",
|
|
439
|
+
expectedGoalId: turn.permit.goalId,
|
|
440
|
+
expectedRevision: turn.permit.revision
|
|
441
|
+
}).then(() => void 0).catch((error) => {
|
|
442
|
+
debugLogger.warn("Failed to pause aborted headless Goal", error);
|
|
443
|
+
});
|
|
444
|
+
}, "pauseOnAbort");
|
|
445
|
+
abortController.signal.addEventListener("abort", pauseOnAbort, {
|
|
446
|
+
once: true
|
|
447
|
+
});
|
|
448
|
+
if (abortController.signal.aborted) pauseOnAbort();
|
|
449
|
+
try {
|
|
450
|
+
if (!abortController.signal.aborted) {
|
|
451
|
+
await runtime.finishTurn(turn.permit);
|
|
452
|
+
}
|
|
453
|
+
} finally {
|
|
454
|
+
abortController.signal.removeEventListener("abort", pauseOnAbort);
|
|
455
|
+
await abortSettlement;
|
|
456
|
+
}
|
|
457
|
+
}, "finishGoalTurn");
|
|
242
458
|
const budgetEnforcer = new RunBudgetEnforcer(
|
|
243
459
|
{
|
|
244
460
|
maxWallTimeSeconds: config.getMaxWallTimeSeconds(),
|
|
@@ -248,8 +464,11 @@ async function runNonInteractive(config, settings, input, prompt_id, options = {
|
|
|
248
464
|
);
|
|
249
465
|
budgetEnforcer.start();
|
|
250
466
|
const routeAbort = /* @__PURE__ */ __name(async () => {
|
|
251
|
-
await settleBeforeTerminalOutput();
|
|
252
467
|
const exceeded = budgetEnforcer.getExceeded();
|
|
468
|
+
await failClosedActiveGoalTurn(
|
|
469
|
+
exceeded?.message ?? "Headless Goal execution was cancelled"
|
|
470
|
+
);
|
|
471
|
+
await settleBeforeTerminalOutput();
|
|
253
472
|
if (exceeded) {
|
|
254
473
|
await handleBudgetExceededError(config, exceeded);
|
|
255
474
|
throw new Error(exceeded.message);
|
|
@@ -465,6 +684,41 @@ ${reason}
|
|
|
465
684
|
}
|
|
466
685
|
slashHandled = true;
|
|
467
686
|
break;
|
|
687
|
+
case "goal_control": {
|
|
688
|
+
const { snapshot } = slashCommandResult.response;
|
|
689
|
+
observeGoalRuntime(await config.getGoalRuntimeReady());
|
|
690
|
+
emitGoalSnapshot(snapshot);
|
|
691
|
+
const message = formatGoalState(
|
|
692
|
+
snapshot,
|
|
693
|
+
slashCommandResult.operation.kind
|
|
694
|
+
);
|
|
695
|
+
const shouldRunGoalWorker = snapshot.goal?.status === "active" && (slashCommandResult.operation.kind === "set" || slashCommandResult.operation.kind === "edit" || slashCommandResult.operation.kind === "resume");
|
|
696
|
+
if (!shouldRunGoalWorker) {
|
|
697
|
+
await emitNonInteractiveFinalMessage({
|
|
698
|
+
message,
|
|
699
|
+
isError: false,
|
|
700
|
+
adapter,
|
|
701
|
+
config,
|
|
702
|
+
startTimeMs: startTime,
|
|
703
|
+
beforeEmit: settleBeforeTerminalOutput
|
|
704
|
+
});
|
|
705
|
+
return 0;
|
|
706
|
+
}
|
|
707
|
+
if (outputFormat === "text" /* TEXT */) {
|
|
708
|
+
process.stdout.write(`${message}
|
|
709
|
+
`);
|
|
710
|
+
}
|
|
711
|
+
bindGoalHost();
|
|
712
|
+
activeGoalTurn = queuedGoalTurns.shift();
|
|
713
|
+
if (!activeGoalTurn) {
|
|
714
|
+
throw new FatalInputError(
|
|
715
|
+
"The Goal runtime did not schedule a continuation."
|
|
716
|
+
);
|
|
717
|
+
}
|
|
718
|
+
initialPartList = buildGoalContinuationParts(activeGoalTurn);
|
|
719
|
+
slashHandled = true;
|
|
720
|
+
break;
|
|
721
|
+
}
|
|
468
722
|
case "message": {
|
|
469
723
|
await emitNonInteractiveFinalMessage({
|
|
470
724
|
message: slashCommandResult.content,
|
|
@@ -614,6 +868,43 @@ ${text}
|
|
|
614
868
|
}
|
|
615
869
|
}
|
|
616
870
|
}
|
|
871
|
+
const initialSendType = continueSendType ?? options.sendMessageType ?? "userQuery" /* UserQuery */;
|
|
872
|
+
if (!activeGoalTurn && initialSendType === "userQuery" /* UserQuery */) {
|
|
873
|
+
try {
|
|
874
|
+
const runtime = await config.getGoalRuntimeReady();
|
|
875
|
+
observeGoalRuntime(runtime);
|
|
876
|
+
if (runtime.getSnapshot().goal?.status === "active") {
|
|
877
|
+
const permit = await claimUserGoalTurn(
|
|
878
|
+
runtime,
|
|
879
|
+
prompt_id,
|
|
880
|
+
abortController.signal
|
|
881
|
+
);
|
|
882
|
+
if (abortController.signal.aborted) {
|
|
883
|
+
await routeAbort();
|
|
884
|
+
}
|
|
885
|
+
if (permit) {
|
|
886
|
+
const goal = runtime.getSnapshot().goal;
|
|
887
|
+
if (!goal) {
|
|
888
|
+
throw new Error("Goal turn admission lost its active Goal");
|
|
889
|
+
}
|
|
890
|
+
const verifierFeedback = runtime.getVerifierFeedback(permit);
|
|
891
|
+
activeGoalTurn = {
|
|
892
|
+
permit,
|
|
893
|
+
turnKey: prompt_id,
|
|
894
|
+
controller: new AbortController(),
|
|
895
|
+
origin: "user",
|
|
896
|
+
continuationContext: goal.objective,
|
|
897
|
+
...verifierFeedback ? { verifierFeedback } : {}
|
|
898
|
+
};
|
|
899
|
+
bindGoalHost();
|
|
900
|
+
}
|
|
901
|
+
}
|
|
902
|
+
} catch (error) {
|
|
903
|
+
if (!(error instanceof GoalPersistenceUnavailableError)) {
|
|
904
|
+
throw error;
|
|
905
|
+
}
|
|
906
|
+
}
|
|
907
|
+
}
|
|
617
908
|
let currentMessages = [{ role: "user", parts: initialParts }];
|
|
618
909
|
const registry = config.getBackgroundTaskRegistry();
|
|
619
910
|
registry.setNotificationCallback((displayText, modelText, meta) => {
|
|
@@ -681,6 +972,7 @@ ${text}
|
|
|
681
972
|
});
|
|
682
973
|
}
|
|
683
974
|
let isFirstTurn = true;
|
|
975
|
+
let isFirstGoalSegment = activeGoalTurn !== void 0;
|
|
684
976
|
let hasUnsentToolResponse = false;
|
|
685
977
|
let modelOverride = inlineModelOverride ?? fullTurnModelOverride;
|
|
686
978
|
const inlineModelOverrideActive = inlineModelOverride !== void 0;
|
|
@@ -696,6 +988,9 @@ ${text}
|
|
|
696
988
|
let loopDetected = false;
|
|
697
989
|
let loopDetectedMessage = formatLoopDetectedMessage(void 0);
|
|
698
990
|
const emitStructuredSuccess = /* @__PURE__ */ __name(async () => {
|
|
991
|
+
await failClosedActiveGoalTurn(
|
|
992
|
+
"Headless Goal ended with structured output"
|
|
993
|
+
);
|
|
699
994
|
registry.abortAll();
|
|
700
995
|
const holdbackDeadline = Date.now() + STRUCTURED_SHUTDOWN_HOLDBACK_MS;
|
|
701
996
|
while (Date.now() < holdbackDeadline && registry.hasUnfinalizedTasks()) {
|
|
@@ -718,6 +1013,9 @@ ${text}
|
|
|
718
1013
|
return 0;
|
|
719
1014
|
}, "emitStructuredSuccess");
|
|
720
1015
|
const emitLoopDetectedResult = /* @__PURE__ */ __name(async () => {
|
|
1016
|
+
await failClosedActiveGoalTurn(
|
|
1017
|
+
"Headless Goal stopped after loop detection"
|
|
1018
|
+
);
|
|
721
1019
|
registry.abortAll();
|
|
722
1020
|
flushQueuedNotificationsToSdk(localQueue);
|
|
723
1021
|
finalizeOneShotMonitors();
|
|
@@ -742,6 +1040,7 @@ ${text}
|
|
|
742
1040
|
const handledProviderToolCallIds = geminiClient.getHistoryFunctionResponseIds();
|
|
743
1041
|
const duplicateProviderToolCallResponseIds = /* @__PURE__ */ new Set();
|
|
744
1042
|
const processToolCallBatch = /* @__PURE__ */ __name(async (batchRequests, setModelOverride, runtimeView) => {
|
|
1043
|
+
let terminateTurn = false;
|
|
745
1044
|
const responseByRequest = /* @__PURE__ */ new Map();
|
|
746
1045
|
const statusByResponse = /* @__PURE__ */ new Map();
|
|
747
1046
|
const structuredOutputActive = config.getJsonSchema() && batchRequests.some((r) => r.name === ToolNames.STRUCTURED_OUTPUT);
|
|
@@ -777,7 +1076,8 @@ ${text}
|
|
|
777
1076
|
);
|
|
778
1077
|
return {
|
|
779
1078
|
responseParts: [],
|
|
780
|
-
repeatedDuplicateProviderToolCall: true
|
|
1079
|
+
repeatedDuplicateProviderToolCall: true,
|
|
1080
|
+
terminateTurn: false
|
|
781
1081
|
};
|
|
782
1082
|
}
|
|
783
1083
|
const respondedRequests = /* @__PURE__ */ new Set();
|
|
@@ -838,7 +1138,10 @@ ${text}
|
|
|
838
1138
|
const response = await executeToolCall(
|
|
839
1139
|
config,
|
|
840
1140
|
requestInfo,
|
|
841
|
-
|
|
1141
|
+
activeGoalTurn ? AbortSignal.any([
|
|
1142
|
+
abortController.signal,
|
|
1143
|
+
activeGoalTurn.controller.signal
|
|
1144
|
+
]) : abortController.signal,
|
|
842
1145
|
{
|
|
843
1146
|
recordToolResult: false,
|
|
844
1147
|
onToolResultFullTurnModel: /* @__PURE__ */ __name((model) => {
|
|
@@ -874,6 +1177,7 @@ ${text}
|
|
|
874
1177
|
}
|
|
875
1178
|
adapter.emitToolResult(requestInfo, toolResponse);
|
|
876
1179
|
responseByRequest.set(requestInfo, toolResponse);
|
|
1180
|
+
terminateTurn ||= toolResponse.terminateTurn === true;
|
|
877
1181
|
config.getGeminiClient().recordCompletedToolCall(
|
|
878
1182
|
requestInfo.name,
|
|
879
1183
|
requestInfo.args
|
|
@@ -903,14 +1207,16 @@ ${text}
|
|
|
903
1207
|
responseParts,
|
|
904
1208
|
resultDisplay: error.message,
|
|
905
1209
|
error,
|
|
906
|
-
errorType: "execution_denied" /* EXECUTION_DENIED
|
|
1210
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
1211
|
+
executionStatus: "not_started"
|
|
907
1212
|
});
|
|
908
1213
|
responseByRequest.set(requestInfo, {
|
|
909
1214
|
callId: requestInfo.callId,
|
|
910
1215
|
responseParts,
|
|
911
1216
|
resultDisplay: error.message,
|
|
912
1217
|
error,
|
|
913
|
-
errorType: "execution_denied" /* EXECUTION_DENIED
|
|
1218
|
+
errorType: "execution_denied" /* EXECUTION_DENIED */,
|
|
1219
|
+
executionStatus: "not_started"
|
|
914
1220
|
});
|
|
915
1221
|
executedRequests.add(requestInfo);
|
|
916
1222
|
}, "finalizePlanModeEntrySiblingSkip");
|
|
@@ -1006,7 +1312,8 @@ ${text}
|
|
|
1006
1312
|
responseParts,
|
|
1007
1313
|
resultDisplay: skippedOutput,
|
|
1008
1314
|
error: void 0,
|
|
1009
|
-
errorType: void 0
|
|
1315
|
+
errorType: void 0,
|
|
1316
|
+
executionStatus: "not_started"
|
|
1010
1317
|
};
|
|
1011
1318
|
adapter.emitToolResult(call, toolResponse);
|
|
1012
1319
|
responseByRequest.set(call, toolResponse);
|
|
@@ -1047,12 +1354,14 @@ ${text}
|
|
|
1047
1354
|
status: statusByResponse.get(response) ?? (response.error ? "error" : "success"),
|
|
1048
1355
|
resultDisplay: response.resultDisplay,
|
|
1049
1356
|
error: response.error,
|
|
1050
|
-
errorType: response.errorType
|
|
1357
|
+
errorType: response.errorType,
|
|
1358
|
+
executionStatus: response.executionStatus
|
|
1051
1359
|
});
|
|
1052
1360
|
}
|
|
1053
1361
|
return {
|
|
1054
1362
|
responseParts: toolResponseParts,
|
|
1055
|
-
repeatedDuplicateProviderToolCall: false
|
|
1363
|
+
repeatedDuplicateProviderToolCall: false,
|
|
1364
|
+
terminateTurn
|
|
1056
1365
|
};
|
|
1057
1366
|
}, "processToolCallBatch");
|
|
1058
1367
|
let currentPromptId = prompt_id;
|
|
@@ -1061,7 +1370,7 @@ ${text}
|
|
|
1061
1370
|
if (!isFirstTurn && pendingTeammateMessages.length > 0) {
|
|
1062
1371
|
const batch = pendingTeammateMessages.splice(0);
|
|
1063
1372
|
const teammatePart = { text: batch.join("\n\n") };
|
|
1064
|
-
if (hasUnsentToolResponse && currentMessages[0]) {
|
|
1373
|
+
if ((hasUnsentToolResponse || activeGoalTurn) && currentMessages[0]) {
|
|
1065
1374
|
currentMessages[0].parts = [
|
|
1066
1375
|
...currentMessages[0].parts || [],
|
|
1067
1376
|
teammatePart
|
|
@@ -1073,12 +1382,12 @@ ${text}
|
|
|
1073
1382
|
}
|
|
1074
1383
|
hasUnsentToolResponse = false;
|
|
1075
1384
|
turnCount++;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
await handleMaxTurnsExceededError(config);
|
|
1079
|
-
}
|
|
1385
|
+
const goalTurn = activeGoalTurn;
|
|
1386
|
+
await enforceSessionTurnLimit(goalTurn?.origin === "runtime");
|
|
1080
1387
|
let sendType;
|
|
1081
|
-
if (
|
|
1388
|
+
if (goalTurn) {
|
|
1389
|
+
sendType = isFirstGoalSegment ? goalTurn.origin === "runtime" ? "goal" /* Goal */ : "userQuery" /* UserQuery */ : "toolResult" /* ToolResult */;
|
|
1390
|
+
} else if (isFirstTurn) {
|
|
1082
1391
|
sendType = continueSendType ?? options.sendMessageType ?? "userQuery" /* UserQuery */;
|
|
1083
1392
|
} else if (isTeammateTurn) {
|
|
1084
1393
|
sendType = "teammate" /* Teammate */;
|
|
@@ -1099,10 +1408,17 @@ ${text}
|
|
|
1099
1408
|
modelOverride,
|
|
1100
1409
|
...isFirstTurn && options.notificationDisplayText && {
|
|
1101
1410
|
notificationDisplayText: options.notificationDisplayText
|
|
1102
|
-
}
|
|
1411
|
+
},
|
|
1412
|
+
...goalTurn ? {
|
|
1413
|
+
goalPermit: goalTurn.permit,
|
|
1414
|
+
goalTurnKey: goalTurn.turnKey,
|
|
1415
|
+
goalSignal: goalTurn.controller.signal,
|
|
1416
|
+
goalOrigin: goalTurn.origin
|
|
1417
|
+
} : {}
|
|
1103
1418
|
}
|
|
1104
1419
|
);
|
|
1105
1420
|
isFirstTurn = false;
|
|
1421
|
+
isFirstGoalSegment = false;
|
|
1106
1422
|
adapter.startAssistantMessage();
|
|
1107
1423
|
for await (const event of responseStream) {
|
|
1108
1424
|
if (abortController.signal.aborted) {
|
|
@@ -1144,10 +1460,12 @@ ${text}
|
|
|
1144
1460
|
if (loopDetected) {
|
|
1145
1461
|
return emitLoopDetectedResult();
|
|
1146
1462
|
}
|
|
1463
|
+
let shouldFinalizeTurn = toolCallRequests.length === 0;
|
|
1147
1464
|
if (toolCallRequests.length > 0) {
|
|
1148
1465
|
const {
|
|
1149
1466
|
responseParts: toolResponseParts,
|
|
1150
|
-
repeatedDuplicateProviderToolCall
|
|
1467
|
+
repeatedDuplicateProviderToolCall,
|
|
1468
|
+
terminateTurn
|
|
1151
1469
|
} = await processToolCallBatch(
|
|
1152
1470
|
toolCallRequests,
|
|
1153
1471
|
(override) => {
|
|
@@ -1173,9 +1491,56 @@ ${text}
|
|
|
1173
1491
|
);
|
|
1174
1492
|
return emitLoopDetectedResult();
|
|
1175
1493
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1494
|
+
if (terminateTurn && activeGoalTurn) {
|
|
1495
|
+
geminiClient.addHistory({
|
|
1496
|
+
role: "user",
|
|
1497
|
+
parts: toolResponseParts
|
|
1498
|
+
});
|
|
1499
|
+
await config.getChatRecordingService?.()?.flush();
|
|
1500
|
+
await finishGoalTurn(activeGoalTurn);
|
|
1501
|
+
activeGoalTurn = void 0;
|
|
1502
|
+
const nextGoalTurn = queuedGoalTurns.shift();
|
|
1503
|
+
if (nextGoalTurn) {
|
|
1504
|
+
activeGoalTurn = nextGoalTurn;
|
|
1505
|
+
isFirstGoalSegment = true;
|
|
1506
|
+
currentMessages = [
|
|
1507
|
+
{
|
|
1508
|
+
role: "user",
|
|
1509
|
+
parts: buildGoalContinuationParts(nextGoalTurn)
|
|
1510
|
+
}
|
|
1511
|
+
];
|
|
1512
|
+
hasUnsentToolResponse = false;
|
|
1513
|
+
continue;
|
|
1514
|
+
}
|
|
1515
|
+
shouldFinalizeTurn = true;
|
|
1516
|
+
}
|
|
1517
|
+
if (!shouldFinalizeTurn) {
|
|
1518
|
+
currentMessages = [{ role: "user", parts: toolResponseParts }];
|
|
1519
|
+
hasUnsentToolResponse = true;
|
|
1520
|
+
}
|
|
1521
|
+
}
|
|
1522
|
+
if (shouldFinalizeTurn) {
|
|
1523
|
+
if (activeGoalTurn) {
|
|
1524
|
+
const completedGoalTurn = activeGoalTurn;
|
|
1525
|
+
await config.getChatRecordingService?.()?.flush();
|
|
1526
|
+
await finishGoalTurn(completedGoalTurn);
|
|
1527
|
+
if (activeGoalTurn === completedGoalTurn) {
|
|
1528
|
+
activeGoalTurn = void 0;
|
|
1529
|
+
}
|
|
1530
|
+
const nextGoalTurn = queuedGoalTurns.shift();
|
|
1531
|
+
if (nextGoalTurn) {
|
|
1532
|
+
activeGoalTurn = nextGoalTurn;
|
|
1533
|
+
isFirstGoalSegment = true;
|
|
1534
|
+
currentMessages = [
|
|
1535
|
+
{
|
|
1536
|
+
role: "user",
|
|
1537
|
+
parts: buildGoalContinuationParts(nextGoalTurn)
|
|
1538
|
+
}
|
|
1539
|
+
];
|
|
1540
|
+
hasUnsentToolResponse = false;
|
|
1541
|
+
continue;
|
|
1542
|
+
}
|
|
1543
|
+
}
|
|
1179
1544
|
const teamManager = config.getTeamManager();
|
|
1180
1545
|
if (teamManager?.hasActiveTeammates()) {
|
|
1181
1546
|
if (teamManager.allRemainingStalled()) {
|
|
@@ -1209,8 +1574,7 @@ ${text}
|
|
|
1209
1574
|
}
|
|
1210
1575
|
}
|
|
1211
1576
|
if (abortController.signal.aborted) {
|
|
1212
|
-
await
|
|
1213
|
-
await handleCancellationError(config);
|
|
1577
|
+
await routeAbort();
|
|
1214
1578
|
}
|
|
1215
1579
|
if (teamManager) {
|
|
1216
1580
|
await teamManager.drainLeaderInbox();
|
|
@@ -1239,10 +1603,7 @@ ${text}
|
|
|
1239
1603
|
todoWorkChainId: batch[0]?.todoWorkChainId
|
|
1240
1604
|
};
|
|
1241
1605
|
turnCount++;
|
|
1242
|
-
|
|
1243
|
-
await settleBeforeTerminalOutput();
|
|
1244
|
-
await handleMaxTurnsExceededError(config);
|
|
1245
|
-
}
|
|
1606
|
+
await enforceSessionTurnLimit(false);
|
|
1246
1607
|
let itemMessages = [
|
|
1247
1608
|
{ role: "user", parts: [{ text: item.modelText }] }
|
|
1248
1609
|
];
|
|
@@ -1465,6 +1826,9 @@ ${text}
|
|
|
1465
1826
|
}
|
|
1466
1827
|
}
|
|
1467
1828
|
} catch (error) {
|
|
1829
|
+
await failClosedActiveGoalTurn(
|
|
1830
|
+
error instanceof Error ? error.message : "Headless Goal execution failed"
|
|
1831
|
+
);
|
|
1468
1832
|
try {
|
|
1469
1833
|
adapter.finalizeAssistantMessage();
|
|
1470
1834
|
} catch {
|
|
@@ -1501,6 +1865,13 @@ ${text}
|
|
|
1501
1865
|
}
|
|
1502
1866
|
await handleError(error, config);
|
|
1503
1867
|
} finally {
|
|
1868
|
+
await failClosedActiveGoalTurn(
|
|
1869
|
+
"Headless Goal host stopped before its permit was released"
|
|
1870
|
+
);
|
|
1871
|
+
goalRuntimeUnsubscribe?.();
|
|
1872
|
+
goalRuntimeUnsubscribe = void 0;
|
|
1873
|
+
goalHostUnbind?.();
|
|
1874
|
+
goalHostUnbind = void 0;
|
|
1504
1875
|
if (workflowApprovalChannelRegistered) {
|
|
1505
1876
|
config.getWorkflowRunRegistry().setApprovalRequestCallback(void 0);
|
|
1506
1877
|
}
|