eser 4.1.23 → 4.1.27
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-ORJYWG26.js +7 -0
- package/chunks/{anthropic-GBDSASP5.js → anthropic-SL274RBQ.js} +1 -1
- package/chunks/approve-5NJ4JWD3.js +1 -0
- package/chunks/ask-TFJCKH5G.js +2 -0
- package/chunks/block-ADHHHUFZ.js +1 -0
- package/chunks/{browser-6UKLTPJO.js → browser-XCMD2IZQ.js} +1 -1
- package/chunks/{build-VKOO2WEA.js → build-2W7YVR7J.js} +2 -2
- package/chunks/{bun-N3TIWBPP.js → bun-YFFBDKUJ.js} +1 -1
- package/chunks/changelog-gen-QDUA5G5K.js +9 -0
- package/chunks/chunk-2J2PXBOC.js +1 -0
- package/chunks/{chunk-NIX3WX3O.js → chunk-3EFU5R2M.js} +1 -1
- package/chunks/{chunk-7GS5KPVF.js → chunk-3I4JG3PJ.js} +1 -1
- package/chunks/{chunk-7QNRH7OR.js → chunk-3K42AALS.js} +1 -1
- package/chunks/{chunk-TMFPDVYN.js → chunk-3OEM65F2.js} +17 -17
- package/chunks/{chunk-RGUC6KAZ.js → chunk-4H4O3TGK.js} +1 -1
- package/chunks/{chunk-V5HTJPFW.js → chunk-4HAIX3WN.js} +3 -3
- package/chunks/chunk-4VL2RZIN.js +1 -0
- package/chunks/chunk-5AK4OGCO.js +1 -0
- package/chunks/chunk-5MN3MWQN.js +1 -0
- package/chunks/chunk-5RK3346P.js +4 -0
- package/chunks/chunk-6HYGGBEQ.js +1 -0
- package/chunks/{chunk-PLRSDG6G.js → chunk-762C2IM6.js} +1 -1
- package/chunks/{chunk-NZFUFGOC.js → chunk-AAV7D6DF.js} +1 -1
- package/chunks/{chunk-DLVQNMNV.js → chunk-AKJB4CER.js} +1 -1
- package/chunks/{chunk-NSZ4HGDI.js → chunk-ANY26ROY.js} +1 -1
- package/chunks/{chunk-IAWIWTDY.js → chunk-AYSPDG4K.js} +1 -1
- package/chunks/{chunk-DOV5776P.js → chunk-BCHXUKWW.js} +2 -2
- package/chunks/{chunk-3DMTTLUJ.js → chunk-BDTJR6UH.js} +1 -1
- package/chunks/{chunk-BP2MZX2P.js → chunk-C3PZVQ3Z.js} +1 -1
- package/chunks/{chunk-M5TBBQQC.js → chunk-CKD2KOHA.js} +3 -3
- package/chunks/chunk-CPRLAMEG.js +1 -0
- package/chunks/chunk-DWYVBWBP.js +91 -0
- package/chunks/{chunk-O2MNBI7V.js → chunk-EBYJBBYV.js} +1 -1
- package/chunks/{chunk-PBSR4XR2.js → chunk-ETMOOGY2.js} +1 -1
- package/chunks/chunk-G34MS4XJ.js +1 -0
- package/chunks/chunk-GVSBZ6JV.js +1 -0
- package/chunks/{chunk-C3OSYHJY.js → chunk-H4OFOQQ2.js} +1 -1
- package/chunks/{chunk-XWYLEYLY.js → chunk-HTBLWLKV.js} +1 -1
- package/chunks/chunk-JOXKA7TJ.js +7 -0
- package/chunks/{chunk-JQHMDTPL.js → chunk-KAEAT6A4.js} +1 -1
- package/chunks/chunk-LOFP256P.js +1 -0
- package/chunks/{chunk-2R4MK2KR.js → chunk-MYSTBVWT.js} +1 -1
- package/chunks/chunk-NGZZAQ7G.js +1 -0
- package/chunks/chunk-NLNSK3KE.js +1 -0
- package/chunks/chunk-NT2MQK7O.js +6 -0
- package/chunks/{chunk-SJQWPBMJ.js → chunk-NTPOK5H6.js} +1 -1
- package/chunks/{chunk-DZD6MI45.js → chunk-PO3SXFUE.js} +1 -1
- package/chunks/chunk-Q54LOR4S.js +2 -0
- package/chunks/{chunk-5C7ZQN6X.js → chunk-QIODVVTY.js} +1 -1
- package/chunks/{chunk-ZY72QNKZ.js → chunk-QIYWONJL.js} +1 -1
- package/chunks/chunk-QZY4BKI7.js +1 -0
- package/chunks/chunk-RBB5ITAS.js +2 -0
- package/chunks/chunk-RYLOB2JU.js +1 -0
- package/chunks/{chunk-VFMYWG2I.js → chunk-SBOTNOWZ.js} +1 -1
- package/chunks/{chunk-Z7742D7Q.js → chunk-SG4G3OOO.js} +1 -1
- package/chunks/{chunk-FGDJVQG3.js → chunk-TTYO2XJO.js} +1 -1
- package/chunks/{chunk-EW5NCPPE.js → chunk-TUTRX7VR.js} +3 -3
- package/chunks/{chunk-UJX2S56V.js → chunk-TXL6YOFL.js} +1 -1
- package/chunks/{chunk-4Q3SEHPE.js → chunk-U47ABJCC.js} +1 -1
- package/chunks/chunk-U65FD6J3.js +1 -0
- package/chunks/{chunk-7M3ONEMO.js → chunk-UKYKMDYU.js} +1 -1
- package/chunks/{chunk-DRQWYJMH.js → chunk-UNL4H5EY.js} +1 -1
- package/chunks/{chunk-ATLUGTI7.js → chunk-V2N5L24J.js} +2 -2
- package/chunks/chunk-VVHXAOEH.js +1 -0
- package/chunks/{chunk-HPVL4BVQ.js → chunk-W3REWI3H.js} +2 -2
- package/chunks/{chunk-MQH4XBFN.js → chunk-XMCQMTAA.js} +1 -1
- package/chunks/chunk-YMY2URYM.js +1 -0
- package/chunks/{chunk-XJ3VEVYL.js → chunk-YQU3TEIG.js} +1 -1
- package/chunks/chunk-YWCEHTZB.js +2 -0
- package/chunks/chunk-YXSB6RET.js +1 -0
- package/chunks/chunk-Z4WPWVC7.js +10 -0
- package/chunks/chunk-ZED5RIVL.js +1 -0
- package/chunks/chunk-ZH37DSUQ.js +1 -0
- package/chunks/chunk-ZO7RUTSQ.js +60 -0
- package/chunks/claude-code-K37KYX7W.js +1 -0
- package/chunks/clone-PAQMCIA3.js +5 -0
- package/chunks/{commitmsg-SQRQONCS.js → commitmsg-ZGOEO5YG.js} +2 -2
- package/chunks/{deno-PZXN5K3J.js → deno-MMJLKXAE.js} +1 -1
- package/chunks/{dev-FLO2KEPZ.js → dev-JHAHGTZP.js} +2 -2
- package/chunks/file-tools-shared-77P7MI54.js +1 -0
- package/chunks/gemini-ARTUPDPZ.js +1 -0
- package/chunks/gh-SXEDNWHD.js +4 -0
- package/chunks/{gh-contributors-5SHGJHAQ.js → gh-contributors-G3QZZAUO.js} +3 -3
- package/chunks/init-3GXDO32O.js +1 -0
- package/chunks/init-IPZHDMAH.js +12 -0
- package/chunks/install-VY2L6NDB.js +2 -0
- package/chunks/kiro-XQDHURLU.js +1 -0
- package/chunks/{list-MN7OUE52.js → list-2RZIQZGH.js} +1 -1
- package/chunks/{list-B7L4FZKG.js → list-DSVIPH45.js} +1 -1
- package/chunks/{list-UZKWSA4S.js → list-V2HZCPDN.js} +1 -1
- package/chunks/load-config-KG4RTCR2.js +1 -0
- package/chunks/{main-WVXCURBF.js → main-FQFNY7SM.js} +2 -2
- package/chunks/manifest-5CYL3HR3.js +1 -0
- package/chunks/mod-5ACKR2OE.js +1 -0
- package/chunks/{mod-PEAFMI6F.js → mod-CUIGNRIK.js} +1 -1
- package/chunks/mod-NSY6WUYH.js +27 -0
- package/chunks/mod-QJMMYECF.js +10 -0
- package/chunks/{mod-CI56JMO4.js → mod-TLLZ3NAM.js} +2 -2
- package/chunks/mod-TSU5UWXA.js +1 -0
- package/chunks/{mod-JTBNNSZZ.js → mod-U6LEXPVR.js} +1 -1
- package/chunks/{mod-MKMQWZ6G.js → mod-VZPKQ7DG.js} +1 -1
- package/chunks/mod-WX4P6LGJ.js +1 -0
- package/chunks/mod-WYRORC72.js +1 -0
- package/chunks/new-EAETGSIR.js +4 -0
- package/chunks/next-F2BIIAZC.js +3 -0
- package/chunks/{node-VPHAK3FD.js → node-SMAAGOR3.js} +1 -1
- package/chunks/ollama-6JZ2IKR7.js +1 -0
- package/chunks/opencode-CHIAJALZ.js +1 -0
- package/chunks/recipe-applier-R4YJPGQR.js +1 -0
- package/chunks/registry-fetcher-J6X32PGP.js +1 -0
- package/chunks/{release-YJOLKWDT.js → release-3BKLVESS.js} +2 -2
- package/chunks/release-notes-734LKEJB.js +3 -0
- package/chunks/release-tag-YX727TXO.js +1 -0
- package/chunks/reset-PAPDZIDC.js +1 -0
- package/chunks/rule-4GNOR3GE.js +2 -0
- package/chunks/{run-7JXDS75G.js → run-ES4BLQQX.js} +1 -1
- package/chunks/{scripts-RSK5XDRW.js → scripts-COIXD5AD.js} +1 -1
- package/chunks/{serve-U6IXMGXQ.js → serve-B4V2BCWM.js} +2 -2
- package/chunks/{server-PXE4DB3V.js → server-RYWDAYED.js} +1 -1
- package/chunks/spec-SNAUMQSR.js +1 -0
- package/chunks/status-CY5IKIYS.js +1 -0
- package/chunks/sync-OAPV43JS.js +1 -0
- package/chunks/system-5A6DQLM5.js +1 -0
- package/chunks/system-JWO27FMA.js +1 -0
- package/chunks/update-O75M4SDJ.js +5 -0
- package/chunks/validate-bom-6G7EYFOP.js +1 -0
- package/chunks/validate-case-conflict-OWHWRTSQ.js +1 -0
- package/chunks/validate-circular-deps-TCYSZKME.js +1 -0
- package/chunks/validate-commit-msg-UPJJ7E4M.js +1 -0
- package/chunks/validate-docs-ZTCE5XLF.js +1 -0
- package/chunks/validate-eof-6RMNMAWI.js +1 -0
- package/chunks/validate-export-names-5ZVQ4PGM.js +1 -0
- package/chunks/validate-filenames-5YB27RN4.js +1 -0
- package/chunks/validate-json-6CLTN4AN.js +1 -0
- package/chunks/validate-large-files-KEMHYWKH.js +1 -0
- package/chunks/validate-licenses-WIVY6G5Z.js +1 -0
- package/chunks/validate-line-endings-KNFYAVBG.js +1 -0
- package/chunks/validate-merge-conflict-PYKGIFY5.js +1 -0
- package/chunks/validate-mod-exports-X5UZPD7J.js +1 -0
- package/chunks/validate-package-configs-SYKEIB53.js +1 -0
- package/chunks/validate-secrets-BWDFWN64.js +1 -0
- package/chunks/validate-shebangs-MP6VTLWO.js +1 -0
- package/chunks/validate-submodules-RQXISWKG.js +1 -0
- package/chunks/validate-symlinks-IPRYMDZD.js +1 -0
- package/chunks/validate-toml-KJZK7QVM.js +1 -0
- package/chunks/validate-trailing-whitespace-RO42VWQG.js +1 -0
- package/chunks/validate-yaml-H7G726ZM.js +1 -0
- package/chunks/versions-KW5UTMNV.js +1 -0
- package/chunks/vertexai-TPGIAJNA.js +1 -0
- package/chunks/workerd-LKKH32SO.js +1 -0
- package/eser.js +1 -1
- package/package.json +1 -1
- package/chunks/add-4LRHVBEC.js +0 -7
- package/chunks/approve-364KOMLB.js +0 -1
- package/chunks/ask-752YJEHO.js +0 -2
- package/chunks/block-JVJQU723.js +0 -1
- package/chunks/changelog-gen-ZCNNOY7G.js +0 -7
- package/chunks/chunk-2TRQKCFC.js +0 -1
- package/chunks/chunk-3TYZYY77.js +0 -1
- package/chunks/chunk-4HMEWMWL.js +0 -1
- package/chunks/chunk-5O7V5P53.js +0 -1
- package/chunks/chunk-5UGVJVIQ.js +0 -1
- package/chunks/chunk-6YRN6OJC.js +0 -2
- package/chunks/chunk-BKVQBSFV.js +0 -6
- package/chunks/chunk-CDLEA2PD.js +0 -1
- package/chunks/chunk-GRTR6TNJ.js +0 -1
- package/chunks/chunk-H2JGLZIR.js +0 -1
- package/chunks/chunk-HVMMNGY5.js +0 -7
- package/chunks/chunk-L2BYHWDC.js +0 -1
- package/chunks/chunk-LRL56YFE.js +0 -1
- package/chunks/chunk-LU3DHXOC.js +0 -2
- package/chunks/chunk-NADES3GN.js +0 -1
- package/chunks/chunk-QIUIPRJP.js +0 -1
- package/chunks/chunk-R6F4EK2B.js +0 -4
- package/chunks/chunk-RUZDG5PT.js +0 -60
- package/chunks/chunk-SCCNNGD4.js +0 -2
- package/chunks/chunk-SCULX2ND.js +0 -1
- package/chunks/chunk-VGFZXQMW.js +0 -1
- package/chunks/chunk-WE7PSSAQ.js +0 -91
- package/chunks/chunk-X4ZCYXOT.js +0 -1
- package/chunks/chunk-XMTGT2NJ.js +0 -10
- package/chunks/chunk-Y6DLCHJN.js +0 -1
- package/chunks/chunk-YUXQ7JNG.js +0 -1
- package/chunks/chunk-ZTLJ775S.js +0 -1
- package/chunks/claude-code-PWTLM554.js +0 -1
- package/chunks/clone-DASXIL35.js +0 -5
- package/chunks/file-tools-shared-ESMPLZVJ.js +0 -1
- package/chunks/gemini-I6F5N7PS.js +0 -1
- package/chunks/gh-Y4BXDXR5.js +0 -4
- package/chunks/init-GXBXQGGV.js +0 -1
- package/chunks/init-UFJL24PW.js +0 -12
- package/chunks/install-Q2KQZM62.js +0 -2
- package/chunks/kiro-NMTIFMT4.js +0 -1
- package/chunks/load-config-TSM3AAQ6.js +0 -1
- package/chunks/manifest-VJQJG2LS.js +0 -1
- package/chunks/mod-3PJAIZ2O.js +0 -1
- package/chunks/mod-FKPTF5D5.js +0 -1
- package/chunks/mod-GZ6BSK2P.js +0 -1
- package/chunks/mod-QODEWK3G.js +0 -9
- package/chunks/mod-S33TIBIC.js +0 -1
- package/chunks/mod-STKIZYZ3.js +0 -27
- package/chunks/new-W5YBJFGW.js +0 -4
- package/chunks/next-773GX25N.js +0 -3
- package/chunks/ollama-DQ5VM4HI.js +0 -1
- package/chunks/opencode-IZMQZ4ZK.js +0 -1
- package/chunks/recipe-applier-F2REROYS.js +0 -1
- package/chunks/registry-fetcher-ZJ76EHBA.js +0 -1
- package/chunks/release-notes-Z53AFCII.js +0 -3
- package/chunks/release-tag-QRIKYVQB.js +0 -1
- package/chunks/reset-5LQGIOGB.js +0 -1
- package/chunks/rule-K42YEAMO.js +0 -2
- package/chunks/spec-5446CSQC.js +0 -1
- package/chunks/status-HK3P6J6G.js +0 -1
- package/chunks/sync-4FSA5257.js +0 -1
- package/chunks/system-3MH6OCP6.js +0 -1
- package/chunks/system-DTVAUBIX.js +0 -1
- package/chunks/update-QD5S73WT.js +0 -5
- package/chunks/validate-bom-IVALGNGE.js +0 -1
- package/chunks/validate-case-conflict-LKECKLD5.js +0 -1
- package/chunks/validate-circular-deps-PXFPCBXA.js +0 -1
- package/chunks/validate-commit-msg-77CBKGOF.js +0 -1
- package/chunks/validate-docs-3UGB7LN7.js +0 -1
- package/chunks/validate-eof-ZSIYNHO5.js +0 -1
- package/chunks/validate-export-names-BPSCBX7B.js +0 -1
- package/chunks/validate-filenames-G4XJ2LHN.js +0 -1
- package/chunks/validate-json-YRCFW2O7.js +0 -1
- package/chunks/validate-large-files-MWWSFDOE.js +0 -1
- package/chunks/validate-licenses-Q2YA2MND.js +0 -1
- package/chunks/validate-line-endings-C6NHWHGI.js +0 -1
- package/chunks/validate-merge-conflict-KTBL4FUY.js +0 -1
- package/chunks/validate-mod-exports-LQIIQRIS.js +0 -1
- package/chunks/validate-package-configs-36PYXIWC.js +0 -1
- package/chunks/validate-secrets-UFDJ7ITY.js +0 -1
- package/chunks/validate-shebangs-3UO4MDMZ.js +0 -1
- package/chunks/validate-submodules-YA654D3B.js +0 -1
- package/chunks/validate-symlinks-R2PNE5TG.js +0 -1
- package/chunks/validate-toml-7H2N5AKI.js +0 -1
- package/chunks/validate-trailing-whitespace-HXO7M3ED.js +0 -1
- package/chunks/validate-yaml-ZJJCQVBB.js +0 -1
- package/chunks/versions-CWT5S7G4.js +0 -1
- package/chunks/vertexai-2SMP54AR.js +0 -1
- package/chunks/workerd-NXKZMQPV.js +0 -1
- /package/chunks/{chunk-QXTK62N4.js → chunk-ACQUINWH.js} +0 -0
- /package/chunks/{chunk-VTQ72OK7.js → chunk-FDZP7B5Y.js} +0 -0
- /package/chunks/{chunk-4OIKB2P5.js → chunk-T7K64JD5.js} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as _,c as b}from"./chunk-
|
|
1
|
+
import{b as _,c as b}from"./chunk-5MN3MWQN.js";import{a as y,e as f}from"./chunk-OLM5RTFK.js";var h=class{capabilities=["text_generation","streaming","tool_calling","vision","batch_processing"];provider="anthropic";modelId;client;config;constructor(t,n){this.client=t,this.config=n,this.modelId=n.model}async generateText(t,n){let o=p(this.config,t);try{let a=await this.client.messages.create(o,{signal:n,timeout:this.config.requestTimeoutMs});return k(a,this.modelId)}catch(a){throw i(a)}}async*streamText(t,n){let o=p(this.config,t);try{let a=await this.client.messages.create({...o,stream:!0},{signal:n,timeout:this.config.requestTimeoutMs}),r=null,l=null,c="",d=0,u=0;for await(let s of a)if(s.type==="message_start")d=s.message?.usage?.input_tokens??0;else if(s.type==="content_block_start")s.content_block?.type==="tool_use"&&(r=s.content_block.id??null,l=s.content_block.name??null,c="");else if(s.type==="content_block_delta")s.delta?.type==="text_delta"?yield{kind:"content_delta",textDelta:s.delta.text}:s.delta?.type==="input_json_delta"&&(c+=s.delta.partial_json??"",yield{kind:"tool_call_delta",textDelta:s.delta.partial_json});else if(s.type==="content_block_stop"){if(r!==null&&l!==null){let m={};try{m=JSON.parse(c||"{}")}catch{}yield{kind:"tool_call_delta",toolCall:{id:r,name:l,arguments:m}},r=null,l=null,c=""}}else s.type==="message_delta"&&(u=s.usage?.output_tokens??u,yield{kind:"message_done",stopReason:x(s.delta?.stop_reason),usage:{inputTokens:d,outputTokens:u,totalTokens:d+u}})}catch(a){yield{kind:"error",error:i(a)}}}async submitBatch(t,n){let o=t.items.map(a=>({custom_id:a.customId,params:p(this.config,a.options)}));try{let a=await this.client.beta.messages.batches.create({requests:o},{signal:n});return g(a)}catch(a){throw i(a)}}async getBatchJob(t,n){try{let o=await this.client.beta.messages.batches.retrieve(t,{signal:n});return g(o)}catch(o){throw i(o)}}async listBatchJobs(t,n){try{let o=await this.client.beta.messages.batches.list({limit:t?.limit,after_id:t?.after},{signal:n}),a=[];for(let r of o.data??[])a.push(g(r));return a}catch(o){throw i(o)}}async downloadBatchResults(t,n){try{let o=await this.client.beta.messages.batches.results(t.id,{signal:n}),a=[];for await(let r of o)r.result?.type==="succeeded"?a.push({customId:r.custom_id,result:k(r.result.message,this.modelId)}):a.push({customId:r.custom_id,error:r.result?.error?.message??"Unknown error"});return a}catch(o){throw i(o)}}async cancelBatchJob(t,n){try{await this.client.beta.messages.batches.cancel(t,{signal:n})}catch(o){throw i(o)}}async close(){}getRawClient(){return this.client}},A={provider:"anthropic",async createModel(e){let{default:t}=await import("./sdk-5JGXLIO5.js"),n={};e.apiKey!==void 0&&(n.apiKey=e.apiKey),e.baseUrl!==void 0&&(n.baseURL=e.baseUrl);let o=new t(n);return new h(o,e)}},p=(e,t)=>{let n={model:e.model,max_tokens:t.maxTokens??e.maxTokens,messages:R(t.messages)};return t.system!==void 0&&(n.system=t.system),t.temperature!==void 0&&(n.temperature=t.temperature),t.topP!==void 0&&(n.top_p=t.topP),t.stopWords!==void 0&&(n.stop_sequences=t.stopWords),t.tools!==void 0&&(n.tools=t.tools.map(o=>({name:o.name,description:o.description,input_schema:o.parameters??{type:"object",properties:{}}}))),t.toolChoice!==void 0&&(n.tool_choice={type:t.toolChoice}),t.thinkingBudget!==void 0&&(n.thinking={type:"enabled",budget_tokens:t.thinkingBudget}),n},R=e=>{let t=[];for(let n of e){if(n.role==="system")continue;let o=n.content.map(C);t.push({role:n.role==="tool"?"user":n.role,content:o})}return t},C=e=>{switch(e.kind){case"text":return{type:"text",text:e.text};case"image":{if(e.image.data!==void 0)return{type:"image",source:{type:"base64",media_type:e.image.mimeType??"image/png",data:w(e.image.data)}};if(e.image.url!==void 0){if(_(e.image.url)){let t=b(e.image.url);if(t!==null)return{type:"image",source:{type:"base64",media_type:t.mimeType,data:w(t.data)}}}return{type:"image",source:{type:"url",url:e.image.url}}}return{type:"text",text:"[unsupported image]"}}case"tool_call":return{type:"tool_use",id:e.toolCall.id,name:e.toolCall.name,input:e.toolCall.arguments};case"tool_result":return{type:"tool_result",tool_use_id:e.toolResult.toolCallId,content:e.toolResult.content,is_error:e.toolResult.isError};default:return{type:"text",text:`[unsupported content: ${e.kind}]`}}},k=(e,t)=>{let n=[];for(let o of e.content??[])o.type==="text"?n.push({kind:"text",text:o.text}):o.type==="thinking"?n.push({kind:"text",text:`[thinking] ${o.thinking}`}):o.type==="tool_use"&&n.push({kind:"tool_call",toolCall:{id:o.id,name:o.name,arguments:o.input??{}}});return{content:n,stopReason:x(e.stop_reason),usage:{inputTokens:e.usage?.input_tokens??0,outputTokens:e.usage?.output_tokens??0,totalTokens:(e.usage?.input_tokens??0)+(e.usage?.output_tokens??0)},modelId:t,rawResponse:e}},x=e=>e==="end_turn"?"end_turn":e==="max_tokens"?"max_tokens":e==="tool_use"?"tool_use":e==="stop_sequence"?"stop":"end_turn",g=e=>({id:e.id,status:B(e.processing_status),createdAt:new Date(e.created_at),completedAt:e.ended_at!==void 0?new Date(e.ended_at):void 0,totalCount:e.request_counts?.total??0,doneCount:e.request_counts?.succeeded??0,failedCount:e.request_counts?.errored??0}),B=e=>e==="in_progress"?"processing":e==="ended"?"completed":e==="canceling"||e==="canceled"?"cancelled":"pending",i=e=>{if(e instanceof y)return e;let t=e instanceof Error?e:new Error(String(e)),n=e?.status??e?.statusCode??500;return f("anthropic",n,t)},w=e=>{let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return btoa(t)};export{h as a,A as b};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as y,d as h,e as k,f as T}from"./chunk-
|
|
1
|
+
import{c as y,d as h,e as k,f as T}from"./chunk-762C2IM6.js";import{a as m,e as p}from"./chunk-OLM5RTFK.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-RWYXITVV.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SBOTNOWZ.js";import{a as n}from"./chunk-34GCQZ3Z.js";var o=r({name:"validate-json",description:"Validate JSON syntax",canFix:!1,stacks:[],defaults:{},extensions:["json","jsonc"],checkFile(e,a,t){if(a===void 0)return[];if((t.exclude??[]).some(s=>e.path.includes(s)))return[];try{return e.name.endsWith(".jsonc")?n(a):JSON.parse(a),[]}catch(s){let i=s instanceof SyntaxError?s.message:"invalid JSON";return[{path:e.path,message:i}]}}}),p=o.run,f=o.validator,x=o.main;export{o as a,p as b,f as c,x as d};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as $}from"./chunk-
|
|
1
|
+
import{a as $}from"./chunk-4H4O3TGK.js";import{e as x}from"./chunk-OBIEQJDE.js";import{t as c}from"./chunk-YXSB6RET.js";import{Scanner as ie}from"@tailwindcss/oxide";import{compile as j}from"tailwindcss";async function L(e,s){if(e.startsWith(".")||e.startsWith("/")){let r=c.path.resolve(s,e),n=await c.fs.readTextFile(r);return{path:r,content:n,base:c.path.dirname(r)}}let t=s;for(;t!=="/"&&t!=="";){let r=c.path.resolve(t,"node_modules",e);try{let n=await c.fs.readTextFile(r);return{path:r,content:n,base:c.path.dirname(r)}}catch{if(!e.endsWith(".css")){let a=`${r}.css`;try{let o=await c.fs.readTextFile(a);return{path:a,content:o,base:c.path.dirname(a)}}catch{}}let n=c.path.resolve(t,"node_modules",e,"index.css");try{let a=await c.fs.readTextFile(n);return{path:n,content:a,base:c.path.dirname(n)}}catch{t=c.path.dirname(t)}}}let l=c.path.resolve(s,e),i=await c.fs.readTextFile(l);return{path:l,content:i,base:c.path.dirname(l)}}async function w(e,s){let t=await j(e,{base:s.base,loadStylesheet:L}),l=s.candidates??[];return t.build(l)}function v(e,s){return w(e,{base:s,candidates:[]})}var R=["theme","base","properties"],P=[/^\.(flex|grid|block|inline|hidden)/,/^\.(items-|justify-|gap-|space-)/,/^\.(w-|h-|min-h-|max-w-)/,/^\.(p-|px-|py-|pt-|pb-|pl-|pr-)/,/^\.(m-|mx-|my-|mt-|mb-|ml-|mr-)/,/^\.(text-|font-|leading-)/,/^\.(bg-|border-)/,/^\.(from-|via-|to-)/,/^\.(container|wrapper)/,/^\.(rounded|shadow)/,/^\.(overflow-)/,/^\.(sm:|md:|lg:|xl:)/],B=[/--tw-gradient/,/--tw-rotate/,/--tw-scale/,/--tw-skew/,/--tw-translate/,/--tw-shadow/,/--tw-ring/,/--tw-blur/,/--tw-brightness/];function N(){return{criticalLayers:R,aboveFoldPatterns:P,forceInclude:[],forceExclude:[]}}var b=x.getLogger(["laroux-bundler","critical-page-css"]);function W(e,s){let t=s;for(;t<e.length&&e[t]!=="{";)t++;if(t>=e.length)return null;let l=t+1,i=1;for(t++;t<e.length&&i>0;)e[t]==="{"?i++:e[t]==="}"&&i--,t++;return{innerContent:e.slice(l,t-1).trim(),end:t}}function V(e){let s=[],t="@keyframes",l=0;for(;l<e.length;){let i=e.indexOf(t,l);if(i===-1)break;let r=i+t.length;for(;r<e.length&&/\s/.test(e[r]??"");)r++;let n=r;for(;n<e.length&&e[n]!=="{"&&!/\s/.test(e[n]??"");)n++;let a=e.slice(r,n),o=n;for(;o<e.length&&e[o]!=="{";)o++;if(o>=e.length){l=e.length;break}let g=1,u=o+1;for(;u<e.length&&g>0;)e[u]==="{"?g++:e[u]==="}"&&g--,u++;let d=e.slice(i,u);s.push({name:a,block:d}),l=u}return s}function Z(e){let s=new Map,t=new Map,l=new Map,i=/@layer\s+([a-zA-Z_-][a-zA-Z0-9_-]*)\s*[{;]/g,r;for(;(r=i.exec(e))!==null;){let n=r[1];if(n===void 0||r[0].endsWith(";"))continue;let a=W(e,r.index+r[0].length-1);a&&(t.has(n)||(t.set(n,[]),l.set(n,{start:r.index,end:a.end})),t.get(n).push(a.innerContent),l.get(n).end=a.end)}for(let[n,a]of t){let o=a.join(`
|
|
2
2
|
`),g=l.get(n);s.set(n,{block:`@layer ${n} {
|
|
3
3
|
${o}
|
|
4
4
|
}`,start:g.start,end:g.end})}return s}function Y(e){let s=[],t=0;for(;t<e.length;){for(;t<e.length&&/\s/.test(e[t]);)t++;if(t>=e.length)break;let l=t;for(;t<e.length&&e[t]!=="{";)t++;if(t>=e.length)break;let i=e.slice(l,t).trim();if(!i){t++;continue}let r=1;for(t++;t<e.length&&r>0;)e[t]==="{"?r++:e[t]==="}"&&r--,t++;let n=e.slice(l,t);i.startsWith("@media")||i.startsWith("@supports")?s.push({selector:"@media",full:n}):i&&!i.startsWith("@")&&s.push({selector:i,full:n})}return s}function H(e,s){let t=e.match(/\.([a-zA-Z_-][a-zA-Z0-9_\-\\:/.[\]]*)/g);if(t)for(let r of t){let n=r.substring(1);if(n=n.replace(/\\/g,""),n=n.split(":")[0]??"",n&&new RegExp(`class=["'][^"']*\\b${q(n)}\\b`,"i").test(s))return!0}let l=e.match(/^([a-zA-Z][a-zA-Z0-9-]*)/);if(l&&l[1]){let r=l[1].toLowerCase();if(new RegExp(`<${r}[\\s>]`,"i").test(s))return!0}let i=e.match(/#([a-zA-Z_-][a-zA-Z0-9_-]*)/g);if(i)for(let r of i){let n=r.substring(1);if(new RegExp(`id=["']${n}["']`,"i").test(s))return!0}return!1}function q(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function z(e,s){return s.some(t=>typeof t=="string"?e.includes(t):t.test(e))}function K(e){return P.some(s=>s.test(e))}function k(e){let{html:s,css:t,forceInclude:l=[],forceExclude:i=[]}=e;b.debug("Extracting critical page CSS (Tailwind v4 aware)...");let r=[],n=[],a=0,o=0,g=t.match(/^\/\*![\s\S]*?\*\//);g&&r.push(g[0]);let u=t.match(/@layer\s+[\w,-]{1,200}(?:\s+[\w,-]{1,50})*\s*;/);u&&r.push(u[0]);let d=/@property\s+--[\w-]+\s*\{[^}]{0,5000}\}/g,f=t.match(d)??[];f.length>0&&(r.push(f.join(`
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{b as r}from"./chunk-
|
|
1
|
+
import{b as r}from"./chunk-DWYVBWBP.js";var n=class{description;#o;#s;#e=[];constructor(o){this.description=o.description,this.#o=o.modules??{},this.#s=o.aliases??{}}addSubmodule(o,e){return this.#e.push({registration:o,module:e}),this}async addSubmoduleAsync(o,e){let s=await e;return this.#e.push({registration:o,module:s}),this}toGroupOptions(){return{description:this.description,modules:this.#o,aliases:Object.keys(this.#s).length>0?this.#s:void 0}}toCommand(o,e){let s=new r(o).description(this.description);e!==void 0&&s.version(e),Object.keys(this.#o).length>0&&s.modules(this.toGroupOptions());for(let{registration:t,module:d}of this.#e){let i=d.toGroupOptions();if(s.group(t.name,i),t.aliases!==void 0)for(let a of t.aliases)s.groupAlias(a,t.name,i)}return s}};export{n as a};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as M}from"./chunk-Y6DZEK4W.js";import{a as O}from"./chunk-34GCQZ3Z.js";import{a as D}from"./chunk-3APERFKY.js";import{a as j}from"./chunk-GXPLME3K.js";import{t as l}from"./chunk-
|
|
2
|
-
`,q=async(e,n)=>{let t=JSON.parse(JSON.stringify(e.content));for(let[
|
|
1
|
+
import{a as M}from"./chunk-Y6DZEK4W.js";import{a as O}from"./chunk-34GCQZ3Z.js";import{a as D}from"./chunk-3APERFKY.js";import{a as j}from"./chunk-GXPLME3K.js";import{t as l}from"./chunk-YXSB6RET.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 d={Unknown:0,EnvironmentFile:1,Json:2,JsonWithComments:3,Toml:4,Yaml:5};var N={[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 ${N[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:O(r),filepath:e,format:t}:t===d.Yaml?{content:j(r),filepath:e,format:t}:t===d.Toml?{content:D(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}},S=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}},W=async(e,n)=>{let t=[];for(let r of n){let i=l.path.join(e,r),o=await S(i,r);o&&t.push(o)}return t},$=(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=$(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}},Y=e=>e===void 0?F:M(F,e),B=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=Y(r),a=B(t),p=l.path.resolve(n),s=[];for(;s=await W(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 G=(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",K=(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)},V=e=>`${JSON.stringify(e,null,2)}
|
|
2
|
+
`,q=async(e,n)=>{let t=JSON.parse(JSON.stringify(e.content));for(let[i,o]of Object.entries(n))K(t,i,o);let r=V(t);await l.fs.writeTextFile(e.filepath,r),e.content=t,e.rawText=r},H=(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=H(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(G(s.content,c)===t){a.push(s.filepath);continue}try{await q(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 z=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}},Q=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},X=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 Q(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,z as e,X as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as i}from"./chunk-SBOTNOWZ.js";import{t}from"./chunk-YXSB6RET.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,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
`);for(let e=0;e<r.length;e++){let i=r[e];for(let{name:c,pattern:l}of p)if(l.test(i)){
|
|
1
|
+
import{a as o}from"./chunk-SBOTNOWZ.js";var p=[{name:"AWS Access Key ID",pattern:/AKIA[0-9A-Z]{16}/},{name:"Private Key",pattern:/-----BEGIN\s{1,5}(RSA\s{1,5}|EC\s{1,5}|DSA\s{1,5}|OPENSSH\s{1,5})?PRIVATE KEY-----/},{name:"Generic secret assignment",pattern:/(?:secret|password|api_key|apikey|access_token|auth_token|private_key)\s{0,5}[=:]\s{0,5}["'][^"']{8,}["']/i}],d=[/\.lock$/,/package-lock\.json$/,/\.test\./,/testdata\//,/\.snap$/,/\.min\./],t=o({name:"validate-secrets",description:"Detect credentials and private keys",canFix:!1,stacks:[],defaults:{},checkFile(a,s){if(s===void 0)return[];for(let e of d)if(e.test(a.path))return[];let n=[],r=s.split(`
|
|
2
|
+
`);for(let e=0;e<r.length;e++){let i=r[e];for(let{name:c,pattern:l}of p)if(l.test(i)){n.push({path:a.path,line:e+1,message:`potential ${c} detected`});break}}return n}}),k=t.run,T=t.validator,y=t.main;export{t as a,k as b,T as c,y as d};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as l}from"./chunk-
|
|
1
|
+
import{a as l}from"./chunk-SBOTNOWZ.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 @@
|
|
|
1
|
+
import{a as r}from"./chunk-SBOTNOWZ.js";var a="\uFEFF",i=r({name:"validate-bom",description:"Remove UTF-8 byte order markers",canFix:!0,stacks:[],defaults:{},checkFile(e,t){return t===void 0?[]:t.startsWith(a)?[{path:e.path,message:"file has UTF-8 BOM"}]:[]},fixFile(e,t){if(!t.startsWith(a))return;let o=t.slice(1);return{path:e.path,oldContent:t,newContent:o}}}),u=i.run,d=i.validator,m=i.main;export{i as a,u as b,d as c,m as d};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{a as t}from"./chunk-
|
|
1
|
+
import{a as t}from"./chunk-SBOTNOWZ.js";var n=t({name:"validate-line-endings",description:"Normalize line endings to LF",canFix:!0,stacks:[],defaults:{},checkFile(i,e){return e===void 0?[]:e.includes("\r")?[{path:i.path,message:"file contains CRLF or CR line endings"}]:[]},fixFile(i,e){let r=e.replace(/\r\n/g,`
|
|
2
2
|
`).replace(/\r/g,`
|
|
3
3
|
`);if(r!==e)return{path:i.path,oldContent:e,newContent:r}}}),s=n.run,d=n.validator,p=n.main;export{n as a,s as b,d as c,p as d};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a as o}from"./chunk-SBOTNOWZ.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(`
|
|
2
|
+
`);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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as I,c as D}from"./chunk-SG4G3OOO.js";import{a as S,b as f}from"./chunk-FDZP7B5Y.js";import{a as m,b as T,c as A,d as N}from"./chunk-ACQUINWH.js";import{d as Y}from"./chunk-DXB73IDG.js";var J={};Y(J,{AlreadyExistsError:()=>A,NotFoundError:()=>T,ProcessError:()=>N,RuntimeCapabilityError:()=>m,buildCommand:()=>P,clearWorkerdEnv:()=>D,createRuntime:()=>G,current:()=>xe,detectExecutionContext:()=>V,detectInvoker:()=>b,detectRuntime:()=>a,getArch:()=>y,getCliCommand:()=>q,getHomedir:()=>R,getPlatform:()=>u,getPlatformInfo:()=>U,getRuntimeVersion:()=>M,getTmpdir:()=>v,isBrowser:()=>W,isCommandInPath:()=>c,isEdge:()=>B,isRuntime:()=>_,isServer:()=>j,populateEnvFromContext:()=>I,posixPath:()=>f,resolvePathDirs:()=>C,runtime:()=>o,searchFileHierarchy:()=>$,toPosix:()=>S});var i=globalThis,Z=()=>typeof i.caches<"u"&&typeof i.Request<"u"&&typeof i.Response<"u"&&typeof i.window>"u"&&typeof i.document>"u",ee=()=>typeof i.window<"u"||typeof i.document<"u",a=()=>{if(typeof globalThis>"u")return"unknown";if(typeof i.Bun<"u")return"bun";if(typeof i.Deno<"u")return"deno";let e=i.process;return e?.versions?.node&&!e?.versions?.bun?"node":Z()?"workerd":ee()?"browser":"unknown"},ne={deno:()=>i.Deno?.version?.deno??"unknown",bun:()=>i.Bun?.version??"unknown",node:()=>i.process?.versions?.node??"unknown",workerd:()=>"unknown",browser:()=>i.navigator?.userAgent??"unknown",unknown:()=>"unknown"},M=()=>ne[a()](),_=e=>a()===e,W=()=>a()==="browser",te=new Set(["deno","node","bun"]),j=()=>te.has(a()),B=()=>a()==="workerd";var oe=e=>{if(typeof Deno<"u"&&Deno.env?.get)return Deno.env.get(e);let n=globalThis.process;if(n?.env)return n.env[e]},x=(...e)=>{for(let n of e){let t=oe(n);if(t!==void 0)return t}},g=e=>{try{let n=globalThis.require;if(n instanceof Function)return n(e)}catch{}},w=()=>globalThis.process,h=()=>globalThis.navigator;var H={darwin:"darwin",linux:"linux",windows:"windows",win32:"windows"},u=()=>{if(typeof Deno<"u"&&Deno.build?.os)return H[Deno.build.os]??"linux";let e=w();if(e?.platform)return H[e.platform]??"linux";let n=h();if(n?.userAgent){let t=n.userAgent.toLowerCase();if(t.includes("mac"))return"darwin";if(t.includes("win"))return"windows";if(t.includes("linux"))return"linux"}return"linux"},L={x86_64:"amd64",x64:"amd64",aarch64:"arm64",arm64:"arm64"},y=()=>{if(typeof Deno<"u"&&Deno.build?.arch)return L[Deno.build.arch]??"amd64";let e=w();if(e?.arch)return L[e.arch]??"amd64";let n=h();if(n?.userAgent){let t=n.userAgent.toLowerCase();if(t.includes("arm64")||t.includes("aarch64"))return"arm64"}return"amd64"},R=()=>{let e=x("HOME","USERPROFILE");if(e)return e;let n=g("os");return n?.homedir?n.homedir():u()==="windows"?"C:\\Users\\Default":"/home"},v=()=>{let e=x("TMPDIR","TMP","TEMP");if(e)return e;let n=g("os");return n?.tmpdir?n.tmpdir():u()==="windows"?"C:\\Windows\\Temp":"/tmp"},U=()=>({platform:u(),arch:y(),homedir:R(),tmpdir:v()});var $=async(e,n,t={})=>{let{searchParents:r=!1}=t,s=e;for(;;){for(let l of n){let p=o.path.join(s,l);if(await o.fs.exists(p)&&(await o.fs.stat(p)).isFile)return p}if(!r)break;let d=o.path.dirname(s);if(d===s)break;s=d}};var C=(e,n)=>{let t=n==="windows"?";":":";return e.split(t).filter(r=>r.length>0)},b=(e,n,t,r,s)=>{if(t)return{invoker:"binary",mode:"installed"};if(n==="bun")return e.BUN_INSTALL!==void 0?{invoker:"bun",mode:"installed"}:{invoker:"bunx",mode:"on-demand"};if(n==="node"){let d=e.npm_execpath??"";return d.includes("npx")?{invoker:"npx",mode:"on-demand"}:d.includes("pnpm")?{invoker:"pnpx",mode:"on-demand"}:(e.npm_config_user_agent??"").includes("pnpm")?{invoker:"pnpm",mode:"installed"}:{invoker:"npm",mode:"installed"}}return n==="deno"?r!==void 0&&(r.startsWith("jsr:")||r.startsWith("https:"))?{invoker:"deno",mode:"on-demand"}:s===!0?{invoker:"dev",mode:"dev"}:{invoker:"deno",mode:"installed"}:{invoker:"unknown",mode:"installed"}},P=(e,n,t)=>e==="npx"?`npx ${t.npmPackage}`:e==="pnpx"?`pnpx ${t.npmPackage}`:e==="bunx"?`bunx ${t.npmPackage}`:e==="deno"&&n==="on-demand"?`deno run --allow-all jsr:${t.jsrPackage}`:e==="dev"?t.devCommand:t.command,c=async e=>{let n=u(),t=n==="windows"?`${e}.exe`:e,r=o.env.get("PATH")??"",s=C(r,n);for(let d of s)try{return await o.fs.stat(o.path.join(d,t)),!0}catch{continue}return!1},q=async e=>await c(e.command)?e.command:await c("npx")?`npx ${e.npmPackage}`:await c("pnpx")?`pnpx ${e.npmPackage}`:await c("bunx")?`bunx ${e.npmPackage}`:await c("deno")?`deno run --allow-all jsr:${e.jsrPackage}`:e.command,V=async e=>{let n=import.meta.filename===void 0,t=a(),r=import.meta.url,s={BUN_INSTALL:o.env.get("BUN_INSTALL"),npm_execpath:o.env.get("npm_execpath"),npm_config_user_agent:o.env.get("npm_config_user_agent")},d=!1;if(t==="deno"&&r.startsWith("file://"))try{let z=o.process.cwd(),Q=o.path.join(z,"deno.json"),X=await o.fs.readTextFile(Q),F=JSON.parse(X).tasks;F!==void 0&&"cli"in F&&(d=!0)}catch{}let{invoker:l,mode:p}=b(s,t,n,r,d),E=n?"compiled":["deno","node","bun"].includes(t)?t:"deno",O=P(l,p,e),K=await c(e.command);return{runtime:E,mode:p,invoker:l,command:O,isInPath:K}};var k=(e,n)=>()=>{throw new m(e,n)},se=e=>{let n=k("fs",e);return{readFile:n,readTextFile:n,writeFile:n,writeTextFile:n,exists:n,stat:n,lstat:n,mkdir:n,ensureDir:n,remove:n,readDir:n,copyFile:n,rename:n,makeTempDir:n,realPath:n,watch:n,walk:n,chmod:n}},ae=e=>{let n=k("exec",e);return{spawn:n,exec:n,execJson:n,spawnChild:n}},de=e=>{let n=k("process",e);return{exit:n,setExitCode:n,cwd:n,chdir:n,hostname:n,execPath:n,get args(){throw new m("process",e)},get pid(){throw new m("process",e)},get stdin(){throw new m("process",e)},get stdout(){throw new m("process",e)},get stderr(){throw new m("process",e)}}},me=()=>({get:()=>{},set:()=>{},delete:()=>{},has:()=>!1,toObject:()=>({})}),ce=e=>({name:e,version:"unknown",capabilities:{fs:!1,fsSync:!1,exec:!1,process:!1,env:!1,stdin:!1,stdout:!1,kv:!1},fs:se(e),path:f,exec:ae(e),env:me(),process:de(e)}),ue={deno:async()=>(await import("./deno-MMJLKXAE.js")).createDenoRuntime(),node:async()=>(await import("./node-SMAAGOR3.js")).createNodeRuntime(),bun:async()=>(await import("./bun-YFFBDKUJ.js")).createBunRuntime(),workerd:async()=>(await import("./workerd-LKKH32SO.js")).createWorkerdRuntime(),browser:async()=>(await import("./browser-XCMD2IZQ.js")).createBrowserRuntime()},pe=["fs","exec","env","path","process"],le=e=>e!==void 0&&pe.some(n=>e[n]!==void 0),fe=(e,n,t)=>({name:e.name,version:e.version,capabilities:t,fs:n.fs??e.fs,path:n.path??e.path,exec:n.exec??e.exec,env:n.env??e.env,process:n.process??e.process}),G=async e=>{let n=a(),t=ue[n],r=t!==void 0?await t():ce(n),s=e?.capabilities?{...r.capabilities,...e.capabilities}:r.capabilities;return e!==void 0&&le(e)?fe(r,e,s):e?.capabilities?{...r,capabilities:s}:r},o=await G(),xe=o;export{a,M as b,_ as c,W as d,j as e,B as f,u as g,y as h,R as i,v as j,U as k,$ as l,C as m,b as n,P as o,c as p,q,V as r,G as s,o as t,xe as u,J as v};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import{t as o}from"./chunk-YXSB6RET.js";var a="<!-- noskills:start -->",l="<!-- noskills:end -->",h=t=>{let e=[a,"## noskills orchestrator","","This project uses noskills. Do not read skill files, concern files,","or rule files directly.","","At every step, run:",""," npx eser noskills next","","Follow the output. To submit a result or answer:","",' npx eser noskills next --answer="your response here"',"","Do not make architectural decisions independently.","noskills will tell you what to do next."];if(t.length>0){e.push("","### Active Rules","");for(let s of t)e.push(`- ${s}`)}return e.push(l),e.join(`
|
|
2
|
+
`)},u=async(t,e)=>{let s=`${t}/CLAUDE.md`,n=h(e),r;try{r=await o.fs.readTextFile(s);let i=r.indexOf(a),c=r.indexOf(l);i!==-1&&c!==-1?r=r.slice(0,i)+n+r.slice(c+l.length):r=r.trimEnd()+`
|
|
3
|
+
|
|
4
|
+
`+n+`
|
|
5
|
+
`}catch{r=n+`
|
|
6
|
+
`}await o.fs.writeTextFile(s,r)};var d=async(t,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",'Follow the JSON output. Submit results with `npx eser noskills next --answer="..."`',""];if(e.length>0){s.push("## Rules","");for(let n of e)s.push(`- ${n}`);s.push("")}await o.fs.writeTextFile(`${t}/.cursorrules`,s.join(`
|
|
7
|
+
`))};var p=async(t,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let n of e)s.push(`- ${n}`);s.push("")}await o.fs.mkdir(`${t}/.kiro/steering`,{recursive:!0}),await o.fs.writeTextFile(`${t}/.kiro/steering/conventions.md`,s.join(`
|
|
8
|
+
`))};var m=async(t,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let n of e)s.push(`- ${n}`);s.push("")}await o.fs.mkdir(`${t}/.github`,{recursive:!0}),await o.fs.writeTextFile(`${t}/.github/copilot-instructions.md`,s.join(`
|
|
9
|
+
`))};var f=async(t,e)=>{let s=["# Generated by noskills \u2014 do not edit manually","","## Orchestration","","This project uses noskills for AI orchestration.","Run `npx eser noskills next` at every step.",""];if(e.length>0){s.push("## Rules","");for(let n of e)s.push(`- ${n}`);s.push("")}await o.fs.writeTextFile(`${t}/.windsurfrules`,s.join(`
|
|
10
|
+
`))};var T=async t=>{let e=`${t}/.nos/rules`,s=[];try{for await(let n of o.fs.readDir(e))if(n.isFile&&(n.name.endsWith(".md")||n.name.endsWith(".txt"))){let r=await o.fs.readTextFile(`${e}/${n.name}`);s.push(r.trim())}}catch{}return s},v={"claude-code":u,cursor:d,kiro:p,copilot:m,windsurf:f},F=async(t,e)=>{let s=await T(t),n=[];for(let r of e){let i=v[r];i!==void 0&&(await i(t,s),n.push(r))}return n};export{T as a,F as b};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{b as r}from"./chunk-BCHXUKWW.js";import{t as i}from"./chunk-YXSB6RET.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var b={400:"Bad Request",401:"Unauthorized",403:"Forbidden",404:"Not Found",405:"Method Not Allowed",406:"Not Acceptable",408:"Request Timeout",409:"Conflict",410:"Gone",413:"Payload Too Large",415:"Unsupported Media Type",422:"Unprocessable Entity",429:"Too Many Requests",500:"Internal Server Error",501:"Not Implemented",502:"Bad Gateway",503:"Service Unavailable",504:"Gateway Timeout"},p=class extends Error{status;constructor(e,r){super(r??b[e]??"Unknown Error"),this.name="HttpError",this.status=e}};var u=n=>e=>new p(n,e),W=u(400),q=u(401),X=u(403),J=u(404),Q=u(409),Z=u(422),ee=u(429),te=u(500),re=u(503);var d=()=>{let n=new Map,e=!1,r=()=>{if(e)throw new Error("ImmutableMapBuilder has been sealed. Use map.toBuilder() to create a new builder.")},a={set:(o,t)=>(r(),n.set(o,t),a),delete:o=>(r(),n.delete(o),a),has:o=>n.has(o),get size(){return n.size},build:()=>(r(),e=!0,f(n))};return a},m=n=>{let e=new Map;if(n)for(let[r,a]of n)e.set(r,a);return f(e)},f=n=>{let e={get:r=>n.get(r),has:r=>n.has(r),get size(){return n.size},get isEmpty(){return n.size===0},keys:function*(){yield*n.keys()},values:function*(){yield*n.values()},entries:function*(){for(let r of n.entries())yield r},forEach:r=>{for(let[a,o]of n)r(o,a,e)},[Symbol.iterator]:function*(){for(let r of n.entries())yield r},map:r=>{let a=d();for(let[o,t]of n)a.set(o,r(t,o));return a.build()},filter:r=>{let a=d();for(let[o,t]of n)r(t,o)&&a.set(o,t);return a.build()},reduce:(r,a)=>{let o=a;for(let[t,s]of n)o=r(o,s,t);return o},toBuilder:()=>{let r=d();for(let[a,o]of n)r.set(a,o);return r},merge:(...r)=>{let a=d();for(let[o,t]of n)a.set(o,t);for(let o of r)for(let[t,s]of o)a.set(t,s);return a.build()}};return Object.freeze(e)},M=m();var E=n=>{let e=new Map(n),r=!1,a=()=>{if(r)throw new Error("RegistryBuilder has been sealed. Use registry.toBuilder() to create a new builder.")},o={set:(t,s)=>(a(),e.set(t,["value",s]),o),setLazy:(t,s)=>(a(),e.set(t,["lazy",s]),o),remove:t=>(a(),e.delete(t),o),has:t=>e.has(t),get size(){return e.size},build:()=>(a(),r=!0,y(e))};return o},y=n=>{let e={entries:n,keysCache:null,valuesCache:null,entriesCache:null,lazyCache:new Map},r=(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=i();if(!(c instanceof Promise))return e.lazyCache.set(t,c),c},a=async(t,s)=>{let[l,i]=s;if(l==="value")return i;if(e.lazyCache.has(t))return e.lazyCache.get(t);let c=await i();return e.lazyCache.set(t,c),c};return Object.freeze({get:t=>{let s=e.entries.get(t);if(s!==void 0)return r(t,s)},getAsync:async t=>{let s=e.entries.get(t);if(s!==void 0)return await a(t,s)},has:t=>e.entries.has(t),isLazy:t=>{let s=e.entries.get(t);return s===void 0?!1:s[0]==="lazy"},keys:()=>(e.keysCache===null&&(e.keysCache=Object.freeze([...e.entries.keys()])),e.keysCache),values:()=>{if(e.valuesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push(l[1]):i==="lazy"&&e.lazyCache.has(s)&&t.push(e.lazyCache.get(s))}e.valuesCache=Object.freeze(t)}return e.valuesCache},entries:()=>{if(e.entriesCache===null){let t=[];for(let[s,l]of e.entries){let[i]=l;i==="value"?t.push([s,l[1]]):i==="lazy"&&e.lazyCache.has(s)&&t.push([s,e.lazyCache.get(s)])}e.entriesCache=Object.freeze(t)}return e.entriesCache},get size(){return e.entries.size},toBuilder:()=>E(e.entries)})},R=y(new Map);
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import{e as Q}from"./chunk-LOFP256P.js";import{f as p,h as u,k as d}from"./chunk-TTYO2XJO.js";import{b as r,d as c,e as m,f as w,g as Y,j as a}from"./chunk-PLJNPQFC.js";import{b as x}from"./chunk-BCHXUKWW.js";import{a as v}from"./chunk-EBYJBBYV.js";import{a as h,b as g}from"./chunk-DQAEQEXD.js";import{a as oe,g as z,h as K,i as B,r as U,t as i}from"./chunk-YXSB6RET.js";var X=()=>i.env.get("HOME")??"",k=()=>{let e=i.env.get("SHELL")??"";return e.includes("zsh")?"zsh":e.includes("fish")?"fish":"bash"},ae=e=>{let t=X();switch(e){case"zsh":return i.path.join(t,".zshrc");case"bash":return i.path.join(t,".bashrc");case"fish":return i.path.join(t,".config","fish","config.fish")}},ie=(e,t)=>{let s=X();switch(e){case"zsh":return i.path.join(s,".zshrc");case"bash":return i.path.join(s,".bashrc");case"fish":return i.path.join(s,".config","fish","completions",`${t}.fish`)}},A=(e,t)=>`eval "$(${t} system completions --shell ${e})"`,le=e=>e==="fish"?"file":"eval",E=(e,t="eser")=>{let s=e??k(),n=le(s);return{shell:s,rcFile:ae(s),completionType:n,completionsFile:n==="file"?ie(s,t):void 0}};var ce="# eser CLI completions",j="eser",ee=async e=>{try{return await i.fs.readTextFile(e)}catch{return""}},de=async e=>{try{return await i.fs.stat(e),!0}catch{return!1}},te=async e=>{let t=E(e,j);if(t.completionType==="file")return await de(t.completionsFile);let s=await ee(t.rcFile),n=A(e,j);return s.includes(n)},se=async e=>{let t=E(e,j),s=p({renderer:d.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile,o=i.path.dirname(n);try{await i.fs.mkdir(o,{recursive:!0})}catch{}await i.fs.writeTextFile(n,`# eser CLI completions
|
|
2
|
+
# This file is auto-generated. Run 'eser system completions --shell fish' to regenerate.
|
|
3
|
+
complete -c eser -f
|
|
4
|
+
complete -c eser -n "__fish_use_subcommand" -a "codebase" -d "Codebase management tools"
|
|
5
|
+
complete -c eser -n "__fish_use_subcommand" -a "system" -d "Commands related with this CLI"
|
|
6
|
+
complete -c eser -n "__fish_use_subcommand" -a "install" -d "Install eser CLI globally"
|
|
7
|
+
complete -c eser -n "__fish_use_subcommand" -a "update" -d "Update eser CLI to latest version"
|
|
8
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "install" -d "Install eser CLI globally"
|
|
9
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "uninstall" -d "Uninstall eser CLI globally"
|
|
10
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "update" -d "Update eser CLI to latest version"
|
|
11
|
+
complete -c eser -n "__fish_seen_subcommand_from system" -a "completions" -d "Generate shell completion scripts"
|
|
12
|
+
`),s.writeln(r(" "),c("Created"),r(" "),a(n))}else{let n=await ee(t.rcFile),o=A(e,j);if(!n.includes(o)){let f=`
|
|
13
|
+
${ce}
|
|
14
|
+
${o}
|
|
15
|
+
`;await i.fs.writeTextFile(t.rcFile,n+f),s.writeln(r(" "),c("Added completions to"),r(" "),a(t.rcFile))}}}catch(n){s.writeln(Y(` Warning: Could not add shell completions: ${n instanceof Error?n.message:String(n)}`))}await s.close()},me=async e=>{let t=E(e,j),s=p({renderer:d.ansi(),sink:u.stdout()});try{if(t.completionType==="file"){let n=t.completionsFile;await de(n)&&(await i.fs.remove(n),s.writeln(r(" "),c("Removed"),r(" "),a(n)))}else{let n=await ee(t.rcFile);if(n===""){await s.close();return}let o=A(e,j);if(!n.includes(o)){await s.close();return}let f=n.split(`
|
|
16
|
+
`).filter(l=>!l.includes("eser system completions")).filter(l=>l!==ce).join(`
|
|
17
|
+
`).replace(/\n{3,}/g,`
|
|
18
|
+
|
|
19
|
+
`);await i.fs.writeTextFile(t.rcFile,f),s.writeln(r(" "),c("Removed completions from"),r(" "),a(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=i,ye={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},pe={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"]}},ve=async()=>{let e=B(),t=L.path.join(e,".local","bin");try{return await L.fs.stat(t),t}catch{}return"/usr/local/bin"},ke=async()=>{let e=L.process.execPath(),t=await ve(),s=L.path.join(t,"eser"),n=p({renderer:d.ansi(),sink:u.stdout()});n.writeln(r("Install method: "),a("compiled binary")),n.writeln(c(`Copying to ${s}...`));try{await L.fs.copyFile(e,s),await L.fs.chmod(s,493)}catch(l){if(l instanceof Deno.errors.PermissionDenied)return n.writeln(m(`
|
|
20
|
+
Permission denied writing to ${t}.
|
|
21
|
+
Try: sudo eser install`)),await n.close(),g({exitCode:1});throw await n.close(),l}n.writeln(w(`
|
|
22
|
+
Installation complete!`)),n.writeln(r("You can now use "),a("eser"),r(" from anywhere in your terminal."));let o=k();if(!await te(o)){n.writeln(r(`
|
|
23
|
+
Setting up `),a(o),r(" completions...")),await se(o);let l=E(o);l.completionType==="eval"&&n.writeln(c(` Restart your shell or run 'source ${l.rcFile}' to enable completions.`))}return await n.close(),h(void 0)},Ee=async e=>{let t=await U(ye);if(t.invoker==="binary")return await ke();let s=p({renderer:d.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),a(t.runtime));let n=pe[t.runtime]??pe.node,{cmd:o,args:f}=n;s.writeln(c(`Running: ${o} ${f.join(" ")}`)),s.writeln();let l=await x`${o} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();if(!l.success)return s.writeln(m(`
|
|
24
|
+
Installation failed.`)),await s.close(),g({exitCode:l.code});s.writeln(w(`
|
|
25
|
+
Installation complete!`)),s.writeln(r("You can now use "),a("eser"),r(" from anywhere in your terminal."));let y=k();if(!await te(y)){s.writeln(r(`
|
|
26
|
+
Setting up `),a(y),r(" completions...")),await se(y);let G=E(y);G.completionType==="eval"&&s.writeln(c(` Restart your shell or run 'source ${G.rcFile}' to enable completions.`))}return await s.close(),h(void 0)};var Pe={deno:{cmd:"deno",args:["uninstall","-g","eser"]},node:{cmd:"npm",args:["uninstall","-g","eser"]},bun:{cmd:"bun",args:["remove","-g","eser"]}},$e=async e=>{let t=oe(),s=p({renderer:d.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),a(t));let n=Pe[t];if(n===void 0){let R=d.ansi();return await s.close(),g({message:`${R.render([m(`
|
|
27
|
+
Unsupported runtime: ${t}`)])}
|
|
28
|
+
Global uninstallation is only supported for Deno, Node.js, and Bun.`,exitCode:1})}let{cmd:o,args:f}=n,l=k();s.writeln(r(`
|
|
29
|
+
Removing `),a(l),r(" completions...")),await me(l),s.writeln(c(`
|
|
30
|
+
Running: ${o} ${f.join(" ")}`)),s.writeln();let y=await x`${o} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();return y.success?(s.writeln(w(`
|
|
31
|
+
Uninstallation complete!`)),s.writeln(r("The "),a("eser"),r(" command has been removed from your system.")),await s.close(),h(void 0)):(s.writeln(m(`
|
|
32
|
+
Uninstallation failed.`)),await s.close(),g({exitCode:y.code}))};var N=i,ue=".cache/eser",Se="latest-version.json",_e=24*60*60*1e3,Re="https://api.github.com/repos/eser/stack/releases/latest",fe=()=>{let e=B();return N.path.join(e,ue,Se)},Ae=()=>{let e=B();return N.path.join(e,ue)},be=async()=>{try{let e=fe();if(!await N.fs.exists(e))return;let s=await N.fs.readTextFile(e),n=JSON.parse(s);return typeof n.latestVersion!="string"||typeof n.checkedAt!="number"?void 0:n}catch{return}},Te=async e=>{try{let t=Ae();await N.fs.ensureDir(t);let s=fe(),n={latestVersion:e,checkedAt:Date.now()};await N.fs.writeTextFile(s,JSON.stringify(n))}catch{}},Fe=async()=>{try{let e=await fetch(Re,{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}},V=async()=>{try{let e=v.version,t=await be();if(t!==void 0&&Date.now()-t.checkedAt<_e)return{latestVersion:t.latestVersion,currentVersion:e,updateAvailable:Q(e,t.latestVersion)};let s=await Fe();return s===void 0?void 0:(await Te(s),{latestVersion:s,currentVersion:e,updateAvailable:Q(e,s)})}catch{return}};var C=i,He={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},he={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"]}},Ue={"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"},je=()=>{let e=z(),t=K(),s=`${e}-${t}`;return Ue[s]},De=async()=>{let e=p({renderer:d.ansi(),sink:u.stdout()});e.writeln(r("Install method: "),a("compiled binary")),e.writeln(r("Current version: "),a(v.version),r(`
|
|
33
|
+
`)),e.writeln(r("Checking for updates..."));let t=await V();if(t===void 0)return e.writeln(m("Could not check for updates.")),await e.close(),g({exitCode:1});if(!t.updateAvailable)return e.writeln(w(`
|
|
34
|
+
Already up to date (v${v.version}).`)),await e.close(),h(void 0);e.writeln(r(`
|
|
35
|
+
New version available: `),a(`v${t.latestVersion}`));let s=je();if(s===void 0){let $=z(),T=K();return e.writeln(m(`
|
|
36
|
+
Unsupported platform: ${$}-${T}`)),await e.close(),g({exitCode:1})}let n=`v${t.latestVersion}`,o=z()==="windows",l=`eser-${n}-${s}.${o?"zip":"tar.gz"}`,y=`https://github.com/eser/stack/releases/download/${n}`;e.writeln(c(`Downloading ${l}...`));let R=await fetch(`${y}/${l}`);if(!R.ok)return e.writeln(m(`
|
|
37
|
+
Failed to download: HTTP ${R.status}`)),await e.close(),g({exitCode:1});let G=await fetch(`${y}/SHA256SUMS.txt`);if(G.ok){let T=(await G.text()).split(`
|
|
38
|
+
`).find(F=>F.includes(l));if(T!==void 0){let F=T.split(/\s+/)[0],H=new Uint8Array(await R.clone().arrayBuffer()),S=await crypto.subtle.digest("SHA-256",H);if(Array.from(new Uint8Array(S)).map(Ce=>Ce.toString(16).padStart(2,"0")).join("")!==F)return e.writeln(m(`
|
|
39
|
+
SHA256 checksum verification failed.`)),await e.close(),g({exitCode:1});e.writeln(c("Checksum verified."))}}let b=await C.fs.makeTempDir({prefix:"eser-update-"});try{let $=C.path.join(b,l),T=new Uint8Array(await R.arrayBuffer());await C.fs.writeFile($,T),o?await x`powershell -Command "Expand-Archive -Path ${$} -DestinationPath ${b}"`.spawn():await x`tar -xzf ${$} -C ${b}`.spawn();let F=o?C.path.join(b,"eser.exe"):C.path.join(b,"eser"),H=C.process.execPath();if(o){let S=H.replace(/\.exe$/i,".new.exe");await C.fs.copyFile(F,S),e.writeln(w(`
|
|
40
|
+
Downloaded v${t.latestVersion}!`)),e.writeln(r(`
|
|
41
|
+
To complete the update, close this terminal and rename:
|
|
42
|
+
`),a(S),r(`
|
|
43
|
+
to:
|
|
44
|
+
`),a(H))}else{let S=`${H}.new`;await C.fs.copyFile(F,S),await C.fs.chmod(S,493),await C.fs.rename(S,H),e.writeln(w(`
|
|
45
|
+
Updated to v${t.latestVersion}!`))}}catch($){if($ instanceof Deno.errors.PermissionDenied)return e.writeln(m(`
|
|
46
|
+
Permission denied. Try running with sudo:
|
|
47
|
+
sudo eser update`)),await e.close(),g({exitCode:1});throw await e.close(),$}finally{try{await C.fs.remove(b,{recursive:!0})}catch{}}return await e.close(),h(void 0)},Ie=async e=>{let t=await U(He);if(t.invoker==="binary")return await De();let s=p({renderer:d.ansi(),sink:u.stdout()});s.writeln(r("Detected runtime: "),a(t.runtime));let n=he[t.runtime]??he.node,{cmd:o,args:f}=n;s.writeln(c(`Running: ${o} ${f.join(" ")}`)),s.writeln();let l=await x`${o} ${f}`.stdout("inherit").stderr("inherit").noThrow().spawn();return l.success?(s.writeln(w(`
|
|
48
|
+
Update complete!`)),s.writeln(r("The "),a("eser"),r(" command has been updated to the latest version.")),await s.close(),h(void 0)):(s.writeln(m(`
|
|
49
|
+
Update failed.`)),await s.close(),g({exitCode:l.code}))};var Le=e=>{let t=E(e,"eser"),s=d.ansi();if(t.completionType==="file")return`
|
|
50
|
+
To install, run:
|
|
51
|
+
|
|
52
|
+
${s.render([c(`eser system completions --shell fish > ${t.completionsFile}`)])}
|
|
53
|
+
`;let n=A(e,"eser");return`
|
|
54
|
+
To install, add the following to your ${s.render([a(t.rcFile)])}:
|
|
55
|
+
|
|
56
|
+
${s.render([c(n)])}
|
|
57
|
+
`},Ne=e=>{let t=e.flags.shell,s=d.ansi(),n=p({renderer:s,sink:u.stdout()}),o;if(t!==void 0){if(!["bash","zsh","fish"].includes(t))return g({message:`${s.render([m(`Invalid shell: ${t}`)])}
|
|
58
|
+
Supported shells: bash, zsh, fish`,exitCode:1});o=t}else o=k();let l=e.root.completions(o);return t===void 0&&(n.writeln(r("Generating "),a(o),r(" completions...")),console.log(Le(o)),n.writeln(c(`--- Completion script ---
|
|
59
|
+
`))),console.log(l),h(void 0)};var Ve=200,Oe=async e=>{let t=p({renderer:d.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(o=>{setTimeout(()=>o(void 0),Ve)}),n=await Promise.race([V(),s]);n!==void 0&&n.updateAvailable&&t.writeln(c(` Update available: v${n.latestVersion} \u2014 run 'eser update'`))}catch{}return await t.close(),h(void 0)};var q=i,Ge={command:"eser",devCommand:"deno task cli",npmPackage:"eser",jsrPackage:"@eser/cli"},J=17,_=p({renderer:d.ansi(),sink:u.stdout()}),O=(e,t)=>{let s=`${e}:`.padEnd(J);_.writeln(r(` ${s}`),w("\u2713"),r(` ${t}`))},P=(e,t)=>{let s=`${e}:`.padEnd(J);_.writeln(r(` ${s}`),m("\u2717"),r(` ${t}`))},ge=(e,t)=>{let s=`${e}:`.padEnd(J);_.writeln(r(` ${s}${t}`))},Be=(e,t)=>{let s=`${e}:`.padEnd(J);_.writeln(r(` ${s}`),c("-"),r(` ${t}`))},we=async e=>{try{return await q.fs.stat(e),!0}catch{return!1}},Me=async e=>{try{return await q.fs.readTextFile(e)}catch{return""}},xe=(e,t)=>e.match(t)?.[1],ze=async()=>{let e=q.path.join(".",".git","hooks","pre-commit");if(!await we(e)){P("Git hooks","Not installed");return}(await Me(e)).includes("eser")?O("Git hooks","Installed"):P("Git hooks","Not installed")},We=async()=>{let e=q.path.join(".",".manifest.yml");await we(e)?O("Manifest",".manifest.yml found"):P("Manifest",".manifest.yml not found")},qe=async()=>{try{let e=await x`deno --version`.noThrow().quiet().text(),t=xe(e,/deno\s+(\S+)/);t!==void 0?O("Deno",t):P("Deno","Not found")}catch{P("Deno","Not found")}},Je=async()=>{try{let e=await x`go version`.noThrow().quiet().text(),t=xe(e,/go(\d+\.\d+(?:\.\d+)?)/);t!==void 0?O("Go",t):P("Go","Not found")}catch{P("Go","Not found")}},Ke=async()=>{try{let t=(await x`node --version`.noThrow().quiet().text()).trim();t.length>0?O("Node",t):P("Node","Not found")}catch{P("Node","Not found")}},Ye=async e=>{_.writeln(r(`eser doctor
|
|
60
|
+
`));let t=await U(Ge);ge("Install method",`${t.invoker} (${t.mode})`),ge("Version",v.version);let s=await V();return s===void 0?Be("Update","Could not check for updates"):s.updateAvailable?P("Update",`Update available: v${s.latestVersion}`):O("Update","Up to date"),_.writeln(),await ze(),await We(),_.writeln(),await qe(),await Je(),await Ke(),await _.close(),h(void 0)};export{Ee as a,$e as b,Ie as c,Ne as d,Oe as e,Ye as f};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-BDTJR6UH.js";import"./chunk-3K42AALS.js";import"./chunk-OLM5RTFK.js";import"./chunk-BCHXUKWW.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";export{a as ClaudeCodeModel,b as claudeCodeFactory};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as E,b as A}from"./chunk-NLNSK3KE.js";import{e as x}from"./chunk-Q54LOR4S.js";import{a as P,d as j}from"./chunk-NUSNMQPL.js";import{j as $}from"./chunk-5AK4OGCO.js";import{f as k,h as b,k as C}from"./chunk-TTYO2XJO.js";import{d,e as R,f as h,j as v}from"./chunk-PLJNPQFC.js";import{a as w}from"./chunk-HPPFA3XU.js";import{a as p,b as c,c as y}from"./chunk-DQAEQEXD.js";import{t as f}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var S=r=>{let n=r.replace(/^gh:/,""),[t,e]=n.split("#");if(t===void 0)return;let s=t.split("/");if(!(s.length!==2||s[0]===""||s[1]===""))return{owner:s[0],repo:s[1],ref:e??"main"}},I=r=>P(async n=>{try{let{specifier:t}=r,e=r.recipePath??"recipe.json",s=await $(t.owner,t.repo,t.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 u=`https://raw.githubusercontent.com/${t.owner}/${t.repo}/${t.ref}`,i=await x(s,{cwd:o,registryUrl:u,force:r.force,skipExisting:r.skipExisting,dryRun:r.dryRun,verbose:r.verbose,variables:a}),m=await E(o),g=A(s,m),H=r.dryRun?"Would write":"Cloned";n.out.writeln(h(`\u2713 ${H} ${i.written.length} file(s) from ${s.name}`));for(let l of i.written)n.out.writeln(` \u2192 ${l}`);if(i.postInstallRan.length>0){n.out.writeln(d(`
|
|
2
|
+
Post-install:`));for(let l of i.postInstallRan)n.out.writeln(d(` \u2713 ${l}`))}if(g.instructions.length>0){n.out.writeln(d(`
|
|
3
|
+
Dependencies:`));for(let l of g.instructions)n.out.writeln(d(` Run: ${l}`))}return p({recipe:s,result:i,depInfo:g,targetDir:o})}catch(t){let e=t instanceof Error?t.message:String(t);return c({_tag:"ApplyError",message:e})}});var B=async r=>{let n=w(r??[],{string:["recipe","name","var"],boolean:["force","dry-run","skip-existing","verbose"],collect:["var"],alias:{p:"name"}}),t=n._[0],e=k({renderer:C.ansi(),sink:b.stdout()});if(t===void 0)return e.writeln("Usage: eser kit clone <specifier> [options]"),e.writeln(),e.writeln("Specifier formats:"),e.writeln(" eser/ajan GitHub repo (default branch)"),e.writeln(" gh:eser/ajan#v1.0 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(),p(void 0);let s=S(t);if(s===void 0)return e.writeln(R(`Invalid specifier: '${t}'. Use format: owner/repo or gh:owner/repo#ref`)),await e.close(),c({exitCode:1});let o={};for(let u of n.var){let[i,...m]=String(u).split("=");i!==void 0&&i!==""&&(o[i]=m.join("="))}e.writeln(v(`
|
|
4
|
+
Cloning from ${s.owner}/${s.repo}@${s.ref}...
|
|
5
|
+
`));let a=await j(I({specifier:s,recipePath:n.recipe,cwd:f.process.cwd(),projectName:n.name,dryRun:n["dry-run"]===!0,force:n.force===!0,skipExisting:n["skip-existing"]===!0,verbose:n.verbose===!0,variables:o}),{out:e});return await e.close(),y(a)?p(void 0):c({exitCode:1})};export{B as main};
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import"./chunk-Q7QMINSQ.js";import{a as w,b as x}from"./chunk-6FMPNAZ3.js";import{a as h}from"./chunk-
|
|
1
|
+
import"./chunk-Q7QMINSQ.js";import{a as w,b as x}from"./chunk-6FMPNAZ3.js";import{a as h}from"./chunk-5MN3MWQN.js";import"./chunk-ZED5RIVL.js";import{f,h as g,k as p}from"./chunk-TTYO2XJO.js";import{c as n,d,e as u}from"./chunk-PLJNPQFC.js";import"./chunk-OLM5RTFK.js";import{b as o}from"./chunk-BCHXUKWW.js";import"./chunk-RYLOB2JU.js";import"./chunk-UNL4H5EY.js";import"./chunk-DWYVBWBP.js";import"./chunk-HPPFA3XU.js";import{a as l,b as m}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var b=`Output ONLY a conventional commit message. No explanation, no markdown, no code blocks, no bullet points.
|
|
2
2
|
|
|
3
3
|
Format: type(scope): description
|
|
4
4
|
Types: feat, fix, chore, docs, refactor, test, style, perf, ci, build
|
|
5
5
|
Max 72 characters. One line only. No body. No quotes. No backticks.
|
|
6
6
|
|
|
7
7
|
Example output:
|
|
8
|
-
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-
|
|
8
|
+
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-5ACKR2OE.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:
|
|
9
9
|
|
|
10
10
|
${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 +1 @@
|
|
|
1
|
-
import{a as P,b as v,c as x,d as O}from"./chunk-WUJUQPHI.js";import"./chunk-A2GDVOQP.js";import{d as h,e as D,f as g,g as f,i as F,j as w,k,n as S}from"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{a as y}from"./chunk-
|
|
1
|
+
import{a as P,b as v,c as x,d as O}from"./chunk-WUJUQPHI.js";import"./chunk-A2GDVOQP.js";import{d as h,e as D,f as g,g as f,i as F,j as w,k,n as S}from"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{a as y}from"./chunk-T7K64JD5.js";import{b as d,d as p}from"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var b={fs:!0,fsSync:!0,exec:!0,process:!0,env:!0,stdin:!0,stdout:!0,kv:!0},E=()=>{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-WRDBWEC2.js");await r(t,e)}}},R=()=>({join:w,resolve:S,dirname:f,basename:h,extname:P,normalize:k,isAbsolute:F,relative:O,parse:x,format:v,sep:g,delimiter:D}),A=()=>({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 p(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)}}}}),T=()=>({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}),U=()=>{let n=E(),t=R(),e=A(),r=T(),a=I();return{name:"deno",version:Deno.version.deno,capabilities:b,fs:n,path:t,exec:e,env:r,process:a}};export{b as DENO_CAPABILITIES,U as createDenoRuntime};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{f as a,h as l,k as i}from"./chunk-
|
|
1
|
+
import{f as a,h as l,k as i}from"./chunk-TTYO2XJO.js";import{j as n}from"./chunk-PLJNPQFC.js";import"./chunk-ZOZYBQX2.js";import{a as t}from"./chunk-DWYVBWBP.js";import"./chunk-HPPFA3XU.js";import{a as o}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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(`
|
|
2
2
|
\u26A1 Starting development server...
|
|
3
|
-
`));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-
|
|
3
|
+
`));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-FQFNY7SM.js"),import("./mod-VZPKQ7DG.js"),import("./mod-TLLZ3NAM.js"),import("./mod-U6LEXPVR.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b,c,d,e,f,g,h}from"./chunk-CPRLAMEG.js";import"./chunk-2J2PXBOC.js";import"./chunk-BCHXUKWW.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-3EFU5R2M.js";import"./chunk-762C2IM6.js";import"./chunk-5MN3MWQN.js";import"./chunk-OLM5RTFK.js";import"./chunk-DXB73IDG.js";export{a as GeminiModel,b as geminiFactory};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as l}from"./chunk-KAEAT6A4.js";import"./chunk-ZH37DSUQ.js";import"./chunk-LOFP256P.js";import"./chunk-ZF2XYULB.js";import"./chunk-4S7QYPS6.js";import"./chunk-2J2PXBOC.js";import"./chunk-TTYO2XJO.js";import"./chunk-USCAYIWL.js";import{b as o,e as r,h as i}from"./chunk-PLJNPQFC.js";import{g as t}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var c=l(),m=()=>{c.writeln(i("\u2139"),o(` eser codebase gh \u2014 GitHub operations
|
|
2
|
+
`)),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(`
|
|
3
|
+
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-G3QZZAUO.js")).main(e);case"release-notes":return await(await import("./release-notes-734LKEJB.js")).main(e);case"release-tag":return await(await import("./release-tag-YX727TXO.js")).main(e);default:return c.writeln(r("\u2717"),o(` Unknown gh subcommand: ${s}
|
|
4
|
+
`)),m(),t.fail({exitCode:1})}};export{w as main};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import"./chunk-DDLQMSA7.js";import{a as A}from"./chunk-6U2VEZEM.js";import{a as
|
|
1
|
+
import"./chunk-DDLQMSA7.js";import{a as A}from"./chunk-6U2VEZEM.js";import{a as y,b as $}from"./chunk-KAEAT6A4.js";import"./chunk-ZH37DSUQ.js";import"./chunk-LOFP256P.js";import"./chunk-ZF2XYULB.js";import"./chunk-4S7QYPS6.js";import{f as R}from"./chunk-NUSNMQPL.js";import"./chunk-2J2PXBOC.js";import"./chunk-TTYO2XJO.js";import"./chunk-USCAYIWL.js";import{b as c,e as C,f as g,h as x}from"./chunk-PLJNPQFC.js";import{c as l}from"./chunk-BCHXUKWW.js";import"./chunk-ZOZYBQX2.js";import"./chunk-UNL4H5EY.js";import"./chunk-DWYVBWBP.js";import{a as w}from"./chunk-HPPFA3XU.js";import{g as a}from"./chunk-DQAEQEXD.js";import"./chunk-WUJUQPHI.js";import"./chunk-A2GDVOQP.js";import{n as b}from"./chunk-GLSCZGXA.js";import"./chunk-ZE5T64HQ.js";import{v as p}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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}
|
|
2
2
|
${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>
|
|
3
3
|
${i.join(`
|
|
4
4
|
`)}
|
|
5
|
-
</tr>`)}return`${
|
|
5
|
+
</tr>`)}return`${m}
|
|
6
6
|
<table>
|
|
7
7
|
${n.join(`
|
|
8
8
|
`)}
|
|
9
9
|
</table>
|
|
10
|
-
${u}`},T=(t,e)=>{let n=t.indexOf(
|
|
10
|
+
${u}`},T=(t,e)=>{let n=t.indexOf(m),r=t.indexOf(u);if(n===-1||r===-1)throw new Error(`Could not find contributor markers in README. Add '${m}' and '${u}' markers to the file.`);let o=t.slice(0,n),i=t.slice(r+u.length),s=`${o}${e}${i}`;return{content:s,changed:s!==t}},k=async(t={})=>{let{readmePath:e="README.md",columnsPerRow:n=8,commit:r=!1}=t,o=b(e),i=await O(),s=await U(i.owner,i.name),E=M(s,n),P=await p.runtime.fs.readTextFile(o),{content:v,changed:h}=T(P,E),f=!1;return h&&(await p.runtime.fs.writeTextFile(o,v),r&&(await l.exec`git add ${o}`.spawn(),await l.exec`git -c user.name=${"github-actions[bot]"} -c user.email=${"github-actions[bot]@users.noreply.github.com"} commit -m ${"docs: update contributors list"}`.spawn(),await l.exec`git push`.spawn(),f=!0)),{contributorCount:s.length,readmePath:o,updated:h,committed:f}},N=t=>R.fromPromise(()=>k(t)),S=t=>{let e=t.flags.columns,n=e!==void 0?Number(e):void 0;return a.ok({readmePath:t.flags.readme??void 0,columnsPerRow:n,commit:t.flags.commit===!0})},I=t=>{if(a.isFail(t)){let n=t.error,r=n instanceof Error?n.message:n.message??String(n);return d.writeln(C("\u2717"),c(" "+r)),a.fail({exitCode:1})}let{value:e}=t;return e.updated?e.committed?d.writeln(g("\u2713"),c(` Updated ${e.contributorCount} contributors and committed changes.`)):d.writeln(g("\u2713"),c(` Updated ${e.contributorCount} contributors in ${e.readmePath}.`)):d.writeln(x("\u2139"),c(` No changes \u2014 ${e.contributorCount} contributors already up to date.`)),a.ok(void 0)},D=A.createTrigger({handler:N,adaptInput:S,adaptOutput:I}),G=async t=>{let e=w(t??[],{string:["columns","readme"],boolean:["commit"],alias:{h:"help"}});if(e.help)return console.log(`eser codebase gh contributors \u2014 Update contributor list
|
|
11
11
|
`),console.log("Options:"),console.log(" --columns <n> Number of columns per row (default: 8)"),console.log(" --readme <path> Path to README.md (default: README.md)"),console.log(" --commit Auto-commit and push changes"),console.log(" --help, -h Show this help"),a.ok(void 0);let n=$("gh-contributors",e);return await D(n)};export{U as fetchContributors,M as generateContributorMarkdown,O as getRepoInfo,D as handleCli,G as main,T as replaceContributorSection,k as updateContributors,N as updateContributorsHandler};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as m}from"./chunk-BK2BDHKB.js";import{a as $,b as v,e as k,g as P,h as j,j as b,k as C}from"./chunk-NT2MQK7O.js";import"./chunk-Q7QMINSQ.js";import"./chunk-6FMPNAZ3.js";import"./chunk-5MN3MWQN.js";import{a as y}from"./chunk-ZED5RIVL.js";import{f as w,h as g,k as h}from"./chunk-TTYO2XJO.js";import{c as p,d as a,f as o,g as u}from"./chunk-PLJNPQFC.js";import"./chunk-OLM5RTFK.js";import"./chunk-BCHXUKWW.js";import"./chunk-RYLOB2JU.js";import"./chunk-UNL4H5EY.js";import"./chunk-DWYVBWBP.js";import"./chunk-HPPFA3XU.js";import{a as d}from"./chunk-DQAEQEXD.js";import{t as c}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";var x=y;var i=async t=>{try{return await c.fs.stat(t),!0}catch{return!1}},D=async(t,e)=>{try{let n=await c.fs.readTextFile(t);return JSON.parse(n)[e]??null}catch{return null}},T=async t=>{let e=[];return(await i(`${t}/package.json`)||await i(`${t}/deno.json`))&&e.push("typescript"),await i(`${t}/go.mod`)&&e.push("go"),await i(`${t}/Cargo.toml`)&&e.push("rust"),(await i(`${t}/pyproject.toml`)||await i(`${t}/setup.py`))&&e.push("python"),e},z=async t=>{let e=[],n=await D(`${t}/package.json`,"dependencies");return n!==null&&("react"in n&&e.push("react"),"vue"in n&&e.push("vue"),"svelte"in n&&e.push("svelte"),"next"in n&&e.push("nextjs"),"express"in n&&e.push("express"),"hono"in n&&e.push("hono")),e},B=async t=>{let e=[];return await i(`${t}/.github/workflows`)&&e.push("github-actions"),await i(`${t}/.gitlab-ci.yml`)&&e.push("gitlab-ci"),await i(`${t}/Jenkinsfile`)&&e.push("jenkins"),await i(`${t}/.circleci`)&&e.push("circleci"),e},E=async t=>{if(await i(`${t}/deno.json`))return"deno";let e=await D(`${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},I=async t=>{let[e,n,r,l]=await Promise.all([T(t),z(t),B(t),E(t)]);return{languages:e,frameworks:n,ci:r,testRunner:l}};var Q=async t=>{let e=w({renderer:h.ansi(),sink:g.stdout()}),n=c.process.cwd();if(await C(n))return e.writeln(u("noskills is already initialized in this project.")),e.writeln(a("Run `noskills sync` to regenerate tool files.")),await e.close(),d(void 0);e.writeln(p("noskills init")),e.writeln(""),e.writeln(a("Scanning project..."));let r=await I(n);for(let s of r.languages)e.writeln(" ",o("\u2714"),` ${s}`);for(let s of r.frameworks)e.writeln(" ",o("\u2714"),` ${s}`);for(let s of r.ci)e.writeln(" ",o("\u2714"),` ${s}`);r.testRunner!==null&&e.writeln(" ",o("\u2714"),` test runner: ${r.testRunner}`),e.writeln(""),e.writeln(a("Detecting AI providers..."));let l=await x();for(let s of l)s.available?e.writeln(" ",o("\u25CF")," ",p(`${s.name} (${s.alias})`),a(` ${s.detail}`)):e.writeln(" ",a("\u25CB")," ",a(`${s.name} (${s.alias}) ${s.detail}`));let f=l.filter(s=>s.available).map(s=>s.name);e.writeln(""),e.writeln(a("Initializing...")),await b(n),e.writeln(" Created .nos/");for(let s of m)await j(n,s);e.writeln(` Bootstrapped ${m.length} concerns into .nos/concerns/`);let N=v([],f,r);await P(n,N),e.writeln(" Created .nos/config.json");let R=$();await k(n,R),e.writeln(" Created .nos/.state/state.json"),e.writeln("");let S=f.length;return e.writeln(o("Done."),` ${S} AI provider(s) detected.`),e.writeln("Start a spec with: ",p('noskills spec new "..."')),await e.close(),d(void 0)};export{Q as main};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{f as P,h as R,k as F}from"./chunk-TTYO2XJO.js";import{b as t,c as E,d as s,e as o,f as x,j as v}from"./chunk-PLJNPQFC.js";import"./chunk-ZOZYBQX2.js";import{a as T}from"./chunk-DWYVBWBP.js";import"./chunk-HPPFA3XU.js";import{a as A,b as i,f as $}from"./chunk-DQAEQEXD.js";import{t as b}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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(`
|
|
2
|
+
Error: Invalid template "${l}"`)])}
|
|
3
|
+
Available templates: ${S.join(", ")}`,exitCode:1});e.writeln(v(`
|
|
4
|
+
\u2728 Creating new laroux.js project in ./${r}
|
|
5
|
+
`)),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(`
|
|
6
|
+
Could not create directory: ${d}`)]),exitCode:1})}e.writeln(s(` Fetching from gh:${c}/${p}...
|
|
7
|
+
`));try{let a=await import("./registry-fetcher-J6X32PGP.js"),u=await import("./recipe-applier-R4YJPGQR.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(`
|
|
8
|
+
\u{1F389} Project created successfully!`)),e.writeln(s(` ${w.written.length} files written`))}else{let g=await import("./mod-NSY6WUYH.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(`
|
|
9
|
+
Scaffolding failed: ${y.error.message}`)]),exitCode:1});let C=y.value;if(e.writeln(x(`
|
|
10
|
+
\u{1F389} Project created successfully!`)),Object.keys(C.variables).length>0){e.writeln(t(`
|
|
11
|
+
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(`
|
|
12
|
+
Failed: ${u}`)]),exitCode:1})}return e.writeln(),e.writeln(E("Next steps:")),e.writeln(),e.writeln(t(` cd ${r}`)),e.writeln(t(" laroux dev")),e.writeln(),e.writeln(t("Then open "),v("http://localhost:8000"),t(" in your browser.")),e.writeln(),e.writeln(s("Learn more at https://laroux.now/")),e.writeln(),await e.close(),A(void 0)};export{V as main};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{b as E}from"./chunk-3I4JG3PJ.js";import"./chunk-ZH37DSUQ.js";import"./chunk-LOFP256P.js";import"./chunk-ZF2XYULB.js";import"./chunk-4S7QYPS6.js";import"./chunk-GXPLME3K.js";import"./chunk-2J2PXBOC.js";import{f as A,h as C,k as H}from"./chunk-TTYO2XJO.js";import"./chunk-USCAYIWL.js";import{b,c as O,d as l,e as k,f as w,g as y,h as j}from"./chunk-PLJNPQFC.js";import{a as $}from"./chunk-HPPFA3XU.js";import{g as r}from"./chunk-DQAEQEXD.js";import{v as e}from"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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(`
|
|
2
|
+
`)},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 .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 .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 .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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a,b}from"./chunk-QIODVVTY.js";import"./chunk-3K42AALS.js";import"./chunk-OLM5RTFK.js";import"./chunk-BCHXUKWW.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";export{a as KiroModel,b as kiroFactory};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as R,d as h}from"./chunk-NUSNMQPL.js";import{f as S}from"./chunk-
|
|
1
|
+
import{a as R,d as h}from"./chunk-NUSNMQPL.js";import{f as S}from"./chunk-5AK4OGCO.js";import{f as m,h as f,k as y}from"./chunk-TTYO2XJO.js";import{c as p,d as l,j as d}from"./chunk-PLJNPQFC.js";import{a as u}from"./chunk-HPPFA3XU.js";import{a as n,b as o,c as g}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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
|
-
import{a as h,b as u,c as k}from"./chunk-
|
|
1
|
+
import{a as h,b as u,c as k}from"./chunk-MYSTBVWT.js";import"./chunk-3I4JG3PJ.js";import"./chunk-GXPLME3K.js";import{f as m,h as c,k as w}from"./chunk-TTYO2XJO.js";import{b as t,c as a,d as e}from"./chunk-PLJNPQFC.js";import"./chunk-BCHXUKWW.js";import{a as g}from"./chunk-HPPFA3XU.js";import{a as i}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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
|
|
2
2
|
`),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 +1 @@
|
|
|
1
|
-
import{a as p}from"./chunk-
|
|
1
|
+
import{a as p}from"./chunk-ZED5RIVL.js";import{f as o,h as m,k as d}from"./chunk-TTYO2XJO.js";import{c as t,d as a,f as l,l as n}from"./chunk-PLJNPQFC.js";import"./chunk-BCHXUKWW.js";import{a as i}from"./chunk-DQAEQEXD.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.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};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a}from"./chunk-CKD2KOHA.js";import"./chunk-Y6DZEK4W.js";import"./chunk-OBIEQJDE.js";import"./chunk-USCAYIWL.js";import"./chunk-PLJNPQFC.js";import"./chunk-A2GDVOQP.js";import"./chunk-ZE5T64HQ.js";import"./chunk-YXSB6RET.js";import"./chunk-SG4G3OOO.js";import"./chunk-FDZP7B5Y.js";import"./chunk-ACQUINWH.js";import"./chunk-DXB73IDG.js";export{a as loadConfig};
|