import type { HumanIoMapping } from "../io-mapping.js"; /** Binds an LLM prompt resource to an agent service task. Emits, alongside the * task's `zeebe:taskDefinition` capability token, a * `` * extension — the shape the nano-workforce agent tasks use to attach a prompt * script to the worker that services the job. */ export interface PromptBinding { /** The `GenericScript` resource id bound as the prompt (the linkedResource * `resourceId`, e.g. `"retro.md"`). Required and non-empty. */ resourceId: string; /** The linkedResource `bindingType` — how the engine resolves the resource * version at deploy time. Defaults to `"latest"`. */ bindingType?: string; /** Optional prompt addendum: a FEEL expression (or literal) fed to the worker * through a `` * input, the convention the agent tasks use to append runtime context to the * bound prompt. Omitted → no `ioMapping` is emitted. */ append?: string; } declare module "../types.js" { interface FlowNodeRegistry { task: { kind: "task"; name: string; envelopes?: NodeEnvelopes; jobType?: string; /** The agent prompt binding, when the task is an LLM-agent service task. */ prompt?: PromptBinding; /** An explicit `` on the service task — arbitrary input * (and output) variable mappings, using the shared ioMapping shape. When a * `prompt.append` is ALSO present it is folded into this single mapping as * an extra `appendPrompt` input (no duplicate `ioMapping` element). */ io?: HumanIoMapping; }; } } declare module "../declarative.js" { interface FlowBuilder { /** * An AGENT external service task: as `task`, but additionally binds an LLM * `prompt` resource to the worker via a `zeebe:linkedResource` * (`resourceType="GenericScript" linkName="prompt"`). Pair it with a * `{ jobType }` capability token (e.g. `senior:retro`) so an agent pool * services it. `prompt.append` (optional) feeds a FEEL expression to the * worker through a `zeebe:ioMapping` `appendPrompt` input. `io` (optional) * adds arbitrary input/output variable mappings to the SAME `zeebe:ioMapping`. */ task(name: K, opts: { jobType?: string; prompt: PromptBinding; io?: HumanIoMapping; }): FlowBuilder; } }