@pipelex/sdk 0.47.0 → 0.48.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (70) hide show
  1. package/README.md +9 -7
  2. package/dist/artifacts.d.ts +4 -3
  3. package/dist/artifacts.js +20 -14
  4. package/dist/artifacts.js.map +1 -1
  5. package/dist/cli/script.d.ts +1 -1
  6. package/dist/cli/source.d.ts +8 -7
  7. package/dist/cli/source.js +11 -5
  8. package/dist/cli/source.js.map +1 -1
  9. package/dist/client.d.ts +326 -213
  10. package/dist/client.js +829 -517
  11. package/dist/client.js.map +1 -1
  12. package/dist/codegen-check.d.ts +2 -3
  13. package/dist/codegen-check.js +2 -3
  14. package/dist/codegen-check.js.map +1 -1
  15. package/dist/errors.d.ts +5 -2
  16. package/dist/errors.js +5 -2
  17. package/dist/errors.js.map +1 -1
  18. package/dist/hooks/bundle-gather.d.ts +47 -40
  19. package/dist/hooks/bundle-gather.js +121 -219
  20. package/dist/hooks/bundle-gather.js.map +1 -1
  21. package/dist/hooks/check-core.d.ts +70 -6
  22. package/dist/hooks/check-core.js +188 -29
  23. package/dist/hooks/check-core.js.map +1 -1
  24. package/dist/hooks/claude-mthds-check.d.ts +19 -5
  25. package/dist/hooks/claude-mthds-check.js +20 -53
  26. package/dist/hooks/claude-mthds-check.js.map +1 -1
  27. package/dist/hooks/secret-guard.d.ts +38 -0
  28. package/dist/hooks/secret-guard.js +134 -0
  29. package/dist/hooks/secret-guard.js.map +1 -0
  30. package/dist/hooks/validate-stage.d.ts +29 -0
  31. package/dist/hooks/validate-stage.js +66 -0
  32. package/dist/hooks/validate-stage.js.map +1 -0
  33. package/dist/index.d.ts +3 -4
  34. package/dist/index.js +4 -3
  35. package/dist/index.js.map +1 -1
  36. package/dist/method-trees.d.ts +220 -74
  37. package/dist/method-trees.js +250 -37
  38. package/dist/method-trees.js.map +1 -1
  39. package/dist/models.d.ts +162 -59
  40. package/dist/node-host/node.d.ts +33 -0
  41. package/dist/node-host/node.js +27 -0
  42. package/dist/node-host/node.js.map +1 -0
  43. package/dist/node-host/unavailable.d.ts +8 -0
  44. package/dist/node-host/unavailable.js +8 -0
  45. package/dist/node-host/unavailable.js.map +1 -0
  46. package/dist/node-host.d.ts +53 -0
  47. package/dist/node-host.js +72 -0
  48. package/dist/node-host.js.map +1 -0
  49. package/dist/prepare-inputs.d.ts +46 -27
  50. package/dist/prepare-inputs.js +123 -42
  51. package/dist/prepare-inputs.js.map +1 -1
  52. package/dist/product-models.d.ts +14 -16
  53. package/dist/upload.d.ts +4 -9
  54. package/dist/upload.js +13 -16
  55. package/dist/upload.js.map +1 -1
  56. package/dist/version.d.ts +1 -1
  57. package/dist/version.js +1 -1
  58. package/docs/architecture.md +44 -21
  59. package/docs/cli.md +1 -1
  60. package/docs/crate-routes.md +43 -21
  61. package/docs/errors.md +5 -5
  62. package/docs/hook-bundle.md +27 -1
  63. package/docs/input-preparation.md +13 -13
  64. package/docs/method-trees.md +120 -22
  65. package/docs/run-results.md +5 -2
  66. package/package.json +8 -2
  67. package/dist/bundle-resources.d.ts +0 -62
  68. package/dist/bundle-resources.js +0 -165
  69. package/dist/bundle-resources.js.map +0 -1
  70. package/docs/bundle-resources.md +0 -107
