@db-lyon/flowkit 0.9.0 → 0.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (53) hide show
  1. package/README.md +37 -0
  2. package/dist/config/index.d.ts +2 -2
  3. package/dist/config/index.d.ts.map +1 -1
  4. package/dist/config/index.js +1 -1
  5. package/dist/config/index.js.map +1 -1
  6. package/dist/config/schema.d.ts +405 -18
  7. package/dist/config/schema.d.ts.map +1 -1
  8. package/dist/config/schema.js +67 -2
  9. package/dist/config/schema.js.map +1 -1
  10. package/dist/flow/runner.d.ts +14 -1
  11. package/dist/flow/runner.d.ts.map +1 -1
  12. package/dist/flow/runner.js +72 -2
  13. package/dist/flow/runner.js.map +1 -1
  14. package/dist/index.d.ts +10 -3
  15. package/dist/index.d.ts.map +1 -1
  16. package/dist/index.js +5 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/task/agent-prompt-task.d.ts +26 -7
  19. package/dist/task/agent-prompt-task.d.ts.map +1 -1
  20. package/dist/task/agent-prompt-task.js +53 -19
  21. package/dist/task/agent-prompt-task.js.map +1 -1
  22. package/dist/task/agent-task.d.ts +98 -0
  23. package/dist/task/agent-task.d.ts.map +1 -0
  24. package/dist/task/agent-task.js +254 -0
  25. package/dist/task/agent-task.js.map +1 -0
  26. package/dist/task/base-task.d.ts +25 -0
  27. package/dist/task/base-task.d.ts.map +1 -1
  28. package/dist/task/base-task.js.map +1 -1
  29. package/dist/task/concurrency.d.ts +9 -0
  30. package/dist/task/concurrency.d.ts.map +1 -0
  31. package/dist/task/concurrency.js +24 -0
  32. package/dist/task/concurrency.js.map +1 -0
  33. package/dist/task/index.d.ts +11 -1
  34. package/dist/task/index.d.ts.map +1 -1
  35. package/dist/task/index.js +6 -0
  36. package/dist/task/index.js.map +1 -1
  37. package/dist/task/json-schema.d.ts +37 -0
  38. package/dist/task/json-schema.d.ts.map +1 -0
  39. package/dist/task/json-schema.js +223 -0
  40. package/dist/task/json-schema.js.map +1 -0
  41. package/dist/task/llm-provider.d.ts +81 -8
  42. package/dist/task/llm-provider.d.ts.map +1 -1
  43. package/dist/task/llm-provider.js +9 -3
  44. package/dist/task/llm-provider.js.map +1 -1
  45. package/dist/task/llm-runner.d.ts +72 -0
  46. package/dist/task/llm-runner.d.ts.map +1 -0
  47. package/dist/task/llm-runner.js +213 -0
  48. package/dist/task/llm-runner.js.map +1 -0
  49. package/dist/task/redact.d.ts +22 -0
  50. package/dist/task/redact.d.ts.map +1 -0
  51. package/dist/task/redact.js +47 -0
  52. package/dist/task/redact.js.map +1 -0
  53. package/package.json +1 -1
