@inkeep/open-knowledge 0.47.0-beta.25 → 0.47.0-beta.26
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-DHqSOWxE.mjs → acp-harness-probe-BTT3QZDW.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-Bp8I4KQS.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/init-BC0u4teF.mjs +1 -0
- package/dist/{init-CqNa9Ajv.mjs → init-CUut5PRP.mjs} +3 -3
- package/dist/{launch-json-removal-CDxCqkm-.mjs → launch-json-removal-Bwz73HwG.mjs} +2 -2
- package/dist/{loader-hhfbltEg.mjs → loader-DVsRTqac.mjs} +2 -2
- package/dist/loader-DwZ-kNkG.mjs +1 -0
- package/dist/{open-browser-71rCCeYe.mjs → open-browser-C5MzSCJR.mjs} +2 -2
- package/dist/preview-B9XDskoX.mjs +1 -0
- package/dist/{preview-Bt83GFAr.mjs → preview-MxO7wX5P.mjs} +2 -2
- package/dist/{repair-launch-json-BHf6l_Jv.mjs → repair-launch-json-56bz582u.mjs} +2 -2
- package/dist/{repair-mcp-configs-sGc_LQ8x.mjs → repair-mcp-configs-DPiYn_Ou.mjs} +2 -2
- package/dist/repair-skills-qZNnVHuG.mjs +1 -0
- package/dist/{repair-skills-CZ-a80SS.mjs → repair-skills-wKMPJS9U.mjs} +2 -2
- package/dist/{src-Jkr5of5-.mjs → src-BLAyDRF9.mjs} +1 -1
- package/dist/{src-DksXweG3.mjs → src-BVOdbrbz.mjs} +3 -3
- package/dist/{src-CyZ_Fblf.mjs → src-DBN0I6LD.mjs} +2 -2
- package/dist/{start-4lOaN5Tx.mjs → start-BVMhwbcE.mjs} +3 -3
- package/dist/start-ecRmiiD7.mjs +1 -0
- package/dist/{write-project-skill-B1qOkawu.mjs → write-project-skill-BT53Ejz2.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-CF5GEnSr.mjs +0 -2
- package/dist/init-DSgvnSUq.mjs +0 -1
- package/dist/loader-Es6WDxcH.mjs +0 -1
- package/dist/preview-CXK4XweW.mjs +0 -1
- package/dist/repair-skills-B9fwDZT5.mjs +0 -1
- package/dist/start-C3008tb7.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Y as e,c as t,d as n,o as r,s as i}from"./sleep-ByqzSHar.mjs";import"./src-Bnk118Ag.mjs";import{_ as a}from"./src-
|
|
2
|
-
//# sourceMappingURL=loader-
|
|
1
|
+
import{Y as e,c as t,d as n,o as r,s as i}from"./sleep-ByqzSHar.mjs";import"./src-Bnk118Ag.mjs";import{_ as a}from"./src-BVOdbrbz.mjs";import{F as o,O as s}from"./fs-traced-ArlA_yTp.mjs";import{t as c}from"./constants-Bp8I4KQS.mjs";import{t as l}from"./is-object-ByG7RnjH.mjs";import{resolve as u}from"node:path";import{existsSync as d,readFileSync as f}from"node:fs";import{realpath as p}from"node:fs/promises";var m=e();async function h(e){let t=u(e);try{return await p(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function g(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];l(a)&&l(i)?n[r]=g(i,a):a!==void 0&&(n[r]=a)}return n}function _(e){if(!d(e))return{value:null,path:e,source:null,doc:null};let t;try{t=f(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,m.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return l(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function v(e,n){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(n.doc!==null&&n.source!==null){let e=t({file:n.path,source:n.source,doc:n.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function y(e){let t=e??process.cwd(),l=[],d=[],f=[],p=s(`user`,t),m=o({absPath:p});d.push(...m.diagnostics),!m.valid&&m.sidelinedTo!==void 0&&f.push({from:p,to:m.sidelinedTo});let h={};m.valid&&m.source!==void 0?(h=g(h,m.value),l.push(p)):m.valid;let y=u(t,`.ok`,c),b=_(y);if(b.diagnostic!==void 0&&d.push(b.diagnostic),b.value!==null){let e=r({value:b.value,file:b.path,source:b.source,doc:b.doc});d.push(...e);let t=e.length>0?i(b.value):b.value;h=g(h,t),l.push(y)}let x=a.safeParse(h);if(!x.success){let e={code:`SCHEMA_INVALID`,issues:v(x.error.issues,b)};throw Error(n(e))}return{config:x.data,sources:l,diagnostics:d,sidelined:f}}function b(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??y,r=new Map,i=new Map,a=h(e.startupCwd);return async o=>{let s=await h(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{y as n,b as t};
|
|
2
|
+
//# sourceMappingURL=loader-DVsRTqac.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-DVsRTqac.mjs";export{e as loadConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Br as e}from"./src-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{Br as e}from"./src-BVOdbrbz.mjs";import{execFile as t}from"node:child_process";const n=new Set([`http:`,`https:`]),r=/[\u0000-\u0020\u007F-\u009F"'`\\&|<>^()$;{}[\]*?!~]/;function i(e,t){console.warn(`Could not auto-open browser (${t}); visit ${e} manually`)}function a(a){let o;try{o=new URL(a)}catch{i(a,`invalid URL`);return}if(!n.has(o.protocol)){i(a,`unsupported scheme '${o.protocol}'`);return}if(r.test(a)){i(a,`URL contains unsafe characters`);return}t(process.platform===`darwin`?`open`:process.platform===`win32`?`cmd`:`xdg-open`,process.platform===`win32`?[`/c`,`start`,``,a]:[a],e({}),e=>{e&&console.warn(`Could not auto-open browser (${e.message}); visit ${a} manually`)})}export{a as openBrowser};
|
|
2
|
+
//# sourceMappingURL=open-browser-C5MzSCJR.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-MxO7wX5P.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{Or as e}from"./src-
|
|
1
|
+
import{Or as e}from"./src-BVOdbrbz.mjs";import"./constants-Bp8I4KQS.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-MxO7wX5P.mjs.map
|
|
@@ -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-Bwz73HwG.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-56bz582u.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{b as e,d as t,l as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{b as e,d as t,l as n}from"./write-project-skill-BT53Ejz2.mjs";import{d as r,v as i}from"./init-CUut5PRP.mjs";import{t as a}from"./mcp-migrate-event-CWx0WLdE.mjs";import{homedir as o}from"node:os";function s(e){let r=e.logger??u,i=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of n){let n=t[o],s=c(()=>n.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:n,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),n.projectConfigPath){let t=n.projectConfigPath,i=c(()=>t(e.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:n,home:void 0,cwd:e.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(t){let n={scope:t.scope,editorId:t.editorId,configPath:t.configPath},o=r(t.target,t.cwd,t.home,t.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(e(o))return{...n,outcome:`canonical`};t.logger(a({scope:t.scope,surface:`cli-repair`,editorId:t.editorId,configPath:t.configPath,priorEntry:o}));let s=i(t.target,t.cwd,{mode:`published`,skipAvailabilityCheck:!0},t.home,t.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return t.logger({event:`mcp-config-repair-write-failed`,scope:t.scope,editorId:t.editorId,configPath:t.configPath,error:e}),{...n,outcome:`write-failed`,error:e}}return s.action===`declined`?(t.logger({event:`mcp-config-repair-declined`,scope:t.scope,editorId:t.editorId,configPath:t.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-DPiYn_Ou.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-wKMPJS9U.mjs";export{e as repairSkills};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e}from"./src-Bnk118Ag.mjs";import{Xn as t,Zn as n,dr as r,er as i,ir as a,nr as o,or as s,tr as c,ur as l}from"./src-
|
|
1
|
+
import{R as e}from"./src-Bnk118Ag.mjs";import{Xn as t,Zn as n,dr as r,er as i,ir as a,nr as o,or as s,tr as c,ur as l}from"./src-BVOdbrbz.mjs";import{T as u,a as d,d as f,f as p,o as m,s as h,t as g}from"./write-project-skill-BT53Ejz2.mjs";import{n as _,s as v,t as y}from"./colors-BsmVIwfM.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:()=>s(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>s(e,{checkDesktop:!1}),readBundledVersion:()=>n(),readRecordedVersion:e=>i(e,`cli-hosts`),writeRecordedVersion:(e,t)=>o(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>a(e),readBundleDecision:(e,n)=>t(e,n),writeBundleDecision:(e,t,n)=>c(e,t,n),removeBundleFromDisk:(e,t)=>h(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 p){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 p){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=f[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{g(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,n,i,a){let o=e=>{n.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),c;try{c=await n.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 n.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 r)try{d.push({id:e,sourceDir:n.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 r of d){let o=l[r.id],s=i.existsSync(x(t,`.agents`,`skills`,o)),c=await n.readBundleDecision(t,o).catch(()=>null);if(!e(c,{installedOnDisk:s})){if(s)try{n.removeBundleFromDisk(t,r.id),a({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:r.id})}catch(e){a({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}continue}if(c===null&&s)try{await n.writeBundleDecision(t,o,!0)}catch(e){a({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}p.push(r)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>i.existsSync(x(t,`.agents`,`skills`,l[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===r.length,_=[];for(let{id:e,sourceDir:n}of p){let r=R(t,l[e],n,i,a,c);h.push(...r.entries),_.push({id:e,centralWritten:r.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await n.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=m(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=d(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 u(`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=[``,y(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),_(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${y(`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(``,`${y(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,_(`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(`${v("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${y(`Remove them?`)} ${_(`[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-wKMPJS9U.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Ao as e,No as t,P as n,Po as r,R as i,Yo as a,Zo as o,d as s,l as c,ss as l,ws as u}from"./src-Bnk118Ag.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Ct as k,D as A,Di as j,Dn as M,Dt as N,E as P,Ei as F,En as I,Et as L,F as R,Fi as z,Fn as B,Fr as V,Ft as H,G as U,Gi as W,Gn as G,Gr as K,Gt as q,H as J,Hi as Y,Hn as X,Hr as Z,Ht as Q,I as $,Ii as ee,In as te,Ir as ne,It as re,J as ie,Ji as ae,Jn as oe,Jr as se,Jt as ce,K as le,Ki as ue,Kn as de,Kr as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Or as Me,Ot as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Pt as Re,Q as ze,Qi as Be,Qn as Ve,Qr as He,Qt as Ue,R as We,Ri as Ge,Rn as Ke,Rr as qe,Rt as Je,S as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Ti as tt,Tn as nt,Tt as rt,U as it,Ui as at,Un as ot,Ur as st,Ut as ct,V as lt,Vi as ut,Vn as dt,Vr as ft,Vt as pt,W as mt,Wi as ht,Wn as gt,Wr as _t,Wt as vt,X as yt,Xi as bt,Xn as xt,Xr as St,Xt as Ct,Y as wt,Yi as Tt,Yn as Et,Yr as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_a as Ft,_i as It,_n as Lt,_r as Rt,_t as zt,a as Bt,aa as Vt,ai as Ht,an as Ut,ar as Wt,at as Gt,b as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gn as bn,gr as xn,gt as Sn,h as Cn,ha as wn,hi as Tn,hn as En,hr as Dn,ht as On,i as kn,ia as An,ii as jn,in as Mn,ir as Nn,it as Pn,j as Fn,ji as In,jn as Ln,jr as Rn,jt as zn,k as Bn,ki as Vn,kn as Hn,kr as Un,kt as Wn,l as Gn,la as Kn,li as qn,ln as Jn,lr as Yn,m as Xn,ma as Zn,mi as Qn,mn as $n,mr as er,mt as tr,n as nr,na as rr,ni as ir,nn as ar,nr as or,nt as sr,o as cr,oa as lr,oi as ur,on as dr,or as fr,ot as pr,p as mr,pa as hr,pi as gr,pn as _r,pr as vr,q as yr,qi as br,qn as xr,qr as Sr,qt as Cr,r as wr,ra as Tr,ri as Er,rn as Dr,rr as Or,rt as kr,s as Ar,sa as jr,si as Mr,sn as Nr,sr as Pr,st as Fr,t as Ir,ta as Lr,ti as Rr,tn as zr,tr as Br,tt as Vr,u as Hr,ua as Ur,ui as Wr,un as Gr,ur as Kr,v as qr,va as Jr,vi as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wt as ni,x as ri,xi as ii,xn as ai,xr as oi,xt as si,y as ci,yi as li,yn as ui,yr as di,yt as fi,z as pi,zi as mi,zn as hi,zr as gi,zt as _i}from"./src-DksXweG3.mjs";import{C as vi,E as yi,T as bi,_ as xi,b as Si,c as Ci,d as wi,g as Ti,i as Ei,l as Di,m as Oi,n as ki,p as Ai,s as ji,t as Mi,u as Ni,v as Pi,w as Fi,x as Ii,y as Li}from"./fs-traced-ArlA_yTp.mjs";import{a as Ri,d as zi,f as Bi,i as Vi,l as Hi,n as Ui,r as Wi,t as Gi,u as Ki}from"./logger-5LePyO3n.mjs";import{S as qi,_ as Ji,a as Yi,c as Xi,f as Zi,g as Qi,h as $i,i as ea,l as ta,m as na,n as ra,o as ia,p as aa,r as oa,s as sa,t as ca,u as la,v as ua,x as da}from"./server-lock-Cg66XiR-.mjs";export{Kn as AGENT_ID_MAX_LEN,Ur as AGENT_ID_RE,tt as AGENT_WRITE_ORIGIN,yn as AcpPermissionStore,hr as AcpRegistry,qt as AcpThreadManager,Yr as AgentFocusBroadcaster,It as AgentPresenceBroadcaster,F as AgentSessionCapacityError,j as AgentSessionManager,On as AutoStartDisabledError,tn as BUNDLE_IDS,Yn as BUNDLE_SCOPE,Kr as BUNDLE_SKILL_NAME,hi as BacklinkIndex,he as CC1Broadcaster,o as CC1_CONTRACT_VERSION,Jn as CONFIG_FILENAME,Ee as CONFLICT_MARKER_RE,Se as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,at as DEFAULT_CHECKPOINT_RETENTION,se as DEFAULT_EMBEDDINGS_DIMENSIONS,Re as DEFAULT_PACK_ID,lt as DocumentDurabilityState,Dt as EMBEDDINGS_API_KEY_ENV,Zn as FEATURED_AGENT_IDS,ht as FILE_SYSTEM_WRITER,ge as FILE_WATCHER_ORIGIN,Z as FileEmbeddingsBackend,Ct as GIT_PREFLIGHT_FAIL_SPAN_NAME,W as GIT_UPSTREAM_WRITER,Ft as GitDirAccessError,Ue as GitNotAvailableError,h as GitTooOldError,Sn as HOCUSPOCUS_AUTH_REJECTION_REASONS,zt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,qe as INSTALLED_AGENTS_SCHEMES,a as LINEAGE_EPOCH_KEY,We as LIVE_DERIVED_INDEX_DEBOUNCE_MS,H as LOG_MD_TEMPLATE,ni as MANAGED_RENAME_ORIGIN,ii as MAX_ACP_THREADS,Ae as MAX_AGENT_SESSIONS,D as MCP_CONNECTION_ID_HEADER,e as MCP_SERVER_NAME,Vn as MIN_EVICTABLE_IDLE_MS,un as MIN_GIT_VERSION,J as MISSING_OK_CONFIG_MESSAGE,Jr as MalformedGitPointerError,fn as McpLogger,it as MissingOkConfigError,In as OBSERVER_SYNC_ORIGIN,Gr as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,u as PROTOCOL_VERSION,Gi as PinoLogger,Xi as ProcessLockCollisionError,Gn as ProjectGitInitError,rt as ROLLBACK_ORIGIN,on as ROOT_GITIGNORE_TEMPLATE,Qi as RUNTIME_VERSION,Wr as RemoteConfigError,ue as SERVICE_WRITER,Or as SKILL_INSTALL_EVENTS_FILE_REL,n as SKILL_STATE_TARGETS,re as STARTER_FOLDERS,ve as STARTER_FOLDER_FRONTMATTER_FILENAME,Je as STARTER_PACKS,_i as STARTER_PACK_IDS,T as STARTER_TEMPLATES,et as STATE_MANIFEST_FILENAME,Ji as STATE_SCHEMA_VERSION,l as SYSTEM_DOC_NAME,pe as SeedPrerequisiteError,Cr as SeedRootDirError,ca as ServerLockCollisionError,Ir as SingleFileNotAFileError,nr as SingleFileNotFoundError,wr as SingleFileNotMarkdownError,P as StateManifestError,Ke as TagIndex,sn as USER_GLOBAL_BUNDLE_IDS,dt as UiLockCollisionError,L as __getShowAllWalkStatsForTesting,N as __resetShowAllWalkStatsForTesting,ta as acquireProcessLock,ra as acquireServerLock,X as acquireUiLock,_ as applyAgentMarkdownWrite,Ln as applyExternalChange,Oe as applySeed,A as assertCompatibleStateManifest,zr as assertGitAvailable,ui as assertNeverDiskEvent,li as attachAcpThreadSocket,tr as attachIdleShutdown,qr as bootServer,de as buildAndOpenSkill,gn as buildConfigYmlContent,wt as buildExecResult,Xe as buildOkMcpStdioCommand,Wt as buildSkillZip,pt as buildStarterFolderFrontmatterYaml,br as buildWipTree,_n as bundleSkillMdPath,st as canonicalProjectKey,Jt as classifyEvents,Mi as classifyFsPath,_t as clearAllEmbeddingsKeys,Mt as clearContributors,Q as coercePackId,c as colorFromSeed,ae as commitUpstreamImport,Tt as commitWip,bt as commitWipFromTree,ar as compareSemver,Dn as composeEffectiveLinterConfig,xn as composeFrontmatterSchemasConfig,Ie as containsConflictMarkers,ai as contentHash,He as contributorCount,Pe as countShadowObjects,R as countStaleAgentWipRefs,$ as countWipRefs,Ne as createApiExtension,Mr as createAssetServeMiddleware,U as createCollaborationHost,Me as createContentFilter,Un as createContentFilterAsync,K as createEmbeddingsSecretStore,kn as createEphemeralProjectDir,xe as createExternalChangeHandler,pn as createFileLogger,pi as createLiveDerivedIndexExtension,yr as createMcpHttpHandler,gi as createOsProbe,we as createPersistenceExtension,E as createServer,Fn as createServerObserverExtension,Fe as createStreamingErrorWriter,Ui as createTestLogger,fe as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Dr as detectGit,ke as detectProjectShape,xr as detectUserSkillHosts,kr as discoverLockDirs,di as discoverMarkdownlintConfig,Nt as emitPreflightFailureSpan,yt as encodeDocName,kt as encodeFolderRoute,ze as encodeSkillRoute,Hr as ensureProjectGit,_r as ensureProjectSkillGitignore,z as errorResponse,Ze as evictStaleTrackerEntries,Wn as extractHeadings,Pn as extractOkBinaryPath,C as extractWikiLinksFromMarkdown,Mn as fallbackPaths,nn as findEnclosingGitRoot,Lt as findEnclosingProjectRoot,Yt as findNativeMarkdownlintFile,mr as flushFileLogger,fi as formatAuthRejectionWire,m as formatContributors,ln as formatContributorsFrom,zn as formatPackRationale,At as gcCheckpointRefs,Vr as getCurrentMcpLogger,jn as getLocalDir,Xn as getLogFilePath,Wi as getLogger,Cn as getLogsDir,ua as getMachineId,Li as getMeter,An as getMetrics,Si as getTracer,Vt as handleCollabSocketError,De as handleSpawnCursor,an as hasForwardingHeaders,me as hasGcLogLatch,s as iconFromClientName,lr as incrementCollabSocketFilteredError,jr as incrementServerObserverFire,$n as initContent,Be as initShadowRepo,Ii as initTelemetry,Kt as initToleranceTelemetryWriter,Fr as installPrettyZodErrors,Vi as installTestLoggers,oe as installUserSkill,qn as isAllowedApiOrigin,Qn as isAllowedWorkspaceHostHeader,Ge as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,ct as isKnownPackId,mi as isLinkIndexExcludedDoc,Tn as isLoopbackAddress,S as isManagedArtifactDoc,r as isOrphanMode,be as isPairedWriteOrigin,Le as isPathWithinDir,da as isProcessAlive,Xr as isProjectRoot,hn as isRemoteAdmitted,ut as isReservedForUserTree,O as isSelfWrite,Y as isSystemDoc,ri as isToleranceTelemetryEnabled,qi as isValidLockPid,ti as lastKnownHash,f as listRescueCheckpoints,vt as listStarterPacks,wn as loadCustomAgents,ye as loadPrincipal,la as lockFilePath,Ri as loggerFactory,Hi as logsCurrentPath,Ki as logsPreviousPath,Sr as makeLazyEmbeddingsKeyStore,oa as markServerLockDraining,mt as mountMcpAndApi,ki as normalizeFsPath,vr as originGitHubHost,En as packageVersionMajorMinor,si as parseAuthRejectionWire,Ut as parseGitVersion,$e as parseHocuspocusAuthToken,le as parseKeepaliveConnectionId,nt as pathToDocName,Ce as planSeed,Bt as prepareSingleFileOpen,Gt as processCommand,pr as processUsage,Et as readAllTargets,xt as readBundleDecision,oi as readOwnNativeRules,Zi as readProcessLock,aa as readProcessLockDetailed,x as readProjectHeadState,ft as readProjectLocalSemanticConfig,ea as readServerLock,jt as readServerPackageVersion,Ve as readSkillInstallStateSnapshot,Bn as readStateManifest,p as readTargetRecordedAt,dn as readTargetVersion,ot as readUiLock,B as reconcile,Rr as recordContributor,Nn as recordSkillInstallEvent,ie as registerAllTools,I as registerWrite,na as releaseProcessLock,Yi as releaseServerLock,gt as releaseUiLock,M as removeLastKnownHash,Qt as resetMetrics,i as resolveBundleEnabled,fr as resolveBundledSkillDir,Ht as resolveContentDir,V as resolveCursorBinaryDefault,ne as resolveCursorSpawnInvocation,Rt as resolveEffectiveLinterConfig,St as resolveEmbeddingsCredential,ur as resolveLockDir,Zr as resolveNativeConfigForDoc,Qe as resolveNativeMarkdownlintConfig,q as resolvePack,Ar as resolvePackageVersion,gr as resolveRemoteAccess,d as resolveUiInfo,ir as restoreContributors,ci as restoreLifecycleFromConflictsJson,y as rewriteMarkdownLinksForDocumentRename,Rn as rewriteWikiLinksForDocumentRename,dr as runAuthReposSubprocess,Nr as runAuthStatusSubprocess,ce as runCloneSubprocess,en as runDeviceFlowSubprocess,sr as runWithMcpLogger,$t as safeContentPath,b as safeSubdir,cn as safetyCheckpoint,ei as sanitizeClientName,Lr as saveInMemoryCheckpoint,rr as saveVersion,k as seedBasenameIndex,cr as serializeError,vi as setActiveSpanAttributes,Te as setupServerObservers,Tr as shadowGit,Fi as shutdownTelemetry,zi as spansCurrentPath,Bi as spansPreviousPath,_e as spawnDetached,te as splitMarkdownBlocks,je as startWatcher,ee as streamingProblemEvent,Er as swapContributors,Ye as teardownToleranceTelemetryWriter,rn as toBroadcasterKey,Ei as tracedAppendFileSync,ji as tracedLinkSync,Ci as tracedMkdir,Di as tracedMkdirSync,Ni as tracedRename,wi as tracedRenameSync,Ai as tracedRmSync,Oi as tracedRmdirSync,Ti as tracedUnlinkSync,xi as tracedWriteFile,Pi as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,Hn as updateLastKnownHash,$i as updateProcessLockPort,ia as updateServerLockPort,G as updateUiLockPort,mn as validateAgentId,Ot as validateCloneInputs,Pr as validateSkillZip,sa as waitForServerLockDrain,w as withHiddenWindowsConsole,bi as withSpan,yi as withSpanSync,Br as writeBundleDecision,er as writeMarkdownlintRule,bn as writeRootGitignoreForNewRepo,g as writeStateManifest,or as writeTargetVersion,v as writeTracker};
|
|
1
|
+
import{Ao as e,No as t,P as n,Po as r,R as i,Yo as a,Zo as o,d as s,l as c,ss as l,ws as u}from"./src-Bnk118Ag.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Ct as k,D as A,Di as j,Dn as M,Dt as N,E as P,Ei as F,En as I,Et as L,F as R,Fi as z,Fn as B,Fr as V,Ft as H,G as U,Gi as W,Gn as G,Gr as K,Gt as q,H as J,Hi as Y,Hn as X,Hr as Z,Ht as Q,I as $,Ii as ee,In as te,Ir as ne,It as re,J as ie,Ji as ae,Jn as oe,Jr as se,Jt as ce,K as le,Ki as ue,Kn as de,Kr as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Or as Me,Ot as Ne,P as Pe,Pi as Fe,Pn as Ie,Pr as Le,Pt as Re,Q as ze,Qi as Be,Qn as Ve,Qr as He,Qt as Ue,R as We,Ri as Ge,Rn as Ke,Rr as qe,Rt as Je,S as Ye,Si as Xe,Sn as Ze,Sr as Qe,St as $e,T as et,Ti as tt,Tn as nt,Tt as rt,U as it,Ui as at,Un as ot,Ur as st,Ut as ct,V as lt,Vi as ut,Vn as dt,Vr as ft,Vt as pt,W as mt,Wi as ht,Wn as gt,Wr as _t,Wt as vt,X as yt,Xi as bt,Xn as xt,Xr as St,Xt as Ct,Y as wt,Yi as Tt,Yn as Et,Yr as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_a as Ft,_i as It,_n as Lt,_r as Rt,_t as zt,a as Bt,aa as Vt,ai as Ht,an as Ut,ar as Wt,at as Gt,b as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gn as bn,gr as xn,gt as Sn,h as Cn,ha as wn,hi as Tn,hn as En,hr as Dn,ht as On,i as kn,ia as An,ii as jn,in as Mn,ir as Nn,it as Pn,j as Fn,ji as In,jn as Ln,jr as Rn,jt as zn,k as Bn,ki as Vn,kn as Hn,kr as Un,kt as Wn,l as Gn,la as Kn,li as qn,ln as Jn,lr as Yn,m as Xn,ma as Zn,mi as Qn,mn as $n,mr as er,mt as tr,n as nr,na as rr,ni as ir,nn as ar,nr as or,nt as sr,o as cr,oa as lr,oi as ur,on as dr,or as fr,ot as pr,p as mr,pa as hr,pi as gr,pn as _r,pr as vr,q as yr,qi as br,qn as xr,qr as Sr,qt as Cr,r as wr,ra as Tr,ri as Er,rn as Dr,rr as Or,rt as kr,s as Ar,sa as jr,si as Mr,sn as Nr,sr as Pr,st as Fr,t as Ir,ta as Lr,ti as Rr,tn as zr,tr as Br,tt as Vr,u as Hr,ua as Ur,ui as Wr,un as Gr,ur as Kr,v as qr,va as Jr,vi as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wt as ni,x as ri,xi as ii,xn as ai,xr as oi,xt as si,y as ci,yi as li,yn as ui,yr as di,yt as fi,z as pi,zi as mi,zn as hi,zr as gi,zt as _i}from"./src-BVOdbrbz.mjs";import{C as vi,E as yi,T as bi,_ as xi,b as Si,c as Ci,d as wi,g as Ti,i as Ei,l as Di,m as Oi,n as ki,p as Ai,s as ji,t as Mi,u as Ni,v as Pi,w as Fi,x as Ii,y as Li}from"./fs-traced-ArlA_yTp.mjs";import{a as Ri,d as zi,f as Bi,i as Vi,l as Hi,n as Ui,r as Wi,t as Gi,u as Ki}from"./logger-5LePyO3n.mjs";import{S as qi,_ as Ji,a as Yi,c as Xi,f as Zi,g as Qi,h as $i,i as ea,l as ta,m as na,n as ra,o as ia,p as aa,r as oa,s as sa,t as ca,u as la,v as ua,x as da}from"./server-lock-Cg66XiR-.mjs";export{Kn as AGENT_ID_MAX_LEN,Ur as AGENT_ID_RE,tt as AGENT_WRITE_ORIGIN,yn as AcpPermissionStore,hr as AcpRegistry,qt as AcpThreadManager,Yr as AgentFocusBroadcaster,It as AgentPresenceBroadcaster,F as AgentSessionCapacityError,j as AgentSessionManager,On as AutoStartDisabledError,tn as BUNDLE_IDS,Yn as BUNDLE_SCOPE,Kr as BUNDLE_SKILL_NAME,hi as BacklinkIndex,he as CC1Broadcaster,o as CC1_CONTRACT_VERSION,Jn as CONFIG_FILENAME,Ee as CONFLICT_MARKER_RE,Se as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,at as DEFAULT_CHECKPOINT_RETENTION,se as DEFAULT_EMBEDDINGS_DIMENSIONS,Re as DEFAULT_PACK_ID,lt as DocumentDurabilityState,Dt as EMBEDDINGS_API_KEY_ENV,Zn as FEATURED_AGENT_IDS,ht as FILE_SYSTEM_WRITER,ge as FILE_WATCHER_ORIGIN,Z as FileEmbeddingsBackend,Ct as GIT_PREFLIGHT_FAIL_SPAN_NAME,W as GIT_UPSTREAM_WRITER,Ft as GitDirAccessError,Ue as GitNotAvailableError,h as GitTooOldError,Sn as HOCUSPOCUS_AUTH_REJECTION_REASONS,zt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,qe as INSTALLED_AGENTS_SCHEMES,a as LINEAGE_EPOCH_KEY,We as LIVE_DERIVED_INDEX_DEBOUNCE_MS,H as LOG_MD_TEMPLATE,ni as MANAGED_RENAME_ORIGIN,ii as MAX_ACP_THREADS,Ae as MAX_AGENT_SESSIONS,D as MCP_CONNECTION_ID_HEADER,e as MCP_SERVER_NAME,Vn as MIN_EVICTABLE_IDLE_MS,un as MIN_GIT_VERSION,J as MISSING_OK_CONFIG_MESSAGE,Jr as MalformedGitPointerError,fn as McpLogger,it as MissingOkConfigError,In as OBSERVER_SYNC_ORIGIN,Gr as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,u as PROTOCOL_VERSION,Gi as PinoLogger,Xi as ProcessLockCollisionError,Gn as ProjectGitInitError,rt as ROLLBACK_ORIGIN,on as ROOT_GITIGNORE_TEMPLATE,Qi as RUNTIME_VERSION,Wr as RemoteConfigError,ue as SERVICE_WRITER,Or as SKILL_INSTALL_EVENTS_FILE_REL,n as SKILL_STATE_TARGETS,re as STARTER_FOLDERS,ve as STARTER_FOLDER_FRONTMATTER_FILENAME,Je as STARTER_PACKS,_i as STARTER_PACK_IDS,T as STARTER_TEMPLATES,et as STATE_MANIFEST_FILENAME,Ji as STATE_SCHEMA_VERSION,l as SYSTEM_DOC_NAME,pe as SeedPrerequisiteError,Cr as SeedRootDirError,ca as ServerLockCollisionError,Ir as SingleFileNotAFileError,nr as SingleFileNotFoundError,wr as SingleFileNotMarkdownError,P as StateManifestError,Ke as TagIndex,sn as USER_GLOBAL_BUNDLE_IDS,dt as UiLockCollisionError,L as __getShowAllWalkStatsForTesting,N as __resetShowAllWalkStatsForTesting,ta as acquireProcessLock,ra as acquireServerLock,X as acquireUiLock,_ as applyAgentMarkdownWrite,Ln as applyExternalChange,Oe as applySeed,A as assertCompatibleStateManifest,zr as assertGitAvailable,ui as assertNeverDiskEvent,li as attachAcpThreadSocket,tr as attachIdleShutdown,qr as bootServer,de as buildAndOpenSkill,gn as buildConfigYmlContent,wt as buildExecResult,Xe as buildOkMcpStdioCommand,Wt as buildSkillZip,pt as buildStarterFolderFrontmatterYaml,br as buildWipTree,_n as bundleSkillMdPath,st as canonicalProjectKey,Jt as classifyEvents,Mi as classifyFsPath,_t as clearAllEmbeddingsKeys,Mt as clearContributors,Q as coercePackId,c as colorFromSeed,ae as commitUpstreamImport,Tt as commitWip,bt as commitWipFromTree,ar as compareSemver,Dn as composeEffectiveLinterConfig,xn as composeFrontmatterSchemasConfig,Ie as containsConflictMarkers,ai as contentHash,He as contributorCount,Pe as countShadowObjects,R as countStaleAgentWipRefs,$ as countWipRefs,Ne as createApiExtension,Mr as createAssetServeMiddleware,U as createCollaborationHost,Me as createContentFilter,Un as createContentFilterAsync,K as createEmbeddingsSecretStore,kn as createEphemeralProjectDir,xe as createExternalChangeHandler,pn as createFileLogger,pi as createLiveDerivedIndexExtension,yr as createMcpHttpHandler,gi as createOsProbe,we as createPersistenceExtension,E as createServer,Fn as createServerObserverExtension,Fe as createStreamingErrorWriter,Ui as createTestLogger,fe as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Dr as detectGit,ke as detectProjectShape,xr as detectUserSkillHosts,kr as discoverLockDirs,di as discoverMarkdownlintConfig,Nt as emitPreflightFailureSpan,yt as encodeDocName,kt as encodeFolderRoute,ze as encodeSkillRoute,Hr as ensureProjectGit,_r as ensureProjectSkillGitignore,z as errorResponse,Ze as evictStaleTrackerEntries,Wn as extractHeadings,Pn as extractOkBinaryPath,C as extractWikiLinksFromMarkdown,Mn as fallbackPaths,nn as findEnclosingGitRoot,Lt as findEnclosingProjectRoot,Yt as findNativeMarkdownlintFile,mr as flushFileLogger,fi as formatAuthRejectionWire,m as formatContributors,ln as formatContributorsFrom,zn as formatPackRationale,At as gcCheckpointRefs,Vr as getCurrentMcpLogger,jn as getLocalDir,Xn as getLogFilePath,Wi as getLogger,Cn as getLogsDir,ua as getMachineId,Li as getMeter,An as getMetrics,Si as getTracer,Vt as handleCollabSocketError,De as handleSpawnCursor,an as hasForwardingHeaders,me as hasGcLogLatch,s as iconFromClientName,lr as incrementCollabSocketFilteredError,jr as incrementServerObserverFire,$n as initContent,Be as initShadowRepo,Ii as initTelemetry,Kt as initToleranceTelemetryWriter,Fr as installPrettyZodErrors,Vi as installTestLoggers,oe as installUserSkill,qn as isAllowedApiOrigin,Qn as isAllowedWorkspaceHostHeader,Ge as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,ct as isKnownPackId,mi as isLinkIndexExcludedDoc,Tn as isLoopbackAddress,S as isManagedArtifactDoc,r as isOrphanMode,be as isPairedWriteOrigin,Le as isPathWithinDir,da as isProcessAlive,Xr as isProjectRoot,hn as isRemoteAdmitted,ut as isReservedForUserTree,O as isSelfWrite,Y as isSystemDoc,ri as isToleranceTelemetryEnabled,qi as isValidLockPid,ti as lastKnownHash,f as listRescueCheckpoints,vt as listStarterPacks,wn as loadCustomAgents,ye as loadPrincipal,la as lockFilePath,Ri as loggerFactory,Hi as logsCurrentPath,Ki as logsPreviousPath,Sr as makeLazyEmbeddingsKeyStore,oa as markServerLockDraining,mt as mountMcpAndApi,ki as normalizeFsPath,vr as originGitHubHost,En as packageVersionMajorMinor,si as parseAuthRejectionWire,Ut as parseGitVersion,$e as parseHocuspocusAuthToken,le as parseKeepaliveConnectionId,nt as pathToDocName,Ce as planSeed,Bt as prepareSingleFileOpen,Gt as processCommand,pr as processUsage,Et as readAllTargets,xt as readBundleDecision,oi as readOwnNativeRules,Zi as readProcessLock,aa as readProcessLockDetailed,x as readProjectHeadState,ft as readProjectLocalSemanticConfig,ea as readServerLock,jt as readServerPackageVersion,Ve as readSkillInstallStateSnapshot,Bn as readStateManifest,p as readTargetRecordedAt,dn as readTargetVersion,ot as readUiLock,B as reconcile,Rr as recordContributor,Nn as recordSkillInstallEvent,ie as registerAllTools,I as registerWrite,na as releaseProcessLock,Yi as releaseServerLock,gt as releaseUiLock,M as removeLastKnownHash,Qt as resetMetrics,i as resolveBundleEnabled,fr as resolveBundledSkillDir,Ht as resolveContentDir,V as resolveCursorBinaryDefault,ne as resolveCursorSpawnInvocation,Rt as resolveEffectiveLinterConfig,St as resolveEmbeddingsCredential,ur as resolveLockDir,Zr as resolveNativeConfigForDoc,Qe as resolveNativeMarkdownlintConfig,q as resolvePack,Ar as resolvePackageVersion,gr as resolveRemoteAccess,d as resolveUiInfo,ir as restoreContributors,ci as restoreLifecycleFromConflictsJson,y as rewriteMarkdownLinksForDocumentRename,Rn as rewriteWikiLinksForDocumentRename,dr as runAuthReposSubprocess,Nr as runAuthStatusSubprocess,ce as runCloneSubprocess,en as runDeviceFlowSubprocess,sr as runWithMcpLogger,$t as safeContentPath,b as safeSubdir,cn as safetyCheckpoint,ei as sanitizeClientName,Lr as saveInMemoryCheckpoint,rr as saveVersion,k as seedBasenameIndex,cr as serializeError,vi as setActiveSpanAttributes,Te as setupServerObservers,Tr as shadowGit,Fi as shutdownTelemetry,zi as spansCurrentPath,Bi as spansPreviousPath,_e as spawnDetached,te as splitMarkdownBlocks,je as startWatcher,ee as streamingProblemEvent,Er as swapContributors,Ye as teardownToleranceTelemetryWriter,rn as toBroadcasterKey,Ei as tracedAppendFileSync,ji as tracedLinkSync,Ci as tracedMkdir,Di as tracedMkdirSync,Ni as tracedRename,wi as tracedRenameSync,Ai as tracedRmSync,Oi as tracedRmdirSync,Ti as tracedUnlinkSync,xi as tracedWriteFile,Pi as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,Hn as updateLastKnownHash,$i as updateProcessLockPort,ia as updateServerLockPort,G as updateUiLockPort,mn as validateAgentId,Ot as validateCloneInputs,Pr as validateSkillZip,sa as waitForServerLockDrain,w as withHiddenWindowsConsole,bi as withSpan,yi as withSpanSync,Br as writeBundleDecision,er as writeMarkdownlintRule,bn as writeRootGitignoreForNewRepo,g as writeStateManifest,or as writeTargetVersion,v as writeTracker};
|