@qwen-code/qwen-code 0.21.13 → 0.21.14-nightly.20260821.9f2342d323
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +13 -7
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
- package/bundled/qc-helper/docs/features/code-review.md +24 -2
- package/bundled/qc-helper/docs/features/commands.md +120 -8
- package/bundled/qc-helper/docs/features/sub-agents.md +2 -2
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +21 -4
- package/bundled/review/SKILL.md +111 -61
- package/chunks/{MaxSizedBox-UQALOVVT.js → MaxSizedBox-RMLYJGA7.js} +46 -45
- package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-TP2BMINQ.js} +67 -66
- package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-DDVSJKJK.js} +2 -2
- package/chunks/{acpAgent-XPES32S7.js → acpAgent-URLACEQ5.js} +1032 -216
- package/chunks/{agent-DPTOZFEM.js → agent-4Y422A4P.js} +42 -41
- package/chunks/agent-headless-JWTMXLQV.js +88 -0
- package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-CU3G53RX.js} +9 -9
- package/chunks/{artifact-tool-GEXTOPVO.js → artifact-tool-LIUSI4XK.js} +3 -3
- package/chunks/{askUserQuestion-B33XRSB7.js → askUserQuestion-454X3UIV.js} +3 -3
- package/chunks/{bridge-YNQBAA4Z.js → bridge-456ODTCP.js} +48 -46
- package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
- package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-KHPAWCX7.js} +1 -1
- package/chunks/{channel-settings-store-WNWYFHG7.js → channel-settings-store-FRSCHVO2.js} +50 -49
- package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-IN2UPYHP.js} +6 -5
- package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-4CQPHVD4.js} +6 -5
- package/chunks/{channel-worker-supervisor-OEVWBHGT.js → channel-worker-supervisor-CPPSL7ZH.js} +4 -3
- package/chunks/{chunk-3EZLLVDF.js → chunk-263JC66E.js} +3 -3
- package/chunks/{chunk-TIGA2IVL.js → chunk-2GM44E7D.js} +10 -298
- package/chunks/{chunk-PQ36L4F5.js → chunk-2UNEPJQK.js} +1 -1
- package/chunks/{chunk-X26JYGTD.js → chunk-2VH3QVLW.js} +1 -1
- package/chunks/{chunk-YEYY7TEP.js → chunk-2ZNQRS2Q.js} +7 -7
- package/chunks/{chunk-WGHHA7ZH.js → chunk-3C55EUJX.js} +1 -1
- package/chunks/{chunk-25EYDK42.js → chunk-3EQHT3IC.js} +2 -2
- package/chunks/{chunk-BHILXOC3.js → chunk-435GZDTF.js} +3 -3
- package/chunks/{chunk-GMIEIY3Y.js → chunk-47VTGCYK.js} +3 -3
- package/chunks/{chunk-MA2HEDVP.js → chunk-4CKU5K2R.js} +1 -1
- package/chunks/{chunk-EZ5RP345.js → chunk-4FP3IZQD.js} +41 -10
- package/chunks/{chunk-IWPYVAO2.js → chunk-4HUYO5AU.js} +3 -3
- package/chunks/{chunk-4PKCUT7F.js → chunk-4JORWK55.js} +7 -7
- package/chunks/{chunk-MIPFDQAF.js → chunk-4W4BROUS.js} +1 -1
- package/chunks/{chunk-A4MFR4C5.js → chunk-55P2ESI6.js} +3 -5
- package/chunks/{chunk-CHHABXPE.js → chunk-5AAW6E3C.js} +1 -1
- package/chunks/{chunk-KD5BOPLP.js → chunk-5I2U4PDY.js} +107 -13
- package/chunks/{chunk-NWNEANAT.js → chunk-5M7YKTYX.js} +6 -6
- package/chunks/{chunk-M732YJPW.js → chunk-5MA4E4EG.js} +3 -3
- package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
- package/chunks/{chunk-JUEPY766.js → chunk-5QYE546S.js} +3 -3
- package/chunks/{chunk-6ORZ2EDC.js → chunk-5YD2D6G6.js} +3 -3
- package/chunks/{chunk-ZYBBISBY.js → chunk-66A2RG5S.js} +21 -18
- package/chunks/{chunk-5EYKMUUY.js → chunk-6JLZBBCY.js} +1 -1
- package/chunks/{chunk-CPHEPGAO.js → chunk-722JBVVW.js} +1 -1
- package/chunks/{chunk-JNDY2MDR.js → chunk-72AVWAUA.js} +1 -1
- package/chunks/{chunk-JOOFMXGF.js → chunk-7EYDW732.js} +6 -6
- package/chunks/chunk-7NLDU6J2.js +367 -0
- package/chunks/{chunk-OVZPVYZB.js → chunk-7S22SX2L.js} +96 -18
- package/chunks/{chunk-XUJNK7Y6.js → chunk-7WVB4FMG.js} +1 -1
- package/chunks/{chunk-CKSJECTU.js → chunk-A7NBZBGQ.js} +9 -5
- package/chunks/{chunk-QNQAPSN2.js → chunk-AQFWV4YF.js} +4 -1
- package/chunks/{chunk-P7MPQI75.js → chunk-B5LEKTE7.js} +2 -2
- package/chunks/{chunk-4S5337WV.js → chunk-BB3FKSIJ.js} +6230 -3113
- package/chunks/{chunk-GGDBMYGZ.js → chunk-CU34U3PZ.js} +5 -5
- package/chunks/{chunk-A267JX7H.js → chunk-CWFIQLCV.js} +7 -7
- package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
- package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
- package/chunks/{chunk-DXIBNLBZ.js → chunk-EB27VF5Z.js} +2 -2
- package/chunks/{chunk-XHRY7BXD.js → chunk-ELA3DNCT.js} +4 -4
- package/chunks/{chunk-PP4FUZNV.js → chunk-EOFGNAK3.js} +2 -2
- package/chunks/{chunk-ZZO74WKW.js → chunk-ET5FGCN3.js} +115 -28
- package/chunks/{chunk-RVOJ2FBP.js → chunk-EXY6APEA.js} +1540 -10597
- package/chunks/{chunk-NM5V5OVW.js → chunk-F47TIWWH.js} +3 -3
- package/chunks/{chunk-DGZEMW5R.js → chunk-F5JZDC4O.js} +3 -3
- package/chunks/{chunk-6QFDQMQX.js → chunk-F7ZK5VMA.js} +1 -1
- package/chunks/{chunk-2B2BF7P7.js → chunk-FAIJ5UIU.js} +3 -3
- package/chunks/{chunk-QRCNA3SR.js → chunk-FQRYG6XX.js} +50 -70
- package/chunks/{chunk-AXN7UPYQ.js → chunk-FQZBD3PY.js} +2 -2
- package/chunks/{chunk-XIT3GURH.js → chunk-FSYI56UV.js} +3 -3
- package/chunks/{chunk-UKMR3CKV.js → chunk-FU7KPUCT.js} +22 -7
- package/chunks/{chunk-BZ263IKX.js → chunk-G32ESUUC.js} +1 -1
- package/chunks/{chunk-Y3YCSWG5.js → chunk-G64PEZZ5.js} +2 -2
- package/chunks/{chunk-NEFOOD54.js → chunk-GL5X57U7.js} +3 -3
- package/chunks/{chunk-QUGAUQGJ.js → chunk-GX2THELY.js} +1 -0
- package/chunks/{chunk-FAAUPSY2.js → chunk-HEMFCAHG.js} +1 -1
- package/chunks/{chunk-AZQ3DT76.js → chunk-HGGMEDDY.js} +2 -2
- package/chunks/{chunk-BKPPWD33.js → chunk-HHHXD5XY.js} +22 -2
- package/chunks/{chunk-SG7ZP5PG.js → chunk-HHNSO2Y4.js} +4 -4
- package/chunks/{chunk-6YKYPVDV.js → chunk-HLW3JCZR.js} +4 -4
- package/chunks/{chunk-O4D7SPJN.js → chunk-HYLQQAQB.js} +3 -3
- package/chunks/{chunk-MRMJCLIY.js → chunk-I5DOIT4L.js} +3 -3
- package/chunks/{chunk-TUGSVUJB.js → chunk-IN55HSUI.js} +6 -6
- package/chunks/{chunk-N5YPT6PH.js → chunk-IUBZQVZW.js} +20 -8
- package/chunks/{chunk-OY5RNSV4.js → chunk-IVELVL56.js} +3 -3
- package/chunks/{chunk-LJQAUZMR.js → chunk-IVFPNU4O.js} +1338 -115
- package/chunks/{chunk-WFSTRPRO.js → chunk-J2LZ5OCH.js} +3 -3
- package/chunks/{chunk-OMLJNPBE.js → chunk-JBSW7JA6.js} +84 -4
- package/chunks/{chunk-NTTBXH7U.js → chunk-JS73NNWF.js} +8 -0
- package/chunks/{chunk-2M55OBEB.js → chunk-JV443R5X.js} +1 -1
- package/chunks/{chunk-V57QC6WW.js → chunk-KCUGOZPL.js} +7 -5
- package/chunks/{chunk-GO7STP6N.js → chunk-KK2S7MIH.js} +4 -4
- package/chunks/{chunk-IGGGG5CX.js → chunk-KW2JLCIF.js} +14868 -9301
- package/chunks/{chunk-KV27IEHM.js → chunk-L5JHSPET.js} +1 -1
- package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
- package/chunks/{chunk-RIAABG2K.js → chunk-LGA4VING.js} +2 -2
- package/chunks/chunk-LJZSMWOH.js +18 -0
- package/chunks/{chunk-7UXUJ5T3.js → chunk-LMQWI7GK.js} +1 -1
- package/chunks/{chunk-IA2K2HJE.js → chunk-M53UJS6H.js} +2 -2
- package/chunks/{chunk-KBXKR5R2.js → chunk-M5AIO24H.js} +1 -1
- package/chunks/{chunk-ROIYNTHJ.js → chunk-MD7XDTW7.js} +3 -3
- package/chunks/chunk-MGEWDLRO.js +9169 -0
- package/chunks/{chunk-V26NVGAU.js → chunk-MMUAUHOT.js} +8 -3
- package/chunks/{chunk-NNHNLJ2X.js → chunk-NCLV2VQ2.js} +291 -57
- package/chunks/{chunk-AW4TRXOC.js → chunk-NCNEK4XO.js} +1 -1
- package/chunks/{chunk-YP5KH5Y7.js → chunk-ND7NOI4P.js} +1 -1
- package/chunks/{chunk-4W5U2TUT.js → chunk-NGY7B7VF.js} +1 -1
- package/chunks/chunk-NPKNGJVM.js +367 -0
- package/chunks/{chunk-O565M6A4.js → chunk-NYN4RD3K.js} +260 -16
- package/chunks/{chunk-OXCMMLED.js → chunk-O327G3QW.js} +3 -3
- package/chunks/chunk-O75QDGQF.js +757 -0
- package/chunks/{chunk-6HY6IF3Z.js → chunk-OUYRA764.js} +1 -1
- package/chunks/{chunk-QF2NHSPB.js → chunk-PGXIK6O7.js} +252 -203
- package/chunks/{chunk-H4A72DE5.js → chunk-PTMVPFCZ.js} +1 -1
- package/chunks/{chunk-QFJ5JHQR.js → chunk-PXOIRYE5.js} +1 -1
- package/chunks/{chunk-AFSG32D5.js → chunk-Q3ERPVRE.js} +1 -1
- package/chunks/{chunk-CU6GJD55.js → chunk-Q6BRKUVQ.js} +1 -1
- package/chunks/{chunk-FDGGZIYW.js → chunk-Q6ETBOWF.js} +3 -3
- package/chunks/{chunk-3U3VAL47.js → chunk-QIKHRDDI.js} +1 -1
- package/chunks/chunk-QJCELOZU.js +3969 -0
- package/chunks/{chunk-S5DWMTHO.js → chunk-QQUVPMMZ.js} +2 -0
- package/chunks/{chunk-AS5IN4GK.js → chunk-R7M2DT6C.js} +5 -5
- package/chunks/{chunk-E23IPNGS.js → chunk-RURBZWWE.js} +13 -4
- package/chunks/{chunk-QV5YN5YD.js → chunk-RWVKE7TY.js} +5 -5
- package/chunks/{chunk-EL5SXY3T.js → chunk-RZ4PE3ER.js} +512 -24
- package/chunks/{chunk-76J3IJ3M.js → chunk-S5UTXHQ2.js} +8 -8
- package/chunks/{chunk-DGK6P3BQ.js → chunk-SBTARO34.js} +12 -12
- package/chunks/{chunk-ZYYTZUI2.js → chunk-SWBBY37C.js} +3 -3
- package/chunks/{chunk-YZHRN3CF.js → chunk-SWOKDPS5.js} +2 -2
- package/chunks/{chunk-WSH6GRKG.js → chunk-T2LUUKRI.js} +3 -3
- package/chunks/{chunk-U3VNBPUO.js → chunk-T5FEH4Y6.js} +3 -3
- package/chunks/{chunk-5CVO7YES.js → chunk-U4GL4WDY.js} +1 -1
- package/chunks/{chunk-CZBYX5MY.js → chunk-U53XZHAE.js} +1 -1
- package/chunks/{chunk-HIBNSEJE.js → chunk-UDG5EZJI.js} +0 -2
- package/chunks/{chunk-HUTNYWBG.js → chunk-US5URWKX.js} +19 -11
- package/chunks/{chunk-NHDR76JX.js → chunk-V4UBYT3Y.js} +1 -1
- package/chunks/{chunk-BVJS5BSP.js → chunk-V4WAOF4Q.js} +1 -1
- package/chunks/{chunk-QIH2HAEN.js → chunk-VCC5DHYW.js} +1 -1
- package/chunks/{chunk-PT4I7NBA.js → chunk-VX7TFATF.js} +1 -1
- package/chunks/{chunk-AA2BEKV3.js → chunk-W4MLKRZD.js} +3 -3
- package/chunks/{chunk-UZPM4XHR.js → chunk-W6WLZPTS.js} +29 -8
- package/chunks/{chunk-A4QRWUDE.js → chunk-WAPL2PHU.js} +2 -2
- package/chunks/{chunk-MC4TLKEI.js → chunk-WT3Z5SL7.js} +3 -3
- package/chunks/{chunk-OD2WU5QY.js → chunk-WXFFCRKG.js} +1 -1
- package/chunks/chunk-WZAD4ZNJ.js +59 -0
- package/chunks/{chunk-E3DYKPYZ.js → chunk-X7EQHW5L.js} +3 -3
- package/chunks/{chunk-BUQDLC2G.js → chunk-XFRYCCVC.js} +3 -3
- package/chunks/{chunk-OOQUVWIG.js → chunk-XH6WJMTT.js} +4 -4
- package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
- package/chunks/{chunk-SXCOEJO4.js → chunk-YLFFVY3G.js} +1 -1
- package/chunks/{chunk-YZOSNW4R.js → chunk-YO7PNVBJ.js} +1 -1
- package/chunks/{chunk-MLPXSYXR.js → chunk-ZTZYFBDJ.js} +57 -23
- package/chunks/{chunk-RWDNJBWN.js → chunk-ZUISK67X.js} +2 -2
- package/chunks/{chunk-XLLKYULU.js → chunk-ZWWU6KNS.js} +2 -2
- package/chunks/{computer-use-77C5FHMW.js → computer-use-OVDA2R3V.js} +42 -41
- package/chunks/{config-utils-IVHRSXWI.js → config-utils-XJTGZVY3.js} +2 -2
- package/chunks/{contextCommand-PJ77GBWL.js → contextCommand-BSQVCK23.js} +44 -43
- package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-Y7LAUJAL.js} +47 -45
- package/chunks/{create-sub-session-KRQULJE6.js → create-sub-session-TCKWBXEM.js} +6 -4
- package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-X6I4CJEB.js} +46 -44
- package/chunks/{cron-create-H7UEPDSN.js → cron-create-PUCRMWQ6.js} +5 -5
- package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-EOQR5CXU.js} +5 -5
- package/chunks/{cron-list-H25JIHEZ.js → cron-list-7O22SQBF.js} +5 -5
- package/chunks/{daemon-2KTG7ZBN.js → daemon-JE2UIWSY.js} +605 -126
- package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-7N3WA5AD.js} +44 -43
- package/chunks/daemon-status-provider-3EKY2CPY.js +104 -0
- package/chunks/daemon-trust-policy-MPGOOA4D.js +100 -0
- package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-XOYVXZZF.js} +49 -48
- package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
- package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-ZIC63QJI.js} +42 -41
- package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
- package/chunks/{display-image-ON3EYFRD.js → display-image-6FCICTXS.js} +5 -5
- package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
- package/chunks/{dist-IYYN3RUT.js → dist-IELOWDOT.js} +81 -17
- package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-6PKRH7MU.js} +43 -42
- package/chunks/{edit-I4LQFAEC.js → edit-5DDFP3AH.js} +46 -44
- package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
- package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-HFAXRXK3.js} +42 -41
- package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-BVNIJL57.js} +42 -41
- package/chunks/{environment-S7CTIHMX.js → environment-OHFZYW6D.js} +45 -44
- package/chunks/{errors-7HB2AIDS.js → errors-4TJAIIT4.js} +44 -43
- package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-FAAYNE2Y.js} +42 -41
- package/chunks/exitPlanMode-63V5CETU.js +86 -0
- package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-FH4SUXTG.js} +3 -3
- package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
- package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
- package/chunks/{gemini-RSUFP5OE.js → gemini-C5HA6K5L.js} +87 -85
- package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-WVTSKFNG.js} +7 -7
- package/chunks/{getMachineId-bsd-FG7IUY6U.js → getMachineId-bsd-LSY4WMOF.js} +1 -1
- package/chunks/{getMachineId-darwin-GLCJI2RA.js → getMachineId-darwin-JOFR4UIT.js} +1 -1
- package/chunks/{getMachineId-linux-O6OPPAKO.js → getMachineId-linux-QEDBS6GI.js} +1 -1
- package/chunks/{getMachineId-unsupported-S6CKYVGC.js → getMachineId-unsupported-IPZ3YRKP.js} +1 -1
- package/chunks/{getMachineId-win-X5SRNEH7.js → getMachineId-win-TJ2OZ7AA.js} +1 -1
- package/chunks/{glob-J4RUJAHX.js → glob-AISOKCVH.js} +42 -41
- package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-YIADM4RZ.js} +5 -5
- package/chunks/{grep-VJWPLFOT.js → grep-SQ5LKL2Z.js} +42 -41
- package/chunks/handleAutoUpdate-5VI7HJSD.js +97 -0
- package/chunks/{i18n-RM5YOICI.js → i18n-US3PUOEU.js} +43 -42
- package/chunks/{image-gen-EXECB5XM.js → image-gen-NIHZWV2E.js} +11 -11
- package/chunks/initializer-IUINTP3J.js +101 -0
- package/chunks/installationInfo-YYG4O7ZW.js +95 -0
- package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
- package/chunks/{keychain-token-storage-3XFJ5ZB2.js → keychain-token-storage-7SL4ZWQQ.js} +3 -3
- package/chunks/list-5F2IF6XW.js +104 -0
- package/chunks/{list-agents-OSVDFI6S.js → list-agents-XO4EONWC.js} +6 -6
- package/chunks/loadedSettingsAdapter-Q4EUE7G3.js +98 -0
- package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-J3ZLTYWK.js} +24 -22
- package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-HWSTFUTQ.js} +6 -6
- package/chunks/{ls-D3HUFHDP.js → ls-52HUW4B6.js} +5 -5
- package/chunks/{lsp-3QDDJTCS.js → lsp-VJESYEC6.js} +3 -3
- package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-VL65AY3F.js} +43 -42
- package/chunks/mcp-XNHCJ46S.js +98 -0
- package/chunks/{monitor-EE2UYMGE.js → monitor-ZPBRRMEZ.js} +42 -41
- package/chunks/nonInteractiveCli-JMQPKOGW.js +166 -0
- package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-XGJSZF4B.js} +46 -44
- package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-I3E4ROO3.js} +27 -27
- package/chunks/{pidfile-4XSFLYBZ.js → pidfile-XEAQP2SF.js} +43 -42
- package/chunks/{processUtils-WDA2MJFD.js → processUtils-VDWCC2EG.js} +2 -2
- package/chunks/prompt-terminal-ledger-65IC2FMD.js +93 -0
- package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
- package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-KOOZMLSO.js} +47 -46
- package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-U4YR6336.js} +10 -10
- package/chunks/read-file-OKXMPF26.js +33 -0
- package/chunks/{read-mcp-resource-XD54ZQMC.js → read-mcp-resource-6VFF47Z3.js} +3 -3
- package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-TJTN2GBV.js} +6 -4
- package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-KZ4WMN4X.js} +48 -47
- package/chunks/ripGrep-WNJNHFT2.js +86 -0
- package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
- package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-OEJXD7MP.js} +518 -165
- package/chunks/{runtime-5MLLZ7DC.js → runtime-GT6OSKRA.js} +52 -51
- package/chunks/{scheduler-RPBJ63CH.js → scheduler-RU43AF2U.js} +44 -43
- package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-P3LA24AV.js} +3 -3
- package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-K3LH2SD7.js} +9 -11
- package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-WCUNMLVX.js} +11 -6
- package/chunks/{send-message-VZENRWRH.js → send-message-NUK5DTTI.js} +8 -8
- package/chunks/{serve-HS3XLPXU.js → serve-MDBHMCPP.js} +49 -50
- package/chunks/{server-TC4A7AAZ.js → server-G74J2RX7.js} +2158 -335
- package/chunks/{session-UBOFXVMN.js → session-SL5MCQXT.js} +86 -83
- package/chunks/{settings-D5644OM5.js → settings-XOM7I3VJ.js} +48 -47
- package/chunks/{shell-3PZULQQV.js → shell-HPMWXBSK.js} +42 -41
- package/chunks/{skill-PEVVXQ3L.js → skill-VLNJXFWG.js} +20 -18
- package/chunks/{skill-settings-J65JKKES.js → skill-settings-6AALKNDB.js} +48 -47
- package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-3EGRCUFM.js} +44 -43
- package/chunks/{standalone-update-IFM53PE7.js → standalone-update-CFQXGTAC.js} +44 -43
- package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-4G2FCU2Q.js} +505 -280
- package/chunks/{syntheticOutput-7GWFIDXT.js → syntheticOutput-GZV6O6UL.js} +4 -4
- package/chunks/{task-create-FCBDX7UH.js → task-create-BXGKNND4.js} +11 -11
- package/chunks/{task-list-YIYIUFUA.js → task-list-4ZMIDYGD.js} +21 -7
- package/chunks/{task-stop-X37KYTKB.js → task-stop-WBO7LWTS.js} +3 -3
- package/chunks/{task-update-MYPFVOVM.js → task-update-UFO3BI7O.js} +86 -15
- package/chunks/{team-create-ZAIA7KAV.js → team-create-MOKIG2MP.js} +43 -43
- package/chunks/{team-delete-6UMU4XLS.js → team-delete-OCFJS444.js} +6 -6
- package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-4VRYT5LD.js} +42 -41
- package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-76H4ZJ2P.js} +44 -43
- package/chunks/theme-manager-6NNEHUB3.js +90 -0
- package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-BGM5MCPY.js} +5 -5
- package/chunks/{tool-search-5R2OE4C7.js → tool-search-P4OCQE32.js} +19 -18
- package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-ERM7PSP6.js} +48 -46
- package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-OI4N7ID3.js} +43 -42
- package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-GUNL6WGZ.js} +5 -5
- package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-36M7ZFF4.js} +45 -44
- package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-XFGTC3AU.js} +51 -50
- package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-AMH6WBES.js} +82 -79
- package/chunks/{version-G5A5DGVS.js → version-I73SDBBX.js} +1 -1
- package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-AD55GOQZ.js} +21 -19
- package/chunks/{web-search-5OXHEZPV.js → web-search-QZNRURMF.js} +10 -10
- package/chunks/{workflow-ISQJHPG2.js → workflow-7A5HLL35.js} +350 -89
- package/chunks/workspace-providers-status-VHLOCDXW.js +101 -0
- package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-SI5QHRR7.js} +1 -1
- package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-FLDTE2KR.js} +48 -46
- package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-SRGB3V7K.js} +54 -53
- package/chunks/workspace-skills-status-7EQR65DS.js +101 -0
- package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-7IK4VZDK.js} +55 -53
- package/chunks/{write-file-EWXKVVXF.js → write-file-XAXPGL5M.js} +42 -41
- package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
- package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
- package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-GTNDGFB6.js} +20 -18
- package/cli.js +13 -13
- package/locales/ca.js +13 -0
- package/locales/de.js +12 -0
- package/locales/en.js +11 -0
- package/locales/fr.js +13 -0
- package/locales/ja.js +13 -0
- package/locales/pt.js +12 -0
- package/locales/ru.js +12 -0
- package/locales/zh-TW.js +11 -0
- package/locales/zh.js +11 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CgOpDKvm.js → arc-CN-xeqBM.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-XQJ6hBnv.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-n35AKogw.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-DXeDVokb.js} +1 -1
- package/web-shell/assets/channel-BdTBh3qf.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-BYcmYjz_.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-w3UyeGtt.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-Td3JbOH_.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-gC_NR7u6.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-aD7bI3c3.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-sHMhD16X.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-DiV49BLl.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-Dnoagqin.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-qVxLMMuK.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-qVxLMMuK.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-K6l_zsrZ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-Chh9hQ0a.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-Clrbd8SB.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-BkNExywD.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-kTX14ngI.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-Ba1QOCJy.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-CtH5BVYm.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-DCxSIC83.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-C4rNAypQ.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-s3P5tBwL.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-C7Eg-1ok.js} +1 -1
- package/web-shell/assets/index-BXoIYIJg.css +5 -0
- package/web-shell/assets/{index-d0yfnV1M.js → index-CszoC8cN.js} +1 -1
- package/web-shell/assets/index-Dxj7Naa0.js +1788 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-BDKsgMt6.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CkcSHbvL.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-CDWt-t81.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-FI2owcEa.js} +1 -1
- package/web-shell/assets/{linear-DQmzxpxd.js → linear-BQzLqkJi.js} +1 -1
- package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-CvV91DP1.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-Dx2kLUpN.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-CMXOmBrj.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-Bziww7Co.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-DMOXAxzp.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-B3y1cfVV.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-ChrV1jiM.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-CWuLzLFE.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DEDPMLgq.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-Cl6am_to.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-OuocxGAu.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-DLYdvSJW.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-7a3DreXX.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-CgfjUxW_.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/agent-headless-GJCQMURW.js +0 -87
- package/chunks/chunk-K5IDV3PC.js +0 -519
- package/chunks/chunk-MPHPFVKK.js +0 -48
- package/chunks/chunk-RLKC46YT.js +0 -3582
- package/chunks/chunk-UPDOZBWO.js +0 -358
- package/chunks/daemon-status-provider-ZDOYJCU6.js +0 -102
- package/chunks/daemon-trust-policy-E67OYUK2.js +0 -99
- package/chunks/exitPlanMode-R4JY7V2O.js +0 -85
- package/chunks/handleAutoUpdate-POCX2MNB.js +0 -94
- package/chunks/initializer-Z2AFGBNR.js +0 -100
- package/chunks/installationInfo-4I5FXNMH.js +0 -92
- package/chunks/list-ZMBFIGZA.js +0 -103
- package/chunks/loadedSettingsAdapter-T6TV4YJ7.js +0 -97
- package/chunks/mcp-6UNYX4HG.js +0 -97
- package/chunks/nonInteractiveCli-WAY237O4.js +0 -163
- package/chunks/read-file-TAFBKMNI.js +0 -32
- package/chunks/ripGrep-WOEK2PXS.js +0 -85
- package/chunks/theme-manager-Z3RIT7DB.js +0 -89
- package/chunks/workspace-providers-status-2ZPZPUPZ.js +0 -100
- package/chunks/workspace-skills-status-RS4O7AIJ.js +0 -100
- package/web-shell/assets/channel-BrGVBa2L.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
- package/web-shell/assets/index-CIDsgxTe.js +0 -1792
- package/web-shell/assets/index-DiQnWi_E.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
|
@@ -1418,6 +1418,18 @@ var DaemonClient = class {
|
|
|
1418
1418
|
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
1419
1419
|
);
|
|
1420
1420
|
}
|
|
1421
|
+
async setExtensionDefaultActivations(extensionNames, state, clientId) {
|
|
1422
|
+
return await this.jsonRequest(
|
|
1423
|
+
"/extensions/activation",
|
|
1424
|
+
"PUT /extensions/activation",
|
|
1425
|
+
{
|
|
1426
|
+
method: "PUT",
|
|
1427
|
+
body: { extensionNames: [...extensionNames], state },
|
|
1428
|
+
clientId,
|
|
1429
|
+
mode: "rest"
|
|
1430
|
+
}
|
|
1431
|
+
);
|
|
1432
|
+
}
|
|
1421
1433
|
async extensionOperation(operationId, signal) {
|
|
1422
1434
|
return await this.jsonRequest(
|
|
1423
1435
|
`/extensions/operations/${urlEncode(operationId)}`,
|
|
@@ -2198,6 +2210,22 @@ var DaemonClient = class {
|
|
|
2198
2210
|
"GET /workspace/sessions"
|
|
2199
2211
|
);
|
|
2200
2212
|
}
|
|
2213
|
+
/**
|
|
2214
|
+
* Read the memory-only live-state snapshot for a workspace via
|
|
2215
|
+
* `GET /workspaces/:workspace/sessions/live-state`: the complete set of
|
|
2216
|
+
* live sessions with volatile state plus the in-memory catalog version
|
|
2217
|
+
* equality token. Always uses native REST transport (never the pluggable
|
|
2218
|
+
* ACP transport).
|
|
2219
|
+
*
|
|
2220
|
+
* This method deliberately does not pre-flight
|
|
2221
|
+
* `requireCapability('workspace_session_live_state')` — a capability
|
|
2222
|
+
* probe on every poll would double request volume. Consumers preflight
|
|
2223
|
+
* the capability once from their already-loaded capabilities and fall
|
|
2224
|
+
* back to the full session catalog when it is absent.
|
|
2225
|
+
*/
|
|
2226
|
+
getWorkspaceSessionLiveState(workspaceCwd, opts = {}) {
|
|
2227
|
+
return this.workspaceByCwd(workspaceCwd).getSessionLiveState(opts);
|
|
2228
|
+
}
|
|
2201
2229
|
async listSessionGroups(workspaceCwd) {
|
|
2202
2230
|
return await this.jsonRequest(
|
|
2203
2231
|
`/workspace/${urlEncode(workspaceCwd)}/session-groups`,
|
|
@@ -2425,20 +2453,25 @@ var DaemonClient = class {
|
|
|
2425
2453
|
}
|
|
2426
2454
|
);
|
|
2427
2455
|
}
|
|
2428
|
-
|
|
2429
|
-
return
|
|
2430
|
-
|
|
2431
|
-
|
|
2432
|
-
|
|
2433
|
-
|
|
2434
|
-
|
|
2435
|
-
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2456
|
+
sessionGoalClear(sessionId, clientId) {
|
|
2457
|
+
return this.jsonRequest(
|
|
2458
|
+
`/session/${urlEncode(sessionId)}/goal/clear`,
|
|
2459
|
+
"POST /session/:id/goal/clear",
|
|
2460
|
+
{ method: "POST", body: {}, clientId }
|
|
2461
|
+
);
|
|
2462
|
+
}
|
|
2463
|
+
sessionGoal(sessionId, clientId) {
|
|
2464
|
+
return this.jsonRequest(
|
|
2465
|
+
`/session/${urlEncode(sessionId)}/goal`,
|
|
2466
|
+
"GET /session/:id/goal",
|
|
2467
|
+
{ clientId }
|
|
2468
|
+
);
|
|
2469
|
+
}
|
|
2470
|
+
sessionGoalControl(sessionId, request, clientId) {
|
|
2471
|
+
return this.jsonRequest(
|
|
2472
|
+
`/session/${urlEncode(sessionId)}/goal`,
|
|
2473
|
+
"POST /session/:id/goal",
|
|
2474
|
+
{ method: "POST", body: request, clientId }
|
|
2442
2475
|
);
|
|
2443
2476
|
}
|
|
2444
2477
|
async sessionStats(sessionId, clientId) {
|
|
@@ -2644,11 +2677,79 @@ var DaemonClient = class {
|
|
|
2644
2677
|
if (!res.ok) throw await this.failOnError(res, "POST /session/:id/btw");
|
|
2645
2678
|
return await res.json();
|
|
2646
2679
|
}
|
|
2680
|
+
async uploadSessionAttachment(sessionId, data, name, mimeType, opts) {
|
|
2681
|
+
return await this.fetchWithTimeout(
|
|
2682
|
+
`${this.baseUrl}/session/${urlEncode(sessionId)}/attachments?name=${urlEncode(name)}`,
|
|
2683
|
+
{
|
|
2684
|
+
method: "POST",
|
|
2685
|
+
headers: this.headers({ "Content-Type": mimeType }, opts?.clientId),
|
|
2686
|
+
body: data,
|
|
2687
|
+
signal: opts?.signal
|
|
2688
|
+
},
|
|
2689
|
+
async (res) => {
|
|
2690
|
+
if (!res.ok) {
|
|
2691
|
+
throw await this.failOnError(res, "POST /session/:id/attachments");
|
|
2692
|
+
}
|
|
2693
|
+
return await res.json();
|
|
2694
|
+
}
|
|
2695
|
+
);
|
|
2696
|
+
}
|
|
2697
|
+
async readSessionAttachment(sessionId, attachmentId, opts) {
|
|
2698
|
+
return await this.fetchWithTimeout(
|
|
2699
|
+
`${this.baseUrl}/session/${urlEncode(sessionId)}/attachments/${urlEncode(attachmentId)}`,
|
|
2700
|
+
{
|
|
2701
|
+
method: "GET",
|
|
2702
|
+
headers: this.headers({}, opts?.clientId),
|
|
2703
|
+
signal: opts?.signal
|
|
2704
|
+
},
|
|
2705
|
+
async (res) => {
|
|
2706
|
+
if (!res.ok) {
|
|
2707
|
+
throw await this.failOnError(
|
|
2708
|
+
res,
|
|
2709
|
+
"GET /session/:id/attachments/:attachmentId"
|
|
2710
|
+
);
|
|
2711
|
+
}
|
|
2712
|
+
const bytes = new Uint8Array(await res.arrayBuffer());
|
|
2713
|
+
let binary = "";
|
|
2714
|
+
for (let offset = 0; offset < bytes.length; offset += 32768) {
|
|
2715
|
+
binary += String.fromCharCode(
|
|
2716
|
+
...bytes.subarray(offset, offset + 32768)
|
|
2717
|
+
);
|
|
2718
|
+
}
|
|
2719
|
+
return {
|
|
2720
|
+
data: btoa(binary),
|
|
2721
|
+
mimeType: res.headers.get("content-type") ?? "application/octet-stream"
|
|
2722
|
+
};
|
|
2723
|
+
}
|
|
2724
|
+
);
|
|
2725
|
+
}
|
|
2726
|
+
async removeSessionAttachment(sessionId, attachmentId, opts) {
|
|
2727
|
+
return await this.fetchWithTimeout(
|
|
2728
|
+
`${this.baseUrl}/session/${urlEncode(sessionId)}/attachments/${urlEncode(attachmentId)}`,
|
|
2729
|
+
{
|
|
2730
|
+
method: "DELETE",
|
|
2731
|
+
headers: this.headers({}, opts?.clientId),
|
|
2732
|
+
signal: opts?.signal
|
|
2733
|
+
},
|
|
2734
|
+
async (res) => {
|
|
2735
|
+
if (!res.ok) {
|
|
2736
|
+
throw await this.failOnError(
|
|
2737
|
+
res,
|
|
2738
|
+
"DELETE /session/:id/attachments/:attachmentId"
|
|
2739
|
+
);
|
|
2740
|
+
}
|
|
2741
|
+
return (await res.json()).removed === true;
|
|
2742
|
+
}
|
|
2743
|
+
);
|
|
2744
|
+
}
|
|
2647
2745
|
/**
|
|
2648
2746
|
* Queue a user message typed while the session's turn is still running. The
|
|
2649
2747
|
* ACP child drains it between tool batches so the model sees it before the
|
|
2650
2748
|
* turn ends. Every accepted request is daemon-owned; a caller-supplied id
|
|
2651
|
-
* makes ambiguous retries idempotent.
|
|
2749
|
+
* makes ambiguous retries idempotent. `opts.content` carries media content
|
|
2750
|
+
* image blocks alongside the text — pre-flight the
|
|
2751
|
+
* `session_attachments` capability; older daemons ignore the
|
|
2752
|
+
* field and drop the media.
|
|
2652
2753
|
*/
|
|
2653
2754
|
async enqueueMidTurnMessage(sessionId, message, opts) {
|
|
2654
2755
|
return await this.fetchWithTimeout(
|
|
@@ -2659,7 +2760,11 @@ var DaemonClient = class {
|
|
|
2659
2760
|
{ "Content-Type": "application/json" },
|
|
2660
2761
|
opts?.clientId
|
|
2661
2762
|
),
|
|
2662
|
-
body: JSON.stringify({
|
|
2763
|
+
body: JSON.stringify({
|
|
2764
|
+
message,
|
|
2765
|
+
messageId: opts?.messageId,
|
|
2766
|
+
...opts?.content && opts.content.length > 0 ? { content: opts.content } : {}
|
|
2767
|
+
}),
|
|
2663
2768
|
signal: opts?.signal
|
|
2664
2769
|
},
|
|
2665
2770
|
async (res) => {
|
|
@@ -4595,6 +4700,26 @@ var WorkspaceDaemonClient = class {
|
|
|
4595
4700
|
getWorkspaceSessionInfo() {
|
|
4596
4701
|
return this.get("/session-info", "GET /workspaces/:workspace/session-info");
|
|
4597
4702
|
}
|
|
4703
|
+
/**
|
|
4704
|
+
* Read the memory-only live-state snapshot for this workspace: the
|
|
4705
|
+
* complete set of live sessions with volatile state plus the in-memory
|
|
4706
|
+
* catalog version equality token. Always uses native REST transport
|
|
4707
|
+
* (never the pluggable ACP transport).
|
|
4708
|
+
*
|
|
4709
|
+
* This method deliberately does not pre-flight
|
|
4710
|
+
* `requireCapability('workspace_session_live_state')` — a capability
|
|
4711
|
+
* probe on every poll would double request volume. Consumers preflight
|
|
4712
|
+
* the capability once from their already-loaded capabilities and fall
|
|
4713
|
+
* back to the full session catalog when it is absent.
|
|
4714
|
+
*/
|
|
4715
|
+
getSessionLiveState(opts = {}) {
|
|
4716
|
+
return this.client.workspaceJsonRequest(
|
|
4717
|
+
this.workspaceSelector,
|
|
4718
|
+
"/sessions/live-state",
|
|
4719
|
+
"GET /workspaces/:workspace/sessions/live-state",
|
|
4720
|
+
{ clientId: opts.clientId, timeoutMs: opts.timeoutMs, mode: "rest" }
|
|
4721
|
+
);
|
|
4722
|
+
}
|
|
4598
4723
|
/**
|
|
4599
4724
|
* Read one page from an active persisted session transcript in this
|
|
4600
4725
|
* workspace.
|
|
@@ -4625,6 +4750,14 @@ var WorkspaceDaemonClient = class {
|
|
|
4625
4750
|
opts
|
|
4626
4751
|
);
|
|
4627
4752
|
}
|
|
4753
|
+
updateSessionMetadata(sessionId, metadata, clientId) {
|
|
4754
|
+
return this.client.workspaceJsonRequest(
|
|
4755
|
+
this.workspaceSelector,
|
|
4756
|
+
`/session/${urlEncode(sessionId)}/metadata`,
|
|
4757
|
+
"PATCH /workspaces/:workspace/session/:id/metadata",
|
|
4758
|
+
{ method: "PATCH", body: metadata, clientId, mode: "rest" }
|
|
4759
|
+
);
|
|
4760
|
+
}
|
|
4628
4761
|
listSessionGroups() {
|
|
4629
4762
|
return this.get(
|
|
4630
4763
|
"/session-groups",
|
|
@@ -4879,6 +5012,19 @@ var WorkspaceDaemonClient = class {
|
|
|
4879
5012
|
{ method: "PUT", body: { state }, clientId, mode: "rest" }
|
|
4880
5013
|
);
|
|
4881
5014
|
}
|
|
5015
|
+
setExtensionActivations(extensionNames, state, clientId) {
|
|
5016
|
+
return this.client.workspaceJsonRequest(
|
|
5017
|
+
this.workspaceSelector,
|
|
5018
|
+
"/extensions/activation",
|
|
5019
|
+
"PUT /workspaces/:workspace/extensions/activation",
|
|
5020
|
+
{
|
|
5021
|
+
method: "PUT",
|
|
5022
|
+
body: { extensionNames: [...extensionNames], state },
|
|
5023
|
+
clientId,
|
|
5024
|
+
mode: "rest"
|
|
5025
|
+
}
|
|
5026
|
+
);
|
|
5027
|
+
}
|
|
4882
5028
|
clearExtensionActivation(extensionId, clientId) {
|
|
4883
5029
|
return this.client.workspaceJsonRequest(
|
|
4884
5030
|
this.workspaceSelector,
|
|
@@ -4983,6 +5129,14 @@ __name(isNonBlockingAccepted, "isNonBlockingAccepted");
|
|
|
4983
5129
|
|
|
4984
5130
|
// packages/sdk-typescript/src/daemon/DaemonSessionClient.ts
|
|
4985
5131
|
init_esbuild_shims();
|
|
5132
|
+
function isSessionAttachmentReference(value) {
|
|
5133
|
+
if (!value || typeof value !== "object" || Array.isArray(value)) return false;
|
|
5134
|
+
const record = value;
|
|
5135
|
+
return (record["type"] === "image" || record["type"] === "resource") && typeof record["attachmentId"] === "string" && record["attachmentId"].length > 0 && typeof record["mimeType"] === "string" && record["mimeType"].length > 0 && (record["type"] !== "image" || record["mimeType"].startsWith("image/")) && typeof record["size"] === "number" && Number.isSafeInteger(record["size"]) && record["size"] >= 0 && (record["type"] !== "image" || record["size"] > 0);
|
|
5136
|
+
}
|
|
5137
|
+
__name(isSessionAttachmentReference, "isSessionAttachmentReference");
|
|
5138
|
+
var MAX_ATTACHMENT_CACHE_BYTES = 32 * 1024 * 1024;
|
|
5139
|
+
var MAX_ATTACHMENT_CACHE_ENTRIES = 128;
|
|
4986
5140
|
var DaemonSessionClient = class _DaemonSessionClient {
|
|
4987
5141
|
static {
|
|
4988
5142
|
__name(this, "DaemonSessionClient");
|
|
@@ -5024,6 +5178,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5024
5178
|
reattaching;
|
|
5025
5179
|
cancelling;
|
|
5026
5180
|
promptLimit;
|
|
5181
|
+
attachmentCache = /* @__PURE__ */ new Map();
|
|
5182
|
+
attachmentCacheBytes = 0;
|
|
5027
5183
|
_pendingPrompts = /* @__PURE__ */ new Map();
|
|
5028
5184
|
constructor(opts) {
|
|
5029
5185
|
this.client = opts.client;
|
|
@@ -5083,7 +5239,7 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5083
5239
|
eventEpoch,
|
|
5084
5240
|
...session
|
|
5085
5241
|
} = restored;
|
|
5086
|
-
|
|
5242
|
+
const result = new _DaemonSessionClient({
|
|
5087
5243
|
client,
|
|
5088
5244
|
session,
|
|
5089
5245
|
hasActivePrompt,
|
|
@@ -5101,6 +5257,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5101
5257
|
historyAnchorRecordId,
|
|
5102
5258
|
replayDegraded
|
|
5103
5259
|
});
|
|
5260
|
+
await result.hydrateReplaySnapshot();
|
|
5261
|
+
return result;
|
|
5104
5262
|
}
|
|
5105
5263
|
/**
|
|
5106
5264
|
* Resumes an existing daemon session without requesting history replay.
|
|
@@ -5233,6 +5391,42 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5233
5391
|
}
|
|
5234
5392
|
return accepted;
|
|
5235
5393
|
}
|
|
5394
|
+
async uploadAttachment(data, name, mimeType, signal) {
|
|
5395
|
+
return await this.withClientIdSelfHeal(
|
|
5396
|
+
() => this.client.uploadSessionAttachment(
|
|
5397
|
+
this.sessionId,
|
|
5398
|
+
data,
|
|
5399
|
+
name,
|
|
5400
|
+
mimeType,
|
|
5401
|
+
{
|
|
5402
|
+
...signal ? { signal } : {},
|
|
5403
|
+
...this.clientId ? { clientId: this.clientId } : {}
|
|
5404
|
+
}
|
|
5405
|
+
)
|
|
5406
|
+
);
|
|
5407
|
+
}
|
|
5408
|
+
async readAttachment(attachmentId, signal) {
|
|
5409
|
+
return await this.withClientIdSelfHeal(
|
|
5410
|
+
() => this.client.readSessionAttachment(this.sessionId, attachmentId, {
|
|
5411
|
+
...signal ? { signal } : {},
|
|
5412
|
+
...this.clientId ? { clientId: this.clientId } : {}
|
|
5413
|
+
})
|
|
5414
|
+
);
|
|
5415
|
+
}
|
|
5416
|
+
async removeAttachment(attachmentId, signal) {
|
|
5417
|
+
const removed = await this.withClientIdSelfHeal(
|
|
5418
|
+
() => this.client.removeSessionAttachment(this.sessionId, attachmentId, {
|
|
5419
|
+
...signal ? { signal } : {},
|
|
5420
|
+
...this.clientId ? { clientId: this.clientId } : {}
|
|
5421
|
+
})
|
|
5422
|
+
);
|
|
5423
|
+
if (removed) {
|
|
5424
|
+
const cached = this.attachmentCache.get(attachmentId);
|
|
5425
|
+
this.attachmentCache.delete(attachmentId);
|
|
5426
|
+
this.attachmentCacheBytes -= cached?.size ?? 0;
|
|
5427
|
+
}
|
|
5428
|
+
return removed;
|
|
5429
|
+
}
|
|
5236
5430
|
/**
|
|
5237
5431
|
* Run a prompt-admission call, recovering from a stale `clientId`.
|
|
5238
5432
|
*
|
|
@@ -5287,55 +5481,48 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5287
5481
|
* policy. Forwards the bound `clientId` so identified clients update
|
|
5288
5482
|
* their per-client timestamp instead of just the session-wide one.
|
|
5289
5483
|
*/
|
|
5290
|
-
|
|
5291
|
-
return
|
|
5484
|
+
heartbeat() {
|
|
5485
|
+
return this.client.heartbeat(this.sessionId, this.clientId);
|
|
5292
5486
|
}
|
|
5293
|
-
|
|
5294
|
-
return
|
|
5295
|
-
this.sessionId,
|
|
5296
|
-
this.clientId
|
|
5297
|
-
);
|
|
5487
|
+
artifacts() {
|
|
5488
|
+
return this.client.listSessionArtifacts(this.sessionId, this.clientId);
|
|
5298
5489
|
}
|
|
5299
|
-
|
|
5300
|
-
return
|
|
5490
|
+
addArtifact(artifact) {
|
|
5491
|
+
return this.client.addSessionArtifact(
|
|
5301
5492
|
this.sessionId,
|
|
5302
5493
|
artifact,
|
|
5303
5494
|
this.clientId
|
|
5304
5495
|
);
|
|
5305
5496
|
}
|
|
5306
|
-
|
|
5307
|
-
return
|
|
5497
|
+
removeArtifact(artifactId) {
|
|
5498
|
+
return this.client.removeSessionArtifact(
|
|
5308
5499
|
this.sessionId,
|
|
5309
5500
|
artifactId,
|
|
5310
5501
|
this.clientId
|
|
5311
5502
|
);
|
|
5312
5503
|
}
|
|
5313
|
-
|
|
5314
|
-
return
|
|
5315
|
-
this.sessionId,
|
|
5316
|
-
modelId,
|
|
5317
|
-
this.clientId
|
|
5318
|
-
);
|
|
5504
|
+
setModel(modelId) {
|
|
5505
|
+
return this.client.setSessionModel(this.sessionId, modelId, this.clientId);
|
|
5319
5506
|
}
|
|
5320
|
-
|
|
5321
|
-
return
|
|
5507
|
+
setConfigOption(configId, value) {
|
|
5508
|
+
return this.client.setSessionConfigOption(
|
|
5322
5509
|
this.sessionId,
|
|
5323
5510
|
configId,
|
|
5324
5511
|
value,
|
|
5325
5512
|
this.clientId
|
|
5326
5513
|
);
|
|
5327
5514
|
}
|
|
5328
|
-
|
|
5329
|
-
return
|
|
5515
|
+
getRewindSnapshots() {
|
|
5516
|
+
return this.client.getRewindSnapshots(this.sessionId);
|
|
5330
5517
|
}
|
|
5331
|
-
|
|
5332
|
-
return
|
|
5518
|
+
rewind(promptId, opts) {
|
|
5519
|
+
return this.client.rewindSession(this.sessionId, promptId, {
|
|
5333
5520
|
clientId: this.clientId,
|
|
5334
5521
|
...opts?.rewindFiles !== void 0 ? { rewindFiles: opts.rewindFiles } : {}
|
|
5335
5522
|
});
|
|
5336
5523
|
}
|
|
5337
|
-
|
|
5338
|
-
return
|
|
5524
|
+
fork(directive) {
|
|
5525
|
+
return this.client.forkSession(
|
|
5339
5526
|
this.sessionId,
|
|
5340
5527
|
{ directive },
|
|
5341
5528
|
this.clientId
|
|
@@ -5349,8 +5536,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5349
5536
|
* child both run to completion regardless (no cross-process abort
|
|
5350
5537
|
* plumbing in v1).
|
|
5351
5538
|
*/
|
|
5352
|
-
|
|
5353
|
-
return
|
|
5539
|
+
recap(opts) {
|
|
5540
|
+
return this.client.recapSession(this.sessionId, {
|
|
5354
5541
|
...opts?.signal ? { signal: opts.signal } : {},
|
|
5355
5542
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5356
5543
|
});
|
|
@@ -5361,8 +5548,8 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5361
5548
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5362
5549
|
});
|
|
5363
5550
|
}
|
|
5364
|
-
|
|
5365
|
-
return
|
|
5551
|
+
btw(question, opts) {
|
|
5552
|
+
return this.client.btwSession(this.sessionId, question, {
|
|
5366
5553
|
...opts?.signal ? { signal: opts.signal } : {},
|
|
5367
5554
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5368
5555
|
});
|
|
@@ -5373,15 +5560,16 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5373
5560
|
* create/attach. Accepted requests become daemon-owned even when the active
|
|
5374
5561
|
* turn settles while the request is in flight.
|
|
5375
5562
|
*/
|
|
5376
|
-
|
|
5377
|
-
return
|
|
5563
|
+
enqueueMidTurnMessage(message, opts) {
|
|
5564
|
+
return this.client.enqueueMidTurnMessage(this.sessionId, message, {
|
|
5378
5565
|
...opts?.signal ? { signal: opts.signal } : {},
|
|
5379
5566
|
...opts?.messageId ? { messageId: opts.messageId } : {},
|
|
5567
|
+
...opts?.content && opts.content.length > 0 ? { content: opts.content } : {},
|
|
5380
5568
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5381
5569
|
});
|
|
5382
5570
|
}
|
|
5383
|
-
|
|
5384
|
-
return
|
|
5571
|
+
removeMidTurnMessage(messageId) {
|
|
5572
|
+
return this.client.removeMidTurnMessage(this.sessionId, messageId, {
|
|
5385
5573
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5386
5574
|
});
|
|
5387
5575
|
}
|
|
@@ -5393,18 +5581,47 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5393
5581
|
* callers preserve their current state.
|
|
5394
5582
|
*/
|
|
5395
5583
|
async getMidTurnMessages(opts) {
|
|
5396
|
-
|
|
5584
|
+
const result = await this.client.getMidTurnMessages(this.sessionId, {
|
|
5397
5585
|
...opts?.signal ? { signal: opts.signal } : {},
|
|
5398
5586
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5399
5587
|
});
|
|
5588
|
+
return {
|
|
5589
|
+
...result,
|
|
5590
|
+
messages: await Promise.all(
|
|
5591
|
+
result.messages.map(async (message) => ({
|
|
5592
|
+
...message,
|
|
5593
|
+
...message.content ? { content: await this.hydrateContent(message.content) } : {}
|
|
5594
|
+
}))
|
|
5595
|
+
)
|
|
5596
|
+
};
|
|
5400
5597
|
}
|
|
5401
5598
|
async getPendingPrompts() {
|
|
5402
|
-
|
|
5599
|
+
const result = await this.client.getPendingPrompts(this.sessionId, {
|
|
5403
5600
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5404
5601
|
});
|
|
5602
|
+
return {
|
|
5603
|
+
pendingPrompts: await Promise.all(
|
|
5604
|
+
result.pendingPrompts.map(async (prompt) => ({
|
|
5605
|
+
...prompt,
|
|
5606
|
+
...prompt.content ? { content: await this.hydrateContent(prompt.content) } : {}
|
|
5607
|
+
}))
|
|
5608
|
+
)
|
|
5609
|
+
};
|
|
5610
|
+
}
|
|
5611
|
+
async getTranscriptPage(opts = {}) {
|
|
5612
|
+
const page = await this.client.getSessionTranscriptPage(this.sessionId, {
|
|
5613
|
+
...opts,
|
|
5614
|
+
clientId: opts.clientId ?? this.clientId
|
|
5615
|
+
});
|
|
5616
|
+
return {
|
|
5617
|
+
...page,
|
|
5618
|
+
events: await Promise.all(
|
|
5619
|
+
page.events.map(async (event) => await this.hydrateEvent(event))
|
|
5620
|
+
)
|
|
5621
|
+
};
|
|
5405
5622
|
}
|
|
5406
|
-
|
|
5407
|
-
return
|
|
5623
|
+
removePendingPrompt(promptId) {
|
|
5624
|
+
return this.client.removePendingPrompt(this.sessionId, promptId, {
|
|
5408
5625
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5409
5626
|
});
|
|
5410
5627
|
}
|
|
@@ -5414,50 +5631,53 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5414
5631
|
* automatically forwards the client id bound when the session was created
|
|
5415
5632
|
* or attached.
|
|
5416
5633
|
*/
|
|
5417
|
-
|
|
5418
|
-
return
|
|
5634
|
+
shellCommand(command, signal) {
|
|
5635
|
+
return this.client.shellCommand(this.sessionId, command, {
|
|
5419
5636
|
...signal ? { signal } : {},
|
|
5420
5637
|
...this.clientId ? { clientId: this.clientId } : {}
|
|
5421
5638
|
});
|
|
5422
5639
|
}
|
|
5423
|
-
|
|
5424
|
-
return
|
|
5640
|
+
context() {
|
|
5641
|
+
return this.client.sessionContext(this.sessionId, this.clientId);
|
|
5425
5642
|
}
|
|
5426
|
-
|
|
5427
|
-
return
|
|
5643
|
+
status() {
|
|
5644
|
+
return this.client.sessionStatus(this.sessionId, this.clientId);
|
|
5428
5645
|
}
|
|
5429
|
-
|
|
5430
|
-
return
|
|
5431
|
-
this.sessionId,
|
|
5432
|
-
opts,
|
|
5433
|
-
this.clientId
|
|
5434
|
-
);
|
|
5646
|
+
contextUsage(opts = {}) {
|
|
5647
|
+
return this.client.sessionContextUsage(this.sessionId, opts, this.clientId);
|
|
5435
5648
|
}
|
|
5436
|
-
|
|
5437
|
-
return
|
|
5438
|
-
this.sessionId,
|
|
5439
|
-
this.clientId
|
|
5440
|
-
);
|
|
5649
|
+
supportedCommands() {
|
|
5650
|
+
return this.client.sessionSupportedCommands(this.sessionId, this.clientId);
|
|
5441
5651
|
}
|
|
5442
|
-
|
|
5443
|
-
return
|
|
5652
|
+
tasks() {
|
|
5653
|
+
return this.client.sessionTasks(this.sessionId, this.clientId);
|
|
5444
5654
|
}
|
|
5445
|
-
|
|
5446
|
-
return
|
|
5655
|
+
lspStatus() {
|
|
5656
|
+
return this.client.sessionLspStatus(this.sessionId, this.clientId);
|
|
5447
5657
|
}
|
|
5448
|
-
|
|
5449
|
-
return
|
|
5658
|
+
cancelTask(taskId, kind) {
|
|
5659
|
+
return this.client.sessionTaskCancel(
|
|
5450
5660
|
this.sessionId,
|
|
5451
5661
|
taskId,
|
|
5452
5662
|
kind,
|
|
5453
5663
|
this.clientId
|
|
5454
5664
|
);
|
|
5455
5665
|
}
|
|
5456
|
-
|
|
5457
|
-
return
|
|
5666
|
+
clearGoal() {
|
|
5667
|
+
return this.client.sessionGoalClear(this.sessionId, this.clientId);
|
|
5668
|
+
}
|
|
5669
|
+
goal() {
|
|
5670
|
+
return this.client.sessionGoal(this.sessionId, this.clientId);
|
|
5458
5671
|
}
|
|
5459
|
-
|
|
5460
|
-
return
|
|
5672
|
+
controlGoal(request) {
|
|
5673
|
+
return this.client.sessionGoalControl(
|
|
5674
|
+
this.sessionId,
|
|
5675
|
+
request,
|
|
5676
|
+
this.clientId
|
|
5677
|
+
);
|
|
5678
|
+
}
|
|
5679
|
+
stats() {
|
|
5680
|
+
return this.client.sessionStats(this.sessionId, this.clientId);
|
|
5461
5681
|
}
|
|
5462
5682
|
async respondToPermission(requestId, response) {
|
|
5463
5683
|
return await this.client.respondToPermission(
|
|
@@ -5581,8 +5801,9 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5581
5801
|
callerOnEpoch?.(learned);
|
|
5582
5802
|
}, "onEpoch")
|
|
5583
5803
|
})) {
|
|
5584
|
-
this.
|
|
5585
|
-
|
|
5804
|
+
const hydratedEvent = await this.hydrateEvent(event);
|
|
5805
|
+
this._dispatchTurnEvent(hydratedEvent);
|
|
5806
|
+
yield hydratedEvent;
|
|
5586
5807
|
if (event.id !== void 0) {
|
|
5587
5808
|
this.lastSeenEventId = Math.max(
|
|
5588
5809
|
this.lastSeenEventId ?? 0,
|
|
@@ -5595,6 +5816,113 @@ var DaemonSessionClient = class _DaemonSessionClient {
|
|
|
5595
5816
|
release();
|
|
5596
5817
|
}
|
|
5597
5818
|
}
|
|
5819
|
+
async hydrateReplaySnapshot() {
|
|
5820
|
+
this.replaySnapshot.compactedReplay = await Promise.all(
|
|
5821
|
+
this.replaySnapshot.compactedReplay.map(
|
|
5822
|
+
async (event) => await this.hydrateEvent(event)
|
|
5823
|
+
)
|
|
5824
|
+
);
|
|
5825
|
+
this.replaySnapshot.liveJournal = await Promise.all(
|
|
5826
|
+
this.replaySnapshot.liveJournal.map(
|
|
5827
|
+
async (event) => await this.hydrateEvent(event)
|
|
5828
|
+
)
|
|
5829
|
+
);
|
|
5830
|
+
}
|
|
5831
|
+
async hydrateEvent(event) {
|
|
5832
|
+
if (!event.data || typeof event.data !== "object") return event;
|
|
5833
|
+
const data = event.data;
|
|
5834
|
+
if (event.type === "session_update") {
|
|
5835
|
+
const update = data["update"];
|
|
5836
|
+
if (update && typeof update === "object" && !Array.isArray(update)) {
|
|
5837
|
+
const content2 = update["content"];
|
|
5838
|
+
const hydrated2 = await this.hydrateBlock(content2);
|
|
5839
|
+
if (hydrated2 === content2) return event;
|
|
5840
|
+
return {
|
|
5841
|
+
...event,
|
|
5842
|
+
data: { ...data, update: { ...update, content: hydrated2 } }
|
|
5843
|
+
};
|
|
5844
|
+
}
|
|
5845
|
+
const content = data["content"];
|
|
5846
|
+
const hydrated = await this.hydrateBlock(content);
|
|
5847
|
+
if (hydrated === content) return event;
|
|
5848
|
+
return { ...event, data: { ...data, content: hydrated } };
|
|
5849
|
+
}
|
|
5850
|
+
if (event.type !== "mid_turn_message_injected") return event;
|
|
5851
|
+
const items = data["items"];
|
|
5852
|
+
if (!Array.isArray(items)) return event;
|
|
5853
|
+
return {
|
|
5854
|
+
...event,
|
|
5855
|
+
data: {
|
|
5856
|
+
...data,
|
|
5857
|
+
items: await Promise.all(
|
|
5858
|
+
items.map(async (item) => {
|
|
5859
|
+
if (!item || typeof item !== "object" || Array.isArray(item)) {
|
|
5860
|
+
return item;
|
|
5861
|
+
}
|
|
5862
|
+
const record = item;
|
|
5863
|
+
return Array.isArray(record["content"]) ? {
|
|
5864
|
+
...record,
|
|
5865
|
+
content: await this.hydrateContent(record["content"])
|
|
5866
|
+
} : item;
|
|
5867
|
+
})
|
|
5868
|
+
)
|
|
5869
|
+
}
|
|
5870
|
+
};
|
|
5871
|
+
}
|
|
5872
|
+
async hydrateContent(content) {
|
|
5873
|
+
return await Promise.all(
|
|
5874
|
+
content.map(async (block) => await this.hydrateBlock(block))
|
|
5875
|
+
);
|
|
5876
|
+
}
|
|
5877
|
+
async hydrateBlock(block) {
|
|
5878
|
+
if (!isSessionAttachmentReference(block)) {
|
|
5879
|
+
return block;
|
|
5880
|
+
}
|
|
5881
|
+
if (block.type === "resource") return block;
|
|
5882
|
+
let cached = this.attachmentCache.get(block.attachmentId);
|
|
5883
|
+
if (cached) {
|
|
5884
|
+
this.attachmentCache.delete(block.attachmentId);
|
|
5885
|
+
this.attachmentCache.set(block.attachmentId, cached);
|
|
5886
|
+
} else {
|
|
5887
|
+
const pending = this.withClientIdSelfHeal(
|
|
5888
|
+
() => this.client.readSessionAttachment(this.sessionId, block.attachmentId, {
|
|
5889
|
+
...this.clientId ? { clientId: this.clientId } : {}
|
|
5890
|
+
})
|
|
5891
|
+
);
|
|
5892
|
+
cached = { pending, size: block.size };
|
|
5893
|
+
this.attachmentCache.set(block.attachmentId, cached);
|
|
5894
|
+
this.attachmentCacheBytes += block.size;
|
|
5895
|
+
while (this.attachmentCache.size > MAX_ATTACHMENT_CACHE_ENTRIES || this.attachmentCacheBytes > MAX_ATTACHMENT_CACHE_BYTES) {
|
|
5896
|
+
const oldestId = this.attachmentCache.keys().next().value;
|
|
5897
|
+
if (oldestId === void 0) break;
|
|
5898
|
+
const evicted = this.attachmentCache.get(oldestId);
|
|
5899
|
+
this.attachmentCache.delete(oldestId);
|
|
5900
|
+
this.attachmentCacheBytes -= evicted?.size ?? 0;
|
|
5901
|
+
}
|
|
5902
|
+
void pending.catch(() => {
|
|
5903
|
+
if (this.attachmentCache.get(block.attachmentId)?.pending !== pending)
|
|
5904
|
+
return;
|
|
5905
|
+
this.attachmentCache.delete(block.attachmentId);
|
|
5906
|
+
this.attachmentCacheBytes -= block.size;
|
|
5907
|
+
});
|
|
5908
|
+
}
|
|
5909
|
+
try {
|
|
5910
|
+
const attachment = await cached.pending;
|
|
5911
|
+
return {
|
|
5912
|
+
type: "image",
|
|
5913
|
+
data: attachment.data,
|
|
5914
|
+
mimeType: attachment.mimeType
|
|
5915
|
+
};
|
|
5916
|
+
} catch (err) {
|
|
5917
|
+
if (err instanceof DaemonHttpError && (err.status === 404 || err.status === 410)) {
|
|
5918
|
+
return {
|
|
5919
|
+
type: "text",
|
|
5920
|
+
text: "[Attachment is no longer available]"
|
|
5921
|
+
};
|
|
5922
|
+
}
|
|
5923
|
+
return block;
|
|
5924
|
+
}
|
|
5925
|
+
}
|
|
5598
5926
|
_dispatchTurnEvent(event) {
|
|
5599
5927
|
if (event.type !== "turn_complete" && event.type !== "turn_error") return;
|
|
5600
5928
|
const promptId = event.data?.promptId;
|
|
@@ -5931,7 +6259,7 @@ function asKnownDaemonEvent(event) {
|
|
|
5931
6259
|
case "tool_toggled":
|
|
5932
6260
|
return isToolToggledData(event.data) ? event : void 0;
|
|
5933
6261
|
case "settings_changed":
|
|
5934
|
-
return event.data
|
|
6262
|
+
return isSettingsChangedData(event.data) ? event : void 0;
|
|
5935
6263
|
case "trust_change_requested":
|
|
5936
6264
|
return isTrustChangeRequestedData(event.data) ? event : void 0;
|
|
5937
6265
|
case "workspace_initialized":
|
|
@@ -6633,6 +6961,19 @@ function isToolToggledData(value) {
|
|
|
6633
6961
|
return isRecord(value) && isNonEmptyString(value["toolName"]) && typeof value["enabled"] === "boolean";
|
|
6634
6962
|
}
|
|
6635
6963
|
__name(isToolToggledData, "isToolToggledData");
|
|
6964
|
+
function isDaemonSkillToggleMutation(value) {
|
|
6965
|
+
if (!isRecord(value)) return false;
|
|
6966
|
+
const activation = value["activation"];
|
|
6967
|
+
const skills = value["skills"];
|
|
6968
|
+
return isNonEmptyString(value["id"]) && value["kind"] === "skill_toggle" && Array.isArray(skills) && skills.length > 0 && skills.every(
|
|
6969
|
+
(skill) => isRecord(skill) && isNonEmptyString(skill["name"]) && typeof skill["enabled"] === "boolean"
|
|
6970
|
+
) && (activation === "applied" || activation === "deferred" || activation === "partial") && isFiniteNumber(value["sessionsRefreshed"]) && isFiniteNumber(value["sessionsFailed"]);
|
|
6971
|
+
}
|
|
6972
|
+
__name(isDaemonSkillToggleMutation, "isDaemonSkillToggleMutation");
|
|
6973
|
+
function isSettingsChangedData(value) {
|
|
6974
|
+
return isRecord(value) && isNonEmptyString(value["key"]) && (value["scope"] === void 0 || typeof value["scope"] === "string") && (value["mutation"] === void 0 || isDaemonSkillToggleMutation(value["mutation"]));
|
|
6975
|
+
}
|
|
6976
|
+
__name(isSettingsChangedData, "isSettingsChangedData");
|
|
6636
6977
|
function isTrustChangeRequestedData(value) {
|
|
6637
6978
|
if (!isRecord(value)) return false;
|
|
6638
6979
|
const desiredState = value["desiredState"];
|
|
@@ -6880,6 +7221,16 @@ var DAEMON_UI_DEBUG_REASONS = [
|
|
|
6880
7221
|
"unrecognized_session_update",
|
|
6881
7222
|
"malformed_payload"
|
|
6882
7223
|
];
|
|
7224
|
+
var DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS = [
|
|
7225
|
+
"unrecognized_event",
|
|
7226
|
+
"unrecognized_session_update"
|
|
7227
|
+
];
|
|
7228
|
+
function isUnrecognizedDiagnosticReason(reason) {
|
|
7229
|
+
return reason !== void 0 && DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS.includes(
|
|
7230
|
+
reason
|
|
7231
|
+
);
|
|
7232
|
+
}
|
|
7233
|
+
__name(isUnrecognizedDiagnosticReason, "isUnrecognizedDiagnosticReason");
|
|
6883
7234
|
|
|
6884
7235
|
// packages/sdk-typescript/src/daemon/ui/utils.ts
|
|
6885
7236
|
init_esbuild_shims();
|
|
@@ -7077,6 +7428,7 @@ var MCP_RESTART_REFUSED_REASONS2 = /* @__PURE__ */ new Set([
|
|
|
7077
7428
|
var MALFORMED_MEMORY_CHANGED = "malformed memory_changed payload";
|
|
7078
7429
|
var MAX_DETAILS_LENGTH = 4096;
|
|
7079
7430
|
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.";
|
|
7431
|
+
var ATTACHMENT_UNAVAILABLE_TEXT = "[Attachment is no longer available]";
|
|
7080
7432
|
function normalizeDaemonEvent(event, opts = {}) {
|
|
7081
7433
|
const base = createBase(event, opts);
|
|
7082
7434
|
switch (event.type) {
|
|
@@ -7453,21 +7805,37 @@ function normalizeMidTurnMessageInjected(event, base) {
|
|
|
7453
7805
|
if (!isRecord2(event.data)) {
|
|
7454
7806
|
return fallbackDebug(event, base, "malformed mid_turn_message_injected");
|
|
7455
7807
|
}
|
|
7456
|
-
const
|
|
7457
|
-
|
|
7458
|
-
)
|
|
7459
|
-
|
|
7808
|
+
const data = event.data;
|
|
7809
|
+
const rawMessages = data["messages"];
|
|
7810
|
+
const messages = Array.isArray(rawMessages) && rawMessages.every(
|
|
7811
|
+
(message) => typeof message === "string"
|
|
7812
|
+
) ? rawMessages : [];
|
|
7813
|
+
const items = data["items"];
|
|
7814
|
+
const hasRenderableItemContent = Array.isArray(items) && items.some(
|
|
7815
|
+
(item) => isRecord2(item) && Array.isArray(item["content"]) && item["content"].some(
|
|
7816
|
+
(block) => isRecord2(block) && (block["type"] === "image" || block["type"] === "resource" || block["type"] === "text" && typeof block["text"] === "string" && block["text"].length > 0)
|
|
7817
|
+
)
|
|
7818
|
+
);
|
|
7819
|
+
if (messages.length === 0 || !messages.some(Boolean) && !hasRenderableItemContent) {
|
|
7460
7820
|
return fallbackDebug(event, base, "malformed mid_turn_message_injected");
|
|
7461
7821
|
}
|
|
7462
|
-
|
|
7463
|
-
|
|
7822
|
+
const messageIds = Array.isArray(data["messageIds"]) ? data["messageIds"] : [];
|
|
7823
|
+
return messages.map((text, index) => {
|
|
7824
|
+
const item = Array.isArray(items) ? items[index] : void 0;
|
|
7825
|
+
const messageId = messageIds[index];
|
|
7826
|
+
return {
|
|
7464
7827
|
...base,
|
|
7465
7828
|
type: "status",
|
|
7466
|
-
text
|
|
7829
|
+
text,
|
|
7467
7830
|
source: "mid_turn_message_injected",
|
|
7468
|
-
data:
|
|
7469
|
-
|
|
7470
|
-
|
|
7831
|
+
data: {
|
|
7832
|
+
...data,
|
|
7833
|
+
messages: [text],
|
|
7834
|
+
...Array.isArray(items) ? { items: item !== void 0 ? [item] : [] } : {},
|
|
7835
|
+
...typeof messageId === "string" ? { messageIds: [messageId] } : Array.isArray(data["messageIds"]) ? { messageIds: [] } : {}
|
|
7836
|
+
}
|
|
7837
|
+
};
|
|
7838
|
+
});
|
|
7471
7839
|
}
|
|
7472
7840
|
__name(normalizeMidTurnMessageInjected, "normalizeMidTurnMessageInjected");
|
|
7473
7841
|
function createBase(event, opts) {
|
|
@@ -7540,6 +7908,10 @@ function parseTimestamp(value) {
|
|
|
7540
7908
|
return Number.isFinite(parsed) ? parsed : void 0;
|
|
7541
7909
|
}
|
|
7542
7910
|
__name(parseTimestamp, "parseTimestamp");
|
|
7911
|
+
function isAttachmentReferenceContent(value) {
|
|
7912
|
+
return isRecord2(value) && (value["type"] === "image" || value["type"] === "resource") && typeof value["attachmentId"] === "string" && value["attachmentId"].length > 0 && value["data"] === void 0 && value["url"] === void 0 && value["source"] === void 0;
|
|
7913
|
+
}
|
|
7914
|
+
__name(isAttachmentReferenceContent, "isAttachmentReferenceContent");
|
|
7543
7915
|
function normalizeSessionUpdate(event, base, opts) {
|
|
7544
7916
|
const update = getSessionUpdatePayload(event.data);
|
|
7545
7917
|
if (!update) {
|
|
@@ -7574,7 +7946,15 @@ function normalizeSessionUpdate(event, base, opts) {
|
|
|
7574
7946
|
else if (prefix.startsWith("UklGR")) mimeType = "image/webp";
|
|
7575
7947
|
}
|
|
7576
7948
|
if (data) {
|
|
7577
|
-
return [
|
|
7949
|
+
return [
|
|
7950
|
+
{
|
|
7951
|
+
...base,
|
|
7952
|
+
type: "user.image.delta",
|
|
7953
|
+
data,
|
|
7954
|
+
mimeType,
|
|
7955
|
+
...meta ? { meta } : {}
|
|
7956
|
+
}
|
|
7957
|
+
];
|
|
7578
7958
|
}
|
|
7579
7959
|
return [];
|
|
7580
7960
|
}
|
|
@@ -7590,6 +7970,30 @@ function normalizeSessionUpdate(event, base, opts) {
|
|
|
7590
7970
|
}
|
|
7591
7971
|
return [];
|
|
7592
7972
|
}
|
|
7973
|
+
if (isAttachmentReferenceContent(content)) {
|
|
7974
|
+
if (content["type"] === "resource") {
|
|
7975
|
+
const attachmentId = content["attachmentId"];
|
|
7976
|
+
const mimeType = content["mimeType"];
|
|
7977
|
+
return [
|
|
7978
|
+
{
|
|
7979
|
+
...base,
|
|
7980
|
+
type: "user.file.delta",
|
|
7981
|
+
name: attachmentId,
|
|
7982
|
+
attachmentId,
|
|
7983
|
+
mimeType: typeof mimeType === "string" ? mimeType : "",
|
|
7984
|
+
...meta ? { meta } : {}
|
|
7985
|
+
}
|
|
7986
|
+
];
|
|
7987
|
+
}
|
|
7988
|
+
return [
|
|
7989
|
+
{
|
|
7990
|
+
...base,
|
|
7991
|
+
type: "user.text.delta",
|
|
7992
|
+
text: ATTACHMENT_UNAVAILABLE_TEXT,
|
|
7993
|
+
...meta ? { meta } : {}
|
|
7994
|
+
}
|
|
7995
|
+
];
|
|
7996
|
+
}
|
|
7593
7997
|
const text = getTextContent(content);
|
|
7594
7998
|
return text ? [
|
|
7595
7999
|
{
|
|
@@ -8128,13 +8532,15 @@ function normalizeSettingsChanged(event, base) {
|
|
|
8128
8532
|
if (!key) {
|
|
8129
8533
|
return fallbackDebug(event, base, "malformed settings_changed payload");
|
|
8130
8534
|
}
|
|
8535
|
+
const mutation = isSettingsChangedData(event.data) && event.data.mutation;
|
|
8131
8536
|
return [
|
|
8132
8537
|
{
|
|
8133
8538
|
...base,
|
|
8134
8539
|
type: "workspace.settings.changed",
|
|
8135
8540
|
key,
|
|
8136
8541
|
scope: scope ?? "workspace",
|
|
8137
|
-
value: isRecord2(event.data) ? event.data["value"] : void 0
|
|
8542
|
+
value: isRecord2(event.data) ? event.data["value"] : void 0,
|
|
8543
|
+
...mutation ? { mutation } : {}
|
|
8138
8544
|
}
|
|
8139
8545
|
];
|
|
8140
8546
|
}
|
|
@@ -8862,6 +9268,7 @@ __name(detectTabular, "detectTabular");
|
|
|
8862
9268
|
// packages/sdk-typescript/src/daemon/ui/transcript.ts
|
|
8863
9269
|
init_esbuild_shims();
|
|
8864
9270
|
var DEFAULT_MAX_BLOCKS = 1e3;
|
|
9271
|
+
var UNRECOGNIZED_DIAGNOSTICS_LIMIT = 50;
|
|
8865
9272
|
var TRIMMED_TOOL_BLOCK_ID = "__trimmed_tool_block__";
|
|
8866
9273
|
var TRIMMED_PERMISSION_BLOCK_ID = "__trimmed_permission_block__";
|
|
8867
9274
|
var MAX_TEXT_BLOCK_LENGTH = 1e5;
|
|
@@ -8880,6 +9287,7 @@ function createDaemonTranscriptState(opts = {}) {
|
|
|
8880
9287
|
activeThoughtBlockByParent: createIndex(),
|
|
8881
9288
|
// PR-E sidechannel: track current tool / approval mode / progress
|
|
8882
9289
|
toolProgress: createIndex(),
|
|
9290
|
+
unrecognizedDiagnostics: [],
|
|
8883
9291
|
awaitingResync: false,
|
|
8884
9292
|
resyncRequiredCount: 0,
|
|
8885
9293
|
nextOrdinal: 1,
|
|
@@ -8934,14 +9342,15 @@ function appendLocalUserTranscriptMessage(state, text, opts = {}) {
|
|
|
8934
9342
|
return trimTranscriptState(next);
|
|
8935
9343
|
}
|
|
8936
9344
|
__name(appendLocalUserTranscriptMessage, "appendLocalUserTranscriptMessage");
|
|
8937
|
-
var
|
|
9345
|
+
var FREEZE_TRANSCRIPT_COLLECTIONS = typeof process !== "undefined" && false;
|
|
8938
9346
|
function reduceDaemonTranscriptEvents(state, events, opts = {}) {
|
|
8939
9347
|
if (events.length === 0) return state;
|
|
8940
9348
|
const next = cloneTranscriptState(state, opts);
|
|
8941
9349
|
for (const event of events) applyDaemonTranscriptEvent(next, event);
|
|
8942
9350
|
const result = trimTranscriptState(next);
|
|
8943
|
-
if (
|
|
9351
|
+
if (FREEZE_TRANSCRIPT_COLLECTIONS) {
|
|
8944
9352
|
Object.freeze(result.blocks);
|
|
9353
|
+
Object.freeze(result.blockIndexById);
|
|
8945
9354
|
}
|
|
8946
9355
|
return result;
|
|
8947
9356
|
}
|
|
@@ -8954,6 +9363,28 @@ function rebuildDaemonTranscriptBlockIndex(blocks) {
|
|
|
8954
9363
|
return blockIndexById;
|
|
8955
9364
|
}
|
|
8956
9365
|
__name(rebuildDaemonTranscriptBlockIndex, "rebuildDaemonTranscriptBlockIndex");
|
|
9366
|
+
function userBlockForAttachment(next, event) {
|
|
9367
|
+
const activeUserIndex = next.activeUserBlockId ? next.blockIndexById[next.activeUserBlockId] : void 0;
|
|
9368
|
+
const activeUser = activeUserIndex !== void 0 ? next.blocks[activeUserIndex] : void 0;
|
|
9369
|
+
if (activeUser?.kind === "user" && stringArraysEqual(activeUser.sourceRecordIds, event.sourceRecordIds)) {
|
|
9370
|
+
const block2 = getWritableBlockById(next, activeUser.id);
|
|
9371
|
+
if (block2?.kind === "user") return block2;
|
|
9372
|
+
}
|
|
9373
|
+
const block = createTextBlock(
|
|
9374
|
+
next,
|
|
9375
|
+
"user",
|
|
9376
|
+
"",
|
|
9377
|
+
event.eventId,
|
|
9378
|
+
event.serverTimestamp,
|
|
9379
|
+
event.meta,
|
|
9380
|
+
event.sourceRecordIds,
|
|
9381
|
+
event.promptId
|
|
9382
|
+
);
|
|
9383
|
+
appendBlock(next, block);
|
|
9384
|
+
next.activeUserBlockId = block.id;
|
|
9385
|
+
return block;
|
|
9386
|
+
}
|
|
9387
|
+
__name(userBlockForAttachment, "userBlockForAttachment");
|
|
8957
9388
|
function applyDaemonTranscriptEvent(next, event) {
|
|
8958
9389
|
if (event.eventId !== void 0) {
|
|
8959
9390
|
next.lastEventId = Math.max(next.lastEventId ?? 0, event.eventId);
|
|
@@ -8980,31 +9411,25 @@ function applyDaemonTranscriptEvent(next, event) {
|
|
|
8980
9411
|
appendTextDelta(next, "user", "activeUserBlockId", event.text, event);
|
|
8981
9412
|
break;
|
|
8982
9413
|
case "user.image.delta": {
|
|
8983
|
-
const
|
|
8984
|
-
|
|
8985
|
-
|
|
8986
|
-
|
|
8987
|
-
|
|
8988
|
-
|
|
8989
|
-
|
|
8990
|
-
|
|
8991
|
-
|
|
8992
|
-
|
|
8993
|
-
|
|
8994
|
-
|
|
8995
|
-
|
|
8996
|
-
|
|
8997
|
-
|
|
8998
|
-
|
|
8999
|
-
|
|
9000
|
-
const block = getWritableBlockById(next, next.activeUserBlockId);
|
|
9001
|
-
if (block && block.kind === "user") {
|
|
9002
|
-
block.images = [
|
|
9003
|
-
...block.images ?? [],
|
|
9004
|
-
{ data: event.data, mimeType: event.mimeType }
|
|
9005
|
-
];
|
|
9414
|
+
const block = userBlockForAttachment(next, event);
|
|
9415
|
+
if (event.meta) block.meta = { ...block.meta, ...event.meta };
|
|
9416
|
+
block.images = [
|
|
9417
|
+
...block.images ?? [],
|
|
9418
|
+
{ data: event.data, mimeType: event.mimeType }
|
|
9419
|
+
];
|
|
9420
|
+
break;
|
|
9421
|
+
}
|
|
9422
|
+
case "user.file.delta": {
|
|
9423
|
+
const block = userBlockForAttachment(next, event);
|
|
9424
|
+
if (event.meta) block.meta = { ...block.meta, ...event.meta };
|
|
9425
|
+
block.files = [
|
|
9426
|
+
...block.files ?? [],
|
|
9427
|
+
{
|
|
9428
|
+
name: event.name,
|
|
9429
|
+
mimeType: event.mimeType,
|
|
9430
|
+
attachmentId: event.attachmentId
|
|
9006
9431
|
}
|
|
9007
|
-
|
|
9432
|
+
];
|
|
9008
9433
|
break;
|
|
9009
9434
|
}
|
|
9010
9435
|
case "assistant.text.delta":
|
|
@@ -9082,6 +9507,10 @@ function applyDaemonTranscriptEvent(next, event) {
|
|
|
9082
9507
|
break;
|
|
9083
9508
|
case "status":
|
|
9084
9509
|
case "debug":
|
|
9510
|
+
if (isUnrecognizedDiagnostic(event)) {
|
|
9511
|
+
appendUnrecognizedDiagnostic(next, event);
|
|
9512
|
+
break;
|
|
9513
|
+
}
|
|
9085
9514
|
appendStatusBlock(next, event.type, event.text, event, {
|
|
9086
9515
|
clearActiveText: event.clearActiveText
|
|
9087
9516
|
});
|
|
@@ -9521,6 +9950,8 @@ function discardToolBlock(state, toolCallId) {
|
|
|
9521
9950
|
takeBlocksOwnership(state);
|
|
9522
9951
|
state.blocks = state.blocks.filter((block) => block.id !== blockId);
|
|
9523
9952
|
state.blockIndexById = rebuildDaemonTranscriptBlockIndex(state.blocks);
|
|
9953
|
+
ownedBlocks.set(state, state.blocks);
|
|
9954
|
+
ownedBlockIndexes.set(state, state.blockIndexById);
|
|
9524
9955
|
delete state.toolBlockByCallId[toolCallId];
|
|
9525
9956
|
delete state.toolProgress[toolCallId];
|
|
9526
9957
|
if (state.currentToolCallId === toolCallId) {
|
|
@@ -9710,6 +10141,27 @@ function resolvePermissionBlock(state, event) {
|
|
|
9710
10141
|
clearActiveText(state);
|
|
9711
10142
|
}
|
|
9712
10143
|
__name(resolvePermissionBlock, "resolvePermissionBlock");
|
|
10144
|
+
function isUnrecognizedDiagnostic(event) {
|
|
10145
|
+
return event.type === "debug" && isUnrecognizedDiagnosticReason(event.debugReason);
|
|
10146
|
+
}
|
|
10147
|
+
__name(isUnrecognizedDiagnostic, "isUnrecognizedDiagnostic");
|
|
10148
|
+
function appendUnrecognizedDiagnostic(state, event) {
|
|
10149
|
+
state.activeUserBlockId = void 0;
|
|
10150
|
+
const diagnostic = {
|
|
10151
|
+
debugReason: event.debugReason,
|
|
10152
|
+
text: truncateTextAtLimit(event.text),
|
|
10153
|
+
clientReceivedAt: state.now,
|
|
10154
|
+
...event.promptId !== void 0 ? { promptId: event.promptId } : {},
|
|
10155
|
+
...event.sourceRecordIds !== void 0 ? { sourceRecordIds: event.sourceRecordIds } : {},
|
|
10156
|
+
...event.branchRecordId !== void 0 ? { branchRecordId: event.branchRecordId } : {},
|
|
10157
|
+
...event.originatorClientId !== void 0 ? { originatorClientId: event.originatorClientId } : {},
|
|
10158
|
+
...event.eventId !== void 0 ? { eventId: event.eventId } : {},
|
|
10159
|
+
...event.serverTimestamp !== void 0 ? { serverTimestamp: event.serverTimestamp } : {}
|
|
10160
|
+
};
|
|
10161
|
+
const diagnostics = [...state.unrecognizedDiagnostics, diagnostic];
|
|
10162
|
+
state.unrecognizedDiagnostics = diagnostics.length > UNRECOGNIZED_DIAGNOSTICS_LIMIT ? diagnostics.slice(-UNRECOGNIZED_DIAGNOSTICS_LIMIT) : diagnostics;
|
|
10163
|
+
}
|
|
10164
|
+
__name(appendUnrecognizedDiagnostic, "appendUnrecognizedDiagnostic");
|
|
9713
10165
|
function appendStatusBlock(state, kind, text, event, opts = {}) {
|
|
9714
10166
|
const blockId = allocateBlockId(state, kind);
|
|
9715
10167
|
const block = {
|
|
@@ -9818,7 +10270,10 @@ function cloneTranscriptState(state, opts) {
|
|
|
9818
10270
|
// unrelated dispatches lets `useSyncExternalStore` subscribers
|
|
9819
10271
|
// (e.g. `useDaemonFollowupSuggestion`) skip re-renders for events
|
|
9820
10272
|
// that don't touch the suggestion.
|
|
9821
|
-
lastFollowupSuggestion: state.lastFollowupSuggestion
|
|
10273
|
+
lastFollowupSuggestion: state.lastFollowupSuggestion,
|
|
10274
|
+
// Same reference-stability contract: the reducer replaces the whole
|
|
10275
|
+
// array when appending, never mutates it in-place.
|
|
10276
|
+
unrecognizedDiagnostics: state.unrecognizedDiagnostics
|
|
9822
10277
|
};
|
|
9823
10278
|
const onTruncation = opts.onTruncation ?? truncationCallbacks.get(state);
|
|
9824
10279
|
if (onTruncation) truncationCallbacks.set(next, onTruncation);
|
|
@@ -9833,6 +10288,7 @@ function trimTranscriptState(state) {
|
|
|
9833
10288
|
state.blocks = blocks;
|
|
9834
10289
|
state.blockIndexById = rebuildDaemonTranscriptBlockIndex(blocks);
|
|
9835
10290
|
ownedBlocks.set(state, state.blocks);
|
|
10291
|
+
ownedBlockIndexes.set(state, state.blockIndexById);
|
|
9836
10292
|
for (const [toolCallId, blockId] of Object.entries(state.toolBlockByCallId)) {
|
|
9837
10293
|
if (!keptIds.has(blockId)) {
|
|
9838
10294
|
state.toolBlockByCallId[toolCallId] = TRIMMED_TOOL_BLOCK_ID;
|
|
@@ -9894,13 +10350,19 @@ function shouldRecreateTrimmedToolBlock(event) {
|
|
|
9894
10350
|
}
|
|
9895
10351
|
__name(shouldRecreateTrimmedToolBlock, "shouldRecreateTrimmedToolBlock");
|
|
9896
10352
|
var ownedBlocks = /* @__PURE__ */ new WeakMap();
|
|
10353
|
+
var ownedBlockIndexes = /* @__PURE__ */ new WeakMap();
|
|
9897
10354
|
function takeBlocksOwnership(state) {
|
|
9898
10355
|
if (ownedBlocks.get(state) === state.blocks) return;
|
|
9899
10356
|
state.blocks = [...state.blocks];
|
|
9900
|
-
state.blockIndexById = createIndex(state.blockIndexById);
|
|
9901
10357
|
ownedBlocks.set(state, state.blocks);
|
|
9902
10358
|
}
|
|
9903
10359
|
__name(takeBlocksOwnership, "takeBlocksOwnership");
|
|
10360
|
+
function takeBlockIndexOwnership(state) {
|
|
10361
|
+
if (ownedBlockIndexes.get(state) === state.blockIndexById) return;
|
|
10362
|
+
state.blockIndexById = createIndex(state.blockIndexById);
|
|
10363
|
+
ownedBlockIndexes.set(state, state.blockIndexById);
|
|
10364
|
+
}
|
|
10365
|
+
__name(takeBlockIndexOwnership, "takeBlockIndexOwnership");
|
|
9904
10366
|
function rewindTranscriptToUserTurn(state, targetTurnIndex) {
|
|
9905
10367
|
let userTurnIndex = 0;
|
|
9906
10368
|
let lastUserIndex = -1;
|
|
@@ -9923,6 +10385,7 @@ function truncateTranscriptBeforeBlock(state, blockIndex) {
|
|
|
9923
10385
|
state.blocks = state.blocks.slice(0, blockIndex);
|
|
9924
10386
|
ownedBlocks.set(state, state.blocks);
|
|
9925
10387
|
rebuildTranscriptIndexes(state);
|
|
10388
|
+
ownedBlockIndexes.set(state, state.blockIndexById);
|
|
9926
10389
|
}
|
|
9927
10390
|
__name(truncateTranscriptBeforeBlock, "truncateTranscriptBeforeBlock");
|
|
9928
10391
|
function rebuildTranscriptIndexes(state) {
|
|
@@ -9956,6 +10419,7 @@ function rebuildTranscriptIndexes(state) {
|
|
|
9956
10419
|
__name(rebuildTranscriptIndexes, "rebuildTranscriptIndexes");
|
|
9957
10420
|
function appendBlock(state, block) {
|
|
9958
10421
|
takeBlocksOwnership(state);
|
|
10422
|
+
takeBlockIndexOwnership(state);
|
|
9959
10423
|
state.blockIndexById[block.id] = state.blocks.length;
|
|
9960
10424
|
state.blocks.push(block);
|
|
9961
10425
|
}
|
|
@@ -10019,15 +10483,20 @@ function appendBoundedText(state, block, text) {
|
|
|
10019
10483
|
return truncateText(state, block.id, block.sourceRecordIds, existing + text);
|
|
10020
10484
|
}
|
|
10021
10485
|
__name(appendBoundedText, "appendBoundedText");
|
|
10022
|
-
function
|
|
10486
|
+
function truncateTextAtLimit(text) {
|
|
10023
10487
|
if (text.length <= MAX_TEXT_BLOCK_LENGTH) return text;
|
|
10024
|
-
reportTextTruncation(state, blockId, sourceRecordIds);
|
|
10025
10488
|
const keepLength = Math.max(
|
|
10026
10489
|
0,
|
|
10027
10490
|
MAX_TEXT_BLOCK_LENGTH - TEXT_TRUNCATED_SUFFIX.length
|
|
10028
10491
|
);
|
|
10029
10492
|
return `${text.slice(0, keepLength)}${TEXT_TRUNCATED_SUFFIX}`;
|
|
10030
10493
|
}
|
|
10494
|
+
__name(truncateTextAtLimit, "truncateTextAtLimit");
|
|
10495
|
+
function truncateText(state, blockId, sourceRecordIds, text) {
|
|
10496
|
+
if (text.length <= MAX_TEXT_BLOCK_LENGTH) return text;
|
|
10497
|
+
reportTextTruncation(state, blockId, sourceRecordIds);
|
|
10498
|
+
return truncateTextAtLimit(text);
|
|
10499
|
+
}
|
|
10031
10500
|
__name(truncateText, "truncateText");
|
|
10032
10501
|
function reportTextTruncation(state, blockId, sourceRecordIds) {
|
|
10033
10502
|
truncationCallbacks.get(state)?.({
|
|
@@ -10120,6 +10589,10 @@ function selectLastFollowupSuggestion(state) {
|
|
|
10120
10589
|
return state.lastFollowupSuggestion;
|
|
10121
10590
|
}
|
|
10122
10591
|
__name(selectLastFollowupSuggestion, "selectLastFollowupSuggestion");
|
|
10592
|
+
function selectUnrecognizedDiagnostics(state) {
|
|
10593
|
+
return state.unrecognizedDiagnostics;
|
|
10594
|
+
}
|
|
10595
|
+
__name(selectUnrecognizedDiagnostics, "selectUnrecognizedDiagnostics");
|
|
10123
10596
|
function selectToolProgress(state, toolCallId) {
|
|
10124
10597
|
return state.toolProgress[toolCallId];
|
|
10125
10598
|
}
|
|
@@ -10563,6 +11036,8 @@ function daemonUiEventToTerminalText(event) {
|
|
|
10563
11036
|
return "";
|
|
10564
11037
|
case "user.image.delta":
|
|
10565
11038
|
return `[image: ${sanitizeTerminalText(event.mimeType)}]`;
|
|
11039
|
+
case "user.file.delta":
|
|
11040
|
+
return `[file: ${sanitizeTerminalText(event.name)}]`;
|
|
10566
11041
|
default:
|
|
10567
11042
|
return assertNever(event);
|
|
10568
11043
|
}
|
|
@@ -11497,6 +11972,7 @@ export {
|
|
|
11497
11972
|
DAEMON_PLAN_TOOL_CALL_ID,
|
|
11498
11973
|
DAEMON_UI_CONFORMANCE_FIXTURES,
|
|
11499
11974
|
DAEMON_UI_DEBUG_REASONS,
|
|
11975
|
+
DAEMON_UI_UNRECOGNIZED_DIAGNOSTIC_REASONS,
|
|
11500
11976
|
DEVICE_FLOW_EXPIRY_GRACE_MS,
|
|
11501
11977
|
DaemonAuthFlow,
|
|
11502
11978
|
DaemonCapabilityMissingError,
|
|
@@ -11512,6 +11988,7 @@ export {
|
|
|
11512
11988
|
PENDING_PROMPT_COMPLETED_EVENT,
|
|
11513
11989
|
PENDING_PROMPT_STARTED_EVENT,
|
|
11514
11990
|
SseFramingError,
|
|
11991
|
+
UNRECOGNIZED_DIAGNOSTICS_LIMIT,
|
|
11515
11992
|
WorkspaceDaemonClient,
|
|
11516
11993
|
appendLocalUserTranscriptMessage,
|
|
11517
11994
|
asKnownDaemonEvent,
|
|
@@ -11540,6 +12017,7 @@ export {
|
|
|
11540
12017
|
isStaleBranchPointError,
|
|
11541
12018
|
isSubagentChildBlock,
|
|
11542
12019
|
isSubagentSessionNotFound,
|
|
12020
|
+
isUnrecognizedDiagnosticReason,
|
|
11543
12021
|
isWorkspaceScopedBudgetEvent,
|
|
11544
12022
|
matchTurnEvent,
|
|
11545
12023
|
normalizeDaemonEvent,
|
|
@@ -11562,6 +12040,7 @@ export {
|
|
|
11562
12040
|
selectToolProgress,
|
|
11563
12041
|
selectTranscriptBlocks,
|
|
11564
12042
|
selectTranscriptBlocksOrderedByEventId,
|
|
12043
|
+
selectUnrecognizedDiagnostics,
|
|
11565
12044
|
stringifyJson as stringifyDaemonUiJson,
|
|
11566
12045
|
stripOscSequences as stripDaemonOscSequences,
|
|
11567
12046
|
transcriptBlockToTerminalText
|