Files
archie/internal/platform/pg/migrations/00003_governance.sql
T
sam 02df83ccb7 feat(runs): the in-process agent loop, checkpointed as run steps, and the investigate workflow (#1977, #1889)
The agent model is an organisation setting in the new governance module.
Every model and tool call is a journal step, so a killed run resumes without
repeating either. Agents are offered connector lookups and read-only actions
only, until judgement exists.
2026-11-15 21:49:53 +11:00

18 lines
515 B
SQL

-- +goose Up
CREATE SCHEMA governance;
-- A model role is the model an organisation chose for one job. Only the agent
-- role exists until guards need the judge role.
CREATE TABLE governance.model_roles (
org_id text NOT NULL,
role text NOT NULL CHECK (role IN ('agent')),
class text NOT NULL,
base_url text NOT NULL,
model text NOT NULL,
updated_at timestamptz NOT NULL DEFAULT now(),
PRIMARY KEY (org_id, role)
);
-- +goose Down
DROP SCHEMA governance CASCADE;