@inkeep/open-knowledge 0.10.0-beta.9 → 0.10.1-beta.0
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 +54 -48
- package/dist/config-schema.json +57 -0
- package/dist/config.project-local.schema.json +57 -0
- package/dist/constants-B45M40rx.mjs +2 -0
- package/dist/dist-CaLi0vY9.mjs +1 -0
- package/dist/{dist-DLLsPJ9U.mjs → dist-jSj9zzv0.mjs} +24 -23
- package/dist/{gh-detect-BGpLt_9t.mjs → gh-detect-Bl7eyodQ.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-DNFUwGbt.mjs → init-BQldYl_j.mjs} +18 -18
- package/dist/init-DKP6EDgg.mjs +1 -0
- package/dist/loader-DaI1oEpk.mjs +1 -0
- package/dist/{loader-B_0kC5qP.mjs → loader-Dv8cLHe5.mjs} +3 -3
- package/dist/{preview-BP4tJ2Iu.mjs → preview-Bj-ZPQTB.mjs} +2 -2
- package/dist/preview-CvqEQ2uu.mjs +1 -0
- package/dist/public/assets/{ActivityModeContent-BwQQ3J_E.js → ActivityModeContent-UY1y3Xj6.js} +1 -1
- package/dist/public/assets/{DocumentContext-DSlG6YaD.js → DocumentContext-Cnk29mEx.js} +9 -9
- package/dist/public/assets/{GraphPanel-BRUm_fhE.js → GraphPanel-_BCbvLM6.js} +1 -1
- package/dist/public/assets/SettingsDialogBody-CbC9w0WE.js +7 -0
- package/dist/public/assets/{SourceEditor-Dl9IMPTy.js → SourceEditor-C9msETk8.js} +2 -2
- package/dist/public/assets/{config-validation-events-DrkYIj0b.js → config-validation-events-BdpeA0wR.js} +1 -1
- package/dist/public/assets/{index-BsXXFIC5.js → index-CCZM1n4u.js} +7 -7
- package/dist/public/assets/index-Cof56snX.css +1 -0
- package/dist/public/assets/{keyboard-shortcuts-7YXzJfGc.js → keyboard-shortcuts-D1ntCgJI.js} +1 -1
- package/dist/public/assets/{prop-types-DMEbXAvm.js → prop-types-3UnRySkO.js} +130 -130
- package/dist/public/assets/{target-navigation-intent-CLpNsaEw.js → target-navigation-intent-SROx-nlb.js} +1 -1
- package/dist/public/assets/{telemetry-impl-BCjHJnNa.js → telemetry-impl-aspahMYR.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-C8K6iZNM.js → typing-burst-detector-o75X2Euj.js} +1 -1
- package/dist/public/index.html +8 -8
- package/dist/{repair-launch-json-C3tWHctI.mjs → repair-launch-json-21W6ZyTC.mjs} +2 -2
- package/dist/{repair-mcp-configs-DP6bcoNL.mjs → repair-mcp-configs-CxHEoxpY.mjs} +2 -2
- package/dist/repair-skills-CqSK9MSk.mjs +1 -0
- package/dist/{repair-skills-aYu-R20l.mjs → repair-skills-CxXhBfwl.mjs} +2 -2
- package/dist/schemas/v0/config.project-local.schema.json +57 -0
- package/dist/{server-lock-BpjJj3OD-DEuL_F6k.mjs → server-lock-BpjJj3OD-BPX9iz2A.mjs} +89 -89
- package/dist/server-lock-CyhBidkz-C_shPhcO.mjs +1 -0
- package/dist/{src-Ad1isO-9.mjs → src-CS4lDD6h.mjs} +2 -2
- package/dist/start-DdWzGG1a.mjs +1 -0
- package/dist/start-DeUqsR6i.mjs +3 -0
- package/dist/{write-project-skill-BrFmZCMd.mjs → write-project-skill-dGukOGLo.mjs} +2 -2
- package/package.json +2 -1
- package/dist/constants-Chrt6UKP.mjs +0 -2
- package/dist/dist-CcfJnewj.mjs +0 -1
- package/dist/init-BpglUwje.mjs +0 -1
- package/dist/loader-BJsgp07g.mjs +0 -1
- package/dist/preview-B2cD9lkg.mjs +0 -1
- package/dist/public/assets/SettingsDialogBody-CKwZY_LV.js +0 -7
- package/dist/public/assets/index-B3eQbsM3.css +0 -1
- package/dist/repair-skills-B3uiMrne.mjs +0 -1
- package/dist/server-lock-CyhBidkz-BpB26sqh.mjs +0 -1
- package/dist/start-BF1QWSQY.mjs +0 -3
- package/dist/start-O4HqnFeH.mjs +0 -1
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./esm-CEs3LWY3.mjs";import{
|
|
1
|
+
import{t as e}from"./esm-CEs3LWY3.mjs";import{Ni as t,Tr as n,_r as r,jr as i,xr as a}from"./dist-jSj9zzv0.mjs";import{t as o}from"./write-project-skill-dGukOGLo.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:()=>i(`project`,{checkDesktop:!1}),resolveDiscoveryBundledSkillDir:()=>i(`discovery`,{checkDesktop:!1}),readBundledVersion:()=>r(),readRecordedVersion:e=>a(e,`cli-hosts`),writeRecordedVersion:(e,n)=>t(e,`cli-hosts`,n,`cli-start`),recordEvent:e=>n(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-CxXhBfwl.mjs.map
|
|
@@ -58,6 +58,63 @@
|
|
|
58
58
|
}
|
|
59
59
|
},
|
|
60
60
|
"additionalProperties": {}
|
|
61
|
+
},
|
|
62
|
+
"search": {
|
|
63
|
+
"default": {
|
|
64
|
+
"semantic": {
|
|
65
|
+
"enabled": false,
|
|
66
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
67
|
+
"model": "text-embedding-3-small"
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
"type": "object",
|
|
71
|
+
"properties": {
|
|
72
|
+
"semantic": {
|
|
73
|
+
"default": {
|
|
74
|
+
"enabled": false,
|
|
75
|
+
"baseUrl": "https://api.openai.com/v1",
|
|
76
|
+
"model": "text-embedding-3-small"
|
|
77
|
+
},
|
|
78
|
+
"type": "object",
|
|
79
|
+
"properties": {
|
|
80
|
+
"enabled": {
|
|
81
|
+
"default": false,
|
|
82
|
+
"type": "boolean",
|
|
83
|
+
"scope": "project-local",
|
|
84
|
+
"agentSettable": false,
|
|
85
|
+
"defaultScope": "project-local",
|
|
86
|
+
"description": "Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."
|
|
87
|
+
},
|
|
88
|
+
"baseUrl": {
|
|
89
|
+
"default": "https://api.openai.com/v1",
|
|
90
|
+
"type": "string",
|
|
91
|
+
"scope": "project-local",
|
|
92
|
+
"agentSettable": false,
|
|
93
|
+
"defaultScope": "project-local",
|
|
94
|
+
"description": "Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override for Azure / self-hosted / other providers. The API key is NOT stored here — set it with `ok embeddings set-key` (OS keyring)."
|
|
95
|
+
},
|
|
96
|
+
"model": {
|
|
97
|
+
"default": "text-embedding-3-small",
|
|
98
|
+
"type": "string",
|
|
99
|
+
"scope": "project-local",
|
|
100
|
+
"agentSettable": false,
|
|
101
|
+
"defaultScope": "project-local",
|
|
102
|
+
"description": "Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions)."
|
|
103
|
+
},
|
|
104
|
+
"dimensions": {
|
|
105
|
+
"type": "integer",
|
|
106
|
+
"exclusiveMinimum": 0,
|
|
107
|
+
"maximum": 9007199254740991,
|
|
108
|
+
"scope": "project-local",
|
|
109
|
+
"agentSettable": false,
|
|
110
|
+
"defaultScope": "project-local",
|
|
111
|
+
"description": "Optional output vector dimensions. Omit to use the model's native size (1536 for text-embedding-3-small). Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality. Changing it re-embeds the corpus."
|
|
112
|
+
}
|
|
113
|
+
},
|
|
114
|
+
"additionalProperties": {}
|
|
115
|
+
}
|
|
116
|
+
},
|
|
117
|
+
"additionalProperties": {}
|
|
61
118
|
}
|
|
62
119
|
},
|
|
63
120
|
"additionalProperties": {}
|