@pipelex/sdk 0.39.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.
- package/README.md +1 -0
- package/dist/bundle-resources.d.ts +62 -0
- package/dist/bundle-resources.js +165 -0
- package/dist/bundle-resources.js.map +1 -0
- package/dist/cli/script.d.ts +1 -1
- package/dist/cli/source.d.ts +2 -1
- package/dist/cli/source.js +61 -3
- package/dist/cli/source.js.map +1 -1
- package/dist/client.d.ts +85 -22
- package/dist/client.js +126 -33
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +11 -1
- package/dist/errors.js +10 -1
- package/dist/errors.js.map +1 -1
- package/dist/hooks/bundle-gather.d.ts +28 -1
- package/dist/hooks/bundle-gather.js +163 -3
- package/dist/hooks/bundle-gather.js.map +1 -1
- package/dist/hooks/claude-mthds-check.d.ts +4 -2
- package/dist/hooks/claude-mthds-check.js +5 -2
- package/dist/hooks/claude-mthds-check.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +42 -4
- package/dist/prepare-inputs.d.ts +48 -7
- package/dist/prepare-inputs.js +236 -35
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +3 -1
- package/docs/bundle-resources.md +107 -0
- package/docs/cli.md +1 -0
- package/docs/crate-routes.md +5 -1
- package/docs/errors.md +3 -2
- package/docs/hook-bundle.md +2 -0
- package/docs/input-preparation.md +9 -5
- package/package.json +1 -1
package/dist/prepare-inputs.js
CHANGED
|
@@ -33,9 +33,31 @@
|
|
|
33
33
|
import { isValidationItem } from "./error-models.js";
|
|
34
34
|
import { throwIfAborted } from "./runs.js";
|
|
35
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
|
-
/**
|
|
85
|
-
function
|
|
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
|
|
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
|
|
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
|
/**
|
|
@@ -138,21 +168,26 @@ function classifySource(source) {
|
|
|
138
168
|
}
|
|
139
169
|
return { kind: "unsupported", value: source };
|
|
140
170
|
}
|
|
141
|
-
/**
|
|
142
|
-
|
|
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) {
|
|
143
178
|
const cached = ctx.dedup.get(source.value);
|
|
144
179
|
if (cached !== undefined)
|
|
145
180
|
return cached;
|
|
146
|
-
const pending = doResolveSource(ctx, source);
|
|
181
|
+
const pending = doResolveSource(ctx, source, at);
|
|
147
182
|
ctx.dedup.set(source.value, pending);
|
|
148
183
|
return pending;
|
|
149
184
|
}
|
|
150
|
-
async function doResolveSource(ctx, source) {
|
|
185
|
+
async function doResolveSource(ctx, source, at) {
|
|
151
186
|
switch (source.kind) {
|
|
152
187
|
case "reference":
|
|
153
188
|
return source.value; // already prepared, or a reachable URL — pass through
|
|
154
189
|
case "data_url": {
|
|
155
|
-
const { bytes, contentType } = decodeDataUrl(source.value);
|
|
190
|
+
const { bytes, contentType } = decodeDataUrl(source.value, at);
|
|
156
191
|
throwIfAborted(ctx.signal);
|
|
157
192
|
const record = await uploadFile(ctx.client, bytes, { contentType, signal: ctx.signal });
|
|
158
193
|
ctx.uploads.push(record);
|
|
@@ -165,30 +200,54 @@ async function doResolveSource(ctx, source) {
|
|
|
165
200
|
ctx.uploads.push(record);
|
|
166
201
|
return record.uri;
|
|
167
202
|
}
|
|
168
|
-
case "unsupported":
|
|
169
|
-
// An unrecognized value sits at a file-bearing position (neither a source string,
|
|
170
|
-
// bytes, nor a canonical `{url}` content dict). Fail with a typed error rather than
|
|
171
|
-
// letting a raw TypeError escape from the byte-extraction path.
|
|
172
|
-
throw new InvalidInputValueError(`Unsupported value at a file input: expected a path string, bytes (Blob/File/ArrayBuffer/Uint8Array), ` +
|
|
173
|
-
`a data URL, an http(s)/pipelex-storage:// URL, or canonical {url} content; got ${typeof source.value}.`);
|
|
174
203
|
}
|
|
175
204
|
}
|
|
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.";
|
|
176
228
|
/**
|
|
177
229
|
* Resolve a value known to sit at a file position into canonical content with a rewritten `url`.
|
|
178
|
-
*
|
|
179
|
-
* `
|
|
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.
|
|
180
233
|
*/
|
|
181
234
|
async function resolveFilePosition(ctx, callerValue, at) {
|
|
182
235
|
const fileContent = isFileContent(callerValue);
|
|
183
236
|
const source = classifySource(fileContent ? callerValue.url : callerValue);
|
|
184
|
-
if (
|
|
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));
|
|
242
|
+
}
|
|
243
|
+
if (!ctx.allowUploads && source.kind !== "reference") {
|
|
185
244
|
throw new UploadNotAllowedError({
|
|
186
245
|
inputName: at.name,
|
|
187
246
|
inputPath: at.path,
|
|
188
247
|
valueKind: source.kind,
|
|
189
248
|
});
|
|
190
249
|
}
|
|
191
|
-
const resolved = await resolveSource(ctx, source);
|
|
250
|
+
const resolved = await resolveSource(ctx, source, at);
|
|
192
251
|
return fileContent ? { ...callerValue, url: resolved } : { url: resolved };
|
|
193
252
|
}
|
|
194
253
|
/**
|
|
@@ -208,6 +267,12 @@ async function resolveFilePosition(ctx, callerValue, at) {
|
|
|
208
267
|
* A caller value whose shape disagrees with the node (a scalar at an `object`, a
|
|
209
268
|
* non-array at a `list`) passes through for the run to reject — preparation never
|
|
210
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.
|
|
211
276
|
*/
|
|
212
277
|
async function resolveNode(ctx, node, callerValue, at) {
|
|
213
278
|
switch (node.kind) {
|
|
@@ -233,17 +298,33 @@ async function resolveNode(ctx, node, callerValue, at) {
|
|
|
233
298
|
return callerValue;
|
|
234
299
|
return Promise.all(callerValue.map((element, index) => resolveNode(ctx, node.item, element, { name: at.name, path: `${at.path}[${index}]` })));
|
|
235
300
|
}
|
|
236
|
-
|
|
301
|
+
case "text":
|
|
302
|
+
case "prose":
|
|
303
|
+
case "date":
|
|
304
|
+
case "number":
|
|
305
|
+
case "boolean":
|
|
306
|
+
case "enum":
|
|
307
|
+
case "unknown":
|
|
237
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
|
+
}
|
|
238
314
|
}
|
|
239
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
|
+
}
|
|
240
320
|
/**
|
|
241
321
|
* Normalize and check the three selectors. Empty is absent (`files: []`,
|
|
242
322
|
* `method_ref: ""`, `method_id: " "`), mirroring the run options' rule and the
|
|
243
323
|
* Python `CrateRequestBase` normalisers, and exactly one must remain — the check
|
|
244
324
|
* lives here because this helper is the one that composes the `pipeIo` call.
|
|
245
|
-
*
|
|
246
|
-
* untyped (JS) ones
|
|
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`.
|
|
247
328
|
*/
|
|
248
329
|
function resolveSelector(request) {
|
|
249
330
|
const raw = request;
|
|
@@ -252,6 +333,12 @@ function resolveSelector(request) {
|
|
|
252
333
|
: undefined;
|
|
253
334
|
const methodRef = nonEmptyString(raw["method_ref"]);
|
|
254
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;
|
|
255
342
|
const given = [];
|
|
256
343
|
if (files !== undefined)
|
|
257
344
|
given.push("`files`");
|
|
@@ -270,7 +357,11 @@ function resolveSelector(request) {
|
|
|
270
357
|
"selector — `files`, `method_ref` or `method_id`.");
|
|
271
358
|
}
|
|
272
359
|
if (files !== undefined)
|
|
273
|
-
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
|
+
}
|
|
274
365
|
if (methodRef !== undefined)
|
|
275
366
|
return { method_ref: methodRef };
|
|
276
367
|
return { method_id: methodId };
|
|
@@ -327,7 +418,8 @@ function resolveAllowUploads(raw) {
|
|
|
327
418
|
* which it answers with a `422` typed by one of {@link PIPE_SELECTION_ERROR_TYPES};
|
|
328
419
|
* every other failure is re-thrown unchanged. An answer with no boolean `is_valid`
|
|
329
420
|
* is neither arm, so it fails the preparation with a `runtime` verdict, as an
|
|
330
|
-
* `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.
|
|
331
423
|
*/
|
|
332
424
|
async function fetchSignature(client, selector, pipeRef) {
|
|
333
425
|
const request = pipeRef === undefined ? { ...selector } : { ...selector, pipe_ref: pipeRef };
|
|
@@ -377,20 +469,123 @@ function invalidReason(answer) {
|
|
|
377
469
|
* The descriptor of the pipe the route selected. The route answers a
|
|
378
470
|
* single-pipe request with `input_form` keyed by exactly the `pipe_ref` it
|
|
379
471
|
* resolved, so a missing ref or a missing key is the answer contradicting itself
|
|
380
|
-
* — 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.
|
|
381
474
|
*/
|
|
382
475
|
function selectedDescriptor(report) {
|
|
383
476
|
const pipeRef = nonEmptyString(report.pipe_ref);
|
|
384
477
|
const inputForm = report.input_form;
|
|
385
478
|
if (pipeRef === undefined || !isPlainObject(inputForm) || !Object.hasOwn(inputForm, pipeRef)) {
|
|
386
|
-
const
|
|
479
|
+
const describedPipes = isPlainObject(inputForm)
|
|
387
480
|
? Object.keys(inputForm).join(", ") || "none"
|
|
388
481
|
: "none";
|
|
389
482
|
// The route broke its own contract, which no change to the request fixes.
|
|
390
483
|
throw new InputPreparationError(`Cannot prepare inputs: the pipe I/O answer selected ${pipeRef === undefined ? "no pipe" : `"${pipeRef}"`}, ` +
|
|
391
|
-
`but its \`input_form\` does not describe it (it describes: ${
|
|
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)}`);
|
|
523
|
+
}
|
|
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);
|
|
392
581
|
}
|
|
393
|
-
|
|
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;
|
|
394
589
|
}
|
|
395
590
|
/**
|
|
396
591
|
* Prepare a pipe's inputs: upload local/byte/data-URL assets at the signature's
|
|
@@ -398,18 +593,24 @@ function selectedDescriptor(report) {
|
|
|
398
593
|
* records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
|
|
399
594
|
* unchanged. All failures are raised before any run is created.
|
|
400
595
|
*
|
|
401
|
-
*
|
|
402
|
-
*
|
|
403
|
-
* where inside it the value
|
|
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.
|
|
404
601
|
*
|
|
405
602
|
* The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
|
|
406
603
|
* selector — inline `files`, a `method_ref` the runner resolves, or a
|
|
407
604
|
* `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
|
|
408
605
|
* closure that does not load, and a selection the route refuses (an unknown
|
|
409
|
-
* `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}
|
|
410
|
-
*
|
|
411
|
-
*
|
|
412
|
-
*
|
|
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.
|
|
413
614
|
*/
|
|
414
615
|
export async function prepareInputs(client, request) {
|
|
415
616
|
const selector = resolveSelector(request);
|
|
@@ -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,EACf,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,EAAE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@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
92
92
|
- `models.ts` — Dict-serialized concretes (`DictStuff` / `DictWorkingMemory` / `DictPipeOutput` / `DictRunResultExecute`), the `/v1/validate` surface (`PipelexValidationResult`, `ValidationErrorItem`, and the `SuggestedFix` / `FixOp` repair vocabulary its items carry — the standard's declarations, restated because `mthds` exports them only from its package root and pinned to it by a type-level test, see [errors.md](./errors.md#a-validation-item--validationerroritem)), the tools surface (`Diagnostic` / `LintResponse` / `FormatResponse`), and the crate-route request/response models — the shared `MthdsFileItem` / `CrateRequestBase` / `CrateInvalidReport` vocabulary plus the `/v1/resolve`, `/v1/codegen` and `/v1/pipe-io` shapes built on it, `GeneratedArtifact` among them.
|
|
93
93
|
- `product-models.ts` — the snake_case wire shapes for the hosted-product management routes (profile, methods catalog, organizations, billing, API keys, onboarding, storage, runs list/detail/update). Each interface models only the fields the product actually consumes — no speculative mirrors.
|
|
94
94
|
- `error-models.ts` — the error-report wire models: `RunErrorReport`, the runner's `ErrorReport` typed with every field it carries (with `UserAction`, `ProviderErrorMetadata` and `MigrationErrorBlock`), which is the one type for a failed run's report on `RunPublic.error`, `PipelineRun.error`, `RunHistoryItem.error`, the failed arm of `RunResultState` and `RunFailedError.error`; and `ProblemDetails` / `FieldError`, the typed members of a problem document that `ApiResponseError` exposes. Every field is optional and every interface keeps an index signature, because the runner owns the shape and adds fields without asking. It also holds the one function that checks a stored report, the internal `readRunErrorReport`, which every read handing a report back applies: each named field is kept only when it has its declared type, and members the SDK does not name are relayed as sent. It imports the `ValidationErrorItem` type and nothing else. See [errors.md](./errors.md#a-failed-run--runerrorreport).
|
|
95
|
+
- `bundle-resources.ts` — the files a bundle's steps read, sent as the request's `resources`: the `BundleResources` and `BundleResourceBytes` types the barrel exports, the runner's path rule (`bundleResourcePathRefusal`) and canonical spelling, and `encodeBundleResources`, which checks every key before it reads any value and turns the bytes into standard base64 through `upload.ts`'s `bytesToBase64`. Internal apart from its types; the hook's bundle gatherer reuses its path rule. See [bundle-resources.md](./bundle-resources.md).
|
|
95
96
|
- `method-source.ts` — `methodSourceToContents`, the canonical parser turning a stored method's polymorphic `mthds` source (raw single-bundle text XOR a JSON `{name, content}[]` file array) into a flat list of file contents. A verbatim port of the platform's `method_source_to_contents` so the SDK and runtime read a stored source identically; exported from the barrel and consumed by `getMethodClosure`. See [input-preparation.md](./input-preparation.md#getmethodclosure--the-explicit-expansion-utility).
|
|
96
97
|
- `codegen-check.ts` — `runCodegenCheck`, the **pure** offline drift check over a committed codegen tree: the stamp grammar, the `codegen.lock` parser, the hash, and the drift taxonomy, ported from pipelex's `codegen/check.py` so a verdict computed here equals the one `pipelex codegen check` computes over the same bytes (the drift `detail` sentences included, verbatim). It touches neither the client nor `mthds/protocol` — its only runtime imports are `smol-toml` and the plain-object guard of the pure `error-models.ts` — and it hashes through WebCrypto rather than `node:crypto` so it adds no Node builtin to the barrel's import graph (`upload.ts` still names `node:fs/promises`, so a browser-targeting bundler must mark `node:*` external). It raises `CodegenLockError`, which extends `Error` rather than the protocol base and declares the error verdict itself (`input`, not retryable). No filesystem, no fetch, no API key — the caller walks its own tree and hands in the text. See [crate-routes.md](./crate-routes.md#the-offline-check--runcodegencheck).
|
|
97
98
|
- `upload-grant.ts` — `uploadWithGrant`, the sender of an upload grant (`requestUploadGrant`, `POST /v1/upload/grant`): the file as the raw body of a `PUT` to the grant's URL with its signed headers unchanged, redirects refused, the whole exchange bounded by a time limit scaled by the file's size unless the caller passes `timeoutMs`, only the first 16 KiB of storage's error body read, and storage's refusals mapped onto the input-preparation errors (`RejectedAssetError` with a `code` for a `4xx` such as the `412` of a used grant or the `403` of a signature mismatch, `UploadTransportError` with a `code` for the time limit running out, a `5xx`, storage's `RequestTimeout`, a `409` conflict, a redirect or no response). It is the browser-safe `@pipelex/sdk/upload` entry, so it imports the error classes, the timer bound in `timers.ts` and the wire types only, never the client. See [input-preparation.md](./input-preparation.md#uploading-with-a-grant--requestuploadgrant--uploadwithgrant).
|
|
@@ -115,6 +116,7 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
115
116
|
- **Method-bundle transport (pipelex-api extension):** `execute` / `start` / the blocking fallback accept the whole method — the `.mthds` plus its `funcs/*.py`, `structures/*.py`, `requirements.txt` — instead of only the inline `mthds_contents` text, so custom PipeFunc Python travels with the method. Two equivalent, mutually exclusive encodings: `files` (a `{ relativePath: text }` map) and `bundle_b64` (the same bundle as a base64 zip). A bundle is self-contained, so it satisfies the "something to run" precondition on its own — neither `pipe_code` nor `mthds_contents` is required beside it. See [run-sources](#run-sources) above.
|
|
116
117
|
- **Method selectors on the run methods:** `execute` / `start` / `startAndWaitForResult` take the Pipelex API's `method_ref` (an address the runner resolves; provenance comes back typed as `method_provenance`) and the platform's `method_id` as **typed named options** (`PipelexRunOptions` / `PipelexStartOptions`), never `extra` entries. See [Pipelex API run extensions](#pipelex-api-run-extensions-method_ref) and [hosted run extensions](#hosted-run-extensions-method_id) above.
|
|
117
118
|
- **Method selectors on `validate`:** the first argument is inline contents (`string[]`) or a `ValidateMethodSelector` — `{ method_ref }` (runner-resolved by address) or `{ method_id }` (hosted, platform-resolved) — under the strict tooling XOR: exactly one selector, no linkage exception, `mthds_sources` legal only beside inline contents. A selector-resolution failure is a non-2xx `ApiResponseError`, never an `is_valid: false` verdict.
|
|
119
|
+
- **The files a bundle's steps read (`resources`, pipelex-api extension):** `validate` / `validateFiles` (in their last options argument), `execute` / `start` / `startAndWaitForResult` (both paths), the crate routes and `prepareInputs` (beside inline `files`) take `resources`, the files a `PipeDocGen` step's `template_file` names, keyed by the path the step names, each as its bytes (`Uint8Array`, `ArrayBuffer` or `Blob`), and send them as the wire's base64 map. `bundle-resources.ts` encodes them and refuses, before any request, a key the runner's path rule refuses and two keys for one file; the run routes and `validate` also mirror the runner's pairing refusals (beside a `method_ref`, or with no source on a run), while the crate routes leave theirs to the server, as they do the selector XOR. `resources` is reserved on `extra`, so it cannot bypass those checks. The valid verdict's `warnings` carry the template check's `template_check_warning` items, whose `template_file` and `template_location` `ValidationErrorItem` declares ahead of `mthds`, a difference the type-level pin states. See [bundle-resources.md](./bundle-resources.md).
|
|
118
120
|
- **Crate routes (`/v1/resolve`, `/v1/codegen`, `/v1/pipe-io`):** `resolve` emits the **normalized library crate** (the MTHDS standard's Library Crate Format, fingerprint riding inside the payload); `codegen` projects that crate through two explicit axes — `kind` (`types`) × `target` (`ts-zod` / `python-pydantic` / `python-structures`) — into stamped artifacts plus their `codegen.lock`. All three share one closure envelope (`files: [{content, source?}]` XOR a `method_ref`, the address form server-resolved and the registry form a `501`) and return a **discriminated 200 verdict** (`is_valid`, with `CrateInvalidReport` as the shared invalid arm) rather than a bare payload, the same discipline as `validate`. They also take the hosted `method_id` (`PipelexHostedToolingExtensions`) as a third closure form under the strict three-way XOR — a pass-through the platform resolves, meaningless against a bare runner. Writing the artifacts and lock verbatim reproduces a local `pipelex codegen types` run byte-for-byte, so the offline `pipelex codegen check` passes — the SDK stays transport-only and does not write files. Verifying such a tree afterwards is `runCodegenCheck`, a standalone pure helper rather than a client method, because it needs no server at all. `pipeIo` derives a method's three I/O artifacts — the standard's `PipeIOContracts`, `InputForm` and `OutputForm`, imported from `mthds/protocol` — for the pipe the route selects (the request's qualified `pipe_ref`, else the method's own entry pipe) or for every pipe under `all_pipes`, with the runnability facts beside them and the closure's files echoed on `include_files`, and it runs no dry run; a selection it refuses is a `422` typed `EntryPipeNotFoundError` or `EntryPipeAmbiguousError`. See [crate-routes.md](./crate-routes.md).
|
|
119
121
|
- **Model reference check (`/v1/models/check`):** `checkModelReference(reference, category?)`, a Pipelex API extension served by any `pipelex-api` runner from pipelex 0.78.0 and on the hosted API, whose platform relays it byte-identically. It is a **diagnostic endpoint** like `validate`: a reference that resolves nowhere is a `200` verdict with `resolution: "not_found"` and the names the caller may have meant (`suggestions`, `other_kinds`, `other_categories`), never a thrown error. Only a request that cannot produce a verdict throws `ApiResponseError`, a `422` typed by its `errorType`: `InvalidModelReference` for a reference that is blank, a sigil or a namespace alone, or past the runner's length limit, `InvalidModelCategory` for an unknown `type`, `ValidationError` for a missing or repeated parameter. The SDK validates none of it, so the runner's rule is the only one. `ModelReferenceVerdict` is a union of one arm per reference kind, discriminated on the wire's own `kind` (`PresetReferenceVerdict`, `AliasReferenceVerdict`, `WaterfallReferenceVerdict`, `HandleReferenceVerdict`): a `matches` entry carries no kind of its own, but every entry of one verdict shares the verdict's, so narrowing on `kind` types `matches` as `PresetMatch[]`, `AliasMatch[]`, `WaterfallMatch[]` or `HandleMatch[]` without a field the wire does not carry. `ModelCheckCategory` is the protocol's model categories plus `doc_gen`, the family of `PipeDocGen`, which the protocol and so `models` leave out but a method's `model` field can name. `resolution` is typed open, `ModelReferenceResolution | (string & {})`, under the spec's reader rule that a client reading a value it does not know treats the reference as unresolved, and so is every category a verdict names, `ModelCheckCategory | (string & {})` as `mthds` types `ModelInfo.type`, since a runner of a later version may add one; the `category` a request names stays closed. A match's `resolves_to` is `null` when the reference resolves by name but a run through it would reach no model the runner can call, which a consumer shows as a warning rather than as an unknown name.
|
|
120
122
|
- **Tools (`/v1/lint`, `/v1/format`):** `lint`, `format` — single-file static diagnostics and canonical formatting, served by any pipelex-api runner (no inference, no bundle load). Both are **diagnostic endpoints** like `validate`: a malformed `.mthds` file is a produced verdict on a **200** carrying `diagnostics[]`, never a thrown error — `format` additionally echoes the content back unchanged with `changed: false`. Only a no-verdict condition is non-2xx: a malformed body, **malformed formatter `options`** (e.g. a non-numeric `column_width` ⇒ 422), auth, or a server fault, all mapped to the typed `ApiResponseError`. `lint` is the cheap static check (syntax / schema / semantic); it does not replace `validate`, which loads the bundle, resolves across files, and dry-runs the pipes.
|
|
@@ -136,7 +138,7 @@ The hosted catalog/account routes the webapp drives. All ride the same `{base}/v
|
|
|
136
138
|
|
|
137
139
|
## Hook bundle (`dist-hooks/check.mjs`)
|
|
138
140
|
|
|
139
|
-
`src/hooks/` holds the post-edit `.mthds` hook pipeline (local lint/format via `@pipelex/tools-wasm`, then a `POST /v1/validate` verdict through this SDK), bundled into a single dependency-free ESM file by `npm run build:hook`. Its validate client is built by `src/hooks/validate-client.ts` with `appInfo: { name: "pipelex-mthds-check", version: SDK_VERSION }`, the `hook` surface's registry token, so the platform attributes its calls to the hook rather than to a plain SDK caller. The one specifier left external is `undici`, reached only by the artifact fetch path through a dynamic import the hook never executes, so the bundle does not inline an HTTP client it cannot use. **Distribution is source-checkout vendoring, not npm:** `pipelex-plugins` runs `make vendor-hook`, which builds `dist-hooks/check.mjs` in a sibling checkout of this repo and copies it in as a static hook asset — the published `@pipelex/sdk` tarball deliberately does not ship the bundle (it inlines the ~4 MB WASM engine, and no npm consumer of the SDK's library API uses it). `dist-hooks/` is gitignored; the consumer repo's own checks gate a stale vendored copy. `@pipelex/tools-wasm` is pinned to an exact version in `package.json`, because the engine carries the MTHDS schema the hook lints against: a newer schema reaches the hook only by a deliberate bump followed by a rebuild and a re-vendor, and the bundle's provenance line (`@pipelex/sdk <version> (<commit>) + @pipelex/tools-wasm <version> (npm)`) names the engine it embeds. Which file the hook checks on each platform, and how it finds the file a Codex patch run through the shell wrote, is in [`hook-bundle.md`](./hook-bundle.md).
|
|
141
|
+
`src/hooks/` holds the post-edit `.mthds` hook pipeline (local lint/format via `@pipelex/tools-wasm`, then a `POST /v1/validate` verdict through this SDK), bundled into a single dependency-free ESM file by `npm run build:hook`. Its validate client is built by `src/hooks/validate-client.ts` with `appInfo: { name: "pipelex-mthds-check", version: SDK_VERSION }`, the `hook` surface's registry token, so the platform attributes its calls to the hook rather than to a plain SDK caller. The one specifier left external is `undici`, reached only by the artifact fetch path through a dynamic import the hook never executes, so the bundle does not inline an HTTP client it cannot use. **Distribution is source-checkout vendoring, not npm:** `pipelex-plugins` runs `make vendor-hook`, which builds `dist-hooks/check.mjs` in a sibling checkout of this repo and copies it in as a static hook asset — the published `@pipelex/sdk` tarball deliberately does not ship the bundle (it inlines the ~4 MB WASM engine, and no npm consumer of the SDK's library API uses it). `dist-hooks/` is gitignored; the consumer repo's own checks gate a stale vendored copy. `@pipelex/tools-wasm` is pinned to an exact version in `package.json`, because the engine carries the MTHDS schema the hook lints against: a newer schema reaches the hook only by a deliberate bump followed by a rebuild and a re-vendor, and the bundle's provenance line (`@pipelex/sdk <version> (<commit>) + @pipelex/tools-wasm <version> (npm)`) names the engine it embeds. Its bundle gatherer (`src/hooks/bundle-gather.ts`) parses each `.mthds` file it sends with `smol-toml`, which the bundle inlines, to find the template files its `PipeDocGen` steps name, and sends them as the request's `resources`. Which file the hook checks on each platform, what it sends with it, and how it finds the file a Codex patch run through the shell wrote, is in [`hook-bundle.md`](./hook-bundle.md).
|
|
140
142
|
|
|
141
143
|
## Testing
|
|
142
144
|
|