eser 4.1.29 → 4.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/chunks/{add-O35CHPAB.js → add-5SDE43IH.js} +1 -1
- package/chunks/{approve-XMPDDDZD.js → approve-XNUZYGYJ.js} +1 -1
- package/chunks/{ask-BZIPZT7O.js → ask-L3N6REQI.js} +1 -1
- package/chunks/{block-C2GOOMFH.js → block-NWIP4USQ.js} +1 -1
- package/chunks/{browser-JNDQ24XT.js → browser-SG2DBNGS.js} +1 -1
- package/chunks/{build-LADMCGZD.js → build-6DCIDFY7.js} +2 -2
- package/chunks/bun-3AACRJXG.js +2 -0
- package/chunks/{changelog-gen-KMNP2KO4.js → changelog-gen-7V37P7PE.js} +1 -1
- package/chunks/{chunk-SAQAIPUB.js → chunk-2EVWKUN6.js} +1 -1
- package/chunks/{chunk-G35GBI4M.js → chunk-32HV3K27.js} +1 -1
- package/chunks/{chunk-XAV6BM52.js → chunk-3KCPUYLZ.js} +1 -1
- package/chunks/{chunk-IKYBNRCS.js → chunk-3QIPK7NI.js} +1 -1
- package/chunks/{chunk-DPL7GREV.js → chunk-455V3AE5.js} +1 -1
- package/chunks/{chunk-SOCLJVZ3.js → chunk-46ZWBKIW.js} +1 -1
- package/chunks/{chunk-C2FHTZ2Y.js → chunk-4DOMGQOO.js} +1 -1
- package/chunks/{chunk-2SEPWXDK.js → chunk-4GQY3STW.js} +1 -1
- package/chunks/{chunk-YZ4L35HK.js → chunk-4SYC4WJV.js} +1 -1
- package/chunks/{chunk-CFTANV4S.js → chunk-4WQGB7NO.js} +1 -1
- package/chunks/{chunk-GITZBQ2Z.js → chunk-5MWX3POX.js} +1 -1
- package/chunks/{chunk-LT7CC4SX.js → chunk-5PNGVDLV.js} +1 -1
- package/chunks/{chunk-CLXOJOH3.js → chunk-6QC7ILI5.js} +1 -1
- package/chunks/{chunk-JPCJIMM5.js → chunk-6SYJFJDF.js} +1 -1
- package/chunks/{chunk-EJ4XBQTD.js → chunk-7BFBOLLC.js} +1 -1
- package/chunks/{chunk-Z2CGXVFY.js → chunk-7NUMDHE2.js} +1 -1
- package/chunks/{chunk-RZKZDGNM.js → chunk-AGRTWPDI.js} +1 -1
- package/chunks/{chunk-T4CNY6II.js → chunk-BCPCQHDL.js} +1 -1
- package/chunks/{chunk-V4AJMSER.js → chunk-BP3IFAPO.js} +1 -1
- package/chunks/{chunk-LXE2WGIW.js → chunk-C7HGK43H.js} +1 -1
- package/chunks/{chunk-RMGMMTO6.js → chunk-CEYKWASA.js} +1 -1
- package/chunks/{chunk-ZKUI7MRS.js → chunk-CKNA5LIK.js} +1 -1
- package/chunks/{chunk-CS3FL7HI.js → chunk-CLL3YG4W.js} +1 -1
- package/chunks/{chunk-H7XLUEAU.js → chunk-COKZ6MLN.js} +2 -2
- package/chunks/{chunk-VXTKQXGM.js → chunk-CUIMSX4V.js} +1 -1
- package/chunks/{chunk-IAZ2MM3P.js → chunk-EBCQCAQ7.js} +1 -1
- package/chunks/{chunk-QTOUP2B7.js → chunk-ER4ZWF4Y.js} +1 -1
- package/chunks/{chunk-HFFIXVAB.js → chunk-F5BPXG5L.js} +1 -1
- package/chunks/{chunk-TBHZHGUF.js → chunk-FORPNESQ.js} +1 -1
- package/chunks/{chunk-NP2CCJ4C.js → chunk-GBM3TZFD.js} +1 -1
- package/chunks/{chunk-VIOT4AMI.js → chunk-H4SPMUT6.js} +1 -1
- package/chunks/{chunk-6HGMAVFR.js → chunk-HVLKXRPA.js} +1 -1
- package/chunks/{chunk-KXI7O3KZ.js → chunk-HVOPUZOM.js} +1 -1
- package/chunks/{chunk-SMT3I5PQ.js → chunk-HYT26FYU.js} +1 -1
- package/chunks/{chunk-KP3HXVLZ.js → chunk-I4C675WP.js} +1 -1
- package/chunks/{chunk-PDJEHSKZ.js → chunk-IDMI5OBK.js} +1 -1
- package/chunks/chunk-JOTAKQMZ.js +2 -0
- package/chunks/{chunk-MNVCCOJS.js → chunk-K6H7JTIH.js} +1 -1
- package/chunks/{chunk-A3MBTPHJ.js → chunk-K7MYEXOS.js} +1 -1
- package/chunks/{chunk-VXA3KMDF.js → chunk-KKBIUT5L.js} +1 -1
- package/chunks/{chunk-4NEBMHCP.js → chunk-KPWEJXPI.js} +1 -1
- package/chunks/{chunk-TBOM65KB.js → chunk-KQE6FMKW.js} +1 -1
- package/chunks/{chunk-RYOLIM3I.js → chunk-MRCBHVSB.js} +1 -1
- package/chunks/{chunk-VKSH6UPG.js → chunk-MXGRYONZ.js} +1 -1
- package/chunks/{chunk-COJNSVOS.js → chunk-N2VBT43E.js} +1 -1
- package/chunks/chunk-N4HITOTN.js +2 -0
- package/chunks/{chunk-QEZJTCNE.js → chunk-NP723K5L.js} +1 -1
- package/chunks/{chunk-KLHDNHD3.js → chunk-NTHP6SND.js} +1 -1
- package/chunks/{chunk-VC5BX56D.js → chunk-P2TABZ4A.js} +1 -1
- package/chunks/{chunk-6LVNPRHQ.js → chunk-P74JF7XR.js} +1 -1
- package/chunks/{chunk-JPFGKN4T.js → chunk-PVPMHMKP.js} +1 -1
- package/chunks/{chunk-6XW64HCG.js → chunk-QOX7VSID.js} +1 -1
- package/chunks/{chunk-5YVKJFG6.js → chunk-RGUETQSC.js} +1 -1
- package/chunks/{chunk-YSJNWJ24.js → chunk-S3XXNZSC.js} +1 -1
- package/chunks/{chunk-HYFBCDIO.js → chunk-SOBOSRJB.js} +1 -1
- package/chunks/{chunk-5BHHLJJN.js → chunk-SQINSLNL.js} +1 -1
- package/chunks/{chunk-ZTPERUHN.js → chunk-UESOCN2G.js} +1 -1
- package/chunks/{chunk-KLWWCHOL.js → chunk-UJ6LH5FY.js} +1 -1
- package/chunks/{chunk-4MELQSFH.js → chunk-VC6ERZSI.js} +1 -1
- package/chunks/{chunk-FXBDWBXT.js → chunk-VG72SSDI.js} +1 -1
- package/chunks/{chunk-EETBL6X2.js → chunk-W3RVRCUB.js} +1 -1
- package/chunks/{chunk-U3FRSRMK.js → chunk-WG6J7DFO.js} +1 -1
- package/chunks/{chunk-3HC6RWFJ.js → chunk-XU5SILYR.js} +1 -1
- package/chunks/{chunk-7ZVGNL76.js → chunk-XVSIRN6G.js} +1 -1
- package/chunks/{chunk-XMVLDQGA.js → chunk-Y4ARZGGL.js} +1 -1
- package/chunks/{chunk-PASFORZM.js → chunk-YQVWAWMO.js} +1 -1
- package/chunks/{chunk-AN5JOFHD.js → chunk-YVIGHK4H.js} +1 -1
- package/chunks/{chunk-7FMX4QXF.js → chunk-ZNGLZECE.js} +1 -1
- package/chunks/{claude-code-T26K2CSI.js → claude-code-VUBEU7RR.js} +1 -1
- package/chunks/{clone-UYEZ44LL.js → clone-H3UAEVVP.js} +1 -1
- package/chunks/{commitmsg-646PHU7A.js → commitmsg-UK2ABB7D.js} +2 -2
- package/chunks/{concern-YRABYUVO.js → concern-UCYEAXJ4.js} +1 -1
- package/chunks/{deno-VWFDRCYK.js → deno-7BSPHDRG.js} +1 -1
- package/chunks/{dev-G4VQ2IYE.js → dev-XBH6C6DH.js} +2 -2
- package/chunks/{done-5SD4KWRA.js → done-DIN56LXZ.js} +1 -1
- package/chunks/{file-tools-shared-6W7Q4BM3.js → file-tools-shared-G36OYF5S.js} +1 -1
- package/chunks/{gh-CD3B5KEN.js → gh-RKKHKA3B.js} +2 -2
- package/chunks/{gh-contributors-35JDS77W.js → gh-contributors-X7BW57DD.js} +1 -1
- package/chunks/{init-URA5HJ76.js → init-32DVDSNZ.js} +3 -3
- package/chunks/{init-FAWK4Z3E.js → init-DKNS6BZV.js} +1 -1
- package/chunks/{install-M74UAT7X.js → install-LM44N3DB.js} +1 -1
- package/chunks/{invoke-hook-4LHASYW3.js → invoke-hook-4DBMDFA5.js} +1 -1
- package/chunks/{kiro-G4OHOVFL.js → kiro-HQLXD6ZU.js} +1 -1
- package/chunks/{list-LBUVQR7O.js → list-5TGTYMAU.js} +1 -1
- package/chunks/{list-J5HOVH5E.js → list-N4ZKDFW7.js} +1 -1
- package/chunks/{list-4EO2DKMM.js → list-PY3A762R.js} +1 -1
- package/chunks/{load-config-DVKFZVST.js → load-config-FTQMJVEW.js} +1 -1
- package/chunks/{main-ODLLH74E.js → main-JTYNMHNL.js} +2 -2
- package/chunks/{manifest-QSFTIV3B.js → manifest-NF2EK757.js} +1 -1
- package/chunks/{mod-ZZYMEYCH.js → mod-5WXRQGLS.js} +1 -1
- package/chunks/{mod-YSMK5V7P.js → mod-FEGQZ3ZY.js} +1 -1
- package/chunks/{mod-QHYBU43F.js → mod-HKYPZOU7.js} +1 -1
- package/chunks/{mod-5ZKIEGUP.js → mod-JI2A2546.js} +1 -1
- package/chunks/{mod-U23K3LXJ.js → mod-JZNE2HH6.js} +1 -1
- package/chunks/{mod-T55CWDLD.js → mod-MLRQFSBE.js} +1 -1
- package/chunks/{mod-S5HDMMLJ.js → mod-NCF6OSXO.js} +1 -1
- package/chunks/mod-RRIF7ZNJ.js +2 -0
- package/chunks/{mod-EWGGLW3S.js → mod-SA3J2VR5.js} +1 -1
- package/chunks/{mod-BE3R7D2V.js → mod-Y4UHOKMZ.js} +2 -2
- package/chunks/{mod-RLMNE7UW.js → mod-YX3JRMSI.js} +1 -1
- package/chunks/{new-GDE5UZWP.js → new-BOGCXTIY.js} +1 -1
- package/chunks/{next-2HGZUAMR.js → next-VEKY722P.js} +1 -1
- package/chunks/node-MFKYO4CY.js +2 -0
- package/chunks/{ollama-EE7S3UZE.js → ollama-36F5QAOO.js} +1 -1
- package/chunks/{opencode-WUF4YPPD.js → opencode-7J3JDC44.js} +1 -1
- package/chunks/{purge-OIEP3ALR.js → purge-SQ6NCKWN.js} +1 -1
- package/chunks/{recipe-applier-WZ43N5XT.js → recipe-applier-6QZYAZ57.js} +1 -1
- package/chunks/{registry-fetcher-G33L5S7X.js → registry-fetcher-76ISLGRR.js} +1 -1
- package/chunks/{release-5BYYTQJI.js → release-WKMSWXDS.js} +2 -2
- package/chunks/{release-notes-6M2YRB3G.js → release-notes-GOUHBQ2F.js} +1 -1
- package/chunks/{release-tag-QP4ZKQNS.js → release-tag-5WNEA4HM.js} +1 -1
- package/chunks/{reset-TKTDLTXB.js → reset-EYLAZVKO.js} +1 -1
- package/chunks/{rule-6TDBH4BL.js → rule-HV7DARH6.js} +1 -1
- package/chunks/{run-TQEEFEDE.js → run-6IMOOTJ5.js} +1 -1
- package/chunks/{run-SU27QAHR.js → run-RGEZUAPM.js} +1 -1
- package/chunks/{scripts-ZSF43ZJN.js → scripts-JK6W2MCO.js} +1 -1
- package/chunks/{serve-JSDQDTTM.js → serve-DEYVWV2K.js} +2 -2
- package/chunks/{server-P46LIK5C.js → server-KNWQV2HW.js} +1 -1
- package/chunks/{spec-ATRKKK2P.js → spec-JCR5EYCU.js} +1 -1
- package/chunks/{status-H2KLEMT6.js → status-F6JR6RIQ.js} +1 -1
- package/chunks/{sync-CK7PWMKK.js → sync-ZOU46K25.js} +1 -1
- package/chunks/{system-IV54LJTN.js → system-BJCQKFCP.js} +1 -1
- package/chunks/{system-NSABXTHD.js → system-OSEVYVYU.js} +1 -1
- package/chunks/{update-HP5WGRNK.js → update-4C4WNXCE.js} +1 -1
- package/chunks/{validate-filenames-GKDIEJH4.js → validate-bom-KEC4IOKO.js} +1 -1
- package/chunks/{validate-bom-KGIGVVOU.js → validate-case-conflict-ZZKZQQX4.js} +1 -1
- package/chunks/validate-circular-deps-QCJYK5K5.js +2 -0
- package/chunks/{validate-commit-msg-2FLWH6TC.js → validate-commit-msg-PZZ4T4QF.js} +1 -1
- package/chunks/validate-docs-M55HAXPX.js +2 -0
- package/chunks/{validate-case-conflict-OO2AO434.js → validate-eof-MX52AUUT.js} +1 -1
- package/chunks/validate-export-names-UFXPIDFW.js +2 -0
- package/chunks/{validate-eof-E33EQKDM.js → validate-filenames-LXIMPWRW.js} +1 -1
- 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-FXHXJMG4.js → validate-package-configs-V5LR7K5C.js} +1 -1
- 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-PZPDQ673.js → versions-IVXYMSAZ.js} +1 -1
- package/chunks/{watch-47KEOG5L.js → watch-YKYNWTZF.js} +1 -1
- package/chunks/{workerd-LDORGZ6V.js → workerd-VVSAKLDZ.js} +1 -1
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/bun-ZPIZVC7D.js +0 -2
- package/chunks/chunk-EZE3F4PG.js +0 -2
- package/chunks/chunk-PHI2BESG.js +0 -2
- package/chunks/mod-6DSPYXMK.js +0 -2
- package/chunks/node-SUFYFPRO.js +0 -2
- package/chunks/validate-circular-deps-32ISYSEO.js +0 -2
- package/chunks/validate-docs-MNQ7ZRID.js +0 -2
- package/chunks/validate-export-names-IWS4NRYR.js +0 -2
- package/chunks/validate-json-L7BSQN3G.js +0 -2
- package/chunks/validate-large-files-CHHOQREX.js +0 -2
- package/chunks/validate-licenses-5WEHTSL4.js +0 -2
- package/chunks/validate-line-endings-EWGW2ZWD.js +0 -2
- package/chunks/validate-merge-conflict-IN5ZQJDJ.js +0 -2
- package/chunks/validate-mod-exports-PHEFFLDK.js +0 -2
- package/chunks/validate-secrets-ABX5UNHC.js +0 -2
- package/chunks/validate-shebangs-47GMC7WX.js +0 -2
- package/chunks/validate-submodules-4BPO5ORH.js +0 -2
- package/chunks/validate-symlinks-OCGMLYJS.js +0 -2
- package/chunks/validate-toml-MYSG53JW.js +0 -2
- package/chunks/validate-trailing-whitespace-AXXHTIAE.js +0 -2
- package/chunks/validate-yaml-FT5PODBP.js +0 -2
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{t as c}from"./chunk-
|
|
2
|
+
import{t as c}from"./chunk-MRCBHVSB.js";var R=["registry/v1"],$=["file","folder"],b=["local","github"],E=r=>r==="project"||r==="structure"||r==="utility",F=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(typeof e.source!="string"||typeof e.target!="string"||e.kind!==void 0&&!$.includes(e.kind)||e.provider!==void 0&&!b.includes(e.provider))},S=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(e.go!==void 0&&!Array.isArray(e.go)||e.jsr!==void 0&&!Array.isArray(e.jsr)||e.npm!==void 0&&!Array.isArray(e.npm))},k=r=>{if(typeof r!="object"||r===null)return!1;let e=r;return!(typeof e.name!="string"||e.name===""||typeof e.description!="string"||e.default!==void 0&&typeof e.default!="string"||e.prompt!==void 0&&typeof e.prompt!="string")},u=r=>{if(typeof r!="object"||r===null)return!1;let e=r;if(typeof e.name!="string"||e.name===""||typeof e.description!="string"||typeof e.language!="string"||!E(e.scale)||!Array.isArray(e.files)||e.files.length===0)return!1;for(let n of e.files)if(!F(n))return!1;if(e.dependencies!==void 0&&!S(e.dependencies)||e.tags!==void 0&&!Array.isArray(e.tags))return!1;if(e.requires!==void 0){if(!Array.isArray(e.requires))return!1;for(let n of e.requires)if(typeof n!="string")return!1}if(e.variables!==void 0){if(!Array.isArray(e.variables))return!1;for(let n of e.variables)if(!k(n))return!1}if(e.postInstall!==void 0){if(!Array.isArray(e.postInstall))return!1;for(let n of e.postInstall)if(typeof n!="string")return!1}return!0},g=r=>{if(typeof r!="object"||r===null)throw new Error("Registry manifest must be a JSON object");let e=r;if(e.$schema!==void 0){let i=String(e.$schema);R.some(s=>i.includes(s))||console.warn(`Warning: Registry uses unknown schema "${i}". This CLI supports v1.`)}if(typeof e.name!="string"||e.name==="")throw new Error("Registry manifest requires a non-empty 'name' field");if(typeof e.description!="string")throw new Error("Registry manifest requires a 'description' field");if(typeof e.author!="string")throw new Error("Registry manifest requires an 'author' field");if(typeof e.registryUrl!="string"||e.registryUrl==="")throw new Error("Registry manifest requires a non-empty 'registryUrl' field");if(!Array.isArray(e.recipes))throw new Error("Registry manifest requires a 'recipes' array");for(let i of e.recipes)if(!u(i)){let o=typeof i=="object"&&i!==null?i.name??"<unknown>":"<invalid>";throw new Error(`Invalid recipe definition: '${o}'`)}let n=e.recipes,t=new Set;for(let i of n){if(t.has(i.name))throw new Error(`Duplicate recipe name '${i.name}' in registry`);t.add(i.name)}return r},y=r=>{if(!u(r))throw new Error("Invalid recipe definition");return r},h=(r,e)=>{let n=r.replace(/\/{1,20}$/,""),t=e.replace(/^\/{1,20}/,"");return`${n}/${t}`};var P=3e4,T="eser",v="stack",m="main",p=".eser/recipes.json",j=`https://raw.githubusercontent.com/${T}/${v}/${m}/.eser/recipes.json`,D=p,x=r=>{let e=r.replace(/^gh:/,""),n=e.indexOf("#"),t=n===-1?e:e.slice(0,n),i=n===-1?void 0:e.slice(n+1);if(t.includes("/")){let o=t.indexOf("/"),s=t.slice(0,o),f=t.slice(o+1);return s===""||f===""?{kind:"name",name:t,ref:i}:{kind:"repo",owner:s,repo:f,ref:i??m}}return{kind:"name",name:t,ref:i}},l=async r=>await globalThis.fetch(r,{signal:AbortSignal.timeout(P)}),I=async()=>{let r=c.process.cwd();for(let e=0;e<10;e++){let n=`${r}/${p}`;try{return await c.fs.stat(n),n}catch{let t=r.replace(/\/[^/]+$/,"");if(t===r)break;r=t}}},_=async(r,e)=>{let n=r??j;if(e?.local===!0&&r===void 0){let s=await I();s!==void 0&&(n=s,e?.verbose===!0&&console.log(`Using local registry: ${s}`))}let t=n.startsWith("http://")||n.startsWith("https://");e?.verbose===!0&&console.log(`Fetching registry from: ${n}`);let i;if(t){let s=await l(n);if(!s.ok)throw new Error(`Could not reach registry at ${n}. HTTP ${s.status}`);i=await s.text()}else try{i=await c.fs.readTextFile(n)}catch{throw new Error(`Could not read registry file at ${n}`)}let o;try{o=JSON.parse(i)}catch{throw new Error(`Registry at ${n} is not valid JSON`)}return g(o)},C=async(r,e,n,t)=>{let i=`https://raw.githubusercontent.com/${r}/${e}/${n}/${p}`;return await _(i,t)},M=async(r,e)=>{let n=h(r,e),t=await l(n);if(!t.ok)throw new Error(`Could not fetch recipe file at ${n}. HTTP ${t.status}`);return await t.text()},U=r=>{let e=r.match(/^https:\/\/raw\.githubusercontent\.com\/([^/]+)\/([^/]+)\/([^/]+)(?:\/(.*))?$/);if(e!==null)return{owner:e[1],repo:e[2],ref:e[3],basePath:e[4]??""}},q=async(r,e)=>{let n=U(r);if(n===void 0)throw new Error(`Cannot fetch folder: registry URL '${r}' is not a GitHub raw URL`);let t=n.basePath?`${n.basePath}/${e}`.replace(/\/+/g,"/"):e,i=`https://api.github.com/repos/${n.owner}/${n.repo}/contents/${t}?ref=${n.ref}`,o=await l(i);if(!o.ok)throw new Error(`Could not list folder '${t}' from ${n.owner}/${n.repo}. HTTP ${o.status}`);let s=await o.json();if(!Array.isArray(s))throw new Error(`Expected directory listing for '${t}', got a file instead`);let w=s.filter(a=>a.type==="file").map(async a=>{if(a.download_url===null)throw new Error(`File '${a.path}' has no download URL (may be too large)`);let d=await l(a.download_url);if(!d.ok)throw new Error(`Could not fetch file '${a.path}'. HTTP ${d.status}`);return{path:a.path.startsWith(t)?a.path.slice(t.length).replace(/^\//,""):a.path,content:await d.text()}});return await Promise.all(w)},H=async(r,e,n="main",t="recipe.json")=>{let i=`https://raw.githubusercontent.com/${r}/${e}/${n}/${t}`,o=await l(i);if(!o.ok)throw new Error(`Could not fetch recipe from ${r}/${e}@${n}/${t}. HTTP ${o.status}`);let s;try{s=JSON.parse(await o.text())}catch{throw new Error(`Recipe file at ${r}/${e}@${n}/${t} is not valid JSON`)}return y(s)};export{P as a,T as b,v as c,m as d,p as e,j as f,D as g,x as h,l as i,I as j,_ as k,C as l,M as m,U as n,q as o,H as p};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as b,b as w,d as F,f as D}from"./chunk-
|
|
2
|
+
import{a as b,b as w,d as F,f as D}from"./chunk-4SYC4WJV.js";import{a as C}from"./chunk-2VEVVX6U.js";import{a as h}from"./chunk-4DOMGQOO.js";import{f as R}from"./chunk-3BEX5FYF.js";import{b as l,f as m,g as k,h as A,i as g}from"./chunk-3SXTMY75.js";import{g as d}from"./chunk-A6RDYP6R.js";var x=(e,r)=>{let o={},t=e.length;for(let s=0;s<t;s++){let n=e[s],a=r(n);o[a]===void 0?o[a]=[n]:o[a].push(n)}return o};var u=h(),P=(e,r)=>e===r?!0:typeof e!=typeof r||typeof e!="object"||e===null||r===null?!1:JSON.stringify(e)===JSON.stringify(r),O=(e,r)=>e[r],j=e=>e.startsWith("npm:@jsr/"),B=e=>{let r=e.slice(9),o=r.indexOf("__");if(o===-1)throw new Error(`Invalid npm JSR format: ${e}`);let t=r.slice(0,o),s=r.slice(o+2),n=s.indexOf("@"),a,p;return n===-1?(a=s,p=""):(a=s.slice(0,n),p=s.slice(n)),`jsr:@${t}/${a}${p}`},_=(e,r)=>j(r)?B(r):r.startsWith("npm:")?r:`npm:${e}@${r}`,S=e=>e==="workspace:*"||e.startsWith("workspace:"),M=(e,r,o)=>{let t=[],s=r.dependencies??{},n=r.devDependencies??{},a={...s,...n},p=o.imports??{};for(let[y,c]of Object.entries(a)){if(S(c))continue;let f=_(y,c),i=p[y];i===void 0?t.push({packageName:e,dependencyName:y,issue:"missing_in_deno",expected:f}):i!==f&&t.push({packageName:e,dependencyName:y,issue:"version_mismatch",expected:f,actual:i})}for(let[y,c]of Object.entries(p))a[y]===void 0&&t.push({packageName:e,dependencyName:y,issue:"missing_in_package",actual:p[y]});return t},G=async(e,r)=>{let o=[],t=[],s=await w({baseDir:e,includeFiles:[b.DenoJson,b.PackageJson]}),n=s._loadedFiles.find(c=>c.fileType===b.DenoJson),a=s._loadedFiles.find(c=>c.fileType===b.PackageJson);if(n===void 0||a===void 0)return{inconsistencies:[],dependencyInconsistencies:[]};let p=["name","version","exports"];for(let c of p){let f=O(n.content,c),i=O(a.content,c);f===void 0||i===void 0||P(f,i)||o.push({packageName:r,field:c,denoValue:f,packageValue:i})}let y=M(r,a.content,n.content);return t.push(...y),{inconsistencies:o,dependencyInconsistencies:t}},K=async(e={})=>{let{root:r=".",failFast:o=!1}=e,[t,s]=await D(r),n=[],a=[],p=0;for(let c of s){let f=F(c.config);try{let i=await G(f,c.name);if(p++,i.inconsistencies.length>0&&n.push(...i.inconsistencies),i.dependencyInconsistencies.length>0&&a.push(...i.dependencyInconsistencies),o&&(i.inconsistencies.length>0||i.dependencyInconsistencies.length>0))return{isConsistent:!1,inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}}catch{continue}}return{isConsistent:!(n.length>0||a.length>0),inconsistencies:n,dependencyInconsistencies:a,packagesChecked:p}},v=e=>typeof e=="string"?`"${e}"`:JSON.stringify(e,null,2),H=e=>{switch(e.issue){case"missing_in_deno":return`Missing in deno.json imports. Expected: ${e.expected}`;case"missing_in_package":return`Extra in deno.json imports (not in package.json): ${e.actual}`;case"version_mismatch":return`Version mismatch. Expected: ${e.expected}, Actual: ${e.actual}`}},L=e=>R.fromPromise(()=>K(e)),$=e=>d.ok({root:"."}),N=e=>{if(d.isFail(e))return u.writeln(m("\u2717"),l(" "+String(e.error))),d.fail({exitCode:1});let{value:r}=e;if(u.writeln(g("\u2139"),l(` Checked ${r.packagesChecked} packages.`)),!r.isConsistent){if(r.inconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.inconsistencies.length} field inconsistencies:`));let o=x(r.inconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.field} mismatch:`)),u.writeln(g("\u2139"),l(` deno.json: ${v(n.denoValue)}`)),u.writeln(g("\u2139"),l(` package.json: ${v(n.packageValue)}`))}}if(r.dependencyInconsistencies.length>0){u.writeln(m("\u2717"),l(` Found ${r.dependencyInconsistencies.length} dependency inconsistencies:`));let o=x(r.dependencyInconsistencies,t=>t.packageName);for(let[t,s]of Object.entries(o)){u.writeln(A("\u26A0"),l(" "+t));for(let n of s)u.writeln(m("\u2717"),l(` ${n.dependencyName}:`)),u.writeln(g("\u2139"),l(` ${H(n)}`))}}return d.fail({exitCode:1})}return u.writeln(k("\u2713"),l(" All package configs are consistent.")),d.ok(void 0)},J=C.createTrigger({handler:L,adaptInput:$,adaptOutput:N}),qn=async e=>await J({command:"validate-package-configs",args:[],flags:{}});export{K as a,L as b,J as c,qn as d};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as k}from"./chunk-NBA6EFWU.js";import{d as F,f as T,h as C,j as d,k as L,n as u}from"./chunk-7ATUODBM.js";import{a as g}from"./chunk-AP72BKVG.js";import{t as D}from"./chunk-
|
|
2
|
+
import{b as k}from"./chunk-NBA6EFWU.js";import{d as F,f as T,h as C,j as d,k as L,n as u}from"./chunk-7ATUODBM.js";import{a as g}from"./chunk-AP72BKVG.js";import{t as D}from"./chunk-MRCBHVSB.js";var R={USE_CLIENT:"use client",USE_SERVER:"use server",USE_STRICT:"use strict"},M=[/node_modules/,/\.test\./,/\.spec\./],G=(t,e)=>{let r=t.split(`
|
|
3
3
|
`),i=e.toLowerCase(),o=!1;for(let s=0;s<Math.min(50,r.length);s++){let n=r[s]?.trim()??"";if(o){n.includes("*/")&&(o=!1);continue}if(n===""||n.startsWith("//"))continue;if(n.startsWith("/*")){n.includes("*/")||(o=!0);continue}let f=`"${i}";`,a=`'${i}';`,l=n.toLowerCase();if(l===f||l===a)return!0;if(n.startsWith("import")||n.startsWith("export")||n.startsWith("const")||n.startsWith("let")||n.startsWith("var")||n.startsWith("function")||n.startsWith("class"))break}return!1},W=t=>{let e=new Set,r=t.matchAll(/export\s+(?:async\s+)?function\s+(\w+)/g);for(let n of r)n[1]!==void 0&&e.add(n[1]);let i=t.matchAll(/export\s{1,100}(?:const|let)\s{1,100}(\w+)\s{0,100}=/g);for(let n of i)n[1]!==void 0&&e.add(n[1]);let o=t.matchAll(/export\s{1,100}class\s{1,100}(\w+)/g);for(let n of o)n[1]!==void 0&&e.add(n[1]);/export\s+default\s+/.test(t)&&e.add("default");let s=t.matchAll(/export\s*\{([\w\s,]+)\}/g);for(let n of s)if(n[1]!==void 0){let f=n[1].split(",").map(a=>{let l=a.trim().split(/ {1,10}as {1,10}/);return(l[1]??l[0])?.trim()});for(let a of f)a!==void 0&&a!==""&&e.add(a)}return[...e]},O=async t=>{try{return await D.fs.readTextFile(t)}catch{return null}},Q=async(t,e,r={})=>{let i=r.extensions??k,o=r.skip??M,s=r.projectRoot??t,n=[];for await(let f of D.fs.walk(t,{exts:[...i],skip:[...o]})){if(!f.isFile)continue;let a=await O(f.path);if(a!==null&&G(a,e)){let l=D.path.relative(s,f.path),m=W(a);n.push({filePath:f.path,relativePath:l,directive:e,exports:m})}}return n},Y=(t,e={})=>Q(t,R.USE_CLIENT,e),X=(t,e)=>{let r=`"${e}"`,i=`'${e}'`;return t.includes(r)||t.includes(i)},Z=async(t,e={})=>{let r=e.extensions??k,i=e.skip??M,o=e.projectRoot??t,s=[];for await(let n of D.fs.walk(t,{exts:[...r],skip:[...i]})){if(!n.isFile)continue;let f=await O(n.path);if(f!==null&&X(f,R.USE_SERVER)){let a=D.path.relative(o,n.path),l=W(f);s.push({filePath:n.path,relativePath:a,directive:R.USE_SERVER,exports:l})}}return s};function w(t){return t.isFile?"file":t.isDirectory?"dir":t.isSymlink?"symlink":void 0}async function x(t){try{let e=await Deno.stat(t);_(e);return}catch(e){if(!(e instanceof Deno.errors.NotFound))throw e}try{await Deno.mkdir(t,{recursive:!0})}catch(e){if(!(e instanceof Deno.errors.AlreadyExists))throw e;let r=await Deno.stat(t);_(r)}}function _(t){if(!t.isDirectory)throw new Error(`Failed to ensure directory exists: expected 'dir', got '${w(t)}'`)}function c(t){return t instanceof URL?C(t):t}function P(t,e,r=T){if(t=c(t),e=c(e),u(t)===u(e))return!1;let i=t.split(r),o=e.split(r);return i.every((s,n)=>o[n]===s)}function S(t,e){if(t===null)throw new Error(`${e} is unavailable`)}async function I(t,e,r){let i;try{i=await Deno.lstat(e)}catch(o){if(o instanceof Deno.errors.NotFound)return;throw o}if(r.isFolder&&!i.isDirectory)throw new Error(`Cannot overwrite non-directory '${e}' with directory '${t}'`);if(!r.overwrite)throw new Deno.errors.AlreadyExists(`'${e}' already exists.`);return i}async function N(t,e,r){if(await I(t,e,r),await Deno.copyFile(t,e),r.preserveTimestamps){let i=await Deno.stat(t);S(i.atime,"statInfo.atime"),S(i.mtime,"statInfo.mtime"),await Deno.utime(e,i.atime,i.mtime)}}async function U(t,e,r){await I(t,e,r);let i=await Deno.readLink(t),o=w(await Deno.lstat(t));if(g?await Deno.symlink(i,e,{type:o==="dir"?"dir":"file"}):await Deno.symlink(i,e),r.preserveTimestamps){let s=await Deno.lstat(t);S(s.atime,"statInfo.atime"),S(s.mtime,"statInfo.mtime"),await Deno.utime(e,s.atime,s.mtime)}}async function j(t,e,r){if(await I(t,e,{...r,isFolder:!0})||await x(e),r.preserveTimestamps){let s=await Deno.stat(t);S(s.atime,"statInfo.atime"),S(s.mtime,"statInfo.mtime"),await Deno.utime(e,s.atime,s.mtime)}t=c(t),e=c(e);let o=[];for await(let s of Deno.readDir(t)){let n=d(t,s.name),f=d(e,F(n));s.isSymlink?o.push(U(n,f,r)):s.isDirectory?o.push(j(n,f,r)):s.isFile&&o.push(N(n,f,r))}await Promise.all(o)}async function wt(t,e,r={}){if(t=u(c(t)),e=u(c(e)),t===e)throw new Error("Source and destination cannot be the same");let i=await Deno.lstat(t);if(i.isDirectory&&P(t,e))throw new Error(`Cannot copy '${t}' to a subdirectory of itself: '${e}'`);i.isSymlink?await U(t,e,r):i.isDirectory?await j(t,e,r):i.isFile&&await N(t,e,r)}async function Ft(t){try{let e=await Array.fromAsync(Deno.readDir(t));await Promise.all(e.map(r=>{if(r&&r.name){let i=d(c(t),r.name);return Deno.remove(i,{recursive:!0})}}))}catch(e){if(!(e instanceof Deno.errors.NotFound))throw e;await Deno.mkdir(t,{recursive:!0})}}async function A(t){t=c(t),t=L(t);let e=F(t),r=await Deno.stat(t);return{path:t,name:e,isFile:r.isFile,isDirectory:r.isDirectory,isSymlink:r.isSymlink}}function E(t,e,r,i){return!(e&&!e.some(o=>t.endsWith(o))||r&&!r.some(o=>!!t.match(o))||i&&i.some(o=>!!t.match(o)))}async function*V(t,e){let{maxDepth:r=1/0,includeFiles:i=!0,includeDirs:o=!0,includeSymlinks:s=!0,followSymlinks:n=!1,canonicalize:f=!0,exts:a=void 0,match:l=void 0,skip:m=void 0}=e??{};if(!(r<0)&&(t=c(t),a&&(a=a.map(y=>y.startsWith(".")?y:`.${y}`)),o&&E(t,a,l,m)&&(yield await A(t)),!(r<1||!E(t,void 0,void 0,m))))for await(let y of Deno.readDir(t)){let p=d(t,y.name),{isSymlink:v,isDirectory:$}=y;if(v){if(!n){s&&E(p,a,l,m)&&(yield{path:p,...y});continue}let h=await Deno.realPath(p);f&&(p=h),{isSymlink:v,isDirectory:$}=await Deno.lstat(h)}if(v||$){let h={maxDepth:r-1,includeFiles:i,includeDirs:o,includeSymlinks:s,followSymlinks:n};a!==void 0&&(h.exts=a),l!==void 0&&(h.match=l),m!==void 0&&(h.skip=m),yield*V(p,h)}else i&&E(p,a,l,m)&&(yield{path:p,...y})}}var ue=globalThis.Deno?.build.os==="windows"?"`":"\\";var B=`
|
|
4
4
|
`,J=`\r
|
|
5
5
|
`,xe=globalThis.Deno?.build.os==="windows"?J:B;export{G as a,W as b,Y as c,Z as d,Ft as e,x as f,V as g,wt as h};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as f}from"./chunk-JYNHFD6B.js";import{t}from"./chunk-
|
|
2
|
+
import{a as f}from"./chunk-JYNHFD6B.js";import{t}from"./chunk-MRCBHVSB.js";import{b as a}from"./chunk-DTO2YJWZ.js";import{e as c}from"./chunk-G6NAG2EK.js";var s=c(f());var i=[".eser/manifest.yml",".eser/manifest.yaml",".manifest.yml",".manifest.yaml"],m=async e=>{for(let o of i){let n=t.path.join(e,o);try{let r=await t.fs.readTextFile(n);return s.parse(r)}catch(r){if(r instanceof a)continue;throw r}}return null},u=async e=>{for(let o of i){let n=t.path.join(e,o);try{return await t.fs.stat(n),n}catch{continue}}return null};export{i as a,m as b,u as c};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as w}from"./chunk-JYNHFD6B.js";import{t as s}from"./chunk-
|
|
2
|
+
import{a as w}from"./chunk-JYNHFD6B.js";import{t as s}from"./chunk-MRCBHVSB.js";import{e as h}from"./chunk-G6NAG2EK.js";var u=()=>({version:"0.1.0",phase:"IDLE",spec:null,branch:null,discovery:{answers:[],completed:!1},specState:{path:null,status:"none"},execution:{iteration:0,lastProgress:null,modifiedFiles:[],lastVerification:null,awaitingStatusReport:!1,debt:null,completedTasks:[]},decisions:[],lastCalledAt:null,pendingClear:!1,classification:null}),v=(e,t,r,n)=>({concerns:e,tools:t,providers:r,project:n,maxIterationsBeforeRestart:15,verifyCommand:null,allowGit:!1,command:"npx eser noskills"});var o=h(w(),1);var i=".eser",l=`${i}/.state`,f=`${l}/state.json`,g=`${i}/manifest.yml`,c=`${i}/concerns`,S=`${i}/rules`,p=`${i}/specs`,x=`${i}/workflows`,d=`${l}/specs`,D=`${l}/active.json`,y={eserDir:i,stateDir:l,stateFile:f,manifestFile:g,concernsDir:c,rulesDir:S,specsDir:p,workflowsDir:x,specStatesDir:d,activeFile:D,specDir:e=>`${p}/${e}`,specFile:e=>`${p}/${e}/spec.md`,specStateFile:e=>`${d}/${e}.json`,concernFile:e=>`${c}/${e}.json`,eserGitignore:`${i}/.gitignore`},F=async e=>{let t=`${e}/${f}`;try{let r=await s.fs.readTextFile(t);return JSON.parse(r)}catch{return u()}},P=async(e,t)=>{let r=`${e}/${l}`,n=`${e}/${f}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
|
|
3
3
|
`)},C=async e=>(await F(e)).spec;var E=async(e,t)=>{let r=`${e}/${y.specStateFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return u()}},I=async(e,t,r)=>{let n=`${e}/${d}`,a=`${e}/${y.specStateFile(t)}`;await s.fs.mkdir(n,{recursive:!0}),await s.fs.writeTextFile(a,JSON.stringify(r,null,2)+`
|
|
4
4
|
`)},b=async e=>{let t=`${e}/${d}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let a=n.name.replace(/\.json$/,""),m=await s.fs.readTextFile(`${t}/${n.name}`);r.push({name:a,state:JSON.parse(m)})}}catch{}return r},N=async e=>{let t=`${e}/${g}`;try{let r=await s.fs.readTextFile(t),n=o.parse(r);return n?.noskills===void 0?null:n.noskills}catch{return null}},R=async(e,t)=>{let r=`${e}/${g}`,n;try{let m=await s.fs.readTextFile(r);n=o.parseDocument(m)}catch{n=new o.Document({})}let a=n.createNode(t);a.commentBefore=" noskills orchestrator \u2014 inline comments in this section won't be preserved on next write",n.set("noskills",a),await s.fs.writeTextFile(r,n.toString())},k=async(e,t)=>{let r=`${e}/${y.concernFile(t)}`;try{let n=await s.fs.readTextFile(r);return JSON.parse(n)}catch{return null}},A=async(e,t)=>{let r=`${e}/${c}`,n=`${e}/${y.concernFile(t.id)}`;await s.fs.mkdir(r,{recursive:!0}),await s.fs.writeTextFile(n,JSON.stringify(t,null,2)+`
|
|
5
5
|
`)},O=async e=>{let t=`${e}/${c}`,r=[];try{for await(let n of s.fs.readDir(t))if(n.isFile&&n.name.endsWith(".json")){let a=await s.fs.readTextFile(`${t}/${n.name}`);r.push(JSON.parse(a))}}catch{}return r},_=async e=>{let t=[i,l,d,c,S,p,x];for(let n of t)await s.fs.mkdir(`${e}/${n}`,{recursive:!0});let r=`${e}/${y.eserGitignore}`;try{await s.fs.stat(r)}catch{await s.fs.writeTextFile(r,`# eser toolchain runtime state \u2014 not tracked by git
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{t as n}from"./chunk-
|
|
2
|
+
import{t as n}from"./chunk-MRCBHVSB.js";var o=()=>n.env.get("HOME")??"",s=()=>{let e=n.env.get("SHELL")??"";return e.includes("zsh")?"zsh":e.includes("fish")?"fish":"bash"},l=e=>{let t=o();switch(e){case"zsh":return n.path.join(t,".zshrc");case"bash":return n.path.join(t,".bashrc");case"fish":return n.path.join(t,".config","fish","config.fish")}},c=(e,t)=>{let i=o();switch(e){case"zsh":return n.path.join(i,".zshrc");case"bash":return n.path.join(i,".bashrc");case"fish":return n.path.join(i,".config","fish","completions",`${t}.fish`)}},a=(e,t)=>`eval "$(${t} system completions --shell ${e})"`,h=e=>e==="fish"?"file":"eval",p=(e,t="eser")=>{let i=e??s(),r=h(i);return{shell:i,rcFile:l(i),completionType:r,completionsFile:r==="file"?c(i,t):void 0}},g=["CLAUDE_CODE","CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_SESSION_ID","CURSOR_SESSION","CURSOR","KIRO_SESSION","KIRO","WINDSURF_SESSION","GITHUB_COPILOT"],f=()=>{for(let e of g){let t=n.env.get(e);if(t!==void 0&&t!=="")return"agent"}return"human"};export{s as a,a as b,p as c,f as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as m}from"./chunk-
|
|
2
|
+
import{b as m}from"./chunk-IDMI5OBK.js";import{c as d}from"./chunk-WG6J7DFO.js";import{t as l}from"./chunk-MRCBHVSB.js";var h=c=>{let n=c.split(/\n/).flatMap(i=>i.trim().length>0?[i.trim()]:[]);return n.length>1?n:c.split(/\.\s+|;\s+/).map(i=>i.trim()).filter(i=>i.length>5)},v=c=>{let n=[],i=c.find(t=>t.questionId==="ambition");if(i!==void 0){let t=i.answer,e=t.match(/10[- ]?star[:\s]+(.+)/i),r=e!==null?e[1].trim():t.length>120?t.slice(0,120)+"...":t,p=r.charAt(0).toUpperCase()+r.slice(1);n.push(p)}let o=c.find(t=>t.questionId==="verification");if(o!==void 0){let t=h(o.answer);for(let e of t){let r=e.toLowerCase();r.startsWith("run ")||r.startsWith("check ")?n.push(`Test: ${e}`):n.push(e)}}return n.length===0&&n.push("_Tasks need to be defined before execution. Add tasks manually or run discovery with more detail._"),n},w=(c,n)=>{let i={};if(n===null){for(let o of c.specSections)i[o]=!1;return i}for(let o of c.specSections){let t=o.toLowerCase();t.includes("design")||t.includes("mobile")||t.includes("layout")||t.includes("interaction")?i[o]=n.involvesUI:t.includes("contributor")||t.includes("public api")||t.includes("api surface")?i[o]=n.involvesPublicAPI:t.includes("migration")||t.includes("deprecation")||t.includes("backward")||t.includes("compatibility")?i[o]=n.involvesMigration:t.includes("audit")||t.includes("access control")||t.includes("data handling")?i[o]=n.involvesDataHandling:i[o]=!0}return i},g=(c,n,i,o,t)=>{let e=[];e.push(`# Spec: ${c}`),e.push(""),e.push("## Status: draft"),e.push(""),i.length>0&&(e.push(`## Concerns: ${i.map(s=>s.id).join(", ")}`),e.push("")),e.push("## Discovery Answers"),e.push("");for(let s of n)e.push(`### ${s.questionId}`),e.push(""),e.push(s.answer),e.push("");for(let s of i)if(s.specSections.length>0){let a=w(s,t??null);for(let f of s.specSections)a[f]!==!1&&(e.push(`## ${f} (${s.id})`),e.push(""),e.push("_To be addressed during execution._"),e.push(""))}if(o.length>0){e.push("## Decisions"),e.push(""),e.push("| # | Decision | Choice | Promoted |"),e.push("|---|----------|--------|----------|");for(let s=0;s<o.length;s++){let a=o[s];e.push(`| ${s+1} | ${a.question} | ${a.choice} | ${a.promoted?"yes":"no"} |`)}e.push("")}let r=n.find(s=>s.questionId==="scope_boundary");if(r!==void 0){e.push("## Out of Scope"),e.push("");let s=h(r.answer);for(let a of s)e.push(`- ${a}`);e.push("")}let p=v(n);e.push("## Tasks"),e.push("");for(let s=0;s<p.length;s++)e.push(`- [ ] task-${s+1}: ${p[s]}`);e.push("");let u=n.find(s=>s.questionId==="verification");if(e.push("## Verification"),e.push(""),u!==void 0){let s=h(u.answer);for(let a of s)e.push(`- ${a}`)}else e.push("_To be defined._");return e.push(""),e.join(`
|
|
3
3
|
`)};var k=async(c,n,i)=>{if(n.spec===null)throw new Error("No active spec");let o=`${c}/${d.specDir(n.spec)}`,t=`${c}/${d.specFile(n.spec)}`;await l.fs.mkdir(o,{recursive:!0});let e=g(n.spec,n.discovery.answers,i,n.decisions,n.classification);await l.fs.writeTextFile(t,e);let r=m(n.spec,e),p=`${o}/progress.json`,u={spec:n.spec,status:"draft",tasks:r.tasks.map(s=>({id:s.id,title:s.title,status:"pending"})),decisions:n.decisions.map(s=>({question:s.question,choice:s.choice,promoted:s.promoted})),debt:[],updatedAt:new Date().toISOString()};return await l.fs.writeTextFile(p,JSON.stringify(u,null,2)+`
|
|
4
4
|
`),t};export{k as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as s}from"./chunk-STI6DX7K.js";import{a as t}from"./chunk-DTO2YJWZ.js";var c={fs:!1,fsSync:!1,exec:!1,process:!1,env:!0,stdin:!1,stdout:!1,kv:!0},d=()=>{let e=()=>{throw new t("fs","workerd")};return{readFile:e,readTextFile:e,writeFile:e,writeTextFile:e,exists:e,stat:e,lstat:e,mkdir:e,ensureDir:e,remove:e,readDir:()=>{throw new t("fs","workerd")},copyFile:e,rename:e,makeTempDir:e,realPath:e,watch:e,walk:e,chmod:e}},w=()=>s,
|
|
2
|
+
import{b as s}from"./chunk-STI6DX7K.js";import{a as t}from"./chunk-DTO2YJWZ.js";var c={fs:!1,fsSync:!1,exec:!1,process:!1,env:!0,stdin:!1,stdout:!1,kv:!0},d=()=>{let e=()=>{throw new t("fs","workerd")};return{readFile:e,readTextFile:e,writeFile:e,writeTextFile:e,exists:e,stat:e,lstat:e,mkdir:e,ensureDir:e,remove:e,readDir:()=>{throw new t("fs","workerd")},copyFile:e,rename:e,makeTempDir:e,realPath:e,watch:e,walk:e,chmod:e}},w=()=>s,l=()=>{let e=()=>{throw new t("exec","workerd")};return{spawn:e,exec:e,execJson:e,spawnChild:e}},r=new Map,u=()=>({get(e){return r.get(e)},set(e,o){r.set(e,o)},delete(e){r.delete(e)},has(e){return r.has(e)},toObject(){return Object.fromEntries(r)}}),k=e=>{for(let[o,n]of Object.entries(e))n!=null&&n.constructor===String&&r.set(o,n)},g=()=>{r.clear()},m=()=>{let e=()=>{throw new t("process","workerd")};return{exit:e,setExitCode:e,cwd:e,chdir:e,hostname:e,execPath:e,get args(){throw new t("process","workerd")},get pid(){throw new t("process","workerd")},get stdin(){throw new t("process","workerd")},get stdout(){throw new t("process","workerd")},get stderr(){throw new t("process","workerd")},isTerminal(){return!1},setStdinRaw(){throw new t("process","workerd")}}},v=()=>{let e=d(),o=w(),n=l(),i=u(),a=m();return{name:"workerd",version:"unknown",capabilities:c,fs:e,path:o,exec:n,env:i,process:a}};export{c as a,k as b,g as c,v as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as o}from"./chunk-
|
|
2
|
+
import{a as o}from"./chunk-RGUETQSC.js";var n=o({name:"validate-trailing-whitespace",description:"Remove trailing whitespace from lines",canFix:!0,stacks:[],defaults:{},checkFile(a,i){if(i===void 0)return[];let t=[],r=i.split(`
|
|
3
3
|
`);for(let e=0;e<r.length;e++)/[ \t]+$/.test(r[e])&&t.push({path:a.path,line:e+1,message:"trailing whitespace"});return t},fixFile(a,i){let t=i.replace(/[ \t]+$/gm,"");if(t!==i)return{path:a.path,oldContent:i,newContent:t}}}),c=n.run,u=n.validator,d=n.main;export{n as a,c as b,u as c,d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as S,b as g,d as T,e as m,f,g as y}from"./chunk-
|
|
2
|
+
import{a as S,b as g,d as T,e as m,f,g as y}from"./chunk-455V3AE5.js";import{a as l}from"./chunk-J7YTWK67.js";var k=class{capabilities=["text_generation","streaming"];provider="kiro";modelId;binary;config;constructor(e,r){this.binary=e,this.config=r,this.modelId=r.model}async generateText(e,r){let o=v(this.config,e),c=y(e.messages,e.system);o.push("--prompt",c);let s=g(this.binary,o,{signal:r}),u=m(s.stderr),t=await T(s.stdout,this.modelId),d=await s.waitForExit(),i=await u,a=f("kiro",d.code,i);if(a!==null)throw a;return t}async*streamText(e,r){let o=v(this.config,e),c=y(e.messages,e.system);o.push("--prompt",c);let s=g(this.binary,o,{signal:r}),u=m(s.stderr);try{let t=new TextDecoder,d=s.stdout.getReader(),i="",a=await d.read();for(;a.done!==!0;){i+=t.decode(a.value,{stream:!0});let x=i.split(`
|
|
3
3
|
`);i=x.pop()??"";for(let _ of x){let p=_.trim();if(p.length!==0){try{let A=JSON.parse(p),w=C(A);if(w!==null){yield w;continue}}catch{}yield{kind:"content_delta",textDelta:p+`
|
|
4
4
|
`}}}a=await d.read()}d.releaseLock(),i.trim().length>0&&(yield{kind:"content_delta",textDelta:i.trim()});let E=await s.waitForExit(),b=await u,h=f("kiro",E.code,b);h!==null?yield{kind:"error",error:h}:yield{kind:"message_done",stopReason:"end_turn",usage:{inputTokens:0,outputTokens:0,totalTokens:0}}}catch(t){t instanceof l?yield{kind:"error",error:t}:yield{kind:"error",error:new l(t instanceof Error?t.message:String(t),{provider:"kiro",cause:t instanceof Error?t:void 0})}}}close(){return Promise.resolve()}getRawClient(){return null}},O={provider:"kiro",async createModel(n){let e=await S("kiro",n);return new k(e,n)}},v=(n,e)=>{let r=[];r.push("--output","json"),r.push("--model",n.model),e.maxTokens!==void 0&&r.push("--max-tokens",String(e.maxTokens));let o=n.properties?.args;return o!==void 0&&r.push(...o),r},C=n=>{if(n===null||typeof n!="object")return null;let e=n;if(e.type==="content"||e.type==="text"){let r=e.text??e.content;return r!==void 0?{kind:"content_delta",textDelta:String(r)}:null}return e.type==="done"||e.type==="result"||e.done===!0?{kind:"message_done",stopReason:"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 l(e.error?.message??e.message??"Unknown Kiro error",{provider:"kiro"})}:null};export{k as a,O as b};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as g}from"./chunk-GTHXGAMQ.js";import{e as l}from"./chunk-LCG4SK6K.js";import{a as n}from"./chunk-N7DXBY3O.js";import{t as s}from"./chunk-
|
|
2
|
+
import{a as g}from"./chunk-GTHXGAMQ.js";import{e as l}from"./chunk-LCG4SK6K.js";import{a as n}from"./chunk-N7DXBY3O.js";import{t as s}from"./chunk-MRCBHVSB.js";var a={port:8e3,host:"localhost",hmr:!0,open:!1},f=["@eser/laroux","@eser/laroux-server"],d={minify:!0,sourcemap:!0,target:["es2022"],external:[],serverExternals:f},p={mode:"always",streamMode:"streaming-optimal"},c={webp:80,avif:75,jpeg:85,png:90},C={formats:["webp","original"],widths:[640,768,1024,1280,1920],quality:c,placeholder:"blur"},R={width:1300,height:900},u={enabled:!0,viewport:R,forceInclude:[],forceExclude:[]},m={runtimeBundleEndpoint:"/__runtime_bundle.js",runtimeModuleMapEndpoint:"/__runtime_module_map.json",staticAssetsPrefix:"/dist"},v={isDev:!1,isBuild:!1,isServe:!1,isWatch:!1},S={jsr:{"@eser/logging":`
|
|
3
3
|
// Browser shim for @eser/logging
|
|
4
4
|
const noop = () => {};
|
|
5
5
|
const noopLogger = { debug: noop, info: noop, warn: noop, error: noop };
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-4WQGB7NO.js";import"./chunk-455V3AE5.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as ClaudeCodeModel,b as claudeCodeFactory};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as E,b as A}from"./chunk-
|
|
2
|
+
import{a as E,b as A}from"./chunk-SOBOSRJB.js";import{e as x}from"./chunk-I4C675WP.js";import{a as P,d as $}from"./chunk-3BEX5FYF.js";import{h as j,p as S}from"./chunk-UJ6LH5FY.js";import{f as k,h as b,k as C}from"./chunk-GBM3TZFD.js";import{d,f as R,g as v,k as h}from"./chunk-3SXTMY75.js";import{a as w}from"./chunk-MG65QJY6.js";import{a as c,b as l,c as y}from"./chunk-A6RDYP6R.js";import{t as f}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var I=r=>{let t=j(r);if(t.kind==="repo")return t},H=r=>P(async t=>{try{let{specifier:n}=r,e=r.recipePath??"recipe.json",s=await S(n.owner,n.repo,n.ref,e),o=r.cwd;r.projectName!==void 0&&(o=`${r.cwd}/${r.projectName}`,await f.fs.mkdir(o,{recursive:!0}));let a={...r.variables};r.projectName!==void 0&&a.project_name===void 0&&(a.project_name=r.projectName);let m=`https://raw.githubusercontent.com/${n.owner}/${n.repo}/${n.ref}`,i=await x(s,{cwd:o,registryUrl:m,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),u=await E(o),g=A(s,u),O=r.dryRun?"Would write":"Cloned";t.out.writeln(v(`\u2713 ${O} ${i.written.length} file(s) from ${s.name}`));for(let p of i.written)t.out.writeln(` \u2192 ${p}`);if(i.postInstallRan.length>0){t.out.writeln(d(`
|
|
3
3
|
Post-install:`));for(let p of i.postInstallRan)t.out.writeln(d(` \u2713 ${p}`))}if(g.instructions.length>0){t.out.writeln(d(`
|
|
4
4
|
Dependencies:`));for(let p of g.instructions)t.out.writeln(d(` Run: ${p}`))}return c({recipe:s,result:i,depInfo:g,targetDir:o})}catch(n){let e=n instanceof Error?n.message:String(n);return l({_tag:"ApplyError",message:e})}});var J=async r=>{let t=w(r??[],{string:["recipe","name","var"],boolean:["force","dry-run","skip-existing","verbose"],collect:["var"],alias:{p:"name"}}),n=t._[0],e=k({renderer:C.ansi(),sink:b.stdout()});if(n===void 0)return e.writeln("Usage: eser kit clone <specifier> [options]"),e.writeln(),e.writeln("Specifier formats:"),e.writeln(" owner/repo GitHub repo (default branch)"),e.writeln(" owner/repo#ref GitHub repo at specific tag/branch"),e.writeln(),e.writeln("Options:"),e.writeln(" --recipe <path> Path to recipe.json (default: recipe.json)"),e.writeln(" --name, -p <dir> Target directory"),e.writeln(" --var key=value Template variable (repeatable)"),e.writeln(" --force Overwrite existing files"),e.writeln(" --dry-run Preview without writing"),await e.close(),c(void 0);let s=I(n);if(s===void 0)return e.writeln(R(`Invalid specifier: '${n}'. Use format: owner/repo or gh:owner/repo#ref`)),await e.close(),l({exitCode:1});let o={};for(let m of t.var){let[i,...u]=String(m).split("=");i!==void 0&&i!==""&&(o[i]=u.join("="))}e.writeln(h(`
|
|
5
5
|
Cloning from ${s.owner}/${s.repo}@${s.ref}...
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-7ZYDAZBD.js";import"./chunk-
|
|
2
|
+
import"./chunk-7ZYDAZBD.js";import"./chunk-46ZWBKIW.js";import{a as w,b as x}from"./chunk-GE3LJ6QM.js";import{a as h}from"./chunk-BNQAZLIQ.js";import{f,h as g,k as p}from"./chunk-GBM3TZFD.js";import{c as n,d,f as u}from"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import{d as o}from"./chunk-PVPMHMKP.js";import"./chunk-CEYKWASA.js";import"./chunk-KKBIUT5L.js";import"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as l,b as m}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 b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
|
|
3
3
|
|
|
4
4
|
Format: type(scope): description
|
|
5
5
|
Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
|
|
6
6
|
Max 72 characters. One line only. No body. No quotes. No backticks.
|
|
7
7
|
|
|
8
8
|
Example output:
|
|
9
|
-
feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-
|
|
9
|
+
feat(ai): add streaming support for Claude Code adapter`,v=async i=>{let e=f({renderer:p.ansi(),sink:g.stdout()});try{let t=await o`git diff --cached`.noThrow().text();if(t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0)return e.writeln(d("No changes detected (nothing staged or modified).")),await e.close(),l(void 0);let s=await y(t),r=s.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/`/g,"\\`").replace(/\$/g,"\\$").replace(/!/g,"\\!");return e.writeln(""),e.writeln(n("Plain Format:")),e.writeln("```"),e.writeln(s),e.writeln("```"),e.writeln(""),e.writeln(n("Shell Command:")),e.writeln("```"),e.writeln(`git commit -m "${r}"`),e.writeln("```"),e.writeln(""),e.writeln(n("Copy to Clipboard:")),e.writeln("```"),e.writeln(`echo "${r}" | pbcopy`),e.writeln("```"),await e.close(),l(void 0)}catch(t){let s=t instanceof Error?t.message:String(t);return e.writeln(u(`Error: ${s}`)),await e.close(),m({message:s,exitCode:1})}},y=async(i,e)=>{let s=await(await import("./mod-YX3JRMSI.js")).defaultFactories(),r=new w({factories:s}),a=e;if(a===void 0)try{await o`which claude`.noThrow().code()===0&&(a="claude-code")}catch{}a===void 0&&(a="anthropic"),await r.addModel("default",{provider:a,model:"default"});let c=r.getDefault();if(c===null)throw new Error("No AI model available for commit message generation");let k=await c.generateText({system:b,messages:[h("user",`Generate a commit message for this diff:
|
|
10
10
|
|
|
11
11
|
${i}`)],maxTokens:256});return await r.close(),x(k).trim()},O={name:"ai-commitmsg",description:"Generate commit message from git diff using AI",run:async i=>{try{let e=i.provider,t=await o`git diff --cached`.noThrow().text();return t.length===0&&(t=await o`git diff`.noThrow().text()),t.length===0?{name:"ai-commitmsg",passed:!0,issues:[],mutations:[],stats:{skipped:1}}:{name:"ai-commitmsg",passed:!0,issues:[{message:`Suggested: ${await y(t,e)}`}],mutations:[],stats:{generated:1}}}catch(e){return{name:"ai-commitmsg",passed:!1,issues:[{message:e instanceof Error?e.message:String(e)}],mutations:[],stats:{errors:1}}}}};export{y as generateCommitMessage,v as main,O as workflowTool};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as C}from"./chunk-
|
|
2
|
+
import{a as C}from"./chunk-N4HITOTN.js";import{a as y,b as P}from"./chunk-LNNNLUZT.js";import{j as g,k as b,l as A,m as x}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as p,h as m,k as w}from"./chunk-GBM3TZFD.js";import{c,d as o,f as u,g as v}from"./chunk-3SXTMY75.js";import{a,b as d}from"./chunk-A6RDYP6R.js";import{t as f}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var q=async r=>{let e=r?.[0];if(e==="add")return await $(r?.slice(1));if(e==="remove")return await M(r?.slice(1));if(e==="list")return await I();let i=await g(f.process.cwd()),n=P(i),s=p({renderer:w.ansi(),sink:m.stdout()});return s.writeln(`Usage: ${n} concern <add <id> | remove <id> | list>`),await s.close(),a(void 0)},$=async r=>{let e=p({renderer:w.ansi(),sink:m.stdout()}),i=f.process.cwd(),n=r?.[0],s=await g(i);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),c(y("concern add open-source",s))),await e.close(),d({exitCode:1});let t=await A(i,n);if(t===null&&(t=(await C()).find(h=>h.id===n)??null,t!==null&&await x(i,t)),t===null){let k=await C();return e.writeln(u(`Unknown concern: ${n}`)),k.length>0&&e.writeln(o(` Available: ${k.map(h=>h.id).join(", ")}`)),await e.close(),d({exitCode:1})}if(s===null)return e.writeln(u("noskills not initialized.")),await e.close(),d({exitCode:1});if(s.concerns.includes(n))return e.writeln(o(`Concern "${n}" is already active.`)),await e.close(),a(void 0);let l={...s,concerns:[...s.concerns,n]};return await b(i,l),e.writeln(v("\u2714")," Activated concern: ",c(n)),e.writeln(o(` ${t.description}`)),await e.close(),a(void 0)},M=async r=>{let e=p({renderer:w.ansi(),sink:m.stdout()}),i=f.process.cwd(),n=r?.[0],s=await g(i);if(n===void 0||n.length===0)return e.writeln(u("Please provide a concern ID: "),c(y("concern remove move-fast",s))),await e.close(),d({exitCode:1});if(s===null)return e.writeln(u("noskills not initialized.")),await e.close(),d({exitCode:1});if(!s.concerns.includes(n))return e.writeln(o(`Concern "${n}" is not active.`)),await e.close(),a(void 0);let t={...s,concerns:s.concerns.filter(l=>l!==n)};return await b(i,t),e.writeln(v("\u2714")," Deactivated concern: ",c(n)),await e.close(),a(void 0)},I=async()=>{let r=p({renderer:w.ansi(),sink:m.stdout()}),e=f.process.cwd(),i=await g(e),n=await C(),s=i?.concerns??[];if(r.writeln(c("Concerns")),r.writeln(""),n.length===0)r.writeln(o(" No concerns defined."));else for(let t of n){let l=s.includes(t.id);r.writeln(" ",l?v("\u25CF"):o("\u25CB")," ",l?c(t.id):o(t.id),o(` ${t.description.slice(0,60)}...`))}return await r.close(),a(void 0)};export{q as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as P,b as v,c as x,d as O}from"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{d as h,e as
|
|
2
|
+
import{a as P,b as v,c as x,d as O}from"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{d as h,e as p,f as g,g as f,i as F,j as w,k,n as b}from"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{a as y}from"./chunk-CDPSH56U.js";import{b as d,d as D}from"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var S={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!0},R=()=>{let n=t=>({isFile:t.isFile,isDirectory:t.isDirectory,isSymlink:t.isSymlink,size:t.size,mtime:t.mtime,atime:t.atime,birthtime:t.birthtime});return{async readFile(t,e){try{return await Deno.readFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async readTextFile(t,e){try{return await Deno.readTextFile(t,{signal:e?.signal})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async writeFile(t,e,r){await Deno.writeFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async writeTextFile(t,e,r){await Deno.writeTextFile(t,e,{signal:r?.signal,mode:r?.mode,create:r?.create??!0,append:r?.append??!1})},async exists(t){try{return await Deno.stat(t),!0}catch(e){if(e instanceof Deno.errors.NotFound)return!1;throw e}},async stat(t){try{let e=await Deno.stat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async lstat(t){try{let e=await Deno.lstat(t);return n(e)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async mkdir(t,e){await Deno.mkdir(t,{recursive:e?.recursive??!1,mode:e?.mode})},async ensureDir(t){try{await Deno.mkdir(t,{recursive:!0})}catch(e){if(!(e instanceof Deno.errors.AlreadyExists))throw e}},async remove(t,e){try{await Deno.remove(t,{recursive:e?.recursive??!1})}catch(r){throw r instanceof Deno.errors.NotFound?new d(t):r}},async*readDir(t){try{for await(let e of Deno.readDir(t))yield{name:e.name,isFile:e.isFile,isDirectory:e.isDirectory,isSymlink:e.isSymlink}}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},async copyFile(t,e){await Deno.copyFile(t,e)},async rename(t,e){await Deno.rename(t,e)},async makeTempDir(t){return await Deno.makeTempDir({dir:t?.dir,prefix:t?.prefix,suffix:t?.suffix})},async realPath(t){try{return await Deno.realPath(t)}catch(e){throw e instanceof Deno.errors.NotFound?new d(t):e}},watch(t,e){let r=e?.recursive??!0,a=Deno.watchFs(t,{recursive:r}),s=c=>({kind:c.kind,paths:c.paths,flag:c.flag});return{close:()=>a.close(),[Symbol.asyncIterator]:async function*(){for await(let c of a)yield s(c)}}},async*walk(t,e){let r=e?.includeDirs??!0,a=e?.includeFiles??!0,s=e?.exts,c=e?.skip,o=async function*(l){for await(let i of Deno.readDir(l)){let m=w(l,i.name);if(!c?.some(u=>u.test(m))){if(i.isDirectory)r&&(yield{path:m,name:i.name,isFile:!1,isDirectory:!0,isSymlink:i.isSymlink}),yield*o(m);else if(i.isFile||i.isSymlink){if(!a||s&&!s.some(u=>i.name.endsWith(u.startsWith(".")?u:`.${u}`)))continue;yield{path:m,name:i.name,isFile:i.isFile,isDirectory:!1,isSymlink:i.isSymlink}}}}};yield*o(t)},async chmod(t,e){let{chmod:r}=await import("./unstable_chmod-GDQI7NKH.js");await r(t,e)}}},E=()=>({join:w,resolve:b,dirname:f,basename:h,extname:P,normalize:k,isAbsolute:F,relative:O,parse:x,format:v,sep:g,delimiter:p}),T=()=>({async spawn(n,t=[],e){let r=y(e),s=await new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).output();return{success:s.success,code:s.code,stdout:r.stdout==="piped"?s.stdout:new Uint8Array,stderr:r.stderr==="piped"?s.stderr:new Uint8Array}},async exec(n,t=[],e){let r=await this.spawn(n,t,e);if(!r.success){let a=new TextDecoder().decode(r.stderr);throw new D(n,r.code,a)}return new TextDecoder().decode(r.stdout).trim()},async execJson(n,t=[],e){let r=await this.exec(n,t,e);return JSON.parse(r)},spawnChild(n,t=[],e){let r=y(e),s=new Deno.Command(n,{args:t,cwd:e?.cwd,env:e?.env,stdin:r.stdin,stdout:r.stdout,stderr:r.stderr,signal:e?.signal}).spawn(),c=(o,l)=>l!=="piped"||!o?Promise.resolve(new Uint8Array):new Response(o).arrayBuffer().then(i=>new Uint8Array(i));return{pid:s.pid,stdin:r.stdin==="piped"?s.stdin:null,stdout:r.stdout==="piped"?s.stdout:null,stderr:r.stderr==="piped"?s.stderr:null,status:s.status.then(o=>({success:o.success,code:o.code,signal:o.signal??void 0})),output:async()=>{let o=r.stdout==="piped"?s.stdout:null,l=r.stderr==="piped"?s.stderr:null,[i,m,u]=await Promise.all([s.status,c(o,r.stdout),c(l,r.stderr)]);return{success:i.success,code:i.code,stdout:m,stderr:u}},kill:o=>{s.kill(o)}}}}),A=()=>({get(n){return Deno.env.get(n)},set(n,t){Deno.env.set(n,t)},delete(n){Deno.env.delete(n)},has(n){return Deno.env.get(n)!==void 0},toObject(){return Deno.env.toObject()}}),I=()=>({exit(n){Deno.exit(n)},setExitCode(n){Deno.exitCode=n},cwd(){return Deno.cwd()},chdir(n){Deno.chdir(n)},hostname(){return Deno.hostname()},execPath(){return Deno.execPath()},args:Deno.args,pid:Deno.pid,stdin:Deno.stdin.readable,stdout:Deno.stdout.writable,stderr:Deno.stderr.writable,isTerminal(n){try{switch(n){case"stdin":return Deno.stdin.isTerminal();case"stdout":return Deno.stdout.isTerminal();case"stderr":return Deno.stderr.isTerminal()}}catch{return!1}},setStdinRaw(n){Deno.stdin.setRaw(n)}}),U=()=>{let n=R(),t=E(),e=T(),r=A(),a=I();return{name:"deno",version:Deno.version.deno,capabilities:S,fs:n,path:t,exec:e,env:r,process:a}};export{S as DENO_CAPABILITIES,U as createDenoRuntime};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as a,h as l,k as i}from"./chunk-
|
|
2
|
+
import{f as a,h as l,k as i}from"./chunk-GBM3TZFD.js";import{k as n}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as t}from"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as o}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 h=["trace","debug","info","warn","error","fatal"],k=async m=>{let{flags:e}=t(m??[],[{name:"port",short:"p",type:"number",default:8e3,description:"Server port"},{name:"no-hmr",type:"boolean",description:"Disable HMR"},{name:"log-level",type:"string",default:"info",description:"Log level"},{name:"open",short:"o",type:"boolean",description:"Open browser"}]),r=a({renderer:i.ansi(),sink:l.stdout()});r.writeln(n(`
|
|
3
3
|
\u26A1 Starting development server...
|
|
4
|
-
`));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-
|
|
4
|
+
`));let p=e.port,s=e["log-level"]??"info",c=!e["no-hmr"],g=e.open??!1,d=h.includes(s.toLowerCase())?s.toLowerCase():"info",[{startServer:u},{reactRenderer:L,reactHtmlShellBuilder:f},{reactPlugin:v},{createTailwindPlugin:b}]=await Promise.all([import("./main-JTYNMHNL.js"),import("./mod-NCF6OSXO.js"),import("./mod-SA3J2VR5.js"),import("./mod-JZNE2HH6.js")]);return await r.close(),await u({mode:"dev",port:p,logLevel:d,hmr:c,open:g,renderer:L,htmlShell:f,frameworkPlugin:v,cssPlugin:b({globalCssPath:"src/app/styles/global.css"})}),o(void 0)};export{k as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as C,d as U}from"./chunk-
|
|
2
|
+
import{a as C,d as U}from"./chunk-P74JF7XR.js";import{a as E}from"./chunk-UESOCN2G.js";import{a as S}from"./chunk-LNNNLUZT.js";import{d as f,e as h,j as g}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{f as d,h as w,k as u}from"./chunk-GBM3TZFD.js";import{c as n,d as i,f as l,g as m}from"./chunk-3SXTMY75.js";import{a as o,b as p}from"./chunk-A6RDYP6R.js";import{t as c}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var G=async y=>{let e=d({renderer:u.ansi(),sink:w.stdout()}),s=c.process.cwd(),t=await f(s),$=await g(s);if(t.phase!=="EXECUTING")return e.writeln(l(`Cannot complete in phase: ${t.phase}`)),e.writeln(i("Only EXECUTING phase can transition to DONE.")),await e.close(),p({exitCode:1});let r=E(t,"DONE");if(await h(s,r),r.spec!==null&&(await C(s,r.spec,"done"),await U(s,r.spec,"done")),e.writeln(m("\u2714")," Spec completed!"),e.writeln(""),e.writeln(" Spec: ",n(t.spec??"unknown")),e.writeln(` Iterations: ${t.execution.iteration}`),e.writeln(` Decisions: ${t.decisions.length}`),t.decisions.length>0){let a=t.decisions.filter(k=>k.promoted);a.length>0&&e.writeln(i(` Promoted to rules: ${a.length}`))}return e.writeln(""),e.writeln("Start a new spec with: ",n(`${S('spec new "..."',$)}`)),await e.close(),o(void 0)};export{G as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b,c,d,e,f,g,h}from"./chunk-
|
|
2
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-HVLKXRPA.js";import"./chunk-NBA6EFWU.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as DEFAULT_EXCLUDES,g as applyMutations,e as isBinaryBytes,d as loadBytes,c as loadContent,f as matchesAnyPattern,b as walkSourceFiles,h as writeMutations};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as l}from"./chunk-
|
|
2
|
+
import{a as l}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"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b as o,f as r,i}from"./chunk-3SXTMY75.js";import{g as t}from"./chunk-A6RDYP6R.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var c=l(),m=()=>{c.writeln(i("\u2139"),o(` eser codebase gh \u2014 GitHub operations
|
|
3
3
|
`)),console.log("Subcommands:"),console.log(" contributors Update contributor list in README.md"),console.log(" release-notes Sync CHANGELOG to GitHub Releases"),console.log(" release-tag Create and push release git tags"),console.log(`
|
|
4
|
-
Run 'eser codebase gh <subcommand> --help' for details.`)},w=async u=>{let n=u??[],s=n[0],e=n.slice(1);if(s===void 0||s==="--help"||s==="-h")return m(),t.ok(void 0);switch(s){case"contributors":return await(await import("./gh-contributors-
|
|
4
|
+
Run 'eser codebase gh <subcommand> --help' for details.`)},w=async u=>{let n=u??[],s=n[0],e=n.slice(1);if(s===void 0||s==="--help"||s==="-h")return m(),t.ok(void 0);switch(s){case"contributors":return await(await import("./gh-contributors-X7BW57DD.js")).main(e);case"release-notes":return await(await import("./release-notes-GOUHBQ2F.js")).main(e);case"release-tag":return await(await import("./release-tag-5WNEA4HM.js")).main(e);default:return c.writeln(r("\u2717"),o(` Unknown gh subcommand: ${s}
|
|
5
5
|
`)),m(),t.fail({exitCode:1})}};export{w as main};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import"./chunk-SOSF762G.js";import"./chunk-
|
|
2
|
+
import"./chunk-SOSF762G.js";import"./chunk-JOTAKQMZ.js";import{a as A}from"./chunk-2VEVVX6U.js";import{a as y,b as $}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 c,f as C,g,i as x}from"./chunk-3SXTMY75.js";import{e as l}from"./chunk-PVPMHMKP.js";import"./chunk-PWLF3WXM.js";import"./chunk-KKBIUT5L.js";import"./chunk-SQINSLNL.js";import{a as w}from"./chunk-MG65QJY6.js";import{g as a}from"./chunk-A6RDYP6R.js";import"./chunk-2BOCLC67.js";import"./chunk-N7DXBY3O.js";import{n as b}from"./chunk-7ATUODBM.js";import"./chunk-AP72BKVG.js";import{v as p}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var d=y(),m="<!-- CONTRIBUTORS:START -->",u="<!-- CONTRIBUTORS:END -->",O=async()=>{let t=await l.exec`gh repo view --json owner,name`.text(),e=JSON.parse(t);return{owner:e.owner.login,name:e.name}},U=async(t,e)=>{let n=await l.exec`gh api repos/${t}/${e}/contributors --paginate`.text();return JSON.parse(n).filter(o=>!o.login.includes("[bot]"))},M=(t,e=8)=>{if(t.length===0)return`${m}
|
|
3
3
|
${u}`;let n=[];for(let r=0;r<t.length;r+=e){let i=t.slice(r,r+e).map(s=>` <td align="center"><a href="${s.html_url}"><img src="${s.avatar_url}?s=80" width="80" /><br /><sub>${s.login}</sub></a></td>`);n.push(` <tr>
|
|
4
4
|
${i.join(`
|
|
5
5
|
`)}
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{f as P,h as R,k as F}from"./chunk-
|
|
2
|
+
import{f as P,h as R,k as F}from"./chunk-GBM3TZFD.js";import{b as t,c as E,d as s,f as o,g as x,k as v}from"./chunk-3SXTMY75.js";import"./chunk-PWLF3WXM.js";import{a as T}from"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as A,b as i,f as $}from"./chunk-A6RDYP6R.js";import{t as b}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var S=["minimal","blog","dashboard","docs"],V=async O=>{let{positional:N,flags:m}=T(O??[],[{name:"template",short:"t",type:"string",default:"minimal",description:"Project template"},{name:"force",short:"f",type:"boolean",description:"Overwrite"},{name:"no-git",type:"boolean",description:"Skip git"},{name:"no-install",type:"boolean",description:"Skip install"}]),r=N[0]??"my-laroux-app",l=m.template,j=m.force,L=m["no-git"],n=F.ansi(),e=P({renderer:n,sink:R.stdout()});if(!S.includes(l))return await e.close(),i({message:`${n.render([o(`
|
|
3
3
|
Error: Invalid template "${l}"`)])}
|
|
4
4
|
Available templates: ${S.join(", ")}`,exitCode:1});e.writeln(v(`
|
|
5
5
|
\u2728 Creating new laroux.js project in ./${r}
|
|
6
6
|
`)),e.writeln(s(` Template: ${l}`));let c="eser",p=`laroux-template-${l}`,k="main",d=`${b.process.cwd()}/${r}`;try{await b.fs.mkdir(d,{recursive:!0})}catch{return await e.close(),i({message:n.render([o(`
|
|
7
7
|
Could not create directory: ${d}`)]),exitCode:1})}e.writeln(s(` Fetching from gh:${c}/${p}...
|
|
8
|
-
`));try{let a=await import("./registry-fetcher-
|
|
9
|
-
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-
|
|
8
|
+
`));try{let a=await import("./registry-fetcher-76ISLGRR.js"),u=await import("./recipe-applier-6QZYAZ57.js"),f=await $(()=>a.fetchRecipeFromRepo(c,p,k,"recipe.json"),()=>{});if(f._tag==="Ok"&&f.value!==void 0){let g=`https://raw.githubusercontent.com/${c}/${p}/${k}`,w=await u.applyRecipe(f.value,{cwd:d,registryUrl:g,force:j,variables:{project_name:r}});e.writeln(x(`
|
|
9
|
+
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-5WXRQGLS.js"),w=`gh:${c}/${p}`,y=await $(()=>g.scaffold({specifier:w,targetDir:r,force:j,skipPostInstall:L,interactive:!0}),h=>({message:h.message}));if(y._tag==="Fail")return await e.close(),i({message:n.render([o(`
|
|
10
10
|
Scaffolding failed: ${y.error.message}`)]),exitCode:1});let C=y.value;if(e.writeln(x(`
|
|
11
11
|
\u{1F389} Project created successfully!`)),Object.keys(C.variables).length>0){e.writeln(t(`
|
|
12
12
|
Variables applied:`));for(let[h,_]of Object.entries(C.variables))e.writeln(t(" "),s(h),t(`: ${_}`))}}}catch(a){let u=a instanceof Error?a.message:String(a);return await e.close(),i({message:n.render([o(`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as B,b as G}from"./chunk-
|
|
2
|
+
import{a as B,b as G}from"./chunk-6QC7ILI5.js";import"./chunk-XU5SILYR.js";import{b as W}from"./chunk-F5BPXG5L.js";import{a as J}from"./chunk-N4HITOTN.js";import{a as v}from"./chunk-LNNNLUZT.js";import{a as R,b as E,e as M,j as N,k as O,m as F,o as L,q as z}from"./chunk-WG6J7DFO.js";import"./chunk-7ZYDAZBD.js";import{a as b,b as D,e as I,f as A,g as T,h as r,i as p}from"./chunk-JOTAKQMZ.js";import"./chunk-JYNHFD6B.js";import{a as x}from"./chunk-46ZWBKIW.js";import"./chunk-GE3LJ6QM.js";import"./chunk-BNQAZLIQ.js";import"./chunk-GBM3TZFD.js";import"./chunk-3SXTMY75.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-CEYKWASA.js";import"./chunk-KKBIUT5L.js";import"./chunk-SQINSLNL.js";import"./chunk-MG65QJY6.js";import{a as y}from"./chunk-A6RDYP6R.js";import{t as l}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var U=x;var X=async t=>{try{return await l.fs.stat(t),!0}catch{return!1}},Y=[{id:"claude-code",paths:["CLAUDE.md",".claude"]},{id:"cursor",paths:[".cursorrules",".cursor"]},{id:"kiro",paths:[".kiro"]},{id:"copilot",paths:[".github/copilot-instructions.md"]},{id:"windsurf",paths:[".windsurfrules"]}],_=async t=>{let e=[];for(let i of Y)for(let s of i.paths)if(await X(`${t}/${s}`)){e.push(i.id);break}return e};var o=async t=>{try{return await l.fs.stat(t),!0}catch{return!1}},q=async(t,e)=>{try{let i=await l.fs.readTextFile(t);return JSON.parse(i)[e]??null}catch{return null}},ee=async t=>{let e=[];return(await o(`${t}/package.json`)||await o(`${t}/deno.json`))&&e.push("typescript"),await o(`${t}/go.mod`)&&e.push("go"),await o(`${t}/Cargo.toml`)&&e.push("rust"),(await o(`${t}/pyproject.toml`)||await o(`${t}/setup.py`))&&e.push("python"),e},te=async t=>{let e=[],i=await q(`${t}/package.json`,"dependencies");return i!==null&&("react"in i&&e.push("react"),"vue"in i&&e.push("vue"),"svelte"in i&&e.push("svelte"),"next"in i&&e.push("nextjs"),"express"in i&&e.push("express"),"hono"in i&&e.push("hono")),e},se=async t=>{let e=[];return await o(`${t}/.github/workflows`)&&e.push("github-actions"),await o(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await o(`${t}/Jenkinsfile`)&&e.push("jenkins"),await o(`${t}/.circleci`)&&e.push("circleci"),e},ne=async t=>{if(await o(`${t}/deno.json`))return"deno";let e=await q(`${t}/package.json`,"devDependencies");if(e!==null){if("vitest"in e)return"vitest";if("jest"in e)return"jest";if("playwright"in e)return"playwright"}return null},H=async t=>{let[e,i,s,g]=await Promise.all([ee(t),te(t),se(t),ne(t)]);return{languages:e,frameworks:i,ci:s,testRunner:g}};var ke=async t=>{let e=l.process.cwd(),i=B(t),s=D({target:i==="agent"?"non-interactive":"interactive"}),g=G(t),$=re(g,"--concerns"),K=g.includes("--non-interactive")||i==="agent";if(await z(e)){let n=await N(e);return r.warn(s,"noskills is already initialized in this project."),r.info(s,`Run \`${v("sync",n)}\` to regenerate tool files.`),y(void 0)}A(s,"noskills init");let k=p(s,"Scanning project...");k.start();let d=await H(e);k.succeed("Project scanned");for(let n of d.languages)r.step(s,` ${n}`);for(let n of d.frameworks)r.step(s,` ${n}`);for(let n of d.ci)r.step(s,` ${n}`);d.testRunner!==null&&r.step(s,` test runner: ${d.testRunner}`);let j=p(s,"Detecting coding tools...");j.start();let u=await _(e);j.succeed(`${u.length} coding tool(s) detected`);for(let n of u)r.step(s,` ${n}`);let P=p(s,"Detecting AI providers...");P.start();let m=(await U()).filter(n=>n.available).map(n=>n.name);P.succeed(`${m.length} provider(s) detected`);let h=await J(),c;if($!==null){let n=h.map(a=>a.id);c=$.filter(a=>n.includes(a)).sort((a,f)=>n.indexOf(a)-n.indexOf(f))}else if(K)c=[];else{let n=h.map(f=>({value:f.id,label:f.name,hint:f.description.slice(0,60)})),a=await I(s,{message:"What kind of project is this? (space to toggle, enter to confirm)",options:n});c=b(a)?[]:[...a]}c.length>0?r.success(s,`Concerns: ${c.join(", ")}`):r.info(s,"No concerns selected. Add later with `concern add <id>`.");let C=oe(),S=p(s,"Initializing...");S.start(),await L(e);let Q=h.filter(n=>c.includes(n.id));for(let n of Q)await F(e,n);let w={...E(c,u,m,d),command:C};await O(e,w);let V=R();if(await M(e,V),S.succeed("Scaffolded `.eser/`"),u.length>0){let n=p(s,"Syncing tool files...");n.start();let a=await W(e,u,w);n.succeed(`Synced ${a.length} tool(s)`)}return r.success(s,`Done. ${u.length} tool(s), ${m.length} provider(s), ${c.length} concern(s).`),r.info(s,`Command prefix: ${C}`),T(s,`Start a spec with: ${v('spec new "..."',w)}`),y(void 0)},re=(t,e)=>{if(t===void 0)return null;for(let i of t)if(i.startsWith(`${e}=`))return i.slice(e.length+1).split(",").map(s=>s.trim()).filter(Boolean);return null},oe=()=>{try{let e=l.process.args.join(" ");if(e.includes("jsr:@eser/noskills"))return"deno run jsr:@eser/noskills";if(e.includes("noskills/main.ts"))return"deno run --allow-all ./pkg/@eser/noskills/main.ts";if(e.includes("eser")&&e.includes("nos")&&!e.includes("noskills"))return"eser nos";if(e.includes("eser")&&e.includes("noskills"))return"eser noskills"}catch{}return"npx eser noskills"};export{ke as main};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{b as E}from"./chunk-
|
|
2
|
+
import{b as E}from"./chunk-W3RVRCUB.js";import"./chunk-JYNHFD6B.js";import"./chunk-WF6JNPZS.js";import"./chunk-J2Z7NG2X.js";import"./chunk-YTF3BAQS.js";import"./chunk-S7S2I2K5.js";import"./chunk-NBA6EFWU.js";import{f as A,h as C,k as H}from"./chunk-GBM3TZFD.js";import"./chunk-7DPLGQHN.js";import{b,c as O,d as l,f as k,g as w,h as y,i as j}from"./chunk-3SXTMY75.js";import{a as $}from"./chunk-MG65QJY6.js";import{g as r}from"./chunk-A6RDYP6R.js";import{v as e}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var M={precommit:{hookName:"pre-commit",args:""},commitmsg:{hookName:"commit-msg",args:'-- "$1"'},prepush:{hookName:"pre-push",args:""}},P="# @eser managed hook",I=async(i,n)=>{let s=await e.getCliCommand({command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"}),t=n.length>0?` ${n}`:"",o=`${s} workflows run -e ${i}${t}`;return["#!/bin/sh",`${P} \u2014 generated by \`eser codebase install\``,"# Do not edit. Re-run `eser codebase install` to update.","",o,""].join(`
|
|
3
3
|
`)},S=async()=>{try{let t=(await e.runtime.exec.exec("git",["rev-parse","--git-dir"])).trim();if(t.length>0)return t}catch{}let i=e.runtime.process.cwd(),n=e.runtime.path.join(i,".git");try{if((await e.runtime.fs.stat(n)).isDirectory)return n}catch{}return null},G=i=>{let n=i.workflows;if(!Array.isArray(n))return[];let s=new Set;for(let t of n)if(Array.isArray(t.on))for(let o of t.on)typeof o=="string"&&s.add(o);return[...s]},T=H.ansi(),U=async i=>{let n=$(i??[],{boolean:["force","dry-run","help"],alias:{h:"help",f:"force",n:"dry-run"}});if(n.help)return console.log("eser codebase install \u2014 Install git hooks from .eser/manifest.yml"),console.log(""),console.log("Flags:"),console.log(" --force, -f Overwrite non-managed hooks"),console.log(" --dry-run, -n Show what would happen without writing"),console.log(" --help, -h Show this help"),r.ok(void 0);let s=A({renderer:T,sink:C.stdout()}),t=n.force,o=n["dry-run"],d=await S();if(d===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let p=e.runtime.path.join(d,"hooks"),g=e.runtime.process.cwd(),a=await E(g);if(a===null)return s.writeln(k("Error: no .eser/manifest.yml found in current directory")),await s.close(),r.fail({exitCode:1});let c=G(a);if(c.length===0)return s.writeln(y("No workflow events found \u2014 nothing to install.")),await s.close(),r.ok(void 0);o||await e.runtime.fs.ensureDir(p);let f=0,v=0,u=0;for(let N of c){let F=M[N];if(F===void 0){s.writeln(l(` skip ${N} (unknown event, no hook mapping)`));continue}let{hookName:m,args:K}=F,D=e.runtime.path.join(p,m),_=await I(N,K),R=!1,x=!1;try{let q=await e.runtime.fs.readTextFile(D);R=!0,x=q.includes(P)}catch{}if(o){R?x?s.writeln(j(` would update ${m} (managed)`)):t?s.writeln(y(` would overwrite ${m} (--force)`)):s.writeln(y(` would skip ${m} (user hook; use --force to overwrite)`)):s.writeln(j(` would create ${m}`));continue}if(R&&!x&&!t){s.writeln(y(` skip ${m} \u2014 user hook exists (use --force to overwrite)`)),v++;continue}await e.runtime.fs.writeTextFile(D,_);try{await e.runtime.fs.chmod(D,493)}catch{}R&&x?(s.writeln(w(` updated ${m}`)),u++):(s.writeln(w(` installed ${m}`)),f++)}s.writeln();let h=[];return f>0&&h.push(`${f} installed`),u>0&&h.push(`${u} updated`),v>0&&h.push(`${v} skipped`),o?s.writeln(l("(dry run \u2014 no changes made)")):h.length>0?s.writeln(w(`Done: ${h.join(", ")}.`)):s.writeln(l("Nothing to do.")),await s.close(),r.ok(void 0)},W=async i=>{if($(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase uninstall \u2014 Remove managed git hooks"),r.ok(void 0);let s=A({renderer:T,sink:C.stdout()}),t=await S();if(t===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let o=e.runtime.path.join(t,"hooks"),d=0,p=Object.values(M).map(a=>a.hookName),g=[...new Set(p)];for(let a of g){let c=e.runtime.path.join(o,a);try{(await e.runtime.fs.readTextFile(c)).includes(P)&&(await e.runtime.fs.remove(c),s.writeln(w(` removed ${a}`)),d++)}catch{}}return s.writeln(),d>0?s.writeln(w(`Done: ${d} hook(s) removed.`)):s.writeln(l("No managed hooks found.")),await s.close(),r.ok(void 0)},X=async i=>{if($(i??[],{boolean:["help"],alias:{h:"help"}}).help)return console.log("eser codebase status \u2014 Show git hook installation status"),r.ok(void 0);let s=A({renderer:T,sink:C.stdout()}),t=await S();if(t===null)return s.writeln(k("Error: not inside a git repository")),await s.close(),r.fail({exitCode:1});let o=e.runtime.path.join(t,"hooks"),d=e.runtime.process.cwd(),p=await E(d);if(p===null)return s.writeln(k("Error: no .eser/manifest.yml found in current directory")),await s.close(),r.fail({exitCode:1});let g=G(p);if(g.length===0)return s.writeln(l("No workflow events found in manifest.")),await s.close(),r.ok(void 0);s.writeln(O("Git hook status:")),s.writeln();for(let a of g){let c=M[a];if(c===void 0){s.writeln(b(" "),l(a.padEnd(14)),b(" "),l("(no hook mapping)"));continue}let{hookName:f}=c,v=e.runtime.path.join(o,f),u;try{(await e.runtime.fs.readTextFile(v)).includes(P)?u=w("managed (@eser)"):u=y("user hook")}catch{u=l("not installed")}s.writeln(b(` ${f.padEnd(14)} `),u)}return s.writeln(),await s.close(),r.ok(void 0)};export{U as main,X as statusMain,W as uninstallMain};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as d}from"./chunk-LNNNLUZT.js";import{c as g,d as x,j as S}from"./chunk-
|
|
2
|
+
import{a as d}from"./chunk-LNNNLUZT.js";import{c as g,d as x,j as S}from"./chunk-WG6J7DFO.js";import"./chunk-JYNHFD6B.js";import{a as r}from"./chunk-A6RDYP6R.js";import{t as i}from"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";var y=async()=>{let n=i.process.stdin.getReader(),e=[];try{for(;;){let{done:o,value:a}=await n.read();if(o||a===void 0)break;e.push(a)}}finally{n.releaseLock()}let t=0,c=new Uint8Array(e.reduce((o,a)=>o+a.length,0));for(let o of e)c.set(o,t),t+=o.length;let s=new TextDecoder().decode(c);try{return JSON.parse(s)}catch{return{}}},R=async n=>{let e=new TextEncoder,t=i.process.stdout.getWriter();await t.write(e.encode(JSON.stringify(n))),t.releaseLock()},I=async n=>{switch(n?.[0]){case"pre-tool-use":return await D();case"stop":return await T();case"post-file-write":return await v();case"post-bash":return await F();default:return r(void 0)}},D=async()=>{let n=await y(),e=n.tool_name??"unknown",t=n.tool_input??{},c=n.cwd??i.process.cwd(),s=await S(c),o={};try{o=await x(c)}catch{return r(void 0)}let a=async u=>{await R({hookSpecificOutput:{hookEventName:"PreToolUse",permissionDecision:"deny",permissionDecisionReason:`noskills: ${u}`}})};if(o.pendingClear===!0)return await a(`Task accepted. You must run \`/clear\` and then \`${d("next",s)}\` before continuing.`),r(void 0);if(e==="Bash"){let u=(t.command??"").trim();if(!(s?.allowGit??!1)){let p=["git add","git commit","git push","git merge","git rebase","git checkout","git stash","git reset","git cherry-pick","git tag","git branch -d","git branch -D","git branch -m","git revert","git am","git mv","git rm"];for(let w of p)if(u.startsWith(w)||u.includes(` && ${w}`)||u.includes(`; ${w}`))return await a("git is read-only for agents. The user controls git. You may use `git log`, `git diff`, `git status`, `git show`, `git blame`."),r(void 0)}return r(void 0)}if(!["Write","Edit","MultiEdit"].includes(e))return r(void 0);let h=t.file_path??t.path??"";if(h.includes(".eser/")||h.includes(".claude/"))return r(void 0);let f=o.phase??"UNKNOWN";if(f==="EXECUTING")return r(void 0);let k={IDLE:`No active spec. Run \`${d("spec new",s)}\``,UNINITIALIZED:`noskills not initialized. Run \`${d("init",s)}\``,DISCOVERY:`Discovery in progress. Run \`${d("next",s)}\` to continue.`,SPEC_DRAFT:`Spec needs review. Run \`${d("approve",s)}\``,SPEC_APPROVED:`Start execution first: \`${d('next --answer="start"',s)}\``,BLOCKED:`Execution blocked. Resolve with \`${d('next --answer="resolution"',s)}\``,DONE:`Spec complete. Start a new one or run \`${d("reset",s)}\``};return await a(k[f]??`Run \`${d("next",s)}\` first.`),r(void 0)},T=async()=>{let n=await y();if(n.stop_hook_active===!0)return r(void 0);let e=n.cwd??i.process.cwd(),t;try{let l=await i.fs.readTextFile(`${e}/${g.stateFile}`);t=JSON.parse(l)}catch{return r(void 0)}if(t.phase!=="EXECUTING")return r(void 0);let c=t.execution??{},s=`${e}/${g.stateDir}/files-changed.jsonl`,o=[];try{let p=(await i.fs.readTextFile(s)).trim().split(`
|
|
3
3
|
`).filter(Boolean);o=[...new Set(p.map(w=>{try{return JSON.parse(w).file}catch{return null}}).filter(w=>w!==null))]}catch{}let a=[],m="no changes";try{let{execSync:l}=await import("node:child_process");a=l("git diff --name-only",{cwd:e,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
4
4
|
`).filter(Boolean);let $=l("git diff --stat",{cwd:e,encoding:"utf-8",timeout:5e3}).trim().split(`
|
|
5
5
|
`);m=$[$.length-1]??"no changes"}catch{}let h=[...new Set([...o,...a])],f=(c.iteration??0)+1,k=`${e}/${g.stateDir}/iterations`;try{await i.fs.mkdir(k,{recursive:!0}),await i.fs.writeTextFile(`${k}/iteration-${f}.json`,JSON.stringify({iteration:f,files:h,gitStat:m.trim(),timestamp:new Date().toISOString()},null,2)+`
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a,b}from"./chunk-
|
|
2
|
+
import{a,b}from"./chunk-YVIGHK4H.js";import"./chunk-455V3AE5.js";import"./chunk-J7YTWK67.js";import"./chunk-PVPMHMKP.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as KiroModel,b as kiroFactory};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as p}from"./chunk-
|
|
2
|
+
import{a as p}from"./chunk-46ZWBKIW.js";import{f as o,h as m,k as d}from"./chunk-GBM3TZFD.js";import{c as t,d as a,g as l,m as n}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as i}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 $=async b=>{let e=o({renderer:d.ansi(),sink:m.stdout()});e.writeln(t("AI Providers")),e.writeln("");let r=await p(),v=r.map(s=>[s.available?l("\u25CF"):a("\u25CB"),s.available?t(`${s.name} (${s.alias})`):a(`${s.name} (${s.alias})`),a(s.type),s.available?s.detail:a(s.detail)]);e.writeln(n(["","Provider","Type","Status"],v));let u=r.filter(s=>s.available).length;return e.writeln(a(`${u}/${r.length} providers available`)),await e.close(),i(void 0)};export{$ as main};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as h,b as u,c as k}from"./chunk-
|
|
2
|
+
import{a as h,b as u,c as k}from"./chunk-P2TABZ4A.js";import"./chunk-W3RVRCUB.js";import"./chunk-JYNHFD6B.js";import{f as m,h as c,k as w}from"./chunk-GBM3TZFD.js";import{b as t,c as a,d as e}from"./chunk-3SXTMY75.js";import"./chunk-PVPMHMKP.js";import{a as g}from"./chunk-MG65QJY6.js";import{a as i}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 R=async(y,p)=>{let d=g(y??[],{string:["config"],boolean:["help"],alias:{h:"help"}});if(d.help)return console.log(`eser workflows list \u2014 List available workflows and tools
|
|
3
3
|
`),console.log("Options:"),console.log(" --config <path> Config directory (default: .)"),console.log(" -h, --help Show this help"),i(void 0);let o=m({renderer:w.ansi(),sink:c.stdout()}),A=d.config??".",r=await u(A),n=h();if(n.register(k),p?.tools!==void 0&&n.registerAll(p.tools),r!==null&&r.workflows.length>0){o.writeln(a("Workflows:"));for(let s of r.workflows){let x=s.on.length>0?s.on.join(", "):"(no events)",f=s.steps.length,C=f===1?"step":"steps";o.writeln(t(` ${s.id.padEnd(20)} `),e(x.padEnd(25)),t(` ${f} ${C}`))}}else o.writeln(e("No workflows defined."));o.writeln();let l=n.getAll();if(l.length>0){o.writeln(a(`Registered tools (${l.length}):`));for(let s of l)o.writeln(t(` ${s.name.padEnd(28)} `),e(s.description))}else o.writeln(e("No tools registered."));return await o.close(),i(void 0)};export{R as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a as R,d as h}from"./chunk-3BEX5FYF.js";import{k as S}from"./chunk-
|
|
2
|
+
import{a as R,d as h}from"./chunk-3BEX5FYF.js";import{k as S}from"./chunk-UJ6LH5FY.js";import{f as m,h as f,k as y}from"./chunk-GBM3TZFD.js";import{c as p,d as l,k as d}from"./chunk-3SXTMY75.js";import{a as u}from"./chunk-MG65QJY6.js";import{a as n,b as o,c as g}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 w=["project","structure","utility"],C={project:"PROJECTS",structure:"STRUCTURES",utility:"UTILITIES"},k=t=>R(async r=>{try{let s=await S(t.registrySource,{local:t.local}),e=[...s.recipes];if(t.language!==void 0&&(e=e.filter(i=>i.language===t.language)),t.scale!==void 0&&(e=e.filter(i=>i.scale===t.scale)),t.tag!==void 0&&(e=e.filter(i=>i.tags!==void 0&&i.tags.includes(t.tag))),e.length===0)return r.out.writeln("No recipes found matching your filters."),r.out.writeln("Run ",l("`eser kit list`")," without filters to see all recipes."),n({manifest:s,recipes:e});r.out.writeln(p(`${s.name} \u2014 ${s.description}`)),r.out.writeln();for(let i of w){let c=e.filter(a=>a.scale===i);if(c.length!==0){r.out.writeln(d(C[i]));for(let a of c)r.out.writeln(` ${a.name.padEnd(20)} ${a.description} `,l(`[${a.language}]`));r.out.writeln()}}return n({manifest:s,recipes:e})}catch(s){let e=s instanceof Error?s.message:String(s);return o({_tag:"RegistryError",message:e})}});var $=async t=>{let r=u(t??[],{string:["registry","language","scale","tag"],boolean:["local"]}),s=m({renderer:y.ansi(),sink:f.stdout()}),e=await h(k({registrySource:r.registry,language:r.language,scale:r.scale,tag:r.tag,local:r.local===!0}),{out:s});return await s.close(),g(e)?n(void 0):o({exitCode:1})};export{$ as main};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
import { createRequire } from "node:module"; const require = createRequire(import.meta.url);
|
|
2
|
-
import{a}from"./chunk-
|
|
2
|
+
import{a}from"./chunk-ZNGLZECE.js";import"./chunk-GTHXGAMQ.js";import"./chunk-LCG4SK6K.js";import"./chunk-7DPLGQHN.js";import"./chunk-3SXTMY75.js";import"./chunk-N7DXBY3O.js";import"./chunk-AP72BKVG.js";import"./chunk-MRCBHVSB.js";import"./chunk-Y4ARZGGL.js";import"./chunk-STI6DX7K.js";import"./chunk-DTO2YJWZ.js";import"./chunk-G6NAG2EK.js";export{a as loadConfig};
|