@pipelex/sdk 0.38.0 → 0.40.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +3 -2
  2. package/dist/bundle-resources.d.ts +62 -0
  3. package/dist/bundle-resources.js +165 -0
  4. package/dist/bundle-resources.js.map +1 -0
  5. package/dist/cli/run.js +8 -111
  6. package/dist/cli/run.js.map +1 -1
  7. package/dist/cli/script.d.ts +1 -1
  8. package/dist/cli/source.d.ts +2 -1
  9. package/dist/cli/source.js +61 -3
  10. package/dist/cli/source.js.map +1 -1
  11. package/dist/client.d.ts +116 -30
  12. package/dist/client.js +235 -75
  13. package/dist/client.js.map +1 -1
  14. package/dist/error-models.d.ts +64 -18
  15. package/dist/error-models.js +20 -9
  16. package/dist/error-models.js.map +1 -1
  17. package/dist/errors.d.ts +125 -23
  18. package/dist/errors.js +124 -22
  19. package/dist/errors.js.map +1 -1
  20. package/dist/execute-result.js +4 -4
  21. package/dist/execute-result.js.map +1 -1
  22. package/dist/hooks/bundle-gather.d.ts +28 -1
  23. package/dist/hooks/bundle-gather.js +163 -3
  24. package/dist/hooks/bundle-gather.js.map +1 -1
  25. package/dist/hooks/claude-mthds-check.d.ts +4 -2
  26. package/dist/hooks/claude-mthds-check.js +5 -2
  27. package/dist/hooks/claude-mthds-check.js.map +1 -1
  28. package/dist/index.d.ts +7 -5
  29. package/dist/index.js +6 -2
  30. package/dist/index.js.map +1 -1
  31. package/dist/models.d.ts +42 -4
  32. package/dist/prepare-inputs.d.ts +58 -4
  33. package/dist/prepare-inputs.js +307 -61
  34. package/dist/prepare-inputs.js.map +1 -1
  35. package/dist/product-models.d.ts +13 -5
  36. package/dist/run-may-have-started.d.ts +31 -0
  37. package/dist/run-may-have-started.js +138 -0
  38. package/dist/run-may-have-started.js.map +1 -0
  39. package/dist/runs.d.ts +95 -7
  40. package/dist/runs.js +18 -0
  41. package/dist/runs.js.map +1 -1
  42. package/dist/version.d.ts +1 -1
  43. package/dist/version.js +1 -1
  44. package/docs/architecture.md +6 -3
  45. package/docs/bundle-resources.md +107 -0
  46. package/docs/cli.md +2 -1
  47. package/docs/crate-routes.md +5 -1
  48. package/docs/errors.md +87 -17
  49. package/docs/hook-bundle.md +2 -0
  50. package/docs/input-preparation.md +26 -4
  51. package/docs/run-results.md +39 -0
  52. package/package.json +2 -2
@@ -32,10 +32,32 @@
32
32
  */
33
33
  import { isValidationItem } from "./error-models.js";
34
34
  import { throwIfAborted } from "./runs.js";
35
- import { ApiResponseError, InputPreparationError, InvalidInputValueError, MethodLoadError, } from "./errors.js";
35
+ import { ApiResponseError, InputPreparationError, InvalidInputValueError, MethodLoadError, UploadNotAllowedError, } from "./errors.js";
36
+ import { hasBundleResources, isResourceMap } from "./bundle-resources.js";
36
37
  import { uploadFile } from "./upload.js";
37
38
  const PIPELEX_STORAGE_SCHEME = "pipelex-storage://";
38
39
  const HTTP_URL_RE = /^https?:\/\//i;
