@inkeep/open-knowledge 0.28.0-beta.6 → 0.28.0-beta.7
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 +6 -6
- package/dist/constants-CsRzAedJ.mjs +2 -0
- package/dist/{dist-Dub-ig7i.mjs → dist-CD7iLv1c.mjs} +20 -20
- package/dist/{dist-BVj_KrOm.mjs → dist-D0fMk7yr.mjs} +1 -1
- package/dist/{gh-detect-DSpFEO46.mjs → gh-detect-Bc-KSyh6.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/init-BYtkGgzJ.mjs +1 -0
- package/dist/{init-BtskSwnA.mjs → init-CchvpcJm.mjs} +4 -4
- package/dist/{loader-BTCOlsDj.mjs → loader-D6PYbdlZ.mjs} +2 -2
- package/dist/loader-i0OkGGHL.mjs +1 -0
- package/dist/preview--hDn3-5v.mjs +1 -0
- package/dist/{preview-QT2ENrpW.mjs → preview-BJdUfbqB.mjs} +2 -2
- package/dist/{repair-launch-json-Ci_j-i_T.mjs → repair-launch-json-DewEPNYh.mjs} +2 -2
- package/dist/{repair-mcp-configs-DVTatP1p.mjs → repair-mcp-configs-CbpSWXZI.mjs} +2 -2
- package/dist/{repair-skills-CAbhMzu9.mjs → repair-skills-6mZb4DYz.mjs} +2 -2
- package/dist/repair-skills-XoOyM-MJ.mjs +1 -0
- package/dist/{src-D6ofvaU_.mjs → src-DlLXw6HJ.mjs} +2 -2
- package/dist/{start-an3G7EhI.mjs → start-BYR5bk4A.mjs} +2 -2
- package/dist/start-CneWiI6u.mjs +1 -0
- package/dist/{write-project-skill-k_Wu1Uka.mjs → write-project-skill-C11wV6Gx.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-B7J2lQgj.mjs +0 -2
- package/dist/init-D9TQvDdj.mjs +0 -1
- package/dist/loader-DFKzDb0I.mjs +0 -1
- package/dist/preview-VkwB6YTL.mjs +0 -1
- package/dist/repair-skills-BgmvshxL.mjs +0 -1
- package/dist/start-D1SMidps.mjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{It as e,S as t,an as n,wt as r}from"./server-lock-iLcBw_q0-D_cD26E0.mjs";import{d as i,ei as a,ut as o}from"./dist-
|
|
1
|
+
import{It as e,S as t,an as n,wt as r}from"./server-lock-iLcBw_q0-D_cD26E0.mjs";import{d as i,ei as a,ut as o}from"./dist-CD7iLv1c.mjs";import{basename as s,dirname as c,isAbsolute as l,join as u,posix as d,relative as f,resolve as p,sep as m,win32 as h}from"node:path";import{homedir as g}from"node:os";import{cpSync as ee,existsSync as _,lstatSync as v,mkdirSync as y,realpathSync as b,rmSync as x}from"node:fs";const S=t,C=r,w=e,T=`node`,E={MCP_DEBUG:`1`,OK_LOG_FILE:`/tmp/ok-mcp.log`},D=`# ok-mcp-v1`,O=`# ok-mcp-v1
|
|
2
2
|
USER_BUNDLE="$HOME/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
3
3
|
[ -f "$USER_BUNDLE" ] && [ -x "$USER_BUNDLE" ] && exec "$USER_BUNDLE" mcp
|
|
4
4
|
BUNDLE="/Applications/OpenKnowledge.app/Contents/Resources/cli/bin/ok.sh"
|
|
@@ -33,4 +33,4 @@ foreach ($d in $dirs) {
|
|
|
33
33
|
}
|
|
34
34
|
[Console]::Error.WriteLine('OpenKnowledge: install Node.js 24+ (npm i -g @inkeep/open-knowledge), then restart your editor')
|
|
35
35
|
exit 127`,j=`// ok-pi-bridge`,M=`${j}-v1`,N=`ok-pi-managed-extension`;function P(e){if(typeof e!=`object`||!e)return!1;let t=e;if(t.command===`/bin/sh`){if(!Array.isArray(t.args)||t.args[0]!==`-l`||t.args[1]!==`-c`)return!1;let e=t.args[2];return typeof e==`string`&&e.includes(`# ok-mcp-v1`)}if(t.command===`powershell`){if(!Array.isArray(t.args)||t.args[0]!==`-NoProfile`||t.args[1]!==`-NonInteractive`||t.args[2]!==`-Command`)return!1;let e=t.args[3];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}if(t.type===`local`&&Array.isArray(t.command)){if(t.command[0]===`/bin/sh`){if(t.command[1]!==`-l`||t.command[2]!==`-c`)return!1;let e=t.command[3];return typeof e==`string`&&e.includes(`# ok-mcp-v1`)}if(t.command[0]===`powershell`){if(t.command[1]!==`-NoProfile`||t.command[2]!==`-NonInteractive`||t.command[3]!==`-Command`)return!1;let e=t.command[4];return typeof e==`string`&&e.includes(`# ok-mcp-win-v1`)}return!1}if(t.command===`ok-pi-managed-extension`){if(!Array.isArray(t.args))return!1;let e=t.args[0];return typeof e==`string`&&e.startsWith(M)}return!1}function F(e=process.argv[1]){if(!e)throw Error(`Cannot infer the local CLI entry for --dev-mcp because process.argv[1] is empty.`);let t=p(e);if(s(t)===`cli.mjs`&&s(c(t))===`dist`)return t;let n=t.split(m),r=n.lastIndexOf(`packages`);if(r===-1||n[r+1]!==`cli`)throw Error(`Cannot infer the repo root for --dev-mcp from ${t}. Run the local CLI from this repo so the built dist path can be derived.`);let i=n.slice(0,r);return u(i.length===0?m:i.join(m),`packages`,`cli`,`dist`,`cli.mjs`)}function I(e={}){return e.mode===`dev`?{command:T,args:[F(),`mcp`],env:{...E}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,A]}:{command:`/bin/sh`,args:[`-l`,`-c`,O]}}function L(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[T,F(),`mcp`],environment:{...E}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,A]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,O]}}function te(e){if(typeof e!=`object`||!e)return!1;let t=e;return R(t,I({mode:`published`,platformName:`darwin`}))||R(t,I({mode:`published`,platformName:`win32`}))}function R(e,t){if(Object.keys(e).length!==Object.keys(t).length||e.command!==t.command)return!1;let n=t.args;return!Array.isArray(n)||!Array.isArray(e.args)||e.args.length!==n.length?!1:e.args.every((e,t)=>e===n[t])}function z(e){return e===`win32`?h:d}function B(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env,i=z(t);return t===`darwin`?i.join(n,`Library`,`Application Support`):t===`win32`?r.APPDATA??i.join(n,`AppData`,`Roaming`):r.XDG_CONFIG_HOME??i.join(n,`.config`)}function V(e={}){let t=e.platformName??process.platform,n=e.home??g();return z(t).join(n,`.claude.json`)}function H(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env;if(t===`darwin`)return d.join(n,`Library`,`Application Support`,`Claude`,`claude_desktop_config.json`);if(t===`win32`){let e=r.APPDATA??h.join(n,`AppData`,`Roaming`);return h.join(e,`Claude`,`claude_desktop_config.json`)}throw Error(`Claude Desktop is not available on ${t}. Supported: macOS, Windows.`)}function U(e={}){let t=e.platformName??process.platform,n=e.home??g();return z(t).join(n,`.cursor`,`mcp.json`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??g();return(e.env??process.env).CODEX_HOME??z(t).join(n,`.codex`)}function G(e={}){return z(e.platformName??process.platform).join(W(e),`config.toml`)}function K(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env,i=z(t);if(t===`win32`){let e=r.APPDATA??i.join(n,`AppData`,`Roaming`);return i.join(e,`opencode`)}let a=r.XDG_CONFIG_HOME??i.join(n,`.config`);return i.join(a,`opencode`)}function q(e={}){return z(e.platformName??process.platform).join(K(e),`opencode.json`)}function J(e={}){let t=e.platformName??process.platform,n=e.home??g();return z(t).join(n,`.openclaw`,`openclaw.json`)}function Y(e={}){let t=e.platformName??process.platform,n=e.home??g();return(e.env??process.env).PI_CODING_AGENT_DIR??z(t).join(n,`.pi`,`agent`)}const X={claude:{id:`claude`,label:C.claude,configPath:(e,t)=>V({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>I(t),scope:`global`,detectPath:(e,t)=>u(t??g(),`.claude`),projectConfigPath:e=>u(e,`.mcp.json`),projectSkillPath:e=>u(e,`.claude`,`skills`,`open-knowledge`,`SKILL.md`)},"claude-desktop":{id:`claude-desktop`,label:C[`claude-desktop`],configPath:(e,t)=>H({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>I(t),scope:`global`,detectPath:(e,t)=>c(H({home:t}))},cursor:{id:`cursor`,label:C.cursor,configPath:(e,t)=>U({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>I(t),scope:`global`,detectPath:(e,t)=>c(U({home:t})),projectConfigPath:e=>u(e,`.cursor`,`mcp.json`),projectSkillPath:e=>u(e,`.cursor`,`skills`,`open-knowledge`,`SKILL.md`)},codex:{id:`codex`,label:C.codex,configPath:(e,t)=>G({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>n,buildEntry:(e,t)=>I(t),scope:`global`,detectPath:(e,t)=>c(G({home:t})),projectConfigPath:e=>u(e,`.codex`,`config.toml`),projectSkillPath:e=>u(e,`.codex`,`skills`,`open-knowledge`,`SKILL.md`)},opencode:{id:`opencode`,label:C.opencode,configPath:(e,t)=>q({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>n,buildEntry:(e,t)=>L(t),scope:`global`,detectPath:(e,t)=>c(q({home:t})),projectConfigPath:e=>u(e,`opencode.json`),projectSkillPath:e=>u(e,`.opencode`,`skills`,`open-knowledge`,`SKILL.md`)},openclaw:{id:`openclaw`,label:C.openclaw,configPath:(e,t)=>J({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>n,buildEntry:(e,t)=>I(t),scope:`global`,detectPath:(e,t)=>u(t??g(),`.openclaw`),offerOnlyWhenDetected:!0},pi:{id:`pi`,label:C.pi,configPath:()=>{throw Error("Pi has no user-global MCP config; OK's integration is the project-scoped bridge extension at .pi/extensions/open-knowledge.ts (run `ok init` in the project).")},format:`file`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:()=>{throw Error(`Pi has no MCP entry shape; the managed bridge file is built by buildPiExtensionSource (integrations/pi-extension.ts).`)},scope:`project`,detectPath:(e,t)=>Y({home:t}),projectConfigPath:e=>u(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>u(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)}};function Z(e){let t=e.filter(e=>!Object.hasOwn(X,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${S.join(`, `)}`);return e.map(e=>X[e])}function Q(e){let t=[];for(let n of o){let r=i[n];t.push({path:u(e,`.agents`,`skills`,r),bundleId:n,scope:`central`});for(let i of w)t.push({path:u(e,i.hostDir,`skills`,r),bundleId:n,scope:`host`,hostDir:i.hostDir})}return t}function ne(e,t){let n=[];for(let r of Q(e))if(r.bundleId===t)try{x(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}function $(e,t){let n;try{n=b(t)}catch{n=p(t)}let r;try{r=v(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(r?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);let i=c(e);for(;i.length>1&&i!==m;){let t;try{t=b(i)}catch(e){if(e.code===`ENOENT`){i=c(i);continue}throw e}let r=f(n,t);if(r===``||!r.startsWith(`..`)&&!l(r))return;throw Error(`Refusing to write at ${e}: ancestor ${i} 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 re(e,t){let n=e.projectSkillPath?.(t);if(!n)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};try{let r=a(`project`,{checkDesktop:!0}),i=c(n);$(i,t);let o=_(n)?`overwritten`:`written`;return x(i,{recursive:!0,force:!0}),y(c(i),{recursive:!0}),ee(r,i,{recursive:!0}),{editorId:e.id,label:e.label,action:o,path:n}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}function ie(e,t){let n=e.projectSkillPath?.(t);if(!n)return{editorId:e.id,label:e.label,action:`skipped-unsupported`,path:``};try{let r=c(n);return _(n)?($(r,t),x(r,{recursive:!0,force:!0}),{editorId:e.id,label:e.label,action:`removed`,path:n}):{editorId:e.id,label:e.label,action:`not-present`,path:n}}catch(t){return{editorId:e.id,label:e.label,action:`failed`,path:n,error:t instanceof Error?t.message:String(t)}}}export{te as _,Q as a,Z as b,k as c,w as d,j as f,P as g,I as h,ne as i,C as l,N as m,ie as n,S as o,M as p,re as r,D as s,$ as t,X as u,B as v,F as y};
|
|
36
|
-
//# sourceMappingURL=write-project-skill-
|
|
36
|
+
//# sourceMappingURL=write-project-skill-C11wV6Gx.mjs.map
|
package/package.json
CHANGED
package/dist/init-D9TQvDdj.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as e}from"./init-BtskSwnA.mjs";export{e as runInit};
|
package/dist/loader-DFKzDb0I.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./loader-BTCOlsDj.mjs";export{e as loadConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./preview-QT2ENrpW.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-CAbhMzu9.mjs";export{e as repairSkills};
|
package/dist/start-D1SMidps.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,f as t,r as n}from"./start-an3G7EhI.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
|