import * as s from '../schemas'; import type { Transport } from './transport'; /** * Body for creating a preset (POST `/api/presets`). `description` is the bound * tool's LLM-facing docstring — REQUIRED non-empty on every create path (the door * rejects an empty one with a 422); it is never the tool_meta `display_name`. * `extensions` is the combos list — the create flow OMITS it when there are no * combos (the route rejects an explicit `extensions: []`). `output_schema` is the * optional author-set output JSON Schema; `input_schema` is the optional author-set * input JSON Schema, read by the router as a top-level version field. Each combo * element is a bare extension name or a `{ name, config }` mapping. Categorization * tags live in the tool_meta overlay, written after a successful create — never in * this body. */ export interface CreatePresetBody { readonly name: string; readonly base_tool: string; readonly description: string; readonly fixed_kwargs?: Record; readonly extensions?: readonly s.PresetExtensionElement[][]; readonly output_schema?: Record | null; readonly input_schema?: Record | null; readonly state_binding?: s.StateBinding | null; } /** * Body for saving a new preset version (POST `/api/presets/{name}/versions`). At * least one field must be provided (an empty body is a loud 400). Each field's * sentinel is uniform: omitted carries the active version's value forward; an * explicit `[]` clears `extensions`, and an explicit `null` clears `output_schema` * or `input_schema`. `input_schema` is the optional author-set input JSON Schema and * follows the same carry-forward sentinel as `output_schema`. `state_binding` is the * optional door-layer binding and follows the same sentinel: omitted carries the active * one forward, an explicit `null` clears it. `description` carries forward when omitted; * an explicit non-empty string sets it (the API rejects an explicit empty one). * Categorization tags are not a version field — they live in the tool_meta overlay. */ export interface SavePresetVersionBody { readonly fixed_kwargs?: Record; readonly description?: string; readonly extensions?: readonly s.PresetExtensionElement[][]; readonly output_schema?: Record | null; readonly input_schema?: Record | null; readonly state_binding?: s.StateBinding | null; } /** * Body for the dry-run validate door (POST `/api/presets/validate`). `name` is * required and selects the verdict mode server-side: CREATE when no preset named * `name` exists (then `base_tool` is required), VERSION when one does (the version * fields are read under save-version semantics). The draft is sent exactly as the * matching write would send it. */ export interface ValidatePresetBody { readonly name: string; readonly base_tool?: string; readonly description?: string; readonly fixed_kwargs?: Record; readonly extensions?: readonly s.PresetExtensionElement[][]; readonly output_schema?: Record | null; readonly input_schema?: Record | null; readonly state_binding?: s.StateBinding | null; } export declare function presetsClient(t: Transport): { listPresets: (signal?: AbortSignal) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; }[]>; createPreset: (body: CreatePresetBody) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; }>; getPreset: (name: string, signal?: AbortSignal) => Promise<{ name: string; base_tool: string; description: string; active_version: number; extensions: (string | { name: string; config: Record; })[][]; output_schema: Record | null; input_schema: Record | null; conflicted: boolean; conflicted_reason: string | null; uses: string[]; used_by: string[]; fixed_kwargs: Record; }>; listPresetVersions: (name: string, signal?: AbortSignal) => Promise<{ version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; tags: string[]; created_at: string; is_current: boolean; }[]>; getPresetVersion: (name: string, version: number, signal?: AbortSignal) => Promise<{ version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; tags: string[]; created_at: string; is_current: boolean; }>; savePresetVersion: (name: string, body: SavePresetVersionBody) => Promise<{ version: number; body: { base_tool: string; description: string; extensions: (string | Record)[][]; fixed_kwargs: Record; input_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; output_schema: Record | { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state_binding: { states: { input_injections: { into: string; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; scope_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; state: string; subject_expr: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; }; templates: string[]; updates: { adapter: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; jq: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; op_id: { content?: string | undefined; id?: string | undefined; kwargs?: Record | undefined; } | null; template_jq: string | null; }[]; }[]; } | null; }; tags: string[]; created_at: string; is_current: boolean; }>; rollbackPreset: (name: string, version: number) => Promise<{ name: string; active_version: number; }>; deletePreset: (name: string) => Promise<{ name: string; deleted: true; }>; renamePreset: (name: string, newName: string) => Promise<{ name: string; renamed_from: string; active_version: number; }>; getPresetReferees: (name: string, signal?: AbortSignal) => Promise<{ name: string; referees: string[]; }>; validatePreset: (body: ValidatePresetBody) => Promise<{ valid: boolean; error: string | null; }>; setPresetVersionTags: (name: string, version: number, tags: readonly string[]) => Promise<{ name: string; version: number; tags: string[]; }>; }; //# sourceMappingURL=presets-client.d.ts.map