@skill-map/cli 0.54.0 → 0.56.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.
Files changed (41) hide show
  1. package/dist/cli/tutorial/sm-tutorial/SKILL.md +22 -24
  2. package/dist/cli/tutorial/sm-tutorial/references/_core.md +8 -7
  3. package/dist/cli/tutorial/sm-tutorial/references/_manifest.yml +21 -42
  4. package/dist/cli/tutorial/sm-tutorial/references/fixtures.md +15 -7
  5. package/dist/cli/tutorial/sm-tutorial/references/part-authoring.md +2 -2
  6. package/dist/cli/tutorial/sm-tutorial/references/part-cli.md +1 -1
  7. package/dist/cli/tutorial/sm-tutorial/references/part-connect-harness.md +9 -10
  8. package/dist/cli/tutorial/sm-tutorial/references/part-daily-loop.md +563 -0
  9. package/dist/cli/tutorial/sm-tutorial/references/part-mcp.md +5 -1
  10. package/dist/cli/tutorial/sm-tutorial/references/part-plugins.md +7 -7
  11. package/dist/cli/tutorial/sm-tutorial/references/part-project-kickoff.md +24 -12
  12. package/dist/cli/tutorial/sm-tutorial/references/part-settings.md +2 -2
  13. package/dist/cli.js +1785 -1102
  14. package/dist/index.js +148 -14
  15. package/dist/kernel/index.d.ts +229 -97
  16. package/dist/kernel/index.js +148 -14
  17. package/dist/migrations/001_initial.sql +5 -0
  18. package/dist/ui/chunk-4ITL7E6U.js +1 -0
  19. package/dist/ui/chunk-DWBJCNC7.js +2 -0
  20. package/dist/ui/{chunk-CXTU4HQV.js → chunk-GHOVZAAV.js} +1 -1
  21. package/dist/ui/{chunk-GBKHMJ4B.js → chunk-H6O2DYVT.js} +13 -13
  22. package/dist/ui/chunk-HDKR6XHG.js +917 -0
  23. package/dist/ui/{chunk-GEI6INVH.js → chunk-JA4Z74I3.js} +1 -1
  24. package/dist/ui/chunk-RS3ANRT5.js +1 -0
  25. package/dist/ui/chunk-VUNP5KNI.js +3 -0
  26. package/dist/ui/chunk-W3Z3CZL4.js +1844 -0
  27. package/dist/ui/chunk-YHJL5LP3.js +913 -0
  28. package/dist/ui/index.html +2 -2
  29. package/dist/ui/{main-HP3MOLI2.js → main-PL3BEVQI.js} +3 -3
  30. package/dist/ui/{styles-4SNVM34O.css → styles-RHEEXRHQ.css} +1 -1
  31. package/migrations/001_initial.sql +5 -0
  32. package/package.json +2 -2
  33. package/dist/cli/tutorial/sm-tutorial/references/part-live-site.md +0 -155
  34. package/dist/cli/tutorial/sm-tutorial/references/part-maintain.md +0 -284
  35. package/dist/cli/tutorial/sm-tutorial/references/part-run-harness.md +0 -181
  36. package/dist/ui/chunk-4CXAL43H.js +0 -1
  37. package/dist/ui/chunk-BUNPMGDX.js +0 -2205
  38. package/dist/ui/chunk-DSNBKMYU.js +0 -2
  39. package/dist/ui/chunk-JXRIGHET.js +0 -552
  40. package/dist/ui/chunk-MVRQGDZJ.js +0 -123
  41. package/dist/ui/chunk-WFLPMCK4.js +0 -392
