import { DefinedTask, TaskImpl } from "./types"; export interface DefineTaskOptions { description?: string; labels?: string[]; kind?: string; source?: string; inputSchema?: Record; outputSchema?: Record | false | null; } /** * Backward-compatible single-object form accepted by defineTask. * Two flavors are recognized: * 1. Static TaskDef shape: { id|name, kind, title, labels, ...rest } — the * whole object (minus id/name/run/source/inputs/outputs) is treated as a * static TaskDef returned for every invocation. * 2. Run-function shape: { id|name, run(args, ctx) -> TaskDef|Promise, * description?, labels?, kind?, source?, inputs?, outputs? } — `run` is * used as the impl. `inputs`/`outputs` schemas are stored as metadata for * tooling but are not enforced at runtime. * * This shape is used by ~75 library/contrib and library/methodologies files * authored against an earlier SDK API; supporting it here keeps those processes * runnable without per-file rewrites. */ export interface DefineTaskObjectSpec { id?: string; name?: string; description?: string; labels?: string[]; kind?: string; source?: string; run?: TaskImpl; inputs?: Record; outputs?: Record; [key: string]: unknown; } export declare function defineTask(id: string, impl: TaskImpl, options?: DefineTaskOptions): DefinedTask; export declare function defineTask(spec: DefineTaskObjectSpec): DefinedTask; //# sourceMappingURL=defineTask.d.ts.map