@pipelex/sdk 0.48.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.
- package/README.md +1 -1
- package/dist/artifacts.d.ts +4 -3
- package/dist/artifacts.js +20 -14
- package/dist/artifacts.js.map +1 -1
- package/dist/cli/script.d.ts +1 -1
- package/dist/client.d.ts +6 -4
- package/dist/client.js +12 -5
- package/dist/client.js.map +1 -1
- package/dist/codegen-check.d.ts +2 -3
- package/dist/codegen-check.js +2 -3
- package/dist/codegen-check.js.map +1 -1
- package/dist/hooks/bundle-gather.d.ts +29 -10
- package/dist/hooks/bundle-gather.js +91 -14
- package/dist/hooks/bundle-gather.js.map +1 -1
- package/dist/hooks/check-core.d.ts +70 -6
- package/dist/hooks/check-core.js +188 -29
- package/dist/hooks/check-core.js.map +1 -1
- package/dist/hooks/claude-mthds-check.d.ts +12 -0
- package/dist/hooks/claude-mthds-check.js +12 -0
- package/dist/hooks/claude-mthds-check.js.map +1 -1
- package/dist/hooks/secret-guard.d.ts +38 -0
- package/dist/hooks/secret-guard.js +134 -0
- package/dist/hooks/secret-guard.js.map +1 -0
- package/dist/hooks/validate-stage.d.ts +5 -3
- package/dist/hooks/validate-stage.js +16 -7
- package/dist/hooks/validate-stage.js.map +1 -1
- package/dist/method-trees.d.ts +19 -8
- package/dist/method-trees.js +37 -11
- package/dist/method-trees.js.map +1 -1
- package/dist/node-host/node.d.ts +33 -0
- package/dist/node-host/node.js +27 -0
- package/dist/node-host/node.js.map +1 -0
- package/dist/node-host/unavailable.d.ts +8 -0
- package/dist/node-host/unavailable.js +8 -0
- package/dist/node-host/unavailable.js.map +1 -0
- package/dist/node-host.d.ts +53 -0
- package/dist/node-host.js +72 -0
- package/dist/node-host.js.map +1 -0
- package/dist/upload.d.ts +4 -9
- package/dist/upload.js +13 -16
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +29 -5
- package/docs/crate-routes.md +1 -1
- package/docs/hook-bundle.md +27 -1
- package/docs/input-preparation.md +2 -2
- package/docs/method-trees.md +2 -2
- package/package.json +7 -1
package/dist/method-trees.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"method-trees.js","sourceRoot":"","sources":["../src/method-trees.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,OAAO,EAAE,aAAa,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAUhE,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EACL,uBAAuB,EACvB,oBAAoB,GAErB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAyD3C;;;;;GAKG;AACH,MAAM,UAAU,cAAc,CAAC,KAAc;IAC3C,IACE,KAAK,KAAK,IAAI;QACd,OAAO,KAAK,KAAK,QAAQ;QACzB,KAAK,CAAC,OAAO,CAAE,KAA6B,CAAC,KAAK,CAAC;QACnD,OAAQ,KAA8B,CAAC,MAAM,KAAK,QAAQ;QAC1D,OAAQ,KAAgC,CAAC,QAAQ,KAAK,UAAU,EAChE,CAAC;QACD,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC;QAAE,OAAO,QAAQ,CAAC;IAC1C,OAAO,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,wBAAwB,CAAC,CAAC,CAAC,OAAO,KAAK,CAAC;AAC/F,CAAC;AAgCD,wEAAwE;AAExE;;;;;GAKG;AACH,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,GAAG,IAAI,CAAC;AAEhD;;;;;GAKG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,GAAG,MAAM,CAAC;AAE3C,kHAAkH;AAClH,MAAM,CAAC,MAAM,wBAAwB,GAAG,CA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AAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;YACnE,MAAM,IAAI,GAAI,KAA4B,CAAC,IAAI,CAAC;YAChD,IAAI,OAAO,IAAI,KAAK,QAAQ;gBAAE,OAAO,IAAI,CAAC;QAC5C,CAAC;QACD,IAAI,GAAG,CAAC,IAAI,KAAK,cAAc;YAAE,OAAO,eAAe,CAAC;IAC1D,CAAC;IACD,OAAO,eAAe,CAAC;AACzB,CAAC;AAED,SAAS,SAAS,CAAC,SAAiB;IAClC,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,CAAC,eAAe,CAAC,IAAI,UAAU,CAAC,SAAS,CAAC,CAAC,CAAC;IAC3E,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAClF,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host as Node resolves it: the one module of the SDK that loads what only Node has,
|
|
3
|
+
* `node:fs/promises`, `node:path`, the `mthds` package's tree lister and `undici`'s `Agent`.
|
|
4
|
+
*
|
|
5
|
+
* Nothing imports this file by its path. `src/node-host.ts` reaches it through `#node-host`, the
|
|
6
|
+
* package's own subpath import, which `package.json` maps to this file under the `node` condition
|
|
7
|
+
* and to `./unavailable.ts` under every other condition set, so a bundler building for a browser
|
|
8
|
+
* or an edge runtime never follows it (see `src/node-host.ts`).
|
|
9
|
+
*
|
|
10
|
+
* The two built-ins load with the host. The `mthds` root entry and `undici` are heavier, and only
|
|
11
|
+
* listing a directory or fetching an artifact needs one of them, so each loads on its first use.
|
|
12
|
+
*/
|
|
13
|
+
import * as fs from "node:fs/promises";
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
import type { MethodTreeError, listMethodTree } from "mthds";
|
|
16
|
+
import type { Agent } from "undici";
|
|
17
|
+
/** The `mthds` package's lister of a method directory, and the error it refuses a tree with. */
|
|
18
|
+
export interface TreeLister {
|
|
19
|
+
readonly listMethodTree: typeof listMethodTree;
|
|
20
|
+
readonly MethodTreeError: typeof MethodTreeError;
|
|
21
|
+
}
|
|
22
|
+
/** What only Node has, as the SDK uses it. */
|
|
23
|
+
export interface NodeHost {
|
|
24
|
+
/** `node:fs/promises`. */
|
|
25
|
+
readonly fs: typeof fs;
|
|
26
|
+
/** `node:path`. */
|
|
27
|
+
readonly path: typeof path;
|
|
28
|
+
/** The `mthds` root entry's tree lister, loading that entry on the first call. */
|
|
29
|
+
loadTreeLister(): Promise<TreeLister>;
|
|
30
|
+
/** `undici`'s `Agent`, loading `undici` on the first call. */
|
|
31
|
+
loadAgent(): Promise<typeof Agent>;
|
|
32
|
+
}
|
|
33
|
+
export declare const nodeHost: NodeHost;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host as Node resolves it: the one module of the SDK that loads what only Node has,
|
|
3
|
+
* `node:fs/promises`, `node:path`, the `mthds` package's tree lister and `undici`'s `Agent`.
|
|
4
|
+
*
|
|
5
|
+
* Nothing imports this file by its path. `src/node-host.ts` reaches it through `#node-host`, the
|
|
6
|
+
* package's own subpath import, which `package.json` maps to this file under the `node` condition
|
|
7
|
+
* and to `./unavailable.ts` under every other condition set, so a bundler building for a browser
|
|
8
|
+
* or an edge runtime never follows it (see `src/node-host.ts`).
|
|
9
|
+
*
|
|
10
|
+
* The two built-ins load with the host. The `mthds` root entry and `undici` are heavier, and only
|
|
11
|
+
* listing a directory or fetching an artifact needs one of them, so each loads on its first use.
|
|
12
|
+
*/
|
|
13
|
+
import * as fs from "node:fs/promises";
|
|
14
|
+
import * as path from "node:path";
|
|
15
|
+
export const nodeHost = {
|
|
16
|
+
fs,
|
|
17
|
+
path,
|
|
18
|
+
async loadTreeLister() {
|
|
19
|
+
const { listMethodTree, MethodTreeError } = await import("mthds");
|
|
20
|
+
return { listMethodTree, MethodTreeError };
|
|
21
|
+
},
|
|
22
|
+
async loadAgent() {
|
|
23
|
+
const { Agent } = await import("undici");
|
|
24
|
+
return Agent;
|
|
25
|
+
},
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../../src/node-host/node.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACvC,OAAO,KAAK,IAAI,MAAM,WAAW,CAAC;AAsBlC,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,EAAE;IACF,IAAI;IACJ,KAAK,CAAC,cAAc;QAClB,MAAM,EAAE,cAAc,EAAE,eAAe,EAAE,GAAG,MAAM,MAAM,CAAC,OAAO,CAAC,CAAC;QAClE,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,CAAC;IAC7C,CAAC;IACD,KAAK,CAAC,SAAS;QACb,MAAM,EAAE,KAAK,EAAE,GAAG,MAAM,MAAM,CAAC,QAAQ,CAAC,CAAC;QACzC,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host as every runtime other than Node resolves it: absent. `package.json` maps
|
|
3
|
+
* `#node-host` to this file under every condition set without `node`, a browser's or an edge
|
|
4
|
+
* runtime's, so the graph a bundler follows there holds no Node built-in, no `undici` and not the
|
|
5
|
+
* `mthds` root entry (see `src/node-host.ts`). It imports nothing at run time.
|
|
6
|
+
*/
|
|
7
|
+
import type { NodeHost } from "./node.js";
|
|
8
|
+
export declare const nodeHost: NodeHost | null;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host as every runtime other than Node resolves it: absent. `package.json` maps
|
|
3
|
+
* `#node-host` to this file under every condition set without `node`, a browser's or an edge
|
|
4
|
+
* runtime's, so the graph a bundler follows there holds no Node built-in, no `undici` and not the
|
|
5
|
+
* `mthds` root entry (see `src/node-host.ts`). It imports nothing at run time.
|
|
6
|
+
*/
|
|
7
|
+
export const nodeHost = null;
|
|
8
|
+
//# sourceMappingURL=unavailable.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"unavailable.js","sourceRoot":"","sources":["../../src/node-host/unavailable.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,MAAM,CAAC,MAAM,QAAQ,GAAoB,IAAI,CAAC"}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host: what the SDK uses that only Node has, behind one import that a bundler building
|
|
3
|
+
* for any other runtime never follows. See `docs/architecture.md`, "The Node host".
|
|
4
|
+
*
|
|
5
|
+
* The operations that need Node, reading a local path (`upload.ts`), downloading a run's files and
|
|
6
|
+
* the undici dispatcher of an artifact fetch (`artifacts.ts`), listing a method directory and
|
|
7
|
+
* writing a saved tree to disk (`method-trees.ts`), get it from `loadNodeHost()`, and never import
|
|
8
|
+
* a Node built-in, `undici` or the `mthds` root entry themselves. `loadNodeHost()` imports
|
|
9
|
+
* `#node-host`, the package's own subpath import, which the `imports` map of `package.json`
|
|
10
|
+
* resolves by condition: under `node` to `node-host/node.ts`, which holds those modules, and under
|
|
11
|
+
* every other condition set, a browser's or an edge runtime's, to `node-host/unavailable.ts`,
|
|
12
|
+
* which holds none. A bundler building for the browser therefore follows no Node built-in from the
|
|
13
|
+
* barrel, statically or dynamically, and `tests/browser-bundle.test.ts` bundles the built package
|
|
14
|
+
* for the browser to hold it to that. Node resolves the same import under its own condition, so
|
|
15
|
+
* the Node-only operations work there as they always did. Where the host cannot be had, outside
|
|
16
|
+
* Node, inside it without the `node` condition, or where the import itself fails, `loadNodeHost()`
|
|
17
|
+
* answers why rather than throwing, so each operation refuses with its own class and verdict.
|
|
18
|
+
*/
|
|
19
|
+
import type { NodeHost } from "./node-host/node.js";
|
|
20
|
+
export type { NodeHost, TreeLister } from "./node-host/node.js";
|
|
21
|
+
/** True when running under Node (has `process.versions.node`). */
|
|
22
|
+
export declare function isNodeRuntime(): boolean;
|
|
23
|
+
/**
|
|
24
|
+
* The Node host could not be had: why, for a refusal to say, and the error behind it when the
|
|
25
|
+
* host's import failed.
|
|
26
|
+
*/
|
|
27
|
+
export interface NodeHostAbsence {
|
|
28
|
+
readonly host: null;
|
|
29
|
+
/**
|
|
30
|
+
* Why, as a clause a refusal puts after its own subject; `null` outside Node, where the
|
|
31
|
+
* operation's own "Node only" refusal is the right one.
|
|
32
|
+
*/
|
|
33
|
+
readonly reason: string | null;
|
|
34
|
+
/** The import's own error, when the host's import failed rather than resolving to nothing. */
|
|
35
|
+
readonly cause?: unknown;
|
|
36
|
+
}
|
|
37
|
+
/** The Node host, or why it could not be had. */
|
|
38
|
+
export type NodeHostLoad = {
|
|
39
|
+
readonly host: NodeHost;
|
|
40
|
+
} | NodeHostAbsence;
|
|
41
|
+
/**
|
|
42
|
+
* The Node host, or its absence and why, in three cases: a runtime that is not Node; Node itself
|
|
43
|
+
* where the package was resolved without the `node` export condition, so `#node-host` resolved to
|
|
44
|
+
* the variant holding nothing; and Node where the import of `#node-host` failed, as in a
|
|
45
|
+
* toolchain that does not resolve the `imports` map of `package.json`, whose error is the
|
|
46
|
+
* absence's `cause`. It never throws, so every operation needing Node refuses with its own class
|
|
47
|
+
* and verdict. The runtime is checked first, so nothing is loaded where it is not Node.
|
|
48
|
+
*/
|
|
49
|
+
export declare function loadNodeHost(): Promise<NodeHostLoad>;
|
|
50
|
+
/** The `cause` option of a refusal made for `absence`: the import's own error, when there is one. */
|
|
51
|
+
export declare function absenceCause(absence: NodeHostAbsence): {
|
|
52
|
+
cause?: unknown;
|
|
53
|
+
};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Node host: what the SDK uses that only Node has, behind one import that a bundler building
|
|
3
|
+
* for any other runtime never follows. See `docs/architecture.md`, "The Node host".
|
|
4
|
+
*
|
|
5
|
+
* The operations that need Node, reading a local path (`upload.ts`), downloading a run's files and
|
|
6
|
+
* the undici dispatcher of an artifact fetch (`artifacts.ts`), listing a method directory and
|
|
7
|
+
* writing a saved tree to disk (`method-trees.ts`), get it from `loadNodeHost()`, and never import
|
|
8
|
+
* a Node built-in, `undici` or the `mthds` root entry themselves. `loadNodeHost()` imports
|
|
9
|
+
* `#node-host`, the package's own subpath import, which the `imports` map of `package.json`
|
|
10
|
+
* resolves by condition: under `node` to `node-host/node.ts`, which holds those modules, and under
|
|
11
|
+
* every other condition set, a browser's or an edge runtime's, to `node-host/unavailable.ts`,
|
|
12
|
+
* which holds none. A bundler building for the browser therefore follows no Node built-in from the
|
|
13
|
+
* barrel, statically or dynamically, and `tests/browser-bundle.test.ts` bundles the built package
|
|
14
|
+
* for the browser to hold it to that. Node resolves the same import under its own condition, so
|
|
15
|
+
* the Node-only operations work there as they always did. Where the host cannot be had, outside
|
|
16
|
+
* Node, inside it without the `node` condition, or where the import itself fails, `loadNodeHost()`
|
|
17
|
+
* answers why rather than throwing, so each operation refuses with its own class and verdict.
|
|
18
|
+
*/
|
|
19
|
+
/** True when running under Node (has `process.versions.node`). */
|
|
20
|
+
export function isNodeRuntime() {
|
|
21
|
+
return (typeof process !== "undefined" && process.versions != null && process.versions.node != null);
|
|
22
|
+
}
|
|
23
|
+
/**
|
|
24
|
+
* Inside Node, the package was resolved without the `node` export condition, as a bundle built
|
|
25
|
+
* for the browser or for esbuild's `neutral` platform resolves it, so `#node-host` resolved to the
|
|
26
|
+
* variant holding nothing.
|
|
27
|
+
*/
|
|
28
|
+
const NODE_CONDITION_MISSING = 'this copy of @pipelex/sdk runs in Node but was resolved without the "node" export ' +
|
|
29
|
+
"condition, which selects the part of the package that reaches Node's file system. Bundle " +
|
|
30
|
+
'it for Node (esbuild platform "node", webpack target "node"), add "node" to the bundler\'s ' +
|
|
31
|
+
"conditions (esbuild conditions, webpack resolve.conditionNames, Vite resolve.conditions), " +
|
|
32
|
+
"or leave @pipelex/sdk out of the bundle.";
|
|
33
|
+
/**
|
|
34
|
+
* Inside Node, the import of `#node-host` itself failed: the toolchain loading the package does
|
|
35
|
+
* not resolve the `imports` map of `package.json`, as Jest before 29.4 does not, or the package is
|
|
36
|
+
* installed in part. `detail` is the import's own error message.
|
|
37
|
+
*/
|
|
38
|
+
function hostImportFailed(detail) {
|
|
39
|
+
return (`the Node host of @pipelex/sdk could not be loaded (${detail}). The SDK reaches Node's file ` +
|
|
40
|
+
'system through "#node-host", an entry of the "imports" map of its package.json, and a ' +
|
|
41
|
+
'toolchain that does not resolve package "imports", such as Jest before 29.4, cannot load ' +
|
|
42
|
+
"it: run under one that does, such as Node's own loader, Jest 29.4 or later or a current " +
|
|
43
|
+
"bundler, or reinstall @pipelex/sdk if it is installed in part.");
|
|
44
|
+
}
|
|
45
|
+
/**
|
|
46
|
+
* The Node host, or its absence and why, in three cases: a runtime that is not Node; Node itself
|
|
47
|
+
* where the package was resolved without the `node` export condition, so `#node-host` resolved to
|
|
48
|
+
* the variant holding nothing; and Node where the import of `#node-host` failed, as in a
|
|
49
|
+
* toolchain that does not resolve the `imports` map of `package.json`, whose error is the
|
|
50
|
+
* absence's `cause`. It never throws, so every operation needing Node refuses with its own class
|
|
51
|
+
* and verdict. The runtime is checked first, so nothing is loaded where it is not Node.
|
|
52
|
+
*/
|
|
53
|
+
export async function loadNodeHost() {
|
|
54
|
+
if (!isNodeRuntime())
|
|
55
|
+
return { host: null, reason: null };
|
|
56
|
+
let loaded;
|
|
57
|
+
try {
|
|
58
|
+
loaded = await import("#node-host");
|
|
59
|
+
}
|
|
60
|
+
catch (cause) {
|
|
61
|
+
const detail = cause instanceof Error ? cause.message : String(cause);
|
|
62
|
+
return { host: null, reason: hostImportFailed(detail), cause };
|
|
63
|
+
}
|
|
64
|
+
return loaded.nodeHost === null
|
|
65
|
+
? { host: null, reason: NODE_CONDITION_MISSING }
|
|
66
|
+
: { host: loaded.nodeHost };
|
|
67
|
+
}
|
|
68
|
+
/** The `cause` option of a refusal made for `absence`: the import's own error, when there is one. */
|
|
69
|
+
export function absenceCause(absence) {
|
|
70
|
+
return absence.cause === undefined ? {} : { cause: absence.cause };
|
|
71
|
+
}
|
|
72
|
+
//# sourceMappingURL=node-host.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node-host.js","sourceRoot":"","sources":["../src/node-host.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAMH,kEAAkE;AAClE,MAAM,UAAU,aAAa;IAC3B,OAAO,CACL,OAAO,OAAO,KAAK,WAAW,IAAI,OAAO,CAAC,QAAQ,IAAI,IAAI,IAAI,OAAO,CAAC,QAAQ,CAAC,IAAI,IAAI,IAAI,CAC5F,CAAC;AACJ,CAAC;AAoBD;;;;GAIG;AACH,MAAM,sBAAsB,GAC1B,oFAAoF;IACpF,2FAA2F;IAC3F,6FAA6F;IAC7F,4FAA4F;IAC5F,0CAA0C,CAAC;AAE7C;;;;GAIG;AACH,SAAS,gBAAgB,CAAC,MAAc;IACtC,OAAO,CACL,sDAAsD,MAAM,iCAAiC;QAC7F,wFAAwF;QACxF,2FAA2F;QAC3F,0FAA0F;QAC1F,gEAAgE,CACjE,CAAC;AACJ,CAAC;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,KAAK,UAAU,YAAY;IAChC,IAAI,CAAC,aAAa,EAAE;QAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAC1D,IAAI,MAA8C,CAAC;IACnD,IAAI,CAAC;QACH,MAAM,GAAG,MAAM,MAAM,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;QACtE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,gBAAgB,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,CAAC;IACjE,CAAC;IACD,OAAO,MAAM,CAAC,QAAQ,KAAK,IAAI;QAC7B,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,EAAE,sBAAsB,EAAE;QAChD,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;AAChC,CAAC;AAED,qGAAqG;AACrG,MAAM,UAAU,YAAY,CAAC,OAAwB;IACnD,OAAO,OAAO,CAAC,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,CAAC,KAAK,EAAE,CAAC;AACrE,CAAC"}
|
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.
|
|
57
|
-
*
|
|
58
|
-
*
|
|
59
|
-
*
|
|
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.
|
|
52
|
-
*
|
|
53
|
-
*
|
|
54
|
-
*
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
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
|
-
|
|
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 });
|
package/dist/upload.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload.js","sourceRoot":"","sources":["../src/upload.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,EACL,uBAAuB,EACvB,kBAAkB,EAClB,yBAAyB,EACzB,oBAAoB,EACpB,gCAAgC,GACjC,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AACpE,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAyC3C,MAAM,oBAAoB,GAAG,0BAA0B,CAAC;AACxD,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,MAAM,cAAc,GAA2B;IAC7C,GAA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K;QACZ,IAAI,EAAE,YAAY;QAClB,QAAQ;KACT,CAAC,CAAC;AACL,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/docs/architecture.md
CHANGED
|
@@ -38,7 +38,28 @@ The package also declares one `bin`, `pipelex-sdk`, which is `dist/cli.js` with
|
|
|
38
38
|
|
|
39
39
|
Condition order in `exports` matters: `types` is listed first (TS/Node resolution convention — the type-checker looks at the first matching condition), then `import`, then `default` as the CJS fallback.
|
|
40
40
|
|
|
41
|
-
The map has a second entry, **`@pipelex/sdk/upload`** (`dist/upload-grant.js`), the
|
|
41
|
+
The map has a second entry, **`@pipelex/sdk/upload`** (`dist/upload-grant.js`), the one a page that stores a file imports. The client holds an API key and belongs on a server, so a page imports the main entry for its error classes, its types and its pure helpers, never to construct a client, and the subpath carries only what a page needs to store a file with an upload grant: `uploadWithGrant`, the grant types and the three error classes it raises. Its runtime import graph is `errors.ts` (with the fallback table it reads, `error-verdicts.ts`), `timers.ts` and `mthds/protocol`, nothing else. Both entries load the same `dist/errors.js` and `dist/upload-grant.js`, so the function and the error classes are identical whichever entry a consumer imports them through.
|
|
42
|
+
|
|
43
|
+
**Both entries bundle for the browser with nothing marked external.** A Next.js client component importing an error class from `@pipelex/sdk` puts the barrel's whole graph in the browser bundle, the modules it loads by dynamic import included, since a bundler bundles a dynamic import with a literal specifier like a static one; in 0.48.0 that graph reached `node:fs` through the `mthds` package's root entry, which Turbopack's `next build` tolerated and its `next dev` did not, panicking and answering `500` for the page. `tests/browser-bundle.test.ts` is the gate the templates' builds are not: it builds the package with `tsc` into a scratch directory laid out as the published package, bundles every entry of the `exports` map for the browser with esbuild, and fails on any Node built-in, `undici` or the `mthds` root entry it reaches, naming each import and the module that made it.
|
|
44
|
+
|
|
45
|
+
### The Node host
|
|
46
|
+
|
|
47
|
+
What only Node has, `node:fs/promises`, `node:path`, the `mthds` root entry's tree lister and `undici`'s `Agent`, sits behind one module, the Node host, which the rest of the SDK reaches through `loadNodeHost()` in `src/node-host.ts`. It imports `#node-host`, the package's own subpath import, and the `imports` map of `package.json` resolves it by condition:
|
|
48
|
+
|
|
49
|
+
- under `node`, to `dist/node-host/node.js` (`src/node-host/node.ts`), which loads the two built-ins with it, and the `mthds` root entry and `undici` on their first use, by a dynamic import;
|
|
50
|
+
- under every other condition set, a browser's or an edge runtime's, to `dist/node-host/unavailable.js` (`src/node-host/unavailable.ts`), which imports nothing and says the host is absent.
|
|
51
|
+
|
|
52
|
+
Node, a Next.js server bundle and the hook bundle resolve the host; a browser bundle resolves its absence, so the barrel's graph there holds no Node built-in. `loadNodeHost()` never throws: it answers the host, or its absence with the reason a refusal gives, in three cases.
|
|
53
|
+
|
|
54
|
+
- **Outside Node**, wherever `process.versions.node` is absent, it loads nothing and gives no reason, and each operation makes the refusal it always made there.
|
|
55
|
+
- **Inside Node, without the `node` condition**, as a bundle built for esbuild's `neutral` platform resolves the package, `#node-host` resolves to the absent variant, and the reason names the missing condition and how to bundle with it.
|
|
56
|
+
- **Inside Node, where the import itself fails**, as in a toolchain that does not resolve the `imports` map of `package.json` (Jest before 29.4, whose error is `ERR_PACKAGE_IMPORT_NOT_DEFINED` or "Cannot find module '#node-host'") or in a package installed in part, the reason says the host could not be loaded, names that toolchain and quotes the import's own error, which the refusal carries as its `cause`. It never claims the `node` condition was missing.
|
|
57
|
+
|
|
58
|
+
Each operation that needs Node refuses with its own class and verdict whichever the case, and the reason after its own subject: reading a path string is an `InvalidLocalSourceError`, `downloadArtifacts` an `ArtifactOperationError` (`config`), a `directory` a `RequestArgumentError` (`input`) and `writeMethodTree` a `RequestArgumentError` (`config`). A call given a `directory` asks for the host before its version handshake, so a failed or refused handshake never hides that refusal. An artifact fetch is never refused: without the host, or where `undici` cannot be loaded, it runs on the platform's default dispatcher. `tests/node-host.test.ts`, `tests/node-host-unresolved.test.ts` and `tests/node-host-import-fails.test.ts` hold each case, and `tests/browser-bundle.test.ts` runs the import failure under Node itself, against a built copy of the package whose `package.json` has no `imports` map.
|
|
59
|
+
|
|
60
|
+
The package's own conditions were chosen over marking each dynamic import for bundlers to leave alone (`/* webpackIgnore: true */`, `/* turbopackIgnore: true */`): only webpack and Turbopack read those marks, so esbuild, Vite and Rollup would still bundle Node into a page, and an import left alone is resolved at run time from wherever the bundle landed, which finds the package's own `mthds` or `undici` only when the package manager hoisted it beside the application, and a strict layout such as pnpm's does not. Conditions are read by every bundler and resolve from the package itself.
|
|
61
|
+
|
|
62
|
+
The `imports` map points into `dist/`, which is what ships, so the tools that run the source map `#node-host` to the source of its Node target: `tsconfig.json`'s `paths` for the type checker, which `tests/browser-bundle.test.ts` holds to the map, and `vitest.config.ts` and `scripts/build-hook.mjs`, which derive it from the map. `dependency-cruiser` keeps every other module of the barrel's graph off a Node built-in, `undici` and the `mthds` root entry, type-only imports apart, and nothing imports a variant by its path.
|
|
42
63
|
|
|
43
64
|
## Wire conventions
|
|
44
65
|
|
|
@@ -93,10 +114,10 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
93
114
|
- `models.ts` — Dict-serialized concretes (`DictStuff` / `DictWorkingMemory` / `DictPipeOutput` / `DictRunResultExecute`), the `/v1/validate` surface (`PipelexValidationResult`, whose two arms are declared whole rather than as narrowings of the standard's `ValidationResult`, `ValidationErrorItem`, and the `SuggestedFix` / `FixOp` repair vocabulary its items carry — the hosted plane's shapes, which predate the standard's problem items, their operation and safety vocabularies pinned to the standard's 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 `CrateRequestBase` / `CrateInvalidReport` vocabulary plus the `/v1/resolve`, `/v1/codegen` and `/v1/pipe-io` shapes built on it, `GeneratedArtifact` among them.
|
|
94
115
|
- `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.
|
|
95
116
|
- `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).
|
|
96
|
-
- `method-trees.ts` — a saved method's tree on the client side: `MethodTreeSource`, the shape a save reads a tree from, which the `mthds` package's `MethodTree` satisfies; the choice between sending a tree inline and by hash (`INLINE_TREE_MAX_BYTES`), the wire types of `POST /v1/blobs/missing` and the upload of a blob the platform lacks; `redactSignedLinks`, which every error built from an answer holding signed links reads its body through; the tree of an in-memory map; the tree limits a version handshake announces; the listing of a `directory`,
|
|
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
|
|
117
|
+
- `method-trees.ts` — a saved method's tree on the client side: `MethodTreeSource`, the shape a save reads a tree from, which the `mthds` package's `MethodTree` satisfies; the choice between sending a tree inline and by hash (`INLINE_TREE_MAX_BYTES`), the wire types of `POST /v1/blobs/missing` and the upload of a blob the platform lacks; `redactSignedLinks`, which every error built from an answer holding signed links reads its body through; the tree of an in-memory map; the tree limits a version handshake announces; the listing of a `directory`, by the `mthds` package's lister, which it gets from the Node host only when a directory is given; and the Node-only write of a saved listing to disk, with the file system it gets from the Node host when called. Outside Node, both are refused with `RequestArgumentError`. Its tree-sending half mirrors the `mthds` package's own helpers, which the `mthds/protocol` subpath does not export yet, so it holds the same rules with Web Crypto's SHA-256 and a Base64 writer of its own. See [method-trees.md](./method-trees.md).
|
|
118
|
+
- `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. 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).
|
|
98
119
|
- `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).
|
|
99
|
-
- `artifacts.ts` — the artifact stack, the download twin of `prepareInputs`, in layers: `locateArtifacts` (a pure, exported walk for `pipelex-storage://` references, each with every `$`-rooted path it sits at) and `collectArtifacts` (the same walk's bare references), `resolveArtifacts` (the bulk resolve route over a whole list, chunked at its bound), `fetchArtifact` (one reference as a bounded `Response`) and `downloadArtifacts` (Node-only, a run's produced files saved under a directory as a produced verdict), plus `artifactFilename`, the rule that names a saved file after the field it fills. The three network operations are client methods over a small structural seam (`ArtifactCapableClient`: the raw `resolveStorageUrls` call and `getRunResult`); the module's static
|
|
120
|
+
- `artifacts.ts` — the artifact stack, the download twin of `prepareInputs`, in layers: `locateArtifacts` (a pure, exported walk for `pipelex-storage://` references, each with every `$`-rooted path it sits at) and `collectArtifacts` (the same walk's bare references), `resolveArtifacts` (the bulk resolve route over a whole list, chunked at its bound), `fetchArtifact` (one reference as a bounded `Response`) and `downloadArtifacts` (Node-only, a run's produced files saved under a directory as a produced verdict), plus `artifactFilename`, the rule that names a saved file after the field it fills. The three network operations are client methods over a small structural seam (`ArtifactCapableClient`: the raw `resolveStorageUrls` call and `getRunResult`); the module's graph, static and dynamic, stays free of Node builtins, because `node:fs/promises`, `node:path` and `undici` come from the Node host. `undici` is a runtime dependency for one reason: the fetch runs on an `Agent` carrying `headersTimeout` and `bodyTimeout`, the per-stall bounds an `AbortSignal` budget does not give, and Node exposes its bundled undici's `fetch` but not its `Agent`. See [artifact-download.md](./artifact-download.md).
|
|
100
121
|
- `runs.ts` — the run-lifecycle types (`RunStatus`, `RunRead`, `RunResults`, `RunResultState`) and the single poll loop (`pollUntilResult`). `RunResults.main_stuff` (the resolved main output content) is always present for a completed run: on the hosted path it is the `main_stuff.json` S3 artifact; on the bare-runner blocking path the SDK resolves it from the returned working memory via the response's `main_stuff_name`, so both paths deliver the same shape. Consumers read `main_stuff` directly. `working_memory` — every named stuff of the run, `{ root, aliases }`, typed `DictWorkingMemory` from `models.ts` — reads the same on both paths: the hosted path relays the `working_memory.json` artifact, and the blocking path lifts it off `pipe_output`, which still rides whole (blocking path only). `graph_spec` — the executed graph — also reaches the client on both paths: the hosted path relays the `graphspec.json` artifact, and the blocking path lifts it off `pipe_output` beside `graph_assembly_error`, the graph's twin of `usage_assembly_error`. That error field is declared ahead of the wire on the hosted side, where the platform's results body relays no such key and the field is therefore absent, reading `undefined` rather than `null`. A completed run that cannot deliver a main stuff throws `MissingMainStuffError` when the read asked for it. `runs.ts` also declares `RUN_RESULT_ARTIFACTS` / `RunResultArtifact`, the artifacts a results read can be narrowed to with `getRunResult`'s `artifacts` option; with a selection an unselected artifact is absent while a selected unwritten one is `null`. `runs.ts` also owns `TokensUsageRecord` — one client-facing usage record per inference call, carried by `RunResults.tokens_usages` on both paths. That is a mirror of a wire contract this SDK does not own (inference accounting is a Pipelex runtime extension rather than part of the MTHDS standard): every field is optional and the interface carries an index signature so pre-contract artifacts (relayed verbatim, never migrated) still type-check. See [`run-usage.md`](./run-usage.md) for the field reference, the cost/null semantics, and the old-artifact rules, and [`run-results.md`](./run-results.md) for the field-by-field account of `RunResults` — the durable handle, the output and how to read it, the run's working memory, the executed graph and how to render or keep it, and the produced files with their short-lived links.
|
|
101
122
|
- `usage.ts` — `summarizeUsage`, the **pure** fold of a run's usage pair (`tokens_usages` / `usage_assembly_error`) into one `UsageSummary`: a `state` (`records`, `no_inference` or `unavailable`), the null-aware total cost with its `cost_partial` flag, the `input` and `output` token totals, the call count, the relayed assembly error, and a `by_pipe` rollup sorted by cost with the unattributed calls grouped under a `null` `pipe_code`. It applies the rules [`run-usage.md`](./run-usage.md#summarizing-a-run--summarizeusage) states, so that every consumer reads one computation rather than re-deriving those rules by hand. It imports types from `runs.ts` and nothing else: no client, no fetch, no `mthds/protocol`.
|
|
102
123
|
- `execute-result.ts` — `PipelexExecuteResult`, a `DictRunResultExecute` subtype that adds a resolved `.main_stuff` accessor (dug out of `pipe_output`'s working memory via the response's `main_stuff_name`, throwing `MissingMainStuffError` if unlocatable). `execute()` returns it, giving blocking and durable results the **same output accessor** — `result.main_stuff` — so callers never branch on which path ran. The neutral `mthds` wire model leaves `main_stuff_name` in its extension index signature; this Pipelex-branded subtype declares it as a typed field (Pipelex owns that concept). `resultsFromExecute` (the public lift from that result onto `RunResults`, in the same module) reads that accessor too, keeping the resolution single-sourced; the `executeBlocking` fallback is its only caller inside the SDK, and a consumer driving `execute()` directly calls it by name.
|
|
@@ -106,6 +127,7 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
106
127
|
- `user-agent.ts` — client identification per the spec `conformance/specs/client-identification.md`, in the `conformance` repository beside the specs' tests: the exported `AppInfo` option, its RFC 9110 token validation (a `TypeError` on a bad field, a `RangeError` past the 512-character ceiling), its rendering, the runtime detection (Node, Bun, Deno, or a browser, where no header is set) and `buildUserAgent`, which the client calls once at construction. The barrel re-exports `buildUserAgent`, `validateAppInfo`, `MAX_USER_AGENT_LENGTH` and the `RuntimeInfo` type, so a consumer's raw fetches send the same value. The client's private `requestHeaders` is the one place API request headers are built, so every route carries the value; the artifact fetch of a presigned link never goes through it. See [client-identification.md](./client-identification.md).
|
|
107
128
|
- `exact-json.ts` — `parseExactJson` and `stringifyExactJson`, JSON whose integers stay exact, and `ExactJsonUnsupportedError`. The reader, which the client applies to every answer carrying a person's data (a method example, a run's record, a run's results, the blocking execute's answer), is one `JSON.parse` call whose reviver turns a number past `Number.MAX_SAFE_INTEGER` spelled as an integer into a `bigint` of its source text (`context.source`), so it reads everything else exactly as `JSON.parse` does, with no second parser to keep in step; a text holding no run of 16 digits is parsed with no reviver at all. On a runtime whose reviver gets no source text, it refuses a whole number past the safe range with `ExactJsonUnsupportedError`, which the client reports as an answer it cannot read, rather than rounding it. The writer, which `requestRaw` applies to every request body before the request is made, is one `JSON.stringify` call whose replacer turns each `bigint` into `JSON.rawJSON` text, so every getter and `toJSON` in the body runs once, and a `bigint` an inherited `toJSON` such as the `BigInt.prototype.toJSON` polyfill already turned into a string is looked up in its holder and written as its digits; a runtime without `JSON.rawJSON` refuses the `bigint`, as a `RequestArgumentError` from the client, rather than rounding it. The barrel exports all three, for a caller showing such data as JSON text; the error declares its verdict itself, `config` and not retryable, as `CodegenLockError` does. It imports nothing but the `ErrorDomain` type. See [exact-integers.md](./exact-integers.md).
|
|
108
129
|
- `timers.ts` — `MAX_TIMER_DELAY_MS`, the longest delay `setTimeout` honours, and `isTimerDelay`, which every caller-supplied `timeoutMs` is checked against before it reaches a timer: a longer delay overflows and fires at once. It imports nothing, so the browser-safe upload entry uses it too.
|
|
130
|
+
- `node-host.ts` and `node-host/` — the Node host ([above](#the-node-host)): `loadNodeHost()` and `isNodeRuntime()` in `node-host.ts`, the Node variant `node-host/node.ts`, the only module of the barrel's graph that imports a Node built-in, `undici` or the `mthds` root entry, and `node-host/unavailable.ts`, the variant every other runtime resolves.
|
|
109
131
|
- `version.ts` — `SDK_VERSION`, in its own module so the client stamps it on the `User-Agent` without importing the barrel, which re-exports it.
|
|
110
132
|
- `cli.ts` and `cli/` — the `pipelex-sdk` command, `run` and `script` ([`cli.md`](cli.md)): `cli.ts` is the executable `package.json` declares as the package's one `bin`, handing the process to `cli/main.ts`'s `runCommand`, and `cli/` holds the flags, the bundle reader, the inputs, the environment, the two subcommands and what they print. It sits at the TOP of the graph, the other way round from every other module: nothing imports it, the barrel does not export it, and it reaches the SDK only through `index.ts`, which `dependency-cruiser` enforces in both directions.
|
|
111
133
|
- `index.ts` — the public barrel: `export * from "mthds/protocol"` (single import source for the standard surface) plus the client, models, run types, the standalone pure helpers (`runCodegenCheck`, `summarizeUsage`, `locateArtifacts`, `collectArtifacts`, `artifactFilename`, `parseExactJson`, `stringifyExactJson`), and errors.
|
|
@@ -141,7 +163,9 @@ The hosted catalog/account routes the webapp drives. All ride the same `{base}/v
|
|
|
141
163
|
|
|
142
164
|
## Hook bundle (`dist-hooks/check.mjs`)
|
|
143
165
|
|
|
144
|
-
`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
|
|
166
|
+
`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 the Node host's dynamic import, which the hook never executes, so the bundle does not inline an HTTP client it cannot use; the hook runs in Node, so the build resolves `#node-host` to the source of the Node host. **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 tree gatherer (`src/hooks/bundle-gather.ts`) lists the edited file's directory with the `mthds` package's lister, which the bundle inlines, under the hook's own caps, and the validation sends that tree, the template files its `PipeDocGen` steps name included. The networked stage is `src/hooks/validate-stage.ts`: it holds the whole stage, the version handshake, the blob route, the uploads and the validation, to one deadline (`VALIDATE_TIMEOUT_MS`, ten seconds) whose signal it hands to `validate`, so the request or upload under way stops when it runs out and the stage reads as `unavailable`. 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).
|
|
167
|
+
|
|
168
|
+
Before the validation sends anything, the gatherer reads every file of the tree once and screens it with `src/hooks/secret-guard.ts`, the workshop's secret guard (pipelex-mcp's `src/capabilities/secret-guard.ts`), ahead of the workshop's copy on its SSH key names and its PEM private key block, because the lister reads no `.gitignore` above the tree's root. A file named like a known secret file, or holding a well-known key format, stays home and is named in the note the verdict carries, placed after the verdict's text and named once for one tree, never quoted, and no note is shown when no verdict comes back; one that is a bundle or the manifest, which every validation reads, keeps the whole tree home, and the stage reads as `refused`. The tree sent serves the bytes screened, never read again ([`hook-bundle.md`](./hook-bundle.md#secrets-stay-home)).
|
|
145
169
|
|
|
146
170
|
## Testing
|
|
147
171
|
|