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
|
@@ -91,28 +91,43 @@ class VaultFileUseCases {
|
|
|
91
91
|
});
|
|
92
92
|
}
|
|
93
93
|
/**
|
|
94
|
-
* Stores a file in a folder the vault already has, under the attachment checks
|
|
95
|
-
* refused as hidden
|
|
94
|
+
* Stores a file in a folder the vault already has, under the attachment checks; `/` names the
|
|
95
|
+
* vault root. A hidden folder is refused as hidden and a missing one is not created. `subfolder`,
|
|
96
|
+
* a path below it such as a dropped folder's `Photos/2024`, is created as the file is written and
|
|
97
|
+
* may not be hidden either. A `.md` file becomes a note, as its raw text, under the same limit;
|
|
98
|
+
* any other file is stored as an attachment is. The Files view and Spaces both drop files here,
|
|
99
|
+
* so it is open while either Files or Attachments is on.
|
|
96
100
|
*/
|
|
97
101
|
uploadToFolder(folder, input) {
|
|
98
102
|
return (0, graph_store_errors_1.withAgentErrors)(async () => (await this.store(input, async (_folderPath, strategy) => {
|
|
99
|
-
if (!folder.trim()
|
|
100
|
-
throw new errors_1.GraphAgentError('upload_folder_root', 'Choose a folder to upload into; the vault root
|
|
101
|
-
const
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
if (!folder.trim())
|
|
104
|
+
throw new errors_1.GraphAgentError('upload_folder_root', 'Choose a folder to upload into; `/` names the vault root.', { folder });
|
|
105
|
+
const root = /^\/+$/.test(folder);
|
|
106
|
+
const path = root ? '' : (0, vault_sdk_1.normalizeVaultPath)(folder, () => false);
|
|
107
|
+
if (!root)
|
|
108
|
+
await strategy.listDirectory(path);
|
|
109
|
+
const below = input.subfolder?.replace(/^\/+|\/+$/g, '');
|
|
110
|
+
if (!below)
|
|
111
|
+
return path;
|
|
112
|
+
const nested = (0, vault_sdk_1.normalizeVaultPath)(path ? `${path}/${below}` : below, () => false);
|
|
113
|
+
if (path && !nested.startsWith(`${path}/`))
|
|
114
|
+
throw new errors_1.GraphAgentError('invalid_path', 'A subfolder must stay inside the folder it is uploaded to.', { subfolder: input.subfolder });
|
|
115
|
+
return nested;
|
|
116
|
+
}, (settings) => (0, files_settings_1.resolveFilesSettings)(settings).enabled, true)).file);
|
|
105
117
|
}
|
|
106
118
|
/**
|
|
107
|
-
* What every upload shares: the Attachments switch
|
|
108
|
-
* bytes stream, and the write, into the folder
|
|
119
|
+
* What every upload shares: the Attachments switch (or the caller's own, when `alsoOpen` allows
|
|
120
|
+
* it), the name, the size limit before and while the bytes stream, and the write, into the folder
|
|
121
|
+
* `directory` names once the settings are read.
|
|
109
122
|
*/
|
|
110
|
-
async store(input, directory) {
|
|
111
|
-
const
|
|
112
|
-
|
|
123
|
+
async store(input, directory, alsoOpen, notes = false) {
|
|
124
|
+
const raw = await this.ports.settings();
|
|
125
|
+
const settings = (0, attachment_settings_1.resolveAttachmentSettings)(raw);
|
|
126
|
+
if (!settings.enabled && !alsoOpen?.(raw))
|
|
113
127
|
throw new errors_1.GraphAgentError('attachments_disabled', 'Attachments are disabled for this vault.');
|
|
114
128
|
const name = attachmentFileName(input.name);
|
|
115
|
-
|
|
129
|
+
const note = name.toLocaleLowerCase().endsWith('.md');
|
|
130
|
+
if (note && !notes)
|
|
116
131
|
throw new errors_1.GraphAgentError('attachment_markdown_refused', 'Markdown files are notes; create a note instead of attaching one.', { name });
|
|
117
132
|
const vaultLimit = settings.maxUploadBytes === 'unlimited' ? undefined : settings.maxUploadBytes;
|
|
118
133
|
const own = input.maxBytes !== undefined && (vaultLimit === undefined || input.maxBytes < vaultLimit);
|
|
@@ -120,6 +135,8 @@ class VaultFileUseCases {
|
|
|
120
135
|
if (limit !== undefined && input.length !== undefined && input.length > limit)
|
|
121
136
|
throw tooLarge(limit, own);
|
|
122
137
|
const strategy = await this.ports.strategy();
|
|
138
|
+
if (note)
|
|
139
|
+
return { strategy, file: await this.storeNote(strategy, await directory(settings.folderPath, strategy), name, input.source, limit, own) };
|
|
123
140
|
const stored = await strategy.writeFile({ directory: await directory(settings.folderPath, strategy), name, source: input.source, maxBytes: limit }).catch((error) => {
|
|
124
141
|
if ((0, graph_store_errors_1.isVaultSdkError)(error) && error.code === 'file_too_large' && limit !== undefined)
|
|
125
142
|
throw tooLarge(limit, own);
|
|
@@ -127,6 +144,48 @@ class VaultFileUseCases {
|
|
|
127
144
|
});
|
|
128
145
|
return { strategy, file: describe(stored) };
|
|
129
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Writes an uploaded `.md` as a note holding its text as it is, frontmatter included, in `folder`,
|
|
149
|
+
* created on the way; a taken name is numbered as a file's is (`plan 1.md`). Text that is not
|
|
150
|
+
* UTF-8 is refused, and so is a note `checkNoteText` refuses.
|
|
151
|
+
*/
|
|
152
|
+
async storeNote(strategy, folder, name, source, limit, own) {
|
|
153
|
+
if (name.startsWith('.'))
|
|
154
|
+
throw new errors_1.GraphAgentError('invalid_file_name', `'${name}' is a hidden file, which the vault does not keep.`, { name });
|
|
155
|
+
const chunks = [];
|
|
156
|
+
let size = 0;
|
|
157
|
+
for await (const chunk of source) {
|
|
158
|
+
size += chunk.byteLength;
|
|
159
|
+
if (limit !== undefined && size > limit)
|
|
160
|
+
throw tooLarge(limit, own);
|
|
161
|
+
chunks.push(chunk);
|
|
162
|
+
}
|
|
163
|
+
let markdown;
|
|
164
|
+
try {
|
|
165
|
+
markdown = new TextDecoder('utf-8', { fatal: true }).decode(Buffer.concat(chunks));
|
|
166
|
+
}
|
|
167
|
+
catch {
|
|
168
|
+
throw new errors_1.GraphAgentError('note_not_text', `'${name}' is not UTF-8 text, so it cannot be a note.`, { name });
|
|
169
|
+
}
|
|
170
|
+
await this.ports.checkNoteText?.(markdown);
|
|
171
|
+
if (folder && strategy.ensureFolder)
|
|
172
|
+
await strategy.ensureFolder({ path: folder });
|
|
173
|
+
const stem = name.slice(0, -3);
|
|
174
|
+
for (let index = 0; index < 1000; index += 1) {
|
|
175
|
+
const candidate = index ? `${stem} ${index}.md` : name;
|
|
176
|
+
const nodeId = folder ? `${folder}/${candidate}` : candidate;
|
|
177
|
+
try {
|
|
178
|
+
await strategy.createNote({ nodeId: (0, vault_sdk_1.normalizeNodeId)(nodeId), markdown });
|
|
179
|
+
return { path: nodeId, name: candidate, size, modifiedAt: new Date().toISOString(), mimeType: 'text/markdown' };
|
|
180
|
+
}
|
|
181
|
+
catch (error) {
|
|
182
|
+
if ((0, graph_store_errors_1.isVaultSdkError)(error) && (error.code === 'note_exists' || error.code === 'note_path_exists'))
|
|
183
|
+
continue;
|
|
184
|
+
throw error;
|
|
185
|
+
}
|
|
186
|
+
}
|
|
187
|
+
throw new errors_1.GraphAgentError('note_exists', `Every name like '${name}' is taken in this folder.`, { name });
|
|
188
|
+
}
|
|
130
189
|
/** The name and folder the zip of `paths` would have, checked against the vault as it is now. */
|
|
131
190
|
planArchive(paths) {
|
|
132
191
|
return (0, graph_store_errors_1.withAgentErrors)(async () => {
|
|
@@ -12,7 +12,12 @@ const daily_notes_settings_1 = require("./daily-notes-settings");
|
|
|
12
12
|
const dashboard_settings_1 = require("./dashboard-settings");
|
|
13
13
|
const discovery_settings_1 = require("./discovery-settings");
|
|
14
14
|
const errors_1 = require("./errors");
|
|
15
|
+
const boards_1 = require("./boards");
|
|
15
16
|
const feature_switch_1 = require("./feature-switch");
|
|
17
|
+
const ide_1 = require("./ide");
|
|
18
|
+
const note_editor_1 = require("./note-editor");
|
|
19
|
+
const rss_1 = require("./rss");
|
|
20
|
+
const settings_reset_1 = require("./settings-reset");
|
|
16
21
|
const files_settings_1 = require("./files-settings");
|
|
17
22
|
const matrix_settings_1 = require("./matrix-settings");
|
|
18
23
|
const navigation_settings_1 = require("./navigation-settings");
|
|
@@ -28,13 +33,19 @@ const transcription_settings_1 = require("./transcription-settings");
|
|
|
28
33
|
const versioning_settings_1 = require("./versioning-settings");
|
|
29
34
|
/** Applies `operation` to `settings` in place and returns it: a pure step, so a mutation can be checked without a file. */
|
|
30
35
|
function applyVaultSettingsOperation(settings, operation) {
|
|
31
|
-
if (!operation || typeof operation !== 'object' || !['replace_note_keys', 'replace_daily_notes', 'set_daily_notes_enabled', 'set_versioning_enabled', 'replace_spotlight_config', 'set_embeddings_enabled', '
|
|
36
|
+
if (!operation || typeof operation !== 'object' || !['replace_note_keys', 'replace_daily_notes', 'set_daily_notes_enabled', 'set_versioning_enabled', 'replace_spotlight_config', 'set_embeddings_enabled', 'set_matrices_enabled', 'set_dashboards_enabled', 'set_spaces_enabled', 'set_discovery_enabled', 'set_shares_enabled', 'set_share_default_access', 'set_share_save_limit', 'set_safe_notes_enabled', 'replace_safe_notes', 'replace_safe_folders', 'relink_safe_journal_folder', 'set_boards_enabled', 'set_calendars_enabled', 'set_notes_enabled', 'set_notes_home', 'set_files_enabled', 'replace_files', 'set_types_enabled', 'set_graph_enabled', 'set_chat_enabled', 'set_rss_enabled', 'set_ide_enabled', 'set_notes_preview_update', 'set_boards_remove_card', 'set_rss_open_inbox', 'replace_ide_formatting', 'replace_note_editor', 'set_workspace_tab_style', 'reset_settings', 'set_mcp_enabled', 'set_attachments_enabled', 'replace_attachments', 'set_recordings_enabled', 'replace_recordings', 'replace_navigation', 'replace_color_slots', 'replace_qr_defaults', 'replace_variables', 'replace_transcription', 'replace_instructions', 'set_agent_editing', 'set_agent_tools', 'add_entity_binding', 'update_entity_binding', 'remove_entity_binding'].includes(operation.op))
|
|
32
37
|
throw new errors_1.GraphAgentError('malformed_settings', 'Unknown vault settings operation.');
|
|
33
|
-
// The key form
|
|
38
|
+
// The key form, the Notes switch and the home note write the same record from different places, so each keeps what the others own.
|
|
34
39
|
if (operation.op === 'replace_note_keys')
|
|
35
|
-
settings.notes = (0, note_key_settings_1.validateNoteKeyOverrides)({ ...(settings.notes.enabled === undefined ? {} : { enabled: settings.notes.enabled }), ...operation.notes });
|
|
40
|
+
settings.notes = (0, note_key_settings_1.validateNoteKeyOverrides)({ ...(settings.notes.enabled === undefined ? {} : { enabled: settings.notes.enabled }), ...(settings.notes.home === undefined ? {} : { home: settings.notes.home }), ...(settings.notes.previewUpdate === undefined ? {} : { previewUpdate: settings.notes.previewUpdate }), ...operation.notes });
|
|
41
|
+
if (operation.op === 'set_notes_preview_update')
|
|
42
|
+
settings.notes = (0, note_key_settings_1.validateNoteKeyOverrides)({ ...settings.notes, previewUpdate: operation.previewUpdate });
|
|
36
43
|
if (operation.op === 'set_notes_enabled')
|
|
37
44
|
settings.notes = (0, note_key_settings_1.validateNoteKeyOverrides)({ ...settings.notes, enabled: operation.enabled });
|
|
45
|
+
if (operation.op === 'set_notes_home') {
|
|
46
|
+
const { home: _previous, ...notes } = settings.notes;
|
|
47
|
+
settings.notes = (0, note_key_settings_1.validateNoteKeyOverrides)({ ...notes, ...(operation.home === null ? {} : { home: operation.home }) });
|
|
48
|
+
}
|
|
38
49
|
// The switch and the form write the same record from different places, so each keeps what the other owns.
|
|
39
50
|
if (operation.op === 'replace_daily_notes')
|
|
40
51
|
settings.dailyNotes = (0, daily_notes_settings_1.validateDailyNotesSettings)({ ...operation.dailyNotes, enabled: settings.dailyNotes.enabled });
|
|
@@ -47,10 +58,6 @@ function applyVaultSettingsOperation(settings, operation) {
|
|
|
47
58
|
if (operation.op === 'set_embeddings_enabled')
|
|
48
59
|
settings.spotlight = (0, spotlight_settings_1.validateSpotlightSettings)({ ...(0, spotlight_settings_1.resolveSpotlightSettings)(settings), embeddings: { ...(0, spotlight_settings_1.resolveEmbeddingsSettings)(settings), enabled: operation.enabled } });
|
|
49
60
|
// The key lives in auth.yaml (the API's EmbeddingKeyStore): a config naming one is written without it.
|
|
50
|
-
if (operation.op === 'replace_embeddings_config') {
|
|
51
|
-
const { apiKey: _secret, ...config } = operation.config;
|
|
52
|
-
settings.spotlight = (0, spotlight_settings_1.validateSpotlightSettings)({ ...(0, spotlight_settings_1.resolveSpotlightSettings)(settings), embeddings: { ...config, enabled: (0, spotlight_settings_1.resolveEmbeddingsSettings)(settings).enabled } });
|
|
53
|
-
}
|
|
54
61
|
if (operation.op === 'set_matrices_enabled')
|
|
55
62
|
settings.matrices = (0, matrix_settings_1.validateMatrixSettings)({ enabled: operation.enabled });
|
|
56
63
|
if (operation.op === 'set_dashboards_enabled')
|
|
@@ -83,23 +90,45 @@ function applyVaultSettingsOperation(settings, operation) {
|
|
|
83
90
|
settings.safeNotes = (0, safe_notes_settings_1.validateSafeNotesSettings)({ ...current, folders: (0, safe_notes_1.withJournalSafeFolder)(current.folders, operation.journalId, operation.folder === undefined ? { unlink: true } : { folder: operation.folder }) });
|
|
84
91
|
}
|
|
85
92
|
if (operation.op === 'set_boards_enabled')
|
|
86
|
-
settings.boards = (0,
|
|
93
|
+
settings.boards = (0, boards_1.validateBoardsSettings)({ ...settings.boards, enabled: operation.enabled });
|
|
94
|
+
if (operation.op === 'set_boards_remove_card')
|
|
95
|
+
settings.boards = (0, boards_1.validateBoardsSettings)({ enabled: settings.boards?.enabled ?? false, removeCard: { deleteNote: operation.deleteNote } });
|
|
87
96
|
if (operation.op === 'set_calendars_enabled')
|
|
88
97
|
settings.calendars = (0, feature_switch_1.validateFeatureSwitch)({ enabled: operation.enabled }, 'calendars');
|
|
89
98
|
if (operation.op === 'set_files_enabled')
|
|
90
99
|
settings.files = (0, files_settings_1.validateFilesSettings)({ ...settings.files, enabled: operation.enabled });
|
|
91
100
|
if (operation.op === 'replace_files')
|
|
92
101
|
settings.files = (0, files_settings_1.validateFilesSettings)({ ...operation.files, enabled: (0, files_settings_1.resolveFilesSettings)(settings).enabled });
|
|
93
|
-
if (operation.op === '
|
|
94
|
-
settings.
|
|
102
|
+
if (operation.op === 'set_types_enabled')
|
|
103
|
+
settings.types = (0, feature_switch_1.validateFeatureSwitch)({ enabled: operation.enabled }, 'types');
|
|
95
104
|
if (operation.op === 'set_graph_enabled')
|
|
96
105
|
settings.graph = (0, feature_switch_1.validateFeatureSwitch)({ enabled: operation.enabled }, 'graph');
|
|
97
106
|
if (operation.op === 'set_chat_enabled')
|
|
98
107
|
settings.chat = (0, feature_switch_1.validateFeatureSwitch)({ enabled: operation.enabled }, 'chat');
|
|
99
108
|
if (operation.op === 'set_rss_enabled')
|
|
100
|
-
settings.rss = (0,
|
|
109
|
+
settings.rss = (0, rss_1.validateRssSettings)({ ...settings.rss, enabled: operation.enabled });
|
|
110
|
+
if (operation.op === 'reset_settings')
|
|
111
|
+
(0, settings_reset_1.resetVaultSettings)(settings, (0, settings_reset_1.validateResetParts)(operation.parts));
|
|
112
|
+
if (operation.op === 'replace_note_editor') {
|
|
113
|
+
const noteEditor = (0, note_editor_1.validateNoteEditorSettings)(operation.noteEditor ?? {});
|
|
114
|
+
if (noteEditor)
|
|
115
|
+
settings.noteEditor = noteEditor;
|
|
116
|
+
else
|
|
117
|
+
delete settings.noteEditor;
|
|
118
|
+
}
|
|
119
|
+
if (operation.op === 'set_workspace_tab_style') {
|
|
120
|
+
const workspace = (0, note_editor_1.validateWorkspaceSettings)({ tabStyle: operation.tabStyle });
|
|
121
|
+
if (workspace)
|
|
122
|
+
settings.workspace = workspace;
|
|
123
|
+
else
|
|
124
|
+
delete settings.workspace;
|
|
125
|
+
}
|
|
126
|
+
if (operation.op === 'set_rss_open_inbox')
|
|
127
|
+
settings.rss = (0, rss_1.validateRssSettings)({ enabled: settings.rss?.enabled ?? false, openInbox: operation.openInbox });
|
|
101
128
|
if (operation.op === 'set_ide_enabled')
|
|
102
|
-
settings.ide = (0,
|
|
129
|
+
settings.ide = (0, ide_1.validateIdeSettings)({ ...settings.ide, enabled: operation.enabled });
|
|
130
|
+
if (operation.op === 'replace_ide_formatting')
|
|
131
|
+
settings.ide = (0, ide_1.validateIdeSettings)({ enabled: settings.ide?.enabled ?? false, formatting: operation.formatting });
|
|
103
132
|
if (operation.op === 'set_mcp_enabled')
|
|
104
133
|
settings.mcp = (0, feature_switch_1.validateFeatureSwitch)({ enabled: operation.enabled }, 'mcp');
|
|
105
134
|
if (operation.op === 'set_attachments_enabled')
|
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.VaultSettingsRegistry = exports.defaultVaultSettings = exports.featureDefaultsVersion = void 0;
|
|
4
4
|
exports.isFeatureEnabled = isFeatureEnabled;
|
|
5
5
|
exports.migrateFeatureDefaults = migrateFeatureDefaults;
|
|
6
|
+
exports.migrateTypesSwitch = migrateTypesSwitch;
|
|
6
7
|
exports.validateVaultSettings = validateVaultSettings;
|
|
7
8
|
const node_crypto_1 = require("node:crypto");
|
|
8
9
|
const promises_1 = require("node:fs/promises");
|
|
@@ -19,6 +20,10 @@ const discovery_settings_1 = require("./discovery-settings");
|
|
|
19
20
|
const errors_1 = require("./errors");
|
|
20
21
|
const feature_switch_1 = require("./feature-switch");
|
|
21
22
|
const files_settings_1 = require("./files-settings");
|
|
23
|
+
const boards_1 = require("./boards");
|
|
24
|
+
const ide_1 = require("./ide");
|
|
25
|
+
const note_editor_1 = require("./note-editor");
|
|
26
|
+
const rss_1 = require("./rss");
|
|
22
27
|
const journal_settings_1 = require("./journal-settings");
|
|
23
28
|
const matrix_settings_1 = require("./matrix-settings");
|
|
24
29
|
const navigation_settings_1 = require("./navigation-settings");
|
|
@@ -39,35 +44,48 @@ const versioning_settings_1 = require("./versioning-settings");
|
|
|
39
44
|
* The version of the rule that an absent switch reads as off. A `vault.yaml` without it predates the
|
|
40
45
|
* rule, when Chat, Boards, Calendars, Notes, Files, Topology, Graph, Daily Notes and Versioning were on
|
|
41
46
|
* unless turned off; one marked 2 predates Attachments joining it, when Attachments was on unless
|
|
42
|
-
* turned off
|
|
47
|
+
* turned off; one marked 3 predates the Notes view (ENG-424), when `notes` switched the type browser
|
|
48
|
+
* now called Types and `topology` its visual designer. Each is migrated once by writing down the
|
|
49
|
+
* switches it was showing.
|
|
43
50
|
*/
|
|
44
|
-
exports.featureDefaultsVersion =
|
|
51
|
+
exports.featureDefaultsVersion = 4;
|
|
45
52
|
/** The marker of a file written before Attachments joined the rule. */
|
|
46
53
|
const attachmentsOnByDefaultVersion = 2;
|
|
54
|
+
/** The marker of a file written before the type browser became Types and Notes became a view of its own. */
|
|
55
|
+
const typesSwitchVersion = 3;
|
|
47
56
|
/**
|
|
48
|
-
* What a vault created through the app starts with:
|
|
49
|
-
*
|
|
57
|
+
* What a vault created through the app starts with: Notes alone switched on, so it opens on its own
|
|
58
|
+
* notes rather than on Settings. The rule for a file is unchanged: a switch it leaves out is off.
|
|
50
59
|
*/
|
|
51
|
-
exports.defaultVaultSettings = { featureDefaults: exports.featureDefaultsVersion, notes: {}, dailyNotes: { ...daily_notes_settings_1.defaultDailyNotesSettings }, navigation: structuredClone(navigation_settings_1.defaultNavigationSettings),
|
|
60
|
+
exports.defaultVaultSettings = { featureDefaults: exports.featureDefaultsVersion, notes: { enabled: true }, dailyNotes: { ...daily_notes_settings_1.defaultDailyNotesSettings }, navigation: structuredClone(navigation_settings_1.defaultNavigationSettings), agent: { variables: {}, entityBindings: [] } };
|
|
52
61
|
/** Whether a switchable feature is on for a vault, off when the vault has no record; the Notes view reads its switch from the shared `notes` record. */
|
|
53
62
|
function isFeatureEnabled(settings, feature) {
|
|
54
63
|
return (feature === 'notes' ? settings.notes.enabled : settings[feature]?.enabled) ?? feature_switch_1.defaultFeatureSwitch.enabled;
|
|
55
64
|
}
|
|
56
65
|
/**
|
|
57
|
-
* A parsed `vault.yaml` written
|
|
58
|
-
*
|
|
59
|
-
*
|
|
60
|
-
*
|
|
61
|
-
*
|
|
62
|
-
*
|
|
63
|
-
*
|
|
66
|
+
* A parsed `vault.yaml` written under an older rule, given the switches it was showing. Without a
|
|
67
|
+
* marker, Chat, Boards, Calendars, Notes, Files, Topology, Graph, Daily Notes and Versioning were on
|
|
68
|
+
* unless a vault turned them off; under marker 2, Attachments still was. Each one the file does not
|
|
69
|
+
* mention is written on. Under marker 3 (and so after either of those), `notes` was the type browser
|
|
70
|
+
* and `topology` its designer: both become `types` (see `migrateTypesSwitch`). The marker records that
|
|
71
|
+
* it has been done. The other switches were already off by default, so nothing is written for them. A
|
|
72
|
+
* file that carries the current marker, an unknown one, or is not an object, is returned as it came.
|
|
73
|
+
* It works on the parsed YAML rather than validated settings because validation already reads an
|
|
74
|
+
* absent switch as off, and refuses the menu IDs a version 3 file still names.
|
|
64
75
|
*/
|
|
65
76
|
function migrateFeatureDefaults(parsed) {
|
|
66
|
-
if (!(0, records_1.isRecord)(parsed)
|
|
77
|
+
if (!(0, records_1.isRecord)(parsed))
|
|
67
78
|
return parsed;
|
|
68
|
-
const
|
|
69
|
-
|
|
70
|
-
|
|
79
|
+
const marker = parsed.featureDefaults;
|
|
80
|
+
if (marker !== undefined && marker !== attachmentsOnByDefaultVersion && marker !== typesSwitchVersion)
|
|
81
|
+
return parsed;
|
|
82
|
+
return migrateTypesSwitch(marker === typesSwitchVersion ? parsed : migrateSwitchesShown(parsed));
|
|
83
|
+
}
|
|
84
|
+
/** Markers absent and 2 to 3: the switches the file was showing, written down. */
|
|
85
|
+
function migrateSwitchesShown(parsed) {
|
|
86
|
+
const migrated = { featureDefaults: typesSwitchVersion, ...parsed };
|
|
87
|
+
// A marked file keeps its marker where it was, at the top, with the next version.
|
|
88
|
+
migrated.featureDefaults = typesSwitchVersion;
|
|
71
89
|
if (parsed.attachments === undefined)
|
|
72
90
|
migrated.attachments = { ...attachment_settings_1.defaultAttachmentSettings, enabled: true };
|
|
73
91
|
else if ((0, records_1.isRecord)(parsed.attachments) && parsed.attachments.enabled === undefined)
|
|
@@ -87,6 +105,51 @@ function migrateFeatureDefaults(parsed) {
|
|
|
87
105
|
migrated[feature] = { enabled: true };
|
|
88
106
|
return migrated;
|
|
89
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Marker 3 to 4 (ENG-424): the type browser's `notes` switch becomes `types`, and the designer's
|
|
110
|
+
* `topology` folds into it, on when either was. `notes` now switches the new Notes view, written off,
|
|
111
|
+
* so the vault shows what it showed; its note keys stay. In the menu, `notes` becomes `types` where it
|
|
112
|
+
* stood and `topology` goes; on desktop the new Notes leads the top list, and on the phone it keeps
|
|
113
|
+
* the old item's slot, with Types first under More (or right after it when it was there).
|
|
114
|
+
*/
|
|
115
|
+
function migrateTypesSwitch(parsed) {
|
|
116
|
+
const { topology, ...rest } = parsed;
|
|
117
|
+
const migrated = { featureDefaults: exports.featureDefaultsVersion, ...rest };
|
|
118
|
+
// The marker stays where it was, at the top, with the current version.
|
|
119
|
+
migrated.featureDefaults = exports.featureDefaultsVersion;
|
|
120
|
+
const notes = parsed.notes;
|
|
121
|
+
const wasOn = (record) => (0, records_1.isRecord)(record) && record.enabled === true;
|
|
122
|
+
// Written only when on: under the rule a switch left out is off.
|
|
123
|
+
if (parsed.types === undefined && (wasOn(notes) || wasOn(topology)))
|
|
124
|
+
migrated.types = { enabled: true };
|
|
125
|
+
// A switch that is not true or false is left as it came, for validation to report.
|
|
126
|
+
if (notes === undefined || ((0, records_1.isRecord)(notes) && (notes.enabled === undefined || typeof notes.enabled === 'boolean'))) {
|
|
127
|
+
const { enabled: _browser, ...keys } = (0, records_1.isRecord)(notes) ? notes : {};
|
|
128
|
+
migrated.notes = { ...keys, enabled: false };
|
|
129
|
+
}
|
|
130
|
+
if ((0, records_1.isRecord)(parsed.navigation))
|
|
131
|
+
migrated.navigation = migrateTypesNavigation(parsed.navigation);
|
|
132
|
+
return migrated;
|
|
133
|
+
}
|
|
134
|
+
function migrateTypesNavigation(navigation) {
|
|
135
|
+
const rename = (list) => Array.isArray(list) ? list.filter((item) => item !== 'topology').map((item) => item === 'notes' ? 'types' : item) : list;
|
|
136
|
+
const migrated = { ...navigation };
|
|
137
|
+
if ((0, records_1.isRecord)(navigation.desktop)) {
|
|
138
|
+
const top = rename(navigation.desktop.top);
|
|
139
|
+
migrated.desktop = { ...navigation.desktop, top: Array.isArray(top) ? ['notes', ...top] : top, bottom: rename(navigation.desktop.bottom) };
|
|
140
|
+
}
|
|
141
|
+
if ((0, records_1.isRecord)(navigation.mobile)) {
|
|
142
|
+
const strip = (list) => Array.isArray(list) ? list.filter((item) => item !== 'topology') : list;
|
|
143
|
+
const primary = strip(navigation.mobile.primary);
|
|
144
|
+
const more = strip(navigation.mobile.more);
|
|
145
|
+
if (Array.isArray(more) && !more.includes('types')) {
|
|
146
|
+
const at = more.indexOf('notes');
|
|
147
|
+
more.splice(at + 1, 0, 'types');
|
|
148
|
+
}
|
|
149
|
+
migrated.mobile = { ...navigation.mobile, primary, more };
|
|
150
|
+
}
|
|
151
|
+
return migrated;
|
|
152
|
+
}
|
|
90
153
|
class VaultSettingsRegistry {
|
|
91
154
|
vault;
|
|
92
155
|
changes;
|
|
@@ -145,9 +208,33 @@ class VaultSettingsRegistry {
|
|
|
145
208
|
const settings = await this.read();
|
|
146
209
|
return settings.agent.entityBindings.filter((item) => item.entityId === entityId).map((item) => ({ provider: 'vault-settings', kind: 'semantic-entity-binding', label: item.meaning }));
|
|
147
210
|
}
|
|
148
|
-
/** Every note ID this document points at, for the cleanup that follows a note vanishing from disk. */
|
|
149
|
-
async referencedNoteIds() {
|
|
211
|
+
/** Every note ID this document points at (semantic bindings and the Notes view's home note), for the cleanup that follows a note vanishing from disk. */
|
|
212
|
+
async referencedNoteIds() { const settings = await this.read(); return new Set([...settings.agent.entityBindings.map((item) => item.entityId), ...(settings.notes.home ? [settings.notes.home] : [])]); }
|
|
150
213
|
removeEntityBinding(entityId) { return this.update({ op: 'remove_entity_binding', entityId }); }
|
|
214
|
+
/** The home note follows a move or rename of itself or a folder holding it; whether it did. */
|
|
215
|
+
relocateNotesHome(from, to) {
|
|
216
|
+
return this.lock.run(async () => {
|
|
217
|
+
const settings = await this.readUnlocked();
|
|
218
|
+
const home = (0, note_key_settings_1.relocatedNotesHome)(settings.notes.home, from, to);
|
|
219
|
+
if (home === undefined)
|
|
220
|
+
return false;
|
|
221
|
+
settings.notes = { ...settings.notes, home };
|
|
222
|
+
await this.writeUnlocked(validateVaultSettings(settings));
|
|
223
|
+
return true;
|
|
224
|
+
});
|
|
225
|
+
}
|
|
226
|
+
/** The home note is cleared when it, or a folder holding it, is deleted; whether it was. */
|
|
227
|
+
removeNotesHome(path) {
|
|
228
|
+
return this.lock.run(async () => {
|
|
229
|
+
const settings = await this.readUnlocked();
|
|
230
|
+
if (!(0, note_key_settings_1.deletesNotesHome)(settings.notes.home, path))
|
|
231
|
+
return false;
|
|
232
|
+
const { home: _deleted, ...notes } = settings.notes;
|
|
233
|
+
settings.notes = notes;
|
|
234
|
+
await this.writeUnlocked(validateVaultSettings(settings));
|
|
235
|
+
return true;
|
|
236
|
+
});
|
|
237
|
+
}
|
|
151
238
|
renameEntityBinding(fromId, toId) {
|
|
152
239
|
return this.lock.run(async () => {
|
|
153
240
|
const settings = await this.readUnlocked();
|
|
@@ -256,11 +343,15 @@ function validateVaultSettings(value) {
|
|
|
256
343
|
if (featureDefaults !== undefined && featureDefaults !== exports.featureDefaultsVersion)
|
|
257
344
|
throw new errors_1.GraphAgentError('malformed_settings', `featureDefaults must be ${exports.featureDefaultsVersion} when present.`);
|
|
258
345
|
// Files keeps its place among the switches, so a file written again keeps its order; its record carries more than the switch.
|
|
259
|
-
|
|
346
|
+
// Files, Kanban, RSS and the IDE carry more than the switch (ENG-433).
|
|
347
|
+
const records = { files: files_settings_1.validateFilesSettings, boards: boards_1.validateBoardsSettings, rss: rss_1.validateRssSettings, ide: ide_1.validateIdeSettings };
|
|
348
|
+
const switches = Object.fromEntries(['chat', 'boards', 'calendars', 'files', 'types', 'graph', 'rss', 'ide', 'mcp'].flatMap((feature) => { const raw = value[feature]; return raw === undefined ? [] : [[feature, (records[feature] ?? ((input) => (0, feature_switch_1.validateFeatureSwitch)(input, feature)))(raw)]]; }));
|
|
260
349
|
const rawSpotlight = value.spotlight;
|
|
261
350
|
const spotlight = rawSpotlight === undefined ? undefined : (0, spotlight_settings_1.validateSpotlightSettings)(rawSpotlight);
|
|
351
|
+
const noteEditor = (0, note_editor_1.validateNoteEditorSettings)(value.noteEditor);
|
|
352
|
+
const workspace = (0, note_editor_1.validateWorkspaceSettings)(value.workspace);
|
|
262
353
|
const rawTranscription = value.transcription;
|
|
263
354
|
const transcription = rawTranscription === undefined ? undefined : (0, transcription_settings_1.validateTranscriptionGuidance)(rawTranscription);
|
|
264
|
-
return { ...(transcription ? { transcription } : {}), ...(featureDefaults === undefined ? {} : { featureDefaults }), notes, dailyNotes, navigation, ...(journal ? { journal } : {}), ...(versioning ? { versioning } : {}), ...(matrices ? { matrices } : {}), ...(dashboards ? { dashboards } : {}), ...(spaces ? { spaces } : {}), ...(discovery ? { discovery } : {}), ...(shares ? { shares } : {}), ...(safeNotes ? { safeNotes } : {}), ...switches, ...(attachments ? { attachments } : {}), ...(recordings ? { recordings } : {}), ...(colorSlots ? { colorSlots } : {}), ...(qrCode ? { qrCode } : {}), ...(spotlight ? { spotlight } : {}), agent: { variables: (0, agent_context_1.validateAgentVariables)(agent.variables), ...(instructions ? { instructions } : {}), entityBindings, ...(editing ? { editing } : {}), ...(tools ? { tools } : {}) } };
|
|
355
|
+
return { ...(transcription ? { transcription } : {}), ...(featureDefaults === undefined ? {} : { featureDefaults }), notes, dailyNotes, navigation, ...(journal ? { journal } : {}), ...(versioning ? { versioning } : {}), ...(matrices ? { matrices } : {}), ...(dashboards ? { dashboards } : {}), ...(spaces ? { spaces } : {}), ...(discovery ? { discovery } : {}), ...(shares ? { shares } : {}), ...(safeNotes ? { safeNotes } : {}), ...switches, ...(attachments ? { attachments } : {}), ...(recordings ? { recordings } : {}), ...(colorSlots ? { colorSlots } : {}), ...(qrCode ? { qrCode } : {}), ...(spotlight ? { spotlight } : {}), ...(noteEditor ? { noteEditor } : {}), ...(workspace ? { workspace } : {}), agent: { variables: (0, agent_context_1.validateAgentVariables)(agent.variables), ...(instructions ? { instructions } : {}), entityBindings, ...(editing ? { editing } : {}), ...(tools ? { tools } : {}) } };
|
|
265
356
|
}
|
|
266
357
|
function isNodeError(error) { return error instanceof Error && 'code' in error; }
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// The files a stylesheet names: `url(…)` anywhere (backgrounds, `@font-face` sources) and `@import`.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.cssReferences = cssReferences;
|
|
5
|
+
exports.replaceCssReferences = replaceCssReferences;
|
|
6
|
+
// In order: a comment (skipped), `@import "…"`, `url(…)` quoted or bare, and any other string (skipped, so a `url(` inside one is not read).
|
|
7
|
+
const token = /\/\*[\s\S]*?\*\/|(@import\s+)(["'])((?:\\[\s\S]|(?!\2)[^\\\n])*)\2|url\(\s*(?:(["'])((?:\\[\s\S]|(?!\4)[^\\\n])*)\4|((?:\\[\s\S]|[^"'()\\\s])+))\s*\)|(["'])(?:\\[\s\S]|(?!\7)[^\\\n])*\7/gi;
|
|
8
|
+
function unescapeCss(value) {
|
|
9
|
+
return value.replace(/\\(?:([0-9a-f]{1,6})\s?|([\s\S]))/gi, (_whole, hex, literal) => {
|
|
10
|
+
if (hex === undefined)
|
|
11
|
+
return literal === '\n' ? '' : literal ?? '';
|
|
12
|
+
const code = Number.parseInt(hex, 16);
|
|
13
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : '�';
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
/** Every address a stylesheet names, in source order. `@import url(…)` is read as its `url(…)`. */
|
|
17
|
+
function cssReferences(css) {
|
|
18
|
+
const found = [];
|
|
19
|
+
for (const match of css.matchAll(token)) {
|
|
20
|
+
const start = match.index;
|
|
21
|
+
if (match[1] !== undefined)
|
|
22
|
+
found.push({ start, end: start + match[0].length, reference: unescapeCss(match[3]), form: 'import' });
|
|
23
|
+
else if (match[5] !== undefined || match[6] !== undefined)
|
|
24
|
+
found.push({ start, end: start + match[0].length, reference: unescapeCss(match[5] ?? match[6]), form: 'url' });
|
|
25
|
+
}
|
|
26
|
+
return found;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* The stylesheet with each reference `addressOf` answers for written as that address; one it leaves
|
|
30
|
+
* undefined keeps its source text. An address must hold no `"`, `\` or line break, as a `data:`
|
|
31
|
+
* address from `data-uri.ts` never does.
|
|
32
|
+
*/
|
|
33
|
+
function replaceCssReferences(css, references, addressOf) {
|
|
34
|
+
let out = '';
|
|
35
|
+
let at = 0;
|
|
36
|
+
for (const reference of references) {
|
|
37
|
+
const address = addressOf(reference);
|
|
38
|
+
if (address === undefined)
|
|
39
|
+
continue;
|
|
40
|
+
out += `${css.slice(at, reference.start)}${reference.form === 'import' ? '@import ' : ''}url("${address}")`;
|
|
41
|
+
at = reference.end;
|
|
42
|
+
}
|
|
43
|
+
return out + css.slice(at);
|
|
44
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// A file as a `data:` address a page can load in place of the file.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.bareType = bareType;
|
|
5
|
+
exports.isTextType = isTextType;
|
|
6
|
+
exports.decodeText = decodeText;
|
|
7
|
+
exports.textDataUri = textDataUri;
|
|
8
|
+
exports.bytesDataUri = bytesDataUri;
|
|
9
|
+
const textType = /^(?:text\/.+|application\/(?:javascript|ecmascript|json|xml|xhtml\+xml)|image\/svg\+xml|.+\+(?:xml|json))$/;
|
|
10
|
+
/** A media type without its parameters, lower-cased. */
|
|
11
|
+
function bareType(mimeType) { return mimeType.split(';')[0].trim().toLowerCase(); }
|
|
12
|
+
/** Whether a type is text a `data:` address can carry as it is, rather than as base64. */
|
|
13
|
+
function isTextType(mimeType) { return textType.test(bareType(mimeType)); }
|
|
14
|
+
/** The file's text when it is valid UTF-8, without a byte-order mark; undefined for anything else, which is embedded as bytes. */
|
|
15
|
+
function decodeText(bytes) {
|
|
16
|
+
try {
|
|
17
|
+
return new TextDecoder('utf-8', { fatal: true, ignoreBOM: false }).decode(bytes);
|
|
18
|
+
}
|
|
19
|
+
catch {
|
|
20
|
+
return undefined;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
/** Everything but the printable ASCII that is safe inside a quoted attribute, a CSS `url("…")` and a `srcset` alike. */
|
|
24
|
+
const escaped = /[^!$()*+,\-./0-9:;=?@A-Z[\]^_`a-z{|}~]/gu;
|
|
25
|
+
function percentEncode(character) {
|
|
26
|
+
if (character === "'")
|
|
27
|
+
return '%27';
|
|
28
|
+
// A lone surrogate has no UTF-8 form; it becomes the replacement character, as a browser would show it.
|
|
29
|
+
try {
|
|
30
|
+
return encodeURIComponent(character);
|
|
31
|
+
}
|
|
32
|
+
catch {
|
|
33
|
+
return '%EF%BF%BD';
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* Text as a `data:` address with no base64 around it, so a stylesheet that already holds embedded
|
|
38
|
+
* pictures does not grow by a third again. Whitespace, quotes, `<`, `&`, `#` and `%` are
|
|
39
|
+
* percent-encoded: the address holds no character that ends an attribute, a `url("…")`, a `srcset`
|
|
40
|
+
* candidate or a `<style>` element. A final comma is encoded too, since `srcset` would drop it.
|
|
41
|
+
*/
|
|
42
|
+
function textDataUri(mimeType, text) {
|
|
43
|
+
const body = text.replace(escaped, percentEncode).replace(/,$/, '%2C');
|
|
44
|
+
return `data:${bareType(mimeType)};charset=utf-8,${body}`;
|
|
45
|
+
}
|
|
46
|
+
function bytesDataUri(mimeType, bytes) {
|
|
47
|
+
return `data:${bareType(mimeType)};base64,${Buffer.from(bytes.buffer, bytes.byteOffset, bytes.byteLength).toString('base64')}`;
|
|
48
|
+
}
|
|
@@ -0,0 +1,118 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.decodeAttribute = decodeAttribute;
|
|
4
|
+
exports.encodeAttribute = encodeAttribute;
|
|
5
|
+
exports.scanHtml = scanHtml;
|
|
6
|
+
exports.parseSrcset = parseSrcset;
|
|
7
|
+
exports.formatSrcset = formatSrcset;
|
|
8
|
+
// The files a page names, each with the exact source range to rewrite, so the rest of the page stays byte for byte as written.
|
|
9
|
+
const htmlparser2_1 = require("htmlparser2");
|
|
10
|
+
const addressAttributes = {
|
|
11
|
+
img: ['src'], source: ['src'], video: ['src', 'poster'], audio: ['src'], track: ['src'], embed: ['src'], object: ['data'], input: ['src'],
|
|
12
|
+
script: ['src'], iframe: ['src'], frame: ['src'], image: ['href', 'xlink:href'], body: ['background'], table: ['background'], td: ['background'], th: ['background']
|
|
13
|
+
};
|
|
14
|
+
const srcsetElements = new Set(['img', 'source']);
|
|
15
|
+
const frames = new Set(['iframe', 'frame']);
|
|
16
|
+
/** The `<link>` relations that load a file; `canonical`, `alternate`, `next` and the like only point at one. */
|
|
17
|
+
const embeddedRelations = new Set(['stylesheet', 'icon', 'apple-touch-icon', 'apple-touch-icon-precomposed', 'mask-icon', 'preload', 'modulepreload', 'manifest']);
|
|
18
|
+
const named = { amp: '&', lt: '<', gt: '>', quot: '"', apos: "'" };
|
|
19
|
+
/** An attribute's value with the character references a path or a style can hold resolved. */
|
|
20
|
+
function decodeAttribute(raw) {
|
|
21
|
+
return raw.replace(/&(?:#(\d+)|#x([0-9a-f]+)|(amp|lt|gt|quot|apos));/gi, (whole, decimal, hex, name) => {
|
|
22
|
+
if (name !== undefined)
|
|
23
|
+
return named[name.toLowerCase()] ?? whole;
|
|
24
|
+
const code = decimal !== undefined ? Number.parseInt(decimal, 10) : Number.parseInt(hex ?? '', 16);
|
|
25
|
+
return code > 0 && code <= 0x10ffff ? String.fromCodePoint(code) : whole;
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
/** A value as the source of an attribute quoted the way it was; an unquoted one gains double quotes, since the new value may hold what a bare one cannot. */
|
|
29
|
+
function encodeAttribute(value, quote) {
|
|
30
|
+
const ampersands = value.replace(/&/g, '&');
|
|
31
|
+
if (quote === 'single')
|
|
32
|
+
return ampersands.replace(/'/g, ''');
|
|
33
|
+
const encoded = ampersands.replace(/"/g, '"');
|
|
34
|
+
return quote === 'none' ? `"${encoded}"` : encoded;
|
|
35
|
+
}
|
|
36
|
+
/** Every place a page names a file, in source order, and its `<base>`. Comments, scripts' text and anything a tag does not load are left alone. */
|
|
37
|
+
function scanHtml(html) {
|
|
38
|
+
const references = [];
|
|
39
|
+
let base;
|
|
40
|
+
let element = '';
|
|
41
|
+
let attributes = [];
|
|
42
|
+
let name = '';
|
|
43
|
+
let valueStart = -1;
|
|
44
|
+
let valueEnd = -1;
|
|
45
|
+
let style;
|
|
46
|
+
let inStyle = false;
|
|
47
|
+
const valueOf = (attribute) => decodeAttribute(html.slice(attribute.start, attribute.end));
|
|
48
|
+
const attribute = (wanted) => attributes.find((candidate) => candidate.name === wanted);
|
|
49
|
+
function closeTag(selfClosing) {
|
|
50
|
+
if (element === 'base' && base === undefined) {
|
|
51
|
+
const href = attribute('href');
|
|
52
|
+
if (href)
|
|
53
|
+
base = valueOf(href);
|
|
54
|
+
}
|
|
55
|
+
if (element === 'link') {
|
|
56
|
+
const relation = attribute('rel');
|
|
57
|
+
const href = attribute('href');
|
|
58
|
+
if (relation && href && valueOf(relation).toLowerCase().split(/\s+/).some((word) => embeddedRelations.has(word)))
|
|
59
|
+
references.push({ kind: 'address', ...rangeOf(href), value: valueOf(href), quote: href.quote, element, attribute: 'href', frame: false });
|
|
60
|
+
}
|
|
61
|
+
for (const wanted of addressAttributes[element] ?? []) {
|
|
62
|
+
const found = attribute(wanted);
|
|
63
|
+
if (found)
|
|
64
|
+
references.push({ kind: 'address', ...rangeOf(found), value: valueOf(found), quote: found.quote, element, attribute: wanted, frame: frames.has(element) });
|
|
65
|
+
}
|
|
66
|
+
if (srcsetElements.has(element)) {
|
|
67
|
+
const srcset = attribute('srcset');
|
|
68
|
+
if (srcset)
|
|
69
|
+
references.push({ kind: 'srcset', ...rangeOf(srcset), value: valueOf(srcset), quote: srcset.quote });
|
|
70
|
+
}
|
|
71
|
+
const inline = attribute('style');
|
|
72
|
+
if (inline)
|
|
73
|
+
references.push({ kind: 'inline-style', ...rangeOf(inline), value: valueOf(inline), quote: inline.quote });
|
|
74
|
+
inStyle = element === 'style' && !selfClosing;
|
|
75
|
+
style = undefined;
|
|
76
|
+
attributes = [];
|
|
77
|
+
}
|
|
78
|
+
const tokenizer = new htmlparser2_1.Tokenizer({ xmlMode: false, decodeEntities: false }, {
|
|
79
|
+
onopentagname(start, end) { element = html.slice(start, end).toLowerCase(); attributes = []; },
|
|
80
|
+
onattribname(start, end) { name = html.slice(start, end).toLowerCase(); valueStart = -1; valueEnd = -1; },
|
|
81
|
+
onattribdata(start, end) { if (valueStart < 0)
|
|
82
|
+
valueStart = start; valueEnd = end; },
|
|
83
|
+
onattribentity() { },
|
|
84
|
+
onattribend(quote) {
|
|
85
|
+
// The first of a repeated attribute wins, as it does in a browser; one with no value names nothing.
|
|
86
|
+
if (valueEnd > valueStart && valueStart >= 0 && !attributes.some((candidate) => candidate.name === name))
|
|
87
|
+
attributes.push({ name, start: valueStart, end: valueEnd, quote: quote === htmlparser2_1.QuoteType.Double ? 'double' : quote === htmlparser2_1.QuoteType.Single ? 'single' : 'none' });
|
|
88
|
+
},
|
|
89
|
+
onopentagend() { closeTag(false); },
|
|
90
|
+
onselfclosingtag() { closeTag(true); },
|
|
91
|
+
ontext(start, end) { if (inStyle)
|
|
92
|
+
style = { start: style?.start ?? start, end }; },
|
|
93
|
+
ontextentity() { },
|
|
94
|
+
onclosetag(start, end) {
|
|
95
|
+
if (inStyle && html.slice(start, end).toLowerCase() === 'style') {
|
|
96
|
+
if (style)
|
|
97
|
+
references.push({ kind: 'style-element', ...style, value: html.slice(style.start, style.end) });
|
|
98
|
+
inStyle = false;
|
|
99
|
+
style = undefined;
|
|
100
|
+
}
|
|
101
|
+
},
|
|
102
|
+
oncomment() { }, oncdata() { }, ondeclaration() { }, onprocessinginstruction() { }, onend() { }
|
|
103
|
+
});
|
|
104
|
+
tokenizer.write(html);
|
|
105
|
+
tokenizer.end();
|
|
106
|
+
return { references: references.sort((left, right) => left.start - right.start), ...(base === undefined ? {} : { base }) };
|
|
107
|
+
}
|
|
108
|
+
function rangeOf(attribute) { return { start: attribute.start, end: attribute.end }; }
|
|
109
|
+
/** The candidates of a `srcset`: an address is a run without whitespace that does not end in a comma, then its descriptor up to the next comma. */
|
|
110
|
+
function parseSrcset(value) {
|
|
111
|
+
const candidates = [];
|
|
112
|
+
for (const match of value.matchAll(/\s*([^\s,](?:\S*[^\s,])?)(?:\s+([^,]*))?\s*,?/g))
|
|
113
|
+
candidates.push({ address: match[1], descriptor: (match[2] ?? '').trim() });
|
|
114
|
+
return candidates;
|
|
115
|
+
}
|
|
116
|
+
function formatSrcset(candidates) {
|
|
117
|
+
return candidates.map((candidate) => candidate.descriptor ? `${candidate.address} ${candidate.descriptor}` : candidate.address).join(', ');
|
|
118
|
+
}
|