@easbot/skills 0.3.14 → 0.3.16
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/chunks/{blob-SCUVTYVE.cjs → blob-RYNC3CVY.cjs} +1 -1
- package/dist/chunks/{chunk-NH4TYEPW.mjs → chunk-5DAHAO55.mjs} +1 -1
- package/dist/chunks/{chunk-AQYRRXU5.mjs → chunk-6OLPTZDO.mjs} +2 -2
- package/dist/chunks/{chunk-5BDDXFOF.mjs → chunk-BQ6QWQEM.mjs} +1 -1
- package/dist/chunks/{chunk-5RWSXDNO.cjs → chunk-BWDTT6SA.cjs} +2 -2
- package/dist/chunks/chunk-HI5IN4UL.mjs +265 -0
- package/dist/chunks/chunk-HOK3SUH4.cjs +22 -0
- package/dist/chunks/{chunk-UGHF4GOW.cjs → chunk-IJI72D6W.cjs} +2 -2
- package/dist/chunks/{chunk-ISMGLHYS.cjs → chunk-JUNIAQ2A.cjs} +1 -1
- package/dist/chunks/{chunk-DFBKA5A6.cjs → chunk-LJ63Q26N.cjs} +1 -1
- package/dist/chunks/{chunk-2E6BHPFV.cjs → chunk-S5OLAC7X.cjs} +46 -46
- package/dist/chunks/chunk-UUZB3HCD.mjs +22 -0
- package/dist/chunks/chunk-Y6D5Z6AU.mjs +1 -0
- package/dist/chunks/cli-handler-2G4ZYO2S.cjs +1 -0
- package/dist/chunks/cli-handler-F4DUEULA.mjs +1 -0
- package/dist/chunks/installer-3ZLHOVAO.cjs +1 -0
- package/dist/chunks/{installer-NJN3PT5F.mjs → installer-UUEXYC7I.mjs} +1 -1
- package/dist/chunks/{interfaces-5BH4K5TM.cjs → interfaces-T3TO7GQW.cjs} +1 -1
- package/dist/chunks/local-lock-KNX2RUIV.cjs +1 -0
- package/dist/chunks/{local-lock-ZHTDWYXF.mjs → local-lock-UYZTKIET.mjs} +1 -1
- package/dist/chunks/scan-6EBCZDVK.cjs +1 -0
- package/dist/chunks/scan-BZA5LEZN.mjs +1 -0
- package/dist/chunks/{skill-lock-MNRZ7TIX.mjs → skill-lock-CDMLVBYH.mjs} +1 -1
- package/dist/chunks/skill-lock-WPACLO4W.cjs +1 -0
- package/dist/chunks/store-2ULHEVHS.cjs +1 -0
- package/dist/chunks/{store-UJPPYDBG.mjs → store-FRXO6UWU.mjs} +1 -1
- package/dist/chunks/{telemetry-B4PS27S5.cjs → telemetry-TAVF3FAM.cjs} +1 -1
- package/dist/cli.cjs +1 -1
- package/dist/cli.mjs +1 -1
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +1 -1
- package/package.json +7 -7
- package/dist/chunks/chunk-6NTEYECA.mjs +0 -22
- package/dist/chunks/chunk-J6PRUXFG.mjs +0 -265
- package/dist/chunks/chunk-JCOXRETY.cjs +0 -22
- package/dist/chunks/chunk-ML6B4IQL.mjs +0 -1
- package/dist/chunks/cli-handler-3FSM4C7L.mjs +0 -1
- package/dist/chunks/cli-handler-B6H4RZEM.cjs +0 -1
- package/dist/chunks/installer-YDJBZTQ7.cjs +0 -1
- package/dist/chunks/local-lock-SPZB3AB7.cjs +0 -1
- package/dist/chunks/scan-6W47D2KJ.mjs +0 -1
- package/dist/chunks/scan-L6UNVP3V.cjs +0 -1
- package/dist/chunks/skill-lock-VX2HGPTY.cjs +0 -1
- package/dist/chunks/store-TSS4BMBF.cjs +0 -1
- /package/dist/chunks/{chunk-GWUDKZEH.cjs → chunk-BWPPLYIF.cjs} +0 -0
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import {k}from'./chunk-Y6D5Z6AU.mjs';import {p,m as m$1,o}from'./chunk-RWZ4LFSN.mjs';import {b as b$1,c,d as d$1,l}from'./chunk-ZJS7IO5V.mjs';import {a,d,b as b$2}from'./chunk-ZYDDQV73.mjs';import {b}from'./chunk-WQGSYA5D.mjs';import {rm,mkdtemp,readFile,rename,mkdir,writeFile,rmdir,cp,readdir,stat}from'fs/promises';import {dirname,join,normalize,resolve,sep,basename,relative,isAbsolute}from'path';import {createHash}from'crypto';import {existsSync}from'fs';import {Filesystem,Glob,Wildcard,git}from'@easbot/utils';import me from'simple-git';import {tmpdir}from'os';import {execFile}from'child_process';import {promisify}from'util';import {gunzipSync,inflateRawSync}from'zlib';var N=6;function pe(n){let t=n.indexOf(":");return t<0||t===n.length-1?null:{marketId:n.slice(0,t),pluginSlug:n.slice(t+1)}}function ge(n){let t=pe(n);return t?`plugins/${t.pluginSlug}`:null}function $t(n,t,e){if(!n.marketId||!n.pluginId)return null;let r=ge(n.pluginId);return r?`${t.replace(/\\/g,"/").replace(/\/+$/,"")}/${n.marketId}/${r}/${e}`:null}var Wt=3e5,rt=(()=>{let n=process.env.SKILLS_CLONE_TIMEOUT;if(!n)return Wt;let t=Number.parseInt(n,10);return Number.isFinite(t)&&t>0?t:Wt})(),Kt=promisify(execFile),L=class extends Error{constructor(e,r,i=false,s=false){super(e);b(this,"url");b(this,"isTimeout");b(this,"isAuthError");this.name="GitCloneError",this.url=r,this.isTimeout=i,this.isAuthError=s;}};function Le(n){let t=n.match(/^git@github\.com:([^/]+)\/([^/]+?)(?:\.git)?$/i);if(t){let e=t[1],r=t[2];return {owner:e,repo:r,slug:`${e}/${r}`,sshUrl:`git@github.com:${e}/${r}.git`}}try{let e=new URL(n);if(e.hostname!=="github.com")return null;let r=e.pathname.match(/^\/([^/]+)\/([^/]+?)(?:\.git)?\/?$/);if(!r)return null;let i=r[1],s=r[2];return {owner:i,repo:s,slug:`${i}/${s}`,sshUrl:`git@github.com:${i}/${s}.git`}}catch{return null}}function ve(n){try{let t=new URL(n);return t.protocol==="https:"&&t.hostname==="github.com"}catch{return false}}function Dt(n){let t=n.toLowerCase();return t.includes("saml sso")||t.includes("enforced sso")||t.includes("enabled or enforced saml")||t.includes("re-authorize the oauth application")}function Ie(n){return n.includes("Authentication failed")||n.includes("could not read Username")||n.includes("Permission denied")||n.includes("Repository not found")||n.includes("requested URL returned error: 403")||Dt(n)}function nt(n){let t={...process.env};return delete t.GIT_ASKPASS,delete t.GIT_EDITOR,delete t.GIT_SEQUENCE_EDITOR,delete t.GIT_PAGER,delete t.GIT_SSH_COMMAND,delete t.GIT_CONFIG_GLOBAL,delete t.GIT_CONFIG_SYSTEM,delete t.PAGER,delete t.EDITOR,delete t.VISUAL,t.GIT_TERMINAL_PROMPT="0",t.GIT_LFS_SKIP_SMUDGE="1",Object.assign(t,n),me({timeout:{block:rt},config:["filter.lfs.required=false","protocol.version=2","remote.origin.promisor=false"]}).env(t)}async function Nt(n){try{await rm(n,{recursive:!0,force:!0});}catch{}await mkdir(n,{recursive:true});}async function $e(n,t,e){let r=n.slug;try{let{stdout:s,stderr:o}=await Kt("gh",["auth","status","-h","github.com"],{timeout:5e3,env:{...process.env,GIT_TERMINAL_PROMPT:"0"}}),l=`${s}${o}`;/Git operations protocol:\s+ssh/i.test(l)&&(r=n.sshUrl);}catch{return false}return await Kt("gh",["repo","clone",r,t,"--",...e?["--depth=1","--branch",e]:["--depth=1"]],{timeout:rt,env:{...process.env,GIT_TERMINAL_PROMPT:"0"}}),true}function Re(n,t,e){return t&&Dt(e)?`GitHub blocked HTTPS access to ${n} because the organization enforces SAML SSO.
|
|
2
|
+
skills tried your existing git credentials and available fallbacks, but none succeeded.
|
|
3
|
+
- Re-authorize your GitHub credentials/app for that org's SSO policy
|
|
4
|
+
- Or rerun with SSH: easbot skills add ${t.sshUrl}
|
|
5
|
+
- Verify access with: gh auth status -h github.com or ssh -T git@github.com`:t?`Authentication failed for ${n}.
|
|
6
|
+
- For private repos, ensure you have access
|
|
7
|
+
- Retry with SSH: easbot skills add ${t.sshUrl}
|
|
8
|
+
- Check access with: gh auth status -h github.com or ssh -T git@github.com`:`Authentication failed for ${n}.
|
|
9
|
+
- For private repos, ensure you have access
|
|
10
|
+
- For SSH: Check your keys with 'ssh -T git@github.com'
|
|
11
|
+
- For HTTPS: Run 'gh auth login' or configure git credentials`}async function Ct(n,t,e){if(e){await Filesystem.mkdir(dirname(e),{recursive:true});let o=t?["--depth","1","--branch",t]:["--depth","1"];try{return await nt().clone(n,e,o),e}catch(l){throw await rm(e,{recursive:true,force:true}).catch(()=>{}),l}}let r=await mkdtemp(join(tmpdir(),"skills-")),i=t?["--depth","1","--branch",t]:["--depth","1"],s=Le(n);try{return await nt().clone(n,r,i),r}catch(o){let l=o instanceof Error?o.message:String(o),a=l.includes("block timeout")||l.includes("timed out"),c=Ie(l);if(a){try{await rm(r,{recursive:!0,force:!0});}catch{}let f=Math.round(rt/1e3);throw new L(`Clone timed out after ${f}s. Common causes:
|
|
12
|
+
- Large repository: raise the timeout with SKILLS_CLONE_TIMEOUT=600000 (10m)
|
|
13
|
+
- Slow network: retry, or clone manually and pass the local path to 'skills add'
|
|
14
|
+
- Private repo without credentials: ensure auth is configured
|
|
15
|
+
- For SSH: ssh-add -l (to check loaded keys)
|
|
16
|
+
- For HTTPS: gh auth status (if using GitHub CLI)`,n,true,false)}if(c&&s&&ve(n)){try{if(await Nt(r),await $e(s,r,t))return r}catch{}try{return await Nt(r),await nt({GIT_SSH_COMMAND:process.env.GIT_SSH_COMMAND??"ssh -o BatchMode=yes"}).clone(s.sshUrl,r,i),r}catch{}}try{await rm(r,{recursive:!0,force:!0});}catch{}if(c)throw new L(Re(n,s,l),n,false,true);let u=l.includes("filter.smudge")?`
|
|
17
|
+
- The repo defines a smudge/clean filter that Git considers unsafe.
|
|
18
|
+
Enable it with: git config --global protocol.allowUnsafeFilter true
|
|
19
|
+
Or upgrade Git, or unset filter.<driver>.* in the source repo.`:"";throw new L(`Failed to clone ${n}: ${l}${u}`,n,false,false)}}async function $n(n){let t=normalize(resolve(n)),e=normalize(resolve(tmpdir()));if(!t.startsWith(e+sep)&&t!==e)throw new Error("Attempted to clean up directory outside of temp directory");await rm(n,{recursive:true,force:true});}function V(n){if(n.type==="local")return null;let t=n.url.match(/^git@[^:]+:(.+)$/);if(t){let e=t[1];return e=e.replace(/\.git$/,""),e.includes("/")?e:null}if(n.url.startsWith("ssh://"))try{let r=new URL(n.url).pathname.slice(1);return r=r.replace(/\.git$/,""),r.includes("/")?r:null}catch{return null}if(!n.url.startsWith("http://")&&!n.url.startsWith("https://"))return null;try{let r=new URL(n.url).pathname.slice(1);if(r=r.replace(/\.git$/,""),r.includes("/"))return r}catch{}return null}function Nn(n){let t=n.match(/^([^/]+)\/([^/]+)$/);return t?{owner:t[1],repo:t[2]}:null}async function Un(n,t){try{let e=await fetch(`https://api.github.com/repos/${n}/${t}`);return e.ok?(await e.json()).private===!0:null}catch{return null}}async function Mt(n,t){try{let e=await fetch(`https://api.github.com/repos/${n}/${t}`,{headers:{Accept:"application/vnd.github+json"}});if(!e.ok)return null;let r=await e.json();return typeof r.default_branch=="string"&&r.default_branch.length>0?r.default_branch:null}catch{return null}}function j(n){let e=n.replace(/\\/g,"/").split("/");for(let r of e)if(r==="..")throw new Error(`Unsafe subpath: "${n}" contains path traversal segments. Subpaths must not contain ".." components.`);return n}function Ke(n){return isAbsolute(n)||n.startsWith("./")||n.startsWith("../")||n==="."||n===".."||/^[a-zA-Z]:[/\\]/.test(n)}var Ne={"coinbase/agentWallet":"coinbase/agentic-wallet-skills"};function it(n){try{return decodeURIComponent(n)}catch{return n}}function Ue(n){if(n.startsWith("github:")||n.startsWith("gitlab:")||n.startsWith("git@")||/^ssh:\/\/.+\.git(?:$|[/?])/i.test(n))return true;if(n.startsWith("http://")||n.startsWith("https://"))try{let t=new URL(n),e=t.pathname;if(t.hostname==="github.com")return /^\/[^/]+\/[^/]+(?:\.git)?(?:\/tree\/[^/]+(?:\/.*)?)?\/?$/.test(e);if(t.hostname==="gitlab.com")return /^\/.+?\/[^/]+(?:\.git)?(?:\/-\/tree\/[^/]+(?:\/.*)?)?\/?$/.test(e)}catch{}return /^https?:\/\/.+\.git(?:$|[/?])/i.test(n)?true:!n.includes(":")&&!n.startsWith(".")&&!n.startsWith("/")&&/^([^/]+)\/([^/]+)(?:\/(.+)|@(.+))?$/.test(n)}function De(n){let t=n.indexOf("#");if(t<0)return {inputWithoutFragment:n};let e=n.slice(0,t),r=n.slice(t+1);if(!r)return {inputWithoutFragment:e};if(!Ue(e))return {inputWithoutFragment:n};let i=r.indexOf("@");if(i===-1)return {inputWithoutFragment:e,ref:it(r)};let s=r.slice(0,i),o=r.slice(i+1);return {inputWithoutFragment:e,ref:s?it(s):void 0,subpath:o?it(o):void 0}}function Ft(n,t,e){return t?`${n}#${t}${e?`@${e}`:""}`:n}function Tt(n){if(Ke(n)){let g=resolve(n);return {type:"local",url:g,localPath:g}}let{inputWithoutFragment:t,ref:e,subpath:r}=De(n);n=t;let i=Ne[n];i&&(n=i);let s=n.match(/^github:(.+)$/);if(s)return Tt(Ft(s[1],e,r));let o=n.match(/^gitlab:(.+)$/);if(o)return Tt(Ft(`https://gitlab.com/${o[1]}`,e,r));let l=n.match(/github\.com\/([^/]+)\/([^/]+)\/tree\/([^/]+)\/(.+)/);if(l){let[,g,p,w,S]=l;return {type:"github",url:`https://github.com/${g}/${p}.git`,ref:w||e,subpath:S&&j(S)}}let a=n.match(/github\.com\/([^/]+)\/([^/]+)\/tree\/([^/]+)$/);if(a){let[,g,p,w]=a;return {type:"github",url:`https://github.com/${g}/${p}.git`,ref:w||e}}let c=n.match(/github\.com\/([^/]+)\/([^/]+)/);if(c){let[,g,p]=c,w=p.replace(/\.git$/,"");return {type:"github",url:`https://github.com/${g}/${w}.git`,...e?{ref:e}:{}}}let u=n.match(/^(https?):\/\/([^/]+)\/(.+?)\/-\/tree\/([^/]+)\/(.+)/);if(u){let[,g,p,w,S,k]=u;if(p!=="github.com"&&w)return {type:"gitlab",url:`${g}://${p}/${w.replace(/\.git$/,"")}.git`,ref:S||e,subpath:k&&j(k)}}let f=n.match(/^(https?):\/\/([^/]+)\/(.+?)\/-\/tree\/([^/]+)$/);if(f){let[,g,p,w,S]=f;if(p!=="github.com"&&w)return {type:"gitlab",url:`${g}://${p}/${w.replace(/\.git$/,"")}.git`,ref:S||e}}let d=n.match(/gitlab\.com\/(.+?)(?:\.git)?\/?$/);if(d){let g=d[1];if(g.includes("/"))return {type:"gitlab",url:`https://gitlab.com/${g}.git`,...e?{ref:e}:{}}}let y=n.match(/^([^/@]+)\/([^/@]+)@(.+)?$/);if(y&&!n.includes(":")&&!n.startsWith(".")&&!n.startsWith("/")){let g=y[1],p=y[2],w=y[3];if(!w)return {type:"github",url:`https://github.com/${g}/${p}.git`,...e?{ref:e}:{}};let S=j(w);return {type:"github",url:`https://github.com/${g}/${p}.git`,...e?{ref:e}:{},...S?{subpath:S}:{}}}let x=n.match(/^([^/@]+)\/([^/@]+)(?:\/(.+?))?\/?$/);if(x&&!n.includes(":")&&!n.startsWith(".")&&!n.startsWith("/")){let[,g,p,w]=x;return {type:"github",url:`https://github.com/${g}/${p}.git`,...e?{ref:e}:{},subpath:r??(w&&j(w))}}return Ce(n)?{type:"well-known",url:n}:{type:"git",url:n,...e?{ref:e}:{},...r?{subpath:r}:{}}}function Ce(n){if(!n.startsWith("http://")&&!n.startsWith("https://"))return false;try{let t=new URL(n);return !(["github.com","gitlab.com","raw.githubusercontent.com"].includes(t.hostname)||n.endsWith(".git"))}catch{return false}}var _t="https://schemas.agentskills.io/discovery/0.2.0/schema.json",_e=/\/schemas\/agent-skills\/index\.v1\.json$/,ze=50*1024*1024,He=1e3;function Oe(n,t){let e=n.skillPath;if(typeof e=="string"&&e.trim()!==""&&e!==null)return e.replace(/^\/+/,"").replace(/\/+$/,"");if(typeof n.sourceUrl=="string"&&n.sourceUrl)try{let i=new URL(n.sourceUrl).pathname,s=/\/\.well-known\/(?:agent-skills|skills)\/(.*?)\/SKILL\.md$/,o=i.match(s);if(o?.[1])return o[1];let l=i.match(/^(.*?)\/[^/]+\/SKILL\.md$/);if(l?.[1])return l[1]}catch{}if(typeof n.installName=="string"&&n.installName){let r=n.installName.lastIndexOf("@");if(r>=0){let i=n.installName.slice(r+1);if(i.includes("/"))return i.replace(/^\/+/,"")}}return t}var st=class{constructor(){b(this,"id","well-known");b(this,"displayName","Well-Known Skills");b(this,"WELL_KNOWN_PATHS",[".well-known/agent-skills",".well-known/skills"]);b(this,"INDEX_FILE","index.json");}match(t){if(!t.startsWith("http://")&&!t.startsWith("https://"))return {matches:false};try{let e=new URL(t);return ["github.com","gitlab.com","huggingface.co"].includes(e.hostname)?{matches:!1}:{matches:!0,sourceIdentifier:`wellknown/${e.hostname}`}}catch{return {matches:false}}}async fetchIndex(t){return (await this.fetchIndexCandidates(t))[0]??null}async fetchIndexCandidates(t){try{let e=new URL(t),r=e.pathname.replace(/\/$/,""),i=[],s=r.match(/\/\.well-known\/(agent-skills|skills)\/?$/);if(s?.[1]){let l=`.well-known/${s[1]}`;i.push({indexUrl:`${e.protocol}//${e.host}${r}/${this.INDEX_FILE}`,baseUrl:`${e.protocol}//${e.host}${r.replace(/\/\.well-known\/(?:agent-skills|skills)$/,"")}`,wellKnownPath:l});}for(let l of this.WELL_KNOWN_PATHS)i.push({indexUrl:`${e.protocol}//${e.host}${r}/${l}/${this.INDEX_FILE}`,baseUrl:`${e.protocol}//${e.host}${r}`,wellKnownPath:l}),r&&r!==""&&i.push({indexUrl:`${e.protocol}//${e.host}/${l}/${this.INDEX_FILE}`,baseUrl:`${e.protocol}//${e.host}`,wellKnownPath:l});let o=[];for(let{indexUrl:l,baseUrl:a,wellKnownPath:c}of i)try{let u=await fetch(l);if(!u.ok)continue;let f=await u.json(),d=this.normalizeIndex(f,l,c);if(!d)continue;o.push({index:d.index,entries:d.entries,resolvedBaseUrl:a,resolvedWellKnownPath:c,indexUrl:l});}catch{}return o}catch{return []}}normalizeIndex(t,e,r){if(!t||typeof t!="object")return null;let i=t;if(!Array.isArray(i.skills))return null;let s=i.$schema;if(s===_t){let a=[],c=[];for(let u of i.skills){if(!this.isValidSkillEntryV2(u))continue;let f=new URL(u.url,e).toString();a.push({version:"0.2.0",name:u.name,description:u.description,type:u.type,artifactUrl:f,digest:u.digest,indexEntry:u}),c.push(u);}return a.length===0?null:{index:{$schema:_t,skills:c},entries:a}}if(typeof s=="string"&&_e.test(s)){let a=[],c=[];for(let u of i.skills){if(!this.isValidSkillEntryEasbotV1(u))continue;let f=new URL(u.sourceUrl,e).toString();a.push({version:"easbot-v1",name:u.name,description:u.description,skillMdUrl:f,installName:u.installName,indexEntry:u}),c.push(u);}return a.length===0?null:{index:{$schema:s,skills:c},entries:a}}if(s!==void 0)return null;let o=[],l=[];for(let a of i.skills){if(!this.isValidSkillEntryV1(a))return null;o.push(a),l.push({version:"0.1.0",name:a.name,description:a.description,files:a.files,baseUrl:this.getLegacySkillBaseUrl(e,r),wellKnownPath:r,indexEntry:a});}return {index:{skills:o},entries:l}}getLegacySkillBaseUrl(t,e){let r=new URL(t),i=`/${e}/${this.INDEX_FILE}`;return `${r.protocol}//${r.host}${r.pathname.slice(0,-i.length)}`}isValidSkillName(t){return !(typeof t!="string"||t.length===0||t.length>64||!/^[a-z0-9-]+$/.test(t)||t.startsWith("-")||t.endsWith("-")||t.includes("--"))}isSafeLegacyFilePath(t){return !(typeof t!="string"||t.length===0||t.startsWith("/")||t.startsWith("\\")||t.includes("..")||t.includes("\0"))}isValidSkillEntryEasbotV1(t){if(!t||typeof t!="object")return false;let e=t;if(!this.isValidSkillName(e.name)||typeof e.description!="string"||!e.description||e.description.length>1024||typeof e.sourceUrl!="string"||!e.sourceUrl)return false;try{new URL(e.sourceUrl,"https://easbot.cn/.well-known/agent-skills/index.json");}catch{return false}if(e.files!==void 0){if(!Array.isArray(e.files)||e.files.length===0)return false;let r=e.files[0];if(typeof r!="string"||r.toLowerCase()!=="skill.md")return false;for(let i of e.files)if(!this.isSafeLegacyFilePath(i))return false}return true}isValidSkillEntryV1(t){if(!t||typeof t!="object")return false;let e=t;if(!this.isValidSkillName(e.name)||typeof e.description!="string"||!e.description||!Array.isArray(e.files)||e.files.length===0)return false;for(let i of e.files)if(!this.isSafeLegacyFilePath(i))return false;return e.files.some(i=>typeof i=="string"&&i.toLowerCase()==="skill.md")}isValidSkillEntryV2(t){if(!t||typeof t!="object")return false;let e=t;if(!this.isValidSkillName(e.name)||typeof e.description!="string"||!e.description||e.description.length>1024||e.type!=="skill-md"&&e.type!=="archive"||typeof e.url!="string"||!e.url||typeof e.digest!="string"||!/^sha256:[a-f0-9]{64}$/.test(e.digest))return false;try{new URL(e.url,"https://example.com/.well-known/agent-skills/index.json");}catch{return false}return true}async fetchSkill(t){try{let e=new URL(t),r=await this.fetchIndexCandidates(t);for(let i of r){let{entries:s}=i,o=null,l=e.pathname.match(/\/.well-known\/(?:agent-skills|skills)\/([^/]+)\/?$/);if(l?.[1]&&l[1]!=="index.json"?o=l[1]:s.length===1&&(o=s[0].name),!o)continue;let a=s.find(u=>u.name===o);if(!a)continue;let c=await this.fetchSkillByEntry(a);if(c)return c}return null}catch{return null}}async fetchSkillByEntry(t,e,r){return typeof t=="string"?e?this.fetchLegacySkillByEntry({version:"0.1.0",name:e.name,description:e.description,files:e.files,baseUrl:t,wellKnownPath:r??this.WELL_KNOWN_PATHS[0],indexEntry:e}):null:t.version==="0.1.0"?this.fetchLegacySkillByEntry(t):t.version==="easbot-v1"?this.fetchEasbotV1SkillByEntry(t):this.fetchArtifactSkillByEntry(t)}async fetchEasbotV1SkillByEntry(t){try{let e=await fetch(t.skillMdUrl);if(!e.ok)return null;let r=await e.text(),{data:i}=a(r);if(typeof i.name!="string"||typeof i.description!="string")return null;let s=new Map;s.set("SKILL.md",r);let o=t.indexEntry;if(Array.isArray(o.files)&&o.files.length>0){let a=t.skillMdUrl.replace(/\/SKILL\.md$/i,""),u=o.files.filter(d=>d.toLowerCase()!=="skill.md").map(async d=>{try{let y=`${a}/${d}`,x=await fetch(y);if(x.ok){let g=await x.arrayBuffer();return {path:d,content:new Uint8Array(g)}}}catch{}return null}),f=await Promise.all(u);for(let d of f)d&&s.set(d.path,d.content);}let l=Oe(t.indexEntry,i.name);return this.createSkill({name:i.name,description:i.description,content:r,installName:l,sourceUrl:t.skillMdUrl,metadata:i.metadata,files:s,indexEntry:t.indexEntry})}catch{return null}}async fetchLegacySkillByEntry(t){try{let e=`${t.baseUrl.replace(/\/$/,"")}/${t.wellKnownPath}/${t.name}`,r=`${e}/SKILL.md`,i=await fetch(r);if(!i.ok)return null;let s=await i.text(),{data:o}=a(s);if(typeof o.name!="string"||typeof o.description!="string")return null;let l=new Map;l.set("SKILL.md",s);let c=t.files.filter(f=>f.toLowerCase()!=="skill.md").map(async f=>{try{let d=`${e}/${f}`,y=await fetch(d);if(y.ok){let x=await y.arrayBuffer();return {path:f,content:new Uint8Array(x)}}}catch{}return null}),u=await Promise.all(c);for(let f of u)f&&l.set(f.path,f.content);return this.createSkill({name:o.name,description:o.description,content:s,installName:t.name,sourceUrl:r,metadata:o.metadata,files:l,indexEntry:t.indexEntry})}catch{return null}}async fetchArtifactSkillByEntry(t){try{let e=await fetch(t.artifactUrl);if(!e.ok)return null;let r=e.headers.get("content-type")??"",i=new Uint8Array(await e.arrayBuffer());if(this.computeDigest(i)!==t.digest)return null;if(t.type==="skill-md"){let c=new TextDecoder().decode(i),{data:u}=a(c);if(typeof u.name!="string"||typeof u.description!="string")return null;let f=new Map;return f.set("SKILL.md",c),this.createSkill({name:u.name,description:u.description,content:c,installName:t.name,sourceUrl:t.artifactUrl,metadata:u.metadata,files:f,indexEntry:t.indexEntry})}let s=this.extractArchive(i,t.artifactUrl,r),o=s.get("SKILL.md");if(!o)return null;let l=typeof o=="string"?o:new TextDecoder().decode(o);s.set("SKILL.md",l);let{data:a$1}=a(l);return typeof a$1.name!="string"||typeof a$1.description!="string"?null:this.createSkill({name:a$1.name,description:a$1.description,content:l,installName:t.name,sourceUrl:t.artifactUrl,metadata:a$1.metadata,files:s,indexEntry:t.indexEntry})}catch{return null}}createSkill(t){return {name:b$1(t.name),description:b$1(t.description),content:t.content,installName:t.installName,sourceUrl:t.sourceUrl,metadata:t.metadata&&typeof t.metadata=="object"?t.metadata:void 0,files:t.files,indexEntry:t.indexEntry}}async fetchAllSkills(t){try{let e=await this.fetchIndexCandidates(t);for(let r of e){let i=r.entries.map(l=>this.fetchSkillByEntry(l)),o=(await Promise.all(i)).filter(l=>l!==null);if(o.length>0)return o}return []}catch{return []}}computeDigest(t){return `sha256:${createHash("sha256").update(t).digest("hex")}`}extractArchive(t,e,r){if(this.isZipArchive(t,e,r))return this.extractZip(t);if(this.isTarGzArchive(t,e,r))return this.extractTarGz(t);throw new Error("Unsupported archive format")}isZipArchive(t,e,r){return r.includes("application/zip")||e.toLowerCase().endsWith(".zip")||t[0]===80&&t[1]===75}isTarGzArchive(t,e,r){let i=e.toLowerCase();return r.includes("application/gzip")||r.includes("application/x-gzip")||i.endsWith(".tar.gz")||i.endsWith(".tgz")||t[0]===31&&t[1]===139}normalizeArchivePath(t){if(!t||t.includes("\0")||t.startsWith("/")||t.startsWith("\\")||/^[A-Za-z]:/.test(t)||t.includes("\\"))return null;let e=t.split("/").filter(Boolean);return e.length===0||e.some(r=>r==="."||r==="..")?null:e.join("/")}addArchiveFile(t,e,r,i){let s=this.normalizeArchivePath(e);if(!s)throw new Error(`Unsafe archive path: ${e}`);if(i.bytes+=r.byteLength,i.bytes>ze)throw new Error("Archive exceeds maximum unpacked size");if(t.size>=He)throw new Error("Archive contains too many files");t.set(s,r);}extractTarGz(t){let e=gunzipSync(Buffer.from(t)),r=new Map,i={bytes:0},s=0;for(;s+512<=e.length;){let o=e.subarray(s,s+512);if(o.every(x=>x===0))break;let l=this.readTarString(o,0,100),a=this.readTarString(o,124,12).trim(),c=o[156],u=this.readTarString(o,345,155),f=u?`${u}/${l}`:l,d=Number.parseInt(a||"0",8);if(!Number.isFinite(d)||d<0)throw new Error("Invalid tar entry size");if(s+=512,c===50||c===49)throw new Error("Archive links are not supported");if(c===0||c===48){let x=e.subarray(s,s+d);this.addArchiveFile(r,f,new Uint8Array(x),i);}s+=Math.ceil(d/512)*512;}if(!r.has("SKILL.md"))throw new Error("Archive missing root SKILL.md");return r}readTarString(t,e,r){let i=t.subarray(e,e+r),s=i.indexOf(0);return new TextDecoder().decode(s>=0?i.subarray(0,s):i)}extractZip(t){let e=Buffer.from(t),r=this.findZipEndOfCentralDirectory(e);if(r<0)throw new Error("Invalid zip archive");let i=e.readUInt16LE(r+10),s=e.readUInt32LE(r+16),o=new Map,l={bytes:0},a=s;for(let c=0;c<i;c++){if(e.readUInt32LE(a)!==33639248)throw new Error("Invalid zip directory");let u=e.readUInt16LE(a+8),f=e.readUInt16LE(a+10),d=e.readUInt32LE(a+20),y=e.readUInt32LE(a+24),x=e.readUInt16LE(a+28),g=e.readUInt16LE(a+30),p=e.readUInt16LE(a+32),w=e.readUInt32LE(a+38),S=e.readUInt32LE(a+42),k=a+46,E=e.subarray(k,k+x),b=new TextDecoder(u&2048?"utf-8":void 0).decode(E);if(a=k+x+g+p,b.endsWith("/"))continue;if(u&1)throw new Error("Encrypted zip entries are not supported");let _=w>>>16&61440;if(_===40960||_===4096)throw new Error("Archive links are not supported");if(e.readUInt32LE(S)!==67324752)throw new Error("Invalid zip local header");let z=e.readUInt16LE(S+26),he=e.readUInt16LE(S+28),yt=S+30+z+he,St=e.subarray(yt,yt+d),H;if(f===0)H=St;else if(f===8)H=inflateRawSync(St);else throw new Error(`Unsupported zip compression method: ${f}`);if(H.byteLength!==y)throw new Error("Zip entry size mismatch");this.addArchiveFile(o,b,new Uint8Array(H),l);}if(!o.has("SKILL.md"))throw new Error("Archive missing root SKILL.md");return o}findZipEndOfCentralDirectory(t){let e=Math.max(0,t.length-65535-22);for(let r=t.length-22;r>=e;r--)if(t.readUInt32LE(r)===101010256)return r;return -1}toRawUrl(t){try{let e=new URL(t);if(t.toLowerCase().endsWith("/skill.md"))return t;let r=this.WELL_KNOWN_PATHS[0],i=e.pathname.match(/\/.well-known\/(?:agent-skills|skills)\/([^/]+)\/?$/);if(i?.[1]){let o=e.pathname.replace(/\/.well-known\/(?:agent-skills|skills)\/.*$/,"");return `${e.protocol}//${e.host}${o}/${r}/${i[1]}/SKILL.md`}let s=e.pathname.replace(/\/$/,"");return `${e.protocol}//${e.host}${s}/${r}/${this.INDEX_FILE}`}catch{return t}}getSourceIdentifier(t){try{return new URL(t).hostname.replace(/^www\./,"")}catch{return "unknown"}}async hasSkillsIndex(t){return await this.fetchIndex(t)!==null}},zt=new st;function ot(n,t){let e=normalize(resolve(t)),r=normalize(resolve(n));return r.startsWith(e+sep)||r===e}function B(n){return n.startsWith("./")}async function jt(n){let t=new Map;try{let e=await readFile(join(n,".claude-plugin/marketplace.json"),"utf-8"),r=JSON.parse(e),i=r.metadata?.pluginRoot;if(i===void 0||B(i))for(let o of r.plugins??[]){if(!o.name||typeof o.source!="string"&&o.source!==void 0||o.source!==void 0&&!B(o.source))continue;let l=join(n,i??"",o.source??"");if(ot(l,n)&&o.skills&&o.skills.length>0)for(let a of o.skills){if(!B(a))continue;let c=join(l,a);ot(c,n)&&t.set(resolve(c),o.name);}}}catch{}try{let e=await readFile(join(n,".claude-plugin/plugin.json"),"utf-8"),r=JSON.parse(e);if(r.name&&r.skills&&r.skills.length>0)for(let i of r.skills){if(!B(i))continue;let s=join(n,i);ot(s,n)&&t.set(resolve(s),r.name);}}catch{}return t}var qe=["node_modules",".git","dist","build","__pycache__"];async function Xe(n){let t=join(n,".gitignore");try{let e=await readFile(t,"utf-8");return Glob.parseGitignoreContent(e)}catch{return []}}function lt(n){return n.toLowerCase().replace(/[\s_]+/g,"-")}function Je(n){return n.split(sep).join("/").replace(/\/+/g,"/")}function Ze(){let n=process.env.INSTALL_INTERNAL_SKILLS;return n==="1"||n==="true"}async function Zt(n){try{let t=join(n,"SKILL.md");return (await stat(t)).isFile()}catch{return false}}async function Bt(n,t){try{let e=await readFile(n,"utf-8"),{data:r}=a(e);if(!r.name||!r.description||typeof r.name!="string"||typeof r.description!="string")return null;let i=r.metadata&&typeof r.metadata=="object"&&!Array.isArray(r.metadata)?r.metadata:void 0;return i?.internal===!0&&!Ze()&&!t?.includeInternal?null:{name:b$1(r.name),description:b$1(r.description),path:dirname(n),rawContent:e,metadata:i}}catch{return null}}async function Yt(n,t=0,e=5){if(t>e)return [];try{let[r,i]=await Promise.all([Zt(n),readdir(n,{withFileTypes:!0}).catch(()=>[])]),s=r?[n]:[],o=await Promise.all(i.filter(l=>l.isDirectory()&&!qe.includes(l.name)).map(l=>Yt(join(n,l.name),t+1,e)));return [...s,...o.flat()]}catch{return []}}function Ye(n,t){let e=normalize(resolve(n)),r=normalize(resolve(join(n,t)));return r.startsWith(e+sep)||r===e}async function ut(n,t,e){let r=[],i=new Set,s=await X(n),o=new Set(Object.keys(s.skills).map(lt));if(t&&!Ye(n,t))throw new Error(`Invalid subpath: "${t}" resolves outside the repository directory. Subpath must not contain ".." segments that escape the base path.`);let l=t?join(n,t):n,a=await jt(l),c=k=>{let E=resolve(k.path);return a.has(E)&&(k.pluginName=a.get(E)),k},u=k(),f=k=>{if(o.size===0)return false;let E=Je(relative(n,k.path));if(!u.some(z=>E===z||E.startsWith(`${z}/`)))return false;let wt=lt(k.name),_=lt(basename(k.path));return o.has(wt)||o.has(_)},d=async k=>{if(!await Zt(k))return false;let E=await Bt(join(k,"SKILL.md"),e);return !E||i.has(E.name)||f(E)||(E=c(E),r.push(E),i.add(E.name)),true},y=t?t.replace(/^\/+|\/+$/g,"").split("/").filter(k=>k.length>0):[],x=y.length>0?`**/${y.join("/")}/**/SKILL.md`:"**/SKILL.md",g=await Glob.scan(x,{cwd:l,absolute:true,ignore:[...Glob.DEFAULT_IGNORE_PATTERNS,...await Xe(l)]}),p="/",w=l.split(sep).join(p);g.sort((k,E)=>k.split(p).length-E.split(p).length);let S=[];for(let k of g){if(S.some(b=>k.startsWith(`${b}${p}`)||k===b))continue;let E=dirname(k);if(await d(E)){let b=E.split(sep).join(p);if(b===w)continue;S.push(b);}}if(r.length===0||e?.fullDepth){let k=await Yt(l);for(let E of k){let b=await Bt(join(E,"SKILL.md"),e);b&&!i.has(b.name)&&!f(b)&&(b=c(b),r.push(b),i.add(b.name));}}return r}function Qe(n){return n.name||(n.path?basename(n.path):"")}function rr(n,t){let e=t.map(r=>r.toLowerCase());return n.filter(r=>{let i=r.name.toLowerCase(),s=Qe(r).toLowerCase();return e.some(o=>o===i||o===s)})}var Qt="*";function ir(n,t){if(!n||n.length===0)return [];let e=new Set(t),r=[];for(let i of n)if(i!==Qt){if(i.includes("/")||i.includes("**")){r.push(i);continue}te.test(i)?t.some(s=>Wildcard.match(s,i))||r.push(i):e.has(i)||r.push(i);}return r}function sr(n,t){let e={wildcard:false,matched:[],invalid:[]};if(!n||n.length===0)return e;let r=new Set(t),i=new Set;for(let s of n){if(s===Qt){e.wildcard=true;continue}if(s.includes("/")||s.includes("**")){e.invalid.push(s);continue}if(te.test(s))for(let o of t)Wildcard.match(o,s)&&i.add(o);else r.has(s)?i.add(s):e.invalid.push(s);}return e.matched=Array.from(i),e}var te=/[*?[{}]/;var dt="houjallen/agent-skills";async function xr(n){let t=n.defaultPlugin;if(!t||typeof t.marketId!="string"||t.marketId.length===0)return dt;let e=n.markets[t.marketId];if(!e)return dt;let r=e.localPath??e.url;if(!r)return dt;let i=r;return e.subpath&&(i=`${i}@${e.subpath}`),e.ref&&(i=`${i}#${e.ref}`),i}function nn(n){if(!n||typeof n!="object"||Array.isArray(n))return null;let t=n;if(typeof t.marketId!="string"||t.marketId.length===0)return null;let e={marketId:t.marketId};return typeof t.pluginId=="string"&&t.pluginId.length>0&&(e.pluginId=t.pluginId),e}function m(n){return Filesystem.normalize(n)}function ht(n){if(n==="general"||n==="coder"||n==="all")return n}function rn({scope:n}){let t=n==="project"?p():m$1(),e=Filesystem.join(t,n==="project"?".easbot":"easbot","skills");return Filesystem.normalize(e)}function M(){return Filesystem.join(m$1(),"skills","store")}function oe(){return Filesystem.join(M(),"index.json")}function J(n){let t=`${n.type}|${n.url}|${n.ref??""}`;return createHash("sha256").update(t).digest("hex")}function le(n){let t=J(n);return Filesystem.join(M(),t)}function C(){return Filesystem.join(o(),"skills","cache")}function sn(n,t,e){if(e&&e.length>0)return U(e);let r=on(n);if(r)return r;if(t?.includes("/")){let i=t.split("/")[0];if(i)return U(i)}return "default"}function on(n){let t=n.localPath??n.url;if(!t)return null;if(n.type==="well-known")try{let i=new URL(t),s=i.hostname.replace(/^www\./,"").replace(/\./g,"-"),o=i.pathname.replace(/^\/+/,"").split("/")[0]||"";return o&&!s.endsWith(`-${o}`)?U(`${s}-${o}`):U(s)}catch{return null}let e=t.match(/^(?:https?:\/\/[^/]+\/|git@[^:]+:)([^/]+)\/([^/]+?)(?:\.git)?\/?$/);if(e)return U(e[2]??"");let r=t.split(/[\\/]/).filter(Boolean).pop();return r?U(r.replace(/\.git$/,"")):null}function U(n){let t=n.trim().replace(/[:\\/\0]/g,"-").replace(/\.git$/,"").replace(/\s+/g,"-");return t.length>64&&(t=t.slice(0,64)),t.length>0?t:"default"}function Q(n){if(n.type==="well-known")return ln(n.url);let t=V(n);if(t)return Filesystem.join(C(),n.type,t);let e=createHash("sha256").update(n.url).digest("hex").slice(0,16);return Filesystem.join(C(),n.type,`unknown-${e}`)}function ln(n){let t,e;try{let r=new URL(n);t=r.hostname.replace(/^www\./,"");let i=r.pathname.match(/\/\.well-known\/(agent-skills|skills)/);i?.[1]?e=`.well-known/${i[1]}`:e=".well-known/agent-skills";}catch{let r=createHash("sha256").update(n).digest("hex").slice(0,16);return Filesystem.join(C(),"wellknown",`unknown-${r}`)}return Filesystem.join(C(),"wellknown",t,e)}async function ae(n){let t=n.skillNames??[],e=n.mode??"install";if(n.type==="local")return an(n,t,e);let{cacheDir:r,source:i,cloneError:s}=await cn(n,e);return {tempDir:r,cacheHit:false,source:i,cloneError:s}}var gt=class extends Error{constructor(e){super(`Local source path does not exist: ${e}`);b(this,"localPath",e);this.name="LocalPathNotFoundError";}};async function an(n,t,e="install"){let r=n.localPath??n.url;if(!existsSync(r))throw new gt(r);let i=le(n);return e!=="update"&&existsSync(i)&&await ce(i)?{tempDir:i,cacheHit:true,source:"local-cp",cloneError:null}:{tempDir:r,cacheHit:false,source:"local-cp",cloneError:null}}async function cn(n,t){let e=n.ref;if(!e){let l=V(n);if(l){let[a,c]=l.split("/");if(a&&c){let u=await Mt(a,c);u&&(e=u);}}}e||(e="HEAD");let r=Q(n);if(n.type==="well-known")return !existsSync(r)||t==="update"?(t==="update"&&existsSync(r)&&await rm(m(r),{recursive:true,force:true}).catch(()=>{}),await Filesystem.mkdir(m(r),{recursive:true}),await hn(n.url,r),{cacheDir:r,source:"well-known-fetch",cloneError:null}):{cacheDir:r,source:"cache-pull",cloneError:null};if(existsSync(r)){if(t==="update")try{let l=await git(["fetch","origin",e],{cwd:r});if(l.exitCode!==0){let c=await(typeof l.text=="function"?l.text():Promise.resolve(String(l.stderr||"")));throw new Error(`git fetch failed (exit=${l.exitCode}): ${c.slice(0,500)}`)}let a=await git(["reset","--hard",`origin/${e}`],{cwd:r});if(a.exitCode!==0){let c=await(typeof a.text=="function"?a.text():Promise.resolve(String(a.stderr||"")));throw new Error(`git reset --hard failed (exit=${a.exitCode}): ${c.slice(0,500)}`)}return {cacheDir:r,source:"cache-pull",cloneError:null}}catch(l){let a=l instanceof Error?l.message:String(l),c=new L(`Failed to fetch+reset ${n.url} (ref=${e}): ${a}`,n.url,false,false);return {cacheDir:r,source:"cache-pull",cloneError:c}}try{let l=await git(["checkout",e],{cwd:r});if(l.exitCode!==0){let a=await(typeof l.text=="function"?l.text():Promise.resolve(String(l.stderr||"")));throw new Error(`git checkout failed (exit=${l.exitCode}): ${a.slice(0,500)}`)}return {cacheDir:r,source:"cache-pull",cloneError:null}}catch(l){let a=l instanceof Error?l.message:String(l),c=new L(`Failed to checkout ${n.url} (ref=${e}): ${a}`,n.url,false,false);return {cacheDir:r,source:"cache-pull",cloneError:c}}}async function i(l,a,c){return Ct(l,a,c)}let s=null,o=null;try{return await Filesystem.mkdir(m(Filesystem.dirname(r)),{recursive:!0}),s=`${r}.clone-tmp`,await i(n.url,e,s),await rename(m(s),m(r)),{cacheDir:r,source:"cache-clone",cloneError:null}}catch(l){return l instanceof L?o=l:l instanceof Error&&(o=new L(`Failed to clone ${n.url}: ${l.message}`,n.url,false,false)),await Filesystem.mkdir(m(r),{recursive:true}).catch(()=>{}),{cacheDir:r,source:"cache-pull",cloneError:o}}finally{if(s)try{await rm(m(s),{recursive:!0,force:!0});}catch{}}}async function W(){let n=m(oe()),t;try{t=await Filesystem.readText(n);}catch{return {version:6,markets:{}}}let e;try{e=JSON.parse(t);}catch{try{await rename(m(n),`${m(n)}.corrupt-${Date.now()}`);}catch{}return {version:6,markets:{}}}let r=e;if(r.version!==6||!r.markets)return {version:6,markets:{}};let i={version:6,markets:r.markets};if("defaultPlugin"in r){let s=nn(r.defaultPlugin);s&&(i.defaultPlugin=s);}return i}async function tt(n){await Filesystem.writeJson(m(oe()),n);}async function Er(){let n=await W(),t={};for(let e of Object.values(n.markets))for(let r of Object.values(e.plugins))for(let[i,s]of Object.entries(r.skills))t[i]={marketId:e.id,pluginId:r.id,pluginName:r.name,storePath:e.storePath,pluginSlug:r.id.split(":").slice(1).join(":")||r.id,url:e.url,type:e.type,localPath:e.localPath,subpath:e.subpath,ref:e.ref,addedAt:e.addedAt,skillPath:s.skillPath,computedHash:s.computedHash,sourceKey:e.id,sourcePath:e.localPath??e.storePath};return t}async function br(n,t,e,r,i){let s=await W(),o=s.markets[n];o||(o={...i,id:n,addedAt:i.addedAt??new Date().toISOString(),plugins:{}},s.markets[n]=o);let l=o.plugins[t];l||(l={id:t,name:t.split(":").slice(1).join(":")||t,skills:{}},o.plugins[t]=l),l.skills[e]=r,await tt(s);}async function un(){let n=await W(),t=[];for(let e of Object.values(n.markets))for(let r of Object.values(e.plugins))for(let i of Object.values(r.skills))t.push({skillName:i.name,marketId:e.id,pluginId:r.id,entry:i});return t.sort((e,r)=>{let i=e.marketId.localeCompare(r.marketId);if(i!==0)return i;let s=e.pluginId.localeCompare(r.pluginId);return s!==0?s:e.skillName.localeCompare(r.skillName)}),t}async function fn(n){return (await un()).filter(e=>e.skillName===n)}async function Pr(n,t,e){let i=(await W()).markets[n];if(!i)return;let s=i.plugins[t];if(!s)return;let o=s.skills[e];if(o)return {skillName:o.name,marketId:n,pluginId:t,entry:o}}async function Lr(n,t,e){let r=await W(),i=r.markets[n];if(!i)return false;let s=i.plugins[t];return !s||!(e in s.skills)?false:(delete s.skills[e],await tt(r),true)}async function dn(n){let t=await fn(n);if(t.length===0)return [];let e=await W(),r=[];for(let i of t){let s=e.markets[i.marketId]?.plugins[i.pluginId];s&&n in s.skills&&(delete s.skills[n],r.push(i));}return r.length>0&&await tt(e),r}async function vr(n,t,e,r,i,s,o){await Z([{skillName:n,parsed:t,sourceKey:e,sourcePath:r,storePath:i,skillPath:s,...o&&{computedHash:o}}]);}async function Z(n){if(n.length===0)return;let t=await W(),e=new Date().toISOString();for(let s of n){let o=s.sourceKey,l=sn(s.parsed,s.skillPath,s.pluginName),a=`${o}:${l}`,c=t.markets[o];if(!c){let d=s.parsed.type==="local"?s.parsed.localPath??s.parsed.url:Q(s.parsed);c={id:o,type:s.parsed.type,url:s.parsed.url,localPath:s.parsed.localPath,subpath:s.parsed.subpath,ref:s.parsed.ref,storePath:s.storePath,cachePath:d,addedAt:e,plugins:{}},t.markets[o]=c;}let u=c.plugins[a];u||(u={id:a,name:l,sourcePath:s.parsed.subpath,skills:{}},c.plugins[a]=u);let f={name:s.skillName,description:s.description??"",skillPath:s.skillPath,computedHash:s.computedHash};s.scope&&(f.scope=s.scope),s.snapshotHash&&(f.snapshotHash=s.snapshotHash),u.skills[s.skillName]=f;}let r=new Set,i=new Map;for(let s of n)r.add(s.sourceKey),s.marketSnapshotHash&&i.set(s.sourceKey,s.marketSnapshotHash);for(let s of r){let o=t.markets[s];if(!o)continue;let l=i.get(s);if(l){o.snapshotHash=l;continue}let a=[];for(let c of Object.values(o.plugins))for(let u of Object.values(c.skills))a.push({name:u.name,snapshotHash:u.snapshotHash});o.snapshotHash=d(a);}await tt(t);}async function Ir(n){return (await dn(n)).length>0}async function hn(n,t){let e;try{e=await zt.fetchAllSkills(n);}catch{return}if(e.length!==0)for(let r of e)try{await pn(r,t);}catch{}}async function pn(n,t){let e=Filesystem.join(t,n.installName),r=Filesystem.normalize(e),i=Filesystem.normalize(t);if(!r.startsWith(`${i}/`)&&r!==i)throw new Error(`Unsafe skill dir: ${n.installName}`);await mkdir(m(e),{recursive:true});for(let[s,o]of n.files){let l=Filesystem.join(e,s),a=Filesystem.normalize(l);if(!a.startsWith(`${r}/`)&&a!==r||s.includes("\0"))continue;let c=dirname(m(l));c!==m(e)&&await mkdir(c,{recursive:true}),await writeFile(m(l),typeof o=="string"?o:Buffer.from(o));}}async function $r(n){return (await ae({type:"git",url:n.url,ref:n.ref})).tempDir}async function Rr(n,t={}){let e=le(n),r=false;if(existsSync(e)&&(r=await ce(e),!r))try{await rmdir(m(e));}catch{}if(r)if(t.mode==="update"){try{await rm(m(e),{recursive:!0,force:!0});}catch{}r=false;}else {let c=await ut(e,void 0,{includeInternal:t.includeInternal,fullDepth:t.fullDepth});if(c.length>0){let f=await Promise.all(c.map(async d=>{let y=pt(e,d.path);return {skillName:d.name,parsed:n,sourceKey:J(n),sourcePath:e,storePath:e,skillPath:y,description:d.description,scope:ht(d.metadata?.scope),...d.pluginName&&{pluginName:d.pluginName},computedHash:await b$2(d.path)}}));await Z(f);}let u=n.type==="local"?"local-cp":"cache-pull";return {storeDir:e,cacheHit:true,source:u,skills:c,blobSkills:[],cloneError:null}}let i=[];if(n.type==="github"&&!t.fullDepth){let c$1=V(n),u=c$1?.split("/")[0]?.toLowerCase(),f=!!c$1&&Object.hasOwn(c,c$1.toLowerCase());if(c$1&&u&&(f||d$1.includes(u))){let d=await l(c$1,{subpath:n.subpath,ref:n.ref,includeInternal:t.includeInternal});if(d&&d.skills.length>0){await ee(d.skills,e);let y=Q(n);await ee(d.skills,y);let x=d.skills.map(p=>({...p,path:Filesystem.join(e,p.repoSubpath??"",p.name)})),g=await Promise.all(x.map(async(p,w)=>{let S=d.skills[w],k=`${S.repoSubpath??""}${S.repoSubpath?"/":""}${S.name}`;return {skillName:p.name,parsed:n,sourceKey:J(n),sourcePath:e,storePath:e,skillPath:k,description:p.description,scope:ht(p.metadata?.scope),...p.pluginName&&{pluginName:p.pluginName},computedHash:await b$2(Filesystem.dirname(p.path)),snapshotHash:S.snapshotHash,marketSnapshotHash:d.snapshotHash}}));return await Z(g),i=d.skills,{storeDir:e,cacheHit:false,source:"blob-fetch",skills:x,blobSkills:i,cloneError:null}}}}let s=await ae({...n,mode:t.mode??"install"});await Filesystem.mkdir(m(e),{recursive:true}).catch(()=>{});let o=await ut(s.tempDir,void 0,{includeInternal:t.includeInternal,fullDepth:t.fullDepth}),l$1=[],a=Filesystem.normalize(e).replace(/\\/g,"/");for(let c of o){let u=pt(s.tempDir,c.path),f=Filesystem.join(e,u),d=`${pt(s.tempDir,c.path)}/SKILL.md`,y=Filesystem.normalize(f).replace(/\\/g,"/"),x="/",g=a.endsWith(x)?a:a+x;if(!y.startsWith(g)&&y!==a)throw new Error(`[INVARIANT 0048-yyy] cp target escapes storeRoot: target=${y} storeRoot=${a}
|
|
20
|
+
source skill path=${c.path} (parsed.type=${n.type})
|
|
21
|
+
\u4E1A\u52A1\u4EFB\u4F55\u65F6\u5019\u4E0D\u80FD\u64CD\u4F5C\u7528\u6237\u7684 local \u76EE\u5F55\u6216\u6587\u4EF6\u3002`);let p;try{await Filesystem.mkdir(m(Filesystem.dirname(f)),{recursive:!0}),await cp(m(c.path),m(f),{recursive:!0}),p=await b$2(f);}catch{}c.path=f,l$1.push({skill:c,skillRel:u,sourceSkillPath:d,targetPath:f,computedHash:p});}if(l$1.length>0){let c=l$1.filter(u=>u.computedHash).map(u=>({skillName:u.skill.name,parsed:n,sourceKey:J(n),sourcePath:s.tempDir,storePath:e,skillPath:u.skillRel,description:u.skill.description,scope:ht(u.skill.metadata?.scope),...u.skill.pluginName&&{pluginName:u.skill.pluginName},computedHash:u.computedHash}));await Z(c);}return {storeDir:e,cacheHit:s.cacheHit,source:s.source,skills:o,blobSkills:[],cloneError:s.cloneError??null}}async function ee(n,t){let e=Filesystem.normalize(t);for(let r of n){let i=Filesystem.join(t,r.repoSubpath??"",r.name),s=Filesystem.normalize(i);if(!(!s.startsWith(`${e}/`)&&s!==e))try{await mkdir(m(i),{recursive:!0});for(let o of r.files){let l=Filesystem.join(i,o.path),a=Filesystem.normalize(l);if(!a.startsWith(`${s}/`)&&a!==s||o.path.includes("\0"))continue;let c=dirname(m(l));c!==m(i)&&await mkdir(c,{recursive:!0}),await writeFile(m(l),o.contents,"utf-8");}}catch{}}}function pt(n,t){let r=Filesystem.normalize(n).replace(/\\/g,"/"),i=Filesystem.normalize(t).replace(/\\/g,"/"),s=r.toLowerCase();return i.toLowerCase().startsWith(`${s}/`)?i.slice(s.length+1):""}async function ce(n){try{return (await readdir(m(n))).length>0}catch{return false}}function Ar(n){try{let t=Filesystem.normalize(n);for(let e of [C(),M()]){let r=Filesystem.normalize(e);if(t===r||t.startsWith(`${r}/`))return !0}return !1}catch{return false}}async function Wr({cachePath:n,skillName:t,scope:e}){let r=Filesystem.join(rn({scope:e}),t);return existsSync(r)&&await rm(m(r),{recursive:true,force:true}),await cp(m(n),m(r),{recursive:true}),r}async function Kr(n){let t=Q(n);existsSync(t)&&await rm(m(t),{recursive:true,force:true});}async function Nr(){let n=C();existsSync(n)&&await rm(m(n),{recursive:true,force:true});}var wn="skills-lock.json",ue=4;function fe(n){return join(n||process.cwd(),wn)}function zr(n,t){return n?$t(n,M(),t):null}async function X(n){let t=fe(n);try{let e=await readFile(t,"utf-8"),r=JSON.parse(e);return typeof r.version!="number"||!r.skills||r.version<ue?kt():r}catch{return kt()}}async function de(n,t){let e=fe(t),r={};for(let o of Object.keys(n.skills).sort())r[o]=n.skills[o];let i={version:n.version,skills:r},s=JSON.stringify(i,null,2)+`
|
|
22
|
+
`;await writeFile(e,s,"utf-8");}async function Hr(n,t,e){let r=await X(e),i=new Date().toISOString(),s=r.skills[n];r.skills[n]={...t,installedAt:s?.installedAt??i,updatedAt:i},await de(r,e);}async function Or(n,t){let e=await X(t);return n in e.skills?(delete e.skills[n],await de(e,t),true):false}function kt(){return {version:ue,skills:{}}}export{vr as $,ut as A,Qe as B,rr as C,ir as D,sr as E,dt as F,xr as G,nn as H,rn as I,M as J,oe as K,J as L,le as M,C as N,sn as O,Q as P,ae as Q,gt as R,W as S,tt as T,Er as U,br as V,un as W,fn as X,Pr as Y,Lr as Z,dn as _,V as a,Z as aa,Nn as b,Ir as ba,Un as c,$r as ca,j as d,Rr as da,Tt as e,pt as ea,Wt as f,ce as fa,L as g,Ar as ga,Le as h,Wr as ha,ve as i,Kr as ia,Dt as j,Nr as ja,Ct as k,$n as l,st as m,zt as n,N as o,$t as p,ue as q,fe as r,zr as s,X as t,de as u,Hr as v,Or as w,Ze as x,Bt as y,Ye as z};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import {l as l$1,k as k$1}from'./chunk-RWZ4LFSN.mjs';import {existsSync,readdirSync,readFileSync}from'fs';import {join,resolve}from'path';import {homedir}from'os';import {xdgConfig}from'xdg-basedir';import {Wildcard}from'@easbot/utils';function l(){return k$1()}function d(){return xdgConfig??join(k$1(),".config")}function p(){return process.env.CODEX_HOME?.trim()||join(l(),".codex")}function y(){return process.env.CLAUDE_CONFIG_DIR?.trim()||join(l(),".claude")}function D(){return process.env.VIBE_HOME?.trim()||join(l(),".vibe")}function b(){return process.env.HERMES_HOME?.trim()||join(l(),".hermes")}function f(){return process.env.AUTOHAND_HOME?.trim()||join(l(),".autohand")}function S(){return process.env.APPDATA?.trim()}function I(){return process.env.FLATPAK_XDG_CONFIG_HOME?.trim()}function G(t,n){try{let i=JSON.parse(readFileSync(t,"utf-8"));return !!(i.dependencies?.[n]||i.devDependencies?.[n])}catch{return false}}function E(t=l(),n=existsSync){return n(join(t,".openclaw"))?join(t,".openclaw/skills"):n(join(t,".clawdbot"))?join(t,".clawdbot/skills"):n(join(t,".moltbot"))?join(t,".moltbot/skills"):join(t,".openclaw/skills")}var a={easbot:{name:"easbot",displayName:"EASBot",skillsDir:".easbot/skills",get globalSkillsDir(){return join(l$1(),"easbot","skills")},detectInstalled:async()=>true},"aider-desk":{name:"aider-desk",displayName:"AiderDesk",skillsDir:".aider-desk/skills",get globalSkillsDir(){return join(l(),".aider-desk/skills")},detectInstalled:async()=>existsSync(join(l(),".aider-desk"))},amp:{name:"amp",displayName:"Amp",skillsDir:".agents/skills",get globalSkillsDir(){return join(d(),"agents/skills")},detectInstalled:async()=>existsSync(join(d(),"amp"))},antigravity:{name:"antigravity",displayName:"Antigravity",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".gemini/antigravity/skills")},detectInstalled:async()=>existsSync(join(l(),".gemini/antigravity"))},"antigravity-cli":{name:"antigravity-cli",displayName:"Antigravity CLI",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".gemini/antigravity-cli/skills")},detectInstalled:async()=>existsSync(join(l(),".gemini/antigravity-cli"))},astrbot:{name:"astrbot",displayName:"AstrBot",skillsDir:"data/skills",get globalSkillsDir(){return join(l(),".astrbot/data/skills")},detectInstalled:async()=>existsSync(join(process.cwd(),"data/skills"))||existsSync(join(l(),".astrbot"))},"autohand-code":{name:"autohand-code",displayName:"Autohand Code CLI",skillsDir:".autohand/skills",get globalSkillsDir(){return join(f(),"skills")},detectInstalled:async()=>existsSync(f())},augment:{name:"augment",displayName:"Augment",skillsDir:".augment/skills",get globalSkillsDir(){return join(l(),".augment/skills")},detectInstalled:async()=>existsSync(join(l(),".augment"))},bob:{name:"bob",displayName:"IBM Bob",skillsDir:".bob/skills",get globalSkillsDir(){return join(l(),".bob/skills")},detectInstalled:async()=>existsSync(join(l(),".bob"))},"claude-code":{name:"claude-code",displayName:"Claude Code",skillsDir:".claude/skills",get globalSkillsDir(){return join(y(),"skills")},detectInstalled:async()=>existsSync(y())},openclaw:{name:"openclaw",displayName:"OpenClaw",skillsDir:".openclaw/skills",get globalSkillsDir(){return E()},detectInstalled:async()=>existsSync(join(l(),".openclaw"))||existsSync(join(l(),".clawdbot"))||existsSync(join(l(),".moltbot"))},cline:{name:"cline",displayName:"Cline",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents","skills")},detectInstalled:async()=>existsSync(join(l(),".cline"))},"codearts-agent":{name:"codearts-agent",displayName:"CodeArts Agent",skillsDir:".codeartsdoer/skills",get globalSkillsDir(){return join(l(),".codeartsdoer/skills")},detectInstalled:async()=>existsSync(join(l(),".codeartsdoer"))},codebuddy:{name:"codebuddy",displayName:"CodeBuddy",skillsDir:".codebuddy/skills",get globalSkillsDir(){return join(l(),".codebuddy/skills")},detectInstalled:async()=>existsSync(join(process.cwd(),".codebuddy"))||existsSync(join(l(),".codebuddy"))},codemaker:{name:"codemaker",displayName:"Codemaker",skillsDir:".codemaker/skills",get globalSkillsDir(){return join(l(),".codemaker/skills")},detectInstalled:async()=>existsSync(join(l(),".codemaker"))},codestudio:{name:"codestudio",displayName:"Code Studio",skillsDir:".codestudio/skills",get globalSkillsDir(){return join(l(),".codestudio/skills")},detectInstalled:async()=>existsSync(join(l(),".codestudio"))},codex:{name:"codex",displayName:"Codex",skillsDir:".agents/skills",get globalSkillsDir(){return join(p(),"skills")},detectInstalled:async()=>existsSync(p())||existsSync("/etc/codex")},"command-code":{name:"command-code",displayName:"Command Code",skillsDir:".commandcode/skills",get globalSkillsDir(){return join(l(),".commandcode/skills")},detectInstalled:async()=>existsSync(join(l(),".commandcode"))},continue:{name:"continue",displayName:"Continue",skillsDir:".continue/skills",get globalSkillsDir(){return join(l(),".continue/skills")},detectInstalled:async()=>existsSync(join(process.cwd(),".continue"))||existsSync(join(l(),".continue"))},cortex:{name:"cortex",displayName:"Cortex Code",skillsDir:".cortex/skills",get globalSkillsDir(){return join(l(),".snowflake/cortex/skills")},detectInstalled:async()=>existsSync(join(l(),".snowflake/cortex"))},crush:{name:"crush",displayName:"Crush",skillsDir:".crush/skills",get globalSkillsDir(){return join(l(),".config/crush/skills")},detectInstalled:async()=>existsSync(join(l(),".config/crush"))},cursor:{name:"cursor",displayName:"Cursor",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".cursor/skills")},detectInstalled:async()=>existsSync(join(l(),".cursor"))},deepagents:{name:"deepagents",displayName:"Deep Agents",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".deepagents/agent/skills")},detectInstalled:async()=>existsSync(join(l(),".deepagents"))},devin:{name:"devin",displayName:"Devin for Terminal",skillsDir:".devin/skills",get globalSkillsDir(){return join(d(),"devin/skills")},detectInstalled:async()=>existsSync(join(d(),"devin"))},dexto:{name:"dexto",displayName:"Dexto",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents/skills")},detectInstalled:async()=>existsSync(join(l(),".dexto"))},droid:{name:"droid",displayName:"Droid",skillsDir:".factory/skills",get globalSkillsDir(){return join(l(),".factory/skills")},detectInstalled:async()=>existsSync(join(l(),".factory"))},eve:{name:"eve",displayName:"Eve",skillsDir:"agent/skills",globalSkillsDir:void 0,detectInstalled:async()=>{let t=process.cwd();return existsSync(join(t,"agent"))&&G(join(t,"package.json"),"eve")}},firebender:{name:"firebender",displayName:"Firebender",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".firebender/skills")},detectInstalled:async()=>existsSync(join(l(),".firebender"))},forgecode:{name:"forgecode",displayName:"ForgeCode",skillsDir:".forge/skills",get globalSkillsDir(){return join(l(),".forge/skills")},detectInstalled:async()=>existsSync(join(l(),".forge"))},"gemini-cli":{name:"gemini-cli",displayName:"Gemini CLI",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".gemini/skills")},detectInstalled:async()=>existsSync(join(l(),".gemini"))},"github-copilot":{name:"github-copilot",displayName:"GitHub Copilot",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".copilot/skills")},detectInstalled:async()=>existsSync(join(l(),".copilot"))},goose:{name:"goose",displayName:"Goose",skillsDir:".goose/skills",get globalSkillsDir(){return join(d(),"goose/skills")},detectInstalled:async()=>existsSync(join(d(),"goose"))},"hermes-agent":{name:"hermes-agent",displayName:"Hermes Agent",skillsDir:".hermes/skills",get globalSkillsDir(){return join(b(),"skills")},detectInstalled:async()=>existsSync(b())},"inference-sh":{name:"inference-sh",displayName:"inference.sh",skillsDir:".inferencesh/skills",get globalSkillsDir(){return join(l(),".inferencesh/skills")},detectInstalled:async()=>existsSync(join(l(),".inferencesh"))},jazz:{name:"jazz",displayName:"Jazz",skillsDir:".jazz/skills",get globalSkillsDir(){return join(l(),".jazz/skills")},detectInstalled:async()=>existsSync(join(l(),".jazz"))||existsSync(join(process.cwd(),".jazz"))},junie:{name:"junie",displayName:"Junie",skillsDir:".junie/skills",get globalSkillsDir(){return join(l(),".junie/skills")},detectInstalled:async()=>existsSync(join(l(),".junie"))},"iflow-cli":{name:"iflow-cli",displayName:"iFlow CLI",skillsDir:".iflow/skills",get globalSkillsDir(){return join(l(),".iflow/skills")},detectInstalled:async()=>existsSync(join(l(),".iflow"))},kilo:{name:"kilo",displayName:"Kilo Code",skillsDir:".kilocode/skills",get globalSkillsDir(){return join(l(),".kilocode/skills")},detectInstalled:async()=>existsSync(join(l(),".kilocode"))},"kimi-code-cli":{name:"kimi-code-cli",displayName:"Kimi Code CLI",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents/skills")},detectInstalled:async()=>existsSync(join(l(),".kimi-code"))||existsSync(join(l(),".kimi"))},"kiro-cli":{name:"kiro-cli",displayName:"Kiro CLI",skillsDir:".kiro/skills",get globalSkillsDir(){return join(l(),".kiro/skills")},detectInstalled:async()=>existsSync(join(l(),".kiro"))},kode:{name:"kode",displayName:"Kode",skillsDir:".kode/skills",get globalSkillsDir(){return join(l(),".kode/skills")},detectInstalled:async()=>existsSync(join(l(),".kode"))},lingma:{name:"lingma",displayName:"Lingma",skillsDir:".lingma/skills",get globalSkillsDir(){return join(l(),".lingma/skills")},detectInstalled:async()=>existsSync(join(l(),".lingma"))},loaf:{name:"loaf",displayName:"Loaf",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents/skills")},detectInstalled:async()=>existsSync(join(l(),".loaf"))},mcpjam:{name:"mcpjam",displayName:"MCPJam",skillsDir:".mcpjam/skills",get globalSkillsDir(){return join(l(),".mcpjam/skills")},detectInstalled:async()=>existsSync(join(l(),".mcpjam"))},"mistral-vibe":{name:"mistral-vibe",displayName:"Mistral Vibe",skillsDir:".vibe/skills",get globalSkillsDir(){return join(D(),"skills")},detectInstalled:async()=>existsSync(D())},moxby:{name:"moxby",displayName:"Moxby",skillsDir:".moxby/skills",get globalSkillsDir(){return join(l(),".moxby/skills")},detectInstalled:async()=>existsSync(join(l(),".moxby"))},mux:{name:"mux",displayName:"Mux",skillsDir:".mux/skills",get globalSkillsDir(){return join(l(),".mux/skills")},detectInstalled:async()=>existsSync(join(l(),".mux"))},opencode:{name:"opencode",displayName:"OpenCode",skillsDir:".agents/skills",get globalSkillsDir(){return join(d(),"opencode/skills")},detectInstalled:async()=>existsSync(join(d(),"opencode"))},openhands:{name:"openhands",displayName:"OpenHands",skillsDir:".openhands/skills",get globalSkillsDir(){return join(l(),".openhands/skills")},detectInstalled:async()=>existsSync(join(l(),".openhands"))},ona:{name:"ona",displayName:"Ona",skillsDir:".ona/skills",get globalSkillsDir(){return join(l(),".ona/skills")},detectInstalled:async()=>existsSync(join(l(),".ona"))},pi:{name:"pi",displayName:"Pi",skillsDir:".pi/skills",get globalSkillsDir(){return join(l(),".pi/agent/skills")},detectInstalled:async()=>existsSync(join(l(),".pi/agent"))},qoder:{name:"qoder",displayName:"Qoder",skillsDir:".qoder/skills",get globalSkillsDir(){return join(l(),".qoder/skills")},detectInstalled:async()=>existsSync(join(l(),".qoder"))},"qoder-cn":{name:"qoder-cn",displayName:"Qoder CN",skillsDir:".qoder/skills",get globalSkillsDir(){return join(l(),".qoder-cn/skills")},detectInstalled:async()=>existsSync(join(l(),".qoder-cn"))},"qwen-code":{name:"qwen-code",displayName:"Qwen Code",skillsDir:".qwen/skills",get globalSkillsDir(){return join(l(),".qwen/skills")},detectInstalled:async()=>existsSync(join(l(),".qwen"))},replit:{name:"replit",displayName:"Replit",skillsDir:".agents/skills",get globalSkillsDir(){return join(d(),"agents/skills")},detectInstalled:async()=>existsSync(join(process.cwd(),".replit"))},reasonix:{name:"reasonix",displayName:"Reasonix",skillsDir:".reasonix/skills",get globalSkillsDir(){return join(l(),".reasonix/skills")},detectInstalled:async()=>existsSync(join(l(),".reasonix"))},rovodev:{name:"rovodev",displayName:"Rovo Dev",skillsDir:".rovodev/skills",get globalSkillsDir(){return join(l(),".rovodev/skills")},detectInstalled:async()=>existsSync(join(l(),".rovodev"))},roo:{name:"roo",displayName:"Roo Code",skillsDir:".roo/skills",get globalSkillsDir(){return join(l(),".roo/skills")},detectInstalled:async()=>existsSync(join(l(),".roo"))},"tabnine-cli":{name:"tabnine-cli",displayName:"Tabnine CLI",skillsDir:".tabnine/agent/skills",get globalSkillsDir(){return join(l(),".tabnine/agent/skills")},detectInstalled:async()=>existsSync(join(l(),".tabnine"))},terramind:{name:"terramind",displayName:"Terramind",skillsDir:".terramind/skills",get globalSkillsDir(){return join(l(),".terramind/skills")},detectInstalled:async()=>existsSync(join(l(),".terramind"))},tinycloud:{name:"tinycloud",displayName:"Tinycloud",skillsDir:".tinycloud/skills",get globalSkillsDir(){return join(l(),".tinycloud/skills")},detectInstalled:async()=>existsSync(join(l(),".tinycloud"))},trae:{name:"trae",displayName:"Trae",skillsDir:".trae/skills",get globalSkillsDir(){return join(l(),".trae/skills")},detectInstalled:async()=>existsSync(join(l(),".trae"))},"trae-cn":{name:"trae-cn",displayName:"Trae CN",skillsDir:".trae/skills",get globalSkillsDir(){return join(l(),".trae-cn/skills")},detectInstalled:async()=>existsSync(join(l(),".trae-cn"))},warp:{name:"warp",displayName:"Warp",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents/skills")},detectInstalled:async()=>existsSync(join(l(),".warp"))},windsurf:{name:"windsurf",displayName:"Windsurf",skillsDir:".windsurf/skills",get globalSkillsDir(){return join(l(),".codeium/windsurf/skills")},detectInstalled:async()=>existsSync(join(l(),".codeium/windsurf"))},zed:{name:"zed",displayName:"Zed",skillsDir:".agents/skills",get globalSkillsDir(){return join(l(),".agents/skills")},detectInstalled:async()=>existsSync(join(d(),"zed"))||!!S()&&existsSync(join(S(),"Zed"))||!!I()&&existsSync(join(I(),"zed"))},zencoder:{name:"zencoder",displayName:"Zencoder",skillsDir:".zencoder/skills",get globalSkillsDir(){return join(l(),".zencoder/skills")},detectInstalled:async()=>existsSync(join(l(),".zencoder"))},zenflow:{name:"zenflow",displayName:"Zenflow",skillsDir:".zencoder/skills",get globalSkillsDir(){return join(l(),".zencoder/skills")},detectInstalled:async()=>existsSync(join(l(),".zencoder"))},neovate:{name:"neovate",displayName:"Neovate",skillsDir:".neovate/skills",get globalSkillsDir(){return join(l(),".neovate/skills")},detectInstalled:async()=>existsSync(join(l(),".neovate"))},pochi:{name:"pochi",displayName:"Pochi",skillsDir:".pochi/skills",get globalSkillsDir(){return join(l(),".pochi/skills")},detectInstalled:async()=>existsSync(join(l(),".pochi"))},promptscript:{name:"promptscript",displayName:"PromptScript",skillsDir:".agents/skills",globalSkillsDir:void 0,detectInstalled:async()=>existsSync(join(process.cwd(),".promptscript"))||existsSync(join(process.cwd(),"promptscript.yaml"))},adal:{name:"adal",displayName:"AdaL",skillsDir:".adal/skills",get globalSkillsDir(){return join(l(),".adal/skills")},detectInstalled:async()=>existsSync(join(l(),".adal"))},universal:{name:"universal",displayName:"Universal",skillsDir:".agents/skills",get globalSkillsDir(){return join(d(),"agents/skills")},detectInstalled:async()=>false}};async function V(){return (await Promise.all(Object.entries(a).map(async([n,i])=>({type:n,installed:await i.detectInstalled()})))).filter(n=>n.installed).map(n=>n.type)}function X(t){return a[t]}var v=join("agent","subagents");function R(t=process.cwd()){let n=join(t,v);if(!existsSync(n))return [];try{return readdirSync(n,{withFileTypes:!0}).filter(i=>i.isDirectory()).map(i=>i.name).sort()}catch{return []}}function w(t,n){let i=a[t];if(n==="project")return i.skillsDir===".agents/skills";if(i.globalSkillsDir===void 0)return false;let r=resolve(k$1()||homedir(),".agents","skills");return resolve(i.globalSkillsDir)===r}function _(t){return Object.entries(a).filter(([n])=>w(n,t)).map(([n])=>n)}function Y(t){let n=new Set(_(t));return Object.keys(a).filter(i=>!n.has(i))}var x=/^\.[^/]+\/skills$/;function C(){let t=new Set;for(let n of Object.values(a))n.skillsDir&&x.test(n.skillsDir)&&t.add(n.skillsDir);return Array.from(t).sort()}function q(){let t=new Set;for(let n of Object.values(a))n.globalSkillsDir!==void 0&&t.add(n.globalSkillsDir);return Array.from(t).sort()}function ee(){let t=C(),n=q(),i=Array.from(new Set([...t,...n])).sort();return {project:t,global:n,all:i}}function le(){return C().map(t=>`${t}/`)}function se(t,n){let i=a[t];return n==="global"?w(t,"global"):i.skillsDir===".agents/skills"}var h="*";function te(t){if(!t||t.length===0)return [];let n=Object.keys(a),i=[];for(let r of t)if(r!==h){if(r.includes("/")||r.includes("**")){i.push(r);continue}j.test(r)?n.some(o=>Wildcard.match(o,r))||i.push(r):n.includes(r)||i.push(r);}return i}function ne(t){if(!t||t.length===0)return [];let n=Object.keys(a);if(t.includes(h))return [...n];if(t.some(i=>j.test(i))){let i=new Set;for(let r of t)if(!(r.includes("/")||r.includes("**")))for(let o of n)Wildcard.match(o,r)&&i.add(o);return Array.from(i)}return Array.from(new Set(t.filter(i=>!i.includes("/")&&!i.includes("**"))))}var j=/[*?[{}]/;function F(t={}){let n=t.cwd??process.cwd(),i=t.agentFilter??Object.keys(a),r=new Set;for(let o of i){let c=a[o];if(!c||!c.skillsDir||!x.test(c.skillsDir))continue;let T=c.skillsDir===".agents/skills"?join(n,".agents","skills"):join(n,c.skillsDir);if(o==="eve")for(let z of R(n)){let O=join(n,v,z,"skills");r.add(k(`${O}/**/SKILL.md`));}r.add(k(`${T}/**/SKILL.md`));}return Array.from(r).sort()}function M(t={}){let n=t.agentFilter??Object.keys(a),i=new Set;for(let r of n){let o=a[r];o&&o.globalSkillsDir!==void 0&&i.add(k(`${o.globalSkillsDir}/**/SKILL.md`));}return Array.from(i).sort()}function ie(t={}){let n=F(t),i=M(t),r=Array.from(new Set([...n,...i])).sort();return {project:n,global:i,all:r}}function k(t){return t.replace(/\\/g,"/")}function re(){let t=new Set;for(let i of Object.values(a)){if(i.globalSkillsDir===void 0)continue;let r=k(i.globalSkillsDir);r!==""&&t.add(r);}let n=k(join(k$1()||homedir(),".agents","skills"));return t.add(n),Array.from(t).sort()}export{E as a,a as b,V as c,X as d,v as e,R as f,w as g,_ as h,Y as i,x as j,C as k,q as l,ee as m,le as n,se as o,te as p,ne as q,ie as r,re as s};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkS5OLAC7X_cjs=require('./chunk-S5OLAC7X.cjs');require('./chunk-Q2MOP5ZW.cjs'),require('./chunk-BWDTT6SA.cjs'),require('./chunk-LJ63Q26N.cjs'),require('./chunk-IJI72D6W.cjs'),require('./chunk-HOK3SUH4.cjs'),require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-DNE3XPCJ.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"handleSkillsCli",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.M}});Object.defineProperty(exports,"renderBanner",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.K}});Object.defineProperty(exports,"renderHelp",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.L}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{M as handleSkillsCli,K as renderBanner,L as renderHelp}from'./chunk-HI5IN4UL.mjs';import'./chunk-CFMOYU7R.mjs';import'./chunk-5DAHAO55.mjs';import'./chunk-BQ6QWQEM.mjs';import'./chunk-6OLPTZDO.mjs';import'./chunk-UUZB3HCD.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZJS7IO5V.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkIJI72D6W_cjs=require('./chunk-IJI72D6W.cjs');require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"copySkillDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.j}});Object.defineProperty(exports,"ensureCanonicalFromFiles",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.n}});Object.defineProperty(exports,"getAgentBaseDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.g}});Object.defineProperty(exports,"getCanonicalPath",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.o}});Object.defineProperty(exports,"getCanonicalSkillsDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.e}});Object.defineProperty(exports,"getEveSubagentSkillsDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.f}});Object.defineProperty(exports,"getInstallPath",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.m}});Object.defineProperty(exports,"getInstallStatus",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.l}});Object.defineProperty(exports,"installBlobSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.r}});Object.defineProperty(exports,"installRemoteSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.p}});Object.defineProperty(exports,"installSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.h}});Object.defineProperty(exports,"installWellKnownSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.q}});Object.defineProperty(exports,"isSkillInstalled",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.k}});Object.defineProperty(exports,"linkSkillDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.i}});Object.defineProperty(exports,"listInstalledSkills",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.s}});Object.defineProperty(exports,"sanitizeName",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.d}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as copySkillDir,n as ensureCanonicalFromFiles,g as getAgentBaseDir,o as getCanonicalPath,e as getCanonicalSkillsDir,f as getEveSubagentSkillsDir,m as getInstallPath,l as getInstallStatus,r as installBlobSkillForAgent,p as installRemoteSkillForAgent,h as installSkillForAgent,q as installWellKnownSkillForAgent,k as isSkillInstalled,i as linkSkillDir,s as listInstalledSkills,d as sanitizeName}from'./chunk-
|
|
1
|
+
export{j as copySkillDir,n as ensureCanonicalFromFiles,g as getAgentBaseDir,o as getCanonicalPath,e as getCanonicalSkillsDir,f as getEveSubagentSkillsDir,m as getInstallPath,l as getInstallStatus,r as installBlobSkillForAgent,p as installRemoteSkillForAgent,h as installSkillForAgent,q as installWellKnownSkillForAgent,k as isSkillInstalled,i as linkSkillDir,s as listInstalledSkills,d as sanitizeName}from'./chunk-6OLPTZDO.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkXGUPIAAF_cjs=require('./chunk-XGUPIAAF.cjs');require('./chunk-
|
|
1
|
+
'use strict';var chunkXGUPIAAF_cjs=require('./chunk-XGUPIAAF.cjs');require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"getAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.h}});Object.defineProperty(exports,"getGlobal",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.c}});Object.defineProperty(exports,"getHomeDir",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.k}});Object.defineProperty(exports,"getInstance",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.f}});Object.defineProperty(exports,"getProjectDirectory",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.p}});Object.defineProperty(exports,"getXdgCache",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.o}});Object.defineProperty(exports,"getXdgConfig",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.l}});Object.defineProperty(exports,"getXdgData",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.m}});Object.defineProperty(exports,"getXdgState",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.n}});Object.defineProperty(exports,"hasAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.i}});Object.defineProperty(exports,"requireAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.j}});Object.defineProperty(exports,"resetGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.b}});Object.defineProperty(exports,"resetInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.e}});Object.defineProperty(exports,"resolveParentSymlinksSync",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.q}});Object.defineProperty(exports,"setAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.g}});Object.defineProperty(exports,"setGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.a}});Object.defineProperty(exports,"setInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.d}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHOK3SUH4_cjs=require('./chunk-HOK3SUH4.cjs');require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-DNE3XPCJ.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"CURRENT_VERSION",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.q}});Object.defineProperty(exports,"addSkillToLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.v}});Object.defineProperty(exports,"getLocalLockPath",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.r}});Object.defineProperty(exports,"readLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.t}});Object.defineProperty(exports,"removeSkillFromLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.w}});Object.defineProperty(exports,"storePathFromLocalLockEntry",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.s}});Object.defineProperty(exports,"writeLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.u}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{q as CURRENT_VERSION,v as addSkillToLocalLock,r as getLocalLockPath,t as readLocalLock,w as removeSkillFromLocalLock,s as storePathFromLocalLockEntry,u as writeLocalLock}from'./chunk-
|
|
1
|
+
export{q as CURRENT_VERSION,v as addSkillToLocalLock,r as getLocalLockPath,t as readLocalLock,w as removeSkillFromLocalLock,s as storePathFromLocalLockEntry,u as writeLocalLock}from'./chunk-UUZB3HCD.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZJS7IO5V.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkLJ63Q26N_cjs=require('./chunk-LJ63Q26N.cjs');require('./chunk-IJI72D6W.cjs'),require('./chunk-HOK3SUH4.cjs'),require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-DNE3XPCJ.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"scanInstalledSkillDirs",{enumerable:true,get:function(){return chunkLJ63Q26N_cjs.a}});Object.defineProperty(exports,"scanInstalledSkills",{enumerable:true,get:function(){return chunkLJ63Q26N_cjs.b}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export{a as scanInstalledSkillDirs,b as scanInstalledSkills}from'./chunk-BQ6QWQEM.mjs';import'./chunk-6OLPTZDO.mjs';import'./chunk-UUZB3HCD.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZJS7IO5V.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{j as CURRENT_VERSION,r as addSkillToLock,n as computeContentHash,y as dismissPrompt,q as fetchSkillFolderHash,u as getAllLockedSkills,p as getGitHubToken,t as getSkillFromLock,k as getSkillLockPath,v as getSkillsBySource,w as isPromptDismissed,l as readSkillLock,s as removeSkillFromLock,o as resetGhAuthWarning,x as storePathFromLockEntry,m as writeSkillLock}from'./chunk-
|
|
1
|
+
export{j as CURRENT_VERSION,r as addSkillToLock,n as computeContentHash,y as dismissPrompt,q as fetchSkillFolderHash,u as getAllLockedSkills,p as getGitHubToken,t as getSkillFromLock,k as getSkillLockPath,v as getSkillsBySource,w as isPromptDismissed,l as readSkillLock,s as removeSkillFromLock,o as resetGhAuthWarning,x as storePathFromLockEntry,m as writeSkillLock}from'./chunk-5DAHAO55.mjs';import'./chunk-UUZB3HCD.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZJS7IO5V.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkBWDTT6SA_cjs=require('./chunk-BWDTT6SA.cjs');require('./chunk-HOK3SUH4.cjs'),require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-DNE3XPCJ.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"CURRENT_VERSION",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.j}});Object.defineProperty(exports,"addSkillToLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.r}});Object.defineProperty(exports,"computeContentHash",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.n}});Object.defineProperty(exports,"dismissPrompt",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.y}});Object.defineProperty(exports,"fetchSkillFolderHash",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.q}});Object.defineProperty(exports,"getAllLockedSkills",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.u}});Object.defineProperty(exports,"getGitHubToken",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.p}});Object.defineProperty(exports,"getSkillFromLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.t}});Object.defineProperty(exports,"getSkillLockPath",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.k}});Object.defineProperty(exports,"getSkillsBySource",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.v}});Object.defineProperty(exports,"isPromptDismissed",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.w}});Object.defineProperty(exports,"readSkillLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.l}});Object.defineProperty(exports,"removeSkillFromLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.s}});Object.defineProperty(exports,"resetGhAuthWarning",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.o}});Object.defineProperty(exports,"storePathFromLockEntry",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.x}});Object.defineProperty(exports,"writeSkillLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.m}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
'use strict';var chunkHOK3SUH4_cjs=require('./chunk-HOK3SUH4.cjs');require('./chunk-JUNIAQ2A.cjs'),require('./chunk-XGUPIAAF.cjs'),require('./chunk-DNE3XPCJ.cjs'),require('./chunk-E7AHWFZN.cjs'),require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"DEFAULT_SKILL_SOURCE",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.F}});Object.defineProperty(exports,"LocalPathNotFoundError",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.R}});Object.defineProperty(exports,"STORE_INDEX_VERSION",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.o}});Object.defineProperty(exports,"acquireSourceClone",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.Q}});Object.defineProperty(exports,"cleanCache",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ja}});Object.defineProperty(exports,"cleanCachedRepo",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ia}});Object.defineProperty(exports,"derivePluginSlug",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.O}});Object.defineProperty(exports,"deriveSourceKey",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.L}});Object.defineProperty(exports,"ensureCachedSource",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ca}});Object.defineProperty(exports,"findSkillByLocation",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.Y}});Object.defineProperty(exports,"findSkillByName",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.X}});Object.defineProperty(exports,"getCacheRepoDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.P}});Object.defineProperty(exports,"getCacheRoot",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.N}});Object.defineProperty(exports,"getSourceDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.I}});Object.defineProperty(exports,"getStoreDefinitionsFile",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.K}});Object.defineProperty(exports,"getStoreDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.M}});Object.defineProperty(exports,"getStoreRoot",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.J}});Object.defineProperty(exports,"installFromCache",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ha}});Object.defineProperty(exports,"isCachePath",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ga}});Object.defineProperty(exports,"isDirNonEmpty",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.fa}});Object.defineProperty(exports,"listAllSkills",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.W}});Object.defineProperty(exports,"listSourceSkills",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.da}});Object.defineProperty(exports,"parseDefaultPluginConfig",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.H}});Object.defineProperty(exports,"readStoreDefinitions",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.U}});Object.defineProperty(exports,"readStoreIndex",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.S}});Object.defineProperty(exports,"removeSkillFromAllPlugins",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs._}});Object.defineProperty(exports,"removeSkillFromPlugin",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.Z}});Object.defineProperty(exports,"removeStoreDefinition",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ba}});Object.defineProperty(exports,"resolveDefaultSource",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.G}});Object.defineProperty(exports,"toPosixRelative",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ea}});Object.defineProperty(exports,"writeSkillToPlugin",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.V}});Object.defineProperty(exports,"writeStoreDefinition",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.$}});Object.defineProperty(exports,"writeStoreDefinitionsBatch",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.aa}});Object.defineProperty(exports,"writeStoreIndex",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.T}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{F as DEFAULT_SKILL_SOURCE,R as LocalPathNotFoundError,o as STORE_INDEX_VERSION,Q as acquireSourceClone,ja as cleanCache,ia as cleanCachedRepo,O as derivePluginSlug,L as deriveSourceKey,ca as ensureCachedSource,Y as findSkillByLocation,X as findSkillByName,P as getCacheRepoDir,N as getCacheRoot,I as getSourceDir,K as getStoreDefinitionsFile,M as getStoreDir,J as getStoreRoot,ha as installFromCache,ga as isCachePath,fa as isDirNonEmpty,W as listAllSkills,da as listSourceSkills,H as parseDefaultPluginConfig,U as readStoreDefinitions,S as readStoreIndex,_ as removeSkillFromAllPlugins,Z as removeSkillFromPlugin,ba as removeStoreDefinition,G as resolveDefaultSource,ea as toPosixRelative,V as writeSkillToPlugin,$ as writeStoreDefinition,aa as writeStoreDefinitionsBatch,T as writeStoreIndex}from'./chunk-
|
|
1
|
+
export{F as DEFAULT_SKILL_SOURCE,R as LocalPathNotFoundError,o as STORE_INDEX_VERSION,Q as acquireSourceClone,ja as cleanCache,ia as cleanCachedRepo,O as derivePluginSlug,L as deriveSourceKey,ca as ensureCachedSource,Y as findSkillByLocation,X as findSkillByName,P as getCacheRepoDir,N as getCacheRoot,I as getSourceDir,K as getStoreDefinitionsFile,M as getStoreDir,J as getStoreRoot,ha as installFromCache,ga as isCachePath,fa as isDirNonEmpty,W as listAllSkills,da as listSourceSkills,H as parseDefaultPluginConfig,U as readStoreDefinitions,S as readStoreIndex,_ as removeSkillFromAllPlugins,Z as removeSkillFromPlugin,ba as removeStoreDefinition,G as resolveDefaultSource,ea as toPosixRelative,V as writeSkillToPlugin,$ as writeStoreDefinition,aa as writeStoreDefinitionsBatch,T as writeStoreIndex}from'./chunk-UUZB3HCD.mjs';import'./chunk-Y6D5Z6AU.mjs';import'./chunk-RWZ4LFSN.mjs';import'./chunk-ZJS7IO5V.mjs';import'./chunk-ZYDDQV73.mjs';import'./chunk-WQGSYA5D.mjs';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunkQ2MOP5ZW_cjs=require('./chunk-Q2MOP5ZW.cjs');require('./chunk-
|
|
1
|
+
'use strict';var chunkQ2MOP5ZW_cjs=require('./chunk-Q2MOP5ZW.cjs');require('./chunk-BWPPLYIF.cjs');Object.defineProperty(exports,"fetchAuditData",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.c}});Object.defineProperty(exports,"flushTelemetry",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.e}});Object.defineProperty(exports,"setDetectedAgent",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.a}});Object.defineProperty(exports,"setVersion",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.b}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.d}});
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
'use strict';var
|
|
2
|
+
'use strict';var chunkBWPPLYIF_cjs=require('./chunks/chunk-BWPPLYIF.cjs'),fs=require('fs'),path=require('path'),url=require('url');var h=path.dirname(url.fileURLToPath(chunkBWPPLYIF_cjs.c));function b(){try{let e=path.join(h,"..","package.json");return JSON.parse(fs.readFileSync(e,"utf-8")).version}catch{return "0.0.0"}}var c=new Set(["DEBUG","INFO","WARN","ERROR"]);function O(e){let t={logLevel:"INFO",printLogs:false,debug:false};for(let n=0;n<e.length;n++){let o=e[n];if(o)if(o==="--log-level"&&n+1<e.length){let s=e[n+1];if(s&&!s.startsWith("-")){let i=s.toUpperCase();c.has(i)&&(t.logLevel=i,n++);}}else if(o.startsWith("--log-level=")){let s=o.slice(12).toUpperCase();c.has(s)&&(t.logLevel=s);}else o==="--print-logs"?t.printLogs=true:o==="--debug"&&(t.debug=true);}return t}async function w(){let e=process.argv.slice(2),t=b(),{loadEnv:n}=await import('@easbot/utils');if(n(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US"),e.length===0){let{renderBanner:l}=await import('./chunks/cli-handler-2G4ZYO2S.cjs');l();return}if(e[0]==="--help"||e[0]==="-h"){let{renderHelp:l}=await import('./chunks/cli-handler-2G4ZYO2S.cjs');l();return}if(e[0]==="--version"||e[0]==="-v"){console.log(t);return}let o=O(e),{Log:s}=await import('@easbot/utils'),{getXdgData:i,setGlobalAdapter:g,resetGlobalAdapter:d}=await import('./chunks/interfaces-T3TO7GQW.cjs'),f=path.join(i(),"log");await s.init({logDir:f,print:o.printLogs,dev:o.debug||false,level:o.logLevel});let{handleSkillsCli:L}=await import('./chunks/cli-handler-2G4ZYO2S.cjs'),r=await L(e,{version:t});r.code!==0&&(process.exitCode=r.code);}w().catch(e=>{console.error(e),process.exitCode=1;}).finally(async()=>{try{let{flushTelemetry:e}=await import('./chunks/telemetry-TAVF3FAM.cjs');await e();}catch{}try{let{Log:e}=await import('@easbot/utils');await e.close();}catch{}process.exit(process.exitCode??0);});
|
package/dist/cli.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import {readFileSync}from'fs';import {dirname,join}from'path';import {fileURLToPath}from'url';var m=dirname(fileURLToPath(import.meta.url));function h(){try{let e=join(m,"..","package.json");return JSON.parse(readFileSync(e,"utf-8")).version}catch{return "0.0.0"}}var a=new Set(["DEBUG","INFO","WARN","ERROR"]);function b(e){let t={logLevel:"INFO",printLogs:false,debug:false};for(let n=0;n<e.length;n++){let o=e[n];if(o)if(o==="--log-level"&&n+1<e.length){let s=e[n+1];if(s&&!s.startsWith("-")){let i=s.toUpperCase();a.has(i)&&(t.logLevel=i,n++);}}else if(o.startsWith("--log-level=")){let s=o.slice(12).toUpperCase();a.has(s)&&(t.logLevel=s);}else o==="--print-logs"?t.printLogs=true:o==="--debug"&&(t.debug=true);}return t}async function O(){let e=process.argv.slice(2),t=h(),{loadEnv:n}=await import('@easbot/utils');if(n(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US"),e.length===0){let{renderBanner:l}=await import('./chunks/cli-handler-
|
|
2
|
+
import {readFileSync}from'fs';import {dirname,join}from'path';import {fileURLToPath}from'url';var m=dirname(fileURLToPath(import.meta.url));function h(){try{let e=join(m,"..","package.json");return JSON.parse(readFileSync(e,"utf-8")).version}catch{return "0.0.0"}}var a=new Set(["DEBUG","INFO","WARN","ERROR"]);function b(e){let t={logLevel:"INFO",printLogs:false,debug:false};for(let n=0;n<e.length;n++){let o=e[n];if(o)if(o==="--log-level"&&n+1<e.length){let s=e[n+1];if(s&&!s.startsWith("-")){let i=s.toUpperCase();a.has(i)&&(t.logLevel=i,n++);}}else if(o.startsWith("--log-level=")){let s=o.slice(12).toUpperCase();a.has(s)&&(t.logLevel=s);}else o==="--print-logs"?t.printLogs=true:o==="--debug"&&(t.debug=true);}return t}async function O(){let e=process.argv.slice(2),t=h(),{loadEnv:n}=await import('@easbot/utils');if(n(),process.env.EASBOT_LANG||(process.env.EASBOT_LANG="en-US"),e.length===0){let{renderBanner:l}=await import('./chunks/cli-handler-F4DUEULA.mjs');l();return}if(e[0]==="--help"||e[0]==="-h"){let{renderHelp:l}=await import('./chunks/cli-handler-F4DUEULA.mjs');l();return}if(e[0]==="--version"||e[0]==="-v"){console.log(t);return}let o=b(e),{Log:s}=await import('@easbot/utils'),{getXdgData:i,setGlobalAdapter:p,resetGlobalAdapter:g}=await import('./chunks/interfaces-S47ZGORM.mjs'),d=join(i(),"log");await s.init({logDir:d,print:o.printLogs,dev:o.debug||false,level:o.logLevel});let{handleSkillsCli:f}=await import('./chunks/cli-handler-F4DUEULA.mjs'),r=await f(e,{version:t});r.code!==0&&(process.exitCode=r.code);}O().catch(e=>{console.error(e),process.exitCode=1;}).finally(async()=>{try{let{flushTelemetry:e}=await import('./chunks/telemetry-7T6MUW5A.mjs');await e();}catch{}try{let{Log:e}=await import('@easbot/utils');await e.close();}catch{}process.exit(process.exitCode??0);});
|
package/dist/index.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
'use strict';var chunk2E6BHPFV_cjs=require('./chunks/chunk-2E6BHPFV.cjs'),chunkQ2MOP5ZW_cjs=require('./chunks/chunk-Q2MOP5ZW.cjs'),chunk5RWSXDNO_cjs=require('./chunks/chunk-5RWSXDNO.cjs');require('./chunks/chunk-DFBKA5A6.cjs');var chunkUGHF4GOW_cjs=require('./chunks/chunk-UGHF4GOW.cjs'),chunkJCOXRETY_cjs=require('./chunks/chunk-JCOXRETY.cjs'),chunkISMGLHYS_cjs=require('./chunks/chunk-ISMGLHYS.cjs'),chunkXGUPIAAF_cjs=require('./chunks/chunk-XGUPIAAF.cjs'),chunkDNE3XPCJ_cjs=require('./chunks/chunk-DNE3XPCJ.cjs'),chunkE7AHWFZN_cjs=require('./chunks/chunk-E7AHWFZN.cjs'),chunkGWUDKZEH_cjs=require('./chunks/chunk-GWUDKZEH.cjs'),path=require('path');var g=class{constructor(){chunkGWUDKZEH_cjs.b(this,"providers",[]);}register(o){if(this.providers.some(t=>t.id===o.id))throw new Error(`Provider with id "${o.id}" already registered`);this.providers.push(o);}findProvider(o){for(let t of this.providers)if(t.match(o).matches)return t;return null}getProviders(){return [...this.providers]}},u=new g;function at(e){u.register(e);}function ct(e){return u.findProvider(e)}function ut(){return u.getProviders()}var c=new Map;function f(e){if(c.has(e.id))throw new Error(`PluginSource with id "${e.id}" already registered`);c.set(e.id,e);}function d(){return Array.from(c.values()).map(e=>e)}function k(e){return c.get(e)??null}function P(e){return Array.from(c.values()).filter(o=>o.category===e)}async function y(){let e=d();return await Promise.all(e.map(async t=>{try{let r=await t.fetch();return {sourceId:t.id,entries:r}}catch(r){return {sourceId:t.id,error:r instanceof Error?r:new Error(String(r))}}}))}function pt(e){return {name:e.name,description:e.description,scope:"all"}}function x(e){return {id:e.id??`well-known:${new URL(e.url).hostname}`,category:"well-known",async fetch(){return (await chunkJCOXRETY_cjs.n.fetchAllSkills(e.url)).map(r=>({id:r.name,name:r.name,description:r.description,location:r.sourceUrl,category:"well-known",metadata:{installName:r.installName,sourceIdentifier:chunkJCOXRETY_cjs.n.getSourceIdentifier(e.url),sourceUrl:r.sourceUrl}}))},async load(t){let l=(await chunkJCOXRETY_cjs.n.fetchAllSkills(e.url)).find(n=>n.name===t.id);if(!l)throw new Error(`Skill "${t.id}" not found in well-known source ${e.url}`);return {skills:[pt(l)],version:"well-known",author:{name:new URL(e.url).hostname}}}}}async function h(e){try{let t=await(await import('fs/promises')).readFile(e,"utf-8");return JSON.parse(t)}catch{return null}}function A(e){let o=e.basePath.split(/[\\/]/).filter(Boolean).pop()??"local";return {id:e.id??`local:${o}`,category:"file",async fetch(){let r=[],l=await h(path.join(e.basePath,".claude-plugin/plugin.json"));l?.name&&r.push({id:l.name,name:l.name,description:l.description,location:e.basePath,category:"file",metadata:{skills:l.skills,manifest:"plugin.json"}});let n=await h(path.join(e.basePath,".claude-plugin/marketplace.json"));if(n?.plugins)for(let i of n.plugins)i.name&&(typeof i.source!="string"&&i.source!==void 0||r.push({id:i.name,name:i.name,description:i.description,location:i.source?path.join(e.basePath,n.metadata?.pluginRoot??"",i.source):e.basePath,category:"file",metadata:{skills:i.skills,manifest:"marketplace.json",pluginRoot:n.metadata?.pluginRoot}}));return r},async load(r){return {skills:(await chunkJCOXRETY_cjs.A(r.location)).map(i=>({name:i.name,description:i.description,scope:"all"})),version:"local",author:{name:o}}}}}Object.defineProperty(exports,"applyActions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.c}});Object.defineProperty(exports,"buildMatrix",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.d}});Object.defineProperty(exports,"buildUsePrompt",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.G}});Object.defineProperty(exports,"detectAgent",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.f}});Object.defineProperty(exports,"getAgentName",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.h}});Object.defineProperty(exports,"getAgentType",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.i}});Object.defineProperty(exports,"handleSkillsCli",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.M}});Object.defineProperty(exports,"hasProjectSkills",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.k}});Object.defineProperty(exports,"initTelemetry",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.o}});Object.defineProperty(exports,"isRunningInAgent",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.g}});Object.defineProperty(exports,"launchAgentInteractively",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.J}});Object.defineProperty(exports,"matchesSkillFilter",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.m}});Object.defineProperty(exports,"materializeUseSkill",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.H}});Object.defineProperty(exports,"parseAddOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.q}});Object.defineProperty(exports,"parseFindOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.x}});Object.defineProperty(exports,"parseListOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.A}});Object.defineProperty(exports,"parseRemoveOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.D}});Object.defineProperty(exports,"parseStoreOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.r}});Object.defineProperty(exports,"parseUpdateOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.j}});Object.defineProperty(exports,"parseUseOptions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.F}});Object.defineProperty(exports,"planActions",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.b}});Object.defineProperty(exports,"probeCell",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.a}});Object.defineProperty(exports,"removeCommand",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.C}});Object.defineProperty(exports,"renderBanner",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.K}});Object.defineProperty(exports,"renderHelp",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.L}});Object.defineProperty(exports,"resolveUpdateScope",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.l}});Object.defineProperty(exports,"runAdd",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.p}});Object.defineProperty(exports,"runDoctor",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.E}});Object.defineProperty(exports,"runFind",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.z}});Object.defineProperty(exports,"runList",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.B}});Object.defineProperty(exports,"runPostInstallReconcile",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.e}});Object.defineProperty(exports,"runStore",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.s}});Object.defineProperty(exports,"runStoreClean",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.u}});Object.defineProperty(exports,"runStoreList",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.t}});Object.defineProperty(exports,"runStoreRemove",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.w}});Object.defineProperty(exports,"runStoreUpdate",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.v}});Object.defineProperty(exports,"runUpdate",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.n}});Object.defineProperty(exports,"runUse",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.I}});Object.defineProperty(exports,"searchSkillsAPI",{enumerable:true,get:function(){return chunk2E6BHPFV_cjs.y}});Object.defineProperty(exports,"fetchAuditData",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.c}});Object.defineProperty(exports,"flushTelemetry",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.e}});Object.defineProperty(exports,"setDetectedAgent",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.a}});Object.defineProperty(exports,"setVersion",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.b}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.d}});Object.defineProperty(exports,"addSkillToLock",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.r}});Object.defineProperty(exports,"computeContentHash",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.n}});Object.defineProperty(exports,"dismissPrompt",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.y}});Object.defineProperty(exports,"fetchSkillFolderHash",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.q}});Object.defineProperty(exports,"getAllLockedSkills",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.u}});Object.defineProperty(exports,"getGitHubToken",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.p}});Object.defineProperty(exports,"getSkillFromLock",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.t}});Object.defineProperty(exports,"getSkillLockPath",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.k}});Object.defineProperty(exports,"getSkillsBySource",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.v}});Object.defineProperty(exports,"isPromptDismissed",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.w}});Object.defineProperty(exports,"readSkillLock",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.l}});Object.defineProperty(exports,"removeSkillFromLock",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.s}});Object.defineProperty(exports,"resetGhAuthWarning",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.o}});Object.defineProperty(exports,"writeSkillLock",{enumerable:true,get:function(){return chunk5RWSXDNO_cjs.m}});Object.defineProperty(exports,"AGENTS_DIR",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.a}});Object.defineProperty(exports,"SKILLS_SUBDIR",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.b}});Object.defineProperty(exports,"UNIVERSAL_SKILLS_DIR",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.c}});Object.defineProperty(exports,"getAgentBaseDir",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.g}});Object.defineProperty(exports,"getCanonicalPath",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.o}});Object.defineProperty(exports,"getCanonicalSkillsDir",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.e}});Object.defineProperty(exports,"getEveSubagentSkillsDir",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.f}});Object.defineProperty(exports,"getInstallPath",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.m}});Object.defineProperty(exports,"installBlobSkillForAgent",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.r}});Object.defineProperty(exports,"installRemoteSkillForAgent",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.p}});Object.defineProperty(exports,"installSkillForAgent",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.h}});Object.defineProperty(exports,"installWellKnownSkillForAgent",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.q}});Object.defineProperty(exports,"isSkillInstalled",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.k}});Object.defineProperty(exports,"listInstalledSkills",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.s}});Object.defineProperty(exports,"sanitizeName",{enumerable:true,get:function(){return chunkUGHF4GOW_cjs.d}});Object.defineProperty(exports,"DEFAULT_CLONE_TIMEOUT",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.f}});Object.defineProperty(exports,"GitCloneError",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.g}});Object.defineProperty(exports,"WellKnownProvider",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.m}});Object.defineProperty(exports,"acquireSourceClone",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.Q}});Object.defineProperty(exports,"addSkillToLocalLock",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.v}});Object.defineProperty(exports,"cleanCache",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.ja}});Object.defineProperty(exports,"cleanCachedRepo",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.ia}});Object.defineProperty(exports,"cleanupTempDir",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.l}});Object.defineProperty(exports,"cloneRepo",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.k}});Object.defineProperty(exports,"discoverSkills",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.A}});Object.defineProperty(exports,"ensureCachedSource",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.ca}});Object.defineProperty(exports,"filterSkills",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.C}});Object.defineProperty(exports,"getCacheRepoDir",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.P}});Object.defineProperty(exports,"getCacheRoot",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.N}});Object.defineProperty(exports,"getLocalLockPath",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.r}});Object.defineProperty(exports,"getOwnerRepo",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.a}});Object.defineProperty(exports,"getSkillDisplayName",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.B}});Object.defineProperty(exports,"getSourceDir",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.I}});Object.defineProperty(exports,"installFromCache",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.ha}});Object.defineProperty(exports,"isGitHubHttpsCloneUrl",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.i}});Object.defineProperty(exports,"isGitHubSsoAuthError",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.j}});Object.defineProperty(exports,"isRepoPrivate",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.c}});Object.defineProperty(exports,"isSubpathSafe",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.z}});Object.defineProperty(exports,"parseGitHubRepoUrl",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.h}});Object.defineProperty(exports,"parseOwnerRepo",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.b}});Object.defineProperty(exports,"parseSkillMd",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.y}});Object.defineProperty(exports,"parseSource",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.e}});Object.defineProperty(exports,"readLocalLock",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.t}});Object.defineProperty(exports,"removeSkillFromLocalLock",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.w}});Object.defineProperty(exports,"sanitizeSubpath",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.d}});Object.defineProperty(exports,"shouldInstallInternalSkills",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.x}});Object.defineProperty(exports,"wellKnownProvider",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.n}});Object.defineProperty(exports,"writeLocalLock",{enumerable:true,get:function(){return chunkJCOXRETY_cjs.u}});Object.defineProperty(exports,"EVE_SUBAGENTS_DIR",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.e}});Object.defineProperty(exports,"PROJECT_SKILLS_DIR_PATTERN",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.j}});Object.defineProperty(exports,"agents",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.b}});Object.defineProperty(exports,"detectInstalledAgents",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.c}});Object.defineProperty(exports,"getAgentConfig",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.d}});Object.defineProperty(exports,"getAgentGlobalSkillDirs",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.l}});Object.defineProperty(exports,"getAgentProjectSkillContainerPrefixes",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.n}});Object.defineProperty(exports,"getAgentProjectSkillDirs",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.k}});Object.defineProperty(exports,"getAgentSkillDirs",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.m}});Object.defineProperty(exports,"getEveSubagents",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.f}});Object.defineProperty(exports,"getNonUniversalAgents",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.i}});Object.defineProperty(exports,"getOpenClawGlobalSkillsDir",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.a}});Object.defineProperty(exports,"getUniversalAgents",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.h}});Object.defineProperty(exports,"isUniversalAgent",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.o}});Object.defineProperty(exports,"matchesUniversalScope",{enumerable:true,get:function(){return chunkISMGLHYS_cjs.g}});Object.defineProperty(exports,"getAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.h}});Object.defineProperty(exports,"getGlobal",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.c}});Object.defineProperty(exports,"getHomeDir",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.k}});Object.defineProperty(exports,"getInstance",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.f}});Object.defineProperty(exports,"getProjectDirectory",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.p}});Object.defineProperty(exports,"getXdgCache",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.o}});Object.defineProperty(exports,"getXdgConfig",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.l}});Object.defineProperty(exports,"getXdgData",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.m}});Object.defineProperty(exports,"getXdgState",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.n}});Object.defineProperty(exports,"hasAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.i}});Object.defineProperty(exports,"requireAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.j}});Object.defineProperty(exports,"resetGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.b}});Object.defineProperty(exports,"resetInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.e}});Object.defineProperty(exports,"setAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.g}});Object.defineProperty(exports,"setGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.a}});Object.defineProperty(exports,"setInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.d}});Object.defineProperty(exports,"BLOB_ALLOWED_REPOS",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.c}});Object.defineProperty(exports,"fetchRepoTree",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.g}});Object.defineProperty(exports,"findSkillMdPaths",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.k}});Object.defineProperty(exports,"getSkillFolderHashFromTree",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.i}});Object.defineProperty(exports,"resetRepoTreeAuthState",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.f}});Object.defineProperty(exports,"sanitizeMetadata",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.b}});Object.defineProperty(exports,"stripTerminalEscapes",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.a}});Object.defineProperty(exports,"toSkillSlug",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.e}});Object.defineProperty(exports,"tryBlobInstall",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.l}});Object.defineProperty(exports,"computeFromDir",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.b}});Object.defineProperty(exports,"computeSnapshotHash",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.c}});Object.defineProperty(exports,"parseFrontmatter",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.a}});exports.createLocalPluginSource=A;exports.createWellKnownSource=x;exports.findProvider=ct;exports.findSource=k;exports.findSourcesByCategory=P;exports.getProviders=ut;exports.listAllEntries=y;exports.listSources=d;exports.registerProvider=at;exports.registerSource=f;exports.registry=u;
|
|
1
|
+
'use strict';var chunkS5OLAC7X_cjs=require('./chunks/chunk-S5OLAC7X.cjs'),chunkQ2MOP5ZW_cjs=require('./chunks/chunk-Q2MOP5ZW.cjs'),chunkBWDTT6SA_cjs=require('./chunks/chunk-BWDTT6SA.cjs');require('./chunks/chunk-LJ63Q26N.cjs');var chunkIJI72D6W_cjs=require('./chunks/chunk-IJI72D6W.cjs'),chunkHOK3SUH4_cjs=require('./chunks/chunk-HOK3SUH4.cjs'),chunkJUNIAQ2A_cjs=require('./chunks/chunk-JUNIAQ2A.cjs'),chunkXGUPIAAF_cjs=require('./chunks/chunk-XGUPIAAF.cjs'),chunkDNE3XPCJ_cjs=require('./chunks/chunk-DNE3XPCJ.cjs'),chunkE7AHWFZN_cjs=require('./chunks/chunk-E7AHWFZN.cjs'),chunkBWPPLYIF_cjs=require('./chunks/chunk-BWPPLYIF.cjs'),path=require('path');var g=class{constructor(){chunkBWPPLYIF_cjs.b(this,"providers",[]);}register(o){if(this.providers.some(t=>t.id===o.id))throw new Error(`Provider with id "${o.id}" already registered`);this.providers.push(o);}findProvider(o){for(let t of this.providers)if(t.match(o).matches)return t;return null}getProviders(){return [...this.providers]}},u=new g;function at(e){u.register(e);}function ct(e){return u.findProvider(e)}function ut(){return u.getProviders()}var c=new Map;function f(e){if(c.has(e.id))throw new Error(`PluginSource with id "${e.id}" already registered`);c.set(e.id,e);}function d(){return Array.from(c.values()).map(e=>e)}function k(e){return c.get(e)??null}function P(e){return Array.from(c.values()).filter(o=>o.category===e)}async function y(){let e=d();return await Promise.all(e.map(async t=>{try{let r=await t.fetch();return {sourceId:t.id,entries:r}}catch(r){return {sourceId:t.id,error:r instanceof Error?r:new Error(String(r))}}}))}function pt(e){return {name:e.name,description:e.description,scope:"all"}}function x(e){return {id:e.id??`well-known:${new URL(e.url).hostname}`,category:"well-known",async fetch(){return (await chunkHOK3SUH4_cjs.n.fetchAllSkills(e.url)).map(r=>({id:r.name,name:r.name,description:r.description,location:r.sourceUrl,category:"well-known",metadata:{installName:r.installName,sourceIdentifier:chunkHOK3SUH4_cjs.n.getSourceIdentifier(e.url),sourceUrl:r.sourceUrl}}))},async load(t){let l=(await chunkHOK3SUH4_cjs.n.fetchAllSkills(e.url)).find(n=>n.name===t.id);if(!l)throw new Error(`Skill "${t.id}" not found in well-known source ${e.url}`);return {skills:[pt(l)],version:"well-known",author:{name:new URL(e.url).hostname}}}}}async function h(e){try{let t=await(await import('fs/promises')).readFile(e,"utf-8");return JSON.parse(t)}catch{return null}}function A(e){let o=e.basePath.split(/[\\/]/).filter(Boolean).pop()??"local";return {id:e.id??`local:${o}`,category:"file",async fetch(){let r=[],l=await h(path.join(e.basePath,".claude-plugin/plugin.json"));l?.name&&r.push({id:l.name,name:l.name,description:l.description,location:e.basePath,category:"file",metadata:{skills:l.skills,manifest:"plugin.json"}});let n=await h(path.join(e.basePath,".claude-plugin/marketplace.json"));if(n?.plugins)for(let i of n.plugins)i.name&&(typeof i.source!="string"&&i.source!==void 0||r.push({id:i.name,name:i.name,description:i.description,location:i.source?path.join(e.basePath,n.metadata?.pluginRoot??"",i.source):e.basePath,category:"file",metadata:{skills:i.skills,manifest:"marketplace.json",pluginRoot:n.metadata?.pluginRoot}}));return r},async load(r){return {skills:(await chunkHOK3SUH4_cjs.A(r.location)).map(i=>({name:i.name,description:i.description,scope:"all"})),version:"local",author:{name:o}}}}}Object.defineProperty(exports,"applyActions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.c}});Object.defineProperty(exports,"buildMatrix",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.d}});Object.defineProperty(exports,"buildUsePrompt",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.G}});Object.defineProperty(exports,"detectAgent",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.f}});Object.defineProperty(exports,"getAgentName",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.h}});Object.defineProperty(exports,"getAgentType",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.i}});Object.defineProperty(exports,"handleSkillsCli",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.M}});Object.defineProperty(exports,"hasProjectSkills",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.k}});Object.defineProperty(exports,"initTelemetry",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.o}});Object.defineProperty(exports,"isRunningInAgent",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.g}});Object.defineProperty(exports,"launchAgentInteractively",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.J}});Object.defineProperty(exports,"matchesSkillFilter",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.m}});Object.defineProperty(exports,"materializeUseSkill",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.H}});Object.defineProperty(exports,"parseAddOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.q}});Object.defineProperty(exports,"parseFindOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.x}});Object.defineProperty(exports,"parseListOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.A}});Object.defineProperty(exports,"parseRemoveOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.D}});Object.defineProperty(exports,"parseStoreOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.r}});Object.defineProperty(exports,"parseUpdateOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.j}});Object.defineProperty(exports,"parseUseOptions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.F}});Object.defineProperty(exports,"planActions",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.b}});Object.defineProperty(exports,"probeCell",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.a}});Object.defineProperty(exports,"removeCommand",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.C}});Object.defineProperty(exports,"renderBanner",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.K}});Object.defineProperty(exports,"renderHelp",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.L}});Object.defineProperty(exports,"resolveUpdateScope",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.l}});Object.defineProperty(exports,"runAdd",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.p}});Object.defineProperty(exports,"runDoctor",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.E}});Object.defineProperty(exports,"runFind",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.z}});Object.defineProperty(exports,"runList",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.B}});Object.defineProperty(exports,"runPostInstallReconcile",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.e}});Object.defineProperty(exports,"runStore",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.s}});Object.defineProperty(exports,"runStoreClean",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.u}});Object.defineProperty(exports,"runStoreList",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.t}});Object.defineProperty(exports,"runStoreRemove",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.w}});Object.defineProperty(exports,"runStoreUpdate",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.v}});Object.defineProperty(exports,"runUpdate",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.n}});Object.defineProperty(exports,"runUse",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.I}});Object.defineProperty(exports,"searchSkillsAPI",{enumerable:true,get:function(){return chunkS5OLAC7X_cjs.y}});Object.defineProperty(exports,"fetchAuditData",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.c}});Object.defineProperty(exports,"flushTelemetry",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.e}});Object.defineProperty(exports,"setDetectedAgent",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.a}});Object.defineProperty(exports,"setVersion",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.b}});Object.defineProperty(exports,"track",{enumerable:true,get:function(){return chunkQ2MOP5ZW_cjs.d}});Object.defineProperty(exports,"addSkillToLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.r}});Object.defineProperty(exports,"computeContentHash",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.n}});Object.defineProperty(exports,"dismissPrompt",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.y}});Object.defineProperty(exports,"fetchSkillFolderHash",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.q}});Object.defineProperty(exports,"getAllLockedSkills",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.u}});Object.defineProperty(exports,"getGitHubToken",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.p}});Object.defineProperty(exports,"getSkillFromLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.t}});Object.defineProperty(exports,"getSkillLockPath",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.k}});Object.defineProperty(exports,"getSkillsBySource",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.v}});Object.defineProperty(exports,"isPromptDismissed",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.w}});Object.defineProperty(exports,"readSkillLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.l}});Object.defineProperty(exports,"removeSkillFromLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.s}});Object.defineProperty(exports,"resetGhAuthWarning",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.o}});Object.defineProperty(exports,"writeSkillLock",{enumerable:true,get:function(){return chunkBWDTT6SA_cjs.m}});Object.defineProperty(exports,"AGENTS_DIR",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.a}});Object.defineProperty(exports,"SKILLS_SUBDIR",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.b}});Object.defineProperty(exports,"UNIVERSAL_SKILLS_DIR",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.c}});Object.defineProperty(exports,"getAgentBaseDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.g}});Object.defineProperty(exports,"getCanonicalPath",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.o}});Object.defineProperty(exports,"getCanonicalSkillsDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.e}});Object.defineProperty(exports,"getEveSubagentSkillsDir",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.f}});Object.defineProperty(exports,"getInstallPath",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.m}});Object.defineProperty(exports,"installBlobSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.r}});Object.defineProperty(exports,"installRemoteSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.p}});Object.defineProperty(exports,"installSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.h}});Object.defineProperty(exports,"installWellKnownSkillForAgent",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.q}});Object.defineProperty(exports,"isSkillInstalled",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.k}});Object.defineProperty(exports,"listInstalledSkills",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.s}});Object.defineProperty(exports,"sanitizeName",{enumerable:true,get:function(){return chunkIJI72D6W_cjs.d}});Object.defineProperty(exports,"DEFAULT_CLONE_TIMEOUT",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.f}});Object.defineProperty(exports,"GitCloneError",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.g}});Object.defineProperty(exports,"WellKnownProvider",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.m}});Object.defineProperty(exports,"acquireSourceClone",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.Q}});Object.defineProperty(exports,"addSkillToLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.v}});Object.defineProperty(exports,"cleanCache",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ja}});Object.defineProperty(exports,"cleanCachedRepo",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ia}});Object.defineProperty(exports,"cleanupTempDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.l}});Object.defineProperty(exports,"cloneRepo",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.k}});Object.defineProperty(exports,"discoverSkills",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.A}});Object.defineProperty(exports,"ensureCachedSource",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ca}});Object.defineProperty(exports,"filterSkills",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.C}});Object.defineProperty(exports,"getCacheRepoDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.P}});Object.defineProperty(exports,"getCacheRoot",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.N}});Object.defineProperty(exports,"getLocalLockPath",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.r}});Object.defineProperty(exports,"getOwnerRepo",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.a}});Object.defineProperty(exports,"getSkillDisplayName",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.B}});Object.defineProperty(exports,"getSourceDir",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.I}});Object.defineProperty(exports,"installFromCache",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.ha}});Object.defineProperty(exports,"isGitHubHttpsCloneUrl",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.i}});Object.defineProperty(exports,"isGitHubSsoAuthError",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.j}});Object.defineProperty(exports,"isRepoPrivate",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.c}});Object.defineProperty(exports,"isSubpathSafe",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.z}});Object.defineProperty(exports,"parseGitHubRepoUrl",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.h}});Object.defineProperty(exports,"parseOwnerRepo",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.b}});Object.defineProperty(exports,"parseSkillMd",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.y}});Object.defineProperty(exports,"parseSource",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.e}});Object.defineProperty(exports,"readLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.t}});Object.defineProperty(exports,"removeSkillFromLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.w}});Object.defineProperty(exports,"sanitizeSubpath",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.d}});Object.defineProperty(exports,"shouldInstallInternalSkills",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.x}});Object.defineProperty(exports,"wellKnownProvider",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.n}});Object.defineProperty(exports,"writeLocalLock",{enumerable:true,get:function(){return chunkHOK3SUH4_cjs.u}});Object.defineProperty(exports,"EVE_SUBAGENTS_DIR",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.e}});Object.defineProperty(exports,"PROJECT_SKILLS_DIR_PATTERN",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.j}});Object.defineProperty(exports,"agents",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.b}});Object.defineProperty(exports,"detectInstalledAgents",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.c}});Object.defineProperty(exports,"getAgentConfig",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.d}});Object.defineProperty(exports,"getAgentGlobalSkillDirs",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.l}});Object.defineProperty(exports,"getAgentProjectSkillContainerPrefixes",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.n}});Object.defineProperty(exports,"getAgentProjectSkillDirs",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.k}});Object.defineProperty(exports,"getAgentSkillDirs",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.m}});Object.defineProperty(exports,"getEveSubagents",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.f}});Object.defineProperty(exports,"getNonUniversalAgents",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.i}});Object.defineProperty(exports,"getOpenClawGlobalSkillsDir",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.a}});Object.defineProperty(exports,"getUniversalAgents",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.h}});Object.defineProperty(exports,"isUniversalAgent",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.o}});Object.defineProperty(exports,"matchesUniversalScope",{enumerable:true,get:function(){return chunkJUNIAQ2A_cjs.g}});Object.defineProperty(exports,"getAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.h}});Object.defineProperty(exports,"getGlobal",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.c}});Object.defineProperty(exports,"getHomeDir",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.k}});Object.defineProperty(exports,"getInstance",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.f}});Object.defineProperty(exports,"getProjectDirectory",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.p}});Object.defineProperty(exports,"getXdgCache",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.o}});Object.defineProperty(exports,"getXdgConfig",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.l}});Object.defineProperty(exports,"getXdgData",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.m}});Object.defineProperty(exports,"getXdgState",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.n}});Object.defineProperty(exports,"hasAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.i}});Object.defineProperty(exports,"requireAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.j}});Object.defineProperty(exports,"resetGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.b}});Object.defineProperty(exports,"resetInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.e}});Object.defineProperty(exports,"setAgentAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.g}});Object.defineProperty(exports,"setGlobalAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.a}});Object.defineProperty(exports,"setInstanceAdapter",{enumerable:true,get:function(){return chunkXGUPIAAF_cjs.d}});Object.defineProperty(exports,"BLOB_ALLOWED_REPOS",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.c}});Object.defineProperty(exports,"fetchRepoTree",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.g}});Object.defineProperty(exports,"findSkillMdPaths",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.k}});Object.defineProperty(exports,"getSkillFolderHashFromTree",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.i}});Object.defineProperty(exports,"resetRepoTreeAuthState",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.f}});Object.defineProperty(exports,"sanitizeMetadata",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.b}});Object.defineProperty(exports,"stripTerminalEscapes",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.a}});Object.defineProperty(exports,"toSkillSlug",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.e}});Object.defineProperty(exports,"tryBlobInstall",{enumerable:true,get:function(){return chunkDNE3XPCJ_cjs.l}});Object.defineProperty(exports,"computeFromDir",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.b}});Object.defineProperty(exports,"computeSnapshotHash",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.c}});Object.defineProperty(exports,"parseFrontmatter",{enumerable:true,get:function(){return chunkE7AHWFZN_cjs.a}});exports.createLocalPluginSource=A;exports.createWellKnownSource=x;exports.findProvider=ct;exports.findSource=k;exports.findSourcesByCategory=P;exports.getProviders=ut;exports.listAllEntries=y;exports.listSources=d;exports.registerProvider=at;exports.registerSource=f;exports.registry=u;
|
package/dist/index.d.cts
CHANGED
package/dist/index.d.ts
CHANGED
package/dist/index.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export{c as applyActions,d as buildMatrix,G as buildUsePrompt,f as detectAgent,h as getAgentName,i as getAgentType,M as handleSkillsCli,k as hasProjectSkills,o as initTelemetry,g as isRunningInAgent,J as launchAgentInteractively,m as matchesSkillFilter,H as materializeUseSkill,q as parseAddOptions,x as parseFindOptions,A as parseListOptions,D as parseRemoveOptions,r as parseStoreOptions,j as parseUpdateOptions,F as parseUseOptions,b as planActions,a as probeCell,C as removeCommand,K as renderBanner,L as renderHelp,l as resolveUpdateScope,p as runAdd,E as runDoctor,z as runFind,B as runList,e as runPostInstallReconcile,s as runStore,u as runStoreClean,t as runStoreList,w as runStoreRemove,v as runStoreUpdate,n as runUpdate,I as runUse,y as searchSkillsAPI}from'./chunks/chunk-
|
|
1
|
+
export{c as applyActions,d as buildMatrix,G as buildUsePrompt,f as detectAgent,h as getAgentName,i as getAgentType,M as handleSkillsCli,k as hasProjectSkills,o as initTelemetry,g as isRunningInAgent,J as launchAgentInteractively,m as matchesSkillFilter,H as materializeUseSkill,q as parseAddOptions,x as parseFindOptions,A as parseListOptions,D as parseRemoveOptions,r as parseStoreOptions,j as parseUpdateOptions,F as parseUseOptions,b as planActions,a as probeCell,C as removeCommand,K as renderBanner,L as renderHelp,l as resolveUpdateScope,p as runAdd,E as runDoctor,z as runFind,B as runList,e as runPostInstallReconcile,s as runStore,u as runStoreClean,t as runStoreList,w as runStoreRemove,v as runStoreUpdate,n as runUpdate,I as runUse,y as searchSkillsAPI}from'./chunks/chunk-HI5IN4UL.mjs';export{c as fetchAuditData,e as flushTelemetry,a as setDetectedAgent,b as setVersion,d as track}from'./chunks/chunk-CFMOYU7R.mjs';export{r as addSkillToLock,n as computeContentHash,y as dismissPrompt,q as fetchSkillFolderHash,u as getAllLockedSkills,p as getGitHubToken,t as getSkillFromLock,k as getSkillLockPath,v as getSkillsBySource,w as isPromptDismissed,l as readSkillLock,s as removeSkillFromLock,o as resetGhAuthWarning,m as writeSkillLock}from'./chunks/chunk-5DAHAO55.mjs';import'./chunks/chunk-BQ6QWQEM.mjs';export{a as AGENTS_DIR,b as SKILLS_SUBDIR,c as UNIVERSAL_SKILLS_DIR,g as getAgentBaseDir,o as getCanonicalPath,e as getCanonicalSkillsDir,f as getEveSubagentSkillsDir,m as getInstallPath,r as installBlobSkillForAgent,p as installRemoteSkillForAgent,h as installSkillForAgent,q as installWellKnownSkillForAgent,k as isSkillInstalled,s as listInstalledSkills,d as sanitizeName}from'./chunks/chunk-6OLPTZDO.mjs';import {n,A as A$1}from'./chunks/chunk-UUZB3HCD.mjs';export{f as DEFAULT_CLONE_TIMEOUT,g as GitCloneError,m as WellKnownProvider,Q as acquireSourceClone,v as addSkillToLocalLock,ja as cleanCache,ia as cleanCachedRepo,l as cleanupTempDir,k as cloneRepo,A as discoverSkills,ca as ensureCachedSource,C as filterSkills,P as getCacheRepoDir,N as getCacheRoot,r as getLocalLockPath,a as getOwnerRepo,B as getSkillDisplayName,I as getSourceDir,ha as installFromCache,i as isGitHubHttpsCloneUrl,j as isGitHubSsoAuthError,c as isRepoPrivate,z as isSubpathSafe,h as parseGitHubRepoUrl,b as parseOwnerRepo,y as parseSkillMd,e as parseSource,t as readLocalLock,w as removeSkillFromLocalLock,d as sanitizeSubpath,x as shouldInstallInternalSkills,n as wellKnownProvider,u as writeLocalLock}from'./chunks/chunk-UUZB3HCD.mjs';export{e as EVE_SUBAGENTS_DIR,j as PROJECT_SKILLS_DIR_PATTERN,b as agents,c as detectInstalledAgents,d as getAgentConfig,l as getAgentGlobalSkillDirs,n as getAgentProjectSkillContainerPrefixes,k as getAgentProjectSkillDirs,m as getAgentSkillDirs,f as getEveSubagents,i as getNonUniversalAgents,a as getOpenClawGlobalSkillsDir,h as getUniversalAgents,o as isUniversalAgent,g as matchesUniversalScope}from'./chunks/chunk-Y6D5Z6AU.mjs';export{h as getAgentAdapter,c as getGlobal,k as getHomeDir,f as getInstance,p as getProjectDirectory,o as getXdgCache,l as getXdgConfig,m as getXdgData,n as getXdgState,i as hasAgentAdapter,j as requireAgentAdapter,b as resetGlobalAdapter,e as resetInstanceAdapter,g as setAgentAdapter,a as setGlobalAdapter,d as setInstanceAdapter}from'./chunks/chunk-RWZ4LFSN.mjs';export{c as BLOB_ALLOWED_REPOS,g as fetchRepoTree,k as findSkillMdPaths,i as getSkillFolderHashFromTree,f as resetRepoTreeAuthState,b as sanitizeMetadata,a as stripTerminalEscapes,e as toSkillSlug,l as tryBlobInstall}from'./chunks/chunk-ZJS7IO5V.mjs';export{b as computeFromDir,c as computeSnapshotHash,a as parseFrontmatter}from'./chunks/chunk-ZYDDQV73.mjs';import {b}from'./chunks/chunk-WQGSYA5D.mjs';import {join}from'path';var d=class{constructor(){b(this,"providers",[]);}register(o){if(this.providers.some(t=>t.id===o.id))throw new Error(`Provider with id "${o.id}" already registered`);this.providers.push(o);}findProvider(o){for(let t of this.providers)if(t.match(o).matches)return t;return null}getProviders(){return [...this.providers]}},p=new d;function ct(e){p.register(e);}function ut(e){return p.findProvider(e)}function pt(){return p.getProviders()}var u=new Map;function k(e){if(u.has(e.id))throw new Error(`PluginSource with id "${e.id}" already registered`);u.set(e.id,e);}function S(){return Array.from(u.values()).map(e=>e)}function P(e){return u.get(e)??null}function y(e){return Array.from(u.values()).filter(o=>o.category===e)}async function x(){let e=S();return await Promise.all(e.map(async t=>{try{let r=await t.fetch();return {sourceId:t.id,entries:r}}catch(r){return {sourceId:t.id,error:r instanceof Error?r:new Error(String(r))}}}))}function gt(e){return {name:e.name,description:e.description,scope:"all"}}function h(e){return {id:e.id??`well-known:${new URL(e.url).hostname}`,category:"well-known",async fetch(){return (await n.fetchAllSkills(e.url)).map(r=>({id:r.name,name:r.name,description:r.description,location:r.sourceUrl,category:"well-known",metadata:{installName:r.installName,sourceIdentifier:n.getSourceIdentifier(e.url),sourceUrl:r.sourceUrl}}))},async load(t){let l=(await n.fetchAllSkills(e.url)).find(n=>n.name===t.id);if(!l)throw new Error(`Skill "${t.id}" not found in well-known source ${e.url}`);return {skills:[gt(l)],version:"well-known",author:{name:new URL(e.url).hostname}}}}}async function A(e){try{let t=await(await import('fs/promises')).readFile(e,"utf-8");return JSON.parse(t)}catch{return null}}function w(e){let o=e.basePath.split(/[\\/]/).filter(Boolean).pop()??"local";return {id:e.id??`local:${o}`,category:"file",async fetch(){let r=[],l=await A(join(e.basePath,".claude-plugin/plugin.json"));l?.name&&r.push({id:l.name,name:l.name,description:l.description,location:e.basePath,category:"file",metadata:{skills:l.skills,manifest:"plugin.json"}});let n=await A(join(e.basePath,".claude-plugin/marketplace.json"));if(n?.plugins)for(let i of n.plugins)i.name&&(typeof i.source!="string"&&i.source!==void 0||r.push({id:i.name,name:i.name,description:i.description,location:i.source?join(e.basePath,n.metadata?.pluginRoot??"",i.source):e.basePath,category:"file",metadata:{skills:i.skills,manifest:"marketplace.json",pluginRoot:n.metadata?.pluginRoot}}));return r},async load(r){return {skills:(await A$1(r.location)).map(i=>({name:i.name,description:i.description,scope:"all"})),version:"local",author:{name:o}}}}}export{w as createLocalPluginSource,h as createWellKnownSource,ut as findProvider,P as findSource,y as findSourcesByCategory,pt as getProviders,x as listAllEntries,S as listSources,ct as registerProvider,k as registerSource,p as registry};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@easbot/skills",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.16",
|
|
4
4
|
"description": "Skills management system for EAS Agent ecosystem (add / remove / list / find / update / sync / use)",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.cjs",
|
|
@@ -51,19 +51,19 @@
|
|
|
51
51
|
"xdg-basedir": "^5.1.0",
|
|
52
52
|
"yaml": "^2.9.0",
|
|
53
53
|
"zod": "^4.4.3",
|
|
54
|
-
"@easbot/
|
|
55
|
-
"@easbot/
|
|
56
|
-
"@easbot/
|
|
57
|
-
"@easbot/
|
|
54
|
+
"@easbot/utils": "0.3.16",
|
|
55
|
+
"@easbot/types": "0.3.16",
|
|
56
|
+
"@easbot/terminal": "0.3.16",
|
|
57
|
+
"@easbot/mcp": "0.3.16"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
|
-
"@types/node": "^25.
|
|
60
|
+
"@types/node": "^25.9.5",
|
|
61
61
|
"tsup": "^8.5.1",
|
|
62
62
|
"typescript": "^6.0.3",
|
|
63
63
|
"vitest": "^4.1.5"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
|
-
"node": ">=22.22.
|
|
66
|
+
"node": ">=22.22.2"
|
|
67
67
|
},
|
|
68
68
|
"scripts": {
|
|
69
69
|
"dev": "tsup --watch --env.NODE_ENV development",
|