/** * @license * Copyright 2025 Steven Roussey * SPDX-License-Identifier: Apache-2.0 */ import { CreateWorkflow, IExecuteContext, Task } from "@workglow/task-graph"; import type { CachePolicy, IRunConfig, TaskConfig } from "@workglow/task-graph"; import { DataPortSchema } from "@workglow/util/schema"; import type { Capability } from "../capability/Capabilities"; import type { ModelRecord } from "../model/ModelSchema"; /** * A single result item from a model search. */ export interface ModelSearchResultItem { readonly id: string; readonly label: string; readonly description: string; readonly record: Partial; readonly raw: unknown; } export type ModelSearchTaskInput = { credential_key?: string | undefined; query?: string | undefined; provider: string; }; export type ModelSearchTaskOutput = { results: ModelSearchResultItem[]; }; export type ModelSearchTaskConfig = TaskConfig; /** * Search for models using a provider-specific run function from the AiProviderRegistry. */ export declare class ModelSearchTask extends Task { static type: string; /** * Informational: capability this task uses. NOT enforced by the dispatcher — * ModelSearchTask extends `Task` (not `AiTask`) and implements its own * `execute()`, so `gateOrThrow` is never called against this value. The audit * test in `task/index.test.ts` validates the value is a known {@link Capability}. */ static readonly requires: readonly Capability[]; static category: string; static title: string; static description: string; static cachePolicy: CachePolicy; static hasDynamicSchemas: boolean; static inputSchema(): DataPortSchema; static outputSchema(): DataPortSchema; inputSchema(): DataPortSchema; execute(input: ModelSearchTaskInput, context: IExecuteContext): Promise; } /** * Search for models using a provider-specific search function. */ export declare const modelSearch: (input: ModelSearchTaskInput, config?: ModelSearchTaskConfig, runConfig?: Partial) => Promise; declare module "@workglow/task-graph" { interface Workflow { modelSearch: CreateWorkflow; } } //# sourceMappingURL=ModelSearchTask.d.ts.map