eser 4.1.27 → 4.1.30
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/chunks/add-5SDE43IH.js +8 -0
- package/chunks/anthropic-2MXDKLNX.js +2 -0
- package/chunks/approve-XNUZYGYJ.js +2 -0
- package/chunks/{ask-TFJCKH5G.js → ask-L3N6REQI.js} +2 -1
- package/chunks/block-NWIP4USQ.js +2 -0
- package/chunks/{browser-XCMD2IZQ.js → browser-SG2DBNGS.js} +2 -1
- package/chunks/{build-2W7YVR7J.js → build-6DCIDFY7.js} +3 -2
- package/chunks/bun-3AACRJXG.js +2 -0
- package/chunks/{changelog-gen-QDUA5G5K.js → changelog-gen-7V37P7PE.js} +2 -1
- package/chunks/{chunk-WUJUQPHI.js → chunk-2BOCLC67.js} +2 -1
- package/chunks/chunk-2EVWKUN6.js +5 -0
- package/chunks/chunk-2TP6IMXY.js +2 -0
- package/chunks/{chunk-6U2VEZEM.js → chunk-2VEVVX6U.js} +2 -1
- package/chunks/{chunk-VVHXAOEH.js → chunk-32HV3K27.js} +2 -1
- package/chunks/{chunk-NUSNMQPL.js → chunk-3BEX5FYF.js} +2 -1
- package/chunks/{chunk-4HAIX3WN.js → chunk-3KCPUYLZ.js} +2 -1
- package/chunks/{chunk-EBYJBBYV.js → chunk-3MM5EGFB.js} +2 -1
- package/chunks/{chunk-XMCQMTAA.js → chunk-3QIPK7NI.js} +2 -1
- package/chunks/chunk-3SXTMY75.js +2 -0
- package/chunks/{chunk-34GCQZ3Z.js → chunk-3XJLLDR5.js} +1 -0
- package/chunks/chunk-3YUV3QIZ.js +61 -0
- package/chunks/{chunk-3K42AALS.js → chunk-455V3AE5.js} +2 -1
- package/chunks/{chunk-ZED5RIVL.js → chunk-46ZWBKIW.js} +2 -1
- package/chunks/{chunk-KAEAT6A4.js → chunk-4DOMGQOO.js} +2 -1
- package/chunks/chunk-4SYC4WJV.js +3 -0
- package/chunks/{chunk-BDTJR6UH.js → chunk-4WQGB7NO.js} +2 -1
- package/chunks/{chunk-U47ABJCC.js → chunk-536RBSFU.js} +2 -1
- package/chunks/{chunk-G34MS4XJ.js → chunk-5MWX3POX.js} +2 -1
- package/chunks/chunk-5PNGVDLV.js +2 -0
- package/chunks/chunk-6QC7ILI5.js +2 -0
- package/chunks/{chunk-GLSCZGXA.js → chunk-7ATUODBM.js} +2 -1
- package/chunks/{chunk-ETMOOGY2.js → chunk-7BFBOLLC.js} +2 -1
- package/chunks/{chunk-USCAYIWL.js → chunk-7DPLGQHN.js} +1 -0
- package/chunks/{chunk-W3REWI3H.js → chunk-7NUMDHE2.js} +2 -1
- package/chunks/chunk-7ZYDAZBD.js +1 -0
- package/chunks/{chunk-DQAEQEXD.js → chunk-A6RDYP6R.js} +2 -1
- package/chunks/{chunk-AKJB4CER.js → chunk-AGRTWPDI.js} +2 -1
- package/chunks/{chunk-ZE5T64HQ.js → chunk-AP72BKVG.js} +1 -0
- package/chunks/{chunk-GETSWLMF.js → chunk-B5IPHVXT.js} +3 -2
- package/chunks/{chunk-PO3SXFUE.js → chunk-BCPCQHDL.js} +2 -1
- package/chunks/{chunk-5MN3MWQN.js → chunk-BNQAZLIQ.js} +1 -0
- package/chunks/{chunk-C3PZVQ3Z.js → chunk-BP3IFAPO.js} +2 -1
- package/chunks/{chunk-T7K64JD5.js → chunk-CDPSH56U.js} +1 -0
- package/chunks/chunk-CEYKWASA.js +2 -0
- package/chunks/{chunk-YQU3TEIG.js → chunk-CKNA5LIK.js} +2 -1
- package/chunks/{chunk-GVSBZ6JV.js → chunk-CLL3YG4W.js} +2 -1
- package/chunks/{chunk-3OEM65F2.js → chunk-COKZ6MLN.js} +3 -2
- package/chunks/{chunk-4H4O3TGK.js → chunk-CUIMSX4V.js} +2 -1
- package/chunks/{chunk-AK3OJD4W.js → chunk-DAK2I7UC.js} +2 -1
- package/chunks/{chunk-ACQUINWH.js → chunk-DTO2YJWZ.js} +1 -0
- package/chunks/{chunk-TUTRX7VR.js → chunk-EBCQCAQ7.js} +2 -1
- package/chunks/{chunk-NGZZAQ7G.js → chunk-ER4ZWF4Y.js} +2 -1
- package/chunks/chunk-F5BPXG5L.js +13 -0
- package/chunks/{chunk-H4OFOQQ2.js → chunk-FORPNESQ.js} +2 -1
- package/chunks/{chunk-DXB73IDG.js → chunk-G6NAG2EK.js} +1 -0
- package/chunks/chunk-GBM3TZFD.js +40 -0
- package/chunks/{chunk-6FMPNAZ3.js → chunk-GE3LJ6QM.js} +2 -1
- package/chunks/{chunk-Y6DZEK4W.js → chunk-GTHXGAMQ.js} +1 -0
- package/chunks/{chunk-JOXKA7TJ.js → chunk-H4SPMUT6.js} +2 -1
- package/chunks/{chunk-CPRLAMEG.js → chunk-HVLKXRPA.js} +2 -1
- package/chunks/{chunk-U65FD6J3.js → chunk-HVOPUZOM.js} +2 -1
- package/chunks/{chunk-6HYGGBEQ.js → chunk-HYT26FYU.js} +2 -1
- package/chunks/{chunk-Q54LOR4S.js → chunk-I4C675WP.js} +2 -1
- package/chunks/chunk-IDMI5OBK.js +3 -0
- package/chunks/{chunk-LOFP256P.js → chunk-J2Z7NG2X.js} +1 -0
- package/chunks/{chunk-OLM5RTFK.js → chunk-J7YTWK67.js} +1 -0
- package/chunks/chunk-JOTAKQMZ.js +2 -0
- package/chunks/chunk-JYNHFD6B.js +140 -0
- package/chunks/chunk-K6H7JTIH.js +2 -0
- package/chunks/chunk-K7MYEXOS.js +2 -0
- package/chunks/{chunk-UNL4H5EY.js → chunk-KKBIUT5L.js} +2 -1
- package/chunks/{chunk-UKYKMDYU.js → chunk-KPWEJXPI.js} +2 -1
- package/chunks/{chunk-QIYWONJL.js → chunk-KQE6FMKW.js} +2 -1
- package/chunks/{chunk-OBIEQJDE.js → chunk-LCG4SK6K.js} +2 -1
- package/chunks/chunk-LNNNLUZT.js +2 -0
- package/chunks/{chunk-HPPFA3XU.js → chunk-MG65QJY6.js} +1 -0
- package/chunks/{chunk-YXSB6RET.js → chunk-MRCBHVSB.js} +2 -1
- package/chunks/{chunk-AAV7D6DF.js → chunk-MXGRYONZ.js} +2 -1
- package/chunks/{chunk-4VL2RZIN.js → chunk-N2VBT43E.js} +2 -1
- package/chunks/{chunk-A2GDVOQP.js → chunk-N7DXBY3O.js} +2 -1
- package/chunks/{chunk-2J2PXBOC.js → chunk-NBA6EFWU.js} +1 -0
- package/chunks/{chunk-YMY2URYM.js → chunk-NP723K5L.js} +2 -1
- package/chunks/{chunk-RBB5ITAS.js → chunk-NTHP6SND.js} +2 -1
- package/chunks/chunk-OX6ZNNUB.js +2 -0
- package/chunks/chunk-P2TABZ4A.js +3 -0
- package/chunks/chunk-P74JF7XR.js +4 -0
- package/chunks/{chunk-3APERFKY.js → chunk-P7WCO724.js} +1 -0
- package/chunks/{chunk-FKF2SWQM.js → chunk-PE2TDUXD.js} +1 -0
- package/chunks/chunk-PVPMHMKP.js +4 -0
- package/chunks/chunk-PWLF3WXM.js +1 -0
- package/chunks/{chunk-TXL6YOFL.js → chunk-Q2KSOC32.js} +2 -1
- package/chunks/{chunk-ANY26ROY.js → chunk-QOX7VSID.js} +2 -1
- package/chunks/{chunk-SBOTNOWZ.js → chunk-RGUETQSC.js} +2 -1
- package/chunks/{chunk-4S7QYPS6.js → chunk-S7S2I2K5.js} +1 -0
- package/chunks/{chunk-NLNSK3KE.js → chunk-SOBOSRJB.js} +2 -1
- package/chunks/chunk-SOSF762G.js +1 -0
- package/chunks/{chunk-DWYVBWBP.js → chunk-SQINSLNL.js} +2 -1
- package/chunks/{chunk-FDZP7B5Y.js → chunk-STI6DX7K.js} +1 -0
- package/chunks/{chunk-762C2IM6.js → chunk-TDQRRGDJ.js} +2 -1
- package/chunks/{chunk-IA7GIU76.js → chunk-TFPT4BDY.js} +2 -1
- package/chunks/chunk-U2MR2O3C.js +2 -0
- package/chunks/chunk-UESOCN2G.js +2 -0
- package/chunks/chunk-UJ6LH5FY.js +2 -0
- package/chunks/{chunk-NTPOK5H6.js → chunk-VC6ERZSI.js} +2 -1
- package/chunks/{chunk-5RK3346P.js → chunk-VG72SSDI.js} +2 -1
- package/chunks/chunk-W3RVRCUB.js +2 -0
- package/chunks/{chunk-ZH37DSUQ.js → chunk-WF6JNPZS.js} +1 -0
- package/chunks/chunk-WG6J7DFO.js +7 -0
- package/chunks/chunk-XU5SILYR.js +2 -0
- package/chunks/chunk-XVSIRN6G.js +4 -0
- package/chunks/chunk-Y4ARZGGL.js +2 -0
- package/chunks/{chunk-3EFU5R2M.js → chunk-Y53YTL4C.js} +2 -1
- package/chunks/{chunk-YWCEHTZB.js → chunk-YQVWAWMO.js} +2 -1
- package/chunks/{chunk-ZF2XYULB.js → chunk-YTF3BAQS.js} +1 -0
- package/chunks/{chunk-QIODVVTY.js → chunk-YVIGHK4H.js} +2 -1
- package/chunks/{chunk-CKD2KOHA.js → chunk-ZNGLZECE.js} +2 -1
- package/chunks/claude-code-VUBEU7RR.js +2 -0
- package/chunks/clone-H3UAEVVP.js +6 -0
- package/chunks/{commitmsg-ZGOEO5YG.js → commitmsg-UK2ABB7D.js} +3 -2
- package/chunks/concern-Y7LJ2MWE.js +2 -0
- package/chunks/{deno-MMJLKXAE.js → deno-7BSPHDRG.js} +2 -1
- package/chunks/{dev-JHAHGTZP.js → dev-XBH6C6DH.js} +3 -2
- package/chunks/done-DIN56LXZ.js +2 -0
- package/chunks/file-tools-shared-G36OYF5S.js +2 -0
- package/chunks/{fileFromPath-4UEDFJ4U.js → fileFromPath-MB3IRZVW.js} +2 -1
- package/chunks/gemini-F4KLO5VU.js +2 -0
- package/chunks/gh-RKKHKA3B.js +5 -0
- package/chunks/{gh-contributors-G3QZZAUO.js → gh-contributors-X7BW57DD.js} +2 -1
- package/chunks/{init-IPZHDMAH.js → init-32DVDSNZ.js} +4 -3
- package/chunks/init-PBLGKCHC.js +2 -0
- package/chunks/install-LM44N3DB.js +3 -0
- package/chunks/invoke-hook-4DBMDFA5.js +10 -0
- package/chunks/kiro-HQLXD6ZU.js +2 -0
- package/chunks/list-5TGTYMAU.js +2 -0
- package/chunks/{list-DSVIPH45.js → list-N4ZKDFW7.js} +2 -1
- package/chunks/{list-2RZIQZGH.js → list-PY3A762R.js} +2 -1
- package/chunks/load-config-FTQMJVEW.js +2 -0
- package/chunks/{main-FQFNY7SM.js → main-JTYNMHNL.js} +3 -2
- package/chunks/manifest-NF2EK757.js +2 -0
- package/chunks/mod-4ILLF5PK.js +2 -0
- package/chunks/mod-5WXRQGLS.js +28 -0
- package/chunks/mod-FEGQZ3ZY.js +2 -0
- package/chunks/{mod-TSU5UWXA.js → mod-HKYPZOU7.js} +2 -1
- package/chunks/mod-IILBPQMK.js +2 -0
- package/chunks/mod-JI2A2546.js +2 -0
- package/chunks/mod-JZNE2HH6.js +2 -0
- package/chunks/{mod-WYRORC72.js → mod-MLRQFSBE.js} +2 -1
- package/chunks/{mod-VZPKQ7DG.js → mod-NCF6OSXO.js} +2 -1
- package/chunks/{mod-TLLZ3NAM.js → mod-SA3J2VR5.js} +2 -1
- package/chunks/{mod-QJMMYECF.js → mod-Y4UHOKMZ.js} +3 -2
- package/chunks/mod-YX3JRMSI.js +2 -0
- package/chunks/{new-EAETGSIR.js → new-BOGCXTIY.js} +2 -1
- package/chunks/next-NQOJEFA5.js +4 -0
- package/chunks/{node-RWYXITVV.js → node-KCQF6QQA.js} +2 -1
- package/chunks/node-MFKYO4CY.js +2 -0
- package/chunks/ollama-36F5QAOO.js +2 -0
- package/chunks/openai-EU5TJZ5T.js +2 -0
- package/chunks/{openai-EKIA3VP3.js → openai-IKXRJYI3.js} +2 -1
- package/chunks/opencode-7J3JDC44.js +2 -0
- package/chunks/purge-SQ6NCKWN.js +5 -0
- package/chunks/recipe-applier-6QZYAZ57.js +2 -0
- package/chunks/registry-fetcher-76ISLGRR.js +2 -0
- package/chunks/{release-3BKLVESS.js → release-WKMSWXDS.js} +3 -2
- package/chunks/{release-notes-734LKEJB.js → release-notes-GOUHBQ2F.js} +2 -1
- package/chunks/{release-tag-YX727TXO.js → release-tag-5WNEA4HM.js} +2 -1
- package/chunks/reset-EYLAZVKO.js +2 -0
- package/chunks/rule-HV7DARH6.js +3 -0
- package/chunks/run-CPCSTIAL.js +4 -0
- package/chunks/{run-ES4BLQQX.js → run-RGEZUAPM.js} +3 -2
- package/chunks/{scripts-COIXD5AD.js → scripts-JK6W2MCO.js} +2 -1
- package/chunks/{sdk-5JGXLIO5.js → sdk-MXV452BR.js} +2 -1
- package/chunks/serve-DEYVWV2K.js +4 -0
- package/chunks/{server-RYWDAYED.js → server-KNWQV2HW.js} +2 -1
- package/chunks/spec-JCR5EYCU.js +2 -0
- package/chunks/status-O5HUGPGE.js +2 -0
- package/chunks/sync-ZOU46K25.js +2 -0
- package/chunks/system-BJCQKFCP.js +2 -0
- package/chunks/system-X3EJ3FN3.js +2 -0
- package/chunks/{unstable_chmod-WRDBWEC2.js → unstable_chmod-GDQI7NKH.js} +2 -1
- package/chunks/update-4C4WNXCE.js +6 -0
- package/chunks/validate-bom-KEC4IOKO.js +2 -0
- package/chunks/validate-case-conflict-ZZKZQQX4.js +2 -0
- package/chunks/validate-circular-deps-QCJYK5K5.js +2 -0
- package/chunks/validate-commit-msg-PZZ4T4QF.js +2 -0
- package/chunks/validate-docs-M55HAXPX.js +2 -0
- package/chunks/validate-eof-MX52AUUT.js +2 -0
- package/chunks/validate-export-names-UFXPIDFW.js +2 -0
- package/chunks/validate-filenames-LXIMPWRW.js +2 -0
- package/chunks/validate-json-TABLVKEH.js +2 -0
- package/chunks/validate-large-files-CMCMEGYA.js +2 -0
- package/chunks/validate-licenses-MDGIDYNC.js +2 -0
- package/chunks/validate-line-endings-K36HS73S.js +2 -0
- package/chunks/validate-merge-conflict-PMGZYM3B.js +2 -0
- package/chunks/validate-mod-exports-M3UYNBK7.js +2 -0
- package/chunks/validate-package-configs-V5LR7K5C.js +2 -0
- package/chunks/validate-secrets-IAMY5DB5.js +2 -0
- package/chunks/validate-shebangs-GUBDNU2N.js +2 -0
- package/chunks/validate-submodules-ZA2FAF3W.js +2 -0
- package/chunks/validate-symlinks-LSEEVFTR.js +2 -0
- package/chunks/validate-toml-JLQ3BY73.js +2 -0
- package/chunks/validate-trailing-whitespace-3UUUKE22.js +2 -0
- package/chunks/validate-yaml-2BG7G35N.js +2 -0
- package/chunks/versions-IVXYMSAZ.js +2 -0
- package/chunks/vertexai-EXTYPVHK.js +2 -0
- package/chunks/watch-YKYNWTZF.js +9 -0
- package/chunks/workerd-VVSAKLDZ.js +2 -0
- package/eser.js +2 -1
- package/package.json +1 -1
- package/chunks/add-ORJYWG26.js +0 -7
- package/chunks/anthropic-SL274RBQ.js +0 -1
- package/chunks/approve-5NJ4JWD3.js +0 -1
- package/chunks/block-ADHHHUFZ.js +0 -1
- package/chunks/bun-YFFBDKUJ.js +0 -1
- package/chunks/chunk-3I4JG3PJ.js +0 -1
- package/chunks/chunk-5AK4OGCO.js +0 -1
- package/chunks/chunk-AYSPDG4K.js +0 -1
- package/chunks/chunk-BCHXUKWW.js +0 -3
- package/chunks/chunk-BK2BDHKB.js +0 -1
- package/chunks/chunk-DDLQMSA7.js +0 -0
- package/chunks/chunk-GXPLME3K.js +0 -14
- package/chunks/chunk-HTBLWLKV.js +0 -1
- package/chunks/chunk-LXVBR775.js +0 -1
- package/chunks/chunk-MYSTBVWT.js +0 -2
- package/chunks/chunk-NT2MQK7O.js +0 -6
- package/chunks/chunk-PLJNPQFC.js +0 -1
- package/chunks/chunk-Q7QMINSQ.js +0 -0
- package/chunks/chunk-QZY4BKI7.js +0 -1
- package/chunks/chunk-RYLOB2JU.js +0 -1
- package/chunks/chunk-SG4G3OOO.js +0 -1
- package/chunks/chunk-TTYO2XJO.js +0 -32
- package/chunks/chunk-V2N5L24J.js +0 -2
- package/chunks/chunk-Z4WPWVC7.js +0 -10
- package/chunks/chunk-ZO7RUTSQ.js +0 -60
- package/chunks/chunk-ZOZYBQX2.js +0 -0
- package/chunks/claude-code-K37KYX7W.js +0 -1
- package/chunks/clone-PAQMCIA3.js +0 -5
- package/chunks/file-tools-shared-77P7MI54.js +0 -1
- package/chunks/gemini-ARTUPDPZ.js +0 -1
- package/chunks/gh-SXEDNWHD.js +0 -4
- package/chunks/init-3GXDO32O.js +0 -1
- package/chunks/install-VY2L6NDB.js +0 -2
- package/chunks/kiro-XQDHURLU.js +0 -1
- package/chunks/list-V2HZCPDN.js +0 -1
- package/chunks/load-config-KG4RTCR2.js +0 -1
- package/chunks/manifest-5CYL3HR3.js +0 -1
- package/chunks/mod-5ACKR2OE.js +0 -1
- package/chunks/mod-6P2JPEHC.js +0 -1
- package/chunks/mod-CUIGNRIK.js +0 -1
- package/chunks/mod-NSY6WUYH.js +0 -27
- package/chunks/mod-U6LEXPVR.js +0 -1
- package/chunks/mod-WX4P6LGJ.js +0 -1
- package/chunks/next-F2BIIAZC.js +0 -3
- package/chunks/node-SMAAGOR3.js +0 -1
- package/chunks/ollama-6JZ2IKR7.js +0 -1
- package/chunks/openai-XMIVMDDL.js +0 -1
- package/chunks/opencode-CHIAJALZ.js +0 -1
- package/chunks/recipe-applier-R4YJPGQR.js +0 -1
- package/chunks/registry-fetcher-J6X32PGP.js +0 -1
- package/chunks/reset-PAPDZIDC.js +0 -1
- package/chunks/rule-4GNOR3GE.js +0 -2
- package/chunks/serve-B4V2BCWM.js +0 -3
- package/chunks/spec-SNAUMQSR.js +0 -1
- package/chunks/status-CY5IKIYS.js +0 -1
- package/chunks/sync-OAPV43JS.js +0 -1
- package/chunks/system-5A6DQLM5.js +0 -1
- package/chunks/system-JWO27FMA.js +0 -1
- package/chunks/update-O75M4SDJ.js +0 -5
- package/chunks/validate-bom-6G7EYFOP.js +0 -1
- package/chunks/validate-case-conflict-OWHWRTSQ.js +0 -1
- package/chunks/validate-circular-deps-TCYSZKME.js +0 -1
- package/chunks/validate-commit-msg-UPJJ7E4M.js +0 -1
- package/chunks/validate-docs-ZTCE5XLF.js +0 -1
- package/chunks/validate-eof-6RMNMAWI.js +0 -1
- package/chunks/validate-export-names-5ZVQ4PGM.js +0 -1
- package/chunks/validate-filenames-5YB27RN4.js +0 -1
- package/chunks/validate-json-6CLTN4AN.js +0 -1
- package/chunks/validate-large-files-KEMHYWKH.js +0 -1
- package/chunks/validate-licenses-WIVY6G5Z.js +0 -1
- package/chunks/validate-line-endings-KNFYAVBG.js +0 -1
- package/chunks/validate-merge-conflict-PYKGIFY5.js +0 -1
- package/chunks/validate-mod-exports-X5UZPD7J.js +0 -1
- package/chunks/validate-package-configs-SYKEIB53.js +0 -1
- package/chunks/validate-secrets-BWDFWN64.js +0 -1
- package/chunks/validate-shebangs-MP6VTLWO.js +0 -1
- package/chunks/validate-submodules-RQXISWKG.js +0 -1
- package/chunks/validate-symlinks-IPRYMDZD.js +0 -1
- package/chunks/validate-toml-KJZK7QVM.js +0 -1
- package/chunks/validate-trailing-whitespace-RO42VWQG.js +0 -1
- package/chunks/validate-yaml-H7G726ZM.js +0 -1
- package/chunks/versions-KW5UTMNV.js +0 -1
- package/chunks/vertexai-TPGIAJNA.js +0 -1
- package/chunks/workerd-LKKH32SO.js +0 -1
package/README.md
CHANGED
|
@@ -44,7 +44,7 @@ eser
|
|
|
44
44
|
│ └── update Re-fetch and update an applied recipe
|
|
45
45
|
├── codebase Codebase management tools
|
|
46
46
|
│ ├── scaffolding Initialize project from template
|
|
47
|
-
│ ├── install Install git hooks from .manifest.yml
|
|
47
|
+
│ ├── install Install git hooks from .eser/manifest.yml
|
|
48
48
|
│ ├── uninstall Remove managed git hooks
|
|
49
49
|
│ ├── status Show git hook installation status
|
|
50
50
|
│ ├── versions Manage workspace package versions
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as N,b as x,c as H}from"./chunk-SOBOSRJB.js";import{f as C}from"./chunk-I4C675WP.js";import{a as E,d as $}from"./chunk-3BEX5FYF.js";import{k as S}from"./chunk-UJ6LH5FY.js";import{f as b,h,k as I}from"./chunk-GBM3TZFD.js";import{d as o,f as k,g,h as A,k as y}from"./chunk-3SXTMY75.js";import{a as v}from"./chunk-MG65QJY6.js";import{a as d,b as c,c as R}from"./chunk-A6RDYP6R.js";import{t as w}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var _=r=>E(async e=>{try{let t=await S(r.registrySource,{verbose:r.verbose,local:r.local}),s=t.recipes.find(n=>n.name===r.recipeName);if(s===void 0)return c({_tag:"RecipeNotFound",message:`Recipe '${r.recipeName}' not found. Run \`eser kit list\` to see available recipes.`});let a=await N(r.cwd),i=x(s,a);for(let n of i.warnings)e.out.writeln(A(`Warning: ${n}`));let l=await C(r.recipeName,t.recipes,{cwd:r.cwd,registryUrl:t.registryUrl,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:r.variables}),m=0,p=0;for(let n of l.recipes)m+=n.result.written.length,p+=n.result.skipped.length;e.out.writeln(g(`\u2713 Added ${m} file(s)`)),l.recipes.length>1&&e.out.writeln(o(` Applied ${l.recipes.length} recipes (including dependencies)`)),p>0&&e.out.writeln(o(` Skipped ${p} existing file(s)`));let f=l.recipes.find(n=>n.name===r.recipeName);if(f!==void 0)for(let n of f.result.written)e.out.writeln(` \u2192 ${n}`);let u;if(!r.noInstall&&!r.dryRun&&i.instructions.length>0){e.out.writeln(o(`
|
|
3
|
+
Installing dependencies...`)),u=await H(i.instructions,r.cwd,{verbose:r.verbose});for(let n of u)n.success?e.out.writeln(g(` \u2713 ${n.command}`)):e.out.writeln(k(` \u2717 ${n.command}: ${n.error}`))}else if(i.instructions.length>0){e.out.writeln(o(`
|
|
4
|
+
Dependencies (run manually):`));for(let n of i.instructions)e.out.writeln(o(` ${n}`))}return d({recipe:s,chainResult:l,depInfo:i,installResults:u})}catch(t){let s=t instanceof Error?t.message:String(t);return c({_tag:"ApplyError",message:s})}});var j=r=>{let e={};for(let t of r){let[s,...a]=String(t).split("=");s!==void 0&&s!==""&&(e[s]=a.join("="))}return e},B=async r=>{let e=v(r??[],{string:["registry","var"],boolean:["dry-run","force","skip-existing","verbose","local","no-install"],collect:["var"]}),t=e._[0],s=b({renderer:I.ansi(),sink:h.stdout()});if(t===void 0)return s.writeln("Usage: eser kit add <recipe> [--registry <url>] [--dry-run] [--var key=value]"),s.writeln(),s.writeln("Run ",o("`eser kit list`")," to see available recipes."),await s.close(),d(void 0);let a=e["dry-run"]===!0;a?s.writeln(y(`
|
|
5
|
+
Dry run: ${t}
|
|
6
|
+
`)):s.writeln(y(`
|
|
7
|
+
Adding ${t}...
|
|
8
|
+
`));let i=await $(_({recipeName:t,cwd:w.process.cwd(),registrySource:e.registry,local:e.local===!0,dryRun:a,force:e.force===!0,skipExisting:e["skip-existing"]===!0,verbose:e.verbose===!0,noInstall:e["no-install"]===!0,variables:j(e.var)}),{out:s});return await s.close(),R(i)?d(void 0):c({exitCode:1})};export{B as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as C}from"./chunk-XVSIRN6G.js";import{a as P,d as R}from"./chunk-P74JF7XR.js";import"./chunk-IDMI5OBK.js";import{e as y}from"./chunk-UESOCN2G.js";import{a as p}from"./chunk-LNNNLUZT.js";import{d as h,e as S,j as g,n as v}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f,h as u,k as w}from"./chunk-GBM3TZFD.js";import{c as n,d as c,f as l,g as m,k as d}from"./chunk-3SXTMY75.js";import{a as i}from"./chunk-A6RDYP6R.js";import{t as o}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var $=async E=>{let r=f({renderer:w.ansi(),sink:u.stdout()}),s=o.process.cwd(),e=await h(s),a=await g(s);if(e.phase==="SPEC_DRAFT"){if(e.classification===null&&e.spec!==null){let A=(await v(s)).filter(D=>a?.concerns.includes(D.id)??!1);try{await C(s,e,A)}catch{}}let t=y(e);await S(s,t),t.spec!==null&&(await P(s,t.spec,"approved"),await R(s,t.spec,"approved")),r.writeln(m("\u2714")," Spec approved. Phase: ",d("SPEC_APPROVED")),r.writeln("When ready, run ",n(`${p('next --answer="start"',a)}`)," to begin execution.")}else e.phase==="DISCOVERY"&&e.discovery.completed?(r.writeln(c("Discovery complete. Spec draft already generated.")),r.writeln("Review the spec and run ",n(p("approve",a))," again when in SPEC_DRAFT phase.")):r.writeln(l(`Cannot approve in phase: ${e.phase}`));return await r.close(),i(void 0)};export{$ as main};
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as _,b as $}from"./chunk-GE3LJ6QM.js";import{a as F}from"./chunk-BNQAZLIQ.js";import{d as x,f as v,g as I,h as y,k as P}from"./chunk-GBM3TZFD.js";import{d as O,e as L,g as R}from"./chunk-LCG4SK6K.js";import{a as T}from"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import{d as S}from"./chunk-PVPMHMKP.js";import{a as C,b as g}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 k=(e,t,n)=>{let i=e.streamText(t,n);return{name:`ai-text/${e.provider}/${e.modelId}`,readable:new ReadableStream({async start(o){try{for await(let s of i)s.kind==="content_delta"&&o.enqueue(x(s.textDelta));o.close()}catch(s){o.error(s)}}})}};var Y={cc:"claude-code",ol:"ollama",oc:"opencode",oai:"openai",ant:"anthropic",gem:"gemini",vtx:"vertexai"},q={"claude-code":"Claude Code",ollama:"Ollama",opencode:"OpenCode",kiro:"Kiro",anthropic:"Anthropic API",openai:"OpenAI API",gemini:"Gemini API",vertexai:"Vertex AI"},H=e=>Y[e]??e,K=async e=>{if(e){let t=m.process.stderr.getWriter(),n=v({renderer:P.ansi(),sink:y.writable(new WritableStream({async write(i){await t.write(new TextEncoder().encode(String(i.data)))},close(){t.releaseLock()}}))});await O.configure({sinks:{stderr:R.getOutputSink(n)},loggers:[{category:["ai"],lowestLevel:T.Debug,sinks:["stderr"]}]})}return L.getLogger(["ai","ask"])},M=async e=>{await e.info("Auto-detecting AI provider...");try{if(await S`which claude`.noThrow().code()===0)return await e.info("Claude Code detected."),"claude-code"}catch{}try{if((await fetch("http://localhost:11434/api/version",{signal:AbortSignal.timeout(1e3)})).ok)return await e.info("Ollama detected at localhost:11434."),"ollama"}catch{}try{if(await S`which opencode`.noThrow().code()===0)return await e.info("OpenCode detected."),"opencode"}catch{}if(m.capabilities.env){if(m.env.has("ANTHROPIC_API_KEY"))return await e.info("Anthropic API key detected."),"anthropic";if(m.env.has("OPENAI_API_KEY"))return await e.info("OpenAI API key detected."),"openai"}throw new Error("No AI provider detected. Install claude, ollama, or set ANTHROPIC_API_KEY / OPENAI_API_KEY.")},U=async e=>{switch(e){case"claude-code":return(await import("./claude-code-VUBEU7RR.js")).claudeCodeFactory;case"ollama":return(await import("./ollama-36F5QAOO.js")).ollamaFactory;case"opencode":return(await import("./opencode-7J3JDC44.js")).openCodeFactory;case"kiro":return(await import("./kiro-HQLXD6ZU.js")).kiroFactory;case"anthropic":return(await import("./anthropic-2MXDKLNX.js")).anthropicFactory;case"openai":return(await import("./openai-EU5TJZ5T.js")).openaiFactory;case"gemini":return(await import("./gemini-F4KLO5VU.js")).geminiFactory;case"vertexai":return(await import("./vertexai-EXTYPVHK.js")).vertexaiFactory;default:throw new Error(`Unknown provider: ${e}`)}},le=async e=>{let t=e??[],n=null,i=null,o=null,s=!1,p=!1,A=[],a=0;for(;a<t.length;){let r=t[a];if(r==="-p"||r==="--provider"){n=t[a+1]??null,a+=2;continue}if(r==="-m"||r==="--model"){i=t[a+1]??null,a+=2;continue}if(r==="--max-tokens"){let c=t[a+1];c!==void 0&&(o=Number(c)),a+=2;continue}if(r==="--json"){s=!0,a+=1;continue}if(r==="-v"||r==="--verbose"){p=!0,a+=1;continue}r.startsWith("-")||A.push(r),a+=1}let f=A.join(" ");if(f.length===0)return g({message:'Usage: ai ask "your prompt" [-p provider] [-m model] [--verbose]',exitCode:1});let d=await K(p);try{let r=n!==null?H(n):await M(d),c=q[r]??r,E=i??z(r);await d.info(`Using ${c} (${E})`);let N=await U(r),w=new _({factories:[N]});await w.addModel("default",{provider:r,model:E});let h=w.getDefault();if(h===null)return g({message:"Failed to initialize model",exitCode:1});let b=[F("user",f)];if(await d.info(`Sending prompt (${f.length} chars)...`),s){let u=await h.generateText({messages:b,maxTokens:o??void 0});await d.info(`Response received (${$(u).length} chars)`);let l=v({sink:y.stdout()});l.writeln(JSON.stringify(u,null,2)),await l.close()}else{let u=k(h,{messages:b,maxTokens:o??void 0});await I().from(u).to(V()).run();let l=m.process.stdout.getWriter();await l.write(new TextEncoder().encode(`
|
|
2
3
|
`)),l.releaseLock()}return await w.close(),C(void 0)}catch(r){let c=r instanceof Error?r.message:String(r);return await d.error(c),p&&r instanceof Error&&r.cause!==void 0&&await d.debug(`Cause: ${String(r.cause)}`),g({message:c,exitCode:1})}},j=12,G=e=>new Promise(t=>setTimeout(t,e)),V=(e=j)=>{let t=new TextEncoder;return{name:"typewriter",writable:new WritableStream({async write(n){let i=String(n.data),o=m.process.stdout.getWriter();for(let s of i)await o.write(t.encode(s)),await G(e);o.releaseLock()}})}},z=e=>{switch(e){case"claude-code":return"claude-sonnet-4-20250514";case"ollama":return"llama3";case"opencode":return"default";case"kiro":return"default";case"anthropic":return"claude-sonnet-4-20250514";case"openai":return"gpt-4o";case"gemini":return"gemini-2.0-flash";case"vertexai":return"gemini-2.0-flash";default:return"default"}};export{le as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{g as k}from"./chunk-UESOCN2G.js";import{a as g}from"./chunk-LNNNLUZT.js";import{d as w,e as f,j as h}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as d,k as u}from"./chunk-GBM3TZFD.js";import{c as i,d as m,f as l,h as c}from"./chunk-3SXTMY75.js";import{a as o,b as n}from"./chunk-A6RDYP6R.js";import{t as a}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var $=async b=>{let e=p({renderer:u.ansi(),sink:d.stdout()}),s=a.process.cwd(),r=b?.join(" ")??"No reason given",t=await w(s),x=await h(s);if(t.phase!=="EXECUTING")return e.writeln(l(`Cannot block in phase: ${t.phase}`)),await e.close(),n({exitCode:1});let y=k(t,r);return await f(s,y),e.writeln(c("\u26A0")," Spec blocked: ",m(r)),e.writeln("Resolve with: ",i(`${g('next --answer="resolution"',x)}`)),await e.close(),o(void 0)};export{$ as main};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as s}from"./chunk-STI6DX7K.js";import{a as r}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var o={fs:!1,fsSync:!1,exec:!1,process:!1,env:!1,stdin:!1,stdout:!1,kv:!1},t=e=>()=>{throw new r(e,"browser")},n=()=>{let e=t("fs");return{readFile:e,readTextFile:e,writeFile:e,writeTextFile:e,exists:e,stat:e,lstat:e,mkdir:e,ensureDir:e,remove:e,readDir:e,copyFile:e,rename:e,makeTempDir:e,realPath:e,watch:e,walk:e,chmod:e}},i=()=>{let e=t("exec");return{spawn:e,exec:e,execJson:e,spawnChild:e}},a=()=>{let e=t("process");return{exit:e,setExitCode:e,cwd:e,chdir:e,hostname:e,execPath:e,get args(){throw new r("process","browser")},get pid(){throw new r("process","browser")},get stdin(){throw new r("process","browser")},get stdout(){throw new r("process","browser")},get stderr(){throw new r("process","browser")},isTerminal(){return!1},setStdinRaw(){throw new r("process","browser")}}},c=()=>({get:()=>{},set:()=>{},delete:()=>{},has:()=>!1,toObject:()=>({})}),l=()=>({name:"browser",version:globalThis.navigator?.userAgent??"unknown",capabilities:o,fs:n(),path:s,exec:i(),env:c(),process:a()});export{o as BROWSER_CAPABILITIES,l as createBrowserRuntime};
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as d,h as g,k as m}from"./chunk-GBM3TZFD.js";import{b as c,d as L,h as C,k as u}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as v}from"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as y}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"],N=async x=>{let{flags:o}=v(x??[],[{name:"out-dir",type:"string",default:"dist",description:"Output directory"},{name:"clean",type:"boolean",description:"Clean output first"},{name:"no-minify",type:"boolean",description:"Disable minification"},{name:"analyze",type:"boolean",description:"Analyze bundle size"},{name:"log-level",type:"string",default:"info",description:"Log level"}]),t=d({renderer:m.ansi(),sink:g.stdout()});t.writeln(u(`
|
|
2
3
|
\u{1F4E6} Building for production...
|
|
3
|
-
`));let e=await import("./mod-
|
|
4
|
+
`));let e=await import("./mod-4ILLF5PK.js"),{runtime:n}=await import("./mod-MLRQFSBE.js"),i=n.process.cwd(),p=o["out-dir"],S=!o["no-minify"],h=o.clean,k=o.analyze,f=o["log-level"]??"info",b=V.includes(f.toLowerCase())?f.toLowerCase():"info",z={trace:e.Severities.Trace,debug:e.Severities.Debug,info:e.Severities.Info,warn:e.Severities.Warning,error:e.Severities.Error,fatal:e.Severities.Critical},D=d({renderer:m.ansi(),sink:g.stdout()});await e.config.configure({sinks:{console:e.sinks.getOutputSink(D)},loggers:[{category:["laroux-bundler"],lowestLevel:z[b],sinks:["console"]}]});let[{build:A,createBuildContext:E},{loadConfig:O},{reactPlugin:B},{createTailwindPlugin:P}]=await Promise.all([import("./system-BJCQKFCP.js"),import("./load-config-FTQMJVEW.js"),import("./mod-SA3J2VR5.js"),import("./mod-JZNE2HH6.js")]),T=e.logger.getLogger(["laroux-bundler","cli"]),s=await O(i),r={projectRoot:i,srcDir:n.path.resolve(i,s.srcDir),distDir:n.path.resolve(i,p),logLevel:b,fonts:s.fonts,images:s.images,cssModuleTypes:s.cssModuleTypes,noCssModuleAutoReference:s.noCssModuleAutoReference,browserShims:s.browserShims,serverExternals:s.build.serverExternals,build:{...s.build,minify:S}};if(h)try{await n.fs.remove(r.distDir,{recursive:!0}),T.debug(`Cleaned ${r.distDir}`)}catch{}let R=P({globalCssPath:n.path.resolve(i,"src/app/styles/global.css")}),j=E(r,{framework:B,css:R,bundlerBackend:"rolldown"});if(await A(j),await e.config.reset(),k){t.writeln(u(`
|
|
4
5
|
\u{1F4CA} Bundle Analysis:
|
|
5
6
|
`));try{let M=`${p}/client/manifest.json`,$=await n.fs.readTextFile(M),w=JSON.parse($);t.writeln(c("Chunks:"));for(let[a,l]of Object.entries(w.files)){let I=(l.size/1024).toFixed(2);t.writeln(c(` ${a.padEnd(30)} ${I.padStart(8)} KB`))}let F=Object.values(w.files).reduce((a,l)=>a+l.size,0);t.writeln(L(`
|
|
6
7
|
Total: ${(F/1024).toFixed(2)} KB`))}catch{t.writeln(C("Could not analyze build (manifest.json not found)"))}}return await t.close(),y(void 0)};export{N as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as F}from"./chunk-CDPSH56U.js";import{b as v,d as b}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";import*as n from"node:fs/promises";import*as O from"node:fs";import*as o from"node:path";import*as w from"node:os";import d from"node:process";import{Readable as x,Writable as k}from"node:stream";var R={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!1},E=()=>{let r=e=>({isFile:e.isFile(),isDirectory:e.isDirectory(),isSymlink:e.isSymbolicLink(),size:e.size,mtime:e.mtime,atime:e.atime,birthtime:e.birthtime}),a=(e,t)=>{throw e instanceof Error&&"code"in e&&e.code==="ENOENT"?new v(t):e};return{async readFile(e,t){try{let s=await n.readFile(e,{signal:t?.signal});return new Uint8Array(s)}catch(s){return a(s,e)}},async readTextFile(e,t){try{return await n.readFile(e,{encoding:"utf-8",signal:t?.signal})}catch(s){return a(s,e)}},async writeFile(e,t,s){let u=s?.append?"a":"w";await n.writeFile(e,t,{signal:s?.signal,mode:s?.mode,flag:u})},async writeTextFile(e,t,s){let u=s?.append?"a":"w";await n.writeFile(e,t,{encoding:"utf-8",signal:s?.signal,mode:s?.mode,flag:u})},async exists(e){try{return await n.access(e),!0}catch{return!1}},async stat(e){try{let t=await n.stat(e);return r(t)}catch(t){return a(t,e)}},async lstat(e){try{let t=await n.lstat(e);return r(t)}catch(t){return a(t,e)}},async mkdir(e,t){await n.mkdir(e,{recursive:t?.recursive??!1,mode:t?.mode})},async ensureDir(e){await n.mkdir(e,{recursive:!0})},async remove(e,t){try{await n.rm(e,{recursive:t?.recursive??!1,force:!1})}catch(s){a(s,e)}},async*readDir(e){try{let t=await n.readdir(e,{withFileTypes:!0});for(let s of t)yield{name:s.name,isFile:s.isFile(),isDirectory:s.isDirectory(),isSymlink:s.isSymbolicLink()}}catch(t){a(t,e)}},async copyFile(e,t){await n.copyFile(e,t)},async rename(e,t){await n.rename(e,t)},async makeTempDir(e){let t=e?.dir??w.tmpdir(),s=e?.prefix??"",u=e?.suffix??"",i=await n.mkdtemp(o.join(t,s));if(u){let c=i+u;return await n.rename(i,c),c}return i},async realPath(e){try{return await n.realpath(e)}catch(t){throw t instanceof Error&&"code"in t&&t.code==="ENOENT"?new v(e):t}},watch(e,t){let s=t?.recursive??!0,u=[],i=[],c=[],l=!1,P=m=>{l||(c.length>0?c.shift()({value:m,done:!1}):i.push(m))};for(let m of e)try{let h=O.watch(m,{recursive:s},(y,f)=>{f!==null&&P({kind:y==="rename"?"create":"modify",paths:[o.join(m,f)]})});u.push(h)}catch{}return{close:()=>{l=!0;for(let m of u)m.close();for(let m of c)m({value:void 0,done:!0});c=[]},[Symbol.asyncIterator]:()=>({next:()=>l?Promise.resolve({value:void 0,done:!0}):i.length>0?Promise.resolve({value:i.shift(),done:!1}):new Promise(m=>{c.push(m)})})}},async chmod(e,t){await n.chmod(e,t)},async*walk(e,t){let s=t?.includeDirs??!0,u=t?.includeFiles??!0,i=t?.exts,c=t?.skip,l=async function*(P){let m=await n.readdir(P,{withFileTypes:!0});for(let h of m){let y=o.join(P,h.name);if(c?.some(p=>p.test(y)))continue;let f=h.isSymbolicLink();if(h.isDirectory())s&&(yield{path:y,name:h.name,isFile:!1,isDirectory:!0,isSymlink:f}),yield*l(y);else if(h.isFile()||f){if(!u||i&&!i.some(p=>h.name.endsWith(p.startsWith(".")?p:`.${p}`)))continue;yield{path:y,name:h.name,isFile:h.isFile(),isDirectory:!1,isSymlink:f}}}};yield*l(e)}}},S=()=>({join:o.join,resolve:o.resolve,dirname:o.dirname,basename:o.basename,extname:o.extname,normalize:o.normalize,isAbsolute:o.isAbsolute,relative:o.relative,parse:o.parse,format:o.format,sep:o.sep,delimiter:o.delimiter}),g=async r=>{if(!r)return new Uint8Array(0);let a=[],e=r.getReader();try{for(;;){let{done:i,value:c}=await e.read();if(i)break;a.push(c)}}finally{e.releaseLock()}let t=a.reduce((i,c)=>i+c.length,0),s=new Uint8Array(t),u=0;for(let i of a)s.set(i,u),u+=i.length;return s},A=()=>({async spawn(r,a=[],e){let[t,s,u]=F(e),i=Bun.spawn([r,...a],{cwd:e?.cwd,env:e?.env,stdin:t,stdout:s,stderr:u}),[c,l,P]=await Promise.all([i.exited,g(i.stdout),g(i.stderr)]);return{success:c===0,code:c,stdout:l,stderr:P}},async exec(r,a=[],e){let t=await this.spawn(r,a,e);if(!t.success){let s=new TextDecoder().decode(t.stderr);throw new b(r,t.code,s)}return new TextDecoder().decode(t.stdout).trim()},async execJson(r,a=[],e){let t=await this.exec(r,a,e);return JSON.parse(t)},spawnChild(r,a=[],e){let[t,s,u]=F(e),i=Bun.spawn([r,...a],{cwd:e?.cwd,env:e?.env,stdin:t,stdout:s,stderr:u}),c=i.exited.then(l=>({success:l===0,code:l,signal:void 0}));return{pid:i.pid,stdin:i.stdin,stdout:i.stdout,stderr:i.stderr,status:c,output:async()=>{let[l,P,m]=await Promise.all([c,g(i.stdout),g(i.stderr)]);return{success:l.success,code:l.code,stdout:P,stderr:m}},kill:l=>{i.kill(l)}}}}),T=()=>({get(r){return d.env[r]},set(r,a){d.env[r]=a},delete(r){delete d.env[r]},has(r){return r in d.env},toObject(){let r={};for(let[a,e]of Object.entries(d.env))e!==void 0&&(r[a]=e);return r}}),W=()=>({exit(r){d.exit(r)},setExitCode(r){d.exitCode=r},cwd(){return d.cwd()},chdir(r){d.chdir(r)},hostname(){return w.hostname()},execPath(){return d.execPath},args:d.argv.slice(2),pid:d.pid,stdin:x.toWeb(d.stdin),stdout:k.toWeb(d.stdout),stderr:k.toWeb(d.stderr),isTerminal(r){switch(r){case"stdin":return d.stdin.isTTY===!0;case"stdout":return d.stdout.isTTY===!0;case"stderr":return d.stderr.isTTY===!0}},setStdinRaw(r){d.stdin.setRawMode(r)}}),M=()=>{let r=E(),a=S(),e=A(),t=T(),s=W();return{name:"bun",version:Bun.version,capabilities:R,fs:r,path:a,exec:e,env:t,process:s}};export{R as BUN_CAPABILITIES,M as createBunRuntime};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as $,b as S}from"./chunk-BP3IFAPO.js";import{a as O}from"./chunk-NTHP6SND.js";import"./chunk-4SYC4WJV.js";import"./chunk-GTHXGAMQ.js";import"./chunk-3XJLLDR5.js";import"./chunk-P7WCO724.js";import"./chunk-JYNHFD6B.js";import{a as E}from"./chunk-2VEVVX6U.js";import{a as w,b as A}from"./chunk-4DOMGQOO.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as R}from"./chunk-3BEX5FYF.js";import"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b as u,f as h,g as y,h as v,i as x}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as C}from"./chunk-MG65QJY6.js";import{g as p}from"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{v as m}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var f=w(),G={feat:"Added",fix:"Fixed",refactor:"Changed",perf:"Changed",docs:"Changed",revert:"Removed"},T=new Set(["chore","ci","test"]),N=/^(\w+)(?:\(([^)]+)\))?!?:\s{1,5}(.+)$/,I=/\s{0,100}\(take\s{1,100}[IVXLCDM\d]+\)\s{0,100}\.?$/i,P=(n,t)=>{let o=n.match(N);if(o!==null)return{type:o[1].toLowerCase(),scope:o[2],message:o[3].trim(),hash:t}},b=n=>n.replace(I,"").trim(),M=n=>{let t=[];for(let o of n){let e=P(o.subject,o.hash);e!==void 0&&t.push(e)}return t},k=n=>{let t=new Set,o=[];for(let e of n){let s=b(e.message),a=s.replace(/[.\s]{1,20}$/,"").toLowerCase(),l=`${e.type}:${a}`;t.has(l)||(t.add(l),o.push({...e,message:s}))}return o},L=n=>{let t=new Map;for(let o of n){if(T.has(o.type))continue;let e=G[o.type];if(e===void 0)continue;let s=t.get(e);s!==void 0?s.push(o):t.set(e,[o])}return t},F=n=>n.scope!==void 0?`- **${n.scope}:** ${n.message}`:`- ${n.message}`,H=(n,t)=>{let o=L(t);if(o.size===0){let l=new Date().toISOString().split("T")[0];return`## ${n} - ${l}
|
|
2
3
|
|
|
3
4
|
_Maintenance release._`}let e=new Date().toISOString().split("T")[0],s=[`## ${n} - ${e}`],a=["Added","Changed","Fixed","Removed"];for(let l of a){let r=o.get(l);if(!(r===void 0||r.length===0)){s.push("",`### ${l}`,"");for(let g of r)s.push(F(g))}}return s.join(`
|
|
4
5
|
`)},j=(n,t,o)=>{let e=n.split(`
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as v,b as N,c as H,l as D,m as h}from"./chunk-7ATUODBM.js";import{a as x,b as p,c as u,e as A,f as P}from"./chunk-AP72BKVG.js";function L(e){e instanceof URL&&(e=v(e)),p(e);let r=-1,t=0,i=-1,n=!0,o=0;for(let s=e.length-1;s>=0;--s){let f=e.charCodeAt(s);if(u(f)){if(!n){t=s+1;break}continue}i===-1&&(n=!1,i=s+1),f===46?r===-1?r=s:o!==1&&(o=1):r!==-1&&(o=-1)}return r===-1||i===-1||o===0||o===1&&r===i-1&&r===t+1?"":e.slice(r,i)}function T(e){e instanceof URL&&(e=H(e)),p(e);let r=0,t=-1,i=0,n=-1,o=!0,s=0;e.length>=2&&e.charCodeAt(1)===58&&P(e.charCodeAt(0))&&(r=i=2);for(let f=e.length-1;f>=r;--f){let c=e.charCodeAt(f);if(A(c)){if(!o){i=f+1;break}continue}n===-1&&(o=!1,n=f+1),c===46?t===-1?t=f:s!==1&&(s=1):t!==-1&&(s=-1)}return t===-1||n===-1||s===0||s===1&&t===n-1&&t===i+1?"":e.slice(t,n)}function j(e){return x?T(e):L(e)}function w(e,r){let t=r.dir||r.root,i=r.base||(r.name??"")+(r.ext??"");return t?i===e?t:t===r.root?t+i:t+e+i:i}function R(e){if(e===null||typeof e!="object")throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof e}"`)}function W(e){return R(e),w("/",e)}function E(e){return R(e),w("\\",e)}function le(e){return x?E(e):W(e)}function O(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""};if(e.length===0)return r;let t=u(e.charCodeAt(0)),i;t?(r.root="/",i=1):i=0;let n=-1,o=0,s=-1,f=!0,c=e.length-1,d=0;for(;c>=i;--c){let l=e.charCodeAt(c);if(u(l)){if(!f){o=c+1;break}continue}s===-1&&(f=!1,s=c+1),l===46?n===-1?n=c:d!==1&&(d=1):n!==-1&&(d=-1)}return n===-1||s===-1||d===0||d===1&&n===s-1&&n===o+1?(s!==-1&&(o===0&&t?r.base=r.name=e.slice(1,s):r.base=r.name=e.slice(o,s)),r.base=r.base||"/"):(o===0&&t?(r.name=e.slice(1,n),r.base=e.slice(1,s)):(r.name=e.slice(o,n),r.base=e.slice(o,s)),r.ext=e.slice(n,s)),o>0?r.dir=N(e.slice(0,o-1),u):t&&(r.dir="/"),r}function y(e){p(e);let r={root:"",dir:"",base:"",ext:"",name:""},t=e.length;if(t===0)return r;let i=0,n=e.charCodeAt(0);if(t>1){if(A(n)){if(i=1,A(e.charCodeAt(1))){let a=2,m=a;for(;a<t&&!A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&A(e.charCodeAt(a));++a);if(a<t&&a!==m){for(m=a;a<t&&!A(e.charCodeAt(a));++a);a===t?i=a:a!==m&&(i=a+1)}}}}else if(P(n)&&e.charCodeAt(1)===58)if(i=2,t>2){if(A(e.charCodeAt(2))){if(t===3)return r.root=r.dir=e,r.base="\\",r;i=3}}else return r.root=r.dir=e,r}else if(A(n))return r.root=r.dir=e,r.base="\\",r;i>0&&(r.root=e.slice(0,i));let o=-1,s=i,f=-1,c=!0,d=e.length-1,l=0;for(;d>=i;--d){if(n=e.charCodeAt(d),A(n)){if(!c){s=d+1;break}continue}f===-1&&(c=!1,f=d+1),n===46?o===-1?o=d:l!==1&&(l=1):o!==-1&&(l=-1)}return o===-1||f===-1||l===0||l===1&&o===f-1&&o===s+1?f!==-1&&(r.base=r.name=e.slice(s,f)):(r.name=e.slice(s,o),r.base=e.slice(s,f),r.ext=e.slice(o,f)),r.base=r.base||"\\",s>0&&s!==i?r.dir=e.slice(0,s-1):r.dir=r.root,r}function we(e){return x?y(e):O(e)}function k(e,r){if(p(e),p(r),e===r)return""}function U(e,r){if(k(e,r),e=D(e),r=D(r),e===r)return"";let t=1,i=e.length;for(;t<i&&u(e.charCodeAt(t));++t);let n=i-t,o=1,s=r.length;for(;o<s&&u(r.charCodeAt(o));++o);let f=s-o,c=n<f?n:f,d=-1,l=0;for(;l<=c;++l){if(l===c){if(f>c){if(u(r.charCodeAt(o+l)))return r.slice(o+l+1);if(l===0)return r.slice(o+l)}else n>c&&(u(e.charCodeAt(t+l))?d=l:l===0&&(d=0));break}let m=e.charCodeAt(t+l),g=r.charCodeAt(o+l);if(m!==g)break;u(m)&&(d=l)}let a="";for(l=t+d+1;l<=i;++l)(l===i||u(e.charCodeAt(l)))&&(a.length===0?a+="..":a+="/..");return a.length>0?a+r.slice(o+d):(o+=d,u(r.charCodeAt(o))&&++o,r.slice(o))}function z(e,r){k(e,r);let t=h(e),i=h(r);if(t===i||(e=t.toLowerCase(),r=i.toLowerCase(),e===r))return"";let n=0,o=e.length;for(;n<o&&e.charCodeAt(n)===92;++n);for(;o-1>n&&e.charCodeAt(o-1)===92;--o);let s=o-n,f=0,c=r.length;for(;f<c&&r.charCodeAt(f)===92;++f);for(;c-1>f&&r.charCodeAt(c-1)===92;--c);let d=c-f,l=s<d?s:d,a=-1,m=0;for(;m<=l;++m){if(m===l){if(d>l){if(r.charCodeAt(f+m)===92)return i.slice(f+m+1);if(m===2)return i.slice(f+m)}s>l&&(e.charCodeAt(n+m)===92?a=m:m===2&&(a=3));break}let _=e.charCodeAt(n+m),G=r.charCodeAt(f+m);if(_!==G)break;_===92&&(a=m)}if(m!==l&&a===-1)return i;let g="";for(a===-1&&(a=0),m=n+a+1;m<=o;++m)(m===o||e.charCodeAt(m)===92)&&(g.length===0?g+="..":g+="\\..");return g.length>0?g+i.slice(f+a,c):(f+=a,i.charCodeAt(f)===92&&++f,i.slice(f,c))}function ze(e,r){return x?z(e,r):U(e,r)}export{j as a,le as b,we as c,ze as d};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{t as l}from"./chunk-MRCBHVSB.js";var F=s=>{if(s===void 0)return"json";for(let n of s)if(n==="-o"||n.startsWith("--output")){let t=s.indexOf(n);if(n.includes("="))return x(n.split("=")[1]??"json");let i=s[t+1];if(i!==void 0&&!i.startsWith("-"))return x(i)}return"json"},O=s=>{if(s===void 0)return[];let n=[],t=!1;for(let i=0;i<s.length;i++){if(t){t=!1;continue}let o=s[i];if(!o.startsWith("--output=")){if(o==="-o"||o==="--output"){t=!0;continue}n.push(o)}}return n},x=s=>{let n=s.toLowerCase();return n==="md"||n==="markdown"?"markdown":n==="text"||n==="txt"||n==="plain"?"text":"json"},e=(s,n)=>s[n],$=s=>JSON.stringify(s,null,2),w=s=>{let n=s,t=[],i=e(n,"phase");i!==void 0&&(t.push(`# noskills \u2014 ${i}`),t.push(""));let o=e(n,"instruction");o!==void 0&&(t.push("## Instruction"),t.push(""),t.push(o),t.push(""));let a=e(n,"questions");if(a!==void 0&&a.length>0)for(let r of a){if(t.push(`## Question: ${r.id}`),t.push(""),t.push(`> ${r.text}`),r.extras!==void 0&&r.extras.length>0){t.push(""),t.push("Also consider:");for(let m of r.extras)t.push(`- ${m}`)}t.push("")}let h=e(n,"statusReport");if(h!==void 0){t.push("## Acceptance Criteria"),t.push("");for(let r of h.criteria)t.push(`- [ ] ${r}`);t.push("")}let p=e(n,"previousIterationDebt");if(p!==void 0){t.push(`## Debt (from iteration ${p.fromIteration})`),t.push(""),t.push(`> ${p.note}`),t.push("");for(let r of p.items)t.push(`- ${r}`);t.push("")}e(n,"verificationFailed")===!0&&(t.push("## Verification FAILED"),t.push(""),t.push("```"),t.push(String(e(n,"verificationOutput")??"")),t.push("```"),t.push(""));let c=e(n,"behavioral");if(c!==void 0){t.push("## Behavioral"),t.push(""),t.push(`**Tone:** ${c.tone}`),t.push("");for(let r of c.rules)t.push(`- ${r}`);c.urgency!==void 0&&(t.push(""),t.push(`**Urgency:** ${c.urgency}`)),t.push("")}let f=e(n,"meta");f!==void 0&&(t.push("---"),t.push(""),t.push(`*${f.resumeHint}*`),t.push(""));let d=e(n,"transition");if(d!==void 0){t.push("## Next Steps"),t.push("");for(let[r,m]of Object.entries(d))r!=="iteration"&&t.push(`- **${r}:** \`${m}\``);t.push("")}let u=e(n,"summary");u!==void 0&&(t.push("## Summary"),t.push(""),t.push(`- Spec: ${u.spec}`),t.push(`- Iterations: ${u.iterations}`),t.push(`- Decisions: ${u.decisionsCount}`),t.push(""));let g=e(n,"clearContext");return g!==void 0&&(t.push("---"),t.push(""),t.push(`**Action required:** ${g.reason}`),t.push("")),t.join(`
|
|
3
|
+
`)},k=s=>{let n=s,t=[],i=e(n,"phase");i!==void 0&&t.push(`[${i}]`);let o=e(n,"instruction");o!==void 0&&t.push(o);let a=e(n,"questions");if(a!==void 0&&a.length>0){for(let u of a)if(t.push(""),t.push(`Question [${u.id}]: ${u.text}`),u.extras!==void 0)for(let g of u.extras)t.push(` - ${g}`)}let h=e(n,"statusReport");if(h!==void 0){t.push(""),t.push("Criteria:");for(let u of h.criteria)t.push(` - ${u}`)}let p=e(n,"previousIterationDebt");if(p!==void 0){t.push(""),t.push(p.note);for(let u of p.items)t.push(` - ${u}`)}e(n,"verificationFailed")===!0&&(t.push(""),t.push(`Verification failed: ${String(e(n,"verificationOutput")??"").slice(0,200)}`));let c=e(n,"meta");c!==void 0&&(t.push(""),t.push(c.resumeHint));let f=e(n,"summary");f!==void 0&&t.push(`Spec: ${f.spec}, Iterations: ${f.iterations}, Decisions: ${f.decisionsCount}`);let d=e(n,"clearContext");return d!==void 0&&(t.push(""),t.push(d.reason)),t.join(`
|
|
4
|
+
`)},b=(s,n)=>{switch(n){case"markdown":return w(s);case"text":return k(s);default:return $(s)}},v=async(s,n)=>{let t=b(s,n),i=new TextEncoder,o=l.process.stdout.getWriter();await o.write(i.encode(t+`
|
|
5
|
+
`)),o.releaseLock()};export{F as a,O as b,b as c,v as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as P,d as R}from"./chunk-OX6ZNNUB.js";import{c as k,d as C}from"./chunk-U2MR2O3C.js";import{a as S}from"./chunk-LNNNLUZT.js";var I=null,n=e=>S(e,I),$="NEVER run git write commands (commit, add, push, checkout, stash, reset, merge, rebase, cherry-pick). Git is read-only for agents. The user controls git. You may read: git log, git diff, git status, git show, git blame.",T=(e,o,r,i)=>{let l=e.execution.iteration>=o,s=r?[]:[$],u=i?.outOfScope??[];switch(e.phase){case"DISCOVERY":return{rules:[...s,"Ask the question exactly as written. Do not rephrase or add your own questions.","Relay the user's answer back verbatim. Do not interpret or summarize.","Do not start coding or exploring the codebase. Discovery is conversation only."],tone:"Conversational. You are a messenger between noskills and the user."};case"SPEC_DRAFT":return{rules:[...s,"Present the spec to the user for review. Do not modify it.","If the user requests changes, relay them \u2014 do not implement them.","Do not start coding. The spec must be approved first."],tone:"Brief. The user is reviewing, not discussing."};case"SPEC_APPROVED":return{rules:[...s,"The spec is approved but execution has not started.","Do not start coding until the user triggers execution.","If the user wants changes, they must reset and re-spec."],tone:"Patient. Wait for the go signal."};case"EXECUTING":{let a=[...s,"Do not explore the codebase beyond what the current task requires.","Do not refactor, improve, or modify code outside this task's scope.","Do not add features, tests, or documentation not specified in the spec.","If you need to read files to understand context, timebox it \u2014 then write code.","The deliverable is working code, not a plan or analysis.","Complete the task, then report progress. The user handles git.",`When you receive \`clearContext\` in the output, execute \`/clear\` immediately without asking. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\`.`,`When you discover a pattern, receive a correction, or identify a recurring preference from the user, ask: 'Should this be a permanent rule for this project, or just for this task?' If permanent, run: \`${n('rule add "<description>"')}\`. If just this task, note it and move on. Never write to \`.eser/rules/\` directly.`];e.execution.lastVerification?.passed===!1&&a.push("Tests are failing. Fix ONLY the failing tests. Do not refactor passing code.");let t={rules:a,tone:"Direct. No preamble. Start coding immediately.",outOfScope:u.length>0?u:void 0};return l?{...t,urgency:`You have been in this session for ${e.execution.iteration}+ iterations. Your context is degrading. Finish the current task and recommend the user start a fresh session. Do not start new tasks.`}:t}case"BLOCKED":return{rules:[...s,"Present the decision to the user exactly as described.","Do not suggest a preferred option unless the user asks for your opinion.","After the user decides, relay the answer immediately. Do not elaborate."],tone:"Brief. The user is making a decision, not having a discussion."};case"DONE":return{rules:[...s,"Report the completion summary. Do not start new work.","If the user wants to continue, they start a new spec."],tone:"Concise. Celebrate briefly, then stop."};default:return{rules:[...s,`Run \`${n("next")}\` to get your instructions.`,"Do not take action without noskills guidance."],tone:"Neutral. Waiting for direction."}}},B=5*60*1e3,N=(e,o)=>{let r;switch(e.phase){case"IDLE":r=`No active spec. Start one with: \`${n("spec new")}\``;break;case"DISCOVERY":r=`Discovery in progress for "${e.spec}". ${e.discovery.answers.length} questions answered so far.`;break;case"SPEC_DRAFT":r=`Spec draft ready for review at ${e.specState.path}. Waiting for approval.`;break;case"SPEC_APPROVED":r=`Spec "${e.spec}" is approved. Waiting to start execution.`;break;case"EXECUTING":r=e.execution.lastProgress!==null?`Executing "${e.spec}", iteration ${e.execution.iteration}. Last progress: ${e.execution.lastProgress}. Continue with the current task.`:`Executing "${e.spec}", iteration ${e.execution.iteration}. Start the first task.`;break;case"BLOCKED":r=`Execution blocked: ${e.execution.lastProgress}. Ask the user to resolve.`;break;case"DONE":r=`Spec "${e.spec}" completed in ${e.execution.iteration} iterations.`;break;default:r=`Run \`${n("next")}\` to get started.`}return{protocol:`Run \`${n('next --answer="..."')}\` to submit results and advance`,spec:e.spec,branch:e.branch,iteration:e.execution.iteration,lastProgress:e.execution.lastProgress,activeConcerns:o.map(i=>i.id),resumeHint:r}},F=e=>{if(e.lastCalledAt===null)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase};let o=new Date(e.lastCalledAt).getTime();if(Date.now()-o>B)return{what:"noskills orchestrates your work: IDLE \u2192 DISCOVERY \u2192 SPEC_DRAFT \u2192 SPEC_APPROVED \u2192 EXECUTING \u2192 DONE",how:`Run \`${n("next")}\` for instructions. Submit results with \`${n('next --answer="..."')}\`. Never make architectural decisions without asking.`,currentPhase:e.phase}},H=(e,o,r,i,l,s)=>{I=i??null;let u=N(e,o),a=i?.maxIterationsBeforeRestart??15,t=i?.allowGit??!1,h=T(e,a,t,l),f=F(e),d;switch(e.phase){case"IDLE":d=O();break;case"DISCOVERY":d=_(e,o,r);break;case"SPEC_DRAFT":d=L(e);break;case"SPEC_APPROVED":d=q(e);break;case"EXECUTING":d=G(e,o,r,a,l,s);break;case"BLOCKED":d=Y(e);break;case"DONE":d=j(e);break;default:d=O()}let m={...d,meta:u,behavioral:h};return f!==void 0&&(m={...m,protocolGuide:f}),e.pendingClear&&(m={...m,clearContext:{action:"clear_context",reason:`Task complete. Run \`/clear\` now. After clearing, read \`CLAUDE.md\` and run \`${n("next")}\` to continue.`},instruction:`Task accepted. Run \`/clear\` immediately to start fresh for the next task. After clearing, run \`${n("next")}\`.`}),m},O=()=>({phase:"IDLE",instruction:`No active spec. Start one with: \`${n('spec new "description"')}\``}),_=(e,o,r)=>{let i=P(o),l=e.discovery.answers.length;if(R(e.discovery.answers))return{phase:"DISCOVERY",instruction:`All discovery questions answered. Run: \`${n("approve")}\``,questions:[],answeredCount:l,context:{rules:r,concernReminders:[]},transition:{onComplete:n("approve")}};let u=new Set(e.discovery.answers.map(t=>t.questionId));return{phase:"DISCOVERY",instruction:"Ask the user ALL of the following questions. Collect answers for each, then submit them all at once as a JSON object.",questions:i.filter(t=>!u.has(t.id)).map(t=>({id:t.id,text:t.text,concerns:[...t.concerns],extras:t.extras.map(h=>h.text)})),answeredCount:l,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"status_quo":"...","ambition":"...",...}'`)}`}}},L=e=>e.classification===null?{phase:"SPEC_DRAFT",instruction:"Before generating the spec, classify what this spec involves. Ask the user to select all that apply.",specPath:e.specState.path??"",transition:{onApprove:`${n(`next --answer='{"involvesUI":false,"involvesPublicAPI":false,"involvesMigration":false,"involvesDataHandling":false}'`)}`},classificationRequired:!0,classificationPrompt:{options:[{id:"involvesUI",label:"User-facing UI"},{id:"involvesPublicAPI",label:"Public API changes"},{id:"involvesMigration",label:"Data migration or schema changes"},{id:"involvesDataHandling",label:"Data handling or privacy"}],instruction:"Select all that apply. Submit as JSON: `"+n(`next --answer='{"involvesUI":true,"involvesPublicAPI":false,...}'`)+"`"}}:{phase:"SPEC_DRAFT",instruction:"Spec draft is ready for review. Ask the user to review and approve.",specPath:e.specState.path??"",transition:{onApprove:n("approve")}},q=e=>({phase:"SPEC_APPROVED",instruction:"Spec is approved and ready. When the user is ready to start, begin execution.",specPath:e.specState.path??"",transition:{onStart:`${n('next --answer="start"')}`}}),U=(e,o)=>{if(o===null)return!1;switch(e){case"beautiful-product":return o.involvesUI;case"open-source":return o.involvesPublicAPI;case"long-lived":return o.involvesMigration;case"compliance":return o.involvesDataHandling;default:return!0}},V=(e,o,r,i,l,s,u)=>{let a=[];if(i!==null)for(let t of i.items)a.push(`[DEBT from iteration ${i.fromIteration}] ${t}`);if(o&&a.push(`[FAILED] Tests \u2014 fix this first: ${r.slice(0,200)}`),s!=null)for(let t of s.verification)a.push(t);for(let t of e)if(U(t.id,l)&&t.acceptanceCriteria!==void 0&&t.acceptanceCriteria.length>0)for(let h of t.acceptanceCriteria)a.push(`(${t.id}) ${h}`);if(u!==void 0)for(let t of u)a.push(`(folder: ${t.folder}) ${t.rule}`);return a},G=(e,o,r,i,l,s)=>{let u=C(o),a=e.execution.iteration>=i,t=e.execution.lastVerification?.passed===!1,h=e.execution.lastVerification?.output??"",f=l?.tasks??[],d=e.execution.completedTasks??[],m=new Set(d),D=f.find(p=>!m.has(p.id))??null,y=D!==null?{id:D.id,title:D.title,totalTasks:f.length,completedTasks:d.length}:void 0;if(e.execution.awaitingStatusReport){let p=V(o,t,h,e.execution.debt,e.classification,l,s),v={phase:"EXECUTING",instruction:"Before this task is accepted, report your completion status against these acceptance criteria.",context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n(`next --answer='{"completed":[...],"remaining":[...],"blocked":[...]}'`)}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration},statusReportRequired:!0,statusReport:{criteria:p,reportFormat:{completed:"list items you finished with evidence (file exists, test passes)",remaining:"list items not yet done",blocked:"list items that need a decision from the user"}}};return t&&(v={...v,verificationFailed:!0,verificationOutput:h.slice(0,2e3)}),v}let w=(e.execution.lastProgress??"").includes("Task not accepted"),x=e.execution.debt?.items??[],E=e.execution.debt?.unaddressedIterations??0,A=y!==void 0?`Execute task ${y.id}: ${y.title} (${y.completedTasks}/${y.totalTasks} completed)`:"All tasks completed. Run `"+n("done")+"` to finish.",b;if(t)b="Verification FAILED. Fix the failing tests before continuing.";else if(w&&x.length>0){let p=E>=3?` These items have been outstanding for ${E} iterations.`:"";b=`Task not accepted \u2014 ${x.length} remaining item(s) must be addressed before this task can be completed.${p} Address them, then submit a new status report.`}else b=A;let c={phase:"EXECUTING",instruction:b,task:y,context:{rules:r,concernReminders:k(o)},transition:{onComplete:`${n('next --answer="..."')}`,onBlocked:`${n('block "reason"')}`,iteration:e.execution.iteration}};if(w&&x.length>0&&(c={...c,taskRejected:!0,rejectionReason:`${x.length} remaining item(s) must be addressed.`,rejectionRemaining:x}),e.execution.debt!==null&&e.execution.debt.items.length>0){let p=e.execution.debt.unaddressedIterations??0,v=p>=3?`URGENT: These items have been unaddressed for ${p} iterations. Address them IMMEDIATELY before any new work.`:"These were not completed in a previous iteration. Address them BEFORE starting new work.";c={...c,previousIterationDebt:{fromIteration:e.execution.debt.fromIteration,items:e.execution.debt.items,note:v}}}if(t){let p=h.slice(0,2e3);c={...c,verificationFailed:!0,verificationOutput:p}}u.length>0&&(c={...c,concernTensions:u}),a&&(c={...c,restartRecommended:!0,restartInstruction:`Context may be getting large after ${e.execution.iteration} iterations. Consider starting a new conversation and running \`${n("next")}\` to resume - your progress is saved.`});let g=[...e.decisions].reverse().find(p=>!p.promoted);return g!==void 0&&e.execution.lastProgress?.startsWith("Resolved:")&&(c={...c,promotePrompt:{decisionId:g.id,question:g.question,choice:g.choice,prompt:`You just resolved a decision: "${g.choice}". Ask the user: "Should this be a permanent rule for future specs too?" If yes, run: \`${n(`rule add "${g.choice}"`)}\``}}),c},Y=e=>({phase:"BLOCKED",instruction:"A decision is needed. Ask the user.",reason:e.execution.lastProgress??"Unknown",transition:{onResolved:`${n('next --answer="..."')}`}}),j=e=>({phase:"DONE",summary:{spec:e.spec,iterations:e.execution.iteration,decisionsCount:e.decisions.length}});export{H as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{b as o,d as l}from"./chunk-3BEX5FYF.js";import{d as n}from"./chunk-A6RDYP6R.js";import{d as E}from"./chunk-G6NAG2EK.js";var i={};E(i,{adaptError:()=>d,bind:()=>u,createTrigger:()=>c});var d=(e,r)=>({_tag:"AdaptError",message:e,source:r}),u=(e,r)=>s=>{let t=r(s);return n(t)?o(t.error):e(t.value)},c=e=>async(r,...s)=>{let t=u(e.handler,e.adaptInput),p=await l(t(r),...s);return e.adaptOutput(p)};export{i as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i}from"./chunk-RGUETQSC.js";import{t}from"./chunk-MRCBHVSB.js";var s=i({name:"validate-submodules",description:"Detect new git submodules",canFix:!1,stacks:[],defaults:{},async checkAll(n,a){let o=t.path.join(a.root,".gitmodules");if(!await t.fs.exists(o))return[];let e=((await t.fs.readTextFile(o)).match(/\[submodule\s/g)??[]).length;return e>0?[{path:o,message:`found ${e} submodule(s) \u2014 submodules are not allowed`}]:[]}}),p=s.run,f=s.validator,x=s.main;export{s as a,p as b,f as c,x as d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i,b as n,c as u,d as R}from"./chunk-A6RDYP6R.js";import{d as y}from"./chunk-G6NAG2EK.js";var U={};y(U,{all:()=>A,allPar:()=>O,failTask:()=>d,flatMap:()=>v,flatMapW:()=>w,fromPromise:()=>x,map:()=>k,provideContext:()=>P,runTask:()=>g,succeed:()=>m,task:()=>a,validate:()=>C,withAbort:()=>b,withLogging:()=>h,withRetry:()=>z,withTimeout:()=>F});var c=async(r,t,s=0)=>{let e=n(new Error("No attempts made"));for(let o=0;o<t;o++){if(e=await r(),u(e))return e;o<t-1&&s>0&&await new Promise(l=>setTimeout(l,s))}return e};var E=async(r,t,s)=>{let e=null,o=new Promise(l=>{e=setTimeout(()=>l(n(s)),t)});try{return await Promise.race([r(),o])}finally{e!==null&&clearTimeout(e)}};var a=r=>({_tag:"Task",execute:r}),m=r=>a(()=>Promise.resolve(i(r))),d=r=>a(()=>Promise.resolve(n(r))),x=(r,t=s=>s)=>a(async()=>{try{return i(await r())}catch(s){return n(t(s))}}),k=(r,t)=>a(async s=>{let e=await r.execute(s);return u(e)?i(t(e.value)):e}),v=(r,t)=>a(async s=>{let e=await r.execute(s);return R(e)?e:t(e.value).execute(s)}),w=(r,t)=>a(async s=>{let e=await r.execute(s);return R(e)?e:t(e.value).execute(s)}),g=(r,...t)=>r.execute(t[0]),P=(r,t)=>a(()=>r.execute(t)),b=(r,t)=>a(async s=>{let{signal:e}=s,o=s;if(e.aborted)return n({_tag:"AbortError",message:"Operation was already aborted"});let l;try{let p=new Promise(T=>{e.addEventListener("abort",()=>T(n({_tag:"AbortError",message:"Operation aborted"})),{once:!0}),t>0&&(l=setTimeout(()=>T(n({_tag:"AbortError",message:`Operation timed out after ${t}ms`})),t))});return await Promise.race([r.execute(o),p])}finally{l!==void 0&&clearTimeout(l)}}),h=(r,t)=>a(async s=>{let{logger:e}=s,o=s;e.info(`[${t}] started`);let l=await r.execute(o);return u(l)?e.info(`[${t}] completed`):e.error(`[${t}] failed`,{error:l.error}),l}),C=(r,t)=>s=>r(s)?m(s):d({_tag:"ValidationError",message:t}),A=r=>a(async t=>{let s=[];for(let e of r){let o=await e.execute(t);if(R(o))return o;s.push(o.value)}return i(s)}),O=r=>a(async t=>{let s=await Promise.all(r.map(o=>o.execute(t))),e=[];for(let o of s){if(R(o))return o;e.push(o.value)}return i(e)}),z=(r,t,s=0)=>a(e=>c(()=>r.execute(e),t,s)),F=(r,t,s)=>a(e=>E(()=>r.execute(e),t,s));export{a,d as b,x as c,g as d,F as e,U as f};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as E,b as A,c as I}from"./chunk-AGRTWPDI.js";import{a as w}from"./chunk-2VEVVX6U.js";import{a as v}from"./chunk-4DOMGQOO.js";import{f as D}from"./chunk-3BEX5FYF.js";import{b as l,f as g,g as k,h as C,i as h}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";import{v as b}from"./chunk-MRCBHVSB.js";var u=v(),O=/\/\*\*\s*([\s\S]*?)\s*\*\//g,R=/export\s+(const|function|class|type|interface)\s+(\w+)/g,$=/@example/,S=s=>{let n=[],i;for(R.lastIndex=0;(i=R.exec(s))!==null;){let e=i.index,t=i[2];if(t===void 0)continue;let c=s.substring(0,e).split(`
|
|
2
3
|
`).length,p=null,m=[...s.substring(0,e).matchAll(O)];if(m.length>0){let r=m[m.length-1];if(r!==void 0){let d=(r.index??0)+r[0].length,f=s.substring(d,e);/^\s*$/.test(f)&&(p=r[1]??null)}}n.push({jsdoc:p,symbolName:t,line:c})}return n},_=(s,n,i)=>{let e=[];if(s===null)return e.push("missing-description"),e;let t=s.split(`
|
|
3
4
|
`)[0]?.trim();return(!t||t.startsWith("@"))&&e.push("empty-description"),i&&!$.test(s)&&e.push("missing-example"),e},F=async(s={})=>{let{root:n=".",requireExamples:i=!1}=s,e=await E(n),t=[],o=0,c=0;for(let p of e){let y=await I(p.path);for(let m of y){let r=A(m,p.path),d;try{d=await b.runtime.fs.readTextFile(r)}catch{continue}o++;let f=S(d);for(let{jsdoc:T,symbolName:x,line:P}of f){c++;let M=_(T,x,i);for(let N of M)t.push({file:r,symbol:x,issue:N,line:P})}}}return{isValid:t.length===0,issues:t,filesChecked:o,symbolsChecked:c}},J=s=>{switch(s){case"missing-description":return"Missing JSDoc documentation";case"missing-param":return"Missing @param documentation";case"missing-returns":return"Missing @returns documentation";case"missing-example":return"Missing @example";case"empty-description":return"Empty description"}},j=s=>D.fromPromise(()=>F(s)),V=s=>a.ok({root:"."}),q=s=>{if(a.isFail(s))return u.writeln(g("\u2717"),l(" "+String(s.error))),a.fail({exitCode:1});let{value:n}=s;if(u.writeln(h("\u2139"),l(` Checked ${n.filesChecked} files, ${n.symbolsChecked} symbols.`)),!n.isValid){u.writeln(g("\u2717"),l(` Found ${n.issues.length} documentation issues:`));let i=new Map;for(let e of n.issues){let t=i.get(e.file)??[];t.push(e),i.set(e.file,t)}for(let[e,t]of i){u.writeln(C("\u26A0"),l(" "+e));for(let o of t){let c=o.line!==void 0?`:${o.line}`:"";u.writeln(h("\u2139"),l(` ${o.symbol}${c}: ${J(o.issue)}`))}}return a.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All documentation is valid.")),a.ok(void 0)},B=w.createTrigger({handler:j,adaptInput:V,adaptOutput:q}),Q=async s=>await B({command:"validate-docs",args:[],flags:{}});export{F as a,j as b,B as c,Q as d};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
var r={name:"@eser/cli",version:"4.1.30",type:"module",exports:"./main.ts",bin:{eser:"./bin.ts"},dependencies:{"@eser/ai":"workspace:*","@eser/codebase":"workspace:*","@eser/kit":"workspace:*","@eser/noskills":"workspace:*","@eser/laroux-server":"workspace:*","@eser/workflows":"workspace:*","@eser/functions":"workspace:*","@eser/logging":"workspace:*","@eser/shell":"workspace:*","@eser/standards":"workspace:*","@std/cli":"npm:@jsr/std__cli@^1.0.25","@std/fmt":"npm:@jsr/std__fmt@^1.0.8"},devDependencies:{"@std/assert":"npm:@jsr/std__assert@^1.0.16",esbuild:"^0.27.3"}};export{r as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as l}from"./chunk-RGUETQSC.js";var p=new Set(["con","prn","aux","nul","com1","com2","com3","com4","com5","com6","com7","com8","com9","lpt1","lpt2","lpt3","lpt4","lpt5","lpt6","lpt7","lpt8","lpt9"]),E=/^[a-z0-9_./[\]@-]+$/,u=/^[a-z0-9./[\]@-]+$/,g=[".claude/",".github/",".git/","CLAUDE.md","AGENTS.md","CHANGELOG.md","Makefile","Dockerfile","LICENSE","README.md","VERSION"],d=(o,s)=>{for(let e of s)if(e.includes("*")){let a=e.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,"[^/]+");if(new RegExp(a).test(o))return!0}else if(o.includes(e)||o.endsWith(e))return!0;return!1},c=l({name:"validate-filenames",description:"Enforce filename conventions (kebab-case / snake_case)",canFix:!1,stacks:[],defaults:{},checkAll(o,s){let e=[],a=s.rules,f=s.exclude??g;for(let t of o){if(d(t.path,f))continue;let i=t.name,m=i.replace(/\.[^.]+$/,"");if(p.has(m.toLowerCase())){e.push({path:t.path,message:`Windows-reserved filename: ${i}`});continue}if(a!==void 0){let r=!1;for(let n of a)if(n.directory==="*"||t.path.includes(n.directory)){if(n.exclude!==void 0&&d(t.path,n.exclude)){r=!0;break}(n.convention==="snake_case"?E:u).test(i)||e.push({path:t.path,message:`filename must be ${n.convention}`}),r=!0;break}if(r)continue}u.test(i)||e.push({path:t.path,message:"filename must be kebab-case"})}return e}}),S=c.run,k=c.validator,v=c.main;export{c as a,S as b,k as c,v as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as p}from"./chunk-G6NAG2EK.js";var L={};p(L,{alert:()=>A,blue:()=>b,bold:()=>d,codeBlock:()=>x,color:()=>r,cyan:()=>m,dim:()=>i,gauge:()=>T,gray:()=>w,green:()=>h,group:()=>s,italic:()=>S,list:()=>G,magenta:()=>I,nl:()=>u,normalize:()=>a,plainLength:()=>t,red:()=>g,separator:()=>v,strikethrough:()=>y,table:()=>B,text:()=>o,underline:()=>c,white:()=>C,yellow:()=>k});var a=n=>n.map(e=>typeof e=="string"?o(e):e),o=n=>({kind:"text",value:n}),d=(...n)=>({kind:"bold",children:a(n)}),i=(...n)=>({kind:"dim",children:a(n)}),S=(...n)=>({kind:"italic",children:a(n)}),c=(...n)=>({kind:"underline",children:a(n)}),y=(...n)=>({kind:"strikethrough",children:a(n)}),s=(...n)=>({kind:"group",children:a(n)}),u=()=>({kind:"newline"}),r=(n,...e)=>({kind:"color",color:n,children:a(e)}),g=(...n)=>r("red",...n),h=(...n)=>r("green",...n),k=(...n)=>r("yellow",...n),b=(...n)=>r("blue",...n),I=(...n)=>r("magenta",...n),m=(...n)=>r("cyan",...n),w=(...n)=>r("gray",...n),C=(...n)=>r("white",...n),x=(n,e)=>({kind:"code-block",language:e,value:n}),B=(n,e)=>({kind:"table",headers:a(n),rows:e.map(l=>a(l))}),G=n=>({kind:"list",items:n.map(e=>a(e))}),T=(n,e)=>({kind:"gauge",percent:Math.max(0,Math.min(100,n)),width:e?.width,label:e?.label}),v=n=>({kind:"separator",label:n}),A=(n,...e)=>({kind:"alert",level:n,children:a(e)}),t=n=>{switch(n.kind){case"text":return n.value.length;case"newline":return 1;case"bold":case"dim":case"italic":case"underline":case"strikethrough":case"color":case"group":return n.children.reduce((e,l)=>e+t(l),0);case"code-block":return n.value.length;case"table":case"list":return 0;case"gauge":{let e=n.width??20,l=n.label?` ${n.label}`:"";return e+` ${n.percent}%`.length+l.length}case"separator":return 0;case"alert":return 2+n.children.reduce((e,l)=>e+t(l),0)}};export{a,o as b,d as c,i as d,s as e,g as f,h as g,k as h,b as i,I as j,m as k,w as l,B as m,A as n,t as o,L as p};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
1
2
|
function c(s){if(new.target)throw new TypeError("Cannot create an instance: parse is not a constructor");return new o(s).parse()}var o=class{#i=new Set(` \r
|
|
2
3
|
`);#o=new Set([..."[]{}:,/",...this.#i]);#e;#r;#n;constructor(e){this.#e=`${e}`,this.#r=this.#e.length,this.#n=this.#h()}parse(){let e=this.#t(),t=this.#s(e),{done:r,value:i}=this.#n.next();if(!r)throw new SyntaxError(n(i));return t}#t(){let{done:e,value:t}=this.#n.next();if(e)throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");return t}*#h(){for(let e=0;e<this.#r;e++)if(!this.#i.has(this.#e[e])){if(this.#e[e]==="/"&&this.#e[e+1]==="*"){e+=2;let t=!1;for(;e<this.#r;e++)if(this.#e[e]==="*"&&this.#e[e+1]==="/"){t=!0;break}if(!t)throw new SyntaxError("Cannot parse JSONC: unexpected end of JSONC input");e++;continue}if(this.#e[e]==="/"&&this.#e[e+1]==="/"){for(e+=2;e<this.#r&&!(this.#e[e]===`
|
|
3
4
|
`||this.#e[e]==="\r");e++);continue}switch(this.#e[e]){case"{":yield{type:"BeginObject",position:e};break;case"}":yield{type:"EndObject",position:e};break;case"[":yield{type:"BeginArray",position:e};break;case"]":yield{type:"EndArray",position:e};break;case":":yield{type:"NameSeparator",position:e};break;case",":yield{type:"ValueSeparator",position:e};break;case'"':{let t=e,r=!1;for(e++;e<this.#r&&!(this.#e[e]==='"'&&!r);e++)r=this.#e[e]==="\\"&&!r;yield{type:"String",sourceText:this.#e.substring(t,e+1),position:t};break}default:{let t=e;for(;e<this.#r&&!this.#o.has(this.#e[e]);e++);e--,yield{type:"NullOrTrueOrFalseOrNumber",sourceText:this.#e.substring(t,e+1),position:t}}}}}#s(e){switch(e.type){case"BeginObject":return this.#c();case"BeginArray":return this.#u();case"NullOrTrueOrFalseOrNumber":return this.#p(e);case"String":return this.#a(e);default:throw new SyntaxError(n(e))}}#c(){let e={};for(;;){let t=this.#t();if(t.type==="EndObject")return e;if(t.type!=="String")throw new SyntaxError(n(t));let r=this.#a(t),i=this.#t();if(i.type!=="NameSeparator")throw new SyntaxError(n(i));let h=this.#t();Object.defineProperty(e,r,{value:this.#s(h),writable:!0,enumerable:!0,configurable:!0});let a=this.#t();if(a.type==="EndObject")return e;if(a.type!=="ValueSeparator")throw new SyntaxError(n(a))}}#u(){let e=[];for(;;){let t=this.#t();if(t.type==="EndArray")return e;e.push(this.#s(t));let r=this.#t();if(r.type==="EndArray")return e;if(r.type!=="ValueSeparator")throw new SyntaxError(n(r))}}#a(e){let t;try{t=JSON.parse(e.sourceText)}catch{throw new SyntaxError(n(e))}if(typeof t!="string")throw new TypeError(`Parsed value is not a string: ${t}`);return t}#p(e){if(e.sourceText==="null")return null;if(e.sourceText==="true")return!0;if(e.sourceText==="false")return!1;let t;try{t=JSON.parse(e.sourceText)}catch{throw new SyntaxError(n(e))}if(typeof t!="number")throw new TypeError(`Parsed value is not a number: ${t}`);return t}};function n({type:s,sourceText:e,position:t}){let r="";switch(s){case"BeginObject":r="{";break;case"EndObject":r="}";break;case"BeginArray":r="[";break;case"EndArray":r="]";break;case"NameSeparator":r=":";break;case"ValueSeparator":r=",";break;case"NullOrTrueOrFalseOrNumber":case"String":r=30<e.length?`${e.slice(0,30)}...`:e;break}return`Cannot parse JSONC: unexpected token "${r}" in JSONC at position ${t}`}export{c as a};
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as _,b as H,c as P}from"./chunk-XU5SILYR.js";import{e as Q}from"./chunk-J2Z7NG2X.js";import{f as p,h as u,k as c}from"./chunk-GBM3TZFD.js";import{b as r,d as l,f as m,g,h as Y,k as o}from"./chunk-3SXTMY75.js";import{d as x}from"./chunk-PVPMHMKP.js";import{a as v}from"./chunk-3MM5EGFB.js";import{a as h,b as w}from"./chunk-A6RDYP6R.js";import{a as re,g as W,h as K,i as B,r as I,t as d}from"./chunk-MRCBHVSB.js";var oe="# eser CLI completions",D="eser",X=async e=>{try{return await d.fs.readTextFile(e)}catch{return""}},ie=async e=>{try{return await d.fs.stat(e),!0}catch{return!1}},Z=async e=>{let t=P(e,D);if(t.completionType==="file")return await ie(t.completionsFile);let s=await X(t.rcFile),n=H(e,D);return s.includes(n)},ee=async e=>{let t=P(e,D),s=p({renderer:c.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,a=d.path.dirname(n);try{await d.fs.mkdir(a,{recursive:!0})}catch{}await d.fs.writeTextFile(n,`# eser CLI completions
|
|
3
|
+
# This file is auto-generated. Run 'eser system completions --shell fish' to regenerate.
|
|
4
|
+
complete -c eser -f
|
|
5
|
+
complete -c eser -n "__fish_use_subcommand" -a "codebase" -d "Codebase management tools"
|
|
6
|
+
complete -c eser -n "__fish_use_subcommand" -a "system" -d "Commands related with this CLI"
|
|
7
|
+
complete -c eser -n "__fish_use_subcommand" -a "install" -d "Install eser CLI globally"
|
|
8
|
+
complete -c eser -n "__fish_use_subcommand" -a "update" -d "Update eser CLI to latest version"
|
|
9
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "install" -d "Install eser CLI globally"
|
|
10
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "uninstall" -d "Uninstall eser CLI globally"
|
|
11
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "update" -d "Update eser CLI to latest version"
|
|
12
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "completions" -d "Generate shell completion scripts"
|
|
13
|
+
`),s.writeln(r(" "),l("Created"),r(" "),o(n))}else{let n=await X(t.rcFile),a=H(e,D);if(!n.includes(a)){let f=`
|
|
14
|
+
${oe}
|
|
15
|
+
${a}
|
|
16
|
+
`;await d.fs.writeTextFile(t.rcFile,n+f),s.writeln(r(" "),l("Added completions to"),r(" "),o(t.rcFile))}}}catch(n){s.writeln(Y(` Warning: Could not add shell completions: ${n instanceof Error?n.message:String(n)}`))}await s.close()},le=async e=>{let t=P(e,D),s=p({renderer:c.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile;await ie(n)&&(await d.fs.remove(n),s.writeln(r(" "),l("Removed"),r(" "),o(n)))}else{let n=await X(t.rcFile);if(n===""){await s.close();return}let a=H(e,D);if(!n.includes(a)){await s.close();return}let f=n.split(`
|
|
17
|
+
`).filter(i=>!i.includes("eser system completions")).filter(i=>i!==oe).join(`
|
|
18
|
+
`).replace(/\n{3,}/g,`
|
|
19
|
+
|
|
20
|
+
`);await d.fs.writeTextFile(t.rcFile,f),s.writeln(r(" "),l("Removed completions from"),r(" "),o(t.rcFile))}}catch(n){s.writeln(Y(` Warning: Could not remove shell completions: ${n instanceof Error?n.message:String(n)}`))}await s.close()};var L=d,we={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},ce={deno:{cmd:"deno",args:["install","-r","-g","-A","--name","eser","jsr:@eser/cli"]},node:{cmd:"npm",args:["install","-g","-f","eser"]},bun:{cmd:"bun",args:["install","-g","-f","eser"]}},ge=async()=>{let e=B(),t=L.path.join(e,".local","bin");try{return await L.fs.stat(t),t}catch{}return"/usr/local/bin"},xe=async()=>{let e=L.process.execPath(),t=await ge(),s=L.path.join(t,"eser"),n=p({renderer:c.ansi(),sink:u.stdout()});n.writeln(r("Install method: "),o("compiled binary")),n.writeln(l(`Copying to ${s}...`));try{await L.fs.copyFile(e,s),await L.fs.chmod(s,493)}catch(i){if(i instanceof Deno.errors.PermissionDenied)return n.writeln(m(`
|
|
21
|
+
Permission denied writing to ${t}.
|
|
22
|
+
Try: sudo eser install`)),await n.close(),w({exitCode:1});throw await n.close(),i}n.writeln(g(`
|
|
23
|
+
Installation complete!`)),n.writeln(r("You can now use "),o("eser"),r(" from anywhere in your terminal."));let a=_();if(!await Z(a)){n.writeln(r(`
|
|
24
|
+
Setting up `),o(a),r(" completions...")),await ee(a);let i=P(a);i.completionType==="eval"&&n.writeln(l(` Restart your shell or run 'source ${i.rcFile}' to enable completions.`))}return await n.close(),h(void 0)},ye=async e=>{let t=await I(we);if(t.invoker==="binary")return await xe();let s=p({renderer:c.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),o(t.runtime));let n=ce[t.runtime]??ce.node,{cmd:a,args:f}=n;s.writeln(l(`Running: ${a} ${f.join(" ")}`)),s.writeln();let i=await x`${a} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();if(!i.success)return s.writeln(m(`
|
|
25
|
+
Installation failed.`)),await s.close(),w({exitCode:i.code});s.writeln(g(`
|
|
26
|
+
Installation complete!`)),s.writeln(r("You can now use "),o("eser"),r(" from anywhere in your terminal."));let C=_();if(!await Z(C)){s.writeln(r(`
|
|
27
|
+
Setting up `),o(C),r(" completions...")),await ee(C);let G=P(C);G.completionType==="eval"&&s.writeln(l(` Restart your shell or run 'source ${G.rcFile}' to enable completions.`))}return await s.close(),h(void 0)};var Ce={deno:{cmd:"deno",args:["uninstall","-g","eser"]},node:{cmd:"npm",args:["uninstall","-g","eser"]},bun:{cmd:"bun",args:["remove","-g","eser"]}},ve=async e=>{let t=re(),s=p({renderer:c.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),o(t));let n=Ce[t];if(n===void 0){let A=c.ansi();return await s.close(),w({message:`${A.render([m(`
|
|
28
|
+
Unsupported runtime: ${t}`)])}
|
|
29
|
+
Global uninstallation is only supported for Deno, Node.js, and Bun.`,exitCode:1})}let{cmd:a,args:f}=n,i=_();s.writeln(r(`
|
|
30
|
+
Removing `),o(i),r(" completions...")),await le(i),s.writeln(l(`
|
|
31
|
+
Running: ${a} ${f.join(" ")}`)),s.writeln();let C=await x`${a} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();return C.success?(s.writeln(g(`
|
|
32
|
+
Uninstallation complete!`)),s.writeln(r("The "),o("eser"),r(" command has been removed from your system.")),await s.close(),h(void 0)):(s.writeln(m(`
|
|
33
|
+
Uninstallation failed.`)),await s.close(),w({exitCode:C.code}))};var V=d,de=".cache/eser",ke="latest-version.json",Ee=24*60*60*1e3,Pe="https://api.github.com/repos/eser/stack/releases/latest",me=()=>{let e=B();return V.path.join(e,de,ke)},$e=()=>{let e=B();return V.path.join(e,de)},_e=async()=>{try{let e=me();if(!await V.fs.exists(e))return;let s=await V.fs.readTextFile(e),n=JSON.parse(s);return typeof n.latestVersion!="string"||typeof n.checkedAt!="number"?void 0:n}catch{return}},Re=async e=>{try{let t=$e();await V.fs.ensureDir(t);let s=me(),n={latestVersion:e,checkedAt:Date.now()};await V.fs.writeTextFile(s,JSON.stringify(n))}catch{}},Ae=async()=>{try{let e=await fetch(Pe,{headers:{Accept:"application/vnd.github.v3+json"}});if(!e.ok)return;let s=(await e.json()).tag_name;return typeof s!="string"?void 0:s.startsWith("v")?s.slice(1):s}catch{return}},O=async()=>{try{let e=v.version,t=await _e();if(t!==void 0&&Date.now()-t.checkedAt<Ee)return{latestVersion:t.latestVersion,currentVersion:e,updateAvailable:Q(e,t.latestVersion)};let s=await Ae();return s===void 0?void 0:(await Re(s),{latestVersion:s,currentVersion:e,updateAvailable:Q(e,s)})}catch{return}};var y=d,be={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},pe={deno:{cmd:"deno",args:["install","-r","-g","-A","-f","--name","eser","jsr:@eser/cli"]},node:{cmd:"npm",args:["update","-g","-f","eser"]},bun:{cmd:"bun",args:["update","-g","-f","eser"]}},Te={"linux-amd64":"x86_64-unknown-linux-gnu","linux-arm64":"aarch64-unknown-linux-gnu","darwin-amd64":"x86_64-apple-darwin","darwin-arm64":"aarch64-apple-darwin","windows-amd64":"x86_64-pc-windows-msvc"},Se=()=>{let e=W(),t=K(),s=`${e}-${t}`;return Te[s]},Fe=async()=>{let e=p({renderer:c.ansi(),sink:u.stdout()});e.writeln(r("Install method: "),o("compiled binary")),e.writeln(r("Current version: "),o(v.version),r(`
|
|
34
|
+
`)),e.writeln(r("Checking for updates..."));let t=await O();if(t===void 0)return e.writeln(m("Could not check for updates.")),await e.close(),w({exitCode:1});if(!t.updateAvailable)return e.writeln(g(`
|
|
35
|
+
Already up to date (v${v.version}).`)),await e.close(),h(void 0);e.writeln(r(`
|
|
36
|
+
New version available: `),o(`v${t.latestVersion}`));let s=Se();if(s===void 0){let E=W(),S=K();return e.writeln(m(`
|
|
37
|
+
Unsupported platform: ${E}-${S}`)),await e.close(),w({exitCode:1})}let n=`v${t.latestVersion}`,a=W()==="windows",i=`eser-${n}-${s}.${a?"zip":"tar.gz"}`,C=`https://github.com/eser/stack/releases/download/${n}`;e.writeln(l(`Downloading ${i}...`));let A=await fetch(`${C}/${i}`);if(!A.ok)return e.writeln(m(`
|
|
38
|
+
Failed to download: HTTP ${A.status}`)),await e.close(),w({exitCode:1});let G=await fetch(`${C}/SHA256SUMS.txt`);if(G.ok){let S=(await G.text()).split(`
|
|
39
|
+
`).find(F=>F.includes(i));if(S!==void 0){let F=S.split(/\s+/)[0],U=new Uint8Array(await A.clone().arrayBuffer()),$=await crypto.subtle.digest("SHA-256",U);if(Array.from(new Uint8Array($)).map(he=>he.toString(16).padStart(2,"0")).join("")!==F)return e.writeln(m(`
|
|
40
|
+
SHA256 checksum verification failed.`)),await e.close(),w({exitCode:1});e.writeln(l("Checksum verified."))}}let T=await y.fs.makeTempDir({prefix:"eser-update-"});try{let E=y.path.join(T,i),S=new Uint8Array(await A.arrayBuffer());await y.fs.writeFile(E,S),a?await x`powershell -Command "Expand-Archive -Path ${E} -DestinationPath ${T}"`.spawn():await x`tar -xzf ${E} -C ${T}`.spawn();let F=a?y.path.join(T,"eser.exe"):y.path.join(T,"eser"),U=y.process.execPath();if(a){let $=U.replace(/\.exe$/i,".new.exe");await y.fs.copyFile(F,$),e.writeln(g(`
|
|
41
|
+
Downloaded v${t.latestVersion}!`)),e.writeln(r(`
|
|
42
|
+
To complete the update, close this terminal and rename:
|
|
43
|
+
`),o($),r(`
|
|
44
|
+
to:
|
|
45
|
+
`),o(U))}else{let $=`${U}.new`;await y.fs.copyFile(F,$),await y.fs.chmod($,493),await y.fs.rename($,U),e.writeln(g(`
|
|
46
|
+
Updated to v${t.latestVersion}!`))}}catch(E){if(E instanceof Deno.errors.PermissionDenied)return e.writeln(m(`
|
|
47
|
+
Permission denied. Try running with sudo:
|
|
48
|
+
sudo eser update`)),await e.close(),w({exitCode:1});throw await e.close(),E}finally{try{await y.fs.remove(T,{recursive:!0})}catch{}}return await e.close(),h(void 0)},Ue=async e=>{let t=await I(be);if(t.invoker==="binary")return await Fe();let s=p({renderer:c.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),o(t.runtime));let n=pe[t.runtime]??pe.node,{cmd:a,args:f}=n;s.writeln(l(`Running: ${a} ${f.join(" ")}`)),s.writeln();let i=await x`${a} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();return i.success?(s.writeln(g(`
|
|
49
|
+
Update complete!`)),s.writeln(r("The "),o("eser"),r(" command has been updated to the latest version.")),await s.close(),h(void 0)):(s.writeln(m(`
|
|
50
|
+
Update failed.`)),await s.close(),w({exitCode:i.code}))};var Ie=e=>{let t=P(e,"eser"),s=c.ansi();if(t.completionType==="file")return`
|
|
51
|
+
To install, run:
|
|
52
|
+
|
|
53
|
+
${s.render([l(`eser system completions --shell fish > ${t.completionsFile}`)])}
|
|
54
|
+
`;let n=H(e,"eser");return`
|
|
55
|
+
To install, add the following to your ${s.render([o(t.rcFile)])}:
|
|
56
|
+
|
|
57
|
+
${s.render([l(n)])}
|
|
58
|
+
`},He=e=>{let t=e.flags.shell,s=c.ansi(),n=p({renderer:s,sink:u.stdout()}),a;if(t!==void 0){if(!["bash","zsh","fish"].includes(t))return w({message:`${s.render([m(`Invalid shell: ${t}`)])}
|
|
59
|
+
Supported shells: bash, zsh, fish`,exitCode:1});a=t}else a=_();let i=e.root.completions(a);return t===void 0&&(n.writeln(r("Generating "),o(a),r(" completions...")),console.log(Ie(a)),n.writeln(l(`--- Completion script ---
|
|
60
|
+
`))),console.log(i),h(void 0)};var De=200,je=async e=>{let t=p({renderer:c.ansi(),sink:u.stdout()});if(e.flags.bare===!0)return t.writeln(r(v.version)),await t.close(),h(void 0);t.writeln(r(`eser ${v.version}`));try{let s=new Promise(a=>{setTimeout(()=>a(void 0),De)}),n=await Promise.race([O(),s]);n!==void 0&&n.updateAvailable&&t.writeln(l(` Update available: v${n.latestVersion} \u2014 run 'eser update'`))}catch{}return await t.close(),h(void 0)};var z=d,Ne={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},J=17,R=p({renderer:c.ansi(),sink:u.stdout()}),b=(e,t)=>{let s=`${e}:`.padEnd(J);R.writeln(r(` ${s}`),g("\u2713"),r(` ${t}`))},k=(e,t)=>{let s=`${e}:`.padEnd(J);R.writeln(r(` ${s}`),m("\u2717"),r(` ${t}`))},ue=(e,t)=>{let s=`${e}:`.padEnd(J);R.writeln(r(` ${s}${t}`))},Le=(e,t)=>{let s=`${e}:`.padEnd(J);R.writeln(r(` ${s}`),l("-"),r(` ${t}`))},ne=async e=>{try{return await z.fs.stat(e),!0}catch{return!1}},Ve=async e=>{try{return await z.fs.readTextFile(e)}catch{return""}},fe=(e,t)=>e.match(t)?.[1],Oe=async()=>{let e=z.path.join(".",".git","hooks","pre-commit");if(!await ne(e)){k("Git hooks","Not installed");return}(await Ve(e)).includes("eser")?b("Git hooks","Installed"):k("Git hooks","Not installed")},Ge=async()=>{let e=z.path.join(".",".eser","manifest.yml"),t=z.path.join(".",".manifest.yml");if(await ne(e)){b("Manifest",".eser/manifest.yml found");return}if(await ne(t)){b("Manifest",".manifest.yml found (legacy path)");return}k("Manifest",".eser/manifest.yml not found")},Be=async()=>{try{let e=await x`deno --version`.noThrow().quiet().text(),t=fe(e,/deno\s+(\S+)/);t!==void 0?b("Deno",t):k("Deno","Not found")}catch{k("Deno","Not found")}},Me=async()=>{try{let e=await x`go version`.noThrow().quiet().text(),t=fe(e,/go(\d+\.\d+(?:\.\d+)?)/);t!==void 0?b("Go",t):k("Go","Not found")}catch{k("Go","Not found")}},ze=async()=>{try{let t=(await x`node --version`.noThrow().quiet().text()).trim();t.length>0?b("Node",t):k("Node","Not found")}catch{k("Node","Not found")}},We=async e=>{R.writeln(r(`eser doctor
|
|
61
|
+
`));let t=await I(Ne);ue("Install method",`${t.invoker} (${t.mode})`),ue("Version",v.version);let s=await O();return s===void 0?Le("Update","Could not check for updates"):s.updateAvailable?k("Update",`Update available: v${s.latestVersion}`):b("Update","Up to date"),R.writeln(),await Oe(),await Ge(),R.writeln(),await Be(),await Me(),await ze(),await R.close(),h(void 0)};export{ye as a,ve as b,Ue as c,He as d,je as e,We as f};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as i}from"./chunk-J7YTWK67.js";import{b as d,d as c}from"./chunk-PVPMHMKP.js";var y=async(r,t)=>{let e=t.properties?.binPath;if(e!==void 0)return e;try{let n=await c`which ${r}`.noThrow().text();if(n.length>0)return n}catch{}throw new i(`Binary "${r}" not found. Set properties.binPath in config or ensure it is on PATH.`,{provider:r})},f=(r,t,e)=>{let s=new d(r,[...t],{stdin:"null",stdout:"piped",stderr:"piped",cwd:e?.cwd,env:e?.env}).child();if(e?.signal!==void 0){let o=e.signal;o.aborted?s.kill("SIGTERM"):o.addEventListener("abort",()=>{s.kill("SIGTERM")},{once:!0})}return{stdout:s.stdout,stderr:s.stderr,waitForExit:async()=>{let o=await s.status;return{code:o.code,success:o.success}},kill:o=>{s.kill(o??"SIGTERM")}}},a=new TextDecoder;async function*m(r){let t=r.getReader(),e="";try{let n=await t.read();for(;n.done!==!0;){e+=a.decode(n.value,{stream:!0});let o=e.split(`
|
|
2
3
|
`);e=o.pop()??"";for(let u of o){let l=u.trim();if(l.length!==0)try{yield JSON.parse(l)}catch{}}n=await t.read()}let s=e.trim();if(s.length>0)try{yield JSON.parse(s)}catch{}}finally{t.releaseLock()}}var h=async(r,t)=>{let e=r.getReader(),n=[],s=await e.read();for(;s.done!==!0;)n.push(a.decode(s.value,{stream:!0})),s=await e.read();return e.releaseLock(),{content:[{kind:"text",text:n.join("").trim()}],stopReason:"end_turn",usage:{inputTokens:0,outputTokens:0,totalTokens:0},modelId:t}},w=async r=>{let t=r.getReader(),e=[],n=await t.read();for(;n.done!==!0;)e.push(a.decode(n.value,{stream:!0})),n=await t.read();return t.releaseLock(),e.join("").trim()},x=(r,t,e)=>{if(t===0)return null;let n=e.length>0?`${r} exited with code ${t}: ${e}`:`${r} exited with code ${t}`;return t===1?new i(n,{provider:r}):t===126||t===127?new i(`${r} binary not found or not executable (exit code ${t})`,{provider:r}):new i(n,{provider:r})},b=(r,t)=>{let e=[];t!==void 0&&(e.push(t),e.push(""));for(let n of r)for(let s of n.content)s.kind==="text"&&e.push(s.text);return e.join(`
|
|
3
4
|
`)};export{y as a,f as b,m as c,h as d,w as e,x as f,b as g};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as r}from"./chunk-PVPMHMKP.js";import{t as i}from"./chunk-MRCBHVSB.js";var t=async e=>{try{return await r`which ${e}`.noThrow().code()===0}catch{return!1}},s=async()=>{try{return(await fetch("http://localhost:11434/api/version",{signal:AbortSignal.timeout(1e3)})).ok}catch{return!1}},a=e=>i.env.has(e),d=async()=>{let[e,o,l,n]=await Promise.all([t("claude"),s(),t("opencode"),t("kiro")]);return[{name:"claude-code",alias:"cc",type:"CLI",available:e,detail:e?"claude binary found":"claude not on PATH"},{name:"ollama",alias:"ol",type:"HTTP",available:o,detail:o?"localhost:11434 reachable":"localhost:11434 not reachable"},{name:"opencode",alias:"oc",type:"CLI",available:l,detail:l?"opencode binary found":"opencode not on PATH"},{name:"kiro",alias:"kr",type:"CLI",available:n,detail:n?"kiro binary found":"kiro not on PATH"},{name:"anthropic",alias:"ant",type:"API",available:a("ANTHROPIC_API_KEY"),detail:a("ANTHROPIC_API_KEY")?"ANTHROPIC_API_KEY set":"ANTHROPIC_API_KEY not set"},{name:"openai",alias:"oai",type:"API",available:a("OPENAI_API_KEY"),detail:a("OPENAI_API_KEY")?"OPENAI_API_KEY set":"OPENAI_API_KEY not set"},{name:"gemini",alias:"gem",type:"API",available:a("GEMINI_API_KEY")||a("GOOGLE_API_KEY"),detail:a("GEMINI_API_KEY")||a("GOOGLE_API_KEY")?"API key set":"GEMINI_API_KEY not set"},{name:"vertexai",alias:"vtx",type:"API",available:a("GOOGLE_CLOUD_PROJECT"),detail:a("GOOGLE_CLOUD_PROJECT")?"GOOGLE_CLOUD_PROJECT set":"GOOGLE_CLOUD_PROJECT not set"}]};export{d as a};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{f as e,h as t,k as r}from"./chunk-GBM3TZFD.js";var g=()=>e({renderer:r.ansi(),sink:t.stdout()}),c=(i,s)=>({command:i,args:s._??[],flags:Object.fromEntries(Object.entries(s).filter(([o])=>o!=="_"))});export{g as a,c as b};
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as D}from"./chunk-GTHXGAMQ.js";import{a as j}from"./chunk-3XJLLDR5.js";import{a as O}from"./chunk-P7WCO724.js";import{a as N}from"./chunk-JYNHFD6B.js";import{t as l}from"./chunk-MRCBHVSB.js";import{e as _}from"./chunk-G6NAG2EK.js";var y={DenoJson:"deno.json",DenoJsonc:"deno.jsonc",JsrJson:"jsr.json",JsrJsonc:"jsr.jsonc",PackageJson:"package.json"},k=[y.DenoJson,y.DenoJsonc,y.JsrJson,y.JsrJsonc,y.PackageJson],T=Symbol.for("baseDir"),F={name:{"deno.json":"name","deno.jsonc":"name","jsr.json":"name","jsr.jsonc":"name","package.json":"name"},version:{"deno.json":"version","deno.jsonc":"version","jsr.json":"version","jsr.jsonc":"version","package.json":"version"},description:{"package.json":"description"},license:{"deno.json":"license","deno.jsonc":"license","package.json":"license"},private:{"package.json":"private"},exports:{"deno.json":"exports","deno.jsonc":"exports","jsr.json":"exports","jsr.jsonc":"exports","package.json":"exports"},workspaces:{"deno.json":"workspace","deno.jsonc":"workspace","package.json":"workspaces"},imports:{"deno.json":"imports","deno.jsonc":"imports"},dependencies:{"package.json":"dependencies"},devDependencies:{"package.json":"devDependencies"}};var M=_(N(),1);var d={Unknown:0,EnvironmentFile:1,Json:2,JsonWithComments:3,Toml:4,Yaml:5};var S={[d.Unknown]:"unknown",[d.EnvironmentFile]:"environment",[d.Json]:"JSON",[d.JsonWithComments]:"JSONC",[d.Toml]:"TOML",[d.Yaml]:"YAML"},h=class extends Error{filepath;format;constructor(n,t,r){super(`Failed to parse ${S[t]??"unknown"} file "${n}": ${r.message}`,{cause:r}),this.name="ConfigParseError",this.filepath=n,this.format=t}};var A=e=>{let n=l.path.extname(e);return n===".json"?d.Json:n===".jsonc"?d.JsonWithComments:n===".yaml"||n===".yml"?d.Yaml:n===".toml"?d.Toml:n===".env"?d.EnvironmentFile:d.Unknown},x=async(e,n)=>{let t=n??A(e),r=await l.fs.readTextFile(e);try{return t===d.Json?{content:JSON.parse(r),filepath:e,format:t}:t===d.JsonWithComments?{content:j(r),filepath:e,format:t}:t===d.Yaml?{content:M.parse(r),filepath:e,format:t}:t===d.Toml?{content:O(r),filepath:e,format:t}:{content:void 0,filepath:e,format:d.Unknown}}catch(i){throw i instanceof Error?new h(e,t,i):new h(e,t,new Error(String(i)))}};var L=(e,n,t)=>{if(e==null)return t;let r=n.length;if(r===0)return e;let i=e;for(let o=0;o<r;o++){if(i==null)return t;let a=n[o];i=i[a]}return i===void 0?t:i};var m=class extends Error{filepath;constructor(n,t,r){super(n,{cause:r}),this.name="PackageLoadError",this.filepath=t}},$=async(e,n)=>{if(await l.fs.exists(e)===!1||(await l.fs.stat(e)).isFile===!1)return;let i=await l.fs.readTextFile(e),a=(await x(e)).content;if(a!==void 0)return{filepath:e,fileType:n,content:a,rawText:i}},Y=async(e,n)=>{let t=[];for(let r of n){let i=l.path.join(e,r),o=await $(i,r);o&&t.push(o)}return t},B=(e,n)=>L(e,n.split(".")),u=(e,n,t)=>{let r,i,o=[];for(let a of n){let p=t[e]?.[a.fileType];if(p===void 0)continue;let s=B(a.content,p);if(s===void 0)continue;let c={filepath:a.filepath,fileType:a.fileType,propertyPath:p};r===void 0?(r=s,i=c):o.push(c)}if(!(r===void 0||i===void 0))return{value:r,origin:i,alternateOrigins:o}},G=e=>e===void 0?F:D(F,e),K=e=>[...e].sort((n,t)=>k.indexOf(n)-k.indexOf(t)),P=async(e={})=>{let{baseDir:n=".",includeFiles:t=k,fieldMappings:r,searchParents:i=!1}=e,o=G(r),a=K(t),p=l.path.resolve(n),s=[];for(;s=await Y(p,a),!(s.length>0||!i);){let g=l.path.dirname(p);if(g===p)break;p=g}if(s.length===0)throw new m(`No config files found in ${n}. Looked for: ${a.join(", ")}`);return{name:u("name",s,o),version:u("version",s,o),description:u("description",s,o),license:u("license",s,o),private:u("private",s,o),exports:u("exports",s,o),workspaces:u("workspaces",s,o),imports:u("imports",s,o),dependencies:u("dependencies",s,o),devDependencies:u("devDependencies",s,o),[T]:p,_loadedFiles:s}},v=async(e={})=>{try{return await P(e)}catch(n){if(n instanceof m)return;throw n}},R=(e,n)=>{let t=e[n];if(!t)return[];let r=new Set([t.origin.filepath,...t.alternateOrigins.map(i=>i.filepath)]);return e._loadedFiles.filter(i=>r.has(i.filepath))},E=e=>e[T];var V=(e,n)=>{let t=n.split("."),r=e;for(let i of t){if(r==null||typeof r!="object")return;r=r[i]}return r},J=e=>e!=="__proto__"&&e!=="constructor"&&e!=="prototype",q=(e,n,t)=>{let r=n.split("."),i=e;for(let a=0;a<r.length-1;a++){let p=r[a];p===void 0||!J(p)||((!(p in i)||typeof i[p]!="object"||i[p]===null)&&(i[p]={}),i=i[p])}let o=r[r.length-1];o!==void 0&&J(o)&&(i[o]=t)},H=e=>`${JSON.stringify(e,null,2)}
|
|
3
|
+
`,z=async(e,n)=>{let t=JSON.parse(JSON.stringify(e.content));for(let[i,o]of Object.entries(n))q(t,i,o);let r=H(t);await l.fs.writeTextFile(e.filepath,r),e.content=t,e.rawText=r},Q=(e,n,t)=>{let{targetFiles:r="all",createIfMissing:i=!1}=t,o=e[n];if(r==="origin"){if(o===void 0){let s=e._loadedFiles[0];return i&&s!==void 0?[s]:[]}let p=e._loadedFiles.find(s=>s.filepath===o.origin.filepath);return p?[p]:[]}if(r==="all")return!o&&!i?[]:!o&&i?[...e._loadedFiles]:R(e,n);let a=new Set(r);return e._loadedFiles.filter(p=>a.has(p.fileType))},b=async(e,n,t,r={})=>{let i=[],o=[],a=[],p=Q(e,n,r);if(p.length===0)return{updated:i,failed:o,skipped:a};for(let s of p){let c=F[n]?.[s.fileType];if(!c){a.push(s.filepath);continue}if(V(s.content,c)===t){a.push(s.filepath);continue}try{await z(s,{[c]:t}),i.push(s.filepath)}catch(f){o.push({filepath:s.filepath,reason:f instanceof Error?f.message:String(f)})}}if(i.length>0){let s=e[n];if(s)s.value=t;else{let c=e._loadedFiles.find(g=>i.includes(g.filepath));if(c){let g=F[n]?.[c.fileType];g&&(e[n]={value:t,origin:{filepath:c.filepath,fileType:c.fileType,propertyPath:g},alternateOrigins:[]})}}}return{updated:i,failed:o,skipped:a}};var X=async(e,n,t)=>await b(e,"version",n,{...t,targetFiles:"all"});var w=class extends Error{constructor(n){super(n),this.name="WorkspaceError"}},U=async e=>{try{return await P({baseDir:e})}catch(n){throw n instanceof m?new w(`No package config file found in ${l.path.resolve(e)}`):n}},Z=async(e,n)=>{let t=[];for(let r of n)if(r.endsWith("/*")){let i=l.path.join(e,r.slice(0,-2));try{for await(let o of l.fs.readDir(i))o.isDirectory&&t.push(l.path.join(i,o.name))}catch{}}else if(r.includes("*")||r.includes("?")){let i=r.split("/"),o=[],a=0;for(let f=0;f<i.length;f++){if(i[f].includes("*")||i[f].includes("?")){a=f;break}o.push(i[f])}let p=l.path.join(e,...o),c=i.slice(a).join("/").replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*\*/g,".*").replace(/\*/g,"[^/]*").replace(/\?/g,"[^/]"),g=new RegExp(`^${c}$`);try{for await(let f of l.fs.walk(p,{includeDirs:!0,includeFiles:!1})){let C=l.path.relative(p,f.path);C!==""&&g.test(C)&&t.push(f.path)}}catch{}}else t.push(l.path.join(e,r));return t},ee=async e=>{let n=await U(e),t=n.workspaces?.value;if(!Array.isArray(t))throw new w("Package config doesn't have workspace field.");for(let o of t)if(typeof o!="string")throw new w("Package config workspace field should be an array of strings.");let r=await Z(e,t),i=[];for(let o of r){let a=await v({baseDir:o});if(a===void 0)continue;let p=a.name?.value,s=a.version?.value,c=a.private?.value;p!==void 0&&c!==!0&&i.push({name:p,version:s??"0.0.0",config:a})}return[n,i]};export{y as a,P as b,v as c,E as d,X as e,ee as f};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as k,b as p,c as h,e as m,f as u,g as f}from"./chunk-455V3AE5.js";import{a as c}from"./chunk-J7YTWK67.js";var y=class{capabilities=["text_generation","streaming","tool_calling"];provider="claude-code";modelId;binary;config;constructor(e,n){this.binary=e,this.config=n,this.modelId=n.model}async generateText(e,n){let r=w(this.config,e,"json"),s=f(e.messages,e.system);r.push("-p",s);let o=p(this.binary,r,{signal:n}),l=m(o.stderr),i=o.stdout.getReader(),a=[],d=new TextDecoder,g=await i.read();for(;g.done!==!0;)a.push(d.decode(g.value,{stream:!0})),g=await i.read();i.releaseLock();let T=await o.waitForExit(),_=await l,x=u("claude-code",T.code,_);if(x!==null)throw x;let S=a.join("");return v(S,this.modelId)}async*streamText(e,n){let r=this.config.properties?.streamFormat??"text",s=w(this.config,e,r),o=f(e.messages,e.system);s.push("-p",o);let l=p(this.binary,s,{signal:n}),i=m(l.stderr);try{r==="stream-json"?yield*this.#t(l,i):yield*this.#e(l,i)}catch(a){a instanceof c?yield{kind:"error",error:a}:yield{kind:"error",error:new c(a instanceof Error?a.message:String(a),{provider:"claude-code",cause:a instanceof Error?a:void 0})}}}async*#e(e,n){let r=new TextDecoder,s=e.stdout.getReader(),o=await s.read();for(;o.done!==!0;){let d=r.decode(o.value,{stream:!0});d.length>0&&(yield{kind:"content_delta",textDelta:d}),o=await s.read()}s.releaseLock();let l=await e.waitForExit(),i=await n,a=u("claude-code",l.code,i);a!==null?yield{kind:"error",error:a}:yield{kind:"message_done",stopReason:"end_turn",usage:{inputTokens:0,outputTokens:0,totalTokens:0}}}async*#t(e,n){for await(let l of h(e.stdout)){let i=E(l);i!==null&&(yield i)}let r=await e.waitForExit(),s=await n,o=u("claude-code",r.code,s);o!==null&&(yield{kind:"error",error:o})}close(){return Promise.resolve()}getRawClient(){return null}},P={provider:"claude-code",async createModel(t){let e=await k("claude",t);return new y(e,t)}},w=(t,e,n)=>{let r=[];n!=="text"&&r.push("--output-format",n),n==="stream-json"&&r.push("--verbose"),r.push("--model",t.model);let s=t.properties?.maxTurns;s!==void 0&&r.push("--max-turns",String(s));let o=t.properties?.allowedTools;if(o!==void 0)for(let i of o)r.push("--allowedTools",i);let l=t.properties?.args;return l!==void 0&&r.push(...l),r},v=(t,e)=>{try{let n=JSON.parse(t);return b(n,e)}catch{return{content:[{kind:"text",text:t.trim()}],stopReason:"end_turn",usage:{inputTokens:0,outputTokens:0,totalTokens:0},modelId:e}}},b=(t,e)=>{let n=[];if(t.result!==void 0)n.push({kind:"text",text:String(t.result)});else if(t.message?.content!==void 0)for(let r of t.message.content)r.type==="text"?n.push({kind:"text",text:r.text}):r.type==="tool_use"&&n.push({kind:"tool_call",toolCall:{id:r.id??r.name,name:r.name,arguments:r.input??{}}});else typeof t=="string"&&n.push({kind:"text",text:t});return n.length===0&&n.push({kind:"text",text:JSON.stringify(t)}),{content:n,stopReason:t.stop_reason==="tool_use"?"tool_use":"end_turn",usage:{inputTokens:t.usage?.input_tokens??0,outputTokens:t.usage?.output_tokens??0,totalTokens:(t.usage?.input_tokens??0)+(t.usage?.output_tokens??0)},modelId:e,rawResponse:t}},E=t=>{if(t===null||typeof t!="object")return null;let e=t;if(e.type==="assistant"){if(e.message?.content!==void 0){for(let n of e.message.content)if(n.type==="text")return{kind:"content_delta",textDelta:n.text}}return null}return e.type==="content_block_delta"?e.delta?.type==="text_delta"?{kind:"content_delta",textDelta:e.delta.text}:null:e.type==="result"?{kind:"message_done",stopReason:e.subtype==="tool_use"?"tool_use":"end_turn",usage:{inputTokens:e.usage?.input_tokens??0,outputTokens:e.usage?.output_tokens??0,totalTokens:(e.usage?.input_tokens??0)+(e.usage?.output_tokens??0)}}:e.type==="error"?{kind:"error",error:new c(e.error?.message??"Unknown Claude Code error",{provider:"claude-code"})}:e.content!==void 0&&typeof e.content=="string"?{kind:"content_delta",textDelta:e.content}:null};export{y as a,P as b};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{c as y,d as h,e as k,f as T}from"./chunk-TDQRRGDJ.js";import{a as m,e as p}from"./chunk-J7YTWK67.js";var c=class{capabilities=["text_generation","streaming","tool_calling","vision","audio","structured_output","reasoning"];provider="vertexai";modelId;client;config;constructor(e,t){this.client=e,this.config=t,this.modelId=t.model}async generateText(e,t){let r=x(this.config,e);try{let o=await this.client.models.generateContent({model:this.config.model,...r,config:{...r.config,httpOptions:t!==void 0?{signal:t}:void 0}});return k(o,this.modelId)}catch(o){throw v(o)}}async*streamText(e,t){let r=x(this.config,e);try{let o=await this.client.models.generateContentStream({model:this.config.model,...r,config:{...r.config,httpOptions:t!==void 0?{signal:t}:void 0}}),a=0,s=0;for await(let l of o){let g=l?.candidates??[];if(g.length>0){let f=g[0],C=f?.content?.parts??[];for(let i of C)i.text!==void 0&&(yield{kind:"content_delta",textDelta:i.text}),i.functionCall!==void 0&&(yield{kind:"tool_call_delta",toolCall:{id:i.functionCall.name,name:i.functionCall.name,arguments:i.functionCall.args??{}}});let d=f?.finishReason;if(d!=null){let i=l?.usageMetadata;a=i?.promptTokenCount??a,s=i?.candidatesTokenCount??s;let u="end_turn";d==="MAX_TOKENS"&&(u="max_tokens"),yield{kind:"message_done",stopReason:u,usage:{inputTokens:a,outputTokens:s,totalTokens:a+s}}}}}}catch(o){yield{kind:"error",error:v(o)}}}async close(){}getRawClient(){return this.client}},w={provider:"vertexai",async createModel(n){let{GoogleGenAI:e}=await import("./node-KCQF6QQA.js"),t={vertexai:!0,project:n.projectId,location:n.location??"us-central1"};n.apiKey!==void 0&&(t.apiKey=n.apiKey);let r=new e(t);return new c(r,n)}},x=(n,e)=>{let{contents:t,systemInstruction:r}=y(e.messages),o={maxOutputTokens:e.maxTokens??n.maxTokens};e.temperature!==void 0&&(o.temperature=e.temperature),e.topP!==void 0&&(o.topP=e.topP),e.stopWords!==void 0&&(o.stopSequences=e.stopWords),e.responseFormat!==void 0&&e.responseFormat.type==="json_schema"&&(o.responseMimeType="application/json",o.responseSchema=e.responseFormat.jsonSchema),e.thinkingBudget!==void 0&&(o.thinkingConfig={thinkingBudget:e.thinkingBudget});let a={contents:t,config:o},s=e.system??r;return s!=null&&(a.systemInstruction=s),e.tools!==void 0&&(a.tools=h(e.tools)),e.safetySettings!==void 0&&(a.safetySettings=e.safetySettings),a},v=n=>{if(n instanceof m)return n;let e=n instanceof Error?n:new Error(String(n)),t=T(n);return p("vertexai",t,e)};export{c as a,w as b};
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
import{
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as o}from"./chunk-RGUETQSC.js";var a=1024,s=o({name:"validate-large-files",description:"Detect files exceeding size limit",canFix:!1,stacks:[],defaults:{maxKb:a},checkAll(n,r){let e=r.maxKb??a,l=e*1024,t=[];for(let i of n)if(i.size>l){let c=Math.round(i.size/1024);t.push({path:i.path,message:`file is ${c}KB (max: ${e}KB)`})}return t}}),d=s.run,f=s.validator,x=s.main;export{s as a,d as b,f as c,x as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{a as w}from"./chunk-AGRTWPDI.js";import{a as v}from"./chunk-2VEVVX6U.js";import{a as y}from"./chunk-4DOMGQOO.js";import{f as k}from"./chunk-3BEX5FYF.js";import{b as l,f,g as h,h as C,i as m}from"./chunk-3SXTMY75.js";import{g as a}from"./chunk-A6RDYP6R.js";var p=y(),D=e=>{let s=new Map,r=new Set(e.map(i=>i.name));for(let i of e){let n=[];for(let d of i.config._loadedFiles){let t=d.content,u=t.dependencies;if(u!==void 0)for(let c of Object.keys(u))r.has(c)&&n.push(c);let o=t.imports;if(o!==void 0)for(let c of Object.values(o))r.has(c)&&n.push(c)}s.set(i.name,[...new Set(n)])}return s},x=e=>{let s=[],r=new Set,i=new Set,n=[],d=t=>{r.add(t),i.add(t),n.push(t);let u=e.get(t)??[];for(let o of u)if(!r.has(o))d(o);else if(i.has(o)){let c=n.indexOf(o),g=n.slice(c);g.push(o),s.push(g)}n.pop(),i.delete(t)};for(let t of e.keys())r.has(t)||d(t);return s},R=async(e={})=>{let{root:s="."}=e,r=await w(s),i=D(r),n=x(i);return{hasCycles:n.length>0,cycles:n,packagesChecked:r.length}},O=e=>k.fromPromise(()=>R(e)),b=e=>a.ok({root:"."}),A=e=>{if(a.isFail(e))return p.writeln(f("\u2717"),l(" "+(e.error instanceof Error?e.error.message:String(e.error)))),a.fail({exitCode:1});let{value:s}=e;if(p.writeln(m("\u2139"),l(` Checked ${s.packagesChecked} packages.`)),s.hasCycles){p.writeln(f("\u2717"),l(` Found ${s.cycles.length} circular dependencies:`));for(let r of s.cycles)p.writeln(C("\u26A0"),l(` ${r.join(" \u2192 ")}`));return a.fail({exitCode:1})}return p.writeln(h("\u2713"),l(" No circular dependencies found.")),a.ok(void 0)},M=v.createTrigger({handler:O,adaptInput:b,adaptOutput:A}),_=async e=>await M({command:"validate-circular-deps",args:[],flags:{}});export{R as a,O as b,M as c,_ as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
+
import{d as o}from"./chunk-XU5SILYR.js";var d=(e,n)=>{if(e!==void 0)for(let r of e){if(r==="--agent")return"agent";if(r==="--human")return"human"}let t=n?.agentMode;return t===!0?"agent":t===!1?"human":o()};var u=e=>e===void 0?[]:e.filter(n=>n!=="--agent"&&n!=="--human"&&n!=="--non-interactive");export{d as a,u as b};
|