@@ -0,0 +1,98 @@
1
+ import { BaseTask, type TaskResult } from './base-task.js';
2
+ import { type AgentRunFields } from './llm-runner.js';
3
+ /**
4
+ * A tool the agent may call. Backed by an existing flowkit primitive — a
5
+ * `task`, a `flow`, or another `agent` — or by a context handler. Exactly one
6
+ * backing is used, resolved in that order; `flow`/`agent` require a FlowRunner
7
+ * context.
8
+ */
9
+ export interface AgentToolSpec {
10
+ /**
11
+ * Name exposed to the model. Defaults to the referenced task/flow/agent.
12
+ * Required when the tool is backed by a context handler (`ctx.agentTools`).
13
+ */
14
+ name?: string;
15
+ /** Flowkit task to invoke when the model calls this tool. */
16
+ task?: string;
17
+ /** Flowkit flow to run when the model calls this tool. */
18
+ flow?: string;
19
+ /** Another agent to invoke (sub-agent) when the model calls this tool. */
20
+ agent?: string;
21
+ /** Human/model-readable description of what the tool does. */
22
+ description?: string;
23
+ /**
24
+ * JSON Schema for the tool's arguments. Describes the tool to the model and
25
+ * is enforced before the tool runs — invalid arguments are rejected and fed
26
+ * back to the model rather than executed.
27
+ */
28
+ parameters?: Record<string, unknown>;
29
+ }
30
+ export interface AgentTaskOptions extends AgentRunFields {
31
+ /** Initial user prompt / task for the agent. Required. */
32
+ prompt: string;
33
+ /** System prompt / instructions. */
34
+ system?: string;
35
+ model?: string;
36
+ maxTokens?: number;
37
+ temperature?: number;
38
+ /** Tools the agent is allowed to call. Acts as an allowlist. */
39
+ tools?: AgentToolSpec[];
40
+ /** Max model turns before the agent gives up. Default 8. */
41
+ maxIterations?: number;
42
+ /**
43
+ * Aggregate token budget across the whole loop (input + output, summed over
44
+ * every turn and sub-agent). The loop stops and the step fails once it is
45
+ * reached. Default 0 (unbounded). Strongly recommended for any agent with
46
+ * tools — a tool loop with no token cap is unbounded spend.
47
+ */
48
+ tokenBudget?: number;
49
+ /** Max tool calls executed concurrently within a single turn. Default 4. */
50
+ maxConcurrency?: number;
51
+ /** Cap on a single tool result's serialized size, in chars. Default 8000. */
52
+ maxToolResultChars?: number;
53
+ /** Max depth of agent-calls-agent recursion. Default 6. */
54
+ maxAgentDepth?: number;
55
+ /**
56
+ * JSON Schema for the final answer. When set, once the agent stops calling
57
+ * tools its answer is rendered and validated as schema-conforming JSON
58
+ * (with repair). A persistent mismatch fails the task.
59
+ */
60
+ schema?: Record<string, unknown>;
61
+ }
62
+ /**
63
+ * Agentic, multi-turn LLM task with tool calling.
64
+ *
65
+ * The model is given a set of tools (each backed by a flowkit task or a host
66
+ * `ctx.agentTools` handler) and loops: it requests tool calls, the agent runs
67
+ * them, feeds the results back, and repeats until the model produces a final
68
+ * answer or `maxIterations` is reached.
69
+ *
70
+ * Tools form a strict allowlist — only declared tools are callable, and the
71
+ * model's arguments are validated against each tool's `parameters` schema
72
+ * before the tool runs. The provider must be on the context as `ctx.llm`.
73
+ *
74
+ * Output shape (`result.data`):
75
+ * - `text` — the final answer text
76
+ * - `parsed` — final structured value when `schema` was provided
77
+ * - `iterations` — number of model turns taken
78
+ * - `toolCalls` — record of every tool call (name, args, ok, result)
79
+ * - `usage` — aggregated token usage across all turns, if reported
80
+ * - `finishReason` — final stop reason
81
+ */
82
+ export declare class AgentTask extends BaseTask<AgentTaskOptions> {
83
+ get taskName(): string;
84
+ protected validate(): void;
85
+ execute(): Promise<TaskResult>;
86
+ /**
87
+ * Dispatch one tool call. Enforces the allowlist and the argument schema
88
+ * before executing; any rejection becomes a result string fed back to the
89
+ * model so it can correct itself rather than aborting the run.
90
+ */
91
+ private runTool;
92
+ /**
93
+ * Render the agent's final answer as schema-conforming JSON. Delegates to the
94
+ * runner so validation + repair behave exactly as in the single-shot task.
95
+ */
96
+ private finalizeStructured;
97
+ }
98
+ //# sourceMappingURL=agent-task.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-task.d.ts","sourceRoot":"","sources":["../../src/task/agent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAQ3D,OAAO,EAKL,KAAK,cAAc,EACpB,MAAM,iBAAiB,CAAC;AAKzB;;;;;GAKG;AACH,MAAM,WAAW,aAAa;IAC5B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,6DAA6D;IAC7D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,8DAA8D;IAC9D,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;OAIG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACtC;AAED,MAAM,WAAW,gBAAiB,SAAQ,cAAc;IACtD,0DAA0D;IAC1D,MAAM,EAAE,MAAM,CAAC;IACf,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gEAAgE;IAChE,KAAK,CAAC,EAAE,aAAa,EAAE,CAAC;IACxB,4DAA4D;IAC5D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;;OAKG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,6EAA6E;IAC7E,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2DAA2D;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;;;OAIG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAUD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,qBAAa,SAAU,SAAQ,QAAQ,CAAC,gBAAgB,CAAC;IACvD,IAAI,QAAQ,WAEX;IAED,SAAS,CAAC,QAAQ,IAAI,IAAI;IAWpB,OAAO,IAAI,OAAO,CAAC,UAAU,CAAC;IAsJpC;;;;OAIG;YACW,OAAO;IAgErB;;;OAGG;YACW,kBAAkB;CA4BjC"}
@@ -0,0 +1,254 @@
1
+ import { BaseTask } from './base-task.js';
2
+ import { runCompletion, pickRunOptions, coerceStructured, StructuredOutputError, } from './llm-runner.js';
3
+ import { validateJson, formatErrors } from './json-schema.js';
4
+ import { preview, truncate } from './redact.js';
5
+ import { mapLimit } from './concurrency.js';
6
+ /**
7
+ * Agentic, multi-turn LLM task with tool calling.
8
+ *
9
+ * The model is given a set of tools (each backed by a flowkit task or a host
10
+ * `ctx.agentTools` handler) and loops: it requests tool calls, the agent runs
11
+ * them, feeds the results back, and repeats until the model produces a final
12
+ * answer or `maxIterations` is reached.
13
+ *
14
+ * Tools form a strict allowlist — only declared tools are callable, and the
15
+ * model's arguments are validated against each tool's `parameters` schema
16
+ * before the tool runs. The provider must be on the context as `ctx.llm`.
17
+ *
18
+ * Output shape (`result.data`):
19
+ * - `text` — the final answer text
20
+ * - `parsed` — final structured value when `schema` was provided
21
+ * - `iterations` — number of model turns taken
22
+ * - `toolCalls` — record of every tool call (name, args, ok, result)
23
+ * - `usage` — aggregated token usage across all turns, if reported
24
+ * - `finishReason` — final stop reason
25
+ */
26
+ export class AgentTask extends BaseTask {
27
+ get taskName() {
28
+ return 'agent';
29
+ }
30
+ validate() {
31
+ if (!this.options?.prompt || typeof this.options.prompt !== 'string') {
32
+ throw new Error('agent requires a `prompt` string option');
33
+ }
34
+ for (const spec of this.options.tools ?? []) {
35
+ if (!spec.task && !spec.flow && !spec.agent && !spec.name) {
36
+ throw new Error('agent tool must reference a `task`, `flow`, or `agent`, or declare a `name`');
37
+ }
38
+ }
39
+ }
40
+ async execute() {
41
+ const provider = this.ctx.llm;
42
+ if (!provider || typeof provider.complete !== 'function') {
43
+ return {
44
+ success: false,
45
+ error: new Error('agent: no LLM provider configured. Attach one to ctx.llm before running.'),
46
+ };
47
+ }
48
+ const { prompt, system, model, maxTokens, temperature, tools = [], maxIterations = 8, tokenBudget = 0, maxConcurrency = 4, schema, } = this.options;
49
+ const runOpts = pickRunOptions(this.options);
50
+ const specsByName = new Map();
51
+ const toolDefs = [];
52
+ for (const spec of tools) {
53
+ const name = (spec.name ?? spec.task ?? spec.flow ?? spec.agent);
54
+ specsByName.set(name, spec);
55
+ toolDefs.push({
56
+ name,
57
+ description: spec.description,
58
+ parameters: spec.parameters ?? { type: 'object', properties: {} },
59
+ });
60
+ }
61
+ const messages = [{ role: 'user', content: prompt }];
62
+ const toolCallLog = [];
63
+ const usage = { inputTokens: 0, outputTokens: 0 };
64
+ let finishReason;
65
+ this.logger.debug({ model, tools: toolDefs.map((t) => t.name), prompt: preview(prompt) }, 'agent: starting loop');
66
+ try {
67
+ for (let iteration = 1; iteration <= maxIterations; iteration++) {
68
+ if (tokenBudget > 0 && usage.inputTokens + usage.outputTokens >= tokenBudget) {
69
+ return {
70
+ success: false,
71
+ error: new Error(`agent exceeded token budget (${tokenBudget})`),
72
+ data: { iterations: iteration - 1, toolCalls: toolCallLog, usage, finishReason },
73
+ };
74
+ }
75
+ const response = await runCompletion(provider, {
76
+ system,
77
+ messages,
78
+ model,
79
+ maxTokens,
80
+ temperature,
81
+ tools: toolDefs.length > 0 ? toolDefs : undefined,
82
+ toolChoice: toolDefs.length > 0 ? 'auto' : undefined,
83
+ }, runOpts, this.logger);
84
+ accumulateUsage(usage, response);
85
+ finishReason = response.finishReason;
86
+ const calls = response.toolCalls ?? [];
87
+ if (calls.length === 0) {
88
+ // Final answer. Apply structured output if a schema was requested.
89
+ const data = {
90
+ text: response.text,
91
+ iterations: iteration,
92
+ toolCalls: toolCallLog,
93
+ finishReason,
94
+ };
95
+ if (usage.inputTokens || usage.outputTokens)
96
+ data.usage = usage;
97
+ if (schema) {
98
+ // If the final answer already conforms, take it as-is; only spend a
99
+ // round-trip on the structured pass when it doesn't.
100
+ const direct = coerceStructured(response, schema);
101
+ if (!direct.errors) {
102
+ data.parsed = direct.parsed;
103
+ }
104
+ else {
105
+ const structured = await this.finalizeStructured(provider, messages, response, schema, runOpts);
106
+ accumulateUsage(usage, structured);
107
+ data.text = structured.text;
108
+ data.parsed = structured.parsed;
109
+ if (usage.inputTokens || usage.outputTokens)
110
+ data.usage = usage;
111
+ }
112
+ }
113
+ return { success: true, data };
114
+ }
115
+ // Record the assistant's tool-call turn, then run the calls. Multiple
116
+ // calls in one turn (e.g. parallel sub-agents) run concurrently under
117
+ // maxConcurrency; results are reassembled in call order so the
118
+ // conversation the model sees is deterministic.
119
+ messages.push({ role: 'assistant', content: response.text, toolCalls: calls });
120
+ const records = await mapLimit(calls, maxConcurrency, (call) => this.runTool(specsByName, call.name, call.arguments));
121
+ for (let i = 0; i < calls.length; i++) {
122
+ const call = calls[i];
123
+ const record = records[i];
124
+ toolCallLog.push(record);
125
+ messages.push({
126
+ role: 'tool',
127
+ toolCallId: call.id,
128
+ name: call.name,
129
+ content: record.result,
130
+ });
131
+ }
132
+ }
133
+ // Loop fell through — the model kept asking for tools.
134
+ return {
135
+ success: false,
136
+ error: new Error(`agent exceeded maxIterations (${maxIterations}) without a final answer`),
137
+ data: { iterations: maxIterations, toolCalls: toolCallLog, usage, finishReason },
138
+ };
139
+ }
140
+ catch (err) {
141
+ if (err instanceof StructuredOutputError) {
142
+ return {
143
+ success: false,
144
+ error: err,
145
+ data: { text: err.rawText, validationErrors: err.validationErrors, toolCalls: toolCallLog },
146
+ };
147
+ }
148
+ return {
149
+ success: false,
150
+ error: err instanceof Error ? err : new Error(String(err)),
151
+ data: { toolCalls: toolCallLog },
152
+ };
153
+ }
154
+ }
155
+ /**
156
+ * Dispatch one tool call. Enforces the allowlist and the argument schema
157
+ * before executing; any rejection becomes a result string fed back to the
158
+ * model so it can correct itself rather than aborting the run.
159
+ */
160
+ async runTool(specsByName, name, args) {
161
+ const cap = this.options.maxToolResultChars ?? 8000;
162
+ const fail = (result) => ({ name, arguments: args, ok: false, result });
163
+ const spec = specsByName.get(name);
164
+ if (!spec) {
165
+ return fail(`Error: unknown tool "${name}". It is not in the allowed tool list.`);
166
+ }
167
+ if (spec.parameters) {
168
+ const check = validateJson(args, spec.parameters);
169
+ if (!check.valid) {
170
+ return fail(`Error: invalid arguments — ${formatErrors(check.errors)}`);
171
+ }
172
+ }
173
+ this.logger.debug({ tool: name, args }, 'agent: invoking tool');
174
+ try {
175
+ let result;
176
+ if (spec.task) {
177
+ // Layer the model's arguments over the task's configured defaults, and
178
+ // resolve via its class_path, so a task behaves the same as a tool as it
179
+ // does as a flow step. Falls back to the task name when run outside a
180
+ // FlowRunner (no taskDefinitions on the context).
181
+ const def = this.ctx.taskDefinitions?.[spec.task];
182
+ const classPath = def?.class_path ?? spec.task;
183
+ result = await this.call(classPath, { ...(def?.options ?? {}), ...args });
184
+ }
185
+ else if (spec.flow) {
186
+ if (!this.ctx.runFlow) {
187
+ return fail(`Error: flow tools require a FlowRunner context (ctx.runFlow missing).`);
188
+ }
189
+ result = await this.ctx.runFlow(spec.flow, args);
190
+ }
191
+ else if (spec.agent) {
192
+ if (!this.ctx.runAgent) {
193
+ return fail(`Error: agent tools require a FlowRunner context (ctx.runAgent missing).`);
194
+ }
195
+ const myDepth = this.ctx.__agentDepth ?? 0;
196
+ const maxDepth = this.options.maxAgentDepth ?? 6;
197
+ if (myDepth >= maxDepth) {
198
+ return fail(`Error: max agent depth (${maxDepth}) reached; refusing to nest deeper.`);
199
+ }
200
+ result = await this.ctx.runAgent(spec.agent, args, myDepth + 1);
201
+ }
202
+ else {
203
+ const handler = this.ctx.agentTools?.[name];
204
+ if (typeof handler !== 'function') {
205
+ return fail(`Error: tool "${name}" has no task/flow/agent and no ctx.agentTools handler.`);
206
+ }
207
+ return { name, arguments: args, ok: true, result: truncate(serializeToolResult(await handler(args)), cap) };
208
+ }
209
+ if (!result.success) {
210
+ return fail(`Error: ${result.error?.message ?? 'tool invocation failed'}`);
211
+ }
212
+ return { name, arguments: args, ok: true, result: truncate(serializeToolResult(result.data ?? {}), cap) };
213
+ }
214
+ catch (err) {
215
+ return fail(`Error: ${err instanceof Error ? err.message : String(err)}`);
216
+ }
217
+ }
218
+ /**
219
+ * Render the agent's final answer as schema-conforming JSON. Delegates to the
220
+ * runner so validation + repair behave exactly as in the single-shot task.
221
+ */
222
+ async finalizeStructured(provider, messages, last, schema, runOpts) {
223
+ return runCompletion(provider, {
224
+ system: this.options.system,
225
+ messages: [
226
+ ...messages,
227
+ { role: 'assistant', content: last.text },
228
+ {
229
+ role: 'user',
230
+ content: 'Return your final answer as JSON conforming to the required schema.',
231
+ },
232
+ ],
233
+ model: this.options.model,
234
+ maxTokens: this.options.maxTokens,
235
+ temperature: this.options.temperature,
236
+ schema,
237
+ }, runOpts, this.logger);
238
+ }
239
+ }
240
+ function serializeToolResult(value) {
241
+ if (typeof value === 'string')
242
+ return value;
243
+ try {
244
+ return JSON.stringify(value);
245
+ }
246
+ catch {
247
+ return String(value);
248
+ }
249
+ }
250
+ function accumulateUsage(acc, resp) {
251
+ acc.inputTokens += resp.usage?.inputTokens ?? 0;
252
+ acc.outputTokens += resp.usage?.outputTokens ?? 0;
253
+ }
254
+ //# sourceMappingURL=agent-task.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"agent-task.js","sourceRoot":"","sources":["../../src/task/agent-task.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAmB,MAAM,gBAAgB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CAAC,MAAM,CACZ,CAAC;IACJ,CAAC;CACF;AAED,SAAS,mBAAmB,CAAC,KAAc;IACzC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,KAAK,CAAC;IAC5C,IAAI,CAAC;QACH,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC/B,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACvB,CAAC;AACH,CAAC;AAED,SAAS,eAAe,CACtB,GAAkD,EAClD,IAA2B;IAE3B,GAAG,CAAC,WAAW,IAAI,IAAI,CAAC,KAAK,EAAE,WAAW,IAAI,CAAC,CAAC;IAChD,GAAG,CAAC,YAAY,IAAI,IAAI,CAAC,KAAK,EAAE,YAAY,IAAI,CAAC,CAAC;AACpD,CAAC"}
@@ -1,8 +1,33 @@
1
1
  import type { Logger } from '../logger.js';
