@qwen-code/qwen-code 0.23.0 → 0.23.1-preview.1
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/new-app/SKILL.md +1 -1
- package/bundled/qc-helper/docs/configuration/auth.md +84 -12
- package/bundled/qc-helper/docs/configuration/settings.md +76 -74
- package/bundled/qc-helper/docs/features/arena.md +15 -20
- package/bundled/qc-helper/docs/features/channels/overview.md +7 -2
- package/bundled/qc-helper/docs/features/code-review.md +22 -19
- package/bundled/qc-helper/docs/features/commands.md +51 -10
- package/bundled/qc-helper/docs/features/followup-suggestions.md +1 -1
- package/bundled/qc-helper/docs/features/goals.md +8 -0
- package/bundled/qc-helper/docs/features/headless.md +2 -2
- package/bundled/qc-helper/docs/features/hooks.md +19 -19
- package/bundled/qc-helper/docs/features/output-styles.md +35 -2
- package/bundled/qc-helper/docs/qwen-serve.md +67 -52
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +3 -1
- package/bundled/qc-helper/docs/support/troubleshooting.md +3 -3
- package/bundled/review/SKILL.md +45 -41
- package/bundled/review/references/aone.md +1 -1
- package/bundled/review/references/posting.md +1 -1
- package/bundled/workflow-creator/SKILL.md +48 -0
- package/bundled/zvec-grep-install/SKILL.md +57 -0
- package/chunks/MaxSizedBox-5ARLO5PR.js +116 -0
- package/chunks/{StandaloneSessionPicker-QUMO4LLQ.js → StandaloneSessionPicker-T6B322CB.js} +87 -82
- package/chunks/{acp-startup-profiler-M4X5F3VK.js → acp-startup-profiler-6ULXXQMS.js} +2 -2
- package/chunks/{acpAgent-2GTFCIEP.js → acpAgent-WTDEY5KD.js} +1041 -364
- package/chunks/{agent-XKF5SZWU.js → agent-NXPUXEVZ.js} +46 -43
- package/chunks/agent-headless-QQZTWOKO.js +88 -0
- package/chunks/{anthropicContentGenerator-L76MR5OR.js → anthropicContentGenerator-6XDHXIII.js} +16 -9
- package/chunks/{artifact-tool-MYCL2QCS.js → artifact-tool-DFVVJXL2.js} +3 -3
- package/chunks/askUserQuestion-GF7VQ44M.js +14 -0
- package/chunks/bridge-OHY5OGOZ.js +123 -0
- package/chunks/{ca-BNU7YNDE.js → ca-KC2AISNS.js} +1 -0
- package/chunks/{channel-management-service-4MTCEGJB.js → channel-management-service-ZDDG3G5S.js} +4 -4
- package/chunks/channel-settings-store-7BJAS2SU.js +126 -0
- package/chunks/{channel-worker-group-47F4ISUZ.js → channel-worker-group-2ISMRENV.js} +6 -6
- package/chunks/{channel-worker-manager-I5Y44GYR.js → channel-worker-manager-VSRPVPRH.js} +6 -6
- package/chunks/{channel-worker-supervisor-6VCLUXFE.js → channel-worker-supervisor-SRJBK72Z.js} +4 -4
- package/chunks/{chunk-5RTTI4GE.js → chunk-2RYWGYB3.js} +4 -3
- package/chunks/{chunk-FUO5V5KI.js → chunk-2UWQX4FP.js} +2 -2
- package/chunks/{chunk-L26ONV2Y.js → chunk-2WGJG2KW.js} +9 -8
- package/chunks/{chunk-JHN7UIDW.js → chunk-2XRE4KE4.js} +1 -1
- package/chunks/chunk-32CM56LO.js +20 -0
- package/chunks/{chunk-SI7WDR3U.js → chunk-32YDNYXP.js} +129 -14
- package/chunks/{chunk-ZHO2CW6D.js → chunk-3CZ2BQV6.js} +1 -1
- package/chunks/{chunk-FD5SJOWT.js → chunk-3K456UJF.js} +9 -4
- package/chunks/{chunk-5M6IDOMF.js → chunk-3K65MUKD.js} +105 -0
- package/chunks/chunk-3UMWOKJC.js +78 -0
- package/chunks/{chunk-UM2FFKXN.js → chunk-43JNQAHO.js} +3 -3
- package/chunks/{chunk-KM3XVTMO.js → chunk-43NOB5NM.js} +112 -12
- package/chunks/{chunk-G5PBOQWI.js → chunk-47BZVBTE.js} +3 -3
- package/chunks/{chunk-32LU3APX.js → chunk-4F2QRVW6.js} +1 -1
- package/chunks/{chunk-KMU3ZHH4.js → chunk-4HC4DYKN.js} +2 -2
- package/chunks/{chunk-22UH7VTP.js → chunk-4HOEU2OR.js} +1 -1
- package/chunks/{chunk-NXKOVOM5.js → chunk-4IQKBLTQ.js} +15 -9
- package/chunks/{chunk-M4KFODIP.js → chunk-4JAGXZR3.js} +1 -1
- package/chunks/{chunk-PDAKFU7M.js → chunk-4LIPOIXS.js} +1 -1
- package/chunks/{chunk-LEPCWS5A.js → chunk-4MCY33Y2.js} +3 -3
- package/chunks/{chunk-U6D2PPMN.js → chunk-4VUVBN3Y.js} +1 -1
- package/chunks/{chunk-37JFWFCD.js → chunk-4VZCORNT.js} +1 -1
- package/chunks/{daemon-RKDGBFLK.js → chunk-537SQ2AI.js} +2216 -1721
- package/chunks/{chunk-VNAYZAFX.js → chunk-54TF2ZIQ.js} +4 -4
- package/chunks/{chunk-OKTNXDVO.js → chunk-565U2ANU.js} +1 -1
- package/chunks/chunk-5ETULJLP.js +74 -0
- package/chunks/{chunk-ADYN7P2Y.js → chunk-5JLQWQK6.js} +8 -6
- package/chunks/{chunk-BFY33IB4.js → chunk-5MTARK4Y.js} +7 -7
- package/chunks/{chunk-BJXCYUGM.js → chunk-5YY5MZT6.js} +1 -1
- package/chunks/{chunk-4PSDSCW3.js → chunk-64MQTIX7.js} +3 -3
- package/chunks/{chunk-54C6PIGT.js → chunk-6UIACMGH.js} +3 -3
- package/chunks/{chunk-ALUYNJPM.js → chunk-7BZS4ZDV.js} +1362 -1140
- package/chunks/{chunk-LB3WQQJK.js → chunk-7OCIQNKX.js} +2 -2
- package/chunks/{chunk-QKDNS6FU.js → chunk-7VEYUF3N.js} +13 -2
- package/chunks/{chunk-AZJLY2XZ.js → chunk-AHBLRVD5.js} +5 -5
- package/chunks/{chunk-VWTSRH6C.js → chunk-AQ5NAGWI.js} +89 -17
- package/chunks/{chunk-MOF6VZN2.js → chunk-AXPOOQAW.js} +2 -2
- package/chunks/{chunk-CVX63TFJ.js → chunk-B44JBZBB.js} +3 -3
- package/chunks/{chunk-AI35S34R.js → chunk-B54PFQS5.js} +3 -3
- package/chunks/{chunk-373DQUVA.js → chunk-BF3RUIVP.js} +5 -4
- package/chunks/{chunk-RJUVTJEZ.js → chunk-BKNY7PDI.js} +1 -1
- package/chunks/{chunk-UKYXYWI2.js → chunk-BUQN5LTI.js} +2 -2
- package/chunks/{chunk-O5CD7T4T.js → chunk-BW4333PP.js} +0 -95
- package/chunks/{chunk-UPFRILIL.js → chunk-CWNC7M73.js} +2 -2
- package/chunks/{chunk-3L724BJ5.js → chunk-CZACBHAW.js} +6 -6
- package/chunks/{chunk-EBDGRBZX.js → chunk-D4CU6DKR.js} +6 -6
- package/chunks/{chunk-G7HBEEX7.js → chunk-D6PIMKY3.js} +9 -9
- package/chunks/{chunk-ENYUKMFK.js → chunk-DJXSOEFB.js} +1 -1
- package/chunks/{chunk-C2VWOXHS.js → chunk-DNPHKA72.js} +8 -8
- package/chunks/{chunk-UUASLXHW.js → chunk-E4L5BM2B.js} +5 -5
- package/chunks/{chunk-HT5S5TRQ.js → chunk-EDIDYZBT.js} +4 -11
- package/chunks/{chunk-5H5S4UY5.js → chunk-EFT7OMDN.js} +1 -1
- package/chunks/{chunk-GB4UKWY5.js → chunk-EJNYBDYC.js} +2 -2
- package/chunks/{chunk-NQ4L2CMD.js → chunk-ER273QE6.js} +53 -9
- package/chunks/{chunk-RKW36UWC.js → chunk-EWNKP4V4.js} +1 -1
- package/chunks/{chunk-UJ4DUYIH.js → chunk-F53KKZUD.js} +2 -2
- package/chunks/{chunk-EFTPIZIC.js → chunk-FDOGGKAA.js} +21 -0
- package/chunks/{chunk-AQ37AY7B.js → chunk-FKJM6JKY.js} +5 -0
- package/chunks/{chunk-KEVYJSI4.js → chunk-G34YLYCS.js} +13 -13
- package/chunks/{chunk-P6UIF2OW.js → chunk-GCFZ2LAX.js} +195 -10
- package/chunks/{chunk-VGHZT6JR.js → chunk-GELRJXE2.js} +1 -1
- package/chunks/{chunk-ZDFQGHZH.js → chunk-GMNLYQOS.js} +1 -1
- package/chunks/{chunk-KOGW3YWJ.js → chunk-GVVCLL2P.js} +12 -12
- package/chunks/{chunk-OSSTATJF.js → chunk-GXZHYPHZ.js} +428 -30
- package/chunks/{chunk-IPATA3T2.js → chunk-GZWW2QWR.js} +2 -2
- package/chunks/{chunk-C4TIXFDZ.js → chunk-H3UDNQLO.js} +6 -4
- package/chunks/chunk-HD7O6WLV.js +18 -0
- package/chunks/{chunk-4UANMABT.js → chunk-HFTB354P.js} +259 -49
- package/chunks/{chunk-LOBDDFYK.js → chunk-HJ34U5J4.js} +5 -5
- package/chunks/{chunk-M4LBBSVP.js → chunk-HY3DXYZK.js} +2 -2
- package/chunks/{chunk-4F7GQGXB.js → chunk-I72PHOKL.js} +1451 -415
- package/chunks/{chunk-YPWZTR7F.js → chunk-IFD3BTEA.js} +3 -3
- package/chunks/{chunk-EWRW2WQC.js → chunk-IKLFS6SC.js} +5 -5
- package/chunks/{chunk-VPSIC437.js → chunk-IQN2CCIE.js} +66 -6
- package/chunks/{chunk-F7NF2IOE.js → chunk-IXSGOSEG.js} +7 -7
- package/chunks/{chunk-ODZF64DM.js → chunk-IZ2U57NY.js} +1 -1
- package/chunks/{chunk-4BGDFKQE.js → chunk-J3O5I5ZD.js} +24 -7
- package/chunks/{chunk-DYTW3QVG.js → chunk-J6MB5ZHZ.js} +1 -1
- package/chunks/{chunk-HJBHMANB.js → chunk-JBTZUFR4.js} +11 -8
- package/chunks/{chunk-SRF4KTAG.js → chunk-JLWFGYXU.js} +4 -4
- package/chunks/{chunk-SX2QIMJV.js → chunk-JOPC3FND.js} +5 -5
- package/chunks/chunk-JPEAQJNS.js +2142 -0
- package/chunks/{chunk-ZTPGUFQV.js → chunk-JRYL3T2O.js} +24 -5
- package/chunks/{chunk-GXUTFQXK.js → chunk-KE3Q4JMY.js} +4 -4
- package/chunks/{chunk-LKODFJRD.js → chunk-KFFCDLKV.js} +1 -1
- package/chunks/{chunk-4M24B5J5.js → chunk-KJJPJYHI.js} +79 -30
- package/chunks/chunk-KK2GZGBK.js +21080 -0
- package/chunks/{chunk-64QH2UC6.js → chunk-KPXRFTT7.js} +12 -1
- package/chunks/{chunk-JZWOCUZ3.js → chunk-L4R7BCVV.js} +1 -1
- package/chunks/{chunk-IG4W5SJR.js → chunk-LDS57224.js} +3 -3
- package/chunks/{chunk-UAKRDON5.js → chunk-LK7S2D6V.js} +4 -4
- package/chunks/{chunk-4HVH57J3.js → chunk-LMJQSPWB.js} +21 -6
- package/chunks/{chunk-ANVG3BVV.js → chunk-LNYV4GXX.js} +13 -3
- package/chunks/{chunk-RM4WT2XB.js → chunk-LPBQODMR.js} +4 -4
- package/chunks/{chunk-XEAAO654.js → chunk-M3JGHRMQ.js} +1 -1
- package/chunks/{chunk-AMDSOFFV.js → chunk-MATEIJZF.js} +1 -0
- package/chunks/{chunk-LHBNR6EU.js → chunk-MNEYUNOE.js} +2 -2
- package/chunks/{chunk-I4NRYS6A.js → chunk-MUZCSTOO.js} +11 -11
- package/chunks/{chunk-I5N4EAS6.js → chunk-MWHY26G3.js} +1 -1
- package/chunks/{chunk-7XL4WRXM.js → chunk-N6VQ37ZZ.js} +2 -2
- package/chunks/{chunk-AHYTURFB.js → chunk-N7EYO2E7.js} +1 -1
- package/chunks/{chunk-LU77UT4D.js → chunk-N7VURC4O.js} +24 -26
- package/chunks/{chunk-DSX7KQPM.js → chunk-NAKALAL4.js} +227 -29
- package/chunks/{chunk-QQD2GART.js → chunk-NGX4NUNP.js} +3 -3
- package/chunks/{chunk-2M3EWQNG.js → chunk-NUQFUXOG.js} +17 -1
- package/chunks/{chunk-E4JNFXNI.js → chunk-NXWYCSPL.js} +3 -3
- package/chunks/{chunk-6A2D4QSO.js → chunk-O2GG7H4C.js} +4 -4
- package/chunks/{chunk-ZKFTS3OV.js → chunk-O45WBTNS.js} +6 -6
- package/chunks/{chunk-KGV55H53.js → chunk-OECNP26L.js} +1 -1
- package/chunks/{chunk-S6H3ELPG.js → chunk-P4RUUG64.js} +1 -1
- package/chunks/{chunk-GH2S4GD5.js → chunk-P5LDR7FI.js} +21 -68
- package/chunks/{chunk-RN3YGDCA.js → chunk-P6LATTDG.js} +4 -4
- package/chunks/{chunk-WP4AX3XD.js → chunk-PTFFWTTO.js} +3 -3
- package/chunks/{chunk-DTVQSSNM.js → chunk-PZUOHCWI.js} +3 -3
- package/chunks/{chunk-VYIUNFEA.js → chunk-PZV2FASB.js} +3 -3
- package/chunks/{chunk-XLXAZLDR.js → chunk-Q2SAQTEJ.js} +1 -1
- package/chunks/{chunk-47RYEQW5.js → chunk-QMFOYPGV.js} +2 -2
- package/chunks/{chunk-SULZPKTA.js → chunk-QSC5YOEC.js} +3 -3
- package/chunks/{chunk-F33GFWPR.js → chunk-QWZOOIR3.js} +58 -18
- package/chunks/{chunk-H43PSPYS.js → chunk-R355CUNQ.js} +4 -4
- package/chunks/{chunk-DQCKVAF5.js → chunk-RDKXZ2LS.js} +3 -3
- package/chunks/{chunk-7JMGTOH7.js → chunk-RPBMP6BN.js} +21 -1
- package/chunks/{chunk-5Q5RC2WE.js → chunk-RVNS7NWN.js} +2 -2
- package/chunks/{chunk-7RB56BRJ.js → chunk-SAZS4IWW.js} +6 -4
- package/chunks/{chunk-5EIOJGCR.js → chunk-SFMCYMVF.js} +4 -4
- package/chunks/{chunk-TMKTOTMQ.js → chunk-SN5FV4FY.js} +5 -5
- package/chunks/{chunk-QJGYU5PG.js → chunk-TDP7UULF.js} +1 -1
- package/chunks/{chunk-EIJT2PQ6.js → chunk-TIGXX4PA.js} +2 -2
- package/chunks/{chunk-PCRBLMIN.js → chunk-TMWB67LS.js} +21 -3
- package/chunks/{chunk-JUARRUMA.js → chunk-UEZOXZNI.js} +1358 -646
- package/chunks/{chunk-KFN2IZYR.js → chunk-UKADFFL2.js} +3 -3
- package/chunks/{chunk-TJYRTS4S.js → chunk-UKKYOIVT.js} +2 -2
- package/chunks/{chunk-EVFDRBUM.js → chunk-URSCX7S7.js} +12 -7
- package/chunks/{chunk-U4DJ5XB3.js → chunk-VDXYYVCD.js} +269 -70
- package/chunks/{chunk-4LIFGNI4.js → chunk-VEFRT7NX.js} +1 -1
- package/chunks/chunk-VFFQAOPR.js +18 -0
- package/chunks/{chunk-3AKCBZVW.js → chunk-VU7O7CGQ.js} +3 -3
- package/chunks/{chunk-RAFQIHN2.js → chunk-VUSSAGKI.js} +76 -5
- package/chunks/{chunk-TQHPVKO6.js → chunk-VY6UVU7G.js} +6 -6
- package/chunks/{chunk-S2T7H5MI.js → chunk-W4LL5RZO.js} +1 -1
- package/chunks/{chunk-ZGCKTAL5.js → chunk-WEXA2DNG.js} +2 -0
- package/chunks/{chunk-NVVJTUSL.js → chunk-WR3SH3EY.js} +136 -85
- package/chunks/{chunk-JR42V4UY.js → chunk-WTW36TJ3.js} +1 -1
- package/chunks/{chunk-TSZSGQ3N.js → chunk-WXC6OAWD.js} +1 -1
- package/chunks/{chunk-ZVP4PWBU.js → chunk-X35VIWWJ.js} +1 -1
- package/chunks/{chunk-KHP66DFN.js → chunk-XFFRI3WM.js} +1 -1
- package/chunks/{chunk-EIY7SUPZ.js → chunk-XHGGYCTA.js} +1 -1
- package/chunks/{chunk-BA4WJC4L.js → chunk-XOVVCGZX.js} +1 -1
- package/chunks/{chunk-VBWD6C27.js → chunk-XUSOYE2I.js} +1 -1
- package/chunks/{chunk-NUHOLAQ6.js → chunk-XWJFDJZK.js} +1 -1
- package/chunks/{chunk-65HWLGA7.js → chunk-XY3USGFE.js} +3 -3
- package/chunks/{chunk-STCVJXQB.js → chunk-Y3ZKI4RQ.js} +56 -26
- package/chunks/{chunk-QAK5475D.js → chunk-Y53DG2HA.js} +1 -1
- package/chunks/{chunk-3JQZVCBI.js → chunk-YCDL2SAS.js} +2 -2
- package/chunks/{chunk-NSUKQ4DN.js → chunk-YHDGABDC.js} +3 -3
- package/chunks/{chunk-FRICLXCZ.js → chunk-Z6WZPXQH.js} +3 -3
- package/chunks/{chunk-EAHOJF6V.js → chunk-ZAFYHRVY.js} +12 -0
- package/chunks/{chunk-MP6YZ4RK.js → chunk-ZAZ3NFL6.js} +852 -309
- package/chunks/{chunk-7TBU7PU2.js → chunk-ZSTCM3MX.js} +1 -1
- package/chunks/{chunk-NRL5CUZT.js → chunk-ZTAVGFKA.js} +1 -1
- package/chunks/config-utils-QXDOTXEQ.js +119 -0
- package/chunks/contextCommand-RN4KARWC.js +112 -0
- package/chunks/{core-runtime-B4UKKIAQ.js → core-runtime-NAZCOKHB.js} +63 -58
- package/chunks/{create-sub-session-NJ24B4US.js → create-sub-session-BCSM4WKB.js} +61 -56
- package/chunks/{create-sub-session-LUPWEUHR.js → create-sub-session-BQ3SE4TX.js} +3 -3
- package/chunks/{cron-create-CRSPET3H.js → cron-create-D6HQ7I7I.js} +4 -4
- package/chunks/{cron-delete-DB77SZTU.js → cron-delete-KK3D2SQV.js} +4 -4
- package/chunks/{cron-list-U2JNYWV6.js → cron-list-VBF3IZMF.js} +4 -4
- package/chunks/daemon-LCUELM6E.js +191 -0
- package/chunks/{daemon-git-worktree-guard-O2HPOBAB.js → daemon-git-worktree-guard-3K5CAU36.js} +62 -57
- package/chunks/daemon-status-provider-4X3ZZQTZ.js +122 -0
- package/chunks/daemon-trust-policy-R45CFUJA.js +118 -0
- package/chunks/{daemon-trust-policy-monitor-JL7F4Y4Q.js → daemon-trust-policy-monitor-DSSFCO3K.js} +69 -64
- package/chunks/{de-T4BLOKEC.js → de-UU2YTO37.js} +1 -0
- package/chunks/deferred-core-runtime-UO2M6WYI.js +120 -0
- package/chunks/{display-image-73C7XNRK.js → display-image-EVVTBVYE.js} +6 -6
- package/chunks/{dist-EDHQIBYD.js → dist-3T5MDUHP.js} +62 -20
- package/chunks/{dist-ZCJLKQSP.js → dist-AFH3BMZZ.js} +18 -10
- package/chunks/{dist-LXFYIJNG.js → dist-MK5PPBRF.js} +40 -9
- package/chunks/{dist-GT64AAUR.js → dist-PH5RSTEA.js} +56 -20
- package/chunks/{dist-62OZ7QXB.js → dist-QUU7TVE3.js} +35 -12
- package/chunks/{dist-JVXT4VUJ.js → dist-R5Y34V6T.js} +11 -2
- package/chunks/{dist-L6URO6CK.js → dist-SB2XRXZA.js} +5 -1
- package/chunks/{dist-QAF5DO3Y.js → dist-SIHF5MU2.js} +326 -131
- package/chunks/{dist-PDGNRVPY.js → dist-UVHW2U56.js} +20 -1
- package/chunks/earlyInputCapture-BXP7V2P3.js +22 -0
- package/chunks/{edit-SUGXY63Y.js → edit-VNBCTRWP.js} +48 -44
- package/chunks/{en-2RATMNX7.js → en-JMR535HP.js} +3 -1
- package/chunks/{enter-worktree-B6USKSIK.js → enter-worktree-CEVK7MQ2.js} +7 -7
- package/chunks/{enterPlanMode-MDX4RVVL.js → enterPlanMode-4KMZMUIA.js} +48 -45
- package/chunks/environment-S2HYQDON.js +135 -0
- package/chunks/errors-DAAN5TL7.js +119 -0
- package/chunks/{exit-worktree-DLQ73SJH.js → exit-worktree-D3YE6MUN.js} +7 -7
- package/chunks/exitPlanMode-HR36HG3D.js +86 -0
- package/chunks/{fast-path-Y73R42LV.js → fast-path-4IWSW3UV.js} +3 -3
- package/chunks/{fast-path-settings-MFUR3IWK.js → fast-path-settings-ISEJPRYE.js} +6 -4
- package/chunks/{fr-BGHGYX6A.js → fr-HKNWVXRJ.js} +1 -0
- package/chunks/{glob-DMGH7EZN.js → glob-IZYB2XH2.js} +46 -43
- package/chunks/{goal-tools-3RF3PXCL.js → goal-tools-VGUPKQDJ.js} +46 -43
- package/chunks/{grep-AJVLCVXC.js → grep-OUVLNXG7.js} +9 -8
- package/chunks/handleAutoUpdate-D56FMDTW.js +115 -0
- package/chunks/i18n-BKE5WO6T.js +130 -0
- package/chunks/{image-gen-VOIDOHOB.js → image-gen-SHVQ3XID.js} +8 -8
- package/chunks/initializer-MS4SGEHF.js +119 -0
- package/chunks/installationInfo-542MGC4S.js +113 -0
- package/chunks/{ja-G3FTD5XE.js → ja-GJS5RZGU.js} +1 -0
- package/chunks/{keychain-token-storage-REZVMJA6.js → keychain-token-storage-NQ5XWIPX.js} +2 -2
- package/chunks/list-H6XTKUWL.js +122 -0
- package/chunks/{list-agents-SBMONIUK.js → list-agents-ULYBGJXC.js} +6 -6
- package/chunks/{llm-K26SUDVK.js → llm-3NUC4EJY.js} +132 -113
- package/chunks/{llm-content-generator-TT6EAUD4.js → llm-content-generator-R4NL3OQN.js} +40 -13
- package/chunks/loadedSettingsAdapter-3XLKYDVT.js +116 -0
- package/chunks/{loggingContentGenerator-EYQBA4M4.js → loggingContentGenerator-ZYSWVNEO.js} +55 -52
- package/chunks/{loop-wakeup-QA6SHCZT.js → loop-wakeup-B27BEYRL.js} +5 -5
- package/chunks/{lowlight-J2OZNPCA.js → lowlight-BTE423KL.js} +3 -6
- package/chunks/{ls-HEJNCEYO.js → ls-3IIMMVKF.js} +5 -4
- package/chunks/{lsp-WOQKNZP6.js → lsp-VJAT7XKS.js} +2 -2
- package/chunks/{managed-npm-update-HIJTODQT.js → managed-npm-update-L2I53ZAI.js} +62 -57
- package/chunks/mcp-4PIXQASW.js +116 -0
- package/chunks/{monitor-DKNZQAB2.js → monitor-O2YQTOZZ.js} +50 -46
- package/chunks/{node-UETAYMMO.js → node-ISQAFKIS.js} +2 -2
- package/chunks/nonInteractiveCli-LV7CDBA2.js +198 -0
- package/chunks/{notebook-edit-MGHTRL2D.js → notebook-edit-4RE2ALH4.js} +48 -44
- package/chunks/{openaiContentGenerator-ZJIEQ3ZJ.js → openaiContentGenerator-7ND7K5CP.js} +30 -25
- package/chunks/pidfile-UFTLQ7NP.js +117 -0
- package/chunks/{processUtils-UY3SAJJZ.js → processUtils-3XBB4FYV.js} +2 -2
- package/chunks/prompt-terminal-ledger-2QASOGMM.js +111 -0
- package/chunks/{pt-D73IFYT7.js → pt-FXMYXEUV.js} +1 -0
- package/chunks/{qwenContentGenerator-VI4KATRY.js → qwenContentGenerator-AELTUTH6.js} +52 -49
- package/chunks/{qwenOAuth2-7AOCKSOQ.js → qwenOAuth2-BS5D2LYV.js} +7 -7
- package/chunks/{read-file-P7F4P7LV.js → read-file-PDWHZPHX.js} +13 -11
- package/chunks/{read-mcp-resource-GLAGB6R7.js → read-mcp-resource-YXJZ75UB.js} +2 -2
- package/chunks/{record-artifact-SWVR7NSU.js → record-artifact-WJDOV6XU.js} +4 -4
- package/chunks/{report-findings-AL5YW3KI.js → report-findings-Q4UACKWR.js} +5 -5
- package/chunks/{request-shutdown-5YK4IZ54.js → request-shutdown-2YZ3E3GH.js} +8 -8
- package/chunks/resumeHistoryUtils-QRXZEEBA.js +124 -0
- package/chunks/ripGrep-KSOOLE6H.js +39 -0
- package/chunks/{ru-QMISLKRH.js → ru-RMHURE5U.js} +1 -0
- package/chunks/{run-qwen-serve-OGTEEUR2.js → run-qwen-serve-RTAREPT6.js} +84 -70
- package/chunks/runtime-ESFSCJRZ.js +154 -0
- package/chunks/scheduled-tasks-6ZHRNBH6.js +133 -0
- package/chunks/{scheduler-73YXGUGW.js → scheduler-DQI6KV7T.js} +63 -58
- package/chunks/{sdk-exporters-http-3JO5TJNU.js → sdk-exporters-http-7R2ARBPV.js} +2 -2
- package/chunks/{sdk-impl-HZAUUTHJ.js → sdk-impl-YOLO7LV4.js} +4 -4
- package/chunks/{send-message-JC7NJTY6.js → send-message-PQCVSVMN.js} +24 -24
- package/chunks/serve-FY7ZEW52.js +124 -0
- package/chunks/{server-AOYZVVOM.js → server-KNDY6K5F.js} +1594 -273
- package/chunks/{session-UAWFNFGI.js → session-MCEPXAZP.js} +113 -105
- package/chunks/session-attachments-root-OLNAE6GF.js +109 -0
- package/chunks/{session-pr-refresh-CT2INROL.js → session-pr-refresh-HKJHQQQK.js} +67 -62
- package/chunks/{settings-BHRGDASJ.js → settings-VXO4WBMK.js} +68 -63
- package/chunks/shell-U263OTES.js +96 -0
- package/chunks/{skill-ZGBKNCHQ.js → skill-SDODGBKL.js} +19 -17
- package/chunks/skill-settings-YEIA22QJ.js +124 -0
- package/chunks/spawnChannel-4WJZVFPP.js +117 -0
- package/chunks/standalone-update-ZWVQUO64.js +124 -0
- package/chunks/{start-opentui-ui-FZ4USOU7.js → start-opentui-ui-BFYCJQRZ.js} +1199 -190
- package/chunks/{startInteractiveUI-E2WQJUOA.js → startInteractiveUI-JYAFCMHL.js} +2977 -2319
- package/chunks/{syntheticOutput-HJNZSEHN.js → syntheticOutput-AUAJBNXR.js} +3 -3
- package/chunks/{task-create-6RSD54S5.js → task-create-LD5ISM3E.js} +12 -12
- package/chunks/{task-list-IQSACPOM.js → task-list-YISJ4RJA.js} +5 -5
- package/chunks/{task-stop-HE2LRQNW.js → task-stop-65ZOVATJ.js} +2 -2
- package/chunks/{task-update-XAJ2NYOA.js → task-update-AAN4ZVEY.js} +15 -15
- package/chunks/{team-create-SOKMYSQU.js → team-create-KU7MABNO.js} +47 -44
- package/chunks/{team-delete-NGNNKGMG.js → team-delete-XFRRTJTT.js} +5 -5
- package/chunks/{team-plan-approval-U7ZWXYAY.js → team-plan-approval-DPB377A3.js} +46 -43
- package/chunks/terminal-image-renderer-WGWRENOF.js +124 -0
- package/chunks/theme-manager-GBUFULSO.js +108 -0
- package/chunks/{todoWrite-5UTVUXHA.js → todoWrite-G7NT4IFP.js} +5 -5
- package/chunks/{tool-search-IAI2RVWT.js → tool-search-6YUXHBPT.js} +19 -17
- package/chunks/total-session-admission-54R2JQ5L.js +118 -0
- package/chunks/trustedFolders-KAJIDJTH.js +128 -0
- package/chunks/{update-relaunch-5RWKZAL3.js → update-relaunch-XM4IWBFD.js} +5 -5
- package/chunks/updateCheck-W6UZFURI.js +124 -0
- package/chunks/useAutoAcceptIndicator-LAWYHY3U.js +126 -0
- package/chunks/{validateNonInterActiveAuth-QPFEKATS.js → validateNonInterActiveAuth-7WCKHRN2.js} +109 -101
- package/chunks/{version-JKNG7YDH.js → version-3ZU43RJ6.js} +1 -1
- package/chunks/{web-fetch-X3AHIIHW.js → web-fetch-QHI2SQL4.js} +16 -14
- package/chunks/{web-search-K2FMOGS5.js → web-search-3KZZKWNY.js} +9 -8
- package/chunks/{workflow-TOLPAK5G.js → workflow-HRW7Y2X4.js} +330 -1667
- package/chunks/workspace-providers-status-KTGCWCPC.js +120 -0
- package/chunks/{workspace-registration-store-KQWVVW4Y.js → workspace-registration-store-LHLPPWNE.js} +1 -1
- package/chunks/workspace-registry-X34MLN52.js +127 -0
- package/chunks/workspace-runtime-coordinator-U4PW4P7K.js +128 -0
- package/chunks/workspace-service-KD7BCGYL.js +132 -0
- package/chunks/workspace-skills-status-YJGO6Y3T.js +119 -0
- package/chunks/{workspace-trust-reconciler-IBDFQBQS.js → workspace-trust-reconciler-EUYHISCH.js} +74 -69
- package/chunks/write-file-EBSB34NJ.js +91 -0
- package/chunks/{zh-25DF7OGK.js → zh-DVFYHRK5.js} +3 -1
- package/chunks/{zh-TW-5EDMZVGK.js → zh-TW-W2GNP2IU.js} +3 -1
- package/chunks/{zoom-image-IFXSN74N.js → zoom-image-UJ5VKWKP.js} +13 -11
- package/cli.js +13 -13
- package/export-transcript-document.js +617 -0
- package/locales/ca.js +1 -0
- package/locales/de.js +1 -0
- package/locales/en.js +5 -2
- package/locales/fr.js +1 -0
- package/locales/ja.js +1 -0
- package/locales/pt.js +1 -0
- package/locales/ru.js +1 -0
- package/locales/zh-TW.js +5 -2
- package/locales/zh.js +5 -2
- package/package.json +5 -4
- package/web-shell/assets/{abnfDiagram-VCTEODGH-Cxf7xE_Z.js → abnfDiagram-VCTEODGH-Dur--luQ.js} +1 -1
- package/web-shell/assets/{arc-ESi1eNkE.js → arc-tYLobxFi.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-D9l7-bDo.js → architectureDiagram-5GKGNRK7-IG6aXD03.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-Bc8DEasw.js → blockDiagram-NRAW4CY4-C6eBSkfA.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-Dimb2Hmh.js → c4Diagram-UCG6FXSJ-BrX3HJqB.js} +1 -1
- package/web-shell/assets/channel-uEkvKckd.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-jVDmOpAQ.js → chunk-2Q5K7J3B-B3fcJ8ee.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-DbG_SwdB.js → chunk-5VM5RSS4-CeC90yKM.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-QEc4cY1v.js → chunk-F27PBJKO-CW44RVki.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-iJ36lQ3X.js → chunk-G27WJ6UU-D1PAMukD.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-DuArnVtF.js → chunk-JWPE2WC7-Dt3Y2Fvx.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-DxOf1zwL.js → chunk-LCL6LL3I-CZHw2lLI.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-lVLu9Ild.js → chunk-POPQ4Y6H-ysNAdTGx.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-C6XYlIer.js → chunk-SVP7TREG-BdNXW6YQ.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-CiG2j2Ji.js → chunk-XXDRQBXY-DgqQ9UA8.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DuPsnhWS.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DuPsnhWS.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DGVHMMVm.js → cose-bilkent-JH36ORCC-BILImXzJ.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-D6cgpCnH.js → cynefin-OW5HDTMX-DR88Pund.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BKv4Z-UX.js → cynefinDiagram-5FMLGOSQ-BYFbfkA6.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-B4ABMIG-.js → dagre-3AP2YEHR-rfpyc6sX.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-DgCkp_Lm.js → diagram-S7CK7UJ4-BJxLmEwH.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-FG0FNokz.js → diagram-UQ7AKVKN-H34xm7k3.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-JgkP9qg-.js → diagram-VSXAHHWV-HYxhwNLx.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-ADh2x83l.js → diagram-VX7I27RA-BJazso8F.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-yXqoYF1J.js → diagram-Z3DM3KII-Clje1aNy.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-Duk83Ek_.js → ebnfDiagram-PWID7BFC-M93YBkFh.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-DMdvxySG.js → erDiagram-SSCWMZ5O-DY8XzSHU.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-DHjVgSji.js → flowDiagram-A5DVABFB-CE6Aylcq.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-DMM9DkCE.js → ganttDiagram-EL5Y4UJY-DI-5LL22.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-t_ug9vO8.js → gitGraphDiagram-WWUBYQGX-C7BZWElk.js} +1 -1
- package/web-shell/assets/index-CVyqwW7y.js +2142 -0
- package/web-shell/assets/{index-zqvnpGHv.js → index-DclFHns9.js} +1 -1
- package/web-shell/assets/index-FO7JXPnH.css +36 -0
- package/web-shell/assets/{infoDiagram-RXCK75RN-eT1fANNm.js → infoDiagram-RXCK75RN-CGUSy4Pc.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-k3evzZNn.js → ishikawaDiagram-5VMMS53U-B5BVks9q.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-CGim3EAi.js → journeyDiagram-EYS64GPL-CFh6Tf7h.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-WHfJo-22.js → kanban-definition-3QL26DDD-B7TlxP7c.js} +1 -1
- package/web-shell/assets/{layout-DkqIaFlJ.js → layout-Br_pZq2Q.js} +1 -1
- package/web-shell/assets/{linear-Bdkd3mCz.js → linear-BVlP6fte.js} +1 -1
- package/web-shell/assets/{mermaid.core-CGw0LkT_.js → mermaid.core-TrcYWoiF.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-C9V4rBvo.js → mindmap-definition-FBJOCRG2-BJ4LzqjZ.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-CwoI2T5G.js → pegDiagram-XKGWAZYB-1b_MxlOl.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-DaTmBmPG.js → pieDiagram-E7YTZNPT-B8zl0YhY.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-plh6MyGI.js → quadrantDiagram-AXDQQJYC-CIZO8ukl.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-D_b-S0iK.js → railroadDiagram-O6MQD6OU-CepHSbCj.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-zUzTN7VE.js → requirementDiagram-EFPCY7ZU-BCgxkcSW.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-m6AhoD0l.js → sankeyDiagram-P5KCCOFB-CE5CcoMM.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-Cwhzsine.js → sequenceDiagram-WJ2MYXX4-DvgHi-d5.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CcZuKIae.js → sizeCapture-X5ZJPWSS-T-fAsCPX.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-CFoiJwD_.js → stateDiagram-HBIQ2CUA-DYHaul-5.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-BcYho9a4.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-CgS9hcaV.js → swimlanes-XN3QIQJK-Dbz3Qiej.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-D6HsOIgX.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-Dzzc05t9.js → timeline-definition-24CTP7MA-9NVRts3N.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-DemK0f7Y.js → vennDiagram-4TSXK5OY-C7cb7vnH.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-CquLxtMr.js → wardleyDiagram-VM6X3IG4-CG-8Ddjm.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-BTBKTM5g.js → xychartDiagram-S5SC5T6Z-iGeYAcP4.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-B3D7545A.js +0 -111
- package/chunks/agent-headless-OC2IB55D.js +0 -85
- package/chunks/askUserQuestion-THQZMG44.js +0 -322
- package/chunks/bridge-IHSBI2YJ.js +0 -118
- package/chunks/channel-settings-store-BVKWAI2T.js +0 -121
- package/chunks/chunk-I2TMJPCV.js +0 -448
- package/chunks/chunk-QI27MKNQ.js +0 -4008
- package/chunks/config-utils-LVSYDLHZ.js +0 -114
- package/chunks/contextCommand-TZD7UAJK.js +0 -107
- package/chunks/daemon-status-provider-GRRVCJFW.js +0 -117
- package/chunks/daemon-trust-policy-YJL442BK.js +0 -113
- package/chunks/deferred-core-runtime-S32AYVZI.js +0 -115
- package/chunks/earlyInputCapture-BBPCIVZG.js +0 -108
- package/chunks/environment-VN6RXDVN.js +0 -130
- package/chunks/errors-UEY36PIT.js +0 -114
- package/chunks/exitPlanMode-EPHIEDAA.js +0 -83
- package/chunks/handleAutoUpdate-HVWQT2AU.js +0 -110
- package/chunks/i18n-5OR7NTRZ.js +0 -125
- package/chunks/initializer-JE5RQSOE.js +0 -114
- package/chunks/installationInfo-KO3CCSCK.js +0 -108
- package/chunks/list-3IORSFIY.js +0 -117
- package/chunks/loadedSettingsAdapter-KLLFZF3M.js +0 -111
- package/chunks/mcp-A2UEHETW.js +0 -111
- package/chunks/nonInteractiveCli-YA47F2F4.js +0 -190
- package/chunks/pidfile-ETHAZNMY.js +0 -112
- package/chunks/prompt-terminal-ledger-GZ747VYE.js +0 -106
- package/chunks/resumeHistoryUtils-DPZKFW24.js +0 -119
- package/chunks/ripGrep-C7LJKUPZ.js +0 -37
- package/chunks/runtime-LNBLEMZS.js +0 -149
- package/chunks/scheduled-tasks-FLDYZQOF.js +0 -128
- package/chunks/serve-3UR2H4CV.js +0 -119
- package/chunks/session-attachments-root-ZCGXQQTR.js +0 -104
- package/chunks/shell-YHOGC7TO.js +0 -93
- package/chunks/skill-settings-AKSP665O.js +0 -119
- package/chunks/spawnChannel-N25MBB6F.js +0 -112
- package/chunks/standalone-update-XGPWJDRN.js +0 -119
- package/chunks/terminal-image-renderer-KKM4OBLO.js +0 -117
- package/chunks/theme-manager-GQHF3A7T.js +0 -103
- package/chunks/total-session-admission-G4CGCSTG.js +0 -113
- package/chunks/trustedFolders-D2I3FDPB.js +0 -123
- package/chunks/updateCheck-ZXOQDFEI.js +0 -119
- package/chunks/useAutoAcceptIndicator-6EK4QGAH.js +0 -121
- package/chunks/workspace-providers-status-PCJK3RC7.js +0 -115
- package/chunks/workspace-registry-YNIOB6HJ.js +0 -122
- package/chunks/workspace-runtime-coordinator-WG2RNEN7.js +0 -123
- package/chunks/workspace-service-G4ZNBOFH.js +0 -127
- package/chunks/workspace-skills-status-FMTPPMWC.js +0 -114
- package/chunks/write-file-YTLFY2S5.js +0 -88
- package/web-shell/assets/channel-B7ohGDil.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DdFpqpfD.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DdFpqpfD.js +0 -1
- package/web-shell/assets/index-BGZRqbRo.css +0 -36
- package/web-shell/assets/index-DRri_6_x.js +0 -2067
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V--H8HdEmk.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ShE9OIgf.js +0 -8
|
@@ -1442,6 +1442,9 @@ var GroupHistoryStore = class {
|
|
|
1442
1442
|
const state = loaded.entries;
|
|
1443
1443
|
const limits = loaded.limits;
|
|
1444
1444
|
const current = state.get(key) ?? [];
|
|
1445
|
+
if (entry.messageId !== void 0 && current.some((item) => item.messageId === entry.messageId)) {
|
|
1446
|
+
return;
|
|
1447
|
+
}
|
|
1445
1448
|
current.push(entry);
|
|
1446
1449
|
if (current.length > normalizedLimit) {
|
|
1447
1450
|
current.splice(0, current.length - normalizedLimit);
|
|
@@ -1473,6 +1476,22 @@ var GroupHistoryStore = class {
|
|
|
1473
1476
|
}
|
|
1474
1477
|
return entries;
|
|
1475
1478
|
}
|
|
1479
|
+
forget(key, messageId) {
|
|
1480
|
+
const loaded = this.loadState();
|
|
1481
|
+
const current = loaded.entries.get(key);
|
|
1482
|
+
if (!current)
|
|
1483
|
+
return;
|
|
1484
|
+
const remaining = current.filter((entry) => entry.messageId !== messageId);
|
|
1485
|
+
if (remaining.length === current.length)
|
|
1486
|
+
return;
|
|
1487
|
+
if (remaining.length === 0) {
|
|
1488
|
+
loaded.entries.delete(key);
|
|
1489
|
+
loaded.limits.delete(key);
|
|
1490
|
+
} else {
|
|
1491
|
+
loaded.entries.set(key, remaining);
|
|
1492
|
+
}
|
|
1493
|
+
this.compact(loaded.entries, loaded.limits);
|
|
1494
|
+
}
|
|
1476
1495
|
clear(key) {
|
|
1477
1496
|
const loaded = this.loadState();
|
|
1478
1497
|
const state = loaded.entries;
|
|
@@ -1513,6 +1532,9 @@ var GroupHistoryStore = class {
|
|
|
1513
1532
|
continue;
|
|
1514
1533
|
}
|
|
1515
1534
|
const current = state.get(record.key) ?? [];
|
|
1535
|
+
if (record.entry.messageId !== void 0 && current.some((item) => item.messageId === record.entry.messageId)) {
|
|
1536
|
+
continue;
|
|
1537
|
+
}
|
|
1516
1538
|
current.push(record.entry);
|
|
1517
1539
|
if (current.length > record.limit) {
|
|
1518
1540
|
current.splice(0, current.length - record.limit);
|
|
@@ -1709,7 +1731,7 @@ var SenderGate = class {
|
|
|
1709
1731
|
// packages/channels/base/dist/SessionRouter.js
|
|
1710
1732
|
init_esbuild_shims();
|
|
1711
1733
|
import { chmodSync as chmodSync2, existsSync as existsSync3, mkdirSync as mkdirSync3, readFileSync as readFileSync3, renameSync as renameSync3, rmSync, unlinkSync, writeFileSync as writeFileSync3 } from "node:fs";
|
|
1712
|
-
import { dirname as dirname3, join as join4 } from "node:path";
|
|
1734
|
+
import { dirname as dirname3, isAbsolute, join as join4 } from "node:path";
|
|
1713
1735
|
import process2 from "node:process";
|
|
1714
1736
|
var SessionRouter = class {
|
|
1715
1737
|
static {
|
|
@@ -1978,7 +2000,7 @@ var SessionRouter = class {
|
|
|
1978
2000
|
getSessionCwd(sessionId) {
|
|
1979
2001
|
return this.toCwd.get(sessionId);
|
|
1980
2002
|
}
|
|
1981
|
-
async createManagedSession(target,
|
|
2003
|
+
async createManagedSession(target, workspaceCwd, isolation = "shared") {
|
|
1982
2004
|
const loadWindow = this.beginSessionLoad();
|
|
1983
2005
|
const lifecycleGeneration = this.lifecycleGeneration;
|
|
1984
2006
|
const bridge = this.bridge;
|
|
@@ -1986,9 +2008,10 @@ var SessionRouter = class {
|
|
|
1986
2008
|
try {
|
|
1987
2009
|
let lastDeadSessionId;
|
|
1988
2010
|
for (let attempt = 0; attempt < 2; attempt++) {
|
|
1989
|
-
const sessionId = await bridge.newSession(
|
|
2011
|
+
const sessionId = await bridge.newSession(workspaceCwd, {
|
|
1990
2012
|
...this.sessionOptions(target.channelName),
|
|
1991
|
-
sourceId: target.channelName
|
|
2013
|
+
sourceId: target.channelName,
|
|
2014
|
+
...isolation === "worktree" ? { worktree: {} } : {}
|
|
1992
2015
|
}, bindingToken);
|
|
1993
2016
|
if (lifecycleGeneration !== this.lifecycleGeneration || bridge !== this.bridge) {
|
|
1994
2017
|
this.scheduleManagedDiscard(bridge, sessionId, bindingToken);
|
|
@@ -1997,13 +2020,20 @@ var SessionRouter = class {
|
|
|
1997
2020
|
if (typeof sessionId !== "string" || sessionId.length === 0) {
|
|
1998
2021
|
throw new Error("Invalid session ID from bridge");
|
|
1999
2022
|
}
|
|
2023
|
+
let sessionCwd;
|
|
2024
|
+
try {
|
|
2025
|
+
sessionCwd = this.validateManagedSessionIdentity(bridge, sessionId, workspaceCwd, void 0, isolation);
|
|
2026
|
+
} catch (error) {
|
|
2027
|
+
await bridge.discardSession?.(sessionId, bindingToken).catch(() => void 0);
|
|
2028
|
+
throw error;
|
|
2029
|
+
}
|
|
2000
2030
|
if (loadWindow.delete(sessionId)) {
|
|
2001
2031
|
lastDeadSessionId = sessionId;
|
|
2002
2032
|
await bridge.discardSession?.(sessionId, bindingToken);
|
|
2003
2033
|
continue;
|
|
2004
2034
|
}
|
|
2005
2035
|
this.toTarget.set(sessionId, target);
|
|
2006
|
-
this.toCwd.set(sessionId,
|
|
2036
|
+
this.toCwd.set(sessionId, sessionCwd);
|
|
2007
2037
|
this.liveSessionIds.add(sessionId);
|
|
2008
2038
|
return sessionId;
|
|
2009
2039
|
}
|
|
@@ -2012,10 +2042,11 @@ var SessionRouter = class {
|
|
|
2012
2042
|
this.endSessionLoad(loadWindow);
|
|
2013
2043
|
}
|
|
2014
2044
|
}
|
|
2015
|
-
async loadManagedSession(sessionId, target,
|
|
2045
|
+
async loadManagedSession(sessionId, target, workspaceCwd, expectedCwd = workspaceCwd, isolation = "shared") {
|
|
2016
2046
|
if (this.liveSessionIds.has(sessionId)) {
|
|
2047
|
+
const actualCwd = this.validateManagedSessionIdentity(this.bridge, sessionId, workspaceCwd, expectedCwd, isolation);
|
|
2017
2048
|
this.toTarget.set(sessionId, target);
|
|
2018
|
-
this.toCwd.set(sessionId,
|
|
2049
|
+
this.toCwd.set(sessionId, actualCwd);
|
|
2019
2050
|
return { loaded: false };
|
|
2020
2051
|
}
|
|
2021
2052
|
const loadWindow = this.beginSessionLoad();
|
|
@@ -2024,7 +2055,7 @@ var SessionRouter = class {
|
|
|
2024
2055
|
const bindingToken = {};
|
|
2025
2056
|
let loadedSessionId;
|
|
2026
2057
|
try {
|
|
2027
|
-
loadedSessionId = await bridge.loadSession(sessionId,
|
|
2058
|
+
loadedSessionId = await bridge.loadSession(sessionId, workspaceCwd, this.sessionOptions(target.channelName), bindingToken);
|
|
2028
2059
|
if (lifecycleGeneration !== this.lifecycleGeneration || bridge !== this.bridge) {
|
|
2029
2060
|
this.scheduleManagedDiscard(bridge, loadedSessionId, bindingToken);
|
|
2030
2061
|
loadedSessionId = void 0;
|
|
@@ -2039,8 +2070,9 @@ var SessionRouter = class {
|
|
|
2039
2070
|
if (loadWindow.delete(sessionId)) {
|
|
2040
2071
|
throw new Error(`Managed session ${sessionId} died before loading completed`);
|
|
2041
2072
|
}
|
|
2073
|
+
const actualCwd = this.validateManagedSessionIdentity(bridge, sessionId, workspaceCwd, expectedCwd, isolation);
|
|
2042
2074
|
this.toTarget.set(sessionId, target);
|
|
2043
|
-
this.toCwd.set(sessionId,
|
|
2075
|
+
this.toCwd.set(sessionId, actualCwd);
|
|
2044
2076
|
this.liveSessionIds.add(sessionId);
|
|
2045
2077
|
return { loaded: true };
|
|
2046
2078
|
} catch (error) {
|
|
@@ -2052,6 +2084,18 @@ var SessionRouter = class {
|
|
|
2052
2084
|
this.endSessionLoad(loadWindow);
|
|
2053
2085
|
}
|
|
2054
2086
|
}
|
|
2087
|
+
validateManagedSessionIdentity(bridge, sessionId, workspaceCwd, expectedCwd, isolation) {
|
|
2088
|
+
if (isolation === "shared") {
|
|
2089
|
+
return workspaceCwd;
|
|
2090
|
+
}
|
|
2091
|
+
const info = bridge.listSessions?.().find((candidate) => candidate.sessionId === sessionId);
|
|
2092
|
+
const canonicalWorkspace = canonicalizeWorkspacePath(workspaceCwd);
|
|
2093
|
+
const canonicalWorktree = info?.worktree ? canonicalizeWorkspacePath(info.worktree.path) : void 0;
|
|
2094
|
+
if (!info || canonicalizeWorkspacePath(info.workspaceCwd) !== canonicalWorkspace || info.worktreeState !== "persisted-v1" || !info.worktree || !isAbsolute(info.worktree.path) || !canonicalWorktree || canonicalWorktree === canonicalWorkspace || expectedCwd !== void 0 && canonicalWorktree !== canonicalizeWorkspacePath(expectedCwd)) {
|
|
2095
|
+
throw new Error(`Daemon did not attest the expected worktree for session ${sessionId}`);
|
|
2096
|
+
}
|
|
2097
|
+
return canonicalWorktree;
|
|
2098
|
+
}
|
|
2055
2099
|
activateManagedSession(sessionId, target, cwd) {
|
|
2056
2100
|
const key = this.routingKey(target.channelName, target.senderId, target.chatId, target.threadId);
|
|
2057
2101
|
if (this.toSession.get(key) === sessionId)
|
|
@@ -2515,7 +2559,7 @@ var SessionRouter = class {
|
|
|
2515
2559
|
init_esbuild_shims();
|
|
2516
2560
|
import { randomUUID as randomUUID2 } from "node:crypto";
|
|
2517
2561
|
import { chmodSync as chmodSync3, existsSync as existsSync4, mkdirSync as mkdirSync4, readFileSync as readFileSync4, renameSync as renameSync4, rmSync as rmSync2, writeFileSync as writeFileSync4 } from "node:fs";
|
|
2518
|
-
import { dirname as dirname4 } from "node:path";
|
|
2562
|
+
import { dirname as dirname4, isAbsolute as isAbsolute2 } from "node:path";
|
|
2519
2563
|
import process3 from "node:process";
|
|
2520
2564
|
var REGISTRY_VERSION = 1;
|
|
2521
2565
|
var MAX_OPEN_TASKS = 8;
|
|
@@ -2642,7 +2686,7 @@ var NamedSessionManager = class {
|
|
|
2642
2686
|
return true;
|
|
2643
2687
|
});
|
|
2644
2688
|
}
|
|
2645
|
-
create(input, name) {
|
|
2689
|
+
create(input, name, isolation = "shared") {
|
|
2646
2690
|
return this.withOwnerLock(input, async () => {
|
|
2647
2691
|
this.validateName(name);
|
|
2648
2692
|
const existingOwner = await this.ensureOwner(input, false);
|
|
@@ -2655,12 +2699,17 @@ var NamedSessionManager = class {
|
|
|
2655
2699
|
}
|
|
2656
2700
|
const timestamp = this.nextTimestamp(owner);
|
|
2657
2701
|
const target = this.target(input);
|
|
2658
|
-
const sessionId = await this.createSession(target,
|
|
2702
|
+
const sessionId = await this.createSession(target, isolation, `Could not create task "${name}".`);
|
|
2703
|
+
const sessionCwd = this.router.getSessionCwd(sessionId);
|
|
2704
|
+
if (!sessionCwd) {
|
|
2705
|
+
await this.router.detachManagedSession(sessionId).catch(() => void 0);
|
|
2706
|
+
throw new Error(`Could not determine task "${name}" workspace.`);
|
|
2707
|
+
}
|
|
2659
2708
|
const task = {
|
|
2660
2709
|
name,
|
|
2661
2710
|
sessionId,
|
|
2662
|
-
cwd:
|
|
2663
|
-
isolation
|
|
2711
|
+
cwd: sessionCwd,
|
|
2712
|
+
isolation,
|
|
2664
2713
|
status: "open",
|
|
2665
2714
|
target,
|
|
2666
2715
|
createdAt: timestamp,
|
|
@@ -2678,7 +2727,7 @@ var NamedSessionManager = class {
|
|
|
2678
2727
|
await this.router.detachManagedSession(sessionId).catch(() => void 0);
|
|
2679
2728
|
throw error;
|
|
2680
2729
|
}
|
|
2681
|
-
this.router.activateManagedSession(sessionId, target,
|
|
2730
|
+
this.router.activateManagedSession(sessionId, target, task.cwd);
|
|
2682
2731
|
return this.selection(nextOwner, task);
|
|
2683
2732
|
});
|
|
2684
2733
|
}
|
|
@@ -2788,8 +2837,11 @@ var NamedSessionManager = class {
|
|
|
2788
2837
|
const task = this.findTask(owner, owner.activeTaskName);
|
|
2789
2838
|
if (!task || task.status !== "open")
|
|
2790
2839
|
return void 0;
|
|
2840
|
+
if (task.isolation === "worktree") {
|
|
2841
|
+
throw new Error(`Task "${task.name}" uses a worktree and cannot be cleared or reset yet. Continue using the task or close it. Its files were not changed.`);
|
|
2842
|
+
}
|
|
2791
2843
|
const timestamp = this.nextTimestamp(owner);
|
|
2792
|
-
const sessionId = await this.createSession(task.target, task.
|
|
2844
|
+
const sessionId = await this.createSession(task.target, task.isolation, `Could not reset task "${task.name}".`);
|
|
2793
2845
|
const updatedTask = {
|
|
2794
2846
|
...task,
|
|
2795
2847
|
sessionId,
|
|
@@ -2847,7 +2899,7 @@ var NamedSessionManager = class {
|
|
|
2847
2899
|
return void 0;
|
|
2848
2900
|
const target = this.target(input);
|
|
2849
2901
|
const timestamp = this.nextTimestamp();
|
|
2850
|
-
const createdSessionId = await this.createSession(target,
|
|
2902
|
+
const createdSessionId = await this.createSession(target, "shared", "Could not create the default task.");
|
|
2851
2903
|
const task = {
|
|
2852
2904
|
name: "default",
|
|
2853
2905
|
sessionId: createdSessionId,
|
|
@@ -2916,14 +2968,14 @@ var NamedSessionManager = class {
|
|
|
2916
2968
|
}
|
|
2917
2969
|
async loadTask(task, failureMessage) {
|
|
2918
2970
|
try {
|
|
2919
|
-
return (await this.router.loadManagedSession(task.sessionId, task.target, task.cwd)).loaded;
|
|
2971
|
+
return (await this.router.loadManagedSession(task.sessionId, task.target, this.cwd, task.cwd, task.isolation)).loaded;
|
|
2920
2972
|
} catch (error) {
|
|
2921
2973
|
throw new Error(failureMessage, { cause: error });
|
|
2922
2974
|
}
|
|
2923
2975
|
}
|
|
2924
|
-
async createSession(target,
|
|
2976
|
+
async createSession(target, isolation, failureMessage) {
|
|
2925
2977
|
try {
|
|
2926
|
-
return await this.router.createManagedSession(target, cwd);
|
|
2978
|
+
return await this.router.createManagedSession(target, this.cwd, isolation);
|
|
2927
2979
|
} catch (error) {
|
|
2928
2980
|
throw new Error(failureMessage, { cause: error });
|
|
2929
2981
|
}
|
|
@@ -3046,7 +3098,11 @@ var NamedSessionManager = class {
|
|
|
3046
3098
|
if (!owners.some((candidate) => candidate.channelName === owner.channelName && candidate.chatId === owner.chatId && candidate.senderId === owner.senderId)) {
|
|
3047
3099
|
owners.push(owner);
|
|
3048
3100
|
}
|
|
3049
|
-
const next = {
|
|
3101
|
+
const next = {
|
|
3102
|
+
version: REGISTRY_VERSION,
|
|
3103
|
+
workspaceCwd: this.canonicalCwd,
|
|
3104
|
+
owners
|
|
3105
|
+
};
|
|
3050
3106
|
if (!this.isRegistry(next)) {
|
|
3051
3107
|
throw new Error("Invalid named-session registry update.");
|
|
3052
3108
|
}
|
|
@@ -3057,7 +3113,11 @@ var NamedSessionManager = class {
|
|
|
3057
3113
|
}
|
|
3058
3114
|
readRegistry() {
|
|
3059
3115
|
if (!existsSync4(this.filePath)) {
|
|
3060
|
-
return {
|
|
3116
|
+
return {
|
|
3117
|
+
version: REGISTRY_VERSION,
|
|
3118
|
+
workspaceCwd: this.canonicalCwd,
|
|
3119
|
+
owners: []
|
|
3120
|
+
};
|
|
3061
3121
|
}
|
|
3062
3122
|
let value;
|
|
3063
3123
|
try {
|
|
@@ -3068,7 +3128,10 @@ var NamedSessionManager = class {
|
|
|
3068
3128
|
});
|
|
3069
3129
|
}
|
|
3070
3130
|
if (!this.isRegistry(value)) {
|
|
3071
|
-
if (this.isRegistry(value,
|
|
3131
|
+
if (this.isRegistry(value, true, true)) {
|
|
3132
|
+
return { ...value, workspaceCwd: this.canonicalCwd };
|
|
3133
|
+
}
|
|
3134
|
+
if (this.isRegistry(value, false) || this.isRegistry(value, false, true)) {
|
|
3072
3135
|
const stalePath = `${this.filePath}.stale-${randomUUID2()}`;
|
|
3073
3136
|
try {
|
|
3074
3137
|
renameSync4(this.filePath, stalePath);
|
|
@@ -3078,7 +3141,11 @@ var NamedSessionManager = class {
|
|
|
3078
3141
|
});
|
|
3079
3142
|
}
|
|
3080
3143
|
process3.stderr.write("[NamedSessionManager] Archived a stale registry after the channel working directory changed.\n");
|
|
3081
|
-
return {
|
|
3144
|
+
return {
|
|
3145
|
+
version: REGISTRY_VERSION,
|
|
3146
|
+
workspaceCwd: this.canonicalCwd,
|
|
3147
|
+
owners: []
|
|
3148
|
+
};
|
|
3082
3149
|
}
|
|
3083
3150
|
throw new Error(`Invalid named-session registry: ${this.filePath}`);
|
|
3084
3151
|
}
|
|
@@ -3113,10 +3180,14 @@ var NamedSessionManager = class {
|
|
|
3113
3180
|
}
|
|
3114
3181
|
}
|
|
3115
3182
|
}
|
|
3116
|
-
isRegistry(value, requireCurrentCwd = true) {
|
|
3183
|
+
isRegistry(value, requireCurrentCwd = true, allowMissingWorkspaceCwd = false) {
|
|
3117
3184
|
if (!this.isRecord(value) || value["version"] !== REGISTRY_VERSION) {
|
|
3118
3185
|
return false;
|
|
3119
3186
|
}
|
|
3187
|
+
const workspaceCwd = value["workspaceCwd"];
|
|
3188
|
+
if (workspaceCwd === void 0 ? !allowMissingWorkspaceCwd : typeof workspaceCwd !== "string" || requireCurrentCwd && canonicalizeWorkspacePath(workspaceCwd) !== this.canonicalCwd) {
|
|
3189
|
+
return false;
|
|
3190
|
+
}
|
|
3120
3191
|
const owners = value["owners"];
|
|
3121
3192
|
if (!Array.isArray(owners))
|
|
3122
3193
|
return false;
|
|
@@ -3127,6 +3198,9 @@ var NamedSessionManager = class {
|
|
|
3127
3198
|
return false;
|
|
3128
3199
|
}
|
|
3129
3200
|
}
|
|
3201
|
+
if (workspaceCwd === void 0 && owners.some((owner) => this.isRecord(owner) && Array.isArray(owner["tasks"]) && owner["tasks"].some((task) => this.isRecord(task) && task["isolation"] === "worktree"))) {
|
|
3202
|
+
return false;
|
|
3203
|
+
}
|
|
3130
3204
|
return true;
|
|
3131
3205
|
}
|
|
3132
3206
|
isOwner(value, ownerKeys, sessionIds, requireCurrentCwd) {
|
|
@@ -3168,7 +3242,7 @@ var NamedSessionManager = class {
|
|
|
3168
3242
|
if (!this.isRecord(value) || !this.isRecord(value["target"]))
|
|
3169
3243
|
return false;
|
|
3170
3244
|
const target = value["target"];
|
|
3171
|
-
return typeof value["name"] === "string" && TASK_NAME_PATTERN.test(value["name"]) && typeof value["sessionId"] === "string" && value["sessionId"].length > 0 && typeof value["cwd"] === "string" && (
|
|
3245
|
+
return typeof value["name"] === "string" && TASK_NAME_PATTERN.test(value["name"]) && typeof value["sessionId"] === "string" && value["sessionId"].length > 0 && typeof value["cwd"] === "string" && isAbsolute2(value["cwd"]) && (value["isolation"] === "shared" || value["isolation"] === "worktree") && (!requireCurrentCwd || (value["isolation"] === "shared" ? this.isCurrentCwd(value["cwd"]) : !this.isCurrentCwd(value["cwd"]))) && (value["status"] === "open" || value["status"] === "closed") && this.isTimestamp(value["createdAt"]) && this.isTimestamp(value["updatedAt"]) && this.isTimestamp(value["lastSelectedAt"]) && target["channelName"] === channelName && target["chatId"] === chatId && target["senderId"] === senderId && (target["threadId"] === void 0 || typeof target["threadId"] === "string") && (target["isGroup"] === void 0 || typeof target["isGroup"] === "boolean");
|
|
3172
3246
|
}
|
|
3173
3247
|
isCurrentCwd(cwd) {
|
|
3174
3248
|
return canonicalizeWorkspacePath(cwd) === this.canonicalCwd;
|
|
@@ -3488,6 +3562,71 @@ function truncateError(message) {
|
|
|
3488
3562
|
}
|
|
3489
3563
|
__name(truncateError, "truncateError");
|
|
3490
3564
|
|
|
3565
|
+
// packages/channels/base/dist/message-prefix.js
|
|
3566
|
+
init_esbuild_shims();
|
|
3567
|
+
function startsWithMessagePrefix(text, prefix) {
|
|
3568
|
+
return text.startsWith(prefix) && (text.length === prefix.length || /\s/u.test(text.charAt(prefix.length)));
|
|
3569
|
+
}
|
|
3570
|
+
__name(startsWithMessagePrefix, "startsWithMessagePrefix");
|
|
3571
|
+
function stripMessagePrefix(text, prefix) {
|
|
3572
|
+
if (!prefix)
|
|
3573
|
+
return text;
|
|
3574
|
+
let candidate = text.trim();
|
|
3575
|
+
while (!startsWithMessagePrefix(candidate, prefix) && (candidate.startsWith("@") || candidate.startsWith("<@"))) {
|
|
3576
|
+
const mention = candidate.match(/^(?:@[^@\s]+|<@[^>]{1,64}>)\s+/u)?.[0];
|
|
3577
|
+
if (!mention)
|
|
3578
|
+
return void 0;
|
|
3579
|
+
candidate = candidate.slice(mention.length);
|
|
3580
|
+
}
|
|
3581
|
+
if (!startsWithMessagePrefix(candidate, prefix))
|
|
3582
|
+
return void 0;
|
|
3583
|
+
const suffix = candidate.slice(prefix.length);
|
|
3584
|
+
if (!/^\s+\S[\s\S]*$/u.test(suffix))
|
|
3585
|
+
return void 0;
|
|
3586
|
+
return suffix.trim();
|
|
3587
|
+
}
|
|
3588
|
+
__name(stripMessagePrefix, "stripMessagePrefix");
|
|
3589
|
+
function locateDisplayText(envelope, displayText) {
|
|
3590
|
+
const offset = envelope.displayTextOffset;
|
|
3591
|
+
if (offset !== void 0 && envelope.text.startsWith(displayText, offset)) {
|
|
3592
|
+
return offset;
|
|
3593
|
+
}
|
|
3594
|
+
if (offset === void 0 && envelope.text.endsWith(displayText)) {
|
|
3595
|
+
return envelope.text.length - displayText.length;
|
|
3596
|
+
}
|
|
3597
|
+
const first = envelope.text.indexOf(displayText);
|
|
3598
|
+
if (first === -1)
|
|
3599
|
+
return -1;
|
|
3600
|
+
return envelope.text.indexOf(displayText, first + 1) === -1 ? first : "ambiguous";
|
|
3601
|
+
}
|
|
3602
|
+
__name(locateDisplayText, "locateDisplayText");
|
|
3603
|
+
function applyMessagePrefix(envelope, prefix) {
|
|
3604
|
+
if (!prefix || envelope.bypassMessagePrefix || envelope.syntheticText) {
|
|
3605
|
+
return true;
|
|
3606
|
+
}
|
|
3607
|
+
const displayText = envelope.displayText;
|
|
3608
|
+
const prefixText = envelope.messagePrefixText;
|
|
3609
|
+
const sourceText = prefixText ?? displayText ?? envelope.text;
|
|
3610
|
+
const stripped = stripMessagePrefix(sourceText, prefix);
|
|
3611
|
+
if (stripped === void 0)
|
|
3612
|
+
return false;
|
|
3613
|
+
if (displayText === void 0) {
|
|
3614
|
+
if (prefixText !== void 0)
|
|
3615
|
+
envelope.messagePrefixText = stripped;
|
|
3616
|
+
envelope.text = stripped;
|
|
3617
|
+
return true;
|
|
3618
|
+
}
|
|
3619
|
+
const at = locateDisplayText(envelope, displayText);
|
|
3620
|
+
if (at === "ambiguous" || at === -1)
|
|
3621
|
+
return false;
|
|
3622
|
+
if (prefixText !== void 0)
|
|
3623
|
+
envelope.messagePrefixText = stripped;
|
|
3624
|
+
envelope.displayText = stripped;
|
|
3625
|
+
envelope.text = envelope.text.slice(0, at) + stripped + envelope.text.slice(at + displayText.length);
|
|
3626
|
+
return true;
|
|
3627
|
+
}
|
|
3628
|
+
__name(applyMessagePrefix, "applyMessagePrefix");
|
|
3629
|
+
|
|
3491
3630
|
// packages/channels/base/dist/ChannelWebhookTask.js
|
|
3492
3631
|
init_esbuild_shims();
|
|
3493
3632
|
var MAX_WEBHOOK_PROMPT_CHARS = 8500;
|
|
@@ -3878,6 +4017,9 @@ var ChannelBase = class {
|
|
|
3878
4017
|
observedContacts;
|
|
3879
4018
|
namedSessions;
|
|
3880
4019
|
observedContactEnvelopes = /* @__PURE__ */ new WeakSet();
|
|
4020
|
+
messagePrefix;
|
|
4021
|
+
messagePrefixCheckedEnvelopes = /* @__PURE__ */ new WeakSet();
|
|
4022
|
+
messagePrefixRejectedEnvelopes = /* @__PURE__ */ new WeakSet();
|
|
3881
4023
|
instructedSessions = /* @__PURE__ */ new Set();
|
|
3882
4024
|
unattendedMemorySessions = /* @__PURE__ */ new Set();
|
|
3883
4025
|
channelMemoryReads = /* @__PURE__ */ new Map();
|
|
@@ -3998,7 +4140,7 @@ var ChannelBase = class {
|
|
|
3998
4140
|
async handleBtw(envelope, sessionId, question, sourceLabel) {
|
|
3999
4141
|
const target = this.router.getTarget(sessionId);
|
|
4000
4142
|
if (!target || target.channelName !== this.name) {
|
|
4001
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
4143
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Could not resolve the current task for ${this.prefixedCommand("/btw")}.`, sourceLabel);
|
|
4002
4144
|
return;
|
|
4003
4145
|
}
|
|
4004
4146
|
const running = this.activeBtw.get(sessionId);
|
|
@@ -4350,8 +4492,12 @@ No answer is available from the current conversation context.`;
|
|
|
4350
4492
|
this.removePendingPermission(event.requestId, this.userInputSettlementReason(pending, event.outcome));
|
|
4351
4493
|
}
|
|
4352
4494
|
constructor(name, config, bridge, options) {
|
|
4495
|
+
if (config.messagePrefix !== void 0 && typeof config.messagePrefix !== "string") {
|
|
4496
|
+
throw new Error(`Channel "${name}" field "messagePrefix" must be a string.`);
|
|
4497
|
+
}
|
|
4353
4498
|
this.name = name;
|
|
4354
4499
|
this.config = config;
|
|
4500
|
+
this.messagePrefix = config.messagePrefix?.trim() || void 0;
|
|
4355
4501
|
this.bridge = bridge;
|
|
4356
4502
|
this.proxy = options?.proxy;
|
|
4357
4503
|
this.stateDir = options?.stateDir;
|
|
@@ -4393,6 +4539,9 @@ No answer is available from the current conversation context.`;
|
|
|
4393
4539
|
this.attachBridgeEvents(bridge);
|
|
4394
4540
|
}
|
|
4395
4541
|
}
|
|
4542
|
+
waitForDisconnect() {
|
|
4543
|
+
return Promise.resolve();
|
|
4544
|
+
}
|
|
4396
4545
|
/**
|
|
4397
4546
|
* Thread-targeted delivery. Polling adapters override this to post comments
|
|
4398
4547
|
* on a specific issue/PR. The default falls through to sendMessage(chatId,
|
|
@@ -5609,11 +5758,11 @@ ${promptText}` : promptText;
|
|
|
5609
5758
|
const requestSuffix = pending.taskName ? ` ${pending.requestId}` : "";
|
|
5610
5759
|
const replyPadding = pending.taskName ? { approve: " ", always: " ", deny: " " } : { approve: " ", always: " ", deny: " " };
|
|
5611
5760
|
const replies = [
|
|
5612
|
-
`/approve${requestSuffix}${replyPadding.approve}${approveLabel}`,
|
|
5761
|
+
`${this.prefixedCommand(`/approve${requestSuffix}`)}${replyPadding.approve}${approveLabel}`,
|
|
5613
5762
|
...alwaysOption ? [
|
|
5614
|
-
`/approve-always${requestSuffix}${replyPadding.always}${alwaysOption.label}`
|
|
5763
|
+
`${this.prefixedCommand(`/approve-always${requestSuffix}`)}${replyPadding.always}${alwaysOption.label}`
|
|
5615
5764
|
] : [],
|
|
5616
|
-
`/deny${requestSuffix}${replyPadding.deny}${denyLabel}`
|
|
5765
|
+
`${this.prefixedCommand(`/deny${requestSuffix}`)}${replyPadding.deny}${denyLabel}`
|
|
5617
5766
|
];
|
|
5618
5767
|
return [
|
|
5619
5768
|
"Permission required to run a tool",
|
|
@@ -5627,6 +5776,12 @@ ${promptText}` : promptText;
|
|
|
5627
5776
|
...replies
|
|
5628
5777
|
].join("\n");
|
|
5629
5778
|
}
|
|
5779
|
+
prefixedCommand(command) {
|
|
5780
|
+
return this.messagePrefix ? `${this.messagePrefix} ${command}` : command;
|
|
5781
|
+
}
|
|
5782
|
+
configuredMessagePrefix() {
|
|
5783
|
+
return this.messagePrefix;
|
|
5784
|
+
}
|
|
5630
5785
|
permissionTitle(toolCall) {
|
|
5631
5786
|
const rawTitle = typeof toolCall.title === "string" ? toolCall.title : void 0;
|
|
5632
5787
|
return sanitizeQuotedText(rawTitle || "", 160).trim() || "Tool use";
|
|
@@ -5735,7 +5890,7 @@ ${promptText}` : promptText;
|
|
|
5735
5890
|
const task = pending2?.taskName ? `Task ${pending2.taskName} \u2014 ` : "";
|
|
5736
5891
|
return `- ${task}${sanitizeQuotedText(id, 128)}${title}`;
|
|
5737
5892
|
}).join("\n");
|
|
5738
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Multiple permission requests are pending for this chat. Reply with
|
|
5893
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Multiple permission requests are pending for this chat. Reply with ${this.prefixedCommand(`/${decision} <request-id>`)}.
|
|
5739
5894
|
${requestList}`);
|
|
5740
5895
|
return true;
|
|
5741
5896
|
}
|
|
@@ -5749,7 +5904,7 @@ ${requestList}`);
|
|
|
5749
5904
|
return true;
|
|
5750
5905
|
}
|
|
5751
5906
|
if (pending.userInputPresented && decision !== "deny") {
|
|
5752
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
5907
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Submit this question through its interactive card, or use ${this.prefixedCommand("/deny [request-id]")} to cancel it.`, pending.sourceLabel);
|
|
5753
5908
|
return true;
|
|
5754
5909
|
}
|
|
5755
5910
|
const response = (() => {
|
|
@@ -5876,6 +6031,10 @@ ${requestList}`);
|
|
|
5876
6031
|
}
|
|
5877
6032
|
}
|
|
5878
6033
|
async sendNamedSessionError(envelope, error) {
|
|
6034
|
+
if (error instanceof Error && error.cause !== void 0) {
|
|
6035
|
+
process.stderr.write(`[${sanitizeLogText(this.name, 64)}] named-session operation failed: ${this.lifecycleError(error)} | cause: ${this.lifecycleError(error.cause)}
|
|
6036
|
+
`);
|
|
6037
|
+
}
|
|
5879
6038
|
const message = error instanceof Error ? sanitizeDisplayText(error.message, 500) : "Named-session operation failed.";
|
|
5880
6039
|
await this.sendThreadMessage(envelope.chatId, envelope.threadId, message || "Named-session operation failed.");
|
|
5881
6040
|
}
|
|
@@ -5885,7 +6044,7 @@ ${requestList}`);
|
|
|
5885
6044
|
return false;
|
|
5886
6045
|
const normalized = args.trim().toLowerCase();
|
|
5887
6046
|
if (normalized !== "" && normalized !== "all") {
|
|
5888
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6047
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand("/sessions [all]")}`);
|
|
5889
6048
|
return true;
|
|
5890
6049
|
}
|
|
5891
6050
|
try {
|
|
@@ -5916,18 +6075,16 @@ ${requestList}`);
|
|
|
5916
6075
|
if (parts.length > 0)
|
|
5917
6076
|
break;
|
|
5918
6077
|
const current = await namedSessions.current(owner);
|
|
5919
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId, current ? `Current task: ${current.name} (${current.isolation})` :
|
|
6078
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, current ? `Current task: ${current.name} (${current.isolation})` : `No task is currently selected. Use ${this.prefixedCommand("/session new <name>")} or ${this.prefixedCommand("/session use <name>")}.`);
|
|
5920
6079
|
return true;
|
|
5921
6080
|
}
|
|
5922
6081
|
case "new": {
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
return true;
|
|
5926
|
-
}
|
|
5927
|
-
if (parts.length !== 1)
|
|
6082
|
+
const isolation = parts.length === 2 && parts[1] === "--worktree" ? "worktree" : "shared";
|
|
6083
|
+
if (isolation === "shared" && parts.length !== 1 || isolation === "worktree" && parts.length !== 2) {
|
|
5928
6084
|
break;
|
|
5929
|
-
|
|
5930
|
-
await
|
|
6085
|
+
}
|
|
6086
|
+
const created = await namedSessions.create(owner, parts[0], isolation);
|
|
6087
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Created and selected task "${created.name}" (${created.isolation} workspace).`);
|
|
5931
6088
|
return true;
|
|
5932
6089
|
}
|
|
5933
6090
|
case "use": {
|
|
@@ -5975,7 +6132,7 @@ ${requestList}`);
|
|
|
5975
6132
|
await this.sendNamedSessionError(envelope, error);
|
|
5976
6133
|
return true;
|
|
5977
6134
|
}
|
|
5978
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6135
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand("/session current")} | ${this.prefixedCommand("/session new <name> [--worktree]")} | ${this.prefixedCommand("/session use <name>")} | ${this.prefixedCommand("/session close <name>")} | ${this.prefixedCommand("/session cancel [<name>]")}`);
|
|
5979
6136
|
return true;
|
|
5980
6137
|
}
|
|
5981
6138
|
/** Register shared slash commands. Called from constructor. */
|
|
@@ -6052,7 +6209,7 @@ ${requestList}`);
|
|
|
6052
6209
|
return true;
|
|
6053
6210
|
}
|
|
6054
6211
|
if (this.isSharedSession(envelope) && args.toLowerCase() !== "confirm") {
|
|
6055
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6212
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `This clears the shared session for everyone who shares it. Re-send with "confirm" (e.g. ${this.prefixedCommand("/clear confirm")}) to proceed.`);
|
|
6056
6213
|
return true;
|
|
6057
6214
|
}
|
|
6058
6215
|
await doClear(envelope);
|
|
@@ -6093,19 +6250,19 @@ ${requestList}`);
|
|
|
6093
6250
|
this.registerCommand("help", async (envelope) => {
|
|
6094
6251
|
const lines = [
|
|
6095
6252
|
"Commands:",
|
|
6096
|
-
"/help \u2014 Show this help
|
|
6097
|
-
this.isSharedSession(envelope) ? "/clear confirm \u2014 Clear the shared session (aliases: /reset, /new)
|
|
6098
|
-
"/who \u2014 Show current session & workspace
|
|
6099
|
-
"/status \u2014 Show session info
|
|
6100
|
-
"/approve [request-id] \u2014 Approve a pending permission request
|
|
6101
|
-
"/approve-always [request-id] \u2014 Always approve a pending permission request
|
|
6102
|
-
"/deny [request-id] \u2014 Deny a pending permission request
|
|
6253
|
+
`${this.prefixedCommand("/help")} \u2014 Show this help`,
|
|
6254
|
+
this.isSharedSession(envelope) ? `${this.prefixedCommand("/clear confirm")} \u2014 Clear the shared session (aliases: ${this.prefixedCommand("/reset")}, ${this.prefixedCommand("/new")})` : `${this.prefixedCommand("/clear")} \u2014 Clear your session (aliases: ${this.prefixedCommand("/reset")}, ${this.prefixedCommand("/new")})`,
|
|
6255
|
+
`${this.prefixedCommand("/who")} \u2014 Show current session & workspace`,
|
|
6256
|
+
`${this.prefixedCommand("/status")} \u2014 Show session info`,
|
|
6257
|
+
`${this.prefixedCommand("/approve [request-id]")} \u2014 Approve a pending permission request`,
|
|
6258
|
+
`${this.prefixedCommand("/approve-always [request-id]")} \u2014 Always approve a pending permission request`,
|
|
6259
|
+
`${this.prefixedCommand("/deny [request-id]")} \u2014 Deny a pending permission request`,
|
|
6103
6260
|
...this.bridge.btw ? [
|
|
6104
|
-
"/btw <question> \u2014 Ask a side question without interrupting the current task
|
|
6261
|
+
`${this.prefixedCommand("/btw <question>")} \u2014 Ask a side question without interrupting the current task`
|
|
6105
6262
|
] : [],
|
|
6106
6263
|
...this.namedSessions ? [
|
|
6107
|
-
"/sessions [all] \u2014 List your named tasks
|
|
6108
|
-
"/session current|new|use|close|cancel \u2014 Manage your named tasks
|
|
6264
|
+
`${this.prefixedCommand("/sessions [all]")} \u2014 List your named tasks`,
|
|
6265
|
+
`${this.prefixedCommand("/session current|new|use|close|cancel")} \u2014 Manage your named tasks`
|
|
6109
6266
|
] : []
|
|
6110
6267
|
];
|
|
6111
6268
|
const sharedCmds = /* @__PURE__ */ new Set([
|
|
@@ -6128,7 +6285,7 @@ ${requestList}`);
|
|
|
6128
6285
|
const platformCmds = [...this.commands.keys()].filter((c) => !sharedCmds.has(c));
|
|
6129
6286
|
if (platformCmds.length > 0) {
|
|
6130
6287
|
for (const cmd of platformCmds) {
|
|
6131
|
-
lines.push(`/${cmd}`);
|
|
6288
|
+
lines.push(this.prefixedCommand(`/${cmd}`));
|
|
6132
6289
|
}
|
|
6133
6290
|
}
|
|
6134
6291
|
const sessionId = await this.currentSessionId(envelope);
|
|
@@ -6139,10 +6296,10 @@ ${requestList}`);
|
|
|
6139
6296
|
if (agentCommands.length > 0) {
|
|
6140
6297
|
lines.push("", "Agent commands (forwarded to Qwen Code):");
|
|
6141
6298
|
for (const cmd of agentCommands) {
|
|
6142
|
-
lines.push(`/${cmd.name} \u2014 ${cmd.description}`);
|
|
6299
|
+
lines.push(`${this.prefixedCommand(`/${cmd.name}`)} \u2014 ${cmd.description}`);
|
|
6143
6300
|
}
|
|
6144
6301
|
}
|
|
6145
|
-
lines.push("", "Send any text to chat with the agent.");
|
|
6302
|
+
lines.push("", this.messagePrefix ? `Start each message with ${this.messagePrefix} to chat with the agent.` : "Send any text to chat with the agent.");
|
|
6146
6303
|
await this.sendThreadMessage(envelope.chatId, envelope.threadId, lines.join("\n"));
|
|
6147
6304
|
return true;
|
|
6148
6305
|
});
|
|
@@ -6187,7 +6344,7 @@ ${requestList}`);
|
|
|
6187
6344
|
case "cancel":
|
|
6188
6345
|
return this.handleLoopCancel(envelope, rest[0]);
|
|
6189
6346
|
default:
|
|
6190
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6347
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand('/loop add "<cron>" <prompt>')} | ${this.prefixedCommand("/loop list")} | ${this.prefixedCommand("/loop inspect <id>")} | ${this.prefixedCommand("/loop cancel <id>")}`);
|
|
6191
6348
|
return true;
|
|
6192
6349
|
}
|
|
6193
6350
|
}
|
|
@@ -6204,7 +6361,7 @@ ${requestList}`);
|
|
|
6204
6361
|
}
|
|
6205
6362
|
const parsed = parseLoopAddArgs(args);
|
|
6206
6363
|
if (!parsed) {
|
|
6207
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6364
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand('/loop add "<cron>" <prompt>')}`);
|
|
6208
6365
|
return true;
|
|
6209
6366
|
}
|
|
6210
6367
|
try {
|
|
@@ -6358,7 +6515,7 @@ ${requestList}`);
|
|
|
6358
6515
|
if (!this.loopController)
|
|
6359
6516
|
return true;
|
|
6360
6517
|
if (!id) {
|
|
6361
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6518
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand("/loop inspect <id>")}`);
|
|
6362
6519
|
return true;
|
|
6363
6520
|
}
|
|
6364
6521
|
const jobs = await this.loopController.listForTarget(this.name, this.loopTargetFromEnvelope(envelope));
|
|
@@ -6418,7 +6575,7 @@ ${requestList}`);
|
|
|
6418
6575
|
if (!this.loopController)
|
|
6419
6576
|
return true;
|
|
6420
6577
|
if (!id) {
|
|
6421
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
6578
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand("/loop cancel <id>")}`);
|
|
6422
6579
|
return true;
|
|
6423
6580
|
}
|
|
6424
6581
|
const jobs = await this.loopController.listForTarget(this.name, this.loopTargetFromEnvelope(envelope));
|
|
@@ -6542,6 +6699,7 @@ ${requestList}`);
|
|
|
6542
6699
|
if ((this.sessionGenerations.get(sessionId) ?? 0) === generation) {
|
|
6543
6700
|
return false;
|
|
6544
6701
|
}
|
|
6702
|
+
this.forgetPendingGroupHistory(envelope);
|
|
6545
6703
|
const loggedText = sanitizeLogText(envelope.text, 80);
|
|
6546
6704
|
process.stderr.write(`[${this.name}] dropped queued turn from ${envelope.senderId} for session ${sessionId}: session was cleared before it ran (text: ${loggedText})
|
|
6547
6705
|
`);
|
|
@@ -7144,6 +7302,8 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
|
|
|
7144
7302
|
if (limit <= 0 || envelope.text.trim().length === 0) {
|
|
7145
7303
|
return;
|
|
7146
7304
|
}
|
|
7305
|
+
if (envelope.syntheticText)
|
|
7306
|
+
return;
|
|
7147
7307
|
const senderId = truncateGroupHistoryField(envelope.senderId);
|
|
7148
7308
|
if (this.config.groupPolicy !== "pairing" && !this.gate.isAllowed(senderId)) {
|
|
7149
7309
|
return;
|
|
@@ -7172,13 +7332,23 @@ ${sanitizePromptText(entry.text).trim()}` : `No channel memory entry ${intent.id
|
|
|
7172
7332
|
if (this.config.groupPolicy === "pairing" && !this.groupGate.isGroupApproved(envelope.chatId)) {
|
|
7173
7333
|
return [];
|
|
7174
7334
|
}
|
|
7175
|
-
return entries;
|
|
7335
|
+
return envelope.messageId === void 0 ? entries : entries.filter((entry) => entry.messageId !== envelope.messageId);
|
|
7176
7336
|
} catch (err) {
|
|
7177
7337
|
process.stderr.write(`[${this.name}] failed to drain group history for chat ${sanitizeLogText(envelope.chatId, 64)}: ${err instanceof Error ? err.message : err}
|
|
7178
7338
|
`);
|
|
7179
7339
|
return [];
|
|
7180
7340
|
}
|
|
7181
7341
|
}
|
|
7342
|
+
forgetPendingGroupHistory(envelope) {
|
|
7343
|
+
if (envelope.messageId === void 0)
|
|
7344
|
+
return;
|
|
7345
|
+
try {
|
|
7346
|
+
this.groupHistory.forget(this.groupHistoryKey(envelope), truncateGroupHistoryField(envelope.messageId));
|
|
7347
|
+
} catch (err) {
|
|
7348
|
+
process.stderr.write(`[${this.name}] failed to forget group history for chat ${sanitizeLogText(envelope.chatId, 64)}: ${err instanceof Error ? err.message : err}
|
|
7349
|
+
`);
|
|
7350
|
+
}
|
|
7351
|
+
}
|
|
7182
7352
|
clearPendingGroupHistory(envelope) {
|
|
7183
7353
|
if (!envelope.isGroup && this.config.sessionScope !== "single") {
|
|
7184
7354
|
return;
|
|
@@ -7214,6 +7384,18 @@ ${CURRENT_MESSAGE_MARKER}
|
|
|
7214
7384
|
${promptText}`;
|
|
7215
7385
|
}
|
|
7216
7386
|
preflightInbound(envelope, options = {}) {
|
|
7387
|
+
if (this.messagePrefixRejectedEnvelopes.has(envelope))
|
|
7388
|
+
return false;
|
|
7389
|
+
if (!this.messagePrefixCheckedEnvelopes.has(envelope)) {
|
|
7390
|
+
this.messagePrefixCheckedEnvelopes.add(envelope);
|
|
7391
|
+
if (!applyMessagePrefix(envelope, this.messagePrefix)) {
|
|
7392
|
+
this.messagePrefixRejectedEnvelopes.add(envelope);
|
|
7393
|
+
if (!(envelope.isGroup && !envelope.isMentioned && !envelope.isReplyToBot)) {
|
|
7394
|
+
this.logPreflightRejected("message_prefix_mismatch");
|
|
7395
|
+
}
|
|
7396
|
+
return false;
|
|
7397
|
+
}
|
|
7398
|
+
}
|
|
7217
7399
|
const groupResult = this.groupGate.check(envelope, {
|
|
7218
7400
|
createPairingRequest: !options.deferPairingRequests
|
|
7219
7401
|
});
|
|
@@ -7269,6 +7451,9 @@ ${promptText}`;
|
|
|
7269
7451
|
process.stderr.write(`[Channel:${this.name}] preflight rejected reason=${sanitizeLogText(reason, 80)}
|
|
7270
7452
|
`);
|
|
7271
7453
|
}
|
|
7454
|
+
wasMessagePrefixRejected(envelope) {
|
|
7455
|
+
return this.messagePrefixRejectedEnvelopes.has(envelope);
|
|
7456
|
+
}
|
|
7272
7457
|
logDebugPayload(platform, payload) {
|
|
7273
7458
|
if (!isDebugPayloadEnabled(this.name))
|
|
7274
7459
|
return;
|
|
@@ -7476,6 +7661,7 @@ ${text}`;
|
|
|
7476
7661
|
suppressSaveConfirmation: memorySaveIsSideEffect
|
|
7477
7662
|
});
|
|
7478
7663
|
if (!memorySaveIsSideEffect) {
|
|
7664
|
+
this.forgetPendingGroupHistory(envelope);
|
|
7479
7665
|
return;
|
|
7480
7666
|
}
|
|
7481
7667
|
}
|
|
@@ -7484,17 +7670,19 @@ ${text}`;
|
|
|
7484
7670
|
const handler = this.commands.get(parsed.command);
|
|
7485
7671
|
if (handler) {
|
|
7486
7672
|
const handled = await handler(envelope, parsed.args);
|
|
7487
|
-
if (handled)
|
|
7673
|
+
if (handled) {
|
|
7674
|
+
this.forgetPendingGroupHistory(envelope);
|
|
7488
7675
|
return;
|
|
7676
|
+
}
|
|
7489
7677
|
}
|
|
7490
7678
|
if (parsed.command === "btw" && this.bridge.btw) {
|
|
7491
7679
|
if (!this.isAuthorizedForSharedSession(envelope)) {
|
|
7492
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
7680
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Only authorized members can use ${this.prefixedCommand("/btw")} in this shared session.`);
|
|
7493
7681
|
return;
|
|
7494
7682
|
}
|
|
7495
7683
|
btwQuestion = parsed.args.trim();
|
|
7496
7684
|
if (!btwQuestion) {
|
|
7497
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
7685
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Usage: ${this.prefixedCommand("/btw <question>")}`);
|
|
7498
7686
|
return;
|
|
7499
7687
|
}
|
|
7500
7688
|
if (btwQuestion.length > CHANNEL_BTW_MAX_INPUT_LENGTH) {
|
|
@@ -7502,7 +7690,7 @@ ${text}`;
|
|
|
7502
7690
|
return;
|
|
7503
7691
|
}
|
|
7504
7692
|
if (envelope.imageBase64 || envelope.attachments?.length) {
|
|
7505
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "/btw supports text-only questions
|
|
7693
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `${this.prefixedCommand("/btw")} supports text-only questions.`);
|
|
7506
7694
|
return;
|
|
7507
7695
|
}
|
|
7508
7696
|
}
|
|
@@ -7558,7 +7746,7 @@ ${text}`;
|
|
|
7558
7746
|
return;
|
|
7559
7747
|
}
|
|
7560
7748
|
if (!sessionId) {
|
|
7561
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
7749
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `No task is currently selected. Use ${this.prefixedCommand("/session new <name>")} or ${this.prefixedCommand("/session use <name>")}.`);
|
|
7562
7750
|
return;
|
|
7563
7751
|
}
|
|
7564
7752
|
} else {
|
|
@@ -7566,7 +7754,7 @@ ${text}`;
|
|
|
7566
7754
|
}
|
|
7567
7755
|
const sourceLabel = this.namedSessions ? this.sourceLabelForTurn(sessionId, envelope) : void 0;
|
|
7568
7756
|
if (this.namedSessions && !sourceLabel) {
|
|
7569
|
-
await this.sendThreadMessage(envelope.chatId, envelope.threadId,
|
|
7757
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `Could not identify the selected task. Use ${this.prefixedCommand("/sessions")}, select it again, and retry.`);
|
|
7570
7758
|
return;
|
|
7571
7759
|
}
|
|
7572
7760
|
if (btwQuestion !== void 0) {
|
|
@@ -7768,6 +7956,9 @@ ${promptText}`;
|
|
|
7768
7956
|
return;
|
|
7769
7957
|
}
|
|
7770
7958
|
const acceptedRecallContext = recallRead?.generation === recallRead?.state.generation ? recallContext : void 0;
|
|
7959
|
+
if (recognizedSlashCommand) {
|
|
7960
|
+
this.forgetPendingGroupHistory(envelope);
|
|
7961
|
+
}
|
|
7771
7962
|
const groupHistoryEntries = recognizedSlashCommand ? [] : this.drainPendingGroupHistory(envelope);
|
|
7772
7963
|
let promptToSend = this.prependGroupHistoryContext(promptText, groupHistoryEntries);
|
|
7773
7964
|
const hiddenContext = [
|
|
@@ -8289,7 +8480,9 @@ var DaemonChannelBridge = class extends EventEmitter2 {
|
|
|
8289
8480
|
result.push({
|
|
8290
8481
|
sessionId: session.sessionId,
|
|
8291
8482
|
workspaceCwd: session.workspaceCwd,
|
|
8292
|
-
hasActivePrompt: this.activePrompts.has(session.sessionId)
|
|
8483
|
+
hasActivePrompt: this.activePrompts.has(session.sessionId),
|
|
8484
|
+
...session.worktree ? { worktree: { ...session.worktree } } : {},
|
|
8485
|
+
...session.worktreeState ? { worktreeState: session.worktreeState } : {}
|
|
8293
8486
|
});
|
|
8294
8487
|
}
|
|
8295
8488
|
return result;
|
|
@@ -8298,13 +8491,17 @@ var DaemonChannelBridge = class extends EventEmitter2 {
|
|
|
8298
8491
|
this.connected = true;
|
|
8299
8492
|
}
|
|
8300
8493
|
async newSession(cwd, options, bindingToken) {
|
|
8494
|
+
if (options?.worktree && !this.options.sessionWorktreePersistence) {
|
|
8495
|
+
throw new Error("The daemon does not support durable Channel worktree sessions.");
|
|
8496
|
+
}
|
|
8301
8497
|
const lifecycleGeneration = this.lifecycleGeneration;
|
|
8302
8498
|
const session = await this.options.sessionFactory({
|
|
8303
8499
|
workspaceCwd: cwd || this.options.cwd,
|
|
8304
8500
|
modelServiceId: this.options.modelServiceId,
|
|
8305
8501
|
sessionScope: this.options.sessionScope ?? "thread",
|
|
8306
8502
|
...options?.approvalMode ? { approvalMode: options.approvalMode } : {},
|
|
8307
|
-
...options?.sourceId ? { sourceId: options.sourceId } : {}
|
|
8503
|
+
...options?.sourceId ? { sourceId: options.sourceId } : {},
|
|
8504
|
+
...options?.worktree ? { worktree: options.worktree } : {}
|
|
8308
8505
|
});
|
|
8309
8506
|
if (lifecycleGeneration !== this.lifecycleGeneration) {
|
|
8310
8507
|
await this.rejectStaleSession(session);
|
|
@@ -8751,7 +8948,7 @@ var DaemonChannelBridge = class extends EventEmitter2 {
|
|
|
8751
8948
|
const toolCallId = getString(update["toolCallId"]);
|
|
8752
8949
|
const kind = getString(update["kind"]);
|
|
8753
8950
|
const meta = isRecord3(update["_meta"]) ? update["_meta"] : void 0;
|
|
8754
|
-
if (!kind && toolCallId && getString(update["status"]) === "in_progress" && meta?.["shellProgress"] !== void 0) {
|
|
8951
|
+
if (!kind && toolCallId && getString(update["status"]) === "in_progress" && (meta?.["shellProgress"] !== void 0 || meta?.["subagentProgress"] === true)) {
|
|
8755
8952
|
break;
|
|
8756
8953
|
}
|
|
8757
8954
|
if (!toolCallId || !kind) {
|
|
@@ -9187,6 +9384,8 @@ export {
|
|
|
9187
9384
|
sanitizeLogText,
|
|
9188
9385
|
SessionRouter,
|
|
9189
9386
|
ChannelLoopScheduler,
|
|
9387
|
+
startsWithMessagePrefix,
|
|
9388
|
+
stripMessagePrefix,
|
|
9190
9389
|
ChannelBase,
|
|
9191
9390
|
PollingChannelBase,
|
|
9192
9391
|
CHANNEL_PROMPT_META_KEY,
|