zen-code 4.9.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/app.js +175 -166
- package/dist/chunk-075hks9v.js +1 -0
- package/dist/chunk-0fj768k4.js +112 -0
- package/dist/chunk-19mf2aa7.js +1 -0
- package/dist/chunk-1mq2jmfy.js +2 -0
- package/dist/chunk-1v863afn.js +278 -0
- package/dist/chunk-1vn8d8b8.js +1 -0
- package/dist/{chunk-mmq834zt.js → chunk-1w19w1bm.js} +1 -1
- package/dist/chunk-3dnayvgx.js +224 -0
- package/dist/chunk-4hg13vwj.js +1 -0
- package/dist/chunk-4scrkcqv.js +1 -0
- package/dist/chunk-54cdhhqm.js +1 -0
- package/dist/chunk-5m4yb9av.js +91 -0
- package/dist/chunk-5yd4ntp6.js +8 -0
- package/dist/{chunk-b52b0t16.js → chunk-6scjjkn3.js} +1 -1
- package/dist/chunk-7jatn15w.js +2 -0
- package/dist/{chunk-4nsg4vcd.js → chunk-7w9y11hj.js} +1 -1
- package/dist/chunk-7yzv6385.js +1 -0
- package/dist/{chunk-g377vrpj.js → chunk-875hayaj.js} +3 -3
- package/dist/chunk-8bs8r50r.js +1 -0
- package/dist/chunk-8waww0j9.js +6 -0
- package/dist/chunk-8ysg0rga.js +1 -0
- package/dist/chunk-9czhw5k6.js +4 -0
- package/dist/chunk-9tgp14v7.js +16 -0
- package/dist/chunk-a239dn0b.js +1 -0
- package/dist/chunk-arv4h3h1.js +2 -0
- package/dist/chunk-b2551zfb.js +2 -0
- package/dist/chunk-b9emn03n.js +1 -0
- package/dist/chunk-bm7578sn.js +1 -0
- package/dist/{chunk-1y82m5kn.js → chunk-bytq4kd1.js} +3 -125
- package/dist/chunk-c2wfgbj6.js +1 -0
- package/dist/{chunk-gcm4jp0d.js → chunk-cef4vbtb.js} +1 -1
- package/dist/chunk-cnzhxgn5.js +4 -0
- package/dist/chunk-d2770b2z.js +1 -0
- package/dist/chunk-d72063sm.js +2 -0
- package/dist/{chunk-9k5d9vf1.js → chunk-d988tv30.js} +1 -1
- package/dist/{chunk-va71tsw3.js → chunk-dx9k6sdd.js} +3 -3
- package/dist/chunk-e6ggkg36.js +2 -0
- package/dist/chunk-fjqtrakn.js +1 -0
- package/dist/chunk-gbfpab0j.js +1 -0
- package/dist/chunk-gkvx829z.js +1 -0
- package/dist/{chunk-9dahn9h7.js → chunk-gwf8b14k.js} +1 -1
- package/dist/chunk-gz7fz9fg.js +1 -0
- package/dist/chunk-h0q3dvnv.js +5 -0
- package/dist/chunk-h0qb9jk1.js +1 -0
- package/dist/chunk-h9y136h8.js +1 -0
- package/dist/chunk-hrcxdj3c.js +54 -0
- package/dist/chunk-hz9yw7cs.js +166 -0
- package/dist/chunk-j4y5rjne.js +79 -0
- package/dist/chunk-k12y05c3.js +3 -0
- package/dist/chunk-k6fxqssr.js +18 -0
- package/dist/{chunk-rncpxz1b.js → chunk-kmxdq21k.js} +2 -2
- package/dist/chunk-mcb8rewr.js +213 -0
- package/dist/{chunk-wn43r152.js → chunk-mm9w91rj.js} +1 -1
- package/dist/chunk-mv0xzmq8.js +2 -0
- package/dist/chunk-n849zsd3.js +1 -0
- package/dist/chunk-nm253hhf.js +81 -0
- package/dist/chunk-prg6489q.js +1 -0
- package/dist/{chunk-cggjws6a.js → chunk-pxdgy0vr.js} +1 -1
- package/dist/chunk-qhzm2qw9.js +2 -0
- package/dist/{chunk-98f6hg43.js → chunk-qmxtys9q.js} +1 -1
- package/dist/chunk-r0cfe5c1.js +294 -0
- package/dist/chunk-rtjytfhh.js +1 -0
- package/dist/chunk-s7ttf0pm.js +2 -0
- package/dist/chunk-t01t72t2.js +140 -0
- package/dist/{chunk-ns6tjjkq.js → chunk-t0f66x64.js} +1 -1
- package/dist/chunk-tn356gwf.js +93 -0
- package/dist/chunk-vd8kwzra.js +41 -0
- package/dist/chunk-vhn13anh.js +233 -0
- package/dist/chunk-vnewbtjy.js +1 -0
- package/dist/chunk-wbm7rn9w.js +2 -0
- package/dist/chunk-wd3gkd45.js +3 -0
- package/dist/chunk-whdf0vbb.js +1 -0
- package/dist/{chunk-j7a40ww9.js → chunk-ws232ksq.js} +2 -2
- package/dist/{chunk-8g2zdcy0.js → chunk-yerf10k7.js} +1 -1
- package/dist/{chunk-heasksrr.js → chunk-yzv3n8mw.js} +2 -2
- package/dist/chunk-z3e4c424.js +2 -0
- package/dist/chunk-znw7fpep.js +6 -0
- package/dist/chunk-zq2g4rfd.js +1 -0
- package/dist/cli.js +1 -1
- package/dist/nonInteractive.js +314 -4
- package/dist/zen-keyboard.js +1 -1
- package/package.json +37 -37
- package/dist/chunk-02vv5584.js +0 -1
- package/dist/chunk-13nyfrmm.js +0 -310
- package/dist/chunk-1edvf7b5.js +0 -1
- package/dist/chunk-1rmnbdef.js +0 -1
- package/dist/chunk-1ttywx0y.js +0 -6
- package/dist/chunk-30sq2w0d.js +0 -8
- package/dist/chunk-32ase1cw.js +0 -2
- package/dist/chunk-3490ntd8.js +0 -1
- package/dist/chunk-3pcybja5.js +0 -7
- package/dist/chunk-5rr85f28.js +0 -1
- package/dist/chunk-5x8nxw0t.js +0 -137
- package/dist/chunk-6rfc36jg.js +0 -1
- package/dist/chunk-76h8pe7x.js +0 -2
- package/dist/chunk-7kdvr78m.js +0 -31
- package/dist/chunk-8z38ybz7.js +0 -1
- package/dist/chunk-b8dxq9rq.js +0 -1
- package/dist/chunk-cjqarwdn.js +0 -1
- package/dist/chunk-cs73xbzz.js +0 -1
- package/dist/chunk-cyexd09c.js +0 -2
- package/dist/chunk-ep2es95e.js +0 -81
- package/dist/chunk-f8ewggk1.js +0 -1
- package/dist/chunk-g7pm00z7.js +0 -253
- package/dist/chunk-hfve7nf5.js +0 -2
- package/dist/chunk-j9aysaeb.js +0 -1
- package/dist/chunk-jbf8ve63.js +0 -3
- package/dist/chunk-jfhc5c0d.js +0 -1
- package/dist/chunk-jxsfzfac.js +0 -2
- package/dist/chunk-kba8akjs.js +0 -2
- package/dist/chunk-m76ya904.js +0 -1
- package/dist/chunk-mjzeawnq.js +0 -6
- package/dist/chunk-nwy6n6b6.js +0 -274
- package/dist/chunk-qd305hg1.js +0 -1
- package/dist/chunk-qez6ejd4.js +0 -1
- package/dist/chunk-r2h3x9zv.js +0 -2
- package/dist/chunk-rz3b356n.js +0 -1
- package/dist/chunk-trjpzw1n.js +0 -91
- package/dist/chunk-xhnvpygg.js +0 -2
- package/dist/chunk-xkz5z0zn.js +0 -1
- package/dist/chunk-zwxjkwqd.js +0 -26
- package/dist/chunk-zz32kgt2.js +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{
|
|
2
|
-
export{Y as
|
|
1
|
+
import{Fl as X,Hl as U}from"./chunk-z3e4c424.js";var S=U((Z,Q)=>{var V=Object.prototype.hasOwnProperty,H="~";function O(){}if(Object.create){if(O.prototype=Object.create(null),!new O().__proto__)H=!1}function W(B,q,y){this.fn=B,this.context=q,this.once=y||!1}function R(B,q,y,z,I){if(typeof y!=="function")throw TypeError("The listener must be a function");var F=new W(y,z||B,I),C=H?H+q:q;if(!B._events[C])B._events[C]=F,B._eventsCount++;else if(!B._events[C].fn)B._events[C].push(F);else B._events[C]=[B._events[C],F];return B}function P(B,q){if(--B._eventsCount===0)B._events=new O;else delete B._events[q]}function G(){this._events=new O,this._eventsCount=0}G.prototype.eventNames=function(){var q=[],y,z;if(this._eventsCount===0)return q;for(z in y=this._events)if(V.call(y,z))q.push(H?z.slice(1):z);if(Object.getOwnPropertySymbols)return q.concat(Object.getOwnPropertySymbols(y));return q};G.prototype.listeners=function(q){var y=H?H+q:q,z=this._events[y];if(!z)return[];if(z.fn)return[z.fn];for(var I=0,F=z.length,C=Array(F);I<F;I++)C[I]=z[I].fn;return C};G.prototype.listenerCount=function(q){var y=H?H+q:q,z=this._events[y];if(!z)return 0;if(z.fn)return 1;return z.length};G.prototype.emit=function(q,y,z,I,F,C){var J=H?H+q:q;if(!this._events[J])return!1;var k=this._events[J],K=arguments.length,M,D;if(k.fn){if(k.once)this.removeListener(q,k.fn,void 0,!0);switch(K){case 1:return k.fn.call(k.context),!0;case 2:return k.fn.call(k.context,y),!0;case 3:return k.fn.call(k.context,y,z),!0;case 4:return k.fn.call(k.context,y,z,I),!0;case 5:return k.fn.call(k.context,y,z,I,F),!0;case 6:return k.fn.call(k.context,y,z,I,F,C),!0}for(D=1,M=Array(K-1);D<K;D++)M[D-1]=arguments[D];k.fn.apply(k.context,M)}else{var T=k.length,N;for(D=0;D<T;D++){if(k[D].once)this.removeListener(q,k[D].fn,void 0,!0);switch(K){case 1:k[D].fn.call(k[D].context);break;case 2:k[D].fn.call(k[D].context,y);break;case 3:k[D].fn.call(k[D].context,y,z);break;case 4:k[D].fn.call(k[D].context,y,z,I);break;default:if(!M)for(N=1,M=Array(K-1);N<K;N++)M[N-1]=arguments[N];k[D].fn.apply(k[D].context,M)}}}return!0};G.prototype.on=function(q,y,z){return R(this,q,y,z,!1)};G.prototype.once=function(q,y,z){return R(this,q,y,z,!0)};G.prototype.removeListener=function(q,y,z,I){var F=H?H+q:q;if(!this._events[F])return this;if(!y)return P(this,F),this;var C=this._events[F];if(C.fn){if(C.fn===y&&(!I||C.once)&&(!z||C.context===z))P(this,F)}else{for(var J=0,k=[],K=C.length;J<K;J++)if(C[J].fn!==y||I&&!C[J].once||z&&C[J].context!==z)k.push(C[J]);if(k.length)this._events[F]=k.length===1?k[0]:k;else P(this,F)}return this};G.prototype.removeAllListeners=function(q){var y;if(q){if(y=H?H+q:q,this._events[y])P(this,y)}else this._events=new O,this._eventsCount=0;return this};G.prototype.off=G.prototype.removeListener;G.prototype.addListener=G.prototype.on;G.prefixed=H;G.EventEmitter=G;if(typeof Q<"u")Q.exports=G});var Y=X(S(),1);
|
|
2
|
+
export{Y as C};
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{createRequire as u}from"node:module";var n=Object.create;var{getPrototypeOf:o,defineProperty:e,getOwnPropertyNames:k,getOwnPropertyDescriptor:p}=Object,l=Object.prototype.hasOwnProperty;function m(a){return this[a]}var q,r,v=(a,b,c)=>{var d=a!=null&&typeof a==="object";if(d){var h=b?q??=new WeakMap:r??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?n(o(a)):{};let f=b||!a||!a.__esModule?e(c,"default",{value:a,enumerable:!0}):c;for(let g of k(a))if(!l.call(f,g))e(f,g,{get:m.bind(a,g),enumerable:!0});if(d)h.set(a,f);return f},w=(a)=>{var b=(j??=new WeakMap).get(a),c;if(b)return b;if(b=e({},"__esModule",{value:!0}),a&&typeof a==="object"||typeof a==="function"){for(var d of k(a))if(!l.call(b,d))e(b,d,{get:m.bind(a,d),enumerable:!(c=p(a,d))||c.enumerable})}return j.set(a,b),b},j,x=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var s=(a)=>a;function t(a,b){this[a]=s.bind(null,b)}var y=(a,b)=>{for(var c in b)e(a,c,{get:b[c],enumerable:!0,configurable:!0,set:t.bind(b,c)})};var z=(a,b)=>()=>(a&&(b=a(a=0)),b);var B=u(import.meta.url);
|
|
2
|
+
export{v as Fl,w as Gl,x as Hl,y as Il,z as Jl,B as Kl};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import{Kk as T}from"./chunk-t01t72t2.js";import{Fl as R}from"./chunk-z3e4c424.js";var I=R(T(),1);import A from"fs/promises";import z from"path";import O from"os";class U{skillsDir;projectSkillsDir;constructor(){let b=O.homedir();this.skillsDir=z.join(b,".claude","skills"),this.projectSkillsDir=z.join(process.cwd(),".claude","skills")}async listSkills(){let b=new Map,g=await this.listSkillsInDir(this.skillsDir);for(let q of g)b.set(q.name,q);let x=await this.listSkillsInDir(this.projectSkillsDir);for(let q of x)b.set(q.name,q);return Array.from(b.values())}async listSkillsInDir(b){try{let g=await A.readdir(b,{withFileTypes:!0}),x=[];for(let q of g){let F=z.join(b,q.name),J=await A.lstat(F).catch(()=>null);if(!J)continue;let K=await A.stat(F).catch(()=>null);if(!K||!K.isDirectory())continue;if(J.isSymbolicLink()){let C=z.resolve(F),G=z.resolve(b),N=C.substring(G.length);if(!(C===G||N.startsWith("/")||N==="")){let Q=O.homedir();if(!C.startsWith(Q))continue}}let L=z.join(F,"SKILL.md");try{let C=await A.readFile(L,"utf-8"),G=this.parseFrontmatter(C);x.push({name:q.name,description:G.description||"",path:L})}catch{}}return x}catch{return[]}}async getSkill(b){let g=z.join(this.projectSkillsDir,b,"SKILL.md");try{let q=await A.readFile(g,"utf-8");return this.parseSkillContent(q)}catch{}let x=z.join(this.skillsDir,b,"SKILL.md");try{let q=await A.readFile(x,"utf-8");return this.parseSkillContent(q)}catch{return null}}async saveSkill(b,g){let x=z.join(this.skillsDir,b);await A.mkdir(x,{recursive:!0});let q=this.formatSkillContent(g);await A.writeFile(z.join(x,"SKILL.md"),q,"utf-8")}async deleteSkill(b){let g=z.join(this.skillsDir,b);await A.rm(g,{recursive:!0,force:!0})}async syncFromRemote(b){let g=await b.listRemoteSkills();for(let x of g){let q=await b.fetchSkill(x.name);if(q)await this.saveSkill(x.name,q)}}parseFrontmatter(b){let g=b.match(/^---\n(.+?)\n---/s);if(!g)return{};try{return I.default.parse(g[1])}catch{return{}}}parseSkillContent(b){let g=this.parseFrontmatter(b),x=b.replace(/^---\n.+?\n---\n*/s,"");return{frontmatter:g,markdown:x}}formatSkillContent(b){return`---
|
|
2
|
+
${I.default.stringify(b.frontmatter).trim()}
|
|
3
|
+
---
|
|
4
|
+
|
|
5
|
+
${b.markdown}`}}
|
|
6
|
+
export{U as if};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{nf as c}from"./chunk-s7ttf0pm.js";import"./chunk-0fj768k4.js";import"./chunk-1mq2jmfy.js";import{dg as a,eg as b}from"./chunk-3dnayvgx.js";import"./chunk-8waww0j9.js";import"./chunk-h0q3dvnv.js";import"./chunk-hrcxdj3c.js";import"./chunk-9tgp14v7.js";import"./chunk-hz9yw7cs.js";import"./chunk-tn356gwf.js";import"./chunk-n849zsd3.js";import"./chunk-t01t72t2.js";import"./chunk-b2551zfb.js";import"./chunk-vd8kwzra.js";import"./chunk-qhzm2qw9.js";import"./chunk-arv4h3h1.js";import"./chunk-z3e4c424.js";export{a as getAgentListFromPackage,c as createSubAgentsMiddleware,b as SubAgentsMiddleware};
|
package/dist/cli.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{
|
|
2
|
+
import{ve as F}from"./chunk-k12y05c3.js";import"./chunk-qhzm2qw9.js";import"./chunk-arv4h3h1.js";import{Kl as A}from"./chunk-z3e4c424.js";var G=String.prototype.repeat;String.prototype.repeat=function(f){if(typeof f!=="number"||!isFinite(f)||f<0)f=0;return G.call(this,Math.floor(f))};var j=process.argv.slice(2);process.env.LG_TEMP_MESSAGE="true";async function H(){let{initErrorInterceptor:f}=await import("./chunk-t0f66x64.js");f();let B=j.indexOf("--yolo");if(B!==-1)process.env.YOLO_MODE="true",j.splice(B,1);if(globalThis.Bun&&F("~/.zen-code/data/sessions.db"),j[0]==="init")console.log("Please zen-code and use /m to configure models");else if(j[0]==="keyboard")import("./zen-keyboard.js");else if(j[0]==="-p"||j[0]==="--prompt"){let w=j.slice(1).join(" "),{runNonInteractive:q}=await import("./nonInteractive.js");await q(w,!1)}else if(await J()){let{runNonInteractive:q}=await import("./nonInteractive.js");await q(void 0,!0)}else await import("./app.js")}async function J(){return new Promise((f)=>{if(process.stdin.isTTY){f(!1);return}let w=process.stdin.read();if(w)process.stdin.unshift(w),f(!0);else setTimeout(()=>{let q=process.stdin.read();if(q)process.stdin.unshift(q),f(!0);else f(!1)},100)})}H().catch((f)=>{console.error("❌ 执行失败:",f),process.exit(1)});
|