Repository navigation
v4.111.0
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.getSchemaandr.projects.restuse 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 wayr.projects.getworks.- Authority is your role on the owning org:
viewerand above, or adatabase:readgrant, can read. Reads are read-only, enforced by PostgreSQL.developerand above, ordatabase: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
FORBIDDENwithnext_actions: ask for a role, ask for a grant, or import the key. restwith an explicitkeyType: "anon"still needs the cached anon key.
CLI (run402)
run402 projects sql|schema|restwork for org members on any machine.run402 projects sql … --read-onlyruns a query read-only.
MCP (run402-mcp)
runsnippets can callr.projects.sql,getSchemaandrestwith no secret, soSECRET_REQUIRES_CLIis no longer in the way.