import { Static, Type } from "typebox"; //#region src/schemas/config.d.ts /** Canonical Cordis key for the session-owned Doom configuration service. */ export declare const DOOM_CONFIG_SERVICE = "doom/config"; /** * Cross-package service contract for the immutable configuration snapshot. * * The provider supplies the concrete snapshot and file-config types. Keeping * this contract generic lets independently bundled consumers share the Cordis * service definition without making the contracts package depend on config. */ export interface IDoomConfigService { /** Identifies the currently published session service for stale-work fencing. */ readonly generation: string; /** Returns the immutable snapshot currently visible to consumers. */ getSnapshot(): TSnapshot; /** Atomically replaces the immutable live snapshot after a successful transition. */ replaceSnapshot(snapshot: TSnapshot): TSnapshot; /** Loads the package's file configuration outside the live session snapshot. */ load(repoRoot: string, homeDirectory?: string): TFileConfig; } /** Matches the leader contract's source rule: package names, addressable and spoof-checkable. */ export declare const ConfigSourceSchema: Type.TString; /** * How ready a value is to be used, as opposed to whether it is merely set. * `blocked` covers a choice that needs something else first, such as a model * whose engine is not installed. */ export declare const ConfigStatusSchema: Type.TUnion<[Type.TLiteral<"ready">, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>; export type ConfigStatus = Static; export declare const ConfigFieldKindSchema: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>; export type ConfigFieldKind = Static; /** * A key the renderer offers on the focused field, sent back verbatim as an * action. Owners use this for confirmations, so the pending question survives a * panel that is closed and reopened. */ export declare const ConfigActionSchema: Type.TObject<{ key: Type.TString; label: Type.TString; action: Type.TString; }>; export type ConfigAction = Static; export declare const ConfigChoiceSchema: Type.TObject<{ id: Type.TString; label: Type.TString; /** Right-aligned by the renderer. Sizes, ids, anything narrow. */ detail: Type.TOptional; /** Groups entries under a heading the cursor skips over. */ group: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; statusText: Type.TOptional; /** * What enter does on this entry. Carrying it per-entry is what lets one list * hold both an installed model that only needs selecting and an absent one * that needs fetching, without the renderer knowing the difference. */ action: Type.TOptional; }>; export type ConfigChoice = Static; /** * One line of a multi-step operation. * * Published as a list rather than a single "current step" string so the panel can * show what already ran alongside what is left. During an install that is the * difference between "something is happening" and knowing a package manager * already finished and a download is now underway. */ export declare const ConfigStepSchema: Type.TObject<{ label: Type.TString; state: Type.TUnion<[Type.TLiteral<"pending">, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>; detail: Type.TOptional; }>; export type ConfigStep = Static; export declare const ConfigProgressSchema: Type.TObject<{ label: Type.TString; /** 0 to 1. Omitted when the work has no measurable total. */ ratio: Type.TOptional; }>; export type ConfigProgress = Static; export declare const ConfigFieldSchema: Type.TObject<{ id: Type.TString; label: Type.TString; kind: Type.TUnion<[Type.TLiteral<"text">, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>; /** Absent means unset; the renderer shows `placeholder` instead. */ value: Type.TOptional; placeholder: Type.TOptional; /** One line of help for the focused field. */ detail: Type.TOptional; /** The config key this writes, shown under the focused field so the file stays legible. */ keyPath: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; /** Doubles as the error line: a rejected edit comes back as the old value plus this. */ statusText: Type.TOptional; choices: Type.TOptional; /** Groups entries under a heading the cursor skips over. */ group: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; statusText: Type.TOptional; /** * What enter does on this entry. Carrying it per-entry is what lets one list * hold both an installed model that only needs selecting and an absent one * that needs fetching, without the renderer knowing the difference. */ action: Type.TOptional; }>>>; actions: Type.TOptional>>; /** Work is running; the renderer dims the field and offers abort. */ busy: Type.TOptional; progress: Type.TOptional; }>>; steps: Type.TOptional, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>; detail: Type.TOptional; }>>>; /** * The tail of a running command's terminal output. * * A tail rather than the whole scrollback: the field is a few rows of a * shared pane, and what matters is the question a package manager just * asked, not what it printed a minute ago. */ output: Type.TOptional>; /** * The command is waiting on the user. The renderer offers a line to type * into, which comes back as an owner-defined action carrying the text. */ awaitingInput: Type.TOptional; }>; export type ConfigField = Static; export declare const ConfigSectionSchema: Type.TObject<{ id: Type.TString; title: Type.TString; detail: Type.TOptional; order: Type.TInteger; /** Section-wide state: readiness, or why a write failed. */ notice: Type.TOptional; noticeLevel: Type.TOptional, Type.TLiteral<"error">]>>; fields: Type.TArray, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>; /** Absent means unset; the renderer shows `placeholder` instead. */ value: Type.TOptional; placeholder: Type.TOptional; /** One line of help for the focused field. */ detail: Type.TOptional; /** The config key this writes, shown under the focused field so the file stays legible. */ keyPath: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; /** Doubles as the error line: a rejected edit comes back as the old value plus this. */ statusText: Type.TOptional; choices: Type.TOptional; /** Groups entries under a heading the cursor skips over. */ group: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; statusText: Type.TOptional; /** * What enter does on this entry. Carrying it per-entry is what lets one list * hold both an installed model that only needs selecting and an absent one * that needs fetching, without the renderer knowing the difference. */ action: Type.TOptional; }>>>; actions: Type.TOptional>>; /** Work is running; the renderer dims the field and offers abort. */ busy: Type.TOptional; progress: Type.TOptional; }>>; steps: Type.TOptional, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>; detail: Type.TOptional; }>>>; /** * The tail of a running command's terminal output. * * A tail rather than the whole scrollback: the field is a few rows of a * shared pane, and what matters is the question a package manager just * asked, not what it printed a minute ago. */ output: Type.TOptional>; /** * The command is waiting on the user. The renderer offers a line to type * into, which comes back as an owner-defined action carrying the text. */ awaitingInput: Type.TOptional; }>>; }>; export type ConfigSection = Static; declare const ConfigSourceRefSchema: Type.TObject<{ source: Type.TString; generation: Type.TString; }>; declare const ConfigSnapshotSchema: Type.TObject<{ source: Type.TString; generation: Type.TString; sections: Type.TArray; order: Type.TInteger; /** Section-wide state: readiness, or why a write failed. */ notice: Type.TOptional; noticeLevel: Type.TOptional, Type.TLiteral<"error">]>>; fields: Type.TArray, Type.TLiteral<"enum">, Type.TLiteral<"choice">, Type.TLiteral<"info">]>; /** Absent means unset; the renderer shows `placeholder` instead. */ value: Type.TOptional; placeholder: Type.TOptional; /** One line of help for the focused field. */ detail: Type.TOptional; /** The config key this writes, shown under the focused field so the file stays legible. */ keyPath: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; /** Doubles as the error line: a rejected edit comes back as the old value plus this. */ statusText: Type.TOptional; choices: Type.TOptional; /** Groups entries under a heading the cursor skips over. */ group: Type.TOptional; status: Type.TOptional, Type.TLiteral<"available">, Type.TLiteral<"blocked">]>>; statusText: Type.TOptional; /** * What enter does on this entry. Carrying it per-entry is what lets one list * hold both an installed model that only needs selecting and an absent one * that needs fetching, without the renderer knowing the difference. */ action: Type.TOptional; }>>>; actions: Type.TOptional>>; /** Work is running; the renderer dims the field and offers abort. */ busy: Type.TOptional; progress: Type.TOptional; }>>; steps: Type.TOptional, Type.TLiteral<"satisfied">, Type.TLiteral<"running">, Type.TLiteral<"done">, Type.TLiteral<"failed">]>; detail: Type.TOptional; }>>>; /** * The tail of a running command's terminal output. * * A tail rather than the whole scrollback: the field is a few rows of a * shared pane, and what matters is the question a package manager just * asked, not what it printed a minute ago. */ output: Type.TOptional>; /** * The command is waiting on the user. The renderer offers a line to type * into, which comes back as an owner-defined action carrying the text. */ awaitingInput: Type.TOptional; }>>; }>>; }>; export type ConfigSnapshot = Static; export type ConfigSourceRef = Static; export declare const CONFIG_ACTION: { readonly set: 'set'; readonly clear: 'clear'; }; export interface DoomExtensionContext { sessionManager: { getSessionId(): string; }; } export interface DoomConfigSectionView extends ConfigSection { source: string; } export interface DoomConfigInvocation { source: string; sectionId: string; fieldId: string; action: string; value?: string; } export interface DoomConfigActionInput { ctx: Context; sectionId: string; fieldId: string; value?: string; } export interface DoomConfigContributionOptions { source: string; listSections: () => readonly ConfigSection[]; handlers: Readonly) => void | Promise>>; onError: (error: unknown, actionName: string, ctx: Context) => void; } export interface DoomConfigContributionHandle { update(): void; dispose(): void; } //#endregion //# sourceMappingURL=config.d.cts.map