@qwen-code/qwen-code 0.21.3 → 0.21.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +13 -0
- package/bundled/qc-helper/docs/features/channels/github.md +12 -8
- package/bundled/qc-helper/docs/features/code-review.md +14 -1
- package/bundled/qc-helper/docs/features/commands.md +46 -40
- package/bundled/qc-helper/docs/qwen-serve.md +27 -26
- package/bundled/qc-helper/docs/reference/keyboard-shortcuts.md +50 -19
- package/bundled/review/SKILL.md +67 -22
- package/chunks/{MaxSizedBox-OJR636GP.js → MaxSizedBox-5XDFQHTQ.js} +8 -7
- package/chunks/{StandaloneSessionPicker-AMMBF5UY.js → StandaloneSessionPicker-DLADA54K.js} +21 -20
- package/chunks/{acpAgent-M57LVIQA.js → acpAgent-MVEFZSBS.js} +48 -42
- package/chunks/{agent-PE37ARLM.js → agent-RB6LCRZX.js} +8 -7
- package/chunks/{agent-headless-45ASME4R.js → agent-headless-272ZACJV.js} +8 -7
- package/chunks/{anthropicContentGenerator-WCBYB6JG.js → anthropicContentGenerator-3CAHEZBM.js} +4 -2
- package/chunks/{bridge-K3ZRPO4D.js → bridge-GXUXFSHK.js} +9 -8
- package/chunks/{ca-4OJN75WT.js → ca-NYKNH222.js} +4 -0
- package/chunks/{channel-management-service-IXJ2MZTS.js → channel-management-service-UHX56NBO.js} +1 -1
- package/chunks/{channel-settings-store-PEAR3IME.js → channel-settings-store-5UA2SABE.js} +14 -13
- package/chunks/{chunk-IWGTGH4G.js → chunk-2CCUHZP5.js} +2 -2
- package/chunks/{chunk-HUIQ4FYC.js → chunk-2JN5V3I7.js} +3 -3
- package/chunks/{chunk-BSKUTHLO.js → chunk-2ON2O4MD.js} +16 -3
- package/chunks/{chunk-QPSYIV2O.js → chunk-2T3RYG4L.js} +2039 -563
- package/chunks/{chunk-ZGSUFIL5.js → chunk-3PHUGFPH.js} +1 -1
- package/chunks/{chunk-QWW6I2UO.js → chunk-4CTV3FZH.js} +400 -33
- package/chunks/{chunk-6NE5NTHJ.js → chunk-4PZ7SPD5.js} +1 -1
- package/chunks/{chunk-2LZCLQIS.js → chunk-5XGI4IPK.js} +4 -4
- package/chunks/{chunk-GMSBXEH4.js → chunk-6KQUOXT5.js} +6 -6
- package/chunks/{chunk-2MI7ZTRT.js → chunk-6ME3PVMM.js} +4 -4
- package/chunks/{chunk-SRY26X4H.js → chunk-7UXI6P72.js} +11 -2
- package/chunks/{chunk-YU6TBRTA.js → chunk-A7PONO5G.js} +1 -1
- package/chunks/{chunk-N42C2FU3.js → chunk-AFJSRJTO.js} +1 -1
- package/chunks/{chunk-H6FIBBXK.js → chunk-AWTLFUVN.js} +11 -11
- package/chunks/{chunk-HIXVWF7I.js → chunk-B3EBXISV.js} +2 -2
- package/chunks/{chunk-3XF4WT3B.js → chunk-BC4LTKEG.js} +1 -1
- package/chunks/{chunk-ZJES4C3I.js → chunk-BOWKLLWA.js} +2 -2
- package/chunks/{chunk-SKSF3LGQ.js → chunk-C5YFS6VR.js} +3 -3
- package/chunks/{chunk-IF6K42YJ.js → chunk-C6FU76AA.js} +1 -1
- package/chunks/{chunk-VUNRNRN6.js → chunk-DHNFB7NC.js} +4 -4
- package/chunks/{chunk-LZV2BZPL.js → chunk-DJA7YBLJ.js} +2 -2
- package/chunks/{chunk-K2J5JZ6B.js → chunk-DOCBJIBL.js} +1 -1
- package/chunks/{chunk-X6WUYMOV.js → chunk-DTAPI453.js} +2 -2
- package/chunks/{chunk-XUMAD5IT.js → chunk-DZPOYHBT.js} +1 -1
- package/chunks/{chunk-UQDFEU47.js → chunk-E2SYUEIA.js} +463 -114
- package/chunks/{chunk-DSGJLHM3.js → chunk-EIAPOG76.js} +3 -3
- package/chunks/{chunk-EGYJRIDF.js → chunk-EJXATV5R.js} +2 -2
- package/chunks/{chunk-BKGA75MU.js → chunk-FPPVCCAH.js} +1 -1
- package/chunks/{chunk-KXWERR6P.js → chunk-FV4TUUDE.js} +10 -10
- package/chunks/{chunk-WY2ENRDN.js → chunk-G6KI6B5L.js} +1 -1
- package/chunks/{chunk-H6ZYP74A.js → chunk-GDREW3U5.js} +1 -1
- package/chunks/{chunk-BKXTHMOZ.js → chunk-HBCKZF2A.js} +1 -1
- package/chunks/chunk-HGCQ5SE7.js +136 -0
- package/chunks/{chunk-HEBW74ZW.js → chunk-HI4YGRJD.js} +3 -3
- package/chunks/{chunk-5JPVOYWA.js → chunk-I32URQI7.js} +4 -4
- package/chunks/{chunk-5VYFXHY2.js → chunk-IMGNGOGC.js} +3 -3
- package/chunks/{chunk-4K3RV3OA.js → chunk-JDJ7SC4E.js} +7 -3
- package/chunks/{chunk-22YFMJBW.js → chunk-KB6VSG2U.js} +58 -6
- package/chunks/{chunk-R7XNRHYD.js → chunk-KHSJSMFS.js} +1 -1
- package/chunks/{chunk-LGT3YMLN.js → chunk-LEZFUYPM.js} +1 -1
- package/chunks/{chunk-TZTBZ25J.js → chunk-LLMGP5IC.js} +1 -1
- package/chunks/{chunk-NW57GHNL.js → chunk-LPLMUGIM.js} +3 -3
- package/chunks/{chunk-L7FTDKCD.js → chunk-M2L4TMH3.js} +21 -3
- package/chunks/{chunk-RCXCGZG6.js → chunk-M6RNMBUO.js} +3 -3
- package/chunks/{chunk-D2GPKXCQ.js → chunk-O4IWFYUW.js} +4 -4
- package/chunks/{chunk-Q3G5L5KF.js → chunk-OOPFAIWP.js} +1 -1
- package/chunks/{chunk-MTR4JWQJ.js → chunk-P5UJMCVS.js} +4 -4
- package/chunks/{chunk-FF75UUB2.js → chunk-PCVMRBLN.js} +1 -1
- package/chunks/{chunk-XMJO6C44.js → chunk-PQ5JFCNL.js} +3 -3
- package/chunks/{chunk-SQ3YD5MI.js → chunk-PQEIKQXN.js} +1 -1
- package/chunks/{chunk-3MWNROHB.js → chunk-QXTGHZCX.js} +3 -3
- package/chunks/{chunk-TXABHVZD.js → chunk-QZQ72YF6.js} +1 -1
- package/chunks/{chunk-YPUHMQXV.js → chunk-RL2NPV5E.js} +1 -1
- package/chunks/{chunk-FXVHVCNA.js → chunk-RNKGMZEW.js} +1 -1
- package/chunks/{chunk-EIMKVOSF.js → chunk-SBBHZ3YT.js} +1 -1
- package/chunks/{chunk-QDWLUXKP.js → chunk-SV5X2EUV.js} +1 -1
- package/chunks/{chunk-YWMDTMAU.js → chunk-THLV7YGY.js} +2 -2
- package/chunks/{chunk-H35Q5CEG.js → chunk-TXZDRD36.js} +6 -6
- package/chunks/{chunk-MUEJ4R3E.js → chunk-UATJZOAJ.js} +3 -3
- package/chunks/{chunk-M5LIY7Y6.js → chunk-URVJ4AZC.js} +1 -1
- package/chunks/{chunk-4AGGSHCH.js → chunk-WDLQGFWP.js} +196 -52
- package/chunks/{chunk-RL6J3BPE.js → chunk-XGA6XHH3.js} +3 -3
- package/chunks/{chunk-QWDVZH24.js → chunk-XPAY4EMH.js} +3 -3
- package/chunks/{chunk-MCXMWLFT.js → chunk-XSOAW7FC.js} +5 -5
- package/chunks/{chunk-RR224BUP.js → chunk-ZLJQIGCH.js} +45 -1
- package/chunks/{chunk-FG63DZQA.js → chunk-ZRQY5BBS.js} +9 -9
- package/chunks/{computer-use-UJMK6JQU.js → computer-use-MDOMIVTL.js} +8 -7
- package/chunks/{config-utils-7COTJMWK.js → config-utils-E3ZQTHGM.js} +2 -2
- package/chunks/{contextCommand-4YABGF4S.js → contextCommand-FCK3CB37.js} +10 -9
- package/chunks/{core-runtime-7M4VM3DA.js → core-runtime-UHRHHU2O.js} +8 -7
- package/chunks/{create-sub-session-HOFDW4N7.js → create-sub-session-MIXUVLWW.js} +20 -13
- package/chunks/{daemon-status-provider-W2U5Q3J5.js → daemon-status-provider-6LC7LUNR.js} +13 -12
- package/chunks/{daemon-trust-policy-IFICWPXP.js → daemon-trust-policy-Y36HGRAM.js} +13 -12
- package/chunks/{daemon-trust-policy-monitor-GX7EO6FW.js → daemon-trust-policy-monitor-ROTBBDOH.js} +13 -12
- package/chunks/{de-A6TI4LBB.js → de-VL76CPLV.js} +4 -0
- package/chunks/{deferred-core-runtime-U36OOOKE.js → deferred-core-runtime-ZQ4JIAJD.js} +8 -7
- package/chunks/{display-image-VS3TXYQH.js → display-image-2WOG27DY.js} +1 -1
- package/chunks/{dist-NEBRI7WO.js → dist-C5U4LJKW.js} +95 -0
- package/chunks/{dist-4KAX7CCL.js → dist-IKGVITP3.js} +401 -24
- package/chunks/{earlyInputCapture-5ZWDH3SB.js → earlyInputCapture-GPRUNXTP.js} +8 -7
- package/chunks/{edit-J7SW6UP6.js → edit-YK3UP6D2.js} +8 -7
- package/chunks/{en-L4UQDLWW.js → en-IRJ2WN5T.js} +4 -0
- package/chunks/{enter-worktree-NRLOHRB6.js → enter-worktree-QMVQW7UG.js} +8 -7
- package/chunks/{enterPlanMode-GDSTEFSM.js → enterPlanMode-TZAYQ5MP.js} +8 -7
- package/chunks/{environment-KHYEKG5W.js → environment-3UQURCZG.js} +10 -9
- package/chunks/{errors-VNLAJV3O.js → errors-VBIMTNNI.js} +10 -9
- package/chunks/{exit-worktree-ARVID7DF.js → exit-worktree-4EC7LBBC.js} +8 -7
- package/chunks/{exitPlanMode-4ZFY7KUH.js → exitPlanMode-K5Y3REU2.js} +8 -7
- package/chunks/{fast-path-KA65VREJ.js → fast-path-KS6IE7YR.js} +11 -2
- package/chunks/{fr-QF7RI5ZE.js → fr-GK3HQYVB.js} +4 -0
- package/chunks/{gemini-5PMCNPF7.js → gemini-LTUCUOJH.js} +42 -40
- package/chunks/{geminiContentGenerator-NFSYJ4HA.js → geminiContentGenerator-M3HJTHKR.js} +1 -1
- package/chunks/{glob-F3EAUDAX.js → glob-SKUYGTF2.js} +8 -7
- package/chunks/{grep-UJMPVZER.js → grep-SQ7RD7SV.js} +8 -7
- package/chunks/{handleAutoUpdate-MG4FRZPN.js → handleAutoUpdate-OK7OX23A.js} +12 -11
- package/chunks/{i18n-EVHV4ZF3.js → i18n-P77YBKY4.js} +9 -8
- package/chunks/{image-gen-UC7XVHI7.js → image-gen-2ZWPS42A.js} +1 -1
- package/chunks/{initializer-O5B6HUBI.js → initializer-PIOYXVW7.js} +13 -12
- package/chunks/{installationInfo-2LIKCNVX.js → installationInfo-IWMM6DPV.js} +9 -8
- package/chunks/{ja-URQESVGW.js → ja-3FA46IKD.js} +4 -0
- package/chunks/{list-BPKIE3Z4.js → list-3DCR4TRI.js} +16 -15
- package/chunks/{loadedSettingsAdapter-NGLFF4V4.js → loadedSettingsAdapter-EJC6CU5N.js} +13 -12
- package/chunks/{loggingContentGenerator-7TFESRG5.js → loggingContentGenerator-2JEFU25T.js} +3 -3
- package/chunks/{managed-npm-update-CLZGGV7F.js → managed-npm-update-EGVQPSBR.js} +9 -8
- package/chunks/{mcp-X5OZOOXX.js → mcp-KFFH2MBV.js} +13 -12
- package/chunks/{monitor-TGSVSAZZ.js → monitor-6Y3NDMTI.js} +8 -7
- package/chunks/{nonInteractiveCli-GUMJ5JLG.js → nonInteractiveCli-426IQDPE.js} +40 -38
- package/chunks/{notebook-edit-EZISE7IC.js → notebook-edit-373IQQLE.js} +8 -7
- package/chunks/{openaiContentGenerator-ZAKS5A6P.js → openaiContentGenerator-PGFSOMIQ.js} +3 -3
- package/chunks/{pidfile-PCMBX4LR.js → pidfile-Y4INDMHG.js} +8 -7
- package/chunks/{processUtils-2CSVE5BW.js → processUtils-6BCPCJZW.js} +2 -2
- package/chunks/{pt-EEEQXRUI.js → pt-3AOBKPIJ.js} +4 -0
- package/chunks/{qwenContentGenerator-S3H6PIC4.js → qwenContentGenerator-QC3KSHSX.js} +8 -8
- package/chunks/{qwenOAuth2-MNU425VE.js → qwenOAuth2-IOAXKJ3L.js} +1 -1
- package/chunks/{read-file-HXJXHBI6.js → read-file-2T54FYZV.js} +2 -2
- package/chunks/{resumeHistoryUtils-4QAMC2S6.js → resumeHistoryUtils-O62RDCZ3.js} +11 -10
- package/chunks/{ripGrep-MCETPF2E.js → ripGrep-3H72KY7S.js} +8 -7
- package/chunks/{ru-WGZDYQAB.js → ru-VJRAMC4W.js} +4 -0
- package/chunks/{run-qwen-serve-3NMODTXV.js → run-qwen-serve-3AIDNNHO.js} +82 -35
- package/chunks/{runtime-AQOV7DVP.js → runtime-AZ4EHHFV.js} +16 -15
- package/chunks/{scheduler-DN7SZ6ZE.js → scheduler-L4UUCU4Z.js} +8 -7
- package/chunks/{send-message-HGCVVDTZ.js → send-message-LHJLVWFD.js} +2 -2
- package/chunks/{serve-WZB45HVT.js → serve-CLXGSYOE.js} +14 -12
- package/chunks/{server-GOTZFEEZ.js → server-MEAE3WMM.js} +36 -34
- package/chunks/{session-23LOFLWN.js → session-OSLD2LT5.js} +41 -39
- package/chunks/{settings-LI2ORVXC.js → settings-ILWAOKA4.js} +12 -11
- package/chunks/{shell-GLC6OP3C.js → shell-RT5DBH6B.js} +8 -7
- package/chunks/{skill-C7W6M4GO.js → skill-LVGA3ATZ.js} +2 -2
- package/chunks/{skill-settings-W25NCK5I.js → skill-settings-WTZE7EPE.js} +12 -11
- package/chunks/{spawnChannel-OHJLEBLD.js → spawnChannel-BOBS7DVM.js} +8 -7
- package/chunks/{standalone-update-E4V5V7WT.js → standalone-update-Y5JB4S2K.js} +10 -9
- package/chunks/{startInteractiveUI-FKILLW7Q.js → startInteractiveUI-ZV25CD2S.js} +62 -50
- package/chunks/{task-create-CSCEG4SM.js → task-create-4ALZMGP5.js} +3 -3
- package/chunks/{task-update-C52LNFU5.js → task-update-IKCEEWJ6.js} +3 -3
- package/chunks/{team-create-HBIJ7NHT.js → team-create-ZVPQIXCP.js} +8 -7
- package/chunks/{team-plan-approval-IBJOKS4J.js → team-plan-approval-5UHUBY3W.js} +8 -7
- package/chunks/{terminal-image-renderer-BOQJPVLB.js → terminal-image-renderer-NWC2RALG.js} +8 -7
- package/chunks/{theme-manager-NSS7VLUD.js → theme-manager-5KICSBOB.js} +8 -7
- package/chunks/{todoWrite-YKAA57W2.js → todoWrite-FTZWQRZH.js} +2 -1
- package/chunks/{tool-search-DEAS54VG.js → tool-search-2AOU77H4.js} +4 -4
- package/chunks/{total-session-admission-4LWTX3WD.js → total-session-admission-FR7RMHVL.js} +9 -8
- package/chunks/{trustedFolders-NF3J2TA7.js → trustedFolders-V7UUPQXO.js} +9 -8
- package/chunks/{update-relaunch-WUHRH5V3.js → update-relaunch-TBWRMQD6.js} +5 -5
- package/chunks/{updateCheck-7EG4BLBH.js → updateCheck-42SPCLH7.js} +11 -10
- package/chunks/{useAutoAcceptIndicator-ZRV56GVP.js → useAutoAcceptIndicator-4C2KM345.js} +14 -13
- package/chunks/{validateNonInterActiveAuth-WC2FPE3I.js → validateNonInterActiveAuth-UVFRXV3Z.js} +37 -35
- package/chunks/{version-6SS7KCUP.js → version-HKTV6TPN.js} +1 -1
- package/chunks/{web-fetch-Y5QQMPKA.js → web-fetch-ZRXSV5AN.js} +2 -2
- package/chunks/{web-search-QKKEU723.js → web-search-WOLV3L6T.js} +2 -2
- package/chunks/{workflow-PWIU6Q2M.js → workflow-F63ES3OB.js} +9 -8
- package/chunks/{workspace-providers-status-B2DM6FNK.js → workspace-providers-status-PJMGMYMC.js} +15 -14
- package/chunks/{workspace-registration-store-7Y33TTHJ.js → workspace-registration-store-LNBOX5TJ.js} +1 -1
- package/chunks/{workspace-registry-TSNJKLPC.js → workspace-registry-4PR7VDQ3.js} +9 -8
- package/chunks/{workspace-service-4I2QHDX4.js → workspace-service-PVI3VUNQ.js} +16 -15
- package/chunks/{workspace-skills-status-HVXNWVGR.js → workspace-skills-status-2Q5ZISO6.js} +13 -12
- package/chunks/{workspace-trust-reconciler-RDBBGMWP.js → workspace-trust-reconciler-NOILUH3C.js} +14 -13
- package/chunks/{write-file-RQ4DG5RY.js → write-file-MOM4JDHG.js} +8 -7
- package/chunks/{zh-72XPUG5P.js → zh-ARWDLDLR.js} +4 -0
- package/chunks/{zh-TW-LTB4SRH3.js → zh-TW-Y4RGI3P7.js} +4 -0
- package/chunks/{zoom-image-O5YCB7WN.js → zoom-image-E3VHRCFU.js} +2 -2
- package/cli.js +12 -12
- package/locales/ca.js +8 -0
- package/locales/de.js +8 -0
- package/locales/en.js +8 -0
- package/locales/fr.js +8 -0
- package/locales/ja.js +8 -0
- package/locales/pt.js +8 -0
- package/locales/ru.js +8 -0
- package/locales/zh-TW.js +7 -0
- package/locales/zh.js +7 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-Bd7d781i.js → arc-GpdmhIxr.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-CpnOJqNE.js → architectureDiagram-3BPJPVTR-C-LhCgH_.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-NxVTiWnk.js → blockDiagram-GPEHLZMM-CzNdTCm-.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-BWT75l82.js → c4Diagram-AAUBKEIU-Ce7hbrRM.js} +1 -1
- package/web-shell/assets/channel-95y6Rcp3.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-Dzz03hk6.js → chunk-2J33WTMH-BBSEn1PK.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-DRF-egfm.js → chunk-4BX2VUAB-_llgjfe5.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-Co15vq5x.js → chunk-55IACEB6-9fJZ_oZE.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-DHSUk1J7.js → chunk-727SXJPM-DgEzQWOu.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Br8u_E2R.js → chunk-AQP2D5EJ-B4RthUTc.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-DXbPTnqF.js → chunk-FMBD7UC4-CDI-emMW.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-BleQdi4d.js → chunk-ND2GUHAM-jM2-yOd8.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-CqgBf-95.js → chunk-QZHKN3VN-XGZHlKPF.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-pfzVkmjQ.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-pfzVkmjQ.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-WS7b13Yg.js → cose-bilkent-S5V4N54A-90nbW1xQ.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-v_55ki8o.js → dagre-BM42HDAG-BtzlyqZ9.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-DaYAjbdK.js → diagram-2AECGRRQ-DAaqGWaH.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-D_Hy-L64.js → diagram-5GNKFQAL-CxlzSIFa.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-dB06cZyD.js → diagram-KO2AKTUF-8kj-1H6u.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DzSluD4F.js → diagram-LMA3HP47-6NhjFwRF.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-Cvb6CeXQ.js → diagram-OG6HWLK6-Bn9kvInz.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-7eB2Hmov.js → erDiagram-TEJ5UH35-CaRoGsAt.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-B08iGCw_.js → flowDiagram-I6XJVG4X-TkLweHdf.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BgsrCHq-.js → ganttDiagram-6RSMTGT7-ruwhCKBl.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-DQLurQ2i.js → gitGraphDiagram-PVQCEYII-DNI_PxoU.js} +1 -1
- package/web-shell/assets/{index-DJ-z1Oba.js → index-T4KluHvu.js} +336 -336
- package/web-shell/assets/{index-Bi1dP2mU.css → index-WxSvj2tI.css} +2 -2
- package/web-shell/assets/{index-B_1Z0Mgr.js → index-p1gz-sxE.js} +1 -1
- package/web-shell/assets/{infoDiagram-5YYISTIA-DXZGO8qB.js → infoDiagram-5YYISTIA-DarXq1-A.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-g7gbuH2w.js → ishikawaDiagram-YF4QCWOH-GxDaDlT0.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-euefICGn.js → journeyDiagram-JHISSGLW-mDEoGBzY.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-Dws8-mjG.js → kanban-definition-UN3LZRKU-Ds0t-Mup.js} +1 -1
- package/web-shell/assets/{linear-C63F0tyh.js → linear-05nJ0xZ7.js} +1 -1
- package/web-shell/assets/{mermaid.core-fLrhp_4-.js → mermaid.core-Bua24ThM.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-qRkydfT-.js → mindmap-definition-RKZ34NQL-D_zRdvUS.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-BZ0wQaKN.js → pieDiagram-4H26LBE5-DZHr1x16.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-Fjq6GbSZ.js → quadrantDiagram-W4KKPZXB-HA06Wf0h.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-CqWvjLHU.js → requirementDiagram-4Y6WPE33-DH3urmJf.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-VcXX6PVZ.js → sankeyDiagram-5OEKKPKP-C4xgz0TT.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BJSRtxFr.js → sequenceDiagram-3UESZ5HK-DAUoZWgv.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-Dt9zUwmZ.js → stateDiagram-AJRCARHV-v7NzXy4l.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CtdFexEf.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-DQwlNRws.js → timeline-definition-PNZ67QCA-B3GTYR2W.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-DwxjUEtQ.js → vennDiagram-CIIHVFJN-BWHjSPAq.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-D3QdMSpJ.js → wardley-L42UT6IY-m9r6IUBC.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-BddN8oK8.js → wardleyDiagram-YWT4CUSO-kT0FkVfK.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-BUNuBrRJ.js → xychartDiagram-2RQKCTM6-CYRm10z5.js} +1 -1
- package/web-shell/index.html +2 -2
- package/web-shell/assets/channel-A434sWK5.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-CwPuhldB.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-CwPuhldB.js +0 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-CCxQt56w.js +0 -1
|
@@ -3841,6 +3841,27 @@ function normalizeReasonFilter(config, channelName) {
|
|
|
3841
3841
|
return reasons.length > 0 ? new Set(reasons) : null;
|
|
3842
3842
|
}
|
|
3843
3843
|
__name(normalizeReasonFilter, "normalizeReasonFilter");
|
|
3844
|
+
var MAX_INBOUND_TASK_ATTEMPTS = 3;
|
|
3845
|
+
function isOptionalStringArray(value) {
|
|
3846
|
+
return value === void 0 || Array.isArray(value) && value.every((item) => typeof item === "string");
|
|
3847
|
+
}
|
|
3848
|
+
__name(isOptionalStringArray, "isOptionalStringArray");
|
|
3849
|
+
function isInboundEnvelope(value) {
|
|
3850
|
+
if (value === void 0)
|
|
3851
|
+
return true;
|
|
3852
|
+
if (value === null || typeof value !== "object")
|
|
3853
|
+
return false;
|
|
3854
|
+
const envelope = value;
|
|
3855
|
+
return typeof envelope.channelName === "string" && typeof envelope.senderId === "string" && typeof envelope.senderName === "string" && typeof envelope.chatId === "string" && typeof envelope.text === "string" && typeof envelope.isGroup === "boolean" && typeof envelope.isMentioned === "boolean" && typeof envelope.isReplyToBot === "boolean" && (envelope.chatName === void 0 || typeof envelope.chatName === "string") && (envelope.threadId === void 0 || typeof envelope.threadId === "string") && (envelope.messageId === void 0 || typeof envelope.messageId === "string") && (envelope.referencedText === void 0 || typeof envelope.referencedText === "string") && (envelope.imageBase64 === void 0 || typeof envelope.imageBase64 === "string") && (envelope.imageMimeType === void 0 || typeof envelope.imageMimeType === "string") && (envelope.attachments === void 0 || Array.isArray(envelope.attachments)) && (envelope.metadata === void 0 || typeof envelope.metadata === "string") && (envelope.alreadyPrefixed === void 0 || envelope.alreadyPrefixed === true);
|
|
3856
|
+
}
|
|
3857
|
+
__name(isInboundEnvelope, "isInboundEnvelope");
|
|
3858
|
+
function isInboundTaskRecord(value) {
|
|
3859
|
+
if (value === null || typeof value !== "object")
|
|
3860
|
+
return false;
|
|
3861
|
+
const record = value;
|
|
3862
|
+
return record.version === 1 && typeof record.id === "string" && typeof record.createdAt === "string" && typeof record.updatedAt === "string" && ["accepted", "running", "reply_pending", "failed", "cancelled"].includes(record.state) && Number.isSafeInteger(record.issueNumber) && record.source !== null && typeof record.source === "object" && typeof record.source.chatId === "string" && (record.source.threadId === void 0 || typeof record.source.threadId === "string") && (record.source.messageId === void 0 || typeof record.source.messageId === "string") && isInboundEnvelope(record.envelope) && record.dedupe !== null && typeof record.dedupe === "object" && isOptionalStringArray(record.dedupe.dispatchedBodies) && isOptionalStringArray(record.dedupe.dispatchedComments) && isOptionalStringArray(record.dedupe.dispatchedEvents) && (record.attempts === void 0 || Number.isSafeInteger(record.attempts) && record.attempts >= 0) && (record.errorCommentPosted === void 0 || typeof record.errorCommentPosted === "boolean") && (record.error === void 0 || typeof record.error === "string");
|
|
3863
|
+
}
|
|
3864
|
+
__name(isInboundTaskRecord, "isInboundTaskRecord");
|
|
3844
3865
|
var FinalPublicationError = class extends Error {
|
|
3845
3866
|
static {
|
|
3846
3867
|
__name(this, "FinalPublicationError");
|
|
@@ -3900,6 +3921,12 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
3900
3921
|
pendingFinalDeliveryRequestsActive = 0;
|
|
3901
3922
|
pendingFinalDeliveryRetryStopRequested = false;
|
|
3902
3923
|
reasonFilter = null;
|
|
3924
|
+
inboundRecoveryPending = true;
|
|
3925
|
+
recoverableInboundTasks = 0;
|
|
3926
|
+
activeInboundTaskIdsByMessage = /* @__PURE__ */ new Map();
|
|
3927
|
+
cancelledInboundTaskIds = /* @__PURE__ */ new Set();
|
|
3928
|
+
pendingCursorUpdatedAt;
|
|
3929
|
+
inboundPersistenceBlocked = false;
|
|
3903
3930
|
constructor(name, config, bridge, options) {
|
|
3904
3931
|
config.blockStreaming = "off";
|
|
3905
3932
|
config.instructions = [
|
|
@@ -3959,6 +3986,13 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
3959
3986
|
}
|
|
3960
3987
|
this.gate.replaceAllowedUsers(allowed);
|
|
3961
3988
|
this.migrateLegacyPublicationState();
|
|
3989
|
+
this.inboundPersistenceBlocked = false;
|
|
3990
|
+
this.inboundRecoveryPending = true;
|
|
3991
|
+
try {
|
|
3992
|
+
this.recoverableInboundTasks = this.readInboundTasks().filter((record) => this.isRecoverableInboundTask(record)).length;
|
|
3993
|
+
} catch {
|
|
3994
|
+
this.recoverableInboundTasks = 0;
|
|
3995
|
+
}
|
|
3962
3996
|
this.pendingFinalDeliveryRetryStopRequested = false;
|
|
3963
3997
|
this.startPollLoop();
|
|
3964
3998
|
if (this.pendingFinalDeliveryRetry) {
|
|
@@ -4022,6 +4056,12 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4022
4056
|
if (!threadMatch) {
|
|
4023
4057
|
throw new Error(`[Channel:${this.name}] invalid threadId format: ${threadId}`);
|
|
4024
4058
|
}
|
|
4059
|
+
this.recordPublicationAudit({
|
|
4060
|
+
...auditBase,
|
|
4061
|
+
at: (/* @__PURE__ */ new Date()).toISOString(),
|
|
4062
|
+
type: "github_publication",
|
|
4063
|
+
outcome: "posting"
|
|
4064
|
+
});
|
|
4025
4065
|
try {
|
|
4026
4066
|
const comment = await this.createIssueComment(chatId, threadId, fullText, 3, isDefiniteNoWriteGithubError);
|
|
4027
4067
|
this.recordPublicationAudit({
|
|
@@ -4042,12 +4082,16 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4042
4082
|
failureError: sanitizeLogText(err instanceof Error ? err.message : String(err), 200)
|
|
4043
4083
|
});
|
|
4044
4084
|
if (threadId && isDefiniteNoWriteGithubError(err)) {
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4049
|
-
|
|
4050
|
-
|
|
4085
|
+
try {
|
|
4086
|
+
this.enqueuePendingFinalDelivery({
|
|
4087
|
+
...auditBase,
|
|
4088
|
+
chatId,
|
|
4089
|
+
threadId,
|
|
4090
|
+
fullText
|
|
4091
|
+
});
|
|
4092
|
+
} catch (persistError) {
|
|
4093
|
+
throw new Error(`[Channel:${this.name}] failed to persist pending GitHub delivery: ${sanitizeLogText(persistError instanceof Error ? persistError.message : String(persistError), 200)}`, { cause: persistError });
|
|
4094
|
+
}
|
|
4051
4095
|
}
|
|
4052
4096
|
throw new FinalPublicationError(err instanceof Error ? err.message : String(err), { cause: err });
|
|
4053
4097
|
}
|
|
@@ -4085,13 +4129,8 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4085
4129
|
actor: input.actor,
|
|
4086
4130
|
triggerKind: input.triggerKind
|
|
4087
4131
|
};
|
|
4088
|
-
|
|
4089
|
-
|
|
4090
|
-
this.writePendingFinalDeliveries([...pending, record]);
|
|
4091
|
-
} catch (err) {
|
|
4092
|
-
process2.stderr.write(`[Channel:${this.name}] failed to persist pending GitHub delivery: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
|
|
4093
|
-
`);
|
|
4094
|
-
}
|
|
4132
|
+
const pending = this.readPendingFinalDeliveries(true).filter((item) => item.id !== record.id);
|
|
4133
|
+
this.writePendingFinalDeliveries([...pending, record]);
|
|
4095
4134
|
}
|
|
4096
4135
|
async retryPendingFinalDeliveries(signal) {
|
|
4097
4136
|
const pending = this.readPendingFinalDeliveries();
|
|
@@ -4110,7 +4149,9 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4110
4149
|
if (this.hasPostedPublicationAudit(record.id)) {
|
|
4111
4150
|
process2.stderr.write(`[Channel:${this.name}] dropping pending GitHub delivery already recorded as posted: ${sanitizeLogText(record.id, 80)}
|
|
4112
4151
|
`);
|
|
4113
|
-
this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))
|
|
4152
|
+
if (this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))) {
|
|
4153
|
+
this.removeReplyPendingInboundTask(record);
|
|
4154
|
+
}
|
|
4114
4155
|
continue;
|
|
4115
4156
|
}
|
|
4116
4157
|
try {
|
|
@@ -4127,6 +4168,7 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4127
4168
|
if (!this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))) {
|
|
4128
4169
|
continue;
|
|
4129
4170
|
}
|
|
4171
|
+
this.removeReplyPendingInboundTask(record);
|
|
4130
4172
|
} catch (err) {
|
|
4131
4173
|
if (signal?.aborted)
|
|
4132
4174
|
return;
|
|
@@ -4144,6 +4186,7 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4144
4186
|
if (!this.updatePendingFinalDeliveries((current) => current.filter((item) => item.id !== record.id))) {
|
|
4145
4187
|
continue;
|
|
4146
4188
|
}
|
|
4189
|
+
this.removeReplyPendingInboundTask(record);
|
|
4147
4190
|
}
|
|
4148
4191
|
}
|
|
4149
4192
|
}
|
|
@@ -4174,6 +4217,18 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4174
4217
|
return false;
|
|
4175
4218
|
}
|
|
4176
4219
|
}
|
|
4220
|
+
removeReplyPendingInboundTask(delivery) {
|
|
4221
|
+
try {
|
|
4222
|
+
const tasks = this.readInboundTasks();
|
|
4223
|
+
const matching = tasks.filter((task) => task.state === "reply_pending" && task.source.chatId === delivery.chatId && task.source.threadId === delivery.threadId && task.source.messageId === delivery.sourceMessageId);
|
|
4224
|
+
for (const task of matching) {
|
|
4225
|
+
this.removeInboundTask(task.id);
|
|
4226
|
+
}
|
|
4227
|
+
} catch (cleanupErr) {
|
|
4228
|
+
process2.stderr.write(`[Channel:${this.name}] failed to clean up inbound task: ${sanitizeLogText(cleanupErr instanceof Error ? cleanupErr.message : String(cleanupErr), 200)}
|
|
4229
|
+
`);
|
|
4230
|
+
}
|
|
4231
|
+
}
|
|
4177
4232
|
pendingFinalDeliveriesPath() {
|
|
4178
4233
|
return this.channelFilePath("github-pending-deliveries.json");
|
|
4179
4234
|
}
|
|
@@ -4310,15 +4365,25 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4310
4365
|
});
|
|
4311
4366
|
}
|
|
4312
4367
|
async pollOnce() {
|
|
4368
|
+
this.inboundPersistenceBlocked = false;
|
|
4369
|
+
if (this.inboundRecoveryPending) {
|
|
4370
|
+
try {
|
|
4371
|
+
await this.recoverInboundTasks();
|
|
4372
|
+
} catch (err) {
|
|
4373
|
+
process2.stderr.write(`[Channel:${this.name}] inbound task recovery failed, will retry next poll: ${err}
|
|
4374
|
+
`);
|
|
4375
|
+
} finally {
|
|
4376
|
+
this.inboundRecoveryPending = false;
|
|
4377
|
+
}
|
|
4378
|
+
}
|
|
4313
4379
|
this.cursor.metaFloor ??= this.cursor.lastProcessedAt;
|
|
4314
4380
|
const since = new Date(new Date(this.cursor.lastProcessedAt).getTime() - 1e3).toISOString();
|
|
4315
4381
|
const notifications = await this.githubApi(() => this.octokit.paginate(this.octokit.rest.activity.listNotificationsForAuthenticatedUser, { since, per_page: 100 }), "listNotifications");
|
|
4316
4382
|
notifications.sort((a, b) => a.updated_at.localeCompare(b.updated_at));
|
|
4317
4383
|
const maxUpdatedAt = notifications.length > 0 ? notifications[notifications.length - 1].updated_at : this.cursor.lastProcessedAt;
|
|
4318
4384
|
const windowSince = this.cursor.lastProcessedAt;
|
|
4319
|
-
await this.markNotificationsAsRead(maxUpdatedAt);
|
|
4320
4385
|
if (maxUpdatedAt > this.cursor.lastProcessedAt) {
|
|
4321
|
-
this.
|
|
4386
|
+
this.pendingCursorUpdatedAt = !this.pendingCursorUpdatedAt || maxUpdatedAt > this.pendingCursorUpdatedAt ? maxUpdatedAt : this.pendingCursorUpdatedAt;
|
|
4322
4387
|
}
|
|
4323
4388
|
for (const notification of notifications) {
|
|
4324
4389
|
if (!notification.subject.url)
|
|
@@ -4382,6 +4447,17 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4382
4447
|
continue;
|
|
4383
4448
|
}
|
|
4384
4449
|
}
|
|
4450
|
+
if (this.hasRecoverableInboundTasks()) {
|
|
4451
|
+
this.inboundRecoveryPending = true;
|
|
4452
|
+
}
|
|
4453
|
+
if (!this.inboundPersistenceBlocked && !this.hasRecoverableInboundTasks() && this.pendingCursorUpdatedAt) {
|
|
4454
|
+
const committedAt = this.pendingCursorUpdatedAt;
|
|
4455
|
+
await this.markNotificationsAsRead(committedAt);
|
|
4456
|
+
if (committedAt > this.cursor.lastProcessedAt) {
|
|
4457
|
+
this.cursor.lastProcessedAt = committedAt;
|
|
4458
|
+
}
|
|
4459
|
+
this.pendingCursorUpdatedAt = void 0;
|
|
4460
|
+
}
|
|
4385
4461
|
}
|
|
4386
4462
|
async processCommentLane(ctx, onlyMentioned, directed = false) {
|
|
4387
4463
|
const comments = await this.fetchNewComments(ctx);
|
|
@@ -4409,7 +4485,9 @@ var GithubChannel = class extends PollingChannelBase {
|
|
|
4409
4485
|
isReplyToBot: false,
|
|
4410
4486
|
metadata: this.buildRouteMetadata(ctx)
|
|
4411
4487
|
};
|
|
4412
|
-
if (!await this.dispatchEnvelope(envelope, ctx.issueNumber
|
|
4488
|
+
if (!await this.dispatchEnvelope(envelope, ctx.issueNumber, {
|
|
4489
|
+
dispatchedComments: [key]
|
|
4490
|
+
})) {
|
|
4413
4491
|
dispatched = true;
|
|
4414
4492
|
continue;
|
|
4415
4493
|
}
|
|
@@ -4449,7 +4527,9 @@ Trigger: ${reason}.
|
|
|
4449
4527
|
${buildTriggerGuidance(reason)}
|
|
4450
4528
|
${details}`
|
|
4451
4529
|
};
|
|
4452
|
-
await this.dispatchEnvelope(envelope, ctx.issueNumber
|
|
4530
|
+
await this.dispatchEnvelope(envelope, ctx.issueNumber, {
|
|
4531
|
+
dispatchedEvents: [trigger.key]
|
|
4532
|
+
});
|
|
4453
4533
|
this.recordDispatched("dispatchedEvents", trigger.key);
|
|
4454
4534
|
}
|
|
4455
4535
|
async processAggregateLane(ctx) {
|
|
@@ -4484,7 +4564,9 @@ ${summary}`,
|
|
|
4484
4564
|
isReplyToBot: false,
|
|
4485
4565
|
metadata: this.buildRouteMetadata(ctx)
|
|
4486
4566
|
};
|
|
4487
|
-
await this.dispatchEnvelope(envelope, ctx.issueNumber
|
|
4567
|
+
await this.dispatchEnvelope(envelope, ctx.issueNumber, {
|
|
4568
|
+
dispatchedComments: allComments.map((comment) => comment.node_id || String(comment.id))
|
|
4569
|
+
});
|
|
4488
4570
|
}
|
|
4489
4571
|
async findDirectTrigger(ctx, reason) {
|
|
4490
4572
|
const [owner, repo] = ctx.chatId.split("/");
|
|
@@ -4566,7 +4648,9 @@ ${summary}`,
|
|
|
4566
4648
|
isReplyToBot: false,
|
|
4567
4649
|
metadata: this.buildRouteMetadata(ctx)
|
|
4568
4650
|
};
|
|
4569
|
-
await this.dispatchEnvelope(envelope, issueNumber
|
|
4651
|
+
await this.dispatchEnvelope(envelope, issueNumber, {
|
|
4652
|
+
dispatchedBodies: [bodyKey]
|
|
4653
|
+
});
|
|
4570
4654
|
this.recordDispatchedBody(bodyKey);
|
|
4571
4655
|
} catch (err) {
|
|
4572
4656
|
process2.stderr.write(`[Channel:${this.name}] failed to fetch issue for first contact: ${err}
|
|
@@ -4585,17 +4669,229 @@ ${summary}`,
|
|
|
4585
4669
|
list.push(key);
|
|
4586
4670
|
this.cursor[field] = list.slice(-MAX_DISPATCHED);
|
|
4587
4671
|
}
|
|
4588
|
-
async dispatchEnvelope(envelope, issueNumber) {
|
|
4672
|
+
async dispatchEnvelope(envelope, issueNumber, dedupe = {}) {
|
|
4673
|
+
const task = this.claimInboundTask(envelope, issueNumber, dedupe);
|
|
4674
|
+
return this.runInboundTask(task);
|
|
4675
|
+
}
|
|
4676
|
+
claimInboundTask(envelope, issueNumber, dedupe) {
|
|
4677
|
+
const existing = this.readInboundTasks().find((record) => record.source.chatId === envelope.chatId && record.source.threadId === envelope.threadId && record.source.messageId === envelope.messageId);
|
|
4678
|
+
if (existing) {
|
|
4679
|
+
this.applyTaskDedupe(existing);
|
|
4680
|
+
return existing;
|
|
4681
|
+
}
|
|
4682
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
4683
|
+
const task = {
|
|
4684
|
+
version: 1,
|
|
4685
|
+
id: randomUUID(),
|
|
4686
|
+
createdAt: now,
|
|
4687
|
+
updatedAt: now,
|
|
4688
|
+
state: "accepted",
|
|
4689
|
+
issueNumber,
|
|
4690
|
+
source: {
|
|
4691
|
+
chatId: envelope.chatId,
|
|
4692
|
+
threadId: envelope.threadId,
|
|
4693
|
+
messageId: envelope.messageId
|
|
4694
|
+
},
|
|
4695
|
+
envelope,
|
|
4696
|
+
dedupe,
|
|
4697
|
+
attempts: 0
|
|
4698
|
+
};
|
|
4699
|
+
this.updateInboundTasks((records) => [...records, task]);
|
|
4700
|
+
this.applyTaskDedupe(task);
|
|
4701
|
+
return task;
|
|
4702
|
+
}
|
|
4703
|
+
async runInboundTask(task) {
|
|
4704
|
+
if (!this.isRecoverableInboundTask(task))
|
|
4705
|
+
return true;
|
|
4706
|
+
const envelope = task.envelope;
|
|
4707
|
+
if (!envelope)
|
|
4708
|
+
return true;
|
|
4709
|
+
const attempts = (task.attempts ?? 0) + 1;
|
|
4710
|
+
this.activeInboundTaskIdsByMessage.set(this.inboundMessageKey(envelope.chatId, envelope.messageId), task.id);
|
|
4711
|
+
this.transitionInboundTask(task.id, "running", { attempts });
|
|
4712
|
+
let cancelled = false;
|
|
4589
4713
|
try {
|
|
4590
4714
|
await this.handleInbound(envelope);
|
|
4591
|
-
|
|
4715
|
+
cancelled = this.cancelledInboundTaskIds.has(task.id);
|
|
4592
4716
|
} catch (err) {
|
|
4717
|
+
const error = sanitizeLogText(err instanceof Error ? err.message : String(err), 200);
|
|
4593
4718
|
process2.stderr.write(`[Channel:${this.name}] handleInbound failed for ${envelope.messageId}: ${err}
|
|
4594
4719
|
`);
|
|
4595
|
-
if (
|
|
4596
|
-
|
|
4720
|
+
if (err instanceof FinalPublicationError) {
|
|
4721
|
+
if (this.cancelledInboundTaskIds.has(task.id)) {
|
|
4722
|
+
} else if (this.hasPendingFinalDeliveryForTask(task)) {
|
|
4723
|
+
this.transitionInboundTask(task.id, "reply_pending", {
|
|
4724
|
+
envelope: void 0,
|
|
4725
|
+
error
|
|
4726
|
+
});
|
|
4727
|
+
} else {
|
|
4728
|
+
this.removeInboundTask(task.id);
|
|
4729
|
+
}
|
|
4730
|
+
} else if (!this.cancelledInboundTaskIds.has(task.id)) {
|
|
4731
|
+
let posted = task.errorCommentPosted === true;
|
|
4732
|
+
if (!posted) {
|
|
4733
|
+
posted = await this.postErrorComment(envelope.chatId, task.issueNumber);
|
|
4734
|
+
}
|
|
4735
|
+
this.transitionInboundTask(task.id, "failed", {
|
|
4736
|
+
error,
|
|
4737
|
+
attempts,
|
|
4738
|
+
errorCommentPosted: posted
|
|
4739
|
+
});
|
|
4597
4740
|
}
|
|
4598
4741
|
return false;
|
|
4742
|
+
} finally {
|
|
4743
|
+
this.activeInboundTaskIdsByMessage.delete(this.inboundMessageKey(envelope.chatId, envelope.messageId));
|
|
4744
|
+
this.cancelledInboundTaskIds.delete(task.id);
|
|
4745
|
+
}
|
|
4746
|
+
if (cancelled)
|
|
4747
|
+
return true;
|
|
4748
|
+
if (this.hasPendingFinalDeliveryForTask(task)) {
|
|
4749
|
+
this.transitionInboundTask(task.id, "reply_pending", {
|
|
4750
|
+
envelope: void 0
|
|
4751
|
+
});
|
|
4752
|
+
} else {
|
|
4753
|
+
this.removeInboundTask(task.id);
|
|
4754
|
+
}
|
|
4755
|
+
return true;
|
|
4756
|
+
}
|
|
4757
|
+
async recoverInboundTasks() {
|
|
4758
|
+
const tasks = this.readInboundTasks().filter((task) => this.isRecoverableInboundTask(task));
|
|
4759
|
+
const pendingDeliveries = tasks.length ? this.readPendingFinalDeliveries(true) : [];
|
|
4760
|
+
const publicationAuditKeys = tasks.length ? this.readPublicationAuditKeys(true) : /* @__PURE__ */ new Set();
|
|
4761
|
+
for (const task of tasks) {
|
|
4762
|
+
if (!task.envelope)
|
|
4763
|
+
continue;
|
|
4764
|
+
this.applyTaskDedupe(task);
|
|
4765
|
+
if (pendingDeliveries.some((record) => record.chatId === task.source.chatId && record.threadId === task.source.threadId && record.sourceMessageId === task.source.messageId)) {
|
|
4766
|
+
this.transitionInboundTask(task.id, "reply_pending", {
|
|
4767
|
+
envelope: void 0
|
|
4768
|
+
});
|
|
4769
|
+
continue;
|
|
4770
|
+
}
|
|
4771
|
+
if (publicationAuditKeys.has(this.inboundTaskSourceKey(task))) {
|
|
4772
|
+
this.removeInboundTask(task.id);
|
|
4773
|
+
continue;
|
|
4774
|
+
}
|
|
4775
|
+
await this.runInboundTask(task);
|
|
4776
|
+
}
|
|
4777
|
+
}
|
|
4778
|
+
isRecoverableInboundTask(task) {
|
|
4779
|
+
return task.state === "accepted" || task.state === "running" || task.state === "failed" && (task.attempts ?? 0) < MAX_INBOUND_TASK_ATTEMPTS;
|
|
4780
|
+
}
|
|
4781
|
+
hasRecoverableInboundTasks() {
|
|
4782
|
+
return this.recoverableInboundTasks > 0;
|
|
4783
|
+
}
|
|
4784
|
+
hasPendingFinalDeliveryForTask(task) {
|
|
4785
|
+
return this.readPendingFinalDeliveries(true).some((record) => record.chatId === task.source.chatId && record.threadId === task.source.threadId && record.sourceMessageId === task.source.messageId);
|
|
4786
|
+
}
|
|
4787
|
+
inboundTaskSourceKey(task) {
|
|
4788
|
+
return `${task.source.chatId}|${task.source.threadId ?? ""}|${task.source.messageId ?? ""}`;
|
|
4789
|
+
}
|
|
4790
|
+
readPublicationAuditKeys(strict = false) {
|
|
4791
|
+
try {
|
|
4792
|
+
const keys = /* @__PURE__ */ new Set();
|
|
4793
|
+
for (const line of readFileSync(this.channelFilePath("github-audit.jsonl"), "utf-8").split("\n")) {
|
|
4794
|
+
if (!line)
|
|
4795
|
+
continue;
|
|
4796
|
+
try {
|
|
4797
|
+
const record = JSON.parse(line);
|
|
4798
|
+
if (record.outcome === "posted" || record.outcome === "suppressed" || record.outcome === "posting") {
|
|
4799
|
+
keys.add(`${record.repository}|${record.threadId ?? ""}|${record.sourceMessageId ?? ""}`);
|
|
4800
|
+
}
|
|
4801
|
+
} catch {
|
|
4802
|
+
continue;
|
|
4803
|
+
}
|
|
4804
|
+
}
|
|
4805
|
+
return keys;
|
|
4806
|
+
} catch (err) {
|
|
4807
|
+
if (err.code === "ENOENT")
|
|
4808
|
+
return /* @__PURE__ */ new Set();
|
|
4809
|
+
if (strict)
|
|
4810
|
+
throw err;
|
|
4811
|
+
return /* @__PURE__ */ new Set();
|
|
4812
|
+
}
|
|
4813
|
+
}
|
|
4814
|
+
applyTaskDedupe(task) {
|
|
4815
|
+
for (const [field, keys] of Object.entries(task.dedupe)) {
|
|
4816
|
+
for (const key of keys ?? []) {
|
|
4817
|
+
this.recordDispatched(field, key);
|
|
4818
|
+
}
|
|
4819
|
+
}
|
|
4820
|
+
}
|
|
4821
|
+
transitionInboundTask(taskId, state, updates = {}) {
|
|
4822
|
+
this.updateInboundTasks((records) => records.map((record) => record.id === taskId ? {
|
|
4823
|
+
...record,
|
|
4824
|
+
...updates,
|
|
4825
|
+
state,
|
|
4826
|
+
updatedAt: (/* @__PURE__ */ new Date()).toISOString()
|
|
4827
|
+
} : record));
|
|
4828
|
+
}
|
|
4829
|
+
removeInboundTask(taskId) {
|
|
4830
|
+
this.updateInboundTasks((records) => records.filter((record) => record.id !== taskId));
|
|
4831
|
+
}
|
|
4832
|
+
updateInboundTasks(update) {
|
|
4833
|
+
try {
|
|
4834
|
+
const records = update(this.readInboundTasks());
|
|
4835
|
+
this.writeInboundTasks(records);
|
|
4836
|
+
this.recoverableInboundTasks = records.filter((record) => this.isRecoverableInboundTask(record)).length;
|
|
4837
|
+
} catch (err) {
|
|
4838
|
+
this.inboundPersistenceBlocked = true;
|
|
4839
|
+
throw err;
|
|
4840
|
+
}
|
|
4841
|
+
}
|
|
4842
|
+
inboundTasksPath() {
|
|
4843
|
+
return this.channelFilePath("github-inbound-tasks.json");
|
|
4844
|
+
}
|
|
4845
|
+
readInboundTasks() {
|
|
4846
|
+
try {
|
|
4847
|
+
const parsed = JSON.parse(readFileSync(this.inboundTasksPath(), "utf-8"));
|
|
4848
|
+
if (!Array.isArray(parsed) || !parsed.every(isInboundTaskRecord)) {
|
|
4849
|
+
throw new Error("invalid GitHub inbound task state");
|
|
4850
|
+
}
|
|
4851
|
+
return parsed;
|
|
4852
|
+
} catch (err) {
|
|
4853
|
+
if (err.code === "ENOENT")
|
|
4854
|
+
return [];
|
|
4855
|
+
this.inboundPersistenceBlocked = true;
|
|
4856
|
+
process2.stderr.write(`[Channel:${this.name}] failed to read GitHub inbound tasks: ${sanitizeLogText(err instanceof Error ? err.message : String(err), 200)}
|
|
4857
|
+
`);
|
|
4858
|
+
throw err;
|
|
4859
|
+
}
|
|
4860
|
+
}
|
|
4861
|
+
writeInboundTasks(records) {
|
|
4862
|
+
const path = this.inboundTasksPath();
|
|
4863
|
+
if (records.length === 0) {
|
|
4864
|
+
try {
|
|
4865
|
+
unlinkSync(path);
|
|
4866
|
+
} catch (err) {
|
|
4867
|
+
if (err.code !== "ENOENT")
|
|
4868
|
+
throw err;
|
|
4869
|
+
}
|
|
4870
|
+
return;
|
|
4871
|
+
}
|
|
4872
|
+
const dir = dirname(path);
|
|
4873
|
+
mkdirSync(dir, { recursive: true, mode: 448 });
|
|
4874
|
+
chmodSync(dir, 448);
|
|
4875
|
+
const tmpPath = `${path}.${process2.pid}.${randomUUID()}.tmp`;
|
|
4876
|
+
writeFileSync(tmpPath, `${JSON.stringify(records)}
|
|
4877
|
+
`, {
|
|
4878
|
+
encoding: "utf-8",
|
|
4879
|
+
mode: 384
|
|
4880
|
+
});
|
|
4881
|
+
chmodSync(tmpPath, 384);
|
|
4882
|
+
renameSync(tmpPath, path);
|
|
4883
|
+
chmodSync(path, 384);
|
|
4884
|
+
}
|
|
4885
|
+
inboundMessageKey(chatId, messageId) {
|
|
4886
|
+
return `${chatId}|${messageId ?? ""}`;
|
|
4887
|
+
}
|
|
4888
|
+
onTaskLifecycle(event) {
|
|
4889
|
+
const taskId = this.activeInboundTaskIdsByMessage.get(this.inboundMessageKey(event.chatId, event.messageId));
|
|
4890
|
+
if (!taskId)
|
|
4891
|
+
return;
|
|
4892
|
+
if (event.type === "cancelled") {
|
|
4893
|
+
this.cancelledInboundTaskIds.add(taskId);
|
|
4894
|
+
this.transitionInboundTask(taskId, "cancelled");
|
|
4599
4895
|
}
|
|
4600
4896
|
}
|
|
4601
4897
|
recordPublicationAudit(record) {
|
|
@@ -4727,9 +5023,11 @@ ${buildTriggerGuidance(ctx.reason)}`;
|
|
|
4727
5023
|
issue_number: issueNumber,
|
|
4728
5024
|
body: "\u26A0\uFE0F Failed to process this request. Please re-mention the bot to retry."
|
|
4729
5025
|
}), `postErrorComment(${chatId}#${issueNumber})`);
|
|
5026
|
+
return true;
|
|
4730
5027
|
} catch (err) {
|
|
4731
5028
|
process2.stderr.write(`[Channel:${this.name}] postErrorComment also failed for ${chatId}#${issueNumber}, user must re-mention manually: ${err}
|
|
4732
5029
|
`);
|
|
5030
|
+
return false;
|
|
4733
5031
|
}
|
|
4734
5032
|
}
|
|
4735
5033
|
};
|
|
@@ -4741,6 +5039,85 @@ var plugin = {
|
|
|
4741
5039
|
requiredConfigFields: ["token"],
|
|
4742
5040
|
envResolvableConfigFields: ["baseUrl"],
|
|
4743
5041
|
defaultSessionScope: "chat_thread",
|
|
5042
|
+
management: {
|
|
5043
|
+
fields: [
|
|
5044
|
+
{
|
|
5045
|
+
key: "token",
|
|
5046
|
+
label: "Personal Access Token",
|
|
5047
|
+
kind: "secret",
|
|
5048
|
+
required: true,
|
|
5049
|
+
envResolvable: true,
|
|
5050
|
+
description: 'Classic PAT with "notifications" scope'
|
|
5051
|
+
},
|
|
5052
|
+
{
|
|
5053
|
+
key: "baseUrl",
|
|
5054
|
+
label: "Base URL",
|
|
5055
|
+
kind: "string",
|
|
5056
|
+
envResolvable: true,
|
|
5057
|
+
description: "GitHub Enterprise API root (e.g. https://ghe.example.com/api/v3). Leave empty for github.com"
|
|
5058
|
+
},
|
|
5059
|
+
{
|
|
5060
|
+
key: "groupPolicy",
|
|
5061
|
+
label: "Group Policy",
|
|
5062
|
+
kind: "enum",
|
|
5063
|
+
required: true,
|
|
5064
|
+
description: 'Must be "Open" for notifications to flow',
|
|
5065
|
+
default: "open",
|
|
5066
|
+
options: [
|
|
5067
|
+
{ value: "open", label: "Open" },
|
|
5068
|
+
{ value: "allowlist", label: "Allowlist" },
|
|
5069
|
+
{ value: "disabled", label: "Disabled" }
|
|
5070
|
+
]
|
|
5071
|
+
},
|
|
5072
|
+
{
|
|
5073
|
+
key: "senderPolicy",
|
|
5074
|
+
label: "Sender Policy",
|
|
5075
|
+
kind: "enum",
|
|
5076
|
+
required: true,
|
|
5077
|
+
description: 'Use "Allowlist" with allowed users on public repos',
|
|
5078
|
+
options: [
|
|
5079
|
+
{ value: "allowlist", label: "Allowlist" },
|
|
5080
|
+
{ value: "pairing", label: "Pairing" },
|
|
5081
|
+
{ value: "open", label: "Open" }
|
|
5082
|
+
]
|
|
5083
|
+
},
|
|
5084
|
+
{
|
|
5085
|
+
key: "allowedUsers",
|
|
5086
|
+
label: "Allowed Users",
|
|
5087
|
+
kind: "string-list",
|
|
5088
|
+
description: "GitHub usernames, used by Allowlist and Pairing policies"
|
|
5089
|
+
},
|
|
5090
|
+
{
|
|
5091
|
+
key: "reasonFilter",
|
|
5092
|
+
label: "Reason Filter",
|
|
5093
|
+
kind: "string-list",
|
|
5094
|
+
description: "Optional. Comma-separated notification reasons to process. Leave empty to process all.",
|
|
5095
|
+
options: [
|
|
5096
|
+
{ value: "mention", label: "mention" },
|
|
5097
|
+
{ value: "review_requested", label: "review_requested" },
|
|
5098
|
+
{ value: "assign", label: "assign" },
|
|
5099
|
+
{ value: "author", label: "author" },
|
|
5100
|
+
{ value: "comment", label: "comment" },
|
|
5101
|
+
{ value: "ci_activity", label: "ci_activity" },
|
|
5102
|
+
{ value: "manual", label: "manual" },
|
|
5103
|
+
{ value: "state_change", label: "state_change" },
|
|
5104
|
+
{ value: "subscribed", label: "subscribed" },
|
|
5105
|
+
{ value: "team_mention", label: "team_mention" },
|
|
5106
|
+
{ value: "security_alert", label: "security_alert" },
|
|
5107
|
+
{ value: "approval_requested", label: "approval_requested" },
|
|
5108
|
+
{ value: "invitation", label: "invitation" },
|
|
5109
|
+
{
|
|
5110
|
+
value: "member_feature_requested",
|
|
5111
|
+
label: "member_feature_requested"
|
|
5112
|
+
},
|
|
5113
|
+
{
|
|
5114
|
+
value: "security_advisory_credit",
|
|
5115
|
+
label: "security_advisory_credit"
|
|
5116
|
+
}
|
|
5117
|
+
]
|
|
5118
|
+
}
|
|
5119
|
+
]
|
|
5120
|
+
},
|
|
4744
5121
|
createChannel: /* @__PURE__ */ __name((name, config, bridge, options) => new GithubChannel(name, config, bridge, options), "createChannel")
|
|
4745
5122
|
};
|
|
4746
5123
|
export {
|
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
stopAndGetCapturedInput,
|
|
9
9
|
stopEarlyInputCapture
|
|
10
10
|
} from "./chunk-KVUBYJDM.js";
|
|
11
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-E2SYUEIA.js";
|
|
12
12
|
import "./chunk-GOFAQQZA.js";
|
|
13
13
|
import "./chunk-5M6IDOMF.js";
|
|
14
14
|
import "./chunk-TWPJO254.js";
|
|
@@ -18,7 +18,7 @@ import "./chunk-I7JDGNG6.js";
|
|
|
18
18
|
import "./chunk-A6SX5TAH.js";
|
|
19
19
|
import "./chunk-33FNCQSY.js";
|
|
20
20
|
import "./chunk-6PVPNMXU.js";
|
|
21
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-DZPOYHBT.js";
|
|
22
22
|
import "./chunk-IRH27ZC2.js";
|
|
23
23
|
import "./chunk-QHWCP53L.js";
|
|
24
24
|
import "./chunk-MOHAWIAW.js";
|
|
@@ -33,12 +33,13 @@ import "./chunk-A5YZ3FA2.js";
|
|
|
33
33
|
import "./chunk-YAVY33G4.js";
|
|
34
34
|
import "./chunk-2UISUFHQ.js";
|
|
35
35
|
import "./chunk-HFVW54NL.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-LLMGP5IC.js";
|
|
37
37
|
import "./chunk-S6LOFUVP.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-7UXI6P72.js";
|
|
39
39
|
import "./chunk-K623ENWT.js";
|
|
40
40
|
import "./chunk-AQ37AY7B.js";
|
|
41
41
|
import "./chunk-432XCUHF.js";
|
|
42
|
+
import "./chunk-YXEVDA66.js";
|
|
42
43
|
import "./chunk-XC656O42.js";
|
|
43
44
|
import "./chunk-NAVJD2PQ.js";
|
|
44
45
|
import "./chunk-QYPT3QUD.js";
|
|
@@ -47,19 +48,19 @@ import "./chunk-DGEIYUC3.js";
|
|
|
47
48
|
import "./chunk-MPHPFVKK.js";
|
|
48
49
|
import "./chunk-GLNBDYUX.js";
|
|
49
50
|
import "./chunk-DJ2GSRLV.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
+
import "./chunk-SBBHZ3YT.js";
|
|
51
52
|
import "./chunk-RPYYTL7E.js";
|
|
52
53
|
import "./chunk-2J3OJGTL.js";
|
|
53
54
|
import "./chunk-P3QQPMQA.js";
|
|
54
55
|
import "./chunk-6O5DVH27.js";
|
|
55
56
|
import "./chunk-GLCZKT5V.js";
|
|
56
57
|
import "./chunk-2DNKEBXY.js";
|
|
57
|
-
import "./chunk-
|
|
58
|
+
import "./chunk-JDJ7SC4E.js";
|
|
58
59
|
import "./chunk-VGC4I5JJ.js";
|
|
59
60
|
import "./chunk-E4WHKETF.js";
|
|
60
61
|
import "./chunk-UEJESCS7.js";
|
|
61
62
|
import "./chunk-CFDR3GNL.js";
|
|
62
|
-
import "./chunk-
|
|
63
|
+
import "./chunk-TXZDRD36.js";
|
|
63
64
|
import "./chunk-46UV252V.js";
|
|
64
65
|
import "./chunk-ZBVS26BY.js";
|
|
65
66
|
import "./chunk-BFHXDAR7.js";
|
|
@@ -11,7 +11,7 @@ import {
|
|
|
11
11
|
getDiffStat,
|
|
12
12
|
needsUtf8Bom,
|
|
13
13
|
safeLiteralReplace
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-E2SYUEIA.js";
|
|
15
15
|
import "./chunk-GOFAQQZA.js";
|
|
16
16
|
import "./chunk-5M6IDOMF.js";
|
|
17
17
|
import "./chunk-TWPJO254.js";
|
|
@@ -21,7 +21,7 @@ import "./chunk-I7JDGNG6.js";
|
|
|
21
21
|
import "./chunk-A6SX5TAH.js";
|
|
22
22
|
import "./chunk-33FNCQSY.js";
|
|
23
23
|
import "./chunk-6PVPNMXU.js";
|
|
24
|
-
import "./chunk-
|
|
24
|
+
import "./chunk-DZPOYHBT.js";
|
|
25
25
|
import "./chunk-IRH27ZC2.js";
|
|
26
26
|
import "./chunk-QHWCP53L.js";
|
|
27
27
|
import "./chunk-MOHAWIAW.js";
|
|
@@ -36,12 +36,13 @@ import "./chunk-A5YZ3FA2.js";
|
|
|
36
36
|
import "./chunk-YAVY33G4.js";
|
|
37
37
|
import "./chunk-2UISUFHQ.js";
|
|
38
38
|
import "./chunk-HFVW54NL.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-LLMGP5IC.js";
|
|
40
40
|
import "./chunk-S6LOFUVP.js";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-7UXI6P72.js";
|
|
42
42
|
import "./chunk-K623ENWT.js";
|
|
43
43
|
import "./chunk-AQ37AY7B.js";
|
|
44
44
|
import "./chunk-432XCUHF.js";
|
|
45
|
+
import "./chunk-YXEVDA66.js";
|
|
45
46
|
import "./chunk-XC656O42.js";
|
|
46
47
|
import "./chunk-NAVJD2PQ.js";
|
|
47
48
|
import "./chunk-QYPT3QUD.js";
|
|
@@ -50,7 +51,7 @@ import "./chunk-DGEIYUC3.js";
|
|
|
50
51
|
import "./chunk-MPHPFVKK.js";
|
|
51
52
|
import "./chunk-GLNBDYUX.js";
|
|
52
53
|
import "./chunk-DJ2GSRLV.js";
|
|
53
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-SBBHZ3YT.js";
|
|
54
55
|
import "./chunk-RPYYTL7E.js";
|
|
55
56
|
import "./chunk-2J3OJGTL.js";
|
|
56
57
|
import "./chunk-P3QQPMQA.js";
|
|
@@ -64,7 +65,7 @@ import {
|
|
|
64
65
|
getLanguageFromFilePath,
|
|
65
66
|
getSpecificMimeType,
|
|
66
67
|
logFileOperation
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-JDJ7SC4E.js";
|
|
68
69
|
import "./chunk-VGC4I5JJ.js";
|
|
69
70
|
import {
|
|
70
71
|
isAnyAutoMemPath,
|
|
@@ -76,7 +77,7 @@ import {
|
|
|
76
77
|
ToolDisplayNames,
|
|
77
78
|
ToolNames
|
|
78
79
|
} from "./chunk-CFDR3GNL.js";
|
|
79
|
-
import "./chunk-
|
|
80
|
+
import "./chunk-TXZDRD36.js";
|
|
80
81
|
import "./chunk-46UV252V.js";
|
|
81
82
|
import "./chunk-ZBVS26BY.js";
|
|
82
83
|
import "./chunk-BFHXDAR7.js";
|