@inkeep/open-knowledge 0.52.0-beta.6 → 0.52.0-beta.7

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 (137) hide show
  1. package/dist/{acp-harness-probe-Oco-vzbb.mjs → acp-harness-probe-BLW7TG44.mjs} +2 -2
  2. package/dist/assets/skills/project/references/linking.md +1 -1
  3. package/dist/cli.mjs +62 -62
  4. package/dist/constants-WNkLKsdC.mjs +2 -0
  5. package/dist/git-handle-CEoe8TIl.mjs +1 -0
  6. package/dist/{git-handle-CH1DpBYP.mjs → git-handle-VuHcNtS4.mjs} +2 -2
  7. package/dist/index.mjs +1 -1
  8. package/dist/{init-3ynssnTV.mjs → init-DFqv4VXb.mjs} +4 -4
  9. package/dist/init-DRqidFTq.mjs +1 -0
  10. package/dist/{launch-json-removal-CPurK0jD.mjs → launch-json-removal-DThHl9wH.mjs} +2 -2
  11. package/dist/loader-DJ8CWiSo.mjs +1 -0
  12. package/dist/{loader-DAruuWzH.mjs → loader-wzkezGJ8.mjs} +2 -2
  13. package/dist/md-manager-45eVlaBq.mjs +2 -0
  14. package/dist/{open-browser-CtVpc_8x.mjs → open-browser-BA50pLLQ.mjs} +2 -2
  15. package/dist/parse-worker.mjs +1 -1
  16. package/dist/{preview-CC6sojTR.mjs → preview-B5WQN0UF.mjs} +2 -2
  17. package/dist/preview-Bh7vu-ai.mjs +1 -0
  18. package/dist/public/assets/{ActivityModeContent-BrdwpjRB.js → ActivityModeContent-BmQRzJZw.js} +1 -1
  19. package/dist/public/assets/{AgentDiffPane-D56wAlnw.js → AgentDiffPane-DCXp5E1P.js} +1 -1
  20. package/dist/public/assets/{AgentThreadClientBinder-Bq0gVhV7.js → AgentThreadClientBinder-B7pwGsKU.js} +1 -1
  21. package/dist/public/assets/{ChangedOutsideBadge-6xW5IDHL.js → ChangedOutsideBadge-J6l1plFR.js} +1 -1
  22. package/dist/public/assets/CodeMirrorPropInput-DiDkBTg6.js +3 -0
  23. package/dist/public/assets/DocumentContext-J495RUh0.js +38 -0
  24. package/dist/public/assets/{EditorModeToggle-Big-nZpB.js → EditorModeToggle-BsFjeEn4.js} +1 -1
  25. package/dist/public/assets/{EnableSyncConfirmDialog-Dnl12e_9.js → EnableSyncConfirmDialog-DNDI39lu.js} +1 -1
  26. package/dist/public/assets/FeedbackForm-BwQovorQ.js +1 -0
  27. package/dist/public/assets/{GraphPanel-BxgcJTL5.js → GraphPanel-CsRKre3D.js} +1 -1
  28. package/dist/public/assets/{ImportSkillDialog-Dxe9uGaK.js → ImportSkillDialog-DNZi7-O6.js} +1 -1
  29. package/dist/public/assets/{LintConfigEditor-3U8aK9da.js → LintConfigEditor-nq2Ekm-O.js} +1 -1
  30. package/dist/public/assets/ManagedArtifactProperties-CeSsPfJA.js +2 -0
  31. package/dist/public/assets/ManagedArtifactProperties-D5Q8gGkr.js +1 -0
  32. package/dist/public/assets/{McpConsentDialogBody-Dt3X7boO.js → McpConsentDialogBody-DEhSeOSg.js} +1 -1
  33. package/dist/public/assets/{MermaidDocEditor-d-Wp_Ka_.js → MermaidDocEditor-DceTAjtX.js} +1 -1
  34. package/dist/public/assets/{ReportBugDialogBody-w6ZUZtd9.js → ReportBugDialogBody-DO7eotFd.js} +1 -1
  35. package/dist/public/assets/{SchemaConfigEditor-FYNlbIie.js → SchemaConfigEditor-D23bGRYq.js} +1 -1
  36. package/dist/public/assets/{SessionsHost-BUC4h4T5.js → SessionsHost-BD8Io20F.js} +2 -2
  37. package/dist/public/assets/{SettingsDialogBody-BAUPvgPO.js → SettingsDialogBody-D_2SfOcL.js} +4 -4
  38. package/dist/public/assets/{ShareBranchSwitchDialog-BMXRhCIc.js → ShareBranchSwitchDialog-B7Bl6qR0.js} +1 -1
  39. package/dist/public/assets/{ShareReceiveDialog-D8o-97rY.js → ShareReceiveDialog-BmMkjWTr.js} +1 -1
  40. package/dist/public/assets/{ShareReceiveMissDialog-DPKorVX0.js → ShareReceiveMissDialog-BDYU64bD.js} +1 -1
  41. package/dist/public/assets/{SkillEditBanner-BpiKPrLW.js → SkillEditBanner-B2U7UdOB.js} +1 -1
  42. package/dist/public/assets/{SkillOriginInline-C1YncGFC.js → SkillOriginInline-B3wOLT3t.js} +1 -1
  43. package/dist/public/assets/{SkillToolbarControls-DMHQY-lw.js → SkillToolbarControls-BP8iught.js} +1 -1
  44. package/dist/public/assets/{SlidesToolbarControls-DNGGM8G-.js → SlidesToolbarControls-56-P71vE.js} +1 -1
  45. package/dist/public/assets/{SourceEditor-Bt93LccY.js → SourceEditor-8vj7fGo1.js} +1 -1
  46. package/dist/public/assets/{TerminalPanel-c_g1B919.js → TerminalPanel-Clr6j-jo.js} +3 -3
  47. package/dist/public/assets/{TerminalWindowApp-QRDsxPvH.js → TerminalWindowApp-Bzu1XJoP.js} +1 -1
  48. package/dist/public/assets/{TextDocEditor-CGo9TVsr.js → TextDocEditor-Kaj3NBL9.js} +1 -1
  49. package/dist/public/assets/{ThreadView-D4m34cEL.js → ThreadView-C0oxDyxf.js} +1 -1
  50. package/dist/public/assets/{TimelineDiffPane-DLergBgi.js → TimelineDiffPane-CG6Z1uma.js} +1 -1
  51. package/dist/public/assets/{agent-diff-store-DvvlIWsW.js → agent-diff-store-DxMs0J9Y.js} +1 -1
  52. package/dist/public/assets/{auth-state-cache-se0_UkK4.js → auth-state-cache-CGY7eNch.js} +3 -3
  53. package/dist/public/assets/client-version-BenFW72U.js +1 -0
  54. package/dist/public/assets/comment-chips-Q0_SZK9C.js +5 -0
  55. package/dist/public/assets/{config-provider-cC1aAoqP.js → config-provider-B6fsarOv.js} +2 -2
  56. package/dist/public/assets/{dist-DPUOICsM.js → dist-ILlrHFKs.js} +183 -183
  57. package/dist/public/assets/{doc-paths-6W3B04qd.js → doc-paths-DAh95jxf.js} +1 -1
  58. package/dist/public/assets/{documents-events-CFb6q7t5.js → documents-events-CCW6R-r2.js} +1 -1
  59. package/dist/public/assets/{file-tree-adapter-DhmmoAjL.js → file-tree-adapter-Bf1ZqkPA.js} +1 -1
  60. package/dist/public/assets/{file-tree-utils-Dua-6LtX.js → file-tree-utils-CgJ4lrP9.js} +1 -1
  61. package/dist/public/assets/{folder-config-api-CrrPk9A0.js → folder-config-api-CKV5STj1.js} +1 -1
  62. package/dist/public/assets/follow-file-D4LD9UAw.js +4 -0
  63. package/dist/public/assets/i18n-C3d0M4ue.js +1 -0
  64. package/dist/public/assets/{index-Bme5x35Q.js → index-Du6HTehY.js} +14 -14
  65. package/dist/public/assets/{lint-config-client-DPwH-VHu.js → lint-config-client-xawAT1mQ.js} +1 -1
  66. package/dist/public/assets/{markdownlint-rule-browser-BdGLlEVb.js → markdownlint-rule-browser-B3UPVPG_.js} +1 -1
  67. package/dist/public/assets/navigation-targets-C1boWExT.js +1 -0
  68. package/dist/public/assets/{open-managed-artifact-tab-Cojj8juW.js → open-managed-artifact-tab-G7xdjHph.js} +1 -1
  69. package/dist/public/assets/{pending-receive-nav-store-wVA1ZjL8.js → pending-receive-nav-store-BZigj_ik.js} +1 -1
  70. package/dist/public/assets/prop-types-BIrEWnOv.js +1 -0
  71. package/dist/public/assets/{receive-store-CFEx5X5f.js → receive-store-BrOspwat.js} +1 -1
  72. package/dist/public/assets/{selection-context-Bq_81z9T.js → selection-context-PgPm0oHr.js} +1 -1
  73. package/dist/public/assets/{skill-actions-BfBwH98z.js → skill-actions-Btw-8DsB.js} +2 -2
  74. package/dist/public/assets/{skill-scope-TY2S7Be7.js → skill-scope-8PP6d5Gw.js} +1 -1
  75. package/dist/public/assets/{skills-api-OBRuLm8a.js → skills-api-DQ0PK-8O.js} +1 -1
  76. package/dist/public/assets/{src-CDup1x-i.js → src-DoCu_Oe2.js} +1 -1
  77. package/dist/public/assets/{tag-pill-input-CIUq78uG.js → tag-pill-input-BHj2SAnj.js} +1 -1
  78. package/dist/public/assets/{target-navigation-intent-TFQElcz0.js → target-navigation-intent-DpIU3fe6.js} +1 -1
  79. package/dist/public/assets/{terminal-cli-display-DphQFt7y.js → terminal-cli-display-CgJpdKCI.js} +1 -1
  80. package/dist/public/assets/{terminal-launch-events-CkYhv0hD.js → terminal-launch-events-DQ0KtteM.js} +1 -1
  81. package/dist/public/assets/{terminal-telemetry-BrUGs0cG.js → terminal-telemetry-CE1yzjKD.js} +1 -1
  82. package/dist/public/assets/{typing-burst-detector-3ZZiF2mv.js → typing-burst-detector-XmZhxL72.js} +3 -3
  83. package/dist/public/assets/{uninstall-ocJf-hjC.js → uninstall-CDJGY7Qx.js} +1 -1
  84. package/dist/public/assets/{use-activity-panel-B8mUHgso.js → use-activity-panel-DeQ1S88x.js} +1 -1
  85. package/dist/public/assets/{use-apply-config-color-theme-C68-iamG.js → use-apply-config-color-theme-BatIDUX7.js} +1 -1
  86. package/dist/public/assets/{use-collab-url-CJzhnqks.js → use-collab-url-7XE2_0_k.js} +1 -1
  87. package/dist/public/assets/{use-live-xterm-theme-BnbloOyE.js → use-live-xterm-theme-DS89T4Os.js} +1 -1
  88. package/dist/public/assets/{use-open-skill-BQ_vHG4k.js → use-open-skill-CgnR7yXa.js} +1 -1
  89. package/dist/public/assets/{use-popular-skills-DOSbQRlG.js → use-popular-skills-BefXxEcp.js} +1 -1
  90. package/dist/public/assets/{use-settings-route-Cv-ibnUF.js → use-settings-route-DN0TWdfX.js} +1 -1
  91. package/dist/public/assets/{use-skill-origin-clrL7XV6.js → use-skill-origin-COh1_mOK.js} +1 -1
  92. package/dist/public/assets/{use-skills-BDWr4yYQ.js → use-skills-C_HuRxth.js} +1 -1
  93. package/dist/public/assets/{use-terminal-enabled-CRhATtRE.js → use-terminal-enabled-DPQRp9bB.js} +1 -1
  94. package/dist/public/assets/use-timeline-entry-diff-Bw_6uLLl.js +6 -0
  95. package/dist/public/assets/{use-workspace-DNFQbKXx.js → use-workspace-CNCW4CS8.js} +1 -1
  96. package/dist/public/index.html +44 -44
  97. package/dist/public/uninstall.html +3 -3
  98. package/dist/{repair-launch-json-mJ3Ye_Mw.mjs → repair-launch-json-C2_MEgOS.mjs} +2 -2
  99. package/dist/{repair-mcp-configs-BeS1bCUD.mjs → repair-mcp-configs-Ceivh0g-.mjs} +2 -2
  100. package/dist/repair-skills-BWNXcIRv.mjs +1 -0
  101. package/dist/{repair-skills-Dn9wtbHi.mjs → repair-skills-Dk0Hee-r.mjs} +2 -2
  102. package/dist/server-lock-CDm0H6LS.mjs +1 -0
  103. package/dist/{server-lock-D8tFCW-G.mjs → server-lock-CeKMy65H.mjs} +2 -2
  104. package/dist/{skill-teardown-riJHlPak.mjs → skill-teardown-DtXC2fAI.mjs} +2 -2
  105. package/dist/{src-CeMQBLDa.mjs → src--XQg-7vm.mjs} +1 -1
  106. package/dist/{src-RGB2pEts.mjs → src-Dj6UxpKM.mjs} +124 -124
  107. package/dist/{src-BVxZYLJj.mjs → src-DvuwJKkU.mjs} +328 -328
  108. package/dist/src-VQFi4saV.mjs +1 -0
  109. package/dist/{src-Dc3F4mTO.mjs → src-WP_osKfx.mjs} +4 -4
  110. package/dist/start-CS7u5aKZ.mjs +12 -0
  111. package/dist/start-DZkQW5RE.mjs +1 -0
  112. package/dist/{ui-CyO6JCpp.mjs → ui-7z12LoCq.mjs} +3 -3
  113. package/dist/{write-project-skill-Bx22NW0a.mjs → write-project-skill-DUj7e5tZ.mjs} +3 -3
  114. package/package.json +4 -4
  115. package/dist/constants-C3LdY4-b.mjs +0 -2
  116. package/dist/git-handle-D_uW8fTU.mjs +0 -1
  117. package/dist/init-Djv0aq5j.mjs +0 -1
  118. package/dist/loader-Cwl2ZS4i.mjs +0 -1
  119. package/dist/md-manager-CUGZ0GRt.mjs +0 -2
  120. package/dist/preview-CYRkVM0P.mjs +0 -1
  121. package/dist/public/assets/CodeMirrorPropInput-D11rfM17.js +0 -3
  122. package/dist/public/assets/DocumentContext-DCB_2FMP.js +0 -38
  123. package/dist/public/assets/FeedbackForm-goeo0WLf.js +0 -1
  124. package/dist/public/assets/ManagedArtifactProperties-Bn-na6ua.js +0 -2
  125. package/dist/public/assets/ManagedArtifactProperties-DQMTHKMr.js +0 -1
  126. package/dist/public/assets/client-version-Cv0iyIKr.js +0 -1
  127. package/dist/public/assets/comment-chips-DTAZbaPZ.js +0 -5
  128. package/dist/public/assets/follow-file-K86Sp_6-.js +0 -4
  129. package/dist/public/assets/i18n-BnkAuR_3.js +0 -1
  130. package/dist/public/assets/navigation-targets-DSqzY6pU.js +0 -1
  131. package/dist/public/assets/prop-types-7a0cKWM0.js +0 -1
  132. package/dist/public/assets/use-timeline-entry-diff-C3vXYWPC.js +0 -6
  133. package/dist/repair-skills-cJ41S9pk.mjs +0 -1
  134. package/dist/server-lock-CTrzO_5l.mjs +0 -1
  135. package/dist/src-DDuAov3v.mjs +0 -1
  136. package/dist/start-B0EAId8s.mjs +0 -1
  137. package/dist/start-Coiq5FC4.mjs +0 -12
