@inkeep/open-knowledge 0.49.0-beta.2 → 0.49.0-beta.21

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 (476) hide show
  1. package/dist/THIRD_PARTY_NOTICES.md +65 -0
  2. package/dist/{acp-harness-probe-ziMiy7xh.mjs → acp-harness-probe-DxBf-LTU.mjs} +2 -2
  3. package/dist/assets/skills/packs/codebase-wiki/SKILL.md +1 -1
  4. package/dist/assets/skills/packs/entity-vault/SKILL.md +2 -2
  5. package/dist/assets/skills/packs/knowledge-base/SKILL.md +6 -6
  6. package/dist/assets/skills/packs/knowledge-base/consolidate/SKILL.md +2 -2
  7. package/dist/assets/skills/packs/knowledge-base/research/SKILL.md +5 -5
  8. package/dist/assets/skills/packs/okf/SKILL.md +1 -1
  9. package/dist/assets/skills/packs/plain-notes/SKILL.md +1 -1
  10. package/dist/assets/skills/packs/software-lifecycle/SKILL.md +6 -6
  11. package/dist/assets/skills/packs/software-lifecycle/frame-a-proposal/SKILL.md +3 -3
  12. package/dist/assets/skills/packs/software-lifecycle/record-a-decision/SKILL.md +7 -7
  13. package/dist/assets/skills/packs/software-lifecycle/review-a-design/SKILL.md +4 -4
  14. package/dist/assets/skills/packs/software-lifecycle/write-a-postmortem/SKILL.md +2 -2
  15. package/dist/assets/skills/packs/software-lifecycle/write-a-spec/SKILL.md +5 -5
  16. package/dist/assets/skills/packs/worldbuilding/SKILL.md +1 -1
  17. package/dist/assets/skills/packs/writing-pipeline/SKILL.md +1 -1
  18. package/dist/assets/skills/project/SKILL.md +3 -3
  19. package/dist/assets/skills/project/references/starter-packs.md +1 -1
  20. package/dist/cli.mjs +31 -31
  21. package/dist/config-schema.json +38 -0
  22. package/dist/config.user.schema.json +38 -0
  23. package/dist/constants-C_nRJliJ.mjs +2 -0
  24. package/dist/{fs-traced-Cq61rC8q.mjs → fs-traced-By5aY-RE.mjs} +2 -2
  25. package/dist/fs-traced-CkLhqsEn.mjs +1 -0
  26. package/dist/git-handle-BOyHOuUW.mjs +1 -0
  27. package/dist/{git-handle-DyGrpFVy.mjs → git-handle-CxyKwEl2.mjs} +2 -2
  28. package/dist/index.d.mts +17 -0
  29. package/dist/index.mjs +1 -1
  30. package/dist/init-DX85IP2w.mjs +1 -0
  31. package/dist/{init-CrBI6vIT.mjs → init-uGxYY6UM.mjs} +17 -17
  32. package/dist/{launch-json-removal-BiYW3EuW.mjs → launch-json-removal-Dhdwq5FP.mjs} +2 -2
  33. package/dist/loader-CENRqebF.mjs +1 -0
  34. package/dist/{loader-CPPSnf2M.mjs → loader-CNksYhN0.mjs} +2 -2
  35. package/dist/md-manager-CK3MY8qo.mjs +2 -0
  36. package/dist/{open-browser-gBhxldMU.mjs → open-browser-WfQL3wzU.mjs} +2 -2
  37. package/dist/parse-worker.mjs +1 -1
  38. package/dist/{preview-Bk5wWu5b.mjs → preview-BZSyDCZ1.mjs} +2 -2
  39. package/dist/preview-BuphBmlc.mjs +1 -0
  40. package/dist/public/assets/{ActivityModeContent-C3nXNwXU.js → ActivityModeContent-Dfn7Nlez.js} +1 -1
  41. package/dist/public/assets/{AgentDiffPane-88NqxyAN.js → AgentDiffPane-CyHhN5YO.js} +2 -2
  42. package/dist/public/assets/{AgentThreadClientBinder-DNvb1Kvi.js → AgentThreadClientBinder-Dg7kpSW2.js} +1 -1
  43. package/dist/public/assets/{AppMenubar-_6okky_d.js → AppMenubar-DgbuW3Mn.js} +1 -1
  44. package/dist/public/assets/BugReportHistory-CF0synre.js +1 -0
  45. package/dist/public/assets/{BugReportHistoryDialog-DgM3N4RP.js → BugReportHistoryDialog-RyYP9c6e.js} +1 -1
  46. package/dist/public/assets/ChangedOutsideBadge-DqZ2TDGM.js +1 -0
  47. package/dist/public/assets/CodeMirrorPropInput-DgV9gATY.js +3 -0
  48. package/dist/public/assets/{ConfigSharingInfoTooltip-BhNgrS2h.js → ConfigSharingInfoTooltip-C34Mqu2n.js} +1 -1
  49. package/dist/public/assets/{ConsentDialogBody-CAqiYyjs.js → ConsentDialogBody-D2cqdMrg.js} +1 -1
  50. package/dist/public/assets/{CopyButton-DfXJBl0I.js → CopyButton-DysciFW5.js} +1 -1
  51. package/dist/public/assets/{DiffView-Bc5gwnAV.js → DiffView-vtrGUscK.js} +1 -1
  52. package/dist/public/assets/DocumentContext-BVLbIfH2.js +38 -0
  53. package/dist/public/assets/{EditorModeToggle-hNtfjPSO.js → EditorModeToggle-CtE8ZJiD.js} +1 -1
  54. package/dist/public/assets/{EnableSyncConfirmDialog-D6R1KFya.js → EnableSyncConfirmDialog-_hiHVbZX.js} +1 -1
  55. package/dist/public/assets/FeedbackForm-GmlPVpar.js +1 -0
  56. package/dist/public/assets/{GraphPanel-CD7b7bEO.js → GraphPanel-Duz6DAfx.js} +1 -1
  57. package/dist/public/assets/{ImportSkillDialog-Boio2l_W.js → ImportSkillDialog-8uZq0fE4.js} +1 -1
  58. package/dist/public/assets/{LintConfigEditor-CVU6CMtT.js → LintConfigEditor-DlBcCkCe.js} +1 -1
  59. package/dist/public/assets/ManagedArtifactProperties-BC3be05i.js +1 -0
  60. package/dist/public/assets/ManagedArtifactProperties-eSS8gOcB.js +2 -0
  61. package/dist/public/assets/{McpConsentDialogBody-BCWXnE1x.js → McpConsentDialogBody-DH2Kth2j.js} +1 -1
  62. package/dist/public/assets/{Mermaid-DT9lZOmy.js → Mermaid-EN9ImzAU.js} +2 -2
  63. package/dist/public/assets/{MermaidDocEditor-BA7XEwxt.js → MermaidDocEditor-iAjxxs_n.js} +1 -1
  64. package/dist/public/assets/{RegisteredAgentIcon-CSZXCqwG.js → RegisteredAgentIcon-B0CO1bW-.js} +1 -1
  65. package/dist/public/assets/{ReportBugDialogBody-UQSprqDe.js → ReportBugDialogBody-DfM9Liz9.js} +1 -1
  66. package/dist/public/assets/SchemaConfigEditor-CDNOEozy.js +1 -0
  67. package/dist/public/assets/SessionsHost-BVng_fwc.js +2 -0
  68. package/dist/public/assets/SettingsDialogBody-CCdFxE-F.js +12 -0
  69. package/dist/public/assets/{ShareBranchSwitchDialog-B8RBBcyE.js → ShareBranchSwitchDialog-BfXB6yAf.js} +1 -1
  70. package/dist/public/assets/{ShareReceiveDialog-CWWtfyfF.js → ShareReceiveDialog-DhyJYkDM.js} +1 -1
  71. package/dist/public/assets/{ShareReceiveMissDialog-C5AIXfjD.js → ShareReceiveMissDialog-BWlcptnT.js} +1 -1
  72. package/dist/public/assets/{SkillEditBanner-9ueqFia8.js → SkillEditBanner-B_rCSPhd.js} +1 -1
  73. package/dist/public/assets/{SkillOriginInline-BXnRlN9C.js → SkillOriginInline-CayMH5aY.js} +1 -1
  74. package/dist/public/assets/SkillToolbarControls-CcJo2WHo.js +1 -0
  75. package/dist/public/assets/SlidesToolbarControls-BLaXC3GF.js +1 -0
  76. package/dist/public/assets/SourceEditor-CxhxTb3c.js +1 -0
  77. package/dist/public/assets/TerminalPanel-B2LAcV5N.js +146 -0
  78. package/dist/public/assets/{TerminalWindowApp-C01zGAL4.js → TerminalWindowApp-DucJDTXJ.js} +1 -1
  79. package/dist/public/assets/{TextDocEditor-Dy3xqFER.js → TextDocEditor-C1SHIJF2.js} +1 -1
  80. package/dist/public/assets/ThreadView-RDfDoNg-.js +10 -0
  81. package/dist/public/assets/{TimelineDiffPane-C0N2AQ-_.js → TimelineDiffPane-BreQDbb5.js} +2 -2
  82. package/dist/public/assets/{abnfDiagram-VRR7QNED-Df7YgB-u.js → abnfDiagram-VRR7QNED-BT4E4K73.js} +1 -1
  83. package/dist/public/assets/{agent-diff-store-CjnUWyJv.js → agent-diff-store-D7h8uSqv.js} +1 -1
  84. package/dist/public/assets/agent-visibility-DUGhAO32.js +1 -0
  85. package/dist/public/assets/{arc-CVPlXeVn.js → arc-DWS63c4g.js} +1 -1
  86. package/dist/public/assets/architecture-TIHT7OUA-DKDnEx-J.js +1 -0
  87. package/dist/public/assets/{architectureDiagram-ZJ3FMSHR-Cid8pwpH.js → architectureDiagram-ZJ3FMSHR-C7ATAQRT.js} +1 -1
  88. package/dist/public/assets/arrow-up-right-0IN5lFEX.js +1 -0
  89. package/dist/public/assets/auth-state-cache-DBut4s-H.js +11 -0
  90. package/dist/public/assets/{blockDiagram-677ZJIJ3-CbwD0mr1.js → blockDiagram-677ZJIJ3-0XzCwsjs.js} +1 -1
  91. package/dist/public/assets/{braces-PuTG97X6.js → braces-Ytg60O62.js} +1 -1
  92. package/dist/public/assets/{c4Diagram-LMCZKHZV-CZHW-U3Z.js → c4Diagram-LMCZKHZV-DF_YvBJq.js} +1 -1
  93. package/dist/public/assets/{calendar-Dze0sDp0.js → calendar-BFaqjDfb.js} +1 -1
  94. package/dist/public/assets/{case-sensitive-DyF7sIpA.js → case-sensitive-DvBZDISP.js} +1 -1
  95. package/dist/public/assets/channel-wzRnnGj4.js +1 -0
  96. package/dist/public/assets/check-BLuQ2zvV.js +1 -0
  97. package/dist/public/assets/{checkbox-DqQC4GOw.js → checkbox-V0IoPAe3.js} +1 -1
  98. package/dist/public/assets/{chevron-down-CRb8csep.js → chevron-down-DrpHBSgH.js} +1 -1
  99. package/dist/public/assets/chevron-left-BUr-yKA4.js +1 -0
  100. package/dist/public/assets/chevron-right-BU8AeJST.js +1 -0
  101. package/dist/public/assets/{chevron-up-BZk9M0QL.js → chevron-up-CsH_dTwv.js} +1 -1
  102. package/dist/public/assets/chunk-2Q5K7J3B-Wikzf0nz.js +1 -0
  103. package/dist/public/assets/{chunk-32BRIVSS-DT6F-uh7.js → chunk-32BRIVSS-BBQ-hEPd.js} +1 -1
  104. package/dist/public/assets/{chunk-52WLFC77-z8Dc0FTi.js → chunk-52WLFC77-DuzENKI7.js} +1 -1
  105. package/dist/public/assets/{chunk-5FCAYU7R-CTroACwQ.js → chunk-5FCAYU7R-D--noBEp.js} +1 -1
  106. package/dist/public/assets/{chunk-5HE753X5-BiVTlY9X.js → chunk-5HE753X5-BmVsWMWw.js} +1 -1
  107. package/dist/public/assets/{chunk-5JV3BV7I-D5PSiL8d.js → chunk-5JV3BV7I-BPYqpeB9.js} +1 -1
  108. package/dist/public/assets/{chunk-5TONJI2A-Bxf6m0R0.js → chunk-5TONJI2A-DltPJUSb.js} +1 -1
  109. package/dist/public/assets/{chunk-5VM5RSS4-CRkhjuQ5.js → chunk-5VM5RSS4-BfP_UIjE.js} +1 -1
  110. package/dist/public/assets/{chunk-7BUUIJ7U-CIezx2MS.js → chunk-7BUUIJ7U-CY9HO1D_.js} +1 -1
  111. package/dist/public/assets/{chunk-BIQX33UG-4vkcoUCs.js → chunk-BIQX33UG-CYDmLpMo.js} +1 -1
  112. package/dist/public/assets/{chunk-BO2N2NFS-CC8ch_fx.js → chunk-BO2N2NFS-BsdqXBeH.js} +13 -13
  113. package/dist/public/assets/{chunk-C7G6YPKG-CfSnkt3g.js → chunk-C7G6YPKG-BG-T54dx.js} +1 -1
  114. package/dist/public/assets/{chunk-CQNSW5MT-DY98Y9zl.js → chunk-CQNSW5MT-B2t29R4y.js} +1 -1
  115. package/dist/public/assets/{chunk-CYSBUYHQ-BK-vm9jf.js → chunk-CYSBUYHQ-s_ScbNzb.js} +1 -1
  116. package/dist/public/assets/{chunk-EMLP6XTP-DZw4ZtXy.js → chunk-EMLP6XTP-BNzghYiW.js} +1 -1
  117. package/dist/public/assets/{chunk-EX3LRPZG-Bk_23Lji.js → chunk-EX3LRPZG-DOXxHijP.js} +1 -1
  118. package/dist/public/assets/{chunk-FWX5IMBZ-Bcld6_cI.js → chunk-FWX5IMBZ-C-_in5O6.js} +2 -2
  119. package/dist/public/assets/{chunk-HOUHSVGY-CFg4tiNL.js → chunk-HOUHSVGY-BLbx-9Cm.js} +1 -1
  120. package/dist/public/assets/{chunk-ICXQ74PX-D2_LgSCG.js → chunk-ICXQ74PX-CT_UjeBu.js} +1 -1
  121. package/dist/public/assets/{chunk-JG7HCLWE-DvlaYzpW.js → chunk-JG7HCLWE-B0c_hwBR.js} +1 -1
  122. package/dist/public/assets/{chunk-JWPE2WC7-CLgWJdHV.js → chunk-JWPE2WC7-C89PFunr.js} +1 -1
  123. package/dist/public/assets/{chunk-MOJQB5TN-ChUfYEEn.js → chunk-MOJQB5TN-3AJz0oxu.js} +1 -1
  124. package/dist/public/assets/{chunk-MOZMSUNE-BGXPWMly.js → chunk-MOZMSUNE-CfcFCsPH.js} +1 -1
  125. package/dist/public/assets/{chunk-OGEWGWER-CivbNyHY.js → chunk-OGEWGWER-CFjtHjSl.js} +1 -1
  126. package/dist/public/assets/{chunk-OSBZ3O6U-DWgnErEt.js → chunk-OSBZ3O6U-C7Q07ixC.js} +1 -1
  127. package/dist/public/assets/{chunk-PUDLZKDR-B7d6ISYj.js → chunk-PUDLZKDR-BGahXoNe.js} +1 -1
  128. package/dist/public/assets/{chunk-Q4XR5HBZ-91W5kPi9.js → chunk-Q4XR5HBZ-biPgC2C1.js} +1 -1
  129. package/dist/public/assets/{chunk-QBLGF6JB-4F2Itui7.js → chunk-QBLGF6JB-Bd2KWVj9.js} +1 -1
  130. package/dist/public/assets/{chunk-R7FJI6CG-hR8tQLXq.js → chunk-R7FJI6CG-BU13FFbO.js} +1 -1
  131. package/dist/public/assets/{chunk-RYQCIY6F-DycaSFT5.js → chunk-RYQCIY6F-DGsn_2cw.js} +1 -1
  132. package/dist/public/assets/{chunk-U6XO7XAA-CHI_dfPQ.js → chunk-U6XO7XAA-DEpEBtwM.js} +1 -1
  133. package/dist/public/assets/{chunk-V7JOEXUC-Bw7Trikr.js → chunk-V7JOEXUC-DGxur8ZW.js} +1 -1
  134. package/dist/public/assets/chunk-VAUOI2AC-DpeuLCbu.js +1 -0
  135. package/dist/public/assets/{chunk-VR4S4FIN-td2s33cT.js → chunk-VR4S4FIN-DOd4oQIX.js} +1 -1
  136. package/dist/public/assets/{chunk-WYO6CB5R-BL3R8kzV.js → chunk-WYO6CB5R-Dj0234fq.js} +2 -2
  137. package/dist/public/assets/chunk-XXDRQBXY-CZqAAXUK.js +1 -0
  138. package/dist/public/assets/{chunk-YOTPTUD7-Cg9yDbvj.js → chunk-YOTPTUD7-C30yZrh0.js} +1 -1
  139. package/dist/public/assets/{chunk-ZGVPDNZ5-DdQ8WlYq.js → chunk-ZGVPDNZ5-YEqz23C6.js} +1 -1
  140. package/dist/public/assets/{chunk-ZIRB5QZD-DuiWBTeF.js → chunk-ZIRB5QZD-D_Sq2Pbf.js} +1 -1
  141. package/dist/public/assets/classDiagram-OUVF2IWQ-jai99ZcL.js +1 -0
  142. package/dist/public/assets/classDiagram-v2-EOCWNBFH-B6bv8jQ6.js +1 -0
  143. package/dist/public/assets/client-version-BCNpEu2n.js +1 -0
  144. package/dist/public/assets/{cm-theme-CUwlOcHl.js → cm-theme-BouxP4zt.js} +1 -1
  145. package/dist/public/assets/code-highlighter-impl-BYAPyAoO.js +144 -0
  146. package/dist/public/assets/comment-chips-D31Mefsd.js +5 -0
  147. package/dist/public/assets/{config-context-3DA5oQRi.js → config-context-D-k7Feh7.js} +1 -1
  148. package/dist/public/assets/config-provider-BJJQMCvL.js +5 -0
  149. package/dist/public/assets/{cose-bilkent-JH36ORCC-YCEFr4ip.js → cose-bilkent-JH36ORCC-CE39J3kc.js} +1 -1
  150. package/dist/public/assets/cynefin-VYW2F7L2-DKtMkKMv.js +1 -0
  151. package/dist/public/assets/{cynefinDiagram-TSTJHNR4-BRxY_0dy.js → cynefinDiagram-TSTJHNR4-DrYykUwe.js} +1 -1
  152. package/dist/public/assets/{dagre-4yTvJ5bN.js → dagre-D8D-4Y8L.js} +1 -1
  153. package/dist/public/assets/{dagre-VKFMJZFB-BTPOxYfv.js → dagre-VKFMJZFB-BBs4IH3J.js} +1 -1
  154. package/dist/public/assets/{diagram-FQU43EPY-C6lvEDUr.js → diagram-FQU43EPY-B0s2m7E-.js} +1 -1
  155. package/dist/public/assets/{diagram-G47NLZAW-BHMtTNZp.js → diagram-G47NLZAW-BbP-tBhd.js} +1 -1
  156. package/dist/public/assets/{diagram-NH7WQ7WH-CaxSgclq.js → diagram-NH7WQ7WH-kp48H_e8.js} +1 -1
  157. package/dist/public/assets/{diagram-OA4YK3LP-C_1H_cmz.js → diagram-OA4YK3LP-Sh8MTEDH.js} +1 -1
  158. package/dist/public/assets/{diagram-WEI45ONY-hy5nz4b2.js → diagram-WEI45ONY-CHaTUq63.js} +1 -1
  159. package/dist/public/assets/{dialog-DwFomKjP.js → dialog-C6agJYxQ.js} +1 -1
  160. package/dist/public/assets/{dist-CJtNQVui.js → dist-10-BopoT.js} +1 -1
  161. package/dist/public/assets/{dist-Cz7Q9WAs.js → dist-B5Efgy8u.js} +1 -1
  162. package/dist/public/assets/{dist-KXQQa8Xt.js → dist-BBHnhLg7.js} +1 -1
  163. package/dist/public/assets/{dist-BHX9GuTC.js → dist-BLMHNKEA.js} +1 -1
  164. package/dist/public/assets/{dist-C7PQBily.js → dist-BMhliXXv.js} +1 -1
  165. package/dist/public/assets/{dist-DdN4_oB-.js → dist-BffqGJEV.js} +1 -1
  166. package/dist/public/assets/{dist-DgD72kci.js → dist-BzlU6YYd.js} +1 -1
  167. package/dist/public/assets/{dist-HbUc9U1a.js → dist-CgtlFWkf.js} +1 -1
  168. package/dist/public/assets/{dist-AhKSYQhE2.js → dist-ChcSYE9s.js} +1 -1
  169. package/dist/public/assets/{dist-BX-8uxZE.js → dist-DFRu_FnY.js} +1 -1
  170. package/dist/public/assets/{dist-CdZbZpjt.js → dist-DNKLFEzM.js} +1 -1
  171. package/dist/public/assets/dist-SMRIgJ7J2.js +579 -0
  172. package/dist/public/assets/{dist-aEzrjz-4.js → dist-SYn7UuDc.js} +1 -1
  173. package/dist/public/assets/{dist-CFDOSoEm.js → dist-e-KRYl_U.js} +1 -1
  174. package/dist/public/assets/{doc-paths-BUecntHC.js → doc-paths--BtzZubq.js} +1 -1
  175. package/dist/public/assets/{documents-events-KbhMdUCf.js → documents-events-CN6qju_L.js} +1 -1
  176. package/dist/public/assets/{download-QOlmqXQ8.js → download-Bq4sKAdj.js} +1 -1
  177. package/dist/public/assets/{dropdown-menu-DRytYgB4.js → dropdown-menu-BhMtMvZp.js} +1 -1
  178. package/dist/public/assets/{ebnfDiagram-CCIWWBDH-CSOwp-KN.js → ebnfDiagram-CCIWWBDH-C5sFbOCC.js} +1 -1
  179. package/dist/public/assets/{erDiagram-Q63AITRT-CulC3etm.js → erDiagram-Q63AITRT-IzYkNb6y.js} +1 -1
  180. package/dist/public/assets/eventmodeling-45OFAUF4-DYp_ccag.js +1 -0
  181. package/dist/public/assets/{eye-CArKS_Md.js → eye-DYUvwA0Z.js} +1 -1
  182. package/dist/public/assets/{field-iFofWrdC.js → field-Ds_anNod.js} +1 -1
  183. package/dist/public/assets/{file-tree-adapter-CqEuXZ5y.js → file-tree-adapter-F3EuvfSm.js} +1 -1
  184. package/dist/public/assets/{file-tree-utils-BsQPHRxA.js → file-tree-utils-D09ASMfu.js} +1 -1
  185. package/dist/public/assets/flowDiagram-23GEKE2U-BoiEI6fi.js +1 -0
  186. package/dist/public/assets/{folder-DxrU2PLH.js → folder-Cnftw7jd.js} +1 -1
  187. package/dist/public/assets/{folder-config-api-CM5ZFHjG.js → folder-config-api-Dhk4j3NE.js} +1 -1
  188. package/dist/public/assets/{folder-open-ee990ToL.js → folder-open-DoQalFip.js} +1 -1
  189. package/dist/public/assets/{follow-file-ClrF9UKc.js → follow-file-BYg1kvW1.js} +1 -1
  190. package/dist/public/assets/{ganttDiagram-NO4QXBWP-iVPMtR6h.js → ganttDiagram-NO4QXBWP-PZlgotcv.js} +1 -1
  191. package/dist/public/assets/gherkin-CMIKyHk7.js +1 -0
  192. package/dist/public/assets/{git-branch-B0WeYwW-.js → git-branch-BWBPTGqT.js} +1 -1
  193. package/dist/public/assets/gitGraph-TEB2WS4Q-afDp1_T4.js +1 -0
  194. package/dist/public/assets/{gitGraphDiagram-IHSO6WYX-DdI0uf23.js → gitGraphDiagram-IHSO6WYX-CnOfuKSB.js} +1 -1
  195. package/dist/public/assets/{globals-BbucswUi.js → globals-C-kRTFCu.js} +2 -2
  196. package/dist/public/assets/globals-D9Q1kf3c.css +1 -0
  197. package/dist/public/assets/{graphlib-2sje7ygs.js → graphlib-fvEEtLhE.js} +1 -1
  198. package/dist/public/assets/{hash-CDGtqqEo.js → hash-BZXl_HqD.js} +1 -1
  199. package/dist/public/assets/{highlighted-body-OFNGDK62-nVG7xLpg.js → highlighted-body-OFNGDK62-BaYzQjQZ.js} +1 -1
  200. package/dist/public/assets/html-void-elements-Bkr32DGT.js +1 -0
  201. package/dist/public/assets/i18n-B-su7WGL.js +1 -0
  202. package/dist/public/assets/index-zKi6jfeI.js +2097 -0
  203. package/dist/public/assets/info-DKCQHKI2-CrDaHnZ5.js +1 -0
  204. package/dist/public/assets/{info-BnJuC0vW.js → info-Jj1j2YxC.js} +1 -1
  205. package/dist/public/assets/{infoDiagram-FWYZ7A6U-CCLCXbok.js → infoDiagram-FWYZ7A6U-Dvre6R3A.js} +1 -1
  206. package/dist/public/assets/{input-group-BgDCDWUR.js → input-group-CFpex2uW.js} +1 -1
  207. package/dist/public/assets/{ishikawaDiagram-FXEZZL3T-DYNfj8DM.js → ishikawaDiagram-FXEZZL3T-CGbM4PcO.js} +1 -1
  208. package/dist/public/assets/{journeyDiagram-5HDEW3XC-D3IdBiiM.js → journeyDiagram-5HDEW3XC-DE9Pf5_r.js} +1 -1
  209. package/dist/public/assets/{kanban-definition-HUTT4EX6-CF_ZN-jM.js → kanban-definition-HUTT4EX6-jPGc8KH6.js} +1 -1
  210. package/dist/public/assets/lib-BHGXbMkc.js +9 -0
  211. package/dist/public/assets/lib-DcrRfjuF.js +29 -0
  212. package/dist/public/assets/{line-BA7emVey.js → line-BJ5gC8Dy.js} +1 -1
  213. package/dist/public/assets/{linear-CUFA2OWO.js → linear-EWMuktsp.js} +1 -1
  214. package/dist/public/assets/{lint-config-client-Ctx6XxuK.js → lint-config-client-DMsg3XE_.js} +1 -1
  215. package/dist/public/assets/list-plus-IYEFhKGU.js +1 -0
  216. package/dist/public/assets/loader-circle-Coob8S41.js +1 -0
  217. package/dist/public/assets/{local-menu-action-bus-iy6v2osW.js → local-menu-action-bus-DLozq_c4.js} +1 -1
  218. package/dist/public/assets/{map-DbAr_xa0.js → map-DuXZfTxZ.js} +1 -1
  219. package/dist/public/assets/{markdownlint-rule-browser-D9sFjZMg.js → markdownlint-rule-browser-ClWCRE-k.js} +1 -1
  220. package/dist/public/assets/mascot-outline-CtS592mc.js +1 -0
  221. package/dist/public/assets/mermaid-GHXKKRXX-Dif_zbtJ.js +1 -0
  222. package/dist/public/assets/{mermaid-parser.core-B8FUrn7y.js → mermaid-parser.core-BVNQnpl1.js} +2 -2
  223. package/dist/public/assets/{mermaid.core-gcfl0bT0.js → mermaid.core-T6rBx5Mh.js} +3 -3
  224. package/dist/public/assets/messages-08fVqpq6.js +1 -0
  225. package/dist/public/assets/messages-9TiHLKyB.js +1 -0
  226. package/dist/public/assets/messages-B6_-Jcig.js +1 -0
  227. package/dist/public/assets/messages-Bb2E22t5.js +1 -0
  228. package/dist/public/assets/messages-CN01LMHY.js +1 -0
  229. package/dist/public/assets/messages-DJJz1KAA.js +1 -0
  230. package/dist/public/assets/messages-DNrStzR0.js +1 -0
  231. package/dist/public/assets/messages-DcFADkmi.js +1 -0
  232. package/dist/public/assets/messages-Djq--rqJ.js +1 -0
  233. package/dist/public/assets/messages-DoUQmGUb.js +1 -0
  234. package/dist/public/assets/messages-bfwA7F7-.js +1 -0
  235. package/dist/public/assets/{mindmap-definition-LN4V7U3C-9ySd_DkR.js → mindmap-definition-LN4V7U3C-CumX92oT.js} +1 -1
  236. package/dist/public/assets/minus-DPAjfzCa.js +1 -0
  237. package/dist/public/assets/{miss-dialog-store-B3cHkf8G.js → miss-dialog-store--ihxgGwV.js} +1 -1
  238. package/dist/public/assets/navigation-targets-DdXUwF8B.js +1 -0
  239. package/dist/public/assets/{now-B4vxsI1S.js → now-z5ELVWrb.js} +1 -1
  240. package/dist/public/assets/{open-managed-artifact-tab-DJGfoyLt.js → open-managed-artifact-tab-cqLHNiqt.js} +1 -1
  241. package/dist/public/assets/{ordinal-Cfxeoxe-.js → ordinal-BXAn9evv.js} +1 -1
  242. package/dist/public/assets/packet-7NZHBO7P-DbOy7CAU.js +1 -0
  243. package/dist/public/assets/{panel-right-open-Cc56I_GE.js → panel-right-open-BhUOm1Eq.js} +1 -1
  244. package/dist/public/assets/{paperclip-D7KMFbO9.js → paperclip-9gdTBktj.js} +1 -1
  245. package/dist/public/assets/{pegDiagram-2B236MQR-cNCSiNUP.js → pegDiagram-2B236MQR-CTdEF3cw.js} +1 -1
  246. package/dist/public/assets/{pending-receive-nav-store-CR3AYTQU.js → pending-receive-nav-store-D_Yd5Kkr.js} +1 -1
  247. package/dist/public/assets/pie-RZYD4A2V-Bj39C3bk.js +1 -0
  248. package/dist/public/assets/{pieDiagram-ENE6RG2P-C2bxi6W1.js → pieDiagram-ENE6RG2P-DEG5bAYb.js} +1 -1
  249. package/dist/public/assets/{project-paths--7l9Mqe-.js → project-paths-BcFu3O1A.js} +1 -1
  250. package/dist/public/assets/{prop-types-CC3zyaqH.js → prop-types-C25REwA7.js} +1 -1
  251. package/dist/public/assets/{quadrantDiagram-ABIIQ3AL-C8AftH1G.js → quadrantDiagram-ABIIQ3AL-DqmV_ECa.js} +1 -1
  252. package/dist/public/assets/radar-I7S5WNFK-8Y-4N9H-.js +1 -0
  253. package/dist/public/assets/railroad-3IZDKUUU-DbyANRn-.js +1 -0
  254. package/dist/public/assets/railroad-abnf-AHOZXSZD-CelDcVQi.js +1 -0
  255. package/dist/public/assets/railroad-ebnf-EBAXGLYW-GO9BaS2J.js +1 -0
  256. package/dist/public/assets/railroad-peg-LSFZ7HO6-DINlAt_U.js +1 -0
  257. package/dist/public/assets/{railroadDiagram-RFXS5EU6-CZh61tJk.js → railroadDiagram-RFXS5EU6-D1VOXkhy.js} +1 -1
  258. package/dist/public/assets/receive-store-DJ3Z6bz8.js +2 -0
  259. package/dist/public/assets/{refresh-cw-DGLnzhho.js → refresh-cw-REpEMEB2.js} +1 -1
  260. package/dist/public/assets/{requirementDiagram-TGXJPOKE-CQLu3M38.js → requirementDiagram-TGXJPOKE-CWGls4-H.js} +1 -1
  261. package/dist/public/assets/{sankeyDiagram-HTMAVEWB-Bjus_sTX.js → sankeyDiagram-HTMAVEWB-D00ONs8l.js} +1 -1
  262. package/dist/public/assets/schema-fields-view-intent-CgNFg8m7.js +1 -0
  263. package/dist/public/assets/{select-BU4xT6VN.js → select-CRztynyQ.js} +1 -1
  264. package/dist/public/assets/{selection-context-DT0NuiRB.js → selection-context-CEsFBd_P.js} +1 -1
  265. package/dist/public/assets/{sequenceDiagram-DBY2YBRQ-BR7Ay_cV.js → sequenceDiagram-DBY2YBRQ-BBwn6ouJ.js} +1 -1
  266. package/dist/public/assets/{sizeCapture-X5ZJPWSS-B6c4PqMD.js → sizeCapture-X5ZJPWSS-eBkr-Eez.js} +1 -1
  267. package/dist/public/assets/skill-actions-Cawlws49.js +2 -0
  268. package/dist/public/assets/{skill-scope-DEvpbPXx.js → skill-scope-DG4fOw_k.js} +1 -1
  269. package/dist/public/assets/{skills-api-BpuwZVN9.js → skills-api-Djw9cUyq.js} +1 -1
  270. package/dist/public/assets/{square-pen-CEIus1aL.js → square-pen-D3oI-YUs.js} +1 -1
  271. package/dist/public/assets/{src-BFmudBKQ.js → src-CJ94lzX3.js} +1 -1
  272. package/dist/public/assets/{src-_qYX43MU.js → src-hWhZz0ry.js} +2 -2
  273. package/dist/public/assets/{stateDiagram-2N3HPSRC-DJmlM8IW.js → stateDiagram-2N3HPSRC-CuLDPCky.js} +1 -1
  274. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-_9elEbD9.js +1 -0
  275. package/dist/public/assets/{swimlanes-5IMT3BWC-D8ijXWBf.js → swimlanes-5IMT3BWC-Bwx6YXUK.js} +2 -2
  276. package/dist/public/assets/swimlanesDiagram-G3AALYLV-B_LHFsm2.js +8 -0
  277. package/dist/public/assets/{tag-pill-input-D_VrZ0_G.js → tag-pill-input-Ckot4BtE.js} +1 -1
  278. package/dist/public/assets/{target-navigation-intent-BhYFP54I.js → target-navigation-intent-DgeN3LEN.js} +1 -1
  279. package/dist/public/assets/{telemetry-impl-oH89uFEx.js → telemetry-impl-CQgbydAH.js} +2 -2
  280. package/dist/public/assets/{telemetry-startup-DNYyG34o.js → telemetry-startup-BJn8ZOlL.js} +1 -1
  281. package/dist/public/assets/terminal-DQu0Rduz.js +1 -0
  282. package/dist/public/assets/terminal-command-events-7vlkZt-0.js +1 -0
  283. package/dist/public/assets/{terminal-launch-events-BBTNOGCs.js → terminal-launch-events-8IGUYuVb.js} +1 -1
  284. package/dist/public/assets/{terminal-telemetry-L6O0yS3Y.js → terminal-telemetry-Bup2OV8O.js} +1 -1
  285. package/dist/public/assets/text-viewer-languages-DVJ3G2Gh.js +2 -0
  286. package/dist/public/assets/thread-client-B3j1-NNf.js +1 -0
  287. package/dist/public/assets/{timeline-definition-FHXFAJF6-DwBMj07Z.js → timeline-definition-FHXFAJF6-DecPknli.js} +1 -1
  288. package/dist/public/assets/{trash-2-Ccq_llrY.js → trash-2-XqjnGI2m.js} +1 -1
  289. package/dist/public/assets/treeView-QDETBFTQ-BWkcCjcr.js +1 -0
  290. package/dist/public/assets/treemap-6X3UGDF4-Bz0LgCcV.js +1 -0
  291. package/dist/public/assets/{triangle-alert-V8YoC6ss.js → triangle-alert-CA0Kx2Dz.js} +1 -1
  292. package/dist/public/assets/{typing-burst-detector-BTwaT6Tt.js → typing-burst-detector-Bcxs6e1d.js} +3 -3
  293. package/dist/public/assets/{undo-2-bYFSgQwb.js → undo-2-CtBobs44.js} +1 -1
  294. package/dist/public/assets/uninstall-rbukHZUq.js +1 -0
  295. package/dist/public/assets/{use-activity-panel-DENpfNoH.js → use-activity-panel-ov91fgMH.js} +1 -1
  296. package/dist/public/assets/{use-collab-url-ktBqBALq.js → use-collab-url-1XQxLP3g.js} +1 -1
  297. package/dist/public/assets/{use-live-xterm-theme-Bz9dSt4p.js → use-live-xterm-theme-3-VRWhHM.js} +1 -1
  298. package/dist/public/assets/{use-open-skill-Bq2DfJ8n.js → use-open-skill-BNfVgdFz.js} +1 -1
  299. package/dist/public/assets/use-settings-route-BT3ZJmxN.js +1 -0
  300. package/dist/public/assets/{use-skill-directory-D5XiyMts.js → use-skill-directory-CtN1niVI.js} +1 -1
  301. package/dist/public/assets/{use-skill-origin-BmEyp0Uh.js → use-skill-origin-DQf3raAN.js} +1 -1
  302. package/dist/public/assets/{use-skills-0q5Zcw-J.js → use-skills-BrkAxYWH.js} +1 -1
  303. package/dist/public/assets/{use-terminal-enabled-DUjSxVhq.js → use-terminal-enabled-EeeyWLnr.js} +1 -1
  304. package/dist/public/assets/{use-timeline-entry-diff-CpB81ux4.js → use-timeline-entry-diff-t4CQRU4t.js} +4 -4
  305. package/dist/public/assets/use-workspace-J_BwpJRd.js +1 -0
  306. package/dist/public/assets/{vennDiagram-L72KCM5P-DZxwOiUn.js → vennDiagram-L72KCM5P-Bg5DY_Cn.js} +1 -1
  307. package/dist/public/assets/wardley-OPB4EBWU-Bx1-jXoM.js +1 -0
  308. package/dist/public/assets/{wardleyDiagram-EHGQE667-D44Ff-nh.js → wardleyDiagram-EHGQE667-DJ8tw7ym.js} +1 -1
  309. package/dist/public/assets/workspace-paths-DokE-xT8.js +1 -0
  310. package/dist/public/assets/{wrench-D8b4qpCM.js → wrench-CNmrVb8V.js} +1 -1
  311. package/dist/public/assets/x-OtqSgHKA.js +1 -0
  312. package/dist/public/assets/{xychartDiagram-FW5EYKEG-B_4MyxsA.js → xychartDiagram-FW5EYKEG-7eWDzOaJ.js} +1 -1
  313. package/dist/public/index.html +158 -129
  314. package/dist/public/uninstall.html +19 -15
  315. package/dist/{repair-launch-json-SpkGaIbQ.mjs → repair-launch-json-Ca96yug3.mjs} +2 -2
  316. package/dist/{repair-mcp-configs-6yfv7PDz.mjs → repair-mcp-configs-BmeaoniW.mjs} +2 -2
  317. package/dist/repair-skills-BxDCyrpW.mjs +1 -0
  318. package/dist/{repair-skills-Qa8asXi-.mjs → repair-skills-xb6EtJ_i.mjs} +2 -2
  319. package/dist/schemas/v0/config.user.schema.json +38 -0
  320. package/dist/server-lock-CSAtOeDZ.mjs +1 -0
  321. package/dist/{server-lock-DsDrc4RU.mjs → server-lock-D7MC1H2C.mjs} +2 -2
  322. package/dist/{skill-teardown-lrVGmvNz.mjs → skill-teardown-Bp4PXaVu.mjs} +2 -2
  323. package/dist/{sleep-ByqzSHar.mjs → sleep-DVOInM4H.mjs} +5 -5
  324. package/dist/src-Cz6nVs_k.mjs +1 -0
  325. package/dist/src-D8NOF4IF.mjs +2032 -0
  326. package/dist/{src-BU5VUa22.mjs → src-DOtg_Yy3.mjs} +6 -6
  327. package/dist/{src-azBs1EPY.mjs → src-DevJlbVv.mjs} +127 -127
  328. package/dist/start-Bdmc9Zwo.mjs +1 -0
  329. package/dist/{start-CfaFUwr3.mjs → start-DjEQzpUP.mjs} +3 -3
  330. package/dist/{write-project-skill-g7odZSI2.mjs → write-project-skill-CstNID_e.mjs} +4 -4
  331. package/package.json +4 -4
  332. package/dist/constants-DyV618jN.mjs +0 -2
  333. package/dist/fs-traced-WMTb98_i.mjs +0 -1
  334. package/dist/git-handle-CtdWfsLv.mjs +0 -1
  335. package/dist/init-BpyLNGZy.mjs +0 -1
  336. package/dist/loader-BXM73qNg.mjs +0 -1
  337. package/dist/md-manager-C54e9m9K.mjs +0 -2
  338. package/dist/preview-CKzgyv7F.mjs +0 -1
  339. package/dist/public/assets/BugReportHistory-C_4-NQ-j.js +0 -1
  340. package/dist/public/assets/ChangedOutsideBadge-DCLuBScT.js +0 -1
  341. package/dist/public/assets/CodeMirrorPropInput-nxbfw9bv.js +0 -3
  342. package/dist/public/assets/DocumentContext-CfyZrOH1.js +0 -38
  343. package/dist/public/assets/FeedbackForm-CZ6u31dO.js +0 -1
  344. package/dist/public/assets/ManagedArtifactProperties-4_S8d2s7.js +0 -1
  345. package/dist/public/assets/ManagedArtifactProperties-B8dqEG77.js +0 -2
  346. package/dist/public/assets/SchemaConfigEditor-C3FA7iH5.js +0 -1
  347. package/dist/public/assets/SessionsHost-DYHLsEW-.js +0 -2
  348. package/dist/public/assets/SettingsDialogBody-G6-YBwQX.js +0 -12
  349. package/dist/public/assets/SkillToolbarControls-DtovBTF2.js +0 -1
  350. package/dist/public/assets/SourceEditor-Dr9urM9j.js +0 -1
  351. package/dist/public/assets/TerminalPanel-BqsEcNCi.js +0 -146
  352. package/dist/public/assets/ThreadView-lm-6Edan.js +0 -6
  353. package/dist/public/assets/agent-visibility-BxHoyzki.js +0 -1
  354. package/dist/public/assets/architecture-TIHT7OUA-Bu3B2Eu7.js +0 -1
  355. package/dist/public/assets/arrow-up-right-Gp4MuO-g.js +0 -1
  356. package/dist/public/assets/auth-state-cache-BtIe91M8.js +0 -11
  357. package/dist/public/assets/channel-BBYqtvcN.js +0 -1
  358. package/dist/public/assets/check-DLRoQSSY.js +0 -1
  359. package/dist/public/assets/chevron-left-BRFq0qcJ.js +0 -1
  360. package/dist/public/assets/chevron-right-BjiB8LDf.js +0 -1
  361. package/dist/public/assets/chunk-2Q5K7J3B-DeGCwTid.js +0 -1
  362. package/dist/public/assets/chunk-VAUOI2AC-B4WVYMGW.js +0 -1
  363. package/dist/public/assets/chunk-XXDRQBXY-DjPNLLex.js +0 -1
  364. package/dist/public/assets/classDiagram-OUVF2IWQ-CusZeKDE.js +0 -1
  365. package/dist/public/assets/classDiagram-v2-EOCWNBFH-3Dd_UHkU.js +0 -1
  366. package/dist/public/assets/client-version-CyS4Akwb.js +0 -1
  367. package/dist/public/assets/comment-chips-Dbrqmzd1.js +0 -7
  368. package/dist/public/assets/config-provider-DdEnUd2F.js +0 -4
  369. package/dist/public/assets/cynefin-VYW2F7L2-Dh2yc-Yt.js +0 -1
  370. package/dist/public/assets/dist-P5PuqHtu2.js +0 -586
  371. package/dist/public/assets/eventmodeling-45OFAUF4-CoqTTBqG.js +0 -1
  372. package/dist/public/assets/flowDiagram-23GEKE2U-BKkbdW0r.js +0 -1
  373. package/dist/public/assets/gitGraph-TEB2WS4Q-D2tde3MB.js +0 -1
  374. package/dist/public/assets/globals-Bl3fKb9V.css +0 -1
  375. package/dist/public/assets/index-CgjnaYaj.js +0 -2092
  376. package/dist/public/assets/info-DKCQHKI2-DIQGY0RW.js +0 -1
  377. package/dist/public/assets/lib-CtlgmvnR.js +0 -29
  378. package/dist/public/assets/loader-circle-B0OUuKph.js +0 -1
  379. package/dist/public/assets/mermaid-GHXKKRXX-uJrCvmwj.js +0 -1
  380. package/dist/public/assets/minus-CKcpBpdR.js +0 -1
  381. package/dist/public/assets/navigation-targets-BTpBtlo2.js +0 -1
  382. package/dist/public/assets/packet-7NZHBO7P-C6h6PguP.js +0 -1
  383. package/dist/public/assets/pie-RZYD4A2V-BgsL62qC.js +0 -1
  384. package/dist/public/assets/radar-I7S5WNFK-2Fukjsh1.js +0 -1
  385. package/dist/public/assets/railroad-3IZDKUUU-BXQstaOW.js +0 -1
  386. package/dist/public/assets/railroad-abnf-AHOZXSZD-D4DJxFB6.js +0 -1
  387. package/dist/public/assets/railroad-ebnf-EBAXGLYW-B9wL5Mgq.js +0 -1
  388. package/dist/public/assets/railroad-peg-LSFZ7HO6-TRaMzMt0.js +0 -1
  389. package/dist/public/assets/receive-store-Dc_eiYW6.js +0 -2
  390. package/dist/public/assets/schema-fields-view-intent-Df0KnOO8.js +0 -1
  391. package/dist/public/assets/skill-actions-BlJ8nSSo.js +0 -2
  392. package/dist/public/assets/stateDiagram-v2-6OUMAXLB-DJeEhrn3.js +0 -1
  393. package/dist/public/assets/swimlanesDiagram-G3AALYLV-D5vkX5fS.js +0 -8
  394. package/dist/public/assets/text-viewer-languages-DEjz8Rlz.js +0 -2
  395. package/dist/public/assets/thread-client-BVh92ozO.js +0 -1
  396. package/dist/public/assets/treeView-QDETBFTQ-DItjR5Rl.js +0 -1
  397. package/dist/public/assets/treemap-6X3UGDF4-D1JSLPGs.js +0 -1
  398. package/dist/public/assets/uninstall-TDyS8cYc.js +0 -1
  399. package/dist/public/assets/use-settings-route-B10M97I7.js +0 -1
  400. package/dist/public/assets/use-workspace-BVw2SUvV.js +0 -1
  401. package/dist/public/assets/wardley-OPB4EBWU-BEy33__G.js +0 -1
  402. package/dist/public/assets/x-B3zGPHCO.js +0 -1
  403. package/dist/repair-skills-D0WSZUFt.mjs +0 -1
  404. package/dist/server-lock-BoNixvAi.mjs +0 -1
  405. package/dist/src-B-TXZyjI.mjs +0 -1
  406. package/dist/src-YfpQ2LX0.mjs +0 -2030
  407. package/dist/start-VOlPJi60.mjs +0 -1
  408. /package/dist/public/assets/{ActivityPanelDiffView-DZrMHlZH.js → ActivityPanelDiffView-CPRjA-1R.js} +0 -0
  409. /package/dist/public/assets/{SkillModeBanner-DFgrdWyf.js → SkillModeBanner-DzwdRe8-.js} +0 -0
  410. /package/dist/public/assets/{__vite-browser-external-CL4duhlG.js → __vite-browser-external-neOsIWyW.js} +0 -0
  411. /package/dist/public/assets/{agent-presence-C8KjkxgZ.js → agent-presence-1vhA03qX.js} +0 -0
  412. /package/dist/public/assets/{array-DRGYhAwX.js → array-C_NrAdxI.js} +0 -0
  413. /package/dist/public/assets/{asset-dispatch-O9x3rXhj.js → asset-dispatch-qrq0uplE.js} +0 -0
  414. /package/dist/public/assets/{auth-prompt-store-DQ_HcDxh.js → auth-prompt-store-CcGlao2A.js} +0 -0
  415. /package/dist/public/assets/{badge-CnYDYmI5.js → badge-BVZ2oTto.js} +0 -0
  416. /package/dist/public/assets/{chunk-KEIR6QF5-CTDrJ2_V.js → chunk-KEIR6QF5-CUEbS00h.js} +0 -0
  417. /package/dist/public/assets/{chunk-Y2CYZVJY-WQQLMo_s.js → chunk-Y2CYZVJY-DD_NReQM.js} +0 -0
  418. /package/dist/public/assets/{clike-BfpXCH0g.js → clike-fkc4XEp3.js} +0 -0
  419. /package/dist/public/assets/{clipboard-adapter-DPkNOslT.js → clipboard-adapter-BTORRh1U.js} +0 -0
  420. /package/dist/public/assets/{colors-BY0RBIvp.js → colors-CQ-pUTip.js} +0 -0
  421. /package/dist/public/assets/{copilot-CuzHDCzI.js → copilot-CHW7txhf.js} +0 -0
  422. /package/dist/public/assets/{createLucideIcon-BbgVV4EV.js → createLucideIcon-BbftclCc.js} +0 -0
  423. /package/dist/public/assets/{cursor-W0skD8YU.js → cursor-lV4EgEIO.js} +0 -0
  424. /package/dist/public/assets/{cytoscape.esm-Ck6hca6m.js → cytoscape.esm-BFZHbRez.js} +0 -0
  425. /package/dist/public/assets/{defaultLocale-C9lDPH35.js → defaultLocale-B_FbTTbl.js} +0 -0
  426. /package/dist/public/assets/{desktop-bridge-types-BwR5S9HF.js → desktop-bridge-types-D2lP_C4_.js} +0 -0
  427. /package/dist/public/assets/{diff-CvjWTdgS.js → diff-C18NQUVj.js} +0 -0
  428. /package/dist/public/assets/{dist-zYQJXuRH.js → dist-B7yUMXxJ.js} +0 -0
  429. /package/dist/public/assets/{dist-CTHTGkF4.js → dist-BPSCL3GQ.js} +0 -0
  430. /package/dist/public/assets/{dist-DIZJMUWy.js → dist-BWQ444Pw.js} +0 -0
  431. /package/dist/public/assets/{dist-CpRBr-Ct.js → dist-CRq7u4Aw.js} +0 -0
  432. /package/dist/public/assets/{dist-DmEZHXvB.js → dist-CrwFIHTH.js} +0 -0
  433. /package/dist/public/assets/{documents-fetch-DK-kdvYE.js → documents-fetch-BWxQ88TF.js} +0 -0
  434. /package/dist/public/assets/{external-link-COF7NUCm.js → external-link-BkZU8kDC.js} +0 -0
  435. /package/dist/public/assets/{file-tree-rename-validation-DEz_ryBu.js → file-tree-rename-validation-CHpqbXz_.js} +0 -0
  436. /package/dist/public/assets/{form-CGbOgaUs.js → form-uH0T1Qcu.js} +0 -0
  437. /package/dist/public/assets/{format-CFFWVvag.js → format-CqpPD7fR.js} +0 -0
  438. /package/dist/public/assets/{go-D-9nxjMR.js → go-BZZXdOuI.js} +0 -0
  439. /package/dist/public/assets/{init-Dpr8Tcj2.js → init-DtLQcSuO.js} +0 -0
  440. /package/dist/public/assets/{input-CtKG6a5B.js → input-CX1W4pdJ.js} +0 -0
  441. /package/dist/public/assets/{isObject-B_BLuINR.js → isObject-CJkdVXYX.js} +0 -0
  442. /package/dist/public/assets/{katex-7OG0ksww.js → katex-BE6VA85g.js} +0 -0
  443. /package/dist/public/assets/{libesm-Dcsy_--i.js → libesm-DO519K1n.js} +0 -0
  444. /package/dist/public/assets/{lint-plugin-meta-BnniPb1r.js → lint-plugin-meta-BUTpI0_4.js} +0 -0
  445. /package/dist/public/assets/{lru-string-cache-jJ5hyYK1.js → lru-string-cache-a0Cuo2yI.js} +0 -0
  446. /package/dist/public/assets/{lua-qAotk3Jg.js → lua-CFX1gUBY.js} +0 -0
  447. /package/dist/public/assets/{markdownit-DoX6x6DK.js → markdownit-CIgVFnWs.js} +0 -0
  448. /package/dist/public/assets/{mcp-consent-store-Dz4H-8gV.js → mcp-consent-store-Dxs6JZLB.js} +0 -0
  449. /package/dist/public/assets/{min-CCEG0l64.js → min-DCU_CWsT.js} +0 -0
  450. /package/dist/public/assets/{overlay-layers-CBGNHxJK.js → overlay-layers-AaBEWClb.js} +0 -0
  451. /package/dist/public/assets/{panel-UxAkffLp.js → panel-9S5Pf2VO.js} +0 -0
  452. /package/dist/public/assets/{panzoom.es-H6kNXvjN.js → panzoom.es-DMxgpZcZ.js} +0 -0
  453. /package/dist/public/assets/{parse-api-error-BFe1cdS7.js → parse-api-error-DkZQPwyl.js} +0 -0
  454. /package/dist/public/assets/{path-56QyJhyg.js → path-DIlZIGue.js} +0 -0
  455. /package/dist/public/assets/{pdf-CYHvv2Oq.js → pdf-Cy3gQIcO.js} +0 -0
  456. /package/dist/public/assets/{pdf.worker-B8Ju19hh.js → pdf.worker-BdzhldWt.js} +0 -0
  457. /package/dist/public/assets/{perl-E4P7BXaC.js → perl-BgmVruQ7.js} +0 -0
  458. /package/dist/public/assets/{properties-DXHbGwrb.js → properties-BdJtqVJl.js} +0 -0
  459. /package/dist/public/assets/{r-DCDstkyG.js → r-fecYfHVx.js} +0 -0
  460. /package/dist/public/assets/{rough.esm-DE_lJ5Ge.js → rough.esm-COSPye1d.js} +0 -0
  461. /package/dist/public/assets/{ruby-DeKk3LV3.js → ruby-D4ycjIcU.js} +0 -0
  462. /package/dist/public/assets/{share-metadata-rows-B1YjvGbL.js → share-metadata-rows-Btw33WmH.js} +0 -0
  463. /package/dist/public/assets/{shell-BRtU48Yb.js → shell-S4EbCTPW.js} +0 -0
  464. /package/dist/public/assets/{skeleton-DS8zjX9Q.js → skeleton-DDVOgHvc.js} +0 -0
  465. /package/dist/public/assets/{sortable.esm-BT6d9PDz.js → sortable.esm-CRNKDjgg.js} +0 -0
  466. /package/dist/public/assets/{sql-XsKG_-B3.js → sql-wdiPK9a0.js} +0 -0
  467. /package/dist/public/assets/{src-DLd5TgYd.js → src-BWFYg8Yg.js} +0 -0
  468. /package/dist/public/assets/{startup-marks-BJYEMeGu.js → startup-marks-BSFaenPs.js} +0 -0
  469. /package/dist/public/assets/{stex-B3qxBOBU.js → stex-DO4KgX7A.js} +0 -0
  470. /package/dist/public/assets/{swift-CGhDVaQR.js → swift-ClTSRUoT.js} +0 -0
  471. /package/dist/public/assets/{textarea-CUVLEZhx.js → textarea-B18-RfF_.js} +0 -0
  472. /package/dist/public/assets/{thread-draft-staging-BXLyxk1u.js → thread-draft-staging-CLYszvki.js} +0 -0
  473. /package/dist/public/assets/{timeline-diff-store-sC1fl4YV.js → timeline-diff-store-Buwf-OFI.js} +0 -0
  474. /package/dist/public/assets/{toml-DkvxgD0C.js → toml-Dzi4mOhV.js} +0 -0
  475. /package/dist/public/assets/{use-installed-clis-B7_xP0xS.js → use-installed-clis-BQyVc15P.js} +0 -0
  476. /package/dist/public/assets/{useLintConfigViewMode-C3vaXrG0.js → useLintConfigViewMode-MCAU0u93.js} +0 -0
