@inkeep/open-knowledge 0.55.0-beta.4 → 0.55.0-beta.5
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/{acp-harness-probe-6UPrAxfw.mjs → acp-harness-probe-IrN5y1Zt.mjs} +2 -2
- package/dist/cli.mjs +6 -6
- package/dist/constants-CtisGJwp.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-Bl85LxsN.mjs → init-Bdc4_J8y.mjs} +3 -3
- package/dist/init-CTO2XDZn.mjs +1 -0
- package/dist/{launch-json-removal-qO950FB-.mjs → launch-json-removal-DVQJNXzs.mjs} +2 -2
- package/dist/{loader-D2i-9tlF.mjs → loader-C114aVtN.mjs} +2 -2
- package/dist/loader-DAFEc_YH.mjs +1 -0
- package/dist/{open-browser-Brapgliv.mjs → open-browser-yKkW4h2Y.mjs} +2 -2
- package/dist/preview-BnVpRKr8.mjs +1 -0
- package/dist/{preview-CVd4oJuC.mjs → preview-CuKaF0sy.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-B6B0XkRP.js → ActivityModeContent-CGt4gdkE.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-DUQ3CUA4.js → AgentDiffPane-BK6nXxgL.js} +1 -1
- package/dist/public/assets/{AgentThreadClientBinder-Csob4p3i.js → AgentThreadClientBinder-miktyyCN.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-CG27Rufy.js → ChangedOutsideBadge-BpgWXgdQ.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-BAzgoHI6.js → CodeMirrorPropInput-D3ucjhHm.js} +1 -1
- package/dist/public/assets/{DocumentContext-p7JYyJ5y.js → DocumentContext-AlGbMLkh.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-DB2Jgh4-.js → EditorModeToggle-UAbxF5To.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-DNvC_cwv.js → EnableSyncConfirmDialog-DVuwpB4J.js} +1 -1
- package/dist/public/assets/FeedbackForm-B90ix-Kg.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-Ct6hh5Ys.js → ImportSkillDialog-DKhayp63.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DwYYSSQk.js → LintConfigEditor-D5jPBs4Y.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B_i7vAog.js +1 -0
- package/dist/public/assets/{ManagedArtifactProperties-BxfgQl5h.js → ManagedArtifactProperties-CxRJpQHc.js} +1 -1
- package/dist/public/assets/{MermaidDocEditor-OAqHqFYq.js → MermaidDocEditor-Fs1V4duK.js} +1 -1
- package/dist/public/assets/{PropertyDisplayRow-Db2m-vg9.js → PropertyDisplayRow-CnAnw69z.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-B0fzrE8d.js → SchemaConfigEditor-RSErZEgN.js} +1 -1
- package/dist/public/assets/{SessionsHost-CLzFhlyX.js → SessionsHost-CsZc-LhH.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-BvSY5j5q.js → SettingsDialogBody-CFRkPSZ6.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-BaE6j7vF.js → ShareReceiveMissDialog-BmXRyhIF.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-gWVeswtx.js → SkillToolbarControls-BILzRYyn.js} +1 -1
- package/dist/public/assets/{SourceEditor-OBQOzb96.js → SourceEditor-Dp4EUDvf.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-C8_m5Fex.js → TerminalWindowApp-BLd9hOqU.js} +1 -1
- package/dist/public/assets/{TextDocEditor-B1hzujj8.js → TextDocEditor-k6wMcRge.js} +1 -1
- package/dist/public/assets/ThreadView-Dpn2uIXP.js +11 -0
- package/dist/public/assets/{TimelineDiffPane-D35li5cd.js → TimelineDiffPane-C8ZPRQY5.js} +1 -1
- package/dist/public/assets/{agent-diff-store-B1soM-XB.js → agent-diff-store-BuSzi1rI.js} +1 -1
- package/dist/public/assets/{auth-state-cache-Bpoabuvd.js → auth-state-cache-Dq5QQapT.js} +1 -1
- package/dist/public/assets/{comment-chips-Bntt7bMc.js → comment-chips-hJzoiufP.js} +1 -1
- package/dist/public/assets/{config-provider-C31k6UfP.js → config-provider-DLVZwxdI.js} +3 -3
- package/dist/public/assets/{follow-file-3TM0rd_u.js → follow-file-DzomkKuE.js} +1 -1
- package/dist/public/assets/globals-DKz9Fx08.css +1 -0
- package/dist/public/assets/i18n-D2UC9wqq.js +1 -0
- package/dist/public/assets/{index-pL5L34nZ.js → index-C0UZxHv7.js} +7 -7
- package/dist/public/assets/messages--PPoOIGA.js +1 -0
- package/dist/public/assets/messages-B6gSU3lY.js +1 -0
- package/dist/public/assets/messages-BK-oTGqT.js +1 -0
- package/dist/public/assets/messages-CD9CcUNV.js +1 -0
- package/dist/public/assets/messages-CGv8gLlS.js +1 -0
- package/dist/public/assets/messages-CMRgUn5M.js +1 -0
- package/dist/public/assets/messages-DCqUVMCv.js +1 -0
- package/dist/public/assets/messages-DNz_Mmk-.js +1 -0
- package/dist/public/assets/messages-bqfM3-kX.js +1 -0
- package/dist/public/assets/messages-xRwuva2Z.js +1 -0
- package/dist/public/assets/messages-yvRuWd6h.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-D_Tff2vn.js → pending-receive-nav-store-9gt8cNX6.js} +1 -1
- package/dist/public/assets/{selection-context-C4skdpoh.js → selection-context-DRmqwGND.js} +1 -1
- package/dist/public/assets/{skill-actions-IlfZ2-U4.js → skill-actions-D4KEi9Pq.js} +1 -1
- package/dist/public/assets/{src-BCXOKwe0.js → src-CVLChnG6.js} +1 -1
- package/dist/public/assets/thread-client-CakEvWAI.js +1 -0
- package/dist/public/assets/{typing-burst-detector-DGnz65XG.js → typing-burst-detector-DH2Rlwup.js} +1 -1
- package/dist/public/assets/{uninstall-C09MgiDi.js → uninstall-vNaFgYA1.js} +1 -1
- package/dist/public/assets/{use-activity-panel-DZlqLWmy.js → use-activity-panel-YCstCwaO.js} +1 -1
- package/dist/public/assets/{use-open-skill-DAUp_Rzh.js → use-open-skill-VG1-4Nsn.js} +1 -1
- package/dist/public/assets/{use-popular-skills-CEjDH4Aw.js → use-popular-skills-kDrJnq14.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-Dh1PqvNS.js → use-terminal-enabled-BAcFB-Dz.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-ajEKQCct.js → use-timeline-entry-diff-C8fCRB8i.js} +1 -1
- package/dist/public/index.html +23 -23
- package/dist/public/uninstall.html +5 -5
- package/dist/{repair-launch-json-BiGsFiSD.mjs → repair-launch-json-Bv1WzsqN.mjs} +2 -2
- package/dist/{repair-mcp-configs-BtFdQCV_.mjs → repair-mcp-configs-B5i4cMqN.mjs} +2 -2
- package/dist/repair-skills-Bv6AIwrB.mjs +1 -0
- package/dist/{repair-skills-raI2kDxq.mjs → repair-skills-DOlvrBke.mjs} +2 -2
- package/dist/{skill-teardown-DtTIXUf1.mjs → skill-teardown-HfwG1GPl.mjs} +2 -2
- package/dist/{src-D9es0ZiI.mjs → src-CCUT-FUT.mjs} +393 -392
- package/dist/src-CZxh1MR9.mjs +1 -0
- package/dist/{src-MsAlzgh6.mjs → src-DPSmO6NW.mjs} +2 -2
- package/dist/{src-CZIOS4zQ.mjs → src-cqsLtkH7.mjs} +1 -1
- package/dist/start-BxJJzxFG.mjs +1 -0
- package/dist/{start-CBrmIkY5.mjs → start-DkDqn2N3.mjs} +4 -4
- package/dist/{ui-lxAq1w8W.mjs → ui-Dlc6NhOg.mjs} +3 -3
- package/dist/{write-project-skill-b7kAD-_p.mjs → write-project-skill-D-PwfVvG.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-Ci81wafj.mjs +0 -2
- package/dist/init-C3we01IM.mjs +0 -1
- package/dist/loader-DEdm-xzZ.mjs +0 -1
- package/dist/preview-iRx8YCh4.mjs +0 -1
- package/dist/public/assets/FeedbackForm-l8fuhIGb.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BoToQpVj.js +0 -1
- package/dist/public/assets/ThreadView-BDfvsRBm.js +0 -11
- package/dist/public/assets/globals-BhzTz4bG.css +0 -1
- package/dist/public/assets/i18n-Dz1ejpQO.js +0 -1
- package/dist/public/assets/messages-BPWZVZqy.js +0 -1
- package/dist/public/assets/messages-BqW-P3Cb.js +0 -1
- package/dist/public/assets/messages-C2SN5v0L.js +0 -1
- package/dist/public/assets/messages-CFGLKz5z.js +0 -1
- package/dist/public/assets/messages-Ctc5fTSc.js +0 -1
- package/dist/public/assets/messages-DExJWmCj.js +0 -1
- package/dist/public/assets/messages-DIuILwqs.js +0 -1
- package/dist/public/assets/messages-DLkJxMfW.js +0 -1
- package/dist/public/assets/messages-DfQAmf20.js +0 -1
- package/dist/public/assets/messages-DuoiZyES.js +0 -1
- package/dist/public/assets/messages-qBdRwEiC.js +0 -1
- package/dist/public/assets/thread-client-B6n1aWaF.js +0 -1
- package/dist/repair-skills-DU2_oJ0b.mjs +0 -1
- package/dist/src-DFZ6XBZb.mjs +0 -1
- package/dist/start-YYWbWZmb.mjs +0 -1
- /package/dist/public/assets/{globals-DuYLmdLZ.js → globals-D-rFhlM5.js} +0 -0
|
@@ -32,11 +32,11 @@
|
|
|
32
32
|
script above.
|
|
33
33
|
-->
|
|
34
34
|
<style>html { background-color: #fafafa } html.dark { background-color: #171717 }</style>
|
|
35
|
-
<script type="module" crossorigin src="./assets/uninstall-
|
|
35
|
+
<script type="module" crossorigin src="./assets/uninstall-vNaFgYA1.js"></script>
|
|
36
36
|
<link rel="modulepreload" crossorigin href="./assets/chunk-CYidjpOJ.js">
|
|
37
37
|
<link rel="modulepreload" crossorigin href="./assets/react-f2sANaYj.js">
|
|
38
38
|
<link rel="modulepreload" crossorigin href="./assets/react-dom-DPxgxlDT.js">
|
|
39
|
-
<link rel="modulepreload" crossorigin href="./assets/globals-
|
|
39
|
+
<link rel="modulepreload" crossorigin href="./assets/globals-D-rFhlM5.js">
|
|
40
40
|
<link rel="modulepreload" crossorigin href="./assets/preload-helper-Chd9yIcd.js">
|
|
41
41
|
<link rel="modulepreload" crossorigin href="./assets/trace-api-18gcBe0u.js">
|
|
42
42
|
<link rel="modulepreload" crossorigin href="./assets/html-void-elements-C35FEqss.js">
|
|
@@ -68,9 +68,9 @@
|
|
|
68
68
|
<link rel="modulepreload" crossorigin href="./assets/badge-I_vhU4ix.js">
|
|
69
69
|
<link rel="modulepreload" crossorigin href="./assets/input-lp6-d0mX.js">
|
|
70
70
|
<link rel="modulepreload" crossorigin href="./assets/textarea-dRxJ8TN6.js">
|
|
71
|
-
<link rel="modulepreload" crossorigin href="./assets/messages-
|
|
72
|
-
<link rel="modulepreload" crossorigin href="./assets/i18n-
|
|
73
|
-
<link rel="stylesheet" crossorigin href="./assets/globals-
|
|
71
|
+
<link rel="modulepreload" crossorigin href="./assets/messages-CD9CcUNV.js">
|
|
72
|
+
<link rel="modulepreload" crossorigin href="./assets/i18n-D2UC9wqq.js">
|
|
73
|
+
<link rel="stylesheet" crossorigin href="./assets/globals-DKz9Fx08.css">
|
|
74
74
|
</head>
|
|
75
75
|
|
|
76
76
|
<body class="antialiased">
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{t as e}from"./launch-json-removal-DVQJNXzs.mjs";import{join as t}from"node:path";function n(n){let i=n.logger??r,a=t(n.projectDir,`.claude`,`launch.json`);if(n.reclaimDisableEnv===`1`)return i({event:`launch-json-repair-skipped`,reason:`reclaim-disabled`}),{outcome:{configPath:a,outcome:`skipped-reclaim-disabled`},repairedCount:0};let o;try{o=e(n.projectDir)}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`launch-json-repair-write-failed`,configPath:a}),{outcome:{configPath:a,outcome:`write-failed`,error:t},repairedCount:0}}let s=o.kind===`removed`||o.kind===`removed-file`;return s&&i({event:`launch-json-repair-removed`,configPath:a}),{outcome:{configPath:a,outcome:o.kind},repairedCount:+!!s}}function r(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{n as repairLaunchJson};
|
|
2
|
+
//# sourceMappingURL=repair-launch-json-Bv1WzsqN.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{i as e,o as t,p as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{i as e,o as t,p as n}from"./write-project-skill-D-PwfVvG.mjs";import{d as r,v as i}from"./init-Bdc4_J8y.mjs";import{t as a}from"./mcp-migrate-event-B1gJf6bG.mjs";import{homedir as o}from"node:os";function s(n){let r=n.logger??u,i=n.home??o(),a=[];if(n.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=t[o],s=c(()=>e.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:e,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),e.projectConfigPath){let t=e.projectConfigPath,i=c(()=>t(n.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:n.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(e){let t={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=r(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...t,outcome:`no-entry`};if(n(o))return{...t,outcome:`canonical`};e.logger(a({scope:e.scope,surface:`cli-repair`,editorId:e.editorId,configPath:e.configPath,priorEntry:o}));let s=i(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let n=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:n}),{...t,outcome:`write-failed`,error:n}}return s.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:s.declineReason}),{...t,outcome:`declined`}):{...t,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-B5i4cMqN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-DOlvrBke.mjs";export{e as repairSkills};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{U as e,vs as t}from"./src-C5a7IXFc.mjs";import{Cr as n,_r as r,cr as i,fr as a,lr as o,mr as s,pr as c,wr as l,yr as u}from"./src-
|
|
1
|
+
import{U as e,vs as t}from"./src-C5a7IXFc.mjs";import{Cr as n,_r as r,cr as i,fr as a,lr as o,mr as s,pr as c,wr as l,yr as u}from"./src-CCUT-FUT.mjs";import{o as d,s as f,t as p,v as m}from"./write-project-skill-D-PwfVvG.mjs";import{n as h,s as g,t as _}from"./colors-BsmVIwfM.mjs";import{n as v,r as y,t as b}from"./skill-teardown-HfwG1GPl.mjs";import{dirname as x,join as S,relative as C,resolve as w}from"node:path";import{existsSync as T,mkdirSync as E,readFileSync as D,readdirSync as O,rmSync as k,statSync as A,writeFileSync as j}from"node:fs";import{homedir as M}from"node:os";import{createInterface as N}from"node:readline/promises";const P={existsSync:e=>T(e),isDirectory:e=>{try{return A(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>O(e),readFileSync:e=>D(e),writeFileSync:(e,t)=>{j(e,t)},mkdirSync:(e,t)=>{E(e,t)},rmSync:(e,t)=>{k(e,t)}},F={resolveProjectBundledSkillDir:()=>u(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>u(e,{checkDesktop:!1}),readBundledVersion:()=>o(),readRecordedVersion:e=>a(e,`cli-hosts`),writeRecordedVersion:(e,t)=>s(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>r(e),readBundleDecision:(e,t)=>i(e,t),writeBundleDecision:(e,t,n)=>c(e,t,n),removeBundleFromDisk:(e,t)=>y(e,t)};function I(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function L(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(x(t),{recursive:!0}),R(e,t,n)}function R(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=S(e,r),a=S(t,r);n.isDirectory(i)?R(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function z(e,n,r){return r.existsSync(S(e,`.agents`,`skills`,n))||t.some(t=>r.existsSync(S(e,t.skillsRoot,n)))}function B(e,n,r,i,a,o){let s=[],c=S(e,`.agents`,`skills`,n),l=i.existsSync(S(e,`.agents`));if(l&&i.existsSync(c))s.push({kind:`central`,path:c,outcome:`skipped-present`});else if(l)try{L(r,c,i),s.push({kind:`central`,path:c,outcome:`written`}),a({event:`user-skill-reclaim-central-written`,scope:`user`,path:c,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`central`,path:c,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-central-failed`,scope:`user`,path:c,error:t})}for(let l of t){let t=S(e,l.hostDir),u=S(e,l.skillsRoot,n);if(u===c){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!i.existsSync(t)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(i.existsSync(u)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-present`});continue}try{L(r,u,i),s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`written`}),a({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,error:t})}}return{entries:s,anyWritten:s.some(e=>e.outcome===`written`),anyDestinationSucceeded:s.some(e=>e.outcome===`written`||e.outcome===`skipped-present`)}}function V(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function H(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 f){let o=S(e,t.hostDir,`skills`,`open-knowledge`),s=S(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=d[t.editorId]?.projectConfigPath?.(e);if(!V(c,n)){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{p(o,e),L(i,o,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`created`}),r({event:`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 U(t,r,i,a){let o=e=>{r.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),c;try{c=await r.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return a({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await r.readRecordedVersion(t)}catch(e){a({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of l)try{d.push({id:e,sourceDir:r.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return a({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let o of d){let s=n[o.id],c=z(t,s,i),l=await r.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{r.removeBundleFromDisk(t,o.id),a({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:o.id})}catch(e){a({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await r.writeBundleDecision(t,s,!0)}catch(e){a({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}p.push(o)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>z(t,n[e.id],i));if(u!==null&&u===c&&m)return a({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:c}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===l.length,_=[];for(let{id:e,sourceDir:r}of p){let o=B(t,n[e],r,i,a,c);h.push(...o.entries),_.push({id:e,anyWritten:o.anyWritten,landed:o.anyDestinationSucceeded,centralFailed:o.entries.some(e=>e.kind===`central`&&e.outcome===`failed`),hostFailed:o.entries.some(e=>e.kind===`host`&&e.outcome===`failed`)})}let v=_.some(e=>e.centralFailed),y=_.every(e=>e.landed);if(g&&y&&!v){let e=null;try{await r.writeRecordedVersion(t,c),a({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:c})}catch(t){e=t instanceof Error?t.message:String(t),a({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:c,error:e})}for(let{id:t,anyWritten:n}of _)o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?n?`installed`:`skip-current`:`failed`,version:c,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{g||o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:c,reason:`bundle-unresolved`});for(let{id:e,centralFailed:t,hostFailed:n}of _)!t&&!n||o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:`failed`,version:c,reason:n?`all-writes-failed`:`central-write-failed`})}return{outcome:`done`,version:c,entries:h}}async function W(e){let t=e.logger??I,n=e.fs??P,r=e.home??M(),i={...F,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=H(e.projectDir,i,n,t),o=await U(r,i,n,t),s=v(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=b(r,s)}catch(e){u=!0,t({event:`legacy-fanout-cleanup-refused`,scope:`user`,error:e instanceof Error?e.message:String(e)})}for(let e of c)t({event:`legacy-fanout-path-removed`,scope:`user`,path:e})}else l=!0,t({event:`legacy-fanout-cleanup-declined`,scope:`user`});return{status:`done`,project:a,user:o,legacySwept:c,legacyCleanupDeclined:l,legacyCleanupFailed:u}}function G(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.user.reason!==`all-bundles-declined`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function K(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===`present`).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} present, ${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`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-present`).length,i=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,a=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} present, ${i} skipped, ${a} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return e.legacySwept.length>0?t.push(` Cleanup: removed ${e.legacySwept.length} path(s) from a pre-0.42 install.`):e.legacyCleanupFailed?t.push(` Cleanup: failed — see logs; pre-0.42 directories left in place.`):e.legacyCleanupDeclined&&t.push(` Cleanup: declined — pre-0.42 directories left in place.`),t.join(`
|
|
2
2
|
`)}function q(){return new m(`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.").option(`-y, --yes`,`Skip the confirmation prompt for removing directories left by a pre-0.42 install.`).action(async e=>{let t=await W({projectDir:w(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>J(t,{yes:e.yes===!0})});process.stdout.write(`${K(t)}\n`),process.exitCode=G(t)})}async function J(e,t){let n=M(),r=e=>`~/${C(n,e)}`,i=t.input??process.stdin,a=[``,_(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),h(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${_(`Remove OpenKnowledge skills:`)} ${e.skillDirs.length}`,...e.skillDirs.map(e=>` ${r(e)}`)),e.emptyDirs.length>0){let t=e.skillDirs.length>0?`Then remove these, which hold nothing else once the above are gone:`:`Remove these empty directories, left behind by that install:`;a.push(``,`${_(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,h(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
|
|
3
3
|
`)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${g("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=N({input:i,output:process.stdout});try{let e=(await o.question(`\n${_(`Remove them?`)} ${h(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{q as n,W as t};
|
|
4
|
-
//# sourceMappingURL=repair-skills-
|
|
4
|
+
//# sourceMappingURL=repair-skills-DOlvrBke.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{vs as e}from"./src-C5a7IXFc.mjs";import{Cr as t,wr as n}from"./src-
|
|
2
|
-
//# sourceMappingURL=skill-teardown-
|
|
1
|
+
import{vs as e}from"./src-C5a7IXFc.mjs";import{Cr as t,wr as n}from"./src-CCUT-FUT.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...n.map(e=>t[e]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of n){let n=t[r];o.push({path:a(i,`.agents`,`skills`,n),bundleId:r,scope:`central`});for(let t of e)o.push({path:a(i,t.skillsRoot,n),bundleId:r,scope:`host`,hostDir:t.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(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}`)}export{C as i,y as n,w as r,S as t};
|
|
2
|
+
//# sourceMappingURL=skill-teardown-HfwG1GPl.mjs.map
|