vskill 1.2.11 → 1.2.14

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.
Files changed (63) hide show
  1. package/README.md +2 -2
  2. package/agents.json +1 -1
  3. package/dist/eval-server/install-engine-routes.d.ts +12 -7
  4. package/dist/eval-server/install-engine-routes.js +2 -39
  5. package/dist/eval-server/install-engine-routes.js.map +1 -1
  6. package/dist/eval-server/install-jobs.js +31 -19
  7. package/dist/eval-server/install-jobs.js.map +1 -1
  8. package/dist/eval-server/install-state-routes.js +18 -8
  9. package/dist/eval-server/install-state-routes.js.map +1 -1
  10. package/dist/eval-server/remove-skill-routes.js +217 -155
  11. package/dist/eval-server/remove-skill-routes.js.map +1 -1
  12. package/dist/eval-server/skill-authoring-engine.d.ts +10 -0
  13. package/dist/eval-server/skill-authoring-engine.js +58 -0
  14. package/dist/eval-server/skill-authoring-engine.js.map +1 -0
  15. package/dist/eval-server/skill-authoring-path.d.ts +15 -0
  16. package/dist/eval-server/skill-authoring-path.js +38 -0
  17. package/dist/eval-server/skill-authoring-path.js.map +1 -0
  18. package/dist/eval-server/skill-authoring-route.d.ts +3 -0
  19. package/dist/eval-server/skill-authoring-route.js +37 -0
  20. package/dist/eval-server/skill-authoring-route.js.map +1 -0
  21. package/dist/eval-server/skill-create-routes.d.ts +74 -2
  22. package/dist/eval-server/skill-create-routes.js +59 -160
  23. package/dist/eval-server/skill-create-routes.js.map +1 -1
  24. package/dist/eval-server/skill-generate-route.d.ts +2 -0
  25. package/dist/eval-server/skill-generate-route.js +130 -0
  26. package/dist/eval-server/skill-generate-route.js.map +1 -0
  27. package/dist/eval-server/skill-install-paths.d.ts +39 -0
  28. package/dist/eval-server/skill-install-paths.js +167 -0
  29. package/dist/eval-server/skill-install-paths.js.map +1 -0
  30. package/dist/eval-server/skill-md-emitter.js +4 -2
  31. package/dist/eval-server/skill-md-emitter.js.map +1 -1
  32. package/dist/eval-ui/assets/{AdvancedTab-DX3v5Q7O.js → AdvancedTab-BsCfcO3L.js} +1 -1
  33. package/dist/eval-ui/assets/CreateSkillPage-CuMXsfif.js +151 -0
  34. package/dist/eval-ui/assets/{FindSkillsPalette-BqNFXzS6.js → FindSkillsPalette-5Z0nZfj1.js} +2 -2
  35. package/dist/eval-ui/assets/{GeneralTab-BfFbcbuP.js → GeneralTab-DqdL8e2l.js} +1 -1
  36. package/dist/eval-ui/assets/{PrivacyTab-Bq2N7Iam.js → PrivacyTab-DM3_SZ4l.js} +1 -1
  37. package/dist/eval-ui/assets/{SearchPaletteCore-DCd9aZnv.js → SearchPaletteCore-BdKtQNHf.js} +1 -1
  38. package/dist/eval-ui/assets/SkillDetailPanel-BzhzGMTG.js +1 -0
  39. package/dist/eval-ui/assets/{UpdateDropdown-BYJ29wcH.js → UpdateDropdown-y8Sq0YlC.js} +1 -1
  40. package/dist/eval-ui/assets/{UpdatesTab-w6h18GPp.js → UpdatesTab-CghDj_Cn.js} +1 -1
  41. package/dist/eval-ui/assets/{globals-DmzftdEG.js → globals-DfBP3Un6.js} +3 -3
  42. package/dist/eval-ui/assets/{lifecycle-DC0khFSd.js → lifecycle-BTWax-il.js} +1 -1
  43. package/dist/eval-ui/assets/main-D4o9Bml-.js +86 -0
  44. package/dist/eval-ui/assets/{preferences-VTBvoXmM.js → preferences-UdOVsxM3.js} +2 -2
  45. package/dist/eval-ui/assets/{useDesktopBridge-C8dT34x9.js → useDesktopBridge-DwIkSrI6.js} +1 -1
  46. package/dist/eval-ui/index.html +3 -3
  47. package/dist/eval-ui/lifecycle.html +2 -2
  48. package/dist/eval-ui/preferences.html +3 -3
  49. package/dist/shared/authoring-engine-commands.d.ts +14 -0
  50. package/dist/shared/authoring-engine-commands.js +10 -0
  51. package/dist/shared/authoring-engine-commands.js.map +1 -0
  52. package/dist/shared/skill-authoring-document.d.ts +28 -0
  53. package/dist/shared/skill-authoring-document.js +187 -0
  54. package/dist/shared/skill-authoring-document.js.map +1 -0
  55. package/dist/utils/semver.d.ts +1 -0
  56. package/dist/utils/semver.js +18 -0
  57. package/dist/utils/semver.js.map +1 -1
  58. package/dist/utils/skill-builder-detection.js +4 -9
  59. package/dist/utils/skill-builder-detection.js.map +1 -1
  60. package/package.json +4 -3
  61. package/dist/eval-ui/assets/CreateSkillPage-H8PKqquP.js +0 -13
  62. package/dist/eval-ui/assets/SkillDetailPanel-C5wytaSH.js +0 -1
  63. package/dist/eval-ui/assets/main-DjTh6bpa.js +0 -86