@@ -1 +0,0 @@
1
- import{$ as l,B as O,E as A,H as _,K as g,N as h,P as c,_ as j,c as S,d as R,f as C,ga as d,ia as y,sc as p,u as k}from"./chunk-Q2A6FWC7.js";import{a as m,b}from"./chunk-WCABR6TI.js";function w(t){t||(t=c(l));let r=new S(e=>{if(t.destroyed){e.next();return}return t.onDestroy(e.next.bind(e))});return e=>e.pipe(A(r))}function Ee(t,r){let n=!r?.manualCleanup?r?.injector?.get(l)??c(l):null,o=V(r?.equal),s;r?.requireSync?s=d({kind:0},{equal:o}):s=d({kind:1,value:r?.initialValue},{equal:o});let a,i=t.subscribe({next:u=>s.set({kind:1,value:u}),error:u=>{s.set({kind:2,error:u}),a?.()},complete:()=>{a?.()}});if(r?.requireSync&&s().kind===0)throw new _(601,!1);return a=n?.onDestroy(i.unsubscribe.bind(i)),p(()=>{let u=s();switch(u.kind){case 1:return u.value;case 2:throw u.error;case 0:throw new _(601,!1)}},{equal:r?.equal})}function V(t=Object.is){return(r,e)=>r.kind===1&&e.kind===1&&t(r.value,e.value)}var N=new h("DATA_SOURCE"),F=class extends Error{code;details;constructor(r,e,n){super(e),this.name="DataSourceError",this.code=r,this.details=n}};var U=new h("SKILL_MAP_MODE");function Te(){return typeof document>"u"?"live":document.querySelector('meta[name="skill-map-mode"]')?.content==="demo"?"demo":"live"}function D(t){if(typeof t!="object"||t===null)return!1;let r=t;if(typeof r.type!="string"||r.type.length===0)return!1;let e=r.timestamp;return!(typeof e!="number"&&typeof e!="string"||!("data"in r))}function L(t){if(!D(t)||t.type!=="sidecar.bumped")return!1;let r=t.data;if(typeof r!="object"||r===null||typeof r.nodePath!="string"||r.nodePath.length===0)return!1;let e=r.version;return!(e!==null&&typeof e!="number"||r.status!=="fresh")}var f={connected:t=>`[ws] connected to ${t}`,closed:(t,r)=>`[ws] closed (code=${t}, reason="${r}")`,malformedFrame:t=>`[ws] malformed frame dropped: ${t}`,socketError:t=>`[ws] socket error: ${t}`,reconnectScheduled:(t,r)=>`[ws] reconnect attempt ${r} scheduled in ${t}ms`,reconnectGiveUp:t=>`[ws] giving up after ${t} failed reconnect attempts`};var P=[1e3,2e3,4e3,8e3,16e3,3e4],$=10,X=new Set([1e3]);function z(){return typeof window>"u"||!window.location?"ws://127.0.0.1:4242/ws":`${window.location.protocol==="https:"?"wss:":"ws:"}//${window.location.host}/ws`}var J=new h("WS_SOCKET_FACTORY",{providedIn:"root",factory:()=>t=>new WebSocket(t)}),Z=new h("WS_URL",{providedIn:"root",factory:()=>z()}),K=(()=>{class t{mode=c(U);destroyRef=c(l);subject=new R;socket=null;reconnectTimer=null;reconnectAttempt=0;disposed=!1;_connectionState=d("connecting");connectionState=this._connectionState.asReadonly();socketFactory=c(J);url=c(Z);events$;scanCompleted$;sidecarBumped$;constructor(){this.mode!=="live"?this.events$=C:this.events$=new S(e=>{!this.socket&&!this.disposed&&this.connect();let n=this.subject.subscribe(e);return()=>n.unsubscribe()}).pipe(O({resetOnRefCountZero:!1})),this.scanCompleted$=this.events$.pipe(k(e=>e.type==="scan.completed")),this.sidecarBumped$=this.events$.pipe(k(L)),this.destroyRef.onDestroy(()=>this.disconnect())}disconnect(){if(!this.disposed){if(this.disposed=!0,this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.socket){try{this.socket.close(1e3,"client disconnect")}catch{}this.socket=null}this.subject.complete()}}reconnect(){this.disposed||this.socket||(this.reconnectTimer!==null&&(clearTimeout(this.reconnectTimer),this.reconnectTimer=null),this.reconnectAttempt=0,this._connectionState.set("connecting"),this.connect())}ngOnDestroy(){this.disconnect()}connect(){if(this.disposed)return;let e;try{e=this.socketFactory(this.url)}catch(n){let o=n instanceof Error?n.message:String(n);console.warn(f.socketError(o)),this.scheduleReconnect();return}this.socket=e,e.onopen=()=>{this.reconnectAttempt=0,this._connectionState.set("open"),console.info(f.connected(this.url))},e.onmessage=n=>{this.handleFrame(n.data)},e.onerror=n=>{let o=typeof n=="object"&&n!==null&&"message"in n?String(n.message??"unknown"):"unknown";console.warn(f.socketError(o))},e.onclose=n=>{console.info(f.closed(n.code,n.reason)),this.socket=null,!this.disposed&&(X.has(n.code)||this.scheduleReconnect())}}handleFrame(e){if(typeof e!="string"){console.warn(f.malformedFrame("non-string frame"));return}let n;try{n=JSON.parse(e)}catch(o){let s=o instanceof Error?o.message:String(o);console.warn(f.malformedFrame(s));return}if(!D(n)){console.warn(f.malformedFrame("envelope shape"));return}this.subject.next(n)}scheduleReconnect(){if(this.disposed)return;if(this.reconnectAttempt>=$){console.warn(f.reconnectGiveUp($)),this._connectionState.set("lost");return}this._connectionState.set("reconnecting");let e=Math.min(this.reconnectAttempt,P.length-1),n=P[e];this.reconnectAttempt+=1,console.info(f.reconnectScheduled(n,this.reconnectAttempt)),this.reconnectTimer=setTimeout(()=>{this.reconnectTimer=null,this.connect()},n)}get _reconnectAttempt(){return this.reconnectAttempt}static \u0275fac=function(n){return new(n||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();var Be=(()=>{class t{dataSource=c(N);wsEvents=c(K);destroyRef=c(l);_nodes=d([]);_scan=d(null);_loading=d(!1);_error=d(null);pendingRefresh=!1;wsConnectedBefore=!1;nodes=this._nodes.asReadonly();scan=this._scan.asReadonly();loading=this._loading.asReadonly();error=this._error.asReadonly();count=p(()=>this._nodes().length);byKind=p(()=>{let e=new Map;for(let n of this._nodes()){let o=e.get(n.kind);o?o.push(n):e.set(n.kind,[n])}return e});hasAnyFavorites=p(()=>this._nodes().some(e=>e.isFavorite===!0));constructor(){this.wsEvents.scanCompleted$.pipe(w(this.destroyRef)).subscribe(()=>{this.load()}),this.wsEvents.sidecarBumped$.pipe(w(this.destroyRef)).subscribe(e=>{this.patchSidecarFromBump({nodePath:e.data.nodePath,version:e.data.version,status:e.data.status})}),y(()=>{this.wsEvents.connectionState()==="open"&&(this.wsConnectedBefore&&this.load(),this.wsConnectedBefore=!0)})}setFavoriteLocal(e,n){this._nodes.update(o=>{let s=!1,a=o.map(i=>i.path!==e||i.isFavorite===n?i:(s=!0,b(m({},i),{isFavorite:n})));return s?a:o})}async toggleFavorite(e,n){this.setFavoriteLocal(e,n);try{return n?await this.dataSource.setFavorite(e):await this.dataSource.unsetFavorite(e),n}catch(o){this.setFavoriteLocal(e,!n);let s=o instanceof Error?o.message:String(o);return this._error.set(s),!n}}patchSidecarFromBump(e){this._nodes.update(n=>{let o=!1,s=n.map(a=>{if(a.path!==e.nodePath)return a;o=!0;let i=a.sidecar,u=m({},i?.annotations??{});return e.version!==null&&(u.version=e.version),b(m({},a),{sidecar:m({present:!0,status:e.status,annotations:u},i?.root===void 0?{}:{root:i.root})})});return o?s:n})}async load(){if(this._loading()){this.pendingRefresh=!0;return}this._loading.set(!0),this._error.set(null);try{let e=await this.dataSource.loadScan();this._scan.set(e),this._nodes.set(e.nodes.map(Q))}catch(e){let n=e instanceof Error?e.message:String(e);this._error.set(n)}finally{this._loading.set(!1),this.pendingRefresh&&(this.pendingRefresh=!1,queueMicrotask(()=>{this.load()}))}}static \u0275fac=function(n){return new(n||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();function Q(t){let r=t.kind,e=t.frontmatter??{},n=b(m({},e),{name:typeof e.name=="string"?e.name:"",description:typeof e.description=="string"?e.description:""}),o={path:t.path,kind:r,provider:t.provider,frontmatter:n,linksOutCount:t.linksOutCount,linksInCount:t.linksInCount,externalRefsCount:t.externalRefsCount,bytesTotal:t.bytes?.total,tokensTotal:t.tokens?.total,bodyHash:t.bodyHash,frontmatterHash:t.frontmatterHash,isFavorite:t.isFavorite===!0};return t.sidecar&&(o.sidecar=m({},t.sidecar)),t.contributions&&(o.contributions=[...t.contributions]),o}var Ge="https://bb9dce0fd2cb4ab27ac0475aa394aeb4@o4511475590037504.ingest.de.sentry.io/4511475725959248",x="phc_vMX3PcNeDsacWNg2hYEbKVXDijSWcjKFzabCkzU7RNEr",q="https://eu.i.posthog.com";var ee="<HOME>",te=["server_name","user"],ne=[/[A-Za-z]:[\\/]Users[\\/][^\\/\s:*?"<>|]+/g,/\/(?:home|Users)\/[^/\s:]+/g,/\/root(?=\/|\b)/g];function re(t){let r=t;for(let e of ne)r=r.replace(e,ee);return r}function B(t){let r=T(t);if(r!==null&&typeof r=="object"&&!Array.isArray(r)){let e=r;for(let n of te)n in e&&delete e[n]}return r}function T(t){if(typeof t=="string")return re(t);if(Array.isArray(t))return t.map(r=>T(r));if(t!==null&&typeof t=="object"){let r={};for(let[e,n]of Object.entries(t))r[e]=T(n);return r}return t}var W=!1,v=null;async function Ze(t){if(W||x===""||!t.consentEnabled||t.distinctId===null)return;let{default:r}=await import("./chunk-P3SNMV4X.js");r.init(x,{api_host:q,autocapture:!1,capture_pageview:!1,capture_pageleave:!1,disable_session_recording:!0,person_profiles:"identified_only",bootstrap:{distinctID:t.distinctId},before_send:e=>e===null?null:B(e)}),v=r,W=!0}function Qe(t,r={}){v!==null&&v.capture(t,r)}function et(t){v!==null&&v.register(t)}var M=[{id:"matrix",htmlClass:"app-matrix",forcesDark:!0,favicon:"favicon-matrix.svg",fontHref:"https://fonts.googleapis.com/css2?family=JetBrains+Mono&display=swap",fontLinkId:"sm-matrix-font",label:"Matrix",description:"Cyber-green retint on the dark palette."},{id:"neon-red",htmlClass:"app-neon-red",forcesDark:!0,label:"Neon R",description:"Electric-red glow on a deep console."},{id:"neon-green",htmlClass:"app-neon-green",forcesDark:!0,label:"Neon G",description:"Electric-green glow on a deep console."},{id:"neon",htmlClass:"app-neon",forcesDark:!0,label:"Neon B",description:"Electric-cyan glow on a deep-navy console."}];function E(t){return t?M.find(r=>r.id===t)??null:null}var Y="skill-map.ui.theme",I="skill-map.ui.extra-theme",oe="app-dark",se="dark",G="(prefers-color-scheme: dark)",ie="favicon.svg",ce='link[rel="icon"][type="image/svg+xml"]',ct=(()=>{class t{doc=c(j);destroyRef=c(l);mode=d(this.readInitialMode());extraTheme=d(this.readInitialExtra());systemPrefersDark=d(this.readSystemPref());resolved=p(()=>{let e=this.mode();return e==="auto"?this.systemPrefersDark()?"dark":"light":e});constructor(){this.subscribeToSystemPref(),y(()=>{let e=this.extraTheme(),n=E(e),s=this.resolved()==="dark"||n?.forcesDark===!0,a=this.doc.documentElement;a.classList.toggle(oe,s),a.classList.toggle(se,s);for(let i of M)a.classList.toggle(i.htmlClass,n?.id===i.id);this.applyFavicon(n?.favicon??ie),n&&this.ensureExtraThemeFont(n);try{let i=this.doc.defaultView?.localStorage;i?.setItem(Y,this.mode()),n===null?i?.removeItem(I):i?.setItem(I,n.id)}catch{}})}toggle(){this.extraTheme()!==null&&this.extraTheme.set(null),this.mode.update(e=>e==="auto"?"light":e==="light"?"dark":"auto")}set(e){this.mode.set(e)}setExtraTheme(e){this.extraTheme.set(E(e)?.id??null)}readInitialMode(){try{let e=this.doc.defaultView?.localStorage.getItem(Y);if(e==="auto"||e==="light"||e==="dark")return e}catch{}return"auto"}readInitialExtra(){try{let e=this.doc.defaultView?.localStorage.getItem(I);return E(e)?.id??null}catch{return null}}readSystemPref(){try{return this.doc.defaultView?.matchMedia(G).matches??!1}catch{return!1}}ensureExtraThemeFont(e){if(!e.fontHref||!e.fontLinkId||this.doc.getElementById(e.fontLinkId))return;let n=this.doc.head;if(!n)return;let o=this.doc.createElement("link");o.id=e.fontLinkId,o.rel="stylesheet",o.href=e.fontHref,n.appendChild(o)}applyFavicon(e){let n=this.doc.querySelector(ce);n&&n.getAttribute("href")!==e&&n.setAttribute("href",e)}subscribeToSystemPref(){let e=this.doc.defaultView;if(!e||typeof e.matchMedia!="function")return;let n=e.matchMedia(G),o=s=>{this.systemPrefersDark.set(s.matches)};n.addEventListener("change",o),this.destroyRef.onDestroy(()=>n.removeEventListener("change",o))}static \u0275fac=function(n){return new(n||t)};static \u0275prov=g({token:t,factory:t.\u0275fac,providedIn:"root"})}return t})();export{w as a,Ee as b,N as c,F as d,U as e,Te as f,K as g,Be as h,Ge as i,B as j,Ze as k,Qe as l,et as m,M as n,ct as o};