@@ -6,10 +6,10 @@
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
- * 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/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
9
+ * takes it — its tree (a `directory`, `contents`, a listed `tree` or the `files`
10
+ * map), a `method_ref` address, or a stored `method_id` — exactly one per call.
11
+ * All three reach `POST /v1/pipe-io`: the tree as the `files` map `pipeIo` sends,
12
+ * an address resolved on the runner and an id on the platform. The route also SELECTS the pipe: the caller's qualified
13
13
  * `pipe_ref`, else the method's own entry pipe, and the ref it answers with is
14
14
  * the one prepared. It runs no dry run, so preparing inputs costs one static load.
15
15
  *
@@ -30,8 +30,9 @@
30
30
  * dict. See `docs/input-preparation.md`, which `pipelex-sdk-python` mirrors case
31
31
  * for case.
32
32
  */
33
- import type { BundleResources } from "./bundle-resources.js";
34
- import type { MthdsFileItem, PipeIORequest, PipeIOResponse } from "./models.js";
33
+ import type { MethodFiles } from "mthds/protocol";
34
+ import type { CrateRouteOptions, PipeIORequest, PipeIOResponse } from "./models.js";
35
+ import type { MethodTreeForm } from "./method-trees.js";
35
36
  import type { UploadCapableClient, UploadRecord } from "./upload.js";
36
37
  /** The shared half of the request: the target pipe and the caller's inputs. */
