@qwen-code/qwen-code 0.22.3-nightly.20260831.3a0c4c6108 → 0.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +30 -0
- package/bundled/computer-use/SKILL.md +116 -180
- package/bundled/goal-draft/SKILL.md +5 -1
- package/bundled/qc-helper/docs/configuration/model-providers.md +4 -0
- package/bundled/qc-helper/docs/configuration/settings.md +53 -50
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/channels/dingtalk.md +4 -2
- package/bundled/qc-helper/docs/features/channels/dws.md +6 -2
- package/bundled/qc-helper/docs/features/channels/overview.md +1 -0
- package/bundled/qc-helper/docs/features/commands.md +38 -1
- package/bundled/qc-helper/docs/features/computer-use.md +2 -2
- package/bundled/qc-helper/docs/features/goals.md +9 -3
- package/bundled/qc-helper/docs/features/headless.md +16 -1
- package/bundled/qc-helper/docs/features/hooks.md +2 -1
- package/bundled/qc-helper/docs/features/output-styles.md +38 -0
- package/bundled/qc-helper/docs/qwen-serve.md +15 -0
- package/bundled/review/SKILL.md +5 -5
- package/bundled/review/references/posting.md +2 -2
- package/chunks/{MaxSizedBox-IHRTWGSY.js → MaxSizedBox-B3D7545A.js} +41 -45
- package/chunks/{StandaloneSessionPicker-TLVWVTJ7.js → StandaloneSessionPicker-QUMO4LLQ.js} +64 -67
- package/chunks/{acpAgent-7I5LLPP3.js → acpAgent-2GTFCIEP.js} +771 -248
- package/chunks/{agent-4Z4NTJXD.js → agent-XKF5SZWU.js} +26 -30
- package/chunks/{agent-headless-TVUJXQWU.js → agent-headless-OC2IB55D.js} +26 -30
- package/chunks/{anthropicContentGenerator-VSSPG7XV.js → anthropicContentGenerator-L76MR5OR.js} +14 -14
- package/chunks/{artifact-tool-TEYW6I4A.js → artifact-tool-MYCL2QCS.js} +2 -3
- package/chunks/{askUserQuestion-PYNBWV63.js → askUserQuestion-THQZMG44.js} +2 -2
- package/chunks/{bridge-EVURP4NO.js → bridge-IHSBI2YJ.js} +42 -46
- package/chunks/{build-INBK7IXX.js → build-63BIOYWK.js} +1 -1
- package/chunks/{channel-management-service-IDBNYSFW.js → channel-management-service-4MTCEGJB.js} +4 -4
- package/chunks/{channel-settings-store-MZNXRKVI.js → channel-settings-store-BVKWAI2T.js} +50 -54
- package/chunks/{channel-worker-group-ZLP5SJHT.js → channel-worker-group-47F4ISUZ.js} +6 -6
- package/chunks/{channel-worker-manager-FG5377T2.js → channel-worker-manager-I5Y44GYR.js} +50 -9
- package/chunks/{channel-worker-supervisor-HDVE4ADS.js → channel-worker-supervisor-6VCLUXFE.js} +4 -4
- package/chunks/{chunk-3452WXOK.js → chunk-2M3EWQNG.js} +17 -0
- package/chunks/{chunk-HDMKCJHI.js → chunk-32LU3APX.js} +1 -1
- package/chunks/{chunk-BSJOBW4U.js → chunk-37JFWFCD.js} +1 -1
- package/chunks/{chunk-AN3KFCNH.js → chunk-3JQZVCBI.js} +2 -2
- package/chunks/{chunk-RGEV5AUD.js → chunk-3L724BJ5.js} +11 -8
- package/chunks/{chunk-GCUR24KK.js → chunk-47RYEQW5.js} +2 -2
- package/chunks/{chunk-CM4F4JBB.js → chunk-4BGDFKQE.js} +5 -5
- package/chunks/{chunk-ZBDYI7VM.js → chunk-4F7GQGXB.js} +10961 -4033
- package/chunks/{chunk-JMRE4WJQ.js → chunk-4HVH57J3.js} +81 -17
- package/chunks/{chunk-26SIKQIC.js → chunk-4LIFGNI4.js} +1 -1
- package/chunks/{chunk-U5RTYI7D.js → chunk-4M24B5J5.js} +13 -13
- package/chunks/{chunk-7XICSE62.js → chunk-4PSDSCW3.js} +3 -3
- package/chunks/{chunk-AYYKUUKP.js → chunk-4UANMABT.js} +73 -19
- package/chunks/{chunk-GS7XT345.js → chunk-54C6PIGT.js} +3 -3
- package/chunks/{chunk-UKB2TZAO.js → chunk-5EIOJGCR.js} +4 -4
- package/chunks/{chunk-64REQJJ2.js → chunk-5H5S4UY5.js} +3 -3
- package/chunks/chunk-5IENVM7Z.js +35 -0
- package/chunks/{chunk-JOWQD4LO.js → chunk-5Q5RC2WE.js} +1 -1
- package/chunks/{chunk-3NQCZMUB.js → chunk-5RTTI4GE.js} +73 -73
- package/chunks/{chunk-J4Y3QJHF.js → chunk-64QH2UC6.js} +11 -1
- package/chunks/{chunk-I75VKFCJ.js → chunk-65HWLGA7.js} +1 -1
- package/chunks/{chunk-W7KWB6AH.js → chunk-6A2D4QSO.js} +8 -5
- package/chunks/{chunk-OTTNXUT5.js → chunk-7IKXTGZT.js} +1 -1
- package/chunks/{chunk-LYSZVCCD.js → chunk-7JMGTOH7.js} +427 -129
- package/chunks/{chunk-YOFULAHO.js → chunk-7RB56BRJ.js} +3 -3
- package/chunks/{chunk-6VHIWUJP.js → chunk-ADYN7P2Y.js} +2 -2
- package/chunks/{chunk-7DDTI7Q3.js → chunk-AHYTURFB.js} +1 -1
- package/chunks/{chunk-TNMOFNT4.js → chunk-ALUYNJPM.js} +1395 -2079
- package/chunks/{chunk-H2A2GJGL.js → chunk-AZJLY2XZ.js} +5 -5
- package/chunks/{chunk-BE5FGT5Z.js → chunk-BA4WJC4L.js} +1 -1
- package/chunks/{chunk-H5GPPDGY.js → chunk-BFY33IB4.js} +16 -8
- package/chunks/{chunk-RY7DL5IF.js → chunk-BJXCYUGM.js} +1 -1
- package/chunks/{chunk-ND7TQQPE.js → chunk-C2VWOXHS.js} +6 -6
- package/chunks/{chunk-T4RMUTTT.js → chunk-C4TIXFDZ.js} +2 -2
- package/chunks/{chunk-B2RIIK3K.js → chunk-CVX63TFJ.js} +3 -1
- package/chunks/{chunk-SMJYTKTB.js → chunk-DQCKVAF5.js} +1 -1
- package/chunks/{chunk-RLSPPTWH.js → chunk-DSX7KQPM.js} +438 -181
- package/chunks/{chunk-PNIGAVY6.js → chunk-DTVQSSNM.js} +2 -2
- package/chunks/{chunk-67AY5D3M.js → chunk-DYTW3QVG.js} +23 -8
- package/chunks/{chunk-3CZGSTZX.js → chunk-EBDGRBZX.js} +22 -14
- package/chunks/{chunk-DJBQCO2E.js → chunk-EFTPIZIC.js} +412 -3
- package/chunks/{chunk-QE7DTCLX.js → chunk-EIY7SUPZ.js} +1 -1
- package/chunks/{chunk-6OO7QEWV.js → chunk-EVFDRBUM.js} +97 -77
- package/chunks/{chunk-QTMPM6RC.js → chunk-EWRW2WQC.js} +3 -3
- package/chunks/{chunk-IIFL7QDN.js → chunk-F33GFWPR.js} +34 -11
- package/chunks/{chunk-YPISTYEI.js → chunk-F47DITLZ.js} +11 -1
- package/chunks/{chunk-OE5AQVNB.js → chunk-F7NF2IOE.js} +6 -6
- package/chunks/{chunk-RT4QNQ5P.js → chunk-FD5SJOWT.js} +8 -5
- package/chunks/{chunk-ACZ4YRYK.js → chunk-FRICLXCZ.js} +3 -3
- package/chunks/{chunk-IBMUI5EV.js → chunk-FUO5V5KI.js} +11 -4
- package/chunks/{chunk-T3TL6S3B.js → chunk-G5PBOQWI.js} +8 -5
- package/chunks/{chunk-D7D3HSYQ.js → chunk-G7HBEEX7.js} +12 -7
- package/chunks/{chunk-FXUSWLBF.js → chunk-GH2S4GD5.js} +133 -8
- package/chunks/{chunk-XPDKSOVW.js → chunk-GXUTFQXK.js} +42 -44
- package/chunks/{chunk-OSTQZIOY.js → chunk-H43PSPYS.js} +2 -2
- package/chunks/{chunk-UVYKCRJZ.js → chunk-HJBHMANB.js} +11 -13
- package/chunks/{chunk-WLEYH7CD.js → chunk-HRPFBHW7.js} +4 -0
- package/chunks/{chunk-DBTMP3P4.js → chunk-I2TMJPCV.js} +1 -1
- package/chunks/{chunk-EU2B4P3D.js → chunk-I4NRYS6A.js} +4 -4
- package/chunks/{chunk-JPKTAQS3.js → chunk-I5N4EAS6.js} +1 -1
- package/chunks/{chunk-W4BDHLRT.js → chunk-IG4W5SJR.js} +2 -2
- package/chunks/{chunk-BXNKREX7.js → chunk-IPATA3T2.js} +2 -2
- package/chunks/{chunk-NKLP3DCK.js → chunk-IQAFKVXS.js} +1 -1
- package/chunks/{chunk-AYHQZBJ4.js → chunk-IRKQ4YYX.js} +3 -3
- package/chunks/{chunk-J3NNHTV6.js → chunk-J5TTWBZK.js} +6 -0
- package/chunks/{chunk-AVNATYLY.js → chunk-JJKNYRFY.js} +1 -1
- package/chunks/{chunk-ERHAMGAA.js → chunk-JR42V4UY.js} +1 -1
- package/chunks/{chunk-NT7LXVV5.js → chunk-JUARRUMA.js} +362 -1084
- package/chunks/{chunk-OKMDOATP.js → chunk-KEVYJSI4.js} +11 -11
- package/chunks/{chunk-AF3QB6OL.js → chunk-KGV55H53.js} +1 -1
- package/chunks/{chunk-SDCHI64N.js → chunk-KM3XVTMO.js} +10 -4
- package/chunks/{chunk-ERRJA23L.js → chunk-KMU3ZHH4.js} +1 -1
- package/chunks/chunk-KOGW3YWJ.js +2054 -0
- package/chunks/{chunk-6NWPR2EB.js → chunk-L26ONV2Y.js} +5 -5
- package/chunks/chunk-L34XSHIZ.js +28 -0
- package/chunks/{chunk-UXEW7TQS.js → chunk-LB3WQQJK.js} +1 -1
- package/chunks/{chunk-YNG7XAJU.js → chunk-LEPCWS5A.js} +1 -1
- package/chunks/{chunk-XLENZQXH.js → chunk-LHBNR6EU.js} +2 -2
- package/chunks/{chunk-AKNQMSL2.js → chunk-LOBDDFYK.js} +4 -28
- package/chunks/{chunk-L6CUJZDG.js → chunk-LU77UT4D.js} +2 -2
- package/chunks/{chunk-3EGEBDTW.js → chunk-M4KFODIP.js} +1 -1
- package/chunks/{chunk-JLSZT354.js → chunk-M4LBBSVP.js} +2 -0
- package/chunks/{chunk-YOMKOM7E.js → chunk-MP6YZ4RK.js} +6580 -5992
- package/chunks/chunk-N2TNM3QB.js +9 -0
- package/chunks/{chunk-GDXSXL3H.js → chunk-NFIDVZND.js} +1 -1
- package/chunks/{chunk-NT5XIL5H.js → chunk-NQ4L2CMD.js} +51 -6
- package/chunks/{chunk-OQYXJK2V.js → chunk-NRL5CUZT.js} +1 -1
- package/chunks/{chunk-FIWZOMBF.js → chunk-NSUKQ4DN.js} +6 -0
- package/chunks/chunk-NUHOLAQ6.js +59 -0
- package/chunks/{chunk-BBYTY46C.js → chunk-NVVJTUSL.js} +266 -105
- package/chunks/{chunk-CAZADEU7.js → chunk-NXKOVOM5.js} +9 -9
- package/chunks/{chunk-5Q372OFJ.js → chunk-O4KNCAX4.js} +57 -10
- package/chunks/{chunk-GOXKNSDZ.js → chunk-O5CD7T4T.js} +40 -9
- package/chunks/{chunk-XIQ5HQ2F.js → chunk-OBTWL6ZW.js} +1 -1
- package/chunks/{chunk-5MK45KZ3.js → chunk-OHOO527W.js} +1 -1
- package/chunks/{chunk-CETB5XY4.js → chunk-ORFIYTI2.js} +1 -1
- package/chunks/{chunk-7E7UCJHS.js → chunk-OSHQMOBS.js} +18 -17
- package/chunks/{chunk-YDQ4OCDK.js → chunk-OSSTATJF.js} +89 -1
- package/chunks/chunk-P6UIF2OW.js +400 -0
- package/chunks/{chunk-V4HN35IF.js → chunk-PCRBLMIN.js} +16 -2
- package/chunks/{chunk-L2OKAIUK.js → chunk-QI27MKNQ.js} +23 -15
- package/chunks/{chunk-FHPYRXRH.js → chunk-QJGYU5PG.js} +1 -1
- package/chunks/{chunk-IVUWTA2D.js → chunk-QJVZLILI.js} +1 -1
- package/chunks/{chunk-TBJ3SNS3.js → chunk-QKDNS6FU.js} +1 -1
- package/chunks/{chunk-YKADANK6.js → chunk-QQD2GART.js} +10 -3
- package/chunks/{chunk-ED7DD7MV.js → chunk-RAFQIHN2.js} +1 -1
- package/chunks/{chunk-TV7BJ7TX.js → chunk-RJUVTJEZ.js} +1 -1
- package/chunks/{chunk-RVCGAHC7.js → chunk-RM4WT2XB.js} +4 -4
- package/chunks/{chunk-6YXNJXQW.js → chunk-RN3YGDCA.js} +3 -3
- package/chunks/{chunk-SMRDCANI.js → chunk-S6H3ELPG.js} +1 -1
- package/chunks/{chunk-MBZ5ORJB.js → chunk-SI7WDR3U.js} +281 -2
- package/chunks/{chunk-5FGWVPCM.js → chunk-SRF4KTAG.js} +4 -4
- package/chunks/{chunk-LFAR7CPW.js → chunk-STCVJXQB.js} +23 -23
- package/chunks/{chunk-JDIO45X7.js → chunk-SULZPKTA.js} +1 -1
- package/chunks/{chunk-KUDI54QQ.js → chunk-SX2QIMJV.js} +5 -5
- package/chunks/{chunk-VYSZUQGU.js → chunk-TJYRTS4S.js} +2 -2
- package/chunks/{chunk-JOTYTYYW.js → chunk-TMKTOTMQ.js} +3 -3
- package/chunks/{chunk-FPMQT2YY.js → chunk-TQHPVKO6.js} +4 -4
- package/chunks/{chunk-GN422P4J.js → chunk-TSZSGQ3N.js} +1 -1
- package/chunks/{chunk-IXEZHTDR.js → chunk-U4DJ5XB3.js} +292 -38
- package/chunks/{chunk-MZ5A5PQW.js → chunk-UAKRDON5.js} +4 -4
- package/chunks/{chunk-NGKLMNWN.js → chunk-UM2FFKXN.js} +2 -2
- package/chunks/{chunk-5ICKESC3.js → chunk-UPFRILIL.js} +2 -2
- package/chunks/{chunk-RAEEQEC5.js → chunk-UUASLXHW.js} +54 -5
- package/chunks/chunk-V5U2NZNJ.js +29 -0
- package/chunks/{chunk-P5Y23G2L.js → chunk-V7RNNPGC.js} +1 -18
- package/chunks/{chunk-ZYPJ7HVZ.js → chunk-VBWD6C27.js} +1 -1
- package/chunks/{chunk-MJBHSZEJ.js → chunk-VNAYZAFX.js} +3 -3
- package/chunks/chunk-VPSIC437.js +780 -0
- package/chunks/{chunk-AAX236AR.js → chunk-VWTSRH6C.js} +52 -11
- package/chunks/{chunk-PDXYZBBQ.js → chunk-VYIUNFEA.js} +2 -2
- package/chunks/{chunk-BY24DZ4J.js → chunk-WP4AX3XD.js} +5 -7
- package/chunks/{chunk-X7C7KFWA.js → chunk-XLXAZLDR.js} +1 -1
- package/chunks/{chunk-ZQ3FKEWA.js → chunk-YPWZTR7F.js} +3 -3
- package/chunks/{chunk-IXHV5MIC.js → chunk-ZDFQGHZH.js} +1 -1
- package/chunks/chunk-ZJ2LM2SI.js +198 -0
- package/chunks/{chunk-PWR2NQBS.js → chunk-ZKFTS3OV.js} +3 -3
- package/chunks/{chunk-HMJ2P3SV.js → chunk-ZL4HFSL6.js} +91 -29
- package/chunks/{chunk-ID33ZRWH.js → chunk-ZTPGUFQV.js} +28 -6
- package/chunks/chunk-bdqvmfwv-ZTSOWAFE.js +17446 -0
- package/chunks/{config-utils-NNUPVGEC.js → config-utils-LVSYDLHZ.js} +42 -46
- package/chunks/{contextCommand-S3TPCDM5.js → contextCommand-TZD7UAJK.js} +40 -44
- package/chunks/{core-runtime-NASPCSQX.js → core-runtime-B4UKKIAQ.js} +42 -46
- package/chunks/{create-sub-session-36TNCHCP.js → create-sub-session-LUPWEUHR.js} +2 -2
- package/chunks/{create-sub-session-DS4BJLYZ.js → create-sub-session-NJ24B4US.js} +41 -44
- package/chunks/{cron-create-QXHTYUTO.js → cron-create-CRSPET3H.js} +1 -1
- package/chunks/{cron-delete-WV2BM42M.js → cron-delete-DB77SZTU.js} +1 -1
- package/chunks/{cron-list-7KVNBLZ7.js → cron-list-U2JNYWV6.js} +1 -1
- package/chunks/{daemon-UCVUHPJD.js → daemon-RKDGBFLK.js} +385 -19
- package/chunks/{daemon-git-worktree-guard-ATXVQPS3.js → daemon-git-worktree-guard-O2HPOBAB.js} +40 -44
- package/chunks/{daemon-status-provider-UI3GBTMO.js → daemon-status-provider-GRRVCJFW.js} +47 -51
- package/chunks/{daemon-trust-policy-SUCBJ2CA.js → daemon-trust-policy-YJL442BK.js} +46 -50
- package/chunks/{daemon-trust-policy-monitor-3LM5RQNS.js → daemon-trust-policy-monitor-JL7F4Y4Q.js} +46 -50
- package/chunks/{deferred-core-runtime-SCOJLVYG.js → deferred-core-runtime-S32AYVZI.js} +39 -43
- package/chunks/{devtools-JCG4K2NZ.js → devtools-VDRJYPZF.js} +1 -1
- package/chunks/{discovery-X2NV535U.js → discovery-TUM3ZQ6U.js} +2 -2
- package/chunks/{display-image-Z4VBQDEJ.js → display-image-73C7XNRK.js} +3 -3
- package/chunks/{dist-7WDZYMWV.js → dist-62OZ7QXB.js} +2 -2
- package/chunks/{dist-FLJLHASF.js → dist-EDHQIBYD.js} +7 -7
- package/chunks/{dist-S3BKCTWF.js → dist-GT64AAUR.js} +1 -1
- package/chunks/{dist-GPSRNVVP.js → dist-JVXT4VUJ.js} +2 -2
- package/chunks/{dist-LY66XNUL.js → dist-L6URO6CK.js} +3 -3
- package/chunks/{dist-5423MG3D.js → dist-LXFYIJNG.js} +734 -128
- package/chunks/{dist-SDKHGH5O.js → dist-PDGNRVPY.js} +4 -4
- package/chunks/{dist-WAUO5OMN.js → dist-QAF5DO3Y.js} +363 -73
- package/chunks/{dist-WIVVPE7M.js → dist-ZCJLKQSP.js} +1 -1
- package/chunks/{earlyInputCapture-INWJ2STR.js → earlyInputCapture-BBPCIVZG.js} +38 -42
- package/chunks/{edit-B7ZRRGAE.js → edit-SUGXY63Y.js} +26 -30
- package/chunks/{en-E4AYTX6H.js → en-2RATMNX7.js} +2 -0
- package/chunks/{enter-worktree-SPZHEETQ.js → enter-worktree-B6USKSIK.js} +5 -5
- package/chunks/{enterPlanMode-S554IKJ2.js → enterPlanMode-MDX4RVVL.js} +26 -30
- package/chunks/{environment-25ADH4Y6.js → environment-VN6RXDVN.js} +41 -45
- package/chunks/{errors-G2I6LFTW.js → errors-UEY36PIT.js} +40 -44
- package/chunks/{exit-worktree-AWUXAMAM.js → exit-worktree-DLQ73SJH.js} +8 -6
- package/chunks/{exitPlanMode-ZFH4OYPM.js → exitPlanMode-EPHIEDAA.js} +26 -30
- package/chunks/{fast-path-WZHVZ2ER.js → fast-path-Y73R42LV.js} +3 -3
- package/chunks/{fast-path-settings-NILM6QZL.js → fast-path-settings-MFUR3IWK.js} +3 -3
- package/chunks/{glob-UOVDMBUP.js → glob-DMGH7EZN.js} +27 -31
- package/chunks/goal-tools-3RF3PXCL.js +99 -0
- package/chunks/{grep-LHYJ5V2N.js → grep-AJVLCVXC.js} +2 -2
- package/chunks/{handleAutoUpdate-4MZ45DZY.js → handleAutoUpdate-HVWQT2AU.js} +42 -46
- package/chunks/{i18n-KWUEI4DS.js → i18n-5OR7NTRZ.js} +39 -43
- package/chunks/{image-gen-YZDVO5YS.js → image-gen-VOIDOHOB.js} +1 -1
- package/chunks/{initializer-2NBROGMG.js → initializer-JE5RQSOE.js} +46 -50
- package/chunks/{installationInfo-YKUSY3ZB.js → installationInfo-KO3CCSCK.js} +38 -42
- package/chunks/{list-W2WV3COM.js → list-3IORSFIY.js} +49 -53
- package/chunks/{list-agents-PMVMHNY7.js → list-agents-SBMONIUK.js} +3 -3
- package/chunks/{llm-NPPHLIJI.js → llm-K26SUDVK.js} +155 -99
- package/chunks/{llm-content-generator-YK3WN6XW.js → llm-content-generator-TT6EAUD4.js} +5 -6
- package/chunks/{loadedSettingsAdapter-2P7DFWUR.js → loadedSettingsAdapter-KLLFZF3M.js} +46 -50
- package/chunks/{loggingContentGenerator-QYYYGU6V.js → loggingContentGenerator-EYQBA4M4.js} +43 -47
- package/chunks/{loop-wakeup-EBM4F5MZ.js → loop-wakeup-QA6SHCZT.js} +2 -2
- package/chunks/{ls-F6TRX3DD.js → ls-HEJNCEYO.js} +1 -1
- package/chunks/{lsp-QYTOS2FI.js → lsp-WOQKNZP6.js} +1 -1
- package/chunks/{managed-npm-update-UMC4NBWW.js → managed-npm-update-HIJTODQT.js} +38 -42
- package/chunks/{mcp-OFI6XDP2.js → mcp-A2UEHETW.js} +46 -50
- package/chunks/{monitor-QX3BM3JY.js → monitor-DKNZQAB2.js} +28 -32
- package/chunks/{node-QKLNSZMX.js → node-UETAYMMO.js} +3 -3
- package/chunks/{nonInteractiveCli-NVRMD5MN.js → nonInteractiveCli-YA47F2F4.js} +86 -89
- package/chunks/{notebook-edit-AAILDPSV.js → notebook-edit-MGHTRL2D.js} +26 -30
- package/chunks/{openaiContentGenerator-53PB3CMN.js → openaiContentGenerator-ZJIEQ3ZJ.js} +15 -17
- package/chunks/{pidfile-5ACKG2LI.js → pidfile-ETHAZNMY.js} +38 -42
- package/chunks/{processUtils-2BCDO3DZ.js → processUtils-UY3SAJJZ.js} +2 -2
- package/chunks/{prompt-terminal-ledger-3RKW73A2.js → prompt-terminal-ledger-GZ747VYE.js} +39 -43
- package/chunks/{qwenContentGenerator-N4LLWDPH.js → qwenContentGenerator-VI4KATRY.js} +39 -43
- package/chunks/{read-file-DPAKXHYE.js → read-file-P7F4P7LV.js} +6 -8
- package/chunks/{read-mcp-resource-R4NO75DW.js → read-mcp-resource-GLAGB6R7.js} +1 -1
- package/chunks/{record-artifact-2EAYLAL5.js → record-artifact-SWVR7NSU.js} +3 -3
- package/chunks/renderer-selection-M4UN63VJ.js +99 -0
- package/chunks/{report-findings-Y4MSHDS3.js → report-findings-AL5YW3KI.js} +4 -4
- package/chunks/{request-shutdown-DWRMGTMB.js → request-shutdown-5YK4IZ54.js} +5 -5
- package/chunks/{resumeHistoryUtils-3JQORXAK.js → resumeHistoryUtils-DPZKFW24.js} +44 -48
- package/chunks/{ripGrep-AHF5QCI7.js → ripGrep-C7LJKUPZ.js} +9 -11
- package/chunks/{run-qwen-serve-3LKV7KDC.js → run-qwen-serve-OGTEEUR2.js} +132 -81
- package/chunks/{runtime-66F4W3IA.js → runtime-LNBLEMZS.js} +51 -55
- package/chunks/{scheduled-tasks-2NVKS5Q2.js → scheduled-tasks-FLDYZQOF.js} +44 -48
- package/chunks/{scheduler-JNV7T3ZO.js → scheduler-73YXGUGW.js} +40 -44
- package/chunks/{sdk-exporters-grpc-G5IT4XS4.js → sdk-exporters-grpc-MXTVSE3C.js} +2 -2
- package/chunks/{sdk-exporters-http-MFIWD23D.js → sdk-exporters-http-3JO5TJNU.js} +3 -3
- package/chunks/{sdk-impl-2RXJ4Q6X.js → sdk-impl-HZAUUTHJ.js} +5 -5
- package/chunks/{send-message-WPZRCJOB.js → send-message-JC7NJTY6.js} +7 -7
- package/chunks/{serve-GP2UNRP7.js → serve-3UR2H4CV.js} +46 -50
- package/chunks/{server-7W6C3SOW.js → server-AOYZVVOM.js} +1736 -502
- package/chunks/{session-PZLBAQGG.js → session-UAWFNFGI.js} +90 -93
- package/chunks/session-attachments-root-ZCGXQQTR.js +104 -0
- package/chunks/{session-pr-refresh-OIVL3U3Z.js → session-pr-refresh-CT2INROL.js} +131 -65
- package/chunks/{settings-ZOHIQWYK.js → settings-BHRGDASJ.js} +45 -49
- package/chunks/{shell-FWZT6IUR.js → shell-YHOGC7TO.js} +26 -30
- package/chunks/{skill-RTQC2YGA.js → skill-ZGBKNCHQ.js} +71 -49
- package/chunks/{skill-settings-AKMIXFSJ.js → skill-settings-AKSP665O.js} +45 -49
- package/chunks/{spawnChannel-ZP23JL6O.js → spawnChannel-N25MBB6F.js} +40 -44
- package/chunks/{standalone-update-P2Q5H4ZU.js → standalone-update-XGPWJDRN.js} +40 -44
- package/chunks/start-opentui-ui-FZ4USOU7.js +55342 -0
- package/chunks/{startInteractiveUI-NSA6QPQZ.js → startInteractiveUI-E2WQJUOA.js} +2920 -4542
- package/chunks/{syntheticOutput-5URSQLIS.js → syntheticOutput-HJNZSEHN.js} +2 -2
- package/chunks/{task-create-3EXVDG3G.js → task-create-6RSD54S5.js} +7 -7
- package/chunks/{task-list-PIBYNSE7.js → task-list-IQSACPOM.js} +31 -7
- package/chunks/{task-stop-IV3BYWJC.js → task-stop-HE2LRQNW.js} +1 -1
- package/chunks/{task-update-H5BPDS5Y.js → task-update-XAJ2NYOA.js} +7 -7
- package/chunks/{team-create-53T42W37.js → team-create-SOKMYSQU.js} +28 -32
- package/chunks/{team-delete-X3WPELS6.js → team-delete-NGNNKGMG.js} +1 -1
- package/chunks/{team-plan-approval-D45ZC5OE.js → team-plan-approval-U7ZWXYAY.js} +26 -30
- package/chunks/{terminal-image-renderer-FCRUWT6C.js → terminal-image-renderer-KKM4OBLO.js} +40 -44
- package/chunks/{theme-manager-MHNPEDP7.js → theme-manager-GQHF3A7T.js} +38 -42
- package/chunks/{todoWrite-A5IOZZ3P.js → todoWrite-5UTVUXHA.js} +36 -6
- package/chunks/{tool-search-6RPBGGUX.js → tool-search-IAI2RVWT.js} +10 -12
- package/chunks/{total-session-admission-MGV56XDK.js → total-session-admission-G4CGCSTG.js} +43 -47
- package/chunks/{trustedFolders-QJYEFMTU.js → trustedFolders-D2I3FDPB.js} +39 -43
- package/chunks/{update-relaunch-ZDMQX63C.js → update-relaunch-5RWKZAL3.js} +5 -5
- package/chunks/{updateCheck-4QZWCGP6.js → updateCheck-ZXOQDFEI.js} +42 -46
- package/chunks/{useAutoAcceptIndicator-DLIQN256.js → useAutoAcceptIndicator-6EK4QGAH.js} +49 -53
- package/chunks/{validateNonInterActiveAuth-HGTG7AEK.js → validateNonInterActiveAuth-QPFEKATS.js} +82 -86
- package/chunks/{version-CPAZMC4B.js → version-JKNG7YDH.js} +1 -1
- package/chunks/{web-fetch-N4K5M3M4.js → web-fetch-X3AHIIHW.js} +8 -11
- package/chunks/{web-search-4VZKM5SF.js → web-search-K2FMOGS5.js} +6 -7
- package/chunks/{web-shell-static-PW7OEDQO.js → web-shell-static-POZHGGXE.js} +4 -4
- package/chunks/{workflow-2ALQKTHG.js → workflow-TOLPAK5G.js} +38 -38
- package/chunks/{workspace-providers-status-5JM4CB6R.js → workspace-providers-status-PCJK3RC7.js} +50 -54
- package/chunks/{workspace-registration-store-RNMFVCH7.js → workspace-registration-store-KQWVVW4Y.js} +1 -1
- package/chunks/{workspace-registry-6EULAPZC.js → workspace-registry-YNIOB6HJ.js} +43 -47
- package/chunks/{workspace-runtime-coordinator-IRI2DRCJ.js → workspace-runtime-coordinator-WG2RNEN7.js} +43 -47
- package/chunks/{workspace-service-SETHN4WE.js → workspace-service-G4ZNBOFH.js} +51 -55
- package/chunks/{workspace-skills-status-4D4EUEQU.js → workspace-skills-status-FMTPPMWC.js} +47 -51
- package/chunks/{workspace-trust-reconciler-4LR3CDL4.js → workspace-trust-reconciler-IBDFQBQS.js} +53 -57
- package/chunks/wrapper-JH3IFHT2.js +35 -0
- package/chunks/{write-file-45GWPSOI.js → write-file-YTLFY2S5.js} +28 -32
- package/chunks/{zh-2BQ7P6OD.js → zh-25DF7OGK.js} +2 -0
- package/chunks/{zh-TW-UFXRZTXX.js → zh-TW-5EDMZVGK.js} +2 -0
- package/chunks/{zoom-image-K6IQUKRC.js → zoom-image-IFXSN74N.js} +6 -8
- package/cli.js +17 -13
- package/locales/en.js +3 -0
- package/locales/zh-TW.js +3 -0
- package/locales/zh.js +3 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-C80OZcPP.js → abnfDiagram-VCTEODGH-Cxf7xE_Z.js} +1 -1
- package/web-shell/assets/{arc-AUqStYgf.js → arc-ESi1eNkE.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-CQYOdYla.js → architectureDiagram-5GKGNRK7-D9l7-bDo.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-lYKlFysy.js → blockDiagram-NRAW4CY4-Bc8DEasw.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BoS23iIp.js → c4Diagram-UCG6FXSJ-Dimb2Hmh.js} +1 -1
- package/web-shell/assets/channel-B7ohGDil.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DLLooL1E.js → chunk-2Q5K7J3B-jVDmOpAQ.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-kPfJxScY.js → chunk-5VM5RSS4-DbG_SwdB.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-CVGFBqkD.js → chunk-F27PBJKO-QEc4cY1v.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-CnM_kOVV.js → chunk-G27WJ6UU-iJ36lQ3X.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-Cj-ajOkT.js → chunk-JWPE2WC7-DuArnVtF.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-8L5c-wFo.js → chunk-LCL6LL3I-DxOf1zwL.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-DsXTxpvL.js → chunk-POPQ4Y6H-lVLu9Ild.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-DU5GE1_z.js → chunk-SVP7TREG-C6XYlIer.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-D2IIWZKt.js → chunk-XXDRQBXY-CiG2j2Ji.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DdFpqpfD.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DdFpqpfD.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-CF_txUJr.js → cose-bilkent-JH36ORCC-DGVHMMVm.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DEZ-My-Z.js → cynefin-OW5HDTMX-D6cgpCnH.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-BV7EKUS6.js → cynefinDiagram-5FMLGOSQ-BKv4Z-UX.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-JGIX0G4H.js → dagre-3AP2YEHR-B4ABMIG-.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-DdUY7q6A.js → diagram-S7CK7UJ4-DgCkp_Lm.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-fhzRZ19v.js → diagram-UQ7AKVKN-FG0FNokz.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-BOgOex6q.js → diagram-VSXAHHWV-JgkP9qg-.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-C0NknIz6.js → diagram-VX7I27RA-ADh2x83l.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-C__3mUBX.js → diagram-Z3DM3KII-yXqoYF1J.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-BvPhqycH.js → ebnfDiagram-PWID7BFC-Duk83Ek_.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-BqzoNoL9.js → erDiagram-SSCWMZ5O-DMdvxySG.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-CJKOre47.js → flowDiagram-A5DVABFB-DHjVgSji.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-C5xZjrp0.js → ganttDiagram-EL5Y4UJY-DMM9DkCE.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-C0EjwuPK.js → gitGraphDiagram-WWUBYQGX-t_ug9vO8.js} +1 -1
- package/web-shell/assets/index-BGZRqbRo.css +36 -0
- package/web-shell/assets/index-DRri_6_x.js +2067 -0
- package/web-shell/assets/{index-C5M93syE.js → index-zqvnpGHv.js} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-BUwzsYOs.js → infoDiagram-RXCK75RN-eT1fANNm.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-EDJ_DH3V.js → ishikawaDiagram-5VMMS53U-k3evzZNn.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-BnfcOsS0.js → journeyDiagram-EYS64GPL-CGim3EAi.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-D_ofTVGu.js → kanban-definition-3QL26DDD-WHfJo-22.js} +1 -1
- package/web-shell/assets/{layout-CBuQFdfZ.js → layout-DkqIaFlJ.js} +1 -1
- package/web-shell/assets/{linear-DRIHtmGv.js → linear-Bdkd3mCz.js} +1 -1
- package/web-shell/assets/{mermaid.core-CmR5wZH6.js → mermaid.core-CGw0LkT_.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-BV374olC.js → mindmap-definition-FBJOCRG2-C9V4rBvo.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-Bpy1SplK.js → pegDiagram-XKGWAZYB-CwoI2T5G.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-CeZx4hR2.js → pieDiagram-E7YTZNPT-DaTmBmPG.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-COYKs14h.js → quadrantDiagram-AXDQQJYC-plh6MyGI.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-5g2pOeTs.js → railroadDiagram-O6MQD6OU-D_b-S0iK.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-Yn8uPGtF.js → requirementDiagram-EFPCY7ZU-zUzTN7VE.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-CTayAGq6.js → sankeyDiagram-P5KCCOFB-m6AhoD0l.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-BFWDKzUU.js → sequenceDiagram-WJ2MYXX4-Cwhzsine.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-CtErUbj4.js → sizeCapture-X5ZJPWSS-CcZuKIae.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-Co3HFzOd.js → stateDiagram-HBIQ2CUA-CFoiJwD_.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V--H8HdEmk.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-CDZuxzOj.js → swimlanes-XN3QIQJK-CgS9hcaV.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-ShE9OIgf.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-UcNHj8At.js → timeline-definition-24CTP7MA-Dzzc05t9.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-JKR9pVFG.js → vennDiagram-4TSXK5OY-DemK0f7Y.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-C4SU-yIW.js → wardleyDiagram-VM6X3IG4-CquLxtMr.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-D_yoWGZ4.js → xychartDiagram-S5SC5T6Z-BTBKTM5g.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-4P7PPAHN.js +0 -3097
- package/chunks/chunk-7J6OTNGO.js +0 -424
- package/chunks/chunk-LMMHS3RS.js +0 -135
- package/chunks/chunk-MZYWNU66.js +0 -149
- package/chunks/chunk-T4EFG2P5.js +0 -113
- package/chunks/chunk-XZA32HII.js +0 -19
- package/chunks/goal-tools-7TNK5ZHC.js +0 -411
- package/web-shell/assets/channel-B0ovOJeK.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-DMll2-6_.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-DMll2-6_.js +0 -1
- package/web-shell/assets/index-B_IPzA0h.js +0 -2020
- package/web-shell/assets/index-D1OKGQlM.css +0 -36
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-C3gdRjPm.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-C34TGCPZ.js +0 -8
- /package/chunks/{chunk-FOGQO4FG.js → chunk-JA5CBKRP.js} +0 -0
|
@@ -461,6 +461,7 @@ init_esbuild_shims();
|
|
|
461
461
|
var CHANNEL_PROMPT_DISPLAY_TEXT_META_KEY = "qwen.daemon.promptDisplayText";
|
|
462
462
|
var CHANNEL_PROMPT_AUTHORIZATION_META_KEY = "qwen.daemon.channelPromptAuthorization";
|
|
463
463
|
var CHANNEL_PROMPT_META_KEY = "qwen.channel.prompt";
|
|
464
|
+
var CHANNEL_BTW_METHOD = "qwen/control/session/btw";
|
|
464
465
|
var ACP_PRIVATE_PARENT_CAPABILITY_META_KEY = "qwen-code/private-parent-capability";
|
|
465
466
|
var ACP_PRIVATE_PARENT_CAPABILITY_ENV = "QWEN_CODE_PRIVATE_ACP_CAPABILITY";
|
|
466
467
|
function resolvePromptImages(options) {
|
|
@@ -761,15 +762,29 @@ var AcpBridge = class extends EventEmitter {
|
|
|
761
762
|
});
|
|
762
763
|
void this.registerChannelLoopMcpServer();
|
|
763
764
|
}
|
|
764
|
-
async
|
|
765
|
+
async applySessionApprovalMode(conn, sessionId, approvalMode) {
|
|
766
|
+
if (!approvalMode)
|
|
767
|
+
return;
|
|
768
|
+
try {
|
|
769
|
+
await conn.setSessionMode({ sessionId, modeId: approvalMode });
|
|
770
|
+
} catch (error) {
|
|
771
|
+
await conn.extMethod("qwen/control/session/close", { sessionId }).catch((closeError) => {
|
|
772
|
+
process.stderr.write(`[AcpBridge] Failed to close session ${sanitizeLogText(sessionId, 128)} after approval mode error: ${sanitizeLogText(closeError instanceof Error ? closeError.message : String(closeError), 512)}
|
|
773
|
+
`);
|
|
774
|
+
});
|
|
775
|
+
throw error;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
async newSession(cwd, options, bindingToken) {
|
|
765
779
|
const conn = this.ensureConnection();
|
|
766
780
|
await this.registerChannelLoopMcpServer();
|
|
767
781
|
const response = await conn.newSession({ cwd, mcpServers: [] });
|
|
782
|
+
await this.applySessionApprovalMode(conn, response.sessionId, options?.approvalMode);
|
|
768
783
|
this.knownSessionIds.add(response.sessionId);
|
|
769
784
|
this.sessionBindingTokens.set(response.sessionId, bindingToken);
|
|
770
785
|
return response.sessionId;
|
|
771
786
|
}
|
|
772
|
-
async loadSession(sessionId, cwd,
|
|
787
|
+
async loadSession(sessionId, cwd, options, bindingToken) {
|
|
773
788
|
const conn = this.ensureConnection();
|
|
774
789
|
await this.registerChannelLoopMcpServer();
|
|
775
790
|
await conn.unstable_resumeSession({
|
|
@@ -777,6 +792,7 @@ var AcpBridge = class extends EventEmitter {
|
|
|
777
792
|
cwd,
|
|
778
793
|
mcpServers: []
|
|
779
794
|
});
|
|
795
|
+
await this.applySessionApprovalMode(conn, sessionId, options?.approvalMode);
|
|
780
796
|
this.knownSessionIds.add(sessionId);
|
|
781
797
|
this.sessionBindingTokens.set(sessionId, bindingToken);
|
|
782
798
|
return sessionId;
|
|
@@ -829,6 +845,25 @@ var AcpBridge = class extends EventEmitter {
|
|
|
829
845
|
}
|
|
830
846
|
return chunks.join("") || slashCommandOutput;
|
|
831
847
|
}
|
|
848
|
+
async btw(sessionId, question, signal) {
|
|
849
|
+
if (!this.knownSessionIds.has(sessionId)) {
|
|
850
|
+
throw new Error(`Unknown ACP session ${sessionId}`);
|
|
851
|
+
}
|
|
852
|
+
if (signal?.aborted) {
|
|
853
|
+
throw createAbortError();
|
|
854
|
+
}
|
|
855
|
+
const response = await withAbortSignal(this.ensureConnection().extMethod(CHANNEL_BTW_METHOD, {
|
|
856
|
+
sessionId,
|
|
857
|
+
question
|
|
858
|
+
}), signal);
|
|
859
|
+
if (response["sessionId"] !== sessionId || response["answer"] !== null && typeof response["answer"] !== "string") {
|
|
860
|
+
throw new Error("Invalid BTW response from ACP agent");
|
|
861
|
+
}
|
|
862
|
+
return {
|
|
863
|
+
sessionId,
|
|
864
|
+
answer: response["answer"]
|
|
865
|
+
};
|
|
866
|
+
}
|
|
832
867
|
async cancelSession(sessionId) {
|
|
833
868
|
const conn = this.ensureConnection();
|
|
834
869
|
try {
|
|
@@ -1100,6 +1135,30 @@ async function withTimeout(operation, timeoutMs, message) {
|
|
|
1100
1135
|
}
|
|
1101
1136
|
}
|
|
1102
1137
|
__name(withTimeout, "withTimeout");
|
|
1138
|
+
async function withAbortSignal(operation, signal) {
|
|
1139
|
+
if (!signal)
|
|
1140
|
+
return operation;
|
|
1141
|
+
if (signal.aborted)
|
|
1142
|
+
throw createAbortError();
|
|
1143
|
+
let onAbort;
|
|
1144
|
+
const aborted = new Promise((_, reject) => {
|
|
1145
|
+
onAbort = /* @__PURE__ */ __name(() => reject(createAbortError()), "onAbort");
|
|
1146
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
1147
|
+
});
|
|
1148
|
+
try {
|
|
1149
|
+
return await Promise.race([operation, aborted]);
|
|
1150
|
+
} finally {
|
|
1151
|
+
if (onAbort)
|
|
1152
|
+
signal.removeEventListener("abort", onAbort);
|
|
1153
|
+
}
|
|
1154
|
+
}
|
|
1155
|
+
__name(withAbortSignal, "withAbortSignal");
|
|
1156
|
+
function createAbortError() {
|
|
1157
|
+
const error = new Error("BTW request aborted");
|
|
1158
|
+
error.name = "AbortError";
|
|
1159
|
+
return error;
|
|
1160
|
+
}
|
|
1161
|
+
__name(createAbortError, "createAbortError");
|
|
1103
1162
|
function isSkippedMcpRegistration(result) {
|
|
1104
1163
|
return typeof result === "object" && result !== null && result.skipped === true;
|
|
1105
1164
|
}
|
|
@@ -3770,6 +3829,7 @@ var LOOP_ADD_RE = /^"([^"]+)"\s+(.+)$/su;
|
|
|
3770
3829
|
var MAX_LOOP_JOBS_PER_TARGET = 10;
|
|
3771
3830
|
var MAX_LOOP_PROMPT_CHARS = 4e3;
|
|
3772
3831
|
var MAX_DISPLAY_PROJECTION_CHARS = 8e3;
|
|
3832
|
+
var CHANNEL_BTW_MAX_INPUT_LENGTH = 4096;
|
|
3773
3833
|
function parseLoopAddArgs(args) {
|
|
3774
3834
|
const match = args.trim().match(LOOP_ADD_RE);
|
|
3775
3835
|
if (!match)
|
|
@@ -3840,6 +3900,7 @@ var ChannelBase = class {
|
|
|
3840
3900
|
pendingChannelMemoryMutationDeliveries = /* @__PURE__ */ new Map();
|
|
3841
3901
|
/** Per-session active prompt tracking for dispatch modes. */
|
|
3842
3902
|
activePrompts = /* @__PURE__ */ new Map();
|
|
3903
|
+
activeBtw = /* @__PURE__ */ new Map();
|
|
3843
3904
|
/** Per-session message buffer for collect mode. */
|
|
3844
3905
|
collectBuffers = /* @__PURE__ */ new Map();
|
|
3845
3906
|
preflightedEnvelopes = /* @__PURE__ */ new WeakSet();
|
|
@@ -3934,6 +3995,113 @@ var ChannelBase = class {
|
|
|
3934
3995
|
async deliverBackgroundReply(chatId, text, sessionId, sourceLabel) {
|
|
3935
3996
|
await this.sendResponseMessage(chatId, text, sessionId, sourceLabel);
|
|
3936
3997
|
}
|
|
3998
|
+
async handleBtw(envelope, sessionId, question, sourceLabel) {
|
|
3999
|
+
const target = this.router.getTarget(sessionId);
|
|
4000
|
+
if (!target || target.channelName !== this.name) {
|
|
4001
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Could not resolve the current task for /btw.", sourceLabel);
|
|
4002
|
+
return;
|
|
4003
|
+
}
|
|
4004
|
+
const running = this.activeBtw.get(sessionId);
|
|
4005
|
+
if (running) {
|
|
4006
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `BTW #${running.id} is still running for this task.`, sourceLabel);
|
|
4007
|
+
return;
|
|
4008
|
+
}
|
|
4009
|
+
const reference = this.namedSessions?.presentation(sessionId);
|
|
4010
|
+
const request = {
|
|
4011
|
+
id: randomUUID3().slice(0, 8),
|
|
4012
|
+
bridge: this.bridge,
|
|
4013
|
+
controller: new AbortController(),
|
|
4014
|
+
target: { ...target },
|
|
4015
|
+
chatId: envelope.chatId,
|
|
4016
|
+
...envelope.threadId ? { threadId: envelope.threadId } : {},
|
|
4017
|
+
...sourceLabel ? { sourceLabel } : {},
|
|
4018
|
+
...reference?.status === "open" ? { taskName: reference.taskName } : {}
|
|
4019
|
+
};
|
|
4020
|
+
this.activeBtw.set(sessionId, request);
|
|
4021
|
+
try {
|
|
4022
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `BTW #${request.id} received. The main task will continue.`, sourceLabel);
|
|
4023
|
+
} catch (error) {
|
|
4024
|
+
if (this.activeBtw.get(sessionId) === request) {
|
|
4025
|
+
this.cancelBtw(sessionId);
|
|
4026
|
+
}
|
|
4027
|
+
throw error;
|
|
4028
|
+
}
|
|
4029
|
+
if (!this.isBtwCurrent(sessionId, request)) {
|
|
4030
|
+
if (this.activeBtw.get(sessionId) === request) {
|
|
4031
|
+
this.cancelBtw(sessionId);
|
|
4032
|
+
}
|
|
4033
|
+
return;
|
|
4034
|
+
}
|
|
4035
|
+
void this.deliverBtw(sessionId, question, request).catch((error) => {
|
|
4036
|
+
process.stderr.write(`[${this.name}] BTW delivery failed for session ${sanitizeLogText(sessionId, 128)}: ${this.lifecycleError(error)}
|
|
4037
|
+
`);
|
|
4038
|
+
});
|
|
4039
|
+
}
|
|
4040
|
+
async deliverBtw(sessionId, question, request) {
|
|
4041
|
+
let message;
|
|
4042
|
+
try {
|
|
4043
|
+
let result;
|
|
4044
|
+
try {
|
|
4045
|
+
result = await request.bridge.btw(sessionId, question, request.controller.signal);
|
|
4046
|
+
if (result.sessionId !== sessionId) {
|
|
4047
|
+
throw new Error("BTW response session did not match the request");
|
|
4048
|
+
}
|
|
4049
|
+
const answer = result.answer?.trim();
|
|
4050
|
+
message = answer ? `BTW #${request.id}
|
|
4051
|
+
|
|
4052
|
+
${answer}` : `BTW #${request.id}
|
|
4053
|
+
|
|
4054
|
+
No answer is available from the current conversation context.`;
|
|
4055
|
+
} catch (error) {
|
|
4056
|
+
if (request.controller.signal.aborted)
|
|
4057
|
+
return;
|
|
4058
|
+
process.stderr.write(`[${this.name}] BTW request failed for session ${sanitizeLogText(sessionId, 128)}: ${this.lifecycleError(error)}
|
|
4059
|
+
`);
|
|
4060
|
+
message = `BTW #${request.id} failed. Please try again.`;
|
|
4061
|
+
}
|
|
4062
|
+
if (!this.isBtwCurrent(sessionId, request))
|
|
4063
|
+
return;
|
|
4064
|
+
try {
|
|
4065
|
+
await this.sendThreadMessage(request.chatId, request.threadId, message, request.sourceLabel);
|
|
4066
|
+
} catch (error) {
|
|
4067
|
+
try {
|
|
4068
|
+
await this.sendThreadMessage(request.chatId, request.threadId, `BTW #${request.id} failed. Please try again.`, request.sourceLabel);
|
|
4069
|
+
} catch {
|
|
4070
|
+
}
|
|
4071
|
+
throw error;
|
|
4072
|
+
}
|
|
4073
|
+
} finally {
|
|
4074
|
+
if (this.activeBtw.get(sessionId) === request) {
|
|
4075
|
+
this.activeBtw.delete(sessionId);
|
|
4076
|
+
}
|
|
4077
|
+
}
|
|
4078
|
+
}
|
|
4079
|
+
isBtwCurrent(sessionId, request) {
|
|
4080
|
+
if (request.controller.signal.aborted || this.activeBtw.get(sessionId) !== request || this.bridge !== request.bridge || !this.router.isSessionLive(sessionId)) {
|
|
4081
|
+
return false;
|
|
4082
|
+
}
|
|
4083
|
+
const currentTarget = this.router.getTarget(sessionId);
|
|
4084
|
+
if (!currentTarget || !this.sameTaskOwner(request.target, currentTarget) || request.target.threadId !== currentTarget.threadId) {
|
|
4085
|
+
return false;
|
|
4086
|
+
}
|
|
4087
|
+
if (!request.taskName)
|
|
4088
|
+
return true;
|
|
4089
|
+
const reference = this.namedSessions?.presentation(sessionId);
|
|
4090
|
+
return reference?.status === "open" && reference.taskName === request.taskName && this.sameTaskOwner(currentTarget, reference.target) && currentTarget.threadId === reference.target.threadId;
|
|
4091
|
+
}
|
|
4092
|
+
cancelBtw(sessionId) {
|
|
4093
|
+
const request = this.activeBtw.get(sessionId);
|
|
4094
|
+
if (!request)
|
|
4095
|
+
return;
|
|
4096
|
+
this.activeBtw.delete(sessionId);
|
|
4097
|
+
request.controller.abort();
|
|
4098
|
+
}
|
|
4099
|
+
cancelAllBtw() {
|
|
4100
|
+
const requests = Array.from(this.activeBtw.values());
|
|
4101
|
+
this.activeBtw.clear();
|
|
4102
|
+
for (const request of requests)
|
|
4103
|
+
request.controller.abort();
|
|
4104
|
+
}
|
|
3937
4105
|
async dispatchPermissionRequest(event) {
|
|
3938
4106
|
const target = this.permissionTargetForEvent(event);
|
|
3939
4107
|
if (!target) {
|
|
@@ -4620,6 +4788,7 @@ var ChannelBase = class {
|
|
|
4620
4788
|
}
|
|
4621
4789
|
/** Replace the bridge instance (used after crash recovery restart). */
|
|
4622
4790
|
setBridge(bridge) {
|
|
4791
|
+
this.cancelAllBtw();
|
|
4623
4792
|
if (this.registerBridgeEvents) {
|
|
4624
4793
|
this.detachBridgeEvents(this.bridge);
|
|
4625
4794
|
}
|
|
@@ -5080,6 +5249,7 @@ ${promptText}` : promptText;
|
|
|
5080
5249
|
})
|
|
5081
5250
|
]);
|
|
5082
5251
|
if (!cancelled) {
|
|
5252
|
+
this.cancelBtw(sessionId);
|
|
5083
5253
|
this.router.removeSessionId(sessionId);
|
|
5084
5254
|
this.instructedSessions.delete(sessionId);
|
|
5085
5255
|
this.unattendedMemorySessions.delete(sessionId);
|
|
@@ -5202,6 +5372,7 @@ ${promptText}` : promptText;
|
|
|
5202
5372
|
onToolCall(_chatId, _event) {
|
|
5203
5373
|
}
|
|
5204
5374
|
onSessionDied(sessionId) {
|
|
5375
|
+
this.cancelBtw(sessionId);
|
|
5205
5376
|
this.router.handleSessionDied(sessionId);
|
|
5206
5377
|
this.instructedSessions.delete(sessionId);
|
|
5207
5378
|
this.unattendedMemorySessions.delete(sessionId);
|
|
@@ -5431,44 +5602,81 @@ ${promptText}` : promptText;
|
|
|
5431
5602
|
}
|
|
5432
5603
|
formatPermissionRequest(pending) {
|
|
5433
5604
|
const { toolCall } = pending.request;
|
|
5434
|
-
const
|
|
5605
|
+
const parameters = this.permissionParameterSummary(toolCall);
|
|
5606
|
+
const approveLabel = this.permissionOptionLabel(this.approvalOption(pending), "allow once");
|
|
5435
5607
|
const alwaysOption = this.approvalAlwaysOption(pending);
|
|
5436
|
-
|
|
5437
|
-
|
|
5438
|
-
|
|
5439
|
-
...alwaysOption ? [`/approve-always ${pending.requestId} ${alwaysOption.label}`] : [],
|
|
5440
|
-
`/deny ${pending.requestId} deny`
|
|
5441
|
-
];
|
|
5442
|
-
return [
|
|
5443
|
-
"Permission required to run a tool",
|
|
5444
|
-
`Request: ${pending.requestId}`,
|
|
5445
|
-
"",
|
|
5446
|
-
"Command:",
|
|
5447
|
-
title,
|
|
5448
|
-
"",
|
|
5449
|
-
"Reply with:",
|
|
5450
|
-
...replies2
|
|
5451
|
-
].join("\n");
|
|
5452
|
-
}
|
|
5608
|
+
const denyLabel = this.permissionOptionLabel(this.denialOption(pending), "deny");
|
|
5609
|
+
const requestSuffix = pending.taskName ? ` ${pending.requestId}` : "";
|
|
5610
|
+
const replyPadding = pending.taskName ? { approve: " ", always: " ", deny: " " } : { approve: " ", always: " ", deny: " " };
|
|
5453
5611
|
const replies = [
|
|
5454
|
-
|
|
5455
|
-
...alwaysOption ? [
|
|
5456
|
-
|
|
5612
|
+
`/approve${requestSuffix}${replyPadding.approve}${approveLabel}`,
|
|
5613
|
+
...alwaysOption ? [
|
|
5614
|
+
`/approve-always${requestSuffix}${replyPadding.always}${alwaysOption.label}`
|
|
5615
|
+
] : [],
|
|
5616
|
+
`/deny${requestSuffix}${replyPadding.deny}${denyLabel}`
|
|
5457
5617
|
];
|
|
5458
|
-
|
|
5618
|
+
return [
|
|
5459
5619
|
"Permission required to run a tool",
|
|
5620
|
+
...pending.taskName ? [`Request: ${pending.requestId}`] : [],
|
|
5460
5621
|
"",
|
|
5461
|
-
|
|
5462
|
-
|
|
5622
|
+
`Tool: ${this.permissionToolName(toolCall)}`,
|
|
5623
|
+
`Action: ${this.permissionTitle(toolCall)}`,
|
|
5624
|
+
...parameters ? [`Parameters: ${parameters}`] : [],
|
|
5463
5625
|
"",
|
|
5464
5626
|
"Reply with:",
|
|
5465
5627
|
...replies
|
|
5466
|
-
];
|
|
5467
|
-
return lines.join("\n");
|
|
5628
|
+
].join("\n");
|
|
5468
5629
|
}
|
|
5469
|
-
|
|
5630
|
+
permissionTitle(toolCall) {
|
|
5631
|
+
const rawTitle = typeof toolCall.title === "string" ? toolCall.title : void 0;
|
|
5632
|
+
return sanitizeQuotedText(rawTitle || "", 160).trim() || "Tool use";
|
|
5633
|
+
}
|
|
5634
|
+
permissionToolName(toolCall) {
|
|
5635
|
+
const rawToolCall = toolCall;
|
|
5636
|
+
const meta = isRecord2(rawToolCall["_meta"]) ? rawToolCall["_meta"] : void 0;
|
|
5637
|
+
for (const candidate of [meta?.["toolName"], rawToolCall["kind"]]) {
|
|
5638
|
+
if (typeof candidate !== "string")
|
|
5639
|
+
continue;
|
|
5640
|
+
const name = sanitizeQuotedText(candidate, 120).trim();
|
|
5641
|
+
if (name)
|
|
5642
|
+
return name;
|
|
5643
|
+
}
|
|
5644
|
+
return "unknown";
|
|
5645
|
+
}
|
|
5646
|
+
permissionParameterSummary(toolCall) {
|
|
5647
|
+
const rawToolCall = toolCall;
|
|
5648
|
+
const rawInput = isRecord2(rawToolCall["rawInput"]) ? rawToolCall["rawInput"] : void 0;
|
|
5649
|
+
if (!rawInput)
|
|
5650
|
+
return void 0;
|
|
5651
|
+
const entries = Object.entries(rawInput);
|
|
5652
|
+
if (entries.length === 0)
|
|
5653
|
+
return void 0;
|
|
5654
|
+
const visible = entries.slice(0, 4).map(([key, value]) => {
|
|
5655
|
+
const safeKey = sanitizeQuotedText(key, 48).trim() || "unknown";
|
|
5656
|
+
if (Array.isArray(value)) {
|
|
5657
|
+
return `${safeKey} (${value.length} ${value.length === 1 ? "item" : "items"})`;
|
|
5658
|
+
}
|
|
5659
|
+
if (isRecord2(value)) {
|
|
5660
|
+
return `${safeKey} (object)`;
|
|
5661
|
+
}
|
|
5662
|
+
return safeKey;
|
|
5663
|
+
});
|
|
5664
|
+
if (entries.length > visible.length) {
|
|
5665
|
+
visible.push(`+${entries.length - visible.length} more`);
|
|
5666
|
+
}
|
|
5667
|
+
return visible.join(", ");
|
|
5668
|
+
}
|
|
5669
|
+
permissionOptionLabel(option, fallback) {
|
|
5670
|
+
const rawLabel = typeof option?.name === "string" ? option.name : "";
|
|
5671
|
+
const label = sanitizeQuotedText(rawLabel, 160).trim();
|
|
5672
|
+
return label || fallback;
|
|
5673
|
+
}
|
|
5674
|
+
approvalOption(pending) {
|
|
5470
5675
|
const options = pending.request.options;
|
|
5471
|
-
return options.find((option) => option.kind === "allow_once")
|
|
5676
|
+
return options.find((option) => option.kind === "allow_once") ?? options.find((option) => option.optionId === "proceed_once" && option.kind === void 0);
|
|
5677
|
+
}
|
|
5678
|
+
approvalOptionId(pending) {
|
|
5679
|
+
return this.approvalOption(pending)?.optionId;
|
|
5472
5680
|
}
|
|
5473
5681
|
approvalAlwaysOption(pending) {
|
|
5474
5682
|
const options = pending.request.options.filter((option2) => option2.kind === "allow_always");
|
|
@@ -5478,7 +5686,7 @@ ${promptText}` : promptText;
|
|
|
5478
5686
|
}
|
|
5479
5687
|
return {
|
|
5480
5688
|
optionId: option.optionId,
|
|
5481
|
-
label: this.approvalAlwaysLabel(option)
|
|
5689
|
+
label: this.permissionOptionLabel(option, this.approvalAlwaysLabel(option))
|
|
5482
5690
|
};
|
|
5483
5691
|
}
|
|
5484
5692
|
findScopedAlwaysOption(options, scope) {
|
|
@@ -5494,12 +5702,15 @@ ${promptText}` : promptText;
|
|
|
5494
5702
|
return "always allow";
|
|
5495
5703
|
}
|
|
5496
5704
|
denialResponse(pending) {
|
|
5497
|
-
const option =
|
|
5705
|
+
const option = this.denialOption(pending);
|
|
5498
5706
|
if (option) {
|
|
5499
5707
|
return { outcome: { outcome: "selected", optionId: option.optionId } };
|
|
5500
5708
|
}
|
|
5501
5709
|
return { outcome: { outcome: "cancelled" } };
|
|
5502
5710
|
}
|
|
5711
|
+
denialOption(pending) {
|
|
5712
|
+
return pending.request.options.find((candidate) => candidate.kind === "reject_once") ?? pending.request.options.find((candidate) => candidate.optionId === "cancel" && candidate.kind === void 0);
|
|
5713
|
+
}
|
|
5503
5714
|
async handlePermissionResponseCommand(envelope, args, decision) {
|
|
5504
5715
|
if (!this.isAuthorizedForSharedSession(envelope)) {
|
|
5505
5716
|
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Only authorized members can answer permission requests in this shared session.");
|
|
@@ -5520,7 +5731,7 @@ ${promptText}` : promptText;
|
|
|
5520
5731
|
if (lookup.kind === "ambiguous") {
|
|
5521
5732
|
const requestList = lookup.requestIds.slice(0, 6).map((id) => {
|
|
5522
5733
|
const pending2 = this.pendingPermissions.get(id);
|
|
5523
|
-
const title = pending2 ? `: ${
|
|
5734
|
+
const title = pending2 ? `: ${this.permissionTitle(pending2.request.toolCall)}` : "";
|
|
5524
5735
|
const task = pending2?.taskName ? `Task ${pending2.taskName} \u2014 ` : "";
|
|
5525
5736
|
return `- ${task}${sanitizeQuotedText(id, 128)}${title}`;
|
|
5526
5737
|
}).join("\n");
|
|
@@ -5729,7 +5940,10 @@ ${requestList}`);
|
|
|
5729
5940
|
case "close": {
|
|
5730
5941
|
if (parts.length !== 1)
|
|
5731
5942
|
break;
|
|
5943
|
+
const closing = await namedSessions.lookup(owner, parts[0]);
|
|
5732
5944
|
const result = await namedSessions.close(owner, parts[0]);
|
|
5945
|
+
if (closing)
|
|
5946
|
+
this.cancelBtw(closing.sessionId);
|
|
5733
5947
|
await this.sendThreadMessage(envelope.chatId, envelope.threadId, result.active ? `Closed task "${result.closed.name}". Selected "${result.active.name}".` : `Closed task "${result.closed.name}". No task is selected.`);
|
|
5734
5948
|
return true;
|
|
5735
5949
|
}
|
|
@@ -5784,6 +5998,7 @@ ${requestList}`);
|
|
|
5784
5998
|
this.clearPendingGroupHistory(envelope);
|
|
5785
5999
|
if (removedIds.length > 0) {
|
|
5786
6000
|
for (const id of removedIds) {
|
|
6001
|
+
this.cancelBtw(id);
|
|
5787
6002
|
if (this.isSharedSession(envelope)) {
|
|
5788
6003
|
const who = sanitizeSenderName(envelope.senderName || envelope.senderId || "unknown");
|
|
5789
6004
|
process.stderr.write(`[${this.name}] shared session ${id} cleared by ${who} (sender ${envelope.senderId})
|
|
@@ -5846,6 +6061,7 @@ ${requestList}`);
|
|
|
5846
6061
|
this.registerCommand("clear", clearHandler);
|
|
5847
6062
|
this.registerCommand("reset", clearHandler);
|
|
5848
6063
|
this.registerCommand("new", clearHandler);
|
|
6064
|
+
this.registerCommand("btw", () => Promise.resolve(false));
|
|
5849
6065
|
if (this.namedSessions) {
|
|
5850
6066
|
this.registerCommand("sessions", (envelope, args) => this.handleNamedSessionsCommand(envelope, args));
|
|
5851
6067
|
this.registerCommand("session", (envelope, args) => this.handleNamedSessionCommand(envelope, args));
|
|
@@ -5884,6 +6100,9 @@ ${requestList}`);
|
|
|
5884
6100
|
"/approve [request-id] \u2014 Approve a pending permission request",
|
|
5885
6101
|
"/approve-always [request-id] \u2014 Always approve a pending permission request",
|
|
5886
6102
|
"/deny [request-id] \u2014 Deny a pending permission request",
|
|
6103
|
+
...this.bridge.btw ? [
|
|
6104
|
+
"/btw <question> \u2014 Ask a side question without interrupting the current task"
|
|
6105
|
+
] : [],
|
|
5887
6106
|
...this.namedSessions ? [
|
|
5888
6107
|
"/sessions [all] \u2014 List your named tasks",
|
|
5889
6108
|
"/session current|new|use|close|cancel \u2014 Manage your named tasks"
|
|
@@ -5897,6 +6116,7 @@ ${requestList}`);
|
|
|
5897
6116
|
"approve",
|
|
5898
6117
|
"approve-always",
|
|
5899
6118
|
"deny",
|
|
6119
|
+
"btw",
|
|
5900
6120
|
"remember-channel",
|
|
5901
6121
|
"channel-memory",
|
|
5902
6122
|
"forget-channel",
|
|
@@ -5912,7 +6132,10 @@ ${requestList}`);
|
|
|
5912
6132
|
}
|
|
5913
6133
|
}
|
|
5914
6134
|
const sessionId = await this.currentSessionId(envelope);
|
|
5915
|
-
const agentCommands = sessionId ? this.getAgentCommandsForSession(sessionId) : this.bridge.availableCommands
|
|
6135
|
+
const agentCommands = (sessionId ? this.getAgentCommandsForSession(sessionId) : this.bridge.availableCommands).filter((command) => !this.commands.has(command.name) || // `btw` is registered unconditionally but only handled locally when
|
|
6136
|
+
// the bridge supports it. Without that capability the agent's entry
|
|
6137
|
+
// is the working one, so it must stay listed.
|
|
6138
|
+
command.name === "btw" && !this.bridge.btw);
|
|
5916
6139
|
if (agentCommands.length > 0) {
|
|
5917
6140
|
lines.push("", "Agent commands (forwarded to Qwen Code):");
|
|
5918
6141
|
for (const cmd of agentCommands) {
|
|
@@ -7237,12 +7460,13 @@ ${text}`;
|
|
|
7237
7460
|
this.onObservedContact(envelope);
|
|
7238
7461
|
}
|
|
7239
7462
|
const displayText = sanitizeDisplayText(envelope.displayText ?? envelope.text, MAX_DISPLAY_PROJECTION_CHARS);
|
|
7240
|
-
|
|
7463
|
+
const parsed = this.parseCommand(envelope.text);
|
|
7464
|
+
let memoryIntent = parsed?.command === "btw" ? null : parseChannelMemoryIntent(envelope.text);
|
|
7241
7465
|
let memoryIntentFromClassifier = false;
|
|
7242
7466
|
if (memoryIntent?.kind === "update" || memoryIntent?.kind === "remove") {
|
|
7243
7467
|
this.deletePendingChannelMemoryMutation(envelope);
|
|
7244
7468
|
}
|
|
7245
|
-
if (!memoryIntent && this.shouldClassifyChannelMemoryIntent(envelope.text)) {
|
|
7469
|
+
if (!memoryIntent && parsed?.command !== "btw" && this.shouldClassifyChannelMemoryIntent(envelope.text)) {
|
|
7246
7470
|
memoryIntent = await this.classifyChannelMemoryIntent(envelope);
|
|
7247
7471
|
memoryIntentFromClassifier = memoryIntent !== null;
|
|
7248
7472
|
}
|
|
@@ -7255,7 +7479,7 @@ ${text}`;
|
|
|
7255
7479
|
return;
|
|
7256
7480
|
}
|
|
7257
7481
|
}
|
|
7258
|
-
|
|
7482
|
+
let btwQuestion;
|
|
7259
7483
|
if (parsed) {
|
|
7260
7484
|
const handler = this.commands.get(parsed.command);
|
|
7261
7485
|
if (handler) {
|
|
@@ -7263,6 +7487,25 @@ ${text}`;
|
|
|
7263
7487
|
if (handled)
|
|
7264
7488
|
return;
|
|
7265
7489
|
}
|
|
7490
|
+
if (parsed.command === "btw" && this.bridge.btw) {
|
|
7491
|
+
if (!this.isAuthorizedForSharedSession(envelope)) {
|
|
7492
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Only authorized members can use /btw in this shared session.");
|
|
7493
|
+
return;
|
|
7494
|
+
}
|
|
7495
|
+
btwQuestion = parsed.args.trim();
|
|
7496
|
+
if (!btwQuestion) {
|
|
7497
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Usage: /btw <question>");
|
|
7498
|
+
return;
|
|
7499
|
+
}
|
|
7500
|
+
if (btwQuestion.length > CHANNEL_BTW_MAX_INPUT_LENGTH) {
|
|
7501
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, `BTW questions are limited to ${CHANNEL_BTW_MAX_INPUT_LENGTH} characters.`);
|
|
7502
|
+
return;
|
|
7503
|
+
}
|
|
7504
|
+
if (envelope.imageBase64 || envelope.attachments?.length) {
|
|
7505
|
+
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "/btw supports text-only questions.");
|
|
7506
|
+
return;
|
|
7507
|
+
}
|
|
7508
|
+
}
|
|
7266
7509
|
}
|
|
7267
7510
|
const bangText = envelope.text.trimStart();
|
|
7268
7511
|
if (bangText.startsWith("!")) {
|
|
@@ -7326,6 +7569,10 @@ ${text}`;
|
|
|
7326
7569
|
await this.sendThreadMessage(envelope.chatId, envelope.threadId, "Could not identify the selected task. Use /sessions, select it again, and retry.");
|
|
7327
7570
|
return;
|
|
7328
7571
|
}
|
|
7572
|
+
if (btwQuestion !== void 0) {
|
|
7573
|
+
await this.handleBtw(envelope, sessionId, btwQuestion, sourceLabel);
|
|
7574
|
+
return;
|
|
7575
|
+
}
|
|
7329
7576
|
if (bangText.startsWith("!")) {
|
|
7330
7577
|
const cmd = bangText.slice(1).trim();
|
|
7331
7578
|
const bridgeShellCommand = this.bridge.shellCommand;
|
|
@@ -8284,6 +8531,13 @@ var DaemonChannelBridge = class extends EventEmitter2 {
|
|
|
8284
8531
|
}
|
|
8285
8532
|
}
|
|
8286
8533
|
}
|
|
8534
|
+
async btw(sessionId, question, signal) {
|
|
8535
|
+
const session = this.ensureSession(sessionId);
|
|
8536
|
+
if (!session.btw) {
|
|
8537
|
+
throw new Error("BTW is not supported by this daemon session");
|
|
8538
|
+
}
|
|
8539
|
+
return session.btw(question, signal ? { signal } : void 0);
|
|
8540
|
+
}
|
|
8287
8541
|
async shellCommand(sessionId, command, signal) {
|
|
8288
8542
|
const session = this.ensureSession(sessionId);
|
|
8289
8543
|
if (!session.shellCommand) {
|
|
@@ -8332,7 +8586,7 @@ var DaemonChannelBridge = class extends EventEmitter2 {
|
|
|
8332
8586
|
return false;
|
|
8333
8587
|
}
|
|
8334
8588
|
try {
|
|
8335
|
-
const accepted = await session.respondToPermission(requestId, response);
|
|
8589
|
+
const accepted = this.options.sessionPermissionVote && typeof session.respondToSessionPermission === "function" ? await session.respondToSessionPermission(requestId, response) : await session.respondToPermission(requestId, response);
|
|
8336
8590
|
this.requestToSession.delete(requestId);
|
|
8337
8591
|
if (accepted) {
|
|
8338
8592
|
this.rememberRespondedPermissionRequest(requestId, sessionId);
|
|
@@ -2,20 +2,20 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
functionResponsePartsToString
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-NVVJTUSL.js";
|
|
6
6
|
import {
|
|
7
7
|
observeHeadlessToolResultProjection,
|
|
8
8
|
observeHeadlessToolResultWire,
|
|
9
9
|
projectJsonStringToByteBudget
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-QI27MKNQ.js";
|
|
11
11
|
import {
|
|
12
12
|
parseAndFormatApiError,
|
|
13
13
|
toolResultBoundaryArtifact
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4F7GQGXB.js";
|
|
15
15
|
import {
|
|
16
16
|
formatVisionBridgeNoticeDisplay,
|
|
17
17
|
isVisionBridgeNoticeDisplay
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-GH2S4GD5.js";
|
|
19
19
|
import {
|
|
20
20
|
init_esbuild_shims
|
|
21
21
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -8,10 +8,10 @@ import {
|
|
|
8
8
|
} from "./chunk-TXASDT2M.js";
|
|
9
9
|
import {
|
|
10
10
|
t
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-I4NRYS6A.js";
|
|
12
12
|
import {
|
|
13
13
|
So
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-4F7GQGXB.js";
|
|
15
15
|
import {
|
|
16
16
|
createDebugLogger
|
|
17
17
|
} from "./chunk-EAHOJF6V.js";
|
|
@@ -3,11 +3,11 @@
|
|
|
3
3
|
import {
|
|
4
4
|
TURN_INTERRUPTION_HISTORY_TAIL_COUNT,
|
|
5
5
|
detectTurnInterruption
|
|
6
|
-
} from "./chunk-
|
|
6
|
+
} from "./chunk-JUARRUMA.js";
|
|
7
7
|
import {
|
|
8
8
|
SessionService,
|
|
9
9
|
buildApiHistoryFromConversation
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-4F7GQGXB.js";
|
|
11
11
|
import {
|
|
12
12
|
init_esbuild_shims
|
|
13
13
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -2,18 +2,18 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
appEvents
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-MP6YZ4RK.js";
|
|
6
6
|
import {
|
|
7
7
|
assembleMcpServers,
|
|
8
8
|
getPendingGatedMcpServers,
|
|
9
9
|
getPromptableMcpServers
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-C2VWOXHS.js";
|
|
11
11
|
import {
|
|
12
12
|
getMCPServerStatus
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-GH2S4GD5.js";
|
|
14
14
|
import {
|
|
15
15
|
require_fast_deep_equal
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-7JMGTOH7.js";
|
|
17
17
|
import {
|
|
18
18
|
createDebugLogger
|
|
19
19
|
} from "./chunk-EAHOJF6V.js";
|
|
@@ -29,6 +29,9 @@ import {
|
|
|
29
29
|
init_esbuild_shims();
|
|
30
30
|
var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
|
|
31
31
|
var debugLogger = createDebugLogger("MCP_HOT_RELOAD");
|
|
32
|
+
var modelProvidersDebugLogger = createDebugLogger(
|
|
33
|
+
"MODEL_PROVIDERS_HOT_RELOAD"
|
|
34
|
+
);
|
|
32
35
|
function mcpServersEqual(a, b) {
|
|
33
36
|
return (0, import_fast_deep_equal.default)(a ?? {}, b ?? {});
|
|
34
37
|
}
|
|
@@ -123,10 +126,56 @@ function registerMcpHotReload(watcher, settings, config, topTierMcpServers) {
|
|
|
123
126
|
});
|
|
124
127
|
}
|
|
125
128
|
__name(registerMcpHotReload, "registerMcpHotReload");
|
|
129
|
+
function registerModelProvidersHotReload(watcher, settings, config) {
|
|
130
|
+
modelProvidersDebugLogger.debug(
|
|
131
|
+
"registered modelProviders hot-reload listener on SettingsWatcher"
|
|
132
|
+
);
|
|
133
|
+
let refreshAuthRetryPending = false;
|
|
134
|
+
const reconcile = /* @__PURE__ */ __name(async () => {
|
|
135
|
+
const next = settings.merged.modelProviders;
|
|
136
|
+
const providersUnchanged = (0, import_fast_deep_equal.default)(
|
|
137
|
+
config.getModelProvidersConfig() ?? {},
|
|
138
|
+
next ?? {}
|
|
139
|
+
);
|
|
140
|
+
if (providersUnchanged && !refreshAuthRetryPending) {
|
|
141
|
+
return;
|
|
142
|
+
}
|
|
143
|
+
if (!providersUnchanged) {
|
|
144
|
+
modelProvidersDebugLogger.debug(
|
|
145
|
+
"modelProviders changed \u2014 reloading model registry"
|
|
146
|
+
);
|
|
147
|
+
try {
|
|
148
|
+
config.reloadModelProvidersConfig(next);
|
|
149
|
+
} catch (err) {
|
|
150
|
+
modelProvidersDebugLogger.error(
|
|
151
|
+
`reloadModelProvidersConfig threw: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
152
|
+
);
|
|
153
|
+
return;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
const authType = config.getAuthType();
|
|
157
|
+
if (!authType) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
try {
|
|
161
|
+
await config.refreshAuth(authType, true);
|
|
162
|
+
refreshAuthRetryPending = false;
|
|
163
|
+
} catch (err) {
|
|
164
|
+
refreshAuthRetryPending = true;
|
|
165
|
+
modelProvidersDebugLogger.error(
|
|
166
|
+
`refreshAuth after modelProviders reload threw: ${err instanceof Error ? err.stack ?? err.message : String(err)}`
|
|
167
|
+
);
|
|
168
|
+
}
|
|
169
|
+
}, "reconcile");
|
|
170
|
+
void reconcile();
|
|
171
|
+
return watcher.addChangeListener(reconcile);
|
|
172
|
+
}
|
|
173
|
+
__name(registerModelProvidersHotReload, "registerModelProvidersHotReload");
|
|
126
174
|
|
|
127
175
|
export {
|
|
128
176
|
recomputeMcpGating,
|
|
129
|
-
registerMcpHotReload
|
|
177
|
+
registerMcpHotReload,
|
|
178
|
+
registerModelProvidersHotReload
|
|
130
179
|
};
|
|
131
180
|
/**
|
|
132
181
|
* @license
|