@qwen-code/qwen-code 0.21.13 → 0.21.14-preview.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundled/qc-helper/docs/configuration/settings.md +13 -7
- package/bundled/qc-helper/docs/features/code-review.md +5 -1
- package/bundled/qc-helper/docs/features/commands.md +120 -8
- package/bundled/qc-helper/docs/features/sub-agents.md +2 -2
- package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
- package/bundled/qc-helper/docs/qwen-serve.md +20 -3
- package/bundled/review/SKILL.md +50 -30
- package/chunks/{MaxSizedBox-UQALOVVT.js → MaxSizedBox-3PZITE2Y.js} +24 -23
- package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-2C34PNGO.js} +41 -40
- package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-HUYGO57H.js} +2 -2
- package/chunks/{acpAgent-XPES32S7.js → acpAgent-3J4NHAYT.js} +626 -141
- package/chunks/{agent-DPTOZFEM.js → agent-VFX4RPP5.js} +22 -21
- package/chunks/{agent-headless-GJCQMURW.js → agent-headless-6WCF4J6N.js} +22 -21
- package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-M7XRJMSK.js} +3 -3
- package/chunks/{bridge-YNQBAA4Z.js → bridge-XR5ZSR7U.js} +26 -25
- package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
- package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-X6LCQUAD.js} +1 -1
- package/chunks/{channel-settings-store-WNWYFHG7.js → channel-settings-store-Z7BUEUJE.js} +30 -29
- package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-TJ35JDPE.js} +2 -2
- package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-G5LKWGOG.js} +2 -2
- package/chunks/{chunk-MLPXSYXR.js → chunk-25GHLMQQ.js} +25 -16
- package/chunks/chunk-2C6HJMG3.js +757 -0
- package/chunks/{chunk-TUGSVUJB.js → chunk-2JXDFSVE.js} +5 -5
- package/chunks/{chunk-AS5IN4GK.js → chunk-2OA3JMRD.js} +3 -3
- package/chunks/chunk-3PWCMXIR.js +9169 -0
- package/chunks/{chunk-U3VNBPUO.js → chunk-4KQ2TI2K.js} +2 -2
- package/chunks/{chunk-NEFOOD54.js → chunk-4V4DFJBS.js} +2 -2
- package/chunks/{chunk-OMLJNPBE.js → chunk-4ZMS3JCR.js} +1 -0
- package/chunks/{chunk-PP4FUZNV.js → chunk-55PIFSP2.js} +2 -2
- package/chunks/{chunk-3U3VAL47.js → chunk-57KOJ2KZ.js} +1 -1
- package/chunks/{chunk-A4QRWUDE.js → chunk-5IYS4WWR.js} +1 -1
- package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
- package/chunks/{chunk-CU6GJD55.js → chunk-6DFPR7CS.js} +1 -1
- package/chunks/{chunk-V57QC6WW.js → chunk-6LAPGPVA.js} +5 -3
- package/chunks/{chunk-OOQUVWIG.js → chunk-6PDOHRN6.js} +4 -4
- package/chunks/{chunk-UZPM4XHR.js → chunk-6VDPDHIP.js} +29 -8
- package/chunks/{chunk-O4D7SPJN.js → chunk-73G3Z7QS.js} +3 -3
- package/chunks/{chunk-QIH2HAEN.js → chunk-7OCSX7FC.js} +1 -1
- package/chunks/{chunk-OVZPVYZB.js → chunk-AKBOLMUF.js} +95 -17
- package/chunks/{chunk-DGK6P3BQ.js → chunk-AQBHJ2IG.js} +10 -10
- package/chunks/{chunk-JNDY2MDR.js → chunk-BOJNAPUE.js} +1 -1
- package/chunks/{chunk-NHDR76JX.js → chunk-BQWNIPTE.js} +1 -1
- package/chunks/{chunk-AA2BEKV3.js → chunk-CH5OFRV7.js} +1 -1
- package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
- package/chunks/{chunk-K5IDV3PC.js → chunk-D34RDOLP.js} +12 -2
- package/chunks/{chunk-OXCMMLED.js → chunk-DGJ7O55J.js} +1 -1
- package/chunks/{chunk-BKPPWD33.js → chunk-DRKYT2TR.js} +1 -1
- package/chunks/{chunk-P7MPQI75.js → chunk-DVR7XKO5.js} +1 -1
- package/chunks/{chunk-MRMJCLIY.js → chunk-DZCV3ZYU.js} +2 -2
- package/chunks/{chunk-EZ5RP345.js → chunk-E5RS7LF4.js} +40 -9
- package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
- package/chunks/chunk-EOCQCNV4.js +3887 -0
- package/chunks/{chunk-BVJS5BSP.js → chunk-FCTLOVYW.js} +1 -1
- package/chunks/{chunk-DGZEMW5R.js → chunk-FS5NGKWC.js} +1 -1
- package/chunks/{chunk-XHRY7BXD.js → chunk-G6FFFICU.js} +3 -3
- package/chunks/{chunk-NM5V5OVW.js → chunk-GV3OIADZ.js} +2 -2
- package/chunks/{chunk-QV5YN5YD.js → chunk-HGPMOXLZ.js} +5 -5
- package/chunks/{chunk-GMIEIY3Y.js → chunk-I3N2Z25H.js} +1 -1
- package/chunks/{chunk-RIAABG2K.js → chunk-I7NTHW4C.js} +1 -1
- package/chunks/{chunk-HUTNYWBG.js → chunk-IOTPI425.js} +18 -10
- package/chunks/{chunk-ZYYTZUI2.js → chunk-ISRHAMNL.js} +3 -3
- package/chunks/{chunk-BHILXOC3.js → chunk-J63PKMYA.js} +1 -1
- package/chunks/{chunk-KD5BOPLP.js → chunk-J6YS7Z25.js} +98 -4
- package/chunks/{chunk-GO7STP6N.js → chunk-K3CECR5C.js} +4 -4
- package/chunks/{chunk-RVOJ2FBP.js → chunk-KC4WMLZO.js} +1486 -10574
- package/chunks/{chunk-IGGGG5CX.js → chunk-KSGWAYNE.js} +4580 -1652
- package/chunks/{chunk-X26JYGTD.js → chunk-L6CCLB3G.js} +1 -1
- package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
- package/chunks/{chunk-ZYBBISBY.js → chunk-LLR424CQ.js} +15 -12
- package/chunks/{chunk-JUEPY766.js → chunk-LRDB2OLB.js} +2 -2
- package/chunks/{chunk-PQ36L4F5.js → chunk-MCG53LWC.js} +1 -1
- package/chunks/{chunk-OD2WU5QY.js → chunk-NRPXRNN4.js} +1 -1
- package/chunks/{chunk-76J3IJ3M.js → chunk-NV6LW6FT.js} +3 -3
- package/chunks/{chunk-CKSJECTU.js → chunk-NVRMCWTP.js} +8 -4
- package/chunks/{chunk-Y3YCSWG5.js → chunk-OBJYN4MX.js} +1 -1
- package/chunks/{chunk-WFSTRPRO.js → chunk-OJOP26ET.js} +1 -1
- package/chunks/{chunk-A267JX7H.js → chunk-OLZSWUZR.js} +6 -6
- package/chunks/{chunk-TIGA2IVL.js → chunk-OO4FKHLO.js} +2 -2
- package/chunks/{chunk-OY5RNSV4.js → chunk-OSAFWBNR.js} +3 -3
- package/chunks/{chunk-BZ263IKX.js → chunk-OVY67CYC.js} +1 -1
- package/chunks/{chunk-YEYY7TEP.js → chunk-P425IVUK.js} +5 -5
- package/chunks/{chunk-AFSG32D5.js → chunk-PMS7O6SA.js} +1 -1
- package/chunks/{chunk-6ORZ2EDC.js → chunk-PPTM4O4R.js} +1 -1
- package/chunks/{chunk-JOOFMXGF.js → chunk-QECSDJET.js} +5 -5
- package/chunks/{chunk-CZBYX5MY.js → chunk-QEJZUXSK.js} +1 -1
- package/chunks/{chunk-4PKCUT7F.js → chunk-QIHHJKXT.js} +6 -6
- package/chunks/{chunk-QRCNA3SR.js → chunk-RAQBBGS6.js} +49 -69
- package/chunks/{chunk-M732YJPW.js → chunk-RXHBTKMG.js} +2 -2
- package/chunks/{chunk-XIT3GURH.js → chunk-S6CXQKDD.js} +3 -3
- package/chunks/{chunk-GGDBMYGZ.js → chunk-SA7GBPEA.js} +3 -3
- package/chunks/{chunk-7UXUJ5T3.js → chunk-SBRIBTYN.js} +1 -1
- package/chunks/{chunk-MC4TLKEI.js → chunk-SGLPDKRT.js} +2 -2
- package/chunks/{chunk-WSH6GRKG.js → chunk-SLILKYV2.js} +2 -2
- package/chunks/{chunk-DXIBNLBZ.js → chunk-SNQZZ765.js} +1 -1
- package/chunks/{chunk-5EYKMUUY.js → chunk-SR2LYSMT.js} +1 -1
- package/chunks/{chunk-AW4TRXOC.js → chunk-TNPWODIZ.js} +1 -1
- package/chunks/{chunk-QF2NHSPB.js → chunk-U6RZRKNM.js} +233 -184
- package/chunks/{chunk-QNQAPSN2.js → chunk-UC67T4SF.js} +3 -1
- package/chunks/{chunk-O565M6A4.js → chunk-UYDGFWIJ.js} +199 -14
- package/chunks/{chunk-LJQAUZMR.js → chunk-VGAAAMRD.js} +925 -92
- package/chunks/{chunk-UKMR3CKV.js → chunk-VHPMDDPT.js} +3 -3
- package/chunks/{chunk-S5DWMTHO.js → chunk-WP4WIUOJ.js} +2 -0
- package/chunks/{chunk-25EYDK42.js → chunk-WPVUOVYX.js} +1 -1
- package/chunks/{chunk-AXN7UPYQ.js → chunk-WSSH2BNO.js} +1 -1
- package/chunks/{chunk-6YKYPVDV.js → chunk-WVIABDXV.js} +3 -3
- package/chunks/chunk-WZAD4ZNJ.js +59 -0
- package/chunks/{chunk-N5YPT6PH.js → chunk-X3YA3YGG.js} +7 -4
- package/chunks/{chunk-4S5337WV.js → chunk-XC377TLN.js} +4312 -2704
- package/chunks/{chunk-NNHNLJ2X.js → chunk-XO24LIZC.js} +240 -42
- package/chunks/{chunk-EL5SXY3T.js → chunk-XT4RKHVE.js} +2 -2
- package/chunks/{chunk-FDGGZIYW.js → chunk-YECDICIO.js} +2 -2
- package/chunks/{chunk-E23IPNGS.js → chunk-YFPZ3NNC.js} +12 -3
- package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
- package/chunks/{chunk-V26NVGAU.js → chunk-YIWH3MKK.js} +8 -3
- package/chunks/{chunk-IWPYVAO2.js → chunk-YXC7JYUI.js} +2 -2
- package/chunks/{chunk-A4MFR4C5.js → chunk-ZIGC3MUS.js} +2 -4
- package/chunks/{chunk-ZZO74WKW.js → chunk-ZXEAEZFN.js} +24 -18
- package/chunks/{computer-use-77C5FHMW.js → computer-use-ABECHPS5.js} +22 -21
- package/chunks/{config-utils-IVHRSXWI.js → config-utils-NJQA5YLJ.js} +2 -2
- package/chunks/{contextCommand-PJ77GBWL.js → contextCommand-4CD5HZQQ.js} +24 -23
- package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-2MOVQ4VX.js} +22 -21
- package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-L6NNHG5N.js} +26 -24
- package/chunks/{cron-create-H7UEPDSN.js → cron-create-NFRZEOQX.js} +2 -2
- package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-GFVSVO7C.js} +2 -2
- package/chunks/{cron-list-H25JIHEZ.js → cron-list-NRW34CLU.js} +2 -2
- package/chunks/{daemon-2KTG7ZBN.js → daemon-XH76IXOC.js} +356 -21
- package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-BLXFEG4Q.js} +24 -23
- package/chunks/{daemon-status-provider-ZDOYJCU6.js → daemon-status-provider-XGD3TPTO.js} +31 -30
- package/chunks/{daemon-trust-policy-E67OYUK2.js → daemon-trust-policy-THEGCWPO.js} +29 -28
- package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-L7L4ACWQ.js} +29 -28
- package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
- package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-YQLHDUGE.js} +22 -21
- package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
- package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
- package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-PCTXNW7N.js} +22 -21
- package/chunks/{edit-I4LQFAEC.js → edit-QX2EGWYW.js} +25 -23
- package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
- package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-EM3ZZ2SB.js} +22 -21
- package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-ESCMVAKB.js} +22 -21
- package/chunks/{environment-S7CTIHMX.js → environment-TOJI56YV.js} +25 -24
- package/chunks/{errors-7HB2AIDS.js → errors-DZ5FWWEM.js} +24 -23
- package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-KUIJ36XA.js} +22 -21
- package/chunks/{exitPlanMode-R4JY7V2O.js → exitPlanMode-NFVY54FV.js} +22 -21
- package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-JLQXJSH6.js} +3 -3
- package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
- package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
- package/chunks/{gemini-RSUFP5OE.js → gemini-I7OT4FWL.js} +62 -61
- package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-GRIS77NJ.js} +3 -3
- package/chunks/{glob-J4RUJAHX.js → glob-7TBUUV6R.js} +22 -21
- package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-K5OHOJ6B.js} +1 -1
- package/chunks/{grep-VJWPLFOT.js → grep-743SYWCZ.js} +22 -21
- package/chunks/{handleAutoUpdate-POCX2MNB.js → handleAutoUpdate-GAOYUYOD.js} +26 -25
- package/chunks/{i18n-RM5YOICI.js → i18n-2ITURYX6.js} +23 -22
- package/chunks/{image-gen-EXECB5XM.js → image-gen-4OIWDZD6.js} +2 -2
- package/chunks/{initializer-Z2AFGBNR.js → initializer-OC7LWA6X.js} +29 -28
- package/chunks/{installationInfo-4I5FXNMH.js → installationInfo-CO47QX3Q.js} +23 -22
- package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
- package/chunks/{list-ZMBFIGZA.js → list-ATR2SFWT.js} +32 -31
- package/chunks/{loadedSettingsAdapter-T6TV4YJ7.js → loadedSettingsAdapter-NK4B7AGK.js} +29 -28
- package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-3WXBU5TQ.js} +12 -10
- package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-HWVUU5CF.js} +3 -3
- package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-4SSBWI2D.js} +23 -22
- package/chunks/{mcp-6UNYX4HG.js → mcp-C62AE2QI.js} +29 -28
- package/chunks/{monitor-EE2UYMGE.js → monitor-FEYEGASA.js} +22 -21
- package/chunks/{nonInteractiveCli-WAY237O4.js → nonInteractiveCli-AJEV5ZWO.js} +59 -57
- package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-SLLTEY4O.js} +26 -24
- package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-WLUGIAPX.js} +12 -11
- package/chunks/{pidfile-4XSFLYBZ.js → pidfile-TV2VWUMB.js} +22 -21
- package/chunks/{processUtils-WDA2MJFD.js → processUtils-3IN2ZR55.js} +2 -2
- package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
- package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-GSGRFPJE.js} +25 -24
- package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-JLSTIS4Z.js} +3 -3
- package/chunks/{read-file-TAFBKMNI.js → read-file-6PZZRGZZ.js} +9 -7
- package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-GLU3UWBV.js} +3 -1
- package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-5GEWKOOO.js} +25 -24
- package/chunks/{ripGrep-WOEK2PXS.js → ripGrep-FX7GBGFN.js} +22 -21
- package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
- package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-7RHU3NSV.js} +49 -40
- package/chunks/{runtime-5MLLZ7DC.js → runtime-EPOXAMLP.js} +32 -31
- package/chunks/{scheduler-RPBJ63CH.js → scheduler-F4Y7ENVV.js} +24 -23
- package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-NC746HLT.js} +2 -2
- package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-YVL7BP6Y.js} +2 -2
- package/chunks/{send-message-VZENRWRH.js → send-message-TNBG5EVA.js} +1 -1
- package/chunks/{serve-HS3XLPXU.js → serve-LQV4TN5A.js} +29 -30
- package/chunks/{server-TC4A7AAZ.js → server-IZCKLIYQ.js} +1267 -165
- package/chunks/{session-UBOFXVMN.js → session-52ZGTDVB.js} +60 -58
- package/chunks/{settings-D5644OM5.js → settings-WCVB34HW.js} +28 -27
- package/chunks/{shell-3PZULQQV.js → shell-33BIUBLH.js} +22 -21
- package/chunks/{skill-PEVVXQ3L.js → skill-IYVQ2QNK.js} +11 -9
- package/chunks/{skill-settings-J65JKKES.js → skill-settings-YG4ZS4OZ.js} +28 -27
- package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-BLA4YT4W.js} +24 -23
- package/chunks/{standalone-update-IFM53PE7.js → standalone-update-ALRIPWSM.js} +24 -23
- package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-PISBXWKA.js} +262 -191
- package/chunks/{task-create-FCBDX7UH.js → task-create-EILHJJB7.js} +4 -4
- package/chunks/{task-list-YIYIUFUA.js → task-list-WGJR6YL5.js} +18 -4
- package/chunks/{task-update-MYPFVOVM.js → task-update-XZAHVXJ5.js} +79 -8
- package/chunks/{team-create-ZAIA7KAV.js → team-create-CIQDCC6A.js} +23 -23
- package/chunks/{team-delete-6UMU4XLS.js → team-delete-UEP4QOOT.js} +3 -3
- package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-664XCRB4.js} +22 -21
- package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-TEBO6ONY.js} +22 -21
- package/chunks/{theme-manager-Z3RIT7DB.js → theme-manager-3CIFH2JV.js} +22 -21
- package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-ATS62CAP.js} +1 -1
- package/chunks/{tool-search-5R2OE4C7.js → tool-search-IJX5JHJB.js} +9 -7
- package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-XBK2NVRV.js} +26 -25
- package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-OOFNLRWK.js} +23 -22
- package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-EIG7EYAQ.js} +5 -5
- package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-KYDCBLSF.js} +25 -24
- package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-RFX3KNBN.js} +31 -30
- package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-MZXSAITU.js} +56 -54
- package/chunks/{version-G5A5DGVS.js → version-PJC6ZNXV.js} +1 -1
- package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-XXICVGKQ.js} +11 -8
- package/chunks/{web-search-5OXHEZPV.js → web-search-LHPM6QWC.js} +2 -2
- package/chunks/{workflow-ISQJHPG2.js → workflow-4CUO2BV7.js} +139 -37
- package/chunks/{workspace-providers-status-2ZPZPUPZ.js → workspace-providers-status-G4MUGH3X.js} +32 -31
- package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-QMDMFWBE.js} +1 -1
- package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-FKBB4MZK.js} +26 -25
- package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-TIDTTA65.js} +33 -32
- package/chunks/{workspace-skills-status-RS4O7AIJ.js → workspace-skills-status-LBC2TZKM.js} +30 -29
- package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-4KJ567XP.js} +33 -32
- package/chunks/{write-file-EWXKVVXF.js → write-file-R6LAEER5.js} +22 -21
- package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
- package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
- package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-XLCK6DDK.js} +14 -11
- package/cli.js +13 -13
- package/locales/ca.js +13 -0
- package/locales/de.js +12 -0
- package/locales/en.js +11 -0
- package/locales/fr.js +13 -0
- package/locales/ja.js +13 -0
- package/locales/pt.js +12 -0
- package/locales/ru.js +12 -0
- package/locales/zh-TW.js +11 -0
- package/locales/zh.js +11 -0
- package/package.json +3 -3
- package/web-shell/assets/{arc-CgOpDKvm.js → arc-DItbX0DI.js} +1 -1
- package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-CmnIlH8y.js} +1 -1
- package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-pObnB9kw.js} +1 -1
- package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-BNBmMS0Y.js} +1 -1
- package/web-shell/assets/channel-hZnMfWA9.js +1 -0
- package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-Dz4JBOO6.js} +1 -1
- package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-Cz2GnvAR.js} +1 -1
- package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-CC6kOQYx.js} +1 -1
- package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-Z4lY4gbh.js} +1 -1
- package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-Yz0hZr3D.js} +1 -1
- package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-nKmTWTv9.js} +1 -1
- package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-CjZz0f6Y.js} +1 -1
- package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-Bab3FpuS.js} +1 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-BRnxm8DX.js +1 -0
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-BRnxm8DX.js +1 -0
- package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-BuSAGFox.js} +1 -1
- package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-CRZXTg3g.js} +1 -1
- package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-BFx1Ayrz.js} +1 -1
- package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-B2hMZ3gS.js} +1 -1
- package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-DKxAQLmc.js} +1 -1
- package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-Bo1xGqVY.js} +1 -1
- package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-B9NG78d-.js} +1 -1
- package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-DltQKiqQ.js} +1 -1
- package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-5xXGmS4I.js} +1 -1
- package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-bhGL5n0l.js} +1 -1
- package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-ZYnz9hgh.js} +1 -1
- package/web-shell/assets/{index-d0yfnV1M.js → index-CBBeUArD.js} +1 -1
- package/web-shell/assets/index-CbgU-jUo.css +5 -0
- package/web-shell/assets/index-_nhzXqab.js +1750 -0
- package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-Cg-jamQf.js} +1 -1
- package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CcmvKlyq.js} +1 -1
- package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-BRsOQZp1.js} +1 -1
- package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-xW-dmEHK.js} +1 -1
- package/web-shell/assets/{linear-DQmzxpxd.js → linear-ClBfEZH2.js} +1 -1
- package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-D65NDkzc.js} +5 -5
- package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-CyvFslYa.js} +1 -1
- package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-BwSefMyG.js} +1 -1
- package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-GqBJspFS.js} +1 -1
- package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-B137PlTJ.js} +1 -1
- package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-maHkkt8i.js} +1 -1
- package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-DJ1mRaG3.js} +1 -1
- package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-aRmP7Q4i.js} +1 -1
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-Db39gvZ_.js +1 -0
- package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-CIQ3BRPA.js} +1 -1
- package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-DR9VPd5h.js} +1 -1
- package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-ZcfIbT4D.js} +1 -1
- package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-D0jgPi4T.js} +1 -1
- package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-BGWU4s5o.js} +1 -1
- package/web-shell/index.html +2 -2
- package/chunks/chunk-MPHPFVKK.js +0 -48
- package/chunks/chunk-RLKC46YT.js +0 -3582
- package/chunks/chunk-UPDOZBWO.js +0 -358
- package/web-shell/assets/channel-BrGVBa2L.js +0 -1
- package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
- package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
- package/web-shell/assets/index-CIDsgxTe.js +0 -1792
- package/web-shell/assets/index-DiQnWi_E.css +0 -5
- package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
- /package/chunks/{chunk-NTTBXH7U.js → chunk-UGK4K2N2.js} +0 -0
|
@@ -0,0 +1,757 @@
|
|
|
1
|
+
// Force strict mode and setup for ESM
|
|
2
|
+
"use strict";
|
|
3
|
+
import {
|
|
4
|
+
isWithinRoot
|
|
5
|
+
} from "./chunk-3PWCMXIR.js";
|
|
6
|
+
import {
|
|
7
|
+
BaseDeclarativeTool,
|
|
8
|
+
BaseToolInvocation,
|
|
9
|
+
ToolDisplayNames,
|
|
10
|
+
ToolNames
|
|
11
|
+
} from "./chunk-6HY6IF3Z.js";
|
|
12
|
+
import {
|
|
13
|
+
isNodeError
|
|
14
|
+
} from "./chunk-BUQDLC2G.js";
|
|
15
|
+
import {
|
|
16
|
+
init_esbuild_shims
|
|
17
|
+
} from "./chunk-5O2XNYP6.js";
|
|
18
|
+
import {
|
|
19
|
+
__name
|
|
20
|
+
} from "./chunk-J2S4EL5Y.js";
|
|
21
|
+
|
|
22
|
+
// packages/core/src/tools/record-artifact.ts
|
|
23
|
+
init_esbuild_shims();
|
|
24
|
+
import { lstatSync, readlinkSync, realpathSync } from "node:fs";
|
|
25
|
+
import fs from "node:fs/promises";
|
|
26
|
+
import path2 from "node:path";
|
|
27
|
+
|
|
28
|
+
// packages/core/src/utils/workspace-artifact-path.ts
|
|
29
|
+
init_esbuild_shims();
|
|
30
|
+
import path from "node:path";
|
|
31
|
+
var WORKTREE_DIR_RE = /^(.*)[\\/]\.qwen[\\/]worktrees[\\/][^\\/]+$/;
|
|
32
|
+
function resolveBoundWorkspaceRoot(targetDir) {
|
|
33
|
+
const resolved = path.resolve(targetDir);
|
|
34
|
+
const match = resolved.match(WORKTREE_DIR_RE);
|
|
35
|
+
if (!match) {
|
|
36
|
+
return resolved;
|
|
37
|
+
}
|
|
38
|
+
const base = match[1];
|
|
39
|
+
if (!base) {
|
|
40
|
+
return path.parse(resolved).root;
|
|
41
|
+
}
|
|
42
|
+
if (/^[A-Za-z]:$/.test(base)) {
|
|
43
|
+
return `${base}${path.sep}`;
|
|
44
|
+
}
|
|
45
|
+
return base;
|
|
46
|
+
}
|
|
47
|
+
__name(resolveBoundWorkspaceRoot, "resolveBoundWorkspaceRoot");
|
|
48
|
+
function toCanonicalWorkspaceArtifactPath(absoluteFilePath, targetDir) {
|
|
49
|
+
const baseDir = resolveBoundWorkspaceRoot(targetDir);
|
|
50
|
+
const relativePath = path.relative(baseDir, path.resolve(absoluteFilePath));
|
|
51
|
+
if (!relativePath || relativePath === ".." || relativePath.startsWith(`..${path.sep}`) || path.isAbsolute(relativePath)) {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
54
|
+
return relativePath.split(path.sep).join("/");
|
|
55
|
+
}
|
|
56
|
+
__name(toCanonicalWorkspaceArtifactPath, "toCanonicalWorkspaceArtifactPath");
|
|
57
|
+
|
|
58
|
+
// packages/core/src/tools/record-artifact.ts
|
|
59
|
+
var DESCRIPTION = `Registers a session artifact so clients can show it in an artifacts panel. Use it after creating a useful file, URL, image, report, notebook, or other intermediate result that the user may want to open later, unless the producing tool already returned artifact metadata. For example, write_file automatically records HTML, image, PDF, notebook, CSV, and Excel files it writes inside the workspace, so do not call record_artifact again for the same workspacePath; still call it for other formats such as Markdown, JSON, and plain text, and for files produced outside write_file. When the session creates a remote resource, such as a pull request, issue, or comment submitted via gh, record its URL with kind "link" and the url locator so the user can reopen it later.
|
|
60
|
+
|
|
61
|
+
Provide exactly one locator: workspacePath, managedId, or url. Do not use the old "path" field. Use the Artifact tool, not record_artifact, for published interactive HTML artifacts.
|
|
62
|
+
|
|
63
|
+
For workspace files, workspacePath must be relative to the current execution directory (for example "report.csv" or "reports/summary.html") or an absolute path inside the bound workspace. Do not add workspace folder prefixes such as "w/agent/", and do not use ".." to walk up from a worktree. This tool resolves the file, verifies it exists as a regular file inside the workspace, then stores a workspace-root-relative canonical workspacePath. A successful result includes status=available, the canonical workspacePath, and resolvedPath. If verification fails, the tool returns an error \u2014 do not tell the user the artifact can be opened or downloaded.`;
|
|
64
|
+
var ARTIFACT_TITLE_MAX_LENGTH = 200;
|
|
65
|
+
var ARTIFACT_WORKSPACE_PATH_MAX_LENGTH = 500;
|
|
66
|
+
var WORKSPACE_PATH_HINT = '"workspacePath" must be relative to the current execution directory (for example "report.csv") or an absolute path inside the workspace. Do not add workspace folder prefixes such as "w/agent/".';
|
|
67
|
+
var RecordArtifactInvocation = class extends BaseToolInvocation {
|
|
68
|
+
constructor(params, config) {
|
|
69
|
+
super(params);
|
|
70
|
+
this.config = config;
|
|
71
|
+
}
|
|
72
|
+
static {
|
|
73
|
+
__name(this, "RecordArtifactInvocation");
|
|
74
|
+
}
|
|
75
|
+
getDescription() {
|
|
76
|
+
return `Recording artifact ${this.params.title}`;
|
|
77
|
+
}
|
|
78
|
+
async execute(_signal) {
|
|
79
|
+
const workspacePathInput = trimOptional(this.params.workspacePath);
|
|
80
|
+
if (workspacePathInput) {
|
|
81
|
+
const locator = await resolveWorkspaceArtifactLocator(
|
|
82
|
+
workspacePathInput,
|
|
83
|
+
this.config
|
|
84
|
+
);
|
|
85
|
+
if (!locator.ok) {
|
|
86
|
+
return {
|
|
87
|
+
llmContent: locator.message,
|
|
88
|
+
returnDisplay: locator.message,
|
|
89
|
+
error: {
|
|
90
|
+
message: locator.message,
|
|
91
|
+
type: locator.type
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
}
|
|
95
|
+
const artifact2 = {
|
|
96
|
+
title: this.params.title.trim(),
|
|
97
|
+
kind: this.params.kind,
|
|
98
|
+
storage: "workspace",
|
|
99
|
+
description: trimOptional(this.params.description),
|
|
100
|
+
workspacePath: locator.workspacePath,
|
|
101
|
+
mimeType: trimOptional(this.params.mimeType),
|
|
102
|
+
sizeBytes: this.params.sizeBytes ?? locator.sizeBytes,
|
|
103
|
+
metadata: this.params.metadata
|
|
104
|
+
};
|
|
105
|
+
return {
|
|
106
|
+
llmContent: formatWorkspaceSuccess(artifact2.title, locator),
|
|
107
|
+
returnDisplay: formatWorkspaceSuccess(artifact2.title, locator),
|
|
108
|
+
artifacts: [artifact2]
|
|
109
|
+
};
|
|
110
|
+
}
|
|
111
|
+
const artifact = {
|
|
112
|
+
title: this.params.title.trim(),
|
|
113
|
+
kind: this.params.kind,
|
|
114
|
+
storage: this.params.storage ?? inferStorage(this.params),
|
|
115
|
+
description: trimOptional(this.params.description),
|
|
116
|
+
managedId: trimOptional(this.params.managedId),
|
|
117
|
+
url: trimOptional(this.params.url),
|
|
118
|
+
mimeType: trimOptional(this.params.mimeType),
|
|
119
|
+
sizeBytes: this.params.sizeBytes,
|
|
120
|
+
metadata: this.params.metadata
|
|
121
|
+
};
|
|
122
|
+
return {
|
|
123
|
+
llmContent: `Recorded artifact "${artifact.title}".`,
|
|
124
|
+
returnDisplay: `Recorded artifact **${artifact.title}**.`,
|
|
125
|
+
artifacts: [artifact]
|
|
126
|
+
};
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
var RecordArtifactTool = class _RecordArtifactTool extends BaseDeclarativeTool {
|
|
130
|
+
constructor(config) {
|
|
131
|
+
super(
|
|
132
|
+
_RecordArtifactTool.Name,
|
|
133
|
+
ToolDisplayNames.RECORD_ARTIFACT,
|
|
134
|
+
DESCRIPTION,
|
|
135
|
+
"other" /* Other */,
|
|
136
|
+
{
|
|
137
|
+
type: "object",
|
|
138
|
+
additionalProperties: false,
|
|
139
|
+
properties: {
|
|
140
|
+
title: {
|
|
141
|
+
type: "string",
|
|
142
|
+
description: "Concise title shown in the client artifact list."
|
|
143
|
+
},
|
|
144
|
+
kind: {
|
|
145
|
+
type: "string",
|
|
146
|
+
enum: [
|
|
147
|
+
"file",
|
|
148
|
+
"link",
|
|
149
|
+
"html",
|
|
150
|
+
"image",
|
|
151
|
+
"video",
|
|
152
|
+
"audio",
|
|
153
|
+
"pdf",
|
|
154
|
+
"notebook",
|
|
155
|
+
"other"
|
|
156
|
+
],
|
|
157
|
+
description: "Best-effort artifact type for client rendering."
|
|
158
|
+
},
|
|
159
|
+
storage: {
|
|
160
|
+
type: "string",
|
|
161
|
+
enum: ["workspace", "external_url", "managed"],
|
|
162
|
+
description: "Storage class. Omit it to infer from the provided locator."
|
|
163
|
+
},
|
|
164
|
+
description: {
|
|
165
|
+
type: "string",
|
|
166
|
+
description: "Optional short description for the user."
|
|
167
|
+
},
|
|
168
|
+
workspacePath: {
|
|
169
|
+
type: "string",
|
|
170
|
+
description: "Path relative to the current execution directory, or an absolute path inside the bound workspace. The tool verifies the file and stores a workspace-root-relative canonical path."
|
|
171
|
+
},
|
|
172
|
+
managedId: {
|
|
173
|
+
type: "string",
|
|
174
|
+
description: "Opaque identifier for a resource managed by an extension or tool."
|
|
175
|
+
},
|
|
176
|
+
url: {
|
|
177
|
+
type: "string",
|
|
178
|
+
description: "HTTP or HTTPS URL that the user can open for details."
|
|
179
|
+
},
|
|
180
|
+
mimeType: {
|
|
181
|
+
type: "string",
|
|
182
|
+
description: "Optional MIME type."
|
|
183
|
+
},
|
|
184
|
+
sizeBytes: {
|
|
185
|
+
type: "integer",
|
|
186
|
+
minimum: 0,
|
|
187
|
+
description: "Optional size in bytes."
|
|
188
|
+
},
|
|
189
|
+
metadata: {
|
|
190
|
+
type: "object",
|
|
191
|
+
additionalProperties: {
|
|
192
|
+
anyOf: [
|
|
193
|
+
{ type: "string" },
|
|
194
|
+
{ type: "number" },
|
|
195
|
+
{ type: "boolean" },
|
|
196
|
+
{ type: "null" }
|
|
197
|
+
]
|
|
198
|
+
},
|
|
199
|
+
description: "Small primitive metadata bag for client-specific display hints."
|
|
200
|
+
}
|
|
201
|
+
},
|
|
202
|
+
required: ["title"]
|
|
203
|
+
},
|
|
204
|
+
true,
|
|
205
|
+
false,
|
|
206
|
+
true,
|
|
207
|
+
false,
|
|
208
|
+
"artifact url link file image report notebook dashboard"
|
|
209
|
+
);
|
|
210
|
+
this.config = config;
|
|
211
|
+
}
|
|
212
|
+
static {
|
|
213
|
+
__name(this, "RecordArtifactTool");
|
|
214
|
+
}
|
|
215
|
+
static Name = ToolNames.RECORD_ARTIFACT;
|
|
216
|
+
validateToolParams(params) {
|
|
217
|
+
if (hasLegacyPathField(params)) {
|
|
218
|
+
return '"path" is not supported; use "workspacePath" for a file in the current execution directory (relative to that directory, or an absolute path inside the workspace). Example: "report.csv".';
|
|
219
|
+
}
|
|
220
|
+
return super.validateToolParams(params);
|
|
221
|
+
}
|
|
222
|
+
validateToolParamValues(params) {
|
|
223
|
+
params.title = (params.title ?? "").trim();
|
|
224
|
+
const titleError = validateString(
|
|
225
|
+
params.title,
|
|
226
|
+
"title",
|
|
227
|
+
ARTIFACT_TITLE_MAX_LENGTH,
|
|
228
|
+
true
|
|
229
|
+
);
|
|
230
|
+
if (titleError) {
|
|
231
|
+
return titleError;
|
|
232
|
+
}
|
|
233
|
+
const descriptionError = validateString(
|
|
234
|
+
params.description,
|
|
235
|
+
"description",
|
|
236
|
+
1e3,
|
|
237
|
+
false
|
|
238
|
+
);
|
|
239
|
+
if (descriptionError) {
|
|
240
|
+
return descriptionError;
|
|
241
|
+
}
|
|
242
|
+
const mimeTypeError = validateString(
|
|
243
|
+
params.mimeType,
|
|
244
|
+
"mimeType",
|
|
245
|
+
120,
|
|
246
|
+
false
|
|
247
|
+
);
|
|
248
|
+
if (mimeTypeError) {
|
|
249
|
+
return mimeTypeError;
|
|
250
|
+
}
|
|
251
|
+
if (params.kind && !isArtifactKind(params.kind)) {
|
|
252
|
+
return '"kind" must be a supported artifact kind';
|
|
253
|
+
}
|
|
254
|
+
if (params.storage && params.storage !== "workspace" && params.storage !== "external_url" && params.storage !== "managed") {
|
|
255
|
+
return '"storage" must be workspace, external_url, or managed';
|
|
256
|
+
}
|
|
257
|
+
const locators = [
|
|
258
|
+
trimOptional(params.workspacePath),
|
|
259
|
+
trimOptional(params.managedId),
|
|
260
|
+
trimOptional(params.url)
|
|
261
|
+
].filter(Boolean);
|
|
262
|
+
if (locators.length !== 1) {
|
|
263
|
+
return 'Provide exactly one of "workspacePath", "managedId", or "url"';
|
|
264
|
+
}
|
|
265
|
+
const inferredStorage = inferStorage(params);
|
|
266
|
+
if (params.storage && params.storage !== inferredStorage) {
|
|
267
|
+
return `"storage" must be "${inferredStorage}" for the provided locator`;
|
|
268
|
+
}
|
|
269
|
+
if (params.workspacePath) {
|
|
270
|
+
const workspacePathError = validateWorkspacePath(
|
|
271
|
+
params.workspacePath,
|
|
272
|
+
this.config.getTargetDir()
|
|
273
|
+
);
|
|
274
|
+
if (workspacePathError) {
|
|
275
|
+
return workspacePathError;
|
|
276
|
+
}
|
|
277
|
+
}
|
|
278
|
+
if (params.managedId) {
|
|
279
|
+
const managedIdError = validateManagedId(params.managedId);
|
|
280
|
+
if (managedIdError) {
|
|
281
|
+
return managedIdError;
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
if (params.url) {
|
|
285
|
+
try {
|
|
286
|
+
const parsed = new URL(params.url);
|
|
287
|
+
if (parsed.username || parsed.password) {
|
|
288
|
+
return '"url" must not include credentials';
|
|
289
|
+
}
|
|
290
|
+
if (parsed.protocol !== "http:" && parsed.protocol !== "https:") {
|
|
291
|
+
return '"url" must use http or https';
|
|
292
|
+
}
|
|
293
|
+
} catch {
|
|
294
|
+
return '"url" must be a valid URL';
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
if (params.sizeBytes !== void 0 && (!Number.isSafeInteger(params.sizeBytes) || params.sizeBytes < 0)) {
|
|
298
|
+
return '"sizeBytes" must be a non-negative safe integer';
|
|
299
|
+
}
|
|
300
|
+
const metadataError = validateMetadata(params.metadata);
|
|
301
|
+
if (metadataError) {
|
|
302
|
+
return metadataError;
|
|
303
|
+
}
|
|
304
|
+
return null;
|
|
305
|
+
}
|
|
306
|
+
createInvocation(params) {
|
|
307
|
+
return new RecordArtifactInvocation(params, this.config);
|
|
308
|
+
}
|
|
309
|
+
};
|
|
310
|
+
function inferStorage(params) {
|
|
311
|
+
if (trimOptional(params.workspacePath)) {
|
|
312
|
+
return "workspace";
|
|
313
|
+
}
|
|
314
|
+
if (trimOptional(params.managedId)) {
|
|
315
|
+
return "managed";
|
|
316
|
+
}
|
|
317
|
+
return "external_url";
|
|
318
|
+
}
|
|
319
|
+
__name(inferStorage, "inferStorage");
|
|
320
|
+
function trimOptional(value) {
|
|
321
|
+
const trimmed = value?.trim();
|
|
322
|
+
return trimmed ? trimmed : void 0;
|
|
323
|
+
}
|
|
324
|
+
__name(trimOptional, "trimOptional");
|
|
325
|
+
function validateString(value, field, maxLength, required) {
|
|
326
|
+
const trimmed = value?.trim();
|
|
327
|
+
if (!trimmed) {
|
|
328
|
+
return required ? `Missing or empty "${field}"` : null;
|
|
329
|
+
}
|
|
330
|
+
if (trimmed.length > maxLength) {
|
|
331
|
+
return `"${field}" exceeds ${maxLength} characters`;
|
|
332
|
+
}
|
|
333
|
+
if (hasControlCharacter(trimmed, field === "description")) {
|
|
334
|
+
return `"${field}" contains control characters`;
|
|
335
|
+
}
|
|
336
|
+
if (isDisplayField(field) && hasUnsafeDisplayPayload(trimmed)) {
|
|
337
|
+
return `"${field}" contains unsafe markup`;
|
|
338
|
+
}
|
|
339
|
+
return null;
|
|
340
|
+
}
|
|
341
|
+
__name(validateString, "validateString");
|
|
342
|
+
function validateManagedId(value) {
|
|
343
|
+
const trimmed = value.trim();
|
|
344
|
+
const stringError = validateString(trimmed, "managedId", 200, true);
|
|
345
|
+
if (stringError) {
|
|
346
|
+
return stringError;
|
|
347
|
+
}
|
|
348
|
+
if (trimmed.includes("/") || trimmed.includes("\\") || trimmed.includes("..") || path2.isAbsolute(trimmed) || path2.win32.isAbsolute(trimmed)) {
|
|
349
|
+
return '"managedId" must be an opaque managed resource id';
|
|
350
|
+
}
|
|
351
|
+
return null;
|
|
352
|
+
}
|
|
353
|
+
__name(validateManagedId, "validateManagedId");
|
|
354
|
+
function isDisplayField(field) {
|
|
355
|
+
return field === "title" || field === "description" || field === "mimeType" || field === "workspacePath" || field === "managedId";
|
|
356
|
+
}
|
|
357
|
+
__name(isDisplayField, "isDisplayField");
|
|
358
|
+
function hasControlCharacter(value, allowLineWhitespace = false) {
|
|
359
|
+
for (let i = 0; i < value.length; i++) {
|
|
360
|
+
const code = value.charCodeAt(i);
|
|
361
|
+
if (allowLineWhitespace && (code === 9 || code === 10 || code === 13)) {
|
|
362
|
+
continue;
|
|
363
|
+
}
|
|
364
|
+
if (code <= 31 || code === 127 || code >= 8203 && code <= 8207 || code === 8232 || code === 8233 || code >= 8234 && code <= 8238 || code >= 8294 && code <= 8297 || code === 65279) {
|
|
365
|
+
return true;
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
return false;
|
|
369
|
+
}
|
|
370
|
+
__name(hasControlCharacter, "hasControlCharacter");
|
|
371
|
+
function hasUnsafeDisplayPayload(value) {
|
|
372
|
+
return /<\s*\/?[a-z!]|&(?:#[0-9]+|#x[0-9a-f]+|[a-z][a-z0-9]+);|javascript\s*:|data\s*:\s*(?:text\/(?:html|javascript)|application\/javascript|image\/svg\+xml)/i.test(
|
|
373
|
+
value
|
|
374
|
+
) || /(?:^|[\s"'`<])on[a-z][a-z0-9-]*\s*=/i.test(value);
|
|
375
|
+
}
|
|
376
|
+
__name(hasUnsafeDisplayPayload, "hasUnsafeDisplayPayload");
|
|
377
|
+
function validateWorkspacePath(value, cwd) {
|
|
378
|
+
const trimmed = value.trim();
|
|
379
|
+
if (!trimmed) {
|
|
380
|
+
return 'Missing or empty "workspacePath"';
|
|
381
|
+
}
|
|
382
|
+
if (hasControlCharacter(trimmed) || hasUnsafeDisplayPayload(trimmed)) {
|
|
383
|
+
return hasControlCharacter(trimmed) ? '"workspacePath" contains control characters' : '"workspacePath" contains unsafe markup';
|
|
384
|
+
}
|
|
385
|
+
if (isRedirectorRoutedPath(trimmed) || isForeignWindowsAbsolute(trimmed)) {
|
|
386
|
+
return WORKSPACE_PATH_HINT;
|
|
387
|
+
}
|
|
388
|
+
if (isAbsoluteWorkspaceInput(trimmed)) {
|
|
389
|
+
if (trimmed.length > 4096) {
|
|
390
|
+
return '"workspacePath" exceeds 4096 characters';
|
|
391
|
+
}
|
|
392
|
+
const root = resolveBoundWorkspaceRoot(
|
|
393
|
+
tryResolveForContainment(path2.resolve(cwd)) ?? path2.resolve(cwd)
|
|
394
|
+
);
|
|
395
|
+
const comparable = tryResolveForContainment(path2.resolve(trimmed));
|
|
396
|
+
if (comparable && !isWithinRoot(comparable, root)) {
|
|
397
|
+
return '"workspacePath" must stay inside the workspace';
|
|
398
|
+
}
|
|
399
|
+
return null;
|
|
400
|
+
}
|
|
401
|
+
if (trimmed.length > ARTIFACT_WORKSPACE_PATH_MAX_LENGTH) {
|
|
402
|
+
return `"workspacePath" exceeds ${ARTIFACT_WORKSPACE_PATH_MAX_LENGTH} characters`;
|
|
403
|
+
}
|
|
404
|
+
const portableNormalized = path2.posix.normalize(trimmed.replace(/\\/g, "/"));
|
|
405
|
+
if (portableNormalized === ".." || portableNormalized.startsWith("../") || path2.posix.isAbsolute(portableNormalized)) {
|
|
406
|
+
return '"workspacePath" must stay inside the current execution directory';
|
|
407
|
+
}
|
|
408
|
+
return null;
|
|
409
|
+
}
|
|
410
|
+
__name(validateWorkspacePath, "validateWorkspacePath");
|
|
411
|
+
function validateMetadata(metadata) {
|
|
412
|
+
if (metadata === void 0) {
|
|
413
|
+
return null;
|
|
414
|
+
}
|
|
415
|
+
if (typeof metadata !== "object" || metadata === null || Array.isArray(metadata)) {
|
|
416
|
+
return '"metadata" must be an object';
|
|
417
|
+
}
|
|
418
|
+
for (const [key, value] of Object.entries(metadata)) {
|
|
419
|
+
if (!key) {
|
|
420
|
+
return '"metadata" keys must not be empty';
|
|
421
|
+
}
|
|
422
|
+
if (key.length > 120) {
|
|
423
|
+
return '"metadata" keys must be 120 characters or fewer';
|
|
424
|
+
}
|
|
425
|
+
if (hasControlCharacter(key) || hasUnsafeDisplayPayload(key)) {
|
|
426
|
+
return '"metadata" keys contain unsafe content';
|
|
427
|
+
}
|
|
428
|
+
if (value !== null && typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
429
|
+
return '"metadata" values must be primitive';
|
|
430
|
+
}
|
|
431
|
+
if (typeof value === "number" && !Number.isFinite(value)) {
|
|
432
|
+
return '"metadata" numbers must be finite';
|
|
433
|
+
}
|
|
434
|
+
if (typeof value === "string" && (hasControlCharacter(value) || hasUnsafeDisplayPayload(value))) {
|
|
435
|
+
return '"metadata" string values contain unsafe content';
|
|
436
|
+
}
|
|
437
|
+
}
|
|
438
|
+
if (Buffer.byteLength(JSON.stringify(metadata), "utf8") > 4096) {
|
|
439
|
+
return '"metadata" must be 4096 bytes or fewer';
|
|
440
|
+
}
|
|
441
|
+
return null;
|
|
442
|
+
}
|
|
443
|
+
__name(validateMetadata, "validateMetadata");
|
|
444
|
+
function isArtifactKind(kind) {
|
|
445
|
+
return kind === "file" || kind === "link" || kind === "html" || kind === "image" || kind === "video" || kind === "audio" || kind === "pdf" || kind === "notebook" || kind === "other";
|
|
446
|
+
}
|
|
447
|
+
__name(isArtifactKind, "isArtifactKind");
|
|
448
|
+
function hasLegacyPathField(params) {
|
|
449
|
+
const raw = params;
|
|
450
|
+
return Object.prototype.hasOwnProperty.call(raw, "path") && raw.path != null && raw.path !== "";
|
|
451
|
+
}
|
|
452
|
+
__name(hasLegacyPathField, "hasLegacyPathField");
|
|
453
|
+
function isRedirectorRoutedPath(value) {
|
|
454
|
+
const slashes = value.replace(/\//g, "\\").replace(/^\\\?\?\\/, "\\\\?\\");
|
|
455
|
+
if (/\\Device\\Mup\\/i.test(slashes)) {
|
|
456
|
+
return true;
|
|
457
|
+
}
|
|
458
|
+
const posixDoubleSlash = process.platform !== "win32" && !value.includes("\\") && /^\/\//.test(value);
|
|
459
|
+
if (!posixDoubleSlash && (/^\\\\[^\\?]+(?:\\|$)/.test(slashes) || /^\\\\\?\\[Uu][Nn][Cc]\\/.test(slashes))) {
|
|
460
|
+
return true;
|
|
461
|
+
}
|
|
462
|
+
return /^\\\\\?\\/.test(slashes) && !/^\\\\\?\\[A-Za-z]:\\/.test(slashes);
|
|
463
|
+
}
|
|
464
|
+
__name(isRedirectorRoutedPath, "isRedirectorRoutedPath");
|
|
465
|
+
function isForeignWindowsAbsolute(value) {
|
|
466
|
+
if (process.platform === "win32") {
|
|
467
|
+
return false;
|
|
468
|
+
}
|
|
469
|
+
return /^[A-Za-z]:/.test(value) || value.startsWith("\\");
|
|
470
|
+
}
|
|
471
|
+
__name(isForeignWindowsAbsolute, "isForeignWindowsAbsolute");
|
|
472
|
+
function isAbsoluteWorkspaceInput(value) {
|
|
473
|
+
return path2.isAbsolute(value) || process.platform === "win32" && path2.win32.isAbsolute(value);
|
|
474
|
+
}
|
|
475
|
+
__name(isAbsoluteWorkspaceInput, "isAbsoluteWorkspaceInput");
|
|
476
|
+
function formatWorkspaceSuccess(title, locator) {
|
|
477
|
+
return [
|
|
478
|
+
`Recorded artifact "${title}".`,
|
|
479
|
+
"status: available",
|
|
480
|
+
`workspacePath: ${locator.workspacePath}`,
|
|
481
|
+
`resolvedPath: ${locator.resolvedPath}`
|
|
482
|
+
].join("\n");
|
|
483
|
+
}
|
|
484
|
+
__name(formatWorkspaceSuccess, "formatWorkspaceSuccess");
|
|
485
|
+
function locatorFailure(type, message) {
|
|
486
|
+
return { ok: false, type, message };
|
|
487
|
+
}
|
|
488
|
+
__name(locatorFailure, "locatorFailure");
|
|
489
|
+
async function resolveExistingDir(dir) {
|
|
490
|
+
const resolved = path2.resolve(dir);
|
|
491
|
+
try {
|
|
492
|
+
return await fs.realpath(resolved);
|
|
493
|
+
} catch {
|
|
494
|
+
return resolved;
|
|
495
|
+
}
|
|
496
|
+
}
|
|
497
|
+
__name(resolveExistingDir, "resolveExistingDir");
|
|
498
|
+
function tryResolveForContainment(absolutePath) {
|
|
499
|
+
const resolved = path2.resolve(absolutePath);
|
|
500
|
+
if (pathHasRedirectorHop(resolved)) {
|
|
501
|
+
return void 0;
|
|
502
|
+
}
|
|
503
|
+
try {
|
|
504
|
+
return realpathSync(resolved);
|
|
505
|
+
} catch {
|
|
506
|
+
try {
|
|
507
|
+
const parent = path2.dirname(resolved);
|
|
508
|
+
if (pathHasRedirectorHop(parent)) {
|
|
509
|
+
return void 0;
|
|
510
|
+
}
|
|
511
|
+
return path2.join(realpathSync(parent), path2.basename(resolved));
|
|
512
|
+
} catch {
|
|
513
|
+
return void 0;
|
|
514
|
+
}
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
__name(tryResolveForContainment, "tryResolveForContainment");
|
|
518
|
+
var REDIRECTOR_HOP_LIMIT = 8;
|
|
519
|
+
function pathHasRedirectorHop(absolutePath) {
|
|
520
|
+
if (isRedirectorRoutedPath(absolutePath)) {
|
|
521
|
+
return true;
|
|
522
|
+
}
|
|
523
|
+
const resolved = path2.resolve(absolutePath);
|
|
524
|
+
const root = path2.parse(resolved).root;
|
|
525
|
+
const relative = path2.relative(root, resolved);
|
|
526
|
+
if (!relative || relative.startsWith("..")) {
|
|
527
|
+
return symlinkChainHitsRedirector(resolved);
|
|
528
|
+
}
|
|
529
|
+
let acc = root;
|
|
530
|
+
for (const segment of relative.split(path2.sep).filter(Boolean)) {
|
|
531
|
+
acc = path2.join(acc, segment);
|
|
532
|
+
if (isRedirectorRoutedPath(acc) || symlinkChainHitsRedirector(acc)) {
|
|
533
|
+
return true;
|
|
534
|
+
}
|
|
535
|
+
}
|
|
536
|
+
return false;
|
|
537
|
+
}
|
|
538
|
+
__name(pathHasRedirectorHop, "pathHasRedirectorHop");
|
|
539
|
+
function symlinkChainHitsRedirector(absolutePath) {
|
|
540
|
+
let current = absolutePath;
|
|
541
|
+
for (let hop = 0; hop < REDIRECTOR_HOP_LIMIT; hop++) {
|
|
542
|
+
let lst;
|
|
543
|
+
try {
|
|
544
|
+
lst = lstatSync(current);
|
|
545
|
+
} catch {
|
|
546
|
+
return false;
|
|
547
|
+
}
|
|
548
|
+
if (!lst.isSymbolicLink()) {
|
|
549
|
+
return false;
|
|
550
|
+
}
|
|
551
|
+
let target;
|
|
552
|
+
try {
|
|
553
|
+
target = readlinkSync(current);
|
|
554
|
+
} catch {
|
|
555
|
+
return false;
|
|
556
|
+
}
|
|
557
|
+
if (isRedirectorRoutedPath(target)) {
|
|
558
|
+
return true;
|
|
559
|
+
}
|
|
560
|
+
const next = path2.isAbsolute(target) ? target : path2.resolve(path2.dirname(current), target);
|
|
561
|
+
if (isRedirectorRoutedPath(next)) {
|
|
562
|
+
return true;
|
|
563
|
+
}
|
|
564
|
+
current = next;
|
|
565
|
+
}
|
|
566
|
+
return false;
|
|
567
|
+
}
|
|
568
|
+
__name(symlinkChainHitsRedirector, "symlinkChainHitsRedirector");
|
|
569
|
+
async function resolveWorkspaceArtifactLocator(rawPath, config) {
|
|
570
|
+
const cwd = await resolveExistingDir(config.getTargetDir());
|
|
571
|
+
const root = await resolveExistingDir(resolveBoundWorkspaceRoot(cwd));
|
|
572
|
+
const first = workspacePathCandidate(rawPath, cwd, root, true);
|
|
573
|
+
if (!first.ok) {
|
|
574
|
+
return first;
|
|
575
|
+
}
|
|
576
|
+
const inspected = await inspectWorkspaceCandidate(
|
|
577
|
+
first.path,
|
|
578
|
+
rawPath,
|
|
579
|
+
cwd,
|
|
580
|
+
root
|
|
581
|
+
);
|
|
582
|
+
if (inspected.ok || inspected.type !== "file_not_found" /* FILE_NOT_FOUND */ || process.platform === "win32" || !rawPath.includes("\\")) {
|
|
583
|
+
return inspected;
|
|
584
|
+
}
|
|
585
|
+
const fallback = workspacePathCandidate(rawPath, cwd, root, false);
|
|
586
|
+
if (!fallback.ok || fallback.path === first.path) {
|
|
587
|
+
return inspected;
|
|
588
|
+
}
|
|
589
|
+
return inspectWorkspaceCandidate(fallback.path, rawPath, cwd, root);
|
|
590
|
+
}
|
|
591
|
+
__name(resolveWorkspaceArtifactLocator, "resolveWorkspaceArtifactLocator");
|
|
592
|
+
function workspacePathCandidate(locator, cwd, root, preservePosixBackslash) {
|
|
593
|
+
if (isRedirectorRoutedPath(locator) || isForeignWindowsAbsolute(locator)) {
|
|
594
|
+
return locatorFailure(
|
|
595
|
+
"invalid_tool_params" /* INVALID_TOOL_PARAMS */,
|
|
596
|
+
WORKSPACE_PATH_HINT
|
|
597
|
+
);
|
|
598
|
+
}
|
|
599
|
+
if (isAbsoluteWorkspaceInput(locator)) {
|
|
600
|
+
const absolute = path2.resolve(locator);
|
|
601
|
+
const comparable = tryResolveForContainment(absolute);
|
|
602
|
+
if (comparable && !isWithinRoot(comparable, root)) {
|
|
603
|
+
return locatorFailure(
|
|
604
|
+
"path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
|
|
605
|
+
`Failed to record artifact: "${locator}" is outside the workspace.
|
|
606
|
+
${WORKSPACE_PATH_HINT}`
|
|
607
|
+
);
|
|
608
|
+
}
|
|
609
|
+
return { ok: true, path: absolute };
|
|
610
|
+
}
|
|
611
|
+
const relative = preservePosixBackslash && process.platform !== "win32" ? locator : locator.replace(/\\/g, "/");
|
|
612
|
+
return { ok: true, path: path2.resolve(cwd, relative) };
|
|
613
|
+
}
|
|
614
|
+
__name(workspacePathCandidate, "workspacePathCandidate");
|
|
615
|
+
async function inspectWorkspaceCandidate(candidate, rawPath, cwd, root) {
|
|
616
|
+
if (pathHasRedirectorHop(candidate)) {
|
|
617
|
+
return locatorFailure(
|
|
618
|
+
"path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
|
|
619
|
+
`Failed to record artifact: "${rawPath}" resolves outside the workspace.
|
|
620
|
+
${WORKSPACE_PATH_HINT}`
|
|
621
|
+
);
|
|
622
|
+
}
|
|
623
|
+
let lst;
|
|
624
|
+
try {
|
|
625
|
+
lst = await fs.lstat(candidate);
|
|
626
|
+
} catch (error) {
|
|
627
|
+
return pathInspectFailure(
|
|
628
|
+
error,
|
|
629
|
+
candidate,
|
|
630
|
+
rawPath,
|
|
631
|
+
`Failed to record artifact: could not inspect "${candidate}" (${error instanceof Error ? error.message : String(error)}).`
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
if (lst.isDirectory()) {
|
|
635
|
+
return locatorFailure(
|
|
636
|
+
"target_is_directory" /* TARGET_IS_DIRECTORY */,
|
|
637
|
+
`Failed to record artifact: "${candidate}" is a directory, not a file.
|
|
638
|
+
${WORKSPACE_PATH_HINT}`
|
|
639
|
+
);
|
|
640
|
+
}
|
|
641
|
+
let resolved;
|
|
642
|
+
try {
|
|
643
|
+
resolved = await fs.realpath(candidate);
|
|
644
|
+
} catch (error) {
|
|
645
|
+
return pathInspectFailure(
|
|
646
|
+
error,
|
|
647
|
+
candidate,
|
|
648
|
+
rawPath,
|
|
649
|
+
`Failed to record artifact: could not resolve "${rawPath}" (${error instanceof Error ? error.message : String(error)}).`
|
|
650
|
+
);
|
|
651
|
+
}
|
|
652
|
+
if (!isWithinRoot(resolved, root)) {
|
|
653
|
+
return locatorFailure(
|
|
654
|
+
"path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
|
|
655
|
+
`Failed to record artifact: "${rawPath}" resolves outside the workspace.
|
|
656
|
+
${WORKSPACE_PATH_HINT}`
|
|
657
|
+
);
|
|
658
|
+
}
|
|
659
|
+
let st;
|
|
660
|
+
try {
|
|
661
|
+
st = await fs.stat(resolved);
|
|
662
|
+
} catch (error) {
|
|
663
|
+
return pathInspectFailure(
|
|
664
|
+
error,
|
|
665
|
+
resolved,
|
|
666
|
+
rawPath,
|
|
667
|
+
`Failed to record artifact: ${error instanceof Error ? error.message : String(error)}`
|
|
668
|
+
);
|
|
669
|
+
}
|
|
670
|
+
if (!st.isFile()) {
|
|
671
|
+
return locatorFailure(
|
|
672
|
+
st.isDirectory() ? "target_is_directory" /* TARGET_IS_DIRECTORY */ : "target_not_regular_file" /* TARGET_NOT_REGULAR_FILE */,
|
|
673
|
+
`Failed to record artifact: "${resolved}" is not a regular file.
|
|
674
|
+
${WORKSPACE_PATH_HINT}`
|
|
675
|
+
);
|
|
676
|
+
}
|
|
677
|
+
const workspacePath = toCanonicalWorkspaceArtifactPath(resolved, cwd);
|
|
678
|
+
if (!workspacePath) {
|
|
679
|
+
return locatorFailure(
|
|
680
|
+
"path_not_in_workspace" /* PATH_NOT_IN_WORKSPACE */,
|
|
681
|
+
`Failed to record artifact: "${rawPath}" could not be converted to a workspace-root-relative path.
|
|
682
|
+
${WORKSPACE_PATH_HINT}`
|
|
683
|
+
);
|
|
684
|
+
}
|
|
685
|
+
const canonicalError = validateString(
|
|
686
|
+
workspacePath,
|
|
687
|
+
"workspacePath",
|
|
688
|
+
ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
|
|
689
|
+
true
|
|
690
|
+
);
|
|
691
|
+
if (canonicalError) {
|
|
692
|
+
return locatorFailure(
|
|
693
|
+
"invalid_tool_params" /* INVALID_TOOL_PARAMS */,
|
|
694
|
+
canonicalError.includes("exceeds") ? `Failed to record artifact: the stored workspace-root-relative path "${workspacePath}" exceeds ${ARTIFACT_WORKSPACE_PATH_MAX_LENGTH} characters.` : canonicalError
|
|
695
|
+
);
|
|
696
|
+
}
|
|
697
|
+
return {
|
|
698
|
+
ok: true,
|
|
699
|
+
workspacePath,
|
|
700
|
+
resolvedPath: resolved,
|
|
701
|
+
sizeBytes: st.size
|
|
702
|
+
};
|
|
703
|
+
}
|
|
704
|
+
__name(inspectWorkspaceCandidate, "inspectWorkspaceCandidate");
|
|
705
|
+
function classifyPathError(error) {
|
|
706
|
+
if (!isNodeError(error)) {
|
|
707
|
+
return "execution_failed" /* EXECUTION_FAILED */;
|
|
708
|
+
}
|
|
709
|
+
if (error.code === "ENOENT" || error.code === "ENOTDIR") {
|
|
710
|
+
return "file_not_found" /* FILE_NOT_FOUND */;
|
|
711
|
+
}
|
|
712
|
+
if (error.code === "EACCES" || error.code === "EPERM") {
|
|
713
|
+
return "permission_denied" /* PERMISSION_DENIED */;
|
|
714
|
+
}
|
|
715
|
+
return "execution_failed" /* EXECUTION_FAILED */;
|
|
716
|
+
}
|
|
717
|
+
__name(classifyPathError, "classifyPathError");
|
|
718
|
+
function pathInspectFailure(error, candidate, rawPath, fallbackMessage) {
|
|
719
|
+
const type = classifyPathError(error);
|
|
720
|
+
if (type === "file_not_found" /* FILE_NOT_FOUND */) {
|
|
721
|
+
return locatorFailure(
|
|
722
|
+
type,
|
|
723
|
+
[
|
|
724
|
+
`Failed to record artifact: file not found at "${candidate}".`,
|
|
725
|
+
WORKSPACE_PATH_HINT
|
|
726
|
+
].join("\n")
|
|
727
|
+
);
|
|
728
|
+
}
|
|
729
|
+
if (type === "permission_denied" /* PERMISSION_DENIED */) {
|
|
730
|
+
return locatorFailure(
|
|
731
|
+
type,
|
|
732
|
+
`Failed to record artifact: permission denied for "${rawPath}".
|
|
733
|
+
${WORKSPACE_PATH_HINT}`
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
return locatorFailure(type, fallbackMessage);
|
|
737
|
+
}
|
|
738
|
+
__name(pathInspectFailure, "pathInspectFailure");
|
|
739
|
+
|
|
740
|
+
export {
|
|
741
|
+
toCanonicalWorkspaceArtifactPath,
|
|
742
|
+
ARTIFACT_TITLE_MAX_LENGTH,
|
|
743
|
+
ARTIFACT_WORKSPACE_PATH_MAX_LENGTH,
|
|
744
|
+
RecordArtifactTool,
|
|
745
|
+
hasControlCharacter,
|
|
746
|
+
hasUnsafeDisplayPayload
|
|
747
|
+
};
|
|
748
|
+
/**
|
|
749
|
+
* @license
|
|
750
|
+
* Copyright 2026 Qwen Team
|
|
751
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
752
|
+
*/
|
|
753
|
+
/**
|
|
754
|
+
* @license
|
|
755
|
+
* Copyright 2025 Google LLC
|
|
756
|
+
* SPDX-License-Identifier: Apache-2.0
|
|
757
|
+
*/
|