@qwen-code/qwen-code 0.19.9 → 0.19.10
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 +7 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +3 -0
- package/bundled/qc-helper/docs/features/channels/overview.md +11 -3
- package/bundled/qc-helper/docs/features/code-review.md +88 -44
- package/bundled/qc-helper/docs/features/commands.md +6 -6
- package/bundled/qc-helper/docs/features/hooks.md +29 -0
- package/bundled/qc-helper/docs/features/sub-agents.md +21 -0
- package/bundled/qc-helper/docs/qwen-serve.md +46 -20
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +1 -1
- package/bundled/review/DESIGN.md +219 -33
- package/bundled/review/SKILL.md +449 -153
- package/chunks/{MaxSizedBox-6HYJ3ZPJ.js → MaxSizedBox-67ODZ4SZ.js} +31 -31
- package/chunks/{StandaloneSessionPicker-WS4GXYOG.js → StandaloneSessionPicker-SIPBQT5Z.js} +51 -49
- package/chunks/{acpAgent-5FWSOZL5.js → acpAgent-VPZJXLFX.js} +528 -478
- package/chunks/{agent-HOLHB3RT.js → agent-Z7NWL6XL.js} +26 -26
- package/chunks/{agent-headless-SXL6H56A.js → agent-headless-73HZ6ROQ.js} +26 -26
- package/chunks/{anthropicContentGenerator-L73TO3DB.js → anthropicContentGenerator-56U3YCP2.js} +5 -5
- package/chunks/{artifact-tool-U7IRTLIV.js → artifact-tool-BWZZJ42H.js} +2 -2
- package/chunks/{askUserQuestion-2DLUUZZG.js → askUserQuestion-WU3S5A5T.js} +2 -2
- package/chunks/{bridge-BCJQ7BBB.js → bridge-XFKW6S7Q.js} +32 -32
- package/chunks/{ca-UJ6HC4H2.js → ca-C2JTT2N5.js} +4 -1
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-5RWKSGEU.js +418 -0
- package/chunks/channel-worker-supervisor-PCDAZN4D.js +20 -0
- package/chunks/{chunk-LXNEJD34.js → chunk-2FO5GFKZ.js} +1 -1
- package/chunks/{chunk-B5ORX3FG.js → chunk-2UUAIFQO.js} +1 -1
- package/chunks/{chunk-L36P3NBD.js → chunk-2W3OOD4W.js} +2 -0
- package/chunks/{chunk-7R3CZA3Q.js → chunk-2Z5UX4KI.js} +1 -1
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-E2IY465S.js → chunk-3XJFUTNM.js} +10 -10
- package/chunks/{chunk-JZETEN3Z.js → chunk-422XAKCK.js} +3 -3
- package/chunks/{chunk-N3EMS75V.js → chunk-4FMG7EDJ.js} +1268 -1233
- package/chunks/{chunk-HKMAENAO.js → chunk-4YWLED2A.js} +8 -6
- package/chunks/{chunk-SCGXUJBT.js → chunk-5EBKKSBX.js} +3 -3
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-XYQSMABS.js → chunk-5LROA5W4.js} +4 -4
- package/chunks/{chunk-ZJE7NSL3.js → chunk-5M6IDOMF.js} +34 -97
- package/chunks/{chunk-VA4KQY6V.js → chunk-65N2J6V2.js} +3 -3
- package/chunks/{chunk-4C5BQ2D2.js → chunk-6GETGQWP.js} +71 -12
- package/chunks/{chunk-PVZM22CK.js → chunk-6GKMJPOC.js} +5 -5
- package/chunks/{chunk-W2UIXQDL.js → chunk-6OATMEYN.js} +1 -1
- package/chunks/{chunk-GZRTYZ2R.js → chunk-6W6DI34P.js} +154 -1
- package/chunks/{chunk-EMDMPBJ4.js → chunk-7L4XBYVW.js} +3 -3
- package/chunks/{chunk-EAXLGSFP.js → chunk-7MJAZMXK.js} +8 -8
- package/chunks/{chunk-K434OPES.js → chunk-7NAWTFVY.js} +3 -3
- package/chunks/{chunk-J4TSQ5EQ.js → chunk-7NFB7LBQ.js} +8 -1
- package/chunks/{chunk-5SFOMFG4.js → chunk-7R4DPSRA.js} +36 -2
- package/chunks/{chunk-P67PFTUT.js → chunk-AAR5SGMD.js} +4 -4
- package/chunks/{chunk-RDJSGHZE.js → chunk-ALGGS7UH.js} +1 -38
- package/chunks/{chunk-GWHYEOV2.js → chunk-ARKANCNX.js} +2 -1
- package/chunks/{chunk-D2GFWEXB.js → chunk-B5I2IIWY.js} +6 -6
- package/chunks/{chunk-524RQP4Q.js → chunk-B7NUUEXC.js} +10 -4
- package/chunks/{chunk-CUMMSHH6.js → chunk-BBNVFRGD.js} +1 -1
- package/chunks/{chunk-5HOMWMCL.js → chunk-CEW4HDPK.js} +4166 -1338
- package/chunks/chunk-CJFNEBYB.js +91 -0
- package/chunks/{chunk-VWPVHAMO.js → chunk-CUUXANEQ.js} +5 -1
- package/chunks/{chunk-GWLSNBG4.js → chunk-DK33QJ3V.js} +30 -26
- package/chunks/{chunk-HPDUL5MF.js → chunk-DPFBNG72.js} +1 -1
- package/chunks/{chunk-KKNMOEZH.js → chunk-E2UVIFI2.js} +185 -398
- package/chunks/{chunk-MC23XKFE.js → chunk-E67NFMF4.js} +3 -3
- package/chunks/{chunk-OQ4DRIOA.js → chunk-EQY6POVO.js} +2 -2
- package/chunks/{chunk-XUOOWUZS.js → chunk-F7NXQH4Y.js} +1 -1
- package/chunks/{chunk-YLV3XXFB.js → chunk-FBU7WRZI.js} +17 -1
- package/chunks/{chunk-LK7KUE55.js → chunk-FSA7ERJ2.js} +1 -1
- package/chunks/{chunk-PDZ7MBDG.js → chunk-FXMC7SL2.js} +27 -6
- package/chunks/{chunk-SJHDYNHF.js → chunk-GDQQRV43.js} +3 -3
- package/chunks/{chunk-34MW4KTI.js → chunk-GGJII3FM.js} +2 -2
- package/chunks/{chunk-3BTRNWWD.js → chunk-GOXKNSDZ.js} +1 -64
- package/chunks/chunk-GYTKQYDB.js +23 -0
- package/chunks/{chunk-HVY356M2.js → chunk-H3FQOPPS.js} +3 -3
- package/chunks/{chunk-YVEDCAUE.js → chunk-HGT6JR3U.js} +19 -0
- package/chunks/{chunk-WQUQVGTF.js → chunk-HHEFI4RP.js} +183 -96
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/{chunk-6PESIEKJ.js → chunk-JSJFKYWT.js} +68 -6
- package/chunks/{chunk-CNEIYWSA.js → chunk-K4PZ5F5T.js} +5 -5
- package/chunks/{chunk-NVYTCB5Z.js → chunk-K7CRWKOE.js} +14534 -13980
- package/chunks/{chunk-ORBGV7NJ.js → chunk-KKRTYONM.js} +6 -4
- package/chunks/{chunk-IAVB3HM3.js → chunk-KSO42X3Z.js} +13 -0
- package/chunks/chunk-L37RC7MQ.js +493 -0
- package/chunks/{chunk-4QLQE5WJ.js → chunk-L5U3ELZX.js} +1 -1
- package/chunks/{chunk-3G7CIHVV.js → chunk-L62SEJWY.js} +4 -4
- package/chunks/{chunk-EGYZ275M.js → chunk-LNUXFLLJ.js} +4 -4
- package/chunks/{chunk-4ZVWQHEQ.js → chunk-LQIDP6K5.js} +1 -1
- package/chunks/{chunk-VTU57BWZ.js → chunk-LQU7EVFA.js} +1 -1
- package/chunks/{chunk-B4G2WOFA.js → chunk-LTNI523B.js} +2 -2
- package/chunks/{chunk-DC5Z3DU6.js → chunk-LXLTBIDP.js} +43 -6
- package/chunks/{chunk-KHUQZZJ6.js → chunk-MO7O5722.js} +370 -36
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-5VXNZWGF.js → chunk-N6FXRR6P.js} +1 -1
- package/chunks/{chunk-WL4L7EZH.js → chunk-OA4JVLSA.js} +27 -1
- package/chunks/{chunk-TO6QE22P.js → chunk-OATTJGPJ.js} +26 -22
- package/chunks/{chunk-X6TJ3YZV.js → chunk-OFEVHGVU.js} +159 -57
- package/chunks/{chunk-X4NKFGFJ.js → chunk-OJAMDVF5.js} +0 -15
- package/chunks/{chunk-BZIFY5TF.js → chunk-OKAIGAYW.js} +3 -3
- package/chunks/{chunk-3VAGG5T5.js → chunk-P6LART6G.js} +116 -15
- package/chunks/{chunk-3SJSQXNS.js → chunk-PEJWA3QQ.js} +12 -8
- package/chunks/{chunk-BAPGSC7U.js → chunk-Q5GLXH5Q.js} +23 -9
- package/chunks/{chunk-MXL5UP4X.js → chunk-Q6TUALBE.js} +1 -1
- package/chunks/{chunk-QYMQSECS.js → chunk-QAW7PIHT.js} +2 -2
- package/chunks/{chunk-LUODI7WD.js → chunk-RCEEXIOO.js} +6 -4
- package/chunks/{chunk-YAUFFXDS.js → chunk-RDRVMDWV.js} +12 -11
- package/chunks/{chunk-CEA3E3JB.js → chunk-SPJQO2CE.js} +2 -2
- package/chunks/{chunk-U2NNEY4R.js → chunk-SPUYQB4T.js} +1 -1
- package/chunks/{chunk-34Z3U5RQ.js → chunk-SXU3KKNI.js} +514 -114
- package/chunks/{chunk-ECNYL4AA.js → chunk-TISZXPAX.js} +1 -1
- package/chunks/{chunk-JSG7ZSBC.js → chunk-TQBODCFD.js} +1 -1
- package/chunks/{chunk-AKIVHSJR.js → chunk-TTUO4DNG.js} +111 -93
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-4GORAUCN.js → chunk-TXY2C3D2.js} +1 -1
- package/chunks/{chunk-5XUCZNSY.js → chunk-TYLOFD2U.js} +1 -1
- package/chunks/{chunk-CLFKOZEK.js → chunk-UFOKA4PR.js} +1 -1
- package/chunks/{channel-worker-supervisor-WSOAAYUO.js → chunk-URU5UEK6.js} +67 -35
- package/chunks/{chunk-D5SKC4YG.js → chunk-V7EQTZYR.js} +41 -13
- package/chunks/{chunk-L6P4KPHR.js → chunk-VBRRNQB7.js} +59 -39
- package/chunks/{chunk-BMGVRZN4.js → chunk-W34A5MJH.js} +1 -1
- package/chunks/{chunk-PODM4SZ4.js → chunk-WDW64OW3.js} +5 -5
- package/chunks/{chunk-W3JHSWRP.js → chunk-WDWJ4OQJ.js} +4 -4
- package/chunks/{chunk-Q4YQW46J.js → chunk-WIASPMLX.js} +31 -17
- package/chunks/{chunk-ZLXQN2QS.js → chunk-WIEO4CWB.js} +1 -1
- package/chunks/{chunk-A3XKDTSH.js → chunk-WLXYAKV7.js} +4 -4
- package/chunks/{chunk-Q6I5QHMH.js → chunk-WTSXKLG5.js} +1 -1
- package/chunks/{chunk-J3JA76CF.js → chunk-WX6SD4IQ.js} +1 -1
- package/chunks/{chunk-77XJ3SWN.js → chunk-X362TMXZ.js} +5 -5
- package/chunks/{chunk-CCDMCZPP.js → chunk-XLIRF7IK.js} +1 -1
- package/chunks/{chunk-AURZZYMD.js → chunk-XXJKGHZV.js} +4 -4
- package/chunks/{chunk-TDEXZKMT.js → chunk-Y66VOBRP.js} +2 -2
- package/chunks/{chunk-CC2ITGCF.js → chunk-YHN5SUIJ.js} +49 -6
- package/chunks/{chunk-3AHXV67U.js → chunk-YU56QGXX.js} +1 -1
- package/chunks/{chunk-5U27BZ72.js → chunk-YX4LLZ3D.js} +187 -75
- package/chunks/{chunk-ATAKVRIF.js → chunk-YYPXHMWO.js} +7 -7
- package/chunks/{chunk-XLA62MYB.js → chunk-ZKMGAFYV.js} +2 -2
- package/chunks/{chunk-UOZWKTQG.js → chunk-ZPAHLFZU.js} +2 -2
- package/chunks/{chunk-7PU4FYLG.js → chunk-ZQTZXVHP.js} +4 -4
- package/chunks/chunk-ZRKBI3DP.js +34 -0
- package/chunks/{computer-use-HM37RX6A.js → computer-use-IYTX45WA.js} +26 -26
- package/chunks/{config-utils-NV2SVGPB.js → config-utils-CFT33LTP.js} +3 -2
- package/chunks/{contextCommand-OF5SFGH2.js → contextCommand-272V77WU.js} +28 -28
- package/chunks/{create-sub-session-KPRT7ECJ.js → create-sub-session-CBJMQLYP.js} +26 -26
- package/chunks/{create-sub-session-INX7TXJI.js → create-sub-session-WNX2OQVX.js} +2 -2
- package/chunks/{cron-create-AMBKGZX6.js → cron-create-36TIFKRT.js} +4 -4
- package/chunks/{cron-delete-LRU4OJYG.js → cron-delete-OQD3WULU.js} +4 -4
- package/chunks/{cron-list-WVP2JXER.js → cron-list-4533T2FH.js} +4 -4
- package/chunks/{daemon-ARHTSTXP.js → daemon-RNGFPMAB.js} +575 -58
- package/chunks/{daemon-status-provider-B2UTZUJ2.js → daemon-status-provider-L4STG5VO.js} +36 -36
- package/chunks/{de-EBJN3OVN.js → de-2VCDRDGU.js} +4 -1
- package/chunks/{dist-VHV4EVHG.js → dist-3V3ZV6ML.js} +1 -1
- package/chunks/{dist-XKU3ABM5.js → dist-ERCPDVA6.js} +1 -1
- package/chunks/{dist-PNVLTKTL.js → dist-HNN7DR2L.js} +158 -4
- package/chunks/{dist-WKPOYU7O.js → dist-JZE7F6YR.js} +1 -1
- package/chunks/{dist-QYCAEZIT.js → dist-MOEC47TR.js} +5 -1
- package/chunks/{dist-R7LN5AZE.js → dist-PHEPJLXD.js} +2 -2
- package/chunks/{earlyInputCapture-3VTHRC4C.js → earlyInputCapture-EN4BRREQ.js} +27 -27
- package/chunks/{edit-VNI4NJ73.js → edit-OMAF2QDR.js} +27 -27
- package/chunks/{en-5A6LA7RK.js → en-NJCA3TAA.js} +5 -1
- package/chunks/{enter-worktree-IYYBKPZT.js → enter-worktree-BBZX52HG.js} +26 -26
- package/chunks/{enterPlanMode-GMC5FD5A.js → enterPlanMode-5NNFMBUY.js} +42 -27
- package/chunks/{environment-5HSSRMJ7.js → environment-7TEWMJYN.js} +30 -29
- package/chunks/{errors-HMFCJJ7P.js → errors-I4VKVX3F.js} +28 -28
- package/chunks/{exit-worktree-6BHCMP5G.js → exit-worktree-FUWRJI33.js} +26 -26
- package/chunks/{exitPlanMode-CJW7G74W.js → exitPlanMode-IHCJ5EEI.js} +26 -26
- package/chunks/{fast-path-FRDMDVHG.js → fast-path-ZA57TOH4.js} +3 -3
- package/chunks/{fast-path-settings-5QZE64HR.js → fast-path-settings-DAOVFADC.js} +6 -4
- package/chunks/{fr-YXRABLYZ.js → fr-5F3E7WKD.js} +4 -1
- package/chunks/{gemini-QYSEGHAX.js → gemini-UOAKVXBG.js} +139 -76
- package/chunks/{geminiContentGenerator-J7YNZDYP.js → geminiContentGenerator-G6UCE6MW.js} +4 -4
- package/chunks/{glob-BRCSGFOT.js → glob-4GJQ2UFF.js} +28 -27
- package/chunks/{grep-EE2DUOSY.js → grep-5QSYXF2E.js} +26 -26
- package/chunks/{handleAutoUpdate-5NWTLR67.js → handleAutoUpdate-ULHNWL6R.js} +30 -30
- package/chunks/{i18n-BASPENNQ.js → i18n-CYDUTF6F.js} +27 -27
- package/chunks/initializer-NRFKUGIO.js +73 -0
- package/chunks/{installationInfo-W6V4DT7W.js → installationInfo-WELKRHHE.js} +27 -27
- package/chunks/{ja-7VQOANVG.js → ja-66J6B53L.js} +5 -2
- package/chunks/{keychain-token-storage-VKUBNCP4.js → keychain-token-storage-AU22CQI6.js} +2 -2
- package/chunks/list-JVDXEG2E.js +76 -0
- package/chunks/loadedSettingsAdapter-WAM4VUTG.js +70 -0
- package/chunks/{loop-wakeup-WX7BLWWP.js → loop-wakeup-MVUKDVCP.js} +5 -5
- package/chunks/{ls-ZB2BDP6T.js → ls-RXNIAQDE.js} +4 -4
- package/chunks/{lsp-V5DN4YUJ.js → lsp-HB5LM5IL.js} +2 -2
- package/chunks/mcp-YHOZN3ZM.js +70 -0
- package/chunks/{monitor-X5Z3H4FY.js → monitor-R7XZPJHQ.js} +26 -26
- package/chunks/nonInteractiveCli-NSOB6D74.js +129 -0
- package/chunks/{notebook-edit-TRM2QIJK.js → notebook-edit-6RNKE2L2.js} +27 -27
- package/chunks/{openaiContentGenerator-AAYONPMF.js → openaiContentGenerator-XNS5S64I.js} +12 -12
- package/chunks/{pidfile-D4I4FTVA.js → pidfile-XE4RRR2P.js} +27 -27
- package/chunks/{pt-2C6YCSHL.js → pt-TFZO5Y6T.js} +4 -1
- package/chunks/{qwenContentGenerator-K3HZ2H76.js → qwenContentGenerator-APDPJ3VN.js} +28 -28
- package/chunks/{qwenOAuth2-PJQ27GSO.js → qwenOAuth2-LEYOU7RU.js} +5 -5
- package/chunks/{read-file-7SZSIZOL.js → read-file-XSUWXSR7.js} +8 -8
- package/chunks/{read-mcp-resource-SM5DA4RG.js → read-mcp-resource-6LRTZKXI.js} +2 -2
- package/chunks/{record-artifact-4XKZX3UW.js → record-artifact-PMDTY4OS.js} +2 -2
- package/chunks/{ripGrep-YNPFVCZP.js → ripGrep-APB3CDMU.js} +26 -26
- package/chunks/{ru-6BBHVZZV.js → ru-4L4LFHIT.js} +4 -1
- package/chunks/{run-qwen-serve-DMWV5N6L.js → run-qwen-serve-NWTGPERT.js} +1232 -371
- package/chunks/{runtime-57WWRVHN.js → runtime-EIO3NQKR.js} +42 -37
- package/chunks/{scheduler-YBLGWSIL.js → scheduler-JJDZBDRN.js} +26 -26
- package/chunks/{send-message-F36YD6KQ.js → send-message-SR4WSXP2.js} +3 -3
- package/chunks/{serve-R63NK3CV.js → serve-WTIPB3EI.js} +36 -34
- package/chunks/{server-Z22GCAXP.js → server-NJPHQHLH.js} +5238 -1328
- package/chunks/{session-HKAAI7BN.js → session-O4AO7FTS.js} +298 -98
- package/chunks/{settings-3EYN66GK.js → settings-HQNDK7TG.js} +34 -32
- package/chunks/{shell-6YXINTWJ.js → shell-UIXM6PWG.js} +26 -26
- package/chunks/{skill-OO57P4X6.js → skill-3XMB4ULV.js} +10 -10
- package/chunks/{spawnChannel-JD7G4VU6.js → spawnChannel-3R632QRM.js} +28 -28
- package/chunks/{src-G5UPLZSZ.js → src-USZKPUOC.js} +85 -27
- package/chunks/{standalone-update-OB7F4JPZ.js → standalone-update-L5XW3D7K.js} +28 -28
- package/chunks/{startInteractiveUI-73EGLIIH.js → startInteractiveUI-CPZOL2WB.js} +730 -397
- package/chunks/{syntheticOutput-34H7LGA7.js → syntheticOutput-YKFNUQZD.js} +3 -3
- package/chunks/{task-create-FRGOEIKY.js → task-create-NUFOHU53.js} +8 -7
- package/chunks/{task-list-OW766BXZ.js → task-list-Z2IKQY3S.js} +6 -5
- package/chunks/{task-stop-SIR5SNBN.js → task-stop-KQFIVQTJ.js} +2 -2
- package/chunks/{task-update-YRA532MT.js → task-update-HKADXSTD.js} +8 -7
- package/chunks/{team-create-PECAAPXK.js → team-create-XXPRF3IQ.js} +26 -26
- package/chunks/{team-delete-6OSECUZC.js → team-delete-SDNTGZLG.js} +6 -5
- package/chunks/{team-plan-approval-L6F434RY.js → team-plan-approval-EOTTKHDW.js} +26 -26
- package/chunks/{theme-manager-ZG4RY6GU.js → theme-manager-P6UITO2L.js} +27 -27
- package/chunks/{todoWrite-YDMFEV4G.js → todoWrite-YNXB27GB.js} +4 -4
- package/chunks/{tool-search-THVIWAPB.js → tool-search-DDNGK2LR.js} +9 -9
- package/chunks/{total-session-admission-JOKNRIIA.js → total-session-admission-PL5N7DNY.js} +33 -33
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/{trustedFolders-EOGT3UVS.js → trustedFolders-C5LMF3UR.js} +29 -28
- package/chunks/types-ML3TRJQ5.js +16 -0
- package/chunks/{updateCheck-2KYEYVSB.js → updateCheck-QTVVISH7.js} +29 -29
- package/chunks/{validateNonInterActiveAuth-EN6ZQSR2.js → validateNonInterActiveAuth-RY4RKBQG.js} +75 -71
- package/chunks/{version-3UEA6ZIR.js → version-U45RYOSD.js} +1 -1
- package/chunks/{web-fetch-PAAEQKBW.js → web-fetch-ZSPR3PRR.js} +5 -5
- package/chunks/{workflow-QCCCMYP3.js → workflow-TCIAQYOA.js} +27 -27
- package/chunks/workspace-providers-status-I3G2HYLY.js +73 -0
- package/chunks/workspace-registration-store-IH5GLZ6Y.js +27 -0
- package/chunks/{workspace-registry-24QFLQYH.js → workspace-registry-QEKBELIX.js} +33 -33
- package/chunks/workspace-service-ORKHGLP3.js +86 -0
- package/chunks/workspace-skills-status-D7QCNDYY.js +72 -0
- package/chunks/{write-file-I3MUDRIE.js → write-file-JGRQR5VM.js} +27 -27
- package/chunks/{zh-RQE7I22T.js → zh-FSAH32JB.js} +6 -2
- package/chunks/{zh-TW-TBPQGHKH.js → zh-TW-D2YIE2LO.js} +6 -2
- package/cli.js +11 -11
- package/locales/ca.js +6 -0
- package/locales/de.js +6 -0
- package/locales/en.js +8 -0
- package/locales/fr.js +6 -0
- package/locales/ja.js +7 -1
- package/locales/pt.js +6 -0
- package/locales/ru.js +6 -0
- package/locales/zh-TW.js +9 -1
- package/locales/zh.js +9 -1
- package/package.json +3 -3
- package/web-shell/assets/{arc-C15hqnJe.js → arc-CUeDlxvE.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-B-At37J_.js → architectureDiagram-3BPJPVTR-PiUszkQA.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-B51wjcU7.js → blockDiagram-GPEHLZMM-s2wYSO7e.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-xBK7BAwN.js → c4Diagram-AAUBKEIU-DyLxZoz9.js} +1 -1
- package/web-shell/assets/channel-DkuJJ0qd.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-xKmLg7Yr.js → chunk-2J33WTMH-Dsdai7Tk.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-BfkdKZCM.js → chunk-4BX2VUAB-DEosOjV7.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DT713sZf.js → chunk-55IACEB6-sNsRLTXf.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-CYEeAamv.js → chunk-727SXJPM-DkRNZzmh.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-DBN-5CFd.js → chunk-AQP2D5EJ-BrsRNpzd.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-CGZKk4PH.js → chunk-FMBD7UC4-CI039lpl.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-qQbC2O-y.js → chunk-ND2GUHAM-M-pkeIfu.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-B3zeXwsX.js → chunk-QZHKN3VN-C4ckGNbH.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwqHc0TB.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwqHc0TB.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-BKsl1Wvy.js → cose-bilkent-S5V4N54A-BciKUAFq.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CuuuLiBK.js → dagre-BM42HDAG-C1nTSgU6.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CG4_eKiV.js → diagram-2AECGRRQ-BDPNWr1m.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-DSFTmZB1.js → diagram-5GNKFQAL-CNFhTszL.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-BxwlEHn8.js → diagram-KO2AKTUF-CjPa4p5a.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUAg-jMG.js → diagram-LMA3HP47-ZzPykSyG.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-BFM2jlO5.js → diagram-OG6HWLK6-0UVtZ9A4.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-CerbFPa2.js → erDiagram-TEJ5UH35-CajDZCat.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BNeZz5Zz.js → flowDiagram-I6XJVG4X-BRuFBIvL.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-CTOogLaM.js → ganttDiagram-6RSMTGT7-BevGmJqG.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-yxSFkXPj.js → gitGraphDiagram-PVQCEYII-DvPMpBMb.js} +1 -1
- package/web-shell/assets/index-Cnvv4VcI.css +5 -0
- package/web-shell/assets/index-D1Uyklxa.js +1088 -0
- package/web-shell/assets/index-DzHwQkQq.js +3 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-DYdAUevm.js → infoDiagram-5YYISTIA-Oixn7tA9.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-CNuijZ90.js → ishikawaDiagram-YF4QCWOH-BgKpeg-j.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-BTyiuonf.js → journeyDiagram-JHISSGLW-74mwxIaA.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-DPJo0Uow.js → kanban-definition-UN3LZRKU-D4D6cEqA.js} +1 -1
- package/web-shell/assets/{linear-C8wKCbIC.js → linear-atZRE_L2.js} +1 -1
- package/web-shell/assets/{mermaid.core-BV5o7nW5.js → mermaid.core-KKudX-JC.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-BtLcBmSt.js → mindmap-definition-RKZ34NQL-CMCej9yG.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-C22J7A9Q.js → pieDiagram-4H26LBE5-nhx40X7q.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DSL10wiL.js → quadrantDiagram-W4KKPZXB-CUmVcN3M.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-feqh0UpX.js → requirementDiagram-4Y6WPE33-C_vyEwyy.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-Z4OVaWaZ.js → sankeyDiagram-5OEKKPKP-DU6G4VWR.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DIluIcb1.js → sequenceDiagram-3UESZ5HK-DdeRR_KJ.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-hlhnuoYH.js → stateDiagram-AJRCARHV-C6iCI8ps.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-C0_6nR6C.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-Dqf_CqgL.js → timeline-definition-PNZ67QCA-B_Ea8Cb7.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DD2QhaTX.js → vennDiagram-CIIHVFJN-BPUVZEJA.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B2uI85U_.js → wardley-L42UT6IY-BWEj0lKY.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-U1aJX71g.js → wardleyDiagram-YWT4CUSO-BvDsdIQw.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-C0ODHUee.js → xychartDiagram-2RQKCTM6-crz0QhF_.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-CU3L64TP.js +0 -93
- package/chunks/initializer-UTQ7FB7G.js +0 -71
- package/chunks/list-DEICDL65.js +0 -74
- package/chunks/loadedSettingsAdapter-NOWEGDYJ.js +0 -68
- package/chunks/mcp-L5JXEEIA.js +0 -68
- package/chunks/nonInteractiveCli-LS2K4X6A.js +0 -124
- package/chunks/types-JNKGKUJT.js +0 -12
- package/chunks/workspace-providers-status-4KMGETOJ.js +0 -71
- package/chunks/workspace-service-RVLBMSMZ.js +0 -80
- package/chunks/workspace-skills-status-DS4ZVFTO.js +0 -70
- package/web-shell/assets/channel-CLiQD50f.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-D3sYqow5.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-D3sYqow5.js +0 -1
- package/web-shell/assets/index-D5IWFVk1.css +0 -5
- package/web-shell/assets/index-KFJRDhX7.js +0 -783
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BhQMwgpl.js +0 -1
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
// Force strict mode and setup for ESM
|
|
2
2
|
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
5
|
+
} from "./chunk-5HBA2Z7V.js";
|
|
3
6
|
import {
|
|
4
7
|
init_esbuild_shims
|
|
5
8
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -339,10 +342,12 @@ var RestSseTransport = class {
|
|
|
339
342
|
_disposed = false;
|
|
340
343
|
type = "rest";
|
|
341
344
|
supportsReplay = true;
|
|
345
|
+
restFetch;
|
|
342
346
|
constructor(baseUrl, token, fetchFn) {
|
|
343
347
|
this.baseUrl = baseUrl;
|
|
344
348
|
this.token = token;
|
|
345
349
|
this._fetch = fetchFn;
|
|
350
|
+
this.restFetch = fetchFn;
|
|
346
351
|
}
|
|
347
352
|
get connected() {
|
|
348
353
|
return !this._disposed;
|
|
@@ -477,6 +482,7 @@ var DEFAULT_SESSION_LIST_PAGE_SIZE = 20;
|
|
|
477
482
|
var DEFAULT_FETCH_TIMEOUT_MS = 3e4;
|
|
478
483
|
var VOICE_TRANSCRIPTION_DEFAULT_TIMEOUT_MS = 65e3;
|
|
479
484
|
var GITHUB_SETUP_DEFAULT_TIMEOUT_MS = 9e4;
|
|
485
|
+
var MAX_TIMER_DELAY_MS = 2147483647;
|
|
480
486
|
var DEFAULT_MAX_PENDING_PROMPTS_PER_SESSION = 5;
|
|
481
487
|
var MCP_RESTART_DEFAULT_TIMEOUT_MS = MCP_RESTART_SERVER_DEADLINE_MS + MCP_RESTART_CLIENT_HEADROOM_MS;
|
|
482
488
|
var CLIENT_ID_HEADER = "X-Qwen-Client-Id";
|
|
@@ -567,7 +573,7 @@ var DaemonClient = class {
|
|
|
567
573
|
constructor(opts) {
|
|
568
574
|
this.baseUrl = stripTrailingSlashes(opts.baseUrl);
|
|
569
575
|
this.token = opts.token ?? readTokenFromEnv();
|
|
570
|
-
this._fetch = opts.fetch ?? globalThis.fetch.bind(globalThis);
|
|
576
|
+
this._fetch = opts.fetch ?? opts.transport?.restFetch ?? globalThis.fetch.bind(globalThis);
|
|
571
577
|
const raw = opts.fetchTimeoutMs ?? DEFAULT_FETCH_TIMEOUT_MS;
|
|
572
578
|
this.fetchTimeoutMs = Number.isFinite(raw) && raw > 0 ? raw : 0;
|
|
573
579
|
this.promptLimit = normalizePendingPromptLimit(
|
|
@@ -677,7 +683,8 @@ var DaemonClient = class {
|
|
|
677
683
|
hasBody ? { "Content-Type": "application/json" } : {},
|
|
678
684
|
opts.clientId
|
|
679
685
|
),
|
|
680
|
-
...hasBody ? { body: JSON.stringify(opts.body) } : {}
|
|
686
|
+
...hasBody ? { body: JSON.stringify(opts.body) } : {},
|
|
687
|
+
...opts.signal ? { signal: opts.signal } : {}
|
|
681
688
|
},
|
|
682
689
|
async (res) => {
|
|
683
690
|
if (!res.ok) throw await this.failOnError(res, label);
|
|
@@ -696,6 +703,33 @@ var DaemonClient = class {
|
|
|
696
703
|
);
|
|
697
704
|
}
|
|
698
705
|
/** @internal */
|
|
706
|
+
async sessionExportRequest(path, label, opts = {}) {
|
|
707
|
+
const format = opts.format ?? "html";
|
|
708
|
+
const query = opts.format ? `?format=${urlEncode(opts.format)}` : "";
|
|
709
|
+
return await this.fetchWithTimeout(
|
|
710
|
+
`${this.baseUrl}${path}${query}`,
|
|
711
|
+
{ headers: this.headers({}, opts.clientId) },
|
|
712
|
+
async (res) => {
|
|
713
|
+
if (!res.ok) {
|
|
714
|
+
throw await this.failOnError(res, label);
|
|
715
|
+
}
|
|
716
|
+
const content = await res.text();
|
|
717
|
+
const mimeType = res.headers.get("content-type") ?? "";
|
|
718
|
+
const filename = /filename="([^"]+)"/i.exec(
|
|
719
|
+
res.headers.get("content-disposition") ?? ""
|
|
720
|
+
)?.[1] ?? `export.${format}`;
|
|
721
|
+
return {
|
|
722
|
+
content,
|
|
723
|
+
filename,
|
|
724
|
+
mimeType,
|
|
725
|
+
format
|
|
726
|
+
};
|
|
727
|
+
},
|
|
728
|
+
void 0,
|
|
729
|
+
"rest"
|
|
730
|
+
);
|
|
731
|
+
}
|
|
732
|
+
/** @internal */
|
|
699
733
|
async workspaceNoContentRequest(workspaceSelector, path, label, opts = {}) {
|
|
700
734
|
return await this.fetchWithTimeout(
|
|
701
735
|
`${this.baseUrl}/workspaces/${workspaceSelector}${path}`,
|
|
@@ -790,6 +824,13 @@ var DaemonClient = class {
|
|
|
790
824
|
}
|
|
791
825
|
);
|
|
792
826
|
}
|
|
827
|
+
async workspaceGit() {
|
|
828
|
+
return await this.jsonRequest(
|
|
829
|
+
"/workspace/git",
|
|
830
|
+
"GET /workspace/git",
|
|
831
|
+
{ mode: "rest" }
|
|
832
|
+
);
|
|
833
|
+
}
|
|
793
834
|
async workspaceMcpTools(serverName) {
|
|
794
835
|
return await this.fetchWithTimeout(
|
|
795
836
|
`${this.baseUrl}/workspace/mcp/${urlEncode(serverName)}/tools`,
|
|
@@ -892,64 +933,216 @@ var DaemonClient = class {
|
|
|
892
933
|
async workspaceExtensions() {
|
|
893
934
|
return await this.jsonRequest(
|
|
894
935
|
"/workspace/extensions",
|
|
895
|
-
"GET /workspace/extensions"
|
|
936
|
+
"GET /workspace/extensions",
|
|
937
|
+
{ mode: "rest" }
|
|
896
938
|
);
|
|
897
939
|
}
|
|
898
940
|
async installExtension(params, clientId) {
|
|
899
941
|
return await this.jsonRequest(
|
|
900
942
|
"/workspace/extensions/install",
|
|
901
943
|
"POST /workspace/extensions/install",
|
|
902
|
-
{ method: "POST", body: params, clientId }
|
|
944
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
903
945
|
);
|
|
904
946
|
}
|
|
905
947
|
async extensionOperationStatus(operationId) {
|
|
906
948
|
return await this.jsonRequest(
|
|
907
949
|
`/workspace/extensions/operations/${urlEncode(operationId)}`,
|
|
908
|
-
"GET /workspace/extensions/operations/:operationId"
|
|
950
|
+
"GET /workspace/extensions/operations/:operationId",
|
|
951
|
+
{ mode: "rest" }
|
|
909
952
|
);
|
|
910
953
|
}
|
|
911
954
|
async checkExtensionUpdates(clientId) {
|
|
912
955
|
return await this.jsonRequest(
|
|
913
956
|
"/workspace/extensions/check-updates",
|
|
914
957
|
"POST /workspace/extensions/check-updates",
|
|
915
|
-
{ method: "POST", body: {}, clientId }
|
|
958
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
916
959
|
);
|
|
917
960
|
}
|
|
918
961
|
async refreshExtensions(clientId) {
|
|
919
962
|
return await this.jsonRequest(
|
|
920
963
|
"/workspace/extensions/refresh",
|
|
921
964
|
"POST /workspace/extensions/refresh",
|
|
922
|
-
{ method: "POST", body: {}, clientId }
|
|
965
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
923
966
|
);
|
|
924
967
|
}
|
|
925
968
|
async enableExtension(name, params, clientId) {
|
|
926
969
|
return await this.jsonRequest(
|
|
927
970
|
`/workspace/extensions/${urlEncode(name)}/enable`,
|
|
928
971
|
"POST /workspace/extensions/:name/enable",
|
|
929
|
-
{ method: "POST", body: params, clientId }
|
|
972
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
930
973
|
);
|
|
931
974
|
}
|
|
932
975
|
async disableExtension(name, params, clientId) {
|
|
933
976
|
return await this.jsonRequest(
|
|
934
977
|
`/workspace/extensions/${urlEncode(name)}/disable`,
|
|
935
978
|
"POST /workspace/extensions/:name/disable",
|
|
936
|
-
{ method: "POST", body: params, clientId }
|
|
979
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
937
980
|
);
|
|
938
981
|
}
|
|
939
982
|
async updateExtension(name, clientId) {
|
|
940
983
|
return await this.jsonRequest(
|
|
941
984
|
`/workspace/extensions/${urlEncode(name)}/update`,
|
|
942
985
|
"POST /workspace/extensions/:name/update",
|
|
943
|
-
{ method: "POST", body: {}, clientId }
|
|
986
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
944
987
|
);
|
|
945
988
|
}
|
|
946
989
|
async uninstallExtension(name, clientId) {
|
|
947
990
|
return await this.jsonRequest(
|
|
948
991
|
`/workspace/extensions/${urlEncode(name)}`,
|
|
949
992
|
"DELETE /workspace/extensions/:name",
|
|
950
|
-
{ method: "DELETE", clientId }
|
|
993
|
+
{ method: "DELETE", clientId, mode: "rest" }
|
|
994
|
+
);
|
|
995
|
+
}
|
|
996
|
+
async extensionCatalog() {
|
|
997
|
+
return await this.jsonRequest(
|
|
998
|
+
"/extensions",
|
|
999
|
+
"GET /extensions",
|
|
1000
|
+
{ mode: "rest" }
|
|
1001
|
+
);
|
|
1002
|
+
}
|
|
1003
|
+
async installUserExtension(params, clientId) {
|
|
1004
|
+
return await this.jsonRequest(
|
|
1005
|
+
"/extensions/install",
|
|
1006
|
+
"POST /extensions/install",
|
|
1007
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
1008
|
+
);
|
|
1009
|
+
}
|
|
1010
|
+
async checkUserExtensionUpdates(clientId) {
|
|
1011
|
+
return await this.jsonRequest(
|
|
1012
|
+
"/extensions/check-updates",
|
|
1013
|
+
"POST /extensions/check-updates",
|
|
1014
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
1015
|
+
);
|
|
1016
|
+
}
|
|
1017
|
+
async updateUserExtension(extensionId, clientId) {
|
|
1018
|
+
return await this.jsonRequest(
|
|
1019
|
+
`/extensions/${urlEncode(extensionId)}/update`,
|
|
1020
|
+
"POST /extensions/:extensionId/update",
|
|
1021
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
async uninstallUserExtension(extensionId, clientId) {
|
|
1025
|
+
return await this.fetchWithTimeout(
|
|
1026
|
+
`${this.baseUrl}/extensions/${urlEncode(extensionId)}`,
|
|
1027
|
+
{
|
|
1028
|
+
method: "DELETE",
|
|
1029
|
+
headers: this.headers({}, clientId)
|
|
1030
|
+
},
|
|
1031
|
+
async (res) => {
|
|
1032
|
+
if (res.status === 204) {
|
|
1033
|
+
await res.body?.cancel().catch(() => void 0);
|
|
1034
|
+
return void 0;
|
|
1035
|
+
}
|
|
1036
|
+
if (!res.ok) {
|
|
1037
|
+
throw await this.failOnError(res, "DELETE /extensions/:extensionId");
|
|
1038
|
+
}
|
|
1039
|
+
return await res.json();
|
|
1040
|
+
},
|
|
1041
|
+
void 0,
|
|
1042
|
+
"rest"
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
async setExtensionDefaultActivation(extensionId, state, clientId) {
|
|
1046
|
+
return await this.jsonRequest(
|
|
1047
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
1048
|
+
"PUT /extensions/:extensionId/activation",
|
|
1049
|
+
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
951
1050
|
);
|
|
952
1051
|
}
|
|
1052
|
+
async extensionOperation(operationId, signal) {
|
|
1053
|
+
return await this.jsonRequest(
|
|
1054
|
+
`/extensions/operations/${urlEncode(operationId)}`,
|
|
1055
|
+
"GET /extensions/operations/:operationId",
|
|
1056
|
+
signal ? { signal, mode: "rest" } : { mode: "rest" }
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
async waitForExtensionOperation(handle, options = {}) {
|
|
1060
|
+
const pollIntervalMs = options.pollIntervalMs ?? 1e3;
|
|
1061
|
+
const timeoutMs = options.timeoutMs ?? 10 * 6e4;
|
|
1062
|
+
const hasDeadline = timeoutMs !== Number.POSITIVE_INFINITY;
|
|
1063
|
+
const deadline = Date.now() + timeoutMs;
|
|
1064
|
+
const timeoutError = /* @__PURE__ */ __name(() => new Error(
|
|
1065
|
+
`Timed out waiting for extension operation ${handle.operationId}. The server operation was not cancelled.`
|
|
1066
|
+
), "timeoutError");
|
|
1067
|
+
for (; ; ) {
|
|
1068
|
+
options.signal?.throwIfAborted();
|
|
1069
|
+
const pollBudgetMs = deadline - Date.now();
|
|
1070
|
+
if (pollBudgetMs <= 0 || Number.isNaN(pollBudgetMs)) {
|
|
1071
|
+
throw timeoutError();
|
|
1072
|
+
}
|
|
1073
|
+
let operation;
|
|
1074
|
+
if (!hasDeadline) {
|
|
1075
|
+
operation = await this.extensionOperation(
|
|
1076
|
+
handle.operationId,
|
|
1077
|
+
options.signal
|
|
1078
|
+
);
|
|
1079
|
+
} else {
|
|
1080
|
+
const deadlineController = new AbortController();
|
|
1081
|
+
const pollSignal = options.signal ? composeAbortSignals2([options.signal, deadlineController.signal]) : deadlineController.signal;
|
|
1082
|
+
let deadlineTimer;
|
|
1083
|
+
const deadlinePromise = new Promise((_, reject) => {
|
|
1084
|
+
const expire = /* @__PURE__ */ __name(() => {
|
|
1085
|
+
const error = timeoutError();
|
|
1086
|
+
reject(error);
|
|
1087
|
+
deadlineController.abort(error);
|
|
1088
|
+
}, "expire");
|
|
1089
|
+
const schedule = /* @__PURE__ */ __name(() => {
|
|
1090
|
+
const remainingMs2 = deadline - Date.now();
|
|
1091
|
+
if (remainingMs2 <= 0) {
|
|
1092
|
+
expire();
|
|
1093
|
+
return;
|
|
1094
|
+
}
|
|
1095
|
+
deadlineTimer = setTimeout(
|
|
1096
|
+
() => {
|
|
1097
|
+
if (Date.now() >= deadline) {
|
|
1098
|
+
expire();
|
|
1099
|
+
} else {
|
|
1100
|
+
schedule();
|
|
1101
|
+
}
|
|
1102
|
+
},
|
|
1103
|
+
Math.min(remainingMs2, MAX_TIMER_DELAY_MS)
|
|
1104
|
+
);
|
|
1105
|
+
}, "schedule");
|
|
1106
|
+
schedule();
|
|
1107
|
+
});
|
|
1108
|
+
try {
|
|
1109
|
+
operation = await Promise.race([
|
|
1110
|
+
this.extensionOperation(handle.operationId, pollSignal),
|
|
1111
|
+
deadlinePromise
|
|
1112
|
+
]);
|
|
1113
|
+
} finally {
|
|
1114
|
+
if (deadlineTimer !== void 0) clearTimeout(deadlineTimer);
|
|
1115
|
+
deadlineController.abort();
|
|
1116
|
+
}
|
|
1117
|
+
}
|
|
1118
|
+
if (operation.status !== "queued" && operation.status !== "running") {
|
|
1119
|
+
return operation;
|
|
1120
|
+
}
|
|
1121
|
+
const remainingMs = deadline - Date.now();
|
|
1122
|
+
if (remainingMs <= 0) {
|
|
1123
|
+
throw timeoutError();
|
|
1124
|
+
}
|
|
1125
|
+
await new Promise((resolve, reject) => {
|
|
1126
|
+
const finish = /* @__PURE__ */ __name(() => {
|
|
1127
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
1128
|
+
resolve();
|
|
1129
|
+
}, "finish");
|
|
1130
|
+
const timer = setTimeout(
|
|
1131
|
+
finish,
|
|
1132
|
+
Math.min(pollIntervalMs, remainingMs, MAX_TIMER_DELAY_MS)
|
|
1133
|
+
);
|
|
1134
|
+
const onAbort = /* @__PURE__ */ __name(() => {
|
|
1135
|
+
clearTimeout(timer);
|
|
1136
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
1137
|
+
reject(
|
|
1138
|
+
options.signal?.reason ?? new DOMException("Aborted", "AbortError")
|
|
1139
|
+
);
|
|
1140
|
+
}, "onAbort");
|
|
1141
|
+
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1142
|
+
if (options.signal?.aborted) onAbort();
|
|
1143
|
+
});
|
|
1144
|
+
}
|
|
1145
|
+
}
|
|
953
1146
|
// -- Workspace files (workspace files) -------------------------------
|
|
954
1147
|
async readWorkspaceFile(filePath, opts = {}, clientId) {
|
|
955
1148
|
const url = new URL(`${this.baseUrl}/file`);
|
|
@@ -1359,8 +1552,8 @@ var DaemonClient = class {
|
|
|
1359
1552
|
);
|
|
1360
1553
|
}
|
|
1361
1554
|
/**
|
|
1362
|
-
* Enumerate
|
|
1363
|
-
*
|
|
1555
|
+
* Enumerate the session catalog for a workspace. Used by session-picker UIs.
|
|
1556
|
+
* Returns an empty list (not 404) when the workspace has no sessions.
|
|
1364
1557
|
*/
|
|
1365
1558
|
async listWorkspaceSessions(workspaceCwd, options) {
|
|
1366
1559
|
const page = await this.listWorkspaceSessionsPage(workspaceCwd, options);
|
|
@@ -1438,29 +1631,10 @@ var DaemonClient = class {
|
|
|
1438
1631
|
return this.restoreSession("load", sessionId, req, clientId);
|
|
1439
1632
|
}
|
|
1440
1633
|
async exportSession(sessionId, opts = {}) {
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
{ headers: this.headers({}, opts.clientId) },
|
|
1446
|
-
async (res) => {
|
|
1447
|
-
if (!res.ok) {
|
|
1448
|
-
throw await this.failOnError(res, "GET /session/:id/export");
|
|
1449
|
-
}
|
|
1450
|
-
const content = await res.text();
|
|
1451
|
-
const mimeType = res.headers.get("content-type") ?? "";
|
|
1452
|
-
const filename = /filename="([^"]+)"/i.exec(
|
|
1453
|
-
res.headers.get("content-disposition") ?? ""
|
|
1454
|
-
)?.[1] ?? `export.${format}`;
|
|
1455
|
-
return {
|
|
1456
|
-
content,
|
|
1457
|
-
filename,
|
|
1458
|
-
mimeType,
|
|
1459
|
-
format
|
|
1460
|
-
};
|
|
1461
|
-
},
|
|
1462
|
-
void 0,
|
|
1463
|
-
"rest"
|
|
1634
|
+
return await this.sessionExportRequest(
|
|
1635
|
+
`/session/${urlEncode(sessionId)}/export`,
|
|
1636
|
+
"GET /session/:id/export",
|
|
1637
|
+
opts
|
|
1464
1638
|
);
|
|
1465
1639
|
}
|
|
1466
1640
|
async getSessionTranscriptPage(sessionId, opts = {}) {
|
|
@@ -1715,7 +1889,9 @@ var DaemonClient = class {
|
|
|
1715
1889
|
);
|
|
1716
1890
|
}
|
|
1717
1891
|
return await res.json();
|
|
1718
|
-
}
|
|
1892
|
+
},
|
|
1893
|
+
void 0,
|
|
1894
|
+
"rest"
|
|
1719
1895
|
);
|
|
1720
1896
|
}
|
|
1721
1897
|
async rewindSession(sessionId, promptId, opts) {
|
|
@@ -1737,7 +1913,9 @@ var DaemonClient = class {
|
|
|
1737
1913
|
throw await this.failOnError(res, "POST /session/:id/rewind");
|
|
1738
1914
|
}
|
|
1739
1915
|
return await res.json();
|
|
1740
|
-
}
|
|
1916
|
+
},
|
|
1917
|
+
void 0,
|
|
1918
|
+
"rest"
|
|
1741
1919
|
);
|
|
1742
1920
|
}
|
|
1743
1921
|
/**
|
|
@@ -1932,6 +2110,35 @@ var DaemonClient = class {
|
|
|
1932
2110
|
}
|
|
1933
2111
|
);
|
|
1934
2112
|
}
|
|
2113
|
+
/**
|
|
2114
|
+
* Toggle a user-invocable skill in workspace `skills.disabled` settings.
|
|
2115
|
+
* Active ACP sessions refresh their skill validation and command lists before
|
|
2116
|
+
* the response returns; `activation` reports deferred or partial refreshes.
|
|
2117
|
+
*
|
|
2118
|
+
* Pre-flight `caps.features.includes('workspace_skill_toggle')` before calling.
|
|
2119
|
+
*/
|
|
2120
|
+
async setWorkspaceSkillEnabled(skillName, enabled, opts) {
|
|
2121
|
+
return await this.fetchWithTimeout(
|
|
2122
|
+
`${this.baseUrl}/workspace/skills/${urlEncode(skillName)}/enable`,
|
|
2123
|
+
{
|
|
2124
|
+
method: "POST",
|
|
2125
|
+
headers: this.headers(
|
|
2126
|
+
{ "Content-Type": "application/json" },
|
|
2127
|
+
opts?.clientId
|
|
2128
|
+
),
|
|
2129
|
+
body: JSON.stringify({ enabled })
|
|
2130
|
+
},
|
|
2131
|
+
async (res) => {
|
|
2132
|
+
if (!res.ok) {
|
|
2133
|
+
throw await this.failOnError(
|
|
2134
|
+
res,
|
|
2135
|
+
"POST /workspace/skills/:name/enable"
|
|
2136
|
+
);
|
|
2137
|
+
}
|
|
2138
|
+
return await res.json();
|
|
2139
|
+
}
|
|
2140
|
+
);
|
|
2141
|
+
}
|
|
1935
2142
|
async workspaceSettings(opts) {
|
|
1936
2143
|
return await this.fetchWithTimeout(
|
|
1937
2144
|
`${this.baseUrl}/workspace/settings`,
|
|
@@ -1966,6 +2173,25 @@ var DaemonClient = class {
|
|
|
1966
2173
|
}
|
|
1967
2174
|
);
|
|
1968
2175
|
}
|
|
2176
|
+
async deleteModel(target, opts) {
|
|
2177
|
+
return await this.fetchWithTimeout(
|
|
2178
|
+
`${this.baseUrl}/workspace/models`,
|
|
2179
|
+
{
|
|
2180
|
+
method: "DELETE",
|
|
2181
|
+
headers: this.headers(
|
|
2182
|
+
{ "Content-Type": "application/json" },
|
|
2183
|
+
opts?.clientId
|
|
2184
|
+
),
|
|
2185
|
+
body: JSON.stringify(target)
|
|
2186
|
+
},
|
|
2187
|
+
async (res) => {
|
|
2188
|
+
if (!res.ok) {
|
|
2189
|
+
throw await this.failOnError(res, "DELETE /workspace/models");
|
|
2190
|
+
}
|
|
2191
|
+
return await res.json();
|
|
2192
|
+
}
|
|
2193
|
+
);
|
|
2194
|
+
}
|
|
1969
2195
|
async workspaceVoice(clientId) {
|
|
1970
2196
|
return await this.jsonRequest(
|
|
1971
2197
|
"/workspace/voice",
|
|
@@ -1981,9 +2207,26 @@ var DaemonClient = class {
|
|
|
1981
2207
|
);
|
|
1982
2208
|
}
|
|
1983
2209
|
async transcribeWorkspaceVoice(audio, opts) {
|
|
2210
|
+
return await this.voiceTranscriptionRequest(
|
|
2211
|
+
"/workspace/voice/transcribe",
|
|
2212
|
+
"POST /workspace/voice/transcribe",
|
|
2213
|
+
audio,
|
|
2214
|
+
opts
|
|
2215
|
+
);
|
|
2216
|
+
}
|
|
2217
|
+
/** @internal */
|
|
2218
|
+
async workspaceVoiceTranscriptionRequest(workspaceSelector, audio, opts) {
|
|
2219
|
+
return await this.voiceTranscriptionRequest(
|
|
2220
|
+
`/workspaces/${workspaceSelector}/voice/transcribe`,
|
|
2221
|
+
"POST /workspaces/:workspace/voice/transcribe",
|
|
2222
|
+
audio,
|
|
2223
|
+
opts
|
|
2224
|
+
);
|
|
2225
|
+
}
|
|
2226
|
+
async voiceTranscriptionRequest(path, label, audio, opts) {
|
|
1984
2227
|
const query = opts.voiceModel ? `?${new URLSearchParams({ voiceModel: opts.voiceModel }).toString()}` : "";
|
|
1985
2228
|
return await this.fetchWithTimeout(
|
|
1986
|
-
`${this.baseUrl}
|
|
2229
|
+
`${this.baseUrl}${path}${query}`,
|
|
1987
2230
|
{
|
|
1988
2231
|
method: "POST",
|
|
1989
2232
|
headers: this.headers({ "Content-Type": opts.mimeType }, opts.clientId),
|
|
@@ -1991,11 +2234,11 @@ var DaemonClient = class {
|
|
|
1991
2234
|
},
|
|
1992
2235
|
async (res) => {
|
|
1993
2236
|
if (!res.ok) {
|
|
1994
|
-
throw await this.failOnError(res,
|
|
2237
|
+
throw await this.failOnError(res, label);
|
|
1995
2238
|
}
|
|
1996
2239
|
return await res.json();
|
|
1997
2240
|
},
|
|
1998
|
-
VOICE_TRANSCRIPTION_DEFAULT_TIMEOUT_MS,
|
|
2241
|
+
opts.timeoutMs ?? VOICE_TRANSCRIPTION_DEFAULT_TIMEOUT_MS,
|
|
1999
2242
|
"rest"
|
|
2000
2243
|
);
|
|
2001
2244
|
}
|
|
@@ -2155,8 +2398,8 @@ var DaemonClient = class {
|
|
|
2155
2398
|
/**
|
|
2156
2399
|
* Reload the daemon-managed channel worker: the daemon stops and relaunches
|
|
2157
2400
|
* it so it re-reads settings.json (channels / proxy / per-channel model).
|
|
2158
|
-
* Requires
|
|
2159
|
-
*
|
|
2401
|
+
* Requires an enabled runtime selection; otherwise the route responds 409.
|
|
2402
|
+
* Pre-flight the dynamic `channel_reload` capability.
|
|
2160
2403
|
*/
|
|
2161
2404
|
async reloadChannelWorker(opts) {
|
|
2162
2405
|
return await this.fetchWithTimeout(
|
|
@@ -2175,9 +2418,61 @@ var DaemonClient = class {
|
|
|
2175
2418
|
}
|
|
2176
2419
|
return await res.json();
|
|
2177
2420
|
},
|
|
2421
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2422
|
+
);
|
|
2423
|
+
}
|
|
2424
|
+
async getChannelWorkerControl(opts) {
|
|
2425
|
+
return await this.fetchWithTimeout(
|
|
2426
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2427
|
+
{
|
|
2428
|
+
method: "GET",
|
|
2429
|
+
headers: this.headers({}, opts?.clientId)
|
|
2430
|
+
},
|
|
2431
|
+
async (res) => {
|
|
2432
|
+
if (!res.ok) {
|
|
2433
|
+
throw await this.failOnError(res, "GET /workspace/channel");
|
|
2434
|
+
}
|
|
2435
|
+
return await res.json();
|
|
2436
|
+
},
|
|
2178
2437
|
opts?.timeoutMs
|
|
2179
2438
|
);
|
|
2180
2439
|
}
|
|
2440
|
+
async setChannelWorkerSelection(selection, opts) {
|
|
2441
|
+
return await this.fetchWithTimeout(
|
|
2442
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2443
|
+
{
|
|
2444
|
+
method: "PUT",
|
|
2445
|
+
headers: this.headers(
|
|
2446
|
+
{ "Content-Type": "application/json" },
|
|
2447
|
+
opts?.clientId
|
|
2448
|
+
),
|
|
2449
|
+
body: JSON.stringify({ selection })
|
|
2450
|
+
},
|
|
2451
|
+
async (res) => {
|
|
2452
|
+
if (!res.ok) {
|
|
2453
|
+
throw await this.failOnError(res, "PUT /workspace/channel");
|
|
2454
|
+
}
|
|
2455
|
+
return await res.json();
|
|
2456
|
+
},
|
|
2457
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2458
|
+
);
|
|
2459
|
+
}
|
|
2460
|
+
async stopChannelWorker(opts) {
|
|
2461
|
+
return await this.fetchWithTimeout(
|
|
2462
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2463
|
+
{
|
|
2464
|
+
method: "DELETE",
|
|
2465
|
+
headers: this.headers({}, opts?.clientId)
|
|
2466
|
+
},
|
|
2467
|
+
async (res) => {
|
|
2468
|
+
if (!res.ok) {
|
|
2469
|
+
throw await this.failOnError(res, "DELETE /workspace/channel");
|
|
2470
|
+
}
|
|
2471
|
+
return await res.json();
|
|
2472
|
+
},
|
|
2473
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2474
|
+
);
|
|
2475
|
+
}
|
|
2181
2476
|
async manageMcpServer(serverName, action, opts) {
|
|
2182
2477
|
return await this.fetchWithTimeout(
|
|
2183
2478
|
`${this.baseUrl}/workspace/mcp/${urlEncode(serverName)}/${urlEncode(action)}`,
|
|
@@ -2784,13 +3079,16 @@ var DaemonClient = class {
|
|
|
2784
3079
|
}
|
|
2785
3080
|
);
|
|
2786
3081
|
}
|
|
2787
|
-
async addWorkspace(cwd) {
|
|
3082
|
+
async addWorkspace(cwd, options = {}) {
|
|
2788
3083
|
return await this.fetchWithTimeout(
|
|
2789
3084
|
`${this.baseUrl}/workspaces`,
|
|
2790
3085
|
{
|
|
2791
3086
|
method: "POST",
|
|
2792
3087
|
headers: this.headers({ "Content-Type": "application/json" }),
|
|
2793
|
-
body: JSON.stringify({
|
|
3088
|
+
body: JSON.stringify({
|
|
3089
|
+
cwd,
|
|
3090
|
+
...options.persist ? { persist: true } : {}
|
|
3091
|
+
})
|
|
2794
3092
|
},
|
|
2795
3093
|
async (res) => {
|
|
2796
3094
|
if (!res.ok) {
|
|
@@ -2872,6 +3170,37 @@ var WorkspaceDaemonClient = class {
|
|
|
2872
3170
|
workspaceMcp() {
|
|
2873
3171
|
return this.get("/mcp", "GET /workspaces/:workspace/mcp");
|
|
2874
3172
|
}
|
|
3173
|
+
workspaceVoice(clientId) {
|
|
3174
|
+
return this.client.workspaceJsonRequest(
|
|
3175
|
+
this.workspaceSelector,
|
|
3176
|
+
"/voice",
|
|
3177
|
+
"GET /workspaces/:workspace/voice",
|
|
3178
|
+
{ clientId, mode: "rest" }
|
|
3179
|
+
);
|
|
3180
|
+
}
|
|
3181
|
+
setWorkspaceVoice(update, clientId) {
|
|
3182
|
+
return this.client.workspaceJsonRequest(
|
|
3183
|
+
this.workspaceSelector,
|
|
3184
|
+
"/voice",
|
|
3185
|
+
"POST /workspaces/:workspace/voice",
|
|
3186
|
+
{ method: "POST", body: update, clientId, mode: "rest" }
|
|
3187
|
+
);
|
|
3188
|
+
}
|
|
3189
|
+
transcribeWorkspaceVoice(audio, opts) {
|
|
3190
|
+
return this.client.workspaceVoiceTranscriptionRequest(
|
|
3191
|
+
this.workspaceSelector,
|
|
3192
|
+
audio,
|
|
3193
|
+
opts
|
|
3194
|
+
);
|
|
3195
|
+
}
|
|
3196
|
+
workspaceGit() {
|
|
3197
|
+
return this.client.workspaceJsonRequest(
|
|
3198
|
+
this.workspaceSelector,
|
|
3199
|
+
"/git",
|
|
3200
|
+
"GET /workspaces/:workspace/git",
|
|
3201
|
+
{ mode: "rest" }
|
|
3202
|
+
);
|
|
3203
|
+
}
|
|
2875
3204
|
workspaceSkills() {
|
|
2876
3205
|
return this.get("/skills", "GET /workspaces/:workspace/skills");
|
|
2877
3206
|
}
|
|
@@ -2893,6 +3222,22 @@ var WorkspaceDaemonClient = class {
|
|
|
2893
3222
|
workspaceMemory() {
|
|
2894
3223
|
return this.get("/memory", "GET /workspaces/:workspace/memory");
|
|
2895
3224
|
}
|
|
3225
|
+
remove(options) {
|
|
3226
|
+
const body = options?.force === void 0 ? void 0 : {
|
|
3227
|
+
force: options.force
|
|
3228
|
+
};
|
|
3229
|
+
return this.client.workspaceJsonRequest(
|
|
3230
|
+
this.workspaceSelector,
|
|
3231
|
+
"",
|
|
3232
|
+
"DELETE /workspaces/:workspace",
|
|
3233
|
+
{
|
|
3234
|
+
method: "DELETE",
|
|
3235
|
+
...body ? { body } : {},
|
|
3236
|
+
...options?.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {},
|
|
3237
|
+
mode: "rest"
|
|
3238
|
+
}
|
|
3239
|
+
);
|
|
3240
|
+
}
|
|
2896
3241
|
writeWorkspaceMemory(req, clientId) {
|
|
2897
3242
|
return this.post(
|
|
2898
3243
|
"/memory",
|
|
@@ -2970,6 +3315,32 @@ var WorkspaceDaemonClient = class {
|
|
|
2970
3315
|
const page = await this.listWorkspaceSessionsPage(options);
|
|
2971
3316
|
return page.sessions;
|
|
2972
3317
|
}
|
|
3318
|
+
/**
|
|
3319
|
+
* Read one page from an active persisted session transcript in this
|
|
3320
|
+
* workspace.
|
|
3321
|
+
* The daemon performs replay locally without attaching to the session or
|
|
3322
|
+
* starting ACP. This method always uses native REST transport.
|
|
3323
|
+
*/
|
|
3324
|
+
getSessionTranscriptPage(sessionId, opts = {}) {
|
|
3325
|
+
const query = new URLSearchParams();
|
|
3326
|
+
if (opts.cursor !== void 0) query.set("cursor", opts.cursor);
|
|
3327
|
+
if (opts.limit !== void 0) query.set("limit", String(opts.limit));
|
|
3328
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3329
|
+
return this.client.workspaceJsonRequest(
|
|
3330
|
+
this.workspaceSelector,
|
|
3331
|
+
`/session/${urlEncode(sessionId)}/transcript${suffix}`,
|
|
3332
|
+
"GET /workspaces/:workspace/session/:id/transcript",
|
|
3333
|
+
{ clientId: opts.clientId, mode: "rest" }
|
|
3334
|
+
);
|
|
3335
|
+
}
|
|
3336
|
+
/** Export an active persisted session from this registered workspace. */
|
|
3337
|
+
exportSession(sessionId, opts = {}) {
|
|
3338
|
+
return this.client.sessionExportRequest(
|
|
3339
|
+
`/workspaces/${this.workspaceSelector}/session/${urlEncode(sessionId)}/export`,
|
|
3340
|
+
"GET /workspaces/:workspace/session/:id/export",
|
|
3341
|
+
opts
|
|
3342
|
+
);
|
|
3343
|
+
}
|
|
2973
3344
|
listSessionGroups() {
|
|
2974
3345
|
return this.get(
|
|
2975
3346
|
"/session-groups",
|
|
@@ -3001,6 +3372,14 @@ var WorkspaceDaemonClient = class {
|
|
|
3001
3372
|
{ method: "DELETE" }
|
|
3002
3373
|
);
|
|
3003
3374
|
}
|
|
3375
|
+
updateSessionOrganization(sessionId, update, clientId) {
|
|
3376
|
+
return this.client.workspaceJsonRequest(
|
|
3377
|
+
this.workspaceSelector,
|
|
3378
|
+
`/session/${urlEncode(sessionId)}/organization`,
|
|
3379
|
+
"PATCH /workspaces/:workspace/session/:id/organization",
|
|
3380
|
+
{ method: "PATCH", body: update, clientId }
|
|
3381
|
+
);
|
|
3382
|
+
}
|
|
3004
3383
|
deleteSessionsData(sessionIds, clientId) {
|
|
3005
3384
|
return this.post(
|
|
3006
3385
|
"/sessions/delete",
|
|
@@ -3138,6 +3517,14 @@ var WorkspaceDaemonClient = class {
|
|
|
3138
3517
|
opts?.clientId
|
|
3139
3518
|
);
|
|
3140
3519
|
}
|
|
3520
|
+
setWorkspaceSkillEnabled(skillName, enabled, opts) {
|
|
3521
|
+
return this.post(
|
|
3522
|
+
`/skills/${urlEncode(skillName)}/enable`,
|
|
3523
|
+
"POST /workspaces/:workspace/skills/:name/enable",
|
|
3524
|
+
{ enabled },
|
|
3525
|
+
opts?.clientId
|
|
3526
|
+
);
|
|
3527
|
+
}
|
|
3141
3528
|
restartMcpServer(serverName, opts) {
|
|
3142
3529
|
const query = opts?.entryIndex === void 0 ? "" : `?entryIndex=${urlEncode(String(opts.entryIndex))}`;
|
|
3143
3530
|
return this.post(
|
|
@@ -3165,6 +3552,38 @@ var WorkspaceDaemonClient = class {
|
|
|
3165
3552
|
opts?.clientId
|
|
3166
3553
|
);
|
|
3167
3554
|
}
|
|
3555
|
+
workspaceExtensions() {
|
|
3556
|
+
return this.client.workspaceJsonRequest(
|
|
3557
|
+
this.workspaceSelector,
|
|
3558
|
+
"/extensions",
|
|
3559
|
+
"GET /workspaces/:workspace/extensions",
|
|
3560
|
+
{ mode: "rest" }
|
|
3561
|
+
);
|
|
3562
|
+
}
|
|
3563
|
+
setExtensionActivation(extensionId, state, clientId) {
|
|
3564
|
+
return this.client.workspaceJsonRequest(
|
|
3565
|
+
this.workspaceSelector,
|
|
3566
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
3567
|
+
"PUT /workspaces/:workspace/extensions/:extensionId/activation",
|
|
3568
|
+
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
3569
|
+
);
|
|
3570
|
+
}
|
|
3571
|
+
clearExtensionActivation(extensionId, clientId) {
|
|
3572
|
+
return this.client.workspaceJsonRequest(
|
|
3573
|
+
this.workspaceSelector,
|
|
3574
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
3575
|
+
"DELETE /workspaces/:workspace/extensions/:extensionId/activation",
|
|
3576
|
+
{ method: "DELETE", clientId, mode: "rest" }
|
|
3577
|
+
);
|
|
3578
|
+
}
|
|
3579
|
+
refreshExtensionRuntime(clientId) {
|
|
3580
|
+
return this.client.workspaceJsonRequest(
|
|
3581
|
+
this.workspaceSelector,
|
|
3582
|
+
"/extensions/refresh",
|
|
3583
|
+
"POST /workspaces/:workspace/extensions/refresh",
|
|
3584
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
3585
|
+
);
|
|
3586
|
+
}
|
|
3168
3587
|
get(path, label, clientId) {
|
|
3169
3588
|
return this.client.workspaceJsonRequest(
|
|
3170
3589
|
this.workspaceSelector,
|
|
@@ -3775,6 +4194,7 @@ var DAEMON_KNOWN_EVENT_TYPE_VALUES = [
|
|
|
3775
4194
|
"session_died",
|
|
3776
4195
|
"session_closed",
|
|
3777
4196
|
"session_metadata_updated",
|
|
4197
|
+
"session_recording_degraded",
|
|
3778
4198
|
"artifact_changed",
|
|
3779
4199
|
MID_TURN_MESSAGE_INJECTED_EVENT,
|
|
3780
4200
|
PENDING_PROMPT_ADDED_EVENT,
|
|
@@ -3885,7 +4305,8 @@ var DAEMON_KNOWN_EVENT_TYPE_VALUES = [
|
|
|
3885
4305
|
// `replay_complete` when `?snapshot=1` is set on the SSE endpoint.
|
|
3886
4306
|
// Carries `currentModelId` and `currentApprovalMode` so reconnecting
|
|
3887
4307
|
// clients can seed their reducer without an extra round-trip.
|
|
3888
|
-
"session_snapshot"
|
|
4308
|
+
"session_snapshot",
|
|
4309
|
+
"git_branch_changed"
|
|
3889
4310
|
];
|
|
3890
4311
|
var DAEMON_KNOWN_EVENT_TYPES = new Set(
|
|
3891
4312
|
DAEMON_KNOWN_EVENT_TYPE_VALUES
|
|
@@ -3899,6 +4320,7 @@ var RESYNC_PASSTHROUGH_TYPES = /* @__PURE__ */ new Set([
|
|
|
3899
4320
|
"session_closed",
|
|
3900
4321
|
"client_evicted",
|
|
3901
4322
|
"stream_error",
|
|
4323
|
+
"session_recording_degraded",
|
|
3902
4324
|
// A5 (#4511): the snapshot is a full-state authoritative frame, not a
|
|
3903
4325
|
// delta, so it is safe to apply during resync — and it is exactly what
|
|
3904
4326
|
// lets a client that reconnected past the ring recover currentModelId /
|
|
@@ -3913,6 +4335,7 @@ function createDaemonSessionViewState(seed = {}) {
|
|
|
3913
4335
|
sessionId: seed.sessionId,
|
|
3914
4336
|
currentModelId: seed.currentModelId,
|
|
3915
4337
|
displayName: seed.displayName,
|
|
4338
|
+
recordingDegraded: seed.recordingDegraded ?? false,
|
|
3916
4339
|
lastSessionUpdate: seed.lastSessionUpdate,
|
|
3917
4340
|
lastModelSwitchFailure: seed.lastModelSwitchFailure,
|
|
3918
4341
|
terminalEvent: seed.terminalEvent,
|
|
@@ -3998,6 +4421,8 @@ function asKnownDaemonEvent(event) {
|
|
|
3998
4421
|
return isSessionClosedData(event.data) ? event : void 0;
|
|
3999
4422
|
case "session_metadata_updated":
|
|
4000
4423
|
return isSessionMetadataUpdatedData(event.data) ? event : void 0;
|
|
4424
|
+
case "session_recording_degraded":
|
|
4425
|
+
return isSessionRecordingDegradedData(event.data) ? event : void 0;
|
|
4001
4426
|
case "artifact_changed":
|
|
4002
4427
|
return isArtifactChangedData(event.data) ? event : void 0;
|
|
4003
4428
|
case MID_TURN_MESSAGE_INJECTED_EVENT:
|
|
@@ -4380,7 +4805,14 @@ function reduceDaemonSessionEvent(state, rawEvent) {
|
|
|
4380
4805
|
...base,
|
|
4381
4806
|
sessionId: event.data.sessionId,
|
|
4382
4807
|
...event.data.currentModelId != null ? { currentModelId: event.data.currentModelId } : {},
|
|
4383
|
-
...event.data.currentApprovalMode != null ? { approvalMode: event.data.currentApprovalMode } : {}
|
|
4808
|
+
...event.data.currentApprovalMode != null ? { approvalMode: event.data.currentApprovalMode } : {},
|
|
4809
|
+
...event.data.recordingDegraded !== void 0 ? { recordingDegraded: event.data.recordingDegraded } : {}
|
|
4810
|
+
};
|
|
4811
|
+
case "session_recording_degraded":
|
|
4812
|
+
return {
|
|
4813
|
+
...base,
|
|
4814
|
+
sessionId: event.data.sessionId,
|
|
4815
|
+
recordingDegraded: true
|
|
4384
4816
|
};
|
|
4385
4817
|
case "session_branched":
|
|
4386
4818
|
return {
|
|
@@ -4841,9 +5273,14 @@ function isSessionSnapshotData(value) {
|
|
|
4841
5273
|
if (!isRecord(value) || !isNonEmptyString(value["sessionId"])) return false;
|
|
4842
5274
|
const model = value["currentModelId"];
|
|
4843
5275
|
const mode = value["currentApprovalMode"];
|
|
4844
|
-
|
|
5276
|
+
const recordingDegraded = value["recordingDegraded"];
|
|
5277
|
+
return (model === null || typeof model === "string") && (mode === null || typeof mode === "string") && (recordingDegraded === void 0 || typeof recordingDegraded === "boolean");
|
|
4845
5278
|
}
|
|
4846
5279
|
__name(isSessionSnapshotData, "isSessionSnapshotData");
|
|
5280
|
+
function isSessionRecordingDegradedData(value) {
|
|
5281
|
+
return isRecord(value) && isNonEmptyString(value["sessionId"]) && value["reason"] === "write_failed";
|
|
5282
|
+
}
|
|
5283
|
+
__name(isSessionRecordingDegradedData, "isSessionRecordingDegradedData");
|
|
4847
5284
|
function isPermissionOption(value) {
|
|
4848
5285
|
return isRecord(value) && isNonEmptyString(value["optionId"]);
|
|
4849
5286
|
}
|
|
@@ -5171,6 +5608,7 @@ var MCP_RESTART_REFUSED_REASONS2 = /* @__PURE__ */ new Set([
|
|
|
5171
5608
|
]);
|
|
5172
5609
|
var MALFORMED_MEMORY_CHANGED = "malformed memory_changed payload";
|
|
5173
5610
|
var MAX_DETAILS_LENGTH = 4096;
|
|
5611
|
+
var SESSION_RECORDING_DEGRADED_MESSAGE = "Session recording stopped after a write failure. New messages for the affected session will not be saved. Check disk space and permissions, then start a new session to resume recording.";
|
|
5174
5612
|
function normalizeDaemonEvent(event, opts = {}) {
|
|
5175
5613
|
const base = createBase(event, opts);
|
|
5176
5614
|
switch (event.type) {
|
|
@@ -5231,6 +5669,42 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
5231
5669
|
text: `Session closed: ${getString2(event.data, "reason") ?? "closed"}`
|
|
5232
5670
|
}
|
|
5233
5671
|
];
|
|
5672
|
+
case "session_recording_degraded": {
|
|
5673
|
+
const sessionId = getString2(event.data, "sessionId");
|
|
5674
|
+
if (!sessionId || getString2(event.data, "reason") !== "write_failed") {
|
|
5675
|
+
return fallbackDebug(event, base, "malformed recording state");
|
|
5676
|
+
}
|
|
5677
|
+
return [
|
|
5678
|
+
{
|
|
5679
|
+
...base,
|
|
5680
|
+
type: "error",
|
|
5681
|
+
recoverable: true,
|
|
5682
|
+
code: "session_recording_degraded",
|
|
5683
|
+
text: SESSION_RECORDING_DEGRADED_MESSAGE
|
|
5684
|
+
}
|
|
5685
|
+
];
|
|
5686
|
+
}
|
|
5687
|
+
case "session_snapshot": {
|
|
5688
|
+
if (!isRecord2(event.data) || !getString2(event.data, "sessionId")) {
|
|
5689
|
+
return fallbackDebug(event, base, "malformed recording snapshot");
|
|
5690
|
+
}
|
|
5691
|
+
const recordingDegraded = event.data["recordingDegraded"];
|
|
5692
|
+
if (recordingDegraded !== void 0 && typeof recordingDegraded !== "boolean") {
|
|
5693
|
+
return fallbackDebug(event, base, "malformed recording snapshot");
|
|
5694
|
+
}
|
|
5695
|
+
if (recordingDegraded === true) {
|
|
5696
|
+
return [
|
|
5697
|
+
{
|
|
5698
|
+
...base,
|
|
5699
|
+
type: "error",
|
|
5700
|
+
recoverable: true,
|
|
5701
|
+
code: "session_recording_degraded",
|
|
5702
|
+
text: SESSION_RECORDING_DEGRADED_MESSAGE
|
|
5703
|
+
}
|
|
5704
|
+
];
|
|
5705
|
+
}
|
|
5706
|
+
return [];
|
|
5707
|
+
}
|
|
5234
5708
|
case "client_evicted":
|
|
5235
5709
|
return [
|
|
5236
5710
|
{
|
|
@@ -5336,6 +5810,8 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
5336
5810
|
case "approval_mode_changed":
|
|
5337
5811
|
return normalizeApprovalModeChanged(event, base);
|
|
5338
5812
|
// ── Workspace events ──────────────────────────────────────
|
|
5813
|
+
case "git_branch_changed":
|
|
5814
|
+
return [];
|
|
5339
5815
|
case "memory_changed":
|
|
5340
5816
|
return normalizeMemoryChanged(event, base);
|
|
5341
5817
|
case "agent_changed":
|
|
@@ -5362,6 +5838,8 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
5362
5838
|
return normalizeMcpServerRestartRefused(event, base);
|
|
5363
5839
|
case "extensions_changed":
|
|
5364
5840
|
return normalizeExtensionsChanged(event, base);
|
|
5841
|
+
case "artifact_changed":
|
|
5842
|
+
return normalizeArtifactChanged(event, base);
|
|
5365
5843
|
// ── Auth device-flow events (RFC 8628) ─────────────────
|
|
5366
5844
|
case "auth_device_flow_started":
|
|
5367
5845
|
return normalizeAuthDeviceFlowStarted(event, base);
|
|
@@ -5374,16 +5852,20 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
5374
5852
|
case "auth_device_flow_cancelled":
|
|
5375
5853
|
return normalizeAuthDeviceFlowCancelled(event, base);
|
|
5376
5854
|
default:
|
|
5377
|
-
return
|
|
5378
|
-
{
|
|
5379
|
-
...base,
|
|
5380
|
-
type: "debug",
|
|
5381
|
-
text: `${event.type} (unrecognized daemon event): ${stringifyRedactedJson(event.data)}`
|
|
5382
|
-
}
|
|
5383
|
-
];
|
|
5855
|
+
return normalizeUnrecognizedEvent(event, base);
|
|
5384
5856
|
}
|
|
5385
5857
|
}
|
|
5386
5858
|
__name(normalizeDaemonEvent, "normalizeDaemonEvent");
|
|
5859
|
+
function normalizeUnrecognizedEvent(event, base) {
|
|
5860
|
+
return [
|
|
5861
|
+
{
|
|
5862
|
+
...base,
|
|
5863
|
+
type: "debug",
|
|
5864
|
+
text: `${event.type} (unrecognized daemon event): ${stringifyRedactedJson(event.data)}`
|
|
5865
|
+
}
|
|
5866
|
+
];
|
|
5867
|
+
}
|
|
5868
|
+
__name(normalizeUnrecognizedEvent, "normalizeUnrecognizedEvent");
|
|
5387
5869
|
function normalizeStateResyncRequired(event, base) {
|
|
5388
5870
|
const reason = getString2(event.data, "reason");
|
|
5389
5871
|
const lastDeliveredId = numberField(event.data, "lastDeliveredId");
|
|
@@ -5959,6 +6441,27 @@ function normalizeSessionMetadataUpdated(event, base) {
|
|
|
5959
6441
|
];
|
|
5960
6442
|
}
|
|
5961
6443
|
__name(normalizeSessionMetadataUpdated, "normalizeSessionMetadataUpdated");
|
|
6444
|
+
function normalizeArtifactChanged(event, base) {
|
|
6445
|
+
const sessionId = getString2(event.data, "sessionId");
|
|
6446
|
+
const change = isRecord2(event.data) ? event.data["change"] : void 0;
|
|
6447
|
+
if (!sessionId || !isRecord2(change)) {
|
|
6448
|
+
return fallbackDebug(event, base, "malformed artifact_changed payload");
|
|
6449
|
+
}
|
|
6450
|
+
const action = getString2(change, "action");
|
|
6451
|
+
const artifactId = getString2(change, "artifactId");
|
|
6452
|
+
if (!action || !artifactId) {
|
|
6453
|
+
return fallbackDebug(event, base, "missing action or artifactId");
|
|
6454
|
+
}
|
|
6455
|
+
return [
|
|
6456
|
+
{
|
|
6457
|
+
...base,
|
|
6458
|
+
type: "session.artifact.changed",
|
|
6459
|
+
sessionId,
|
|
6460
|
+
change
|
|
6461
|
+
}
|
|
6462
|
+
];
|
|
6463
|
+
}
|
|
6464
|
+
__name(normalizeArtifactChanged, "normalizeArtifactChanged");
|
|
5962
6465
|
function normalizeApprovalModeChanged(event, base) {
|
|
5963
6466
|
const sessionId = getString2(event.data, "sessionId");
|
|
5964
6467
|
const previous = getString2(event.data, "previous");
|
|
@@ -6819,7 +7322,14 @@ var RESYNC_PASSTHROUGH_TYPES2 = /* @__PURE__ */ new Set([
|
|
|
6819
7322
|
function appendLocalUserTranscriptMessage(state, text, opts = {}) {
|
|
6820
7323
|
const next = cloneTranscriptState(state, opts);
|
|
6821
7324
|
finishAssistant(next);
|
|
6822
|
-
const block = createTextBlock(
|
|
7325
|
+
const block = createTextBlock(
|
|
7326
|
+
next,
|
|
7327
|
+
"user",
|
|
7328
|
+
text,
|
|
7329
|
+
void 0,
|
|
7330
|
+
void 0,
|
|
7331
|
+
opts.meta
|
|
7332
|
+
);
|
|
6823
7333
|
if (opts.images && opts.images.length > 0) {
|
|
6824
7334
|
block.images = [...opts.images];
|
|
6825
7335
|
}
|
|
@@ -6958,6 +7468,7 @@ function applyDaemonTranscriptEvent(next, event) {
|
|
|
6958
7468
|
next.approvalMode = event.next;
|
|
6959
7469
|
break;
|
|
6960
7470
|
case "session.metadata.changed":
|
|
7471
|
+
case "session.artifact.changed":
|
|
6961
7472
|
case "session.available_commands":
|
|
6962
7473
|
break;
|
|
6963
7474
|
case "session.state_resync_required":
|
|
@@ -7912,8 +8423,8 @@ function createDaemonTranscriptStore(seed = {}) {
|
|
|
7912
8423
|
state = reduceDaemonTranscriptEvents(state, events);
|
|
7913
8424
|
scheduleNotify();
|
|
7914
8425
|
},
|
|
7915
|
-
appendLocalUserMessage(text, images) {
|
|
7916
|
-
state = appendLocalUserTranscriptMessage(state, text, { images });
|
|
8426
|
+
appendLocalUserMessage(text, images, meta) {
|
|
8427
|
+
state = appendLocalUserTranscriptMessage(state, text, { images, meta });
|
|
7917
8428
|
scheduleNotify();
|
|
7918
8429
|
},
|
|
7919
8430
|
reset(nextSeed = {}) {
|
|
@@ -8058,6 +8569,12 @@ function daemonUiEventToTerminalText(event) {
|
|
|
8058
8569
|
`metadata: ${event.displayName ?? "(no display name)"}`,
|
|
8059
8570
|
"36"
|
|
8060
8571
|
);
|
|
8572
|
+
case "session.artifact.changed":
|
|
8573
|
+
return terminalLine(
|
|
8574
|
+
"artifact",
|
|
8575
|
+
`${event.change.action} ${event.change.artifact?.title ?? event.change.artifactId}`,
|
|
8576
|
+
"36"
|
|
8577
|
+
);
|
|
8061
8578
|
case "session.approval_mode.changed":
|
|
8062
8579
|
return terminalLine(
|
|
8063
8580
|
"approval-mode",
|