@inkeep/open-knowledge 0.36.0-beta.5 → 0.36.0-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/dist/assets/skills/discovery/SKILL.md +1 -1
  2. package/dist/assets/skills/project/SKILL.md +1 -1
  3. package/dist/cli.mjs +13 -13
  4. package/dist/constants-0O0dVRLJ.mjs +2 -0
  5. package/dist/index.d.mts +2 -5
  6. package/dist/index.mjs +1 -1
  7. package/dist/init-BstDp_v4.mjs +643 -0
  8. package/dist/init-PpuK2y4U.mjs +1 -0
  9. package/dist/{launch-json-removal-DZxESjmT.mjs → launch-json-removal-BcCQpGx-.mjs} +2 -2
  10. package/dist/loader-KRk29DXE.mjs +1 -0
  11. package/dist/{loader-By-CDx1k.mjs → loader-l_BC7vjs.mjs} +2 -2
  12. package/dist/{open-browser-B6D9fYyH.mjs → open-browser-DQGzqcdn.mjs} +2 -2
  13. package/dist/{preview-BrBt8LSP.mjs → preview-B7BjNEAS.mjs} +2 -2
  14. package/dist/preview-DuBMNs-o.mjs +1 -0
  15. package/dist/{repair-launch-json-CKwlXNT1.mjs → repair-launch-json-_jEBMO7G.mjs} +2 -2
  16. package/dist/{repair-mcp-configs-2LSm2qfK.mjs → repair-mcp-configs-u0ad9dnP.mjs} +2 -2
  17. package/dist/repair-skills-BwrIt7pC.mjs +1 -0
  18. package/dist/{repair-skills-B1G1QeKl.mjs → repair-skills-D638Scyb.mjs} +2 -2
  19. package/dist/{src-DjjyaKSr.mjs → src-DNAWQUHg.mjs} +1 -1
  20. package/dist/src-g3nRJry6.mjs +21 -0
  21. package/dist/{src-C-7wAp3_.mjs → src-up-FAzhh.mjs} +381 -382
  22. package/dist/{start-Cyi_lms5.mjs → start-BCCf0LEE.mjs} +2 -2
  23. package/dist/start-Bt-spF0y.mjs +1 -0
  24. package/dist/{write-project-skill-yzj7GOCS.mjs → write-project-skill-D3N9lJbe.mjs} +2 -2
  25. package/package.json +4 -4
  26. package/dist/constants-Bdeer1af.mjs +0 -2
  27. package/dist/init-Bhrz0jN-.mjs +0 -643
  28. package/dist/init-Criuw29c.mjs +0 -1
  29. package/dist/loader-KbIm0NCU.mjs +0 -1
  30. package/dist/preview-F-KstQlT.mjs +0 -1
  31. package/dist/repair-skills-C5TRYdRl.mjs +0 -1
  32. package/dist/src-TIYY1fSb.mjs +0 -21
  33. package/dist/start-HxMQXJT1.mjs +0 -1
