@inkeep/open-knowledge 0.48.7 → 0.48.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{acp-harness-probe-Chugrp3s.mjs → acp-harness-probe-DBdQYHRX.mjs} +2 -2
- package/dist/cli.mjs +7 -7
- package/dist/constants-BeUu14cN.mjs +2 -0
- package/dist/index.mjs +1 -1
- package/dist/init-Drdm71ex.mjs +1 -0
- package/dist/{init-COLzs6hM.mjs → init-pDLhMu3u.mjs} +3 -3
- package/dist/{launch-json-removal-Bun3zPs6.mjs → launch-json-removal-DE_-Ww53.mjs} +2 -2
- package/dist/loader-Dl8VR-rH.mjs +1 -0
- package/dist/{loader-Dgw1g_Ti.mjs → loader-Tnvmv5P5.mjs} +2 -2
- package/dist/{open-browser-svTSfejY.mjs → open-browser-DAPyP3Fq.mjs} +2 -2
- package/dist/preview-DJGWCirS.mjs +1 -0
- package/dist/{preview-C_DAzb62.mjs → preview-aa7v0U7S.mjs} +2 -2
- package/dist/{repair-launch-json-UMBnOPpo.mjs → repair-launch-json-T0HZhyvo.mjs} +2 -2
- package/dist/{repair-mcp-configs-9H3v3dyr.mjs → repair-mcp-configs-Cg08-kCm.mjs} +2 -2
- package/dist/repair-skills-DNC6qLQ6.mjs +1 -0
- package/dist/{repair-skills-QLgUXS7O.mjs → repair-skills-y_pZk48z.mjs} +2 -2
- package/dist/{skill-teardown-Cj1-Y6iS.mjs → skill-teardown-DLiJoeFc.mjs} +2 -2
- package/dist/{src-DIjYfcIb.mjs → src-DGg3BDMz.mjs} +1 -1
- package/dist/{src-DoSxfvJP.mjs → src-DheM9mHj.mjs} +375 -375
- package/dist/{src-CEyPEPBQ.mjs → src-b0z8MvS5.mjs} +2 -2
- package/dist/{start-BcIym5Af.mjs → start-CV7wEZ2G.mjs} +3 -3
- package/dist/start-Co1R6Dh9.mjs +1 -0
- package/dist/{write-project-skill-B77kdJNQ.mjs → write-project-skill-DXCs8P98.mjs} +2 -2
- package/package.json +4 -4
- package/dist/constants-DKWcDM2v.mjs +0 -2
- package/dist/init-Bu-eRwu6.mjs +0 -1
- package/dist/loader-D2uGveKQ.mjs +0 -1
- package/dist/preview-BnET51um.mjs +0 -1
- package/dist/repair-skills-DHPneNpJ.mjs +0 -1
- package/dist/start-DC-b2ts6.mjs +0 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Ar as e,Dr as t}from"./src-
|
|
2
|
-
//# sourceMappingURL=launch-json-removal-
|
|
1
|
+
import{Ar as e,Dr as t}from"./src-DheM9mHj.mjs";import{P as n}from"./fs-traced-Cq61rC8q.mjs";import{D as r,T as i}from"./init-pDLhMu3u.mjs";import{t as a}from"./is-object-ByG7RnjH.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=e(m,h,u)??void 0;if(h.some(e=>!d(e,m))||!g||g.type!==`object`)return{kind:`declined`};let _=t(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?(n(p,y,{mode:i(p)}),{kind:`removed`}):{kind:`not-present`}}export{f as t};
|
|
2
|
+
//# sourceMappingURL=launch-json-removal-DE_-Ww53.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e}from"./loader-Tnvmv5P5.mjs";export{e as loadConfig};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Y as e,c as t,d as n,o as r,s as i}from"./sleep-ByqzSHar.mjs";import"./src-azBs1EPY.mjs";import{_ as a}from"./src-
|
|
2
|
-
//# sourceMappingURL=loader-
|
|
1
|
+
import{Y as e,c as t,d as n,o as r,s as i}from"./sleep-ByqzSHar.mjs";import"./src-azBs1EPY.mjs";import{_ as a}from"./src-DheM9mHj.mjs";import{F as o,O as s}from"./fs-traced-Cq61rC8q.mjs";import{t as c}from"./constants-BeUu14cN.mjs";import{t as l}from"./is-object-ByG7RnjH.mjs";import{resolve as u}from"node:path";import{existsSync as d,readFileSync as f}from"node:fs";import{realpath as p}from"node:fs/promises";var m=e();async function h(e){let t=u(e);try{return await p(t)}catch(e){if(e.code!==`ENOENT`){let n=e instanceof Error?e.message:String(e);console.warn(`[normalize-cwd] realpath failed for ${t}: ${n}`)}return t}}function g(e,t){let n={...e};for(let r of Object.keys(t)){let i=e[r],a=t[r];l(a)&&l(i)?n[r]=g(i,a):a!==void 0&&(n[r]=a)}return n}function _(e){if(!d(e))return{value:null,path:e,source:null,doc:null};let t;try{t=f(e,`utf-8`)}catch(t){let n=t instanceof Error?t.message:String(t);return console.warn(`[config] Failed to read ${e}: ${n}`),{value:null,path:e,source:null,doc:null,diagnostic:{code:`UNREADABLE`,detail:`${e}: ${n}`}}}let n=(0,m.parseDocument)(t);if(n.errors.length>0){let r=n.errors.map(e=>e.message).join(`; `);return console.warn(`[config] Failed to parse ${e}: ${r}`),{value:null,path:e,source:t,doc:null,diagnostic:{code:`YAML_PARSE`,detail:`${e}: ${r}`}}}let r=n.toJSON();return l(r)?{value:r,path:e,source:t,doc:n}:{value:null,path:e,source:t,doc:n}}function v(e,n){return e.map(e=>{let r=e.path.map(e=>typeof e==`symbol`?String(e):e),i={path:r,message:e.message,issueCode:e.code};if(n.doc!==null&&n.source!==null){let e=t({file:n.path,source:n.source,doc:n.doc,path:r});if(e!==void 0)return{...i,source:e}}return i})}function y(e){let t=e??process.cwd(),l=[],d=[],f=[],p=s(`user`,t),m=o({absPath:p});d.push(...m.diagnostics),!m.valid&&m.sidelinedTo!==void 0&&f.push({from:p,to:m.sidelinedTo});let h={};m.valid&&m.source!==void 0?(h=g(h,m.value),l.push(p)):m.valid;let y=u(t,`.ok`,c),b=_(y);if(b.diagnostic!==void 0&&d.push(b.diagnostic),b.value!==null){let e=r({value:b.value,file:b.path,source:b.source,doc:b.doc});d.push(...e);let t=e.length>0?i(b.value):b.value;h=g(h,t),l.push(y)}let x=a.safeParse(h);if(!x.success){let e={code:`SCHEMA_INVALID`,issues:v(x.error.issues,b)};throw Error(n(e))}return{config:x.data,sources:l,diagnostics:d,sidelined:f}}function b(e){let t=e.cacheMs??1e3,n=e.loadConfigFn??y,r=new Map,i=new Map,a=h(e.startupCwd);return async o=>{let s=await h(o??e.startupCwd),c=Date.now(),l=r.get(s);if(l&&l.expiresAt>c)return l.config;let u=i.get(s);if(u)return await u;let d=(async()=>{if(s===await a)return r.set(s,{config:e.startupConfig,expiresAt:Date.now()+t}),e.startupConfig;let i=n(s).config;return r.set(s,{config:i,expiresAt:Date.now()+t}),i})();i.set(s,d);try{return await d}finally{i.delete(s)}}}export{y as n,b as t};
|
|
2
|
+
//# sourceMappingURL=loader-Tnvmv5P5.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{Vr as e}from"./src-
|
|
2
|
-
//# sourceMappingURL=open-browser-
|
|
1
|
+
import{Vr as e}from"./src-DheM9mHj.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-DAPyP3Fq.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./preview-aa7v0U7S.mjs";export{t as formatPreviewBlock,e as previewContent};
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import{jr as e}from"./src-
|
|
1
|
+
import{jr as e}from"./src-DheM9mHj.mjs";import"./constants-BeUu14cN.mjs";import{join as t,relative as n}from"node:path";import{existsSync as r,lstatSync as i,readdirSync as a,realpathSync as o,statSync as s}from"node:fs";function c(r){let{projectDir:c,contentDir:l,sampleCap:u=5}=r,d=[],f=[];try{i(l)}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[`cannot access content directory ${l}: ${e instanceof Error?e.message:String(e)}`]}}let p;try{p=e({projectDir:c,contentDir:l})}catch(e){return{totalCount:0,sample:[],contentDir:l,warnings:[e instanceof Error?e.message:String(e)]}}function m(e){let r;try{r=a(e,{withFileTypes:!0})}catch(t){let r=t instanceof Error?t.message:String(t);d.push(`could not read directory ${n(l,e)||`.`}: ${r}`);return}for(let i of r){let r=t(e,i.name);if(i.isSymbolicLink()){let e;try{e=o(r)}catch(e){let t=e.code;t===`ENOENT`||t===`ELOOP`?d.push(`broken or cyclic symlink: ${n(l,r)}`):d.push(`cannot resolve symlink ${n(l,r)}: ${t??`unknown error`}`);continue}let t;try{t=s(e)}catch{continue}if(t.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(t.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}else if(i.isDirectory()){let e=n(l,r);if(p.isDirExcluded(e))continue;m(r)}else if(i.isFile()){let e=n(l,r);if(p.isExcluded(e))continue;f.push(e)}}}return m(l),{totalCount:f.length,sample:f.slice(0,u),contentDir:l,warnings:d}}function l(e,i){let a=[],o=n(i,e.contentDir),s=o===``?`./`:`./${o}`;if(a.push(`Content:`),a.push(` Found ${e.totalCount} markdown files in ${s}`),e.sample.length>0){let t=e.sample.join(`, `),n=e.totalCount>e.sample.length?`, …`:``;a.push(` Sample: ${t}${n}`)}if(e.warnings.length>0)for(let t of e.warnings)a.push(` Warning: ${t}`);return a.push(``),r(t(i,`.ok`,`config.yml`))?(a.push(` To adjust scope, add patterns to .okignore at the project root.`),a.push(` To change the content root, edit .ok/config.yml → content.dir.`)):a.push(" Run `open-knowledge init` to scaffold config + .okignore."),a.push(``),a.push(` Re-check anytime: open-knowledge preview`),a.join(`
|
|
2
2
|
`)}export{c as n,l as t};
|
|
3
|
-
//# sourceMappingURL=preview-
|
|
3
|
+
//# sourceMappingURL=preview-aa7v0U7S.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{t as e}from"./launch-json-removal-
|
|
2
|
-
//# sourceMappingURL=repair-launch-json-
|
|
1
|
+
import{t as e}from"./launch-json-removal-DE_-Ww53.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-T0HZhyvo.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{a as e,g as t,s as n}from"./write-project-skill-
|
|
2
|
-
//# sourceMappingURL=repair-mcp-configs-
|
|
1
|
+
import{a as e,g as t,s as n}from"./write-project-skill-DXCs8P98.mjs";import{d as r,v as i}from"./init-pDLhMu3u.mjs";import{t as a}from"./mcp-migrate-event-B1gJf6bG.mjs";import{homedir as o}from"node:os";function s(t){let r=t.logger??u,i=t.home??o(),a=[];if(t.reclaimDisableEnv===`1`)return r({event:`mcp-config-repair-skipped`,reason:`reclaim-disabled`}),{outcomes:a,repairedCount:0};for(let o of e){let e=n[o],s=c(()=>e.configPath(``,i));if(s!==null&&a.push(l({scope:`user`,editorId:o,target:e,home:i,cwd:``,configPath:s,configPathOverride:void 0,logger:r})),e.projectConfigPath){let n=e.projectConfigPath,i=c(()=>n(t.projectDir));i!==null&&a.push(l({scope:`project`,editorId:o,target:e,home:void 0,cwd:t.projectDir,configPath:i,configPathOverride:i,logger:r}))}}return{outcomes:a,repairedCount:a.filter(e=>e.outcome===`repaired`).length}}function c(e){try{return e()}catch{return null}}function l(e){let n={scope:e.scope,editorId:e.editorId,configPath:e.configPath},o=r(e.target,e.cwd,e.home,e.configPathOverride);if(o===null)return{...n,outcome:`no-entry`};if(t(o))return{...n,outcome:`canonical`};e.logger(a({scope:e.scope,surface:`cli-repair`,editorId:e.editorId,configPath:e.configPath,priorEntry:o}));let s=i(e.target,e.cwd,{mode:`published`,skipAvailabilityCheck:!0},e.home,e.configPathOverride);if(s.action===`failed`){let t=s.error??`unknown write failure`;return e.logger({event:`mcp-config-repair-write-failed`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,error:t}),{...n,outcome:`write-failed`,error:t}}return s.action===`declined`?(e.logger({event:`mcp-config-repair-declined`,scope:e.scope,editorId:e.editorId,configPath:e.configPath,reason:s.declineReason}),{...n,outcome:`declined`}):{...n,outcome:`repaired`}}function u(e){process.stderr.write(`${JSON.stringify(e)}\n`)}export{s as repairMcpConfigs};
|
|
2
|
+
//# sourceMappingURL=repair-mcp-configs-Cg08-kCm.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{t as e}from"./repair-skills-y_pZk48z.mjs";export{e as repairSkills};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{R as e}from"./src-azBs1EPY.mjs";import{$n as t,Qn as n,ir as r,lr as i,mr as a,nr as o,pr as s,rr as c,sr as l}from"./src-
|
|
1
|
+
import{R as e}from"./src-azBs1EPY.mjs";import{$n as t,Qn as n,ir as r,lr as i,mr as a,nr as o,pr as s,rr as c,sr as l}from"./src-DheM9mHj.mjs";import{c as u,s as d,t as f,x as p}from"./write-project-skill-DXCs8P98.mjs";import{n as m,s as h,t as g}from"./colors-BsmVIwfM.mjs";import{n as _,r as v,t as y}from"./skill-teardown-DLiJoeFc.mjs";import{dirname as b,join as x,relative as S,resolve as C}from"node:path";import{existsSync as w,mkdirSync as T,readFileSync as E,readdirSync as D,rmSync as O,statSync as k,writeFileSync as A}from"node:fs";import{homedir as j}from"node:os";import{createInterface as M}from"node:readline/promises";const N={existsSync:e=>w(e),isDirectory:e=>{try{return k(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>D(e),readFileSync:e=>E(e),writeFileSync:(e,t)=>{A(e,t)},mkdirSync:(e,t)=>{T(e,t)},rmSync:(e,t)=>{O(e,t)}},P={resolveProjectBundledSkillDir:()=>i(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>i(e,{checkDesktop:!1}),readBundledVersion:()=>t(),readRecordedVersion:e=>o(e,`cli-hosts`),writeRecordedVersion:(e,t)=>r(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>l(e),readBundleDecision:(e,t)=>n(e,t),writeBundleDecision:(e,t,n)=>c(e,t,n),removeBundleFromDisk:(e,t)=>v(e,t)};function F(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function I(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(b(t),{recursive:!0}),L(e,t,n)}function L(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=x(e,r),a=x(t,r);n.isDirectory(i)?L(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function R(e,t,n,r,i,a){let o=[],s=x(e,`.agents`,`skills`,t),c=!1;if(r.existsSync(s))o.push({kind:`central`,path:s,outcome:`skipped-present`});else try{I(n,s,r),c=!0,o.push({kind:`central`,path:s,outcome:`written`}),i({event:`user-skill-reclaim-central-written`,scope:`user`,path:s,preexisting:!1,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`central`,path:s,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-central-failed`,scope:`user`,path:s,error:t})}for(let c of u){let l=x(e,c.hostDir),u=x(l,`skills`,t);if(u===s){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!r.existsSync(l)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(r.existsSync(u)){o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`skipped-present`});continue}try{I(n,u,r),o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`written`}),i({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,preexisting:!1,version:a})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({kind:`host`,editorId:c.editorId,hostDir:c.hostDir,path:u,outcome:`failed`,error:t}),i({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:c.editorId,hostDir:c.hostDir,path:u,error:t})}}return{entries:o,centralWritten:c}}function z(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function B(e,t,n,r){let i;try{i=t.resolveProjectBundledSkillDir()}catch(e){return r({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let a=[];for(let t of u){let o=x(e,t.hostDir,`skills`,`open-knowledge`),s=x(o,`SKILL.md`);if(n.existsSync(s)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`present`});continue}let c=d[t.editorId]?.projectConfigPath?.(e);if(!z(c,n)){a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`no-token`}),r({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:t.editorId,path:o});continue}try{f(o,e),I(i,o,n),a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`created`}),r({event:`project-skill-reclaim-created`,scope:`project`,editorId:t.editorId,path:o})}catch(e){let n=e instanceof Error?e.message:String(e);a.push({editorId:t.editorId,hostDir:t.hostDir,path:o,outcome:`failed`,error:n}),r({event:`project-skill-reclaim-failed`,scope:`project`,editorId:t.editorId,path:o,error:n})}}return{outcome:`done`,entries:a}}async function V(t,n,r,i){let o=e=>{n.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await n.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return i({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),o({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await n.readRecordedVersion(t)}catch(e){i({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of a)try{d.push({id:e,sourceDir:n.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return i({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),o({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let a of d){let o=s[a.id],c=r.existsSync(x(t,`.agents`,`skills`,o)),l=await n.readBundleDecision(t,o).catch(()=>null);if(!e(l,{installedOnDisk:c})){if(c)try{n.removeBundleFromDisk(t,a.id),i({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:a.id})}catch(e){i({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await n.writeBundleDecision(t,o,!0)}catch(e){i({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:a.id,error:e instanceof Error?e.message:String(e)})}p.push(a)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(e=>r.existsSync(x(t,`.agents`,`skills`,s[e.id])));if(u!==null&&u===l&&m)return i({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===a.length,_=[];for(let{id:e,sourceDir:n}of p){let a=R(t,s[e],n,r,i,l);h.push(...a.entries),_.push({id:e,centralWritten:a.centralWritten})}let v=h.some(e=>e.kind===`central`&&e.outcome===`failed`);if(g&&!v){let e=null;try{await n.writeRecordedVersion(t,l),i({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(t){e=t instanceof Error?t.message:String(t),i({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:e})}for(let{id:t,centralWritten:n}of _)o({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:t,outcome:e===null?n?`installed`:`skip-current`:`failed`,version:l,...e===null?{}:{reason:`state-write-failed:${e}`}})}else{let e=h.some(e=>e.kind===`host`&&e.outcome===`failed`);o({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:g?e?`all-writes-failed`:`central-write-failed`:`bundle-unresolved`})}return{outcome:`done`,version:l,entries:h}}async function H(e){let t=e.logger??F,n=e.fs??N,r=e.home??j(),i={...P,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=B(e.projectDir,i,n,t),o=await V(r,i,n,t),s=_(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=y(r,s)}catch(e){u=!0,t({event:`legacy-fanout-cleanup-refused`,scope:`user`,error:e instanceof Error?e.message:String(e)})}for(let e of c)t({event:`legacy-fanout-path-removed`,scope:`user`,path:e})}else l=!0,t({event:`legacy-fanout-cleanup-declined`,scope:`user`});return{status:`done`,project:a,user:o,legacySwept:c,legacyCleanupDeclined:l,legacyCleanupFailed:u}}function U(e){return e.status===`skipped`?e.reason===`reclaim-disabled`?0:1:e.project.outcome===`skipped`||e.user.outcome===`skipped`&&e.user.reason!==`version-current`&&e.user.reason!==`all-bundles-declined`||e.project.entries.some(e=>e.outcome===`failed`)||e.user.outcome===`done`&&e.user.entries.some(e=>e.outcome===`failed`)?1:0}function W(e){if(e.status===`skipped`)return`Skipped: ${e.reason}`;let t=[`Skill reclaim complete.`];if(e.project.outcome===`done`){let n=e.project.entries.filter(e=>e.outcome===`present`).length,r=e.project.entries.filter(e=>e.outcome===`created`).length,i=e.project.entries.filter(e=>e.outcome===`no-token`).length,a=e.project.entries.filter(e=>e.outcome===`failed`).length;t.push(` Project: ${n} present, ${r} created, ${i} no-token, ${a} failed.`)}else t.push(` Project: skipped (${e.project.reason}).`);if(e.user.outcome===`done`){let n=e.user.entries.filter(e=>e.outcome===`written`).length,r=e.user.entries.filter(e=>e.outcome===`skipped-present`).length,i=e.user.entries.filter(e=>e.outcome===`skipped-host-absent`||e.outcome===`skipped-collapsed-with-central`).length,a=e.user.entries.filter(e=>e.outcome===`failed`).length;t.push(` User (${e.user.version}): ${n} written, ${r} present, ${i} skipped, ${a} failed.`)}else t.push(` User: skipped (${e.user.reason}).`);return e.legacySwept.length>0?t.push(` Cleanup: removed ${e.legacySwept.length} path(s) from a pre-0.42 install.`):e.legacyCleanupFailed?t.push(` Cleanup: failed — see logs; pre-0.42 directories left in place.`):e.legacyCleanupDeclined&&t.push(` Cleanup: declined — pre-0.42 directories left in place.`),t.join(`
|
|
2
2
|
`)}function G(){return new p(`repair-skills`).description("Refresh bundled SKILL.md files for installed AI editors (project-local + user-global). Runs automatically during `ok start`; this command forces an explicit sweep.").option(`-y, --yes`,`Skip the confirmation prompt for removing directories left by a pre-0.42 install.`).action(async e=>{let t=await H({projectDir:C(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>K(t,{yes:e.yes===!0})});process.stdout.write(`${W(t)}\n`),process.exitCode=U(t)})}async function K(e,t){let n=j(),r=e=>`~/${S(n,e)}`,i=t.input??process.stdin,a=[``,g(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),m(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${g(`Remove OpenKnowledge skills:`)} ${e.skillDirs.length}`,...e.skillDirs.map(e=>` ${r(e)}`)),e.emptyDirs.length>0){let t=e.skillDirs.length>0?`Then remove these, which hold nothing else once the above are gone:`:`Remove these empty directories, left behind by that install:`;a.push(``,`${g(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,m(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
|
|
3
3
|
`)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${h("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=M({input:i,output:process.stdout});try{let e=(await o.question(`\n${g(`Remove them?`)} ${m(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{G as n,H as t};
|
|
4
|
-
//# sourceMappingURL=repair-skills-
|
|
4
|
+
//# sourceMappingURL=repair-skills-y_pZk48z.mjs.map
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import{mr as e,pr as t}from"./src-
|
|
2
|
-
//# sourceMappingURL=skill-teardown-
|
|
1
|
+
import{mr as e,pr as t}from"./src-DheM9mHj.mjs";import{c as n}from"./write-project-skill-DXCs8P98.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...e.map(e=>t[e]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of e){let e=t[r];o.push({path:a(i,`.agents`,`skills`,e),bundleId:r,scope:`central`});for(let t of n)o.push({path:a(i,t.hostDir,`skills`,e),bundleId:r,scope:`host`,hostDir:t.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}export{C as i,y as n,w as r,S as t};
|
|
2
|
+
//# sourceMappingURL=skill-teardown-DLiJoeFc.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{$o as e,Lo as t,Os as n,P as r,Po as i,R as a,Ro as o,d as s,ds as c,l,ts as u}from"./src-azBs1EPY.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,At as y,B as b,Bi as x,Bn as S,Br as C,Bt as w,C as T,Ci as E,Cn as D,Cr as O,Ct as k,D as A,Di as j,Dn as M,Dt as N,E as P,Ei as F,En as I,Et as L,F as R,Fi as z,Fn as B,Fr as V,Ft as H,G as U,Gi as W,Gn as G,Gr as K,Gt as q,H as J,Hi as Y,Hn as X,Hr as Z,Ht as Q,I as $,Ii as ee,In as te,Ir as ne,It as re,J as ie,Ji as ae,Jn as oe,Jr as se,Jt as ce,K as le,Ki as ue,Kn as de,Kr as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pr as Ie,Pt as Le,Q as Re,Qi as ze,Qn as Be,Qr as Ve,Qt as He,R as Ue,Ri as We,Rn as Ge,Rr as Ke,Rt as qe,S as Je,Si as Ye,Sn as Xe,Sr as Ze,St as Qe,T as $e,Ti as et,Tn as tt,Tr as nt,Tt as rt,U as it,Ui as at,Un as ot,Ur as st,Ut as ct,V as lt,Vi as ut,Vn as dt,Vr as ft,Vt as pt,W as mt,Wi as ht,Wn as gt,Wr as _t,Wt as vt,X as yt,Xi as bt,Xn as xt,Xr as St,Xt as Ct,Y as wt,Yi as Tt,Yn as Et,Yr as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_a as Ft,_i as It,_n as Lt,_r as Rt,_t as zt,a as Bt,aa as Vt,ai as Ht,an as Ut,ar as Wt,at as Gt,b as Kt,ba as qt,bi as Jt,bn as Yt,br as Xt,bt as Zt,c as Qt,ca as $t,ci as en,cn as tn,cr as nn,d as rn,da as an,di as on,dn as sn,dr as cn,ea as ln,ei as un,en as dn,er as fn,et as pn,f as mn,fa as hn,fi as gn,fn as _n,fr as vn,g as yn,ga as bn,gi as xn,gn as Sn,gr as Cn,gt as wn,h as Tn,ha as En,hi as Dn,hn as On,hr as kn,ht as An,i as jn,ia as Mn,ii as Nn,in as Pn,ir as Fn,it as In,j as Ln,ji as Rn,jn as zn,jr as Bn,jt as Vn,k as Hn,ki as Un,kn as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr 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,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-DoSxfvJP.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-Cq61rC8q.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-BZPV1wv8.mjs";import{S as Yi,_ as Xi,a as Zi,c as Qi,f as $i,g as ea,h as ta,i as na,l as ra,m as ia,n as aa,o as oa,p as sa,r as ca,s as la,t as ua,u as da,v as fa,x as pa}from"./server-lock-DsDrc4RU.mjs";export{an as AGENT_ID_MAX_LEN,hn as AGENT_ID_RE,j as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,En as AcpRegistry,Ye as AcpThreadManager,Jt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,Ae as AgentSessionCapacityError,Un as AgentSessionManager,An as AutoStartDisabledError,cn as BUNDLE_IDS,vn as BUNDLE_SCOPE,yr as BUNDLE_SKILL_NAME,S as BacklinkIndex,gi as CC1Broadcaster,u as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,Fe as CONFLICT_MARKER_RE,De as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,W as DEFAULT_CHECKPOINT_RETENTION,Mt as DEFAULT_EMBEDDINGS_DIMENSIONS,H as DEFAULT_PACK_ID,lt as DocumentDurabilityState,Ve as EMBEDDINGS_API_KEY_ENV,bn as FEATURED_AGENT_IDS,ue as FILE_SYSTEM_WRITER,Ge as FILE_WATCHER_ORIGIN,K as FileEmbeddingsBackend,Nt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,dn as GitTooOldError,wn as HOCUSPOCUS_AUTH_REJECTION_REASONS,zt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,vi as INSTALLED_AGENTS_SCHEMES,e as LINEAGE_EPOCH_KEY,Ue as LIVE_DERIVED_INDEX_DEBOUNCE_MS,re as LOG_MD_TEMPLATE,rt as MANAGED_RENAME_ORIGIN,E as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,et as MCP_CONNECTION_ID_HEADER,i as MCP_SERVER_NAME,Rn as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,J as MISSING_OK_CONFIG_MESSAGE,qt as MalformedGitPointerError,pn as McpLogger,it as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,sn as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,n as PROTOCOL_VERSION,qi as PinoLogger,Qi as ProcessLockCollisionError,Kn as ProjectGitInitError,L as ROLLBACK_ORIGIN,_n as ROOT_GITIGNORE_TEMPLATE,ea as RUNTIME_VERSION,gn as RemoteConfigError,ae as SERVICE_WRITER,pr as SKILL_INSTALL_EVENTS_FILE_REL,r as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,qe as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,w as STARTER_PACK_IDS,pt as STARTER_TEMPLATES,$e as STATE_MANIFEST_FILENAME,Xi as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,ce as SeedRootDirError,ua as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,P as StateManifestError,_i as TagIndex,tr as USER_GLOBAL_BUNDLE_IDS,X as UiLockCollisionError,N as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ra as acquireProcessLock,aa as acquireServerLock,ot as acquireUiLock,be as applyAgentMarkdownWrite,xe as applyExternalChange,Le as applySeed,A as assertCompatibleStateManifest,or as assertGitAvailable,Yt as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,Sr as buildAndOpenSkill,vr as buildConfigYmlContent,wt as buildExecResult,ei as buildOkMcpStdioCommand,nn as buildSkillZip,Q as buildStarterFolderFrontmatterYaml,Tt as buildWipTree,kn as bundleSkillMdPath,fe as canonicalProjectKey,oi as classifyEvents,Pi as classifyFsPath,Cr as clearAllEmbeddingsKeys,un as clearContributors,ct as coercePackId,l as colorFromSeed,bt as commitUpstreamImport,At as commitWip,ze as commitWipFromTree,Or as compareSemver,Zr as composeEffectiveLinterConfig,pi as composeFrontmatterSchemasConfig,B as containsConflictMarkers,Xe as contentHash,zr as contributorCount,Ne as countShadowObjects,R as countStaleAgentWipRefs,$ as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,U as createCollaborationHost,Bn as createContentFilter,Se as createContentFilterAsync,se as createEmbeddingsSecretStore,jn as createEphemeralProjectDir,Ee as createExternalChangeHandler,mn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,C as createOsProbe,we as createPersistenceExtension,T as createServer,Ln as createServerObserverExtension,ee as createStreamingErrorWriter,Gi as createTestLogger,Dt as describeStoredEmbeddingsKey,yn as detectClaudeDesktopPresence,Pn as detectGit,ke as detectProjectShape,oe as detectUserSkillHosts,Ar as discoverLockDirs,Ze as discoverMarkdownlintConfig,He as emitPreflightFailureSpan,yt as encodeDocName,kt as encodeFolderRoute,Re as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,he as errorResponse,D as evictStaleTrackerEntries,y as extractHeadings,In as extractOkBinaryPath,dt as extractWikiLinksFromMarkdown,Ut as fallbackPaths,rn as findEnclosingGitRoot,Xr as findEnclosingProjectRoot,O as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,ar as formatContributors,Dr as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,Nr as getLocalDir,Zn as getLogFilePath,Ki as getLogger,Tn as getLogsDir,fa as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,Ie as handleSpawnCursor,_r as hasForwardingHeaders,me as hasGcLogLatch,s as iconFromClientName,$t as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,On as initContent,ln as initShadowRepo,Ri as initTelemetry,Kt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,Et as installUserSkill,on as isAllowedApiOrigin,xn as isAllowedWorkspaceHostHeader,x as isConfigDoc,Zt as isHocuspocusAuthRejectionReason,vt as isKnownPackId,ut as isLinkIndexExcludedDoc,It as isLoopbackAddress,Y as isManagedArtifactDoc,o as isOrphanMode,Pe as isPairedWriteOrigin,V as isPathWithinDir,pa as isProcessAlive,fi as isProjectRoot,$n as isRemoteAdmitted,at as isReservedForUserTree,ti as isSelfWrite,ht as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,tt as lastKnownHash,Rr as listRescueCheckpoints,q as listStarterPacks,Ft as loadCustomAgents,ye as loadPrincipal,da as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,St as makeLazyEmbeddingsKeyStore,ca as markServerLockDraining,mt as mountMcpAndApi,ji as normalizeFsPath,Cn as originGitHubHost,Sn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Qe as parseHocuspocusAuthToken,le as parseKeepaliveConnectionId,I as pathToDocName,Oe as planSeed,Bt as prepareSingleFileOpen,Gt as processCommand,mr as processUsage,jt as readAllTargets,Be as readBundleDecision,ni as readOwnNativeRules,$i as readProcessLock,sa as readProcessLockDetailed,b as readProjectHeadState,_t as readProjectLocalSemanticConfig,na as readServerLock,p as readServerPackageVersion,fn as readSkillInstallStateSnapshot,Hn as readStateManifest,Vr as readTargetRecordedAt,sr as readTargetVersion,gt as readUiLock,te as reconcile,Nn as recordContributor,Fr as recordSkillInstallEvent,ie as registerAllTools,M as registerWrite,ia as releaseProcessLock,Zi as releaseServerLock,G as releaseUiLock,je as removeLastKnownHash,xt as reportSkillInstall,Wr as resetMetrics,a as resolveBundleEnabled,Xn as resolveBundledSkillDir,en as resolveContentDir,ne as resolveCursorBinaryDefault,_e as resolveCursorSpawnInvocation,Xt as resolveEffectiveLinterConfig,m as resolveEmbeddingsCredential,Jn as resolveLockDir,si as resolveNativeConfigForDoc,nt as resolveNativeMarkdownlintConfig,pe as resolvePack,jr as resolvePackageVersion,Dn as resolveRemoteAccess,Wt as resolveSkillInstallReportSettings,d as resolveUiInfo,Ht as restoreContributors,li as restoreLifecycleFromConflictsJson,Z as rewriteMarkdownLinksForDocumentRename,st as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,tn as runAuthStatusSubprocess,Ot as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Gr as safeContentPath,Vn as safeSubdir,ir as safetyCheckpoint,F as sanitizeClientName,Er as saveInMemoryCheckpoint,Mn as saveVersion,k as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,z as setupServerObservers,Vt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,Ke as spawnDetached,ge as splitMarkdownBlocks,Wn as startWatcher,We as streamingProblemEvent,dr as swapContributors,Je as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Qt as untrackTrackedProjectSkillProjection,v as updateLastKnownHash,ta as updateProcessLockPort,oa as updateServerLockPort,de as updateUiLockPort,Qn as validateAgentId,Ct as validateCloneInputs,qr as validateSkillZip,la as waitForServerLockDrain,ft as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,kr as writeBundleDecision,Rt as writeMarkdownlintRule,Lt as writeRootGitignoreForNewRepo,g as writeStateManifest,Fn as writeTargetVersion,zn as writeTracker};
|
|
1
|
+
import{$o as e,Lo as t,Os as n,P as r,Po as i,R as a,Ro as o,d as s,ds as c,l,ts as u}from"./src-azBs1EPY.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,At as y,B as b,Bi as x,Bn as S,Br as C,Bt as w,C as T,Ci as E,Cn as D,Cr as O,Ct as k,D as A,Di as j,Dn as M,Dt as N,E as P,Ei as F,En as I,Et as L,F as R,Fi as z,Fn as B,Fr as V,Ft as H,G as U,Gi as W,Gn as G,Gr as K,Gt as q,H as J,Hi as Y,Hn as X,Hr as Z,Ht as Q,I as $,Ii as ee,In as te,Ir as ne,It as re,J as ie,Ji as ae,Jn as oe,Jr as se,Jt as ce,K as le,Ki as ue,Kn as de,Kr as fe,Kt as pe,L as me,Li as he,Ln as ge,Lr as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nr as De,Nt as Oe,O as ke,Oi as Ae,On as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pr as Ie,Pt as Le,Q as Re,Qi as ze,Qn as Be,Qr as Ve,Qt as He,R as Ue,Ri as We,Rn as Ge,Rr as Ke,Rt as qe,S as Je,Si as Ye,Sn as Xe,Sr as Ze,St as Qe,T as $e,Ti as et,Tn as tt,Tr as nt,Tt as rt,U as it,Ui as at,Un as ot,Ur as st,Ut as ct,V as lt,Vi as ut,Vn as dt,Vr as ft,Vt as pt,W as mt,Wi as ht,Wn as gt,Wr as _t,Wt as vt,X as yt,Xi as bt,Xn as xt,Xr as St,Xt as Ct,Y as wt,Yi as Tt,Yn as Et,Yr as Dt,Yt as Ot,Z as kt,Zi as At,Zn as jt,Zr as Mt,Zt as Nt,_ as Pt,_a as Ft,_i as It,_n as Lt,_r as Rt,_t as zt,a as Bt,aa as Vt,ai as Ht,an as Ut,ar as Wt,at as Gt,b as Kt,ba as qt,bi as Jt,bn as Yt,br as Xt,bt as Zt,c as Qt,ca as $t,ci as en,cn as tn,cr as nn,d as rn,da as an,di as on,dn as sn,dr as cn,ea as ln,ei as un,en as dn,er as fn,et as pn,f as mn,fa as hn,fi as gn,fn as _n,fr as vn,g as yn,ga as bn,gi as xn,gn as Sn,gr as Cn,gt as wn,h as Tn,ha as En,hi as Dn,hn as On,hr as kn,ht as An,i as jn,ia as Mn,ii as Nn,in as Pn,ir as Fn,it as In,j as Ln,ji as Rn,jn as zn,jr as Bn,jt as Vn,k as Hn,ki as Un,kn as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr 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,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-DheM9mHj.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-Cq61rC8q.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-BZPV1wv8.mjs";import{S as Yi,_ as Xi,a as Zi,c as Qi,f as $i,g as ea,h as ta,i as na,l as ra,m as ia,n as aa,o as oa,p as sa,r as ca,s as la,t as ua,u as da,v as fa,x as pa}from"./server-lock-DsDrc4RU.mjs";export{an as AGENT_ID_MAX_LEN,hn as AGENT_ID_RE,j as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,En as AcpRegistry,Ye as AcpThreadManager,Jt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,Ae as AgentSessionCapacityError,Un as AgentSessionManager,An as AutoStartDisabledError,cn as BUNDLE_IDS,vn as BUNDLE_SCOPE,yr as BUNDLE_SKILL_NAME,S as BacklinkIndex,gi as CC1Broadcaster,u as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,Fe as CONFLICT_MARKER_RE,De as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Pt as ConfigSchema,W as DEFAULT_CHECKPOINT_RETENTION,Mt as DEFAULT_EMBEDDINGS_DIMENSIONS,H as DEFAULT_PACK_ID,lt as DocumentDurabilityState,Ve as EMBEDDINGS_API_KEY_ENV,bn as FEATURED_AGENT_IDS,ue as FILE_SYSTEM_WRITER,Ge as FILE_WATCHER_ORIGIN,K as FileEmbeddingsBackend,Nt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,dn as GitTooOldError,wn as HOCUSPOCUS_AUTH_REJECTION_REASONS,zt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,vi as INSTALLED_AGENTS_SCHEMES,e as LINEAGE_EPOCH_KEY,Ue as LIVE_DERIVED_INDEX_DEBOUNCE_MS,re as LOG_MD_TEMPLATE,rt as MANAGED_RENAME_ORIGIN,E as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,et as MCP_CONNECTION_ID_HEADER,i as MCP_SERVER_NAME,Rn as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,J as MISSING_OK_CONFIG_MESSAGE,qt as MalformedGitPointerError,pn as McpLogger,it as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,sn as OK_OKIGNORE_TEMPLATE,t as ORPHAN_MODES,n as PROTOCOL_VERSION,qi as PinoLogger,Qi as ProcessLockCollisionError,Kn as ProjectGitInitError,L as ROLLBACK_ORIGIN,_n as ROOT_GITIGNORE_TEMPLATE,ea as RUNTIME_VERSION,gn as RemoteConfigError,ae as SERVICE_WRITER,pr as SKILL_INSTALL_EVENTS_FILE_REL,r as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,qe as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,w as STARTER_PACK_IDS,pt as STARTER_TEMPLATES,$e as STATE_MANIFEST_FILENAME,Xi as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,ce as SeedRootDirError,ua as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,P as StateManifestError,_i as TagIndex,tr as USER_GLOBAL_BUNDLE_IDS,X as UiLockCollisionError,N as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ra as acquireProcessLock,aa as acquireServerLock,ot as acquireUiLock,be as applyAgentMarkdownWrite,xe as applyExternalChange,Le as applySeed,A as assertCompatibleStateManifest,or as assertGitAvailable,Yt as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,Sr as buildAndOpenSkill,vr as buildConfigYmlContent,wt as buildExecResult,ei as buildOkMcpStdioCommand,nn as buildSkillZip,Q as buildStarterFolderFrontmatterYaml,Tt as buildWipTree,kn as bundleSkillMdPath,fe as canonicalProjectKey,oi as classifyEvents,Pi as classifyFsPath,Cr as clearAllEmbeddingsKeys,un as clearContributors,ct as coercePackId,l as colorFromSeed,bt as commitUpstreamImport,At as commitWip,ze as commitWipFromTree,Or as compareSemver,Zr as composeEffectiveLinterConfig,pi as composeFrontmatterSchemasConfig,B as containsConflictMarkers,Xe as contentHash,zr as contributorCount,Ne as countShadowObjects,R as countStaleAgentWipRefs,$ as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,U as createCollaborationHost,Bn as createContentFilter,Se as createContentFilterAsync,se as createEmbeddingsSecretStore,jn as createEphemeralProjectDir,Ee as createExternalChangeHandler,mn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,C as createOsProbe,we as createPersistenceExtension,T as createServer,Ln as createServerObserverExtension,ee as createStreamingErrorWriter,Gi as createTestLogger,Dt as describeStoredEmbeddingsKey,yn as detectClaudeDesktopPresence,Pn as detectGit,ke as detectProjectShape,oe as detectUserSkillHosts,Ar as discoverLockDirs,Ze as discoverMarkdownlintConfig,He as emitPreflightFailureSpan,yt as encodeDocName,kt as encodeFolderRoute,Re as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,he as errorResponse,D as evictStaleTrackerEntries,y as extractHeadings,In as extractOkBinaryPath,dt as extractWikiLinksFromMarkdown,Ut as fallbackPaths,rn as findEnclosingGitRoot,Xr as findEnclosingProjectRoot,O as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,ar as formatContributors,Dr as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,Nr as getLocalDir,Zn as getLogFilePath,Ki as getLogger,Tn as getLogsDir,fa as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,Ie as handleSpawnCursor,_r as hasForwardingHeaders,me as hasGcLogLatch,s as iconFromClientName,$t as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,On as initContent,ln as initShadowRepo,Ri as initTelemetry,Kt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,Et as installUserSkill,on as isAllowedApiOrigin,xn as isAllowedWorkspaceHostHeader,x as isConfigDoc,Zt as isHocuspocusAuthRejectionReason,vt as isKnownPackId,ut as isLinkIndexExcludedDoc,It as isLoopbackAddress,Y as isManagedArtifactDoc,o as isOrphanMode,Pe as isPairedWriteOrigin,V as isPathWithinDir,pa as isProcessAlive,fi as isProjectRoot,$n as isRemoteAdmitted,at as isReservedForUserTree,ti as isSelfWrite,ht as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,tt as lastKnownHash,Rr as listRescueCheckpoints,q as listStarterPacks,Ft as loadCustomAgents,ye as loadPrincipal,da as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,St as makeLazyEmbeddingsKeyStore,ca as markServerLockDraining,mt as mountMcpAndApi,ji as normalizeFsPath,Cn as originGitHubHost,Sn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Qe as parseHocuspocusAuthToken,le as parseKeepaliveConnectionId,I as pathToDocName,Oe as planSeed,Bt as prepareSingleFileOpen,Gt as processCommand,mr as processUsage,jt as readAllTargets,Be as readBundleDecision,ni as readOwnNativeRules,$i as readProcessLock,sa as readProcessLockDetailed,b as readProjectHeadState,_t as readProjectLocalSemanticConfig,na as readServerLock,p as readServerPackageVersion,fn as readSkillInstallStateSnapshot,Hn as readStateManifest,Vr as readTargetRecordedAt,sr as readTargetVersion,gt as readUiLock,te as reconcile,Nn as recordContributor,Fr as recordSkillInstallEvent,ie as registerAllTools,M as registerWrite,ia as releaseProcessLock,Zi as releaseServerLock,G as releaseUiLock,je as removeLastKnownHash,xt as reportSkillInstall,Wr as resetMetrics,a as resolveBundleEnabled,Xn as resolveBundledSkillDir,en as resolveContentDir,ne as resolveCursorBinaryDefault,_e as resolveCursorSpawnInvocation,Xt as resolveEffectiveLinterConfig,m as resolveEmbeddingsCredential,Jn as resolveLockDir,si as resolveNativeConfigForDoc,nt as resolveNativeMarkdownlintConfig,pe as resolvePack,jr as resolvePackageVersion,Dn as resolveRemoteAccess,Wt as resolveSkillInstallReportSettings,d as resolveUiInfo,Ht as restoreContributors,li as restoreLifecycleFromConflictsJson,Z as rewriteMarkdownLinksForDocumentRename,st as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,tn as runAuthStatusSubprocess,Ot as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Gr as safeContentPath,Vn as safeSubdir,ir as safetyCheckpoint,F as sanitizeClientName,Er as saveInMemoryCheckpoint,Mn as saveVersion,k as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,z as setupServerObservers,Vt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,Ke as spawnDetached,ge as splitMarkdownBlocks,Wn as startWatcher,We as streamingProblemEvent,dr as swapContributors,Je as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Qt as untrackTrackedProjectSkillProjection,v as updateLastKnownHash,ta as updateProcessLockPort,oa as updateServerLockPort,de as updateUiLockPort,Qn as validateAgentId,Ct as validateCloneInputs,qr as validateSkillZip,la as waitForServerLockDrain,ft as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,kr as writeBundleDecision,Rt as writeMarkdownlintRule,Lt as writeRootGitignoreForNewRepo,g as writeStateManifest,Fn as writeTargetVersion,zn as writeTracker};
|