@inkeep/open-knowledge 0.6.0-beta.2 → 0.6.0-beta.20

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 (148) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +36 -1
  2. package/dist/assets/skills/discovery/SKILL.md +1 -1
  3. package/dist/assets/skills/project/SKILL.md +52 -20
  4. package/dist/cli.mjs +41 -41
  5. package/dist/config-schema.json +20 -0
  6. package/dist/config.project.schema.json +20 -0
  7. package/dist/constants-C-5EjDbE.mjs +2 -0
  8. package/dist/{dist-soQLoIV1.mjs → dist-DJn-sAHz.mjs} +64 -54
  9. package/dist/dist-DTvkQo_1.mjs +1 -0
  10. package/dist/{git-handle-DwfYp_z--CfyPz4Dz.mjs → git-handle-CjyGVy33-CK0dYQ8y.mjs} +2 -2
  11. package/dist/git-handle-CjyGVy33-DVACqhWk.mjs +1 -0
  12. package/dist/index.d.mts +15 -9
  13. package/dist/index.mjs +1 -1
  14. package/dist/init-pO2pBlt4.mjs +1 -0
  15. package/dist/{init-DjF_or_S.mjs → init-x8ipA2a2.mjs} +10 -10
  16. package/dist/loader-C04vMF9U.mjs +1 -0
  17. package/dist/{loader-D39G1Qj8.mjs → loader-V39mUVRO.mjs} +3 -3
  18. package/dist/preview-CZ72g3RX.mjs +1 -0
  19. package/dist/{preview-BrADtCN4.mjs → preview-CmWe_oUt.mjs} +2 -2
  20. package/dist/public/assets/ActivityModeContent-CgPfEhMS.js +2 -0
  21. package/dist/public/assets/ActivityPanelDiffView-LNHry3BJ.js +13 -0
  22. package/dist/public/assets/ConsentDialogBody-CImrdpFX.js +2 -0
  23. package/dist/public/assets/DocumentContext-DCEXS67b.js +52 -0
  24. package/dist/public/assets/GraphPanel-mQmRhod_.js +46 -0
  25. package/dist/public/assets/{McpConsentDialogBody-Dw8kQ_BH.js → McpConsentDialogBody-Bh3i0mQ8.js} +1 -1
  26. package/dist/public/assets/SettingsDialogBody-25y-yVAm.js +7 -0
  27. package/dist/public/assets/SourceEditor-D4uMes9S.js +2 -0
  28. package/dist/public/assets/{agent-presence-DUe_PdKt.js → agent-presence-DxGcS3q2.js} +1 -1
  29. package/dist/public/assets/{architectureDiagram-Q4EWVU46-C4pUyyy6.js → architectureDiagram-Q4EWVU46-CIVh0TLx.js} +1 -1
  30. package/dist/public/assets/{blockDiagram-DXYQGD6D-VkwkYpUF.js → blockDiagram-DXYQGD6D-Cg-UHasz.js} +1 -1
  31. package/dist/public/assets/button-DenIdY-r.js +1 -0
  32. package/dist/public/assets/{c4Diagram-AHTNJAMY-uR85wHTj.js → c4Diagram-AHTNJAMY-KFeHAAOO.js} +1 -1
  33. package/dist/public/assets/channel-BqqURnVG.js +1 -0
  34. package/dist/public/assets/checkbox-BGXb5iL3.js +1 -0
  35. package/dist/public/assets/{chunk-336JU56O-CcUNcCyG.js → chunk-336JU56O-DHqaXNrn.js} +2 -2
  36. package/dist/public/assets/{chunk-426QAEUC-D-Drhg6m.js → chunk-426QAEUC-CuPmuy8t.js} +1 -1
  37. package/dist/public/assets/{chunk-4TB4RGXK-DylOpICA.js → chunk-4TB4RGXK-QLafKs7A.js} +1 -1
  38. package/dist/public/assets/{chunk-5FUZZQ4R-COpN1802.js → chunk-5FUZZQ4R-DoG5zk7O.js} +1 -1
  39. package/dist/public/assets/{chunk-5PVQY5BW-SLEOUaCC.js → chunk-5PVQY5BW--zDnbXdQ.js} +1 -1
  40. package/dist/public/assets/{chunk-EDXVE4YY-Cr4fB83o.js → chunk-EDXVE4YY-BfT15Ufb.js} +1 -1
  41. package/dist/public/assets/{chunk-ENJZ2VHE-jO5Yn0Ti.js → chunk-ENJZ2VHE-DEtEhITq.js} +1 -1
  42. package/dist/public/assets/{chunk-ICPOFSXX-DO-wz1LJ.js → chunk-ICPOFSXX-C8AElYY_.js} +1 -1
  43. package/dist/public/assets/{chunk-OYMX7WX6-DlOfgU2U.js → chunk-OYMX7WX6-CX3nrwxJ.js} +1 -1
  44. package/dist/public/assets/{chunk-U2HBQHQK-fFQ_IUwS.js → chunk-U2HBQHQK-CfAyyLJz.js} +1 -1
  45. package/dist/public/assets/{chunk-X2U36JSP-JbIA9pf5.js → chunk-X2U36JSP-CmACymAN.js} +1 -1
  46. package/dist/public/assets/{chunk-YZCP3GAM-Cx9wuApW.js → chunk-YZCP3GAM-CiWxV9XS.js} +1 -1
  47. package/dist/public/assets/{chunk-ZZ45TVLE-CdiDiZYV.js → chunk-ZZ45TVLE-B7t5_MqN.js} +1 -1
  48. package/dist/public/assets/classDiagram-6PBFFD2Q-DrN_pUa5.js +1 -0
  49. package/dist/public/assets/classDiagram-v2-HSJHXN6E-C1MJ1Ukt.js +1 -0
  50. package/dist/public/assets/clone-CecJCxEU.js +1 -0
  51. package/dist/public/assets/{collapsible-DfUFsfqv.js → collapsible-BhpeB6tu.js} +1 -1
  52. package/dist/public/assets/compiler-runtime-Cs91PcD2.js +1 -0
  53. package/dist/public/assets/config-validation-events-BinSH1WI.js +11 -0
  54. package/dist/public/assets/{dagre-D0NgAcgy.js → dagre-BuFRtOcC.js} +1 -1
  55. package/dist/public/assets/{dagre-KV5264BT-D00jhTEj.js → dagre-KV5264BT-BpBW6R71.js} +1 -1
  56. package/dist/public/assets/{diagram-5BDNPKRD-53lAVvrc.js → diagram-5BDNPKRD-B5phtkJp.js} +1 -1
  57. package/dist/public/assets/{diagram-G4DWMVQ6-DvnMPxCL.js → diagram-G4DWMVQ6-tjReW6yx.js} +1 -1
  58. package/dist/public/assets/{diagram-MMDJMWI5-bSOxNuvv.js → diagram-MMDJMWI5-b4CgKryF.js} +1 -1
  59. package/dist/public/assets/{diagram-TYMM5635-ftQ9f3sM.js → diagram-TYMM5635-D5B0g2lj.js} +1 -1
  60. package/dist/public/assets/dialog-CoRJrIIb.js +45 -0
  61. package/dist/public/assets/{dist-BUk_vKk2.js → dist-CadHdAvi.js} +1 -1
  62. package/dist/public/assets/{dist-SeK3HGs7.js → dist-CdAufVHw.js} +1 -1
  63. package/dist/public/assets/{dist-DiQSHtaM.js → dist-Cwt7KtW7.js} +1 -1
  64. package/dist/public/assets/{dist-CruwjFAC.js → dist-DRBAXDc3.js} +1 -1
  65. package/dist/public/assets/{dist-semR8ZB_.js → dist-DkR43q3h.js} +1 -1
  66. package/dist/public/assets/{dist-DNQ2xKmK.js → dist-sw9fzKjM.js} +1 -1
  67. package/dist/public/assets/{dist-C8kKU7Ya.js → dist-y5PvfJVO.js} +1 -1
  68. package/dist/public/assets/{erDiagram-SMLLAGMA-B1J-oh72.js → erDiagram-SMLLAGMA-CRJz10Jv.js} +1 -1
  69. package/dist/public/assets/{flowDiagram-DWJPFMVM-lLrSyhC0.js → flowDiagram-DWJPFMVM-BDCJTgJ7.js} +1 -1
  70. package/dist/public/assets/{ganttDiagram-T4ZO3ILL-CUjectuq.js → ganttDiagram-T4ZO3ILL-cPQKlGYc.js} +1 -1
  71. package/dist/public/assets/{gitGraphDiagram-UUTBAWPF-vFBdpaIg.js → gitGraphDiagram-UUTBAWPF-BMyjc352.js} +1 -1
  72. package/dist/public/assets/{graphlib-C3wGX8GR.js → graphlib-BU8FnRz1.js} +1 -1
  73. package/dist/public/assets/index-CYbQDyZm.css +1 -0
  74. package/dist/public/assets/index-D7awTFRW.js +1915 -0
  75. package/dist/public/assets/{infoDiagram-42DDH7IO-p5UnX5VQ.js → infoDiagram-42DDH7IO-BZ6v5y-j.js} +1 -1
  76. package/dist/public/assets/{ishikawaDiagram-UXIWVN3A-Dc_uLtDG.js → ishikawaDiagram-UXIWVN3A-DA7_P2Up.js} +1 -1
  77. package/dist/public/assets/{journeyDiagram-VCZTEJTY-D-OWzt5X.js → journeyDiagram-VCZTEJTY-CzZoB161.js} +1 -1
  78. package/dist/public/assets/{kanban-definition-6JOO6SKY-Dg3mF5uv.js → kanban-definition-6JOO6SKY-DKg7pXv1.js} +1 -1
  79. package/dist/public/assets/{label-Bdsqm1CY.js → label-DCMZaJ38.js} +1 -1
  80. package/dist/public/assets/{line-Blj6fR0j.js → line-DGc-MCyQ.js} +1 -1
  81. package/dist/public/assets/{mermaid.core-DKgSmEOt.js → mermaid.core-DRx0wZe0.js} +3 -3
  82. package/dist/public/assets/{mindmap-definition-QFDTVHPH-CzdOizWD.js → mindmap-definition-QFDTVHPH-C9GRZxO6.js} +1 -1
  83. package/dist/public/assets/{panel-CxlToFCs.js → panel-BNBODYwB.js} +1 -1
  84. package/dist/public/assets/{pieDiagram-DEJITSTG-CCKPY52f.js → pieDiagram-DEJITSTG-L6I3ft9Z.js} +1 -1
  85. package/dist/public/assets/{doc-hash-BrKkCdCz.js → prop-types-BEbeSvI1.js} +157 -147
  86. package/dist/public/assets/{propagation-api-CobBjsTC.js → propagation-api-3kmMXRwS.js} +1 -1
  87. package/dist/public/assets/{quadrantDiagram-34T5L4WZ-7k7hUHeX.js → quadrantDiagram-34T5L4WZ-Dp2IeEPC.js} +1 -1
  88. package/dist/public/assets/{requirementDiagram-MS252O5E-DtBI2UGc.js → requirementDiagram-MS252O5E-BxNWyIZg.js} +1 -1
  89. package/dist/public/assets/{sankeyDiagram-XADWPNL6-CsyAV-jZ.js → sankeyDiagram-XADWPNL6-CRn0_xkw.js} +1 -1
  90. package/dist/public/assets/{sequenceDiagram-FGHM5R23-BVVas0PB.js → sequenceDiagram-FGHM5R23-Drkjb1j4.js} +1 -1
  91. package/dist/public/assets/{stateDiagram-FHFEXIEX-DSU8iqSJ.js → stateDiagram-FHFEXIEX-BBUFKS0u.js} +1 -1
  92. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-BtYsWsIg.js +1 -0
  93. package/dist/public/assets/target-navigation-intent-B6yRgiCk.js +1 -0
  94. package/dist/public/assets/{telemetry-impl-BiWd9bHi.js → telemetry-impl-DPRMO_b_.js} +1 -1
  95. package/dist/public/assets/{textarea-CQGiqhkV.js → textarea-C_bHQrXh.js} +1 -1
  96. package/dist/public/assets/{timeline-definition-GMOUNBTQ-Cz06Vse0.js → timeline-definition-GMOUNBTQ-CLoe9y-z.js} +1 -1
  97. package/dist/public/assets/toggle-group-Llc9I0Vm.js +1 -0
  98. package/dist/public/assets/typing-burst-detector-DbcZJAdl.js +2 -0
  99. package/dist/public/assets/{vennDiagram-DHZGUBPP-Cf-DwVPO.js → vennDiagram-DHZGUBPP-q2zdiy4F.js} +1 -1
  100. package/dist/public/assets/{wardleyDiagram-NUSXRM2D-CYXaSU9R.js → wardleyDiagram-NUSXRM2D-Njg6YHso.js} +1 -1
  101. package/dist/public/assets/{xychartDiagram-5P7HB3ND-Czjmctj-.js → xychartDiagram-5P7HB3ND-Ct8Wgp45.js} +1 -1
  102. package/dist/public/index.html +28 -28
  103. package/dist/{repair-launch-json-BbKHWVwS.mjs → repair-launch-json-Cv8qU8q1.mjs} +2 -2
  104. package/dist/{repair-mcp-configs-DwbKFYJm.mjs → repair-mcp-configs-DZe7obiJ.mjs} +2 -2
  105. package/dist/schemas/v0/config.project.schema.json +20 -0
  106. package/dist/{server-lock-D7DXNVql-BRVVzA6T.mjs → server-lock-BniQ3qki-CadPGoZN.mjs} +1 -1
  107. package/dist/server-lock-BniQ3qki-DjKtnzVr.mjs +1 -0
  108. package/dist/src-y7Zf6r7x.mjs +2 -0
  109. package/dist/{start-DZJdwuup.mjs → start-9FvyifCc.mjs} +2 -2
  110. package/dist/start-CFl5RhUP.mjs +1 -0
  111. package/package.json +2 -2
  112. package/dist/constants-xZa5P4wL.mjs +0 -2
  113. package/dist/dist-7_PKsuCz.mjs +0 -1
  114. package/dist/git-handle-DwfYp_z--DreW3fNC.mjs +0 -1
  115. package/dist/init-CFkaUfzc.mjs +0 -1
  116. package/dist/loader-Bmw95q2S.mjs +0 -1
  117. package/dist/preview-COcwGoDu.mjs +0 -1
  118. package/dist/public/assets/ActivityModeContent-nwB2ciii.js +0 -2
  119. package/dist/public/assets/ActivityPanelDiffView-d4ec9M69.js +0 -13
  120. package/dist/public/assets/ConsentDialogBody-BncX7dD1.js +0 -2
  121. package/dist/public/assets/DocumentContext-Bc83ypCd.js +0 -52
  122. package/dist/public/assets/GraphPanel-DwHnIo6r.js +0 -46
  123. package/dist/public/assets/SettingsDialogBody-o-ExGcAl.js +0 -11
  124. package/dist/public/assets/SourceEditor-DF322IKX.js +0 -2
  125. package/dist/public/assets/button-JrGyO3-P.js +0 -1
  126. package/dist/public/assets/channel-DtU-CCDV.js +0 -1
  127. package/dist/public/assets/checkbox-CTrUepCv.js +0 -1
  128. package/dist/public/assets/classDiagram-6PBFFD2Q-BZpd1T4J.js +0 -1
  129. package/dist/public/assets/classDiagram-v2-HSJHXN6E-C6GyLa0q.js +0 -1
  130. package/dist/public/assets/clone-CvvNDZ2x.js +0 -1
  131. package/dist/public/assets/compiler-runtime-CVnuRdak.js +0 -1
  132. package/dist/public/assets/config-validation-events-BCNaZEDf.js +0 -10
  133. package/dist/public/assets/dialog-bA5Nvc2p.js +0 -45
  134. package/dist/public/assets/index-Bzs40SFf.css +0 -1
  135. package/dist/public/assets/index-zU1ANKhn.js +0 -1928
  136. package/dist/public/assets/stateDiagram-v2-QKLJ7IA2-B8ew63Gv.js +0 -1
  137. package/dist/public/assets/target-navigation-intent-B5Xuyiwx.js +0 -1
  138. package/dist/public/assets/toggle-group-Cimrwku9.js +0 -1
  139. package/dist/public/assets/typing-burst-detector-ByUXt_f8.js +0 -2
  140. package/dist/server-lock-D7DXNVql-B5nINglj.mjs +0 -1
  141. package/dist/src-C9SFj148.mjs +0 -2
  142. package/dist/start-BYnDVYJN.mjs +0 -1
  143. /package/dist/public/assets/{katex-qwlL5fSd.js → katex-DX-tM4Fr.js} +0 -0
  144. /package/dist/public/assets/{mcp-consent-store-BPw6Zd40.js → mcp-consent-store-19Boxoxe.js} +0 -0
  145. /package/dist/public/assets/{project-paths-DKT5BePl.js → project-paths-eyh51nmQ.js} +0 -0
  146. /package/dist/public/assets/{stex-ChE_gMQ6.js → stex-DxnLy7rA.js} +0 -0
  147. /package/dist/public/assets/{trace-api-3dczfLSc.js → trace-api-CiCjX4Sz.js} +0 -0
  148. /package/dist/public/assets/{w3c-keyname-BSTW6KzM.js → w3c-keyname-B5t0fahT.js} +0 -0
