/** * Parse `taskDefinition` leaves out of a deployed BPMN model. * * The demand side of the demand×supply model (S4) is the set of routing tokens * the deployed processes ask for. In a Nano/Camunda-8 model each demand is a * service task's `` — the job type the engine * matches 1:1 against a worker's routing token. This scanner reads those leaves * out of the raw BPMN XML so the model can bucket them by network prefix and * diff them against live supply. * * It is deliberately a small, dependency-free regex scan over the same surface * the Urban toolkit's worker-io deriver reads, so it stays app-tier and never * touches the engine internals — the XML arrives from the C8 REST API * ({@link ./c8-rest.ts}). */ /** One deployed `taskDefinition` leaf: a job type demanded by a model element. */ export interface TaskDefinitionLeaf { /** The `zeebe:taskDefinition` `type` — the routing token the engine matches. */ readonly taskType: string; /** The `bpmn:process` id the leaf was declared in (best-effort, may be empty). */ readonly process: string; /** The service-task element id carrying the leaf (best-effort, may be empty). */ readonly elementId: string; /** * True when the service task carries a `` * — its base-prompt side-car. This is the *structural* agentic signal (per nwf * `SPEC.md` §"Agent job contract"): every external agent task delivers its base * prompt through a `linkName="prompt"` linked resource, and no in-process * (deterministic) worker task does. Agentic-ness is read from this flag, NOT * from the `taskType` string — the deployed models use arbitrary type strings * (colon-form `senior:retro`, dot-form, bare) that a routing-token grammar * would mis-classify. */ readonly agentic: boolean; } /** * Scan one BPMN document for its service-task `taskDefinition` leaves. * * Every `` carrying a `` with a * non-empty type yields a leaf; tasks without a task definition (or with an empty * type) are skipped. The scan is order-preserving and tolerant of attribute * ordering and self-closing task-definition tags. Each leaf also records whether * the task carries a `linkName="prompt"` linked resource (its `agentic` flag). */ export declare function scanTaskDefinitions(xml: string): TaskDefinitionLeaf[]; /** * Scan many BPMN documents and return the distinct demanded job types, in first * occurrence order. The demand×supply model only needs the distinct set of * routing tokens; {@link scanTaskDefinitions} keeps the full leaves for callers * that want element provenance. */ export declare function distinctTaskTypes(leaves: readonly TaskDefinitionLeaf[]): string[];