@hiai-gg/docsmint 2.1.0 → 2.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +7 -3
  2. package/dist/backend/index.js +49330 -66661
  3. package/dist/backend-account-runtime-cleanup.js +291 -291
  4. package/dist/backend-api-key-facade.js +4 -4
  5. package/dist/backend-pipeline-cancellation.js +285 -285
  6. package/dist/frontend/CategoryDialog-CVJi5PJu.js +602 -0
  7. package/dist/frontend/{ConfirmDialog-B1MjKlVQ.js → ConfirmDialog-0JwB8mKN.js} +5 -8
  8. package/dist/frontend/{CreateSnapshotDialog-BTMoPFdj.js → CreateSnapshotDialog-BLrtuYs5.js} +63 -68
  9. package/dist/frontend/{DatePicker-Bmjko3X7.js → DatePicker-BwSb8TRv.js} +17 -29
  10. package/dist/frontend/{DeleteDialog-BkfIeKXO.js → DeleteDialog-s7Dr6bXg.js} +51 -56
  11. package/dist/frontend/{FolderNode-Do8pIfyA.js → FolderNode-Y7cV9xeX.js} +105 -106
  12. package/dist/frontend/{FolderTreeSelector-FyxhcHjr.js → FolderTreeSelector-BR3lYmPU.js} +18 -20
  13. package/dist/frontend/HiAiEditor-BQERr-cd.js +3077 -0
  14. package/dist/frontend/{HiaiDocsExtensionProvider-Cc3yzW5I.js → HiaiDocsExtensionProvider-A2nGddUR.js} +2 -3
  15. package/dist/frontend/{Icon-3EYzvNyk.js → Icon-CiHcxcpv.js} +1 -2
  16. package/dist/frontend/SettingsDialog-BvS74JZu.js +978 -0
  17. package/dist/frontend/{ShareDialog-Ddvl7xvb.js → ShareDialog-Bo50h_Oe.js} +23 -25
  18. package/dist/frontend/Sidebar-i0kbanpg.js +2123 -0
  19. package/dist/frontend/{TagCreateDialog-DQmMJe_E.js → TagCreateDialog-DhKfsfv3.js} +78 -86
  20. package/dist/frontend/action_cancel-BdsWzQKU.js +4 -0
  21. package/dist/frontend/action_close-CVhfLPRQ.js +4 -0
  22. package/dist/frontend/action_create-ByaroO1_.js +4 -0
  23. package/dist/frontend/action_delete-SRloglWY.js +4 -0
  24. package/dist/frontend/action_go_to-DO1bicF-.js +4 -0
  25. package/dist/frontend/action_loading-iQ0KsN6i.js +4 -0
  26. package/dist/frontend/action_save-DeqrZQwV.js +4 -0
  27. package/dist/frontend/api/attachments.js +1 -2
  28. package/dist/frontend/api/categories.js +1 -2
  29. package/dist/frontend/api/documents.js +1 -2
  30. package/dist/frontend/api/folders.js +1 -2
  31. package/dist/frontend/api/settings.js +1 -2
  32. package/dist/frontend/api/share.js +1 -2
  33. package/dist/frontend/api/tags.js +1 -2
  34. package/dist/frontend/{api-keys-DIwAdYkg.js → api-keys-B63imiLr.js} +2 -3
  35. package/dist/frontend/app-shell.js +55 -79
  36. package/dist/frontend/{attachments-C225gTA7.js → attachments-Bfly-sam.js} +2 -3
  37. package/dist/frontend/{auth-client-C5EyWdAF.js → auth-client-Dx7d9Tzo.js} +252 -253
  38. package/dist/frontend/{bundle-mjs-CZ3g1Uzr.js → bundle-mjs-clTO1WW-.js} +5 -23
  39. package/dist/frontend/{camera-DtgHzfVI.js → camera-DsdOPOcD.js} +2 -3
  40. package/dist/frontend/{categories-C8AAkhCR.js → categories-CusvHb5Y.js} +3 -4
  41. package/dist/frontend/{categories_update_error-4aSI8PTr.js → categories_update_error-Cn8DBBHv.js} +2 -3
  42. package/dist/frontend/{check-DVx65aSv.js → check-DiMZRkKS.js} +2 -3
  43. package/dist/frontend/{chevron-down-C2tbZ8Ol.js → chevron-down-CxFrMFDJ.js} +2 -3
  44. package/dist/frontend/{circle-check-BAN-D7yg.js → circle-check-B4F_qgPx.js} +2 -3
  45. package/dist/frontend/{client-GbtOH90i.js → client-BDdDd84W.js} +1 -2
  46. package/dist/frontend/{clipboard-Cgzxc0_R.js → clipboard-Dt1oW6nm.js} +1 -2
  47. package/dist/frontend/{clock-ByiB0SwQ.js → clock-dcpueRk-.js} +2 -3
  48. package/dist/frontend/collaboration.js +6 -12
  49. package/dist/frontend/components/category-dialog.js +1 -2
  50. package/dist/frontend/components/create-snapshot-dialog.js +1 -2
  51. package/dist/frontend/components/delete-dialog.js +1 -2
  52. package/dist/frontend/components/editor/compact-editor.js +2 -3
  53. package/dist/frontend/components/editor/document-editor.js +1 -2
  54. package/dist/frontend/components/editor/document-title.js +3 -4
  55. package/dist/frontend/components/editor/docx-serializer.js +123 -167
  56. package/dist/frontend/components/editor/extensions.js +1 -2
  57. package/dist/frontend/components/editor/markdown-toggle.js +5 -6
  58. package/dist/frontend/components/editor/markdown.js +1 -2
  59. package/dist/frontend/components/folder-node.js +1 -2
  60. package/dist/frontend/components/folder-tree-selector.js +1 -2
  61. package/dist/frontend/components/save-as-dialog.js +86 -90
  62. package/dist/frontend/components/settings.js +1 -2
  63. package/dist/frontend/components/share-dialog.js +1 -2
  64. package/dist/frontend/components/sidebar.js +1 -2
  65. package/dist/frontend/components/tag-create-dialog.js +1 -2
  66. package/dist/frontend/components/version-history.js +177 -180
  67. package/dist/frontend/{context-D0zPFXZ4.js → context-BguSRnCt.js} +1 -2
  68. package/dist/frontend/{copy-CRzvfZGb.js → copy-Bag46YaR.js} +2 -3
  69. package/dist/frontend/dashboard.js +666 -690
  70. package/dist/frontend/{db-CgTtukT4.js → db-B1ZV452J.js} +22 -39
  71. package/dist/frontend/{dialog-a_ZcpEC5.js → dialog-C0Bpok1d.js} +10 -18
  72. package/dist/frontend/{dist-CcHOStsA.js → dist-BlcV_BOY.js} +2 -3
  73. package/dist/frontend/{dist-qd_OnyUC.js → dist-DjId3RKL.js} +8 -21
  74. package/dist/frontend/dist-Dl9qg10h.js +301 -0
  75. package/dist/frontend/{dndzone-CDhrbpTg.js → dndzone-C62yjeG3.js} +38 -53
  76. package/dist/frontend/doc-tabs.js +1 -2
  77. package/dist/frontend/doc_title_label-BOuZzvqv.js +4 -0
  78. package/dist/frontend/doc_title_placeholder-ZxpdWWEn.js +4 -0
  79. package/dist/frontend/{document-drop-coordinator-Da7HcXgv.js → document-drop-coordinator-C_o93kKW.js} +3 -4
  80. package/dist/frontend/document-drop-coordinator.js +1 -2
  81. package/dist/frontend/{documents-CwCs1rA7.js → documents-CDJb8dv-.js} +4 -8
  82. package/dist/frontend/{dropdown-menu-DrHYReIC.js → dropdown-menu-B3nk2aM-.js} +13 -24
  83. package/dist/frontend/{editor-content-sanitizer-CWjqiz0T.js → editor-content-sanitizer-5MjSVPVn.js} +1 -2
  84. package/dist/frontend/editor-preferences.js +1 -2
  85. package/dist/frontend/{editor-preferences.svelte-Bt_A9k7n.js → editor-preferences.svelte-BpTE4mbz.js} +3 -5
  86. package/dist/frontend/{editorExtensions-DPR-CjMu.js → editorExtensions-DbiFj4tn.js} +3 -4
  87. package/dist/frontend/{editor_markdown_placeholder-BIWDUF1E.js → editor_markdown_placeholder-BztIY9Ci.js} +2 -3
  88. package/dist/frontend/{ellipsis-vertical-qxNgoXu-.js → ellipsis-vertical-Oymsv1R4.js} +2 -3
  89. package/dist/frontend/{error_dismiss-Dx_JbRjs.js → error_dismiss-C651ZdWI.js} +2 -3
  90. package/dist/frontend/error_generic-BlWqOE-a.js +4 -0
  91. package/dist/frontend/extension.js +1 -2
  92. package/dist/frontend/{folder-D74E-Kdp.js → folder-BpmB_sAy.js} +3 -5
  93. package/dist/frontend/folder-refresh.js +1 -2
  94. package/dist/frontend/{folders-CC0UWkZH.js → folders-DgKSovXa.js} +2 -3
  95. package/dist/frontend/{folders_rename-BJo4Gipq.js → folders_rename-Cxbg5GIw.js} +2 -3
  96. package/dist/frontend/frontend.css +1 -1
  97. package/dist/frontend/i18n.js +144 -145
  98. package/dist/frontend/{identity-CNhtuCJV.js → identity-B7HeOzDJ.js} +4 -5
  99. package/dist/frontend/{input-Q_7qCfnU.js → input-CbeB9220.js} +2 -3
  100. package/dist/frontend/keyboard.js +1 -2
  101. package/dist/frontend/{keyboard.svelte-CApmX0vl.js → keyboard.svelte-BBUdhTsM.js} +2 -3
  102. package/dist/frontend/{label-Dj8FDEhf.js → label-CfBWf3gI.js} +2 -3
  103. package/dist/frontend/{lib-aUbBbIW2.js → lib-CITdCbKa.js} +176 -365
  104. package/dist/frontend/{loader-circle-D3t5NkvC.js → loader-circle-skKwfRCB.js} +2 -3
  105. package/dist/frontend/markdown-6E9TWC6V.js +11 -0
  106. package/dist/frontend/offline/identity.js +1 -2
  107. package/dist/frontend/{popper-layer-force-mount-CNtiLgbV.js → popper-layer-force-mount-BG0eyrCk.js} +112 -284
  108. package/dist/frontend/{resolve-BG4HgzpN.js → resolve-DbT-KhGZ.js} +2 -3
  109. package/dist/frontend/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-CwxnZyOB.js} +2 -3
  110. package/dist/frontend/{rotate-ccw-B1ybQ8oQ.js → rotate-ccw-DAUX7np7.js} +2 -3
  111. package/dist/frontend/{route-context-DYQlUfzL.js → route-context-6OHiGtfb.js} +2 -4
  112. package/dist/frontend/{runtime-CwWSo6c9.js → runtime-CGUiMzK6.js} +1 -2
  113. package/dist/frontend/{schemas-1Na35n71.js → schemas-YXxhj5o8.js} +850 -880
  114. package/dist/frontend/scroll_to_top_aria-lJc2RSx_.js +4 -0
  115. package/dist/frontend/{search-preferences-B1GdbdUc.js → search-preferences-DuLDczRu.js} +1 -2
  116. package/dist/frontend/search.js +277 -292
  117. package/dist/frontend/{search_title-DOC0cPlQ.js → search_title-BETwQYJq.js} +2 -3
  118. package/dist/frontend/{select-value-BkI1W1bn.js → select-value-BY5Hw6Rl.js} +28 -65
  119. package/dist/frontend/{settings-CHx4wBwb.js → settings-DyePuqjp.js} +3 -4
  120. package/dist/frontend/{share-D5yo0JOh.js → share-3gWTTYvH.js} +2 -3
  121. package/dist/frontend/{share-context-BJ4GF4yT.js → share-context-C2xyVP9M.js} +29 -37
  122. package/dist/frontend/{share_copied-DPxVzfWh.js → share_copied-BuAnmpbz.js} +2 -3
  123. package/dist/frontend/{share_toggle_password-DdxfIjj1.js → share_toggle_password-LEYUeHWr.js} +2 -3
  124. package/dist/frontend/shared-document.js +27 -36
  125. package/dist/frontend/{sidebar_uncategorized-qJ2_Aonf.js → sidebar_uncategorized-C5PGOflV.js} +2 -3
  126. package/dist/frontend/{sort_relevance-DwYX5MO9.js → sort_relevance-DpCVLby_.js} +2 -3
  127. package/dist/frontend/{subfolders-refresh-store.svelte-DxP21a1c.js → subfolders-refresh-store.svelte-CeyqvNpu.js} +1 -2
  128. package/dist/frontend/{tag-qbTBLj-g.js → tag-Wdfe0rKU.js} +3 -5
  129. package/dist/frontend/{tag-store.svelte-ogVCMCbv.js → tag-store.svelte-C9VYWqLQ.js} +2 -3
  130. package/dist/frontend/{tags-CF_cqzSV.js → tags-DlDVothf.js} +3 -4
  131. package/dist/frontend/{tags_load_error-BKjA1pI0.js → tags_load_error-BINNpPPV.js} +2 -3
  132. package/dist/frontend/{tags_new-BiNAJ9Bx.js → tags_new-Dw0Uy43-.js} +2 -3
  133. package/dist/frontend/{textarea-BNK0LFUK.js → textarea-D6emvAwM.js} +2 -3
  134. package/dist/frontend/theme.js +2 -3
  135. package/dist/frontend/{theme.svelte-BRdxXd-B.js → theme.svelte-BiXvrqwh.js} +7 -23
  136. package/dist/frontend/{theme_system-BBNUhYKh.js → theme_system-YIfa_2Xt.js} +2 -3
  137. package/dist/frontend/utils/clipboard.js +1 -2
  138. package/dist/frontend/utils/dndzone.js +1 -2
  139. package/dist/frontend/{utils-BovMJHdA.js → utils-CnAmIMwr.js} +2 -3
  140. package/dist/frontend/utils-DH0uqK40.js +6 -0
  141. package/dist/frontend/utils.js +1 -2
  142. package/dist/frontend/version_create_snapshot-D8xjbuCq.js +4 -0
  143. package/dist/frontend/{version_restored_from-dVRN3Zdk.js → version_restored_from-DYFFSuQj.js} +2 -3
  144. package/dist/frontend/{version_snapshot_label_placeholder-DrMikux0.js → version_snapshot_label_placeholder-BhKq1NQ7.js} +2 -3
  145. package/dist/frontend/{weekday_we-C5H_M-df.js → weekday_we-BxbzNVWR.js} +2 -3
  146. package/dist/frontend/{x-CvSSnrjl.js → x-CBUgPygC.js} +2 -3
  147. package/dist/frontend/{yjs-VUcKqaKW.js → yjs-BbwnvxgY.js} +9 -23
  148. package/dist/frontend-ssr/api/attachments.js +2 -3
  149. package/dist/frontend-ssr/api/categories.js +1 -2
  150. package/dist/frontend-ssr/api/documents.js +1 -2
  151. package/dist/frontend-ssr/api/folders.js +1 -2
  152. package/dist/frontend-ssr/api/settings.js +1 -2
  153. package/dist/frontend-ssr/api/share.js +2 -3
  154. package/dist/frontend-ssr/api/tags.js +1 -2
  155. package/dist/frontend-ssr/app-shell.js +19 -28
  156. package/dist/frontend-ssr/assets/{CategoryDialog-DuZLLlt7.js → CategoryDialog-2CCX508O.js} +17 -20
  157. package/dist/frontend-ssr/assets/{ConfirmDialog-0WVu9BCE.js → ConfirmDialog-Cc6lcY1N.js} +8 -14
  158. package/dist/frontend-ssr/assets/{CreateSnapshotDialog-3vhDTFNu.js → CreateSnapshotDialog-BB8fXF9W.js} +9 -10
  159. package/dist/frontend-ssr/assets/{DatePicker-t12leL2Y.js → DatePicker-CfzKzipR.js} +9 -15
  160. package/dist/frontend-ssr/assets/{DeleteDialog-B0AU1fJR.js → DeleteDialog-DRU4UgOW.js} +4 -5
  161. package/dist/frontend-ssr/assets/{FolderNode-C-B-s8x1.js → FolderNode-Dg_5-orQ.js} +11 -12
  162. package/dist/frontend-ssr/assets/{FolderTreeSelector-DdQuEcj0.js → FolderTreeSelector-D0reTdFS.js} +5 -7
  163. package/dist/frontend-ssr/assets/{HiAiEditor-Cj3B2Dt6.js → HiAiEditor-DeHWAIj-.js} +44 -69
  164. package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-BRKWmcDd.js → HiaiDocsExtensionProvider-D6cGL-9s.js} +2 -3
  165. package/dist/frontend-ssr/assets/{Icon-DE_3EnuF.js → Icon-CrIRbT5O.js} +4 -8
  166. package/dist/frontend-ssr/assets/{SettingsDialog-DAT-Zxu0.js → SettingsDialog-BpHY3IMb.js} +29 -40
  167. package/dist/frontend-ssr/assets/{ShareDialog-CpE9zd_f.js → ShareDialog-CY40nWZJ.js} +7 -9
  168. package/dist/frontend-ssr/assets/{Sidebar-B_Ey6QNL.js → Sidebar-fpYk5MGO.js} +55 -63
  169. package/dist/frontend-ssr/assets/{TagCreateDialog-DBHO1DPU.js → TagCreateDialog-C2tpdEuj.js} +13 -14
  170. package/dist/frontend-ssr/assets/{action_cancel-OVgQDP5Q.js → action_cancel-CsBbxW0m.js} +2 -3
  171. package/dist/frontend-ssr/assets/{action_close-DagDyMXk.js → action_close-lFKBqBwg.js} +2 -3
  172. package/dist/frontend-ssr/assets/{action_create-hqJWjyqh.js → action_create-BV4ZOcQW.js} +2 -3
  173. package/dist/frontend-ssr/assets/{action_delete-B1-16jSo.js → action_delete-CNmRhKQP.js} +2 -3
  174. package/dist/frontend-ssr/assets/{action_go_to-DQScgw7P.js → action_go_to-tN5I26xM.js} +2 -3
  175. package/dist/frontend-ssr/assets/{action_save-Bx7vlLZI.js → action_save-YCfMiKb4.js} +2 -3
  176. package/dist/frontend-ssr/assets/{api-keys-CHOrbU-Q.js → api-keys-G6oimJIv.js} +2 -3
  177. package/dist/frontend-ssr/assets/{auth-client-CITU3xkE.js → auth-client-BnnnJDAb.js} +102 -71
  178. package/dist/frontend-ssr/assets/{camera-B6ldo_Js.js → camera-OYNSMvMd.js} +2 -3
  179. package/dist/frontend-ssr/assets/{categories-C_dxFoHi.js → categories-bBPviKjl.js} +2 -3
  180. package/dist/frontend-ssr/assets/{categories_update_error-DkKgsqdD.js → categories_update_error-Bfx5vtvt.js} +11 -21
  181. package/dist/frontend-ssr/assets/{chevron-down-DQcr6JUc.js → chevron-down-DB6YsSbQ.js} +2 -3
  182. package/dist/frontend-ssr/assets/{chevron-right-9szrliZx.js → chevron-right-DOt2uY6b.js} +2 -3
  183. package/dist/frontend-ssr/assets/{circle-check-BgP9MRRv.js → circle-check-DQhTm9YR.js} +2 -3
  184. package/dist/frontend-ssr/assets/{client-rfwQYYHY.js → client-B2AniXwV.js} +1 -2
  185. package/dist/frontend-ssr/assets/{clipboard-CXOaoz2W.js → clipboard-CXKnyYba.js} +1 -2
  186. package/dist/frontend-ssr/assets/{clock-roNtGlT6.js → clock-B08dVWtf.js} +2 -3
  187. package/dist/frontend-ssr/assets/{context-Bi_mO-NS.js → context-C_xxvxnR.js} +1 -2
  188. package/dist/frontend-ssr/assets/{copy-BYqYnBIQ.js → copy-2jsznHar.js} +2 -3
  189. package/dist/frontend-ssr/assets/{db-DxRzq-kx.js → db-BEKLU5Fc.js} +2 -3
  190. package/dist/frontend-ssr/assets/{dialog-SqCnTT43.js → dialog-C6U-DqLr.js} +9 -17
  191. package/dist/frontend-ssr/assets/{dist-CaZQ1FhA.js → dist-DqXTz_zE.js} +9 -12
  192. package/dist/frontend-ssr/assets/{dist-CqxHwOlp.js → dist-ip9bPdma.js} +3 -6
  193. package/dist/frontend-ssr/assets/{dndzone-CnTCMhPd.js → dndzone-Dx3jt_e4.js} +4 -6
  194. package/dist/frontend-ssr/assets/{doc_title_label-Ev_ltlh3.js → doc_title_label-CE_l-Gum.js} +2 -3
  195. package/dist/frontend-ssr/assets/{doc_title_placeholder-DSHpUb7w.js → doc_title_placeholder-7_i7PtG6.js} +2 -3
  196. package/dist/frontend-ssr/assets/{document-drop-coordinator-CEaYACsC.js → document-drop-coordinator-BVytYy2K.js} +1 -2
  197. package/dist/frontend-ssr/assets/{documents-CEuA1V6N.js → documents-B_wpQFTh.js} +2 -3
  198. package/dist/frontend-ssr/assets/{dropdown-menu-CE6U0f1b.js → dropdown-menu-BS5fcN9l.js} +12 -23
  199. package/dist/frontend-ssr/assets/{editor-content-sanitizer-Gjm93iR-.js → editor-content-sanitizer-CIdFjBSC.js} +1 -2
  200. package/dist/frontend-ssr/assets/{editor-preferences.svelte-iI5jJM1x.js → editor-preferences.svelte-CdAXTd-I.js} +2 -4
  201. package/dist/frontend-ssr/assets/{editorExtensions-rhletNji.js → editorExtensions-2O7O2Nhv.js} +2 -3
  202. package/dist/frontend-ssr/assets/{editor_markdown_placeholder-BpezdkOr.js → editor_markdown_placeholder-CAeLJjFT.js} +3 -5
  203. package/dist/frontend-ssr/assets/{editor_toolbar_undo-CKJAOqv2.js → editor_toolbar_undo-CVCfQIS1.js} +29 -57
  204. package/dist/frontend-ssr/assets/{ellipsis-vertical-Cg1MrZsl.js → ellipsis-vertical-IFHt2NM1.js} +2 -3
  205. package/dist/frontend-ssr/assets/{error_generic-DTK0kwxT.js → error_generic-BB80i0Vk.js} +3 -5
  206. package/dist/frontend-ssr/assets/{folder-DHB-CEcQ.js → folder-CXa1_bm5.js} +2 -3
  207. package/dist/frontend-ssr/assets/{folders-BOXeb9hz.js → folders-CTLqWbMm.js} +2 -3
  208. package/dist/frontend-ssr/assets/{folders_rename-DvciOb6K.js → folders_rename-ydbfwQlj.js} +7 -13
  209. package/dist/frontend-ssr/assets/{identity-B7ngLQzZ.js → identity-DTz1SQwC.js} +2 -3
  210. package/dist/frontend-ssr/assets/{input-DVrBVPgs.js → input-Bxw9sFF0.js} +2 -3
  211. package/dist/frontend-ssr/assets/{keyboard.svelte-BgF47N3L.js → keyboard.svelte-njehUCm3.js} +1 -2
  212. package/dist/frontend-ssr/assets/{label-vtCK3pTp.js → label-CMWedjs6.js} +2 -3
  213. package/dist/frontend-ssr/assets/{loader-circle-D3NWhCif.js → loader-circle-zbKj9Qb-.js} +2 -3
  214. package/dist/frontend-ssr/assets/{markdown-Co31-Tl2.js → markdown-BmIhDQp7.js} +2 -3
  215. package/dist/frontend-ssr/assets/{popper-layer-force-mount-C4dMMt-f.js → popper-layer-force-mount-CSHZsG2E.js} +78 -156
  216. package/dist/frontend-ssr/assets/{resolve-BqHozBXl.js → resolve-Wqdff4CL.js} +1 -2
  217. package/dist/frontend-ssr/assets/{rotate-ccw-DNf3nwMD.js → rotate-ccw-B7SaTFWf.js} +2 -3
  218. package/dist/frontend-ssr/assets/{route-context-BPRerEtZ.js → route-context-BsqLFt5Y.js} +2 -4
  219. package/dist/frontend-ssr/assets/{runtime-O78RzRqx.js → runtime-BX6-jTn_.js} +1 -2
  220. package/dist/frontend-ssr/assets/{scroll_to_top_aria-BN4ZfOnM.js → scroll_to_top_aria-CAYSiGHO.js} +2 -3
  221. package/dist/frontend-ssr/assets/{search_title-CKUsQDT0.js → search_title-C7NVXXq3.js} +2 -3
  222. package/dist/frontend-ssr/assets/{search_toggle_filters-hS9rvQhC.js → search_toggle_filters-Bq_YVD8s.js} +15 -29
  223. package/dist/frontend-ssr/assets/{select-value-Ce5c_fuA.js → select-value-TgslfiUB.js} +18 -34
  224. package/dist/frontend-ssr/assets/{settings-BRxvn30Y.js → settings-B1MA_FjO.js} +3 -4
  225. package/dist/frontend-ssr/assets/{share-context-B4UpvTSw.js → share-context-RVh8AExX.js} +17 -22
  226. package/dist/frontend-ssr/assets/{share_copied-BxU9rjXG.js → share_copied-CrwEwkb3.js} +31 -61
  227. package/dist/frontend-ssr/assets/{share_toggle_password-C6OmroqR.js → share_toggle_password-Co56z0Ha.js} +11 -21
  228. package/dist/frontend-ssr/assets/{sidebar_uncategorized-Dx-LTd5w.js → sidebar_uncategorized-COWdmZ3d.js} +6 -11
  229. package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-CXHxQWKh.js → subfolders-refresh-store.svelte-LxG18U0n.js} +1 -2
  230. package/dist/frontend-ssr/assets/{tag-Cqv0fWVG.js → tag-BGhtDKpP.js} +3 -5
  231. package/dist/frontend-ssr/assets/{tag-store.svelte-QRysvGKe.js → tag-store.svelte-CUUgAaDD.js} +2 -3
  232. package/dist/frontend-ssr/assets/{tags-BBCoFYro.js → tags-C7u-LBsl.js} +2 -3
  233. package/dist/frontend-ssr/assets/{tags_load_error-CPrc6Gzs.js → tags_load_error-DW4FbHvr.js} +19 -37
  234. package/dist/frontend-ssr/assets/{tags_new-VmMr9v2V.js → tags_new-Dr3ByMPZ.js} +4 -7
  235. package/dist/frontend-ssr/assets/{textarea-BdjOJJVb.js → textarea-Bz5Tz4rw.js} +2 -3
  236. package/dist/frontend-ssr/assets/{theme.svelte-D6bbaJ9m.js → theme.svelte-CdHah46l.js} +3 -5
  237. package/dist/frontend-ssr/assets/{theme_system-BucaNntV.js → theme_system-E97FASeq.js} +19 -37
  238. package/dist/frontend-ssr/assets/{utils-DvZnctjz.js → utils-085zSPe5.js} +1 -2
  239. package/dist/frontend-ssr/assets/{utils-D3X7I8nz.js → utils-DF6CmRDX.js} +1 -2
  240. package/dist/frontend-ssr/assets/{version_create_snapshot-COHzwjle.js → version_create_snapshot-DeeYB7bb.js} +2 -3
  241. package/dist/frontend-ssr/assets/{version_restored_from-CertjFDl.js → version_restored_from-CTt2LM4A.js} +13 -25
  242. package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-Cy_rMCij.js → version_snapshot_label_placeholder-BbGD9YuN.js} +12 -23
  243. package/dist/frontend-ssr/assets/{weekday_we-DrI3U230.js → weekday_we-BzGQ-iFc.js} +22 -43
  244. package/dist/frontend-ssr/collaboration.js +2 -4
  245. package/dist/frontend-ssr/components/category-dialog.js +1 -2
  246. package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -2
  247. package/dist/frontend-ssr/components/delete-dialog.js +1 -2
  248. package/dist/frontend-ssr/components/editor/compact-editor.js +2 -3
  249. package/dist/frontend-ssr/components/editor/document-editor.js +1 -2
  250. package/dist/frontend-ssr/components/editor/document-title.js +3 -4
  251. package/dist/frontend-ssr/components/editor/docx-serializer.js +1 -2
  252. package/dist/frontend-ssr/components/editor/extensions.js +1 -2
  253. package/dist/frontend-ssr/components/editor/markdown-toggle.js +4 -5
  254. package/dist/frontend-ssr/components/editor/markdown.js +1 -2
  255. package/dist/frontend-ssr/components/folder-node.js +1 -2
  256. package/dist/frontend-ssr/components/folder-tree-selector.js +1 -2
  257. package/dist/frontend-ssr/components/save-as-dialog.js +12 -13
  258. package/dist/frontend-ssr/components/settings.js +1 -2
  259. package/dist/frontend-ssr/components/share-dialog.js +1 -2
  260. package/dist/frontend-ssr/components/sidebar.js +1 -2
  261. package/dist/frontend-ssr/components/tag-create-dialog.js +1 -2
  262. package/dist/frontend-ssr/components/version-history.js +18 -21
  263. package/dist/frontend-ssr/dashboard.js +64 -88
  264. package/dist/frontend-ssr/doc-tabs.js +1 -2
  265. package/dist/frontend-ssr/document-drop-coordinator.js +1 -2
  266. package/dist/frontend-ssr/editor-preferences.js +1 -2
  267. package/dist/frontend-ssr/extension.js +1 -2
  268. package/dist/frontend-ssr/folder-refresh.js +1 -2
  269. package/dist/frontend-ssr/i18n.js +315 -603
  270. package/dist/frontend-ssr/keyboard.js +1 -2
  271. package/dist/frontend-ssr/offline/identity.js +1 -2
  272. package/dist/frontend-ssr/search.js +17 -20
  273. package/dist/frontend-ssr/shared-document.js +5 -8
  274. package/dist/frontend-ssr/theme.js +2 -3
  275. package/dist/frontend-ssr/utils/clipboard.js +1 -2
  276. package/dist/frontend-ssr/utils/dndzone.js +1 -2
  277. package/dist/frontend-ssr/utils.js +1 -2
  278. package/dist/lifecycle-runtime.js +3996 -17873
  279. package/dist/mcp-cli.js +64 -64
  280. package/dist/mcp-server.js +68 -68
  281. package/package.json +4 -4
  282. package/packages/cli/src/index.ts +1 -1
  283. package/server.json +2 -2
  284. package/dist/frontend/CategoryDialog-CJeAYxcd.js +0 -630
  285. package/dist/frontend/HiAiEditor-D6ad_auS.js +0 -3129
  286. package/dist/frontend/SettingsDialog-B8Oswuqb.js +0 -991
  287. package/dist/frontend/Sidebar-BV0IDqTS.js +0 -2149
  288. package/dist/frontend/action_cancel-Cuxsznzz.js +0 -5
  289. package/dist/frontend/action_close-BJm_52wm.js +0 -5
  290. package/dist/frontend/action_create-CtBQrRuj.js +0 -5
  291. package/dist/frontend/action_delete-BXBIzvn0.js +0 -5
  292. package/dist/frontend/action_go_to-VmK5jmEk.js +0 -5
  293. package/dist/frontend/action_loading-BLCGJVA9.js +0 -5
  294. package/dist/frontend/action_save-BRN2Z_GP.js +0 -5
  295. package/dist/frontend/dist-DcHl92QO.js +0 -316
  296. package/dist/frontend/doc_title_label-DS9jSIh2.js +0 -5
  297. package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +0 -5
  298. package/dist/frontend/error_generic-CzNtmBT4.js +0 -5
  299. package/dist/frontend/markdown-O9YJA70S.js +0 -12
  300. package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +0 -5
  301. package/dist/frontend/utils-BlHvR6OL.js +0 -7
  302. package/dist/frontend/version_create_snapshot-3bu-0qzH.js +0 -5
