@pipelex/sdk 0.30.0 → 0.33.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 +20 -4
- package/dist/artifacts.js +23 -9
- package/dist/artifacts.js.map +1 -1
- package/dist/client.d.ts +78 -12
- package/dist/client.js +234 -86
- package/dist/client.js.map +1 -1
- package/dist/codegen-check.d.ts +9 -0
- package/dist/codegen-check.js +12 -6
- package/dist/codegen-check.js.map +1 -1
- package/dist/error-models.d.ts +60 -2
- package/dist/error-models.js +169 -3
- package/dist/error-models.js.map +1 -1
- package/dist/error-verdicts.d.ts +34 -0
- package/dist/error-verdicts.js +69 -0
- package/dist/error-verdicts.js.map +1 -0
- package/dist/errors.d.ts +210 -46
- package/dist/errors.js +289 -62
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -1
- package/dist/index.js.map +1 -1
- package/dist/prepare-inputs.js +26 -5
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/upload-grant.d.ts +15 -10
- package/dist/upload-grant.js +36 -17
- package/dist/upload-grant.js.map +1 -1
- package/dist/upload.js +17 -4
- package/dist/upload.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +8 -7
- package/docs/artifact-download.md +3 -3
- package/docs/errors.md +93 -10
- package/docs/input-preparation.md +11 -7
- package/package.json +2 -2
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,6FAA6F;AAC7F,OAAO,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAE3C,oFAAoF;AACpF,kFAAkF;AAClF,mFAAmF;AACnF,wBAAwB;AACxB,cAAc,gBAAgB,CAAC;AAE/B,wEAAwE;AACxE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,aA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tB,uBAAuB,EACvB,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|
package/dist/prepare-inputs.js
CHANGED
|
@@ -286,7 +286,9 @@ function normalizePipeRef(raw) {
|
|
|
286
286
|
* arm means the closure does not load, which is a preparation failure. So is a
|
|
287
287
|
* selection the route refuses — an unknown `pipe_ref`, no entry pipe, several —
|
|
288
288
|
* which it answers with a `422` typed by one of {@link PIPE_SELECTION_ERROR_TYPES};
|
|
289
|
-
* every other failure is re-thrown unchanged.
|
|
289
|
+
* every other failure is re-thrown unchanged. An answer with no boolean `is_valid`
|
|
290
|
+
* is neither arm, so it fails the preparation with a `runtime` verdict, as an
|
|
291
|
+
* `input_form` that does not describe the selected pipe does.
|
|
290
292
|
*/
|
|
291
293
|
async function fetchSignature(client, selector, pipeRef) {
|
|
292
294
|
const request = pipeRef === undefined ? { ...selector } : { ...selector, pipe_ref: pipeRef };
|
|
@@ -304,12 +306,30 @@ async function fetchSignature(client, selector, pipeRef) {
|
|
|
304
306
|
}
|
|
305
307
|
throw error;
|
|
306
308
|
}
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
309
|
+
const answer = result;
|
|
310
|
+
if (!isPlainObject(answer) || typeof answer.is_valid !== "boolean") {
|
|
311
|
+
// An answer with no boolean discriminant is neither arm: the route broke its own contract,
|
|
312
|
+
// which no change to the request fixes.
|
|
313
|
+
throw new InputPreparationError("Cannot prepare inputs: the pipe I/O answer carries no boolean `is_valid`, so it says " +
|
|
314
|
+
"neither that the method loaded nor why it did not.", { verdict: { errorDomain: "runtime", retryable: false } });
|
|
315
|
+
}
|
|
316
|
+
if (!answer.is_valid) {
|
|
317
|
+
throw new InputPreparationError(`Cannot prepare inputs: the method signature did not resolve — ${invalidReason(answer)}`);
|
|
310
318
|
}
|
|
311
319
|
return result;
|
|
312
320
|
}
|
|
321
|
+
/**
|
|
322
|
+
* Why an invalid pipe I/O answer says the closure did not load: its first validation item's
|
|
323
|
+
* message, else its own `message`. Each is read only when it has its declared type, since the
|
|
324
|
+
* answer is the server's, and an answer carrying neither still fails the preparation.
|
|
325
|
+
*/
|
|
326
|
+
function invalidReason(answer) {
|
|
327
|
+
const items = answer.validation_errors;
|
|
328
|
+
const first = Array.isArray(items) ? items[0] : undefined;
|
|
329
|
+
if (isPlainObject(first) && typeof first.message === "string")
|
|
330
|
+
return first.message;
|
|
331
|
+
return typeof answer.message === "string" ? answer.message : "the answer gives no reason";
|
|
332
|
+
}
|
|
313
333
|
/**
|
|
314
334
|
* The descriptor of the pipe the route selected. The route answers a
|
|
315
335
|
* single-pipe request with `input_form` keyed by exactly the `pipe_ref` it
|
|
@@ -323,8 +343,9 @@ function selectedDescriptor(report) {
|
|
|
323
343
|
const described = isPlainObject(inputForm)
|
|
324
344
|
? Object.keys(inputForm).join(", ") || "none"
|
|
325
345
|
: "none";
|
|
346
|
+
// The route broke its own contract, which no change to the request fixes.
|
|
326
347
|
throw new InputPreparationError(`Cannot prepare inputs: the pipe I/O answer selected ${pipeRef === undefined ? "no pipe" : `"${pipeRef}"`}, ` +
|
|
327
|
-
`but its \`input_form\` does not describe it (it describes: ${described})
|
|
348
|
+
`but its \`input_form\` does not describe it (it describes: ${described}).`, { verdict: { errorDomain: "runtime", retryable: false } });
|
|
328
349
|
}
|
|
329
350
|
return inputForm[pipeRef];
|
|
330
351
|
}
|
|
@@ -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,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGtE,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAEzC,MAAM,sBAAsB,GAAG,oBAAoB,CAA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CAAC,IAAI,EAAE,WAAW,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,OAAO,CAAC,MAAM,CAAC,EAAE,CAAC;QACjE,MAAM,KAAK,GAAG,QAAQ,CAAC,GAAG,CAAC,IAAI,CAAC,CAAC;QACjC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACxB,SAAS,CAAC,2DAA2D;QACvE,CAAC;QACD,IAAI,kBAAkB,CAAC,WAAW,CAAC,EAAE,CAAC;YACpC,2EAA2E;YAC3E,mEAAmE;YACnE,0EAA0E;YAC1E,MAAM,MAAM,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;YAClE,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,CAAC,CAAC;QAC/D,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/upload-grant.d.ts
CHANGED
|
@@ -52,18 +52,20 @@ export interface GrantedUpload {
|
|
|
52
52
|
* `403` when the file's size, type or metadata differ from what the grant signed
|
|
53
53
|
* (`signature_mismatch`), when the request carried a header the grant did not sign
|
|
54
54
|
* (`unsigned_header`), or when the grant has expired (`grant_expired`); any other
|
|
55
|
-
* `4xx` (`store_refused`). Each asks for a new grant, or for
|
|
56
|
-
* was requested for.
|
|
55
|
+
* `4xx` but a `408` or a `429` (`store_refused`). Each asks for a new grant, or for
|
|
56
|
+
* the file the grant was requested for.
|
|
57
57
|
* - `UploadTransportError` (`status` is storage's when it answered, `code` says
|
|
58
58
|
* which) — the time limit running out (`timeout`), storage unreachable
|
|
59
59
|
* (`unreachable`), a `5xx` (`server_error`), storage timing out on the body
|
|
60
60
|
* (`storage_timeout`, a `400 RequestTimeout`, which wrote nothing), another upload
|
|
61
61
|
* with the same grant still in progress (`conflict`, a `409
|
|
62
|
-
* ConditionalRequestConflict`),
|
|
63
|
-
*
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
62
|
+
* ConditionalRequestConflict`), storage timing out or throttling the request
|
|
63
|
+
* (`unexpected`, a `408` or a `429`, refused for its timing rather than for the
|
|
64
|
+
* file), or a redirect, which is refused rather than followed (`redirected`). In a
|
|
65
|
+
* browser a refused cross-origin request looks like an unreachable host, so the
|
|
66
|
+
* message names that too. A grant whose `url` is not an absolute `http(s)` URL free
|
|
67
|
+
* of user info is refused the same way, before anything is sent
|
|
68
|
+
* (`invalid_grant_url`).
|
|
67
69
|
*
|
|
68
70
|
* The whole exchange runs under a time limit: `timeoutMs` when given, else 60 s plus
|
|
69
71
|
* 1 s for every started 128 KiB of the file. A caller's `signal` can end it sooner,
|
|
@@ -76,8 +78,11 @@ export interface GrantedUpload {
|
|
|
76
78
|
* A timeout, a `5xx`, a conflict and a connection lost after the file went out leave
|
|
77
79
|
* it unknown whether the object was written: retrying with the same grant before it
|
|
78
80
|
* expires either stores it or answers the `412` of a used grant, and then the
|
|
79
|
-
* grant's `uri` already names the file.
|
|
80
|
-
*
|
|
81
|
-
*
|
|
81
|
+
* grant's `uri` already names the file. After a `408` or a `429` the same retry
|
|
82
|
+
* applies, later, since storage refused the request for its timing. A `501` is the
|
|
83
|
+
* exception: storage does not implement the request it was sent, stored nothing, and
|
|
84
|
+
* answers a retry the same way, so its error is not retryable. The grant is a bearer
|
|
85
|
+
* capability: nothing here logs it, and no error this throws carries its URL,
|
|
86
|
+
* storage's error body or a runtime error that could hold either.
|
|
82
87
|
*/
|
|
83
88
|
export declare function uploadWithGrant(grant: UploadGrant, file: Blob, options?: UploadWithGrantOptions): Promise<GrantedUpload>;
|
package/dist/upload-grant.js
CHANGED
|
@@ -44,18 +44,20 @@ const ERROR_BODY_MAX_BYTES = 16 * 1024;
|
|
|
44
44
|
* `403` when the file's size, type or metadata differ from what the grant signed
|
|
45
45
|
* (`signature_mismatch`), when the request carried a header the grant did not sign
|
|
46
46
|
* (`unsigned_header`), or when the grant has expired (`grant_expired`); any other
|
|
47
|
-
* `4xx` (`store_refused`). Each asks for a new grant, or for
|
|
48
|
-
* was requested for.
|
|
47
|
+
* `4xx` but a `408` or a `429` (`store_refused`). Each asks for a new grant, or for
|
|
48
|
+
* the file the grant was requested for.
|
|
49
49
|
* - `UploadTransportError` (`status` is storage's when it answered, `code` says
|
|
50
50
|
* which) — the time limit running out (`timeout`), storage unreachable
|
|
51
51
|
* (`unreachable`), a `5xx` (`server_error`), storage timing out on the body
|
|
52
52
|
* (`storage_timeout`, a `400 RequestTimeout`, which wrote nothing), another upload
|
|
53
53
|
* with the same grant still in progress (`conflict`, a `409
|
|
54
|
-
* ConditionalRequestConflict`),
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
58
|
-
*
|
|
54
|
+
* ConditionalRequestConflict`), storage timing out or throttling the request
|
|
55
|
+
* (`unexpected`, a `408` or a `429`, refused for its timing rather than for the
|
|
56
|
+
* file), or a redirect, which is refused rather than followed (`redirected`). In a
|
|
57
|
+
* browser a refused cross-origin request looks like an unreachable host, so the
|
|
58
|
+
* message names that too. A grant whose `url` is not an absolute `http(s)` URL free
|
|
59
|
+
* of user info is refused the same way, before anything is sent
|
|
60
|
+
* (`invalid_grant_url`).
|
|
59
61
|
*
|
|
60
62
|
* The whole exchange runs under a time limit: `timeoutMs` when given, else 60 s plus
|
|
61
63
|
* 1 s for every started 128 KiB of the file. A caller's `signal` can end it sooner,
|
|
@@ -68,9 +70,12 @@ const ERROR_BODY_MAX_BYTES = 16 * 1024;
|
|
|
68
70
|
* A timeout, a `5xx`, a conflict and a connection lost after the file went out leave
|
|
69
71
|
* it unknown whether the object was written: retrying with the same grant before it
|
|
70
72
|
* expires either stores it or answers the `412` of a used grant, and then the
|
|
71
|
-
* grant's `uri` already names the file.
|
|
72
|
-
*
|
|
73
|
-
*
|
|
73
|
+
* grant's `uri` already names the file. After a `408` or a `429` the same retry
|
|
74
|
+
* applies, later, since storage refused the request for its timing. A `501` is the
|
|
75
|
+
* exception: storage does not implement the request it was sent, stored nothing, and
|
|
76
|
+
* answers a retry the same way, so its error is not retryable. The grant is a bearer
|
|
77
|
+
* capability: nothing here logs it, and no error this throws carries its URL,
|
|
78
|
+
* storage's error body or a runtime error that could hold either.
|
|
74
79
|
*/
|
|
75
80
|
export async function uploadWithGrant(grant, file, options = {}) {
|
|
76
81
|
const label = fileLabel(grant, file);
|
|
@@ -158,13 +163,27 @@ export async function uploadWithGrant(grant, file, options = {}) {
|
|
|
158
163
|
`storage (${describeStatus(response, refusal)}), so whether the file was stored is ` +
|
|
159
164
|
`unknown. Send a grant once at a time. ${sameGrantRetry(grant)}`, { status, code: "conflict" });
|
|
160
165
|
}
|
|
161
|
-
|
|
166
|
+
// A 408 or a 429 refuses the request for its timing, never the file: storage timed it out or
|
|
167
|
+
// throttled it, so it falls through to the transport failure below, whose verdict reads its
|
|
168
|
+
// status as retryable.
|
|
169
|
+
if (status >= 400 && status < 500 && status !== 408 && status !== 429) {
|
|
162
170
|
const { code, advice } = classifyRefusal(status, refusal, grant);
|
|
163
171
|
throw new RejectedAssetError(`Storage refused the upload of "${label}" (${describeStatus(response, refusal)}): ${advice}`, label, status, { code });
|
|
164
172
|
}
|
|
165
|
-
|
|
166
|
-
(refusal.message ? `: ${withoutFinalPeriod(refusal.message)}` : "")
|
|
167
|
-
|
|
173
|
+
const failure = `Upload of "${label}" failed at storage (${describeStatus(response, refusal)})` +
|
|
174
|
+
(refusal.message ? `: ${withoutFinalPeriod(refusal.message)}` : "");
|
|
175
|
+
// Storage answers a 501 for a request it does not implement, such as a header it does not
|
|
176
|
+
// support: it stored nothing, and the same request meets the same answer, so neither the
|
|
177
|
+
// same grant nor a new one is worth a retry, and the error's verdict says so too.
|
|
178
|
+
if (status === 501) {
|
|
179
|
+
throw new UploadTransportError(`${failure}. Storage does not implement the request it was sent, so it stored nothing, ` +
|
|
180
|
+
"and sending the file again will meet the same answer.", { status, code: "server_error" });
|
|
181
|
+
}
|
|
182
|
+
if (status === 408 || status === 429) {
|
|
183
|
+
throw new UploadTransportError(`${failure}. Storage ${status === 429 ? "throttled" : "timed out"} the request rather ` +
|
|
184
|
+
`than refusing the file, so a later attempt can succeed. ${sameGrantRetry(grant)}`, { status, code: "unexpected" });
|
|
185
|
+
}
|
|
186
|
+
throw new UploadTransportError(`${failure}. Whether the file was stored is unknown. ${sameGrantRetry(grant)}`, { status, code: status >= 500 ? "server_error" : "unexpected" });
|
|
168
187
|
}
|
|
169
188
|
finally {
|
|
170
189
|
clearTimeout(timer);
|
|
@@ -310,9 +329,9 @@ function describeStatus(response, refusal) {
|
|
|
310
329
|
return reason ? `${response.status} ${reason}` : String(response.status);
|
|
311
330
|
}
|
|
312
331
|
/**
|
|
313
|
-
* What a `4xx` from storage means for the caller: the code
|
|
314
|
-
* it can act on. An expired grant and an unsigned header both
|
|
315
|
-
* AccessDenied`, so only S3's message tells them apart.
|
|
332
|
+
* What a `4xx` from storage, a `408` and a `429` aside, means for the caller: the code
|
|
333
|
+
* it branches on, and words it can act on. An expired grant and an unsigned header both
|
|
334
|
+
* answer `403 AccessDenied`, so only S3's message tells them apart.
|
|
316
335
|
*/
|
|
317
336
|
function classifyRefusal(status, refusal, grant) {
|
|
318
337
|
if (status === 412) {
|
package/dist/upload-grant.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"upload-grant.js","sourceRoot":"","sources":["../src/upload-grant.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,OAAO,EAAE,qBAAqB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAG9F,OAAO,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,aAAa,CAA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ch (error) {
|
|
121
121
|
throw mapUploadError(error, filename);
|
|
122
122
|
}
|
|
123
|
-
|
|
123
|
+
// The record guarantees a filename: an answer that names none keeps the one sent.
|
|
124
|
+
const stored = uploaded.filename;
|
|
125
|
+
return {
|
|
126
|
+
uri: uploaded.uri,
|
|
127
|
+
filename: typeof stored === "string" ? stored : filename,
|
|
128
|
+
contentType,
|
|
129
|
+
size: bytes.length,
|
|
130
|
+
};
|
|
124
131
|
}
|
|
125
132
|
/** Translate a raw `upload()` transport error into the matching preparation error. */
|
|
126
133
|
function mapUploadError(error, filename) {
|
|
127
134
|
if (error instanceof ApiResponseError) {
|
|
135
|
+
// A 2xx the client could not read: storage may hold the file, but under no reference the SDK
|
|
136
|
+
// can return.
|
|
137
|
+
if (error.status >= 200 && error.status < 300) {
|
|
138
|
+
return new UploadTransportError(`Upload of "${filename}" was answered (${error.status}) with a body the SDK could not ` +
|
|
139
|
+
"read, so whether and where the file was stored is unknown.", { cause: error, status: error.status, code: "unexpected" });
|
|
140
|
+
}
|
|
128
141
|
switch (error.status) {
|
|
129
142
|
case 413:
|
|
130
143
|
return new RejectedAssetError(`The server rejected "${filename}": ${error.serverMessage ?? "asset exceeds the service size limit"}.`, filename, error.status, { cause: error, code: "too_large" });
|
|
@@ -149,9 +162,9 @@ function mapUploadError(error, filename) {
|
|
|
149
162
|
}
|
|
150
163
|
// Only errors thrown by the `client.upload()` call reach here — the local-source
|
|
151
164
|
// and asset-type failures are raised in `toAssetBytes`, before this try block. Any
|
|
152
|
-
// error that is neither of the two mapped types (a
|
|
153
|
-
//
|
|
154
|
-
//
|
|
165
|
+
// error that is neither of the two mapped types (a custom client throwing a plain
|
|
166
|
+
// Error or a SyntaxError of its own) is wrapped so every upload failure stays
|
|
167
|
+
// catchable as an InputPreparationError, never a raw escape.
|
|
155
168
|
const detail = error instanceof Error ? error.message : String(error);
|
|
156
169
|
return new UploadTransportError(`Upload of "${filename}" failed unexpectedly: ${detail}.`, {
|
|
157
170
|
cause: error,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,CAAC;IACJ,CAAC;IACD,iFAAiF;IACjF,mFAAmF;IACnF,kFAAkF;IAClF,8EAA8E;IAC9E,6DAA6D;IAC7D,MAAM,MAAM,GAAG,KAAK,YAAY,KAAK,CAAC,CAAC,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IACtE,OAAO,IAAI,oBAAoB,CAAC,cAAc,QAAQ,0BAA0B,MAAM,GAAG,EAAE;QACzF,KAAK,EAAE,KAAK;QACZ,IAAI,EAAE,YAAY;KACnB,CAAC,CAAC;AACL,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/docs/architecture.md
CHANGED
|
@@ -34,7 +34,7 @@ The package is ESM-only (`"type": "module"`, `dist/index.js` built by `tsc` with
|
|
|
34
34
|
|
|
35
35
|
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.
|
|
36
36
|
|
|
37
|
-
The map has a second entry, **`@pipelex/sdk/upload`** (`dist/upload-grant.js`), the browser-safe one. The main entry is Node-first — `upload.ts` names `node:fs/promises` and `artifacts.ts` names `undici`, so a browser-targeting bundler must mark them external — because the client holds an API key and belongs on a server. 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
|
|
37
|
+
The map has a second entry, **`@pipelex/sdk/upload`** (`dist/upload-grant.js`), the browser-safe one. The main entry is Node-first — `upload.ts` names `node:fs/promises` and `artifacts.ts` names `undici`, so a browser-targeting bundler must mark them external — because the client holds an API key and belongs on a server. 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, and the unit suite bundles it for the browser with esbuild, nothing marked external, so a Node-only module becoming reachable fails a test rather than a consumer's build. 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. Whether the main entry should become browser-safe as a whole is a separate question, because it touches how path strings are read.
|
|
38
38
|
|
|
39
39
|
## Wire conventions
|
|
40
40
|
|
|
@@ -86,15 +86,16 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
86
86
|
- `client.ts` — `PipelexApiClient`: the `request()` pipeline (auth, base URL, timeouts/abort, problem-details parsing) and every route. `implements MTHDSProtocol<DictPipeOutput>` so the protocol-execution methods stay shaped like the standard.
|
|
87
87
|
- `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.
|
|
88
88
|
- `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.
|
|
89
|
-
- `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.
|
|
89
|
+
- `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).
|
|
90
90
|
- `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).
|
|
91
|
-
- `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
|
|
91
|
+
- `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).
|
|
92
92
|
- `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).
|
|
93
93
|
- `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 import graph stays free of Node builtins, because `node:fs/promises`, `node:path` and `undici` are loaded by dynamic import behind `isNodeRuntime()` — a browser-targeting bundler still has to mark `node:*` and `undici` external, as it already must for `upload.ts`. `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).
|
|
94
94
|
- `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.
|
|
95
95
|
- `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`.
|
|
96
96
|
- `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.
|
|
97
|
-
- `errors.ts` — the transport and run-lifecycle
|
|
97
|
+
- `errors.ts` — the error verdict and the typed errors. The verdict is `ErrorDomain` (`input`, `config`, `runtime`: who can fix the failure) and `ErrorVerdict` (that domain and `retryable`), carried as two readonly own properties by the abstract `PipelexRequestError`, which refines the protocol-base `PipelineRequestError` (re-exported from `mthds/protocol`) and takes the verdict as a constructor argument, so every subclass declares its verdict where it is defined and one that forgets it does not compile; `errorVerdictOf` reads the pair structurally from anything a `catch` holds. Under that base sit `RequestArgumentError` (the client refusing a call's arguments before sending any request, `input` unless the site declares otherwise, as the invalid base URL declares `config`), the transport and run-lifecycle errors, `PagingNotTerminatingError`, the input-preparation family under `InputPreparationError`, and the artifact family under `ArtifactOperationError` (`ScopeUnavailableError`, `ArtifactFetchError`, `ArtifactAuthenticationError`, the last carrying the download verdict so far); both family bases take an optional verdict for the sites, and the consumer subclasses, whose verdict is not the family's. `ApiResponseError` carries every member of the problem document it was built from, its nested members checked one level down by the readers a stored report goes through, and also stands for a 2xx answer the SDK could not read — the branch fields `errorDomain` and `type`, `retryable`, `userAction`, `requestId` (the body's, else the `X-Request-ID` header's), the native `code` and `errorType`, the platform's `errors[]`, the inference members, and the decoded document whole as `problemDocument` — and resolves `retryable` and `errorDomain` from the document's values when they are valid and the fallback's otherwise, except that a valid `input` or `config` domain sent without `retryable` is not retryable. Its member names match `mthds`'s own `ApiResponseError` wherever the two overlap, and so do their types except the verdict, which this SDK narrows to always decided; a type-level test pins the shared `ProblemDetails` and `UserAction` because this package may not import `mthds/errors`. `RunFailedError` carries the run's `status` and its stored report as `error`, and takes its verdict from that report. It is not the whole error surface: `codegen-check.ts` exports `CodegenLockError`, which extends plain `Error` because nothing was requested over the wire, and declares the two verdict members itself. See [errors.md](./errors.md#the-verdict-every-error-carries).
|
|
98
|
+
- `error-verdicts.ts` — `fallbackVerdict`, the table an `ApiResponseError` falls back to for a member the server did not send: the HTTP status, the platform `code`, and whether the body is named, which decides a `404`. Internal and pure. `pipelex-sdk` (Python) must apply the same table: `tests/fixtures/error-verdicts.json`, the case file this package's suite drives, is the contract, and the Python suite is to drive its own code through an identical copy of it once that copy is added.
|
|
98
99
|
- `user-agent.ts` — client identification per the workspace spec `docs/specs/client-identification.md`: 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).
|
|
99
100
|
- `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.
|
|
100
101
|
- `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,14 +111,14 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
110
111
|
- **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).
|
|
111
112
|
- **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.
|
|
112
113
|
- **Durable run lifecycle (hosted extension — NOT protocol):** `getRunStatus`, `getRunResult` (with an optional `artifacts` selection sent as `?artifacts=`, see [run-results.md](./run-results.md#reading-only-some-artifacts--artifacts)), `waitForResult`, `startAndWaitForResult` (handshakes `/v1/version`, takes the durable start+poll path on a hosted deployment, and self-heals to the blocking `execute` against a bare runner). A run that ended without completing answers the results read with a `409` whose `run_status` and `error` members carry its status and its stored error report; `getRunResult` turns it into the `failed` arm (`status`, `message` from `detail`, `error`) and the waiting calls on the durable path into a `RunFailedError` carrying the same (the blocking fallback's failure is the runner's `ApiResponseError`), the status read from the member, or from the `detail` sentence on a platform that does not send it yet. The status read serves the same report as `RunRead.error`. See [errors.md](./errors.md#a-failed-run--runerrorreport). Reading what a completed run consumed is `summarizeUsage(results)`, a standalone pure helper rather than a client method, because it folds the usage pair the results already carry and needs no server. See [run-usage.md](./run-usage.md#summarizing-a-run--summarizeusage).
|
|
113
|
-
- **Health:** `health` (origin-level `/health`).
|
|
114
|
+
- **Health:** `health` (origin-level `/health`), on the same transport as every route: an unreachable origin is an `ApiUnreachableError` and a non-2xx answer an `ApiResponseError` naming `/health`, whose verdict the fallback reads from the status. A 2xx whose body is not a JSON object is an `ApiResponseError` too, as on every protocol, extension and run-lifecycle route.
|
|
114
115
|
|
|
115
116
|
### Product routes (hosted management surface)
|
|
116
117
|
|
|
117
|
-
The hosted catalog/account routes the webapp drives. All ride the same `{base}/v1/*` + `Authorization: Bearer` + org-from-JWT contract as the protocol routes, go through the shared `requestProduct<T>` helper (30s management timeout, empty-body tolerant), and map a non-2xx RFC 9457 `problem+json` to a typed `ApiResponseError`. Consumers branch on **`type` and `errorDomain`**, as the workspace's hosted-envelope spec says, never on the HTTP status. The platform's `type` is `https://pipelex.com/errors/<code>`, one-to-one with its native `code` (`conflict`, `not_found`, `pipelex_api_key_limit_reached`, …), which stays on the error as the finer surface-specific code
|
|
118
|
+
The hosted catalog/account routes the webapp drives. All ride the same `{base}/v1/*` + `Authorization: Bearer` + org-from-JWT contract as the protocol routes, go through the shared `requestProduct<T>` helper (30s management timeout, empty-body tolerant), and map a non-2xx RFC 9457 `problem+json` to a typed `ApiResponseError`. Every route parses a 2xx body through one private helper, so an answer that is not JSON (a gateway's HTML page, an empty body where one was due) is an `ApiResponseError` carrying its status and raw text, `runtime` and not retryable, rather than a bare `SyntaxError`. A product route whose answer the SDK or its caller reads before anything else (`listMethods`, `listRuns`, `getRunDetail`, `upload`, `requestUploadGrant`, `resolveStorageUrls`, and the methods routes answering one stored method) goes through `requestProductObject` or a helper built on the same read instead, which also refuses an empty body and JSON that is not an object; the two paged routes then refuse, the same way, through one page reader, a page whose `items` is not an array or whose `next_cursor` is neither a string nor `null`, `upload` an answer with no non-empty string `uri`, and the methods routes a stored `mthds` field that is neither a string nor absent and a stored `python` field that is not the serialized file list. Consumers branch on **`type` and `errorDomain`**, as the workspace's hosted-envelope spec says, never on the HTTP status. The platform's `type` is `https://pipelex.com/errors/<code>`, one-to-one with its native `code` (`conflict`, `not_found`, `pipelex_api_key_limit_reached`, …), which stays on the error as the finer surface-specific code. The platform does not emit `error_domain` or `retryable` on its own refusals yet, so their `errorDomain` and `retryable` are the SDK's fallback, read from the status; every error carries both, decided. See [errors.md](./errors.md).
|
|
118
119
|
|
|
119
120
|
- **User profile:** `getMe` (`GET /v1/me`).
|
|
120
|
-
- **Methods catalog:** `listMethods`, `getMethod`, `createMethod`, `updateMethod` (rename = changed `name`), `deleteMethod`. **`deleteMethod` is asynchronous and its return type says so:** `DELETE /v1/methods/{id}` answers `202` with a `MethodDeletionAccepted` (`method_id`, `deletion_state`, `deletion_job_id`) the moment the platform has claimed the method and terminated its in-flight workflows — the rest of the cascade (runs, events, S3 objects) is enqueued. A resolved promise means "accepted", never "gone"; completion is the row disappearing from `listMethods`, not any field of that body. The claim is a conditional write, so a double-clicked delete is a `409 conflict` rather than a second cascade over the same runs, and an unknown or foreign-org id is a `404`. (This doc previously stated the SDK had no `delete` because the platform had no such route — the route has always existed; the claim was simply false.) `listMethods` returns **one page**, not the whole catalog — a `MethodPage` (`{items, nextCursor}`) served from a narrow index projection, so its cost is the page size rather than the size of the catalog. It used to return every method with its full `.mthds` bundle attached, which hit DynamoDB's 1 MB page cap at a couple hundred methods and came back truncated with no error and no flag, so methods silently vanished from the UI. Rows are therefore `MethodSummary`, **not** `MethodData`: no `mthds`, no `python`, no `updated_at`, because none of them is in the projection and putting `mthds` back is what restored the truncation. Reach for `getMethod(id)` when you need a method's source. `query.q` is applied server-side across the whole catalog, not over the page — filtering one page client-side would be searching 50 rows of 10,000 and calling it a search. `iterateMethods` is the async iterator that follows the cursor for callers who genuinely want everything (`for await (const m of client.iterateMethods())`); unlike `iterateRuns` it must keep going **past empty pages**, because `q` is a post-read filter over a bounded index slice per request, so `{items: [], nextCursor: "…"}` means "nothing matched in the slice I just read, keep going" — the difference is the server, not the client. It gives up only when the server stops advancing its cursor, and **throws** rather than returning a partial answer; like `iterateRuns` it is deliberately not a `listAllMethods(): Promise<MethodSummary[]>`, because an all-at-once helper needs a page cap and a cap means silently returning a truncated list. `MethodSummary.deletion_state` rides the list rows: a method mid-erasure stays listed so the UI can render it as "Deleting…", while `getMethod` refuses it with a 409. Full read responses (`MethodData`, from `getMethod`) carry `org_id`, `created_by_user_id`, and a server-derived `description` (parsed read-side from the bundle's top-level `description`) on top of the write contract's `name` / `mthds` / `input_data`. `getMethodClosure` is a client-side semantic layer over `getMethod` (not a route) that parses the stored method's polymorphic `mthds` source into a runnable, provenance-labelled closure — see [input-preparation.md](./input-preparation.md#getmethodclosure--the-explicit-expansion-utility).
|
|
121
|
+
- **Methods catalog:** `listMethods`, `getMethod`, `createMethod`, `updateMethod` (rename = changed `name`), `deleteMethod`. **`deleteMethod` is asynchronous and its return type says so:** `DELETE /v1/methods/{id}` answers `202` with a `MethodDeletionAccepted` (`method_id`, `deletion_state`, `deletion_job_id`) the moment the platform has claimed the method and terminated its in-flight workflows — the rest of the cascade (runs, events, S3 objects) is enqueued. A resolved promise means "accepted", never "gone"; completion is the row disappearing from `listMethods`, not any field of that body. The claim is a conditional write, so a double-clicked delete is a `409 conflict` rather than a second cascade over the same runs, and an unknown or foreign-org id is a `404`. (This doc previously stated the SDK had no `delete` because the platform had no such route — the route has always existed; the claim was simply false.) `listMethods` returns **one page**, not the whole catalog — a `MethodPage` (`{items, nextCursor}`) served from a narrow index projection, so its cost is the page size rather than the size of the catalog. It used to return every method with its full `.mthds` bundle attached, which hit DynamoDB's 1 MB page cap at a couple hundred methods and came back truncated with no error and no flag, so methods silently vanished from the UI. Rows are therefore `MethodSummary`, **not** `MethodData`: no `mthds`, no `python`, no `updated_at`, because none of them is in the projection and putting `mthds` back is what restored the truncation. Reach for `getMethod(id)` when you need a method's source. `query.q` is applied server-side across the whole catalog, not over the page — filtering one page client-side would be searching 50 rows of 10,000 and calling it a search. `iterateMethods` is the async iterator that follows the cursor for callers who genuinely want everything (`for await (const m of client.iterateMethods())`); unlike `iterateRuns` it must keep going **past empty pages**, because `q` is a post-read filter over a bounded index slice per request, so `{items: [], nextCursor: "…"}` means "nothing matched in the slice I just read, keep going" — the difference is the server, not the client. A server that keeps minting fresh cursors forever stops it at a page ceiling far past any real catalog with a `PagingNotTerminatingError` carrying `pageLimit`, never a silently truncated stream. It gives up only when the server stops advancing its cursor, and **throws** rather than returning a partial answer; like `iterateRuns` it is deliberately not a `listAllMethods(): Promise<MethodSummary[]>`, because an all-at-once helper needs a page cap and a cap means silently returning a truncated list. `MethodSummary.deletion_state` rides the list rows: a method mid-erasure stays listed so the UI can render it as "Deleting…", while `getMethod` refuses it with a 409. Full read responses (`MethodData`, from `getMethod`) carry `org_id`, `created_by_user_id`, and a server-derived `description` (parsed read-side from the bundle's top-level `description`) on top of the write contract's `name` / `mthds` / `input_data`. `getMethodClosure` is a client-side semantic layer over `getMethod` (not a route) that parses the stored method's polymorphic `mthds` source into a runnable, provenance-labelled closure — see [input-preparation.md](./input-preparation.md#getmethodclosure--the-explicit-expansion-utility).
|
|
121
122
|
- **Organizations:** `listMemberships`, `createOrganization`, `renameOrganization` (`PATCH`). The org "switch" is a WorkOS-session op (`/api/active-org`), not a `/v1` route — out of SDK scope.
|
|
122
123
|
- **Billing:** `getSubscription`, `listPlans`, `listInvoices`, `createCheckout`, `changePlan` (409 `conflict` ⇒ no subscription), `getBillingPortal` (409 `conflict` ⇒ no subscription).
|
|
123
124
|
- **Pipelex API keys (`plx_sk_…`):** `listPipelexApiKeys`, `createPipelexApiKey` (409 `pipelex_api_key_limit_reached`), `revokePipelexApiKey`, `rotatePipelexApiKey`. The plaintext `api_key` is returned once, on create/rotate.
|
|
@@ -162,11 +162,11 @@ Per-item `error.code` is the fetch vocabulary above plus the download's own: `re
|
|
|
162
162
|
|
|
163
163
|
- `RunStillRunningError` (with the retry hint) or `RunFailedError` (with the run's status and its stored error report as `error`) — a `run_id` naming a run that has not completed;
|
|
164
164
|
- `ScopeUnavailableError` — the requested scope's artifact is `null` or missing from the body (`scope` and `runId` on the error). Reading by `run_id`, a null `main_stuff` is already `MissingMainStuffError` from `getRunResult`;
|
|
165
|
-
- `ArtifactAuthenticationError` — the resolve route refused the credential (`401` / `403`), on the first resolve or on a re-resolve part-way through. It carries `verdict`, the result as it stood: the refusal stops the workers taking new items but lets the fetches already running finish, since they are on presigned links that do not carry the credential, so every file saved is real and listed and the rest are marked `aborted` with a detail naming the credential failure;
|
|
166
|
-
- `ArtifactOperationError` — outside Node, an unusable `dir`, both selectors or neither, an unknown `scope`, or nonsense bounds;
|
|
165
|
+
- `ArtifactAuthenticationError` — the resolve route refused the credential (`401` / `403`), on the first resolve or on a re-resolve part-way through. It carries `verdict`, the result as it stood: the refusal stops the workers taking new items but lets the fetches already running finish, since they are on presigned links that do not carry the credential, so every file saved is real and listed and the rest are marked `aborted` with a detail naming the credential failure. Its `verdict` member is the download's result so far, not the error's: that is `retryable` and `errorDomain`, `config` and not retryable;
|
|
166
|
+
- `ArtifactOperationError` — outside Node, an unusable `dir`, both selectors or neither, an unknown `scope`, or nonsense bounds; its verdict is `config` for the first two, since the environment must change, and `input` for the rest, the caller's arguments;
|
|
167
167
|
- and the transport and lifecycle errors of the reads it makes, unchanged: `ApiResponseError` for a deployment without the bulk route, `RunLifecycleUnavailableError` for a bare runner asked by `run_id`, `ApiUnreachableError`.
|
|
168
168
|
|
|
169
|
-
Everything else that can go wrong with one reference is that reference's `error`.
|
|
169
|
+
Everything else that can go wrong with one reference is that reference's `error`. Each thrown error carries the verdict every SDK error does, `retryable` and `errorDomain`, listed per class on [errors.md](./errors.md#each-classs-verdict); a per-reference `error` is a value with a `code`, and carries none.
|
|
170
170
|
|
|
171
171
|
**Options and defaults.**
|
|
172
172
|
|