@inkeep/open-knowledge 0.0.0-dev-20260501054734 → 0.0.0-dev-20260501071238
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/assets/skills/open-knowledge/SKILL.md +12 -12
- package/dist/cli.mjs +345 -346
- package/dist/config-schema.json +1 -30
- package/dist/config.project.schema.json +1 -30
- package/dist/constants-Ccx0q5EO.mjs +2 -0
- package/dist/dist-B-uWyCj3.mjs +1 -0
- package/dist/{dist-Bk22-nn7.mjs → dist-CUghvkAf.mjs} +72 -70
- package/dist/{dist-BKxD-v-w.mjs → dist-WQbZIrx7.mjs} +36 -36
- package/dist/index.d.mts +1 -3
- package/dist/index.mjs +1 -1
- package/dist/{init-DEHyWHMa.mjs → init-DMUmlRUV.mjs} +29 -29
- package/dist/{init-DVZtt6e-.mjs → init-DQVmtI8h.mjs} +25 -16
- package/dist/init-Dd-ypqWc.mjs +1 -0
- package/dist/init-jnyR2hTf.mjs +1 -0
- package/dist/loader-IVNXMdm0.mjs +4 -0
- package/dist/loader-dh9DEQFy.mjs +1 -0
- package/dist/paths-Bp5ooOJg.mjs +2 -0
- package/dist/paths-CcnZRq8W.mjs +1 -0
- package/dist/preview-SUAZQ5h2.mjs +1 -0
- package/dist/preview-tSq0pzNL.mjs +3 -0
- package/dist/public/assets/{ActivityModeContent-BSkmKRy4.js → ActivityModeContent-Bj0kOgDy.js} +1 -1
- package/dist/public/assets/{DocumentContext-D3zjM2ax.js → DocumentContext-CDvFNgd7.js} +1 -1
- package/dist/public/assets/{GraphPanel-jbwIk-JX.js → GraphPanel-YIuSwj1X.js} +1 -1
- package/dist/public/assets/{SettingsPane-Bj0EiYda.js → SettingsPane-BYRRZ2yt.js} +1 -1
- package/dist/public/assets/{SourceEditor-Dz2Lc5LE.js → SourceEditor-BkBM9oYb.js} +1 -1
- package/dist/public/assets/{clipboard-i7TzBQ01.js → clipboard-BTbzStNo.js} +1 -1
- package/dist/public/assets/{config-validation-events-DpHbVC_H.js → config-validation-events-gPU2C30Q.js} +1 -1
- package/dist/public/assets/{index-joGKm2Br.js → index-C0JKXDVX.js} +71 -71
- package/dist/public/assets/{target-navigation-intent-CK4Ee17H.js → target-navigation-intent-BeUCdVKa.js} +1 -1
- package/dist/public/assets/{toggle-group-n36XMgMC.js → toggle-group-CyBGhndP.js} +6 -4
- package/dist/public/assets/{tooltip-BM5o_T0o.js → tooltip-FdwzzIbl.js} +1 -1
- package/dist/public/index.html +7 -7
- package/dist/schemas/v0/config.project.schema.json +1 -30
- package/dist/server-Bc0tGxRk.mjs +3 -0
- package/dist/{server-lock-n3Y5JWNv-3o7br8XE.mjs → server-lock-BAi_a4NX-CRPhQdIH.mjs} +1 -1
- package/dist/server-lock-BAi_a4NX-uRxotxS6.mjs +1 -0
- package/dist/src-B-NdiXlJ.mjs +1 -0
- package/dist/start-CUBxPqPc.mjs +2 -0
- package/dist/start-GoM45WVd.mjs +1 -0
- package/package.json +1 -1
- package/scripts/build-config-schema.mjs +2 -2
- package/dist/constants-C_Xn28oM.mjs +0 -2
- package/dist/dist-BuWOuGGO.mjs +0 -1
- package/dist/init-BrZlKzcx.mjs +0 -1
- package/dist/init-gZdio8Wt.mjs +0 -1
- package/dist/loader-CEV6AVlU.mjs +0 -1
- package/dist/loader-DD2NITvw.mjs +0 -2
- package/dist/paths-Dwr32i3p.mjs +0 -1
- package/dist/paths-ajeOK0uP.mjs +0 -2
- package/dist/preview-C86aCB1t.mjs +0 -3
- package/dist/preview-D6fWJCDu.mjs +0 -1
- package/dist/server-CYax-BjV.mjs +0 -3
- package/dist/server-lock-n3Y5JWNv-DXpg9_eU.mjs +0 -1
- package/dist/src-D6R3jg-t.mjs +0 -1
- package/dist/start-D5tAdx92.mjs +0 -2
- package/dist/start-DG0Lr5vX.mjs +0 -1
|
@@ -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{St as c}from"./DocumentContext-D3zjM2ax.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=e(t(),1),C=n(),w=`Label`,T=S.forwardRef((e,t)=>(0,C.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())}}));T.displayName=w;var E=T,D=r();function O(e){let t=(0,D.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,C.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function k(e){let t=(0,D.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,C.jsx)(E,{"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 A(e){let t=(0,D.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,C.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 j(e){let t=(0,D.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,C.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function M(e){let t=(0,D.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,C.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 N(){let e=(0,D.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(j,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,C.jsx)(M,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,C.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,C.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,C.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,C.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,C.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,C.jsx)(M,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,C.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,C.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,C.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,C.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,C.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,C.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,C.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,C.jsx)(M,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,C.jsx)(A,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,C.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,C.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,C.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,C.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,C.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,C.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,C.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,C.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,C.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 P(e){let t=(0,D.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,S.useState)(i),[v,y]=(0,S.useState)(!1),w,T;t[1]===n?(w=t[2],T=t[3]):(w=()=>{n||(o({kind:`idle`}),y(!1))},T=[n],t[1]=n,t[2]=w,t[3]=T),(0,S.useEffect)(w,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 O=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 M=k,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=re(),t[6]=P):P=t[6];let F=P,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,C.jsxs)(d,{className:`flex items-center gap-2`,children:[(0,C.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,C.jsxs)(h,{children:[I,(0,C.jsxs)(u,{children:[`Adds the Open Knowledge skill to the`,` `,(0,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(j,{className:`text-muted-foreground`,children:`Automatic`}),(0,C.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,C.jsx)(A,{children:`openknowledge.skill`}),`, save it to`,` `,(0,C.jsx)(A,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,C.jsx)(N,{})]}),t[9]=a.kind,t[10]=R);let z;t[11]!==v||t[12]!==a.kind?(z=a.kind===`idle`&&!F&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(j,{children:`Run this in your terminal`}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,C.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:te}),(0,C.jsx)(s,{variant:`ghost`,size:`sm`,onClick:M,"aria-label":`Copy command`,className:`h-7 gap-1`,children:v?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(b,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,C.jsx)(A,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,C.jsx)(N,{})]}),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,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,C.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,C.jsx)(A,{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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,C.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,C.jsx)(N,{})]}),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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,C.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,C.jsx)(A,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,C.jsx)(N,{})]}),t[19]=a.kind,t[20]=H);let U;t[21]!==a.kind||t[22]!==a.message?(U=a.kind===`error`&&(0,C.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,C.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,C.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,C.jsx)(p,{children:(0,C.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,C.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,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,C.jsxs)(s,{onClick:O,children:[(0,C.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,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,C.jsxs)(s,{onClick:O,children:[(0,C.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,C.jsxs)(s,{disabled:!0,children:[(0,C.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,C.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,C.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,C.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,C.jsx)(g,{open:n,onOpenChange:r,children:Q}),t[57]=r,t[58]=n,t[59]=Q,t[60]=$):$=t[60],$}var F=new Set;function I(e){for(let t of F)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function L(e){return F.add(e),()=>{F.delete(e)}}export{O as a,y as c,k as i,v as l,L as n,x as o,P as r,b as s,I as t};
|
|
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{St as c}from"./DocumentContext-CDvFNgd7.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=e(t(),1),C=n(),w=`Label`,T=S.forwardRef((e,t)=>(0,C.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())}}));T.displayName=w;var E=T,D=r();function O(e){let t=(0,D.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,C.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=a):a=t[7],a}function k(e){let t=(0,D.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,C.jsx)(E,{"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 A(e){let t=(0,D.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,C.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 j(e){let t=(0,D.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,C.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=a):a=t[4],a}function M(e){let t=(0,D.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,C.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 N(){let e=(0,D.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,C.jsx)(j,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,C.jsx)(M,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,C.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,C.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,C.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,C.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,C.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,C.jsx)(M,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,C.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,C.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,C.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,C.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,C.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,C.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,C.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,C.jsx)(M,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,C.jsx)(A,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,C.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,C.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,C.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,C.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,C.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,C.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,C.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,C.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,C.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 P(e){let t=(0,D.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,S.useState)(i),[v,y]=(0,S.useState)(!1),w,T;t[1]===n?(w=t[2],T=t[3]):(w=()=>{n||(o({kind:`idle`}),y(!1))},T=[n],t[1]=n,t[2]=w,t[3]=T),(0,S.useEffect)(w,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 O=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 M=k,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=re(),t[6]=P):P=t[6];let F=P,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,C.jsxs)(d,{className:`flex items-center gap-2`,children:[(0,C.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,C.jsxs)(h,{children:[I,(0,C.jsxs)(u,{children:[`Adds the Open Knowledge skill to the`,` `,(0,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(j,{className:`text-muted-foreground`,children:`Automatic`}),(0,C.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,C.jsx)(A,{children:`openknowledge.skill`}),`, save it to`,` `,(0,C.jsx)(A,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,C.jsx)(N,{})]}),t[9]=a.kind,t[10]=R);let z;t[11]!==v||t[12]!==a.kind?(z=a.kind===`idle`&&!F&&(0,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,C.jsx)(j,{children:`Run this in your terminal`}),(0,C.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,C.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:te}),(0,C.jsx)(s,{variant:`ghost`,size:`sm`,onClick:M,"aria-label":`Copy command`,className:`h-7 gap-1`,children:v?(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(b,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,C.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,C.jsx)(A,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,C.jsx)(N,{})]}),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,C.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,C.jsx)(c,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,C.jsx)(A,{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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,C.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,C.jsx)(N,{})]}),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,C.jsxs)(C.Fragment,{children:[(0,C.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,C.jsx)(l,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,C.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,C.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,C.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,C.jsx)(A,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,C.jsx)(N,{})]}),t[19]=a.kind,t[20]=H);let U;t[21]!==a.kind||t[22]!==a.message?(U=a.kind===`error`&&(0,C.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,C.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,C.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,C.jsx)(p,{children:(0,C.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,C.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,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,C.jsxs)(s,{onClick:O,children:[(0,C.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,C.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,C.jsxs)(C.Fragment,{children:[(0,C.jsx)(s,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,C.jsxs)(s,{onClick:O,children:[(0,C.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,C.jsxs)(s,{disabled:!0,children:[(0,C.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,C.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,C.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,C.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,C.jsx)(g,{open:n,onOpenChange:r,children:Q}),t[57]=r,t[58]=n,t[59]=Q,t[60]=$):$=t[60],$}var F=new Set;function I(e){for(let t of F)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function L(e){return F.add(e),()=>{F.delete(e)}}export{O as a,y as c,k as i,v as l,L as n,x as o,P as r,b as s,I as t};
|