@qwen-code/qwen-code 0.21.10 → 0.21.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/coordinate/SKILL.md +52 -0
- package/bundled/qc-helper/docs/configuration/model-providers.md +10 -8
- package/bundled/qc-helper/docs/extension/_meta.ts +1 -0
- package/bundled/qc-helper/docs/extension/agent-plugins.md +50 -0
- package/bundled/qc-helper/docs/extension/extension-releasing.md +3 -3
- package/bundled/qc-helper/docs/extension/introduction.md +17 -3
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/arena.md +4 -3
- package/bundled/qc-helper/docs/features/commands.md +7 -6
- package/bundled/qc-helper/docs/features/dual-output.md +5 -0
- package/bundled/qc-helper/docs/features/headless.md +8 -0
- package/bundled/qc-helper/docs/features/multi-agent-coordination.md +30 -0
- package/bundled/qc-helper/docs/qwen-serve.md +7 -7
- package/bundled/review/SKILL.md +17 -7
- package/chunks/{MaxSizedBox-FKXYULMW.js → MaxSizedBox-G7QPSZTF.js} +45 -44
- package/chunks/{StandaloneSessionPicker-OQS3M7AY.js → StandaloneSessionPicker-3CTEPV7S.js} +65 -64
- package/chunks/{acp-startup-profiler-VNTFWYAC.js → acp-startup-profiler-JMJBZDVO.js} +2 -2
- package/chunks/{acpAgent-AGS6HLQQ.js → acpAgent-43JURWOW.js} +1107 -285
- package/chunks/{agent-4NCVO27U.js → agent-MIY4LJJJ.js} +42 -41
- package/chunks/agent-headless-LWVA6GR5.js +87 -0
- package/chunks/{anthropicContentGenerator-D3Y4RFT4.js → anthropicContentGenerator-7HEP7Q5D.js} +8 -8
- package/chunks/{artifact-tool-N652YE4L.js → artifact-tool-M7UAJ5NT.js} +2 -2
- package/chunks/{askUserQuestion-ONW74PKJ.js → askUserQuestion-7G3LI3IZ.js} +2 -2
- package/chunks/{bridge-FHINXZMN.js → bridge-PTTJEBNP.js} +47 -46
- package/chunks/{ca-ZLKAB4K3.js → ca-4CQ6MYNQ.js} +2 -1
- package/chunks/{channel-management-service-PHELKOW2.js → channel-management-service-PQ6SU56M.js} +6 -6
- package/chunks/channel-settings-store-IKK34GMH.js +102 -0
- package/chunks/{channel-worker-group-WQP4RCDO.js → channel-worker-group-WBRE33ZV.js} +8 -7
- package/chunks/{channel-worker-manager-MRDFAKIM.js → channel-worker-manager-V4LYVTPH.js} +8 -7
- package/chunks/{channel-worker-supervisor-IVSDIMI4.js → channel-worker-supervisor-YDAGW2RP.js} +6 -5
- package/chunks/{chunk-2PLNY5TN.js → chunk-23GFHEM3.js} +4 -4
- package/chunks/{chunk-IIJEYBNH.js → chunk-25OFRBH2.js} +188 -58
- package/chunks/{chunk-F24A2JBM.js → chunk-2AAFGCWP.js} +690 -151
- package/chunks/{chunk-J6SZID63.js → chunk-2AZMF6G5.js} +2 -2
- package/chunks/{chunk-6LP743KE.js → chunk-2R2HYSUQ.js} +21 -102
- package/chunks/{chunk-DZUO626D.js → chunk-2XZWO53E.js} +3 -3
- package/chunks/{chunk-VKJ4KTPJ.js → chunk-3GCU5O2E.js} +1 -1
- package/chunks/{chunk-AQAJJMRR.js → chunk-3LHYTQ2R.js} +1 -1
- package/chunks/{chunk-QJMOAMXT.js → chunk-3SOTXJNO.js} +8 -8
- package/chunks/{chunk-URKIBIFC.js → chunk-45HPDU3F.js} +3 -3
- package/chunks/{chunk-OWMAZHIX.js → chunk-47FQVRCO.js} +1 -1
- package/chunks/{chunk-Z4JX4NSH.js → chunk-4C4QSXE3.js} +23 -23
- package/chunks/{chunk-IRZ2ZH72.js → chunk-4EX3DBFH.js} +4 -4
- package/chunks/{chunk-MFDYOYZZ.js → chunk-4MHDNGAV.js} +25 -2
- package/chunks/{chunk-ABVRJU3D.js → chunk-4PFKN7CQ.js} +7 -7
- package/chunks/{chunk-HV76SFIA.js → chunk-5HBFERG5.js} +3 -3
- package/chunks/{chunk-WAUGQKUU.js → chunk-6LYDH7VT.js} +9 -5
- package/chunks/{chunk-S6HYI3MF.js → chunk-6S52N6PG.js} +2 -2
- package/chunks/{chunk-FVKHVJZQ.js → chunk-732MOPEM.js} +1 -1
- package/chunks/{chunk-OCSFNUU4.js → chunk-7QE3QFU3.js} +8 -8
- package/chunks/{chunk-WCG5O7IP.js → chunk-7SUQZ7QH.js} +2 -2
- package/chunks/{chunk-QG3FFJYU.js → chunk-AAOONL5N.js} +1 -1
- package/chunks/{chunk-VSFKIRRW.js → chunk-AKLY5M2C.js} +4 -4
- package/chunks/{chunk-UVX4Y6IN.js → chunk-AQHNAA7E.js} +1 -1
- package/chunks/{chunk-IBUGFUXC.js → chunk-BIXG46YI.js} +12 -12
- package/chunks/{chunk-4TRQPFDP.js → chunk-BJKREW56.js} +6 -8
- package/chunks/{chunk-D27I6YJT.js → chunk-BNRNVMOT.js} +27 -18
- package/chunks/{chunk-IWTMYQ32.js → chunk-BR6TUEKJ.js} +9 -8
- package/chunks/{chunk-Q3JQ7OSU.js → chunk-BTYS2JAY.js} +1 -1
- package/chunks/{chunk-H6XPXXMH.js → chunk-CQ35AJ4Z.js} +252 -254
- package/chunks/{chunk-COBO5EBO.js → chunk-CTQE2NB2.js} +1 -1
- package/chunks/{chunk-P3BJLFSZ.js → chunk-DEKY5Y7V.js} +3 -3
- package/chunks/{chunk-Y3OVRWRY.js → chunk-DM4C3OX5.js} +1 -1
- package/chunks/{chunk-YWPSGJFI.js → chunk-DSKLWQHC.js} +2 -2
- package/chunks/{chunk-KKBPOU75.js → chunk-EFIMD5VA.js} +1 -1
- package/chunks/{chunk-CTJLZLB5.js → chunk-EN2J77G7.js} +1 -1
- package/chunks/{chunk-67EWJE77.js → chunk-ENEEQMGM.js} +1 -1
- package/chunks/{chunk-AEL7KN2O.js → chunk-EOBM4T2Z.js} +1 -1
- package/chunks/{chunk-NDU63YLI.js → chunk-ESVSQKPY.js} +4 -4
- package/chunks/{chunk-CPG6P4GG.js → chunk-EYS3GGM3.js} +1 -1
- package/chunks/{chunk-4PYCZH2V.js → chunk-EYW54TBD.js} +3 -3
- package/chunks/{chunk-EBZ6BJTF.js → chunk-F4T5J34H.js} +1 -1
- package/chunks/{chunk-FOGU3LJX.js → chunk-F6AOBFUN.js} +1 -1
- package/chunks/{chunk-ZBVS26BY.js → chunk-FPGTNKCP.js} +7 -5
- package/chunks/{chunk-YF5MALI4.js → chunk-G64M7R2Y.js} +5 -5
- package/chunks/{chunk-EI3HZX6C.js → chunk-GJJQV4PY.js} +1 -1
- package/chunks/{chunk-CKASRHZI.js → chunk-GLWWPFTW.js} +1 -1
- package/chunks/{chunk-GM463R2B.js → chunk-GZGDJ4E6.js} +1 -1
- package/chunks/{chunk-W5UC37EE.js → chunk-HHGQGTJQ.js} +2 -0
- package/chunks/chunk-HHJLM3WQ.js +41 -0
- package/chunks/{chunk-ZRBMO3C7.js → chunk-HMCSRTDY.js} +1 -1
- package/chunks/{chunk-L2AFWWJE.js → chunk-HUE2M6VI.js} +50 -5
- package/chunks/{chunk-LLCWZQCU.js → chunk-HZV75ET2.js} +3 -3
- package/chunks/{chunk-6ZRFAKXK.js → chunk-IEP44U2R.js} +1 -1
- package/chunks/{chunk-AOHJKPKL.js → chunk-IQFYO5BF.js} +1 -1
- package/chunks/{chunk-UDXSXLER.js → chunk-IW6RQPQB.js} +14 -4
- package/chunks/{chunk-XCWO3SMQ.js → chunk-IX7CFQGA.js} +3 -3
- package/chunks/{chunk-O3EU6GMH.js → chunk-J4EVBAB3.js} +27 -4
- package/chunks/{chunk-ZZCWJWTF.js → chunk-JHMFKJEP.js} +1 -1
- package/chunks/{chunk-XVHYA33G.js → chunk-JKEO6OQY.js} +4 -4
- package/chunks/{chunk-6Q5ABMTU.js → chunk-JLYYGKRN.js} +23 -19
- package/chunks/{chunk-KID7K6H2.js → chunk-JOXXPM3X.js} +6 -6
- package/chunks/{chunk-E2FPSSKP.js → chunk-JPA7IDTE.js} +57 -13
- package/chunks/{chunk-OQTXYMKW.js → chunk-JS4Q5NG5.js} +3 -3
- package/chunks/{chunk-PBRVUF5B.js → chunk-K7JW6V5O.js} +1 -1
- package/chunks/{chunk-3P2LV43B.js → chunk-KCCODSAA.js} +3 -3
- package/chunks/{chunk-DREZZAZM.js → chunk-KCDQGIHS.js} +13 -5
- package/chunks/{chunk-UEOKWYGY.js → chunk-KFCTC5IJ.js} +11 -11
- package/chunks/{chunk-M6HMMKVG.js → chunk-KPVVWKF3.js} +1 -1
- package/chunks/{chunk-MVUQRLOH.js → chunk-KT4OWAAZ.js} +3 -3
- package/chunks/{chunk-W4RQUHY3.js → chunk-L2GTEEEU.js} +142 -23
- package/chunks/{chunk-Q3AL4JQ3.js → chunk-LA3FF7RO.js} +2 -2
- package/chunks/{chunk-DX3RGJMS.js → chunk-LT532KF4.js} +71 -12
- package/chunks/{chunk-JT7XS4YW.js → chunk-M2NMFAFR.js} +1 -1
- package/chunks/{chunk-YTFDX4PR.js → chunk-M6NDLY2T.js} +1 -1
- package/chunks/{chunk-MIKXJYZB.js → chunk-MCHGE3EC.js} +305 -291
- package/chunks/{chunk-Y4R47ZUH.js → chunk-MDQSCFAZ.js} +7 -7
- package/chunks/{chunk-EKPKKXY2.js → chunk-MLZCPGDX.js} +1 -1
- package/chunks/{chunk-OIVKILPI.js → chunk-MPBRV3UU.js} +3 -0
- package/chunks/{chunk-VFMASYQA.js → chunk-MS7GNABG.js} +3 -0
- package/chunks/{chunk-2FRY5CRX.js → chunk-MWZYNOCG.js} +3 -3
- package/chunks/{chunk-ONSZH6VM.js → chunk-MZQ4I4AP.js} +2 -2
- package/chunks/{chunk-UMD7WQTR.js → chunk-N3ZWGKXN.js} +10 -8
- package/chunks/{chunk-7MH4J33A.js → chunk-N7NBMAMW.js} +2 -2
- package/chunks/{chunk-EUNWC2VS.js → chunk-NC4O6UE6.js} +2 -2
- package/chunks/{chunk-A7XMDZRI.js → chunk-NFSSQDB5.js} +5 -5
- package/chunks/{chunk-DCZEPFB4.js → chunk-NM3E6GGL.js} +3 -3
- package/chunks/{chunk-26CXSA6V.js → chunk-NQPYPDOY.js} +2 -2
- package/chunks/{chunk-HUWENAHO.js → chunk-NWPO6I7V.js} +1 -1
- package/chunks/{chunk-SR7RZ4MS.js → chunk-O4BBDP2G.js} +2 -2
- package/chunks/{chunk-ECWR5LQR.js → chunk-OC5SKSNX.js} +3 -3
- package/chunks/{chunk-VWKER4ZH.js → chunk-OGQERNHD.js} +3 -3
- package/chunks/{chunk-DA4HRSBW.js → chunk-OPBATTFQ.js} +1 -1
- package/chunks/{chunk-OONWZLFK.js → chunk-P7KCJGBR.js} +4 -4
- package/chunks/{chunk-OJUQF2PL.js → chunk-PBYVS6QT.js} +3 -3
- package/chunks/{chunk-VNNWAZSI.js → chunk-QG2IEE2E.js} +3 -3
- package/chunks/{chunk-KZ22NXBY.js → chunk-QGZN4RYB.js} +4 -4
- package/chunks/{chunk-2UUMVNYT.js → chunk-QTI7SRXI.js} +3 -3
- package/chunks/{chunk-B2GJNDTV.js → chunk-QUESTNOP.js} +1 -1
- package/chunks/{chunk-AAE6SR4Q.js → chunk-RUKNJEJO.js} +1 -1
- package/chunks/{chunk-NV65ZUVM.js → chunk-RUVZZKDH.js} +1 -1
- package/chunks/{chunk-QUI267ZP.js → chunk-SAQHDAUJ.js} +42 -8
- package/chunks/{chunk-4MKXUHXY.js → chunk-SUTP6CZA.js} +5 -5
- package/chunks/{chunk-UBX6NL47.js → chunk-T4576UW4.js} +3 -3
- package/chunks/{chunk-TZEZYNYD.js → chunk-T4FTABSW.js} +1 -1
- package/chunks/{chunk-SEZ556DZ.js → chunk-T6W4KACQ.js} +1 -1
- package/chunks/chunk-TKAEODJR.js +1279 -0
- package/chunks/{chunk-NV3F44FL.js → chunk-TNQLAI6I.js} +2 -2
- package/chunks/{chunk-F6WDTQ3M.js → chunk-TNS2M7VL.js} +5 -5
- package/chunks/{chunk-7GTMV7UE.js → chunk-TTB6GBJ6.js} +8323 -2227
- package/chunks/{chunk-YGT2AUJ7.js → chunk-U2JLICUY.js} +33 -16
- package/chunks/{chunk-NEOXOWYH.js → chunk-U7QUDFPD.js} +7 -7
- package/chunks/{chunk-QGNOFE5E.js → chunk-UEUE6LJX.js} +1 -1
- package/chunks/{chunk-EI3NWELG.js → chunk-UIZGNLBP.js} +4427 -3806
- package/chunks/{chunk-ZJ4W6SUY.js → chunk-UM57UTTV.js} +3 -3
- package/chunks/{chunk-EQL65XGA.js → chunk-V3LXMASR.js} +47 -21
- package/chunks/{chunk-LHEC5V6G.js → chunk-VRWOMUZM.js} +2 -2
- package/chunks/{chunk-5MZCSWI4.js → chunk-W2ITCESM.js} +176 -477
- package/chunks/{chunk-KONVMRK7.js → chunk-W2PNY24B.js} +1 -1
- package/chunks/{chunk-4WL6SY4F.js → chunk-X5GLCWPX.js} +1 -1
- package/chunks/{chunk-BSI645OU.js → chunk-XBLYC4MI.js} +3 -3
- package/chunks/{chunk-GNPNYXJB.js → chunk-XLQS3VI6.js} +2 -2
- package/chunks/{chunk-TRRF5BSP.js → chunk-XT6TGJFD.js} +1 -1
- package/chunks/{chunk-PYQADEFD.js → chunk-XTH2OMDS.js} +1 -1
- package/chunks/{chunk-47PEPJO7.js → chunk-XUMBOJC2.js} +3 -3
- package/chunks/{chunk-GWVUR3QZ.js → chunk-YIKMBYMT.js} +3 -3
- package/chunks/{chunk-WOJZWRAZ.js → chunk-YRLW2MSX.js} +1 -1
- package/chunks/{chunk-NRLFZWCT.js → chunk-YVVIFFU4.js} +3 -3
- package/chunks/chunk-Z7B6SRPM.js +32 -0
- package/chunks/{chunk-IA7TGCN2.js → chunk-ZV4XVYL3.js} +4 -4
- package/chunks/{chunk-PJRW65JO.js → chunk-ZWPWQEF5.js} +1 -1
- package/chunks/{computer-use-WQFK33Z3.js → computer-use-7TIKEXBX.js} +42 -41
- package/chunks/{config-utils-ULCSRMWD.js → config-utils-6MVJ54TY.js} +6 -6
- package/chunks/{contextCommand-7EOZND7C.js → contextCommand-5QKI7MRY.js} +44 -43
- package/chunks/{core-runtime-FGMQRM6E.js → core-runtime-USS7ZF3H.js} +42 -41
- package/chunks/{create-sub-session-QIDZUOPU.js → create-sub-session-Y4WYDZGC.js} +2 -2
- package/chunks/{create-sub-session-QM2K5HLZ.js → create-sub-session-ZD2F3BH2.js} +42 -41
- package/chunks/{cron-create-VONA5JYY.js → cron-create-ZOVA3CC2.js} +4 -4
- package/chunks/{cron-delete-5JXSP2MI.js → cron-delete-7Z3H4LJY.js} +4 -4
- package/chunks/{cron-list-KE4F2CIR.js → cron-list-UHGX3IQG.js} +4 -4
- package/chunks/{daemon-GWD7BT6E.js → daemon-Y3NOHFKQ.js} +38 -7
- package/chunks/daemon-status-provider-PMP4J7BC.js +103 -0
- package/chunks/daemon-trust-policy-2252VKXI.js +99 -0
- package/chunks/{daemon-trust-policy-monitor-6UKEABN5.js → daemon-trust-policy-monitor-OSGGKJXT.js} +49 -48
- package/chunks/{de-LIW4XVLN.js → de-UBEBKG6V.js} +2 -1
- package/chunks/{deferred-core-runtime-67GJXHXS.js → deferred-core-runtime-3VD4V6YZ.js} +42 -41
- package/chunks/{display-image-NQRSIBXM.js → display-image-ZE3GZNIK.js} +4 -4
- package/chunks/{dist-Z3CS4OVP.js → dist-AVUYBK7L.js} +11 -5
- package/chunks/{dist-6BMOAE3Z.js → dist-BNWP6IZL.js} +4 -4
- package/chunks/{dist-3NTTUAHT.js → dist-EFJILGIS.js} +3 -3
- package/chunks/{dist-EZE3V3Q7.js → dist-MAIUUIWN.js} +3 -3
- package/chunks/{dist-B2CGTW6T.js → dist-NPS52B2V.js} +3 -3
- package/chunks/{dist-J47AXBZC.js → dist-PKSRQAR2.js} +3 -3
- package/chunks/{dist-OTUO3AS2.js → dist-Q2WJ2IZU.js} +13 -5
- package/chunks/{dist-EWW3J4HQ.js → dist-ZWDH5HLS.js} +3 -3
- package/chunks/{earlyInputCapture-IWMYR6OB.js → earlyInputCapture-ER4HGLJN.js} +43 -42
- package/chunks/{edit-ZFGROCAF.js → edit-B3MT7O53.js} +42 -41
- package/chunks/{en-SY5GTIGX.js → en-X6YV7GME.js} +2 -1
- package/chunks/{enter-worktree-TZZZCDM5.js → enter-worktree-WVIYVSDJ.js} +42 -41
- package/chunks/{enterPlanMode-U77BI3R6.js → enterPlanMode-DDCIM6HA.js} +42 -41
- package/chunks/{environment-HC37DS2I.js → environment-LITGMOUP.js} +45 -44
- package/chunks/{errors-6AG54JPD.js → errors-E5CIOR2I.js} +44 -43
- package/chunks/{exit-worktree-UYYWFPNK.js → exit-worktree-NQ2A6URE.js} +42 -41
- package/chunks/exitPlanMode-YXSWN4D3.js +85 -0
- package/chunks/{fast-path-F5FSZ3O7.js → fast-path-PH3DBS6X.js} +3 -3
- package/chunks/{fast-path-settings-RPAVBD7P.js → fast-path-settings-LNOFM2YP.js} +2 -2
- package/chunks/{fr-RQFO7U4P.js → fr-VENTC2BS.js} +2 -1
- package/chunks/{gemini-NKQHYM36.js → gemini-4YPO4ADY.js} +88 -87
- package/chunks/{geminiContentGenerator-HCWZOUX3.js → geminiContentGenerator-GMSVVXOU.js} +6 -6
- package/chunks/{glob-3PDXKBAO.js → glob-3Y3VHLM2.js} +42 -41
- package/chunks/{goal-tools-SWNB6GP4.js → goal-tools-JDK2SNMV.js} +4 -4
- package/chunks/{grep-5HZKZYVD.js → grep-VUHUDZYG.js} +42 -41
- package/chunks/handleAutoUpdate-OBFFPWSJ.js +94 -0
- package/chunks/{i18n-Q27KKNDL.js → i18n-4PJA5KKU.js} +43 -42
- package/chunks/{image-gen-2Z2RJ6W7.js → image-gen-4IFV4HES.js} +10 -10
- package/chunks/initializer-ZTY3VSWL.js +100 -0
- package/chunks/{installationInfo-XXB75T7O.js → installationInfo-6USRNCD2.js} +43 -42
- package/chunks/{ja-KOZKHJHZ.js → ja-QHT4EQTO.js} +2 -1
- package/chunks/{keychain-token-storage-TVAMTNP7.js → keychain-token-storage-JTWUYFU7.js} +2 -2
- package/chunks/list-U2ZDKYWN.js +103 -0
- package/chunks/{list-agents-Z4WABFDZ.js → list-agents-4GQ2XNEU.js} +2 -2
- package/chunks/loadedSettingsAdapter-WW4HIVLO.js +97 -0
- package/chunks/{loggingContentGenerator-6NTFBM7Q.js → loggingContentGenerator-XXG6YWUE.js} +46 -27
- package/chunks/{loop-wakeup-UZ5RL5Y2.js → loop-wakeup-HOQI3K5D.js} +5 -5
- package/chunks/{ls-TVHDGIES.js → ls-O4VBQRG7.js} +4 -4
- package/chunks/{lsp-CVN6OQPI.js → lsp-APQJ5ZEZ.js} +2 -2
- package/chunks/{managed-npm-update-SPHYQUWZ.js → managed-npm-update-7GM2LPLL.js} +43 -42
- package/chunks/mcp-7KZW2T5P.js +97 -0
- package/chunks/{monitor-ZBBPAA54.js → monitor-RQROQHLD.js} +42 -41
- package/chunks/nonInteractiveCli-U7JNJGS6.js +163 -0
- package/chunks/{notebook-edit-5W3FW7Z2.js → notebook-edit-XQA6YCH2.js} +42 -41
- package/chunks/{openaiContentGenerator-TQANPEVZ.js → openaiContentGenerator-BZW2IB42.js} +29 -29
- package/chunks/{pidfile-EQOBLH4E.js → pidfile-NX5VZ3IK.js} +43 -42
- package/chunks/{processUtils-7XQG7EHS.js → processUtils-M635AD23.js} +2 -2
- package/chunks/{pt-U6AOCTMF.js → pt-VL3I5RNY.js} +2 -1
- package/chunks/{qwenContentGenerator-BKCPHHXU.js → qwenContentGenerator-KHJ73E2C.js} +48 -48
- package/chunks/{qwenOAuth2-BJ6PQKE6.js → qwenOAuth2-QMK25XO7.js} +9 -9
- package/chunks/read-file-6LKIKKXD.js +32 -0
- package/chunks/{read-mcp-resource-PZ4ZF6YL.js → read-mcp-resource-TJSJRH4F.js} +2 -2
- package/chunks/{record-artifact-P4HFMS7X.js → record-artifact-FXF5LHPE.js} +3 -3
- package/chunks/{resumeHistoryUtils-6N6XGJJW.js → resumeHistoryUtils-RR2KEVH5.js} +49 -48
- package/chunks/ripGrep-CF2WRBYV.js +85 -0
- package/chunks/{ru-CMX4UMYP.js → ru-4RCKL4PY.js} +2 -1
- package/chunks/{run-qwen-serve-BCKBCAMX.js → run-qwen-serve-L5TF57J4.js} +61 -50
- package/chunks/{runtime-E2437YKL.js → runtime-3RE3BPR4.js} +55 -54
- package/chunks/{scheduler-K3D5Z655.js → scheduler-LXQZAMYT.js} +44 -43
- package/chunks/{sdk-exporters-http-XVTZQRCE.js → sdk-exporters-http-7SYSCGEO.js} +3 -3
- package/chunks/{sdk-impl-7W7AKCS4.js → sdk-impl-VZI6M6EH.js} +6 -6
- package/chunks/{send-message-CAMSLG2L.js → send-message-RBYLV5NY.js} +6 -6
- package/chunks/{serve-IH4XR5IL.js → serve-5D4S7GIA.js} +49 -48
- package/chunks/{server-UD6INW7J.js → server-ILZB6TTC.js} +403 -178
- package/chunks/{session-GR4ZEVW4.js → session-SXCZITZ4.js} +114 -94
- package/chunks/{settings-5O24D3OJ.js → settings-4RQB3OVF.js} +48 -47
- package/chunks/{shell-UTLWLG5G.js → shell-FCTR3OI2.js} +42 -41
- package/chunks/{skill-QQAZL4VO.js → skill-IAKHPD5H.js} +19 -19
- package/chunks/{skill-settings-P3YHJVBZ.js → skill-settings-SOR23NOP.js} +48 -47
- package/chunks/spawnChannel-I6VAWYQJ.js +98 -0
- package/chunks/{standalone-update-QP742MGP.js → standalone-update-5NN3MTYH.js} +44 -43
- package/chunks/{startInteractiveUI-YCS6AEPN.js → startInteractiveUI-OYGL3NZJ.js} +590 -329
- package/chunks/{syntheticOutput-PEBJQYJV.js → syntheticOutput-D3Z64LJC.js} +3 -3
- package/chunks/{task-create-5NWCQSJF.js → task-create-URFZ5EUX.js} +10 -10
- package/chunks/{task-list-53265TRZ.js → task-list-6JDFMPUW.js} +5 -5
- package/chunks/{task-stop-FPCOIRYX.js → task-stop-HHUGCD25.js} +2 -2
- package/chunks/{task-update-5HN577LS.js → task-update-LCJM3EYG.js} +10 -10
- package/chunks/{team-create-WFH7OCDQ.js → team-create-J4JP6AXN.js} +44 -43
- package/chunks/{team-delete-MMQB4OSC.js → team-delete-PZGGBQLM.js} +5 -5
- package/chunks/{team-plan-approval-EGTT53MV.js → team-plan-approval-7BEAIR2H.js} +42 -41
- package/chunks/{terminal-image-renderer-BWRESAQ7.js → terminal-image-renderer-SGGTG5LN.js} +44 -43
- package/chunks/theme-manager-67TSB7LH.js +89 -0
- package/chunks/{todoWrite-JGV6VLOX.js → todoWrite-WINAZSZI.js} +4 -4
- package/chunks/{tool-search-TI5PTIBF.js → tool-search-XPOFDWOX.js} +19 -19
- package/chunks/{total-session-admission-66UDSOHO.js → total-session-admission-SZJFAM25.js} +47 -46
- package/chunks/{trustedFolders-4KYHA4IG.js → trustedFolders-44NTYYV4.js} +43 -42
- package/chunks/{update-relaunch-WB6LGIF2.js → update-relaunch-K33Q3WEH.js} +5 -5
- package/chunks/{updateCheck-LOS5GYFC.js → updateCheck-VBRNPLS4.js} +45 -44
- package/chunks/{useAutoAcceptIndicator-MHAPY52L.js → useAutoAcceptIndicator-AUNRB5S7.js} +52 -51
- package/chunks/{validateNonInterActiveAuth-QV22HNQU.js → validateNonInterActiveAuth-WTO36MTA.js} +83 -82
- package/chunks/{version-DALWZHKQ.js → version-JZA6HYPI.js} +1 -1
- package/chunks/{web-fetch-JMJVMYFE.js → web-fetch-LLHPV2IR.js} +19 -19
- package/chunks/{web-search-DNDUIPU5.js → web-search-4HCHRZ3U.js} +11 -11
- package/chunks/{workflow-JGNN64PM.js → workflow-YI74QTWW.js} +43 -42
- package/chunks/workspace-providers-status-CI3AO2BH.js +100 -0
- package/chunks/{workspace-registration-store-LRJG7QA4.js → workspace-registration-store-KPIKXDHA.js} +1 -1
- package/chunks/{workspace-registry-KVXIFM36.js → workspace-registry-XE22QDE6.js} +47 -46
- package/chunks/{workspace-service-PO4AAKKT.js → workspace-service-WI2FD72A.js} +54 -53
- package/chunks/workspace-skills-status-FFZU6FXL.js +100 -0
- package/chunks/{workspace-trust-reconciler-DOZPCVHG.js → workspace-trust-reconciler-GJLNXR2U.js} +54 -53
- package/chunks/write-file-IEAC3XC3.js +87 -0
- package/chunks/{zh-AGL2FVBI.js → zh-LMSTK4WD.js} +2 -1
- package/chunks/{zh-TW-KI66MHQY.js → zh-TW-SQ4HTSCW.js} +2 -1
- package/chunks/{zoom-image-CNC77ZMA.js → zoom-image-GTVVT25J.js} +15 -15
- package/cli.js +13 -13
- package/locales/ca.js +1 -0
- package/locales/de.js +1 -0
- package/locales/en.js +1 -0
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +1 -0
- package/locales/zh.js +1 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CDk0d60K.js → arc-B13-S0Yo.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-h-W3I2lP.js → architectureDiagram-3BPJPVTR-CHvWNlVW.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-D1pvSmZg.js → blockDiagram-GPEHLZMM-CXebOlXF.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-ByAm5ZNf.js → c4Diagram-AAUBKEIU-BQpx4y3Q.js} +1 -1
- package/web-shell/assets/channel-BB_Hm8Rf.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-VrGPPOGV.js → chunk-2J33WTMH-Cak1exSv.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-B7hTowgG.js → chunk-4BX2VUAB-BIc8BV5_.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-j1Fq8DpE.js → chunk-55IACEB6-DoeJ5BL1.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-UjABYpF2.js → chunk-727SXJPM-BDR_wYSu.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-D4uBItrs.js → chunk-AQP2D5EJ-BhRRGRq1.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DeFbKlb8.js → chunk-FMBD7UC4-BJGAwVXr.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-rQJ8TIgT.js → chunk-ND2GUHAM-vhE73bsD.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-DAGcRxvq.js → chunk-QZHKN3VN-BuTBZsdR.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B_hFK54Y.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B_hFK54Y.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-MaE7MJSt.js → cose-bilkent-S5V4N54A-CVHKipHP.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DzijYGSb.js → dagre-BM42HDAG-C1DPa8SV.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-WdbG7WnX.js → diagram-2AECGRRQ-BYP_QxkT.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-NYutsBnw.js → diagram-5GNKFQAL-Cray7ruQ.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Dqg0eBY0.js → diagram-KO2AKTUF-Ds4vJANi.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-C7vRP2Lb.js → diagram-LMA3HP47-DxFrDykH.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-B2sEPpPt.js → diagram-OG6HWLK6-BdIO-pF_.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-a4zIbzm8.js → erDiagram-TEJ5UH35-5JA8KDYV.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BK9y89ya.js → flowDiagram-I6XJVG4X-DL4drKro.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-wUQTSNvV.js → ganttDiagram-6RSMTGT7-ijX2DD6_.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-Dnzt4SAi.js → gitGraphDiagram-PVQCEYII-_lPsFLFF.js} +1 -1
- package/web-shell/assets/index-BTwNYZkp.js +1785 -0
- package/web-shell/assets/{index-BA3wUcKL.js → index-C-YoqYbs.js} +1 -1
- package/web-shell/assets/index-dHAFxPHb.css +5 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DcaoToij.js → infoDiagram-5YYISTIA-COFClLab.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-DzduqhP2.js → ishikawaDiagram-YF4QCWOH-Div9KOgO.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BvviZR_O.js → journeyDiagram-JHISSGLW-VAw5u0wc.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Efm2JxY3.js → kanban-definition-UN3LZRKU-CncCn8Nl.js} +1 -1
- package/web-shell/assets/{linear-DtY3IbOs.js → linear-D6ad7e_k.js} +1 -1
- package/web-shell/assets/{mermaid.core-PzpFqoMe.js → mermaid.core-BV1IECGb.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BLlTkHS0.js → mindmap-definition-RKZ34NQL-a3jeNgPr.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-D-mKF-jE.js → pieDiagram-4H26LBE5-DsVRY5BW.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DYCzslGm.js → quadrantDiagram-W4KKPZXB-D6zgexJK.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-Dfpxlk7R.js → requirementDiagram-4Y6WPE33-VEpSwJjn.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-D5cRaaxh.js → sankeyDiagram-5OEKKPKP-CYEuOFne.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-s04DReiS.js → sequenceDiagram-3UESZ5HK-CCg0lI-9.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-01UNFgnb.js → stateDiagram-AJRCARHV-BHXPsL0B.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-eTG8D0QT.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DX8_wZBC.js → timeline-definition-PNZ67QCA-gqTf9a0k.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BK0FlBme.js → vennDiagram-CIIHVFJN-C4DXXkBh.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-DkPc9UlD.js → wardley-L42UT6IY-CMK46EiX.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DNKkpDAo.js → wardleyDiagram-YWT4CUSO-DTk1Gzt9.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-CiPwg8QG.js → xychartDiagram-2RQKCTM6-BcJsM1dH.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/agent-headless-HYEHZFH6.js +0 -86
- package/chunks/channel-settings-store-OXYG5S5X.js +0 -101
- package/chunks/chunk-I5VM3SKY.js +0 -451
- package/chunks/chunk-PDPFQ2FO.js +0 -156
- package/chunks/daemon-status-provider-L3J6GKCT.js +0 -102
- package/chunks/daemon-trust-policy-4PHPY23S.js +0 -98
- package/chunks/exitPlanMode-RWJR2KGB.js +0 -84
- package/chunks/handleAutoUpdate-NHFSGYTF.js +0 -93
- package/chunks/initializer-Y5DJLT43.js +0 -99
- package/chunks/list-YHNQ32CS.js +0 -102
- package/chunks/loadedSettingsAdapter-GHUQK7H4.js +0 -96
- package/chunks/mcp-EA3KO6FS.js +0 -96
- package/chunks/nonInteractiveCli-NNOR56HU.js +0 -162
- package/chunks/read-file-KKTXGIZD.js +0 -32
- package/chunks/ripGrep-SJVAAYDV.js +0 -84
- package/chunks/spawnChannel-UAQMH6Y6.js +0 -94
- package/chunks/theme-manager-ZNDGAHJN.js +0 -88
- package/chunks/workspace-providers-status-K22B3Z6B.js +0 -99
- package/chunks/workspace-skills-status-DDYCBVSH.js +0 -99
- package/chunks/write-file-TT6MWIKC.js +0 -86
- package/web-shell/assets/channel-DPFUV4oi.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CLm0hVvw.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CLm0hVvw.js +0 -1
- package/web-shell/assets/index-BjC3yjjL.css +0 -5
- package/web-shell/assets/index-QzFq6w7o.js +0 -1775
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DXb5olqv.js +0 -1
|
@@ -2,38 +2,26 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
formatHistoryGapNotice
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-HMCSRTDY.js";
|
|
6
6
|
import {
|
|
7
7
|
sanitizeTerminalText
|
|
8
8
|
} from "./chunk-4NFY2S7N.js";
|
|
9
|
-
import {
|
|
10
|
-
isGoalStatusKind,
|
|
11
|
-
isTerminalGoalStatusKind
|
|
12
|
-
} from "./chunk-EKTCKZV5.js";
|
|
13
9
|
import {
|
|
14
10
|
loadUndici
|
|
15
11
|
} from "./chunk-3Z43GZUQ.js";
|
|
16
|
-
import {
|
|
17
|
-
getActiveGoal,
|
|
18
|
-
registerGoalHook,
|
|
19
|
-
setGoalTerminalObserver,
|
|
20
|
-
setLastGoalTerminal,
|
|
21
|
-
unregisterGoalHook
|
|
22
|
-
} from "./chunk-EI3NWELG.js";
|
|
23
12
|
import {
|
|
24
13
|
projectUserTranscriptForDisplay
|
|
25
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-SAQHDAUJ.js";
|
|
26
15
|
import {
|
|
27
|
-
apiActivityTracker,
|
|
28
16
|
formatVisionBridgeNoticeDisplay,
|
|
29
17
|
isVisionBridgeNoticeDisplay
|
|
30
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-U2JLICUY.js";
|
|
31
19
|
import {
|
|
32
20
|
ToolNames
|
|
33
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-XTH2OMDS.js";
|
|
34
22
|
import {
|
|
35
23
|
createDebugLogger
|
|
36
|
-
} from "./chunk-
|
|
24
|
+
} from "./chunk-MPBRV3UU.js";
|
|
37
25
|
import {
|
|
38
26
|
writeStderrLine,
|
|
39
27
|
writeStderrLineSafe
|
|
@@ -45,195 +33,6 @@ import {
|
|
|
45
33
|
__name
|
|
46
34
|
} from "./chunk-J2S4EL5Y.js";
|
|
47
35
|
|
|
48
|
-
// packages/cli/src/ui/utils/restoreGoal.ts
|
|
49
|
-
init_esbuild_shims();
|
|
50
|
-
function findGoalToRestore(history) {
|
|
51
|
-
for (let i = history.length - 1; i >= 0; i--) {
|
|
52
|
-
const item = history[i];
|
|
53
|
-
if (item?.type !== "goal_status" /* GOAL_STATUS */) continue;
|
|
54
|
-
const goal = item;
|
|
55
|
-
if (goal.kind !== "set" && goal.kind !== "checking") return null;
|
|
56
|
-
const setAt = goal.setAt ?? findSetAtOfRun(history, i);
|
|
57
|
-
return {
|
|
58
|
-
condition: goal.condition,
|
|
59
|
-
iterations: goal.iterations ?? 0,
|
|
60
|
-
...setAt !== void 0 ? { setAt } : {}
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
return null;
|
|
64
|
-
}
|
|
65
|
-
__name(findGoalToRestore, "findGoalToRestore");
|
|
66
|
-
function findSetAtOfRun(history, startIndex) {
|
|
67
|
-
const start = history[startIndex];
|
|
68
|
-
const condition = start?.condition;
|
|
69
|
-
for (let i = startIndex - 1; i >= 0; i--) {
|
|
70
|
-
const item = history[i];
|
|
71
|
-
if (item?.type !== "goal_status" /* GOAL_STATUS */) continue;
|
|
72
|
-
const goal = item;
|
|
73
|
-
if (goal.kind !== "set" && goal.kind !== "checking") return void 0;
|
|
74
|
-
if (goal.condition !== condition) return void 0;
|
|
75
|
-
if (goal.setAt !== void 0) return goal.setAt;
|
|
76
|
-
}
|
|
77
|
-
return void 0;
|
|
78
|
-
}
|
|
79
|
-
__name(findSetAtOfRun, "findSetAtOfRun");
|
|
80
|
-
function findLastTerminalGoal(history) {
|
|
81
|
-
for (let i = history.length - 1; i >= 0; i--) {
|
|
82
|
-
const item = history[i];
|
|
83
|
-
if (item?.type !== "goal_status" /* GOAL_STATUS */) continue;
|
|
84
|
-
const goal = item;
|
|
85
|
-
if (!isTerminalGoalStatusKind(goal.kind)) continue;
|
|
86
|
-
return {
|
|
87
|
-
kind: goal.kind,
|
|
88
|
-
condition: goal.condition,
|
|
89
|
-
iterations: goal.iterations ?? 0,
|
|
90
|
-
durationMs: goal.durationMs ?? 0,
|
|
91
|
-
lastReason: goal.lastReason
|
|
92
|
-
};
|
|
93
|
-
}
|
|
94
|
-
return null;
|
|
95
|
-
}
|
|
96
|
-
__name(findLastTerminalGoal, "findLastTerminalGoal");
|
|
97
|
-
function finiteNumber(value) {
|
|
98
|
-
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
99
|
-
}
|
|
100
|
-
__name(finiteNumber, "finiteNumber");
|
|
101
|
-
function isTranscriptItemRecord(item) {
|
|
102
|
-
return typeof item === "object" && item !== null && !Array.isArray(item);
|
|
103
|
-
}
|
|
104
|
-
__name(isTranscriptItemRecord, "isTranscriptItemRecord");
|
|
105
|
-
function parseGoalStatusItem(item) {
|
|
106
|
-
if (!isTranscriptItemRecord(item)) return null;
|
|
107
|
-
if (item["type"] !== "goal_status" /* GOAL_STATUS */) return null;
|
|
108
|
-
const kind = item["kind"];
|
|
109
|
-
const condition = item["condition"];
|
|
110
|
-
if (!isGoalStatusKind(kind) || typeof condition !== "string") return null;
|
|
111
|
-
const iterations = finiteNumber(item["iterations"]);
|
|
112
|
-
const setAt = finiteNumber(item["setAt"]);
|
|
113
|
-
const durationMs = finiteNumber(item["durationMs"]);
|
|
114
|
-
const lastReason = typeof item["lastReason"] === "string" ? item["lastReason"] : void 0;
|
|
115
|
-
return {
|
|
116
|
-
type: "goal_status" /* GOAL_STATUS */,
|
|
117
|
-
kind,
|
|
118
|
-
condition,
|
|
119
|
-
...iterations !== void 0 ? { iterations } : {},
|
|
120
|
-
...setAt !== void 0 ? { setAt } : {},
|
|
121
|
-
...durationMs !== void 0 ? { durationMs } : {},
|
|
122
|
-
...lastReason !== void 0 ? { lastReason } : {}
|
|
123
|
-
};
|
|
124
|
-
}
|
|
125
|
-
__name(parseGoalStatusItem, "parseGoalStatusItem");
|
|
126
|
-
function collectGoalStatusItemsFromRecords(records) {
|
|
127
|
-
const items = [];
|
|
128
|
-
for (const record of records) {
|
|
129
|
-
if (record.type !== "system" || record.subtype !== "slash_command") {
|
|
130
|
-
continue;
|
|
131
|
-
}
|
|
132
|
-
const payload = record.systemPayload;
|
|
133
|
-
if (payload?.phase !== "result") continue;
|
|
134
|
-
const raws = payload.outputHistoryItems;
|
|
135
|
-
if (!Array.isArray(raws)) continue;
|
|
136
|
-
for (const raw of raws) {
|
|
137
|
-
const item = parseGoalStatusItem(raw);
|
|
138
|
-
if (item) items.push(item);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
return items;
|
|
142
|
-
}
|
|
143
|
-
__name(collectGoalStatusItemsFromRecords, "collectGoalStatusItemsFromRecords");
|
|
144
|
-
function goalTerminalEventToHistoryItem(event) {
|
|
145
|
-
return {
|
|
146
|
-
type: "goal_status" /* GOAL_STATUS */,
|
|
147
|
-
kind: event.kind,
|
|
148
|
-
condition: event.condition,
|
|
149
|
-
iterations: event.iterations,
|
|
150
|
-
durationMs: event.durationMs,
|
|
151
|
-
lastReason: event.lastReason ?? event.systemMessage
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
__name(goalTerminalEventToHistoryItem, "goalTerminalEventToHistoryItem");
|
|
155
|
-
function recordGoalStatusItem(config, item, rawCommand = "/goal") {
|
|
156
|
-
try {
|
|
157
|
-
const recording = config.getChatRecordingService?.();
|
|
158
|
-
if (!recording) {
|
|
159
|
-
writeStderrLineSafe(
|
|
160
|
-
`qwen: no chat recording service; goal_status (kind=${item.kind}) will not survive a resume.`
|
|
161
|
-
);
|
|
162
|
-
return;
|
|
163
|
-
}
|
|
164
|
-
recording.recordSlashCommand({
|
|
165
|
-
phase: "result",
|
|
166
|
-
rawCommand,
|
|
167
|
-
outputHistoryItems: [{ ...item }]
|
|
168
|
-
});
|
|
169
|
-
} catch (error) {
|
|
170
|
-
writeStderrLineSafe(
|
|
171
|
-
`qwen: failed to record goal_status (kind=${item.kind}): ${error}`
|
|
172
|
-
);
|
|
173
|
-
}
|
|
174
|
-
}
|
|
175
|
-
__name(recordGoalStatusItem, "recordGoalStatusItem");
|
|
176
|
-
function installGoalTerminalObserver(args) {
|
|
177
|
-
const { sessionId, config, addItem } = args;
|
|
178
|
-
setGoalTerminalObserver(sessionId, (event) => {
|
|
179
|
-
const item = goalTerminalEventToHistoryItem(event);
|
|
180
|
-
addItem(item, Date.now());
|
|
181
|
-
recordGoalStatusItem(config, item);
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
__name(installGoalTerminalObserver, "installGoalTerminalObserver");
|
|
185
|
-
function goalRestoreBlockedBy(config) {
|
|
186
|
-
if (!config.isTrustedFolder()) return "untrusted-folder";
|
|
187
|
-
if (config.getDisableAllHooks()) return "hooks-disabled";
|
|
188
|
-
if (!config.getHookSystem()) return "no-hook-system";
|
|
189
|
-
return null;
|
|
190
|
-
}
|
|
191
|
-
__name(goalRestoreBlockedBy, "goalRestoreBlockedBy");
|
|
192
|
-
function goalConditionBlockedBy(condition) {
|
|
193
|
-
if (condition.length === 0) return "condition-invalid";
|
|
194
|
-
return null;
|
|
195
|
-
}
|
|
196
|
-
__name(goalConditionBlockedBy, "goalConditionBlockedBy");
|
|
197
|
-
function restoreGoalFromHistory(history, config, addItem) {
|
|
198
|
-
const sessionId = config.getSessionId();
|
|
199
|
-
const lastTerminal = findLastTerminalGoal(history);
|
|
200
|
-
setLastGoalTerminal(sessionId, lastTerminal ?? void 0);
|
|
201
|
-
const restorable = findGoalToRestore(history);
|
|
202
|
-
if (restorable === null) {
|
|
203
|
-
unregisterGoalHook(config, sessionId);
|
|
204
|
-
return { restored: false };
|
|
205
|
-
}
|
|
206
|
-
const blockedBy = goalRestoreBlockedBy(config);
|
|
207
|
-
if (blockedBy) {
|
|
208
|
-
unregisterGoalHook(config, sessionId);
|
|
209
|
-
return { restored: false, blockedBy };
|
|
210
|
-
}
|
|
211
|
-
if (goalConditionBlockedBy(restorable.condition)) {
|
|
212
|
-
writeStderrLineSafe(
|
|
213
|
-
`qwen: refusing to restore a goal for session ${sessionId}: the condition is empty.`
|
|
214
|
-
);
|
|
215
|
-
unregisterGoalHook(config, sessionId);
|
|
216
|
-
return { restored: false, blockedBy: "condition-invalid" };
|
|
217
|
-
}
|
|
218
|
-
registerGoalHook({
|
|
219
|
-
config,
|
|
220
|
-
sessionId,
|
|
221
|
-
condition: restorable.condition,
|
|
222
|
-
tokensAtStart: 0,
|
|
223
|
-
// Resume the iteration count so MAX_GOAL_ITERATIONS is a cross-resume cap,
|
|
224
|
-
// not a per-resume one.
|
|
225
|
-
initialIterations: restorable.iterations,
|
|
226
|
-
// Likewise the start time: without it every reload restarts the clock, and
|
|
227
|
-
// `GET /goals` reports a long-running goal as freshly started.
|
|
228
|
-
...restorable.setAt !== void 0 ? { initialSetAt: restorable.setAt } : {}
|
|
229
|
-
});
|
|
230
|
-
if (addItem) {
|
|
231
|
-
installGoalTerminalObserver({ sessionId, config, addItem });
|
|
232
|
-
}
|
|
233
|
-
return { restored: true, condition: restorable.condition };
|
|
234
|
-
}
|
|
235
|
-
__name(restoreGoalFromHistory, "restoreGoalFromHistory");
|
|
236
|
-
|
|
237
36
|
// packages/cli/src/services/setup-github.ts
|
|
238
37
|
init_esbuild_shims();
|
|
239
38
|
import { promises as fsp } from "node:fs";
|
|
@@ -920,12 +719,16 @@ function legacyStatusKind(payload) {
|
|
|
920
719
|
case "replace":
|
|
921
720
|
case "edit":
|
|
922
721
|
case "resume":
|
|
923
|
-
case "migrated":
|
|
924
722
|
return "set";
|
|
925
723
|
case "complete":
|
|
926
724
|
return "achieved";
|
|
927
725
|
case "clear":
|
|
928
726
|
return "cleared";
|
|
727
|
+
// A migrated goal is always persisted `paused` (`createMigratedGoalState`),
|
|
728
|
+
// and nothing drives a paused goal. Projecting it as `set` would re-assert
|
|
729
|
+
// "active" to every client that derives the live goal from the newest card,
|
|
730
|
+
// leaving a phantom running goal behind a resumed pre-v2 transcript.
|
|
731
|
+
case "migrated":
|
|
929
732
|
case "pause":
|
|
930
733
|
return "paused";
|
|
931
734
|
case "blocked":
|
|
@@ -954,6 +757,12 @@ var TRANSCRIPT_GOAL_STATUS_KINDS = /* @__PURE__ */ new Set([
|
|
|
954
757
|
"cleared",
|
|
955
758
|
"failed",
|
|
956
759
|
"aborted",
|
|
760
|
+
// A paused goal is not running, and dropping the card here is not neutral:
|
|
761
|
+
// the replay stream is what feeds the goal renderer, so the older `set` card
|
|
762
|
+
// stays newest and every surface keeps claiming autonomous work is under way.
|
|
763
|
+
// Kept in step with `GOAL_STATUS_KINDS`, which the daemon-side reader
|
|
764
|
+
// (`parseGoalStatusItem`) validates the same on-disk cards against.
|
|
765
|
+
"paused",
|
|
957
766
|
"checking"
|
|
958
767
|
]);
|
|
959
768
|
function isObjectRecord(value) {
|
|
@@ -1023,12 +832,12 @@ function createTranscriptImageUpdate(options) {
|
|
|
1023
832
|
__name(createTranscriptImageUpdate, "createTranscriptImageUpdate");
|
|
1024
833
|
function createTranscriptUsageUpdate(usageMetadata, options = {}) {
|
|
1025
834
|
const usage = {
|
|
1026
|
-
inputTokens:
|
|
1027
|
-
outputTokens:
|
|
1028
|
-
totalTokens:
|
|
1029
|
-
...
|
|
1030
|
-
...
|
|
1031
|
-
cachedReadTokens:
|
|
835
|
+
inputTokens: finiteNumber(usageMetadata.promptTokenCount) ?? 0,
|
|
836
|
+
outputTokens: finiteNumber(usageMetadata.candidatesTokenCount) ?? 0,
|
|
837
|
+
totalTokens: finiteNumber(usageMetadata.totalTokenCount) ?? 0,
|
|
838
|
+
...finiteNumber(usageMetadata.thoughtsTokenCount) !== void 0 ? { thoughtTokens: finiteNumber(usageMetadata.thoughtsTokenCount) } : {},
|
|
839
|
+
...finiteNumber(usageMetadata.cachedContentTokenCount) !== void 0 ? {
|
|
840
|
+
cachedReadTokens: finiteNumber(usageMetadata.cachedContentTokenCount)
|
|
1032
841
|
} : {}
|
|
1033
842
|
};
|
|
1034
843
|
const meta = buildUpdateMeta({
|
|
@@ -1541,9 +1350,9 @@ var DefaultTranscriptReplayMachine = class {
|
|
|
1541
1350
|
}
|
|
1542
1351
|
}
|
|
1543
1352
|
addUsage(metadata) {
|
|
1544
|
-
this.usage.promptTokens +=
|
|
1545
|
-
this.usage.candidateTokens +=
|
|
1546
|
-
this.usage.cachedTokens +=
|
|
1353
|
+
this.usage.promptTokens += finiteNumber(metadata["promptTokenCount"]) ?? 0;
|
|
1354
|
+
this.usage.candidateTokens += finiteNumber(metadata["candidatesTokenCount"]) ?? 0;
|
|
1355
|
+
this.usage.cachedTokens += finiteNumber(metadata["cachedContentTokenCount"]) ?? 0;
|
|
1547
1356
|
}
|
|
1548
1357
|
correlateResultCallId(toolName, recordId) {
|
|
1549
1358
|
const candidates = [...this.pendingToolCalls.values()].filter(
|
|
@@ -1638,9 +1447,9 @@ function parseTranscriptGoalStatus(value) {
|
|
|
1638
1447
|
if (typeof kind !== "string" || !TRANSCRIPT_GOAL_STATUS_KINDS.has(kind) || typeof condition !== "string") {
|
|
1639
1448
|
return void 0;
|
|
1640
1449
|
}
|
|
1641
|
-
const iterations =
|
|
1642
|
-
const setAt =
|
|
1643
|
-
const durationMs =
|
|
1450
|
+
const iterations = finiteNumber(value["iterations"]);
|
|
1451
|
+
const setAt = finiteNumber(value["setAt"]);
|
|
1452
|
+
const durationMs = finiteNumber(value["durationMs"]);
|
|
1644
1453
|
const lastReason = typeof value["lastReason"] === "string" ? value["lastReason"] : void 0;
|
|
1645
1454
|
return {
|
|
1646
1455
|
kind,
|
|
@@ -1705,7 +1514,7 @@ function parseInitialState(value, onDiagnostic) {
|
|
|
1705
1514
|
);
|
|
1706
1515
|
const rawUsage = value.cumulativeUsage;
|
|
1707
1516
|
const usage = isObjectRecord(rawUsage) ? rawUsage : {};
|
|
1708
|
-
const validUsage =
|
|
1517
|
+
const validUsage = finiteNumber(usage["promptTokens"]) !== void 0 && finiteNumber(usage["cachedTokens"]) !== void 0 && finiteNumber(usage["candidateTokens"]) !== void 0 && finiteNumber(usage["apiTimeMs"]) !== void 0;
|
|
1709
1518
|
if (!validUsage) {
|
|
1710
1519
|
onDiagnostic?.({
|
|
1711
1520
|
code: "invalid_replay_state",
|
|
@@ -1918,18 +1727,18 @@ function usageFromTaskExecution(display) {
|
|
|
1918
1727
|
const summary = isObjectRecord(display["executionSummary"]) ? display["executionSummary"] : void 0;
|
|
1919
1728
|
if (!summary) return {};
|
|
1920
1729
|
return {
|
|
1921
|
-
...
|
|
1922
|
-
...
|
|
1923
|
-
...
|
|
1924
|
-
...
|
|
1925
|
-
...
|
|
1730
|
+
...finiteNumber(summary["inputTokens"]) !== void 0 ? { promptTokenCount: summary["inputTokens"] } : {},
|
|
1731
|
+
...finiteNumber(summary["outputTokens"]) !== void 0 ? { candidatesTokenCount: summary["outputTokens"] } : {},
|
|
1732
|
+
...finiteNumber(summary["thoughtTokens"]) !== void 0 ? { thoughtsTokenCount: summary["thoughtTokens"] } : {},
|
|
1733
|
+
...finiteNumber(summary["cachedTokens"]) !== void 0 ? { cachedContentTokenCount: summary["cachedTokens"] } : {},
|
|
1734
|
+
...finiteNumber(summary["totalTokens"]) !== void 0 ? { totalTokenCount: summary["totalTokens"] } : {}
|
|
1926
1735
|
};
|
|
1927
1736
|
}
|
|
1928
1737
|
__name(usageFromTaskExecution, "usageFromTaskExecution");
|
|
1929
|
-
function
|
|
1738
|
+
function finiteNumber(value) {
|
|
1930
1739
|
return typeof value === "number" && Number.isFinite(value) ? value : void 0;
|
|
1931
1740
|
}
|
|
1932
|
-
__name(
|
|
1741
|
+
__name(finiteNumber, "finiteNumber");
|
|
1933
1742
|
function extractErrorMessage(value) {
|
|
1934
1743
|
if (value instanceof Error) return value.message;
|
|
1935
1744
|
if (!isObjectRecord(value)) return void 0;
|
|
@@ -1941,16 +1750,9 @@ function dedupeStrings(values) {
|
|
|
1941
1750
|
}
|
|
1942
1751
|
__name(dedupeStrings, "dedupeStrings");
|
|
1943
1752
|
|
|
1944
|
-
// packages/cli/src/acp-integration/session/emitters/
|
|
1753
|
+
// packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts
|
|
1945
1754
|
init_esbuild_shims();
|
|
1946
1755
|
|
|
1947
|
-
// packages/cli/src/acp-integration/session/types.ts
|
|
1948
|
-
init_esbuild_shims();
|
|
1949
|
-
function hasFullSessionContext(context) {
|
|
1950
|
-
return "config" in context;
|
|
1951
|
-
}
|
|
1952
|
-
__name(hasFullSessionContext, "hasFullSessionContext");
|
|
1953
|
-
|
|
1954
1756
|
// packages/cli/src/acp-integration/session/emitters/base-emitter.ts
|
|
1955
1757
|
init_esbuild_shims();
|
|
1956
1758
|
var BaseEmitter = class {
|
|
@@ -1993,191 +1795,7 @@ var BaseEmitter = class {
|
|
|
1993
1795
|
}
|
|
1994
1796
|
};
|
|
1995
1797
|
|
|
1996
|
-
// packages/cli/src/acp-integration/session/emitters/MessageEmitter.ts
|
|
1997
|
-
var MessageEmitter = class extends BaseEmitter {
|
|
1998
|
-
static {
|
|
1999
|
-
__name(this, "MessageEmitter");
|
|
2000
|
-
}
|
|
2001
|
-
/**
|
|
2002
|
-
* Emits a StopHookLoop event when Stop hooks create a loop.
|
|
2003
|
-
* This informs the client that Stop hooks have been executed multiple times.
|
|
2004
|
-
*
|
|
2005
|
-
* @param iterationCount - The current iteration count
|
|
2006
|
-
* @param reasons - Array of reasons from each Stop hook execution
|
|
2007
|
-
* @param stopHookCount - Number of Stop hooks that were executed
|
|
2008
|
-
*/
|
|
2009
|
-
async emitStopHookLoop(iterationCount, reasons, stopHookCount) {
|
|
2010
|
-
const activeGoal = getActiveGoal(this.sessionId);
|
|
2011
|
-
await this.sendUpdate({
|
|
2012
|
-
sessionUpdate: "agent_message_chunk",
|
|
2013
|
-
content: { type: "text", text: "" },
|
|
2014
|
-
_meta: {
|
|
2015
|
-
stopHookLoop: {
|
|
2016
|
-
iterationCount,
|
|
2017
|
-
reasons,
|
|
2018
|
-
stopHookCount,
|
|
2019
|
-
...activeGoal ? {
|
|
2020
|
-
goal: {
|
|
2021
|
-
condition: activeGoal.condition,
|
|
2022
|
-
iterations: activeGoal.iterations,
|
|
2023
|
-
setAt: activeGoal.setAt,
|
|
2024
|
-
lastReason: activeGoal.lastReason
|
|
2025
|
-
}
|
|
2026
|
-
} : {}
|
|
2027
|
-
}
|
|
2028
|
-
}
|
|
2029
|
-
});
|
|
2030
|
-
}
|
|
2031
|
-
async emitGoalTerminal(event) {
|
|
2032
|
-
await this.sendUpdate({
|
|
2033
|
-
sessionUpdate: "agent_message_chunk",
|
|
2034
|
-
content: { type: "text", text: "" },
|
|
2035
|
-
_meta: {
|
|
2036
|
-
goalTerminal: event
|
|
2037
|
-
}
|
|
2038
|
-
});
|
|
2039
|
-
}
|
|
2040
|
-
async emitGoalStatus(status) {
|
|
2041
|
-
await this.sendUpdate({
|
|
2042
|
-
sessionUpdate: "agent_message_chunk",
|
|
2043
|
-
content: { type: "text", text: "" },
|
|
2044
|
-
_meta: {
|
|
2045
|
-
goalStatus: status
|
|
2046
|
-
}
|
|
2047
|
-
});
|
|
2048
|
-
}
|
|
2049
|
-
/**
|
|
2050
|
-
* Emits a user message chunk.
|
|
2051
|
-
*
|
|
2052
|
-
* @param text - The user message text content
|
|
2053
|
-
* @param timestamp - Optional server-side timestamp (ISO string or ms) for message ordering
|
|
2054
|
-
*/
|
|
2055
|
-
async emitUserMessage(text, timestamp, options = {}) {
|
|
2056
|
-
await this.sendUpdate(
|
|
2057
|
-
createTranscriptMessageUpdate({
|
|
2058
|
-
role: "user",
|
|
2059
|
-
text,
|
|
2060
|
-
timestamp,
|
|
2061
|
-
...options.source ? { extra: { source: options.source } } : {}
|
|
2062
|
-
})
|
|
2063
|
-
);
|
|
2064
|
-
}
|
|
2065
|
-
/**
|
|
2066
|
-
* Emits an agent thought chunk.
|
|
2067
|
-
*
|
|
2068
|
-
* @param text - The thought text content
|
|
2069
|
-
* @param timestamp - Optional server-side timestamp (ISO string or ms) for message ordering
|
|
2070
|
-
*/
|
|
2071
|
-
async emitAgentThought(text, timestamp, subagentMeta) {
|
|
2072
|
-
await this.sendUpdate(
|
|
2073
|
-
createTranscriptMessageUpdate({
|
|
2074
|
-
role: "assistant",
|
|
2075
|
-
thought: true,
|
|
2076
|
-
text,
|
|
2077
|
-
timestamp,
|
|
2078
|
-
...subagentMeta ? { extra: { ...subagentMeta } } : {}
|
|
2079
|
-
})
|
|
2080
|
-
);
|
|
2081
|
-
}
|
|
2082
|
-
/**
|
|
2083
|
-
* Emits an agent message chunk.
|
|
2084
|
-
*
|
|
2085
|
-
* @param text - The agent message text content
|
|
2086
|
-
* @param timestamp - Optional server-side timestamp (ISO string or ms) for message ordering
|
|
2087
|
-
*/
|
|
2088
|
-
async emitAgentMessage(text, timestamp, subagentMeta) {
|
|
2089
|
-
await this.sendUpdate(
|
|
2090
|
-
createTranscriptMessageUpdate({
|
|
2091
|
-
role: "assistant",
|
|
2092
|
-
text,
|
|
2093
|
-
timestamp,
|
|
2094
|
-
...subagentMeta ? { extra: { ...subagentMeta } } : {}
|
|
2095
|
-
})
|
|
2096
|
-
);
|
|
2097
|
-
}
|
|
2098
|
-
async emitSlashCommandOutput(text, timestamp) {
|
|
2099
|
-
const epochMs = BaseEmitter.toEpochMs(timestamp);
|
|
2100
|
-
await this.sendUpdate({
|
|
2101
|
-
sessionUpdate: "agent_message_chunk",
|
|
2102
|
-
content: { type: "text", text },
|
|
2103
|
-
_meta: {
|
|
2104
|
-
source: "slash_command",
|
|
2105
|
-
...epochMs != null ? { timestamp: epochMs } : {}
|
|
2106
|
-
}
|
|
2107
|
-
});
|
|
2108
|
-
}
|
|
2109
|
-
/**
|
|
2110
|
-
* Emits usage metadata.
|
|
2111
|
-
*/
|
|
2112
|
-
async emitUsageMetadata(usageMetadata, text = "", durationMs, subagentMeta) {
|
|
2113
|
-
const cumulative = this.ctx.cumulativeUsage;
|
|
2114
|
-
if (cumulative) {
|
|
2115
|
-
const addFinite = /* @__PURE__ */ __name((total, value) => typeof value === "number" && Number.isFinite(value) ? total + value : total, "addFinite");
|
|
2116
|
-
cumulative.promptTokens = addFinite(
|
|
2117
|
-
cumulative.promptTokens,
|
|
2118
|
-
usageMetadata.promptTokenCount
|
|
2119
|
-
);
|
|
2120
|
-
cumulative.candidateTokens = addFinite(
|
|
2121
|
-
cumulative.candidateTokens,
|
|
2122
|
-
usageMetadata.candidatesTokenCount
|
|
2123
|
-
);
|
|
2124
|
-
cumulative.cachedTokens = addFinite(
|
|
2125
|
-
cumulative.cachedTokens,
|
|
2126
|
-
usageMetadata.cachedContentTokenCount
|
|
2127
|
-
);
|
|
2128
|
-
cumulative.apiTimeMs = addFinite(cumulative.apiTimeMs, durationMs);
|
|
2129
|
-
}
|
|
2130
|
-
let activityMeta = {};
|
|
2131
|
-
if (typeof durationMs === "number") {
|
|
2132
|
-
const activity = apiActivityTracker.drain();
|
|
2133
|
-
activityMeta = {
|
|
2134
|
-
...activity.errors > 0 ? { apiErrors: activity.errors } : {},
|
|
2135
|
-
...activity.retries > 0 ? { apiRetries: activity.retries } : {}
|
|
2136
|
-
};
|
|
2137
|
-
}
|
|
2138
|
-
await this.sendUpdate(
|
|
2139
|
-
createTranscriptUsageUpdate(usageMetadata, {
|
|
2140
|
-
text,
|
|
2141
|
-
extra: {
|
|
2142
|
-
...typeof durationMs === "number" ? { durationMs } : {},
|
|
2143
|
-
...activityMeta,
|
|
2144
|
-
...subagentMeta
|
|
2145
|
-
}
|
|
2146
|
-
})
|
|
2147
|
-
);
|
|
2148
|
-
if (!Number.isFinite(durationMs) || subagentMeta || !hasFullSessionContext(this.ctx)) {
|
|
2149
|
-
return;
|
|
2150
|
-
}
|
|
2151
|
-
const used = usageMetadata.promptTokenCount ?? usageMetadata.totalTokenCount;
|
|
2152
|
-
const size = this.ctx.config.getContentGeneratorConfig()?.contextWindowSize;
|
|
2153
|
-
if (typeof used !== "number" || !Number.isSafeInteger(used) || used < 0 || typeof size !== "number" || !Number.isSafeInteger(size) || size <= 0) {
|
|
2154
|
-
return;
|
|
2155
|
-
}
|
|
2156
|
-
await this.sendUpdate({
|
|
2157
|
-
sessionUpdate: "usage_update",
|
|
2158
|
-
used,
|
|
2159
|
-
size
|
|
2160
|
-
});
|
|
2161
|
-
}
|
|
2162
|
-
/**
|
|
2163
|
-
* Emits a message chunk based on role and thought flag.
|
|
2164
|
-
* This is the unified method that handles all message types.
|
|
2165
|
-
*
|
|
2166
|
-
* @param text - The message text content
|
|
2167
|
-
* @param role - Whether this is a user or assistant message
|
|
2168
|
-
* @param isThought - Whether this is an assistant thought (only applies to assistant role)
|
|
2169
|
-
* @param timestamp - Optional server-side timestamp (ISO string or ms) for message ordering
|
|
2170
|
-
*/
|
|
2171
|
-
async emitMessage(text, role, isThought = false, timestamp, subagentMeta) {
|
|
2172
|
-
if (role === "user") {
|
|
2173
|
-
return this.emitUserMessage(text, timestamp);
|
|
2174
|
-
}
|
|
2175
|
-
return isThought ? this.emitAgentThought(text, timestamp, subagentMeta) : this.emitAgentMessage(text, timestamp, subagentMeta);
|
|
2176
|
-
}
|
|
2177
|
-
};
|
|
2178
|
-
|
|
2179
1798
|
// packages/cli/src/acp-integration/session/emitters/PlanEmitter.ts
|
|
2180
|
-
init_esbuild_shims();
|
|
2181
1799
|
var PlanEmitter = class extends BaseEmitter {
|
|
2182
1800
|
static {
|
|
2183
1801
|
__name(this, "PlanEmitter");
|
|
@@ -2224,6 +1842,15 @@ var PlanEmitter = class extends BaseEmitter {
|
|
|
2224
1842
|
|
|
2225
1843
|
// packages/cli/src/acp-integration/session/emitters/tool-call-emitter.ts
|
|
2226
1844
|
init_esbuild_shims();
|
|
1845
|
+
|
|
1846
|
+
// packages/cli/src/acp-integration/session/types.ts
|
|
1847
|
+
init_esbuild_shims();
|
|
1848
|
+
function hasFullSessionContext(context) {
|
|
1849
|
+
return "config" in context;
|
|
1850
|
+
}
|
|
1851
|
+
__name(hasFullSessionContext, "hasFullSessionContext");
|
|
1852
|
+
|
|
1853
|
+
// packages/cli/src/acp-integration/session/emitters/tool-call-emitter.ts
|
|
2227
1854
|
var KIND_MAP = {
|
|
2228
1855
|
["read" /* Read */]: "read",
|
|
2229
1856
|
["edit" /* Edit */]: "edit",
|
|
@@ -2520,25 +2147,16 @@ __name(buildToolResultContentPrefix, "buildToolResultContentPrefix");
|
|
|
2520
2147
|
|
|
2521
2148
|
// packages/cli/src/acp-integration/session/history-replayer.ts
|
|
2522
2149
|
init_esbuild_shims();
|
|
2523
|
-
var GOAL_NOT_RESTORED_REASON = {
|
|
2524
|
-
"untrusted-folder": "Goal not restored: this folder is not trusted, so its Stop hook cannot run.",
|
|
2525
|
-
"hooks-disabled": "Goal not restored: hooks are disabled for this session.",
|
|
2526
|
-
"no-hook-system": "Goal not restored: the hook system is unavailable."
|
|
2527
|
-
};
|
|
2528
2150
|
var HistoryReplayer = class {
|
|
2529
|
-
constructor(ctx
|
|
2151
|
+
constructor(ctx) {
|
|
2530
2152
|
this.ctx = ctx;
|
|
2531
|
-
this.options = options;
|
|
2532
|
-
this.messageEmitter = new MessageEmitter(ctx);
|
|
2533
2153
|
this.toolCallEmitter = new ToolCallEmitter(ctx);
|
|
2534
2154
|
this.machine = this.createMachine();
|
|
2535
2155
|
}
|
|
2536
2156
|
static {
|
|
2537
2157
|
__name(this, "HistoryReplayer");
|
|
2538
2158
|
}
|
|
2539
|
-
messageEmitter;
|
|
2540
2159
|
toolCallEmitter;
|
|
2541
|
-
options;
|
|
2542
2160
|
machine;
|
|
2543
2161
|
async replay(records, gaps) {
|
|
2544
2162
|
try {
|
|
@@ -2546,7 +2164,6 @@ var HistoryReplayer = class {
|
|
|
2546
2164
|
finalizeDangling: true,
|
|
2547
2165
|
gaps
|
|
2548
2166
|
});
|
|
2549
|
-
await this.supersedeUnrestorableGoal(records);
|
|
2550
2167
|
} finally {
|
|
2551
2168
|
this.setActiveRecordId(null);
|
|
2552
2169
|
}
|
|
@@ -2653,42 +2270,6 @@ var HistoryReplayer = class {
|
|
|
2653
2270
|
cumulative.candidateTokens = state.cumulativeUsage.candidateTokens;
|
|
2654
2271
|
cumulative.apiTimeMs = state.cumulativeUsage.apiTimeMs;
|
|
2655
2272
|
}
|
|
2656
|
-
/**
|
|
2657
|
-
* Emits a trailing `cleared` card when the transcript ends on an active goal
|
|
2658
|
-
* that `restoreGoalFromHistory` is about to refuse.
|
|
2659
|
-
*
|
|
2660
|
-
* A client reads "there is an active goal" off the newest goal card it has
|
|
2661
|
-
* seen, so replaying a `set` card that no Stop hook will drive leaves the UI
|
|
2662
|
-
* claiming a goal is running when the loop is dead. The gates are pure
|
|
2663
|
-
* functions of `config`, so the answer is known here, before restore runs.
|
|
2664
|
-
*
|
|
2665
|
-
* This card is emitted, not recorded: the transcript keeps its `set` card, so
|
|
2666
|
-
* a later resume in a trusted folder (or with hooks re-enabled) restores the
|
|
2667
|
-
* goal instead of finding it destroyed. Emitting from inside replay is also
|
|
2668
|
-
* what puts the card *after* the `set` card — `loadSession` batches replay
|
|
2669
|
-
* updates into its response, and a notification sent afterwards would reach
|
|
2670
|
-
* the client first.
|
|
2671
|
-
*
|
|
2672
|
-
* Gated on `supersedeUnrestorableGoal`: only a resume registers a hook, and
|
|
2673
|
-
* only a resume has a `config` that answers trust and hook-policy questions.
|
|
2674
|
-
*/
|
|
2675
|
-
async supersedeUnrestorableGoal(records) {
|
|
2676
|
-
if (!this.options.supersedeUnrestorableGoal) return;
|
|
2677
|
-
const active = findGoalToRestore(
|
|
2678
|
-
collectGoalStatusItemsFromRecords(records)
|
|
2679
|
-
);
|
|
2680
|
-
if (!active || goalConditionBlockedBy(active.condition)) return;
|
|
2681
|
-
if (!hasFullSessionContext(this.ctx)) return;
|
|
2682
|
-
const blockedBy = goalRestoreBlockedBy(this.ctx.config);
|
|
2683
|
-
if (!blockedBy) return;
|
|
2684
|
-
await this.messageEmitter.emitGoalStatus({
|
|
2685
|
-
kind: "cleared",
|
|
2686
|
-
condition: active.condition,
|
|
2687
|
-
iterations: active.iterations,
|
|
2688
|
-
...active.setAt !== void 0 ? { setAt: active.setAt } : {},
|
|
2689
|
-
lastReason: GOAL_NOT_RESTORED_REASON[blockedBy]
|
|
2690
|
-
});
|
|
2691
|
-
}
|
|
2692
2273
|
setActiveRecordId(recordId, timestamp) {
|
|
2693
2274
|
this.ctx.setActiveRecordId?.(recordId, timestamp);
|
|
2694
2275
|
}
|
|
@@ -2931,7 +2512,7 @@ async function extractMetadata(conversation, config) {
|
|
|
2931
2512
|
const gitBranch = firstRecord?.gitBranch;
|
|
2932
2513
|
let gitRepo;
|
|
2933
2514
|
if (cwd) {
|
|
2934
|
-
const { getGitRepoName } = await import("./deferred-core-runtime-
|
|
2515
|
+
const { getGitRepoName } = await import("./deferred-core-runtime-3VD4V6YZ.js");
|
|
2935
2516
|
gitRepo = getGitRepoName(cwd);
|
|
2936
2517
|
}
|
|
2937
2518
|
let model;
|
|
@@ -3782,19 +3363,132 @@ __name(generateExportFilename, "generateExportFilename");
|
|
|
3782
3363
|
// packages/cli/src/ui/utils/export/index.ts
|
|
3783
3364
|
init_esbuild_shims();
|
|
3784
3365
|
|
|
3366
|
+
// packages/cli/src/utils/json-string-byte-projection.ts
|
|
3367
|
+
init_esbuild_shims();
|
|
3368
|
+
import { Buffer as Buffer2 } from "node:buffer";
|
|
3369
|
+
var JSON_STRING_DELIMITER_BYTES = 2;
|
|
3370
|
+
function jsonPayloadBytesAt(value, index) {
|
|
3371
|
+
const code = value.charCodeAt(index);
|
|
3372
|
+
if (code === 34 || code === 92) return 2;
|
|
3373
|
+
if (code <= 31) {
|
|
3374
|
+
return code === 8 || code === 9 || code === 10 || code === 12 || code === 13 ? 2 : 6;
|
|
3375
|
+
}
|
|
3376
|
+
if (code <= 127) return 1;
|
|
3377
|
+
if (code <= 2047) return 2;
|
|
3378
|
+
if (code >= 55296 && code <= 56319) {
|
|
3379
|
+
const next = value.charCodeAt(index + 1);
|
|
3380
|
+
return next >= 56320 && next <= 57343 ? 4 : 6;
|
|
3381
|
+
}
|
|
3382
|
+
if (code >= 56320 && code <= 57343) return 6;
|
|
3383
|
+
return 3;
|
|
3384
|
+
}
|
|
3385
|
+
__name(jsonPayloadBytesAt, "jsonPayloadBytesAt");
|
|
3386
|
+
function jsonPayloadWidthAt(value, index) {
|
|
3387
|
+
const code = value.charCodeAt(index);
|
|
3388
|
+
if (code < 55296 || code > 56319) return 1;
|
|
3389
|
+
const next = value.charCodeAt(index + 1);
|
|
3390
|
+
return next >= 56320 && next <= 57343 ? 2 : 1;
|
|
3391
|
+
}
|
|
3392
|
+
__name(jsonPayloadWidthAt, "jsonPayloadWidthAt");
|
|
3393
|
+
function jsonStringPayloadByteLength(value, stopAfterBytes = Number.POSITIVE_INFINITY) {
|
|
3394
|
+
let bytes = 0;
|
|
3395
|
+
for (let index = 0; index < value.length; ) {
|
|
3396
|
+
bytes += jsonPayloadBytesAt(value, index);
|
|
3397
|
+
if (bytes > stopAfterBytes) return bytes;
|
|
3398
|
+
index += jsonPayloadWidthAt(value, index);
|
|
3399
|
+
}
|
|
3400
|
+
return bytes;
|
|
3401
|
+
}
|
|
3402
|
+
__name(jsonStringPayloadByteLength, "jsonStringPayloadByteLength");
|
|
3403
|
+
function jsonStringJsonByteLength(value) {
|
|
3404
|
+
return JSON_STRING_DELIMITER_BYTES + jsonStringPayloadByteLength(value);
|
|
3405
|
+
}
|
|
3406
|
+
__name(jsonStringJsonByteLength, "jsonStringJsonByteLength");
|
|
3407
|
+
function jsonPayloadWidthBefore(value, end) {
|
|
3408
|
+
const last = value.charCodeAt(end - 1);
|
|
3409
|
+
if (last >= 56320 && last <= 57343 && end >= 2) {
|
|
3410
|
+
const previous = value.charCodeAt(end - 2);
|
|
3411
|
+
if (previous >= 55296 && previous <= 56319) return 2;
|
|
3412
|
+
}
|
|
3413
|
+
return 1;
|
|
3414
|
+
}
|
|
3415
|
+
__name(jsonPayloadWidthBefore, "jsonPayloadWidthBefore");
|
|
3416
|
+
function selectPrefix(value, budget) {
|
|
3417
|
+
let end = 0;
|
|
3418
|
+
let bytes = 0;
|
|
3419
|
+
while (end < value.length) {
|
|
3420
|
+
const partBytes = jsonPayloadBytesAt(value, end);
|
|
3421
|
+
if (bytes + partBytes > budget) break;
|
|
3422
|
+
bytes += partBytes;
|
|
3423
|
+
end += jsonPayloadWidthAt(value, end);
|
|
3424
|
+
}
|
|
3425
|
+
return end;
|
|
3426
|
+
}
|
|
3427
|
+
__name(selectPrefix, "selectPrefix");
|
|
3428
|
+
function selectSuffix(value, budget) {
|
|
3429
|
+
let start = value.length;
|
|
3430
|
+
let bytes = 0;
|
|
3431
|
+
while (start > 0) {
|
|
3432
|
+
const partWidth = jsonPayloadWidthBefore(value, start);
|
|
3433
|
+
const partBytes = jsonPayloadBytesAt(value, start - partWidth);
|
|
3434
|
+
if (bytes + partBytes > budget) break;
|
|
3435
|
+
bytes += partBytes;
|
|
3436
|
+
start -= partWidth;
|
|
3437
|
+
}
|
|
3438
|
+
return start;
|
|
3439
|
+
}
|
|
3440
|
+
__name(selectSuffix, "selectSuffix");
|
|
3441
|
+
function copyString(value) {
|
|
3442
|
+
return value.split("").join("");
|
|
3443
|
+
}
|
|
3444
|
+
__name(copyString, "copyString");
|
|
3445
|
+
function truncateJsonStringPayload(value, originalPayloadBytes, payloadBudget, marker) {
|
|
3446
|
+
if (originalPayloadBytes <= payloadBudget) return value;
|
|
3447
|
+
const markerPayloadBytes = jsonStringPayloadByteLength(marker);
|
|
3448
|
+
if (payloadBudget < markerPayloadBytes) {
|
|
3449
|
+
return copyString(value.slice(0, selectPrefix(value, payloadBudget)));
|
|
3450
|
+
}
|
|
3451
|
+
const sourceBudget = payloadBudget - markerPayloadBytes;
|
|
3452
|
+
const headBudget = Math.floor(sourceBudget * 0.2);
|
|
3453
|
+
const tailBudget = sourceBudget - headBudget;
|
|
3454
|
+
const headEnd = selectPrefix(value, headBudget);
|
|
3455
|
+
const tailStart = selectSuffix(value, tailBudget);
|
|
3456
|
+
return copyString(value.slice(0, headEnd)) + marker + copyString(value.slice(tailStart));
|
|
3457
|
+
}
|
|
3458
|
+
__name(truncateJsonStringPayload, "truncateJsonStringPayload");
|
|
3459
|
+
function projectJsonStringToByteBudget(value, jsonByteBudget, marker) {
|
|
3460
|
+
const payloadBudget = Math.max(
|
|
3461
|
+
0,
|
|
3462
|
+
jsonByteBudget - JSON_STRING_DELIMITER_BYTES
|
|
3463
|
+
);
|
|
3464
|
+
const payloadBytes = jsonStringPayloadByteLength(value, payloadBudget);
|
|
3465
|
+
if (payloadBytes <= payloadBudget) return value;
|
|
3466
|
+
const projected = truncateJsonStringPayload(
|
|
3467
|
+
value,
|
|
3468
|
+
payloadBytes,
|
|
3469
|
+
payloadBudget,
|
|
3470
|
+
marker
|
|
3471
|
+
);
|
|
3472
|
+
if (Buffer2.byteLength(JSON.stringify(projected), "utf8") <= jsonByteBudget) {
|
|
3473
|
+
return projected;
|
|
3474
|
+
}
|
|
3475
|
+
const fallback = copyString(
|
|
3476
|
+
marker.slice(0, selectPrefix(marker, payloadBudget))
|
|
3477
|
+
);
|
|
3478
|
+
return Buffer2.byteLength(JSON.stringify(fallback), "utf8") <= jsonByteBudget ? fallback : "";
|
|
3479
|
+
}
|
|
3480
|
+
__name(projectJsonStringToByteBudget, "projectJsonStringToByteBudget");
|
|
3481
|
+
|
|
3785
3482
|
export {
|
|
3786
3483
|
GITHUB_WORKFLOW_PATHS,
|
|
3787
3484
|
SetupGithubError,
|
|
3788
3485
|
setupGithub,
|
|
3789
3486
|
createTranscriptMessageUpdate,
|
|
3790
|
-
|
|
3487
|
+
createTranscriptUsageUpdate,
|
|
3488
|
+
BaseEmitter,
|
|
3791
3489
|
PlanEmitter,
|
|
3490
|
+
hasFullSessionContext,
|
|
3792
3491
|
ToolCallEmitter,
|
|
3793
|
-
collectGoalStatusItemsFromRecords,
|
|
3794
|
-
goalTerminalEventToHistoryItem,
|
|
3795
|
-
recordGoalStatusItem,
|
|
3796
|
-
installGoalTerminalObserver,
|
|
3797
|
-
restoreGoalFromHistory,
|
|
3798
3492
|
HistoryReplayer,
|
|
3799
3493
|
collectSessionData,
|
|
3800
3494
|
normalizeSessionData,
|
|
@@ -3804,21 +3498,26 @@ export {
|
|
|
3804
3498
|
toHtml,
|
|
3805
3499
|
toJson,
|
|
3806
3500
|
toJsonl,
|
|
3807
|
-
generateExportFilename
|
|
3501
|
+
generateExportFilename,
|
|
3502
|
+
JSON_STRING_DELIMITER_BYTES,
|
|
3503
|
+
jsonStringPayloadByteLength,
|
|
3504
|
+
jsonStringJsonByteLength,
|
|
3505
|
+
truncateJsonStringPayload,
|
|
3506
|
+
projectJsonStringToByteBudget
|
|
3808
3507
|
};
|
|
3809
3508
|
/**
|
|
3810
3509
|
* @license
|
|
3811
|
-
* Copyright
|
|
3510
|
+
* Copyright 2025 Google LLC
|
|
3812
3511
|
* SPDX-License-Identifier: Apache-2.0
|
|
3813
3512
|
*/
|
|
3814
3513
|
/**
|
|
3815
3514
|
* @license
|
|
3816
|
-
* Copyright 2025
|
|
3515
|
+
* Copyright 2025 Qwen Team
|
|
3817
3516
|
* SPDX-License-Identifier: Apache-2.0
|
|
3818
3517
|
*/
|
|
3819
3518
|
/**
|
|
3820
3519
|
* @license
|
|
3821
|
-
* Copyright
|
|
3520
|
+
* Copyright 2026 Qwen Team
|
|
3822
3521
|
* SPDX-License-Identifier: Apache-2.0
|
|
3823
3522
|
*/
|
|
3824
3523
|
/**
|