@myrialabs/clopen 0.4.38 → 0.4.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/backend/auth/permissions.ts +48 -0
  2. package/backend/chat/stream-manager.ts +1 -1
  3. package/backend/database/crypto/secret-columns.ts +9 -1
  4. package/backend/database/migrations/075_create_deploy_bindings.ts +54 -0
  5. package/backend/database/migrations/076_remove_memory_code_graph.ts +229 -0
  6. package/backend/database/migrations/077_create_integration_db_links.ts +150 -0
  7. package/backend/database/migrations/078_create_worktree_branch_tables.ts +158 -0
  8. package/backend/database/migrations/index.ts +28 -0
  9. package/backend/database/queries/db-client-connection-queries.ts +19 -0
  10. package/backend/database/queries/deploy-queries.ts +124 -0
  11. package/backend/database/queries/graph-queries.ts +291 -247
  12. package/backend/database/queries/index.ts +10 -0
  13. package/backend/database/queries/integration-db-link-queries.ts +168 -0
  14. package/backend/database/queries/integration-queries.ts +34 -6
  15. package/backend/database/queries/worktree-branch-queries.ts +331 -0
  16. package/backend/db-client/cloning.test.ts +161 -0
  17. package/backend/db-client/cloning.ts +672 -0
  18. package/backend/db-client/connection-url.test.ts +117 -0
  19. package/backend/db-client/connection-url.ts +126 -0
  20. package/backend/db-client/drivers/mongodb.ts +2 -14
  21. package/backend/db-client/drivers/mysql.ts +2 -8
  22. package/backend/db-client/drivers/postgres.ts +10 -13
  23. package/backend/db-client/drivers/redis.ts +2 -6
  24. package/backend/db-client/env/detect.ts +438 -0
  25. package/backend/db-client/env/diff.ts +94 -0
  26. package/backend/db-client/env/env.test.ts +574 -0
  27. package/backend/db-client/env/index.ts +15 -0
  28. package/backend/db-client/env/naming.ts +202 -0
  29. package/backend/db-client/env/service.ts +487 -0
  30. package/backend/db-client/integrations/index.ts +44 -0
  31. package/backend/db-client/integrations/links.ts +564 -0
  32. package/backend/db-client/integrations/projector.test.ts +280 -0
  33. package/backend/db-client/integrations/projector.ts +256 -0
  34. package/backend/db-client/integrations/supabase-service.ts +266 -0
  35. package/backend/db-client/providers/neon/adapter.ts +522 -0
  36. package/backend/db-client/providers/neon/api-types.ts +182 -0
  37. package/backend/db-client/providers/neon/client.ts +298 -0
  38. package/backend/db-client/providers/neon/endpoints.test.ts +201 -0
  39. package/backend/db-client/providers/neon/endpoints.ts +314 -0
  40. package/backend/db-client/providers/neon/list.test.ts +181 -0
  41. package/backend/db-client/providers/registry.ts +27 -0
  42. package/backend/db-client/providers/supabase/adapter.ts +523 -0
  43. package/backend/db-client/providers/supabase/api-types.ts +92 -0
  44. package/backend/db-client/providers/supabase/apply-migration.ts +104 -0
  45. package/backend/db-client/providers/supabase/client.ts +259 -0
  46. package/backend/db-client/providers/supabase/features.ts +502 -0
  47. package/backend/db-client/providers/supabase/local.test.ts +78 -0
  48. package/backend/db-client/providers/supabase/local.ts +137 -0
  49. package/backend/db-client/providers/types.ts +194 -0
  50. package/backend/deployments/bindings.test.ts +43 -0
  51. package/backend/deployments/bindings.ts +216 -0
  52. package/backend/deployments/index.ts +53 -0
  53. package/backend/deployments/log-streams.ts +214 -0
  54. package/backend/deployments/prompts.ts +70 -0
  55. package/backend/deployments/providers/vercel/adapter.ts +757 -0
  56. package/backend/deployments/providers/vercel/build-logs.test.ts +80 -0
  57. package/backend/deployments/providers/vercel/build-logs.ts +211 -0
  58. package/backend/deployments/providers/vercel/client.ts +203 -0
  59. package/backend/deployments/providers/vercel/list.test.ts +624 -0
  60. package/backend/deployments/providers/vercel/normalise.test.ts +115 -0
  61. package/backend/deployments/providers/vercel/normalise.ts +113 -0
  62. package/backend/deployments/providers/vercel/types.ts +104 -0
  63. package/backend/deployments/registry.ts +27 -0
  64. package/backend/deployments/service.ts +458 -0
  65. package/backend/deployments/types.ts +278 -0
  66. package/backend/env-files/discovery.ts +48 -0
  67. package/backend/env-files/edit.ts +213 -0
  68. package/backend/env-files/env-files.test.ts +515 -0
  69. package/backend/env-files/git.ts +27 -0
  70. package/backend/env-files/index.ts +44 -0
  71. package/backend/env-files/keys.ts +69 -0
  72. package/backend/env-files/parse.ts +157 -0
  73. package/backend/env-files/write.ts +229 -0
  74. package/backend/index.ts +4 -0
  75. package/backend/integrations/health.ts +18 -4
  76. package/backend/integrations/projections/index.ts +0 -0
  77. package/backend/integrations/projections/mcp-projector.ts +7 -3
  78. package/backend/integrations/projections/types.ts +28 -9
  79. package/backend/integrations/registry/index.ts +8 -1
  80. package/backend/integrations/registry/providers/context7.ts +1 -0
  81. package/backend/integrations/registry/providers/firecrawl.ts +1 -0
  82. package/backend/integrations/registry/providers/github.ts +1 -0
  83. package/backend/integrations/registry/providers/neon.ts +55 -0
  84. package/backend/integrations/registry/providers/supabase.ts +62 -0
  85. package/backend/integrations/registry/providers/vercel.ts +47 -0
  86. package/backend/integrations/registry/types.ts +2 -0
  87. package/backend/mcp/internal/servers/memory-graph/description.ts +3 -3
  88. package/backend/mcp/internal/servers/memory-graph/runner.ts +4 -9
  89. package/backend/mcp/internal/servers/memory-graph/schema.ts +0 -4
  90. package/backend/memory/README.md +57 -34
  91. package/backend/memory/compose.test.ts +3 -3
  92. package/backend/memory/compose.ts +6 -9
  93. package/backend/memory/config.ts +0 -5
  94. package/backend/memory/consolidate.ts +1 -2
  95. package/backend/memory/context.test.ts +8 -54
  96. package/backend/memory/context.ts +19 -25
  97. package/backend/memory/extract/episodic.ts +10 -12
  98. package/backend/memory/extract/index.ts +23 -52
  99. package/backend/memory/extract/scheduler.ts +3 -6
  100. package/backend/memory/index.ts +6 -5
  101. package/backend/memory/invalidate.ts +36 -48
  102. package/backend/memory/layout.ts +319 -130
  103. package/backend/memory/retention.ts +12 -42
  104. package/backend/memory/retrieval.eval.test.ts +2 -2
  105. package/backend/memory/retrieval.test.ts +228 -183
  106. package/backend/memory/retrieval.ts +22 -21
  107. package/backend/memory/revise.test.ts +62 -116
  108. package/backend/memory/revise.ts +0 -1
  109. package/backend/memory/view.ts +8 -5
  110. package/backend/snapshot/helpers.ts +35 -41
  111. package/backend/snapshot/snapshot-service.ts +90 -0
  112. package/backend/snapshot/turn-changes.test.ts +163 -0
  113. package/backend/snapshot/turn-changes.ts +131 -0
  114. package/backend/work/start-work.ts +4 -0
  115. package/backend/worktrees/branching/engine.ts +557 -0
  116. package/backend/worktrees/branching/index.ts +56 -0
  117. package/backend/worktrees/branching/naming.test.ts +118 -0
  118. package/backend/worktrees/branching/naming.ts +97 -0
  119. package/backend/worktrees/branching/projector.test.ts +229 -0
  120. package/backend/worktrees/branching/projector.ts +139 -0
  121. package/backend/worktrees/branching/providers/neon.ts +220 -0
  122. package/backend/worktrees/branching/registry.ts +27 -0
  123. package/backend/worktrees/branching/service.ts +620 -0
  124. package/backend/worktrees/branching/suggest.test.ts +154 -0
  125. package/backend/worktrees/branching/suggest.ts +202 -0
  126. package/backend/worktrees/branching/types.ts +88 -0
  127. package/backend/worktrees/index.ts +7 -0
  128. package/backend/worktrees/service.ts +48 -1
  129. package/backend/ws/db-client/accounts.ts +225 -0
  130. package/backend/ws/db-client/connections.ts +34 -3
  131. package/backend/ws/db-client/context.ts +37 -0
  132. package/backend/ws/db-client/env.ts +142 -0
  133. package/backend/ws/db-client/index.ts +22 -1
  134. package/backend/ws/db-client/supabase.ts +188 -0
  135. package/backend/ws/deployments/actions.ts +360 -0
  136. package/backend/ws/deployments/context.ts +43 -0
  137. package/backend/ws/deployments/crud.ts +152 -0
  138. package/backend/ws/deployments/index.ts +15 -0
  139. package/backend/ws/deployments/schemas.ts +183 -0
  140. package/backend/ws/index.ts +6 -2
  141. package/backend/ws/memory/crud.ts +4 -16
  142. package/backend/ws/projects/index.ts +6 -1
  143. package/backend/ws/projects/info.ts +70 -6
  144. package/backend/ws/projects/overview.test.ts +108 -0
  145. package/backend/ws/projects/overview.ts +300 -0
  146. package/backend/ws/snapshot/changes.ts +279 -0
  147. package/backend/ws/snapshot/index.ts +4 -3
  148. package/backend/ws/system/device-info.ts +307 -76
  149. package/backend/ws/worktrees/branching.ts +212 -0
  150. package/backend/ws/worktrees/crud.ts +33 -7
  151. package/backend/ws/worktrees/index.ts +14 -0
  152. package/dist/assets/{index-DSHIANSy.js → index-D4igjF6e.js} +1 -1
  153. package/dist/assets/{index-CyH7fSbR.js → index-DONNwiXm.js} +1 -1
  154. package/dist/assets/main-BrfXH1bL.js +1205 -0
  155. package/dist/assets/main-CT1PygsW.css +1 -0
  156. package/dist/index.html +2 -2
  157. package/package.json +1 -1
  158. package/shared/constants/tool-icons.ts +13 -0
  159. package/shared/types/db-client/connection.ts +6 -0
  160. package/shared/types/db-client/env.ts +192 -0
  161. package/shared/types/db-client/index.ts +3 -0
  162. package/shared/types/db-client/integrations.ts +204 -0
  163. package/shared/types/db-client/supabase.ts +131 -0
  164. package/shared/types/deployments.ts +382 -0
  165. package/shared/types/integrations.ts +9 -0
  166. package/shared/types/memory.ts +34 -51
  167. package/shared/types/ui/components.ts +1 -1
  168. package/shared/types/worktree-branching.ts +315 -0
  169. package/shared/utils/diff-calculator.test.ts +89 -0
  170. package/shared/utils/diff-calculator.ts +30 -65
  171. package/shared/utils/logger.ts +2 -0
  172. package/backend/memory/extract/languages.ts +0 -176
  173. package/backend/memory/extract/structural.test.ts +0 -215
  174. package/backend/memory/extract/structural.ts +0 -364
  175. package/backend/ws/snapshot/content.ts +0 -85
  176. package/dist/assets/main-D2IOjftb.css +0 -1
  177. package/dist/assets/main-DM-tHKbW.js +0 -1152