@@ -1,3 +1,3 @@
1
- import{ft as e}from"./sleep-A0G7hOuG.mjs";import{Zr as t}from"./src-BVxZYLJj.mjs";import{f as n,h as r,o as i}from"./write-project-skill-Bx22NW0a.mjs";import{d as a}from"./init-3ynssnTV.mjs";import{execFileSync as o,spawn as s}from"node:child_process";import{dirname as c,join as l,win32 as u}from"node:path";import{existsSync as d,mkdirSync as f,readFileSync as p,statSync as m,writeFileSync as h}from"node:fs";import{homedir as g}from"node:os";var _=e();const v=`open-knowledge`;function y(e){try{e()}catch{}}var b=class{backend=`keyring`;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(v,e).getPassword()}catch(t){return y(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return y(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return y(()=>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(v,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(v,e).deletePassword()}catch{}}},x=class{backend=`file`;authFile;constructor(e){this.authFile=e??l(g(),`.ok`,`auth.yml`)}read(){if(!d(this.authFile))return{};try{return(0,_.parse)(p(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=c(this.authFile);d(t)||f(t,{recursive:!0,mode:448}),h(this.authFile,(0,_.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)}},S=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 C(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(v,`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
1
+ import{ft as e}from"./sleep-A0G7hOuG.mjs";import{Zr as t}from"./src-DvuwJKkU.mjs";import{f as n,h as r,o as i}from"./write-project-skill-DUj7e5tZ.mjs";import{d as a}from"./init-DFqv4VXb.mjs";import{execFileSync as o,spawn as s}from"node:child_process";import{dirname as c,join as l,win32 as u}from"node:path";import{existsSync as d,mkdirSync as f,readFileSync as p,statSync as m,writeFileSync as h}from"node:fs";import{homedir as g}from"node:os";var _=e();const v=`open-knowledge`;function y(e){try{e()}catch{}}var b=class{backend=`keyring`;constructor(e){this.onKeychainRead=e}async get(e){let{Entry:t}=await import(`@napi-rs/keyring`),n;try{n=new t(v,e).getPassword()}catch(t){return y(()=>this.onKeychainRead?.({kind:`read-error`,host:e,error:t instanceof Error?t.name:`unknown`})),null}if(n==null)return y(()=>this.onKeychainRead?.({kind:`absent`,host:e})),null;try{return JSON.parse(n)}catch{return y(()=>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(v,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(v,e).deletePassword()}catch{}}},x=class{backend=`file`;authFile;constructor(e){this.authFile=e??l(g(),`.ok`,`auth.yml`)}read(){if(!d(this.authFile))return{};try{return(0,_.parse)(p(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=c(this.authFile);d(t)||f(t,{recursive:!0,mode:448}),h(this.authFile,(0,_.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)}},S=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 C(e,t){try{let{Entry:n}=await import(`@napi-rs/keyring`);return new n(v,`__probe__`),process.stderr.write(`[auth] token storage: OS keychain
2
2
  `),y(()=>t?.onBackendSelected?.({backend:`keyring`})),new S(new b(t?.onKeychainRead),new x(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`),y(()=>t?.onBackendSelected?.({backend:`file`,reason:r})),new x(e)}}function w(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 x(e))},n)});try{return await Promise.race([C(e),r])}catch{return new x(e)}finally{t!==null&&clearTimeout(t)}})(),t}}function T(e){let t=w(e);return{async get(e){let n=await(await t()).get(e);return n===null?null:{token:n.token}}}}function E(e){let t=w(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 D(e,t){let n=[],r=new x(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(v,`__probe__`);let r,a=await new b(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(v,e).deletePassword(),n.push(`keychain`)}catch(e){i=e instanceof Error?e.name:`delete-error`}}catch{}return{touched:n,keychainError:i}}const O=[`/opt/homebrew/bin/gh`,`/usr/local/bin/gh`,`/opt/local/bin/gh`,`/snap/bin/gh`,`/usr/bin/gh`],k={encoding:`utf-8`,stdio:[`ignore`,`pipe`,`pipe`],timeout:5e3,windowsHide:!0};function A(e,t={}){let n=t._exec??o,r=t._fileExists??d,i=[`auth`,`token`,...e?[`--hostname`,e]:[]],a=[`gh`,...O.filter(r)];for(let e of a)try{let t=n(e,i,k).toString().trim();if(t.length>0)return{available:!0,token:t}}catch{}return{available:!1}}function j(e){let t={...e};return delete t.ELECTRON_RUN_AS_NODE,t}function M(e,n,r={}){let i=(r.spawn??s)(e,[...n],t({detached:!0,stdio:`ignore`,env:j(r.env??process.env)}));return i.unref(),i}const N=`com.inkeep.open-knowledge`,P=`OpenKnowledge.app`,F=`/Applications/${P}`;function I(){return{platform:process.platform,env:process.env,execPath:process.execPath,isTTY:process.stdout.isTTY,statSync:e=>{try{return m(e,{throwIfNoEntry:!1})??null}catch{return null}}}}function L(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`){let t=/(.+?\.app)\/Contents\/MacOS\//.exec(e.execPath);if(t?.[1])return t[1]}if(R(e,F))return F;let t=l(e.homeDir??g(),`Applications`,P);return R(e,t)?t:null}function R(e,t){return z(e,l(t,`Contents`,`MacOS`,`OpenKnowledge`))}function z(e,t){try{let n=e.statSync(t);return n&&typeof n.isFile==`function`?n.isFile():!1}catch{return!1}}const B=[`@inkeepopen-knowledge-desktop`,`OpenKnowledge`];function V(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 B){let r=u.join(t,`Programs`,n,`OpenKnowledge.exe`);if(z(e,r))return r}return null}function H(e){if(e.env.ELECTRON_RUN_AS_NODE===`1`&&e.execPath.endsWith(`/openknowledge`))return e.execPath;let t=`/opt/OpenKnowledge/openknowledge`;return z(e,t)?t:null}function U(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`?L(e):e.platform===`win32`?V(e):H(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 W(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`){M(`open`,[`-b`,N],{spawn:e.spawn});return}let i=t?.bundlePath;if(!i){n(`Desktop launch skipped: no resolved desktop executable (caller bug).`);return}M(i,[],{spawn:e.spawn})}function G(e=`no-bundle`){switch(e){case`no-bundle`:return`Desktop app not found (checked the standard install locations for this OS). Install it, 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 K(e,t,o){let s=i[e],c=e===`opencode`?r:n,l=[],u=s.projectConfigPath?.(t);u!==void 0&&l.push({scope:`project`,configPath:u});try{l.push({scope:`user`,configPath:s.configPath(t,o)})}catch{}for(let n of l){let r=a(s,t,o,n.configPath);if(r!==null&&c(r))return{editorId:e,scope:n.scope,configPath:n.configPath}}return null}export{W as a,A as c,T as d,E as f,U as i,D as l,N as n,G as o,I as r,M as s,K as t,C as u};
3
- //# sourceMappingURL=acp-harness-probe-Oco-vzbb.mjs.map
3
+ //# sourceMappingURL=acp-harness-probe-BLW7TG44.mjs.map
@@ -11,6 +11,6 @@
11
11
  - **Never use HTML anchors** (`<a href="...">`). Markdown link syntax only.
12
12
  - **`brokenLinks` on the write/edit response is your primary check — read it before walking away.** Every `write`/`edit` returns `brokenLinks` in the SAME payload: `[]` means every outbound link resolves; a populated list names each broken `href` with its `resolvedTo` + `reason` (`no-such-doc` = resolved to a doc that doesn't exist; `no-such-file` = resolved to a linked asset / source file that isn't on disk at that path; `unresolvable` = the path escapes the content root, usually one `../` too many). This validates **every** local link, not just doc links: a wrong-depth `[src](../../foo.py)` to a source file is caught too. It is report-only — the write landed regardless; fix or remove every one in a follow-up `edit`.
13
13
  - **`links({ kind: "dead" })` is the authoritative end-state audit.** For a corpus-wide sweep across many docs: `links({ kind: "dead", sourceDocuments: ["your/doc"] })`. Companion `links` kinds: `backlinks` (incoming), `forward` (outgoing), `orphans` (no incoming), `hubs` (high-incoming), `suggest` (untextualized mentions worth linking).
14
- - **The editor's red-underline visual lies.** Its dead-link detection tolerates slug-fallback (e.g., `foo` may appear resolved because `foo.md` exists at root). `links({ kind: "dead" })` is strict-exact trust the tool, not the visual.
14
+ - **The tool and the editor agree.** Both resolve a bare name the same way — exact, then slug, then folder index, then basename so a link that opens when you click it is never reported dead, and a link reported dead is genuinely unresolvable. A target that names an asset, or names nothing at all, stays silent rather than being reported as a broken doc link.
15
15
 
16
16
  **Note on wiki-link syntax (`[[Page]]`):** the parser still handles it for legacy content, but it's NO LONGER the recommended default. Write new content with standard markdown links per above. Seed-pack templates (`ok seed --pack <name>`) may still emit `[[Page]]` placeholders inside template body text — those are legacy. When you instantiate a seed-pack template, replace the legacy placeholders with standard markdown links during the `{shape}`-fill pass.