@inkeep/open-knowledge 0.68.6 → 0.68.7-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (152) hide show
  1. package/dist/{acp-harness-probe-Dd0_vY88.mjs → acp-harness-probe-DLFBL9zA.mjs} +2 -2
  2. package/dist/assets/skills/project/SKILL.md +3 -3
  3. package/dist/{chunk-KX3P26DQ-KA7oOKfS.mjs → chunk-KX3P26DQ-Bp2m2ndV.mjs} +2 -2
  4. package/dist/cli.mjs +29 -29
  5. package/dist/config-schema.json +1 -1
  6. package/dist/config.project-local.schema.json +1 -1
  7. package/dist/constants-l_Mh_2cY.mjs +2 -0
  8. package/dist/{fs-traced-C8gNIaHq.mjs → fs-traced-DgX7lP1u.mjs} +2 -2
  9. package/dist/fs-traced-Q0dJJRAw.mjs +1 -0
  10. package/dist/{git-handle-C9RU-MxT.mjs → git-handle-C0onz3KH.mjs} +2 -2
  11. package/dist/git-handle-GcGVb-Kt.mjs +1 -0
  12. package/dist/index.d.mts +17 -17
  13. package/dist/index.mjs +60 -60
  14. package/dist/init-ChkWF7Ve.mjs +1 -0
  15. package/dist/{init-CM8I2X5C.mjs → init-WHm32sqo.mjs} +34 -34
  16. package/dist/{launch-json-removal-CCYps2DF.mjs → launch-json-removal-DDMK-FZ7.mjs} +2 -2
  17. package/dist/loader-CV40sJRz.mjs +1 -0
  18. package/dist/{loader-DhglZWNe.mjs → loader-blWbVH19.mjs} +2 -2
  19. package/dist/md-manager--OJ_B4tb.mjs +2 -0
  20. package/dist/{open-browser-DxgGjEoj.mjs → open-browser-B_nKA6SN.mjs} +2 -2
  21. package/dist/parse-worker.mjs +1 -1
  22. package/dist/preview-Bhl0Wd50.mjs +1 -0
  23. package/dist/{preview-DuaQ0yaD.mjs → preview-D8DwbJMA.mjs} +2 -2
  24. package/dist/public/assets/{ActivityModeContent-Co1JyqXQ.js → ActivityModeContent-iAy7Htyr.js} +1 -1
  25. package/dist/public/assets/{AddPropertiesButton-b5lnEVKK.js → AddPropertiesButton-BKA885SM.js} +2 -2
  26. package/dist/public/assets/{AgentDiffPane-DSyEDn_Y.js → AgentDiffPane-C7KIvUPF.js} +1 -1
  27. package/dist/public/assets/{AgentThreadClientBinder-g9d9BU09.js → AgentThreadClientBinder-D1mSPUsr.js} +1 -1
  28. package/dist/public/assets/{BugReportHistory-BYU251NU.js → BugReportHistory-C2-fO6T3.js} +1 -1
  29. package/dist/public/assets/{BugReportHistoryDialog-wi8j2imF.js → BugReportHistoryDialog-Cdci6g1O.js} +1 -1
  30. package/dist/public/assets/{CodeMirrorPropInput-2n_88FNl.js → CodeMirrorPropInput-cqsfRNDV.js} +1 -1
  31. package/dist/public/assets/{ConsentDialogBody-D2QQqLvP.js → ConsentDialogBody-BHbzcNb7.js} +1 -1
  32. package/dist/public/assets/{DiffViewBoundary-BIjXbCNm.js → DiffViewBoundary-BDQV_30P.js} +1 -1
  33. package/dist/public/assets/{DocumentContext-C1MDqUGQ.js → DocumentContext-DOMEoUbL.js} +1 -1
  34. package/dist/public/assets/{EditorModeToggle-PGfji8Z4.js → EditorModeToggle-cEaO7U1B.js} +1 -1
  35. package/dist/public/assets/{EnableSyncConfirmDialog-D73cTIc2.js → EnableSyncConfirmDialog-CxKyhSRR.js} +1 -1
  36. package/dist/public/assets/{ExcalidrawDocEditor-DLYL4uLQ.js → ExcalidrawDocEditor-Bw1wZL5r.js} +1 -1
  37. package/dist/public/assets/FeedbackForm-D0S2l1ev.js +1 -0
  38. package/dist/public/assets/{GraphPanel-DODcHiM6.js → GraphPanel-r8Gqxdvr.js} +1 -1
  39. package/dist/public/assets/{ImportSkillDialog-SFJoXCHy.js → ImportSkillDialog-BHRZuf__.js} +1 -1
  40. package/dist/public/assets/{LintConfigEditor-cz4oBJkn.js → LintConfigEditor-DaQG-dlP.js} +1 -1
  41. package/dist/public/assets/{ManagedArtifactProperties-DVYEs_-t.js → ManagedArtifactProperties-BDuoxjvO.js} +1 -1
  42. package/dist/public/assets/ManagedArtifactProperties-BpjEvg_3.js +1 -0
  43. package/dist/public/assets/{MermaidDocEditor-BnbvkIUa.js → MermaidDocEditor-DudmyU3i.js} +1 -1
  44. package/dist/public/assets/{PropertyDisplayRow-DoKlSeCY.js → PropertyDisplayRow-C9iyg7W9.js} +1 -1
  45. package/dist/public/assets/{ReportBugDialogBody-Cn9kuPrd.js → ReportBugDialogBody-t1LnS7cf.js} +1 -1
  46. package/dist/public/assets/{ReportBugMenuTrigger-BWaaWbbQ.js → ReportBugMenuTrigger-BaIKHhOn.js} +2 -2
  47. package/dist/public/assets/{SchemaConfigEditor-BqXzeHB3.js → SchemaConfigEditor-BLIfeCsm.js} +1 -1
  48. package/dist/public/assets/{SessionsHost-C1OZt5vc.js → SessionsHost-DuAZF3Zj.js} +2 -2
  49. package/dist/public/assets/{SettingsDialogBody-DQtkh-bL.js → SettingsDialogBody-txHlPNWp.js} +1 -1
  50. package/dist/public/assets/{ShareBranchSwitchDialog--N1Bd5qo.js → ShareBranchSwitchDialog-CgntPdis.js} +1 -1
  51. package/dist/public/assets/{ShareReceiveDialog-By6mslOj.js → ShareReceiveDialog-C5Rig4O-.js} +1 -1
  52. package/dist/public/assets/{ShareReceiveMissDialog-DrHrN8Zh.js → ShareReceiveMissDialog-D6-ck0Uu.js} +1 -1
  53. package/dist/public/assets/{SkillCostValue-CkONMU96.js → SkillCostValue-BMSdP6MA.js} +1 -1
  54. package/dist/public/assets/{SkillEditBanner-BkN4Vlyo.js → SkillEditBanner-D_nkf6Qd.js} +1 -1
  55. package/dist/public/assets/{SkillForkDialog-Bkhm9FwF.js → SkillForkDialog-D2HU42pf.js} +1 -1
  56. package/dist/public/assets/{SkillInstallMenu-DPBO7ZLl.js → SkillInstallMenu-Bcy54X0U.js} +1 -1
  57. package/dist/public/assets/{SkillOriginInline-DqGgPWeD.js → SkillOriginInline-CwgwWmps.js} +1 -1
  58. package/dist/public/assets/{SkillToolbarControls-kSIovUXj.js → SkillToolbarControls-B8Ab7ngc.js} +1 -1
  59. package/dist/public/assets/{SlidesToolbarControls-CloREzdd.js → SlidesToolbarControls-Dz6effyN.js} +1 -1
  60. package/dist/public/assets/{SourceEditor-DxcW7Ji4.js → SourceEditor-CrOhJB84.js} +1 -1
  61. package/dist/public/assets/{TerminalPanel-zXPIa6n_.js → TerminalPanel-MpZfhb9K.js} +1 -1
  62. package/dist/public/assets/{TerminalWindowApp-Cpr1PRtm.js → TerminalWindowApp-BP8AoRew.js} +1 -1
  63. package/dist/public/assets/{TextDocEditor-CNvGi20m.js → TextDocEditor-BOdJgOXT.js} +1 -1
  64. package/dist/public/assets/{ThreadView-BdfdaWKJ.js → ThreadView-BsHCDmQB.js} +1 -1
  65. package/dist/public/assets/{TimelineDiffPane-BIR2lWwH.js → TimelineDiffPane-DDVqWMSH.js} +1 -1
  66. package/dist/public/assets/{agent-diff-store-_WIhmrnK.js → agent-diff-store-CQtqUq4i.js} +1 -1
  67. package/dist/public/assets/{auth-state-cache-BCDkELSW.js → auth-state-cache-CgquP1B2.js} +1 -1
  68. package/dist/public/assets/{bug-report-send-manager-BhNwFXTM.js → bug-report-send-manager-B4I-UPj9.js} +1 -1
  69. package/dist/public/assets/client-version-BEh3tGFq.js +1 -0
  70. package/dist/public/assets/{comment-chips-SxWcQbb_.js → comment-chips-CNyMXpWs.js} +1 -1
  71. package/dist/public/assets/{config-provider-CFXUtiwu.js → config-provider-qLyaitI2.js} +1 -1
  72. package/dist/public/assets/{dist-CDr44_5B.js → dist-D6JA916i.js} +1 -1
  73. package/dist/public/assets/{doc-hash-CbPdvdAA.js → doc-hash-Dx9hwyex.js} +1 -1
  74. package/dist/public/assets/{documents-events-CRdjzLAr.js → documents-events-DR8HEJoe.js} +1 -1
  75. package/dist/public/assets/{file-tree-adapter-Bg4PgS4F.js → file-tree-adapter-C4gKqxzg.js} +1 -1
  76. package/dist/public/assets/{file-tree-utils-Dt-qVN4W.js → file-tree-utils-DGw50SVS.js} +1 -1
  77. package/dist/public/assets/{folder-config-api-Do2u-Rpg.js → folder-config-api-D4N0ED0-.js} +1 -1
  78. package/dist/public/assets/i18n-Bl2radzN.js +1 -0
  79. package/dist/public/assets/{index-DWEZyyUh.js → index-r_qRX3GR.js} +7 -7
  80. package/dist/public/assets/{launcher-selection-BtAC_6OE.js → launcher-selection-BZDeoOtN.js} +1 -1
  81. package/dist/public/assets/{lint-config-client-C7Do4K-V.js → lint-config-client-DBF47lRL.js} +1 -1
  82. package/dist/public/assets/{markdownlint-rule-browser-BuLeocmZ.js → markdownlint-rule-browser-CF1tj7Rc.js} +1 -1
  83. package/dist/public/assets/{page-list-cache-VMIjzKn4.js → page-list-cache-DZPKVqeA.js} +1 -1
  84. package/dist/public/assets/{pending-receive-nav-store-DWGtNmXZ.js → pending-receive-nav-store-BwS0HcBd.js} +1 -1
  85. package/dist/public/assets/{progress-mhZcxRBo.js → progress-CzJ7mESr.js} +1 -1
  86. package/dist/public/assets/{project-paths-BhoLIJti.js → project-paths-BGMK3dxo.js} +1 -1
  87. package/dist/public/assets/{prop-types-CUmrzSW1.js → prop-types-gfjew8MI.js} +1 -1
  88. package/dist/public/assets/{receive-store-D2_q1wUu.js → receive-store-OL80o-sI.js} +1 -1
  89. package/dist/public/assets/{selection-context-EAVqhQEK.js → selection-context-DI5wlbAC.js} +1 -1
  90. package/dist/public/assets/{skill-scope-NCYHirwV.js → skill-scope-D9dg7q4P.js} +1 -1
  91. package/dist/public/assets/{skills-api-Dz_rVA1C.js → skills-api-BU5k9WYz.js} +1 -1
  92. package/dist/public/assets/{src-DuGGvfdD.js → src-CgbeuLkc.js} +1 -1
  93. package/dist/public/assets/{startup-marks-BPR5ipj8.js → startup-marks-Ml5LD4ks.js} +1 -1
  94. package/dist/public/assets/{tag-pill-input-CYAsZCew.js → tag-pill-input-vfk8h50K.js} +1 -1
  95. package/dist/public/assets/{target-navigation-intent-CYAnPRok.js → target-navigation-intent-Dpq3EXpz.js} +1 -1
  96. package/dist/public/assets/{telemetry-impl-Cx5oP3TZ.js → telemetry-impl-CPT6yQPK.js} +1 -1
  97. package/dist/public/assets/{telemetry-startup-kezMCRHJ.js → telemetry-startup-BmgX6zXI.js} +1 -1
  98. package/dist/public/assets/{terminal-cli-display-jaULlk-O.js → terminal-cli-display-XU6hL6_q.js} +1 -1
  99. package/dist/public/assets/{terminal-command-events-D5gbDNfs.js → terminal-command-events-DBrAYz2u.js} +1 -1
  100. package/dist/public/assets/{typing-burst-detector-Dc6Z0dV2.js → typing-burst-detector-CFwuUzqv.js} +1 -1
  101. package/dist/public/assets/{uninstall-DAcZS1HG.js → uninstall-DAfbja6D.js} +1 -1
  102. package/dist/public/assets/{use-activity-panel-C8rnLWCk.js → use-activity-panel-DDXrfY-K.js} +1 -1
  103. package/dist/public/assets/{use-apply-config-color-theme-C3t6RLOI.js → use-apply-config-color-theme-D-13D2Xt.js} +1 -1
  104. package/dist/public/assets/{use-collab-url-CUI36lWb.js → use-collab-url-CqeAlJNl.js} +1 -1
  105. package/dist/public/assets/{use-conflicts-CBdH6psn.js → use-conflicts-CXDbJNoF.js} +1 -1
  106. package/dist/public/assets/{use-live-xterm-theme-mYE4hguI.js → use-live-xterm-theme-aXDStBRf.js} +1 -1
  107. package/dist/public/assets/{use-open-skill-1xuIk7AK.js → use-open-skill--yVdWHLf.js} +1 -1
  108. package/dist/public/assets/{use-settings-route-C_HC7gny.js → use-settings-route-WFqgyKMc.js} +1 -1
  109. package/dist/public/assets/{use-skill-origin-BKe9dbHW.js → use-skill-origin-M6b5sY_s.js} +1 -1
  110. package/dist/public/assets/{use-skills-BhaOexz2.js → use-skills-dKHpTH68.js} +1 -1
  111. package/dist/public/assets/{use-terminal-enabled-M2ci--Ho.js → use-terminal-enabled-DWnQ-hY2.js} +1 -1
  112. package/dist/public/assets/{use-timeline-entry-diff-CIsFdF1_.js → use-timeline-entry-diff-BLDu0nkY.js} +1 -1
  113. package/dist/public/assets/{use-workspace-BHq7gCE9.js → use-workspace-DAuqjfCS.js} +1 -1
  114. package/dist/public/index.html +49 -49
  115. package/dist/public/uninstall.html +3 -3
  116. package/dist/{repair-launch-json-B4lEM4O3.mjs → repair-launch-json-sGD5dGmJ.mjs} +2 -2
  117. package/dist/{repair-mcp-configs-CeseMRbG.mjs → repair-mcp-configs-SNZDArU0.mjs} +2 -2
  118. package/dist/repair-skills-44iK3BcW.mjs +1 -0
  119. package/dist/{repair-skills-C8i0m9eF.mjs → repair-skills-DOAxoBam.mjs} +2 -2
  120. package/dist/{resolve-project-root-DbR2ne4Y.mjs → resolve-project-root-BNhXZeQK.mjs} +3 -3
  121. package/dist/schemas/v0/config.project-local.schema.json +1 -1
  122. package/dist/server-lock-D-DD35fh.mjs +1 -0
  123. package/dist/{server-lock-CGm9uKLf.mjs → server-lock-DKS1ePB3.mjs} +2 -2
  124. package/dist/{skill-teardown-ByJL1y5S.mjs → skill-teardown-C2fMHYSX.mjs} +2 -2
  125. package/dist/{sleep-CFk6IVkN.mjs → sleep-zea4v2sB.mjs} +2 -2
  126. package/dist/src-2aJM_On_.mjs +1 -0
  127. package/dist/{src-CIngi0dD.mjs → src-B2bAQ64a.mjs} +2 -2
  128. package/dist/src-BfFZluu9.mjs +1 -0
  129. package/dist/src-D36jY9G0.mjs +2045 -0
  130. package/dist/src-Dq8la3pQ.mjs +21 -0
  131. package/dist/start-D1ng8NtW.mjs +1 -0
  132. package/dist/start-DgBrLPgg.mjs +5 -0
  133. package/package.json +5 -5
  134. package/dist/constants-DfYjLVQT.mjs +0 -2
  135. package/dist/fs-traced-CMCYO7L0.mjs +0 -1
  136. package/dist/git-handle-CzN6a5i1.mjs +0 -1
  137. package/dist/init-igFI1B-e.mjs +0 -1
  138. package/dist/loader-B5BhlXcb.mjs +0 -1
  139. package/dist/md-manager-B0rABilg.mjs +0 -2
  140. package/dist/preview-DIdTxxi9.mjs +0 -1
  141. package/dist/public/assets/FeedbackForm-DgVONYW4.js +0 -1
  142. package/dist/public/assets/ManagedArtifactProperties-D4in1i0d.js +0 -1
  143. package/dist/public/assets/client-version-DPdchc8q.js +0 -1
  144. package/dist/public/assets/i18n-CApFNCKM.js +0 -1
  145. package/dist/repair-skills-WzWxastJ.mjs +0 -1
  146. package/dist/server-lock-CHQfzAi7.mjs +0 -1
  147. package/dist/src-CZM4Agb9.mjs +0 -1
  148. package/dist/src-DcauhAhM.mjs +0 -21
  149. package/dist/src-DoNjy6J-.mjs +0 -2045
  150. package/dist/src-Dp7hirDl.mjs +0 -1
  151. package/dist/start-BB7nE39u.mjs +0 -1
  152. package/dist/start-C74J2bIU.mjs +0 -5
