@inkeep/open-knowledge 0.59.0-beta.10 → 0.59.0-beta.12

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 (105) hide show
  1. package/dist/{acp-harness-probe-B-zYNbKH.mjs → acp-harness-probe-1nwnlbS0.mjs} +3 -3
  2. package/dist/cli.mjs +61 -61
  3. package/dist/constants-BplwuXJr.mjs +2 -0
  4. package/dist/index.d.mts +0 -27
  5. package/dist/index.mjs +202 -202
  6. package/dist/init-BdwdCUiN.mjs +1 -0
  7. package/dist/init-C3tiLV4q.mjs +638 -0
  8. package/dist/{launch-json-removal-BFc1Zjdt.mjs → launch-json-removal-DskngHoZ.mjs} +2 -2
  9. package/dist/loader-DCfDuFIB.mjs +1 -0
  10. package/dist/{loader-gs03Z0wR.mjs → loader-wkIqjWKU.mjs} +2 -2
  11. package/dist/{open-browser-00vuZ49B.mjs → open-browser-B-Kf-THH.mjs} +2 -2
  12. package/dist/{preview-D-cqfvmS.mjs → preview-DNmmZiVV.mjs} +2 -2
  13. package/dist/preview-DtCiQeRn.mjs +1 -0
  14. package/dist/public/assets/{ActivityModeContent-7I3FAqNa.js → ActivityModeContent-Dm80EO6I.js} +1 -1
  15. package/dist/public/assets/{AgentDiffPane-BQC85Rn1.js → AgentDiffPane-CiDRNNtB.js} +1 -1
  16. package/dist/public/assets/{CodeMirrorPropInput-Bf5PV704.js → CodeMirrorPropInput-CAuN39X3.js} +1 -1
  17. package/dist/public/assets/{DocumentContext-YI07j2yc.js → DocumentContext-BQwDWNIp.js} +1 -1
  18. package/dist/public/assets/{EditorModeToggle-B3XSSPCP.js → EditorModeToggle-BPsUpNqB.js} +1 -1
  19. package/dist/public/assets/{EnableSyncConfirmDialog-DrBUTfFU.js → EnableSyncConfirmDialog-SztigQDp.js} +1 -1
  20. package/dist/public/assets/{ExcalidrawDocEditor-T3TL3VQu.js → ExcalidrawDocEditor-DUpN3hmr.js} +1 -1
  21. package/dist/public/assets/FeedbackForm-BTUVYyRh.js +1 -0
  22. package/dist/public/assets/{ImportSkillDialog-B5zHicwe.js → ImportSkillDialog-Dlx0DBn5.js} +1 -1
  23. package/dist/public/assets/{LintConfigEditor-D5Dg5HLZ.js → LintConfigEditor-DZNYgrQG.js} +1 -1
  24. package/dist/public/assets/{ManagedArtifactProperties-WOaAexG2.js → ManagedArtifactProperties-B-0nFc46.js} +1 -1
  25. package/dist/public/assets/ManagedArtifactProperties-FyJ6IPjk.js +1 -0
  26. package/dist/public/assets/{MermaidDocEditor-CwD8mOHB.js → MermaidDocEditor-Bu0vzdBQ.js} +1 -1
  27. package/dist/public/assets/{PropertyDisplayRow-CKXJ3p74.js → PropertyDisplayRow-DFpnExTR.js} +1 -1
  28. package/dist/public/assets/{SchemaConfigEditor-kvdPUUAX.js → SchemaConfigEditor-BQ_qrwXQ.js} +1 -1
  29. package/dist/public/assets/{SessionsHost-x_FfXVKL.js → SessionsHost-CednqHmx.js} +2 -2
  30. package/dist/public/assets/{SettingsDialogBody-CgHSjRrN.js → SettingsDialogBody-CDLuNlbr.js} +1 -1
  31. package/dist/public/assets/{ShareReceiveMissDialog-DBLKwZ22.js → ShareReceiveMissDialog-CEG6W1Ev.js} +1 -1
  32. package/dist/public/assets/{SkillInstallMenu-BXOomxqv.js → SkillInstallMenu-CiSsB_my.js} +1 -1
  33. package/dist/public/assets/{SkillToolbarControls-NUcxAczC.js → SkillToolbarControls-DzZ0Gk1t.js} +1 -1
  34. package/dist/public/assets/{SourceEditor-DYdjbyzp.js → SourceEditor-qlPmt6ym.js} +1 -1
  35. package/dist/public/assets/{TerminalWindowApp-CEKKfG52.js → TerminalWindowApp-BhcRGz-t.js} +1 -1
  36. package/dist/public/assets/{TextDocEditor-CaNNKmLz.js → TextDocEditor-CCvc4Q5l.js} +1 -1
  37. package/dist/public/assets/ThreadView-BbaUHoL7.js +14 -0
  38. package/dist/public/assets/{TimelineDiffPane-yi7kMXSo.js → TimelineDiffPane-QLS0U_1C.js} +1 -1
  39. package/dist/public/assets/{agent-diff-store-SkFUI7rS.js → agent-diff-store-J11a-4Bd.js} +1 -1
  40. package/dist/public/assets/{auth-state-cache-DbD6wjBD.js → auth-state-cache-_thFjwl-.js} +1 -1
  41. package/dist/public/assets/{client-version-p4OJ2Mf5.js → client-version-CR8MBZoD.js} +1 -1
  42. package/dist/public/assets/{comment-chips-DiZPWTPl.js → comment-chips-CLyRlBJL.js} +1 -1
  43. package/dist/public/assets/{config-provider-USxiO_wH.js → config-provider-C7upY2Yd.js} +3 -3
  44. package/dist/public/assets/{follow-file-DWqYp0pE.js → follow-file-DaYTg7AY.js} +2 -2
  45. package/dist/public/assets/globals-t_AE56h0.css +1 -0
  46. package/dist/public/assets/i18n-BmV9TpxI.js +1 -0
  47. package/dist/public/assets/{index-C6Xk875v.js → index-8x_9u23T.js} +8 -8
  48. package/dist/public/assets/{messages-D2-S61MT.js → messages-B1AtMu4g.js} +1 -1
  49. package/dist/public/assets/{messages-CgyRKo5g.js → messages-BOin2R2m.js} +1 -1
  50. package/dist/public/assets/{messages-Cdv9hd10.js → messages-BSAPNWhz.js} +1 -1
  51. package/dist/public/assets/{messages-Fy0K5qZm.js → messages-CHMN5vzg.js} +1 -1
  52. package/dist/public/assets/{messages-BFlTGREq.js → messages-CVdYp7oq.js} +1 -1
  53. package/dist/public/assets/{messages-Daexf5KZ.js → messages-CrhnZzfX.js} +1 -1
  54. package/dist/public/assets/{messages-D_5Iek_V.js → messages-D1a_S47U.js} +1 -1
  55. package/dist/public/assets/{messages-BP5GGrRC.js → messages-D7G9yvga.js} +1 -1
  56. package/dist/public/assets/{messages-BN7zDSVo.js → messages-DFzggSxO.js} +1 -1
  57. package/dist/public/assets/{messages-DQkd1f5c.js → messages-DQUtt-5a.js} +1 -1
  58. package/dist/public/assets/{messages-D13EOsYw.js → messages-QRz1xKWv.js} +1 -1
  59. package/dist/public/assets/{messages-DvC9XHhc.js → messages-ugbFvlbF.js} +1 -1
  60. package/dist/public/assets/{pending-receive-nav-store-BaBTyiLf.js → pending-receive-nav-store-CC2XknmZ.js} +1 -1
  61. package/dist/public/assets/{selection-context-DV36ssJQ.js → selection-context-DdO1wltB.js} +1 -1
  62. package/dist/public/assets/{skill-actions-ayyLVAw5.js → skill-actions-BSweQ1qx.js} +1 -1
  63. package/dist/public/assets/{src-B3OD2BqU.js → src-B5lvdvjM.js} +1 -1
  64. package/dist/public/assets/{telemetry-impl-DhefnhPq.js → telemetry-impl-BcdvjHjJ.js} +1 -1
  65. package/dist/public/assets/{telemetry-startup--1E51CEj.js → telemetry-startup-CmDjO4so.js} +1 -1
  66. package/dist/public/assets/{typing-burst-detector-cZASYUag.js → typing-burst-detector-ChW315nG.js} +1 -1
  67. package/dist/public/assets/{uninstall-D9_hPyyW.js → uninstall-C1RXngJE.js} +1 -1
  68. package/dist/public/assets/{use-activity-panel-Drw3hRT0.js → use-activity-panel-SBXuDVLV.js} +1 -1
  69. package/dist/public/assets/{use-open-skill-C-OW-Q9z.js → use-open-skill-DI2x1PKF.js} +1 -1
  70. package/dist/public/assets/{use-popular-skills-BIvBkMNA.js → use-popular-skills-DfFoUUYd.js} +1 -1
  71. package/dist/public/assets/{use-terminal-enabled-CSNDVdz8.js → use-terminal-enabled-BL8teAd-.js} +1 -1
  72. package/dist/public/assets/{use-timeline-entry-diff-DGCq_9Hl.js → use-timeline-entry-diff-BjMCsEI9.js} +1 -1
  73. package/dist/public/index.html +24 -24
  74. package/dist/public/uninstall.html +5 -5
  75. package/dist/{repair-launch-json-TrmFTJtM.mjs → repair-launch-json-C21vqdF1.mjs} +2 -2
  76. package/dist/{repair-mcp-configs-D3EO32iD.mjs → repair-mcp-configs-BUKx8wz_.mjs} +2 -2
  77. package/dist/repair-skills-CI9y4QbJ.mjs +4 -0
  78. package/dist/repair-skills-QaEJT3NL.mjs +1 -0
  79. package/dist/{resolve-project-root-CAzm4bRw.mjs → resolve-project-root-CRcZU2OU.mjs} +5 -5
  80. package/dist/{skill-teardown-CwUORgAd.mjs → skill-teardown-DLV1OiQx.mjs} +2 -2
  81. package/dist/src-DCqESfWX.mjs +1 -0
  82. package/dist/src-DuQCE3HO.mjs +1 -0
  83. package/dist/{src-BEA-yn6c.mjs → src-_fp0S8Pp.mjs} +330 -330
  84. package/dist/src-suK9PJ_z.mjs +20 -0
  85. package/dist/start-DZCxW5no.mjs +1 -0
  86. package/dist/{start-sc9lI5yb.mjs → start-TsNChes_.mjs} +4 -4
  87. package/dist/{ui-BxBKs2IM.mjs → ui-DZeKrf4E.mjs} +3 -3
  88. package/package.json +5 -5
  89. package/dist/constants-CuvKewzN.mjs +0 -2
  90. package/dist/init-B5gPgKmk.mjs +0 -1
  91. package/dist/init-BzZZQKjK.mjs +0 -638
  92. package/dist/loader-Bowldk_b.mjs +0 -1
  93. package/dist/preview-DrxJEWLx.mjs +0 -1
  94. package/dist/public/assets/FeedbackForm-bekuqqT1.js +0 -1
  95. package/dist/public/assets/ManagedArtifactProperties-DXXsE5wd.js +0 -1
  96. package/dist/public/assets/ThreadView-Bt_MQTAE.js +0 -14
  97. package/dist/public/assets/globals-CStTfhCT.css +0 -1
  98. package/dist/public/assets/i18n-DLbGfWG4.js +0 -1
  99. package/dist/repair-skills-CTJ78v6_.mjs +0 -4
  100. package/dist/repair-skills-lEisdlv1.mjs +0 -1
  101. package/dist/src-BNK2WY-u.mjs +0 -20
  102. package/dist/src-Bz8L1kRK.mjs +0 -1
  103. package/dist/src-Dhp-cFHN.mjs +0 -1
  104. package/dist/start-BgU8qitb.mjs +0 -1
  105. /package/dist/public/assets/{globals-tNjN0wSq.js → globals-BEtYwZKH.js} +0 -0
