@inkeep/open-knowledge 0.52.1 → 0.52.4

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 (142) hide show
  1. package/dist/{acp-harness-probe-C_3yC8me.mjs → acp-harness-probe-XTgNAWCH.mjs} +2 -2
  2. package/dist/assets/skills/project/references/linking.md +1 -1
  3. package/dist/cli.mjs +53 -53
  4. package/dist/constants-DjzJQLPT.mjs +2 -0
  5. package/dist/{git-handle-CSHsjfXr.mjs → git-handle--xISIJuo.mjs} +2 -2
  6. package/dist/git-handle-Dt3gdxML.mjs +1 -0
  7. package/dist/index.mjs +1 -1
  8. package/dist/{init-fqDKH9Bq.mjs → init-BLgGQUiA.mjs} +4 -4
  9. package/dist/init-DRq2NWqE.mjs +1 -0
  10. package/dist/{launch-json-removal-Dy8UutGX.mjs → launch-json-removal-BY0JfYzW.mjs} +2 -2
  11. package/dist/{loader-Bnc6dbfj.mjs → loader-DFPCRuiv.mjs} +2 -2
  12. package/dist/loader-NVyWW4oJ.mjs +1 -0
  13. package/dist/md-manager-RNjkssEV.mjs +2 -0
  14. package/dist/{open-browser-jHUUD-04.mjs → open-browser-CV5L0bD3.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-CbQFdsEY.mjs → preview-BuOydejY.mjs} +2 -2
  17. package/dist/preview-T7rJOVHM.mjs +1 -0
  18. package/dist/public/assets/{ActivityModeContent-CfsQ1yYS.js → ActivityModeContent-82sBOezj.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-CNcJa9dd.js → AgentDiffPane-CoeEE99v.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-C7UyHsZU.js → AgentThreadClientBinder-DoXKRY3h.js} +1 -1
  21. package/dist/public/assets/{ChangedOutsideBadge-C8kGA2y7.js → ChangedOutsideBadge-D047_w8_.js} +1 -1
  22. package/dist/public/assets/CodeMirrorPropInput-AfI-A739.js +3 -0
  23. package/dist/public/assets/DocumentContext-RfseIiCK.js +38 -0
  24. package/dist/public/assets/{EditorModeToggle-C66Nkjv9.js → EditorModeToggle-BFLOwOkQ.js} +1 -1
  25. package/dist/public/assets/{EnableSyncConfirmDialog-a9VoUq0a.js → EnableSyncConfirmDialog-DrKJd8P_.js} +1 -1
  26. package/dist/public/assets/FeedbackForm-CpyB0Ay7.js +1 -0
  27. package/dist/public/assets/{GraphPanel-0AhiEqQX.js → GraphPanel-CIsyWZZL.js} +1 -1
  28. package/dist/public/assets/{ImportSkillDialog-CU4B1sIh.js → ImportSkillDialog-R8BKwyCS.js} +1 -1
  29. package/dist/public/assets/{LintConfigEditor-HyAVziIr.js → LintConfigEditor-CMXHDFZF.js} +1 -1
  30. package/dist/public/assets/ManagedArtifactProperties-BfpBSbt8.js +2 -0
  31. package/dist/public/assets/ManagedArtifactProperties-CaU-7RSA.js +1 -0
  32. package/dist/public/assets/{McpConsentDialogBody-DHNKc5z1.js → McpConsentDialogBody-D6qWh37S.js} +1 -1
  33. package/dist/public/assets/{MermaidDocEditor-DZwTQ4gl.js → MermaidDocEditor-DbdolXNy.js} +1 -1
  34. package/dist/public/assets/{ReportBugDialogBody-Cl-knrTl.js → ReportBugDialogBody-0zuUulQL.js} +1 -1
  35. package/dist/public/assets/{SchemaConfigEditor-DXos_cHI.js → SchemaConfigEditor-rEKhSqJM.js} +1 -1
  36. package/dist/public/assets/{SessionsHost-Trmtu1eL.js → SessionsHost-CGV_FZVZ.js} +2 -2
  37. package/dist/public/assets/{SettingsDialogBody-CoTz-Sjn.js → SettingsDialogBody-DPjbScQ8.js} +4 -4
  38. package/dist/public/assets/{ShareBranchSwitchDialog-BasumVv5.js → ShareBranchSwitchDialog-BHZw8v-i.js} +1 -1
  39. package/dist/public/assets/{ShareReceiveDialog-Di5kpFZF.js → ShareReceiveDialog-CA7GkSOU.js} +1 -1
  40. package/dist/public/assets/{ShareReceiveMissDialog-D0Uy4ElT.js → ShareReceiveMissDialog-BVb9iCe7.js} +1 -1
  41. package/dist/public/assets/{SkillEditBanner-DvyisUoP.js → SkillEditBanner-Dc5M38zl.js} +1 -1
  42. package/dist/public/assets/{SkillOriginInline-CRiror8A.js → SkillOriginInline-B-wdZ-wi.js} +1 -1
  43. package/dist/public/assets/{SkillToolbarControls-DdW_8JRU.js → SkillToolbarControls-B1VGCLbB.js} +1 -1
  44. package/dist/public/assets/{SlidesToolbarControls-ldyC9Am0.js → SlidesToolbarControls-DpEF1_8n.js} +1 -1
  45. package/dist/public/assets/{SourceEditor-CNFa0lwh.js → SourceEditor-BXsOQKW8.js} +1 -1
  46. package/dist/public/assets/{TerminalPanel-Dqvr0XcU.js → TerminalPanel-D4k0ePYg.js} +3 -3
  47. package/dist/public/assets/{TerminalWindowApp-Bf-V2DO3.js → TerminalWindowApp-C1Ej4Kb1.js} +1 -1
  48. package/dist/public/assets/{TextDocEditor-C3MlFWhG.js → TextDocEditor-DxhziylX.js} +1 -1
  49. package/dist/public/assets/{ThreadView-CbcAWyf3.js → ThreadView-DlpPbPgC.js} +1 -1
  50. package/dist/public/assets/{TimelineDiffPane-DpvzG-7k.js → TimelineDiffPane-35Fhuse-.js} +1 -1
  51. package/dist/public/assets/{agent-diff-store-Co9g5IfS.js → agent-diff-store-BTtYfAZI.js} +1 -1
  52. package/dist/public/assets/{auth-state-cache-DbSRbNlV.js → auth-state-cache-j2uCE1rv.js} +4 -4
  53. package/dist/public/assets/client-version-UVydSM1_.js +1 -0
  54. package/dist/public/assets/comment-chips-CspvZbMA.js +5 -0
  55. package/dist/public/assets/{config-provider-CfA6TibZ.js → config-provider-DAD08DXO.js} +2 -2
  56. package/dist/public/assets/{dist-BDUZWXxp.js → dist-CKFXiBrL.js} +184 -184
  57. package/dist/public/assets/{doc-paths-B_EmP8cW.js → doc-paths-aGtYCY4p.js} +1 -1
  58. package/dist/public/assets/{documents-events-CyHlKMaL.js → documents-events-BNjnUfCu.js} +1 -1
  59. package/dist/public/assets/{file-tree-adapter-C10x5wS8.js → file-tree-adapter-BnKrzDCF.js} +1 -1
  60. package/dist/public/assets/{file-tree-utils-ByMdqLJt.js → file-tree-utils-CPfKs0_W.js} +1 -1
  61. package/dist/public/assets/{folder-config-api-Cczw7DYP.js → folder-config-api-C00aXHgv.js} +1 -1
  62. package/dist/public/assets/follow-file-ClUkwvTW.js +4 -0
  63. package/dist/public/assets/i18n-DnAdj3V4.js +1 -0
  64. package/dist/public/assets/{index-C1WI_OhQ.js → index-DkaSwI0X.js} +12 -12
  65. package/dist/public/assets/{lint-config-client-CYdW-Tni.js → lint-config-client-CwpzRrsJ.js} +1 -1
  66. package/dist/public/assets/{markdownlint-rule-browser-sb35mRDf.js → markdownlint-rule-browser-DDivenan.js} +1 -1
  67. package/dist/public/assets/navigation-targets-BN-b0SwY.js +1 -0
  68. package/dist/public/assets/{open-managed-artifact-tab-DsfVWdN2.js → open-managed-artifact-tab-Dxiu79gQ.js} +1 -1
  69. package/dist/public/assets/{pending-receive-nav-store-B6wCDw0y.js → pending-receive-nav-store-DTGiCG3P.js} +1 -1
  70. package/dist/public/assets/prop-types-RgJQCViX.js +1 -0
  71. package/dist/public/assets/{receive-store-BM_DwTAf.js → receive-store-C7RBAUmu.js} +1 -1
  72. package/dist/public/assets/{selection-context-C25HN8ah.js → selection-context-D_1ahjGj.js} +1 -1
  73. package/dist/public/assets/{skill-actions-C6bRjFrb.js → skill-actions-BKW-L6YY.js} +2 -2
  74. package/dist/public/assets/{skill-scope-B5Xgc-WT.js → skill-scope-D3fqbCKZ.js} +1 -1
  75. package/dist/public/assets/{skills-api-DoO3XjKb.js → skills-api-BAB9Nk_K.js} +1 -1
  76. package/dist/public/assets/{src-C_rxWG-w.js → src-Dfy4grTv.js} +1 -1
  77. package/dist/public/assets/{tag-pill-input-cqPLLshm.js → tag-pill-input-vgqgNkXB.js} +1 -1
  78. package/dist/public/assets/{target-navigation-intent-lLql9jwx.js → target-navigation-intent-DEiFgbdU.js} +1 -1
  79. package/dist/public/assets/{telemetry-impl-5ki23cLU.js → telemetry-impl-Bvv5kEhb.js} +1 -1
  80. package/dist/public/assets/{telemetry-startup-CbAvyxdB.js → telemetry-startup-C8JOSRcr.js} +1 -1
  81. package/dist/public/assets/{terminal-cli-display-CsGUuG_t.js → terminal-cli-display-Du0YYwUl.js} +1 -1
  82. package/dist/public/assets/{terminal-launch-events-CkaZrvkd.js → terminal-launch-events-C5JkD3Qb.js} +1 -1
  83. package/dist/public/assets/{terminal-telemetry-fn9k9pw_.js → terminal-telemetry-Cj_uo6eX.js} +1 -1
  84. package/dist/public/assets/{typing-burst-detector-CHbBPNo9.js → typing-burst-detector-vxYjrFWQ.js} +3 -3
  85. package/dist/public/assets/{uninstall-B5VY4DdS.js → uninstall-C6wmbgyN.js} +1 -1
  86. package/dist/public/assets/{use-activity-panel-7n2VLfXF.js → use-activity-panel-DtCqiYlm.js} +1 -1
  87. package/dist/public/assets/{use-apply-config-color-theme-Qaeabbc6.js → use-apply-config-color-theme-DkVlJHc4.js} +1 -1
  88. package/dist/public/assets/{use-collab-url-QfvPJNi5.js → use-collab-url-CpJYowg_.js} +1 -1
  89. package/dist/public/assets/{use-live-xterm-theme-Cqejj-mM.js → use-live-xterm-theme-DfHZqsch.js} +1 -1
  90. package/dist/public/assets/{use-open-skill-5_eskJGl.js → use-open-skill-DdTYxJp4.js} +1 -1
  91. package/dist/public/assets/{use-popular-skills-BXLqRPAb.js → use-popular-skills-C9TB91tU.js} +1 -1
  92. package/dist/public/assets/{use-settings-route-BE811wlS.js → use-settings-route-D_8EQ_KO.js} +1 -1
  93. package/dist/public/assets/{use-skill-origin-BUCP6ANG.js → use-skill-origin-BjB7AiHp.js} +1 -1
  94. package/dist/public/assets/{use-skills-Cffo4E-9.js → use-skills-DMV2hvXx.js} +1 -1
  95. package/dist/public/assets/{use-terminal-enabled-C-WvHqPJ.js → use-terminal-enabled-D2pvXg6e.js} +1 -1
  96. package/dist/public/assets/use-timeline-entry-diff-Do0ZBwge.js +6 -0
  97. package/dist/public/assets/{use-workspace-DpNyv2nG.js → use-workspace-e-krFmvC.js} +1 -1
  98. package/dist/public/index.html +44 -44
  99. package/dist/public/uninstall.html +3 -3
  100. package/dist/{repair-launch-json-CBzcD3X_.mjs → repair-launch-json-BgwsX3Jx.mjs} +2 -2
  101. package/dist/{repair-mcp-configs-DP9uPVNr.mjs → repair-mcp-configs-CcLsbctb.mjs} +2 -2
  102. package/dist/{repair-skills-Cdqec7U0.mjs → repair-skills-pGap1_gF.mjs} +2 -2
  103. package/dist/repair-skills-uGkRmBYx.mjs +1 -0
  104. package/dist/{server-lock-CU3-_gnL.mjs → server-lock-CyyeFKIF.mjs} +2 -2
  105. package/dist/server-lock-DwSyFoTt.mjs +1 -0
  106. package/dist/{skill-teardown-CuyNWxzR.mjs → skill-teardown-DxeHIPsr.mjs} +2 -2
  107. package/dist/{src-DE02-xKN.mjs → src-B8SfUeFe.mjs} +122 -122
  108. package/dist/src-BAzYWv6h.mjs +1 -0
  109. package/dist/src-DZEg-Zy7.mjs +2038 -0
  110. package/dist/{src-CdD-yezs.mjs → src-DtvO7rZS.mjs} +3 -3
  111. package/dist/{src-D7BnleBG.mjs → src-Qlsty_8B.mjs} +1 -1
  112. package/dist/start-CTUHFYX2.mjs +1 -0
  113. package/dist/start-HJ61fNSx.mjs +12 -0
  114. package/dist/{ui-ColO8lUq.mjs → ui-BQkXNsD0.mjs} +3 -3
  115. package/dist/ui-BkhU6wt_.mjs +1 -0
  116. package/dist/{write-project-skill-U5FHNOHQ.mjs → write-project-skill-DHATTSra.mjs} +3 -3
  117. package/package.json +5 -5
  118. package/dist/constants-DfM3I5S9.mjs +0 -2
  119. package/dist/git-handle-B7hMkLUm.mjs +0 -1
  120. package/dist/init-CQQVpPkh.mjs +0 -1
  121. package/dist/loader-D3BVi7qE.mjs +0 -1
  122. package/dist/md-manager-qfeJIs4M.mjs +0 -2
  123. package/dist/preview-BTgZceSh.mjs +0 -1
  124. package/dist/public/assets/CodeMirrorPropInput-BFuQFciv.js +0 -3
  125. package/dist/public/assets/DocumentContext-Dby66SPb.js +0 -38
  126. package/dist/public/assets/FeedbackForm-8nRLEz5R.js +0 -1
  127. package/dist/public/assets/ManagedArtifactProperties-C8GKISON.js +0 -2
  128. package/dist/public/assets/ManagedArtifactProperties-CTUGFCNh.js +0 -1
  129. package/dist/public/assets/client-version-Bjkw91Sx.js +0 -1
  130. package/dist/public/assets/comment-chips-W7NIm-0i.js +0 -5
  131. package/dist/public/assets/follow-file-N29KZEEf.js +0 -4
  132. package/dist/public/assets/i18n-D_9uJD0A.js +0 -1
  133. package/dist/public/assets/navigation-targets-DNQLGx4S.js +0 -1
  134. package/dist/public/assets/prop-types-BMoAzRJb.js +0 -1
  135. package/dist/public/assets/use-timeline-entry-diff-DCf5cDVg.js +0 -6
  136. package/dist/repair-skills-DCg6eBNi.mjs +0 -1
  137. package/dist/server-lock-D833sKBI.mjs +0 -1
  138. package/dist/src-Cxffy8op.mjs +0 -2038
  139. package/dist/src-Dns-dOR5.mjs +0 -1
  140. package/dist/start-B4CFm73f.mjs +0 -1
  141. package/dist/start-DtUGEi6H.mjs +0 -12
  142. package/dist/ui-F9aOCyp-.mjs +0 -1
@@ -1,2 +1,2 @@
1
- import{Cr as e,wr as t}from"./src-Cxffy8op.mjs";import{s as n}from"./write-project-skill-U5FHNOHQ.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-CuyNWxzR.mjs.map
1
+ import{Cr as e,wr as t}from"./src-DZEg-Zy7.mjs";import{s as n}from"./write-project-skill-DHATTSra.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-DxeHIPsr.mjs.map