@inkeep/open-knowledge 0.28.2-beta.7 → 0.28.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 +6 -6
- package/dist/constants-Br0O5zjA.mjs +2 -0
- package/dist/{dist-BVDj7oJZ.mjs → dist-AMcKbNor.mjs} +3 -3
- package/dist/{dist-72is7jRd.mjs → dist-B3w6eOOV.mjs} +1 -1
- package/dist/index.mjs +1 -1
- package/dist/init-CdmFBgOe.mjs +1 -0
- package/dist/{init-Bqebm894.mjs → init-gfjsyIYB.mjs} +4 -4
- package/dist/{loader-COxNn9xC.mjs → loader-DglCaNtQ.mjs} +2 -2
- package/dist/loader-LMMChOMd.mjs +1 -0
- package/dist/native/native-config.linux-x64-gnu.node +0 -0
- package/dist/{open-browser-R_RWX931.mjs → open-browser-D9No9V7u.mjs} +2 -2
- package/dist/preview-CP53jEdN.mjs +1 -0
- package/dist/{preview-po0BRaed.mjs → preview-CVMx2nNA.mjs} +2 -2
- package/dist/{repair-launch-json-DYiUA58w.mjs → repair-launch-json-BXcID4fT.mjs} +2 -2
- package/dist/{repair-mcp-configs-Dnsey35b.mjs → repair-mcp-configs-BUblf8y6.mjs} +2 -2
- package/dist/repair-skills-0DLicwIy.mjs +1 -0
- package/dist/{repair-skills-B_aLnXpL.mjs → repair-skills-oX4aXhcO.mjs} +2 -2
- package/dist/{src-Cr3S-sWu.mjs → src-BOlpZYXP.mjs} +2 -2
- package/dist/{start-bf4sU4YY.mjs → start-CQ5WKopr.mjs} +2 -2
- package/dist/start-CX_XR9zV.mjs +1 -0
- package/dist/{write-project-skill-ClrMnKU-.mjs → write-project-skill-Dw9Did_1.mjs} +2 -2
- package/package.json +1 -1
- package/dist/constants-CJewA8Rt.mjs +0 -2
- package/dist/init-Cp06l5nD.mjs +0 -1
- package/dist/loader-DS2hJyEE.mjs +0 -1
- package/dist/preview-xn2pE_Jx.mjs +0 -1
- package/dist/repair-skills-D_mTmSrp.mjs +0 -1
- package/dist/start-CrLp5ZFH.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-pnLGEjec.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-pnLGEjec.mjs";import{d as i,ei as a,ut as o}from"./dist-AMcKbNor.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 _,existsSync as v,lstatSync as ee,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`,A=`// ok-pi-bridge`,j=`${A}-v1`,M=`ok-pi-managed-extension`;function N(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(j)}return!1}function P(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 F(e={}){return e.mode===`dev`?{command:T,args:[P(),`mcp`],env:{...E}}:(e.platformName??process.platform)===`win32`?{command:`powershell`,args:[`-NoProfile`,`-NonInteractive`,`-Command`,k]}:{command:`/bin/sh`,args:[`-l`,`-c`,O]}}function ne(e={}){return e.mode===`dev`?{type:`local`,enabled:!0,command:[T,P(),`mcp`],environment:{...E}}:(e.platformName??process.platform)===`win32`?{type:`local`,enabled:!0,command:[`powershell`,`-NoProfile`,`-NonInteractive`,`-Command`,k]}:{type:`local`,enabled:!0,command:[`/bin/sh`,`-l`,`-c`,O]}}function re(e){if(typeof e!=`object`||!e)return!1;let t=e;return I(t,F({mode:`published`,platformName:`darwin`}))||I(t,F({mode:`published`,platformName:`win32`}))}function I(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 L(e){return e===`win32`?h:d}function R(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env,i=L(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 z(e={}){let t=e.platformName??process.platform,n=e.home??g();return L(t).join(n,`.claude.json`)}function B(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 V(e={}){let t=e.platformName??process.platform,n=e.home??g();return L(t).join(n,`.cursor`,`mcp.json`)}function H(e={}){let t=e.platformName??process.platform,n=e.home??g();return(e.env??process.env).CODEX_HOME??L(t).join(n,`.codex`)}function U(e={}){return L(e.platformName??process.platform).join(H(e),`config.toml`)}function W(e={}){let t=e.platformName??process.platform,n=e.home??g(),r=e.env??process.env,i=L(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 G(e={}){return L(e.platformName??process.platform).join(W(e),`opencode.json`)}function K(e={}){let t=e.platformName??process.platform,n=e.home??g();return L(t).join(n,`.openclaw`,`openclaw.json`)}function q(e={}){let t=e.platformName??process.platform,n=e.home??g();return(e.env??process.env).PI_CODING_AGENT_DIR??L(t).join(n,`.pi`,`agent`)}const J={claude:{id:`claude`,label:C.claude,configPath:(e,t)=>z({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>F(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)=>B({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>F(t),scope:`global`,detectPath:(e,t)=>c(B({home:t}))},cursor:{id:`cursor`,label:C.cursor,configPath:(e,t)=>V({home:t}),format:`json`,topLevelKey:`mcpServers`,serverName:()=>n,buildEntry:(e,t)=>F(t),scope:`global`,detectPath:(e,t)=>c(V({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)=>U({home:t}),format:`toml`,topLevelKey:`mcp_servers`,serverName:()=>n,buildEntry:(e,t)=>F(t),scope:`global`,detectPath:(e,t)=>c(U({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)=>G({home:t}),format:`json`,topLevelKey:`mcp`,serverName:()=>n,buildEntry:(e,t)=>ne(t),scope:`global`,detectPath:(e,t)=>c(G({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)=>K({home:t}),format:`json`,topLevelKey:`mcp`,serverMapSubKey:`servers`,serverName:()=>n,buildEntry:(e,t)=>F(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)=>q({home:t}),projectConfigPath:e=>u(e,`.pi`,`extensions`,`open-knowledge.ts`),projectSkillPath:e=>u(e,`.pi`,`skills`,`open-knowledge`,`SKILL.md`)}};function Y(e){let t=e.filter(e=>!Object.hasOwn(J,e));if(t.length>0)throw Error(`Unknown editor(s): ${t.join(`, `)}. Valid options: ${S.join(`, `)}`);return e.map(e=>J[e])}function X(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 ie(e,t){let n=[];for(let r of X(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 Z(e,t){let n;try{n=ee(e)}catch(e){if(e.code!==`ENOENT`)throw e}if(n?.isSymbolicLink())throw Error(`Refusing to write through a symbolic link at ${e}. Remove the symlink and re-run project setup.`);$(e,t)}function Q(e,t){$(e,t)}function $(e,t){let n;try{n=b(t)}catch{n=p(t)}let r=c(e);for(;r.length>1&&r!==m;){let t;try{t=b(r)}catch(e){if(e.code===`ENOENT`){r=c(r);continue}throw e}let i=f(n,t);if(i===``||!i.startsWith(`..`)&&!l(i))return;throw Error(`Refusing to write at ${e}: ancestor ${r} 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 ae(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);Z(i,t);let o=v(n)?`overwritten`:`written`;return x(i,{recursive:!0,force:!0}),y(c(i),{recursive:!0}),_(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 oe(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 v(n)?(Q(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{N as _,ie as a,P as b,D as c,J as d,w as f,F as g,M as h,ae as i,te as l,j as m,Q as n,X as o,A as p,oe as r,S as s,Z as t,C as u,re as v,Y as x,R as y};
|
|
36
|
-
//# sourceMappingURL=write-project-skill-
|
|
36
|
+
//# sourceMappingURL=write-project-skill-Dw9Did_1.mjs.map
|
package/package.json
CHANGED
package/dist/init-Cp06l5nD.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{x as e}from"./init-Bqebm894.mjs";export{e as runInit};
|
package/dist/loader-DS2hJyEE.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e}from"./loader-COxNn9xC.mjs";export{e as loadConfig};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./preview-po0BRaed.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{t as e}from"./repair-skills-B_aLnXpL.mjs";export{e as repairSkills};
|
package/dist/start-CrLp5ZFH.mjs
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as e,f as t,r as n}from"./start-bf4sU4YY.mjs";export{n as bootStartServer,t as resolveHost,e as startCommand};
|