@inkeep/open-knowledge 0.47.0 → 0.47.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-LTkK-pm3.mjs → acp-harness-probe-qJUo1ApO.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-CUaf8eE_.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/{init-C6L0cHF3.mjs → init-C55e2NNl.mjs} +3 -3
- package/dist/init-D8a-XbzA.mjs +1 -0
- package/dist/{launch-json-removal-1HejjM9e.mjs → launch-json-removal-D3Q9yvyd.mjs} +2 -2
- package/dist/{loader-CpKeMYig.mjs → loader-BsX_JrrA.mjs} +2 -2
- package/dist/loader-O6z6lVhP.mjs +1 -0
- package/dist/{open-browser-D-pnyvDF.mjs → open-browser-4sOlBbCM.mjs} +2 -2
- package/dist/{preview-CL0M-CoJ.mjs → preview-BAWt2Pnh.mjs} +2 -2
- package/dist/preview-Bq9cv2G5.mjs +1 -0
- package/dist/{repair-launch-json-BeUdZ-39.mjs → repair-launch-json-BLWZjHxK.mjs} +2 -2
- package/dist/{repair-mcp-configs-C8s9aOT7.mjs → repair-mcp-configs-CTYAl0ua.mjs} +2 -2
- package/dist/{repair-skills-CVvxGgPU.mjs → repair-skills-BikzcmQr.mjs} +2 -2
- package/dist/repair-skills-CCM2p_7S.mjs +1 -0
- package/dist/{src-DfBEsYnq.mjs → src-CGOjzQCL.mjs} +1 -1
- package/dist/{src-TjdCdQwN.mjs → src-CWDcUomk.mjs} +428 -428
- package/dist/{src-DJJj_G31.mjs → src-Cgpp8Pf-.mjs} +2 -2
- package/dist/{start-12r9bsmn.mjs → start-TnxpB5de.mjs} +3 -3
- package/dist/start-tOC8nkMr.mjs +1 -0
- package/dist/{write-project-skill-BSzMH3X8.mjs → write-project-skill-B8LGhuHT.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-B8gZN6fz.mjs +0 -2
- package/dist/init-BNIRkFYJ.mjs +0 -1
- package/dist/loader-C6n9Xm0i.mjs +0 -1
- package/dist/preview-A7_2Cf6I.mjs +0 -1
- package/dist/repair-skills-CweOHJap.mjs +0 -1
- package/dist/start-CKnSpTvi.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-C5OfWWWx.mjs";import"./src-pJ6LEXKc.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-C5OfWWWx.mjs";import"./src-pJ6LEXKc.mjs";import{_ as a}from"./src-CWDcUomk.mjs";import{F as o,O as s}from"./fs-traced-OS6B1cZZ.mjs";import{t as c}from"./constants-CUaf8eE_.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-BsX_JrrA.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-BsX_JrrA.mjs";export{e as loadConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Vr as e}from"./src-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{Vr as e}from"./src-CWDcUomk.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-4sOlBbCM.mjs.map
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{kr as e}from"./src-
|
|
1
|
+
import{kr as e}from"./src-CWDcUomk.mjs";import"./constants-CUaf8eE_.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-BAWt2Pnh.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-BAWt2Pnh.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -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-D3Q9yvyd.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-BLWZjHxK.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-B8LGhuHT.mjs";import{d as r,v as i}from"./init-C55e2NNl.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-CTYAl0ua.mjs.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e}from"./src-pJ6LEXKc.mjs";import{Qn as t,Zn as n,ar as r,dr as i,fr as a,nr as o,rr as s,sr as c,tr as l}from"./src-
|
|
1
|
+
import{R as e}from"./src-pJ6LEXKc.mjs";import{Qn as t,Zn as n,ar as r,dr as i,fr as a,nr as o,rr as s,sr as c,tr as l}from"./src-CWDcUomk.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-B8LGhuHT.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:()=>c(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>c(e,{checkDesktop:!1}),readBundledVersion:()=>t(),readRecordedVersion:e=>l(e,`cli-hosts`),writeRecordedVersion:(e,t)=>s(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>r(e),readBundleDecision:(e,t)=>n(e,t),writeBundleDecision:(e,t,n)=>o(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,r,o){let s=e=>{n.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await n.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),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){o({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 a)try{d.push({id:e,sourceDir:n.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let a of d){let s=i[a.id],c=r.existsSync(x(t,`.agents`,`skills`,s)),l=await n.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{n.removeBundleFromDisk(t,a.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:a.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await n.writeBundleDecision(t,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}p.push(a)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>r.existsSync(x(t,`.agents`,`skills`,i[e.id])));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===a.length,_=[];for(let{id:e,sourceDir:n}of p){let a=R(t,i[e],n,r,o,l);h.push(...a.entries),_.push({id:e,centralWritten:a.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await n.writeRecordedVersion(t,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t,centralWritten:n}of _)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?n?`installed`:`skip-current`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:g?e?`all-writes-failed`:`central-write-failed`:`bundle-unresolved`})}return{outcome:`done`,version:l,entries:h}}async function H(e){let t=e.logger??F,n=e.fs??N,r=e.home??j(),i={...P,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=B(e.projectDir,i,n,t),o=await V(r,i,n,t),s=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-BikzcmQr.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-BikzcmQr.mjs";export{e as repairSkills};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{Mo 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-pJ6LEXKc.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,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dt as P,E as F,Ei as I,En as L,Et as R,F as z,Fi as B,Fn as V,Fr as H,Ft as U,G as W,Gi as G,Gn as K,Gr as q,Gt as J,H as Y,Hi as X,Hn as Z,Hr as Q,Ht as $,I as ee,Ii as te,In as ne,Ir as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lr as ve,Lt as ye,M as be,Mi as xe,Mn as Se,Mr as Ce,Mt as we,N as Te,Ni as Ee,Nn as De,Nr as Oe,Nt as ke,O as Ae,Oi as je,On 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,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,bi as Kt,bn as qt,br as Jt,bt as Yt,c as Xt,ca as Zt,ci as Qt,cn as $t,cr as en,ct 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,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr 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,vi as Jr,vn as Yr,vr as Xr,vt as Zr,w as Qr,wi as $r,wn as ei,wt as ti,x as ni,xi as ri,xn as ii,xr as ai,xt as oi,y as si,yi as ci,yn as li,yr as ui,yt as di,z as fi,zi as pi,zn as mi,zr as hi,zt as gi}from"./src-TjdCdQwN.mjs";import{C as _i,E as vi,T as yi,_ as bi,b as xi,c as Si,d as Ci,g as wi,i as Ti,l as Ei,m as Di,n as Oi,p as ki,s as Ai,t as ji,u as Mi,v as Ni,w as Pi,x as Fi,y as Ii}from"./fs-traced-OS6B1cZZ.mjs";import{a as Li,d as Ri,f as zi,i as Bi,l as Vi,n as Hi,r as Ui,t as Wi,u as Gi}from"./logger-5LePyO3n.mjs";import{S as Ki,_ as qi,a as Ji,c as Yi,f as Xi,g as Zi,h as Qi,i as $i,l as ea,m as ta,n as na,o as ra,p as ia,r as aa,s as oa,t as sa,u as ca,v as la,x as ua}from"./server-lock-DgWnoftI.mjs";export{Zt as AGENT_ID_MAX_LEN,qn as AGENT_ID_RE,$r as AGENT_WRITE_ORIGIN,Tn as AcpPermissionStore,mn as AcpRegistry,ri as AcpThreadManager,ci as AgentFocusBroadcaster,Jr as AgentPresenceBroadcaster,tt as AgentSessionCapacityError,I as AgentSessionManager,Cn as AutoStartDisabledError,Xn as BUNDLE_IDS,Kr as BUNDLE_SCOPE,sn as BUNDLE_SKILL_NAME,C as BacklinkIndex,te as CC1Broadcaster,o as CC1_CONTRACT_VERSION,Gr as CONFIG_FILENAME,Ie as CONFLICT_MARKER_RE,Oe as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,X as DEFAULT_CHECKPOINT_RETENTION,Dt as DEFAULT_EMBEDDINGS_DIMENSIONS,U as DEFAULT_PACK_ID,lt as DocumentDurabilityState,St as EMBEDDINGS_API_KEY_ENV,hr as FEATURED_AGENT_IDS,at as FILE_SYSTEM_WRITER,Ke as FILE_WATCHER_ORIGIN,st as FileEmbeddingsBackend,Nt as GIT_PREFLIGHT_FAIL_SPAN_NAME,ht as GIT_UPSTREAM_WRITER,yn as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Rt as HOCUSPOCUS_AUTH_REJECTION_REASONS,Zr as HocuspocusAuthRejection,di as HocuspocusAuthTokenSchema,hi as INSTALLED_AGENTS_SCHEMES,a as LINEAGE_EPOCH_KEY,We as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,rt as MANAGED_RENAME_ORIGIN,Xe as MAX_ACP_THREADS,M as MAX_AGENT_SESSIONS,Fr as MCP_CONNECTION_ID_HEADER,e as MCP_SERVER_NAME,je as MIN_EVICTABLE_IDLE_MS,zr as MIN_GIT_VERSION,Y as MISSING_OK_CONFIG_MESSAGE,Ft as MalformedGitPointerError,d as McpLogger,it as MissingOkConfigError,_ as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,u as PROTOCOL_VERSION,Wi as PinoLogger,Yi as ProcessLockCollisionError,Kn as ProjectGitInitError,R as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,Zi as RUNTIME_VERSION,an as RemoteConfigError,G as SERVICE_WRITER,Pn as SKILL_INSTALL_EVENTS_FILE_REL,n as SKILL_STATE_TARGETS,ye as STARTER_FOLDERS,Je as STARTER_FOLDER_FRONTMATTER_FILENAME,gi as STARTER_PACKS,T as STARTER_PACK_IDS,pt as STARTER_TEMPLATES,et as STATE_MANIFEST_FILENAME,qi as STATE_SCHEMA_VERSION,l as SYSTEM_DOC_NAME,Cr as SeedPrerequisiteError,le as SeedRootDirError,sa as ServerLockCollisionError,Ir as SingleFileNotAFileError,nr as SingleFileNotFoundError,wr as SingleFileNotMarkdownError,F as StateManifestError,mi as TagIndex,_n as USER_GLOBAL_BUNDLE_IDS,Z as UiLockCollisionError,P as __getShowAllWalkStatsForTesting,Ne as __resetShowAllWalkStatsForTesting,ea as acquireProcessLock,na as acquireServerLock,ot as acquireUiLock,Hn as applyAgentMarkdownWrite,Se as applyExternalChange,Re as applySeed,j as assertCompatibleStateManifest,ar as assertGitAvailable,qt as assertNeverDiskEvent,Kt as attachAcpThreadSocket,kn as attachIdleShutdown,qr as bootServer,xr as buildAndOpenSkill,_r as buildConfigYmlContent,ae as buildExecResult,D as buildOkMcpStdioCommand,fr as buildSkillZip,$ as buildStarterFolderFrontmatterYaml,de as buildWipTree,vr as bundleSkillMdPath,_t as canonicalProjectKey,ii as classifyEvents,ji as classifyFsPath,q as clearAllEmbeddingsKeys,He as clearContributors,ct as coercePackId,c as colorFromSeed,br as commitUpstreamImport,oe as commitWip,Tt as commitWipFromTree,Dr as compareSemver,Sn as composeEffectiveLinterConfig,Lt as composeFrontmatterSchemasConfig,V as containsConflictMarkers,Ze as contentHash,m as contributorCount,Pe as countShadowObjects,z as countStaleAgentWipRefs,ee as countWipRefs,Gn as createApiExtension,Qt as createAssetServeMiddleware,Wn as createContentFilter,y as createContentFilterAsync,pe as createEmbeddingsSecretStore,An as createEphemeralProjectDir,De as createExternalChangeHandler,pn as createFileLogger,fi as createLiveDerivedIndexExtension,ue as createMcpHttpHandler,w as createOsProbe,Te as createPersistenceExtension,E as createServer,In as createServerObserverExtension,Ee as createStreamingErrorWriter,Hi as createTestLogger,Sr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Ae as detectProjectShape,se as detectUserSkillHosts,sr as discoverLockDirs,Jt as discoverMarkdownlintConfig,Ue as emitPreflightFailureSpan,wt as encodeDocName,yt as encodeFolderRoute,kt as encodeSkillRoute,Hr as ensureProjectGit,er as ensureProjectSkillGitignore,Fe as errorResponse,O as evictStaleTrackerEntries,b as extractHeadings,kr as extractOkBinaryPath,dt as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,Yr as findEnclosingProjectRoot,ai as findNativeMarkdownlintFile,mr as flushFileLogger,Yt as formatAuthRejectionWire,ln as formatContributors,Rr as formatContributorsFrom,we as formatPackRationale,bt as gcCheckpointRefs,fn as getCurrentMcpLogger,Vt as getLocalDir,Zn as getLogFilePath,Ui as getLogger,wn as getLogsDir,la as getMachineId,Ii as getMeter,Tr as getMetrics,xi as getTracer,jn as handleCollabSocketError,Le as handleSpawnCursor,hn as hasForwardingHeaders,he as hasGcLogLatch,s as iconFromClientName,Bt as incrementCollabSocketFilteredError,lr as incrementServerObserverFire,Dn as initContent,At as initShadowRepo,Fi as initTelemetry,Gt as initToleranceTelemetryWriter,pr as installPrettyZodErrors,Bi as installTestLoggers,Et as installUserSkill,Wr as isAllowedApiOrigin,En as isAllowedWorkspaceHostHeader,ge as isConfigDoc,oi as isHocuspocusAuthRejectionReason,vt as isKnownPackId,Ge as isLinkIndexExcludedDoc,bn as isLoopbackAddress,pi as isManagedArtifactDoc,r as isOrphanMode,Ln as isPairedWriteOrigin,H as isPathWithinDir,ua as isProcessAlive,li as isProjectRoot,gr as isRemoteAdmitted,S as isReservedForUserTree,ei as isSelfWrite,ut as isSystemDoc,ni as isToleranceTelemetryEnabled,Ki as isValidLockPid,nt as lastKnownHash,Be as listRescueCheckpoints,J as listStarterPacks,Qn as loadCustomAgents,be as loadPrincipal,ca as lockFilePath,Li as loggerFactory,Vi as logsCurrentPath,Gi as logsPreviousPath,ce as makeLazyEmbeddingsKeyStore,aa as markServerLockDraining,mt as mountMcpAndApi,Oi as normalizeFsPath,tr as originGitHubHost,xn as packageVersionMajorMinor,$e as parseAuthRejectionWire,dr as parseGitVersion,A as parseHocuspocusAuthToken,W as parseKeepaliveConnectionId,L as pathToDocName,ke as planSeed,zt as prepareSingleFileOpen,Fn as processCommand,Wt as processUsage,xt as readAllTargets,jt as readBundleDecision,Qe as readOwnNativeRules,Xi as readProcessLock,ia as readProcessLockDetailed,x as readProjectHeadState,Q as readProjectLocalSemanticConfig,$i as readServerLock,Ve as readServerPackageVersion,p as readSkillInstallStateSnapshot,Vn as readStateManifest,dn as readTargetRecordedAt,Br as readTargetVersion,gt as readUiLock,ne as reconcile,ir as recordContributor,Ut as recordSkillInstallEvent,yr as registerAllTools,N as registerWrite,ta as releaseProcessLock,Ji as releaseServerLock,K as releaseUiLock,Me as removeLastKnownHash,jr as resetMetrics,i as resolveBundleEnabled,Pr as resolveBundledSkillDir,ur as resolveContentDir,re as resolveCursorBinaryDefault,ve as resolveCursorSpawnInvocation,Xr as resolveEffectiveLinterConfig,Mt as resolveEmbeddingsCredential,Mr as resolveLockDir,ui as resolveNativeConfigForDoc,k as resolveNativeMarkdownlintConfig,me as resolvePack,Ar as resolvePackageVersion,$n as resolveRemoteAccess,ze as resolveUiInfo,Er as restoreContributors,si as restoreLifecycleFromConflictsJson,zn as rewriteMarkdownLinksForDocumentRename,Ce as rewriteWikiLinksForDocumentRename,Nr as runAuthReposSubprocess,$t as runAuthStatusSubprocess,Ot as runCloneSubprocess,Yn as runDeviceFlowSubprocess,Vr as runWithMcpLogger,Jn as safeContentPath,Bn as safeSubdir,f as safetyCheckpoint,tn as sanitizeClientName,cn as saveInMemoryCheckpoint,Lr as saveVersion,ti as seedBasenameIndex,cr as serializeError,_i as setActiveSpanAttributes,xe as setupServerObservers,rr as shadowGit,Pi as shutdownTelemetry,Ri as spansCurrentPath,zi as spansPreviousPath,qe as spawnDetached,_e as splitMarkdownBlocks,Un as startWatcher,B as streamingProblemEvent,Mn as swapContributors,Ye as teardownToleranceTelemetryWriter,Ur as toBroadcasterKey,Ti as tracedAppendFileSync,Ai as tracedLinkSync,Si as tracedMkdir,Ei as tracedMkdirSync,Mi as tracedRename,Ci as tracedRenameSync,ki as tracedRmSync,Di as tracedRmdirSync,wi as tracedUnlinkSync,bi as tracedWriteFile,Ni as tracedWriteFileSync,Qr as trustSystemCertificates,Xt as untrackTrackedProjectSkillProjection,v as updateLastKnownHash,Qi as updateProcessLockPort,ra as updateServerLockPort,fe as updateUiLockPort,rn as validateAgentId,Ct as validateCloneInputs,en as validateSkillZip,oa as waitForServerLockDrain,ft as withHiddenWindowsConsole,yi as withSpan,vi as withSpanSync,or as writeBundleDecision,On as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,Or as writeTargetVersion,Rn as writeTracker};
|
|
1
|
+
import{Mo 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-pJ6LEXKc.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,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dt as P,E as F,Ei as I,En as L,Et as R,F as z,Fi as B,Fn as V,Fr as H,Ft as U,G as W,Gi as G,Gn as K,Gr as q,Gt as J,H as Y,Hi as X,Hn as Z,Hr as Q,Ht as $,I as ee,Ii as te,In as ne,Ir as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lr as ve,Lt as ye,M as be,Mi as xe,Mn as Se,Mr as Ce,Mt as we,N as Te,Ni as Ee,Nn as De,Nr as Oe,Nt as ke,O as Ae,Oi as je,On 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,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,bi as Kt,bn as qt,br as Jt,bt as Yt,c as Xt,ca as Zt,ci as Qt,cn as $t,cr as en,ct 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,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr 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,vi as Jr,vn as Yr,vr as Xr,vt as Zr,w as Qr,wi as $r,wn as ei,wt as ti,x as ni,xi as ri,xn as ii,xr as ai,xt as oi,y as si,yi as ci,yn as li,yr as ui,yt as di,z as fi,zi as pi,zn as mi,zr as hi,zt as gi}from"./src-CWDcUomk.mjs";import{C as _i,E as vi,T as yi,_ as bi,b as xi,c as Si,d as Ci,g as wi,i as Ti,l as Ei,m as Di,n as Oi,p as ki,s as Ai,t as ji,u as Mi,v as Ni,w as Pi,x as Fi,y as Ii}from"./fs-traced-OS6B1cZZ.mjs";import{a as Li,d as Ri,f as zi,i as Bi,l as Vi,n as Hi,r as Ui,t as Wi,u as Gi}from"./logger-5LePyO3n.mjs";import{S as Ki,_ as qi,a as Ji,c as Yi,f as Xi,g as Zi,h as Qi,i as $i,l as ea,m as ta,n as na,o as ra,p as ia,r as aa,s as oa,t as sa,u as ca,v as la,x as ua}from"./server-lock-DgWnoftI.mjs";export{Zt as AGENT_ID_MAX_LEN,qn as AGENT_ID_RE,$r as AGENT_WRITE_ORIGIN,Tn as AcpPermissionStore,mn as AcpRegistry,ri as AcpThreadManager,ci as AgentFocusBroadcaster,Jr as AgentPresenceBroadcaster,tt as AgentSessionCapacityError,I as AgentSessionManager,Cn as AutoStartDisabledError,Xn as BUNDLE_IDS,Kr as BUNDLE_SCOPE,sn as BUNDLE_SKILL_NAME,C as BacklinkIndex,te as CC1Broadcaster,o as CC1_CONTRACT_VERSION,Gr as CONFIG_FILENAME,Ie as CONFLICT_MARKER_RE,Oe as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,X as DEFAULT_CHECKPOINT_RETENTION,Dt as DEFAULT_EMBEDDINGS_DIMENSIONS,U as DEFAULT_PACK_ID,lt as DocumentDurabilityState,St as EMBEDDINGS_API_KEY_ENV,hr as FEATURED_AGENT_IDS,at as FILE_SYSTEM_WRITER,Ke as FILE_WATCHER_ORIGIN,st as FileEmbeddingsBackend,Nt as GIT_PREFLIGHT_FAIL_SPAN_NAME,ht as GIT_UPSTREAM_WRITER,yn as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Rt as HOCUSPOCUS_AUTH_REJECTION_REASONS,Zr as HocuspocusAuthRejection,di as HocuspocusAuthTokenSchema,hi as INSTALLED_AGENTS_SCHEMES,a as LINEAGE_EPOCH_KEY,We as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,rt as MANAGED_RENAME_ORIGIN,Xe as MAX_ACP_THREADS,M as MAX_AGENT_SESSIONS,Fr as MCP_CONNECTION_ID_HEADER,e as MCP_SERVER_NAME,je as MIN_EVICTABLE_IDLE_MS,zr as MIN_GIT_VERSION,Y as MISSING_OK_CONFIG_MESSAGE,Ft as MalformedGitPointerError,d as McpLogger,it as MissingOkConfigError,_ as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,u as PROTOCOL_VERSION,Wi as PinoLogger,Yi as ProcessLockCollisionError,Kn as ProjectGitInitError,R as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,Zi as RUNTIME_VERSION,an as RemoteConfigError,G as SERVICE_WRITER,Pn as SKILL_INSTALL_EVENTS_FILE_REL,n as SKILL_STATE_TARGETS,ye as STARTER_FOLDERS,Je as STARTER_FOLDER_FRONTMATTER_FILENAME,gi as STARTER_PACKS,T as STARTER_PACK_IDS,pt as STARTER_TEMPLATES,et as STATE_MANIFEST_FILENAME,qi as STATE_SCHEMA_VERSION,l as SYSTEM_DOC_NAME,Cr as SeedPrerequisiteError,le as SeedRootDirError,sa as ServerLockCollisionError,Ir as SingleFileNotAFileError,nr as SingleFileNotFoundError,wr as SingleFileNotMarkdownError,F as StateManifestError,mi as TagIndex,_n as USER_GLOBAL_BUNDLE_IDS,Z as UiLockCollisionError,P as __getShowAllWalkStatsForTesting,Ne as __resetShowAllWalkStatsForTesting,ea as acquireProcessLock,na as acquireServerLock,ot as acquireUiLock,Hn as applyAgentMarkdownWrite,Se as applyExternalChange,Re as applySeed,j as assertCompatibleStateManifest,ar as assertGitAvailable,qt as assertNeverDiskEvent,Kt as attachAcpThreadSocket,kn as attachIdleShutdown,qr as bootServer,xr as buildAndOpenSkill,_r as buildConfigYmlContent,ae as buildExecResult,D as buildOkMcpStdioCommand,fr as buildSkillZip,$ as buildStarterFolderFrontmatterYaml,de as buildWipTree,vr as bundleSkillMdPath,_t as canonicalProjectKey,ii as classifyEvents,ji as classifyFsPath,q as clearAllEmbeddingsKeys,He as clearContributors,ct as coercePackId,c as colorFromSeed,br as commitUpstreamImport,oe as commitWip,Tt as commitWipFromTree,Dr as compareSemver,Sn as composeEffectiveLinterConfig,Lt as composeFrontmatterSchemasConfig,V as containsConflictMarkers,Ze as contentHash,m as contributorCount,Pe as countShadowObjects,z as countStaleAgentWipRefs,ee as countWipRefs,Gn as createApiExtension,Qt as createAssetServeMiddleware,Wn as createContentFilter,y as createContentFilterAsync,pe as createEmbeddingsSecretStore,An as createEphemeralProjectDir,De as createExternalChangeHandler,pn as createFileLogger,fi as createLiveDerivedIndexExtension,ue as createMcpHttpHandler,w as createOsProbe,Te as createPersistenceExtension,E as createServer,In as createServerObserverExtension,Ee as createStreamingErrorWriter,Hi as createTestLogger,Sr as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Ae as detectProjectShape,se as detectUserSkillHosts,sr as discoverLockDirs,Jt as discoverMarkdownlintConfig,Ue as emitPreflightFailureSpan,wt as encodeDocName,yt as encodeFolderRoute,kt as encodeSkillRoute,Hr as ensureProjectGit,er as ensureProjectSkillGitignore,Fe as errorResponse,O as evictStaleTrackerEntries,b as extractHeadings,kr as extractOkBinaryPath,dt as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,Yr as findEnclosingProjectRoot,ai as findNativeMarkdownlintFile,mr as flushFileLogger,Yt as formatAuthRejectionWire,ln as formatContributors,Rr as formatContributorsFrom,we as formatPackRationale,bt as gcCheckpointRefs,fn as getCurrentMcpLogger,Vt as getLocalDir,Zn as getLogFilePath,Ui as getLogger,wn as getLogsDir,la as getMachineId,Ii as getMeter,Tr as getMetrics,xi as getTracer,jn as handleCollabSocketError,Le as handleSpawnCursor,hn as hasForwardingHeaders,he as hasGcLogLatch,s as iconFromClientName,Bt as incrementCollabSocketFilteredError,lr as incrementServerObserverFire,Dn as initContent,At as initShadowRepo,Fi as initTelemetry,Gt as initToleranceTelemetryWriter,pr as installPrettyZodErrors,Bi as installTestLoggers,Et as installUserSkill,Wr as isAllowedApiOrigin,En as isAllowedWorkspaceHostHeader,ge as isConfigDoc,oi as isHocuspocusAuthRejectionReason,vt as isKnownPackId,Ge as isLinkIndexExcludedDoc,bn as isLoopbackAddress,pi as isManagedArtifactDoc,r as isOrphanMode,Ln as isPairedWriteOrigin,H as isPathWithinDir,ua as isProcessAlive,li as isProjectRoot,gr as isRemoteAdmitted,S as isReservedForUserTree,ei as isSelfWrite,ut as isSystemDoc,ni as isToleranceTelemetryEnabled,Ki as isValidLockPid,nt as lastKnownHash,Be as listRescueCheckpoints,J as listStarterPacks,Qn as loadCustomAgents,be as loadPrincipal,ca as lockFilePath,Li as loggerFactory,Vi as logsCurrentPath,Gi as logsPreviousPath,ce as makeLazyEmbeddingsKeyStore,aa as markServerLockDraining,mt as mountMcpAndApi,Oi as normalizeFsPath,tr as originGitHubHost,xn as packageVersionMajorMinor,$e as parseAuthRejectionWire,dr as parseGitVersion,A as parseHocuspocusAuthToken,W as parseKeepaliveConnectionId,L as pathToDocName,ke as planSeed,zt as prepareSingleFileOpen,Fn as processCommand,Wt as processUsage,xt as readAllTargets,jt as readBundleDecision,Qe as readOwnNativeRules,Xi as readProcessLock,ia as readProcessLockDetailed,x as readProjectHeadState,Q as readProjectLocalSemanticConfig,$i as readServerLock,Ve as readServerPackageVersion,p as readSkillInstallStateSnapshot,Vn as readStateManifest,dn as readTargetRecordedAt,Br as readTargetVersion,gt as readUiLock,ne as reconcile,ir as recordContributor,Ut as recordSkillInstallEvent,yr as registerAllTools,N as registerWrite,ta as releaseProcessLock,Ji as releaseServerLock,K as releaseUiLock,Me as removeLastKnownHash,jr as resetMetrics,i as resolveBundleEnabled,Pr as resolveBundledSkillDir,ur as resolveContentDir,re as resolveCursorBinaryDefault,ve as resolveCursorSpawnInvocation,Xr as resolveEffectiveLinterConfig,Mt as resolveEmbeddingsCredential,Mr as resolveLockDir,ui as resolveNativeConfigForDoc,k as resolveNativeMarkdownlintConfig,me as resolvePack,Ar as resolvePackageVersion,$n as resolveRemoteAccess,ze as resolveUiInfo,Er as restoreContributors,si as restoreLifecycleFromConflictsJson,zn as rewriteMarkdownLinksForDocumentRename,Ce as rewriteWikiLinksForDocumentRename,Nr as runAuthReposSubprocess,$t as runAuthStatusSubprocess,Ot as runCloneSubprocess,Yn as runDeviceFlowSubprocess,Vr as runWithMcpLogger,Jn as safeContentPath,Bn as safeSubdir,f as safetyCheckpoint,tn as sanitizeClientName,cn as saveInMemoryCheckpoint,Lr as saveVersion,ti as seedBasenameIndex,cr as serializeError,_i as setActiveSpanAttributes,xe as setupServerObservers,rr as shadowGit,Pi as shutdownTelemetry,Ri as spansCurrentPath,zi as spansPreviousPath,qe as spawnDetached,_e as splitMarkdownBlocks,Un as startWatcher,B as streamingProblemEvent,Mn as swapContributors,Ye as teardownToleranceTelemetryWriter,Ur as toBroadcasterKey,Ti as tracedAppendFileSync,Ai as tracedLinkSync,Si as tracedMkdir,Ei as tracedMkdirSync,Mi as tracedRename,Ci as tracedRenameSync,ki as tracedRmSync,Di as tracedRmdirSync,wi as tracedUnlinkSync,bi as tracedWriteFile,Ni as tracedWriteFileSync,Qr as trustSystemCertificates,Xt as untrackTrackedProjectSkillProjection,v as updateLastKnownHash,Qi as updateProcessLockPort,ra as updateServerLockPort,fe as updateUiLockPort,rn as validateAgentId,Ct as validateCloneInputs,en as validateSkillZip,oa as waitForServerLockDrain,ft as withHiddenWindowsConsole,yi as withSpan,vi as withSpanSync,or as writeBundleDecision,On as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,Or as writeTargetVersion,Rn as writeTracker};
|