π File detail
services/remoteManagedSettings/types.ts
π― Use case
This file lives under βservices/β, which covers long-lived services (LSP, MCP, OAuth, tool execution, memory, compaction, voice, settings sync, β¦). On the API surface it exposes RemoteManagedSettingsResponseSchema, RemoteManagedSettingsResponse, and RemoteManagedSettingsFetchResult β mainly types, interfaces, or factory objects. Dependencies touch schema validation. It composes internal code from utils (relative imports).
Generated from folder role, exports, dependency roots, and inline comments β not hand-reviewed for every path.
π§ Inline summary
import { z } from 'zod/v4' import { lazySchema } from '../../utils/lazySchema.js' import type { SettingsJson } from '../../utils/settings/types.js' /**
π€ Exports (heuristic)
RemoteManagedSettingsResponseSchemaRemoteManagedSettingsResponseRemoteManagedSettingsFetchResult
π External import roots
Package roots from from "β¦" (relative paths omitted).
zod
π₯οΈ Source preview
import { z } from 'zod/v4'
import { lazySchema } from '../../utils/lazySchema.js'
import type { SettingsJson } from '../../utils/settings/types.js'
/**
* Schema for the remotely managed settings response.
* Note: Uses permissive z.record() instead of SettingsSchema to avoid circular dependency.
* Full validation is performed in index.ts after parsing using SettingsSchema.safeParse().
*/
export const RemoteManagedSettingsResponseSchema = lazySchema(() =>
z.object({
uuid: z.string(), // Settings UUID
checksum: z.string(),
settings: z.record(z.string(), z.unknown()) as z.ZodType<SettingsJson>,
}),
)
export type RemoteManagedSettingsResponse = z.infer<
ReturnType<typeof RemoteManagedSettingsResponseSchema>
>
/**
* Result of fetching remotely managed settings
*/
export type RemoteManagedSettingsFetchResult = {
success: boolean
settings?: SettingsJson | null // null means 304 Not Modified (cache is valid)
checksum?: string
error?: string
skipRetry?: boolean // If true, don't retry on failure (e.g., auth errors)
}