Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,15 @@ SLACK_BOT_TOKEN=xoxb-...
SLACK_APP_TOKEN=xapp-...
SLACK_SIGNING_SECRET=...
SLACK_COMMAND_NAME=gooseherd
# SLACK_CONFIG_OVERRIDE_FROM_ENV=false
# SLACK_ALLOWED_CHANNELS=C123,C456

# ── GitHub (required — use EITHER PAT or GitHub App) ──
GITHUB_TOKEN=ghp_...
# GITHUB_APP_ID=
# GITHUB_APP_PRIVATE_KEY=
# GITHUB_APP_INSTALLATION_ID=
# GITHUB_CONFIG_OVERRIDE_FROM_ENV=false
GITHUB_DEFAULT_OWNER=

# ── Repo allowlist (comma-separated) ──
Expand All @@ -32,6 +34,7 @@ REPO_ALLOWLIST=
OPENROUTER_API_KEY=
# ANTHROPIC_API_KEY=
# OPENAI_API_KEY=
# LLM_CONFIG_OVERRIDE_FROM_ENV=false
# CODEX_API_KEY= # OpenAI Codex CLI
# CURSOR_API_KEY= # Cursor Agent CLI

Expand Down
8 changes: 8 additions & 0 deletions drizzle/0003_breezy_config_sections.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
CREATE TABLE "config_sections" (
"section" text PRIMARY KEY NOT NULL,
"config" jsonb DEFAULT '{}'::jsonb NOT NULL,
"secrets_enc" bytea,
"override_from_env" boolean DEFAULT false NOT NULL,
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
);
9 changes: 8 additions & 1 deletion drizzle/meta/_journal.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
"when": 1773181213088,
"tag": "0002_dark_hercules",
"breakpoints": true
},
{
"idx": 3,
"version": "7",
"when": 1775570000000,
"tag": "0003_breezy_config_sections",
"breakpoints": true
}
]
}
}
11 changes: 11 additions & 0 deletions src/dashboard-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,11 @@ export function startDashboardServer(
pipelineFile: config.pipelineFile,
slackConnected: Boolean(config.slackBotToken),
githubAuthMode,
configOverrides: {
githubFromEnv: parseOverrideFlag(process.env.GITHUB_CONFIG_OVERRIDE_FROM_ENV),
slackFromEnv: parseOverrideFlag(process.env.SLACK_CONFIG_OVERRIDE_FROM_ENV),
llmFromEnv: parseOverrideFlag(process.env.LLM_CONFIG_OVERRIDE_FROM_ENV),
},
features: {
observer: config.observerEnabled,
sandbox: config.sandboxEnabled,
Expand Down Expand Up @@ -1195,3 +1200,9 @@ export function startDashboardServer(
});
});
}

function parseOverrideFlag(value: string | undefined): boolean {
if (value === undefined) return false;
const normalized = value.trim().toLowerCase();
return normalized === "1" || normalized === "true" || normalized === "yes";
}
9 changes: 9 additions & 0 deletions src/db/schema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -264,3 +264,12 @@ export const setup = pgTable("setup", {
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
});

export const configSections = pgTable("config_sections", {
section: text("section").primaryKey(),
config: jsonb("config").notNull().$type<Record<string, unknown>>().default({}),
secretsEnc: bytea("secrets_enc"),
overrideFromEnv: boolean("override_from_env").notNull().default(false),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),
updatedAt: timestamp("updated_at", { withTimezone: true }).notNull().defaultNow(),
});
Loading
Loading