2
2
  import type { TaskRegistry } from './registry.js';
3
+ import type { LLMProvider, LLMToolHandler } from './llm-provider.js';
4
+ import type { TaskDefinition } from '../config/schema.js';
3
5
  export interface TaskContext {
4
6
  logger?: Logger;
5
7
  registry?: TaskRegistry;
8
+ /** LLM provider consumed by `AgentPromptTask` / `AgentTask`. */
9
+ llm?: LLMProvider;
10
+ /** Programmatic agent tools, keyed by the name exposed to the model. */
11
+ agentTools?: Record<string, LLMToolHandler>;
12
+ /**
13
+ * Configured task definitions, supplied by `FlowRunner`, so that tasks used
14
+ * as agent tools inherit their configured `class_path` and `options` defaults.
15
+ */
16
+ taskDefinitions?: Record<string, TaskDefinition>;
17
+ /**
18
+ * Run a configured flow as an agent tool. Wired by `FlowRunner`; absent when
19
+ * a task runs outside one. Returns a task-shaped result whose `data.steps`
20
+ * maps each step name to its output.
21
+ */
22
+ runFlow?: (flowName: string, params?: Record<string, unknown>) => Promise<TaskResult>;
23
+ /**
24
+ * Run a configured agent as an agent tool (the sub-agent fan-out path). Wired
25
+ * by `FlowRunner`. `depth` carries the caller's depth + 1 for recursion
26
+ * bounding; `AgentTask` passes it through.
27
+ */
28
+ runAgent?: (agentName: string, input: Record<string, unknown>, depth: number) => Promise<TaskResult>;
29
+ /** Current agent-recursion depth, threaded by `FlowRunner.runAgent`. */
30
+ __agentDepth?: number;
6
31
  [key: string]: unknown;
7
32
  }