package/dist/mcp-cli.js CHANGED
@@ -58,16 +58,16 @@ function diagnostics(tool, input, schemaValue, issues) {
58
58
  }
59
59
  fields(schema);
60
60
  const args = object(input) ?? {};
61
- const selector = ["mode", "action", "view", "kind"].find((key) => branches.some((branch2) => {
62
- const property = object(object(branch2.properties)?.[key]);
61
+ const selector = ["mode", "action", "view", "kind"].find((key) => branches.some((branch) => {
62
+ const property = object(object(branch.properties)?.[key]);
63
63
  return property && (typeof property.const === "string" || Array.isArray(property.enum));
64
64
  }));
65
- const variants = branches.map((branch2) => {
66
- const property = selector ? object(object(branch2.properties)?.[selector]) : undefined;
65
+ const variants = branches.map((branch) => {
66
+ const property = selector ? object(object(branch.properties)?.[selector]) : undefined;
67
67
  const values = property && typeof property.const === "string" ? [property.const] : Array.isArray(property?.enum) ? property.enum.filter((value) => typeof value === "string") : [];
68
68
  return {
69
69
  values,
70
- required: Array.isArray(branch2.required) ? branch2.required.filter((value) => typeof value === "string" && knownFields.has(value)) : []
70
+ required: Array.isArray(branch.required) ? branch.required.filter((value) => typeof value === "string" && knownFields.has(value)) : []
71
71
  };
72
72
  });
73
73
  const selected = selector ? args[selector] : undefined;
@@ -1244,11 +1244,11 @@ function mergePropertyVariants(values) {
1244
1244
  }
1245
1245
  function hoistObjectUnionClosure(schema) {
1246
1246
  const variants = schema.oneOf;
1247
- if (!Array.isArray(variants) || !variants.every((variant2) => typeof variant2 === "object" && variant2 !== null && variant2.type === "object" && variant2.additionalProperties === false && typeof variant2.properties === "object" && variant2.properties !== null))
1247
+ if (!Array.isArray(variants) || !variants.every((variant) => typeof variant === "object" && variant !== null && variant.type === "object" && variant.additionalProperties === false && typeof variant.properties === "object" && variant.properties !== null))
1248
1248
  return schema;
1249
1249
  const propertyVariants = new Map;
1250
- for (const variant2 of variants) {
1251
- for (const [key, property] of Object.entries(variant2.properties)) {
1250
+ for (const variant of variants) {
1251
+ for (const [key, property] of Object.entries(variant.properties)) {
1252
1252
  const values = propertyVariants.get(key) ?? [];
1253
1253
  values.push(property);
1254
1254
  propertyVariants.set(key, values);
@@ -1262,9 +1262,9 @@ function hoistObjectUnionClosure(schema) {
1262
1262
  mergePropertyVariants(values)
1263
1263
  ])),
1264
1264
  additionalProperties: false,
1265
- oneOf: variants.map((variant2) => {
1266
- const { additionalProperties: _closure, ...branch } = variant2;
1267
- const excluded = [...propertyVariants.keys()].filter((key) => !(key in variant2.properties));
1265
+ oneOf: variants.map((variant) => {
1266
+ const { additionalProperties: _closure, ...branch } = variant;
1267
+ const excluded = [...propertyVariants.keys()].filter((key) => !(key in variant.properties));
1268
1268
  return excluded.length === 0 ? branch : {
1269
1269
  ...branch,
1270
1270
  allOf: [
@@ -1348,7 +1348,7 @@ function required(method, name) {
1348
1348
  throw new Error(`The injected legacy MCP client does not support ${name}; use a public DocsClient.`);
1349
1349
  return method;
1350
1350
  }
1351
- function registerBatchAndWorkspaceCapabilities(server, client2, wrap) {
1351
+ function registerBatchAndWorkspaceCapabilities(server, client, wrap) {
1352
1352
  async function batch(input) {
1353
1353
  const results = [];
1354
1354
  let aborted = false;
@@ -1360,25 +1360,25 @@ function registerBatchAndWorkspaceCapabilities(server, client2, wrap) {
1360
1360
  try {
1361
1361
  switch (input.action) {
1362
1362
  case "move":
1363
- await client2.updateDocument(id, { folderId: input.folderId });
1363
+ await client.updateDocument(id, { folderId: input.folderId });
1364
1364
  break;
1365
1365
  case "set_category":
1366
- await client2.updateDocument(id, { categoryId: input.categoryId });
1366
+ await client.updateDocument(id, { categoryId: input.categoryId });
1367
1367
  break;
1368
1368
  case "add_tag":
1369
- await required(client2.addTagToDocument, "add_tag")(id, input.tagId);
1369
+ await required(client.addTagToDocument, "add_tag")(id, input.tagId);
1370
1370
  break;
1371
1371
  case "remove_tag":
1372
- await required(client2.removeTagFromDocument, "remove_tag")(id, input.tagId);
1372
+ await required(client.removeTagFromDocument, "remove_tag")(id, input.tagId);
1373
1373
  break;
1374
1374
  case "trash":
1375
- await required(client2.deleteDocument, "trash")(id);
1375
+ await required(client.deleteDocument, "trash")(id);
1376
1376
  break;
1377
1377
  case "restore":
1378
- await required(client2.restoreTrashedDocument, "restore")(id);
1378
+ await required(client.restoreTrashedDocument, "restore")(id);
1379
1379
  break;
1380
1380
  case "refresh_index":
1381
- await client2.refreshDocumentIndex(id);
1381
+ await client.refreshDocumentIndex(id);
1382
1382
  break;
1383
1383
  }
1384
1384
  results.push({ id, status: "ok" });
@@ -1407,8 +1407,8 @@ function registerBatchAndWorkspaceCapabilities(server, client2, wrap) {
1407
1407
  annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
1408
1408
  }, wrap("get_workspace_item", async ({ kind, id }) => {
1409
1409
  if (kind === "folder")
1410
- return { operation: kind, result: await required(client2.getFolder, "get_workspace_item(folder)")(id) };
1411
- const listed = kind === "category" ? await client2.listCategories() : await client2.listTags();
1410
+ return { operation: kind, result: await required(client.getFolder, "get_workspace_item(folder)")(id) };
1411
+ const listed = kind === "category" ? await client.listCategories() : await client.listTags();
1412
1412
  const result = Array.isArray(listed) ? listed.find((item) => item.id === id) : undefined;
1413
1413
  if (!result)
1414
1414
  throw new HiaiDocsError(`${kind} not found`, 404, null, "NOT_FOUND");
@@ -1429,38 +1429,38 @@ function required2(value, name) {
1429
1429
  throw new Error(`The injected legacy MCP client does not support ${name}; use a public DocsClient.`);
1430
1430
  return value;
1431
1431
  }
1432
- function registerCompactCapabilities(server, client2, wrap) {
1432
+ function registerCompactCapabilities(server, client, wrap) {
1433
1433
  function register(name, description, inputSchema, annotations, handler) {
1434
1434
  server.registerTool(name, { description, inputSchema: captureMcpInputSchema(server, name, withClientRoutingSchema(inputSchema)), outputSchema: toolOutputSchemas[name], annotations }, wrap(name, handler, toolOutputSchemas[name]));
1435
1435
  }
1436
1436
  register("find_documents", "Find readable documents in the active scope. Use mode=list for paginated browsing by folder or tag UUID; use mode=search for hybrid text and semantic retrieval with tag names.", z4.discriminatedUnion("mode", [
1437
1437
  z4.strictObject({ mode: z4.literal("list").describe("Select the list operation explicitly."), folderId: uuid2.optional(), categoryId: uuid2.optional().describe("Filter by effective category UUID, including inherited folder placement."), visibility: z4.enum(["private", "shared", "public"]).optional().describe("Optional document visibility filter; never expands access."), rootOnly: z4.boolean().optional().describe("Return only documents without a folder; cannot combine with folderId."), tag: uuid2.optional(), tagIds: z4.array(uuid2).min(1).optional().describe("Filter by tag UUIDs; cannot combine with the legacy tag field."), tagMatch: z4.enum(["all", "any"]).optional().describe("Require all supplied tags by default, or any supplied tag."), q: z4.string().optional().describe("Literal case-insensitive title/content filter; does not invoke semantic search."), updatedFrom: z4.iso.datetime({ offset: true }).optional().describe("Inclusive updated timestamp lower bound, with timezone."), updatedTo: z4.iso.datetime({ offset: true }).optional().describe("Exclusive updated timestamp upper bound, with timezone."), sortBy: z4.enum(["updatedAt", "createdAt", "title"]).optional().describe("Stable server-side sort field; defaults to updatedAt."), sortOrder: z4.enum(["asc", "desc"]).optional().describe("Sort direction, descending by default with an ID tie-breaker."), page: z4.number().int().min(1).optional().describe("One-based page number; defaults to the API first page."), limit: z4.number().int().min(1).max(1000).optional().describe("Maximum documents per page, up to 1000.") }),
1438
1438
  z4.strictObject({ mode: z4.literal("search").describe("Select the search operation explicitly."), query: text.describe("Text to search in the original language."), includeDiagnostics: z4.boolean().optional().describe("Include redacted diagnostic details; omitted by default."), includeChunks: z4.boolean().optional().describe("Include matching text chunks only when requested."), folder: z4.string().optional().describe("Optional folder UUID filter for search."), tags: z4.array(z4.string()).optional().describe("Optional tag names; all supplied names must match."), limit: z4.number().int().min(1).max(100).optional().describe("Maximum results to return, up to 100.") })
1439
- ]), read, async (input) => input.mode === "list" ? { operation: "list", result: await client2.listDocuments(input) } : { operation: "search", result: await client2.search(input) });
1439
+ ]), read, async (input) => input.mode === "list" ? { operation: "list", result: await client.listDocuments(input) } : { operation: "search", result: await client.search(input) });
1440
1440
  register("read_document", "Read one document by UUID. Choose detail for content and metadata, markdown for portable export, or versions for saved revisions and snapshots. All views are read-only.", z4.discriminatedUnion("view", [
1441
1441
  z4.strictObject({ view: z4.literal("detail").describe("Select the detail operation explicitly."), id: uuid2 }),
1442
1442
  z4.strictObject({ view: z4.literal("markdown").describe("Select the markdown operation explicitly."), id: uuid2 }),
1443
1443
  z4.strictObject({ view: z4.literal("versions").describe("Select the versions operation explicitly."), id: uuid2, onlySnapshots: z4.boolean().optional().describe("When true, return only named snapshots.") })
1444
1444
  ]), read, async (input) => {
1445
1445
  if (input.view === "detail")
1446
- return { operation: "detail", result: await client2.getDocument(input.id) };
1446
+ return { operation: "detail", result: await client.getDocument(input.id) };
1447
1447
  if (input.view === "markdown")
1448
- return { operation: "markdown", result: await client2.exportDocument(input.id) };
1449
- return { operation: "versions", result: await client2.getVersionHistory(input.id, input.onlySnapshots) };
1448
+ return { operation: "markdown", result: await client.exportDocument(input.id) };
1449
+ return { operation: "versions", result: await client.getVersionHistory(input.id, input.onlySnapshots) };
1450
1450
  });
1451
1451
  register("save_document", "Create or update one document. Use action=create for a new document or action=update for an existing one; batch_documents handles the same placement change across multiple existing documents. Creation requires write access; content edits require edit access, and placement changes may require write access. Content or placement changes queue normal indexing.", z4.discriminatedUnion("action", [
1452
1452
  z4.strictObject({ action: z4.literal("create").describe("Select the create operation explicitly."), title: title.optional(), content: content.optional(), folderId: uuid2.optional(), categoryId: uuid2.nullable().optional().describe("Optional category UUID; null clears the explicit category.") }),
1453
1453
  z4.strictObject({ action: z4.literal("update").describe("Select the update operation explicitly."), id: uuid2, title: title.optional(), content: content.optional(), folderId: uuid2.nullable().optional().describe("Optional folder UUID; null clears the placement on update."), categoryId: uuid2.nullable().optional().describe("Optional category UUID; null clears the explicit category.") }).refine((value) => value.title !== undefined || value.content !== undefined || value.folderId !== undefined || value.categoryId !== undefined)
1454
1454
  ]), destructive, async (input) => {
1455
1455
  if (input.action === "create") {
1456
- const { action: _action2, ...data2 } = input;
1457
- return { operation: "create", result: await client2.createDocument(data2) };
1456
+ const { action: _action, ...data } = input;
1457
+ return { operation: "create", result: await client.createDocument(data) };
1458
1458
  }
1459
1459
  const { action: _action, id, ...data } = input;
1460
- return { operation: "update", result: await client2.updateDocument(id, data) };
1460
+ return { operation: "update", result: await client.updateDocument(id, data) };
1461
1461
  });
1462
1462
  register("delete_document", "Move one document to trash without purging content or versions. Use batch_documents(action=trash) for multiple explicit IDs. Requires write access and an explicit delete request; permanently_delete_document is a separate irreversible action.", z4.strictObject({ id: uuid2 }), destructive, async ({ id }) => {
1463
- await required2(client2.deleteDocument, "delete_document")(id);
1463
+ await required2(client.deleteDocument, "delete_document")(id);
1464
1464
  return { id, deleted: true };
1465
1465
  });
1466
1466
  register("list_workspace_structure", "Discover permitted spaces with kind=workspaces, including empty spaces; use returned workspaceId for scoped operations. List folders, categories, or tags; set kind=folders for root folders or children of parentId. Unselected reads cover all granted scopes when supported by the host.", z4.discriminatedUnion("kind", [
@@ -1472,24 +1472,24 @@ function registerCompactCapabilities(server, client2, wrap) {
1472
1472
  if (input.kind === "workspaces")
1473
1473
  throw new Error("Workspace routing is not configured");
1474
1474
  if (input.kind === "folders")
1475
- return { operation: "folders", result: await client2.listFolders({ parentId: input.parentId }) };
1475
+ return { operation: "folders", result: await client.listFolders({ parentId: input.parentId }) };
1476
1476
  if (input.kind === "categories")
1477
- return { operation: "categories", result: await client2.listCategories() };
1478
- return { operation: "tags", result: await client2.listTags() };
1477
+ return { operation: "categories", result: await client.listCategories() };
1478
+ return { operation: "tags", result: await client.listTags() };
1479
1479
  });
1480
1480
  register("save_folder", "Create or update a folder. action=update can rename or move an existing folder; the API enforces category boundaries and queues affected documents for reindexing.", z4.discriminatedUnion("action", [
1481
1481
  z4.strictObject({ action: z4.literal("create").describe("Select the create operation explicitly."), name: text.max(255), parentId: uuid2.nullable().optional().describe("Optional parent folder UUID; null selects the root."), categoryId: uuid2.nullable().optional().describe("Optional category UUID; null clears the explicit category.") }),
1482
1482
  z4.strictObject({ action: z4.literal("update").describe("Select the update operation explicitly."), id: uuid2, name: text.max(255).optional(), parentId: uuid2.nullable().optional().describe("Optional parent folder UUID; null selects the root."), categoryId: uuid2.nullable().optional().describe("Optional category UUID; null clears the explicit category."), order: z4.number().int().nonnegative().optional().describe("New non-negative display order.") }).refine((value) => value.name !== undefined || value.parentId !== undefined || value.categoryId !== undefined || value.order !== undefined)
1483
1483
  ]), destructive, async (input) => {
1484
1484
  if (input.action === "create") {
1485
- const { action: _action2, ...data2 } = input;
1486
- return { operation: "create", result: await client2.createFolder(data2) };
1485
+ const { action: _action, ...data } = input;
1486
+ return { operation: "create", result: await client.createFolder(data) };
1487
1487
  }
1488
1488
  const { action: _action, id, ...data } = input;
1489
- return { operation: "update", result: await required2(client2.updateFolder, "update_folder")(id, data) };
1489
+ return { operation: "update", result: await required2(client.updateFolder, "update_folder")(id, data) };
1490
1490
  });
1491
1491
  register("delete_folder", "Delete a folder while preserving its documents; child folders and documents are detached under the API rules. Requires write access.", z4.strictObject({ id: uuid2 }), destructive, async ({ id }) => {
1492
- await required2(client2.deleteFolder, "delete_folder")(id);
1492
+ await required2(client.deleteFolder, "delete_folder")(id);
1493
1493
  return { id, deleted: true };
1494
1494
  });
1495
1495
  register("save_category", "Create or update a workspace category. Full workspace write access is required; category-scoped credentials cannot manage categories.", z4.discriminatedUnion("action", [
@@ -1497,12 +1497,12 @@ function registerCompactCapabilities(server, client2, wrap) {
1497
1497
  z4.strictObject({ action: z4.literal("update").describe("Select the update operation explicitly."), id: uuid2, name: text.max(255).optional(), order: z4.number().int().nonnegative().optional().describe("New non-negative display order.") }).refine((value) => value.name !== undefined || value.order !== undefined)
1498
1498
  ]), destructive, async (input) => {
1499
1499
  if (input.action === "create")
1500
- return { operation: "create", result: await client2.createCategory({ name: input.name }) };
1500
+ return { operation: "create", result: await client.createCategory({ name: input.name }) };
1501
1501
  const { action: _action, id, ...data } = input;
1502
- return { operation: "update", result: await required2(client2.updateCategory, "update_category")(id, data) };
1502
+ return { operation: "update", result: await required2(client.updateCategory, "update_category")(id, data) };
1503
1503
  });
1504
1504
  register("delete_category", "Delete a workspace category and detach its documents without deleting them. Requires full workspace write access; category-scoped credentials are denied.", z4.strictObject({ id: uuid2 }), destructive, async ({ id }) => {
1505
- await required2(client2.deleteCategory, "delete_category")(id);
1505
+ await required2(client.deleteCategory, "delete_category")(id);
1506
1506
  return { id, deleted: true };
1507
1507
  });
1508
1508
  register("save_tag", "Create or update a workspace tag. Full workspace write access is required; renaming or recoloring a tag causes affected documents to be reindexed.", z4.discriminatedUnion("action", [
@@ -1510,42 +1510,42 @@ function registerCompactCapabilities(server, client2, wrap) {
1510
1510
  z4.strictObject({ action: z4.literal("update").describe("Select the update operation explicitly."), id: uuid2, name: text.max(100).optional(), color: z4.string().max(20).optional().describe("Optional tag color, at most 20 characters.") }).refine((value) => value.name !== undefined || value.color !== undefined)
1511
1511
  ]), destructive, async (input) => {
1512
1512
  if (input.action === "create")
1513
- return { operation: "create", result: await required2(client2.createTag, "create_tag")({ name: input.name, color: input.color }) };
1513
+ return { operation: "create", result: await required2(client.createTag, "create_tag")({ name: input.name, color: input.color }) };
1514
1514
  const { action: _action, id, ...data } = input;
1515
- return { operation: "update", result: await required2(client2.updateTag, "update_tag")(id, data) };
1515
+ return { operation: "update", result: await required2(client.updateTag, "update_tag")(id, data) };
1516
1516
  });
1517
1517
  register("delete_tag", "Delete a workspace tag and remove its document assignments. Full workspace write access is required; documents themselves remain.", z4.strictObject({ id: uuid2 }), destructive, async ({ id }) => {
1518
- await required2(client2.deleteTag, "delete_tag")(id);
1518
+ await required2(client.deleteTag, "delete_tag")(id);
1519
1519
  return { id, deleted: true };
1520
1520
  });
1521
1521
  register("set_document_tag", "Add or remove an existing tag assignment on one document. Use batch_documents for the same tag action across multiple explicit IDs. Requires edit access to each document; action=remove preserves the tag itself.", z4.strictObject({ action: z4.enum(["add", "remove"]).describe("Add or remove exactly one tag assignment."), documentId: uuid2, tagId: uuid2 }), destructive, async ({ action, documentId, tagId }) => {
1522
1522
  if (action === "add") {
1523
- await required2(client2.addTagToDocument, "add_tag_to_document")(documentId, tagId);
1523
+ await required2(client.addTagToDocument, "add_tag_to_document")(documentId, tagId);
1524
1524
  return { operation: "add", result: { documentId, tagId, assigned: true } };
1525
1525
  }
1526
- await required2(client2.removeTagFromDocument, "remove_tag_from_document")(documentId, tagId);
1526
+ await required2(client.removeTagFromDocument, "remove_tag_from_document")(documentId, tagId);
1527
1527
  return { operation: "remove", result: { documentId, tagId, removed: true } };
1528
1528
  });
1529
- register("create_snapshot", "Save a named snapshot of an existing document before a planned change. The snapshot can later be restored with restore_document_version.", z4.strictObject({ documentId: uuid2, label: text.max(200).describe("Snapshot label, from 1 to 200 characters."), description: z4.string().max(1000).optional().describe("Optional snapshot note, at most 1000 characters.") }), write, async ({ documentId, label, description }) => client2.createSnapshot(documentId, { label, description }));
1530
- register("restore_document_version", "Restore content from a version or snapshot listed by read_document(view=versions). This changes current content and queues indexing; it does not restore a trashed document.", z4.strictObject({ documentId: uuid2, versionId: uuid2 }), destructive, async ({ documentId, versionId }) => required2(client2.restoreDocumentVersion, "restore_document_version")(documentId, versionId));
1529
+ register("create_snapshot", "Save a named snapshot of an existing document before a planned change. The snapshot can later be restored with restore_document_version.", z4.strictObject({ documentId: uuid2, label: text.max(200).describe("Snapshot label, from 1 to 200 characters."), description: z4.string().max(1000).optional().describe("Optional snapshot note, at most 1000 characters.") }), write, async ({ documentId, label, description }) => client.createSnapshot(documentId, { label, description }));
1530
+ register("restore_document_version", "Restore content from a version or snapshot listed by read_document(view=versions). This changes current content and queues indexing; it does not restore a trashed document.", z4.strictObject({ documentId: uuid2, versionId: uuid2 }), destructive, async ({ documentId, versionId }) => required2(client.restoreDocumentVersion, "restore_document_version")(documentId, versionId));
1531
1531
  register("explore_graph", "Explore graph relations from readable seed documents. mode=neighbors traverses one document without a query; mode=search ranks relations from one or more seed IDs with optional query text.", z4.discriminatedUnion("mode", [
1532
1532
  z4.strictObject({ mode: z4.literal("neighbors").describe("Select the neighbors operation explicitly."), documentId: uuid2, limit: z4.number().int().min(1).max(100).optional().describe("Maximum results to return, up to 100.") }),
1533
1533
  z4.strictObject({ mode: z4.literal("search").describe("Select the search operation explicitly."), docIds: z4.array(uuid2).min(1).max(50).describe("One to 50 authorized seed document UUIDs."), query: z4.string().max(2000).optional().describe("Optional graph relevance query, at most 2000 characters."), limit: z4.number().int().min(1).max(100).optional().describe("Maximum results to return, up to 100.") })
1534
- ]), read, async (input) => input.mode === "neighbors" ? { operation: "neighbors", result: await client2.getRelatedDocuments(input.documentId, input.limit) } : { operation: "search", result: await client2.searchGraph(input) });
1535
- register("get_document_index_status", "Read current indexing and pipeline status for one document without starting work. Use refresh_document_index only when an explicit retry is intended.", z4.strictObject({ documentId: uuid2 }), read, async ({ documentId }) => client2.getDocumentIndexStatus(documentId));
1536
- register("refresh_document_index", "Queue an explicit asynchronous reindex for one document; use batch_documents(action=refresh_index) for multiple explicit IDs. Routine content and placement changes already schedule indexing; check get_document_index_status first.", z4.strictObject({ documentId: uuid2 }), write, async ({ documentId }) => client2.refreshDocumentIndex(documentId));
1537
- register("list_trash", "List soft-deleted documents visible to the active workspace or category scope. Requires read access and does not restore or purge anything.", z4.strictObject({}), read, async () => required2(client2.listTrash, "list_trash")());
1538
- register("restore_trashed_document", "Return one document from trash to the active library; use batch_documents(action=restore) for multiple explicit IDs. This restores the document itself, unlike restore_document_version which changes content.", z4.strictObject({ id: uuid2 }), write, async ({ id }) => required2(client2.restoreTrashedDocument, "restore_trashed_document")(id));
1534
+ ]), read, async (input) => input.mode === "neighbors" ? { operation: "neighbors", result: await client.getRelatedDocuments(input.documentId, input.limit) } : { operation: "search", result: await client.searchGraph(input) });
1535
+ register("get_document_index_status", "Read current indexing and pipeline status for one document without starting work. Use refresh_document_index only when an explicit retry is intended.", z4.strictObject({ documentId: uuid2 }), read, async ({ documentId }) => client.getDocumentIndexStatus(documentId));
1536
+ register("refresh_document_index", "Queue an explicit asynchronous reindex for one document; use batch_documents(action=refresh_index) for multiple explicit IDs. Routine content and placement changes already schedule indexing; check get_document_index_status first.", z4.strictObject({ documentId: uuid2 }), write, async ({ documentId }) => client.refreshDocumentIndex(documentId));
1537
+ register("list_trash", "List soft-deleted documents visible to the active workspace or category scope. Requires read access and does not restore or purge anything.", z4.strictObject({}), read, async () => required2(client.listTrash, "list_trash")());
1538
+ register("restore_trashed_document", "Return one document from trash to the active library; use batch_documents(action=restore) for multiple explicit IDs. This restores the document itself, unlike restore_document_version which changes content.", z4.strictObject({ id: uuid2 }), write, async ({ id }) => required2(client.restoreTrashedDocument, "restore_trashed_document")(id));
1539
1539
  register("permanently_delete_document", "Irreversibly purge a document already in trash, including its version history. Use only on an explicit user request after checking list_trash.", z4.strictObject({ id: uuid2 }), destructive, async ({ id }) => {
1540
- await required2(client2.permanentlyDeleteDocument, "permanently_delete_document")(id);
1540
+ await required2(client.permanentlyDeleteDocument, "permanently_delete_document")(id);
1541
1541
  return { id, deleted: true };
1542
1542
  });
1543
- registerBatchAndWorkspaceCapabilities(server, client2, wrap);
1543
+ registerBatchAndWorkspaceCapabilities(server, client, wrap);
1544
1544
  }
1545
1545
 
1546
1546
  // ../mcp-server/src/prompts-resources.ts
1547
1547
  import { z as z5 } from "zod";
1548
- function registerPromptsAndResources(server, client2) {
1548
+ function registerPromptsAndResources(server, client) {
1549
1549
  server.registerPrompt("organize_workspace", {
1550
1550
  description: "Plan safe document organization using DocsMint categories and folders.",
1551
1551
  argsSchema: z5.object({
@@ -1604,9 +1604,9 @@ Use find_documents(mode=search) for normal retrieval. Use explore_graph only wit
1604
1604
  }));
1605
1605
  server.registerResource("workspace-catalog", "docsmint://workspace/catalog", {}, async (uri) => {
1606
1606
  const [categories, folders, tags] = await Promise.all([
1607
- client2.listCategories(),
1608
- client2.listFolders({}),
1609
- client2.listTags()
1607
+ client.listCategories(),
1608
+ client.listFolders({}),
1609
+ client.listTags()
1610
1610
  ]);
1611
1611
  return {
1612
1612
  contents: [
@@ -1681,15 +1681,15 @@ function wrapHandler(name, handler, outputSchema, workspaceRouting, decorateResu
1681
1681
  }
1682
1682
  };
1683
1683
  }
1684
- function registerDocsmintMcpCapabilities(server, client2, workspaceRouting, decorateResult) {
1684
+ function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decorateResult) {
1685
1685
  const wrap = (name, handler, outputSchema) => wrapHandler(name, handler, outputSchema, workspaceRouting, decorateResult);
1686
- registerCompactCapabilities(server, client2, wrap);
1687
- registerPromptsAndResources(server, client2);
1686
+ registerCompactCapabilities(server, client, wrap);
1687
+ registerPromptsAndResources(server, client);
1688
1688
  }
1689
1689
  function createDocsmintMcpServer(options = {}) {
1690
- const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.0" });
1691
- const client2 = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
1692
- registerDocsmintMcpCapabilities(server, client2, options.workspaceRouting, options.decorateResult);
1690
+ const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.1" });
1691
+ const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
1692
+ registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
1693
1693
  return server;
1694
1694
  }
1695
1695