@@ -1510,7 +1510,7 @@ Homepage: https://github.com/Brooooooklyn/canvas
1510
1510
 
1511
1511
  Copyright (c) 2020 lynweklm@gmail.com
1512
1512
 
1513
- ### `@napi-rs/keyring@1.2.0`
1513
+ ### `@napi-rs/keyring@1.3.0`
1514
1514
  Homepage: https://github.com/Brooooooklyn/keyring-node
1515
1515
 
1516
1516
  Copyright (c) 2020 N-API for Rust
@@ -2459,6 +2459,11 @@ Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/p
2459
2459
 
2460
2460
  Copyright (c) Microsoft Corporation.
2461
2461
 
2462
+ ### `@types/react@19.2.14`
2463
+ Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/react
2464
+
2465
+ Copyright (c) Microsoft Corporation.
2466
+
2462
2467
  ### `@types/statuses@2.0.6`
2463
2468
  Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/statuses
2464
2469
 
@@ -2489,6 +2494,11 @@ Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/v
2489
2494
 
2490
2495
  Copyright (c) Microsoft Corporation.
2491
2496
 
2497
+ ### `@types/vimeo__player@2.18.3`
2498
+ Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vimeo__player
2499
+
2500
+ Copyright (c) Microsoft Corporation.
2501
+
2492
2502
  ### `@types/yargs@17.0.35`
