@inkeep/open-knowledge 0.58.0-beta.0 → 0.58.0-beta.10

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 (431) hide show
  1. package/dist/{acp-harness-probe-C81MseWi.mjs → acp-harness-probe-DbFIl2BU.mjs} +2 -2
  2. package/dist/cli.mjs +52 -52
  3. package/dist/config-schema.json +1 -1
  4. package/dist/config.project.schema.json +1 -1
  5. package/dist/constants-C1H8vDEI.mjs +2 -0
  6. package/dist/fs-traced-corg4Obj.mjs +1 -0
  7. package/dist/{fs-traced-xJfl5Rxd.mjs → fs-traced-oq2wG9J_.mjs} +2 -2
  8. package/dist/{git-handle-B0tCzHAN.mjs → git-handle-LcX1ybej.mjs} +2 -2
  9. package/dist/git-handle-oit2551N.mjs +1 -0
  10. package/dist/index.d.mts +2598 -2
  11. package/dist/index.mjs +142 -142
  12. package/dist/init-BSBh5NEy.mjs +1 -0
  13. package/dist/{init-DsYoP76e.mjs → init-Bs3f8EWG.mjs} +34 -34
  14. package/dist/{launch-json-removal-eC8G1wb1.mjs → launch-json-removal-C5-FtXnw.mjs} +2 -2
  15. package/dist/{loader-DA2uxgAD.mjs → loader-Cn-wB0Do.mjs} +2 -2
  16. package/dist/loader-EYGbTHDG.mjs +1 -0
  17. package/dist/md-manager-_NpKRGFQ.mjs +2 -0
  18. package/dist/{open-browser-B3YQRXop.mjs → open-browser-BtuwIucI.mjs} +2 -2
  19. package/dist/parse-worker.mjs +1 -1
  20. package/dist/{preview-BYiBtNwO.mjs → preview-12KEx0r2.mjs} +2 -2
  21. package/dist/preview-BH6HJEYP.mjs +1 -0
  22. package/dist/public/assets/ActivityModeContent-BO5c1F45.js +1 -0
  23. package/dist/public/assets/{AgentDiffPane-vuhizpEd.js → AgentDiffPane-Cw0ahLQK.js} +2 -2
  24. package/dist/public/assets/{AgentThreadClientBinder-ChxqWHn_.js → AgentThreadClientBinder-alF1Qxu7.js} +1 -1
  25. package/dist/public/assets/{AppMenubar-FC_O2Ys9.js → AppMenubar-CWFN6Gg5.js} +1 -1
  26. package/dist/public/assets/{BugReportHistory-CaUianj8.js → BugReportHistory-DMwk_0cq.js} +1 -1
  27. package/dist/public/assets/{BugReportHistoryDialog-DXiXGqdM.js → BugReportHistoryDialog-zfmeFMvr.js} +1 -1
  28. package/dist/public/assets/CodeMirrorPropInput-AP4wqZL2.js +3 -0
  29. package/dist/public/assets/ConsentDialogBody-Uj0mYVTS.js +2 -0
  30. package/dist/public/assets/{DiffView-CPhiNxpc.js → DiffView-BK--nLAo.js} +1 -1
  31. package/dist/public/assets/DocumentContext-B2FwySzT.js +38 -0
  32. package/dist/public/assets/EditorModeToggle-B3b-_Slj.js +1 -0
  33. package/dist/public/assets/EnableSyncConfirmDialog-B_uAUnIL.js +1 -0
  34. package/dist/public/assets/FeedbackForm-DEzPexsg.js +1 -0
  35. package/dist/public/assets/{GraphPanel-COPEU9QX.js → GraphPanel-BsFLWlSI.js} +2 -2
  36. package/dist/public/assets/ImportSkillDialog-BaURuYsW.js +1 -0
  37. package/dist/public/assets/{LintConfigEditor-BwsiJDfg.js → LintConfigEditor-BRac0L2w.js} +1 -1
  38. package/dist/public/assets/ManagedArtifactProperties-8W35GiF8.js +1 -0
  39. package/dist/public/assets/ManagedArtifactProperties-B2CPGMcp.js +1 -0
  40. package/dist/public/assets/McpConsentDialogBody-CMQ8aY21.js +1 -0
  41. package/dist/public/assets/{Mermaid-DbOd2zw_.js → Mermaid-Cf83G27p.js} +2 -2
  42. package/dist/public/assets/{MermaidDocEditor-6MtXqzan.js → MermaidDocEditor-CL62mYzz.js} +1 -1
  43. package/dist/public/assets/{PropertyDisplayRow-DqvVKGtH.js → PropertyDisplayRow-D_ij-h00.js} +2 -2
  44. package/dist/public/assets/{RegisteredAgentIcon-ljYuKfOS.js → RegisteredAgentIcon-BAUcXnMS.js} +1 -1
  45. package/dist/public/assets/{ReportBugDialogBody-Ajl3p6In.js → ReportBugDialogBody-CTjqMQjF.js} +1 -1
  46. package/dist/public/assets/SchemaConfigEditor-CCbxc_Pm.js +1 -0
  47. package/dist/public/assets/SessionsHost-BHjayxS9.js +2 -0
  48. package/dist/public/assets/SettingsDialogBody-wa_TA4zB.js +13 -0
  49. package/dist/public/assets/ShareBranchSwitchDialog-p04XVeXL.js +1 -0
  50. package/dist/public/assets/ShareReceiveDialog-CRU0cNda.js +1 -0
  51. package/dist/public/assets/ShareReceiveMissDialog-B_XivQys.js +1 -0
  52. package/dist/public/assets/SkillCostValue-9Tsf8LmI.js +1 -0
  53. package/dist/public/assets/{SkillEditBanner-C2NwXGwp.js → SkillEditBanner-CAYhgKpt.js} +1 -1
  54. package/dist/public/assets/SkillInstallMenu-BO1Y7bBb.js +8 -0
  55. package/dist/public/assets/{SkillOriginInline-Bfr_LvLW.js → SkillOriginInline-CFQp_N8V.js} +1 -1
  56. package/dist/public/assets/{SkillToolbarControls-Dod_5zs_.js → SkillToolbarControls-Cj-Wn57W.js} +1 -1
  57. package/dist/public/assets/SlidesToolbarControls-DyErjjaP.js +1 -0
  58. package/dist/public/assets/{SourceEditor-CNg6hcSq.js → SourceEditor-Bo4tbQw4.js} +1 -1
  59. package/dist/public/assets/{TerminalPanel-CyjfYWsq.js → TerminalPanel-B8MIfbDf.js} +3 -3
  60. package/dist/public/assets/{TerminalWindowApp-Ce4imhj9.js → TerminalWindowApp-CA9GYrX2.js} +1 -1
  61. package/dist/public/assets/{TextDocEditor-CTZRYi5V.js → TextDocEditor-B0Ff4Err.js} +1 -1
  62. package/dist/public/assets/ThreadView-Cjgo1Ccx.js +14 -0
  63. package/dist/public/assets/TimelineDiffPane-BKFbIot1.js +2 -0
  64. package/dist/public/assets/{abnfDiagram-VRR7QNED-BT2YpL-i.js → abnfDiagram-VRR7QNED-BXV0Q9Rf.js} +1 -1
  65. package/dist/public/assets/{agent-diff-store-Bxwv7QUN.js → agent-diff-store-CUrI_VS-.js} +1 -1
  66. package/dist/public/assets/{arc-5_RUQzQ7.js → arc-CXotQ3Zv.js} +1 -1
  67. package/dist/public/assets/architecture-TIHT7OUA-CcEi9kJB.js +1 -0
  68. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-D838GYQt.js → architectureDiagram-ZJ3FMSHR-BrUUqulO.js} +1 -1
  69. package/dist/public/assets/auth-state-cache-DzbXi191.js +11 -0
  70. package/dist/public/assets/{blockDiagram-677ZJIJ3-D1Cwxkvv.js → blockDiagram-677ZJIJ3-BcwZugGV.js} +1 -1
  71. package/dist/public/assets/{c4Diagram-LMCZKHZV-BUrI2fXA.js → c4Diagram-LMCZKHZV-CyK96MK8.js} +1 -1
  72. package/dist/public/assets/{calendar-CAFot_1Z.js → calendar-D-zvRPBw.js} +1 -1
  73. package/dist/public/assets/channel-CiQMistZ.js +1 -0
  74. package/dist/public/assets/chunk-2Q5K7J3B-DidKTrYl.js +1 -0
  75. package/dist/public/assets/{chunk-32BRIVSS-BgyL-XUN.js → chunk-32BRIVSS-C-dyipE0.js} +1 -1
  76. package/dist/public/assets/{chunk-52WLFC77-CLCS5D1w.js → chunk-52WLFC77-C0TaY8su.js} +1 -1
  77. package/dist/public/assets/{chunk-5FCAYU7R-D4Qemx4Q.js → chunk-5FCAYU7R-CyWZYAnb.js} +1 -1
  78. package/dist/public/assets/{chunk-5HE753X5-AFxpbWC8.js → chunk-5HE753X5-BA4_jYMU.js} +1 -1
  79. package/dist/public/assets/{chunk-5JV3BV7I-DQech1b8.js → chunk-5JV3BV7I-CTt6G2-n.js} +1 -1
  80. package/dist/public/assets/{chunk-5TONJI2A-DhQn7UEA.js → chunk-5TONJI2A-C9OV9wU1.js} +1 -1
  81. package/dist/public/assets/{chunk-5VM5RSS4-Mk-moEej.js → chunk-5VM5RSS4-CN9qrDG1.js} +1 -1
  82. package/dist/public/assets/{chunk-7BUUIJ7U-NgiLm4do.js → chunk-7BUUIJ7U-Pr_5SKwD.js} +1 -1
  83. package/dist/public/assets/{chunk-BIQX33UG-BGOx5d7P.js → chunk-BIQX33UG-DxUkIR1G.js} +1 -1
  84. package/dist/public/assets/{chunk-BO2N2NFS-CuZ7_vEZ.js → chunk-BO2N2NFS-CAsSfJQV.js} +3 -3
  85. package/dist/public/assets/{chunk-C7G6YPKG-DTKxmZVz.js → chunk-C7G6YPKG-75F8nXGJ.js} +1 -1
  86. package/dist/public/assets/{chunk-CQNSW5MT-BtseeAyV.js → chunk-CQNSW5MT-j0TLuP3z.js} +1 -1
  87. package/dist/public/assets/{chunk-CYSBUYHQ-BMn0BrMO.js → chunk-CYSBUYHQ-BoEkL9Wm.js} +1 -1
  88. package/dist/public/assets/{chunk-EMLP6XTP-CMh4Lfqa.js → chunk-EMLP6XTP-C8nwP0qN.js} +1 -1
  89. package/dist/public/assets/{chunk-EX3LRPZG-DCBoE6Bv.js → chunk-EX3LRPZG-ghIR61NM.js} +1 -1
  90. package/dist/public/assets/{chunk-FWX5IMBZ-CAuRUmD2.js → chunk-FWX5IMBZ-C4T9sOJA.js} +2 -2
  91. package/dist/public/assets/{chunk-HOUHSVGY-DGOb362U.js → chunk-HOUHSVGY-B7v770iR.js} +1 -1
  92. package/dist/public/assets/{chunk-ICXQ74PX-BuIKeQxW.js → chunk-ICXQ74PX-C63Xgr0O.js} +1 -1
  93. package/dist/public/assets/{chunk-JG7HCLWE-Bx0614Ks.js → chunk-JG7HCLWE-Bcuks90D.js} +1 -1
  94. package/dist/public/assets/{chunk-JWPE2WC7-CTPvDarN.js → chunk-JWPE2WC7-XZG40a9S.js} +1 -1
  95. package/dist/public/assets/{chunk-MOJQB5TN-BQcLEpd9.js → chunk-MOJQB5TN-rm-6_rQH.js} +1 -1
  96. package/dist/public/assets/{chunk-MOZMSUNE-Cw75i_mo.js → chunk-MOZMSUNE-CCTdAyja.js} +1 -1
  97. package/dist/public/assets/{chunk-OGEWGWER-DUygGCtr.js → chunk-OGEWGWER-ChlRgYv3.js} +1 -1
  98. package/dist/public/assets/{chunk-OSBZ3O6U-3rlBFXeF.js → chunk-OSBZ3O6U-CP4W3y1B.js} +1 -1
  99. package/dist/public/assets/{chunk-PUDLZKDR-O5ZbZaei.js → chunk-PUDLZKDR-ayfNwaKz.js} +1 -1
  100. package/dist/public/assets/{chunk-Q4XR5HBZ-DnjBiiRi.js → chunk-Q4XR5HBZ-kztF5uGd.js} +1 -1
  101. package/dist/public/assets/{chunk-QBLGF6JB-ClgYvCDk.js → chunk-QBLGF6JB-D_vbeWLb.js} +1 -1
  102. package/dist/public/assets/{chunk-R7FJI6CG-Byfy5jLm.js → chunk-R7FJI6CG-DJnAKUGu.js} +1 -1
  103. package/dist/public/assets/{chunk-RYQCIY6F-BcYiXXs_.js → chunk-RYQCIY6F-C51U5WWC.js} +1 -1
  104. package/dist/public/assets/{chunk-U6XO7XAA-BgHi1_DT.js → chunk-U6XO7XAA-uXQLs3eV.js} +1 -1
  105. package/dist/public/assets/{chunk-V7JOEXUC-DD-xZ_GP.js → chunk-V7JOEXUC-B-o2tHar.js} +1 -1
  106. package/dist/public/assets/chunk-VAUOI2AC-BoxNBv72.js +1 -0
  107. package/dist/public/assets/{chunk-VR4S4FIN-RC3ren3m.js → chunk-VR4S4FIN-BK5oYbfP.js} +1 -1
  108. package/dist/public/assets/{chunk-WYO6CB5R-BtZO7GTo.js → chunk-WYO6CB5R-CrS71lvK.js} +1 -1
  109. package/dist/public/assets/chunk-XXDRQBXY-BbtIdjLE.js +1 -0
  110. package/dist/public/assets/{chunk-YOTPTUD7-Bb6P7QJ5.js → chunk-YOTPTUD7-BbxSM36P.js} +1 -1
  111. package/dist/public/assets/{chunk-ZGVPDNZ5-B7cInX-F.js → chunk-ZGVPDNZ5-B9_vMnln.js} +1 -1
  112. package/dist/public/assets/{chunk-ZIRB5QZD-BUb1k7IW.js → chunk-ZIRB5QZD-CANgIEc6.js} +1 -1
  113. package/dist/public/assets/classDiagram-OUVF2IWQ-CKFEghmu.js +1 -0
  114. package/dist/public/assets/classDiagram-v2-EOCWNBFH-CHW-nN7G.js +1 -0
  115. package/dist/public/assets/client-version-BFRrEG7V.js +1 -0
  116. package/dist/public/assets/{cm-theme-Cmsb2GL4.js → cm-theme-K6epwl2Z.js} +1 -1
  117. package/dist/public/assets/comment-chips-CwjOEDgv.js +5 -0
  118. package/dist/public/assets/config-provider-zPDmtELo.js +5 -0
  119. package/dist/public/assets/{cose-bilkent-JH36ORCC-B5G6WpVe.js → cose-bilkent-JH36ORCC-CwHzeAti.js} +1 -1
  120. package/dist/public/assets/cynefin-VYW2F7L2-BPH_wuBk.js +1 -0
  121. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-DLn0rjiW.js → cynefinDiagram-TSTJHNR4-B-B0tA2f.js} +1 -1
  122. package/dist/public/assets/{dagre-DU0bSWB3.js → dagre-DfVjddc3.js} +1 -1
  123. package/dist/public/assets/{dagre-VKFMJZFB-oSeZtzYF.js → dagre-VKFMJZFB-DZKHilfZ.js} +1 -1
  124. package/dist/public/assets/{diagram-FQU43EPY-BshsKQYt.js → diagram-FQU43EPY-D0bW0ffI.js} +1 -1
  125. package/dist/public/assets/{diagram-G47NLZAW-cnkOvDKJ.js → diagram-G47NLZAW-BQVxTacd.js} +1 -1
  126. package/dist/public/assets/{diagram-NH7WQ7WH-BHPtXIrP.js → diagram-NH7WQ7WH-D6WxcOTU.js} +1 -1
  127. package/dist/public/assets/{diagram-OA4YK3LP-DVth453E.js → diagram-OA4YK3LP-Bg6nsoZe.js} +1 -1
  128. package/dist/public/assets/{diagram-WEI45ONY-iw9lZncz.js → diagram-WEI45ONY-CCo_tHe7.js} +1 -1
  129. package/dist/public/assets/{dist-BOw-Rz0A.js → dist-B-JJ8O2m.js} +1 -1
  130. package/dist/public/assets/{dist-BlpnoSsm.js → dist-BEdEgmhd.js} +1 -1
  131. package/dist/public/assets/{dist-CMSQL1CI.js → dist-Bhrp6J6M.js} +1 -1
  132. package/dist/public/assets/{dist-D7Ra2aSx.js → dist-C3eZK5G2.js} +1 -1
  133. package/dist/public/assets/{dist-mu9myxR7.js → dist-C6nQhP9i.js} +1 -1
  134. package/dist/public/assets/{dist-Da-yv6wN.js → dist-CHgDqgn4.js} +1 -1
  135. package/dist/public/assets/{dist-DVsNsQEW.js → dist-CrsrOLb2.js} +1 -1
  136. package/dist/public/assets/{dist-CMHE-EqI.js → dist-CwIXVlDZ.js} +1 -1
  137. package/dist/public/assets/{dist-BYS_8C9i.js → dist-DRSD1c7X.js} +1 -1
  138. package/dist/public/assets/{dist-COv61_fZ2.js → dist-DiEFrTc32.js} +187 -187
  139. package/dist/public/assets/{dist-Bp7ly1AN.js → dist-Drsa8knD.js} +1 -1
  140. package/dist/public/assets/{dist-D2ar7Kk3.js → dist-QSdHNI-A.js} +1 -1
  141. package/dist/public/assets/{dist-B55799jR.js → dist-e-0w3Ov-.js} +1 -1
  142. package/dist/public/assets/{dist-8tz5gmA-.js → dist-qMWcGM_b.js} +1 -1
  143. package/dist/public/assets/{doc-paths-7BigDJzU.js → doc-paths-CwGLicgU.js} +1 -1
  144. package/dist/public/assets/{documents-events-BG9v7ZR8.js → documents-events-CYr01LzK.js} +1 -1
  145. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-C1Dod06W.js → ebnfDiagram-CCIWWBDH-C84EBgmc.js} +1 -1
  146. package/dist/public/assets/{erDiagram-Q63AITRT-BHowYfqq.js → erDiagram-Q63AITRT-Dbc0I5E5.js} +1 -1
  147. package/dist/public/assets/eventmodeling-45OFAUF4-B1iJYvna.js +1 -0
  148. package/dist/public/assets/{file-tree-adapter-BaT9ZAI6.js → file-tree-adapter-Don5Zf-x.js} +1 -1
  149. package/dist/public/assets/{file-tree-utils-BnMWB0rN.js → file-tree-utils-CZVXiJhq.js} +1 -1
  150. package/dist/public/assets/flowDiagram-23GEKE2U-CPyTCg9g.js +1 -0
  151. package/dist/public/assets/{folder-config-api-CspTyRPC.js → folder-config-api-7zUmkKmQ.js} +1 -1
  152. package/dist/public/assets/follow-file-D76Wx-BM.js +4 -0
  153. package/dist/public/assets/{ganttDiagram-NO4QXBWP-DPHKzqwc.js → ganttDiagram-NO4QXBWP-CPHjNFro.js} +1 -1
  154. package/dist/public/assets/gitGraph-TEB2WS4Q-to2czxZU.js +1 -0
  155. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-D6K5ty1E.js → gitGraphDiagram-IHSO6WYX-Bk61PFqV.js} +1 -1
  156. package/dist/public/assets/globals-BIkjmIKR.css +1 -0
  157. package/dist/public/assets/{graphlib-C4PVrCSd.js → graphlib-ioLhFHkL.js} +1 -1
  158. package/dist/public/assets/{highlighted-body-OFNGDK62-Cb1ier4Y.js → highlighted-body-OFNGDK62-Buf4npN7.js} +1 -1
  159. package/dist/public/assets/i18n-YHrFgpK4.js +1 -0
  160. package/dist/public/assets/index-DEMNDHsE.js +2095 -0
  161. package/dist/public/assets/info-DKCQHKI2-CV6Uu24U.js +1 -0
  162. package/dist/public/assets/{infoDiagram-FWYZ7A6U-D0-Kb7vK.js → infoDiagram-FWYZ7A6U-6RyviIGs.js} +1 -1
  163. package/dist/public/assets/{input-group-D6f-9HF9.js → input-group-Y8b1t0ZP.js} +1 -1
  164. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-C7EYwiRW.js → ishikawaDiagram-FXEZZL3T-dwzKIC3b.js} +1 -1
  165. package/dist/public/assets/{journeyDiagram-5HDEW3XC-BUddm1y_.js → journeyDiagram-5HDEW3XC-Z6Dl8Afj.js} +1 -1
  166. package/dist/public/assets/{kanban-definition-HUTT4EX6-dNyDGbrb.js → kanban-definition-HUTT4EX6-DZHkFNjy.js} +1 -1
  167. package/dist/public/assets/{line-dV9ubXAV.js → line-DnnWI5vr.js} +1 -1
  168. package/dist/public/assets/{linear-B3i0ZXFo.js → linear-CWrncuGt.js} +1 -1
  169. package/dist/public/assets/{lint-config-client-D4Gin48u.js → lint-config-client-DtWclvoX.js} +1 -1
  170. package/dist/public/assets/{map-DtIcVWDF.js → map-CLm7aK2Q.js} +1 -1
  171. package/dist/public/assets/markdownlint-rule-browser-Dd6bqpIn.js +1 -0
  172. package/dist/public/assets/mcp-consent-store-IQIfrXaP.js +1 -0
  173. package/dist/public/assets/mermaid-GHXKKRXX-BEF6mTmg.js +1 -0
  174. package/dist/public/assets/{mermaid-parser.core-ByQzJt56.js → mermaid-parser.core-Z2jCuLKy.js} +2 -2
  175. package/dist/public/assets/{mermaid.core-Df5o_1-U.js → mermaid.core-DmdDOlj6.js} +3 -3
  176. package/dist/public/assets/messages-B4yWHxiK.js +1 -0
  177. package/dist/public/assets/messages-Bh7Emo2I.js +1 -0
  178. package/dist/public/assets/messages-Bmahyqks.js +1 -0
  179. package/dist/public/assets/messages-BpTtKPLO.js +1 -0
  180. package/dist/public/assets/messages-Bt_8o6tW.js +1 -0
  181. package/dist/public/assets/messages-COWTxAyI.js +1 -0
  182. package/dist/public/assets/messages-CU_on62_.js +1 -0
  183. package/dist/public/assets/messages-CmGck6QM.js +1 -0
  184. package/dist/public/assets/messages-D3zw7l1d.js +1 -0
  185. package/dist/public/assets/messages-DbU70HNE.js +1 -0
  186. package/dist/public/assets/messages-Dr2pGI6Z.js +1 -0
  187. package/dist/public/assets/messages-H3ZceoeV.js +1 -0
  188. package/dist/public/assets/{mindmap-definition-LN4V7U3C-BAzpd3bR.js → mindmap-definition-LN4V7U3C-BoelhHQi.js} +1 -1
  189. package/dist/public/assets/{navigation-targets-BlmF0SDc.js → navigation-targets-RQkdHKQe.js} +1 -1
  190. package/dist/public/assets/{now-Bs9xiL-y.js → now-DSFQUTIN.js} +1 -1
  191. package/dist/public/assets/{open-managed-artifact-tab-DyQLDLZu.js → open-managed-artifact-tab-BqyzxElX.js} +1 -1
  192. package/dist/public/assets/{ordinal-CBsC_qub.js → ordinal-eqJj3HGL.js} +1 -1
  193. package/dist/public/assets/packet-7NZHBO7P-CzMZM5v1.js +1 -0
  194. package/dist/public/assets/{pegDiagram-2B236MQR-BuH3gdjL.js → pegDiagram-2B236MQR-DfbCkrwd.js} +1 -1
  195. package/dist/public/assets/pending-receive-nav-store-CtFLb4uh.js +1 -0
  196. package/dist/public/assets/pie-RZYD4A2V-DdVXA1Hg.js +1 -0
  197. package/dist/public/assets/{pieDiagram-ENE6RG2P-DRqFdzMD.js → pieDiagram-ENE6RG2P-C6we2jpW.js} +1 -1
  198. package/dist/public/assets/{platform-labels-B2CH4Bk2.js → platform-labels-AM4wnkZh.js} +1 -1
  199. package/dist/public/assets/{project-paths-rKjGTUhn.js → project-paths-CTkpTKTI.js} +1 -1
  200. package/dist/public/assets/{prop-types-x3L5Ba9q.js → prop-types-D5D0tTgt.js} +1 -1
  201. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-BO8aoRB0.js → quadrantDiagram-ABIIQ3AL-PstpwJH4.js} +1 -1
  202. package/dist/public/assets/radar-I7S5WNFK-Bka-SVu9.js +1 -0
  203. package/dist/public/assets/railroad-3IZDKUUU-R_V7nk5U.js +1 -0
  204. package/dist/public/assets/railroad-abnf-AHOZXSZD-BKvTlw6b.js +1 -0
  205. package/dist/public/assets/railroad-ebnf-EBAXGLYW-DSrW-ycC.js +1 -0
  206. package/dist/public/assets/railroad-peg-LSFZ7HO6-Cw-M7SHP.js +1 -0
  207. package/dist/public/assets/{railroadDiagram-RFXS5EU6-CRFsoqn7.js → railroadDiagram-RFXS5EU6-PBGBO1ir.js} +1 -1
  208. package/dist/public/assets/{receive-store-DyKO2VJp.js → receive-store-kX_q_Kud.js} +1 -1
  209. package/dist/public/assets/{requirementDiagram-TGXJPOKE-e1xZyBwO.js → requirementDiagram-TGXJPOKE-Bczqv0JR.js} +1 -1
  210. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-plP53Dva.js → sankeyDiagram-HTMAVEWB-GcY2JTwi.js} +1 -1
  211. package/dist/public/assets/{selection-context-BdxcxNyo.js → selection-context-BQe2g2Dq.js} +1 -1
  212. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-CsotTFeM.js → sequenceDiagram-DBY2YBRQ-CsKH925t.js} +1 -1
  213. package/dist/public/assets/{sizeCapture-X5ZJPWSS-CJquhL5U.js → sizeCapture-X5ZJPWSS-BVXY5Y7I.js} +1 -1
  214. package/dist/public/assets/skill-actions-CSo5VckO.js +1 -0
  215. package/dist/public/assets/{skill-scope-Dvl0F_Nc.js → skill-scope-BxLYZxhM.js} +1 -1
  216. package/dist/public/assets/{skills-api-D3yktqw_.js → skills-api-BaBYAelS.js} +1 -1
  217. package/dist/public/assets/{src-CiwcnlkH.js → src-7uKHkda2.js} +1 -1
  218. package/dist/public/assets/{src-DTnqSW2M.js → src-DxLI2PjH.js} +1 -1
  219. package/dist/public/assets/{stateDiagram-2N3HPSRC-CDE3nIL7.js → stateDiagram-2N3HPSRC-cBRqxCYS.js} +1 -1
  220. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-C6ZbjlHP.js +1 -0
  221. package/dist/public/assets/{swimlanes-5IMT3BWC-DZtQrT6b.js → swimlanes-5IMT3BWC-DVSwAibV.js} +2 -2
  222. package/dist/public/assets/swimlanesDiagram-G3AALYLV-Cey6UV-L.js +8 -0
  223. package/dist/public/assets/{tag-pill-input-B-KJK7ye.js → tag-pill-input-B9FblJS6.js} +1 -1
  224. package/dist/public/assets/{target-navigation-intent-Cq4g4MwT.js → target-navigation-intent-DY3DcF93.js} +1 -1
  225. package/dist/public/assets/{telemetry-impl-aSUUu3k2.js → telemetry-impl-Bx5MMwQJ.js} +2 -2
  226. package/dist/public/assets/{telemetry-startup-D6l5t8d3.js → telemetry-startup-yZMQwIC0.js} +1 -1
  227. package/dist/public/assets/{terminal-cli-display-CpAOcb2j.js → terminal-cli-display-BTd2u9i4.js} +1 -1
  228. package/dist/public/assets/{terminal-launch-events-mKO9oOVx.js → terminal-launch-events-BTVeGO_t.js} +1 -1
  229. package/dist/public/assets/{terminal-telemetry-zuOv8zuu.js → terminal-telemetry-C8_a6Xis.js} +1 -1
  230. package/dist/public/assets/text-viewer-languages-BpAcgbiC.js +2 -0
  231. package/dist/public/assets/thread-client-Cs9kyi3G.js +1 -0
  232. package/dist/public/assets/{timeline-definition-FHXFAJF6-PvMPKElS.js → timeline-definition-FHXFAJF6-CP-Q_sN_.js} +1 -1
  233. package/dist/public/assets/treeView-QDETBFTQ-DcIHjF9Y.js +1 -0
  234. package/dist/public/assets/treemap-6X3UGDF4-D80H3Mb8.js +1 -0
  235. package/dist/public/assets/typing-burst-detector-BwOmF1O-.js +8 -0
  236. package/dist/public/assets/{uninstall-Cq81zlCV.js → uninstall-Ba76frfR.js} +1 -1
  237. package/dist/public/assets/{use-activity-panel-9LDeBM04.js → use-activity-panel-BdFcdebT.js} +1 -1
  238. package/dist/public/assets/{use-apply-config-color-theme-B1zL7AB7.js → use-apply-config-color-theme-CKKnHEzE.js} +1 -1
  239. package/dist/public/assets/{use-collab-url-CBEaRBLp.js → use-collab-url-g8qF70gx.js} +1 -1
  240. package/dist/public/assets/{use-live-xterm-theme-Bg0pl-eA.js → use-live-xterm-theme-H2JNXLZf.js} +1 -1
  241. package/dist/public/assets/use-open-skill-CdQdrkLx.js +1 -0
  242. package/dist/public/assets/use-popular-skills-DudhxgXK.js +1 -0
  243. package/dist/public/assets/{use-settings-route-CQWgqLVD.js → use-settings-route-BgEY_vjS.js} +1 -1
  244. package/dist/public/assets/use-skill-origin-C4lrHitY.js +1 -0
  245. package/dist/public/assets/{use-skills-RGrgR7Ae.js → use-skills-BpFMoQhP.js} +1 -1
  246. package/dist/public/assets/{use-terminal-enabled-CC64PnYB.js → use-terminal-enabled-DjROKFKr.js} +1 -1
  247. package/dist/public/assets/use-timeline-entry-diff-VLtxXWdE.js +6 -0
  248. package/dist/public/assets/{use-workspace-CTox7-Ea.js → use-workspace-C2awGiuw.js} +1 -1
  249. package/dist/public/assets/{vennDiagram-L72KCM5P-3cd2YU2T.js → vennDiagram-L72KCM5P-CfvOo50r.js} +1 -1
  250. package/dist/public/assets/wardley-OPB4EBWU-CpKtgnT2.js +1 -0
  251. package/dist/public/assets/{wardleyDiagram-EHGQE667-DQ8hL0nn.js → wardleyDiagram-EHGQE667-CdB3c8GL.js} +1 -1
  252. package/dist/public/assets/{xychartDiagram-FW5EYKEG-oJ3_oyFH.js → xychartDiagram-FW5EYKEG-chlORI69.js} +1 -1
  253. package/dist/public/index.html +94 -93
  254. package/dist/public/uninstall.html +9 -9
  255. package/dist/{repair-launch-json-CW1yfrNA.mjs → repair-launch-json-DFcqXldf.mjs} +2 -2
  256. package/dist/{repair-mcp-configs-BqKBiNtK.mjs → repair-mcp-configs-R_2Qsvqy.mjs} +2 -2
  257. package/dist/repair-skills-DAk36q69.mjs +1 -0
  258. package/dist/repair-skills-YH8Kl8XI.mjs +4 -0
  259. package/dist/schemas/v0/config.project.schema.json +1 -1
  260. package/dist/{server-lock-BHY1C3dW.mjs → server-lock-Bvskt-yo.mjs} +2 -2
  261. package/dist/server-lock-fN4dJ7Dz.mjs +1 -0
  262. package/dist/{skill-teardown-C5wK_7-E.mjs → skill-teardown-BoAovUbS.mjs} +2 -2
  263. package/dist/{sleep-D_nNc7T_.mjs → sleep-BU8QtSQy.mjs} +2 -2
  264. package/dist/src-2cpU6IQj.mjs +20 -0
  265. package/dist/{src-DMi2O7yV.mjs → src-D5EuNBgu.mjs} +136 -136
  266. package/dist/src-DklUlS8_.mjs +1 -0
  267. package/dist/{src-DoyY0aGc.mjs → src-Dpt2Y6i4.mjs} +339 -339
  268. package/dist/src-wq5nPGLv.mjs +1 -0
  269. package/dist/start-Du0xEjho.mjs +12 -0
  270. package/dist/start-qw3HiJPy.mjs +1 -0
  271. package/dist/{ui-CDGZp9uY.mjs → ui-B6Qjtx3o.mjs} +3 -3
  272. package/dist/{write-project-skill-CqUFi6y1.mjs → write-project-skill-Ckjb0KKP.mjs} +6 -6
  273. package/package.json +4 -4
  274. package/dist/constants-KQqlCqby.mjs +0 -2
  275. package/dist/fs-traced-BEuPZxxL.mjs +0 -1
  276. package/dist/git-handle-DQRBUWfE.mjs +0 -1
  277. package/dist/init-CN9hVk4i.mjs +0 -1
  278. package/dist/loader-96qtkdFs.mjs +0 -1
  279. package/dist/md-manager-IForifhX.mjs +0 -2
  280. package/dist/preview-DOK0jq1H.mjs +0 -1
  281. package/dist/public/assets/ActivityModeContent-DpWNwM6n.js +0 -1
  282. package/dist/public/assets/CodeMirrorPropInput-3xTSMwVk.js +0 -3
  283. package/dist/public/assets/ConsentDialogBody-Bhndf3fO.js +0 -2
  284. package/dist/public/assets/DocumentContext-CHPcruUq.js +0 -38
  285. package/dist/public/assets/EditorModeToggle-CwqwRfuU.js +0 -1
  286. package/dist/public/assets/EnableSyncConfirmDialog-BGsAPro5.js +0 -1
  287. package/dist/public/assets/FeedbackForm-Cc58Nk7P.js +0 -1
  288. package/dist/public/assets/ImportSkillDialog-DqCi6EGK.js +0 -1
  289. package/dist/public/assets/ManagedArtifactProperties-6zQd8tBx.js +0 -1
  290. package/dist/public/assets/ManagedArtifactProperties-v6Fpk3Fo.js +0 -1
  291. package/dist/public/assets/McpConsentDialogBody-CVb-mMB8.js +0 -1
  292. package/dist/public/assets/SchemaConfigEditor-BsE7oA0r.js +0 -1
  293. package/dist/public/assets/SessionsHost-CUgKgDkz.js +0 -2
  294. package/dist/public/assets/SettingsDialogBody-BwytOGSu.js +0 -12
  295. package/dist/public/assets/ShareBranchSwitchDialog-oqH7CVAK.js +0 -1
  296. package/dist/public/assets/ShareReceiveDialog-qvhiGzxM.js +0 -1
  297. package/dist/public/assets/ShareReceiveMissDialog-CA3y3xQf.js +0 -1
  298. package/dist/public/assets/SkillInstallMenu-BgV-kMhM.js +0 -8
  299. package/dist/public/assets/SlidesToolbarControls-Cib12Sqv.js +0 -1
  300. package/dist/public/assets/ThreadView-CI9w5I4i.js +0 -11
  301. package/dist/public/assets/TimelineDiffPane-m1We7iSj.js +0 -2
  302. package/dist/public/assets/architecture-TIHT7OUA-DwJXOzeg.js +0 -1
  303. package/dist/public/assets/auth-state-cache-CxjHGWZm.js +0 -11
  304. package/dist/public/assets/channel-55FEFwyw.js +0 -1
  305. package/dist/public/assets/chunk-2Q5K7J3B-CSqFa28W.js +0 -1
  306. package/dist/public/assets/chunk-VAUOI2AC-CCEFHhFN.js +0 -1
  307. package/dist/public/assets/chunk-XXDRQBXY-CSo_IP1t.js +0 -1
  308. package/dist/public/assets/classDiagram-OUVF2IWQ-Wgjx552v.js +0 -1
  309. package/dist/public/assets/classDiagram-v2-EOCWNBFH-D1rJJwS9.js +0 -1
  310. package/dist/public/assets/client-version-5Ke_ACOR.js +0 -1
  311. package/dist/public/assets/comment-chips-ChCY4B1k.js +0 -5
  312. package/dist/public/assets/config-provider-Cow2MOvb.js +0 -5
  313. package/dist/public/assets/cynefin-VYW2F7L2-DCXxsTQd.js +0 -1
  314. package/dist/public/assets/eventmodeling-45OFAUF4-CrAU37MM.js +0 -1
  315. package/dist/public/assets/flowDiagram-23GEKE2U-DbexxjbR.js +0 -1
  316. package/dist/public/assets/follow-file-CfdGzNSh.js +0 -4
  317. package/dist/public/assets/gitGraph-TEB2WS4Q-C3je2KR3.js +0 -1
  318. package/dist/public/assets/globals-DpnoEwqx.css +0 -1
  319. package/dist/public/assets/i18n-DtNuevxm.js +0 -1
  320. package/dist/public/assets/index-Cp5x9JeS.js +0 -2095
  321. package/dist/public/assets/info-DKCQHKI2-CT9KyzjE.js +0 -1
  322. package/dist/public/assets/markdownlint-rule-browser-qdlEJqGK.js +0 -1
  323. package/dist/public/assets/mcp-consent-store-WuPKfzrq.js +0 -1
  324. package/dist/public/assets/mermaid-GHXKKRXX-DoaYYD9o.js +0 -1
  325. package/dist/public/assets/messages-B-36DfpF.js +0 -1
  326. package/dist/public/assets/messages-BYJHcIk0.js +0 -1
  327. package/dist/public/assets/messages-BaI5ubzY.js +0 -1
  328. package/dist/public/assets/messages-BhNfOuoD.js +0 -1
  329. package/dist/public/assets/messages-CIAvaKgB.js +0 -1
  330. package/dist/public/assets/messages-COdCL7Ya.js +0 -1
  331. package/dist/public/assets/messages-CPWYTaHY.js +0 -1
  332. package/dist/public/assets/messages-Dtcb5u8J.js +0 -1
  333. package/dist/public/assets/messages-Kwe4pdGx.js +0 -1
  334. package/dist/public/assets/messages-PZjg3eYF.js +0 -1
  335. package/dist/public/assets/messages-rCGMF4pK.js +0 -1
  336. package/dist/public/assets/messages-xnmpxMsz.js +0 -1
  337. package/dist/public/assets/packet-7NZHBO7P-CH_5gegW.js +0 -1
  338. package/dist/public/assets/pending-receive-nav-store-BP3YcKOH.js +0 -1
  339. package/dist/public/assets/pie-RZYD4A2V-aYfmJZ12.js +0 -1
  340. package/dist/public/assets/radar-I7S5WNFK-DADBQ4w5.js +0 -1
  341. package/dist/public/assets/railroad-3IZDKUUU-pWB1DEQS.js +0 -1
  342. package/dist/public/assets/railroad-abnf-AHOZXSZD-DyMKsKhG.js +0 -1
  343. package/dist/public/assets/railroad-ebnf-EBAXGLYW-D6s4IM0k.js +0 -1
  344. package/dist/public/assets/railroad-peg-LSFZ7HO6-BTTgV3Yi.js +0 -1
  345. package/dist/public/assets/skill-actions-DFktYEsA.js +0 -1
  346. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-BtxT_bEh.js +0 -1
  347. package/dist/public/assets/swimlanesDiagram-G3AALYLV-DCyyRwMg.js +0 -8
  348. package/dist/public/assets/text-viewer-languages-6Ne07IiK.js +0 -2
  349. package/dist/public/assets/thread-client-B1jXINMp.js +0 -1
  350. package/dist/public/assets/treeView-QDETBFTQ-Dx6w4y7n.js +0 -1
  351. package/dist/public/assets/treemap-6X3UGDF4-BDQteRlb.js +0 -1
  352. package/dist/public/assets/typing-burst-detector-0Kh3NkMo.js +0 -8
  353. package/dist/public/assets/use-open-skill-BJyEtUo4.js +0 -1
  354. package/dist/public/assets/use-popular-skills-DmIQH2eT.js +0 -1
  355. package/dist/public/assets/use-skill-origin-DschKPDB.js +0 -1
  356. package/dist/public/assets/use-timeline-entry-diff-CbaYxlTE.js +0 -6
  357. package/dist/public/assets/wardley-OPB4EBWU-D46U-qP9.js +0 -1
  358. package/dist/repair-skills-BzuY54h2.mjs +0 -1
  359. package/dist/repair-skills-D-WezUYL.mjs +0 -4
  360. package/dist/server-lock-CXt9yQWS.mjs +0 -1
  361. package/dist/src-BtDCSEOa.mjs +0 -1
  362. package/dist/src-Bw_6oq5M.mjs +0 -1
  363. package/dist/src-hSizEeWj.mjs +0 -20
  364. package/dist/start-B_8D33Kj.mjs +0 -12
  365. package/dist/start-D-mZWiuS.mjs +0 -1
  366. /package/dist/public/assets/{ActivityPanelDiffView-GFnvFJPJ.js → ActivityPanelDiffView-Cf2VzcQR.js} +0 -0
  367. /package/dist/public/assets/{SkillModeBanner-d0ZDkWTk.js → SkillModeBanner-DRTkv15U.js} +0 -0
  368. /package/dist/public/assets/{__vite-browser-external-N4Ia604h.js → __vite-browser-external-WCqU1dPv.js} +0 -0
  369. /package/dist/public/assets/{agent-presence-C3GIHDxc.js → agent-presence-DRsOW-0d.js} +0 -0
  370. /package/dist/public/assets/{app-menubar-gate-D9mWjBDd.js → app-menubar-gate-BNRAX_CU.js} +0 -0
  371. /package/dist/public/assets/{array-Cf_JnmE6.js → array-B1kACz19.js} +0 -0
  372. /package/dist/public/assets/{asset-dispatch-D3iE-ozy.js → asset-dispatch-CD6rGcnF.js} +0 -0
  373. /package/dist/public/assets/{auth-prompt-store-C4YJf5De.js → auth-prompt-store-CGGURy6q.js} +0 -0
  374. /package/dist/public/assets/{badge-I_vhU4ix.js → badge-Xc7NUop1.js} +0 -0
  375. /package/dist/public/assets/{chunk-KEIR6QF5-BOpPjw4C.js → chunk-KEIR6QF5-CjjM_7_M.js} +0 -0
  376. /package/dist/public/assets/{chunk-Y2CYZVJY-Bw2nvaMQ.js → chunk-Y2CYZVJY-vfj7raQE.js} +0 -0
  377. /package/dist/public/assets/{clike-BBEjy26W.js → clike-8Ae7e6fh.js} +0 -0
  378. /package/dist/public/assets/{clipboard-adapter-C4L1qX1X.js → clipboard-adapter-DEJxizFj.js} +0 -0
  379. /package/dist/public/assets/{code-highlighter-impl-Ctd_XU2E.js → code-highlighter-impl-Cppc8BYi.js} +0 -0
  380. /package/dist/public/assets/{colors-CElM_Snc.js → colors-KAU8EwIB.js} +0 -0
  381. /package/dist/public/assets/{copilot-CmkvU8CH.js → copilot-CArBqDJb.js} +0 -0
  382. /package/dist/public/assets/{cursor-CIl_AjI1.js → cursor-57XyUT4e.js} +0 -0
  383. /package/dist/public/assets/{cytoscape.esm-h5J7wFxJ.js → cytoscape.esm-D3mlESJy.js} +0 -0
  384. /package/dist/public/assets/{defaultLocale-a-gWoIXg.js → defaultLocale-bIKRNFA8.js} +0 -0
  385. /package/dist/public/assets/{diff-CvpcR3NJ.js → diff-BP9HN3q_.js} +0 -0
  386. /package/dist/public/assets/{dist-DvG1-wV_.js → dist--Oj00PP-.js} +0 -0
  387. /package/dist/public/assets/{dist-w_Y7XM3w.js → dist-BpbU4527.js} +0 -0
  388. /package/dist/public/assets/{dist-CK4VZUF5.js → dist-CGHrBbOn.js} +0 -0
  389. /package/dist/public/assets/{dist-DoS8xGN6.js → dist-DUfEoSbR.js} +0 -0
  390. /package/dist/public/assets/{dist-BLaUOTRG.js → dist-Dc5iZ-d42.js} +0 -0
  391. /package/dist/public/assets/{documents-fetch-BEnELRVW.js → documents-fetch-CyPsdtpz.js} +0 -0
  392. /package/dist/public/assets/{external-link-D2rJDkPo.js → external-link-DGqXfQJy.js} +0 -0
  393. /package/dist/public/assets/{file-tree-rename-validation-ByELf2tl.js → file-tree-rename-validation-DRVu1nhm.js} +0 -0
  394. /package/dist/public/assets/{form-dlFqxdSN.js → form-G66Qcao1.js} +0 -0
  395. /package/dist/public/assets/{format-C7y0e043.js → format-Dx1Bv63R.js} +0 -0
  396. /package/dist/public/assets/{gherkin-D3uEvcwv.js → gherkin-Bly32MZh.js} +0 -0
  397. /package/dist/public/assets/{globals--3DrDOfg.js → globals-CZErGZFp.js} +0 -0
  398. /package/dist/public/assets/{go-fa_HI4OB.js → go-BVG6uZYu.js} +0 -0
  399. /package/dist/public/assets/{init-B1Vy7sk-.js → init-DrF4E4Az.js} +0 -0
  400. /package/dist/public/assets/{isObject-DaQSDnzB.js → isObject-IfMcw_bi.js} +0 -0
  401. /package/dist/public/assets/{libesm-DQtLkQQh.js → libesm-Bf6KoNgP.js} +0 -0
  402. /package/dist/public/assets/{lru-string-cache-Ckr1Pjrr.js → lru-string-cache-BPCBM2V6.js} +0 -0
  403. /package/dist/public/assets/{lua-D7ZxzT_Z.js → lua-C55CIErD.js} +0 -0
  404. /package/dist/public/assets/{min-Dbr9KJ3U.js → min-C1g9jnre.js} +0 -0
  405. /package/dist/public/assets/{panel-DtO2k15O.js → panel-BuHp9NtA.js} +0 -0
  406. /package/dist/public/assets/{panzoom.es-BtVt9FgW.js → panzoom.es-o_3qFD_V.js} +0 -0
  407. /package/dist/public/assets/{path-kpTbN09k.js → path-Cf-g5NK-.js} +0 -0
  408. /package/dist/public/assets/{pdf-BFuk-PLE.js → pdf-B9uPc9By.js} +0 -0
  409. /package/dist/public/assets/{pdf.worker-C9DGCxWN.js → pdf.worker-e1vyTHb8.js} +0 -0
  410. /package/dist/public/assets/{perl-B2T_oOXa.js → perl-DLaN6XEp.js} +0 -0
  411. /package/dist/public/assets/{properties-BlzchQr8.js → properties-CPM4zsxY.js} +0 -0
  412. /package/dist/public/assets/{r-BuKMh1KL.js → r-BQ7lKY67.js} +0 -0
  413. /package/dist/public/assets/{rough.esm-CP-YPkih.js → rough.esm-BFeW2O8v.js} +0 -0
  414. /package/dist/public/assets/{ruby-CUkUilNJ.js → ruby-DW0RHajG.js} +0 -0
  415. /package/dist/public/assets/{schema-fields-view-intent-DGCRVgw4.js → schema-fields-view-intent-NTmrbhil.js} +0 -0
  416. /package/dist/public/assets/{share-metadata-rows-D5y9TY7o.js → share-metadata-rows-1gHTU-sX.js} +0 -0
  417. /package/dist/public/assets/{shell-DhuGq92J.js → shell-BVFwelFF.js} +0 -0
  418. /package/dist/public/assets/{skeleton-ColtBPsg.js → skeleton-BOVIbSHk.js} +0 -0
  419. /package/dist/public/assets/{sortable.esm-DlAqBM0z.js → sortable.esm-mqYoEMD5.js} +0 -0
  420. /package/dist/public/assets/{sql-PCnKIGcH.js → sql-Bf8_OLfG.js} +0 -0
  421. /package/dist/public/assets/{src-DlFhp60C.js → src-BAp28WGw.js} +0 -0
  422. /package/dist/public/assets/{startup-marks-DDrQR_dN.js → startup-marks-CJv6hTyC.js} +0 -0
  423. /package/dist/public/assets/{stex-C-5D68LN.js → stex-CT86a3ly.js} +0 -0
  424. /package/dist/public/assets/{swift-BxR8RYdU.js → swift-CmsPN9ub.js} +0 -0
  425. /package/dist/public/assets/{terminal-command-events-DXmeHtnk.js → terminal-command-events-7vR2pykU.js} +0 -0
  426. /package/dist/public/assets/{textarea-CziWBFvC.js → textarea-CkuOTeF-.js} +0 -0
  427. /package/dist/public/assets/{thread-draft-staging-BG7XGHEN.js → thread-draft-staging-D5ZThmoH.js} +0 -0
  428. /package/dist/public/assets/{timeline-diff-store-BpUHW_Yp.js → timeline-diff-store-cCBpDgND.js} +0 -0
  429. /package/dist/public/assets/{toml-nuQJU7MH.js → toml-BpoDNBUE.js} +0 -0
  430. /package/dist/public/assets/{use-installed-clis-DmyaQmU9.js → use-installed-clis-BiKNpdXV.js} +0 -0
  431. /package/dist/public/assets/{useLintConfigViewMode-DX8l9aBY.js → useLintConfigViewMode-LFsX5JMF.js} +0 -0
