@pipelex/sdk 0.25.1 → 0.27.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.
- package/README.md +26 -4
- package/dist/artifacts.js +1 -1
- package/dist/artifacts.js.map +1 -1
- package/dist/client.d.ts +50 -15
- package/dist/client.js +164 -51
- package/dist/client.js.map +1 -1
- package/dist/error-models.d.ts +198 -0
- package/dist/error-models.js +26 -0
- package/dist/error-models.js.map +1 -0
- package/dist/errors.d.ts +132 -26
- package/dist/errors.js +134 -23
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js.map +1 -1
- package/dist/method-source.d.ts +3 -3
- package/dist/method-source.js +3 -3
- package/dist/models.d.ts +147 -18
- package/dist/prepare-inputs.d.ts +35 -34
- package/dist/prepare-inputs.js +110 -129
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/product-models.d.ts +4 -15
- package/dist/runs.d.ts +22 -8
- package/dist/runs.js +4 -3
- package/dist/runs.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +12 -11
- package/docs/artifact-download.md +1 -1
- package/docs/build-routes.md +1 -1
- package/docs/crate-routes.md +49 -12
- package/docs/errors.md +143 -0
- package/docs/input-preparation.md +16 -19
- package/docs/run-results.md +3 -1
- package/package.json +2 -2
package/dist/prepare-inputs.js
CHANGED
|
@@ -1,15 +1,17 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* `prepareInputs` — signature-driven input preparation.
|
|
3
|
-
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
2
|
+
* `prepareInputs` — signature-driven input preparation. Reads the target pipe's
|
|
3
|
+
* declared inputs from the **input-form descriptor** `POST /v1/pipe-io` returns,
|
|
4
|
+
* interprets the caller's inputs top-down against it, uploads the file-bearing
|
|
5
|
+
* values, and returns rewritten inputs (canonical content carrying
|
|
6
6
|
* `pipelex-storage://` in `url`) plus one upload record per prepared asset.
|
|
7
7
|
*
|
|
8
8
|
* The method is named the same three ways every other method-taking operation
|
|
9
9
|
* takes it — inline `files`, a `method_ref` address, or a stored `method_id` —
|
|
10
|
-
* exactly one per call. All three are pass-throughs to `POST /v1/
|
|
11
|
-
*
|
|
12
|
-
*
|
|
10
|
+
* exactly one per call. All three are pass-throughs to `POST /v1/pipe-io`, which
|
|
11
|
+
* resolves an address on the runner and an id on the platform, so nothing is
|
|
12
|
+
* expanded client-side. The route also SELECTS the pipe: the caller's qualified
|
|
13
|
+
* `pipe_ref`, else the method's own entry pipe, and the ref it answers with is
|
|
14
|
+
* the one prepared. It runs no dry run, so preparing inputs costs one static load.
|
|
13
15
|
*
|
|
14
16
|
* Per input, the caller may submit EITHER the **compact** value (a bare source /
|
|
15
17
|
* canonical `{url}` content) OR the explicit `{ concept, content }` envelope —
|
|
@@ -19,19 +21,33 @@
|
|
|
19
21
|
* `input_normalizer.py`).
|
|
20
22
|
*
|
|
21
23
|
* **The descriptor is the classifier, never the value's shape.** `input_form`
|
|
22
|
-
* (the MTHDS standard's artifact
|
|
23
|
-
*
|
|
24
|
-
*
|
|
25
|
-
*
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
*
|
|
24
|
+
* (the MTHDS standard's artifact) states the kind at every depth — `document` /
|
|
25
|
+
* `image` mark a file position, `object` recurses through `fields`, `list`
|
|
26
|
+
* through `item`, everything else passes through. That is what makes an
|
|
27
|
+
* OPTIONAL nested file field prepare like a required one, and a `text` field
|
|
28
|
+
* merely *named* `url` stay untouched: both were misread while the signature
|
|
29
|
+
* came from the rendered inputs template, whose file signal was a `url`-bearing
|
|
30
|
+
* dict. See `docs/input-preparation.md`, which `pipelex-sdk-python` mirrors case
|
|
31
|
+
* for case.
|
|
30
32
|
*/
|
|
31
|
-
import { InputPreparationError } from "./errors.js";
|
|
33
|
+
import { ApiResponseError, InputPreparationError } from "./errors.js";
|
|
32
34
|
import { uploadFile } from "./upload.js";
|
|
33
35
|
const PIPELEX_STORAGE_SCHEME = "pipelex-storage://";
|
|
34
36
|
const HTTP_URL_RE = /^https?:\/\//i;
|
|
37
|
+
/**
|
|
38
|
+
* The `error_type`s of the route's pipe-selection refusals — the only `422`s
|
|
39
|
+
* `prepareInputs` turns into an `InputPreparationError`. They are the runtime's
|
|
40
|
+
* entry-lookup classes, the vocabulary the run routes speak too: a ref that names
|
|
41
|
+
* no pipe, or no entry pipe at all, is `EntryPipeNotFoundError`; a code that
|
|
42
|
+
* matches pipes in several domains, or several `main_pipe` declarations, is
|
|
43
|
+
* `EntryPipeAmbiguousError`. Every other `422` (a malformed body, an over-limit
|
|
44
|
+
* file, a fetched package with no `.mthds` file, a stored method with no source)
|
|
45
|
+
* shares the generic `ValidationError` type and stays an `ApiResponseError`.
|
|
46
|
+
*/
|
|
47
|
+
const PIPE_SELECTION_ERROR_TYPES = new Set([
|
|
48
|
+
"EntryPipeNotFoundError",
|
|
49
|
+
"EntryPipeAmbiguousError",
|
|
50
|
+
]);
|
|
35
51
|
/** Strict plain-object test — excludes arrays, `Uint8Array`, `Blob`, and other exotics. */
|
|
36
52
|
function isPlainObject(value) {
|
|
37
53
|
return Object.prototype.toString.call(value) === "[object Object]";
|
|
@@ -198,7 +214,7 @@ async function resolveNode(ctx, node, callerValue) {
|
|
|
198
214
|
* Normalize and check the three selectors. Empty is absent (`files: []`,
|
|
199
215
|
* `method_ref: ""`, `method_id: " "`), mirroring the run options' rule and the
|
|
200
216
|
* Python `CrateRequestBase` normalisers, and exactly one must remain — the check
|
|
201
|
-
* lives here because this helper is the one that composes the `
|
|
217
|
+
* lives here because this helper is the one that composes the `pipeIo` call.
|
|
202
218
|
* The illegal shapes are compile errors for typed callers; this backs them up for
|
|
203
219
|
* untyped (JS) ones with a typed `InputPreparationError`.
|
|
204
220
|
*/
|
|
@@ -222,7 +238,8 @@ function resolveSelector(request) {
|
|
|
222
238
|
"catalog id).");
|
|
223
239
|
}
|
|
224
240
|
if (given.length > 1) {
|
|
225
|
-
throw new InputPreparationError(`Cannot prepare inputs: ${given.join(" and ")} were
|
|
241
|
+
throw new InputPreparationError(`Cannot prepare inputs: ${given.join(" and ")} were ${given.length === 2 ? "both" : "all"} ` +
|
|
242
|
+
"given. Supply exactly one method " +
|
|
226
243
|
"selector — `files`, `method_ref` or `method_id`.");
|
|
227
244
|
}
|
|
228
245
|
if (files !== undefined)
|
|
@@ -232,113 +249,84 @@ function resolveSelector(request) {
|
|
|
232
249
|
return { method_id: methodId };
|
|
233
250
|
}
|
|
234
251
|
/**
|
|
235
|
-
*
|
|
236
|
-
*
|
|
252
|
+
* Normalize the caller's `pipe_ref` and refuse, before any request, the two
|
|
253
|
+
* spellings preparation cannot honour. Empty is absent, so the route's selection
|
|
254
|
+
* chain decides.
|
|
237
255
|
*
|
|
238
|
-
*
|
|
239
|
-
*
|
|
240
|
-
*
|
|
241
|
-
*
|
|
242
|
-
*
|
|
256
|
+
* - A **bare** `pipe_code` is refused because a request names a pipe by its
|
|
257
|
+
* qualified ref. The route will refuse it too once the runner's shared
|
|
258
|
+
* selection enforces that rule; until then it would resolve a bare code across
|
|
259
|
+
* domains, and preparation does not lean on that fallback.
|
|
260
|
+
* - An **`alias->domain.pipe_code`** ref is refused because the alias names a
|
|
261
|
+
* dependency package's pipe, and preparation covers the method's own pipes: the
|
|
262
|
+
* crate routes do not load an address-based dependency at all. The run route
|
|
263
|
+
* takes such a ref; preparation refuses it, and that asymmetry is deliberate.
|
|
243
264
|
*/
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
if (
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
const sources = hasAnySource
|
|
252
|
-
? selector.files.map((file, index) => file.source ?? `inline://file-${index + 1}.mthds`)
|
|
253
|
-
: undefined;
|
|
254
|
-
result = await client.validate(contents, true, sources, undefined, ["input_form"]);
|
|
265
|
+
function normalizePipeRef(raw) {
|
|
266
|
+
const pipeRef = nonEmptyString(raw);
|
|
267
|
+
if (pipeRef === undefined)
|
|
268
|
+
return undefined;
|
|
269
|
+
if (pipeRef.includes("->")) {
|
|
270
|
+
throw new InputPreparationError(`Cannot prepare inputs: \`pipe_ref\` "${pipeRef}" names a dependency package's pipe. ` +
|
|
271
|
+
"Preparation covers the method's own pipes: name one as `domain.pipe_code`.");
|
|
255
272
|
}
|
|
256
|
-
|
|
257
|
-
|
|
273
|
+
if (!pipeRef.includes(".")) {
|
|
274
|
+
throw new InputPreparationError(`Cannot prepare inputs: \`pipe_ref\` must be qualified (\`domain.pipe_code\`), got the bare ` +
|
|
275
|
+
`"${pipeRef}".`);
|
|
258
276
|
}
|
|
259
|
-
|
|
260
|
-
const first = result.validation_errors[0]?.message ?? result.message;
|
|
261
|
-
throw new InputPreparationError(`Cannot prepare inputs: the method signature did not resolve — ${first}`);
|
|
262
|
-
}
|
|
263
|
-
return result;
|
|
277
|
+
return pipeRef;
|
|
264
278
|
}
|
|
265
279
|
/**
|
|
266
|
-
*
|
|
267
|
-
*
|
|
268
|
-
* the report's resolved default — read on the field's PRESENCE, never on its
|
|
269
|
-
* truthiness — and, behind an ABSENT field only, the bundle's declared
|
|
270
|
-
* `main_pipe` then the single pipe.
|
|
280
|
+
* Ask `POST /v1/pipe-io` for the pipe and its signature, whatever the selector,
|
|
281
|
+
* and hand back the valid report.
|
|
271
282
|
*
|
|
272
|
-
*
|
|
273
|
-
*
|
|
274
|
-
*
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
*
|
|
278
|
-
*
|
|
279
|
-
* parsed body is handed through untouched, so strict `=== undefined` is the whole
|
|
280
|
-
* absence test.
|
|
283
|
+
* The route runs no dry run and does not refuse a method with pending
|
|
284
|
+
* signatures elsewhere: preparation needs a pipe's DECLARED inputs, and whether
|
|
285
|
+
* the method runs is the run's verdict, not preparation's. The `is_valid: false`
|
|
286
|
+
* arm means the closure does not load, which is a preparation failure. So is a
|
|
287
|
+
* selection the route refuses — an unknown `pipe_ref`, no entry pipe, several —
|
|
288
|
+
* which it answers with a `422` typed by one of {@link PIPE_SELECTION_ERROR_TYPES};
|
|
289
|
+
* every other failure is re-thrown unchanged.
|
|
281
290
|
*/
|
|
282
|
-
function
|
|
283
|
-
const
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
throw new InputPreparationError(`Cannot prepare inputs: \`pipe_ref\` must be qualified (\`domain.pipe_code\`), got the bare ` +
|
|
288
|
-
`"${requested}". The method declares: ${candidates}.`);
|
|
289
|
-
}
|
|
290
|
-
if (!(requested in inputForm)) {
|
|
291
|
-
throw new InputPreparationError(`Cannot prepare inputs: the method declares no pipe "${requested}". It declares: ${candidates}.`);
|
|
292
|
-
}
|
|
293
|
-
return requested;
|
|
291
|
+
async function fetchSignature(client, selector, pipeRef) {
|
|
292
|
+
const request = pipeRef === undefined ? { ...selector } : { ...selector, pipe_ref: pipeRef };
|
|
293
|
+
let result;
|
|
294
|
+
try {
|
|
295
|
+
result = await client.pipeIo(request);
|
|
294
296
|
}
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
// no pipe would not resolve one either. Neither fallback stands behind it.
|
|
303
|
-
throw new InputPreparationError(`Cannot prepare inputs: the server determined no entry pipe for this method, so a run that ` +
|
|
304
|
-
`names no pipe would not resolve one (no \`main_pipe\` is declared, or the package manifest ` +
|
|
305
|
-
`names a pipe the closure does not declare or declares in several domains). Pass ` +
|
|
306
|
-
`\`pipe_ref\`. It declares: ${candidates}.`);
|
|
297
|
+
catch (error) {
|
|
298
|
+
if (error instanceof ApiResponseError &&
|
|
299
|
+
error.status === 422 &&
|
|
300
|
+
error.errorType !== undefined &&
|
|
301
|
+
PIPE_SELECTION_ERROR_TYPES.has(error.errorType)) {
|
|
302
|
+
const detail = error.serverMessage ?? error.message;
|
|
303
|
+
throw new InputPreparationError(`Cannot prepare inputs: ${detail}`, { cause: error });
|
|
307
304
|
}
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
`its \`input_form\` descriptor does not describe it. Pass \`pipe_ref\`. It declares: ${candidates}.`);
|
|
314
|
-
}
|
|
315
|
-
return statedDefault;
|
|
305
|
+
throw error;
|
|
306
|
+
}
|
|
307
|
+
if (!result.is_valid) {
|
|
308
|
+
const first = result.validation_errors[0]?.message ?? result.message;
|
|
309
|
+
throw new InputPreparationError(`Cannot prepare inputs: the method signature did not resolve — ${first}`);
|
|
316
310
|
}
|
|
317
|
-
|
|
318
|
-
// on purpose, so read it defensively and fall through rather than trust it.
|
|
319
|
-
const blueprintDefault = readBlueprintMainPipeRef(report.bundle_blueprint);
|
|
320
|
-
if (blueprintDefault !== undefined && blueprintDefault in inputForm)
|
|
321
|
-
return blueprintDefault;
|
|
322
|
-
if (refs.length === 1)
|
|
323
|
-
return refs[0];
|
|
324
|
-
throw new InputPreparationError(`Cannot prepare inputs: the method declares no single default pipe, so \`pipe_ref\` is required. ` +
|
|
325
|
-
`It declares: ${candidates}.`);
|
|
311
|
+
return result;
|
|
326
312
|
}
|
|
327
313
|
/**
|
|
328
|
-
* The
|
|
329
|
-
*
|
|
330
|
-
*
|
|
314
|
+
* The descriptor of the pipe the route selected. The route answers a
|
|
315
|
+
* single-pipe request with `input_form` keyed by exactly the `pipe_ref` it
|
|
316
|
+
* resolved, so a missing ref or a missing key is the answer contradicting itself
|
|
317
|
+
* — preparing any other pipe would silently walk the wrong signature.
|
|
331
318
|
*/
|
|
332
|
-
function
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
319
|
+
function selectedDescriptor(report) {
|
|
320
|
+
const pipeRef = nonEmptyString(report.pipe_ref);
|
|
321
|
+
const inputForm = report.input_form;
|
|
322
|
+
if (pipeRef === undefined || !isPlainObject(inputForm) || !Object.hasOwn(inputForm, pipeRef)) {
|
|
323
|
+
const described = isPlainObject(inputForm)
|
|
324
|
+
? Object.keys(inputForm).join(", ") || "none"
|
|
325
|
+
: "none";
|
|
326
|
+
throw new InputPreparationError(`Cannot prepare inputs: the pipe I/O answer selected ${pipeRef === undefined ? "no pipe" : `"${pipeRef}"`}, ` +
|
|
327
|
+
`but its \`input_form\` does not describe it (it describes: ${described}).`);
|
|
328
|
+
}
|
|
329
|
+
return inputForm[pipeRef];
|
|
342
330
|
}
|
|
343
331
|
/**
|
|
344
332
|
* Prepare a pipe's inputs: upload local/byte/data-URL assets at the signature's
|
|
@@ -346,27 +334,20 @@ function readBlueprintMainPipeRef(blueprint) {
|
|
|
346
334
|
* records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
|
|
347
335
|
* unchanged. All failures are raised before any run is created.
|
|
348
336
|
*
|
|
349
|
-
* The signature
|
|
350
|
-
*
|
|
351
|
-
*
|
|
352
|
-
*
|
|
353
|
-
* {@link InputPreparationError};
|
|
354
|
-
* malformed selector, an unknown or foreign-org
|
|
355
|
-
* auth, a server fault
|
|
337
|
+
* The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
|
|
338
|
+
* selector — inline `files`, a `method_ref` the runner resolves, or a
|
|
339
|
+
* `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
|
|
340
|
+
* closure that does not load, and a selection the route refuses (an unknown
|
|
341
|
+
* `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}; any
|
|
342
|
+
* other failure from the route (a malformed selector, an unknown or foreign-org
|
|
343
|
+
* id, no package at the address, auth, a server fault, a deployment that does not
|
|
344
|
+
* serve the route) surfaces as `ApiResponseError`, unchanged.
|
|
356
345
|
*/
|
|
357
346
|
export async function prepareInputs(client, request) {
|
|
358
347
|
const selector = resolveSelector(request);
|
|
359
|
-
const
|
|
360
|
-
const
|
|
361
|
-
|
|
362
|
-
// Never a silent degrade to "no uploads": without the descriptor there is no
|
|
363
|
-
// signature to prepare against.
|
|
364
|
-
throw new InputPreparationError("Cannot prepare inputs: the validate report carries no `input_form` descriptor — the signature " +
|
|
365
|
-
'preparation reads. The descriptor rides `views: ["input_form"]` on pipelex-api >= 0.18.0; ' +
|
|
366
|
-
"point the client at a runner that serves it.");
|
|
367
|
-
}
|
|
368
|
-
const pipeRef = selectPipeRef(report, inputForm, nonEmptyString(request.pipe_ref));
|
|
369
|
-
const descriptor = inputForm[pipeRef];
|
|
348
|
+
const pipeRef = normalizePipeRef(request.pipe_ref);
|
|
349
|
+
const report = await fetchSignature(client, selector, pipeRef);
|
|
350
|
+
const descriptor = selectedDescriptor(report);
|
|
370
351
|
const declared = new Map(descriptor.fields.map((field) => [field.name, field]));
|
|
371
352
|
const ctx = { client, uploads: [], dedup: new Map() };
|
|
372
353
|
const rewritten = { ...request.inputs };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-inputs.js","sourceRoot":"","sources":["../src/prepare-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAQH,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAQpD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,MAAM,WAAW,GAAG,eAAe,CAAC;AAgEpC,2FAA2F;AAC3F,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,KAAK,iBAAiB,CAAC;AACrE,CAAC;AAED,+EAA+E;AAC/E,SAAS,cAAc,CAAC,KAAc;IACpC,IAAI,OAAO,KAAK,KAAK,QAAQ;QAAE,OAAO,SAAS,CAAC;IAChD,MAAM,OAAO,GAAG,KAAK,CAAC,IAAI,EAAE,CAAC;IAC7B,OAAO,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;AAClD,CAAC;AAED;;;;GAIG;AAC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,IAAI,CAAC,CAAC;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,SAAS,CAAC,2DAA2D;QACvE,CAAC;QACD,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;YACpC,2EAA2E;YAC3E,mEAAmE;YACnE,0EAA0E;YAC1E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;YAClE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/product-models.d.ts
CHANGED
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
* consumes — not a speculative mirror of every server field.
|
|
11
11
|
*/
|
|
12
12
|
import type { MethodFile } from "mthds/protocol";
|
|
13
|
+
import type { RunErrorReport } from "./error-models.js";
|
|
13
14
|
import type { RunStatus } from "./runs.js";
|
|
14
15
|
export interface UserProfile {
|
|
15
16
|
email: string;
|
|
@@ -270,18 +271,6 @@ export interface UploadGrant {
|
|
|
270
271
|
}
|
|
271
272
|
/** Per-pipe progress marker surfaced in a run's `pipe_statuses` map. */
|
|
272
273
|
export type PipeStatus = "scheduled" | "running" | "succeeded" | "failed" | "skipped";
|
|
273
|
-
/**
|
|
274
|
-
* The runner's structured failure report, as stored on a terminal-failed run.
|
|
275
|
-
*
|
|
276
|
-
* The wire payload carries the full VERBOSE `ErrorReport`; these are the two
|
|
277
|
-
* fields a consumer can rely on. Optional throughout: the shape is owned by the
|
|
278
|
-
* runner, and a failure whose callback carried no report has none of it.
|
|
279
|
-
*/
|
|
280
|
-
export interface RunErrorReport {
|
|
281
|
-
message?: string;
|
|
282
|
-
error_type?: string;
|
|
283
|
-
[key: string]: unknown;
|
|
284
|
-
}
|
|
285
274
|
export interface PipelineRun {
|
|
286
275
|
pipeline_run_id: string;
|
|
287
276
|
/** `null` on an ad-hoc run — one started from an inline bundle belongs to no
|
|
@@ -300,9 +289,9 @@ export interface PipelineRun {
|
|
|
300
289
|
pipe_statuses?: Record<string, PipeStatus> | null;
|
|
301
290
|
created_at: string;
|
|
302
291
|
finished_at?: string | null;
|
|
303
|
-
/**
|
|
304
|
-
* This is how a consumer tells the user
|
|
305
|
-
* a generic message. */
|
|
292
|
+
/** The runner's stored error report, typed whole — present only on a failed run
|
|
293
|
+
* whose completion callback carried one. This is how a consumer tells the user
|
|
294
|
+
* WHY a run failed rather than showing a generic message. */
|
|
306
295
|
error?: RunErrorReport | null;
|
|
307
296
|
}
|
|
308
297
|
/**
|
package/dist/runs.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputForm, OutputForm, PipeIOContracts } from "mthds/protocol";
|
|
2
|
+
import type { RunErrorReport } from "./error-models.js";
|
|
2
3
|
import type { DictPipeOutput, DictWorkingMemory } from "./models.js";
|
|
3
4
|
/**
|
|
4
5
|
* Run-lifecycle types + polling for the hosted polling surface (`/v1/runs/*`).
|
|
@@ -32,11 +33,11 @@ export declare function isSuccessRunStatus(status: RunStatus): boolean;
|
|
|
32
33
|
/**
|
|
33
34
|
* A run record — the BASE shape of the run-lifecycle read surface.
|
|
34
35
|
*
|
|
35
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
38
|
-
* signature keeps them accessible, mirroring the
|
|
39
|
-
* passthrough.
|
|
36
|
+
* The base fields are declared, and so is `error`, the stored report of a failed run, which
|
|
37
|
+
* is how a caller learns why a run failed. An implementation may return more (identity,
|
|
38
|
+
* workflow ids, storage URLs, anything else) — those are server-specific response fields,
|
|
39
|
+
* not named in this SDK; the index signature keeps them accessible, mirroring the
|
|
40
|
+
* request-side `extra` passthrough.
|
|
40
41
|
*/
|
|
41
42
|
export interface RunPublic {
|
|
42
43
|
pipeline_run_id: string;
|
|
@@ -44,6 +45,14 @@ export interface RunPublic {
|
|
|
44
45
|
status: RunStatus;
|
|
45
46
|
created_at: string;
|
|
46
47
|
finished_at?: string | null;
|
|
48
|
+
/**
|
|
49
|
+
* Why the run failed: the runner's stored error report, typed whole (see `RunErrorReport`).
|
|
50
|
+
* `null` on a completed run and on a run that ended without a report — a cancelled,
|
|
51
|
+
* terminated or timed-out run, or one the platform finalized itself; absent on a server that
|
|
52
|
+
* does not serve it. The results read of the same run carries the same object in its `409`,
|
|
53
|
+
* which is where `getRunResult`'s failed arm and `RunFailedError` take it from.
|
|
54
|
+
*/
|
|
55
|
+
error?: RunErrorReport | null;
|
|
47
56
|
/** Server-specific response fields (defined by the server you call). */
|
|
48
57
|
[extension: string]: unknown;
|
|
49
58
|
}
|
|
@@ -236,7 +245,10 @@ export interface RunResults {
|
|
|
236
245
|
* Single-shot result lookup outcome, discriminated on `state`:
|
|
237
246
|
* - `running` — HTTP 202; poll again after `retry_after_seconds`.
|
|
238
247
|
* - `completed` — HTTP 200; `result` carries the artifacts.
|
|
239
|
-
* - `failed` — HTTP 409; run reached a terminal non-`COMPLETED` status.
|
|
248
|
+
* - `failed` — HTTP 409; run reached a terminal non-`COMPLETED` status. `status` is the
|
|
249
|
+
* problem's `run_status` member (recovered from `detail` on a platform that predates it),
|
|
250
|
+
* `message` its `detail` (`Run finished with status FAILED: <the report's message>`), and
|
|
251
|
+
* `error` the run's stored error report, typed, or `null` when the run ended without one.
|
|
240
252
|
*/
|
|
241
253
|
export type RunResultState = {
|
|
242
254
|
state: "running";
|
|
@@ -251,6 +263,7 @@ export type RunResultState = {
|
|
|
251
263
|
pipeline_run_id: string;
|
|
252
264
|
status: RunStatus;
|
|
253
265
|
message: string;
|
|
266
|
+
error: RunErrorReport | null;
|
|
254
267
|
};
|
|
255
268
|
export interface WaitForResultOptions {
|
|
256
269
|
/**
|
|
@@ -286,8 +299,9 @@ export declare function assertWaitOptions(options?: WaitForResultOptions): void;
|
|
|
286
299
|
/**
|
|
287
300
|
* Poll a single-shot result lookup (`fetchOnce`) until the run reaches a
|
|
288
301
|
* terminal state. Returns the artifacts on `COMPLETED`, throws `RunFailedError`
|
|
289
|
-
* on any other terminal status
|
|
290
|
-
*
|
|
302
|
+
* on any other terminal status — carrying the run's status and its stored error
|
|
303
|
+
* report — and throws `RunTimeoutError` if `timeoutMs` elapses first (the run
|
|
304
|
+
* keeps executing server-side — re-poll by id later).
|
|
291
305
|
*
|
|
292
306
|
* The single owner of the wait/poll/Retry-After/abort logic — `PipelexApiClient.waitForResult`
|
|
293
307
|
* delegates here, so the behavior can never drift.
|
package/dist/runs.js
CHANGED
|
@@ -33,8 +33,9 @@ export function assertWaitOptions(options = {}) {
|
|
|
33
33
|
/**
|
|
34
34
|
* Poll a single-shot result lookup (`fetchOnce`) until the run reaches a
|
|
35
35
|
* terminal state. Returns the artifacts on `COMPLETED`, throws `RunFailedError`
|
|
36
|
-
* on any other terminal status
|
|
37
|
-
*
|
|
36
|
+
* on any other terminal status — carrying the run's status and its stored error
|
|
37
|
+
* report — and throws `RunTimeoutError` if `timeoutMs` elapses first (the run
|
|
38
|
+
* keeps executing server-side — re-poll by id later).
|
|
38
39
|
*
|
|
39
40
|
* The single owner of the wait/poll/Retry-After/abort logic — `PipelexApiClient.waitForResult`
|
|
40
41
|
* delegates here, so the behavior can never drift.
|
|
@@ -59,7 +60,7 @@ export async function pollUntilResult(fetchOnce, runId, options = {}) {
|
|
|
59
60
|
return state.result;
|
|
60
61
|
}
|
|
61
62
|
if (state.state === "failed") {
|
|
62
|
-
throw new RunFailedError(state.message, runId, state.status);
|
|
63
|
+
throw new RunFailedError(state.message, runId, state.status, { error: state.error });
|
|
63
64
|
}
|
|
64
65
|
attempt += 1;
|
|
65
66
|
options.onPoll?.({ attempt, elapsedMs });
|
package/dist/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;
|
|
1
|
+
{"version":3,"file":"runs.js","sourceRoot":"","sources":["../src/runs.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,aAAa,CAAC;AAC9D,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAyCjD,MAAM,qBAAqB,GAA2B,IAAI,GAAG,CAAY;IACvE,WAAW;IACX,QAAQ;IACR,WAAW;IACX,YAAY;IACZ,WAAW;CACZ,CAAC,CAAC;AAEH,6EAA6E;AAC7E,MAAM,UAAU,mBAAmB,CAAC,MAAiB;IACnD,OAAO,qBAAqB,CAAC,GAAG,CAAC,MAAM,CAAC,CAAC;AAC3C,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,OAAO,MAAM,KAAK,WAAW,CAAC;AAChC,CAAC;AAkQD,uEAAuE;AAEvE,MAAM,CAAC,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAC9C,MAAM,CAAC,MAAM,uBAAuB,GAAG,SAAS,CAAC,CAAC,0DAA0D;AAQ5G;;;;GAIG;AACH,MAAM,UAAU,iBAAiB,CAAC,UAAgC,EAAE;IAClE,MAAM,EAAE,UAAU,EAAE,SAAS,EAAE,GAAG,OAAO,CAAC;IAC1C,IAAI,MAAM,CAAC,KAAK,CAAC,UAAU,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE,CAAC;QACxD,MAAM,IAAI,UAAU,CAClB,qDAAqD,MAAM,CAAC,UAAU,CAAC,OAAO;YAC5E,GAAG,MAAM,CAAC,SAAS,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