@inkeep/open-knowledge 0.16.0-beta.0 → 0.16.0-beta.2
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/discovery/SKILL.md +1 -1
- package/dist/assets/skills/project/SKILL.md +1 -1
- package/dist/cli.mjs +5 -5
- package/dist/constants-BJ1DXbaS.mjs +2 -0
- package/dist/{dist-6j4x3nmy.mjs → dist-C2WoIgZk.mjs} +1 -1
- package/dist/{dist-Dcg4smYg.mjs → dist-Fva5nwJ3.mjs} +3 -3
- package/dist/{gh-detect-wbzQ2Z5B.mjs → gh-detect-atRB6-LM.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/init-CT1jnEzx.mjs +1 -0
- package/dist/{init-Dx1FSwm_.mjs → init-DcBFdJ1M.mjs} +4 -4
- package/dist/{loader-Bi8VVUuv.mjs → loader-BTjM3Dli.mjs} +2 -2
- package/dist/loader-DLIp7YPU.mjs +1 -0
- package/dist/{preview-CNJw1WeR.mjs → preview-8yV0AC4u.mjs} +2 -2
- package/dist/preview-B82gruIZ.mjs +1 -0
- package/dist/public/assets/SettingsDialogBody-CIE_A6cd.js +7 -0
- package/dist/public/assets/TerminalPanel-Cs6SOojP.js +145 -0
- package/dist/public/assets/{config-validation-events-Dom3HCUM.js → config-validation-events-C0vw-EiG.js} +5 -5
- package/dist/public/assets/index-BnOmMrYn.js +2019 -0
- package/dist/public/assets/index-CZh9fj9x.css +1 -0
- package/dist/public/index.html +3 -3
- package/dist/{repair-launch-json-Bm5zcxnt.mjs → repair-launch-json-CPsZ0vUE.mjs} +2 -2
- package/dist/{repair-mcp-configs-B6-IzQ47.mjs → repair-mcp-configs-BafNj8ng.mjs} +2 -2
- package/dist/{repair-skills-DsHqeRKO.mjs → repair-skills-DRIx-7kd.mjs} +2 -2
- package/dist/repair-skills-hqMERPix.mjs +1 -0
- package/dist/{server-lock-BpjJj3OD-DlYx_Xz-.mjs → server-lock-BpjJj3OD-Cia38KR1.mjs} +56 -56
- package/dist/server-lock-CyhBidkz-tjTa2PuV.mjs +1 -0
- package/dist/{src-DmdJFypb.mjs → src-BbdaPc83.mjs} +2 -2
- package/dist/{start-mHeHaykC.mjs → start-B7VNRJL1.mjs} +2 -2
- package/dist/start-HYa5ilCd.mjs +1 -0
- package/dist/{write-project-skill-C5HoLkCk.mjs → write-project-skill-qrwa7bU6.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-zR9K6MQx.mjs +0 -2
- package/dist/init-5s5Urhtt.mjs +0 -1
- package/dist/loader-N9LzTn4Q.mjs +0 -1
- package/dist/preview-BvKJzJeL.mjs +0 -1
- package/dist/public/assets/SettingsDialogBody-BM8EOX42.js +0 -7
- package/dist/public/assets/TerminalPanel-CDbNsVll.js +0 -145
- package/dist/public/assets/index-CIPatjw4.css +0 -1
- package/dist/public/assets/index-DIPWIhIx.js +0 -2019
- package/dist/repair-skills-DrcVDbk1.mjs +0 -1
- package/dist/server-lock-CyhBidkz-DUTkjNDG.mjs +0 -1
- package/dist/start-LI_wE7gV.mjs +0 -1
package/dist/public/index.html
CHANGED
|
@@ -48,7 +48,7 @@
|
|
|
48
48
|
-->
|
|
49
49
|
<script>(() => { let t = 'system'; try { const r = localStorage.getItem('ok-theme-v1'); if (r === 'light' || r === 'dark' || r === 'system') t = r; } catch {} let dark = t === 'dark'; if (t === 'system') { try { dark = window.matchMedia('(prefers-color-scheme: dark)').matches; } catch {} } if (dark) document.documentElement.classList.add('dark'); if (window.okDesktop) document.documentElement.classList.add('electron-mode'); })();</script>
|
|
50
50
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
51
|
-
<script type="module" crossorigin src="./assets/index-
|
|
51
|
+
<script type="module" crossorigin src="./assets/index-BnOmMrYn.js"></script>
|
|
52
52
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CFjPhJqf.js">
|
|
53
53
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-2ej06EnG.js">
|
|
54
54
|
<link rel="modulepreload" crossorigin href="./assets/w3c-keyname-CIO0QKme.js">
|
|
@@ -81,14 +81,14 @@
|
|
|
81
81
|
<link rel="modulepreload" crossorigin href="./assets/dist-DANsqx2U.js">
|
|
82
82
|
<link rel="modulepreload" crossorigin href="./assets/textarea-BuWgZ9oe.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-DsOyo0jm.js">
|
|
84
|
-
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-
|
|
84
|
+
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-C0vw-EiG.js">
|
|
85
85
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-CarzuseD.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-BocrcwYE.js">
|
|
87
87
|
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-Bveb0MPP.js">
|
|
88
88
|
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-DNu_Qz96.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-DWTjYi5_.js">
|
|
90
90
|
<link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
|
|
91
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
91
|
+
<link rel="stylesheet" crossorigin href="./assets/index-CZh9fj9x.css">
|
|
92
92
|
</head>
|
|
93
93
|
|
|
94
94
|
<body class="antialiased">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{h as e,n as t}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{h as e,n as t}from"./init-DcBFdJ1M.mjs";import{t as n}from"./is-object-Cie0xXKD.mjs";import{existsSync as r,readFileSync as i}from"node:fs";import{join as a}from"node:path";const o=[[`@inkeep/open-knowledge`,`ui`],[`-y`,`@inkeep/open-knowledge`,`ui`],t];function s(e){if(e.runtimeExecutable===`/bin/sh`&&Array.isArray(e.runtimeArgs)){let t=e.runtimeArgs[2];if(typeof t==`string`){if(t.includes(`# ok-ui-v1`))return`canonical`;if(/# ok-ui-v\d+/.test(t))return`legacy-bare`}return`preserved`}if(e.runtimeExecutable===`npx`&&Array.isArray(e.runtimeArgs)){for(let t of o)if(c(e.runtimeArgs,t))return`legacy-bare`}return`preserved`}function c(e,t){if(e.length!==t.length)return!1;for(let n=0;n<t.length;n++)if(e[n]!==t[n])return!1;return!0}function l(t){let o=t.logger??u,c=a(t.projectDir,`.claude`,`launch.json`);if(t.reclaimDisableEnv===`1`)return o({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:c,outcome:`skipped-reclaim-disabled`},repairedCount:0};if(!r(c))return{outcome:{configPath:c,outcome:`no-file`},repairedCount:0};let l;try{let e=i(c,`utf-8`).trim();l=e?JSON.parse(e):{}}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`launch-json-repair-read-failed`,configPath:c,error:t}),{outcome:{configPath:c,outcome:`read-failed`,error:t},repairedCount:0}}if(!n(l)){let e=`launch.json root is not an object`;return o({event:`launch-json-repair-read-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`read-failed`,error:e},repairedCount:0}}let d=l.configurations;if(!Array.isArray(d))return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let f=d.find(e=>n(e)&&e.name===`open-knowledge-ui`);if(!f)return{outcome:{configPath:c,outcome:`no-entry`},repairedCount:0};let p=s(f);if(p===`canonical`)return{outcome:{configPath:c,outcome:`canonical`},repairedCount:0};if(p===`preserved`)return{outcome:{configPath:c,outcome:`preserved`},repairedCount:0};let m=e(t.projectDir,{mode:`published`});if(m.action===`failed`){let e=m.error??`unknown write failure`;return o({event:`launch-json-repair-write-failed`,configPath:c,error:e}),{outcome:{configPath:c,outcome:`write-failed`,error:e},repairedCount:0}}return o({event:`launch-json-repair-applied`,configPath:c}),{outcome:{configPath:c,outcome:`repaired`},repairedCount:1}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{l as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-CPsZ0vUE.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{D as e,d as t,g as n,j as r,k as i}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{D as e,d as t,g as n,j as r,k as i}from"./init-DcBFdJ1M.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-BafNj8ng.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
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-
|
|
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-Fva5nwJ3.mjs";import{t as o}from"./write-project-skill-qrwa7bU6.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
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-
|
|
3
|
+
//# sourceMappingURL=repair-skills-DRIx-7kd.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-DRIx-7kd.mjs";export{e as repairSkills};
|