feat(setup): add onboarding live checks and first-success guidance

This commit is contained in:
William Valentin
2026-02-26 18:18:12 -08:00
parent 03926a81eb
commit 62c427da4a
14 changed files with 646 additions and 9 deletions
+76 -1
View File
@@ -23,6 +23,9 @@ export interface SetupConfig {
token?: string;
lock?: boolean;
tailscale?: { serve?: boolean };
queue?: {
mode?: 'collect' | 'followup' | 'steer' | 'steer_backlog' | 'interrupt';
};
} & Record<string, unknown>;
hooks?: Record<string, unknown>;
telegram?: { bot_token: string; allowed_chat_ids: number[] };
@@ -30,6 +33,22 @@ export interface SetupConfig {
slack?: { bot_token: string; app_token: string; signing_secret: string; allowed_channel_ids: string[] };
whatsapp?: { allowed_numbers: string[] };
memory?: { embedding?: { enabled?: boolean; provider?: string; api_key?: string; endpoint?: string } };
audio?: {
enabled?: boolean;
talk_mode?: {
enabled?: boolean;
wake_phrase?: string;
timeout_ms?: number;
allow_manual_toggle?: boolean;
};
};
tts?: {
enabled?: boolean;
fallback?: {
max_attempts?: number;
failure_cooldown_ms?: number;
};
};
sandbox?: { enabled?: boolean };
pairing?: { enabled?: boolean };
tools?: { profile?: string };
@@ -55,7 +74,15 @@ export interface SetupConfig {
gdrive?: { enabled?: boolean };
gtasks?: { enabled?: boolean };
heartbeat?: { enabled?: boolean };
daily_briefing?: { enabled?: boolean };
daily_briefing?: {
enabled?: boolean;
schedule?: string;
output?: {
channel?: string;
peer?: string;
};
model_tier?: 'fast' | 'default' | 'complex' | 'local';
};
minio_sync?: { enabled?: boolean };
} & Record<string, unknown>;
backup?: {
@@ -79,6 +106,11 @@ interface ResearchAgentOptions {
modelTier: 'fast' | 'default' | 'complex' | 'local';
}
interface PersonalAssistantModeOptions {
enableTalkMode?: boolean;
enableTts?: boolean;
}
export class ConfigBuilder {
private config: SetupConfig;
@@ -317,6 +349,49 @@ export class ConfigBuilder {
this.config.memory = memory;
}
applyPersonalAssistantMode(options?: PersonalAssistantModeOptions): void {
const automation = (this.config.automation ?? {}) as Record<string, unknown>;
const memory = (this.config.memory ?? {}) as Record<string, unknown>;
const audio = (this.config.audio ?? {}) as Record<string, unknown>;
const talkMode = (audio.talk_mode ?? {}) as Record<string, unknown>;
const tts = (this.config.tts ?? {}) as Record<string, unknown>;
const ttsFallback = (tts.fallback ?? {}) as Record<string, unknown>;
const server = (this.config.server ?? {}) as Record<string, unknown>;
const queue = (server.queue ?? {}) as Record<string, unknown>;
automation.delivery_mode = 'announce';
memory.daily_log = {
enabled: true,
namespace_prefix: 'daily',
};
memory.proactive_extract = {
enabled: true,
min_tool_calls: 2,
namespace: 'global',
};
talkMode.enabled = options?.enableTalkMode ?? true;
talkMode.wake_phrase = 'hey flynn';
talkMode.timeout_ms = 120000;
talkMode.allow_manual_toggle = true;
audio.talk_mode = talkMode;
audio.enabled = Boolean(audio.enabled || talkMode.enabled);
tts.enabled = options?.enableTts ?? true;
ttsFallback.max_attempts = 3;
ttsFallback.failure_cooldown_ms = 60000;
tts.fallback = ttsFallback;
queue.mode = 'interrupt';
server.queue = queue;
this.config.automation = automation;
this.config.memory = memory;
this.config.audio = audio;
this.config.tts = tts;
this.config.server = server as SetupConfig['server'];
}
build(): SetupConfig {
return structuredClone(this.config) as SetupConfig;
}