37
38
  export interface PrepareInputsBase {
@@ -50,7 +51,9 @@ export interface PrepareInputsBase {
50
51
  /**
51
52
  * Stops the preparation between its steps, a file's read and its upload included: once it has
52
53
  * aborted, neither the pipe I/O request nor any upload starts, and `prepareInputs` throws the
53
- * abort. A request already sent runs to its end. It is not sent to the server.
54
+ * abort. A `tree` or `contents` sent by hash counts its steps too — the version handshake, the
55
+ * blob route, each read and upload of a missing blob — so an abort during the handshake starts
56
+ * none of the rest. A request already sent runs to its end. It is not sent to the server.
54
57
  */
55
58
  signal?: AbortSignal;
56
59
  /**
@@ -63,35 +66,48 @@ export interface PrepareInputsBase {
63
66
  */
64
67
  allowUploads?: boolean;
65
68
  }
69
+ /**
70
+ * The method's tree, in exactly one of the forms `pipeIo` takes it (see `CrateRequestBase`):
71
+ * `directory`, the method's directory on disk, listed by the `mthds` package's lister (Node only);
72
+ * `contents`, each file's bytes or text by tree path; `tree`, a listed source such as the
73
+ * `MethodTree` the `mthds` package's `listMethodTree` returns; or `files`, the protocol's map of
74
+ * file entries, sent as given. The client sends a `directory`, `contents` or `tree` inline when
75
+ * small and by hash otherwise.
76
+ */
77
+ export type PrepareInputsTree = MethodTreeForm;
78
+ /** What a published or stored method cannot carry: its tree is its own. */
79
+ interface NoTree {
80
+ directory?: never;
81
+ contents?: never;
82
+ tree?: never;
83
+ files?: never;
84
+ dependencies?: never;
85
+ }
66
86
  /**
67
87
  * How the method is named — exactly one of the three selectors, each pinning the
68
88
  * other two to `never` so a second one is a compile error (the same XOR
69
89
  * `ValidateMethodSelector` states for `validate`). All three reach the
70
- * server as-is: `files` inline, `method_ref` resolved by the runner, `method_id`
71
- * resolved by the platform.
90
+ * server: the tree as the `files` map, `method_ref` resolved by the runner,
91
+ * `method_id` resolved by the platform.
72
92
  *
73
- * Inline `files` may bring `resources`, the files the closure's steps read, such
74
- * as a `PipeDocGen` step's `template_file`, keyed by the path the step names, each
75
- * as its bytes: the pipe I/O route loads the closure, and a step whose template file
76
- * was not sent makes it fail to load. A published or stored method's files are its
77
- * own, so the other two selectors take none.
93
+ * The tree may bring `dependencies`, the method packages it calls by address, each a
94
+ * map of file entries keyed by its address. The files the closure's steps read, such as a
95
+ * `PipeDocGen` step's `template_file`, are files of the tree like any other. The pipe I/O
96
+ * route loads the closure, and a step whose template file is not in the tree, or a call
97
+ * into a package nothing shipped, makes it fail to load. A published or stored method's
98
+ * tree and packages are its own, so the other two selectors take no `dependencies`.
78
99
  */
79
- export type PrepareInputsClosure = {
80
- files: MthdsFileItem[];
81
- resources?: BundleResources | null;
100
+ export type PrepareInputsClosure = (PrepareInputsTree & {
101
+ dependencies?: Record<string, MethodFiles>;
82
102
  method_ref?: never;
83
103
  method_id?: never;
84
- } | {
104
+ }) | (NoTree & {
85
105
  method_ref: string;
86
- files?: never;
87
106
  method_id?: never;
88
- resources?: never;
89
- } | {
107
+ }) | (NoTree & {
90
108
  method_id: string;
91
- files?: never;
92
109
  method_ref?: never;
93
- resources?: never;
94
- };
110
+ });
95
111
  /** What `prepareInputs` takes: one method selector, the target pipe, the caller's inputs. */
96
112
  export type PrepareInputsRequest = PrepareInputsBase & PrepareInputsClosure;
97
113
  /** The result of `prepareInputs`: rewritten inputs (copy-on-write) plus upload records. */
@@ -107,7 +123,7 @@ export interface PreparedInputs {
107
123
  * `PipelexApiClient` satisfies it structurally.
108
124
  */
109
125
  export interface PrepareCapableClient extends UploadCapableClient {
110
- pipeIo(request: PipeIORequest): Promise<PipeIOResponse>;
126
+ pipeIo(request: PipeIORequest, options?: CrateRouteOptions): Promise<PipeIOResponse>;
111
127
  }
112
128
  /**
113
129
  * Where an input-form entry breaks the shape `prepareInputs` reads, and what was
@@ -147,8 +163,10 @@ export declare function inputFormFault(entry: unknown): InputFormFault | undefin
147
163
  * that would need either throws {@link UploadNotAllowedError}, naming them too.
148
164
  *
149
165
  * The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
150
- * selector — inline `files`, a `method_ref` the runner resolves, or a
151
- * `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
166
+ * selector — the method's tree, a `method_ref` the runner resolves, or a
167
+ * `method_id` the platform resolves. A `tree` or `contents` too large to send
168
+ * inline goes by hash, and a blob that fails to upload throws
169
+ * `MethodFileTransferError` before the route is asked. A bare or alias-qualified `pipe_ref`, a
152
170
  * closure that does not load, and a selection the route refuses (an unknown
153
171
  * `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}. So
154
172
  * does an answer that breaks the route's contract, with a `runtime` verdict that
@@ -160,3 +178,4 @@ export declare function inputFormFault(entry: unknown): InputFormFault | undefin
160
178
  * the route) surfaces as `ApiResponseError`, unchanged.
161
179
  */
162
180
  export declare function prepareInputs(client: PrepareCapableClient, request: PrepareInputsRequest): Promise<PreparedInputs>;
181
+ export {};
@@ -6,10 +6,10 @@
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
- * 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/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
9
+ * takes it — its tree (a `directory`, `contents`, a listed `tree` or the `files`
10
+ * map), a `method_ref` address, or a stored `method_id` — exactly one per call.
11
+ * All three reach `POST /v1/pipe-io`: the tree as the `files` map `pipeIo` sends,
12
+ * an address resolved on the runner and an id on the platform. The route also SELECTS the pipe: the caller's qualified
13
13
  * `pipe_ref`, else the method's own entry pipe, and the ref it answers with is
14
14
  * the one prepared. It runs no dry run, so preparing inputs costs one static load.
15
15
  *
@@ -33,7 +33,7 @@
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
+ import { treeShapeFault } from "./method-trees.js";
37
37
  import { uploadFile } from "./upload.js";
38
38
  const PIPELEX_STORAGE_SCHEME = "pipelex-storage://";
39
39
  const HTTP_URL_RE = /^https?:\/\//i;
@@ -313,54 +313,134 @@ async function resolveNode(ctx, node, callerValue, at) {
313
313
  }
314
314
  }
315
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);
316
+ /** A map holding at least one key, or `undefined`: an empty map selects nothing. */
317
+ function nonEmptyMap(value) {
318
+ return isPlainObject(value) && Object.keys(value).length > 0
319
+ ? value
320
+ : undefined;
321
+ }
322
+ /** How a value that should have been a map is named in a refusal. */
323
+ function describeNonMap(value) {
324
+ if (Array.isArray(value))
325
+ return "a list";
326
+ if (value instanceof Uint8Array)
327
+ return "bytes";
328
+ return typeof value;
329
+ }
330
+ /**
331
+ * Refuse a selector member that is given but is not a map, such as a list, or whose values are not
332
+ * what `isValue` accepts, before any request: read as absent, a list would leave the method
333
+ * unselected, or select another one, without a word.
334
+ */
335
+ function refuseNonMap(name, value, holds, isValue) {
336
+ if (value === undefined || value === null)
337
+ return;
338
+ if (!isPlainObject(value)) {
339
+ throw new InputPreparationError(`Cannot prepare inputs: \`${name}\` must be ${holds}, got ${describeNonMap(value)}.`);
340
+ }
341
+ for (const [key, entry] of Object.entries(value)) {
342
+ if (!isValue(entry)) {
343
+ throw new InputPreparationError(`Cannot prepare inputs: \`${name}\` must be ${holds}, and "${key}" holds ` +
344
+ `${entry === null ? "null" : describeNonMap(entry)}.`);
345
+ }
346
+ }
319
347
  }
