@protobase/cli 0.58.7 → 0.59.0

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 (99) hide show
  1. package/dist/cli/package.js +1 -1
  2. package/dist/dev/api-websockets.js +1 -1
  3. package/dist/dev/entry.js +4 -1
  4. package/dist/migration/load-project.js +4 -1
  5. package/dist/serve/lifecycle.js +4 -1
  6. package/dist/supabase/auth-config.js +6 -3
  7. package/package.json +7 -7
  8. package/skills/protobase/SKILL.md +1 -0
  9. package/skills/protobase/references/features/access.md +1 -1
  10. package/skills/protobase/references/features/actions.md +1 -1
  11. package/skills/protobase/references/features/ai.md +1 -1
  12. package/skills/protobase/references/features/api-functions.md +1 -1
  13. package/skills/protobase/references/features/build-and-run.md +1 -1
  14. package/skills/protobase/references/features/calls.md +1 -1
  15. package/skills/protobase/references/features/compatibility.md +1 -1
  16. package/skills/protobase/references/features/composed-pages.md +1 -1
  17. package/skills/protobase/references/features/data-model.md +1 -1
  18. package/skills/protobase/references/features/email-and-public-forms.md +1 -1
  19. package/skills/protobase/references/features/events-webhooks-and-jobs.md +1 -1
  20. package/skills/protobase/references/features/files-and-images.md +1 -1
  21. package/skills/protobase/references/features/history-comments-and-live-updates.md +3 -1
  22. package/skills/protobase/references/features/list-displays.md +1 -1
  23. package/skills/protobase/references/features/lists.md +1 -1
  24. package/skills/protobase/references/features/look-and-language.md +1 -1
  25. package/skills/protobase/references/features/navigation.md +1 -1
  26. package/skills/protobase/references/features/notifications.md +1 -1
  27. package/skills/protobase/references/features/record-pages.md +1 -1
  28. package/skills/protobase/references/features/releases.md +1 -1
  29. package/skills/protobase/references/features/rest-api.md +1 -1
  30. package/skills/protobase/references/features/several-apps.md +1 -1
  31. package/skills/protobase/references/features/sign-in-and-accounts.md +1 -1
  32. package/skills/protobase/references/features/start-a-project.md +1 -1
  33. package/skills/protobase/references/features/your-own-code.md +1 -1
  34. package/skills/protobase/references/features.md +1 -1
  35. package/skills/protobase/references/getting-started.md +2 -2
  36. package/skills/protobase/references/guides/api-functions.md +3 -2
  37. package/skills/protobase/references/guides/billing-page.md +1 -1
  38. package/skills/protobase/references/guides/create-page.md +1 -1
  39. package/skills/protobase/references/guides/deploy.md +1 -1
  40. package/skills/protobase/references/guides/existing-database.md +1 -1
  41. package/skills/protobase/references/guides/export-a-list.md +1 -1
  42. package/skills/protobase/references/guides/field-type.md +1 -1
  43. package/skills/protobase/references/guides/first-composed-page.md +1 -1
  44. package/skills/protobase/references/guides/first-plugin.md +1 -1
  45. package/skills/protobase/references/guides/import-records.md +1 -1
  46. package/skills/protobase/references/guides/mobile-app.md +1 -1
  47. package/skills/protobase/references/guides/personal-setting.md +1 -1
  48. package/skills/protobase/references/guides/plugin-build.md +1 -1
  49. package/skills/protobase/references/guides/push-notifications.md +1 -1
  50. package/skills/protobase/references/guides/record-card.md +1 -1
  51. package/skills/protobase/references/guides/remote-resources.md +1 -1
  52. package/skills/protobase/references/guides/table-to-admin.md +1 -1
  53. package/skills/protobase/references/guides/theme-an-app.md +1 -1
  54. package/skills/protobase/references/reference/access.md +1 -1
  55. package/skills/protobase/references/reference/ai.md +1 -1
  56. package/skills/protobase/references/reference/api.md +1 -1
  57. package/skills/protobase/references/reference/app-identity.md +1 -1
  58. package/skills/protobase/references/reference/architecture.md +3 -3
  59. package/skills/protobase/references/reference/assistant.md +1 -1
  60. package/skills/protobase/references/reference/auth.md +5 -4
  61. package/skills/protobase/references/reference/blocks.md +1 -1
  62. package/skills/protobase/references/reference/bottom-bar.md +1 -1
  63. package/skills/protobase/references/reference/calls.md +1 -1
  64. package/skills/protobase/references/reference/channels.md +93 -0
  65. package/skills/protobase/references/reference/cli.md +2 -2
  66. package/skills/protobase/references/reference/client.md +2 -2
  67. package/skills/protobase/references/reference/comments.md +1 -1
  68. package/skills/protobase/references/reference/config/admin-app.md +1 -1
  69. package/skills/protobase/references/reference/config/api.md +2 -2
  70. package/skills/protobase/references/reference/config/app.md +1 -1
  71. package/skills/protobase/references/reference/config/files.md +1 -1
  72. package/skills/protobase/references/reference/config/jobs-and-events.md +1 -1
  73. package/skills/protobase/references/reference/config/sign-in.md +4 -4
  74. package/skills/protobase/references/reference/config.md +1 -1
  75. package/skills/protobase/references/reference/custom-components.md +1 -1
  76. package/skills/protobase/references/reference/data-config.md +1 -1
  77. package/skills/protobase/references/reference/email.md +1 -1
  78. package/skills/protobase/references/reference/events.md +1 -1
  79. package/skills/protobase/references/reference/files.md +1 -1
  80. package/skills/protobase/references/reference/forms.md +1 -1
  81. package/skills/protobase/references/reference/history.md +1 -1
  82. package/skills/protobase/references/reference/installable-app.md +1 -1
  83. package/skills/protobase/references/reference/jobs.md +1 -1
  84. package/skills/protobase/references/reference/languages.md +1 -1
  85. package/skills/protobase/references/reference/layouts.md +1 -1
  86. package/skills/protobase/references/reference/live.md +4 -2
  87. package/skills/protobase/references/reference/mcp.md +1 -1
  88. package/skills/protobase/references/reference/notifications.md +1 -1
  89. package/skills/protobase/references/reference/plugins.md +1 -1
  90. package/skills/protobase/references/reference/remote-resources.md +1 -1
  91. package/skills/protobase/references/reference/sidebar.md +1 -1
  92. package/skills/protobase/references/reference/supabase-realtime.md +2 -2
  93. package/skills/protobase/references/reference/supabase-rest.md +1 -1
  94. package/skills/protobase/references/reference/supabase-storage.md +1 -1
  95. package/skills/protobase/references/reference/theme.md +1 -1
  96. package/skills/protobase/references/reference/ui-config.md +1 -1
  97. package/skills/protobase/references/reference/user-menu.md +1 -1
  98. package/skills/protobase/references/reference/versioning.md +1 -1
  99. package/skills/protobase/references/reference/webhooks.md +1 -1
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/bottom-bar.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/bottom-bar.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Bottom bar
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/calls.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/calls.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Calls
4
4
 
