@qwen-code/qwen-code 0.22.2-preview.0 → 0.22.2
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/goal-draft/SKILL.md +109 -0
- package/bundled/qc-helper/docs/configuration/settings.md +12 -12
- package/bundled/qc-helper/docs/features/_meta.ts +1 -0
- package/bundled/qc-helper/docs/features/commands.md +2 -1
- package/bundled/qc-helper/docs/features/goals.md +58 -0
- package/bundled/qc-helper/docs/features/headless.md +13 -11
- package/bundled/qc-helper/docs/features/status-line.md +3 -3
- package/chunks/MaxSizedBox-X5FZSNAJ.js +112 -0
- package/chunks/{StandaloneSessionPicker-KFMJILVY.js → StandaloneSessionPicker-AVLI6VJP.js} +76 -76
- package/chunks/{acpAgent-KNFTTDWL.js → acpAgent-MXEAN54C.js} +994 -277
- package/chunks/{agent-6V6MZOA7.js → agent-PJIPDWHB.js} +41 -41
- package/chunks/agent-headless-B4JVD7UK.js +87 -0
- package/chunks/{anthropicContentGenerator-U76GTVB6.js → anthropicContentGenerator-HGMBACVE.js} +7 -7
- package/chunks/{artifact-tool-XDJCZZCF.js → artifact-tool-5YT4QF7Y.js} +2 -2
- package/chunks/{askUserQuestion-ZXXERLEV.js → askUserQuestion-4SWJY65V.js} +2 -2
- package/chunks/bridge-FKZTVIS3.js +121 -0
- package/chunks/{channel-management-service-HXXS3HOZ.js → channel-management-service-X4AZ6IXX.js} +1 -1
- package/chunks/channel-settings-store-4UFCLBBG.js +117 -0
- package/chunks/{channel-worker-group-EVDC2P4K.js → channel-worker-group-27HMGD5S.js} +7 -6
- package/chunks/{channel-worker-manager-IJJZHGEI.js → channel-worker-manager-QEGX646Z.js} +9 -7
- package/chunks/{channel-worker-supervisor-YSKB5GVB.js → channel-worker-supervisor-UEW2WWCC.js} +5 -4
- package/chunks/{chunk-7QGEJI7M.js → chunk-23RFD54N.js} +1 -1
- package/chunks/{chunk-K5PNJ6VL.js → chunk-2K6ORIHJ.js} +13 -13
- package/chunks/{chunk-OGZAQWJP.js → chunk-2NYCN6F2.js} +11 -11
- package/chunks/chunk-2TNL5KPM.js +49 -0
- package/chunks/{chunk-ZEADBZLO.js → chunk-3AFMQUTI.js} +3 -3
- package/chunks/{chunk-LRLMDV5X.js → chunk-3DXFGHAJ.js} +185 -174
- package/chunks/{chunk-73WFGVIZ.js → chunk-3FDFA4MZ.js} +3 -3
- package/chunks/{chunk-WBT3STGU.js → chunk-3I6UTTDX.js} +1 -1
- package/chunks/{chunk-FVDQ5E67.js → chunk-3JGZSIDA.js} +3 -3
- package/chunks/{chunk-JJJD6QCC.js → chunk-3SGB2UHX.js} +15 -10
- package/chunks/{chunk-77TOMRBG.js → chunk-43GGFFLY.js} +3 -3
- package/chunks/{chunk-ZJG323IA.js → chunk-43UYNAWX.js} +6 -4
- package/chunks/{chunk-T2HMXHYA.js → chunk-4CDSK5AZ.js} +6 -6
- package/chunks/chunk-4CMJKUND.js +95 -0
- package/chunks/{chunk-EB4VDXNI.js → chunk-4FTKQNWJ.js} +1 -1
- package/chunks/{chunk-PAJGKZAA.js → chunk-4HV6HH33.js} +10 -8
- package/chunks/{chunk-BQBUZDDH.js → chunk-4J657AJR.js} +3 -3
- package/chunks/{chunk-BU7OUDQB.js → chunk-4JWNNLPT.js} +4 -4
- package/chunks/{chunk-4N6UAPD3.js → chunk-4MQEPP3Y.js} +9 -84
- package/chunks/{chunk-I6HWGOWD.js → chunk-5O72BNDD.js} +93 -14
- package/chunks/{chunk-IKN3IUJP.js → chunk-5XBFCMWD.js} +2 -2
- package/chunks/{chunk-2YDYDDE2.js → chunk-66KDY3LV.js} +3 -3
- package/chunks/{chunk-UVDOONRU.js → chunk-6CGL7E7G.js} +2 -2
- package/chunks/{chunk-SLEWBQWM.js → chunk-6DIGWMGT.js} +2 -2
- package/chunks/{chunk-SKNVVYIJ.js → chunk-6IUNAPLR.js} +3 -3
- package/chunks/{chunk-VUZY6MEQ.js → chunk-6LFJEACX.js} +4 -4
- package/chunks/{chunk-H2MDBYLL.js → chunk-6LFTG244.js} +8 -8
- package/chunks/{chunk-PVBT5QPD.js → chunk-6PJOTWAN.js} +1 -1
- package/chunks/{chunk-4IDJQOCO.js → chunk-77RG5SFQ.js} +1 -1
- package/chunks/{chunk-SDVF6A42.js → chunk-7DJCPZE3.js} +3 -3
- package/chunks/{chunk-ELY4QVIB.js → chunk-7EQQR46F.js} +1 -1
- package/chunks/{chunk-H4JK2A2V.js → chunk-7UYV53BC.js} +1 -1
- package/chunks/{chunk-6HOU52QX.js → chunk-A7YP63XN.js} +4 -4
- package/chunks/{chunk-E4I5MVBR.js → chunk-ABS25QER.js} +1 -1
- package/chunks/{chunk-XO4NGYRP.js → chunk-AGR5UROZ.js} +5 -5
- package/chunks/{chunk-5T4LWWNX.js → chunk-B7CDU2SL.js} +2 -2
- package/chunks/{chunk-GQAIZL3H.js → chunk-BAJKAAOY.js} +68 -64
- package/chunks/{chunk-DWRFOH3G.js → chunk-BBWV7ONL.js} +3 -3
- package/chunks/{chunk-4TPAG3O7.js → chunk-BFPESSTR.js} +1 -1
- package/chunks/{chunk-RUJTCU46.js → chunk-BNMF3K5X.js} +20 -19
- package/chunks/{chunk-IPQA4SR5.js → chunk-BWORX6FA.js} +1 -1
- package/chunks/{chunk-BKDAF7ES.js → chunk-BXDAPVQU.js} +2 -2
- package/chunks/{chunk-FY62MBPS.js → chunk-C6K43ZDE.js} +4 -4
- package/chunks/{chunk-JUIJ3FXC.js → chunk-CAJTKR6W.js} +5 -5
- package/chunks/{chunk-EADEZDPO.js → chunk-CCBZDVUA.js} +30 -25
- package/chunks/{chunk-DP7LABIB.js → chunk-CMHFCLBU.js} +1 -1
- package/chunks/{chunk-5AFPOEY3.js → chunk-CPGJJJLU.js} +1 -1
- package/chunks/{chunk-LRKMQPMD.js → chunk-CQH5KTKC.js} +1 -1
- package/chunks/{chunk-EWBY3PFB.js → chunk-CSMI4FP5.js} +1 -1
- package/chunks/{chunk-JECO75XD.js → chunk-D5LUXLUH.js} +2 -2
- package/chunks/{chunk-TQYZG5DU.js → chunk-DZWPESIF.js} +3 -3
- package/chunks/{chunk-5Y2JCJAH.js → chunk-EFUM7RVY.js} +15 -2
- package/chunks/{chunk-3UZCLCXR.js → chunk-EKSCLBBF.js} +3 -3
- package/chunks/{chunk-LJP2BBMK.js → chunk-EOGELB3H.js} +4 -4
- package/chunks/{chunk-624NHDGB.js → chunk-ERFDKH32.js} +11 -0
- package/chunks/{chunk-RQAMNZ4Y.js → chunk-F5SZP77N.js} +310 -78
- package/chunks/{chunk-SQPOJ4ZI.js → chunk-F6FV3C5K.js} +12 -7
- package/chunks/{chunk-C2BAEV64.js → chunk-F7TNAPZ4.js} +9 -7
- package/chunks/{chunk-OAAPGZVH.js → chunk-FBSSIAAQ.js} +6 -6
- package/chunks/{chunk-2FN2HNTI.js → chunk-FDY5RMGH.js} +2 -2
- package/chunks/{chunk-U66FXEH2.js → chunk-FY76G3G5.js} +5 -5
- package/chunks/{chunk-LKOSBI2M.js → chunk-G34IR3D6.js} +9 -9
- package/chunks/{chunk-ZWKGZB2K.js → chunk-H2WDGQ6D.js} +3 -3
- package/chunks/chunk-H72BQNM3.js +645 -0
- package/chunks/{chunk-ILPXSKGQ.js → chunk-HVEYF6VT.js} +2 -2
- package/chunks/{chunk-EAV3TENS.js → chunk-HVQ3B7FF.js} +2 -2
- package/chunks/{chunk-MI7CMXPU.js → chunk-IJKTMLBE.js} +1 -1
- package/chunks/{chunk-IN66KO3N.js → chunk-IK5BW3CS.js} +2 -2
- package/chunks/{chunk-5NV2AN56.js → chunk-IOPCFOTF.js} +3 -3
- package/chunks/{chunk-O3BUXIPM.js → chunk-IZIVM7LZ.js} +3 -3
- package/chunks/{chunk-I6VVOZDK.js → chunk-J2OSJFP3.js} +2 -2
- package/chunks/{chunk-AYVIGUUK.js → chunk-JB4JIVTJ.js} +1 -1
- package/chunks/{chunk-76WGY6LW.js → chunk-JCQD3INC.js} +3 -3
- package/chunks/{chunk-CITGRGCM.js → chunk-JHS74YAB.js} +4 -1
- package/chunks/{chunk-GXWY24QS.js → chunk-JSC3H3TD.js} +33 -10
- package/chunks/{chunk-NUHCXGAD.js → chunk-JSHHYW6T.js} +4 -4
- package/chunks/{chunk-5CW26JIE.js → chunk-JU4EEXC7.js} +2 -2
- package/chunks/{chunk-T6OODF2U.js → chunk-JWALNCLT.js} +1 -1
- package/chunks/{chunk-DX5FZGHZ.js → chunk-K2NQPH5D.js} +3 -3
- package/chunks/{chunk-VLY6XOBY.js → chunk-KEKZFOL6.js} +1 -1
- package/chunks/{chunk-RUQBJS34.js → chunk-KUX5D6DK.js} +1200 -339
- package/chunks/{chunk-UX3IFLJM.js → chunk-L2M46FP5.js} +149 -22
- package/chunks/{chunk-6US7BF3G.js → chunk-L6BZRIUL.js} +2 -2
- package/chunks/{chunk-BGWT7VBV.js → chunk-L6YT5H34.js} +4 -4
- package/chunks/{chunk-W2WRNJKX.js → chunk-LDP5OD6N.js} +5 -5
- package/chunks/{chunk-QB5DD75E.js → chunk-LXIBMVRN.js} +7 -7
- package/chunks/{chunk-GNMJNDZE.js → chunk-M6FOJXW3.js} +1 -1
- package/chunks/{chunk-OX44MOAN.js → chunk-MIIVI25Q.js} +3 -3
- package/chunks/{chunk-K3LPAED5.js → chunk-MQM5PJML.js} +24 -4
- package/chunks/{chunk-27ONXAFY.js → chunk-NIFYWDYN.js} +1 -1
- package/chunks/{chunk-IJVDHPKD.js → chunk-NU7RKEZR.js} +2 -2
- package/chunks/{chunk-MB4OCRQ2.js → chunk-O2UN57NX.js} +2 -2
- package/chunks/{chunk-TWUA5EIL.js → chunk-OIP7C4FE.js} +5 -5
- package/chunks/{chunk-UCSV2IZW.js → chunk-OIVXBW3W.js} +3 -3
- package/chunks/{chunk-TOF4UZHH.js → chunk-P2SU6ZTI.js} +3 -3
- package/chunks/{chunk-N4B7VPXK.js → chunk-P5GGM4KS.js} +5 -5
- package/chunks/{chunk-ZKAZP2ZG.js → chunk-PDMJ3KGS.js} +2 -2
- package/chunks/{chunk-RRKNX553.js → chunk-PDQGMSZK.js} +1 -1
- package/chunks/{chunk-3UXJFOB3.js → chunk-PFCQ62V4.js} +5 -5
- package/chunks/{chunk-JLGFGPZJ.js → chunk-PKAYJDB3.js} +2 -2
- package/chunks/{chunk-GTUKW3I6.js → chunk-PPKZ7JOE.js} +1 -1
- package/chunks/{chunk-HOANA6GC.js → chunk-Q26AYA62.js} +4 -4
- package/chunks/{chunk-WEGXPP5E.js → chunk-QFCDF5PL.js} +1 -1
- package/chunks/{chunk-4PLAO7FS.js → chunk-QP4C6WCE.js} +3 -3
- package/chunks/{chunk-3B5DCAQU.js → chunk-R4PMVSR5.js} +27 -25
- package/chunks/{chunk-7JJUFI36.js → chunk-RIEFGNTP.js} +579 -3419
- package/chunks/{chunk-7XKW4CVK.js → chunk-RJC5EIKY.js} +4 -4
- package/chunks/chunk-RKFGE7JH.js +93 -0
- package/chunks/{chunk-CPPYZHBN.js → chunk-RU7BK6B3.js} +1 -1
- package/chunks/{chunk-GZJUCMH4.js → chunk-RUGNCYNO.js} +11 -633
- package/chunks/{chunk-ZLTEQYNC.js → chunk-SFPGAQUL.js} +2 -2
- package/chunks/{chunk-K6FURWIX.js → chunk-SJ3ZUWFK.js} +26 -4
- package/chunks/{chunk-DEYPMJPD.js → chunk-SMPR7SPO.js} +1 -1
- package/chunks/{chunk-7CWEZQ6T.js → chunk-STUJ7IMZ.js} +0 -77
- package/chunks/{chunk-O5YGAEQS.js → chunk-T32W2JHI.js} +6 -6
- package/chunks/chunk-T3WXYEZ4.js +304 -0
- package/chunks/{chunk-D6XO27Z5.js → chunk-TGWAQ5RB.js} +750 -296
- package/chunks/{chunk-EC5BONC3.js → chunk-TPI7O7HR.js} +1 -1
- package/chunks/{chunk-OI2DR6QB.js → chunk-TRZTNIQ6.js} +2 -2
- package/chunks/{chunk-T2CRBIDJ.js → chunk-TTX2JUE6.js} +1 -1
- package/chunks/{chunk-2NNTE2ED.js → chunk-UHQFIS7N.js} +15 -0
- package/chunks/{chunk-KOJ6MHD5.js → chunk-UTLCH2FK.js} +1 -1
- package/chunks/{chunk-7DPKPBOQ.js → chunk-V2NDP3I4.js} +2 -2
- package/chunks/{chunk-RQ5ASDFQ.js → chunk-V4QXXQJ2.js} +3 -3
- package/chunks/{chunk-BVE5EMIG.js → chunk-V5J4J5TP.js} +2 -2
- package/chunks/{chunk-X2UOOG5V.js → chunk-VQUGEVGR.js} +1 -1
- package/chunks/{chunk-XJS54K4A.js → chunk-VTHREBQM.js} +2 -2
- package/chunks/{chunk-V3GINY6K.js → chunk-VVW4ZNFY.js} +3 -3
- package/chunks/{chunk-YT5XN3HV.js → chunk-W5MJJ2V7.js} +1 -1
- package/chunks/{chunk-FPH6TXD3.js → chunk-WAOIHTJS.js} +1 -1
- package/chunks/{chunk-FN5C6C7G.js → chunk-WKK5BQNP.js} +151 -60
- package/chunks/chunk-XDFHY4R3.js +1584 -0
- package/chunks/{chunk-L436XFLJ.js → chunk-XDLEZ5HX.js} +1 -1
- package/chunks/{chunk-VL4YX3FH.js → chunk-XF63PKEN.js} +1 -1
- package/chunks/{chunk-3FSBMAYD.js → chunk-XQFT3QUF.js} +1 -1
- package/chunks/{chunk-2MHGD7EE.js → chunk-XRSOI3DL.js} +1 -1
- package/chunks/{chunk-FJWICLG7.js → chunk-Y3QL45LS.js} +1 -1
- package/chunks/{chunk-RCDXSEJ5.js → chunk-Y6LSMB6J.js} +1 -1
- package/chunks/{chunk-2SERYG4T.js → chunk-YTDVNSUQ.js} +1 -1
- package/chunks/{chunk-4X5GYZFO.js → chunk-Z7FLBQPR.js} +7 -7
- package/chunks/{chunk-3BV7TZNQ.js → chunk-Z7TGYN5F.js} +3 -3
- package/chunks/{chunk-4Z3PSHN4.js → chunk-ZFKOCECU.js} +2 -2
- package/chunks/chunk-ZGXYO7DY.js +3416 -0
- package/chunks/{chunk-E6FGMDFQ.js → chunk-ZU4UDIWX.js} +19 -1
- package/chunks/config-utils-BBOCOGZW.js +113 -0
- package/chunks/contextCommand-EET67MQ2.js +108 -0
- package/chunks/{core-runtime-6TBMEULI.js → core-runtime-677KFX6Q.js} +53 -53
- package/chunks/{create-sub-session-RVHSWVAP.js → create-sub-session-23ITIELI.js} +3 -3
- package/chunks/{create-sub-session-SAOMTP62.js → create-sub-session-JKZAYZX7.js} +160 -79
- package/chunks/{cron-create-IJGVR5R2.js → cron-create-KJ4IY6PP.js} +57 -10
- package/chunks/{cron-delete-4N5BI6GL.js → cron-delete-MBLQCAYY.js} +4 -4
- package/chunks/{cron-list-2CATIPUX.js → cron-list-DWH2PQ47.js} +4 -4
- package/chunks/{daemon-NAYK4XXU.js → daemon-MJQUO7RA.js} +28 -1
- package/chunks/{daemon-git-worktree-guard-TYLESM6G.js → daemon-git-worktree-guard-6MVAAZZZ.js} +53 -53
- package/chunks/daemon-status-provider-RFKZOK3S.js +119 -0
- package/chunks/daemon-trust-policy-DRZPFB4Q.js +114 -0
- package/chunks/{daemon-trust-policy-monitor-WWX7I7P6.js → daemon-trust-policy-monitor-B5U6TQX5.js} +59 -59
- package/chunks/deferred-core-runtime-BBVIOP24.js +116 -0
- package/chunks/{display-image-DR55LL6M.js → display-image-BE7I6ZB6.js} +5 -5
- package/chunks/{dist-FVJZSIO4.js → dist-ILDBUWDB.js} +71 -19
- package/chunks/{dist-6H6RZ5H6.js → dist-QODVOVWI.js} +58 -35
- package/chunks/earlyInputCapture-2JOMMNQ4.js +109 -0
- package/chunks/{edit-GBDKI5DZ.js → edit-BSV6YRVW.js} +42 -42
- package/chunks/{en-6MDBWMTG.js → en-YLXBXM4Z.js} +2 -1
- package/chunks/{enter-worktree-UOZ6ZTP7.js → enter-worktree-MQXFFPKM.js} +7 -7
- package/chunks/{enterPlanMode-2KTIPPM3.js → enterPlanMode-PKNF35FE.js} +41 -41
- package/chunks/{environment-XJ75LJ6N.js → environment-MOZMPUHR.js} +55 -55
- package/chunks/errors-DMPQVYJL.js +115 -0
- package/chunks/{exit-worktree-G2QATUCV.js → exit-worktree-L344UY7K.js} +7 -7
- package/chunks/{exitPlanMode-AUMYTFIQ.js → exitPlanMode-UE4FGCY4.js} +41 -41
- package/chunks/{fast-path-TU7U2ETU.js → fast-path-773PV7PU.js} +5 -5
- package/chunks/{gemini-FKMYDP64.js → gemini-IP4FJAP5.js} +101 -100
- package/chunks/{geminiContentGenerator-WSHP7CSR.js → geminiContentGenerator-PUNEBWJW.js} +8 -8
- package/chunks/{glob-EOM6XK7H.js → glob-CZHOWUEA.js} +41 -41
- package/chunks/{goal-tools-CNVXMSZD.js → goal-tools-YZQJXTGH.js} +9 -8
- package/chunks/{grep-3NLSS32D.js → grep-5GPICQBU.js} +6 -6
- package/chunks/handleAutoUpdate-SGXKTQM6.js +111 -0
- package/chunks/{i18n-XX7U2Q3X.js → i18n-B42HKHKH.js} +54 -54
- package/chunks/{image-gen-63NN2H5N.js → image-gen-HAYOEQ4O.js} +9 -9
- package/chunks/initializer-FB66WYR3.js +115 -0
- package/chunks/installationInfo-Y7AULNMX.js +109 -0
- package/chunks/{keychain-token-storage-3MGFRYGM.js → keychain-token-storage-37XPR34V.js} +2 -2
- package/chunks/list-2HWGSVRA.js +118 -0
- package/chunks/{list-agents-EXRSHIDJ.js → list-agents-DI3YFTDT.js} +2 -2
- package/chunks/loadedSettingsAdapter-7Y7IEI6T.js +112 -0
- package/chunks/{loggingContentGenerator-TUDGCVUG.js → loggingContentGenerator-2GGZNGLG.js} +35 -22
- package/chunks/{loop-wakeup-XBPB2BRO.js → loop-wakeup-XJFONSQ7.js} +5 -5
- package/chunks/{ls-WFONAND2.js → ls-3VAT2J7A.js} +4 -4
- package/chunks/{lsp-DUKPDUXN.js → lsp-5W7IRUBH.js} +2 -2
- package/chunks/{managed-npm-update-5K4FWFX2.js → managed-npm-update-5TEV2E3J.js} +54 -54
- package/chunks/mcp-QGG5NMJJ.js +112 -0
- package/chunks/{monitor-UUHIAGT7.js → monitor-FI7PY36Z.js} +41 -41
- package/chunks/nonInteractiveCli-4LO2TL72.js +186 -0
- package/chunks/{notebook-edit-GZPB3Q57.js → notebook-edit-TPGMGBST.js} +42 -42
- package/chunks/{openaiContentGenerator-RPP6YBS3.js → openaiContentGenerator-SUCYANUZ.js} +24 -24
- package/chunks/pidfile-JMF2CLMY.js +113 -0
- package/chunks/{processUtils-ENAY2GSA.js → processUtils-IQZBYWSB.js} +2 -2
- package/chunks/prompt-terminal-ledger-DCZO6S7C.js +107 -0
- package/chunks/{qwenContentGenerator-GLUZVJAU.js → qwenContentGenerator-J4TXFGJT.js} +46 -46
- package/chunks/{qwenOAuth2-JIYAWXTW.js → qwenOAuth2-RF33DNZW.js} +8 -8
- package/chunks/{read-file-75R5LUWQ.js → read-file-QE2B5FTX.js} +12 -12
- package/chunks/{read-mcp-resource-7A7NFSFL.js → read-mcp-resource-XD257PGJ.js} +2 -2
- package/chunks/{record-artifact-CPJ4IJSD.js → record-artifact-RZGZBENU.js} +4 -4
- package/chunks/{report-findings-VFM5DENC.js → report-findings-Q3SYKKW5.js} +5 -5
- package/chunks/{request-shutdown-AXVOFN5C.js → request-shutdown-BCLA3JV2.js} +7 -7
- package/chunks/resumeHistoryUtils-CZ4JRDVW.js +120 -0
- package/chunks/{ripGrep-FNLXQYBS.js → ripGrep-R6B6HWPX.js} +17 -17
- package/chunks/{run-qwen-serve-FJD4VMI2.js → run-qwen-serve-TPHZMSXJ.js} +148 -319
- package/chunks/{runtime-INDSJB4K.js → runtime-TTIGSBM4.js} +62 -62
- package/chunks/scheduled-tasks-QB4ZVUQS.js +129 -0
- package/chunks/{scheduler-Z52TCSUG.js → scheduler-YRUG22M7.js} +55 -55
- package/chunks/{sdk-exporters-http-XXSKBD2C.js → sdk-exporters-http-KCJ4ZFG7.js} +2 -2
- package/chunks/{sdk-impl-VPNBLV7I.js → sdk-impl-HLSEDAEP.js} +4 -4
- package/chunks/{send-message-A2GXDX3B.js → send-message-Y5I6NYAM.js} +7 -7
- package/chunks/serve-MXXCDAQN.js +120 -0
- package/chunks/{server-PSN5OOSX.js → server-DFUSSSHI.js} +19760 -19444
- package/chunks/{session-JPE34X6Q.js → session-3TEHNENZ.js} +100 -99
- package/chunks/{settings-IVGC4UYK.js → settings-VOZYKLTT.js} +58 -58
- package/chunks/{shell-A5PZGPBR.js → shell-6RTKZVMI.js} +41 -41
- package/chunks/{skill-UUXQPDEH.js → skill-FEOKFX26.js} +22 -21
- package/chunks/{skill-settings-WVRXLTK4.js → skill-settings-VA4XVYVL.js} +58 -58
- package/chunks/spawnChannel-F6WVP723.js +114 -0
- package/chunks/{standalone-update-IRFRNGAA.js → standalone-update-RGILUQVK.js} +55 -55
- package/chunks/{startInteractiveUI-MC4GLL6G.js → startInteractiveUI-WHJPFOGH.js} +2757 -2223
- package/chunks/{syntheticOutput-5AJ444QT.js → syntheticOutput-ML43GEFN.js} +3 -3
- package/chunks/{task-create-CDJSOEQD.js → task-create-TMSV7RD5.js} +11 -11
- package/chunks/{task-list-BELMPA75.js → task-list-W55RBFRX.js} +5 -5
- package/chunks/{task-stop-U3S3KZG2.js → task-stop-CXEH5L2D.js} +2 -2
- package/chunks/{task-update-77VCFDDZ.js → task-update-N536I4GQ.js} +11 -11
- package/chunks/{team-create-WO5ZBCFW.js → team-create-QYSWCYCL.js} +41 -41
- package/chunks/{team-delete-YWFXX77L.js → team-delete-FJRFX33M.js} +5 -5
- package/chunks/{team-plan-approval-KAVKRN7U.js → team-plan-approval-P7DAD644.js} +41 -41
- package/chunks/{terminal-image-renderer-SMRRNI6Z.js → terminal-image-renderer-SMQE46UJ.js} +55 -55
- package/chunks/theme-manager-RFO5WWFF.js +104 -0
- package/chunks/{todoWrite-435EO2CS.js → todoWrite-WDJNQEMW.js} +43 -25
- package/chunks/{tool-search-FBN6OC6U.js → tool-search-F2EMIAPV.js} +17 -17
- package/chunks/total-session-admission-HTVTP4BS.js +116 -0
- package/chunks/{trustedFolders-B4LPJBFK.js → trustedFolders-7OCNMUQE.js} +54 -54
- package/chunks/{update-relaunch-X5TJVKVG.js → update-relaunch-4GF3OXMB.js} +5 -5
- package/chunks/{updateCheck-JCLP5JFT.js → updateCheck-7QBDXZRT.js} +56 -56
- package/chunks/useAutoAcceptIndicator-UI4SNL2O.js +122 -0
- package/chunks/{validateNonInterActiveAuth-W7HYH5ZN.js → validateNonInterActiveAuth-BPPA563H.js} +96 -95
- package/chunks/{version-JG4J76GL.js → version-ANP4TS6O.js} +1 -1
- package/chunks/{web-fetch-SPLMEDWF.js → web-fetch-QJADSAH3.js} +16 -16
- package/chunks/{web-search-PNW6OEH6.js → web-search-7TTQKEKM.js} +9 -9
- package/chunks/{workflow-QHOIIXJO.js → workflow-5XN6XSOT.js} +105 -60
- package/chunks/workspace-providers-status-PDFZWL5Q.js +116 -0
- package/chunks/{workspace-registration-store-H375IYR2.js → workspace-registration-store-XKVW2YVH.js} +1 -1
- package/chunks/{workspace-registry-XTLCD7Z2.js → workspace-registry-23R7XRB5.js} +61 -59
- package/chunks/workspace-service-MUYO2QIC.js +131 -0
- package/chunks/workspace-skills-status-IKECTOOQ.js +115 -0
- package/chunks/{workspace-trust-reconciler-6SC6RKQE.js → workspace-trust-reconciler-KLGOB53D.js} +67 -65
- package/chunks/write-file-GGRBB5TZ.js +90 -0
- package/chunks/{zh-TW-MV4FWFB6.js → zh-TW-RPTMRTHG.js} +2 -1
- package/chunks/{zh-X3WGU6SI.js → zh-UNY63FR3.js} +2 -1
- package/chunks/{zoom-image-WGNPZ572.js → zoom-image-6ASG6J4C.js} +12 -12
- package/cli.js +14 -14
- package/locales/en.js +2 -0
- package/locales/zh-TW.js +2 -0
- package/locales/zh.js +2 -0
- package/package.json +3 -3
- package/web-shell/assets/{abnfDiagram-VCTEODGH-yq7z7Anb.js → abnfDiagram-VCTEODGH-uS-vtfs3.js} +1 -1
- package/web-shell/assets/{arc-CbJO0xnT.js → arc-BSTnk5pu.js} +1 -1
- package/web-shell/assets/{architectureDiagram-5GKGNRK7-CRh89421.js → architectureDiagram-5GKGNRK7-DCMyiqzy.js} +1 -1
- package/web-shell/assets/{blockDiagram-NRAW4CY4-C75KAhKv.js → blockDiagram-NRAW4CY4-C7_gt0r1.js} +1 -1
- package/web-shell/assets/{c4Diagram-UCG6FXSJ-BzlMveFB.js → c4Diagram-UCG6FXSJ-BeQg2L8B.js} +1 -1
- package/web-shell/assets/channel-CENAhErJ.js +1 -0
- package/web-shell/assets/{chunk-2Q5K7J3B-DA8QDX3a.js → chunk-2Q5K7J3B-DnV9bKBe.js} +1 -1
- package/web-shell/assets/{chunk-5VM5RSS4-Bgu7gQ7Y.js → chunk-5VM5RSS4-rT1GAcT7.js} +1 -1
- package/web-shell/assets/{chunk-F27PBJKO-BOew7pIK.js → chunk-F27PBJKO-BcgSxqGA.js} +1 -1
- package/web-shell/assets/{chunk-G27WJ6UU-DHx1I-hO.js → chunk-G27WJ6UU-Bw1ZhyZq.js} +1 -1
- package/web-shell/assets/{chunk-JWPE2WC7-SarFW0WU.js → chunk-JWPE2WC7-D4iDw-96.js} +1 -1
- package/web-shell/assets/{chunk-LCL6LL3I-BLzP083Z.js → chunk-LCL6LL3I-D3MB3GTZ.js} +1 -1
- package/web-shell/assets/{chunk-POPQ4Y6H-Bmkv_iKm.js → chunk-POPQ4Y6H-Cep2ndrS.js} +1 -1
- package/web-shell/assets/{chunk-SVP7TREG-MPx9r1N2.js → chunk-SVP7TREG-BuahMHJc.js} +1 -1
- package/web-shell/assets/{chunk-XXDRQBXY-Ck-09rKG.js → chunk-XXDRQBXY-BdujIvJY.js} +1 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-CM6FArGH.js +1 -0
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-CM6FArGH.js +1 -0
- package/web-shell/assets/{cose-bilkent-JH36ORCC-DWm6lfOG.js → cose-bilkent-JH36ORCC-CGLLUbF8.js} +1 -1
- package/web-shell/assets/{cynefin-OW5HDTMX-DcBUyr5R.js → cynefin-OW5HDTMX-D6kDsRSh.js} +1 -1
- package/web-shell/assets/{cynefinDiagram-5FMLGOSQ-Df8qmd_p.js → cynefinDiagram-5FMLGOSQ-CCy78qZx.js} +1 -1
- package/web-shell/assets/{dagre-3AP2YEHR-DDmGspD7.js → dagre-3AP2YEHR-D5gJuJsf.js} +1 -1
- package/web-shell/assets/{diagram-S7CK7UJ4-BK_qFvbi.js → diagram-S7CK7UJ4-ZwEZ5W__.js} +1 -1
- package/web-shell/assets/{diagram-UQ7AKVKN-Uw3AP_bi.js → diagram-UQ7AKVKN-B036APjv.js} +1 -1
- package/web-shell/assets/{diagram-VSXAHHWV-CJOQKxY7.js → diagram-VSXAHHWV-BfDJ57Fq.js} +1 -1
- package/web-shell/assets/{diagram-VX7I27RA-DhdvZna5.js → diagram-VX7I27RA-Wha0p5rT.js} +1 -1
- package/web-shell/assets/{diagram-Z3DM3KII-edQU0nlP.js → diagram-Z3DM3KII-L20bz2K1.js} +1 -1
- package/web-shell/assets/{ebnfDiagram-PWID7BFC-4kugBEsO.js → ebnfDiagram-PWID7BFC-D1ZM0Cp7.js} +1 -1
- package/web-shell/assets/{erDiagram-SSCWMZ5O-BMkFivWO.js → erDiagram-SSCWMZ5O-CMtA19v8.js} +1 -1
- package/web-shell/assets/{flowDiagram-A5DVABFB-BM1ea8g-.js → flowDiagram-A5DVABFB-D96m326S.js} +1 -1
- package/web-shell/assets/{ganttDiagram-EL5Y4UJY-CXj_cKRf.js → ganttDiagram-EL5Y4UJY-BuHiYG2o.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-WWUBYQGX-D0nEqwqu.js → gitGraphDiagram-WWUBYQGX-Ck3NmkSw.js} +1 -1
- package/web-shell/assets/index-8hXIpvo4.js +1865 -0
- package/web-shell/assets/{index-B6JN54Pd.js → index-CBGz4Qjl.js} +1 -1
- package/web-shell/assets/{index-C-XlQn24.css → index-DclEv91i.css} +1 -1
- package/web-shell/assets/{infoDiagram-RXCK75RN-DF7aGGbQ.js → infoDiagram-RXCK75RN-B6DAOyXe.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-5VMMS53U-CZYNX1lL.js → ishikawaDiagram-5VMMS53U-Bpg-joFo.js} +1 -1
- package/web-shell/assets/{journeyDiagram-EYS64GPL-CvrqMUz1.js → journeyDiagram-EYS64GPL-BclrHzGa.js} +1 -1
- package/web-shell/assets/{kanban-definition-3QL26DDD-BZNJQZBj.js → kanban-definition-3QL26DDD-5gJzNTYG.js} +1 -1
- package/web-shell/assets/{layout-Bf83x7D6.js → layout-CEz_1L8z.js} +1 -1
- package/web-shell/assets/{linear-Bkc3ES2f.js → linear-CBjTq9Hc.js} +1 -1
- package/web-shell/assets/{mermaid.core-C6xuovwz.js → mermaid.core-Dzhbxx_I.js} +6 -6
- package/web-shell/assets/{mindmap-definition-FBJOCRG2-DzH6gVRg.js → mindmap-definition-FBJOCRG2-DQdVqlBF.js} +1 -1
- package/web-shell/assets/{pegDiagram-XKGWAZYB-DCvLh2fa.js → pegDiagram-XKGWAZYB-D1JZlYXL.js} +1 -1
- package/web-shell/assets/{pieDiagram-E7YTZNPT-BtjVlx_6.js → pieDiagram-E7YTZNPT-BmkpYL0w.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-AXDQQJYC-IbroqxFe.js → quadrantDiagram-AXDQQJYC-DRvD6co5.js} +1 -1
- package/web-shell/assets/{railroadDiagram-O6MQD6OU-BvMykiWW.js → railroadDiagram-O6MQD6OU-CEdjDuoo.js} +1 -1
- package/web-shell/assets/{requirementDiagram-EFPCY7ZU-D-HHMyrh.js → requirementDiagram-EFPCY7ZU-BCHG-ie8.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-P5KCCOFB-C0XXhB6d.js → sankeyDiagram-P5KCCOFB-C9cZMnye.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-WJ2MYXX4-DseAXj5d.js → sequenceDiagram-WJ2MYXX4-DYHRV4zL.js} +1 -1
- package/web-shell/assets/{sizeCapture-X5ZJPWSS-Cek2EweK.js → sizeCapture-X5ZJPWSS-DlK21aye.js} +1 -1
- package/web-shell/assets/{stateDiagram-HBIQ2CUA-yLv8wafW.js → stateDiagram-HBIQ2CUA-BrmZssvk.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-B2Q7XDaE.js +1 -0
- package/web-shell/assets/{swimlanes-XN3QIQJK-Cwz-opvE.js → swimlanes-XN3QIQJK-D9xfcayR.js} +1 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-DpZPOSbX.js +8 -0
- package/web-shell/assets/{timeline-definition-24CTP7MA-BJuFD7OG.js → timeline-definition-24CTP7MA-D4gdDL_d.js} +1 -1
- package/web-shell/assets/{vennDiagram-4TSXK5OY-CNAavdoV.js → vennDiagram-4TSXK5OY-DdhIExjI.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-VM6X3IG4-DaIjAidq.js → wardleyDiagram-VM6X3IG4-C9RS_Zof.js} +1 -1
- package/web-shell/assets/{xychartDiagram-S5SC5T6Z-DkcQXjTy.js → xychartDiagram-S5SC5T6Z-orRgmxWk.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/MaxSizedBox-XYQOMOBE.js +0 -112
- package/chunks/agent-headless-3ZC4LX3E.js +0 -87
- package/chunks/bridge-LFFLHLU5.js +0 -119
- package/chunks/channel-settings-store-CAL2HWAH.js +0 -117
- package/chunks/chunk-JS73NNWF.js +0 -30
- package/chunks/chunk-VGHZT6JR.js +0 -51
- package/chunks/config-utils-YMJNA25D.js +0 -113
- package/chunks/contextCommand-WMPSNKPG.js +0 -108
- package/chunks/daemon-status-provider-YBQAZD3G.js +0 -118
- package/chunks/daemon-trust-policy-O75ZSIJN.js +0 -114
- package/chunks/deferred-core-runtime-MGCCR6LA.js +0 -116
- package/chunks/earlyInputCapture-2EJKJET3.js +0 -109
- package/chunks/errors-XEI3SJRV.js +0 -115
- package/chunks/handleAutoUpdate-S4CLP36D.js +0 -111
- package/chunks/initializer-D3CA3272.js +0 -115
- package/chunks/installationInfo-HVDQOSIE.js +0 -109
- package/chunks/list-XUDSTGT3.js +0 -118
- package/chunks/loadedSettingsAdapter-ZOJ4QEID.js +0 -112
- package/chunks/mcp-QJ6AUYE5.js +0 -112
- package/chunks/nonInteractiveCli-PAWO75YO.js +0 -185
- package/chunks/pidfile-RF3WUFKR.js +0 -113
- package/chunks/prompt-terminal-ledger-4CCXZ2LF.js +0 -107
- package/chunks/resumeHistoryUtils-GFPJD2XB.js +0 -120
- package/chunks/serve-GVD2WXVL.js +0 -120
- package/chunks/spawnChannel-KTURLD4B.js +0 -113
- package/chunks/theme-manager-A7CPN7F4.js +0 -104
- package/chunks/total-session-admission-B7U6UWKQ.js +0 -114
- package/chunks/useAutoAcceptIndicator-VBT3NKDM.js +0 -122
- package/chunks/workspace-providers-status-653DTR35.js +0 -116
- package/chunks/workspace-service-KVJWACCS.js +0 -131
- package/chunks/workspace-skills-status-TRJ2VWGU.js +0 -115
- package/chunks/write-file-EAZSJZKR.js +0 -90
- package/web-shell/assets/channel-B3sGR79J.js +0 -1
- package/web-shell/assets/classDiagram-DTDB5LWJ-sTGo0K3v.js +0 -1
- package/web-shell/assets/classDiagram-v2-JRS7N3AN-sTGo0K3v.js +0 -1
- package/web-shell/assets/index-DLjXM0dn.js +0 -1860
- package/web-shell/assets/stateDiagram-v2-4QOOHH4V-DeThXnol.js +0 -1
- package/web-shell/assets/swimlanesDiagram-VK2B7HYN-GW0R1ZSv.js +0 -8
|
@@ -2,34 +2,34 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
appEvents
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-BAJKAAOY.js";
|
|
6
6
|
import {
|
|
7
7
|
CUSTOM_SANDBOX_IMAGE_ENV_VAR,
|
|
8
8
|
HOST_UPDATE_RELAUNCH_ENV_VAR,
|
|
9
9
|
SKIP_UPDATE_CHECK_ENV_VAR,
|
|
10
10
|
requestUpdateOnExit
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-CSMI4FP5.js";
|
|
12
12
|
import {
|
|
13
13
|
loadUndici
|
|
14
14
|
} from "./chunk-TXASDT2M.js";
|
|
15
15
|
import {
|
|
16
16
|
getAllProviderBaseUrls
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-KUX5D6DK.js";
|
|
18
18
|
import {
|
|
19
19
|
IdeClient
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-TGWAQ5RB.js";
|
|
21
21
|
import {
|
|
22
22
|
detectRuntime,
|
|
23
23
|
getOrCreateSharedDispatcher,
|
|
24
24
|
preloadRuntimeFetchModule,
|
|
25
25
|
redactProxyCredentials
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-PPKZ7JOE.js";
|
|
27
27
|
import {
|
|
28
28
|
initializeTelemetry
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-L6BZRIUL.js";
|
|
30
30
|
import {
|
|
31
31
|
createDebugLogger
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-UHQFIS7N.js";
|
|
33
33
|
import {
|
|
34
34
|
recordStartupEvent
|
|
35
35
|
} from "./chunk-QILD6R27.js";
|
|
@@ -233,11 +233,11 @@ function startPostRenderPrefetches(config, settings, options = {}) {
|
|
|
233
233
|
{ updateEventEmitter },
|
|
234
234
|
{ t }
|
|
235
235
|
] = await Promise.all([
|
|
236
|
-
import("./updateCheck-
|
|
237
|
-
import("./handleAutoUpdate-
|
|
238
|
-
import("./installationInfo-
|
|
236
|
+
import("./updateCheck-7QBDXZRT.js"),
|
|
237
|
+
import("./handleAutoUpdate-SGXKTQM6.js"),
|
|
238
|
+
import("./installationInfo-Y7AULNMX.js"),
|
|
239
239
|
import("./updateEventEmitter-5MKC7BLQ.js"),
|
|
240
|
-
import("./i18n-
|
|
240
|
+
import("./i18n-B42HKHKH.js")
|
|
241
241
|
]);
|
|
242
242
|
const updateCheckSkippedMessage = /* @__PURE__ */ __name((error) => t("Update check skipped ({{reason}}) \u2014 run /update to retry.", {
|
|
243
243
|
reason: describeUpdateCheckFailure(error)
|
|
@@ -310,7 +310,7 @@ ${t(
|
|
|
310
310
|
state: "connecting"
|
|
311
311
|
});
|
|
312
312
|
try {
|
|
313
|
-
const { connectIdeForStartup } = await import("./initializer-
|
|
313
|
+
const { connectIdeForStartup } = await import("./initializer-FB66WYR3.js");
|
|
314
314
|
await withTimeout(
|
|
315
315
|
connectIdeForStartup(config),
|
|
316
316
|
"ide_connect",
|
|
@@ -334,7 +334,7 @@ ${t(
|
|
|
334
334
|
}
|
|
335
335
|
if (config.isInteractive()) {
|
|
336
336
|
runDeferredTask("background_housekeeping", async () => {
|
|
337
|
-
const { startBackgroundHousekeeping } = await import("./scheduler-
|
|
337
|
+
const { startBackgroundHousekeeping } = await import("./scheduler-YRUG22M7.js");
|
|
338
338
|
startBackgroundHousekeeping(config, settings);
|
|
339
339
|
});
|
|
340
340
|
}
|
|
@@ -5,7 +5,7 @@ import {
|
|
|
5
5
|
} from "./chunk-3SH53ANB.js";
|
|
6
6
|
import {
|
|
7
7
|
theme
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-WAOIHTJS.js";
|
|
9
9
|
import {
|
|
10
10
|
require_jsx_runtime
|
|
11
11
|
} from "./chunk-SV5PQVQE.js";
|
|
@@ -14,17 +14,17 @@ import {
|
|
|
14
14
|
Text,
|
|
15
15
|
use_is_screen_reader_enabled_default
|
|
16
16
|
} from "./chunk-5Q372OFJ.js";
|
|
17
|
-
import {
|
|
18
|
-
collectInlineImages,
|
|
19
|
-
extractInlineContentRuns
|
|
20
|
-
} from "./chunk-EC5BONC3.js";
|
|
21
17
|
import {
|
|
22
18
|
require_react
|
|
23
19
|
} from "./chunk-5QWWOFGG.js";
|
|
20
|
+
import {
|
|
21
|
+
collectInlineImages,
|
|
22
|
+
extractInlineContentRuns
|
|
23
|
+
} from "./chunk-TPI7O7HR.js";
|
|
24
24
|
import {
|
|
25
25
|
formatHistoryGapNotice,
|
|
26
26
|
indexGapsByChild
|
|
27
|
-
} from "./chunk-
|
|
27
|
+
} from "./chunk-XDLEZ5HX.js";
|
|
28
28
|
import {
|
|
29
29
|
stringWidth
|
|
30
30
|
} from "./chunk-2MIN6GRR.js";
|
|
@@ -33,13 +33,13 @@ import {
|
|
|
33
33
|
} from "./chunk-QHTIBUWB.js";
|
|
34
34
|
import {
|
|
35
35
|
t
|
|
36
|
-
} from "./chunk-
|
|
36
|
+
} from "./chunk-LDP5OD6N.js";
|
|
37
37
|
import {
|
|
38
38
|
isGoalCheckpointBookkeepingRecord
|
|
39
|
-
} from "./chunk-
|
|
39
|
+
} from "./chunk-KUX5D6DK.js";
|
|
40
40
|
import {
|
|
41
41
|
getToolResponseDisplayText
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-TGWAQ5RB.js";
|
|
43
43
|
import {
|
|
44
44
|
stripAnsi
|
|
45
45
|
} from "./chunk-TWPJO254.js";
|
|
@@ -47,10 +47,10 @@ import {
|
|
|
47
47
|
GoalPersistenceUnavailableError,
|
|
48
48
|
parseGoalStateRecordPayloadV2,
|
|
49
49
|
projectUserTranscriptForDisplay
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-WKK5BQNP.js";
|
|
51
51
|
import {
|
|
52
52
|
ToolDisplayNames
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-UTLCH2FK.js";
|
|
54
54
|
import {
|
|
55
55
|
init_esbuild_shims
|
|
56
56
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
init_esbuild_shims
|
|
5
|
+
} from "./chunk-5O2XNYP6.js";
|
|
6
|
+
import {
|
|
7
|
+
__name
|
|
8
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
9
|
+
|
|
10
|
+
// packages/acp-bridge/dist/session-source.js
|
|
11
|
+
init_esbuild_shims();
|
|
12
|
+
var SESSION_SOURCE_META_KEY = "qwen.session.source";
|
|
13
|
+
var SESSION_SOURCE_TYPE_PATTERN = /^[a-z][a-z0-9_-]{0,63}$/;
|
|
14
|
+
var MAX_SESSION_SOURCE_ID_LENGTH = 256;
|
|
15
|
+
var STANDALONE_SESSION_SOURCE_TYPE = "standalone";
|
|
16
|
+
var DAEMON_OWNED_STANDALONE_CREATION_KEY = "daemonOwnedStandaloneCreation";
|
|
17
|
+
function isReservedStandaloneSessionSourceType(sourceType) {
|
|
18
|
+
return sourceType === STANDALONE_SESSION_SOURCE_TYPE;
|
|
19
|
+
}
|
|
20
|
+
__name(isReservedStandaloneSessionSourceType, "isReservedStandaloneSessionSourceType");
|
|
21
|
+
function parseSessionSource(sourceType, sourceId) {
|
|
22
|
+
if (sourceType === void 0 && sourceId === void 0)
|
|
23
|
+
return {};
|
|
24
|
+
if (typeof sourceType !== "string" || !SESSION_SOURCE_TYPE_PATTERN.test(sourceType)) {
|
|
25
|
+
return {
|
|
26
|
+
error: "`sourceType` must match [a-z][a-z0-9_-]{0,63} when provided"
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
if (sourceId === void 0)
|
|
30
|
+
return { sourceType };
|
|
31
|
+
if (typeof sourceId !== "string" || sourceId.length === 0 || sourceId.length > MAX_SESSION_SOURCE_ID_LENGTH || [...sourceId].some((character) => {
|
|
32
|
+
const code = character.charCodeAt(0);
|
|
33
|
+
return code <= 31 || code === 127;
|
|
34
|
+
})) {
|
|
35
|
+
return {
|
|
36
|
+
error: `\`sourceId\` must be a non-empty string of at most ${MAX_SESSION_SOURCE_ID_LENGTH} characters without control characters`
|
|
37
|
+
};
|
|
38
|
+
}
|
|
39
|
+
return { sourceType, sourceId };
|
|
40
|
+
}
|
|
41
|
+
__name(parseSessionSource, "parseSessionSource");
|
|
42
|
+
|
|
43
|
+
export {
|
|
44
|
+
SESSION_SOURCE_META_KEY,
|
|
45
|
+
STANDALONE_SESSION_SOURCE_TYPE,
|
|
46
|
+
DAEMON_OWNED_STANDALONE_CREATION_KEY,
|
|
47
|
+
isReservedStandaloneSessionSourceType,
|
|
48
|
+
parseSessionSource
|
|
49
|
+
};
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
isPrivateHost
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-3JGZSIDA.js";
|
|
6
6
|
import {
|
|
7
7
|
loadUndici
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-PPKZ7JOE.js";
|
|
9
9
|
import {
|
|
10
10
|
getErrorMessage
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-UHQFIS7N.js";
|
|
12
12
|
import {
|
|
13
13
|
init_esbuild_shims
|
|
14
14
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
isTerminalWorkflowStatus
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TGWAQ5RB.js";
|
|
6
6
|
import {
|
|
7
7
|
Storage,
|
|
8
8
|
createDebugLogger
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-UHQFIS7N.js";
|
|
10
10
|
import {
|
|
11
11
|
init_esbuild_shims
|
|
12
12
|
} from "./chunk-5O2XNYP6.js";
|
|
@@ -14,10 +14,177 @@ import {
|
|
|
14
14
|
__name
|
|
15
15
|
} from "./chunk-J2S4EL5Y.js";
|
|
16
16
|
|
|
17
|
-
// packages/core/src/agents/workflow-
|
|
17
|
+
// packages/core/src/agents/runtime/workflow-saved.ts
|
|
18
18
|
init_esbuild_shims();
|
|
19
19
|
import { promises as fs } from "node:fs";
|
|
20
|
-
|
|
20
|
+
import * as path from "node:path";
|
|
21
|
+
var debugLogger = createDebugLogger("WORKFLOW_SAVED");
|
|
22
|
+
var WORKFLOW_NAME_PATTERN = /^[a-z][a-z0-9-]{0,40}$/;
|
|
23
|
+
function validateWorkflowName(name) {
|
|
24
|
+
if (!name) return "Workflow name is required.";
|
|
25
|
+
if (!WORKFLOW_NAME_PATTERN.test(name)) {
|
|
26
|
+
return `Invalid workflow name "${name}". Use lower-case letters, digits, and hyphens only (must start with a letter, max 41 chars).`;
|
|
27
|
+
}
|
|
28
|
+
return null;
|
|
29
|
+
}
|
|
30
|
+
__name(validateWorkflowName, "validateWorkflowName");
|
|
31
|
+
function getSavedWorkflowDirs(config) {
|
|
32
|
+
return [
|
|
33
|
+
{ dir: config.storage.getProjectWorkflowsDir(), source: "project" },
|
|
34
|
+
{ dir: Storage.getUserWorkflowsDir(), source: "user" }
|
|
35
|
+
];
|
|
36
|
+
}
|
|
37
|
+
__name(getSavedWorkflowDirs, "getSavedWorkflowDirs");
|
|
38
|
+
function getWorkflowScriptRoots(config) {
|
|
39
|
+
return [
|
|
40
|
+
...getSavedWorkflowDirs(config).map(({ dir }) => dir),
|
|
41
|
+
config.storage.getGeneratedWorkflowsDir()
|
|
42
|
+
];
|
|
43
|
+
}
|
|
44
|
+
__name(getWorkflowScriptRoots, "getWorkflowScriptRoots");
|
|
45
|
+
async function isSymlinkedRoot(dir) {
|
|
46
|
+
return fs.lstat(dir).then((st) => st.isSymbolicLink()).catch(() => false);
|
|
47
|
+
}
|
|
48
|
+
__name(isSymlinkedRoot, "isSymlinkedRoot");
|
|
49
|
+
async function listJsFiles(dir) {
|
|
50
|
+
if (await isSymlinkedRoot(dir)) {
|
|
51
|
+
debugLogger.warn(`refusing symlinked saved-workflow dir: ${dir}`);
|
|
52
|
+
return [];
|
|
53
|
+
}
|
|
54
|
+
try {
|
|
55
|
+
const names = await fs.readdir(dir);
|
|
56
|
+
const out = [];
|
|
57
|
+
for (const n of names) {
|
|
58
|
+
if (!n.endsWith(".js")) continue;
|
|
59
|
+
const st = await fs.lstat(path.join(dir, n)).catch(() => null);
|
|
60
|
+
if (!st || st.isSymbolicLink()) continue;
|
|
61
|
+
out.push(n);
|
|
62
|
+
}
|
|
63
|
+
return out;
|
|
64
|
+
} catch (e) {
|
|
65
|
+
const code = e?.code;
|
|
66
|
+
if (code !== "ENOENT") {
|
|
67
|
+
debugLogger.warn(`listJsFiles failed for ${dir}: ${e}`);
|
|
68
|
+
}
|
|
69
|
+
return [];
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
__name(listJsFiles, "listJsFiles");
|
|
73
|
+
async function readWorkflowFileSecurely(filePath, config) {
|
|
74
|
+
const real = await fs.realpath(filePath);
|
|
75
|
+
const roots = await Promise.all(
|
|
76
|
+
getWorkflowScriptRoots(config).map(async (dir) => {
|
|
77
|
+
if (await isSymlinkedRoot(dir)) return { dir, real: null };
|
|
78
|
+
try {
|
|
79
|
+
return { dir, real: await fs.realpath(dir) };
|
|
80
|
+
} catch {
|
|
81
|
+
return { dir, real: path.resolve(dir) };
|
|
82
|
+
}
|
|
83
|
+
})
|
|
84
|
+
);
|
|
85
|
+
const dirs = roots.flatMap((r) => r.real === null ? [] : [r.real]);
|
|
86
|
+
const inside = dirs.some((d) => real === d || real.startsWith(d + path.sep));
|
|
87
|
+
if (!inside) {
|
|
88
|
+
const refused = roots.flatMap((r) => r.real === null ? [r.dir] : []);
|
|
89
|
+
const refusedNote = refused.length > 0 ? `; refused symlinked ${refused.length === 1 ? "root" : "roots"}: ${refused.join(", ")}` : "";
|
|
90
|
+
throw new Error(
|
|
91
|
+
`refusing to load a workflow file outside the workflow script roots (checked: ${dirs.join(", ")}${refusedNote}): '${filePath}'.`
|
|
92
|
+
);
|
|
93
|
+
}
|
|
94
|
+
return fs.readFile(real, "utf8");
|
|
95
|
+
}
|
|
96
|
+
__name(readWorkflowFileSecurely, "readWorkflowFileSecurely");
|
|
97
|
+
async function listSavedWorkflows(config) {
|
|
98
|
+
const byName = /* @__PURE__ */ new Map();
|
|
99
|
+
for (const { dir, source } of [...getSavedWorkflowDirs(config)].reverse()) {
|
|
100
|
+
for (const file of await listJsFiles(dir)) {
|
|
101
|
+
const name = file.slice(0, -".js".length);
|
|
102
|
+
if (!WORKFLOW_NAME_PATTERN.test(name)) continue;
|
|
103
|
+
byName.set(name, { name, scriptPath: path.join(dir, file), source });
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
return Array.from(byName.values()).sort(
|
|
107
|
+
(a, b) => a.name.localeCompare(b.name)
|
|
108
|
+
);
|
|
109
|
+
}
|
|
110
|
+
__name(listSavedWorkflows, "listSavedWorkflows");
|
|
111
|
+
async function resolveSavedWorkflowScript(nameOrRef, config) {
|
|
112
|
+
if (typeof nameOrRef === "object" && nameOrRef !== null) {
|
|
113
|
+
const scriptPath = nameOrRef.scriptPath;
|
|
114
|
+
if (typeof scriptPath !== "string" || scriptPath.length === 0) {
|
|
115
|
+
throw new Error(
|
|
116
|
+
"workflow() expects a workflow name (string) or {scriptPath: string}."
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
let script;
|
|
120
|
+
try {
|
|
121
|
+
script = await readWorkflowFileSecurely(scriptPath, config);
|
|
122
|
+
} catch (e) {
|
|
123
|
+
throw new Error(
|
|
124
|
+
`workflow({scriptPath: '${scriptPath}'}): ${e instanceof Error ? e.message : String(e)}`
|
|
125
|
+
);
|
|
126
|
+
}
|
|
127
|
+
const name2 = path.basename(scriptPath).replace(/\.js$/, "");
|
|
128
|
+
return { name: name2, scriptPath, script };
|
|
129
|
+
}
|
|
130
|
+
if (typeof nameOrRef !== "string") {
|
|
131
|
+
throw new Error(
|
|
132
|
+
"workflow() expects a workflow name (string) or {scriptPath: string}."
|
|
133
|
+
);
|
|
134
|
+
}
|
|
135
|
+
const name = nameOrRef;
|
|
136
|
+
const nameError = validateWorkflowName(name);
|
|
137
|
+
if (nameError) {
|
|
138
|
+
throw new Error(`workflow('${name}'): ${nameError}`);
|
|
139
|
+
}
|
|
140
|
+
for (const { dir } of getSavedWorkflowDirs(config)) {
|
|
141
|
+
const scriptPath = path.join(dir, `${name}.js`);
|
|
142
|
+
try {
|
|
143
|
+
const script = await readWorkflowFileSecurely(scriptPath, config);
|
|
144
|
+
return { name, scriptPath, script };
|
|
145
|
+
} catch {
|
|
146
|
+
}
|
|
147
|
+
}
|
|
148
|
+
const available = (await listSavedWorkflows(config)).map((e) => e.name);
|
|
149
|
+
throw new Error(
|
|
150
|
+
`workflow('${name}'): no workflow with that name. Available: ${available.length > 0 ? available.join(", ") : "(none)"}.`
|
|
151
|
+
);
|
|
152
|
+
}
|
|
153
|
+
__name(resolveSavedWorkflowScript, "resolveSavedWorkflowScript");
|
|
154
|
+
async function saveWorkflowScript(config, opts) {
|
|
155
|
+
const { name, scope, script, overwrite = false } = opts;
|
|
156
|
+
const nameError = validateWorkflowName(name);
|
|
157
|
+
if (nameError) return { status: "invalid-name", error: nameError };
|
|
158
|
+
if (!script || script.trim().length === 0) {
|
|
159
|
+
return {
|
|
160
|
+
status: "empty-script",
|
|
161
|
+
error: "This run has no script source to save."
|
|
162
|
+
};
|
|
163
|
+
}
|
|
164
|
+
const dir = scope === "project" ? config.storage.getProjectWorkflowsDir() : Storage.getUserWorkflowsDir();
|
|
165
|
+
if (await isSymlinkedRoot(dir)) {
|
|
166
|
+
throw new Error(
|
|
167
|
+
`refusing to save into a symlinked saved-workflow directory: '${dir}'.`
|
|
168
|
+
);
|
|
169
|
+
}
|
|
170
|
+
const filePath = path.join(dir, `${name}.js`);
|
|
171
|
+
if (!overwrite) {
|
|
172
|
+
try {
|
|
173
|
+
await fs.access(filePath);
|
|
174
|
+
return { status: "exists", name, scope, path: filePath };
|
|
175
|
+
} catch {
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
await fs.mkdir(dir, { recursive: true });
|
|
179
|
+
await fs.writeFile(filePath, script, "utf8");
|
|
180
|
+
return { status: "saved", name, scope, path: filePath };
|
|
181
|
+
}
|
|
182
|
+
__name(saveWorkflowScript, "saveWorkflowScript");
|
|
183
|
+
|
|
184
|
+
// packages/core/src/agents/workflow-snapshot.ts
|
|
185
|
+
init_esbuild_shims();
|
|
186
|
+
import { promises as fs2 } from "node:fs";
|
|
187
|
+
var debugLogger2 = createDebugLogger("WORKFLOW_SNAPSHOT");
|
|
21
188
|
var MAX_RETAINED_SNAPSHOTS = 30;
|
|
22
189
|
function toSnapshot(task) {
|
|
23
190
|
if (!isTerminalWorkflowStatus(task.status)) {
|
|
@@ -68,15 +235,15 @@ async function writeWorkflowSnapshot(config, task) {
|
|
|
68
235
|
try {
|
|
69
236
|
const snapshot = toSnapshot(task);
|
|
70
237
|
const dir = storage.getWorkflowRunsDir();
|
|
71
|
-
await
|
|
72
|
-
await
|
|
238
|
+
await fs2.mkdir(dir, { recursive: true });
|
|
239
|
+
await fs2.writeFile(
|
|
73
240
|
storage.getWorkflowRunSnapshotPath(task.runId),
|
|
74
241
|
JSON.stringify(snapshot, null, 2),
|
|
75
242
|
"utf8"
|
|
76
243
|
);
|
|
77
244
|
await pruneSnapshots(dir);
|
|
78
245
|
} catch (e) {
|
|
79
|
-
|
|
246
|
+
debugLogger2.warn(`writeWorkflowSnapshot failed for ${task.runId}: ${e}`);
|
|
80
247
|
}
|
|
81
248
|
}
|
|
82
249
|
__name(writeWorkflowSnapshot, "writeWorkflowSnapshot");
|
|
@@ -86,22 +253,22 @@ async function listWorkflowSnapshots(config) {
|
|
|
86
253
|
const dir = storage.getWorkflowRunsDir();
|
|
87
254
|
let files;
|
|
88
255
|
try {
|
|
89
|
-
files = (await
|
|
256
|
+
files = (await fs2.readdir(dir)).filter((f) => f.endsWith(".json"));
|
|
90
257
|
} catch {
|
|
91
258
|
return [];
|
|
92
259
|
}
|
|
93
260
|
const snapshots = [];
|
|
94
261
|
for (const file of files) {
|
|
95
262
|
try {
|
|
96
|
-
const raw = await
|
|
263
|
+
const raw = await fs2.readFile(`${dir}/${file}`, "utf8");
|
|
97
264
|
const parsed = JSON.parse(raw);
|
|
98
265
|
if (!isWorkflowSnapshot(parsed)) {
|
|
99
|
-
|
|
266
|
+
debugLogger2.warn(`skipping invalid workflow snapshot ${file}`);
|
|
100
267
|
continue;
|
|
101
268
|
}
|
|
102
269
|
snapshots.push(parsed);
|
|
103
270
|
} catch (e) {
|
|
104
|
-
|
|
271
|
+
debugLogger2.warn(`skipping unparseable snapshot ${file}: ${e}`);
|
|
105
272
|
}
|
|
106
273
|
}
|
|
107
274
|
snapshots.sort((a, b) => (b.startTime ?? 0) - (a.startTime ?? 0));
|
|
@@ -199,7 +366,7 @@ __name(isWorkflowSnapshot, "isWorkflowSnapshot");
|
|
|
199
366
|
async function pruneSnapshots(dir) {
|
|
200
367
|
let files;
|
|
201
368
|
try {
|
|
202
|
-
files = (await
|
|
369
|
+
files = (await fs2.readdir(dir)).filter((f) => f.endsWith(".json"));
|
|
203
370
|
} catch {
|
|
204
371
|
return;
|
|
205
372
|
}
|
|
@@ -207,7 +374,7 @@ async function pruneSnapshots(dir) {
|
|
|
207
374
|
const stats = await Promise.all(
|
|
208
375
|
files.map(async (f) => {
|
|
209
376
|
try {
|
|
210
|
-
const s = await
|
|
377
|
+
const s = await fs2.stat(`${dir}/${f}`);
|
|
211
378
|
return { f, mtime: s.mtimeMs };
|
|
212
379
|
} catch {
|
|
213
380
|
return { f, mtime: 0 };
|
|
@@ -221,12 +388,12 @@ async function pruneSnapshots(dir) {
|
|
|
221
388
|
const runId = s.f.replace(/\.json$/, "");
|
|
222
389
|
const isRunDir = /^wf_[0-9a-f]+$/.test(runId);
|
|
223
390
|
return Promise.all([
|
|
224
|
-
|
|
225
|
-
(e) =>
|
|
391
|
+
fs2.unlink(`${dir}/${s.f}`).catch(
|
|
392
|
+
(e) => debugLogger2.warn(`prune unlink failed for ${s.f}: ${e}`)
|
|
226
393
|
),
|
|
227
394
|
...isRunDir ? [
|
|
228
|
-
|
|
229
|
-
(e) =>
|
|
395
|
+
fs2.rm(`${dir}/${runId}`, { recursive: true, force: true }).catch(
|
|
396
|
+
(e) => debugLogger2.warn(
|
|
230
397
|
`prune journal dir failed for ${runId}: ${e}`
|
|
231
398
|
)
|
|
232
399
|
)
|
|
@@ -237,167 +404,11 @@ async function pruneSnapshots(dir) {
|
|
|
237
404
|
}
|
|
238
405
|
__name(pruneSnapshots, "pruneSnapshots");
|
|
239
406
|
|
|
240
|
-
// packages/core/src/agents/runtime/workflow-saved.ts
|
|
241
|
-
init_esbuild_shims();
|
|
242
|
-
import { promises as fs2 } from "node:fs";
|
|
243
|
-
import * as path from "node:path";
|
|
244
|
-
var debugLogger2 = createDebugLogger("WORKFLOW_SAVED");
|
|
245
|
-
var WORKFLOW_NAME_PATTERN = /^[a-z][a-z0-9-]{0,40}$/;
|
|
246
|
-
function validateWorkflowName(name) {
|
|
247
|
-
if (!name) return "Workflow name is required.";
|
|
248
|
-
if (!WORKFLOW_NAME_PATTERN.test(name)) {
|
|
249
|
-
return `Invalid workflow name "${name}". Use lower-case letters, digits, and hyphens only (must start with a letter, max 41 chars).`;
|
|
250
|
-
}
|
|
251
|
-
return null;
|
|
252
|
-
}
|
|
253
|
-
__name(validateWorkflowName, "validateWorkflowName");
|
|
254
|
-
function getSavedWorkflowDirs(config) {
|
|
255
|
-
return [
|
|
256
|
-
{ dir: config.storage.getProjectWorkflowsDir(), source: "project" },
|
|
257
|
-
{ dir: Storage.getUserWorkflowsDir(), source: "user" }
|
|
258
|
-
];
|
|
259
|
-
}
|
|
260
|
-
__name(getSavedWorkflowDirs, "getSavedWorkflowDirs");
|
|
261
|
-
async function isSymlinkedRoot(dir) {
|
|
262
|
-
return fs2.lstat(dir).then((st) => st.isSymbolicLink()).catch(() => false);
|
|
263
|
-
}
|
|
264
|
-
__name(isSymlinkedRoot, "isSymlinkedRoot");
|
|
265
|
-
async function listJsFiles(dir) {
|
|
266
|
-
if (await isSymlinkedRoot(dir)) {
|
|
267
|
-
debugLogger2.warn(`refusing symlinked saved-workflow dir: ${dir}`);
|
|
268
|
-
return [];
|
|
269
|
-
}
|
|
270
|
-
try {
|
|
271
|
-
const names = await fs2.readdir(dir);
|
|
272
|
-
const out = [];
|
|
273
|
-
for (const n of names) {
|
|
274
|
-
if (!n.endsWith(".js")) continue;
|
|
275
|
-
const st = await fs2.lstat(path.join(dir, n)).catch(() => null);
|
|
276
|
-
if (!st || st.isSymbolicLink()) continue;
|
|
277
|
-
out.push(n);
|
|
278
|
-
}
|
|
279
|
-
return out;
|
|
280
|
-
} catch (e) {
|
|
281
|
-
const code = e?.code;
|
|
282
|
-
if (code !== "ENOENT") {
|
|
283
|
-
debugLogger2.warn(`listJsFiles failed for ${dir}: ${e}`);
|
|
284
|
-
}
|
|
285
|
-
return [];
|
|
286
|
-
}
|
|
287
|
-
}
|
|
288
|
-
__name(listJsFiles, "listJsFiles");
|
|
289
|
-
async function readWorkflowFileSecurely(filePath, config) {
|
|
290
|
-
const real = await fs2.realpath(filePath);
|
|
291
|
-
const dirs = (await Promise.all(
|
|
292
|
-
getSavedWorkflowDirs(config).map(async ({ dir }) => {
|
|
293
|
-
if (await isSymlinkedRoot(dir)) return null;
|
|
294
|
-
try {
|
|
295
|
-
return await fs2.realpath(dir);
|
|
296
|
-
} catch {
|
|
297
|
-
return path.resolve(dir);
|
|
298
|
-
}
|
|
299
|
-
})
|
|
300
|
-
)).filter((d) => d !== null);
|
|
301
|
-
const inside = dirs.some((d) => real === d || real.startsWith(d + path.sep));
|
|
302
|
-
if (!inside) {
|
|
303
|
-
throw new Error(
|
|
304
|
-
`refusing to load a workflow file outside the saved-workflow directories: '${filePath}'.`
|
|
305
|
-
);
|
|
306
|
-
}
|
|
307
|
-
return fs2.readFile(real, "utf8");
|
|
308
|
-
}
|
|
309
|
-
__name(readWorkflowFileSecurely, "readWorkflowFileSecurely");
|
|
310
|
-
async function listSavedWorkflows(config) {
|
|
311
|
-
const byName = /* @__PURE__ */ new Map();
|
|
312
|
-
for (const { dir, source } of [...getSavedWorkflowDirs(config)].reverse()) {
|
|
313
|
-
for (const file of await listJsFiles(dir)) {
|
|
314
|
-
const name = file.slice(0, -".js".length);
|
|
315
|
-
if (!WORKFLOW_NAME_PATTERN.test(name)) continue;
|
|
316
|
-
byName.set(name, { name, scriptPath: path.join(dir, file), source });
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return Array.from(byName.values()).sort(
|
|
320
|
-
(a, b) => a.name.localeCompare(b.name)
|
|
321
|
-
);
|
|
322
|
-
}
|
|
323
|
-
__name(listSavedWorkflows, "listSavedWorkflows");
|
|
324
|
-
async function resolveSavedWorkflowScript(nameOrRef, config) {
|
|
325
|
-
if (typeof nameOrRef === "object" && nameOrRef !== null) {
|
|
326
|
-
const scriptPath = nameOrRef.scriptPath;
|
|
327
|
-
if (typeof scriptPath !== "string" || scriptPath.length === 0) {
|
|
328
|
-
throw new Error(
|
|
329
|
-
"workflow() expects a workflow name (string) or {scriptPath: string}."
|
|
330
|
-
);
|
|
331
|
-
}
|
|
332
|
-
let script;
|
|
333
|
-
try {
|
|
334
|
-
script = await readWorkflowFileSecurely(scriptPath, config);
|
|
335
|
-
} catch (e) {
|
|
336
|
-
throw new Error(
|
|
337
|
-
`workflow({scriptPath: '${scriptPath}'}): ${e instanceof Error ? e.message : String(e)}`
|
|
338
|
-
);
|
|
339
|
-
}
|
|
340
|
-
const name2 = path.basename(scriptPath).replace(/\.js$/, "");
|
|
341
|
-
return { name: name2, scriptPath, script };
|
|
342
|
-
}
|
|
343
|
-
if (typeof nameOrRef !== "string") {
|
|
344
|
-
throw new Error(
|
|
345
|
-
"workflow() expects a workflow name (string) or {scriptPath: string}."
|
|
346
|
-
);
|
|
347
|
-
}
|
|
348
|
-
const name = nameOrRef;
|
|
349
|
-
const nameError = validateWorkflowName(name);
|
|
350
|
-
if (nameError) {
|
|
351
|
-
throw new Error(`workflow('${name}'): ${nameError}`);
|
|
352
|
-
}
|
|
353
|
-
for (const { dir } of getSavedWorkflowDirs(config)) {
|
|
354
|
-
const scriptPath = path.join(dir, `${name}.js`);
|
|
355
|
-
try {
|
|
356
|
-
const script = await readWorkflowFileSecurely(scriptPath, config);
|
|
357
|
-
return { name, scriptPath, script };
|
|
358
|
-
} catch {
|
|
359
|
-
}
|
|
360
|
-
}
|
|
361
|
-
const available = (await listSavedWorkflows(config)).map((e) => e.name);
|
|
362
|
-
throw new Error(
|
|
363
|
-
`workflow('${name}'): no workflow with that name. Available: ${available.length > 0 ? available.join(", ") : "(none)"}.`
|
|
364
|
-
);
|
|
365
|
-
}
|
|
366
|
-
__name(resolveSavedWorkflowScript, "resolveSavedWorkflowScript");
|
|
367
|
-
async function saveWorkflowScript(config, opts) {
|
|
368
|
-
const { name, scope, script, overwrite = false } = opts;
|
|
369
|
-
const nameError = validateWorkflowName(name);
|
|
370
|
-
if (nameError) return { status: "invalid-name", error: nameError };
|
|
371
|
-
if (!script || script.trim().length === 0) {
|
|
372
|
-
return {
|
|
373
|
-
status: "empty-script",
|
|
374
|
-
error: "This run has no script source to save."
|
|
375
|
-
};
|
|
376
|
-
}
|
|
377
|
-
const dir = scope === "project" ? config.storage.getProjectWorkflowsDir() : Storage.getUserWorkflowsDir();
|
|
378
|
-
if (await isSymlinkedRoot(dir)) {
|
|
379
|
-
throw new Error(
|
|
380
|
-
`refusing to save into a symlinked saved-workflow directory: '${dir}'.`
|
|
381
|
-
);
|
|
382
|
-
}
|
|
383
|
-
const filePath = path.join(dir, `${name}.js`);
|
|
384
|
-
if (!overwrite) {
|
|
385
|
-
try {
|
|
386
|
-
await fs2.access(filePath);
|
|
387
|
-
return { status: "exists", name, scope, path: filePath };
|
|
388
|
-
} catch {
|
|
389
|
-
}
|
|
390
|
-
}
|
|
391
|
-
await fs2.mkdir(dir, { recursive: true });
|
|
392
|
-
await fs2.writeFile(filePath, script, "utf8");
|
|
393
|
-
return { status: "saved", name, scope, path: filePath };
|
|
394
|
-
}
|
|
395
|
-
__name(saveWorkflowScript, "saveWorkflowScript");
|
|
396
|
-
|
|
397
407
|
export {
|
|
398
408
|
writeWorkflowSnapshot,
|
|
399
409
|
listWorkflowSnapshots,
|
|
400
410
|
validateWorkflowName,
|
|
411
|
+
isSymlinkedRoot,
|
|
401
412
|
listSavedWorkflows,
|
|
402
413
|
resolveSavedWorkflowScript,
|
|
403
414
|
saveWorkflowScript
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
"use strict";
|
|
3
3
|
import {
|
|
4
4
|
createTask
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-IZIVM7LZ.js";
|
|
6
6
|
import {
|
|
7
7
|
getPlanRequiredTeammatePreApprovalMessage,
|
|
8
8
|
isPlanRequiredTeammateAwaitingApproval
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-V5J4J5TP.js";
|
|
10
10
|
import {
|
|
11
11
|
resolveActiveTeamName
|
|
12
12
|
} from "./chunk-S6LOFUVP.js";
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
BaseToolInvocation,
|
|
16
16
|
ToolDisplayNames,
|
|
17
17
|
ToolNames
|
|
18
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-UTLCH2FK.js";
|
|
19
19
|
import {
|
|
20
20
|
init_esbuild_shims
|
|
21
21
|
} from "./chunk-5O2XNYP6.js";
|