@@ -1,2 +1,2 @@
1
- import"./src-azBs1EPY.mjs";import{r as e}from"./logger-BZPV1wv8.mjs";import{dirname as t,join as n,resolve as r}from"node:path";import{fileURLToPath as i}from"node:url";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c,readFileSync as l,unlinkSync as u,writeFileSync as d,writeSync as f}from"node:fs";import{homedir as p,hostname as m}from"node:os";import{randomUUID as h}from"node:crypto";function g(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function _(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}function v(e){return new URL(e.url??``,`http://localhost`).searchParams}function y(e){let t=e?.code;return typeof t==`string`?t:void 0}const b=/^[A-Za-z0-9-]{8,64}$/;let x=null;function S(e){return n(e??p(),`.ok`,`machine-id`)}function C(n){if(n===void 0&&x!==null)return x;let r=S(n),i=null;try{let e=l(r,`utf-8`).trim();b.test(e)&&(i=e)}catch{}if(i===null){i=h();try{s(t(r),{recursive:!0}),d(r,`${i}\n`,{encoding:`utf-8`,mode:384})}catch(t){e(`machine-id`).warn({path:r,err:t},`Failed to persist ${r} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${t instanceof Error?t.message:String(t)}`)}}return n===void 0&&(x=i),i}function w(){try{let e=r(t(i(import.meta.url)),`..`,`package.json`),n=JSON.parse(l(e,`utf-8`));if(typeof n.version==`string`&&n.version.length>0)return n.version}catch{}return`0.0.0-unknown`}const T=w(),E=1,D=e(`process-lock`);var O=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`OpenKnowledge ${n} already running on port ${e.port} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function k(e,t){return r(e,`${t}.lock`)}const A=new Map;function j(e){A.set(e,(A.get(e)??0)+1)}function M(e){let t=A.get(e);return t===void 0||t<=1?(A.delete(e),!0):(A.set(e,t-1),!1)}function N(e){return typeof e.machineId==`string`?e.machineId===C():e.hostname===m()}const P=new Set;let F=!1;function I(e){P.add(e),!F&&(F=!0,process.on(`exit`,()=>{for(let e of P)try{let t=JSON.parse(l(e,`utf-8`));if(t?.pid!==process.pid||typeof t.machineId==`string`&&t.machineId!==C()||t.machineId===void 0&&typeof t.hostname==`string`&&t.hostname!==m())continue;u(e)}catch{}}))}function L(e,t){try{let n=JSON.parse(l(e,`utf-8`));return n&&typeof n==`object`&&_(n.pid)?n:(D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null}}function R(e){let{lockName:t,lockDir:n,metadata:r}=e,i=`[${t}-lock]`;s(n,{recursive:!0});let l=k(n,t),p={pid:process.pid,hostname:m(),port:r.port,startedAt:new Date().toISOString(),worktreeRoot:r.worktreeRoot,machineId:C(),...r.kind!==void 0&&{kind:r.kind},...r.parentPid!==void 0&&{parentPid:r.parentPid},...r.capabilities!==void 0&&{capabilities:r.capabilities},protocolVersion:r.protocolVersion??1,runtimeVersion:r.runtimeVersion??T},h=JSON.stringify(p,null,2);for(let e=0;e<3;e++){if(!o(l))try{let e=c(l,`wx`,384);try{f(e,h)}finally{a(e)}return j(l),I(l),z({lockName:t,lockDir:n,lockPath:l})}catch(e){if(y(e)!==`EEXIST`)throw e}let e=L(l,i);if(e){if(N(e)&&e.pid===process.pid)return d(l,h,{encoding:`utf-8`,mode:384}),j(l),I(l),z({lockName:t,lockDir:n,lockPath:l});if(g(e.pid))throw new O(e,l,t);D.warn({pid:e.pid,host:e.hostname},`${i} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{u(l)}catch{}}throw Error(`${i} Failed to acquire ${l} after 3 attempts (concurrent acquire contention).`)}function z(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>G({lockName:t,lockDir:n}),updatePort:e=>B({lockName:t,lockDir:n,port:e})}}function B(e){let{lockName:t,lockDir:n,port:r}=e,i=`[${t}-lock]`,a=k(n,t);if(!o(a)){D.warn({lockPath:a},`${i} Lock file missing at ${a} during port update — skipping`);return}let s;try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:a},`${i} Corrupt lock at ${a} during port update — skipping`);return}s=e}catch{D.warn({lockPath:a},`${i} Unreadable lock at ${a} during port update — skipping`);return}if(s.pid===process.pid&&N(s)){s.port=r;try{d(a,JSON.stringify(s,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to update port in ${a}: ${e instanceof Error?e.message:String(e)}`)}}}function V(e){let{lockName:t,lockDir:n}=e,r=`[${t}-lock]`,i=k(n,t);if((A.get(i)??0)>1)return;let a;try{let e=JSON.parse(l(i,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:i},`${r} Corrupt lock at ${i} during draining mark — skipping`);return}a=e}catch(e){y(e)!==`ENOENT`&&D.warn({lockPath:i,err:e},`${r} Unreadable lock at ${i} during draining mark — skipping: ${e instanceof Error?e.message:String(e)}`);return}if(a.pid===process.pid&&N(a)&&a.draining!==!0){a.draining=!0;try{d(i,JSON.stringify(a,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:i,err:e},`${r} Failed to mark ${i} draining: ${e instanceof Error?e.message:String(e)}`)}}}function H(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return null;let i;try{let e=JSON.parse(l(r,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid))return null;i=e}catch{return null}if(!N(i))return null;if(!g(i.pid)){try{u(r)}catch{}return null}return i}function U(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return{status:`absent`};let i;try{i=JSON.parse(l(r,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!i||typeof i!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:i};let a=i;if(!_(a.pid)||typeof a.hostname!=`string`||typeof a.port!=`number`||typeof a.startedAt!=`string`||typeof a.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:i};let s={pid:a.pid,hostname:a.hostname,port:a.port,startedAt:a.startedAt,worktreeRoot:a.worktreeRoot,machineId:typeof a.machineId==`string`?a.machineId:void 0,draining:a.draining===!0?!0:void 0,protocolVersion:typeof a.protocolVersion==`number`?a.protocolVersion:void 0,runtimeVersion:typeof a.runtimeVersion==`string`?a.runtimeVersion:void 0};if(!N(s))return{status:`stale`,lock:s};if(!g(s.pid)){try{u(r)}catch{}return{status:`stale`,lock:s}}return s.protocolVersion===void 0||s.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:i}:{status:`live`,lock:s}}async function W(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>H({lockName:t,lockDir:n})),o=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a();if(s===null||s.draining!==!0)return`no-drain`;let c=Date.now()+r;for(;Date.now()<c;){await o(i);let e=a();if(e===null)return`released`;if(e.draining!==!0)return`no-drain`}return`timeout`}function G(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,a=k(n,t);if(M(a)){if(r){V({lockName:t,lockDir:n});return}if(o(a))try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||!N(e))return;u(a),P.delete(a)}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to release ${a}: ${e instanceof Error?e.message:String(e)}`)}}}var K=class extends O{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function q(e,t){try{return R({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof O&&e.lockName===`server`?new K(e.existing,e.lockPath):e}}function J(e,t){B({lockName:`server`,lockDir:e,port:t})}function Y(e){return H({lockName:`server`,lockDir:e})}function X(e,t){G({lockName:`server`,lockDir:e,...t})}function Z(e){V({lockName:`server`,lockDir:e})}function Q(e,t){return W({lockName:`server`,lockDir:e,...t})}export{_ as S,E as _,X as a,v as b,O as c,V as d,H as f,T as g,B as h,Y as i,R as l,G as m,q as n,J as o,U as p,Z as r,Q as s,K as t,k as u,C as v,g as x,y};
2
- //# sourceMappingURL=server-lock-DsDrc4RU.mjs.map
1
+ import"./src-DevJlbVv.mjs";import{r as e}from"./logger-BZPV1wv8.mjs";import{dirname as t,join as n,resolve as r}from"node:path";import{fileURLToPath as i}from"node:url";import{closeSync as a,existsSync as o,mkdirSync as s,openSync as c,readFileSync as l,unlinkSync as u,writeFileSync as d,writeSync as f}from"node:fs";import{homedir as p,hostname as m}from"node:os";import{randomUUID as h}from"node:crypto";function g(e){try{return process.kill(e,0),!0}catch(e){return!!(e&&typeof e==`object`&&`code`in e&&e.code===`EPERM`)}}function _(e){return!(typeof e!=`number`||!Number.isInteger(e)||e<2||e>2147483647)}function v(e){return new URL(e.url??``,`http://localhost`).searchParams}function y(e){let t=e?.code;return typeof t==`string`?t:void 0}const b=/^[A-Za-z0-9-]{8,64}$/;let x=null;function S(e){return n(e??p(),`.ok`,`machine-id`)}function C(n){if(n===void 0&&x!==null)return x;let r=S(n),i=null;try{let e=l(r,`utf-8`).trim();b.test(e)&&(i=e)}catch{}if(i===null){i=h();try{s(t(r),{recursive:!0}),d(r,`${i}\n`,{encoding:`utf-8`,mode:384})}catch(t){e(`machine-id`).warn({path:r,err:t},`Failed to persist ${r} — using an ephemeral per-process id; lock ownership checks will fail closed (collision) instead of recognizing this machine: ${t instanceof Error?t.message:String(t)}`)}}return n===void 0&&(x=i),i}function w(){try{let e=r(t(i(import.meta.url)),`..`,`package.json`),n=JSON.parse(l(e,`utf-8`));if(typeof n.version==`string`&&n.version.length>0)return n.version}catch{}return`0.0.0-unknown`}const T=w(),E=1,D=e(`process-lock`);var O=class extends Error{existing;lockPath;lockName;constructor(e,t,n){super(`OpenKnowledge ${n} already running on port ${e.port} (pid ${e.pid}, started ${e.startedAt}). Stop it first or use a different directory. Lock: ${t}`),this.name=`ProcessLockCollisionError`,this.existing=e,this.lockPath=t,this.lockName=n}};function k(e,t){return r(e,`${t}.lock`)}const A=new Map;function j(e){A.set(e,(A.get(e)??0)+1)}function M(e){let t=A.get(e);return t===void 0||t<=1?(A.delete(e),!0):(A.set(e,t-1),!1)}function N(e){return typeof e.machineId==`string`?e.machineId===C():e.hostname===m()}const P=new Set;let F=!1;function I(e){P.add(e),!F&&(F=!0,process.on(`exit`,()=>{for(let e of P)try{let t=JSON.parse(l(e,`utf-8`));if(t?.pid!==process.pid||typeof t.machineId==`string`&&t.machineId!==C()||t.machineId===void 0&&typeof t.hostname==`string`&&t.hostname!==m())continue;u(e)}catch{}}))}function L(e,t){try{let n=JSON.parse(l(e,`utf-8`));return n&&typeof n==`object`&&_(n.pid)?n:(D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null)}catch{return D.warn({lockPath:e},`${t} Corrupt lock file at ${e} — replacing`),null}}function R(e){let{lockName:t,lockDir:n,metadata:r}=e,i=`[${t}-lock]`;s(n,{recursive:!0});let l=k(n,t),p={pid:process.pid,hostname:m(),port:r.port,startedAt:new Date().toISOString(),worktreeRoot:r.worktreeRoot,machineId:C(),...r.kind!==void 0&&{kind:r.kind},...r.parentPid!==void 0&&{parentPid:r.parentPid},...r.capabilities!==void 0&&{capabilities:r.capabilities},protocolVersion:r.protocolVersion??1,runtimeVersion:r.runtimeVersion??T},h=JSON.stringify(p,null,2);for(let e=0;e<3;e++){if(!o(l))try{let e=c(l,`wx`,384);try{f(e,h)}finally{a(e)}return j(l),I(l),z({lockName:t,lockDir:n,lockPath:l})}catch(e){if(y(e)!==`EEXIST`)throw e}let e=L(l,i);if(e){if(N(e)&&e.pid===process.pid)return d(l,h,{encoding:`utf-8`,mode:384}),j(l),I(l),z({lockName:t,lockDir:n,lockPath:l});if(g(e.pid))throw new O(e,l,t);D.warn({pid:e.pid,host:e.hostname},`${i} Stale lock detected (pid=${e.pid}, host=${e.hostname}) — replacing`)}try{u(l)}catch{}}throw Error(`${i} Failed to acquire ${l} after 3 attempts (concurrent acquire contention).`)}function z(e){let{lockName:t,lockDir:n,lockPath:r}=e;return{lockPath:r,release:()=>G({lockName:t,lockDir:n}),updatePort:e=>B({lockName:t,lockDir:n,port:e})}}function B(e){let{lockName:t,lockDir:n,port:r}=e,i=`[${t}-lock]`,a=k(n,t);if(!o(a)){D.warn({lockPath:a},`${i} Lock file missing at ${a} during port update — skipping`);return}let s;try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:a},`${i} Corrupt lock at ${a} during port update — skipping`);return}s=e}catch{D.warn({lockPath:a},`${i} Unreadable lock at ${a} during port update — skipping`);return}if(s.pid===process.pid&&N(s)){s.port=r;try{d(a,JSON.stringify(s,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to update port in ${a}: ${e instanceof Error?e.message:String(e)}`)}}}function V(e){let{lockName:t,lockDir:n}=e,r=`[${t}-lock]`,i=k(n,t);if((A.get(i)??0)>1)return;let a;try{let e=JSON.parse(l(i,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid)){D.warn({lockPath:i},`${r} Corrupt lock at ${i} during draining mark — skipping`);return}a=e}catch(e){y(e)!==`ENOENT`&&D.warn({lockPath:i,err:e},`${r} Unreadable lock at ${i} during draining mark — skipping: ${e instanceof Error?e.message:String(e)}`);return}if(a.pid===process.pid&&N(a)&&a.draining!==!0){a.draining=!0;try{d(i,JSON.stringify(a,null,2),{encoding:`utf-8`,mode:384})}catch(e){D.warn({lockPath:i,err:e},`${r} Failed to mark ${i} draining: ${e instanceof Error?e.message:String(e)}`)}}}function H(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return null;let i;try{let e=JSON.parse(l(r,`utf-8`));if(!e||typeof e!=`object`||!_(e.pid))return null;i=e}catch{return null}if(!N(i))return null;if(!g(i.pid)){try{u(r)}catch{}return null}return i}function U(e){let{lockName:t,lockDir:n}=e,r=k(n,t);if(!o(r))return{status:`absent`};let i;try{i=JSON.parse(l(r,`utf-8`))}catch{return{status:`incompatible`,reason:`corrupt`,raw:void 0}}if(!i||typeof i!=`object`)return{status:`incompatible`,reason:`corrupt`,raw:i};let a=i;if(!_(a.pid)||typeof a.hostname!=`string`||typeof a.port!=`number`||typeof a.startedAt!=`string`||typeof a.worktreeRoot!=`string`)return{status:`incompatible`,reason:`corrupt`,raw:i};let s={pid:a.pid,hostname:a.hostname,port:a.port,startedAt:a.startedAt,worktreeRoot:a.worktreeRoot,machineId:typeof a.machineId==`string`?a.machineId:void 0,draining:a.draining===!0?!0:void 0,protocolVersion:typeof a.protocolVersion==`number`?a.protocolVersion:void 0,runtimeVersion:typeof a.runtimeVersion==`string`?a.runtimeVersion:void 0};if(!N(s))return{status:`stale`,lock:s};if(!g(s.pid)){try{u(r)}catch{}return{status:`stale`,lock:s}}return s.protocolVersion===void 0||s.runtimeVersion===void 0?{status:`incompatible`,reason:`missing-fields`,raw:i}:{status:`live`,lock:s}}async function W(e){let{lockName:t,lockDir:n}=e,r=e.timeoutMs??1e4,i=e.pollIntervalMs??100,a=e.readLock??(()=>H({lockName:t,lockDir:n})),o=e.sleep??(e=>new Promise(t=>setTimeout(t,e))),s=a();if(s===null||s.draining!==!0)return`no-drain`;let c=Date.now()+r;for(;Date.now()<c;){await o(i);let e=a();if(e===null)return`released`;if(e.draining!==!0)return`no-drain`}return`timeout`}function G(e){let{lockName:t,lockDir:n,deferUnlinkToExit:r=!1}=e,i=`[${t}-lock]`,a=k(n,t);if(M(a)){if(r){V({lockName:t,lockDir:n});return}if(o(a))try{let e=JSON.parse(l(a,`utf-8`));if(!e||typeof e!=`object`||typeof e.pid!=`number`||e.pid!==process.pid||!N(e))return;u(a),P.delete(a)}catch(e){D.warn({lockPath:a,err:e},`${i} Failed to release ${a}: ${e instanceof Error?e.message:String(e)}`)}}}var K=class extends O{constructor(e,t){super(e,t,`server`),this.name=`ServerLockCollisionError`}};function q(e,t){try{return R({lockName:`server`,lockDir:e,metadata:t}).lockPath}catch(e){throw e instanceof O&&e.lockName===`server`?new K(e.existing,e.lockPath):e}}function J(e,t){B({lockName:`server`,lockDir:e,port:t})}function Y(e){return H({lockName:`server`,lockDir:e})}function X(e,t){G({lockName:`server`,lockDir:e,...t})}function Z(e){V({lockName:`server`,lockDir:e})}function Q(e,t){return W({lockName:`server`,lockDir:e,...t})}export{_ as S,E as _,X as a,v as b,O as c,V as d,H as f,T as g,B as h,Y as i,R as l,G as m,q as n,J as o,U as p,Z as r,Q as s,K as t,k as u,C as v,g as x,y};
2
+ //# sourceMappingURL=server-lock-D7MC1H2C.mjs.map
@@ -1,2 +1,2 @@
1
- import{mr as e,pr as t}from"./src-YfpQ2LX0.mjs";import{c as n}from"./write-project-skill-g7odZSI2.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...e.map(e=>t[e]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of e){let e=t[r];o.push({path:a(i,`.agents`,`skills`,e),bundleId:r,scope:`central`});for(let t of n)o.push({path:a(i,t.hostDir,`skills`,e),bundleId:r,scope:`host`,hostDir:t.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}export{C as i,y as n,w as r,S as t};
2
- //# sourceMappingURL=skill-teardown-lrVGmvNz.mjs.map
1
+ import{br as e,xr as t}from"./src-D8NOF4IF.mjs";import{c as n}from"./write-project-skill-CstNID_e.mjs";import{dirname as r,isAbsolute as i,join as a,relative as o,resolve as s,sep as c}from"node:path";import{existsSync as l,lstatSync as u,readdirSync as d,rmSync as f,rmdirSync as p}from"node:fs";const m=[{hostDir:`.adal`,pruneRoot:`.adal`},{hostDir:`.aider-desk`,pruneRoot:`.aider-desk`},{hostDir:`.astrbot/data`,pruneRoot:`.astrbot`},{hostDir:`.augment`,pruneRoot:`.augment`},{hostDir:`.autohand`,pruneRoot:`.autohand`},{hostDir:`.bob`,pruneRoot:`.bob`},{hostDir:`.codeartsdoer`,pruneRoot:`.codeartsdoer`},{hostDir:`.codebuddy`,pruneRoot:`.codebuddy`},{hostDir:`.codeium/windsurf`,pruneRoot:`.codeium`},{hostDir:`.codemaker`,pruneRoot:`.codemaker`},{hostDir:`.codestudio`,pruneRoot:`.codestudio`},{hostDir:`.commandcode`,pruneRoot:`.commandcode`},{hostDir:`.config/crush`,pruneRoot:`.config/crush`},{hostDir:`.config/devin`,pruneRoot:`.config/devin`},{hostDir:`.config/goose`,pruneRoot:`.config/goose`},{hostDir:`.config/kimchi/harness`,pruneRoot:`.config/kimchi`},{hostDir:`.continue`,pruneRoot:`.continue`},{hostDir:`.factory`,pruneRoot:`.factory`},{hostDir:`.forge`,pruneRoot:`.forge`},{hostDir:`.grok`,pruneRoot:`.grok`},{hostDir:`.iflow`,pruneRoot:`.iflow`},{hostDir:`.inferencesh`,pruneRoot:`.inferencesh`},{hostDir:`.jazz`,pruneRoot:`.jazz`},{hostDir:`.junie`,pruneRoot:`.junie`},{hostDir:`.kilocode`,pruneRoot:`.kilocode`},{hostDir:`.kiro`,pruneRoot:`.kiro`},{hostDir:`.kode`,pruneRoot:`.kode`},{hostDir:`.lingma`,pruneRoot:`.lingma`},{hostDir:`.mcpjam`,pruneRoot:`.mcpjam`},{hostDir:`.moxby`,pruneRoot:`.moxby`},{hostDir:`.mux`,pruneRoot:`.mux`},{hostDir:`.neovate`,pruneRoot:`.neovate`},{hostDir:`.ona`,pruneRoot:`.ona`},{hostDir:`.openhands`,pruneRoot:`.openhands`},{hostDir:`.pochi`,pruneRoot:`.pochi`},{hostDir:`.qoder`,pruneRoot:`.qoder`},{hostDir:`.qoder-cn`,pruneRoot:`.qoder-cn`},{hostDir:`.qwen`,pruneRoot:`.qwen`},{hostDir:`.reasonix`,pruneRoot:`.reasonix`},{hostDir:`.roo`,pruneRoot:`.roo`},{hostDir:`.rovodev`,pruneRoot:`.rovodev`},{hostDir:`.snowflake/cortex`,pruneRoot:`.snowflake`},{hostDir:`.tabnine/agent`,pruneRoot:`.tabnine`},{hostDir:`.terramind`,pruneRoot:`.terramind`},{hostDir:`.tinycloud`,pruneRoot:`.tinycloud`},{hostDir:`.trae`,pruneRoot:`.trae`},{hostDir:`.trae-cn`,pruneRoot:`.trae-cn`},{hostDir:`.vibe`,pruneRoot:`.vibe`},{hostDir:`.zcode`,pruneRoot:`.zcode`},{hostDir:`.zencoder`,pruneRoot:`.zencoder`}],h=[...t.map(t=>e[t]),`open-knowledge`];function g(e){if(!i(e))throw Error(`skill cleanup requires an absolute home directory; got ${JSON.stringify(e)}`);let t=s(e);if(t===c||r(t)===t)throw Error(`skill cleanup refuses to operate on the filesystem root (${t})`);return t}function _(e,t){let n=o(e,t);if(n.startsWith(`..`)||i(n))return!1;let r=e;for(let e of n.split(c)){r=a(r,e);try{if(!u(r).isDirectory())return!1}catch{return!1}}return!0}function v(e,t){try{return d(e).every(n=>t.has(a(e,n)))}catch{return!1}}function y(e){let t=g(e),n=[],i=[],o=new Set;for(let e of m){let s=a(t,e.hostDir,`skills`);if(!_(t,s))continue;let u=h.map(e=>a(s,e)).filter(e=>l(e));n.push(...u);for(let e of u)o.add(e);let d=a(t,e.pruneRoot),f=s;for(;v(f,o)&&(i.push(f),o.add(f),f!==d);){let e=r(f);if(e===f||e===t||!e.startsWith(t+c))break;f=e}}return{skillDirs:n,emptyDirs:i}}function b(e){try{if(!u(e).isDirectory())return!1;let t=d(e);return t.length===0||t.includes(`SKILL.md`)}catch{return!1}}function x(e){let t=new Set,n=new Set;for(let i of m){let o=a(e,i.hostDir,`skills`);for(let e of h)t.add(a(o,e));let s=a(e,i.pruneRoot),l=o;for(;n.add(l),l!==s;){let t=r(l);if(t===l||t===e||!t.startsWith(e+c))break;l=t}}return{skillDirs:t,emptyDirs:n}}function S(e,t){let n=g(e),r=x(n),i=[...t.skillDirs.filter(e=>!r.skillDirs.has(e)),...t.emptyDirs.filter(e=>!r.emptyDirs.has(e))];if(i.length>0)throw Error(`refusing skill cleanup — ${i.length} path(s) outside the known legacy set: ${i.join(`, `)}`);let a=[];for(let e of t.skillDirs)if(_(n,e)&&b(e))try{f(e,{recursive:!0,force:!0}),a.push(e)}catch{}for(let e of t.emptyDirs)if(_(n,e))try{p(e),a.push(e)}catch{}return a}function C(r){let i=g(r),o=[];for(let r of t){let t=e[r];o.push({path:a(i,`.agents`,`skills`,t),bundleId:r,scope:`central`});for(let e of n)o.push({path:a(i,e.hostDir,`skills`,t),bundleId:r,scope:`host`,hostDir:e.hostDir})}return o}function w(e,t){let n=[];for(let r of C(e))if(r.bundleId===t)try{f(r.path,{recursive:!0,force:!0})}catch(e){n.push(e instanceof Error?e:Error(String(e)))}if(n.length>0)throw AggregateError(n,`Failed to remove ${n.length} path(s) for ${t}`)}export{C as i,y as n,w as r,S as t};
2
+ //# sourceMappingURL=skill-teardown-Bp4PXaVu.mjs.map
@@ -176,13 +176,13 @@ $&`).replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,`$1$2`).replace(/\
176
176
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
177
177
  `,e)+1}yield*this.pop();break;default:yield*this.pop(),yield*this.step()}}*blockMap(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(this.onKeyLine=!1,t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else if(t.sep)t.sep.push(this.sourceToken);else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){u(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return}if(this.indent>=e.indent){let n=!this.onKeyLine&&this.indent===e.indent,r=n&&(t.sep||t.explicitKey)&&this.type!==`seq-item-ind`,i=[];if(r&&t.sep&&!t.value){let n=[];for(let r=0;r<t.sep.length;++r){let i=t.sep[r];switch(i.type){case`newline`:n.push(r);break;case`space`:break;case`comment`:i.indent>e.indent&&(n.length=0);break;default:n.length=0}}n.length>=2&&(i=t.sep.splice(n[1]))}switch(this.type){case`anchor`:case`tag`:r||t.value?(i.push(this.sourceToken),e.items.push({start:i}),this.onKeyLine=!0):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`explicit-key-ind`:!t.sep&&!t.explicitKey?(t.start.push(this.sourceToken),t.explicitKey=!0):r||t.value?(i.push(this.sourceToken),e.items.push({start:i,explicitKey:!0})):this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken],explicitKey:!0}]}),this.onKeyLine=!0;return;case`map-value-ind`:if(t.explicitKey)if(!t.sep)if(a(t.start,`newline`))Object.assign(t,{key:null,sep:[this.sourceToken]});else{let e=l(t.start);this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:null,sep:[this.sourceToken]}]})}else if(t.value)e.items.push({start:[],key:null,sep:[this.sourceToken]});else if(a(t.sep,`map-value-ind`))this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:i,key:null,sep:[this.sourceToken]}]});else if(s(t.key)&&!a(t.sep,`newline`)){let e=l(t.start),n=t.key,r=t.sep;r.push(this.sourceToken),delete t.key,delete t.sep,this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:e,key:n,sep:r}]})}else i.length>0?t.sep=t.sep.concat(i,this.sourceToken):t.sep.push(this.sourceToken);else t.sep?t.value||r?e.items.push({start:i,key:null,sep:[this.sourceToken]}):a(t.sep,`map-value-ind`)?this.stack.push({type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]}):t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});this.onKeyLine=!0;return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);r||t.value?(e.items.push({start:i,key:n,sep:[]}),this.onKeyLine=!0):t.sep?this.stack.push(n):(Object.assign(t,{key:n,sep:[]}),this.onKeyLine=!0);return}default:{let r=this.startBlockValue(e);if(r){if(r.type===`block-seq`){if(!t.explicitKey&&t.sep&&!a(t.sep,`newline`)){yield*this.pop({type:`error`,offset:this.offset,message:`Unexpected block-seq-ind on same line with key`,source:this.source});return}}else n&&e.items.push({start:i});this.stack.push(r);return}}}}yield*this.pop(),yield*this.step()}*blockSequence(e){let t=e.items[e.items.length-1];switch(this.type){case`newline`:if(t.value){let n=`end`in t.value?t.value.end:void 0;(Array.isArray(n)?n[n.length-1]:void 0)?.type===`comment`?n?.push(this.sourceToken):e.items.push({start:[this.sourceToken]})}else t.start.push(this.sourceToken);return;case`space`:case`comment`:if(t.value)e.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(t.start,e.indent)){let n=e.items[e.items.length-2]?.value?.end;if(Array.isArray(n)){u(n,t.start),n.push(this.sourceToken),e.items.pop();return}}t.start.push(this.sourceToken)}return;case`anchor`:case`tag`:if(t.value||this.indent<=e.indent)break;t.start.push(this.sourceToken);return;case`seq-item-ind`:if(this.indent!==e.indent)break;t.value||a(t.start,`seq-item-ind`)?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return}if(this.indent>e.indent){let t=this.startBlockValue(e);if(t){this.stack.push(t);return}}yield*this.pop(),yield*this.step()}*flowCollection(e){let t=e.items[e.items.length-1];if(this.type===`flow-error-end`){let e;do yield*this.pop(),e=this.peek(1);while(e?.type===`flow-collection`)}else if(e.end.length===0){switch(this.type){case`comma`:case`explicit-key-ind`:!t||t.sep?e.items.push({start:[this.sourceToken]}):t.start.push(this.sourceToken);return;case`map-value-ind`:!t||t.value?e.items.push({start:[],key:null,sep:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):Object.assign(t,{key:null,sep:[this.sourceToken]});return;case`space`:case`comment`:case`newline`:case`anchor`:case`tag`:!t||t.value?e.items.push({start:[this.sourceToken]}):t.sep?t.sep.push(this.sourceToken):t.start.push(this.sourceToken);return;case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:{let n=this.flowScalar(this.type);!t||t.value?e.items.push({start:[],key:n,sep:[]}):t.sep?this.stack.push(n):Object.assign(t,{key:n,sep:[]});return}case`flow-map-end`:case`flow-seq-end`:e.end.push(this.sourceToken);return}let n=this.startBlockValue(e);n?this.stack.push(n):(yield*this.pop(),yield*this.step())}else{let t=this.peek(2);if(t.type===`block-map`&&(this.type===`map-value-ind`&&t.indent===e.indent||this.type===`newline`&&!t.items[t.items.length-1].sep))yield*this.pop(),yield*this.step();else if(this.type===`map-value-ind`&&t.type!==`flow-collection`){let n=l(c(t));d(e);let r=e.end.splice(1,e.end.length);r.push(this.sourceToken);let i={type:`block-map`,offset:e.offset,indent:e.indent,items:[{start:n,key:e,sep:r}]};this.onKeyLine=!0,this.stack[this.stack.length-1]=i}else yield*this.lineEnd(e)}}flowScalar(e){if(this.onNewLine){let e=this.source.indexOf(`
178
178
  `)+1;for(;e!==0;)this.onNewLine(this.offset+e),e=this.source.indexOf(`
179
- `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=l(c(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=l(c(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}}})),dc=t((e=>{var t=rc(),n=Bs(),r=Vs(),i=ms(),a=K(),o=lc(),s=uc();function c(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function l(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=Array.from(l.compose(o.parse(e)));if(a&&i)for(let t of u)t.errors.forEach(r.prettifyError(e,i)),t.warnings.forEach(r.prettifyError(e,i));return u.length>0?u:Object.assign([],{empty:!0},l.streamInfo())}function u(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=null;for(let t of l.compose(o.parse(e),!0,e.length))if(!u)u=t;else if(u.options.logLevel!==`silent`){u.errors.push(new r.YAMLParseError(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return a&&i&&(u.errors.forEach(r.prettifyError(e,i)),u.warnings.forEach(r.prettifyError(e,i))),u}function d(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let a=u(e,n);if(!a)return null;if(a.warnings.forEach(e=>i.warn(a.options.logLevel,e)),a.errors.length>0){if(a.options.logLevel!==`silent`)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},n))}function f(e,t,r){let i=null;if(typeof t==`function`||Array.isArray(t)?i=t:r===void 0&&t&&(r=t),typeof r==`string`&&(r=r.length),typeof r==`number`){let e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=r??t??{};if(!e)return}return a.isDocument(e)&&!i?e.toString(r):new n.Document(e,i,r).toString(r)}e.parse=d,e.parseAllDocuments=l,e.parseDocument=u,e.stringify=f})),fc=t((e=>{var t=rc(),n=Bs(),r=Rs(),i=Vs(),a=os(),o=K(),s=Y(),c=J(),l=X(),u=Z();sc();var d=cc(),f=lc(),p=uc(),m=dc(),h=ts();e.Composer=t.Composer,e.Document=n.Document,e.Schema=r.Schema,e.YAMLError=i.YAMLError,e.YAMLParseError=i.YAMLParseError,e.YAMLWarning=i.YAMLWarning,e.Alias=a.Alias,e.isAlias=o.isAlias,e.isCollection=o.isCollection,e.isDocument=o.isDocument,e.isMap=o.isMap,e.isNode=o.isNode,e.isPair=o.isPair,e.isScalar=o.isScalar,e.isSeq=o.isSeq,e.Pair=s.Pair,e.Scalar=c.Scalar,e.YAMLMap=l.YAMLMap,e.YAMLSeq=u.YAMLSeq,e.Lexer=d.Lexer,e.LineCounter=f.LineCounter,e.Parser=p.Parser,e.parse=m.parse,e.parseAllDocuments=m.parseAllDocuments,e.parseDocument=m.parseDocument,e.stringify=m.stringify,e.visit=h.visit,e.visitAsync=h.visitAsync}));const pc=new Set(Object.keys({sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`})),mc=new Set([`md`,`mdx`,`mmd`,`mermaid`]),hc=new Set([...pc,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!mc.has(e)));function gc(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:hc.has(t.slice(n+1).toLowerCase())}const _c=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],vc=[`video/mp4`,`video/webm`,`video/ogg`],yc=[`audio/mpeg`,`audio/wav`,`audio/ogg`],bc=[`application/pdf`],xc=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Sc=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Cc=new Set([`pdf`]),wc=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Tc=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Ec=new Set(`exe.bat.cmd.ps1.com.msi.vbs.js.jse.wsf.wsh.hta.sh.command.csh.ksh.bash.zsh.fish.desktop.action.workflow.html.htm.svg.xml.mhtml.svgz.dmg.pkg.mpkg.scpt.applescript.terminal.prefpane.webloc.inetloc.fileloc.jar.appimage.deb.rpm.msix.appx.ipa.apk.pif.scr.lnk.url`.split(`.`)),Dc=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Oc=new Set([`html`,`htm`]),kc=`sandbox allow-scripts; connect-src 'none'`,Ac=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),jc=`same-dir`,Mc=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Nc=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Pc=[`mp4`,`webm`,`mov`,`m4v`],Fc=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Ic=[`pdf`],Lc=[`json`,`toml`,`lock`];function Rc(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}Rc(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,Nc,xc),Rc(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Pc,Sc),Rc(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Fc,wc),Rc(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Ic,Cc),Rc(`FILE_ATTACHMENT_EXTENSIONS`,[...Tc],Mc),Rc(`WIKI_EMBED_EXTENSIONS`,[...Mc],Dc);const zc=new Set(Nc),Bc=new Set(Pc),Vc=new Set(Fc),Hc=new Set(Ic),Uc=new Set(Lc);Rc(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...Nc,...Pc,...Fc,...Ic,...Lc])],Ac);const Wc=new Set([`base`,`canvas`]),Gc=new Set([`mmd`,`mermaid`]);function Kc(e){let t=e.lastIndexOf(`.`);return t<0?!1:Gc.has(e.slice(t+1).toLowerCase())}const qc=new Set([...Dc,...Wc,...Gc]);function Jc(e){let t=e.toLowerCase().replace(/^\./,``);return zc.has(t)?`image`:Bc.has(t)?`video`:Vc.has(t)?`audio`:Hc.has(t)?`pdf`:Uc.has(t)||Wc.has(t)?`text`:Gc.has(t)?`mermaid`:pc.has(t)?`text`:null}const Yc=[`off`,`warning`,`error`],Xc=`warning`,Zc=[`error`,`warning`];var Qc=fc();const $c=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],el={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`};function tl(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,...il(t)}}const nl={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},rl=Object.keys(nl);function il(e){let t={};for(let n of rl)t[`ansi-${al(n)}`]=e[nl[n]];return t}function al(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}const ol={name:`Dracula`,author:`clach04 (https://github.com/clach04)`,variant:`dark`,palette:{base00:`#282a36`,base01:`#21222c`,base02:`#44475a`,base03:`#6272a4`,base04:`#9ea8c7`,base05:`#f8f8f2`,base06:`#f8f8f2`,base07:`#ffffff`,base08:`#ff5555`,base09:`#ffb86c`,base0A:`#f1fa8c`,base0B:`#50fa7b`,base0C:`#8be9fd`,base0D:`#bd93f9`,base0E:`#ff79c6`,base0F:`#993333`}},sl={name:`Catppuccin Frappé`,author:`https://github.com/catppuccin/catppuccin`,variant:`dark`,palette:{base00:`#303446`,base01:`#292c3c`,base02:`#414559`,base03:`#51576d`,base04:`#626880`,base05:`#c6d0f5`,base06:`#f2d5cf`,base07:`#babbf1`,base08:`#e78284`,base09:`#ef9f76`,base0A:`#e5c890`,base0B:`#a6d189`,base0C:`#81c8be`,base0D:`#8caaee`,base0E:`#ca9ee6`,base0F:`#eebebe`}},cl={name:`Catppuccin Latte`,author:`https://github.com/catppuccin/catppuccin`,variant:`light`,palette:{base00:`#eff1f5`,base01:`#e6e9ef`,base02:`#ccd0da`,base03:`#bcc0cc`,base04:`#acb0be`,base05:`#4c4f69`,base06:`#dc8a78`,base07:`#7287fd`,base08:`#d20f39`,base09:`#fe640b`,base0A:`#df8e1d`,base0B:`#40a02b`,base0C:`#179299`,base0D:`#1e66f5`,base0E:`#8839ef`,base0F:`#dd7878`}},ll={name:`Monokai`,author:`Wimer Hazenberg (http://www.monokai.nl)`,variant:`dark`,palette:{base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`}},ul={name:`Gruvbox dark, medium`,author:`Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)`,variant:`dark`,palette:{base00:`#282828`,base01:`#3c3836`,base02:`#504945`,base03:`#665c54`,base04:`#bdae93`,base05:`#d5c4a1`,base06:`#ebdbb2`,base07:`#fbf1c7`,base08:`#fb4934`,base09:`#fe8019`,base0A:`#fabd2f`,base0B:`#b8bb26`,base0C:`#8ec07c`,base0D:`#83a598`,base0E:`#d3869b`,base0F:`#d65d0e`}},dl={name:`Solarized Dark`,author:`Ethan Schoonover (modified by aramisgithub)`,variant:`dark`,palette:{base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`}};function fl(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>tl(n)}}function pl(e,t){return{id:e,label:t,kind:`system`}}const ml=[pl(`default`,`Default`),fl(`dracula`,`Dracula`,ol),fl(`catppuccin-frappe`,`Catppuccin Frappé`,sl),fl(`catppuccin-latte`,`Catppuccin Latte`,cl),fl(`monokai`,`Monokai`,ll),fl(`gruvbox`,`Gruvbox`,ul),fl(`solarized`,`Solarized`,dl),pl(`custom`,`Custom`)],hl=ml.map(e=>e.id);new Map(ml.map(e=>[e.id,e]));const gl=Symbol.for(`@inkeep/open-knowledge/field-registry`),_l=globalThis;_l[gl]===void 0&&(_l[gl]=tr());const Q=_l[gl];function vl(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=yl(t)?Q.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function yl(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function bl(){return Object.fromEntries($c.map(e=>[e,L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${el[e]}, as a #rrggbb hex string.`}).optional()]))}function xl(){return hl.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}const Sl=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Cl=52428800,wl=26214400,Tl=12582912,El=`https://api.openai.com/v1`,Dl=`text-embedding-3-small`;function Ol(e){let t;try{t=new URL(e)}catch{return!1}let n=t.hostname.toLowerCase();return n===`localhost`||n===`127.0.0.1`||n===`[::1]`}function kl(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&Ol(e)?null:`insecure-scheme`}function Al(e){let t=e.trim();return t===``?`./`:t}function jl(e){let t=Al(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}const Ml=U({content:U({dir:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore.`}).default(`.`),attachmentFolderPath:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(jl,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:U({theme:W([`light`,`dark`,`system`]).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeLight:W(hl).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), or one of ${xl()}. A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeDark:W(hl).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), or one of ${xl()}. A personal preference (user scope) — not shared with the project.`}).optional(),colorTheme:W(hl).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeEnabled:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:U({name:L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:W([`dark`,`light`]).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted.`}).optional(),...bl()}).optional(),preview:U({autoOpen:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:U({showHiddenFiles:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:U({wordWrap:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0),previewTabs:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:U({autoApproveOkTools:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:U({mode:W(Jo).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:W(Yo).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:co([B(),W(Jo)]).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),telemetry:U({localSink:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:U({maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(Cl)}).default({maxBytes:Cl}),logs:U({maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(wl)}).default({maxBytes:wl}),attributeDenylist:V(L()).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...Sl])}).default({enabled:!0,spans:{maxBytes:Cl},logs:{maxBytes:wl},attributeDenylist:[...Sl]}),skillInstallReports:U({enabled:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:Cl},logs:{maxBytes:wl},attributeDenylist:[...Sl]},skillInstallReports:{enabled:!0}}),lossCapture:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default(Tl)}).default({enabled:!0,maxBytes:Tl}),bridge:U({backgroundThrottle:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:U({semantic:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:L().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(El),model:L().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(Dl),dimensions:z().int().positive().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:z().min(0).max(1).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:El,model:Dl})}).default({semantic:{enabled:!1,baseUrl:El,model:Dl}}),contentRules:U({markdownlint:H({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:H({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:V(H({appliesTo:co([L(),V(L())]).optional(),file:L(),enabled:B().optional()})).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]}}),validation:U({links:W(Yc).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(Xc),fileTreeIndicators:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:Xc,fileTreeIndicators:!0}),linkPreviews:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:U({url:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:z().int().min(1).max(65535).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).default(24550)}).default({port:24550})});r();const Nl=`open-knowledge-config`;async function Pl(e,t,r){let a=i.getTracer(Nl),o=t?{attributes:t}:{};return a.startActiveSpan(e,o,async e=>{try{return await r(e)}catch(t){throw e.recordException(t),e.setStatus({code:n.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Fl(e,t,r){let a=i.getTracer(Nl),o=t?{attributes:t}:{};return a.startActiveSpan(e,o,e=>{try{return r(e)}catch(t){throw e.recordException(t),e.setStatus({code:n.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Il(e,t){let n=i.getActiveSpan();n&&n.addEvent(e,t)}function Ll(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function Rl(e,t){let n=e;for(let e of t){n=Ll(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function zl(e,t){let n=Rl(e,t);if(n!==void 0)return vl(n)}function Bl(e,t){return e===`either`?!0:e===t}function Vl(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}let a=zl(Ml,i);a?.scope!==void 0&&(Bl(a.scope,t)||(n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t}))}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}function Hl(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&((0,Qc.isCollection)(e.getIn(r,!0))||e.deleteIn(r))}}function Ul(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){Hl(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}Hl(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Wl(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}const Gl=H({file:L(),line:z().int().min(1),column:z().int().min(1),snippet:L().optional()}),Kl=H({path:V(co([L(),z()])),message:L(),issueCode:L(),params:ho(L(),no()).optional(),source:Gl.optional()}),ql=W([`user`,`project`,`project-local`,`either`]),Jl=W([`user`,`project`,`project-local`]),Yl=H({code:G(`YAML_PARSE`),detail:L()}),Xl=H({code:G(`UNREADABLE`),detail:L()}),Zl=H({code:G(`SCHEMA_INVALID`),issues:V(Kl)}),Ql=H({code:G(`REMOVED_KEY`),path:V(L()),redirect:L(),source:Gl.optional()}),$l=uo(`code`,[Yl,Zl,Xl,H({code:G(`SCOPE_VIOLATION`),path:V(L()),expectedScope:ql,actualScope:Jl}),H({code:G(`NOT_AGENT_SETTABLE`),path:V(L())}),H({code:G(`MIXED_SCOPE`),paths:V(H({path:V(L()),scope:Jl}))}),Ql,H({code:G(`WRITE_ERROR`),detail:L()}),H({code:G(`OKIGNORE_INVALID`),detail:L(),lineNumber:z().int().min(1).optional()}),H({code:G(`UNKNOWN`),message:L().optional()})]);uo(`code`,[Ql,Yl,Zl,Xl]);const eu=H({diagnostics:V(uo(`code`,[H({code:G(`REMOVED_KEY`),scope:Jl,file:L(),path:V(L()),redirect:L()}),H({code:G(`YAML_PARSE`),scope:Jl,file:L()}),H({code:G(`SCHEMA_INVALID`),scope:Jl,file:L()}),H({code:G(`UNREADABLE`),scope:Jl,file:L()})]))}),tu=new Set($l.options.map(e=>e.shape.code.value)),nu=co([$l,U({code:L(),message:L().optional()})]);function ru(e){return tu.has(e.code)}function iu(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function au(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function ou(e){if(!ru(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
179
+ `,e)+1}return{type:e,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(e){switch(this.type){case`alias`:case`scalar`:case`single-quoted-scalar`:case`double-quoted-scalar`:return this.flowScalar(this.type);case`block-scalar-header`:return{type:`block-scalar`,offset:this.offset,indent:this.indent,props:[this.sourceToken],source:``};case`flow-map-start`:case`flow-seq-start`:return{type:`flow-collection`,offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case`seq-item-ind`:return{type:`block-seq`,offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case`explicit-key-ind`:{this.onKeyLine=!0;let t=l(c(e));return t.push(this.sourceToken),{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,explicitKey:!0}]}}case`map-value-ind`:{this.onKeyLine=!0;let t=l(c(e));return{type:`block-map`,offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(e,t){return this.type!==`comment`||this.indent<=t?!1:e.every(e=>e.type===`newline`||e.type===`space`)}*documentEnd(e){this.type!==`doc-mode`&&(e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop()))}*lineEnd(e){switch(this.type){case`comma`:case`doc-start`:case`doc-end`:case`flow-seq-end`:case`flow-map-end`:case`map-value-ind`:yield*this.pop(),yield*this.step();break;case`newline`:this.onKeyLine=!1;default:e.end?e.end.push(this.sourceToken):e.end=[this.sourceToken],this.type===`newline`&&(yield*this.pop())}}}})),dc=t((e=>{var t=rc(),n=Bs(),r=Vs(),i=ms(),a=K(),o=lc(),s=uc();function c(e){let t=e.prettyErrors!==!1;return{lineCounter:e.lineCounter||t&&new o.LineCounter||null,prettyErrors:t}}function l(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=Array.from(l.compose(o.parse(e)));if(a&&i)for(let t of u)t.errors.forEach(r.prettifyError(e,i)),t.warnings.forEach(r.prettifyError(e,i));return u.length>0?u:Object.assign([],{empty:!0},l.streamInfo())}function u(e,n={}){let{lineCounter:i,prettyErrors:a}=c(n),o=new s.Parser(i?.addNewLine),l=new t.Composer(n),u=null;for(let t of l.compose(o.parse(e),!0,e.length))if(!u)u=t;else if(u.options.logLevel!==`silent`){u.errors.push(new r.YAMLParseError(t.range.slice(0,2),`MULTIPLE_DOCS`,`Source contains multiple documents; please use YAML.parseAllDocuments()`));break}return a&&i&&(u.errors.forEach(r.prettifyError(e,i)),u.warnings.forEach(r.prettifyError(e,i))),u}function d(e,t,n){let r;typeof t==`function`?r=t:n===void 0&&t&&typeof t==`object`&&(n=t);let a=u(e,n);if(!a)return null;if(a.warnings.forEach(e=>i.warn(a.options.logLevel,e)),a.errors.length>0){if(a.options.logLevel!==`silent`)throw a.errors[0];a.errors=[]}return a.toJS(Object.assign({reviver:r},n))}function f(e,t,r){let i=null;if(typeof t==`function`||Array.isArray(t)?i=t:r===void 0&&t&&(r=t),typeof r==`string`&&(r=r.length),typeof r==`number`){let e=Math.round(r);r=e<1?void 0:e>8?{indent:8}:{indent:e}}if(e===void 0){let{keepUndefined:e}=r??t??{};if(!e)return}return a.isDocument(e)&&!i?e.toString(r):new n.Document(e,i,r).toString(r)}e.parse=d,e.parseAllDocuments=l,e.parseDocument=u,e.stringify=f})),fc=t((e=>{var t=rc(),n=Bs(),r=Rs(),i=Vs(),a=os(),o=K(),s=Y(),c=J(),l=X(),u=Z();sc();var d=cc(),f=lc(),p=uc(),m=dc(),h=ts();e.Composer=t.Composer,e.Document=n.Document,e.Schema=r.Schema,e.YAMLError=i.YAMLError,e.YAMLParseError=i.YAMLParseError,e.YAMLWarning=i.YAMLWarning,e.Alias=a.Alias,e.isAlias=o.isAlias,e.isCollection=o.isCollection,e.isDocument=o.isDocument,e.isMap=o.isMap,e.isNode=o.isNode,e.isPair=o.isPair,e.isScalar=o.isScalar,e.isSeq=o.isSeq,e.Pair=s.Pair,e.Scalar=c.Scalar,e.YAMLMap=l.YAMLMap,e.YAMLSeq=u.YAMLSeq,e.Lexer=d.Lexer,e.LineCounter=f.LineCounter,e.Parser=p.Parser,e.parse=m.parse,e.parseAllDocuments=m.parseAllDocuments,e.parseDocument=m.parseDocument,e.stringify=m.stringify,e.visit=h.visit,e.visitAsync=h.visitAsync}));const pc=new Set(Object.keys({sh:`bash`,zsh:`bash`,bash:`bash`,c:`c`,cc:`cpp`,cpp:`cpp`,cxx:`cpp`,"c++":`cpp`,h:`c`,hh:`cpp`,hpp:`cpp`,cs:`csharp`,css:`css`,less:`less`,scss:`scss`,sass:`scss`,diff:`diff`,patch:`diff`,feature:`gherkin`,go:`go`,gql:`graphql`,graphql:`graphql`,ini:`ini`,cfg:`ini`,conf:`ini`,properties:`ini`,java:`java`,js:`javascript`,jsx:`javascript`,mjs:`javascript`,cjs:`javascript`,json:`json`,jsonc:`json`,kt:`kotlin`,kts:`kotlin`,lua:`lua`,makefile:`makefile`,md:`markdown`,mdx:`markdown`,m:`objectivec`,mm:`objectivec`,pl:`perl`,pm:`perl`,php:`php`,phtml:`php`,py:`python`,pyi:`python`,pyx:`python`,r:`r`,rb:`ruby`,rs:`rust`,sql:`sql`,swift:`swift`,ts:`typescript`,tsx:`typescript`,xml:`xml`,yaml:`yaml`,yml:`yaml`})),mc=new Set([`md`,`mdx`,`mmd`,`mermaid`]),hc=new Set([...pc,`txt`,`text`,`csv`,`tsv`,`log`,`toml`,`html`,`htm`,`svg`,`vue`,`svelte`,`astro`,`lock`].filter(e=>!mc.has(e)));function gc(e){let t=e.slice(e.lastIndexOf(`/`)+1),n=t.lastIndexOf(`.`);return n<=0?!1:hc.has(t.slice(n+1).toLowerCase())}const _c=[`image/jpeg`,`image/png`,`image/gif`,`image/webp`,`image/svg+xml`],vc=[`video/mp4`,`video/webm`,`video/ogg`],yc=[`audio/mpeg`,`audio/wav`,`audio/ogg`],bc=[`application/pdf`],xc=new Set([`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`,`svg`]),Sc=new Set([`mp4`,`webm`,`mov`,`m4v`,`mkv`]),Cc=new Set([`pdf`]),wc=new Set([`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`]),Tc=new Set(`pdf.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Ec=new Set(`exe.bat.cmd.ps1.com.msi.vbs.js.jse.wsf.wsh.hta.sh.command.csh.ksh.bash.zsh.fish.desktop.action.workflow.html.htm.svg.xml.mhtml.svgz.dmg.pkg.mpkg.scpt.applescript.terminal.prefpane.webloc.inetloc.fileloc.jar.appimage.deb.rpm.msix.appx.ipa.apk.pif.scr.lnk.url`.split(`.`)),Dc=new Set(`png.jpg.jpeg.gif.webp.avif.svg.apng.heic.heif.tiff.bmp.ico.pdf.mp4.webm.mov.m4v.mkv.avi.flv.wmv.mpeg.mpg.mp3.wav.ogg.m4a.flac.aac.opus.zip.7z.tar.gz.rar.woff.woff2.ttf.otf.eot.docx.xlsx.pptx.doc.xls.ppt.odt.ods.odp.pages.numbers.key.epub.mobi.csv.tsv.txt.rtf.json.yaml.yml.xml.toml.lock.gpx.html.htm`.split(`.`)),Oc=new Set([`html`,`htm`]),kc=`sandbox allow-scripts; connect-src 'none'`,Ac=new Set(`png.jpg.jpeg.gif.webp.avif.apng.heic.heif.tiff.bmp.ico.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.json.toml.lock`.split(`.`)),jc=`same-dir`,Mc=new Set(`png.jpg.jpeg.gif.webp.avif.svg.pdf.mp4.webm.mov.m4v.mkv.mp3.wav.ogg.m4a.flac.aac.opus.docx.xlsx.pptx.doc.xls.ppt.zip.7z.tar.gz.rar.csv.tsv.rtf.json.yaml.yml.xml.txt.pages.numbers.key.odt.ods.odp.epub.mobi`.split(`.`)),Nc=[`png`,`jpg`,`jpeg`,`gif`,`webp`,`avif`],Pc=[`mp4`,`webm`,`mov`,`m4v`],Fc=[`mp3`,`wav`,`ogg`,`m4a`,`flac`,`aac`,`opus`],Ic=[`pdf`],Lc=[`json`,`toml`,`lock`];function Rc(e,t,n){for(let r of t)if(!n.has(r))throw Error(`${e}: ${r} is not present in canonical upload constants`)}Rc(`SIDEBAR_IMAGE_ASSET_EXTENSIONS`,Nc,xc),Rc(`SIDEBAR_VIDEO_ASSET_EXTENSIONS`,Pc,Sc),Rc(`SIDEBAR_AUDIO_ASSET_EXTENSIONS`,Fc,wc),Rc(`SIDEBAR_PDF_ASSET_EXTENSIONS`,Ic,Cc),Rc(`FILE_ATTACHMENT_EXTENSIONS`,[...Tc],Mc),Rc(`WIKI_EMBED_EXTENSIONS`,[...Mc],Dc);const zc=new Set(Nc),Bc=new Set(Pc),Vc=new Set(Fc),Hc=new Set(Ic),Uc=new Set(Lc);Rc(`SIDEBAR_RENDERABLE_ASSET_EXTENSIONS`,[...new Set([...Nc,...Pc,...Fc,...Ic,...Lc])],Ac);const Wc=new Set([`base`,`canvas`]),Gc=new Set([`mmd`,`mermaid`]);function Kc(e){let t=e.lastIndexOf(`.`);return t<0?!1:Gc.has(e.slice(t+1).toLowerCase())}const qc=new Set([...Dc,...Wc,...Gc]);function Jc(e){let t=e.toLowerCase().replace(/^\./,``);return zc.has(t)?`image`:Bc.has(t)?`video`:Vc.has(t)?`audio`:Hc.has(t)?`pdf`:Uc.has(t)||Wc.has(t)?`text`:Gc.has(t)?`mermaid`:pc.has(t)?`text`:null}const Yc=[`en`,`zh-Hans`,`zh-Hant`,`hi`,`es`,`ar`,`fr`,`bn`,`pt-BR`,`id`,`ur`],Xc=new Set([`ar`,`ur`]);Yc.filter(e=>!Xc.has(e));const Zc=[`off`,`warning`,`error`],Qc=`warning`,$c=[`error`,`warning`];var el=fc();const tl=[`base00`,`base01`,`base02`,`base03`,`base04`,`base05`,`base06`,`base07`,`base08`,`base09`,`base0A`,`base0B`,`base0C`,`base0D`,`base0E`,`base0F`],nl={base00:`default background`,base01:`alt background — cards, popovers, sidebar`,base02:`selection background, borders`,base03:`comments, invisibles`,base04:`secondary text`,base05:`default foreground`,base06:`light foreground`,base07:`lightest foreground`,base08:`red — variables, tags, diff deleted`,base09:`orange — numbers, constants`,base0A:`yellow — classes, search highlight`,base0B:`green — strings, diff inserted`,base0C:`cyan — support, escapes, quotes`,base0D:`blue — functions, headings, accent`,base0E:`magenta — keywords, storage`,base0F:`deprecated markers, embedded tags`};function rl(e){let t=e.palette;return{background:t.base00,foreground:t.base05,card:t.base01,"card-foreground":t.base05,popover:t.base01,"popover-foreground":t.base05,primary:t.base0D,"primary-foreground":t.base00,secondary:t.base01,"secondary-foreground":t.base05,muted:t.base01,"muted-foreground":t.base04,accent:t.base02,"accent-foreground":t.base05,destructive:t.base08,border:t.base02,input:t.base02,ring:t.base0D,"selection-soft":t.base02,"chart-1":t.base0D,"chart-2":t.base0B,"chart-3":t.base0A,"chart-4":t.base0E,"chart-5":t.base08,sidebar:t.base01,"sidebar-foreground":t.base05,"sidebar-primary":t.base0D,"sidebar-primary-foreground":t.base00,"sidebar-accent":t.base02,"sidebar-accent-foreground":t.base0D,"sidebar-hover":t.base02,"sidebar-border":t.base02,"sidebar-ring":t.base0D,"syntax-keyword":t.base0E,"syntax-tag":t.base08,"syntax-attr":t.base0D,"syntax-string":t.base0B,"syntax-number":t.base09,"syntax-atom":t.base0C,"syntax-comment":t.base03,"syntax-func":t.base0D,"syntax-var":t.base08,"syntax-type":t.base0A,"syntax-operator":t.base05,"syntax-meta":t.base0F,"syntax-bg":t.base01,"link-color":t.base0D,"broken-link-color":t.base08,"lint-warning-color":t.base0A,"lint-error-color":t.base08,"diff-added":t.base0B,"diff-removed":t.base08,"callout-note-color":t.base0D,"callout-info-color":t.base0D,"callout-todo-color":t.base0D,"callout-abstract-color":t.base0C,"callout-tip-color":t.base0B,"callout-success-color":t.base0B,"callout-important-color":t.base0E,"callout-example-color":t.base0E,"callout-question-color":t.base0E,"callout-warning-color":t.base0A,"callout-caution-color":t.base09,"callout-danger-color":t.base09,"callout-failure-color":t.base08,"callout-bug-color":t.base08,"callout-quote-color":t.base03,...ol(t)}}const il={black:`base00`,red:`base08`,green:`base0B`,yellow:`base0A`,blue:`base0D`,magenta:`base0E`,cyan:`base0C`,white:`base05`,brightBlack:`base03`,brightRed:`base08`,brightGreen:`base0B`,brightYellow:`base0A`,brightBlue:`base0D`,brightMagenta:`base0E`,brightCyan:`base0C`,brightWhite:`base07`},al=Object.keys(il);function ol(e){let t={};for(let n of al)t[`ansi-${sl(n)}`]=e[il[n]];return t}function sl(e){return e.replace(/([a-z])([A-Z])/g,`$1-$2`).toLowerCase()}const cl={name:`Dracula`,author:`clach04 (https://github.com/clach04)`,variant:`dark`,palette:{base00:`#282a36`,base01:`#21222c`,base02:`#44475a`,base03:`#6272a4`,base04:`#9ea8c7`,base05:`#f8f8f2`,base06:`#f8f8f2`,base07:`#ffffff`,base08:`#ff5555`,base09:`#ffb86c`,base0A:`#f1fa8c`,base0B:`#50fa7b`,base0C:`#8be9fd`,base0D:`#bd93f9`,base0E:`#ff79c6`,base0F:`#993333`}},ll={name:`Catppuccin Frappé`,author:`https://github.com/catppuccin/catppuccin`,variant:`dark`,palette:{base00:`#303446`,base01:`#292c3c`,base02:`#414559`,base03:`#51576d`,base04:`#626880`,base05:`#c6d0f5`,base06:`#f2d5cf`,base07:`#babbf1`,base08:`#e78284`,base09:`#ef9f76`,base0A:`#e5c890`,base0B:`#a6d189`,base0C:`#81c8be`,base0D:`#8caaee`,base0E:`#ca9ee6`,base0F:`#eebebe`}},ul={name:`Catppuccin Latte`,author:`https://github.com/catppuccin/catppuccin`,variant:`light`,palette:{base00:`#eff1f5`,base01:`#e6e9ef`,base02:`#ccd0da`,base03:`#bcc0cc`,base04:`#acb0be`,base05:`#4c4f69`,base06:`#dc8a78`,base07:`#7287fd`,base08:`#d20f39`,base09:`#fe640b`,base0A:`#df8e1d`,base0B:`#40a02b`,base0C:`#179299`,base0D:`#1e66f5`,base0E:`#8839ef`,base0F:`#dd7878`}},dl={name:`Monokai`,author:`Wimer Hazenberg (http://www.monokai.nl)`,variant:`dark`,palette:{base00:`#272822`,base01:`#383830`,base02:`#49483e`,base03:`#75715e`,base04:`#a59f85`,base05:`#f8f8f2`,base06:`#f5f4f1`,base07:`#f9f8f5`,base08:`#f92672`,base09:`#fd971f`,base0A:`#f4bf75`,base0B:`#a6e22e`,base0C:`#a1efe4`,base0D:`#66d9ef`,base0E:`#ae81ff`,base0F:`#cc6633`}},fl={name:`Gruvbox dark, medium`,author:`Dawid Kurek, morhetz (https://github.com/morhetz/gruvbox)`,variant:`dark`,palette:{base00:`#282828`,base01:`#3c3836`,base02:`#504945`,base03:`#665c54`,base04:`#bdae93`,base05:`#d5c4a1`,base06:`#ebdbb2`,base07:`#fbf1c7`,base08:`#fb4934`,base09:`#fe8019`,base0A:`#fabd2f`,base0B:`#b8bb26`,base0C:`#8ec07c`,base0D:`#83a598`,base0E:`#d3869b`,base0F:`#d65d0e`}},pl={name:`Solarized Dark`,author:`Ethan Schoonover (modified by aramisgithub)`,variant:`dark`,palette:{base00:`#002b36`,base01:`#073642`,base02:`#586e75`,base03:`#657b83`,base04:`#839496`,base05:`#93a1a1`,base06:`#eee8d5`,base07:`#fdf6e3`,base08:`#dc322f`,base09:`#cb4b16`,base0A:`#b58900`,base0B:`#859900`,base0C:`#2aa198`,base0D:`#268bd2`,base0E:`#6c71c4`,base0F:`#d33682`}};function ml(e,t,n){return{id:e,label:t,kind:n.variant,scheme:n,toTokens:()=>rl(n)}}function hl(e,t){return{id:e,label:t,kind:`system`}}const gl=[hl(`default`,`Default`),ml(`dracula`,`Dracula`,cl),ml(`catppuccin-frappe`,`Catppuccin Frappé`,ll),ml(`catppuccin-latte`,`Catppuccin Latte`,ul),ml(`monokai`,`Monokai`,dl),ml(`gruvbox`,`Gruvbox`,fl),ml(`solarized`,`Solarized`,pl),hl(`custom`,`Custom`)],_l=gl.map(e=>e.id);new Map(gl.map(e=>[e.id,e]));const vl=Symbol.for(`@inkeep/open-knowledge/field-registry`),yl=globalThis;yl[vl]===void 0&&(yl[vl]=tr());const Q=yl[vl];function bl(e){let t=e;for(let e=0;e<16;e++){if(t==null)return;let e=xl(t)?Q.get(t):void 0;if(e!==void 0)return e;let n=t._zod?.def?.innerType;if(n===void 0)return;t=n}}function xl(e){return typeof e==`object`&&!!e&&`_zod`in e&&`parse`in e}function Sl(){return Object.fromEntries(tl.map(e=>[e,L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: base16 ${e} — ${nl[e]}, as a #rrggbb hex string.`}).optional()]))}function Cl(){return _l.filter(e=>e!==`default`&&e!==`custom`).map(e=>`'${e}'`).join(`, `)}const wl=Object.freeze([`authorization`,`auth.token`,`auth.bearer`,`cookie`,`set-cookie`,`x-api-key`,`password`,`secret`]),Tl=52428800,El=26214400,Dl=12582912,Ol=`https://api.openai.com/v1`,kl=`text-embedding-3-small`;function Al(e){let t;try{t=new URL(e)}catch{return!1}let n=t.hostname.toLowerCase();return n===`localhost`||n===`127.0.0.1`||n===`[::1]`}function jl(e){let t;try{t=new URL(e)}catch{return`invalid-url`}return t.protocol===`https:`||t.protocol===`http:`&&Al(e)?null:`insecure-scheme`}function Ml(e){let t=e.trim();return t===``?`./`:t}function Nl(e){let t=Ml(e);return t.includes(`\0`)||t.includes(`\\`)?!1:t===`/`?!0:!(t.startsWith(`/`)||/^[A-Za-z]:/.test(t)||t.split(`/`).some(e=>e===`..`))}const Pl=U({content:U({dir:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Folder OpenKnowledge reads and writes documents under, relative to the project root (the folder that contains .ok/). Defaults to the project root. Exclude paths with .okignore.`}).default(`.`),attachmentFolderPath:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Where pasted and dropped assets are stored, relative to the content root. './' colocates beside the current document (default); '/' targets the content root; './subdir' targets a subfolder under the current document folder; 'folder' targets a fixed folder under the content root. Whitespace-only values are treated as './'.`}).refine(Nl,{message:`Invalid attachment folder path: must not contain '..' segments, NUL bytes, backslashes, or OS absolute paths (use '/' for the content root).`}).default(`./`)}).default({dir:`.`,attachmentFolderPath:`./`}),appearance:U({theme:W([`light`,`dark`,`system`]).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Editor color theme: 'light', 'dark', or 'system' (follow the OS). A personal preference (user scope) — not shared with the project.`}).optional(),language:W([`system`,...Yc]).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Interface language. 'system' follows the operating system. A personal preference (user scope) — not shared with the project, and never applied to document content.`}).optional(),colorThemeLight:W(_l).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette applied in light mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), or one of ${Cl()}. A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeDark:W(_l).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`IDE color palette applied in dark mode: 'default' (no palette), 'custom' (your own colors from appearance.customTheme), or one of ${Cl()}. A personal preference (user scope) — not shared with the project.`}).optional(),colorTheme:W(_l).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Superseded by appearance.colorThemeLight / appearance.colorThemeDark. Read as the palette for both modes while neither of those is set. A personal preference (user scope) — not shared with the project.`}).optional(),colorThemeEnabled:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Whether the Themes plugin appears in Settings → Plugins. A personal preference (user scope). Default on.`}).optional(),customTheme:U({name:L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: the scheme's display name.`}).optional(),author:L().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: the scheme's author credit, carried through from an imported base16 scheme.`}).optional(),variant:W([`dark`,`light`]).register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Custom theme: whether the scheme is 'dark' or 'light'. Auto-detected from the palette when omitted.`}).optional(),...Sl()}).optional(),preview:U({autoOpen:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`When on, the agent opens or refreshes the live preview after each edit. Turn off if you manage your own preview window. A personal preference (user scope).`}).default(!0)}).default({autoOpen:!0}),sidebar:U({showHiddenFiles:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show dot-prefixed entries (e.g. .ok/, .okignore) in the file tree. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showOnlyMarkdownFiles:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show only markdown documents (.md/.mdx) and folders in the file tree, hiding other file types from view. View-only: hidden files stay on disk and remain reachable via links and search. Per-machine (project-local) — not shared with collaborators.`}).default(!1),showSkillsSection:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show the Skills section in the sidebar. Skill documents remain reachable via links and search while the section is hidden. Per-machine (project-local) — not shared with collaborators.`}).default(!0),showOkFolders:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show .ok folders (skills, templates, and other OpenKnowledge-managed state) in the file tree as read-only entries. .ok/worktrees and .ok/local never appear. Per-machine (project-local) — not shared with collaborators.`}).default(!1)}).optional()}).default({preview:{autoOpen:!0}}),editor:U({wordWrap:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Soft-wrap long lines in the source (CodeMirror) editor. A personal preference (user scope).`}).default(!0),previewTabs:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Reuse one tab when clicking through the Files and Skills sidebars, the way an editor preview tab works. Turn off to open every click in its own tab. Pinned tabs keep their own tab either way. A personal preference (user scope).`}).default(!0)}).default({wordWrap:!0,previewTabs:!0}),agents:U({autoApproveOkTools:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:"Auto-approve OpenKnowledge's own tools (and `ok open` on Claude) for agents launched from the built-in terminal. Destructive tools (delete/move/share/install) still prompt. Per-machine personal preference (user scope)."}).default(!0)}).default({autoApproveOkTools:!0}),autoSync:U({mode:W(Jo).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`How this machine syncs this project with its git remote: 'off' (no sync), 'follow' (one-directional — pull remote changes, never push your own; 'pull' is accepted as a legacy alias), or 'full' (bidirectional pull and push). null = not chosen yet (onboarding asks). Per-machine (project-local) — not shared. Supersedes the legacy autoSync.enabled boolean.`}).nullable().default(null),enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Legacy per-machine sync toggle, superseded by autoSync.mode. Read only when mode is absent (true = full, false = off). null = not chosen yet. Per-machine (project-local) — not shared.`}).nullable().default(null),resumeMode:W(Yo).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`When sync is paused (autoSync.mode 'off') after having been enabled, the active mode to resume into ('follow' | 'full'). Per-machine UI memory; ignored while a mode is active. Not shared.`}).optional(),default:co([B(),W(Jo)]).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Committed project default for a machine's sync mode on first open: 'off' | 'follow' | 'full', or the legacy boolean (true = full, false = off). null = ask (show the onboarding prompt). Shared via git. A per-machine autoSync.mode choice overrides it.`}).nullable().default(null)}).default({mode:null,enabled:null,default:null}),terminal:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Opt-out for the in-app terminal (a real OS shell at full user privilege). The terminal is on by default; set false to disable it for this project on this machine. Per-machine (project-local) — never shared via git, clone, or sync.`}).nullable().default(null)}).default({enabled:null}),slides:U({enabled:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:"Whether the Slides plugin appears in Settings → Plugins. When on, a document whose frontmatter has `slides: true` offers an action that opens the deck in a dedicated window (desktop only, requires a resolvable slidev). A personal preference (user scope). Default off."}).default(!1)}).default({enabled:!1}),telemetry:U({localSink:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Write local diagnostic spans + logs under .ok/local/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),spans:U({maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic spans file before it rotates (default ~50 MB).`}).default(Tl)}).default({maxBytes:Tl}),logs:U({maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local diagnostic logs file before it rotates (default ~25 MB).`}).default(El)}).default({maxBytes:El}),attributeDenylist:V(L()).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Telemetry attribute keys whose values are redacted before any local span/log is written (credential / secret guard). Extends the built-in denylist.`}).default([...wl])}).default({enabled:!0,spans:{maxBytes:Tl},logs:{maxBytes:El},attributeDenylist:[...wl]}),skillInstallReports:U({enabled:B().register(Q,{scope:`user`,agentSettable:!1,defaultScope:`user`,description:`Report skill installs to skills.sh so a published skill shows an accurate install count. Sends the skill name, its source repo, and which agent tools it was installed for — never file contents, and never for a private or local source. One report per skill per machine. Default on; the DO_NOT_TRACK and DISABLE_TELEMETRY environment variables also turn it off.`}).default(!0)}).default({enabled:!0})}).default({localSink:{enabled:!0,spans:{maxBytes:Tl},logs:{maxBytes:El},attributeDenylist:[...wl]},skillInstallReports:{enabled:!0}}),lossCapture:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Record bridge loss-class events (content-free) under .ok/local/loss-capture/ for `ok diagnose bundle`. Local-only — never leaves the machine until you run bundle. Set false for sensitive workspaces. Shared across collaborators."}).default(!0),maxBytes:z().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Maximum size, in bytes, of the local loss-capture file before it rotates (default ~12 MB).`}).default(Dl)}).default({enabled:!0,maxBytes:Dl}),bridge:U({backgroundThrottle:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Keep the desktop window's timers running at full rate while it holds unsynced work, so backgrounding the app never starves sync or recovery; when the window is idle the OS-default background throttling is restored (battery). Honored by the desktop app. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),deferGuard:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Defer a drain-shaped Observer B re-derive when the WYSIWYG fragment holds an un-propagated keystroke Y.Text lacks, so the keystroke survives instead of being stomped. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),lossDetector:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Detect content the bridge silently dropped at its reconciliation boundary (an Observer-A apply arm or a paired agent-undo derive) and write a recovery checkpoint plus a content-free loss event. Detection only — never blocks a write. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),fixedPoint:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Bound the Y.Text→WYSIWYG re-derive loop with a drain-count backstop: a run of re-derive drains that never reaches a raw-byte fixed point freezes the re-derive loop and writes a recovery checkpoint plus a content-free loss event, instead of churning unbounded. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),preDrain:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Before an agent write or undo rebuilds the WYSIWYG fragment, flush an un-propagated keystroke that provably does not overlap the operation into Y.Text so the keystroke survives instead of needing recovery; overlapping or unmodellable cases fall back to the checkpoint floor. Scope: appending writes and single-frame undos — a write that replaces the whole body (replace / edit) overwrites the keystroke either way, so those always take the checkpoint floor. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0}),flushOnHide:U({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`On tab hide/unload, force-send each doc's unsynced work to the server and commit its local cache, and re-sync on return to foreground, so a backgrounded tab never strands edits that IndexedDB alone would lose on recycle. Honored client-side. Default ON — disable only to isolate a suspected regression.`}).default(!0)}).default({enabled:!0})}).default({backgroundThrottle:{enabled:!0},deferGuard:{enabled:!0},lossDetector:{enabled:!0},fixedPoint:{enabled:!0},preDrain:{enabled:!0},flushOnHide:{enabled:!0}}),search:U({semantic:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Add semantic (embeddings) ranking to the MCP search tool, fused with the lexical engine so conceptually-related pages surface even with no shared keywords. When ON and an API key is set (`ok embeddings set-key`), the search query and matching document content are sent to the configured embeddings provider — content egress. Default OFF. Per-machine (project-local) — not shared with collaborators."}).default(!1),baseUrl:L().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:"Base URL of the OpenAI-compatible embeddings API (default https://api.openai.com/v1). Override to point at a self-hosted server (Ollama / vLLM / LM Studio) or another provider. The API key is NOT stored here — set it with `ok embeddings set-key` (`~/.ok/secrets.yml`); it is sent to whichever endpoint this names."}).default(Ol),model:L().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Embeddings model id (default text-embedding-3-small). Must be served by the provider at baseUrl. Changing it re-embeds the corpus (the cache is keyed by provider + model + dimensions).`}).default(kl),dimensions:z().int().positive().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional output vector dimensions. Omit (recommended) to detect the model's native size from its first response — that is what lets a non-OpenAI model work without knowing its size up front. Set a smaller value (text-embedding-3 supports e.g. 512 / 1024) to shrink the on-disk cache, trading a little retrieval quality; a server that ignores the request param then fails loudly instead of silently. Changing it re-embeds the corpus.`}).optional(),similarityFloor:z().min(0).max(1).register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Optional hard cutoff: drop any "by meaning" match whose cosine similarity is below this value. Off by default (0) because retrieval is rank-based (the closest pages are returned regardless of absolute score) and the right cutoff is model-specific. Set it only to suppress weak matches for a specific provider/model whose cosine scale you know. Most setups should leave it unset and rely on the result-count cap.`}).optional()}).default({enabled:!1,baseUrl:Ol,model:kl})}).default({semantic:{enabled:!1,baseUrl:Ol,model:kl}}),contentRules:U({markdownlint:H({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the markdownlint plugin (body rules) contributes diagnostics.`}).default(!1)}).default({enabled:!1}),frontmatter:H({enabled:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the frontmatter plugin (JSON-Schema validation of document frontmatter) contributes diagnostics.`}).default(!1),schemas:V(H({appliesTo:co([L(),V(L())]).optional(),file:L(),enabled:B().optional()})).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Frontmatter schema mappings: which docs (appliesTo globs) validate against which JSON Schema file (project-root-relative path).`}).default([])}).default({enabled:!1,schemas:[]})}).default({markdownlint:{enabled:!1},frontmatter:{enabled:!1,schemas:[]}}),validation:U({links:W(Zc).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`How broken internal links are reported on the validation plane: 'off' hides them, 'warning' (default) or 'error' sets their severity.`}).default(Qc),fileTreeIndicators:B().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`Whether the file tree tints and badges files that have validation problems.`}).default(!0)}).default({links:Qc,fileTreeIndicators:!0}),linkPreviews:U({enabled:B().register(Q,{scope:`project-local`,agentSettable:!1,defaultScope:`project-local`,description:`Show a rich preview card (site name, page title, description, favicon) when you hover an external link in the editor. When ON, hovering an external link sends that link's URL to the destination site to fetch its preview metadata — outbound egress, one request per previewed link. Default ON; set to false to turn external previews off. Per-machine (project-local) — not shared with collaborators. Previews of links to other documents in this project are read from the local index with no network request and are always on.`}).default(!0)}).default({enabled:!0}),remote:U({url:L().register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:"Public URL your tunnel gives you, e.g. https://myproject.ngrok.app. Used only with `ok start --remote` (config alone never enables remote access); its host is admitted through the Host-header allowlist. There is no server-side auth, so restrict access at the tunnel (ngrok OAuth, Cloudflare Access, Tailscale ACLs)."}).optional(),port:z().int().min(1).max(65535).register(Q,{scope:`project`,agentSettable:!1,defaultScope:`project`,description:`TCP port the server binds when remote access is enabled (default 24550). Fixed so the tunnel's port mapping survives restarts. Set it only on a conflict. An explicit --port still wins; the PORT env var is ignored in remote mode.`}).default(24550)}).default({port:24550})});r();const Fl=`open-knowledge-config`;async function Il(e,t,r){let a=i.getTracer(Fl),o=t?{attributes:t}:{};return a.startActiveSpan(e,o,async e=>{try{return await r(e)}catch(t){throw e.recordException(t),e.setStatus({code:n.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Ll(e,t,r){let a=i.getTracer(Fl),o=t?{attributes:t}:{};return a.startActiveSpan(e,o,e=>{try{return r(e)}catch(t){throw e.recordException(t),e.setStatus({code:n.ERROR,message:t instanceof Error?t.message:String(t)}),t}finally{e.end()}})}function Rl(e,t){let n=i.getActiveSpan();n&&n.addEvent(e,t)}function zl(e){let t=e;for(let e=0;e<16;e++){if(t==null||t?._zod?.def?.shape!==void 0)return t;let e=t?._zod?.def?.innerType;if(e===void 0)return t;t=e}return t}function Bl(e,t){let n=e;for(let e of t){n=zl(n);let t=n?._zod?.def?.shape;if(!t||(n=t[String(e)],n===void 0))return}return n}function Vl(e,t){let n=Bl(e,t);if(n!==void 0)return bl(n)}function Hl(e,t){return e===`either`?!0:e===t}function Ul(e,t){let n=null;function r(e,i){if(n!==null||e===void 0)return;if(typeof e==`object`&&e&&!Array.isArray(e)){for(let[t,a]of Object.entries(e))if(r(a,[...i,t]),n!==null)return;return}let a=Vl(Pl,i);a?.scope!==void 0&&(Hl(a.scope,t)||(n={code:`SCOPE_VIOLATION`,path:i,expectedScope:a.scope,actualScope:t}))}for(let[t,i]of Object.entries(e))if(r(i,[t]),n!==null)break;return n}function Wl(e,t){for(let n=1;n<t.length;n++){let r=t.slice(0,n);e.hasIn(r)&&((0,el.isCollection)(e.getIn(r,!0))||e.deleteIn(r))}}function Gl(e,t){let n=[];function r(t,i){if(t!==void 0){if(t===null){e.deleteIn(i),n.push(i.join(`.`));return}if(Array.isArray(t)){Wl(e,i),e.setIn(i,t),n.push(i.join(`.`));return}if(typeof t==`object`){for(let[e,n]of Object.entries(t))r(n,[...i,e]);return}Wl(e,i),e.setIn(i,t),n.push(i.join(`.`))}}for(let[e,n]of Object.entries(t))r(n,[e]);return n}function Kl(e){return{path:e.path.map(e=>typeof e==`symbol`?String(e):e),message:e.message,issueCode:e.code}}const ql=H({file:L(),line:z().int().min(1),column:z().int().min(1),snippet:L().optional()}),Jl=H({path:V(co([L(),z()])),message:L(),issueCode:L(),params:ho(L(),no()).optional(),source:ql.optional()}),Yl=W([`user`,`project`,`project-local`,`either`]),Xl=W([`user`,`project`,`project-local`]),Zl=H({code:G(`YAML_PARSE`),detail:L()}),Ql=H({code:G(`UNREADABLE`),detail:L()}),$l=H({code:G(`SCHEMA_INVALID`),issues:V(Jl)}),eu=H({code:G(`REMOVED_KEY`),path:V(L()),redirect:L(),source:ql.optional()}),tu=uo(`code`,[Zl,$l,Ql,H({code:G(`SCOPE_VIOLATION`),path:V(L()),expectedScope:Yl,actualScope:Xl}),H({code:G(`NOT_AGENT_SETTABLE`),path:V(L())}),H({code:G(`MIXED_SCOPE`),paths:V(H({path:V(L()),scope:Xl}))}),eu,H({code:G(`WRITE_ERROR`),detail:L()}),H({code:G(`OKIGNORE_INVALID`),detail:L(),lineNumber:z().int().min(1).optional()}),H({code:G(`UNKNOWN`),message:L().optional()})]);uo(`code`,[eu,Zl,$l,Ql]);const nu=H({diagnostics:V(uo(`code`,[H({code:G(`REMOVED_KEY`),scope:Xl,file:L(),path:V(L()),redirect:L()}),H({code:G(`YAML_PARSE`),scope:Xl,file:L()}),H({code:G(`SCHEMA_INVALID`),scope:Xl,file:L()}),H({code:G(`UNREADABLE`),scope:Xl,file:L()})]))}),ru=new Set(tu.options.map(e=>e.shape.code.value)),iu=co([tu,U({code:L(),message:L().optional()})]);function au(e){return ru.has(e.code)}function ou(e){switch(e){case`user`:return`~/.ok/global.yml`;case`project`:return`.ok/config.yml`;case`project-local`:return`.ok/local/config.yml`;case`either`:return`.ok/config.yml or ~/.ok/global.yml`}}function su(e){switch(e){case`user`:return`personal to you, across all projects`;case`project`:return`shared with your team via git`;case`project-local`:return`this machine only, not shared`;case`either`:return`user or project`}}function cu(e){if(!au(e))return e.message??`Unknown error (${e.code}).`;switch(e.code){case`YAML_PARSE`:return`Failed to parse YAML: ${e.detail}`;case`UNREADABLE`:return`Could not read the file: ${e.detail}`;case`SCHEMA_INVALID`:{if(e.issues.length===0)return`Invalid configuration.`;let t=new Map;for(let n of e.issues){let e=n.source?.file??`<no source>`,r=t.get(e)??[];r.push(n),t.set(e,r)}let n=[];for(let[e,r]of t){e===`<no source>`?n.push(`Invalid configuration:`):n.push(`Invalid configuration at ${e}:`);for(let t of r){let r=t.path.length===0?`<root>`:t.path.join(`.`);if(t.source){if(n.push(` ${e}:${t.source.line}:${t.source.column}`),n.push(` ${r}: ${t.message}`),t.source.snippet&&t.source.snippet.length>0)for(let e of t.source.snippet.split(`
180
180
  `))n.push(` ${e}`)}else n.push(` ${r}: ${t.message}`)}}return n.join(`
181
- `)}case`SCOPE_VIOLATION`:return[`Setting ${e.path.join(`.`)} belongs in your ${e.expectedScope} config`,`(${iu(e.expectedScope)} — ${au(e.expectedScope)}),`,`but it was set in the ${e.actualScope} config (${iu(e.actualScope)}).`,`Move it to ${iu(e.expectedScope)}.`].join(` `);case`NOT_AGENT_SETTABLE`:return[`Setting ${e.path.join(`.`)} is human-only and can't be changed by an agent.`,`Change it in the Settings pane, or edit the config.yml by hand.`].join(` `);case`MIXED_SCOPE`:return[`This change touches settings that live in different config files. Apply them one file at a time:`,e.paths.map(({path:e,scope:t})=>` ${e.join(`.`)} → ${iu(t)} (${t})`).join(`
181
+ `)}case`SCOPE_VIOLATION`:return[`Setting ${e.path.join(`.`)} belongs in your ${e.expectedScope} config`,`(${ou(e.expectedScope)} — ${su(e.expectedScope)}),`,`but it was set in the ${e.actualScope} config (${ou(e.actualScope)}).`,`Move it to ${ou(e.expectedScope)}.`].join(` `);case`NOT_AGENT_SETTABLE`:return[`Setting ${e.path.join(`.`)} is human-only and can't be changed by an agent.`,`Change it in the Settings pane, or edit the config.yml by hand.`].join(` `);case`MIXED_SCOPE`:return[`This change touches settings that live in different config files. Apply them one file at a time:`,e.paths.map(({path:e,scope:t})=>` ${e.join(`.`)} → ${ou(t)} (${t})`).join(`
182
182
  `)].join(`
183
183
  `);case`REMOVED_KEY`:{let t=e.path.join(`.`),n=[`${e.source?`Removed key at ${e.source.file}:${e.source.line}:${e.source.column}`:`Removed key in configuration`}: ${t}`,e.redirect];if(e.source?.snippet&&e.source.snippet.length>0)for(let t of e.source.snippet.split(`
184
184
  `))n.push(` ${t}`);return n.join(`
185
- `)}case`WRITE_ERROR`:return`Failed to write config file: ${e.detail}`;case`OKIGNORE_INVALID`:return e.lineNumber===void 0?`.okignore: ${e.detail}`:`.okignore line ${e.lineNumber}: ${e.detail}`;case`UNKNOWN`:return e.message??`Unknown error.`}}function su(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,Qc.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,Qc.isNode)(r))return r}return e.contents??null}function cu(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function lu(e,t,n,r,i){let a=e.split(`
185
+ `)}case`WRITE_ERROR`:return`Failed to write config file: ${e.detail}`;case`OKIGNORE_INVALID`:return e.lineNumber===void 0?`.okignore: ${e.detail}`:`.okignore line ${e.lineNumber}: ${e.detail}`;case`UNKNOWN`:return e.message??`Unknown error.`}}function lu(e,t){if(t.length===0)return e.contents??null;let n=e.getIn(t,!0);if((0,el.isNode)(n))return n;for(let n=t.length-1;n>=0;n--){let r=e.getIn(t.slice(0,n),!0);if((0,el.isNode)(r))return r}return e.contents??null}function uu(e,t){let n=1,r=1,i=Math.min(t,e.length);for(let t=0;t<i;t++)e.charCodeAt(t)===10?(n++,r=1):r++;return{line:n,column:r}}function du(e,t,n,r,i){let a=e.split(`
186
186
  `),o=r-1;if(o<0||o>=a.length)return``;let s=a[o]??``,c=t-(i-1)+s.length,l=Math.max(1,Math.min(n,c)-t),u=[],d=String(o+2).length;for(let e=Math.max(0,o-1);e<=Math.min(a.length-1,o+1);e++){let t=e===o,n=t?`>`:` `,r=String(e+1).padStart(d,` `);if(u.push(`${n} ${r} | ${a[e]??``}`),t){let e=` `.repeat(2+d+3+i-1);u.push(`${e}${`^`.repeat(l)}`)}}return u.join(`
187
- `)}function uu(e){let t=su(e.doc,e.path);if(!t)return;let n=t.range;if(!n)return;let[r,,i=r]=n,{line:a,column:o}=cu(e.source,r),s=(0,Qc.isCollection)(t)?lu(e.source,r,r+1,a,o):lu(e.source,r,i,a,o);return{file:e.file,line:a,column:o,snippet:s.length>0?s:void 0}}const $="Run `ok config migrate` to strip the obsolete key automatically, or remove it by hand.",du=[{path:[`content`,`include`],redirect:[`content.include has been removed.`,`For subdirectory scoping, set content.dir in .ok/config.yml instead.`,`For pattern-based filtering, use .okignore (gitignore syntax — exclude-only; do not copy include patterns directly).`,$].join(` `)},{path:[`content`,`exclude`],redirect:[`Move these patterns to .okignore at the project root (gitignore syntax, 1:1 migration).`,$].join(` `)},{path:[`folders`],redirect:[`folders is no longer a top-level config field.`,"A folder's own frontmatter (open-shape, like a doc's) lives in nested `<folder>/.ok/frontmatter.yml`; new-doc starting properties come from templates in `<folder>/.ok/templates/`.","Edit via the folder overview in the editor sidebar, or `edit({ folder: { path, frontmatter } })` via the MCP.",$].join(` `)},{path:[`appearance`,`editorModeDefault`],redirect:[`appearance.editorModeDefault was removed and is never read — new docs always open in WYSIWYG; toggle mode via the editor mode button.`,$].join(` `)},{path:[`upload`,`maxBytes`],redirect:[`streaming uploads have no user-facing cap; the value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`github`,`oauthAppClientId`],redirect:[`Use the OPEN_KNOWLEDGE_GITHUB_CLIENT_ID environment variable instead.`,$].join(` `)},{path:[`server`,`host`],redirect:[`Use the --host CLI flag or the HOST environment variable instead.`,$].join(` `)},{path:[`server`,`openOnAgentEdit`],redirect:[`This behavior was removed; the value is hardcoded.`,$].join(` `)},{path:[`mcp`,`autoStart`],redirect:[`To disable MCP auto-start, set OK_MCP_AUTOSTART=0.`,$].join(` `)},{path:[`mcp`,`tools`,`read_document`,`historyDepth`],redirect:[`This value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`mcp`,`tools`,`grep`,`maxResults`],redirect:[`This value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`mcp`,`tools`,`search`,`maxResults`],redirect:[`The search result cap is hardcoded in @inkeep/open-knowledge-core; this config key was removed.`,$].join(` `)},{path:[`preview`,`baseUrl`],redirect:["preview URLs now resolve only to the running UI process — start one with `ok ui`.",$].join(` `)},{path:[`preview`,`scriptSrc`],redirect:[`preview.scriptSrc has been removed.`,`The code-block preview iframe now runs a fixed open network policy (it is no longer configurable).`,$].join(` `)},{path:[`appearance`,`sidebar`,`showAllFiles`],redirect:[`appearance.sidebar.showAllFiles has been removed.`,`The sidebar lists every file on disk by default; dot-prefixed entries are gated by appearance.sidebar.showHiddenFiles, and appearance.sidebar.showOnlyMarkdownFiles scopes the tree down to markdown documents as a per-machine view preference.`,$].join(` `)}];function fu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function pu(e,t){let n=e;for(let e=0;e<t.length-1;e++){if(!fu(n))return!1;n=n[t[e]]}return fu(n)?t[t.length-1]in n:!1}function mu(e){let{value:t,file:n,source:r,doc:i}=e;if(!fu(t))return[];let a=[];for(let e of du){if(!pu(t,e.path))continue;let o;i!=null&&r!=null&&n!=null&&(o=uu({file:n,source:r,doc:i,path:e.path})),a.push({code:`REMOVED_KEY`,path:e.path,redirect:e.redirect,...o===void 0?{}:{source:o}})}return a}function hu(e,t){let[n,...r]=t;if(n===void 0)return e;let i={...e};if(r.length===0)return delete i[n],i;let a=i[n];return fu(a)&&(i[n]=hu(a,r)),i}function gu(e){if(!fu(e))return e;let t=e;for(let e of du)pu(t,e.path)&&(t=hu(t,e.path));return t}const _u=`v0`,vu=`.ok/config.yml`,yu=`local`;function bu(e){return new Promise(t=>{setTimeout(t,e)})}export{qa as $,Zc as A,ke as At,xc as B,Cl as C,ra as Ct,jl as D,Cn as Dt,Ol as E,tr as Et,Dc as F,y as Ft,Sc as G,qc as H,wc as I,O as It,gc as J,Kc as K,jc as L,s as Lt,_c as M,Ne as Mt,bc as N,Te as Nt,Al as O,j as Ot,vc as P,D as Pt,es as Q,Ec as R,o as Rt,wl as S,ka as St,kl as T,jr as Tt,kc as U,Ac as V,Oc as W,Ko as X,fc as Y,$o as Z,Pl as _,ho as _t,du as a,B as at,El as b,no as bt,uu as c,Ya as ct,ou as d,G as dt,bo as et,ru as f,U as ft,Il as g,Go as gt,Vl as h,xo as ht,_u as i,V as it,yc as j,je as jt,Xc as k,De as kt,eu as l,po as lt,Wl as m,H as mt,yu as n,Qa as nt,mu as o,Ho as ot,Ul as p,z as pt,Jc as q,vu as r,eo as rt,gu as s,uo as st,bu as t,W as tt,nu as u,Bo as ut,Fl as v,L as vt,Sl as w,ta as wt,Dl as x,ja as xt,Ml as y,co as yt,Tc as z};
188
- //# sourceMappingURL=sleep-ByqzSHar.mjs.map
187
+ `)}function fu(e){let t=lu(e.doc,e.path);if(!t)return;let n=t.range;if(!n)return;let[r,,i=r]=n,{line:a,column:o}=uu(e.source,r),s=(0,el.isCollection)(t)?du(e.source,r,r+1,a,o):du(e.source,r,i,a,o);return{file:e.file,line:a,column:o,snippet:s.length>0?s:void 0}}const $="Run `ok config migrate` to strip the obsolete key automatically, or remove it by hand.",pu=[{path:[`content`,`include`],redirect:[`content.include has been removed.`,`For subdirectory scoping, set content.dir in .ok/config.yml instead.`,`For pattern-based filtering, use .okignore (gitignore syntax — exclude-only; do not copy include patterns directly).`,$].join(` `)},{path:[`content`,`exclude`],redirect:[`Move these patterns to .okignore at the project root (gitignore syntax, 1:1 migration).`,$].join(` `)},{path:[`folders`],redirect:[`folders is no longer a top-level config field.`,"A folder's own frontmatter (open-shape, like a doc's) lives in nested `<folder>/.ok/frontmatter.yml`; new-doc starting properties come from templates in `<folder>/.ok/templates/`.","Edit via the folder overview in the editor sidebar, or `edit({ folder: { path, frontmatter } })` via the MCP.",$].join(` `)},{path:[`appearance`,`editorModeDefault`],redirect:[`appearance.editorModeDefault was removed and is never read — new docs always open in WYSIWYG; toggle mode via the editor mode button.`,$].join(` `)},{path:[`upload`,`maxBytes`],redirect:[`streaming uploads have no user-facing cap; the value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`github`,`oauthAppClientId`],redirect:[`Use the OPEN_KNOWLEDGE_GITHUB_CLIENT_ID environment variable instead.`,$].join(` `)},{path:[`server`,`host`],redirect:[`Use the --host CLI flag or the HOST environment variable instead.`,$].join(` `)},{path:[`server`,`openOnAgentEdit`],redirect:[`This behavior was removed; the value is hardcoded.`,$].join(` `)},{path:[`mcp`,`autoStart`],redirect:[`To disable MCP auto-start, set OK_MCP_AUTOSTART=0.`,$].join(` `)},{path:[`mcp`,`tools`,`read_document`,`historyDepth`],redirect:[`This value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`mcp`,`tools`,`grep`,`maxResults`],redirect:[`This value is hardcoded in @inkeep/open-knowledge-core.`,$].join(` `)},{path:[`mcp`,`tools`,`search`,`maxResults`],redirect:[`The search result cap is hardcoded in @inkeep/open-knowledge-core; this config key was removed.`,$].join(` `)},{path:[`preview`,`baseUrl`],redirect:["preview URLs now resolve only to the running UI process — start one with `ok ui`.",$].join(` `)},{path:[`preview`,`scriptSrc`],redirect:[`preview.scriptSrc has been removed.`,`The code-block preview iframe now runs a fixed open network policy (it is no longer configurable).`,$].join(` `)},{path:[`appearance`,`sidebar`,`showAllFiles`],redirect:[`appearance.sidebar.showAllFiles has been removed.`,`The sidebar lists every file on disk by default; dot-prefixed entries are gated by appearance.sidebar.showHiddenFiles, and appearance.sidebar.showOnlyMarkdownFiles scopes the tree down to markdown documents as a per-machine view preference.`,$].join(` `)}];function mu(e){return typeof e==`object`&&!!e&&!Array.isArray(e)}function hu(e,t){let n=e;for(let e=0;e<t.length-1;e++){if(!mu(n))return!1;n=n[t[e]]}return mu(n)?t[t.length-1]in n:!1}function gu(e){let{value:t,file:n,source:r,doc:i}=e;if(!mu(t))return[];let a=[];for(let e of pu){if(!hu(t,e.path))continue;let o;i!=null&&r!=null&&n!=null&&(o=fu({file:n,source:r,doc:i,path:e.path})),a.push({code:`REMOVED_KEY`,path:e.path,redirect:e.redirect,...o===void 0?{}:{source:o}})}return a}function _u(e,t){let[n,...r]=t;if(n===void 0)return e;let i={...e};if(r.length===0)return delete i[n],i;let a=i[n];return mu(a)&&(i[n]=_u(a,r)),i}function vu(e){if(!mu(e))return e;let t=e;for(let e of pu)hu(t,e.path)&&(t=_u(t,e.path));return t}const yu=`v0`,bu=`.ok/config.yml`,xu=`local`;function Su(e){return new Promise(t=>{setTimeout(t,e)})}export{qa as $,$c as A,ke as At,xc as B,Tl as C,ra as Ct,Nl as D,Cn as Dt,Al as E,tr as Et,Dc as F,y as Ft,Sc as G,qc as H,wc as I,O as It,gc as J,Kc as K,jc as L,s as Lt,_c as M,Ne as Mt,bc as N,Te as Nt,Ml as O,j as Ot,vc as P,D as Pt,es as Q,Ec as R,o as Rt,El as S,ka as St,jl as T,jr as Tt,kc as U,Ac as V,Oc as W,Ko as X,fc as Y,$o as Z,Il as _,ho as _t,pu as a,B as at,Ol as b,no as bt,fu as c,Ya as ct,cu as d,G as dt,bo as et,au as f,U as ft,Rl as g,Go as gt,Ul as h,xo as ht,yu as i,V as it,yc as j,je as jt,Qc as k,De as kt,nu as l,po as lt,Kl as m,H as mt,xu as n,Qa as nt,gu as o,Ho as ot,Gl as p,z as pt,Jc as q,bu as r,eo as rt,vu as s,uo as st,Su as t,W as tt,iu as u,Bo as ut,Ll as v,L as vt,wl as w,ta as wt,kl as x,ja as xt,Pl as y,co as yt,Tc as z};
188
+ //# sourceMappingURL=sleep-DVOInM4H.mjs.map
@@ -0,0 +1 @@
1
+ import{F as e,Fo as t,Ro as n,d as r,es as i,fs as a,js as o,l as s,ns as c,z as l,zo as u}from"./src-DevJlbVv.mjs";import{$ as d,$i as f,$n as p,$r as m,$t as h,A as g,Ai as _,An as v,Ar as y,At as b,B as x,Bi as S,Bn as C,Br as w,Bt as T,C as E,Ci as D,Cn as O,Cr as k,Ct as A,D as j,Di as M,Dn as N,Dr as P,Dt as F,E as I,Ei as L,En as R,Er as z,Et as B,F as V,Fi as H,Fn as U,Ft as W,G,Gi as K,Gn as q,Gr as J,Gt as Y,H as X,Hi as Z,Hn as Q,Hr as $,Ht as ee,I as te,Ii as ne,In as re,It as ie,J as ae,Ji as oe,Jn as se,Jr as ce,Jt as le,K as ue,Ki as de,Kn as fe,Kr as pe,Kt as me,L as he,Li as ge,Ln as _e,Lt as ve,M as ye,Mi as be,Mn as xe,Mr as Se,Mt as Ce,N as we,Ni as Te,Nn as Ee,Nt as De,O as Oe,Oi as ke,On as Ae,Or as je,Ot as Me,P as Ne,Pi as Pe,Pn as Fe,Pt as Ie,Q as Le,Qi as Re,Qn as ze,Qr as Be,Qt as Ve,R as He,Ri as Ue,Rn as We,Rr as Ge,Rt as Ke,S as qe,Si as Je,Sn as Ye,Sr as Xe,St as Ze,T as Qe,Ti as $e,Tn as et,Tr as tt,Tt as nt,U as rt,Ui as it,Un as at,Ur as ot,Ut as st,V as ct,Vi as lt,Vn as ut,Vr as dt,Vt as ft,W as pt,Wi as mt,Wn as ht,Wr as gt,Wt as _t,X as vt,Xi as yt,Xn as bt,Xr as xt,Xt as St,Y as Ct,Yi as wt,Yn as Tt,Yr as Et,Yt as Dt,Z as Ot,Zi as kt,Zn as At,Zr as jt,Zt as Mt,_ as Nt,_a as Pt,_i as Ft,_n as It,_r as Lt,_t as Rt,a as zt,aa as Bt,ai as Vt,an as Ht,ar as Ut,at as Wt,b as Gt,ba as Kt,bi as qt,bn as Jt,br as Yt,bt as Xt,c as Zt,ca as Qt,ci as $t,cn as en,cr as tn,d as nn,da as rn,di as an,dn as on,dr as sn,ea as cn,ei as ln,en as un,er as dn,et as fn,f as pn,fa as mn,fi as hn,fn as gn,fr as _n,g as vn,ga as yn,gi as bn,gn as xn,gr as Sn,gt as Cn,h as wn,ha as Tn,hi as En,hn as Dn,hr as On,ht as kn,i as An,ia as jn,ii as Mn,in as Nn,ir as Pn,it as Fn,j as In,ji as Ln,jn as Rn,jr as zn,jt as Bn,k as Vn,ki as Hn,kn as Un,kr as Wn,kt as Gn,l as Kn,la as qn,li as Jn,ln as Yn,lr as Xn,m as Zn,ma as Qn,mi as $n,mn as er,mr as tr,mt as nr,n as rr,na as ir,ni as ar,nn as or,nr as sr,nt as cr,o as lr,oa as ur,oi as dr,on as fr,or as pr,ot as mr,p as hr,pa as gr,pi as _r,pn as vr,pr as yr,q as br,qi as xr,qn as Sr,qr as Cr,qt as wr,r as Tr,ra as Er,ri as Dr,rn as Or,rr as kr,rt as Ar,s as jr,sa as Mr,si as Nr,sn as Pr,sr as Fr,st as Ir,t as Lr,ta as Rr,ti as zr,tn as Br,tr as Vr,tt as Hr,u as Ur,ua as Wr,ui as Gr,un as Kr,ur as qr,v as Jr,va as Yr,vn as Xr,vr as Zr,vt as Qr,w as $r,wi as ei,wn as ti,wr as ni,wt as ri,x as ii,xi as ai,xn as oi,xr as si,xt as ci,y as li,ya as ui,yi as di,yn as fi,yr as pi,yt as mi,z as hi,zi as gi,zn as _i,zr as vi,zt as yi}from"./src-D8NOF4IF.mjs";import{C as bi,E as xi,T as Si,_ as Ci,b as wi,c as Ti,d as Ei,g as Di,i as Oi,l as ki,m as Ai,n as ji,p as Mi,s as Ni,t as Pi,u as Fi,v as Ii,w as Li,x as Ri,y as zi}from"./fs-traced-By5aY-RE.mjs";import{a as Bi,d as Vi,f as Hi,i as Ui,l as Wi,n as Gi,r as Ki,t as qi,u as Ji}from"./logger-BZPV1wv8.mjs";import{S as Yi,_ as Xi,a as Zi,c as Qi,f as $i,g as ea,h as ta,i as na,l as ra,m as ia,n as aa,o as oa,p as sa,r as ca,s as la,t as ua,u as da,v as fa,x as pa}from"./server-lock-D7MC1H2C.mjs";export{rn as AGENT_ID_MAX_LEN,mn as AGENT_ID_RE,M as AGENT_WRITE_ORIGIN,Yr as AcpPermissionStore,Tn as AcpRegistry,Je as AcpThreadManager,qt as AgentFocusBroadcaster,di as AgentPresenceBroadcaster,ke as AgentSessionCapacityError,Hn as AgentSessionManager,kn as AutoStartDisabledError,Zr as BUNDLE_IDS,pi as BUNDLE_SCOPE,Yt as BUNDLE_SKILL_NAME,Sr as BacklinkIndex,gi as CC1Broadcaster,c as CC1_CONTRACT_VERSION,Kr as CONFIG_FILENAME,ut as CONFLICT_MARKER_RE,w as CURSOR_BUNDLE_PATHS_BY_PLATFORM,Nt as ConfigSchema,K as DEFAULT_CHECKPOINT_RETENTION,Mn as DEFAULT_EMBEDDINGS_DIMENSIONS,W as DEFAULT_PACK_ID,ct as DocumentDurabilityState,Vt as EMBEDDINGS_API_KEY_ENV,yn as FEATURED_AGENT_IDS,de as FILE_SYSTEM_WRITER,q as FILE_WATCHER_ORIGIN,Be as FileEmbeddingsBackend,Mt as GIT_PREFLIGHT_FAIL_SPAN_NAME,xr as GIT_UPSTREAM_WRITER,ui as GitDirAccessError,h as GitNotAvailableError,un as GitTooOldError,Cn as HOCUSPOCUS_AUTH_REJECTION_REASONS,Rt as HocuspocusAuthRejection,Qr as HocuspocusAuthTokenSchema,pe as INSTALLED_AGENTS_SCHEMES,i as LINEAGE_EPOCH_KEY,He as LIVE_DERIVED_INDEX_DEBOUNCE_MS,ie as LOG_MD_TEMPLATE,nt as MANAGED_RENAME_ORIGIN,D as MAX_ACP_THREADS,_ as MAX_AGENT_SESSIONS,$e as MCP_CONNECTION_ID_HEADER,t as MCP_SERVER_NAME,Ln as MIN_EVICTABLE_IDLE_MS,Br as MIN_GIT_VERSION,X as MISSING_OK_CONFIG_MESSAGE,Kt as MalformedGitPointerError,fn as McpLogger,rt as MissingOkConfigError,Te as OBSERVER_SYNC_ORIGIN,on as OK_OKIGNORE_TEMPLATE,n as ORPHAN_MODES,o as PROTOCOL_VERSION,qi as PinoLogger,Qi as ProcessLockCollisionError,Kn as ProjectGitInitError,B as ROLLBACK_ORIGIN,gn as ROOT_GITIGNORE_TEMPLATE,ea as RUNTIME_VERSION,fi as RemoteConfigError,oe as SERVICE_WRITER,yr as SKILL_INSTALL_EVENTS_FILE_REL,e as SKILL_STATE_TARGETS,ve as STARTER_FOLDERS,Ke as STARTER_FOLDER_FRONTMATTER_FILENAME,yi as STARTER_PACKS,T as STARTER_PACK_IDS,ft as STARTER_TEMPLATES,Qe as STATE_MANIFEST_FILENAME,Xi as STATE_SCHEMA_VERSION,a as SYSTEM_DOC_NAME,wr as SeedPrerequisiteError,le as SeedRootDirError,ua as ServerLockCollisionError,Lr as SingleFileNotAFileError,rr as SingleFileNotFoundError,Tr as SingleFileNotMarkdownError,I as StateManifestError,fe as TagIndex,si as USER_GLOBAL_BUNDLE_IDS,Tt as UiLockCollisionError,F as __getShowAllWalkStatsForTesting,Me as __resetShowAllWalkStatsForTesting,ra as acquireProcessLock,aa as acquireServerLock,bt as acquireUiLock,be as applyAgentMarkdownWrite,_i as applyExternalChange,Ie as applySeed,j as assertCompatibleStateManifest,or as assertGitAvailable,N as assertNeverDiskEvent,ai as attachAcpThreadSocket,nr as attachIdleShutdown,Jr as bootServer,dn as buildAndOpenSkill,vr as buildConfigYmlContent,Ct as buildExecResult,ei as buildOkMcpStdioCommand,On as buildSkillZip,ee as buildStarterFolderFrontmatterYaml,wt as buildWipTree,Xe as bundleSkillMdPath,m as canonicalProjectKey,Ae as classifyEvents,Pi as classifyFsPath,ln as clearAllEmbeddingsKeys,Nr as clearContributors,st as coercePackId,s as colorFromSeed,yt as commitUpstreamImport,kt as commitWip,Re as commitWipFromTree,Or as compareSemver,tt as composeEffectiveLinterConfig,z as composeFrontmatterSchemasConfig,Q as containsConflictMarkers,Un as contentHash,$t as contributorCount,Ne as countShadowObjects,V as countStaleAgentWipRefs,te as countWipRefs,Gn as createApiExtension,ri as createAssetServeMiddleware,G as createCollaborationHost,Ge as createContentFilter,vi as createContentFilterAsync,zr as createEmbeddingsSecretStore,An as createEphemeralProjectDir,C as createExternalChangeHandler,pn as createFileLogger,hi as createLiveDerivedIndexExtension,br as createMcpHttpHandler,Cr as createOsProbe,we as createPersistenceExtension,E as createServer,In as createServerObserverExtension,ne as createStreamingErrorWriter,Gi as createTestLogger,ar as describeStoredEmbeddingsKey,vn as detectClaudeDesktopPresence,Nn as detectGit,Oe as detectProjectShape,Vr as detectUserSkillHosts,Ar as discoverLockDirs,Wn as discoverMarkdownlintConfig,Ve as emitPreflightFailureSpan,vt as encodeDocName,Ot as encodeFolderRoute,Le as encodeSkillRoute,Ur as ensureProjectGit,er as ensureProjectSkillGitignore,ge as errorResponse,v as evictStaleTrackerEntries,b as extractHeadings,Fn as extractOkBinaryPath,se as extractWikiLinksFromMarkdown,Ht as fallbackPaths,nn as findEnclosingGitRoot,et as findEnclosingProjectRoot,y as findNativeMarkdownlintFile,hr as flushFileLogger,mi as formatAuthRejectionWire,Jn as formatContributors,Gr as formatContributorsFrom,Ce as formatPackRationale,f as gcCheckpointRefs,Hr as getCurrentMcpLogger,$n as getLocalDir,Zn as getLogFilePath,Ki as getLogger,wn as getLogsDir,fa as getMachineId,zi as getMeter,ur as getMetrics,wi as getTracer,Mr as handleCollabSocketError,dt as handleSpawnCursor,Jt as hasForwardingHeaders,he as hasGcLogLatch,r as iconFromClientName,Qt as incrementCollabSocketFilteredError,qn as incrementServerObserverFire,Dn as initContent,cn as initShadowRepo,Ri as initTelemetry,Gt as initToleranceTelemetryWriter,Ir as installPrettyZodErrors,Ui as installTestLoggers,sr as installUserSkill,Xr as isAllowedApiOrigin,O as isAllowedWorkspaceHostHeader,S as isConfigDoc,Xt as isHocuspocusAuthRejectionReason,_t as isKnownPackId,lt as isLinkIndexExcludedDoc,ti as isLoopbackAddress,Z as isManagedArtifactDoc,u as isOrphanMode,Pe as isPairedWriteOrigin,$ as isPathWithinDir,pa as isProcessAlive,R as isProjectRoot,oi as isRemoteAdmitted,it as isReservedForUserTree,Rn as isSelfWrite,mt as isSystemDoc,ii as isToleranceTelemetryEnabled,Yi as isValidLockPid,xe as lastKnownHash,Rr as listRescueCheckpoints,Y as listStarterPacks,Pt as loadCustomAgents,ye as loadPrincipal,da as lockFilePath,Bi as loggerFactory,Wi as logsCurrentPath,Ji as logsPreviousPath,Dr as makeLazyEmbeddingsKeyStore,ca as markServerLockDraining,pt as mountMcpAndApi,ji as normalizeFsPath,k as originGitHubHost,xn as packageVersionMajorMinor,ci as parseAuthRejectionWire,fr as parseGitVersion,Ze as parseHocuspocusAuthToken,ue as parseKeepaliveConnectionId,Ee as pathToDocName,De as planSeed,zt as prepareSingleFileOpen,Wt as processCommand,mr as processUsage,Pn as readAllTargets,Ut as readBundleDecision,zn as readOwnNativeRules,$i as readProcessLock,sa as readProcessLockDetailed,x as readProjectHeadState,jt as readProjectLocalSemanticConfig,na as readServerLock,pr as readServerPackageVersion,Fr as readSkillInstallStateSnapshot,Vn as readStateManifest,tn as readTargetRecordedAt,Xn as readTargetVersion,At as readUiLock,at as reconcile,an as recordContributor,tr as recordSkillInstallEvent,ae as registerAllTools,Fe as registerWrite,ia as releaseProcessLock,Zi as releaseServerLock,ze as releaseUiLock,U as removeLastKnownHash,kr as reportSkillInstall,Wr as resetMetrics,l as resolveBundleEnabled,Sn as resolveBundledSkillDir,En as resolveContentDir,ot as resolveCursorBinaryDefault,gt as resolveCursorSpawnInvocation,P as resolveEffectiveLinterConfig,dr as resolveEmbeddingsCredential,bn as resolveLockDir,je as resolveNativeConfigForDoc,Se as resolveNativeMarkdownlintConfig,me as resolvePack,jr as resolvePackageVersion,Ye as resolveRemoteAccess,_n as resolveSkillInstallReportSettings,d as resolveUiInfo,hn as restoreContributors,li as restoreLifecycleFromConflictsJson,Et as rewriteMarkdownLinksForDocumentRename,xt as rewriteWikiLinksForDocumentRename,Pr as runAuthReposSubprocess,en as runAuthStatusSubprocess,Dt as runCloneSubprocess,Yn as runDeviceFlowSubprocess,cr as runWithMcpLogger,Ft as safeContentPath,Bn as safeSubdir,ir as safetyCheckpoint,L as sanitizeClientName,Er as saveInMemoryCheckpoint,jn as saveVersion,A as seedBasenameIndex,lr as serializeError,bi as setActiveSpanAttributes,H as setupServerObservers,Bt as shadowGit,Li as shutdownTelemetry,Vi as spansCurrentPath,Hi as spansPreviousPath,J as spawnDetached,ht as splitMarkdownBlocks,re as startWatcher,Ue as streamingProblemEvent,_r as swapContributors,qe as teardownToleranceTelemetryWriter,gr as toBroadcasterKey,Oi as tracedAppendFileSync,Ni as tracedLinkSync,Ti as tracedMkdir,ki as tracedMkdirSync,Fi as tracedRename,Ei as tracedRenameSync,Mi as tracedRmSync,Ai as tracedRmdirSync,Di as tracedUnlinkSync,Ci as tracedWriteFile,Ii as tracedWriteFileSync,$r as trustSystemCertificates,Zt as untrackTrackedProjectSkillProjection,_e as updateLastKnownHash,ta as updateProcessLockPort,oa as updateServerLockPort,p as updateUiLockPort,Qn as validateAgentId,St as validateCloneInputs,Lt as validateSkillZip,la as waitForServerLockDrain,ce as withHiddenWindowsConsole,Si as withSpan,xi as withSpanSync,qr as writeBundleDecision,ni as writeMarkdownlintRule,It as writeRootGitignoreForNewRepo,g as writeStateManifest,sn as writeTargetVersion,We as writeTracker};