@inkeep/open-knowledge 0.16.0-beta.3 → 0.16.0-beta.5

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 (55) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/{banner-BxCFCyu8.mjs → banner-DBiyrzNA.mjs} +2 -2
  4. package/dist/cli.mjs +54 -52
  5. package/dist/colors-BktTaA1t.mjs +1 -0
  6. package/dist/{colors-8SzMRIVy.mjs → colors-CBY1ibtz.mjs} +1 -1
  7. package/dist/constants-DpFTxgLd.mjs +2 -0
  8. package/dist/dist-BM2Pz5lP.mjs +1 -0
  9. package/dist/{dist-wZSZMIoi.mjs → dist-BpcqX30a.mjs} +10 -10
  10. package/dist/{gh-detect-atRB6-LM.mjs → gh-detect-B9lBhz5O.mjs} +2 -2
  11. package/dist/index.d.mts +4 -1
  12. package/dist/index.mjs +1 -1
  13. package/dist/init-BprAJf9V.mjs +1 -0
  14. package/dist/init-Cd8LxZ6v.mjs +305 -0
  15. package/dist/{is-object-Cie0xXKD.mjs → is-object-Cg453afR.mjs} +1 -1
  16. package/dist/loader-BKOnziDn.mjs +1 -0
  17. package/dist/{loader-CeZuzoj9.mjs → loader-CP2zxNwo.mjs} +3 -3
  18. package/dist/{preview-0zWEGOpg.mjs → preview-7XNCI_uT.mjs} +2 -2
  19. package/dist/preview-CktZpuwe.mjs +1 -0
  20. package/dist/public/assets/{ActivityModeContent-Bvn7Dxuo.js → ActivityModeContent-CSyKy_Uj.js} +1 -1
  21. package/dist/public/assets/{DocumentContext-BK44vUOF.js → DocumentContext-Db8zz1C8.js} +16 -16
  22. package/dist/public/assets/{GraphPanel-Bk3Uhgmb.js → GraphPanel-B3ncVCcl.js} +3 -3
  23. package/dist/public/assets/{OpenInAgentMenuRequestContext-Dn-T6fee.js → OpenInAgentMenuRequestContext-DTXpMpI9.js} +1 -1
  24. package/dist/public/assets/{SettingsDialogBody-B_f7ik71.js → SettingsDialogBody-DuNjQ0k0.js} +2 -2
  25. package/dist/public/assets/{SourceEditor-B0xjus9Q.js → SourceEditor-BtpDdgxb.js} +1 -1
  26. package/dist/public/assets/config-validation-events-CJxHy5ln.js +12 -0
  27. package/dist/public/assets/{index-Cb45dDN8.js → index-BqbmV5y6.js} +108 -125
  28. package/dist/public/assets/{prop-types-CqTEMXrE.js → prop-types-BovHZ4kt.js} +1 -1
  29. package/dist/public/assets/{target-navigation-intent-DkDGdaxv.js → target-navigation-intent-ck2sTXFV.js} +1 -1
  30. package/dist/public/index.html +6 -6
  31. package/dist/{repair-launch-json-D2xWr0yE.mjs → repair-launch-json-B-dpVcye.mjs} +2 -2
  32. package/dist/repair-mcp-configs-D80wng8R.mjs +2 -0
  33. package/dist/repair-skills-BeneyVMe.mjs +1 -0
  34. package/dist/repair-skills-Dz7t_0qc.mjs +3 -0
  35. package/dist/{server-lock-BpjJj3OD-Cia38KR1.mjs → server-lock-BpjJj3OD-BTq99pJy.mjs} +24 -24
  36. package/dist/server-lock-CyhBidkz-DfwkCIUm.mjs +1 -0
  37. package/dist/{src-DPU6_Fcs.mjs → src-8qa_xxK5.mjs} +4 -4
  38. package/dist/start-C2uF4y8f.mjs +1 -0
  39. package/dist/{start-DbXSdBjV.mjs → start-DBSNaSRx.mjs} +2 -2
  40. package/dist/write-project-skill-BgQMKWNq.mjs +12 -0
  41. package/package.json +1 -1
  42. package/dist/colors-CkPULM8m.mjs +0 -1
  43. package/dist/constants-CRYjinaK.mjs +0 -2
  44. package/dist/dist-LI_R8UvH.mjs +0 -1
  45. package/dist/init-6ubtN129.mjs +0 -1
  46. package/dist/init-cCb4BV-1.mjs +0 -315
  47. package/dist/loader-D_kZv5X6.mjs +0 -1
  48. package/dist/preview-Dvm4NRoB.mjs +0 -1
  49. package/dist/public/assets/config-validation-events-BFEw_0e9.js +0 -12
  50. package/dist/repair-mcp-configs-ovMudNql.mjs +0 -2
  51. package/dist/repair-skills-DN4CoxxN.mjs +0 -1
  52. package/dist/repair-skills-DzMAdfno.mjs +0 -3
  53. package/dist/server-lock-CyhBidkz-tjTa2PuV.mjs +0 -1
  54. package/dist/start-DqRZ-r6P.mjs +0 -1
  55. package/dist/write-project-skill-DcTlTtX0.mjs +0 -2