@@ -0,0 +1,93 @@
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/channels.mdx: run `bun run docs:skill`, do not edit. -->
2
+
3
+ # Channels
4
+
5
+ Every record has a channel, where the pages that have it open see who else is there and send each other short-lived events, for whoever may read the record.
6
+
7
+ Every record of the app has a channel. The pages on it see who else is there and what each of them tracks, such as online or away (presence), and send each other events that are never stored, such as typing (broadcasts). Whoever may read the record may join its channel; nothing else needs to be set up. A record everyone may read, a visitor of the anonymous role included, makes an open channel.
8
+
9
+ :::caution[Beta]
10
+ SQL cannot send to a channel, and a broadcast carries JSON only, not binary bytes.
11
+ :::
12
+
13
+ ## From a page
14
+
15
+ `client.channel(resource, key)` of [`@protobase/client`](client.md) joins the record's channel:
16
+
17
+ ```ts
18
+ const room = client.channel('rooms', 42)
19
+
20
+ room.onStatus((status) => console.log(status.state))
21
+ room.onPresence((entries) => console.log(entries.map((entry) => `${entry.user}: ${JSON.stringify(entry.state)}`)))
22
+ room.on('typing', ({ user, payload }) => console.log(user, 'is typing', payload))
23
+
24
+ await room.track({ status: 'online' })
25
+ await room.send('typing', { on: true })
26
+
27
+ room.leave()
28
+ ```
29
+
30
+ | | |
31
+ | --- | --- |
32
+ | `status()`, `onStatus(listener)` | `joining`, also while the connection is down; `joined`; `refused`, with its `error`, for a record there is none of or the caller may not read; `closed`, with its `error`, when the server left the channel, such as once the caller may no longer read the record. A refused or closed channel is not joined again. |
33
+ | `presence()`, `onPresence(listener)` | Every connection on the channel that tracks a state, this one included, as `{ id, user, state }`; the listener gets the whole presence and, for a change, its `{ joins, updates, leaves }`. |
34
+ | `track(state)`, `untrack()` | Tracks this connection's JSON state on the channel, replaces it, or takes it out. A state tracked before the channel joined is tracked once it does, and again after a reconnect. |
35
+ | `send(event, payload, { self?, ack? })` | Broadcasts a JSON payload to the others on the channel; `self` hears it too, and with `ack` it resolves once the server took it, or rejects with a `ChannelRefusal`. |
36
+ | `on(event, listener)` | Hears the channel's broadcasts of `event`, each `{ event, payload, user }`, and `server: true` for one the app's own code sent. |
37
+ | `leave()` | Lets the channel go. |
38
+
39
+ Every channel of one client shares one WebSocket, opened with the first channel and closed after the last, and connects again by itself after a drop, joining its channels again. With [live updates](live.md#the-stream), a page holds two connections however many live views and channels it has.
40
+
41
+ ## Access
42
+
43
+ A caller may join a record's channel when they may read the record, as `GET /api/v1/<resource>/<key>` decides it: the resource's read access, the tenant, the row filter and a record-level read rule. Anyone else is refused with `not-found`, `There is no such record`, exactly as for a key or a resource the app does not have, so a channel tells nobody which records there are. A soft-deleted record has no channel.
44
+
45
+ Access holds while joined. A broadcast or a track trusts the last check for 5 seconds, and is checked again after that. Every 10 seconds, the server checks the connection's session again, and the read access to each of its channels' records. A member who may no longer read a record is out of its channel within 10 seconds: it gets `closed` with `not-found`, its presence leaves, and it hears nothing more. A session that signs in nobody any more, or someone else, closes the socket with `1008`.
46
+
47
+ `user` on every presence and broadcast is the user's id, from the session, `null` for a visitor; the server never takes it from what the client sends.
48
+
49
+ ## Presence
50
+
51
+ A connection tracks one state on each channel, at most 10 000 bytes of JSON, and an entry keeps its `id` while it is tracked: tracking again is an update. A joining connection gets the channel's whole presence, then each join, update and leave.
52
+
53
+ An entry leaves at once when its connection leaves the channel or closes, as when its page closes, and within 12 seconds when its connection drops without closing, as when the network goes away: the client pings every 5 seconds, and the server closes a connection it heard nothing from for 12 seconds. A client that hears no answer to its pings for 10 seconds connects again.
54
+
55
+ ## Broadcasts
56
+
57
+ A broadcast reaches every other connection on the channel, and the sender's own with `self`, at once. Nothing is stored: a broadcast reaches who is on the channel when it is sent, and nobody else. <gap>A broadcast cannot carry binary bytes because binary frames on record channels are not implemented.</gap>
58
+
59
+ ## From the server
60
+
61
+ An [API function](../guides/api-functions.md) broadcasts with its context's `channels`, as the server: its broadcasts have `user: null` and `server: true`, and it needs no read access. It rejects with a `404` problem for a resource or key the app does not have, `422` for an event over 255 bytes or a payload over 256 KiB, and `429` over the channel's broadcasts.
62
+
63
+ ```ts
64
+ import { defineFunction } from '@protobase/server'
65
+
66
+ export default defineFunction(async (request, { channels }) => {
67
+ await channels.broadcast({ resource: 'rooms', key: '42', event: 'announcement', payload: { text: 'Standup in 5 minutes' } })
68
+ return new Response(null, { status: 204 })
69
+ })
70
+ ```
71
+
72
+ `POST /api/channels/<resource>/<key>/broadcast` with `{ "event": "…", "payload": … }` broadcasts as its caller, who must read the record, under the same limits, answered `202`. <gap>SQL cannot broadcast to a channel because a database send for record channels is not implemented.</gap>
73
+
74
+ ## The socket
75
+
76
+ `GET /api/channels` is the WebSocket `@protobase/client` opens, with the subprotocol `protobase.channels`. A browser opens it with its session cookie; a client with a bearer token offers it as a second subprotocol, `bearer.<token>`, and hands over a new one with `{ "type": "token", "token": "…" }`, which the next check of the session uses. A page of another origin than the app's is refused with `403`. Each frame is JSON text:
77
+
78
+ | The client sends | |
79
+ | --- | --- |
80
+ | `{ type: 'join', ref, resource, key }` | Its reply names the `channel`, `<resource>/<key>`, that the other messages use, then a `presence` message has the whole presence. |
81
+ | `{ type: 'track', ref, channel, state }`, `{ type: 'untrack', ref, channel }` | |
82
+ | `{ type: 'send', ref, channel, event, payload, self?, ack? }` | Gets a reply when refused, and with `ack` when taken. |
83
+ | `{ type: 'leave', ref, channel }`, `{ type: 'ping' }` | A ping is answered with `{ type: 'pong' }`. |
84
+
85
+ The server sends `reply` (`{ ref, ok: true }` or `{ ref, ok: false, error: { code, message } }`), `presence` (`{ channel, entries }`), `presence_diff` (`{ channel, joins, updates, leaves }`), `broadcast` (`{ channel, event, payload, user, server? }`), `closed` (`{ channel, error }`) and `error` for a frame that is no message.
86
+
87
+ ## Limits
88
+
89
+ They are the limits of the [Realtime-compatible socket](supabase-realtime.md#broadcast-and-presence), apart from the shorter idle time. A connection sends at most 100 broadcasts and presence updates a second (`too-many-messages`), joins at most 100 times a second (`too-many-joins`) and holds at most 100 channels (`too-many-channels`); on each channel it tracks or untracks at most 5 times in 30 seconds (`too-many-presence-updates`). A channel takes 100 broadcasts a second, every sender's together (`channel-too-busy`). A channel name, `<resource>/<key>`, is at most 255 bytes (`name-too-long`), an event at most 255 bytes (`event-too-long`) and a tracked state at most 10 000 bytes of JSON (`presence-too-large`). A refused message goes to no one. A frame over 256 KiB closes the socket with `1009`; it closes with `1008` when the client leaves more than 4 MiB unread, or sends more than 300 messages or 4 MiB while earlier ones wait.
90
+
91
+ ## Several processes
92
+
93
+ With [`realtime: { processes: 'many' }`](config/api.md#realtime), the channels of a record meet whichever process each connection joined: presence and broadcasts go between the processes through the `realtime_relay` schema, as the [Realtime-compatible socket's do](supabase-realtime.md#several-processes), within about 100 ms, and a channel's 100 broadcasts a second are counted across all of them. The record channels and the compatible socket's topics never hear each other, whatever their names. The presence of a process that is killed leaves about 15 to 20 seconds after its last heartbeat. The serve runtime needs WebSockets of npm `ws`, as for the compatible socket: `protobase dev` and `protobase serve` have them.
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/cli.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/cli.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # CLI
4
4
 
@@ -571,7 +571,7 @@ protobase import supabase [<connection> | --source-env <variable>] [--env DATABA
571
571
 
572
572
  Turns a Supabase project's database into the project in the current directory, in two runs with the project's migrations between them. It needs PostgreSQL's `pg_dump` and `psql` on `PATH`, of the Supabase database's major version or newer, and reads the `.env` nearest the current directory for the project's database (`--env`).
573
573
 
574
- 1. **The first run** takes the Supabase database's connection string, for its `postgres` role (the session pooler's or the direct one; the transaction pooler cannot hold the snapshot the dumps share). It fails unless the database has Supabase's `auth` and `storage` schemas and its `supabase_admin` role, and while `auth.users` has single sign-on (SAML) users, which Supabase opens only through their identity provider and Better Auth would find by email, so the import cannot carry them over. It then says how many share their address with another user and how many have one of their own, and prints `select id, email from auth.users where is_sso_user` to list them rather than their addresses. Deleting a user in Supabase deletes or breaks the app's rows that reference it, so what to do about these users is the developer's decision, made in Supabase before importing again. It notes the Supabase CLI's `supabase/config.toml`, `supabase/migrations/` and `supabase/functions/` when the checkout has them. It converts `supabase/functions` into the project's `functions/` (see [functions moved from Supabase](../guides/api-functions.md#functions-moved-from-supabase)): `Deno.serve(handler)` and std's `serve(handler)` become `export default defineFunction({ supabase: true }, { fetch: handler })`, an existing default export is wrapped the same way, so each function also answers at `/api/sb/functions/v1/<name>`, `npm:`, `jsr:` and esm.sh imports become bare imports of packages it adds to `package.json`, `Deno.env.get(name)` becomes `process.env[name]`, `EdgeRuntime.waitUntil` becomes `waitUntil` of `@protobase/server`, a function with `verify_jwt = false` in `config.toml` becomes public (`{ public: true, supabase: true }`), and `_shared` and the like are converted beside them. It stops before anything else when `functions/` already has one of their names. It dumps `auth`, `storage` and every schema the app made, schema and data apart, as of one snapshot, leaving out the platform's own migration tables, and writes the schemas as the project's next migration, `NNN_supabase_schema.sql`. It asks the project's database which of the app's extensions its role may create, by trying each in a transaction it rolls back: Postgres alone allows the trusted ones, Supabase's Postgres image all it allowlists, such as pg_net, pgmq and Vault. The migration creates those first, then, where pg_net is among them and the app has Database Webhooks, the `supabase_functions.http_request` function their triggers call, over pg_net; then the dump without what fails there, as comments: grants and default privileges for `dashboard_user`, `supabase_*`, `authenticator` and `postgres`, statements about the `public` schema, Realtime's publication, pgsodium's security labels, the views that decrypt with it and the triggers that encrypt with it, database webhooks without pg_net, functions in plv8, plls or plcoffee where the database has no such language, and a timescaledb hypertable's insert-blocking trigger. It then writes `NNN_supabase_users.sql`, the nullable columns Better Auth needs on `auth.users` (`name`, `email_verified`, `image`, `app_role`, `banned`, `ban_reason`, `ban_expires`) and GoTrue's `'authenticated'` as the default of `role` and `aud`. It writes `NNN_supabase_realtime.sql`, which makes `realtime.messages`, `realtime.topic()`, and Supabase's `realtime.send()` and `realtime.broadcast_changes()`, so the app's triggers and SQL keep [broadcasting from the database](supabase-realtime.md#broadcast-from-the-database), with the source's row security policies on `realtime.messages`, so its [private channels](supabase-realtime.md#private-channels) keep their access; a policy that names only Supabase's own roles is left out as a comment. It points the app at `auth.users`: the `auth` of `protobase.config.ts` gets `users: { table: 'users', columns: { role: 'app_role' }, metadata: 'raw_user_meta_data' }`, `passwordHashes: ['bcrypt']` and `generateUserId: 'uuid'`, or the config gets an `auth` of them when it has none (see [an existing users table](auth.md#an-existing-users-table)). It removes the migrations `protobase auth migration` or `protobase migration` wrote for Protobase's own user table, since `auth.users` replaces it, and stops before writing anything when the project has no `protobase.config.ts`, or one whose `auth` is not an object it can see, or when the project's database has a schema the dump creates already, such as the `auth` schema those migrations made. The project's database needs the roles `anon`, `authenticated` and `service_role` that the dump's grants and policies name; the command makes them when its role may, and otherwise stops, naming them. The data dump goes to `supabase-import/`, which it adds to `.gitignore`, since it holds every row and the users' password hashes. Where the project's database can create Vault, pgmq and pg_cron, `supabase-import/replay.sql` holds what a dump cannot carry: Vault's secrets with their values, read decrypted since only Supabase's key opens their ciphertext, pgmq's queues with their messages, since pgmq owns their tables, and pg_cron's jobs, which live in its own schema.
574
+ 1. **The first run** takes the Supabase database's connection string, for its `postgres` role (the session pooler's or the direct one; the transaction pooler cannot hold the snapshot the dumps share). It fails unless the database has Supabase's `auth` and `storage` schemas and its `supabase_admin` role, and while `auth.users` has single sign-on (SAML) users, which Supabase opens only through their identity provider and Better Auth would find by email, so the import cannot carry them over. It then says how many share their address with another user and how many have one of their own, and prints `select id, email from auth.users where is_sso_user` to list them rather than their addresses. Deleting a user in Supabase deletes or breaks the app's rows that reference it, so what to do about these users is the developer's decision, made in Supabase before importing again. It notes the Supabase CLI's `supabase/config.toml`, `supabase/migrations/` and `supabase/functions/` when the checkout has them. It converts `supabase/functions` into the project's `functions/` (see [functions moved from Supabase](../guides/api-functions.md#functions-moved-from-supabase)): `Deno.serve(handler)` and std's `serve(handler)` become `export default defineFunction({ supabase: true }, { fetch: handler })`, an existing default export is wrapped the same way, so each function also answers at `/api/sb/functions/v1/<name>`, `npm:`, `jsr:` and esm.sh imports become bare imports of packages it adds to `package.json`, `Deno.env.get(name)` becomes `process.env[name]`, `EdgeRuntime.waitUntil` becomes `waitUntil` of `@protobase/server`, a function with `verify_jwt = false` in `config.toml` becomes public (`{ public: true, supabase: true }`), and `_shared` and the like are converted beside them. It stops before anything else when `functions/` already has one of their names. It dumps `auth`, `storage` and every schema the app made, schema and data apart, as of one snapshot, leaving out the platform's own migration tables, and writes the schemas as the project's next migration, `NNN_supabase_schema.sql`. It asks the project's database which of the app's extensions its role may create, by trying each in a transaction it rolls back: Postgres alone allows the trusted ones, Supabase's Postgres image all it allowlists, such as pg_net, pgmq and Vault. The migration creates those first, then, where pg_net is among them and the app has Database Webhooks, the `supabase_functions.http_request` function their triggers call, over pg_net; then the dump without what fails there, as comments: grants and default privileges for `dashboard_user`, `supabase_*`, `authenticator` and `postgres`, statements about the `public` schema, Realtime's publication, pgsodium's security labels, the views that decrypt with it and the triggers that encrypt with it, database webhooks without pg_net, functions in plv8, plls or plcoffee where the database has no such language, and a timescaledb hypertable's insert-blocking trigger. It then writes `NNN_supabase_users.sql`, the nullable columns Better Auth needs on `auth.users` (`name`, `email_verified`, `image`, `app_role`, `banned`, `ban_reason`, `ban_expires`) and GoTrue's `'authenticated'` as the default of `role` and `aud`. It writes `NNN_supabase_realtime.sql`, which makes `realtime.messages`, `realtime.topic()`, and Supabase's `realtime.send()` and `realtime.broadcast_changes()`, so the app's triggers and SQL keep [broadcasting from the database](supabase-realtime.md#broadcast-from-the-database), with the source's row security policies on `realtime.messages`, so its [private channels](supabase-realtime.md#private-channels) keep their access; a policy that names only Supabase's own roles is left out as a comment. It points the app at `auth.users`: the `auth` of `protobase.config.ts` gets `users: { table: 'users', columns: { role: 'app_role' }, metadata: 'raw_user_meta_data', guardedSchemas: ['auth'] }`, `passwordHashes: ['bcrypt']` and `generateUserId: 'uuid'`, or the config gets an `auth` of them when it has none (see [an existing users table](auth.md#an-existing-users-table)). It removes the migrations `protobase auth migration` or `protobase migration` wrote for Protobase's own user table, since `auth.users` replaces it, and stops before writing anything when the project has no `protobase.config.ts`, or one whose `auth` is not an object it can see, or when the project's database has a schema the dump creates already, such as the `auth` schema those migrations made. The project's database needs the roles `anon`, `authenticated` and `service_role` that the dump's grants and policies name; the command makes them when its role may, and otherwise stops, naming them. The data dump goes to `supabase-import/`, which it adds to `.gitignore`, since it holds every row and the users' password hashes. Where the project's database can create Vault, pgmq and pg_cron, `supabase-import/replay.sql` holds what a dump cannot carry: Vault's secrets with their values, read decrypted since only Supabase's key opens their ciphertext, pgmq's queues with their messages, since pgmq owns their tables, and pg_cron's jobs, which live in its own schema.
575
575
  2. **Apply the migration** with the project's other migrations, such as `bun run db:migrate`.
576
576
  3. **The second run**, without a connection string, loads the data in one transaction, with the app's triggers off so a sign-up trigger on `auth.users` does not run again for users who already have their rows, and fails the transaction unless every table holds the source's number of rows. In the same transaction it makes Vault's secrets and pgmq's queues again through `vault.create_secret`, `pgmq.create` and `pgmq.send`, each message with its headers and the time it becomes visible. Where the project's database has pg_cron, as Supabase's Postgres image does when it serves that database, it schedules pg_cron's jobs again there with `cron.schedule`, run by the importing role, an inactive one inactive. Elsewhere it writes each job of plain SQL as a [recurring job](jobs.md#recurring-jobs) of its own in `jobs/`, of the same name, schedule and `cron.timezone`, that runs its SQL as the app's database role, tried once each time as pg_cron did, and declares it in the `jobs` of `protobase.config.ts` (or writes one); they run once [`migration`](#migration) has added the jobs schema. Recurring jobs wake an app that sleeps, so they run where a host stops an idle app too. A job that calls what the database lacks, such as pg_net's `net.http_*`, `cron` or Vault, an inactive one and a schedule recurring jobs do not take, such as `30 seconds` or `$`, stay in the report, as does a job of another database. It loads only into empty tables, deletes the data dump and the replay, runs [`scaffold`](#scaffold) on the imported tables of the app's schemas (not `auth` or `storage`), giving the tables of the `supabase_realtime` publication [`.live()`](live.md) so [`/api/sb/realtime/v1`](supabase-realtime.md) keeps sending their `postgres_changes` once [`migration`](#migration) has written their capture triggers, writes Better Auth's other tables next to `auth.users` as [`auth migration`](#auth-migration) does (`NNN_auth.sql`), then `NNN_supabase_accounts.sql`, and writes `supabase-import/report.md`: the rows loaded, the API keys `/api/sb` needs and the `createClient` change to the app's `/api/sb` and its publishable key, the imported tables' size against the Starter plan's 500 MB, each sign-in provider's identities, what it made again, the tables it made live, and what needs a person: the pg_cron jobs it could not carry over, each with why, Realtime tables it made no resource of, Vault secrets by name and pgmq queues where the database has no such extension (and partitioned queues), the columns pgsodium encrypts, still holding Supabase's ciphertext, whose values to export decrypted in Supabase before declaring them [`.encrypted()`](data-config.md#encrypted-fields) and running [`encryption apply`](#encryption-apply), the extensions it cannot create, hypertables and plv8, plls or plcoffee functions to convert, triggers that call out over HTTP without pg_net, the converted Edge Functions with the packages to install and the code the conversion left (`deno.land/x` imports, Deno's file, KV and WebSocket APIs, `Supabase.ai`), and the indexes [`doctor`](#doctor) finds missing. `NNN_supabase_accounts.sql` fills the user columns from what Supabase Auth recorded and leaves them empty where it recorded nothing: the name from `raw_user_meta_data`'s `full_name` or `name`, the picture from its `avatar_url` or `picture`, `email_verified` from `email_confirmed_at`, and a ban from `banned_until`, which Better Auth lifts once it has passed. It gives each password of a confirmed address, as Supabase hashed it, a `credential` account (a user who never confirmed theirs signs in by code or resets the password, since GoTrue refused their password sign-in too), and each identity of a social provider an account under Better Auth's name for it (`azure` is `microsoft`, keyed on the `oid` claim; `linkedin_oidc` is `linkedin`, `slack_oidc` is `slack`, `x` is `twitter`), unless its user has an address they never confirmed, since GoTrue refused that sign-in too. Email, phone, anonymous and single sign-on identities and sessions do not carry over. <gap>The import cannot carry over MFA factors because that is not implemented.</gap> <gap>The import cannot carry over passkeys because that is not implemented.</gap>
577
577
  4. **Apply the migrations** again. Supabase's users then sign in with their own passwords, and with a social provider once it is in the `socialProviders` of the config's `auth`; new users get a UUID in `auth.users`, so the app's triggers there run for them.
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/client.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/client.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Client and live UI
4
4
 
@@ -17,7 +17,7 @@ const { record, etag } = await api.get(orders, id)
17
17
  await api.update(orders, id, { status: 'shipped' }, etag) // 412 rejects with PreconditionFailedError
18
18
  ```
19
19
 
20
- Pass a resource builder to get its record type ([`InferRecord`](https://docs.protobase.net/api/schema/type-aliases/inferrecord/)), or a name for loose records. Filters are AIP-160 text or [`where`](https://docs.protobase.net/api/schema/variables/where/) results (printed with [`printFilter`](https://docs.protobase.net/api/schema/functions/printfilter/)). Errors are `ApiError` (`status`, `slug`, `errors`, `filterErrors` with spans, `blockedBy` for a delete other records point at), which `isApiError(error)` tells apart. Also: `search`, `create`, `remove`, `facets`, `series`, `histogram`, `map(resource, { latitude, longitude, zoom, filter?, orderBy?, fields? })` (the records in a map's view, or buckets of them, see [`:map`](api.md#maps)), `seek`, `reveal(resource, key, field)` (a [sensitive field](data-config.md#sensitive-fields)'s value), `generate(resource, key, action)` (runs an [AI action](ai.md#ai-actions) and resolves to the record as written), `meta(etag?, { signal? })`, `invoke(name, { body?, method?, path?, query? })` (one of the app's [API functions](../guides/api-functions.md#calling-a-function)), `upload(resource, field, file, { onProgress?, signal? })` (a file for a [file field](files.md#uploading); its `value` goes in the next write, and `onProgress` uses XMLHttpRequest, since fetch reports no upload progress), `live({ onChanges, onResync, onRetry? })` (hears which records of the [live](live.md) resources change until the function it returns is called, connecting again by itself).
20
+ Pass a resource builder to get its record type ([`InferRecord`](https://docs.protobase.net/api/schema/type-aliases/inferrecord/)), or a name for loose records. Filters are AIP-160 text or [`where`](https://docs.protobase.net/api/schema/variables/where/) results (printed with [`printFilter`](https://docs.protobase.net/api/schema/functions/printfilter/)). Errors are `ApiError` (`status`, `slug`, `errors`, `filterErrors` with spans, `blockedBy` for a delete other records point at), which `isApiError(error)` tells apart. Also: `search`, `create`, `remove`, `facets`, `series`, `histogram`, `map(resource, { latitude, longitude, zoom, filter?, orderBy?, fields? })` (the records in a map's view, or buckets of them, see [`:map`](api.md#maps)), `seek`, `reveal(resource, key, field)` (a [sensitive field](data-config.md#sensitive-fields)'s value), `generate(resource, key, action)` (runs an [AI action](ai.md#ai-actions) and resolves to the record as written), `meta(etag?, { signal? })`, `invoke(name, { body?, method?, path?, query? })` (one of the app's [API functions](../guides/api-functions.md#calling-a-function)), `upload(resource, field, file, { onProgress?, signal? })` (a file for a [file field](files.md#uploading); its `value` goes in the next write, and `onProgress` uses XMLHttpRequest, since fetch reports no upload progress), `live({ onChanges, onResync, onRetry? })` (hears which records of the [live](live.md) resources change until the function it returns is called, connecting again by itself; every caller of one client shares one stream), `channel(resource, key)` (a record's [channel](channels.md#from-a-page), with its presence and broadcasts, every channel of the client on one socket).
21
21
 
22
22
  With an absolute `baseUrl`, such as another app's `https://desk.example.com/api/v1`, the `url` of each [file](files.md) in a record the client answers is absolute too, on that API's origin, where the API answers a path on its own origin. `routedClient(own, sourceOf)` is one client over several APIs: each call about a resource goes to the client `sourceOf(resource)` gives, else to `own`, as the admin app does for [remote resources](remote-resources.md), and `sourceMeta(meta, source)` keeps the part of another API's `/meta` an app draws.
23
23
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/comments.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/comments.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Record comments
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/admin-app.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/admin-app.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Admin app options
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/api.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/api.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # API options
4
4
 
@@ -154,7 +154,7 @@ export default defineConfig({ runtimeUpdates: false })
154
154
  - **Type:** `{ processes?: 'one' | 'many' }`
155
155
  - **Default:** `{ processes: 'one' }`
156
156
 
157
- How [Supabase Realtime](../supabase-realtime.md) is served. With `'one'`, one process serves the app, and broadcasts and presence go between its channels in memory. Set `'many'` when several processes serve the app behind one address: broadcasts and presence then go between the processes through the `realtime_relay` schema of the app's database, which [`protobase migration`](../cli.md#migration) writes and the server checks at start. See [Several processes](../supabase-realtime.md#several-processes).
157
+ How [channels](../channels.md) and [Supabase Realtime](../supabase-realtime.md) are served. With `'one'`, one process serves the app, and broadcasts and presence go between its channels in memory. Set `'many'` when several processes serve the app behind one address: broadcasts and presence then go between the processes through the `realtime_relay` schema of the app's database, which [`protobase migration`](../cli.md#migration) writes and the server checks at start. See [Several processes](../channels.md#several-processes).
158
158
 
159
159
  ```ts
160
160
  export default defineConfig({ realtime: { processes: 'many' } })
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/app.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/app.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # App options
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/files.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/files.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Files options
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/jobs-and-events.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/jobs-and-events.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Jobs and events options
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config/sign-in.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config/sign-in.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Sign-in options
4
4
 
@@ -211,14 +211,14 @@ export default defineConfig({ auth: { accountDeletion: false } })
211
211
 
212
212
  ## auth.users
213
213
 
214
- - **Type:** `{ table?: string; columns?: Record<string, string>; metadata?: string; keyTable?: { schema: string; table: string } }`
214
+ - **Type:** `{ table?: string; columns?: Record<string, string>; metadata?: string; keyTable?: { schema: string; table: string }; guardedSchemas?: string[] }`
215
215
  - **Default:** the table `protobase auth migration` makes
216
216
 
217
- The user table, when another system made it, such as Supabase's `auth.users`: its name, the columns named otherwise than Protobase names them, and a JSON column for each user's metadata. See [An existing users table](../auth.md#an-existing-users-table). `keyTable` makes the user table a view of the app's own over another system's, the table it names, which holds the user ids: the store's migrations leave the view to the app and point their foreign keys at that table. See [A view over another system's users](../auth.md#a-view-over-another-systems-users).
217
+ The user table, when another system made it, such as Supabase's `auth.users`: its name, the columns named otherwise than Protobase names them, and a JSON column for each user's metadata. See [An existing users table](../auth.md#an-existing-users-table). `keyTable` makes the user table a view of the app's own over another system's, the table it names, which holds the user ids: the store's migrations leave the view to the app and point their foreign keys at that table. See [A view over another system's users](../auth.md#a-view-over-another-systems-users). `guardedSchemas` names the schemas the other system keeps the rest of its sign-in data in, such as Supabase Auth's `auth`: no resource may be over any table in them, and the assistant's queries never read one.
218
218
 
219
219
  ```ts
220
220
  export default defineConfig({
221
- auth: { schema: 'auth', users: { table: 'users', columns: { role: 'app_role' }, metadata: 'raw_user_meta_data' } },
221
+ auth: { schema: 'auth', users: { table: 'users', columns: { role: 'app_role' }, metadata: 'raw_user_meta_data', guardedSchemas: ['auth'] } },
222
222
  })
223
223
  ```
224
224
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/config.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/config.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Configuring Protobase
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/custom-components.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/custom-components.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Custom components
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/data-config.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/data-config.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Data config
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/email.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/email.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Email
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/events.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/events.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Events
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/files.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/files.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Files
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/forms.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/forms.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Public forms
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/history.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/history.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Record history
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/installable-app.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/installable-app.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Installable app
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/jobs.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/jobs.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Jobs
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/languages.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/languages.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Languages
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/layouts.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/layouts.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Layouts
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/live.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/live.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Live updates
4
4
 
@@ -41,7 +41,9 @@ It is live data, not multiplayer editing: two people editing the same record sti
41
41
  | `changes` | `changes`: `[{ resource, key, operation }]` in commit order, `operation` being `create`, `update`, `delete` or `undelete`. |
42
42
  | `resync` | Changes went by that are no longer kept: read everything shown again. |
43
43
 
44
- Connecting again with `?after=<cursor>` catches up on what was missed while disconnected. [`client.live({ onChanges, onResync })`](client.md) of `@protobase/client` follows the stream and connects again by itself, as the app does.
44
+ Connecting again with `?after=<cursor>` catches up on what was missed while disconnected. [`client.live({ onChanges, onResync })`](client.md) of `@protobase/client` follows the stream and connects again by itself, as the app does. However many callers of one client follow it, they share one stream, so a page with many live views holds one connection, which matters under HTTP/1.1, where a browser opens at most six to a host.
45
+
46
+ Who is on a record's page and what they send each other, which no change of a record says, goes over the record's [channel](channels.md).
45
47
 
46
48
  ## The table
47
49
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/mcp.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/mcp.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # MCP
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/notifications.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/notifications.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Notifications
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/plugins.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/plugins.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Plugins
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/remote-resources.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/remote-resources.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Remote resources
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/sidebar.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/sidebar.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Sidebar
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/supabase-realtime.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/supabase-realtime.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Supabase Realtime
4
4
 
@@ -28,7 +28,7 @@ A channel may listen to the tables of the resources with [`.live()`](live.md), b
28
28
 
29
29
  ## Broadcast and presence
30
30
 
31
- Channels on the same topic exchange broadcasts and see each other's presence, as on Supabase, private channels among themselves and public ones among themselves:
31
+ Channels on the same topic exchange broadcasts and see each other's presence, as on Supabase, private channels among themselves and public ones among themselves. A new app has Protobase's own [channels](channels.md) for this, which belong to records and admit whoever may read the record, with no policies to write; the two never hear each other.
32
32
 
33
33
  ```ts
34
34
  const room = supabase.channel('room', { config: { broadcast: { self: false, ack: true }, presence: { key: 'alice' } } })
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/supabase-rest.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/supabase-rest.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Supabase client API
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/supabase-storage.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/supabase-storage.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Supabase Storage API
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/theme.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/theme.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Theme
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/ui-config.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/ui-config.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # UI config
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/user-menu.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/user-menu.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # User menu
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/versioning.md: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/versioning.md: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Versioning
4
4
 
@@ -1,4 +1,4 @@
1
- <!-- Generated by scripts/protobase-skill.ts from website/src/content/docs/reference/webhooks.mdx: run `bun run docs:skill`, do not edit. -->
1
+ <!-- Generated by scripts/protobase-skill.ts from docs/website/src/content/docs/reference/webhooks.mdx: run `bun run docs:skill`, do not edit. -->
2
2
 
3
3
  # Webhooks
4
4