agent-skill-manager 1.16.0 → 1.17.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.backup.md
CHANGED
|
@@ -168,7 +168,7 @@ Need a tool not listed? Add a custom provider entry to the config.
|
|
|
168
168
|
Yes. `asm` is MIT licensed and free forever. No accounts, no telemetry, no paywalls.
|
|
169
169
|
|
|
170
170
|
**Is it actively maintained?**
|
|
171
|
-
v1.
|
|
171
|
+
v1.17.0 shipped on March 26, 2026. The project has had 26 releases. Check the [changelog](docs/CHANGELOG.md) for the full history.
|
|
172
172
|
|
|
173
173
|
**Which AI agents does it support?**
|
|
174
174
|
17 providers built-in: Claude Code, Codex, OpenClaw, Cursor, Windsurf, Cline, Roo Code, Continue, GitHub Copilot, Aider, OpenCode, Zed, Augment, Amp, Gemini CLI, Google Antigravity, and a generic Agents provider. The first 4 are enabled by default; enable the rest via `asm config edit`. You can also add any custom agent that stores skills as directories with a `SKILL.md` file.
|
package/README.md
CHANGED
|
@@ -360,7 +360,7 @@ Need a tool not listed? Add a custom provider entry to the config.
|
|
|
360
360
|
Yes. `asm` is MIT licensed and free forever. No accounts, no telemetry, no paywalls.
|
|
361
361
|
|
|
362
362
|
**Is it actively maintained?**
|
|
363
|
-
v1.
|
|
363
|
+
v1.17.0 shipped on March 26, 2026. The project has had 26 releases. Check the [changelog](docs/CHANGELOG.md) for the full history.
|
|
364
364
|
|
|
365
365
|
**Which AI agents does it support?**
|
|
366
366
|
17 providers built-in: Claude Code, Codex, OpenClaw, Cursor, Windsurf, Cline, Roo Code, Continue, GitHub Copilot, Aider, OpenCode, Zed, Augment, Amp, Gemini CLI, Google Antigravity, and a generic Agents provider. All 17 are enabled by default; disable any you don't need via `asm config edit`. You can also add any custom agent that stores skills as directories with a `SKILL.md` file.
|
|
@@ -974,6 +974,27 @@ agent-skill-manager/
|
|
|
974
974
|
|
|
975
975
|
---
|
|
976
976
|
|
|
977
|
+
<!-- NOTE: The single source of truth for acknowledgements data is website/data/acknowledgements.json.
|
|
978
|
+
When updating contributors or dependencies, edit that JSON file first, then sync this section and website/index.html. -->
|
|
979
|
+
|
|
980
|
+
## Acknowledgements
|
|
981
|
+
|
|
982
|
+
### Contributors
|
|
983
|
+
|
|
984
|
+
| Contributor | PRs |
|
|
985
|
+
| ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------- |
|
|
986
|
+
| [@luongnv89](https://github.com/luongnv89) | [38 merged PRs](https://github.com/luongnv89/agent-skill-manager/pulls?q=is%3Apr+is%3Amerged+author%3Aluongnv89) |
|
|
987
|
+
| [@Mordris](https://github.com/Mordris) | [#111](https://github.com/luongnv89/agent-skill-manager/pull/111) |
|
|
988
|
+
|
|
989
|
+
### Dependencies
|
|
990
|
+
|
|
991
|
+
| Library | Description |
|
|
992
|
+
| ----------------------------------------------------- | -------------------------------------------------------------------------------------------------- |
|
|
993
|
+
| [@opentui/core](https://github.com/anomalyco/opentui) | TypeScript library on a native Zig core for building terminal user interfaces — powers the asm TUI |
|
|
994
|
+
| [yaml](https://github.com/eemeli/yaml) | JavaScript parser and stringifier for YAML — used to parse SKILL.md frontmatter |
|
|
995
|
+
|
|
996
|
+
---
|
|
997
|
+
|
|
977
998
|
## Roadmap
|
|
978
999
|
|
|
979
1000
|
Track our progress and upcoming features on the [project kanban board](https://github.com/users/luongnv89/projects/6). See [prd.md](prd.md) for the full product requirements and [tasks.md](tasks.md) for the sprint-based development plan.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import{B as z5,C as G5,D as v2,E as J5,a as L0,b as R0,c as n2,e as p,f as i4,g as x2,h as s4,i as o4,j as h2,k as r4,l as H,m as t4,n as R4,o as e4,p as g2,q as q5,r as $5,s as Z5,v as X5,w as Q5,x as d,y as k2,z as U5}from"./chunk-
|
|
2
|
+
import{B as z5,C as G5,D as v2,E as J5,a as L0,b as R0,c as n2,e as p,f as i4,g as x2,h as s4,i as o4,j as h2,k as r4,l as H,m as t4,n as R4,o as e4,p as g2,q as q5,r as $5,s as Z5,v as X5,w as Q5,x as d,y as k2,z as U5}from"./chunk-75kgtp8z.js";import{F as m,G as A,H as k,I as l4,J as S,K as a4,L as y2,M as S2,N as Vq,O as k4,P as x0,Q as v,R as n4}from"./chunk-t6myftbf.js";var y=A((a5)=>{var T$=Symbol.for("yaml.alias"),$1=Symbol.for("yaml.document"),Fq=Symbol.for("yaml.map"),Z1=Symbol.for("yaml.pair"),F$=Symbol.for("yaml.scalar"),Kq=Symbol.for("yaml.seq"),t=Symbol.for("yaml.node.type"),v5=(q)=>!!q&&typeof q==="object"&&q[t]===T$,u5=(q)=>!!q&&typeof q==="object"&&q[t]===$1,m5=(q)=>!!q&&typeof q==="object"&&q[t]===Fq,p5=(q)=>!!q&&typeof q==="object"&&q[t]===Z1,X1=(q)=>!!q&&typeof q==="object"&&q[t]===F$,d5=(q)=>!!q&&typeof q==="object"&&q[t]===Kq;function Q1(q){if(q&&typeof q==="object")switch(q[t]){case Fq:case Kq:return!0}return!1}function c5(q){if(q&&typeof q==="object")switch(q[t]){case T$:case Fq:case F$:case Kq:return!0}return!1}var l5=(q)=>(X1(q)||Q1(q))&&!!q.anchor;a5.ALIAS=T$;a5.DOC=$1;a5.MAP=Fq;a5.NODE_TYPE=t;a5.PAIR=Z1;a5.SCALAR=F$;a5.SEQ=Kq;a5.hasAnchor=l5;a5.isAlias=v5;a5.isCollection=Q1;a5.isDocument=u5;a5.isMap=m5;a5.isNode=c5;a5.isPair=p5;a5.isScalar=X1;a5.isSeq=d5});var m0=A((Y8)=>{var g=y(),u=Symbol("break visit"),U1=Symbol("skip children"),s=Symbol("remove node");function Lq(q,$){let Z=z1($);if(g.isDocument(q)){if(A0(null,q.contents,Z,Object.freeze([q]))===s)q.contents=null}else A0(null,q,Z,Object.freeze([]))}Lq.BREAK=u;Lq.SKIP=U1;Lq.REMOVE=s;function A0(q,$,Z,X){let Q=G1(q,$,Z,X);if(g.isNode(Q)||g.isPair(Q))return J1(q,X,Q),A0(q,Q,Z,X);if(typeof Q!=="symbol"){if(g.isCollection($)){X=Object.freeze(X.concat($));for(let U=0;U<$.items.length;++U){let z=A0(U,$.items[U],Z,X);if(typeof z==="number")U=z-1;else if(z===u)return u;else if(z===s)$.items.splice(U,1),U-=1}}else if(g.isPair($)){X=Object.freeze(X.concat($));let U=A0("key",$.key,Z,X);if(U===u)return u;else if(U===s)$.key=null;let z=A0("value",$.value,Z,X);if(z===u)return u;else if(z===s)$.value=null}}return Q}async function Rq(q,$){let Z=z1($);if(g.isDocument(q)){if(await I0(null,q.contents,Z,Object.freeze([q]))===s)q.contents=null}else await I0(null,q,Z,Object.freeze([]))}Rq.BREAK=u;Rq.SKIP=U1;Rq.REMOVE=s;async function I0(q,$,Z,X){let Q=await G1(q,$,Z,X);if(g.isNode(Q)||g.isPair(Q))return J1(q,X,Q),I0(q,Q,Z,X);if(typeof Q!=="symbol"){if(g.isCollection($)){X=Object.freeze(X.concat($));for(let U=0;U<$.items.length;++U){let z=await I0(U,$.items[U],Z,X);if(typeof z==="number")U=z-1;else if(z===u)return u;else if(z===s)$.items.splice(U,1),U-=1}}else if(g.isPair($)){X=Object.freeze(X.concat($));let U=await I0("key",$.key,Z,X);if(U===u)return u;else if(U===s)$.key=null;let z=await I0("value",$.value,Z,X);if(z===u)return u;else if(z===s)$.value=null}}return Q}function z1(q){if(typeof q==="object"&&(q.Collection||q.Node||q.Value))return Object.assign({Alias:q.Node,Map:q.Node,Scalar:q.Node,Seq:q.Node},q.Value&&{Map:q.Value,Scalar:q.Value,Seq:q.Value},q.Collection&&{Map:q.Collection,Seq:q.Collection},q);return q}function G1(q,$,Z,X){if(typeof Z==="function")return Z(q,$,X);if(g.isMap($))return Z.Map?.(q,$,X);if(g.isSeq($))return Z.Seq?.(q,$,X);if(g.isPair($))return Z.Pair?.(q,$,X);if(g.isScalar($))return Z.Scalar?.(q,$,X);if(g.isAlias($))return Z.Alias?.(q,$,X);return}function J1(q,$,Z){let X=$[$.length-1];if(g.isCollection(X))X.items[q]=Z;else if(g.isPair(X))if(q==="key")X.key=Z;else X.value=Z;else if(g.isDocument(X))X.contents=Z;else{let Q=g.isAlias(X)?"alias":"scalar";throw Error(`Cannot replace node with ${Q} parent`)}}Y8.visit=Lq;Y8.visitAsync=Rq});var K$=A((O8)=>{var Y1=y(),W8=m0(),B8={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"},_8=(q)=>q.replace(/[!,[\]{}]/g,($)=>B8[$]);class c{constructor(q,$){this.docStart=null,this.docEnd=!1,this.yaml=Object.assign({},c.defaultYaml,q),this.tags=Object.assign({},c.defaultTags,$)}clone(){let q=new c(this.yaml,this.tags);return q.docStart=this.docStart,q}atDocument(){let q=new c(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=!0;break;case"1.2":this.atNextDocument=!1,this.yaml={explicit:c.defaultYaml.explicit,version:"1.2"},this.tags=Object.assign({},c.defaultTags);break}return q}add(q,$){if(this.atNextDocument)this.yaml={explicit:c.defaultYaml.explicit,version:"1.1"},this.tags=Object.assign({},c.defaultTags),this.atNextDocument=!1;let Z=q.trim().split(/[ \t]+/),X=Z.shift();switch(X){case"%TAG":{if(Z.length!==2){if($(0,"%TAG directive should contain exactly two parts"),Z.length<2)return!1}let[Q,U]=Z;return this.tags[Q]=U,!0}case"%YAML":{if(this.yaml.explicit=!0,Z.length!==1)return $(0,"%YAML directive should contain exactly one part"),!1;let[Q]=Z;if(Q==="1.1"||Q==="1.2")return this.yaml.version=Q,!0;else{let U=/^\d+\.\d+$/.test(Q);return $(6,`Unsupported YAML version ${Q}`,U),!1}}default:return $(0,`Unknown directive ${X}`,!0),!1}}tagName(q,$){if(q==="!")return"!";if(q[0]!=="!")return $(`Not a valid tag: ${q}`),null;if(q[1]==="<"){let U=q.slice(2,-1);if(U==="!"||U==="!!")return $(`Verbatim tags aren't resolved, so ${q} is invalid.`),null;if(q[q.length-1]!==">")$("Verbatim tags must end with a >");return U}let[,Z,X]=q.match(/^(.*!)([^!]*)$/s);if(!X)$(`The ${q} tag has no suffix`);let Q=this.tags[Z];if(Q)try{return Q+decodeURIComponent(X)}catch(U){return $(String(U)),null}if(Z==="!")return q;return $(`Could not resolve tag: ${q}`),null}tagString(q){for(let[$,Z]of Object.entries(this.tags))if(q.startsWith(Z))return $+_8(q.substring(Z.length));return q[0]==="!"?q:`!<${q}>`}toString(q){let $=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[],Z=Object.entries(this.tags),X;if(q&&Z.length>0&&Y1.isNode(q.contents)){let Q={};W8.visit(q.contents,(U,z)=>{if(Y1.isNode(z)&&z.tag)Q[z.tag]=!0}),X=Object.keys(Q)}else X=[];for(let[Q,U]of Z){if(Q==="!!"&&U==="tag:yaml.org,2002:")continue;if(!q||X.some((z)=>z.startsWith(U)))$.push(`%TAG ${Q} ${U}`)}return $.join(`
|
|
3
3
|
`)}}c.defaultYaml={explicit:!1,version:"1.2"};c.defaultTags={"!!":"tag:yaml.org,2002:"};O8.Directives=c});var Mq=A((R8)=>{var H1=y(),F8=m0();function K8(q){if(/[\x00-\x19\s,[\]{}]/.test(q)){let Z=`Anchor must not contain whitespace or control characters: ${JSON.stringify(q)}`;throw Error(Z)}return!0}function V1(q){let $=new Set;return F8.visit(q,{Value(Z,X){if(X.anchor)$.add(X.anchor)}}),$}function W1(q,$){for(let Z=1;;++Z){let X=`${q}${Z}`;if(!$.has(X))return X}}function L8(q,$){let Z=[],X=new Map,Q=null;return{onAnchor:(U)=>{Z.push(U),Q??(Q=V1(q));let z=W1($,Q);return Q.add(z),z},setAnchors:()=>{for(let U of Z){let z=X.get(U);if(typeof z==="object"&&z.anchor&&(H1.isScalar(z.node)||H1.isCollection(z.node)))z.node.anchor=z.anchor;else{let G=Error("Failed to resolve repeated object (this should not happen)");throw G.source=U,G}}},sourceObjects:X}}R8.anchorIsValid=K8;R8.anchorNames=V1;R8.createNodeAnchors=L8;R8.findNewAnchor=W1});var L$=A((w8)=>{function p0(q,$,Z,X){if(X&&typeof X==="object")if(Array.isArray(X))for(let Q=0,U=X.length;Q<U;++Q){let z=X[Q],G=p0(q,X,String(Q),z);if(G===void 0)delete X[Q];else if(G!==z)X[Q]=G}else if(X instanceof Map)for(let Q of Array.from(X.keys())){let U=X.get(Q),z=p0(q,X,Q,U);if(z===void 0)X.delete(Q);else if(z!==U)X.set(Q,z)}else if(X instanceof Set)for(let Q of Array.from(X)){let U=p0(q,X,Q,Q);if(U===void 0)X.delete(Q);else if(U!==Q)X.delete(Q),X.add(U)}else for(let[Q,U]of Object.entries(X)){let z=p0(q,X,Q,U);if(z===void 0)delete X[Q];else if(z!==U)X[Q]=z}return q.call($,Z,X)}w8.applyReviver=p0});var $0=A((P8)=>{var j8=y();function B1(q,$,Z){if(Array.isArray(q))return q.map((X,Q)=>B1(X,String(Q),Z));if(q&&typeof q.toJSON==="function"){if(!Z||!j8.hasAnchor(q))return q.toJSON($,Z);let X={aliasCount:0,count:1,res:void 0};Z.anchors.set(q,X),Z.onCreate=(U)=>{X.res=U,delete Z.onCreate};let Q=q.toJSON($,Z);if(Z.onCreate)Z.onCreate(Q);return Q}if(typeof q==="bigint"&&!Z?.keep)return Number(q);return q}P8.toJS=B1});var Aq=A((E8)=>{var b8=L$(),_1=y(),S8=$0();class O1{constructor(q){Object.defineProperty(this,_1.NODE_TYPE,{value:q})}clone(){let q=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)q.range=this.range.slice();return q}toJS(q,{mapAsMap:$,maxAliasCount:Z,onAnchor:X,reviver:Q}={}){if(!_1.isDocument(q))throw TypeError("A document argument is required");let U={anchors:new Map,doc:q,keep:!0,mapAsMap:$===!0,mapKeyWarned:!1,maxAliasCount:typeof Z==="number"?Z:100},z=S8.toJS(this,"",U);if(typeof X==="function")for(let{count:G,res:J}of U.anchors.values())X(J,G);return typeof Q==="function"?b8.applyReviver(Q,{"":z},"",z):z}}E8.NodeBase=O1});var d0=A((k8)=>{var y8=Mq(),x8=m0(),D0=y(),h8=Aq(),g8=$0();class T1 extends h8.NodeBase{constructor(q){super(D0.ALIAS);this.source=q,Object.defineProperty(this,"tag",{set(){throw Error("Alias nodes cannot have tags")}})}resolve(q,$){let Z;if($?.aliasResolveCache)Z=$.aliasResolveCache;else if(Z=[],x8.visit(q,{Node:(Q,U)=>{if(D0.isAlias(U)||D0.hasAnchor(U))Z.push(U)}}),$)$.aliasResolveCache=Z;let X=void 0;for(let Q of Z){if(Q===this)break;if(Q.anchor===this.source)X=Q}return X}toJSON(q,$){if(!$)return{source:this.source};let{anchors:Z,doc:X,maxAliasCount:Q}=$,U=this.resolve(X,$);if(!U){let G=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw ReferenceError(G)}let z=Z.get(U);if(!z)g8.toJS(U,null,$),z=Z.get(U);if(z?.res===void 0)throw ReferenceError("This should not happen: Alias anchor was not resolved?");if(Q>=0){if(z.count+=1,z.aliasCount===0)z.aliasCount=Iq(X,U,Z);if(z.count*z.aliasCount>Q)throw ReferenceError("Excessive alias count indicates a resource exhaustion attack")}return z.res}toString(q,$,Z){let X=`*${this.source}`;if(q){if(y8.anchorIsValid(this.source),q.options.verifyAliasOrder&&!q.anchors.has(this.source)){let Q=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw Error(Q)}if(q.implicitKey)return`${X} `}return X}}function Iq(q,$,Z){if(D0.isAlias($)){let X=$.resolve(q),Q=Z&&X&&Z.get(X);return Q?Q.count*Q.aliasCount:0}else if(D0.isCollection($)){let X=0;for(let Q of $.items){let U=Iq(q,Q,Z);if(U>X)X=U}return X}else if(D0.isPair($)){let X=Iq(q,$.key,Z),Q=Iq(q,$.value,Z);return Math.max(X,Q)}return 1}k8.Alias=T1});var x=A((c8)=>{var u8=y(),m8=Aq(),p8=$0(),d8=(q)=>!q||typeof q!=="function"&&typeof q!=="object";class H0 extends m8.NodeBase{constructor(q){super(u8.SCALAR);this.value=q}toJSON(q,$){return $?.keep?this.value:p8.toJS(this.value,q,$)}toString(){return String(this.value)}}H0.BLOCK_FOLDED="BLOCK_FOLDED";H0.BLOCK_LITERAL="BLOCK_LITERAL";H0.PLAIN="PLAIN";H0.QUOTE_DOUBLE="QUOTE_DOUBLE";H0.QUOTE_SINGLE="QUOTE_SINGLE";c8.Scalar=H0;c8.isScalarValue=d8});var c0=A((r8)=>{var n8=d0(),V0=y(),F1=x(),i8="tag:yaml.org,2002:";function s8(q,$,Z){if($){let X=Z.filter((U)=>U.tag===$),Q=X.find((U)=>!U.format)??X[0];if(!Q)throw Error(`Tag ${$} not found`);return Q}return Z.find((X)=>X.identify?.(q)&&!X.format)}function o8(q,$,Z){if(V0.isDocument(q))q=q.contents;if(V0.isNode(q))return q;if(V0.isPair(q)){let V=Z.schema[V0.MAP].createNode?.(Z.schema,null,Z);return V.items.push(q),V}if(q instanceof String||q instanceof Number||q instanceof Boolean||typeof BigInt<"u"&&q instanceof BigInt)q=q.valueOf();let{aliasDuplicateObjects:X,onAnchor:Q,onTagObj:U,schema:z,sourceObjects:G}=Z,J=void 0;if(X&&q&&typeof q==="object")if(J=G.get(q),J)return J.anchor??(J.anchor=Q(q)),new n8.Alias(J.anchor);else J={anchor:null,node:null},G.set(q,J);if($?.startsWith("!!"))$=i8+$.slice(2);let Y=s8(q,$,z.tags);if(!Y){if(q&&typeof q.toJSON==="function")q=q.toJSON();if(!q||typeof q!=="object"){let V=new F1.Scalar(q);if(J)J.node=V;return V}Y=q instanceof Map?z[V0.MAP]:(Symbol.iterator in Object(q))?z[V0.SEQ]:z[V0.MAP]}if(U)U(Y),delete Z.onTagObj;let B=Y?.createNode?Y.createNode(Z.schema,q,Z):typeof Y?.nodeClass?.from==="function"?Y.nodeClass.from(Z.schema,q,Z):new F1.Scalar(q);if($)B.tag=$;else if(!Y.default)B.tag=Y.tag;if(J)J.node=B;return B}r8.createNode=o8});var Dq=A(($Z)=>{var e8=c0(),o=y(),qZ=Aq();function R$(q,$,Z){let X=Z;for(let Q=$.length-1;Q>=0;--Q){let U=$[Q];if(typeof U==="number"&&Number.isInteger(U)&&U>=0){let z=[];z[U]=X,X=z}else X=new Map([[U,X]])}return e8.createNode(X,void 0,{aliasDuplicateObjects:!1,keepUndefined:!1,onAnchor:()=>{throw Error("This should not happen, please report a bug.")},schema:q,sourceObjects:new Map})}var K1=(q)=>q==null||typeof q==="object"&&!!q[Symbol.iterator]().next().done;class L1 extends qZ.NodeBase{constructor(q,$){super(q);Object.defineProperty(this,"schema",{value:$,configurable:!0,enumerable:!1,writable:!0})}clone(q){let $=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(q)$.schema=q;if($.items=$.items.map((Z)=>o.isNode(Z)||o.isPair(Z)?Z.clone(q):Z),this.range)$.range=this.range.slice();return $}addIn(q,$){if(K1(q))this.add($);else{let[Z,...X]=q,Q=this.get(Z,!0);if(o.isCollection(Q))Q.addIn(X,$);else if(Q===void 0&&this.schema)this.set(Z,R$(this.schema,X,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}}deleteIn(q){let[$,...Z]=q;if(Z.length===0)return this.delete($);let X=this.get($,!0);if(o.isCollection(X))return X.deleteIn(Z);else throw Error(`Expected YAML collection at ${$}. Remaining path: ${Z}`)}getIn(q,$){let[Z,...X]=q,Q=this.get(Z,!0);if(X.length===0)return!$&&o.isScalar(Q)?Q.value:Q;else return o.isCollection(Q)?Q.getIn(X,$):void 0}hasAllNullValues(q){return this.items.every(($)=>{if(!o.isPair($))return!1;let Z=$.value;return Z==null||q&&o.isScalar(Z)&&Z.value==null&&!Z.commentBefore&&!Z.comment&&!Z.tag})}hasIn(q){let[$,...Z]=q;if(Z.length===0)return this.has($);let X=this.get($,!0);return o.isCollection(X)?X.hasIn(Z):!1}setIn(q,$){let[Z,...X]=q;if(X.length===0)this.set(Z,$);else{let Q=this.get(Z,!0);if(o.isCollection(Q))Q.setIn(X,$);else if(Q===void 0&&this.schema)this.set(Z,R$(this.schema,X,$));else throw Error(`Expected YAML collection at ${Z}. Remaining path: ${X}`)}}}$Z.Collection=L1;$Z.collectionFromPath=R$;$Z.isEmptyPath=K1});var l0=A((GZ)=>{var UZ=(q)=>q.replace(/^(?!$)(?: $)?/gm,"#");function M$(q,$){if(/^\n+$/.test(q))return q.substring(1);return $?q.replace(/^(?! *$)/gm,$):q}var zZ=(q,$,Z)=>q.endsWith(`
|
|
4
4
|
`)?M$(Z,$):Z.includes(`
|
|
5
5
|
`)?`
|
|
@@ -149,9 +149,9 @@ Supported formats:
|
|
|
149
149
|
https://github.com/owner/repo/tree/branch/path/to/skill
|
|
150
150
|
/path/to/local/skill
|
|
151
151
|
./relative/path/to/skill`);let Z=q.slice(7),X=Z.indexOf("#"),Q,U=null,z=null;if(X!==-1){Q=Z.slice(0,X);let V=Z.slice(X+1);if(!V)throw Error("Invalid source: ref cannot be empty after #");let W=V.indexOf(":");if(W!==-1){if(U=V.slice(0,W),!U)throw Error("Invalid source: ref cannot be empty before :");z=V.slice(W+1)||null}else U=V}else{let V=Z.indexOf(":");if(V!==-1)Q=Z.slice(0,V),z=Z.slice(V+1)||null;else Q=Z}let G=Q.indexOf("/");if(G===-1)throw Error(`Invalid source: format must be github:owner/repo. Got: "${q}"`);let J=Q.slice(0,G),Y=Q.slice(G+1);if(!J)throw Error("Invalid source: owner cannot be empty");if(!Y)throw Error("Invalid source: repo cannot be empty");if(!b5.test(J))throw Error(`Invalid source: owner contains invalid characters: "${J}". Allowed: [a-zA-Z0-9_-]`);if(!S5.test(Y))throw Error(`Invalid source: repo contains invalid characters: "${Y}". Allowed: [a-zA-Z0-9._-]`);let B={owner:J,repo:Y,ref:U,subpath:z,cloneUrl:`https://github.com/${J}/${Y}.git`,sshCloneUrl:`git@github.com:${J}/${Y}.git`};return S(`install: parsed source -> owner=${J} repo=${Y} ref=${U} subpath=${z}`),B}async function _$(q){if(q.subpath!==null||!q.ref||!q.ref.includes("/"))return q;try{let{stdout:$}=await h0("git",["ls-remote","--heads","--tags",q.cloneUrl],{timeout:15000}),Z=new Set;for(let Q of $.split(`
|
|
152
|
-
`)){let U=Q.match(/\trefs\/(?:heads|tags)\/(.+)$/);if(U)Z.add(U[1])}let X=q.ref.split("/");for(let Q=1;Q<X.length;Q++){let U=X.slice(0,Q).join("/");if(Z.has(U)){let z=X.slice(Q).join("/");return S(`install: resolved ref="${U}" subpath="${z}"`),{...q,ref:U,subpath:z||null}}}}catch($){S(`install: ls-remote failed, treating entire ref as branch: ${$}`)}return q}function k0(q){if(!q)throw Error("Invalid skill name: name cannot be empty");if(q.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if(q.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if(q.includes("/")||q.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if(q.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if(q.length>a2)throw Error(`Invalid skill name: exceeds maximum length of ${a2} characters`);if(!E5.test(q))throw Error(`Invalid skill name: "${q}" does not match allowed pattern [a-zA-Z0-9][a-zA-Z0-9._-]*`);return q}function h5(q){let $=q.split(
|
|
152
|
+
`)){let U=Q.match(/\trefs\/(?:heads|tags)\/(.+)$/);if(U)Z.add(U[1])}let X=q.ref.split("/");for(let Q=1;Q<X.length;Q++){let U=X.slice(0,Q).join("/");if(Z.has(U)){let z=X.slice(Q).join("/");return S(`install: resolved ref="${U}" subpath="${z}"`),{...q,ref:U,subpath:z||null}}}}catch($){S(`install: ls-remote failed, treating entire ref as branch: ${$}`)}return q}function k0(q){if(!q)throw Error("Invalid skill name: name cannot be empty");if(q.includes("\x00"))throw Error("Invalid skill name: contains unsafe characters (null byte)");if(q.includes(".."))throw Error("Invalid skill name: contains unsafe characters (..)");if(q.includes("/")||q.includes("\\"))throw Error("Invalid skill name: contains unsafe characters (path separator)");if(q.startsWith("."))throw Error("Invalid skill name: must not start with a dot");if(q.length>a2)throw Error(`Invalid skill name: exceeds maximum length of ${a2} characters`);if(!E5.test(q))throw Error(`Invalid skill name: "${q}" does not match allowed pattern [a-zA-Z0-9][a-zA-Z0-9._-]*`);return q}function h5(q){let $=q.split(/[/\\]/).filter(Boolean),Z=$.length>0?$[$.length-1]:q;return k0(Z)}function i2(q){let $=new Map;for(let Z of q){let X=h5(Z),Q=$.get(X);if(Q)Q.push(Z);else $.set(X,[Z])}return[...$.entries()].filter(([,Z])=>Z.length>1).map(([Z,X])=>({name:Z,paths:X}))}async function v0(){try{await h0("git",["--version"]),S("install: git available")}catch{throw Error("git is required for installing skills. Install git from https://git-scm.com")}}function g5(q){if(q.killed)return!1;let $=(q.stderr||q.message||"").toLowerCase();return $.includes("authentication failed")||$.includes("could not read username")||$.includes("repository not found")||$.includes("returned error: 403")||$.includes("returned error: 401")||$.includes("terminal prompts disabled")||$.includes("permission denied")}function Bq(q){return q.killed?"Clone timed out after 60 seconds":`Clone failed: ${q.stderr||q.message}`}async function W$(q,$,Z){let X=["clone","--depth","1"];if($)X.push("--branch",$);return X.push(q,Z),await h0("git",X,{timeout:60000}),Z}async function u0(q,$="auto"){S(`install: cloning ${q.owner}/${q.repo}${q.ref?` (ref: ${q.ref})`:""} (transport: ${$})`);let Z=await m2(r(l2(),"asm-install-"));if($==="ssh"||$==="https"){let X=$==="ssh"?q.sshCloneUrl:q.cloneUrl;try{return await W$(X,q.ref,Z)}catch(Q){throw await i(Z),Error(Bq(Q))}}try{return await W$(q.cloneUrl,q.ref,Z)}catch(X){if(!g5(X))throw await i(Z),Error(Bq(X));S("install: HTTPS clone failed with auth error, retrying with SSH..."),await i(Z);let Q=await m2(r(l2(),"asm-install-"));try{return await W$(q.sshCloneUrl,q.ref,Q)}catch(U){throw await i(Q),Error(`Clone failed with both transports:
|
|
153
153
|
HTTPS: ${Bq(X)}
|
|
154
|
-
SSH: ${Bq(U)}`)}}}async function M0(q){let $=r(q,"SKILL.md"),Z;try{Z=await B$($,"utf-8")}catch{throw Error("Not a valid skill: SKILL.md not found in repository root")}let X=L0(Z),Q=q.split(
|
|
154
|
+
SSH: ${Bq(U)}`)}}}async function M0(q){let $=r(q,"SKILL.md"),Z;try{Z=await B$($,"utf-8")}catch{throw Error("Not a valid skill: SKILL.md not found in repository root")}let X=L0(Z),Q=q.split(/[/\\]/).pop()||"unknown",U=X.name||Q,z=R0(X);return S(`install: validated skill "${U}" v${z}`),{name:U,version:z,description:(X.description||"").replace(/\s*\n\s*/g," ").trim(),effort:X.effort||X["metadata.effort"]||void 0}}async function Oq(q,$=3){let Z=[];async function X(Q,U,z){let G;try{G=await A5(Q)}catch{return}for(let J of G){if(J===".git"||J==="node_modules")continue;let Y=r(Q,J);try{if(!(await D5(Y)).isDirectory())continue}catch{continue}let B=U?`${U}/${J}`:J,V=z+1,W=r(Y,"SKILL.md");try{let O=await B$(W,"utf-8"),F=L0(O);Z.push({relPath:B,name:F.name||J,version:R0(F),description:(F.description||"").replace(/\s*\n\s*/g," ").trim(),effort:F.effort||F["metadata.effort"]||void 0,license:(F.license||"").trim(),creator:(F["metadata.creator"]||"").trim(),compatibility:(F.compatibility||"").trim(),allowedTools:n2(F)})}catch{if(V<$)await X(Y,B,V)}}}return await X(q,"",0),Z.sort((Q,U)=>Q.name.localeCompare(U.name)),Z}var k5=[{category:"Shell commands",pattern:/\b(bash|sh\s+-c)\b/},{category:"Shell commands",pattern:/\bexec\(/},{category:"Shell commands",pattern:/\bchild_process\b/},{category:"Shell commands",pattern:/\bBun\.spawn\b/},{category:"Code execution",pattern:/\beval\(/},{category:"Code execution",pattern:/\bFunction\(/},{category:"Code execution",pattern:/\bnew\s+Function\b/},{category:"Credentials",pattern:/\b(API_KEY|SECRET|TOKEN|PASSWORD)\s*[=:]/},{category:"External URLs",pattern:/https?:\/\//}];async function s2(q){let $=[],Z=await Wq(q);for(let{relPath:X,content:Q}of Z){let U=Q.split(`
|
|
155
155
|
`);for(let z=0;z<U.length;z++)for(let{category:G,pattern:J}of k5)if(J.test(U[z])){let Y=U[z].trim();$.push({category:G,file:X,line:z+1,match:Y.length>100?Y.slice(0,100)+"…":Y})}}return $}async function O$(q){let $=q.source.isLocal?`local:${q.source.localPath}`:`github:${q.source.owner}/${q.source.repo}${q.source.ref?`#${q.source.ref}`:""}${q.source.subpath?`:${q.source.subpath}`:""}`;if(q.force)try{await p2(q.targetDir),await _q(q.targetDir,{recursive:!0,force:!0})}catch{}let Z=q.sourceDir;try{await I5(Z,q.targetDir,{recursive:!0})}catch(G){throw Error(`Failed to install: ${G.message}`)}let X=r(q.targetDir,".git");try{await _q(X,{recursive:!0,force:!0})}catch{}S(`install: copied files to ${q.targetDir}`);let Q=r(q.targetDir,"SKILL.md");try{await p2(Q)}catch{throw Error("Installation verification failed: SKILL.md not found at target")}let U=await B$(Q,"utf-8"),z=L0(U);return{success:!0,path:q.targetDir,name:z.name||q.skillName,version:R0(z),provider:q.providerLabel,source:$}}async function o2(q,$){let Z=await O$(q);for(let X of $){if(X.name===q.providerName)continue;let Q=q.scope==="project"?X.project:X.global,U=x0(Q),z=r(U,q.skillName);await j5(U,{recursive:!0});try{if((await w5(z)).isSymbolicLink())await _q(z);else{S(`install: skipping ${z} — existing non-symlink directory`);continue}}catch{}let G=P5(U,q.targetDir);await N5(G,z,"dir"),S(`install: symlinked ${z} -> ${G}`)}return Z.provider=`All (${$.map((X)=>X.label).join(", ")})`,Z}async function i(q){try{await _q(q,{recursive:!0,force:!0})}catch{}}async function r2(){try{await h0("npx",["--version"]),S("install: npx available")}catch{throw Error("npx is required for Vercel method installation. Install Node.js from https://nodejs.org")}}async function t2(q,$){let Z=["--yes","skills","add",q];if($)Z.push("--skill",$);S(`install: running npx ${Z.join(" ")}`);try{let X=await h0("npx",Z,{timeout:120000});return{stdout:X.stdout,stderr:X.stderr}}catch(X){let Q=X.stderr||X.message||"";throw Error(`npx skills add failed: ${Q}`)}}function e2(q){if(q.isLocal)return q.localPath;let $=`https://github.com/${q.owner}/${q.repo}`;if(q.ref)return`${$}/tree/${q.ref}${q.subpath?`/${q.subpath}`:""}`;return $}async function Tq(q,$,Z){let X=q.providers.filter((J)=>J.enabled);if($==="all"){if(X.length===0)throw Error("No providers are enabled. Enable a provider in your config.");return{provider:X.find((Y)=>Y.name==="agents")||X[0],allProviders:X}}if($){let J=q.providers.find((Y)=>Y.name===$);if(!J){let Y=q.providers.map((B)=>B.name).join(", ");throw Error(`Unknown provider: "${$}". Valid providers: ${Y}, all`)}if(!J.enabled)throw Error(`Provider "${$}" is disabled. Enable it in your config or choose another provider.`);return{provider:J,allProviders:null}}if(X.length===1)return{provider:X[0],allProviders:null};if(!Z){if(X.length===0)throw Error("No providers are enabled. Enable a provider in your config.");let J=X.map((Y)=>Y.name).join(", ");throw Error(`--tool (or --provider) is required in non-interactive mode. Available: ${J}, all`)}let Q=q.providers.map((J)=>({label:`${J.label} (${J.name})`,hint:J.global,checked:J.name==="agents"})),U=await y0({items:Q});if(U.length===0)throw Error("No tools selected. Aborting.");let z=U.map((J)=>q.providers[J]);if(z.length===1)return{provider:z[0],allProviders:null};return{provider:z.find((J)=>J.name==="agents")||z[0],allProviders:z}}function q1(q,$,Z,X,Q,U,z="global"){let G=z==="project"?Q.project:Q.global,J=x0(G),Y=r(J,X);return{source:q,tempDir:$,sourceDir:Z,targetDir:Y,skillName:X,force:U,providerName:Q.name,providerLabel:Q.label,scope:z}}import{readFile as yz}from"fs/promises";import{join as xz}from"path";var oU=_2(),rU=Qq(),tU=t$(),N2=Uq(),eU=d0(),Y0=y(),qz=Q0(),$z=x(),Zz=z0(),Xz=G0(),zH=q$(),Qz=I2(),Uz=D2(),zz=w2(),X$=G4(),J4=m0();var Gz=oU.Composer,Jz=rU.Document,Yz=tU.Schema,Hz=N2.YAMLError,Vz=N2.YAMLParseError,Wz=N2.YAMLWarning,Bz=eU.Alias,_z=Y0.isAlias,Oz=Y0.isCollection,Tz=Y0.isDocument,Fz=Y0.isMap,Kz=Y0.isNode,Lz=Y0.isPair,Rz=Y0.isScalar,Mz=Y0.isSeq,Az=qz.Pair,Iz=$z.Scalar,Dz=Zz.YAMLMap,wz=Xz.YAMLSeq;var Nz=Qz.Lexer,jz=Uz.LineCounter,Pz=zz.Parser,j2=X$.parse,Cz=X$.parseAllDocuments,bz=X$.parseDocument,Sz=X$.stringify,Ez=J4.visit,fz=J4.visitAsync;var Y4=500;function hz(q){let $=q.split(`
|
|
156
156
|
`),Z=!1,X=!1;for(let Q of $){if(Q.trim()==="---")if(!Z){Z=!0;continue}else{X=!0;continue}if(X&&Q.trim().length>0)return!0}return!1}function gz(q){let $=q.split(`
|
|
157
157
|
`),Z=-1;for(let X=0;X<$.length;X++)if($[X].trim()==="---")if(Z===-1)Z=X+1;else return $.slice(Z,X).join(`
|
|
@@ -404,7 +404,7 @@ ${H.bold("Subfolder URL:")}
|
|
|
404
404
|
${H.bold("Vercel skills CLI:")}
|
|
405
405
|
asm install github:user/skills --method vercel --skill my-skill
|
|
406
406
|
asm install https://github.com/user/skills -m vercel --skill my-skill -y
|
|
407
|
-
${H.dim("Delegates to npx skills add for Vercel tracking, then registers in asm")}`)}async function YJ(q,$,Z,X,Q,U,z,G,J="global"){let Y=await M0(X),B=await s2(X),V=X===Z?null:X.split(
|
|
407
|
+
${H.dim("Delegates to npx skills add for Vercel tracking, then registers in asm")}`)}async function YJ(q,$,Z,X,Q,U,z,G,J="global"){let Y=await M0(X),B=await s2(X),V=X===Z?null:X.split(/[/\\]/).pop(),W=Q||V||$.repo,O=k0(W),F=G.find((N)=>N.name.toLowerCase()===Y.name.toLowerCase()&&N.provider===z.name),_,T=!!F;if(F)if(F.version===Y.version)_=q.flags.force?"REINSTALL":`UPDATE: ${F.version} (same version)`;else _=`UPDATE: ${F.version} → ${Y.version}`;else _="NEW";let L=q1($,Z,X,O,z,q.flags.force||T,J),M=B.some((N)=>["Shell commands","Code execution","Credentials"].includes(N.category)),R=B.some((N)=>["External URLs"].includes(N.category)),D=M?"high":R?"medium":"safe",w=M?H.red("[!] High Risk"):R?H.yellow("[~] Medium Risk"):H.green("[ok] Safe");return{metadata:Y,skillName:O,warnings:B,installStatus:_,riskLevel:D,riskLabel:w,plan:L}}function HJ(q,$,Z,X,Q,U){let{metadata:z,warnings:G,installStatus:J,riskLabel:Y,plan:B}=q;if(Q&&U){let V=H.dim(`[${U.index}/${U.total}]`),W=J==="NEW"?H.green(`[${J}]`):H.yellow(`[${J}]`);console.info(`${V} ${H.bold(z.name)} v${z.version} ${W} ${Y}`)}else{let V=J==="NEW"?H.green(`[${J}]`):H.yellow(`[${J}]`);if(console.info(` ${H.bold(z.name)} v${z.version} ${V}`),console.info(`
|
|
408
408
|
${H.bold("Install preview:")}`),console.info(` ${H.bold("Name:")} ${z.name}`),console.info(` ${H.bold("Version:")} ${z.version}`),z.description)console.info(` ${H.bold("Description:")} ${H.dim(z.description)}`);if(z.effort)console.info(` ${H.bold("Effort:")} ${t4(z.effort)}`);if(console.info(` ${H.bold("Source:")} ${$}`),X)console.info(` ${H.bold("Tool:")} All (${X.map((W)=>W.label).join(", ")})`),console.info(` ${H.bold("Primary:")} ${Z.label} (${Z.name})`),console.info(` ${H.bold("Symlinks:")} ${X.filter((W)=>W.name!==Z.name).map((W)=>W.label).join(", ")}`);else console.info(` ${H.bold("Tool:")} ${Z.label} (${Z.name})`);if(console.info(` ${H.bold("Scope:")} ${B.scope==="project"?"Project":"Global"}`),console.info(` ${H.bold("Target:")} ${B.targetDir}`),console.info(` ${H.bold("Status:")} ${V}`),console.info(` ${H.bold("Risk:")} ${Y}`),G.length>0){console.info(`
|
|
409
409
|
${H.bold("Security warnings:")}`);let W=new Map;for(let O of G){let F=W.get(O.category)||[];F.push(O),W.set(O.category,F)}for(let[O,F]of W){let T=["Shell commands","Code execution","Credentials"].includes(O)?H.red(`[${O}]`):H.yellow(`[${O}]`);console.info(`
|
|
410
410
|
${T} ${H.dim(`(${F.length} match${F.length>1?"es":""})`)}`);for(let L of F.slice(0,5))console.info(` ${H.dim(`${L.file}:${L.line}`)} -- ${L.match}`);if(F.length>5)console.info(H.dim(` ... and ${F.length-5} more`))}}}}async function VJ(q,$){if($)return await o2(q,$);return await O$(q)}async function WJ(q){if(q.flags.help){JJ();return}let $=q.subcommand;if(!$)E("Missing required argument: <source>"),console.error('Run "asm install --help" for usage.'),process.exit(2);let Z=null,X=8,Q=0,U=(G)=>{return Q++,`
|
|
@@ -534,4 +534,4 @@ ${H.bold("Examples:")}
|
|
|
534
534
|
`));for(let Q of Z)console.error(`${H.cyan(`${Q.owner}/${Q.repo}`)} - ${Q.skillCount} skills ${H.dim(`(${new Date(Q.updatedAt).toLocaleDateString()})`)}`)}break}case"remove":{let Z=q.positional[0];if(!Z)E("Missing required argument: <owner/repo>"),console.error('Run "asm index --help" for usage.'),process.exit(2);let[X,Q]=Z.split("/");if(!X||!Q)E("Invalid format. Use: <owner/repo>"),process.exit(2);if(!q.flags.yes&&process.stdin.isTTY){process.stderr.write(`${H.bold("Remove")} ${H.cyan(`${X}/${Q}`)} ${H.bold("from index?")} [y/N] `);let z=await K0();if(z.toLowerCase()!=="y"&&z.toLowerCase()!=="yes")console.error("Aborted."),process.exit(0)}if(await c4(X,Q))console.error(H.green(`Removed ${X}/${Q} from index`));else E(`Repository not found in index: ${X}/${Q}`),process.exit(1);break}default:E(`Unknown subcommand: "${$}"`),console.error('Run "asm index --help" for usage.'),process.exit(2)}}async function H5(q){let $=cG(q);if($.flags.noColor)globalThis.__CLI_NO_COLOR=!0;if($.flags.verbose)l4(!0);if($.flags.version){console.log(`asm ${v2}`);return}if(!$.command&&$.flags.help){lG();return}if(!$.command)return;switch($.command){case"list":await tG($);break;case"search":await eG($);break;case"inspect":await qJ($);break;case"uninstall":await $J($);break;case"audit":await ZJ($);break;case"install":await WJ($);break;case"config":await GJ($);break;case"export":await _J($);break;case"import":await TJ($);break;case"init":await KJ($);break;case"stats":await RJ($);break;case"link":await AJ($);break;case"index":await DJ($);break;default:E(`Unknown command: "${$.command}"`),console.error('Run "asm --help" for usage.'),process.exit(2)}}function V5(q){let $=q.slice(2);if($.length===0)return!1;let Z=["list","search","inspect","uninstall","audit","config","install","export","import","init","stats","link","index"],X=$[0];if(Z.includes(X))return!0;if(X==="--help"||X==="-h")return!0;if(X==="--version"||X==="-v")return!0;if(X.startsWith("-")||X.length>0)return!0;return!1}if(V5(process.argv))await H5(process.argv);else if(!(typeof globalThis.Bun<"u")){let{spawn:$}=await import("child_process"),Z=$("bun",[process.argv[1],...process.argv.slice(2)],{stdio:"inherit"});Z.on("error",()=>{console.error(`The interactive TUI requires Bun (https://bun.sh).
|
|
535
535
|
Install it with: curl -fsSL https://bun.sh/install | bash
|
|
536
536
|
|
|
537
|
-
`+"CLI commands (list, search, inspect, etc.) work with Node.js — run: asm --help"),process.exit(1)}),Z.on("exit",(X)=>process.exit(X??0))}else await import("./chunk-
|
|
537
|
+
`+"CLI commands (list, search, inspect, etc.) work with Node.js — run: asm --help"),process.exit(1)}),Z.on("exit",(X)=>process.exit(X??0))}else await import("./chunk-n7f2ekqj.js");
|
|
@@ -10,5 +10,5 @@ import{J as V,P as K}from"./chunk-t6myftbf.js";import{readdir as a,stat as J$,ls
|
|
|
10
10
|
`)}var $$=new Set(["Bash","Write","Edit","NotebookEdit"]),P$=new Set(["WebFetch","WebSearch"]);function c$($){if($$.has($))return Z.red($);if(P$.has($))return Z.yellow($);return Z.green($)}function L$($){if($.length===0)return"";return $.map(c$).join(" ")}function S$($){let L=$.filter((S)=>$$.has(S));if(L.length===0)return null;let j=[];if(L.includes("Bash"))j.push("execute shell commands");if(L.includes("Write")||L.includes("Edit")||L.includes("NotebookEdit"))j.push("modify files");return`This skill can ${j.join(" and ")}`}async function w$($){let L=[],j=(A,z)=>`${N()?Z.bold(A+":"):A+":"} ${z}`;if(L.push(j("Name",$.name)),L.push(j("Version",$.version)),L.push(j("Creator",$.creator||"—")),L.push(j("License",$.license||"—")),$.compatibility)L.push(j("Compatibility",$.compatibility));if($.effort)L.push(j("Effort",R($.effort)));if(L.push(j("Tool",$.providerLabel)),L.push(j("Scope",$.scope)),L.push(j("Location",$.location)),L.push(j("Path",q($.path))),L.push(j("Type",$.isSymlink?"symlink":"directory")),$.isSymlink&&$.symlinkTarget)L.push(j("Symlink Target",$.symlinkTarget));let S=$.fileCount??await g($.path);if(L.push(j("File Count",String(S))),$.description)L.push(""),L.push(j("Description",$.description));if($.allowedTools&&$.allowedTools.length>0){L.push(""),L.push(N()?Z.bold("Allowed Tools:"):"Allowed Tools:"),L.push(` ${L$($.allowedTools)}`);let A=S$($.allowedTools);if(A)L.push(` ${N()?Z.yellow("⚠"):"!"} ${A}`)}if($.warnings&&$.warnings.length>0){L.push(""),L.push(N()?Z.bold("Warnings:"):"Warnings:");for(let A of $.warnings)L.push(` ${N()?Z.yellow("!"):"!"} [${A.category}] ${A.message}`)}return L.join(`
|
|
11
11
|
`)}async function BL($){if($.length===0)return"No skills found.";if($.length===1)return w$($[0]);let L=[],j=(Y,B)=>`${N()?Z.bold(Y+":"):Y+":"} ${B}`,S=$[0],A=S.name;if(L.push(""),L.push(N()?Z.blueBold(` ${A}`):` ${A}`),L.push(N()?Z.dim(" "+"-".repeat(A.length+2)):" "+"-".repeat(A.length+2)),L.push(""),L.push(j(" Version",S.version)),L.push(j(" Creator",S.creator||"—")),L.push(j(" License",S.license||"—")),S.compatibility)L.push(j(" Compatibility",S.compatibility));if(S.effort)L.push(j(" Effort",R(S.effort)));let z=S.fileCount??await g(S.path);L.push(j(" File Count",String(z)));let G=$.map((Y)=>k(Y.provider,Y.providerLabel)).join(" ");if(L.push(j(" Installed in",G)),S.description){L.push(""),L.push(N()?Z.bold(" Description:"):" Description:");let Y=j$(S.description,72);for(let B of Y)L.push(" "+B)}if(S.allowedTools&&S.allowedTools.length>0){L.push(""),L.push(N()?Z.bold(" Allowed Tools:"):" Allowed Tools:"),L.push(` ${L$(S.allowedTools)}`);let Y=S$(S.allowedTools);if(Y)L.push(` ${N()?Z.yellow("⚠"):"!"} ${Y}`)}L.push("");let J=` Installations (${$.length})`;L.push(N()?Z.bold(J):J);for(let Y=0;Y<$.length;Y++){let B=$[Y],U=p(B.provider,B.providerLabel),H=B.isSymlink?"symlink":"directory",Q=Z.dim(B.scope);if(L.push(` ${U} (${Q}, ${H})`),L.push(` ${Z.dim("Path:")} ${q(B.path)}`),B.isSymlink&&B.symlinkTarget)L.push(` ${Z.dim("Target:")} ${B.symlinkTarget}`)}let X=$.flatMap((Y)=>{if(!Y.warnings||Y.warnings.length===0)return[];return Y.warnings.map((B)=>({...B,provider:Y.providerLabel}))});if(X.length>0){L.push("");let Y=` Warnings (${X.length})`;L.push(N()?Z.bold(Y):Y);for(let B of X){let U=N()?Z.yellow("!"):"!";L.push(` ${U} [${B.category}] ${B.message}`)}}return L.push(""),L.join(`
|
|
12
12
|
`)}function j$($,L){let j=$.split(/\s+/),S=[],A="";for(let z of j)if(A.length+z.length+1>L&&A.length>0)S.push(A),A=z;else A=A?A+" "+z:z;if(A)S.push(A);return S}function GL($){return JSON.stringify($,null,2)}function NL($){let L=[],j=new Set,S=new Map,A=[];for(let X of $){let Y=S.get(X.realPath);if(Y){if(X.isSymlink)continue;if(Y.isSymlink)A[A.indexOf(Y)]=X,S.set(X.realPath,X);else A.push(X)}else S.set(X.realPath,X),A.push(X)}let z=new Map;for(let X of A){let Y=z.get(X.dirName)??[];Y.push(X),z.set(X.dirName,Y)}for(let[X,Y]of z)if(new Set(Y.map((U)=>U.location)).size>=2){L.push({key:X,reason:"same-dirName",instances:Y});for(let U of Y)j.add(U.path)}let G=new Map;for(let X of A){if(!X.name)continue;let Y=G.get(X.name)??[];Y.push(X),G.set(X.name,Y)}for(let[X,Y]of G){if(new Set(Y.map((Q)=>Q.dirName)).size<2)continue;let U=Y.filter((Q)=>!j.has(Q.path));if(U.length<2)continue;if(new Set(U.map((Q)=>Q.dirName)).size<2)continue;L.push({key:X,reason:"same-frontmatterName",instances:U})}L.sort((X,Y)=>{if(X.reason!==Y.reason)return X.reason==="same-dirName"?-1:1;return X.key.localeCompare(Y.key)});let J=L.reduce((X,Y)=>X+Y.instances.length,0);return{scannedAt:new Date().toISOString(),totalSkills:$.length,duplicateGroups:L,totalDuplicateInstances:J}}function C$($){return[...$].sort((L,j)=>{if(L.scope!==j.scope)return L.scope==="global"?-1:1;let S=L.providerLabel.localeCompare(j.providerLabel);if(S!==0)return S;return L.path.localeCompare(j.path)})}function x$($){return $==="same-dirName"?"same dirName":"same name"}function IL($){if($.duplicateGroups.length===0)return Z.green("No duplicate skills found.");let L=[];L.push(""),L.push(Z.bold(` Found ${$.duplicateGroups.length} duplicate group(s) (${$.totalDuplicateInstances} total instances):`)),L.push("");for(let j of $.duplicateGroups){L.push(` ${Z.yellow(`"${j.key}"`)} ${Z.dim(`(${x$(j.reason)})`)}`);let S=C$(j.instances);for(let A=0;A<S.length;A++){let z=S[A],G=p(z.provider,z.providerLabel),J=A===0?Z.green(" [keep]"):Z.dim(" "),X=Z.dim(`(${z.scope})`);L.push(` ${J} ${G} ${X} ${Z.dim(q(z.path))}`)}L.push("")}return L.push(Z.dim(` Run ${Z.bold("asm audit -y")} to auto-remove duplicates`)),L.push(""),L.join(`
|
|
13
|
-
`)}function DL($){return JSON.stringify($,null,2)}function FL($){let L=$.trim();if(!L)return["vi",[]];let j=[],S="",A=!1,z=0;while(z<L.length){let G=L[z];if(G==='"'){A=!0,z++;while(z<L.length&&L[z]!=='"'){if(L[z]==="\\"&&z+1<L.length){let J=L[z+1];if(J==='"'||J==="\\"){S+=J,z+=2;continue}}S+=L[z],z++}z++}else if(G==="'"){A=!0,z++;while(z<L.length&&L[z]!=="'")S+=L[z],z++;z++}else if(G===" "||G==="\t"){if(S.length>0||A)j.push(S),S="",A=!1;z++}else S+=G,z++}if(S.length>0||A)j.push(S);if(j.length===0)return["vi",[]];return[j[0],j.slice(1)]}import{readFileSync as v$}from"fs";import{resolve as W$,dirname as y$}from"path";import{fileURLToPath as b$}from"url";import{execSync as h$}from"child_process";var f$=y$(b$(import.meta.url)),A$="1.
|
|
13
|
+
`)}function DL($){return JSON.stringify($,null,2)}function FL($){let L=$.trim();if(!L)return["vi",[]];let j=[],S="",A=!1,z=0;while(z<L.length){let G=L[z];if(G==='"'){A=!0,z++;while(z<L.length&&L[z]!=='"'){if(L[z]==="\\"&&z+1<L.length){let J=L[z+1];if(J==='"'||J==="\\"){S+=J,z+=2;continue}}S+=L[z],z++}z++}else if(G==="'"){A=!0,z++;while(z<L.length&&L[z]!=="'")S+=L[z],z++;z++}else if(G===" "||G==="\t"){if(S.length>0||A)j.push(S),S="",A=!1;z++}else S+=G,z++}if(S.length>0||A)j.push(S);if(j.length===0)return["vi",[]];return[j[0],j.slice(1)]}import{readFileSync as v$}from"fs";import{resolve as W$,dirname as y$}from"path";import{fileURLToPath as b$}from"url";import{execSync as h$}from"child_process";var f$=y$(b$(import.meta.url)),A$="1.17.0";try{let $=v$(W$(f$,"../../package.json"),"utf-8");A$=JSON.parse($).version}catch{}var u="a89f7a8";try{u=h$("git rev-parse --short HEAD",{encoding:"utf-8",stdio:["pipe","pipe","ignore"]}).trim()||u}catch{}var g$=A$,m$=u,qL=`v${g$} (${m$})`;
|
|
14
14
|
export{d as a,t as b,o as c,g as d,n$ as e,a$ as f,r$ as g,M$ as h,LL as i,SL as j,jL as k,Z as l,R as m,p as n,q as o,XL as p,YL as q,ZL as r,JL as s,$$ as t,P$ as u,BL as v,j$ as w,GL as x,NL as y,C$ as z,x$ as A,IL as B,DL as C,qL as D,FL as E};
|