vskill 0.5.145 → 0.5.147

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.
@@ -46,7 +46,7 @@
46
46
  }
47
47
  })();
48
48
  </script>
49
- <script type="module" crossorigin src="/assets/index-DQJbz9dt.js"></script>
49
+ <script type="module" crossorigin src="/assets/index-7xEjXp20.js"></script>
50
50
  <link rel="stylesheet" crossorigin href="/assets/index-CycZyHaL.css">
51
51
  <link rel="stylesheet" crossorigin href="/assets/fonts-i7Lkz2zN.css">
52
52
  </head>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vskill",
3
- "version": "0.5.145",
3
+ "version": "0.5.147",
4
4
  "type": "module",
5
5
  "description": "Secure multi-platform AI skill installer — scan before you install",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{r as h,e as z,f as L,j as t,h as M}from"./index-DQJbz9dt.js";/* empty css */function F(l,d){const[c,u]=l.split("."),[w,f]=d.split("."),a=Number(c),m=Number(u),x=Number(w),v=Number(f);return!Number.isFinite(a)||!Number.isFinite(x)?(console.warn(`[semverBump] unparseable version: installed=${l} latest=${d}`),"patch"):x>a?"major":!Number.isFinite(m)||!Number.isFinite(v)?(console.warn(`[semverBump] unparseable minor: installed=${l} latest=${d}`),"patch"):v>m?"minor":"patch"}const D={major:{bg:"var(--red-muted)",text:"var(--red)"},minor:{bg:"var(--yellow-muted)",text:"var(--yellow)"},patch:{bg:"var(--green-muted)",text:"var(--green)"}},T=["project","personal","plugin"];function C(l,d={}){if(l.length===0)return"No tracked install — click to view details";const c=l.filter(r=>!r.readonly),u=l.filter(r=>r.readonly);if(c.length===0)return"Plugin-bundled — Update via plugin to refresh";const f=T.filter(r=>c.some(i=>i.scope===r)).join(" + "),m=Array.from(new Set(c.map(r=>r.agentLabel))).sort((r,i)=>r.localeCompare(i)).join(", "),x=c.length;let p=`Updates ${x} ${x===1?"location":"locations"}: ${f} (${m})`;if(d.pinned)return p+=" — pinned (skipped)",p;if(u.length>0){const r=Array.from(new Set(u.map(i=>i.pluginSlug??"?")));r.length===1&&r[0]!=="?"?p+=` — ${u.length} from plugin ${r[0]} (handled separately)`:p+=` — ${u.length} plugin-bundled (handled separately)`}return p}function P({updates:l,isRefreshing:d,onRefresh:c,onSelectSkill:u,onViewAll:w,onClose:f,anchorRef:a,diffSummariesById:m,platformDegraded:x,platformReason:v}){const p=h.useRef(null),r=h.useRef(null);h.useEffect(()=>{var e;(e=r.current)==null||e.focus()},[]),h.useEffect(()=>{function e(s){p.current&&(p.current.contains(s.target)||a!=null&&a.current&&a.current.contains(s.target)||f())}return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[f,a]),h.useEffect(()=>{function e(s){var g;s.key==="Escape"&&(s.preventDefault(),f(),(g=a==null?void 0:a.current)==null||g.focus())}return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)},[f,a]);const i=l.filter(e=>e.updateAvailable),{toast:j}=z(),{onSkillUpdated:U}=L(),[k,S]=h.useState(()=>new Set);async function N(e){const s=e.installLocations??[],g=s.filter(n=>!n.readonly);if(s.length>0&&g.length===0){const n=s[0].pluginSlug??"the plugin";j({severity:"info",message:`This skill came from plugin ${n}. Update the plugin to refresh it.`});return}if(!k.has(e.name)){S(n=>{const o=new Set(n);return o.add(e.name),o});try{const n=e.name.split("/"),o=e.localPlugin??(n.length>=2?n[n.length-2]:n[0]),y=e.localSkill??n[n.length-1],b=await M.postSkillUpdate(o,y);if(b.ok){const $=g.length||1,E=$===1?"location":"locations";U(o,y),j({severity:"success",message:`Updated ${y} in ${$} ${E}.`,durationMs:4e3})}else j({severity:"error",message:`Couldn't update ${y} — HTTP ${b.status}`,durationMs:0})}catch(n){const o=n instanceof Error?n.message:"Network error";j({severity:"error",message:`Update failed: ${o}`,durationMs:0})}finally{S(n=>{const o=new Set(n);return o.delete(e.name),o})}}}return t.jsxs("div",{ref:p,role:"dialog","aria-modal":"false","aria-label":"Skill update summary","data-testid":"update-dropdown",style:{position:"absolute",top:"calc(100% + 6px)",right:0,width:320,maxHeight:400,overflow:"auto",background:"var(--bg-surface)",border:"1px solid var(--border-default)",borderRadius:8,padding:10,zIndex:1e3,fontFamily:"var(--font-sans)",display:"flex",flexDirection:"column",gap:6},children:[x&&t.jsxs("div",{role:"status","aria-live":"polite","data-testid":"update-dropdown-platform-degraded-banner",style:{display:"flex",alignItems:"flex-start",gap:8,padding:"8px 10px",borderRadius:6,border:"1px solid color-mix(in srgb, var(--color-own, #f59e0b) 40%, transparent)",background:"color-mix(in srgb, var(--color-own, #f59e0b) 10%, transparent)",color:"var(--text-primary)"},children:[t.jsx("span",{"aria-hidden":"true",style:{fontSize:14,lineHeight:1.2},children:"⚠"}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0},children:[t.jsx("span",{style:{fontSize:12,fontWeight:600},children:"Platform crawler degraded"}),t.jsx("span",{style:{fontSize:11,color:"var(--text-secondary)",wordBreak:"break-word"},children:v??"Update checks paused upstream — your submissions are queued."})]})]}),t.jsxs("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"2px 4px 6px",borderBottom:"1px solid var(--border-default)"},children:[t.jsx("span",{style:{fontSize:12,fontWeight:600,color:"var(--text-primary)"},children:i.length===0?"No updates available":`${i.length} updates available`}),t.jsx("button",{type:"button","data-testid":"update-dropdown-refresh",onClick:c,disabled:d,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-mono)",cursor:d?"not-allowed":"pointer",padding:"2px 6px"},children:d?"Refreshing…":"Refresh"})]}),i.length>0?t.jsx("ul",{role:"list",style:{listStyle:"none",margin:0,padding:0,display:"flex",flexDirection:"column",gap:2},children:i.map((e,s)=>{const g=e.latest?F(e.installed,e.latest):"patch",n=D[g],o=m==null?void 0:m.get(e.name),y=C(e.installLocations??[],{pinned:e.pinned??!1}),b=k.has(e.name);return t.jsxs("li",{style:{margin:0,display:"flex",alignItems:"stretch",gap:4},children:[t.jsxs("button",{ref:s===0?r:void 0,type:"button","data-testid":"update-dropdown-row","data-skill-name":e.name,onClick:()=>u(e),style:{display:"flex",alignItems:"flex-start",gap:8,width:"100%",padding:"6px 8px",background:"transparent",border:"none",borderRadius:4,cursor:"pointer",color:"var(--text-primary)",fontFamily:"inherit",fontSize:12,textAlign:"left"},children:[t.jsx("span",{"aria-hidden":"true","data-testid":"update-dropdown-bump-dot","data-bump":g,style:{width:8,height:8,borderRadius:"50%",background:n.text,flexShrink:0,marginTop:4}}),t.jsxs("span",{style:{display:"flex",flexDirection:"column",gap:2,minWidth:0,flex:1},children:[t.jsxs("span",{style:{display:"flex",alignItems:"center",gap:8,minWidth:0},children:[t.jsx("span",{style:{minWidth:0,flex:1,overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:e.name}),t.jsxs("span",{style:{fontFamily:"var(--font-mono)",fontSize:10,color:"var(--text-secondary)",fontVariantNumeric:"tabular-nums"},children:[e.installed," → ",e.latest??"?"]})]}),o&&t.jsx("span",{"data-testid":"update-dropdown-diff-summary",style:{fontSize:11,color:"var(--text-secondary)",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"},children:o})]})]}),t.jsx("button",{type:"button","data-testid":"update-dropdown-row-update","data-skill-name":e.name,title:y,onClick:()=>{N(e)},disabled:b,style:{flexShrink:0,padding:"0 10px",background:"var(--color-ink)",color:"var(--color-paper)",border:"none",borderRadius:4,cursor:b?"not-allowed":"pointer",fontFamily:"var(--font-sans)",fontSize:11,fontWeight:500},children:b?"Updating…":"Update"})]},e.name)})}):t.jsx("div",{style:{padding:"12px 4px",fontSize:12,color:"var(--text-secondary)"},children:"All installed skills are up to date."}),t.jsx("div",{style:{display:"flex",justifyContent:"flex-end",padding:"4px 4px 0",borderTop:"1px solid var(--border-default)",marginTop:2},children:t.jsx("button",{type:"button","data-testid":"update-dropdown-view-all",onClick:w,style:{background:"transparent",border:"none",color:"var(--text-secondary)",fontSize:11,fontFamily:"var(--font-sans)",cursor:"pointer",padding:"4px 6px"},children:"View all"})})]})}export{P as default};