320
348
  /**
321
- * Normalize and check the three selectors. Empty is absent (`files: []`,
322
- * `method_ref: ""`, `method_id: " "`), mirroring the run options' rule and the
323
- * Python `CrateRequestBase` normalisers, and exactly one must remain — the check
324
- * lives here because this helper is the one that composes the `pipeIo` call.
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`.
349
+ * The caller's `tree`, checked as far as the client reads it before any request: an object with a
350
+ * `files` list holding at least one file, a `digest` string and a `readFile` function. A tree with
351
+ * no file is refused here, since a method tree holds at least one; the client's own check would
352
+ * name `pipeIo()` rather than the preparation.
353
+ */
354
+ function checkedTree(value) {
355
+ if (value === undefined || value === null)
356
+ return undefined;
357
+ const fault = treeShapeFault(value);
358
+ if (fault !== undefined) {
359
+ throw new InputPreparationError("Cannot prepare inputs: `tree` must be a listed method tree — its `files`, its `digest` and " +
360
+ "a `readFile` — such as the `MethodTree` the client's `listMethodTree` returns, got " +
361
+ `${fault}.`);
362
+ }
363
+ const tree = value;
364
+ if (tree.files.length === 0) {
365
+ throw new InputPreparationError("Cannot prepare inputs: `tree` holds no file, and a method tree holds at least one.");
366
+ }
367
+ return tree;
368
+ }
369
+ /**
370
+ * Normalize and check the three selectors. Empty is absent (`files: {}`, `contents: {}`,
371
+ * `directory: ""`, `method_ref: ""`, `method_id: " "`), mirroring the crate routes' rule and the
372
+ * Python `CrateRequestBase` normalisers, and exactly one must remain — the check lives here
373
+ * because this helper is the one that composes the `pipeIo` call. The tree counts as one
374
+ * selector, given in exactly one of `directory`, `contents`, `tree` and `files`, and a `files`
375
+ * that is not a map, such as the retired list of `{ content, source }` items, is refused rather
376
+ * than read as absent; so are a `directory` that is not a string, a `contents` or `dependencies`
377
+ * that is not a map, and a `tree` that is not a listed tree or holds no file. `dependencies`
378
+ * accompany the tree only. The illegal shapes are compile errors for typed callers; this backs
379
+ * them up for untyped (JS) ones with a typed `InputPreparationError`.
328
380
  */
