@inkeep/open-knowledge 0.54.0 → 0.54.1

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.
Files changed (131) hide show
  1. package/dist/{acp-harness-probe-BZQ13beo.mjs → acp-harness-probe-BQp8qy1-.mjs} +2 -2
  2. package/dist/cli.mjs +61 -61
  3. package/dist/constants-DPbfeugB.mjs +2 -0
  4. package/dist/git-handle-C3a9ldZv.mjs +1 -0
  5. package/dist/{git-handle-CjkVOyU7.mjs → git-handle-DL8wtMk9.mjs} +2 -2
  6. package/dist/index.mjs +172 -172
  7. package/dist/{init-ih1CpTrY.mjs → init-BhabI8cQ.mjs} +23 -23
  8. package/dist/init-CQhGz_LQ.mjs +1 -0
  9. package/dist/{launch-json-removal-a8j7wYmZ.mjs → launch-json-removal-CqmCLYLZ.mjs} +2 -2
  10. package/dist/{loader-BfvlMg6s.mjs → loader-DwddfOg2.mjs} +2 -2
  11. package/dist/loader-uWDoZE71.mjs +1 -0
  12. package/dist/md-manager-ozYayVu_.mjs +2 -0
  13. package/dist/{open-browser-RpCPdtF_.mjs → open-browser-OYMXa8vK.mjs} +2 -2
  14. package/dist/parse-worker.mjs +1 -1
  15. package/dist/preview-08kY720P.mjs +1 -0
  16. package/dist/{preview-Cbz1S31J.mjs → preview-BwQ_TzHJ.mjs} +2 -2
  17. package/dist/public/assets/{ActivityModeContent-BVNDha83.js → ActivityModeContent-DAP01K-a.js} +1 -1
  18. package/dist/public/assets/{AgentDiffPane-tc3vpwY_.js → AgentDiffPane-CdazxbF1.js} +1 -1
  19. package/dist/public/assets/{AgentThreadClientBinder-CSCbo226.js → AgentThreadClientBinder-DlnmKVWr.js} +1 -1
  20. package/dist/public/assets/{ChangedOutsideBadge-DrITuwxs.js → ChangedOutsideBadge-Dhtw8eIP.js} +1 -1
  21. package/dist/public/assets/{CodeMirrorPropInput-CCoKlaSP.js → CodeMirrorPropInput-DcRQ_3bl.js} +1 -1
  22. package/dist/public/assets/{DocumentContext-BrnqRC7f.js → DocumentContext-F04eMP8F.js} +1 -1
  23. package/dist/public/assets/{EditorModeToggle-tYJlAm15.js → EditorModeToggle-5t1dZM07.js} +1 -1
  24. package/dist/public/assets/{EnableSyncConfirmDialog-BpR4lOGV.js → EnableSyncConfirmDialog-B9yV3RJI.js} +1 -1
  25. package/dist/public/assets/FeedbackForm-Bcu7Grue.js +1 -0
  26. package/dist/public/assets/{GraphPanel-BBDNp1Lu.js → GraphPanel-ihzG3BD-.js} +1 -1
  27. package/dist/public/assets/{ImportSkillDialog-BHURtwXV.js → ImportSkillDialog-CBv1U73e.js} +1 -1
  28. package/dist/public/assets/{LintConfigEditor-B1_9NfyV.js → LintConfigEditor-BJugE79U.js} +1 -1
  29. package/dist/public/assets/ManagedArtifactProperties-BYqz6-XA.js +1 -0
  30. package/dist/public/assets/{ManagedArtifactProperties-XetEd70v.js → ManagedArtifactProperties-DTX3m5Cz.js} +1 -1
  31. package/dist/public/assets/{McpConsentDialogBody-BMcFiOpb.js → McpConsentDialogBody-BbnueDak.js} +1 -1
  32. package/dist/public/assets/{MermaidDocEditor-2uKE8dRs.js → MermaidDocEditor-CXQj27UE.js} +1 -1
  33. package/dist/public/assets/{ReportBugDialogBody-CokSHlbL.js → ReportBugDialogBody-CCFl1-kZ.js} +1 -1
  34. package/dist/public/assets/{SchemaConfigEditor-m3x_uxwj.js → SchemaConfigEditor-B7gGhOFG.js} +1 -1
  35. package/dist/public/assets/{SessionsHost-BwjsJ4kM.js → SessionsHost-BRn8A5dK.js} +2 -2
  36. package/dist/public/assets/{SettingsDialogBody-NnXMegDb.js → SettingsDialogBody-C8Rw-wCU.js} +1 -1
  37. package/dist/public/assets/{ShareBranchSwitchDialog-DGpxR8rv.js → ShareBranchSwitchDialog-BvyQws4s.js} +1 -1
  38. package/dist/public/assets/{ShareReceiveDialog-DmLaRlCo.js → ShareReceiveDialog-BDHC8fmK.js} +1 -1
  39. package/dist/public/assets/{ShareReceiveMissDialog-eWc73H2u.js → ShareReceiveMissDialog-CKJutcBh.js} +1 -1
  40. package/dist/public/assets/{SkillEditBanner-Bcj_SsXK.js → SkillEditBanner-CCT69blF.js} +1 -1
  41. package/dist/public/assets/{SkillOriginInline-D59WrmB9.js → SkillOriginInline-fcI9BD0r.js} +1 -1
  42. package/dist/public/assets/{SkillToolbarControls-CF4GI3N4.js → SkillToolbarControls-DIm4dR2z.js} +1 -1
  43. package/dist/public/assets/{SlidesToolbarControls-pic8RAQO.js → SlidesToolbarControls-Dp3RQhxr.js} +1 -1
  44. package/dist/public/assets/{SourceEditor-D4_TDrJh.js → SourceEditor-Bisplqfm.js} +1 -1
  45. package/dist/public/assets/{TerminalPanel-XbiaeXBm.js → TerminalPanel-BQ--t06l.js} +1 -1
  46. package/dist/public/assets/{TerminalWindowApp-ptqnI_mm.js → TerminalWindowApp-CZN1iUVa.js} +1 -1
  47. package/dist/public/assets/{TextDocEditor-BjbQZtTc.js → TextDocEditor-B6-kr9FJ.js} +1 -1
  48. package/dist/public/assets/{ThreadView-CdeJaSQw.js → ThreadView-C1kWgxWU.js} +1 -1
  49. package/dist/public/assets/{TimelineDiffPane-BbiOEtH2.js → TimelineDiffPane-BkmxOJ1t.js} +1 -1
  50. package/dist/public/assets/{agent-diff-store-BDOTYRUw.js → agent-diff-store-BApLqo2t.js} +1 -1
  51. package/dist/public/assets/{auth-state-cache-BvGXSOYb.js → auth-state-cache-B4NrrNGY.js} +1 -1
  52. package/dist/public/assets/{client-version-vFgto74n.js → client-version-D22rXQoj.js} +1 -1
  53. package/dist/public/assets/{comment-chips-DBaYF7lS.js → comment-chips-ClEF96ws.js} +1 -1
  54. package/dist/public/assets/{config-provider-C5Tk3I1Q.js → config-provider-BnvwnT1t.js} +1 -1
  55. package/dist/public/assets/{dist-C27Q9mDy.js → dist-xYOsi3tn.js} +23 -23
  56. package/dist/public/assets/{doc-paths-BVBn68AJ.js → doc-paths-BMvwiCy1.js} +1 -1
  57. package/dist/public/assets/{documents-events-BsVKB80J.js → documents-events-adphV0Mn.js} +1 -1
  58. package/dist/public/assets/{file-tree-adapter-BnVxsS3Y.js → file-tree-adapter-N12xCk8t.js} +1 -1
  59. package/dist/public/assets/{file-tree-utils-Bo6aWobj.js → file-tree-utils-z_Q3a24i.js} +1 -1
  60. package/dist/public/assets/{folder-config-api-BKVZKM0Y.js → folder-config-api-BfC3cma7.js} +1 -1
  61. package/dist/public/assets/{follow-file-DqzQHgKU.js → follow-file-DQfJLr5d.js} +1 -1
  62. package/dist/public/assets/i18n-DHdnkBCx.js +1 -0
  63. package/dist/public/assets/index-By68dznj.js +2095 -0
  64. package/dist/public/assets/{lint-config-client-kEetoezQ.js → lint-config-client-ss1o_CVn.js} +1 -1
  65. package/dist/public/assets/{markdownlint-rule-browser-Chpu90_w.js → markdownlint-rule-browser-C6wPmsWC.js} +1 -1
  66. package/dist/public/assets/{navigation-targets-BZG2mu1V.js → navigation-targets-BLuNLm-f.js} +1 -1
  67. package/dist/public/assets/{open-managed-artifact-tab-b7h2CbkR.js → open-managed-artifact-tab-RY2-BhMw.js} +1 -1
  68. package/dist/public/assets/{pending-receive-nav-store-Clqxh2Fp.js → pending-receive-nav-store-DGO9vCH1.js} +1 -1
  69. package/dist/public/assets/{prop-types-CxA_rPl_.js → prop-types-Ca63gYld.js} +1 -1
  70. package/dist/public/assets/{receive-store-DjapXAoN.js → receive-store-FenLp4qj.js} +1 -1
  71. package/dist/public/assets/{selection-context-C32Stxol.js → selection-context-Dbq0Aio6.js} +1 -1
  72. package/dist/public/assets/{skill-actions-5PfZ_o96.js → skill-actions-HbM-6ERT.js} +1 -1
  73. package/dist/public/assets/{skill-scope-D6RlM0oa.js → skill-scope-C3UKBCae.js} +1 -1
  74. package/dist/public/assets/{skills-api-Cdab4eC0.js → skills-api-4J2d9ExW.js} +1 -1
  75. package/dist/public/assets/{src-Bfy3jrQ_.js → src-CMg6SAjl.js} +1 -1
  76. package/dist/public/assets/{tag-pill-input-Bcisv-E4.js → tag-pill-input-DpQdwFdv.js} +1 -1
  77. package/dist/public/assets/{target-navigation-intent-AcMTl0tC.js → target-navigation-intent-CuUuxh-B.js} +1 -1
  78. package/dist/public/assets/{terminal-cli-display-Co0kpfr2.js → terminal-cli-display-Dw-K-MGH.js} +1 -1
  79. package/dist/public/assets/{terminal-launch-events-BYyc92EH.js → terminal-launch-events-DffP5sWq.js} +1 -1
  80. package/dist/public/assets/{terminal-telemetry-C-cKlmwu.js → terminal-telemetry-B5ndWqgr.js} +1 -1
  81. package/dist/public/assets/{typing-burst-detector-B5Vy4mIn.js → typing-burst-detector-BQbsQmEq.js} +1 -1
  82. package/dist/public/assets/{uninstall-GQMfCPpu.js → uninstall-CaEnVWFg.js} +1 -1
  83. package/dist/public/assets/{use-activity-panel-jeOH8Waq.js → use-activity-panel-DDURUMev.js} +1 -1
  84. package/dist/public/assets/{use-apply-config-color-theme-BApSgC_I.js → use-apply-config-color-theme-DgRg77rd.js} +1 -1
  85. package/dist/public/assets/{use-collab-url-bZfgDsoc.js → use-collab-url-B8vgoAUv.js} +1 -1
  86. package/dist/public/assets/{use-live-xterm-theme-BplIi05T.js → use-live-xterm-theme-BASVxkkZ.js} +1 -1
  87. package/dist/public/assets/{use-open-skill-DXlvLAoL.js → use-open-skill-DzPVo6aS.js} +1 -1
  88. package/dist/public/assets/{use-popular-skills-CfUTYkxE.js → use-popular-skills-DEuSYlkO.js} +1 -1
  89. package/dist/public/assets/{use-settings-route-Di4sAvRi.js → use-settings-route-C5evmAMX.js} +1 -1
  90. package/dist/public/assets/{use-skill-origin-B_Rm_rN6.js → use-skill-origin-CaUk1aXS.js} +1 -1
  91. package/dist/public/assets/{use-skills-D1P4d0d_.js → use-skills-EJnvl5Eg.js} +1 -1
  92. package/dist/public/assets/{use-terminal-enabled-D26F4OF8.js → use-terminal-enabled-ConR1djG.js} +1 -1
  93. package/dist/public/assets/{use-timeline-entry-diff-DjaTQJZU.js → use-timeline-entry-diff-DcYqtnU_.js} +1 -1
  94. package/dist/public/assets/{use-workspace-CyUAn3C0.js → use-workspace-BzozHuMw.js} +1 -1
  95. package/dist/public/index.html +44 -44
  96. package/dist/public/uninstall.html +3 -3
  97. package/dist/{repair-launch-json-BSpUSrn-.mjs → repair-launch-json-Bl5hVtHC.mjs} +2 -2
  98. package/dist/{repair-mcp-configs-BBf8RfMB.mjs → repair-mcp-configs-D8jwY9AR.mjs} +2 -2
  99. package/dist/repair-skills-DIst_axU.mjs +4 -0
  100. package/dist/repair-skills-DVu3pCBt.mjs +1 -0
  101. package/dist/server-lock-BQINnqX6.mjs +1 -0
  102. package/dist/{server-lock-B8gC6O_D.mjs → server-lock-BxloANkk.mjs} +2 -2
  103. package/dist/skill-teardown-CTQSRErg.mjs +2 -0
  104. package/dist/{src-B6lC36UX.mjs → src-BO0q0RkQ.mjs} +1 -1
  105. package/dist/{src-B0xODgRi.mjs → src-CUCwR691.mjs} +4 -4
  106. package/dist/{src-BqZfalMj.mjs → src-DShjZAMT.mjs} +124 -124
  107. package/dist/src-Dx-mMyW2.mjs +1 -0
  108. package/dist/src-E7Mw58lu.mjs +2040 -0
  109. package/dist/start-DXJ4FhC4.mjs +12 -0
  110. package/dist/start-Dpk2uR7O.mjs +1 -0
  111. package/dist/{ui-CaE3cWnk.mjs → ui-LvLfwIF_.mjs} +3 -3
  112. package/dist/{write-project-skill-lYT2q0EM.mjs → write-project-skill-CWYbuAXU.mjs} +2 -2
  113. package/package.json +5 -5
  114. package/dist/constants-DO0v6FB_.mjs +0 -2
  115. package/dist/git-handle-OIwLbjAT.mjs +0 -1
  116. package/dist/init-CQaNJ_lW.mjs +0 -1
  117. package/dist/loader-DoZjsjXG.mjs +0 -1
  118. package/dist/md-manager-C2pyfP1M.mjs +0 -2
  119. package/dist/preview-BEVZcGQL.mjs +0 -1
  120. package/dist/public/assets/FeedbackForm-B26S-tMj.js +0 -1
  121. package/dist/public/assets/ManagedArtifactProperties-BxCiEKqW.js +0 -1
  122. package/dist/public/assets/i18n-DdNV3ihn.js +0 -1
  123. package/dist/public/assets/index-MDvvCb3N.js +0 -2095
  124. package/dist/repair-skills-BVA056EW.mjs +0 -1
  125. package/dist/repair-skills-CnWUwwGE.mjs +0 -4
  126. package/dist/server-lock-BgDwOXHz.mjs +0 -1
  127. package/dist/skill-teardown-Bz8I6Qtp.mjs +0 -2
  128. package/dist/src-CLUjYdlx.mjs +0 -1
  129. package/dist/src-CPA_Jv5y.mjs +0 -2040
  130. package/dist/start-BRcv8T1W.mjs +0 -12
  131. package/dist/start-DOL0QXAR.mjs +0 -1