8
33
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"base-task.d.ts","sourceRoot":"","sources":["../../src/task/base-task.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAElD,MAAM,WAAW,WAAW;IAC1B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,CAAC;IACxB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CAClC;AAED,MAAM,WAAW,UAAU;IACzB,OAAO,EAAE,OAAO,CAAC;IACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IAC/B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,cAAc,CAAC;CAC3B;AAED,8BAAsB,QAAQ,CAAC,KAAK,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAI1D,SAAS,CAAC,GAAG,EAAE,WAAW;IAC1B,SAAS,CAAC,OAAO,EAAE,KAAK;IAJ1B,SAAS,CAAC,MAAM,EAAE,MAAM,CAAC;gBAGb,GAAG,EAAE,WAAW,EAChB,OAAO,EAAE,KAAK;IAM1B,QAAQ,KAAK,QAAQ,IAAI,MAAM,CAAC;IAEhC,QAAQ,CAAC,OAAO,I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hF,IAAI,CAAC;YACH,IAAI,CAAC,QAAQ,EAAE,CAAC;YAChB,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,OAAO,EAAE,CAAC;YACpC,MAAM,CAAC,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YAEzC,IAAI,CAAC,MAAM,CAAC,KAAK,CACf,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,EAAE,QAAQ,EAAE,MAAM,CAAC,QAAQ,EAAE,EACtD,mBAAmB,IAAI,CAAC,QAAQ,EAAE,CACnC,CAAC;YAEF,OAAO,MAAM,CAAC;QAChB,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,MAAM,QAAQ,GAAG,IAAI,CAAC,GAAG,EAAE,GAAG,SAAS,CAAC;YACxC,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAE,gBAAgB,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC;YAExE,OAAO;gBACL,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;gBAChE,QAAQ;aACT,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Bounded-concurrency map. Runs `fn` over `items` with at most `limit` calls in
3
+ * flight at once, preserving input order in the result array. This is the one
4
+ * concurrency primitive the agent runtime uses — a single turn's tool calls
5
+ * (including parallel sub-agents) fan out through here, never through ad-hoc
6
+ * `Promise.all`, so the in-flight cap is enforced in exactly one place.
7
+ */
8
+ export declare function mapLimit<T, R>(items: readonly T[], limit: number, fn: (item: T, index: number) => Promise<R>): Promise<R[]>;
9
+ //# sourceMappingURL=concurrency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concurrency.d.ts","sourceRoot":"","sources":["../../src/task/concurrency.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,QAAQ,CAAC,CAAC,EAAE,CAAC,EACjC,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,EAAE,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GACzC,OAAO,CAAC,CAAC,EAAE,CAAC,CAgBd"}
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Bounded-concurrency map. Runs `fn` over `items` with at most `limit` calls in
3
+ * flight at once, preserving input order in the result array. This is the one
4
+ * concurrency primitive the agent runtime uses — a single turn's tool calls
5
+ * (including parallel sub-agents) fan out through here, never through ad-hoc
6
+ * `Promise.all`, so the in-flight cap is enforced in exactly one place.
7
+ */
8
+ export async function mapLimit(items, limit, fn) {
9
+ const bound = Math.max(1, Math.floor(limit));
10
+ const results = new Array(items.length);
11
+ let next = 0;
12
+ const worker = async () => {
13
+ while (true) {
14
+ const i = next++;
15
+ if (i >= items.length)
16
+ return;
17
+ results[i] = await fn(items[i], i);
18
+ }
19
+ };
20
+ const workers = Array.from({ length: Math.min(bound, items.length) }, worker);
21
+ await Promise.all(workers);
22
+ return results;
23
+ }
24
+ //# sourceMappingURL=concurrency.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"concurrency.js","sourceRoot":"","sources":["../../src/task/concurrency.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,CAAC,KAAK,UAAU,QAAQ,CAC5B,KAAmB,EACnB,KAAa,EACb,EAA0C;IAE1C,MAAM,KAAK,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC;IAC7C,MAAM,OAAO,GAAG,IAAI,KAAK,CAAI,KAAK,CAAC,MAAM,CAAC,CAAC;IAC3C,IAAI,IAAI,GAAG,CAAC,CAAC;IAEb,MAAM,MAAM,GAAG,KAAK,IAAmB,EAAE;QACvC,OAAO,IAAI,EAAE,CAAC;YACZ,MAAM,CAAC,GAAG,IAAI,EAAE,CAAC;YACjB,IAAI,CAAC,IAAI,KAAK,CAAC,MAAM;gBAAE,OAAO;YAC9B,OAAO,CAAC,CAAC,CAAC,GAAG,MAAM,EAAE,CAAC,KAAK,CAAC,CAAC,CAAE,EAAE,CAAC,CAAC,CAAC;QACtC,CAAC;IACH,CAAC,CAAC;IAEF,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,EAAE,EAAE,MAAM,CAAC,CAAC;IAC9E,MAAM,OAAO,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;IAC3B,OAAO,OAAO,CAAC;AACjB,CAAC"}
@@ -1,7 +1,17 @@
1
1
  export { BaseTask } from './base-task.js';
2
- export type { TaskContext, TaskResult } from './base-task.js';
2
+ export type { TaskContext, TaskResult, RollbackRecord } from './base-task.js';
3
3
  export { ShellTask } from './shell-task.js';
4
4
  export type { ShellTaskOptions } from './shell-task.js';
5
5
  export { TaskRegistry } from './registry.js';
6
6
  export type { TaskConstructor } from './registry.js';
7
+ export { AgentPromptTask } from './agent-prompt-task.js';
8
+ export type { AgentPromptOptions } from './agent-prompt-task.js';
9
+ export { AgentTask } from './agent-task.js';
10
+ export type { AgentTaskOptions, AgentToolSpec } from './agent-task.js';
11
+ export { runCompletion, pickRunOptions, LLMTimeoutError, StructuredOutputError, } from './llm-runner.js';
12
+ export type { LLMRunOptions, LLMRunResult, AgentRunFields } from './llm-runner.js';
13
+ export { validateJson, formatErrors } from './json-schema.js';
14
+ export type { ValidationError, ValidationResult } from './json-schema.js';
15
+ export { redact, truncate, preview } from './redact.js';
16
+ export type { LLMProvider, LLMCompletionRequest, LLMCompletionResponse, LLMMessage, LLMRole, LLMToolCall, LLMToolDefinition, LLMToolChoice, LLMToolHandler, } from './llm-provider.js';
7
17
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,gBAAgB,CAAC;AAC9D,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAC1C,YAAY,EAAE,WAAW,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAC9E,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAC7C,YAAY,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAGrD,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AACzD,YAAY,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAC5C,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AACzB,YAAY,EAAE,aAAa,EAAE,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACnF,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAC9D,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAC1E,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACxD,YAAY,EACV,WAAW,EACX,oBAAoB,EACpB,qBAAqB,EACrB,UAAU,EACV,OAAO,EACP,WAAW,EACX,iBAAiB,EACjB,aAAa,EACb,cAAc,GACf,MAAM,mBAAmB,CAAC"}
@@ -1,4 +1,10 @@
1
1
  export { BaseTask } from './base-task.js';
2
2
  export { ShellTask } from './shell-task.js';
3
3
  export { TaskRegistry } from './registry.js';
4
+ // Agent / LLM
5
+ export { AgentPromptTask } from './agent-prompt-task.js';
6
+ export { AgentTask } from './agent-task.js';
7
+ export { runCompletion, pickRunOptions, LLMTimeoutError, StructuredOutputError, } from './llm-runner.js';
8
+ export { validateJson, formatErrors } from './json-schema.js';
9
+ export { redact, truncate, preview } from './redact.js';
4
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/task/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAG7C,cAAc;AACd,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAC;AAEzD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,OAAO,EACL,aAAa,EACb,cAAc,EACd,eAAe,EACf,qBAAqB,GACtB,MAAM,iBAAiB,CAAC;AAEzB,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAE9D,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,37 @@
1
+ /**
2
+ * Compact, dependency-free JSON Schema validator.
3
+ *
4
+ * Flowkit keeps its runtime dependencies to two (js-yaml, zod), so rather than
5
+ * pull in a full validator we implement the subset that LLM structured-output
6
+ * schemas actually use. The goal is not spec completeness — it is a precise,
7
+ * human-readable verdict that drives the structured-output repair loop in
8
+ * llm-runner (the error strings are fed back to the model).
9
+ *
10
+ * Supported keywords:
11
+ * type (single or array), enum, const,
12
+ * object: properties, required, additionalProperties (bool or schema),
13
+ * array: items, minItems, maxItems,
14
+ * string: minLength, maxLength, pattern,
15
+ * number: minimum, maximum, exclusiveMinimum, exclusiveMaximum,
16
+ * composition: anyOf, oneOf, allOf, not,
17
+ * nullable (OpenAPI-style — treated as "type may also be null").
18
+ *
19
+ * Anything unrecognized is ignored (treated as "no constraint"), so an
20
+ * over-rich schema validates leniently rather than throwing.
21
+ */
22
+ export interface ValidationError {
23
+ /** JSON-path-ish pointer to the offending value, e.g. `/items/0/name`. */
24
+ path: string;
25
+ message: string;
26
+ }
27
+ export interface ValidationResult {
28
+ valid: boolean;
29
+ errors: ValidationError[];
30
+ }
31
+ type Schema = Record<string, unknown>;
32
+ /** Validate a value against a JSON Schema. Always returns; never throws. */
33
+ export declare function validateJson(value: unknown, schema: Schema): ValidationResult;
34
+ /** One-line, model-friendly summary of validation errors for the repair loop. */
35
+ export declare function formatErrors(errors: ValidationError[]): string;
36
+ export {};
37
+ //# sourceMappingURL=json-schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"json-schema.d.ts","sourceRoot":"","sources":["../../src/task/json-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AAEH,MAAM,WAAW,eAAe;IAC9B,0EAA0E;IAC1E,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,OAAO,CAAC;IACf,MAAM,EAAE,eAAe,EAAE,CAAC;CAC3B;AAED,KAAK,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAqMtC,4EAA4E;AAC5E,wBAAgB,YAAY,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,GAAG,gBAAgB,CAQ7E;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,MAAM,EAAE,eAAe,EAAE,GAAG,MAAM,CAE9D"}