/** User-facing configuration for the local ComfyUI image provider. */ import z from '@deepseek-ai/schemastery'; import { DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_EXTRA_ARGS, DEFAULT_COMFYUI_PYTHON_EXE, DEFAULT_COMFYUI_SERVER_DIR, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, IMAGE_PROVIDERS, activeComfyUIWorkflow, resolveComfyUIWorkflows, type ComfyUIWorkflowEntry, type ComfyUIWorkflowRole, type ImageProvider } from './shared.js'; export { DEFAULT_COMFYUI_BASE_URL, DEFAULT_COMFYUI_EXTRA_ARGS, DEFAULT_COMFYUI_PYTHON_EXE, DEFAULT_COMFYUI_SERVER_DIR, DEFAULT_COMFYUI_TIMEOUT_MS, DEFAULT_COMFYUI_WORKFLOW_LABEL, IMAGE_PROVIDERS, activeComfyUIWorkflow, resolveComfyUIWorkflows, type ComfyUIWorkflowEntry, type ImageProvider, }; /** Default workspace subfolder that receives generated image files. */ export declare const DEFAULT_WORKSPACE_FOLDER = "dsh-arya-image-gen"; /** Bundle configuration from the profile patch and the Web settings page. */ export interface Config { /** Legacy persisted provider; this fork only understands "comfyui". */ provider?: ImageProvider; comfyuiBaseURL?: string; /** Named ComfyUI workflows managed by the Web settings page. */ comfyuiWorkflows?: ComfyUIWorkflowEntry[]; /** Name of the workflow ComfyUI calls use by default. */ comfyuiActiveWorkflow?: string; /** Active workflow for text-to-image generation. */ comfyuiActiveTextWorkflow?: string; /** Active workflow for image-to-image editing. */ comfyuiActiveEditWorkflow?: string; /** Legacy single-workflow storage; synced to the active entry for downgrades. */ comfyuiWorkflowJson?: string; /** Original imported file name of the legacy single workflow. */ comfyuiWorkflowName?: string; comfyuiTimeoutMs?: number; /** Optional request headers as a JSON object, e.g. a reverse-proxy Authorization token. */ comfyuiHeadersJson?: string; /** Python interpreter used by the built-in ComfyUI server launcher. */ comfyuiPythonExe?: string; /** ComfyUI checkout directory the server is launched from (main.py lives here). */ comfyuiServerDir?: string; /** Extra main.py arguments appended on launch, e.g. "--listen 127.0.0.1 --disable-auto-launch". */ comfyuiExtraArgs?: string; /** Launch the ComfyUI server automatically when the plugin boots and it is down. */ comfyuiAutoStart?: boolean; /** How Start/Stop reach this machine's ComfyUI. */ comfyuiLaunchMode?: 'auto' | 'scheduled-task' | 'process'; /** Task Scheduler task the plugin runs and ends when using the scheduled-task launch. */ comfyuiScheduledTaskName?: string; /** * Register the Arya Image agent preset: core DSH tools plus this plugin's * tools, with the other installed bundles' tools masked out to save context. */ agentPreset?: boolean; /** Also write every generated image as a file under the session workspace. */ saveToWorkspace?: boolean; /** Workspace subfolder for generated images; empty means the workspace root. */ workspaceFolder?: string; } /** * Cordis configuration schema. Volatile marking happens per field (see * `volatile`); the `z` annotation keeps the plain output type for the * rest of the codebase because the wrapping is unwrapped at the entry. */ /** Workflows a fresh configuration starts with: the shipped pack. */ export declare const DEFAULT_WORKFLOWS: { name: string; json: string; }[]; export declare const Config: z; /** Resolve the single (ComfyUI) provider profile for a tool call. */ export declare function resolveProvider(config: Config): { provider: 'comfyui'; baseURL: string; headers: Record; workflows: ComfyUIWorkflowEntry[]; workflow?: ComfyUIWorkflowEntry; timeoutMs: number; }; /** The workflow a ComfyUI call runs: the requested name when given, else the active one. */ export declare function selectComfyUIWorkflow(active: { workflows: ComfyUIWorkflowEntry[]; workflow?: ComfyUIWorkflowEntry; }, requested?: string): ComfyUIWorkflowEntry; /** * Pick the workflow a call runs, honouring the role it needs. * * Generation resolves the active text-to-image workflow and editing resolves * the active image-to-image one, so a caller never has to know which graph is * which. Naming a workflow explicitly still works, but naming one from the * other role fails with the name of the workflow that would have worked. * * @param config - current plugin configuration. * @param role - role the call needs. * @param requested - optional workflow name from the tool arguments. * @returns the workflow to run. */ export declare function selectWorkflowForRole(config: Config, role: ComfyUIWorkflowRole, requested?: string): ComfyUIWorkflowEntry; /** Parse the space-separated extra main.py arguments; quotes keep grouped values together. */ export declare function parseComfyUIExtraArgs(value: string | undefined): string[];