@skill-map/cli 0.42.0 → 0.43.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +316 -192
- package/dist/cli.js.map +1 -1
- package/dist/index.js +4 -4
- package/dist/index.js.map +1 -1
- package/dist/kernel/index.d.ts +16 -24
- package/dist/kernel/index.js +4 -4
- package/dist/kernel/index.js.map +1 -1
- package/dist/migrations/001_initial.sql +6 -11
- package/dist/ui/chunk-2IF446BS.js +1 -0
- package/dist/ui/{chunk-5GD2GBPS.js → chunk-77J7XU3Y.js} +1 -1
- package/dist/ui/chunk-DIKPNZUZ.js +315 -0
- package/dist/ui/chunk-KGCJINI6.js +1 -0
- package/dist/ui/{chunk-XJL4DZ4M.js → chunk-PPE3P2JD.js} +1 -1
- package/dist/ui/{chunk-HWP3HM55.js → chunk-UOCACZLI.js} +1 -1
- package/dist/ui/{chunk-HEJCH7BA.js → chunk-YCR3XCIW.js} +5 -5
- package/dist/ui/index.html +1 -1
- package/dist/ui/main-VHFB7Q2D.js +3 -0
- package/migrations/001_initial.sql +6 -11
- package/package.json +3 -3
- package/dist/ui/chunk-HFPA56IM.js +0 -1
- package/dist/ui/chunk-HHPSCDLM.js +0 -315
- package/dist/ui/chunk-PZ6Q5AOT.js +0 -1
- package/dist/ui/main-7VYTTJP7.js +0 -3
|
@@ -408,20 +408,15 @@ CREATE TABLE scan_contributions (
|
|
|
408
408
|
CREATE INDEX ix_scan_contributions_node_path ON scan_contributions(node_path);
|
|
409
409
|
CREATE INDEX ix_scan_contributions_plugin_id ON scan_contributions(plugin_id);
|
|
410
410
|
|
|
411
|
-
-- scan_node_tags:
|
|
412
|
-
--
|
|
413
|
-
--
|
|
414
|
-
--
|
|
415
|
-
--
|
|
416
|
-
-- O(log n). The same tag string MAY appear under both sources for the
|
|
417
|
-
-- same node (the PK accepts the pair); search returns the node once
|
|
418
|
-
-- via DISTINCT, the UI renders both chips with their attribution.
|
|
411
|
+
-- scan_node_tags: tag system. One row per (node_path, tag) pair.
|
|
412
|
+
-- Projected at persist time from `sidecar.annotations.tags`. Tags are
|
|
413
|
+
-- a skill-map concept (no vendor carries `tags` in frontmatter), so the
|
|
414
|
+
-- sidecar is the single source. Drives `sm list --tag` and the UI's
|
|
415
|
+
-- tag-faceted search; the (tag) index keeps lookups O(log n).
|
|
419
416
|
CREATE TABLE scan_node_tags (
|
|
420
417
|
node_path TEXT NOT NULL,
|
|
421
418
|
tag TEXT NOT NULL,
|
|
422
|
-
|
|
423
|
-
PRIMARY KEY (node_path, tag, source),
|
|
424
|
-
CONSTRAINT ck_scan_node_tags_source CHECK (source IN ('author','user'))
|
|
419
|
+
PRIMARY KEY (node_path, tag)
|
|
425
420
|
);
|
|
426
421
|
CREATE INDEX ix_scan_node_tags_tag ON scan_node_tags(tag);
|
|
427
422
|
CREATE INDEX ix_scan_node_tags_node_path ON scan_node_tags(node_path);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{I as f,N as T,Y as _,ea as l,mc as y}from"./chunk-YL6SWAFJ.js";var B=new Set(["stale-body","stale-frontmatter","stale-both"]);function p(t){return t?B.has(t.status??null):!1}function c(t){let e=t.metadata;return e&&typeof e=="object"&&!Array.isArray(e)?e:null}function Z(t){if(!t)return null;let e=t.sidecar?.annotations;if(e&&typeof e.version=="number")return`v${e.version}`;let n=c(t.frontmatter)?.version;return typeof n=="string"&&n.length>0?`v${n}`:null}function v(t){if(!t)return null;let n=t.sidecar?.annotations?.stability;if(n==="stable"||n==="experimental"||n==="deprecated")return n;let r=c(t.frontmatter)?.stability;return r==="stable"||r==="experimental"||r==="deprecated"?r:null}function Q(t){if(!t)return[];let e=t.frontmatter,n=[];if(t.kind==="agent"&&Array.isArray(e.tools))for(let r of e.tools)typeof r=="string"&&r.length>0&&n.push(r);if(t.kind==="skill"||t.kind==="command"){let r=e["allowed-tools"];if(Array.isArray(r))for(let i of r)typeof i=="string"&&i.length>0&&n.push(i);else typeof r=="string"&&r.length>0&&n.push(r)}return n}function Y(t){return p(t?.sidecar)}function S(t){if(!t)return null;let n=t.sidecar?.annotations?.supersededBy;if(typeof n=="string"&&n.length>0)return n;let r=c(t.frontmatter)?.supersededBy;return typeof r=="string"&&r.length>0?r:null}function E(t){if(!t)return[];let n=t.sidecar?.annotations?.tags;if(Array.isArray(n))return n.filter(i=>typeof i=="string"&&i.length>0);let r=c(t.frontmatter)?.tags;return Array.isArray(r)?r.filter(i=>typeof i=="string"&&i.length>0):[]}function ee(t,e){switch(t?.sidecar?.status){case"stale-body":return e.staleBody;case"stale-frontmatter":return e.staleFrontmatter;case"stale-both":return e.staleBoth;default:return""}}function te(t){return t<1e3?`${t}`:t<1e4?`${(t/1e3).toFixed(1).replace(/\.0$/,"")}k`:`${Math.round(t/1e3)}k`}function ne(t){let e=new Date(t);if(isNaN(e.getTime()))return t;let n=Date.now()-e.getTime(),r=Math.floor(n/1e3);if(r<60)return"just now";let i=Math.floor(r/60);if(i<60)return`${i} minute${i===1?"":"s"} ago`;let o=Math.floor(i/60);if(o<24)return`${o} hour${o===1?"":"s"} ago`;let s=Math.floor(o/24);if(s<30)return`${s} day${s===1?"":"s"} ago`;let a=Math.floor(s/30);if(a<12)return`${a} month${a===1?"":"s"} ago`;let u=Math.floor(s/365);return`${u} year${u===1?"":"s"} ago`}var le=["stable","experimental","deprecated"],N=["invokes","references","mentions","supersedes"],A=class t{_searchText=l("");_selectedKinds=l([]);_kindToggleExplicitEmpty=l(!1);_selectedStabilities=l([]);_hasIssuesOnly=l(!1);_staleOnly=l(!1);_favoritesOnly=l(!1);_selectedLinkKinds=l([]);_severityErrorActive=l(!1);_severityWarnActive=l(!1);searchText=this._searchText.asReadonly();selectedKinds=this._selectedKinds.asReadonly();selectedStabilities=this._selectedStabilities.asReadonly();hasIssuesOnly=this._hasIssuesOnly.asReadonly();staleOnly=this._staleOnly.asReadonly();favoritesOnly=this._favoritesOnly.asReadonly();selectedLinkKinds=this._selectedLinkKinds.asReadonly();severityErrorActive=this._severityErrorActive.asReadonly();severityWarnActive=this._severityWarnActive.asReadonly();kindToggleExplicitEmpty=this._kindToggleExplicitEmpty.asReadonly();isActive=y(()=>this._searchText().trim().length>0||this._selectedKinds().length>0||this._kindToggleExplicitEmpty()||this._selectedStabilities().length>0||this._hasIssuesOnly()||this._staleOnly()||this._favoritesOnly()||this._selectedLinkKinds().length>0||this._severityErrorActive()||this._severityWarnActive());setSearchText(e){this._searchText.set(e)}setKinds(e){this._kindToggleExplicitEmpty.set(!1),this._selectedKinds.set([...e])}toggleKind(e,n){let r=this._selectedKinds(),i=n,s=this._kindToggleExplicitEmpty()?new Set:r.length===0?new Set(i):new Set(r);s.has(e)?s.delete(e):s.add(e),s.size===i.length?(this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!1)):s.size===0?(this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!0)):(this._selectedKinds.set([...s]),this._kindToggleExplicitEmpty.set(!1))}isKindActive(e){if(this._kindToggleExplicitEmpty())return!1;let n=this._selectedKinds();return n.length===0?!0:n.includes(e)}setStabilities(e){this._selectedStabilities.set([...e])}setHasIssuesOnly(e){this._hasIssuesOnly.set(e)}setStaleOnly(e){this._staleOnly.set(e)}setFavoritesOnly(e){this._favoritesOnly.set(e)}setLinkKinds(e){this._selectedLinkKinds.set([...e])}toggleLinkKind(e){let n=this._selectedLinkKinds(),r=n.length===0?new Set(N):new Set(n);r.has(e)?r.delete(e):r.add(e),r.size===N.length?this._selectedLinkKinds.set([]):this._selectedLinkKinds.set([...r])}isLinkKindActive(e){let n=this._selectedLinkKinds();return n.length===0?!0:n.includes(e)}toggleSeverity(e){e==="error"?this._severityErrorActive.set(!this._severityErrorActive()):this._severityWarnActive.set(!this._severityWarnActive())}isSeverityActive(e){return e==="error"?this._severityErrorActive():this._severityWarnActive()}setSeverityFilters(e){let n=new Set(e);this._severityErrorActive.set(n.has("error")),this._severityWarnActive.set(n.has("warn"))}reset(){this._searchText.set(""),this._selectedKinds.set([]),this._kindToggleExplicitEmpty.set(!1),this._selectedStabilities.set([]),this._hasIssuesOnly.set(!1),this._staleOnly.set(!1),this._favoritesOnly.set(!1),this._selectedLinkKinds.set([]),this._severityErrorActive.set(!1),this._severityWarnActive.set(!1)}apply(e,n){let r=this.searchText().trim().toLowerCase(),i=this.selectedKinds(),o=this._kindToggleExplicitEmpty(),s=this.selectedStabilities(),a=this.hasIssuesOnly(),u=this.staleOnly(),D=this.favoritesOnly(),k=this._severityErrorActive(),x=this._severityWarnActive(),F=(k||x)&&n!==void 0;return e.filter(d=>{if(r){let g=E(d).join(" ");if(![d.path,d.frontmatter.name??"",d.frontmatter.description??"",g].join(" ").toLowerCase().includes(r))return!1}if(o||i.length>0&&!i.includes(d.kind))return!1;if(s.length>0){let g=v(d);if(!g||!s.includes(g))return!1}return!(a&&!C(d,n)||u&&!p(d.sidecar)||D&&d.isFavorite!==!0||F&&(k&&!n.errors.has(d.path)||x&&!n.warns.has(d.path)))})}static \u0275fac=function(n){return new(n||t)};static \u0275prov=f({token:t,factory:t.\u0275fac,providedIn:"root"})};function C(t,e){return!!(v(t)==="deprecated"||S(t)!==null||e&&(e.errors.has(t.path)||e.warns.has(t.path)))}function b(t){let e=t.normalize("NFD");return e=e.replace(new RegExp("\\p{Mn}+","gu"),""),e=e.toLowerCase(),e=e.replace(/[-_\s]+/g," "),e=e.replace(/\s+/g," "),e.trim()}function ce(t){let e=new Map;return P(t,e),V(t,e),e}function P(t,e){for(let n of t){let r=w(n);if(r===null)continue;let i=b(r);e.has(i)||e.set(i,n.path)}}function V(t,e){for(let n of t){if(w(n)!==null)continue;let r=W(n.path);if(r.length===0)continue;let i=b(r);e.has(i)||e.set(i,n.path)}}function w(t){let e=t.frontmatter?.name;return typeof e!="string"||e.length===0?null:e}function W(t){let e=t.split("/").filter(r=>r.length>0);if(e.length===0)return t;let n=e[e.length-1];return n==="SKILL.md"&&e.length>=2?e[e.length-2]:n.replace(/\.md$/,"")}function ue(t,e,n){let r=t.charAt(0);if(r!=="/"&&r!=="@")return t;let i=e!==null?e.replace(/^[/@]/,"").trim():b(t.slice(1));return n.get(i)??t}var K={invalidHex:t=>`deriveTints: invalid hex color "${t}" (expected #RRGGBB)`};function m(t,e,n){return[Math.round(t[0]+(e[0]-t[0])*n),Math.round(t[1]+(e[1]-t[1])*n),Math.round(t[2]+(e[2]-t[2])*n)]}function H(t){let e=/^#([0-9a-f]{6})$/i.exec(t);if(!e)throw new Error(K.invalidHex(t));let n=parseInt(e[1],16);return[n>>16&255,n>>8&255,n&255]}function h([t,e,n]){let r=i=>Math.max(0,Math.min(255,i)).toString(16).padStart(2,"0");return`#${r(t)}${r(e)}${r(n)}`}var R=[255,255,255],O=[0,0,0];function I(t,e){let n=H(t);return e==="light"?{bg:h(m(n,R,.85)),fg:h(m(n,O,.5))}:{bg:h(m(n,O,.7)),fg:h(m(n,R,.6))}}var U=/^[a-zA-Z][a-zA-Z0-9_-]{0,63}$/,L=/^#[0-9a-f]{6}$/i,M=class t{doc=T(_);_entries=l([]);kinds=this._entries.asReadonly();index=y(()=>{let e=new Map;for(let n of this._entries())e.set(n.name,n);return e});ingest(e){if(!e)return;let n=[];for(let[i,o]of Object.entries(e)){if(!U.test(i))continue;let s=o.providers[o.primaryProviderId];if(!s)continue;let a={name:i,primaryProviderId:o.primaryProviderId,providers:o.providers,label:s.label,color:s.color};s.colorDark!==void 0&&(a.colorDark=s.colorDark),s.emoji!==void 0&&(a.emoji=s.emoji),s.icon!==void 0&&(a.icon=s.icon),n.push(a)}let r=this._entries();q(r,n)||(this._entries.set(n),this.applyCssVars())}lookup(e){return this.index().get(e)}labelOf(e){return this.lookup(e)?.label??e}colorOf(e,n="light"){let r=this.lookup(e);return r?n==="dark"?r.colorDark??r.color:r.color:"#9ca3af"}iconOf(e){return this.lookup(e)?.icon}emojiOf(e){return this.lookup(e)?.emoji}providersOf(e){return this.lookup(e)?.providers}applyCssVars(){if(!this.doc.head)return;let e=z(this.doc),n=[],r=[];for(let i of this._entries()){if(!L.test(i.color))continue;let o=i.colorDark??i.color;if(L.test(o))try{let s=I(i.color,"light"),a=I(o,"dark");n.push(`--sm-kind-${i.name}: ${i.color};`),n.push(`--sm-kind-${i.name}-bg: ${s.bg};`),n.push(`--sm-kind-${i.name}-fg: ${s.fg};`),r.push(`--sm-kind-${i.name}: ${o};`),r.push(`--sm-kind-${i.name}-bg: ${a.bg};`),r.push(`--sm-kind-${i.name}-fg: ${a.fg};`)}catch{continue}}e.textContent=`:root { ${n.join(" ")} } .app-dark { ${r.join(" ")} }`}static \u0275fac=function(n){return new(n||t)};static \u0275prov=f({token:t,factory:t.\u0275fac,providedIn:"root"})},$="sm-kind-vars";function z(t){let e=t.getElementById($);return e||(e=t.createElement("style"),e.id=$,t.head.appendChild(e)),e}function q(t,e){if(t.length!==e.length)return!1;for(let n=0;n<t.length;n++){let r=t[n],i=e[n];if(r.name!==i.name||r.primaryProviderId!==i.primaryProviderId||JSON.stringify(r.providers)!==JSON.stringify(i.providers))return!1}return!0}export{p as a,Z as b,v as c,Q as d,Y as e,S as f,E as g,ee as h,te as i,ne as j,le as k,N as l,A as m,M as n,ce as o,W as p,ue as q};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{a as nn,b as sn,c as dn,e as pn,f as un,g as mn}from"./chunk-JPYAASHN.js";import{c as Zi,e as Ji,h as Xi,i as en,k as tn,m as Ut,n as ln,p as cn}from"./chunk-
|
|
1
|
+
import{a as nn,b as sn,c as dn,e as pn,f as un,g as mn}from"./chunk-JPYAASHN.js";import{c as Zi,e as Ji,h as Xi,i as en,k as tn,m as Ut,n as ln,p as cn}from"./chunk-2IF446BS.js";import{a as Ht,b as Nt,c as qi,d as qt,e as Yt,f as hn,g as Wt,h as _n,i as fn,j as Zt,k as _i,l as gn,m as bn,o as yn,p as xn,q as vn}from"./chunk-5WJRN3LD.js";import{a as qe,b as Qt}from"./chunk-IUDL3NDH.js";import{a as st,b as Qi,d as $t,e as ut,f as on,g as rn}from"./chunk-XOHD5XWA.js";import{$ as M,$c as Ki,Ab as I,Ad as Gt,Bd as Wi,Cb as s,Db as Bt,Eb as rt,Fa as c,Fb as Me,Gb as De,H as Be,Hb as x,I as de,Ib as v,Ic as Le,J as fe,Jd as jt,Kc as Ge,Kd as Ae,L as ue,Lc as we,Ld as an,Mb as Pe,Mc as je,Md as pt,N,Na as Se,Nb as ve,Nc as Ce,Nd as Xe,Ob as ft,Oc as he,Od as et,Pb as ke,Pd as $e,Qb as g,Ra as D,Rb as T,Sa as ge,Sb as K,Sc as wt,T as _,Tb as le,U as f,Ua as be,Ub as gt,Uc as re,V as k,Va as B,Wa as p,Wb as bt,X as Ot,Xb as yt,Xc as Ni,Yb as xt,Yc as ui,Zc as zt,_c as lt,aa as Qe,ac as me,ad as $i,bc as ri,bd as pe,cc as Y,cd as Z,d as ot,db as w,dc as Ie,dd as _e,ea as Te,eb as Si,ec as Pt,ed as ye,fb as Mi,fc as li,ga as Rt,gb as te,gc as Lt,hb as ie,hc as vt,hd as xe,ia as E,ic as Di,id as Ke,jc as ae,jd as $,kd as Gi,ld as At,mb as l,mc as ne,md as mi,nb as u,nd as Ue,ob as m,od as U,pb as S,pd as Ee,qb as X,qc as se,qd as ji,rb as ee,rd as Ui,sb as H,sd as G,tb as F,td as hi,ub as V,ud as Kt,vb as P,vd as Je,wd as ct,xd as j,yb as A,yc as C,yd as Yi,zb as ce,zc as W,zd as dt}from"./chunk-YL6SWAFJ.js";import{A as Oi,D as Ri,F as Bi,J as Pi,O as kt,R as Li,T as Ne,U as We,V as Ze,W as zi,X as It,a as Ve,aa as Ai,b as si,ba as St,ca as Hi,k as ci,l as di,m as Ei,n as Fi,p as pi,t as ze,u as oe,v as Ye,w as Ct,x as Vi,z as Tt}from"./chunk-C2YUQODZ.js";import{a as Re,b as at}from"./chunk-VB56BUGO.js";var wn=`
|
|
2
2
|
.p-datatable {
|
|
3
3
|
position: relative;
|
|
4
4
|
display: block;
|