@qwen-code/qwen-code 0.19.8 → 0.19.9-preview.0
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/SKILL.md +1 -0
- package/bundled/qc-helper/docs/configuration/auth.md +40 -55
- package/bundled/qc-helper/docs/configuration/model-providers.md +224 -218
- package/bundled/qc-helper/docs/configuration/settings.md +68 -51
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +12 -2
- package/bundled/qc-helper/docs/features/channels/overview.md +82 -7
- package/bundled/qc-helper/docs/features/channels/wecom.md +6 -0
- package/bundled/qc-helper/docs/features/code-review.md +109 -41
- package/bundled/qc-helper/docs/features/commands.md +45 -44
- package/bundled/qc-helper/docs/features/computer-use.md +77 -0
- 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/features/tool-use-summaries.md +19 -23
- package/bundled/qc-helper/docs/integration-vscode.md +2 -2
- package/bundled/qc-helper/docs/qwen-serve.md +66 -23
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +2 -2
- package/bundled/review/DESIGN.md +303 -46
- package/bundled/review/SKILL.md +670 -165
- package/chunks/MaxSizedBox-BEVSAWZ6.js +70 -0
- package/chunks/{StandaloneSessionPicker-EYRGH6PJ.js → StandaloneSessionPicker-2DA2MDDE.js} +81 -79
- package/chunks/{acpAgent-GRFTTRHW.js → acpAgent-G3WJU3PS.js} +1318 -465
- package/chunks/agent-DD3WSHXE.js +68 -0
- package/chunks/agent-headless-MHI7U2CU.js +62 -0
- package/chunks/{anthropicContentGenerator-CPF22MA7.js → anthropicContentGenerator-56U3YCP2.js} +187 -31
- package/chunks/{artifact-tool-D233YJFH.js → artifact-tool-MIZLXBLF.js} +5 -5
- package/chunks/{askUserQuestion-MKL5ZTMC.js → askUserQuestion-XMJVPNWM.js} +6 -6
- package/chunks/bridge-HKEWPNB5.js +78 -0
- package/chunks/{ca-MKD32FQL.js → ca-C2JTT2N5.js} +68 -6
- package/chunks/channel-worker-group-K7QKH6IG.js +13 -0
- package/chunks/channel-worker-manager-YSFB4HUU.js +418 -0
- package/chunks/channel-worker-supervisor-QCKIOYZD.js +20 -0
- package/chunks/chunk-2FMQQXMM.js +38 -0
- package/chunks/{chunk-CSOTA7KX.js → chunk-2FO5GFKZ.js} +2 -2
- package/chunks/{chunk-QQDPRDVW.js → chunk-2HRYPZT5.js} +1 -1
- package/chunks/{chunk-UXEW557D.js → chunk-2J4ZWME4.js} +3 -3
- package/chunks/{chunk-P3XEEI3X.js → chunk-2TQXXQMI.js} +36 -7
- package/chunks/{chunk-GSHQYYIV.js → chunk-2UW5RFRP.js} +6 -26
- package/chunks/{chunk-6IAWPIQ6.js → chunk-2W3OOD4W.js} +5 -3
- package/chunks/{chunk-2PSWA5ID.js → chunk-2X56YUSZ.js} +1 -1
- package/chunks/{chunk-NQKLOAVJ.js → chunk-2Z5UX4KI.js} +2 -2
- package/chunks/chunk-3MX7D6QN.js +516 -0
- package/chunks/{chunk-EEN2TKST.js → chunk-43RXPU5Q.js} +2 -2
- package/chunks/{chunk-55ZMG67I.js → chunk-4LD5APFL.js} +4 -4
- package/chunks/{chunk-WF4FAXDL.js → chunk-4QZ3XHWE.js} +62 -62
- package/chunks/chunk-4QZADKJS.js +34 -0
- package/chunks/{chunk-UIDXQNMV.js → chunk-4WGODMVR.js} +1 -1
- package/chunks/{chunk-E6US47KI.js → chunk-4WKAA4KS.js} +1 -1
- package/chunks/{chunk-TI3BWD4D.js → chunk-54UZQ57N.js} +39 -19
- package/chunks/{chunk-3GONHQOA.js → chunk-57OAHC2Y.js} +1 -1
- package/chunks/{chunk-JZSY4WP3.js → chunk-5DTTYNB7.js} +1 -1
- package/chunks/chunk-5HBA2Z7V.js +28 -0
- package/chunks/{chunk-SKAZWEV5.js → chunk-5M6IDOMF.js} +35 -98
- package/chunks/{chunk-A4BMJM77.js → chunk-5O2XNYP6.js} +1 -0
- package/chunks/{chunk-FQNC62B2.js → chunk-5VHASII5.js} +11 -11
- package/chunks/{chunk-GO6LNQXT.js → chunk-6AM5D4ME.js} +1 -1
- package/chunks/{chunk-BJBWRCSK.js → chunk-6H67XLET.js} +1 -1
- package/chunks/{chunk-O7FIRWJV.js → chunk-6JPDCEDB.js} +3 -3
- package/chunks/{chunk-3UP777ZS.js → chunk-6RLROE6G.js} +1 -1
- package/chunks/{chunk-GN3F6PIU.js → chunk-6WPJRYLZ.js} +5 -5
- package/chunks/{chunk-ZERZSAZL.js → chunk-75DOP5OR.js} +2 -2
- package/chunks/chunk-7DKX4A5Z.js +91 -0
- package/chunks/{chunk-M7S4GK5Z.js → chunk-7IDCQ35Q.js} +147 -30
- package/chunks/{chunk-22MNNNXE.js → chunk-7NFB7LBQ.js} +11 -3
- package/chunks/{chunk-ZL5HN75Q.js → chunk-7R4DPSRA.js} +37 -3
- package/chunks/{chunk-VZ7HY3YU.js → chunk-7STBROEV.js} +3 -3
- package/chunks/{chunk-SAIILPQ3.js → chunk-7X7TEQNX.js} +5 -3
- package/chunks/{chunk-RMLZAUWH.js → chunk-A3U2TQUL.js} +10 -12
- package/chunks/{chunk-IRJWHZWU.js → chunk-A4UCTEB5.js} +2 -2
- package/chunks/{chunk-BOBRZZKD.js → chunk-A7W4GQRW.js} +5 -5
- package/chunks/{chunk-O33TBKDC.js → chunk-AAUZBE5Y.js} +155 -19
- package/chunks/{chunk-SQ2UATK7.js → chunk-ADLYZJYZ.js} +11 -11
- package/chunks/{chunk-QYUE6W3T.js → chunk-ALGGS7UH.js} +2 -39
- package/chunks/{chunk-WMPVYQ4P.js → chunk-ARKANCNX.js} +3 -2
- package/chunks/{chunk-IBY3Q3HG.js → chunk-AU4R7ACM.js} +967 -181
- package/chunks/{channel-worker-supervisor-NZQUOEFJ.js → chunk-B7MFJBKE.js} +190 -34
- package/chunks/{chunk-HW4N45EE.js → chunk-B7NUUEXC.js} +38 -11
- package/chunks/{chunk-3B26UVCX.js → chunk-BLPMRN4B.js} +39 -10
- package/chunks/{chunk-ZN5T4BHI.js → chunk-BPZALHVR.js} +2 -2
- package/chunks/{chunk-BVYU3ZTI.js → chunk-BXT6PQ73.js} +1020 -942
- package/chunks/{chunk-OFEVLU4C.js → chunk-CARU2RR2.js} +1 -1
- package/chunks/{chunk-HDOH3QYE.js → chunk-CEGKYZDB.js} +2 -2
- package/chunks/{chunk-GLE2YUPU.js → chunk-COH43MRJ.js} +1 -1
- package/chunks/{chunk-E5A7LHNN.js → chunk-CPBF7KYF.js} +1 -1
- package/chunks/{chunk-UWCTAVOD.js → chunk-CR3C7WXL.js} +1 -1
- package/chunks/{chunk-IWKSG2AR.js → chunk-CXAOG665.js} +1 -1
- package/chunks/{chunk-64WXLC72.js → chunk-DJ2GSRLV.js} +1 -1
- package/chunks/{chunk-QN5NZ3UQ.js → chunk-DMTGGOSA.js} +2 -2
- package/chunks/{chunk-27BHARDE.js → chunk-DMVA55W5.js} +2124 -30
- package/chunks/{chunk-JPALE3PA.js → chunk-DQCCLVQK.js} +6 -6
- package/chunks/{chunk-X2XNQQJI.js → chunk-E2UVIFI2.js} +186 -399
- package/chunks/{chunk-KHDZHZMH.js → chunk-E5Z2AVNV.js} +1 -1
- package/chunks/{chunk-E7EMCSUG.js → chunk-EAHMOXLL.js} +64 -42
- package/chunks/{chunk-VGGOPZUL.js → chunk-EJ3KGYWL.js} +36 -8
- package/chunks/{chunk-DIWVZ3VM.js → chunk-ERTHKDKN.js} +5 -5
- package/chunks/{chunk-UX6OTBVD.js → chunk-EX5OULP3.js} +2 -2
- package/chunks/{chunk-5MBO76SL.js → chunk-F333XEAU.js} +3 -3
- package/chunks/{chunk-OACJLMLD.js → chunk-FBU7WRZI.js} +18 -2
- package/chunks/{chunk-5IFG2VC4.js → chunk-FCMNKVXT.js} +1 -1
- package/chunks/chunk-FEOBU3FA.js +253 -0
- package/chunks/{chunk-LAXNEOBG.js → chunk-FI2WSOWX.js} +19 -3
- package/chunks/{chunk-E7KNELIZ.js → chunk-FSA7ERJ2.js} +2 -2
- package/chunks/{chunk-44NROQYV.js → chunk-GDQQRV43.js} +4 -4
- package/chunks/{chunk-ZE6E424U.js → chunk-GN5HJJBO.js} +2 -2
- package/chunks/{chunk-O2YT7VB4.js → chunk-GOXKNSDZ.js} +2 -65
- package/chunks/{chunk-V35MD7KN.js → chunk-GRC5HGPI.js} +1 -1
- package/chunks/{chunk-ON3JA3RU.js → chunk-GTENQOEJ.js} +7 -9
- package/chunks/{chunk-S6RLAIUR.js → chunk-GYTKQYDB.js} +1 -1
- package/chunks/{chunk-A2X3KLC3.js → chunk-GZXCZHCT.js} +3 -3
- package/chunks/{chunk-K5PGHDBN.js → chunk-H6XPXXMH.js} +1 -1
- package/chunks/{chunk-PMFULMLX.js → chunk-HCJTURZD.js} +2262 -384
- package/chunks/chunk-HGG2RRXD.js +445 -0
- package/chunks/{chunk-II73RK2S.js → chunk-HGT6JR3U.js} +20 -1
- package/chunks/{chunk-DICGXFAI.js → chunk-HJCVNZLQ.js} +11 -9
- package/chunks/{chunk-3GNOQZDC.js → chunk-HJUDVNCO.js} +17663 -14877
- package/chunks/{chunk-AYNCLGTW.js → chunk-HRUGYOJN.js} +8 -51
- package/chunks/{chunk-KYMBIKIW.js → chunk-HTHUX2T5.js} +1 -1
- package/chunks/{chunk-LQ7TMOCE.js → chunk-HTO4JFDZ.js} +1 -1
- package/chunks/{chunk-BUZ6HGL4.js → chunk-HWTL6MPR.js} +357 -59
- package/chunks/chunk-IDS7MSUP.js +74 -0
- package/chunks/{chunk-4CGOWHKM.js → chunk-J4MOFEOK.js} +2 -2
- package/chunks/chunk-JCD4FM7K.js +296 -0
- package/chunks/{chunk-22IFUCVR.js → chunk-JESCGQM3.js} +1 -1
- package/chunks/{chunk-JZHIQJOE.js → chunk-JGO6RFI2.js} +6 -6
- package/chunks/{chunk-X3YGAX7V.js → chunk-JGUT3LWZ.js} +9 -2
- package/chunks/{chunk-JRQ7EVGE.js → chunk-JW7OOJC6.js} +2 -2
- package/chunks/{chunk-OQXDAMKY.js → chunk-KF5MMGG4.js} +8 -8
- package/chunks/{chunk-42XGFRJS.js → chunk-KKRTYONM.js} +8 -6
- package/chunks/{chunk-GGQQA4JW.js → chunk-KSO42X3Z.js} +15 -2
- package/chunks/{chunk-MRO43B25.js → chunk-KW7NOTN6.js} +1 -1
- package/chunks/{chunk-54YZOP7P.js → chunk-L573Z2QZ.js} +11894 -5190
- package/chunks/{chunk-TLWA7TPR.js → chunk-L5U3ELZX.js} +2 -2
- package/chunks/{chunk-YHKAK72D.js → chunk-LHEOLOXU.js} +251 -63
- package/chunks/{chunk-H6EMK6QK.js → chunk-LQIDP6K5.js} +11913 -5207
- package/chunks/{chunk-I6WGFJJ3.js → chunk-LSEJG6AM.js} +73 -19
- package/chunks/{chunk-MZ7BABX3.js → chunk-LXLTBIDP.js} +44 -7
- package/chunks/{chunk-HLKG6CZN.js → chunk-M5GB774H.js} +1 -1
- package/chunks/{chunk-JCH35JB3.js → chunk-MKK4XGLF.js} +2 -2
- package/chunks/{chunk-YKZIAK7C.js → chunk-MO7O5722.js} +424 -40
- package/chunks/chunk-MR3PXB6E.js +48 -0
- package/chunks/{chunk-A5JOJ77H.js → chunk-MRYWYBQ4.js} +38 -15
- package/chunks/{chunk-332PWN27.js → chunk-NHDKSOEY.js} +1 -1
- package/chunks/{chunk-TSPB77TG.js → chunk-NRAFASYX.js} +1016 -2967
- package/chunks/{chunk-BMFMJINR.js → chunk-OA4JVLSA.js} +28 -2
- package/chunks/{chunk-P7M4GA57.js → chunk-OCPBI7J5.js} +1 -1
- package/chunks/chunk-OJAMDVF5.js +66 -0
- package/chunks/{chunk-IJRL2S3D.js → chunk-OKAIGAYW.js} +6 -6
- package/chunks/{chunk-FBET5XZ2.js → chunk-PEJWA3QQ.js} +29 -10
- package/chunks/{chunk-L4AMBVQG.js → chunk-PMKW35AT.js} +54 -22
- package/chunks/{chunk-AGHU5VRK.js → chunk-PZL23GTM.js} +1 -1
- package/chunks/{chunk-PC4ZXHU2.js → chunk-Q6TUALBE.js} +3 -3
- package/chunks/{chunk-FXGLL2HL.js → chunk-Q7YDKOGY.js} +1 -1
- package/chunks/{chunk-XOHNA2S6.js → chunk-QAW7PIHT.js} +3 -3
- package/chunks/{chunk-XYR5RUA5.js → chunk-QE2WJ7FS.js} +10 -3
- package/chunks/{chunk-LGFAYIKX.js → chunk-QHTIBUWB.js} +1 -1
- package/chunks/{chunk-P3MYAZBY.js → chunk-QMGX2KO2.js} +1 -1
- package/chunks/{chunk-Z3I3QJK3.js → chunk-QRUIS3DN.js} +1 -1
- package/chunks/{chunk-ITOGNELQ.js → chunk-QSWDGAIC.js} +2 -2
- package/chunks/{chunk-PUVCVELY.js → chunk-QUJOI7SR.js} +70 -8
- package/chunks/{chunk-GHOTR7HL.js → chunk-QUPXZXLV.js} +1 -1
- package/chunks/{chunk-6VK6FIMQ.js → chunk-R5D5JOAM.js} +415 -379
- package/chunks/{chunk-CD6USWHZ.js → chunk-R5XLNDE2.js} +2 -2
- package/chunks/{chunk-W7EEOR7D.js → chunk-RCEEXIOO.js} +8 -6
- package/chunks/{chunk-TLRYABYP.js → chunk-RKUWKYED.js} +1 -1
- package/chunks/{chunk-RNBYOUGV.js → chunk-RXFQM6FQ.js} +1 -1
- package/chunks/{chunk-QXPI7FEC.js → chunk-S3TWXGKA.js} +4 -4
- package/chunks/{chunk-2EM7ECZD.js → chunk-SMSFWUFY.js} +309 -80
- package/chunks/{chunk-FV7425LN.js → chunk-SPJQO2CE.js} +18 -5
- package/chunks/{chunk-MLZQVCF3.js → chunk-SZRN75WQ.js} +1 -1
- package/chunks/{chunk-7RYW5LQV.js → chunk-T2NCM2ET.js} +2 -2
- package/chunks/{chunk-Z2Z3GUXZ.js → chunk-TB6UDU4T.js} +1 -1
- package/chunks/{chunk-EXPMGZZV.js → chunk-TEGEBB2I.js} +1 -1
- package/chunks/{chunk-MX2YXRER.js → chunk-TJTKSVIV.js} +1 -1
- package/chunks/{chunk-CCGOFQV3.js → chunk-TQBODCFD.js} +8 -7
- package/chunks/chunk-TV6K2FB4.js +224 -0
- package/chunks/{chunk-H6BD2ELD.js → chunk-TYAMGABM.js} +2 -2
- package/chunks/{chunk-QYNNN7BK.js → chunk-TYLOFD2U.js} +2 -2
- package/chunks/{chunk-VRDMOSQS.js → chunk-UDXSXLER.js} +2 -2
- package/chunks/{chunk-DHOLNQLC.js → chunk-UFDX27PL.js} +60 -40
- package/chunks/{chunk-WHJQ3JUS.js → chunk-UGN6CTNZ.js} +10 -10
- package/chunks/{chunk-CHB5SLZZ.js → chunk-UNLRKDMW.js} +4 -4
- package/chunks/{chunk-CJCKDMWO.js → chunk-URK542T4.js} +1 -1
- package/chunks/{chunk-AHNXYU4O.js → chunk-V6WHFGST.js} +1 -1
- package/chunks/{chunk-ZTQ26VBE.js → chunk-VDDGDZMA.js} +1 -1
- package/chunks/{chunk-BOBOCR5H.js → chunk-VEETSXYX.js} +4 -4
- package/chunks/{chunk-OMX7CUOE.js → chunk-VGC4I5JJ.js} +1 -1
- package/chunks/{chunk-43W4YSO6.js → chunk-VJNBRRZG.js} +2 -2
- package/chunks/{chunk-WQTHLB5T.js → chunk-VKS7EIOA.js} +7 -7
- package/chunks/{chunk-J7RCB6N5.js → chunk-VVDNGM6X.js} +2 -2
- package/chunks/{chunk-ER3BKOLB.js → chunk-W7FJ3N32.js} +1 -1
- package/chunks/{chunk-3HX5LZ6R.js → chunk-WBL3FJEU.js} +2 -2
- package/chunks/{chunk-7LTB54MK.js → chunk-WIEO4CWB.js} +2 -2
- package/chunks/chunk-WMC6HH7Y.js +493 -0
- package/chunks/{chunk-FEJ2FZ3U.js → chunk-WTNZ6DXB.js} +2 -2
- package/chunks/{chunk-L46XKEGM.js → chunk-X6ODDESK.js} +5 -8
- package/chunks/chunk-XDPYM5DE.js +71 -0
- package/chunks/{chunk-3RW4AZJV.js → chunk-XFSFZCM5.js} +1 -1
- package/chunks/{chunk-2MPVVENX.js → chunk-XU457J4V.js} +2 -2
- package/chunks/{chunk-SIUQ3YYX.js → chunk-XVNQMZ2I.js} +1 -1
- package/chunks/{chunk-SYCJMSIJ.js → chunk-XWRJCPHC.js} +1 -1
- package/chunks/{chunk-SUAKHHK7.js → chunk-Y66VOBRP.js} +3 -3
- package/chunks/chunk-YAF2MQZ6.js +19 -0
- package/chunks/chunk-YHN5SUIJ.js +219 -0
- package/chunks/{chunk-BR4QREVK.js → chunk-YQ3U5MUC.js} +1 -1
- package/chunks/{chunk-Y6Z2O3WR.js → chunk-YUZI3WAC.js} +1 -1
- package/chunks/{chunk-YDOXPLYL.js → chunk-ZA74ZTQU.js} +4564 -1326
- package/chunks/{chunk-DCZWC4PF.js → chunk-ZGE3222J.js} +5 -5
- package/chunks/chunk-ZP4ZZJJG.js +448 -0
- package/chunks/{chunk-AHNJGLFV.js → chunk-ZPAHLFZU.js} +3 -3
- package/chunks/cli-entry-path-4VJ3Y6T2.js +10 -0
- package/chunks/{computer-use-WMY3UOBX.js → computer-use-SHA6C3ES.js} +50 -50
- package/chunks/config-utils-XSHOMMK4.js +24 -0
- package/chunks/contextCommand-HOAF5LUC.js +68 -0
- package/chunks/create-sub-session-EAB2U5XW.js +207 -0
- package/chunks/create-sub-session-WJOWBFEP.js +375 -0
- package/chunks/{cron-create-JSXEIPVS.js → cron-create-GMVKSXZT.js} +9 -9
- package/chunks/{cron-delete-OIFVEPGU.js → cron-delete-VDZKUAVK.js} +7 -7
- package/chunks/{cron-list-D4ZX4IOE.js → cron-list-UG7C7RAR.js} +14 -10
- package/chunks/{daemon-WPAENEBW.js → daemon-MI5HF26N.js} +1074 -61
- package/chunks/daemon-status-provider-KFL3LRTP.js +76 -0
- package/chunks/{de-ZFPPQVSF.js → de-2VCDRDGU.js} +68 -6
- package/chunks/{devtools-FM6GJPYG.js → devtools-4QFYJT6U.js} +3 -3
- package/chunks/{dist-O2IRTRPP.js → dist-IEXZC5ZR.js} +10 -10
- package/chunks/{dist-SCFLLYMK.js → dist-PQK4GCKA.js} +12 -11
- package/chunks/{dist-63IS3ZMI.js → dist-PZV5RKM6.js} +4 -4
- package/chunks/{dist-E6UANPIM.js → dist-U75JK3PF.js} +1011 -197
- package/chunks/{dist-H2AEJCZ5.js → dist-VXO7QBON.js} +5 -5
- package/chunks/{dist-Z34QPAQW.js → dist-WH4TZSH3.js} +529 -79
- package/chunks/{dist-BEXOZXLQ.js → dist-X2ABIW5R.js} +36 -15
- package/chunks/earlyInputCapture-PKAQJMIP.js +69 -0
- package/chunks/{edit-OTYWAXGP.js → edit-6TXLYHJ2.js} +51 -51
- package/chunks/{en-N4EPZAQI.js → en-NJCA3TAA.js} +78 -6
- package/chunks/{enter-worktree-HNYBDVCX.js → enter-worktree-ZTILGPJX.js} +50 -50
- package/chunks/{enterPlanMode-CJCNGT63.js → enterPlanMode-62HRAMCH.js} +66 -51
- package/chunks/environment-OYA3ZVEL.js +89 -0
- package/chunks/errors-BFXOUUUR.js +75 -0
- package/chunks/{exit-worktree-DUUKOE3X.js → exit-worktree-HHJ5M6MV.js} +50 -50
- package/chunks/{exitPlanMode-AMMSXOAJ.js → exitPlanMode-M3SWHCL7.js} +51 -51
- package/chunks/{fast-path-OV6NIP3K.js → fast-path-3VMPLM74.js} +8 -8
- package/chunks/{fast-path-settings-7RIFI3PK.js → fast-path-settings-DAOVFADC.js} +8 -6
- package/chunks/{fileFromPath-IBEHA3CO.js → fileFromPath-UDALK7FM.js} +3 -3
- package/chunks/{fr-5WWMY53B.js → fr-5F3E7WKD.js} +68 -6
- package/chunks/{gemini-NQ3WWBKB.js → gemini-ZCGVYOJL.js} +181 -110
- package/chunks/{geminiContentGenerator-CDUNEJQE.js → geminiContentGenerator-XBYBAIDQ.js} +9 -9
- package/chunks/{getMachineId-bsd-4CASPIU4.js → getMachineId-bsd-EXV7SWPA.js} +3 -3
- package/chunks/{getMachineId-darwin-HPQPEMZR.js → getMachineId-darwin-IUOMFXU3.js} +3 -3
- package/chunks/{getMachineId-linux-AUARKYHL.js → getMachineId-linux-K7XJYFHL.js} +2 -2
- package/chunks/{getMachineId-unsupported-S32ZDA2T.js → getMachineId-unsupported-EA5FDRJ6.js} +2 -2
- package/chunks/{getMachineId-win-4EFLHYIJ.js → getMachineId-win-KBA6RAI5.js} +3 -3
- package/chunks/{glob-ROV3YS4R.js → glob-UOEYQNHN.js} +97 -75
- package/chunks/{grep-NRITKDCD.js → grep-OQM3CH7W.js} +50 -50
- package/chunks/handleAutoUpdate-ORBYVJHZ.js +69 -0
- package/chunks/i18n-NBP574CO.js +84 -0
- package/chunks/initializer-CWD7TCCD.js +73 -0
- package/chunks/installationInfo-CHPDUPWC.js +65 -0
- package/chunks/{ja-CUHZOLEJ.js → ja-66J6B53L.js} +69 -7
- package/chunks/{keychain-token-storage-UJV5XP4Z.js → keychain-token-storage-AU22CQI6.js} +4 -4
- package/chunks/{kittyProtocolDetector-OJRCJLIU.js → kittyProtocolDetector-HCNNKJTI.js} +2 -2
- package/chunks/list-ZTTO362W.js +76 -0
- package/chunks/loadedSettingsAdapter-V4ZTRKUO.js +70 -0
- package/chunks/{loop-wakeup-OHWEMFP5.js → loop-wakeup-C4EXLYVA.js} +10 -10
- package/chunks/{lowlight-FYAAUU5J.js → lowlight-J2OZNPCA.js} +1 -1
- package/chunks/{ls-7MFU2QYW.js → ls-2OUTG3IZ.js} +6 -6
- package/chunks/{lsp-XHDTPTGV.js → lsp-4VMNXZW6.js} +4 -4
- package/chunks/mcp-UH5PSGIK.js +70 -0
- package/chunks/{monitor-FL2ZO33W.js → monitor-F4NYEU5J.js} +50 -50
- package/chunks/{multipart-parser-AJ4WASWR.js → multipart-parser-AWZKXSQN.js} +3 -3
- package/chunks/nonInteractiveCli-7IHPXVNH.js +129 -0
- package/chunks/{notebook-edit-6PULTHL5.js → notebook-edit-HPDXNGQH.js} +51 -51
- package/chunks/openaiContentGenerator-OBDNNOE2.js +56 -0
- package/chunks/pidfile-AUMGYIOK.js +73 -0
- package/chunks/{pt-OLYN42DS.js → pt-TFZO5Y6T.js} +68 -6
- package/chunks/{qwenContentGenerator-NX2E7PB7.js → qwenContentGenerator-LH2U2YRG.js} +52 -52
- package/chunks/{qwenOAuth2-ZV7YLMND.js → qwenOAuth2-LEYOU7RU.js} +9 -9
- package/chunks/read-file-HUUFBLEO.js +30 -0
- package/chunks/{read-mcp-resource-CNQHBSJM.js → read-mcp-resource-JUFHCKSC.js} +5 -5
- package/chunks/{read-package-up-ER5OJUGP.js → read-package-up-TCM6I7S2.js} +2 -2
- package/chunks/{record-artifact-SQ2OKRJW.js → record-artifact-DWSMBXYY.js} +4 -4
- package/chunks/ripGrep-C7X33LU6.js +60 -0
- package/chunks/{ru-LDM3GWVQ.js → ru-4L4LFHIT.js} +68 -6
- package/chunks/{run-qwen-serve-JK2DL7PI.js → run-qwen-serve-DGW5AFDJ.js} +1465 -283
- package/chunks/runtime-NYUSLBEZ.js +99 -0
- package/chunks/{scheduler-O4IGVZKK.js → scheduler-5VKDXULT.js} +51 -51
- package/chunks/{send-message-76GT3JMC.js → send-message-JZ752NWD.js} +7 -7
- package/chunks/serve-UTAHSFXH.js +76 -0
- package/chunks/{server-SGNPKX2O.js → server-VUHSYSUV.js} +9088 -1817
- package/chunks/{session-5BNM25EZ.js → session-QSGSSNFB.js} +340 -135
- package/chunks/settings-X24RYEED.js +120 -0
- package/chunks/shell-4MSI2R4O.js +70 -0
- package/chunks/{skill-I22QK5XS.js → skill-JR3GTNVZ.js} +24 -24
- package/chunks/spawnChannel-RFAAO44J.js +70 -0
- package/chunks/{src-7XL4G4DC.js → src-VLI3TKEY.js} +4 -4
- package/chunks/{src-BBQSM46M.js → src-YDBNMIIM.js} +183 -53
- package/chunks/standalone-update-4CY4HKGC.js +79 -0
- package/chunks/{startInteractiveUI-JII36UGN.js → startInteractiveUI-FOD7MMVB.js} +2368 -1923
- package/chunks/stdioHelpers-UMY72QRP.js +14 -0
- package/chunks/{syntheticOutput-F7LSDCAR.js → syntheticOutput-LELY6HAI.js} +5 -5
- package/chunks/task-create-QY3BIMNM.js +23 -0
- package/chunks/{task-list-TGGJX7EA.js → task-list-D2U47WBJ.js} +11 -10
- package/chunks/{task-stop-W7NGTMYQ.js → task-stop-N6E5IYLH.js} +4 -4
- package/chunks/{task-update-XYWMHJGJ.js → task-update-HJCQILLB.js} +13 -12
- package/chunks/{team-create-A7NUU5AQ.js → team-create-ZLQSU2E3.js} +50 -50
- package/chunks/{team-delete-UHQQ2QQX.js → team-delete-RCWYDRF4.js} +11 -10
- package/chunks/{team-plan-approval-TOQRJ2KI.js → team-plan-approval-YUAYBYLS.js} +50 -50
- package/chunks/theme-manager-SKNEBMOG.js +64 -0
- package/chunks/{todoWrite-C4ZAMSR3.js → todoWrite-FKCGATPJ.js} +6 -6
- package/chunks/{tool-search-SZ4EFS2T.js → tool-search-V5J3TGWY.js} +24 -24
- package/chunks/total-session-admission-2WIH72I3.js +72 -0
- package/chunks/tree-sitter-YJVE2ZUK.js +2980 -0
- package/chunks/trustedFolders-JF265CRI.js +80 -0
- package/chunks/types-ML3TRJQ5.js +16 -0
- package/chunks/updateCheck-AMXNPBP6.js +69 -0
- package/chunks/updateEventEmitter-5MKC7BLQ.js +10 -0
- package/chunks/validateNonInterActiveAuth-6YHQO7PD.js +194 -0
- package/chunks/{version-NO2XSNNP.js → version-UEJJK7PE.js} +3 -3
- package/chunks/{web-fetch-UYGMOHW4.js → web-fetch-QGODBB6S.js} +8 -8
- package/chunks/{workflow-WO2H6NRI.js → workflow-5YFA5V4M.js} +51 -51
- package/chunks/workspace-providers-status-LMBLBNR7.js +73 -0
- package/chunks/workspace-registration-store-VV2S4MSV.js +27 -0
- package/chunks/workspace-registry-BVMPYRLN.js +76 -0
- package/chunks/workspace-service-PUYIZ3J4.js +86 -0
- package/chunks/workspace-skills-status-CJ7J2KPP.js +72 -0
- package/chunks/{write-file-PX2Z7IBE.js → write-file-OV77M6X7.js} +51 -51
- package/chunks/{yargs-B64EYTCF.js → yargs-6H2AUULL.js} +2 -2
- package/chunks/{zh-J4F6QWQV.js → zh-FSAH32JB.js} +79 -7
- package/chunks/{zh-TW-XVDWOLSW.js → zh-TW-D2YIE2LO.js} +79 -7
- package/cli.js +18 -17
- package/locales/ca.js +91 -7
- package/locales/de.js +90 -7
- package/locales/en.js +109 -7
- package/locales/fr.js +91 -7
- package/locales/ja.js +93 -7
- package/locales/pt.js +90 -7
- package/locales/ru.js +90 -7
- package/locales/zh-TW.js +106 -7
- package/locales/zh.js +106 -7
- package/package.json +3 -6
- package/web-shell/assets/{arc-BWyoJpY2.js → arc-CObt_TK9.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-BT0mGrz2.js → architectureDiagram-3BPJPVTR-B7aiJ6CK.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-BLgUWvyf.js → blockDiagram-GPEHLZMM-BSK2CrID.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DYx9M7oU.js → c4Diagram-AAUBKEIU-Bhx2p7T_.js} +1 -1
- package/web-shell/assets/channel-BBaLq8MV.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-CfMHWbuZ.js → chunk-2J33WTMH-c3Hzv0Ni.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-B1URoqEV.js → chunk-4BX2VUAB-DNXaK7ZF.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-DAIaM4QF.js → chunk-55IACEB6-BXjvDj_i.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-B2X34knw.js → chunk-727SXJPM-B6CaKFp-.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Cif-zLTQ.js → chunk-AQP2D5EJ-tij6Mz9B.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-H18WCXdY.js → chunk-FMBD7UC4-DdlsGk2h.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-YFtetHi0.js → chunk-ND2GUHAM-CdgGZSHE.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-By2hiH3r.js → chunk-QZHKN3VN-D8oJn1C0.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B2ZK6sWE.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B2ZK6sWE.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-VrcnnLZu.js → cose-bilkent-S5V4N54A-BUVmNp1Y.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-CGo-IaVV.js → dagre-BM42HDAG-CO4q310O.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-Dl4QjzIB.js → diagram-2AECGRRQ-C6gFvWkg.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-qMLmsO0u.js → diagram-5GNKFQAL-NG2I_c0h.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-CHlmuxPI.js → diagram-KO2AKTUF-DFKMS6I9.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-BUwU3GwT.js → diagram-LMA3HP47-BiElfsfP.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-HEhwPDUM.js → diagram-OG6HWLK6-zLWDYUqu.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-1n0llBmM.js → erDiagram-TEJ5UH35-DoVaazhK.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-BN74uMnt.js → flowDiagram-I6XJVG4X-0RLz-mXg.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BoOq78i3.js → ganttDiagram-6RSMTGT7-C-eX1A39.js} +3 -3
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CN8b00c8.js → gitGraphDiagram-PVQCEYII-BauQu1Bu.js} +1 -1
- package/web-shell/assets/index-3uAT3ehO.css +5 -0
- package/web-shell/assets/index-CVHa2QH7.js +3 -0
- package/web-shell/assets/index-D1KigWat.js +1128 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CCurnIna.js → infoDiagram-5YYISTIA-C800cFvZ.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-AwuRqdUP.js → ishikawaDiagram-YF4QCWOH-CFK1Jk6e.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-B7IICk-E.js → journeyDiagram-JHISSGLW-Cjx0WAC4.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-BYF0OKhx.js → kanban-definition-UN3LZRKU-DWMDHbiv.js} +1 -1
- package/web-shell/assets/{linear-GWWguGfD.js → linear-vpW4FrZs.js} +1 -1
- package/web-shell/assets/{mermaid.core-JqtkxvCl.js → mermaid.core-DsHRUnDd.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-B0MmHsZ6.js → mindmap-definition-RKZ34NQL-D3Eb1cAK.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-DhImUZLQ.js → pieDiagram-4H26LBE5-Cr2-6sWt.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-DGeSC3DT.js → quadrantDiagram-W4KKPZXB-Yd7yUgVp.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-DkspY6Re.js → requirementDiagram-4Y6WPE33-BE6SprL8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-CaOofS2x.js → sankeyDiagram-5OEKKPKP-DzkuMK8d.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-DFQ_kFnN.js → sequenceDiagram-3UESZ5HK-wD9A3Dhi.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-D3snw0Tz.js → stateDiagram-AJRCARHV-BOp5q1Nm.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BDsWUmPG.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-l4zH8nLM.js → timeline-definition-PNZ67QCA-Btc08sUA.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BnRlA98M.js → vennDiagram-CIIHVFJN-Bv6upsOA.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-BS0xUdmd.js → wardley-L42UT6IY-D-XamnCK.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-DKGBUWyQ.js → wardleyDiagram-YWT4CUSO-BbP_5Wfp.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-DVb2HuOB.js → xychartDiagram-2RQKCTM6-CO5Hh28b.js} +1 -1
- package/web-shell/index.html +16 -4
- package/chunks/MaxSizedBox-5DT2SD7B.js +0 -71
- package/chunks/agent-H2DGKS77.js +0 -68
- package/chunks/agent-headless-KFMFIT6J.js +0 -62
- package/chunks/bridge-NA3ZQQKJ.js +0 -78
- package/chunks/chunk-5P5XGNYH.js +0 -93
- package/chunks/chunk-6SHO7WFF.js +0 -79
- package/chunks/chunk-IFEWJXFS.js +0 -37
- package/chunks/chunk-XNXVCNAT.js +0 -88
- package/chunks/contextCommand-LXFZRP4L.js +0 -68
- package/chunks/daemon-status-provider-GJRXY5EN.js +0 -76
- package/chunks/earlyInputCapture-KNOYZ4MJ.js +0 -69
- package/chunks/environment-ATFTYMLZ.js +0 -88
- package/chunks/errors-A54HAADA.js +0 -75
- package/chunks/handleAutoUpdate-CEZJAARW.js +0 -65
- package/chunks/initializer-BRFJKRRX.js +0 -71
- package/chunks/list-KVHF7O4X.js +0 -73
- package/chunks/loadedSettingsAdapter-LL5PSFKX.js +0 -68
- package/chunks/mcp-3GCXRTOQ.js +0 -68
- package/chunks/nonInteractiveCli-PTQI3DV6.js +0 -119
- package/chunks/openaiContentGenerator-YE42PKCY.js +0 -56
- package/chunks/pidfile-NZYSCFRK.js +0 -73
- package/chunks/read-file-33XGP5HF.js +0 -30
- package/chunks/ripGrep-QWZLGTAN.js +0 -60
- package/chunks/serve-JTMIGANH.js +0 -74
- package/chunks/settings-3MI4XXP6.js +0 -118
- package/chunks/shell-YJKBE67T.js +0 -68
- package/chunks/spawnChannel-UNV6W4DU.js +0 -70
- package/chunks/task-create-WCHTB435.js +0 -22
- package/chunks/theme-manager-WZ4RRMMB.js +0 -64
- package/chunks/total-session-admission-ULXJWXFV.js +0 -72
- package/chunks/trustedFolders-LAZZPZ3D.js +0 -79
- package/chunks/types-QX5C3CHJ.js +0 -12
- package/chunks/updateCheck-KONLM73X.js +0 -65
- package/chunks/validateNonInterActiveAuth-MPKSRCXD.js +0 -184
- package/chunks/workspace-providers-status-3W7E7DFW.js +0 -71
- package/chunks/workspace-registry-SXJZNN3O.js +0 -74
- package/chunks/workspace-service-CZRQZ4Q4.js +0 -80
- package/chunks/workspace-skills-status-K7WFREPD.js +0 -70
- package/node_modules/@qwen-code/audio-capture/dist/index.d.ts +0 -35
- package/node_modules/@qwen-code/audio-capture/dist/index.js +0 -48
- package/node_modules/@qwen-code/audio-capture/dist/index.js.map +0 -1
- package/node_modules/@qwen-code/audio-capture/dist/platform.d.ts +0 -7
- package/node_modules/@qwen-code/audio-capture/dist/platform.js +0 -18
- package/node_modules/@qwen-code/audio-capture/dist/platform.js.map +0 -1
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/LICENSE +0 -21
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/README.md +0 -58
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/SECURITY.md +0 -5
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/bin.js +0 -84
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/build-test.js +0 -19
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/index.js +0 -6
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/node-gyp-build.js +0 -207
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/optional.js +0 -7
- package/node_modules/@qwen-code/audio-capture/node_modules/node-gyp-build/package.json +0 -43
- package/node_modules/@qwen-code/audio-capture/package.json +0 -30
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/darwin-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-arm64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/linux-x64/@qwen-code+audio-capture.node +0 -0
- package/node_modules/@qwen-code/audio-capture/prebuilds/win32-x64/@qwen-code+audio-capture.node +0 -0
- package/web-shell/assets/channel-wmPUGHtg.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BA2ljEjW.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BA2ljEjW.js +0 -1
- package/web-shell/assets/index-CNwoO1Cn.js +0 -783
- package/web-shell/assets/index-CWQ0z6kZ.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-BbSm_9d0.js +0 -1
|
@@ -1,8 +1,11 @@
|
|
|
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
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
9
|
import {
|
|
7
10
|
__name
|
|
8
11
|
} from "./chunk-J2S4EL5Y.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,15 +683,85 @@ 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);
|
|
684
691
|
return await res.json();
|
|
685
692
|
},
|
|
693
|
+
opts.timeoutMs,
|
|
694
|
+
opts.mode
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
/** @internal */
|
|
698
|
+
async workspaceJsonRequest(workspaceSelector, path, label, opts = {}) {
|
|
699
|
+
return await this.jsonRequest(
|
|
700
|
+
`/workspaces/${workspaceSelector}${path}`,
|
|
701
|
+
label,
|
|
702
|
+
opts
|
|
703
|
+
);
|
|
704
|
+
}
|
|
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 */
|
|
733
|
+
async workspaceNoContentRequest(workspaceSelector, path, label, opts = {}) {
|
|
734
|
+
return await this.fetchWithTimeout(
|
|
735
|
+
`${this.baseUrl}/workspaces/${workspaceSelector}${path}`,
|
|
736
|
+
{
|
|
737
|
+
...opts.method ? { method: opts.method } : {},
|
|
738
|
+
headers: this.headers({}, opts.clientId)
|
|
739
|
+
},
|
|
740
|
+
async (res) => {
|
|
741
|
+
if (res.status === 204) {
|
|
742
|
+
try {
|
|
743
|
+
await res.body?.cancel();
|
|
744
|
+
} catch {
|
|
745
|
+
}
|
|
746
|
+
return;
|
|
747
|
+
}
|
|
748
|
+
if (res.status === 404 && opts.okNotFoundCode) {
|
|
749
|
+
const err = await this.failOnError(res, label);
|
|
750
|
+
const body = err.body;
|
|
751
|
+
if (body?.code === opts.okNotFoundCode) return;
|
|
752
|
+
throw err;
|
|
753
|
+
}
|
|
754
|
+
throw await this.failOnError(res, label);
|
|
755
|
+
},
|
|
686
756
|
opts.timeoutMs
|
|
687
757
|
);
|
|
688
758
|
}
|
|
759
|
+
workspaceById(workspaceId) {
|
|
760
|
+
return new WorkspaceDaemonClient(this, urlEncode(workspaceId));
|
|
761
|
+
}
|
|
762
|
+
workspaceByCwd(workspaceCwd) {
|
|
763
|
+
return new WorkspaceDaemonClient(this, urlEncode(workspaceCwd));
|
|
764
|
+
}
|
|
689
765
|
// -- Lifecycle / discovery ---------------------------------------------
|
|
690
766
|
async health() {
|
|
691
767
|
return await this.fetchWithTimeout(
|
|
@@ -748,6 +824,13 @@ var DaemonClient = class {
|
|
|
748
824
|
}
|
|
749
825
|
);
|
|
750
826
|
}
|
|
827
|
+
async workspaceGit() {
|
|
828
|
+
return await this.jsonRequest(
|
|
829
|
+
"/workspace/git",
|
|
830
|
+
"GET /workspace/git",
|
|
831
|
+
{ mode: "rest" }
|
|
832
|
+
);
|
|
833
|
+
}
|
|
751
834
|
async workspaceMcpTools(serverName) {
|
|
752
835
|
return await this.fetchWithTimeout(
|
|
753
836
|
`${this.baseUrl}/workspace/mcp/${urlEncode(serverName)}/tools`,
|
|
@@ -787,6 +870,33 @@ var DaemonClient = class {
|
|
|
787
870
|
}
|
|
788
871
|
);
|
|
789
872
|
}
|
|
873
|
+
async workspaceAcpPreheat(timeoutMs) {
|
|
874
|
+
const serverBudgetMs = timeoutMs ?? 5e3;
|
|
875
|
+
const suffix = timeoutMs !== void 0 ? `?timeoutMs=${encodeURIComponent(timeoutMs)}` : "";
|
|
876
|
+
return await this.fetchWithTimeout(
|
|
877
|
+
`${this.baseUrl}/workspace/acp/preheat${suffix}`,
|
|
878
|
+
{ method: "POST", headers: this.headers() },
|
|
879
|
+
async (res) => {
|
|
880
|
+
if (!res.ok) {
|
|
881
|
+
throw await this.failOnError(res, "POST /workspace/acp/preheat");
|
|
882
|
+
}
|
|
883
|
+
return await res.json();
|
|
884
|
+
},
|
|
885
|
+
serverBudgetMs + 2e3
|
|
886
|
+
);
|
|
887
|
+
}
|
|
888
|
+
async workspaceAcpStatus() {
|
|
889
|
+
return await this.fetchWithTimeout(
|
|
890
|
+
`${this.baseUrl}/workspace/acp/status`,
|
|
891
|
+
{ headers: this.headers() },
|
|
892
|
+
async (res) => {
|
|
893
|
+
if (!res.ok) {
|
|
894
|
+
throw await this.failOnError(res, "GET /workspace/acp/status");
|
|
895
|
+
}
|
|
896
|
+
return await res.json();
|
|
897
|
+
}
|
|
898
|
+
);
|
|
899
|
+
}
|
|
790
900
|
async workspaceProviders() {
|
|
791
901
|
return await this.fetchWithTimeout(
|
|
792
902
|
`${this.baseUrl}/workspace/providers`,
|
|
@@ -823,64 +933,230 @@ var DaemonClient = class {
|
|
|
823
933
|
async workspaceExtensions() {
|
|
824
934
|
return await this.jsonRequest(
|
|
825
935
|
"/workspace/extensions",
|
|
826
|
-
"GET /workspace/extensions"
|
|
936
|
+
"GET /workspace/extensions",
|
|
937
|
+
{ mode: "rest" }
|
|
827
938
|
);
|
|
828
939
|
}
|
|
829
940
|
async installExtension(params, clientId) {
|
|
830
941
|
return await this.jsonRequest(
|
|
831
942
|
"/workspace/extensions/install",
|
|
832
943
|
"POST /workspace/extensions/install",
|
|
833
|
-
{ method: "POST", body: params, clientId }
|
|
944
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
834
945
|
);
|
|
835
946
|
}
|
|
836
947
|
async extensionOperationStatus(operationId) {
|
|
837
948
|
return await this.jsonRequest(
|
|
838
949
|
`/workspace/extensions/operations/${urlEncode(operationId)}`,
|
|
839
|
-
"GET /workspace/extensions/operations/:operationId"
|
|
950
|
+
"GET /workspace/extensions/operations/:operationId",
|
|
951
|
+
{ mode: "rest" }
|
|
952
|
+
);
|
|
953
|
+
}
|
|
954
|
+
async activeExtensionOperations() {
|
|
955
|
+
return await this.jsonRequest(
|
|
956
|
+
"/workspace/extensions/operations",
|
|
957
|
+
"GET /workspace/extensions/operations",
|
|
958
|
+
{ mode: "rest" }
|
|
959
|
+
);
|
|
960
|
+
}
|
|
961
|
+
async respondToExtensionInteraction(operationId, interactionId, response, clientId) {
|
|
962
|
+
return await this.jsonRequest(
|
|
963
|
+
`/workspace/extensions/operations/${urlEncode(operationId)}/interactions/${urlEncode(interactionId)}`,
|
|
964
|
+
"POST /workspace/extensions/operations/:operationId/interactions/:interactionId",
|
|
965
|
+
{ method: "POST", body: response, clientId, mode: "rest" }
|
|
840
966
|
);
|
|
841
967
|
}
|
|
842
968
|
async checkExtensionUpdates(clientId) {
|
|
843
969
|
return await this.jsonRequest(
|
|
844
970
|
"/workspace/extensions/check-updates",
|
|
845
971
|
"POST /workspace/extensions/check-updates",
|
|
846
|
-
{ method: "POST", body: {}, clientId }
|
|
972
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
847
973
|
);
|
|
848
974
|
}
|
|
849
975
|
async refreshExtensions(clientId) {
|
|
850
976
|
return await this.jsonRequest(
|
|
851
977
|
"/workspace/extensions/refresh",
|
|
852
978
|
"POST /workspace/extensions/refresh",
|
|
853
|
-
{ method: "POST", body: {}, clientId }
|
|
979
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
854
980
|
);
|
|
855
981
|
}
|
|
856
982
|
async enableExtension(name, params, clientId) {
|
|
857
983
|
return await this.jsonRequest(
|
|
858
984
|
`/workspace/extensions/${urlEncode(name)}/enable`,
|
|
859
985
|
"POST /workspace/extensions/:name/enable",
|
|
860
|
-
{ method: "POST", body: params, clientId }
|
|
986
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
861
987
|
);
|
|
862
988
|
}
|
|
863
989
|
async disableExtension(name, params, clientId) {
|
|
864
990
|
return await this.jsonRequest(
|
|
865
991
|
`/workspace/extensions/${urlEncode(name)}/disable`,
|
|
866
992
|
"POST /workspace/extensions/:name/disable",
|
|
867
|
-
{ method: "POST", body: params, clientId }
|
|
993
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
868
994
|
);
|
|
869
995
|
}
|
|
870
996
|
async updateExtension(name, clientId) {
|
|
871
997
|
return await this.jsonRequest(
|
|
872
998
|
`/workspace/extensions/${urlEncode(name)}/update`,
|
|
873
999
|
"POST /workspace/extensions/:name/update",
|
|
874
|
-
{ method: "POST", body: {}, clientId }
|
|
1000
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
875
1001
|
);
|
|
876
1002
|
}
|
|
877
1003
|
async uninstallExtension(name, clientId) {
|
|
878
1004
|
return await this.jsonRequest(
|
|
879
1005
|
`/workspace/extensions/${urlEncode(name)}`,
|
|
880
1006
|
"DELETE /workspace/extensions/:name",
|
|
881
|
-
{ method: "DELETE", clientId }
|
|
1007
|
+
{ method: "DELETE", clientId, mode: "rest" }
|
|
1008
|
+
);
|
|
1009
|
+
}
|
|
1010
|
+
async extensionCatalog() {
|
|
1011
|
+
return await this.jsonRequest(
|
|
1012
|
+
"/extensions",
|
|
1013
|
+
"GET /extensions",
|
|
1014
|
+
{ mode: "rest" }
|
|
882
1015
|
);
|
|
883
1016
|
}
|
|
1017
|
+
async installUserExtension(params, clientId) {
|
|
1018
|
+
return await this.jsonRequest(
|
|
1019
|
+
"/extensions/install",
|
|
1020
|
+
"POST /extensions/install",
|
|
1021
|
+
{ method: "POST", body: params, clientId, mode: "rest" }
|
|
1022
|
+
);
|
|
1023
|
+
}
|
|
1024
|
+
async checkUserExtensionUpdates(clientId) {
|
|
1025
|
+
return await this.jsonRequest(
|
|
1026
|
+
"/extensions/check-updates",
|
|
1027
|
+
"POST /extensions/check-updates",
|
|
1028
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
1029
|
+
);
|
|
1030
|
+
}
|
|
1031
|
+
async updateUserExtension(extensionId, clientId) {
|
|
1032
|
+
return await this.jsonRequest(
|
|
1033
|
+
`/extensions/${urlEncode(extensionId)}/update`,
|
|
1034
|
+
"POST /extensions/:extensionId/update",
|
|
1035
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
async uninstallUserExtension(extensionId, clientId) {
|
|
1039
|
+
return await this.fetchWithTimeout(
|
|
1040
|
+
`${this.baseUrl}/extensions/${urlEncode(extensionId)}`,
|
|
1041
|
+
{
|
|
1042
|
+
method: "DELETE",
|
|
1043
|
+
headers: this.headers({}, clientId)
|
|
1044
|
+
},
|
|
1045
|
+
async (res) => {
|
|
1046
|
+
if (res.status === 204) {
|
|
1047
|
+
await res.body?.cancel().catch(() => void 0);
|
|
1048
|
+
return void 0;
|
|
1049
|
+
}
|
|
1050
|
+
if (!res.ok) {
|
|
1051
|
+
throw await this.failOnError(res, "DELETE /extensions/:extensionId");
|
|
1052
|
+
}
|
|
1053
|
+
return await res.json();
|
|
1054
|
+
},
|
|
1055
|
+
void 0,
|
|
1056
|
+
"rest"
|
|
1057
|
+
);
|
|
1058
|
+
}
|
|
1059
|
+
async setExtensionDefaultActivation(extensionId, state, clientId) {
|
|
1060
|
+
return await this.jsonRequest(
|
|
1061
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
1062
|
+
"PUT /extensions/:extensionId/activation",
|
|
1063
|
+
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
1064
|
+
);
|
|
1065
|
+
}
|
|
1066
|
+
async extensionOperation(operationId, signal) {
|
|
1067
|
+
return await this.jsonRequest(
|
|
1068
|
+
`/extensions/operations/${urlEncode(operationId)}`,
|
|
1069
|
+
"GET /extensions/operations/:operationId",
|
|
1070
|
+
signal ? { signal, mode: "rest" } : { mode: "rest" }
|
|
1071
|
+
);
|
|
1072
|
+
}
|
|
1073
|
+
async waitForExtensionOperation(handle, options = {}) {
|
|
1074
|
+
const pollIntervalMs = options.pollIntervalMs ?? 1e3;
|
|
1075
|
+
const timeoutMs = options.timeoutMs ?? 10 * 6e4;
|
|
1076
|
+
const hasDeadline = timeoutMs !== Number.POSITIVE_INFINITY;
|
|
1077
|
+
const deadline = Date.now() + timeoutMs;
|
|
1078
|
+
const timeoutError = /* @__PURE__ */ __name(() => new Error(
|
|
1079
|
+
`Timed out waiting for extension operation ${handle.operationId}. The server operation was not cancelled.`
|
|
1080
|
+
), "timeoutError");
|
|
1081
|
+
for (; ; ) {
|
|
1082
|
+
options.signal?.throwIfAborted();
|
|
1083
|
+
const pollBudgetMs = deadline - Date.now();
|
|
1084
|
+
if (pollBudgetMs <= 0 || Number.isNaN(pollBudgetMs)) {
|
|
1085
|
+
throw timeoutError();
|
|
1086
|
+
}
|
|
1087
|
+
let operation;
|
|
1088
|
+
if (!hasDeadline) {
|
|
1089
|
+
operation = await this.extensionOperation(
|
|
1090
|
+
handle.operationId,
|
|
1091
|
+
options.signal
|
|
1092
|
+
);
|
|
1093
|
+
} else {
|
|
1094
|
+
const deadlineController = new AbortController();
|
|
1095
|
+
const pollSignal = options.signal ? composeAbortSignals2([options.signal, deadlineController.signal]) : deadlineController.signal;
|
|
1096
|
+
let deadlineTimer;
|
|
1097
|
+
const deadlinePromise = new Promise((_, reject) => {
|
|
1098
|
+
const expire = /* @__PURE__ */ __name(() => {
|
|
1099
|
+
const error = timeoutError();
|
|
1100
|
+
reject(error);
|
|
1101
|
+
deadlineController.abort(error);
|
|
1102
|
+
}, "expire");
|
|
1103
|
+
const schedule = /* @__PURE__ */ __name(() => {
|
|
1104
|
+
const remainingMs2 = deadline - Date.now();
|
|
1105
|
+
if (remainingMs2 <= 0) {
|
|
1106
|
+
expire();
|
|
1107
|
+
return;
|
|
1108
|
+
}
|
|
1109
|
+
deadlineTimer = setTimeout(
|
|
1110
|
+
() => {
|
|
1111
|
+
if (Date.now() >= deadline) {
|
|
1112
|
+
expire();
|
|
1113
|
+
} else {
|
|
1114
|
+
schedule();
|
|
1115
|
+
}
|
|
1116
|
+
},
|
|
1117
|
+
Math.min(remainingMs2, MAX_TIMER_DELAY_MS)
|
|
1118
|
+
);
|
|
1119
|
+
}, "schedule");
|
|
1120
|
+
schedule();
|
|
1121
|
+
});
|
|
1122
|
+
try {
|
|
1123
|
+
operation = await Promise.race([
|
|
1124
|
+
this.extensionOperation(handle.operationId, pollSignal),
|
|
1125
|
+
deadlinePromise
|
|
1126
|
+
]);
|
|
1127
|
+
} finally {
|
|
1128
|
+
if (deadlineTimer !== void 0) clearTimeout(deadlineTimer);
|
|
1129
|
+
deadlineController.abort();
|
|
1130
|
+
}
|
|
1131
|
+
}
|
|
1132
|
+
if (operation.status !== "queued" && operation.status !== "running") {
|
|
1133
|
+
return operation;
|
|
1134
|
+
}
|
|
1135
|
+
const remainingMs = deadline - Date.now();
|
|
1136
|
+
if (remainingMs <= 0) {
|
|
1137
|
+
throw timeoutError();
|
|
1138
|
+
}
|
|
1139
|
+
await new Promise((resolve, reject) => {
|
|
1140
|
+
const finish = /* @__PURE__ */ __name(() => {
|
|
1141
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
1142
|
+
resolve();
|
|
1143
|
+
}, "finish");
|
|
1144
|
+
const timer = setTimeout(
|
|
1145
|
+
finish,
|
|
1146
|
+
Math.min(pollIntervalMs, remainingMs, MAX_TIMER_DELAY_MS)
|
|
1147
|
+
);
|
|
1148
|
+
const onAbort = /* @__PURE__ */ __name(() => {
|
|
1149
|
+
clearTimeout(timer);
|
|
1150
|
+
options.signal?.removeEventListener("abort", onAbort);
|
|
1151
|
+
reject(
|
|
1152
|
+
options.signal?.reason ?? new DOMException("Aborted", "AbortError")
|
|
1153
|
+
);
|
|
1154
|
+
}, "onAbort");
|
|
1155
|
+
options.signal?.addEventListener("abort", onAbort, { once: true });
|
|
1156
|
+
if (options.signal?.aborted) onAbort();
|
|
1157
|
+
});
|
|
1158
|
+
}
|
|
1159
|
+
}
|
|
884
1160
|
// -- Workspace files (workspace files) -------------------------------
|
|
885
1161
|
async readWorkspaceFile(filePath, opts = {}, clientId) {
|
|
886
1162
|
const url = new URL(`${this.baseUrl}/file`);
|
|
@@ -1279,7 +1555,8 @@ var DaemonClient = class {
|
|
|
1279
1555
|
// invalid_session_scope` surface the bug. Same shape the
|
|
1280
1556
|
// bridge's own validation uses (`httpAcpBridge.ts:
|
|
1281
1557
|
// spawnOrAttach`); SDK should be a transparent layer here.
|
|
1282
|
-
...req.sessionScope !== void 0 ? { sessionScope: req.sessionScope } : {}
|
|
1558
|
+
...req.sessionScope !== void 0 ? { sessionScope: req.sessionScope } : {},
|
|
1559
|
+
...req.approvalMode !== void 0 ? { approvalMode: req.approvalMode } : {}
|
|
1283
1560
|
})
|
|
1284
1561
|
},
|
|
1285
1562
|
async (res) => {
|
|
@@ -1289,8 +1566,8 @@ var DaemonClient = class {
|
|
|
1289
1566
|
);
|
|
1290
1567
|
}
|
|
1291
1568
|
/**
|
|
1292
|
-
* Enumerate
|
|
1293
|
-
*
|
|
1569
|
+
* Enumerate the session catalog for a workspace. Used by session-picker UIs.
|
|
1570
|
+
* Returns an empty list (not 404) when the workspace has no sessions.
|
|
1294
1571
|
*/
|
|
1295
1572
|
async listWorkspaceSessions(workspaceCwd, options) {
|
|
1296
1573
|
const page = await this.listWorkspaceSessionsPage(workspaceCwd, options);
|
|
@@ -1320,6 +1597,9 @@ var DaemonClient = class {
|
|
|
1320
1597
|
if (options?.group !== void 0) {
|
|
1321
1598
|
query.set("group", options.group);
|
|
1322
1599
|
}
|
|
1600
|
+
if (options?.parentSessionId !== void 0) {
|
|
1601
|
+
query.set("parentSessionId", options.parentSessionId);
|
|
1602
|
+
}
|
|
1323
1603
|
return await this.jsonRequest(
|
|
1324
1604
|
`/workspace/${urlEncode(workspaceCwd)}/sessions?${query.toString()}`,
|
|
1325
1605
|
"GET /workspace/sessions"
|
|
@@ -1365,29 +1645,24 @@ var DaemonClient = class {
|
|
|
1365
1645
|
return this.restoreSession("load", sessionId, req, clientId);
|
|
1366
1646
|
}
|
|
1367
1647
|
async exportSession(sessionId, opts = {}) {
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
|
|
1384
|
-
|
|
1385
|
-
|
|
1386
|
-
format
|
|
1387
|
-
};
|
|
1388
|
-
},
|
|
1389
|
-
void 0,
|
|
1390
|
-
"rest"
|
|
1648
|
+
return await this.sessionExportRequest(
|
|
1649
|
+
`/session/${urlEncode(sessionId)}/export`,
|
|
1650
|
+
"GET /session/:id/export",
|
|
1651
|
+
opts
|
|
1652
|
+
);
|
|
1653
|
+
}
|
|
1654
|
+
async getSessionTranscriptPage(sessionId, opts = {}) {
|
|
1655
|
+
const params = new URLSearchParams();
|
|
1656
|
+
if (opts.cursor !== void 0) params.set("cursor", opts.cursor);
|
|
1657
|
+
if (opts.limit !== void 0) params.set("limit", String(opts.limit));
|
|
1658
|
+
const query = params.toString();
|
|
1659
|
+
return await this.jsonRequest(
|
|
1660
|
+
`/session/${urlEncode(sessionId)}/transcript${query ? `?${query}` : ""}`,
|
|
1661
|
+
"GET /session/:id/transcript",
|
|
1662
|
+
{
|
|
1663
|
+
clientId: opts.clientId,
|
|
1664
|
+
mode: "rest"
|
|
1665
|
+
}
|
|
1391
1666
|
);
|
|
1392
1667
|
}
|
|
1393
1668
|
async resumeSession(sessionId, req = {}, clientId) {
|
|
@@ -1437,6 +1712,21 @@ var DaemonClient = class {
|
|
|
1437
1712
|
}
|
|
1438
1713
|
);
|
|
1439
1714
|
}
|
|
1715
|
+
/**
|
|
1716
|
+
* Read the current in-memory runtime status for one live daemon session.
|
|
1717
|
+
*/
|
|
1718
|
+
async sessionStatus(sessionId, clientId) {
|
|
1719
|
+
return await this.fetchWithTimeout(
|
|
1720
|
+
`${this.baseUrl}/session/${urlEncode(sessionId)}/status`,
|
|
1721
|
+
{ headers: this.headers({}, clientId) },
|
|
1722
|
+
async (res) => {
|
|
1723
|
+
if (!res.ok) {
|
|
1724
|
+
throw await this.failOnError(res, "GET /session/:id/status");
|
|
1725
|
+
}
|
|
1726
|
+
return await res.json();
|
|
1727
|
+
}
|
|
1728
|
+
);
|
|
1729
|
+
}
|
|
1440
1730
|
async sessionContextUsage(sessionId, opts = {}, clientId) {
|
|
1441
1731
|
const params = new URLSearchParams();
|
|
1442
1732
|
if (opts.detail === true) params.set("detail", "true");
|
|
@@ -1551,7 +1841,10 @@ var DaemonClient = class {
|
|
|
1551
1841
|
{
|
|
1552
1842
|
method: "POST",
|
|
1553
1843
|
headers: this.headers({ "Content-Type": "application/json" }, clientId),
|
|
1554
|
-
body: JSON.stringify({
|
|
1844
|
+
body: JSON.stringify({
|
|
1845
|
+
cwd: req.workspaceCwd,
|
|
1846
|
+
...req.approvalMode !== void 0 ? { approvalMode: req.approvalMode } : {}
|
|
1847
|
+
})
|
|
1555
1848
|
},
|
|
1556
1849
|
async (res) => {
|
|
1557
1850
|
if (!res.ok) {
|
|
@@ -1610,7 +1903,9 @@ var DaemonClient = class {
|
|
|
1610
1903
|
);
|
|
1611
1904
|
}
|
|
1612
1905
|
return await res.json();
|
|
1613
|
-
}
|
|
1906
|
+
},
|
|
1907
|
+
void 0,
|
|
1908
|
+
"rest"
|
|
1614
1909
|
);
|
|
1615
1910
|
}
|
|
1616
1911
|
async rewindSession(sessionId, promptId, opts) {
|
|
@@ -1632,7 +1927,9 @@ var DaemonClient = class {
|
|
|
1632
1927
|
throw await this.failOnError(res, "POST /session/:id/rewind");
|
|
1633
1928
|
}
|
|
1634
1929
|
return await res.json();
|
|
1635
|
-
}
|
|
1930
|
+
},
|
|
1931
|
+
void 0,
|
|
1932
|
+
"rest"
|
|
1636
1933
|
);
|
|
1637
1934
|
}
|
|
1638
1935
|
/**
|
|
@@ -1827,6 +2124,35 @@ var DaemonClient = class {
|
|
|
1827
2124
|
}
|
|
1828
2125
|
);
|
|
1829
2126
|
}
|
|
2127
|
+
/**
|
|
2128
|
+
* Toggle a user-invocable skill in workspace `skills.disabled` settings.
|
|
2129
|
+
* Active ACP sessions refresh their skill validation and command lists before
|
|
2130
|
+
* the response returns; `activation` reports deferred or partial refreshes.
|
|
2131
|
+
*
|
|
2132
|
+
* Pre-flight `caps.features.includes('workspace_skill_toggle')` before calling.
|
|
2133
|
+
*/
|
|
2134
|
+
async setWorkspaceSkillEnabled(skillName, enabled, opts) {
|
|
2135
|
+
return await this.fetchWithTimeout(
|
|
2136
|
+
`${this.baseUrl}/workspace/skills/${urlEncode(skillName)}/enable`,
|
|
2137
|
+
{
|
|
2138
|
+
method: "POST",
|
|
2139
|
+
headers: this.headers(
|
|
2140
|
+
{ "Content-Type": "application/json" },
|
|
2141
|
+
opts?.clientId
|
|
2142
|
+
),
|
|
2143
|
+
body: JSON.stringify({ enabled })
|
|
2144
|
+
},
|
|
2145
|
+
async (res) => {
|
|
2146
|
+
if (!res.ok) {
|
|
2147
|
+
throw await this.failOnError(
|
|
2148
|
+
res,
|
|
2149
|
+
"POST /workspace/skills/:name/enable"
|
|
2150
|
+
);
|
|
2151
|
+
}
|
|
2152
|
+
return await res.json();
|
|
2153
|
+
}
|
|
2154
|
+
);
|
|
2155
|
+
}
|
|
1830
2156
|
async workspaceSettings(opts) {
|
|
1831
2157
|
return await this.fetchWithTimeout(
|
|
1832
2158
|
`${this.baseUrl}/workspace/settings`,
|
|
@@ -1861,6 +2187,25 @@ var DaemonClient = class {
|
|
|
1861
2187
|
}
|
|
1862
2188
|
);
|
|
1863
2189
|
}
|
|
2190
|
+
async deleteModel(target, opts) {
|
|
2191
|
+
return await this.fetchWithTimeout(
|
|
2192
|
+
`${this.baseUrl}/workspace/models`,
|
|
2193
|
+
{
|
|
2194
|
+
method: "DELETE",
|
|
2195
|
+
headers: this.headers(
|
|
2196
|
+
{ "Content-Type": "application/json" },
|
|
2197
|
+
opts?.clientId
|
|
2198
|
+
),
|
|
2199
|
+
body: JSON.stringify(target)
|
|
2200
|
+
},
|
|
2201
|
+
async (res) => {
|
|
2202
|
+
if (!res.ok) {
|
|
2203
|
+
throw await this.failOnError(res, "DELETE /workspace/models");
|
|
2204
|
+
}
|
|
2205
|
+
return await res.json();
|
|
2206
|
+
}
|
|
2207
|
+
);
|
|
2208
|
+
}
|
|
1864
2209
|
async workspaceVoice(clientId) {
|
|
1865
2210
|
return await this.jsonRequest(
|
|
1866
2211
|
"/workspace/voice",
|
|
@@ -1876,9 +2221,26 @@ var DaemonClient = class {
|
|
|
1876
2221
|
);
|
|
1877
2222
|
}
|
|
1878
2223
|
async transcribeWorkspaceVoice(audio, opts) {
|
|
2224
|
+
return await this.voiceTranscriptionRequest(
|
|
2225
|
+
"/workspace/voice/transcribe",
|
|
2226
|
+
"POST /workspace/voice/transcribe",
|
|
2227
|
+
audio,
|
|
2228
|
+
opts
|
|
2229
|
+
);
|
|
2230
|
+
}
|
|
2231
|
+
/** @internal */
|
|
2232
|
+
async workspaceVoiceTranscriptionRequest(workspaceSelector, audio, opts) {
|
|
2233
|
+
return await this.voiceTranscriptionRequest(
|
|
2234
|
+
`/workspaces/${workspaceSelector}/voice/transcribe`,
|
|
2235
|
+
"POST /workspaces/:workspace/voice/transcribe",
|
|
2236
|
+
audio,
|
|
2237
|
+
opts
|
|
2238
|
+
);
|
|
2239
|
+
}
|
|
2240
|
+
async voiceTranscriptionRequest(path, label, audio, opts) {
|
|
1879
2241
|
const query = opts.voiceModel ? `?${new URLSearchParams({ voiceModel: opts.voiceModel }).toString()}` : "";
|
|
1880
2242
|
return await this.fetchWithTimeout(
|
|
1881
|
-
`${this.baseUrl}
|
|
2243
|
+
`${this.baseUrl}${path}${query}`,
|
|
1882
2244
|
{
|
|
1883
2245
|
method: "POST",
|
|
1884
2246
|
headers: this.headers({ "Content-Type": opts.mimeType }, opts.clientId),
|
|
@@ -1886,11 +2248,11 @@ var DaemonClient = class {
|
|
|
1886
2248
|
},
|
|
1887
2249
|
async (res) => {
|
|
1888
2250
|
if (!res.ok) {
|
|
1889
|
-
throw await this.failOnError(res,
|
|
2251
|
+
throw await this.failOnError(res, label);
|
|
1890
2252
|
}
|
|
1891
2253
|
return await res.json();
|
|
1892
2254
|
},
|
|
1893
|
-
VOICE_TRANSCRIPTION_DEFAULT_TIMEOUT_MS,
|
|
2255
|
+
opts.timeoutMs ?? VOICE_TRANSCRIPTION_DEFAULT_TIMEOUT_MS,
|
|
1894
2256
|
"rest"
|
|
1895
2257
|
);
|
|
1896
2258
|
}
|
|
@@ -2047,6 +2409,84 @@ var DaemonClient = class {
|
|
|
2047
2409
|
opts?.timeoutMs
|
|
2048
2410
|
);
|
|
2049
2411
|
}
|
|
2412
|
+
/**
|
|
2413
|
+
* Reload the daemon-managed channel worker: the daemon stops and relaunches
|
|
2414
|
+
* it so it re-reads settings.json (channels / proxy / per-channel model).
|
|
2415
|
+
* Requires an enabled runtime selection; otherwise the route responds 409.
|
|
2416
|
+
* Pre-flight the dynamic `channel_reload` capability.
|
|
2417
|
+
*/
|
|
2418
|
+
async reloadChannelWorker(opts) {
|
|
2419
|
+
return await this.fetchWithTimeout(
|
|
2420
|
+
`${this.baseUrl}/workspace/channel/reload`,
|
|
2421
|
+
{
|
|
2422
|
+
method: "POST",
|
|
2423
|
+
headers: this.headers(
|
|
2424
|
+
{ "Content-Type": "application/json" },
|
|
2425
|
+
opts?.clientId
|
|
2426
|
+
),
|
|
2427
|
+
body: "{}"
|
|
2428
|
+
},
|
|
2429
|
+
async (res) => {
|
|
2430
|
+
if (!res.ok) {
|
|
2431
|
+
throw await this.failOnError(res, "POST /workspace/channel/reload");
|
|
2432
|
+
}
|
|
2433
|
+
return await res.json();
|
|
2434
|
+
},
|
|
2435
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2436
|
+
);
|
|
2437
|
+
}
|
|
2438
|
+
async getChannelWorkerControl(opts) {
|
|
2439
|
+
return await this.fetchWithTimeout(
|
|
2440
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2441
|
+
{
|
|
2442
|
+
method: "GET",
|
|
2443
|
+
headers: this.headers({}, opts?.clientId)
|
|
2444
|
+
},
|
|
2445
|
+
async (res) => {
|
|
2446
|
+
if (!res.ok) {
|
|
2447
|
+
throw await this.failOnError(res, "GET /workspace/channel");
|
|
2448
|
+
}
|
|
2449
|
+
return await res.json();
|
|
2450
|
+
},
|
|
2451
|
+
opts?.timeoutMs
|
|
2452
|
+
);
|
|
2453
|
+
}
|
|
2454
|
+
async setChannelWorkerSelection(selection, opts) {
|
|
2455
|
+
return await this.fetchWithTimeout(
|
|
2456
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2457
|
+
{
|
|
2458
|
+
method: "PUT",
|
|
2459
|
+
headers: this.headers(
|
|
2460
|
+
{ "Content-Type": "application/json" },
|
|
2461
|
+
opts?.clientId
|
|
2462
|
+
),
|
|
2463
|
+
body: JSON.stringify({ selection })
|
|
2464
|
+
},
|
|
2465
|
+
async (res) => {
|
|
2466
|
+
if (!res.ok) {
|
|
2467
|
+
throw await this.failOnError(res, "PUT /workspace/channel");
|
|
2468
|
+
}
|
|
2469
|
+
return await res.json();
|
|
2470
|
+
},
|
|
2471
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2472
|
+
);
|
|
2473
|
+
}
|
|
2474
|
+
async stopChannelWorker(opts) {
|
|
2475
|
+
return await this.fetchWithTimeout(
|
|
2476
|
+
`${this.baseUrl}/workspace/channel`,
|
|
2477
|
+
{
|
|
2478
|
+
method: "DELETE",
|
|
2479
|
+
headers: this.headers({}, opts?.clientId)
|
|
2480
|
+
},
|
|
2481
|
+
async (res) => {
|
|
2482
|
+
if (!res.ok) {
|
|
2483
|
+
throw await this.failOnError(res, "DELETE /workspace/channel");
|
|
2484
|
+
}
|
|
2485
|
+
return await res.json();
|
|
2486
|
+
},
|
|
2487
|
+
opts?.timeoutMs ?? CHANNEL_CONTROL_DEFAULT_TIMEOUT_MS
|
|
2488
|
+
);
|
|
2489
|
+
}
|
|
2050
2490
|
async manageMcpServer(serverName, action, opts) {
|
|
2051
2491
|
return await this.fetchWithTimeout(
|
|
2052
2492
|
`${this.baseUrl}/workspace/mcp/${urlEncode(serverName)}/${urlEncode(action)}`,
|
|
@@ -2653,6 +3093,25 @@ var DaemonClient = class {
|
|
|
2653
3093
|
}
|
|
2654
3094
|
);
|
|
2655
3095
|
}
|
|
3096
|
+
async addWorkspace(cwd, options = {}) {
|
|
3097
|
+
return await this.fetchWithTimeout(
|
|
3098
|
+
`${this.baseUrl}/workspaces`,
|
|
3099
|
+
{
|
|
3100
|
+
method: "POST",
|
|
3101
|
+
headers: this.headers({ "Content-Type": "application/json" }),
|
|
3102
|
+
body: JSON.stringify({
|
|
3103
|
+
cwd,
|
|
3104
|
+
...options.persist ? { persist: true } : {}
|
|
3105
|
+
})
|
|
3106
|
+
},
|
|
3107
|
+
async (res) => {
|
|
3108
|
+
if (!res.ok) {
|
|
3109
|
+
throw await this.failOnError(res, "POST /workspaces");
|
|
3110
|
+
}
|
|
3111
|
+
return await res.json();
|
|
3112
|
+
}
|
|
3113
|
+
);
|
|
3114
|
+
}
|
|
2656
3115
|
// -- Lifecycle / disposal ------------------------------------------------
|
|
2657
3116
|
/**
|
|
2658
3117
|
* Release transport resources (WS close, etc.). Idempotent.
|
|
@@ -2714,6 +3173,453 @@ var DaemonClient = class {
|
|
|
2714
3173
|
);
|
|
2715
3174
|
}
|
|
2716
3175
|
};
|
|
3176
|
+
var WorkspaceDaemonClient = class {
|
|
3177
|
+
constructor(client, workspaceSelector) {
|
|
3178
|
+
this.client = client;
|
|
3179
|
+
this.workspaceSelector = workspaceSelector;
|
|
3180
|
+
}
|
|
3181
|
+
static {
|
|
3182
|
+
__name(this, "WorkspaceDaemonClient");
|
|
3183
|
+
}
|
|
3184
|
+
workspaceMcp() {
|
|
3185
|
+
return this.get("/mcp", "GET /workspaces/:workspace/mcp");
|
|
3186
|
+
}
|
|
3187
|
+
workspaceVoice(clientId) {
|
|
3188
|
+
return this.client.workspaceJsonRequest(
|
|
3189
|
+
this.workspaceSelector,
|
|
3190
|
+
"/voice",
|
|
3191
|
+
"GET /workspaces/:workspace/voice",
|
|
3192
|
+
{ clientId, mode: "rest" }
|
|
3193
|
+
);
|
|
3194
|
+
}
|
|
3195
|
+
setWorkspaceVoice(update, clientId) {
|
|
3196
|
+
return this.client.workspaceJsonRequest(
|
|
3197
|
+
this.workspaceSelector,
|
|
3198
|
+
"/voice",
|
|
3199
|
+
"POST /workspaces/:workspace/voice",
|
|
3200
|
+
{ method: "POST", body: update, clientId, mode: "rest" }
|
|
3201
|
+
);
|
|
3202
|
+
}
|
|
3203
|
+
transcribeWorkspaceVoice(audio, opts) {
|
|
3204
|
+
return this.client.workspaceVoiceTranscriptionRequest(
|
|
3205
|
+
this.workspaceSelector,
|
|
3206
|
+
audio,
|
|
3207
|
+
opts
|
|
3208
|
+
);
|
|
3209
|
+
}
|
|
3210
|
+
workspaceGit() {
|
|
3211
|
+
return this.client.workspaceJsonRequest(
|
|
3212
|
+
this.workspaceSelector,
|
|
3213
|
+
"/git",
|
|
3214
|
+
"GET /workspaces/:workspace/git",
|
|
3215
|
+
{ mode: "rest" }
|
|
3216
|
+
);
|
|
3217
|
+
}
|
|
3218
|
+
workspaceSkills() {
|
|
3219
|
+
return this.get("/skills", "GET /workspaces/:workspace/skills");
|
|
3220
|
+
}
|
|
3221
|
+
workspaceProviders() {
|
|
3222
|
+
return this.get("/providers", "GET /workspaces/:workspace/providers");
|
|
3223
|
+
}
|
|
3224
|
+
workspaceHooks() {
|
|
3225
|
+
return this.get("/hooks", "GET /workspaces/:workspace/hooks");
|
|
3226
|
+
}
|
|
3227
|
+
workspaceEnv() {
|
|
3228
|
+
return this.get("/env", "GET /workspaces/:workspace/env");
|
|
3229
|
+
}
|
|
3230
|
+
workspacePreflight() {
|
|
3231
|
+
return this.get("/preflight", "GET /workspaces/:workspace/preflight");
|
|
3232
|
+
}
|
|
3233
|
+
workspaceTools() {
|
|
3234
|
+
return this.get("/tools", "GET /workspaces/:workspace/tools");
|
|
3235
|
+
}
|
|
3236
|
+
workspaceMemory() {
|
|
3237
|
+
return this.get("/memory", "GET /workspaces/:workspace/memory");
|
|
3238
|
+
}
|
|
3239
|
+
remove(options) {
|
|
3240
|
+
const body = options?.force === void 0 ? void 0 : {
|
|
3241
|
+
force: options.force
|
|
3242
|
+
};
|
|
3243
|
+
return this.client.workspaceJsonRequest(
|
|
3244
|
+
this.workspaceSelector,
|
|
3245
|
+
"",
|
|
3246
|
+
"DELETE /workspaces/:workspace",
|
|
3247
|
+
{
|
|
3248
|
+
method: "DELETE",
|
|
3249
|
+
...body ? { body } : {},
|
|
3250
|
+
...options?.timeoutMs !== void 0 ? { timeoutMs: options.timeoutMs } : {},
|
|
3251
|
+
mode: "rest"
|
|
3252
|
+
}
|
|
3253
|
+
);
|
|
3254
|
+
}
|
|
3255
|
+
writeWorkspaceMemory(req, clientId) {
|
|
3256
|
+
return this.post(
|
|
3257
|
+
"/memory",
|
|
3258
|
+
"POST /workspaces/:workspace/memory",
|
|
3259
|
+
{ ...req, scope: "workspace" },
|
|
3260
|
+
clientId
|
|
3261
|
+
);
|
|
3262
|
+
}
|
|
3263
|
+
listWorkspaceAgents() {
|
|
3264
|
+
return this.get("/agents", "GET /workspaces/:workspace/agents");
|
|
3265
|
+
}
|
|
3266
|
+
createWorkspaceAgent(req, clientId) {
|
|
3267
|
+
return this.post(
|
|
3268
|
+
"/agents",
|
|
3269
|
+
"POST /workspaces/:workspace/agents",
|
|
3270
|
+
{ ...req, scope: req.scope ?? "workspace" },
|
|
3271
|
+
clientId
|
|
3272
|
+
);
|
|
3273
|
+
}
|
|
3274
|
+
getWorkspaceAgent(agentType) {
|
|
3275
|
+
return this.get(
|
|
3276
|
+
`/agents/${urlEncode(agentType)}`,
|
|
3277
|
+
"GET /workspaces/:workspace/agents/:agentType"
|
|
3278
|
+
);
|
|
3279
|
+
}
|
|
3280
|
+
updateWorkspaceAgent(agentType, req, opts = {}) {
|
|
3281
|
+
const query = opts.scope ? `?scope=${urlEncode(opts.scope)}` : "";
|
|
3282
|
+
return this.post(
|
|
3283
|
+
`/agents/${urlEncode(agentType)}${query}`,
|
|
3284
|
+
"POST /workspaces/:workspace/agents/:agentType",
|
|
3285
|
+
req,
|
|
3286
|
+
opts.clientId
|
|
3287
|
+
);
|
|
3288
|
+
}
|
|
3289
|
+
async deleteWorkspaceAgent(agentType, opts = {}) {
|
|
3290
|
+
const query = opts.scope ? `?scope=${urlEncode(opts.scope)}` : "";
|
|
3291
|
+
return await this.client.workspaceNoContentRequest(
|
|
3292
|
+
this.workspaceSelector,
|
|
3293
|
+
`/agents/${urlEncode(agentType)}${query}`,
|
|
3294
|
+
"DELETE /workspaces/:workspace/agents/:agentType",
|
|
3295
|
+
{
|
|
3296
|
+
method: "DELETE",
|
|
3297
|
+
clientId: opts.clientId,
|
|
3298
|
+
okNotFoundCode: "agent_not_found"
|
|
3299
|
+
}
|
|
3300
|
+
);
|
|
3301
|
+
}
|
|
3302
|
+
listWorkspaceSessionsPage(options) {
|
|
3303
|
+
const requestedPageSize = options?.pageSize ?? DEFAULT_SESSION_LIST_PAGE_SIZE;
|
|
3304
|
+
const pageSize = Math.max(
|
|
3305
|
+
1,
|
|
3306
|
+
Math.min(
|
|
3307
|
+
1e3,
|
|
3308
|
+
Math.round(
|
|
3309
|
+
Number.isFinite(requestedPageSize) ? requestedPageSize : DEFAULT_SESSION_LIST_PAGE_SIZE
|
|
3310
|
+
)
|
|
3311
|
+
)
|
|
3312
|
+
);
|
|
3313
|
+
const query = new URLSearchParams({ size: String(pageSize) });
|
|
3314
|
+
if (options?.cursor !== void 0) query.set("cursor", options.cursor);
|
|
3315
|
+
if (options?.archiveState !== void 0) {
|
|
3316
|
+
query.set("archiveState", options.archiveState);
|
|
3317
|
+
}
|
|
3318
|
+
if (options?.view !== void 0) query.set("view", options.view);
|
|
3319
|
+
if (options?.group !== void 0) query.set("group", options.group);
|
|
3320
|
+
if (options?.parentSessionId !== void 0) {
|
|
3321
|
+
query.set("parentSessionId", options.parentSessionId);
|
|
3322
|
+
}
|
|
3323
|
+
return this.get(
|
|
3324
|
+
`/sessions?${query.toString()}`,
|
|
3325
|
+
"GET /workspaces/:workspace/sessions"
|
|
3326
|
+
);
|
|
3327
|
+
}
|
|
3328
|
+
async listWorkspaceSessions(options) {
|
|
3329
|
+
const page = await this.listWorkspaceSessionsPage(options);
|
|
3330
|
+
return page.sessions;
|
|
3331
|
+
}
|
|
3332
|
+
/**
|
|
3333
|
+
* Read one page from an active persisted session transcript in this
|
|
3334
|
+
* workspace.
|
|
3335
|
+
* The daemon performs replay locally without attaching to the session or
|
|
3336
|
+
* starting ACP. This method always uses native REST transport.
|
|
3337
|
+
*/
|
|
3338
|
+
getSessionTranscriptPage(sessionId, opts = {}) {
|
|
3339
|
+
const query = new URLSearchParams();
|
|
3340
|
+
if (opts.cursor !== void 0) query.set("cursor", opts.cursor);
|
|
3341
|
+
if (opts.limit !== void 0) query.set("limit", String(opts.limit));
|
|
3342
|
+
const suffix = query.size > 0 ? `?${query.toString()}` : "";
|
|
3343
|
+
return this.client.workspaceJsonRequest(
|
|
3344
|
+
this.workspaceSelector,
|
|
3345
|
+
`/session/${urlEncode(sessionId)}/transcript${suffix}`,
|
|
3346
|
+
"GET /workspaces/:workspace/session/:id/transcript",
|
|
3347
|
+
{ clientId: opts.clientId, mode: "rest" }
|
|
3348
|
+
);
|
|
3349
|
+
}
|
|
3350
|
+
/** Export an active persisted session from this registered workspace. */
|
|
3351
|
+
exportSession(sessionId, opts = {}) {
|
|
3352
|
+
return this.client.sessionExportRequest(
|
|
3353
|
+
`/workspaces/${this.workspaceSelector}/session/${urlEncode(sessionId)}/export`,
|
|
3354
|
+
"GET /workspaces/:workspace/session/:id/export",
|
|
3355
|
+
opts
|
|
3356
|
+
);
|
|
3357
|
+
}
|
|
3358
|
+
listSessionGroups() {
|
|
3359
|
+
return this.get(
|
|
3360
|
+
"/session-groups",
|
|
3361
|
+
"GET /workspaces/:workspace/session-groups"
|
|
3362
|
+
);
|
|
3363
|
+
}
|
|
3364
|
+
async createSessionGroup(input) {
|
|
3365
|
+
const body = await this.post(
|
|
3366
|
+
"/session-groups",
|
|
3367
|
+
"POST /workspaces/:workspace/session-groups",
|
|
3368
|
+
input
|
|
3369
|
+
);
|
|
3370
|
+
return body.group;
|
|
3371
|
+
}
|
|
3372
|
+
async updateSessionGroup(groupId, update) {
|
|
3373
|
+
const body = await this.client.workspaceJsonRequest(
|
|
3374
|
+
this.workspaceSelector,
|
|
3375
|
+
`/session-groups/${urlEncode(groupId)}`,
|
|
3376
|
+
"PATCH /workspaces/:workspace/session-groups/:groupId",
|
|
3377
|
+
{ method: "PATCH", body: update }
|
|
3378
|
+
);
|
|
3379
|
+
return body.group;
|
|
3380
|
+
}
|
|
3381
|
+
deleteSessionGroup(groupId) {
|
|
3382
|
+
return this.client.workspaceJsonRequest(
|
|
3383
|
+
this.workspaceSelector,
|
|
3384
|
+
`/session-groups/${urlEncode(groupId)}`,
|
|
3385
|
+
"DELETE /workspaces/:workspace/session-groups/:groupId",
|
|
3386
|
+
{ method: "DELETE" }
|
|
3387
|
+
);
|
|
3388
|
+
}
|
|
3389
|
+
updateSessionOrganization(sessionId, update, clientId) {
|
|
3390
|
+
return this.client.workspaceJsonRequest(
|
|
3391
|
+
this.workspaceSelector,
|
|
3392
|
+
`/session/${urlEncode(sessionId)}/organization`,
|
|
3393
|
+
"PATCH /workspaces/:workspace/session/:id/organization",
|
|
3394
|
+
{ method: "PATCH", body: update, clientId }
|
|
3395
|
+
);
|
|
3396
|
+
}
|
|
3397
|
+
deleteSessionsData(sessionIds, clientId) {
|
|
3398
|
+
return this.post(
|
|
3399
|
+
"/sessions/delete",
|
|
3400
|
+
"POST /workspaces/:workspace/sessions/delete",
|
|
3401
|
+
{ sessionIds },
|
|
3402
|
+
clientId
|
|
3403
|
+
);
|
|
3404
|
+
}
|
|
3405
|
+
archiveSessionsData(sessionIds, clientId) {
|
|
3406
|
+
return this.post(
|
|
3407
|
+
"/sessions/archive",
|
|
3408
|
+
"POST /workspaces/:workspace/sessions/archive",
|
|
3409
|
+
{ sessionIds },
|
|
3410
|
+
clientId
|
|
3411
|
+
);
|
|
3412
|
+
}
|
|
3413
|
+
unarchiveSessionsData(sessionIds, clientId) {
|
|
3414
|
+
return this.post(
|
|
3415
|
+
"/sessions/unarchive",
|
|
3416
|
+
"POST /workspaces/:workspace/sessions/unarchive",
|
|
3417
|
+
{ sessionIds },
|
|
3418
|
+
clientId
|
|
3419
|
+
);
|
|
3420
|
+
}
|
|
3421
|
+
readWorkspaceFile(filePath, opts = {}, clientId) {
|
|
3422
|
+
const query = new URLSearchParams({ path: filePath });
|
|
3423
|
+
if (opts.maxBytes !== void 0)
|
|
3424
|
+
query.set("maxBytes", String(opts.maxBytes));
|
|
3425
|
+
if (opts.line !== void 0) query.set("line", String(opts.line));
|
|
3426
|
+
if (opts.limit !== void 0) query.set("limit", String(opts.limit));
|
|
3427
|
+
return this.get(
|
|
3428
|
+
`/file?${query.toString()}`,
|
|
3429
|
+
"GET /workspaces/:workspace/file",
|
|
3430
|
+
clientId
|
|
3431
|
+
);
|
|
3432
|
+
}
|
|
3433
|
+
readWorkspaceFileBytes(filePath, opts = {}, clientId) {
|
|
3434
|
+
const query = new URLSearchParams({ path: filePath });
|
|
3435
|
+
if (opts.offset !== void 0) query.set("offset", String(opts.offset));
|
|
3436
|
+
if (opts.maxBytes !== void 0)
|
|
3437
|
+
query.set("maxBytes", String(opts.maxBytes));
|
|
3438
|
+
return this.get(
|
|
3439
|
+
`/file/bytes?${query.toString()}`,
|
|
3440
|
+
"GET /workspaces/:workspace/file/bytes",
|
|
3441
|
+
clientId
|
|
3442
|
+
);
|
|
3443
|
+
}
|
|
3444
|
+
fileStat(filePath) {
|
|
3445
|
+
const query = new URLSearchParams({ path: filePath });
|
|
3446
|
+
return this.get(
|
|
3447
|
+
`/stat?${query.toString()}`,
|
|
3448
|
+
"GET /workspaces/:workspace/stat"
|
|
3449
|
+
);
|
|
3450
|
+
}
|
|
3451
|
+
dirList(dirPath) {
|
|
3452
|
+
const query = new URLSearchParams({ path: dirPath });
|
|
3453
|
+
return this.get(
|
|
3454
|
+
`/list?${query.toString()}`,
|
|
3455
|
+
"GET /workspaces/:workspace/list"
|
|
3456
|
+
);
|
|
3457
|
+
}
|
|
3458
|
+
glob(pattern, opts = {}) {
|
|
3459
|
+
const query = new URLSearchParams({ pattern });
|
|
3460
|
+
if (opts.maxResults !== void 0) {
|
|
3461
|
+
query.set("maxResults", String(opts.maxResults));
|
|
3462
|
+
}
|
|
3463
|
+
return this.client.workspaceJsonRequest(
|
|
3464
|
+
this.workspaceSelector,
|
|
3465
|
+
`/glob?${query.toString()}`,
|
|
3466
|
+
"GET /workspaces/:workspace/glob",
|
|
3467
|
+
{ signal: opts.signal }
|
|
3468
|
+
);
|
|
3469
|
+
}
|
|
3470
|
+
writeWorkspaceFile(req, clientId) {
|
|
3471
|
+
return this.post(
|
|
3472
|
+
"/file/write",
|
|
3473
|
+
"POST /workspaces/:workspace/file/write",
|
|
3474
|
+
req,
|
|
3475
|
+
clientId
|
|
3476
|
+
);
|
|
3477
|
+
}
|
|
3478
|
+
editWorkspaceFile(req, clientId) {
|
|
3479
|
+
return this.post(
|
|
3480
|
+
"/file/edit",
|
|
3481
|
+
"POST /workspaces/:workspace/file/edit",
|
|
3482
|
+
req,
|
|
3483
|
+
clientId
|
|
3484
|
+
);
|
|
3485
|
+
}
|
|
3486
|
+
workspaceSettings(opts) {
|
|
3487
|
+
return this.get(
|
|
3488
|
+
"/settings",
|
|
3489
|
+
"GET /workspaces/:workspace/settings",
|
|
3490
|
+
opts?.clientId
|
|
3491
|
+
);
|
|
3492
|
+
}
|
|
3493
|
+
setWorkspaceSetting(scope, key, value, opts) {
|
|
3494
|
+
return this.post(
|
|
3495
|
+
"/settings",
|
|
3496
|
+
"POST /workspaces/:workspace/settings",
|
|
3497
|
+
{ scope, key, value },
|
|
3498
|
+
opts?.clientId
|
|
3499
|
+
);
|
|
3500
|
+
}
|
|
3501
|
+
workspaceTrust(opts) {
|
|
3502
|
+
return this.get(
|
|
3503
|
+
"/trust",
|
|
3504
|
+
"GET /workspaces/:workspace/trust",
|
|
3505
|
+
opts?.clientId
|
|
3506
|
+
);
|
|
3507
|
+
}
|
|
3508
|
+
requestWorkspaceTrustChange(request, clientId) {
|
|
3509
|
+
return this.post(
|
|
3510
|
+
"/trust/request",
|
|
3511
|
+
"POST /workspaces/:workspace/trust/request",
|
|
3512
|
+
request,
|
|
3513
|
+
clientId
|
|
3514
|
+
);
|
|
3515
|
+
}
|
|
3516
|
+
workspacePermissions(opts) {
|
|
3517
|
+
return this.get(
|
|
3518
|
+
"/permissions",
|
|
3519
|
+
"GET /workspaces/:workspace/permissions",
|
|
3520
|
+
opts?.clientId
|
|
3521
|
+
);
|
|
3522
|
+
}
|
|
3523
|
+
setWorkspacePermissionRules(ruleType, rules, opts) {
|
|
3524
|
+
return this.post(
|
|
3525
|
+
"/permissions",
|
|
3526
|
+
"POST /workspaces/:workspace/permissions",
|
|
3527
|
+
{ scope: "workspace", ruleType, rules: [...rules] },
|
|
3528
|
+
opts?.clientId
|
|
3529
|
+
);
|
|
3530
|
+
}
|
|
3531
|
+
setWorkspaceToolEnabled(toolName, enabled, opts) {
|
|
3532
|
+
return this.post(
|
|
3533
|
+
`/tools/${urlEncode(toolName)}/enable`,
|
|
3534
|
+
"POST /workspaces/:workspace/tools/:name/enable",
|
|
3535
|
+
{ enabled },
|
|
3536
|
+
opts?.clientId
|
|
3537
|
+
);
|
|
3538
|
+
}
|
|
3539
|
+
setWorkspaceSkillEnabled(skillName, enabled, opts) {
|
|
3540
|
+
return this.post(
|
|
3541
|
+
`/skills/${urlEncode(skillName)}/enable`,
|
|
3542
|
+
"POST /workspaces/:workspace/skills/:name/enable",
|
|
3543
|
+
{ enabled },
|
|
3544
|
+
opts?.clientId
|
|
3545
|
+
);
|
|
3546
|
+
}
|
|
3547
|
+
restartMcpServer(serverName, opts) {
|
|
3548
|
+
const query = opts?.entryIndex === void 0 ? "" : `?entryIndex=${urlEncode(String(opts.entryIndex))}`;
|
|
3549
|
+
return this.post(
|
|
3550
|
+
`/mcp/${urlEncode(serverName)}/restart${query}`,
|
|
3551
|
+
"POST /workspaces/:workspace/mcp/:server/restart",
|
|
3552
|
+
{},
|
|
3553
|
+
opts?.clientId,
|
|
3554
|
+
opts?.timeoutMs ?? MCP_RESTART_DEFAULT_TIMEOUT_MS
|
|
3555
|
+
);
|
|
3556
|
+
}
|
|
3557
|
+
reload(opts) {
|
|
3558
|
+
return this.post(
|
|
3559
|
+
"/reload",
|
|
3560
|
+
"POST /workspaces/:workspace/reload",
|
|
3561
|
+
{},
|
|
3562
|
+
opts?.clientId,
|
|
3563
|
+
opts?.timeoutMs
|
|
3564
|
+
);
|
|
3565
|
+
}
|
|
3566
|
+
initWorkspace(opts) {
|
|
3567
|
+
return this.post(
|
|
3568
|
+
"/init",
|
|
3569
|
+
"POST /workspaces/:workspace/init",
|
|
3570
|
+
opts?.force === true ? { force: true } : {},
|
|
3571
|
+
opts?.clientId
|
|
3572
|
+
);
|
|
3573
|
+
}
|
|
3574
|
+
workspaceExtensions() {
|
|
3575
|
+
return this.client.workspaceJsonRequest(
|
|
3576
|
+
this.workspaceSelector,
|
|
3577
|
+
"/extensions",
|
|
3578
|
+
"GET /workspaces/:workspace/extensions",
|
|
3579
|
+
{ mode: "rest" }
|
|
3580
|
+
);
|
|
3581
|
+
}
|
|
3582
|
+
setExtensionActivation(extensionId, state, clientId) {
|
|
3583
|
+
return this.client.workspaceJsonRequest(
|
|
3584
|
+
this.workspaceSelector,
|
|
3585
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
3586
|
+
"PUT /workspaces/:workspace/extensions/:extensionId/activation",
|
|
3587
|
+
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
3588
|
+
);
|
|
3589
|
+
}
|
|
3590
|
+
clearExtensionActivation(extensionId, clientId) {
|
|
3591
|
+
return this.client.workspaceJsonRequest(
|
|
3592
|
+
this.workspaceSelector,
|
|
3593
|
+
`/extensions/${urlEncode(extensionId)}/activation`,
|
|
3594
|
+
"DELETE /workspaces/:workspace/extensions/:extensionId/activation",
|
|
3595
|
+
{ method: "DELETE", clientId, mode: "rest" }
|
|
3596
|
+
);
|
|
3597
|
+
}
|
|
3598
|
+
refreshExtensionRuntime(clientId) {
|
|
3599
|
+
return this.client.workspaceJsonRequest(
|
|
3600
|
+
this.workspaceSelector,
|
|
3601
|
+
"/extensions/refresh",
|
|
3602
|
+
"POST /workspaces/:workspace/extensions/refresh",
|
|
3603
|
+
{ method: "POST", body: {}, clientId, mode: "rest" }
|
|
3604
|
+
);
|
|
3605
|
+
}
|
|
3606
|
+
get(path, label, clientId) {
|
|
3607
|
+
return this.client.workspaceJsonRequest(
|
|
3608
|
+
this.workspaceSelector,
|
|
3609
|
+
path,
|
|
3610
|
+
label,
|
|
3611
|
+
{ clientId }
|
|
3612
|
+
);
|
|
3613
|
+
}
|
|
3614
|
+
post(path, label, body, clientId, timeoutMs) {
|
|
3615
|
+
return this.client.workspaceJsonRequest(
|
|
3616
|
+
this.workspaceSelector,
|
|
3617
|
+
path,
|
|
3618
|
+
label,
|
|
3619
|
+
{ method: "POST", body, clientId, timeoutMs }
|
|
3620
|
+
);
|
|
3621
|
+
}
|
|
3622
|
+
};
|
|
2717
3623
|
function composeAbortSignals2(signals) {
|
|
2718
3624
|
const anyFn = AbortSignal.any;
|
|
2719
3625
|
if (typeof anyFn === "function") return anyFn.call(AbortSignal, signals);
|
|
@@ -2807,7 +3713,7 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
2807
3713
|
*/
|
|
2808
3714
|
static async createOrAttach(client, req = {}, clientId) {
|
|
2809
3715
|
const session = await client.createOrAttachSession(req, clientId);
|
|
2810
|
-
const lastEventId = !session.attached || req.modelServiceId ? 0 : void 0;
|
|
3716
|
+
const lastEventId = !session.attached || req.modelServiceId || req.approvalMode ? 0 : void 0;
|
|
2811
3717
|
return new _DaemonSessionClient({
|
|
2812
3718
|
client,
|
|
2813
3719
|
session,
|
|
@@ -3110,6 +4016,9 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
3110
4016
|
async context() {
|
|
3111
4017
|
return await this.client.sessionContext(this.sessionId, this.clientId);
|
|
3112
4018
|
}
|
|
4019
|
+
async status() {
|
|
4020
|
+
return await this.client.sessionStatus(this.sessionId, this.clientId);
|
|
4021
|
+
}
|
|
3113
4022
|
async contextUsage(opts = {}) {
|
|
3114
4023
|
return await this.client.sessionContextUsage(
|
|
3115
4024
|
this.sessionId,
|
|
@@ -3304,6 +4213,7 @@ var DAEMON_KNOWN_EVENT_TYPE_VALUES = [
|
|
|
3304
4213
|
"session_died",
|
|
3305
4214
|
"session_closed",
|
|
3306
4215
|
"session_metadata_updated",
|
|
4216
|
+
"session_recording_degraded",
|
|
3307
4217
|
"artifact_changed",
|
|
3308
4218
|
MID_TURN_MESSAGE_INJECTED_EVENT,
|
|
3309
4219
|
PENDING_PROMPT_ADDED_EVENT,
|
|
@@ -3414,7 +4324,8 @@ var DAEMON_KNOWN_EVENT_TYPE_VALUES = [
|
|
|
3414
4324
|
// `replay_complete` when `?snapshot=1` is set on the SSE endpoint.
|
|
3415
4325
|
// Carries `currentModelId` and `currentApprovalMode` so reconnecting
|
|
3416
4326
|
// clients can seed their reducer without an extra round-trip.
|
|
3417
|
-
"session_snapshot"
|
|
4327
|
+
"session_snapshot",
|
|
4328
|
+
"git_branch_changed"
|
|
3418
4329
|
];
|
|
3419
4330
|
var DAEMON_KNOWN_EVENT_TYPES = new Set(
|
|
3420
4331
|
DAEMON_KNOWN_EVENT_TYPE_VALUES
|
|
@@ -3428,6 +4339,7 @@ var RESYNC_PASSTHROUGH_TYPES = /* @__PURE__ */ new Set([
|
|
|
3428
4339
|
"session_closed",
|
|
3429
4340
|
"client_evicted",
|
|
3430
4341
|
"stream_error",
|
|
4342
|
+
"session_recording_degraded",
|
|
3431
4343
|
// A5 (#4511): the snapshot is a full-state authoritative frame, not a
|
|
3432
4344
|
// delta, so it is safe to apply during resync — and it is exactly what
|
|
3433
4345
|
// lets a client that reconnected past the ring recover currentModelId /
|
|
@@ -3442,6 +4354,7 @@ function createDaemonSessionViewState(seed = {}) {
|
|
|
3442
4354
|
sessionId: seed.sessionId,
|
|
3443
4355
|
currentModelId: seed.currentModelId,
|
|
3444
4356
|
displayName: seed.displayName,
|
|
4357
|
+
recordingDegraded: seed.recordingDegraded ?? false,
|
|
3445
4358
|
lastSessionUpdate: seed.lastSessionUpdate,
|
|
3446
4359
|
lastModelSwitchFailure: seed.lastModelSwitchFailure,
|
|
3447
4360
|
terminalEvent: seed.terminalEvent,
|
|
@@ -3527,6 +4440,8 @@ function asKnownDaemonEvent(event) {
|
|
|
3527
4440
|
return isSessionClosedData(event.data) ? event : void 0;
|
|
3528
4441
|
case "session_metadata_updated":
|
|
3529
4442
|
return isSessionMetadataUpdatedData(event.data) ? event : void 0;
|
|
4443
|
+
case "session_recording_degraded":
|
|
4444
|
+
return isSessionRecordingDegradedData(event.data) ? event : void 0;
|
|
3530
4445
|
case "artifact_changed":
|
|
3531
4446
|
return isArtifactChangedData(event.data) ? event : void 0;
|
|
3532
4447
|
case MID_TURN_MESSAGE_INJECTED_EVENT:
|
|
@@ -3909,7 +4824,14 @@ function reduceDaemonSessionEvent(state, rawEvent) {
|
|
|
3909
4824
|
...base,
|
|
3910
4825
|
sessionId: event.data.sessionId,
|
|
3911
4826
|
...event.data.currentModelId != null ? { currentModelId: event.data.currentModelId } : {},
|
|
3912
|
-
...event.data.currentApprovalMode != null ? { approvalMode: event.data.currentApprovalMode } : {}
|
|
4827
|
+
...event.data.currentApprovalMode != null ? { approvalMode: event.data.currentApprovalMode } : {},
|
|
4828
|
+
...event.data.recordingDegraded !== void 0 ? { recordingDegraded: event.data.recordingDegraded } : {}
|
|
4829
|
+
};
|
|
4830
|
+
case "session_recording_degraded":
|
|
4831
|
+
return {
|
|
4832
|
+
...base,
|
|
4833
|
+
sessionId: event.data.sessionId,
|
|
4834
|
+
recordingDegraded: true
|
|
3913
4835
|
};
|
|
3914
4836
|
case "session_branched":
|
|
3915
4837
|
return {
|
|
@@ -4153,7 +5075,7 @@ function isStateResyncRequiredData(value) {
|
|
|
4153
5075
|
}
|
|
4154
5076
|
__name(isStateResyncRequiredData, "isStateResyncRequiredData");
|
|
4155
5077
|
function isHistoryTruncatedData(value) {
|
|
4156
|
-
if (!isRecord(value) || value["reason"] !== "replay_window_exceeded" || !isFiniteNumber(value["truncatedEvents"]) || !isFiniteNumber(value["retainedEvents"]) || !isFiniteNumber(value["maxBytes"]) || value["fullTranscriptAvailable"] !==
|
|
5078
|
+
if (!isRecord(value) || value["reason"] !== "replay_window_exceeded" || !isFiniteNumber(value["truncatedEvents"]) || !isFiniteNumber(value["retainedEvents"]) || !isFiniteNumber(value["maxBytes"]) || typeof value["fullTranscriptAvailable"] !== "boolean") {
|
|
4157
5079
|
return false;
|
|
4158
5080
|
}
|
|
4159
5081
|
const truncatedTurns = value["truncatedTurns"];
|
|
@@ -4370,9 +5292,14 @@ function isSessionSnapshotData(value) {
|
|
|
4370
5292
|
if (!isRecord(value) || !isNonEmptyString(value["sessionId"])) return false;
|
|
4371
5293
|
const model = value["currentModelId"];
|
|
4372
5294
|
const mode = value["currentApprovalMode"];
|
|
4373
|
-
|
|
5295
|
+
const recordingDegraded = value["recordingDegraded"];
|
|
5296
|
+
return (model === null || typeof model === "string") && (mode === null || typeof mode === "string") && (recordingDegraded === void 0 || typeof recordingDegraded === "boolean");
|
|
4374
5297
|
}
|
|
4375
5298
|
__name(isSessionSnapshotData, "isSessionSnapshotData");
|
|
5299
|
+
function isSessionRecordingDegradedData(value) {
|
|
5300
|
+
return isRecord(value) && isNonEmptyString(value["sessionId"]) && value["reason"] === "write_failed";
|
|
5301
|
+
}
|
|
5302
|
+
__name(isSessionRecordingDegradedData, "isSessionRecordingDegradedData");
|
|
4376
5303
|
function isPermissionOption(value) {
|
|
4377
5304
|
return isRecord(value) && isNonEmptyString(value["optionId"]);
|
|
4378
5305
|
}
|
|
@@ -4700,6 +5627,7 @@ var MCP_RESTART_REFUSED_REASONS2 = /* @__PURE__ */ new Set([
|
|
|
4700
5627
|
]);
|
|
4701
5628
|
var MALFORMED_MEMORY_CHANGED = "malformed memory_changed payload";
|
|
4702
5629
|
var MAX_DETAILS_LENGTH = 4096;
|
|
5630
|
+
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.";
|
|
4703
5631
|
function normalizeDaemonEvent(event, opts = {}) {
|
|
4704
5632
|
const base = createBase(event, opts);
|
|
4705
5633
|
switch (event.type) {
|
|
@@ -4760,6 +5688,42 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
4760
5688
|
text: `Session closed: ${getString2(event.data, "reason") ?? "closed"}`
|
|
4761
5689
|
}
|
|
4762
5690
|
];
|
|
5691
|
+
case "session_recording_degraded": {
|
|
5692
|
+
const sessionId = getString2(event.data, "sessionId");
|
|
5693
|
+
if (!sessionId || getString2(event.data, "reason") !== "write_failed") {
|
|
5694
|
+
return fallbackDebug(event, base, "malformed recording state");
|
|
5695
|
+
}
|
|
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
|
+
case "session_snapshot": {
|
|
5707
|
+
if (!isRecord2(event.data) || !getString2(event.data, "sessionId")) {
|
|
5708
|
+
return fallbackDebug(event, base, "malformed recording snapshot");
|
|
5709
|
+
}
|
|
5710
|
+
const recordingDegraded = event.data["recordingDegraded"];
|
|
5711
|
+
if (recordingDegraded !== void 0 && typeof recordingDegraded !== "boolean") {
|
|
5712
|
+
return fallbackDebug(event, base, "malformed recording snapshot");
|
|
5713
|
+
}
|
|
5714
|
+
if (recordingDegraded === true) {
|
|
5715
|
+
return [
|
|
5716
|
+
{
|
|
5717
|
+
...base,
|
|
5718
|
+
type: "error",
|
|
5719
|
+
recoverable: true,
|
|
5720
|
+
code: "session_recording_degraded",
|
|
5721
|
+
text: SESSION_RECORDING_DEGRADED_MESSAGE
|
|
5722
|
+
}
|
|
5723
|
+
];
|
|
5724
|
+
}
|
|
5725
|
+
return [];
|
|
5726
|
+
}
|
|
4763
5727
|
case "client_evicted":
|
|
4764
5728
|
return [
|
|
4765
5729
|
{
|
|
@@ -4865,6 +5829,8 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
4865
5829
|
case "approval_mode_changed":
|
|
4866
5830
|
return normalizeApprovalModeChanged(event, base);
|
|
4867
5831
|
// ── Workspace events ──────────────────────────────────────
|
|
5832
|
+
case "git_branch_changed":
|
|
5833
|
+
return [];
|
|
4868
5834
|
case "memory_changed":
|
|
4869
5835
|
return normalizeMemoryChanged(event, base);
|
|
4870
5836
|
case "agent_changed":
|
|
@@ -4891,6 +5857,8 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
4891
5857
|
return normalizeMcpServerRestartRefused(event, base);
|
|
4892
5858
|
case "extensions_changed":
|
|
4893
5859
|
return normalizeExtensionsChanged(event, base);
|
|
5860
|
+
case "artifact_changed":
|
|
5861
|
+
return normalizeArtifactChanged(event, base);
|
|
4894
5862
|
// ── Auth device-flow events (RFC 8628) ─────────────────
|
|
4895
5863
|
case "auth_device_flow_started":
|
|
4896
5864
|
return normalizeAuthDeviceFlowStarted(event, base);
|
|
@@ -4903,16 +5871,20 @@ function normalizeDaemonEvent(event, opts = {}) {
|
|
|
4903
5871
|
case "auth_device_flow_cancelled":
|
|
4904
5872
|
return normalizeAuthDeviceFlowCancelled(event, base);
|
|
4905
5873
|
default:
|
|
4906
|
-
return
|
|
4907
|
-
{
|
|
4908
|
-
...base,
|
|
4909
|
-
type: "debug",
|
|
4910
|
-
text: `${event.type} (unrecognized daemon event): ${stringifyRedactedJson(event.data)}`
|
|
4911
|
-
}
|
|
4912
|
-
];
|
|
5874
|
+
return normalizeUnrecognizedEvent(event, base);
|
|
4913
5875
|
}
|
|
4914
5876
|
}
|
|
4915
5877
|
__name(normalizeDaemonEvent, "normalizeDaemonEvent");
|
|
5878
|
+
function normalizeUnrecognizedEvent(event, base) {
|
|
5879
|
+
return [
|
|
5880
|
+
{
|
|
5881
|
+
...base,
|
|
5882
|
+
type: "debug",
|
|
5883
|
+
text: `${event.type} (unrecognized daemon event): ${stringifyRedactedJson(event.data)}`
|
|
5884
|
+
}
|
|
5885
|
+
];
|
|
5886
|
+
}
|
|
5887
|
+
__name(normalizeUnrecognizedEvent, "normalizeUnrecognizedEvent");
|
|
4916
5888
|
function normalizeStateResyncRequired(event, base) {
|
|
4917
5889
|
const reason = getString2(event.data, "reason");
|
|
4918
5890
|
const lastDeliveredId = numberField(event.data, "lastDeliveredId");
|
|
@@ -4940,7 +5912,7 @@ function normalizeHistoryTruncated(event, base) {
|
|
|
4940
5912
|
const truncatedEvents = numberField(event.data, "truncatedEvents");
|
|
4941
5913
|
const retainedEvents = numberField(event.data, "retainedEvents");
|
|
4942
5914
|
const maxBytes = numberField(event.data, "maxBytes");
|
|
4943
|
-
if (reason !== "replay_window_exceeded" || truncatedEvents === void 0 || retainedEvents === void 0 || maxBytes === void 0 || isRecord2(event.data)
|
|
5915
|
+
if (reason !== "replay_window_exceeded" || truncatedEvents === void 0 || retainedEvents === void 0 || maxBytes === void 0 || !isRecord2(event.data) || typeof event.data["fullTranscriptAvailable"] !== "boolean") {
|
|
4944
5916
|
return fallbackDebug(event, base, "malformed history_truncated payload");
|
|
4945
5917
|
}
|
|
4946
5918
|
return [
|
|
@@ -5166,8 +6138,13 @@ function normalizeSessionUpdate(event, base, opts) {
|
|
|
5166
6138
|
];
|
|
5167
6139
|
}
|
|
5168
6140
|
case "tool_call":
|
|
5169
|
-
case "tool_call_update":
|
|
6141
|
+
case "tool_call_update": {
|
|
6142
|
+
const meta = isRecord2(update["_meta"]) ? update["_meta"] : void 0;
|
|
6143
|
+
if (getString2(update, "status") === "in_progress" && getString2(update, "kind") === void 0 && meta?.["shellProgress"] !== void 0) {
|
|
6144
|
+
return [];
|
|
6145
|
+
}
|
|
5170
6146
|
return [normalizeToolUpdate(update, base)];
|
|
6147
|
+
}
|
|
5171
6148
|
case "shell_output":
|
|
5172
6149
|
case "tool_output": {
|
|
5173
6150
|
const text = getOutputText(update);
|
|
@@ -5488,6 +6465,27 @@ function normalizeSessionMetadataUpdated(event, base) {
|
|
|
5488
6465
|
];
|
|
5489
6466
|
}
|
|
5490
6467
|
__name(normalizeSessionMetadataUpdated, "normalizeSessionMetadataUpdated");
|
|
6468
|
+
function normalizeArtifactChanged(event, base) {
|
|
6469
|
+
const sessionId = getString2(event.data, "sessionId");
|
|
6470
|
+
const change = isRecord2(event.data) ? event.data["change"] : void 0;
|
|
6471
|
+
if (!sessionId || !isRecord2(change)) {
|
|
6472
|
+
return fallbackDebug(event, base, "malformed artifact_changed payload");
|
|
6473
|
+
}
|
|
6474
|
+
const action = getString2(change, "action");
|
|
6475
|
+
const artifactId = getString2(change, "artifactId");
|
|
6476
|
+
if (!action || !artifactId) {
|
|
6477
|
+
return fallbackDebug(event, base, "missing action or artifactId");
|
|
6478
|
+
}
|
|
6479
|
+
return [
|
|
6480
|
+
{
|
|
6481
|
+
...base,
|
|
6482
|
+
type: "session.artifact.changed",
|
|
6483
|
+
sessionId,
|
|
6484
|
+
change
|
|
6485
|
+
}
|
|
6486
|
+
];
|
|
6487
|
+
}
|
|
6488
|
+
__name(normalizeArtifactChanged, "normalizeArtifactChanged");
|
|
5491
6489
|
function normalizeApprovalModeChanged(event, base) {
|
|
5492
6490
|
const sessionId = getString2(event.data, "sessionId");
|
|
5493
6491
|
const previous = getString2(event.data, "previous");
|
|
@@ -6348,7 +7346,14 @@ var RESYNC_PASSTHROUGH_TYPES2 = /* @__PURE__ */ new Set([
|
|
|
6348
7346
|
function appendLocalUserTranscriptMessage(state, text, opts = {}) {
|
|
6349
7347
|
const next = cloneTranscriptState(state, opts);
|
|
6350
7348
|
finishAssistant(next);
|
|
6351
|
-
const block = createTextBlock(
|
|
7349
|
+
const block = createTextBlock(
|
|
7350
|
+
next,
|
|
7351
|
+
"user",
|
|
7352
|
+
text,
|
|
7353
|
+
void 0,
|
|
7354
|
+
void 0,
|
|
7355
|
+
opts.meta
|
|
7356
|
+
);
|
|
6352
7357
|
if (opts.images && opts.images.length > 0) {
|
|
6353
7358
|
block.images = [...opts.images];
|
|
6354
7359
|
}
|
|
@@ -6487,6 +7492,7 @@ function applyDaemonTranscriptEvent(next, event) {
|
|
|
6487
7492
|
next.approvalMode = event.next;
|
|
6488
7493
|
break;
|
|
6489
7494
|
case "session.metadata.changed":
|
|
7495
|
+
case "session.artifact.changed":
|
|
6490
7496
|
case "session.available_commands":
|
|
6491
7497
|
break;
|
|
6492
7498
|
case "session.state_resync_required":
|
|
@@ -7441,8 +8447,8 @@ function createDaemonTranscriptStore(seed = {}) {
|
|
|
7441
8447
|
state = reduceDaemonTranscriptEvents(state, events);
|
|
7442
8448
|
scheduleNotify();
|
|
7443
8449
|
},
|
|
7444
|
-
appendLocalUserMessage(text, images) {
|
|
7445
|
-
state = appendLocalUserTranscriptMessage(state, text, { images });
|
|
8450
|
+
appendLocalUserMessage(text, images, meta) {
|
|
8451
|
+
state = appendLocalUserTranscriptMessage(state, text, { images, meta });
|
|
7446
8452
|
scheduleNotify();
|
|
7447
8453
|
},
|
|
7448
8454
|
reset(nextSeed = {}) {
|
|
@@ -7587,6 +8593,12 @@ function daemonUiEventToTerminalText(event) {
|
|
|
7587
8593
|
`metadata: ${event.displayName ?? "(no display name)"}`,
|
|
7588
8594
|
"36"
|
|
7589
8595
|
);
|
|
8596
|
+
case "session.artifact.changed":
|
|
8597
|
+
return terminalLine(
|
|
8598
|
+
"artifact",
|
|
8599
|
+
`${event.change.action} ${event.change.artifact?.title ?? event.change.artifactId}`,
|
|
8600
|
+
"36"
|
|
8601
|
+
);
|
|
7590
8602
|
case "session.approval_mode.changed":
|
|
7591
8603
|
return terminalLine(
|
|
7592
8604
|
"approval-mode",
|
|
@@ -8691,6 +9703,7 @@ export {
|
|
|
8691
9703
|
PENDING_PROMPT_COMPLETED_EVENT,
|
|
8692
9704
|
PENDING_PROMPT_STARTED_EVENT,
|
|
8693
9705
|
SseFramingError,
|
|
9706
|
+
WorkspaceDaemonClient,
|
|
8694
9707
|
appendLocalUserTranscriptMessage,
|
|
8695
9708
|
asKnownDaemonEvent,
|
|
8696
9709
|
createDaemonAuthState,
|