@@ -1 +0,0 @@
1
- import{t as e}from"./repair-skills-CnWUwwGE.mjs";export{e as repairSkills};
@@ -1,4 +0,0 @@
1
- import{U as e}from"./src-BqZfalMj.mjs";import{Cr as t,_r as n,cr as r,fr as i,lr as a,mr as o,pr as s,wr as c,yr as l}from"./src-CPA_Jv5y.mjs";import{o as u,s as d,t as f,v as p}from"./write-project-skill-lYT2q0EM.mjs";import{n as m,s as h,t as g}from"./colors-BsmVIwfM.mjs";import{n as _,r as v,t as y}from"./skill-teardown-Bz8I6Qtp.mjs";import{dirname as b,join as x,relative as S,resolve as C}from"node:path";import{existsSync as w,mkdirSync as T,readFileSync as E,readdirSync as D,rmSync as O,statSync as k,writeFileSync as A}from"node:fs";import{homedir as j}from"node:os";import{createInterface as M}from"node:readline/promises";const N={existsSync:e=>w(e),isDirectory:e=>{try{return k(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>D(e),readFileSync:e=>E(e),writeFileSync:(e,t)=>{A(e,t)},mkdirSync:(e,t)=>{T(e,t)},rmSync:(e,t)=>{O(e,t)}},P={resolveProjectBundledSkillDir:()=>l(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>l(e,{checkDesktop:!1}),readBundledVersion:()=>a(),readRecordedVersion:e=>i(e,`cli-hosts`),writeRecordedVersion:(e,t)=>o(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>n(e),readBundleDecision:(e,t)=>r(e,t),writeBundleDecision:(e,t,n)=>s(e,t,n),removeBundleFromDisk:(e,t)=>v(e,t)};function F(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function I(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(b(t),{recursive:!0}),L(e,t,n)}function L(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=x(e,r),a=x(t,r);n.isDirectory(i)?L(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function R(e,t,n,r,i,a){let o=[],s=x(e,`.agents`,`skills`,t),c=!1;if(r.existsSync(s))o.push({kind:`central`,path:s,outcome:`skipped-present`});else try{I(n,s,r),c=!0,o.push({kind:`central`,path:s,outcome:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:!1,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 d){let l=x(e,c.hostDir),u=x(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}if(r.existsSync(u)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-present`});continue}try{I(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:!1,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:c}}function z(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function B(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 d){let o=x(e,t.hostDir,`skills`,`open-knowledge`),s=x(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=u[t.editorId]?.projectConfigPath?.(e);if(!z(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{f(o,e),I(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 V(n,r,i,a){let o=e=>{r.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),l;try{l=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(n)}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 c)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=t[o.id],c=i.existsSync(x(n,`.agents`,`skills`,s)),l=await r.readBundleDecision(n,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{r.removeBundleFromDisk(n,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(n,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=>i.existsSync(x(n,`.agents`,`skills`,t[e.id])));if(u!==null&&u===l&&m)return a({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===c.length,_=[];for(let{id:e,sourceDir:r}of p){let o=R(n,t[e],r,i,a,l);h.push(...o.entries),_.push({id:e,centralWritten:o.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await r.writeRecordedVersion(n,l),a({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),a({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t,centralWritten:n}of _)o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?n?`installed`:`skip-current`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:g?e?`all-writes-failed`:`central-write-failed`:`bundle-unresolved`})}return{outcome:`done`,version:l,entries:h}}async function H(e){let t=e.logger??F,n=e.fs??N,r=e.home??j(),i={...P,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=B(e.projectDir,i,n,t),o=await V(r,i,n,t),s=_(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=y(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 U(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 W(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
- `)}function G(){return new p(`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 H({projectDir:C(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>K(t,{yes:e.yes===!0})});process.stdout.write(`${W(t)}\n`),process.exitCode=U(t)})}async function K(e,t){let n=j(),r=e=>`~/${S(n,e)}`,i=t.input??process.stdin,a=[``,g(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),m(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${g(`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(``,`${g(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,m(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
3
- `)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${h("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=M({input:i,output:process.stdout});try{let e=(await o.question(`\n${g(`Remove them?`)} ${m(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{G as n,H as t};
4
- //# sourceMappingURL=repair-skills-CnWUwwGE.mjs.map
@@ -1 +0,0 @@
1
- import{a as e,o as t,r as n}from"./server-lock-B8gC6O_D.mjs";export{n as markServerLockDraining,e as releaseServerLock,t as updateServerLockPort};
@@ -1,2 +0,0 @@
1
- import{Cr as e,wr as t}from"./src-CPA_Jv5y.mjs";import{s as n}from"./write-project-skill-lYT2q0EM.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=[...t.map(t=>e[t]),`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 t){let t=e[r];o.push({path:a(i,`.agents`,`skills`,t),bundleId:r,scope:`central`});for(let e of n)o.push({path:a(i,e.hostDir,`skills`,t),bundleId:r,scope:`host`,hostDir:e.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-Bz8I6Qtp.mjs.map
@@ -1 +0,0 @@
1
- import"./src-BqZfalMj.mjs";import"./write-project-skill-lYT2q0EM.mjs";import"./src-B0xODgRi.mjs";import"./acp-harness-probe-BZQ13beo.mjs";import"./init-ih1CpTrY.mjs";import{n as e}from"./loader-BfvlMg6s.mjs";import"./skill-teardown-Bz8I6Qtp.mjs";import"./preview-Cbz1S31J.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};