feat: add visual settings and readiness gate

This commit is contained in:
Codex
2026-08-01 22:14:20 +08:00
parent 6a15217d55
commit 3b4106e8cc
25 changed files with 2447 additions and 239 deletions
+52
View File
@@ -0,0 +1,52 @@
export type SettingOption = {
value: string;
label: string;
help: string;
};
export type SettingField = {
key: string;
label: string;
description: string;
kind: "text" | "password" | "url" | "select" | "combobox" | "toggle" | "number" | "status";
required: boolean;
secret: boolean;
default: unknown;
placeholder: string;
options: SettingOption[];
generator: "hex24" | "hex32" | "base64_32" | null;
advanced: boolean;
visible_when: Record<string, unknown> | null;
};
export type SettingCategory = {
id: string;
label: string;
description: string;
test_targets: string[];
required_for_workflow: boolean;
fields: SettingField[];
};
export type SettingsReadiness = {
ready: boolean;
completed_required: number;
total_required: number;
missing: string[];
untested: string[];
};
export type SettingsResponse = {
categories: SettingCategory[];
values: Record<string, unknown>;
configured: Record<string, boolean>;
tests: Record<string, { ok: boolean; message: string }>;
readiness: SettingsReadiness;
};
export type TestResult = {
target: string;
ok: boolean;
message: string;
details: Record<string, unknown>;
};