Forkbase 0.6.0
Functions over REST: GET/POST /rest/v1/rpc/<function> calls a function of a served schema by its argument names, as PostgREST does, so supabase.rpc()…
- Functions over REST:
GET/POST /rest/v1/rpc/<function>calls a function of a served schema by its argument names, as PostgREST does, sosupabase.rpc()works. Rows come back filtered, ordered and paged like a table's; one value as JSON; void as 204. Overloads, defaults, JSON, array andvectorarguments;GETfor stable functions only; it runs as the caller, under their grants and row-level security.GET /rest/v1/lists the functions too. - Deleting from the dashboard: backups (Database, Backups, or
DELETE /platform/v1/backups/<name>), views, indexes, functions, triggers and enum types (Database, from an object's sheet), declared agents (from the editor) and projects (Settings, Projects, or Settings, General on the project shown). Admins only; each asks first, and a project or agent asks for its name. - Vectors: collections of items (id, text, JSON metadata, embedding) searched by nearness, for agents' memory and retrieval (
/vectors/v1). Text sent without an embedding is embedded by the collection's model connection (OpenAI or OpenAI-compatible/embeddings); a search takes an embedding or text,k, a metadatafilterandmax_distance; cosine, L2 or inner product. pgvector's type and an HNSW index in chronos mode and on a Postgres with pgvector;real[]searched exactly otherwise. Each collection is the tablevectors.<name>. - Actions: when writing a try's outcome fails (the database busy or away for a moment), the write is tried again for a few seconds instead of leaving the action
runninguntil its lease ran out and sending it a second time. - Functions over HTTP: a job function deployed with
http: publicorhttp: user(forkbase deploy --http) is called by apps at/functions/v1/<name>, like a Supabase Edge Function (supabase.functions.invokeworks). It gets the body as its payload andctx.requestandctx.caller;ctx.call()reads and writes as the caller under their row-level security; it answers with what it returns orrespond(body, {status, headers}). Tried once, waited for up to its time limit (at most 150 s); the caller's token lives only as long as the attempt. - Migrations and types:
forkbase migration new|list|pushkeeps your app's schema as SQL files inmigrations/and applies the new ones in order, each in a transaction, recorded with a checksum, so a file edited after it ran is refused (--dry-runtries them and rolls back;-- forkbase:no-transactionforcreate index concurrently).forkbase gen typeswrites the served schemas as a supabase-jsDatabasetype. Over HTTP:/platform/v1/migrationsand/platform/v1/types. - Session lifetime:
auth.session_ttl_s(how long a session lasts from sign-in) andauth.inactivity_ttl_s(how long it may go unrefreshed), both0or"never"by default, as in Supabase: a session now lasts until sign-out instead of ending after 30 days without a refresh. Both, and the access token lifetime (auth.access_ttl_s, the JWT's), are inforkbase.toml,FORKBASE_SESSION_TTL_S/FORKBASE_INACTIVITY_TTL_S, and the dashboard's Auth settings (Sessions), and apply to open sessions from their next refresh. An ended session's refresh answerssession_expired.