Skip to content

v4.111.0

Choose a tag to compare

@github-actions github-actions released this 07 Oct 07:52
· 203 commits to main since this release

Read a project's database with your own authority

An org member can now query a project's database without that project's service key: no key to import, no grant to mint (kychee-com/run402-private#827).

SDK (@run402/sdk)

  • r.projects.sql, r.projects.getSchema and r.projects.rest use the cached service key when this machine has one. Otherwise they send the same request as you (wallet, sign-in session or grant key), the way r.projects.get works.
  • Authority is your role on the owning org:
    • viewer and above, or a database:read grant, can read. Reads are read-only, enforced by PostgreSQL.
    • developer and above, or database:write, can also write.
  • r.projects.sql(id, sql, params?, { readOnly: true }) runs a call read-only for any caller, service key included.
  • A denial is FORBIDDEN with next_actions: ask for a role, ask for a grant, or import the key.
  • rest with an explicit keyType: "anon" still needs the cached anon key.

CLI (run402)

  • run402 projects sql|schema|rest work for org members on any machine.
  • run402 projects sql … --read-only runs a query read-only.

MCP (run402-mcp)

  • run snippets can call r.projects.sql, getSchema and rest with no secret, so SECRET_REQUIRES_CLI is no longer in the way.