Tabulic

Scope

What each agent and app may see and touch.

Scope is what an agent or app may touch in a workspace. It is set by the owner, never by the agent or app.

What a scope contains

For an agent:

  • whether it may change the schema (create tables, add, rename and drop columns, change types)
  • whether it may read every table
  • for each table: none, read (r) or read and write (rw), optionally limited to some columns
  • whether it may publish apps’ pages
  • on the hosted service, whether it may create workspaces

For an app: per-table r or rw, optionally limited to some columns. An app never changes the schema. The app asks for access when it signs in (tabulic.app({ name, access: { tbl_1: "rw" } })), and the owner can narrow it on the consent screen.

Rules

  • An agent gets read and write on a table it creates, and a column it adds joins its column list. This is the only way scope grows without the owner.
  • Columns added later stay hidden from an agent limited to some columns, unless it adds them itself.
  • Changes apply from the next call. Writes already waiting stay as they are.
  • Drops keep access. If a table or column is dropped, access to it is kept, so rolling back the drop restores it.
  • Scope applies to every read, including the read-only sql_query: tables and columns outside it don’t exist for that agent.

Defaults

A new agent connected with the defaults may read and change every workspace it can reach, create tables and publish app pages. Customize on the consent screen narrows this per workspace. An agent you already have keeps its current scope when it reconnects.

An agent reads its own scope with describe_schema: which tables it may read and write, and whether it may change the schema.

On this page