329
381
  function resolveSelector(request) {
330
382
  const raw = request;
331
- const files = Array.isArray(raw["files"]) && raw["files"].length > 0
332
- ? raw["files"]
333
- : undefined;
383
+ const rawFiles = raw["files"];
384
+ if (rawFiles !== undefined && rawFiles !== null && !isPlainObject(rawFiles)) {
385
+ throw new InputPreparationError("Cannot prepare inputs: `files` must be the method's tree as a map from tree path to file " +
386
+ `entry, got ${Array.isArray(rawFiles) ? "a list" : typeof rawFiles}.`);
387
+ }
388
+ refuseNonMap("contents", raw["contents"], "the method's files as a map from tree path to bytes or text", (entry) => typeof entry === "string" || entry instanceof Uint8Array);
389
+ refuseNonMap("dependencies", raw["dependencies"], "the method packages as a map from package address to its map of file entries", isPlainObject);
390
+ const rawDirectory = raw["directory"];
391
+ if (rawDirectory !== undefined && rawDirectory !== null && typeof rawDirectory !== "string") {
392
+ throw new InputPreparationError("Cannot prepare inputs: `directory` must be the method's directory as a path, got " +
393
+ `${describeNonMap(rawDirectory)}.`);
394
+ }
395
+ const directory = typeof rawDirectory === "string" && rawDirectory !== "" ? rawDirectory : undefined;
396
+ const files = nonEmptyMap(rawFiles);
397
+ const tree = checkedTree(raw["tree"]);
398
+ const contents = nonEmptyMap(raw["contents"]);
399
+ const dependencies = nonEmptyMap(raw["dependencies"]);
334
400
  const methodRef = nonEmptyString(raw["method_ref"]);
335
401
  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;
342
- const given = [];
402
+ const treeForms = [];
403
+ if (directory !== undefined)
404
+ treeForms.push("`directory`");
405
+ if (contents !== undefined)
406
+ treeForms.push("`contents`");
407
+ if (tree !== undefined)
408
+ treeForms.push("`tree`");
343
409
  if (files !== undefined)
344
- given.push("`files`");
410
+ treeForms.push("`files`");
411
+ if (treeForms.length > 1) {
412
+ throw new InputPreparationError(`Cannot prepare inputs: the method's tree was given as ${treeForms.join(" and ")}. Give it ` +
413
+ "in one form — `directory`, `contents`, `tree` or `files`.");
414
+ }
415
+ const given = [...treeForms];
345
416
  if (methodRef !== undefined)
346
417
  given.push("`method_ref`");
347
418
  if (methodId !== undefined)
348
419
  given.push("`method_id`");
349
420
  if (given.length === 0) {
350
- throw new InputPreparationError("Cannot prepare inputs: no method selector. Supply exactly one of `files` (an inline MTHDS " +
351
- "closure), `method_ref` (a published method's address) or `method_id` (a stored method's " +
352
- "catalog id).");
421
+ throw new InputPreparationError("Cannot prepare inputs: no method selector. Supply exactly one of the method's tree " +
422
+ "(`directory`, `contents`, `tree` or `files`), `method_ref` (a published method's address) or " +
423
+ "`method_id` (a stored method's catalog id).");
353
424
  }
354
425
  if (given.length > 1) {
355
426
  throw new InputPreparationError(`Cannot prepare inputs: ${given.join(" and ")} were ${given.length === 2 ? "both" : "all"} ` +
356
427
  "given. Supply exactly one method " +
357
- "selector — `files`, `method_ref` or `method_id`.");
428
+ "selector — the method's tree, `method_ref` or `method_id`.");
358
429
  }
359
- if (files !== undefined)
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.`);
430
+ if (treeForms.length === 1) {
431
+ return {
432
+ ...(directory === undefined ? {} : { directory }),
433
+ ...(contents === undefined ? {} : { contents }),
434
+ ...(tree === undefined ? {} : { tree }),
435
+ ...(files === undefined ? {} : { files }),
436
+ ...(dependencies === undefined ? {} : { dependencies }),
437
+ };
438
+ }
439
+ // Beside the other selectors only empty maps pass, as they send nothing.
440
+ const owner = methodRef !== undefined ? "published" : "stored";
441
+ if (dependencies !== undefined) {
442
+ throw new InputPreparationError(`Cannot prepare inputs: \`dependencies\` accompany the method's own tree; a ${owner} ` +
443
+ "method's packages are its own.");
364
444
  }
