eser 4.1.36 → 4.1.39
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/chunks/add-V7YYHLFH.js +8 -0
- package/chunks/{anthropic-2MXDKLNX.js → anthropic-QBGNUIP3.js} +1 -1
- package/chunks/approve-HVIH2A3C.js +2 -0
- package/chunks/ask-PMB64QWG.js +3 -0
- package/chunks/block-JSK5CJPO.js +2 -0
- package/chunks/browser-JGBNWUEQ.js +2 -0
- package/chunks/{build-EJLFNB4I.js → build-HUKFUVPB.js} +2 -2
- package/chunks/bun-HIMXX54I.js +2 -0
- package/chunks/changelog-gen-JV3EHOMV.js +10 -0
- package/chunks/{chunk-GJ4LCA6D.js → chunk-2KKLYXSA.js} +1 -1
- package/chunks/{chunk-JYNHFD6B.js → chunk-2XNFZXHY.js} +1 -1
- package/chunks/{chunk-2EVWKUN6.js → chunk-3AA3RXKD.js} +1 -1
- package/chunks/{chunk-CUIMSX4V.js → chunk-3IZX4OZ7.js} +1 -1
- package/chunks/{chunk-KPWEJXPI.js → chunk-3QF3I2RD.js} +1 -1
- package/chunks/{chunk-K6H7JTIH.js → chunk-4EHAL3NK.js} +1 -1
- package/chunks/chunk-4FGLERUG.js +2 -0
- package/chunks/{chunk-IDMI5OBK.js → chunk-4QDEJUAF.js} +1 -1
- package/chunks/{chunk-4MVO4LD5.js → chunk-5224ZYEW.js} +1 -1
- package/chunks/{chunk-LCG4SK6K.js → chunk-5DWJ7WEE.js} +1 -1
- package/chunks/chunk-5WJ6AUNY.js +2 -0
- package/chunks/chunk-6E6JUBFH.js +2 -0
- package/chunks/chunk-7UASU4NU.js +10 -0
- package/chunks/chunk-A3JJKZ4C.js +4 -0
- package/chunks/chunk-A3MZV73T.js +32 -0
- package/chunks/chunk-A6K5L4SG.js +3 -0
- package/chunks/{chunk-YVIGHK4H.js → chunk-AHKNU2JM.js} +1 -1
- package/chunks/{chunk-BCPCQHDL.js → chunk-BBOEAL63.js} +1 -1
- package/chunks/chunk-BQT5RJZB.js +2 -0
- package/chunks/{chunk-EBCQCAQ7.js → chunk-BWDCKK63.js} +1 -1
- package/chunks/{chunk-FORPNESQ.js → chunk-CMSPX2RN.js} +1 -1
- package/chunks/{chunk-H4SPMUT6.js → chunk-DKFL6XPX.js} +1 -1
- package/chunks/{chunk-HVLKXRPA.js → chunk-DWLFTRZS.js} +1 -1
- package/chunks/{chunk-PVPMHMKP.js → chunk-ECY4MUD3.js} +1 -1
- package/chunks/{chunk-IIIMOOFE.js → chunk-EGMYM4TM.js} +1 -1
- package/chunks/{chunk-I4C675WP.js → chunk-F35K7YVH.js} +1 -1
- package/chunks/{chunk-IZONBJSX.js → chunk-F5HQDZLN.js} +1 -1
- package/chunks/{chunk-A6RDYP6R.js → chunk-FFWPJP7A.js} +1 -1
- package/chunks/chunk-H2O5G3XB.js +2 -0
- package/chunks/{chunk-Y53YTL4C.js → chunk-HLKFDKLZ.js} +1 -1
- package/chunks/{chunk-SOBOSRJB.js → chunk-HP5W5XT6.js} +1 -1
- package/chunks/{chunk-BP3IFAPO.js → chunk-HTJLIAH4.js} +1 -1
- package/chunks/{chunk-7BFBOLLC.js → chunk-HVTJ5LVU.js} +1 -1
- package/chunks/chunk-HZ2ALFWG.js +66 -0
- package/chunks/{chunk-YQVWAWMO.js → chunk-ILROPD5P.js} +1 -1
- package/chunks/{chunk-QSION3QA.js → chunk-ISQIZSXN.js} +1 -1
- package/chunks/chunk-JI536JLJ.js +2 -0
- package/chunks/{chunk-UJPVEQX7.js → chunk-K2MKYDPY.js} +1 -1
- package/chunks/{chunk-T2DRBZ4X.js → chunk-KEOTIPA6.js} +1 -1
- package/chunks/chunk-L2E2H7YT.js +2 -0
- package/chunks/chunk-L7UCWRDZ.js +3 -0
- package/chunks/{chunk-4WQGB7NO.js → chunk-LBMJGMDD.js} +1 -1
- package/chunks/{chunk-2VEVVX6U.js → chunk-LFNUSULJ.js} +1 -1
- package/chunks/{chunk-5GGGQJ4P.js → chunk-MBCPGD5L.js} +1 -1
- package/chunks/chunk-MEZCXQAX.js +2 -0
- package/chunks/{chunk-B6EATLKL.js → chunk-MOY4CXAZ.js} +2 -2
- package/chunks/{chunk-P74JF7XR.js → chunk-MQ4EMT35.js} +1 -1
- package/chunks/chunk-NEHZOG23.js +7 -0
- package/chunks/{chunk-QZ44TAIY.js → chunk-NJUIBCQR.js} +1 -1
- package/chunks/{chunk-5MWX3POX.js → chunk-NZRU3N6C.js} +1 -1
- package/chunks/{chunk-N2VBT43E.js → chunk-O2TA7OHJ.js} +1 -1
- package/chunks/{chunk-ER4ZWF4Y.js → chunk-OAFB4A6D.js} +1 -1
- package/chunks/chunk-OAT2D23A.js +2 -0
- package/chunks/{chunk-3QIPK7NI.js → chunk-OPPOHKNZ.js} +1 -1
- package/chunks/{chunk-ZNGLZECE.js → chunk-OWV223WQ.js} +1 -1
- package/chunks/{chunk-3BEX5FYF.js → chunk-P2MUEKFT.js} +1 -1
- package/chunks/{chunk-455V3AE5.js → chunk-P72TUTYK.js} +1 -1
- package/chunks/{chunk-Q2KSOC32.js → chunk-PPSDIDOI.js} +1 -1
- package/chunks/chunk-PXCM4FHO.js +2 -0
- package/chunks/{chunk-KVTG56GS.js → chunk-QFFGKP3M.js} +1 -1
- package/chunks/{chunk-PZNCE6QK.js → chunk-QXATB6Z5.js} +1 -1
- package/chunks/chunk-RGUPFAEE.js +68 -0
- package/chunks/{chunk-SP43S32B.js → chunk-RVJZFWN7.js} +1 -1
- package/chunks/{chunk-B5IPHVXT.js → chunk-SBAXURB7.js} +1 -1
- package/chunks/{chunk-7NUMDHE2.js → chunk-T4WKRBQZ.js} +1 -1
- package/chunks/{chunk-UJ6LH5FY.js → chunk-TEOMM3RD.js} +1 -1
- package/chunks/{chunk-QOX7VSID.js → chunk-TLVGNOK3.js} +1 -1
- package/chunks/{chunk-HYT26FYU.js → chunk-U5Q5MC74.js} +1 -1
- package/chunks/chunk-ULNEO3RY.js +4 -0
- package/chunks/{chunk-MXGRYONZ.js → chunk-UMKCOU3N.js} +1 -1
- package/chunks/{chunk-536RBSFU.js → chunk-UQ2BC7UA.js} +1 -1
- package/chunks/{chunk-HVOPUZOM.js → chunk-VIQLCQOI.js} +1 -1
- package/chunks/chunk-VWQLQJVX.js +2 -0
- package/chunks/{chunk-CKNA5LIK.js → chunk-WAEXOK7L.js} +1 -1
- package/chunks/{chunk-NP723K5L.js → chunk-WILZ4OR2.js} +1 -1
- package/chunks/chunk-WJKE6XHF.js +2 -0
- package/chunks/{chunk-KQE6FMKW.js → chunk-XYUJCTPP.js} +1 -1
- package/chunks/{chunk-P2TABZ4A.js → chunk-YEWODYET.js} +1 -1
- package/chunks/{chunk-3SXTMY75.js → chunk-YVN2NZL4.js} +1 -1
- package/chunks/{chunk-GBM3TZFD.js → chunk-ZC4F4MYU.js} +1 -1
- package/chunks/{chunk-KBFKBL6A.js → chunk-ZWMJQZQF.js} +1 -1
- package/chunks/claude-code-ELUDT5TV.js +2 -0
- package/chunks/{clone-H3UAEVVP.js → clone-YEBQK7CG.js} +1 -1
- package/chunks/cmd-2DAVTVOF.js +2 -0
- package/chunks/{commitmsg-7XZGGERO.js → commitmsg-FQ3IZ3TH.js} +2 -2
- package/chunks/concern-TIGYH5DX.js +2 -0
- package/chunks/deno-XQHOVHKR.js +2 -0
- package/chunks/dev-BNGJJR2O.js +4 -0
- package/chunks/dist-QVOR7USR.js +13 -0
- package/chunks/done-GGPPHJW2.js +2 -0
- package/chunks/file-tools-shared-KBTCO2FV.js +2 -0
- package/chunks/{gemini-F4KLO5VU.js → gemini-43AWJEWI.js} +1 -1
- package/chunks/gh-Q7VEABJS.js +4 -0
- package/chunks/gh-contributors-4KGARSNL.js +12 -0
- package/chunks/init-45ODFAV3.js +2 -0
- package/chunks/{init-J4IHOVZL.js → init-RV7K5JC4.js} +3 -3
- package/chunks/{install-KNZDCGIB.js → install-6XIQS5E7.js} +2 -2
- package/chunks/invoke-hook-Q3NMJXDO.js +11 -0
- package/chunks/kiro-NZ7LM6HA.js +2 -0
- package/chunks/list-BOLPKAEY.js +2 -0
- package/chunks/{list-N4ZKDFW7.js → list-NYLFIF2U.js} +1 -1
- package/chunks/list-UQMPOF5Y.js +2 -0
- package/chunks/load-config-G4DHKB5K.js +2 -0
- package/chunks/{main-HJQEBLLN.js → main-236QYA7G.js} +2 -2
- package/chunks/manifest-3VJ4O6HR.js +2 -0
- package/chunks/{mod-4ILLF5PK.js → mod-5JT4O5L3.js} +1 -1
- package/chunks/mod-BQJDMCYC.js +2 -0
- package/chunks/mod-DXA25A4J.js +2 -0
- package/chunks/mod-EWLBSEHA.js +2 -0
- package/chunks/mod-GSWVSC2C.js +28 -0
- package/chunks/mod-IHYN4TEM.js +3 -0
- package/chunks/mod-IXVUQHXS.js +2 -0
- package/chunks/mod-P4AVZJNK.js +2 -0
- package/chunks/mod-PZSJGUM7.js +2 -0
- package/chunks/mod-QWYXFGRG.js +2 -0
- package/chunks/{mod-OS3BCM2G.js → mod-SXL6PDQM.js} +1 -1
- package/chunks/mod-YH5Z6G4Q.js +2 -0
- package/chunks/multipart-parser-SSRHOBFH.js +3 -0
- package/chunks/{new-BOGCXTIY.js → new-U5U4E6HR.js} +1 -1
- package/chunks/next-AQ4TIEL7.js +9 -0
- package/chunks/node-IN5OQP4N.js +68 -0
- package/chunks/node-ZGM6SXXI.js +2 -0
- package/chunks/ollama-LHWMXMLY.js +2 -0
- package/chunks/openai-2KONKHWL.js +2 -0
- package/chunks/openai-IRQY5SCR.js +24 -0
- package/chunks/opencode-24O2MW3L.js +2 -0
- package/chunks/purge-RM6OD5PV.js +5 -0
- package/chunks/recipe-applier-TTZEZGSC.js +2 -0
- package/chunks/registry-fetcher-SPENFEOH.js +2 -0
- package/chunks/release-UEX6YK4K.js +9 -0
- package/chunks/release-notes-GA7CTA54.js +4 -0
- package/chunks/release-tag-VJWBXG5G.js +2 -0
- package/chunks/reset-WHYTPTFB.js +2 -0
- package/chunks/rule-ZQOGLQQI.js +3 -0
- package/chunks/run-IX74MQTI.js +4 -0
- package/chunks/run-L35K3KRF.js +5 -0
- package/chunks/scripts-VI2TKQOH.js +2 -0
- package/chunks/sdk-L2SQCWYV.js +41 -0
- package/chunks/serve-AVVEYGQB.js +4 -0
- package/chunks/{server-KNWQV2HW.js → server-R347ON4B.js} +1 -1
- package/chunks/spec-KMKZDLV2.js +2 -0
- package/chunks/src-6SFGTAGT.js +4 -0
- package/chunks/status-MLX4O37A.js +2 -0
- package/chunks/sync-PB4KWB3R.js +2 -0
- package/chunks/system-BXJ2LV5O.js +2 -0
- package/chunks/system-YLXVXRXW.js +2 -0
- package/chunks/{unstable_chmod-GDQI7NKH.js → unstable_chmod-2W47KJY3.js} +1 -1
- package/chunks/update-522VXIKX.js +6 -0
- package/chunks/validate-bom-JCMRVAUT.js +2 -0
- package/chunks/validate-case-conflict-WZQCMKSZ.js +2 -0
- package/chunks/validate-circular-deps-7R4F2YDV.js +2 -0
- package/chunks/validate-commit-msg-PH7Y3JEI.js +2 -0
- package/chunks/validate-docs-WCIOHNYP.js +2 -0
- package/chunks/validate-eof-KRYQLTFQ.js +2 -0
- package/chunks/validate-export-names-OCQ2XSY6.js +2 -0
- package/chunks/validate-filenames-46O7FCXF.js +2 -0
- package/chunks/validate-json-3EZ2L64H.js +2 -0
- package/chunks/validate-large-files-7YX6MSOB.js +2 -0
- package/chunks/validate-licenses-OC7JRVAH.js +2 -0
- package/chunks/validate-line-endings-2DM5UGCJ.js +2 -0
- package/chunks/validate-merge-conflict-UDMWYMJ5.js +2 -0
- package/chunks/validate-mod-exports-W24IV367.js +2 -0
- package/chunks/validate-package-configs-3Y55ZLUY.js +2 -0
- package/chunks/validate-secrets-66VXCCUF.js +2 -0
- package/chunks/validate-shebangs-AMEAHVLB.js +2 -0
- package/chunks/validate-submodules-DYCE27WK.js +2 -0
- package/chunks/validate-symlinks-QN744GUH.js +2 -0
- package/chunks/validate-toml-5K2XNHAE.js +2 -0
- package/chunks/validate-trailing-whitespace-QYWHHIAK.js +2 -0
- package/chunks/validate-yaml-VGKLHEAQ.js +2 -0
- package/chunks/versions-FYALONNL.js +2 -0
- package/chunks/{vertexai-EXTYPVHK.js → vertexai-2F2A3VTE.js} +1 -1
- package/chunks/watch-P56QT3Q2.js +9 -0
- package/chunks/workerd-LOWXXQEU.js +2 -0
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/add-5SDE43IH.js +0 -8
- package/chunks/approve-XNUZYGYJ.js +0 -2
- package/chunks/ask-L3N6REQI.js +0 -3
- package/chunks/block-NWIP4USQ.js +0 -2
- package/chunks/browser-SG2DBNGS.js +0 -2
- package/chunks/bun-3AACRJXG.js +0 -2
- package/chunks/changelog-gen-MX6L2Z24.js +0 -10
- package/chunks/chunk-2HBVIH7V.js +0 -3
- package/chunks/chunk-32HV3K27.js +0 -2
- package/chunks/chunk-46ZWBKIW.js +0 -2
- package/chunks/chunk-4DOMGQOO.js +0 -2
- package/chunks/chunk-AHLJCH32.js +0 -2
- package/chunks/chunk-CDPSH56U.js +0 -2
- package/chunks/chunk-DAK2I7UC.js +0 -2
- package/chunks/chunk-DAYSTLLV.js +0 -2
- package/chunks/chunk-DTO2YJWZ.js +0 -2
- package/chunks/chunk-DYRTLYTU.js +0 -3
- package/chunks/chunk-G6NAG2EK.js +0 -2
- package/chunks/chunk-JAQN64PH.js +0 -13
- package/chunks/chunk-JOTAKQMZ.js +0 -2
- package/chunks/chunk-LNNNLUZT.js +0 -2
- package/chunks/chunk-MRCBHVSB.js +0 -2
- package/chunks/chunk-OIZ7HL2C.js +0 -61
- package/chunks/chunk-PE2TDUXD.js +0 -19
- package/chunks/chunk-RGUETQSC.js +0 -4
- package/chunks/chunk-STI6DX7K.js +0 -2
- package/chunks/chunk-TFPT4BDY.js +0 -15
- package/chunks/chunk-UESOCN2G.js +0 -2
- package/chunks/chunk-W3RVRCUB.js +0 -2
- package/chunks/chunk-WG6J7DFO.js +0 -7
- package/chunks/chunk-XVSIRN6G.js +0 -4
- package/chunks/chunk-Y4ARZGGL.js +0 -2
- package/chunks/claude-code-VUBEU7RR.js +0 -2
- package/chunks/concern-ZO533WR2.js +0 -2
- package/chunks/deno-7BSPHDRG.js +0 -2
- package/chunks/dev-PTMXZEVC.js +0 -4
- package/chunks/done-DIN56LXZ.js +0 -2
- package/chunks/file-tools-shared-G36OYF5S.js +0 -2
- package/chunks/fileFromPath-MB3IRZVW.js +0 -7
- package/chunks/gh-L25JQWOY.js +0 -5
- package/chunks/gh-contributors-E7IZ2LFS.js +0 -12
- package/chunks/init-3B7XMH2J.js +0 -2
- package/chunks/invoke-hook-I2T7HYRT.js +0 -10
- package/chunks/kiro-HQLXD6ZU.js +0 -2
- package/chunks/list-5TGTYMAU.js +0 -2
- package/chunks/list-PY3A762R.js +0 -2
- package/chunks/load-config-FTQMJVEW.js +0 -2
- package/chunks/manifest-NF2EK757.js +0 -2
- package/chunks/mod-FEGQZ3ZY.js +0 -2
- package/chunks/mod-HKYPZOU7.js +0 -2
- package/chunks/mod-JI2A2546.js +0 -2
- package/chunks/mod-JZNE2HH6.js +0 -2
- package/chunks/mod-MLRQFSBE.js +0 -2
- package/chunks/mod-NCF6OSXO.js +0 -2
- package/chunks/mod-PFWQZF3T.js +0 -28
- package/chunks/mod-T5VHCXJT.js +0 -2
- package/chunks/mod-W3DBWTCY.js +0 -11
- package/chunks/mod-YX3JRMSI.js +0 -2
- package/chunks/next-TMHSP2BS.js +0 -4
- package/chunks/node-KCQF6QQA.js +0 -60
- package/chunks/node-MFKYO4CY.js +0 -2
- package/chunks/ollama-36F5QAOO.js +0 -2
- package/chunks/openai-EU5TJZ5T.js +0 -2
- package/chunks/openai-IKXRJYI3.js +0 -20
- package/chunks/opencode-7J3JDC44.js +0 -2
- package/chunks/purge-XYNNHOEN.js +0 -5
- package/chunks/recipe-applier-6QZYAZ57.js +0 -2
- package/chunks/registry-fetcher-76ISLGRR.js +0 -2
- package/chunks/release-J3PVDROM.js +0 -9
- package/chunks/release-notes-AARDYXYA.js +0 -4
- package/chunks/release-tag-H2YWUXRU.js +0 -2
- package/chunks/reset-EYLAZVKO.js +0 -2
- package/chunks/rule-JMNIMEH3.js +0 -3
- package/chunks/run-NSJ5YV6R.js +0 -4
- package/chunks/run-RGEZUAPM.js +0 -5
- package/chunks/scripts-JK6W2MCO.js +0 -2
- package/chunks/sdk-MXV452BR.js +0 -19
- package/chunks/serve-XVAIQ37L.js +0 -4
- package/chunks/spec-3UGU4UBE.js +0 -2
- package/chunks/status-6SC3L7U2.js +0 -2
- package/chunks/sync-M7MKXMYN.js +0 -2
- package/chunks/system-L2JVPTCT.js +0 -2
- package/chunks/system-WTPEDJU6.js +0 -2
- package/chunks/update-4C4WNXCE.js +0 -6
- package/chunks/validate-bom-QVE5HNBO.js +0 -2
- package/chunks/validate-case-conflict-XFS3URQN.js +0 -2
- package/chunks/validate-circular-deps-BMPAT3PF.js +0 -2
- package/chunks/validate-commit-msg-BPESCI7P.js +0 -2
- package/chunks/validate-docs-ITL4L6KY.js +0 -2
- package/chunks/validate-eof-DTFV74VL.js +0 -2
- package/chunks/validate-export-names-HLOH7D73.js +0 -2
- package/chunks/validate-filenames-J4RTDEBD.js +0 -2
- package/chunks/validate-json-KMODGNSU.js +0 -2
- package/chunks/validate-large-files-X5YF7D7T.js +0 -2
- package/chunks/validate-licenses-OZ7DXQTY.js +0 -2
- package/chunks/validate-line-endings-PFF6QJ3W.js +0 -2
- package/chunks/validate-merge-conflict-KB2X6QLW.js +0 -2
- package/chunks/validate-mod-exports-VHK2NVKI.js +0 -2
- package/chunks/validate-package-configs-ZNCAIYRO.js +0 -2
- package/chunks/validate-secrets-RM6DMZVG.js +0 -2
- package/chunks/validate-shebangs-WC66D7RK.js +0 -2
- package/chunks/validate-submodules-SPAXASAG.js +0 -2
- package/chunks/validate-symlinks-4LOWK2MQ.js +0 -2
- package/chunks/validate-toml-SG4IITMN.js +0 -2
- package/chunks/validate-trailing-whitespace-GRE2PJ6T.js +0 -2
- package/chunks/validate-yaml-RA22QNW6.js +0 -2
- package/chunks/versions-ODYWYT7U.js +0 -2
- package/chunks/watch-YKYNWTZF.js +0 -9
- package/chunks/workerd-VVSAKLDZ.js +0 -2
package/chunks/sdk-MXV452BR.js
DELETED
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as xt,b as zt,c as Qt,d as St}from"./chunk-TFPT4BDY.js";import{a as Gt}from"./chunk-DAK2I7UC.js";import{b as bt,c as _t}from"./chunk-PE2TDUXD.js";import{e as Qe}from"./chunk-G6NAG2EK.js";var N="0.39.0";var Pt=!1,U,Ye,Yt,Zt,er,Mt,tr,Me,Ze,Et,et,ue,At;function Rt(s,e={auto:!1}){if(Pt)throw new Error(`you must \`import '@anthropic-ai/sdk/shims/${s.kind}'\` before importing anything else from @anthropic-ai/sdk`);if(U)throw new Error(`can't \`import '@anthropic-ai/sdk/shims/${s.kind}'\` after \`import '@anthropic-ai/sdk/shims/${U}'\``);Pt=e.auto,U=s.kind,Ye=s.fetch,Yt=s.Request,Zt=s.Response,er=s.Headers,Mt=s.FormData,tr=s.Blob,Me=s.File,Ze=s.ReadableStream,Et=s.getMultipartRequestOptions,et=s.getDefaultAgent,ue=s.fileFromPath,At=s.isFsReadStream}var O=Qe(Gt(),1);var tt=Qe(zt(),1),It=Qe(Qt(),1);import{ReadStream as sr}from"node:fs";import{Readable as nr}from"node:stream";var Ee=class{constructor(e){this.body=e}get[Symbol.toStringTag](){return"MultipartBody"}};import{ReadableStream as ir}from"node:stream/web";var kt=!1;async function or(s,...e){let{fileFromPath:t}=await import("./fileFromPath-MB3IRZVW.js");return kt||(console.warn(`fileFromPath is deprecated; use fs.createReadStream(${JSON.stringify(s)}) instead`),kt=!0),await t(s,...e)}var ar=new tt.default({keepAlive:!0,timeout:5*60*1e3}),cr=new tt.default.HttpsAgent({keepAlive:!0,timeout:5*60*1e3});async function ur(s,e){let t=new St(s),r=nr.from(t),n=new Ee(r),i={...e.headers,...t.headers,"Content-Length":t.contentLength};return{...e,body:n,headers:i}}function Bt(){return typeof AbortController>"u"&&(globalThis.AbortController=It.AbortController),{kind:"node",fetch:O.default,Request:O.Request,Response:O.Response,Headers:O.Headers,FormData:xt,Blob:bt,File:_t,ReadableStream:ir,getMultipartRequestOptions:ur,getDefaultAgent:s=>s.startsWith("https")?cr:ar,fileFromPath:or,isFsReadStream:s=>s instanceof sr}}U||Rt(Bt(),{auto:!0});var c=class extends Error{},m=class s extends c{constructor(e,t,r,n){super(`${s.makeMessage(e,t,r)}`),this.status=e,this.headers=n,this.request_id=n?.["request-id"],this.error=t}static makeMessage(e,t,r){let n=t?.message?typeof t.message=="string"?t.message:JSON.stringify(t.message):t?JSON.stringify(t):r;return e&&n?`${e} ${n}`:e?`${e} status code (no body)`:n||"(no status code or body)"}static generate(e,t,r,n){if(!e||!n)return new R({message:r,cause:Ae(t)});let i=t;return e===400?new K(e,i,r,n):e===401?new V(e,i,r,n):e===403?new G(e,i,r,n):e===404?new z(e,i,r,n):e===409?new Q(e,i,r,n):e===422?new Y(e,i,r,n):e===429?new Z(e,i,r,n):e>=500?new ee(e,i,r,n):new s(e,i,r,n)}},p=class extends m{constructor({message:e}={}){super(void 0,void 0,e||"Request was aborted.",void 0)}},R=class extends m{constructor({message:e,cause:t}){super(void 0,void 0,e||"Connection error.",void 0),t&&(this.cause=t)}},$=class extends R{constructor({message:e}={}){super({message:e??"Request timed out."})}},K=class extends m{},V=class extends m{},G=class extends m{},z=class extends m{},Q=class extends m{},Y=class extends m{},Z=class extends m{},ee=class extends m{};var Re=function(s,e,t,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(s,t):n?n.value=t:e.set(s,t),t},L=function(s,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(s):r?r.value:e.get(s)},b,k=class{constructor(){b.set(this,void 0),this.buffer=new Uint8Array,Re(this,b,null,"f")}decode(e){if(e==null)return[];let t=e instanceof ArrayBuffer?new Uint8Array(e):typeof e=="string"?new TextEncoder().encode(e):e,r=new Uint8Array(this.buffer.length+t.length);r.set(this.buffer),r.set(t,this.buffer.length),this.buffer=r;let n=[],i;for(;(i=fr(this.buffer,L(this,b,"f")))!=null;){if(i.carriage&&L(this,b,"f")==null){Re(this,b,i.index,"f");continue}if(L(this,b,"f")!=null&&(i.index!==L(this,b,"f")+1||i.carriage)){n.push(this.decodeText(this.buffer.slice(0,L(this,b,"f")-1))),this.buffer=this.buffer.slice(L(this,b,"f")),Re(this,b,null,"f");continue}let o=L(this,b,"f")!==null?i.preceding-1:i.preceding,a=this.decodeText(this.buffer.slice(0,o));n.push(a),this.buffer=this.buffer.slice(i.index),Re(this,b,null,"f")}return n}decodeText(e){if(e==null)return"";if(typeof e=="string")return e;if(typeof Buffer<"u"){if(e instanceof Buffer)return e.toString();if(e instanceof Uint8Array)return Buffer.from(e).toString();throw new c(`Unexpected: received non-Uint8Array (${e.constructor.name}) stream chunk in an environment with a global "Buffer" defined, which this library assumes to be Node. Please report this error.`)}if(typeof TextDecoder<"u"){if(e instanceof Uint8Array||e instanceof ArrayBuffer)return this.textDecoder??(this.textDecoder=new TextDecoder("utf8")),this.textDecoder.decode(e);throw new c(`Unexpected: received non-Uint8Array/ArrayBuffer (${e.constructor.name}) in a web platform. Please report this error.`)}throw new c("Unexpected: neither Buffer nor TextDecoder are available as globals. Please report this error.")}flush(){return this.buffer.length?this.decode(`
|
|
3
|
-
`):[]}};b=new WeakMap;k.NEWLINE_CHARS=new Set([`
|
|
4
|
-
`,"\r"]);k.NEWLINE_REGEXP=/\r\n|[\n\r]/g;function fr(s,e){for(let n=e??0;n<s.length;n++){if(s[n]===10)return{preceding:n,index:n+1,carriage:!1};if(s[n]===13)return{preceding:n,index:n+1,carriage:!0}}return null}function Tt(s){for(let r=0;r<s.length-1;r++){if(s[r]===10&&s[r+1]===10||s[r]===13&&s[r+1]===13)return r+2;if(s[r]===13&&s[r+1]===10&&r+3<s.length&&s[r+2]===13&&s[r+3]===10)return r+4}return-1}function le(s){if(s[Symbol.asyncIterator])return s;let e=s.getReader();return{async next(){try{let t=await e.read();return t?.done&&e.releaseLock(),t}catch(t){throw e.releaseLock(),t}},async return(){let t=e.cancel();return e.releaseLock(),await t,{done:!0,value:void 0}},[Symbol.asyncIterator](){return this}}}var M=class s{constructor(e,t){this.iterator=e,this.controller=t}static fromSSEResponse(e,t){let r=!1;async function*n(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let i=!1;try{for await(let o of hr(e,t)){if(o.event==="completion")try{yield JSON.parse(o.data)}catch(a){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),a}if(o.event==="message_start"||o.event==="message_delta"||o.event==="message_stop"||o.event==="content_block_start"||o.event==="content_block_delta"||o.event==="content_block_stop")try{yield JSON.parse(o.data)}catch(a){throw console.error("Could not parse message into JSON:",o.data),console.error("From chunk:",o.raw),a}if(o.event!=="ping"&&o.event==="error")throw m.generate(void 0,`SSE Error: ${o.data}`,o.data,st(e.headers))}i=!0}catch(o){if(o instanceof Error&&o.name==="AbortError")return;throw o}finally{i||t.abort()}}return new s(n,t)}static fromReadableStream(e,t){let r=!1;async function*n(){let o=new k,a=le(e);for await(let h of a)for(let d of o.decode(h))yield d;for(let h of o.flush())yield h}async function*i(){if(r)throw new Error("Cannot iterate over a consumed stream, use `.tee()` to split the stream.");r=!0;let o=!1;try{for await(let a of n())o||a&&(yield JSON.parse(a));o=!0}catch(a){if(a instanceof Error&&a.name==="AbortError")return;throw a}finally{o||t.abort()}}return new s(i,t)}[Symbol.asyncIterator](){return this.iterator()}tee(){let e=[],t=[],r=this.iterator(),n=i=>({next:()=>{if(i.length===0){let o=r.next();e.push(o),t.push(o)}return i.shift()}});return[new s(()=>n(e),this.controller),new s(()=>n(t),this.controller)]}toReadableStream(){let e=this,t,r=new TextEncoder;return new Ze({async start(){t=e[Symbol.asyncIterator]()},async pull(n){try{let{value:i,done:o}=await t.next();if(o)return n.close();let a=r.encode(JSON.stringify(i)+`
|
|
5
|
-
`);n.enqueue(a)}catch(i){n.error(i)}},async cancel(){await t.return?.()}})}};async function*hr(s,e){if(!s.body)throw e.abort(),new c("Attempted to iterate over a response with no body");let t=new rt,r=new k,n=le(s.body);for await(let i of dr(n))for(let o of r.decode(i)){let a=t.decode(o);a&&(yield a)}for(let i of r.flush()){let o=t.decode(i);o&&(yield o)}}async function*dr(s){let e=new Uint8Array;for await(let t of s){if(t==null)continue;let r=t instanceof ArrayBuffer?new Uint8Array(t):typeof t=="string"?new TextEncoder().encode(t):t,n=new Uint8Array(e.length+r.length);n.set(e),n.set(r,e.length),e=n;let i;for(;(i=Tt(e))!==-1;)yield e.slice(0,i),e=e.slice(i)}e.length>0&&(yield e)}var rt=class{constructor(){this.event=null,this.data=[],this.chunks=[]}decode(e){if(e.endsWith("\r")&&(e=e.substring(0,e.length-1)),!e){if(!this.event&&!this.data.length)return null;let i={event:this.event,data:this.data.join(`
|
|
6
|
-
`),raw:this.chunks};return this.event=null,this.data=[],this.chunks=[],i}if(this.chunks.push(e),e.startsWith(":"))return null;let[t,r,n]=mr(e,":");return n.startsWith(" ")&&(n=n.substring(1)),t==="event"?this.event=n:t==="data"&&this.data.push(n),null}};function mr(s,e){let t=s.indexOf(e);return t!==-1?[s.substring(0,t),e,s.substring(t+e.length)]:[s,"",""]}var pr=s=>s!=null&&typeof s=="object"&&typeof s.url=="string"&&typeof s.blob=="function",gr=s=>s!=null&&typeof s=="object"&&typeof s.name=="string"&&typeof s.lastModified=="number"&&fe(s),fe=s=>s!=null&&typeof s=="object"&&typeof s.size=="number"&&typeof s.type=="string"&&typeof s.text=="function"&&typeof s.slice=="function"&&typeof s.arrayBuffer=="function";async function it(s,e,t){if(s=await s,gr(s))return s;if(pr(s)){let n=await s.blob();e||(e=new URL(s.url).pathname.split(/[\\/]/).pop()??"unknown_file");let i=fe(n)?[await n.arrayBuffer()]:[n];return new Me(i,e,t)}let r=await yr(s);if(e||(e=br(s)??"unknown_file"),!t?.type){let n=r[0]?.type;typeof n=="string"&&(t={...t,type:n})}return new Me(r,e,t)}async function yr(s){let e=[];if(typeof s=="string"||ArrayBuffer.isView(s)||s instanceof ArrayBuffer)e.push(s);else if(fe(s))e.push(await s.arrayBuffer());else if(_r(s))for await(let t of s)e.push(t);else throw new Error(`Unexpected data type: ${typeof s}; constructor: ${s?.constructor?.name}; props: ${wr(s)}`);return e}function wr(s){return`[${Object.getOwnPropertyNames(s).map(t=>`"${t}"`).join(", ")}]`}function br(s){return nt(s.name)||nt(s.filename)||nt(s.path)?.split(/[\\/]/).pop()}var nt=s=>{if(typeof s=="string")return s;if(typeof Buffer<"u"&&s instanceof Buffer)return String(s)},_r=s=>s!=null&&typeof s=="object"&&typeof s[Symbol.asyncIterator]=="function",ot=s=>s&&typeof s=="object"&&s.body&&s[Symbol.toStringTag]==="MultipartBody";var Sr=function(s,e,t,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(s,t):n?n.value=t:e.set(s,t),t},Pr=function(s,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(s):r?r.value:e.get(s)},ke;async function Ft(s){let{response:e}=s;if(s.options.stream)return te("response",e.status,e.url,e.headers,e.body),s.options.__streamClass?s.options.__streamClass.fromSSEResponse(e,s.controller):M.fromSSEResponse(e,s.controller);if(e.status===204)return null;if(s.options.__binaryResponse)return e;let t=e.headers.get("content-type");if(t?.includes("application/json")||t?.includes("application/vnd.api+json")){let i=await e.json();return te("response",e.status,e.url,e.headers,i),jt(i,e)}let n=await e.text();return te("response",e.status,e.url,e.headers,n),n}function jt(s,e){return!s||typeof s!="object"||Array.isArray(s)?s:Object.defineProperty(s,"_request_id",{value:e.headers.get("request-id"),enumerable:!1})}var Be=class s extends Promise{constructor(e,t=Ft){super(r=>{r(null)}),this.responsePromise=e,this.parseResponse=t}_thenUnwrap(e){return new s(this.responsePromise,async t=>jt(e(await this.parseResponse(t),t),t.response))}asResponse(){return this.responsePromise.then(e=>e.response)}async withResponse(){let[e,t]=await Promise.all([this.parse(),this.asResponse()]);return{data:e,response:t,request_id:t.headers.get("request-id")}}parse(){return this.parsedPromise||(this.parsedPromise=this.responsePromise.then(this.parseResponse)),this.parsedPromise}then(e,t){return this.parse().then(e,t)}catch(e){return this.parse().catch(e)}finally(e){return this.parse().finally(e)}},Te=class{constructor({baseURL:e,maxRetries:t=2,timeout:r=6e5,httpAgent:n,fetch:i}){this.baseURL=e,this.maxRetries=at("maxRetries",t),this.timeout=at("timeout",r),this.httpAgent=n,this.fetch=i??Ye}authHeaders(e){return{}}defaultHeaders(e){return{Accept:"application/json","Content-Type":"application/json","User-Agent":this.getUserAgent(),...Rr(),...this.authHeaders(e)}}validateHeaders(e,t){}defaultIdempotencyKey(){return`stainless-node-retry-${Cr()}`}get(e,t){return this.methodRequest("get",e,t)}post(e,t){return this.methodRequest("post",e,t)}patch(e,t){return this.methodRequest("patch",e,t)}put(e,t){return this.methodRequest("put",e,t)}delete(e,t){return this.methodRequest("delete",e,t)}methodRequest(e,t,r){return this.request(Promise.resolve(r).then(async n=>{let i=n&&fe(n?.body)?new DataView(await n.body.arrayBuffer()):n?.body instanceof DataView?n.body:n?.body instanceof ArrayBuffer?new DataView(n.body):n&&ArrayBuffer.isView(n?.body)?new DataView(n.body.buffer):n?.body;return{method:e,path:t,...n,body:i}}))}getAPIList(e,t,r){return this.requestAPIList(t,{method:"get",path:e,...r})}calculateContentLength(e){if(typeof e=="string"){if(typeof Buffer<"u")return Buffer.byteLength(e,"utf8").toString();if(typeof TextEncoder<"u")return new TextEncoder().encode(e).length.toString()}else if(ArrayBuffer.isView(e))return e.byteLength.toString();return null}buildRequest(e,{retryCount:t=0}={}){e={...e};let{method:r,path:n,query:i,headers:o={}}=e,a=ArrayBuffer.isView(e.body)||e.__binaryRequest&&typeof e.body=="string"?e.body:ot(e.body)?e.body.body:e.body?JSON.stringify(e.body,null,2):null,h=this.calculateContentLength(a),d=this.buildURL(n,i);"timeout"in e&&at("timeout",e.timeout),e.timeout=e.timeout??this.timeout;let _=e.httpAgent??this.httpAgent??et(d),C=e.timeout+1e3;typeof _?.options?.timeout=="number"&&C>(_.options.timeout??0)&&(_.options.timeout=C),this.idempotencyHeader&&r!=="get"&&(e.idempotencyKey||(e.idempotencyKey=this.defaultIdempotencyKey()),o[this.idempotencyHeader]=e.idempotencyKey);let Pe=this.buildHeaders({options:e,headers:o,contentLength:h,retryCount:t});return{req:{method:r,...a&&{body:a},headers:Pe,..._&&{agent:_},signal:e.signal??null},url:d,timeout:e.timeout}}buildHeaders({options:e,headers:t,contentLength:r,retryCount:n}){let i={};r&&(i["content-length"]=r);let o=this.defaultHeaders(e);return qt(i,o),qt(i,t),ot(e.body)&&U!=="node"&&delete i["content-type"],Ie(o,"x-stainless-retry-count")===void 0&&Ie(t,"x-stainless-retry-count")===void 0&&(i["x-stainless-retry-count"]=String(n)),Ie(o,"x-stainless-timeout")===void 0&&Ie(t,"x-stainless-timeout")===void 0&&e.timeout&&(i["x-stainless-timeout"]=String(e.timeout)),this.validateHeaders(i,t),i}_calculateNonstreamingTimeout(e){if(3600*e/128e3>600)throw new c("Streaming is strongly recommended for operations that may take longer than 10 minutes. See https://github.com/anthropics/anthropic-sdk-python#streaming-responses for more details");return 600*1e3}async prepareOptions(e){}async prepareRequest(e,{url:t,options:r}){}parseHeaders(e){return e?Symbol.iterator in e?Object.fromEntries(Array.from(e).map(t=>[...t])):{...e}:{}}makeStatusError(e,t,r,n){return m.generate(e,t,r,n)}request(e,t=null){return new Be(this.makeRequest(e,t))}async makeRequest(e,t){let r=await e,n=r.maxRetries??this.maxRetries;t==null&&(t=n),await this.prepareOptions(r);let{req:i,url:o,timeout:a}=this.buildRequest(r,{retryCount:n-t});if(await this.prepareRequest(i,{url:o,options:r}),te("request",o,r,i.headers),r.signal?.aborted)throw new p;let h=new AbortController,d=await this.fetchWithTimeout(o,i,a,h).catch(Ae);if(d instanceof Error){if(r.signal?.aborted)throw new p;if(t)return this.retryRequest(r,t);throw d.name==="AbortError"?new $:new R({cause:d})}let _=st(d.headers);if(!d.ok){if(t&&this.shouldRetry(d)){let ze=`retrying, ${t} attempts remaining`;return te(`response (error; ${ze})`,d.status,o,_),this.retryRequest(r,t,_)}let C=await d.text().catch(ze=>Ae(ze).message),Pe=kr(C),Ge=Pe?void 0:C;throw te(`response (error; ${t?"(error; no more retries left)":"(error; not retryable)"})`,d.status,o,_,Ge),this.makeStatusError(d.status,Pe,Ge,_)}return{response:d,options:r,controller:h}}requestAPIList(e,t){let r=this.makeRequest(t,null);return new ct(this,r,e)}buildURL(e,t){let r=Br(e)?new URL(e):new URL(this.baseURL+(this.baseURL.endsWith("/")&&e.startsWith("/")?e.slice(1):e)),n=this.defaultQuery();return he(n)||(t={...n,...t}),typeof t=="object"&&t&&!Array.isArray(t)&&(r.search=this.stringifyQuery(t)),r.toString()}stringifyQuery(e){return Object.entries(e).filter(([t,r])=>typeof r<"u").map(([t,r])=>{if(typeof r=="string"||typeof r=="number"||typeof r=="boolean")return`${encodeURIComponent(t)}=${encodeURIComponent(r)}`;if(r===null)return`${encodeURIComponent(t)}=`;throw new c(`Cannot stringify type ${typeof r}; Expected string, number, boolean, or null. If you need to pass nested query parameters, you can manually encode them, e.g. { query: { 'foo[key1]': value1, 'foo[key2]': value2 } }, and please open a GitHub issue requesting better support for your use case.`)}).join("&")}async fetchWithTimeout(e,t,r,n){let{signal:i,...o}=t||{};i&&i.addEventListener("abort",()=>n.abort());let a=setTimeout(()=>n.abort(),r),h={signal:n.signal,...o};h.method&&(h.method=h.method.toUpperCase());let d=60*1e3,_=setTimeout(()=>{if(h&&h?.agent?.sockets)for(let C of Object.values(h?.agent?.sockets).flat())C?.setKeepAlive&&C.setKeepAlive(!0,d)},d);return this.fetch.call(void 0,e,h).finally(()=>{clearTimeout(a),clearTimeout(_)})}shouldRetry(e){let t=e.headers.get("x-should-retry");return t==="true"?!0:t==="false"?!1:e.status===408||e.status===409||e.status===429||e.status>=500}async retryRequest(e,t,r){let n,i=r?.["retry-after-ms"];if(i){let a=parseFloat(i);Number.isNaN(a)||(n=a)}let o=r?.["retry-after"];if(o&&!n){let a=parseFloat(o);Number.isNaN(a)?n=Date.parse(o)-Date.now():n=a*1e3}if(!(n&&0<=n&&n<60*1e3)){let a=e.maxRetries??this.maxRetries;n=this.calculateDefaultRetryTimeoutMillis(t,a)}return await Tr(n),this.makeRequest(e,t-1)}calculateDefaultRetryTimeoutMillis(e,t){let i=t-e,o=Math.min(.5*Math.pow(2,i),8),a=1-Math.random()*.25;return o*a*1e3}getUserAgent(){return`${this.constructor.name}/JS ${N}`}},Ce=class{constructor(e,t,r,n){ke.set(this,void 0),Sr(this,ke,e,"f"),this.options=n,this.response=t,this.body=r}hasNextPage(){return this.getPaginatedItems().length?this.nextPageInfo()!=null:!1}async getNextPage(){let e=this.nextPageInfo();if(!e)throw new c("No next page expected; please check `.hasNextPage()` before calling `.getNextPage()`.");let t={...this.options};if("params"in e&&typeof t.query=="object")t.query={...t.query,...e.params};else if("url"in e){let r=[...Object.entries(t.query||{}),...e.url.searchParams.entries()];for(let[n,i]of r)e.url.searchParams.set(n,i);t.query=void 0,t.path=e.url.toString()}return await Pr(this,ke,"f").requestAPIList(this.constructor,t)}async*iterPages(){let e=this;for(yield e;e.hasNextPage();)e=await e.getNextPage(),yield e}async*[(ke=new WeakMap,Symbol.asyncIterator)](){for await(let e of this.iterPages())for(let t of e.getPaginatedItems())yield t}},ct=class extends Be{constructor(e,t,r){super(t,async n=>new r(e,n.response,await Ft(n),n.options))}async*[Symbol.asyncIterator](){let e=await this;for await(let t of e)yield t}},st=s=>new Proxy(Object.fromEntries(s.entries()),{get(e,t){let r=t.toString();return e[r.toLowerCase()]||e[r]}}),Mr={method:!0,path:!0,query:!0,body:!0,headers:!0,maxRetries:!0,stream:!0,timeout:!0,httpAgent:!0,signal:!0,idempotencyKey:!0,__binaryRequest:!0,__binaryResponse:!0,__streamClass:!0},x=s=>typeof s=="object"&&s!==null&&!he(s)&&Object.keys(s).every(e=>Nt(Mr,e)),Er=()=>{if(typeof Deno<"u"&&Deno.build!=null)return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":N,"X-Stainless-OS":Ot(Deno.build.os),"X-Stainless-Arch":Ct(Deno.build.arch),"X-Stainless-Runtime":"deno","X-Stainless-Runtime-Version":typeof Deno.version=="string"?Deno.version:Deno.version?.deno??"unknown"};if(typeof EdgeRuntime<"u")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":N,"X-Stainless-OS":"Unknown","X-Stainless-Arch":`other:${EdgeRuntime}`,"X-Stainless-Runtime":"edge","X-Stainless-Runtime-Version":process.version};if(Object.prototype.toString.call(typeof process<"u"?process:0)==="[object process]")return{"X-Stainless-Lang":"js","X-Stainless-Package-Version":N,"X-Stainless-OS":Ot(process.platform),"X-Stainless-Arch":Ct(process.arch),"X-Stainless-Runtime":"node","X-Stainless-Runtime-Version":process.version};let s=Ar();return s?{"X-Stainless-Lang":"js","X-Stainless-Package-Version":N,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":`browser:${s.browser}`,"X-Stainless-Runtime-Version":s.version}:{"X-Stainless-Lang":"js","X-Stainless-Package-Version":N,"X-Stainless-OS":"Unknown","X-Stainless-Arch":"unknown","X-Stainless-Runtime":"unknown","X-Stainless-Runtime-Version":"unknown"}};function Ar(){if(typeof navigator>"u"||!navigator)return null;let s=[{key:"edge",pattern:/Edge(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/MSIE(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"ie",pattern:/Trident(?:.*rv\:(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"chrome",pattern:/Chrome(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"firefox",pattern:/Firefox(?:\W+(\d+)\.(\d+)(?:\.(\d+))?)?/},{key:"safari",pattern:/(?:Version\W+(\d+)\.(\d+)(?:\.(\d+))?)?(?:\W+Mobile\S*)?\W+Safari/}];for(let{key:e,pattern:t}of s){let r=t.exec(navigator.userAgent);if(r){let n=r[1]||0,i=r[2]||0,o=r[3]||0;return{browser:e,version:`${n}.${i}.${o}`}}}return null}var Ct=s=>s==="x32"?"x32":s==="x86_64"||s==="x64"?"x64":s==="arm"?"arm":s==="aarch64"||s==="arm64"?"arm64":s?`other:${s}`:"unknown",Ot=s=>(s=s.toLowerCase(),s.includes("ios")?"iOS":s==="android"?"Android":s==="darwin"?"MacOS":s==="win32"?"Windows":s==="freebsd"?"FreeBSD":s==="openbsd"?"OpenBSD":s==="linux"?"Linux":s?`Other:${s}`:"Unknown"),vt,Rr=()=>vt??(vt=Er()),kr=s=>{try{return JSON.parse(s)}catch{return}},Ir=/^[a-z][a-z0-9+.-]*:/i,Br=s=>Ir.test(s),Tr=s=>new Promise(e=>setTimeout(e,s)),at=(s,e)=>{if(typeof e!="number"||!Number.isInteger(e))throw new c(`${s} must be an integer`);if(e<0)throw new c(`${s} must be a positive integer`);return e},Ae=s=>{if(s instanceof Error)return s;if(typeof s=="object"&&s!==null)try{return new Error(JSON.stringify(s))}catch{}return new Error(String(s))};var Oe=s=>{if(typeof process<"u")return process.env?.[s]?.trim()??void 0;if(typeof Deno<"u")return Deno.env?.get?.(s)?.trim()};function he(s){if(!s)return!0;for(let e in s)return!1;return!0}function Nt(s,e){return Object.prototype.hasOwnProperty.call(s,e)}function qt(s,e){for(let t in e){if(!Nt(e,t))continue;let r=t.toLowerCase();if(!r)continue;let n=e[t];n===null?delete s[r]:n!==void 0&&(s[r]=n)}}function te(s,...e){typeof process<"u"&&process?.env?.DEBUG==="true"&&console.log(`Anthropic:DEBUG:${s}`,...e)}var Cr=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,s=>{let e=Math.random()*16|0;return(s==="x"?e:e&3|8).toString(16)}),Ut=()=>typeof window<"u"&&typeof window.document<"u"&&typeof navigator<"u",Or=s=>typeof s?.get=="function";var Ie=(s,e)=>{let t=e.toLowerCase();if(Or(s)){let r=e[0]?.toUpperCase()+e.substring(1).replace(/([^\w])(\w)/g,(n,i,o)=>i+o.toUpperCase());for(let n of[e,t,e.toUpperCase(),r]){let i=s.get(n);if(i)return i}}for(let[r,n]of Object.entries(s))if(r.toLowerCase()===t)return Array.isArray(n)?(n.length<=1||console.warn(`Received ${n.length} entries for the ${e} header, using the first entry.`),n[0]):n};var E=class extends Ce{constructor(e,t,r,n){super(e,t,r,n),this.data=r.data||[],this.has_more=r.has_more||!1,this.first_id=r.first_id||null,this.last_id=r.last_id||null}getPaginatedItems(){return this.data??[]}hasNextPage(){return this.has_more===!1?!1:super.hasNextPage()}nextPageParams(){let e=this.nextPageInfo();if(!e)return null;if("params"in e)return e.params;let t=Object.fromEntries(e.url.searchParams);return Object.keys(t).length?t:null}nextPageInfo(){if(this.options.query?.before_id){let t=this.first_id;return t?{params:{before_id:t}}:null}let e=this.last_id;return e?{params:{after_id:e}}:null}};var g=class{constructor(e){this._client=e}};var D=class extends g{retrieve(e,t){return this._client.get(`/v1/models/${e}?beta=true`,t)}list(e={},t){return x(e)?this.list({},e):this._client.getAPIList("/v1/models?beta=true",re,{query:e,...t})}},re=class extends E{};D.BetaModelInfosPage=re;var se=class s{constructor(e,t){this.iterator=e,this.controller=t}async*decoder(){let e=new k;for await(let t of this.iterator)for(let r of e.decode(t))yield JSON.parse(r);for(let t of e.flush())yield JSON.parse(t)}[Symbol.asyncIterator](){return this.decoder()}static fromResponse(e,t){if(!e.body)throw t.abort(),new c("Attempted to iterate over a response with no body");return new s(le(e.body),t)}};var W=class extends g{create(e,t){let{betas:r,...n}=e;return this._client.post("/v1/messages/batches?beta=true",{body:n,...t,headers:{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString(),...t?.headers}})}retrieve(e,t={},r){if(x(t))return this.retrieve(e,{},t);let{betas:n}=t;return this._client.get(`/v1/messages/batches/${e}?beta=true`,{...r,headers:{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString(),...r?.headers}})}list(e={},t){if(x(e))return this.list({},e);let{betas:r,...n}=e;return this._client.getAPIList("/v1/messages/batches?beta=true",ne,{query:n,...t,headers:{"anthropic-beta":[...r??[],"message-batches-2024-09-24"].toString(),...t?.headers}})}delete(e,t={},r){if(x(t))return this.delete(e,{},t);let{betas:n}=t;return this._client.delete(`/v1/messages/batches/${e}?beta=true`,{...r,headers:{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString(),...r?.headers}})}cancel(e,t={},r){if(x(t))return this.cancel(e,{},t);let{betas:n}=t;return this._client.post(`/v1/messages/batches/${e}/cancel?beta=true`,{...r,headers:{"anthropic-beta":[...n??[],"message-batches-2024-09-24"].toString(),...r?.headers}})}async results(e,t={},r){if(x(t))return this.results(e,{},t);let n=await this.retrieve(e);if(!n.results_url)throw new c(`No batch \`results_url\`; Has it finished processing? ${n.processing_status} - ${n.id}`);let{betas:i}=t;return this._client.get(n.results_url,{...r,headers:{"anthropic-beta":[...i??[],"message-batches-2024-09-24"].toString(),Accept:"application/binary",...r?.headers},__binaryResponse:!0})._thenUnwrap((o,a)=>se.fromResponse(a.response,a.controller))}},ne=class extends E{};W.BetaMessageBatchesPage=ne;var jr=s=>{let e=0,t=[];for(;e<s.length;){let r=s[e];if(r==="\\"){e++;continue}if(r==="{"){t.push({type:"brace",value:"{"}),e++;continue}if(r==="}"){t.push({type:"brace",value:"}"}),e++;continue}if(r==="["){t.push({type:"paren",value:"["}),e++;continue}if(r==="]"){t.push({type:"paren",value:"]"}),e++;continue}if(r===":"){t.push({type:"separator",value:":"}),e++;continue}if(r===","){t.push({type:"delimiter",value:","}),e++;continue}if(r==='"'){let a="",h=!1;for(r=s[++e];r!=='"';){if(e===s.length){h=!0;break}if(r==="\\"){if(e++,e===s.length){h=!0;break}a+=r+s[e],r=s[++e]}else a+=r,r=s[++e]}r=s[++e],h||t.push({type:"string",value:a});continue}if(r&&/\s/.test(r)){e++;continue}let i=/[0-9]/;if(r&&i.test(r)||r==="-"||r==="."){let a="";for(r==="-"&&(a+=r,r=s[++e]);r&&i.test(r)||r===".";)a+=r,r=s[++e];t.push({type:"number",value:a});continue}let o=/[a-z]/i;if(r&&o.test(r)){let a="";for(;r&&o.test(r)&&e!==s.length;)a+=r,r=s[++e];if(a=="true"||a=="false"||a==="null")t.push({type:"name",value:a});else{e++;continue}continue}e++}return t},ie=s=>{if(s.length===0)return s;let e=s[s.length-1];switch(e.type){case"separator":return s=s.slice(0,s.length-1),ie(s);break;case"number":let t=e.value[e.value.length-1];if(t==="."||t==="-")return s=s.slice(0,s.length-1),ie(s);case"string":let r=s[s.length-2];if(r?.type==="delimiter")return s=s.slice(0,s.length-1),ie(s);if(r?.type==="brace"&&r.value==="{")return s=s.slice(0,s.length-1),ie(s);break;case"delimiter":return s=s.slice(0,s.length-1),ie(s);break}return s},Nr=s=>{let e=[];return s.map(t=>{t.type==="brace"&&(t.value==="{"?e.push("}"):e.splice(e.lastIndexOf("}"),1)),t.type==="paren"&&(t.value==="["?e.push("]"):e.splice(e.lastIndexOf("]"),1))}),e.length>0&&e.reverse().map(t=>{t==="}"?s.push({type:"brace",value:"}"}):t==="]"&&s.push({type:"paren",value:"]"})}),s},Ur=s=>{let e="";return s.map(t=>{switch(t.type){case"string":e+='"'+t.value+'"';break;default:e+=t.value;break}}),e},ve=s=>JSON.parse(Ur(Nr(ie(jr(s)))));var y=function(s,e,t,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(s,t):n?n.value=t:e.set(s,t),t},u=function(s,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(s):r?r.value:e.get(s)},S,v,de,qe,me,pe,Fe,ge,I,ye,je,Ne,oe,Ue,$e,ut,$t,lt,ft,ht,dt,Lt,Dt="__json_buf",Le=class s{constructor(){S.add(this),this.messages=[],this.receivedMessages=[],v.set(this,void 0),this.controller=new AbortController,de.set(this,void 0),qe.set(this,()=>{}),me.set(this,()=>{}),pe.set(this,void 0),Fe.set(this,()=>{}),ge.set(this,()=>{}),I.set(this,{}),ye.set(this,!1),je.set(this,!1),Ne.set(this,!1),oe.set(this,!1),Ue.set(this,void 0),$e.set(this,void 0),lt.set(this,e=>{if(y(this,je,!0,"f"),e instanceof Error&&e.name==="AbortError"&&(e=new p),e instanceof p)return y(this,Ne,!0,"f"),this._emit("abort",e);if(e instanceof c)return this._emit("error",e);if(e instanceof Error){let t=new c(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new c(String(e)))}),y(this,de,new Promise((e,t)=>{y(this,qe,e,"f"),y(this,me,t,"f")}),"f"),y(this,pe,new Promise((e,t)=>{y(this,Fe,e,"f"),y(this,ge,t,"f")}),"f"),u(this,de,"f").catch(()=>{}),u(this,pe,"f").catch(()=>{})}get response(){return u(this,Ue,"f")}get request_id(){return u(this,$e,"f")}async withResponse(){let e=await u(this,de,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new s;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,r){let n=new s;for(let i of t.messages)n._addMessageParam(i);return n._run(()=>n._createMessage(e,{...t,stream:!0},{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":"stream"}})),n}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},u(this,lt,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,r){let n=r?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),u(this,S,"m",ft).call(this);let{response:i,data:o}=await e.create({...t,stream:!0},{...r,signal:this.controller.signal}).withResponse();this._connected(i);for await(let a of o)u(this,S,"m",ht).call(this,a);if(o.controller.signal?.aborted)throw new p;u(this,S,"m",dt).call(this)}_connected(e){this.ended||(y(this,Ue,e,"f"),y(this,$e,e?.headers.get("request-id"),"f"),u(this,qe,"f").call(this,e),this._emit("connect"))}get ended(){return u(this,ye,"f")}get errored(){return u(this,je,"f")}get aborted(){return u(this,Ne,"f")}abort(){this.controller.abort()}on(e,t){return(u(this,I,"f")[e]||(u(this,I,"f")[e]=[])).push({listener:t}),this}off(e,t){let r=u(this,I,"f")[e];if(!r)return this;let n=r.findIndex(i=>i.listener===t);return n>=0&&r.splice(n,1),this}once(e,t){return(u(this,I,"f")[e]||(u(this,I,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,r)=>{y(this,oe,!0,"f"),e!=="error"&&this.once("error",r),this.once(e,t)})}async done(){y(this,oe,!0,"f"),await u(this,pe,"f")}get currentMessage(){return u(this,v,"f")}async finalMessage(){return await this.done(),u(this,S,"m",ut).call(this)}async finalText(){return await this.done(),u(this,S,"m",$t).call(this)}_emit(e,...t){if(u(this,ye,"f"))return;e==="end"&&(y(this,ye,!0,"f"),u(this,Fe,"f").call(this));let r=u(this,I,"f")[e];if(r&&(u(this,I,"f")[e]=r.filter(n=>!n.once),r.forEach(({listener:n})=>n(...t))),e==="abort"){let n=t[0];!u(this,oe,"f")&&!r?.length&&Promise.reject(n),u(this,me,"f").call(this,n),u(this,ge,"f").call(this,n),this._emit("end");return}if(e==="error"){let n=t[0];!u(this,oe,"f")&&!r?.length&&Promise.reject(n),u(this,me,"f").call(this,n),u(this,ge,"f").call(this,n),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",u(this,S,"m",ut).call(this))}async _fromReadableStream(e,t){let r=t?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),u(this,S,"m",ft).call(this),this._connected(null);let n=M.fromReadableStream(e,this.controller);for await(let i of n)u(this,S,"m",ht).call(this,i);if(n.controller.signal?.aborted)throw new p;u(this,S,"m",dt).call(this)}[(v=new WeakMap,de=new WeakMap,qe=new WeakMap,me=new WeakMap,pe=new WeakMap,Fe=new WeakMap,ge=new WeakMap,I=new WeakMap,ye=new WeakMap,je=new WeakMap,Ne=new WeakMap,oe=new WeakMap,Ue=new WeakMap,$e=new WeakMap,lt=new WeakMap,S=new WeakSet,ut=function(){if(this.receivedMessages.length===0)throw new c("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},$t=function(){if(this.receivedMessages.length===0)throw new c("stream ended without producing a Message with role=assistant");let t=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(t.length===0)throw new c("stream ended without producing a content block with type=text");return t.join(" ")},ft=function(){this.ended||y(this,v,void 0,"f")},ht=function(t){if(this.ended)return;let r=u(this,S,"m",Lt).call(this,t);switch(this._emit("streamEvent",t,r),t.type){case"content_block_delta":{let n=r.content.at(-1);switch(t.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",t.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",t.delta.citation,n.citations??[]);break}case"input_json_delta":{n.type==="tool_use"&&n.input&&this._emit("inputJson",t.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",t.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:t.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(r,!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{y(this,v,r,"f");break}case"content_block_start":case"message_delta":break}},dt=function(){if(this.ended)throw new c("stream has ended, this shouldn't happen");let t=u(this,v,"f");if(!t)throw new c("request ended without sending any chunks");return y(this,v,void 0,"f"),t},Lt=function(t){let r=u(this,v,"f");if(t.type==="message_start"){if(r)throw new c(`Unexpected event order, got ${t.type} before receiving "message_stop"`);return t.message}if(!r)throw new c(`Unexpected event order, got ${t.type} before "message_start"`);switch(t.type){case"message_stop":return r;case"message_delta":return r.stop_reason=t.delta.stop_reason,r.stop_sequence=t.delta.stop_sequence,r.usage.output_tokens=t.usage.output_tokens,r;case"content_block_start":return r.content.push(t.content_block),r;case"content_block_delta":{let n=r.content.at(t.index);switch(t.delta.type){case"text_delta":{n?.type==="text"&&(n.text+=t.delta.text);break}case"citations_delta":{n?.type==="text"&&(n.citations??(n.citations=[]),n.citations.push(t.delta.citation));break}case"input_json_delta":{if(n?.type==="tool_use"){let i=n[Dt]||"";i+=t.delta.partial_json,Object.defineProperty(n,Dt,{value:i,enumerable:!1,writable:!0}),i&&(n.input=ve(i))}break}case"thinking_delta":{n?.type==="thinking"&&(n.thinking+=t.delta.thinking);break}case"signature_delta":{n?.type==="thinking"&&(n.signature=t.delta.signature);break}default:t.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],t=[],r=!1;return this.on("streamEvent",n=>{let i=t.shift();i?i.resolve(n):e.push(n)}),this.on("end",()=>{r=!0;for(let n of t)n.resolve(void 0);t.length=0}),this.on("abort",n=>{r=!0;for(let i of t)i.reject(n);t.length=0}),this.on("error",n=>{r=!0;for(let i of t)i.reject(n);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise((i,o)=>t.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new M(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};var Wt={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"},q=class extends g{constructor(){super(...arguments),this.batches=new W(this._client)}create(e,t){let{betas:r,...n}=e;return n.model in Wt&&console.warn(`The model '${n.model}' is deprecated and will reach end-of-life on ${Wt[n.model]}
|
|
7
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),this._client.post("/v1/messages?beta=true",{body:n,timeout:this._client._options.timeout??(n.stream?6e5:this._client._calculateNonstreamingTimeout(n.max_tokens)),...t,headers:{...r?.toString()!=null?{"anthropic-beta":r?.toString()}:void 0,...t?.headers},stream:e.stream??!1})}stream(e,t){return Le.createMessage(this,e,t)}countTokens(e,t){let{betas:r,...n}=e;return this._client.post("/v1/messages/count_tokens?beta=true",{body:n,...t,headers:{"anthropic-beta":[...r??[],"token-counting-2024-11-01"].toString(),...t?.headers}})}};q.Batches=W;q.BetaMessageBatchesPage=ne;var A=class extends g{constructor(){super(...arguments),this.models=new D(this._client),this.messages=new q(this._client)}};A.Models=D;A.BetaModelInfosPage=re;A.Messages=q;var H=class extends g{create(e,t){return this._client.post("/v1/complete",{body:e,timeout:this._client._options.timeout??6e5,...t,stream:e.stream??!1})}};var X=class extends g{create(e,t){return this._client.post("/v1/messages/batches",{body:e,...t})}retrieve(e,t){return this._client.get(`/v1/messages/batches/${e}`,t)}list(e={},t){return x(e)?this.list({},e):this._client.getAPIList("/v1/messages/batches",ae,{query:e,...t})}delete(e,t){return this._client.delete(`/v1/messages/batches/${e}`,t)}cancel(e,t){return this._client.post(`/v1/messages/batches/${e}/cancel`,t)}async results(e,t){let r=await this.retrieve(e);if(!r.results_url)throw new c(`No batch \`results_url\`; Has it finished processing? ${r.processing_status} - ${r.id}`);return this._client.get(r.results_url,{...t,headers:{Accept:"application/binary",...t?.headers},__binaryResponse:!0})._thenUnwrap((n,i)=>se.fromResponse(i.response,i.controller))}},ae=class extends E{};X.MessageBatchesPage=ae;var w=function(s,e,t,r,n){if(r==="m")throw new TypeError("Private method is not writable");if(r==="a"&&!n)throw new TypeError("Private accessor was defined without a setter");if(typeof e=="function"?s!==e||!n:!e.has(s))throw new TypeError("Cannot write private member to an object whose class did not declare it");return r==="a"?n.call(s,t):n?n.value=t:e.set(s,t),t},l=function(s,e,t,r){if(t==="a"&&!r)throw new TypeError("Private accessor was defined without a getter");if(typeof e=="function"?s!==e||!r:!e.has(s))throw new TypeError("Cannot read private member from an object whose class did not declare it");return t==="m"?r:t==="a"?r.call(s):r?r.value:e.get(s)},P,F,we,De,be,_e,We,xe,B,Se,He,Xe,ce,Je,Ke,mt,Ht,pt,gt,yt,wt,Xt,Jt="__json_buf",Ve=class s{constructor(){P.add(this),this.messages=[],this.receivedMessages=[],F.set(this,void 0),this.controller=new AbortController,we.set(this,void 0),De.set(this,()=>{}),be.set(this,()=>{}),_e.set(this,void 0),We.set(this,()=>{}),xe.set(this,()=>{}),B.set(this,{}),Se.set(this,!1),He.set(this,!1),Xe.set(this,!1),ce.set(this,!1),Je.set(this,void 0),Ke.set(this,void 0),pt.set(this,e=>{if(w(this,He,!0,"f"),e instanceof Error&&e.name==="AbortError"&&(e=new p),e instanceof p)return w(this,Xe,!0,"f"),this._emit("abort",e);if(e instanceof c)return this._emit("error",e);if(e instanceof Error){let t=new c(e.message);return t.cause=e,this._emit("error",t)}return this._emit("error",new c(String(e)))}),w(this,we,new Promise((e,t)=>{w(this,De,e,"f"),w(this,be,t,"f")}),"f"),w(this,_e,new Promise((e,t)=>{w(this,We,e,"f"),w(this,xe,t,"f")}),"f"),l(this,we,"f").catch(()=>{}),l(this,_e,"f").catch(()=>{})}get response(){return l(this,Je,"f")}get request_id(){return l(this,Ke,"f")}async withResponse(){let e=await l(this,we,"f");if(!e)throw new Error("Could not resolve a `Response` object");return{data:this,response:e,request_id:e.headers.get("request-id")}}static fromReadableStream(e){let t=new s;return t._run(()=>t._fromReadableStream(e)),t}static createMessage(e,t,r){let n=new s;for(let i of t.messages)n._addMessageParam(i);return n._run(()=>n._createMessage(e,{...t,stream:!0},{...r,headers:{...r?.headers,"X-Stainless-Helper-Method":"stream"}})),n}_run(e){e().then(()=>{this._emitFinal(),this._emit("end")},l(this,pt,"f"))}_addMessageParam(e){this.messages.push(e)}_addMessage(e,t=!0){this.receivedMessages.push(e),t&&this._emit("message",e)}async _createMessage(e,t,r){let n=r?.signal;n&&(n.aborted&&this.controller.abort(),n.addEventListener("abort",()=>this.controller.abort())),l(this,P,"m",gt).call(this);let{response:i,data:o}=await e.create({...t,stream:!0},{...r,signal:this.controller.signal}).withResponse();this._connected(i);for await(let a of o)l(this,P,"m",yt).call(this,a);if(o.controller.signal?.aborted)throw new p;l(this,P,"m",wt).call(this)}_connected(e){this.ended||(w(this,Je,e,"f"),w(this,Ke,e?.headers.get("request-id"),"f"),l(this,De,"f").call(this,e),this._emit("connect"))}get ended(){return l(this,Se,"f")}get errored(){return l(this,He,"f")}get aborted(){return l(this,Xe,"f")}abort(){this.controller.abort()}on(e,t){return(l(this,B,"f")[e]||(l(this,B,"f")[e]=[])).push({listener:t}),this}off(e,t){let r=l(this,B,"f")[e];if(!r)return this;let n=r.findIndex(i=>i.listener===t);return n>=0&&r.splice(n,1),this}once(e,t){return(l(this,B,"f")[e]||(l(this,B,"f")[e]=[])).push({listener:t,once:!0}),this}emitted(e){return new Promise((t,r)=>{w(this,ce,!0,"f"),e!=="error"&&this.once("error",r),this.once(e,t)})}async done(){w(this,ce,!0,"f"),await l(this,_e,"f")}get currentMessage(){return l(this,F,"f")}async finalMessage(){return await this.done(),l(this,P,"m",mt).call(this)}async finalText(){return await this.done(),l(this,P,"m",Ht).call(this)}_emit(e,...t){if(l(this,Se,"f"))return;e==="end"&&(w(this,Se,!0,"f"),l(this,We,"f").call(this));let r=l(this,B,"f")[e];if(r&&(l(this,B,"f")[e]=r.filter(n=>!n.once),r.forEach(({listener:n})=>n(...t))),e==="abort"){let n=t[0];!l(this,ce,"f")&&!r?.length&&Promise.reject(n),l(this,be,"f").call(this,n),l(this,xe,"f").call(this,n),this._emit("end");return}if(e==="error"){let n=t[0];!l(this,ce,"f")&&!r?.length&&Promise.reject(n),l(this,be,"f").call(this,n),l(this,xe,"f").call(this,n),this._emit("end")}}_emitFinal(){this.receivedMessages.at(-1)&&this._emit("finalMessage",l(this,P,"m",mt).call(this))}async _fromReadableStream(e,t){let r=t?.signal;r&&(r.aborted&&this.controller.abort(),r.addEventListener("abort",()=>this.controller.abort())),l(this,P,"m",gt).call(this),this._connected(null);let n=M.fromReadableStream(e,this.controller);for await(let i of n)l(this,P,"m",yt).call(this,i);if(n.controller.signal?.aborted)throw new p;l(this,P,"m",wt).call(this)}[(F=new WeakMap,we=new WeakMap,De=new WeakMap,be=new WeakMap,_e=new WeakMap,We=new WeakMap,xe=new WeakMap,B=new WeakMap,Se=new WeakMap,He=new WeakMap,Xe=new WeakMap,ce=new WeakMap,Je=new WeakMap,Ke=new WeakMap,pt=new WeakMap,P=new WeakSet,mt=function(){if(this.receivedMessages.length===0)throw new c("stream ended without producing a Message with role=assistant");return this.receivedMessages.at(-1)},Ht=function(){if(this.receivedMessages.length===0)throw new c("stream ended without producing a Message with role=assistant");let t=this.receivedMessages.at(-1).content.filter(r=>r.type==="text").map(r=>r.text);if(t.length===0)throw new c("stream ended without producing a content block with type=text");return t.join(" ")},gt=function(){this.ended||w(this,F,void 0,"f")},yt=function(t){if(this.ended)return;let r=l(this,P,"m",Xt).call(this,t);switch(this._emit("streamEvent",t,r),t.type){case"content_block_delta":{let n=r.content.at(-1);switch(t.delta.type){case"text_delta":{n.type==="text"&&this._emit("text",t.delta.text,n.text||"");break}case"citations_delta":{n.type==="text"&&this._emit("citation",t.delta.citation,n.citations??[]);break}case"input_json_delta":{n.type==="tool_use"&&n.input&&this._emit("inputJson",t.delta.partial_json,n.input);break}case"thinking_delta":{n.type==="thinking"&&this._emit("thinking",t.delta.thinking,n.thinking);break}case"signature_delta":{n.type==="thinking"&&this._emit("signature",n.signature);break}default:t.delta}break}case"message_stop":{this._addMessageParam(r),this._addMessage(r,!0);break}case"content_block_stop":{this._emit("contentBlock",r.content.at(-1));break}case"message_start":{w(this,F,r,"f");break}case"content_block_start":case"message_delta":break}},wt=function(){if(this.ended)throw new c("stream has ended, this shouldn't happen");let t=l(this,F,"f");if(!t)throw new c("request ended without sending any chunks");return w(this,F,void 0,"f"),t},Xt=function(t){let r=l(this,F,"f");if(t.type==="message_start"){if(r)throw new c(`Unexpected event order, got ${t.type} before receiving "message_stop"`);return t.message}if(!r)throw new c(`Unexpected event order, got ${t.type} before "message_start"`);switch(t.type){case"message_stop":return r;case"message_delta":return r.stop_reason=t.delta.stop_reason,r.stop_sequence=t.delta.stop_sequence,r.usage.output_tokens=t.usage.output_tokens,r;case"content_block_start":return r.content.push(t.content_block),r;case"content_block_delta":{let n=r.content.at(t.index);switch(t.delta.type){case"text_delta":{n?.type==="text"&&(n.text+=t.delta.text);break}case"citations_delta":{n?.type==="text"&&(n.citations??(n.citations=[]),n.citations.push(t.delta.citation));break}case"input_json_delta":{if(n?.type==="tool_use"){let i=n[Jt]||"";i+=t.delta.partial_json,Object.defineProperty(n,Jt,{value:i,enumerable:!1,writable:!0}),i&&(n.input=ve(i))}break}case"thinking_delta":{n?.type==="thinking"&&(n.thinking+=t.delta.thinking);break}case"signature_delta":{n?.type==="thinking"&&(n.signature=t.delta.signature);break}default:t.delta}return r}case"content_block_stop":return r}},Symbol.asyncIterator)](){let e=[],t=[],r=!1;return this.on("streamEvent",n=>{let i=t.shift();i?i.resolve(n):e.push(n)}),this.on("end",()=>{r=!0;for(let n of t)n.resolve(void 0);t.length=0}),this.on("abort",n=>{r=!0;for(let i of t)i.reject(n);t.length=0}),this.on("error",n=>{r=!0;for(let i of t)i.reject(n);t.length=0}),{next:async()=>e.length?{value:e.shift(),done:!1}:r?{value:void 0,done:!0}:new Promise((i,o)=>t.push({resolve:i,reject:o})).then(i=>i?{value:i,done:!1}:{value:void 0,done:!0}),return:async()=>(this.abort(),{value:void 0,done:!0})}}toReadableStream(){return new M(this[Symbol.asyncIterator].bind(this),this.controller).toReadableStream()}};var T=class extends g{constructor(){super(...arguments),this.batches=new X(this._client)}create(e,t){return e.model in Kt&&console.warn(`The model '${e.model}' is deprecated and will reach end-of-life on ${Kt[e.model]}
|
|
8
|
-
Please migrate to a newer model. Visit https://docs.anthropic.com/en/docs/resources/model-deprecations for more information.`),this._client.post("/v1/messages",{body:e,timeout:this._client._options.timeout??(e.stream?6e5:this._client._calculateNonstreamingTimeout(e.max_tokens)),...t,stream:e.stream??!1})}stream(e,t){return Ve.createMessage(this,e,t)}countTokens(e,t){return this._client.post("/v1/messages/count_tokens",{body:e,...t})}},Kt={"claude-1.3":"November 6th, 2024","claude-1.3-100k":"November 6th, 2024","claude-instant-1.1":"November 6th, 2024","claude-instant-1.1-100k":"November 6th, 2024","claude-instant-1.2":"November 6th, 2024","claude-3-sonnet-20240229":"July 21st, 2025","claude-2.1":"July 21st, 2025","claude-2.0":"July 21st, 2025"};T.Batches=X;T.MessageBatchesPage=ae;var j=class extends g{retrieve(e,t){return this._client.get(`/v1/models/${e}`,t)}list(e={},t){return x(e)?this.list({},e):this._client.getAPIList("/v1/models",J,{query:e,...t})}},J=class extends E{};j.ModelInfosPage=J;var Vt,f=class extends Te{constructor({baseURL:e=Oe("ANTHROPIC_BASE_URL"),apiKey:t=Oe("ANTHROPIC_API_KEY")??null,authToken:r=Oe("ANTHROPIC_AUTH_TOKEN")??null,...n}={}){let i={apiKey:t,authToken:r,...n,baseURL:e||"https://api.anthropic.com"};if(!i.dangerouslyAllowBrowser&&Ut())throw new c(`It looks like you're running in a browser-like environment.
|
|
9
|
-
|
|
10
|
-
This is disabled by default, as it risks exposing your secret API credentials to attackers.
|
|
11
|
-
If you understand the risks and have appropriate mitigations in place,
|
|
12
|
-
you can set the \`dangerouslyAllowBrowser\` option to \`true\`, e.g.,
|
|
13
|
-
|
|
14
|
-
new Anthropic({ apiKey, dangerouslyAllowBrowser: true });
|
|
15
|
-
`);super({baseURL:i.baseURL,timeout:i.timeout??6e5,httpAgent:i.httpAgent,maxRetries:i.maxRetries,fetch:i.fetch}),this.completions=new H(this),this.messages=new T(this),this.models=new j(this),this.beta=new A(this),this._options=i,this.apiKey=t,this.authToken=r}defaultQuery(){return this._options.defaultQuery}defaultHeaders(e){return{...super.defaultHeaders(e),...this._options.dangerouslyAllowBrowser?{"anthropic-dangerous-direct-browser-access":"true"}:void 0,"anthropic-version":"2023-06-01",...this._options.defaultHeaders}}validateHeaders(e,t){if(!(this.apiKey&&e["x-api-key"])&&t["x-api-key"]!==null&&!(this.authToken&&e.authorization)&&t.authorization!==null)throw new Error('Could not resolve authentication method. Expected either apiKey or authToken to be set. Or for one of the "X-Api-Key" or "Authorization" headers to be explicitly omitted')}authHeaders(e){let t=this.apiKeyAuth(e),r=this.bearerAuth(e);return t!=null&&!he(t)?t:r!=null&&!he(r)?r:{}}apiKeyAuth(e){return this.apiKey==null?{}:{"X-Api-Key":this.apiKey}}bearerAuth(e){return this.authToken==null?{}:{Authorization:`Bearer ${this.authToken}`}}};Vt=f;f.Anthropic=Vt;f.HUMAN_PROMPT=`
|
|
16
|
-
|
|
17
|
-
Human:`;f.AI_PROMPT=`
|
|
18
|
-
|
|
19
|
-
Assistant:`;f.DEFAULT_TIMEOUT=6e5;f.AnthropicError=c;f.APIError=m;f.APIConnectionError=R;f.APIConnectionTimeoutError=$;f.APIUserAbortError=p;f.NotFoundError=z;f.ConflictError=Q;f.RateLimitError=Z;f.BadRequestError=K;f.AuthenticationError=V;f.InternalServerError=ee;f.PermissionDeniedError=G;f.UnprocessableEntityError=Y;f.toFile=it;f.fileFromPath=ue;f.Completions=H;f.Messages=T;f.Models=j;f.ModelInfosPage=J;f.Beta=A;var{HUMAN_PROMPT:Pn,AI_PROMPT:Mn}=f,En=f;export{Mn as AI_PROMPT,R as APIConnectionError,$ as APIConnectionTimeoutError,m as APIError,p as APIUserAbortError,f as Anthropic,c as AnthropicError,V as AuthenticationError,K as BadRequestError,Q as ConflictError,Pn as HUMAN_PROMPT,ee as InternalServerError,z as NotFoundError,G as PermissionDeniedError,Z as RateLimitError,Y as UnprocessableEntityError,En as default,ue as fileFromPath,it as toFile};
|
package/chunks/serve-XVAIQ37L.js
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as l,h as a,k as i}from"./chunk-GBM3TZFD.js";import{k as n}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as o}from"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import{a as t}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var v=["trace","debug","info","warn","error","fatal"],P=async m=>{let{flags:e}=o(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),r=l({renderer:i.ansi(),sink:a.stdout()});r.writeln(n(`
|
|
3
|
-
\u{1F680} Serving production build...
|
|
4
|
-
`));let p=e.port,s=e["log-level"]??"info",u=v.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:g},{reactRenderer:c,reactHtmlShellBuilder:d},{reactPlugin:L},{createTailwindPlugin:f}]=await Promise.all([import("./main-HJQEBLLN.js"),import("./mod-NCF6OSXO.js"),import("./mod-OS3BCM2G.js"),import("./mod-JZNE2HH6.js")]);return await r.close(),await g({mode:"serve",port:p,logLevel:u,hmr:!1,renderer:c,htmlShell:d,frameworkPlugin:L,cssPlugin:f({globalCssPath:"src/app/styles/global.css"})}),t(void 0)};export{P as main};
|
package/chunks/spec-3UGU4UBE.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as j,i as F}from"./chunk-UESOCN2G.js";import{a as x,b as C}from"./chunk-LNNNLUZT.js";import{a as T,d as U}from"./chunk-2EVWKUN6.js";import{c as S,d as P,e as I,f as A,g as L,h as R,i as O,j as k,q as z}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as y,h as D,k as v}from"./chunk-GBM3TZFD.js";import{c as d,d as c,f as w,g as $,h as E,k as N}from"./chunk-3SXTMY75.js";import{a as h,b as g}from"./chunk-A6RDYP6R.js";import{t as l}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var ee=async i=>{let e=i?.[0];if(e==="new")return await M(i?.slice(1));if(e==="list")return await B(i?.slice(1));if(e==="switch")return await q(i?.slice(1));let t=await k(l.process.cwd()),n=C(t),r=y({renderer:v.ansi(),sink:D.stdout()});return r.writeln(`Usage: ${n} spec <new "description" | list | switch <name>>`),await r.close(),h(void 0)},M=async i=>{let e=y({renderer:v.ansi(),sink:D.stdout()}),t=l.process.cwd(),n=await k(t);if(!await z(t))return e.writeln(w("noskills is not initialized.")," Run: ",d(x("init",n))),await e.close(),g({exitCode:1});let r=null,p=[];if(i!==void 0)for(let f of i)f.startsWith("--name=")?r=f.slice(7):f.startsWith("-")||p.push(f);let m=p.join(" ");if(m.length===0)return e.writeln(w("Please provide a description: "),d(`${C(n)} spec new "photo auto-listing"`)),await e.close(),g({exitCode:1});let a=r??W(m),o=await X(t,a),s=`spec/${o}`,u=await P(t);if(u.phase!=="IDLE"&&u.phase!=="DONE")return e.writeln(w(`Cannot start new spec in phase: ${u.phase}`),c(" \u2014 finish or reset the current spec first.")),await e.close(),g({exitCode:1});let b=j(u.phase==="DONE"?F(u):u,o,s);return await l.fs.mkdir(`${t}/${S.specDir(o)}`,{recursive:!0}),await I(t,b),await R(t,o,b),e.writeln($("\u2714")," Spec started: ",d(o)),e.writeln(" Directory: ",c(S.specDir(o))),e.writeln(" Branch: ",c(s)),e.writeln(" Phase: ",E("DISCOVERY")),e.writeln(""),e.writeln("Run ",d(x("next",n))," to begin discovery questions."),await e.close(),h(void 0)},W=i=>i.normalize("NFD").replace(/[\u0300-\u036f]/g,"").toLowerCase().replace(/[^a-z0-9]+/g,"-").replace(/^-|-$/g,"").slice(0,50).replace(/-$/,""),X=async(i,e)=>{let t=`${i}/${S.specsDir}`,n=async r=>{try{return await l.fs.stat(`${t}/${r}`),!0}catch{return!1}};if(!await n(e))return e;for(let r=2;r<=99;r++){let p=`${e}-${r}`;if(!await n(p))return p}return`${e}-${Date.now()}`},B=async i=>{let e=l.process.cwd(),t=T(i),n=await A(e),r=await O(e),p=`${e}/${S.specsDir}`,m=new Set(r.map(s=>s.name)),a=[];for(let s of r)a.push({name:s.name,phase:s.state.phase,iteration:s.state.execution.iteration,active:s.name===n});try{for await(let s of l.fs.readDir(p))s.isDirectory&&!m.has(s.name)&&a.push({name:s.name,phase:"IDLE",iteration:0,active:s.name===n})}catch{}if(t==="json")return await U(a,"json"),h(void 0);let o=y({renderer:v.ansi(),sink:D.stdout()});if(o.writeln(d("Specs")),o.writeln(""),a.length===0)o.writeln(c(" No specs yet."));else for(let s of a){let u=s.active?$("\u25CF"):c("\u25CB"),b=s.active?d(s.name):c(s.name),f=s.phase==="DONE"?$(s.phase):s.phase==="EXECUTING"?N(s.phase):s.phase==="BLOCKED"?w(s.phase):E(s.phase),G=s.phase==="EXECUTING"?c(` iteration ${s.iteration}`):"";o.writeln(" ",u," ",b," ",f,G)}return await o.close(),h(void 0)},q=async i=>{let e=y({renderer:v.ansi(),sink:D.stdout()}),t=l.process.cwd(),n=i?.[0],r=await k(t);if(n===void 0||n.length===0)return e.writeln(w("Please provide a spec name: "),d(`${C(r)} spec switch my-feature`)),await e.close(),g({exitCode:1});let p=await A(t),m=await P(t);p!==null&&m.spec!==null&&await R(t,p,m);let a=await L(t,n),o=await l.fs.stat(`${t}/${S.specDir(n)}`).then(()=>!0).catch(()=>!1);return a.phase==="IDLE"&&!o?(e.writeln(w(`Spec "${n}" not found.`)),e.writeln(c(`Run \`${x("spec list",r)}\` to see available specs.`)),await e.close(),g({exitCode:1})):(await I(t,a),e.writeln($("\u2714")," Switched to: ",d(n)," (",N(a.phase),")"),a.phase==="EXECUTING"&&(e.writeln(c(` Iteration: ${a.execution.iteration}`)),a.execution.lastProgress!==null&&e.writeln(c(` Progress: ${a.execution.lastProgress}`))),await e.close(),h(void 0))};export{ee as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-DAYSTLLV.js";import"./chunk-OCPEFZBJ.js";import{a as h}from"./chunk-LNNNLUZT.js";import{a as I,d as w}from"./chunk-2EVWKUN6.js";import{d as y,j as u,q as D}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as d,k as m}from"./chunk-GBM3TZFD.js";import{c as i,d as r,f as c,g as b,h as o,k as E}from"./chunk-3SXTMY75.js";import{a as g,b as C}from"./chunk-A6RDYP6R.js";import{t as x}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var U=async P=>{let n=x.process.cwd(),a=I(P);if(!await D(n)){if(a==="json")await w({error:"noskills is not initialized"},a);else{let s=p({renderer:m.ansi(),sink:d.stdout()}),l=await u(n);s.writeln(c("noskills is not initialized.")," Run: ",i(h("init",l))),await s.close()}return C({exitCode:1})}let e=await y(n),t=await u(n),k={phase:e.phase,spec:e.spec,branch:e.branch,discovery:e.phase==="DISCOVERY"?{answered:e.discovery.answers.length,total:f.length}:void 0,execution:e.phase==="EXECUTING"||e.phase==="BLOCKED"?{iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,debt:e.execution.debt?.items.length??0,verificationPassed:e.execution.lastVerification?.passed??null}:void 0,concerns:t?.concerns??[],tools:t?.tools??[],decisions:e.decisions.length,pendingClear:e.pendingClear};if(a!=="json"){let s=p({renderer:m.ansi(),sink:d.stdout()});s.writeln(i(`${h("status",t)}`)),s.writeln("");let l=e.phase==="DONE"?b(e.phase):e.phase==="BLOCKED"?c(e.phase):e.phase==="EXECUTING"?E(e.phase):o(e.phase);s.writeln(" Phase: ",l),e.spec!==null&&s.writeln(" Spec: ",i(e.spec)),e.branch!==null&&s.writeln(" Branch: ",e.branch),e.phase==="DISCOVERY"&&s.writeln(` Discovery: ${e.discovery.answers.length}/${f.length} questions answered`),e.phase==="EXECUTING"&&(s.writeln(` Iteration: ${e.execution.iteration}`),e.execution.lastProgress!==null&&s.writeln(" Progress: ",r(e.execution.lastProgress)),e.execution.debt!==null&&s.writeln(o(` Debt: ${e.execution.debt.items.length} items`))),t!==null&&(s.writeln(""),t.concerns.length>0&&s.writeln(" Concerns: ",r(t.concerns.join(", "))),t.tools.length>0&&s.writeln(" Tools: ",r(t.tools.join(", ")))),e.decisions.length>0&&(s.writeln(""),s.writeln(` Decisions: ${e.decisions.length}`)),e.pendingClear&&(s.writeln(""),s.writeln(o(" \u26A0 Context clear pending \u2014 run `/clear`"))),await s.close()}else await w(k,"json");return g(void 0)};export{U as main};
|
package/chunks/sync-M7MKXMYN.js
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as w}from"./chunk-JAQN64PH.js";import{a as g}from"./chunk-LNNNLUZT.js";import{j as u}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as d,k as f}from"./chunk-GBM3TZFD.js";import{c as m,d as r,f as c,g as n}from"./chunk-3SXTMY75.js";import{a as o,b as a}from"./chunk-A6RDYP6R.js";import{t as l}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var v=async h=>{let s=p({renderer:f.ansi(),sink:d.stdout()}),t=l.process.cwd(),e=await u(t);if(e===null)return s.writeln(c("noskills is not initialized.")," Run: ",m(g("init",e))),await s.close(),a({exitCode:1});s.writeln(r("Syncing tool files..."));let i=await w(t,e.tools,e);for(let y of i)s.writeln(" ",n("\u2714"),` ${y}`);return i.length===0&&s.writeln(r(" No tools configured.")),s.writeln(""),s.writeln(n("Done.")),await s.close(),o(void 0)};export{v as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as e,b as s,c as l,d as o,e as r,f as a}from"./chunk-OIZ7HL2C.js";import"./chunk-5GGGQJ4P.js";import"./chunk-J2Z7NG2X.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-QSION3QA.js";import"./chunk-PWLF3WXM.js";import{b as n}from"./chunk-PZNCE6QK.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var i=new n("system").description("Commands related with this CLI").command(new n("install").description("Install eser CLI globally").run(e)).command(new n("uninstall").description("Uninstall eser CLI globally").run(s)).command(new n("update").description("Update eser CLI to the latest version").run(l)).command(new n("completions").description("Generate shell completion scripts").flag({name:"shell",type:"string",description:"Shell type: bash, zsh, or fish"}).run(o)).command(new n("version").description("Show version and check for updates").flag({name:"bare",type:"boolean",description:"Print version number only"}).run(r)).command(new n("doctor").description("Run diagnostic checks").run(a));export{i as systemCommand};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{c as a,d as b,e as c,f as d}from"./chunk-B6EATLKL.js";import"./chunk-UJPVEQX7.js";import"./chunk-KPWEJXPI.js";import"./chunk-CUIMSX4V.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-NBA6EFWU.js";import"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{b as build,a as createBuildContext,c as ensureBuildIsReady,d as watch};
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{e as U}from"./chunk-I4C675WP.js";import{a as R,d as w}from"./chunk-3BEX5FYF.js";import{k}from"./chunk-UJ6LH5FY.js";import{f as y,h as g,k as f}from"./chunk-GBM3TZFD.js";import{g as m,k as l}from"./chunk-3SXTMY75.js";import{a as u}from"./chunk-MG65QJY6.js";import{a as o,b as n,c}from"./chunk-A6RDYP6R.js";import{t as d}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var b=r=>R(async s=>{try{let t=await k(r.registrySource,{verbose:r.verbose,local:r.local}),e=t.recipes.find(p=>p.name===r.recipeName);if(e===void 0)return n({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await U(e,{cwd:r.cwd,registryUrl:t.registryUrl,force:!0,dryRun:r.dryRun,verbose:r.verbose}),i=r.dryRun?"Would update":"Updated";s.out.writeln(m(`\u2713 ${i} ${a.written.length} file(s) from ${e.name}`));for(let p of a.written)s.out.writeln(` \u2192 ${p}`);return o({recipe:e,result:a})}catch(t){let e=t instanceof Error?t.message:String(t);return n({_tag:"ApplyError",message:e})}});var S=async r=>{let s=u(r??[],{string:["registry"],boolean:["dry-run","verbose","local"]}),t=s._[0],e=y({renderer:f.ansi(),sink:g.stdout()});if(t===void 0)return e.writeln("Usage: eser kit update <recipe> [--registry <url>] [--dry-run]"),e.writeln(),e.writeln("Re-fetches and re-applies a recipe, overwriting existing files."),await e.close(),o(void 0);let a=s["dry-run"]===!0;a?e.writeln(l(`
|
|
3
|
-
Dry run: updating ${t}
|
|
4
|
-
`)):e.writeln(l(`
|
|
5
|
-
Updating ${t}...
|
|
6
|
-
`));let i=await w(b({recipeName:t,cwd:d.process.cwd(),registrySource:s.registry,local:s.local===!0,dryRun:a,verbose:s.verbose===!0}),{out:e});return await e.close(),c(i)?o(void 0):n({exitCode:1})};export{S as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-NP723K5L.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-QOX7VSID.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-IZONBJSX.js";import"./chunk-KBFKBL6A.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as checkCircularDeps,b as checkCircularDepsHandler,c as handleCli,d as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-EBCQCAQ7.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{b as main,a as validateCommitMsg};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-QZ44TAIY.js";import"./chunk-KBFKBL6A.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as checkDocs,b as checkDocsHandler,c as handleCli,d as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-BCPCQHDL.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-IIIMOOFE.js";import"./chunk-KBFKBL6A.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as checkExportNames,b as checkExportNamesHandler,c as handleCli,d as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-3QIPK7NI.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-HVOPUZOM.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-3XJLLDR5.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-5MWX3POX.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-H4SPMUT6.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-CKNA5LIK.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-FORPNESQ.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-T2DRBZ4X.js";import"./chunk-KBFKBL6A.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as checkModExports,b as checkModExportsHandler,c as handleCli,d as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-GJ4LCA6D.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-S7S2I2K5.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as checkPackageConfigs,b as checkPackageConfigsHandler,c as handleCli,d as main};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-7NUMDHE2.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-ER4ZWF4Y.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-32HV3K27.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-N2VBT43E.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-HYT26FYU.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-P7WCO724.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-YQVWAWMO.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-K6H7JTIH.js";import"./chunk-RGUETQSC.js";import"./chunk-HVLKXRPA.js";import"./chunk-JYNHFD6B.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{d as main,b as run,a as tool,c as validator};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f}from"./chunk-2HBVIH7V.js";import"./chunk-DYRTLYTU.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import"./chunk-2VEVVX6U.js";import"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-VAIRJES2.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-MG65QJY6.js";import"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{e as handleCli,f as main,a as readVersionFile,b as showVersions,c as versions,d as versionsHandler};
|
package/chunks/watch-YKYNWTZF.js
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as S,c as E}from"./chunk-IDMI5OBK.js";import{a as C,c as M}from"./chunk-2EVWKUN6.js";import{d as T,j as y,q as b}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{a as x,b as k}from"./chunk-A6RDYP6R.js";import{t as m}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var D=async e=>{let s=await T(e),l=await y(e),d=await L(e),o=null,u=null,n=0,c=0;if(s.spec!==null){let i=await S(e,s.spec);if(i!==null){n=i.tasks.length,c=s.execution.completedTasks.length;let a=E(i.tasks,s.execution.completedTasks);a!==null&&(o=a.id,u=a.title)}}let $=null;return s.lastCalledAt!==null&&($=Math.floor((Date.now()-new Date(s.lastCalledAt).getTime())/1e3)),{spec:s.spec,phase:s.phase,iteration:s.execution.iteration,activeTaskId:o,activeTaskTitle:u,totalTasks:n,completedTaskCount:c,lastProgress:s.execution.lastProgress,lastCalledAt:s.lastCalledAt,modifiedFiles:s.execution.modifiedFiles,debt:s.execution.debt,concerns:l?.concerns??[],maxIterations:l?.maxIterationsBeforeRestart??15,awaitingStatusReport:s.execution.awaitingStatusReport,pendingClear:s.pendingClear,verificationPassed:s.execution.lastVerification?.passed??null,decisionsCount:s.decisions.length,discoveryAnswered:s.discovery.answers.length,discoveryTotal:6,trackedFiles:d,timeSinceUpdate:$}},L=async e=>{let s=`${e}/.eser/.state/files-changed.jsonl`;try{let d=(await m.fs.readTextFile(s)).trim().split(`
|
|
3
|
-
`).filter(Boolean),o=[];for(let u of d)try{let n=JSON.parse(u);o.includes(n.file)||o.push(n.file)}catch{}return o}catch{return[]}},F="\x1B[2J\x1B[H",I="\x1B[1m",r="\x1B[2m",t="\x1B[0m",f="\x1B[32m",p="\x1B[33m",w="\x1B[31m",P="\x1B[36m",O=e=>{switch(e){case"DONE":return f;case"BLOCKED":return w;case"EXECUTING":return P;default:return p}},A=(e,s,l)=>{if(s===0)return"\u2591".repeat(l);let d=Math.min(e/s,1),o=Math.round(d*l);return"\u2588".repeat(o)+"\u2591".repeat(l-o)},v=e=>e===null?"never":e<60?`${e}s ago`:e<3600?`${Math.floor(e/60)}m ago`:`${Math.floor(e/3600)}h ago`,R=e=>{let s=[],d="\u2500".repeat(52);s.push(`${r}\u256D${d}\u256E${t}`),s.push(`${r}\u2502${t} ${I}noskills watch${t} \u2014 ${e.spec??"no active spec"}${r}${" ".repeat(Math.max(0,34-(e.spec?.length??15)))}\u2502${t}`);let o=O(e.phase);if(s.push(`${r}\u2502${t} Phase: ${o}${e.phase}${t}${" ".repeat(Math.max(0,42-e.phase.length))}${r}\u2502${t}`),e.phase==="DISCOVERY")s.push(`${r}\u2502${t} Discovery: ${e.discoveryAnswered}/${e.discoveryTotal} questions answered${" ".repeat(Math.max(0,14))}${r}\u2502${t}`);else if(e.phase==="SPEC_DRAFT")s.push(`${r}\u2502${t} ${p}Awaiting approval${t}${" ".repeat(Math.max(0,33))}${r}\u2502${t}`);else if(e.phase==="EXECUTING"||e.phase==="BLOCKED"){let n=A(e.completedTaskCount,e.totalTasks,12),c=e.totalTasks>0?Math.round(e.completedTaskCount/e.totalTasks*100):0,$=`${n} ${e.completedTaskCount}/${e.totalTasks} tasks (${c}%)`;if(s.push(`${r}\u2502${t} Progress: ${f}${$}${t}${" ".repeat(Math.max(0,40-$.length))}${r}\u2502${t}`),s.push(`${r}\u2502${t} Iteration: ${e.iteration}${" ".repeat(Math.max(0,38-String(e.iteration).length))}${r}\u2502${t}`),e.activeTaskId!==null){let a=`${e.activeTaskId}${e.activeTaskTitle!==null?` (${e.activeTaskTitle})`:""}`.slice(0,36);s.push(`${r}\u2502${t} Active task: ${P}${a}${t}${" ".repeat(Math.max(0,36-a.length))}${r}\u2502${t}`)}if(e.phase==="BLOCKED"){let i=(e.lastProgress??"unknown").replace(/^BLOCKED:\s*/,"");s.push(`${r}\u2502${t} ${w}BLOCKED: ${i.slice(0,40)}${t}${" ".repeat(Math.max(0,40-i.slice(0,40).length))}${r}\u2502${t}`),s.push(`${r}\u2502${t} ${p}Human input needed${t}${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}}else e.phase==="DONE"&&s.push(`${r}\u2502${t} ${f}Complete!${t} ${e.iteration} iterations, ${e.decisionsCount} decisions${" ".repeat(Math.max(0,17-String(e.iteration).length-String(e.decisionsCount).length))}${r}\u2502${t}`);if(s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),s.push(`${r}\u2502${t} Last update: ${v(e.timeSinceUpdate)}${" ".repeat(Math.max(0,36-v(e.timeSinceUpdate).length))}${r}\u2502${t}`),e.lastProgress!==null){let n=e.lastProgress.slice(0,48);s.push(`${r}\u2502${t} ${r}${n}${t}${" ".repeat(Math.max(0,50-n.length))}${r}\u2502${t}`)}if(e.awaitingStatusReport&&s.push(`${r}\u2502${t} ${p}Status report pending${t}${" ".repeat(Math.max(0,29))}${r}\u2502${t}`),e.pendingClear&&s.push(`${r}\u2502${t} ${p}/clear pending${t}${" ".repeat(Math.max(0,36))}${r}\u2502${t}`),e.verificationPassed===!1&&s.push(`${r}\u2502${t} ${w}Verification failed${t}${" ".repeat(Math.max(0,31))}${r}\u2502${t}`),s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),e.debt!==null&&e.debt.items.length>0){s.push(`${r}\u2502${t} Debt: ${e.debt.items.length} item(s)${" ".repeat(Math.max(0,34))}${r}\u2502${t}`);for(let n of e.debt.items.slice(0,3)){let c=n.slice(0,44);s.push(`${r}\u2502${t} \u2514\u2500 ${c}${" ".repeat(Math.max(0,46-c.length))}${r}\u2502${t}`)}e.debt.items.length>3&&s.push(`${r}\u2502${t} \u2514\u2500 ... and ${e.debt.items.length-3} more${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}if(e.trackedFiles.length>0||e.modifiedFiles.length>0){let n=e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles;s.push(`${r}\u2502${t} Files changed: ${n.length}${" ".repeat(Math.max(0,34-String(n.length).length))}${r}\u2502${t}`);for(let c of n.slice(0,5)){let $=c.length>44?"..."+c.slice(-41):c;s.push(`${r}\u2502${t} \u2514\u2500 ${$}${" ".repeat(Math.max(0,46-$.length))}${r}\u2502${t}`)}n.length>5&&s.push(`${r}\u2502${t} \u2514\u2500 ... and ${n.length-5} more${" ".repeat(Math.max(0,32))}${r}\u2502${t}`)}if(s.push(`${r}\u2502${"".padEnd(52)}\u2502${t}`),e.concerns.length>0){let n=e.concerns.join(", ").slice(0,38);s.push(`${r}\u2502${t} Concerns: ${n}${" ".repeat(Math.max(0,40-n.length))}${r}\u2502${t}`)}let u=e.iteration>=e.maxIterations?`${w}RESTART RECOMMENDED${t}`:`${f}ok${t} (${e.iteration}/${e.maxIterations})`;return s.push(`${r}\u2502${t} Context: ${u}${" ".repeat(Math.max(0,41-u.replace(/\x1b\[[0-9;]*m/g,"").length))}${r}\u2502${t}`),s.push(`${r}\u2570${d}\u256F${t}`),s.push(` ${r}watching .eser/.state/ for changes... (ctrl+c to stop)${t}`),s.join(`
|
|
4
|
-
`)},W=e=>JSON.stringify({ts:new Date().toISOString(),phase:e.phase,spec:e.spec,iteration:e.iteration,activeTask:e.activeTaskId,tasks:{completed:e.completedTaskCount,total:e.totalTasks},progress:e.lastProgress,debt:e.debt?.items.length??0,filesChanged:e.trackedFiles.length>0?e.trackedFiles:e.modifiedFiles,timeSinceUpdate:e.timeSinceUpdate,pendingClear:e.pendingClear,verificationPassed:e.verificationPassed}),J=async e=>{let s=m.process.cwd(),l=C(e);if(!await b(s)){let i=new TextEncoder,a=m.process.stdout.getWriter();return await a.write(i.encode(`noskills not initialized.
|
|
5
|
-
`)),a.releaseLock(),k({exitCode:1})}let d=`${s}/.eser/.state`,o="",u=async()=>{let i=await D(s),a=l==="json"?W(i):l==="markdown"?M(i,"markdown"):R(i);if(l==="json"){let g=new TextEncoder,h=m.process.stdout.getWriter();await h.write(g.encode(a+`
|
|
6
|
-
`)),h.releaseLock()}else if(l==="markdown"){let g=new TextEncoder,h=m.process.stdout.getWriter();await h.write(g.encode(a+`
|
|
7
|
-
---
|
|
8
|
-
`)),h.releaseLock()}else if(a!==o){let g=new TextEncoder,h=m.process.stdout.getWriter();await h.write(g.encode(F+a+`
|
|
9
|
-
`)),h.releaseLock(),o=a}return i.phase==="DONE"};if(await u())return x(void 0);let c=1e3,$=0;for(;;){await new Promise(i=>setTimeout(i,c));try{let a=(await m.fs.stat(`${d}/state.json`)).mtime?.getTime()??0;if(a>$&&($=a,await new Promise(h=>setTimeout(h,100)),await u()))break}catch{}}return x(void 0)};export{D as buildSnapshot,J as main,W as renderJsonLine,R as renderTerminal};
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d}from"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as WORKERD_CAPABILITIES,c as clearEnv,d as createWorkerdRuntime,b as populateEnvFromContext};
|