2493
2503
  Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/yargs
2494
2504
 
@@ -2499,6 +2509,11 @@ Homepage: https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/y
2499
2509
 
2500
2510
  Copyright (c) Microsoft Corporation.
2501
2511
 
2512
+ ### `@u-wave/react-vimeo@0.9.12`
2513
+ Homepage: https://github.com/u-wave/react-vimeo#readme
2514
+
2515
+ Copyright (c) 2016 Renée Kooi
2516
+
2502
2517
  ### `@uiw/codemirror-theme-basic@4.25.9`
2503
2518
  Homepage: https://uiwjs.github.io/react-codemirror/#/theme/data/basic/light
2504
2519
 
@@ -2514,6 +2529,11 @@ Homepage: https://github.com/upsetjs/venn.js
2514
2529
 
2515
2530
  Copyright (c) 2013 Ben Frederickson Copyright (c) 2021 Samuel Gratzl
2516
2531
 
2532
+ ### `@vimeo/player@2.30.4`
2533
+ Homepage: https://github.com/vimeo/player.js
2534
+
2535
+ Copyright (c) 2016 [Vimeo](https://vimeo.com)
2536
+
2517
2537
  ### `accepts@2.0.0`
2518
2538
  Homepage: https://github.com/jshttp/accepts
2519
2539
 
@@ -2913,6 +2933,11 @@ Homepage: https://mths.be/cssesc
2913
2933
 
2914
2934
  _(No LICENSE file in package; SPDX identifier in `package.json` is the sole declared grant.)_
2915
2935
 
2936
+ ### `csstype@3.2.3`
2937
+ Homepage: https://github.com/frenic/csstype
2938
+
2939
+ Copyright (c) 2017-2018 Fredrik Nicol
2940
+
2916
2941
  ### `cytoscape@3.33.2`
2917
2942
  Homepage: http://js.cytoscape.org
2918
2943
 
@@ -4265,6 +4290,11 @@ Homepage: https://github.com/inspiredware/napi-build-utils#readme
4265
4290
 
4266
4291
  Copyright (c) 2018 inspiredware
4267
4292
 
4293
+ ### `native-promise-only@0.8.1`
4294
+ Homepage: http://github.com/getify/native-promise-only
4295
+
4296
+ _(No LICENSE file in package; SPDX identifier in `package.json` is the sole declared grant.)_
4297
+
4268
4298
  ### `negotiator@1.0.0`
4269
4299
  Homepage: https://github.com/jshttp/negotiator
4270
4300
 
@@ -5501,6 +5531,11 @@ Homepage: https://github.com/BerkeleyTrue/warning
5501
5531
 
5502
5532
  Copyright (c) 2013-present, Facebook, Inc.
5503
5533
 
5534
+ ### `weakmap-polyfill@2.0.4`
5535
+ Homepage: https://github.com/polygonplanet/weakmap-polyfill
5536
+
5537
+ Copyright (c) 2015-2021 polygonplanet
5538
+
5504
5539
  ### `web-namespaces@2.0.1`
5505
5540
  Homepage: https://github.com/wooorm/web-namespaces
5506
5541
 
@@ -3,7 +3,7 @@ name: open-knowledge-discovery
3
3
  description: "Read when the user asks what Open Knowledge is, wants to install it on a repository, wants to share an Open Knowledge project with collaborators, or asks how `ok init` / `ok install-skill` / OK Desktop set up a project. Do NOT load to perform Open Knowledge reads/writes — the runtime guidance for editing markdown inside an initialized OK project ships as a separate project-local skill at `.claude/skills/open-knowledge/` whenever `ok init` runs. If the user appears to be editing markdown inside a `.ok/` project and this is the only OK skill loaded, advise them to re-run `ok init` to install the project-local skill."
4
4
  compatibility: "Any agent host — no MCP server required. Pure discovery + install guidance."
5
5
  metadata:
6
- version: "0.6.0-beta.2"
6
+ version: "0.6.0-beta.20"
7
7
  author: "Inkeep"
8
8
  repository: "https://github.com/inkeep/open-knowledge"
9
9
  ---
@@ -3,7 +3,7 @@ name: open-knowledge
3
3
  description: "MUST invoke before reading or editing any `.md` / `.mdx` file, and before any `mcp__open-knowledge__*` tool call (`exec`, `search`, `write_document`, `edit_document`, and the rest). This skill is installed into the repository by `ok init`, so its presence alone means this is an Open Knowledge project — its runtime contract governs every markdown file here, with no need to probe for a `.ok/` directory. Authoritative agent-runtime contract; supersedes the overlapping MCP server `instructions` echo."
4
4
  compatibility: "Claude Code, Claude Desktop, Claude Cowork, Claude.ai web. Requires Open Knowledge MCP server + code execution."
5
5
  metadata:
6
- version: "0.6.0-beta.2"
6
+ version: "0.6.0-beta.20"
7
7
  author: "Inkeep"
8
8
  repository: "https://github.com/inkeep/open-knowledge"
9
9
  ---
@@ -19,17 +19,18 @@ Open Knowledge (OK) is a markdown-CRDT collaboration platform exposed via MCP. T
19
19
 
20
20
  1. **Reads:** `exec("cat …")` for a single doc, `exec("ls -A …")` for a directory (with folder defaults + template menu), `exec("grep …")` for literal, `search` for ranked retrieval. Native `Read` / `Grep` only on source code (`.ts` / `.py` / …), never on in-scope `.md` / `.mdx`.
21
21
  2. **Writes:** `write_document` for new or full-replace, `edit_document` for body-only find/replace, `edit_frontmatter` for 1-2 frontmatter keys (JSON Merge Patch — preferred). Full frontmatter rewrites use `write_document({ position: "replace" })`. `edit_document` rejects frontmatter (HTTP 400).
22
- 3. **Preview:** every OK tool response carries the preview URL (`ui.baseUrl` on reads, `previewUrl` on writes). Navigate your in-app browser to it from the first response you see; refresh from later responses if Electron/UI restarted. Surface to the user on a `start-ui` warning (no UI running). Don't `preview_screenshot` after every edit.
22
+ 3. **Preview:** every OK read/write response carries a route-only `previewUrl` (`/#/<doc>`, no host:port). If you have a `preview_*` tool, call `preview_start("open-knowledge-ui")`; otherwise call `get_preview_url` once for the full browser URL and open it in your own in-app browser. Surface to the user on a `start-ui` warning (no UI running). Don't `preview_screenshot` to confirm edits — the CRDT tool response is the confirmation.
23
23
  4. **Workflow tools** (`ingest` / `research` / `consolidate` / `discover`) return procedural guides, not data. Use them when the work fits the layer; follow their numbered steps.
24
24
 
25
25
  Everything below is depth. Read on demand.
26
26
 
27
- ## Tool index — 17 tools
27
+ ## Tool index — 21 tools
28
28
 
29
29
  The full MCP surface, grouped by risk-level. Every tool's `kind` / `action` set is single-risk-level (never a read and a write behind one discriminator).
30
30
 
31
- - **Reads** — `exec` (primary; shell-style `cat`/`ls`/`grep`/`find` with frontmatter + backlink + history enrichment), `search` (ranked, BM25 + recency), `get_history` (versions for a doc), `links` (`kind: 'backlinks'|'forward'|'dead'|'orphans'|'hubs'|'suggest'`), `get_config` (resolved config), `get_components` (canonical component schemas).
31
+ - **Reads** — `exec` (primary; shell-style `cat`/`ls`/`grep`/`find` with frontmatter + backlink + history enrichment), `search` (ranked, BM25 + recency), `get_history` (versions for a doc), `links` (`kind: 'backlinks'|'forward'|'dead'|'orphans'|'hubs'|'suggest'`), `get_config` (resolved config), `get_components` (canonical component schemas), `get_preview_url` (browser-reachable preview URL on demand).
32
32
  - **Writes** — `write_document` (new or full-replace; supports `template:` instantiation), `edit_document` (body-only find/replace), `edit_frontmatter` (1-2 keys via RFC 7396 JSON Merge Patch — preferred), `delete_document`, `rename` (probes file vs folder; rewrites referrers), `version` (`action: 'save'|'rollback'`), `folder_config` (`action: 'set-rule'|'write-template'|'delete-template'`).
33
+ - **GitHub-sync conflicts** — `list_conflicts` (enumerate), `get_conflict_content` (base/ours/theirs stages + lifecycle), `resolve_conflict` (write a chosen resolution + commit; destructive). Mutating writes against a doc in conflict return RFC 9457 `urn:ok:error:doc-in-conflict` (409); `exec("cat …")` returns `lifecycle: {status, reason} | null` so you can detect the state proactively. See *Conflict-aware writes*.
33
34
  - **Workflow** — `ingest`, `research`, `consolidate`, `discover` (return procedural guides, not data).
34
35
 
35
36
  Tools NOT in OK MCP (they belong to your agent host): `preview_start`, `preview_screenshot`, `WebFetch`, `WebSearch`, native `Read` / `Grep` / `Glob` / `Edit`. The STOP rule below governs which of those you may use on in-scope markdown.
@@ -61,34 +62,36 @@ Why: native tools skip frontmatter, backlinks, shadow-repo activity, and project
61
62
 
62
63
  ## Preview — open the browser at session start
63
64
 
64
- **The invariant.** If OK Electron is open for this project OR `ok ui` is running for it, every OK tool response carries the preview URL — plain HTTP, no custom URL schemes, works in any browser including agent in-app browsers (Claude Desktop, Cursor, Codex, Cowork). Read tools (`exec`, `search`, `links`) carry it in `ui.baseUrl` (top-level) and per-doc `previewUrl` fields; write tools carry it in `previewUrl` + the optional `warning` shape. Never construct this URL; always read it from the latest tool response.
65
+ The user watches your edits land in a live browser preview. Open it once at session start, then keep working. Re-navigate only when the user asks to open a different doc, not to re-check your own edits.
65
66
 
66
- **The default agent move.** Make your first OK tool call (any read works `exec("ls -A")` is enough). The response carries the preview URL. Navigate to it immediately, then proceed with your real work. The user watches edits land live; you can re-navigate later to verify a CRDT edit landed when a response looks ambiguous. Per host:
67
+ **`previewUrl` is a route, not a URL to open.** Every read response (per-doc, on `exec` / `search` / `links` rows) and every write response carries a `previewUrl` a route fragment like `/#/specs/foo/SPEC`, with **no scheme, host, or port**. It identifies *which doc* to preview, not a URL to hand a browser by itself. Never construct or guess preview URLs.
67
68
 
68
- - **In-app browser hosts** (Claude Desktop, Cursor, Codex, Cowork): navigate the in-app browser to the `previewUrl`. Default.
69
- - **Claude Code Desktop**: call `preview_start("open-knowledge-ui")` (host tool, not OK MCP) — and nothing else. Do NOT read, diagnose, or edit `.claude/launch.json`; that file is host-managed config, and the OK ui lock-collision proxy handles the UI-already-running case automatically. If `preview_start` fails, surface the `previewUrl` from any recent OK tool response and report the issue to the user — do not try to "fix" `launch.json`.
70
- - **Stdio-only hosts**: surface the URL in chat; `open <url>` (macOS) if the host can shell out.
69
+ **Pick how to open the preview by tool capability — not by host name.** Look at the tools actually available to you this session:
71
70
 
72
- **Four signals to check if it's already open** (you usually can't pre-check, so read these from each write response):
71
+ - **You have a `preview_*` tool** (e.g. `preview_start`) → call `preview_start("open-knowledge-ui")` and nothing else. The pane supplies its own origin; you never need a URL. Do NOT also call `get_preview_url`. Do NOT read, diagnose, or edit `.claude/launch.json` — that file is host-managed, and the OK lock-collision proxy handles the UI-already-running case automatically. If `preview_start` fails, report it to the user; do not try to "fix" `launch.json`.
72
+ - **No `preview_*` tool, but you have an in-app / built-in browser tool** → call `get_preview_url` once to get the full browser URL (`{ url, baseUrl, running }`), then navigate your **in-app browser** to `url`. Pass a `docName` to `get_preview_url` to jump straight to a doc, or omit it for the UI root.
73
+ - **No browser tool at all** (a stdio host such as the Codex CLI, which has no embedded browser) → call `get_preview_url`, then `open <url>` in the system browser as a last resort, and say so plainly to the user ("opening the preview in your system browser — this host has no in-app browser"). The system browser is the fallback, never the default.
74
+
75
+ **Opening or reading a file IS a preview navigation.** On any "open `<file>`" / "read `<file>`" request, navigate the browser to that doc's `previewUrl` route from the tool response — not a separate fetch, not a fresh system-browser launch.
76
+
77
+ **Four signals to check if the preview is already attached** (read these from each write response):
73
78
 
