agentix-cli 0.106.0 → 0.107.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-PVMJEC3G.js → App-GRPPB7IF.js} +2 -2
- package/dist/{ChatApp-GWIOURQL.js → ChatApp-ZEIEXPOB.js} +2 -2
- package/dist/{agent-IOHJGUZT.js → agent-J22ODKSX.js} +2 -2
- package/dist/{board-dashboard-OA4WFL3D.js → board-dashboard-DUT3XBS7.js} +4 -4
- package/dist/chunk-36AXN6ZB.js +11 -0
- package/dist/chunk-36AXN6ZB.js.map +1 -0
- package/dist/{chunk-QCKUXJJ3.js → chunk-3RLYCNGP.js} +2 -2
- package/dist/{chunk-4MESMUND.js → chunk-4YBFKN3B.js} +2 -2
- package/dist/{chunk-GGB5JMII.js → chunk-55MUAKXA.js} +2 -2
- package/dist/{chunk-CHQ5Q4QO.js → chunk-CXCXMOTB.js} +2 -2
- package/dist/chunk-FQGEDMG6.js +2 -0
- package/dist/chunk-FQGEDMG6.js.map +1 -0
- package/dist/{chunk-SGOXLRY4.js → chunk-GFON223J.js} +2 -2
- package/dist/{chunk-ZROS7GX2.js → chunk-H5ZNKPXN.js} +2 -2
- package/dist/{chunk-UW6RUGNV.js → chunk-IRH2O2QB.js} +2 -2
- package/dist/{chunk-MTP2RH3P.js → chunk-JUJPQWLG.js} +2 -2
- package/dist/{chunk-5D5NKZSD.js → chunk-JYFE6SQU.js} +2 -2
- package/dist/{chunk-H5LQXHQQ.js → chunk-M6NIPFRY.js} +11 -11
- package/dist/chunk-M6NIPFRY.js.map +1 -0
- package/dist/{chunk-UZ5Q6Q2X.js → chunk-N72AJ2LS.js} +187 -187
- package/dist/chunk-N72AJ2LS.js.map +1 -0
- package/dist/{chunk-W3LSDADF.js → chunk-NL6JSS4E.js} +2 -2
- package/dist/{chunk-HRX7FIOO.js → chunk-O5BBV4ZV.js} +2 -2
- package/dist/{chunk-VYSFOONA.js → chunk-OTCF46CF.js} +2 -2
- package/dist/{chunk-CZFGADZ2.js → chunk-PEDNM2FA.js} +2 -2
- package/dist/{chunk-YZJCOWHU.js → chunk-S4RQ6Q2B.js} +2 -2
- package/dist/chunk-UDJAODAB.js +100 -0
- package/dist/chunk-UDJAODAB.js.map +1 -0
- package/dist/{chunk-ZD5ECP5D.js → chunk-UEOG3H25.js} +2 -2
- package/dist/chunk-UIDHTIPG.js +153 -0
- package/dist/chunk-UIDHTIPG.js.map +1 -0
- package/dist/{chunk-3IEFHOPH.js → chunk-UOOFNFEO.js} +2 -2
- package/dist/{chunk-DJMK22SB.js → chunk-XQMLRZHY.js} +2 -2
- package/dist/cli.js +1 -1
- package/dist/{client-DLRQIQZU.js → client-WTC7P6PE.js} +2 -2
- package/dist/{config-32FKG36S.js → config-WG62KB23.js} +2 -2
- package/dist/config-mutator-7REOEXW4.js +2 -0
- package/dist/{doctor-ALOXJM5G.js → doctor-XDR22CFD.js} +2 -2
- package/dist/index.d.ts +197 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/{program-DSUZFBJZ.js → program-PZO6XJYZ.js} +109 -109
- package/dist/program-PZO6XJYZ.js.map +1 -0
- package/dist/{promote-SXH7DKMC.js → promote-YEODWQX2.js} +2 -2
- package/dist/{query-WKBSHVWZ.js → query-DC3O3QBJ.js} +2 -2
- package/dist/registry-PT5SRRZA.js +2 -0
- package/dist/{request-planner-GV5NAXQ5.js → request-planner-EP2XYPKZ.js} +2 -2
- package/dist/{review-candidates-AWIUSB3O.js → review-candidates-VKH372WW.js} +2 -2
- package/dist/routing-OOIZ6433.js +2 -0
- package/dist/schedule-tool-W45LNZGX.js +2 -0
- package/dist/scheduler-YXU4G5NH.js +2 -0
- package/dist/{seat-EQKPGMJE.js → seat-AGGELF3C.js} +2 -2
- package/dist/{select-RJCBMM3O.js → select-6SXEU2NV.js} +2 -2
- package/dist/{set-enabled-ADQH7VKE.js → set-enabled-GLWP7YDW.js} +2 -2
- package/dist/token-tracker-W7DFDEFN.js +2 -0
- package/dist/{tool-K4MU42KH.js → tool-23P66PKZ.js} +2 -2
- package/dist/{tool-JPHWWTZI.js → tool-UF6LOS6K.js} +2 -2
- package/dist/usage-channels-KBLEC4NE.js +2 -0
- package/dist/usage-channels-KBLEC4NE.js.map +1 -0
- package/dist/wiki-6SCKSY4I.js +2 -0
- package/dist/workspace-setup-EA3G42NY.js +2 -0
- package/dist/workspace-setup-EA3G42NY.js.map +1 -0
- package/package.json +1 -1
- package/dist/chunk-DWADWDMU.js +0 -96
- package/dist/chunk-DWADWDMU.js.map +0 -1
- package/dist/chunk-H5LQXHQQ.js.map +0 -1
- package/dist/chunk-PWTSY77F.js +0 -2
- package/dist/chunk-PWTSY77F.js.map +0 -1
- package/dist/chunk-UZ5Q6Q2X.js.map +0 -1
- package/dist/chunk-YSMPXFQR.js +0 -154
- package/dist/chunk-YSMPXFQR.js.map +0 -1
- package/dist/config-mutator-2VM2FWRF.js +0 -2
- package/dist/program-DSUZFBJZ.js.map +0 -1
- package/dist/registry-DAWQT4D4.js +0 -2
- package/dist/routing-35ETOM24.js +0 -2
- package/dist/schedule-tool-BXRRN3IE.js +0 -2
- package/dist/scheduler-PIZG2JA4.js +0 -2
- package/dist/wiki-RHHHYUTK.js +0 -2
- package/dist/workspace-setup-42ARC42I.js +0 -2
- /package/dist/{App-PVMJEC3G.js.map → App-GRPPB7IF.js.map} +0 -0
- /package/dist/{ChatApp-GWIOURQL.js.map → ChatApp-ZEIEXPOB.js.map} +0 -0
- /package/dist/{agent-IOHJGUZT.js.map → agent-J22ODKSX.js.map} +0 -0
- /package/dist/{board-dashboard-OA4WFL3D.js.map → board-dashboard-DUT3XBS7.js.map} +0 -0
- /package/dist/{chunk-QCKUXJJ3.js.map → chunk-3RLYCNGP.js.map} +0 -0
- /package/dist/{chunk-4MESMUND.js.map → chunk-4YBFKN3B.js.map} +0 -0
- /package/dist/{chunk-GGB5JMII.js.map → chunk-55MUAKXA.js.map} +0 -0
- /package/dist/{chunk-CHQ5Q4QO.js.map → chunk-CXCXMOTB.js.map} +0 -0
- /package/dist/{chunk-SGOXLRY4.js.map → chunk-GFON223J.js.map} +0 -0
- /package/dist/{chunk-ZROS7GX2.js.map → chunk-H5ZNKPXN.js.map} +0 -0
- /package/dist/{chunk-UW6RUGNV.js.map → chunk-IRH2O2QB.js.map} +0 -0
- /package/dist/{chunk-MTP2RH3P.js.map → chunk-JUJPQWLG.js.map} +0 -0
- /package/dist/{chunk-5D5NKZSD.js.map → chunk-JYFE6SQU.js.map} +0 -0
- /package/dist/{chunk-W3LSDADF.js.map → chunk-NL6JSS4E.js.map} +0 -0
- /package/dist/{chunk-HRX7FIOO.js.map → chunk-O5BBV4ZV.js.map} +0 -0
- /package/dist/{chunk-VYSFOONA.js.map → chunk-OTCF46CF.js.map} +0 -0
- /package/dist/{chunk-CZFGADZ2.js.map → chunk-PEDNM2FA.js.map} +0 -0
- /package/dist/{chunk-YZJCOWHU.js.map → chunk-S4RQ6Q2B.js.map} +0 -0
- /package/dist/{chunk-ZD5ECP5D.js.map → chunk-UEOG3H25.js.map} +0 -0
- /package/dist/{chunk-3IEFHOPH.js.map → chunk-UOOFNFEO.js.map} +0 -0
- /package/dist/{chunk-DJMK22SB.js.map → chunk-XQMLRZHY.js.map} +0 -0
- /package/dist/{client-DLRQIQZU.js.map → client-WTC7P6PE.js.map} +0 -0
- /package/dist/{config-32FKG36S.js.map → config-WG62KB23.js.map} +0 -0
- /package/dist/{config-mutator-2VM2FWRF.js.map → config-mutator-7REOEXW4.js.map} +0 -0
- /package/dist/{doctor-ALOXJM5G.js.map → doctor-XDR22CFD.js.map} +0 -0
- /package/dist/{promote-SXH7DKMC.js.map → promote-YEODWQX2.js.map} +0 -0
- /package/dist/{query-WKBSHVWZ.js.map → query-DC3O3QBJ.js.map} +0 -0
- /package/dist/{registry-DAWQT4D4.js.map → registry-PT5SRRZA.js.map} +0 -0
- /package/dist/{request-planner-GV5NAXQ5.js.map → request-planner-EP2XYPKZ.js.map} +0 -0
- /package/dist/{review-candidates-AWIUSB3O.js.map → review-candidates-VKH372WW.js.map} +0 -0
- /package/dist/{routing-35ETOM24.js.map → routing-OOIZ6433.js.map} +0 -0
- /package/dist/{schedule-tool-BXRRN3IE.js.map → schedule-tool-W45LNZGX.js.map} +0 -0
- /package/dist/{scheduler-PIZG2JA4.js.map → scheduler-YXU4G5NH.js.map} +0 -0
- /package/dist/{seat-EQKPGMJE.js.map → seat-AGGELF3C.js.map} +0 -0
- /package/dist/{select-RJCBMM3O.js.map → select-6SXEU2NV.js.map} +0 -0
- /package/dist/{set-enabled-ADQH7VKE.js.map → set-enabled-GLWP7YDW.js.map} +0 -0
- /package/dist/{wiki-RHHHYUTK.js.map → token-tracker-W7DFDEFN.js.map} +0 -0
- /package/dist/{tool-K4MU42KH.js.map → tool-23P66PKZ.js.map} +0 -0
- /package/dist/{tool-JPHWWTZI.js.map → tool-UF6LOS6K.js.map} +0 -0
- /package/dist/{workspace-setup-42ARC42I.js.map → wiki-6SCKSY4I.js.map} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as j,b as O,c as T,d as D,e as _,j as N}from"./chunk-
|
|
1
|
+
import{a as j,b as O,c as T,d as D,e as _,j as N}from"./chunk-NL6JSS4E.js";import{b as R}from"./chunk-2GIDVZ4H.js";import{v as C,w as I}from"./chunk-CXCXMOTB.js";import{b as v,c as W}from"./chunk-QOYAX2FT.js";import{readFileSync as Y,existsSync as B}from"fs";I();import{resolve as x}from"path";import{execSync as L}from"child_process";async function nt(n,a,o,t={}){let u=t.selectorModel??"haiku",g=t.synthModel??"sonnet",l=t.maxCandidates??3,r=t.maxHops??2,s=t.maxArticles??8,h=t.timeoutMs??6e4,p=t.log??console.error.bind(console,"[wiki-query]"),m=t.messagePath?.length?t.messagePath:void 0,w=t.graphWeight??$,i=x(a.baseDir,"_index.md");if(!B(i))return A("no-catalog",n,"No _index.md found \u2014 run `agentx wiki status` to rebuild.");let e=Y(i,"utf-8"),d=Date.now(),f=[],y="";try{let c=await G(n,a,o,l,m,w);c?(f=c,y=`[wiki-rerank seat] ${c.map(k=>k.title).join(" | ")}`):(y=await Q(q(n,e,l,m),u,h),f=K(y))}catch(c){return p("selector failed:",c?.message),{...A("error",n,`Selector: ${c?.message||"unknown"}`),trace:{selectorMs:Date.now()-d,synthesisMs:0,selectorOutput:y}}}let S=Date.now()-d;if(f.length===0)return{...A("no-candidates",n,"Selector returned no candidates."),trace:{selectorMs:S,synthesisMs:0,selectorOutput:y}};let b=F(f,a,o,r,s);if(b.length===0)return{...A("no-candidates",n,"Candidates did not resolve to readable articles."),candidates:f,trace:{selectorMs:S,synthesisMs:0,selectorOutput:y}};let M=Date.now(),P="";try{P=await Q(J(n,b),g,h*2)}catch(c){return p("synthesis failed:",c?.message),{...A("error",n,`Synthesis: ${c?.message||"unknown"}`),candidates:f,walked:b.map(k=>({title:k.meta.title,path:k.path,type:k.meta.type,hop:k.hop??0})),trace:{selectorMs:S,synthesisMs:Date.now()-M,selectorOutput:y}}}let E=Date.now()-M;return{answer:P.trim(),citations:b.map(c=>({title:c.meta.title,path:c.path,type:c.meta.type})),candidates:f,walked:b.map(c=>({title:c.meta.title,path:c.path,type:c.meta.type,hop:c.hop??0})),status:"ok",trace:{selectorMs:S,synthesisMs:E,selectorOutput:y}}}function A(n,a,o){return{answer:"",citations:[],candidates:[],walked:[],status:n,error:o}}function F(n,a,o,t,u){let g=new Map;for(let s of a.listArticles(o||""))g.set(s.meta.title.toLowerCase(),s.path);let l=new Map,r=[];for(let s of n)l.has(s.path)||r.push({path:s.path,hop:0});for(;r.length&&l.size<u;){let s=r.shift();if(l.has(s.path)||s.hop>t)continue;let h=o?a.readArticleAs(s.path,o):a.readArticle(s.path);if(h&&(l.set(s.path,{...h,hop:s.hop}),!(s.hop>=t)))for(let p of h.meta.related||[]){let m=g.get(p.toLowerCase());m&&!l.has(m)&&r.push({path:m,hop:s.hop+1})}}return Array.from(l.values())}async function G(n,a,o,t,u,g=$){try{let r=(a.rebuildIndex().articles??[]).filter(i=>i.path&&!i.path.includes("/_versions/"));if(r.length<2)return null;let h=H(n,r,u,g).slice(0,O).map(i=>({id:`k${i}`,title:r[i].title||r[i].path,tags:r[i].tags,excerpt:[r[i].type?`type: ${r[i].type}`:"",(r[i].related??[]).length?`related: ${(r[i].related??[]).join(", ")}`:"",(r[i].graphPath??[]).length?`graph: ${(r[i].graphPath??[]).join(" \u203A ")}`:""].filter(Boolean).join(" \xB7 ")})),p=await C(j,T({query:n,candidates:h,excerptChars:300}),D(h),{features:{agent:o??"unknown",stage:"catalog-selector"}});if(!p||p.mode!=="active")return null;let w=_(p.answers,h).ranked.slice(0,t).map(i=>r[Number(i.slice(1))]).filter(Boolean).map(i=>({title:i.title,path:i.path}));return w.length>0?w:null}catch{return null}}var $=.6;function H(n,a,o,t=$){let u=a.map(e=>[e.title,(e.tags??[]).join(" "),(e.related??[]).join(" ")].join(" ")),g=W(n,v(u)),l=g.reduce((e,d)=>Math.max(e,d.score),0),r=new Map(g.map(e=>[e.docIndex,l>0?e.score/l:0])),s=!!o?.length,h=e=>s&&e.graphPath?.length?N(o,e.graphPath):0,p=(e,d)=>d.score-e.score||e.i-d.i,m=a.map((e,d)=>({i:d,score:(r.get(d)??0)*(1+t*h(e))})).filter(e=>r.has(e.i)).sort(p),w=a.map((e,d)=>({i:d,score:h(e)})).filter(e=>!r.has(e.i)&&e.score>0).sort(p),i=[...m,...w].map(e=>e.i);for(let e=0;e<a.length;e++)i.includes(e)||i.push(e);return i}function q(n,a,o,t){let u=t?.length?`
|
|
2
2
|
## Intent
|
|
3
3
|
|
|
4
4
|
The request was classified under the intent-graph path "${t.join(" \u203A ")}". Prefer articles filed under the same branch when their titles are equally plausible.
|
|
@@ -46,4 +46,4 @@ ${o}
|
|
|
46
46
|
Answer the question in 2\u20136 sentences. Cite articles by their title in square brackets like [Article Title]. If the articles do not answer the question, say so plainly (do not invent). Prefer concrete facts over hedging.
|
|
47
47
|
|
|
48
48
|
Output ONLY the answer \u2014 no preamble, no "here is my answer:", no markdown fencing.`}function K(n){let a=n.match(/\[[\s\S]*?\]/);if(!a)return[];try{let o=JSON.parse(a[0]);return Array.isArray(o)?o.filter(t=>t&&typeof t.title=="string"&&typeof t.path=="string").map(t=>({title:t.title,path:t.path})):[]}catch{return[]}}async function Q(n,a,o){let{writeFileSync:t,mkdirSync:u,rmSync:g}=await import("fs"),{tmpdir:l}=await import("os"),r=x(l(),`agentx-wiki-query-${process.pid}`);u(r,{recursive:!0});let s=x(r,`prompt-${Date.now()}.txt`);t(s,n);try{let h=`cat '${s}' | claude -p - --output-format json --max-turns 1 --model ${a} --disallowedTools "Bash Read Write Edit Glob Grep Agent WebSearch WebFetch NotebookEdit"`,p=L(h,{env:R({...process.env}),encoding:"utf-8",timeout:o,maxBuffer:4*1024*1024});try{let m=JSON.parse(p);return String(m.result||m.content||"")}catch{return p}}finally{try{g(s,{force:!0})}catch{}}}export{nt as a,$ as b,H as c};
|
|
49
|
-
//# sourceMappingURL=chunk-
|
|
49
|
+
//# sourceMappingURL=chunk-UOOFNFEO.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=chunk-
|
|
1
|
+
import{a as o}from"./chunk-3RLYCNGP.js";import{resolve as a}from"path";import{existsSync as d,readdirSync as c,mkdirSync as l}from"fs";var g=class{baseDir;agentsDir;mode;sharedStore;agentStores=new Map;log;constructor(t=a(process.cwd(),".agentx/wiki"),e=console.error.bind(console,"[wiki-hub]"),r="graph"){this.baseDir=t,this.agentsDir=a(t,"agents"),this.mode=r,this.log=e,l(this.agentsDir,{recursive:!0}),this.sharedStore=new o(t,e)}getMode(){return this.mode}getAgentWiki(t){let e=`${t}:${this.mode}`;if(this.agentStores.has(e))return this.agentStores.get(e);let r=a(this.agentsDir,t,this.mode),i=new o(r,this.log);return this.agentStores.set(e,i),i}getBaseDir(){return this.baseDir}getSharedStore(){return this.sharedStore}listAgents(){let t=new Set,e=this.sharedStore.listEntries();for(let r of e)t.add(r.agentId);if(d(this.agentsDir))for(let r of c(this.agentsDir))!r.startsWith("_")&&!r.startsWith(".")&&t.add(r);return[...t].sort()}getAgentEntries(t){return this.sharedStore.listEntries({agentId:t})}getUnabsorbedEntries(t){let e=this.getAgentWiki(t),r=this.getAgentEntries(t),i=new Set,n=e.rebuildIndex();for(let s of n.articles)if(s.sources)for(let h of s.sources)i.add(h);return r.filter(s=>!i.has(s.id))}summary(){return this.listAgents().map(e=>{let r=this.getAgentEntries(e),n=this.getAgentWiki(e).rebuildIndex(),s=this.getUnabsorbedEntries(e);return{agentId:e,totalEntries:r.length,totalArticles:n.articles.length,unabsorbed:s.length,articles:n.articles}})}};export{g as a};
|
|
2
|
+
//# sourceMappingURL=chunk-XQMLRZHY.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{b as o}from"./chunk-JXF54PT7.js";import"./chunk-QIJLFPWE.js";var s=o(process.versions.node);s&&(console.error(s),process.exit(1));var{buildProgram:r}=await import("./program-
|
|
2
|
+
import{b as o}from"./chunk-JXF54PT7.js";import"./chunk-QIJLFPWE.js";var s=o(process.versions.node);s&&(console.error(s),process.exit(1));var{buildProgram:r}=await import("./program-PZO6XJYZ.js"),{installCliSignalExit:i}=await import("./signal-exit-WL7G3EEZ.js");i();var e=await r();process.argv.slice(2).length===0?e.outputHelp():e.parse();
|
|
3
3
|
//# sourceMappingURL=cli.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a,b,c,d,e,f,g}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=client-
|
|
1
|
+
import{a,b,c,d,e,f,g}from"./chunk-JUJPQWLG.js";import"./chunk-M6NIPFRY.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as fetchAgents,d as fetchCrons,c as fetchProcesses,e as killProcess,a as resolveConn,f as sendTask,g as streamTask};
|
|
2
|
+
//# sourceMappingURL=client-WTC7P6PE.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{$ as e,X as a,Y as b,Z as c,_ as d,aa as f,ba as g,ca as h,da as i,ea as j,fa as k,ga as l,ha as m,ia as n,ka as o}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=config-
|
|
1
|
+
import{$ as e,X as a,Y as b,Z as c,_ as d,aa as f,ba as g,ca as h,da as i,ea as j,fa as k,ga as l,ha as m,ia as n,ka as o}from"./chunk-M6NIPFRY.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";o();export{a as INTEGRATION_KINDS,j as approvalsConfigSchema,d as callsSchema,c as cameraBotSchema,k as daemonConfigSchema,b as eventSubscriptionSchema,l as expandEnvVars,m as loadDaemonConfig,h as membersConfigSchema,g as peopleConfigSchema,f as personSchema,i as requestStatusConfigSchema,e as requestsConfigSchema,n as validateWorkspaces};
|
|
2
|
+
//# sourceMappingURL=config-WG62KB23.js.map
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{a,b,c,d,e}from"./chunk-JYFE6SQU.js";import"./chunk-M6NIPFRY.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{b as applyConfigMutation,a as findConfigPath,d as getAtPath,c as setAtPath,e as unsetAtPath};
|
|
2
|
+
//# sourceMappingURL=config-mutator-7REOEXW4.js.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as a,c as b,d as c,e as d,f as e}from"./chunk-
|
|
2
|
-
//# sourceMappingURL=doctor-
|
|
1
|
+
import{b as a,c as b,d as c,e as d,f as e}from"./chunk-O5BBV4ZV.js";import"./chunk-S2GAEH2F.js";import"./chunk-JXF54PT7.js";import"./chunk-M6NIPFRY.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-QIJLFPWE.js";export{e as daemonVoiceCheck,b as doctor,a as runDoctorChecks,c as runNotificationChecks,d as runReminderChecks};
|
|
2
|
+
//# sourceMappingURL=doctor-XDR22CFD.js.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1585,6 +1585,35 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1585
1585
|
* e.g. benchmark agents never draw on the fleet's subscription quota.
|
|
1586
1586
|
* An "api" agent with no key fails its task rather than falling back. */
|
|
1587
1587
|
billing: z.ZodDefault<z.ZodEnum<["subscription", "api"]>>;
|
|
1588
|
+
/** Run GitHub coding tasks as Claude cloud sessions (`claude --cloud`)
|
|
1589
|
+
* instead of local runs (#622). Off by default. Needs
|
|
1590
|
+
* `channels.github.cloudSessions: true` too. Only a task from the GitHub
|
|
1591
|
+
* channel for an issue or pull request of a repository this node has a
|
|
1592
|
+
* checkout of (the project rule's `runbook` path, or the agent's
|
|
1593
|
+
* workspace) goes to the cloud; everything else runs locally. The result
|
|
1594
|
+
* is a pull request, not a reply. A launch that fails falls back to a
|
|
1595
|
+
* local run. See src/agents/cloud-sessions.ts. */
|
|
1596
|
+
cloudSessions: z.ZodDefault<z.ZodObject<{
|
|
1597
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
1598
|
+
/** Launches per calendar day for this agent; 0 = no cap. */
|
|
1599
|
+
maxPerDay: z.ZodDefault<z.ZodNumber>;
|
|
1600
|
+
/** Hours a launched session counts as open: no local run starts for
|
|
1601
|
+
* its issue, and comments on the issue are forwarded to it. */
|
|
1602
|
+
openHours: z.ZodDefault<z.ZodNumber>;
|
|
1603
|
+
/** Seconds `claude --cloud` may take to print the session id before
|
|
1604
|
+
* the launch is given up and the task runs locally. */
|
|
1605
|
+
launchTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
1606
|
+
}, "strip", z.ZodTypeAny, {
|
|
1607
|
+
enabled: boolean;
|
|
1608
|
+
maxPerDay: number;
|
|
1609
|
+
openHours: number;
|
|
1610
|
+
launchTimeoutSeconds: number;
|
|
1611
|
+
}, {
|
|
1612
|
+
enabled?: boolean | undefined;
|
|
1613
|
+
maxPerDay?: number | undefined;
|
|
1614
|
+
openHours?: number | undefined;
|
|
1615
|
+
launchTimeoutSeconds?: number | undefined;
|
|
1616
|
+
}>>;
|
|
1588
1617
|
/** Improvement plan #3 — tool-use-required preset. When set,
|
|
1589
1618
|
* AgentX inspects the stream-json events from each task and
|
|
1590
1619
|
* fails the response with `tool_required_not_called: <name>`
|
|
@@ -1864,6 +1893,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1864
1893
|
preSpawnTimeoutSec: number;
|
|
1865
1894
|
permissionMode: string;
|
|
1866
1895
|
billing: "api" | "subscription";
|
|
1896
|
+
cloudSessions: {
|
|
1897
|
+
enabled: boolean;
|
|
1898
|
+
maxPerDay: number;
|
|
1899
|
+
openHours: number;
|
|
1900
|
+
launchTimeoutSeconds: number;
|
|
1901
|
+
};
|
|
1867
1902
|
toolUseRequired: string[];
|
|
1868
1903
|
persistentProcess: boolean;
|
|
1869
1904
|
queueMode: "drop" | "collect" | "followup";
|
|
@@ -1978,6 +2013,12 @@ declare const agentConfigSchema: z.ZodObject<{
|
|
|
1978
2013
|
drainTimeoutSeconds?: number | undefined;
|
|
1979
2014
|
permissionMode?: string | undefined;
|
|
1980
2015
|
billing?: "api" | "subscription" | undefined;
|
|
2016
|
+
cloudSessions?: {
|
|
2017
|
+
enabled?: boolean | undefined;
|
|
2018
|
+
maxPerDay?: number | undefined;
|
|
2019
|
+
openHours?: number | undefined;
|
|
2020
|
+
launchTimeoutSeconds?: number | undefined;
|
|
2021
|
+
} | undefined;
|
|
1981
2022
|
toolUseRequired?: string[] | undefined;
|
|
1982
2023
|
gitlabAutoReply?: boolean | undefined;
|
|
1983
2024
|
persistentProcess?: boolean | undefined;
|
|
@@ -2394,6 +2435,35 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2394
2435
|
* e.g. benchmark agents never draw on the fleet's subscription quota.
|
|
2395
2436
|
* An "api" agent with no key fails its task rather than falling back. */
|
|
2396
2437
|
billing: z.ZodDefault<z.ZodEnum<["subscription", "api"]>>;
|
|
2438
|
+
/** Run GitHub coding tasks as Claude cloud sessions (`claude --cloud`)
|
|
2439
|
+
* instead of local runs (#622). Off by default. Needs
|
|
2440
|
+
* `channels.github.cloudSessions: true` too. Only a task from the GitHub
|
|
2441
|
+
* channel for an issue or pull request of a repository this node has a
|
|
2442
|
+
* checkout of (the project rule's `runbook` path, or the agent's
|
|
2443
|
+
* workspace) goes to the cloud; everything else runs locally. The result
|
|
2444
|
+
* is a pull request, not a reply. A launch that fails falls back to a
|
|
2445
|
+
* local run. See src/agents/cloud-sessions.ts. */
|
|
2446
|
+
cloudSessions: z.ZodDefault<z.ZodObject<{
|
|
2447
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
2448
|
+
/** Launches per calendar day for this agent; 0 = no cap. */
|
|
2449
|
+
maxPerDay: z.ZodDefault<z.ZodNumber>;
|
|
2450
|
+
/** Hours a launched session counts as open: no local run starts for
|
|
2451
|
+
* its issue, and comments on the issue are forwarded to it. */
|
|
2452
|
+
openHours: z.ZodDefault<z.ZodNumber>;
|
|
2453
|
+
/** Seconds `claude --cloud` may take to print the session id before
|
|
2454
|
+
* the launch is given up and the task runs locally. */
|
|
2455
|
+
launchTimeoutSeconds: z.ZodDefault<z.ZodNumber>;
|
|
2456
|
+
}, "strip", z.ZodTypeAny, {
|
|
2457
|
+
enabled: boolean;
|
|
2458
|
+
maxPerDay: number;
|
|
2459
|
+
openHours: number;
|
|
2460
|
+
launchTimeoutSeconds: number;
|
|
2461
|
+
}, {
|
|
2462
|
+
enabled?: boolean | undefined;
|
|
2463
|
+
maxPerDay?: number | undefined;
|
|
2464
|
+
openHours?: number | undefined;
|
|
2465
|
+
launchTimeoutSeconds?: number | undefined;
|
|
2466
|
+
}>>;
|
|
2397
2467
|
/** Improvement plan #3 — tool-use-required preset. When set,
|
|
2398
2468
|
* AgentX inspects the stream-json events from each task and
|
|
2399
2469
|
* fails the response with `tool_required_not_called: <name>`
|
|
@@ -2673,6 +2743,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2673
2743
|
preSpawnTimeoutSec: number;
|
|
2674
2744
|
permissionMode: string;
|
|
2675
2745
|
billing: "api" | "subscription";
|
|
2746
|
+
cloudSessions: {
|
|
2747
|
+
enabled: boolean;
|
|
2748
|
+
maxPerDay: number;
|
|
2749
|
+
openHours: number;
|
|
2750
|
+
launchTimeoutSeconds: number;
|
|
2751
|
+
};
|
|
2676
2752
|
toolUseRequired: string[];
|
|
2677
2753
|
persistentProcess: boolean;
|
|
2678
2754
|
queueMode: "drop" | "collect" | "followup";
|
|
@@ -2787,6 +2863,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
2787
2863
|
drainTimeoutSeconds?: number | undefined;
|
|
2788
2864
|
permissionMode?: string | undefined;
|
|
2789
2865
|
billing?: "api" | "subscription" | undefined;
|
|
2866
|
+
cloudSessions?: {
|
|
2867
|
+
enabled?: boolean | undefined;
|
|
2868
|
+
maxPerDay?: number | undefined;
|
|
2869
|
+
openHours?: number | undefined;
|
|
2870
|
+
launchTimeoutSeconds?: number | undefined;
|
|
2871
|
+
} | undefined;
|
|
2790
2872
|
toolUseRequired?: string[] | undefined;
|
|
2791
2873
|
gitlabAutoReply?: boolean | undefined;
|
|
2792
2874
|
persistentProcess?: boolean | undefined;
|
|
@@ -3139,6 +3221,10 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3139
3221
|
/** Legacy auto-reply — same semantics as gitlab.autoReplyLegacy.
|
|
3140
3222
|
* Defaults true; set false once agent skills use channel.reply. */
|
|
3141
3223
|
autoReplyLegacy: z.ZodDefault<z.ZodBoolean>;
|
|
3224
|
+
/** Let agents whose `cloudSessions.enabled` is on send this channel's
|
|
3225
|
+
* issue and pull request tasks to Claude cloud sessions (#622). Off by
|
|
3226
|
+
* default: both this and the agent setting must be on. */
|
|
3227
|
+
cloudSessions: z.ZodDefault<z.ZodBoolean>;
|
|
3142
3228
|
/** GitHub PAT or env var (${GITHUB_TOKEN}) for posting comments back. */
|
|
3143
3229
|
token: z.ZodOptional<z.ZodString>;
|
|
3144
3230
|
/** Path to file containing the token (first line read at startup). */
|
|
@@ -3199,6 +3285,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3199
3285
|
debounceSeconds: z.ZodDefault<z.ZodNumber>;
|
|
3200
3286
|
}, "strip", z.ZodTypeAny, {
|
|
3201
3287
|
enabled: boolean;
|
|
3288
|
+
cloudSessions: boolean;
|
|
3202
3289
|
routes: {
|
|
3203
3290
|
agent: string;
|
|
3204
3291
|
repo: string;
|
|
@@ -3224,6 +3311,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3224
3311
|
}, {
|
|
3225
3312
|
enabled?: boolean | undefined;
|
|
3226
3313
|
token?: string | undefined;
|
|
3314
|
+
cloudSessions?: boolean | undefined;
|
|
3227
3315
|
routes?: {
|
|
3228
3316
|
agent: string;
|
|
3229
3317
|
repo: string;
|
|
@@ -3632,6 +3720,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3632
3720
|
};
|
|
3633
3721
|
github: {
|
|
3634
3722
|
enabled: boolean;
|
|
3723
|
+
cloudSessions: boolean;
|
|
3635
3724
|
routes: {
|
|
3636
3725
|
agent: string;
|
|
3637
3726
|
repo: string;
|
|
@@ -3780,6 +3869,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
3780
3869
|
github?: {
|
|
3781
3870
|
enabled?: boolean | undefined;
|
|
3782
3871
|
token?: string | undefined;
|
|
3872
|
+
cloudSessions?: boolean | undefined;
|
|
3783
3873
|
routes?: {
|
|
3784
3874
|
agent: string;
|
|
3785
3875
|
repo: string;
|
|
@@ -6543,6 +6633,44 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6543
6633
|
settingSources?: ("user" | "local" | "project")[] | undefined;
|
|
6544
6634
|
contextOnDemand?: boolean | undefined;
|
|
6545
6635
|
}>>;
|
|
6636
|
+
/** ObservationPack (#621). A large tool result stays in the context
|
|
6637
|
+
* and is re-read on every later request. With this on, a Claude Code
|
|
6638
|
+
* PostToolUse hook saves a text result over `limitBytes` to
|
|
6639
|
+
* `.agentx/observations/<agent id>/` and shows the model its first and last
|
|
6640
|
+
* bytes plus the path of the saved original, which it can Read or
|
|
6641
|
+
* grep. Off by default. claude-code agents only. Turning it on, or
|
|
6642
|
+
* changing `tools`, takes a daemon restart (the hook is written into
|
|
6643
|
+
* each workspace's .claude/settings.json at start); turning it off
|
|
6644
|
+
* applies on save. See src/agents/observation-pack.ts. */
|
|
6645
|
+
observationPack: z.ZodDefault<z.ZodObject<{
|
|
6646
|
+
enabled: z.ZodDefault<z.ZodBoolean>;
|
|
6647
|
+
/** A text result larger than this many bytes is packed. */
|
|
6648
|
+
limitBytes: z.ZodDefault<z.ZodNumber>;
|
|
6649
|
+
/** Bytes of the start and of the end of the original the model sees. */
|
|
6650
|
+
headBytes: z.ZodDefault<z.ZodNumber>;
|
|
6651
|
+
tailBytes: z.ZodDefault<z.ZodNumber>;
|
|
6652
|
+
/** Tools the pack applies to. Each entry must match the whole tool
|
|
6653
|
+
* name and may be a regular expression. `Read` is left out by
|
|
6654
|
+
* default: an agent that sees only the two ends of a file it is
|
|
6655
|
+
* about to edit has to read it again in pages. */
|
|
6656
|
+
tools: z.ZodDefault<z.ZodArray<z.ZodString, "many">>;
|
|
6657
|
+
/** Days a saved original is kept. 0 keeps every original. */
|
|
6658
|
+
retentionDays: z.ZodDefault<z.ZodNumber>;
|
|
6659
|
+
}, "strip", z.ZodTypeAny, {
|
|
6660
|
+
enabled: boolean;
|
|
6661
|
+
tools: string[];
|
|
6662
|
+
retentionDays: number;
|
|
6663
|
+
limitBytes: number;
|
|
6664
|
+
headBytes: number;
|
|
6665
|
+
tailBytes: number;
|
|
6666
|
+
}, {
|
|
6667
|
+
enabled?: boolean | undefined;
|
|
6668
|
+
tools?: string[] | undefined;
|
|
6669
|
+
retentionDays?: number | undefined;
|
|
6670
|
+
limitBytes?: number | undefined;
|
|
6671
|
+
headBytes?: number | undefined;
|
|
6672
|
+
tailBytes?: number | undefined;
|
|
6673
|
+
}>>;
|
|
6546
6674
|
}, "strip", z.ZodTypeAny, {
|
|
6547
6675
|
contextStrategy: "layered" | "planner";
|
|
6548
6676
|
staleMinutes: number;
|
|
@@ -6556,6 +6684,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6556
6684
|
contextOnDemand: boolean;
|
|
6557
6685
|
};
|
|
6558
6686
|
profileByChannel: Record<string, "full" | "lean">;
|
|
6687
|
+
observationPack: {
|
|
6688
|
+
enabled: boolean;
|
|
6689
|
+
tools: string[];
|
|
6690
|
+
retentionDays: number;
|
|
6691
|
+
limitBytes: number;
|
|
6692
|
+
headBytes: number;
|
|
6693
|
+
tailBytes: number;
|
|
6694
|
+
};
|
|
6559
6695
|
maxClaudeCodeDispatchesPerHour?: number | undefined;
|
|
6560
6696
|
maxClaudeCodeDispatchesPer5h?: number | undefined;
|
|
6561
6697
|
}, {
|
|
@@ -6573,6 +6709,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6573
6709
|
contextOnDemand?: boolean | undefined;
|
|
6574
6710
|
} | undefined;
|
|
6575
6711
|
profileByChannel?: Record<string, "full" | "lean"> | undefined;
|
|
6712
|
+
observationPack?: {
|
|
6713
|
+
enabled?: boolean | undefined;
|
|
6714
|
+
tools?: string[] | undefined;
|
|
6715
|
+
retentionDays?: number | undefined;
|
|
6716
|
+
limitBytes?: number | undefined;
|
|
6717
|
+
headBytes?: number | undefined;
|
|
6718
|
+
tailBytes?: number | undefined;
|
|
6719
|
+
} | undefined;
|
|
6576
6720
|
}>>;
|
|
6577
6721
|
/** Move B — JS/TS plugins. Each entry is an installed npm package name
|
|
6578
6722
|
* (e.g. `agentx-plugin-mattermost` or `@acme/plugin-mattermost`); the
|
|
@@ -6635,6 +6779,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6635
6779
|
preSpawnTimeoutSec: number;
|
|
6636
6780
|
permissionMode: string;
|
|
6637
6781
|
billing: "api" | "subscription";
|
|
6782
|
+
cloudSessions: {
|
|
6783
|
+
enabled: boolean;
|
|
6784
|
+
maxPerDay: number;
|
|
6785
|
+
openHours: number;
|
|
6786
|
+
launchTimeoutSeconds: number;
|
|
6787
|
+
};
|
|
6638
6788
|
toolUseRequired: string[];
|
|
6639
6789
|
persistentProcess: boolean;
|
|
6640
6790
|
queueMode: "drop" | "collect" | "followup";
|
|
@@ -6868,6 +7018,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
6868
7018
|
};
|
|
6869
7019
|
github: {
|
|
6870
7020
|
enabled: boolean;
|
|
7021
|
+
cloudSessions: boolean;
|
|
6871
7022
|
routes: {
|
|
6872
7023
|
agent: string;
|
|
6873
7024
|
repo: string;
|
|
@@ -7312,6 +7463,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7312
7463
|
contextOnDemand: boolean;
|
|
7313
7464
|
};
|
|
7314
7465
|
profileByChannel: Record<string, "full" | "lean">;
|
|
7466
|
+
observationPack: {
|
|
7467
|
+
enabled: boolean;
|
|
7468
|
+
tools: string[];
|
|
7469
|
+
retentionDays: number;
|
|
7470
|
+
limitBytes: number;
|
|
7471
|
+
headBytes: number;
|
|
7472
|
+
tailBytes: number;
|
|
7473
|
+
};
|
|
7315
7474
|
maxClaudeCodeDispatchesPerHour?: number | undefined;
|
|
7316
7475
|
maxClaudeCodeDispatchesPer5h?: number | undefined;
|
|
7317
7476
|
};
|
|
@@ -7448,6 +7607,12 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7448
7607
|
drainTimeoutSeconds?: number | undefined;
|
|
7449
7608
|
permissionMode?: string | undefined;
|
|
7450
7609
|
billing?: "api" | "subscription" | undefined;
|
|
7610
|
+
cloudSessions?: {
|
|
7611
|
+
enabled?: boolean | undefined;
|
|
7612
|
+
maxPerDay?: number | undefined;
|
|
7613
|
+
openHours?: number | undefined;
|
|
7614
|
+
launchTimeoutSeconds?: number | undefined;
|
|
7615
|
+
} | undefined;
|
|
7451
7616
|
toolUseRequired?: string[] | undefined;
|
|
7452
7617
|
gitlabAutoReply?: boolean | undefined;
|
|
7453
7618
|
persistentProcess?: boolean | undefined;
|
|
@@ -7722,6 +7887,7 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
7722
7887
|
github?: {
|
|
7723
7888
|
enabled?: boolean | undefined;
|
|
7724
7889
|
token?: string | undefined;
|
|
7890
|
+
cloudSessions?: boolean | undefined;
|
|
7725
7891
|
routes?: {
|
|
7726
7892
|
agent: string;
|
|
7727
7893
|
repo: string;
|
|
@@ -8161,6 +8327,14 @@ declare const daemonConfigSchema: z.ZodObject<{
|
|
|
8161
8327
|
contextOnDemand?: boolean | undefined;
|
|
8162
8328
|
} | undefined;
|
|
8163
8329
|
profileByChannel?: Record<string, "full" | "lean"> | undefined;
|
|
8330
|
+
observationPack?: {
|
|
8331
|
+
enabled?: boolean | undefined;
|
|
8332
|
+
tools?: string[] | undefined;
|
|
8333
|
+
retentionDays?: number | undefined;
|
|
8334
|
+
limitBytes?: number | undefined;
|
|
8335
|
+
headBytes?: number | undefined;
|
|
8336
|
+
tailBytes?: number | undefined;
|
|
8337
|
+
} | undefined;
|
|
8164
8338
|
} | undefined;
|
|
8165
8339
|
plugins?: string[] | undefined;
|
|
8166
8340
|
processPool?: {
|
|
@@ -9756,6 +9930,16 @@ interface AgentResponse {
|
|
|
9756
9930
|
* the task instead of a spawned provider (attach mode). Claude Code
|
|
9757
9931
|
* session id of the terminal that wrote the reply. */
|
|
9758
9932
|
viaAttachedSession?: string;
|
|
9933
|
+
/** Set when the task went to a Claude cloud session instead of a local
|
|
9934
|
+
* run (#622): the session's id and claude.ai/code URL. `followUp` marks
|
|
9935
|
+
* a comment forwarded to a session that was already open. The result of
|
|
9936
|
+
* the session is a pull request, so `content` is only the notice posted
|
|
9937
|
+
* on the issue. */
|
|
9938
|
+
cloudSession?: {
|
|
9939
|
+
id: string;
|
|
9940
|
+
url: string;
|
|
9941
|
+
followUp?: boolean;
|
|
9942
|
+
};
|
|
9759
9943
|
/** Set on tasks that ran under a restricted autonomy level. */
|
|
9760
9944
|
autonomy?: AutonomyLevel;
|
|
9761
9945
|
/** Tool calls the autonomy guard blocked during this task — what the
|
|
@@ -11500,6 +11684,9 @@ declare class AgentRegistry {
|
|
|
11500
11684
|
private taskAborts;
|
|
11501
11685
|
/** Runs a daemon shutdown stopped, with the reason each one reports. */
|
|
11502
11686
|
private interruptedRuns;
|
|
11687
|
+
/** Claude cloud sessions this node launched (#622), by issue. Created on
|
|
11688
|
+
* first use so a fleet with the setting off never touches the file. */
|
|
11689
|
+
private cloudSessions?;
|
|
11503
11690
|
/** The context each running task was started with, by RunningTask id.
|
|
11504
11691
|
* Kept apart from RunningTask because /agents serialises that, and a
|
|
11505
11692
|
* context can carry a whole conversation history. Read by A2A
|
|
@@ -11623,6 +11810,16 @@ declare class AgentRegistry {
|
|
|
11623
11810
|
* Get the primary channel handle for an agent (e.g. "@my_bot" on telegram).
|
|
11624
11811
|
*/
|
|
11625
11812
|
private getChannelHandle;
|
|
11813
|
+
/** The store of cloud sessions this node launched (#622). */
|
|
11814
|
+
private cloudSessionStore;
|
|
11815
|
+
/** Where this task runs (#622): a Claude cloud session, a follow-up to one
|
|
11816
|
+
* already open for its issue, or locally. Decided before the dispatch
|
|
11817
|
+
* gates, which only guard a local spawn. Cheap when the setting is off. */
|
|
11818
|
+
private planCloudSession;
|
|
11819
|
+
/** Launches the cloud session (or forwards to the open one) and records
|
|
11820
|
+
* it on the trace. Null means: run locally, the reason is logged and on
|
|
11821
|
+
* the trace. */
|
|
11822
|
+
private runCloudSession;
|
|
11626
11823
|
/**
|
|
11627
11824
|
* Execute a task on an agent. Respects maxConcurrent limit.
|
|
11628
11825
|
*
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt,ia as Tt,ja as Mt}from"./chunk-
|
|
1
|
+
import{a as St,b as kt,c as vt,d as xt,e as $t,f as Ct,g as Pt,h as bt,ia as Tt,ja as Mt}from"./chunk-N72AJ2LS.js";import"./chunk-S4RQ6Q2B.js";import"./chunk-OTCF46CF.js";import"./chunk-S2GAEH2F.js";import"./chunk-GTJIKXDB.js";import"./chunk-DG5I6PPM.js";import"./chunk-ZVP6GB4G.js";import"./chunk-PPUN7YHA.js";import"./chunk-VZLIBDLH.js";import"./chunk-EKJG63EJ.js";import"./chunk-4YBFKN3B.js";import"./chunk-2AXFYDWF.js";import"./chunk-AQASR6KR.js";import"./chunk-ACFQBLPX.js";import"./chunk-LQE73AZR.js";import"./chunk-2D3RYIDU.js";import"./chunk-3Z5P2CWS.js";import"./chunk-E5OV6RTG.js";import{aa as yt,m as lt,n as ct,o as dt,p as mt,q as pt}from"./chunk-UIDHTIPG.js";import"./chunk-UEOG3H25.js";import"./chunk-GLQLCBJS.js";import"./chunk-DP7RTNDM.js";import{a as L}from"./chunk-C245D4BZ.js";import{A as D,B as z,C as V,a as ye,b as we,c as Se,d as Ae,e as Ie,f as Oe,g as Ne,h as He,i as je,j as Ue,k as _e,l as I,m as q,n as Be,o as qe,p as Ye,q as O,r as ze,s as Ve,t as Xe,u as x,v as Y,w as Qe,x as Ze,y as et,z as wt}from"./chunk-H5ZNKPXN.js";import{a as B,b as M,c as F}from"./chunk-SFQUP3BP.js";import"./chunk-LLNPKE7H.js";import"./chunk-SHEUCITK.js";import"./chunk-Y4CYQV7G.js";import"./chunk-55MUAKXA.js";import"./chunk-GV7S5BAX.js";import"./chunk-SZDACK6O.js";import"./chunk-76Z4VHDX.js";import"./chunk-W4YR2RO2.js";import"./chunk-AFRHKA7B.js";import{s as ut}from"./chunk-PEDNM2FA.js";import"./chunk-JYFE6SQU.js";import"./chunk-VWTBHLMX.js";import"./chunk-XQMLRZHY.js";import{a as ht}from"./chunk-3RLYCNGP.js";import"./chunk-36AXN6ZB.js";import"./chunk-KA2UIZXG.js";import"./chunk-GQ76J72O.js";import"./chunk-ILEC3IAV.js";import"./chunk-J3SOEFRE.js";import"./chunk-SIU6STB2.js";import"./chunk-X5C5W3E4.js";import"./chunk-GSX4NK2N.js";import"./chunk-FQGEDMG6.js";import"./chunk-MYVHVJWZ.js";import"./chunk-UDJAODAB.js";import"./chunk-23A5K5UW.js";import"./chunk-QD6IICK7.js";import"./chunk-CECHWYJ2.js";import"./chunk-UOOFNFEO.js";import{f as gt,g as ft}from"./chunk-NL6JSS4E.js";import"./chunk-WPNRDEHW.js";import"./chunk-2GIDVZ4H.js";import{j as it,k as rt,l as at}from"./chunk-CXCXMOTB.js";import"./chunk-72SZI2UW.js";import"./chunk-FX3D7YON.js";import"./chunk-FCPTN6NF.js";import"./chunk-QOYAX2FT.js";import{a as ke,b as ve,c as xe,d as $e,e as Ce,f as Pe,g as be,h as Te,i as Me,j as Re,l as Ee,m as Ge,o as T,p as W}from"./chunk-5MUJZODV.js";import{a as m,b as G}from"./chunk-7I7IEX4S.js";import{b as Fe,c as Le,d as A,e as De}from"./chunk-JHCI6XCJ.js";import{a as Ke,b as Je,e as We}from"./chunk-DSYKYZMT.js";import{fa as tt,ha as st,ia as ot,ka as nt}from"./chunk-M6NIPFRY.js";import"./chunk-RJ7DASOU.js";import"./chunk-BRK6M6LA.js";import"./chunk-2QNT5JDS.js";import"./chunk-RGDKHYY2.js";import"./chunk-QIJLFPWE.js";W();G();import{execa as Rt}from"execa";import{existsSync as se,promises as X}from"fs";import S from"path";import ie from"node-fetch";async function Et(o,e){let t=o.split("/");if(t.length<2)throw new Error(`Invalid skill package ID: ${o}. Expected format: owner/repo`);let s=t[0],i=t[1],n=t[2];try{let a=n?`${s}/${i}/${n}`:`${s}/${i}`;await Rt("npx",["-y","skills","add",a],{cwd:e,stdio:"pipe"}),m.success(`Installed skill package: ${o}`);let r=S.resolve(e,".skills",`${s}_${i}`);if(se(r))return await ne(r,o);let d=S.resolve(e,".skills");return se(d)?await ne(d,o):[]}catch{return m.info(`Fetching skills directly from GitHub: ${s}/${i}`),await Gt(s,i,n,e)}}async function Gt(o,e,t,s){let i=[];try{let n=`https://api.github.com/repos/${o}/${e}/git/trees/main?recursive=1`,a=await ie(n);if(!a.ok)throw new Error(`GitHub API error: ${a.status}`);let d=(await a.json()).tree.filter(p=>p.type==="blob"&&p.path.endsWith("SKILL.md"));if(t){let p=d.find(f=>f.path.includes(`/${t}/`)||f.path===`${t}/SKILL.md`);if(p){let f=await oe(o,e,p.path,s);f&&i.push(f)}}else for(let p of d){let f=await oe(o,e,p.path,s);f&&i.push(f)}}catch(n){m.error(`Failed to fetch skills from GitHub: ${n.message}`)}return i}async function oe(o,e,t,s){try{let i=`https://raw.githubusercontent.com/${o}/${e}/main/${t}`,n=await ie(i);if(!n.ok)return null;let a=await n.text(),r=A(a);if(r){r.source="remote",r.packageId=`${o}/${e}`;let d=S.dirname(t),p=S.resolve(s,".skills",`${o}_${e}`,d);await X.mkdir(p,{recursive:!0}),await X.writeFile(S.resolve(p,"SKILL.md"),a),r.path=S.resolve(p,"SKILL.md")}return r}catch{return null}}async function ne(o,e){let t=[],{default:s}=await import("fast-glob"),i=await s.glob("**/SKILL.md",{cwd:o,deep:5});for(let n of i)try{let a=S.resolve(o,n),r=await X.readFile(a,"utf8"),d=A(r);d&&(d.source="remote",d.path=a,d.packageId=e,t.push(d))}catch{}return t}async function At(o,e,t,s,i){let n=["---",`name: ${o}`,`description: ${e}`];if(s?.length){n.push("tags:");for(let a of s)n.push(` - ${a}`)}if(i?.length){n.push("globs:");for(let a of i)n.push(` - ${a}`)}return n.push("---"),`${n.join(`
|
|
2
2
|
`)}
|
|
3
3
|
|
|
4
4
|
${t}`}async function It(o){let{loadLocalSkills:e}=await import("./loader-YFVSSYSL.js");return e(o)}async function Ot(o,e,t,s,i){let a=[{role:"system",content:`You are a skill author for the Agent Skills ecosystem (skills.sh).
|