@inkeep/open-knowledge 0.0.0-dev-20260501034226 → 0.0.0-dev-20260501045551

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 (38) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +15 -0
  2. package/dist/cli.mjs +7 -7
  3. package/dist/constants-CYAWu1t_.mjs +2 -0
  4. package/dist/index.mjs +1 -1
  5. package/dist/init-3aNImgts.mjs +1 -0
  6. package/dist/{init-298Ayrtx.mjs → init-C4wke4uB.mjs} +2 -2
  7. package/dist/{init-CXD7S1br.mjs → init-CD1Q6xzB.mjs} +3 -3
  8. package/dist/init-DcSlN0vZ.mjs +1 -0
  9. package/dist/loader-C-9Jcwv3.mjs +1 -0
  10. package/dist/{loader-CBGPucqb.mjs → loader-LlG0LgdL.mjs} +2 -2
  11. package/dist/paths-CinA1Uub.mjs +2 -0
  12. package/dist/paths-D8xkWudL.mjs +1 -0
  13. package/dist/{preview-YdZO7Xe-.mjs → preview-BaEgnUY0.mjs} +2 -2
  14. package/dist/preview-j16n7DSe.mjs +1 -0
  15. package/dist/public/assets/{ActivityModeContent-Dh5iGi22.js → ActivityModeContent-BLbgxGR9.js} +1 -1
  16. package/dist/public/assets/{DocumentContext-BtLDstmc.js → DocumentContext-CjSzCZL0.js} +1 -1
  17. package/dist/public/assets/SettingsPane-ztNlE-yh.js +6 -0
  18. package/dist/public/assets/{SourceEditor-C0WLCZqD.js → SourceEditor-D-FWP4Ng.js} +1 -1
  19. package/dist/public/assets/{clipboard-CIRkQ4_J.js → clipboard-DiHLkR-W.js} +1 -1
  20. package/dist/public/assets/config-validation-events-GcLpFEMN.js +1 -0
  21. package/dist/public/assets/{index-BbGfAZdV.css → index-Du0-WJgD.css} +1 -1
  22. package/dist/public/assets/{index-CrNx3AgB.js → index-kpNzOlZa.js} +72 -72
  23. package/dist/public/index.html +6 -6
  24. package/dist/src-aFcF98AM.mjs +1 -0
  25. package/dist/start-DW0GxweG.mjs +1 -0
  26. package/dist/{start-S8FFCxLU.mjs → start-cf2OdewF.mjs} +2 -2
  27. package/package.json +1 -1
  28. package/dist/constants-BVSgu1p0.mjs +0 -2
  29. package/dist/init-BRaqMC9N.mjs +0 -1
  30. package/dist/init-CFRhnDnB.mjs +0 -1
  31. package/dist/loader-Cl1JDwMN.mjs +0 -1
  32. package/dist/paths-B42XU6NV.mjs +0 -1
  33. package/dist/paths-C7JyDBWk.mjs +0 -2
  34. package/dist/preview-DMu5oITV.mjs +0 -1
  35. package/dist/public/assets/SettingsPane-C93_FdcE.js +0 -5
  36. package/dist/public/assets/config-validation-events-ClxIZ8iZ.js +0 -1
  37. package/dist/src-r-4kerBt.mjs +0 -1
  38. package/dist/start-DUwONCW8.mjs +0 -1
@@ -20,7 +20,7 @@
20
20
  nothing for the formatter to reindent.
21
21
  -->
22
22
  <script>(() => { let mode = 'wysiwyg'; try { const raw = localStorage.getItem('ok-editor-mode-v1'); if (raw === 'wysiwyg' || raw === 'source') mode = raw; } catch {} window.__OK_EDITOR_MODE__ = mode; })();</script>
23
- <script type="module" crossorigin src="./assets/index-CrNx3AgB.js"></script>
23
+ <script type="module" crossorigin src="./assets/index-kpNzOlZa.js"></script>
24
24
  <link rel="modulepreload" crossorigin href="./assets/chunk-DECur_0Z.js">
25
25
  <link rel="modulepreload" crossorigin href="./assets/trace-api-CbLDdnQA.js">
26
26
  <link rel="modulepreload" crossorigin href="./assets/propagation-api-LnD10wq2.js">
@@ -32,16 +32,16 @@
32
32
  <link rel="modulepreload" crossorigin href="./assets/toggle-group-n36XMgMC.js">
33
33
  <link rel="modulepreload" crossorigin href="./assets/dist-RVD4DzGH.js">
34
34
  <link rel="modulepreload" crossorigin href="./assets/dialog-FUclf-NK.js">
35
- <link rel="modulepreload" crossorigin href="./assets/DocumentContext-BtLDstmc.js">
35
+ <link rel="modulepreload" crossorigin href="./assets/DocumentContext-CjSzCZL0.js">
36
36
  <link rel="modulepreload" crossorigin href="./assets/panel-DT62BXGr.js">
37
- <link rel="modulepreload" crossorigin href="./assets/clipboard-CIRkQ4_J.js">
37
+ <link rel="modulepreload" crossorigin href="./assets/clipboard-DiHLkR-W.js">
38
+ <link rel="modulepreload" crossorigin href="./assets/circle-check-C-DpX4dU.js">
39
+ <link rel="modulepreload" crossorigin href="./assets/config-validation-events-GcLpFEMN.js">
38
40
  <link rel="modulepreload" crossorigin href="./assets/tooltip-BM5o_T0o.js">
39
41
  <link rel="modulepreload" crossorigin href="./assets/agent-presence-BxT9uQ-C.js">
40
- <link rel="modulepreload" crossorigin href="./assets/circle-check-C-DpX4dU.js">
41
- <link rel="modulepreload" crossorigin href="./assets/config-validation-events-ClxIZ8iZ.js">
42
42
  <link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-CK4Ee17H.js">
43
43
  <link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-BBTXqzE6.js">
44
- <link rel="stylesheet" crossorigin href="./assets/index-BbGfAZdV.css">
44
+ <link rel="stylesheet" crossorigin href="./assets/index-Du0-WJgD.css">
45
45
  </head>
46
46
 
47
47
  <body class="antialiased">