@@ -1,7 +1,7 @@
1
- import{Ct as e}from"./sleep-CFk6IVkN.mjs";import{Bi as t}from"./src-DoNjy6J-.mjs";import{I as n,N as r,P as i}from"./fs-traced-C8gNIaHq.mjs";import{b as a,g as o,m as s,p as c,s as l}from"./resolve-project-root-DbR2ne4Y.mjs";import{S as ee,T as u,d as te,o as d,v as f,x as ne}from"./init-CM8I2X5C.mjs";import{t as p}from"./is-object-Bw0-z8qH.mjs";import{execFileSync as m,spawn as h}from"node:child_process";import{basename as re,dirname as g,join as _,resolve as ie,win32 as v}from"node:path";import{existsSync as y,mkdirSync as b,readFileSync as x,readdirSync as ae,statSync as oe,writeFileSync as se}from"node:fs";import{homedir as S}from"node:os";var C=e();const w=`open-knowledge`;function T(e){try{e()}catch{}}var E=class{backend=`keyring`;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(w,e).getPassword()}catch(t){return T(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return T(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return T(()=>this.onKeychainRead?.({kind:`corrupt-entry`,host:e,error:`corrupt-entry`})),null}}async set(e,t,n,r){let{Entry:i}=await import(`@napi-rs/keyring`),a=new i(w,e),o={login:t,token:n,...r};a.setPassword(JSON.stringify(o))}async clear(e){let{Entry:t}=await import(`@napi-rs/keyring`);try{new t(w,e).deletePassword()}catch{}}},D=class{backend=`file`;authFile;constructor(e){this.authFile=e??_(S(),`.ok`,`auth.yml`)}read(){if(!y(this.authFile))return{};try{return(0,C.parse)(x(this.authFile,`utf-8`))??{}}catch(e){let t=e instanceof Error?e.message:`unknown error`;return process.stderr.write(`[auth] Failed to parse ${this.authFile}: ${t}. Starting with empty credentials.\n`),{}}}write(e){let t=g(this.authFile);y(t)||b(t,{recursive:!0,mode:448}),se(this.authFile,(0,C.stringify)(e),{mode:384})}async get(e){return this.read()[e]??null}async set(e,t,n,r){let i=this.read();i[e]={login:t,token:n,...r},this.write(i)}async clear(e){let t=this.read();delete t[e],this.write(t)}},ce=class{backend=`keyring`;constructor(e,t){this.keychain=e,this.file=t}async get(e){let t=await this.keychain.get(e);if(t!=null)return t;let n=await this.file.get(e);if(n==null)return null;try{await this.keychain.set(e,n.login,n.token,{gitProtocol:n.gitProtocol,name:n.name,email:n.email}),await this.file.clear(e),process.stderr.write(`[auth] migrated ${e} credential from ~/.ok/auth.yml to the OS keychain\n`)}catch{}return n}set(e,t,n,r){return this.keychain.set(e,t,n,r)}async clear(e){await this.keychain.clear(e),await this.file.get(e)!=null&&await this.file.clear(e)}};async function O(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(w,`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
1
+ import{Ct as e}from"./sleep-zea4v2sB.mjs";import{Bi as t}from"./src-D36jY9G0.mjs";import{I as n,N as r,P as i}from"./fs-traced-DgX7lP1u.mjs";import{b as a,g as o,m as s,p as c,s as l}from"./resolve-project-root-BNhXZeQK.mjs";import{S as ee,T as u,d as te,o as d,v as f,x as ne}from"./init-WHm32sqo.mjs";import{t as p}from"./is-object-Bw0-z8qH.mjs";import{execFileSync as m,spawn as h}from"node:child_process";import{basename as re,dirname as g,join as _,resolve as ie,win32 as v}from"node:path";import{existsSync as y,mkdirSync as b,readFileSync as x,readdirSync as ae,statSync as oe,writeFileSync as se}from"node:fs";import{homedir as S}from"node:os";var C=e();const w=`open-knowledge`;function T(e){try{e()}catch{}}var E=class{backend=`keyring`;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(w,e).getPassword()}catch(t){return T(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return T(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return T(()=>this.onKeychainRead?.({kind:`corrupt-entry`,host:e,error:`corrupt-entry`})),null}}async set(e,t,n,r){let{Entry:i}=await import(`@napi-rs/keyring`),a=new i(w,e),o={login:t,token:n,...r};a.setPassword(JSON.stringify(o))}async clear(e){let{Entry:t}=await import(`@napi-rs/keyring`);try{new t(w,e).deletePassword()}catch{}}},D=class{backend=`file`;authFile;constructor(e){this.authFile=e??_(S(),`.ok`,`auth.yml`)}read(){if(!y(this.authFile))return{};try{return(0,C.parse)(x(this.authFile,`utf-8`))??{}}catch(e){let t=e instanceof Error?e.message:`unknown error`;return process.stderr.write(`[auth] Failed to parse ${this.authFile}: ${t}. Starting with empty credentials.\n`),{}}}write(e){let t=g(this.authFile);y(t)||b(t,{recursive:!0,mode:448}),se(this.authFile,(0,C.stringify)(e),{mode:384})}async get(e){return this.read()[e]??null}async set(e,t,n,r){let i=this.read();i[e]={login:t,token:n,...r},this.write(i)}async clear(e){let t=this.read();delete t[e],this.write(t)}},ce=class{backend=`keyring`;constructor(e,t){this.keychain=e,this.file=t}async get(e){let t=await this.keychain.get(e);if(t!=null)return t;let n=await this.file.get(e);if(n==null)return null;try{await this.keychain.set(e,n.login,n.token,{gitProtocol:n.gitProtocol,name:n.name,email:n.email}),await this.file.clear(e),process.stderr.write(`[auth] migrated ${e} credential from ~/.ok/auth.yml to the OS keychain\n`)}catch{}return n}set(e,t,n,r){return this.keychain.set(e,t,n,r)}async clear(e){await this.keychain.clear(e),await this.file.get(e)!=null&&await this.file.clear(e)}};async function O(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(w,`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
2
2
  `),T(()=>t?.onBackendSelected?.({backend:`keyring`})),new ce(new E(t?.onKeychainRead),new D(e))}catch(n){let r=n instanceof Error?`${n.name}: ${n.message}`:String(n);return process.stderr.write(`[auth] token storage: file (~/.ok/auth.yml) — OS keychain unavailable: ${r}\n`),T(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new D(e)}}function k(e){let t=null;return function(){if(t)return t;let n=2e3;return t=(async()=>{let t=null,r=new Promise(r=>{t=setTimeout(()=>{process.stderr.write(`[auth] token storage: keyring init exceeded ${n}ms; falling back to file (~/.ok/auth.yml)\n`),r(new D(e))},n)});try{return await Promise.race([O(e),r])}catch{return new D(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function le(e){let t=k(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token,login:n.login}}}}function ue(e){let t=k(e);return{backend:`file`,async get(e){return(await t()).get(e)},async set(e,n,r,i){return(await t()).set(e,n,r,i)},async clear(e){return(await t()).clear(e)}}}async function de(e,t){let n=[],r=new D(t);await r.get(e)!=null&&(await r.clear(e),n.push(`file`));let i;try{let{Entry:t}=await import(`@napi-rs/keyring`);new t(w,`__probe__`);let r,a=await new E(e=>{e.kind===`read-error`&&(r=e.error??`read-error`)}).get(e);if(r!==void 0)i=r;else if(a!=null)try{new t(w,e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}const fe=[`/opt/homebrew/bin/gh`,`/usr/local/bin/gh`,`/opt/local/bin/gh`,`/snap/bin/gh`,`/usr/bin/gh`],A={encoding:`utf-8`,stdio:[`ignore`,`pipe`,`pipe`],timeout:5e3,windowsHide:!0};function j(e,t={}){let{login:n}=t,r=t._exec??m,i=M(t._fileExists??y),a=e?[`--hostname`,e]:[];if(n){let e=N(r,i,[`auth`,`token`,...a,`--user`,n]);if(e)return{available:!0,token:e,resolvedLogin:n,fallback:!1}}let o=N(r,i,[`auth`,`token`,...a]);return o?n?{available:!0,token:o,fallback:!0}:{available:!0,token:o}:{available:!1}}function M(e){return[`gh`,...fe.filter(e)]}function N(e,t,n){for(let r of t)try{let t=e(r,n,A).toString().trim();if(t.length>0)return t}catch{}}function P(e,t={}){let n=t._exec??m,r=M(t._fileExists??y),i=[`auth`,`status`,...e?[`--hostname`,e]:[]],a=N(n,r,[...i,`--json`,`hosts`]);if(a!==void 0){let t=I(a,e);if(t)return t}let o=N(n,r,i);if(o!==void 0){let e=V(o);if(e.length>0)return e}}function F(e){return typeof e==`object`&&e&&!Array.isArray(e)?e:void 0}function I(e,t){let n;try{n=JSON.parse(e)}catch{return}let r=F(F(n)?.hosts);if(!r||t!==void 0&&r[t]===void 0)return;let i=t===void 0?Object.values(r):[r[t]],a=[];for(let e of i){if(!Array.isArray(e))return;for(let t of e){let e=F(t);if(!e)continue;let n=e.login;typeof n!=`string`||n.length===0||a.push({login:n,active:e.active===!0})}}return a}const L=/Logged in to \S+ account (\S+) \(/,R=/(?:Failed to log in to|Timeout trying to log in to) \S+/,z=/^\s*-\s*Active account:\s*true\s*$/,B=/\u001b\[[0-9;]*m/g;function V(e){let t=[],n;for(let r of e.split(`
3
3
  `)){let e=r.replace(B,``),i=L.exec(e)?.[1];if(i){n={login:i,active:!1},t.push(n);continue}if(R.test(e)){n=void 0;continue}n&&z.test(e)&&(n.active=!0)}return t}function pe(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function H(e){let t=e?.code;return t===`ENOENT`||t===`EACCES`||t===`EPERM`?{ok:!1,reason:`not-installed`}:{ok:!1,reason:`spawn-error`}}function U(e){return t({detached:!0,stdio:`ignore`,shell:!1,env:pe(e)})}function W(e,t,n={}){let r=(n.spawn??h)(e,[...t],U(n.env??process.env));return r.unref(),r}function me(e,t,n={}){let r=n.spawn??h,i=n.timeoutMs??2e3;return new Promise(a=>{let o=!1,s=e=>{o||(o=!0,a(e))},c=setTimeout(()=>s({ok:!1,reason:`timeout`}),i);try{let i=r(e,[...t],U(n.env??process.env));i.once(`error`,e=>{clearTimeout(c),s(H(e))}),i.once(`spawn`,()=>{clearTimeout(c),s({ok:!0})});try{i.unref()}catch{}}catch(e){clearTimeout(c),s(H(e))}})}const G=`com.inkeep.open-knowledge`,K=`OpenKnowledge.app`,q=`/Applications/${K}`;function he(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return oe(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function ge(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(J(e,q))return q;let t=_(e.homeDir??S(),`Applications`,K);return J(e,t)?t:null}function J(e,t){return Y(e,_(t,`Contents`,`MacOS`,`OpenKnowledge`))}function Y(e,t){try{let n=e.statSync(t);return n&&typeof n.isFile==`function`?n.isFile():!1}catch{return!1}}const _e=[`@inkeepopen-knowledge-desktop`,`OpenKnowledge`];function ve(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&/\\OpenKnowledge\.exe$/i.test(e.execPath))return e.execPath;let t=e.env.LOCALAPPDATA;if(t)for(let n of _e){let r=v.join(t,`Programs`,n,`OpenKnowledge.exe`);if(Y(e,r))return r}return null}function ye(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&e.execPath.endsWith(`/openknowledge`))return e.execPath;let t=`/opt/OpenKnowledge/openknowledge`;return Y(e,t)?t:null}function be(e){if(e.env.OK_FORCE_BROWSER===`1`)return{available:!1,reason:`force-browser`};if(e.platform!==`darwin`&&e.platform!==`win32`&&e.platform!==`linux`)return{available:!1,reason:`unsupported-platform`};let t;try{t=e.platform===`darwin`?ge(e):e.platform===`win32`?ve(e):ye(e)}catch{return{available:!1,reason:`stat-error`}}return t?e.env.OK_FORCE_DESKTOP===`1`?{available:!0,reason:`available`,bundlePath:t}:!(e.isTTY===!0||e.platform===`win32`&&e.isTTY===void 0&&!e.env.CI)||e.env.SSH_CONNECTION||e.env.SSH_TTY||e.platform===`linux`&&!e.env.DISPLAY&&!e.env.WAYLAND_DISPLAY?{available:!1,reason:`headless`,bundlePath:t}:{available:!0,reason:`available`,bundlePath:t}:{available:!1,reason:`no-bundle`}}function xe(e,t){let n=e.log??(e=>console.error(e)),r=e.platform??process.platform;if(n("Launching OpenKnowledge desktop (use `ok start` for the browser server, or `OK_FORCE_BROWSER=1` to always skip)"),r===`darwin`){W(`open`,[`-b`,G],{spawn:e.spawn});return}let i=t?.bundlePath;if(!i){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}W(i,[],{spawn:e.spawn})}function Se(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found (checked the standard install locations for this OS). Install it from https://openknowledge.ai/download, or omit --mode for browser mode.`;case`darwin-only`:case`unsupported-platform`:return`Desktop app is not available on this platform. Use --mode=browser, or omit --mode for the server fallback.`;case`headless`:return`Desktop launch is gated in headless contexts (CI, SSH, non-TTY stdout). Set OK_FORCE_DESKTOP=1 to override, or use --mode=browser.`;case`force-browser`:return`OK_FORCE_BROWSER=1 is set — desktop dispatch is disabled. Unset it to use --mode=app.`;case`stat-error`:return`Failed to inspect the desktop install (filesystem error). Check permissions or use --mode=browser.`;case`available`:return`Desktop app appears available but launch dispatch did not fire (caller bug).`}}function X(e,t){let n=ie(e),r=t===void 0?a():a({home:t,env:{}});return{cwd:n,bridgePath:l.pi.projectConfigPath?.(n)??``,trustPath:_(r,`trust.json`)}}function Z(e,t,n){let r=d(l.pi,e,n,t);if(r.kind===`absent`)return{state:`absent`,text:null};if(r.kind!==`present`)return{state:`unreadable`,text:null};let i=r.entry,a=Array.isArray(i.args)&&typeof i.args[0]==`string`?i.args[0]:null;return s(i)?{state:`own-current`,text:a}:ee(i)?{state:`own-stale`,text:a}:{state:`foreign`,text:a}}function Q(e,t){let n;try{n=x(e,`utf-8`)}catch(e){let t=e.code;return t===`ENOENT`||t===`ENOTDIR`?{state:`untrusted`,entries:{},trailingNewline:!1}:{state:`unreadable`,entries:null,trailingNewline:!1}}if(n.trim()===``)return{state:`untrusted`,entries:{},trailingNewline:!1};let r;try{r=JSON.parse(n)}catch{return{state:`unreadable`,entries:null,trailingNewline:!1}}return p(r)?{state:r[t]===!0?`trusted`:`untrusted`,entries:r,trailingNewline:n.endsWith(`
4
4
  `)}:{state:`unreadable`,entries:null,trailingNewline:!1}}function Ce(e,t){let n=X(e,t),r=Z(n.cwd,n.bridgePath,t).state,i=Q(n.trustPath,n.cwd).state;return{...n,bridge:r,trust:i,bridgeLoadable:(r===`own-current`||r===`own-stale`)&&i===`trusted`,otherExtensions:$(n.bridgePath).names}}function $(e){let t=g(e),n=re(e);try{return{names:ae(t).filter(e=>e!==n&&e.endsWith(`.ts`)).sort(),verified:!0}}catch(e){let t=e.code;return{names:[],verified:t===`ENOENT`||t===`ENOTDIR`}}}async function we(e,t={mode:`published`},n){let r=X(e,n),i=Z(r.cwd,r.bridgePath,n);if(i.state===`foreign`)return{...r,ok:!1,bridge:`refused-foreign`,trust:`skipped`};if(i.state===`unreadable`)return{...r,ok:!1,bridge:`refused-unreadable`,trust:`skipped`};let a;if(i.state===`absent`)a=`written`;else{let e;try{e=ne(t)}catch{e=void 0}a=e!==void 0&&i.text===e?`unchanged`:`refreshed`}if(a!==`unchanged`){let e=f(l.pi,r.cwd,t,n,r.bridgePath);if(e.action!==`written`&&e.action!==`overwritten`)return{...r,ok:!1,bridge:`failed`,trust:`skipped`,error:e.error??`bridge write ${e.action}`}}let o=await Te(r.trustPath,r.cwd);return{...r,ok:o.action===`already-trusted`||o.action===`added`,bridge:a,trust:o.action,...o.error===void 0?{}:{error:o.error}}}async function Te(e,t){try{b(g(e),{recursive:!0})}catch(e){return{action:`failed`,error:e instanceof Error?e.message:String(e)}}let i={action:`added`};try{await r(`${e}.lock`,async()=>{let r=Q(e,t);if(r.state===`trusted`){i.action=`already-trusted`;return}if(r.entries===null){i.action=`refused-unreadable`;return}let a={...r.entries,[t]:!0},o=JSON.stringify(a,null,2)+(r.trailingNewline?`
5
5
  `:``),s=u(e);n(e,o,s===void 0?void 0:{mode:s}),i.action=`added`})}catch(e){return{action:`failed`,error:e instanceof Error?e.message:String(e)}}return i.action===`refused-unreadable`?{action:`refused-unreadable`,error:`trust store is not a readable JSON object`}:{action:i.action}}function Ee(e,t){let r=X(e,t),a=$(r.bridgePath);if(!a.verified)return{action:`kept-unverified`,error:`could not read the Pi extensions folder`};if(a.names.length>0)return{action:`kept-shared`};if(!y(r.trustPath))return{action:`not-present`};let o={action:`removed`};try{i(`${r.trustPath}.lock`,()=>{let e=Q(r.trustPath,r.cwd);if(e.entries===null){o.action=e.state===`unreadable`?`refused-unreadable`:`not-present`;return}if(!(r.cwd in e.entries)){o.action=`not-present`;return}let t={...e.entries};delete t[r.cwd];let i=JSON.stringify(t,null,2)+(e.trailingNewline?`
6
6
  `:``),a=u(r.trustPath);n(r.trustPath,i,a===void 0?void 0:{mode:a}),o.action=`removed`})}catch(e){return{action:`failed`,error:e instanceof Error?e.message:String(e)}}return o.action===`refused-unreadable`?{action:`refused-unreadable`,error:`trust store is not a readable JSON object`}:{action:o.action}}function De(e){return e===`opencode`?o:c}function Oe(e,t,n){let r=l[e],i=De(e),a=[],o=r.projectConfigPath?.(t);o!==void 0&&a.push({scope:`project`,configPath:o});try{a.push({scope:`user`,configPath:r.configPath(t,n)})}catch{}for(let o of a){let a=te(r,t,n,o.configPath);if(a!==null&&i(a))return{editorId:e,scope:o.scope,configPath:o.configPath}}return null}export{ue as _,G as a,xe as c,me as d,j as f,le as g,O as h,Ee as i,Se as l,de as m,we as n,he as o,P as p,Ce as r,be as s,Oe as t,W as u};
