@inkeep/open-knowledge 0.0.0-dev-20260501170533 → 0.0.0-dev-20260501185457

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 (49) hide show
  1. package/dist/assets/skills/open-knowledge/SKILL.md +4 -1
  2. package/dist/cli.mjs +236 -235
  3. package/dist/config-schema.json +25 -0
  4. package/dist/config.project.schema.json +25 -0
  5. package/dist/config.user.schema.json +25 -0
  6. package/dist/constants-CF6iNHwq.mjs +2 -0
  7. package/dist/{dist-oDoSs1Bl.mjs → dist-BmX1Ns7C.mjs} +2 -2
  8. package/dist/{dist-BVnVlgjQ.mjs → dist-C5mH5cvM.mjs} +1 -1
  9. package/dist/{dist-CDuTCUx1.mjs → dist-CQ3cd3s_.mjs} +2 -2
  10. package/dist/index.d.mts +9 -0
  11. package/dist/index.mjs +1 -1
  12. package/dist/{init-Bf7LOYAr.mjs → init-BjnqDY7M.mjs} +2 -2
  13. package/dist/init-C2brR-RE.mjs +1 -0
  14. package/dist/{init-CPq6B11A.mjs → init-CYf2zVql.mjs} +3 -3
  15. package/dist/init-DmOplVN_.mjs +1 -0
  16. package/dist/{loader-C79dNoU-.mjs → loader-B6SJHrZ7.mjs} +2 -2
  17. package/dist/loader-DHJ2Zglf.mjs +1 -0
  18. package/dist/paths-CpBfVnXM.mjs +2 -0
  19. package/dist/paths-RkNXbnlJ.mjs +1 -0
  20. package/dist/preview-BlsnSdAb.mjs +1 -0
  21. package/dist/{preview-AXEdeZ4w.mjs → preview-Cwn5dVfT.mjs} +2 -2
  22. package/dist/public/assets/{ActivityModeContent-CCJOMAyp.js → ActivityModeContent-Cdl0frU2.js} +1 -1
  23. package/dist/public/assets/{DocumentContext-BHFNw5NZ.js → DocumentContext-BRyrYElZ.js} +1 -1
  24. package/dist/public/assets/{GraphPanel-BuZEMdl-.js → GraphPanel-BH5vs7kB.js} +1 -1
  25. package/dist/public/assets/{OutlinePanel-CnKUM65X.js → OutlinePanel-BcdH74Qw.js} +1 -1
  26. package/dist/public/assets/{SettingsPane-B3rEEyMP.js → SettingsPane-rdUN7cCp.js} +1 -1
  27. package/dist/public/assets/{SourceEditor-CE_X9auW.js → SourceEditor-Df4RyC-2.js} +1 -1
  28. package/dist/public/assets/{config-validation-events-DqfR4UtM.js → config-validation-events-CWaXc07D.js} +1 -1
  29. package/dist/public/assets/{index-NVu982rh.js → index-DN_1M53F.js} +70 -70
  30. package/dist/public/assets/{target-navigation-intent-1238Z_HW.js → target-navigation-intent-CIITpiPs.js} +1 -1
  31. package/dist/public/assets/{toggle-group-C5MXNna8.js → toggle-group-1sl8rMnA.js} +1 -1
  32. package/dist/public/assets/{tooltip-BMlqVI54.js → tooltip-CFeKxs4p.js} +1 -1
  33. package/dist/public/index.html +7 -7
  34. package/dist/schemas/v0/config.project.schema.json +25 -0
  35. package/dist/schemas/v0/config.user.schema.json +25 -0
  36. package/dist/{server-Cb1yd7Zc.mjs → server-CJdOKLcU.mjs} +2 -2
  37. package/dist/src-DTzzYACv.mjs +1 -0
  38. package/dist/{start-Dl1pApAn.mjs → start-DUNgfb6B.mjs} +2 -2
  39. package/dist/start-LHb22tU5.mjs +1 -0
  40. package/package.json +1 -1
  41. package/dist/constants-B8HpPaWG.mjs +0 -2
  42. package/dist/init-BhfL8UL0.mjs +0 -1
  43. package/dist/init-DkzHwyzJ.mjs +0 -1
  44. package/dist/loader-5abUX3Eq.mjs +0 -1
  45. package/dist/paths-BIsyTDX6.mjs +0 -1
  46. package/dist/paths-Drz5vBVF.mjs +0 -2
  47. package/dist/preview-DUYE2XxR.mjs +0 -1
  48. package/dist/src-CPe0c6hz.mjs +0 -1
  49. package/dist/start-COO3npTl.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{Xn as i,ot as a}from"./toggle-group-C5MXNna8.js";import{J as o,R as s,X as c,at as l,b as u,ct as d,dt as f,ft as p,h as m,it as h,lt as g,m as ee,mt as _,nt as v,ot as y,p as te,pt as b,st as x,ut as S}from"./DocumentContext-BHFNw5NZ.js";import{At as C,Dt as w,Et as ne,N as T,Pt as E,Q as D,Tt as O,Y as k,Z as A,bt as j,ft as M,lt as re,q as N,wt as P}from"./dist-dkPJvrfr.js";import{a as ie,i as ae,o as oe,r as se,t as F}from"./OutlinePanel-CnKUM65X.js";var I=e(t(),1),ce=r(),L=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:g(this.yanchor),yhead:g(this.yhead)}}static fromJSON(t){return new e(x(t.yanchor),x(t.yhead))}},le=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new h(e)}toYPos(e,t=0){return d(this.ytext,e,t)}fromYPos(e){let t=y(x(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new L(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?O.cursor(n.pos,n.assoc):O.range(t.pos,n.pos)}},R=w.define({combine(e){return e[e.length-1]}}),z=j.define(),B=class{constructor(e){this.view=e,this.conf=e.state.facet(R),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[z.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(z)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
1
+ import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{Xn as i,ot as a}from"./toggle-group-1sl8rMnA.js";import{J as o,R as s,X as c,at as l,b as u,ct as d,dt as f,ft as p,h as m,it as h,lt as g,m as ee,mt as _,nt as v,ot as y,p as te,pt as b,st as x,ut as S}from"./DocumentContext-BRyrYElZ.js";import{At as C,Dt as w,Et as ne,N as T,Pt as E,Q as D,Tt as O,Y as k,Z as A,bt as j,ft as M,lt as re,q as N,wt as P}from"./dist-dkPJvrfr.js";import{a as ie,i as ae,o as oe,r as se,t as F}from"./OutlinePanel-BcdH74Qw.js";var I=e(t(),1),ce=r(),L=class e{constructor(e,t){this.yanchor=e,this.yhead=t}toJSON(){return{yanchor:g(this.yanchor),yhead:g(this.yhead)}}static fromJSON(t){return new e(x(t.yanchor),x(t.yhead))}},le=class{constructor(e,t){this.ytext=e,this.awareness=t,this.undoManager=new h(e)}toYPos(e,t=0){return d(this.ytext,e,t)}fromYPos(e){let t=y(x(e),this.ytext.doc);if(t==null||t.type!==this.ytext)throw Error(`[y-codemirror] The position you want to retrieve was created by a different document`);return{pos:t.index,assoc:t.assoc}}toYRange(e){let t=e.assoc;return new L(this.toYPos(e.anchor,t),this.toYPos(e.head,t))}fromYRange(e){let t=this.fromYPos(e.yanchor),n=this.fromYPos(e.yhead);return t.pos===n.pos?O.cursor(n.pos,n.assoc):O.range(t.pos,n.pos)}},R=w.define({combine(e){return e[e.length-1]}}),z=j.define(),B=class{constructor(e){this.view=e,this.conf=e.state.facet(R),this._observer=(t,n)=>{if(n.origin!==this.conf){let n=t.delta,r=[],i=0;for(let e=0;e<n.length;e++){let t=n[e];t.insert==null?t.delete==null?i+=t.retain:(r.push({from:i,to:i+t.delete,insert:``}),i+=t.delete):r.push({from:i,to:i,insert:t.insert})}e.dispatch({changes:r,annotations:[z.of(this.conf)]})}},this._ytext=this.conf.ytext,this._ytext.observe(this._observer)}update(e){if(!e.docChanged||e.transactions.length>0&&e.transactions[0].annotation(z)===this.conf)return;let t=this.conf.ytext;t.doc.transact(()=>{let n=0;e.changes.iterChanges((e,r,i,a,o)=>{let s=o.sliceString(0,o.length,`
2
2
  `);e!==r&&t.delete(e+n,r-e),s.length>0&&t.insert(e+n,s),n+=s.length-(r-e)})},this.conf)}destroy(){this._ytext.unobserve(this._observer)}},V=A.fromClass(B),H=k.baseTheme({".cm-ySelection":{},".cm-yLineSelection":{padding:0,margin:`0px 2px 0px 4px`},".cm-ySelectionCaret":{position:`relative`,borderLeft:`1px solid black`,borderRight:`1px solid black`,marginLeft:`-1px`,marginRight:`-1px`,boxSizing:`border-box`,display:`inline`},".cm-ySelectionCaretDot":{borderRadius:`50%`,position:`absolute`,width:`.4em`,height:`.4em`,top:`-.2em`,left:`-.2em`,backgroundColor:`inherit`,transition:`transform .3s ease-in-out`,boxSizing:`border-box`},".cm-ySelectionCaret:hover > .cm-ySelectionCaretDot":{transformOrigin:`bottom center`,transform:`scale(0)`},".cm-ySelectionInfo":{position:`absolute`,top:`-1.05em`,left:`-1px`,fontSize:`.75em`,fontFamily:`serif`,fontStyle:`normal`,fontWeight:`normal`,lineHeight:`normal`,userSelect:`none`,color:`white`,paddingLeft:`2px`,paddingRight:`2px`,zIndex:101,transition:`opacity .3s ease-in-out`,backgroundColor:`inherit`,opacity:0,transitionDelay:`0s`,whiteSpace:`nowrap`},".cm-ySelectionCaret:hover > .cm-ySelectionInfo":{opacity:1,transitionDelay:`0s`}}),U=j.define(),W=class extends D{constructor(e,t){super(),this.color=e,this.name=t}toDOM(){return S(`span`,[p(`class`,`cm-ySelectionCaret`),p(`style`,`background-color: ${this.color}; border-color: ${this.color}`)],[f(`⁠`),S(`div`,[p(`class`,`cm-ySelectionCaretDot`)]),f(`⁠`),S(`div`,[p(`class`,`cm-ySelectionInfo`)],[f(this.name)]),f(`⁠`)])}eq(e){return e.color===this.color}compare(e){return e.color===this.color}updateDOM(){return!1}get estimatedHeight(){return-1}ignoreEvent(){return!0}},ue=class{constructor(e){this.conf=e.state.facet(R),this._listener=({added:t,updated:n,removed:r},i,a)=>{t.concat(n).concat(r).findIndex(e=>e!==this.conf.awareness.doc.clientID)>=0&&e.dispatch({annotations:[U.of([])]})},this._awareness=this.conf.awareness,this._awareness.on(`change`,this._listener),this.decorations=C.of([])}destroy(){this._awareness.off(`change`,this._listener)}update(e){let t=this.conf.ytext,n=t.doc,r=this.conf.awareness,i=[],a=this.conf.awareness.getLocalState();if(a!=null){let n=e.view.hasFocus&&e.view.dom.ownerDocument.hasFocus(),i=n?e.state.selection.main:null,o=a.cursor==null?null:x(a.cursor.anchor),s=a.cursor==null?null:x(a.cursor.head);if(i!=null){let e=d(t,i.anchor),n=d(t,i.head);(a.cursor==null||!l(o,e)||!l(s,n))&&r.setLocalStateField(`cursor`,{anchor:e,head:n})}else a.cursor!=null&&n&&r.setLocalStateField(`cursor`,null)}r.getStates().forEach((a,o)=>{if(o===r.doc.clientID)return;let s=a.cursor;if(s==null||s.anchor==null||s.head==null)return;let c=y(s.anchor,n),l=y(s.head,n);if(c==null||l==null||c.type!==t||l.type!==t)return;let{color:u=`#30bced`,name:d=`Anonymous`}=a.user||{},f=a.user&&a.user.colorLight||u+`33`,p=_(c.index,l.index),m=b(c.index,l.index),h=e.view.state.doc.lineAt(p),g=e.view.state.doc.lineAt(m);if(h.number===g.number)i.push({from:p,to:m,value:N.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});else{i.push({from:p,to:h.from+h.length,value:N.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})}),i.push({from:g.from,to:m,value:N.mark({attributes:{style:`background-color: ${f}`},class:`cm-ySelection`})});for(let t=h.number+1;t<g.number;t++){let n=e.view.state.doc.line(t).from;i.push({from:n,to:n,value:N.line({attributes:{style:`background-color: ${f}`,class:`cm-yLineSelection`}})})}}i.push({from:l.index,to:l.index,value:N.widget({side:l.index-c.index>0?-1:1,block:!1,widget:new W(u,d)})})}),this.decorations=N.set(i,!0)}},de=A.fromClass(ue,{decorations:e=>e.decorations}),fe=class{constructor(e){this.undoManager=e}addTrackedOrigin(e){this.undoManager.addTrackedOrigin(e)}removeTrackedOrigin(e){this.undoManager.removeTrackedOrigin(e)}undo(){return this.undoManager.undo()!=null}redo(){return this.undoManager.redo()!=null}},G=w.define({combine(e){return e[e.length-1]}});j.define();var pe=class{constructor(e){this.view=e,this.conf=e.state.facet(G),this._undoManager=this.conf.undoManager,this.syncConf=e.state.facet(R),this._beforeChangeSelection=null,this._mux=v(),this._onStackItemAdded=({stackItem:e,changedParentTypes:t})=>{t.has(this.syncConf.ytext)&&this._beforeChangeSelection&&!e.meta.has(this)&&e.meta.set(this,this._beforeChangeSelection)},this._onStackItemPopped=({stackItem:t})=>{let n=t.meta.get(this);if(n){let t=this.syncConf.fromYRange(n);e.dispatch(e.state.update({selection:t,effects:[k.scrollIntoView(t)]})),this._storeSelection()}},this._storeSelection=()=>{this._beforeChangeSelection=this.syncConf.toYRange(this.view.state.selection.main)},this._undoManager.on(`stack-item-added`,this._onStackItemAdded),this._undoManager.on(`stack-item-popped`,this._onStackItemPopped),this._undoManager.addTrackedOrigin(this.syncConf)}update(e){e.selectionSet&&(e.transactions.length===0||e.transactions[0].annotation(z)!==this.syncConf)&&this._storeSelection()}destroy(){this._undoManager.off(`stack-item-added`,this._onStackItemAdded),this._undoManager.off(`stack-item-popped`,this._onStackItemPopped),this._undoManager.removeTrackedOrigin(this.syncConf)}},me=A.fromClass(pe),he=({state:e,dispatch:t})=>e.facet(G).undo()||!0,ge=({state:e,dispatch:t})=>e.facet(G).redo()||!0,_e=(e,t,{undoManager:n=new h(e)}={})=>{let r=new le(e,t),i=[R.of(r),V];return t&&i.push(H,de),n!==!1&&i.push(G.of(new fe(n)),me,k.domEventHandlers({beforeinput(e,t){return e.inputType===`historyUndo`?he(t):e.inputType===`historyRedo`?ge(t):!1}})),i},ve=N.mark({class:`cm-link-ref-broken`}),K=/^\s{0,3}\[([^\]]+)\]:\s/,q=/\[([^\]]*)\]\[([^\]]*)\]/g,ye=new Set([`FencedCode`,`CodeBlock`,`InlineCode`]);function J(e,t){let n=0,r=t.length-1;for(;n<=r;){let i=n+r>>1,a=t[i];if(e<a.from)r=i-1;else if(e>=a.to)n=i+1;else return!0}return!1}function be(e){let t=[];return T(e).iterate({enter(e){if(ye.has(e.name))return t.push({from:e.from,to:e.to}),!1}}),t.sort((e,t)=>e.from-t.from),t}function Y(e){let t=new Set,n=[],r=e.doc,i=be(e);for(let e=1;e<=r.lines;e++){let n=r.line(e);if(J(n.from,i))continue;let a=K.exec(n.text);a&&t.add(a[1].toLowerCase())}for(let e=1;e<=r.lines;e++){let t=r.line(e);if(!J(t.from,i)&&!K.test(t.text))for(q.lastIndex=0;;){let e=q.exec(t.text);if(!e)break;let r=t.from+e.index;if(J(r,i))continue;let a=e[2]||e[1];n.push({from:r,to:r+e[0].length,label:a.toLowerCase()})}}let a=[];for(let e of n)t.has(e.label)||a.push(ve.range(e.from,e.to));return a.sort((e,t)=>e.from-t.from),N.set(a)}var xe=E.define({create(e){return Y(e)},update(e,t){return t.docChanged?Y(t.state):e},provide:e=>k.decorations.from(e)}),Se=/^(\s*(?:[-*+]|\d+[.)]) (?:\[[ x]\] )?)/,Ce=N.mark({class:`cm-del`}),we=N.line({class:`cm-table-header`}),X=N.line({class:`cm-table-row`});function Te(e){let t=0;for(let n of e)if(n===` `)t++;else if(n===` `)t+=4;else break;return t}function Z(e){if(e.doc.lines<2)return null;let t=e.doc.line(1);if(t.text!==`---`)return null;for(let n=2;n<=e.doc.lines;n++){let r=e.doc.line(n);if(r.text===`---`)return{from:t.from,to:r.to}}return null}function Q(e,t){let n=[],r=T(e),i=Z(e),a=e=>i!==null&&e>=i.from&&e<=i.to;for(let{from:i,to:o}of t)r.iterate({from:i,to:o,enter(t){if(!a(t.from)){if(t.name===`Strikethrough`){let e=t.from,r=t.to,i=t.node.cursor();if(i.firstChild())do i.name===`StrikethroughMark`&&(i.from===t.from?e=i.to:r=i.from);while(i.nextSibling());return e<r&&n.push(Ce.range(e,r)),!1}if(t.name===`ListItem`){let r=e.doc.lineAt(t.from),i=Se.exec(r.text),a=i?i[1].length:2,o=N.line({class:`cm-list-item`,attributes:{style:`--list-hang: ${a}ch`}});n.push(o.range(r.from));return}if(t.name===`FencedCode`){let r=e.doc.lineAt(t.from),i=e.doc.lineAt(t.to);for(let t=r.number+1;t<i.number;t++){let r=e.doc.line(t),i=Te(r.text),a=N.line({class:`cm-fenced-code-line`,attributes:{style:`--line-indent: ${i}`}});n.push(a.range(r.from))}return!1}if(t.name===`TableHeader`){let r=e.doc.lineAt(t.from);return n.push(we.range(r.from)),!1}if(t.name===`TableRow`){let r=e.doc.lineAt(t.from);return n.push(X.range(r.from)),!1}if(t.name===`TableDelimiter`&&t.node.parent?.name===`Table`){let r=e.doc.lineAt(t.from);return n.push(X.range(r.from)),!1}}}});return n.sort((e,t)=>e.from-t.from||e.value.startSide-t.value.startSide),N.set(n)}var Ee=class{decorations;constructor(e){this.decorations=Q(e.state,e.visibleRanges)}update(e){(e.docChanged||e.viewportChanged||T(e.startState)!==T(e.state))&&(this.decorations=Q(e.view.state,e.view.visibleRanges))}},De=A.fromClass(Ee,{decorations:e=>e.decorations});function Oe(){return[De,xe]}var ke=n();function $(e,t){let n=e.state.doc,r=1;if(n.lines>=1&&n.line(1).text===`---`){for(let e=2;e<=n.lines;e++)if(n.line(e).text===`---`){r=e+1;break}}let i=a(),o=0;for(let a=r;a<=n.lines;a++){let r=n.line(a);if(!i(r.text)&&/^#{1,6}\s/.test(r.text)){if(o===t.index){e.dispatch({selection:O.cursor(r.from),effects:k.scrollIntoView(r.from,{y:`start`})}),e.focus();return}o++}}}function Ae(e,t){requestAnimationFrame(()=>{let n=e.state.doc,r=Math.min(t.offset,n.length);e.dispatch({selection:O.cursor(r),effects:k.scrollIntoView(r,{y:`center`})}),e.focus()})}function je(e){let t=(0,ce.c)(25),{docName:n,ytext:r,provider:a,placeholder:l,isSourceModeActive:u}=e,d=(0,I.useRef)(null),f=(0,I.useRef)(null),p;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(p=new P,t[0]=p):p=t[0];let h=(0,I.useRef)(p),g;t[1]===Symbol.for(`react.memo_cache_sentinel`)?(g=new P,t[1]=g):g=t[1];let _=(0,I.useRef)(g),[v,y]=(0,I.useState)(null);if(v)throw v;let{resolvedTheme:b}=i(),x=(0,I.useRef)(null),S;t[2]!==l||t[3]!==a||t[4]!==b||t[5]!==r?(S=()=>{let e=d.current;if(!e)return;let t=a.configuration.name??``,n,i=Me;try{n=o({docName:t,container:e,sizeStats:{viewCount:0,bytes:r.length},factory:e=>{let t=s({ydoc:a.document,ytext:r}),n=new k({state:ne.create({doc:r.toString(),extensions:[se,re.of([ae]),_e(r,a.awareness),...te({themeCompartment:h.current,resolvedTheme:b,ydoc:a.document}),Oe(),t,_.current.of(M(l??``)),k.theme({"&":{height:`100%`}})]}),parent:e}),o=n.contentDOM;return o.addEventListener(`keydown`,i),o.addEventListener(`paste`,i),o.addEventListener(`drop`,i),o.addEventListener(`cut`,i),{view:n,ydoc:a.document,ytext:r,provider:a}}}),x.current=n,f.current=n.view}catch(e){let t=e;console.error(`[SourceEditor] mountCmEditor failed`,t),x.current=null,f.current=null,y(t instanceof Error?t:Error(String(t)))}return()=>{let e=x.current;e&&c(e),x.current=null,f.current=null}},t[2]=l,t[3]=a,t[4]=b,t[5]=r,t[6]=S):S=t[6];let C;t[7]!==a||t[8]!==r?(C=[r,a],t[7]=a,t[8]=r,t[9]=C):C=t[9],(0,I.useEffect)(S,C);let w,T;t[10]===b?(w=t[11],T=t[12]):(w=()=>{f.current&&f.current.dispatch({effects:h.current.reconfigure(b===`dark`?ee:m)})},T=[b],t[10]=b,t[11]=w,t[12]=T),(0,I.useEffect)(w,T);let E,D;t[13]===l?(E=t[14],D=t[15]):(E=()=>{f.current&&f.current.dispatch({effects:_.current.reconfigure(M(l??``))})},D=[l],t[13]=l,t[14]=E,t[15]=D),(0,I.useEffect)(E,D);let O,A;t[16]!==n||t[17]!==u?(A=()=>{let e=function(e){let t=e.detail;if(!t||t.mode!==`source`||!u)return;let r=f.current;r&&($(r,t),ie(n))};return window.addEventListener(F,e),()=>window.removeEventListener(F,e)},O=[n,u],t[16]=n,t[17]=u,t[18]=O,t[19]=A):(O=t[18],A=t[19]),(0,I.useEffect)(A,O);let j,N;t[20]!==n||t[21]!==u?(j=()=>{if(!u)return;let e=f.current;if(!e)return;let t=oe(n);if(t){if(t.kind===`outline`){$(e,t.detail);return}Ae(e,t.detail)}},N=[n,u],t[20]=n,t[21]=u,t[22]=j,t[23]=N):(j=t[22],N=t[23]),(0,I.useEffect)(j,N);let L;return t[24]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,ke.jsx)(`div`,{ref:d,className:`source-editor h-full py-3`}),t[24]=L):L=t[24],L}function Me(){return u()}export{je as SourceEditor};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{S as i,m as a,r as o,t as s}from"./button-Dyz7QGIk.js";import{Et as c}from"./DocumentContext-BHFNw5NZ.js";import{t as l}from"./circle-check-C-DpX4dU.js";import{a as u,c as d,i as f,n as p,o as m,s as h,t as g,x as _}from"./dialog-FUclf-NK.js";var v=i(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),y=i(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),b=i(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),x=i(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ee=i(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),S=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),C=e(t(),1),w=n(),T=`Label`,E=C.forwardRef((e,t)=>(0,w.jsx)(a.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));E.displayName=T;var D=E,O=r();function k(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function A(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(D,{"data-slot":`label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var te=`npx @inkeep/open-knowledge install-skill`,ne=`https://inkeep.github.io/open-knowledge/guides/install-claude-cowork`;function re(){return typeof window<`u`&&typeof window.okDesktop?.skill==`object`}function j(e){let t=(0,O.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,w.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 font-mono text-[0.85em]`,children:n}),t[0]=n,t[1]=r),r}function M(e){let t=(0,O.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=o(`font-mono tracking-wide uppercase text-primary font-medium text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,w.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function N(e){let t=(0,O.c)(4),{n}=e,r;t[0]===n?r=t[1]:(r=n.toString().padStart(2,`0`),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center text-xs font-medium text-muted-foreground font-mono tabular-nums`,children:r}),t[2]=r,t[3]=i),i}function P(){let e=(0,O.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(M,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,w.jsx)(N,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Customize`}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,w.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),`.`]})]}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,w.jsx)(N,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(`span`,{className:`inline-flex items-center justify-center font-medium border h-5 w-5 rounded-md text-xs`,children:`+`}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Create skill`}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,w.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Upload skill`}),`.`]})]}),e[10]=d):d=e[10];let f;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,w.jsx)(N,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,w.jsx)(j,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,w.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,w.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Downloads`}),` folder. It enables automatically.`]})]})]}),e[13]=m):m=e[13];let h;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),e[14]=h):h=e[14];let g;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[15]=g):g=e[15];let _;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,w.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),` Code execution and file creation`]}),` `,`first.`]})]}),e[16]=_):_=e[16],_}function F(e){let t=(0,O.c)(61),{open:n,onOpenChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={kind:`idle`},t[0]=i):i=t[0];let[a,o]=(0,C.useState)(i),[v,y]=(0,C.useState)(!1),S,T;t[1]===n?(S=t[2],T=t[3]):(S=()=>{n||(o({kind:`idle`}),y(!1))},T=[n],t[1]=n,t[2]=S,t[3]=T),(0,C.useEffect)(S,T);let E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=async function(){o({kind:`downloading`});let e=window.okDesktop?.skill;if(!e){o({kind:`error`,message:`Electron bridge unavailable. Refresh and try again.`});return}let t=await e.buildAndOpen();if(t.ok)o({kind:`handed-off`,path:t.path});else{let e=t.message??t.reason;_.error(`Install handoff failed: ${e}`),o({kind:`error`,message:t.reason===`open-failed`?`The Claude Desktop App didn't open the file. Is it installed? (${e})`:`${t.reason}: ${e}`})}},t[4]=E):E=t[4];let D=E,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=async function(){try{await navigator.clipboard.writeText(te),y(!0),setTimeout(()=>y(!1),2e3)}catch(e){let t=e;_.error(`Couldn't copy: ${t instanceof Error?t.message:String(t)}`)}},t[5]=k):k=t[5];let A=k,N;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=re(),t[6]=N):N=t[6];let F=N,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,w.jsxs)(d,{className:`flex items-center gap-2`,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install for Claude Chat & Cowork`]}),t[7]=I):I=t[7];let L;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,w.jsxs)(h,{children:[I,(0,w.jsxs)(u,{children:[`Adds the Open Knowledge skill to the`,` `,(0,w.jsx)(`strong`,{className:`font-medium text-foreground`,children:`Claude Desktop App`}),` so it's available in Chat and Cowork sessions.`]})]}),t[8]=L):L=t[8];let R;t[9]===a.kind?R=t[10]:(R=a.kind===`idle`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(M,{className:`text-muted-foreground`,children:`Automatic`}),(0,w.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,w.jsx)(j,{children:`openknowledge.skill`}),`, save it to`,` `,(0,w.jsx)(j,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,w.jsx)(P,{})]}),t[9]=a.kind,t[10]=R);let z;t[11]!==v||t[12]!==a.kind?(z=a.kind===`idle`&&!F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(M,{children:`Run this in your terminal`}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,w.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:te}),(0,w.jsx)(s,{variant:`ghost`,size:`sm`,onClick:A,"aria-label":`Copy command`,className:`h-7 gap-1`,children:v?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(b,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,w.jsx)(j,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,w.jsx)(P,{})]}),t[11]=v,t[12]=a.kind,t[13]=z):z=t[13];let B;t[14]===a.kind?B=t[15]:(B=a.kind===`downloading`&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,w.jsx)(j,{children:`openknowledge.skill`}),` and opening the Claude Desktop App…`]}),t[14]=a.kind,t[15]=B);let V;t[16]!==a.kind||t[17]!==a.path?(V=a.kind===`handed-off`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,w.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,w.jsx)(P,{})]}),t[16]=a.kind,t[17]=a.path,t[18]=V):V=t[18];let H;t[19]===a.kind?H=t[20]:(H=a.kind===`handed-off`&&!F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,w.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,w.jsx)(j,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,w.jsx)(P,{})]}),t[19]=a.kind,t[20]=H);let U;t[21]!==a.kind||t[22]!==a.message?(U=a.kind===`error`&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,w.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,w.jsx)(`a`,{href:ne,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs underline underline-offset-2 hover:text-foreground`,children:`See the full install guide`})]}),t[21]=a.kind,t[22]=a.message,t[23]=U):U=t[23];let W;t[24]!==z||t[25]!==B||t[26]!==V||t[27]!==H||t[28]!==U||t[29]!==R?(W=(0,w.jsx)(p,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-6 py-2`,children:[R,z,B,V,H,U]})}),t[24]=z,t[25]=B,t[26]=V,t[27]=H,t[28]=U,t[29]=R,t[30]=W):W=t[30];let G;t[31]===a.kind?G=t[32]:(G=a.kind!==`error`&&(0,w.jsxs)(`a`,{href:ne,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 self-center text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground sm:mr-auto font-mono tracking-wide uppercase`,children:[`Full guide`,(0,w.jsx)(ee,{"aria-hidden":`true`,className:`h-3 w-3`})]}),t[31]=a.kind,t[32]=G);let K;t[33]!==r||t[34]!==a.kind?(K=a.kind===`idle`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,w.jsxs)(s,{onClick:D,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install`]})]}),t[33]=r,t[34]=a.kind,t[35]=K):K=t[35];let q;t[36]!==r||t[37]!==a.kind?(q=a.kind===`idle`&&!F&&(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Close`}),t[36]=r,t[37]=a.kind,t[38]=q):q=t[38];let J;t[39]!==r||t[40]!==a.kind?(J=a.kind===`error`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,w.jsxs)(s,{onClick:D,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Try again`]})]}),t[39]=r,t[40]=a.kind,t[41]=J):J=t[41];let Y;t[42]===a.kind?Y=t[43]:(Y=a.kind===`downloading`&&(0,w.jsxs)(s,{disabled:!0,children:[(0,w.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Installing…`]}),t[42]=a.kind,t[43]=Y);let X;t[44]!==r||t[45]!==a.kind?(X=a.kind===`handed-off`&&(0,w.jsx)(s,{onClick:()=>r(!1),children:`Done`}),t[44]=r,t[45]=a.kind,t[46]=X):X=t[46];let Z;t[47]!==G||t[48]!==K||t[49]!==q||t[50]!==J||t[51]!==Y||t[52]!==X?(Z=(0,w.jsxs)(m,{children:[G,K,q,J,Y,X]}),t[47]=G,t[48]=K,t[49]=q,t[50]=J,t[51]=Y,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==W||t[55]!==Z?(Q=(0,w.jsxs)(f,{className:`sm:max-w-lg`,"data-ok-layer-spawned":``,children:[L,W,Z]}),t[54]=W,t[55]=Z,t[56]=Q):Q=t[56];let $;return t[57]!==r||t[58]!==n||t[59]!==Q?($=(0,w.jsx)(g,{open:n,onOpenChange:r,children:Q}),t[57]=r,t[58]=n,t[59]=Q,t[60]=$):$=t[60],$}var I=new Set;function L(e){for(let t of I)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function R(e){return I.add(e),()=>{I.delete(e)}}export{k as a,b as c,A as i,y as l,R as n,S as o,F as r,x as s,L as t,v as u};
1
+ import{r as e}from"./chunk-DECur_0Z.js";import{n as t,r as n,t as r}from"./compiler-runtime-Y11fyRVL.js";import{S as i,m as a,r as o,t as s}from"./button-Dyz7QGIk.js";import{Et as c}from"./DocumentContext-BRyrYElZ.js";import{t as l}from"./circle-check-C-DpX4dU.js";import{a as u,c as d,i as f,n as p,o as m,s as h,t as g,x as _}from"./dialog-FUclf-NK.js";var v=i(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),y=i(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),b=i(`copy`,[[`rect`,{width:`14`,height:`14`,x:`8`,y:`8`,rx:`2`,ry:`2`,key:`17jyea`}],[`path`,{d:`M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2`,key:`zix9uf`}]]),x=i(`download`,[[`path`,{d:`M12 15V3`,key:`m9g1x1`}],[`path`,{d:`M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4`,key:`ih7n3h`}],[`path`,{d:`m7 10 5 5 5-5`,key:`brsn70`}]]),ee=i(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),S=i(`plus`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`M12 5v14`,key:`s699le`}]]),C=e(t(),1),w=n(),T=`Label`,E=C.forwardRef((e,t)=>(0,w.jsx)(a.label,{...e,ref:t,onMouseDown:t=>{t.target.closest(`button, input, select, textarea`)||(e.onMouseDown?.(t),!t.defaultPrevented&&t.detail>1&&t.preventDefault())}}));E.displayName=T;var D=E,O=r();function k(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function A(e){let t=(0,O.c)(8),n,r;t[0]===e?(n=t[1],r=t[2]):({className:n,...r}=e,t[0]=e,t[1]=n,t[2]=r);let i;t[3]===n?i=t[4]:(i=o(`flex items-center gap-2 text-sm leading-none font-medium select-none group-data-[disabled=true]:pointer-events-none group-data-[disabled=true]:opacity-50 peer-disabled:cursor-not-allowed peer-disabled:opacity-50`,n),t[3]=n,t[4]=i);let a;return t[5]!==r||t[6]!==i?(a=(0,w.jsx)(D,{"data-slot":`label`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}var te=`npx @inkeep/open-knowledge install-skill`,ne=`https://inkeep.github.io/open-knowledge/guides/install-claude-cowork`;function re(){return typeof window<`u`&&typeof window.okDesktop?.skill==`object`}function j(e){let t=(0,O.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,w.jsx)(`code`,{className:`rounded-sm bg-muted px-1 py-0.5 font-mono text-[0.85em]`,children:n}),t[0]=n,t[1]=r),r}function M(e){let t=(0,O.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=o(`font-mono tracking-wide uppercase text-primary font-medium text-xs`,r),t[0]=r,t[1]=i);let a;return t[2]!==n||t[3]!==i?(a=(0,w.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function N(e){let t=(0,O.c)(4),{n}=e,r;t[0]===n?r=t[1]:(r=n.toString().padStart(2,`0`),t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,w.jsx)(`span`,{"aria-hidden":`true`,className:`flex h-5 w-5 shrink-0 items-center justify-center text-xs font-medium text-muted-foreground font-mono tabular-nums`,children:r}),t[2]=r,t[3]=i),i}function P(){let e=(0,O.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,w.jsx)(M,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,w.jsx)(N,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Customize`}),e[2]=r):r=e[2];let i;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(i=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[3]=i):i=e[3];let a;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(a=(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,w.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),`.`]})]}),e[4]=a):a=e[4];let o;e[5]===Symbol.for(`react.memo_cache_sentinel`)?(o=(0,w.jsx)(N,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,w.jsx)(`span`,{className:`inline-flex items-center justify-center font-medium border h-5 w-5 rounded-md text-xs`,children:`+`}),e[6]=s):s=e[6];let c;e[7]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[7]=c):c=e[7];let l;e[8]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Create skill`}),e[8]=l):l=e[8];let u;e[9]===Symbol.for(`react.memo_cache_sentinel`)?(u=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[9]=u):u=e[9];let d;e[10]===Symbol.for(`react.memo_cache_sentinel`)?(d=(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,w.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Upload skill`}),`.`]})]}),e[10]=d):d=e[10];let f;e[11]===Symbol.for(`react.memo_cache_sentinel`)?(f=(0,w.jsx)(N,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,w.jsx)(j,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,w.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,w.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,w.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,w.jsx)(`strong`,{className:`font-medium`,children:`Downloads`}),` folder. It enables automatically.`]})]})]}),e[13]=m):m=e[13];let h;e[14]===Symbol.for(`react.memo_cache_sentinel`)?(h=(0,w.jsx)(`strong`,{className:`font-medium`,children:`Skills`}),e[14]=h):h=e[14];let g;e[15]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[15]=g):g=e[15];let _;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(_=(0,w.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,w.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,w.jsx)(v,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),` Code execution and file creation`]}),` `,`first.`]})]}),e[16]=_):_=e[16],_}function F(e){let t=(0,O.c)(61),{open:n,onOpenChange:r}=e,i;t[0]===Symbol.for(`react.memo_cache_sentinel`)?(i={kind:`idle`},t[0]=i):i=t[0];let[a,o]=(0,C.useState)(i),[v,y]=(0,C.useState)(!1),S,T;t[1]===n?(S=t[2],T=t[3]):(S=()=>{n||(o({kind:`idle`}),y(!1))},T=[n],t[1]=n,t[2]=S,t[3]=T),(0,C.useEffect)(S,T);let E;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(E=async function(){o({kind:`downloading`});let e=window.okDesktop?.skill;if(!e){o({kind:`error`,message:`Electron bridge unavailable. Refresh and try again.`});return}let t=await e.buildAndOpen();if(t.ok)o({kind:`handed-off`,path:t.path});else{let e=t.message??t.reason;_.error(`Install handoff failed: ${e}`),o({kind:`error`,message:t.reason===`open-failed`?`The Claude Desktop App didn't open the file. Is it installed? (${e})`:`${t.reason}: ${e}`})}},t[4]=E):E=t[4];let D=E,k;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(k=async function(){try{await navigator.clipboard.writeText(te),y(!0),setTimeout(()=>y(!1),2e3)}catch(e){let t=e;_.error(`Couldn't copy: ${t instanceof Error?t.message:String(t)}`)}},t[5]=k):k=t[5];let A=k,N;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(N=re(),t[6]=N):N=t[6];let F=N,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,w.jsxs)(d,{className:`flex items-center gap-2`,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install for Claude Chat & Cowork`]}),t[7]=I):I=t[7];let L;t[8]===Symbol.for(`react.memo_cache_sentinel`)?(L=(0,w.jsxs)(h,{children:[I,(0,w.jsxs)(u,{children:[`Adds the Open Knowledge skill to the`,` `,(0,w.jsx)(`strong`,{className:`font-medium text-foreground`,children:`Claude Desktop App`}),` so it's available in Chat and Cowork sessions.`]})]}),t[8]=L):L=t[8];let R;t[9]===a.kind?R=t[10]:(R=a.kind===`idle`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(M,{className:`text-muted-foreground`,children:`Automatic`}),(0,w.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,w.jsx)(j,{children:`openknowledge.skill`}),`, save it to`,` `,(0,w.jsx)(j,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,w.jsx)(P,{})]}),t[9]=a.kind,t[10]=R);let z;t[11]!==v||t[12]!==a.kind?(z=a.kind===`idle`&&!F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,w.jsx)(M,{children:`Run this in your terminal`}),(0,w.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,w.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:te}),(0,w.jsx)(s,{variant:`ghost`,size:`sm`,onClick:A,"aria-label":`Copy command`,className:`h-7 gap-1`,children:v?(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(b,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,w.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,w.jsx)(j,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,w.jsx)(P,{})]}),t[11]=v,t[12]=a.kind,t[13]=z):z=t[13];let B;t[14]===a.kind?B=t[15]:(B=a.kind===`downloading`&&(0,w.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,w.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,w.jsx)(j,{children:`openknowledge.skill`}),` and opening the Claude Desktop App…`]}),t[14]=a.kind,t[15]=B);let V;t[16]!==a.kind||t[17]!==a.path?(V=a.kind===`handed-off`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,w.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,w.jsx)(P,{})]}),t[16]=a.kind,t[17]=a.path,t[18]=V):V=t[18];let H;t[19]===a.kind?H=t[20]:(H=a.kind===`handed-off`&&!F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,w.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,w.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,w.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,w.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,w.jsx)(j,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,w.jsx)(P,{})]}),t[19]=a.kind,t[20]=H);let U;t[21]!==a.kind||t[22]!==a.message?(U=a.kind===`error`&&(0,w.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,w.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,w.jsx)(`a`,{href:ne,target:`_blank`,rel:`noopener noreferrer`,className:`text-xs underline underline-offset-2 hover:text-foreground`,children:`See the full install guide`})]}),t[21]=a.kind,t[22]=a.message,t[23]=U):U=t[23];let W;t[24]!==z||t[25]!==B||t[26]!==V||t[27]!==H||t[28]!==U||t[29]!==R?(W=(0,w.jsx)(p,{children:(0,w.jsxs)(`div`,{className:`flex flex-col gap-6 py-2`,children:[R,z,B,V,H,U]})}),t[24]=z,t[25]=B,t[26]=V,t[27]=H,t[28]=U,t[29]=R,t[30]=W):W=t[30];let G;t[31]===a.kind?G=t[32]:(G=a.kind!==`error`&&(0,w.jsxs)(`a`,{href:ne,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1 self-center text-xs text-muted-foreground underline underline-offset-2 hover:text-foreground sm:mr-auto font-mono tracking-wide uppercase`,children:[`Full guide`,(0,w.jsx)(ee,{"aria-hidden":`true`,className:`h-3 w-3`})]}),t[31]=a.kind,t[32]=G);let K;t[33]!==r||t[34]!==a.kind?(K=a.kind===`idle`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,w.jsxs)(s,{onClick:D,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Install`]})]}),t[33]=r,t[34]=a.kind,t[35]=K):K=t[35];let q;t[36]!==r||t[37]!==a.kind?(q=a.kind===`idle`&&!F&&(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Close`}),t[36]=r,t[37]=a.kind,t[38]=q):q=t[38];let J;t[39]!==r||t[40]!==a.kind?(J=a.kind===`error`&&F&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,w.jsxs)(s,{onClick:D,children:[(0,w.jsx)(x,{"aria-hidden":`true`,className:`h-4 w-4`}),`Try again`]})]}),t[39]=r,t[40]=a.kind,t[41]=J):J=t[41];let Y;t[42]===a.kind?Y=t[43]:(Y=a.kind===`downloading`&&(0,w.jsxs)(s,{disabled:!0,children:[(0,w.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Installing…`]}),t[42]=a.kind,t[43]=Y);let X;t[44]!==r||t[45]!==a.kind?(X=a.kind===`handed-off`&&(0,w.jsx)(s,{onClick:()=>r(!1),children:`Done`}),t[44]=r,t[45]=a.kind,t[46]=X):X=t[46];let Z;t[47]!==G||t[48]!==K||t[49]!==q||t[50]!==J||t[51]!==Y||t[52]!==X?(Z=(0,w.jsxs)(m,{children:[G,K,q,J,Y,X]}),t[47]=G,t[48]=K,t[49]=q,t[50]=J,t[51]=Y,t[52]=X,t[53]=Z):Z=t[53];let Q;t[54]!==W||t[55]!==Z?(Q=(0,w.jsxs)(f,{className:`sm:max-w-lg`,"data-ok-layer-spawned":``,children:[L,W,Z]}),t[54]=W,t[55]=Z,t[56]=Q):Q=t[56];let $;return t[57]!==r||t[58]!==n||t[59]!==Q?($=(0,w.jsx)(g,{open:n,onOpenChange:r,children:Q}),t[57]=r,t[58]=n,t[59]=Q,t[60]=$):$=t[60],$}var I=new Set;function L(e){for(let t of I)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function R(e){return I.add(e),()=>{I.delete(e)}}export{k as a,b as c,A as i,y as l,R as n,S as o,F as r,x as s,L as t,v as u};