@inkeep/open-knowledge 0.21.0-beta.1 → 0.21.0-beta.3
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 +46 -46
- package/dist/config-schema.json +10 -1
- package/dist/config.project.schema.json +10 -1
- package/dist/constants-DAG7bApL.mjs +2 -0
- package/dist/{dist-nP_B5M33.mjs → dist-BFJW9DuR.mjs} +12 -12
- package/dist/dist-BfGtTRv6.mjs +1 -0
- package/dist/{gh-detect-BDCCLwpS.mjs → gh-detect-Y9Q4N2U2.mjs} +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{init-Ak9suQ75.mjs → init-Dhv1aPmb.mjs} +6 -6
- package/dist/init-jgSviz-c.mjs +1 -0
- package/dist/{loader-BVs0WYpU.mjs → loader-D-6349k6.mjs} +3 -3
- package/dist/loader-DiFWs1y_.mjs +1 -0
- package/dist/preview-Be_jN91d.mjs +1 -0
- package/dist/{preview-CPgs08By.mjs → preview-xN_Wn3OU.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-BOmORHei.js → ActivityModeContent-D247jYIx.js} +1 -1
- package/dist/public/assets/DocumentContext-Dp34RL1b.js +34 -0
- package/dist/public/assets/{GraphPanel-BVt0SfrM.js → GraphPanel-BvU_M9V3.js} +2 -2
- package/dist/public/assets/{ManagedArtifactProperties-Dgbp1Fs2.js → ManagedArtifactProperties-3GfeTlU_.js} +1 -1
- package/dist/public/assets/PropertyPanel-BPt3vBiZ.js +2 -0
- package/dist/public/assets/SettingsDialogBody-XSleH_pq.js +7 -0
- package/dist/public/assets/{SkillEditorActions-Y_e1zC_b.js → SkillEditorActions-ChAU-Z-s.js} +1 -1
- package/dist/public/assets/{SourceEditor-BMN-4stf.js → SourceEditor-67Xo2sLX.js} +2 -2
- package/dist/public/assets/{TerminalPanel-yQbrCG8i.js → TerminalPanel-D8qsSNHn.js} +3 -3
- package/dist/public/assets/{config-validation-events-mxFyV1Om.js → config-validation-events-DC_j_did.js} +4 -4
- package/dist/public/assets/dist-BkFQsduL.js +524 -0
- package/dist/public/assets/{documents-events-DMS5a4By.js → documents-events-DlT1iRTn.js} +1 -1
- package/dist/public/assets/index-B8UWwvZN.js +2004 -0
- package/dist/public/assets/index-B_6QeCSr.css +1 -0
- package/dist/public/assets/{keyboard-shortcuts-DGu1nhPQ.js → keyboard-shortcuts-DwJbM8ry.js} +1 -1
- package/dist/public/assets/{open-managed-artifact-tab-Bvt3X7yV.js → open-managed-artifact-tab-DgV0eC9C.js} +1 -1
- package/dist/public/assets/{prop-types-Cf7ylXsu.js → prop-types-U4JAdEu3.js} +1 -1
- package/dist/public/assets/{selection-context-DzBK_3te.js → selection-context-Dnus99C9.js} +1 -1
- package/dist/public/assets/skill-actions-CFIUKji0.js +1 -0
- package/dist/public/assets/{skills-api-q4V5pwth.js → skills-api-l8gn28DG.js} +1 -1
- package/dist/public/assets/{target-navigation-intent-CCRb_XMp.js → target-navigation-intent-DJqLdwOo.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-Cc2KgY3K.js → typing-burst-detector-B9U9Xf1T.js} +2 -2
- package/dist/public/index.html +15 -15
- package/dist/{repair-launch-json-CqFPyLPp.mjs → repair-launch-json-C_HhrBCD.mjs} +2 -2
- package/dist/{repair-mcp-configs-m-qKZ1di.mjs → repair-mcp-configs-DL6KPJV-.mjs} +2 -2
- package/dist/repair-skills-BgtUq92b.mjs +1 -0
- package/dist/{repair-skills-BoKqLpQM.mjs → repair-skills-CDWroVyX.mjs} +2 -2
- package/dist/schemas/v0/config.project.schema.json +10 -1
- package/dist/server-lock-8Lv6A-Xa-DqbpfxSh.mjs +1 -0
- package/dist/{server-lock-CN2YHwpP-aP9IA5H6.mjs → server-lock-CN2YHwpP-Ca8AKq_V.mjs} +100 -100
- package/dist/{src-CUvh3EvH.mjs → src-wE89WH5Y.mjs} +2 -2
- package/dist/start-CNdOSXUn.mjs +1 -0
- package/dist/{start-PlBOTbZt.mjs → start-CzFNa_MZ.mjs} +2 -2
- package/dist/{write-project-skill-CIinFCKZ.mjs → write-project-skill-DoA_hW3W.mjs} +2 -2
- package/package.json +2 -2
- package/dist/constants-B1kUAGNO.mjs +0 -2
- package/dist/dist-BXkqG4_t.mjs +0 -1
- package/dist/init-CxrOs0W4.mjs +0 -1
- package/dist/loader-xdAClmEv.mjs +0 -1
- package/dist/preview-Bagt5mHL.mjs +0 -1
- package/dist/public/assets/DocumentContext-CfRvyFlb.js +0 -34
- package/dist/public/assets/PropertyPanel-B0hwZHMh.js +0 -2
- package/dist/public/assets/SettingsDialogBody-Dv1-9_7P.js +0 -7
- package/dist/public/assets/dist-Dst_hB5H.js +0 -524
- package/dist/public/assets/index-BHFFl2Q_.css +0 -1
- package/dist/public/assets/index-CHWT2CB5.js +0 -2004
- package/dist/public/assets/skill-actions-CQ-n4sOB.js +0 -1
- package/dist/repair-skills-ryoDc1DM.mjs +0 -1
- package/dist/server-lock-8Lv6A-Xa-C35kJqNB.mjs +0 -1
- package/dist/start-Dxf_HWcT.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-B8UWwvZN.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-CO1Sq6Ug.js">
|
|
@@ -68,8 +68,8 @@
|
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/dist-CPXhSDT0.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="./assets/dist-DEyMVsLW.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/trace-api-D2bW5RZv.js">
|
|
71
|
-
<link rel="modulepreload" crossorigin href="./assets/dist-
|
|
72
|
-
<link rel="modulepreload" crossorigin href="./assets/documents-events-
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/dist-BkFQsduL.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="./assets/documents-events-DlT1iRTn.js">
|
|
73
73
|
<link rel="modulepreload" crossorigin href="./assets/dist-CQw2y-s3.js">
|
|
74
74
|
<link rel="modulepreload" crossorigin href="./assets/propagation-api-Dhdns5D6.js">
|
|
75
75
|
<link rel="modulepreload" crossorigin href="./assets/collapsible-B9pRLq8V.js">
|
|
@@ -79,35 +79,35 @@
|
|
|
79
79
|
<link rel="modulepreload" crossorigin href="./assets/dist-KER3mSN7.js">
|
|
80
80
|
<link rel="modulepreload" crossorigin href="./assets/chevron-down-BaPMAfbX.js">
|
|
81
81
|
<link rel="modulepreload" crossorigin href="./assets/chevron-right-jyIhGBkw.js">
|
|
82
|
-
<link rel="modulepreload" crossorigin href="./assets/prop-types-
|
|
82
|
+
<link rel="modulepreload" crossorigin href="./assets/prop-types-U4JAdEu3.js">
|
|
83
83
|
<link rel="modulepreload" crossorigin href="./assets/config-context-DhhN0rlf.js">
|
|
84
84
|
<link rel="modulepreload" crossorigin href="./assets/input-CFm7DcvJ.js">
|
|
85
|
-
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-
|
|
85
|
+
<link rel="modulepreload" crossorigin href="./assets/DocumentContext-Dp34RL1b.js">
|
|
86
86
|
<link rel="modulepreload" crossorigin href="./assets/panel-BbrtnF__.js">
|
|
87
|
-
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-
|
|
88
|
-
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-
|
|
87
|
+
<link rel="modulepreload" crossorigin href="./assets/typing-burst-detector-B9U9Xf1T.js">
|
|
88
|
+
<link rel="modulepreload" crossorigin href="./assets/open-managed-artifact-tab-DgV0eC9C.js">
|
|
89
89
|
<link rel="modulepreload" crossorigin href="./assets/checkbox-DBdFRrZg.js">
|
|
90
90
|
<link rel="modulepreload" crossorigin href="./assets/dist-Dpgw_p7D.js">
|
|
91
|
-
<link rel="modulepreload" crossorigin href="./assets/skills-api-
|
|
91
|
+
<link rel="modulepreload" crossorigin href="./assets/skills-api-l8gn28DG.js">
|
|
92
92
|
<link rel="modulepreload" crossorigin href="./assets/label-Bg6tgeFh.js">
|
|
93
93
|
<link rel="modulepreload" crossorigin href="./assets/radio-group-_aqBV1Ev.js">
|
|
94
94
|
<link rel="modulepreload" crossorigin href="./assets/toggle-group-Bwdb9pNj.js">
|
|
95
95
|
<link rel="modulepreload" crossorigin href="./assets/cursor-CpjEfgnv.js">
|
|
96
|
-
<link rel="modulepreload" crossorigin href="./assets/skill-actions-
|
|
96
|
+
<link rel="modulepreload" crossorigin href="./assets/skill-actions-CFIUKji0.js">
|
|
97
97
|
<link rel="modulepreload" crossorigin href="./assets/textarea-C-Hijn80.js">
|
|
98
98
|
<link rel="modulepreload" crossorigin href="./assets/external-link-CJXR-UFu.js">
|
|
99
|
-
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-
|
|
100
|
-
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-
|
|
99
|
+
<link rel="modulepreload" crossorigin href="./assets/keyboard-shortcuts-DwJbM8ry.js">
|
|
100
|
+
<link rel="modulepreload" crossorigin href="./assets/config-validation-events-DC_j_did.js">
|
|
101
101
|
<link rel="modulepreload" crossorigin href="./assets/format-iztu8fVR.js">
|
|
102
|
-
<link rel="modulepreload" crossorigin href="./assets/selection-context-
|
|
103
|
-
<link rel="modulepreload" crossorigin href="./assets/PropertyPanel-
|
|
102
|
+
<link rel="modulepreload" crossorigin href="./assets/selection-context-Dnus99C9.js">
|
|
103
|
+
<link rel="modulepreload" crossorigin href="./assets/PropertyPanel-BPt3vBiZ.js">
|
|
104
104
|
<link rel="modulepreload" crossorigin href="./assets/agent-presence-CPRnxEOl.js">
|
|
105
105
|
<link rel="modulepreload" crossorigin href="./assets/project-paths-CK_36JyE.js">
|
|
106
|
-
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-
|
|
106
|
+
<link rel="modulepreload" crossorigin href="./assets/target-navigation-intent-DJqLdwOo.js">
|
|
107
107
|
<link rel="modulepreload" crossorigin href="./assets/terminal-theme-BxhEvVX2.js">
|
|
108
108
|
<link rel="modulepreload" crossorigin href="./assets/mcp-consent-store-DZJQdxaS.js">
|
|
109
109
|
<link rel="stylesheet" crossorigin href="./assets/DocumentContext-B0sQn39F.css">
|
|
110
|
-
<link rel="stylesheet" crossorigin href="./assets/index-
|
|
110
|
+
<link rel="stylesheet" crossorigin href="./assets/index-B_6QeCSr.css">
|
|
111
111
|
</head>
|
|
112
112
|
|
|
113
113
|
<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-Dhv1aPmb.mjs";import{t as n}from"./is-object-Cg453afR.mjs";import{join as r}from"node:path";import{existsSync as i,readFileSync as a}from"node:fs";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=r(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(!i(c))return{outcome:{configPath:c,outcome:`no-file`},repairedCount:0};let l;try{let e=a(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-C_HhrBCD.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{d as e,g as t}from"./init-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{d as e,g as t}from"./init-Dhv1aPmb.mjs";import{l as n,o as r,r as i}from"./write-project-skill-DoA_hW3W.mjs";import{t as a}from"./mcp-migrate-event-D0NrGjvc.mjs";import{homedir as o}from"node:os";function s(e){let t=e.logger??u,n=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return t({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of i){let i=r[o],s=c(()=>i.configPath(``,n));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:i,home:n,cwd:``,configPath:s,configPathOverride:void 0,logger:t})),i.projectConfigPath){let n=i.projectConfigPath,r=c(()=>n(e.projectDir));r!==null&&a.push(l({scope:`project`,editorId:o,target:i,home:void 0,cwd:e.projectDir,configPath:r,configPathOverride:r,logger:t}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(r){let i={scope:r.scope,editorId:r.editorId,configPath:r.configPath},o=e(r.target,r.cwd,r.home,r.configPathOverride);if(o===null)return{...i,outcome:`no-entry`};if(n(o))return{...i,outcome:`canonical`};r.logger(a({scope:r.scope,surface:`cli-repair`,editorId:r.editorId,configPath:r.configPath,priorEntry:o}));let s=t(r.target,r.cwd,{mode:`published`,skipAvailabilityCheck:!0},r.home,r.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return r.logger({event:`mcp-config-repair-write-failed`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,error:e}),{...i,outcome:`write-failed`,error:e}}return s.action===`declined`?(r.logger({event:`mcp-config-repair-declined`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,reason:s.declineReason}),{...i,outcome:`declined`}):{...i,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-DL6KPJV-.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-CDWroVyX.mjs";export{e as repairSkills};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{t as e}from"./esm-BLMtE3s6.mjs";import{$r as t,Rr as n,Ur as r,d as i,ia as a,qr as o,ut as s}from"./dist-
|
|
1
|
+
import{t as e}from"./esm-BLMtE3s6.mjs";import{$r as t,Rr as n,Ur as r,d as i,ia as a,qr as o,ut as s}from"./dist-BFJW9DuR.mjs";import{i as c,o as l,s as u,t as d}from"./write-project-skill-DoA_hW3W.mjs";import{dirname as f,join as p,resolve as m}from"node:path";import{existsSync as h,mkdirSync as g,readFileSync as _,readdirSync as v,rmSync as y,statSync as b,writeFileSync as x}from"node:fs";import{homedir as S}from"node:os";const C={existsSync:e=>h(e),isDirectory:e=>{try{return b(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>v(e),readFileSync:e=>_(e),writeFileSync:(e,t)=>{x(e,t)},mkdirSync:(e,t)=>{g(e,t)},rmSync:(e,t)=>{y(e,t)}},w={resolveProjectBundledSkillDir:()=>t(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>t(e,{checkDesktop:!1}),readBundledVersion:()=>n(),readRecordedVersion:e=>r(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>o(e)};function T(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function E(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(f(t),{recursive:!0}),D(e,t,n)}function D(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=p(e,r),a=p(t,r);n.isDirectory(i)?D(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function O(e,t,n,r,i,a){let o=[],s=p(e,`.agents`,`skills`,t),c=r.existsSync(s),l=!1;try{E(n,s,r),l=!0,o.push({kind:`central`,path:s,outcome:c?`overwritten`:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:c,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`central`,path:s,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-central-failed`,scope:`user`,path:s,error:t})}for(let c of u){let l=p(e,c.hostDir),u=p(l,`skills`,t);if(u===s){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!r.existsSync(l)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-host-absent`});continue}let d=r.existsSync(u);try{E(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:d?`overwritten`:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:d,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,error:t})}}return{entries:o,centralWritten:l}}function k(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(c):!1}catch{return!1}}function A(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 u){let o=p(e,t.hostDir,`skills`,`open-knowledge`),s=p(o,`SKILL.md`),c=n.existsSync(s),u=l[t.editorId]?.projectConfigPath?.(e),f=!c&&k(u,n);if(!c&&!f){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:o});continue}try{d(o,e),E(i,o,n);let s=c?`reclaimed`:`created`;a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:s}),r({event:c?`project-skill-reclaim-reclaimed`:`project-skill-reclaim-created`,scope:`project`,editorId:t.editorId,path:o})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:o,error:n})}}return{outcome:`done`,entries:a}}async function j(e,t,n,r){let a=e=>{t.recordEvent(e).catch(()=>{})},o=()=>new Date().toISOString(),c;try{c=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}),a({ts:o(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let l;try{l=await t.readRecordedVersion(e)}catch(e){r({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),l=null}if(l!==null&&l===c)return r({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:c}),{outcome:`skipped`,reason:`version-current`};let u=[],d=null;for(let e of s)try{u.push({id:e,sourceDir:t.resolveUserBundledSkillDir(e)})}catch(e){d=e instanceof Error?e.message:String(e)}if(u.length===0)return r({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:d??`no user-global bundles`}),a({ts:o(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${d}`}),{outcome:`skipped`,reason:`bundle-missing`};let f=[],p=u.length===s.length;for(let{id:t,sourceDir:a}of u){let o=O(e,i[t],a,n,r,c);f.push(...o.entries),o.centralWritten||(p=!1)}let m=f.some(e=>e.kind===`central`&&(e.outcome===`written`||e.outcome===`overwritten`));if(p&&m){let n=null;try{await t.writeRecordedVersion(e,c),r({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:c})}catch(e){n=e instanceof Error?e.message:String(e),r({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:c,error:n})}for(let{id:e}of u)a({ts:o(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:n===null?`installed`:`failed`,version:c,...n===null?{}:{reason:`state-write-failed:${n}`}})}else{let e=f.some(e=>e.kind===`host`&&e.outcome===`failed`);a({ts:o(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:c,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:c,entries:f}}async function M(e){let t=e.logger??T,n=e.fs??C,r=e.home??S(),i={...w,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:A(e.projectDir,i,n,t),user:await j(r,i,n,t)}}function N(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 P(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===`created`).length,i=e.project.entries.filter(e=>e.outcome===`no-token`).length,a=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} reclaimed, ${r} created, ${i} no-token, ${a} 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 F(){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 M({projectDir:m(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${P(e)}\n`),process.exitCode=N(e)})}export{F as n,M as t};
|
|
3
|
-
//# sourceMappingURL=repair-skills-
|
|
3
|
+
//# sourceMappingURL=repair-skills-CDWroVyX.mjs.map
|
|
@@ -4,7 +4,8 @@
|
|
|
4
4
|
"properties": {
|
|
5
5
|
"content": {
|
|
6
6
|
"default": {
|
|
7
|
-
"dir": "."
|
|
7
|
+
"dir": ".",
|
|
8
|
+
"attachmentFolderPath": "./"
|
|
8
9
|
},
|
|
9
10
|
"type": "object",
|
|
10
11
|
"properties": {
|
|
@@ -15,6 +16,14 @@
|
|
|
15
16
|
"agentSettable": false,
|
|
16
17
|
"defaultScope": "project",
|
|
17
18
|
"description": "Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore."
|
|
19
|
+
},
|
|
20
|
+
"attachmentFolderPath": {
|
|
21
|
+
"default": "./",
|
|
22
|
+
"type": "string",
|
|
23
|
+
"scope": "project",
|
|
24
|
+
"agentSettable": false,
|
|
25
|
+
"defaultScope": "project",
|
|
26
|
+
"description": "Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'."
|
|
18
27
|
}
|
|
19
28
|
},
|
|
20
29
|
"additionalProperties": {}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{g as e}from"./server-lock-CN2YHwpP-Ca8AKq_V.mjs";export{e as updateServerLockPort};
|