package/dist/index.html CHANGED
@@ -58,8 +58,8 @@
58
58
  }
59
59
  })();
60
60
  </script>
61
- <script type="module" crossorigin src="/assets/main-DM-tHKbW.js"></script>
62
- <link rel="stylesheet" crossorigin href="/assets/main-D2IOjftb.css">
61
+ <script type="module" crossorigin src="/assets/main-BrfXH1bL.js"></script>
62
+ <link rel="stylesheet" crossorigin href="/assets/main-CT1PygsW.css">
63
63
  </head>
64
64
  <body
65
65
  class="min-h-dvh bg-white text-slate-900 dark:bg-slate-950 dark:text-slate-100 transition-colors duration-200"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@myrialabs/clopen",
3
- "version": "0.4.38",
3
+ "version": "0.4.40",
4
4
  "description": "All-in-one web workspace for AI coding agents — Claude Code, OpenCode, Codex, Copilot, Qwen Code, Pi, Cline, and Cursor — with chat, terminal, git, browser preview, database client, checkpoints, and real-time collaboration",
5
5
  "author": "Myria Labs",
6
6
  "license": "MIT",
@@ -73,6 +73,19 @@ export const PROVIDER_ICONS: Record<string, ToolIcon> = {
73
73
  // on the mark's own bounding box or it renders small and off-centre at 24px.
74
74
  context7: { light: '<svg width="24" height="24" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="28" height="28" rx="4" fill="black"/><path d="M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" fill="white"/><path d="M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" fill="white"/><path d="M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" fill="white"/><path d="M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0445 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" fill="white"/></svg>', dark: '<svg width="24" height="24" viewBox="0 0 28 28" fill="none" xmlns="http://www.w3.org/2000/svg"><rect width="28" height="28" rx="4" fill="white"/><path d="M10.5724 15.2565C10.5724 17.5025 9.6613 19.3778 8.17805 21.1047H11.6319L11.6319 22.7786H6.33459V21.1895C7.95557 19.3566 8.58065 17.8628 8.58065 15.2565L10.5724 15.2565Z" fill="black"/><path d="M17.4276 15.2565C17.4276 17.5025 18.3387 19.3778 19.822 21.1047H16.3681V22.7786H21.6654V21.1895C20.0444 19.3566 19.4194 17.8628 19.4194 15.2565H17.4276Z" fill="black"/><path d="M10.5724 12.7435C10.5724 10.4975 9.66131 8.62224 8.17807 6.89532L11.6319 6.89532V5.22137L6.33461 5.22137V6.81056C7.95558 8.64343 8.58066 10.1373 8.58066 12.7435L10.5724 12.7435Z" fill="black"/><path d="M17.4276 12.7435C17.4276 10.4975 18.3387 8.62224 19.822 6.89532L16.3681 6.89532L16.3681 5.22138L21.6654 5.22138V6.81056C20.0444 8.64343 19.4194 10.1373 19.4194 12.7435H17.4276Z" fill="black"/></svg>' },
75
75
  firecrawl: { light: '<svg width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="8 34 560 560" xmlns="http://www.w3.org/2000/svg"><g><g transform=" translate(293.035, 553.013) scale(0.97724, 0.97724) translate(-533.035, -800.013)"><path d=" M603.4 416.3 C581,433 586.6,450.2 583.9,466.6 C583.2,470.5 577.8,469.2 576.5,465.7 C559.5,447 549.5,423.6 559.3,394.4 C577.2,340.8 614.2,311.2 594.2,288.4 C591,284.8 591.8,284.3 590.2,288.8 C572.5,339 363,338 428,536 C430.9,544.8 430.2,555.2 429.5,565.8 C429.3,569 427.1,571.3 424.2,570.1 C401.5,560.8 395.4,525.8 390.4,516.3 C389,513.6 387.5,514.5 385.7,518 C381,524.1 377.9,532.3 374.2,538.5 C336.9,600.7 343.6,664.3 368,715 C368.9,716.9 369.9,718.7 370.9,720.6 C371.9,722.7 373.1,724.8 374.2,726.8 C391.8,758.3 416,783.8 439.8,799.3 C442.6,801.2 446.3,798.5 445.3,795.2 C437.1,767.6 642.8,744.8 634.7,795.2 C634.1,798.6 637.3,801.3 640.2,799.4 C659.9,786.5 680.2,766.8 695.2,742 C696.4,740 697.6,738 698.7,735.9 C699.5,734.5 700.2,733.1 701,731.6 C711.2,711.6 717.8,688.8 718.1,663.6 C718.3,643.8 714.6,622.5 705.5,600.1 C703.8,595.8 700.2,616.5 684.4,613.3 C682.9,613 691.2,586.1 692.1,570.6 C692.4,563.3 690.7,544.7 683.2,524.1 C667.8,481.1 615.5,466.2 609.6,417.3 C609.2,414.6 605.5,414.7 603.4,416.3z " fill="#fa5d19" fill-opacity="1" fill-rule="nonzero"></animate></path></g><g transform=" translate(300, 470.504) scale(0.9650799999999999, 0.9650799999999999) translate(-510.283, -685.815)"><path d=" M410.1 771.9 C412.9,773.7 416.6,771.1 415.6,767.8 C407.4,740.2 411.5,708.6 427.7,684.6 C455.3,643.2 510.6,603.1 501.8,548.7 C501.2,545.3 505.3,543 507.9,545.4 C546.9,581 554.6,629 548.2,672 C547.6,675.7 552.3,677.7 554.7,674.8 C560.6,667.3 567.9,660.7 575.9,655.8 C577.8,654.6 580.5,655.5 581.2,657.7 C594.2,695.6 617.7,725.6 605,767.8 C604,771.1 607.6,773.8 610.5,771.9 C610.5,771.9 610.5,827.2 610.5,827.2 C610.5,827.2 410.1,827.2 410.1,827.2 C410.1,827.2 410.1,771.9 410.1,771.9z " fill="#ffffff" fill-opacity="1" fill-rule="nonzero"></path></g></g></svg>', dark: '<svg width="24" height="24" preserveAspectRatio="xMidYMid meet" viewBox="8 34 560 560" xmlns="http://www.w3.org/2000/svg"><g><g transform=" translate(293.035, 553.013) scale(0.97724, 0.97724) translate(-533.035, -800.013)"><path d=" M603.4 416.3 C581,433 586.6,450.2 583.9,466.6 C583.2,470.5 577.8,469.2 576.5,465.7 C559.5,447 549.5,423.6 559.3,394.4 C577.2,340.8 614.2,311.2 594.2,288.4 C591,284.8 591.8,284.3 590.2,288.8 C572.5,339 363,338 428,536 C430.9,544.8 430.2,555.2 429.5,565.8 C429.3,569 427.1,571.3 424.2,570.1 C401.5,560.8 395.4,525.8 390.4,516.3 C389,513.6 387.5,514.5 385.7,518 C381,524.1 377.9,532.3 374.2,538.5 C336.9,600.7 343.6,664.3 368,715 C368.9,716.9 369.9,718.7 370.9,720.6 C371.9,722.7 373.1,724.8 374.2,726.8 C391.8,758.3 416,783.8 439.8,799.3 C442.6,801.2 446.3,798.5 445.3,795.2 C437.1,767.6 642.8,744.8 634.7,795.2 C634.1,798.6 637.3,801.3 640.2,799.4 C659.9,786.5 680.2,766.8 695.2,742 C696.4,740 697.6,738 698.7,735.9 C699.5,734.5 700.2,733.1 701,731.6 C711.2,711.6 717.8,688.8 718.1,663.6 C718.3,643.8 714.6,622.5 705.5,600.1 C703.8,595.8 700.2,616.5 684.4,613.3 C682.9,613 691.2,586.1 692.1,570.6 C692.4,563.3 690.7,544.7 683.2,524.1 C667.8,481.1 615.5,466.2 609.6,417.3 C609.2,414.6 605.5,414.7 603.4,416.3z " fill="#fa5d19" fill-opacity="1" fill-rule="nonzero"></animate></path></g><g transform=" translate(300, 470.504) scale(0.9650799999999999, 0.9650799999999999) translate(-510.283, -685.815)"><path d=" M410.1 771.9 C412.9,773.7 416.6,771.1 415.6,767.8 C407.4,740.2 411.5,708.6 427.7,684.6 C455.3,643.2 510.6,603.1 501.8,548.7 C501.2,545.3 505.3,543 507.9,545.4 C546.9,581 554.6,629 548.2,672 C547.6,675.7 552.3,677.7 554.7,674.8 C560.6,667.3 567.9,660.7 575.9,655.8 C577.8,654.6 580.5,655.5 581.2,657.7 C594.2,695.6 617.7,725.6 605,767.8 C604,771.1 607.6,773.8 610.5,771.9 C610.5,771.9 610.5,827.2 610.5,827.2 C610.5,827.2 410.1,827.2 410.1,827.2 C410.1,827.2 410.1,771.9 410.1,771.9z " fill="#0f172a" fill-opacity="1" fill-rule="nonzero"></path></g></g></svg>' },
76
+ // Vercel's mark is one triangle whose fill flips with the theme — their brand
77
+ // guidance is black on light and white on dark, so the two variants differ
78
+ // only in that fill, and the viewBox is the one their own asset pack ships
79
+ // (1155x1000) rather than a re-typed approximation of it.
80
+ // Supabase's mark is one artwork for both themes — the green reads on light
81
+ // and dark alike, which is what their own guidance assumes. Its gradient ids
82
+ // are namespaced: an inline SVG's `id` is document-global, so a bare
83
+ // `paint0_linear` would be captured by whichever mark rendered first.
84
+ supabase: { light: '<svg width="24" height="24" viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0625L99.1935 40.0625C107.384 40.0625 111.952 49.5226 106.859 55.9372L63.7076 110.284Z" fill="url(#supabase_a)"/><path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0625L99.1935 40.0625C107.384 40.0625 111.952 49.5226 106.859 55.9372L63.7076 110.284Z" fill="url(#supabase_b)" fill-opacity="0.2"/><path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/><defs><linearGradient id="supabase_a" x1="53.9738" y1="54.9738" x2="94.1635" y2="71.8293" gradientUnits="userSpaceOnUse"><stop stop-color="#249361"/><stop offset="1" stop-color="#3ECF8E"/></linearGradient><linearGradient id="supabase_b" x1="36.1558" y1="30.5779" x2="54.4844" y2="65.0804" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></linearGradient></defs></svg>', dark: '<svg width="24" height="24" viewBox="0 0 109 113" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0625L99.1935 40.0625C107.384 40.0625 111.952 49.5226 106.859 55.9372L63.7076 110.284Z" fill="url(#supabase_a)"/><path d="M63.7076 110.284C60.8481 113.885 55.0502 111.912 54.9813 107.314L53.9738 40.0625L99.1935 40.0625C107.384 40.0625 111.952 49.5226 106.859 55.9372L63.7076 110.284Z" fill="url(#supabase_b)" fill-opacity="0.2"/><path d="M45.317 2.07103C48.1765 -1.53037 53.9745 0.442937 54.0434 5.041L54.4849 72.2922H9.83113C1.64038 72.2922 -2.92775 62.8321 2.1655 56.4175L45.317 2.07103Z" fill="#3ECF8E"/><defs><linearGradient id="supabase_a" x1="53.9738" y1="54.9738" x2="94.1635" y2="71.8293" gradientUnits="userSpaceOnUse"><stop stop-color="#249361"/><stop offset="1" stop-color="#3ECF8E"/></linearGradient><linearGradient id="supabase_b" x1="36.1558" y1="30.5779" x2="54.4844" y2="65.0804" gradientUnits="userSpaceOnUse"><stop/><stop offset="1" stop-opacity="0"/></linearGradient></defs></svg>' },
85
+ vercel: { light: '<svg width="24" height="24" viewBox="0 0 1155 1000" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M577.344 0L1154.69 1000H0L577.344 0Z" fill="black"/></svg>', dark: '<svg width="24" height="24" viewBox="0 0 1155 1000" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M577.344 0L1154.69 1000H0L577.344 0Z" fill="white"/></svg>' },
86
+ // Neon ships one logomark in two greens — #37C38F for a light background,
87
+ // #34D59A for a dark one — which is the pair, not a tint we chose.
88
+ neon: { light: '<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63 0.0177909V63.5526L38.4178 42.2501V63.5526H0V0L63 0.0177909ZM7.72251 55.8389H30.6953V25.3238L55.2779 47.0476V7.72922L7.72251 7.71559V55.8389Z" fill="#37C38F"/></svg>', dark: '<svg width="24" height="24" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M63 0.0177909V63.5526L38.4178 42.2501V63.5526H0V0L63 0.0177909ZM7.72251 55.8389H30.6953V25.3238L55.2779 47.0476V7.72922L7.72251 7.71559V55.8389Z" fill="#34D59A"/></svg>' },
76
89
  github: { light: '<svg width="24" height="24" viewBox="0 0 98 96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#24292f"/></svg>', dark: '<svg width="24" height="24" viewBox="0 0 98 96" xmlns="http://www.w3.org/2000/svg"><path fill-rule="evenodd" clip-rule="evenodd" d="M48.854 0C21.839 0 0 22 0 49.217c0 21.756 13.993 40.172 33.405 46.69 2.427.49 3.316-1.059 3.316-2.362 0-1.141-.08-5.052-.08-9.127-13.59 2.934-16.42-5.867-16.42-5.867-2.184-5.704-5.42-7.17-5.42-7.17-4.448-3.015.324-3.015.324-3.015 4.934.326 7.523 5.052 7.523 5.052 4.367 7.496 11.404 5.378 14.235 4.074.404-3.178 1.699-5.378 3.074-6.6-10.839-1.141-22.243-5.378-22.243-24.283 0-5.378 1.94-9.778 5.014-13.2-.485-1.222-2.184-6.275.486-13.038 0 0 4.125-1.304 13.426 5.052a46.97 46.97 0 0 1 12.214-1.63c4.125 0 8.33.571 12.213 1.63 9.302-6.356 13.427-5.052 13.427-5.052 2.67 6.763.97 11.816.485 13.038 3.155 3.422 5.015 7.822 5.015 13.2 0 18.905-11.404 23.06-22.324 24.283 1.78 1.548 3.316 4.481 3.316 9.126 0 6.6-.08 11.897-.08 13.526 0 1.304.89 2.853 3.316 2.364 19.412-6.52 33.405-24.935 33.405-46.691C97.707 22 75.788 0 48.854 0z" fill="#ffffff"/></svg>' }
77
90
  };