40
+ /**
41
+ * Every `kind` the walk handles, in the standard's order, and the only kinds a descriptor may name:
42
+ * any other is refused. It is the walk's own table rather than the `FIELD_KINDS` of whichever
43
+ * `mthds` is installed beside the SDK, so a newer `mthds` defining a new kind, which may be a file
44
+ * kind, cannot reach the walk at run time. Moving the pin onto such an `mthds` stops the build
45
+ * here, where `satisfies` requires every `FieldKind`, and in `resolveNode`'s exhaustive switch.
46
+ */
47
+ const WALKED_KINDS = {
48
+ text: true,
49
+ prose: true,
50
+ date: true,
51
+ number: true,
52
+ boolean: true,
53
+ enum: true,
54
+ document: true,
55
+ image: true,
56
+ object: true,
57
+ list: true,
58
+ unknown: true,
59
+ };
60
+ const KNOWN_KINDS = new Set(Object.keys(WALKED_KINDS));
39
61
  /**
40
62
  * The `error_type`s of the route's pipe-selection refusals — the only `422`s
41
63
  * `prepareInputs` turns into an `InputPreparationError`. They are the runtime's
@@ -81,11 +103,18 @@ function isExplicitEnvelope(value) {
81
103
  const keys = Object.keys(value);
82
104
  return keys.length === 2 && "concept" in value && "content" in value;
83
105
  }
84
- /** Decode a `data:` URL into bytes plus its MIME type. */
85
- function decodeDataUrl(dataUrl) {
106
+ /** An `InvalidInputValueError` for the value at `at`, whose message the caller words. */
107
+ function invalidValueAt(at, message, options) {
108
+ return new InvalidInputValueError(message, { inputName: at.name, inputPath: at.path }, options);
109
+ }
110
+ /**
111
+ * Decode a `data:` URL into bytes plus its MIME type. `at` is where the URL sits, for the
112
+ * error's wording only; the message never quotes the URL, which is the caller's data.
113
+ */
114
+ function decodeDataUrl(dataUrl, at) {
86
115
  const comma = dataUrl.indexOf(",");
87
116
  if (comma < 0) {
88
- throw new InvalidInputValueError(`Malformed data URL (no comma separator): ${dataUrl.slice(0, 32)}…`);
117
+ throw invalidValueAt(at, `Input "${at.path}" holds a malformed data URL (no comma separator).`);
89
118
  }
90
119
  const header = dataUrl.slice(5, comma); // strip "data:"
91
120
  const payload = dataUrl.slice(comma + 1);
@@ -107,7 +136,8 @@ function decodeDataUrl(dataUrl) {
107
136
  return { bytes: new TextEncoder().encode(text), contentType };
108
137
  }
109
138
  catch (cause) {
110
- throw new InvalidInputValueError(`Malformed data URL payload (${isBase64 ? "invalid base64" : "invalid percent-encoding"}): ${dataUrl.slice(0, 32)}…`, { cause });
139
+ throw invalidValueAt(at, `Input "${at.path}" holds a malformed data URL ` +
140
+ `(${isBase64 ? "invalid base64" : "invalid percent-encoding"}).`, { cause });
111
141
  }
112
142
  }
113
143
  /**
@@ -123,54 +153,102 @@ function base64ToBytes(base64) {
123
153
  bytes[index] = binary.charCodeAt(index);
124
154
  return bytes;
125
155
  }
126
- /** Resolve one source (string reference or bytes) to the URL/URI to write, deduped by identity. */
127
- function resolveSource(ctx, source) {
128
- const cached = ctx.dedup.get(source);
156
+ function classifySource(source) {
157
+ if (typeof source === "string") {
158
+ if (source.startsWith(PIPELEX_STORAGE_SCHEME) || HTTP_URL_RE.test(source)) {
159
+ return { kind: "reference", value: source };
160
+ }
161
+ if (source.startsWith("data:"))
162
+ return { kind: "data_url", value: source };
163
+ // Anything else is a local filesystem path — Node only (uploadFile enforces it).
164
+ return { kind: "local_path", value: source };
165
+ }
166
+ if (source instanceof Blob || source instanceof ArrayBuffer || source instanceof Uint8Array) {
167
+ return { kind: "bytes", value: source };
168
+ }
169
+ return { kind: "unsupported", value: source };
170
+ }
171
+ /**
172
+ * Resolve one classified source to the URL/URI to write, deduped by the caller's value's identity.
173
+ * `at` words a malformed `data:` URL's error; a decode rejected once is handed, cached, to a later
174
+ * position holding the same URL, and is never the one reported, since the walk reports the first
175
+ * failure it meets.
176
+ */
177
+ function resolveSource(ctx, source, at) {
178
+ const cached = ctx.dedup.get(source.value);
129
179
  if (cached !== undefined)
130
180
  return cached;
131
- const pending = doResolveSource(ctx, source);
132
- ctx.dedup.set(source, pending);
181
+ const pending = doResolveSource(ctx, source, at);
182
+ ctx.dedup.set(source.value, pending);
133
183
  return pending;
134
184
  }
135
- async function doResolveSource(ctx, source) {
136
- if (typeof source === "string") {
137
- if (source.startsWith(PIPELEX_STORAGE_SCHEME))
138
- return source; // already prepared
139
- if (HTTP_URL_RE.test(source))
140
- return source; // reachable URL — pass through
141
- if (source.startsWith("data:")) {
142
- const { bytes, contentType } = decodeDataUrl(source);
185
+ async function doResolveSource(ctx, source, at) {
186
+ switch (source.kind) {
187
+ case "reference":
188
+ return source.value; // already prepared, or a reachable URL — pass through
189
+ case "data_url": {
190
+ const { bytes, contentType } = decodeDataUrl(source.value, at);
143
191
  throwIfAborted(ctx.signal);
144
192
  const record = await uploadFile(ctx.client, bytes, { contentType, signal: ctx.signal });
145
193
  ctx.uploads.push(record);
146
194
  return record.uri;
147
195
  }
148
- // Anything else is a local filesystem path — Node only (uploadFile enforces it).
149
- throwIfAborted(ctx.signal);
150
- const record = await uploadFile(ctx.client, source, { signal: ctx.signal });
151
- ctx.uploads.push(record);
152
- return record.uri;
153
- }
154
- if (source instanceof Blob || source instanceof ArrayBuffer || source instanceof Uint8Array) {
155
- throwIfAborted(ctx.signal);
156
- const record = await uploadFile(ctx.client, source, { signal: ctx.signal });
157
- ctx.uploads.push(record);
158
- return record.uri;
196
+ case "local_path":
197
+ case "bytes": {
198
+ throwIfAborted(ctx.signal);
199
+ const record = await uploadFile(ctx.client, source.value, { signal: ctx.signal });
200
+ ctx.uploads.push(record);
201
+ return record.uri;
202
+ }
159
203
  }
160
- // An unrecognized value sits at a file-bearing position (neither a source string,
161
- // bytes, nor a canonical `{url}` content dict). Fail with a typed error rather than
162
- // letting a raw TypeError escape from the byte-extraction path.
163
- throw new InvalidInputValueError(`Unsupported value at a file input: expected a path string, bytes (Blob/File/ArrayBuffer/Uint8Array), ` +
164
- `a data URL, an http(s)/pipelex-storage:// URL, or canonical {url} content; got ${typeof source}.`);
165
204
  }
166
- /** Resolve a value known to sit at a file position into canonical content with a rewritten `url`. */
167
- async function resolveFilePosition(ctx, callerValue) {
168
- if (isFileContent(callerValue)) {
169
- const resolved = await resolveSource(ctx, callerValue.url);
170
- return { ...callerValue, url: resolved };
205
+ /**
206
+ * What a value no file input takes is, in words naming its kind and never its content, for the
207
+ * message that refuses it: `a number`, `null`, `an object with no "url" key`.
208
+ */
209
+ function describeUnsupported(value) {
210
+ if (value === null)
211
+ return "null";
212
+ if (value === undefined)
213
+ return "undefined";
214
+ if (Array.isArray(value))
215
+ return "an array";
216
+ if (isPlainObject(value))
217
+ return "url" in value ? "{url} content" : 'an object with no "url" key';
218
+ if (typeof value === "object")
219
+ return "an object that is neither bytes nor {url} content";
220
+ return `a ${typeof value}`;
221
+ }
222
+ /** The forms a file input takes, in the words of the refusal of a value it does not. */
223
+ const FILE_FORMS_WITH_UPLOADS = ": pass a local path, bytes (a Blob, File, ArrayBuffer or Uint8Array), a data: URL, an http(s) " +
224
+ "URL or a pipelex-storage:// reference, bare or as the url of {url} content.";
225
+ /** The same under `allowUploads: false`, word for word `UploadNotAllowedError`'s tail. */
226
+ const FILE_FORMS_WITHOUT_UPLOADS = ", and this preparation uploads nothing: pass an http(s) URL or a pipelex-storage:// reference " +
227
+ "instead.";
228
+ /**
229
+ * Resolve a value known to sit at a file position into canonical content with a rewritten `url`.
230
+ * A value no file input takes is refused here, where its position and the mode are known, and
231
+ * under `allowUploads: false` so is a source that would need an upload, before `resolveSource`
232
+ * could read, decode or upload it.
233
+ */
234
+ async function resolveFilePosition(ctx, callerValue, at) {
235
+ const fileContent = isFileContent(callerValue);
236
+ const source = classifySource(fileContent ? callerValue.url : callerValue);
237
+ if (source.kind === "unsupported") {
238
+ const unsupported = describeUnsupported(source.value);
239
+ throw invalidValueAt(at, `Input "${at.path}" holds ${fileContent ? `{url} content whose url is ${unsupported}` : unsupported}, ` +
240
+ "which no file input takes" +
241
+ (ctx.allowUploads ? FILE_FORMS_WITH_UPLOADS : FILE_FORMS_WITHOUT_UPLOADS));
171
242
  }
172
- const resolved = await resolveSource(ctx, callerValue);
173
- return { url: resolved };
243
+ if (!ctx.allowUploads && source.kind !== "reference") {
244
+ throw new UploadNotAllowedError({
245
+ inputName: at.name,
246
+ inputPath: at.path,
247
+ valueKind: source.kind,
248
+ });
249
+ }
250
+ const resolved = await resolveSource(ctx, source, at);
251
+ return fileContent ? { ...callerValue, url: resolved } : { url: resolved };
174
252
  }
175
253
  /**
176
254
  * Descriptor-guided walk, discriminated on the node's `kind`:
@@ -189,19 +267,28 @@ async function resolveFilePosition(ctx, callerValue) {
189
267
  * A caller value whose shape disagrees with the node (a scalar at an `object`, a
190
268
  * non-array at a `list`) passes through for the run to reject — preparation never
191
269
  * second-guesses the signature.
270
+ *
271
+ * Every node it receives was checked by {@link inputFormFault}: an `object`
272
+ * carries a list of named fields, a `list` carries a node, and every `kind` is one
273
+ * of {@link WALKED_KINDS}, so the walk trusts the descriptor's types without a
274
+ * guard. The switch names every kind, so a kind the standard adds does not
275
+ * compile until the walk decides what it is.
192
276
  */
193
- async function resolveNode(ctx, node, callerValue) {
277
+ async function resolveNode(ctx, node, callerValue, at) {
194
278
  switch (node.kind) {
195
279
  case "document":
196
280
  case "image":
197
- return resolveFilePosition(ctx, callerValue);
281
+ return resolveFilePosition(ctx, callerValue, at);
198
282
  case "object": {
199
283
  if (!isPlainObject(callerValue))
200
284
  return callerValue;
201
285
  const result = { ...callerValue };
202
286
  for (const field of node.fields) {
203
287
  if (Object.hasOwn(callerValue, field.name)) {
204
- result[field.name] = await resolveNode(ctx, field, callerValue[field.name]);
288
+ result[field.name] = await resolveNode(ctx, field, callerValue[field.name], {
289
+ name: at.name,
290
+ path: `${at.path}.${field.name}`,
291
+ });
205
292
  }
206
293
  }
207
294
  return result;
@@ -209,19 +296,35 @@ async function resolveNode(ctx, node, callerValue) {
209
296
  case "list": {
210
297
  if (!Array.isArray(callerValue))
211
298
  return callerValue;
212
- return Promise.all(callerValue.map((element) => resolveNode(ctx, node.item, element)));
299
+ return Promise.all(callerValue.map((element, index) => resolveNode(ctx, node.item, element, { name: at.name, path: `${at.path}[${index}]` })));
213
300
  }
214
- default:
301
+ case "text":
302
+ case "prose":
303
+ case "date":
304
+ case "number":
305
+ case "boolean":
306
+ case "enum":
307
+ case "unknown":
215
308
  return callerValue;
309
+ default: {
310
+ // Unreachable: the descriptor was checked against WALKED_KINDS before the walk began.
311
+ const unwalked = node;
312
+ throw new InputPreparationError(`Cannot prepare inputs: the walk has no arm for the kind ${described(unwalked.kind)}.`, { verdict: { errorDomain: "runtime", retryable: false } });
313
+ }
216
314
  }
217
315
  }
316
+ /** Whether `resources` is a plain object with no file in it, which sends nothing. */
317
+ function isEmptyResourceMap(resources) {
318
+ return isResourceMap(resources) && !hasBundleResources(resources);
319
+ }
218
320
  /**
219
321
  * Normalize and check the three selectors. Empty is absent (`files: []`,
220
322
  * `method_ref: ""`, `method_id: " "`), mirroring the run options' rule and the
221
323
  * Python `CrateRequestBase` normalisers, and exactly one must remain — the check
222
324
  * lives here because this helper is the one that composes the `pipeIo` call.
223
- * The illegal shapes are compile errors for typed callers; this backs them up for
224
- * untyped (JS) ones with a typed `InputPreparationError`.
325
+ * `resources` that carry a file accompany inline `files` only. The illegal shapes
326
+ * are compile errors for typed callers; this backs them up for untyped (JS) ones
327
+ * with a typed `InputPreparationError`.
225
328
  */
226
329
  function resolveSelector(request) {
227
330
  const raw = request;
@@ -230,6 +333,12 @@ function resolveSelector(request) {
230
333
  : undefined;
231
334
  const methodRef = nonEmptyString(raw["method_ref"]);
232
335
  const methodId = nonEmptyString(raw["method_id"]);
336
+ // Any value goes on with inline `files`, so the client's encoder refuses one that is not a
337
+ // map of paths to bytes, as it does on every route; an empty map is not sent.
338
+ const rawResources = raw["resources"];
339
+ const resources = rawResources === undefined || rawResources === null
340
+ ? undefined
341
+ : rawResources;
233
342
  const given = [];
234
343
  if (files !== undefined)
235
344
  given.push("`files`");
@@ -248,7 +357,11 @@ function resolveSelector(request) {
248
357
  "selector — `files`, `method_ref` or `method_id`.");
249
358
  }
250
359
  if (files !== undefined)
251
- return { files };
360
+ return resources === undefined ? { files } : { files, resources };
361
+ // Beside the other selectors only an empty map passes, as it sends nothing.
362
+ if (resources !== undefined && !isEmptyResourceMap(resources)) {
363
+ throw new InputPreparationError(`Cannot prepare inputs: \`resources\` accompany inline \`files\`; a ${methodRef !== undefined ? "published" : "stored"} method's files are its own.`);
364
+ }
252
365
  if (methodRef !== undefined)
253
366
  return { method_ref: methodRef };
254
367
  return { method_id: methodId };
@@ -281,6 +394,18 @@ function normalizePipeRef(raw) {
281
394
  }
282
395
  return pipeRef;
283
396
  }
397
+ /**
398
+ * Read the caller's `allowUploads`: `true` when omitted, the boolean when given, and refused
399
+ * before any request otherwise. A value of the wrong type is not read as either answer, since
400
+ * reading a stray `"false"` as permission would upload exactly what the caller meant to refuse.
401
+ */
402
+ function resolveAllowUploads(raw) {
403
+ if (raw === undefined)
404
+ return true;
405
+ if (typeof raw === "boolean")
406
+ return raw;
407
+ throw new InputPreparationError(`Cannot prepare inputs: \`allowUploads\` must be a boolean, got ${raw === null ? "null" : typeof raw}.`);
408
+ }
284
409
  /**
285
410
  * Ask `POST /v1/pipe-io` for the pipe and its signature, whatever the selector,
286
411
  * and hand back the valid report.
@@ -293,7 +418,8 @@ function normalizePipeRef(raw) {
293
418
  * which it answers with a `422` typed by one of {@link PIPE_SELECTION_ERROR_TYPES};
294
419
  * every other failure is re-thrown unchanged. An answer with no boolean `is_valid`
295
420
  * is neither arm, so it fails the preparation with a `runtime` verdict, as an
296
- * `input_form` that does not describe the selected pipe does.
421
+ * `input_form` that does not describe the selected pipe does, and one whose
422
+ * descriptor is malformed where the walk reads it.
297
423
  */
298
424
  async function fetchSignature(client, selector, pipeRef) {
299
425
  const request = pipeRef === undefined ? { ...selector } : { ...selector, pipe_ref: pipeRef };
@@ -343,20 +469,123 @@ function invalidReason(answer) {
343
469
  * The descriptor of the pipe the route selected. The route answers a
344
470
  * single-pipe request with `input_form` keyed by exactly the `pipe_ref` it
345
471
  * resolved, so a missing ref or a missing key is the answer contradicting itself
346
- * — preparing any other pipe would silently walk the wrong signature.
472
+ * — preparing any other pipe would silently walk the wrong signature. The entry
473
+ * found is then checked whole, by {@link checkedDescriptor}, before it is trusted.
347
474
  */
348
475
  function selectedDescriptor(report) {
349
476
  const pipeRef = nonEmptyString(report.pipe_ref);
350
477
  const inputForm = report.input_form;
351
478
  if (pipeRef === undefined || !isPlainObject(inputForm) || !Object.hasOwn(inputForm, pipeRef)) {
352
- const described = isPlainObject(inputForm)
479
+ const describedPipes = isPlainObject(inputForm)
353
480
  ? Object.keys(inputForm).join(", ") || "none"
354
481
  : "none";
355
482
  // The route broke its own contract, which no change to the request fixes.
356
483
  throw new InputPreparationError(`Cannot prepare inputs: the pipe I/O answer selected ${pipeRef === undefined ? "no pipe" : `"${pipeRef}"`}, ` +
357
- `but its \`input_form\` does not describe it (it describes: ${described}).`, { verdict: { errorDomain: "runtime", retryable: false } });
484
+ `but its \`input_form\` does not describe it (it describes: ${describedPipes}).`, { verdict: { errorDomain: "runtime", retryable: false } });
485
+ }
486
+ return checkedDescriptor(pipeRef, inputForm[pipeRef]);
487
+ }
488
+ /**
489
+ * The selected entry of `input_form`, checked whole by {@link inputFormFault}
490
+ * before any caller value is read and before anything is uploaded, and refused at
491
+ * its first fault.
492
+ *
493
+ * A malformation is the route breaking its contract, at whatever depth and under
494
+ * whichever input, so it is refused with a `runtime` verdict, not retryable. It is
495
+ * never passed through: a node the SDK cannot read may be a file position, and
496
+ * under the default mode passing it through would send the caller's local path to
497
+ * the runner verbatim. A `kind` outside {@link WALKED_KINDS} is refused for the
498
+ * same reason, since it may be a file kind a newer standard defines.
499
+ */
500
+ function checkedDescriptor(pipeRef, entry) {
501
+ const found = inputFormFault(entry);
502
+ if (found !== undefined) {
503
+ throw new InputPreparationError(`Cannot prepare inputs: the pipe I/O answer's \`input_form\` for "${pipeRef}" ` +
504
+ `is ${found.message}.`, { verdict: { errorDomain: "runtime", retryable: false } });
505
+ }
506
+ return entry;
507
+ }
508
+ /**
509
+ * The first fault of one pipe's input-form entry (`input_form[pipe_ref]`) in
510
+ * document order, or `undefined` when `prepareInputs` can walk it. It checks what
511
+ * the walk reads and only that: the entry is an object whose `fields` is a list;
512
+ * every field, at the top level or in an `object` node, is an object with a string
513
+ * `name`; every node, a field or a `list` node's `item`, has a string `kind` this
514
+ * SDK walks, the standard's vocabulary at the `mthds` it pins; an `object` node's
515
+ * `fields` is a list and a `list` node's `item` is a node. Members the walk does
516
+ * not read (`concept_ref`, `presence`, `hints`, …) are not checked. `prepareInputs`
517
+ * refuses an entry with a fault before it uploads anything; a caller that reads an
518
+ * entry itself, to render a form or a template, checks it here first.
519
+ */
520
+ export function inputFormFault(entry) {
521
+ if (!isPlainObject(entry)) {
522
+ return fault("", `expected an object with a list of fields, got ${described(entry)}`);
358
523
  }
359
- return inputForm[pipeRef];
524
+ return fieldsFault(entry.fields, "fields");
525
+ }
526
+ function fault(path, problem) {
527
+ return {
528
+ path,
529
+ problem,
530
+ message: `malformed${path === "" ? "" : ` at ${path}`}: ${problem}`,
531
+ };
532
+ }
533
+ function fieldsFault(fields, path) {
534
+ if (!Array.isArray(fields)) {
535
+ return fault(path, `expected a list of fields, got ${described(fields)}`);
536
+ }
537
+ for (const [index, field] of fields.entries()) {
538
+ const at = `${path}[${index}]`;
539
+ if (!isPlainObject(field)) {
540
+ return fault(at, `expected a field with a string name and kind, got ${described(field)}`);
541
+ }
542
+ if (typeof field.name !== "string") {
543
+ return fault(`${at}.name`, `expected a string, got ${described(field.name)}`);
544
+ }
545
+ const found = nodeFault(field, at);
546
+ if (found !== undefined)
547
+ return found;
548
+ }
549
+ return undefined;
550
+ }
551
+ function nodeFault(node, path) {
552
+ if (!isPlainObject(node)) {
553
+ return fault(path, `expected a node with a string kind, got ${described(node)}`);
554
+ }
555
+ const kind = node.kind;
556
+ if (typeof kind !== "string") {
557
+ return fault(`${path}.kind`, `expected a string, got ${described(kind)}`);
558
+ }
559
+ if (!KNOWN_KINDS.has(kind)) {
560
+ return fault(`${path}.kind`, `${described(kind)} is not a kind this version of @pipelex/sdk knows ` +
561
+ `(${[...KNOWN_KINDS].join(", ")}); a newer API may need a newer SDK`);
562
+ }
563
+ if (kind === "object")
564
+ return fieldsFault(node.fields, `${path}.fields`);
565
+ if (kind === "list")
566
+ return nodeFault(node.item, `${path}.item`);
567
+ return undefined;
568
+ }
569
+ /**
570
+ * A value of the server's answer, described for a message: `null`, `nothing` for
571
+ * an absent member, a string quoted and cut at 40 characters, a number or a
572
+ * boolean as written, else what it is.
573
+ */
574
+ function described(value) {
575
+ if (value === null)
576
+ return "null";
577
+ if (value === undefined)
578
+ return "nothing";
579
+ if (typeof value === "string") {
580
+ return JSON.stringify(value.length > 40 ? `${value.slice(0, 40)}…` : value);
581
+ }
582
+ if (typeof value === "number" || typeof value === "boolean")
583
+ return String(value);
584
+ if (Array.isArray(value))
585
+ return "a list";
586
+ if (isPlainObject(value))
587
+ return "an object";
588
+ return typeof value;
360
589
  }
361
590
  /**
362
591
  * Prepare a pipe's inputs: upload local/byte/data-URL assets at the signature's
@@ -364,24 +593,41 @@ function selectedDescriptor(report) {
364
593
  * records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
365
594
  * unchanged. All failures are raised before any run is created.
366
595
  *
596
+ * A value at a file input that cannot be a file — a value of a type no file input
597
+ * takes, or a `data:` URL that does not decode — throws
598
+ * {@link InvalidInputValueError}, naming the input and where inside it the value
599
+ * sits. With `allowUploads: false`, nothing is read from disk or uploaded: a value
600
+ * that would need either throws {@link UploadNotAllowedError}, naming them too.
601
+ *
367
602
  * The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
368
603
  * selector — inline `files`, a `method_ref` the runner resolves, or a
369
604
  * `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
370
605
  * closure that does not load, and a selection the route refuses (an unknown
371
- * `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}; any
372
- * other failure from the route (a malformed selector, an unknown or foreign-org
373
- * id, no package at the address, auth, a server fault, a deployment that does not
374
- * serve the route) surfaces as `ApiResponseError`, unchanged.
606
+ * `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}. So
607
+ * does an answer that breaks the route's contract, with a `runtime` verdict that
608
+ * is not retryable: no boolean `is_valid`, an `input_form` that does not describe
609
+ * the selected pipe, or a descriptor that is malformed or names a kind this SDK
610
+ * does not know, which is checked whole before anything is uploaded. Any other
611
+ * failure from the route (a malformed selector, an unknown or foreign-org id, no
612
+ * package at the address, auth, a server fault, a deployment that does not serve
613
+ * the route) surfaces as `ApiResponseError`, unchanged.
375
614
  */
376
615
  export async function prepareInputs(client, request) {
377
616
  const selector = resolveSelector(request);
378
617
  const pipeRef = normalizePipeRef(request.pipe_ref);
618
+ const allowUploads = resolveAllowUploads(request.allowUploads);
379
619
  throwIfAborted(request.signal);
380
620
  const report = await fetchSignature(client, selector, pipeRef);
381
621
  throwIfAborted(request.signal);
382
622
  const descriptor = selectedDescriptor(report);
383
623
  const declared = new Map(descriptor.fields.map((field) => [field.name, field]));
384
- const ctx = { client, signal: request.signal, uploads: [], dedup: new Map() };
624
+ const ctx = {
625
+ client,
626
+ signal: request.signal,
627
+ allowUploads,
628
+ uploads: [],
629
+ dedup: new Map(),
630
+ };
385
631
  const rewritten = { ...request.inputs };
386
632
  for (const [name, callerValue] of Object.entries(request.inputs)) {
387
633
  const field = declared.get(name);
@@ -392,11 +638,11 @@ export async function prepareInputs(client, request) {
392
638
  // The caller filled the explicit `{ concept, content }` envelope: walk the
393
639
  // inner content against the same node, then re-wrap so the concept
394
640
  // annotation rides through to the run (the runtime accepts the envelope).
395
- const walked = await resolveNode(ctx, field, callerValue.content);
641
+ const walked = await resolveNode(ctx, field, callerValue.content, { name, path: name });
396
642
  rewritten[name] = { ...callerValue, content: walked };
397
643
  }
398
644
  else {
399
- rewritten[name] = await resolveNode(ctx, field, callerValue);
645
+ rewritten[name] = await resolveNode(ctx, field, callerValue, { name, path: name });
400
646
  }
401
647
  }
402
648
  return { inputs: rewritten, uploads: ctx.uploads };
@@ -1 +1 @@
1
- {"version":3,"file":"prepare-inputs.js","sourceRoot":"","sources":["../src/prepare-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAQH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,GAChB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC;;;;;;;;;GASG;AACH,MAAM,0BAA0B,GAAwB,IAAI,GAAG,CAAC;IAC9D,wBAAwB;IACxB,yBAAyB;CAC1B,CAAC,CAAC;AAiEH,2FAA2F;AAC3F,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,MAAM,CAAC,SAAS,CAAC,QAAQ,CAAC,IAAI,CA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W,CAAC,EAAE,CAAC;YACpC,2EAA2E;YAC3E,mEAAmE;YACnE,0EAA0E;YAC1E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YACxF,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,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC"}
@@ -481,9 +481,9 @@ export interface PipelineRun {
481
481
  pipe_statuses?: Record<string, PipeStatus> | null;
482
482
  created_at: string;
483
483
  finished_at?: string | null;
484
- /** The runner's stored error report, typed whole — present only on a failed run
485
- * whose completion callback carried one. This is how a consumer tells the user
486
- * WHY a run failed rather than showing a generic message. */
484
+ /** The run's stored error report as the platform serves it, the runner's STRICT
485
+ * projection, typed whole (see `RunErrorReport` for which runs hold one). This is how a
486
+ * consumer tells the user WHY a run failed rather than showing a generic message. */
487
487
  error?: RunErrorReport | null;
488
488
  /**
489
489
  * Which version of its method the run ran: the version number for a run addressed by a
@@ -518,8 +518,9 @@ export interface RunHistoryItem {
518
518
  finished_at?: string | null;
519
519
  /** `null` when the runner resolved the pipe from the bundle's `main_pipe`. */
520
520
  pipe_code?: string | null;
521
- /** The runner's stored error report — present only on a failed run that recorded one,
522
- * so opening it from history shows why without another read. */
521
+ /** The run's stored error report, served as on the run detail — present only on a run
522
+ * that ended without completing and holds one, so opening it from history shows why
523
+ * without another read. */
523
524
  error?: RunErrorReport | null;
524
525
  /**
525
526
  * Which version of the method the run ran — a number, `"draft"`, or `null` for an inline
@@ -548,6 +549,13 @@ export interface RunDetail extends PipelineRun {
548
549
  mthds_contents?: string[] | null;
549
550
  /** The inputs the run was started with, as sent. */
550
551
  inputs?: Record<string, unknown> | null;
552
+ /**
553
+ * The id of the request that started the run — the one to quote to support, and the one the
554
+ * platform and the runner logged it under. `null` for a run saved before the platform recorded
555
+ * it; absent on a server that does not serve it. The run history does not carry it; the status
556
+ * read does, as `RunRead.request_id`.
557
+ */
558
+ request_id?: string | null;
551
559
  }
552
560
  /** Query for one page of run history. */
553
561
  export interface ListRunsQuery {