7
- //# sourceMappingURL=acp-harness-probe-Dd0_vY88.mjs.map
7
+ //# sourceMappingURL=acp-harness-probe-DLFBL9zA.mjs.map
@@ -25,7 +25,7 @@ OpenKnowledge (OK) is a markdown-CRDT collaboration platform exposed via MCP. Th
25
25
 
26
26
  ## Tool index — 21 tools (router; the MCP tool descriptions carry each tool's full contract)
27
27
 
28
- - **Reads** — `exec` (primary; read-only `cat`/`ls`/`grep`/… plus frontmatter/backlink/history enrichment; one command or one pipe, not a shell), `search` (ranked BM25 + recency), `history` (doc versions), `links` (`kind: backlinks|forward|dead|orphans|hubs|suggest`, or an array for one call), `skills` (search + read: `query` → skills.sh; omit `name` to LIST managed (Project + Global); `name` READs one — by `name`+`scope`, never path), `config` (resolved config), `palette` (authoring forms + `html preview` starters + theme tokens; `palette({ components })` for JSX schemas), `preview_url` (browser preview URL on demand), `share_link` (GitHub-substrate share URL; read-only, errors without a GitHub remote), `lint` (markdown-lint violations: `document` for one doc, omit for the project; `fix: true` with `document` auto-fixes fixable rules in place — attributed, live in the preview; the rest need `edit`/`write`), `audit` (every lint violation + broken internal link in one read-only report, by source file with lines; `path` scopes; for link VALIDATION use this, not `links`; caveats in `references/linking.md`). **Read `ran` on successful `lint`/`audit` results to see which enabled source families were selected. A family absent from `ran` was not checked, and `[]` means no checks were selected at all.**
28
+ - **Reads** — `exec` (primary; `cat`/`ls`/`grep`/… on a read-only filesystem, plus frontmatter/backlink/history enrichment; one command or one pipe, not a shell), `search` (ranked BM25 + recency), `history` (doc versions), `links` (`kind: backlinks|forward|dead|orphans|hubs|suggest`, or an array for one call), `skills` (search + read: `query` → skills.sh; omit `name` to LIST managed (Project + Global); `name` READs one — by `name`+`scope`, never path), `config` (resolved config), `palette` (authoring forms + `html preview` starters + theme tokens; `palette({ components })` for JSX schemas), `preview_url` (browser preview URL on demand), `share_link` (GitHub-substrate share URL; read-only, errors without a GitHub remote), `lint` (markdown-lint violations: `document` for one doc, omit for the project; `fix: true` with `document` auto-fixes fixable rules in place — attributed, live in the preview; the rest need `edit`/`write`), `audit` (every lint violation + broken internal link in one read-only report, by source file with lines; `path` scopes; for link VALIDATION use this, not `links`; caveats in `references/linking.md`). **Read `ran` on successful `lint`/`audit` results to see which enabled source families were selected. A family absent from `ran` was not checked, and `[]` means no checks were selected at all.**
29
29
  - **Writes** — four native CRUD verbs, polymorphic over `document` / `folder` / `template` / `skill` / `asset` (pass EXACTLY ONE target, nested under its address key): `write` (create/overwrite; `write({ skill: {…} })` authors a skill as a REAL folder at the project's default skill home — live immediately for that folder's agent), `edit` (body find/replace/frontmatter merge-patch; no asset), `delete` (remove), `move` (move/rename, rewrites referrers; a skill also takes `scope`/`toScope` for Project↔Global — history resets, re-`install`). Output mirrors the input key; the preview envelope (`previewUrl`, `warning`) stays top-level. Plus `install` (WHERE a `skill` lives: `add`/`remove` locations additively — editor ids, `agents`, or custom roots; `mode` + `convert` re-form ONLY the locations named; `source` moves the real folder. The source folder IS the skill — no "uninstall everywhere"; a skill dies only via `delete`), `import` (acquire a skill-dir into `add`'s locations; scripts never run), `checkpoint` (named version), and `restore_version` (roll back). A folder's frontmatter is open-shape and self-only (does NOT cascade); templates are what new docs start with.
30
30
  - **Conflicts** — `conflicts` (`kind: list|content`), `resolve_conflict` (write a resolution + commit; destructive). See `references/conflict-resolution.md`.
31
31
 
@@ -38,8 +38,8 @@ Tools NOT in OK MCP (your host's): `preview_start`, `preview_screenshot`, `WebFe
38
38
  **Route every in-scope markdown read and write through OK's MCP tools — never your host's native file tools.** Native `Edit` / `sed` / direct `Write` on in-scope markdown bypasses the CRDT and loses agent attribution in the shadow repo; native reads skip frontmatter, backlinks, shadow-repo activity, and project git history that OK returns for every matched file. When this workspace has OpenKnowledge MCP configured, do **not** use native file tools on markdown paths inside the content directory. The ban covers every common rationalization:
39
39
 
40
40
  - **Native `Read` / `Grep` / `Glob` on in-scope `.md` / `.mdx`** — the original case.
41
- - **`Bash ls` / `Bash find` / `Bash cat` on dirs containing in-scope markdown** — use `exec("ls -A …")` / `exec("find … -name '*.md'")` / `exec("cat …")`. Native returns bare names; `exec` returns frontmatter, backlink counts, and recent activity. `-A` shows hidden entries (`.ok/`, `.okignore`) without the `.`/`..` noise.
42
- - **Glob patterns that target markdown** (`**/*.md`, `specs/**`, `reports/**`, `docs/**`) — use `exec` with `find` or `exec("ls -A <dir>")`.
41
+ - **`Bash ls` / `Bash find` / `Bash cat` on dirs containing in-scope markdown** — use `exec("ls -A …")` / `exec("find … -name '*.md'")` / `exec("cat …")`. Native returns bare names; `exec` adds frontmatter, backlinks, and recent activity. `-A` shows hidden entries without `.`/`..`.
42
+ - **Glob patterns that target markdown** — `exec` expands file operands (`cat specs/*.md`); quoted patterns and a command's own pattern (`find -name`) stay literal.
43
43
  - **Dispatching the Explore / general-purpose subagent for markdown-heavy exploration** — subagents use native tools internally and bypass OK. Do markdown exploration yourself via `exec` / `search`. Subagents remain appropriate for **source-code** exploration.
44
44
  - **Native `Read` / `Grep` on in-scope markdown inside `.ok/`** — `.ok/` is in-scope; treat its `.md` / `.mdx` like any other KB file.
45
45
  - **`ls` / `cat` / `find` on skill folders to discover or read a skill** — skills are addressed by `name`+`scope`, not by path (a skill can live in any editor dir, the `.agents/skills/` hub, or a custom root, with copies elsewhere). Use the `skills` tool.
@@ -1,2 +1,2 @@
1
- import*as e from"node:path";import*as t from"node:fs";function n(e){if(!e||e===`/`)return`/`;let t=e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e;t.startsWith(`/`)||(t=`/${t}`);let n=t.split(`/`).filter(e=>e&&e!==`.`),r=[];for(let e of n)e===`..`?r.pop():r.push(e);return`/${r.join(`/`)}`||`/`}function r(e,t){if(e.includes(`\0`))throw Error(`ENOENT: path contains null byte, ${t} '${e}'`)}function i(e){let t=n(e);if(t===`/`)return`/`;let r=t.lastIndexOf(`/`);return r===0?`/`:t.slice(0,r)}function a(e,t){return t.startsWith(`/`)?n(t):n(e===`/`?`/${t}`:`${e}/${t}`)}function o(e,t){return e===`/`?`/${t}`:`${e}/${t}`}function s(e,t){return t.startsWith(`/`)?n(t):n(o(i(e),t))}function c(e,t){if(e===t)return!0;let n=e[t.length];return(n===`/`||n===`\\`)&&e.startsWith(t)}function l(n,r){try{let e=t.realpathSync(n);return c(e,r)?e:null}catch(i){if(i.code===`ENOENT`){let i=e.dirname(n);if(i===n)return null;let a=l(i,r);if(a===null)return null;try{if(t.lstatSync(n).isSymbolicLink()){let i=t.readlinkSync(n);if(l(e.isAbsolute(i)?i:e.resolve(e.dirname(n),i),r)===null)return null}}catch{}return e.join(a,e.basename(n))}return null}}function u(n,r,i){let a=l(n,i);if(a===null)return null;let o=e.resolve(n);if(o.slice(r.length)!==a.slice(i.length))return null;try{if(t.lstatSync(o).isSymbolicLink())return null}catch{}return a}function d(e,n){if(!t.existsSync(e))throw Error(`${n} root does not exist`);if(!t.statSync(e).isDirectory())throw Error(`${n} root is not a directory`)}function f(e,t,n,r){let i=e;if(i.path===void 0){for(let t of r)if(i.message?.includes(t))throw e}let a=i.code||`EIO`;throw Error(`${a}: ${n} '${t}'`)}export{c as a,o as c,a as d,n as i,i as l,f as n,l as o,u as r,r as s,d as t,s as u};
2
- //# sourceMappingURL=chunk-KX3P26DQ-KA7oOKfS.mjs.map
1
+ import*as e from"node:path";import*as t from"node:fs";function n(e){if(!e||e===`/`)return`/`;let t=e.endsWith(`/`)&&e!==`/`?e.slice(0,-1):e;t.startsWith(`/`)||(t=`/${t}`);let n=t.split(`/`).filter(e=>e&&e!==`.`),r=[];for(let e of n)e===`..`?r.pop():r.push(e);return`/${r.join(`/`)}`||`/`}function r(e,t){if(e.includes(`\0`))throw Error(`ENOENT: path contains null byte, ${t} '${e}'`)}function i(e){let t=n(e);if(t===`/`)return`/`;let r=t.lastIndexOf(`/`);return r===0?`/`:t.slice(0,r)}function a(e,t){return t.startsWith(`/`)?n(t):n(e===`/`?`/${t}`:`${e}/${t}`)}function o(e,t){return e===`/`?`/${t}`:`${e}/${t}`}function s(e,t){return t.startsWith(`/`)?n(t):n(o(i(e),t))}function c(e,t){if(e===t)return!0;let n=e[t.length];return(n===`/`||n===`\\`)&&e.startsWith(t)}function l(n,r){try{let e=t.realpathSync(n);return c(e,r)?e:null}catch(i){if(i.code===`ENOENT`){let i=e.dirname(n);if(i===n)return null;let a=l(i,r);if(a===null)return null;try{if(t.lstatSync(n).isSymbolicLink()){let i=t.readlinkSync(n);if(l(e.isAbsolute(i)?i:e.resolve(e.dirname(n),i),r)===null)return null}}catch{}return e.join(a,e.basename(n))}return null}}function u(n,r,i){let a=l(n,i);if(a===null)return null;let o=e.resolve(n);if(o.slice(r.length)!==a.slice(i.length))return null;try{if(t.lstatSync(o).isSymbolicLink())return null}catch{}return a}function d(e,n){if(!t.existsSync(e))throw Error(`${n} root does not exist`);if(!t.statSync(e).isDirectory())throw Error(`${n} root is not a directory`)}function f(n,r){if(!e.isAbsolute(n))return{withinRoot:!0,relativePath:n};let i;try{i=t.realpathSync(n)}catch{i=e.resolve(n)}return c(i,r)?{withinRoot:!0,relativePath:i.slice(r.length).replace(/\\/g,`/`)||`/`}:{withinRoot:!1,safeName:e.basename(n)}}function p(e,t,n,r){let i=e;if(i.path===void 0){for(let t of r)if(i.message?.includes(t))throw e}let a=i.code||`EIO`;throw Error(`${a}: ${n} '${t}'`)}export{n as a,r as c,s as d,a as f,u as i,o as l,f as n,c as o,p as r,l as s,d as t,i as u};
2
+ //# sourceMappingURL=chunk-KX3P26DQ-Bp2m2ndV.mjs.map