@inkeep/open-knowledge 0.49.0-beta.23 → 0.49.0-beta.24
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-DHTPC2_O.mjs → acp-harness-probe-BUSbhOih.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-D3YZBBb9.mjs +2 -0
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +1 -1
- package/dist/{init-CnXGfQDq.mjs → init-MCgaljSF.mjs} +3 -3
- package/dist/init-UTjBgomo.mjs +1 -0
- package/dist/{launch-json-removal-DYcqJsTT.mjs → launch-json-removal-BmDsNwPt.mjs} +2 -2
- package/dist/loader-B98DqiVc.mjs +1 -0
- package/dist/{loader-DSPsVV22.mjs → loader-ekJmDLtT.mjs} +2 -2
- package/dist/{open-browser-Dyp0opyo.mjs → open-browser-CxnOIVsL.mjs} +2 -2
- package/dist/preview-CUoBkJzj.mjs +1 -0
- package/dist/{preview-DmH53NEV.mjs → preview-DO6-cA5G.mjs} +2 -2
- package/dist/public/assets/{ActivityModeContent-BrGODY2p.js → ActivityModeContent-C08FYohG.js} +1 -1
- package/dist/public/assets/{AgentDiffPane-FmW0Jthq.js → AgentDiffPane-T499-ugv.js} +1 -1
- package/dist/public/assets/{ChangedOutsideBadge-rT5rNbdQ.js → ChangedOutsideBadge-GeQfL_b-.js} +1 -1
- package/dist/public/assets/{CodeMirrorPropInput-DlE2CeLE.js → CodeMirrorPropInput-3TWUbzXY.js} +1 -1
- package/dist/public/assets/{DocumentContext-Dne83XLH.js → DocumentContext-C-Lo65-_.js} +1 -1
- package/dist/public/assets/{EditorModeToggle-COteammg.js → EditorModeToggle-BjgmECAn.js} +1 -1
- package/dist/public/assets/{EnableSyncConfirmDialog-B54Vd_6F.js → EnableSyncConfirmDialog-B1Eo_sVE.js} +1 -1
- package/dist/public/assets/FeedbackForm-CmdTz11F.js +1 -0
- package/dist/public/assets/{ImportSkillDialog-BCNx_uF4.js → ImportSkillDialog-ChsGV6eb.js} +1 -1
- package/dist/public/assets/{LintConfigEditor-DjnEiT_w.js → LintConfigEditor-3f4-NF1O.js} +1 -1
- package/dist/public/assets/{ManagedArtifactProperties-nt-GCVB6.js → ManagedArtifactProperties-B1ZA0ofn.js} +1 -1
- package/dist/public/assets/ManagedArtifactProperties-B_ecuboX.js +1 -0
- package/dist/public/assets/{MermaidDocEditor-mVJYUSOz.js → MermaidDocEditor-C30-UfMg.js} +1 -1
- package/dist/public/assets/{SchemaConfigEditor-D1wdCvtf.js → SchemaConfigEditor-DPK5XbMd.js} +1 -1
- package/dist/public/assets/{SessionsHost-B64xibFa.js → SessionsHost-BobZkNwc.js} +2 -2
- package/dist/public/assets/{SettingsDialogBody-BehtaY5A.js → SettingsDialogBody-COTbFRqi.js} +1 -1
- package/dist/public/assets/{ShareReceiveMissDialog-j1zpEPgU.js → ShareReceiveMissDialog-B03ClkaE.js} +1 -1
- package/dist/public/assets/{SkillToolbarControls-DB2qTJQy.js → SkillToolbarControls-PvRY_LHn.js} +1 -1
- package/dist/public/assets/{SourceEditor-BzCwwYJX.js → SourceEditor-Duqpede9.js} +1 -1
- package/dist/public/assets/{TerminalWindowApp-CEJqmPwc.js → TerminalWindowApp-CgWp2eC-.js} +1 -1
- package/dist/public/assets/{TextDocEditor-CwKsLSYj.js → TextDocEditor-CHDC5byq.js} +1 -1
- package/dist/public/assets/{ThreadView-TiaaWpue.js → ThreadView-VqdgemBS.js} +1 -1
- package/dist/public/assets/{TimelineDiffPane-BQQyzTIK.js → TimelineDiffPane-DnaRcvCk.js} +1 -1
- package/dist/public/assets/{agent-diff-store-C2OrIeX2.js → agent-diff-store-B7oQn7l7.js} +1 -1
- package/dist/public/assets/{auth-state-cache-C9jGBLXQ.js → auth-state-cache-BUYyIMUZ.js} +1 -1
- package/dist/public/assets/{comment-chips-CQarmZw-.js → comment-chips-BhvfCPCk.js} +1 -1
- package/dist/public/assets/{config-provider-DY4FjDlE.js → config-provider-B7dMDFNr.js} +3 -3
- package/dist/public/assets/{follow-file-Bnld7t21.js → follow-file-CWSsUd-S.js} +1 -1
- package/dist/public/assets/i18n-CIRn0AvV.js +1 -0
- package/dist/public/assets/{index-DrvUuXnw.js → index-Dmlpu4P1.js} +7 -7
- package/dist/public/assets/messages-6Fd7I7zn.js +1 -0
- package/dist/public/assets/messages-BJIB1I1L.js +1 -0
- package/dist/public/assets/messages-BOXmrfhw.js +1 -0
- package/dist/public/assets/messages-BeOM8jWl.js +1 -0
- package/dist/public/assets/messages-CCWKIebo.js +1 -0
- package/dist/public/assets/messages-CQFityfC.js +1 -0
- package/dist/public/assets/messages-CzRXVtjz.js +1 -0
- package/dist/public/assets/messages-DYiuNk7y.js +1 -0
- package/dist/public/assets/messages-Db5U-G1d.js +1 -0
- package/dist/public/assets/messages-DohtKbKM.js +1 -0
- package/dist/public/assets/messages-WWFblTuV.js +1 -0
- package/dist/public/assets/{pending-receive-nav-store-CGk3bMB9.js → pending-receive-nav-store-SZ8w-xKW.js} +1 -1
- package/dist/public/assets/{selection-context-B4Z8zSar.js → selection-context-CSP8zK1H.js} +1 -1
- package/dist/public/assets/{skill-actions-ggcP_3dF.js → skill-actions-98H3SnCL.js} +1 -1
- package/dist/public/assets/{src-CiyQ3sov.js → src-VcUCSe0b.js} +1 -1
- package/dist/public/assets/{typing-burst-detector-Cz38cmdR.js → typing-burst-detector-BOmjXV-P.js} +1 -1
- package/dist/public/assets/{uninstall-BgGdjAhC.js → uninstall-36twrq5C.js} +1 -1
- package/dist/public/assets/{use-activity-panel-BhetneWD.js → use-activity-panel-BwANCYjg.js} +1 -1
- package/dist/public/assets/{use-open-skill-B_JUaxIs.js → use-open-skill-DCSEJ3jJ.js} +1 -1
- package/dist/public/assets/use-settings-route-CKMxexs3.js +1 -0
- package/dist/public/assets/{use-skill-directory-5lm6x97m.js → use-skill-directory-D9S5f8By.js} +1 -1
- package/dist/public/assets/{use-terminal-enabled-CVALUkgl.js → use-terminal-enabled-Ctosnrg_.js} +1 -1
- package/dist/public/assets/{use-timeline-entry-diff-CmSMq0O7.js → use-timeline-entry-diff-CB_cI1yy.js} +1 -1
- package/dist/public/index.html +21 -21
- package/dist/public/uninstall.html +3 -3
- package/dist/{repair-launch-json-gt_xu8VR.mjs → repair-launch-json-BWUKaV3g.mjs} +2 -2
- package/dist/{repair-mcp-configs-CZap0wph.mjs → repair-mcp-configs-Bmgf-Fxv.mjs} +2 -2
- package/dist/{repair-skills-BKmAMyDn.mjs → repair-skills-CkZZbtNk.mjs} +2 -2
- package/dist/repair-skills-l9Id0gzv.mjs +1 -0
- package/dist/{skill-teardown-OyFyNPGz.mjs → skill-teardown-CZnemDLF.mjs} +2 -2
- package/dist/{src-BdylDHZb.mjs → src-9I3GiOoK.mjs} +3 -3
- package/dist/{src-CVfzGd-H.mjs → src-D9aX2_QH.mjs} +2 -2
- package/dist/{src-BVdLRbuK.mjs → src-h5dDPK2z.mjs} +1 -1
- package/dist/start-C6P7_3_m.mjs +1 -0
- package/dist/{start-DPV97Qyi.mjs → start-QAIJ6Ttm.mjs} +3 -3
- package/dist/{write-project-skill-jv0sIzZJ.mjs → write-project-skill-WXZSbQlg.mjs} +2 -2
- package/package.json +5 -5
- package/dist/constants-Db61uBoY.mjs +0 -2
- package/dist/init-Cg4cmiPF.mjs +0 -1
- package/dist/loader-h6m6KsF2.mjs +0 -1
- package/dist/preview-2nRdxeOJ.mjs +0 -1
- package/dist/public/assets/FeedbackForm-V1teW6On.js +0 -1
- package/dist/public/assets/ManagedArtifactProperties-BUuq-eWT.js +0 -1
- package/dist/public/assets/i18n-Ckp5vyuq.js +0 -1
- package/dist/public/assets/messages-B6_1Ejgf.js +0 -1
- package/dist/public/assets/messages-BIeTbEwr.js +0 -1
- package/dist/public/assets/messages-C5keGFu8.js +0 -1
- package/dist/public/assets/messages-CdE758JS.js +0 -1
- package/dist/public/assets/messages-DH9PADx7.js +0 -1
- package/dist/public/assets/messages-DjGb_ycu.js +0 -1
- package/dist/public/assets/messages-DododtZ5.js +0 -1
- package/dist/public/assets/messages-Du4LAkbI.js +0 -1
- package/dist/public/assets/messages-DumBz2db.js +0 -1
- package/dist/public/assets/messages-nrpTbeRu.js +0 -1
- package/dist/public/assets/messages-vu7QED0b.js +0 -1
- package/dist/public/assets/use-settings-route-DnETJDgF.js +0 -1
- package/dist/repair-skills-B8raYZKq.mjs +0 -1
- package/dist/start-CqvbbRHD.mjs +0 -1
|
@@ -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-BmDsNwPt.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-BWUKaV3g.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,g as t,s as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{a as e,g as t,s as n}from"./write-project-skill-WXZSbQlg.mjs";import{d as r,v as i}from"./init-MCgaljSF.mjs";import{t as a}from"./mcp-migrate-event-B1gJf6bG.mjs";import{homedir as o}from"node:os";function s(t){let r=t.logger??u,i=t.home??o(),a=[];if(t.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=n[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 n=e.projectConfigPath,i=c(()=>n(t.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:t.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 n={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=r(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(t(o))return{...n,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 t=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:t}),{...n,outcome:`write-failed`,error:t}}return s.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:s.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-Bmgf-Fxv.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e}from"./src-9BFQh559.mjs";import{ar as t,br as n,dr as r,gr as i,lr as a,mr as o,or as s,ur as c,xr as l}from"./src-
|
|
1
|
+
import{R as e}from"./src-9BFQh559.mjs";import{ar as t,br as n,dr as r,gr as i,lr as a,mr as o,or as s,ur as c,xr as l}from"./src-9I3GiOoK.mjs";import{c as u,s as d,t as f,x as p}from"./write-project-skill-WXZSbQlg.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-CZnemDLF.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:()=>i(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>i(e,{checkDesktop:!1}),readBundledVersion:()=>s(),readRecordedVersion:e=>a(e,`cli-hosts`),writeRecordedVersion:(e,t)=>r(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>o(e),readBundleDecision:(e,n)=>t(e,n),writeBundleDecision:(e,t,n)=>c(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 u){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 u){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=d[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(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=i.existsSync(x(t,`.agents`,`skills`,s)),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=>i.existsSync(x(t,`.agents`,`skills`,n[e.id])));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=R(t,n[e],r,i,a,c);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(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,centralWritten: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{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:c,reason:g?e?`all-writes-failed`:`central-write-failed`:`bundle-unresolved`})}return{outcome:`done`,version:c,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
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
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-
|
|
4
|
+
//# sourceMappingURL=repair-skills-CkZZbtNk.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-CkZZbtNk.mjs";export{e as repairSkills};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{br as e,xr as t}from"./src-
|
|
2
|
-
//# sourceMappingURL=skill-teardown-
|
|
1
|
+
import{br as e,xr as t}from"./src-9I3GiOoK.mjs";import{c as n}from"./write-project-skill-WXZSbQlg.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-CZnemDLF.mjs.map
|