import { type CapabilityPreset } from '../agent-manifest/schema.js'; import { resolveCapabilityPresetLayer } from '../agent-manifest/resolver.js'; import type { Config } from '../config/schema.js'; export type CapabilityPresetAdminResult = { ok: true; data: T; } | { ok: false; error: string; status?: 400 | 404 | 409 | 500; }; export type CapabilityPresetAgentUsage = { agentId: string; agentName?: string; direct: boolean; }; export type CapabilityPresetRow = CapabilityPreset & { usage: CapabilityPresetAgentUsage[]; inherited: ReturnType['patch']; inheritedSources: Record; }; export type CapabilityPresetsListResponse = { defaultPresetId: string; presets: CapabilityPresetRow[]; agents: Array<{ id: string; name?: string; extends: string[]; }>; builtinToolIds: string[]; mcpServerIds: string[]; workflows: Array<{ id: string; title: string; description: string; }>; }; export type CapabilityPresetPreviewDiff = { path: string; before?: unknown; after?: unknown; }; export type CapabilityPresetPreviewAgent = { agentId: string; agentName?: string; diffs: CapabilityPresetPreviewDiff[]; }; export type CreateCapabilityPresetBody = { id?: string; name?: string; description?: string; version?: number; extends?: CapabilityPreset['extends']; models?: CapabilityPreset['models']; tools?: CapabilityPreset['tools']; skills?: CapabilityPreset['skills']; workflows?: CapabilityPreset['workflows']; boundaries?: CapabilityPreset['boundaries']; runtime?: CapabilityPreset['runtime']; locks?: CapabilityPreset['locks']; }; export type UpdateCapabilityPresetBody = { name?: string; description?: string | null; version?: number; extends?: string[] | null; models?: CapabilityPreset['models'] | null; tools?: CapabilityPreset['tools'] | null; skills?: CapabilityPreset['skills'] | null; workflows?: CapabilityPreset['workflows'] | null; boundaries?: CapabilityPreset['boundaries'] | null; runtime?: CapabilityPreset['runtime'] | null; locks?: string[] | null; }; export declare function listCapabilityPresets(cfg: Config): CapabilityPresetsListResponse; export declare function prepareCreateCapabilityPreset(cfg: Config, body: CreateCapabilityPresetBody): CapabilityPresetAdminResult<{ nextConfig: Config; presetId: string; }>; export declare function prepareUpdateCapabilityPreset(cfg: Config, presetIdRaw: string, body: UpdateCapabilityPresetBody): CapabilityPresetAdminResult<{ nextConfig: Config; }>; export declare function previewCapabilityPresetUpdate(cfg: Config, presetIdRaw: string, body: UpdateCapabilityPresetBody): CapabilityPresetAdminResult<{ agents: CapabilityPresetPreviewAgent[]; }>; export declare function prepareDeleteCapabilityPreset(cfg: Config, presetIdRaw: string): CapabilityPresetAdminResult<{ nextConfig: Config; }>;