74
79
  1. You opened/navigated earlier this session → don't reopen.
75
- 2. Write response has `previewUrl` (non-null) and NO `warning` → a browser is attached somewhere; do nothing.
76
- 3. `warning: { action: "attach-preview-once", previewUrl, message }` → UI reachable, no browser attached; navigate one-shot.
80
+ 2. Write response has `previewUrl` (non-null route) and NO `warning` → a browser is attached somewhere; do nothing.
81
+ 3. `warning: { action: "attach-preview-once", previewUrl, message }` → UI reachable, no browser attached; navigate one-shot (`preview_start`, or `get_preview_url` → in-app browser).
77
82
  4. `warning: { action: "start-ui", previewUrl: null, message }` → no UI running anywhere. Surface the message verbatim — recovery options are in the in-band copy. Don't loop on retries.
78
83
 
79
84
  Warnings fire at most once per session in the fresh-start case.
80
85
 
81
- **`previewUrl: null` only means "no UI reachable" on the three attach-warning tools: `write_document` / `edit_document` / `edit_frontmatter`.** Workflow tools return prose and don't carry `previewUrl`. `delete_document` / `rename` emit `previousPreviewUrl` (different field, for closing stale tabs) and don't fire attach warnings.
86
+ **`previewUrl: null` only means "no UI reachable" on the three attach-warning tools: `write_document` / `edit_document` / `edit_frontmatter`.** Workflow tools return prose and don't carry `previewUrl`. `delete_document` / `rename` emit `previousPreviewUrl` (different field, for closing stale tabs) and don't fire attach warnings. `get_preview_url` reports `running: false` + `url: null` when no UI is running.
82
87
 
