@qwen-code/qwen-code 0.21.3 → 0.21.4
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/settings.md +13 -0
- package/bundled/qc-helper/docs/features/channels/github.md +12 -8
- package/bundled/qc-helper/docs/features/code-review.md +14 -1
- package/bundled/qc-helper/docs/features/commands.md +46 -40
- 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 +67 -22
- package/chunks/{MaxSizedBox-OJR636GP.js → MaxSizedBox-5XDFQHTQ.js} +8 -7
- package/chunks/{StandaloneSessionPicker-AMMBF5UY.js → StandaloneSessionPicker-DLADA54K.js} +21 -20
- package/chunks/{acpAgent-M57LVIQA.js → acpAgent-MVEFZSBS.js} +48 -42
- package/chunks/{agent-PE37ARLM.js → agent-RB6LCRZX.js} +8 -7
- package/chunks/{agent-headless-45ASME4R.js → agent-headless-272ZACJV.js} +8 -7
- package/chunks/{anthropicContentGenerator-WCBYB6JG.js → anthropicContentGenerator-3CAHEZBM.js} +4 -2
- package/chunks/{bridge-K3ZRPO4D.js → bridge-GXUXFSHK.js} +9 -8
- 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-5UA2SABE.js} +14 -13
- package/chunks/{chunk-IWGTGH4G.js → chunk-2CCUHZP5.js} +2 -2
- package/chunks/{chunk-HUIQ4FYC.js → chunk-2JN5V3I7.js} +3 -3
- package/chunks/{chunk-BSKUTHLO.js → chunk-2ON2O4MD.js} +16 -3
- package/chunks/{chunk-QPSYIV2O.js → chunk-2T3RYG4L.js} +2039 -563
- package/chunks/{chunk-ZGSUFIL5.js → chunk-3PHUGFPH.js} +1 -1
- package/chunks/{chunk-QWW6I2UO.js → chunk-4CTV3FZH.js} +400 -33
- package/chunks/{chunk-6NE5NTHJ.js → chunk-4PZ7SPD5.js} +1 -1
- package/chunks/{chunk-2LZCLQIS.js → chunk-5XGI4IPK.js} +4 -4
- package/chunks/{chunk-GMSBXEH4.js → chunk-6KQUOXT5.js} +6 -6
- package/chunks/{chunk-2MI7ZTRT.js → chunk-6ME3PVMM.js} +4 -4
- package/chunks/{chunk-SRY26X4H.js → chunk-7UXI6P72.js} +11 -2
- package/chunks/{chunk-YU6TBRTA.js → chunk-A7PONO5G.js} +1 -1
- package/chunks/{chunk-N42C2FU3.js → chunk-AFJSRJTO.js} +1 -1
- package/chunks/{chunk-H6FIBBXK.js → chunk-AWTLFUVN.js} +11 -11
- package/chunks/{chunk-HIXVWF7I.js → chunk-B3EBXISV.js} +2 -2
- package/chunks/{chunk-3XF4WT3B.js → chunk-BC4LTKEG.js} +1 -1
- package/chunks/{chunk-ZJES4C3I.js → chunk-BOWKLLWA.js} +2 -2
- package/chunks/{chunk-SKSF3LGQ.js → chunk-C5YFS6VR.js} +3 -3
- package/chunks/{chunk-IF6K42YJ.js → chunk-C6FU76AA.js} +1 -1
- package/chunks/{chunk-VUNRNRN6.js → chunk-DHNFB7NC.js} +4 -4
- package/chunks/{chunk-LZV2BZPL.js → chunk-DJA7YBLJ.js} +2 -2
- package/chunks/{chunk-K2J5JZ6B.js → chunk-DOCBJIBL.js} +1 -1
- package/chunks/{chunk-X6WUYMOV.js → chunk-DTAPI453.js} +2 -2
- package/chunks/{chunk-XUMAD5IT.js → chunk-DZPOYHBT.js} +1 -1
- package/chunks/{chunk-UQDFEU47.js → chunk-E2SYUEIA.js} +463 -114
- package/chunks/{chunk-DSGJLHM3.js → chunk-EIAPOG76.js} +3 -3
- package/chunks/{chunk-EGYJRIDF.js → chunk-EJXATV5R.js} +2 -2
- package/chunks/{chunk-BKGA75MU.js → chunk-FPPVCCAH.js} +1 -1
- package/chunks/{chunk-KXWERR6P.js → chunk-FV4TUUDE.js} +10 -10
- package/chunks/{chunk-WY2ENRDN.js → chunk-G6KI6B5L.js} +1 -1
- package/chunks/{chunk-H6ZYP74A.js → chunk-GDREW3U5.js} +1 -1
- package/chunks/{chunk-BKXTHMOZ.js → chunk-HBCKZF2A.js} +1 -1
- package/chunks/chunk-HGCQ5SE7.js +136 -0
- package/chunks/{chunk-HEBW74ZW.js → chunk-HI4YGRJD.js} +3 -3
- package/chunks/{chunk-5JPVOYWA.js → chunk-I32URQI7.js} +4 -4
- package/chunks/{chunk-5VYFXHY2.js → chunk-IMGNGOGC.js} +3 -3
- package/chunks/{chunk-4K3RV3OA.js → chunk-JDJ7SC4E.js} +7 -3
- package/chunks/{chunk-22YFMJBW.js → chunk-KB6VSG2U.js} +58 -6
- package/chunks/{chunk-R7XNRHYD.js → chunk-KHSJSMFS.js} +1 -1
- package/chunks/{chunk-LGT3YMLN.js → chunk-LEZFUYPM.js} +1 -1
- package/chunks/{chunk-TZTBZ25J.js → chunk-LLMGP5IC.js} +1 -1
- package/chunks/{chunk-NW57GHNL.js → chunk-LPLMUGIM.js} +3 -3
- package/chunks/{chunk-L7FTDKCD.js → chunk-M2L4TMH3.js} +21 -3
- package/chunks/{chunk-RCXCGZG6.js → chunk-M6RNMBUO.js} +3 -3
- package/chunks/{chunk-D2GPKXCQ.js → chunk-O4IWFYUW.js} +4 -4
- package/chunks/{chunk-Q3G5L5KF.js → chunk-OOPFAIWP.js} +1 -1
- package/chunks/{chunk-MTR4JWQJ.js → chunk-P5UJMCVS.js} +4 -4
- package/chunks/{chunk-FF75UUB2.js → chunk-PCVMRBLN.js} +1 -1
- package/chunks/{chunk-XMJO6C44.js → chunk-PQ5JFCNL.js} +3 -3
- package/chunks/{chunk-SQ3YD5MI.js → chunk-PQEIKQXN.js} +1 -1
- package/chunks/{chunk-3MWNROHB.js → chunk-QXTGHZCX.js} +3 -3
- package/chunks/{chunk-TXABHVZD.js → chunk-QZQ72YF6.js} +1 -1
- package/chunks/{chunk-YPUHMQXV.js → chunk-RL2NPV5E.js} +1 -1
- package/chunks/{chunk-FXVHVCNA.js → chunk-RNKGMZEW.js} +1 -1
- package/chunks/{chunk-EIMKVOSF.js → chunk-SBBHZ3YT.js} +1 -1
- package/chunks/{chunk-QDWLUXKP.js → chunk-SV5X2EUV.js} +1 -1
- package/chunks/{chunk-YWMDTMAU.js → chunk-THLV7YGY.js} +2 -2
- package/chunks/{chunk-H35Q5CEG.js → chunk-TXZDRD36.js} +6 -6
- package/chunks/{chunk-MUEJ4R3E.js → chunk-UATJZOAJ.js} +3 -3
- package/chunks/{chunk-M5LIY7Y6.js → chunk-URVJ4AZC.js} +1 -1
- package/chunks/{chunk-4AGGSHCH.js → chunk-WDLQGFWP.js} +196 -52
- package/chunks/{chunk-RL6J3BPE.js → chunk-XGA6XHH3.js} +3 -3
- package/chunks/{chunk-QWDVZH24.js → chunk-XPAY4EMH.js} +3 -3
- package/chunks/{chunk-MCXMWLFT.js → chunk-XSOAW7FC.js} +5 -5
- package/chunks/{chunk-RR224BUP.js → chunk-ZLJQIGCH.js} +45 -1
- package/chunks/{chunk-FG63DZQA.js → chunk-ZRQY5BBS.js} +9 -9
- package/chunks/{computer-use-UJMK6JQU.js → computer-use-MDOMIVTL.js} +8 -7
- package/chunks/{config-utils-7COTJMWK.js → config-utils-E3ZQTHGM.js} +2 -2
- package/chunks/{contextCommand-4YABGF4S.js → contextCommand-FCK3CB37.js} +10 -9
- package/chunks/{core-runtime-7M4VM3DA.js → core-runtime-UHRHHU2O.js} +8 -7
- package/chunks/{create-sub-session-HOFDW4N7.js → create-sub-session-MIXUVLWW.js} +20 -13
- package/chunks/{daemon-status-provider-W2U5Q3J5.js → daemon-status-provider-6LC7LUNR.js} +13 -12
- package/chunks/{daemon-trust-policy-IFICWPXP.js → daemon-trust-policy-Y36HGRAM.js} +13 -12
- package/chunks/{daemon-trust-policy-monitor-GX7EO6FW.js → daemon-trust-policy-monitor-ROTBBDOH.js} +13 -12
- package/chunks/{de-A6TI4LBB.js → de-VL76CPLV.js} +4 -0
- package/chunks/{deferred-core-runtime-U36OOOKE.js → deferred-core-runtime-ZQ4JIAJD.js} +8 -7
- package/chunks/{display-image-VS3TXYQH.js → display-image-2WOG27DY.js} +1 -1
- 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-GPRUNXTP.js} +8 -7
- package/chunks/{edit-J7SW6UP6.js → edit-YK3UP6D2.js} +8 -7
- package/chunks/{en-L4UQDLWW.js → en-IRJ2WN5T.js} +4 -0
- package/chunks/{enter-worktree-NRLOHRB6.js → enter-worktree-QMVQW7UG.js} +8 -7
- package/chunks/{enterPlanMode-GDSTEFSM.js → enterPlanMode-TZAYQ5MP.js} +8 -7
- package/chunks/{environment-KHYEKG5W.js → environment-3UQURCZG.js} +10 -9
- package/chunks/{errors-VNLAJV3O.js → errors-VBIMTNNI.js} +10 -9
- package/chunks/{exit-worktree-ARVID7DF.js → exit-worktree-4EC7LBBC.js} +8 -7
- package/chunks/{exitPlanMode-4ZFY7KUH.js → exitPlanMode-K5Y3REU2.js} +8 -7
- package/chunks/{fast-path-KA65VREJ.js → fast-path-KS6IE7YR.js} +11 -2
- package/chunks/{fr-QF7RI5ZE.js → fr-GK3HQYVB.js} +4 -0
- package/chunks/{gemini-5PMCNPF7.js → gemini-LTUCUOJH.js} +42 -40
- package/chunks/{geminiContentGenerator-NFSYJ4HA.js → geminiContentGenerator-M3HJTHKR.js} +1 -1
- package/chunks/{glob-F3EAUDAX.js → glob-SKUYGTF2.js} +8 -7
- package/chunks/{grep-UJMPVZER.js → grep-SQ7RD7SV.js} +8 -7
- package/chunks/{handleAutoUpdate-MG4FRZPN.js → handleAutoUpdate-OK7OX23A.js} +12 -11
- package/chunks/{i18n-EVHV4ZF3.js → i18n-P77YBKY4.js} +9 -8
- package/chunks/{image-gen-UC7XVHI7.js → image-gen-2ZWPS42A.js} +1 -1
- package/chunks/{initializer-O5B6HUBI.js → initializer-PIOYXVW7.js} +13 -12
- package/chunks/{installationInfo-2LIKCNVX.js → installationInfo-IWMM6DPV.js} +9 -8
- package/chunks/{ja-URQESVGW.js → ja-3FA46IKD.js} +4 -0
- package/chunks/{list-BPKIE3Z4.js → list-3DCR4TRI.js} +16 -15
- package/chunks/{loadedSettingsAdapter-NGLFF4V4.js → loadedSettingsAdapter-EJC6CU5N.js} +13 -12
- package/chunks/{loggingContentGenerator-7TFESRG5.js → loggingContentGenerator-2JEFU25T.js} +3 -3
- package/chunks/{managed-npm-update-CLZGGV7F.js → managed-npm-update-EGVQPSBR.js} +9 -8
- package/chunks/{mcp-X5OZOOXX.js → mcp-KFFH2MBV.js} +13 -12
- package/chunks/{monitor-TGSVSAZZ.js → monitor-6Y3NDMTI.js} +8 -7
- package/chunks/{nonInteractiveCli-GUMJ5JLG.js → nonInteractiveCli-426IQDPE.js} +40 -38
- package/chunks/{notebook-edit-EZISE7IC.js → notebook-edit-373IQQLE.js} +8 -7
- package/chunks/{openaiContentGenerator-ZAKS5A6P.js → openaiContentGenerator-PGFSOMIQ.js} +3 -3
- package/chunks/{pidfile-PCMBX4LR.js → pidfile-Y4INDMHG.js} +8 -7
- package/chunks/{processUtils-2CSVE5BW.js → processUtils-6BCPCJZW.js} +2 -2
- package/chunks/{pt-EEEQXRUI.js → pt-3AOBKPIJ.js} +4 -0
- package/chunks/{qwenContentGenerator-S3H6PIC4.js → qwenContentGenerator-QC3KSHSX.js} +8 -8
- package/chunks/{qwenOAuth2-MNU425VE.js → qwenOAuth2-IOAXKJ3L.js} +1 -1
- package/chunks/{read-file-HXJXHBI6.js → read-file-2T54FYZV.js} +2 -2
- package/chunks/{resumeHistoryUtils-4QAMC2S6.js → resumeHistoryUtils-O62RDCZ3.js} +11 -10
- package/chunks/{ripGrep-MCETPF2E.js → ripGrep-3H72KY7S.js} +8 -7
- package/chunks/{ru-WGZDYQAB.js → ru-VJRAMC4W.js} +4 -0
- package/chunks/{run-qwen-serve-3NMODTXV.js → run-qwen-serve-3AIDNNHO.js} +82 -35
- package/chunks/{runtime-AQOV7DVP.js → runtime-AZ4EHHFV.js} +16 -15
- package/chunks/{scheduler-DN7SZ6ZE.js → scheduler-L4UUCU4Z.js} +8 -7
- package/chunks/{send-message-HGCVVDTZ.js → send-message-LHJLVWFD.js} +2 -2
- package/chunks/{serve-WZB45HVT.js → serve-CLXGSYOE.js} +14 -12
- package/chunks/{server-GOTZFEEZ.js → server-MEAE3WMM.js} +36 -34
- package/chunks/{session-23LOFLWN.js → session-OSLD2LT5.js} +41 -39
- package/chunks/{settings-LI2ORVXC.js → settings-ILWAOKA4.js} +12 -11
- package/chunks/{shell-GLC6OP3C.js → shell-RT5DBH6B.js} +8 -7
- package/chunks/{skill-C7W6M4GO.js → skill-LVGA3ATZ.js} +2 -2
- package/chunks/{skill-settings-W25NCK5I.js → skill-settings-WTZE7EPE.js} +12 -11
- package/chunks/{spawnChannel-OHJLEBLD.js → spawnChannel-BOBS7DVM.js} +8 -7
- package/chunks/{standalone-update-E4V5V7WT.js → standalone-update-Y5JB4S2K.js} +10 -9
- package/chunks/{startInteractiveUI-FKILLW7Q.js → startInteractiveUI-ZV25CD2S.js} +62 -50
- package/chunks/{task-create-CSCEG4SM.js → task-create-4ALZMGP5.js} +3 -3
- package/chunks/{task-update-C52LNFU5.js → task-update-IKCEEWJ6.js} +3 -3
- package/chunks/{team-create-HBIJ7NHT.js → team-create-ZVPQIXCP.js} +8 -7
- package/chunks/{team-plan-approval-IBJOKS4J.js → team-plan-approval-5UHUBY3W.js} +8 -7
- package/chunks/{terminal-image-renderer-BOQJPVLB.js → terminal-image-renderer-NWC2RALG.js} +8 -7
- package/chunks/{theme-manager-NSS7VLUD.js → theme-manager-5KICSBOB.js} +8 -7
- package/chunks/{todoWrite-YKAA57W2.js → todoWrite-FTZWQRZH.js} +2 -1
- package/chunks/{tool-search-DEAS54VG.js → tool-search-2AOU77H4.js} +4 -4
- package/chunks/{total-session-admission-4LWTX3WD.js → total-session-admission-FR7RMHVL.js} +9 -8
- package/chunks/{trustedFolders-NF3J2TA7.js → trustedFolders-V7UUPQXO.js} +9 -8
- package/chunks/{update-relaunch-WUHRH5V3.js → update-relaunch-TBWRMQD6.js} +5 -5
- package/chunks/{updateCheck-7EG4BLBH.js → updateCheck-42SPCLH7.js} +11 -10
- package/chunks/{useAutoAcceptIndicator-ZRV56GVP.js → useAutoAcceptIndicator-4C2KM345.js} +14 -13
- package/chunks/{validateNonInterActiveAuth-WC2FPE3I.js → validateNonInterActiveAuth-UVFRXV3Z.js} +37 -35
- package/chunks/{version-6SS7KCUP.js → version-HKTV6TPN.js} +1 -1
- package/chunks/{web-fetch-Y5QQMPKA.js → web-fetch-ZRXSV5AN.js} +2 -2
- package/chunks/{web-search-QKKEU723.js → web-search-WOLV3L6T.js} +2 -2
- package/chunks/{workflow-PWIU6Q2M.js → workflow-F63ES3OB.js} +9 -8
- package/chunks/{workspace-providers-status-B2DM6FNK.js → workspace-providers-status-PJMGMYMC.js} +15 -14
- package/chunks/{workspace-registration-store-7Y33TTHJ.js → workspace-registration-store-LNBOX5TJ.js} +1 -1
- package/chunks/{workspace-registry-TSNJKLPC.js → workspace-registry-4PR7VDQ3.js} +9 -8
- package/chunks/{workspace-service-4I2QHDX4.js → workspace-service-PVI3VUNQ.js} +16 -15
- package/chunks/{workspace-skills-status-HVXNWVGR.js → workspace-skills-status-2Q5ZISO6.js} +13 -12
- package/chunks/{workspace-trust-reconciler-RDBBGMWP.js → workspace-trust-reconciler-NOILUH3C.js} +14 -13
- package/chunks/{write-file-RQ4DG5RY.js → write-file-MOM4JDHG.js} +8 -7
- 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-E3VHRCFU.js} +2 -2
- 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-GpdmhIxr.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CpnOJqNE.js → architectureDiagram-3BPJPVTR-C-LhCgH_.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-NxVTiWnk.js → blockDiagram-GPEHLZMM-CzNdTCm-.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BWT75l82.js → c4Diagram-AAUBKEIU-Ce7hbrRM.js} +1 -1
- package/web-shell/assets/channel-95y6Rcp3.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Dzz03hk6.js → chunk-2J33WTMH-BBSEn1PK.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DRF-egfm.js → chunk-4BX2VUAB-_llgjfe5.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-Co15vq5x.js → chunk-55IACEB6-9fJZ_oZE.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DHSUk1J7.js → chunk-727SXJPM-DgEzQWOu.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Br8u_E2R.js → chunk-AQP2D5EJ-B4RthUTc.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DXbPTnqF.js → chunk-FMBD7UC4-CDI-emMW.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BleQdi4d.js → chunk-ND2GUHAM-jM2-yOd8.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CqgBf-95.js → chunk-QZHKN3VN-XGZHlKPF.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-pfzVkmjQ.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-pfzVkmjQ.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-WS7b13Yg.js → cose-bilkent-S5V4N54A-90nbW1xQ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-v_55ki8o.js → dagre-BM42HDAG-BtzlyqZ9.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DaYAjbdK.js → diagram-2AECGRRQ-DAaqGWaH.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-D_Hy-L64.js → diagram-5GNKFQAL-CxlzSIFa.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-dB06cZyD.js → diagram-KO2AKTUF-8kj-1H6u.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DzSluD4F.js → diagram-LMA3HP47-6NhjFwRF.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Cvb6CeXQ.js → diagram-OG6HWLK6-Bn9kvInz.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-7eB2Hmov.js → erDiagram-TEJ5UH35-CaRoGsAt.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-B08iGCw_.js → flowDiagram-I6XJVG4X-TkLweHdf.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgsrCHq-.js → ganttDiagram-6RSMTGT7-ruwhCKBl.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DQLurQ2i.js → gitGraphDiagram-PVQCEYII-DNI_PxoU.js} +1 -1
- package/web-shell/assets/{index-DJ-z1Oba.js → index-T4KluHvu.js} +336 -336
- package/web-shell/assets/{index-Bi1dP2mU.css → index-WxSvj2tI.css} +2 -2
- package/web-shell/assets/{index-B_1Z0Mgr.js → index-p1gz-sxE.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-DXZGO8qB.js → infoDiagram-5YYISTIA-DarXq1-A.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-g7gbuH2w.js → ishikawaDiagram-YF4QCWOH-GxDaDlT0.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-euefICGn.js → journeyDiagram-JHISSGLW-mDEoGBzY.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dws8-mjG.js → kanban-definition-UN3LZRKU-Ds0t-Mup.js} +1 -1
- package/web-shell/assets/{linear-C63F0tyh.js → linear-05nJ0xZ7.js} +1 -1
- package/web-shell/assets/{mermaid.core-fLrhp_4-.js → mermaid.core-Bua24ThM.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-qRkydfT-.js → mindmap-definition-RKZ34NQL-D_zRdvUS.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BZ0wQaKN.js → pieDiagram-4H26LBE5-DZHr1x16.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Fjq6GbSZ.js → quadrantDiagram-W4KKPZXB-HA06Wf0h.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CqWvjLHU.js → requirementDiagram-4Y6WPE33-DH3urmJf.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-VcXX6PVZ.js → sankeyDiagram-5OEKKPKP-C4xgz0TT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BJSRtxFr.js → sequenceDiagram-3UESZ5HK-DAUoZWgv.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-Dt9zUwmZ.js → stateDiagram-AJRCARHV-v7NzXy4l.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CtdFexEf.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DQwlNRws.js → timeline-definition-PNZ67QCA-B3GTYR2W.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DwxjUEtQ.js → vennDiagram-CIIHVFJN-BWHjSPAq.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D3QdMSpJ.js → wardley-L42UT6IY-m9r6IUBC.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BddN8oK8.js → wardleyDiagram-YWT4CUSO-kT0FkVfK.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUNuBrRJ.js → xychartDiagram-2RQKCTM6-CYRm10z5.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/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-3PHUGFPH.js";
|
|
7
7
|
import {
|
|
8
8
|
handleAtCommand
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-PQ5JFCNL.js";
|
|
10
10
|
import {
|
|
11
11
|
JsonOutputAdapter
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DOCBJIBL.js";
|
|
13
13
|
import {
|
|
14
14
|
StreamJsonOutputAdapter
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-M2L4TMH3.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-WDLQGFWP.js";
|
|
28
28
|
import {
|
|
29
29
|
RunBudgetEnforcer,
|
|
30
30
|
cleanupReviewWorktreeLeases
|
|
31
|
-
} from "./chunk-
|
|
31
|
+
} from "./chunk-2T3RYG4L.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-EJXATV5R.js";
|
|
40
40
|
import {
|
|
41
41
|
isInlineModelOverrideAllowed
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-IMGNGOGC.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-E2SYUEIA.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-HFVW54NL.js";
|
|
67
70
|
import {
|
|
68
71
|
isSystemReminderContent
|
|
69
|
-
} from "./chunk-
|
|
72
|
+
} from "./chunk-7UXI6P72.js";
|
|
70
73
|
import {
|
|
71
74
|
formatFullTurnVisionNotice,
|
|
72
75
|
formatVisionBridgeNotice,
|
|
@@ -76,7 +79,7 @@ import {
|
|
|
76
79
|
shouldRunVisionBridge,
|
|
77
80
|
splitImageParts,
|
|
78
81
|
uiTelemetryService
|
|
79
|
-
} from "./chunk-
|
|
82
|
+
} from "./chunk-JDJ7SC4E.js";
|
|
80
83
|
import {
|
|
81
84
|
ToolNames
|
|
82
85
|
} from "./chunk-CFDR3GNL.js";
|
|
@@ -90,7 +93,7 @@ import {
|
|
|
90
93
|
} from "./chunk-3RXUYQJI.js";
|
|
91
94
|
import {
|
|
92
95
|
registerCleanup
|
|
93
|
-
} from "./chunk-
|
|
96
|
+
} from "./chunk-SV5X2EUV.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
|
|
@@ -1052,7 +1356,8 @@ ${text}
|
|
|
1052
1356
|
}
|
|
1053
1357
|
return {
|
|
1054
1358
|
responseParts: toolResponseParts,
|
|
1055
|
-
repeatedDuplicateProviderToolCall: false
|
|
1359
|
+
repeatedDuplicateProviderToolCall: false,
|
|
1360
|
+
terminateTurn
|
|
1056
1361
|
};
|
|
1057
1362
|
}, "processToolCallBatch");
|
|
1058
1363
|
let currentPromptId = prompt_id;
|
|
@@ -1061,7 +1366,7 @@ ${text}
|
|
|
1061
1366
|
if (!isFirstTurn && pendingTeammateMessages.length > 0) {
|
|
1062
1367
|
const batch = pendingTeammateMessages.splice(0);
|
|
1063
1368
|
const teammatePart = { text: batch.join("\n\n") };
|
|
1064
|
-
if (hasUnsentToolResponse && currentMessages[0]) {
|
|
1369
|
+
if ((hasUnsentToolResponse || activeGoalTurn) && currentMessages[0]) {
|
|
1065
1370
|
currentMessages[0].parts = [
|
|
1066
1371
|
...currentMessages[0].parts || [],
|
|
1067
1372
|
teammatePart
|
|
@@ -1073,12 +1378,12 @@ ${text}
|
|
|
1073
1378
|
}
|
|
1074
1379
|
hasUnsentToolResponse = false;
|
|
1075
1380
|
turnCount++;
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
await handleMaxTurnsExceededError(config);
|
|
1079
|
-
}
|
|
1381
|
+
const goalTurn = activeGoalTurn;
|
|
1382
|
+
await enforceSessionTurnLimit(goalTurn?.origin === "runtime");
|
|
1080
1383
|
let sendType;
|
|
1081
|
-
if (
|
|
1384
|
+
if (goalTurn) {
|
|
1385
|
+
sendType = isFirstGoalSegment ? goalTurn.origin === "runtime" ? "goal" /* Goal */ : "userQuery" /* UserQuery */ : "toolResult" /* ToolResult */;
|
|
1386
|
+
} else if (isFirstTurn) {
|
|
1082
1387
|
sendType = continueSendType ?? options.sendMessageType ?? "userQuery" /* UserQuery */;
|
|
1083
1388
|
} else if (isTeammateTurn) {
|
|
1084
1389
|
sendType = "teammate" /* Teammate */;
|
|
@@ -1099,10 +1404,17 @@ ${text}
|
|
|
1099
1404
|
modelOverride,
|
|
1100
1405
|
...isFirstTurn && options.notificationDisplayText && {
|
|
1101
1406
|
notificationDisplayText: options.notificationDisplayText
|
|
1102
|
-
}
|
|
1407
|
+
},
|
|
1408
|
+
...goalTurn ? {
|
|
1409
|
+
goalPermit: goalTurn.permit,
|
|
1410
|
+
goalTurnKey: goalTurn.turnKey,
|
|
1411
|
+
goalSignal: goalTurn.controller.signal,
|
|
1412
|
+
goalOrigin: goalTurn.origin
|
|
1413
|
+
} : {}
|
|
1103
1414
|
}
|
|
1104
1415
|
);
|
|
1105
1416
|
isFirstTurn = false;
|
|
1417
|
+
isFirstGoalSegment = false;
|
|
1106
1418
|
adapter.startAssistantMessage();
|
|
1107
1419
|
for await (const event of responseStream) {
|
|
1108
1420
|
if (abortController.signal.aborted) {
|
|
@@ -1144,10 +1456,12 @@ ${text}
|
|
|
1144
1456
|
if (loopDetected) {
|
|
1145
1457
|
return emitLoopDetectedResult();
|
|
1146
1458
|
}
|
|
1459
|
+
let shouldFinalizeTurn = toolCallRequests.length === 0;
|
|
1147
1460
|
if (toolCallRequests.length > 0) {
|
|
1148
1461
|
const {
|
|
1149
1462
|
responseParts: toolResponseParts,
|
|
1150
|
-
repeatedDuplicateProviderToolCall
|
|
1463
|
+
repeatedDuplicateProviderToolCall,
|
|
1464
|
+
terminateTurn
|
|
1151
1465
|
} = await processToolCallBatch(
|
|
1152
1466
|
toolCallRequests,
|
|
1153
1467
|
(override) => {
|
|
@@ -1173,9 +1487,56 @@ ${text}
|
|
|
1173
1487
|
);
|
|
1174
1488
|
return emitLoopDetectedResult();
|
|
1175
1489
|
}
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1490
|
+
if (terminateTurn && activeGoalTurn) {
|
|
1491
|
+
geminiClient.addHistory({
|
|
1492
|
+
role: "user",
|
|
1493
|
+
parts: toolResponseParts
|
|
1494
|
+
});
|
|
1495
|
+
await config.getChatRecordingService?.()?.flush();
|
|
1496
|
+
await finishGoalTurn(activeGoalTurn);
|
|
1497
|
+
activeGoalTurn = void 0;
|
|
1498
|
+
const nextGoalTurn = queuedGoalTurns.shift();
|
|
1499
|
+
if (nextGoalTurn) {
|
|
1500
|
+
activeGoalTurn = nextGoalTurn;
|
|
1501
|
+
isFirstGoalSegment = true;
|
|
1502
|
+
currentMessages = [
|
|
1503
|
+
{
|
|
1504
|
+
role: "user",
|
|
1505
|
+
parts: buildGoalContinuationParts(nextGoalTurn)
|
|
1506
|
+
}
|
|
1507
|
+
];
|
|
1508
|
+
hasUnsentToolResponse = false;
|
|
1509
|
+
continue;
|
|
1510
|
+
}
|
|
1511
|
+
shouldFinalizeTurn = true;
|
|
1512
|
+
}
|
|
1513
|
+
if (!shouldFinalizeTurn) {
|
|
1514
|
+
currentMessages = [{ role: "user", parts: toolResponseParts }];
|
|
1515
|
+
hasUnsentToolResponse = true;
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
if (shouldFinalizeTurn) {
|
|
1519
|
+
if (activeGoalTurn) {
|
|
1520
|
+
const completedGoalTurn = activeGoalTurn;
|
|
1521
|
+
await config.getChatRecordingService?.()?.flush();
|
|
1522
|
+
await finishGoalTurn(completedGoalTurn);
|
|
1523
|
+
if (activeGoalTurn === completedGoalTurn) {
|
|
1524
|
+
activeGoalTurn = void 0;
|
|
1525
|
+
}
|
|
1526
|
+
const nextGoalTurn = queuedGoalTurns.shift();
|
|
1527
|
+
if (nextGoalTurn) {
|
|
1528
|
+
activeGoalTurn = nextGoalTurn;
|
|
1529
|
+
isFirstGoalSegment = true;
|
|
1530
|
+
currentMessages = [
|
|
1531
|
+
{
|
|
1532
|
+
role: "user",
|
|
1533
|
+
parts: buildGoalContinuationParts(nextGoalTurn)
|
|
1534
|
+
}
|
|
1535
|
+
];
|
|
1536
|
+
hasUnsentToolResponse = false;
|
|
1537
|
+
continue;
|
|
1538
|
+
}
|
|
1539
|
+
}
|
|
1179
1540
|
const teamManager = config.getTeamManager();
|
|
1180
1541
|
if (teamManager?.hasActiveTeammates()) {
|
|
1181
1542
|
if (teamManager.allRemainingStalled()) {
|
|
@@ -1209,8 +1570,7 @@ ${text}
|
|
|
1209
1570
|
}
|
|
1210
1571
|
}
|
|
1211
1572
|
if (abortController.signal.aborted) {
|
|
1212
|
-
await
|
|
1213
|
-
await handleCancellationError(config);
|
|
1573
|
+
await routeAbort();
|
|
1214
1574
|
}
|
|
1215
1575
|
if (teamManager) {
|
|
1216
1576
|
await teamManager.drainLeaderInbox();
|
|
@@ -1239,10 +1599,7 @@ ${text}
|
|
|
1239
1599
|
todoWorkChainId: batch[0]?.todoWorkChainId
|
|
1240
1600
|
};
|
|
1241
1601
|
turnCount++;
|
|
1242
|
-
|
|
1243
|
-
await settleBeforeTerminalOutput();
|
|
1244
|
-
await handleMaxTurnsExceededError(config);
|
|
1245
|
-
}
|
|
1602
|
+
await enforceSessionTurnLimit(false);
|
|
1246
1603
|
let itemMessages = [
|
|
1247
1604
|
{ role: "user", parts: [{ text: item.modelText }] }
|
|
1248
1605
|
];
|
|
@@ -1465,6 +1822,9 @@ ${text}
|
|
|
1465
1822
|
}
|
|
1466
1823
|
}
|
|
1467
1824
|
} catch (error) {
|
|
1825
|
+
await failClosedActiveGoalTurn(
|
|
1826
|
+
error instanceof Error ? error.message : "Headless Goal execution failed"
|
|
1827
|
+
);
|
|
1468
1828
|
try {
|
|
1469
1829
|
adapter.finalizeAssistantMessage();
|
|
1470
1830
|
} catch {
|
|
@@ -1501,6 +1861,13 @@ ${text}
|
|
|
1501
1861
|
}
|
|
1502
1862
|
await handleError(error, config);
|
|
1503
1863
|
} finally {
|
|
1864
|
+
await failClosedActiveGoalTurn(
|
|
1865
|
+
"Headless Goal host stopped before its permit was released"
|
|
1866
|
+
);
|
|
1867
|
+
goalRuntimeUnsubscribe?.();
|
|
1868
|
+
goalRuntimeUnsubscribe = void 0;
|
|
1869
|
+
goalHostUnbind?.();
|
|
1870
|
+
goalHostUnbind = void 0;
|
|
1504
1871
|
if (workflowApprovalChannelRegistered) {
|
|
1505
1872
|
config.getWorkflowRunRegistry().setApprovalRequestCallback(void 0);
|
|
1506
1873
|
}
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
getExtensionManager
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-O4IWFYUW.js";
|
|
6
6
|
import {
|
|
7
7
|
parseChannelConfig
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-LEZFUYPM.js";
|
|
9
9
|
import {
|
|
10
10
|
getPlugin,
|
|
11
11
|
registerPlugin
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DTAPI453.js";
|
|
13
13
|
import {
|
|
14
14
|
sanitizeLogText
|
|
15
15
|
} from "./chunk-DIEFUBV6.js";
|
|
16
16
|
import {
|
|
17
17
|
loadSettings
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-KB6VSG2U.js";
|
|
19
19
|
import {
|
|
20
20
|
hashDaemonWorkspace
|
|
21
21
|
} from "./chunk-RPYYTL7E.js";
|