CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
Blame · Line-by-line history
0036_repo_agent_settings.sql
Each line is annotated with the commit that last touched it. Click any SHA to jump to that commit and see the surrounding change.
| ddb25a6 | 1 | -- Block K8 — Per-repo agent enable toggles + budget caps. |
| 2 | -- | |
| 3 | -- Stores which agent kinds are allowed to run against a repository plus the | |
| 4 | -- operator's cost guardrails (daily $, monthly $, max runs/hour) and a global | |
| 5 | -- paused flag that acts as a per-repo kill-switch. Enforcement lives in the | |
| 6 | -- agent dispatcher; this row is the configuration surface the inbox UI | |
| 7 | -- writes to. | |
| 8 | -- | |
| 9 | -- One row per repository — missing rows default to "agents disabled" | |
| 10 | -- semantics at the caller level. | |
| 11 | ||
| 12 | CREATE TABLE IF NOT EXISTS "repo_agent_settings" ( | |
| 13 | "repository_id" uuid PRIMARY KEY REFERENCES "repositories"("id") ON DELETE CASCADE, | |
| 14 | "enabled_kinds" text NOT NULL DEFAULT '[]', -- JSON array of AgentKind strings | |
| 15 | "daily_budget_cents" integer NOT NULL DEFAULT 100, | |
| 16 | "monthly_budget_cents" integer NOT NULL DEFAULT 2000, | |
| 17 | "max_runs_per_hour" integer NOT NULL DEFAULT 20, | |
| 18 | "paused" boolean NOT NULL DEFAULT false, | |
| 19 | "updated_at" timestamp NOT NULL DEFAULT now() | |
| 20 | ); |