import { _ as layerEntries, c as LayerPackage, d as PackageNameResolver, f as PresetDefinition, g as isLocalPackageSpecifier, h as ResolvedPackageConfiguration, i as readPresetsConfigLenient, l as LayerPackageConfig, m as ResolvedLayerDefinition, n as readPackageConfigurations, p as PresetsConfig, r as readPresetsConfig, s as LayerDefinition, t as ReadPresetsConfigOptions, u as LayerResolvers, v as resolveLayers, y as resolvePackageConfigurations } from "./index-BeSAaIoW.mjs"; import { FileSystem } from "@agimon-ai/po-core/platform"; //#region src/types/settings.d.ts /** Wire values returned by the host and workspace configuration mounts. */ interface RepositorySettingsRepository { id: string; name: string; path: string; active: boolean; } /** One layer a preset turns on, with the Po plugins (packages) it bundles. */ interface SettingsPresetLayer { name: string; packages: string[]; } /** One effective preset, with its layers in load order. */ interface SettingsPreset { name: string; description: string; layers: SettingsPresetLayer[]; /** True when this workspace definition replaces a host preset of the same name. */ overridesHost?: boolean; /** True when a workspace reads this preset from the host file because it has none of its own. */ inherited?: boolean; } /** Settings > Presets: your presets, the default new sessions start with, and what every preset includes. */ interface SettingsPresetsView { defaultPreset: string; presets: SettingsPreset[]; /** `default.packages`: loaded before any preset's layers. */ alwaysIncluded: string[]; /** sha256 of the mount's presets file, empty when absent. */ hash: string; /** The host token, used when adding to an inherited host default. */ hostHash?: string; /** The token an add to the default preset (`name: ''`) checks: the host file's when that default is inherited. */ defaultHash: string; file?: string; writtenFile?: string; } /** Preset writes use the admitted workspace mount, never a caller-supplied path. */ type PresetScope = 'host' | `workspace:${string}`; interface PresetWriteRequest { scope: PresetScope; expectedHash: string; name: string; } interface PresetCreateRequest extends PresetWriteRequest { description: string; layers?: string[]; } interface PresetRenameRequest extends PresetWriteRequest { newName: string; } /** A caller-supplied curated definition. Existing layers are never modified. */ interface PresetLayerDefinition { packages?: Array; }>; extensions?: string[]; hookGroups?: string[]; } interface PresetLayerRequest extends PresetWriteRequest { /** Set name to an empty string to add to the scope's default preset. */ layer: string; definition?: PresetLayerDefinition; } type PresetOperation = 'create' | 'rename' | 'delete' | 'default' | 'add-layer' | 'remove-layer'; interface PresetReference { file: string; key: string; } /** One repository the picker offers. */ type SettingsRepository = RepositorySettingsRepository; //#endregion //#region src/services/presets/index.d.ts /** Serialize settings writes and the marketplace's final clash check plus membership commit. */ export declare function withSettingsWrite(action: () => Promise): Promise; /** Effective presets, with the hash of the file owned by this mount. */ export declare function readPresetsView(fs: FileSystem, homeDirectory: string, environment: NodeJS.ProcessEnv, root?: string): Promise; /** One comment-preserving atomic edit, validated by the same composer as runtime loads. */ export declare function writePreset(fs: FileSystem, home: string, environment: NodeJS.ProcessEnv, operation: PresetOperation, input: PresetWriteRequest | PresetCreateRequest | PresetRenameRequest | PresetLayerRequest, root?: string, repositories?: readonly SettingsRepository[]): Promise; //#endregion export { type LayerDefinition, type LayerPackage, type LayerPackageConfig, type LayerResolvers, type PackageNameResolver, type PresetDefinition, type PresetsConfig, type ReadPresetsConfigOptions, type ResolvedLayerDefinition, type ResolvedPackageConfiguration, isLocalPackageSpecifier, layerEntries, readPackageConfigurations, readPresetsConfig, readPresetsConfigLenient, resolveLayers, resolvePackageConfigurations }; //# sourceMappingURL=presets.d.mts.map