@@ -1,2 +0,0 @@
1
- import{D as e,d as t,g as n,j as r,k as i}from"./init-cCb4BV-1.mjs";import{t as a}from"./mcp-migrate-event-D0NrGjvc.mjs";import{homedir as o}from"node:os";function s(t){let n=t.logger??u,r=t.home??o(),a=[];if(t.reclaimDisableEnv===`1`)return n({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=i[o],s=c(()=>e.configPath(``,r));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:e,home:r,cwd:``,configPath:s,configPathOverride:void 0,logger:n})),e.projectConfigPath){let r=e.projectConfigPath,i=c(()=>r(t.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:t.projectDir,configPath:i,configPathOverride:i,logger:n}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(e){let i={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=t(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...i,outcome:`no-entry`};if(r(o))return{...i,outcome:`canonical`};e.logger(a({scope:e.scope,surface:`cli-repair`,editorId:e.editorId,configPath:e.configPath,priorEntry:o}));let s=n(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let t=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:t}),{...i,outcome:`write-failed`,error:t}}return{...i,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
2
- //# sourceMappingURL=repair-mcp-configs-ovMudNql.mjs.map
@@ -1 +0,0 @@
1
- import{t as e}from"./repair-skills-DzMAdfno.mjs";export{e as repairSkills};
@@ -1,3 +0,0 @@
1
- import{t as e}from"./esm-BLMtE3s6.mjs";import{Mr as t,Or as n,Rr as r,Vi as i,wr as a}from"./dist-wZSZMIoi.mjs";import{t as o}from"./write-project-skill-DcTlTtX0.mjs";import{existsSync as s,mkdirSync as c,readFileSync as l,readdirSync as u,rmSync as d,statSync as f,writeFileSync as p}from"node:fs";import{dirname as m,join as h,resolve as g}from"node:path";import{homedir as _}from"node:os";const v=[{hostDir:`.claude`,editorId:`claude`},{hostDir:`.cursor`,editorId:`cursor`},{hostDir:`.agents`,editorId:`codex`}],y=`open-knowledge-discovery`,b=[`.agents`,`skills`,y],x={existsSync:e=>s(e),isDirectory:e=>{try{return f(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>u(e),readFileSync:e=>l(e),writeFileSync:(e,t)=>{p(e,t)},mkdirSync:(e,t)=>{c(e,t)},rmSync:(e,t)=>{d(e,t)}},S={resolveProjectBundledSkillDir:()=>r(`project`,{checkDesktop:!1}),resolveDiscoveryBundledSkillDir:()=>r(`discovery`,{checkDesktop:!1}),readBundledVersion:()=>a(),readRecordedVersion:e=>n(e,`cli-hosts`),writeRecordedVersion:(e,t)=>i(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>t(e)};function C(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function w(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(m(t),{recursive:!0}),T(e,t,n)}function T(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=h(e,r),a=h(t,r);n.isDirectory(i)?T(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function E(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of v){let s=h(e,t.hostDir,`skills`,`open-knowledge`),c=h(s,`SKILL.md`);if(!n.existsSync(c)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:s});continue}try{o(s,e),w(i,s,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`reclaimed`}),r({event:`project-skill-reclaim-reclaimed`,scope:`project`,editorId:t.editorId,path:s})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:s,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:s,error:n})}}return{outcome:`done`,entries:a}}async function D(e,t,n,r){let i=e=>{t.recordEvent(e).catch(()=>{})},a=()=>new Date().toISOString(),o;try{o=await t.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let s;try{s=await t.readRecordedVersion(e)}catch(e){r({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),s=null}if(s!==null&&s===o)return r({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:o}),{outcome:`skipped`,reason:`version-current`};let c;try{c=t.resolveDiscoveryBundledSkillDir()}catch(e){let t=e instanceof Error?e.message:String(e);return r({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:t}),i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`bundle-missing:${t}`}),{outcome:`skipped`,reason:`bundle-missing`}}let l=[],u=h(e,...b),d=n.existsSync(u);try{w(c,u,n),l.push({kind:`central`,path:u,outcome:d?`overwritten`:`written`}),r({event:`user-skill-reclaim-central-written`,scope:`user`,path:u,preexisting:d,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);l.push({kind:`central`,path:u,outcome:`failed`,error:t}),r({event:`user-skill-reclaim-central-failed`,scope:`user`,path:u,error:t})}for(let t of v){let i=h(e,t.hostDir),a=h(i,`skills`,y);if(a===u){l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-collapsed-with-central`});continue}if(!n.existsSync(i)){l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`skipped-host-absent`});continue}let s=n.existsSync(a);try{w(c,a,n),l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:s?`overwritten`:`written`}),r({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,preexisting:s,version:o})}catch(e){let n=e instanceof Error?e.message:String(e);l.push({kind:`host`,editorId:t.editorId,hostDir:t.hostDir,path:a,outcome:`failed`,error:n}),r({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:t.editorId,hostDir:t.hostDir,path:a,error:n})}}let f=l.find(e=>e.kind===`central`);if(f?.outcome===`written`||f?.outcome===`overwritten`){let n=null;try{await t.writeRecordedVersion(e,o),r({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:o})}catch(e){n=e instanceof Error?e.message:String(e),r({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:o,error:n})}i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:n===null?`installed`:`failed`,version:o,...n===null?{}:{reason:`state-write-failed:${n}`}})}else{let e=l.some(e=>e.kind===`host`&&e.outcome===`failed`);i({ts:a(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,version:o,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:o,entries:l}}async function O(e){let t=e.logger??C,n=e.fs??x,r=e.home??_(),i={...S,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:E(e.projectDir,i,n,t),user:await D(r,i,n,t)}}function k(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function A(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`reclaimed`).length,r=e.project.entries.filter(e=>e.outcome===`no-token`).length,i=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} reclaimed, ${r} no-token, ${i} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
2
- `)}function j(){return new e(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").action(async()=>{let e=await O({projectDir:g(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${A(e)}\n`),process.exitCode=k(e)})}export{j as n,O as t};
3
- //# sourceMappingURL=repair-skills-DzMAdfno.mjs.map
@@ -1 +0,0 @@
1
- import{g as e}from"./server-lock-BpjJj3OD-Cia38KR1.mjs";export{e as updateServerLockPort};
@@ -1 +0,0 @@
1
- import{_ as e,f as t,r as n}from"./start-DbXSdBjV.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
@@ -1,2 +0,0 @@
1
- import{Rr as e}from"./dist-wZSZMIoi.mjs";import{cpSync as t,existsSync as n,lstatSync as r,mkdirSync as i,realpathSync as a,rmSync as o}from"node:fs";import{dirname as s,isAbsolute as c,relative as l,resolve as u,sep as d}from"node:path";function f(e,t){let n;try{n=a(t)}catch{n=u(t)}let i;try{i=r(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(i?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);let o=s(e);for(;o.length>1&&o!==d;){let t;try{t=a(o)}catch(e){if(e.code===`ENOENT`){o=s(o);continue}throw e}let r=l(n,t);if(r===``||!r.startsWith(`..`)&&!c(r))return;throw Error(`Refusing to write at ${e}: ancestor ${o} resolves to ${t}, which is outside the project directory ${n}. A symbolic link in the path likely escapes the project. Remove the symlink and re-run project setup.`)}}function p(r,a){let c=r.projectSkillPath?.(a);if(!c)return{editorId:r.id,label:r.label,action:`skipped-unsupported`,path:``};try{let l=e(`project`,{checkDesktop:!0}),u=s(c);f(u,a);let d=n(c)?`overwritten`:`written`;return o(u,{recursive:!0,force:!0}),i(s(u),{recursive:!0}),t(l,u,{recursive:!0}),{editorId:r.id,label:r.label,action:d,path:c}}catch(e){return{editorId:r.id,label:r.label,action:`failed`,path:c,error:e instanceof Error?e.message:String(e)}}}export{p as n,f as t};
2
- //# sourceMappingURL=write-project-skill-DcTlTtX0.mjs.map