/** * The one place that maps today's Settings links onto the redesigned pages. * * Every legacy form (tab ids, nested `a:b:c` ids, section hashes, `#secrets:KEY`, * `agent-panel:open-settings` sections) resolves here, so links in templates, * OAuth callbacks, and sent emails keep landing on the right page. Targets are * the spec's page ids, not where a page's content sits while its page task is * still pending. */ /** * Stable page ids. They are URL segments (`/settings/:page/:sub`), search * targets, and the agent's name for a page, so never rename one; add a * redirect instead. */ export declare const SETTINGS_PAGE_IDS: { readonly profile: "profile"; readonly preferences: "preferences"; readonly security: "security"; readonly integrations: "integrations"; readonly apiKeys: "api-keys"; readonly model: "model"; readonly instructions: "instructions"; readonly personalization: "personalization"; readonly memory: "memory"; readonly skills: "skills"; readonly files: "files"; readonly subAgents: "sub-agents"; readonly org: "org"; readonly members: "members"; readonly usage: "usage"; readonly auth: "auth"; readonly apps: "apps"; readonly infra: "infra"; readonly audit: "audit"; readonly app: "app"; readonly notifications: "notifications"; readonly automations: "automations"; readonly channels: "channels"; readonly mcp: "mcp"; readonly creativeContext: "creative-context"; readonly labs: "labs"; readonly whatsNew: "whats-new"; }; export type CoreSettingsPageId = (typeof SETTINGS_PAGE_IDS)[keyof typeof SETTINGS_PAGE_IDS]; export declare const CORE_SETTINGS_PAGE_ID_LIST: readonly CoreSettingsPageId[]; export declare function isCoreSettingsPageId(id: string): id is CoreSettingsPageId; /** * Application-state key, scoped to the browser tab, for the Settings page the * user has open. Absent when Settings isn't open in that tab. */ export declare const SETTINGS_VIEW_STATE_KEY = "settings-view"; export interface SettingsViewState { page: string; sub: string | null; /** "Group › Page" in the viewer's language. */ label: string | null; } /** * The `` line that names the open Settings page, or null when * the stored value isn't one (a stale or foreign row must not read as a page). */ export declare function describeSettingsViewForAgent(value: unknown): string | null; export interface SettingsRedirect { page: string; sub?: string; /** In-page target: a `SettingsRow`/`SettingsGroup` id, a section id, or `secrets:KEY`. */ anchor?: string; /** Opened instead when this app has no `page`. */ fallbackPage?: string; } /** Old section spellings the settings panels still accept. */ export declare const SETTINGS_SECTION_ALIASES: Readonly>; export declare function normalizeSettingsId(value: string): string; /** True when `id` (or its old spelling) is a section the settings panels open. */ export declare function isSettingsSectionId(id: string): boolean; /** * `secrets:KEY` and `labs:lab-x` style ids. They nest under ids that are also * new pages (`integrations/secrets/KEY`), so routing checks them before a * page id match. */ export declare function resolveSettingsIdPattern(value: string): SettingsRedirect | null; /** * The page a legacy id names, or `null` when it names none. `kind` decides * which meaning wins where a tab id and a section id collide: a hash on bare * `/settings` (or an agent-panel section) was a section, a path segment was a * tab. New page ids are not resolved here; callers check them first. */ export declare function resolveLegacySettingsId(value: string, kind?: "tab" | "section"): SettingsRedirect | null; /** * Where an `agent-panel:open-settings` request lands. A request with no * section falls back to the hash its caller set first (`#agent-limits`, * `#llm`), and anything unrecognized opens Model, as today's `#agent` did. */ export declare function resolveSettingsSectionRedirect(section?: string | null, currentHash?: string | null): SettingsRedirect; /** * Today's tab ids that show a page, best first. The flag-off Settings uses * this so a link built from a new page id still opens the closest tab. */ export declare function legacySettingsTabIdsForPage(page: string, sub?: string | null): readonly string[];