78
91
 
@@ -40,6 +40,12 @@ export interface DbClientConnection {
40
40
  createdAt: string;
41
41
  updatedAt: string;
42
42
  lastUsedAt: string | null;
43
+ /**
44
+ * Set when this row was DERIVED from a connected account rather than typed
45
+ * into the form. Absent on an ordinary connection, so every existing caller
46
+ * is unaffected — see `shared/types/db-client/integrations.ts`.
47
+ */
48
+ managedBy?: import('./integrations').DbClientManagedBy | null;
43
49
  }
44
50
 
45
51
  export interface DbClientConnectionInput {
@@ -0,0 +1,192 @@
1
+ /**
2
+ * db-client — the connection as environment variables.
3
+ *
4
+ * A database is only useful to the project sitting next to it, and the step
5
+ * between "Clopen can reach this" and "my app can reach this" was a user
6
+ * retyping a host, a port, a password and an SSL mode into a dotenv file. This
7
+ * is the vocabulary for closing that gap: what the variables are called, which
8
+ * file they belong in, and what changing that file would do.
9
+ *
10
+ * The naming is the hard part, and it is NOT guessed. Projects split a database
11
+ * across `DB_HOST`/`DB_PASSWORD`, fold it into one `DATABASE_URL`, or call the
12
+ * same thing `POSTGRES_URL` because Vercel does — so the project's own files
13
+ * are read first and what they already use is what gets offered. A preset is
14
+ * the fallback for a project that has nothing yet, not the default answer.
15
+ *
16
+ * VALUES CROSS THIS LINE, unlike every other db-client type. A connection
17
+ * string the user cannot copy is a connection string that solves nothing, so
18
+ * the routes behind these shapes are access-gated instead — see
19
+ * `backend/ws/db-client/env.ts`.
20
+ */
21
+
22
+ import type { DbDriver } from './connection';
23
+
24
+ /** One variable holding everything, or one variable per field. */
25
+ export type DbEnvShape = 'url' | 'split';
26
+
27
+ /**
28
+ * What one variable HOLDS, independent of what it is called.
29
+ *
30
+ * The naming picker offers shapes and nothing else. An earlier version offered
31
+ * frameworks — Laravel, Prisma, libpq, Vercel — which was a list of guesses
32
+ * about projects it had already read: the real answer to "what are these
33
+ * called here" comes from `DbEnvExistingGroup`, which carries the project's own
34
+ * key names. A framework in a dropdown is that answer asserted instead.
35
+ */
36
+ export type DbEnvRole =
37
+ | 'url'
38
+ | 'altUrl'
39
+ | 'host'
40
+ | 'port'
41
+ | 'user'
42
+ | 'password'
43
+ | 'database'
44
+ | 'sslMode';
45
+
46
+ /** One of the two shapes, as the picker renders it. */
47
+ export interface DbEnvShapeInfo {
48
+ id: DbEnvShape;
49
+ label: string;
50
+ description: string;
51
+ /** The keys it writes, with the current prefix, for the picker to show. */
52
+ sampleKeys: string[];
53
+ }
54
+
55
+ export interface DbEnvVar {
56
+ key: string;
57
+ value: string;
58
+ /** True when the value carries a credential, so the panel masks it. */
59
+ isSecret: boolean;
60
+ /** One short clause, when the variable needs explaining. */
61
+ note?: string | null;
62
+ }
63
+
64
+ export interface DbEnvFileInfo {
65
+ name: string;
66
+ /** Read for its shape, never written — `.env.example` and friends. */
67
+ isTemplate: boolean;
68
+ /** git tracks it, so writing a password into it would commit one. */
69
+ isTracked: boolean;
70
+ /** Lower wins: `.env.local` beats `.env` in Next.js and Vite. */
71
+ precedence: number;
72
+ }
73
+
74
+ /**
75
+ * A naming convention the project is ALREADY using.
76
+ *
77
+ * The whole reason detection exists: offering to update `POSTGRES_URL` where
78
+ * the project has one beats adding a `DATABASE_URL` nothing reads.
79
+ */
80
+ export interface DbEnvExistingGroup {
81
+ prefix: string;
82
+ shape: DbEnvShape;
83
+ keys: string[];
84
+ /**
85
+ * Which of this group's keys holds what.
86
+ *
87
+ * The whole point of detection, and what replaced the framework presets: a
88
+ * project with `DB_USERNAME` gets `DB_USERNAME` written, not a `DB_USER`
89
+ * beside it that nothing reads.
90
+ */
91
+ keyMap: Partial<Record<DbEnvRole, string>>;
92
+ /** Which files carry these keys, most-precedent first. */
93
+ files: string[];
94
+ /** True when every occurrence is commented out — a template's documentation. */
95
+ isTemplateOnly: boolean;
96
+ /** How the row reads: "DATABASE_URL · .env.local". */
97
+ label: string;
98
+ }
99
+
100
+ export interface DbEnvDetection {
101
+ /** Null when no project is in scope; the panel then only offers copying. */
102
+ projectId: string | null;
103
+ projectName: string | null;
104
+ files: DbEnvFileInfo[];
105
+ /** What the project already uses, best first. Empty for a fresh project. */
106
+ existing: DbEnvExistingGroup[];
107
+ /** Where the names came from, for the sentence the panel shows. */
108
+ sources: string[];
109
+ }
110
+
111
+ /** Everything the panel needs to open. */
112
+ export interface DbEnvState {
113
+ connectionId: string;
114
+ connectionName: string;
115
+ driver: DbDriver;
116
+ /** The database in scope, when the panel was opened inside one. */
117
+ database: string | null;
118
+ shapes: DbEnvShapeInfo[];
119
+ detection: DbEnvDetection;
120
+ /** The shape, names and file the panel opens on. */
121
+ suggestion: {
122
+ shape: DbEnvShape;
123
+ prefix: string;
124
+ fileName: string | null;
125
+ /** The project's own names, when detection found a group to follow. */
126
+ keyMap: Partial<Record<DbEnvRole, string>> | null;
127
+ };
128
+ /** True when the provider can also hand back a direct/unpooled counterpart. */
129
+ hasAlternate: boolean;
130
+ /** What the counterpart is called where it exists — "Direct (unpooled)". */
131
+ alternateLabel: string | null;
132
+ /** Sentences shown above the variables: tunnels, localhost, derived rows. */
133
+ warnings: string[];
134
+ }
135
+
136
+ export type DbEnvDiffKind = 'context' | 'added' | 'removed';
137
+
138
+ export interface DbEnvDiffLine {
139
+ kind: DbEnvDiffKind;
140
+ text: string;
141
+ }
142
+
143
+ /** What applying would do, worked out without touching the file. */
144
+ export interface DbEnvPlan {
145
+ vars: DbEnvVar[];
146
+ /** The rendered fragment, ready to paste. */
147
+ text: string;
148
+ fileName: string | null;
149
+ fileExists: boolean;
150
+ /** git tracks the target, so applying needs an explicit override. */
151
+ fileTracked: boolean;
152
+ /** Keys replaced where the project already had them. */
153
+ updated: string[];
154
+ /** Keys the project lacks, bound for the managed block. */
155
+ appended: string[];
156
+ /** Keys already holding exactly this value. */
157
+ unchanged: string[];
158
+ diff: DbEnvDiffLine[];
159
+ warnings: string[];
160
+ }
161
+
162
+ export interface DbEnvApplyResult {
163
+ status: 'written' | 'unchanged' | 'skipped-tracked' | 'failed';
164
+ /** One sentence, naming what happened and what to do. Null when it worked. */
165
+ detail: string | null;
166
+ fileName: string;
167
+ updated: string[];
168
+ appended: string[];
169
+ }
170
+
171
+ /** What the panel sends for a preview, an apply, or an undo. */
172
+ export interface DbEnvRequest {
173
+ connectionId: string;
174
+ projectId?: string;
175
+ /**
176
+ * The database in scope.
177
+ *
178
+ * A connection with no database of its own browses one, and it is THAT one
179
+ * the project needs a URL for — the connection's own empty field would
180
+ * produce a string pointing at the server and no database.
181
+ */
182
+ database?: string;
183
+ shape: DbEnvShape;
184
+ prefix: string;
185
+ /** Exact names to use, overriding what the prefix would produce. */
186
+ keyMap?: Partial<Record<DbEnvRole, string>>;
187
+ fileName?: string;
188
+ /** Include the provider's direct/unpooled counterpart where one exists. */
189
+ includeAlternate?: boolean;
190
+ /** Write even though git tracks the file. The user has to have confirmed. */
191
+ allowTracked?: boolean;
192
+ }
@@ -4,3 +4,6 @@
4
4
 
5
5
  export * from './connection';
6
6
  export * from './query';
7
+ export * from './integrations';
8
+ export * from './env';
9
+ export * from './supabase';
@@ -0,0 +1,204 @@
1
+ /**
2
+ * db-client — account-backed connections.
3
+ *
4
+ * A connection can arrive two ways: typed into the form, or DERIVED from a
5
+ * connected third-party account. The second kind is a projection (see
6
+ * `backend/integrations/projections/`), and everything here is the vocabulary
7
+ * the panel needs to render one honestly: who owns it, which remote database it
8
+ * points at, and what the form is therefore not allowed to edit.
9
+ */
10
+
11
+ import type { DbDriver } from './connection';
12
+
13
+ /**
14
+ * How the connection reaches the database.
15
+ *
16
+ * A managed provider usually offers a pooled endpoint and a direct one. The
17
+ * trade-offs are real, but they are NOT a choice most users should be asked to
18
+ * make: for every provider so far exactly one mode is correct for a client like
19
+ * this, and the others exist for cases the default cannot reach.
20
+ *
21
+ * So `isDefault` is picked silently and `isAdvanced` marks the escape hatches,
22
+ * which the dialog keeps folded away. A form that opens with three radio
23
+ * buttons and three paragraphs asks the user to decide something they have no
24
+ * way to decide, before they have connected anything.
25
+ */
26
+ export interface DbConnectionModeInfo {
27
+ id: string;
28
+ label: string;
29
+ help: string;
30
+ /** Chosen without asking when the user has expressed no preference. */
31
+ isDefault?: boolean;
32
+ /** Hidden behind the dialog's Advanced disclosure. */
33
+ isAdvanced?: boolean;
34
+ }
35
+
36
+ /** One secret a link needs that the provider's API will not hand back. */
37
+ export interface DbLinkSecretField {
38
+ name: string;
39
+ label: string;
40
+ placeholder?: string;
41
+ help?: string;
42
+ isRequired: boolean;
43
+ }
44
+
45
+ /** A database provider as the link dialog renders it. */
46
+ export interface DbProviderInfo {
47
+ /** Matches the integration provider id, so the brand mark is the same one. */
48
+ id: string;
49
+ name: string;
50
+ driver: DbDriver;
51
+ modes: DbConnectionModeInfo[];
52
+ secretFields: DbLinkSecretField[];
53
+ /** Copy shown above the picker — where to find things, what will happen. */
54
+ description: string;
55
+ /**
56
+ * Where this provider's credential is created.
57
+ *
58
+ * Filled from the INTEGRATION registry rather than declared twice: the hub
59
+ * already knows every provider's `docsUrl`, and a second copy here would be
60
+ * the one that goes stale. It exists so the link dialog can point a user at
61
+ * the right page without naming a vendor in its own markup — which is how it
62
+ * ended up telling someone connecting Neon where Supabase tokens live.
63
+ */
64
+ docsUrl?: string;
65
+ /**
66
+ * The provider's dashboard, for the things Clopen cannot do.
67
+ *
68
+ * Every provider has some — Neon has no organisation endpoints at all,
69
+ * Supabase exposes no organisation update — and until now the dialog only
70
+ * SAID so. A sentence that names a place without offering to go there leaves
71
+ * the user to find it, which is the read-only-window feeling this surface
72
+ * exists to remove. Filled from the integration registry, like `docsUrl`.
73
+ */
74
+ consoleUrl?: string;
75
+ }
76
+
77
+ /** A remote database an account can reach but has not necessarily linked. */
78
+ export interface DbRemoteDatabase {
79
+ ref: string;
80
+ name: string;
81
+ /** Region, plan — whatever tells two similarly named databases apart. */
82
+ detail: string | null;
83
+ /**
84
+ * The owning container's name — Supabase's organisation, Turso's group.
85
+ *
86
+ * Separate from `detail` because it answers a different question: `detail`
87
+ * tells two similar rows apart, this one says which of the account's
88
+ * organisations will be billed for the row you are about to link.
89
+ */
90
+ group: string | null;
91
+ /** Provider-reported state; a paused project cannot be connected to. */
92
+ status: string | null;
93
+ /**
94
+ * Whether it can be connected to right now.
95
+ *
96
+ * The ADAPTER decides, because "ready" is provider vocabulary: Supabase says
97
+ * `ACTIVE_HEALTHY`, and a project that is still coming up reports a state
98
+ * that looks fine in a list and refuses every connection.
99
+ */
100
+ isReady: boolean;
101
+ /** True when this account already projects a connection for it. */
102
+ isLinked: boolean;
103
+ }
104
+
105
+ /**
106
+ * What the create-a-database form needs, fetched from the provider.
107
+ *
108
+ * Provider-agnostic on purpose even though Supabase is the only implementation:
109
+ * every managed provider asks the same two questions — which account or
110
+ * organisation owns it, and where it should live — and they only differ in what
111
+ * those are called. Neon calls them projects and regions, Turso calls them
112
+ * groups and locations.
113
+ */
114
+ /**
115
+ * One container a database could be created in.
116
+ *
117
+ * `isUnverified` is the honest middle ground between hiding a candidate and
118
+ * vouching for it. A token can be allowed to CREATE an organisation while being
119
+ * unable to READ one — they are separate permissions — so "we could not confirm
120
+ * this" is a real third state, and removing those options altogether took away
121
+ * a capability that may well work.
122
+ */
123
+ export interface DbProviderCreateGroup {
124
+ value: string;
125
+ label: string;
126
+ detail?: string | null;
127
+ /** True when the provider would not confirm this token can act in it. */
128
+ isUnverified?: boolean;
129
+ }
130
+
131
+ export interface DbProviderCreateOptions {
132
+ /** What the owning container is called here — "Organisation", "Team". */
133
+ groupLabel: string;
134
+ groups: DbProviderCreateGroup[];
135
+ regionLabel: string;
136
+ regions: { value: string; label: string }[];
137
+ /** One sentence naming what creating one actually costs. */
138
+ notice: string;
139
+ /** Shown instead of the form when `groups` is empty, naming the real cause. */
140
+ emptyGroupsNotice: string;
141
+ /** True when the provider can create the owning container from here too. */
142
+ canCreateGroup: boolean;
143
+ /** One sentence naming what creating a container costs. */
144
+ createGroupNotice: string;
145
+ /**
146
+ * What can and cannot be done to a container from here, in one sentence.
147
+ *
148
+ * Provider-declared because the answer is provider-specific and the reason
149
+ * is too: Supabase exposes no PATCH or DELETE for an organisation, so no
150
+ * permission would help, while Neon exposes no create either. Hard-coding
151
+ * one vendor's sentence made the dialog send a Neon user to Supabase's
152
+ * dashboard.
153
+ */
154
+ groupManagementNotice: string;
155
+ }
156
+
157
+ /** A link, as the panel sees it. Secret VALUES never cross this line. */
158
+ export interface DbAccountLinkInfo {
159
+ id: string;
160
+ accountId: string;
161
+ provider: string;
162
+ accountLabel: string;
163
+ remoteRef: string;
164
+ label: string;
165
+ driver: DbDriver;
166
+ mode: string;
167
+ /** The projected connection, or null when projection has not run yet. */
168
+ connectionId: string | null;
169
+ /** Which secret fields hold a value — never what they hold. */
170
+ configuredSecrets: string[];
171
+ detected: boolean;
172
+ }
173
+
174
+ /**
175
+ * Stamped onto a connection the panel did not create.
176
+ *
177
+ * Its presence is what makes the form read-only: the fields it describes are
178
+ * derived from the account, and editing them locally would produce a row that
179
+ * the next re-projection silently overwrites.
180
+ */
181
+ export interface DbClientManagedBy {
182
+ accountId: string;
183
+ provider: string;
184
+ providerName: string;
185
+ accountLabel: string;
186
+ linkId: string | null;
187
+ remoteRef: string | null;
188
+ /**
189
+ * True when the row existed before the account did. The panel says so,
190
+ * because disconnecting will hand it back rather than delete it.
191
+ */
192
+ adopted: boolean;
193
+ }
194
+
195
+ /** What DB Client knows about a Supabase-shaped connection. */
196
+ export interface SupabaseConnectionContext {
197
+ /** Project ref. Present for a linked project AND for a detected local stack. */
198
+ ref: string;
199
+ /** Null for a local stack with no connected account — API features are off. */
200
+ accountId: string | null;
201
+ projectName: string | null;
202
+ /** True when this is a `supabase start` stack on this machine. */
203
+ isLocal: boolean;
204
+ }
@@ -0,0 +1,131 @@
1
+ /**
2
+ * Supabase inside DB Client.
3
+ *
4
+ * The split that shapes every type here: ANYTHING INSIDE THE DATABASE IS READ
5
+ * OVER SQL through the connection DB Client already holds, and only what lives
6
+ * outside it goes to the Management API. Policies, applied migrations, storage
7
+ * buckets and auth users are all ordinary Postgres rows, so they keep working
8
+ * for a `supabase start` stack that has no access token at all. Edge functions,
9
+ * generated types and the security advisor have no SQL equivalent, so they are
10
+ * the ones that go dark without an account, and each says so.
11
+ */
12
+
13
+ export interface SupabaseMigration {
14
+ version: string;
15
+ name: string | null;
16
+ /** True when the version is recorded in `supabase_migrations.schema_migrations`. */
17
+ isApplied: boolean;
18
+ /** Path of the local file, when the repository has one for this version. */
19
+ path: string | null;
20
+ /** Bytes of SQL in the local file. Null when only the remote knows this version. */
21
+ size: number | null;
22
+ }
23
+
24
+ export interface SupabaseMigrationsReport {
25
+ migrations: SupabaseMigration[];
26
+ /** Absolute path scanned for local migrations, or null when there is no project. */
27
+ localDir: string | null;
28
+ /** True when the remote has versions the working tree does not — someone else pushed. */
29
+ hasRemoteOnly: boolean;
30
+ }
31
+
32
+ export interface SupabasePolicy {
33
+ schema: string;
34
+ table: string;
35
+ name: string;
36
+ /** PERMISSIVE or RESTRICTIVE. */
37
+ permissive: string;
38
+ /** SELECT / INSERT / UPDATE / DELETE / ALL. */
39
+ command: string;
40
+ roles: string[];
41
+ using: string | null;
42
+ withCheck: string | null;
43
+ }
44
+
45
+ export interface SupabaseTableRls {
46
+ schema: string;
47
+ table: string;
48
+ rlsEnabled: boolean;
49
+ policyCount: number;
50
+ }
51
+
52
+ /** One finding from `/advisors/security`. Account-only — there is no SQL for it. */
53
+ export interface SupabaseAdvisorLint {
54
+ name: string;
55
+ title: string;
56
+ level: string;
57
+ facing: string;
58
+ description: string;
59
+ detail: string | null;
60
+ remediation: string | null;
61
+ /** Which object the lint is about, when it names one. */
62
+ target: string | null;
63
+ }
64
+
65
+ export interface SupabaseRlsReport {
66
+ tables: SupabaseTableRls[];
67
+ policies: SupabasePolicy[];
68
+ /** Empty when there is no account to ask; `advisorError` then says why. */
69
+ lints: SupabaseAdvisorLint[];
70
+ advisorError: string | null;
71
+ }
72
+
73
+ export interface SupabaseEdgeFunction {
74
+ id: string;
75
+ slug: string;
76
+ name: string;
77
+ status: string;
78
+ version: number | null;
79
+ createdAt: string | null;
80
+ updatedAt: string | null;
81
+ verifyJwt: boolean | null;
82
+ entrypointPath: string | null;
83
+ /** True when this came from the working tree rather than the remote. */
84
+ isLocal: boolean;
85
+ }
86
+
87
+ export interface SupabaseBucket {
88
+ id: string;
89
+ name: string;
90
+ isPublic: boolean;
91
+ fileSizeLimit: number | null;
92
+ allowedMimeTypes: string[] | null;
93
+ objectCount: number | null;
94
+ createdAt: string | null;
95
+ updatedAt: string | null;
96
+ }
97
+
98
+ export interface SupabaseAuthUser {
99
+ id: string;
100
+ email: string | null;
101
+ phone: string | null;
102
+ providers: string[];
103
+ createdAt: string | null;
104
+ lastSignInAt: string | null;
105
+ confirmedAt: string | null;
106
+ isBanned: boolean;
107
+ }
108
+
109
+ export interface SupabaseAuthUsersPage {
110
+ users: SupabaseAuthUser[];
111
+ total: number;
112
+ }
113
+
114
+ /**
115
+ * What the Management API last said about the remaining request budget.
116
+ *
117
+ * Null means "not reported", never "none left" — Supabase only sends these
118
+ * headers on some responses, and a surface that rendered absence as zero would
119
+ * alarm people about a limit they are nowhere near.
120
+ */
121
+ export interface SupabaseRateLimitInfo {
122
+ remaining: number;
123
+ limit: number;
124
+ resetAt: string | null;
125
+ }
126
+
127
+ export interface SupabaseTypesResult {
128
+ types: string;
129
+ /** Where it would be written, resolved against the project root. */
130
+ suggestedPath: string;
131
+ }