package/dist/index.d.mts CHANGED
@@ -1130,14 +1130,14 @@ type _File = typeof globalThis extends {
1130
1130
  File: infer F extends new (...args: any[]) => any;
1131
1131
  } ? InstanceType<F> : {};
1132
1132
  /** Do not reference this directly. */
1133
- interface File extends _File {
1133
+ interface File$1 extends _File {
1134
1134
  readonly type: string;
1135
1135
  readonly size: number;
1136
1136
  }
1137
1137
  interface $ZodFileDef extends $ZodTypeDef {
1138
1138
  type: "file";
1139
1139
  }
1140
- interface $ZodFileInternals extends $ZodTypeInternals<File, File> {
1140
+ interface $ZodFileInternals extends $ZodTypeInternals<File$1, File$1> {
1141
1141
  def: $ZodFileDef;
1142
1142
  isst: $ZodIssueInvalidType;
1143
1143
  bag: LoosePartial<{
@@ -2095,6 +2095,8 @@ declare const ZodNumber: $constructor<ZodNumber>;
2095
2095
  interface _ZodBoolean<T extends $ZodBooleanInternals = $ZodBooleanInternals> extends _ZodType<T> {}
2096
2096
  interface ZodBoolean extends _ZodBoolean<$ZodBooleanInternals<boolean>> {}
2097
2097
  declare const ZodBoolean: $constructor<ZodBoolean>;
2098
+ interface ZodNull extends _ZodType<$ZodNullInternals> {}
2099
+ declare const ZodNull: $constructor<ZodNull>;
2098
2100
  interface ZodUnknown extends _ZodType<$ZodUnknownInternals> {}
2099
2101
  declare const ZodUnknown: $constructor<ZodUnknown>;
2100
2102
  interface ZodArray<T extends SomeType = $ZodType> extends _ZodType<$ZodArrayInternals<T>>, $ZodArray<T> {
@@ -2227,6 +2229,20 @@ interface ZodReadonly<T extends SomeType = $ZodType> extends _ZodType<$ZodReadon
2227
2229
  }
2228
2230
  declare const ZodReadonly: $constructor<ZodReadonly>;
2229
2231
  //#endregion
2232
+ //#region ../core/src/bug-report-sidecar/schema.d.ts
2233
+ /**
2234
+ * Known report lifecycle states. Read as an OPEN enum: an unrecognized value
2235
+ * (a newer app wrote a state this build doesn't know) normalizes to `'unknown'`
2236
+ * rather than rejecting the sidecar. Transitions:
2237
+ * generated → uploading → sent (+reference) | upload-failed (+lastError) | email-drafted
2238
+ * A retry moves a non-`sent` report back to `uploading` and on to a terminal
2239
+ * state again.
2240
+ */
2241
+ declare const REPORT_SIDECAR_STATES: readonly ["generated", "uploading", "sent", "upload-failed", "email-drafted"];
2242
+ type ReportSidecarKnownState = (typeof REPORT_SIDECAR_STATES)[number];
2243
+ /** The known states plus the `'unknown'` sentinel a read may normalize to. */
2244
+ type ReportSidecarState = ReportSidecarKnownState | 'unknown';
2245
+ //#endregion
2230
2246
  //#region ../core/src/logger-types.d.ts
2231
2247
  interface BundleRedaction {
2232
2248
  readonly file: string;
@@ -2258,6 +2274,231 @@ interface ReportBundleSummary$1 {
2258
2274
  redactedLineCount: number;
2259
2275
  generatedAt: string;
2260
2276
  }
2277
+ /**
2278
+ * A captured picture of the app window handed to the renderer for the report
2279
+ * dialog's include-a-screenshot preview. `dataUrl` is a downscaled PNG for the
2280
+ * `<img>` preview only; the full-resolution bytes stay in main and are staged
2281
+ * into the bundle only when the user keeps the screenshot checked. `width` /
2282
+ * `height` are the capture's logical (DIP) dimensions, so the preview can hold
2283
+ * the real aspect ratio without a layout shift.
2284
+ */
2285
+ interface OkBugReportScreenshot {
2286
+ dataUrl: string;
2287
+ width: number;
2288
+ height: number;
2289
+ }
2290
+ /**
2291
+ * Result of the desktop `ok:bug-report:dispatch` create operation. Never
2292
+ * thrown across the IPC boundary — every failure mode is discriminated so the
2293
+ * report dialog can render its failure state.
2294
+ */
2295
+ type OkBugReportCreateResult = {
2296
+ ok: true;
2297
+ zipPath: string;
2298
+ /**
2299
+ * On-disk size of the produced zip. Carried on the result rather than
2300
+ * the summary because the summary mirrors the bundled manifest, which
2301
+ * cannot know the final size of the archive that contains it.
2302
+ */
2303
+ zipSizeBytes: number;
2304
+ summary: ReportBundleSummary$1;
2305
+ } | {
2306
+ ok: false;
2307
+ error: string;
2308
+ };
2309
+ /**
2310
+ * Report metadata the renderer supplies with a send operation — the user's
2311
+ * note plus the system summary the preceding create yielded. Main enriches
2312
+ * it with host facts (app version, platform) before it reaches the intake
2313
+ * wire or the fallback email body; the renderer never sources those.
2314
+ */
2315
+ interface OkBugReportSendMetadata {
2316
+ level: ReportBundleLevel$1;
2317
+ /** True when the bundle was system-wide (no project open at capture). */
2318
+ systemWide: boolean;
2319
+ projectSlug: string | null;
2320
+ note?: string;
2321
+ }
2322
+ /**
2323
+ * Why a send operation resolved to the email fallback instead of an upload
2324
+ * reference. `email-draft` is the designed default, not a failure: no intake
2325
+ * endpoint is configured, no network request was made, and the prefilled
2326
+ * draft IS the transport — the dialog shows an email flow, not an error.
2327
+ * `send-failed` covers real failures: a configured upload that was attempted
2328
+ * and refused (offline, timeout, rejection at any step), or a request the
2329
+ * handler refused outright (malformed payload, zip outside the bug-reports
2330
+ * root).
2331
+ */
2332
+ type OkBugReportSendFallbackReason = 'email-draft' | 'send-failed';
2333
+ /**
2334
+ * Result of the desktop `ok:bug-report:dispatch` send operation. Success
2335
+ * carries the intake service's report reference. Everything else resolves to
2336
+ * the email fallback — a prefilled mailto the dialog offers in place of the
2337
+ * upload — with `reason` discriminating the designed no-intake email path
2338
+ * from a genuine send failure. Never thrown across the IPC boundary.
2339
+ */
2340
+ type OkBugReportSendResult = {
2341
+ ok: true;
2342
+ reference: string;
2343
+ } | {
2344
+ ok: false;
2345
+ reason: OkBugReportSendFallbackReason;
2346
+ fallback: {
2347
+ mailtoUrl: string;
2348
+ };
2349
+ };
2350
+ /**
2351
+ * A crash signal detected by desktop main, pushed to the renderer over the
2352
+ * `ok:bug-report:crash-detected` event channel as an invitation to file a
2353
+ * report — never an automatic send. `eventId` keys the acknowledgment
2354
+ * round-trip: the renderer acks over `ok:bug-report:dispatch`
2355
+ * (`kind: 'crash-ack'`) and main persists the id so one crash event never
2356
+ * prompts twice, across restarts included.
2357
+ *
2358
+ * Lives in core for the same reason as the sibling bug-report types: the
2359
+ * desktop-bridge leaf and the capture implementation must share one type.
2360
+ *
2361
+ * `minidumpAvailable` is main's authoritative answer (only main can stat the
2362
+ * crash-dumps dir) to "is there a crash minidump to include for this event?".
2363
+ * The report dialog renders the crash-dump opt-in only when it is true — an
2364
+ * invite with no dump (e.g. a dirty shutdown that left none) offers no dead
2365
+ * checkbox. Advisory for UI gating only: the actual attach still re-checks the
2366
+ * dump on disk at bundle time, so a dump that vanished by then is simply
2367
+ * omitted.
2368
+ */
2369
+ type OkBugReportCrashDetectedEvent = {
2370
+ eventId: string;
2371
+ kind: 'render-process-gone';
2372
+ context: {
2373
+ reason: string;
2374
+ exitCode?: number;
2375
+ };
2376
+ minidumpAvailable: boolean;
2377
+ } | {
2378
+ eventId: string;
2379
+ kind: 'child-process-gone';
2380
+ context: {
2381
+ reason: string;
2382
+ processType: string;
2383
+ name?: string;
2384
+ exitCode?: number;
2385
+ };
2386
+ minidumpAvailable: boolean;
2387
+ } | {
2388
+ eventId: string; /** Boot-time detection: the previous session left a dirty-shutdown sentinel or fresh minidumps. */
2389
+ kind: 'boot';
2390
+ context: {
2391
+ dirtyShutdown: boolean;
2392
+ newMinidumps: number;
2393
+ };
2394
+ minidumpAvailable: boolean;
2395
+ /**
2396
+ * App version of the session that CRASHED, which is not the version now
2397
+ * running whenever an auto-update landed between the crash and this
2398
+ * launch. Absent when neither the crashed session's sentinel nor the
2399
+ * minidump's own annotations name one — an unknown version is reported
2400
+ * as unknown rather than approximated by the running one.
2401
+ *
2402
+ * Only the boot variant carries it. The two runtime variants are raised
2403
+ * by the very session that crashed, so their crashed version is the
2404
+ * running version by construction and a field would be pure restatement.
2405
+ */
2406
+ crashedAppVersion?: string;
2407
+ };
2408
+ /**
2409
+ * Result of the desktop `ok:bug-report:dispatch` crash-ack operation. Never
2410
+ * thrown across the IPC boundary; the only failure mode is a malformed
2411
+ * renderer payload.
2412
+ */
2413
+ type OkBugReportCrashAckResult = {
2414
+ ok: true;
2415
+ } | {
2416
+ ok: false;
2417
+ error: string;
2418
+ };
2419
+ /**
2420
+ * Whether main is holding a crash dump a report opened right now could carry.
2421
+ *
2422
+ * Deliberately a bare boolean: which dump, when it was written, and how big it
2423
+ * is are all per-crash identifiers, and the renderer only needs to decide
2424
+ * whether to render the opt-in.
2425
+ */
2426
+ interface OkBugReportCrashDumpAvailability {
2427
+ available: boolean;
2428
+ }
2429
+ /**
2430
+ * One row in the persisted bug-report history, projected from a report sidecar
2431
+ * plus main-derived facts. `state` is the OPEN sidecar state (`'unknown'` for a
2432
+ * degraded/legacy/corrupt row). `zipPath` is main-derived (never renderer
2433
+ * influenced) and re-validated for containment before any retry/reveal; the
2434
+ * renderer passes it straight back to `send` / reveal without composing a path.
2435
+ *
2436
+ * `systemWide` / `projectSlug` are carried so a retry reconstructs the exact
2437
+ * `OkBugReportSendMetadata` without a second capture. `retryable` is
2438
+ * `true` only when the report is neither `sent` nor mid-`uploading` and its zip
2439
+ * is still on disk. `degraded` is `true` for a synthesized row (no sidecar, a
2440
+ * corrupt sidecar, or an unknown state) so the list can render it plainly
2441
+ * instead of failing.
2442
+ */
2443
+ interface OkBugReportListRow {
2444
+ id: string;
2445
+ createdAt: string;
2446
+ bundleLevel: ReportBundleLevel$1 | 'unknown';
2447
+ /**
2448
+ * Derived from the sidecar's single-source state list, so a state added to
2449
+ * `REPORT_SIDECAR_STATES` propagates here instead of silently drifting.
2450
+ */
2451
+ state: ReportSidecarState;
2452
+ zipBytes: number;
2453
+ zipDeleted: boolean;
2454
+ zipExists: boolean;
2455
+ systemWide: boolean;
2456
+ projectSlug: string | null;
2457
+ /**
2458
+ * State-coupled: present only when `state === 'sent'`. Not modelled as a
2459
+ * discriminated union because `state` is an OPEN enum — enumerating arms
2460
+ * here would reintroduce the drift that deriving `state` removes.
2461
+ */
2462
+ reference?: string;
2463
+ /** State-coupled: present only when `state === 'upload-failed'`. */
2464
+ lastError?: {
2465
+ reason: string;
2466
+ at: string;
2467
+ };
2468
+ attemptsCount: number;
2469
+ note?: string;
2470
+ /** Main-derived absolute zip path; re-validated for containment on use. */
2471
+ zipPath: string;
2472
+ retryable: boolean;
2473
+ degraded: boolean;
2474
+ }
2475
+ /**
2476
+ * Result of the desktop `ok:bug-report:dispatch` list operation — the persisted
2477
+ * report history, newest first. Never thrown across the IPC boundary; a scan
2478
+ * failure resolves to `{ ok: false }` so the list renders an error state.
2479
+ */
2480
+ type OkBugReportListResult = {
2481
+ ok: true;
2482
+ reports: OkBugReportListRow[];
2483
+ } | {
2484
+ ok: false;
2485
+ reason: string;
2486
+ };
2487
+ /**
2488
+ * Result of the desktop `ok:bug-report:dispatch` delete operation. Removes a
2489
+ * report's zip and sidecar by `id` after a containment + id-shape check. Never
2490
+ * thrown across the IPC boundary.
2491
+ * - `id-invalid` — the id failed the timestamp-basename shape / containment gate.
2492
+ * - `in-flight` — the report's own send is currently in progress in this process.
2493
+ * - `not-found` — no zip and no sidecar for the id.
2494
+ * - `io-error` — a filesystem removal failed.
2495
+ */
2496
+ type OkBugReportDeleteResult = {
2497
+ ok: true;
2498
+ } | {
2499
+ ok: false;
2500
+ reason: 'id-invalid' | 'in-flight' | 'not-found' | 'io-error';
2501
+ };
2261
2502
  //#endregion
2262
2503
  //#region ../core/src/logging/secret-scrub.d.ts
2263
2504
  /** Apply {@link SECRET_PATTERNS} line by line; report which patterns matched. */
@@ -4236,6 +4477,19 @@ interface IgnoredCommittedKey {
4236
4477
  source?: ConfigIssueSource;
4237
4478
  }
4238
4479
  //#endregion
4480
+ //#region ../core/src/constants/create-new-banner.d.ts
4481
+ /**
4482
+ * Cascade-banner discriminator for the Create new project dialog. Drives:
4483
+ * - the renderer's banner-shown telemetry dedup (one per dialog open)
4484
+ * - the main-process recordCreateNewBannerShown handler's banner attribute
4485
+ * - the corresponding span attribute on ok.desktop.createNewBannerShown
4486
+ *
4487
+ * - `'nested'` — banner shown when parent is inside an existing OK project.
4488
+ * - `'nonempty'` — banner shown when target folder exists with content.
4489
+ * - `'git-confirm'` — banner shown when parent is inside a git repo (no .ok/).
4490
+ */
4491
+ type CreateNewBannerKind = 'nested' | 'nonempty' | 'git-confirm';
4492
+ //#endregion
4239
4493
  //#region ../core/src/constants/editors.d.ts
4240
4494
  /**
4241
4495
  * Canonical editor-ID and label registry shared across the CLI's
@@ -4247,6 +4501,19 @@ interface IgnoredCommittedKey {
4247
4501
  */
4248
4502
  type EditorId$1 = 'claude' | 'claude-desktop' | 'cursor' | 'codex' | 'copilot' | 'opencode' | 'openclaw' | 'pi' | 'antigravity' | 'lm-studio' | 'hermes';
4249
4503
  //#endregion
4504
+ //#region ../core/src/constants/folder-state.d.ts
4505
+ /**
4506
+ * Classification of a candidate folder path. Drives the renderer's banner
4507
+ * cascade and the IPC handler's defense-in-depth check.
4508
+ *
4509
+ * - `'free'` — path does not exist on disk; safe to mkdir.
4510
+ * - `'exists-empty'` — directory exists with zero entries; safe to use.
4511
+ * - `'exists-nonempty'` — directory exists with at least one entry, OR the
4512
+ * path resolves to a non-directory (a file occupies
4513
+ * the name). Either case blocks the create.
4514
+ */
4515
+ type OkFolderState = 'free' | 'exists-empty' | 'exists-nonempty';
4516
+ //#endregion
4250
4517
  //#region ../../node_modules/.pnpm/prosemirror-transform@1.12.0/node_modules/prosemirror-transform/dist/index.d.ts
4251
4518
  /**
4252
4519
  There are several things that positions can be mapped through.
@@ -9946,6 +10213,190 @@ declare module '@tiptap/core' {
9946
10213
  }
9947
10214
  }
9948
10215
  //#endregion
10216
+ //#region ../core/src/git/worktree-selector-model.d.ts
10217
+ interface WorktreeSelectorEntry {
10218
+ /** Short branch name. `null` for a detached-HEAD worktree (rare). */
10219
+ readonly branch: string | null;
10220
+ /**
10221
+ * Absolute path of the worktree checked out on this branch, or `null` when
10222
+ * no worktree exists for it yet. Realpath-collapsed by the caller.
10223
+ */
10224
+ readonly worktreePath: string | null;
10225
+ /** This entry's worktree is the currently-focused window's project. */
10226
+ readonly isCurrent: boolean;
10227
+ /** This entry's worktree is the repo's main (primary) worktree. */
10228
+ readonly isMain: boolean;
10229
+ /** The worktree is locked (`git worktree lock`). */
10230
+ readonly locked: boolean;
10231
+ /**
10232
+ * How many commits this local branch is behind its `origin/<branch>`
10233
+ * upstream (READ-ONLY, no-network `git rev-list --count <branch>..origin/<branch>`
10234
+ * at model-build). Present only when the branch HAS an upstream and the count
10235
+ * is computable; absent (undefined) when there's no upstream, no network fetch
10236
+ * has run, or the count couldn't be read. `0` means up-to-date with the last
10237
+ * fetch. Surfaced as a "N behind origin" hint on the base selector to nudge the
10238
+ * user toward a fresh `origin/<x>` base instead of a stale local one.
10239
+ */
10240
+ readonly behind?: number;
10241
+ }
10242
+ interface WorktreeSelectorModel {
10243
+ /** Absolute path of the repo's main worktree (the `.ok/worktrees/` anchor). */
10244
+ readonly mainRoot: string;
10245
+ /** Branch of the currently-focused window's project, or `null` if unknown. */
10246
+ readonly currentBranch: string | null;
10247
+ /** Ordered for display: current first, then main, then the rest. */
10248
+ readonly entries: readonly WorktreeSelectorEntry[];
10249
+ /**
10250
+ * Remote-tracking branch refs WITH their remote prefix (`origin/main`,
10251
+ * `origin/feature-x`, `upstream/dev`), deduped + order-preserving,
10252
+ * `<remote>/HEAD` symbolic refs excluded. Two consumers in the dialog:
10253
+ * - remote-tracking CHECKOUT: a typed `branch` whose bare name matches one
10254
+ * of these refs but has NO local branch is checked out as a new local
10255
+ * tracking branch (`git worktree add --track -b <name> <path> origin/<name>`),
10256
+ * NOT forked off stale HEAD (which would silently discard remote history).
10257
+ * - remote BASE options: every ref is selectable as a `--no-track` base for
10258
+ * a new branch, so a feature branch can start from fresh `origin/<x>` even
10259
+ * when the local `<x>` is behind.
10260
+ * Empty when the repo has no remotes / enumeration failed (fail-soft).
10261
+ */
10262
+ readonly remoteBranches: readonly string[];
10263
+ }
10264
+ /**
10265
+ * IPC-facing result of enumerating the worktree selector. Canonical here (not
10266
+ * in desktop) so the desktop host contract and `ipc-channels` import one
10267
+ * definition. `no-git` = the project isn't inside a git repo.
10268
+ */
10269
+ type WorktreeListResult = {
10270
+ readonly ok: true;
10271
+ readonly model: WorktreeSelectorModel;
10272
+ } | {
10273
+ readonly ok: false;
10274
+ readonly reason: 'no-git';
10275
+ };
10276
+ /** Renderer → main request to create (or locate) a worktree for a branch. */
10277
+ interface WorktreeCreateRequest {
10278
+ /** With `createBranch`, a NEW branch name; otherwise an existing branch. */
10279
+ readonly branch: string;
10280
+ /**
10281
+ * Base ref for a new LOCAL-based branch (defaults to HEAD). Ignored unless
10282
+ * `createBranch`, and mutually exclusive with `baseRef` (a remote base). The
10283
+ * created branch does NOT track this base (a local base carries no upstream to
10284
+ * inherit). Git arm: `git worktree add -b <branch> <path> -- <baseBranch>`.
10285
+ */
10286
+ readonly baseBranch?: string | null;
10287
+ /**
10288
+ * Remote-tracking base ref for a new branch (e.g. `origin/main`). Set instead
10289
+ * of `baseBranch` when the user picked a remote base in the selector. The new
10290
+ * branch is created off this ref WITH `--no-track` — a feature branch must not
10291
+ * inherit the base's remote as its own upstream. Ignored unless `createBranch`;
10292
+ * takes precedence over `baseBranch` when both are somehow set. Git arm:
10293
+ * `git worktree add -b <branch> <path> <baseRef> --no-track`. The ref is a
10294
+ * `<remote>/<branch>` string, never a dash-prefixed positional, so it needs no
10295
+ * `--` guard (git resolves it as a ref, and the trailing `--no-track` is a flag).
10296
+ */
10297
+ readonly baseRef?: string | null;
10298
+ /**
10299
+ * Remote-only checkout ref (e.g. `origin/feature-x`). Set when `branch` names a
10300
+ * branch that exists ONLY on a remote (no local branch). The worktree is checked
10301
+ * out as a NEW LOCAL branch that TRACKS this remote ref, preserving remote
10302
+ * history instead of forking a divergent local branch off stale HEAD. When set,
10303
+ * `createBranch` is `true` (a local branch is created) but `baseBranch` /
10304
+ * `baseRef` are ignored — the remote ref IS the base. Git arm:
10305
+ * `git worktree add --track -b <branch> <path> <remoteRef>`. The explicit ref
10306
+ * avoids the multi-remote DWIM `fatal: invalid reference` a bare `-b <branch>`
10307
+ * would hit.
10308
+ */
10309
+ readonly remoteRef?: string | null;
10310
+ /** `true` → create a new branch; `false` → check out an existing branch. */
10311
+ readonly createBranch: boolean;
10312
+ }
10313
+ /**
10314
+ * IPC-facing result of creating/locating a worktree. `created: false` means the
10315
+ * branch already had a worktree and `path` points at it (open that window
10316
+ * instead). The failure reasons map git's refusal modes to actionable copy.
10317
+ * `branch-not-found` / `fetch-failed` arise only from the share-scoped
10318
+ * `checkout` operation, whose branch resolution may `git fetch` from `origin`
10319
+ * (branch gone upstream vs. a retryable network/timeout failure); the other
10320
+ * failure reasons come from validation and `git worktree add`.
10321
+ */
10322
+ type WorktreeCreateResult = {
10323
+ readonly ok: true;
10324
+ readonly path: string;
10325
+ readonly created: boolean;
10326
+ } | {
10327
+ readonly ok: false;
10328
+ readonly reason: 'helper-not-found';
10329
+ /**
10330
+ * The command git tried to spawn and couldn't resolve (e.g. `git-lfs`),
10331
+ * extracted by `detectMissingGitHelper`. Required on this arm so a
10332
+ * producer can't emit the reason without naming the tool — the failure
10333
+ * copy shows it verbatim so the user knows what to install.
10334
+ */
10335
+ readonly helper: string;
10336
+ readonly message?: string;
10337
+ } | {
10338
+ readonly ok: false;
10339
+ readonly reason: 'fetch-failed';
10340
+ readonly message?: string;
10341
+ readonly helper?: never;
10342
+ /**
10343
+ * Set when the fetch failed for want of a usable credential rather than
10344
+ * for a network/timeout reason, and re-authenticating could plausibly fix
10345
+ * it (`isLoginFixableGitAuthError` — so not 403, scope-mismatch, or SSH
10346
+ * key failures, which a sign-in doesn't repair).
10347
+ *
10348
+ * Its own arm rather than a field on the shared failure arm below: only
10349
+ * `fetch-failed` reaches git's credential stage, so no other reason can
10350
+ * structurally carry the flag. Optional and additive — a producer that
10351
+ * omits it degrades to the generic connection-flavored copy, which is the
10352
+ * pre-existing behavior.
10353
+ */
10354
+ readonly authFailed?: true;
10355
+ } | {
10356
+ readonly ok: false;
10357
+ readonly reason: 'invalid-branch' | 'branch-exists' | 'already-checked-out' | 'path-exists' | 'no-git' | 'branch-not-found'
10358
+ /**
10359
+ * The repository exists but has no commits, so no branch is a
10360
+ * resolvable ref and `git worktree add` fails with
10361
+ * `fatal: invalid reference: <base>`. Distinct from `no-git` (not a
10362
+ * repository at all) and from `branch-not-found` (a repository with
10363
+ * history where that particular branch is missing).
10364
+ */
10365
+ | 'empty-repo' | 'error';
10366
+ readonly message?: string;
10367
+ readonly helper?: never;
10368
+ };
10369
+ //#endregion
10370
+ //#region ../core/src/handoff/types.d.ts
10371
+ /** Failure classes reported by handoff telemetry and the desktop host bridge. */
10372
+ type HandoffFailureReason = 'not-installed' | 'scheme-blocked' | 'web-endpoint-error' | 'invalid-payload' | 'dispatch-error' | 'web-host-cursor-unsupported';
10373
+ /**
10374
+ * Scope discriminator recorded on a handoff telemetry line. Present only on a
10375
+ * selection-scoped dispatch; the file / folder / project scopes omit the
10376
+ * field, so an absent `scope` reads as a non-selection handoff.
10377
+ *
10378
+ * Reused by the desktop telemetry channel and bridge rather than redeclared
10379
+ * at each boundary.
10380
+ */
10381
+ type HandoffScope = 'selection';
10382
+ //#endregion
10383
+ //#region ../core/src/handoff/terminal-launch.d.ts
10384
+ /**
10385
+ * The agent CLIs the docked terminal can launch. Each starts an INTERACTIVE
10386
+ * session that stays open with the composed prompt threaded in — NOT the
10387
+ * non-interactive one-shot variants (`codex exec`, `cursor-agent -p`,
10388
+ * `hermes -q`/`-z`) which run-and-exit before the user can continue.
10389
+ *
10390
+ * The prompt reaches the CLI three ways, per {@link TerminalCliInfo}:
10391
+ * - positional (`claude '<prompt>'`) — the default (no `promptFlag`);
10392
+ * - a flag (`opencode --prompt '<prompt>'`, `openclaw chat --message '<prompt>'`)
10393
+ * for CLIs whose positional isn't the prompt (`promptFlag`);
10394
+ * - post-launch PTY paste (`hermes`) for CLIs with NO starting-prompt argument
10395
+ * at all — the promptless `<bin>` is spawned and the prompt is bracketed-paste
10396
+ * injected once its TUI is ready (`startupInjection`).
10397
+ */
10398
+ type TerminalCli = 'claude' | 'codex' | 'copilot' | 'cursor' | 'opencode' | 'pi' | 'antigravity' | 'openclaw' | 'hermes';
10399
+ //#endregion
9949
10400
  //#region ../core/src/i18n/locales.d.ts
9950
10401
  /**
9951
10402
  * The interface locales OpenKnowledge enumerates, ordered by total speakers.
@@ -10229,6 +10680,2151 @@ declare module 'mdast-util-math' {
10229
10680
  }
10230
10681
  } //# sourceMappingURL=mdast-augmentation.d.ts.map
10231
10682
  //#endregion
10683
+ //#region ../core/src/markdown/lint/types.d.ts
10684
+ declare const LINT_PLUGIN_IDS: readonly ["markdownlint", "frontmatter", "okf"];
10685
+ type LintPluginId = (typeof LINT_PLUGIN_IDS)[number];
10686
+ //#endregion
10687
+ //#region ../core/src/schemas/api/local-op.d.ts
10688
+ /**
10689
+ * Response body for `POST /api/local-op/ok-init`, discriminated on `ok`.
10690
+ *
10691
+ * Both branches return HTTP 200; protocol-level errors (400 malformed
10692
+ * body, 500 unexpected) use the standard RFC 9457 problem+json envelope.
10693
+ *
10694
+ * On success: `projectPath` is the realpath-collapsed path that was
10695
+ * scaffolded (callers compare against their input to detect symlink
10696
+ * resolution). The endpoint is idempotent — calling on an already-OK
10697
+ * project returns `{ok: true}` without rewriting `config.yml`.
10698
+ *
10699
+ * On failure: `reason` discriminates the user-facing recovery path
10700
+ * (not-a-git-worktree → re-pick a different folder; init-failed →
10701
+ * surface the message and let the user inspect manually).
10702
+ */
10703
+ declare const LocalOpOkInitResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
10704
+ ok: ZodLiteral<true>;
10705
+ projectPath: ZodString;
10706
+ }, $loose>, ZodObject<{
10707
+ ok: ZodLiteral<false>;
10708
+ reason: ZodEnum<{
10709
+ "init-failed": "init-failed";
10710
+ "not-a-git-worktree": "not-a-git-worktree";
10711
+ }>;
10712
+ message: ZodString;
10713
+ }, $loose>], "ok">;
10714
+ type LocalOpOkInitResponse = output<typeof LocalOpOkInitResponseSchema>;
10715
+ //#endregion
10716
+ //#region ../core/src/schemas/api/share.d.ts
10717
+ declare const BranchInfoResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
10718
+ shareTargetExists: ZodBoolean;
10719
+ dirtyConflicts: ZodObject<{
10720
+ conflicts: ZodBoolean;
10721
+ files: ZodArray<ZodString>;
10722
+ }, $loose>;
10723
+ branchIsLocal: ZodBoolean;
10724
+ shareTargetOnOriginBranch: ZodOptional<ZodBoolean>;
10725
+ detached: ZodLiteral<false>;
10726
+ currentBranch: ZodNullable<ZodString>;
10727
+ currentHeadSha: ZodNull;
10728
+ }, $loose>, ZodObject<{
10729
+ shareTargetExists: ZodBoolean;
10730
+ dirtyConflicts: ZodObject<{
10731
+ conflicts: ZodBoolean;
10732
+ files: ZodArray<ZodString>;
10733
+ }, $loose>;
10734
+ branchIsLocal: ZodBoolean;
10735
+ shareTargetOnOriginBranch: ZodOptional<ZodBoolean>;
10736
+ detached: ZodLiteral<true>;
10737
+ currentBranch: ZodNull;
10738
+ currentHeadSha: ZodString;
10739
+ }, $loose>], "detached">;
10740
+ type BranchInfoResponse = output<typeof BranchInfoResponseSchema>;
10741
+ /**
10742
+ * Response body for `POST /api/git/checkout`, discriminated on `ok`.
10743
+ *
10744
+ * Both branches return HTTP 200; protocol-level errors (400 malformed
10745
+ * body, 500 unexpected) use the standard RFC 9457 problem+json envelope
10746
+ * via `errorResponse`. Logical failures carry the discriminated reason
10747
+ * code so the dialog can map each to its own toast copy.
10748
+ *
10749
+ * On `dirty-conflict`, `files` is the same intersection-of-paths set
10750
+ * `dirtyFilesOverlapWith` returns — sorted ascending, deduped. Omitted
10751
+ * on all other failure variants and on success.
10752
+ */
10753
+ declare const CheckoutResponseSchema: ZodDiscriminatedUnion<[ZodObject<{
10754
+ ok: ZodLiteral<true>;
10755
+ }, $loose>, ZodObject<{
10756
+ ok: ZodLiteral<false>;
10757
+ reason: ZodEnum<{
10758
+ "dirty-conflict": "dirty-conflict";
10759
+ "branch-not-found": "branch-not-found";
10760
+ "fetch-failed": "fetch-failed";
10761
+ "checkout-failed": "checkout-failed";
10762
+ "branch-in-other-worktree": "branch-in-other-worktree";
10763
+ "ff-diverged": "ff-diverged";
10764
+ }>;
10765
+ files: ZodOptional<ZodArray<ZodString>>;
10766
+ otherWorktreePath: ZodOptional<ZodString>;
10767
+ }, $loose>], "ok">;
10768
+ type CheckoutResponse = output<typeof CheckoutResponseSchema>;
10769
+ /**
10770
+ * Response body for `POST /api/share/target-status`, discriminated on
10771
+ * `verdict`. Only `renamed` carries `renamedTo` (the redirect target), so the
10772
+ * illegal state "renamed with no destination" is unrepresentable.
10773
+ *
10774
+ * The whole union is value-tolerant: any parse failure — an unrecognized
10775
+ * verdict from a newer server, or a malformed `renamed` missing `renamedTo` —
10776
+ * collapses to `{ verdict: 'unknown' }`, so a skewed client degrades to today's
10777
+ * guidance instead of throwing. Members are `.loose()` so the desktop proxy
10778
+ * passes unknown additive fields through.
10779
+ */
10780
+ declare const ShareTargetStatusResponseSchema: ZodCatch<ZodDiscriminatedUnion<[ZodObject<{
10781
+ verdict: ZodLiteral<"on-origin">;
10782
+ }, $loose>, ZodObject<{
10783
+ verdict: ZodLiteral<"renamed">;
10784
+ renamedTo: ZodString;
10785
+ }, $loose>, ZodObject<{
10786
+ verdict: ZodLiteral<"deleted">;
10787
+ }, $loose>, ZodObject<{
10788
+ verdict: ZodLiteral<"never-on-branch">;
10789
+ }, $loose>, ZodObject<{
10790
+ verdict: ZodLiteral<"changed-locally">;
10791
+ }, $loose>, ZodObject<{
10792
+ verdict: ZodLiteral<"unknown">;
10793
+ }, $loose>], "verdict">>;
10794
+ type ShareTargetStatusResponse = output<typeof ShareTargetStatusResponseSchema>;
10795
+ //#endregion
10796
+ //#region ../core/src/sharing/receive-flow.d.ts
10797
+ /**
10798
+ * Recent-projects row. `missing` is set at read time by main (folder was
10799
+ * absent when the list was assembled). `gitRemoteUrl` is the canonical
10800
+ * `https://github.com/<owner>/<repo>.git` form when available (open-time
10801
+ * backfill from `.git/config`).
10802
+ */
10803
+ interface RecentProjectEntry {
10804
+ path: string;
10805
+ name: string;
10806
+ lastOpenedAt: string;
10807
+ missing?: boolean;
10808
+ gitRemoteUrl?: string;
10809
+ /**
10810
+ * Git-worktree relationship, computed at list-time (not persisted) so the
10811
+ * project switcher can nest linked worktrees under their main project.
10812
+ * Absent for non-git projects. `gitCommonDir` is the repo identity shared by
10813
+ * all worktrees; `mainRoot` is the repo's main worktree root; `branch` is the
10814
+ * checked-out branch (null on detached HEAD).
10815
+ */
10816
+ gitCommonDir?: string;
10817
+ mainRoot?: string;
10818
+ isLinkedWorktree?: boolean;
10819
+ branch?: string | null;
10820
+ }
10821
+ //#endregion
10822
+ //#region ../core/src/skills-catalog/skill-cost.d.ts
10823
+ /**
10824
+ * A skill's context cost in estimated tokens, split by when the cost is paid.
10825
+ * There is deliberately no summed total: a single figure misranks skills whose
10826
+ * weight sits in different tiers (a lean index in front of a heavy body vs. the
10827
+ * reverse), so every surface renders the three tiers or a documented subset.
10828
+ *
10829
+ * The zod schema is the single source both the estimator's return type and the
10830
+ * skills-list wire field derive from, so the shape cannot drift between the
10831
+ * producer and the transport.
10832
+ */
10833
+ declare const SkillCostTiersSchema: ZodObject<{
10834
+ alwaysOn: ZodNumber;
10835
+ onTrigger: ZodNumber;
10836
+ onDemand: ZodNumber;
10837
+ }, $strict>;
10838
+ type SkillCostTiers = output<typeof SkillCostTiersSchema>;
10839
+ //#endregion
10840
+ //#region ../core/src/terminal-layout.d.ts
10841
+ declare const TERMINAL_PLACEMENTS: readonly ["bottom", "right"];
10842
+ type TerminalPlacement = (typeof TERMINAL_PLACEMENTS)[number];
10843
+ //#endregion
10844
+ //#region ../core/src/desktop-bridge.d.ts
10845
+ interface OkTerminalRestartTab {
10846
+ ordinal: number;
10847
+ customLabel: string | null;
10848
+ }
10849
+ interface OkTerminalRestartSnapshot {
10850
+ tabs: OkTerminalRestartTab[];
10851
+ activeOrdinal: number | null;
10852
+ }
10853
+ interface OkTerminalDockState {
10854
+ terminalVisible: boolean;
10855
+ agentPanelVisible: boolean;
10856
+ terminal?: {
10857
+ order: string[];
10858
+ activeKey: string | null;
10859
+ };
10860
+ terminalSnapshot?: OkTerminalRestartSnapshot;
10861
+ agents?: {
10862
+ order: string[];
10863
+ activeKey: string | null;
10864
+ };
10865
+ }
10866
+ /**
10867
+ * A conversation or comments action started in a popped-out note window and
10868
+ * handed back to the owning project window. The note renderer composes the
10869
+ * same bounded prompt it would use locally; main only resolves/focuses the
10870
+ * project window and forwards this typed intent.
10871
+ */
10872
+ type OkNoteWindowMainAction = {
10873
+ readonly kind: 'active-input';
10874
+ readonly text: string;
10875
+ readonly newTab: boolean;
10876
+ readonly submit: boolean;
10877
+ readonly target?: 'agents';
10878
+ } | {
10879
+ readonly kind: 'agent-thread';
10880
+ readonly agentSource: 'registry' | 'custom';
10881
+ readonly agentId: string;
10882
+ readonly prompt: string | null;
10883
+ readonly docName: string | null;
10884
+ readonly titleHint: string | null;
10885
+ } | {
10886
+ readonly kind: 'terminal-launch';
10887
+ readonly prompt: string;
10888
+ readonly cli: TerminalCli;
10889
+ readonly stage: boolean;
10890
+ } | {
10891
+ readonly kind: 'reveal-comments';
10892
+ readonly docName: string;
10893
+ readonly scope: 'doc' | 'queue';
10894
+ };
10895
+ type OkNoteWindowMainActionResult = {
10896
+ readonly ok: true;
10897
+ } | {
10898
+ readonly ok: false;
10899
+ readonly reason: 'invalid-action' | 'not-note-window' | 'project-not-open';
10900
+ };
10901
+ type OkTerminalDockStateUpdate = {
10902
+ surface: 'terminal';
10903
+ order: string[];
10904
+ activeKey: string | null;
10905
+ terminalSnapshot: OkTerminalRestartSnapshot;
10906
+ } | {
10907
+ surface: 'agents';
10908
+ order: string[];
10909
+ activeKey: string | null;
10910
+ };
10911
+ type OkTerminalDockStateWriteResult = {
10912
+ ok: true;
10913
+ } | {
10914
+ ok: false;
10915
+ reason: 'invalid-request' | 'no-window-context' | 'persist-failed' | 'ipc-unavailable';
10916
+ };
10917
+ /** Render mode picked by the main process when creating a BrowserWindow. */
10918
+ type OkDesktopMode = 'editor' | 'navigator' | 'terminal' | 'note';
10919
+ /**
10920
+ * Config values injected at preload-exposure time. A frozen snapshot, not a
10921
+ * getter — mid-session project switches fire through `onProjectSwitched`
10922
+ * instead. Required fields are present before the first renderer render
10923
+ * because the main process awaits the utility's `ready` message before
10924
+ * creating the BrowserWindow.
10925
+ */
10926
+ interface OkDesktopConfig {
10927
+ /** WebSocket URL for the HocuspocusProvider (ws://localhost:<port>/collab). */
10928
+ readonly collabUrl: string;
10929
+ /** Origin for HTTP /api/* fetches (http://localhost:<port>). */
10930
+ readonly apiOrigin: string;
10931
+ /** Realpath of the project's content directory. */
10932
+ readonly projectPath: string;
10933
+ /** Display name for the project (usually basename of projectPath). */
10934
+ readonly projectName: string;
10935
+ /** Render mode — `navigator` renders the Project Navigator, `editor` renders the doc editor, `terminal` renders the standalone terminal window, `note` renders a single popped-out document full-window. */
10936
+ readonly mode: OkDesktopMode;
10937
+ readonly e2eSmoke: boolean;
10938
+ readonly singleFile: boolean;
10939
+ readonly initialDoc: string | null;
10940
+ readonly freshlyCreated: boolean;
10941
+ readonly startupTraceparent?: string;
10942
+ readonly ptyAvailable: boolean;
10943
+ /**
10944
+ * The saved interface-language choice, unresolved, as main read it off disk
10945
+ * while starting this window.
10946
+ *
10947
+ * Windows that mount a `ConfigProvider` get the preference from config and
10948
+ * ignore this. The launcher has no project and therefore no config document,
10949
+ * so without a value here it renders the bootstrap catalog under a menu bar
10950
+ * main has already translated — main resolves the preference before any
10951
+ * window exists, which is the whole reason the menus are right.
10952
+ *
10953
+ * Unresolved on purpose: `'system'` has to arrive as `'system'` so the
10954
+ * renderer re-resolves it against the browser's current list rather than
10955
+ * freezing whatever the OS said when the window opened.
10956
+ */
10957
+ readonly languagePreference?: LanguagePreference;
10958
+ }
10959
+ /**
10960
+ * Menu-action IDs fired by main → renderer via `ok:menu-action` after a user
10961
+ * selects a menu bar item. The renderer dispatches the action into the editor
10962
+ * store. Keep this union flat and strongly typed — a single `kind` field
10963
+ * discriminates without payload.
10964
+ */
10965
+ type OkMenuAction = 'new-doc' | 'new-folder' | 'new-project' | 'rename' | 'delete' | 'close-active-tab-or-window' | 'toggle-sidebar' | 'toggle-source' | 'save-version' | 'version-history' | 'focus-search' | 'focus-command-palette' | 'navigate-back' | 'navigate-forward' | 'new-from-template' | 'duplicate' | 'move-to-trash' | 'reveal-in-finder' | 'send-to-ai' | 'copy-full-path' | 'copy-relative-path' | 'toggle-show-hidden-files' | 'toggle-show-ok-folders' | 'toggle-show-only-markdown-files' | 'toggle-show-skills-section' | 'expand-all-tree' | 'collapse-all-tree' | 'toggle-doc-panel' | 'toggle-terminal' | 'move-terminal' | 'toggle-agent-panel' | 'new-terminal' | 'kill-terminal' | 'new-worktree' | 'switch-worktree' | 'report-bug' | 'send-feedback';
10966
+ /**
10967
+ * Unsubscribe closure returned from `onProjectSwitched` / `onMenuAction`.
10968
+ * Calling it removes the listener. Per-electron#33328, the bridge's
10969
+ * preload-side wrapper is what actually tracks the listener reference so
10970
+ * callers must use this returned closure rather than trying to remove by
10971
+ * reference from their own code.
10972
+ */
10973
+ type OkUnsubscribe = () => void;
10974
+ interface PersistedEditorPane {
10975
+ id: string;
10976
+ openTabs: string[];
10977
+ pinnedTabIds: string[];
10978
+ activeTabId: string | null;
10979
+ size: number;
10980
+ }
10981
+ interface ProjectSessionState {
10982
+ activeTabByMode: {
10983
+ files: string | null;
10984
+ skills: string | null;
10985
+ };
10986
+ updatedAt: string | null;
10987
+ panes: PersistedEditorPane[];
10988
+ focusedPaneId: string;
10989
+ }
10990
+ /**
10991
+ * Discriminator for the Navigator-side surface that initiated a project-open.
10992
+ * Matches the desktop runtime `EntryPoint` discriminator.
10993
+ */
10994
+ type OkProjectEntryPoint = 'create-new' | 'create-new-nested-redirect' | 'pick-existing' | 'recents' | 'deep-link' | 'drag-drop' | 'share-receive' | 'worktree';
10995
+ /**
10996
+ * Payload accepted by `bridge.project.open(...)`. `target` stays in the
10997
+ * contract for forward-compat even though `'new-window'` is the only value
10998
+ * today (no switch-in-place). `entryPoint` tags the originating surface so
10999
+ * the consent-dialog gate can branch on user intent.
11000
+ */
11001
+ interface OkProjectOpenRequest {
11002
+ path: string;
11003
+ target: 'new-window';
11004
+ entryPoint: OkProjectEntryPoint;
11005
+ /**
11006
+ * Optional kind-discriminated target to deep-link into after the project
11007
+ * window mounts. Used by share-receive: Q1 hits and Q2/Q3 success both
11008
+ * pass the share's target (a `doc` path or a `folder` path) so the editor
11009
+ * opens it directly. Threaded through to `wm.createProjectWindow`'s
11010
+ * `pendingDeepLinkTarget` (cold spawn → `dom-ready` deep-link IPC) and to
11011
+ * `sendDeepLink` for the warm-focus path. Mirrors the existing
11012
+ * `openknowledge://open?project=&doc=` flow.
11013
+ */
11014
+ pendingDeepLinkTarget?: {
11015
+ kind: 'doc' | 'folder'; /** Content-relative renderer navigation path. */
11016
+ path: string; /** Repository-relative path used only by receive-side Git/filesystem probes. */
11017
+ repositoryPath?: string; /** Present only for v2; strips the repository prefix from rename results. */
11018
+ contentRootDepth?: number;
11019
+ };
11020
+ /**
11021
+ * Optional share branch riding alongside `pendingDeepLinkTarget`. See
11022
+ * canonical bridge contract below.
11023
+ */
11024
+ pendingBranch?: string | null;
11025
+ /**
11026
+ * Optional branch-switch payload for the share-receive "I already have it
11027
+ * locally" path. When the located clone
11028
+ * is on a different branch than the share, main delivers the
11029
+ * `project-branch-switch` surface instead of a plain deep-link open.
11030
+ */
11031
+ pendingShareBranchSwitch?: {
11032
+ share: OkSharePayloadFields;
11033
+ projectPath: string;
11034
+ currentBranch: string | null;
11035
+ };
11036
+ }
11037
+ /**
11038
+ * Outcome of `bridge.project.checkTargetExists({projectPath, kind, path})`.
11039
+ * Alias used by existing desktop consumers as `CheckTargetExistsResult`.
11040
+ *
11041
+ * Used by the main-side target-existence gate AFTER the branch comparison
11042
+ * passes — answers "does the share's target actually exist on the receiver's
11043
+ * currently-checked-out branch?" The `'unreadable'` sentinel collapses
11044
+ * the input-rejection + non-ENOENT I/O paths into a single graceful-fail
11045
+ * the caller treats as "silent dispatch is safe."
11046
+ */
11047
+ type OkCheckTargetExistsResult = 'exists' | 'missing' | 'unreadable';
11048
+ /**
11049
+ * Outcome of `bridge.project.readHeadBranch(projectPath)`.
11050
+ *
11051
+ * All-null + `detached: false` is the "couldn't determine" sentinel returned
11052
+ * on every failure mode (missing `.git`, malformed HEAD, I/O error, traversal
11053
+ * attempt). Used by the Project Navigator's recent-projects list.
11054
+ */
11055
+ interface OkHeadBranchInfo {
11056
+ readonly currentBranch: string | null;
11057
+ readonly headSha: string | null;
11058
+ readonly detached: boolean;
11059
+ }
11060
+ /**
11061
+ * Payload delivered to `onUpdateDownloaded` subscribers. Fires after
11062
+ * electron-updater has completed the ZIP download and is waiting for
11063
+ * install-on-quit (or an imperative `autoUpdater.quitAndInstall()` via
11064
+ * Toast A's "Relaunch now" action).
11065
+ */
11066
+ interface OkUpdateDownloadedInfo {
11067
+ readonly version: string;
11068
+ }
11069
+ /**
11070
+ * Payload delivered to `onUpdateRelaunching` subscribers. Fires when one
11071
+ * window's "Relaunch now" click commits in main (`ok:update:relaunch-now`
11072
+ * passed its `versionPendingInstall` gate). Every window swaps its
11073
+ * `update-downloaded` card to the in-progress "Relaunching…" state.
11074
+ */
11075
+ interface OkUpdateRelaunchingInfo {
11076
+ readonly version: string;
11077
+ }
11078
+ /**
11079
+ * Payload delivered to `onUpdateRelaunchFailed` subscribers. Fires when a
11080
+ * committed relaunch fails after the fact — the updater's `error` event
11081
+ * landed while the relaunch was in flight, the no-quit watchdog elapsed, or
11082
+ * `quitAndInstall()` threw. Main re-arms the banner separately via a
11083
+ * re-broadcast `ok:update:downloaded`; this carries the failure detail.
11084
+ */
11085
+ interface OkUpdateRelaunchFailedInfo {
11086
+ readonly version: string;
11087
+ readonly message?: string;
11088
+ readonly downloadUrl?: string;
11089
+ }
11090
+ /**
11091
+ * Payload delivered to `onWhatsNew` subscribers. Fires once per version
11092
+ * transition on first launch post-update (main compared `app.getVersion()`
11093
+ * to `AppState.lastSeenVersion`). `releaseUrl` is the GitHub Releases page
11094
+ * for the new version — renderer opens it via `bridge.shell.openExternal`.
11095
+ */
11096
+ interface OkWhatsNewInfo {
11097
+ readonly version: string;
11098
+ readonly releaseUrl: string;
11099
+ }
11100
+ /**
11101
+ * Payload delivered to `onUpdateStuckHint` subscribers. Fires at most once
11102
+ * per installation after 7 consecutive calendar days of failed update
11103
+ * checks. `downloadUrl` is the manual-download page (inkeep.com's
11104
+ * OpenKnowledge download CTA); renderer opens it via
11105
+ * `bridge.shell.openExternal`.
11106
+ */
11107
+ interface OkUpdateStuckHintInfo {
11108
+ readonly downloadUrl: string;
11109
+ }
11110
+ /**
11111
+ * Renderer-facing payload for `ok:share-received`. Carried by the main-
11112
+ * process share-flow handler in `url-scheme.ts` after `parseShareUrl`
11113
+ * dispatches on the universal-link / custom-scheme input shapes.
11114
+ *
11115
+ * - `kind: 'project-branch-switch'` — editor-shell branch-switch surface
11116
+ * - `kind: 'launcher-consent'` / `launcher-miss` — Navigator surfaces
11117
+ * - `kind: 'unsupported-version'` — sonner toast "Update OpenKnowledge"
11118
+ * - `kind: 'invalid'` — sonner toast "Invalid share URL"
11119
+ *
11120
+ * Source (universal-link vs custom-scheme) is NOT propagated — main-process
11121
+ * diagnostic logging only.
11122
+ */
11123
+ /** Kind-discriminated receiver target carried by `OkSharePayloadFields`. */
11124
+ type ShareTarget = {
11125
+ readonly kind: 'doc';
11126
+ readonly docPath: string;
11127
+ } | {
11128
+ readonly kind: 'folder';
11129
+ readonly folderPath: string;
11130
+ };
11131
+ /** Parsed project-share fields carried across the desktop host bridge. */
11132
+ interface OkSharePayloadFields {
11133
+ /** GitHub host of the shared repo: `github.com` or a GHES hostname. */
11134
+ readonly host: string;
11135
+ readonly owner: string;
11136
+ readonly repo: string;
11137
+ readonly branch: string;
11138
+ readonly sharedUrl: string;
11139
+ /** URL-derived repository coordinate. Never inferred from receiver config. */
11140
+ readonly repositoryTarget: ShareTarget;
11141
+ /** `null` for historical v1; positive decoded prefix depth for v2. */
11142
+ readonly contentRootDepth: number | null;
11143
+ readonly target: ShareTarget;
11144
+ }
11145
+ /** Renderer-facing payload for a received project share. */
11146
+ type OkShareReceivedPayload = {
11147
+ readonly kind: 'unsupported-version';
11148
+ } | {
11149
+ readonly kind: 'invalid';
11150
+ } | {
11151
+ readonly kind: 'project-branch-switch';
11152
+ readonly share: OkSharePayloadFields;
11153
+ readonly projectPath: string;
11154
+ readonly currentBranch: string | null;
11155
+ } | {
11156
+ readonly kind: 'launcher-consent';
11157
+ readonly share: OkSharePayloadFields;
11158
+ readonly candidatePath: string;
11159
+ /**
11160
+ * Name of the Recents project whose `listGitWorktrees` anchor surfaced
11161
+ * `candidatePath`, when the candidate came from worktree-enum off an
11162
+ * existing OK project. `null` when the candidate was surfaced from
11163
+ * a Recents path that itself matched the share. Drives the
11164
+ * "(a worktree of <name>)" caption in the Navigator consent dialog.
11165
+ */
11166
+ readonly parentProjectName: string | null;
11167
+ } | {
11168
+ readonly kind: 'launcher-miss';
11169
+ readonly share: OkSharePayloadFields;
11170
+ };
11171
+ /**
11172
+ * Renderer-facing representation of `ShareFolderValidationResult` from
11173
+ * `@inkeep/open-knowledge`'s `validateLocalFolderForShare`. Carried
11174
+ * by the `share.validateLocalFolder` IPC.
11175
+ */
11176
+ type ShareFolderValidationResult$1 = {
11177
+ readonly kind: 'ok';
11178
+ readonly gitRemoteUrl: string;
11179
+ } | {
11180
+ readonly kind: 'not-git';
11181
+ } | {
11182
+ readonly kind: 'no-origin';
11183
+ } | {
11184
+ readonly kind: 'wrong-repo';
11185
+ readonly actualOwner: string;
11186
+ readonly actualRepo: string;
11187
+ } | {
11188
+ readonly kind: 'wrong-host';
11189
+ readonly actualHost: string;
11190
+ } | {
11191
+ readonly kind: 'non-github';
11192
+ } | {
11193
+ readonly kind: 'symlink-escape';
11194
+ };
11195
+ /**
11196
+ * Auto-update channel — derived in desktop's main from the running build's
11197
+ * version string. `'beta'` for a prerelease build, `'latest'` for a stable
11198
+ * one. Not a runtime preference. Mirrors `UpdateChannel` in desktop's
11199
+ * `state-store.ts`.
11200
+ */
11201
+ type OkUpdateChannel = 'latest' | 'beta';
11202
+ /**
11203
+ * User-intent theme value. Mirrors Electron's `nativeTheme.themeSource`
11204
+ * union. Carried verbatim through the `ok:theme:set-source` IPC channel —
11205
+ * never resolved to a concrete light/dark value at the renderer call site
11206
+ * (the `'system'` value IS the lever that delegates appearance tracking to
11207
+ * macOS). The desktop and app compatibility paths re-export this declaration.
11208
+ */
11209
+ type OkThemeSource = 'system' | 'light' | 'dark';
11210
+ /** Colors handed to Electron for OS-drawn window chrome. */
11211
+ interface OkChromeColors {
11212
+ /** Active theme's sidebar surface color. */
11213
+ bg: string;
11214
+ /** Active theme's sidebar foreground color. */
11215
+ symbol: string;
11216
+ }
11217
+ /**
11218
+ * Snapshot returned by `state.query()` — newly-opened windows query on
11219
+ * mount to render the correct BETA badge / About-panel label (channel is
11220
+ * build-derived) and to route the refuse-downgrade UX when a future-build
11221
+ * state was rolled back.
11222
+ */
11223
+ interface OkStateSnapshot {
11224
+ readonly channel: OkUpdateChannel;
11225
+ readonly schemaIncompatibility: {
11226
+ readonly currentBuild: string;
11227
+ readonly persistedSchemaVersion: number;
11228
+ readonly maxSupported: number;
11229
+ } | null;
11230
+ }
11231
+ /**
11232
+ * Editor IDs surfaced through the first-launch MCP consent bridge.
11233
+ * Aliased to the canonical `EditorId` from `constants/editors.ts` — single
11234
+ * source of truth for the literal union.
11235
+ */
11236
+ type OkMcpWiringEditorId = EditorId$1;
11237
+ /**
11238
+ * Payload delivered to `mcpWiring.onShow` subscribers on first-launch MCP
11239
+ * consent. Every editor in `ALL_EDITOR_IDS` appears, but only `detected: true`
11240
+ * ones are in `<McpConsentDialog>`'s write set — the rest have no config to
11241
+ * wire and are not shown. `willReplace: true` signals an existing OK-managed
11242
+ * entry the setup would overwrite, which the dialog surfaces next to its
11243
+ * checkbox so long-time CLI users aren't surprised to find their pre-existing
11244
+ * entry stomped. `pathInstall` drives the dialog's shell-PATH toggle row:
11245
+ * `shellDetected: false` hides the row; `alreadyInstalled: true` renders it
11246
+ * informational; `rcFilesToTouch` names the tildified shell files a grant
11247
+ * would edit.
11248
+ */
11249
+ interface OkMcpWiringShowPayload {
11250
+ readonly detectedEditors: readonly {
11251
+ readonly id: OkMcpWiringEditorId;
11252
+ readonly label: string;
11253
+ readonly detected: boolean;
11254
+ readonly willReplace: boolean; /** Display-form user-global config path, or null when unavailable. */
11255
+ readonly configPath: string | null; /** Locator for OpenKnowledge's entry within the editor config. */
11256
+ readonly entryLocator: string;
11257
+ }[];
11258
+ readonly pathInstall: {
11259
+ readonly shellDetected: boolean;
11260
+ readonly rcFilesToTouch: readonly string[];
11261
+ readonly alreadyInstalled: boolean;
11262
+ };
11263
+ /** The user-global skill bundles onboarding sets up alongside the MCP wiring.
11264
+ * Empty ⇒ no skill decision solicited. `paths` lists every destination the
11265
+ * install writes to, computed from the installer's own iteration set and
11266
+ * gates, so the dialog's disclosure can never advertise a copy that will not
11267
+ * be made. */
11268
+ readonly globalSkills: readonly {
11269
+ readonly id: string;
11270
+ readonly name: string;
11271
+ readonly paths: readonly string[];
11272
+ }[];
11273
+ }
11274
+ /**
11275
+ * Confirm payload for `mcpWiring.confirm`. `pathInstall` is the PATH
11276
+ * toggle, tri-state: `true` → append the managed rc block (consent
11277
+ * granted); `false` → record declined, touch no rc file; absent → no PATH
11278
+ * decision was solicited (row hidden or informational).
11279
+ *
11280
+ * `skills` — bundle ids the user left checked. An ARRAY (even empty) ⇒ a
11281
+ * decision was made, and every offered bundle not in the list is recorded
11282
+ * declined (and removed if already installed). Absent ⇒ no decision was made:
11283
+ * the skills leg is skipped, so nothing is written and nothing installed is
11284
+ * torn down. Onboarding sends the absent form when the user declines setup,
11285
+ * because declining must never uninstall an existing bundle.
11286
+ */
11287
+ interface OkMcpWiringConfirmRequest {
11288
+ readonly editorIds: readonly OkMcpWiringEditorId[];
11289
+ readonly pathInstall?: boolean;
11290
+ readonly skills?: readonly string[];
11291
+ }
11292
+ /**
11293
+ * Result shape for `mcpWiring.confirm` / `skip`. `ok:false` surfaces only
11294
+ * when `writeUserMcpConfigs` throws — per-editor failures still resolve
11295
+ * `ok:true` and are surfaced to operator logs via structured
11296
+ * `mcp-wiring-write-failed` events (deferred-marker semantics).
11297
+ */
11298
+ type OkMcpWiringResult = {
11299
+ ok: true;
11300
+ } | {
11301
+ ok: false;
11302
+ error: string;
11303
+ };
11304
+ /**
11305
+ * Per-editor MCP state for Settings → AI tools. `installed` rows uncheck to
11306
+ * remove; `not-installed` rows check to install; `foreign` is an entry under
11307
+ * OK's server name that isn't recognizably OK's own (uninstall refuses,
11308
+ * install overwrites); `unmanageable` is a config OK can't safely edit.
11309
+ */
11310
+ type OkIntegrationsEditorState = 'installed' | 'not-installed' | 'foreign' | 'unmanageable';
11311
+ /** Component inventory for Settings → AI tools. `available: false` renders
11312
+ * the section read-only (install actors gated off for this process). `path.
11313
+ * installed` reflects the managed rc block actually being on disk. */
11314
+ interface OkIntegrationsStatus {
11315
+ readonly available: boolean;
11316
+ readonly editors: readonly {
11317
+ readonly id: OkMcpWiringEditorId;
11318
+ readonly label: string;
11319
+ readonly detected: boolean;
11320
+ readonly state: OkIntegrationsEditorState;
11321
+ readonly configPath: string | null;
11322
+ readonly entryLocator: string;
11323
+ }[];
11324
+ readonly path: {
11325
+ readonly shellDetected: boolean;
11326
+ readonly rcFilesToTouch: readonly string[];
11327
+ readonly installed: boolean;
11328
+ };
11329
+ readonly skills: readonly {
11330
+ readonly id: string;
11331
+ readonly name: string;
11332
+ /** The skill's own frontmatter description; empty when the bundle is
11333
+ * unreadable. Replaces the hand-written per-id subtext on the row. */
11334
+ readonly description: string;
11335
+ readonly installed: boolean;
11336
+ readonly paths: readonly string[];
11337
+ /** Three-tier context cost from the shared estimator. Absent when the
11338
+ * bundle could not be parsed (broken build) — the row hides the cost. */
11339
+ readonly size?: SkillCostTiers; /** On-disk source directory of the built-in bundle (its SKILL.md + files). */
11340
+ readonly sourceDir: string;
11341
+ /** Every place this skill would install: static agent hosts present on disk
11342
+ * plus declared custom roots. For a custom root `editor === skillsRoot`. */
11343
+ readonly resolvedHosts: readonly {
11344
+ readonly editor: string;
11345
+ readonly skillsRoot: string;
11346
+ readonly custom: boolean;
11347
+ }[];
11348
+ }[];
11349
+ /**
11350
+ * Every editor whose host root already exists on this machine — a SUPERSET
11351
+ * of the ids in `editors[]`, which is filtered to targets with a user-global
11352
+ * MCP surface. The Create-new-project dialog seeds its editor checkboxes
11353
+ * from this so a user who never opens "Advanced settings" still gets MCP
11354
+ * config + the project skill for the tools they actually have, and none for
11355
+ * the ones they don't.
11356
+ */
11357
+ readonly detectedEditorIds: readonly OkMcpWiringEditorId[];
11358
+ }
11359
+ /** One toggle for `integrations.setComponent`. */
11360
+ interface OkIntegrationsSetRequest {
11361
+ readonly component: {
11362
+ readonly kind: 'editor';
11363
+ readonly id: OkMcpWiringEditorId;
11364
+ } | {
11365
+ readonly kind: 'path';
11366
+ } | {
11367
+ readonly kind: 'skill';
11368
+ readonly id: string;
11369
+ };
11370
+ readonly enabled: boolean;
11371
+ }
11372
+ /** Set-component result — both arms carry a fresh status snapshot so the
11373
+ * renderer re-renders truthfully after failed/refused toggles too. */
11374
+ type OkIntegrationsSetResult = {
11375
+ readonly ok: true;
11376
+ readonly status: OkIntegrationsStatus;
11377
+ } | {
11378
+ readonly ok: false;
11379
+ readonly error: string;
11380
+ readonly status: OkIntegrationsStatus;
11381
+ };
11382
+ /** Post-install manual step a project MCP config needs before OK's tools
11383
+ * connect: `approve-once` (Claude Code), `enable-manually` (Cursor, silently
11384
+ * disabled until toggled), `auto-connect` (Codex on a trusted project),
11385
+ * `none`. */
11386
+ type OkProjectIntegrationsFollowUp = 'approve-once' | 'enable-manually' | 'auto-connect' | 'none';
11387
+ /** Component inventory for Settings → This project → AI tools (per-editor
11388
+ * PROJECT MCP config files + the single project runtime skill), scoped to the
11389
+ * project the requesting window has open. `hasProject: false` → empty state;
11390
+ * `available: false` → read-only. */
11391
+ interface OkProjectIntegrationsStatus {
11392
+ readonly available: boolean;
11393
+ readonly hasProject: boolean;
11394
+ readonly projectDir: string | null;
11395
+ readonly editors: readonly {
11396
+ readonly id: OkMcpWiringEditorId;
11397
+ readonly label: string;
11398
+ readonly state: OkIntegrationsEditorState;
11399
+ readonly configPath: string;
11400
+ readonly entryLocator: string;
11401
+ readonly followUp: OkProjectIntegrationsFollowUp;
11402
+ }[];
11403
+ readonly skill: {
11404
+ readonly installed: boolean;
11405
+ readonly paths: readonly string[];
11406
+ /** The skill's own frontmatter description, so the row states what the
11407
+ * bundle says rather than a hand-written subtext that can drift from it. */
11408
+ readonly description: string;
11409
+ /** Editor ids this project's skill fans out to — the reach cluster's input.
11410
+ * Project-scoped, so these are the editors with a project skill root here,
11411
+ * not the user-global host set. */
11412
+ readonly hosts: readonly string[];
11413
+ /** Three-tier context cost of the bundled project skill. Absent when the
11414
+ * bundle cannot be read. */
11415
+ readonly size?: SkillCostTiers; /** On-disk source of the bundled skill, so the row can open its preview. */
11416
+ readonly sourceDir?: string;
11417
+ } | null;
11418
+ }
11419
+ /** One toggle for `projectIntegrations.setComponent`. The skill is a single
11420
+ * row (no id) — it fans out across every capable editor. */
11421
+ interface OkProjectIntegrationsSetRequest {
11422
+ readonly component: {
11423
+ readonly kind: 'editor';
11424
+ readonly id: OkMcpWiringEditorId;
11425
+ } | {
11426
+ readonly kind: 'skill';
11427
+ };
11428
+ readonly enabled: boolean;
11429
+ }
11430
+ type OkProjectIntegrationsSetResult = {
11431
+ readonly ok: true;
11432
+ readonly status: OkProjectIntegrationsStatus;
11433
+ } | {
11434
+ readonly ok: false;
11435
+ readonly error: string;
11436
+ readonly status: OkProjectIntegrationsStatus;
11437
+ };
11438
+ /**
11439
+ * Per-project consent dialog — renderer-facing payload + result shapes.
11440
+ */
11441
+ type OkOnboardingWarningKind = 'root' | 'home' | 'home-documents' | 'home-desktop' | 'home-downloads' | 'volumes-mount' | 'drive-root';
11442
+ type OkOnboardingGitState = 'present' | 'absent' | 'shell-only';
11443
+ interface OkOnboardingShowPayload {
11444
+ readonly pickedPath: string;
11445
+ readonly projectDir: string;
11446
+ readonly defaultContentDir: string;
11447
+ readonly gitState: OkOnboardingGitState;
11448
+ readonly gitRootPromoted: boolean;
11449
+ readonly warnings: readonly {
11450
+ readonly kind: OkOnboardingWarningKind;
11451
+ }[];
11452
+ readonly editorOptions: readonly {
11453
+ readonly id: OkMcpWiringEditorId;
11454
+ readonly label: string;
11455
+ readonly hasProjectConfig: boolean;
11456
+ /** Optional for back-compat; absent reads as `true`. `false` = the editor
11457
+ * has no user-global config surface (Pi — project-scope only). */
11458
+ readonly hasUserConfig?: boolean;
11459
+ }[];
11460
+ }
11461
+ interface OkOnboardingConfirmRequest {
11462
+ readonly initGit: boolean;
11463
+ readonly contentDir: string;
11464
+ readonly additionalIgnores: string;
11465
+ readonly editorIds: readonly OkMcpWiringEditorId[];
11466
+ readonly sharing: 'shared' | 'local-only';
11467
+ }
11468
+ type OkOnboardingResult = {
11469
+ ok: true;
11470
+ } | {
11471
+ ok: false;
11472
+ error: string;
11473
+ };
11474
+ interface OkOnboardingProbeContentRequest {
11475
+ readonly contentDir: string;
11476
+ }
11477
+ type OkOnboardingProbeContentResult = {
11478
+ readonly ok: true;
11479
+ readonly count: number;
11480
+ readonly sample: readonly string[];
11481
+ readonly truncated: boolean;
11482
+ } | {
11483
+ readonly ok: false;
11484
+ readonly error: string;
11485
+ };
11486
+ /**
11487
+ * Result shape for `bridge.debug?.keyringSmoke()` — mirrors
11488
+ * `KeyringSmokeResult` in `packages/desktop/src/utility/keyring-smoke.ts`
11489
+ * (identical field set). Duplicated here (not imported) because core has no
11490
+ * dep on desktop. The desktop utility remains checked against this canonical
11491
+ * field set by the desktop architecture test.
11492
+ */
11493
+ interface OkKeyringSmokeResult {
11494
+ ok: boolean;
11495
+ backend?: 'keyring' | 'file';
11496
+ error?: string;
11497
+ durationMs?: number;
11498
+ timestamp: string;
11499
+ }
11500
+ /**
11501
+ * Seed scaffolder shapes duplicated structurally (same rationale as
11502
+ * `OkKeyringSmokeResult` above — avoids pulling the server package into
11503
+ * core's compilation tree). Structural shape tracks
11504
+ * `@inkeep/open-knowledge-server`'s `ScaffoldPlan` / `ApplyResult` /
11505
+ * `ApplyError` / `FileEntry` / `SkipEntry`.
11506
+ *
11507
+ * Folder defaults moved out of `config.yml` `folders:` and into nested
11508
+ * `<folder>/.ok/frontmatter.yml` files written via the standard file-entry
11509
+ * path. The previous `OkFolderRule` / `OkScaffoldConfigEdit` mirror types
11510
+ * + the `configEdits` field on `OkScaffoldPlan` were removed alongside.
11511
+ */
11512
+ interface OkScaffoldFileEntry {
11513
+ path: string;
11514
+ kind: 'folder' | 'file';
11515
+ contentPreview?: string;
11516
+ }
11517
+ interface OkScaffoldSkipEntry {
11518
+ path: string;
11519
+ reason: 'already-exists' | 'user-content' | 'glob-collision';
11520
+ }
11521
+ interface OkScaffoldPlan {
11522
+ created: OkScaffoldFileEntry[];
11523
+ skipped: OkScaffoldSkipEntry[];
11524
+ warnings: string[];
11525
+ /** Project-local skills shipped by the pack. `pending` means apply would
11526
+ * author or refresh the skill source. `conflict` means a user-owned skill
11527
+ * holds the name; apply will neither install nor clobber it. */
11528
+ packSkills?: {
11529
+ name: string;
11530
+ pending: boolean;
11531
+ conflict?: boolean;
11532
+ }[];
11533
+ /**
11534
+ * Lint plugins the pack requires. `pending` means apply would turn one on.
11535
+ *
11536
+ * `id` is the plugin union rather than a bare `string`: this interface is
11537
+ * hand-mirrored from the server's `ScaffoldPlan`, and the preload passes one
11538
+ * where the other is expected — so a widened field here does not read as
11539
+ * "more permissive", it fails to assign.
11540
+ */
11541
+ requiredPlugins?: {
11542
+ id: LintPluginId;
11543
+ pending: boolean;
11544
+ }[];
11545
+ }
11546
+ interface OkScaffoldApplyError {
11547
+ path: string;
11548
+ error: string;
11549
+ }
11550
+ interface OkScaffoldApplyResult {
11551
+ applied: number;
11552
+ errors: OkScaffoldApplyError[];
11553
+ durationMs: number;
11554
+ /** Editor display-names that received the pack's project skill (e.g. "Claude Code"). */
11555
+ packSkillsInstalled: string[];
11556
+ /** Required plugins this apply actually turned on; empty when all were already enabled. */
11557
+ pluginsEnabled: LintPluginId[];
11558
+ /** Pack skills skipped because a user-owned same-named skill holds the name. */
11559
+ packSkillConflicts: {
11560
+ name: string;
11561
+ hosts?: string[];
11562
+ }[];
11563
+ }
11564
+ interface OkSeedError {
11565
+ kind: 'no-project' | 'prerequisite-missing' | 'invalid-root' | 'internal';
11566
+ message: string;
11567
+ }
11568
+ /**
11569
+ * Pack-id wire shape — accepted strings; coerced server-side via `coercePackId`.
11570
+ *
11571
+ * This bridge leaf is the renderer contract's single declaration point.
11572
+ */
11573
+ type OkPackId = 'knowledge-base' | 'software-lifecycle' | 'codebase-wiki' | 'plain-notes' | 'worldbuilding' | 'writing-pipeline' | 'entity-vault' | 'okf';
11574
+ interface OkSeedPlanOptions {
11575
+ rootDir?: string;
11576
+ packId?: OkPackId;
11577
+ /**
11578
+ * Preview a pack for a project that does not exist yet. The create-new
11579
+ * dialog runs on the Navigator window, which has no project bound, so the
11580
+ * normal `resolveProjectRoot` path answers `no-project`. Main plans against
11581
+ * a throwaway directory instead, so every entry reads as `created`.
11582
+ *
11583
+ * `skillsInstallable` is the part only the caller knows: whether the project
11584
+ * about to be created has an editor selected, and so whether the pack's
11585
+ * skills will actually install once it exists.
11586
+ */
11587
+ preview?: {
11588
+ skillsInstallable: boolean;
11589
+ };
11590
+ }
11591
+ interface OkSeedApplyOptions {
11592
+ packId?: OkPackId;
11593
+ }
11594
+ interface OkSeedPackFolderInfo {
11595
+ path: string;
11596
+ summary: string;
11597
+ }
11598
+ /**
11599
+ * User-visible entry counts surfaced on each pack picker card as
11600
+ * "N files · N folders".
11601
+ */
11602
+ interface OkSeedPackEntryCounts {
11603
+ files: number;
11604
+ folders: number;
11605
+ }
11606
+ interface OkSeedPackInfo {
11607
+ id: OkPackId;
11608
+ name: string;
11609
+ description: string;
11610
+ defaultSubfolder?: string;
11611
+ folders: OkSeedPackFolderInfo[];
11612
+ entryCounts: OkSeedPackEntryCounts;
11613
+ }
11614
+ /** Pure-fs upward-walk result types mirrored from `@inkeep/open-knowledge-server`'s
11615
+ * `fs/` module. Structurally duplicated for the same reason as the seed shapes
11616
+ * above (core has no dep on server). */
11617
+ interface OkFindEnclosingProjectRootResult {
11618
+ readonly rootPath: string;
11619
+ readonly distance: number;
11620
+ }
11621
+ interface OkFindEnclosingGitRootResult {
11622
+ readonly gitRoot: string;
11623
+ readonly distance: number;
11624
+ }
11625
+ type OkSeedPlanResult = {
11626
+ ok: true;
11627
+ plan: OkScaffoldPlan;
11628
+ } | {
11629
+ ok: false;
11630
+ error: OkSeedError;
11631
+ };
11632
+ type OkSeedApplyResult = {
11633
+ ok: true;
11634
+ result: OkScaffoldApplyResult;
11635
+ } | {
11636
+ ok: false;
11637
+ error: OkSeedError;
11638
+ };
11639
+ type OkSeedListPacksResult = {
11640
+ ok: true;
11641
+ packs: OkSeedPackInfo[];
11642
+ } | {
11643
+ ok: false;
11644
+ error: {
11645
+ kind: 'internal';
11646
+ message: string;
11647
+ };
11648
+ };
11649
+ /**
11650
+ * Pre-project local-op event shapes — auth + clone flows surfaced to the
11651
+ * Navigator window via IPC because it has no backing API server.
11652
+ */
11653
+ type OkLocalOpAuthEvent = {
11654
+ type: 'verification';
11655
+ user_code: string;
11656
+ verification_uri: string;
11657
+ expires_in: number;
11658
+ } | {
11659
+ type: 'complete';
11660
+ host: string;
11661
+ login: string;
11662
+ name?: string;
11663
+ email?: string;
11664
+ avatarUrl?: string;
11665
+ } | {
11666
+ type: 'error';
11667
+ message: string;
11668
+ };
11669
+ type OkLocalOpCloneEvent = {
11670
+ type: 'progress';
11671
+ phase: string;
11672
+ pct: number;
11673
+ } | {
11674
+ type: 'complete';
11675
+ dir: string;
11676
+ } | {
11677
+ type: 'branch-fallback';
11678
+ branch: string;
11679
+ } | {
11680
+ type: 'error';
11681
+ message: string;
11682
+ };
11683
+ interface OkLocalOpStream<E> {
11684
+ readonly events: AsyncIterable<E>;
11685
+ cancel(): void;
11686
+ }
11687
+ type OkLocalOpAuthStatusResponse = {
11688
+ authenticated: true;
11689
+ host: string;
11690
+ login: string;
11691
+ tier?: 'A' | 'B' | 'C';
11692
+ name?: string;
11693
+ email?: string;
11694
+ ghAvailable?: boolean;
11695
+ } | {
11696
+ authenticated: false;
11697
+ host: string;
11698
+ error?: string;
11699
+ ghAvailable?: boolean;
11700
+ };
11701
+ interface OkLocalOpRepoEntry {
11702
+ full_name: string;
11703
+ clone_url: string;
11704
+ private: boolean;
11705
+ }
11706
+ type OkLocalOpAuthReposResponse = {
11707
+ ok: true;
11708
+ host: string;
11709
+ repos: OkLocalOpRepoEntry[];
11710
+ } | {
11711
+ ok: false;
11712
+ error: string;
11713
+ };
11714
+ /**
11715
+ * Renderer → main snapshot of the editor area's active target.
11716
+ * Discriminated-union shape so TypeScript narrows `identifier` per `kind`.
11717
+ * Drives the macOS File menu's state-aware enable/disable for items like
11718
+ * Rename / Move to Trash / Open with AI.
11719
+ */
11720
+ type OkEditorActiveTargetSnapshot = {
11721
+ readonly kind: 'doc';
11722
+ readonly identifier: string;
11723
+ } | {
11724
+ readonly kind: 'folder';
11725
+ readonly identifier: string;
11726
+ } | {
11727
+ readonly kind: 'asset';
11728
+ readonly identifier: string;
11729
+ } | {
11730
+ readonly kind: null;
11731
+ };
11732
+ /**
11733
+ * Renderer → main snapshot of the View menu's checkbox + smart-hide state.
11734
+ * Sibling of `OkEditorActiveTargetSnapshot`.
11735
+ */
11736
+ interface OkEditorViewMenuStateSnapshot {
11737
+ readonly showHiddenFiles: boolean;
11738
+ readonly showOkFolders: boolean;
11739
+ readonly showOnlyMarkdownFiles: boolean;
11740
+ readonly showSkillsSection: boolean;
11741
+ readonly canExpandAll: boolean;
11742
+ readonly canCollapseAll: boolean;
11743
+ readonly sidebarVisible: boolean;
11744
+ readonly docPanelVisible?: boolean;
11745
+ readonly terminalVisible?: boolean;
11746
+ readonly terminalPlacement?: TerminalPlacement;
11747
+ readonly terminalLive?: boolean;
11748
+ readonly agentPanelVisible?: boolean;
11749
+ readonly canViewInSource?: boolean;
11750
+ /**
11751
+ * Is there a live editor selection? ⌘L stages that selection in the agents
11752
+ * panel instead of toggling it, so the menu item has to know: without this the
11753
+ * label reads "Hide Agents" while the click stages a passage and the panel
11754
+ * stays open.
11755
+ */
11756
+ readonly hasEditorSelection?: boolean;
11757
+ }
11758
+ /**
11759
+ * Windows/Linux renderer-menubar dispatch payloads (the windows-linux-port
11760
+ * renderer-menubar decision). macOS keeps the native menu bar; win/linux draw it in the
11761
+ * renderer and route every click through main via `menu.dispatch` so menu
11762
+ * semantics stay single-sourced: `menu-action` relays through the same
11763
+ * dispatch path the native menu items use, `role` maps onto Electron's
11764
+ * built-in menu roles, `command` covers the main-side click handlers
11765
+ * (navigator, folder picker, settings, updater…), and `query` returns the
11766
+ * aggregated state the native menu renders from. The IPC channel module
11767
+ * re-exports these canonical types under its transport-facing names.
11768
+ */
11769
+ type OkMenuDispatchRole = 'undo' | 'redo' | 'cut' | 'copy' | 'paste' | 'selectAll' | 'reload' | 'forceReload' | 'toggleDevTools' | 'resetZoom' | 'zoomIn' | 'zoomOut' | 'toggleFullScreen' | 'minimize' | 'close' | 'quit';
11770
+ type OkMenuDispatchCommand = 'open-navigator' | 'open-folder-dialog' | 'clear-recent-projects' | 'open-settings' | 'check-for-updates' | 'reconfigure-mcp-wiring' | 'open-github' | 'toggle-spell-check';
11771
+ type OkMenuDispatchRequest = {
11772
+ readonly kind: 'query';
11773
+ } | {
11774
+ readonly kind: 'menu-action';
11775
+ readonly action: OkMenuAction;
11776
+ } | {
11777
+ readonly kind: 'command';
11778
+ readonly command: OkMenuDispatchCommand;
11779
+ } | {
11780
+ readonly kind: 'open-recent-project';
11781
+ readonly path: string;
11782
+ } | {
11783
+ readonly kind: 'role';
11784
+ readonly role: OkMenuDispatchRole;
11785
+ };
11786
+ /** `query` result — the same aggregated state the native menu renders from. */
11787
+ interface OkMenuRendererSnapshot {
11788
+ readonly recentProjects: ReadonlyArray<{
11789
+ readonly path: string;
11790
+ readonly name: string;
11791
+ }>;
11792
+ readonly spellCheckEnabled: boolean;
11793
+ readonly showDevToolsMenu: boolean;
11794
+ readonly canCheckForUpdates: boolean;
11795
+ readonly canReconfigureMcpWiring: boolean;
11796
+ readonly activeTarget: OkEditorActiveTargetSnapshot;
11797
+ readonly viewMenuState: OkEditorViewMenuStateSnapshot;
11798
+ }
11799
+ /** Consent-bearing payload for the renderer-to-main bug-report send hop. */
11800
+ interface OkBugReportSendInput {
11801
+ zipPath: string;
11802
+ metadata: OkBugReportSendMetadata;
11803
+ /**
11804
+ * Whether the reviewed bundle contains an app screenshot. The bundle's
11805
+ * inventory is the consent record; absent or false means main must not
11806
+ * upload the capture it may still hold.
11807
+ */
11808
+ includeScreenshot?: boolean;
11809
+ }
11810
+ /**
11811
+ * Renderer-facing Electron bridge. Populated on `window.okDesktop` by the
11812
+ * desktop preload script. Web distribution omits the
11813
+ * global entirely — consumers MUST use `window.okDesktop?.` optional chaining.
11814
+ *
11815
+ * Method surface is intentionally small: dialog pickers, outbound URL /
11816
+ * clipboard relays, project subscriptions, and the readonly config snapshot.
11817
+ * Broad APIs (window sizing, system info, raw ipcRenderer) are deliberately
11818
+ * omitted — new capabilities cross the preload boundary deliberately, one at
11819
+ * a time, via new typed methods.
11820
+ */
11821
+ /** OK config sharing mode. */
11822
+ interface OkSharingStatusResult {
11823
+ readonly kind: 'status';
11824
+ readonly mode: 'shared' | 'local-only' | 'no-git';
11825
+ readonly excluded: readonly string[];
11826
+ readonly trackedUpstream: readonly string[];
11827
+ /** True when local-only but `.ok/skills/` is carved back out as shareable. */
11828
+ readonly skillsShared: boolean;
11829
+ }
11830
+ type OkSharingSetModeResult = {
11831
+ readonly kind: 'applied';
11832
+ readonly mode: 'shared' | 'local-only' | 'no-git';
11833
+ } | {
11834
+ readonly kind: 'refused-tracked';
11835
+ readonly tracked: readonly string[];
11836
+ readonly remediation: string;
11837
+ } | {
11838
+ readonly kind: 'no-exclude';
11839
+ readonly reason: 'no-git' | 'no-info-dir' | 'malformed-pointer' | 'inaccessible';
11840
+ };
11841
+ /** Slides (Slidev) — detect-only IPC payload. Canonical types in
11842
+ * `packages/desktop/src/shared/ipc-channels.ts`; mirrored here per the
11843
+ * OkDesktopBridge 3-way-mirror invariant. */
11844
+ type SlidevSource = 'project-local' | 'global';
11845
+ type OkSlidesStatusResult = {
11846
+ readonly kind: 'status';
11847
+ readonly available: true;
11848
+ readonly source: SlidevSource;
11849
+ } | {
11850
+ readonly kind: 'status';
11851
+ readonly available: false;
11852
+ };
11853
+ /** Why opening a deck as slides failed. Canonical types in
11854
+ * `packages/desktop/src/shared/ipc-channels.ts`; mirrored here. */
11855
+ type SlidevOpenFailureReason = 'not-available' | 'invalid-path' | 'spawn-error' | 'exited-early' | 'timeout' | 'unsupported-server';
11856
+ type OkSlidesOpenResult = {
11857
+ readonly kind: 'open';
11858
+ readonly ok: true;
11859
+ } | {
11860
+ readonly kind: 'open';
11861
+ readonly ok: false;
11862
+ readonly reason: SlidevOpenFailureReason;
11863
+ };
11864
+ /**
11865
+ * Payload for `onServerVersionDrift` — the desktop attached to a server whose
11866
+ * version differs from the running app's (most often a prior version's
11867
+ * detached server still alive after an auto-update).
11868
+ */
11869
+ interface OkServerVersionDriftInfo {
11870
+ /** `older` = the attached server predates the app; `newer` = it is ahead. */
11871
+ readonly relation: 'older' | 'newer';
11872
+ /** Which dimension differed — diagnostic, not surfaced in copy. */
11873
+ readonly dimension: 'protocol' | 'runtime';
11874
+ /** The attached server's runtime semver (for the notification body). */
11875
+ readonly serverRuntime: string;
11876
+ /** The running app's runtime semver. */
11877
+ readonly appRuntime: string;
11878
+ }
11879
+ /** Payload for `onServerRestarted` — fired on the freshly-spawned window after a successful restart. */
11880
+ interface OkServerRestartedInfo {
11881
+ readonly appRuntime: string;
11882
+ }
11883
+ /**
11884
+ * Payload for `onRecentRemovedMissing` — fired on the window that initiated a
11885
+ * recents open when the target folder was gone and its stale entry was pruned.
11886
+ */
11887
+ interface OkRecentRemovedMissingInfo {
11888
+ readonly path: string;
11889
+ readonly projectName: string;
11890
+ }
11891
+ /**
11892
+ * Result of `restartServer`. Only the failure case reaches the originating
11893
+ * renderer — on success the window is recreated, so its invoke promise never
11894
+ * resolves (by design); the success toast fires on the new window instead.
11895
+ */
11896
+ type OkServerRestartOutcome = {
11897
+ readonly ok: true;
11898
+ } | {
11899
+ readonly ok: false;
11900
+ readonly reason: 'eperm' | 'other';
11901
+ };
11902
+ /** Result of `terminal.create`. */
11903
+ type OkPtyCreateResult = {
11904
+ readonly ok: true;
11905
+ readonly ptyId: string;
11906
+ } | {
11907
+ readonly ok: false;
11908
+ readonly reason: 'no-project' | 'not-consented';
11909
+ };
11910
+ /** Entry of `terminal.list`. */
11911
+ interface OkPtyListEntry {
11912
+ readonly ptyId: string;
11913
+ /** User-set custom tab name that survives a renderer reload; null when unset. */
11914
+ readonly customLabel: string | null;
11915
+ /** Sticky per-session tab number, preserved across a renderer reload; null
11916
+ * until the renderer has reported it for a just-created session. */
11917
+ readonly ordinal: number | null;
11918
+ }
11919
+ /** Result of `terminal.adopt`. */
11920
+ type OkPtyAdoptResult = {
11921
+ readonly ok: true;
11922
+ readonly replay: string;
11923
+ } | {
11924
+ readonly ok: false;
11925
+ readonly reason: 'unknown-session';
11926
+ };
11927
+ /** Push payload for `ok:pty:data`. */
11928
+ interface OkPtyData {
11929
+ readonly ptyId: string;
11930
+ readonly data: string;
11931
+ }
11932
+ /** Push payload for `ok:pty:exit`. */
11933
+ interface OkPtyExit {
11934
+ readonly ptyId: string;
11935
+ readonly exitCode: number;
11936
+ readonly signal: number | null;
11937
+ readonly error?: string;
11938
+ }
11939
+ /**
11940
+ * Claude Code readiness for the docked terminal.
11941
+ */
11942
+ interface ClaudeReadiness {
11943
+ readonly claude: 'present' | 'not-found' | 'unknown';
11944
+ readonly mcp: 'wired' | 'needs-rewire';
11945
+ /** True when the project's own `open-knowledge` `.mcp.json` entry is verified
11946
+ * to be OK's canonical managed server (cli `isOwnManagedEntry`), so the docked
11947
+ * terminal may pre-approve it on Claude launch instead of re-showing Claude's
11948
+ * trust prompt. False/absent for a foreign, tampered, or missing entry (the
11949
+ * supply-chain risk in a shared/cloned project) — launch bare and let Claude
11950
+ * prompt. Computed per-project by the desktop preflight; absent means false
11951
+ * (fail-safe). */
11952
+ readonly mcpPreApprovable?: boolean;
11953
+ /** Set only on a `rewire`-action result when re-arming MCP wiring threw, so
11954
+ * the renderer can surface the failure instead of the button silently no-op'ing. */
11955
+ readonly rewireError?: string;
11956
+ }
11957
+ /** On-PATH readiness for a non-Claude agent CLI (codex / cursor-agent) launched
11958
+ * in the docked terminal. */
11959
+ interface CliReadiness {
11960
+ readonly onPath: 'present' | 'not-found' | 'unknown';
11961
+ /** Codex-only: whether OK's `open-knowledge` MCP server is already configured
11962
+ * in the user's codex config. Gates the per-launch `-c` tool-auto-approve
11963
+ * override — codex fails to load its config if `-c` targets a server that is
11964
+ * not defined, so the launch site adds the override only when this is true.
11965
+ * Absent for CLIs where it does not apply.
11966
+ *
11967
+ * DELIBERATELY WEAKER THAN CLAUDE'S GATE, and not its security equivalent.
11968
+ * This is existence-by-name (any object under `mcp_servers.open-knowledge`),
11969
+ * whereas claude's `mcpPreApprovable` runs `isOwnManagedEntry` to verify the
11970
+ * entry is byte-exactly OK's own. The asymmetry is sound because the two read
11971
+ * different files: claude's is a PROJECT-scoped `.mcp.json` that travels in a
11972
+ * clone, so a same-named foreign entry is a real RCE vector; codex's target is
11973
+ * `scope: 'global'` (`~/.codex/config.toml`, resolved from `home`, never from
11974
+ * cwd), so anyone able to plant a foreign entry there can already register
11975
+ * arbitrary MCP servers and has won regardless. Tightening this to an exact
11976
+ * ownership match would also fail closed on a legitimate entry carrying any
11977
+ * extra codex key, silently disabling auto-approve for real users. This gate's
11978
+ * job is availability (don't break codex's config load), not authorization. */
11979
+ readonly okServerConfigured?: boolean;
11980
+ }
11981
+ interface OkDesktopBridge {
11982
+ readonly config: OkDesktopConfig;
11983
+ /** Subscribe to project-switch events. Returns unsubscribe. */
11984
+ onProjectSwitched(cb: (next: OkDesktopConfig) => void): OkUnsubscribe;
11985
+ /** Subscribe to menu-bar actions. Returns unsubscribe. */
11986
+ onMenuAction(cb: (action: OkMenuAction) => void): OkUnsubscribe;
11987
+ /**
11988
+ * Subscribe to `autoUpdater` `update-downloaded` events. Fires once per
11989
+ * pending-update version (gated in main by `AppState.versionPendingInstall`).
11990
+ * Returns unsubscribe. Toast A.
11991
+ */
11992
+ onUpdateDownloaded(cb: (info: OkUpdateDownloadedInfo) => void): OkUnsubscribe;
11993
+ /**
11994
+ * Subscribe to `ok:update:relaunching` — another window's "Relaunch now"
11995
+ * click committed in main. Swap this window's `update-downloaded` card to the
11996
+ * button-less "Relaunching…" in-progress state so every window shows
11997
+ * consistent feedback during the pre-`quitAndInstall` server teardown.
11998
+ * Returns unsubscribe.
11999
+ */
12000
+ onUpdateRelaunching(cb: (info: OkUpdateRelaunchingInfo) => void): OkUnsubscribe;
12001
+ /**
12002
+ * Subscribe to `ok:update:relaunch-failed` — a committed relaunch failed
12003
+ * (async updater error, no-quit watchdog, or sync throw). Surface the
12004
+ * relaunch-error notice; the banner re-arm arrives separately as a
12005
+ * re-broadcast `ok:update:downloaded`. Returns unsubscribe.
12006
+ */
12007
+ onUpdateRelaunchFailed(cb: (info: OkUpdateRelaunchFailedInfo) => void): OkUnsubscribe;
12008
+ /**
12009
+ * Subscribe to post-update "What's new" events. Fires once per version
12010
+ * transition on first launch (gated in main by `AppState.lastSeenVersion`).
12011
+ * Returns unsubscribe. Toast B.
12012
+ */
12013
+ onWhatsNew(cb: (info: OkWhatsNewInfo) => void): OkUnsubscribe;
12014
+ /** Subscribe to `ok:update:whats-new-dismissed` — another window dismissed the what's-new notice; clear this window's `whats-new-<version>` card. */
12015
+ onWhatsNewDismissed(cb: (info: {
12016
+ readonly version: string;
12017
+ }) => void): OkUnsubscribe;
12018
+ /**
12019
+ * Subscribe to `stuck-update` hints. Fires at most once per installation
12020
+ * after 7 consecutive failed-check days. Returns unsubscribe. Toast C.
12021
+ */
12022
+ onUpdateStuckHint(cb: (info: OkUpdateStuckHintInfo) => void): OkUnsubscribe;
12023
+ /**
12024
+ * Subscribe to `ok:deep-link` — fired when an
12025
+ * `openknowledge://open?project=…&doc=<name>` URL is routed to this
12026
+ * window. Renderer updates `location.hash` to open the target doc via
12027
+ * the existing hash-route listener. Returns unsubscribe.
12028
+ */
12029
+ onDeepLink(cb: (evt: {
12030
+ doc: string;
12031
+ kind: 'doc' | 'folder';
12032
+ branch?: string | null;
12033
+ multiCandidate?: boolean;
12034
+ targetMissing?: boolean;
12035
+ repositoryPath?: string;
12036
+ contentRootDepth?: number;
12037
+ }) => void): OkUnsubscribe;
12038
+ /**
12039
+ * Subscribe to `ok:share-received` — fired when a share URL (universal
12040
+ * link `https://openknowledge.ai/d/<encoded>` or custom scheme
12041
+ * `openknowledge://share?url=<blob-url>`) routes to this window. The
12042
+ * discriminated payload tells the renderer to mount the receive dialog
12043
+ * (kind `ok`) or surface a toast (kind `unsupported-version` / `invalid`).
12044
+ */
12045
+ onShareReceived(cb: (payload: OkShareReceivedPayload) => void): OkUnsubscribe;
12046
+ /**
12047
+ * Subscribe to `ok:server-version-drift` — fired once when this window
12048
+ * attaches to a server whose version differs from the app's. The renderer
12049
+ * surfaces a cancelable notification offering to restart the server via
12050
+ * `restartServer`.
12051
+ */
12052
+ onServerVersionDrift(cb: (info: OkServerVersionDriftInfo) => void): OkUnsubscribe;
12053
+ /**
12054
+ * Subscribe to `ok:server-restarted` — fired on a freshly-recreated window
12055
+ * after a successful `restartServer`, so the renderer can confirm the
12056
+ * server now matches the app.
12057
+ */
12058
+ onServerRestarted(cb: (info: OkServerRestartedInfo) => void): OkUnsubscribe;
12059
+ /**
12060
+ * Subscribe to `ok:project:recent-removed-missing` — fired on the window that
12061
+ * initiated a recents open of a folder that no longer exists. The stale entry
12062
+ * has already been pruned from the recents list; the renderer surfaces a
12063
+ * lightweight toast (and, in the Navigator, drops the row from its list).
12064
+ */
12065
+ onRecentRemovedMissing(cb: (info: OkRecentRemovedMissingInfo) => void): OkUnsubscribe;
12066
+ /**
12067
+ * Restart the project's server to match this app's version: terminate the
12068
+ * attached (not-owned) server and recreate the window against a fresh
12069
+ * own-version spawn. Resolves to `{ ok:false }` only when termination fails
12070
+ * (the originating window stays); on success the window is recreated and the
12071
+ * success toast fires there.
12072
+ */
12073
+ restartServer(projectPath: string): Promise<OkServerRestartOutcome>;
12074
+ /**
12075
+ * Push the user's chosen `nativeTheme.themeSource` value to main. Carries
12076
+ * the user-intent value (`'system' | 'light' | 'dark'`) verbatim — NEVER
12077
+ * resolve `'system'` to a concrete `'light' | 'dark'` at the call site
12078
+ * (it IS the lever that delegates to macOS appearance). Renderer
12079
+ * ConfigProvider runs this on every CRDT mutation of `appearance.theme`.
12080
+ * Failure is best-effort — body theme stays correct via next-themes; next
12081
+ * CRDT mutation re-fires.
12082
+ */
12083
+ setThemeSource(source: OkThemeSource): Promise<{
12084
+ ok: true;
12085
+ }>;
12086
+ /**
12087
+ * Push the user's chosen interface language to main, which rebuilds the
12088
+ * native menu bar in it. Carries the user-intent value (`'system'` or a
12089
+ * supported tag) verbatim — NEVER resolve `'system'` to a concrete locale at
12090
+ * the call site, for the same reason `setThemeSource` must not: `'system'`
12091
+ * IS the lever that delegates to the OS preferred-language list, and a
12092
+ * resolved value silently stops following it.
12093
+ *
12094
+ * Main resolves the language for its own boot by reading the persisted
12095
+ * preference off disk, because the menu is built before any renderer exists;
12096
+ * this call only carries subsequent changes. Failure is best-effort — the
12097
+ * menu stays on the previous language and the next mutation re-fires.
12098
+ */
12099
+ setLanguagePreference(preference: LanguagePreference): Promise<{
12100
+ ok: true;
12101
+ }>;
12102
+ /**
12103
+ * Fire-and-forget renderer→main signal that the theme has been applied
12104
+ * to chrome. Main's per-window show-gate listens for this alongside
12105
+ * `ready-to-show` before calling `BrowserWindow.show()` — eliminates the
12106
+ * cold-launch staleness window. Implemented in preload as
12107
+ * `invoke('ok:theme:applied', opts).catch(() => {})` so it composes
12108
+ * through the typed `createInvoker` wrapper.
12109
+ *
12110
+ * Optional `opts.reducedTransparency` carries the renderer's live
12111
+ * `matchMedia('(prefers-reduced-transparency: reduce)').matches` value;
12112
+ * main toggles vibrancy material accordingly. `opts.chrome` carries the
12113
+ * active palette's OS-drawn chrome colors.
12114
+ */
12115
+ signalThemeApplied(opts?: {
12116
+ reducedTransparency?: boolean;
12117
+ chrome?: OkChromeColors;
12118
+ }): void;
12119
+ /** Native folder-picker dialog surfaces. */
12120
+ dialog: {
12121
+ /** `dialog.showOpenDialog({ properties: ['openDirectory'] })`. Resolves to the selected path or `null` on cancel.
12122
+ * `defaultPath` seeds the initial directory shown to the user. */
12123
+ openFolder(opts?: {
12124
+ defaultPath?: string;
12125
+ }): Promise<string | null>;
12126
+ };
12127
+ /**
12128
+ * IPC-relayed wrappers around Electron's `shell` module. Main-process
12129
+ * handlers enforce the outbound-scheme allowlist (`https`, `http`,
12130
+ * `mailto`, `openknowledge`, plus `claude`, `codex`, `cursor` for the
12131
+ * "Open in Agent Desktop" dropdown) before delegating. Unauthorized
12132
+ * schemes reject.
12133
+ */
12134
+ shell: {
12135
+ openExternal(url: string): Promise<void>;
12136
+ /**
12137
+ * Probe whether a URL scheme has a registered handler on this OS.
12138
+ * Used by the "Open in Agent Desktop" dropdown to render disabled-
12139
+ * with-tooltip rows when the target app isn't installed. Returns
12140
+ * `{installed: false}` on timeout or platform-API error.
12141
+ *
12142
+ * **Scheme format contract:** `scheme` is the scheme NAME without
12143
+ * trailing colon (e.g. `'claude'`, not `'claude:'`). Matches the Linux
12144
+ * `xdg-mime query default x-scheme-handler/<name>` shell-command form
12145
+ * and the main-process shell-injection sanitizer — callers with a
12146
+ * colonful scheme MUST strip the trailing `:` first.
12147
+ */
12148
+ detectProtocol(scheme: string): Promise<{
12149
+ installed: boolean;
12150
+ displayName?: string;
12151
+ }>;
12152
+ /**
12153
+ * Step 1 of the Cursor two-step handoff — spawns `cursor <path>` via a
12154
+ * validated argv (shell:false, 2s timeout). Dedicated channel because
12155
+ * the threat model is a command allowlist (PATH hijacking, arg
12156
+ * injection) distinct from the URL-scheme allowlist above.
12157
+ */
12158
+ spawnCursor(path: string): Promise<{
12159
+ ok: true;
12160
+ } | {
12161
+ ok: false;
12162
+ reason: 'invalid-path' | 'not-installed' | 'timeout' | 'spawn-error';
12163
+ }>;
12164
+ /**
12165
+ * Append a local-only telemetry line to `~/.ok/stats.jsonl`. Zero
12166
+ * phone-home. Resolves even if HOME is unwritable — telemetry failure
12167
+ * must never bubble up and affect the dispatch path. The reason and scope
12168
+ * fields use the handoff subsystem's canonical literal-union discriminators.
12169
+ */
12170
+ recordHandoff(line: {
12171
+ readonly target: 'claude-cowork' | 'claude-code' | 'codex' | 'cursor';
12172
+ readonly host: 'electron' | 'web';
12173
+ readonly outcome: 'ok' | 'error';
12174
+ readonly ts: string;
12175
+ readonly reason?: HandoffFailureReason;
12176
+ readonly scope?: HandoffScope;
12177
+ }): Promise<void>;
12178
+ /**
12179
+ * Open an asset via the OS default handler. `relPath` is project-relative
12180
+ * (main-process resolves against `ProjectContext.projectPath` + `realpath` +
12181
+ * `isPathWithinProject`). Executable extensions (`.exe`, `.sh`, `.app`, …)
12182
+ * hard-refuse at the main handler — see
12183
+ * `EXECUTABLE_BLOCKLIST_EXTENSIONS` in `core/constants/upload.ts` for
12184
+ * the full blocklist.
12185
+ */
12186
+ openAsset(relPath: string): Promise<{
12187
+ ok: true;
12188
+ } | {
12189
+ ok: false;
12190
+ reason: 'extension-blocked' | 'path-escape' | 'not-found' | 'resolve-error';
12191
+ }>;
12192
+ /**
12193
+ * Reveal an asset in the native file manager (macOS Finder / Windows
12194
+ * Explorer / Linux xdg-open → default). Parent-only — does NOT invoke
12195
+ * the OS default handler for content. Lower-risk than `openAsset`; the
12196
+ * executable blocklist does NOT apply.
12197
+ */
12198
+ revealAsset(relPath: string): Promise<{
12199
+ ok: true;
12200
+ } | {
12201
+ ok: false;
12202
+ reason: 'path-escape' | 'not-found' | 'resolve-error';
12203
+ }>;
12204
+ /**
12205
+ * Reveal an ABSOLUTE path outside the caller window's project — the
12206
+ * terminal's "this file is outside your project" clickable-link flow.
12207
+ * Deliberately NOT containment-gated (unlike `revealAsset`); main stats the
12208
+ * path and pops a native confirmation dialog, revealing only on confirm. The
12209
+ * dialog is the trust boundary.
12210
+ */
12211
+ revealExternal(absPath: string): Promise<{
12212
+ ok: true;
12213
+ outcome: 'revealed' | 'dismissed';
12214
+ } | {
12215
+ ok: false;
12216
+ reason: 'not-found' | 'invalid-path' | 'error';
12217
+ }>;
12218
+ /**
12219
+ * Display the native right-click context menu for an on-disk reference
12220
+ * (`asset`, `wiki-link`, or `image`). Built from `Menu.buildFromTemplate`
12221
+ * in main — the gesture-attested pattern: main observes the click
12222
+ * directly, no IPC gesture forwarding needed. Entries: Reveal in Finder
12223
+ * + Open in default app + Copy link.
12224
+ */
12225
+ showAssetMenu(params: {
12226
+ readonly relPath: string;
12227
+ readonly title: string;
12228
+ readonly kind: 'asset' | 'wiki-link' | 'image';
12229
+ }): Promise<void>;
12230
+ /**
12231
+ * Reveal a file or folder in the OS file manager (Finder / Explorer /
12232
+ * Linux default). Path is validated against the caller window's project
12233
+ * directory in main; out-of-project, non-absolute, or null-byte-bearing
12234
+ * paths are silently refused at the wire (channel returns `undefined`
12235
+ * regardless; refusals emit a main-process `console.warn` for debugging).
12236
+ */
12237
+ showItemInFolder(path: string): Promise<void>;
12238
+ /**
12239
+ * Move a file or folder to the OS Trash via `shell.trashItem`. Step 1
12240
+ * of the sidebar Delete flow's two-step Option B orchestration.
12241
+ */
12242
+ trashItem(absPath: string): Promise<{
12243
+ ok: true;
12244
+ } | {
12245
+ ok: false;
12246
+ reason: 'not-found' | 'permission-denied' | 'system-error' | 'path-escape';
12247
+ detail?: string;
12248
+ }>;
12249
+ };
12250
+ /** IPC-relayed clipboard writer (sandboxed renderer cannot call clipboard directly). */
12251
+ clipboard: {
12252
+ writeText(text: string): Promise<void>;
12253
+ /**
12254
+ * Copy an image to the clipboard as raster bytes via `nativeImage`,
12255
+ * which macOS's pasteboard writer expands into the 9-flavor raster
12256
+ * set (`«class PNGf»`, `TIFF picture`, `JPEG picture`, `GIF
12257
+ * picture`, `«class jp2»`, `«class BMP»`, `«class TPIC»`,
12258
+ * `«class 8BPS»`, `«class AVIF»`) — the same shape a macOS
12259
+ * screenshot writes. Every rich receiver (Notes, Docs, Slack chat,
12260
+ * Notion inline, iMessage) picks a compatible flavor and renders
12261
+ * inline first-try.
12262
+ *
12263
+ * Renderer's own `navigator.clipboard.write` can't produce that
12264
+ * 9-flavor set (Chromium's Async Clipboard API only accepts one
12265
+ * blob per MIME key), which is why the copy has to run in main.
12266
+ * `nativeImage.createFromBuffer` decodes PNG + JPEG only; other
12267
+ * formats resolve `empty-image` and the renderer is expected to
12268
+ * fall back to its own best-effort `navigator.clipboard.write`.
12269
+ */
12270
+ copyImage(params: {
12271
+ readonly src: string;
12272
+ readonly alt: string;
12273
+ }): Promise<{
12274
+ ok: true;
12275
+ } | {
12276
+ ok: false;
12277
+ reason: 'fetch-failed' | 'path-escape' | 'empty-image' | 'read-error' | 'write-error';
12278
+ detail?: string;
12279
+ }>;
12280
+ };
12281
+ /**
12282
+ * Project-management surface consumed by the Navigator component.
12283
+ * `listRecent` reads the LRU-capped recent list from app state; `open`
12284
+ * spawns a NEW editor window for `request.path` (no switch-in-place);
12285
+ * `close` tears down the window hosting the call site.
12286
+ */
12287
+ project: {
12288
+ listRecent(): Promise<RecentProjectEntry[]>; /** Forget one entry from the recent-projects list. */
12289
+ removeRecent(path: string): Promise<void>;
12290
+ getSessionState(): Promise<ProjectSessionState>;
12291
+ setSessionState(state: ProjectSessionState): Promise<void>;
12292
+ open(request: OkProjectOpenRequest): Promise<void>;
12293
+ /**
12294
+ * File → Open file… — show the native md/mdx picker and open the pick in a
12295
+ * temporary single-file session (the desktop side of `ok <file>`). Picker +
12296
+ * open both run main-side; the picked path never crosses back to the
12297
+ * renderer.
12298
+ */
12299
+ openFile(): Promise<void>;
12300
+ /**
12301
+ * Atomically scaffold a new project under `parent/name` with the
12302
+ * user-chosen `editors` set. `editors` is the renderer's exact selection
12303
+ * (seeded from `integrations.status().detectedEditorIds`, minus/plus
12304
+ * anything the user toggled); main never widens or narrows it.
12305
+ */
12306
+ createNew(args: {
12307
+ parent: string;
12308
+ name: string;
12309
+ editors: OkMcpWiringEditorId[]; /** OK config sharing mode — defaults to 'shared' when omitted. */
12310
+ sharing?: 'shared' | 'local-only';
12311
+ packId?: OkPackId;
12312
+ /**
12313
+ * Folder the pack scaffolds into, relative to the project root.
12314
+ * Omitted → the project root (the dialog's default).
12315
+ */
12316
+ rootDir?: string;
12317
+ }): Promise<void>;
12318
+ /**
12319
+ * Fire-and-forget renderer→main telemetry counter for the Create-new-project
12320
+ * dialog cascade banners.
12321
+ */
12322
+ recordCreateNewBannerShown(banner: CreateNewBannerKind): Promise<void>;
12323
+ /**
12324
+ * Probe `<projectPath>/<path>` for the share-receive target-existence
12325
+ * gate, dispatching the on-disk predicate on `kind`.
12326
+ */
12327
+ checkTargetExists(request: {
12328
+ projectPath: string;
12329
+ kind: 'doc' | 'folder';
12330
+ path: string;
12331
+ }): Promise<OkCheckTargetExistsResult>; /** Read `<projectPath>/.git/HEAD` and classify the result. */
12332
+ readHeadBranch(projectPath: string): Promise<OkHeadBranchInfo>; /** Proxy `GET /api/git/branch-info` against the project's running server. */
12333
+ fetchBranchInfo(request: {
12334
+ projectPath: string;
12335
+ branch: string;
12336
+ kind: 'doc' | 'folder'; /** URL-derived repository-relative target path. */
12337
+ path: string;
12338
+ }): Promise<BranchInfoResponse | null>;
12339
+ /**
12340
+ * Proxy `POST /api/git/checkout` against the project's running server.
12341
+ * `fastForward` (on-origin "Switch and update branch") fast-forwards the
12342
+ * target branch to origin's tip before checkout; divergence → `ff-diverged`
12343
+ * (nothing mutated).
12344
+ */
12345
+ runCheckout(request: {
12346
+ projectPath: string;
12347
+ branch: string;
12348
+ fastForward?: boolean;
12349
+ }): Promise<CheckoutResponse | null>;
12350
+ /**
12351
+ * Proxy `POST /api/share/target-status` for the branch-switch dialog's
12352
+ * verdict pivot.
12353
+ */
12354
+ fetchTargetStatus(request: {
12355
+ projectPath: string;
12356
+ branch: string; /** URL-derived repository-relative target path. */
12357
+ path: string;
12358
+ kind: 'doc' | 'folder'; /** Present only for v2 so rename destinations can be content-relative. */
12359
+ contentRootDepth?: number;
12360
+ }): Promise<ShareTargetStatusResponse | null>;
12361
+ /**
12362
+ * Gate dialog dismissal on the `branch-switched` broadcast landing
12363
+ * in the project window.
12364
+ */
12365
+ awaitBranchSwitched(request: {
12366
+ projectPath: string;
12367
+ branch: string;
12368
+ timeoutMs: number;
12369
+ }): Promise<{
12370
+ ok: true;
12371
+ } | {
12372
+ ok: false;
12373
+ reason: 'timeout' | 'project-not-open';
12374
+ }>; /** Run the share-receive scaffold inside a CLI-managed worktree. */
12375
+ okInit(request: {
12376
+ projectPath: string;
12377
+ }): Promise<LocalOpOkInitResponse>;
12378
+ close(): Promise<void>;
12379
+ };
12380
+ /**
12381
+ * Worktree selector (worktree = window). `list` enumerates the
12382
+ * sender window's project's local branches + their worktrees; `create`
12383
+ * creates (or locates) the worktree for a branch under
12384
+ * `<mainRoot>/.ok/worktrees/`; `checkout` is the share-receive arm
12385
+ * (resolves where the branch lives — fetching from `origin` when
12386
+ * needed — then create-or-locates). Opening a worktree window reuses
12387
+ * `project.open({ entryPoint: 'worktree' })`.
12388
+ */
12389
+ worktree: {
12390
+ list(): Promise<WorktreeListResult>;
12391
+ create(request: WorktreeCreateRequest): Promise<WorktreeCreateResult>;
12392
+ checkout(request: {
12393
+ branch: string;
12394
+ }): Promise<WorktreeCreateResult>;
12395
+ };
12396
+ /**
12397
+ * OK config sharing mode — per-project sharing-mode posture.
12398
+ */
12399
+ sharing: {
12400
+ status(): Promise<OkSharingStatusResult>;
12401
+ setMode(mode: 'shared' | 'local-only'): Promise<OkSharingSetModeResult>; /** Toggle `.ok/skills/` shareability within local-only mode. */
12402
+ setSkillsShared(shared: boolean): Promise<OkSharingSetModeResult>;
12403
+ };
12404
+ /**
12405
+ * Slides (Slidev) — `status` detects a runnable `slidev`; `open` starts (or
12406
+ * reuses) a server for the deck and resolves once it is confirmed serving.
12407
+ * Canonical JSDoc in `packages/desktop/src/shared/ipc-channels.ts`.
12408
+ * Mirrored here per the OkDesktopBridge 3-way-mirror invariant.
12409
+ */
12410
+ slides: {
12411
+ status(): Promise<OkSlidesStatusResult>;
12412
+ open(docPath: string): Promise<OkSlidesOpenResult>;
12413
+ };
12414
+ /**
12415
+ * In-app "Report a bug" — `create` builds the redacted diagnostic zip
12416
+ * (optional crash-dump opt-in via `includeCrashDump`, optional app
12417
+ * screenshot via `includeScreenshot`); `captureScreenshot` grabs the app
12418
+ * before the dialog paints; `send` uploads it with an email fallback;
12419
+ * `onCrashDetected` / `crashAck` carry the crash-invite round-trip.
12420
+ */
12421
+ bugReport: {
12422
+ create(request: {
12423
+ level: ReportBundleLevel$1;
12424
+ note?: string;
12425
+ includeCrashDump?: boolean;
12426
+ includeScreenshot?: boolean;
12427
+ }): Promise<OkBugReportCreateResult>;
12428
+ captureScreenshot(): Promise<OkBugReportScreenshot | null>;
12429
+ /**
12430
+ * Whether main is holding a crash dump this report could carry. Only a
12431
+ * report the user opened themselves needs to ask — a crash invitation
12432
+ * already carries the answer on its event.
12433
+ */
12434
+ crashDumpAvailability(): Promise<OkBugReportCrashDumpAvailability>;
12435
+ send(request: OkBugReportSendInput): Promise<OkBugReportSendResult>;
12436
+ crashAck(request: {
12437
+ eventId: string;
12438
+ }): Promise<OkBugReportCrashAckResult>;
12439
+ list(): Promise<OkBugReportListResult>;
12440
+ delete(id: string): Promise<OkBugReportDeleteResult>;
12441
+ onCrashDetected(cb: (event: OkBugReportCrashDetectedEvent) => void): OkUnsubscribe;
12442
+ };
12443
+ /** Filesystem probes that back the Create-new-project dialog cascade. */
12444
+ fs: {
12445
+ defaultProjectsRoot(): Promise<string>;
12446
+ folderState(path: string): Promise<OkFolderState>;
12447
+ findEnclosingProjectRoot(path: string): Promise<OkFindEnclosingProjectRootResult | null>;
12448
+ findEnclosingGitRoot(path: string): Promise<OkFindEnclosingGitRootResult | null>;
12449
+ removeGitFolder(gitRoot: string): Promise<void>;
12450
+ };
12451
+ /**
12452
+ * Re-summon the Project Navigator window from inside an editor window.
12453
+ * Backed by main's `openNavigator()` helper — focus-existing-or-create
12454
+ * with no toggle semantics. Renderer call sites: `ProjectSwitcher`
12455
+ * dropdown's "Switch Project…" item and `CommandPalette`'s "Switch
12456
+ * Project" entry. The File menu's "Switch Project…" item invokes
12457
+ * `openNavigator()` directly inside main without crossing the bridge.
12458
+ */
12459
+ navigator: {
12460
+ open(): Promise<void>;
12461
+ };
12462
+ /** Popped-out single-document windows (`--ok-mode=note`). */
12463
+ noteWindow: {
12464
+ /**
12465
+ * Pop `docName` out into its own window, or focus the window already
12466
+ * showing it. `no-project` when the calling window has no project context.
12467
+ */
12468
+ open(docName: string, entryPoint: 'tab-menu' | 'palette'): Promise<{
12469
+ ok: true;
12470
+ outcome: 'created' | 'focused';
12471
+ } | {
12472
+ ok: false;
12473
+ reason: 'no-project' | 'invalid-request';
12474
+ }>;
12475
+ /**
12476
+ * Focus the owning project window and deliver a conversation/comments
12477
+ * action there. Note-window renderers call this instead of opening chrome
12478
+ * that deliberately does not exist in their reduced surface.
12479
+ */
12480
+ dispatchToMain(action: OkNoteWindowMainAction): Promise<OkNoteWindowMainActionResult>; /** Receive a note-window action in the owning project renderer. */
12481
+ onMainAction(cb: (action: OkNoteWindowMainAction) => void): OkUnsubscribe;
12482
+ };
12483
+ /**
12484
+ * `ok seed` scaffolder surface consumed by the FileSidebar + menu.
12485
+ * `plan()` is read-only and returns what the scaffolder would write;
12486
+ * `apply(plan)` performs the writes. Same functions run under the
12487
+ * Commander CLI (`ok seed`).
12488
+ */
12489
+ seed: {
12490
+ plan(options?: OkSeedPlanOptions): Promise<OkSeedPlanResult>;
12491
+ apply(plan: OkScaffoldPlan, options?: OkSeedApplyOptions): Promise<OkSeedApplyResult>;
12492
+ listPacks(): Promise<OkSeedListPacksResult>;
12493
+ };
12494
+ /**
12495
+ * Claude Chat & Cowork skill install-dialog hooks. Drives the 2-click
12496
+ * install via Claude.app's `.skill` `CFBundleDocumentType`. Local-build
12497
+ * design: `.skill` is produced on demand from the app-bundled SKILL.md;
12498
+ * no GitHub Releases dep.
12499
+ */
12500
+ skill: {
12501
+ /** True when Claude Desktop's config dir exists on this machine. */detectClaudeDesktop(): Promise<boolean>;
12502
+ /**
12503
+ * Build `openknowledge.skill` from the bundled source, save to
12504
+ * Downloads, invoke the OS file association (`.skill` → Claude
12505
+ * Desktop). Local build; no network.
12506
+ *
12507
+ * Gated by `~/.ok/skill-state/claude-cowork`: when the recorded
12508
+ * version matches the current bundled skill version, resolves with
12509
+ * `{ ok: true, skipped: true, version, recordedAt? }` without
12510
+ * rebuilding. Pass `force: true` to bypass.
12511
+ */
12512
+ buildAndOpen(opts?: {
12513
+ force?: boolean;
12514
+ }): Promise<{
12515
+ ok: true;
12516
+ path: string;
12517
+ skipped?: false;
12518
+ version?: string;
12519
+ } | {
12520
+ ok: true;
12521
+ path?: undefined;
12522
+ skipped: true;
12523
+ version: string;
12524
+ recordedAt?: string;
12525
+ } | {
12526
+ ok: false;
12527
+ reason: 'build-failed' | 'open-failed' | 'no-downloads-dir';
12528
+ message?: string;
12529
+ }>;
12530
+ };
12531
+ /**
12532
+ * Auto-update control surface. Toast A's "Relaunch now" button calls
12533
+ * `relaunchNow()` which invokes `autoUpdater.quitAndInstall()` in main.
12534
+ */
12535
+ update: {
12536
+ relaunchNow(): Promise<void>;
12537
+ /**
12538
+ * Force an out-of-cadence `checkForUpdates()` — fires the
12539
+ * `ok:update:check-now` IPC. Surfaced from the application menu's
12540
+ * "Check for Updates…" entries (App menu on macOS, Help menu
12541
+ * cross-platform). The user-facing result reaches the UI through
12542
+ * the existing toast event subscribers, so this resolves once main
12543
+ * has fired the request rather than waiting on the network.
12544
+ */
12545
+ checkNow(): Promise<void>;
12546
+ /**
12547
+ * Fire `ok:update:whats-new-dismiss` — tells main this window dismissed the
12548
+ * what's-new notice so main clears it across all windows. Fire-and-forget.
12549
+ */
12550
+ dismissWhatsNew(version: string): Promise<void>;
12551
+ };
12552
+ /**
12553
+ * Channel + schema-compatibility state surface. Renderer queries on mount
12554
+ * to render the correct BETA badge / About-panel label and route the
12555
+ * refuse-downgrade UX when a future-build state was rolled back.
12556
+ */
12557
+ state: {
12558
+ query(): Promise<OkStateSnapshot>;
12559
+ resetIncompatible(): Promise<void>;
12560
+ };
12561
+ /**
12562
+ * First-launch MCP consent surface. Renderer mounts `<McpConsentDialog>`
12563
+ * when `onShow` fires; calls `confirm` / `skip` on user action; calls
12564
+ * `signalReady()` once on app mount so main knows a renderer is
12565
+ * subscribed (mount-ack handshake).
12566
+ */
12567
+ mcpWiring: {
12568
+ /** Subscribe to the consent-dialog-show event. Returns unsubscribe. */onShow(cb: (payload: OkMcpWiringShowPayload) => void): OkUnsubscribe; /** Fire a one-way mount-ack event so main's whenRendererReady gate opens. */
12569
+ signalReady(): void;
12570
+ /** User clicked Add. `editorIds` is the subset the user checked;
12571
+ * `pathInstall` is the PATH toggle (tri-state — see
12572
+ * `OkMcpWiringConfirmRequest`). */
12573
+ confirm(request: OkMcpWiringConfirmRequest): Promise<OkMcpWiringResult>; /** User clicked Skip (or pressed ESC). */
12574
+ skip(): Promise<OkMcpWiringResult>;
12575
+ /**
12576
+ * Re-arm the consent dialog on demand (File → "Set up OpenKnowledge
12577
+ * integrations…" and the Cmd+K command). Resolves `true` when armed,
12578
+ * `false` when unavailable (non-darwin / unpackaged / arming threw).
12579
+ */
12580
+ reconfigure(): Promise<boolean>;
12581
+ };
12582
+ /**
12583
+ * App-wide spell-check toggle (Edit → "Check spelling while typing" and the
12584
+ * Cmd+K command). `toggle()` flips the flag and resolves to the new enabled
12585
+ * state. Bespoke main-side setting; NOT part of the View-menu-state snapshot.
12586
+ */
12587
+ spellcheck: {
12588
+ toggle(): Promise<boolean>;
12589
+ };
12590
+ /**
12591
+ * Settings → AI tools: live per-component install state + one-component
12592
+ * install/uninstall for OK's global footprint (per-editor MCP entries,
12593
+ * shell-PATH shim, user-global skill bundles). Mutations serialize in main.
12594
+ */
12595
+ integrations: {
12596
+ status(): Promise<OkIntegrationsStatus>;
12597
+ setComponent(request: OkIntegrationsSetRequest): Promise<OkIntegrationsSetResult>;
12598
+ };
12599
+ /**
12600
+ * Settings → This project → AI tools: live per-component install state +
12601
+ * one-component install/uninstall for OK's PROJECT-LOCAL footprint (per-editor
12602
+ * project MCP config files + the project runtime skill) against the project
12603
+ * the requesting window has open. Mutations serialize in main.
12604
+ */
12605
+ projectIntegrations: {
12606
+ status(): Promise<OkProjectIntegrationsStatus>;
12607
+ setComponent(request: OkProjectIntegrationsSetRequest): Promise<OkProjectIntegrationsSetResult>;
12608
+ };
12609
+ /**
12610
+ * Per-project consent dialog surface. Navigator-only.
12611
+ * Renderer mounts a shadcn Dialog when `onShow` fires; calls
12612
+ * `confirm` / `cancel` on user action; calls `signalReady()` once on app
12613
+ * mount so main's mount-ack gate opens. `onToast` fires on freshly-spawned
12614
+ * editor windows for ancestor- and git-root-promote events.
12615
+ */
12616
+ onboarding: {
12617
+ onShow(cb: (payload: OkOnboardingShowPayload) => void): OkUnsubscribe;
12618
+ signalReady(): void;
12619
+ confirm(request: OkOnboardingConfirmRequest): Promise<OkOnboardingResult>;
12620
+ cancel(): Promise<OkOnboardingResult>;
12621
+ probeContent(request: OkOnboardingProbeContentRequest): Promise<OkOnboardingProbeContentResult>;
12622
+ onToast(cb: (payload: {
12623
+ readonly kind: 'ancestor-promote';
12624
+ readonly ancestorPath: string;
12625
+ } | {
12626
+ readonly kind: 'git-root-promote';
12627
+ readonly gitRoot: string;
12628
+ readonly pickedPath: string;
12629
+ } | {
12630
+ readonly kind: 'startup-reclaim';
12631
+ readonly mcp: {
12632
+ readonly status: 'none';
12633
+ } | {
12634
+ readonly status: 'repaired';
12635
+ readonly editors: readonly string[];
12636
+ } | {
12637
+ readonly status: 'failed';
12638
+ readonly editors: readonly string[];
12639
+ };
12640
+ readonly path: {
12641
+ readonly status: 'none';
12642
+ } | {
12643
+ readonly status: 'installed';
12644
+ readonly summary: string;
12645
+ } | {
12646
+ readonly status: 'failed';
12647
+ readonly summary: string;
12648
+ };
12649
+ } | {
12650
+ readonly kind: 'sharing-refused-tracked';
12651
+ readonly tracked: readonly string[];
12652
+ readonly remediation: string;
12653
+ } | {
12654
+ readonly kind: 'sharing-no-git';
12655
+ readonly requestedMode: 'local-only';
12656
+ }) => void): OkUnsubscribe;
12657
+ };
12658
+ /**
12659
+ * Pre-project local-op flows. Required by the Project Navigator window
12660
+ * (no backing API server). Editor windows use the HTTP path; this
12661
+ * surface is unused there.
12662
+ */
12663
+ localOp: {
12664
+ auth: {
12665
+ start(): OkLocalOpStream<OkLocalOpAuthEvent>;
12666
+ };
12667
+ clone: {
12668
+ start(request: {
12669
+ url: string;
12670
+ dir: string;
12671
+ branch?: string | null;
12672
+ }): OkLocalOpStream<OkLocalOpCloneEvent>;
12673
+ };
12674
+ authStatus(request?: {
12675
+ host?: string;
12676
+ }): Promise<OkLocalOpAuthStatusResponse>;
12677
+ authRepos(request?: {
12678
+ host?: string;
12679
+ }): Promise<OkLocalOpAuthReposResponse>;
12680
+ };
12681
+ /**
12682
+ * Share-receive flow surface. `validateLocalFolder` runs the
12683
+ * Q2 "I have it locally" folder validator in the main process via
12684
+ * `validateLocalFolderForShare` from the CLI package.
12685
+ */
12686
+ share: {
12687
+ validateLocalFolder(args: {
12688
+ folderPath: string;
12689
+ host: string;
12690
+ owner: string;
12691
+ repo: string;
12692
+ }): Promise<ShareFolderValidationResult$1>;
12693
+ };
12694
+ /**
12695
+ * Editor area state push surface. Renderer fires
12696
+ * `notifyActiveTargetChanged` once per `activeTarget` transition in
12697
+ * `useDocumentContext()`.
12698
+ */
12699
+ editor: {
12700
+ notifyActiveTargetChanged(target: OkEditorActiveTargetSnapshot): void; /** Fire-and-forget push of the sidebar's view-menu state. */
12701
+ notifyViewMenuStateChanged(state: Partial<OkEditorViewMenuStateSnapshot>): void;
12702
+ /**
12703
+ * Fire-and-forget push keying the window's Chromium background-throttling
12704
+ * to its unsynced work.
12705
+ */
12706
+ notifyBackgroundThrottle(signal: {
12707
+ hasPendingWork: boolean;
12708
+ enabled: boolean;
12709
+ }): void;
12710
+ };
12711
+ /**
12712
+ * Windows/Linux renderer-menubar dispatch surface (windows-linux-port
12713
+ * renderer-menubar decision). macOS keeps the native menu bar and never calls this; on
12714
+ * win/linux the renderer-drawn menu bar routes every click through main
12715
+ * so menu semantics live in one place. `query` resolves the aggregated
12716
+ * `OkMenuRendererSnapshot`; every other kind performs the action
12717
+ * main-side and resolves undefined.
12718
+ */
12719
+ menu: {
12720
+ dispatch(request: OkMenuDispatchRequest): Promise<OkMenuRendererSnapshot | undefined>;
12721
+ };
12722
+ /**
12723
+ * Startup-instrumentation push surface (desktop launch waterfall). The
12724
+ * renderer reports its two launch checkpoints — page-list ready and first
12725
+ * content — as epoch-ms once both land; main folds them into the
12726
+ * `desktop.startup-timeline` log line.
12727
+ */
12728
+ startup: {
12729
+ reportMarks(marks: {
12730
+ pageListReadyMs: number;
12731
+ firstContentMs: number;
12732
+ }): void;
12733
+ };
12734
+ /**
12735
+ * Sidebar tree-state push subscriptions. Main pushes
12736
+ * `ok:sidebar:expand-all` / `ok:sidebar:collapse-all` when the user picks
12737
+ * View → Expand All / Collapse All.
12738
+ */
12739
+ sidebar: {
12740
+ expandAll(cb: () => void): OkUnsubscribe;
12741
+ collapseAll(cb: () => void): OkUnsubscribe;
12742
+ };
12743
+ /** Docked terminal panel surface (bottom or right). */
12744
+ terminal: {
12745
+ create(opts: {
12746
+ cols: number;
12747
+ rows: number;
12748
+ launchCommand?: string;
12749
+ }): Promise<OkPtyCreateResult>;
12750
+ input(ptyId: string, data: string): void;
12751
+ resize(ptyId: string, cols: number, rows: number): void;
12752
+ kill(ptyId: string): Promise<void>;
12753
+ drain(ptyId: string, bytes: number): void; /** Reload-rehydration inventory. */
12754
+ list(): Promise<OkPtyListEntry[]>; /** Reload-rehydration adopt. */
12755
+ adopt(ptyId: string): Promise<OkPtyAdoptResult>;
12756
+ /**
12757
+ * Persist per-session tab metadata (custom name + sticky ordinal) in main so
12758
+ * it survives a renderer reload — main outlives the reload, so a reloaded dock
12759
+ * reads it back via `list`. Fire-and-forget; omit a field to leave it unchanged.
12760
+ */
12761
+ setMeta(ptyId: string, meta: {
12762
+ customLabel?: string | null;
12763
+ ordinal?: number;
12764
+ }): void;
12765
+ /**
12766
+ * Persist the tab display order in main (ptyIds in visual order) so a reorder
12767
+ * survives a renderer reload. Fire-and-forget.
12768
+ */
12769
+ setOrder(orderedPtyIds: readonly string[]): void; /** Per-window state for the independent terminal and agents panels. */
12770
+ getDockState(): Promise<OkTerminalDockState>; /** Persist one panel's session state per window and report durable-write failures. */
12771
+ setDockState(state: OkTerminalDockStateUpdate): Promise<OkTerminalDockStateWriteResult>;
12772
+ onData(cb: (msg: OkPtyData) => void): OkUnsubscribe;
12773
+ onExit(cb: (msg: OkPtyExit) => void): OkUnsubscribe;
12774
+ claudePreflight(): Promise<ClaudeReadiness>;
12775
+ cliPreflight(cli: TerminalCli): Promise<CliReadiness>;
12776
+ /**
12777
+ * Batched on-PATH readiness. An absent key means the probe could not verify
12778
+ * that CLI either way (NOT absence) — consumers must fail open on
12779
+ * `undefined` and reserve gating-off for the positive `false`.
12780
+ */
12781
+ cliInstalledMap(): Promise<Partial<Record<TerminalCli, boolean>>>;
12782
+ rewireClaudeMcp(): Promise<ClaudeReadiness>;
12783
+ };
12784
+ /**
12785
+ * OS assistive-tech signal gating xterm's `screenReaderMode`. Optional in
12786
+ * the renderer contract: session-only
12787
+ * bridges omit it, and consumers treat an absent surface as
12788
+ * screen-reader-active (fail-accessible).
12789
+ */
12790
+ accessibility?: {
12791
+ isScreenReaderActive(): boolean;
12792
+ onScreenReaderChanged(cb: (active: boolean) => void): OkUnsubscribe;
12793
+ };
12794
+ /** Current platform — `process.platform` reported by preload. */
12795
+ readonly platform: 'darwin' | 'win32' | 'linux';
12796
+ /** Electron app version (from main's `app.getVersion()`). */
12797
+ readonly appVersion: string;
12798
+ /**
12799
+ * Named parallel dev-instance label (branch/worktree) when this launch
12800
+ * relocated `userData` to a named sibling — auto-derived from the git
12801
+ * checkout or an explicit `OK_INSTANCE`. Null for the default install and in
12802
+ * web / CLI distribution. Drives the header branch badge.
12803
+ */
12804
+ readonly instanceLabel: string | null;
12805
+ /**
12806
+ * Resolve a dropped `File` to its absolute filesystem path via Electron
12807
+ * `webUtils.getPathForFile` (renderer-side, no IPC). Returns null for a File
12808
+ * with no backing path on disk (e.g. an in-memory clipboard blob). The
12809
+ * docked terminal uses this to insert a dropped file's path at the prompt.
12810
+ */
12811
+ getPathForFile(file: File): string | null;
12812
+ /**
12813
+ * Debug-only namespace — populated by preload ONLY when the
12814
+ * `OK_DEBUG_KEYRING_SMOKE=1` env var is set OR the app is unpacked (dev
12815
+ * mode). Absent in normal production runs.
12816
+ */
12817
+ debug?: {
12818
+ keyringSmoke(): Promise<OkKeyringSmokeResult>;
12819
+ };
12820
+ }
12821
+ declare global {
12822
+ interface Window {
12823
+ /** Populated by the desktop preload script. Absent in web / CLI distribution. */
12824
+ okDesktop?: OkDesktopBridge;
12825
+ }
12826
+ } //# sourceMappingURL=desktop-bridge.d.ts.map
12827
+ //#endregion
10232
12828
  //#region src/commands/editors.d.ts
10233
12829
  type EditorId = EditorId$1;
10234
12830
  declare const ALL_EDITOR_IDS: readonly EditorId[];