/** * settings-schema.ts — Single source of truth for the /agents → Settings menu. * * Every menu-editable setting is ONE descriptor entry here: stable `id`, * live `label()` (rendered into the picker), and an `edit()` flow. The menu * dispatches on the descriptor, never on label text, so labels can change * freely and a new setting is a new entry instead of edits in five files. * * Factories (`toggleEntry`, `intEntry`) cover the repeated shapes; bespoke * flows stay plain entries. Session-only settings declare `persist: false` * and bypass the save/persist path deliberately. */ import type { ExtensionAPI, ExtensionCommandContext } from "@earendil-works/pi-coding-agent"; import type { AgentManager } from "../agent-manager.js"; import { type AnimationStyle } from "../agent-registry.js"; import type { SubagentScheduler } from "../schedule.js"; import type { SettingsGetters, SettingsSetters } from "../settings.js"; type Ctx = ExtensionCommandContext; /** Dependency bag threaded through every settings editor. */ export interface SettingsUiDeps { pi: ExtensionAPI; manager: AgentManager; scheduler: SubagentScheduler; getters: SettingsGetters; setters: SettingsSetters; /** Persist snapshot + notify after an accepted change. */ notifyApplied: (ctx: Ctx, message: string) => void; } export interface SettingEntry { /** Stable dispatch id — routing never matches on label text. */ id: string; /** Picker label including the live current value. */ label: (deps: SettingsUiDeps) => string; /** Editor flow for the selected entry. */ edit: (ctx: Ctx, deps: SettingsUiDeps) => Promise; } /** Motion profile options shared between entry and editor. */ export declare const MOTION_PROFILE_OPTIONS: ReadonlyArray<{ profile: AnimationStyle; preview: string; description: string; }>; export declare function buildSettingEntries(submenus: { openCoordination: (ctx: Ctx, deps: SettingsUiDeps) => Promise; openCompression: (ctx: Ctx, deps: SettingsUiDeps) => Promise; }): ReadonlyArray; export {};