83
- **Always read `previewUrl` from the latest write response.** Don't cache the session-start value — Electron quit/reopen (or `ok ui` restart) can change the port; the resolver picks up the new port automatically.
88
+ If you see `"Hocuspocus server is not running"`, run `ok start` and retry.
84
89
 
85
- If you see `"Hocuspocus server is not running"`, run `ok start` and retry. NEVER construct preview URLs by hand.
90
+ OK Electron and `ok ui` share `ui.lock`; when a second UI binds a different port, the OK lock-collision proxy bridges it to the live server transparently. That is exactly why `previewUrl` is route-only — the port behind the proxy is not the agent's to use. **Do not nudge the user to quit OK Electron to free a port** — the proxy handles it, and quitting tears down a UI in active use.
86
91
 
87
- OK Electron and `ok ui` share `ui.lock`only one can be the primary server for a project. When a second `ok ui` tries to bind a different port (Claude Code Desktop's preview pane spawning a sibling, for example), the OK lock-collision handler proxies the new port to the live UI server transparently. **Do not nudge the user to quit OK Electron to free a port** — the proxy handles it, and quitting would tear down a UI the user is actively using.
92
+ **The preview is read-only for the agentit is the user's view, not a surface you read back.** You cannot click or type to drive edits — the CRDT flow is one-way (agent MCP CRDT preview).
88
93
 
89
- **The preview is read-only for the agent.** Navigate to verify edits landed; you cannot click or type to drive edits the CRDT flow is one-way (agent MCP CRDT preview).
90
-
91
- **No screenshots after every edit.** Do NOT take `preview_screenshot` (host tool, not OK MCP) after every write. Trust the response. Screenshot only when (a) debugging a visual issue, (b) a response looks ambiguous, or (c) the user asks.
94
+ **No screenshots to confirm edits, no generic verification loop.** Do NOT take `preview_screenshot` (host tool, not OK MCP) after a write, and do not run a generic snapshot/eval/screenshot verification loop — OK's preview is a read-only, one-way mirror, so the CRDT tool response *is* the confirmation that an edit landed. Screenshot only when debugging a visual rendering issue or when the user explicitly asks to see the preview never to confirm an edit landed.
92
95
 
93
96
  ## Writing
94
97
 
@@ -98,6 +101,35 @@ To delete a doc, call `delete_document` — never `rm` / `unlink` / native `Bash
98
101
 
99
102
  **If `edit_document` returns "Text not found" on text you can verify exists on disk** (via `exec("cat …")`), the MCP session is likely stale (e.g., after a folder rename or server restart). Treat this as the escape-hatch trigger from the STOP block: prefix your next user-visible sentence with `Open Knowledge MCP unavailable:` and report the inconsistency. Don't loop on retries — the symptom is structural, not transient.
100
103
 
104
+ ## Conflict-aware writes
105
+
106
+ Projects with GitHub sync enabled may carry docs in a merge-conflict state. The MCP server refuses every mutating call against such a doc with a structured RFC 9457 response:
107
+
108
+ ```json
109
+ {
110
+ "type": "urn:ok:error:doc-in-conflict",
111
+ "title": "Document is in conflict.",
112
+ "status": 409,
113
+ "detail": "The document is in a merge-conflict state. Call get_conflict_content + resolve_conflict before retrying.",
114
+ "file": "notes/sso.md",
115
+ "resolutionOptions": ["mine", "theirs", "content"]
116
+ }
117
+ ```
118
+
119
+ The gate covers `write_document`, `edit_document`, `delete_document`, `rename`, `version` (`action: 'rollback'`), `folder_config` (`action: 'write-template'|'delete-template'`), and agent undo. You cannot route around it by writing content that byte-matches one of the merge stages — the gate refuses on lifecycle state, not on body equality.
120
+
121
+ **Detect proactively.** `exec("cat <path>.md")` always returns `lifecycle: {status, reason} | null` alongside the body. When `status === 'conflict'`, switch to the resolution flow before attempting any mutation.
122
+
123
+ **Resolution flow.** Three tools compose:
124
+
125
+ 1. `list_conflicts()` → enumerate every doc currently tracked in conflict.
126
+ 2. `get_conflict_content({ file })` → fetch `base` / `ours` / `theirs` stages plus the doc's `lifecycleStatus`. `ours` reflects the live Y.Text (what the human user sees in the editor) when the doc is loaded server-side and is marker-free; falls back to `git show :2:<file>` otherwise (e.g. after an editor reopen seeded markers into Y.Text).
127
+ 3. `resolve_conflict({ file, strategy, content? })` → write the chosen bytes and commit. Strategies: `mine` writes `git show :2:`, `theirs` writes `git show :3:`, `content` writes the bytes you supply.
128
+
129
+ `file` is a `.md` / `.mdx` path relative to the project dir (extension included) — mirrors the on-disk shape, not the extension-less `docName` used by other tools.
130
+
131
+ The resolve operation is best-effort and NOT atomic: `git checkout --ours/--theirs && git add` may succeed but the subsequent `git commit --no-edit` can fail (pre-commit hook rejection, locked index). On commit failure the staged files are re-`git add`-ed back into the unmerged index and the tracked entry remains in `conflicts.json` — re-call `resolve_conflict` after the user clears the blocker.
132
+
101
133
  ## Components — prefer canonicals when one fits
102
134
 
103
135
  OK projects ship a registry of custom JSX components (callouts, tabs, math, file attachments, …) with richer affordances than plain CommonMark / GFM. Three-step pattern:
@@ -324,7 +356,7 @@ The skill carries the trigger ("KB content changed this turn — go look"). The
324
356
  | Read an individual doc | `Read: specs/foo/SPEC.md` | `exec("cat specs/foo/SPEC.md")` |
325
357
  | Explore a markdown-heavy dir | `Agent(Explore): "..."` | Do `exec`-based exploration yourself |
326
358
  | Wait for the server to tell you to open preview | Skip the session-start preview open and wait for the `attach-preview-once` hint | Open the preview browser at session start; the hint is a fallback when you didn't |
327
- | Ignore the attach hint | Skip the `warning: { action: "attach-preview-once" }` hint in write-tool responses | Open the `previewUrl` when the hint fires; otherwise do nothing |
359
+ | Ignore the attach hint | Skip the `warning: { action: "attach-preview-once" }` hint in write-tool responses | Open the preview when the hint fires (`preview_start`, or `get_preview_url`); otherwise do nothing |
328
360
  | Make the Claude Code Desktop preview work | Read / diagnose / edit `.claude/launch.json` (host-managed config) | Call `preview_start("open-knowledge-ui")` and nothing else; the OK lock-collision proxy bridges any port mismatch transparently |
329
361
  | Reference another doc | `` `[text](./page.md)` `` (backticked) or HTML `<a>` | `[text](./page.md)` (raw markdown) |
330
362
  | Embed an image | `<img src="...">` (HTML) or hot-linked external URL | Fetch + save locally + `![meaningful alt](./assets/images/path)` |