@hiai-gg/docsmint 2.1.0 → 2.1.3
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.
- package/README.md +11 -3
- package/dist/backend/index.js +50507 -67754
- package/dist/backend-account-runtime-cleanup.js +308 -292
- package/dist/backend-api-key-facade.js +4 -4
- package/dist/backend-pipeline-cancellation.js +285 -285
- package/dist/frontend/CategoryDialog-CVJi5PJu.js +602 -0
- package/dist/frontend/{ConfirmDialog-B1MjKlVQ.js → ConfirmDialog-0JwB8mKN.js} +5 -8
- package/dist/frontend/{CreateSnapshotDialog-BTMoPFdj.js → CreateSnapshotDialog-BLrtuYs5.js} +63 -68
- package/dist/frontend/{DatePicker-Bmjko3X7.js → DatePicker-BwSb8TRv.js} +17 -29
- package/dist/frontend/{DeleteDialog-BkfIeKXO.js → DeleteDialog-s7Dr6bXg.js} +51 -56
- package/dist/frontend/{FolderNode-Do8pIfyA.js → FolderNode-Y7cV9xeX.js} +105 -106
- package/dist/frontend/{FolderTreeSelector-FyxhcHjr.js → FolderTreeSelector-BR3lYmPU.js} +18 -20
- package/dist/frontend/HiAiEditor-BHz46Iqd.js +3078 -0
- package/dist/frontend/{HiaiDocsExtensionProvider-Cc3yzW5I.js → HiaiDocsExtensionProvider-A2nGddUR.js} +2 -3
- package/dist/frontend/{Icon-3EYzvNyk.js → Icon-CiHcxcpv.js} +1 -2
- package/dist/frontend/SettingsDialog-BvS74JZu.js +978 -0
- package/dist/frontend/{ShareDialog-Ddvl7xvb.js → ShareDialog-Bo50h_Oe.js} +23 -25
- package/dist/frontend/Sidebar-i0kbanpg.js +2123 -0
- package/dist/frontend/{TagCreateDialog-DQmMJe_E.js → TagCreateDialog-DhKfsfv3.js} +78 -86
- package/dist/frontend/action_cancel-BdsWzQKU.js +4 -0
- package/dist/frontend/action_close-CVhfLPRQ.js +4 -0
- package/dist/frontend/action_create-ByaroO1_.js +4 -0
- package/dist/frontend/action_delete-SRloglWY.js +4 -0
- package/dist/frontend/action_go_to-DO1bicF-.js +4 -0
- package/dist/frontend/action_loading-iQ0KsN6i.js +4 -0
- package/dist/frontend/action_save-DeqrZQwV.js +4 -0
- package/dist/frontend/api/attachments.js +1 -2
- package/dist/frontend/api/categories.js +1 -2
- package/dist/frontend/api/documents.js +1 -2
- package/dist/frontend/api/folders.js +1 -2
- package/dist/frontend/api/settings.js +1 -2
- package/dist/frontend/api/share.js +1 -2
- package/dist/frontend/api/tags.js +1 -2
- package/dist/frontend/{api-keys-DIwAdYkg.js → api-keys-B63imiLr.js} +2 -3
- package/dist/frontend/app-shell.js +55 -79
- package/dist/frontend/{attachments-C225gTA7.js → attachments-Bfly-sam.js} +2 -3
- package/dist/frontend/{auth-client-C5EyWdAF.js → auth-client-Dx7d9Tzo.js} +252 -253
- package/dist/frontend/{bundle-mjs-CZ3g1Uzr.js → bundle-mjs-clTO1WW-.js} +5 -23
- package/dist/frontend/{camera-DtgHzfVI.js → camera-DsdOPOcD.js} +2 -3
- package/dist/frontend/{categories-C8AAkhCR.js → categories-CusvHb5Y.js} +3 -4
- package/dist/frontend/{categories_update_error-4aSI8PTr.js → categories_update_error-Cn8DBBHv.js} +2 -3
- package/dist/frontend/{check-DVx65aSv.js → check-DiMZRkKS.js} +2 -3
- package/dist/frontend/{chevron-down-C2tbZ8Ol.js → chevron-down-CxFrMFDJ.js} +2 -3
- package/dist/frontend/{circle-check-BAN-D7yg.js → circle-check-B4F_qgPx.js} +2 -3
- package/dist/frontend/{client-GbtOH90i.js → client-BDdDd84W.js} +1 -2
- package/dist/frontend/{clipboard-Cgzxc0_R.js → clipboard-Dt1oW6nm.js} +1 -2
- package/dist/frontend/{clock-ByiB0SwQ.js → clock-dcpueRk-.js} +2 -3
- package/dist/frontend/collaboration.js +9 -13
- package/dist/frontend/components/category-dialog.js +1 -2
- package/dist/frontend/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend/components/delete-dialog.js +1 -2
- package/dist/frontend/components/editor/compact-editor.js +2 -3
- package/dist/frontend/components/editor/document-editor.js +1 -2
- package/dist/frontend/components/editor/document-title.js +3 -4
- package/dist/frontend/components/editor/docx-serializer.js +123 -167
- package/dist/frontend/components/editor/extensions.js +1 -2
- package/dist/frontend/components/editor/markdown-toggle.js +5 -6
- package/dist/frontend/components/editor/markdown.js +1 -2
- package/dist/frontend/components/folder-node.js +1 -2
- package/dist/frontend/components/folder-tree-selector.js +1 -2
- package/dist/frontend/components/save-as-dialog.js +86 -90
- package/dist/frontend/components/settings.js +1 -2
- package/dist/frontend/components/share-dialog.js +1 -2
- package/dist/frontend/components/sidebar.js +1 -2
- package/dist/frontend/components/tag-create-dialog.js +1 -2
- package/dist/frontend/components/version-history.js +256 -190
- package/dist/frontend/{context-D0zPFXZ4.js → context-BguSRnCt.js} +1 -2
- package/dist/frontend/{copy-CRzvfZGb.js → copy-Bag46YaR.js} +2 -3
- package/dist/frontend/dashboard.js +666 -690
- package/dist/frontend/{db-CgTtukT4.js → db-B1ZV452J.js} +22 -39
- package/dist/frontend/{dialog-a_ZcpEC5.js → dialog-C0Bpok1d.js} +10 -18
- package/dist/frontend/{dist-CcHOStsA.js → dist-BlcV_BOY.js} +2 -3
- package/dist/frontend/{dist-qd_OnyUC.js → dist-DjId3RKL.js} +8 -21
- package/dist/frontend/dist-Dl9qg10h.js +301 -0
- package/dist/frontend/{dndzone-CDhrbpTg.js → dndzone-C62yjeG3.js} +38 -53
- package/dist/frontend/doc-tabs.js +1 -2
- package/dist/frontend/doc_title_label-BOuZzvqv.js +4 -0
- package/dist/frontend/doc_title_placeholder-ZxpdWWEn.js +4 -0
- package/dist/frontend/{document-drop-coordinator-Da7HcXgv.js → document-drop-coordinator-C_o93kKW.js} +3 -4
- package/dist/frontend/document-drop-coordinator.js +1 -2
- package/dist/frontend/{documents-CwCs1rA7.js → documents-CDJb8dv-.js} +4 -8
- package/dist/frontend/{dropdown-menu-DrHYReIC.js → dropdown-menu-B3nk2aM-.js} +13 -24
- package/dist/frontend/{editor-content-sanitizer-CWjqiz0T.js → editor-content-sanitizer-5MjSVPVn.js} +1 -2
- package/dist/frontend/editor-preferences.js +1 -2
- package/dist/frontend/{editor-preferences.svelte-Bt_A9k7n.js → editor-preferences.svelte-BpTE4mbz.js} +3 -5
- package/dist/frontend/{editorExtensions-DPR-CjMu.js → editorExtensions-DbiFj4tn.js} +3 -4
- package/dist/frontend/{editor_markdown_placeholder-BIWDUF1E.js → editor_markdown_placeholder-BztIY9Ci.js} +2 -3
- package/dist/frontend/{ellipsis-vertical-qxNgoXu-.js → ellipsis-vertical-Oymsv1R4.js} +2 -3
- package/dist/frontend/{error_dismiss-Dx_JbRjs.js → error_dismiss-C651ZdWI.js} +2 -3
- package/dist/frontend/error_generic-BlWqOE-a.js +4 -0
- package/dist/frontend/extension.js +1 -2
- package/dist/frontend/{folder-D74E-Kdp.js → folder-BpmB_sAy.js} +3 -5
- package/dist/frontend/folder-refresh.js +1 -2
- package/dist/frontend/{folders-CC0UWkZH.js → folders-DgKSovXa.js} +2 -3
- package/dist/frontend/{folders_rename-BJo4Gipq.js → folders_rename-Cxbg5GIw.js} +2 -3
- package/dist/frontend/frontend.css +1 -1
- package/dist/frontend/i18n.js +144 -145
- package/dist/frontend/{identity-CNhtuCJV.js → identity-B7HeOzDJ.js} +4 -5
- package/dist/frontend/{input-Q_7qCfnU.js → input-CbeB9220.js} +2 -3
- package/dist/frontend/keyboard.js +1 -2
- package/dist/frontend/{keyboard.svelte-CApmX0vl.js → keyboard.svelte-BBUdhTsM.js} +2 -3
- package/dist/frontend/{label-Dj8FDEhf.js → label-CfBWf3gI.js} +2 -3
- package/dist/frontend/{lib-aUbBbIW2.js → lib-CITdCbKa.js} +176 -365
- package/dist/frontend/{loader-circle-D3t5NkvC.js → loader-circle-skKwfRCB.js} +2 -3
- package/dist/frontend/markdown-6E9TWC6V.js +11 -0
- package/dist/frontend/offline/identity.js +1 -2
- package/dist/frontend/{popper-layer-force-mount-CNtiLgbV.js → popper-layer-force-mount-BG0eyrCk.js} +112 -284
- package/dist/frontend/{resolve-BG4HgzpN.js → resolve-DbT-KhGZ.js} +2 -3
- package/dist/frontend/{rolldown-runtime-DArdT4gl.js → rolldown-runtime-CwxnZyOB.js} +2 -3
- package/dist/frontend/{rotate-ccw-B1ybQ8oQ.js → rotate-ccw-DAUX7np7.js} +2 -3
- package/dist/frontend/{route-context-DYQlUfzL.js → route-context-6OHiGtfb.js} +2 -4
- package/dist/frontend/{runtime-CwWSo6c9.js → runtime-CGUiMzK6.js} +1 -2
- package/dist/frontend/{schemas-1Na35n71.js → schemas-YXxhj5o8.js} +850 -880
- package/dist/frontend/scroll_to_top_aria-lJc2RSx_.js +4 -0
- package/dist/frontend/{search-preferences-B1GdbdUc.js → search-preferences-DuLDczRu.js} +1 -2
- package/dist/frontend/search.js +277 -292
- package/dist/frontend/{search_title-DOC0cPlQ.js → search_title-BETwQYJq.js} +2 -3
- package/dist/frontend/{select-value-BkI1W1bn.js → select-value-BY5Hw6Rl.js} +28 -65
- package/dist/frontend/{settings-CHx4wBwb.js → settings-DyePuqjp.js} +3 -4
- package/dist/frontend/{share-D5yo0JOh.js → share-3gWTTYvH.js} +2 -3
- package/dist/frontend/{share-context-BJ4GF4yT.js → share-context-C2xyVP9M.js} +29 -37
- package/dist/frontend/{share_copied-DPxVzfWh.js → share_copied-BuAnmpbz.js} +2 -3
- package/dist/frontend/{share_toggle_password-DdxfIjj1.js → share_toggle_password-LEYUeHWr.js} +2 -3
- package/dist/frontend/shared-document.js +27 -36
- package/dist/frontend/{sidebar_uncategorized-qJ2_Aonf.js → sidebar_uncategorized-C5PGOflV.js} +2 -3
- package/dist/frontend/{sort_relevance-DwYX5MO9.js → sort_relevance-DpCVLby_.js} +2 -3
- package/dist/frontend/{subfolders-refresh-store.svelte-DxP21a1c.js → subfolders-refresh-store.svelte-CeyqvNpu.js} +1 -2
- package/dist/frontend/{tag-qbTBLj-g.js → tag-Wdfe0rKU.js} +3 -5
- package/dist/frontend/{tag-store.svelte-ogVCMCbv.js → tag-store.svelte-C9VYWqLQ.js} +2 -3
- package/dist/frontend/{tags-CF_cqzSV.js → tags-DlDVothf.js} +3 -4
- package/dist/frontend/{tags_load_error-BKjA1pI0.js → tags_load_error-BINNpPPV.js} +2 -3
- package/dist/frontend/{tags_new-BiNAJ9Bx.js → tags_new-Dw0Uy43-.js} +2 -3
- package/dist/frontend/{textarea-BNK0LFUK.js → textarea-D6emvAwM.js} +2 -3
- package/dist/frontend/theme.js +2 -3
- package/dist/frontend/{theme.svelte-BRdxXd-B.js → theme.svelte-BiXvrqwh.js} +7 -23
- package/dist/frontend/{theme_system-BBNUhYKh.js → theme_system-YIfa_2Xt.js} +2 -3
- package/dist/frontend/utils/clipboard.js +1 -2
- package/dist/frontend/utils/dndzone.js +1 -2
- package/dist/frontend/{utils-BovMJHdA.js → utils-CnAmIMwr.js} +2 -3
- package/dist/frontend/utils-DH0uqK40.js +6 -0
- package/dist/frontend/utils.js +1 -2
- package/dist/frontend/version_create_snapshot-D8xjbuCq.js +4 -0
- package/dist/frontend/{version_restored_from-dVRN3Zdk.js → version_restored_from-DYFFSuQj.js} +2 -3
- package/dist/frontend/{version_snapshot_label_placeholder-DrMikux0.js → version_snapshot_label_placeholder-BhKq1NQ7.js} +2 -3
- package/dist/frontend/{weekday_we-C5H_M-df.js → weekday_we-BxbzNVWR.js} +2 -3
- package/dist/frontend/{x-CvSSnrjl.js → x-CBUgPygC.js} +2 -3
- package/dist/frontend/{yjs-VUcKqaKW.js → yjs-BbwnvxgY.js} +9 -23
- package/dist/frontend-ssr/api/attachments.js +2 -3
- package/dist/frontend-ssr/api/categories.js +1 -2
- package/dist/frontend-ssr/api/documents.js +1 -2
- package/dist/frontend-ssr/api/folders.js +1 -2
- package/dist/frontend-ssr/api/settings.js +1 -2
- package/dist/frontend-ssr/api/share.js +2 -3
- package/dist/frontend-ssr/api/tags.js +1 -2
- package/dist/frontend-ssr/app-shell.js +19 -28
- package/dist/frontend-ssr/assets/{CategoryDialog-DuZLLlt7.js → CategoryDialog-2CCX508O.js} +17 -20
- package/dist/frontend-ssr/assets/{ConfirmDialog-0WVu9BCE.js → ConfirmDialog-Cc6lcY1N.js} +8 -14
- package/dist/frontend-ssr/assets/{CreateSnapshotDialog-3vhDTFNu.js → CreateSnapshotDialog-BB8fXF9W.js} +9 -10
- package/dist/frontend-ssr/assets/{DatePicker-t12leL2Y.js → DatePicker-CfzKzipR.js} +9 -15
- package/dist/frontend-ssr/assets/{DeleteDialog-B0AU1fJR.js → DeleteDialog-DRU4UgOW.js} +4 -5
- package/dist/frontend-ssr/assets/{FolderNode-C-B-s8x1.js → FolderNode-Dg_5-orQ.js} +11 -12
- package/dist/frontend-ssr/assets/{FolderTreeSelector-DdQuEcj0.js → FolderTreeSelector-D0reTdFS.js} +5 -7
- package/dist/frontend-ssr/assets/{HiAiEditor-Cj3B2Dt6.js → HiAiEditor-BQGlGd3z.js} +57 -83
- package/dist/frontend-ssr/assets/{HiaiDocsExtensionProvider-BRKWmcDd.js → HiaiDocsExtensionProvider-D6cGL-9s.js} +2 -3
- package/dist/frontend-ssr/assets/{Icon-DE_3EnuF.js → Icon-CrIRbT5O.js} +4 -8
- package/dist/frontend-ssr/assets/{SettingsDialog-DAT-Zxu0.js → SettingsDialog-BpHY3IMb.js} +29 -40
- package/dist/frontend-ssr/assets/{ShareDialog-CpE9zd_f.js → ShareDialog-CY40nWZJ.js} +7 -9
- package/dist/frontend-ssr/assets/{Sidebar-B_Ey6QNL.js → Sidebar-fpYk5MGO.js} +55 -63
- package/dist/frontend-ssr/assets/{TagCreateDialog-DBHO1DPU.js → TagCreateDialog-C2tpdEuj.js} +13 -14
- package/dist/frontend-ssr/assets/{action_cancel-OVgQDP5Q.js → action_cancel-CsBbxW0m.js} +2 -3
- package/dist/frontend-ssr/assets/{action_close-DagDyMXk.js → action_close-lFKBqBwg.js} +2 -3
- package/dist/frontend-ssr/assets/{action_create-hqJWjyqh.js → action_create-BV4ZOcQW.js} +2 -3
- package/dist/frontend-ssr/assets/{action_delete-B1-16jSo.js → action_delete-CNmRhKQP.js} +2 -3
- package/dist/frontend-ssr/assets/{action_go_to-DQScgw7P.js → action_go_to-tN5I26xM.js} +2 -3
- package/dist/frontend-ssr/assets/{action_save-Bx7vlLZI.js → action_save-YCfMiKb4.js} +2 -3
- package/dist/frontend-ssr/assets/{api-keys-CHOrbU-Q.js → api-keys-G6oimJIv.js} +2 -3
- package/dist/frontend-ssr/assets/{auth-client-CITU3xkE.js → auth-client-BnnnJDAb.js} +102 -71
- package/dist/frontend-ssr/assets/{camera-B6ldo_Js.js → camera-OYNSMvMd.js} +2 -3
- package/dist/frontend-ssr/assets/{categories-C_dxFoHi.js → categories-bBPviKjl.js} +2 -3
- package/dist/frontend-ssr/assets/{categories_update_error-DkKgsqdD.js → categories_update_error-Bfx5vtvt.js} +11 -21
- package/dist/frontend-ssr/assets/{chevron-down-DQcr6JUc.js → chevron-down-DB6YsSbQ.js} +2 -3
- package/dist/frontend-ssr/assets/{chevron-right-9szrliZx.js → chevron-right-DOt2uY6b.js} +2 -3
- package/dist/frontend-ssr/assets/{circle-check-BgP9MRRv.js → circle-check-DQhTm9YR.js} +2 -3
- package/dist/frontend-ssr/assets/{client-rfwQYYHY.js → client-B2AniXwV.js} +1 -2
- package/dist/frontend-ssr/assets/{clipboard-CXOaoz2W.js → clipboard-CXKnyYba.js} +1 -2
- package/dist/frontend-ssr/assets/{clock-roNtGlT6.js → clock-B08dVWtf.js} +2 -3
- package/dist/frontend-ssr/assets/{context-Bi_mO-NS.js → context-C_xxvxnR.js} +1 -2
- package/dist/frontend-ssr/assets/{copy-BYqYnBIQ.js → copy-2jsznHar.js} +2 -3
- package/dist/frontend-ssr/assets/{db-DxRzq-kx.js → db-BEKLU5Fc.js} +2 -3
- package/dist/frontend-ssr/assets/{dialog-SqCnTT43.js → dialog-C6U-DqLr.js} +9 -17
- package/dist/frontend-ssr/assets/{dist-CaZQ1FhA.js → dist-DqXTz_zE.js} +9 -12
- package/dist/frontend-ssr/assets/{dist-CqxHwOlp.js → dist-ip9bPdma.js} +3 -6
- package/dist/frontend-ssr/assets/{dndzone-CnTCMhPd.js → dndzone-Dx3jt_e4.js} +4 -6
- package/dist/frontend-ssr/assets/{doc_title_label-Ev_ltlh3.js → doc_title_label-CE_l-Gum.js} +2 -3
- package/dist/frontend-ssr/assets/{doc_title_placeholder-DSHpUb7w.js → doc_title_placeholder-7_i7PtG6.js} +2 -3
- package/dist/frontend-ssr/assets/{document-drop-coordinator-CEaYACsC.js → document-drop-coordinator-BVytYy2K.js} +1 -2
- package/dist/frontend-ssr/assets/{documents-CEuA1V6N.js → documents-B_wpQFTh.js} +2 -3
- package/dist/frontend-ssr/assets/{dropdown-menu-CE6U0f1b.js → dropdown-menu-BS5fcN9l.js} +12 -23
- package/dist/frontend-ssr/assets/{editor-content-sanitizer-Gjm93iR-.js → editor-content-sanitizer-CIdFjBSC.js} +1 -2
- package/dist/frontend-ssr/assets/{editor-preferences.svelte-iI5jJM1x.js → editor-preferences.svelte-CdAXTd-I.js} +2 -4
- package/dist/frontend-ssr/assets/{editorExtensions-rhletNji.js → editorExtensions-2O7O2Nhv.js} +2 -3
- package/dist/frontend-ssr/assets/{editor_markdown_placeholder-BpezdkOr.js → editor_markdown_placeholder-CAeLJjFT.js} +3 -5
- package/dist/frontend-ssr/assets/{editor_toolbar_undo-CKJAOqv2.js → editor_toolbar_undo-CVCfQIS1.js} +29 -57
- package/dist/frontend-ssr/assets/{ellipsis-vertical-Cg1MrZsl.js → ellipsis-vertical-IFHt2NM1.js} +2 -3
- package/dist/frontend-ssr/assets/{error_generic-DTK0kwxT.js → error_generic-BB80i0Vk.js} +3 -5
- package/dist/frontend-ssr/assets/{folder-DHB-CEcQ.js → folder-CXa1_bm5.js} +2 -3
- package/dist/frontend-ssr/assets/{folders-BOXeb9hz.js → folders-CTLqWbMm.js} +2 -3
- package/dist/frontend-ssr/assets/{folders_rename-DvciOb6K.js → folders_rename-ydbfwQlj.js} +7 -13
- package/dist/frontend-ssr/assets/{identity-B7ngLQzZ.js → identity-DTz1SQwC.js} +2 -3
- package/dist/frontend-ssr/assets/{input-DVrBVPgs.js → input-Bxw9sFF0.js} +2 -3
- package/dist/frontend-ssr/assets/{keyboard.svelte-BgF47N3L.js → keyboard.svelte-njehUCm3.js} +1 -2
- package/dist/frontend-ssr/assets/{label-vtCK3pTp.js → label-CMWedjs6.js} +2 -3
- package/dist/frontend-ssr/assets/{loader-circle-D3NWhCif.js → loader-circle-zbKj9Qb-.js} +2 -3
- package/dist/frontend-ssr/assets/{markdown-Co31-Tl2.js → markdown-BmIhDQp7.js} +2 -3
- package/dist/frontend-ssr/assets/{popper-layer-force-mount-C4dMMt-f.js → popper-layer-force-mount-CSHZsG2E.js} +78 -156
- package/dist/frontend-ssr/assets/{resolve-BqHozBXl.js → resolve-Wqdff4CL.js} +1 -2
- package/dist/frontend-ssr/assets/{rotate-ccw-DNf3nwMD.js → rotate-ccw-B7SaTFWf.js} +2 -3
- package/dist/frontend-ssr/assets/{route-context-BPRerEtZ.js → route-context-BsqLFt5Y.js} +2 -4
- package/dist/frontend-ssr/assets/{runtime-O78RzRqx.js → runtime-BX6-jTn_.js} +1 -2
- package/dist/frontend-ssr/assets/{scroll_to_top_aria-BN4ZfOnM.js → scroll_to_top_aria-CAYSiGHO.js} +2 -3
- package/dist/frontend-ssr/assets/{search_title-CKUsQDT0.js → search_title-C7NVXXq3.js} +2 -3
- package/dist/frontend-ssr/assets/{search_toggle_filters-hS9rvQhC.js → search_toggle_filters-Bq_YVD8s.js} +15 -29
- package/dist/frontend-ssr/assets/{select-value-Ce5c_fuA.js → select-value-TgslfiUB.js} +18 -34
- package/dist/frontend-ssr/assets/{settings-BRxvn30Y.js → settings-B1MA_FjO.js} +3 -4
- package/dist/frontend-ssr/assets/{share-context-B4UpvTSw.js → share-context-RVh8AExX.js} +17 -22
- package/dist/frontend-ssr/assets/{share_copied-BxU9rjXG.js → share_copied-CrwEwkb3.js} +31 -61
- package/dist/frontend-ssr/assets/{share_toggle_password-C6OmroqR.js → share_toggle_password-Co56z0Ha.js} +11 -21
- package/dist/frontend-ssr/assets/{sidebar_uncategorized-Dx-LTd5w.js → sidebar_uncategorized-COWdmZ3d.js} +6 -11
- package/dist/frontend-ssr/assets/{subfolders-refresh-store.svelte-CXHxQWKh.js → subfolders-refresh-store.svelte-LxG18U0n.js} +1 -2
- package/dist/frontend-ssr/assets/{tag-Cqv0fWVG.js → tag-BGhtDKpP.js} +3 -5
- package/dist/frontend-ssr/assets/{tag-store.svelte-QRysvGKe.js → tag-store.svelte-CUUgAaDD.js} +2 -3
- package/dist/frontend-ssr/assets/{tags-BBCoFYro.js → tags-C7u-LBsl.js} +2 -3
- package/dist/frontend-ssr/assets/{tags_load_error-CPrc6Gzs.js → tags_load_error-DW4FbHvr.js} +19 -37
- package/dist/frontend-ssr/assets/{tags_new-VmMr9v2V.js → tags_new-Dr3ByMPZ.js} +4 -7
- package/dist/frontend-ssr/assets/{textarea-BdjOJJVb.js → textarea-Bz5Tz4rw.js} +2 -3
- package/dist/frontend-ssr/assets/{theme.svelte-D6bbaJ9m.js → theme.svelte-CdHah46l.js} +3 -5
- package/dist/frontend-ssr/assets/{theme_system-BucaNntV.js → theme_system-E97FASeq.js} +19 -37
- package/dist/frontend-ssr/assets/{utils-DvZnctjz.js → utils-085zSPe5.js} +1 -2
- package/dist/frontend-ssr/assets/{utils-D3X7I8nz.js → utils-DF6CmRDX.js} +1 -2
- package/dist/frontend-ssr/assets/{version_create_snapshot-COHzwjle.js → version_create_snapshot-DeeYB7bb.js} +2 -3
- package/dist/frontend-ssr/assets/{version_restored_from-CertjFDl.js → version_restored_from-CTt2LM4A.js} +13 -25
- package/dist/frontend-ssr/assets/{version_snapshot_label_placeholder-Cy_rMCij.js → version_snapshot_label_placeholder-BbGD9YuN.js} +12 -23
- package/dist/frontend-ssr/assets/{weekday_we-DrI3U230.js → weekday_we-BzGQ-iFc.js} +22 -43
- package/dist/frontend-ssr/collaboration.js +5 -5
- package/dist/frontend-ssr/components/category-dialog.js +1 -2
- package/dist/frontend-ssr/components/create-snapshot-dialog.js +1 -2
- package/dist/frontend-ssr/components/delete-dialog.js +1 -2
- package/dist/frontend-ssr/components/editor/compact-editor.js +2 -3
- package/dist/frontend-ssr/components/editor/document-editor.js +1 -2
- package/dist/frontend-ssr/components/editor/document-title.js +3 -4
- package/dist/frontend-ssr/components/editor/docx-serializer.js +1 -2
- package/dist/frontend-ssr/components/editor/extensions.js +1 -2
- package/dist/frontend-ssr/components/editor/markdown-toggle.js +4 -5
- package/dist/frontend-ssr/components/editor/markdown.js +1 -2
- package/dist/frontend-ssr/components/folder-node.js +1 -2
- package/dist/frontend-ssr/components/folder-tree-selector.js +1 -2
- package/dist/frontend-ssr/components/save-as-dialog.js +12 -13
- package/dist/frontend-ssr/components/settings.js +1 -2
- package/dist/frontend-ssr/components/share-dialog.js +1 -2
- package/dist/frontend-ssr/components/sidebar.js +1 -2
- package/dist/frontend-ssr/components/tag-create-dialog.js +1 -2
- package/dist/frontend-ssr/components/version-history.js +70 -29
- package/dist/frontend-ssr/dashboard.js +64 -88
- package/dist/frontend-ssr/doc-tabs.js +1 -2
- package/dist/frontend-ssr/document-drop-coordinator.js +1 -2
- package/dist/frontend-ssr/editor-preferences.js +1 -2
- package/dist/frontend-ssr/extension.js +1 -2
- package/dist/frontend-ssr/folder-refresh.js +1 -2
- package/dist/frontend-ssr/i18n.js +315 -603
- package/dist/frontend-ssr/keyboard.js +1 -2
- package/dist/frontend-ssr/offline/identity.js +1 -2
- package/dist/frontend-ssr/search.js +17 -20
- package/dist/frontend-ssr/shared-document.js +5 -8
- package/dist/frontend-ssr/theme.js +2 -3
- package/dist/frontend-ssr/utils/clipboard.js +1 -2
- package/dist/frontend-ssr/utils/dndzone.js +1 -2
- package/dist/frontend-ssr/utils.js +1 -2
- package/dist/lifecycle-runtime.js +3996 -17873
- package/dist/mcp-cli.js +64 -64
- package/dist/mcp-server.js +68 -68
- package/package.json +4 -4
- package/packages/cli/src/index.ts +1 -1
- package/server.json +2 -2
- package/dist/frontend/CategoryDialog-CJeAYxcd.js +0 -630
- package/dist/frontend/HiAiEditor-D6ad_auS.js +0 -3129
- package/dist/frontend/SettingsDialog-B8Oswuqb.js +0 -991
- package/dist/frontend/Sidebar-BV0IDqTS.js +0 -2149
- package/dist/frontend/action_cancel-Cuxsznzz.js +0 -5
- package/dist/frontend/action_close-BJm_52wm.js +0 -5
- package/dist/frontend/action_create-CtBQrRuj.js +0 -5
- package/dist/frontend/action_delete-BXBIzvn0.js +0 -5
- package/dist/frontend/action_go_to-VmK5jmEk.js +0 -5
- package/dist/frontend/action_loading-BLCGJVA9.js +0 -5
- package/dist/frontend/action_save-BRN2Z_GP.js +0 -5
- package/dist/frontend/dist-DcHl92QO.js +0 -316
- package/dist/frontend/doc_title_label-DS9jSIh2.js +0 -5
- package/dist/frontend/doc_title_placeholder-DBQpM1aH.js +0 -5
- package/dist/frontend/error_generic-CzNtmBT4.js +0 -5
- package/dist/frontend/markdown-O9YJA70S.js +0 -12
- package/dist/frontend/scroll_to_top_aria-CvkNF_Hu.js +0 -5
- package/dist/frontend/utils-BlHvR6OL.js +0 -7
- package/dist/frontend/version_create_snapshot-3bu-0qzH.js +0 -5
package/dist/mcp-server.js
CHANGED
|
@@ -53,16 +53,16 @@ function diagnostics(tool, input, schemaValue, issues) {
|
|
|
53
53
|
}
|
|
54
54
|
fields(schema);
|
|
55
55
|
const args = object(input) ?? {};
|
|
56
|
-
const selector = ["mode", "action", "view", "kind"].find((key) => branches.some((
|
|
57
|
-
const property = object(object(
|
|
56
|
+
const selector = ["mode", "action", "view", "kind"].find((key) => branches.some((branch) => {
|
|
57
|
+
const property = object(object(branch.properties)?.[key]);
|
|
58
58
|
return property && (typeof property.const === "string" || Array.isArray(property.enum));
|
|
59
59
|
}));
|
|
60
|
-
const variants = branches.map((
|
|
61
|
-
const property = selector ? object(object(
|
|
60
|
+
const variants = branches.map((branch) => {
|
|
61
|
+
const property = selector ? object(object(branch.properties)?.[selector]) : undefined;
|
|
62
62
|
const values = property && typeof property.const === "string" ? [property.const] : Array.isArray(property?.enum) ? property.enum.filter((value) => typeof value === "string") : [];
|
|
63
63
|
return {
|
|
64
64
|
values,
|
|
65
|
-
required: Array.isArray(
|
|
65
|
+
required: Array.isArray(branch.required) ? branch.required.filter((value) => typeof value === "string" && knownFields.has(value)) : []
|
|
66
66
|
};
|
|
67
67
|
});
|
|
68
68
|
const selected = selector ? args[selector] : undefined;
|
|
@@ -1242,11 +1242,11 @@ function mergePropertyVariants(values) {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
function hoistObjectUnionClosure(schema) {
|
|
1244
1244
|
const variants = schema.oneOf;
|
|
1245
|
-
if (!Array.isArray(variants) || !variants.every((
|
|
1245
|
+
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))
|
|
1246
1246
|
return schema;
|
|
1247
1247
|
const propertyVariants = new Map;
|
|
1248
|
-
for (const
|
|
1249
|
-
for (const [key, property] of Object.entries(
|
|
1248
|
+
for (const variant of variants) {
|
|
1249
|
+
for (const [key, property] of Object.entries(variant.properties)) {
|
|
1250
1250
|
const values = propertyVariants.get(key) ?? [];
|
|
1251
1251
|
values.push(property);
|
|
1252
1252
|
propertyVariants.set(key, values);
|
|
@@ -1260,9 +1260,9 @@ function hoistObjectUnionClosure(schema) {
|
|
|
1260
1260
|
mergePropertyVariants(values)
|
|
1261
1261
|
])),
|
|
1262
1262
|
additionalProperties: false,
|
|
1263
|
-
oneOf: variants.map((
|
|
1264
|
-
const { additionalProperties: _closure, ...branch } =
|
|
1265
|
-
const excluded = [...propertyVariants.keys()].filter((key) => !(key in
|
|
1263
|
+
oneOf: variants.map((variant) => {
|
|
1264
|
+
const { additionalProperties: _closure, ...branch } = variant;
|
|
1265
|
+
const excluded = [...propertyVariants.keys()].filter((key) => !(key in variant.properties));
|
|
1266
1266
|
return excluded.length === 0 ? branch : {
|
|
1267
1267
|
...branch,
|
|
1268
1268
|
allOf: [
|
|
@@ -1346,7 +1346,7 @@ function required(method, name) {
|
|
|
1346
1346
|
throw new Error(`The injected legacy MCP client does not support ${name}; use a public DocsClient.`);
|
|
1347
1347
|
return method;
|
|
1348
1348
|
}
|
|
1349
|
-
function registerBatchAndWorkspaceCapabilities(server,
|
|
1349
|
+
function registerBatchAndWorkspaceCapabilities(server, client, wrap) {
|
|
1350
1350
|
async function batch(input) {
|
|
1351
1351
|
const results = [];
|
|
1352
1352
|
let aborted = false;
|
|
@@ -1358,25 +1358,25 @@ function registerBatchAndWorkspaceCapabilities(server, client2, wrap) {
|
|
|
1358
1358
|
try {
|
|
1359
1359
|
switch (input.action) {
|
|
1360
1360
|
case "move":
|
|
1361
|
-
await
|
|
1361
|
+
await client.updateDocument(id, { folderId: input.folderId });
|
|
1362
1362
|
break;
|
|
1363
1363
|
case "set_category":
|
|
1364
|
-
await
|
|
1364
|
+
await client.updateDocument(id, { categoryId: input.categoryId });
|
|
1365
1365
|
break;
|
|
1366
1366
|
case "add_tag":
|
|
1367
|
-
await required(
|
|
1367
|
+
await required(client.addTagToDocument, "add_tag")(id, input.tagId);
|
|
1368
1368
|
break;
|
|
1369
1369
|
case "remove_tag":
|
|
1370
|
-
await required(
|
|
1370
|
+
await required(client.removeTagFromDocument, "remove_tag")(id, input.tagId);
|
|
1371
1371
|
break;
|
|
1372
1372
|
case "trash":
|
|
1373
|
-
await required(
|
|
1373
|
+
await required(client.deleteDocument, "trash")(id);
|
|
1374
1374
|
break;
|
|
1375
1375
|
case "restore":
|
|
1376
|
-
await required(
|
|
1376
|
+
await required(client.restoreTrashedDocument, "restore")(id);
|
|
1377
1377
|
break;
|
|
1378
1378
|
case "refresh_index":
|
|
1379
|
-
await
|
|
1379
|
+
await client.refreshDocumentIndex(id);
|
|
1380
1380
|
break;
|
|
1381
1381
|
}
|
|
1382
1382
|
results.push({ id, status: "ok" });
|
|
@@ -1405,8 +1405,8 @@ function registerBatchAndWorkspaceCapabilities(server, client2, wrap) {
|
|
|
1405
1405
|
annotations: { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false }
|
|
1406
1406
|
}, wrap("get_workspace_item", async ({ kind, id }) => {
|
|
1407
1407
|
if (kind === "folder")
|
|
1408
|
-
return { operation: kind, result: await required(
|
|
1409
|
-
const listed = kind === "category" ? await
|
|
1408
|
+
return { operation: kind, result: await required(client.getFolder, "get_workspace_item(folder)")(id) };
|
|
1409
|
+
const listed = kind === "category" ? await client.listCategories() : await client.listTags();
|
|
1410
1410
|
const result = Array.isArray(listed) ? listed.find((item) => item.id === id) : undefined;
|
|
1411
1411
|
if (!result)
|
|
1412
1412
|
throw new HiaiDocsError(`${kind} not found`, 404, null, "NOT_FOUND");
|
|
@@ -1427,38 +1427,38 @@ function required2(value, name) {
|
|
|
1427
1427
|
throw new Error(`The injected legacy MCP client does not support ${name}; use a public DocsClient.`);
|
|
1428
1428
|
return value;
|
|
1429
1429
|
}
|
|
1430
|
-
function registerCompactCapabilities(server,
|
|
1430
|
+
function registerCompactCapabilities(server, client, wrap) {
|
|
1431
1431
|
function register(name, description, inputSchema, annotations, handler) {
|
|
1432
1432
|
server.registerTool(name, { description, inputSchema: captureMcpInputSchema(server, name, withClientRoutingSchema(inputSchema)), outputSchema: toolOutputSchemas[name], annotations }, wrap(name, handler, toolOutputSchemas[name]));
|
|
1433
1433
|
}
|
|
1434
1434
|
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", [
|
|
1435
1435
|
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.") }),
|
|
1436
1436
|
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.") })
|
|
1437
|
-
]), read, async (input) => input.mode === "list" ? { operation: "list", result: await
|
|
1437
|
+
]), read, async (input) => input.mode === "list" ? { operation: "list", result: await client.listDocuments(input) } : { operation: "search", result: await client.search(input) });
|
|
1438
1438
|
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", [
|
|
1439
1439
|
z4.strictObject({ view: z4.literal("detail").describe("Select the detail operation explicitly."), id: uuid2 }),
|
|
1440
1440
|
z4.strictObject({ view: z4.literal("markdown").describe("Select the markdown operation explicitly."), id: uuid2 }),
|
|
1441
1441
|
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.") })
|
|
1442
1442
|
]), read, async (input) => {
|
|
1443
1443
|
if (input.view === "detail")
|
|
1444
|
-
return { operation: "detail", result: await
|
|
1444
|
+
return { operation: "detail", result: await client.getDocument(input.id) };
|
|
1445
1445
|
if (input.view === "markdown")
|
|
1446
|
-
return { operation: "markdown", result: await
|
|
1447
|
-
return { operation: "versions", result: await
|
|
1446
|
+
return { operation: "markdown", result: await client.exportDocument(input.id) };
|
|
1447
|
+
return { operation: "versions", result: await client.getVersionHistory(input.id, input.onlySnapshots) };
|
|
1448
1448
|
});
|
|
1449
1449
|
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", [
|
|
1450
1450
|
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.") }),
|
|
1451
1451
|
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)
|
|
1452
1452
|
]), destructive, async (input) => {
|
|
1453
1453
|
if (input.action === "create") {
|
|
1454
|
-
const { action:
|
|
1455
|
-
return { operation: "create", result: await
|
|
1454
|
+
const { action: _action, ...data } = input;
|
|
1455
|
+
return { operation: "create", result: await client.createDocument(data) };
|
|
1456
1456
|
}
|
|
1457
1457
|
const { action: _action, id, ...data } = input;
|
|
1458
|
-
return { operation: "update", result: await
|
|
1458
|
+
return { operation: "update", result: await client.updateDocument(id, data) };
|
|
1459
1459
|
});
|
|
1460
1460
|
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 }) => {
|
|
1461
|
-
await required2(
|
|
1461
|
+
await required2(client.deleteDocument, "delete_document")(id);
|
|
1462
1462
|
return { id, deleted: true };
|
|
1463
1463
|
});
|
|
1464
1464
|
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", [
|
|
@@ -1470,24 +1470,24 @@ function registerCompactCapabilities(server, client2, wrap) {
|
|
|
1470
1470
|
if (input.kind === "workspaces")
|
|
1471
1471
|
throw new Error("Workspace routing is not configured");
|
|
1472
1472
|
if (input.kind === "folders")
|
|
1473
|
-
return { operation: "folders", result: await
|
|
1473
|
+
return { operation: "folders", result: await client.listFolders({ parentId: input.parentId }) };
|
|
1474
1474
|
if (input.kind === "categories")
|
|
1475
|
-
return { operation: "categories", result: await
|
|
1476
|
-
return { operation: "tags", result: await
|
|
1475
|
+
return { operation: "categories", result: await client.listCategories() };
|
|
1476
|
+
return { operation: "tags", result: await client.listTags() };
|
|
1477
1477
|
});
|
|
1478
1478
|
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", [
|
|
1479
1479
|
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.") }),
|
|
1480
1480
|
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)
|
|
1481
1481
|
]), destructive, async (input) => {
|
|
1482
1482
|
if (input.action === "create") {
|
|
1483
|
-
const { action:
|
|
1484
|
-
return { operation: "create", result: await
|
|
1483
|
+
const { action: _action, ...data } = input;
|
|
1484
|
+
return { operation: "create", result: await client.createFolder(data) };
|
|
1485
1485
|
}
|
|
1486
1486
|
const { action: _action, id, ...data } = input;
|
|
1487
|
-
return { operation: "update", result: await required2(
|
|
1487
|
+
return { operation: "update", result: await required2(client.updateFolder, "update_folder")(id, data) };
|
|
1488
1488
|
});
|
|
1489
1489
|
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 }) => {
|
|
1490
|
-
await required2(
|
|
1490
|
+
await required2(client.deleteFolder, "delete_folder")(id);
|
|
1491
1491
|
return { id, deleted: true };
|
|
1492
1492
|
});
|
|
1493
1493
|
register("save_category", "Create or update a workspace category. Full workspace write access is required; category-scoped credentials cannot manage categories.", z4.discriminatedUnion("action", [
|
|
@@ -1495,12 +1495,12 @@ function registerCompactCapabilities(server, client2, wrap) {
|
|
|
1495
1495
|
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)
|
|
1496
1496
|
]), destructive, async (input) => {
|
|
1497
1497
|
if (input.action === "create")
|
|
1498
|
-
return { operation: "create", result: await
|
|
1498
|
+
return { operation: "create", result: await client.createCategory({ name: input.name }) };
|
|
1499
1499
|
const { action: _action, id, ...data } = input;
|
|
1500
|
-
return { operation: "update", result: await required2(
|
|
1500
|
+
return { operation: "update", result: await required2(client.updateCategory, "update_category")(id, data) };
|
|
1501
1501
|
});
|
|
1502
1502
|
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 }) => {
|
|
1503
|
-
await required2(
|
|
1503
|
+
await required2(client.deleteCategory, "delete_category")(id);
|
|
1504
1504
|
return { id, deleted: true };
|
|
1505
1505
|
});
|
|
1506
1506
|
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", [
|
|
@@ -1508,42 +1508,42 @@ function registerCompactCapabilities(server, client2, wrap) {
|
|
|
1508
1508
|
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)
|
|
1509
1509
|
]), destructive, async (input) => {
|
|
1510
1510
|
if (input.action === "create")
|
|
1511
|
-
return { operation: "create", result: await required2(
|
|
1511
|
+
return { operation: "create", result: await required2(client.createTag, "create_tag")({ name: input.name, color: input.color }) };
|
|
1512
1512
|
const { action: _action, id, ...data } = input;
|
|
1513
|
-
return { operation: "update", result: await required2(
|
|
1513
|
+
return { operation: "update", result: await required2(client.updateTag, "update_tag")(id, data) };
|
|
1514
1514
|
});
|
|
1515
1515
|
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 }) => {
|
|
1516
|
-
await required2(
|
|
1516
|
+
await required2(client.deleteTag, "delete_tag")(id);
|
|
1517
1517
|
return { id, deleted: true };
|
|
1518
1518
|
});
|
|
1519
1519
|
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 }) => {
|
|
1520
1520
|
if (action === "add") {
|
|
1521
|
-
await required2(
|
|
1521
|
+
await required2(client.addTagToDocument, "add_tag_to_document")(documentId, tagId);
|
|
1522
1522
|
return { operation: "add", result: { documentId, tagId, assigned: true } };
|
|
1523
1523
|
}
|
|
1524
|
-
await required2(
|
|
1524
|
+
await required2(client.removeTagFromDocument, "remove_tag_from_document")(documentId, tagId);
|
|
1525
1525
|
return { operation: "remove", result: { documentId, tagId, removed: true } };
|
|
1526
1526
|
});
|
|
1527
|
-
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 }) =>
|
|
1528
|
-
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(
|
|
1527
|
+
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 }));
|
|
1528
|
+
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));
|
|
1529
1529
|
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", [
|
|
1530
1530
|
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.") }),
|
|
1531
1531
|
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.") })
|
|
1532
|
-
]), read, async (input) => input.mode === "neighbors" ? { operation: "neighbors", result: await
|
|
1533
|
-
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 }) =>
|
|
1534
|
-
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 }) =>
|
|
1535
|
-
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(
|
|
1536
|
-
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(
|
|
1532
|
+
]), read, async (input) => input.mode === "neighbors" ? { operation: "neighbors", result: await client.getRelatedDocuments(input.documentId, input.limit) } : { operation: "search", result: await client.searchGraph(input) });
|
|
1533
|
+
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));
|
|
1534
|
+
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));
|
|
1535
|
+
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")());
|
|
1536
|
+
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));
|
|
1537
1537
|
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 }) => {
|
|
1538
|
-
await required2(
|
|
1538
|
+
await required2(client.permanentlyDeleteDocument, "permanently_delete_document")(id);
|
|
1539
1539
|
return { id, deleted: true };
|
|
1540
1540
|
});
|
|
1541
|
-
registerBatchAndWorkspaceCapabilities(server,
|
|
1541
|
+
registerBatchAndWorkspaceCapabilities(server, client, wrap);
|
|
1542
1542
|
}
|
|
1543
1543
|
|
|
1544
1544
|
// ../mcp-server/src/prompts-resources.ts
|
|
1545
1545
|
import { z as z5 } from "zod";
|
|
1546
|
-
function registerPromptsAndResources(server,
|
|
1546
|
+
function registerPromptsAndResources(server, client) {
|
|
1547
1547
|
server.registerPrompt("organize_workspace", {
|
|
1548
1548
|
description: "Plan safe document organization using DocsMint categories and folders.",
|
|
1549
1549
|
argsSchema: z5.object({
|
|
@@ -1602,9 +1602,9 @@ Use find_documents(mode=search) for normal retrieval. Use explore_graph only wit
|
|
|
1602
1602
|
}));
|
|
1603
1603
|
server.registerResource("workspace-catalog", "docsmint://workspace/catalog", {}, async (uri) => {
|
|
1604
1604
|
const [categories, folders, tags] = await Promise.all([
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1605
|
+
client.listCategories(),
|
|
1606
|
+
client.listFolders({}),
|
|
1607
|
+
client.listTags()
|
|
1608
1608
|
]);
|
|
1609
1609
|
return {
|
|
1610
1610
|
contents: [
|
|
@@ -1775,10 +1775,10 @@ function createDocsmintMcpHttpHandler(options) {
|
|
|
1775
1775
|
return {
|
|
1776
1776
|
close: () => transport.close(),
|
|
1777
1777
|
async fetch(request) {
|
|
1778
|
-
const
|
|
1779
|
-
if (
|
|
1780
|
-
|
|
1781
|
-
request = new Request(
|
|
1778
|
+
const canonical = new URL(request.url);
|
|
1779
|
+
if (canonical.pathname.endsWith("/mcp/")) {
|
|
1780
|
+
canonical.pathname = canonical.pathname.slice(0, -1);
|
|
1781
|
+
request = new Request(canonical, request);
|
|
1782
1782
|
}
|
|
1783
1783
|
const origin = request.headers.get("origin");
|
|
1784
1784
|
const allowed = !origin || options.allowedOrigins.includes(origin);
|
|
@@ -1879,15 +1879,15 @@ function wrapHandler(name, handler, outputSchema, workspaceRouting, decorateResu
|
|
|
1879
1879
|
}
|
|
1880
1880
|
};
|
|
1881
1881
|
}
|
|
1882
|
-
function registerDocsmintMcpCapabilities(server,
|
|
1882
|
+
function registerDocsmintMcpCapabilities(server, client, workspaceRouting, decorateResult) {
|
|
1883
1883
|
const wrap = (name, handler, outputSchema) => wrapHandler(name, handler, outputSchema, workspaceRouting, decorateResult);
|
|
1884
|
-
registerCompactCapabilities(server,
|
|
1885
|
-
registerPromptsAndResources(server,
|
|
1884
|
+
registerCompactCapabilities(server, client, wrap);
|
|
1885
|
+
registerPromptsAndResources(server, client);
|
|
1886
1886
|
}
|
|
1887
1887
|
function createDocsmintMcpServer(options = {}) {
|
|
1888
|
-
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.
|
|
1889
|
-
const
|
|
1890
|
-
registerDocsmintMcpCapabilities(server,
|
|
1888
|
+
const server = new DocsMintMcpServer({ name: "docsmint", version: "2.1.3" });
|
|
1889
|
+
const client = options.docsClient ? createMcpDocsClient(options.docsClient, options.requestContext) : options.client ?? createMcpDocsClient(createDefaultDocsClient(), options.requestContext);
|
|
1890
|
+
registerDocsmintMcpCapabilities(server, client, options.workspaceRouting, options.decorateResult);
|
|
1891
1891
|
return server;
|
|
1892
1892
|
}
|
|
1893
1893
|
export {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hiai-gg/docsmint",
|
|
3
3
|
"mcpName": "io.github.HiAi-gg/docsmint",
|
|
4
|
-
"version": "2.1.
|
|
4
|
+
"version": "2.1.3",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"browser": {
|
|
7
7
|
"./dist/backend-launcher.js": false,
|
|
@@ -367,7 +367,7 @@
|
|
|
367
367
|
"packages/cli/src/index.ts"
|
|
368
368
|
],
|
|
369
369
|
"engines": {
|
|
370
|
-
"bun": ">=
|
|
370
|
+
"bun": ">=1.4.4"
|
|
371
371
|
},
|
|
372
372
|
"publishConfig": {
|
|
373
373
|
"access": "public"
|
|
@@ -393,7 +393,7 @@
|
|
|
393
393
|
"postgres": "^3.4.9",
|
|
394
394
|
"@aws-sdk/client-s3": "^3.1121.0",
|
|
395
395
|
"pino": "^10.0.0",
|
|
396
|
-
"@sveltejs/kit": "
|
|
396
|
+
"@sveltejs/kit": "3.1.1",
|
|
397
397
|
"svelte": "^5.57.1"
|
|
398
398
|
},
|
|
399
399
|
"peerDependenciesMeta": {
|
|
@@ -412,7 +412,7 @@
|
|
|
412
412
|
},
|
|
413
413
|
"overrides": {
|
|
414
414
|
"happy-dom": "21.0.4",
|
|
415
|
-
"@sveltejs/kit": "
|
|
415
|
+
"@sveltejs/kit": "3.1.1",
|
|
416
416
|
"svelte": "^5.57.1",
|
|
417
417
|
"@scalar/themes": "0.19.3",
|
|
418
418
|
"@scalar/types": "0.25.0"
|
|
@@ -25,7 +25,7 @@ import { registerSearch } from './commands/search.js';
|
|
|
25
25
|
import { registerSnapshot } from './commands/snapshot.js';
|
|
26
26
|
import { registerUpdate } from './commands/update.js';
|
|
27
27
|
|
|
28
|
-
const VERSION = '2.1.
|
|
28
|
+
const VERSION = '2.1.3';
|
|
29
29
|
|
|
30
30
|
const program = new Command();
|
|
31
31
|
program.name('docsmint').description('CLI for the DocsMint knowledge workspace').version(VERSION);
|
package/server.json
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
"id": "1249550690",
|
|
11
11
|
"subfolder": "packages/mcp-server"
|
|
12
12
|
},
|
|
13
|
-
"version": "2.1.
|
|
13
|
+
"version": "2.1.3",
|
|
14
14
|
"icons": [
|
|
15
15
|
{
|
|
16
16
|
"src": "https://raw.githubusercontent.com/HiAi-gg/docsmint/main/frontend/static/logo-dark.png",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"registryType": "npm",
|
|
35
35
|
"registryBaseUrl": "https://registry.npmjs.org",
|
|
36
36
|
"identifier": "@hiai-gg/docsmint",
|
|
37
|
-
"version": "2.1.
|
|
37
|
+
"version": "2.1.3",
|
|
38
38
|
"runtimeHint": "npx",
|
|
39
39
|
"transport": {
|
|
40
40
|
"type": "stdio"
|