@@ -0,0 +1 @@
1
+ import{g as e}from"./init-BstDp_v4.mjs";export{e as runInit};
@@ -1,2 +1,2 @@
1
- import{$n as e,fa as t,nr as n}from"./src-C-7wAp3_.mjs";import{E as r,w as i}from"./init-Bhrz0jN-.mjs";import{t as a}from"./is-object-DYBErO9v.mjs";import{join as o}from"node:path";import{existsSync as s,readFileSync as c,rmSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(f){let p=o(f,`.claude`,`launch.json`);if(!s(p))return{kind:`not-present`};let m;try{m=c(p,`utf-8`)}catch{return{kind:`declined`}}let h=[],g=n(m,h,u)??void 0;if(h.some(e=>!d(e,m))||!g||g.type!==`object`)return{kind:`declined`};let _=e(g).configurations;if(!Array.isArray(_))return{kind:`not-present`};let v=_.findIndex(e=>a(e)&&e.name===`open-knowledge-ui`);if(v===-1)return{kind:`not-present`};if(_.length===1)return l(p,{force:!0}),{kind:`removed-file`};let{text:y,changed:b}=r(m,[`configurations`,v]);return b?(t(p,y,{mode:i(p)}),{kind:`removed`}):{kind:`not-present`}}export{f as t};
2
- //# sourceMappingURL=launch-json-removal-DZxESjmT.mjs.map
1
+ import{$n as e,fa as t,nr as n}from"./src-up-FAzhh.mjs";import{E as r,w as i}from"./init-BstDp_v4.mjs";import{t as a}from"./is-object-DYBErO9v.mjs";import{join as o}from"node:path";import{existsSync as s,readFileSync as c,rmSync as l}from"node:fs";const u={allowTrailingComma:!0,disallowComments:!1};function d(e,t){return e.error===1&&e.offset===0&&t.charCodeAt(0)===65279}function f(f){let p=o(f,`.claude`,`launch.json`);if(!s(p))return{kind:`not-present`};let m;try{m=c(p,`utf-8`)}catch{return{kind:`declined`}}let h=[],g=n(m,h,u)??void 0;if(h.some(e=>!d(e,m))||!g||g.type!==`object`)return{kind:`declined`};let _=e(g).configurations;if(!Array.isArray(_))return{kind:`not-present`};let v=_.findIndex(e=>a(e)&&e.name===`open-knowledge-ui`);if(v===-1)return{kind:`not-present`};if(_.length===1)return l(p,{force:!0}),{kind:`removed-file`};let{text:y,changed:b}=r(m,[`configurations`,v]);return b?(t(p,y,{mode:i(p)}),{kind:`removed`}):{kind:`not-present`}}export{f as t};
2
+ //# sourceMappingURL=launch-json-removal-BcCQpGx-.mjs.map
@@ -0,0 +1 @@
1
+ import{n as e}from"./loader-l_BC7vjs.mjs";export{e as loadConfig};
@@ -1,4 +1,4 @@
1
- import{Ba as e,Jo as t,Ra as n,za as r}from"./src-S2yxN8_s.mjs";import{_ as i,ca as a,la as o}from"./src-C-7wAp3_.mjs";import{t as s}from"./constants-Bdeer1af.mjs";import{t as c}from"./is-object-DYBErO9v.mjs";import{resolve as l}from"node:path";import{existsSync as u,readFileSync as d}from"node:fs";import{realpath as f}from"node:fs/promises";var p=t();async function m(e){let t=l(e);try{return await f(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 h(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];c(a)&&c(i)?n[r]=h(i,a):a!==void 0&&(n[r]=a)}return n}function g(e){if(!u(e))return{value:null,path:e,source:null,doc:null};let t;try{t=d(e,`utf-8`)}catch(t){return console.warn(`[config] Failed to read ${e}: ${t instanceof Error?t.message:t}`),{value:null,path:e,source:null,doc:null}}let n=(0,p.parseDocument)(t);if(n.errors.length>0)return console.warn(`[config] Failed to parse ${e}: ${n.errors.map(e=>e.message).join(`; `)}`),{value:null,path:e,source:t,doc:null};let r=n.toJSON();return c(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function _(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=r({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...i,source:e}}return i})}function v(t){let r=t??process.cwd(),c=[],u=o(`user`,r),d=a({absPath:u}),f={};d.valid&&d.source!==void 0?(f=h(f,d.value),c.push(u)):d.valid;let p=l(r,`.ok`,s),m=g(p);if(m.value!==null){let t=n({value:m.value,file:m.path,source:m.source,doc:m.doc});if(t.length>0)throw Error(t.map(e).join(`
1
+ import{Ba as e,Jo as t,Ra as n,za as r}from"./src-S2yxN8_s.mjs";import{_ as i,ca as a,la as o}from"./src-up-FAzhh.mjs";import{t as s}from"./constants-0O0dVRLJ.mjs";import{t as c}from"./is-object-DYBErO9v.mjs";import{resolve as l}from"node:path";import{existsSync as u,readFileSync as d}from"node:fs";import{realpath as f}from"node:fs/promises";var p=t();async function m(e){let t=l(e);try{return await f(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 h(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];c(a)&&c(i)?n[r]=h(i,a):a!==void 0&&(n[r]=a)}return n}function g(e){if(!u(e))return{value:null,path:e,source:null,doc:null};let t;try{t=d(e,`utf-8`)}catch(t){return console.warn(`[config] Failed to read ${e}: ${t instanceof Error?t.message:t}`),{value:null,path:e,source:null,doc:null}}let n=(0,p.parseDocument)(t);if(n.errors.length>0)return console.warn(`[config] Failed to parse ${e}: ${n.errors.map(e=>e.message).join(`; `)}`),{value:null,path:e,source:t,doc:null};let r=n.toJSON();return c(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function _(e,t){return e.map(e=>{let n=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:n,message:e.message,issueCode:e.code};if(t.doc!==null&&t.source!==null){let e=r({file:t.path,source:t.source,doc:t.doc,path:n});if(e!==void 0)return{...i,source:e}}return i})}function v(t){let r=t??process.cwd(),c=[],u=o(`user`,r),d=a({absPath:u}),f={};d.valid&&d.source!==void 0?(f=h(f,d.value),c.push(u)):d.valid;let p=l(r,`.ok`,s),m=g(p);if(m.value!==null){let t=n({value:m.value,file:m.path,source:m.source,doc:m.doc});if(t.length>0)throw Error(t.map(e).join(`
2
2
 
3
3
  `));f=h(f,m.value),c.push(p)}let v=i.safeParse(f);if(!v.success){let t={code:`SCHEMA_INVALID`,issues:_(v.error.issues,m)};throw Error(e(t))}return{config:v.data,sources:c}}function y(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??v,r=new Map,i=new Map,a=m(e.startupCwd);return async o=>{let s=await m(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{v as n,y as t};
4
- //# sourceMappingURL=loader-By-CDx1k.mjs.map
4
+ //# sourceMappingURL=loader-l_BC7vjs.mjs.map
@@ -1,2 +1,2 @@
1
- import{Mr as e}from"./src-C-7wAp3_.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-B6D9fYyH.mjs.map
1
+ import{Mr as e}from"./src-up-FAzhh.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-DQGzqcdn.mjs.map
@@ -1,3 +1,3 @@
1
- import{rr as e}from"./src-C-7wAp3_.mjs";import"./constants-Bdeer1af.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(`
1
+ import{rr as e}from"./src-up-FAzhh.mjs";import"./constants-0O0dVRLJ.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-BrBt8LSP.mjs.map
3
+ //# sourceMappingURL=preview-B7BjNEAS.mjs.map
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./preview-B7BjNEAS.mjs";export{t as formatPreviewBlock,e as previewContent};
@@ -1,2 +1,2 @@
1
- import{t as e}from"./launch-json-removal-DZxESjmT.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-CKwlXNT1.mjs.map
1
+ import{t as e}from"./launch-json-removal-BcCQpGx-.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-_jEBMO7G.mjs.map
@@ -1,2 +1,2 @@
1
- import{d as e,v as t}from"./init-Bhrz0jN-.mjs";import{_ as n,d as r,s as i}from"./write-project-skill-yzj7GOCS.mjs";import{t as a}from"./mcp-migrate-event-C35ikoh2.mjs";import{homedir as o}from"node:os";function s(e){let t=e.logger??u,n=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return t({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of i){let i=r[o],s=c(()=>i.configPath(``,n));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:i,home:n,cwd:``,configPath:s,configPathOverride:void 0,logger:t})),i.projectConfigPath){let n=i.projectConfigPath,r=c(()=>n(e.projectDir));r!==null&&a.push(l({scope:`project`,editorId:o,target:i,home:void 0,cwd:e.projectDir,configPath:r,configPathOverride:r,logger:t}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(r){let i={scope:r.scope,editorId:r.editorId,configPath:r.configPath},o=e(r.target,r.cwd,r.home,r.configPathOverride);if(o===null)return{...i,outcome:`no-entry`};if(n(o))return{...i,outcome:`canonical`};r.logger(a({scope:r.scope,surface:`cli-repair`,editorId:r.editorId,configPath:r.configPath,priorEntry:o}));let s=t(r.target,r.cwd,{mode:`published`,skipAvailabilityCheck:!0},r.home,r.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return r.logger({event:`mcp-config-repair-write-failed`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,error:e}),{...i,outcome:`write-failed`,error:e}}return s.action===`declined`?(r.logger({event:`mcp-config-repair-declined`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,reason:s.declineReason}),{...i,outcome:`declined`}):{...i,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
2
- //# sourceMappingURL=repair-mcp-configs-2LSm2qfK.mjs.map
1
+ import{d as e,v as t}from"./init-BstDp_v4.mjs";import{_ as n,d as r,s as i}from"./write-project-skill-D3N9lJbe.mjs";import{t as a}from"./mcp-migrate-event-C35ikoh2.mjs";import{homedir as o}from"node:os";function s(e){let t=e.logger??u,n=e.home??o(),a=[];if(e.reclaimDisableEnv===`1`)return t({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of i){let i=r[o],s=c(()=>i.configPath(``,n));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:i,home:n,cwd:``,configPath:s,configPathOverride:void 0,logger:t})),i.projectConfigPath){let n=i.projectConfigPath,r=c(()=>n(e.projectDir));r!==null&&a.push(l({scope:`project`,editorId:o,target:i,home:void 0,cwd:e.projectDir,configPath:r,configPathOverride:r,logger:t}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(r){let i={scope:r.scope,editorId:r.editorId,configPath:r.configPath},o=e(r.target,r.cwd,r.home,r.configPathOverride);if(o===null)return{...i,outcome:`no-entry`};if(n(o))return{...i,outcome:`canonical`};r.logger(a({scope:r.scope,surface:`cli-repair`,editorId:r.editorId,configPath:r.configPath,priorEntry:o}));let s=t(r.target,r.cwd,{mode:`published`,skipAvailabilityCheck:!0},r.home,r.configPathOverride);if(s.action===`failed`){let e=s.error??`unknown write failure`;return r.logger({event:`mcp-config-repair-write-failed`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,error:e}),{...i,outcome:`write-failed`,error:e}}return s.action===`declined`?(r.logger({event:`mcp-config-repair-declined`,scope:r.scope,editorId:r.editorId,configPath:r.configPath,reason:s.declineReason}),{...i,outcome:`declined`}):{...i,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
2
+ //# sourceMappingURL=repair-mcp-configs-u0ad9dnP.mjs.map
@@ -0,0 +1 @@
1
+ import{t as e}from"./repair-skills-D638Scyb.mjs";export{e as repairSkills};
@@ -1,3 +1,3 @@
1
- import{C as e}from"./src-S2yxN8_s.mjs";import{An as t,Bn as n,Dn as r,En as i,In as a,Mn as o,Pn as s,Vn as c,jn as l}from"./src-C-7wAp3_.mjs";import{t as u}from"./esm-EvSEzE_V.mjs";import{a as d,d as f,f as p,t as m}from"./write-project-skill-yzj7GOCS.mjs";import{dirname as h,join as g,resolve as _}from"node:path";import{existsSync as v,mkdirSync as y,readFileSync as b,readdirSync as x,rmSync as S,statSync as C,writeFileSync as w}from"node:fs";import{homedir as T}from"node:os";const E={existsSync:e=>v(e),isDirectory:e=>{try{return C(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>x(e),readFileSync:e=>b(e),writeFileSync:(e,t)=>{w(e,t)},mkdirSync:(e,t)=>{y(e,t)},rmSync:(e,t)=>{S(e,t)}},D={resolveProjectBundledSkillDir:()=>a(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>a(e,{checkDesktop:!1}),readBundledVersion:()=>r(),readRecordedVersion:e=>t(e,`cli-hosts`),writeRecordedVersion:(e,t)=>o(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>s(e),readBundleDecision:(e,t)=>i(e,t),writeBundleDecision:(e,t,n)=>l(e,t,n),removeBundleFromDisk:(e,t)=>d(e,t)};function O(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function k(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(h(t),{recursive:!0}),A(e,t,n)}function A(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=g(e,r),a=g(t,r);n.isDirectory(i)?A(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function j(e,t,n,r,i,a){let o=[],s=g(e,`.agents`,`skills`,t),c=r.existsSync(s),l=!1;try{k(n,s,r),l=!0,o.push({kind:`central`,path:s,outcome:c?`overwritten`:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:c,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=g(e,c.hostDir),u=g(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}let d=r.existsSync(u);try{k(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:d?`overwritten`:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:d,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:l}}function M(e,t){if(!e)return!1;try{if(!t.existsSync(e))return!1;let n=t.readFileSync(e).toString(`utf8`);return n.includes(`# ok-mcp-v1`)||n.includes(`# ok-mcp-win-v1`)}catch{return!1}}function N(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=g(e,t.hostDir,`skills`,`open-knowledge`),s=g(o,`SKILL.md`),c=n.existsSync(s),l=f[t.editorId]?.projectConfigPath?.(e),u=!c&&M(l,n);if(!c&&!u){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{m(o,e),k(i,o,n);let s=c?`reclaimed`:`created`;a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:s}),r({event:c?`project-skill-reclaim-reclaimed`:`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 P(t,r,i,a){let o=e=>{r.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),l;try{l=await r.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return a({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await r.readRecordedVersion(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 c)try{d.push({id:e,sourceDir:r.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return a({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let o of d){let s=n[o.id],c=i.existsSync(g(t,`.agents`,`skills`,s)),l=await r.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{r.removeBundleFromDisk(t,o.id),a({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:o.id})}catch(e){a({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await r.writeBundleDecision(t,s,!0)}catch(e){a({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}p.push(o)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>i.existsSync(g(t,`.agents`,`skills`,n[e.id])));if(u!==null&&u===l&&m)return a({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],_=d.length===c.length,v=!0;for(let{id:e,sourceDir:r}of p){let o=j(t,n[e],r,i,a,l);h.push(...o.entries),o.centralWritten||(v=!1)}let y=h.some(e=>e.kind===`central`&&(e.outcome===`written`||e.outcome===`overwritten`));if(_&&v&&y){let e=null;try{await r.writeRecordedVersion(t,l),a({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),a({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t}of p)o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?`installed`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:l,entries:h}}async function F(e){let t=e.logger??O,n=e.fs??E,r=e.home??T(),i={...D,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:N(e.projectDir,i,n,t),user:await P(r,i,n,t)}}function I(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 L(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===`reclaimed`).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} reclaimed, ${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`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
1
+ import{C as e}from"./src-S2yxN8_s.mjs";import{An as t,Bn as n,Dn as r,En as i,In as a,Mn as o,Pn as s,Vn as c,jn as l}from"./src-up-FAzhh.mjs";import{t as u}from"./esm-EvSEzE_V.mjs";import{a as d,d as f,f as p,t as m}from"./write-project-skill-D3N9lJbe.mjs";import{dirname as h,join as g,resolve as _}from"node:path";import{existsSync as v,mkdirSync as y,readFileSync as b,readdirSync as x,rmSync as S,statSync as C,writeFileSync as w}from"node:fs";import{homedir as T}from"node:os";const E={existsSync:e=>v(e),isDirectory:e=>{try{return C(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>x(e),readFileSync:e=>b(e),writeFileSync:(e,t)=>{w(e,t)},mkdirSync:(e,t)=>{y(e,t)},rmSync:(e,t)=>{S(e,t)}},D={resolveProjectBundledSkillDir:()=>a(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>a(e,{checkDesktop:!1}),readBundledVersion:()=>r(),readRecordedVersion:e=>t(e,`cli-hosts`),writeRecordedVersion:(e,t)=>o(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>s(e),readBundleDecision:(e,t)=>i(e,t),writeBundleDecision:(e,t,n)=>l(e,t,n),removeBundleFromDisk:(e,t)=>d(e,t)};function O(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function k(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(h(t),{recursive:!0}),A(e,t,n)}function A(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=g(e,r),a=g(t,r);n.isDirectory(i)?A(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function j(e,t,n,r,i,a){let o=[],s=g(e,`.agents`,`skills`,t),c=r.existsSync(s),l=!1;try{k(n,s,r),l=!0,o.push({kind:`central`,path:s,outcome:c?`overwritten`:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:c,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=g(e,c.hostDir),u=g(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}let d=r.existsSync(u);try{k(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:d?`overwritten`:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:d,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:l}}function M(e,t){if(!e)return!1;try{if(!t.existsSync(e))return!1;let n=t.readFileSync(e).toString(`utf8`);return n.includes(`# ok-mcp-v1`)||n.includes(`# ok-mcp-win-v1`)}catch{return!1}}function N(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=g(e,t.hostDir,`skills`,`open-knowledge`),s=g(o,`SKILL.md`),c=n.existsSync(s),l=f[t.editorId]?.projectConfigPath?.(e),u=!c&&M(l,n);if(!c&&!u){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{m(o,e),k(i,o,n);let s=c?`reclaimed`:`created`;a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:s}),r({event:c?`project-skill-reclaim-reclaimed`:`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 P(t,r,i,a){let o=e=>{r.recordEvent(e).catch(()=>{})},s=()=>new Date().toISOString(),l;try{l=await r.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return a({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await r.readRecordedVersion(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 c)try{d.push({id:e,sourceDir:r.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return a({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let o of d){let s=n[o.id],c=i.existsSync(g(t,`.agents`,`skills`,s)),l=await r.readBundleDecision(t,s).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{r.removeBundleFromDisk(t,o.id),a({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:o.id})}catch(e){a({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await r.writeBundleDecision(t,s,!0)}catch(e){a({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:o.id,error:e instanceof Error?e.message:String(e)})}p.push(o)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>i.existsSync(g(t,`.agents`,`skills`,n[e.id])));if(u!==null&&u===l&&m)return a({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],_=d.length===c.length,v=!0;for(let{id:e,sourceDir:r}of p){let o=j(t,n[e],r,i,a,l);h.push(...o.entries),o.centralWritten||(v=!1)}let y=h.some(e=>e.kind===`central`&&(e.outcome===`written`||e.outcome===`overwritten`));if(_&&v&&y){let e=null;try{await r.writeRecordedVersion(t,l),a({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),a({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t}of p)o({ts:s(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?`installed`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:s(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:e?`all-writes-failed`:`no-hosts-installed`})}return{outcome:`done`,version:l,entries:h}}async function F(e){let t=e.logger??O,n=e.fs??E,r=e.home??T(),i={...D,...e.deps};return e.reclaimDisableEnv===`1`?(t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`}):{status:`done`,project:N(e.projectDir,i,n,t),user:await P(r,i,n,t)}}function I(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 L(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===`reclaimed`).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} reclaimed, ${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`||e.outcome===`overwritten`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,i=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} skipped, ${i} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return t.join(`
2
2
  `)}function R(){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.").action(async()=>{let e=await F({projectDir:_(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null});process.stdout.write(`${L(e)}\n`),process.exitCode=I(e)})}export{R as n,F as t};
3
- //# sourceMappingURL=repair-skills-B1G1QeKl.mjs.map
3
+ //# sourceMappingURL=repair-skills-D638Scyb.mjs.map
@@ -1 +1 @@
1
- import{C as e,Da as t,Zo as n,_a as r,ea as i,f as a,ha as o,na as s,ta as c,u as l,y as u}from"./src-S2yxN8_s.mjs";import{$ as d,$i as f,$r as p,$t as m,A as h,Ai as g,An as _,Ar as v,At as y,B as b,Bi as x,Bn as S,Br as C,Bt as w,C as T,Ca as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Fr as W,Ft as G,G as K,Gi as q,Gn as J,Gr as Y,Gt as X,H as Z,Hi as Q,Hn as $,Hr as ee,Ht as te,I as ne,Ii as re,In as ie,Ir as ae,It as oe,J as se,Ji as ce,Jn as le,Jr as ue,Jt as de,K as fe,Ki as pe,Kn as me,Kr as he,Kt as ge,L as _e,Li as ve,Ln as ye,Lr as be,Lt as xe,M as Se,Mi as Ce,Mn as we,Mr as Te,Mt as Ee,N as De,Ni as Oe,Nn as ke,Nr as Ae,Nt as je,O as Me,Oi as Ne,On as Pe,Or as Fe,Ot as Ie,P as Le,Pi as Re,Pn as ze,Pr as Be,Pt as Ve,Q as He,Qi as Ue,Qr as We,Qt as Ge,R as Ke,Ri as qe,Rn as Je,Rr as Ye,Rt as Xe,S as Ze,Sa as Qe,Si as $e,Sn as et,Sr as tt,St as nt,T as rt,Ta as it,Ti as at,Tn as ot,Tr as st,Tt as ct,U as lt,Ui as ut,Un as dt,Ur as ft,Ut as pt,V as mt,Vi as ht,Vn as gt,Vr as _t,Vt as vt,W as yt,Wi as bt,Wn as xt,Wr as St,Wt as Ct,X as wt,Xi as Tt,Xn as Et,Xr as Dt,Xt as Ot,Y as kt,Yi as At,Yn as jt,Yr as Mt,Yt as Nt,Z as Pt,Zi as Ft,Zn as It,Zr as Lt,Zt as Rt,_ as zt,_a as Bt,_i as Vt,_n as Ht,_r as Ut,_t as Wt,a as Gt,aa as Kt,ai as qt,an as Jt,ar as Yt,at as Xt,b as Zt,ba as Qt,bi as $t,bn as en,br as tn,bt as nn,c as rn,ci as an,cn as on,cr as sn,d as cn,di as ln,dn as un,dr as dn,ea as fn,ei as pn,en as mn,et as hn,f as gn,fi as _n,fn as vn,fr as yn,g as bn,ga as xn,gi as Sn,gn as Cn,gr as wn,gt as Tn,h as En,ha as Dn,hi as On,hn as kn,hr as An,ht as jn,i as Mn,ia as Nn,ii as Pn,in as Fn,ir as In,it as Ln,j as Rn,ji as zn,jn as Bn,jr as Vn,jt as Hn,k as Un,ki as Wn,kn as Gn,kr as Kn,kt as qn,l as Jn,li as Yn,ln as Xn,lr as Zn,m as Qn,ma as $n,mi as er,mn as tr,mr as nr,mt as rr,n as ir,na as ar,ni as or,nn as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,pt as br,q as xr,qi as Sr,qn as Cr,qr as wr,qt as Tr,r as Er,ra as Dr,ri as Or,rn as kr,rr as Ar,rt as jr,s as Mr,sa as Nr,si as Pr,sn as Fr,sr as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tt as Vr,u as Hr,ui as Ur,un as Wr,ur as Gr,v as Kr,va as qr,vi as Jr,vn as Yr,vr as Xr,vt as Zr,w as Qr,wa as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xa as ai,xi as oi,xn as si,xr as ci,xt as li,y as ui,ya as di,yi as fi,yn as pi,yr as mi,yt as hi,z as gi,zi as _i,zn as vi,zr as yi,zt as bi}from"./src-C-7wAp3_.mjs";import{A as xi,C as Si,M as Ci,S as wi,T as Ti,_ as Ei,a as Di,b as Oi,c as ki,f as Ai,g as ji,h as Mi,i as Ni,j as Pi,k as Fi,l as Ii,m as Li,n as Ri,o as zi,p as Bi,r as Vi,s as Hi,t as Ui,u as Wi,v as Gi,w as Ki,x as qi,y as Ji}from"./server-lock-D46oe4zF.mjs";export{Qt as AGENT_ID_MAX_LEN,ai as AGENT_ID_RE,ht as AGENT_WRITE_ORIGIN,di as AgentFocusBroadcaster,gr as AgentPresenceBroadcaster,Q as AgentSessionCapacityError,ut as AgentSessionManager,rr as AutoStartDisabledError,Je as BUNDLE_IDS,vi as BUNDLE_SCOPE,S as BUNDLE_SKILL_NAME,Fn as BacklinkIndex,At as CC1Broadcaster,r as CC1_CONTRACT_VERSION,de as CONFIG_FILENAME,Yn as CONFLICT_MARKER_RE,Ir as CURSOR_BUNDLE_PATHS_BY_PLATFORM,zt as ConfigSchema,ue as DEFAULT_CHECKPOINT_RETENTION,ci as DEFAULT_EMBEDDINGS_DIMENSIONS,ct as DEFAULT_PACK_ID,tt as EMBEDDINGS_API_KEY_ENV,Mt as FILE_SYSTEM_WRITER,Y as FILE_WATCHER_ORIGIN,wn as FileEmbeddingsBackend,pt as GIT_PREFLIGHT_FAIL_SPAN_NAME,Dt as GIT_UPSTREAM_WRITER,$r as GitDirAccessError,un as GitNotAvailableError,vn as GitTooOldError,Oe as HOCUSPOCUS_AUTH_REJECTION_REASONS,Re as HocuspocusAuthRejection,H as HocuspocusAuthTokenSchema,yr as INSTALLED_AGENTS_SCHEMES,o as LINEAGE_EPOCH_KEY,_e as LIVE_DERIVED_INDEX_DEBOUNCE_MS,B as LOG_MD_TEMPLATE,Tn as MANAGED_RENAME_ORIGIN,bt as MAX_AGENT_SESSIONS,Xt as MCP_CONNECTION_ID_HEADER,i as MCP_SERVER_NAME,vr as MIN_GIT_VERSION,b as MISSING_OK_CONFIG_MESSAGE,it as MalformedGitPointerError,Pt as McpLogger,mt as MissingOkConfigError,Kn as OBSERVER_SYNC_ORIGIN,Nt as OK_OKIGNORE_TEMPLATE,c as ORPHAN_MODES,n as PROTOCOL_VERSION,qi as PinoLogger,ki as ProcessLockCollisionError,Jn as ProjectGitInitError,Wt as ROLLBACK_ORIGIN,Ot as ROOT_GITIGNORE_TEMPLATE,ji as RUNTIME_VERSION,Lt as SERVICE_WRITER,ke as SKILL_INSTALL_EVENTS_FILE_REL,u as SKILL_STATE_TARGETS,F as STARTER_FOLDERS,Ie as STARTER_FOLDER_FRONTMATTER_FILENAME,qn as STARTER_PACKS,y as STARTER_PACK_IDS,Hn as STARTER_TEMPLATES,rt as STATE_MANIFEST_FILENAME,Ei as STATE_SCHEMA_VERSION,t as SYSTEM_DOC_NAME,xe as SeedPrerequisiteError,Xe as SeedRootDirError,Ui as ServerLockCollisionError,Lr as SingleFileNotAFileError,ir as SingleFileNotFoundError,Er as SingleFileNotMarkdownError,I as StateManifestError,Qr as TagIndex,gt as USER_GLOBAL_BUNDLE_IDS,fr as UiLockCollisionError,Zr as __getShowAllWalkStatsForTesting,hi as __resetShowAllWalkStatsForTesting,Ii as acquireProcessLock,Ri as acquireServerLock,Fr as acquireUiLock,q as applyAgentMarkdownWrite,he as applyExternalChange,ri as applySeed,j as assertCompatibleStateManifest,tr as assertGitAvailable,Ae as assertNeverDiskEvent,br as attachIdleShutdown,Kr as bootServer,O as buildAndOpenSkill,Rt as buildConfigYmlContent,fe as buildExecResult,U as buildSkillZip,Ee as buildStarterFolderFrontmatterYaml,We as buildWipTree,$ as bundleSkillMdPath,Be as classifyEvents,$t as classifyFsPath,_r as clearContributors,Ut as clearEmbeddingsKeyFromAllBackends,je as coercePackId,l as colorFromSeed,p as commitUpstreamImport,pn as commitWip,zr as commitWipFromTree,kn as compareSemver,J as composeEffectiveLinterConfig,Ur as containsConflictMarkers,W as contentHash,er as contributorCount,De as countShadowObjects,Le as countStaleAgentWipRefs,V as countWipRefs,nn as createApiExtension,z as createAssetServeMiddleware,Ar as createContentFilter,In as createContentFilterAsync,Xr as createEmbeddingsSecretStore,Mn as createEphemeralProjectDir,wr as createExternalChangeHandler,gn as createFileLogger,Ke as createLiveDerivedIndexExtension,yt as createMcpHttpHandler,nr as createOsProbe,P as createPersistenceExtension,T as createServer,Rn as createServerObserverExtension,pe as createStreamingErrorWriter,wi as createTestLogger,mi as describeStoredEmbeddingsKey,bn as detectClaudeDesktopPresence,Cn as detectGit,Me as detectProjectShape,hn as discoverLockDirs,le as discoverMarkdownlintConfig,Ct as emitPreflightFailureSpan,xr as encodeDocName,se as encodeFolderRoute,kt as encodeSkillRoute,Hr as ensureProjectGit,Ge as ensureProjectSkillGitignore,Sr as errorResponse,ae as evictStaleTrackerEntries,Vr as extractOkBinaryPath,Jt as extractWikiLinksFromMarkdown,Ht as fallbackPaths,cn as findEnclosingGitRoot,sr as findEnclosingProjectRoot,jt as findNativeMarkdownlintFile,hr as flushFileLogger,re as formatAuthRejectionWire,On as formatContributors,Sn as formatContributorsFrom,nt as formatPackRationale,or as gcCheckpointRefs,He as getCurrentMcpLogger,k as getLocalDir,Qn as getLogFilePath,Si as getLogger,En as getLogsDir,Gi as getMachineId,Rr as getMeter,$n as getMetrics,ar as getTracer,Dn as handleCollabSocketError,sn as handleSpawnCursor,ne as hasGcLogLatch,a as iconFromClientName,xn as incrementCollabSocketFilteredError,Bt as incrementServerObserverFire,m as initContent,Or as initShadowRepo,Dr as initTelemetry,Zt as initToleranceTelemetryWriter,Ln as installPrettyZodErrors,Ki as installTestLoggers,ti as installUserSkill,x as isAllowedApiOrigin,bi as isAllowedWorkspaceHostHeader,Tt as isConfigDoc,ve as isHocuspocusAuthRejectionReason,Ve as isKnownPackId,Ft as isLinkIndexExcludedDoc,w as isLoopbackAddress,Ue as isManagedArtifactDoc,s as isOrphanMode,v as isPairedWriteOrigin,Zn as isPathWithinDir,Ji as isProcessAlive,kr as isProjectRoot,pi as isProjectSkillManaged,f as isReservedForUserTree,be as isSelfWrite,fn as isSystemDoc,ii as isToleranceTelemetryEnabled,Oi as isValidLockPid,Ye as lastKnownHash,Pn as listRescueCheckpoints,G as listStarterPacks,Se as loadPrincipal,Wi as lockFilePath,Ti as loggerFactory,Fi as logsCurrentPath,xi as logsPreviousPath,tn as makeLazyEmbeddingsKeyStore,Vi as markServerLockDraining,Z as mountMcpAndApi,oi as normalizeFsPath,dt as originGitHubHost,mn as packageVersionMajorMinor,qe as parseAuthRejectionWire,Yr as parseGitVersion,_i as parseHocuspocusAuthToken,lt as parseKeepaliveConnectionId,yi as pathToDocName,A as planSeed,Gt as prepareSingleFileOpen,cr as processCommand,jr as processUsage,ot as readAllTargets,gi as readBranchFromHead,R as readBundleDecision,Et as readOwnNativeRules,Ai as readProcessLock,Bi as readProcessLockDetailed,An as readProjectLocalSemanticConfig,Ni as readServerLock,N as readServerPackageVersion,Pe as readSkillInstallStateSnapshot,en as readSkillManagement,Un as readStateManifest,Gn as readTargetRecordedAt,_ as readTargetVersion,on as readUiLock,ln as reconcile,Vt as recordContributor,ze as recordSkillInstallEvent,K as registerAllTools,C as registerWrite,Li as releaseProcessLock,Di as releaseServerLock,Xn as releaseUiLock,_t as removeLastKnownHash,qr as resetMetrics,e as resolveBundleEnabled,ie as resolveBundledSkillDir,ni as resolveContentDir,Gr as resolveCursorBinaryDefault,dn as resolveCursorSpawnInvocation,me as resolveEffectiveLinterConfig,st as resolveLockDir,Cr as resolveNativeConfigForDoc,It as resolveNativeMarkdownlintConfig,oe as resolvePack,Mr as resolvePackageVersion,wt as resolveUiInfo,Jr as restoreContributors,ui as restoreLifecycleFromConflictsJson,Yt as rewriteMarkdownLinksForDocumentRename,pr as rewriteWikiLinksForDocumentRename,X as runAuthReposSubprocess,ge as runAuthStatusSubprocess,vt as runCloneSubprocess,Tr as runDeviceFlowSubprocess,d as runWithMcpLogger,Fe as safeContentPath,li as safeSubdir,qt as safetyCheckpoint,mr as sanitizeClientName,dr as saveInMemoryCheckpoint,Pr as saveVersion,jn as seedBasenameIndex,lr as serializeError,Nn as setActiveSpanAttributes,Vn as setupServerObservers,an as shadowGit,Kt as shutdownTelemetry,si as skillManagementPath,Pi as spansCurrentPath,Ci as spansPreviousPath,yn as spawnDetached,_n as splitMarkdownBlocks,ee as startWatcher,ce as streamingProblemEvent,fi as swapContributors,Ze as teardownToleranceTelemetryWriter,Qe as toBroadcasterKey,$e as tracedAppendFileSync,D as tracedLinkSync,ei as tracedMkdir,at as tracedMkdirSync,L as tracedRename,M as tracedRenameSync,Ne as tracedRmSync,Wn as tracedRmdirSync,g as tracedUnlinkSync,zn as tracedWriteFile,Ce as tracedWriteFileSync,rn as untrackTrackedProjectSkillProjection,ft as updateLastKnownHash,Mi as updateProcessLockPort,zi as updateServerLockPort,Wr as updateUiLockPort,E as validateAgentId,te as validateCloneInputs,ye as validateSkillZip,Hi as waitForServerLockDrain,Te as withHiddenWindowsConsole,ur as withSpan,Nr as withSpanSync,Bn as writeBundleDecision,xt as writeMarkdownlintRule,Br as writeRootGitignoreForNewRepo,et as writeSkillManagement,h as writeStateManifest,we as writeTargetVersion,St as writeTracker};
1
+ import{C as e,Da as t,Zo as n,_a as r,ea as i,f as a,ha as o,na as s,ta as c,u as l,y as u}from"./src-S2yxN8_s.mjs";import{$ as d,$i as f,$r as p,$t as m,A as h,Ai as g,An as _,Ar as v,At as y,B as b,Bi as x,Bn as S,Br as C,Bt as w,C as T,Ca as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Fr as W,Ft as G,G as K,Gi as q,Gn as J,Gr as Y,Gt as X,H as Z,Hi as Q,Hn as $,Hr as ee,Ht as te,I as ne,Ii as re,In as ie,Ir as ae,It as oe,J as se,Ji as ce,Jn as le,Jr as ue,Jt as de,K as fe,Ki as pe,Kn as me,Kr as he,Kt as ge,L as _e,Li as ve,Ln as ye,Lr as be,Lt as xe,M as Se,Mi as Ce,Mn as we,Mr as Te,Mt as Ee,N as De,Ni as Oe,Nn as ke,Nr as Ae,Nt as je,O as Me,Oi as Ne,On as Pe,Or as Fe,Ot as Ie,P as Le,Pi as Re,Pn as ze,Pr as Be,Pt as Ve,Q as He,Qi as Ue,Qr as We,Qt as Ge,R as Ke,Ri as qe,Rn as Je,Rr as Ye,Rt as Xe,S as Ze,Sa as Qe,Si as $e,Sn as et,Sr as tt,St as nt,T as rt,Ta as it,Ti as at,Tn as ot,Tr as st,Tt as ct,U as lt,Ui as ut,Un as dt,Ur as ft,Ut as pt,V as mt,Vi as ht,Vn as gt,Vr as _t,Vt as vt,W as yt,Wi as bt,Wn as xt,Wr as St,Wt as Ct,X as wt,Xi as Tt,Xn as Et,Xr as Dt,Xt as Ot,Y as kt,Yi as At,Yn as jt,Yr as Mt,Yt as Nt,Z as Pt,Zi as Ft,Zn as It,Zr as Lt,Zt as Rt,_ as zt,_a as Bt,_i as Vt,_n as Ht,_r as Ut,_t as Wt,a as Gt,aa as Kt,ai as qt,an as Jt,ar as Yt,at as Xt,b as Zt,ba as Qt,bi as $t,bn as en,br as tn,bt as nn,c as rn,ci as an,cn as on,cr as sn,d as cn,di as ln,dn as un,dr as dn,ea as fn,ei as pn,en as mn,et as hn,f as gn,fi as _n,fn as vn,fr as yn,g as bn,ga as xn,gi as Sn,gn as Cn,gr as wn,gt as Tn,h as En,ha as Dn,hi as On,hn as kn,hr as An,ht as jn,i as Mn,ia as Nn,ii as Pn,in as Fn,ir as In,it as Ln,j as Rn,ji as zn,jn as Bn,jr as Vn,jt as Hn,k as Un,ki as Wn,kn as Gn,kr as Kn,kt as qn,l as Jn,li as Yn,ln as Xn,lr as Zn,m as Qn,ma as $n,mi as er,mn as tr,mr as nr,mt as rr,n as ir,na as ar,ni as or,nn as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,pt as br,q as xr,qi as Sr,qn as Cr,qr as wr,qt as Tr,r as Er,ra as Dr,ri as Or,rn as kr,rr as Ar,rt as jr,s as Mr,sa as Nr,si as Pr,sn as Fr,sr as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tt as Vr,u as Hr,ui as Ur,un as Wr,ur as Gr,v as Kr,va as qr,vi as Jr,vn as Yr,vr as Xr,vt as Zr,w as Qr,wa as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xa as ai,xi as oi,xn as si,xr as ci,xt as li,y as ui,ya as di,yi as fi,yn as pi,yr as mi,yt as hi,z as gi,zi as _i,zn as vi,zr as yi,zt as bi}from"./src-up-FAzhh.mjs";import{A as xi,C as Si,M as Ci,S as wi,T as Ti,_ as Ei,a as Di,b as Oi,c as ki,f as Ai,g as ji,h as Mi,i as Ni,j as Pi,k as Fi,l as Ii,m as Li,n as Ri,o as zi,p as Bi,r as Vi,s as Hi,t as Ui,u as Wi,v as Gi,w as Ki,x as qi,y as Ji}from"./server-lock-D46oe4zF.mjs";export{Qt as AGENT_ID_MAX_LEN,ai as AGENT_ID_RE,ht as AGENT_WRITE_ORIGIN,di as AgentFocusBroadcaster,gr as AgentPresenceBroadcaster,Q as AgentSessionCapacityError,ut as AgentSessionManager,rr as AutoStartDisabledError,Je as BUNDLE_IDS,vi as BUNDLE_SCOPE,S as BUNDLE_SKILL_NAME,Fn as BacklinkIndex,At as CC1Broadcaster,r as CC1_CONTRACT_VERSION,de as CONFIG_FILENAME,Yn as CONFLICT_MARKER_RE,Ir as CURSOR_BUNDLE_PATHS_BY_PLATFORM,zt as ConfigSchema,ue as DEFAULT_CHECKPOINT_RETENTION,ci as DEFAULT_EMBEDDINGS_DIMENSIONS,ct as DEFAULT_PACK_ID,tt as EMBEDDINGS_API_KEY_ENV,Mt as FILE_SYSTEM_WRITER,Y as FILE_WATCHER_ORIGIN,wn as FileEmbeddingsBackend,pt as GIT_PREFLIGHT_FAIL_SPAN_NAME,Dt as GIT_UPSTREAM_WRITER,$r as GitDirAccessError,un as GitNotAvailableError,vn as GitTooOldError,Oe as HOCUSPOCUS_AUTH_REJECTION_REASONS,Re as HocuspocusAuthRejection,H as HocuspocusAuthTokenSchema,yr as INSTALLED_AGENTS_SCHEMES,o as LINEAGE_EPOCH_KEY,_e as LIVE_DERIVED_INDEX_DEBOUNCE_MS,B as LOG_MD_TEMPLATE,Tn as MANAGED_RENAME_ORIGIN,bt as MAX_AGENT_SESSIONS,Xt as MCP_CONNECTION_ID_HEADER,i as MCP_SERVER_NAME,vr as MIN_GIT_VERSION,b as MISSING_OK_CONFIG_MESSAGE,it as MalformedGitPointerError,Pt as McpLogger,mt as MissingOkConfigError,Kn as OBSERVER_SYNC_ORIGIN,Nt as OK_OKIGNORE_TEMPLATE,c as ORPHAN_MODES,n as PROTOCOL_VERSION,qi as PinoLogger,ki as ProcessLockCollisionError,Jn as ProjectGitInitError,Wt as ROLLBACK_ORIGIN,Ot as ROOT_GITIGNORE_TEMPLATE,ji as RUNTIME_VERSION,Lt as SERVICE_WRITER,ke as SKILL_INSTALL_EVENTS_FILE_REL,u as SKILL_STATE_TARGETS,F as STARTER_FOLDERS,Ie as STARTER_FOLDER_FRONTMATTER_FILENAME,qn as STARTER_PACKS,y as STARTER_PACK_IDS,Hn as STARTER_TEMPLATES,rt as STATE_MANIFEST_FILENAME,Ei as STATE_SCHEMA_VERSION,t as SYSTEM_DOC_NAME,xe as SeedPrerequisiteError,Xe as SeedRootDirError,Ui as ServerLockCollisionError,Lr as SingleFileNotAFileError,ir as SingleFileNotFoundError,Er as SingleFileNotMarkdownError,I as StateManifestError,Qr as TagIndex,gt as USER_GLOBAL_BUNDLE_IDS,fr as UiLockCollisionError,Zr as __getShowAllWalkStatsForTesting,hi as __resetShowAllWalkStatsForTesting,Ii as acquireProcessLock,Ri as acquireServerLock,Fr as acquireUiLock,q as applyAgentMarkdownWrite,he as applyExternalChange,ri as applySeed,j as assertCompatibleStateManifest,tr as assertGitAvailable,Ae as assertNeverDiskEvent,br as attachIdleShutdown,Kr as bootServer,O as buildAndOpenSkill,Rt as buildConfigYmlContent,fe as buildExecResult,U as buildSkillZip,Ee as buildStarterFolderFrontmatterYaml,We as buildWipTree,$ as bundleSkillMdPath,Be as classifyEvents,$t as classifyFsPath,_r as clearContributors,Ut as clearEmbeddingsKeyFromAllBackends,je as coercePackId,l as colorFromSeed,p as commitUpstreamImport,pn as commitWip,zr as commitWipFromTree,kn as compareSemver,J as composeEffectiveLinterConfig,Ur as containsConflictMarkers,W as contentHash,er as contributorCount,De as countShadowObjects,Le as countStaleAgentWipRefs,V as countWipRefs,nn as createApiExtension,z as createAssetServeMiddleware,Ar as createContentFilter,In as createContentFilterAsync,Xr as createEmbeddingsSecretStore,Mn as createEphemeralProjectDir,wr as createExternalChangeHandler,gn as createFileLogger,Ke as createLiveDerivedIndexExtension,yt as createMcpHttpHandler,nr as createOsProbe,P as createPersistenceExtension,T as createServer,Rn as createServerObserverExtension,pe as createStreamingErrorWriter,wi as createTestLogger,mi as describeStoredEmbeddingsKey,bn as detectClaudeDesktopPresence,Cn as detectGit,Me as detectProjectShape,hn as discoverLockDirs,le as discoverMarkdownlintConfig,Ct as emitPreflightFailureSpan,xr as encodeDocName,se as encodeFolderRoute,kt as encodeSkillRoute,Hr as ensureProjectGit,Ge as ensureProjectSkillGitignore,Sr as errorResponse,ae as evictStaleTrackerEntries,Vr as extractOkBinaryPath,Jt as extractWikiLinksFromMarkdown,Ht as fallbackPaths,cn as findEnclosingGitRoot,sr as findEnclosingProjectRoot,jt as findNativeMarkdownlintFile,hr as flushFileLogger,re as formatAuthRejectionWire,On as formatContributors,Sn as formatContributorsFrom,nt as formatPackRationale,or as gcCheckpointRefs,He as getCurrentMcpLogger,k as getLocalDir,Qn as getLogFilePath,Si as getLogger,En as getLogsDir,Gi as getMachineId,Rr as getMeter,$n as getMetrics,ar as getTracer,Dn as handleCollabSocketError,sn as handleSpawnCursor,ne as hasGcLogLatch,a as iconFromClientName,xn as incrementCollabSocketFilteredError,Bt as incrementServerObserverFire,m as initContent,Or as initShadowRepo,Dr as initTelemetry,Zt as initToleranceTelemetryWriter,Ln as installPrettyZodErrors,Ki as installTestLoggers,ti as installUserSkill,x as isAllowedApiOrigin,bi as isAllowedWorkspaceHostHeader,Tt as isConfigDoc,ve as isHocuspocusAuthRejectionReason,Ve as isKnownPackId,Ft as isLinkIndexExcludedDoc,w as isLoopbackAddress,Ue as isManagedArtifactDoc,s as isOrphanMode,v as isPairedWriteOrigin,Zn as isPathWithinDir,Ji as isProcessAlive,kr as isProjectRoot,pi as isProjectSkillManaged,f as isReservedForUserTree,be as isSelfWrite,fn as isSystemDoc,ii as isToleranceTelemetryEnabled,Oi as isValidLockPid,Ye as lastKnownHash,Pn as listRescueCheckpoints,G as listStarterPacks,Se as loadPrincipal,Wi as lockFilePath,Ti as loggerFactory,Fi as logsCurrentPath,xi as logsPreviousPath,tn as makeLazyEmbeddingsKeyStore,Vi as markServerLockDraining,Z as mountMcpAndApi,oi as normalizeFsPath,dt as originGitHubHost,mn as packageVersionMajorMinor,qe as parseAuthRejectionWire,Yr as parseGitVersion,_i as parseHocuspocusAuthToken,lt as parseKeepaliveConnectionId,yi as pathToDocName,A as planSeed,Gt as prepareSingleFileOpen,cr as processCommand,jr as processUsage,ot as readAllTargets,R as readBundleDecision,Et as readOwnNativeRules,Ai as readProcessLock,Bi as readProcessLockDetailed,gi as readProjectHeadState,An as readProjectLocalSemanticConfig,Ni as readServerLock,N as readServerPackageVersion,Pe as readSkillInstallStateSnapshot,en as readSkillManagement,Un as readStateManifest,Gn as readTargetRecordedAt,_ as readTargetVersion,on as readUiLock,ln as reconcile,Vt as recordContributor,ze as recordSkillInstallEvent,K as registerAllTools,C as registerWrite,Li as releaseProcessLock,Di as releaseServerLock,Xn as releaseUiLock,_t as removeLastKnownHash,qr as resetMetrics,e as resolveBundleEnabled,ie as resolveBundledSkillDir,ni as resolveContentDir,Gr as resolveCursorBinaryDefault,dn as resolveCursorSpawnInvocation,me as resolveEffectiveLinterConfig,st as resolveLockDir,Cr as resolveNativeConfigForDoc,It as resolveNativeMarkdownlintConfig,oe as resolvePack,Mr as resolvePackageVersion,wt as resolveUiInfo,Jr as restoreContributors,ui as restoreLifecycleFromConflictsJson,Yt as rewriteMarkdownLinksForDocumentRename,pr as rewriteWikiLinksForDocumentRename,X as runAuthReposSubprocess,ge as runAuthStatusSubprocess,vt as runCloneSubprocess,Tr as runDeviceFlowSubprocess,d as runWithMcpLogger,Fe as safeContentPath,li as safeSubdir,qt as safetyCheckpoint,mr as sanitizeClientName,dr as saveInMemoryCheckpoint,Pr as saveVersion,jn as seedBasenameIndex,lr as serializeError,Nn as setActiveSpanAttributes,Vn as setupServerObservers,an as shadowGit,Kt as shutdownTelemetry,si as skillManagementPath,Pi as spansCurrentPath,Ci as spansPreviousPath,yn as spawnDetached,_n as splitMarkdownBlocks,ee as startWatcher,ce as streamingProblemEvent,fi as swapContributors,Ze as teardownToleranceTelemetryWriter,Qe as toBroadcasterKey,$e as tracedAppendFileSync,D as tracedLinkSync,ei as tracedMkdir,at as tracedMkdirSync,L as tracedRename,M as tracedRenameSync,Ne as tracedRmSync,Wn as tracedRmdirSync,g as tracedUnlinkSync,zn as tracedWriteFile,Ce as tracedWriteFileSync,rn as untrackTrackedProjectSkillProjection,ft as updateLastKnownHash,Mi as updateProcessLockPort,zi as updateServerLockPort,Wr as updateUiLockPort,E as validateAgentId,te as validateCloneInputs,ye as validateSkillZip,Hi as waitForServerLockDrain,Te as withHiddenWindowsConsole,ur as withSpan,Nr as withSpanSync,Bn as writeBundleDecision,xt as writeMarkdownlintRule,Br as writeRootGitignoreForNewRepo,et as writeSkillManagement,h as writeStateManifest,we as writeTargetVersion,St as writeTracker};
@@ -0,0 +1,21 @@
1
+ import{o as e}from"./chunk-DTipWd-i.mjs";import{F as t,Jo as n,P as r}from"./src-S2yxN8_s.mjs";import{Mr as i,Tr as a,et as o,fa as s,ka as c,la as l,nn as u,nt as d,rt as f,tt as ee}from"./src-up-FAzhh.mjs";import{b as p,u as m,v as h,y as g}from"./server-lock-D46oe4zF.mjs";import{t as _}from"./yazl-BucAN8Ez.mjs";import{t as v}from"./esm-EvSEzE_V.mjs";import"./gh-detect-Cdvn1Wl3.mjs";import{E as y,S as te,T as b,_ as x,b as ne,o as re,v as ie,w as S}from"./init-BstDp_v4.mjs";import{n as C}from"./constants-0O0dVRLJ.mjs";import{t as ae}from"./is-object-DYBErO9v.mjs";import{_ as oe,d as w,i as se,v as ce}from"./write-project-skill-D3N9lJbe.mjs";import"./loader-l_BC7vjs.mjs";import{c as T}from"./colors-B_qgKwrk.mjs";import"./preview-B7BjNEAS.mjs";import{execSync as E,spawnSync as D}from"node:child_process";import{basename as O,dirname as k,isAbsolute as le,join as A,relative as ue,resolve as j,sep as de}from"node:path";import{cpSync as fe,createWriteStream as pe,existsSync as M,lstatSync as me,mkdirSync as N,mkdtempSync as he,readFileSync as P,readdirSync as F,readlinkSync as ge,rmSync as I,statSync as _e,writeFileSync as L}from"node:fs";import{arch as ve,freemem as ye,homedir as be,hostname as xe,platform as Se,release as Ce,tmpdir as we,totalmem as Te,type as Ee,uptime as De}from"node:os";import{realpath as R}from"node:fs/promises";import{createHash as z}from"node:crypto";const Oe=[{name:`macos-home-path`,regex:/\/Users\/[^/]+\//g,replacement:`~/`},{name:`linux-home-path`,regex:/\/home\/[^/]+\//g,replacement:`~/`},{name:`github-pat`,regex:/\b(ghp_|gho_|ghu_|ghs_|ghr_)[A-Za-z0-9]{36,}\b/g,replacement:`[REDACTED-GH-PAT]`},{name:`aws-access-key`,regex:/\b(AKIA|ASIA|ABIA)[A-Z2-7]{16}\b/g,replacement:`[REDACTED-AWS-KEY]`},{name:`anthropic-key`,regex:/\bsk-ant-api03-[A-Za-z0-9_-]{20,}\b/g,replacement:`[REDACTED-ANTHROPIC]`},{name:`openai-key`,regex:/\bsk-[A-Za-z0-9]{20,}\b/g,replacement:`[REDACTED-OPENAI]`},{name:`bearer-token`,regex:/([Aa]uthorization:\s*[Bb]earer\s+)\S+/g,replacement:`$1[REDACTED]`},{name:`jwt`,regex:/eyJ[A-Za-z0-9_-]{8,}\.eyJ[A-Za-z0-9_-]{8,}\.[A-Za-z0-9_-]{8,}/g,replacement:`[REDACTED-JWT]`},{name:`url-credentials`,regex:/:\/\/[^/\s:@]+:[^/\s:@]+@/g,replacement:`://[REDACTED]@`}],ke=Oe.map(e=>e.name);function B(e){let t=new Set,n=0;return{redacted:e.split(`
2
+ `).map(e=>{let r=e;for(let{name:e,regex:i,replacement:a}of Oe)i.lastIndex=0,i.test(r)&&(t.add(e),n++,i.lastIndex=0,r=r.replace(i,a));return r}).join(`
3
+ `),patterns:[...t],lineCount:n}}function Ae(){return A(be(),`.ok`,`bug-reports`)}function je(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`);return A(Ae(),`${t}-bugreport.zip`)}function Me(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let e=P(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return M(A(e,`.ok`))?z(`sha256`).update(j(e)).digest(`hex`).slice(0,12):null}function Ne(){let e={timestamp:new Date().toISOString(),platform:Se(),osType:Ee(),osRelease:Ce(),hostname:`[redacted]`,uptime:De(),freeMem:ye(),totalMem:Te(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=E(`sw_vers -productVersion 2>/dev/null`,i({encoding:`utf8`})).trim()}catch{}try{let t=A(__dirname,`..`,`..`,`package.json`);M(t)&&(e.okVersion=JSON.parse(P(t,`utf8`)).version)}catch{}return e}function Pe(e,t){if(!M(t))return{files:[]};let n=F(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>A(t,e));if(e&&n.length>0){let t=n.filter(t=>{try{return P(t,`utf8`).includes(`"project":"${e}"`)}catch{return!0}});t.length>0&&(n=t)}return{files:n}}function Fe(e){let t=A(e,`.ok`,`local`);return M(t)?{files:[`server.lock`,`last-spawn-error.log`,r].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Ie(e){let t=A(e,`.ok`,`local`,`logs`);return M(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>A(t,e)).filter(e=>M(e))}:{files:[]}}function Le(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=B(e.content);e.zipfile.addBuffer(Buffer.from(t,`utf8`),e.name),e.bundleFiles.push(e.name),n.length>0&&e.redactions.push({file:e.name,lineCount:r,patterns:n})}else e.zipfile.addBuffer(Buffer.from(e.content,`utf8`),e.name),e.bundleFiles.push(e.name)}function V(e){for(let t of e.files)try{Le({zipfile:e.zipfile,name:`${e.prefix}/${O(t)}`,content:P(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n instanceof Error?n.message:String(n)},`bug-report: skipped unreadable file`)}}async function Re(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??A(be(),`.ok`,`logs`),o=t.projectDir?Me(t.projectDir,i):null;N(k(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Ne();s.desktop=t.desktop??null;let{files:c}=Pe(o,a),{files:l}=t.projectDir?Fe(t.projectDir):{files:[]},{files:u}=t.projectDir?Ie(t.projectDir):{files:[]};i?.info({logFileCount:c.length,lockFileCount:l.length,localSinkFileCount:u.length},`files collected`);let d=[],f=[],{ZipFile:ee}=await import(`./yazl-DvlathRc.mjs`).then(t=>e(t.default,1)),p=new ee;V({zipfile:p,files:c,prefix:`logs`,redact:n,bundleFiles:f,redactions:d,logger:i}),V({zipfile:p,files:l,prefix:`lockdir`,redact:n,bundleFiles:f,redactions:d,logger:i}),V({zipfile:p,files:u,prefix:`local-logs`,redact:n,bundleFiles:f,redactions:d,logger:i});for(let e of t.extraFiles??[])try{let t=P(e.sourcePath),n=`extra/${e.zipName??O(e.sourcePath)}`;p.addBuffer(t,n),f.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&Le({zipfile:p,name:`note.txt`,content:t.note,redact:n,bundleFiles:f,redactions:d});let m=JSON.stringify(s,null,2);p.addBuffer(Buffer.from(m,`utf8`),`sysinfo.json`),f.push(`sysinfo.json`);let h={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:o,files:f,redactions:d,sysinfo:s};p.addBuffer(Buffer.from(JSON.stringify(h,null,2),`utf8`),`MANIFEST.json`);let g=d.reduce((e,t)=>e+t.lineCount,0),_=[`# Bug Report Bundle`,``,`Generated: ${h.generatedAt}`,`Project: ${o??`(unscoped)`}`,`Discipline version: ${h.disciplineVersion}`,``,`## Contents`,``,...f.map(e=>`- ${e}`),``,`## Privacy`,``,...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${ke.join(`, `)}`,g>0?`${g} line(s) were scrubbed across ${d.length} file(s).`:`No redactions were needed.`,`See MANIFEST.json for the full redaction audit report.`,``,`This bundle is safe to attach to a GitHub issue.`]:[`Redaction was disabled for this bundle; file contents are unmodified.`]].join(`
4
+ `);p.addBuffer(Buffer.from(_,`utf8`),`README.md`),p.end();let v=pe(r);return p.outputStream.pipe(v),await new Promise((e,t)=>{v.on(`close`,e),v.on(`error`,t)}),i?.info({bundlePath:r,fileCount:f.length,redactionCount:g},`bundle written`),{zipPath:r,summary:{projectSlug:o,files:f,redactions:d,redactedLineCount:g,generatedAt:h.generatedAt}}}var H=n(),ze=e(_(),1);const Be=new Set([`doc.name`,`currentDoc`]);function Ve(e){return`doc:${z(`sha256`).update(e).digest(`hex`).slice(0,8)}`}function He(e,t,n){let r=e.docNameMap[n];if(r===void 0){e.docNameMap[n]=t;return}if(r===t)return;let i=e.docNameCollisions[n];i?i.includes(t)||i.push(t):e.docNameCollisions[n]=[t]}function Ue(e,t){let n=t.originalToHashed.get(e);if(n!==void 0)return n;let r=Ve(e);return t.originalToHashed.set(e,r),He(t,e,r),r}function U(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function W(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function G(e,t){if(typeof e==`string`)return U(e,t.contentDir);if(Array.isArray(e))return e.map(e=>G(e,t));if(!W(e))return e;let n=typeof e.key==`string`&&Be.has(e.key)&&W(e.value)&&typeof e.value.stringValue==`string`?e.value.stringValue:null,r={};for(let[i,a]of Object.entries(e))if(n!==null&&i===`value`&&W(a)){let e=Ue(n,t);r[i]={...a,stringValue:e}}else Be.has(i)&&typeof a==`string`?r[i]=Ue(a,t):r[i]=G(a,t);return r}function We(e,t){if(t.originalToHashed.size===0)return e;let n=Array.from(t.originalToHashed.entries()).sort(([e],[t])=>t.length-e.length),r=e;for(let[e,t]of n)e.length!==0&&r.includes(e)&&(r=r.split(e).join(t));return r}function Ge(e,t){let n=P(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
5
+ `),i=n.split(`
6
+ `),a=[];for(let e=0;e<i.length;e++){let n=i[e]??``;if(!(e===i.length-1&&n===``)){if(n.length===0){a.push(``);continue}try{let e=G(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}L(e,r?`${a.join(`
7
+ `)}\n`:a.join(`
8
+ `))}function Ke(e,t){let n=P(e,`utf-8`);if(n.trim().length!==0)try{let r=G(JSON.parse(n),t),i=n.endsWith(`
9
+ `)?`
10
+ `:``;L(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=We(U(n,t.contentDir),t);r!==n&&L(e,r)}}function qe(e,t){let n=P(e,`utf-8`),r=U(n,t.contentDir);r!==n&&L(e,r)}function Je(e){try{return F(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>A(e,t.name))}catch{return[]}}const Ye=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function Xe(e){let t={contentDir:e.contentDir,docNameMap:{},originalToHashed:new Map,docNameCollisions:{}};for(let n of[`telemetry`,`logs`,`process`])for(let r of Je(A(e.stagingDir,n)))r.endsWith(`.jsonl`)?Ge(r,t):r.endsWith(`.json`)?Ke(r,t):qe(r,t);for(let n of Je(A(e.stagingDir,`state`))){let e=O(n);Ye.has(e)?Ke(n,t):qe(n,t)}return{docNameMap:t.docNameMap,docNameCollisions:t.docNameCollisions}}const Ze=[`.ok`,`local`,`telemetry`],Qe=[`.ok`,`local`,`logs`],$e=`spans-current.jsonl`,et=`spans-prev.jsonl`,tt=`server-current.jsonl`,nt=`server-prev.jsonl`;function rt(e){return A(e,...Ze,$e)}function it(e){return A(e,...Ze,et)}function at(e){return A(e,...Qe,tt)}function ot(e){return A(e,...Qe,nt)}const st=1e3;async function ct(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(st)});return t.ok?await t.text():null}catch{return null}}async function lt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(st)});return t.ok?await t.text():null}catch{return null}}function ut(e){let t=A(e,`.git`,`ok`);if(!M(t))return null;let n=D(`git`,[`-C`,t,`log`,`--oneline`,`-50`],i({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function dt(e){let t=A(e,`.git`,`ok`);if(!M(t))return null;let n=D(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],i({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function ft(){let e=process.env.OK_DESKTOP_VERSION,t=process.env.OK_DESKTOP_PACKAGED,n=process.env.OK_DESKTOP_CHANNEL;return e===void 0||t===void 0||n===void 0?null:{electronVersion:e,packaged:t===`1`||t.toLowerCase()===`true`,channel:n}}function pt(){return{nodeVersion:process.version,platform:Se(),arch:ve()}}function mt(){return process.env.OTEL_SDK_DISABLED===`false`}function K(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function ht(e){if(!M(e))return{};let t;try{t=(0,H.parse)(P(e,`utf-8`))}catch(t){return console.warn(`[ok diagnose bundle] failed to parse ${e} for manifest config; manifest will report schema defaults. Reason: ${t instanceof Error?t.message:String(t)}`),{}}if(!K(t))return{};let n=t.telemetry;if(!K(n))return{};let r=n.localSink;return K(r)?r:{}}function gt(e){return typeof e==`boolean`?e:void 0}function _t(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function q(e){if(K(e))return _t(e.maxBytes)}function vt(e){let t=ht(l(`project`,e)),n=ht(l(`project-local`,e));return{enabled:gt(n.enabled)??gt(t.enabled)??!0,spansMaxBytes:q(n.spans)??q(t.spans)??52428800,logsMaxBytes:q(n.logs)??q(t.logs)??26214400}}function yt(e){return z(`sha256`).update(e).digest(`hex`)}function bt(e){let t=P(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function xt(e){let t=P(e,`utf-8`),n=`"doc.name"`,r=0,i=t.indexOf(n);for(;i!==-1;)r++,i=t.indexOf(n,i+10);return r}function J(e,t){return M(e)?(N(k(t),{recursive:!0}),fe(e,t),!0):!1}function St(e){let t=[],n=e=>{let r=F(e,{withFileTypes:!0});for(let i of r){let r=A(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Ct=new Set([`.jsonl`]);function wt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Ct.has(e.slice(t))}const Tt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function Et(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Tt.has(e.slice(t))}function Dt(e){let t=[];for(let n of St(e)){let r=Ot(e,n);if(!Et(r))continue;let{redacted:i,patterns:a,lineCount:o}=B(P(n,`utf-8`));a.length!==0&&(L(n,i),t.push({file:r,lineCount:o,patterns:a}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Ot(e,t){return ue(e,t).split(de).join(`/`)}async function kt(e){let n=j(e.contentDir),i=j(e.projectDir??e.contentDir),a=e.deps??{},o=a.fetchAgentPresence??ct,s=a.fetchAgentEffects??lt,c=a.readShadowHead??ut,l=a.readCheckpointRefs??dt,u=a.now??(()=>new Date),d=a.okVersion??(()=>C),f=a.readDesktopEnv??ft,ee=a.readRuntime??pt,p=a.isOtlpPushEnabled??mt,m=he(A(we(),`ok-bundle-`));try{N(A(m,`telemetry`),{recursive:!0}),N(A(m,`logs`),{recursive:!0}),N(A(m,`state`),{recursive:!0}),J(rt(i),A(m,`telemetry`,$e)),J(it(i),A(m,`telemetry`,et)),J(at(i),A(m,`logs`,tt)),J(ot(i),A(m,`logs`,nt));let h=A(i,`.ok`,`local`),g=A(h,`server.lock`),_=`not-running`,v=`no server.lock`,y=null;if(M(g)){J(g,A(m,`state`,`server.lock`));try{let e=P(g,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?y=t.port:v=`lock present but no port`}catch{v=`lock present but unparseable`}}if(y!==null){let e=await o(y);e===null?v=`agent-presence endpoint at :${y} unreachable`:(L(A(m,`state`,`agent-presence.json`),e),_=`running`,v=``);let t=await s(y);t!==null&&L(A(m,`state`,`agent-effects.json`),t)}let te=c(n);te!==null&&L(A(m,`state`,`shadow-head.txt`),te);let b=l(n);b!==null&&L(A(m,`state`,`checkpoint-refs.txt`),b),J(A(h,`last-spawn-error.log`),A(m,`state`,`last-spawn-error.log`)),J(A(h,t),A(m,`state`,t)),J(A(h,r),A(m,`state`,r));let x=ee(),ne=f(),re={ok:{version:d(),nodeVersion:x.nodeVersion,platform:x.platform,arch:x.arch},host:{desktop:ne}};L(A(m,`state`,`runtime.json`),`${JSON.stringify(re,null,2)}\n`);let ie=_===`running`?`running
11
+ `:`not-running (${v})\n`;if(L(A(m,`state`,`server-status.txt`),ie),e.processDir&&M(e.processDir)){let t=A(m,`process`);N(t,{recursive:!0}),fe(e.processDir,t,{recursive:!0})}let S=null;e.redact===!0&&(S=Xe({stagingDir:m,contentDir:n})),e.note&&L(A(m,`note.txt`),e.note);let C=null;e.scrubSecrets===!0&&(C=Dt(m));for(let t of e.extraFiles??[])J(t.sourcePath,A(m,`extra`,t.zipName??O(t.sourcePath)))||a.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let ae=vt(i),oe=St(m),w=[],se=0,ce=0;for(let e of oe){let t=Ot(m,e),n=_e(e).size,r=wt(t)?bt(e):0;w.push({path:t,bytes:n,lines:r}),se+=n,t.startsWith(`telemetry/`)&&wt(t)&&(ce+=xt(e))}let T=S===null?{applied:!1,docNameMapSidecar:null}:Object.keys(S.docNameCollisions).length>0?{applied:!0,docNameMapSidecar:null,docNameCollisions:S.docNameCollisions}:{applied:!0,docNameMapSidecar:null};C!==null&&(T.secretScrub=C);let E={schemaVersion:1,createdAt:u().toISOString(),ok:{version:d(),nodeVersion:x.nodeVersion,platform:x.platform,arch:x.arch},host:{desktop:ne},contentDir:{pathSha256:yt(n),absolutePath:S===null?n:`<CONTENT_DIR>`},telemetry:{localSink:ae,otlpPushEnabled:p()},redaction:T,serverStatus:_,files:w};L(A(m,`manifest.json`),`${JSON.stringify(E,null,2)}\n`);let D=oe.some(e=>{try{return P(e,`utf-8`).includes(n)}catch{return!1}}),k={totalBytes:se,fileCount:w.length,docNameCount:ce,contentDirVisible:D,redacted:S!==null},le=!1;return{stagingDir:m,manifest:E,summary:k,redactionMapPayload:S===null?null:{docNameMap:S.docNameMap,docNameCollisions:S.docNameCollisions},cleanup:()=>{le||(le=!0,I(m,{recursive:!0,force:!0}))}}}catch(e){throw I(m,{recursive:!0,force:!0}),e}}async function At(e){let{collected:t,outputPath:n}=e,r=k(n);if(!M(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);if(t.redactionMapPayload!==null){let e=`${O(n,`.zip`)}.docnames.json`,r={...t.manifest,redaction:{...t.manifest.redaction,applied:!0,docNameMapSidecar:e}};L(A(t.stagingDir,`manifest.json`),`${JSON.stringify(r,null,2)}\n`)}let i=new ze.ZipFile,a=St(t.stagingDir);for(let e of a){let n=Ot(t.stagingDir,e);i.addFile(e,n)}i.end(),t.redactionMapPayload!==null&&L(A(r,`${O(n,`.zip`)}.docnames.json`),`${JSON.stringify({docNameMap:t.redactionMapPayload.docNameMap,docNameCollisions:t.redactionMapPayload.docNameCollisions},null,2)}\n`,{mode:384});let o=pe(n);return i.outputStream.pipe(o),await new Promise((e,t)=>{o.on(`close`,e),o.on(`error`,t),i.outputStream.on(`error`,t)}),n}function jt(e,t){let n=A(e,`.ok`,`config.yml`);if(M(n))try{let t=(0,H.parse)(P(n,`utf-8`)),r=ae(t)?t.content:void 0,i=ae(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return j(e,i)}catch(e){t?.warn({configPath:n,err:e instanceof Error?e.message:String(e)},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return j(e)}async function Mt(e,t,n){let r=await kt({contentDir:jt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,deps:{readDesktopEnv:n,logger:e.logger}});try{N(k(e.outputPath),{recursive:!0}),await At({collected:r,outputPath:e.outputPath});let n=r.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:Me(t,e.logger),files:r.manifest.files.map(e=>e.path),redactions:n?.redactions??[],redactedLineCount:n?.redactedLineCount??0,generatedAt:r.manifest.createdAt}}}finally{r.cleanup()}}async function Nt(e){let{projectDir:t}=e,n=e.readDesktopEnv??ft;if(e.level===`full`&&t!==void 0)return Mt(e,t,n);let{zipPath:r,summary:i}=await Re({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n()});return{zipPath:r,summary:{level:e.level,systemWide:t===void 0,projectSlug:i.projectSlug,files:i.files,redactions:i.redactions,redactedLineCount:i.redactedLineCount,generatedAt:i.generatedAt}}}function Y(e,t,n={}){let r=m(e,t);if(!M(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(P(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!p(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??g)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??h())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??xe();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function Pt(e){return e.replace(/:\d+$/,``)}function Ft(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Pt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Pt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Pt(e[1]),owner:e[2],name:e[3]}}{let e=/^(?:[\w.-]+@)?([\w.-]+):([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e?.[1].includes(`.`)||e&&t.startsWith(`git@`))return{protocol:`ssh`,hostname:e[1],owner:e[2],name:e[3]}}{let e=/^git:([\w.-]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:e[1],owner:e[2],name:e[3]}}if(!t.includes(`://`)&&!t.includes(`@`)&&!t.startsWith(`/`)){let e=/^([\w.-]+)\/([\w.\-~%]+?)(?:\.git)?$/.exec(t);if(e)return{protocol:`https`,hostname:`github.com`,owner:e[1],name:e[2]}}return null}function It(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`).filter(e=>e.length>0);if(n.length<5||n[2]!==`blob`)return null;let r,i,a,o;try{r=decodeURIComponent(n[0]),i=decodeURIComponent(n[1]),a=decodeURIComponent(n[3]),o=n.slice(4).map(e=>decodeURIComponent(e))}catch{return null}return!r||!i||!a||o.length===0||o.some(e=>e.length===0)?null:{owner:r,repo:i,branch:a,path:o.join(`/`)}}function Lt(e){let t;try{t=new URL(e)}catch{return null}if(t.hostname!==`github.com`&&t.hostname!==`www.github.com`)return null;let n=t.pathname.split(`/`);if(n.length<5||n[0]!==``||n[3]!==`tree`)return null;let r=n.slice(5);r.length===1&&r[0]===``&&r.pop();let i,a,o,s;try{i=decodeURIComponent(n[1]),a=decodeURIComponent(n[2]),o=decodeURIComponent(n[4]),s=r.map(e=>decodeURIComponent(e))}catch{return null}return!i||!a||!o||s.some(e=>e.length===0)?null:{owner:i,repo:a,branch:o,path:s.join(`/`)}}function Rt(e){let t=It(e);if(t)return{kind:`doc`,...t};let n=Lt(e);return n?{kind:`folder`,...n}:null}var X=e(T(),1);const zt=`# >>> open-knowledge cli >>>`,Bt=`# <<< open-knowledge cli <<<`,Vt=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Ht(e){return A(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Ut={existsSync:e=>M(e),readFileSync:(e,t)=>P(e,t),lstatSync:e=>me(e),readlinkSync:e=>ge(e)};function Wt(e,t=Ut){let n=Ht(e);if(!t.existsSync(n))return null;try{let e=JSON.parse(t.readFileSync(n,`utf8`));return e?.version===1?e:null}catch{return null}}function Gt(e){let t=e.replace(Vt,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function Kt(e,t,n=Ut){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function qt(e){return oe(e)||ce(e)||te(e)}const Jt=10*1024*1024;function Yt(e,t,n,r){let i=re(e,t,n,r);if(i.kind===`absent`||i.kind===`no-entry`)return{kind:`not-present`};if(i.kind===`decline`)return{kind:`declined`,reason:i.reason};if(!qt(i.entry))return{kind:`left-foreign`};let a;try{a=r??e.configPath(t,n)}catch{return{kind:`not-present`}}let o=e.serverName(t);return e.format===`file`?(I(a,{force:!0}),{kind:`removed`}):e.format===`toml`?Qt(a,o):e.format===`yaml`?Zt(a,e.topLevelKey,o):Xt(a,e.topLevelKey,e.serverMapSubKey,o)}function Xt(e,t,n,r){let i;try{i=P(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>Jt)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=y(i,x(t,n,r));return o?(s(e,a,{mode:S(e)}),{kind:`removed`}):{kind:`not-present`}}function Zt(e,t,n){let r;try{r=P(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>Jt)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,H.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let c=[t,n];if(!o.hasIn(c))return{kind:`not-present`};o.deleteIn(c);let l=o.toString(),u=b(a);a.trim()===``||a.endsWith(`
12
+ `)?l.endsWith(`
13
+ `)||(l=`${l}\n`):l=l.replace(/\n+$/,``),u&&(l=l.replace(/\r\n/g,`
14
+ `).replace(/\n/g,`\r
15
+ `));let d=`${i?``:``}${l}`;return d!==r&&s(e,d,{mode:S(e)}),{kind:`removed`}}function Qt(e,t){let n=ne();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=P(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=b(a),c=a.trim()===``||a.endsWith(`
16
+ `),l;try{l=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!l.existed)return{kind:`not-present`};let u=l.text;c?u.endsWith(`
17
+ `)||(u=`${u}\n`):u=u.replace(/\n+$/,``),o&&(u=u.replace(/\r\n/g,`
18
+ `).replace(/\n/g,`\r
19
+ `));let d=`${i?``:``}${u}`;return d!==r&&s(e,d,{mode:S(e)}),{kind:`removed`}}const $t=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function en(e,t,n=u){if(e!==void 0&&!$t.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let tn=null;function nn(e){tn=e}function rn(){return tn??process.cwd()}function an(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function on(e,t=Date.now()){let n=new Date(e).getTime();if(Number.isNaN(n))return`—`;let r=t-n,i=Math.floor(r/1e3);if(i<60)return`${i}s`;let a=Math.floor(i/60);if(a<60)return`${a}m ago`;let o=Math.floor(a/60);return o<24?`${o}h ago`:`${Math.floor(o/24)}d ago`}function sn(e,t,n,r,i,a){if(t.status===`missing`||t.status===`corrupt`)return null;let o=t.lock,s=null;if(n.status!==`missing`&&n.status!==`corrupt`){let e=n.lock;s={port:e.port,status:n.status,pid:e.pid,startedAt:e.startedAt,usage:a}}return{directory:o.worktreeRoot,server:{port:o.port,status:t.status,pid:o.pid,startedAt:o.startedAt,usage:i},ui:s,hostname:o.hostname,lockPath:t.lockPath,binary:r==null?null:ee(r),command:r,isDesktop:an(r)}}function cn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Z(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&cn(e)?`ui-orphan`:`stale`}const ln=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function un(e){switch(e){case`running`:return X.default.green(e);case`desktop`:return X.default.blue(e);case`foreign`:return X.default.cyan(e);case`ui-orphan`:return X.default.magenta(e);case`stale`:return X.default.yellow(e)}}function dn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function fn(e){return`${dn(e.server.usage)} | ${dn(e.ui?.usage??null)}`}function pn(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function mn(e){if(e.length===0)return`No open-knowledge servers found.`;let t=[`DIRECTORY`,`PORTS (API/UI)`,`CPU/MEM (API | UI)`,`STATUS`,`PID`,`STARTED`,`BINARY`],n=e.map(e=>{let t=Z(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,pn(e),fn(e),t,String(n),on(e.server.startedAt),e.binary??`—`]}),r=t.length,i=t.map(e=>e.length);for(let e of n)for(let t=0;t<r;t++)i[t]=Math.max(i[t]??0,(e[t]??``).length);let a=t.map((e,t)=>e.padEnd(i[t]??0)).join(` `).trimEnd(),o=e.map((e,t)=>{let a=n[t]??[],o=[];for(let t=0;t<r;t++){let n=(a[t]??``).padEnd(i[t]??0);if(t===3){let r=a[t]??``;n=un(Z(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=X.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
20
+ `)}async function hn(e={}){let t=e.discover??o,n=e.inspect??Y,r=e.log??(e=>console.log(e)),i=e.resolveCommand??d,a=e.resolveUsage??f,s=await t(),c=[];for(let e of s){let t=n(e,`server`),r=n(e,`ui`),o=sn(e,t,r,t.status===`missing`||t.status===`corrupt`?null:i(t.lock.pid),t.status===`missing`||t.status===`corrupt`?null:a(t.lock.pid),r.status===`missing`||r.status===`corrupt`?null:a(r.lock.pid));o!=null&&c.push(o)}if(e.json){let e=c.map(e=>({...e,displayStatus:Z(e)}));r(JSON.stringify(e,null,2));return}r(mn(e.all?c:c.filter(e=>ln.has(Z(e)))))}function gn(){return new v(`ps`).description(`List all running open-knowledge servers`).argument(`[modifier]`,`"all" to include stale (dead-pid) entries`).option(`--all`,`Include stale (dead-pid) entries (foreign-host shows by default)`).option(`--json`,`Emit structured JSON (always includes all statuses)`).action(async(e,t)=>{await hn({all:t.all===!0||e===`all`,json:t.json===!0})})}function _n(e,t,n={}){let r=n.isAlive??g,i=[];for(let[n,a]of[[`server`,e],[`ui`,t]])(a.status===`alive`||a.status===`foreign-host`&&r(a.lock.pid))&&i.push({name:n,pid:a.lock.pid,port:a.lock.port});return{targets:i}}function Q(e){let t=e.inspect??(t=>Y(e.lockDir,t)),n=e.kill??((e,t)=>process.kill(e,t)),r=e.log??(e=>console.log(e)),i=e.error??(e=>console.error(e)),a=_n(t(`server`),t(`ui`),{isAlive:e.isAlive});if(a.targets.length===0)return r(`No running open-knowledge processes.`),{stopped:[],failed:[],hadTargets:!1};let o=[],s=[];for(let e of a.targets)try{n(e.pid,`SIGTERM`),o.push(e)}catch(t){s.push({target:e,error:t instanceof Error?t.message:String(t)})}return o.length>0&&r(`Stopped: ${o.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `)}`),s.length>0&&i(`Failed to stop: ${s.map(({target:e,error:t})=>`${e.name} (pid=${e.pid}): ${t}`).join(`; `)}`),{stopped:o,failed:s,hadTargets:!0}}function $(e,t){return e.status===`alive`?!0:e.status===`foreign-host`?t(e.lock.pid):!1}async function vn(e,t=g){let n=await o(),r=null;for(let i of n){let n=Y(i,`server`),a=Y(i,`ui`);if($(n,t)&&n.lock.port===e||$(a,t)&&a.lock.port===e)return i;r===null&&($(n,t)&&n.lock.pid===e||$(a,t)&&a.lock.pid===e)&&(r=i)}return r}function yn(e){let t=Q({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function bn(e){return new v(`stop`).description(`Stop open-knowledge server(s). With no argument: stops the server for the current directory. Pass a port number, a directory path, or "all" to target globally.`).argument(`[target...]`,`port number, directory path (spaces OK), or "all"`).action(async t=>{let n=t.length===0?void 0:t.join(` `);if(n===void 0){e();let t=Q({lockDir:a(process.cwd()),log:()=>{}});if(t.hadTargets){if(t.stopped.length>0){let e=t.stopped.map(e=>`${e.name} (pid=${e.pid}, port=${e.port})`).join(`, `);console.log(`Stopped: ${e}`)}t.failed.length>0&&(process.exitCode=1)}else await hn({});return}if(n===`all`){let e=await o();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Y(n,`server`),r=Y(n,`ui`);!$(e,g)&&!$(r,g)||(yn(n),t++)}t===0&&console.log(`No running open-knowledge servers found.`);return}if(/^\d+$/.test(n)){let e=Number.parseInt(n,10),t=await vn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}yn(t);return}yn(a(j(rn(),n)))})}function xn(e){return{event:`mcp-config-decline`,scope:e.scope,surface:e.surface,editorId:e.editorId,reason:e.reason}}async function Sn(e,t){let n,r;try{n=await R(j(e)),r=await R(j(k(e)))}catch{return{kind:`not-git`}}if(!Cn(n,r))return{kind:`symlink-escape`};let i=A(n,`.git`),a;try{a=_e(i)}catch{return{kind:`not-git`}}if(a.isDirectory()){let e;try{e=await R(i)}catch{return{kind:`not-git`}}if(!Cn(e,n))return{kind:`symlink-escape`}}else if(!a.isFile())return{kind:`not-git`};let o=c(n);if(o.kind!==`repository`)return{kind:`not-git`};let s=o.repository.readRemoteUrl(`origin`);if(s.kind===`unreadable`)return{kind:`not-git`};if(s.kind===`absent`)return s.reason===`config-missing`?{kind:`not-git`}:{kind:`no-origin`};let l=s.url,u=Ft(l);if(u===null||u.hostname!==`github.com`)return{kind:`non-github`};let d=u.owner.toLowerCase()===t.owner.toLowerCase(),f=u.name.toLowerCase()===t.repo.toLowerCase();return!d||!f?{kind:`wrong-repo`,actualOwner:u.owner,actualRepo:u.name}:{kind:`ok`,gitRemoteUrl:`https://github.com/${u.owner}/${u.name}.git`}}function Cn(e,t){if(e===t)return!0;let n=ue(t,e);return n.length>0&&!n.startsWith(`..`)&&!le(n)}const wn=[{id:`mcp-config`,write(e,t,n){let r=e.projectConfigPath?.(t);if(!r)return{integration:`mcp-config`,editorId:e.id,action:`skipped-unsupported`};try{let i=ie(e,t,n,void 0,r);return i.action===`written`||i.action===`overwritten`?{integration:`mcp-config`,editorId:e.id,action:i.action,path:i.configPath}:i.action===`failed`?{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:i.error??`unknown failure`}:i.action===`declined`?{integration:`mcp-config`,editorId:e.id,action:`declined`,path:i.configPath,...i.declineReason===void 0?{}:{reason:i.declineReason}}:{integration:`mcp-config`,editorId:e.id,action:`failed`,path:i.configPath,error:`unexpected project-scope action: ${i.action}`}}catch(t){return{integration:`mcp-config`,editorId:e.id,action:`failed`,path:r,error:t instanceof Error?t.message:String(t)}}}},{id:`project-skill`,write(e,t,n){try{let r=se(e,t,{home:n.home});return{integration:`project-skill`,editorId:e.id,action:r.action,...r.path?{path:r.path}:{},...r.error?{error:r.error}:{}}}catch(t){return{integration:`project-skill`,editorId:e.id,action:`failed`,error:t instanceof Error?t.message:String(t)}}}}];function Tn(e,t,n={},r=wn){let i=[];for(let a of t){let t=w[a];for(let a of r)i.push(a.write(t,e,n))}return i}function En(e,t,n={}){return{integrations:Tn(e,t,n)}}export{Nt as C,B as D,je as E,Y as S,At as T,Gt as _,bn as a,Lt as b,nn as c,zt as d,Vt as f,Wt as g,Ht as h,Q as i,en as l,Kt as m,Sn as n,gn as o,Bt as p,xn as r,rn as s,En as t,Yt as u,It as v,kt as w,Ft as x,Rt as y};
21
+ //# sourceMappingURL=src-g3nRJry6.mjs.map