@@ -1 +0,0 @@
1
- import"./dist-DGemBD_J.js";import{t as e}from"./dist-XgwTV-oh2.js";import{t}from"./messages-D2-S61MT.js";e.load(`en`,t.messages),e.activate(`en`);
@@ -1,4 +0,0 @@
1
- import{Ms as e,W as t}from"./src-BxdlvOrw.mjs";import{Er as n,Or as r,Sr as i,_r as a,br as o,dr as s,fr as c,gr as l,hr as u}from"./src-BEA-yn6c.mjs";import{c as d,l as f,r as p,t as m,x as h}from"./resolve-project-root-CAzm4bRw.mjs";import{n as g,s as _,t as v}from"./colors-BsmVIwfM.mjs";import{n as y,r as b,t as x}from"./skill-teardown-CwUORgAd.mjs";import{basename as S,dirname as C,join as w,relative as T,resolve as E}from"node:path";import{existsSync as D,mkdirSync as O,readFileSync as k,readdirSync as A,rmSync as j,statSync as M,writeFileSync as N}from"node:fs";import{homedir as P}from"node:os";import{createInterface as F}from"node:readline/promises";const I={existsSync:e=>D(e),isDirectory:e=>{try{return M(e).isDirectory()}catch(e){if(e.code===`ENOENT`)return!1;throw e}},readdirSync:e=>A(e),readFileSync:e=>k(e),writeFileSync:(e,t)=>{N(e,t)},mkdirSync:(e,t)=>{O(e,t)},rmSync:(e,t)=>{j(e,t)}},L={resolveProjectBundledSkillDir:()=>i(`project`,{checkDesktop:!1}),resolveUserBundledSkillDir:e=>i(e,{checkDesktop:!1}),readBundledVersion:()=>c(),readRecordedVersion:e=>u(e,`cli-hosts`),writeRecordedVersion:(e,t)=>a(e,`cli-hosts`,t,`cli-start`),recordEvent:e=>o(e),readBundleDecision:(e,t)=>s(e,t),writeBundleDecision:(e,t,n)=>l(e,t,n),removeBundleFromDisk:(e,t)=>b(e,t)};function R(e){process.stderr.write(`${JSON.stringify(e)}\n`)}function z(e,t,n){n.rmSync(t,{recursive:!0,force:!0}),n.mkdirSync(C(t),{recursive:!0}),B(e,t,n)}function B(e,t,n){n.mkdirSync(t,{recursive:!0});for(let r of n.readdirSync(e)){let i=w(e,r),a=w(t,r);n.isDirectory(i)?B(i,a,n):n.writeFileSync(a,n.readFileSync(i))}}function V(t,n,r){return r.existsSync(w(t,`.agents`,`skills`,n))||e.some(e=>r.existsSync(w(t,e.skillsRoot,n)))}function H(t,n,r,i,a,o){let s=[],c=w(t,`.agents`,`skills`,n);if(V(t,n,i)){i.existsSync(c)&&s.push({kind:`central`,path:c,outcome:`skipped-present`});for(let r of e){let e=w(t,r.skillsRoot,n);if(e!==c){if(!i.existsSync(w(t,r.hostDir))){s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-host-absent`});continue}i.existsSync(e)&&s.push({kind:`host`,editorId:r.editorId,hostDir:r.hostDir,path:e,outcome:`skipped-present`})}}return{entries:s,anyWritten:!1,anyDestinationSucceeded:!0}}let l=i.existsSync(w(t,`.agents`));if(l&&i.existsSync(c))s.push({kind:`central`,path:c,outcome:`skipped-present`});else if(l)try{z(r,c,i),s.push({kind:`central`,path:c,outcome:`written`}),a({event:`user-skill-reclaim-central-written`,scope:`user`,path:c,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`central`,path:c,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-central-failed`,scope:`user`,path:c,error:t})}for(let l of e){let e=w(t,l.hostDir),u=w(t,l.skillsRoot,n);if(u===c){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-collapsed-with-central`});continue}if(!i.existsSync(e)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-host-absent`});continue}if(i.existsSync(u)){s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`skipped-present`});continue}try{z(r,u,i),s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`written`}),a({event:`user-skill-reclaim-host-written`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,preexisting:!1,version:o})}catch(e){let t=e instanceof Error?e.message:String(e);s.push({kind:`host`,editorId:l.editorId,hostDir:l.hostDir,path:u,outcome:`failed`,error:t}),a({event:`user-skill-reclaim-host-failed`,scope:`user`,editorId:l.editorId,hostDir:l.hostDir,path:u,error:t})}}return{entries:s,anyWritten:s.some(e=>e.outcome===`written`),anyDestinationSucceeded:s.some(e=>e.outcome===`written`||e.outcome===`skipped-present`)}}function U(e,t){if(!e)return!1;try{return t.existsSync(e)?t.readFileSync(e).toString(`utf8`).includes(`# ok-mcp-`):!1}catch{return!1}}function W(e,t,n,r){if(!e||!t)return!1;let i;try{i=e.configPath(n,r)}catch{return!1}let a=e=>w(m(C(e)),S(e));return a(t)===a(i)}function G(e,t,n,r,i){let a;try{a=n.resolveProjectBundledSkillDir()}catch(e){return i({event:`project-skill-reclaim-bundle-missing`,scope:`project`,error:e instanceof Error?e.message:String(e)}),{outcome:`skipped`,reason:`bundle-missing`}}let o=[];for(let n of f){let s=w(e,n.hostDir,`skills`,`open-knowledge`),c=w(s,`SKILL.md`);if(r.existsSync(c)){o.push({editorId:n.editorId,hostDir:n.hostDir,path:s,outcome:`present`});continue}let l=d[n.editorId],u=l?.projectConfigPath?.(e);if(W(l,u,e,t)){o.push({editorId:n.editorId,hostDir:n.hostDir,path:s,outcome:`skipped-global-collision`}),i({event:`project-skill-reclaim-skipped-global-collision`,scope:`project`,editorId:n.editorId,path:s});continue}if(!U(u,r)){o.push({editorId:n.editorId,hostDir:n.hostDir,path:s,outcome:`no-token`}),i({event:`project-skill-reclaim-no-token`,scope:`project`,editorId:n.editorId,path:s});continue}try{p(s,e),z(a,s,r),o.push({editorId:n.editorId,hostDir:n.hostDir,path:s,outcome:`created`}),i({event:`project-skill-reclaim-created`,scope:`project`,editorId:n.editorId,path:s})}catch(e){let t=e instanceof Error?e.message:String(e);o.push({editorId:n.editorId,hostDir:n.hostDir,path:s,outcome:`failed`,error:t}),i({event:`project-skill-reclaim-failed`,scope:`project`,editorId:n.editorId,path:s,error:t})}}return{outcome:`done`,entries:o}}async function K(e,i,a,o){let s=e=>{i.recordEvent(e).catch(()=>{})},c=()=>new Date().toISOString(),l;try{l=await i.readBundledVersion()}catch(e){let t=e instanceof Error?e.message:String(e);return o({event:`user-skill-reclaim-version-read-failed`,scope:`user`,error:t}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:`discovery`,outcome:`failed`,reason:`version-read-failed:${t}`}),{outcome:`skipped`,reason:`version-read-failed`}}let u;try{u=await i.readRecordedVersion(e)}catch(e){o({event:`user-skill-reclaim-version-read-error`,scope:`user`,error:e instanceof Error?e.message:String(e)}),u=null}let d=[],f=null;for(let e of r)try{d.push({id:e,sourceDir:i.resolveUserBundledSkillDir(e)})}catch(e){f=e instanceof Error?e.message:String(e)}if(d.length===0)return o({event:`user-skill-reclaim-bundle-missing`,scope:`user`,error:f??`no user-global bundles`}),s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,reason:`bundle-missing:${f}`}),{outcome:`skipped`,reason:`bundle-missing`};let p=[];for(let r of d){let s=n[r.id],c=V(e,s,a),l=await i.readBundleDecision(e,s).catch(()=>null);if(!t(l,{installedOnDisk:c})){if(c)try{i.removeBundleFromDisk(e,r.id),o({event:`user-skill-reclaim-bundle-declined-removed`,scope:`user`,bundle:r.id})}catch(e){o({event:`user-skill-reclaim-bundle-remove-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}continue}if(l===null&&c)try{await i.writeBundleDecision(e,s,!0)}catch(e){o({event:`user-skill-reclaim-grandfather-write-failed`,scope:`user`,bundle:r.id,error:e instanceof Error?e.message:String(e)})}p.push(r)}if(p.length===0)return{outcome:`skipped`,reason:`all-bundles-declined`};let m=p.every(t=>V(e,n[t.id],a));if(u!==null&&u===l&&m)return o({event:`user-skill-reclaim-skipped-version-current`,scope:`user`,version:l}),{outcome:`skipped`,reason:`version-current`};let h=[],g=d.length===r.length,_=[];for(let{id:t,sourceDir:r}of p){let i=H(e,n[t],r,a,o,l);h.push(...i.entries),_.push({id:t,anyWritten:i.anyWritten,landed:i.anyDestinationSucceeded,centralFailed:i.entries.some(e=>e.kind===`central`&&e.outcome===`failed`),hostFailed:i.entries.some(e=>e.kind===`host`&&e.outcome===`failed`)})}let v=_.some(e=>e.centralFailed),y=_.every(e=>e.landed);if(g&&y&&!v){let t=null;try{await i.writeRecordedVersion(e,l),o({event:`user-skill-reclaim-version-recorded`,scope:`user`,version:l})}catch(e){t=e instanceof Error?e.message:String(e),o({event:`user-skill-reclaim-version-record-failed`,scope:`user`,version:l,error:t})}for(let{id:e,anyWritten:n}of _)s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:t===null?n?`installed`:`skip-current`:`failed`,version:l,...t===null?{}:{reason:`state-write-failed:${t}`}})}else{g||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,outcome:`failed`,version:l,reason:`bundle-unresolved`});for(let{id:e,centralFailed:t,hostFailed:n}of _)!t&&!n||s({ts:c(),surface:`cli-start`,target:`cli-hosts`,bundle:e,outcome:`failed`,version:l,reason:n?`all-writes-failed`:`central-write-failed`})}return{outcome:`done`,version:l,entries:h}}async function q(e){let t=e.logger??R,n=e.fs??I,r=e.home??P(),i={...L,...e.deps};if(e.reclaimDisableEnv===`1`)return t({event:`skill-repair-skipped`,reason:`reclaim-disabled`}),{status:`skipped`,reason:`reclaim-disabled`};let a=G(e.projectDir,r,i,n,t),o=await K(r,i,n,t),s=y(r),c=[],l=!1,u=!1;if(s.skillDirs.length>0||s.emptyDirs.length>0)if(e.confirmLegacyCleanup&&await e.confirmLegacyCleanup(s)){try{c=x(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 J(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 Y(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,o=e.project.entries.filter(e=>e.outcome===`skipped-global-collision`).length;t.push(` Project: ${n} present, ${r} created, ${i} no-token, ${a} failed.`),o>0&&t.push(` Skipped ${o} host(s) whose project config path is their user-global config (not a project directory).`)}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
- `)}function X(){return new h(`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 q({projectDir:E(process.cwd()),reclaimDisableEnv:process.env.OK_RECLAIM_DISABLE??null,confirmLegacyCleanup:t=>Z(t,{yes:e.yes===!0})});process.stdout.write(`${Y(t)}\n`),process.exitCode=J(t)})}async function Z(e,t){let n=P(),r=e=>`~/${T(n,e)}`,i=t.input??process.stdin,a=[``,v(`A previous version of OpenKnowledge installed its skill into agent tools you may never have used.`),g(`(Versions before 0.42 wrote to every host a third-party installer knew about — see issue #820.)`)];if(e.skillDirs.length>0&&a.push(``,`${v(`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(``,`${v(t)} ${e.emptyDirs.length}`,...e.emptyDirs.map(e=>` ${r(e)}`))}if(a.push(``,g(`Nothing outside these paths is touched. A directory that still holds anything is kept.`)),process.stdout.write(`${a.join(`
3
- `)}\n`),t.yes)return!0;if(!i.isTTY)return process.stdout.write(`${_("Not a terminal — skipping cleanup. Re-run with `ok repair-skills --yes` to remove these.")}\n`),!1;let o=F({input:i,output:process.stdout});try{let e=(await o.question(`\n${v(`Remove them?`)} ${g(`[y/N] `)}`)).trim().toLowerCase();return e===`y`||e===`yes`}finally{o.close()}}export{X as n,q as t};
4
- //# sourceMappingURL=repair-skills-CTJ78v6_.mjs.map
@@ -1 +0,0 @@
1
- import{t as e}from"./repair-skills-CTJ78v6_.mjs";export{e as repairSkills};
@@ -1,20 +0,0 @@
1
- import{o as e}from"./chunk-DTipWd-i.mjs";import{K as t,pt as n,q as r}from"./sleep-B416PNUo.mjs";import{bc as i,ho as a,it as o,rt as s,yc as c}from"./src-BxdlvOrw.mjs";import{Fn as l,at as u,it as d,ot as f,rt as p,ti as m,wi as h}from"./src-BEA-yn6c.mjs";import{D as g,F as _,I as v,k as y}from"./fs-traced-CJ0NSnI0.mjs";import{C as b,S as x,_ as S,d as C}from"./server-lock-BmwIVWMl.mjs";import{t as w}from"./yazl-DZr4PyKA.mjs";import{g as T,h as E,x as D}from"./resolve-project-root-CAzm4bRw.mjs";import{c as ee}from"./colors-BsmVIwfM.mjs";import{n as te}from"./acp-harness-probe-B-zYNbKH.mjs";import{E as O,T as k,_ as ne,b as re,o as A,w as j,x as M}from"./init-BzZZQKjK.mjs";import{n as N}from"./constants-CuvKewzN.mjs";import{t as P}from"./is-object-ByG7RnjH.mjs";import"./loader-gs03Z0wR.mjs";import"./skill-teardown-CwUORgAd.mjs";import"./preview-D-cqfvmS.mjs";import{execSync as ie,spawnSync as ae}from"node:child_process";import{basename as F,dirname as I,join as L,relative as oe,resolve as R,sep as se}from"node:path";import{cpSync as ce,createWriteStream as le,existsSync as z,lstatSync as ue,mkdirSync as B,mkdtempSync as de,readFileSync as V,readdirSync as fe,readlinkSync as pe,rmSync as me,statSync as he,writeFileSync as H}from"node:fs";import{arch as ge,freemem as _e,homedir as U,hostname as ve,platform as ye,release as be,tmpdir as xe,totalmem as Se,type as Ce,uptime as we}from"node:os";import"node:fs/promises";import{createHash as Te}from"node:crypto";var Ee=n();const De=new Set([`start`,`stop`,`status`,`clean`,`ui`,`mcp`,`preview`,`lint`,`deinit`,`auth`]);function Oe(e,t,n=l){if(e!==void 0&&!De.has(e))return null;let r=n(t);return r===null||r.distance===0?null:r.rootPath}let ke=null;function Ae(e){ke=e}function je(){return ke??process.cwd()}function Me(){return L(U(),`.ok`,`bug-reports`)}function Ne(e=new Date){let t=e.toISOString().replace(/[:.]/g,`-`),n=Me(),r=`${t}-bugreport`,i=L(n,`${r}.zip`);for(let e=2;z(i);e+=1)i=L(n,`${r}-${e}.zip`);return i}function Pe(e,t){let n=L(e,`.ok`,`config.yml`);if(z(n))try{let e=V(n,`utf8`).match(/^\s*name:\s*['"]?(.+?)['"]?\s*$/m);if(e?.[1])return e[1]}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml for project slug; using path-hash fallback`)}return z(L(e,`.ok`))?Te(`sha256`).update(R(e)).digest(`hex`).slice(0,12):null}function Fe(){let e={timestamp:new Date().toISOString(),platform:ye(),osType:Ce(),osRelease:be(),hostname:`[redacted]`,uptime:we(),freeMem:_e(),totalMem:Se(),nodeVersion:process.version,bunVersion:process.versions.bun??null,v8Version:process.versions.v8??null,pid:process.pid};try{e.macosVersion=ie(`sw_vers -productVersion 2>/dev/null`,m({encoding:`utf8`})).trim()}catch{}try{let t=L(__dirname,`..`,`..`,`package.json`);z(t)&&(e.okVersion=JSON.parse(V(t,`utf8`)).version)}catch{}return e}const Ie=[{prefix:`cli`,projectTagged:!0},{prefix:`desktop`,projectTagged:!1},{prefix:`mcp`,projectTagged:!1}];function Le(e){let t=F(e);return Ie.some(e=>e.projectTagged&&t.startsWith(`${e.prefix}.`))}function Re(e,t){return Ve(e,t).files}const ze=[`ShipIt_stderr.log`,`ShipIt_stdout.log`];function Be(e,t=te){let n=L(e,`${t}.ShipIt`);return z(n)?ze.map(e=>L(n,e)).filter(e=>z(e)):[]}function Ve(e,t){if(!z(t))return{files:[],excludedByProjectSlug:0};let n=fe(t).filter(e=>e.endsWith(`.log`)||/\.log\.\d+$/.test(e)).map(e=>L(t,e));if(!e)return{files:n,excludedByProjectSlug:0};let r=n.filter(Le),i=[],a=r.filter(t=>{try{return V(t,`utf8`).includes(`"project":"${e}"`)}catch{return i.push(t),!1}});if(a.length===0)return{files:n,excludedByProjectSlug:0};let o=new Set([...a,...i]);return{files:n.filter(e=>!Le(e)||o.has(e)),excludedByProjectSlug:r.length-o.size}}function He(e){let t=L(e,`.ok`,`local`);return z(t)?{files:[`server.lock`,`last-spawn-error.log`,s].map(e=>L(t,e)).filter(e=>z(e))}:{files:[]}}function Ue(e){let t=L(e,`.ok`,`local`,`logs`);return z(t)?{files:[`server-current.jsonl`,`server-prev.jsonl`].map(e=>L(t,e)).filter(e=>z(e))}:{files:[]}}function We(e){if(e.redact){let{redacted:t,patterns:n,lineCount:r}=i(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 W(e){for(let t of e.files)try{We({zipfile:e.zipfile,name:`${e.prefix}/${F(t)}`,content:V(t,`utf8`),redact:e.redact,bundleFiles:e.bundleFiles,redactions:e.redactions})}catch(n){e.logger?.warn({file:t,prefix:e.prefix,err:n},`bug-report: skipped unreadable file`)}}async function Ge(t){let{redact:n,outputPath:r,logger:i}=t,a=t.userLogsDir??L(U(),`.ok`,`logs`),o=t.projectDir?Pe(t.projectDir,i):null;B(I(r),{recursive:!0}),i?.info({projectSlug:o},`gathering diagnostic data`);let s=Fe();s.desktop=t.desktop??null,s.language=t.language??null;let{files:l,excludedByProjectSlug:u}=Ve(o,a),{files:d}=t.projectDir?He(t.projectDir):{files:[]},{files:f}=t.projectDir?Ue(t.projectDir):{files:[]},p=t.shipItLogFiles??[];i?.info({logFileCount:l.length,logFilesExcludedByProjectSlug:u,lockFileCount:d.length,localSinkFileCount:f.length,shipItLogFileCount:p.length},`files collected`);let m=[],h=[],{ZipFile:g}=await import(`./yazl-jVENrf5i.mjs`).then(t=>e(t.default,1)),_=new g;W({zipfile:_,files:[...l,...p],prefix:`logs`,redact:n,bundleFiles:h,redactions:m,logger:i}),W({zipfile:_,files:d,prefix:`lockdir`,redact:n,bundleFiles:h,redactions:m,logger:i}),W({zipfile:_,files:f,prefix:`local-logs`,redact:n,bundleFiles:h,redactions:m,logger:i});for(let e of t.extraFiles??[])try{let t=V(e.sourcePath),n=`extra/${e.zipName??F(e.sourcePath)}`;_.addBuffer(t,n),h.push(n)}catch(t){i?.warn({sourcePath:e.sourcePath,err:t},`extra file unreadable; omitted from bundle`)}t.note&&We({zipfile:_,name:`note.txt`,content:t.note,redact:n,bundleFiles:h,redactions:m});let v=JSON.stringify(s,null,2);_.addBuffer(Buffer.from(v,`utf8`),`sysinfo.json`),h.push(`sysinfo.json`);let y={generatedAt:new Date().toISOString(),disciplineVersion:`1.0.0`,projectSlug:o,files:h,redactions:m,sysinfo:s};_.addBuffer(Buffer.from(JSON.stringify(y,null,2),`utf8`),`MANIFEST.json`);let b=m.reduce((e,t)=>e+t.lineCount,0),x=new Set(p.map(e=>`logs/${F(e)}`)),S=h.filter(e=>x.has(e)),C=o?h.filter(e=>e.startsWith(`logs/`)&&!Le(e)&&!x.has(e)):[],w=[`# Bug Report Bundle`,``,`Generated: ${y.generatedAt}`,`Project: ${o??`(unscoped)`}`,`Discipline version: ${y.disciplineVersion}`,``,`## Contents`,``,...h.map(e=>`- ${e}`),``,`## Privacy`,``,...C.length>0?[`Scope: some collected logs are user-wide rather than project-scoped.`,`These are written once per machine per day and can contain activity`,`from other projects open on this machine, including captured console`,`output:`,...C.map(e=>`- ${e}`),``]:[],...S.length>0?[`Installer logs: written by the macOS update helper rather than by`,`OpenKnowledge itself, and machine-wide rather than scoped to any one`,`project. They record the install and update history of this app on`,`this machine. Only this app is collected, never other applications`,`that use the same update mechanism:`,...S.map(e=>`- ${e}`),``]:[],...n?[`This bundle was auto-redacted before packaging.`,`Patterns checked: ${c.join(`, `)}`,b>0?`${b} line(s) were scrubbed across ${m.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(`
2
- `);_.addBuffer(Buffer.from(w,`utf8`),`README.md`),_.end();let T=le(r);return _.outputStream.pipe(T),await new Promise((e,t)=>{T.on(`close`,e),T.on(`error`,t)}),i?.info({bundlePath:r,fileCount:h.length,redactionCount:b},`bundle written`),{zipPath:r,summary:{projectSlug:o,files:h,redactions:m,redactedLineCount:b,generatedAt:y.generatedAt}}}var Ke=e(w(),1),G=e(ee(),1);function qe(e){return v({absPath:y(`user`,e,e),sideline:!1,warn:()=>{}}).value.appearance?.language??`system`}function Je({home:e=U(),env:n=process.env}={}){let i=qe(e),{override:o,preferenceList:s}=g(n),{locale:c,source:l}=a({override:o,storedPreference:i,supportedLocales:r,preferenceList:s,autoDetectableLocales:t});return{preference:i,locale:c,source:l,systemLanguages:s}}function K(e,t){return t.length===0||!e.includes(t)?e:e.split(t).join(`<CONTENT_DIR>`)}function Ye(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function q(e,t){if(typeof e==`string`)return K(e,t.contentDir);if(Array.isArray(e))return e.map(e=>q(e,t));if(!Ye(e))return e;let n={};for(let[r,i]of Object.entries(e))n[r]=q(i,t);return n}function Xe(e,t){let n=V(e,`utf-8`);if(n.length===0)return;let r=n.endsWith(`
3
- `),i=n.split(`
4
- `),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=q(JSON.parse(n),t);a.push(JSON.stringify(e))}catch{a.push(n)}}}H(e,r?`${a.join(`
5
- `)}\n`:a.join(`
6
- `))}function Ze(e,t){let n=V(e,`utf-8`);if(n.trim().length!==0)try{let r=q(JSON.parse(n),t),i=n.endsWith(`
7
- `)?`
8
- `:``;H(e,`${JSON.stringify(r,null,2)}${i}`)}catch{let r=K(n,t.contentDir);r!==n&&H(e,r)}}function Qe(e,t){let n=V(e,`utf-8`),r=K(n,t.contentDir);r!==n&&H(e,r)}function $e(e){try{return fe(e,{withFileTypes:!0}).filter(e=>e.isFile()).map(t=>L(e,t.name))}catch{return[]}}const et=new Set([`agent-presence.json`,`agent-effects.json`,`runtime.json`]);function tt(e){return/\.log\.\d+$/.test(e)}function nt(e){return e.endsWith(`.jsonl`)||e.endsWith(`.log`)||tt(e)}function rt(e){let t={contentDir:e.contentDir};for(let n of[`telemetry`,`logs`,`process`])for(let r of $e(L(e.stagingDir,n)))nt(r)?Xe(r,t):r.endsWith(`.json`)?Ze(r,t):Qe(r,t);for(let n of $e(L(e.stagingDir,`state`))){let e=F(n);n.endsWith(`.jsonl`)?Xe(n,t):et.has(e)?Ze(n,t):Qe(n,t)}}const it=[`.ok`,`local`,`telemetry`],at=[`.ok`,`local`,`logs`],ot=[`.ok`,`local`,`loss-capture`],st=`spans-current.jsonl`,ct=`spans-prev.jsonl`,lt=`server-current.jsonl`,ut=`server-prev.jsonl`,dt=`loss-current.jsonl`,ft=`loss-prev.jsonl`;function pt(e){return L(e,...it,st)}function mt(e){return L(e,...it,ct)}function ht(e){return L(e,...at,lt)}function gt(e){return L(e,...at,ut)}function _t(e){return L(e,...ot,dt)}function vt(e){return L(e,...ot,ft)}const yt=1e3;async function bt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-presence`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}async function xt(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/agent-effects`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}async function St(e){try{let t=await fetch(`http://127.0.0.1:${e}/api/metrics/watcher-recent`,{signal:AbortSignal.timeout(yt)});return t.ok?await t.text():null}catch{return null}}function Ct(e){try{let t=JSON.parse(e);if(typeof t!=`object`||!t)return null;let n=t.decisions;return Array.isArray(n)?n.length===0?``:`${n.map(e=>JSON.stringify(e)).join(`
9
- `)}\n`:null}catch{return null}}function wt(e){let t=L(e,`.git`,`ok`);if(!z(t))return null;let n=ae(`git`,[`-C`,t,`log`,`--oneline`,`-50`],m({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Tt(e){let t=L(e,`.git`,`ok`);if(!z(t))return null;let n=ae(`git`,[`-C`,t,`for-each-ref`,`--sort=-creatordate`,`--count=50`,`--format=%(refname)%09%(creatordate:iso-strict)%09%(contents:subject)`,`refs/checkpoints/`],m({encoding:`utf-8`,timeout:2e3}));return n.error||n.status!==0?null:n.stdout??``}function Et(){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 Dt(){return{nodeVersion:process.version,platform:ye(),arch:ge()}}function Ot(){return process.env.OTEL_SDK_DISABLED===`false`}function J(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function kt(e){if(!z(e))return{};let t;try{t=(0,Ee.parse)(V(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(!J(t))return{};let n=t.telemetry;if(!J(n))return{};let r=n.localSink;return J(r)?r:{}}function At(e){return typeof e==`boolean`?e:void 0}function jt(e){return typeof e==`number`&&Number.isFinite(e)&&e>0?e:void 0}function Y(e){if(J(e))return jt(e.maxBytes)}function Mt(e){let t=kt(y(`project`,e)),n=kt(y(`project-local`,e));return{enabled:At(n.enabled)??At(t.enabled)??!0,spansMaxBytes:Y(n.spans)??Y(t.spans)??52428800,logsMaxBytes:Y(n.logs)??Y(t.logs)??26214400}}function Nt(e){return Te(`sha256`).update(e).digest(`hex`)}function Pt(e){let t=V(e),n=0;for(let e=0;e<t.length;e++)t[e]===10&&n++;return n}function Ft(e){let t=V(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 X(e,t){if(!z(e))return!1;try{return B(I(t),{recursive:!0}),ce(e,t),!0}catch{return!1}}function It(e){let t=[],n=e=>{let r=fe(e,{withFileTypes:!0});for(let i of r){let r=L(e,i.name);i.isDirectory()?n(r):i.isFile()&&t.push(r)}};return n(e),t.sort()}const Lt=new Set([`.jsonl`]);function Rt(e){let t=e.lastIndexOf(`.`);return t===-1?!1:Lt.has(e.slice(t))}const zt=new Set([`.jsonl`,`.json`,`.txt`,`.log`,`.lock`]);function Bt(e){if(tt(e))return!0;let t=e.lastIndexOf(`.`);return t===-1?!1:zt.has(e.slice(t))}function Vt(e){let t=[];for(let n of It(e)){let r=Ht(e,n);if(!Bt(r))continue;let{redacted:a,patterns:o,lineCount:s}=i(V(n,`utf-8`));o.length!==0&&(H(n,a),t.push({file:r,lineCount:s,patterns:o}))}return{redactions:t,redactedLineCount:t.reduce((e,t)=>e+t.lineCount,0)}}function Ht(e,t){return oe(e,t).split(se).join(`/`)}async function Ut(e){let t=R(e.contentDir),n=R(e.projectDir??e.contentDir),r=e.deps??{},i=r.fetchAgentPresence??bt,a=r.fetchAgentEffects??xt,c=r.fetchWatcherRecent??St,l=r.readShadowHead??wt,u=r.readCheckpointRefs??Tt,d=r.now??(()=>new Date),f=r.okVersion??(()=>N),p=r.readDesktopEnv??Et,m=r.readLanguage??Je,h=r.readRuntime??Dt,g=r.isOtlpPushEnabled??Ot,_=de(L(xe(),`ok-bundle-`));try{B(L(_,`telemetry`),{recursive:!0}),B(L(_,`logs`),{recursive:!0}),B(L(_,`state`),{recursive:!0}),X(pt(n),L(_,`telemetry`,st)),X(mt(n),L(_,`telemetry`,ct)),X(ht(n),L(_,`logs`,lt)),X(gt(n),L(_,`logs`,ut));for(let t of e.userLogFiles??[])X(t,L(_,`logs`,F(t)));let v=L(n,`.ok`,`local`),y=L(v,`server.lock`),b=`not-running`,x=`no server.lock`,S=null;if(z(y)){X(y,L(_,`state`,`server.lock`));try{let e=V(y,`utf-8`),t=JSON.parse(e);typeof t.port==`number`?S=t.port:x=`lock present but no port`}catch{x=`lock present but unparseable`}}if(S!==null){let e=await i(S);e===null?x=`agent-presence endpoint at :${S} unreachable`:(H(L(_,`state`,`agent-presence.json`),e),b=`running`,x=``);let t=await a(S);t!==null&&H(L(_,`state`,`agent-effects.json`),t);let n=await c(S);if(n!==null){let e=Ct(n);e!==null&&H(L(_,`state`,`watcher-recent.jsonl`),e)}}let C=l(t);C!==null&&H(L(_,`state`,`shadow-head.txt`),C);let w=u(t);w!==null&&H(L(_,`state`,`checkpoint-refs.txt`),w),X(_t(n),L(_,`state`,dt)),X(vt(n),L(_,`state`,ft)),X(L(v,`last-spawn-error.log`),L(_,`state`,`last-spawn-error.log`)),X(L(v,o),L(_,`state`,o)),X(L(v,s),L(_,`state`,s));let T=h(),E=p(),D=m(),ee={ok:{version:f(),nodeVersion:T.nodeVersion,platform:T.platform,arch:T.arch},host:{desktop:E,language:D}};H(L(_,`state`,`runtime.json`),`${JSON.stringify(ee,null,2)}\n`);let te=b===`running`?`running
10
- `:`not-running (${x})\n`;if(H(L(_,`state`,`server-status.txt`),te),e.processDir&&z(e.processDir)){let t=L(_,`process`);B(t,{recursive:!0}),ce(e.processDir,t,{recursive:!0})}let O=e.redact===!0;O&&rt({stagingDir:_,contentDir:t}),e.note&&H(L(_,`note.txt`),e.note);let k=null;e.scrubSecrets===!0&&(k=Vt(_));for(let t of e.extraFiles??[])X(t.sourcePath,L(_,`extra`,t.zipName??F(t.sourcePath)))||r.logger?.warn({sourcePath:t.sourcePath},`extra file missing; omitted from bundle`);let ne=Mt(n),re=It(_),A=[],j=0,M=0;for(let e of re){let t=Ht(_,e),n=he(e).size,r=Rt(t)?Pt(e):0;A.push({path:t,bytes:n,lines:r}),j+=n,t.startsWith(`telemetry/`)&&Rt(t)&&(M+=Ft(e))}let N={applied:O};k!==null&&(N.secretScrub=k);let P={schemaVersion:2,createdAt:d().toISOString(),ok:{version:f(),nodeVersion:T.nodeVersion,platform:T.platform,arch:T.arch},host:{desktop:E,language:D},contentDir:{pathSha256:Nt(t),absolutePath:O?`<CONTENT_DIR>`:t},telemetry:{localSink:ne,otlpPushEnabled:g()},redaction:N,serverStatus:b,files:A};H(L(_,`manifest.json`),`${JSON.stringify(P,null,2)}\n`);let ie=re.some(e=>{try{return V(e,`utf-8`).includes(t)}catch{return!1}}),ae={totalBytes:j,fileCount:A.length,docNameCount:M,contentDirVisible:ie,redacted:O},I=!1;return{stagingDir:_,manifest:P,summary:ae,cleanup:()=>{I||(I=!0,me(_,{recursive:!0,force:!0}))}}}catch(e){throw me(_,{recursive:!0,force:!0}),e}}async function Wt(e){let{collected:t,outputPath:n}=e,r=I(n);if(!z(r))throw Error(`ok diagnose bundle: parent directory does not exist: ${r}. Create it or pass --out with an existing parent.`);let i=new Ke.ZipFile,a=It(t.stagingDir);for(let e of a){let n=Ht(t.stagingDir,e);i.addFile(e,n)}i.end();let o=le(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 Gt(e,t){let n=L(e,`.ok`,`config.yml`);if(z(n))try{let t=(0,Ee.parse)(V(n,`utf-8`)),r=P(t)?t.content:void 0,i=P(r)?r.dir:void 0;if(typeof i==`string`&&i.length>0)return R(e,i)}catch(e){t?.warn({configPath:n,err:e},`bug-report: failed to read .ok/config.yml; falling back to project root as content dir`)}return R(e)}async function Kt(e,t,n,r){let i=Pe(t,e.logger),a=await Ut({contentDir:Gt(t,e.logger),projectDir:t,redact:e.redact,scrubSecrets:e.redact,note:e.note,extraFiles:e.extraFiles,userLogFiles:[...Re(i,e.userLogsDir??L(U(),`.ok`,`logs`)),...Be(e.cachesDir??L(U(),`Library`,`Caches`))],deps:{readDesktopEnv:n,readLanguage:r,logger:e.logger}});try{B(I(e.outputPath),{recursive:!0}),await Wt({collected:a,outputPath:e.outputPath});let t=a.manifest.redaction.secretScrub;return{zipPath:e.outputPath,summary:{level:`full`,systemWide:!1,projectSlug:i,files:a.manifest.files.map(e=>e.path),redactions:t?.redactions??[],redactedLineCount:t?.redactedLineCount??0,generatedAt:a.manifest.createdAt}}}finally{a.cleanup()}}async function qt(e){let{projectDir:t}=e,n=e.readDesktopEnv??Et,r=e.readLanguage??Je;if(e.level===`full`&&t!==void 0)return Kt(e,t,n,r);let{zipPath:i,summary:a}=await Ge({projectDir:t,redact:e.redact,outputPath:e.outputPath,userLogsDir:e.userLogsDir,shipItLogFiles:Be(e.cachesDir??L(U(),`Library`,`Caches`)),logger:e.logger,note:e.note,extraFiles:e.extraFiles,desktop:n(),language:r()});return{zipPath:i,summary:{level:e.level,systemWide:t===void 0,projectSlug:a.projectSlug,files:a.files,redactions:a.redactions,redactedLineCount:a.redactedLineCount,generatedAt:a.generatedAt}}}function Z(e,t,n={}){let r=C(e,t);if(!z(r))return{status:`missing`,lockPath:r};let i;try{i=JSON.parse(V(r,`utf-8`))}catch{return{status:`corrupt`,lockPath:r}}if(!i||typeof i!=`object`||!b(i.pid))return{status:`corrupt`,lockPath:r};let a=i;if(!(n.isAlive??x)(a.pid))return{status:`dead-pid`,lockPath:r,lock:a};if(typeof a.machineId==`string`)return a.machineId===(n.machineId??S())?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a};let o=n.host??ve();return a.hostname===o?{status:`alive`,lockPath:r,lock:a}:{status:`foreign-host`,lockPath:r,lock:a}}function Jt(e){return e.replace(/:\d+$/,``)}function Yt(e){let t=e.trim();if(!t)return null;{let e=/^https?:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`https`,hostname:Jt(e[1]),owner:e[2],name:e[3]}}{let e=/^ssh:\/\/(?:[\w.-]+@)?([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`ssh`,hostname:Jt(e[1]),owner:e[2],name:e[3]}}{let e=/^git:\/\/([^/?#]+)\/([\w.\-~%]+)\/([\w.\-~%]+?)(?:\.git)?\/?$/.exec(t);if(e)return{protocol:`git`,hostname:Jt(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}const Xt=/^# >>> open-knowledge cli >>>\n[\s\S]*?^# <<< open-knowledge cli <<<\n?/m;function Zt(e){return L(e,`Library`,`Application Support`,`OpenKnowledge`,`path-install.json`)}const Qt={existsSync:e=>z(e),readFileSync:(e,t)=>V(e,t),lstatSync:e=>ue(e),readlinkSync:e=>pe(e)};function $t(e,t=Qt){let n=Zt(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 en(e){let t=e.replace(Xt,``);return{text:t,changed:t!==e,emptyAfter:t.trim()===``}}function tn(e,t,n=Qt){try{return n.lstatSync(e).isSymbolicLink()?n.readlinkSync(e)===t:!1}catch{return!1}}function nn(e){return E(e)||T(e)||M(e)}const rn=10*1024*1024;function an(e,t,n,r){let i=A(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(!nn(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`?(me(a,{force:!0}),{kind:`removed`}):e.format===`toml`?cn(a,o):e.format===`yaml`?sn(a,e.topLevelKey,o):on(a,e.topLevelKey,e.serverMapSubKey,o)}function on(e,t,n,r){let i;try{i=V(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(i,`utf-8`)>rn)return{kind:`declined`,reason:`oversize`};let{text:a,changed:o}=O(i,ne(t,n,r));return o?(_(e,a,{mode:j(e)}),{kind:`removed`}):{kind:`not-present`}}function sn(e,t,n){let r;try{r=V(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}if(Buffer.byteLength(r,`utf-8`)>rn)return{kind:`declined`,reason:`oversize`};let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=(0,Ee.parseDocument)(a);if(o.errors.length>0)return{kind:`declined`,reason:`unparseable`};let s=[t,n];if(!o.hasIn(s))return{kind:`not-present`};o.deleteIn(s);let c=o.toString(),l=k(a);a.trim()===``||a.endsWith(`
11
- `)?c.endsWith(`
12
- `)||(c=`${c}\n`):c=c.replace(/\n+$/,``),l&&(c=c.replace(/\r\n/g,`
13
- `).replace(/\n/g,`\r
14
- `));let u=`${i?``:``}${c}`;return u!==r&&_(e,u,{mode:j(e)}),{kind:`removed`}}function cn(e,t){let n=re();if(n.backend===`fallback`)return{kind:`declined`,reason:`no-native-writer`};let r;try{r=V(e,`utf-8`)}catch{return{kind:`declined`,reason:`unparseable`}}let i=r.charCodeAt(0)===65279,a=i?r.slice(1):r,o=k(a),s=a.trim()===``||a.endsWith(`
15
- `),c;try{c=n.removeEntry(a,t)}catch{return{kind:`declined`,reason:`unparseable`}}if(!c.existed)return{kind:`not-present`};let l=c.text;s?l.endsWith(`
16
- `)||(l=`${l}\n`):l=l.replace(/\n+$/,``),o&&(l=l.replace(/\r\n/g,`
17
- `).replace(/\n/g,`\r
18
- `));let u=`${i?``:``}${l}`;return u!==r&&_(e,u,{mode:j(e)}),{kind:`removed`}}function ln(e){return e==null?!1:e.includes(`--type=utility`)&&e.includes(`--utility-sub-type=node.mojom.NodeService`)}function un(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 dn(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:d(r),command:r,isDesktop:ln(r)}}function fn(e){return e.ui==null?!1:e.ui.status===`alive`||e.ui.status===`foreign-host`}function Q(e){let t=e.server.status;return t===`alive`||t===`foreign-host`?e.isDesktop?`desktop`:t===`alive`?`running`:`foreign`:t===`dead-pid`&&fn(e)?`ui-orphan`:`stale`}const pn=new Set([`running`,`desktop`,`foreign`,`ui-orphan`]);function mn(e){switch(e){case`running`:return G.default.green(e);case`desktop`:return G.default.blue(e);case`foreign`:return G.default.cyan(e);case`ui-orphan`:return G.default.magenta(e);case`stale`:return G.default.yellow(e)}}function hn(e){return e==null?`—`:`${e.cpuPercent.toFixed(1)}% / ${e.memPercent.toFixed(1)}%`}function gn(e){return`${hn(e.server.usage)} | ${hn(e.ui?.usage??null)}`}function _n(e){return`${e.server.port===0?`(starting)`:String(e.server.port)} / ${e.ui==null||e.ui.status===`dead-pid`?`—`:String(e.ui.port)}`}function vn(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=Q(e),n=t===`ui-orphan`&&e.ui!=null?e.ui.pid:e.server.pid;return[e.directory,_n(e),gn(e),t,String(n),un(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=mn(Q(e))+` `.repeat(Math.max(0,(i[t]??0)-r.length))}o.push(n)}return o.join(` `).trimEnd()}),s=G.default.dim(`To stop a server: ok stop <port|pid|directory|all>`);return[a,...o,``,s].join(`
19
- `)}async function yn(e={}){let t=e.discover??p,n=e.inspect??Z,r=e.log??(e=>console.log(e)),i=e.resolveCommand??u,a=e.resolveUsage??f,o=await t(),s=[];for(let e of o){let t=n(e,`server`),r=n(e,`ui`),o=dn(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&&s.push(o)}if(e.json){let e=s.map(e=>({...e,displayStatus:Q(e)}));r(JSON.stringify(e,null,2));return}r(vn(e.all?s:s.filter(e=>pn.has(Q(e)))))}function bn(){return new D(`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 yn({all:t.all===!0||e===`all`,json:t.json===!0})})}function xn(e,t,n={}){let r=n.isAlive??x,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 Sn(e){let t=e.inspect??(t=>Z(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=xn(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 Cn(e,t=x){let n=await p(),r=null;for(let i of n){let n=Z(i,`server`),a=Z(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 wn(e){let t=Sn({lockDir:e});return t.failed.length>0&&(process.exitCode=1),t}function Tn(e){return new D(`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=Sn({lockDir:h(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 yn({});return}if(n===`all`){let e=await p();if(e.length===0){console.log(`No running open-knowledge servers found.`);return}let t=0;for(let n of e){let e=Z(n,`server`),r=Z(n,`ui`);!$(e,x)&&!$(r,x)||(wn(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 Cn(e);if(t===null){console.log(`No running open-knowledge server found with port or PID ${e}.`);return}wn(t);return}wn(h(R(je(),n)))})}export{je as _,Xt as a,$t as c,Z as d,qt as f,Me as g,Ne as h,an as i,en as l,Wt as m,Tn as n,tn as o,Ut as p,bn as r,Zt as s,Sn as t,Yt as u,Ae as v,Oe as y};
20
- //# sourceMappingURL=src-BNK2WY-u.mjs.map
@@ -1 +0,0 @@
1
- import{B as e,Cc as t,Fs as n,Ls as r,W as i,_s as a,g as o,ms as s,qs as c,v as l,vs as u}from"./src-BxdlvOrw.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Bt as w,C as T,Ca as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Da as M,Di as N,Dn as P,Dr as F,Dt as I,E as L,Ea as R,Ei as z,En as B,Er as V,Et as H,F as U,Fi as W,Fn as G,Fr as K,Ft as q,G as J,Gi as Y,Gn as X,Gr as Z,Gt as Q,H as $,Hi as ee,Hn as te,Ht as ne,I as re,Ii as ie,In as ae,Ir as oe,It as se,J as ce,Ji as le,Jn as ue,Jr as de,Jt as fe,K as pe,Ki as me,Kn as he,Kr as ge,Kt as _e,L as ve,Li as ye,Ln as be,Lr as xe,Lt as Se,M as Ce,Mi as we,Mn as Te,Mr as Ee,Mt as De,N as Oe,Ni as ke,Nn as Ae,Nr as je,Nt as Me,O as Ne,Oi as Pe,On as Fe,Or as Ie,Ot as Le,P as Re,Pi as ze,Pn as Be,Pr as Ve,Pt as He,Q as Ue,Qi as We,Qn as Ge,Qr as Ke,Qt as qe,R as Je,Ri as Ye,Rn as Xe,Rr as Ze,Rt as Qe,S as $e,Sa as et,Si as tt,Sn as nt,Sr as rt,St as it,T as at,Ta as ot,Tn as st,Tr as ct,Tt as lt,U as ut,Ui as dt,Un as ft,Ut as pt,V as mt,Vi as ht,Vn as gt,Vt as _t,W as vt,Wi as yt,Wn as bt,Wt as xt,X as St,Xi as Ct,Xn as wt,Xr as Tt,Xt as Et,Y as Dt,Yi as Ot,Yn as kt,Yr as At,Yt as jt,Z as Mt,Zi as Nt,Zn as Pt,Zr as Ft,Zt as It,_ as Lt,_a as Rt,_i as zt,_n as Bt,_r as Vt,_t as Ht,a as Ut,aa as Wt,ai as Gt,an as Kt,ar as qt,at as Jt,b as Yt,ba as Xt,bi as Zt,bn as Qt,br as $t,bt as en,c as tn,ca as nn,ci as rn,cn as an,cr as on,ct as sn,d as cn,da as ln,di as un,dn,dr as fn,ea as pn,ei as mn,en as hn,er as gn,et as _n,f as vn,fa as yn,fi as bn,fn as xn,fr as Sn,g as Cn,ga as wn,gi as Tn,gn as En,gr as Dn,gt as On,h as kn,ha as An,hi as jn,hn as Mn,hr as Nn,i as Pn,ia as Fn,ii as In,in as Ln,ir as Rn,it as zn,j as Bn,ji as Vn,jn as Hn,jr as Un,jt as Wn,k as Gn,ki as Kn,kn as qn,kr as Jn,kt as Yn,l as Xn,la as Zn,li as Qn,ln as $n,lr as er,lt as tr,m as nr,ma as rr,mi as ir,mn as ar,mr as or,n as sr,na as cr,ni as lr,nn as ur,nr as dr,nt as fr,o as pr,oa as mr,oi as hr,on as gr,or as _r,ot as vr,p as yr,pa as br,pi as xr,pn as Sr,pr as Cr,q as wr,qi as Tr,qn as Er,qr as Dr,qt as Or,r as kr,ra as Ar,ri as jr,rn as Mr,rr as Nr,rt as Pr,s as Fr,sa as Ir,si as Lr,sn as Rr,sr as zr,st as Br,t as Vr,ta as Hr,ti as Ur,tn as Wr,tr as Gr,tt as Kr,u as qr,ua as Jr,ui as Yr,un as Xr,ur as Zr,v as Qr,va as $r,vi as ei,vn as ti,vr as ni,vt as ri,w as ii,wa as ai,wi as oi,wn as si,wr as ci,wt as li,x as ui,xa as di,xi as fi,xn as pi,xr as mi,xt as hi,y as gi,ya as _i,yi as vi,yn as yi,yr as bi,yt as xi,z as Si,zi as Ci,zn as wi,zr as Ti,zt as Ei}from"./src-BEA-yn6c.mjs";import{C as Di,E as Oi,T as ki,_ as Ai,b as ji,c as Mi,d as Ni,g as Pi,i as Fi,l as Ii,m as Li,n as Ri,p as zi,s as Bi,t as Vi,u as Hi,v as Ui,w as Wi,x as Gi,y as Ki}from"./fs-traced-CJ0NSnI0.mjs";import{a as qi,d as Ji,f as Yi,i as Xi,l as Zi,n as Qi,r as $i,t as ea,u as ta}from"./logger-DFxEUjvj.mjs";import{C as na,S as ra,_ as ia,a as aa,b as oa,c as sa,d as ca,g as la,h as ua,i as da,l as fa,m as pa,n as ma,o as ha,p as ga,r as _a,s as va,t as ya,u as ba,x as xa}from"./server-lock-BmwIVWMl.mjs";export{$r as AGENT_ID_MAX_LEN,_i as AGENT_ID_RE,ze as AGENT_WRITE_ORIGIN,ot as AcpPermissionStore,et as AcpRegistry,Kn as AcpThreadManager,N as AgentFocusBroadcaster,z as AgentPresenceBroadcaster,W as AgentSessionCapacityError,ie as AgentSessionManager,Ht as AutoStartDisabledError,ci as BUNDLE_IDS,ct as BUNDLE_SCOPE,V as BUNDLE_SKILL_NAME,Nr as BacklinkIndex,me as CC1Broadcaster,r as CC1_CONTRACT_VERSION,Bt as CONFIG_FILENAME,Pt as CONFLICT_MARKER_RE,Dr as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Lt as ConfigSchema,We as DEFAULT_CHECKPOINT_RETENTION,bn as DEFAULT_EMBEDDINGS_DIMENSIONS,ne as DEFAULT_PACK_ID,mt as DocumentDurabilityState,xr as EMBEDDINGS_API_KEY_ENV,st as ExposureConsentError,E as FEATURED_AGENT_IDS,f as FILE_SYSTEM_WRITER,Gr as FILE_WATCHER_ORIGIN,hr as FileEmbeddingsBackend,Ln as GIT_PREFLIGHT_FAIL_SPAN_NAME,pn as GIT_UPSTREAM_WRITER,R as GitDirAccessError,gr as GitNotAvailableError,Rr as GitTooOldError,ri as HOCUSPOCUS_AUTH_REJECTION_REASONS,xi as HocuspocusAuthRejection,en as HocuspocusAuthTokenSchema,m as INSTALLED_AGENTS_SCHEMES,sn as JSON_SCHEMA_DIALECT_2020_12,n as LINEAGE_EPOCH_KEY,Je as LIVE_DERIVED_INDEX_DEBOUNCE_MS,pt as LOG_MD_TEMPLATE,I as MANAGED_RENAME_ORIGIN,_ as MAX_ACP_THREADS,ye as MAX_AGENT_SESSIONS,we as MCP_CONNECTION_ID_HEADER,s as MCP_SERVER_NAME,Ye as MIN_EVICTABLE_IDLE_MS,an as MIN_GIT_VERSION,$ as MISSING_OK_CONFIG_MESSAGE,M as MalformedGitPointerError,_n as McpLogger,ut as MissingOkConfigError,S as OBSERVER_SYNC_ORIGIN,ti as OK_OKIGNORE_TEMPLATE,F as ONBOARDING_BUNDLE_IDS,a as ORPHAN_MODES,t as PROTOCOL_VERSION,ea as PinoLogger,sa as ProcessLockCollisionError,Xn as ProjectGitInitError,Le as ROLLBACK_ORIGIN,yi as ROOT_GITIGNORE_TEMPLATE,oa as RUNTIME_VERSION,Hr as SERVICE_WRITER,bi as SKILL_INSTALL_EVENTS_FILE_REL,e as SKILL_STATE_TARGETS,xt as STARTER_FOLDERS,Q as STARTER_FOLDER_FRONTMATTER_FILENAME,_e as STARTER_PACKS,Or as STARTER_PACK_IDS,fe as STARTER_TEMPLATES,at as STATE_MANIFEST_FILENAME,xa as STATE_SCHEMA_VERSION,c as SYSTEM_DOC_NAME,hn as SeedPrerequisiteError,Wr as SeedRootDirError,ya as ServerLockCollisionError,Vr as SingleFileNotAFileError,sr as SingleFileNotFoundError,kr as SingleFileNotMarkdownError,L as StateManifestError,dr as TagIndex,Ie as USER_GLOBAL_BUNDLE_IDS,He as UiLockCollisionError,Yn as __getShowAllWalkStatsForTesting,b as __resetShowAllWalkStatsForTesting,fa as acquireProcessLock,ma as acquireServerLock,q as acquireUiLock,Ci as applyAgentMarkdownWrite,kt as applyExternalChange,_t as applySeed,j as assertCompatibleStateManifest,$n as assertGitAvailable,be as assertNeverDiskEvent,Pe as attachAcpThreadSocket,On as attachIdleShutdown,Qr as bootServer,qt as buildAndOpenSkill,Qt as buildConfigYmlContent,Dt as buildExecResult,B as buildIngressPolicy,Vn as buildOkMcpStdioCommand,mi as buildSkillZip,jt as buildStarterFolderFrontmatterYaml,cr as buildWipTree,Jn as bundleSkillMdPath,Lr as canonicalProjectKey,Xe as classifyEvents,Vi as classifyFsPath,rn as clearAllEmbeddingsKeys,jn as clearContributors,Et as coercePackId,o as colorFromSeed,Ar as commitUpstreamImport,Fn as commitWip,Wt as commitWipFromTree,Xr as compareSemver,Ee as composeEffectiveLinterConfig,je as composeFrontmatterSchemasConfig,Ge as containsConflictMarkers,wi as contentHash,Tn as contributorCount,Re as countShadowObjects,U as countStaleAgentWipRefs,re as countWipRefs,Wn as createApiExtension,H as createAssetServeMiddleware,J as createCollaborationHost,Z as createContentFilter,ge as createContentFilterAsync,Qn as createEmbeddingsSecretStore,Pn as createEphemeralProjectDir,wt as createExternalChangeHandler,vn as createFileLogger,Si as createLiveDerivedIndexExtension,wr as createMcpHttpHandler,mn as createOsProbe,Oe as createPersistenceExtension,T as createServer,Bn as createServerObserverExtension,dt as createStreamingErrorWriter,Qi as createTestLogger,Yr as describeStoredEmbeddingsKey,Cn as detectClaudeDesktopPresence,dn as detectGit,Ne as detectProjectShape,_r as detectUserSkillHosts,Pr as discoverLockDirs,oe as discoverMarkdownlintConfig,Kt as emitPreflightFailureSpan,St as encodeDocName,Mt as encodeFolderRoute,Ue as encodeSkillRoute,qr as ensureProjectGit,pi as ensureProjectSkillGitignore,yt as errorResponse,C as evictStaleTrackerEntries,De as extractHeadings,zn as extractOkBinaryPath,Rn as extractWikiLinksFromMarkdown,xn as fallbackPaths,cn as findEnclosingGitRoot,G as findEnclosingProjectRoot,xe as findNativeMarkdownlintFile,yr as flushFileLogger,hi as formatAuthRejectionWire,zt as formatContributors,ei as formatContributorsFrom,Ei as formatPackRationale,mr as gcCheckpointRefs,Kr as getCurrentMcpLogger,P as getIngressContext,tt as getLocalDir,nr as getLogFilePath,$i as getLogger,kn as getLogsDir,ia as getMachineId,Ki as getMeter,br as getMetrics,ji as getTracer,rr as handleCollabSocketError,de as handleSpawnCursor,Fe as hasForwardingHeaders,ve as hasGcLogLatch,l as iconFromClientName,An as incrementCollabSocketFilteredError,wn as incrementServerObserverFire,nt as initContent,Ir as initShadowRepo,Gi as initTelemetry,Yt as initToleranceTelemetryWriter,tr as installJsonSchemaDialect,Br as installPrettyZodErrors,Xi as installTestLoggers,zr as installUserSkill,Be as isAllowedApiOrigin,Te as isAllowedWorkspaceHostHeader,Tr as isConfigDoc,it as isHocuspocusAuthRejectionReason,qn as isHostAdmitted,It as isKnownPackId,le as isLinkIndexExcludedDoc,Ae as isLoopbackAddress,Ot as isManagedArtifactDoc,v as isOriginAdmitted,u as isOrphanMode,ht as isPairedWriteOrigin,At as isPathWithinDir,Hn as isPeerAdmitted,ra as isProcessAlive,ae as isProjectRoot,Ct as isReservedForUserTree,gt as isSelfWrite,Nt as isSystemDoc,ui as isToleranceTelemetryEnabled,na as isValidLockPid,te as lastKnownHash,nn as listRescueCheckpoints,qe as listStarterPacks,ai as loadCustomAgents,Ce as loadPrincipal,ba as lockBaseUrl,ca as lockFilePath,qi as loggerFactory,Zi as logsCurrentPath,ta as logsPreviousPath,un as makeLazyEmbeddingsKeyStore,_a as markServerLockDraining,vt as mountMcpAndApi,Ri as normalizeFsPath,y as originGitHubHost,O as packageVersionMajorMinor,A as parseAuthRejectionWire,Sr as parseGitVersion,li as parseHocuspocusAuthToken,pe as parseKeepaliveConnectionId,ft as pathToDocName,w as planSeed,Ut as prepareSingleFileOpen,Jt as processCommand,vr as processUsage,Zr as readAllTargets,fn as readBundleDecision,Ze as readOwnNativeRules,ga as readProcessLock,pa as readProcessLockDetailed,x as readProjectHeadState,Gt as readProjectLocalSemanticConfig,da as readServerLock,Sn as readServerPackageVersion,Cr as readSkillInstallStateSnapshot,Gn as readStateManifest,or as readTargetRecordedAt,Nn as readTargetVersion,se as readUiLock,p as reconcile,vi as recordContributor,$t as recordSkillInstallEvent,ce as registerAllTools,bt as registerWrite,ua as releaseProcessLock,aa as releaseServerLock,Se as releaseUiLock,X as removeLastKnownHash,er as reportSkillInstall,Rt as resetMetrics,on as resolveBuiltinSkillHosts,i as resolveBundleEnabled,rt as resolveBundledSkillDir,D as resolveContentDir,Tt as resolveCursorBinaryDefault,Ft as resolveCursorSpawnInvocation,Ve as resolveEffectiveLinterConfig,ir as resolveEmbeddingsCredential,oi as resolveLockDir,K as resolveNativeConfigForDoc,Ti as resolveNativeMarkdownlintConfig,h as resolvePack,Fr as resolvePackageVersion,ni as resolveSkillInstallReportSettings,d as resolveUiInfo,Zt as restoreContributors,gi as restoreLifecycleFromConflictsJson,jr as rewriteMarkdownLinksForDocumentRename,In as rewriteWikiLinksForDocumentRename,ar as runAuthReposSubprocess,Mn as runAuthStatusSubprocess,ur as runCloneSubprocess,En as runDeviceFlowSubprocess,fr as runWithMcpLogger,lr as safeContentPath,Me as safeSubdir,Zn as safetyCheckpoint,ke as sanitizeClientName,Jr as saveInMemoryCheckpoint,ln as saveVersion,lt as seedBasenameIndex,pr as serializeError,Di as setActiveSpanAttributes,ee as setupServerObservers,yn as shadowGit,Wi as shutdownTelemetry,Ji as spansCurrentPath,Yi as spansPreviousPath,Ke as spawnDetached,gn as splitMarkdownBlocks,he as startWatcher,Y as streamingProblemEvent,fi as swapContributors,$e as teardownToleranceTelemetryWriter,Xt as toBroadcasterKey,Fi as tracedAppendFileSync,Bi as tracedLinkSync,Mi as tracedMkdir,Ii as tracedMkdirSync,Hi as tracedRename,Ni as tracedRenameSync,zi as tracedRmSync,Li as tracedRmdirSync,Pi as tracedUnlinkSync,Ai as tracedWriteFile,Ui as tracedWriteFileSync,ii as trustSystemCertificates,tn as untrackTrackedProjectSkillProjection,Er as updateLastKnownHash,la as updateProcessLockPort,ha as updateServerLockPort,Qe as updateUiLockPort,di as validateAgentId,Mr as validateCloneInputs,k as validateSkillZip,va as waitForServerLockDrain,Ur as withHiddenWindowsConsole,ki as withSpan,Oi as withSpanSync,Dn as writeBundleDecision,Un as writeMarkdownlintRule,si as writeRootGitignoreForNewRepo,g as writeStateManifest,Vt as writeTargetVersion,ue as writeTracker};
@@ -1 +0,0 @@
1
- import"./src-BxdlvOrw.mjs";import"./resolve-project-root-CAzm4bRw.mjs";import"./src-BNK2WY-u.mjs";import"./acp-harness-probe-B-zYNbKH.mjs";import"./init-BzZZQKjK.mjs";import{n as e}from"./loader-gs03Z0wR.mjs";import"./skill-teardown-CwUORgAd.mjs";import"./preview-D-cqfvmS.mjs";import"./mcp-migrate-event-B1gJf6bG.mjs";export{e as loadConfig};
@@ -1 +0,0 @@
1
- import{T as e,_ as t,m as n,n as r}from"./start-sc9lI5yb.mjs";export{r as bootStartServer,n as resolveBundledReactShellDir,t as resolveHost,e as startCommand};