365
445
  if (methodRef !== undefined)
366
446
  return { method_ref: methodRef };
@@ -376,8 +456,7 @@ function resolveSelector(request) {
376
456
  * selection enforces that rule; until then it would resolve a bare code across
377
457
  * domains, and preparation does not lean on that fallback.
378
458
  * - An **`alias->domain.pipe_code`** ref is refused because the alias names a
379
- * dependency package's pipe, and preparation covers the method's own pipes: the
380
- * crate routes do not load an address-based dependency at all. The run route
459
+ * dependency package's pipe, and preparation covers the method's own pipes. The run route
381
460
  * takes such a ref; preparation refuses it, and that asymmetry is deliberate.
382
461
  */
383
462
  function normalizePipeRef(raw) {
@@ -421,11 +500,11 @@ function resolveAllowUploads(raw) {
421
500
  * `input_form` that does not describe the selected pipe does, and one whose
422
501
  * descriptor is malformed where the walk reads it.
423
502
  */
424
- async function fetchSignature(client, selector, pipeRef) {
503
+ async function fetchSignature(client, selector, pipeRef, signal) {
425
504
  const request = pipeRef === undefined ? { ...selector } : { ...selector, pipe_ref: pipeRef };
426
505
  let result;
427
506
  try {
428
- result = await client.pipeIo(request);
507
+ result = await client.pipeIo(request, signal === undefined ? {} : { signal });
429
508
  }
430
509
  catch (error) {
431
510
  if (error instanceof ApiResponseError &&
@@ -600,8 +679,10 @@ function described(value) {
600
679
  * that would need either throws {@link UploadNotAllowedError}, naming them too.
601
680
  *
602
681
  * The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
603
- * selector — inline `files`, a `method_ref` the runner resolves, or a
604
- * `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
682
+ * selector — the method's tree, a `method_ref` the runner resolves, or a
683
+ * `method_id` the platform resolves. A `tree` or `contents` too large to send
684
+ * inline goes by hash, and a blob that fails to upload throws
685
+ * `MethodFileTransferError` before the route is asked. A bare or alias-qualified `pipe_ref`, a
605
686
  * closure that does not load, and a selection the route refuses (an unknown
606
687
  * `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}. So
607
688
  * does an answer that breaks the route's contract, with a `runtime` verdict that
@@ -617,7 +698,7 @@ export async function prepareInputs(client, request) {
617
698
  const pipeRef = normalizePipeRef(request.pipe_ref);
618
699
  const allowUploads = resolveAllowUploads(request.allowUploads);
619
700
  throwIfAborted(request.signal);
620
- const report = await fetchSignature(client, selector, pipeRef);
701
+ const report = await fetchSignature(client, selector, pipeRef, request.signal);
621
702
  throwIfAborted(request.signal);
622
703
  const descriptor = selectedDescriptor(report);
623
704
  const declared = new Map(descriptor.fields.map((field) => [field.name, field]));
@@ -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;AACrB,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,uBAAuB,CAAC;AAI1E,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,sBAAsB,GAAG,oBAAoB,CAAC;AACpD,MAAM,WAAW,GAAG,eAAe,CAAC;AAEpC;;;;;;GAMG;AACH,MAAM,YAAY,GAAG;IACnB,IAAI,EAAE,IAAI;IACV,KAAK,EAAE,IAAI;IACX,IAAI,EAAE,IAAI;IACV,MAAM,EAAE,IAAI;IACZ,OAAO,EAAE,IAAI;IACb,IAAI,EAAE,IAAI;IACV,QAAQ,EAAE,IAAI;IACd,KAAK,EAAE,IAAI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AAC,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"}
@@ -9,9 +9,8 @@
9
9
  * stays in the consumer. Each model holds only the fields the product actually
10
10
  * consumes — not a speculative mirror of every server field.
11
11
  */
12
- import type { MethodFiles } from "mthds/protocol";
13
12
  import type { RunErrorReport } from "./error-models.js";
14
- import type { MethodTreeSource } from "./method-trees.js";
13
+ import type { MethodTreeForms } from "./method-trees.js";
15
14
  import type { PipelexValidationResult } from "./models.js";
16
15
  import type { RunStatus } from "./runs.js";
17
16
  export interface UserProfile {
@@ -231,23 +230,23 @@ export interface MethodPage {
231
230
  nextCursor: string | null;
232
231
  }
233
232
  /**
234
- * A method's tree in the three forms a save takes, of which a save gives at most one:
233
+ * A method's tree in the four forms a save takes, of which a save gives at most one (see
234
+ * `MethodTreeForms`):
235
235
  *
236
- * - `files`, the MTHDS standard's map of file entries, the same `files` a run takes, sent as
237
- * given: a file's text, `{ base64 }`, or `{ sha256, size }` for bytes the organization holds;
236
+ * - `directory`, a method directory on disk, listed by the `mthds` package's lister under the
237
+ * standard's membership rule and the deployment's limits (Node only);
238
+ * - `contents`, each file's bytes or text by tree path;
238
239
  * - `tree`, a tree whose files the client reads, such as the `MethodTree` the `mthds` package's
239
240
  * `listMethodTree` lists from a directory;
240
- * - `contents`, each file's bytes or text by tree path.
241
+ * - `files`, the MTHDS standard's map of file entries, the same `files` a run takes, sent as
242
+ * given: a file's text, `{ base64 }`, or `{ sha256, size }` for bytes the organization holds.
241
243
  *
242
- * A `tree` or `contents` travels inline when its inline map weighs 256 KiB or less, or when the
243
- * platform keeps no blob store, and otherwise by hash, after the client uploads the files the
244
- * organization lacks (see `docs/method-trees.md`).
244
+ * A `directory`, `contents` or `tree` travels inline when its inline map weighs 256 KiB or less
245
+ * and no more than the inline limit the platform announces, or when the platform keeps no blob
246
+ * store, and otherwise by hash, after the client uploads the files the organization lacks (see
247
+ * `docs/method-trees.md`). On a save, `files: null` empties the draft.
245
248
  */
246
- export interface MethodTreeInput {
247
- files?: MethodFiles | null;
248
- tree?: MethodTreeSource;
249
- contents?: Readonly<Record<string, Uint8Array | string>>;
250
- }
249
+ export type MethodTreeInput = MethodTreeForms;
251
250
  /**
252
251
  * The create payload — `createMethod`. A new method holds its tree as its draft and has no
253
252
  * version yet; with no tree, the draft is empty. Its draft is then written with `writeDraft`
@@ -728,8 +727,7 @@ export interface RunHistoryItem {
728
727
  * multiplied by the page size on one and by the poll rate on the other.
729
728
  */
730
729
  export interface RunDetail extends PipelineRun {
731
- /** One entry PER `.mthds` FILE, not one bundle string — the same array shape
732
- * the protocol's validate call takes and echoes back. A single-file method
730
+ /** One entry PER `.mthds` FILE, not one bundle string. A single-file method
733
731
  * is an array of one. */
734
732
  mthds_contents?: string[] | null;
735
733
  /**
package/dist/upload.d.ts CHANGED
@@ -46,20 +46,15 @@ export interface UploadCapableClient {
46
46
  filename: string;
47
47
  }>;
48
48
  }
49
- /** True when running under Node (has `process.versions.node`). */
50
- export declare function isNodeRuntime(): boolean;
51
49
  /** MIME guess from a filename extension; `application/octet-stream` when unknown. */
52
50
  export declare function guessContentType(filename: string): string;
53
51
  /**
54
52
  * Read a filesystem path into bytes — Node only. A path string in a non-Node
55
53
  * runtime cannot be read, so it fails as an invalid local source rather than
56
- * being silently misread as text or a URL. `node:fs/promises` is imported
57
- * dynamically and guarded by `isNodeRuntime()`, so it is only *loaded* in Node.
58
- * Note: the dynamic import defers execution, not bundling — a browser-targeting
59
- * bundler still statically resolves this literal specifier, so a browser consumer
60
- * of the main entry must mark `node:*` external. A page that stores a file uses the
61
- * browser-safe `@pipelex/sdk/upload` entry (`upload-grant.ts`) instead, which never
62
- * reaches this module; making the main entry browser-safe as a whole stays open.
54
+ * being silently misread as text or a URL. The file system comes from the Node
55
+ * host (`node-host.ts`), which a bundler building for the browser resolves to a
56
+ * module holding no Node built-in, so this module keeps the main entry
57
+ * bundleable for the browser.
63
58
  */
64
59
  export declare function readLocalPath(path: string): Promise<Uint8Array>;
65
60
  /** Base64-encode bytes, cross-runtime (Buffer when present, else chunked btoa). */
package/dist/upload.js CHANGED
@@ -9,6 +9,7 @@
9
9
  */
10
10
  import { InvalidLocalSourceError, RejectedAssetError, UploadAuthenticationError, UploadTransportError, UnsupportedUploadCapabilityError, } from "./errors.js";
11
11
  import { ApiResponseError, ApiUnreachableError } from "./errors.js";
12
+ import { absenceCause, loadNodeHost } from "./node-host.js";
12
13
  import { throwIfAborted } from "./runs.js";
13
14
  const DEFAULT_CONTENT_TYPE = "application/octet-stream";
14
15
  const DEFAULT_FILENAME = "upload.bin";
@@ -28,10 +29,6 @@ const EXTENSION_MIME = {
28
29
  csv: "text/csv",
29
30
  json: "application/json",
30
31
  };
31
- /** True when running under Node (has `process.versions.node`). */
32
- export function isNodeRuntime() {
33
- return (typeof process !== "undefined" && process.versions != null && process.versions.node != null);
34
- }
35
32
  /** Filename tail of a path, splitting on both separators (no `node:path` import needed). */
36
33
  function basename(path) {
37
34
  const parts = path.split(/[\\/]/);
@@ -48,22 +45,22 @@ export function guessContentType(filename) {
48
45
  /**
49
46
  * Read a filesystem path into bytes — Node only. A path string in a non-Node
50
47
  * runtime cannot be read, so it fails as an invalid local source rather than
51
- * being silently misread as text or a URL. `node:fs/promises` is imported
52
- * dynamically and guarded by `isNodeRuntime()`, so it is only *loaded* in Node.
53
- * Note: the dynamic import defers execution, not bundling — a browser-targeting
54
- * bundler still statically resolves this literal specifier, so a browser consumer
55
- * of the main entry must mark `node:*` external. A page that stores a file uses the
56
- * browser-safe `@pipelex/sdk/upload` entry (`upload-grant.ts`) instead, which never
57
- * reaches this module; making the main entry browser-safe as a whole stays open.
48
+ * being silently misread as text or a URL. The file system comes from the Node
49
+ * host (`node-host.ts`), which a bundler building for the browser resolves to a
50
+ * module holding no Node built-in, so this module keeps the main entry
51
+ * bundleable for the browser.
58
52
  */
59
53
  export async function readLocalPath(path) {
60
- if (!isNodeRuntime()) {
61
- throw new InvalidLocalSourceError(`Cannot read the local path "${path}" outside Node — path strings are Node-only. ` +
62
- "In the browser or an edge runtime, pass the file as bytes (Blob/File/ArrayBuffer/Uint8Array).", path);
54
+ const loaded = await loadNodeHost();
55
+ if (loaded.host === null) {
56
+ throw new InvalidLocalSourceError(loaded.reason === null
57
+ ? `Cannot read the local path "${path}" outside Node — path strings are Node-only. ` +
58
+ "In the browser or an edge runtime, pass the file as bytes (Blob/File/ArrayBuffer/Uint8Array)."
59
+ : `Cannot read the local path "${path}": ${loaded.reason}`, path, absenceCause(loaded));
63
60
  }
61
+ const host = loaded.host;
64
62
  try {
65
- const { readFile } = await import("node:fs/promises");
66
- return await readFile(path);
63
+ return await host.fs.readFile(path);
67
64
  }
68
65
  catch (cause) {
69
66
  throw new InvalidLocalSourceError(`Local file cannot be read: "${path}" (${cause.code ?? "read error"}).`, path, { cause });