@@ -1 +1 @@
1
- import{r as l,j as e,c as N}from"./globals-DmzftdEG.js";/* empty css */function f(){var i,t;return((t=(i=window.__TAURI__)==null?void 0:i.core)==null?void 0:t.invoke)??null}function v(s){if(!s)return"just now";const i=Date.parse(s);if(!Number.isFinite(i))return"just now";const t=Math.max(0,Math.round((Date.now()-i)/1e3));return t<60?`${t}s ago`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:`${Math.round(t/86400)}d ago`}function g(s){return s==="tauri"?"this app":s==="npx-cli"?"npx":"node"}function S(){const[s,i]=l.useState(null),[t,d]=l.useState(!1),[o,b]=l.useState(!1),p=l.useRef(null);l.useEffect(()=>{var _;const c=f();c&&c("get_detected_instance").then(h=>{h&&i(h)}).catch(()=>{});let r=null;const x=window;return(_=x.__TAURI__)!=null&&_.event&&x.__TAURI__.event.listen("lifecycle://detected",h=>{h.payload&&i(h.payload)}).then(h=>{r=h}).catch(()=>{}),()=>{r&&r()}},[]),l.useEffect(()=>{var c;s&&((c=p.current)==null||c.focus())},[s]);const n=l.useCallback(async c=>{if(!o)return;const r=f();if(r)try{await r("set_setting",{key:"studio.lifecycleDefault",value:c})}catch(x){console.warn("could not persist lifecycleDefault:",x)}},[o]),a=l.useCallback(async()=>{if(!s||t)return;d(!0),await n("use-existing");const c=f();if(c)try{await c("lifecycle_use_existing",{port:s.port})}catch(r){console.error("lifecycle_use_existing failed:",r),d(!1)}},[t,s,n]),u=l.useCallback(async()=>{if(!s||t)return;d(!0),await n("stop-and-replace");const c=f();if(c)try{await c("lifecycle_stop_existing",{pid:s.pid})}catch(r){console.error("lifecycle_stop_existing failed:",r),d(!1)}},[t,s,n]),m=l.useCallback(async()=>{if(t)return;d(!0),await n("run-alongside");const c=f();if(c)try{await c("lifecycle_run_alongside")}catch(r){console.error("lifecycle_run_alongside failed:",r),d(!1)}},[t,n]),j=l.useCallback(()=>{const c=f();c&&c("quit").catch(()=>{})},[]);if(!s)return e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Skill Studio is already running"}),e.jsx("div",{className:"lc-detected",children:"Detecting running instances…"}),e.jsx("div",{className:"lc-actions"}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:j,children:"Cancel"})})]});const k=`port ${s.port} · ${g(s.source)} · started ${v(s.startedAt)}`;return e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Skill Studio is already running"}),e.jsx("div",{className:"lc-detected","aria-live":"polite",children:k}),e.jsxs("div",{className:"lc-actions",children:[e.jsxs("button",{ref:p,type:"button",className:"lc-btn lc-btn--primary",onClick:a,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Use that instance"}),e.jsxs("span",{className:"lc-btn-help",children:["Open the running studio at port ",s.port,"."]})]}),e.jsxs("button",{type:"button",className:"lc-btn",onClick:u,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Stop it and use desktop app"}),e.jsx("span",{className:"lc-btn-help",children:"SIGTERM (3s grace) → SIGKILL, then start a fresh sidecar."})]}),e.jsxs("button",{type:"button",className:"lc-btn",onClick:m,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Run alongside"}),e.jsx("span",{className:"lc-btn-help",children:"Spawn this app on a separate port; both instances coexist."})]})]}),e.jsxs("div",{className:"lc-footer",children:[e.jsxs("label",{className:"lc-checkbox",children:[e.jsx("input",{type:"checkbox",checked:o,onChange:c=>b(c.target.checked)}),"Don't ask again — always do this"]}),e.jsx("button",{type:"button",className:"lc-cancel",onClick:j,disabled:t,children:"Cancel"})]})]})}function y(){var i,t;return((t=(i=window.__TAURI__)==null?void 0:i.core)==null?void 0:t.invoke)??null}function w(s){return{pid:s.pid,port:s.port,source:s.source??"npx-cli",sourceShort:s.source_short??"npx",startedAt:s.started_at??"",isSelf:!!s.is_self}}function C(){const[s,i]=l.useState(null),[t,d]=l.useState(!1),o=l.useCallback(async()=>{const n=y();if(!n){i([]);return}try{const a=await n("list_studio_instances");i(a.map(w))}catch(a){console.error("list_studio_instances failed:",a),i([])}},[]);l.useEffect(()=>{o()},[o]),l.useEffect(()=>{var u;const n=window;if(!((u=n.__TAURI__)!=null&&u.event))return;let a=null;return n.__TAURI__.event.listen("studio-instances://refresh",()=>{o()}).then(m=>{a=m}).catch(()=>{}),()=>{a&&a()}},[o]);const b=l.useCallback(async n=>{if(t)return;d(!0);const a=y();if(a)try{await a("switch_to_studio_instance",{port:n})}catch(u){console.error("switch failed:",u)}d(!1)},[t]),p=l.useCallback(async n=>{if(t||!window.confirm(`Stop studio instance pid ${n}?`))return;d(!0);const a=y();if(a)try{await a("stop_studio_instance",{pid:n}),await o()}catch(u){console.error("stop failed:",u)}d(!1)},[t,o]);return s===null?e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-detected",children:"Loading…"})]}):s.length===0?e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-actions",children:e.jsxs("button",{type:"button",className:"lc-btn",disabled:!0,"aria-disabled":!0,children:[e.jsx("span",{className:"lc-btn-title",children:"No other instances"}),e.jsx("span",{className:"lc-btn-help",children:"Skill Studio is the only running instance."})]})}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:o,disabled:t,children:"Refresh"})})]}):e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-actions",role:"list",children:s.map(n=>e.jsxs("div",{className:"lc-btn",role:"listitem","aria-disabled":n.isSelf,style:n.isSelf?{opacity:.6,cursor:"default"}:{cursor:"default"},children:[e.jsxs("span",{className:"lc-btn-title",children:["port ",n.port," · ",n.sourceShort," · ",n.pid,n.isSelf?" (this app)":""]}),e.jsxs("span",{className:"lc-btn-help",style:{display:"flex",gap:8,marginTop:4},children:[e.jsx("button",{type:"button",className:"lc-cancel",disabled:n.isSelf||t,onClick:()=>b(n.port),children:"Switch"}),e.jsx("button",{type:"button",className:"lc-cancel",disabled:n.isSelf||t,onClick:()=>p(n.pid),children:"Stop"})]})]},`${n.pid}-${n.port}`))}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:o,disabled:t,children:"Refresh"})})]})}const I=new URLSearchParams(window.location.search),R=I.get("mode")==="instances"?"instances":"modal";N.createRoot(document.getElementById("root")).render(e.jsx(l.StrictMode,{children:R==="instances"?e.jsx(C,{}):e.jsx(S,{})}));
1
+ import{r as l,j as e,c as N}from"./globals-DfBP3Un6.js";/* empty css */function f(){var i,t;return((t=(i=window.__TAURI__)==null?void 0:i.core)==null?void 0:t.invoke)??null}function v(s){if(!s)return"just now";const i=Date.parse(s);if(!Number.isFinite(i))return"just now";const t=Math.max(0,Math.round((Date.now()-i)/1e3));return t<60?`${t}s ago`:t<3600?`${Math.round(t/60)}m ago`:t<86400?`${Math.round(t/3600)}h ago`:`${Math.round(t/86400)}d ago`}function g(s){return s==="tauri"?"this app":s==="npx-cli"?"npx":"node"}function S(){const[s,i]=l.useState(null),[t,d]=l.useState(!1),[o,b]=l.useState(!1),p=l.useRef(null);l.useEffect(()=>{var _;const c=f();c&&c("get_detected_instance").then(h=>{h&&i(h)}).catch(()=>{});let r=null;const x=window;return(_=x.__TAURI__)!=null&&_.event&&x.__TAURI__.event.listen("lifecycle://detected",h=>{h.payload&&i(h.payload)}).then(h=>{r=h}).catch(()=>{}),()=>{r&&r()}},[]),l.useEffect(()=>{var c;s&&((c=p.current)==null||c.focus())},[s]);const n=l.useCallback(async c=>{if(!o)return;const r=f();if(r)try{await r("set_setting",{key:"studio.lifecycleDefault",value:c})}catch(x){console.warn("could not persist lifecycleDefault:",x)}},[o]),a=l.useCallback(async()=>{if(!s||t)return;d(!0),await n("use-existing");const c=f();if(c)try{await c("lifecycle_use_existing",{port:s.port})}catch(r){console.error("lifecycle_use_existing failed:",r),d(!1)}},[t,s,n]),u=l.useCallback(async()=>{if(!s||t)return;d(!0),await n("stop-and-replace");const c=f();if(c)try{await c("lifecycle_stop_existing",{pid:s.pid})}catch(r){console.error("lifecycle_stop_existing failed:",r),d(!1)}},[t,s,n]),m=l.useCallback(async()=>{if(t)return;d(!0),await n("run-alongside");const c=f();if(c)try{await c("lifecycle_run_alongside")}catch(r){console.error("lifecycle_run_alongside failed:",r),d(!1)}},[t,n]),j=l.useCallback(()=>{const c=f();c&&c("quit").catch(()=>{})},[]);if(!s)return e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Skill Studio is already running"}),e.jsx("div",{className:"lc-detected",children:"Detecting running instances…"}),e.jsx("div",{className:"lc-actions"}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:j,children:"Cancel"})})]});const k=`port ${s.port} · ${g(s.source)} · started ${v(s.startedAt)}`;return e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Skill Studio is already running"}),e.jsx("div",{className:"lc-detected","aria-live":"polite",children:k}),e.jsxs("div",{className:"lc-actions",children:[e.jsxs("button",{ref:p,type:"button",className:"lc-btn lc-btn--primary",onClick:a,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Use that instance"}),e.jsxs("span",{className:"lc-btn-help",children:["Open the running studio at port ",s.port,"."]})]}),e.jsxs("button",{type:"button",className:"lc-btn",onClick:u,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Stop it and use desktop app"}),e.jsx("span",{className:"lc-btn-help",children:"SIGTERM (3s grace) → SIGKILL, then start a fresh sidecar."})]}),e.jsxs("button",{type:"button",className:"lc-btn",onClick:m,disabled:t,children:[e.jsx("span",{className:"lc-btn-title",children:"Run alongside"}),e.jsx("span",{className:"lc-btn-help",children:"Spawn this app on a separate port; both instances coexist."})]})]}),e.jsxs("div",{className:"lc-footer",children:[e.jsxs("label",{className:"lc-checkbox",children:[e.jsx("input",{type:"checkbox",checked:o,onChange:c=>b(c.target.checked)}),"Don't ask again — always do this"]}),e.jsx("button",{type:"button",className:"lc-cancel",onClick:j,disabled:t,children:"Cancel"})]})]})}function y(){var i,t;return((t=(i=window.__TAURI__)==null?void 0:i.core)==null?void 0:t.invoke)??null}function w(s){return{pid:s.pid,port:s.port,source:s.source??"npx-cli",sourceShort:s.source_short??"npx",startedAt:s.started_at??"",isSelf:!!s.is_self}}function C(){const[s,i]=l.useState(null),[t,d]=l.useState(!1),o=l.useCallback(async()=>{const n=y();if(!n){i([]);return}try{const a=await n("list_studio_instances");i(a.map(w))}catch(a){console.error("list_studio_instances failed:",a),i([])}},[]);l.useEffect(()=>{o()},[o]),l.useEffect(()=>{var u;const n=window;if(!((u=n.__TAURI__)!=null&&u.event))return;let a=null;return n.__TAURI__.event.listen("studio-instances://refresh",()=>{o()}).then(m=>{a=m}).catch(()=>{}),()=>{a&&a()}},[o]);const b=l.useCallback(async n=>{if(t)return;d(!0);const a=y();if(a)try{await a("switch_to_studio_instance",{port:n})}catch(u){console.error("switch failed:",u)}d(!1)},[t]),p=l.useCallback(async n=>{if(t||!window.confirm(`Stop studio instance pid ${n}?`))return;d(!0);const a=y();if(a)try{await a("stop_studio_instance",{pid:n}),await o()}catch(u){console.error("stop failed:",u)}d(!1)},[t,o]);return s===null?e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-detected",children:"Loading…"})]}):s.length===0?e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-actions",children:e.jsxs("button",{type:"button",className:"lc-btn",disabled:!0,"aria-disabled":!0,children:[e.jsx("span",{className:"lc-btn-title",children:"No other instances"}),e.jsx("span",{className:"lc-btn-help",children:"Skill Studio is the only running instance."})]})}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:o,disabled:t,children:"Refresh"})})]}):e.jsxs("div",{className:"lifecycle-shell",children:[e.jsx("h1",{children:"Studio Instances"}),e.jsx("div",{className:"lc-actions",role:"list",children:s.map(n=>e.jsxs("div",{className:"lc-btn",role:"listitem","aria-disabled":n.isSelf,style:n.isSelf?{opacity:.6,cursor:"default"}:{cursor:"default"},children:[e.jsxs("span",{className:"lc-btn-title",children:["port ",n.port," · ",n.sourceShort," · ",n.pid,n.isSelf?" (this app)":""]}),e.jsxs("span",{className:"lc-btn-help",style:{display:"flex",gap:8,marginTop:4},children:[e.jsx("button",{type:"button",className:"lc-cancel",disabled:n.isSelf||t,onClick:()=>b(n.port),children:"Switch"}),e.jsx("button",{type:"button",className:"lc-cancel",disabled:n.isSelf||t,onClick:()=>p(n.pid),children:"Stop"})]})]},`${n.pid}-${n.port}`))}),e.jsx("div",{className:"lc-footer",children:e.jsx("button",{type:"button",className:"lc-cancel",onClick:o,disabled:t,children:"Refresh"})})]})}const I=new URLSearchParams(window.location.search),R=I.get("mode")==="instances"?"instances":"modal";N.createRoot(document.getElementById("root")).render(e.jsx(l.StrictMode,{children:R==="instances"?e.jsx(C,{}):e.jsx(S,{})}));