fascicle 0.5.0 → 0.6.3
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.
- package/CHANGELOG.md +31 -0
- package/README.md +16 -8
- package/dist/adapters.d.ts +38 -0
- package/dist/adapters.js +78 -0
- package/dist/adapters.js.map +1 -0
- package/dist/index-BiuCs04Z.d.ts +710 -0
- package/dist/index.d.ts +35 -709
- package/dist/index.js +287 -460
- package/dist/index.js.map +1 -1
- package/dist/tee-D_Qh_vfY.js +169 -0
- package/dist/tee-D_Qh_vfY.js.map +1 -0
- package/package.json +7 -8
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
import { z } from "zod";
|
|
2
|
+
|
|
3
|
+
//#region packages/core/src/types.d.ts
|
|
4
|
+
/**
|
|
5
|
+
* Shared type surface for the composition layer.
|
|
6
|
+
*
|
|
7
|
+
* These types are the public value contract between composers, the runner,
|
|
8
|
+
* and adapter packages (@repo/observability, @repo/stores,
|
|
9
|
+
* @repo/engine). Adapter packages import types from here; nothing in
|
|
10
|
+
* this file imports from any adapter.
|
|
11
|
+
*
|
|
12
|
+
* Type aliases and interfaces use PascalCase per constraints.md §2.
|
|
13
|
+
* Value-level identifiers (field names, function parameter names) remain
|
|
14
|
+
* snake_case; those are the value contract, not the type contract.
|
|
15
|
+
*/
|
|
16
|
+
type TrajectoryEvent = {
|
|
17
|
+
readonly kind: string;
|
|
18
|
+
readonly span_id?: string | undefined;
|
|
19
|
+
readonly ts?: number | undefined;
|
|
20
|
+
readonly [key: string]: unknown;
|
|
21
|
+
};
|
|
22
|
+
type TrajectoryLogger = {
|
|
23
|
+
readonly record: (event: TrajectoryEvent) => void;
|
|
24
|
+
readonly start_span: (name: string, meta?: Record<string, unknown>) => string;
|
|
25
|
+
readonly end_span: (id: string, meta?: Record<string, unknown>) => void;
|
|
26
|
+
};
|
|
27
|
+
type CheckpointStore = {
|
|
28
|
+
readonly get: (key: string) => Promise<unknown>;
|
|
29
|
+
readonly set: (key: string, value: unknown) => Promise<void>;
|
|
30
|
+
readonly delete: (key: string) => Promise<void>;
|
|
31
|
+
};
|
|
32
|
+
type CleanupFn = () => Promise<void> | void;
|
|
33
|
+
type RunContext = {
|
|
34
|
+
readonly run_id: string;
|
|
35
|
+
readonly trajectory: TrajectoryLogger;
|
|
36
|
+
readonly state: ReadonlyMap<string, unknown>;
|
|
37
|
+
readonly parent_span_id?: string | undefined;
|
|
38
|
+
readonly abort: AbortSignal;
|
|
39
|
+
readonly emit: (event: Record<string, unknown>) => void;
|
|
40
|
+
readonly on_cleanup: (fn: CleanupFn) => void;
|
|
41
|
+
readonly checkpoint_store?: CheckpointStore | undefined;
|
|
42
|
+
readonly resume_data?: Readonly<Record<string, unknown>> | undefined;
|
|
43
|
+
readonly streaming: boolean;
|
|
44
|
+
};
|
|
45
|
+
type StepFn<i, o> = (input: i, ctx: RunContext) => Promise<o> | o;
|
|
46
|
+
type StepMetadata = {
|
|
47
|
+
readonly display_name?: string;
|
|
48
|
+
readonly description?: string;
|
|
49
|
+
readonly port_labels?: Readonly<{
|
|
50
|
+
readonly in?: string;
|
|
51
|
+
readonly out?: string;
|
|
52
|
+
}>;
|
|
53
|
+
};
|
|
54
|
+
type Step<i, o> = {
|
|
55
|
+
readonly id: string;
|
|
56
|
+
readonly kind: string;
|
|
57
|
+
run(input: i, ctx: RunContext): Promise<o> | o;
|
|
58
|
+
readonly config?: Readonly<Record<string, unknown>>;
|
|
59
|
+
readonly children?: ReadonlyArray<Step<unknown, unknown>>;
|
|
60
|
+
readonly anonymous?: boolean;
|
|
61
|
+
readonly meta?: StepMetadata;
|
|
62
|
+
};
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region packages/core/src/runner.d.ts
|
|
65
|
+
type RunOptions = {
|
|
66
|
+
readonly install_signal_handlers?: boolean;
|
|
67
|
+
readonly trajectory?: TrajectoryLogger;
|
|
68
|
+
readonly checkpoint_store?: CheckpointStore;
|
|
69
|
+
readonly resume_data?: Readonly<Record<string, unknown>>;
|
|
70
|
+
};
|
|
71
|
+
type StreamingRunHandle<o> = {
|
|
72
|
+
readonly events: AsyncIterable<TrajectoryEvent>;
|
|
73
|
+
readonly result: Promise<o>;
|
|
74
|
+
};
|
|
75
|
+
declare function run_impl<i, o>(flow: Step<i, o>, input: i, options?: RunOptions): Promise<o>;
|
|
76
|
+
declare function run_stream<i, o>(flow: Step<i, o>, input: i, options?: RunOptions): StreamingRunHandle<o>;
|
|
77
|
+
declare const run: typeof run_impl & {
|
|
78
|
+
stream: typeof run_stream;
|
|
79
|
+
};
|
|
80
|
+
//#endregion
|
|
81
|
+
//#region packages/core/src/step.d.ts
|
|
82
|
+
declare function step<i, o>(id: string, fn: StepFn<i, o>, meta?: StepMetadata): Step<i, o>;
|
|
83
|
+
declare function step<i, o>(fn: StepFn<i, o>): Step<i, o>;
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region packages/core/src/describe.d.ts
|
|
86
|
+
type FlowValue = string | number | boolean | null | ReadonlyArray<FlowValue> | Readonly<{
|
|
87
|
+
[key: string]: FlowValue;
|
|
88
|
+
}> | {
|
|
89
|
+
readonly kind: '<fn>';
|
|
90
|
+
readonly name?: string;
|
|
91
|
+
} | {
|
|
92
|
+
readonly kind: '<schema>';
|
|
93
|
+
} | {
|
|
94
|
+
readonly kind: string;
|
|
95
|
+
readonly id: string;
|
|
96
|
+
};
|
|
97
|
+
type FlowNode = {
|
|
98
|
+
readonly kind: string;
|
|
99
|
+
readonly id: string;
|
|
100
|
+
readonly config?: Readonly<{
|
|
101
|
+
[key: string]: FlowValue;
|
|
102
|
+
}>;
|
|
103
|
+
readonly children?: ReadonlyArray<FlowNode>;
|
|
104
|
+
readonly meta?: StepMetadata;
|
|
105
|
+
};
|
|
106
|
+
type DescribeOptions = {
|
|
107
|
+
readonly strict?: boolean;
|
|
108
|
+
};
|
|
109
|
+
declare const describe: {
|
|
110
|
+
<i, o>(root: Step<i, o>, options?: DescribeOptions): string;
|
|
111
|
+
json: <i, o>(root: Step<i, o>, options?: DescribeOptions) => FlowNode;
|
|
112
|
+
};
|
|
113
|
+
//#endregion
|
|
114
|
+
//#region packages/core/src/sequence.d.ts
|
|
115
|
+
type AnyStep$2 = Step<unknown, unknown>;
|
|
116
|
+
type FirstInput<children> = children extends readonly [Step<infer i, unknown>, ...unknown[]] ? i : unknown;
|
|
117
|
+
type LastOutput$1<children> = children extends readonly [...unknown[], Step<unknown, infer o>] ? o : children extends readonly [Step<unknown, infer o>] ? o : unknown;
|
|
118
|
+
type SequenceOptions = {
|
|
119
|
+
readonly name?: string;
|
|
120
|
+
};
|
|
121
|
+
declare function sequence<const children extends readonly AnyStep$2[]>(children: children, options?: SequenceOptions): Step<FirstInput<children>, LastOutput$1<children>>;
|
|
122
|
+
//#endregion
|
|
123
|
+
//#region packages/core/src/parallel.d.ts
|
|
124
|
+
type AnyStep$1 = Step<unknown, unknown>;
|
|
125
|
+
type OutputOf<s> = s extends Step<unknown, infer o> ? o : unknown;
|
|
126
|
+
type ParallelOutputs<children extends Record<string, AnyStep$1>> = { [k in keyof children]: OutputOf<children[k]> };
|
|
127
|
+
type ParallelOptions = {
|
|
128
|
+
readonly name?: string;
|
|
129
|
+
};
|
|
130
|
+
declare function parallel<i, children extends Record<string, Step<i, unknown>>>(members: children, options?: ParallelOptions): Step<i, ParallelOutputs<children>>;
|
|
131
|
+
//#endregion
|
|
132
|
+
//#region packages/core/src/branch.d.ts
|
|
133
|
+
type BranchConfig<i, o> = {
|
|
134
|
+
readonly name?: string;
|
|
135
|
+
readonly when: (input: i) => boolean | Promise<boolean>;
|
|
136
|
+
readonly then: Step<i, o>;
|
|
137
|
+
readonly otherwise: Step<i, o>;
|
|
138
|
+
};
|
|
139
|
+
declare function branch<i, o>(config: BranchConfig<i, o>): Step<i, o>;
|
|
140
|
+
//#endregion
|
|
141
|
+
//#region packages/core/src/map.d.ts
|
|
142
|
+
type MapConfig<input, item, result> = {
|
|
143
|
+
readonly name?: string;
|
|
144
|
+
readonly items: (input: input) => ReadonlyArray<item> | Promise<ReadonlyArray<item>>;
|
|
145
|
+
readonly do: Step<item, result>;
|
|
146
|
+
readonly concurrency?: number;
|
|
147
|
+
};
|
|
148
|
+
declare function map<input, item, result>(config: MapConfig<input, item, result>): Step<input, result[]>;
|
|
149
|
+
//#endregion
|
|
150
|
+
//#region packages/core/src/pipe.d.ts
|
|
151
|
+
type PipeOptions = {
|
|
152
|
+
readonly name?: string;
|
|
153
|
+
};
|
|
154
|
+
declare function pipe<i, a, b>(inner: Step<i, a>, fn: (value: a) => b | Promise<b>, options?: PipeOptions): Step<i, b>;
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region packages/core/src/retry.d.ts
|
|
157
|
+
type RetryConfig = {
|
|
158
|
+
readonly name?: string;
|
|
159
|
+
readonly max_attempts: number;
|
|
160
|
+
readonly backoff_ms?: number;
|
|
161
|
+
readonly on_error?: (err: unknown, attempt: number) => void;
|
|
162
|
+
};
|
|
163
|
+
declare function retry<i, o>(inner: Step<i, o>, config: RetryConfig): Step<i, o>;
|
|
164
|
+
//#endregion
|
|
165
|
+
//#region packages/core/src/fallback.d.ts
|
|
166
|
+
type FallbackOptions = {
|
|
167
|
+
readonly name?: string;
|
|
168
|
+
};
|
|
169
|
+
declare function fallback<i, o>(primary: Step<i, o>, backup: Step<i, o>, options?: FallbackOptions): Step<i, o>;
|
|
170
|
+
//#endregion
|
|
171
|
+
//#region packages/core/src/timeout.d.ts
|
|
172
|
+
type TimeoutOptions = {
|
|
173
|
+
readonly name?: string;
|
|
174
|
+
};
|
|
175
|
+
declare function timeout<i, o>(inner: Step<i, o>, ms: number, options?: TimeoutOptions): Step<i, o>;
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region packages/core/src/loop.d.ts
|
|
178
|
+
type LoopGuardResult<state> = {
|
|
179
|
+
readonly stop: boolean;
|
|
180
|
+
readonly state: state;
|
|
181
|
+
};
|
|
182
|
+
type LoopConfig<i, state, o> = {
|
|
183
|
+
readonly name?: string;
|
|
184
|
+
readonly init: (input: i) => state;
|
|
185
|
+
readonly body: Step<state, state>;
|
|
186
|
+
readonly guard?: Step<state, LoopGuardResult<state>>;
|
|
187
|
+
readonly finish: (state: state, round: number) => o;
|
|
188
|
+
readonly max_rounds: number;
|
|
189
|
+
};
|
|
190
|
+
type LoopResult<o> = {
|
|
191
|
+
readonly value: o;
|
|
192
|
+
readonly converged: boolean;
|
|
193
|
+
readonly rounds: number;
|
|
194
|
+
};
|
|
195
|
+
declare function loop<i, state, o>(config: LoopConfig<i, state, o>): Step<i, LoopResult<o>>;
|
|
196
|
+
//#endregion
|
|
197
|
+
//#region packages/core/src/compose.d.ts
|
|
198
|
+
declare function compose<i, o>(name: string, inner: Step<i, o>): Step<i, o>;
|
|
199
|
+
//#endregion
|
|
200
|
+
//#region packages/core/src/checkpoint.d.ts
|
|
201
|
+
type CheckpointConfig<i> = {
|
|
202
|
+
readonly name?: string;
|
|
203
|
+
readonly key: string | ((input: i) => string);
|
|
204
|
+
};
|
|
205
|
+
declare function checkpoint<i, o>(inner: Step<i, o>, config: CheckpointConfig<i>): Step<i, o>;
|
|
206
|
+
//#endregion
|
|
207
|
+
//#region packages/core/src/suspend.d.ts
|
|
208
|
+
type SuspendConfig<i, o, resume> = {
|
|
209
|
+
readonly id: string;
|
|
210
|
+
readonly name?: string;
|
|
211
|
+
readonly on: (input: i, ctx: RunContext) => Promise<void> | void;
|
|
212
|
+
readonly resume_schema: z.ZodType<resume>;
|
|
213
|
+
readonly combine: (input: i, resume: resume, ctx: RunContext) => Promise<o> | o | Step<unknown, o>;
|
|
214
|
+
};
|
|
215
|
+
declare function suspend<i, o, resume>(config: SuspendConfig<i, o, resume>): Step<i, o>;
|
|
216
|
+
//#endregion
|
|
217
|
+
//#region packages/core/src/scope.d.ts
|
|
218
|
+
type AnyStep = Step<unknown, unknown>;
|
|
219
|
+
type LastOutput<children> = children extends readonly [...unknown[], Step<unknown, infer o>] ? o : children extends readonly [Step<unknown, infer o>] ? o : unknown;
|
|
220
|
+
type ScopeOptions = {
|
|
221
|
+
readonly name?: string;
|
|
222
|
+
};
|
|
223
|
+
type StashOptions = {
|
|
224
|
+
readonly name?: string;
|
|
225
|
+
};
|
|
226
|
+
type UseOptions = {
|
|
227
|
+
readonly name?: string;
|
|
228
|
+
};
|
|
229
|
+
declare function scope<const children extends readonly AnyStep[]>(children: children, options?: ScopeOptions): Step<unknown, LastOutput<children>>;
|
|
230
|
+
declare function stash<i, v>(key: string, source: Step<i, v>, options?: StashOptions): Step<i, v>;
|
|
231
|
+
declare function use<const keys extends readonly string[], i, o>(keys: keys, fn: (state: { [k in keys[number]]: unknown }, input: i, ctx: RunContext) => Promise<o> | o, options?: UseOptions): Step<i, o>;
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region packages/core/src/errors.d.ts
|
|
234
|
+
/**
|
|
235
|
+
* Typed errors for the composition layer.
|
|
236
|
+
*
|
|
237
|
+
* This is the only source file in packages/core/src/ that uses the `class`
|
|
238
|
+
* keyword. `Error` is a built-in and `instanceof` branching is how composers
|
|
239
|
+
* like `retry` and `fallback` distinguish failure modes. See constraints.md §2.
|
|
240
|
+
*/
|
|
241
|
+
declare class timeout_error extends Error {
|
|
242
|
+
readonly kind: "timeout_error";
|
|
243
|
+
readonly timeout_ms: number;
|
|
244
|
+
constructor(message: string, timeout_ms: number);
|
|
245
|
+
}
|
|
246
|
+
declare class suspended_error extends Error {
|
|
247
|
+
readonly kind: "suspended_error";
|
|
248
|
+
readonly suspend_id: string;
|
|
249
|
+
readonly payload: unknown;
|
|
250
|
+
constructor(suspend_id: string, payload: unknown, message?: string);
|
|
251
|
+
}
|
|
252
|
+
declare class resume_validation_error extends Error {
|
|
253
|
+
readonly kind: "resume_validation_error";
|
|
254
|
+
readonly issues: unknown;
|
|
255
|
+
constructor(message: string, issues: unknown);
|
|
256
|
+
}
|
|
257
|
+
declare class describe_cycle_error extends Error {
|
|
258
|
+
readonly kind: "describe_cycle_error";
|
|
259
|
+
readonly step_id: string;
|
|
260
|
+
constructor(step_id: string, message?: string);
|
|
261
|
+
}
|
|
262
|
+
declare class aborted_error extends Error {
|
|
263
|
+
readonly kind: "aborted_error";
|
|
264
|
+
readonly reason?: unknown;
|
|
265
|
+
readonly step_index: number;
|
|
266
|
+
readonly tool_call_in_flight?: {
|
|
267
|
+
id: string;
|
|
268
|
+
name: string;
|
|
269
|
+
};
|
|
270
|
+
constructor(message?: string, metadata?: {
|
|
271
|
+
reason?: unknown;
|
|
272
|
+
step_index?: number;
|
|
273
|
+
tool_call_in_flight?: {
|
|
274
|
+
id: string;
|
|
275
|
+
name: string;
|
|
276
|
+
};
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
//#endregion
|
|
280
|
+
//#region packages/core/src/step_kinds.d.ts
|
|
281
|
+
/**
|
|
282
|
+
* Closed registry of every `Step.kind` produced by the composition layer.
|
|
283
|
+
*
|
|
284
|
+
* Studio (and any other consumer that needs to enumerate primitives — palette,
|
|
285
|
+
* docs, code generation) can rely on this being the exhaustive set. New
|
|
286
|
+
* primitives must add their kind here. The `step_kinds_cover_runner` contract
|
|
287
|
+
* test in `step_kinds.test.ts` asserts every dispatch handler corresponds to a
|
|
288
|
+
* kind listed here.
|
|
289
|
+
*/
|
|
290
|
+
declare const STEP_KINDS: readonly ["step", "sequence", "parallel", "branch", "map", "pipe", "retry", "fallback", "timeout", "loop", "compose", "adversarial", "ensemble", "tournament", "consensus", "checkpoint", "suspend", "scope", "stash", "use"];
|
|
291
|
+
type StepKind = (typeof STEP_KINDS)[number];
|
|
292
|
+
declare function is_step_kind(value: unknown): value is StepKind;
|
|
293
|
+
//#endregion
|
|
294
|
+
//#region packages/core/src/trajectory.d.ts
|
|
295
|
+
declare const span_start_event_schema: z.ZodObject<{
|
|
296
|
+
kind: z.ZodLiteral<"span_start">;
|
|
297
|
+
span_id: z.ZodString;
|
|
298
|
+
name: z.ZodString;
|
|
299
|
+
}, z.core.$loose>;
|
|
300
|
+
declare const span_end_event_schema: z.ZodObject<{
|
|
301
|
+
kind: z.ZodLiteral<"span_end">;
|
|
302
|
+
span_id: z.ZodString;
|
|
303
|
+
}, z.core.$loose>;
|
|
304
|
+
declare const emit_event_schema: z.ZodObject<{
|
|
305
|
+
kind: z.ZodLiteral<"emit">;
|
|
306
|
+
}, z.core.$loose>;
|
|
307
|
+
declare const custom_event_schema: z.ZodObject<{
|
|
308
|
+
kind: z.ZodString;
|
|
309
|
+
}, z.core.$loose>;
|
|
310
|
+
declare const trajectory_event_schema: z.ZodUnion<readonly [z.ZodObject<{
|
|
311
|
+
kind: z.ZodLiteral<"span_start">;
|
|
312
|
+
span_id: z.ZodString;
|
|
313
|
+
name: z.ZodString;
|
|
314
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
315
|
+
kind: z.ZodLiteral<"span_end">;
|
|
316
|
+
span_id: z.ZodString;
|
|
317
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
318
|
+
kind: z.ZodLiteral<"emit">;
|
|
319
|
+
}, z.core.$loose>, z.ZodObject<{
|
|
320
|
+
kind: z.ZodString;
|
|
321
|
+
}, z.core.$loose>]>;
|
|
322
|
+
type SpanStartEvent = z.infer<typeof span_start_event_schema>;
|
|
323
|
+
type SpanEndEvent = z.infer<typeof span_end_event_schema>;
|
|
324
|
+
type EmitEvent = z.infer<typeof emit_event_schema>;
|
|
325
|
+
type CustomTrajectoryEvent = z.infer<typeof custom_event_schema>;
|
|
326
|
+
type ParsedTrajectoryEvent = z.infer<typeof trajectory_event_schema>;
|
|
327
|
+
//#endregion
|
|
328
|
+
//#region packages/core/src/version.d.ts
|
|
329
|
+
declare const version = "0.6.3";
|
|
330
|
+
//#endregion
|
|
331
|
+
//#region packages/core/src/index.d.ts
|
|
332
|
+
declare const flow_schema: {
|
|
333
|
+
$schema: string;
|
|
334
|
+
$id: string;
|
|
335
|
+
title: string;
|
|
336
|
+
description: string;
|
|
337
|
+
type: string;
|
|
338
|
+
items: {
|
|
339
|
+
$ref: string;
|
|
340
|
+
};
|
|
341
|
+
$defs: {
|
|
342
|
+
compose_entry: {
|
|
343
|
+
type: string;
|
|
344
|
+
required: string[];
|
|
345
|
+
properties: {
|
|
346
|
+
compose: {
|
|
347
|
+
type: string;
|
|
348
|
+
};
|
|
349
|
+
};
|
|
350
|
+
allOf: {
|
|
351
|
+
$ref: string;
|
|
352
|
+
}[];
|
|
353
|
+
};
|
|
354
|
+
node: {
|
|
355
|
+
type: string;
|
|
356
|
+
anyOf: {
|
|
357
|
+
required: string[];
|
|
358
|
+
}[];
|
|
359
|
+
properties: {
|
|
360
|
+
step: {
|
|
361
|
+
$ref: string;
|
|
362
|
+
};
|
|
363
|
+
sequence: {
|
|
364
|
+
$ref: string;
|
|
365
|
+
};
|
|
366
|
+
parallel: {
|
|
367
|
+
$ref: string;
|
|
368
|
+
};
|
|
369
|
+
branch: {
|
|
370
|
+
$ref: string;
|
|
371
|
+
};
|
|
372
|
+
map: {
|
|
373
|
+
$ref: string;
|
|
374
|
+
};
|
|
375
|
+
pipe: {
|
|
376
|
+
$ref: string;
|
|
377
|
+
};
|
|
378
|
+
retry: {
|
|
379
|
+
$ref: string;
|
|
380
|
+
};
|
|
381
|
+
fallback: {
|
|
382
|
+
$ref: string;
|
|
383
|
+
};
|
|
384
|
+
timeout: {
|
|
385
|
+
$ref: string;
|
|
386
|
+
};
|
|
387
|
+
loop: {
|
|
388
|
+
$ref: string;
|
|
389
|
+
};
|
|
390
|
+
compose_node: {
|
|
391
|
+
$ref: string;
|
|
392
|
+
};
|
|
393
|
+
adversarial: {
|
|
394
|
+
$ref: string;
|
|
395
|
+
};
|
|
396
|
+
ensemble: {
|
|
397
|
+
$ref: string;
|
|
398
|
+
};
|
|
399
|
+
tournament: {
|
|
400
|
+
$ref: string;
|
|
401
|
+
};
|
|
402
|
+
consensus: {
|
|
403
|
+
$ref: string;
|
|
404
|
+
};
|
|
405
|
+
checkpoint: {
|
|
406
|
+
$ref: string;
|
|
407
|
+
};
|
|
408
|
+
suspend: {
|
|
409
|
+
$ref: string;
|
|
410
|
+
};
|
|
411
|
+
scope: {
|
|
412
|
+
$ref: string;
|
|
413
|
+
};
|
|
414
|
+
ref: {
|
|
415
|
+
type: string;
|
|
416
|
+
};
|
|
417
|
+
};
|
|
418
|
+
};
|
|
419
|
+
step_config: {
|
|
420
|
+
type: string;
|
|
421
|
+
required: string[];
|
|
422
|
+
properties: {
|
|
423
|
+
id: {
|
|
424
|
+
type: string;
|
|
425
|
+
};
|
|
426
|
+
fn: {
|
|
427
|
+
type: string;
|
|
428
|
+
};
|
|
429
|
+
};
|
|
430
|
+
};
|
|
431
|
+
sequence_config: {
|
|
432
|
+
type: string;
|
|
433
|
+
items: {
|
|
434
|
+
$ref: string;
|
|
435
|
+
};
|
|
436
|
+
};
|
|
437
|
+
parallel_config: {
|
|
438
|
+
type: string;
|
|
439
|
+
additionalProperties: {
|
|
440
|
+
$ref: string;
|
|
441
|
+
};
|
|
442
|
+
};
|
|
443
|
+
branch_config: {
|
|
444
|
+
type: string;
|
|
445
|
+
required: string[];
|
|
446
|
+
properties: {
|
|
447
|
+
when: {
|
|
448
|
+
type: string;
|
|
449
|
+
};
|
|
450
|
+
then: {
|
|
451
|
+
$ref: string;
|
|
452
|
+
};
|
|
453
|
+
otherwise: {
|
|
454
|
+
$ref: string;
|
|
455
|
+
};
|
|
456
|
+
};
|
|
457
|
+
};
|
|
458
|
+
map_config: {
|
|
459
|
+
type: string;
|
|
460
|
+
required: string[];
|
|
461
|
+
properties: {
|
|
462
|
+
items: {
|
|
463
|
+
type: string;
|
|
464
|
+
};
|
|
465
|
+
do: {
|
|
466
|
+
$ref: string;
|
|
467
|
+
};
|
|
468
|
+
concurrency: {
|
|
469
|
+
type: string;
|
|
470
|
+
minimum: number;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
};
|
|
474
|
+
pipe_config: {
|
|
475
|
+
type: string;
|
|
476
|
+
required: string[];
|
|
477
|
+
properties: {
|
|
478
|
+
of: {
|
|
479
|
+
$ref: string;
|
|
480
|
+
};
|
|
481
|
+
fn: {
|
|
482
|
+
type: string;
|
|
483
|
+
};
|
|
484
|
+
};
|
|
485
|
+
};
|
|
486
|
+
retry_config: {
|
|
487
|
+
type: string;
|
|
488
|
+
required: string[];
|
|
489
|
+
properties: {
|
|
490
|
+
do: {
|
|
491
|
+
$ref: string;
|
|
492
|
+
};
|
|
493
|
+
max_attempts: {
|
|
494
|
+
type: string;
|
|
495
|
+
minimum: number;
|
|
496
|
+
};
|
|
497
|
+
backoff_ms: {
|
|
498
|
+
type: string;
|
|
499
|
+
minimum: number;
|
|
500
|
+
};
|
|
501
|
+
};
|
|
502
|
+
};
|
|
503
|
+
fallback_config: {
|
|
504
|
+
type: string;
|
|
505
|
+
required: string[];
|
|
506
|
+
properties: {
|
|
507
|
+
primary: {
|
|
508
|
+
$ref: string;
|
|
509
|
+
};
|
|
510
|
+
backup: {
|
|
511
|
+
$ref: string;
|
|
512
|
+
};
|
|
513
|
+
};
|
|
514
|
+
};
|
|
515
|
+
timeout_config: {
|
|
516
|
+
type: string;
|
|
517
|
+
required: string[];
|
|
518
|
+
properties: {
|
|
519
|
+
do: {
|
|
520
|
+
$ref: string;
|
|
521
|
+
};
|
|
522
|
+
ms: {
|
|
523
|
+
type: string;
|
|
524
|
+
minimum: number;
|
|
525
|
+
};
|
|
526
|
+
};
|
|
527
|
+
};
|
|
528
|
+
compose_node_config: {
|
|
529
|
+
type: string;
|
|
530
|
+
required: string[];
|
|
531
|
+
properties: {
|
|
532
|
+
name: {
|
|
533
|
+
type: string;
|
|
534
|
+
minLength: number;
|
|
535
|
+
};
|
|
536
|
+
do: {
|
|
537
|
+
$ref: string;
|
|
538
|
+
};
|
|
539
|
+
};
|
|
540
|
+
};
|
|
541
|
+
loop_config: {
|
|
542
|
+
type: string;
|
|
543
|
+
required: string[];
|
|
544
|
+
properties: {
|
|
545
|
+
name: {
|
|
546
|
+
type: string;
|
|
547
|
+
minLength: number;
|
|
548
|
+
};
|
|
549
|
+
init: {
|
|
550
|
+
type: string;
|
|
551
|
+
};
|
|
552
|
+
body: {
|
|
553
|
+
$ref: string;
|
|
554
|
+
};
|
|
555
|
+
guard: {
|
|
556
|
+
$ref: string;
|
|
557
|
+
};
|
|
558
|
+
finish: {
|
|
559
|
+
type: string;
|
|
560
|
+
};
|
|
561
|
+
max_rounds: {
|
|
562
|
+
type: string;
|
|
563
|
+
minimum: number;
|
|
564
|
+
};
|
|
565
|
+
};
|
|
566
|
+
};
|
|
567
|
+
adversarial_config: {
|
|
568
|
+
type: string;
|
|
569
|
+
required: string[];
|
|
570
|
+
properties: {
|
|
571
|
+
build: {
|
|
572
|
+
$ref: string;
|
|
573
|
+
};
|
|
574
|
+
critique: {
|
|
575
|
+
$ref: string;
|
|
576
|
+
};
|
|
577
|
+
accept: {
|
|
578
|
+
type: string;
|
|
579
|
+
};
|
|
580
|
+
max_rounds: {
|
|
581
|
+
type: string;
|
|
582
|
+
minimum: number;
|
|
583
|
+
};
|
|
584
|
+
};
|
|
585
|
+
};
|
|
586
|
+
ensemble_config: {
|
|
587
|
+
type: string;
|
|
588
|
+
required: string[];
|
|
589
|
+
properties: {
|
|
590
|
+
members: {
|
|
591
|
+
type: string;
|
|
592
|
+
additionalProperties: {
|
|
593
|
+
$ref: string;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
score: {
|
|
597
|
+
type: string;
|
|
598
|
+
};
|
|
599
|
+
select: {
|
|
600
|
+
type: string;
|
|
601
|
+
enum: string[];
|
|
602
|
+
};
|
|
603
|
+
};
|
|
604
|
+
};
|
|
605
|
+
tournament_config: {
|
|
606
|
+
type: string;
|
|
607
|
+
required: string[];
|
|
608
|
+
properties: {
|
|
609
|
+
members: {
|
|
610
|
+
type: string;
|
|
611
|
+
additionalProperties: {
|
|
612
|
+
$ref: string;
|
|
613
|
+
};
|
|
614
|
+
};
|
|
615
|
+
compare: {
|
|
616
|
+
type: string;
|
|
617
|
+
};
|
|
618
|
+
};
|
|
619
|
+
};
|
|
620
|
+
consensus_config: {
|
|
621
|
+
type: string;
|
|
622
|
+
required: string[];
|
|
623
|
+
properties: {
|
|
624
|
+
members: {
|
|
625
|
+
type: string;
|
|
626
|
+
additionalProperties: {
|
|
627
|
+
$ref: string;
|
|
628
|
+
};
|
|
629
|
+
};
|
|
630
|
+
agree: {
|
|
631
|
+
type: string;
|
|
632
|
+
};
|
|
633
|
+
max_rounds: {
|
|
634
|
+
type: string;
|
|
635
|
+
minimum: number;
|
|
636
|
+
};
|
|
637
|
+
};
|
|
638
|
+
};
|
|
639
|
+
checkpoint_config: {
|
|
640
|
+
type: string;
|
|
641
|
+
required: string[];
|
|
642
|
+
properties: {
|
|
643
|
+
do: {
|
|
644
|
+
$ref: string;
|
|
645
|
+
};
|
|
646
|
+
key: {
|
|
647
|
+
type: string;
|
|
648
|
+
};
|
|
649
|
+
};
|
|
650
|
+
};
|
|
651
|
+
suspend_config: {
|
|
652
|
+
type: string;
|
|
653
|
+
required: string[];
|
|
654
|
+
properties: {
|
|
655
|
+
id: {
|
|
656
|
+
type: string;
|
|
657
|
+
};
|
|
658
|
+
on: {
|
|
659
|
+
type: string;
|
|
660
|
+
};
|
|
661
|
+
resume_schema: {
|
|
662
|
+
type: string;
|
|
663
|
+
};
|
|
664
|
+
combine: {
|
|
665
|
+
type: string;
|
|
666
|
+
};
|
|
667
|
+
};
|
|
668
|
+
};
|
|
669
|
+
scope_config: {
|
|
670
|
+
type: string;
|
|
671
|
+
items: {
|
|
672
|
+
$ref: string;
|
|
673
|
+
};
|
|
674
|
+
};
|
|
675
|
+
scope_entry: {
|
|
676
|
+
type: string;
|
|
677
|
+
oneOf: ({
|
|
678
|
+
type: string;
|
|
679
|
+
required: string[];
|
|
680
|
+
properties: {
|
|
681
|
+
stash: {
|
|
682
|
+
type: string;
|
|
683
|
+
};
|
|
684
|
+
do: {
|
|
685
|
+
$ref: string;
|
|
686
|
+
};
|
|
687
|
+
use?: never;
|
|
688
|
+
};
|
|
689
|
+
} | {
|
|
690
|
+
type: string;
|
|
691
|
+
required: string[];
|
|
692
|
+
properties: {
|
|
693
|
+
use: {
|
|
694
|
+
type: string;
|
|
695
|
+
items: {
|
|
696
|
+
type: string;
|
|
697
|
+
};
|
|
698
|
+
};
|
|
699
|
+
do: {
|
|
700
|
+
$ref: string;
|
|
701
|
+
};
|
|
702
|
+
stash?: never;
|
|
703
|
+
};
|
|
704
|
+
})[];
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
};
|
|
708
|
+
//#endregion
|
|
709
|
+
export { loop as A, FlowNode as B, use as C, LoopConfig as D, compose as E, map as F, CheckpointStore as G, describe as H, branch as I, StepMetadata as J, RunContext as K, parallel as L, fallback as M, retry as N, LoopGuardResult as O, pipe as P, sequence as R, stash as S, checkpoint as T, step as U, FlowValue as V, run as W, TrajectoryLogger as X, TrajectoryEvent as Y, describe_cycle_error as _, ParsedTrajectoryEvent as a, timeout_error as b, custom_event_schema as c, span_start_event_schema as d, trajectory_event_schema as f, aborted_error as g, is_step_kind as h, EmitEvent as i, timeout as j, LoopResult as k, emit_event_schema as l, StepKind as m, version as n, SpanEndEvent as o, STEP_KINDS as p, Step as q, CustomTrajectoryEvent as r, SpanStartEvent as s, flow_schema as t, span_end_event_schema as u, resume_validation_error as v, suspend as w, scope as x, suspended_error as y, DescribeOptions as z };
|
|
710
|
+
//# sourceMappingURL=index-BiuCs04Z.d.ts.map
|