@smithers-orchestrator/driver 0.25.0 → 0.25.1
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/package.json +6 -6
- package/src/RunResult.ts +13 -0
- package/src/index.d.ts +583 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@smithers-orchestrator/driver",
|
|
3
|
-
"version": "0.25.
|
|
3
|
+
"version": "0.25.1",
|
|
4
4
|
"description": "Workflow execution driver — runs tasks, acts on EngineDecisions, reports results",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -63,11 +63,11 @@
|
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"effect": "^3.21.1",
|
|
65
65
|
"zod": "^4.3.6",
|
|
66
|
-
"@smithers-orchestrator/
|
|
67
|
-
"@smithers-orchestrator/
|
|
68
|
-
"@smithers-orchestrator/
|
|
69
|
-
"@smithers-orchestrator/
|
|
70
|
-
"@smithers-orchestrator/scheduler": "0.25.
|
|
66
|
+
"@smithers-orchestrator/errors": "0.25.1",
|
|
67
|
+
"@smithers-orchestrator/db": "0.25.1",
|
|
68
|
+
"@smithers-orchestrator/graph": "0.25.1",
|
|
69
|
+
"@smithers-orchestrator/observability": "0.25.1",
|
|
70
|
+
"@smithers-orchestrator/scheduler": "0.25.1"
|
|
71
71
|
},
|
|
72
72
|
"devDependencies": {
|
|
73
73
|
"@types/bun": "latest",
|
package/src/RunResult.ts
CHANGED
|
@@ -6,4 +6,17 @@ export type RunResult = {
|
|
|
6
6
|
readonly output?: unknown;
|
|
7
7
|
readonly error?: unknown;
|
|
8
8
|
readonly nextRunId?: string;
|
|
9
|
+
/**
|
|
10
|
+
* Number of tasks that ended `failed` yet did not fail the run — "masked"
|
|
11
|
+
* child failures (a `continueOnFail` task, or an agent task that failed
|
|
12
|
+
* transiently: rate limit, timeout, abort) the binary `finished` status cannot
|
|
13
|
+
* express. Present (and `> 0`) only on a `finished` result. See
|
|
14
|
+
* `docs/runtime/run-state.mdx`.
|
|
15
|
+
*/
|
|
16
|
+
readonly failedChildren?: number;
|
|
17
|
+
/**
|
|
18
|
+
* Task state keys (`nodeId::iteration`) of the tasks counted by
|
|
19
|
+
* {@link failedChildren}.
|
|
20
|
+
*/
|
|
21
|
+
readonly failedChildKeys?: readonly string[];
|
|
9
22
|
};
|
package/src/index.d.ts
CHANGED
|
@@ -96,6 +96,19 @@ type RunResult$2 = {
|
|
|
96
96
|
readonly output?: unknown;
|
|
97
97
|
readonly error?: unknown;
|
|
98
98
|
readonly nextRunId?: string;
|
|
99
|
+
/**
|
|
100
|
+
* Number of tasks that ended `failed` yet did not fail the run — "masked"
|
|
101
|
+
* child failures (a `continueOnFail` task, or an agent task that failed
|
|
102
|
+
* transiently: rate limit, timeout, abort) the binary `finished` status cannot
|
|
103
|
+
* express. Present (and `> 0`) only on a `finished` result. See
|
|
104
|
+
* `docs/runtime/run-state.mdx`.
|
|
105
|
+
*/
|
|
106
|
+
readonly failedChildren?: number;
|
|
107
|
+
/**
|
|
108
|
+
* Task state keys (`nodeId::iteration`) of the tasks counted by
|
|
109
|
+
* {@link failedChildren}.
|
|
110
|
+
*/
|
|
111
|
+
readonly failedChildKeys?: readonly string[];
|
|
99
112
|
};
|
|
100
113
|
|
|
101
114
|
type ContinueAsNewHandler$1 = (transition: unknown, context: {
|
|
@@ -164,6 +177,576 @@ type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends
|
|
|
164
177
|
$inferSelect: infer R;
|
|
165
178
|
} ? R : Record<string, unknown>;
|
|
166
179
|
|
|
180
|
+
/**
|
|
181
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
182
|
+
* from the `table` argument it was given:
|
|
183
|
+
*
|
|
184
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
185
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
186
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
187
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
188
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
189
|
+
*
|
|
190
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
191
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
192
|
+
*/
|
|
193
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
194
|
+
$inferSelect: infer R;
|
|
195
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
196
|
+
$inferSelect: infer R;
|
|
197
|
+
} ? R : Record<string, unknown>;
|
|
198
|
+
|
|
199
|
+
/**
|
|
200
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
201
|
+
* from the `table` argument it was given:
|
|
202
|
+
*
|
|
203
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
204
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
205
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
206
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
207
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
208
|
+
*
|
|
209
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
210
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
211
|
+
*/
|
|
212
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
213
|
+
$inferSelect: infer R;
|
|
214
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
215
|
+
$inferSelect: infer R;
|
|
216
|
+
} ? R : Record<string, unknown>;
|
|
217
|
+
|
|
218
|
+
/**
|
|
219
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
220
|
+
* from the `table` argument it was given:
|
|
221
|
+
*
|
|
222
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
223
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
224
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
225
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
226
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
227
|
+
*
|
|
228
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
229
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
230
|
+
*/
|
|
231
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
232
|
+
$inferSelect: infer R;
|
|
233
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
234
|
+
$inferSelect: infer R;
|
|
235
|
+
} ? R : Record<string, unknown>;
|
|
236
|
+
|
|
237
|
+
/**
|
|
238
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
239
|
+
* from the `table` argument it was given:
|
|
240
|
+
*
|
|
241
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
242
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
243
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
244
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
245
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
246
|
+
*
|
|
247
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
248
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
249
|
+
*/
|
|
250
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
251
|
+
$inferSelect: infer R;
|
|
252
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
253
|
+
$inferSelect: infer R;
|
|
254
|
+
} ? R : Record<string, unknown>;
|
|
255
|
+
|
|
256
|
+
/**
|
|
257
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
258
|
+
* from the `table` argument it was given:
|
|
259
|
+
*
|
|
260
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
261
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
262
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
263
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
264
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
265
|
+
*
|
|
266
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
267
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
268
|
+
*/
|
|
269
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
270
|
+
$inferSelect: infer R;
|
|
271
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
272
|
+
$inferSelect: infer R;
|
|
273
|
+
} ? R : Record<string, unknown>;
|
|
274
|
+
|
|
275
|
+
/**
|
|
276
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
277
|
+
* from the `table` argument it was given:
|
|
278
|
+
*
|
|
279
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
280
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
281
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
282
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
283
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
284
|
+
*
|
|
285
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
286
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
287
|
+
*/
|
|
288
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
289
|
+
$inferSelect: infer R;
|
|
290
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
291
|
+
$inferSelect: infer R;
|
|
292
|
+
} ? R : Record<string, unknown>;
|
|
293
|
+
|
|
294
|
+
/**
|
|
295
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
296
|
+
* from the `table` argument it was given:
|
|
297
|
+
*
|
|
298
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
299
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
300
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
301
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
302
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
303
|
+
*
|
|
304
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
305
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
306
|
+
*/
|
|
307
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
308
|
+
$inferSelect: infer R;
|
|
309
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
310
|
+
$inferSelect: infer R;
|
|
311
|
+
} ? R : Record<string, unknown>;
|
|
312
|
+
|
|
313
|
+
/**
|
|
314
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
315
|
+
* from the `table` argument it was given:
|
|
316
|
+
*
|
|
317
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
318
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
319
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
320
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
321
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
322
|
+
*
|
|
323
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
324
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
325
|
+
*/
|
|
326
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
327
|
+
$inferSelect: infer R;
|
|
328
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
329
|
+
$inferSelect: infer R;
|
|
330
|
+
} ? R : Record<string, unknown>;
|
|
331
|
+
|
|
332
|
+
/**
|
|
333
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
334
|
+
* from the `table` argument it was given:
|
|
335
|
+
*
|
|
336
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
337
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
338
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
339
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
340
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
341
|
+
*
|
|
342
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
343
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
344
|
+
*/
|
|
345
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
346
|
+
$inferSelect: infer R;
|
|
347
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
348
|
+
$inferSelect: infer R;
|
|
349
|
+
} ? R : Record<string, unknown>;
|
|
350
|
+
|
|
351
|
+
/**
|
|
352
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
353
|
+
* from the `table` argument it was given:
|
|
354
|
+
*
|
|
355
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
356
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
357
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
358
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
359
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
360
|
+
*
|
|
361
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
362
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
363
|
+
*/
|
|
364
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
365
|
+
$inferSelect: infer R;
|
|
366
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
367
|
+
$inferSelect: infer R;
|
|
368
|
+
} ? R : Record<string, unknown>;
|
|
369
|
+
|
|
370
|
+
/**
|
|
371
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
372
|
+
* from the `table` argument it was given:
|
|
373
|
+
*
|
|
374
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
375
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
376
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
377
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
378
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
379
|
+
*
|
|
380
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
381
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
382
|
+
*/
|
|
383
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
384
|
+
$inferSelect: infer R;
|
|
385
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
386
|
+
$inferSelect: infer R;
|
|
387
|
+
} ? R : Record<string, unknown>;
|
|
388
|
+
|
|
389
|
+
/**
|
|
390
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
391
|
+
* from the `table` argument it was given:
|
|
392
|
+
*
|
|
393
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
394
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
395
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
396
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
397
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
398
|
+
*
|
|
399
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
400
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
401
|
+
*/
|
|
402
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
403
|
+
$inferSelect: infer R;
|
|
404
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
405
|
+
$inferSelect: infer R;
|
|
406
|
+
} ? R : Record<string, unknown>;
|
|
407
|
+
|
|
408
|
+
/**
|
|
409
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
410
|
+
* from the `table` argument it was given:
|
|
411
|
+
*
|
|
412
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
413
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
414
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
415
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
416
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
417
|
+
*
|
|
418
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
419
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
420
|
+
*/
|
|
421
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
422
|
+
$inferSelect: infer R;
|
|
423
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
424
|
+
$inferSelect: infer R;
|
|
425
|
+
} ? R : Record<string, unknown>;
|
|
426
|
+
|
|
427
|
+
/**
|
|
428
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
429
|
+
* from the `table` argument it was given:
|
|
430
|
+
*
|
|
431
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
432
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
433
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
434
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
435
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
436
|
+
*
|
|
437
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
438
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
439
|
+
*/
|
|
440
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
441
|
+
$inferSelect: infer R;
|
|
442
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
443
|
+
$inferSelect: infer R;
|
|
444
|
+
} ? R : Record<string, unknown>;
|
|
445
|
+
|
|
446
|
+
/**
|
|
447
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
448
|
+
* from the `table` argument it was given:
|
|
449
|
+
*
|
|
450
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
451
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
452
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
453
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
454
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
455
|
+
*
|
|
456
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
457
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
458
|
+
*/
|
|
459
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
460
|
+
$inferSelect: infer R;
|
|
461
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
462
|
+
$inferSelect: infer R;
|
|
463
|
+
} ? R : Record<string, unknown>;
|
|
464
|
+
|
|
465
|
+
/**
|
|
466
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
467
|
+
* from the `table` argument it was given:
|
|
468
|
+
*
|
|
469
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
470
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
471
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
472
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
473
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
474
|
+
*
|
|
475
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
476
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
477
|
+
*/
|
|
478
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
479
|
+
$inferSelect: infer R;
|
|
480
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
481
|
+
$inferSelect: infer R;
|
|
482
|
+
} ? R : Record<string, unknown>;
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
486
|
+
* from the `table` argument it was given:
|
|
487
|
+
*
|
|
488
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
489
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
490
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
491
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
492
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
493
|
+
*
|
|
494
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
495
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
496
|
+
*/
|
|
497
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
498
|
+
$inferSelect: infer R;
|
|
499
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
500
|
+
$inferSelect: infer R;
|
|
501
|
+
} ? R : Record<string, unknown>;
|
|
502
|
+
|
|
503
|
+
/**
|
|
504
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
505
|
+
* from the `table` argument it was given:
|
|
506
|
+
*
|
|
507
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
508
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
509
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
510
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
511
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
512
|
+
*
|
|
513
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
514
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
515
|
+
*/
|
|
516
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
517
|
+
$inferSelect: infer R;
|
|
518
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
519
|
+
$inferSelect: infer R;
|
|
520
|
+
} ? R : Record<string, unknown>;
|
|
521
|
+
|
|
522
|
+
/**
|
|
523
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
524
|
+
* from the `table` argument it was given:
|
|
525
|
+
*
|
|
526
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
527
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
528
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
529
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
530
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
531
|
+
*
|
|
532
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
533
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
534
|
+
*/
|
|
535
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
536
|
+
$inferSelect: infer R;
|
|
537
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
538
|
+
$inferSelect: infer R;
|
|
539
|
+
} ? R : Record<string, unknown>;
|
|
540
|
+
|
|
541
|
+
/**
|
|
542
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
543
|
+
* from the `table` argument it was given:
|
|
544
|
+
*
|
|
545
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
546
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
547
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
548
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
549
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
550
|
+
*
|
|
551
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
552
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
553
|
+
*/
|
|
554
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
555
|
+
$inferSelect: infer R;
|
|
556
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
557
|
+
$inferSelect: infer R;
|
|
558
|
+
} ? R : Record<string, unknown>;
|
|
559
|
+
|
|
560
|
+
/**
|
|
561
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
562
|
+
* from the `table` argument it was given:
|
|
563
|
+
*
|
|
564
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
565
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
566
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
567
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
568
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
569
|
+
*
|
|
570
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
571
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
572
|
+
*/
|
|
573
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
574
|
+
$inferSelect: infer R;
|
|
575
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
576
|
+
$inferSelect: infer R;
|
|
577
|
+
} ? R : Record<string, unknown>;
|
|
578
|
+
|
|
579
|
+
/**
|
|
580
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
581
|
+
* from the `table` argument it was given:
|
|
582
|
+
*
|
|
583
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
584
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
585
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
586
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
587
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
588
|
+
*
|
|
589
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
590
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
591
|
+
*/
|
|
592
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
593
|
+
$inferSelect: infer R;
|
|
594
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
595
|
+
$inferSelect: infer R;
|
|
596
|
+
} ? R : Record<string, unknown>;
|
|
597
|
+
|
|
598
|
+
/**
|
|
599
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
600
|
+
* from the `table` argument it was given:
|
|
601
|
+
*
|
|
602
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
603
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
604
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
605
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
606
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
607
|
+
*
|
|
608
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
609
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
610
|
+
*/
|
|
611
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
612
|
+
$inferSelect: infer R;
|
|
613
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
614
|
+
$inferSelect: infer R;
|
|
615
|
+
} ? R : Record<string, unknown>;
|
|
616
|
+
|
|
617
|
+
/**
|
|
618
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
619
|
+
* from the `table` argument it was given:
|
|
620
|
+
*
|
|
621
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
622
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
623
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
624
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
625
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
626
|
+
*
|
|
627
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
628
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
629
|
+
*/
|
|
630
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
631
|
+
$inferSelect: infer R;
|
|
632
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
633
|
+
$inferSelect: infer R;
|
|
634
|
+
} ? R : Record<string, unknown>;
|
|
635
|
+
|
|
636
|
+
/**
|
|
637
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
638
|
+
* from the `table` argument it was given:
|
|
639
|
+
*
|
|
640
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
641
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
642
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
643
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
644
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
645
|
+
*
|
|
646
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
647
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
648
|
+
*/
|
|
649
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
650
|
+
$inferSelect: infer R;
|
|
651
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
652
|
+
$inferSelect: infer R;
|
|
653
|
+
} ? R : Record<string, unknown>;
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
657
|
+
* from the `table` argument it was given:
|
|
658
|
+
*
|
|
659
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
660
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
661
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
662
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
663
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
664
|
+
*
|
|
665
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
666
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
667
|
+
*/
|
|
668
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
669
|
+
$inferSelect: infer R;
|
|
670
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
671
|
+
$inferSelect: infer R;
|
|
672
|
+
} ? R : Record<string, unknown>;
|
|
673
|
+
|
|
674
|
+
/**
|
|
675
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
676
|
+
* from the `table` argument it was given:
|
|
677
|
+
*
|
|
678
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
679
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
680
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
681
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
682
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
683
|
+
*
|
|
684
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
685
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
686
|
+
*/
|
|
687
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
688
|
+
$inferSelect: infer R;
|
|
689
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
690
|
+
$inferSelect: infer R;
|
|
691
|
+
} ? R : Record<string, unknown>;
|
|
692
|
+
|
|
693
|
+
/**
|
|
694
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
695
|
+
* from the `table` argument it was given:
|
|
696
|
+
*
|
|
697
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
698
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
699
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
700
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
701
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
702
|
+
*
|
|
703
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
704
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
705
|
+
*/
|
|
706
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
707
|
+
$inferSelect: infer R;
|
|
708
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
709
|
+
$inferSelect: infer R;
|
|
710
|
+
} ? R : Record<string, unknown>;
|
|
711
|
+
|
|
712
|
+
/**
|
|
713
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
714
|
+
* from the `table` argument it was given:
|
|
715
|
+
*
|
|
716
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
717
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
718
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
719
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
720
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
721
|
+
*
|
|
722
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
723
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
724
|
+
*/
|
|
725
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
726
|
+
$inferSelect: infer R;
|
|
727
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
728
|
+
$inferSelect: infer R;
|
|
729
|
+
} ? R : Record<string, unknown>;
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Resolve the row type a `ctx.output`/`ctx.outputMaybe`/`ctx.latest` call returns
|
|
733
|
+
* from the `table` argument it was given:
|
|
734
|
+
*
|
|
735
|
+
* - a string table name (a key of the workflow Schema) → the inferred row for
|
|
736
|
+
* that registered schema (`outputs.X` keyed by name);
|
|
737
|
+
* - a Zod schema object (e.g. `outputs.research`) → `z.infer` of that schema;
|
|
738
|
+
* - a Drizzle table (carries `$inferSelect`) → its select row;
|
|
739
|
+
* - anything else (a widened `string`, `unknown`) → an untyped output row.
|
|
740
|
+
*
|
|
741
|
+
* This is what makes `ctx.outputMaybe(outputs.research, ...)` carry the research
|
|
742
|
+
* fields instead of an untyped `Record<string, unknown>`.
|
|
743
|
+
*/
|
|
744
|
+
type ResolveOutputRow$1<Schema, T> = T extends keyof Schema ? Schema[T] extends z.ZodTypeAny ? z.infer<Schema[T]> : Schema[T] extends {
|
|
745
|
+
$inferSelect: infer R;
|
|
746
|
+
} ? R : Record<string, unknown> : T extends z.ZodTypeAny ? z.infer<T> : T extends {
|
|
747
|
+
$inferSelect: infer R;
|
|
748
|
+
} ? R : Record<string, unknown>;
|
|
749
|
+
|
|
167
750
|
type SmithersRuntimeConfig$1 = {
|
|
168
751
|
cliAgentToolsDefault?: "all" | "explicit-only";
|
|
169
752
|
baseRootDir?: string;
|