@myrialabs/clopen 0.4.49 → 0.4.51
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -1
- package/backend/chat/attachments.test.ts +106 -17
- package/backend/chat/attachments.ts +131 -34
- package/backend/chat/background-wait.test.ts +28 -0
- package/backend/chat/engine-handoff.ts +42 -6
- package/backend/chat/message-pages.test.ts +17 -0
- package/backend/chat/message-pages.ts +6 -2
- package/backend/chat/stream-manager.ts +114 -19
- package/backend/containers/actions.ts +22 -0
- package/backend/control/actions/projects.ts +93 -37
- package/backend/control/folders.test.ts +27 -2
- package/backend/control/index.ts +2 -1
- package/backend/database/migrations/056_support_mssql_driver.ts +7 -0
- package/backend/database/migrations/077_create_integration_db_links.ts +7 -0
- package/backend/database/migrations/086_single_owner.ts +66 -73
- package/backend/database/migrations/088_create_messages_fts_map.ts +52 -0
- package/backend/database/migrations/089_add_memory_layout_tiles.ts +58 -0
- package/backend/database/migrations/090_create_storage_tables.ts +83 -0
- package/backend/database/migrations/index.ts +25 -2
- package/backend/database/queries/graph-queries.ts +392 -135
- package/backend/database/queries/integration-queries.ts +10 -0
- package/backend/database/queries/memory-queue-queries.ts +11 -0
- package/backend/database/queries/message-fts.test.ts +120 -0
- package/backend/database/queries/message-queries.ts +45 -9
- package/backend/database/queries/project-queries.ts +6 -0
- package/backend/database/queries/session-queries.ts +6 -2
- package/backend/database/queries/utils-queries.ts +3 -0
- package/backend/database/utils/migration-runner.test.ts +196 -0
- package/backend/database/utils/migration-runner.ts +61 -16
- package/backend/database/utils/seeder-runner.ts +22 -16
- package/backend/engine/adapters/claude/environment.ts +4 -0
- package/backend/engine/adapters/claude/input-gate.test.ts +59 -0
- package/backend/engine/adapters/claude/input-gate.ts +74 -0
- package/backend/engine/adapters/claude/message-converter.test.ts +16 -0
- package/backend/engine/adapters/claude/message-converter.ts +8 -0
- package/backend/engine/adapters/claude/stream.ts +20 -0
- package/backend/engine/adapters/cursor/environment.ts +1 -1
- package/backend/engine/adapters/qwen/session-store.ts +10 -1
- package/backend/engine/types.ts +7 -0
- package/backend/git/identity/cli.ts +35 -0
- package/backend/git/identity/env.test.ts +52 -1
- package/backend/git/identity/env.ts +69 -10
- package/backend/git/identity/index.ts +25 -6
- package/backend/git/identity/resolve.ts +2 -1
- package/backend/git/identity/scope-config.test.ts +7 -4
- package/backend/git/identity/scope-config.ts +13 -7
- package/backend/git-hosts/accounts.ts +106 -0
- package/backend/git-hosts/auth/client-ids.ts +34 -0
- package/backend/git-hosts/auth/connect.ts +110 -0
- package/backend/git-hosts/auth/endpoints.ts +130 -0
- package/backend/git-hosts/auth/flows.ts +355 -0
- package/backend/git-hosts/auth/local.ts +152 -0
- package/backend/git-hosts/ci.ts +18 -0
- package/backend/git-hosts/cli.test.ts +82 -0
- package/backend/git-hosts/cli.ts +342 -0
- package/backend/git-hosts/credentials.ts +173 -0
- package/backend/git-hosts/git-credential.ts +30 -0
- package/backend/git-hosts/health.ts +39 -0
- package/backend/git-hosts/http.ts +174 -0
- package/backend/git-hosts/index.ts +34 -0
- package/backend/git-hosts/providers/bitbucket.ts +186 -0
- package/backend/git-hosts/providers/gitea.ts +208 -0
- package/backend/git-hosts/providers/github.ts +270 -0
- package/backend/git-hosts/providers/gitlab-client.ts +70 -0
- package/backend/git-hosts/providers/gitlab.ts +285 -0
- package/backend/git-hosts/providers/locators.test.ts +68 -0
- package/backend/git-hosts/registry.ts +50 -0
- package/backend/git-hosts/service.ts +432 -0
- package/backend/git-hosts/types.ts +82 -0
- package/backend/git-hosts/urls.test.ts +42 -0
- package/backend/git-hosts/urls.ts +69 -0
- package/backend/index.ts +84 -17
- package/backend/integrations/accounts.ts +50 -3
- package/backend/integrations/registry/define.ts +9 -0
- package/backend/integrations/registry/index.ts +11 -0
- package/backend/integrations/registry/providers/bitbucket.ts +51 -0
- package/backend/integrations/registry/providers/gitea.ts +53 -0
- package/backend/integrations/registry/providers/github.ts +24 -7
- package/backend/integrations/registry/providers/gitlab.ts +57 -0
- package/backend/integrations/registry/types.ts +13 -1
- package/backend/mcp/internal/servers/browser-automation/actions/inspect.ts +115 -31
- package/backend/mcp/internal/servers/browser-automation/description.ts +5 -0
- package/backend/memory/README.md +7 -4
- package/backend/memory/layout.test.ts +377 -0
- package/backend/memory/layout.ts +1029 -265
- package/backend/memory/view.ts +257 -386
- package/backend/mentions/diff.ts +63 -0
- package/backend/mentions/index.ts +109 -0
- package/backend/mentions/mentions.test.ts +27 -0
- package/backend/mentions/shared.ts +82 -0
- package/backend/mentions/sources/ai-changes.ts +140 -0
- package/backend/mentions/sources/chats.ts +122 -0
- package/backend/mentions/sources/database.ts +211 -0
- package/backend/mentions/sources/files.ts +240 -0
- package/backend/mentions/sources/git.ts +308 -0
- package/backend/mentions/sources/notes-memory.ts +121 -0
- package/backend/mentions/sources/ops.ts +125 -0
- package/backend/mentions/sources/preview.ts +153 -0
- package/backend/mentions/sources/projects.ts +114 -0
- package/backend/mentions/sources/system.ts +135 -0
- package/backend/mentions/sources/terminal.ts +50 -0
- package/backend/mentions/types.ts +75 -0
- package/backend/preview/browser/bot-check-frames.test.ts +49 -0
- package/backend/preview/browser/bot-check-frames.ts +66 -0
- package/backend/preview/browser/browser-dialog-handler.ts +6 -5
- package/backend/preview/browser/browser-host-bridge.ts +4 -2
- package/backend/preview/browser/browser-native-ui-handler.ts +21 -0
- package/backend/preview/browser/browser-pool.ts +26 -17
- package/backend/preview/browser/browser-preview-service.ts +164 -2
- package/backend/preview/browser/browser-screenshot.test.ts +113 -0
- package/backend/preview/browser/browser-screenshot.ts +396 -0
- package/backend/preview/browser/browser-tab-manager.ts +35 -186
- package/backend/preview/browser/browser-video-capture.ts +12 -17
- package/backend/preview/browser/element-describe.ts +125 -0
- package/backend/preview/browser/page-binding.ts +141 -0
- package/backend/preview/browser/screenshot-files.test.ts +117 -0
- package/backend/preview/browser/screenshot-files.ts +134 -0
- package/backend/preview/browser/user-agent.test.ts +25 -0
- package/backend/preview/browser/user-agent.ts +100 -0
- package/backend/project/status-manager.ts +4 -2
- package/backend/projects/engine-transcripts.ts +153 -0
- package/backend/projects/folder-guard.ts +55 -0
- package/backend/projects/move.test.ts +208 -0
- package/backend/projects/move.ts +277 -0
- package/backend/projects/project-cleanup.integration.test.ts +3 -1
- package/backend/projects/project-cleanup.ts +10 -0
- package/backend/storage/actions.ts +260 -0
- package/backend/storage/chats.test.ts +57 -0
- package/backend/storage/chats.ts +170 -0
- package/backend/storage/database.ts +105 -0
- package/backend/storage/engine-homes.ts +145 -0
- package/backend/storage/fs-size.ts +111 -0
- package/backend/storage/history.ts +39 -0
- package/backend/storage/policy.ts +156 -0
- package/backend/storage/preview-profiles.ts +169 -0
- package/backend/storage/purge.ts +158 -0
- package/backend/storage/scanner.ts +339 -0
- package/backend/storage/session-index.ts +208 -0
- package/backend/storage/snapshots.ts +99 -0
- package/backend/storage/storage-flow.test.ts +137 -0
- package/backend/storage/transcripts/aliases.ts +75 -0
- package/backend/storage/transcripts/claude-dedupe.test.ts +101 -0
- package/backend/storage/transcripts/claude-dedupe.ts +152 -0
- package/backend/storage/transcripts/claude.ts +155 -0
- package/backend/storage/transcripts/cursor.ts +165 -0
- package/backend/storage/transcripts/file-stores.ts +224 -0
- package/backend/storage/transcripts/index.ts +207 -0
- package/backend/storage/transcripts/opencode.ts +124 -0
- package/backend/storage/transcripts/references.ts +42 -0
- package/backend/storage/transcripts/types.ts +58 -0
- package/backend/storage/worktrees.ts +114 -0
- package/backend/terminal/ptykit.ts +25 -0
- package/backend/update/registry.ts +24 -0
- package/backend/update/release-notes.test.ts +110 -0
- package/backend/update/release-notes.ts +132 -0
- package/backend/update/restart.ts +159 -0
- package/backend/utils/env.test.ts +64 -0
- package/backend/utils/env.ts +23 -55
- package/backend/utils/port-utils.ts +13 -0
- package/backend/work/index.ts +13 -2
- package/backend/work/providers/github/actions-logs.ts +1 -1
- package/backend/work/providers/github/adapter.ts +32 -1
- package/backend/work/providers/github/client.ts +7 -3
- package/backend/work/providers/gitlab/adapter.ts +770 -0
- package/backend/work/providers/gitlab/system-notes.test.ts +24 -0
- package/backend/work/service.ts +60 -36
- package/backend/work/start-work.ts +1 -1
- package/backend/work/types.ts +4 -0
- package/backend/worktrees/index.ts +1 -0
- package/backend/worktrees/service.ts +23 -2
- package/backend/ws/chat/composer.ts +47 -6
- package/backend/ws/chat/stream.ts +19 -10
- package/backend/ws/files/search.ts +1 -1
- package/backend/ws/files/write.ts +27 -0
- package/backend/ws/hosting/index.ts +231 -0
- package/backend/ws/index.ts +12 -2
- package/backend/ws/integrations/crud.ts +31 -5
- package/backend/ws/integrations/hosting-auth.ts +227 -0
- package/backend/ws/integrations/index.ts +2 -0
- package/backend/ws/memory/crud.ts +118 -81
- package/backend/ws/mentions/index.ts +81 -0
- package/backend/ws/messages/crud.ts +3 -1
- package/backend/ws/preview/browser/screenshot.ts +184 -0
- package/backend/ws/preview/index.ts +23 -0
- package/backend/ws/projects/crud.ts +66 -58
- package/backend/ws/sessions/crud.ts +7 -95
- package/backend/ws/snapshot/changes.ts +3 -3
- package/backend/ws/storage/index.ts +102 -0
- package/backend/ws/system/index.ts +7 -0
- package/backend/ws/system/operations.ts +125 -69
- package/backend/ws/work/context.ts +3 -4
- package/backend/ws/work/crud.ts +33 -0
- package/backend/ws/work/schemas.ts +4 -1
- package/bin/clopen.ts +18 -18
- package/dist/assets/{index-DD0-3EWg.js → index-B9rHDvjg.js} +1 -1
- package/dist/assets/index-B9rHDvjg.js.br +0 -0
- package/dist/assets/index-B9rHDvjg.js.gz +0 -0
- package/dist/assets/{index-CrVWZH_D.js → index-DFlwOd7k.js} +1 -1
- package/dist/assets/index-DFlwOd7k.js.br +0 -0
- package/dist/assets/index-DFlwOd7k.js.gz +0 -0
- package/dist/assets/main-Bz_brxxS.css +1 -0
- package/dist/assets/main-Bz_brxxS.css.br +0 -0
- package/dist/assets/main-Bz_brxxS.css.gz +0 -0
- package/dist/assets/main-DRcX9SHx.js +1273 -0
- package/dist/assets/main-DRcX9SHx.js.br +0 -0
- package/dist/assets/main-DRcX9SHx.js.gz +0 -0
- package/dist/assets/pdf-DfwfQPLy.js +57 -0
- package/dist/assets/pdf-DfwfQPLy.js.br +0 -0
- package/dist/assets/pdf-DfwfQPLy.js.gz +0 -0
- package/dist/assets/pdf.worker.min-B5Yc7dP4.mjs +27 -0
- package/dist/assets/pdf.worker.min-B5Yc7dP4.mjs.br +0 -0
- package/dist/assets/pdf.worker.min-B5Yc7dP4.mjs.gz +0 -0
- package/dist/assets/pdf.worker.min-BOrSNwfp.js +1 -0
- package/dist/index.html +2 -2
- package/dist/index.html.br +0 -0
- package/dist/index.html.gz +0 -0
- package/dist/vendor/pdfjs/cmaps/78-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78ms-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/78ms-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/83pv-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90ms-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90ms-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90msp-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90msp-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90pv-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/90pv-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Add-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Add-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Add-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Add-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-0.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-1.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-3.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-4.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-5.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-6.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-CNS1-UCS2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-0.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-1.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-3.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-4.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-5.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-GB1-UCS2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-0.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-1.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-3.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-4.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-5.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-6.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Japan1-UCS2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Korea1-0.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Korea1-1.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Korea1-2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Adobe-Korea1-UCS2.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/B5pc-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/B5pc-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS1-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS1-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS2-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/CNS2-V.bcmap +3 -0
- package/dist/vendor/pdfjs/cmaps/ETHK-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/ETHK-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/ETen-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/ETen-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/ETenms-B5-H.bcmap +3 -0
- package/dist/vendor/pdfjs/cmaps/ETenms-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Ext-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Ext-RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Ext-RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Ext-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GB-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GB-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GB-H.bcmap +6 -0
- package/dist/vendor/pdfjs/cmaps/GB-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBK-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBK-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBK2K-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBK2K-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBKp-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBKp-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBT-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBT-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBT-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBT-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBTpc-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBTpc-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBpc-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/GBpc-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKdla-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKdla-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKdlb-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKdlb-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKgccs-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKgccs-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKm314-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKm314-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKm471-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKm471-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKscs-B5-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/HKscs-B5-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Hankaku.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Hiragana.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-Johab-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-Johab-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCms-UHC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCms-UHC-HW-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCms-UHC-HW-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCms-UHC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCpc-EUC-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/KSCpc-EUC-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Katakana.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/LICENSE +36 -0
- package/dist/vendor/pdfjs/cmaps/NWP-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/NWP-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/RKSJ-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/RKSJ-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/Roman.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UCS2-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UCS2-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF16-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF16-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF8-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniCNS-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UCS2-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UCS2-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF16-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF16-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF8-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniGB-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UCS2-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UCS2-HW-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UCS2-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF16-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF16-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF8-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF16-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF16-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF8-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJIS2004-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISPro-UCS2-HW-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISPro-UCS2-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISPro-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISX0213-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISX0213-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniJISX02132004-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UCS2-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UCS2-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF16-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF16-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF32-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF32-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF8-H.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/UniKS-UTF8-V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/V.bcmap +0 -0
- package/dist/vendor/pdfjs/cmaps/WP-Symbol.bcmap +0 -0
- package/dist/vendor/pdfjs/iccs/CGATS001Compat-v2-micro.icc +0 -0
- package/dist/vendor/pdfjs/iccs/LICENSE +116 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitDingbats.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitFixed.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitFixedBold.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitFixedBoldItalic.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitFixedItalic.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitSerif.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitSerifBold.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitSerifBoldItalic.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitSerifItalic.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/FoxitSymbol.pfb +0 -0
- package/dist/vendor/pdfjs/standard_fonts/LICENSE_FOXIT +27 -0
- package/dist/vendor/pdfjs/standard_fonts/LICENSE_LIBERATION +363 -0
- package/dist/vendor/pdfjs/standard_fonts/LiberationSans-Bold.ttf +0 -0
- package/dist/vendor/pdfjs/standard_fonts/LiberationSans-BoldItalic.ttf +0 -0
- package/dist/vendor/pdfjs/standard_fonts/LiberationSans-Italic.ttf +0 -0
- package/dist/vendor/pdfjs/standard_fonts/LiberationSans-Regular.ttf +0 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_JBIG2 +196 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_OPENJPEG +39 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_PDFJS_JBIG2 +13 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_PDFJS_OPENJPEG +22 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_PDFJS_QCMS +19 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_PDFJS_QUICKJS +21 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_QCMS +21 -0
- package/dist/vendor/pdfjs/wasm/LICENSE_QUICKJS +22 -0
- package/dist/vendor/pdfjs/wasm/jbig2.wasm +0 -0
- package/dist/vendor/pdfjs/wasm/jbig2.wasm.br +0 -0
- package/dist/vendor/pdfjs/wasm/jbig2.wasm.gz +0 -0
- package/dist/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js +2 -0
- package/dist/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js.br +0 -0
- package/dist/vendor/pdfjs/wasm/jbig2_nowasm_fallback.js.gz +0 -0
- package/dist/vendor/pdfjs/wasm/openjpeg.wasm +0 -0
- package/dist/vendor/pdfjs/wasm/openjpeg.wasm.br +0 -0
- package/dist/vendor/pdfjs/wasm/openjpeg.wasm.gz +0 -0
- package/dist/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js +2 -0
- package/dist/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js.br +0 -0
- package/dist/vendor/pdfjs/wasm/openjpeg_nowasm_fallback.js.gz +0 -0
- package/dist/vendor/pdfjs/wasm/qcms_bg.wasm +0 -0
- package/dist/vendor/pdfjs/wasm/qcms_bg.wasm.br +0 -0
- package/dist/vendor/pdfjs/wasm/qcms_bg.wasm.gz +0 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.js +16 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.js.br +0 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.js.gz +0 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.wasm +0 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.wasm.br +0 -0
- package/dist/vendor/pdfjs/wasm/quickjs-eval.wasm.gz +0 -0
- package/package.json +8 -9
- package/scripts/start.ts +21 -4
- package/shared/constants/binary-extensions.ts +20 -4
- package/shared/constants/support.test.ts +27 -0
- package/shared/constants/support.ts +79 -0
- package/shared/constants/tool-icons.ts +7 -1
- package/shared/types/database/schema.ts +6 -0
- package/shared/types/git-hosting.ts +241 -0
- package/shared/types/integrations.ts +51 -1
- package/shared/types/memory.ts +96 -73
- package/shared/types/mentions.ts +96 -0
- package/shared/types/release-notes.ts +31 -0
- package/shared/types/storage.ts +175 -0
- package/shared/types/stores/settings.ts +16 -0
- package/shared/types/unified/index.ts +2 -0
- package/shared/types/unified/message.ts +26 -1
- package/shared/types/unified/stream.ts +22 -1
- package/shared/types/unified/tool.ts +4 -0
- package/shared/types/work.ts +6 -0
- package/shared/utils/attachment-mentions.test.ts +39 -0
- package/shared/utils/attachment-mentions.ts +100 -0
- package/shared/utils/context-document.test.ts +53 -0
- package/shared/utils/context-document.ts +226 -0
- package/shared/utils/device-frame.test.ts +73 -0
- package/shared/utils/device-frame.ts +320 -0
- package/shared/utils/fuzzy.ts +79 -0
- package/shared/utils/launcher-fingerprint.test.ts +73 -0
- package/shared/utils/launcher-fingerprint.ts +108 -0
- package/shared/utils/logger.ts +2 -0
- package/shared/utils/page-colors.test.ts +17 -0
- package/shared/utils/page-colors.ts +24 -0
- package/shared/utils/process-supervisor.test.ts +88 -1
- package/shared/utils/process-supervisor.ts +123 -29
- package/shared/utils/process-tree.ts +99 -0
- package/shared/utils/restart-intent.test.ts +57 -0
- package/shared/utils/restart-intent.ts +80 -0
- package/shared/utils/semver.test.ts +33 -0
- package/shared/utils/semver.ts +35 -0
- package/shared/utils/supervised-child.ts +44 -0
- package/shared/utils/supervisor-protocol.ts +20 -0
- package/.env.example +0 -9
- package/dist/assets/graph-layout.worker-CRFqN7ZQ.js +0 -1
- package/dist/assets/graph-layout.worker-CRFqN7ZQ.js.br +0 -0
- package/dist/assets/graph-layout.worker-CRFqN7ZQ.js.gz +0 -0
- package/dist/assets/index-CrVWZH_D.js.br +0 -0
- package/dist/assets/index-CrVWZH_D.js.gz +0 -0
- package/dist/assets/index-DD0-3EWg.js.br +0 -0
- package/dist/assets/index-DD0-3EWg.js.gz +0 -0
- package/dist/assets/main-D2_TmcwQ.js +0 -1240
- package/dist/assets/main-D2_TmcwQ.js.br +0 -0
- package/dist/assets/main-D2_TmcwQ.js.gz +0 -0
- package/dist/assets/main-Yucigcmf.css +0 -1
- package/dist/assets/main-Yucigcmf.css.br +0 -0
- package/dist/assets/main-Yucigcmf.css.gz +0 -0
|
@@ -0,0 +1,231 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Git hosting routes — what the Git panel asks about the service a repository
|
|
3
|
+
* lives on.
|
|
4
|
+
*
|
|
5
|
+
* hosting:context remotes matched to accounts, in one call (no network)
|
|
6
|
+
* hosting:viewer who an account is, and which scopes it lacks
|
|
7
|
+
* hosting:owners where a repository can be created
|
|
8
|
+
* hosting:repos repositories to pick from, for Add Remote
|
|
9
|
+
* hosting:templates .gitignore and license choices for Publish
|
|
10
|
+
* hosting:publish create the repository, add the remote, push
|
|
11
|
+
* hosting:fork fork the remote's repository and push there
|
|
12
|
+
* hosting:can-push whether a push refusal is a permission problem
|
|
13
|
+
* hosting:commit-statuses CI roll-up per commit, for the history list
|
|
14
|
+
*
|
|
15
|
+
* Importing `$backend/git-hosts` wires the hosting layer's one side effect —
|
|
16
|
+
* terminals' git config follows account changes — so merging this router is
|
|
17
|
+
* what switches hosting on.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { t } from 'elysia';
|
|
21
|
+
import { createRouter } from '$shared/utils/ws-server';
|
|
22
|
+
import { debug } from '$shared/utils/logger';
|
|
23
|
+
import { hostingService } from '$backend/git-hosts';
|
|
24
|
+
import { gitRepoContext, withRepoLock } from '../git/repo-context';
|
|
25
|
+
import { requireProjectWorkspace } from '../access';
|
|
26
|
+
|
|
27
|
+
const HOST_KIND_SCHEMA = t.Union([t.Literal('github'), t.Literal('gitlab'), t.Literal('gitea'), t.Literal('bitbucket')]);
|
|
28
|
+
const STATUS_SCHEMA = t.Union([
|
|
29
|
+
t.Literal('unknown'),
|
|
30
|
+
t.Literal('ok'),
|
|
31
|
+
t.Literal('needs_auth'),
|
|
32
|
+
t.Literal('needs_config'),
|
|
33
|
+
t.Literal('error')
|
|
34
|
+
]);
|
|
35
|
+
|
|
36
|
+
const LINKS_SCHEMA = t.Object({
|
|
37
|
+
repo: t.String(),
|
|
38
|
+
commit: t.String(),
|
|
39
|
+
branch: t.String(),
|
|
40
|
+
file: t.String(),
|
|
41
|
+
fileLine: t.String(),
|
|
42
|
+
compare: t.String(),
|
|
43
|
+
newPullRequest: t.String()
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const ACCOUNT_SCHEMA = t.Object({
|
|
47
|
+
accountId: t.String(),
|
|
48
|
+
provider: HOST_KIND_SCHEMA,
|
|
49
|
+
providerName: t.String(),
|
|
50
|
+
label: t.String(),
|
|
51
|
+
host: t.String(),
|
|
52
|
+
login: t.Union([t.String(), t.Null()]),
|
|
53
|
+
offersWork: t.Boolean(),
|
|
54
|
+
status: STATUS_SCHEMA,
|
|
55
|
+
statusDetail: t.Union([t.String(), t.Null()])
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const REPO_SCHEMA = t.Object({
|
|
59
|
+
fullName: t.String(),
|
|
60
|
+
owner: t.String(),
|
|
61
|
+
name: t.String(),
|
|
62
|
+
description: t.Union([t.String(), t.Null()]),
|
|
63
|
+
isPrivate: t.Boolean(),
|
|
64
|
+
isFork: t.Boolean(),
|
|
65
|
+
parentFullName: t.Union([t.String(), t.Null()]),
|
|
66
|
+
defaultBranch: t.Union([t.String(), t.Null()]),
|
|
67
|
+
cloneUrlHttps: t.String(),
|
|
68
|
+
cloneUrlSsh: t.Union([t.String(), t.Null()]),
|
|
69
|
+
webUrl: t.String(),
|
|
70
|
+
updatedAt: t.Union([t.String(), t.Null()]),
|
|
71
|
+
canPush: t.Union([t.Boolean(), t.Null()])
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const OPTION_SCHEMA = t.Object({ key: t.String(), name: t.String() });
|
|
75
|
+
|
|
76
|
+
export const hostingRouter = createRouter()
|
|
77
|
+
.http('hosting:context', {
|
|
78
|
+
data: t.Object({ projectId: t.String() }),
|
|
79
|
+
response: t.Object({
|
|
80
|
+
remotes: t.Array(t.Object({
|
|
81
|
+
name: t.String(),
|
|
82
|
+
url: t.String(),
|
|
83
|
+
host: t.Union([t.String(), t.Null()]),
|
|
84
|
+
provider: t.Union([HOST_KIND_SCHEMA, t.Null()]),
|
|
85
|
+
locator: t.Union([t.String(), t.Null()]),
|
|
86
|
+
accountId: t.Union([t.String(), t.Null()]),
|
|
87
|
+
links: t.Union([LINKS_SCHEMA, t.Null()]),
|
|
88
|
+
defaultBranch: t.Union([t.String(), t.Null()])
|
|
89
|
+
})),
|
|
90
|
+
accounts: t.Array(ACCOUNT_SCHEMA),
|
|
91
|
+
primaryRemote: t.Union([t.String(), t.Null()]),
|
|
92
|
+
unservedProvider: t.Union([t.Object({ provider: HOST_KIND_SCHEMA, host: t.String() }), t.Null()])
|
|
93
|
+
})
|
|
94
|
+
}, async ({ data, conn }) => {
|
|
95
|
+
const { project, root } = requireProjectWorkspace(conn, data.projectId);
|
|
96
|
+
return hostingService.context(project.id, root);
|
|
97
|
+
})
|
|
98
|
+
|
|
99
|
+
.http('hosting:viewer', {
|
|
100
|
+
data: t.Object({ accountId: t.String({ minLength: 1 }) }),
|
|
101
|
+
response: t.Object({
|
|
102
|
+
login: t.String(),
|
|
103
|
+
name: t.Union([t.String(), t.Null()]),
|
|
104
|
+
avatarUrl: t.Union([t.String(), t.Null()]),
|
|
105
|
+
scopes: t.Union([t.Array(t.String()), t.Null()]),
|
|
106
|
+
missingScopes: t.Array(t.String())
|
|
107
|
+
})
|
|
108
|
+
}, async ({ data }) => hostingService.viewer(data.accountId))
|
|
109
|
+
|
|
110
|
+
.http('hosting:owners', {
|
|
111
|
+
data: t.Object({ projectId: t.String(), accountId: t.String({ minLength: 1 }) }),
|
|
112
|
+
response: t.Array(t.Object({
|
|
113
|
+
login: t.String(),
|
|
114
|
+
kind: t.Union([t.Literal('user'), t.Literal('org')]),
|
|
115
|
+
name: t.Union([t.String(), t.Null()]),
|
|
116
|
+
avatarUrl: t.Union([t.String(), t.Null()])
|
|
117
|
+
}))
|
|
118
|
+
}, async ({ data, conn }) => {
|
|
119
|
+
const { project } = requireProjectWorkspace(conn, data.projectId);
|
|
120
|
+
return hostingService.owners(data.accountId, project.id);
|
|
121
|
+
})
|
|
122
|
+
|
|
123
|
+
.http('hosting:repos', {
|
|
124
|
+
data: t.Object({
|
|
125
|
+
projectId: t.String(),
|
|
126
|
+
accountId: t.String({ minLength: 1 }),
|
|
127
|
+
search: t.Optional(t.String({ maxLength: 200 })),
|
|
128
|
+
owner: t.Optional(t.String({ maxLength: 200 })),
|
|
129
|
+
page: t.Optional(t.Number({ minimum: 1, maximum: 100 }))
|
|
130
|
+
}),
|
|
131
|
+
response: t.Object({ repos: t.Array(REPO_SCHEMA), hasMore: t.Boolean() })
|
|
132
|
+
}, async ({ data, conn }) => {
|
|
133
|
+
const { project } = requireProjectWorkspace(conn, data.projectId);
|
|
134
|
+
return hostingService.repos(data.accountId, project.id, {
|
|
135
|
+
search: data.search,
|
|
136
|
+
owner: data.owner,
|
|
137
|
+
page: data.page ?? 1
|
|
138
|
+
});
|
|
139
|
+
})
|
|
140
|
+
|
|
141
|
+
.http('hosting:templates', {
|
|
142
|
+
data: t.Object({ projectId: t.String(), accountId: t.String({ minLength: 1 }) }),
|
|
143
|
+
response: t.Object({
|
|
144
|
+
gitignore: t.Array(OPTION_SCHEMA),
|
|
145
|
+
licenses: t.Array(OPTION_SCHEMA),
|
|
146
|
+
suggestedGitignore: t.Union([t.String(), t.Null()]),
|
|
147
|
+
existing: t.Object({ gitignore: t.Boolean(), license: t.Boolean(), readme: t.Boolean() }),
|
|
148
|
+
needsFirstCommit: t.Boolean(),
|
|
149
|
+
pendingFiles: t.Number()
|
|
150
|
+
})
|
|
151
|
+
}, async ({ data, conn }) => {
|
|
152
|
+
const { project, root } = requireProjectWorkspace(conn, data.projectId);
|
|
153
|
+
return hostingService.templates(data.accountId, project.id, root);
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
.http('hosting:publish', {
|
|
157
|
+
data: t.Object({
|
|
158
|
+
projectId: t.String(),
|
|
159
|
+
accountId: t.String({ minLength: 1 }),
|
|
160
|
+
owner: t.String({ minLength: 1 }),
|
|
161
|
+
name: t.String({ minLength: 1, maxLength: 100 }),
|
|
162
|
+
description: t.String({ maxLength: 350 }),
|
|
163
|
+
isPrivate: t.Boolean(),
|
|
164
|
+
remoteName: t.String({ maxLength: 64 }),
|
|
165
|
+
gitignore: t.Union([t.String(), t.Null()]),
|
|
166
|
+
license: t.Union([t.String(), t.Null()]),
|
|
167
|
+
readme: t.Boolean(),
|
|
168
|
+
createFirstCommit: t.Boolean(),
|
|
169
|
+
protocol: t.Union([t.Literal('https'), t.Literal('ssh')])
|
|
170
|
+
}),
|
|
171
|
+
response: t.Object({
|
|
172
|
+
repo: REPO_SCHEMA,
|
|
173
|
+
remoteName: t.String(),
|
|
174
|
+
pushed: t.Boolean(),
|
|
175
|
+
pushMessage: t.Union([t.String(), t.Null()])
|
|
176
|
+
})
|
|
177
|
+
}, async ({ data, conn }) => {
|
|
178
|
+
debug.log('path', `hosting:publish ${data.owner}/${data.name}`);
|
|
179
|
+
const ctx = gitRepoContext(conn, data.projectId);
|
|
180
|
+
return withRepoLock(ctx, { category: 'push', label: 'Publish', target: data.name }, () =>
|
|
181
|
+
hostingService.publish(ctx.projectId, ctx.root, data));
|
|
182
|
+
})
|
|
183
|
+
|
|
184
|
+
.http('hosting:fork', {
|
|
185
|
+
data: t.Object({
|
|
186
|
+
projectId: t.String(),
|
|
187
|
+
accountId: t.String({ minLength: 1 }),
|
|
188
|
+
remote: t.String({ minLength: 1 })
|
|
189
|
+
}),
|
|
190
|
+
response: t.Object({
|
|
191
|
+
fork: REPO_SCHEMA,
|
|
192
|
+
forkRemote: t.String(),
|
|
193
|
+
upstreamRemote: t.Union([t.String(), t.Null()]),
|
|
194
|
+
pushed: t.Boolean(),
|
|
195
|
+
pushMessage: t.Union([t.String(), t.Null()])
|
|
196
|
+
})
|
|
197
|
+
}, async ({ data, conn }) => {
|
|
198
|
+
debug.log('path', `hosting:fork ${data.remote}`);
|
|
199
|
+
const ctx = gitRepoContext(conn, data.projectId);
|
|
200
|
+
return withRepoLock(ctx, { category: 'push', label: 'Fork', target: data.remote }, () =>
|
|
201
|
+
hostingService.fork(ctx.projectId, ctx.root, { accountId: data.accountId, remote: data.remote }));
|
|
202
|
+
})
|
|
203
|
+
|
|
204
|
+
.http('hosting:can-push', {
|
|
205
|
+
data: t.Object({ projectId: t.String(), remote: t.String({ minLength: 1 }) }),
|
|
206
|
+
response: t.Object({
|
|
207
|
+
canPush: t.Union([t.Boolean(), t.Null()]),
|
|
208
|
+
accountId: t.Union([t.String(), t.Null()]),
|
|
209
|
+
repo: t.Union([REPO_SCHEMA, t.Null()])
|
|
210
|
+
})
|
|
211
|
+
}, async ({ data, conn }) => {
|
|
212
|
+
const { project, root } = requireProjectWorkspace(conn, data.projectId);
|
|
213
|
+
return hostingService.canPush(project.id, root, data.remote);
|
|
214
|
+
})
|
|
215
|
+
|
|
216
|
+
.http('hosting:commit-statuses', {
|
|
217
|
+
data: t.Object({
|
|
218
|
+
projectId: t.String(),
|
|
219
|
+
remote: t.Optional(t.String()),
|
|
220
|
+
shas: t.Array(t.String({ pattern: '^[0-9a-fA-F]{7,64}$' }), { maxItems: 60 })
|
|
221
|
+
}),
|
|
222
|
+
response: t.Array(t.Object({
|
|
223
|
+
sha: t.String(),
|
|
224
|
+
state: t.Union([t.Literal('success'), t.Literal('failure'), t.Literal('pending'), t.Literal('none')]),
|
|
225
|
+
url: t.Union([t.String(), t.Null()]),
|
|
226
|
+
summary: t.String()
|
|
227
|
+
}))
|
|
228
|
+
}, async ({ data, conn }) => {
|
|
229
|
+
const { project, root } = requireProjectWorkspace(conn, data.projectId);
|
|
230
|
+
return hostingService.commitStatuses(project.id, root, data.remote ?? null, data.shas);
|
|
231
|
+
});
|
package/backend/ws/index.ts
CHANGED
|
@@ -26,6 +26,7 @@ import { userRouter } from './user';
|
|
|
26
26
|
import { filesRouter } from './files';
|
|
27
27
|
import { workspaceRouter } from './workspace';
|
|
28
28
|
import { systemRouter } from './system';
|
|
29
|
+
import { storageRouter } from './storage';
|
|
29
30
|
import { tunnelRouter } from './tunnel';
|
|
30
31
|
import { gitRouter } from './git';
|
|
31
32
|
import { engineRouter } from './engine';
|
|
@@ -47,8 +48,10 @@ import { memoryRouter } from './memory';
|
|
|
47
48
|
import { worktreesRouter } from './worktrees';
|
|
48
49
|
import { notesRouter } from './notes';
|
|
49
50
|
import { workRouter } from './work';
|
|
51
|
+
import { hostingRouter } from './hosting';
|
|
50
52
|
import { deploymentsRouter } from './deployments';
|
|
51
53
|
import { chatAppsRouter } from './chat-apps';
|
|
54
|
+
import { mentionsRouter } from './mentions';
|
|
52
55
|
|
|
53
56
|
// ============================================
|
|
54
57
|
// Main App Router - Merge All Module Routers
|
|
@@ -82,6 +85,7 @@ export const wsRouter = createRouter()
|
|
|
82
85
|
.merge(filesRouter)
|
|
83
86
|
.merge(workspaceRouter)
|
|
84
87
|
.merge(systemRouter)
|
|
88
|
+
.merge(storageRouter)
|
|
85
89
|
.merge(tunnelRouter)
|
|
86
90
|
|
|
87
91
|
// Git Source Control
|
|
@@ -127,14 +131,20 @@ export const wsRouter = createRouter()
|
|
|
127
131
|
// Notes (project-scoped markdown)
|
|
128
132
|
.merge(notesRouter)
|
|
129
133
|
|
|
130
|
-
// Issues & PRs
|
|
134
|
+
// Issues & PRs — work items, pull requests and CI for the current project,
|
|
135
|
+
// shown in the Git panel's hosting view. Then hosting itself: publish, fork,
|
|
136
|
+
// remotes from an account, commit CI.
|
|
131
137
|
.merge(workRouter)
|
|
138
|
+
.merge(hostingRouter)
|
|
132
139
|
|
|
133
140
|
// Deployments surface — builds, logs and what is live, for the current project
|
|
134
141
|
.merge(deploymentsRouter)
|
|
135
142
|
|
|
136
143
|
// Notification channels — pairing a chat with a connected bot, per user
|
|
137
|
-
.merge(chatAppsRouter)
|
|
144
|
+
.merge(chatAppsRouter)
|
|
145
|
+
|
|
146
|
+
// The chat composer's `@` picker — search and snapshot everything mentionable
|
|
147
|
+
.merge(mentionsRouter);
|
|
138
148
|
|
|
139
149
|
// Export API type for frontend type-safe access
|
|
140
150
|
export type WSAPI = typeof wsRouter['$api'];
|
|
@@ -32,11 +32,11 @@ import { ws as wsServer } from '$backend/utils/ws';
|
|
|
32
32
|
* connector row it projects is instance-wide, and the hub is an instance-wide
|
|
33
33
|
* screen.
|
|
34
34
|
*/
|
|
35
|
-
function announce(accountId?: string): void {
|
|
35
|
+
export function announce(accountId?: string): void {
|
|
36
36
|
wsServer.emit.global('integrations:changed', accountId ? { accountId } : {});
|
|
37
37
|
}
|
|
38
38
|
|
|
39
|
-
const CAPABILITY_SCHEMA = t.Union(INTEGRATION_CAPABILITIES.map((capability) => t.Literal(capability)));
|
|
39
|
+
export const CAPABILITY_SCHEMA = t.Union(INTEGRATION_CAPABILITIES.map((capability) => t.Literal(capability)));
|
|
40
40
|
const CATEGORY_SCHEMA = t.Union(INTEGRATION_CATEGORIES.map((category) => t.Literal(category)));
|
|
41
41
|
|
|
42
42
|
const STATUS_SCHEMA = t.Union([
|
|
@@ -47,15 +47,37 @@ const STATUS_SCHEMA = t.Union([
|
|
|
47
47
|
t.Literal('error')
|
|
48
48
|
]);
|
|
49
49
|
|
|
50
|
-
const AUTH_METHOD_SCHEMA = t.Union([
|
|
50
|
+
export const AUTH_METHOD_SCHEMA = t.Union([
|
|
51
51
|
t.Literal('api-key'),
|
|
52
52
|
t.Literal('oauth-device'),
|
|
53
53
|
t.Literal('oauth-code'),
|
|
54
54
|
t.Literal('mcp-oauth'),
|
|
55
55
|
t.Literal('connection-string'),
|
|
56
|
+
t.Literal('cli'),
|
|
56
57
|
t.Literal('none')
|
|
57
58
|
]);
|
|
58
59
|
|
|
60
|
+
const CLI_SCHEMA = t.Union([t.Literal('gh'), t.Literal('glab'), t.Literal('tea')]);
|
|
61
|
+
|
|
62
|
+
const HOSTING_INFO_SCHEMA = t.Object({
|
|
63
|
+
defaultHost: t.Union([t.String(), t.Null()]),
|
|
64
|
+
selfHosted: t.Boolean(),
|
|
65
|
+
requiresServerUrl: t.Boolean(),
|
|
66
|
+
cli: t.Union([CLI_SCHEMA, t.Null()]),
|
|
67
|
+
deviceFlow: t.Boolean(),
|
|
68
|
+
browserFlow: t.Boolean(),
|
|
69
|
+
hasBundledClientId: t.Boolean(),
|
|
70
|
+
oauthAppUrl: t.Union([t.String(), t.Null()]),
|
|
71
|
+
scopes: t.Array(t.String())
|
|
72
|
+
});
|
|
73
|
+
|
|
74
|
+
const ACCOUNT_HOSTING_SCHEMA = t.Object({
|
|
75
|
+
host: t.String(),
|
|
76
|
+
login: t.Union([t.String(), t.Null()]),
|
|
77
|
+
linkedCli: t.Union([CLI_SCHEMA, t.Null()]),
|
|
78
|
+
expiresAt: t.Union([t.String(), t.Null()])
|
|
79
|
+
});
|
|
80
|
+
|
|
59
81
|
const CREDENTIAL_FIELD_SCHEMA = t.Object({
|
|
60
82
|
name: t.String(),
|
|
61
83
|
label: t.String(),
|
|
@@ -71,7 +93,10 @@ const PROVIDER_SCHEMA = t.Object({
|
|
|
71
93
|
category: CATEGORY_SCHEMA,
|
|
72
94
|
description: t.String(),
|
|
73
95
|
docsUrl: t.Optional(t.String()),
|
|
96
|
+
consoleUrl: t.Optional(t.String()),
|
|
74
97
|
authMethod: AUTH_METHOD_SCHEMA,
|
|
98
|
+
authMethods: t.Array(AUTH_METHOD_SCHEMA),
|
|
99
|
+
hosting: t.Optional(HOSTING_INFO_SCHEMA),
|
|
75
100
|
credentialFields: t.Array(CREDENTIAL_FIELD_SCHEMA),
|
|
76
101
|
capabilities: t.Array(CAPABILITY_SCHEMA),
|
|
77
102
|
defaultCapabilities: t.Array(CAPABILITY_SCHEMA),
|
|
@@ -79,7 +104,7 @@ const PROVIDER_SCHEMA = t.Object({
|
|
|
79
104
|
acceptsWebhooks: t.Boolean()
|
|
80
105
|
});
|
|
81
106
|
|
|
82
|
-
const ACCOUNT_SCHEMA = t.Object({
|
|
107
|
+
export const ACCOUNT_SCHEMA = t.Object({
|
|
83
108
|
id: t.String(),
|
|
84
109
|
provider: t.String(),
|
|
85
110
|
label: t.String(),
|
|
@@ -100,7 +125,8 @@ const ACCOUNT_SCHEMA = t.Object({
|
|
|
100
125
|
targetKind: t.Union([t.Literal('mcp_server'), t.Literal('db_client_connection')]),
|
|
101
126
|
targetId: t.String(),
|
|
102
127
|
adopted: t.Boolean()
|
|
103
|
-
}))
|
|
128
|
+
})),
|
|
129
|
+
hosting: t.Optional(ACCOUNT_HOSTING_SCHEMA)
|
|
104
130
|
});
|
|
105
131
|
|
|
106
132
|
const SECRETS_HEALTH_SCHEMA = t.Object({
|
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Signing in to a git hosting service — every way in, one route each.
|
|
3
|
+
*
|
|
4
|
+
* integrations:hosting-detect logins already on this machine (gh, glab, tea)
|
|
5
|
+
* integrations:hosting-probe-server what a self-hosted URL is
|
|
6
|
+
* integrations:hosting-connect-cli borrow a CLI login (linked or copied)
|
|
7
|
+
* integrations:hosting-connect-keychain read git's credential store, once
|
|
8
|
+
* integrations:hosting-connect-token a pasted token, verified before it is stored
|
|
9
|
+
* integrations:hosting-device-start OAuth device flow
|
|
10
|
+
* integrations:hosting-browser-start OAuth authorization code + PKCE
|
|
11
|
+
* integrations:hosting-auth-poll how a started flow is going
|
|
12
|
+
* integrations:hosting-auth-cancel stop waiting for one
|
|
13
|
+
* integrations:hosting-callback-uri the redirect URI to register on an OAuth app
|
|
14
|
+
*
|
|
15
|
+
* Every connect route takes an optional `accountId`, which reconnects that
|
|
16
|
+
* account instead of creating one — the same dialog serves "Connect" and
|
|
17
|
+
* "Sign in again".
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
import { t } from 'elysia';
|
|
21
|
+
import { createRouter } from '$shared/utils/ws-server';
|
|
22
|
+
import { debug } from '$shared/utils/logger';
|
|
23
|
+
import {
|
|
24
|
+
cancelFlow,
|
|
25
|
+
connectFromCli,
|
|
26
|
+
connectFromKeychain,
|
|
27
|
+
connectHostAccount,
|
|
28
|
+
detectLocal,
|
|
29
|
+
isGitHostKind,
|
|
30
|
+
oauthCallbackUri,
|
|
31
|
+
pollFlow,
|
|
32
|
+
probeServer,
|
|
33
|
+
startBrowserFlow,
|
|
34
|
+
startDeviceFlow
|
|
35
|
+
} from '$backend/git-hosts';
|
|
36
|
+
import type { GitHostKind } from '$shared/types/git-hosting';
|
|
37
|
+
import type { IntegrationCapability } from '$shared/types/integrations';
|
|
38
|
+
import { ACCOUNT_SCHEMA, CAPABILITY_SCHEMA, announce } from './crud';
|
|
39
|
+
|
|
40
|
+
const HOST_KIND_SCHEMA = t.Union([t.Literal('github'), t.Literal('gitlab'), t.Literal('gitea'), t.Literal('bitbucket')]);
|
|
41
|
+
|
|
42
|
+
const TARGET_FIELDS = {
|
|
43
|
+
provider: HOST_KIND_SCHEMA,
|
|
44
|
+
label: t.Optional(t.String({ maxLength: 120 })),
|
|
45
|
+
projectId: t.Optional(t.Union([t.String(), t.Null()])),
|
|
46
|
+
capabilities: t.Optional(t.Array(CAPABILITY_SCHEMA)),
|
|
47
|
+
accountId: t.Optional(t.Union([t.String(), t.Null()]))
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
const VIEWER_SCHEMA = t.Object({
|
|
51
|
+
login: t.String(),
|
|
52
|
+
name: t.Union([t.String(), t.Null()]),
|
|
53
|
+
avatarUrl: t.Union([t.String(), t.Null()]),
|
|
54
|
+
scopes: t.Union([t.Array(t.String()), t.Null()]),
|
|
55
|
+
missingScopes: t.Array(t.String())
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
const CONNECTED_SCHEMA = t.Object({ account: ACCOUNT_SCHEMA, viewer: VIEWER_SCHEMA });
|
|
59
|
+
|
|
60
|
+
function kindOf(provider: string): GitHostKind {
|
|
61
|
+
if (!isGitHostKind(provider)) throw new Error(`"${provider}" is not a git hosting service`);
|
|
62
|
+
return provider;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export const hostingAuthHandler = createRouter()
|
|
66
|
+
.http('integrations:hosting-detect', {
|
|
67
|
+
data: t.Object({ provider: HOST_KIND_SCHEMA, baseUrl: t.Optional(t.String()) }),
|
|
68
|
+
response: t.Object({
|
|
69
|
+
found: t.Array(t.Object({
|
|
70
|
+
source: t.Union([t.Literal('gh'), t.Literal('glab'), t.Literal('tea'), t.Literal('keychain')]),
|
|
71
|
+
host: t.String(),
|
|
72
|
+
login: t.Union([t.String(), t.Null()]),
|
|
73
|
+
hasToken: t.Boolean(),
|
|
74
|
+
canLink: t.Boolean()
|
|
75
|
+
}))
|
|
76
|
+
})
|
|
77
|
+
}, async ({ data }) => {
|
|
78
|
+
debug.log('path', `integrations:hosting-detect ${data.provider}`);
|
|
79
|
+
return { found: await detectLocal(kindOf(data.provider), data.baseUrl) };
|
|
80
|
+
})
|
|
81
|
+
|
|
82
|
+
.http('integrations:hosting-probe-server', {
|
|
83
|
+
data: t.Object({ url: t.String({ minLength: 1, maxLength: 500 }) }),
|
|
84
|
+
response: t.Object({
|
|
85
|
+
provider: t.Union([HOST_KIND_SCHEMA, t.Null()]),
|
|
86
|
+
flavour: t.Union([
|
|
87
|
+
t.Literal('github-enterprise'),
|
|
88
|
+
t.Literal('gitlab'),
|
|
89
|
+
t.Literal('gitea'),
|
|
90
|
+
t.Literal('forgejo'),
|
|
91
|
+
t.Null()
|
|
92
|
+
]),
|
|
93
|
+
version: t.Union([t.String(), t.Null()]),
|
|
94
|
+
baseUrl: t.String()
|
|
95
|
+
})
|
|
96
|
+
}, async ({ data }) => probeServer(data.url))
|
|
97
|
+
|
|
98
|
+
.http('integrations:hosting-connect-cli', {
|
|
99
|
+
data: t.Object({
|
|
100
|
+
...TARGET_FIELDS,
|
|
101
|
+
host: t.String({ minLength: 1 }),
|
|
102
|
+
mode: t.Union([t.Literal('linked'), t.Literal('copy')])
|
|
103
|
+
}),
|
|
104
|
+
response: CONNECTED_SCHEMA
|
|
105
|
+
}, async ({ data }) => {
|
|
106
|
+
debug.log('path', `integrations:hosting-connect-cli ${data.provider} ${data.mode}`);
|
|
107
|
+
const result = await connectFromCli({
|
|
108
|
+
provider: kindOf(data.provider),
|
|
109
|
+
host: data.host.toLowerCase(),
|
|
110
|
+
mode: data.mode,
|
|
111
|
+
label: data.label,
|
|
112
|
+
projectId: data.projectId ?? null,
|
|
113
|
+
capabilities: data.capabilities as IntegrationCapability[] | undefined,
|
|
114
|
+
accountId: data.accountId ?? null
|
|
115
|
+
});
|
|
116
|
+
announce(result.account.id);
|
|
117
|
+
return result;
|
|
118
|
+
})
|
|
119
|
+
|
|
120
|
+
.http('integrations:hosting-connect-keychain', {
|
|
121
|
+
data: t.Object({ ...TARGET_FIELDS, baseUrl: t.Optional(t.String()) }),
|
|
122
|
+
response: CONNECTED_SCHEMA
|
|
123
|
+
}, async ({ data }) => {
|
|
124
|
+
debug.log('path', `integrations:hosting-connect-keychain ${data.provider}`);
|
|
125
|
+
const result = await connectFromKeychain({
|
|
126
|
+
provider: kindOf(data.provider),
|
|
127
|
+
baseUrl: data.baseUrl,
|
|
128
|
+
label: data.label,
|
|
129
|
+
projectId: data.projectId ?? null,
|
|
130
|
+
capabilities: data.capabilities as IntegrationCapability[] | undefined,
|
|
131
|
+
accountId: data.accountId ?? null
|
|
132
|
+
});
|
|
133
|
+
announce(result.account.id);
|
|
134
|
+
return result;
|
|
135
|
+
})
|
|
136
|
+
|
|
137
|
+
.http('integrations:hosting-connect-token', {
|
|
138
|
+
data: t.Object({ ...TARGET_FIELDS, fields: t.Record(t.String(), t.String()) }),
|
|
139
|
+
response: CONNECTED_SCHEMA
|
|
140
|
+
}, async ({ data }) => {
|
|
141
|
+
debug.log('path', `integrations:hosting-connect-token ${data.provider}`);
|
|
142
|
+
const result = await connectHostAccount({
|
|
143
|
+
provider: kindOf(data.provider),
|
|
144
|
+
accountId: data.accountId ?? null,
|
|
145
|
+
label: data.label,
|
|
146
|
+
projectId: data.projectId ?? null,
|
|
147
|
+
capabilities: data.capabilities as IntegrationCapability[] | undefined,
|
|
148
|
+
authMethod: 'api-key',
|
|
149
|
+
source: 'token',
|
|
150
|
+
fields: data.fields
|
|
151
|
+
});
|
|
152
|
+
announce(result.account.id);
|
|
153
|
+
return result;
|
|
154
|
+
})
|
|
155
|
+
|
|
156
|
+
.http('integrations:hosting-device-start', {
|
|
157
|
+
data: t.Object({ ...TARGET_FIELDS, baseUrl: t.Optional(t.String()), clientId: t.Optional(t.String()) }),
|
|
158
|
+
response: t.Object({
|
|
159
|
+
flowId: t.String(),
|
|
160
|
+
userCode: t.String(),
|
|
161
|
+
verificationUri: t.String(),
|
|
162
|
+
verificationUriComplete: t.Union([t.String(), t.Null()]),
|
|
163
|
+
expiresAt: t.String(),
|
|
164
|
+
intervalSeconds: t.Number()
|
|
165
|
+
})
|
|
166
|
+
}, async ({ data }) => {
|
|
167
|
+
debug.log('path', `integrations:hosting-device-start ${data.provider}`);
|
|
168
|
+
return startDeviceFlow({
|
|
169
|
+
provider: kindOf(data.provider),
|
|
170
|
+
baseUrl: data.baseUrl,
|
|
171
|
+
clientId: data.clientId,
|
|
172
|
+
label: data.label,
|
|
173
|
+
projectId: data.projectId ?? null,
|
|
174
|
+
capabilities: data.capabilities as IntegrationCapability[] | undefined,
|
|
175
|
+
accountId: data.accountId ?? null
|
|
176
|
+
});
|
|
177
|
+
})
|
|
178
|
+
|
|
179
|
+
.http('integrations:hosting-browser-start', {
|
|
180
|
+
data: t.Object({ ...TARGET_FIELDS, baseUrl: t.Optional(t.String()), clientId: t.Optional(t.String()) }),
|
|
181
|
+
response: t.Object({ flowId: t.String(), authorizeUrl: t.String(), redirectUri: t.String() })
|
|
182
|
+
}, async ({ data }) => {
|
|
183
|
+
debug.log('path', `integrations:hosting-browser-start ${data.provider}`);
|
|
184
|
+
return startBrowserFlow({
|
|
185
|
+
provider: kindOf(data.provider),
|
|
186
|
+
baseUrl: data.baseUrl,
|
|
187
|
+
clientId: data.clientId,
|
|
188
|
+
label: data.label,
|
|
189
|
+
projectId: data.projectId ?? null,
|
|
190
|
+
capabilities: data.capabilities as IntegrationCapability[] | undefined,
|
|
191
|
+
accountId: data.accountId ?? null
|
|
192
|
+
});
|
|
193
|
+
})
|
|
194
|
+
|
|
195
|
+
.http('integrations:hosting-auth-poll', {
|
|
196
|
+
data: t.Object({ flowId: t.String({ minLength: 1 }) }),
|
|
197
|
+
response: t.Object({
|
|
198
|
+
status: t.Union([
|
|
199
|
+
t.Literal('pending'),
|
|
200
|
+
t.Literal('success'),
|
|
201
|
+
t.Literal('expired'),
|
|
202
|
+
t.Literal('denied'),
|
|
203
|
+
t.Literal('error')
|
|
204
|
+
]),
|
|
205
|
+
accountId: t.Union([t.String(), t.Null()]),
|
|
206
|
+
error: t.Union([t.String(), t.Null()])
|
|
207
|
+
})
|
|
208
|
+
}, async ({ data }) => {
|
|
209
|
+
const result = pollFlow(data.flowId);
|
|
210
|
+
if (result.status === 'success' && result.accountId) announce(result.accountId);
|
|
211
|
+
return result;
|
|
212
|
+
})
|
|
213
|
+
|
|
214
|
+
// The redirect URI a user registers on their own OAuth app. Asked of the
|
|
215
|
+
// server because only it knows the port it listens on.
|
|
216
|
+
.http('integrations:hosting-callback-uri', {
|
|
217
|
+
data: t.Object({}),
|
|
218
|
+
response: t.Object({ uri: t.String() })
|
|
219
|
+
}, async () => ({ uri: oauthCallbackUri() }))
|
|
220
|
+
|
|
221
|
+
.http('integrations:hosting-auth-cancel', {
|
|
222
|
+
data: t.Object({ flowId: t.String({ minLength: 1 }) }),
|
|
223
|
+
response: t.Object({ ok: t.Boolean() })
|
|
224
|
+
}, async ({ data }) => {
|
|
225
|
+
cancelFlow(data.flowId);
|
|
226
|
+
return { ok: true };
|
|
227
|
+
});
|
|
@@ -8,9 +8,11 @@
|
|
|
8
8
|
import { t } from 'elysia';
|
|
9
9
|
import { createRouter } from '$shared/utils/ws-server';
|
|
10
10
|
import { integrationsCrudHandler } from './crud';
|
|
11
|
+
import { hostingAuthHandler } from './hosting-auth';
|
|
11
12
|
|
|
12
13
|
export const integrationsRouter = createRouter()
|
|
13
14
|
.merge(integrationsCrudHandler)
|
|
15
|
+
.merge(hostingAuthHandler)
|
|
14
16
|
/**
|
|
15
17
|
* Broadcast after any account mutation. The hub also shows connectors, whose
|
|
16
18
|
* rows a projection creates and removes, so a client that only watched its
|