@agentsmarket/pipeline-runtime 0.5.12 → 0.6.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.
@@ -13,4 +13,9 @@
13
13
  * most `max` element issues, however long it is.
14
14
  */
15
15
  import { z } from 'zod';
16
- export declare function cappedArray<T extends z.ZodTypeAny>(element: T, max: number): z.ZodEffects<z.ZodArray<T>, z.ZodArray<T>['_output'], unknown>;
16
+ /**
17
+ * The return type is inferred on purpose: zod v4 dropped the exported
18
+ * `ZodEffects` type (v4's `z.preprocess` returns a pipe), and naming the
19
+ * old type here would break the build for a shape nobody reads.
20
+ */
21
+ export declare function cappedArray<T extends z.ZodTypeAny>(element: T, max: number): z.ZodPreprocess<z.ZodArray<T>, unknown>;
@@ -13,13 +13,19 @@
13
13
  * most `max` element issues, however long it is.
14
14
  */
15
15
  import { z } from 'zod';
16
+ /**
17
+ * The return type is inferred on purpose: zod v4 dropped the exported
18
+ * `ZodEffects` type (v4's `z.preprocess` returns a pipe), and naming the
19
+ * old type here would break the build for a shape nobody reads.
20
+ */
16
21
  export function cappedArray(element, max) {
17
22
  return z.preprocess((value, ctx) => {
18
23
  if (Array.isArray(value) && value.length > max) {
19
24
  ctx.addIssue({
20
25
  code: z.ZodIssueCode.too_big,
21
26
  maximum: max,
22
- type: 'array',
27
+ // v3 called this field `type`; v4 calls it `origin`.
28
+ origin: 'array',
23
29
  inclusive: true,
24
30
  message: `must contain at most ${max} item(s)`,
25
31
  });
package/dist/index.d.ts CHANGED
@@ -38,7 +38,7 @@ export type { PricingResolver, PricingEntry } from './pricing.js';
38
38
  export { OpenRouterPricingResolver, MiniMaxPricingResolver, StaticPricingResolver, CompositePricingResolver, createDefaultPricingResolver, } from './pricing.js';
39
39
  export { buildCheckpoint, restoreFromCheckpoint, R2CheckpointStorage, InMemoryCheckpointStorage, CheckpointLoadError, CheckpointSaveError, CheckpointSchemaMismatchError, CHECKPOINT_SCHEMA_VERSION, } from './checkpoints.js';
40
40
  export type { PipelineCheckpoint, CheckpointStorage, R2BucketLike, CompletedStageRecord, RestoreResult, } from './checkpoints.js';
41
- export { createModelResolver, resolveModelSync, DEFAULT_MODEL, type ModelResolver, type ModelResolverOptions, type PipelineLike, type PipelineStageLike, type SkillLike, } from './model-resolver.js';
41
+ export { createModelResolver, resolveModelSync, DEFAULT_MODEL, STAGE_FIELDS, type ModelResolver, type ModelResolverOptions, type PipelineLike, type PipelineStageLike, type SkillLike, } from './model-resolver.js';
42
42
  export { sha256Hex, computeSkillContentHash, } from './content-hash.js';
43
43
  export { executeStage, runPipelineV2, makeWhenResolve, parseUsesEntry, parseUsesList, validateOutputFormat, StageNotFoundError, StageForbiddenError, StageBadConfigError, type StageExecutorDeps, type StageContext, type StageExecutionResult, type RunPipelineOptions, type RunPipelineResult, type NestedCallRecord, type ResolvedUse, type SkillInvocationDetail, type MCPValidationResult, type MCPDetail, } from './stages.js';
44
44
  export { validateInputs, formatInputErrors, applyInputDefaults, type InputDecl, type InputSpec, type InputValidationError, } from './validate-inputs.js';
package/dist/index.js CHANGED
@@ -22,7 +22,7 @@ export { tryParsePipelineUses, resolvePipelineRef, injectNestedStages, expandCom
22
22
  export { tryParseStageOutputRef, resolveStageOutputRefs, UnresolvedStageOutputRefError, } from './stage-output-refs.js';
23
23
  export { OpenRouterPricingResolver, MiniMaxPricingResolver, StaticPricingResolver, CompositePricingResolver, createDefaultPricingResolver, } from './pricing.js';
24
24
  export { buildCheckpoint, restoreFromCheckpoint, R2CheckpointStorage, InMemoryCheckpointStorage, CheckpointLoadError, CheckpointSaveError, CheckpointSchemaMismatchError, CHECKPOINT_SCHEMA_VERSION, } from './checkpoints.js';
25
- export { createModelResolver, resolveModelSync, DEFAULT_MODEL, } from './model-resolver.js';
25
+ export { createModelResolver, resolveModelSync, DEFAULT_MODEL, STAGE_FIELDS, } from './model-resolver.js';
26
26
  export { sha256Hex, computeSkillContentHash, } from './content-hash.js';
27
27
  export { executeStage, runPipelineV2, makeWhenResolve, parseUsesEntry, parseUsesList, validateOutputFormat, StageNotFoundError, StageForbiddenError, StageBadConfigError, } from './stages.js';
28
28
  export { validateInputs, formatInputErrors, applyInputDefaults, } from './validate-inputs.js';
@@ -36,6 +36,30 @@ export interface PipelineStageLike {
36
36
  * `input:` twice. Both are honoured; singular wins if both are somehow set.
37
37
  */
38
38
  inputs?: unknown;
39
+ /**
40
+ * The pipeline inputs this stage reads.
41
+ *
42
+ * Undefined — the default, and what every published spec was written
43
+ * against — means every input, which is how the runtime has always
44
+ * behaved. A list narrows the `Inputs:` block the stage's prompt is
45
+ * given: only those inputs are in it, and the rest are not sent to the
46
+ * model at all.
47
+ *
48
+ * It narrows the block only. An input the stage's own prompt names is
49
+ * kept either way — `{{code_diff}}` is substituted into the prompt, and
50
+ * `$input.code_diff`, which is not substituted in a prompt, keeps its
51
+ * input in the block. A stage cannot be given less than its prompt asks
52
+ * it to read.
53
+ */
54
+ reads?: string[];
55
+ /**
56
+ * The secret names a shell stage declares. The runtime resolves them
57
+ * against the buyer's secrets; the type did not say so, and the CLI
58
+ * validator learned the vocabulary from this interface — a field the
59
+ * runtime reads that the interface omits is a field the validator calls
60
+ * unknown.
61
+ */
62
+ secrets?: string[];
39
63
  system?: string;
40
64
  prompt?: string | readonly import('./multimodal.js').MultimodalMessage[];
41
65
  /**
@@ -192,6 +216,21 @@ export interface PipelineStageLike {
192
216
  */
193
217
  output_retry?: import('./output-errors.js').OutputValidationMode;
194
218
  }
219
+ /**
220
+ * The stage fields the runtime reads, plus `run_if`, which the CLI
221
+ * validator still checks although the runtime no longer acts on it.
222
+ *
223
+ * It is a list of names, not a schema: the runtime ignores an unknown
224
+ * field rather than refusing the spec, so a spec that carries one is
225
+ * never broken by it. The list exists so that a field which is one typo
226
+ * away from a real one is not silent — `read:` is not `reads:`, and the
227
+ * difference is a stage that quietly reads every input again.
228
+ *
229
+ * Kept next to `PipelineStageLike` on purpose: that interface is the
230
+ * authority on what a stage may carry, and a field added there should
231
+ * be added here.
232
+ */
233
+ export declare const STAGE_FIELDS: readonly string[];
195
234
  export interface PipelineLike {
196
235
  name?: string;
197
236
  version?: string;
@@ -16,6 +16,50 @@
16
16
  *
17
17
  * Cost of a stage is always based on the resolved model, regardless of who declared it.
18
18
  */
19
+ /**
20
+ * The stage fields the runtime reads, plus `run_if`, which the CLI
21
+ * validator still checks although the runtime no longer acts on it.
22
+ *
23
+ * It is a list of names, not a schema: the runtime ignores an unknown
24
+ * field rather than refusing the spec, so a spec that carries one is
25
+ * never broken by it. The list exists so that a field which is one typo
26
+ * away from a real one is not silent — `read:` is not `reads:`, and the
27
+ * difference is a stage that quietly reads every input again.
28
+ *
29
+ * Kept next to `PipelineStageLike` on purpose: that interface is the
30
+ * authority on what a stage may carry, and a field added there should
31
+ * be added here.
32
+ */
33
+ export const STAGE_FIELDS = [
34
+ 'id',
35
+ 'model',
36
+ 'system',
37
+ 'prompt',
38
+ 'provider',
39
+ 'uses',
40
+ 'uses_version',
41
+ 'input',
42
+ 'inputs',
43
+ 'reads',
44
+ 'secrets',
45
+ 'output_format',
46
+ 'fields',
47
+ 'maxTokens',
48
+ 'model_params',
49
+ 'mcp_servers',
50
+ 'mcp_tools',
51
+ 'working_dir',
52
+ 'shell',
53
+ 'loop',
54
+ 'when',
55
+ 'run_if',
56
+ 'depends_on',
57
+ 'requires',
58
+ 'needs',
59
+ 'retry',
60
+ 'output_schema',
61
+ 'output_retry',
62
+ ];
19
63
  export const DEFAULT_MODEL = 'MiniMax-M3';
20
64
  export function createModelResolver(opts = {}) {
21
65
  const hardcoded = opts.hardcodedDefault ?? DEFAULT_MODEL;
package/dist/stages.js CHANGED
@@ -44,6 +44,67 @@ function buildInputsString(inputs) {
44
44
  return '';
45
45
  return entries.map(([k, v]) => `${k}: ${JSON.stringify(v)}\n`).join('');
46
46
  }
47
+ /**
48
+ * The inputs a stage's own prompt asks for.
49
+ *
50
+ * `$input.name` is not substituted in a prompt — only in a stage's provider
51
+ * and model — so a prompt that says `$input.code_diff` gets the value from
52
+ * the `Inputs:` block and from nowhere else. A stage that declares `reads:`
53
+ * therefore keeps the inputs its prompt names: the declaration narrows what
54
+ * the stage is *given*, not what it is *told to read*.
55
+ */
56
+ const PROMPT_INPUT_REF = /\$input\.([A-Za-z_][A-Za-z0-9_]*)|\$\{\s*input\.([A-Za-z_][A-Za-z0-9_]*)\s*\}/g;
57
+ function promptInputNames(stage) {
58
+ const texts = [];
59
+ if (typeof stage.system === 'string')
60
+ texts.push(stage.system);
61
+ if (typeof stage.prompt === 'string')
62
+ texts.push(stage.prompt);
63
+ else if (stage.prompt)
64
+ texts.push(JSON.stringify(stage.prompt));
65
+ const names = new Set();
66
+ for (const text of texts) {
67
+ for (const match of text.matchAll(PROMPT_INPUT_REF)) {
68
+ names.add(match[1] ?? match[2]);
69
+ }
70
+ }
71
+ return [...names];
72
+ }
73
+ /**
74
+ * The inputs a stage is given.
75
+ *
76
+ * Every stage used to be given every pipeline input, in full, so a stage
77
+ * could not be given less to read: the diff of a review pipeline reached
78
+ * the stage that aggregates the findings, and that stage paid for it on
79
+ * every run.
80
+ *
81
+ * A stage that declares `reads:` gets only those inputs, plus the ones its
82
+ * own prompt asks for. A stage that declares nothing gets all of them —
83
+ * that default is the behaviour every published spec was written against,
84
+ * which is why this is opt-in and not a change of the default.
85
+ *
86
+ * A name that is not an input of the pipeline is ignored, not an error: a
87
+ * spec may declare a stage that reads an input the caller did not send, and
88
+ * the stage still runs. A `reads` that is not a list of names at all falls
89
+ * back to every input, which is what the stage would have read anyway.
90
+ */
91
+ function selectStageInputs(inputs, reads, stage) {
92
+ if (!Array.isArray(reads))
93
+ return inputs;
94
+ // The scan is the price of the field, and only a stage that declares it
95
+ // pays: every other stage keeps the behaviour it had.
96
+ const names = new Set(promptInputNames(stage));
97
+ for (const name of reads) {
98
+ if (typeof name === 'string')
99
+ names.add(name);
100
+ }
101
+ const picked = {};
102
+ for (const name of names) {
103
+ if (Object.prototype.hasOwnProperty.call(inputs, name))
104
+ picked[name] = inputs[name];
105
+ }
106
+ return picked;
107
+ }
47
108
  /**
48
109
  * All three documented interpolation engines, for `prompt` and `system`.
49
110
  *
@@ -455,7 +516,7 @@ correctionHint) {
455
516
  : undefined;
456
517
  const workingDirIgnoredOnServer = !!workingDir && !deps.isLocal;
457
518
  const previousContext = buildPreviousContext(ctx.previousOutputs);
458
- const inputsString = buildInputsString(ctx.inputs);
519
+ const inputsString = buildInputsString(selectStageInputs(ctx.inputs, stage.reads, stage));
459
520
  const retryCtx = deps.eventSink
460
521
  ? { stageId: stage.id, eventSink: deps.eventSink }
461
522
  : undefined;
@@ -1,100 +1,43 @@
1
1
  import { z } from 'zod';
2
- declare const AssertionSchema: z.ZodUnion<[z.ZodObject<{
2
+ declare const AssertionSchema: z.ZodUnion<readonly [z.ZodObject<{
3
3
  type: z.ZodLiteral<"equality">;
4
4
  path: z.ZodString;
5
5
  value: z.ZodUnknown;
6
- }, "strip", z.ZodTypeAny, {
7
- path: string;
8
- type: "equality";
9
- value?: unknown;
10
- }, {
11
- path: string;
12
- type: "equality";
13
- value?: unknown;
14
- }>, z.ZodObject<{
6
+ }, z.core.$strip>, z.ZodObject<{
15
7
  type: z.ZodLiteral<"contains">;
16
8
  path: z.ZodString;
17
- value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
18
- }, "strip", z.ZodTypeAny, {
19
- value: string | number | boolean;
20
- path: string;
21
- type: "contains";
22
- }, {
23
- value: string | number | boolean;
24
- path: string;
25
- type: "contains";
26
- }>, z.ZodObject<{
9
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
10
+ }, z.core.$strip>, z.ZodObject<{
27
11
  type: z.ZodLiteral<"regex">;
28
12
  path: z.ZodString;
29
13
  pattern: z.ZodString;
30
14
  flags: z.ZodOptional<z.ZodString>;
31
- }, "strip", z.ZodTypeAny, {
32
- path: string;
33
- type: "regex";
34
- pattern: string;
35
- flags?: string | undefined;
36
- }, {
37
- path: string;
38
- type: "regex";
39
- pattern: string;
40
- flags?: string | undefined;
41
- }>, z.ZodObject<{
42
- type: z.ZodEnum<["gte", "lte", "gt", "lt"]>;
15
+ }, z.core.$strip>, z.ZodObject<{
16
+ type: z.ZodEnum<{
17
+ gte: "gte";
18
+ lte: "lte";
19
+ gt: "gt";
20
+ lt: "lt";
21
+ }>;
43
22
  path: z.ZodString;
44
23
  value: z.ZodNumber;
45
- }, "strip", z.ZodTypeAny, {
46
- value: number;
47
- path: string;
48
- type: "gte" | "lte" | "gt" | "lt";
49
- }, {
50
- value: number;
51
- path: string;
52
- type: "gte" | "lte" | "gt" | "lt";
53
- }>, z.ZodObject<{
24
+ }, z.core.$strip>, z.ZodObject<{
54
25
  type: z.ZodLiteral<"exists">;
55
26
  path: z.ZodString;
56
- }, "strip", z.ZodTypeAny, {
57
- path: string;
58
- type: "exists";
59
- }, {
60
- path: string;
61
- type: "exists";
62
- }>, z.ZodObject<{
27
+ }, z.core.$strip>, z.ZodObject<{
63
28
  type: z.ZodLiteral<"absent">;
64
29
  path: z.ZodString;
65
- }, "strip", z.ZodTypeAny, {
66
- path: string;
67
- type: "absent";
68
- }, {
69
- path: string;
70
- type: "absent";
71
- }>, z.ZodObject<{
30
+ }, z.core.$strip>, z.ZodObject<{
72
31
  type: z.ZodLiteral<"jsonpath">;
73
32
  path: z.ZodString;
74
33
  value: z.ZodUnknown;
75
- }, "strip", z.ZodTypeAny, {
76
- path: string;
77
- type: "jsonpath";
78
- value?: unknown;
79
- }, {
80
- path: string;
81
- type: "jsonpath";
82
- value?: unknown;
83
- }>, z.ZodObject<{
34
+ }, z.core.$strip>, z.ZodObject<{
84
35
  type: z.ZodLiteral<"schema">;
85
36
  path: z.ZodString;
86
37
  schema_file: z.ZodString;
87
- }, "strip", z.ZodTypeAny, {
88
- path: string;
89
- type: "schema";
90
- schema_file: string;
91
- }, {
92
- path: string;
93
- type: "schema";
94
- schema_file: string;
95
- }>]>;
38
+ }, z.core.$strip>]>;
96
39
  export type Assertion = z.infer<typeof AssertionSchema>;
97
- declare const TestSpecSchema: z.ZodEffects<z.ZodObject<{
40
+ declare const TestSpecSchema: z.ZodObject<{
98
41
  name: z.ZodString;
99
42
  description: z.ZodOptional<z.ZodString>;
100
43
  pipeline: z.ZodOptional<z.ZodString>;
@@ -102,230 +45,44 @@ declare const TestSpecSchema: z.ZodEffects<z.ZodObject<{
102
45
  inputs: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
103
46
  mock: z.ZodDefault<z.ZodBoolean>;
104
47
  expect_error: z.ZodOptional<z.ZodString>;
105
- assertions: z.ZodDefault<z.ZodEffects<z.ZodArray<z.ZodUnion<[z.ZodObject<{
48
+ assertions: z.ZodDefault<z.ZodPreprocess<z.ZodArray<z.ZodUnion<readonly [z.ZodObject<{
106
49
  type: z.ZodLiteral<"equality">;
107
50
  path: z.ZodString;
108
51
  value: z.ZodUnknown;
109
- }, "strip", z.ZodTypeAny, {
110
- path: string;
111
- type: "equality";
112
- value?: unknown;
113
- }, {
114
- path: string;
115
- type: "equality";
116
- value?: unknown;
117
- }>, z.ZodObject<{
52
+ }, z.core.$strip>, z.ZodObject<{
118
53
  type: z.ZodLiteral<"contains">;
119
54
  path: z.ZodString;
120
- value: z.ZodUnion<[z.ZodString, z.ZodNumber, z.ZodBoolean]>;
121
- }, "strip", z.ZodTypeAny, {
122
- value: string | number | boolean;
123
- path: string;
124
- type: "contains";
125
- }, {
126
- value: string | number | boolean;
127
- path: string;
128
- type: "contains";
129
- }>, z.ZodObject<{
55
+ value: z.ZodUnion<readonly [z.ZodString, z.ZodNumber, z.ZodBoolean]>;
56
+ }, z.core.$strip>, z.ZodObject<{
130
57
  type: z.ZodLiteral<"regex">;
131
58
  path: z.ZodString;
132
59
  pattern: z.ZodString;
133
60
  flags: z.ZodOptional<z.ZodString>;
134
- }, "strip", z.ZodTypeAny, {
135
- path: string;
136
- type: "regex";
137
- pattern: string;
138
- flags?: string | undefined;
139
- }, {
140
- path: string;
141
- type: "regex";
142
- pattern: string;
143
- flags?: string | undefined;
144
- }>, z.ZodObject<{
145
- type: z.ZodEnum<["gte", "lte", "gt", "lt"]>;
61
+ }, z.core.$strip>, z.ZodObject<{
62
+ type: z.ZodEnum<{
63
+ gte: "gte";
64
+ lte: "lte";
65
+ gt: "gt";
66
+ lt: "lt";
67
+ }>;
146
68
  path: z.ZodString;
147
69
  value: z.ZodNumber;
148
- }, "strip", z.ZodTypeAny, {
149
- value: number;
150
- path: string;
151
- type: "gte" | "lte" | "gt" | "lt";
152
- }, {
153
- value: number;
154
- path: string;
155
- type: "gte" | "lte" | "gt" | "lt";
156
- }>, z.ZodObject<{
70
+ }, z.core.$strip>, z.ZodObject<{
157
71
  type: z.ZodLiteral<"exists">;
158
72
  path: z.ZodString;
159
- }, "strip", z.ZodTypeAny, {
160
- path: string;
161
- type: "exists";
162
- }, {
163
- path: string;
164
- type: "exists";
165
- }>, z.ZodObject<{
73
+ }, z.core.$strip>, z.ZodObject<{
166
74
  type: z.ZodLiteral<"absent">;
167
75
  path: z.ZodString;
168
- }, "strip", z.ZodTypeAny, {
169
- path: string;
170
- type: "absent";
171
- }, {
172
- path: string;
173
- type: "absent";
174
- }>, z.ZodObject<{
76
+ }, z.core.$strip>, z.ZodObject<{
175
77
  type: z.ZodLiteral<"jsonpath">;
176
78
  path: z.ZodString;
177
79
  value: z.ZodUnknown;
178
- }, "strip", z.ZodTypeAny, {
179
- path: string;
180
- type: "jsonpath";
181
- value?: unknown;
182
- }, {
183
- path: string;
184
- type: "jsonpath";
185
- value?: unknown;
186
- }>, z.ZodObject<{
80
+ }, z.core.$strip>, z.ZodObject<{
187
81
  type: z.ZodLiteral<"schema">;
188
82
  path: z.ZodString;
189
83
  schema_file: z.ZodString;
190
- }, "strip", z.ZodTypeAny, {
191
- path: string;
192
- type: "schema";
193
- schema_file: string;
194
- }, {
195
- path: string;
196
- type: "schema";
197
- schema_file: string;
198
- }>]>, "many">, ({
199
- path: string;
200
- type: "equality";
201
- value?: unknown;
202
- } | {
203
- value: string | number | boolean;
204
- path: string;
205
- type: "contains";
206
- } | {
207
- path: string;
208
- type: "regex";
209
- pattern: string;
210
- flags?: string | undefined;
211
- } | {
212
- value: number;
213
- path: string;
214
- type: "gte" | "lte" | "gt" | "lt";
215
- } | {
216
- path: string;
217
- type: "exists";
218
- } | {
219
- path: string;
220
- type: "absent";
221
- } | {
222
- path: string;
223
- type: "jsonpath";
224
- value?: unknown;
225
- } | {
226
- path: string;
227
- type: "schema";
228
- schema_file: string;
229
- })[], unknown>>;
230
- }, "strip", z.ZodTypeAny, {
231
- inputs: Record<string, unknown>;
232
- name: string;
233
- mock: boolean;
234
- assertions: ({
235
- path: string;
236
- type: "equality";
237
- value?: unknown;
238
- } | {
239
- value: string | number | boolean;
240
- path: string;
241
- type: "contains";
242
- } | {
243
- path: string;
244
- type: "regex";
245
- pattern: string;
246
- flags?: string | undefined;
247
- } | {
248
- value: number;
249
- path: string;
250
- type: "gte" | "lte" | "gt" | "lt";
251
- } | {
252
- path: string;
253
- type: "exists";
254
- } | {
255
- path: string;
256
- type: "absent";
257
- } | {
258
- path: string;
259
- type: "jsonpath";
260
- value?: unknown;
261
- } | {
262
- path: string;
263
- type: "schema";
264
- schema_file: string;
265
- })[];
266
- pipeline?: string | undefined;
267
- description?: string | undefined;
268
- stage?: string | undefined;
269
- expect_error?: string | undefined;
270
- }, {
271
- name: string;
272
- inputs?: Record<string, unknown> | undefined;
273
- pipeline?: string | undefined;
274
- description?: string | undefined;
275
- mock?: boolean | undefined;
276
- stage?: string | undefined;
277
- expect_error?: string | undefined;
278
- assertions?: unknown;
279
- }>, {
280
- inputs: Record<string, unknown>;
281
- name: string;
282
- mock: boolean;
283
- assertions: ({
284
- path: string;
285
- type: "equality";
286
- value?: unknown;
287
- } | {
288
- value: string | number | boolean;
289
- path: string;
290
- type: "contains";
291
- } | {
292
- path: string;
293
- type: "regex";
294
- pattern: string;
295
- flags?: string | undefined;
296
- } | {
297
- value: number;
298
- path: string;
299
- type: "gte" | "lte" | "gt" | "lt";
300
- } | {
301
- path: string;
302
- type: "exists";
303
- } | {
304
- path: string;
305
- type: "absent";
306
- } | {
307
- path: string;
308
- type: "jsonpath";
309
- value?: unknown;
310
- } | {
311
- path: string;
312
- type: "schema";
313
- schema_file: string;
314
- })[];
315
- pipeline?: string | undefined;
316
- description?: string | undefined;
317
- stage?: string | undefined;
318
- expect_error?: string | undefined;
319
- }, {
320
- name: string;
321
- inputs?: Record<string, unknown> | undefined;
322
- pipeline?: string | undefined;
323
- description?: string | undefined;
324
- mock?: boolean | undefined;
325
- stage?: string | undefined;
326
- expect_error?: string | undefined;
327
- assertions?: unknown;
328
- }>;
84
+ }, z.core.$strip>]>>, unknown>>;
85
+ }, z.core.$strip>;
329
86
  export type TestSpec = z.infer<typeof TestSpecSchema>;
330
87
  export declare class TestSpecParseError extends Error {
331
88
  constructor(message: string);
@@ -29,7 +29,7 @@ const TestSpecSchema = z.object({
29
29
  description: z.string().optional(),
30
30
  pipeline: z.string().optional(),
31
31
  stage: z.string().optional(),
32
- inputs: z.record(z.unknown()).default({}),
32
+ inputs: z.record(z.string(), z.unknown()).default({}),
33
33
  mock: z.boolean().default(true),
34
34
  expect_error: z.string().optional(),
35
35
  assertions: cappedArray(AssertionSchema, MAX_ASSERTIONS).default([]),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentsmarket/pipeline-runtime",
3
- "version": "0.5.12",
3
+ "version": "0.6.0",
4
4
  "description": "Runtime for executing PIPELINE.md workflows (multi-skill orchestration). Provider-agnostic (MiniMax, Claude, OpenAI).",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -16,7 +16,7 @@
16
16
  "hono": "^4.13.14",
17
17
  "js-yaml": "^4.1.0",
18
18
  "openai": "^7.43.0",
19
- "zod": "^3.25"
19
+ "zod": "^4.6.7"
20
20
  },
21
21
  "devDependencies": {
22
22
  "@types/js-yaml": "^4.0.9",