braian 0.0.5 → 0.0.7
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/bin/braian.mjs +2 -0
- package/bin/node-version.mjs +72 -0
- package/dist/agent/graph-agent.service.js +43 -0
- package/dist/app.module.js +2 -0
- package/dist/auth/auth.controller.js +2 -2
- package/dist/auth/auth.guard.js +34 -5
- package/dist/auth/auth.module.js +13 -2
- package/dist/auth/auth.service.js +8 -2
- package/dist/auth/link-route-policies.js +267 -0
- package/dist/auth/link-route-policy.js +27 -0
- package/dist/auth/vault-access-denied.filter.js +30 -0
- package/dist/auth/vault-access.interceptor.js +45 -0
- package/dist/auth/vault-link-principal.js +15 -0
- package/dist/auth/vault-link-sessions.service.js +186 -0
- package/dist/bootstrap.js +6 -1
- package/dist/collab/collab.service.js +12 -2
- package/dist/desktop/exposure.js +7 -1
- package/dist/entity/entity.controller.js +9 -1
- package/dist/events/vault-events.service.js +17 -4
- package/dist/files/dto/vault-files.dto.js +113 -6
- package/dist/files/file-url-signer.js +37 -11
- package/dist/files/files-http-error.js +1 -1
- package/dist/files/vault-file-archive.service.js +19 -4
- package/dist/files/vault-file-content.controller.js +29 -1
- package/dist/files/vault-file-content.service.js +18 -2
- package/dist/http/api-controllers.js +6 -0
- package/dist/http/log-redaction.js +23 -0
- package/dist/http/published-page-address.js +58 -0
- package/dist/http/request-guards.js +51 -1
- package/dist/http/security-headers.js +2 -1
- package/dist/journal/active-journal.dto.js +4 -3
- package/dist/logging/logging.middleware.js +3 -3
- package/dist/navigation/navigation.service.js +16 -1
- package/dist/providers/claude-messages-model.js +2 -2
- package/dist/providers/model-provider.service.js +71 -8
- package/dist/providers/provider-catalog-storage.js +4 -3
- package/dist/providers/provider-model-catalog.js +46 -0
- package/dist/providers/provider.controller.js +83 -0
- package/dist/rss/rss-profiles.dto.js +4 -3
- package/dist/search/search-database.service.js +40 -24
- package/dist/search/search-embedding-settings.controller.js +82 -0
- package/dist/search/search-embedding.service.js +33 -28
- package/dist/search/search-index-health.js +1 -1
- package/dist/search/search-sync.service.js +8 -0
- package/dist/search/search.controller.js +34 -54
- package/dist/search/search.module.js +3 -3
- package/dist/sessions/agent-runs.controller.js +3 -3
- package/dist/sessions/dto/graph-session.dto.js +6 -5
- package/dist/sessions/sessions.service.js +33 -1
- package/dist/settings/settings.controller.js +11 -0
- package/dist/settings/settings.dto.js +29 -24
- package/dist/settings/settings.service.js +6 -0
- package/dist/shares/share-http-error.js +2 -2
- package/dist/shares/share.dto.js +74 -16
- package/dist/shares/shared-webpage-headers.js +45 -0
- package/dist/shares/shared-webpage.controller.js +179 -0
- package/dist/shares/shares.controller.js +3 -3
- package/dist/shares/shares.module.js +2 -1
- package/dist/shares/shares.service.js +11 -4
- package/dist/sqlite-files/vault-sqlite.service.js +1 -0
- package/dist/vault-access/vault-access.controller.js +73 -0
- package/dist/vault-access/vault-access.dto.js +28 -0
- package/dist/vault-access/vault-access.module.js +19 -0
- package/dist/vault-access/vault-access.service.js +49 -0
- package/dist/vaults/vault.controller.js +20 -0
- package/dist/vaults/vault.dto.js +114 -50
- package/dist/vaults/vaults.service.js +30 -2
- package/dist/versioning/versioning.service.js +47 -8
- package/node_modules/@braian/ai-providers/dist/index.js +10 -3
- package/node_modules/@braian/ai-providers/dist/openrouter-catalog.js +57 -0
- package/node_modules/@braian/ai-providers/dist/provider-catalog.js +47 -2
- package/node_modules/@braian/ai-providers/dist/providers-models.js +27 -7
- package/node_modules/@braian/graph-agent/assets/agent-instructions/default/26-schema.md +1 -1
- package/node_modules/@braian/graph-agent/dist/agent-features.js +1 -1
- package/node_modules/@braian/graph-agent/dist/agent-profiles/registry.js +9 -0
- package/node_modules/@braian/graph-agent/dist/agent-runs/run-registry.js +1 -1
- package/node_modules/@braian/graph-agent/dist/auth-registry.js +29 -0
- package/node_modules/@braian/graph-agent/dist/boards/boards-settings.js +20 -0
- package/node_modules/@braian/graph-agent/dist/boards/index.js +5 -0
- package/node_modules/@braian/graph-agent/dist/data-workspace.js +127 -14
- package/node_modules/@braian/graph-agent/dist/feature-switch.js +6 -2
- package/node_modules/@braian/graph-agent/dist/files-settings.js +10 -2
- package/node_modules/@braian/graph-agent/dist/ide/ide-settings.js +58 -0
- package/node_modules/@braian/graph-agent/dist/ide/index.js +6 -0
- package/node_modules/@braian/graph-agent/dist/ide-layout.js +1 -1
- package/node_modules/@braian/graph-agent/dist/index.js +30 -13
- package/node_modules/@braian/graph-agent/dist/journal-reflection.js +2 -1
- package/node_modules/@braian/graph-agent/dist/locked-graph-store.js +11 -2
- package/node_modules/@braian/graph-agent/dist/mentioned-notes-input.js +1 -1
- package/node_modules/@braian/graph-agent/dist/navigation-settings.js +20 -14
- package/node_modules/@braian/graph-agent/dist/note-collab-policy.js +4 -1
- package/node_modules/@braian/graph-agent/dist/note-collab-projection.js +4 -3
- package/node_modules/@braian/graph-agent/dist/note-collab-registry.js +12 -9
- package/node_modules/@braian/graph-agent/dist/note-collab-session.js +2 -1
- package/node_modules/@braian/graph-agent/dist/note-editor/index.js +13 -0
- package/node_modules/@braian/graph-agent/dist/note-editor/note-editor-settings.js +98 -0
- package/node_modules/@braian/graph-agent/dist/note-key-settings.js +34 -2
- package/node_modules/@braian/graph-agent/dist/rss/index.js +3 -1
- package/node_modules/@braian/graph-agent/dist/rss/rss-feed-parse.js +18 -1
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-store.js +9 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-profile-use-cases.js +2 -0
- package/node_modules/@braian/graph-agent/dist/rss/rss-settings.js +15 -0
- package/node_modules/@braian/graph-agent/dist/screen-context-input.js +1 -1
- package/node_modules/@braian/graph-agent/dist/secret-masking.js +54 -15
- package/node_modules/@braian/graph-agent/dist/secret-vault.js +48 -3
- package/node_modules/@braian/graph-agent/dist/session-registry.js +3 -2
- package/node_modules/@braian/graph-agent/dist/settings-registry.js +21 -178
- package/node_modules/@braian/graph-agent/dist/settings-reset/index.js +9 -0
- package/node_modules/@braian/graph-agent/dist/settings-reset/settings-reset.js +85 -0
- package/node_modules/@braian/graph-agent/dist/share-edit-references.js +15 -14
- package/node_modules/@braian/graph-agent/dist/share-policy.js +86 -21
- package/node_modules/@braian/graph-agent/dist/share-registry.js +18 -11
- package/node_modules/@braian/graph-agent/dist/share-target-description.js +6 -0
- package/node_modules/@braian/graph-agent/dist/share-use-cases.js +99 -3
- package/node_modules/@braian/graph-agent/dist/share-webpage-links.js +40 -0
- package/node_modules/@braian/graph-agent/dist/shared-dashboard-view.js +2 -1
- package/node_modules/@braian/graph-agent/dist/spotlight-settings.js +2 -15
- package/node_modules/@braian/graph-agent/dist/standalone-pages.js +111 -0
- package/node_modules/@braian/graph-agent/dist/tools.js +4 -2
- package/node_modules/@braian/graph-agent/dist/types.js +7 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/index.js +36 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-access-policy.js +127 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-access-scope.js +60 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-link-features.js +48 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-link-grant.js +47 -0
- package/node_modules/@braian/graph-agent/dist/vault-access/vault-settings-access.js +44 -0
- package/node_modules/@braian/graph-agent/dist/vault-files.js +73 -14
- package/node_modules/@braian/graph-agent/dist/vault-settings-operations.js +41 -12
- package/node_modules/@braian/graph-agent/dist/vault-settings-registry.js +111 -20
- package/node_modules/@braian/html-standalone/dist/css.js +44 -0
- package/node_modules/@braian/html-standalone/dist/data-uri.js +48 -0
- package/node_modules/@braian/html-standalone/dist/html.js +118 -0
- package/node_modules/@braian/html-standalone/dist/index.js +9 -0
- package/node_modules/@braian/html-standalone/dist/local-reference.js +64 -0
- package/node_modules/@braian/html-standalone/dist/standalone.js +143 -0
- package/node_modules/@braian/html-standalone/package.json +22 -0
- package/node_modules/@braian/sqlite-browser/dist/execute.js +47 -2
- package/node_modules/@braian/vault-fs-sdk/dist/fs-vault-strategy.js +23 -0
- package/node_modules/@braian/vault-fs-sdk/dist/index.js +5 -1
- package/node_modules/@braian/vault-fs-sdk/dist/vault-index.js +5 -0
- package/package.json +5 -2
- package/public/assets/{ArrowClockwise.es-DWqWLk15.js → ArrowClockwise.es-3-WDmIeI.js} +1 -1
- package/public/assets/{ArrowDown.es-COHGTGu_.js → ArrowDown.es--soRLxEp.js} +1 -1
- package/public/assets/{ArrowLeft.es-Dvz_4AVp.js → ArrowLeft.es-CbZG51Gr.js} +1 -1
- package/public/assets/{ArrowSquareOut.es-ssfQ7LE-.js → ArrowSquareOut.es-yh2fX_Cs.js} +1 -1
- package/public/assets/{ArrowUp.es-DflnZKsA.js → ArrowUp.es-CIIkDrf9.js} +1 -1
- package/public/assets/{ArrowsClockwise.es-DSXy5pW3.js → ArrowsClockwise.es-D0399ubU.js} +1 -1
- package/public/assets/{ArrowsIn.es-B4Aie-uw.js → ArrowsIn.es-B54L_O6A.js} +1 -1
- package/public/assets/Browser.es-BqZU_2qv.js +1 -0
- package/public/assets/Circle.es-j7f1_WI9.js +1 -0
- package/public/assets/{Clock.es-D6bs8ZLR.js → Clock.es-DkUjmG8U.js} +1 -1
- package/public/assets/{Copy.es-CglRiQSZ.js → Copy.es-DfOdr0jv.js} +1 -1
- package/public/assets/CopySimple.es-BBthx5Du.js +1 -0
- package/public/assets/CornersOut.es-Cd9DgMlt.js +1 -0
- package/public/assets/Crosshair.es-9qdLaRA1.js +1 -0
- package/public/assets/{Desktop.es-DVtEXtRb.js → Desktop.es-DSRSg0hy.js} +1 -1
- package/public/assets/{DotsSixVertical.es-B7kGbvvH.js → DotsSixVertical.es-Cg2wLxmG.js} +1 -1
- package/public/assets/{Eye.es-DKoV8w-8.js → Eye.es-CxGbwLRS.js} +1 -1
- package/public/assets/{EyeSlash.es-C_H7lJGL.js → EyeSlash.es-DfTto7s1.js} +1 -1
- package/public/assets/{File.es-47KQbmb4.js → File.es-D3fdUSmS.js} +1 -1
- package/public/assets/FloppyDisk.es-CVEXDdFf.js +1 -0
- package/public/assets/{Folder.es-DKrkcRQj.js → Folder.es-BUMi6qzZ.js} +1 -1
- package/public/assets/{FolderOpen.es-DaW9wv8-.js → FolderOpen.es-FcjULnXZ.js} +1 -1
- package/public/assets/{FolderPlus.es-D0scempH.js → FolderPlus.es-Deuvtys5.js} +1 -1
- package/public/assets/GearSix.es-CWRB8Up2.js +1 -0
- package/public/assets/List.es-C0rMRBfB.js +1 -0
- package/public/assets/{ListBullets.es-DGeupXZ3.js → ListBullets.es-B7JvZb2M.js} +1 -1
- package/public/assets/{LockSimple.es-DiQO6y_F.js → LockSimple.es-D5Ul9U6c.js} +1 -1
- package/public/assets/LockSimpleOpen.es-C2JGRKEE.js +1 -0
- package/public/assets/{MagnifyingGlass.es-CHks7m9E.js → MagnifyingGlass.es-BPnvTl_3.js} +1 -1
- package/public/assets/{Microphone.es-CQat-MJ8.js → Microphone.es-BXBLW9YD.js} +1 -1
- package/public/assets/{Play.es-h1Fhb5wo.js → Play.es-BT5cMJ7L.js} +1 -1
- package/public/assets/{Plus.es-B-svcAlu.js → Plus.es-aakfbgmy.js} +1 -1
- package/public/assets/{Prohibit.es-M5ljYyQ3.js → Prohibit.es-pwiGfWLj.js} +1 -1
- package/public/assets/{QrCode.es-CVlyfpjq.js → QrCode.es-DCPGPGYZ.js} +1 -1
- package/public/assets/ShareNetwork-CTDRol5F.css +1 -0
- package/public/assets/ShareNetwork.es-Do0IWaE9.js +3 -0
- package/public/assets/SidebarSimple.es-UdNMyfL-.js +1 -0
- package/public/assets/{SlidersHorizontal.es-DkPz8o7o.js → SlidersHorizontal.es-957OxRrd.js} +1 -1
- package/public/assets/{TextAa.es-CymAJ91v.js → TextAa.es-8d8-rRe1.js} +1 -1
- package/public/assets/{Trash.es-B7UVM9v_.js → Trash.es-chxTwNhO.js} +1 -1
- package/public/assets/WarningCircle.es-CF4lQ1bU.js +1 -0
- package/public/assets/advanced-security-B_SegWCz.js +1 -0
- package/public/assets/agent-profiles-settings-DZv5BUzj.js +1 -0
- package/public/assets/appearance-settings-module-DlOVkZXP.js +1 -0
- package/public/assets/{ar-SA-G6X2FPQ2-R9ND2Rw0.js → ar-SA-G6X2FPQ2-DZP7qz6u.js} +1 -1
- package/public/assets/{attachment-embed-Bt5qCuKC.css → attachment-embed-CJkoG50a.css} +1 -1
- package/public/assets/attachment-embed-DVbcGTLJ.js +1 -0
- package/public/assets/attachments-settings-BuqoRFuK.js +1 -0
- package/public/assets/az-AZ-76LH7QW2-ByX_zd4F.js +1 -0
- package/public/assets/{bg-BG-XCXSNQG7-WKBfRf7q.js → bg-BG-XCXSNQG7-wxiUF1_6.js} +1 -1
- package/public/assets/blue-pgMgVzKw.css +1 -0
- package/public/assets/{bn-BD-2XOGV67Q-BmT7jnvl.js → bn-BD-2XOGV67Q-BBIhV1oq.js} +1 -1
- package/public/assets/{board-workspace-D9prroo0.css → board-workspace-CUeGZca9.css} +1 -1
- package/public/assets/board-workspace-pt2JAfWJ.js +1 -0
- package/public/assets/boards-settings-module-CaOcLdGN.js +1 -0
- package/public/assets/{boards-view-3JR36W_w.js → boards-view-DEVAYmzH.js} +1 -1
- package/public/assets/{ca-ES-6MX7JW3Y-CBR9ytrG.js → ca-ES-6MX7JW3Y-CKplVKfE.js} +1 -1
- package/public/assets/calendar-view-B-w_4BV-.js +1 -0
- package/public/assets/calendar-workspace-BiPYwfJr.js +1 -0
- package/public/assets/{calendars-settings-module-BWI1k_YA.js → calendars-settings-module-DuwhjpAm.js} +1 -1
- package/public/assets/card-fields-BJ9YVWI0.css +1 -0
- package/public/assets/{card-fields-eo7dqj1P.js → card-fields-iDvc1GXx.js} +1 -1
- package/public/assets/{chat-composer-editor-DCmWVP16.js → chat-composer-editor-CPfqqfXn.js} +1 -1
- package/public/assets/{chat-message-list-DPXjDBw1.js → chat-message-list-Ds52ru39.js} +1 -1
- package/public/assets/chunk-6U3AYISY-C6-Mtja1.js +12 -0
- package/public/assets/{chunk-EIO257PC-Bfdsn_q8.js → chunk-EIO257PC-DvUJi4Nw.js} +1 -1
- package/public/assets/chunk-K2UTITRG-ZTIxemJp.js +41 -0
- package/public/assets/chunk-SRAX5OIU-wzfotNc-.js +1 -0
- package/public/assets/chunk-Z3N5DIM6-D9TMVU7m.js +1 -0
- package/public/assets/{code-editor-CxLqzVwa.js → code-editor-BTcitmHE.js} +1 -1
- package/public/assets/code-editor-DIB7VOIc.css +1 -0
- package/public/assets/{color-picker-Cmg2HIDb.css → color-picker-BV0aOd4w.css} +1 -1
- package/public/assets/{color-picker-DK8V_DI0.js → color-picker-WHiWktCJ.js} +1 -1
- package/public/assets/{contents-view-DHRWEBwV.js → contents-view-DOVe1FVg.js} +1 -1
- package/public/assets/contents-view-XuasBH0m.css +1 -0
- package/public/assets/{conversation-debug-panel-zsrBEMxW.js → conversation-debug-panel-C73_GL9P.js} +1 -1
- package/public/assets/{settings-view-Bd65kLGK.css → core-settings-module-DNS3W-dj.css} +1 -1
- package/public/assets/core-settings-module-_wQSD6hP.js +4 -0
- package/public/assets/create-note-popup-B-wM8Q5O.js +1 -0
- package/public/assets/{cs-CZ-2BRQDIVT-fiabtlu1.js → cs-CZ-2BRQDIVT-CHlJO48i.js} +1 -1
- package/public/assets/{cypher-editor-ef6RdDgm.js → cypher-editor-M9g--02t.js} +1 -1
- package/public/assets/{da-DK-5WZEPLOC-C-5tRCvs.js → da-DK-5WZEPLOC-B2KbOKlk.js} +1 -1
- package/public/assets/daily-notes-settings-CrgXHhLI.js +1 -0
- package/public/assets/{dashboard-grid-DKMK4z_a.js → dashboard-grid-BZ8kYdV4.js} +2 -2
- package/public/assets/dashboard-workspace-CIhpZ3rj.js +4 -0
- package/public/assets/dashboard-workspace-ChhR6uFw.css +1 -0
- package/public/assets/{dashboards-settings-module-DmE0Krje.js → dashboards-settings-module-CUyrJjUX.js} +1 -1
- package/public/assets/dashboards-view-CkheD5RG.js +1 -0
- package/public/assets/{de-DE-XR44H4JA-4wneKMQi.js → de-DE-XR44H4JA-CraH52sB.js} +1 -1
- package/public/assets/{desktop-server-settings-DDd8PcxW.js → desktop-server-settings-CDuPB2R6.js} +1 -1
- package/public/assets/discovery-create-popup-aCpL7caq.js +1 -0
- package/public/assets/discovery-import-popup-qmw9XOW8.js +1 -0
- package/public/assets/{discovery-settings-module-DQMZismj.js → discovery-settings-module-BiY4ib2N.js} +1 -1
- package/public/assets/discovery-view-CPYP4CTN.js +1 -0
- package/public/assets/discovery-workspace-COn6jS_C.js +2 -0
- package/public/assets/{dist-B58c6eJE.js → dist-BmY58onI.js} +1 -1
- package/public/assets/drag-preview-i140CAXv.js +1 -0
- package/public/assets/{drawing-note-BytzAih9.js → drawing-note-CZIRcZb4.js} +1 -1
- package/public/assets/{el-GR-BZB4AONW-BUDxOK9m.js → el-GR-BZB4AONW-hWxkjrdo.js} +1 -1
- package/public/assets/en-B4ZKOASM-CDD2_KUt.js +1 -0
- package/public/assets/{es-ES-U4NZUMDT-gXLOOlpz.js → es-ES-U4NZUMDT-D3W7yrM9.js} +1 -1
- package/public/assets/{esm-BSlSeh8A.js → esm-BwVJXUDM.js} +1 -1
- package/public/assets/{eu-ES-A7QVB2H4-4kiV_opo.js → eu-ES-A7QVB2H4-C6t3pMxo.js} +1 -1
- package/public/assets/export-formats-BEyzF7fr.js +1 -0
- package/public/assets/{fa-IR-HGAKTJCU-C7F0Dl4h.js → fa-IR-HGAKTJCU-DJOOVnVh.js} +1 -1
- package/public/assets/{feature-switch-section-617S6UWP.js → feature-switch-section-DWkHmh9Q.js} +1 -1
- package/public/assets/{fi-FI-Z5N7JZ37-DEUSwc4a.js → fi-FI-Z5N7JZ37-DEhnpOQb.js} +1 -1
- package/public/assets/file-editor-BMcxRFx_.css +1 -0
- package/public/assets/file-editor-WXaKLCia.js +3 -0
- package/public/assets/{file-language-DjeubQk3.js → file-language-BAXzYrUs.js} +1 -1
- package/public/assets/file-picker-Bo4sE6ud.css +1 -0
- package/public/assets/file-picker-DalNc5HP.js +1 -0
- package/public/assets/file-preview-B2sjiYV9.css +1 -0
- package/public/assets/file-preview-CBXgB9qm.js +1 -0
- package/public/assets/{file-preview-media-DL2hGeeZ.js → file-preview-media-D5_7dD-7.js} +1 -1
- package/public/assets/file-references-api-IoK82adM.js +1 -0
- package/public/assets/files-settings-module-DTmzlXAF.js +1 -0
- package/public/assets/files-view-D7awxVSV.js +3 -0
- package/public/assets/{files-view-B6_Mlm9V.css → files-view-DyPI1vLx.css} +1 -1
- package/public/assets/{format-panel-value-vueBm4DQ.js → format-panel-value-Qry4ewBT.js} +1 -1
- package/public/assets/format-rules-BFnbjJsr.js +1 -0
- package/public/assets/{fr-FR-RHASNOE6-BKLo10bn.js → fr-FR-RHASNOE6-D9pFTuqa.js} +1 -1
- package/public/assets/{gl-ES-HMX3MZ6V-D_nHnidC.js → gl-ES-HMX3MZ6V-CIK6mfAj.js} +1 -1
- package/public/assets/graph-explorer-DEddRhZU.js +329 -0
- package/public/assets/graph-settings-module-CdwcXpWv.js +1 -0
- package/public/assets/{he-IL-6SHJWFNN-BXKK7JWx.js → he-IL-6SHJWFNN-sIPLWf4m.js} +1 -1
- package/public/assets/{hi-IN-IWLTKZ5I-D2utCBQM.js → hi-IN-IWLTKZ5I-BUJucdSj.js} +1 -1
- package/public/assets/{hu-HU-A5ZG7DT2-BENIngFF.js → hu-HU-A5ZG7DT2-B29-4soS.js} +1 -1
- package/public/assets/icons-BQSaMzmI.js +1 -0
- package/public/assets/{id-ID-SAP4L64H-Bw77jJOj.js → id-ID-SAP4L64H-CyIfHt3t.js} +1 -1
- package/public/assets/ide-settings-module-DmJJdyaW.js +1 -0
- package/public/assets/ide-view-BhQVUYYS.js +1 -0
- package/public/assets/ide-view-Cou_U3E6.css +1 -0
- package/public/assets/image-GAAHSSAO-BxryKUrU.js +1 -0
- package/public/assets/imap-accounts-my6l8ble.js +1 -0
- package/public/assets/index-CfVw4gte.js +9 -0
- package/public/assets/index-CuWXx5Sr.css +1 -0
- package/public/assets/{it-IT-JPQ66NNP-DiG4G8vQ.js → it-IT-JPQ66NNP-Dq23HshR.js} +1 -1
- package/public/assets/{ja-JP-DBVTYXUO-CILN9NGs.js → ja-JP-DBVTYXUO-8NNxRVWb.js} +1 -1
- package/public/assets/journal-create-popup-DsFTus7q.js +1 -0
- package/public/assets/journal-day-route-BX4-KaSl.js +1 -0
- package/public/assets/journal-folder-field-hSCfQuop.js +1 -0
- package/public/assets/journal-page-CoLcbMGG.css +1 -0
- package/public/assets/journal-page-CuUs4DCL.js +2 -0
- package/public/assets/journal-settings-BeM9sz5z.js +1 -0
- package/public/assets/journal-typography-BB4TqmXu.js +1 -0
- package/public/assets/journal-writing-route-Ba7mqWJS.js +1 -0
- package/public/assets/journals-view-Cf89lTyQ.js +1 -0
- package/public/assets/kaa-6HZHGXH3-DWQlZzTI.js +1 -0
- package/public/assets/{kab-KAB-ZGHBKWFO-yPJB-J7N.js → kab-KAB-ZGHBKWFO-BCP7pvXg.js} +1 -1
- package/public/assets/kk-KZ-P5N5QNE5-xOkOQsTw.js +1 -0
- package/public/assets/{km-KH-HSX4SM5Z-CSZjabru.js → km-KH-HSX4SM5Z-D0xjNROe.js} +1 -1
- package/public/assets/{ko-KR-MTYHY66A-CGEXYXZz.js → ko-KR-MTYHY66A-E5aEyLj-.js} +1 -1
- package/public/assets/{ku-TR-6OUDTVRD-DOfuZRKI.js → ku-TR-6OUDTVRD-CDQOo-yR.js} +1 -1
- package/public/assets/link-choices-CRTxLpuA.js +1 -0
- package/public/assets/link-entry-route-C1tWLndS.js +1 -0
- package/public/assets/link-file-browser-RuO2yY0g.js +1 -0
- package/public/assets/{link-kind-icon-BMfHfR_C.js → link-kind-icon-BgeZ5N-E.js} +1 -1
- package/public/assets/link-picker-CWK41zM0.js +2 -0
- package/public/assets/locked-shares-prompt-eH6sWg93.js +1 -0
- package/public/assets/{logging-settings-contribution-BLHCBnwO.js → logging-settings-contribution-Btq9ioZn.js} +1 -1
- package/public/assets/logic-CiFwn-O5.js +28 -0
- package/public/assets/long-press-C_vMz2E6.js +1 -0
- package/public/assets/{lt-LT-XHIRWOB4-CmbJTJAh.js → lt-LT-XHIRWOB4-CZPudjgc.js} +1 -1
- package/public/assets/{lv-LV-5QDEKY6T-Br-VqxTs.js → lv-LV-5QDEKY6T-BFIvtooB.js} +1 -1
- package/public/assets/markdown-message-BmuXZdEl.js +3 -0
- package/public/assets/markdown-message-CEFw-l9n.css +1 -0
- package/public/assets/markdown-task-toggle-BdNMBrC0.css +1 -0
- package/public/assets/markdown-task-toggle-j4VvSqsD.js +4 -0
- package/public/assets/{matrices-settings-module-DKGdrCad.js → matrices-settings-module-CoOYPwEU.js} +1 -1
- package/public/assets/matrices-view-CcjCls3L.js +1 -0
- package/public/assets/matrix-workspace-98WdHTfO.js +1 -0
- package/public/assets/{maximize-2-DATMN9kx.js → maximize-2-BOW9VTPW.js} +1 -1
- package/public/assets/mermaid-diagram-kld9fHwj.js +1 -0
- package/public/assets/{mobile-file-text-meniSeto.js → mobile-file-text-BqyOwF0N.js} +1 -1
- package/public/assets/mobile-note-content-editor-BPxespTd.js +2 -0
- package/public/assets/{mobile-panel-layer-2EcEm-JB.js → mobile-panel-layer-CA_yph77.js} +1 -1
- package/public/assets/model-provider-settings-contribution-CECr7FiG.js +1 -0
- package/public/assets/model-providers-Ptlz_trq.js +1 -0
- package/public/assets/move-destination-2AXvBdlJ.js +1 -0
- package/public/assets/move-entries-dialog-BEJJSv8J.js +1 -0
- package/public/assets/{mr-IN-CRQNXWMA-DwF8SFQB.js → mr-IN-CRQNXWMA-DmnSBhlL.js} +1 -1
- package/public/assets/my-MM-5M5IBNSE-DDu4zmzX.js +1 -0
- package/public/assets/{nb-NO-T6EIAALU-BelWzTQs.js → nb-NO-T6EIAALU-BLzt9sXj.js} +1 -1
- package/public/assets/{nl-NL-IS3SIHDZ-Ce06PPL4.js → nl-NL-IS3SIHDZ-FtFhrALS.js} +1 -1
- package/public/assets/{nn-NO-6E72VCQL-BbXlzJzR.js → nn-NO-6E72VCQL-B_SymEE5.js} +1 -1
- package/public/assets/note-body-focus-d1lrm6Vw.js +1 -0
- package/public/assets/note-collab-provider-B5sEpjH1.js +1 -0
- package/public/assets/note-collab-transport-HTl4Zdug.js +1 -0
- package/public/assets/note-create-settings-module-iEVdyRFV.js +1 -0
- package/public/assets/{note-documents-CcJDTkta.js → note-documents-BPTwtsVi.js} +2 -2
- package/public/assets/note-editor-container-Ct9S4xJq.css +1 -0
- package/public/assets/note-editor-container-DzXoYKkT.js +2 -0
- package/public/assets/note-editor-settings-module-BZalej3y.js +1 -0
- package/public/assets/note-excalidraw-editor-CYHK-nyq.js +118 -0
- package/public/assets/note-excalidraw-editor-DVHMAsgJ.css +1 -0
- package/public/assets/{note-export-api-CwuXGV0y.js → note-export-api-Cdb5DLzA.js} +1 -1
- package/public/assets/note-export-flow-CfLnfRzg.js +1 -0
- package/public/assets/{note-filter-rule-rows-DFSWBwql.js → note-filter-rule-rows-DmVis2Dw.js} +1 -1
- package/public/assets/note-folds-settings-module-DeVre4gm.js +1 -0
- package/public/assets/note-frontmatter-summary-DNdQjzv5.js +1 -0
- package/public/assets/note-history-retention-B5aE8fKh.js +1 -0
- package/public/assets/note-link-list-C2i2SrSh.css +1 -0
- package/public/assets/note-link-list-DD4FzeUb.js +2 -0
- package/public/assets/note-markdown-editor-BlWCUXb9.js +26 -0
- package/public/assets/note-markdown-editor-Dp1k8dWQ.css +1 -0
- package/public/assets/{note-outline-BFidIp-8.js → note-outline-C-dPTJrB.js} +2 -2
- package/public/assets/note-outline-DTpLzjGU.css +1 -0
- package/public/assets/note-page-content-CZH9UDn0.js +2 -0
- package/public/assets/{note-page-editor-BgcMK_4q.css → note-page-editor-D7Wt_Giv.css} +1 -1
- package/public/assets/{note-page-editor-DpVUxkCx.js → note-page-editor-D8M6gjmG.js} +4 -4
- package/public/assets/note-path-breadcrumb-CLfo-0XG.js +1 -0
- package/public/assets/{note-path-breadcrumb-YC4bHnwX.css → note-path-breadcrumb-Drkebhvm.css} +1 -1
- package/public/assets/{note-picker-B5i41l1u.js → note-picker-DIFcqGgZ.js} +1 -1
- package/public/assets/note-picker-KBB6aonj.css +1 -0
- package/public/assets/{note-picker-popover-B9VTeHiM.js → note-picker-popover-CoT73GG-.js} +1 -1
- package/public/assets/note-shares-popup-CmUAI6V-.js +1 -0
- package/public/assets/note-side-panel-BFno3955.js +1 -0
- package/public/assets/note-side-panel-DLOy2dVw.css +1 -0
- package/public/assets/note-side-panel-host-iIfi_4c4.js +1 -0
- package/public/assets/note-source-editor-CVo_ZXww.js +1 -0
- package/public/assets/{note-type-grid-CRCfpYZy.js → note-type-grid-Bfdc8U-T.js} +2 -2
- package/public/assets/{note-type-grid-BM33ZYF-.css → note-type-grid-BzMZLAzW.css} +1 -1
- package/public/assets/{note-values-6D6wWXPg.js → note-values-C4A12_CE.js} +1 -1
- package/public/assets/notes-settings-module-DBSeNBYj.js +1 -0
- package/public/assets/notes-view-C_mX24NH.js +1 -0
- package/public/assets/notes-view-D212ymqf.css +1 -0
- package/public/assets/{oc-FR-POXYY2M6-CyRgkETq.js → oc-FR-POXYY2M6-DM9hsX9Q.js} +1 -1
- package/public/assets/{open-journal-writing-Bub8Zn13.js → open-journal-writing-Da9CBYtR.js} +1 -1
- package/public/assets/{pa-IN-N4M65BXN-A1_Q9748.js → pa-IN-N4M65BXN-CJJQ9oPk.js} +1 -1
- package/public/assets/page-content-27iX_YpJ.js +1 -0
- package/public/assets/page-content-CdioJybS.css +1 -0
- package/public/assets/page-export-api-BqvyvK1O.js +1 -0
- package/public/assets/page-export-flow-HzZ0AmjW.js +1 -0
- package/public/assets/page-files-C30eoBCR.js +1 -0
- package/public/assets/page-note-7Oo1OmH0.js +1 -0
- package/public/assets/pane-layout-BaHTn1Oz.js +1 -0
- package/public/assets/{panel-columns-fields-ZlW6A4My.js → panel-columns-fields-B9Biz8Xm.js} +1 -1
- package/public/assets/pdf-view-B5Y12R4H.js +1 -0
- package/public/assets/pdf-view-X71jeHKm.css +1 -0
- package/public/assets/{pencil-xxFNyZzr.js → pencil-BQzjBcpa.js} +1 -1
- package/public/assets/percentages-BXMCSKIN-DRPvI3O-.js +1 -0
- package/public/assets/{phone-numbers-BQgyhfcH.js → phone-numbers-lV_IC3Pq.js} +1 -1
- package/public/assets/{pl-PL-T2D74RX3-DaINIVjz.js → pl-PL-T2D74RX3-BLAcchR-.js} +1 -1
- package/public/assets/progress-bar-BxjnW3uQ.js +1 -0
- package/public/assets/provider-configuration-DBW3Pa0C.js +8 -0
- package/public/assets/provider-configuration-dpnYrEZm.css +1 -0
- package/public/assets/provider-use-select-C0EI8kSQ.js +1 -0
- package/public/assets/{pt-BR-5N22H2LF-ENVHjTz_.js → pt-BR-5N22H2LF-BiLQ-V_W.js} +1 -1
- package/public/assets/{pt-PT-UZXXM6DQ-D5Uqv0Vz.js → pt-PT-UZXXM6DQ-DKEXacg3.js} +1 -1
- package/public/assets/qr-code-DgTUKCej.js +2 -0
- package/public/assets/{qr-code-svg-8ENstC8b.js → qr-code-svg-DdWw4ovA.js} +1 -1
- package/public/assets/qr-defaults-settings-BbbzxV5k.js +1 -0
- package/public/assets/qr-settings-fields-C8GCAxa_.js +1 -0
- package/public/assets/qr-viewer-DTCnaLOP.js +1 -0
- package/public/assets/queryOptions-Dfvzj6n2.js +1 -0
- package/public/assets/{reader-clock-7x7Yvzv1.js → reader-clock-s4x6Qtz_.js} +1 -1
- package/public/assets/{recording-bar-BcuvYwhh.js → recording-bar-C5jkIsLX.js} +1 -1
- package/public/assets/{recording-setup-D_MgrYb7.js → recording-setup-fZ6fe1MX.js} +1 -1
- package/public/assets/{recordings-api-Ds77lFsk.js → recordings-api-CxuXFNaM.js} +1 -1
- package/public/assets/{resource-overview-card-BainFWKz.js → resource-overview-card-CAxT9QxY.js} +1 -1
- package/public/assets/{ro-RO-JPDTUUEW-Dq_ouOp1.js → ro-RO-JPDTUUEW-DPtQ18Fr.js} +1 -1
- package/public/assets/rss-settings-module-Bg7BBsC4.js +1 -0
- package/public/assets/rss-view-DeSvhXEa.js +3 -0
- package/public/assets/{ru-RU-B4JR7IUQ-CqqISqJC.js → ru-RU-B4JR7IUQ-n-7DhzM7.js} +1 -1
- package/public/assets/{safe-block-copy-BOVhmncw.js → safe-block-copy-B7NrP_YX.js} +1 -1
- package/public/assets/{safe-block-qr-button-CD7cJG3N.js → safe-block-qr-button-DomQCK7l.js} +1 -1
- package/public/assets/safe-block-reader-BGmIVIwN.js +1 -0
- package/public/assets/safe-folder-conversion-Re-4B3nf.js +1 -0
- package/public/assets/{safe-folders-DmvM6dtV.js → safe-folders-B4zJo8qB.js} +1 -1
- package/public/assets/{safe-move-leaving-BT5e1h3p.js → safe-move-leaving-D4dKIwTJ.js} +1 -1
- package/public/assets/{safe-note-locked-BDCeVwpK.js → safe-note-locked-BGUjggd4.js} +1 -1
- package/public/assets/safe-notes-settings-module-zJbcwdU7.js +1 -0
- package/public/assets/{markdown-task-toggle-CuRdtBn0.css → safe-text-B4Q6DSRg.css} +1 -1
- package/public/assets/safe-text-MPRw9KNQ.js +2 -0
- package/public/assets/search-settings-module-CMWbEyvZ.js +1 -0
- package/public/assets/{secret-form-B-YAlbZf.js → secret-form-DoNXw27T.js} +1 -1
- package/public/assets/secret-popup-Vn5Xkv4s.js +1 -0
- package/public/assets/section-navigation-1mCyY2Gm.js +1 -0
- package/public/assets/{security-settings-contribution-BmcZq1hf.js → security-settings-contribution-BrPrGp5q.js} +1 -1
- package/public/assets/settings-CxK-AM0A.js +1 -0
- package/public/assets/settings-actions-DnTiS3-h.js +1 -0
- package/public/assets/{settings-edit-dialog-C_AeTz9Y.js → settings-edit-dialog-CE5ZTszW.js} +1 -1
- package/public/assets/settings-panel-BF5baIMl.js +1 -0
- package/public/assets/settings-surface-CDwMuN24.js +3 -0
- package/public/assets/settings-surface-DzW4lcds.css +1 -0
- package/public/assets/{setup-prompt-BbpHVdla.js → setup-prompt-Bmv_QxoH.js} +1 -1
- package/public/assets/{share-access-control-CzAVEv6b.js → share-access-control-CB7J42Dn.js} +1 -1
- package/public/assets/shared-board-CLRkwNKE.js +1 -0
- package/public/assets/shared-board-lanes-OZo3pA9j.js +1 -0
- package/public/assets/{shared-calendar-view-DTzDjSs0.js → shared-calendar-view-BSmK0NDE.js} +1 -1
- package/public/assets/shared-note-route-CnykVAYu.css +1 -0
- package/public/assets/shared-note-route-DtZVqLMu.js +4 -0
- package/public/assets/shared-note-text-C6nccM7z.js +1 -0
- package/public/assets/{shares-settings-module-pIdBLmCq.js → shares-settings-module-gI5s2PT6.js} +1 -1
- package/public/assets/si-LK-N5RQ5JYF-BpI-kBDz.js +1 -0
- package/public/assets/{sk-SK-C5VTKIMK-YiOZ-xKA.js → sk-SK-C5VTKIMK-BRXRBgRU.js} +1 -1
- package/public/assets/{sl-SI-NN7IZMDC-BKb37Hlu.js → sl-SI-NN7IZMDC-BXKt0fnN.js} +1 -1
- package/public/assets/{spaces-settings-module-BLU1RsTS.js → spaces-settings-module-BOkTwY_Z.js} +1 -1
- package/public/assets/spaces-view-K5_OKPoW.js +2 -0
- package/public/assets/sqlite-browser-BVA27ofB.css +1 -0
- package/public/assets/sqlite-browser-DCKBF2SI.js +2 -0
- package/public/assets/stack-widgets-CLUFu_vQ.js +1 -0
- package/public/assets/store-attachments-DQ63HVZo.js +1 -0
- package/public/assets/stored-color-picker-BLs1gClm.css +1 -0
- package/public/assets/stored-color-picker-CZ66rDog.js +1 -0
- package/public/assets/style-DPV_jdGg.css +1 -0
- package/public/assets/subset-shared.chunk-DYH4c2c2.js +1 -0
- package/public/assets/subset-worker.chunk-yCTTgC3G.js +1 -0
- package/public/assets/{sv-SE-XGPEYMSR-VT0snW-T.js → sv-SE-XGPEYMSR-nBH8YjQ4.js} +1 -1
- package/public/assets/{ta-IN-2NMHFXQM--MqIf2Jf.js → ta-IN-2NMHFXQM-f0oprEqN.js} +1 -1
- package/public/assets/{text-diff-BmKfp7mY.js → text-diff-BMS8apwf.js} +1 -1
- package/public/assets/th-TH-HPSO5L25-CUOH0u8u.js +2 -0
- package/public/assets/{theme-colors-zbTaiYL0.js → theme-colors-BcoD3SUn.js} +1 -1
- package/public/assets/{toolbar-items-DLi0bl0c.js → toolbar-items-DtGvJf3U.js} +1 -1
- package/public/assets/{topology-code-editor-CNnSyUQ3.js → topology-code-editor-ClyHjN--.js} +1 -1
- package/public/assets/topology-designer-DmhzdlOY.js +1 -0
- package/public/assets/{topology-editor-DUaww3cM.css → topology-editor-CZnvLbBi.css} +1 -1
- package/public/assets/topology-editor-YK_2uGkR.js +8 -0
- package/public/assets/{topology-folder-migration-popup-C0Wc3ViK.js → topology-folder-migration-popup-AZFR8-44.js} +1 -1
- package/public/assets/{tr-TR-DEFEU3FU-BVLSiyVW.js → tr-TR-DEFEU3FU-CTsS8Qy-.js} +1 -1
- package/public/assets/{transcription-settings-BldPwHO7.js → transcription-settings-D7_ViMfp.js} +2 -2
- package/public/assets/tree-header-CmCmDZKG.js +1 -0
- package/public/assets/tree-header-DlATpadF.css +1 -0
- package/public/assets/types-settings-module-L4wPTMty.js +1 -0
- package/public/assets/{uk-UA-QMV73CPH-DQ4YsZml.js → uk-UA-QMV73CPH-BJo17WQM.js} +1 -1
- package/public/assets/{unlock-prompt-CkkcVo9g.js → unlock-prompt-BQVrb-4k.js} +1 -1
- package/public/assets/{use-candidate-notes-jH4-EW29.js → use-candidate-notes-YOxWyJCJ.js} +1 -1
- package/public/assets/{directory-picker-columns-BpDkvDO0.css → use-directory-columns-DILivjwk.css} +1 -1
- package/public/assets/use-directory-columns-DYequGsf.js +1 -0
- package/public/assets/use-directory-listing-Bj3F5kA3.js +1 -0
- package/public/assets/use-folding-enabled-N7w9iIqy.js +1 -0
- package/public/assets/use-heading-location-BZ9wUH2j.js +1 -0
- package/public/assets/{use-live-document-D4PkZrbU.js → use-live-document-4fc8FCW3.js} +1 -1
- package/public/assets/use-mobile-layer-navigation-Il_7QdXn.js +1 -0
- package/public/assets/{use-note-attachments-Bew073Hl.js → use-note-attachments-DAFyHvYo.js} +1 -1
- package/public/assets/{use-note-delete-fFNH1Glk.js → use-note-delete-JQISrVQ4.js} +1 -1
- package/public/assets/{use-note-editor-session-R1wm0xDf.js → use-note-editor-session-BlLoBd41.js} +1 -1
- package/public/assets/use-note-maximize-offer-DpU6Ms0_.js +1 -0
- package/public/assets/use-note-side-column-CFBvrpKH.css +1 -0
- package/public/assets/use-note-side-column-CVs74c26.js +1 -0
- package/public/assets/use-provider-dialogs-BRoAomhX.css +1 -0
- package/public/assets/use-provider-dialogs-HkxDcuJv.js +1 -0
- package/public/assets/{use-reflection-request-C1DxtaYX.js → use-reflection-request-BuFnMuQC.js} +4 -4
- package/public/assets/use-safe-folder-moves-CjbmSWSM.js +1 -0
- package/public/assets/use-safe-folders-apply-D_7a5l_T.js +1 -0
- package/public/assets/{use-screen-source-CF-48NnC.js → use-screen-source-BZ0GGtml.js} +1 -1
- package/public/assets/use-share-actions-DBYaF7Wp.css +1 -0
- package/public/assets/use-share-actions-Tfr6NI4j.js +1 -0
- package/public/assets/use-tab-style-B5YK0cIz.js +2 -0
- package/public/assets/use-tab-style-CRx5AnD1.css +1 -0
- package/public/assets/use-vault-file-link-BCQahdir.js +1 -0
- package/public/assets/{use-voice-questions-DGVQlAST.js → use-voice-questions-DmxYfc8M.js} +1 -1
- package/public/assets/vault-entries-api-CZHdxv7-.js +1 -0
- package/public/assets/vault-file-links-D1RzhVkx.js +1 -0
- package/public/assets/vault-folder-field-C5b24MNS.js +1 -0
- package/public/assets/vault-folder-field-X-B1weCe.css +1 -0
- package/public/assets/vault-links-popup-zkFCHyoP.js +1 -0
- package/public/assets/vault-manager-CZnYayEU.js +1 -0
- package/public/assets/{vault-settings-module-CCMMSy4B.js → vault-settings-module-CL2DHG69.js} +1 -1
- package/public/assets/vault-shares-popup-Cnew0vMQ.js +1 -0
- package/public/assets/vault-workspace-settings-module-D_n4aQfC.js +1 -0
- package/public/assets/{versioning-preferences-DrNq-y_0.js → versioning-preferences-BK-mZYhi.js} +1 -1
- package/public/assets/{versioning-settings-module-Ddug486c.js → versioning-settings-module-lq4k7b3C.js} +1 -1
- package/public/assets/versioning-view-BdEZaF8n.js +2 -0
- package/public/assets/{vi-VN-M7AON7JQ-B-fHV7o8.js → vi-VN-M7AON7JQ-DpgVSDWc.js} +1 -1
- package/public/assets/video-recording-dialog-ByevPvCN.js +1 -0
- package/public/assets/{video-recording-settings-B2iE6IdW.js → video-recording-settings-Ce2plgiG.js} +1 -1
- package/public/assets/widget-frame-DzlpiABF.js +1 -0
- package/public/assets/widget-layouts-DS7nWc80.js +1 -0
- package/public/assets/workspace-layout-3hjN1Wng.js +1 -0
- package/public/assets/{zh-CN-LNUGB5OW-CUgxiiUV.js → zh-CN-LNUGB5OW-Cfb6--Ow.js} +1 -1
- package/public/assets/zh-HK-E62DVLB3-vaMRVwdL.js +1 -0
- package/public/assets/{zh-TW-RAJ6MFWO-BVaf47B6.js → zh-TW-RAJ6MFWO-CNUUB_PG.js} +1 -1
- package/public/index.html +6 -6
- package/dist/search/embedding-connection-migration.js +0 -57
- package/node_modules/@braian/ai-providers/dist/legacy-embedding-migration.js +0 -21
- package/public/assets/FileText.es-4c63tWmA.js +0 -1
- package/public/assets/TerminalWindow.es-DwLjQ_88.js +0 -1
- package/public/assets/Warning.es-4HWtj9Nt.js +0 -1
- package/public/assets/agent-profiles-settings-yElCnMJo.js +0 -1
- package/public/assets/appearance-settings-module-BFDKE-mZ.js +0 -1
- package/public/assets/attachment-embed-BX0XSPNZ.js +0 -1
- package/public/assets/attachments-settings-CSEjOoFg.js +0 -1
- package/public/assets/az-AZ-76LH7QW2-DpGlptKS.js +0 -1
- package/public/assets/blue-ezN0uv0j.css +0 -1
- package/public/assets/board-workspace-CmetKvXF.js +0 -1
- package/public/assets/boards-settings-module-Bh5dh9jG.js +0 -1
- package/public/assets/calendar-view-Cr1VSpj0.js +0 -1
- package/public/assets/calendar-workspace-B-2Himdy.js +0 -1
- package/public/assets/card-fields-C1JCmDVz.css +0 -1
- package/public/assets/code-editor-wFimHbMT.css +0 -1
- package/public/assets/contents-view-EQyMaey-.css +0 -1
- package/public/assets/create-note-popup-C9IB_IZr.js +0 -1
- package/public/assets/daily-notes-settings-CCotd1Iq.js +0 -1
- package/public/assets/dashboard-workspace-4u-QaXby.js +0 -4
- package/public/assets/dashboard-workspace-CW4tbadO.css +0 -1
- package/public/assets/dashboards-view-DxUAl6zg.js +0 -1
- package/public/assets/directory-picker-columns-CqPZNMT8.js +0 -1
- package/public/assets/discovery-create-popup-BSOSYM4o.js +0 -1
- package/public/assets/discovery-import-popup-NodFxSW1.js +0 -1
- package/public/assets/discovery-view-PiwStXSa.js +0 -1
- package/public/assets/discovery-workspace-BTrjBF19.js +0 -2
- package/public/assets/drag-preview-D61OK7zr.js +0 -1
- package/public/assets/en-B4ZKOASM-jB7I34Md.js +0 -1
- package/public/assets/file-editor-B-9eXvH3.css +0 -1
- package/public/assets/file-editor-DvP7rRI9.js +0 -3
- package/public/assets/file-preview-AkYowAab.js +0 -1
- package/public/assets/file-preview-Dynm8laQ.css +0 -1
- package/public/assets/file-references-api-C2G0bSy9.js +0 -1
- package/public/assets/files-settings-module-DsylYhrR.js +0 -1
- package/public/assets/files-view-DPSrj_WW.js +0 -3
- package/public/assets/folder-picker-dialog-CxiRBtQb.css +0 -1
- package/public/assets/folder-picker-dialog-D_VCqm_i.js +0 -1
- package/public/assets/format-rules-GzYB7Vvh.js +0 -1
- package/public/assets/graph-explorer-CHz-bFkx.js +0 -329
- package/public/assets/graph-settings-module-9hY9bkdT.js +0 -1
- package/public/assets/icons-CxH3_W-q.js +0 -1
- package/public/assets/ide-settings-module-BbIX3okW.js +0 -1
- package/public/assets/ide-view-0vK2duKI.js +0 -2
- package/public/assets/ide-view-isgMvraA.css +0 -1
- package/public/assets/image-GAAHSSAO-D4NDL8F6.js +0 -1
- package/public/assets/imap-accounts-BRbnITJv.js +0 -1
- package/public/assets/index-BVDhmwI8.js +0 -11
- package/public/assets/index-DjUUY3gd.css +0 -1
- package/public/assets/journal-create-popup-39y9ieVG.js +0 -1
- package/public/assets/journal-day-route-CYlyL-u0.js +0 -1
- package/public/assets/journal-folder-field-B8yNmuTt.css +0 -1
- package/public/assets/journal-folder-field-BfO-_ied.js +0 -1
- package/public/assets/journal-page-CAXrq4hj.css +0 -1
- package/public/assets/journal-page-TgyVFaPE.js +0 -2
- package/public/assets/journal-settings-CfjXOXzF.js +0 -1
- package/public/assets/journal-typography-D3O3AK2U.js +0 -1
- package/public/assets/journal-writing-route-CYhXzipC.js +0 -1
- package/public/assets/journals-view-DNomC0nF.js +0 -1
- package/public/assets/kaa-6HZHGXH3-BUua-YiR.js +0 -1
- package/public/assets/kk-KZ-P5N5QNE5-CAitSjw5.js +0 -1
- package/public/assets/link-file-browser-A_Mappx0.js +0 -1
- package/public/assets/link-picker-BfwWXJZg.js +0 -2
- package/public/assets/locked-shares-prompt-BsM-ai_V.js +0 -1
- package/public/assets/logic-DtHJ5GlU.js +0 -28
- package/public/assets/markdown-message-BIo2pHhE.js +0 -3
- package/public/assets/markdown-message-C2w22wrW.css +0 -1
- package/public/assets/markdown-task-toggle-9k1EldDD.js +0 -5
- package/public/assets/matrices-view-DYF7e5ES.js +0 -1
- package/public/assets/matrix-workspace-JZhH-HQ5.js +0 -1
- package/public/assets/mermaid-diagram-gUL2-JyE.js +0 -1
- package/public/assets/mobile-note-content-editor-C6TUyA4F.js +0 -2
- package/public/assets/model-provider-settings-contribution-CfHiu3nS.js +0 -1
- package/public/assets/model-providers-cQOCMmwX.js +0 -1
- package/public/assets/my-MM-5M5IBNSE-BEiMo9eJ.js +0 -1
- package/public/assets/note-body-focus-BKKGEgBj.js +0 -1
- package/public/assets/note-collab-provider-B9DpnE58.js +0 -1
- package/public/assets/note-collab-transport-BHZ891IL.js +0 -1
- package/public/assets/note-create-settings-module-rIZc1DjQ.js +0 -1
- package/public/assets/note-editor-container-8DkvXTPN.css +0 -1
- package/public/assets/note-editor-container-DL3yLdYs.js +0 -2
- package/public/assets/note-editor-settings-module-DI0jRyPy.js +0 -1
- package/public/assets/note-excalidraw-editor-CKSC5Oww.css +0 -1
- package/public/assets/note-excalidraw-editor-fDQ1JVBh.js +0 -168
- package/public/assets/note-export-flow-DcBoI5Pp.js +0 -1
- package/public/assets/note-folds-settings-module-CFfVg1Cp.js +0 -1
- package/public/assets/note-frontmatter-summary-iubFPHA_.js +0 -1
- package/public/assets/note-link-list-CI9-GM_3.js +0 -1
- package/public/assets/note-link-list-hmCbBMA2.css +0 -1
- package/public/assets/note-markdown-editor-DlBj1yv3.css +0 -1
- package/public/assets/note-markdown-editor-lG6gZT9i.js +0 -26
- package/public/assets/note-outline-CAyXKuOh.css +0 -1
- package/public/assets/note-page-content-8gzPBWMV.js +0 -2
- package/public/assets/note-path-breadcrumb-HmtWyYZP.js +0 -1
- package/public/assets/note-picker-BURTnmWF.css +0 -1
- package/public/assets/note-shares-popup-aUO1SNLN.js +0 -1
- package/public/assets/note-source-editor-BXPR_-41.js +0 -1
- package/public/assets/notes-settings-module-DcP9Hid-.js +0 -1
- package/public/assets/page-content-B3fNjwr-.js +0 -1
- package/public/assets/page-content-lnIaLh4X.css +0 -1
- package/public/assets/page-files-CSqFupDZ.js +0 -1
- package/public/assets/page-note-nmiinGCs.js +0 -1
- package/public/assets/pane-keys-DiGU3yVB.css +0 -1
- package/public/assets/pane-keys-osajBGnu.js +0 -1
- package/public/assets/pdf-view-BATpBLO5.js +0 -1
- package/public/assets/pdf-view-BK5qKL4y.css +0 -1
- package/public/assets/percentages-BXMCSKIN-DzsiA6IB.js +0 -1
- package/public/assets/provider-configuration-CSnNV6ps.css +0 -1
- package/public/assets/provider-configuration-DaFovElx.js +0 -8
- package/public/assets/provider-use-select-D-lJiZ2W.js +0 -1
- package/public/assets/qr-code-CDBCi1Cu.js +0 -2
- package/public/assets/qr-defaults-settings-C_8ybA4R.js +0 -1
- package/public/assets/qr-settings-fields-C2-DGF6a.js +0 -1
- package/public/assets/qr-viewer-DAOzDI8d.js +0 -1
- package/public/assets/rss-preferences-BafuZ3Ku.js +0 -1
- package/public/assets/rss-settings-module-Df-YS9tr.js +0 -1
- package/public/assets/rss-view-BORHnuIQ.js +0 -3
- package/public/assets/safe-block-reader-BkilW4Hj.js +0 -1
- package/public/assets/safe-folder-conversion-DWTRwvTH.js +0 -1
- package/public/assets/safe-notes-settings-module-BrZreYgf.js +0 -1
- package/public/assets/search-settings-module-CPnculiI.js +0 -1
- package/public/assets/secret-popup-CoVpeLZV.js +0 -1
- package/public/assets/settings-CU8YR8di.js +0 -1
- package/public/assets/settings-panel-Ds7lOtnD.js +0 -1
- package/public/assets/settings-view-BTz2XbnW.js +0 -4
- package/public/assets/share-label-CbjQ9iMF.js +0 -1
- package/public/assets/shared-board-lanes-CAbJAFk6.js +0 -1
- package/public/assets/shared-note-route-B5rcAeES.css +0 -1
- package/public/assets/shared-note-route-B_gfX0Nl.js +0 -4
- package/public/assets/shared-note-text-DFBEyL8Z.js +0 -1
- package/public/assets/si-LK-N5RQ5JYF-DmhE8IT5.js +0 -1
- package/public/assets/spaces-view-BhWD3mAw.js +0 -2
- package/public/assets/sqlite-browser-BKjuAUqe.css +0 -1
- package/public/assets/sqlite-browser-C98PFoRG.js +0 -2
- package/public/assets/store-attachments-DbqF7LgE.js +0 -1
- package/public/assets/stored-color-picker-BoVzUatG.css +0 -1
- package/public/assets/stored-color-picker-DLX-e5Nq.js +0 -1
- package/public/assets/style-DLioOiRN.css +0 -1
- package/public/assets/subset-shared.chunk-D8M638AI.js +0 -1
- package/public/assets/subset-worker.chunk-B9ZhBm-P.js +0 -1
- package/public/assets/th-TH-HPSO5L25-CTKAmQrO.js +0 -2
- package/public/assets/topology-designer-T54LYLYv.js +0 -1
- package/public/assets/topology-editor-aGtCktzA.js +0 -8
- package/public/assets/topology-settings-module-Dp-Sm37Z.js +0 -1
- package/public/assets/use-directory-listing-Cn9t21ra.js +0 -1
- package/public/assets/use-folding-enabled-DKvri2UA.js +0 -1
- package/public/assets/use-mobile-layer-navigation-BIC7HlT_.js +0 -1
- package/public/assets/use-note-export-flow-Dm7yhW5s.js +0 -2
- package/public/assets/use-provider-dialogs-CrxN9JCo.js +0 -1
- package/public/assets/use-safe-folder-moves-DjQUnMvz.js +0 -1
- package/public/assets/use-safe-folders-apply-B1V8l7WU.js +0 -1
- package/public/assets/use-share-actions-RxO2M3y0.css +0 -1
- package/public/assets/use-share-actions-kb7uFat_.js +0 -1
- package/public/assets/use-vault-file-link-B-ZRcKDu.js +0 -1
- package/public/assets/vault-entries-api-pFsJiGnJ.js +0 -1
- package/public/assets/vault-manager-YKz_Ib18.js +0 -1
- package/public/assets/vault-shares-popup-CaGnEIJA.js +0 -1
- package/public/assets/versioning-view-PR4R4gks.js +0 -2
- package/public/assets/video-recording-dialog-CxRs1eLE.js +0 -1
- package/public/assets/widget-frame-DiF4946k.js +0 -1
- package/public/assets/zh-HK-E62DVLB3-D-87W8QH.js +0 -1
- /package/public/assets/{blue-CDYoCZOg.js → blue-DQyE4k0K.js} +0 -0
- /package/public/assets/{use-safe-folders-apply-DGWTaX5A.css → progress-bar-DGWTaX5A.css} +0 -0
- /package/public/assets/{style-DA65Bz1d.js → style-CXzDJL_q.js} +0 -0
|
@@ -5,6 +5,9 @@ exports.shareAddsItems = shareAddsItems;
|
|
|
5
5
|
exports.isShareId = isShareId;
|
|
6
6
|
exports.validateShareId = validateShareId;
|
|
7
7
|
exports.pathWithinFolder = pathWithinFolder;
|
|
8
|
+
exports.isWebpagePath = isWebpagePath;
|
|
9
|
+
exports.webpageFolder = webpageFolder;
|
|
10
|
+
exports.webpageCovers = webpageCovers;
|
|
8
11
|
exports.shareReach = shareReach;
|
|
9
12
|
exports.shareState = shareState;
|
|
10
13
|
exports.shareRevision = shareRevision;
|
|
@@ -16,9 +19,10 @@ exports.createShareRecord = createShareRecord;
|
|
|
16
19
|
exports.updateShareRecord = updateShareRecord;
|
|
17
20
|
exports.renameShareTargets = renameShareTargets;
|
|
18
21
|
exports.removeShareTargets = removeShareTargets;
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
+
exports.shareEntryUnder = shareEntryUnder;
|
|
23
|
+
exports.relocatedEntryTarget = relocatedEntryTarget;
|
|
24
|
+
exports.relocateShareEntries = relocateShareEntries;
|
|
25
|
+
exports.removeShareEntries = removeShareEntries;
|
|
22
26
|
exports.shareSpaceUnder = shareSpaceUnder;
|
|
23
27
|
exports.removeSpaceShareTargets = removeSpaceShareTargets;
|
|
24
28
|
exports.shareBoardUnder = shareBoardUnder;
|
|
@@ -32,6 +36,7 @@ const yaml_1 = require("yaml");
|
|
|
32
36
|
const errors_1 = require("./errors");
|
|
33
37
|
const share_save_limit_1 = require("./share-save-limit");
|
|
34
38
|
const records_1 = require("./records");
|
|
39
|
+
const vault_access_1 = require("./vault-access");
|
|
35
40
|
exports.shareScopes = ['read', 'edit'];
|
|
36
41
|
exports.shareAccessModes = ['read', 'write', 'dictate'];
|
|
37
42
|
/** A link switched to, or made with, Can edit: items move and files upload, and adding waits for the owner to allow it. */
|
|
@@ -53,15 +58,37 @@ function validateShareId(value) {
|
|
|
53
58
|
}
|
|
54
59
|
/** Whether `path` is `folder` or sits under it, decided on the path alone: `trips/rome-2` is not under `trips/rome`. */
|
|
55
60
|
function pathWithinFolder(folder, path) { return path === folder || path.startsWith(`${folder}/`); }
|
|
61
|
+
/** The file types a web page link opens: what a browser renders as a page. */
|
|
62
|
+
function isWebpagePath(path) { return /\.(?:html?|xhtml)$/i.test(path); }
|
|
63
|
+
/** The folder a web page sits in, whose files the page loads; empty for a page at the vault root. */
|
|
64
|
+
function webpageFolder(path) { return path.includes('/') ? path.slice(0, path.lastIndexOf('/')) : ''; }
|
|
65
|
+
/**
|
|
66
|
+
* Whether a published page's link may serve or embed `path`: a file in the page's folder or below
|
|
67
|
+
* it, never a note and never a hidden entry. The one rule the page route, the standalone build and
|
|
68
|
+
* the page export share, so what the preview shows is what leaves the vault.
|
|
69
|
+
*/
|
|
70
|
+
function webpageCovers(pagePath, path) {
|
|
71
|
+
const folder = webpageFolder(pagePath);
|
|
72
|
+
if (folder && !path.startsWith(`${folder}/`))
|
|
73
|
+
return false;
|
|
74
|
+
return !path.toLowerCase().endsWith('.md') && !path.split('/').some((segment) => segment.startsWith('.'));
|
|
75
|
+
}
|
|
56
76
|
/**
|
|
57
77
|
* The one place a target's reach is decided. A note link covers its note and no file by location,
|
|
58
78
|
* and follows the note's references. A folder link covers every note and file at or under its
|
|
59
79
|
* folder; a read link also follows references, an edit link does not, because its holder writes
|
|
60
80
|
* the notes whose references would be followed. A space link covers the notes its reach computed,
|
|
61
81
|
* no file by location, and follows references; so does a board link, whose reach is its active cards' notes.
|
|
82
|
+
* A web page link covers no note, and the files `webpageCovers` allows; none when it is standalone,
|
|
83
|
+
* whose one document is all it serves, and none for a page at the vault root, whose folder is the vault.
|
|
62
84
|
*/
|
|
63
85
|
function shareReach(share, sources = {}) {
|
|
64
86
|
const { target } = share;
|
|
87
|
+
// A vault link is authorized by its session's policy, never by object-share reach: through these routes it reaches nothing.
|
|
88
|
+
if (target.kind === 'vault')
|
|
89
|
+
return { coversNote: () => false, coversFile: () => false, followsReferences: false };
|
|
90
|
+
if (target.kind === 'webpage')
|
|
91
|
+
return { coversNote: () => false, coversFile: (path) => share.standalone !== true && webpageFolder(target.path) !== '' && webpageCovers(target.path, path), followsReferences: false };
|
|
65
92
|
if (target.kind === 'folder') {
|
|
66
93
|
return { coversNote: (noteId) => pathWithinFolder(target.path, noteId), coversFile: (path) => pathWithinFolder(target.path, path), followsReferences: share.scope === 'read' };
|
|
67
94
|
}
|
|
@@ -96,22 +123,27 @@ function validateShareDraft(value) {
|
|
|
96
123
|
throw invalidShare('A link\'s save limit must be a whole number of bytes.', 'maxSaveBytes');
|
|
97
124
|
if (value.maxUploadBytes !== undefined && value.maxUploadBytes !== null && !(0, share_save_limit_1.isSaveBytes)(value.maxUploadBytes))
|
|
98
125
|
throw invalidShare('A link\'s upload limit must be a whole number of bytes.', 'maxUploadBytes');
|
|
126
|
+
if (value.standalone !== undefined && value.standalone !== null && typeof value.standalone !== 'boolean')
|
|
127
|
+
throw invalidShare('standalone must be true or false.', 'standalone');
|
|
99
128
|
// Only a writable link saves or uploads, so only a writable link keeps either limit; the ceiling is the use case's to check.
|
|
100
129
|
const maxSaveBytes = scope === 'edit' && typeof value.maxSaveBytes === 'number' ? value.maxSaveBytes : undefined;
|
|
101
130
|
const maxUploadBytes = scope === 'edit' && typeof value.maxUploadBytes === 'number' ? value.maxUploadBytes : undefined;
|
|
102
131
|
const expiresAt = value.expiresAt === undefined || value.expiresAt === null ? undefined : validateTimestamp(value.expiresAt, 'expiresAt');
|
|
103
|
-
return { ...(description ? { description } : {}), scope, ...(scope === 'edit' && value.dictation === true ? { dictation: true } : {}), ...(edit ? { edit } : {}), ...(value.safeBlocks === true ? { safeBlocks: true } : {}), ...(maxSaveBytes !== undefined ? { maxSaveBytes } : {}), ...(maxUploadBytes !== undefined ? { maxUploadBytes } : {}), ...(expiresAt ? { expiresAt } : {}) };
|
|
132
|
+
return { ...(description ? { description } : {}), scope, ...(scope === 'edit' && value.dictation === true ? { dictation: true } : {}), ...(edit ? { edit } : {}), ...(value.safeBlocks === true ? { safeBlocks: true } : {}), ...(maxSaveBytes !== undefined ? { maxSaveBytes } : {}), ...(maxUploadBytes !== undefined ? { maxUploadBytes } : {}), ...(value.standalone === true ? { standalone: true } : {}), ...(expiresAt ? { expiresAt } : {}) };
|
|
104
133
|
}
|
|
105
134
|
/**
|
|
106
135
|
* A note target names a `.md` path; a folder target a vault-relative folder, never the root: no
|
|
107
136
|
* leading or trailing slash, no empty, `.`, `..` or dot-prefixed segment, no backslash, no control
|
|
108
137
|
* character, the same rules the vault applies to every path, so a target can never name what the
|
|
109
138
|
* index would not hold. A space target names a tree and, for one item and everything under it, an
|
|
110
|
-
* item; a board target names a board, whose ID is never reused once it is deleted.
|
|
139
|
+
* item; a board target names a board, whose ID is never reused once it is deleted. A web page target
|
|
140
|
+
* names an HTML file by its vault path, under the same path rules as a folder.
|
|
111
141
|
*/
|
|
112
142
|
function validateShareTarget(value) {
|
|
113
143
|
if (!(0, records_1.isRecord)(value))
|
|
114
144
|
throw invalidShare('A share target must be { kind: note | folder | space | board, … }.');
|
|
145
|
+
if (value.kind === 'vault')
|
|
146
|
+
return { kind: 'vault' };
|
|
115
147
|
if (value.kind === 'board') {
|
|
116
148
|
const boardId = typeof value.boardId === 'string' ? value.boardId.trim().toUpperCase() : '';
|
|
117
149
|
if (!boardIdPattern.test(boardId))
|
|
@@ -127,7 +159,21 @@ function validateShareTarget(value) {
|
|
|
127
159
|
return { kind: 'space', spaceId, ...(value.itemId === undefined || value.itemId === null ? {} : { itemId: Number(value.itemId) }) };
|
|
128
160
|
}
|
|
129
161
|
if (typeof value.path !== 'string')
|
|
130
|
-
throw invalidShare('A share target must be { kind: note | folder, path } or { kind: space, spaceId, itemId? }.');
|
|
162
|
+
throw invalidShare('A share target must be { kind: note | folder | webpage, path } or { kind: space, spaceId, itemId? }.');
|
|
163
|
+
if (value.kind === 'webpage') {
|
|
164
|
+
let path;
|
|
165
|
+
try {
|
|
166
|
+
if (controlCharacters.test(value.path))
|
|
167
|
+
throw new Error('control character');
|
|
168
|
+
path = (0, vault_sdk_1.normalizeVaultPath)(value.path);
|
|
169
|
+
}
|
|
170
|
+
catch {
|
|
171
|
+
throw invalidShare('A web page target must be a vault-relative file path: no leading or trailing slash, no dot segments.');
|
|
172
|
+
}
|
|
173
|
+
if (!isWebpagePath(path))
|
|
174
|
+
throw invalidShare('A web page target must be an .html, .htm or .xhtml file.');
|
|
175
|
+
return { kind: 'webpage', path };
|
|
176
|
+
}
|
|
131
177
|
if (value.kind === 'note') {
|
|
132
178
|
if (!value.path.trim() || !value.path.toLowerCase().endsWith('.md'))
|
|
133
179
|
throw invalidShare('A note target must be a .md path: { kind: note, path: <note>.md }.');
|
|
@@ -145,7 +191,7 @@ function validateShareTarget(value) {
|
|
|
145
191
|
}
|
|
146
192
|
return { kind: 'folder', path };
|
|
147
193
|
}
|
|
148
|
-
throw invalidShare('A share target must be { kind: note | folder, path }, { kind: space, spaceId, itemId? } or { kind: board, boardId }.');
|
|
194
|
+
throw invalidShare('A share target must be { kind: note | folder | webpage, path }, { kind: space, spaceId, itemId? } or { kind: board, boardId }.');
|
|
149
195
|
}
|
|
150
196
|
/**
|
|
151
197
|
* A read link carries no edit options, so switching to Read only drops them. A writable space
|
|
@@ -153,15 +199,24 @@ function validateShareTarget(value) {
|
|
|
153
199
|
* `moveCards` and `addCards` beside `upload`; no other link keeps those two. A writable note or
|
|
154
200
|
* folder link keeps `upload` alone; one with no block, as every such link made before uploads
|
|
155
201
|
* reached it, keeps none and reads as uploads off, so the owner's form can tell it from one turned
|
|
156
|
-
* off and offer it on.
|
|
202
|
+
* off and offer it on. A web page link has no write mode at all: an edit scope is refused, and it
|
|
203
|
+
* keeps its description, its end and `standalone`, which no other link carries.
|
|
157
204
|
*/
|
|
158
205
|
function validateShareRecord(value) {
|
|
159
206
|
if (!(0, records_1.isRecord)(value))
|
|
160
207
|
throw invalidShare('Each share must be an object.');
|
|
161
208
|
const id = validateShareId(value.id);
|
|
162
209
|
const target = validateShareTarget(value.target);
|
|
163
|
-
const { edit, ...draft } = validateShareDraft(value);
|
|
210
|
+
const { edit, standalone, ...draft } = validateShareDraft(value);
|
|
164
211
|
const times = { createdAt: validateTimestamp(value.createdAt, 'createdAt'), updatedAt: validateTimestamp(value.updatedAt, 'updatedAt') };
|
|
212
|
+
// A vault link is always read/write (ENG-430): its grant, not a scope or edit options, says what it does.
|
|
213
|
+
if (target.kind === 'vault')
|
|
214
|
+
return { id, target, ...(draft.description ? { description: draft.description } : {}), scope: 'edit', vault: (0, vault_access_1.readStoredVaultLinkGrant)(value.vault), ...(draft.expiresAt ? { expiresAt: draft.expiresAt } : {}), ...times };
|
|
215
|
+
if (target.kind === 'webpage') {
|
|
216
|
+
if (draft.scope !== 'read')
|
|
217
|
+
throw invalidShare('A published web page is read only.', 'scope');
|
|
218
|
+
return { id, target, ...(draft.description ? { description: draft.description } : {}), scope: 'read', ...(standalone ? { standalone } : {}), ...(draft.expiresAt ? { expiresAt: draft.expiresAt } : {}), ...times };
|
|
219
|
+
}
|
|
165
220
|
if (draft.scope !== 'edit')
|
|
166
221
|
return { id, target, ...draft, ...times };
|
|
167
222
|
if (target.kind === 'space') {
|
|
@@ -175,11 +230,15 @@ function validateShareRecord(value) {
|
|
|
175
230
|
/** A new writable link with no edit options takes the defaults, so a note or folder link made now takes uploads. */
|
|
176
231
|
function createShareRecord(id, target, draft, now) {
|
|
177
232
|
const at = now.toISOString();
|
|
233
|
+
if (target.kind === 'vault')
|
|
234
|
+
return validateShareRecord({ id, target, ...validateShareDraft({ ...draft, scope: 'edit' }), vault: (0, vault_access_1.validateVaultLinkGrant)(draft.vault), createdAt: at, updatedAt: at });
|
|
178
235
|
const validated = validateShareDraft(draft);
|
|
179
236
|
return validateShareRecord({ id, target, ...validated, ...(validated.scope === 'edit' && !validated.edit ? { edit: { ...exports.defaultShareEditOptions, addTypes: [] } } : {}), createdAt: at, updatedAt: at });
|
|
180
237
|
}
|
|
181
238
|
/** An edit replaces what the owner sets and keeps the link: its ID, its target and when it was made. */
|
|
182
239
|
function updateShareRecord(current, draft, now) {
|
|
240
|
+
if (current.target.kind === 'vault')
|
|
241
|
+
return validateShareRecord({ id: current.id, target: current.target, ...validateShareDraft({ ...draft, scope: 'edit' }), vault: (0, vault_access_1.validateVaultLinkGrant)(draft.vault), createdAt: current.createdAt, updatedAt: now.toISOString() });
|
|
183
242
|
return validateShareRecord({ id: current.id, target: current.target, ...validateShareDraft(draft), createdAt: current.createdAt, updatedAt: now.toISOString() });
|
|
184
243
|
}
|
|
185
244
|
/** The note links a rename must follow, rewritten; the rest untouched. */
|
|
@@ -198,24 +257,28 @@ function removeShareTargets(shares, noteId) {
|
|
|
198
257
|
const removed = shares.filter((share) => share.target.kind === 'note' && share.target.path === noteId).map((share) => share.id);
|
|
199
258
|
return { shares: shares.filter((share) => !removed.includes(share.id)), removed };
|
|
200
259
|
}
|
|
201
|
-
/** Whether a folder link's folder is `path` or sits under it: the links a move or a delete of `path` touches. */
|
|
202
|
-
function
|
|
203
|
-
return share.target.kind === 'folder' && pathWithinFolder(path, share.target.path);
|
|
260
|
+
/** Whether a folder link's folder or a web page link's file is `path` or sits under it: the links a move or a delete of `path` touches. */
|
|
261
|
+
function shareEntryUnder(share, path) {
|
|
262
|
+
return (share.target.kind === 'folder' || share.target.kind === 'webpage') && pathWithinFolder(path, share.target.path);
|
|
263
|
+
}
|
|
264
|
+
/** A moved entry's link target, rewritten by prefix: moving `trips` to `archive/trips` turns `trips/rome` into `archive/trips/rome`. */
|
|
265
|
+
function relocatedEntryTarget(target, from, to) {
|
|
266
|
+
return { kind: target.kind, path: `${to}${target.path.slice(from.length)}` };
|
|
204
267
|
}
|
|
205
|
-
/** The folder links a moved entry carries along
|
|
206
|
-
function
|
|
268
|
+
/** The folder and web page links a moved entry carries along. */
|
|
269
|
+
function relocateShareEntries(shares, from, to, now) {
|
|
207
270
|
const touched = [];
|
|
208
271
|
const next = shares.map((share) => {
|
|
209
|
-
if (!
|
|
272
|
+
if (!shareEntryUnder(share, from))
|
|
210
273
|
return share;
|
|
211
274
|
touched.push(share.id);
|
|
212
|
-
return { ...share, target:
|
|
275
|
+
return { ...share, target: relocatedEntryTarget(share.target, from, to), updatedAt: now.toISOString() };
|
|
213
276
|
});
|
|
214
277
|
return { shares: next, touched };
|
|
215
278
|
}
|
|
216
|
-
/** A deleted entry takes the folder links at or below it with it. */
|
|
217
|
-
function
|
|
218
|
-
const removed = shares.filter((share) =>
|
|
279
|
+
/** A deleted entry takes the folder and web page links at or below it with it. */
|
|
280
|
+
function removeShareEntries(shares, path) {
|
|
281
|
+
const removed = shares.filter((share) => shareEntryUnder(share, path)).map((share) => share.id);
|
|
219
282
|
return { shares: shares.filter((share) => !removed.includes(share.id)), removed };
|
|
220
283
|
}
|
|
221
284
|
/** Whether a space link is rooted at one of `itemIds` of `spaceId`, or anywhere in that tree when `itemIds` is `'tree'`. */
|
|
@@ -238,10 +301,12 @@ function removeBoardShareTargets(shares, boardId) {
|
|
|
238
301
|
const removed = shares.filter((share) => shareBoardUnder(share, boardId)).map((share) => share.id);
|
|
239
302
|
return { shares: shares.filter((share) => !removed.includes(share.id)), removed };
|
|
240
303
|
}
|
|
241
|
-
/** How a link is named where a person reads it: the delete confirmation, a mutation report. A folder link names its folder, a space link its tree and item, a board link its board. */
|
|
304
|
+
/** How a link is named where a person reads it: the delete confirmation, a mutation report. A folder link names its folder, a space link its tree and item, a board link its board, a web page link its file. */
|
|
242
305
|
function shareLabel(share) {
|
|
243
306
|
const target = share.target;
|
|
244
|
-
const where = target?.kind === 'folder' ? ` to “${(0, node_path_1.basename)(target.path)}”` : target?.kind === 'space' ? ` to ${target.itemId === undefined ? `tree ${target.spaceId}` : `item ${target.spaceId}-${target.itemId}`}` : target?.kind === 'board' ? ` to board ${target.boardId}` : '';
|
|
307
|
+
const where = target?.kind === 'folder' ? ` to “${(0, node_path_1.basename)(target.path)}”` : target?.kind === 'space' ? ` to ${target.itemId === undefined ? `tree ${target.spaceId}` : `item ${target.spaceId}-${target.itemId}`}` : target?.kind === 'board' ? ` to board ${target.boardId}` : target?.kind === 'webpage' ? ` to web page “${(0, node_path_1.basename)(target.path)}”` : target?.kind === 'vault' ? ' to the whole vault' : '';
|
|
308
|
+
if (target?.kind === 'vault')
|
|
309
|
+
return `Vault link${share.description ? `: ${share.description}` : ''}`;
|
|
245
310
|
return `${share.scope === 'edit' ? 'Edit' : 'Read-only'} share link${where}${share.description ? `: ${share.description}` : ''}`;
|
|
246
311
|
}
|
|
247
312
|
function validateDescription(value) {
|
|
@@ -34,6 +34,13 @@ class ShareRegistry {
|
|
|
34
34
|
return this.lock.run(async () => { const share = (await this.read()).shares.find((item) => item.id === id); if (!share)
|
|
35
35
|
throw notFound(id); return documentFor(share); });
|
|
36
36
|
}
|
|
37
|
+
/** A link by its storage key, the sha256 digest of its ID: what a vault-link session carries instead of the secret (ENG-430). */
|
|
38
|
+
getByKey(key) {
|
|
39
|
+
if (!/^[a-f0-9]{64}$/.test(key))
|
|
40
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
41
|
+
return this.lock.run(async () => { const share = (await this.read()).shares.find((item) => (0, share_storage_1.shareKey)(item.id) === key); if (!share)
|
|
42
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.'); return documentFor(share); });
|
|
43
|
+
}
|
|
37
44
|
create(target, draft) {
|
|
38
45
|
return this.lock.run(async () => {
|
|
39
46
|
const document = await this.read();
|
|
@@ -77,8 +84,8 @@ class ShareRegistry {
|
|
|
77
84
|
* link that merely covers it, since deleting one note inside a shared folder ends no link.
|
|
78
85
|
*/
|
|
79
86
|
referencesFor(noteId) { return this.lock.run(async () => (await this.read()).shares.filter((share) => share.target.kind === 'note' && share.target.path === noteId)); }
|
|
80
|
-
/** The folder links at or below an entry, which deleting that entry ends. */
|
|
81
|
-
referencesForEntry(path) { return this.lock.run(async () => (await this.read()).shares.filter((share) => (0, share_policy_1.
|
|
87
|
+
/** The folder and web page links at or below an entry, which deleting that entry ends. */
|
|
88
|
+
referencesForEntry(path) { return this.lock.run(async () => (await this.read()).shares.filter((share) => (0, share_policy_1.shareEntryUnder)(share, path))); }
|
|
82
89
|
/** The space links rooted at these items of a tree, or anywhere in it, which removing them ends. */
|
|
83
90
|
referencesForSpace(spaceId, itemIds) { return this.lock.run(async () => (await this.read()).shares.filter((share) => (0, share_policy_1.shareSpaceUnder)(share, spaceId, itemIds))); }
|
|
84
91
|
/** The links that open this board, which deleting it ends. */
|
|
@@ -137,25 +144,25 @@ class ShareRegistry {
|
|
|
137
144
|
return touched;
|
|
138
145
|
});
|
|
139
146
|
}
|
|
140
|
-
/** A moved entry carries the folder links at or below it to the new path; orphans move too, since their
|
|
141
|
-
|
|
147
|
+
/** A moved entry carries the folder and web page links at or below it to the new path; orphans move too, since their entry moved as well. */
|
|
148
|
+
relocateEntryTargetsReport(from, to) {
|
|
142
149
|
return this.lock.run(async () => {
|
|
143
150
|
const document = await this.read();
|
|
144
|
-
const { shares, touched } = (0, share_policy_1.
|
|
151
|
+
const { shares, touched } = (0, share_policy_1.relocateShareEntries)(document.shares, from, to, this.now());
|
|
145
152
|
let orphansMoved = false;
|
|
146
|
-
const orphans = document.orphans.map((share) => { if (!(0, share_policy_1.
|
|
147
|
-
return share; orphansMoved = true; return { ...share, target:
|
|
153
|
+
const orphans = document.orphans.map((share) => { if (!(0, share_policy_1.shareEntryUnder)(share, from))
|
|
154
|
+
return share; orphansMoved = true; return { ...share, target: (0, share_policy_1.relocatedEntryTarget)(share.target, from, to) }; });
|
|
148
155
|
if (touched.length || orphansMoved)
|
|
149
156
|
await this.write({ ...document, shares, orphans });
|
|
150
157
|
return touched;
|
|
151
158
|
});
|
|
152
159
|
}
|
|
153
|
-
/** A deleted entry takes the folder links at or below it with it, their IDs included. */
|
|
154
|
-
|
|
160
|
+
/** A deleted entry takes the folder and web page links at or below it with it, their IDs included. */
|
|
161
|
+
removeEntryTargetsReport(path) {
|
|
155
162
|
return this.lock.run(async () => {
|
|
156
163
|
const document = await this.read();
|
|
157
|
-
const { shares, removed } = (0, share_policy_1.
|
|
158
|
-
const orphans = document.orphans.filter((share) => !(
|
|
164
|
+
const { shares, removed } = (0, share_policy_1.removeShareEntries)(document.shares, path);
|
|
165
|
+
const orphans = document.orphans.filter((share) => !(0, share_policy_1.shareEntryUnder)(share, path));
|
|
159
166
|
if (removed.length || orphans.length !== document.orphans.length)
|
|
160
167
|
await this.write({ ...document, shares, orphans });
|
|
161
168
|
if (removed.length)
|
|
@@ -16,6 +16,12 @@ async function describeShareTarget(target, keys, ports, includeSpaceName = true)
|
|
|
16
16
|
const name = (0, node_path_1.basename)(target.path);
|
|
17
17
|
return { title: name, name, type: 'folder', location: target.path, exists: await ports.folderExists(target.path) };
|
|
18
18
|
}
|
|
19
|
+
if (target.kind === 'webpage') {
|
|
20
|
+
const name = (0, node_path_1.basename)(target.path);
|
|
21
|
+
return { title: name, name, type: 'webpage', location: target.path, exists: await (ports.files?.().stat(target.path).then(() => true, () => false) ?? false) };
|
|
22
|
+
}
|
|
23
|
+
if (target.kind === 'vault')
|
|
24
|
+
return { title: 'Whole vault', name: 'Whole vault', type: 'vault', location: '', exists: true };
|
|
19
25
|
if (target.kind === 'board') {
|
|
20
26
|
const board = await ports.board?.(target.boardId);
|
|
21
27
|
const name = board?.board.name ?? target.boardId;
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ShareUseCases = void 0;
|
|
4
|
-
// Sharing a note, a folder, a space or a
|
|
4
|
+
// Sharing a note, a folder, a space, a board or a web page through a link: what the owner does to links, and what a link lets its holder do.
|
|
5
5
|
const node_path_1 = require("node:path");
|
|
6
6
|
const node_crypto_1 = require("node:crypto");
|
|
7
7
|
const yaml_1 = require("yaml");
|
|
8
8
|
const excalidraw_markdown_1 = require("@braian/excalidraw-markdown");
|
|
9
9
|
const page_notes_1 = require("@braian/page-notes");
|
|
10
10
|
const safe_notes_1 = require("@braian/safe-notes");
|
|
11
|
+
const vault_sdk_1 = require("@braian/vault-sdk");
|
|
12
|
+
const entity_document_1 = require("./entity-document");
|
|
11
13
|
const errors_1 = require("./errors");
|
|
12
14
|
const space_model_1 = require("./space-model");
|
|
13
15
|
const panel_evaluation_1 = require("./panel-evaluation");
|
|
@@ -19,10 +21,12 @@ const shared_space_site_1 = require("./shared-space-site");
|
|
|
19
21
|
const shared_note_view_1 = require("./shared-note-view");
|
|
20
22
|
const share_board_links_1 = require("./share-board-links");
|
|
21
23
|
const share_space_links_1 = require("./share-space-links");
|
|
24
|
+
const share_webpage_links_1 = require("./share-webpage-links");
|
|
22
25
|
const share_target_description_1 = require("./share-target-description");
|
|
23
26
|
const shared_board_view_1 = require("./shared-board-view");
|
|
24
27
|
const shared_safe_content_1 = require("./shared-safe-content");
|
|
25
28
|
const note_key_settings_1 = require("./note-key-settings");
|
|
29
|
+
const share_storage_1 = require("./share-storage");
|
|
26
30
|
class ShareUseCases {
|
|
27
31
|
registry;
|
|
28
32
|
ports;
|
|
@@ -60,6 +64,15 @@ class ShareUseCases {
|
|
|
60
64
|
await this.boards.require(target);
|
|
61
65
|
return this.item(await this.registry.create(target, draft));
|
|
62
66
|
}
|
|
67
|
+
if (target.kind === 'webpage') {
|
|
68
|
+
if (!await this.fileExists(target.path))
|
|
69
|
+
throw new errors_1.GraphAgentError('entity_not_found', 'No such file.', { path: target.path });
|
|
70
|
+
(0, share_webpage_links_1.requirePublishableWebpage)(target, (0, share_policy_1.validateShareDraft)(draft).standalone === true);
|
|
71
|
+
return this.item(await this.registry.create(target, draft));
|
|
72
|
+
}
|
|
73
|
+
// A vault link opens the original app under its grant (ENG-430); only the grant is checked here.
|
|
74
|
+
if (target.kind === 'vault')
|
|
75
|
+
return this.item(await this.registry.create(target, draft));
|
|
63
76
|
const note = await this.ports.getEntity(target.path);
|
|
64
77
|
await this.refuseEncryptedEdit(note, draft);
|
|
65
78
|
return this.item(await this.registry.create({ kind: 'note', path: note.id }, draft));
|
|
@@ -69,6 +82,8 @@ class ShareUseCases {
|
|
|
69
82
|
await this.requireSaveLimit(draft);
|
|
70
83
|
if (share.target.kind === 'space')
|
|
71
84
|
await this.requireAddTypes(draft);
|
|
85
|
+
if (share.target.kind === 'webpage')
|
|
86
|
+
(0, share_webpage_links_1.requirePublishableWebpage)(share.target, (0, share_policy_1.validateShareDraft)(draft).standalone === true);
|
|
72
87
|
if (share.target.kind === 'note')
|
|
73
88
|
await this.ports.getEntity(share.target.path).then((note) => this.refuseEncryptedEdit(note, draft), (error) => { if (!(error instanceof errors_1.GraphAgentError && error.code === 'entity_not_found'))
|
|
74
89
|
throw error; });
|
|
@@ -142,12 +157,17 @@ class ShareUseCases {
|
|
|
142
157
|
/**
|
|
143
158
|
* A note link answers its note; a folder link its folder's own name; a space link the site's
|
|
144
159
|
* navigation, the owner's expansion and the landing item. A note or folder edit link that takes
|
|
145
|
-
* uploads says so, with the vault's upload limit, as a site's actions do.
|
|
160
|
+
* uploads says so, with the vault's upload limit, as a site's actions do. A web page link answers
|
|
161
|
+
* only that it is one: the page is served by `openWebpage`, never as data.
|
|
146
162
|
*/
|
|
147
163
|
async open(id) {
|
|
148
164
|
const share = await this.authorize(id);
|
|
165
|
+
if (share.target.kind === 'vault')
|
|
166
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
149
167
|
if (share.target.kind === 'board')
|
|
150
168
|
return this.boards.open(share);
|
|
169
|
+
if (share.target.kind === 'webpage')
|
|
170
|
+
return { kind: 'webpage', scope: 'read', ...(share.expiresAt ? { expiresAt: share.expiresAt } : {}), name: (0, node_path_1.basename)(share.target.path), ...(share.standalone ? { standalone: true } : {}) };
|
|
151
171
|
const uploads = share.target.kind !== 'space' ? await this.uploadsOf(share) : {};
|
|
152
172
|
if (share.target.kind === 'folder')
|
|
153
173
|
return { kind: 'folder', scope: share.scope, ...(share.expiresAt ? { expiresAt: share.expiresAt } : {}), name: (0, node_path_1.basename)(share.target.path), ...uploads };
|
|
@@ -175,6 +195,9 @@ class ShareUseCases {
|
|
|
175
195
|
/** Authorize a live note subscription without projecting or decrypting its content. */
|
|
176
196
|
async events(id, insideInput) {
|
|
177
197
|
const share = await this.authorize(id);
|
|
198
|
+
// A published page has no note to follow, write or dictate into.
|
|
199
|
+
if (share.target.kind === 'webpage')
|
|
200
|
+
throw (0, share_webpage_links_1.webpageNotFound)();
|
|
178
201
|
let path;
|
|
179
202
|
if (share.target.kind === 'note')
|
|
180
203
|
path = share.target.path;
|
|
@@ -226,6 +249,7 @@ class ShareUseCases {
|
|
|
226
249
|
if ((0, safe_notes_1.hasSafeContent)(after))
|
|
227
250
|
throw new errors_1.GraphAgentError('share_collab_unavailable', 'Shared live editing cannot add encrypted text.');
|
|
228
251
|
const note = await this.ports.getEntity(noteId);
|
|
252
|
+
refuseAddedFrontmatter(note, after);
|
|
229
253
|
if (await this.addsFileReference(share, { ...note, body: before }, after, receipts))
|
|
230
254
|
throw new errors_1.GraphAgentError('share_reference_refused', 'This link cannot add attachments or links to files.');
|
|
231
255
|
}
|
|
@@ -430,6 +454,8 @@ class ShareUseCases {
|
|
|
430
454
|
*/
|
|
431
455
|
async resolve(id, references, source) {
|
|
432
456
|
const share = await this.authorize(id);
|
|
457
|
+
if (share.target.kind === 'webpage')
|
|
458
|
+
throw (0, share_webpage_links_1.webpageNotFound)();
|
|
433
459
|
const reach = await this.reachOf(share);
|
|
434
460
|
const sourceId = share.target.kind === 'note' ? share.target.path : share.target.kind === 'folder' ? await this.coveredSource(share.target.path, source) : share.target.kind === 'board' ? (await this.boards.cardNote(share, source)).id : await this.coveredSiteSource(share, source);
|
|
435
461
|
const results = await this.ports.files().resolve(sourceId, references);
|
|
@@ -442,11 +468,59 @@ class ShareUseCases {
|
|
|
442
468
|
/** The file a link may stream, checked against the link as it is now; `file_not_found` for anything else. */
|
|
443
469
|
async authorizeFile(id, path) {
|
|
444
470
|
const share = await this.authorize(id);
|
|
471
|
+
// Before the file is looked at: the Files view's switches decide what the owner sees, never what a link serves (RFX-81).
|
|
472
|
+
if ((0, vault_sdk_1.isHiddenVaultPath)(path))
|
|
473
|
+
throw new errors_1.GraphAgentError('file_not_found', 'No such file.');
|
|
445
474
|
const file = await this.ports.files().stat(path);
|
|
446
475
|
if (!await this.serves(await this.reachOf(share), file.path))
|
|
447
476
|
throw new errors_1.GraphAgentError('file_not_found', 'No such file.');
|
|
448
477
|
return file;
|
|
449
478
|
}
|
|
479
|
+
/**
|
|
480
|
+
* One address of a published web page: the page for the empty address, else the file of its
|
|
481
|
+
* folder at that path below it. A standalone link serves its one built document and no other
|
|
482
|
+
* address. Read only by construction: there is no route that writes through this link.
|
|
483
|
+
*/
|
|
484
|
+
async openWebpage(id, relative) {
|
|
485
|
+
const share = await this.authorize(id);
|
|
486
|
+
if (share.target.kind !== 'webpage')
|
|
487
|
+
throw (0, share_webpage_links_1.webpageNotFound)();
|
|
488
|
+
const path = (0, share_webpage_links_1.webpageFilePath)(share.target, relative);
|
|
489
|
+
if (share.standalone && path !== share.target.path)
|
|
490
|
+
throw (0, share_webpage_links_1.webpageNotFound)();
|
|
491
|
+
let file;
|
|
492
|
+
try {
|
|
493
|
+
file = await this.ports.files().stat(path);
|
|
494
|
+
}
|
|
495
|
+
catch (error) {
|
|
496
|
+
if (error instanceof errors_1.GraphAgentError && ['file_not_found', 'invalid_node_id', 'invalid_vault_path'].includes(error.code))
|
|
497
|
+
throw (0, share_webpage_links_1.webpageNotFound)();
|
|
498
|
+
throw error;
|
|
499
|
+
}
|
|
500
|
+
if (!share.standalone)
|
|
501
|
+
return (0, share_policy_1.isWebpagePath)(path) ? { kind: 'page', file } : { kind: 'file', file };
|
|
502
|
+
if (!this.ports.standalonePage)
|
|
503
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
504
|
+
return { kind: 'page', file, standalone: await this.ports.standalonePage(path) };
|
|
505
|
+
}
|
|
506
|
+
/**
|
|
507
|
+
* A vault link's live state (ENG-430): it opens only while the vault shares at all, it exists, it is a
|
|
508
|
+
* vault link and it has not ended. Switched off, unknown, another kind and gone read the same; ended
|
|
509
|
+
* says so, so the recipient's page can tell expiry from revocation. Read by key, the digest a session
|
|
510
|
+
* carries, so no session holds the link's secret ID.
|
|
511
|
+
*/
|
|
512
|
+
async vaultLink(lookup) {
|
|
513
|
+
const settings = await this.ports.settings();
|
|
514
|
+
if (settings.shares?.enabled !== true)
|
|
515
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
516
|
+
const document = 'id' in lookup ? await this.registry.get(lookup.id) : await this.registry.getByKey(lookup.key);
|
|
517
|
+
const { share, revision } = document;
|
|
518
|
+
if (share.target.kind !== 'vault' || !share.vault)
|
|
519
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
520
|
+
if ((0, share_policy_1.shareState)(share, this.now()) === 'expired')
|
|
521
|
+
throw new errors_1.GraphAgentError('share_expired', 'This share link has expired.');
|
|
522
|
+
return { share: share, revision, key: (0, share_storage_1.shareKey)(share.id), settings };
|
|
523
|
+
}
|
|
450
524
|
/** A link answers only while the vault shares at all, it exists, it has not ended, and its target still does. Switched off, unknown and gone read the same. */
|
|
451
525
|
async authorize(id) {
|
|
452
526
|
(0, share_policy_1.validateShareId)(id);
|
|
@@ -454,6 +528,9 @@ class ShareUseCases {
|
|
|
454
528
|
if (settings.shares?.enabled !== true)
|
|
455
529
|
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
456
530
|
const { share } = await this.registry.get(id);
|
|
531
|
+
// A vault link is never an object link: every object-share route answers it as unknown (ENG-430).
|
|
532
|
+
if (share.target.kind === 'vault')
|
|
533
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
457
534
|
if ((0, share_policy_1.shareState)(share, this.now()) === 'expired')
|
|
458
535
|
throw new errors_1.GraphAgentError('share_expired', 'This share link has expired.');
|
|
459
536
|
if (share.target.kind === 'folder' && !await this.folderExists(share.target.path))
|
|
@@ -464,6 +541,9 @@ class ShareUseCases {
|
|
|
464
541
|
// A board link publishes Boards the same way, and ends with its board.
|
|
465
542
|
if (share.target.kind === 'board' && !await this.boards.works(settings, share.target))
|
|
466
543
|
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
544
|
+
// A web page link ends with its file.
|
|
545
|
+
if (share.target.kind === 'webpage' && !await this.fileExists(share.target.path))
|
|
546
|
+
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
467
547
|
return share;
|
|
468
548
|
}
|
|
469
549
|
/**
|
|
@@ -482,6 +562,7 @@ class ShareUseCases {
|
|
|
482
562
|
if ((0, shared_safe_content_1.safeNoteReadOnly)(current.body, source))
|
|
483
563
|
throw new errors_1.GraphAgentError('share_read_only', 'This link can only read the note.');
|
|
484
564
|
const saved = await (0, shared_safe_content_1.recipientSave)(current.body, body, blockEdits, share.safeBlocks === true, source);
|
|
565
|
+
refuseAddedFrontmatter(current, saved.body);
|
|
485
566
|
if (await this.addsFileReference(share, { ...current, body: saved.plainBefore }, saved.plainAfter, receipts)) {
|
|
486
567
|
throw new errors_1.GraphAgentError('share_reference_refused', 'This link cannot add attachments or links to files. Remove the new one and the note saves again.');
|
|
487
568
|
}
|
|
@@ -522,8 +603,11 @@ class ShareUseCases {
|
|
|
522
603
|
throw new errors_1.GraphAgentError('share_not_found', 'This share link does not exist.');
|
|
523
604
|
return (0, node_crypto_1.createHmac)('sha256', secret).update(`upload\u0000${noteId}\u0000${path}`).digest('hex');
|
|
524
605
|
}
|
|
525
|
-
/** The file rule: inside the coverage, or referenced by a covered note where the link follows references. */
|
|
606
|
+
/** The file rule: inside the coverage, or referenced by a covered note where the link follows references; never a hidden entry. */
|
|
526
607
|
async serves(reach, path) {
|
|
608
|
+
// A dot-entry is in no link's cone: the folder a link shares is the one its listing shows (RFX-81).
|
|
609
|
+
if ((0, vault_sdk_1.isHiddenVaultPath)(path))
|
|
610
|
+
return false;
|
|
527
611
|
if (reach.coversFile(path))
|
|
528
612
|
return true;
|
|
529
613
|
if (!reach.followsReferences)
|
|
@@ -581,6 +665,8 @@ class ShareUseCases {
|
|
|
581
665
|
return new Map((await this.ports.notes()).map((note) => [note.nodeId, note]));
|
|
582
666
|
}
|
|
583
667
|
folderExists(path) { return this.ports.folderExists(path); }
|
|
668
|
+
/** Whether the vault serves a file at this path now: indexed, visible and not a note. */
|
|
669
|
+
fileExists(path) { return this.ports.files().stat(path).then(() => true, () => false); }
|
|
584
670
|
/** The items a space target shares now; undefined when its tree or root item is gone. */
|
|
585
671
|
async rootsOf(target) {
|
|
586
672
|
return this.spaces.roots(target);
|
|
@@ -730,3 +816,13 @@ class ShareUseCases {
|
|
|
730
816
|
}
|
|
731
817
|
exports.ShareUseCases = ShareUseCases;
|
|
732
818
|
function blockOf(block) { return { key: block.header?.key ?? '', source: block.source }; }
|
|
819
|
+
/**
|
|
820
|
+
* An edit link writes the body only. A note with no frontmatter is stored as its body alone, so a
|
|
821
|
+
* body that opens with a block between two `---` lines would be read back as frontmatter: the
|
|
822
|
+
* link's holder would be setting the note's type, title and properties (RFX-75).
|
|
823
|
+
*/
|
|
824
|
+
function refuseAddedFrontmatter(note, body) {
|
|
825
|
+
if (!(0, entity_document_1.isEmptyFrontmatterSource)(note.frontmatterSource ?? '') || !/^---\r?\n[\s\S]*?\r?\n---(?:\r?\n|$)/.test(body))
|
|
826
|
+
return;
|
|
827
|
+
throw new errors_1.GraphAgentError('share_frontmatter_refused', 'This link cannot give a note properties, and a note that starts with a block between two lines of three dashes is read as its properties. Change the first line and it saves again.');
|
|
828
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.webpageNotFound = webpageNotFound;
|
|
4
|
+
exports.webpageFilePath = webpageFilePath;
|
|
5
|
+
exports.requirePublishableWebpage = requirePublishableWebpage;
|
|
6
|
+
// What a web page link serves: the page itself, and the files of its folder by their path below it.
|
|
7
|
+
const errors_1 = require("./errors");
|
|
8
|
+
const share_policy_1 = require("./share-policy");
|
|
9
|
+
/** An address that is not part of the site: the link itself still works. */
|
|
10
|
+
function webpageNotFound() { return new errors_1.GraphAgentError('share_page_not_found', 'This address is not part of the published page.'); }
|
|
11
|
+
/**
|
|
12
|
+
* The vault path an address below a published page names; the empty address is the page. Decided
|
|
13
|
+
* from the link's own target, never from what the request claims: no empty, `.` or `..` segment,
|
|
14
|
+
* nothing `webpageCovers` refuses, and for a page at the vault root, whose folder is the whole
|
|
15
|
+
* vault, nothing but the page.
|
|
16
|
+
*/
|
|
17
|
+
function webpageFilePath(target, relative) {
|
|
18
|
+
if (typeof relative !== 'string' || relative.length > 4_096)
|
|
19
|
+
throw webpageNotFound();
|
|
20
|
+
if (relative === '')
|
|
21
|
+
return target.path;
|
|
22
|
+
if (relative.split('/').some((segment) => segment === '' || segment === '.' || segment === '..' || /[\\\u0000-\u001f\u007f]/.test(segment)))
|
|
23
|
+
throw webpageNotFound();
|
|
24
|
+
const folder = (0, share_policy_1.webpageFolder)(target.path);
|
|
25
|
+
if (!folder)
|
|
26
|
+
throw webpageNotFound();
|
|
27
|
+
const path = `${folder}/${relative}`;
|
|
28
|
+
if (!(0, share_policy_1.webpageCovers)(target.path, path))
|
|
29
|
+
throw webpageNotFound();
|
|
30
|
+
return path;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* A page at the vault root is published standalone or not at all: its folder is the vault, so a
|
|
34
|
+
* link serving that folder would hand out every file in it.
|
|
35
|
+
*/
|
|
36
|
+
function requirePublishableWebpage(target, standalone) {
|
|
37
|
+
if (standalone || (0, share_policy_1.webpageFolder)(target.path))
|
|
38
|
+
return;
|
|
39
|
+
throw new errors_1.GraphAgentError('invalid_share', 'A page at the vault root can only be published standalone: its link would otherwise serve every file in the vault. Turn on Standalone, or move the page into a folder.', { field: 'standalone' });
|
|
40
|
+
}
|
|
@@ -71,8 +71,9 @@ async function sharedDashboardView(dashboard, ports, settings, entities, now, ad
|
|
|
71
71
|
const items = result.items.flatMap((item) => { const found = row(item.note.id, item.values); return found ? [found] : []; });
|
|
72
72
|
view.lists = [{ title: '', notes: items }];
|
|
73
73
|
}
|
|
74
|
+
// A web address only: the share page frames it, and a definition that did not pass the owner's form may name anything (RFX-68).
|
|
74
75
|
}
|
|
75
|
-
else if (widget.type === 'web-page' && 'url' in config && typeof config.url === 'string')
|
|
76
|
+
else if (widget.type === 'web-page' && 'url' in config && typeof config.url === 'string' && /^https?:\/\//i.test(config.url))
|
|
76
77
|
view.url = config.url;
|
|
77
78
|
return view;
|
|
78
79
|
}));
|
|
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.resolveSpotlightSettings = resolveSpotlightSettings;
|
|
4
4
|
exports.resolveEmbeddingsSettings = resolveEmbeddingsSettings;
|
|
5
5
|
exports.validateSpotlightSettings = validateSpotlightSettings;
|
|
6
|
-
// Spotlight: what the search leaves out, and the vault's
|
|
6
|
+
// Spotlight: what the search leaves out, and whether the vault's notes are embedded.
|
|
7
7
|
const errors_1 = require("./errors");
|
|
8
8
|
function resolveSpotlightSettings(settings) {
|
|
9
9
|
return settings.spotlight ? structuredClone(settings.spotlight) : {};
|
|
@@ -23,20 +23,7 @@ function validateSpotlightSettings(value) {
|
|
|
23
23
|
throw new errors_1.GraphAgentError('invalid_embeddings_settings', 'embeddings must be an object.');
|
|
24
24
|
if (typeof raw.embeddings.enabled !== 'boolean')
|
|
25
25
|
throw new errors_1.GraphAgentError('invalid_embeddings_settings', 'Embeddings enabled must be true or false.', { field: 'enabled' });
|
|
26
|
-
|
|
27
|
-
if (typeof raw.embeddings.connectionId === 'string')
|
|
28
|
-
emb.connectionId = raw.embeddings.connectionId;
|
|
29
|
-
if (typeof raw.embeddings.providerId === 'string')
|
|
30
|
-
emb.providerId = raw.embeddings.providerId;
|
|
31
|
-
if (typeof raw.embeddings.modelId === 'string')
|
|
32
|
-
emb.modelId = raw.embeddings.modelId;
|
|
33
|
-
if (typeof raw.embeddings.useAgentKey === 'boolean')
|
|
34
|
-
emb.useAgentKey = raw.embeddings.useAgentKey;
|
|
35
|
-
if (typeof raw.embeddings.apiKey === 'string')
|
|
36
|
-
emb.apiKey = raw.embeddings.apiKey;
|
|
37
|
-
if (typeof raw.embeddings.baseUrl === 'string')
|
|
38
|
-
emb.baseUrl = raw.embeddings.baseUrl;
|
|
39
|
-
result.embeddings = emb;
|
|
26
|
+
result.embeddings = { enabled: raw.embeddings.enabled };
|
|
40
27
|
}
|
|
41
28
|
return result;
|
|
42
29
|
}
|