@@ -0,0 +1 @@
1
+ import"./loader-LlG0LgdL.mjs";import"./init-CD1Q6xzB.mjs";export{};
@@ -0,0 +1 @@
1
+ import{o as e}from"./start-cf2OdewF.mjs";export{e as startCommand};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./esm-wByiX8MO.mjs";import{$ as t}from"./dist-Bk22-nn7.mjs";import{i as n}from"./constants-BVSgu1p0.mjs";import{spawn as r}from"node:child_process";import{join as i}from"node:path";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c}from"node:fs";import{setTimeout as l}from"node:timers/promises";function u(){let e=process.execPath,t=process.argv[1];return t?{command:e,prefixArgs:[t]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx @inkeep/open-knowledge\`. This re-introduces the version-drift surface that re-exec was fixing. Observed argv: ${JSON.stringify(process.argv)}`),{command:`npx`,prefixArgs:[`@inkeep/open-knowledge`]})}function d(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function f(e){o(e.lockDir)||s(e.lockDir,{recursive:!0});let t=c(i(e.lockDir,`last-spawn-error.log`),`w`),n=e.spawn??r,{PORT:l,...d}=process.env,f=u();try{let r=n(f.command,[...f.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:d});return r.unref(),r}finally{try{a(t)}catch{}}}async function p(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}function m(e){let t=e.sigtermGraceMs??1e4,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>l(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function h(e){let{config:n,cwd:r}=e,i=e.skipAutoInit??!1,a=e.skipUiAutoSpawn??!1,o=e.idleThresholdMs??18e5,{existsSync:s,mkdirSync:c}=await import(`node:fs`),{resolve:u}=await import(`node:path`),{bootServer:h,ensureProjectGit:g,getLogger:_,isProcessAlive:v,readUiLock:y}=await import(`./dist-BuWOuGGO.mjs`),{resolveContentDir:b}=await import(`./paths-B42XU6NV.mjs`),x=e.log??_(`start`),S=b(n,r);s(S)||(c(S,{recursive:!0}),x.info({contentDir:S},`Created content directory`));let C=!s(u(r,t)),w=i?void 0:async()=>{try{let{initContent:e}=await import(`./init-CFRhnDnB.mjs`),t=e(r);return C||t.created.length>0||t.updated.length>0}catch(e){return console.warn(`Auto-init failed:`,e instanceof Error?e.message:e),!1}},T=!1,E=u(S,t),D=n.server.openOnAgentEdit?()=>{if(T)return;let e=y(E);if(!e||e.port<=0||!v(e.pid))return;T=!0;let t=`http://localhost:${e.port}`;import(`./open-browser-hvFa-TeR.mjs`).then(({openBrowser:e})=>e(t)).catch(()=>{})}:void 0,O=null,k=await h({contentDir:S,projectDir:r,contentRoot:n.content.dir,port:e.port,host:n.server.host,quiet:!1,includePatterns:n.content.include,excludePatterns:n.content.exclude,onAgentWrite:D,localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:!0,idleShutdownMs:o,skipAutoInit:i,autoInitFn:w,ensureProjectGitFn:i?void 0:()=>g(r),spawnUiSiblingFn:async({lockDir:t})=>{if(O=d({uiLock:y(t),isAlive:v}),O.action===`spawn`&&!a)try{f({lockDir:t,cwd:r,spawn:e.spawn}),x.info({reason:O.reason},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else O.action===`skip`&&x.info({port:O.port,pid:O.pid},`UI already running at port ${O.port}`)},idleShutdownHandler:e=>m({readUiLock:()=>y(k.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:x}),log:x});O||={action:`skip`,reason:`alive`,pid:0,port:0};let A=O,j=null;if(A.action===`skip`)j=A.port>0?A.port:null;else if(!a){let t=e.uiBindTimeoutMs??3e3;j=await p({readUiLock:()=>y(k.lockDir),now:Date.now,sleep:e=>l(e),timeoutMs:t,pollIntervalMs:50}),j===null&&x.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:k.httpServer,destroy:k.destroy,lockDir:k.lockDir,contentDir:S,port:k.port,ready:k.ready,degraded:k.degraded,uiSpawnDecision:O,resolvedUiPort:j,didAutoInit:k.didAutoInit,didGitInit:k.didGitInit}}function g(r){return new e(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--no-init`,`Skip auto-scaffolding of ${t}/`).action(async e=>{let{renderBanner:i}=await import(`./banner-DoFNyNUH.mjs`),{dim:a,error:o,info:s,warning:c}=await import(`./colors-CswooXAS.mjs`),l=r(),u=process.cwd();e.host!==void 0&&(l.server.host=e.host);let d=e.port===void 0?void 0:Number(e.port),f=process.env.PORT?Number(process.env.PORT):void 0,p=d??f,m;try{m=await h({config:l,cwd:u,port:p,skipAutoInit:e.init===!1})}catch(e){let{ProjectGitInitError:t}=await import(`./dist-BuWOuGGO.mjs`);e instanceof t&&(console.error(o(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.`)),e.stderr&&console.error(a(e.stderr.trim())),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let g=!1,_=async e=>{if(!g){g=!0,console.log(a(`\nShutting down (${e})...`));try{await m.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)}};process.once(`SIGINT`,()=>{_(`SIGINT`)}),process.once(`SIGTERM`,()=>{_(`SIGTERM`)});let v=`http://${l.server.host}:${m.port}`,y=l.server.host===`0.0.0.0`||l.server.host===`::`?`http://0.0.0.0:${m.port}`:void 0,b=m.resolvedUiPort,x=b!==null&&b>0?`http://${l.server.host}:${b}`:v;console.log(i({name:`open-knowledge`,version:n,localUrl:x,apiUrl:x===v?void 0:v,networkUrl:y})),m.didAutoInit&&(console.log(` ${s(`✓`)} Scaffolded ${t}/ (first run)`),console.log(` ${a("Tip: Run `open-knowledge init` to register MCP tools for Claude Code")}\n`));let S={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};m.ready.then(async()=>{if(m.degraded.length>0){console.log();for(let e of m.degraded){let t=S[e]??`${e} (check server logs for details)`;console.warn(` ${c(`⚠`)} ${c(e)}: ${a(t)}`)}console.log()}if(m.didAutoInit||m.didGitInit)if(m.didGitInit&&console.log(`\n ${s(`✓`)} Initialized git repo at ${u}/.git/ (default branch: main)`),m.didAutoInit)try{let{previewContent:e,formatPreviewBlock:t}=await import(`./preview-DMu5oITV.mjs`),n=e({projectDir:u,contentDir:m.contentDir,include:l.content.include,exclude:l.content.exclude});console.log(`\n${t(n,u)}\n`)}catch(e){console.warn(`Content preview unavailable: ${e instanceof Error?e.message:String(e)}`)}else console.log();if(e.open){let{openBrowser:e}=await import(`./open-browser-hvFa-TeR.mjs`);e(x)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})})}export{f as a,d as i,h as n,g as o,m as r,u as s,p as t};
2
- //# sourceMappingURL=start-S8FFCxLU.mjs.map
1
+ import{t as e}from"./esm-wByiX8MO.mjs";import{$ as t}from"./dist-Bk22-nn7.mjs";import{i as n}from"./constants-CYAWu1t_.mjs";import{spawn as r}from"node:child_process";import{join as i}from"node:path";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c}from"node:fs";import{setTimeout as l}from"node:timers/promises";function u(){let e=process.execPath,t=process.argv[1];return t?{command:e,prefixArgs:[t]}:(console.warn(`[self-spawn] process.argv[1] is empty — falling back to \`npx @inkeep/open-knowledge\`. This re-introduces the version-drift surface that re-exec was fixing. Observed argv: ${JSON.stringify(process.argv)}`),{command:`npx`,prefixArgs:[`@inkeep/open-knowledge`]})}function d(e){return e.uiLock?e.isAlive(e.uiLock.pid)?{action:`skip`,reason:`alive`,pid:e.uiLock.pid,port:e.uiLock.port}:{action:`spawn`,reason:`stale`,stalePid:e.uiLock.pid}:{action:`spawn`,reason:`absent`}}function f(e){o(e.lockDir)||s(e.lockDir,{recursive:!0});let t=c(i(e.lockDir,`last-spawn-error.log`),`w`),n=e.spawn??r,{PORT:l,...d}=process.env,f=u();try{let r=n(f.command,[...f.prefixArgs,...e.args??[`ui`]],{detached:!0,stdio:[`ignore`,`ignore`,t],cwd:e.cwd,env:d});return r.unref(),r}finally{try{a(t)}catch{}}}async function p(e){let t=e.now()+e.timeoutMs;for(;e.now()<t;){let t=e.readUiLock();if(t&&t.port>0)return t.port;await e.sleep(e.pollIntervalMs)}let n=e.readUiLock();return n&&n.port>0?n.port:null}function m(e){let t=e.sigtermGraceMs??1e4,n=e.sigtermPollIntervalMs??200,r=e.sleep??(e=>l(e));return async()=>{try{let i=e.readUiLock();if(i&&e.isAlive(i.pid))try{e.killPid(i.pid,`SIGTERM`),e.log?.info({pid:i.pid,port:i.port},`idle-shutdown: SIGTERM UI sibling`);let a=Date.now()+t;for(;Date.now()<a&&e.isAlive(i.pid);)await r(n);if(e.isAlive(i.pid))try{e.killPid(i.pid,`SIGKILL`),e.log?.warn({pid:i.pid,graceMs:t},`idle-shutdown: SIGTERM grace expired — escalated to SIGKILL`)}catch(t){e.log?.error({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: SIGKILL failed`)}}catch(t){e.log?.warn({pid:i.pid,err:t instanceof Error?t.message:String(t)},`idle-shutdown: failed to SIGTERM UI sibling`)}}catch(t){e.log?.warn({err:t instanceof Error?t.message:String(t)},`idle-shutdown: UI lookup failed; proceeding with destroy`)}await e.destroy()}}async function h(e){let{config:n,cwd:r}=e,i=e.skipAutoInit??!1,a=e.skipUiAutoSpawn??!1,o=e.idleThresholdMs??18e5,{existsSync:s,mkdirSync:c}=await import(`node:fs`),{resolve:u}=await import(`node:path`),{bootServer:h,ensureProjectGit:g,getLogger:_,isProcessAlive:v,readUiLock:y}=await import(`./dist-BuWOuGGO.mjs`),{resolveContentDir:b}=await import(`./paths-D8xkWudL.mjs`),x=e.log??_(`start`),S=b(n,r);s(S)||(c(S,{recursive:!0}),x.info({contentDir:S},`Created content directory`));let C=!s(u(r,t)),w=i?void 0:async()=>{try{let{initContent:e}=await import(`./init-3aNImgts.mjs`),t=e(r);return C||t.created.length>0||t.updated.length>0}catch(e){return console.warn(`Auto-init failed:`,e instanceof Error?e.message:e),!1}},T=!1,E=u(S,t),D=n.server.openOnAgentEdit?()=>{if(T)return;let e=y(E);if(!e||e.port<=0||!v(e.pid))return;T=!0;let t=`http://localhost:${e.port}`;import(`./open-browser-hvFa-TeR.mjs`).then(({openBrowser:e})=>e(t)).catch(()=>{})}:void 0,O=null,k=await h({contentDir:S,projectDir:r,contentRoot:n.content.dir,port:e.port,host:n.server.host,quiet:!1,includePatterns:n.content.include,excludePatterns:n.content.exclude,onAgentWrite:D,localOpCliArgs:[process.execPath,process.argv[1]],attachUiSibling:!0,idleShutdownMs:o,skipAutoInit:i,autoInitFn:w,ensureProjectGitFn:i?void 0:()=>g(r),spawnUiSiblingFn:async({lockDir:t})=>{if(O=d({uiLock:y(t),isAlive:v}),O.action===`spawn`&&!a)try{f({lockDir:t,cwd:r,spawn:e.spawn}),x.info({reason:O.reason},`[start] auto-spawned ok ui sibling`)}catch(e){console.warn(`[start] failed to auto-spawn ok ui: ${e instanceof Error?e.message:String(e)}`)}else O.action===`skip`&&x.info({port:O.port,pid:O.pid},`UI already running at port ${O.port}`)},idleShutdownHandler:e=>m({readUiLock:()=>y(k.lockDir),isAlive:v,killPid:(e,t)=>{process.kill(e,t)},destroy:e,log:x}),log:x});O||={action:`skip`,reason:`alive`,pid:0,port:0};let A=O,j=null;if(A.action===`skip`)j=A.port>0?A.port:null;else if(!a){let t=e.uiBindTimeoutMs??3e3;j=await p({readUiLock:()=>y(k.lockDir),now:Date.now,sleep:e=>l(e),timeoutMs:t,pollIntervalMs:50}),j===null&&x.warn({timeoutMs:t},`[start] ok ui did not bind within timeout — banner falls back to API URL`)}return{httpServer:k.httpServer,destroy:k.destroy,lockDir:k.lockDir,contentDir:S,port:k.port,ready:k.ready,degraded:k.degraded,uiSpawnDecision:O,resolvedUiPort:j,didAutoInit:k.didAutoInit,didGitInit:k.didGitInit}}function g(r){return new e(`start`).description(`Start the knowledge base collab server`).option(`-p, --port <port>`,`Server port`,void 0).option(`-H, --host <host>`,`Server host`,void 0).option(`--open`,`Open browser after start`).option(`--no-init`,`Skip auto-scaffolding of ${t}/`).action(async e=>{let{renderBanner:i}=await import(`./banner-DoFNyNUH.mjs`),{dim:a,error:o,info:s,warning:c}=await import(`./colors-CswooXAS.mjs`),l=r(),u=process.cwd();e.host!==void 0&&(l.server.host=e.host);let d=e.port===void 0?void 0:Number(e.port),f=process.env.PORT?Number(process.env.PORT):void 0,p=d??f,m;try{m=await h({config:l,cwd:u,port:p,skipAutoInit:e.init===!1})}catch(e){let{ProjectGitInitError:t}=await import(`./dist-BuWOuGGO.mjs`);e instanceof t&&(console.error(o(`open-knowledge requires git to initialize a parent repo. Install git or run 'git init' yourself, then re-run.`)),e.stderr&&console.error(a(e.stderr.trim())),process.exit(1)),console.error(`${o(`Failed to start:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exit(1)}let g=!1,_=async e=>{if(!g){g=!0,console.log(a(`\nShutting down (${e})...`));try{await m.destroy()}catch(e){console.error(`${o(`destroy() failed:`)} ${e instanceof Error?e.stack??e.message:String(e)}`),process.exitCode=1}process.exit(process.exitCode??0)}};process.once(`SIGINT`,()=>{_(`SIGINT`)}),process.once(`SIGTERM`,()=>{_(`SIGTERM`)});let v=`http://${l.server.host}:${m.port}`,y=l.server.host===`0.0.0.0`||l.server.host===`::`?`http://0.0.0.0:${m.port}`:void 0,b=m.resolvedUiPort,x=b!==null&&b>0?`http://${l.server.host}:${b}`:v;console.log(i({name:`open-knowledge`,version:n,localUrl:x,apiUrl:x===v?void 0:v,networkUrl:y})),m.didAutoInit&&(console.log(` ${s(`✓`)} Scaffolded ${t}/ (first run)`),console.log(` ${a("Tip: Run `open-knowledge init` to register MCP tools for Claude Code")}\n`));let S={"shadow-repo":`Version history and branch-switch safety unavailable`,"file-watcher":`External file changes will not sync to the editor`,"head-watcher":`Git branch switches may cause document inconsistency`};m.ready.then(async()=>{if(m.degraded.length>0){console.log();for(let e of m.degraded){let t=S[e]??`${e} (check server logs for details)`;console.warn(` ${c(`⚠`)} ${c(e)}: ${a(t)}`)}console.log()}if(m.didAutoInit||m.didGitInit)if(m.didGitInit&&console.log(`\n ${s(`✓`)} Initialized git repo at ${u}/.git/ (default branch: main)`),m.didAutoInit)try{let{previewContent:e,formatPreviewBlock:t}=await import(`./preview-j16n7DSe.mjs`),n=e({projectDir:u,contentDir:m.contentDir,include:l.content.include,exclude:l.content.exclude});console.log(`\n${t(n,u)}\n`)}catch(e){console.warn(`Content preview unavailable: ${e instanceof Error?e.message:String(e)}`)}else console.log();if(e.open){let{openBrowser:e}=await import(`./open-browser-hvFa-TeR.mjs`);e(x)}}).catch(e=>{console.error(` ${o(`Server initialization failed:`)} ${e instanceof Error?e.message:String(e)}`)})})}export{f as a,d as i,h as n,g as o,m as r,u as s,p as t};
2
+ //# sourceMappingURL=start-cf2OdewF.mjs.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/open-knowledge",
3
- "version": "0.0.0-dev-20260501034226",
3
+ "version": "0.0.0-dev-20260501045551",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "exports": {
@@ -1,2 +0,0 @@
1
- import"./dist-Bk22-nn7.mjs";var e=`0.0.0-dev-20260501034226`;const t=`config.yml`,n=`cache`,r=e,i=`open-knowledge`;export{r as i,t as n,i as r,n as t};
2
- //# sourceMappingURL=constants-BVSgu1p0.mjs.map
@@ -1 +0,0 @@
1
- import{o as e}from"./init-CXD7S1br.mjs";export{e as runInit};
@@ -1 +0,0 @@
1
- import{n as e}from"./init-298Ayrtx.mjs";export{e as initContent};
@@ -1 +0,0 @@
1
- import{n as e}from"./loader-CBGPucqb.mjs";export{e as loadConfig};
@@ -1 +0,0 @@
1
- import{n as e,t}from"./paths-C7JyDBWk.mjs";export{t as resolveContentDir,e as resolveLockDir};
@@ -1,2 +0,0 @@
1
- import{$ as e}from"./dist-Bk22-nn7.mjs";import"./constants-BVSgu1p0.mjs";import{resolve as t}from"node:path";function n(e,n){return t(n,e.content.dir)}function r(n){return t(n,e)}export{r as n,n as t};
2
- //# sourceMappingURL=paths-C7JyDBWk.mjs.map
@@ -1 +0,0 @@
1
- import{n as e,t}from"./preview-YdZO7Xe-.mjs";export{t as formatPreviewBlock,e as previewContent};
@@ -1,5 +0,0 @@
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{G as i,Lt as a,T as o,Ut as s,Wt as c,kt as l,n as u,t as d,vt as f,w as p}from"./toggle-group-n36XMgMC.js";import{S as m,t as h}from"./button-Dyz7QGIk.js";import{I as g,W as _,et as v,n as y,w as b}from"./DocumentContext-BtLDstmc.js";import{i as x,n as S,r as C,s as w}from"./config-validation-events-ClxIZ8iZ.js";import{S as T,x as E}from"./dialog-FUclf-NK.js";import{i as D,n as O,t as k}from"./tooltip-BM5o_T0o.js";var A=m(`rotate-ccw`,[[`path`,{d:`M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8`,key:`1357e3`}],[`path`,{d:`M3 3v5h5`,key:`1xhq8a`}]]),j=e(t(),1),M=r();function N(e,t){if(e.length===0)throw Error(`buildPatch: path must be non-empty`);let[n,...r]=e;return r.length===0?{[String(n)]:t}:{[String(n)]:N(r,t)}}function P(e,t){let n=e;for(let e of t){if(typeof n!=`object`||!n)return;n=n[String(e)]}return n}function F(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(e?.type===`default`){let t=e.defaultValue;return typeof t==`function`?t():t}let n=t?._zod?.def?.innerType;if(n===void 0)return;t=n}}function I(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`default`||e.type===`optional`||e.type===`nullable`){t=e.innerType;continue}return e.type}}function ee(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=t?._zod?.def;if(!e)return;if(e.type===`enum`)return e.entries?Object.values(e.entries):void 0;if(e.innerType!==void 0){t=e.innerType;continue}return}}var L=n(),R=[{id:`content`,title:`Content`,description:`Where Open Knowledge looks for documents.`,fields:[{path:[`content`,`dir`],label:`Content directory`,description:`Project-relative path containing your markdown files.`},{path:[`content`,`include`],label:`Include patterns`,description:`Glob patterns selecting which files are content. One per line.`},{path:[`content`,`exclude`],label:`Exclude patterns`,description:`Glob patterns to skip. One per line.`}]},{id:`server`,title:`Server`,description:`Local server bind and behavior.`,fields:[{path:[`server`,`host`],label:`Host`,description:`Bind interface (e.g. localhost, 0.0.0.0).`},{path:[`server`,`openOnAgentEdit`],label:`Open preview on agent edit`,description:`When enabled, an agent write opens the preview tab if not already open.`}]},{id:`github`,title:`GitHub`,description:`OAuth app identity for sign-in. Tokens are stored in your OS keychain, not here.`,fields:[{path:[`github`,`oauthAppClientId`],label:`OAuth App client ID`,description:`Public client ID for the GitHub OAuth app. Defaults to the published Open Knowledge app.`}]},{id:`preview`,title:`Preview`,description:`Where the preview tab points when no local UI is running.`,fields:[{path:[`preview`,`baseUrl`],label:`Preview base URL`,description:`URL of your team’s deployed wiki (project-only).`}]},{id:`mcp`,title:`MCP`,description:`Model Context Protocol agent integration tuning.`,fields:[{path:[`mcp`,`autoStart`],label:`Auto-start server`,description:"When enabled, `ok mcp` spawns `ok start` automatically."},{path:[`mcp`,`tools`,`read_document`,`historyDepth`],label:`read_document history depth`,description:`How many history entries the agent’s read_document tool returns.`},{path:[`mcp`,`tools`,`search`,`maxResults`],label:`search max results`,description:`Cap on results returned by the agent’s search tool.`}]},{id:`appearance`,title:`Appearance`,description:`UI preferences. Editor toggles continue to write localStorage as a cache.`,fields:[{path:[`appearance`,`theme`],label:`Theme`,description:`Light, dark, or follow the OS.`,control:`enum-toggle`},{path:[`appearance`,`editorModeDefault`],label:`Default editor mode`,description:`Which mode new docs open in by default.`,control:`enum-toggle`}]}];function z(e,t){let n=(0,M.c)(4),[r,a]=(0,j.useState)(null),s,c;return n[0]!==e||n[1]!==t?(s=()=>{if(e===null)return;let n=t===`project`?p:o,r=new v,s=new _({url:e,name:n,document:r}),c=i(s,t),l=!0,u=()=>{l&&a(e=>e?.provider===s?{...e,synced:!0,config:c.current()}:e)};s.on(`synced`,u);let d=c.subscribe(e=>{l&&a(t=>t?.provider===s?t&&{...t,config:e}:t)});return a({provider:s,binding:c,config:c.current(),synced:!1}),()=>{l=!1,d(),s.off(`synced`,u),c.dispose(),s.destroy(),r.destroy(),a(e=>e?.provider===s?null:e)}},c=[e,t],n[0]=e,n[1]=t,n[2]=s,n[3]=c):(s=n[2],c=n[3]),(0,j.useEffect)(s,c),r}function B(e){let t=(0,M.c)(28),{scope:n,onClose:r,onScopeChange:i}=e,{collabUrl:a}=y(),o=z(a,n),[s,c]=(0,j.useState)(null),l=(0,j.useRef)(null),p,m;t[0]===n?(p=t[1],m=t[2]):(p=()=>{let e=S(e=>{if(!(n===`project`&&e.docName===`__config__/project`||n===`user`&&e.docName===`__user__/config.yml`))return;E.error(f(e.error),{duration:8e3});let t=V(e.error);t&&(c(t),l.current&&clearTimeout(l.current),l.current=setTimeout(()=>c(null),600))});return()=>{e(),l.current&&clearTimeout(l.current)}},m=[n],t[0]=n,t[1]=p,t[2]=m),(0,j.useEffect)(p,m);let g;t[3]===Symbol.for(`react.memo_cache_sentinel`)?(g=(0,L.jsx)(`h1`,{className:`text-sm font-semibold`,children:`Settings`}),t[3]=g):g=t[3];let _;t[4]===i?_=t[5]:(_=e=>{(e===`project`||e===`user`)&&i(e)},t[4]=i,t[5]=_);let v,b;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,L.jsx)(u,{value:`project`,className:`text-xs`,children:`This project`}),b=(0,L.jsx)(u,{value:`user`,className:`text-xs`,children:`User`}),t[6]=v,t[7]=b):(v=t[6],b=t[7]);let x;t[8]!==n||t[9]!==_?(x=(0,L.jsxs)(`div`,{className:`flex items-center gap-3`,children:[g,(0,L.jsxs)(d,{type:`single`,value:n,onValueChange:_,"aria-label":`Settings scope`,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg`,children:[v,b]})]}),t[8]=n,t[9]=_,t[10]=x):x=t[10];let C;t[11]===Symbol.for(`react.memo_cache_sentinel`)?(C=(0,L.jsx)(T,{className:`size-4`}),t[11]=C):C=t[11];let w;t[12]===r?w=t[13]:(w=(0,L.jsx)(D,{asChild:!0,children:(0,L.jsx)(h,{variant:`ghost`,size:`icon`,onClick:r,"aria-label":`Close settings`,className:`text-muted-foreground`,children:C})}),t[12]=r,t[13]=w);let A;t[14]===Symbol.for(`react.memo_cache_sentinel`)?(A=(0,L.jsx)(O,{children:`Close`}),t[14]=A):A=t[14];let N;t[15]===w?N=t[16]:(N=(0,L.jsxs)(k,{children:[w,A]}),t[15]=w,t[16]=N);let P;t[17]!==N||t[18]!==x?(P=(0,L.jsxs)(`header`,{className:`flex h-12 shrink-0 items-center justify-between border-b px-4`,children:[x,N]}),t[17]=N,t[18]=x,t[19]=P):P=t[19];let F;t[20]!==o||t[21]!==s||t[22]!==n?(F=(0,L.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto`,children:o===null||!o.synced?(0,L.jsx)(H,{}):(0,L.jsx)(W,{scope:n,binding:o.binding,config:o.config,flashedPath:s})}),t[20]=o,t[21]=s,t[22]=n,t[23]=F):F=t[23];let I;return t[24]!==n||t[25]!==P||t[26]!==F?(I=(0,L.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col overflow-hidden`,"data-testid":`settings-pane`,"data-scope":n,children:[P,F]}),t[24]=n,t[25]=P,t[26]=F,t[27]=I):I=t[27],I}function V(e){if(!l(e)||e.code!==`SCHEMA_INVALID`)return null;let t=e.issues[0];return!t||t.path.length===0?null:t.path.map(String).join(`.`)}function H(){let e=(0,M.c)(1),t;return e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,L.jsx)(`div`,{className:`space-y-6 p-6`,children:Array.from({length:3}).map(U)}),e[0]=t):t=e[0],t}function U(e,t){return(0,L.jsxs)(`div`,{className:`space-y-3`,children:[(0,L.jsx)(x,{className:`h-5 w-32`}),(0,L.jsx)(x,{className:`h-4 w-64`}),(0,L.jsxs)(`div`,{className:`space-y-2`,children:[(0,L.jsx)(x,{className:`h-9 w-full`}),(0,L.jsx)(x,{className:`h-9 w-full`})]})]},t)}function W(e){let t=(0,M.c)(8),{scope:n,binding:r,config:i,flashedPath:a}=e,o;t[0]!==r||t[1]!==i||t[2]!==a||t[3]!==n?(o=R.map(e=>{let t=e.fields.filter(e=>G(e.path,n));return t.length===0?null:(0,L.jsx)(K,{section:e,children:t.map(e=>(0,L.jsx)(q,{field:e,scope:n,binding:r,config:i,isFlashed:a===e.path.join(`.`)},e.path.join(`.`)))},e.id)}),t[0]=r,t[1]=i,t[2]=a,t[3]=n,t[4]=o):o=t[4];let s;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsx)(se,{}),t[5]=s):s=t[5];let c;return t[6]===o?c=t[7]:(c=(0,L.jsxs)(`div`,{className:`mx-auto max-w-3xl space-y-8 p-6`,children:[o,s]}),t[6]=o,t[7]=c),c}function G(e,t){let n=a(s,e);if(!n)return!0;let r=c(n);return r?!(r.scope===`project`&&t!==`project`||r.scope===`user`&&t!==`user`):!0}function K(e){let t=(0,M.c)(14),{section:n,children:r}=e,i=`settings-${n.id}-title`,a=`settings-${n.id}-title`,o;t[0]!==n.title||t[1]!==a?(o=(0,L.jsx)(`h2`,{id:a,className:`text-base font-semibold`,children:n.title}),t[0]=n.title,t[1]=a,t[2]=o):o=t[2];let s;t[3]===n.description?s=t[4]:(s=(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:n.description}),t[3]=n.description,t[4]=s);let c;t[5]!==o||t[6]!==s?(c=(0,L.jsxs)(`div`,{className:`space-y-1`,children:[o,s]}),t[5]=o,t[6]=s,t[7]=c):c=t[7];let l;t[8]===r?l=t[9]:(l=(0,L.jsx)(`div`,{className:`space-y-4`,children:r}),t[8]=r,t[9]=l);let u;return t[10]!==i||t[11]!==c||t[12]!==l?(u=(0,L.jsxs)(`section`,{"aria-labelledby":i,className:`space-y-3`,children:[c,l]}),t[10]=i,t[11]=c,t[12]=l,t[13]=u):u=t[13],u}function q(e){let t=(0,M.c)(55),{field:n,scope:r,binding:i,config:o,isFlashed:l}=e,u,d,f,p,m,g;if(t[0]!==o||t[1]!==n.path){let e=a(s,n.path);g=e?I(e):void 0,d=e?F(e):void 0,u=P(o,n.path),p=e?c(e):void 0,f=e?ee(e):void 0,m=d===void 0?u!=null:!$(u,d),t[0]=o,t[1]=n.path,t[2]=u,t[3]=d,t[4]=f,t[5]=p,t[6]=m,t[7]=g}else u=t[2],d=t[3],f=t[4],p=t[5],m=t[6],g=t[7];let _=m,v;t[8]===n.path?v=t[9]:(v=n.path.join(`-`),t[8]=n.path,t[9]=v);let y=v,b=`${y}-error`,[x,S]=(0,j.useState)(null),C;t[10]!==i||t[11]!==n.path?(C=e=>{let t=N(n.path,e),r=i.patch(t);return r.ok?(S(null),!0):(S(oe(r.error)),!1)},t[10]=i,t[11]=n.path,t[12]=C):C=t[12];let w=C,T;t[13]!==w||t[14]!==d?(T=()=>{w(d===void 0?null:d)},t[13]=w,t[14]=d,t[15]=T):T=t[15];let E=T,R;t[16]===_?R=t[17]:(R=_?(0,L.jsx)(`span`,{"data-modified":`true`,"aria-hidden":`true`,className:`absolute -left-3 top-1 h-5 w-0.5 rounded-full bg-primary`}):null,t[16]=_,t[17]=R);let z=R,B=`relative space-y-1 ${l?`animate-settings-flash`:``}`,V;t[18]===n.path?V=t[19]:(V=n.path.join(`.`),t[18]=n.path,t[19]=V);let H;t[20]!==n.label||t[21]!==y?(H=(0,L.jsx)(`label`,{htmlFor:y,className:`text-sm font-medium`,children:n.label}),t[20]=n.label,t[21]=y,t[22]=H):H=t[22];let U;t[23]!==u||t[24]!==d||t[25]!==n.label||t[26]!==E?(U=d!==void 0||u!==void 0?(0,L.jsxs)(k,{children:[(0,L.jsx)(D,{asChild:!0,children:(0,L.jsx)(h,{variant:`ghost`,size:`icon`,className:`h-6 w-6 text-muted-foreground opacity-60 hover:opacity-100`,onClick:E,"aria-label":`Reset ${n.label} to default`,children:(0,L.jsx)(A,{className:`size-3.5`})})}),(0,L.jsx)(O,{children:`Reset to default`})]}):null,t[23]=u,t[24]=d,t[25]=n.label,t[26]=E,t[27]=U):U=t[27];let W;t[28]!==H||t[29]!==U?(W=(0,L.jsxs)(`div`,{className:`flex items-baseline justify-between gap-2`,children:[H,U]}),t[28]=H,t[29]=U,t[30]=W):W=t[30];let G;t[31]===n.description?G=t[32]:(G=n.description?(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:n.description}):null,t[31]=n.description,t[32]=G);let K=x?b:void 0,q=p?.scope===`project`&&r!==`project`?`This field can only be set per-project. Switch to the 'This project' tab to edit it.`:p?.scope===`user`&&r!==`user`?`This field can only be set globally. Switch to the 'User' tab to edit it.`:null,J;t[33]!==w||t[34]!==u||t[35]!==f||t[36]!==n||t[37]!==y||t[38]!==K||t[39]!==q||t[40]!==g?(J=(0,L.jsx)(te,{field:n,fieldId:y,errorId:K,typeTag:g,currentValue:u,enumOptions:f,onCommit:w,readonlyReason:q}),t[33]=w,t[34]=u,t[35]=f,t[36]=n,t[37]=y,t[38]=K,t[39]=q,t[40]=g,t[41]=J):J=t[41];let Y;t[42]!==x||t[43]!==b||t[44]!==n.path?(Y=x?(0,L.jsx)(`p`,{id:b,role:`alert`,className:`text-xs text-destructive`,"data-field-error":n.path.join(`.`),children:x}):null,t[42]=x,t[43]=b,t[44]=n.path,t[45]=Y):Y=t[45];let X;return t[46]!==z||t[47]!==r||t[48]!==G||t[49]!==J||t[50]!==Y||t[51]!==V||t[52]!==W||t[53]!==B?(X=(0,L.jsxs)(`div`,{className:B,"data-field":V,"data-scope":r,children:[z,W,G,J,Y]}),t[46]=z,t[47]=r,t[48]=G,t[49]=J,t[50]=Y,t[51]=V,t[52]=W,t[53]=B,t[54]=X):X=t[54],X}function te(e){let t=(0,M.c)(32),{field:n,fieldId:r,errorId:i,typeTag:a,currentValue:o,enumOptions:s,onCommit:c,readonlyReason:l}=e;if(l){let e;return t[0]!==r||t[1]!==l?(e=(0,L.jsx)(`div`,{id:r,role:`note`,className:`rounded border border-dashed border-muted px-3 py-2 text-xs text-muted-foreground`,children:l}),t[0]=r,t[1]=l,t[2]=e):e=t[2],e}if(a===`boolean`){let e=!!o,n;return t[3]!==i||t[4]!==r||t[5]!==c||t[6]!==e?(n=(0,L.jsx)(X,{fieldId:r,errorId:i,value:e,onCommit:c}),t[3]=i,t[4]=r,t[5]=c,t[6]=e,t[7]=n):n=t[7],n}if(a===`enum`&&s&&s.length>0&&(n.control===`enum-toggle`||s.length<=4)){let e=typeof o==`string`?o:``,a;return t[8]!==s||t[9]!==i||t[10]!==n.label||t[11]!==r||t[12]!==c||t[13]!==e?(a=(0,L.jsx)(ne,{fieldId:r,errorId:i,ariaLabel:n.label,options:s,value:e,onCommit:c}),t[8]=s,t[9]=i,t[10]=n.label,t[11]=r,t[12]=c,t[13]=e,t[14]=a):a=t[14],a}if(a===`number`||a===`int`){let e=typeof o==`number`?o:0,n;return t[15]!==i||t[16]!==r||t[17]!==c||t[18]!==e?(n=(0,L.jsx)(Y,{fieldId:r,errorId:i,value:e,onCommit:c}),t[15]=i,t[16]=r,t[17]=c,t[18]=e,t[19]=n):n=t[19],n}if(a===`array`){let e;t[20]===o?e=t[21]:(e=Array.isArray(o)?o:[],t[20]=o,t[21]=e);let n;return t[22]!==i||t[23]!==r||t[24]!==c||t[25]!==e?(n=(0,L.jsx)(re,{fieldId:r,errorId:i,value:e,onCommit:c}),t[22]=i,t[23]=r,t[24]=c,t[25]=e,t[26]=n):n=t[26],n}let u=typeof o==`string`?o:``,d;return t[27]!==i||t[28]!==r||t[29]!==c||t[30]!==u?(d=(0,L.jsx)(J,{fieldId:r,errorId:i,value:u,onCommit:c}),t[27]=i,t[28]=r,t[29]=c,t[30]=u,t[31]=d):d=t[31],d}function J(e){let t=(0,M.c)(22),{fieldId:n,errorId:r,value:i,onCommit:a}=e,[o,s]=(0,j.useState)(i),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(i),d,f;t[0]!==o||t[1]!==i?(d=()=>{o===u.current&&(s(i),u.current=i)},f=[i,o],t[0]=o,t[1]=i,t[2]=d,t[3]=f):(d=t[2],f=t[3]),(0,j.useEffect)(d,f);let p;t[4]!==a||t[5]!==o?(p=()=>{o!==u.current&&a(o)&&(u.current=o,Q(l))},t[4]=a,t[5]=o,t[6]=p):p=t[6];let m=p,h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>s(e.target.value),t[7]=h):h=t[7];let _;t[8]===m?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),m())},t[8]=m,t[9]=_);let v=r?!0:void 0,y;t[10]!==m||t[11]!==r||t[12]!==n||t[13]!==o||t[14]!==_||t[15]!==v?(y=(0,L.jsx)(g,{id:n,value:o,onChange:h,onBlur:m,onKeyDown:_,"aria-describedby":r,"aria-invalid":v,className:`h-8 text-sm`}),t[10]=m,t[11]=r,t[12]=n,t[13]=o,t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]===c?b=t[18]:(b=(0,L.jsx)(Z,{visible:c}),t[17]=c,t[18]=b);let x;return t[19]!==y||t[20]!==b?(x=(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21],x}function Y(e){let t=(0,M.c)(22),{fieldId:n,errorId:r,value:i,onCommit:a}=e,[o,s]=(0,j.useState)(String(i)),[c,l]=(0,j.useState)(!1),u=(0,j.useRef)(String(i)),d,f;t[0]!==o||t[1]!==i?(d=()=>{o===u.current&&(s(String(i)),u.current=String(i))},f=[i,o],t[0]=o,t[1]=i,t[2]=d,t[3]=f):(d=t[2],f=t[3]),(0,j.useEffect)(d,f);let p;t[4]!==a||t[5]!==o?(p=()=>{if(o===u.current)return;let e=Number(o);if(!Number.isFinite(e)){a(o);return}a(e)&&(u.current=o,Q(l))},t[4]=a,t[5]=o,t[6]=p):p=t[6];let m=p,h;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(h=e=>s(e.target.value),t[7]=h):h=t[7];let _;t[8]===m?_=t[9]:(_=e=>{e.key===`Enter`&&(e.preventDefault(),m())},t[8]=m,t[9]=_);let v=r?!0:void 0,y;t[10]!==m||t[11]!==r||t[12]!==n||t[13]!==o||t[14]!==_||t[15]!==v?(y=(0,L.jsx)(g,{id:n,type:`number`,value:o,onChange:h,onBlur:m,onKeyDown:_,"aria-describedby":r,"aria-invalid":v,className:`h-8 w-28 text-sm`}),t[10]=m,t[11]=r,t[12]=n,t[13]=o,t[14]=_,t[15]=v,t[16]=y):y=t[16];let b;t[17]===c?b=t[18]:(b=(0,L.jsx)(Z,{visible:c}),t[17]=c,t[18]=b);let x;return t[19]!==y||t[20]!==b?(x=(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[y,b]}),t[19]=y,t[20]=b,t[21]=x):x=t[21],x}function X(e){let t=(0,M.c)(12),{fieldId:n,errorId:r,value:i,onCommit:a}=e,[o,s]=(0,j.useState)(!1),c;t[0]===a?c=t[1]:(c=e=>{a(e)&&Q(s)},t[0]=a,t[1]=c);let l;t[2]!==r||t[3]!==n||t[4]!==c||t[5]!==i?(l=(0,L.jsx)(b,{id:n,checked:i,"aria-describedby":r,onCheckedChange:c}),t[2]=r,t[3]=n,t[4]=c,t[5]=i,t[6]=l):l=t[6];let u;t[7]===o?u=t[8]:(u=(0,L.jsx)(Z,{visible:o}),t[7]=o,t[8]=u);let d;return t[9]!==l||t[10]!==u?(d=(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l,u]}),t[9]=l,t[10]=u,t[11]=d):d=t[11],d}function ne(e){let t=(0,M.c)(18),{fieldId:n,errorId:r,ariaLabel:i,options:a,value:o,onCommit:s}=e,[c,l]=(0,j.useState)(!1),f;t[0]===s?f=t[1]:(f=e=>{e&&s(e)&&Q(l)},t[0]=s,t[1]=f);let p;if(t[2]!==n||t[3]!==a){let e;t[5]===n?e=t[6]:(e=(e,t)=>(0,L.jsx)(u,{value:e,id:t===0?n:void 0,className:`text-xs capitalize`,children:e},e),t[5]=n,t[6]=e),p=a.map(e),t[2]=n,t[3]=a,t[4]=p}else p=t[4];let m;t[7]!==i||t[8]!==f||t[9]!==p||t[10]!==o?(m=(0,L.jsx)(d,{type:`single`,value:o,variant:`segmented`,size:`sm`,spacing:1,className:`bg-muted dark:bg-background p-0.5 rounded-lg`,"aria-label":i,onValueChange:f,children:p}),t[7]=i,t[8]=f,t[9]=p,t[10]=o,t[11]=m):m=t[11];let h;t[12]===c?h=t[13]:(h=(0,L.jsx)(Z,{visible:c}),t[12]=c,t[13]=h);let g;return t[14]!==r||t[15]!==m||t[16]!==h?(g=(0,L.jsxs)(`div`,{className:`flex items-center gap-2`,"aria-describedby":r,children:[m,h]}),t[14]=r,t[15]=m,t[16]=h,t[17]=g):g=t[17],g}function re(e){let t=(0,M.c)(24),{fieldId:n,errorId:r,value:i,onCommit:a}=e,o;t[0]===i?o=t[1]:(o=i.join(`
2
- `),t[0]=i,t[1]=o);let s=o,[c,l]=(0,j.useState)(s),[u,d]=(0,j.useState)(!1),f=(0,j.useRef)(s),p,m;t[2]!==c||t[3]!==i?(p=()=>{let e=i.join(`
3
- `);c===f.current&&(l(e),f.current=e)},m=[i,c],t[2]=c,t[3]=i,t[4]=p,t[5]=m):(p=t[4],m=t[5]),(0,j.useEffect)(p,m);let h;t[6]!==a||t[7]!==c?(h=()=>{c!==f.current&&a(c.split(`
4
- `).map(ae).filter(ie))&&(f.current=c,Q(d))},t[6]=a,t[7]=c,t[8]=h):h=t[8];let g=h,_;t[9]===Symbol.for(`react.memo_cache_sentinel`)?(_=e=>l(e.target.value),t[9]=_):_=t[9];let v;t[10]===c?v=t[11]:(v=c.split(`
5
- `),t[10]=c,t[11]=v);let y=Math.max(2,Math.min(6,v.length)),b=r?!0:void 0,x;t[12]!==g||t[13]!==r||t[14]!==n||t[15]!==c||t[16]!==y||t[17]!==b?(x=(0,L.jsx)(`textarea`,{id:n,value:c,onChange:_,onBlur:g,rows:y,"aria-describedby":r,"aria-invalid":b,className:`min-h-16 w-full rounded-md border bg-background px-3 py-1.5 font-mono text-xs`}),t[12]=g,t[13]=r,t[14]=n,t[15]=c,t[16]=y,t[17]=b,t[18]=x):x=t[18];let S;t[19]===u?S=t[20]:(S=(0,L.jsx)(Z,{visible:u}),t[19]=u,t[20]=S);let C;return t[21]!==S||t[22]!==x?(C=(0,L.jsxs)(`div`,{className:`flex items-start gap-2`,children:[x,S]}),t[21]=S,t[22]=x,t[23]=C):C=t[23],C}function ie(e){return e.length>0}function ae(e){return e.trim()}function Z(e){let t=(0,M.c)(4),{visible:n}=e,r;t[0]===n?r=t[1]:(r=n?(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(w,{"aria-hidden":`true`,className:`size-3.5`}),(0,L.jsx)(`span`,{className:`sr-only`,children:`Saved`})]}):null,t[0]=n,t[1]=r);let i;return t[2]===r?i=t[3]:(i=(0,L.jsx)(`span`,{role:`status`,"aria-live":`polite`,className:`text-emerald-600`,children:r}),t[2]=r,t[3]=i),i}function Q(e){e(!0),setTimeout(()=>e(!1),1200)}function $(e,t){if(e===t)return!0;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(!$(e[n],t[n]))return!1;return!0}if(e&&t&&typeof e==`object`&&typeof t==`object`){let n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(let r of n)if(!$(e[r],t[r]))return!1;return!0}return!1}function oe(e){if(l(e)&&e.code===`SCHEMA_INVALID`){let t=e.issues[0];if(t)return t.message}return f(e)}function se(){let e=(0,M.c)(7),[t,n]=(0,j.useState)(!1),[r,i]=(0,j.useState)(!0),a,o;if(e[0]===Symbol.for(`react.memo_cache_sentinel`)?(a=()=>{let e=(typeof window<`u`?window.okDesktop:void 0)?.skill?.detectClaudeDesktop;if(!e){i(!0);return}let t=!1;return e().then(e=>{t||i(e)}).catch(()=>{t||i(!0)}),()=>{t=!0}},o=[],e[0]=a,e[1]=o):(a=e[0],o=e[1]),(0,j.useEffect)(a,o),!r)return null;let s;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,L.jsxs)(`div`,{className:`space-y-1`,children:[(0,L.jsx)(`h2`,{id:`settings-integrations-title`,className:`text-base font-semibold`,children:`Integrations`}),(0,L.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Connect Open Knowledge to other tools you use.`})]}),e[2]=s):s=e[2];let c;e[3]===Symbol.for(`react.memo_cache_sentinel`)?(c=(0,L.jsxs)(`div`,{children:[(0,L.jsx)(`div`,{className:`text-sm font-medium`,children:`Install in Claude Desktop`}),(0,L.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`Make this knowledge base available as a Claude Skill.`})]}),e[3]=c):c=e[3];let l;e[4]===Symbol.for(`react.memo_cache_sentinel`)?(l=(0,L.jsx)(`div`,{className:`rounded-md border p-3`,children:(0,L.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[c,(0,L.jsx)(h,{variant:`outline`,size:`sm`,onClick:()=>n(!0),"data-testid":`settings-install-claude-desktop`,children:`Install…`})]})}),e[4]=l):l=e[4];let u;return e[5]===t?u=e[6]:(u=(0,L.jsxs)(`section`,{"aria-labelledby":`settings-integrations-title`,className:`space-y-3`,children:[s,l,(0,L.jsx)(C,{open:t,onOpenChange:n})]}),e[5]=t,e[6]=u),u}export{B as SettingsPane};
@@ -1 +0,0 @@
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,r as a,t as o}from"./button-Dyz7QGIk.js";import{St as s}from"./DocumentContext-BtLDstmc.js";import{t as c}from"./circle-check-C-DpX4dU.js";import{a as l,c as u,i as d,n as f,o as p,s as m,t as h,x as g}from"./dialog-FUclf-NK.js";var _=i(`arrow-right`,[[`path`,{d:`M5 12h14`,key:`1ays0h`}],[`path`,{d:`m12 5 7 7-7 7`,key:`xquz4c`}]]),v=i(`check`,[[`path`,{d:`M20 6 9 17l-5-5`,key:`1gmf2c`}]]),ee=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`}]]),y=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`}]]),te=i(`move-up-right`,[[`path`,{d:`M13 5H19V11`,key:`1n1gyv`}],[`path`,{d:`M19 5L5 19`,key:`72u4yj`}]]),b=r(),x=n();function S(e){let t=(0,b.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=a(`animate-pulse rounded-md bg-muted`,n),t[3]=n,t[4]=i);let o;return t[5]!==r||t[6]!==i?(o=(0,x.jsx)(`div`,{"data-slot":`skeleton`,className:i,...r}),t[5]=r,t[6]=i,t[7]=o):o=t[7],o}var C=e(t(),1),w=`npx @inkeep/open-knowledge install-skill`,T=`https://inkeep.github.io/open-knowledge/guides/install-claude-cowork`;function ne(){return typeof window<`u`&&typeof window.okDesktop?.skill==`object`}function E(e){let t=(0,b.c)(2),{children:n}=e,r;return t[0]===n?r=t[1]:(r=(0,x.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 D(e){let t=(0,b.c)(5),{children:n,className:r}=e,i;t[0]===r?i=t[1]:(i=a(`font-mono tracking-wide uppercase text-primary font-medium text-xs`,r),t[0]=r,t[1]=i);let o;return t[2]!==n||t[3]!==i?(o=(0,x.jsx)(`p`,{className:i,children:n}),t[2]=n,t[3]=i,t[4]=o):o=t[4],o}function O(e){let t=(0,b.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,x.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 k(){let e=(0,b.c)(17),t;e[0]===Symbol.for(`react.memo_cache_sentinel`)?(t=(0,x.jsx)(D,{children:`In the Claude Desktop App`}),e[0]=t):t=e[0];let n;e[1]===Symbol.for(`react.memo_cache_sentinel`)?(n=(0,x.jsx)(O,{n:1}),e[1]=n):n=e[1];let r;e[2]===Symbol.for(`react.memo_cache_sentinel`)?(r=(0,x.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,x.jsx)(_,{"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,x.jsxs)(`li`,{className:`flex gap-3`,children:[n,(0,x.jsxs)(`span`,{children:[`Open `,r,` in the sidebar`,` `,i,` `,(0,x.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,x.jsx)(O,{n:2}),e[5]=o):o=e[5];let s;e[6]===Symbol.for(`react.memo_cache_sentinel`)?(s=(0,x.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,x.jsx)(_,{"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,x.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,x.jsx)(_,{"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,x.jsxs)(`li`,{className:`flex gap-3`,children:[o,(0,x.jsxs)(`span`,{children:[`Click`,` `,s,` `,c,` `,l,` `,u,` `,(0,x.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,x.jsx)(O,{n:3}),e[11]=f):f=e[11];let p;e[12]===Symbol.for(`react.memo_cache_sentinel`)?(p=(0,x.jsx)(E,{children:`openknowledge.skill`}),e[12]=p):p=e[12];let m;e[13]===Symbol.for(`react.memo_cache_sentinel`)?(m=(0,x.jsxs)(`ol`,{className:`flex flex-col gap-4 text-sm`,children:[a,d,(0,x.jsxs)(`li`,{className:`flex gap-3`,children:[f,(0,x.jsxs)(`span`,{children:[`Pick `,p,` from your`,` `,(0,x.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,x.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,x.jsx)(_,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),e[15]=g):g=e[15];let v;return e[16]===Symbol.for(`react.memo_cache_sentinel`)?(v=(0,x.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[t,m,(0,x.jsxs)(`p`,{className:`text-xs text-muted-foreground mt-4`,children:[`Don't see `,h,`? Enable`,` `,(0,x.jsxs)(`strong`,{className:`font-medium`,children:[`Settings`,` `,g,` `,`Capabilities`,` `,(0,x.jsx)(_,{"aria-hidden":`true`,className:`inline h-3 w-3 text-muted-foreground`}),` Code execution and file creation`]}),` `,`first.`]})]}),e[16]=v):v=e[16],v}function A(e){let t=(0,b.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,_]=(0,C.useState)(i),[v,S]=(0,C.useState)(!1),O,A;t[1]===n?(O=t[2],A=t[3]):(O=()=>{n||(_({kind:`idle`}),S(!1))},A=[n],t[1]=n,t[2]=O,t[3]=A),(0,C.useEffect)(O,A);let j;t[4]===Symbol.for(`react.memo_cache_sentinel`)?(j=async function(){_({kind:`downloading`});let e=window.okDesktop?.skill;if(!e){_({kind:`error`,message:`Electron bridge unavailable. Refresh and try again.`});return}let t=await e.buildAndOpen();if(t.ok)_({kind:`handed-off`,path:t.path});else{let e=t.message??t.reason;g.error(`Install handoff failed: ${e}`),_({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]=j):j=t[4];let M=j,N;t[5]===Symbol.for(`react.memo_cache_sentinel`)?(N=async function(){try{await navigator.clipboard.writeText(w),S(!0),setTimeout(()=>S(!1),2e3)}catch(e){let t=e;g.error(`Couldn't copy: ${t instanceof Error?t.message:String(t)}`)}},t[5]=N):N=t[5];let re=N,P;t[6]===Symbol.for(`react.memo_cache_sentinel`)?(P=ne(),t[6]=P):P=t[6];let F=P,I;t[7]===Symbol.for(`react.memo_cache_sentinel`)?(I=(0,x.jsxs)(u,{className:`flex items-center gap-2`,children:[(0,x.jsx)(y,{"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,x.jsxs)(m,{children:[I,(0,x.jsxs)(l,{children:[`Adds the Open Knowledge skill to the`,` `,(0,x.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,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,x.jsx)(D,{className:`text-muted-foreground`,children:`Automatic`}),(0,x.jsxs)(`p`,{className:`text-sm`,children:[`We'll build `,(0,x.jsx)(E,{children:`openknowledge.skill`}),`, save it to`,` `,(0,x.jsx)(E,{children:`~/Downloads`}),`, and open the Claude Desktop App for you.`]})]}),(0,x.jsx)(k,{})]}),t[9]=a.kind,t[10]=R);let z;t[11]!==v||t[12]!==a.kind?(z=a.kind===`idle`&&!F&&(0,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,x.jsx)(D,{children:`Run this in your terminal`}),(0,x.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border bg-muted/40 p-2`,children:[(0,x.jsx)(`code`,{className:`flex-1 font-mono text-xs`,children:w}),(0,x.jsx)(o,{variant:`ghost`,size:`sm`,onClick:re,"aria-label":`Copy command`,className:`h-7 gap-1`,children:v?(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(c,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copied`]}):(0,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(ee,{"aria-hidden":`true`,className:`h-3 w-3`}),`Copy`]})})]}),(0,x.jsxs)(`p`,{className:`text-xs text-muted-foreground`,children:[`Saves the file to `,(0,x.jsx)(E,{children:`~/Downloads/openknowledge.skill`}),` and opens the Claude Desktop App. Requires Node.js or Bun on your PATH.`]})]}),(0,x.jsx)(k,{})]}),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,x.jsxs)(`div`,{className:`flex items-center gap-2 text-sm`,children:[(0,x.jsx)(s,{"aria-hidden":`true`,className:`h-4 w-4 animate-spin`}),`Building `,(0,x.jsx)(E,{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,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,x.jsx)(c,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,x.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,x.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`File saved & Claude Desktop App opened`}),(0,x.jsx)(`code`,{className:`font-mono text-xs text-muted-foreground`,children:a.path??`~/Downloads/openknowledge.skill`})]})]}),(0,x.jsx)(k,{})]}),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,x.jsxs)(x.Fragment,{children:[(0,x.jsxs)(`div`,{className:`flex items-start gap-2 rounded-md border border-primary/30 bg-primary/5 px-3 py-2`,children:[(0,x.jsx)(c,{"aria-hidden":`true`,className:`mt-0.5 h-4 w-4 text-primary`}),(0,x.jsxs)(`div`,{className:`flex flex-col gap-0.5`,children:[(0,x.jsx)(`span`,{className:`text-sm font-medium text-foreground`,children:`Download started`}),(0,x.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[`File saves to `,(0,x.jsx)(E,{children:`~/Downloads/openknowledge.skill`}),`.`]})]})]}),(0,x.jsx)(k,{})]}),t[19]=a.kind,t[20]=H);let U;t[21]!==a.kind||t[22]!==a.message?(U=a.kind===`error`&&(0,x.jsxs)(`div`,{className:`flex flex-col gap-2 text-sm`,children:[(0,x.jsx)(`span`,{className:`text-destructive`,children:a.message}),(0,x.jsx)(`a`,{href:T,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,x.jsx)(f,{children:(0,x.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,x.jsxs)(`a`,{href:T,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,x.jsx)(te,{"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,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,x.jsxs)(o,{onClick:M,children:[(0,x.jsx)(y,{"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,x.jsx)(o,{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,x.jsxs)(x.Fragment,{children:[(0,x.jsx)(o,{className:`uppercase font-mono`,variant:`ghost`,onClick:()=>r(!1),children:`Cancel`}),(0,x.jsxs)(o,{onClick:M,children:[(0,x.jsx)(y,{"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,x.jsxs)(o,{disabled:!0,children:[(0,x.jsx)(s,{"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,x.jsx)(o,{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,x.jsxs)(p,{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,x.jsxs)(d,{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,x.jsx)(h,{open:n,onOpenChange:r,children:Q}),t[57]=r,t[58]=n,t[59]=Q,t[60]=$):$=t[60],$}var j=new Set;function M(e){for(let t of j)try{t(e)}catch(e){console.warn(`[config-validation-events] listener threw:`,e)}}function N(e){return j.add(e),()=>{j.delete(e)}}export{y as a,_ as c,S as i,N as n,ee as o,A as r,v as s,M as t};
@@ -1 +0,0 @@
1
- import"./loader-CBGPucqb.mjs";import"./init-CXD7S1br.mjs";export{};
@@ -1 +0,0 @@
1
- import{o as e}from"./start-S8FFCxLU.mjs";export{e as startCommand};