@pipelex/sdk 0.37.0 → 0.39.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 +4 -4
- package/dist/cli/run.js +8 -111
- package/dist/cli/run.js.map +1 -1
- package/dist/cli/script.d.ts +1 -1
- package/dist/client.d.ts +33 -10
- package/dist/client.js +111 -44
- package/dist/client.js.map +1 -1
- package/dist/error-models.d.ts +64 -18
- package/dist/error-models.js +20 -9
- package/dist/error-models.js.map +1 -1
- package/dist/errors.d.ts +114 -22
- package/dist/errors.js +114 -21
- package/dist/errors.js.map +1 -1
- package/dist/execute-result.js +4 -4
- package/dist/execute-result.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/prepare-inputs.d.ts +13 -0
- package/dist/prepare-inputs.js +86 -41
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/product-models.d.ts +13 -5
- package/dist/run-may-have-started.d.ts +31 -0
- package/dist/run-may-have-started.js +138 -0
- package/dist/run-may-have-started.js.map +1 -0
- package/dist/runs.d.ts +95 -7
- package/dist/runs.js +18 -0
- package/dist/runs.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +3 -2
- package/docs/cli.md +1 -1
- package/docs/errors.md +85 -16
- package/docs/input-preparation.md +18 -0
- package/docs/run-results.md +39 -0
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"prepare-inputs.js","sourceRoot":"","sources":["../src/prepare-inputs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AAQH,OAAO,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAC3C,OAAO,EACL,gBAAgB,EAChB,qBAAqB,EACrB,sBAAsB,EACtB,eAAe,GAChB,MAA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M;QACN,MAAM,EAAE,OAAO,CAAC,MAAM;QACtB,YAAY;QACZ,OAAO,EAAE,EAAE;QACX,KAAK,EAAE,IAAI,GAAG,EAAE;KACjB,CAAC;IACF,MAAM,SAAS,GAA4B,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,CAAC;IACjE,KAAK,MAAM,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,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;YACxF,SAAS,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,WAAW,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC;QACxD,CAAC;aAAM,CAAC;YACN,SAAS,CAAC,IAAI,CAAC,GAAG,MAAM,WAAW,CAAC,GAAG,EAAE,KAAK,EAAE,WAAW,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;QACrF,CAAC;IACH,CAAC;IAED,OAAO,EAAE,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,CAAC,OAAO,EAAE,CAAC;AACrD,CAAC"}
|
package/dist/product-models.d.ts
CHANGED
|
@@ -481,9 +481,9 @@ export interface PipelineRun {
|
|
|
481
481
|
pipe_statuses?: Record<string, PipeStatus> | null;
|
|
482
482
|
created_at: string;
|
|
483
483
|
finished_at?: string | null;
|
|
484
|
-
/** The
|
|
485
|
-
*
|
|
486
|
-
* WHY a run failed rather than showing a generic message. */
|
|
484
|
+
/** The run's stored error report as the platform serves it, the runner's STRICT
|
|
485
|
+
* projection, typed whole (see `RunErrorReport` for which runs hold one). This is how a
|
|
486
|
+
* consumer tells the user WHY a run failed rather than showing a generic message. */
|
|
487
487
|
error?: RunErrorReport | null;
|
|
488
488
|
/**
|
|
489
489
|
* Which version of its method the run ran: the version number for a run addressed by a
|
|
@@ -518,8 +518,9 @@ export interface RunHistoryItem {
|
|
|
518
518
|
finished_at?: string | null;
|
|
519
519
|
/** `null` when the runner resolved the pipe from the bundle's `main_pipe`. */
|
|
520
520
|
pipe_code?: string | null;
|
|
521
|
-
/** The
|
|
522
|
-
* so opening it from history shows why
|
|
521
|
+
/** The run's stored error report, served as on the run detail — present only on a run
|
|
522
|
+
* that ended without completing and holds one, so opening it from history shows why
|
|
523
|
+
* without another read. */
|
|
523
524
|
error?: RunErrorReport | null;
|
|
524
525
|
/**
|
|
525
526
|
* Which version of the method the run ran — a number, `"draft"`, or `null` for an inline
|
|
@@ -548,6 +549,13 @@ export interface RunDetail extends PipelineRun {
|
|
|
548
549
|
mthds_contents?: string[] | null;
|
|
549
550
|
/** The inputs the run was started with, as sent. */
|
|
550
551
|
inputs?: Record<string, unknown> | null;
|
|
552
|
+
/**
|
|
553
|
+
* The id of the request that started the run — the one to quote to support, and the one the
|
|
554
|
+
* platform and the runner logged it under. `null` for a run saved before the platform recorded
|
|
555
|
+
* it; absent on a server that does not serve it. The run history does not carry it; the status
|
|
556
|
+
* read does, as `RunRead.request_id`.
|
|
557
|
+
*/
|
|
558
|
+
request_id?: string | null;
|
|
551
559
|
}
|
|
552
560
|
/** Query for one page of run history. */
|
|
553
561
|
export interface ListRunsQuery {
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a failed request that may create a run, a start or a blocking execute, may still have
|
|
3
|
+
* started one whose id never reached the caller. `ApiUnreachableError` and `ApiResponseError` read
|
|
4
|
+
* it when the client tells them their request may create a run, and carry the answer as
|
|
5
|
+
* `runMayHaveStarted`; the Python twin, `pipelex-sdk`, reads the same failures the same way in
|
|
6
|
+
* `pipelex_sdk.run_may_have_started`.
|
|
7
|
+
*
|
|
8
|
+
* The reading errs on the safe side. A false "may have started" costs the person a look at the run
|
|
9
|
+
* history; a false "did not start" costs a second paid run. So every failure counts as one that
|
|
10
|
+
* may have started a run unless it proves otherwise: a transport failure that proves nothing was
|
|
11
|
+
* sent, and an answer that says the request was refused before anything ran.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Whether an answer to a request that may create a run leaves one possibly started:
|
|
15
|
+
*
|
|
16
|
+
* - any `2xx`, which the client met only because it could not read it: the server accepted the
|
|
17
|
+
* request, and only its acknowledgement was lost;
|
|
18
|
+
* - a `408`, which a proxy in front of the platform may answer for a request it forwarded;
|
|
19
|
+
* - every `5xx` but a `501`, which says the deployment does not serve the route, and a `503`
|
|
20
|
+
* carrying the platform's code `pipeline_start_unavailable`, which says the runner was never
|
|
21
|
+
* reached: the server or a gateway failed while handling the request.
|
|
22
|
+
*
|
|
23
|
+
* Any other status is the request refused before anything ran.
|
|
24
|
+
*/
|
|
25
|
+
export declare function answerMayHaveStartedRun(status: number, code: string | undefined): boolean;
|
|
26
|
+
/**
|
|
27
|
+
* Whether a transport failure of a request that may create a run leaves one possibly started:
|
|
28
|
+
* every failure but one that proves nothing was sent. `cause` is the failure fetch threw, which
|
|
29
|
+
* `ApiUnreachableError` keeps as its own `cause`.
|
|
30
|
+
*/
|
|
31
|
+
export declare function transportMayHaveStartedRun(cause: unknown): boolean;
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Whether a failed request that may create a run, a start or a blocking execute, may still have
|
|
3
|
+
* started one whose id never reached the caller. `ApiUnreachableError` and `ApiResponseError` read
|
|
4
|
+
* it when the client tells them their request may create a run, and carry the answer as
|
|
5
|
+
* `runMayHaveStarted`; the Python twin, `pipelex-sdk`, reads the same failures the same way in
|
|
6
|
+
* `pipelex_sdk.run_may_have_started`.
|
|
7
|
+
*
|
|
8
|
+
* The reading errs on the safe side. A false "may have started" costs the person a look at the run
|
|
9
|
+
* history; a false "did not start" costs a second paid run. So every failure counts as one that
|
|
10
|
+
* may have started a run unless it proves otherwise: a transport failure that proves nothing was
|
|
11
|
+
* sent, and an answer that says the request was refused before anything ran.
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* The platform code of the `503` a start answers when the platform could not reach the runner at
|
|
15
|
+
* all: it finalized the run's row `FAILED` and started nothing. Every other `503`, the platform's
|
|
16
|
+
* `service_unavailable` included, can follow a run the runner already started.
|
|
17
|
+
*/
|
|
18
|
+
const START_UNAVAILABLE_CODE = "pipeline_start_unavailable";
|
|
19
|
+
/**
|
|
20
|
+
* Whether an answer to a request that may create a run leaves one possibly started:
|
|
21
|
+
*
|
|
22
|
+
* - any `2xx`, which the client met only because it could not read it: the server accepted the
|
|
23
|
+
* request, and only its acknowledgement was lost;
|
|
24
|
+
* - a `408`, which a proxy in front of the platform may answer for a request it forwarded;
|
|
25
|
+
* - every `5xx` but a `501`, which says the deployment does not serve the route, and a `503`
|
|
26
|
+
* carrying the platform's code `pipeline_start_unavailable`, which says the runner was never
|
|
27
|
+
* reached: the server or a gateway failed while handling the request.
|
|
28
|
+
*
|
|
29
|
+
* Any other status is the request refused before anything ran.
|
|
30
|
+
*/
|
|
31
|
+
export function answerMayHaveStartedRun(status, code) {
|
|
32
|
+
if (status >= 200 && status < 300)
|
|
33
|
+
return true;
|
|
34
|
+
if (status === 408)
|
|
35
|
+
return true;
|
|
36
|
+
if (status === 501)
|
|
37
|
+
return false;
|
|
38
|
+
if (status === 503 && code === START_UNAVAILABLE_CODE)
|
|
39
|
+
return false;
|
|
40
|
+
return status >= 500 && status < 600;
|
|
41
|
+
}
|
|
42
|
+
/**
|
|
43
|
+
* Whether a transport failure of a request that may create a run leaves one possibly started:
|
|
44
|
+
* every failure but one that proves nothing was sent. `cause` is the failure fetch threw, which
|
|
45
|
+
* `ApiUnreachableError` keeps as its own `cause`.
|
|
46
|
+
*/
|
|
47
|
+
export function transportMayHaveStartedRun(cause) {
|
|
48
|
+
return !provesNothingSent(cause);
|
|
49
|
+
}
|
|
50
|
+
/**
|
|
51
|
+
* Whether a transport failure proves the request never left, so that no run was created by it: it
|
|
52
|
+
* names a step of the connection's set-up, which no request follows. That is the name lookup or
|
|
53
|
+
* the connection itself failing (the system calls `getaddrinfo` and `connect`: an unknown host, a
|
|
54
|
+
* refused connection, no route to the host or the network, the system's connect time limit),
|
|
55
|
+
* undici's own connect time limit, which covers the TLS handshake, and a server certificate the
|
|
56
|
+
* TLS handshake refused. Several addresses each failing so, which Node reports together as an
|
|
57
|
+
* `AggregateError`, prove it too. A host that drops packets is a connection that never comes:
|
|
58
|
+
* undici gives it up after ten seconds (`UND_ERR_CONNECT_TIMEOUT`), before the time limit of any
|
|
59
|
+
* request that may create a run, as the Python SDK meets httpx's connect timeout first and reads
|
|
60
|
+
* it the same way.
|
|
61
|
+
*
|
|
62
|
+
* Anything else may have come once the request had left, the Python SDK reading the same failures
|
|
63
|
+
* the same way. A reset (`ECONNRESET`) comes from a `read` whether the connection dropped during
|
|
64
|
+
* the TLS handshake or after the request, and so does an `EHOSTUNREACH` met once connected, so
|
|
65
|
+
* neither proves anything; nor does another TLS failure, which may come after the handshake; nor
|
|
66
|
+
* does the SDK's own time limit (`ABORT_TIMEOUT`), which fetch cannot place before or after the
|
|
67
|
+
* connection was made; nor does a body that arrived and could not be decoded. Every request that
|
|
68
|
+
* may create a run has a limit longer than undici's connect limit, so with Node's own dispatcher
|
|
69
|
+
* it runs out only once the request has left.
|
|
70
|
+
*/
|
|
71
|
+
function provesNothingSent(fetchFailure) {
|
|
72
|
+
// undici gives the transport's own failure as the `cause` of fetch's.
|
|
73
|
+
return fetchFailure instanceof Error && isConnectionSetupFailure(fetchFailure.cause);
|
|
74
|
+
}
|
|
75
|
+
function isConnectionSetupFailure(failure) {
|
|
76
|
+
if (failure instanceof AggregateError) {
|
|
77
|
+
return failure.errors.length > 0 && failure.errors.every(isConnectionSetupFailure);
|
|
78
|
+
}
|
|
79
|
+
if (typeof failure !== "object" || failure === null)
|
|
80
|
+
return false;
|
|
81
|
+
const { code, syscall } = failure;
|
|
82
|
+
if (typeof code === "string" && CONNECTION_SETUP_CODES.has(code))
|
|
83
|
+
return true;
|
|
84
|
+
return typeof syscall === "string" && CONNECTION_SETUP_CALLS.has(syscall);
|
|
85
|
+
}
|
|
86
|
+
/** The system calls that resolve the host's name and open the connection. */
|
|
87
|
+
const CONNECTION_SETUP_CALLS = new Set(["getaddrinfo", "connect"]);
|
|
88
|
+
/**
|
|
89
|
+
* The codes only a step of the connection's set-up gives: the name lookup's and the connect call's
|
|
90
|
+
* own (set even where Node reports several addresses together, without a system call), undici's
|
|
91
|
+
* connect time limit, Node's limit on one attempt among several addresses, Node's own check of the
|
|
92
|
+
* host's name, and every code Node gives a server certificate the TLS handshake refused.
|
|
93
|
+
*/
|
|
94
|
+
const CONNECTION_SETUP_CODES = new Set([
|
|
95
|
+
"ECONNREFUSED",
|
|
96
|
+
"ENOTFOUND",
|
|
97
|
+
"EAI_AGAIN",
|
|
98
|
+
"UND_ERR_CONNECT_TIMEOUT",
|
|
99
|
+
"ERR_SOCKET_CONNECTION_TIMEOUT",
|
|
100
|
+
"ERR_TLS_CERT_ALTNAME_INVALID",
|
|
101
|
+
"ERR_TLS_CERT_ALTNAME_FORMAT",
|
|
102
|
+
// Node names the verdicts of OpenSSL's certificate check from a fixed table, the "X509 certificate
|
|
103
|
+
// error codes" of its `tls` docs, and gives every other verdict, such as an unhandled critical
|
|
104
|
+
// extension or a CA certificate that may not sign certificates, the code `UNSPECIFIED`. The
|
|
105
|
+
// error carries nothing else that marks it, so these codes are the mark: the table as Node 24
|
|
106
|
+
// compiles it, in its order, then its default. The Python SDK reads every
|
|
107
|
+
// `ssl.SSLCertVerificationError` the same way.
|
|
108
|
+
"UNABLE_TO_GET_ISSUER_CERT",
|
|
109
|
+
"UNABLE_TO_GET_CRL",
|
|
110
|
+
"UNABLE_TO_DECRYPT_CERT_SIGNATURE",
|
|
111
|
+
"UNABLE_TO_DECRYPT_CRL_SIGNATURE",
|
|
112
|
+
"UNABLE_TO_DECODE_ISSUER_PUBLIC_KEY",
|
|
113
|
+
"CERT_SIGNATURE_FAILURE",
|
|
114
|
+
"CRL_SIGNATURE_FAILURE",
|
|
115
|
+
"CERT_NOT_YET_VALID",
|
|
116
|
+
"CERT_HAS_EXPIRED",
|
|
117
|
+
"CRL_NOT_YET_VALID",
|
|
118
|
+
"CRL_HAS_EXPIRED",
|
|
119
|
+
"ERROR_IN_CERT_NOT_BEFORE_FIELD",
|
|
120
|
+
"ERROR_IN_CERT_NOT_AFTER_FIELD",
|
|
121
|
+
"ERROR_IN_CRL_LAST_UPDATE_FIELD",
|
|
122
|
+
"ERROR_IN_CRL_NEXT_UPDATE_FIELD",
|
|
123
|
+
"OUT_OF_MEM",
|
|
124
|
+
"DEPTH_ZERO_SELF_SIGNED_CERT",
|
|
125
|
+
"SELF_SIGNED_CERT_IN_CHAIN",
|
|
126
|
+
"UNABLE_TO_GET_ISSUER_CERT_LOCALLY",
|
|
127
|
+
"UNABLE_TO_VERIFY_LEAF_SIGNATURE",
|
|
128
|
+
"CERT_CHAIN_TOO_LONG",
|
|
129
|
+
"CERT_REVOKED",
|
|
130
|
+
"INVALID_CA",
|
|
131
|
+
"PATH_LENGTH_EXCEEDED",
|
|
132
|
+
"INVALID_PURPOSE",
|
|
133
|
+
"CERT_UNTRUSTED",
|
|
134
|
+
"CERT_REJECTED",
|
|
135
|
+
"HOSTNAME_MISMATCH",
|
|
136
|
+
"UNSPECIFIED",
|
|
137
|
+
]);
|
|
138
|
+
//# sourceMappingURL=run-may-have-started.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"run-may-have-started.js","sourceRoot":"","sources":["../src/run-may-have-started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CAAC;QAAE,OAAO,IAAI,CAAC;IAC9E,OAAO,OAAO,OAAO,KAAK,QAAQ,IAAI,sBAAsB,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;AAC5E,CAAC;AAED,6EAA6E;AAC7E,MAAM,sBAAsB,GAAwB,IAAI,GAAG,CAAC,CAAC,aAAa,EAAE,SAAS,CAAC,CAAC,CAAC;AAExF;;;;;GAKG;AACH,MAAM,sBAAsB,GAAwB,IAAI,GAAG,CAAC;IAC1D,cAAc;IACd,WAAW;IACX,WAAW;IACX,yBAAyB;IACzB,+BAA+B;IAC/B,8BAA8B;IAC9B,6BAA6B;IAC7B,mGAAmG;IACnG,+FAA+F;IAC/F,4FAA4F;IAC5F,8FAA8F;IAC9F,0EAA0E;IAC1E,+CAA+C;IAC/C,2BAA2B;IAC3B,mBAAmB;IACnB,kCAAkC;IAClC,iCAAiC;IACjC,oCAAoC;IACpC,wBAAwB;IACxB,uBAAuB;IACvB,oBAAoB;IACpB,kBAAkB;IAClB,mBAAmB;IACnB,iBAAiB;IACjB,gCAAgC;IAChC,+BAA+B;IAC/B,gCAAgC;IAChC,gCAAgC;IAChC,YAAY;IACZ,6BAA6B;IAC7B,2BAA2B;IAC3B,mCAAmC;IACnC,iCAAiC;IACjC,qBAAqB;IACrB,cAAc;IACd,YAAY;IACZ,sBAAsB;IACtB,iBAAiB;IACjB,gBAAgB;IAChB,eAAe;IACf,mBAAmB;IACnB,aAAa;CACd,CAAC,CAAC"}
|
package/dist/runs.d.ts
CHANGED
|
@@ -46,9 +46,16 @@ export interface RunPublic {
|
|
|
46
46
|
created_at: string;
|
|
47
47
|
finished_at?: string | null;
|
|
48
48
|
/**
|
|
49
|
-
* Why the run failed: the
|
|
50
|
-
* `
|
|
51
|
-
*
|
|
49
|
+
* Why the run failed: the stored error report as the platform serves it, the runner's STRICT
|
|
50
|
+
* projection, typed whole (see `RunErrorReport`). The runner writes it for a run that fails
|
|
51
|
+
* while it runs; the platform writes one in the runner's shape for a run it ends or settles
|
|
52
|
+
* itself — a workflow task that kept failing (`WorkflowTaskKeptFailingError`), a timeout
|
|
53
|
+
* (`RunTimedOutError`), a workflow that vanished (`RunWorkflowNotFoundError`). A cancelled,
|
|
54
|
+
* terminated or timed-out run holds a report when a completion callback carried one, and a
|
|
55
|
+
* timed-out run otherwise the platform's timeout report. `null` on a completed run and on a
|
|
56
|
+
* run that ended without a report — one whose start failed, a blocking `execute` run, one
|
|
57
|
+
* cancelled, terminated or given its status by hand with no completion callback carrying a
|
|
58
|
+
* report, one that ended before the platform wrote reports of its own; absent on a server that
|
|
52
59
|
* does not serve it. The results read of the same run carries the same object in its `409`,
|
|
53
60
|
* which is where `getRunResult`'s failed arm and `RunFailedError` take it from.
|
|
54
61
|
*/
|
|
@@ -70,15 +77,96 @@ export interface RunPublic {
|
|
|
70
77
|
[extension: string]: unknown;
|
|
71
78
|
}
|
|
72
79
|
/**
|
|
73
|
-
*
|
|
74
|
-
*
|
|
75
|
-
*
|
|
76
|
-
*
|
|
80
|
+
* Why a status read is `degraded` — `RunDegradation.reason`:
|
|
81
|
+
*
|
|
82
|
+
* - `status_unavailable`: the platform could not reach the workflow engine, so `status` is the
|
|
83
|
+
* last one recorded. It says nothing about the run itself, which may be fine; read again after
|
|
84
|
+
* `retry_after_seconds`.
|
|
85
|
+
* - `workflow_task_failing`: `status` is live, and the run is not making progress. The workflow
|
|
86
|
+
* task that drives it has failed `failed_attempts` times in a row since `failing_since`; the
|
|
87
|
+
* workflow engine keeps retrying it, and if it is still failing at `ends_at` the platform ends
|
|
88
|
+
* the run `FAILED` with a `WorkflowTaskKeptFailingError` report.
|
|
89
|
+
*
|
|
90
|
+
* Read open, as `RunDegradation.reason` types it: a reason a later platform adds arrives as its
|
|
91
|
+
* raw string rather than failing the read, and a consumer that does not know it should not tell
|
|
92
|
+
* the person the run is fine.
|
|
93
|
+
*/
|
|
94
|
+
export type DegradationReason = "status_unavailable" | "workflow_task_failing";
|
|
95
|
+
/**
|
|
96
|
+
* What a `degraded` status read means for this run — `RunRead.degradation`.
|
|
97
|
+
*
|
|
98
|
+
* Branch on `reason` (see `DegradationReason`), never on the wording of `message`. Each field is
|
|
99
|
+
* checked by the read: a known field whose value does not have its type is absent, and members
|
|
100
|
+
* this SDK does not name are relayed as sent.
|
|
101
|
+
*/
|
|
102
|
+
export interface RunDegradation {
|
|
103
|
+
/** Why the read is degraded: a `DegradationReason`, or the raw string of one this SDK does not know. */
|
|
104
|
+
reason: DegradationReason | (string & {});
|
|
105
|
+
/**
|
|
106
|
+
* What the platform says about it, in a sentence. For `workflow_task_failing` it says how many
|
|
107
|
+
* attempts have failed in a row, that the run is not making progress and when the platform will
|
|
108
|
+
* end it. It does not quote the worker's own failure text, which only a platform run locally
|
|
109
|
+
* with `ERROR_DISCLOSURE=verbose` adds. `failed_attempts` and `ends_at` carry the same facts as
|
|
110
|
+
* fields.
|
|
111
|
+
*/
|
|
112
|
+
message?: string | null;
|
|
113
|
+
/** How many times in a row the run's workflow task has failed; `null` for `status_unavailable`. */
|
|
114
|
+
failed_attempts?: number | null;
|
|
115
|
+
/**
|
|
116
|
+
* ISO-8601 instant of the first failure in the current run of failures. `null` when the
|
|
117
|
+
* platform could not find the recorded failure in the workflow's history, and always for
|
|
118
|
+
* `status_unavailable`.
|
|
119
|
+
*/
|
|
120
|
+
failing_since?: string | null;
|
|
121
|
+
/**
|
|
122
|
+
* ISO-8601 instant at which the platform ends the run `FAILED` if its workflow task is still
|
|
123
|
+
* failing. `null` when the platform could not find the recorded failure: it then does not end
|
|
124
|
+
* the run itself, and the run's own time limit ends it `TIMED_OUT`. Always `null` for
|
|
125
|
+
* `status_unavailable`.
|
|
126
|
+
*/
|
|
127
|
+
ends_at?: string | null;
|
|
128
|
+
/** Members a later platform adds. */
|
|
129
|
+
[extension: string]: unknown;
|
|
130
|
+
}
|
|
131
|
+
/**
|
|
132
|
+
* A run read through the self-healing status path (`RunPublic` + `degraded`, `degradation`,
|
|
133
|
+
* `request_id` and the `Retry-After` hint).
|
|
134
|
+
*
|
|
135
|
+
* `degraded` is true when the read is not a plain fresh reading of a healthy run, and
|
|
136
|
+
* `degradation.reason` says which of two things holds (see `DegradationReason`): the platform
|
|
137
|
+
* could not reach the workflow engine and `status` is the last one recorded
|
|
138
|
+
* (`status_unavailable`, paired with `retry_after_seconds`), or `status` is live and the run is
|
|
139
|
+
* stuck, its workflow task failing until the platform ends it (`workflow_task_failing`). So
|
|
140
|
+
* `degraded` alone no longer means the run is fine. A platform older than the degradation sends
|
|
141
|
+
* `degraded` with no `degradation`; read that as `status_unavailable`, the only meaning `degraded`
|
|
142
|
+
* had then.
|
|
77
143
|
*/
|
|
78
144
|
export interface RunRead extends RunPublic {
|
|
79
145
|
degraded: boolean;
|
|
146
|
+
/**
|
|
147
|
+
* What `degraded` means for this run; `null` whenever `degraded` is false, and absent on a
|
|
148
|
+
* platform that predates it. Checked field by field, and `null` when it is not an object or its
|
|
149
|
+
* `reason` is not a string (see `RunDegradation`).
|
|
150
|
+
*/
|
|
151
|
+
degradation?: RunDegradation | null;
|
|
152
|
+
/**
|
|
153
|
+
* The id of the request that started the run — the one to quote to support. `null` for a run
|
|
154
|
+
* saved before the platform recorded it; absent on a server that does not serve it.
|
|
155
|
+
*/
|
|
156
|
+
request_id?: string | null;
|
|
157
|
+
/** The `Retry-After` header's delay, in seconds; set when the platform sent one. */
|
|
80
158
|
retry_after_seconds?: number | null;
|
|
81
159
|
}
|
|
160
|
+
/**
|
|
161
|
+
* A status read's `degradation`, checked field by field so that it never fails the poll carrying
|
|
162
|
+
* it: a value that is not an object, or whose `reason` is not a string, reads as `null`, since a
|
|
163
|
+
* degradation without a reason cannot be branched on; `message`, `failing_since` and `ends_at` are
|
|
164
|
+
* kept when they are strings and `failed_attempts` when it is an integer, `null` kept for each;
|
|
165
|
+
* members this SDK does not name are relayed as sent.
|
|
166
|
+
*
|
|
167
|
+
* Internal: `getRunStatus` applies it.
|
|
168
|
+
*/
|
|
169
|
+
export declare function readRunDegradation(value: unknown): RunDegradation | null;
|
|
82
170
|
/**
|
|
83
171
|
* One inference call's token usage — the client-facing wire record.
|
|
84
172
|
*
|
package/dist/runs.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { RequestArgumentError, RunFailedError, RunTimeoutError } from "./errors.js";
|
|
2
2
|
import { MAX_TIMER_DELAY_MS } from "./timers.js";
|
|
3
|
+
import { dropUnfit, isPlainObject } from "./error-models.js";
|
|
3
4
|
const TERMINAL_RUN_STATUSES = new Set([
|
|
4
5
|
"COMPLETED",
|
|
5
6
|
"FAILED",
|
|
@@ -15,6 +16,23 @@ export function isTerminalRunStatus(status) {
|
|
|
15
16
|
export function isSuccessRunStatus(status) {
|
|
16
17
|
return status === "COMPLETED";
|
|
17
18
|
}
|
|
19
|
+
/**
|
|
20
|
+
* A status read's `degradation`, checked field by field so that it never fails the poll carrying
|
|
21
|
+
* it: a value that is not an object, or whose `reason` is not a string, reads as `null`, since a
|
|
22
|
+
* degradation without a reason cannot be branched on; `message`, `failing_since` and `ends_at` are
|
|
23
|
+
* kept when they are strings and `failed_attempts` when it is an integer, `null` kept for each;
|
|
24
|
+
* members this SDK does not name are relayed as sent.
|
|
25
|
+
*
|
|
26
|
+
* Internal: `getRunStatus` applies it.
|
|
27
|
+
*/
|
|
28
|
+
export function readRunDegradation(value) {
|
|
29
|
+
if (!isPlainObject(value) || typeof value.reason !== "string")
|
|
30
|
+
return null;
|
|
31
|
+
const degradation = { ...value };
|
|
32
|
+
dropUnfit(degradation, ["message", "failing_since", "ends_at"], (field) => typeof field === "string");
|
|
33
|
+
dropUnfit(degradation, ["failed_attempts"], Number.isInteger);
|
|
34
|
+
return degradation;
|
|
35
|
+
}
|
|
18
36
|
// ── Results artifact selection ───────────────────────────────────
|
|
19
37
|
/**
|
|
20
38
|
* The result artifacts a results read can be narrowed to, in the platform's order. Passing some
|
package/dist/runs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"runs.js","sourceRoot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flatness — the SDK has one cli
|
|
|
99
99
|
- `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.
|
|
100
100
|
- `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`.
|
|
101
101
|
- `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.
|
|
102
|
-
- `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).
|
|
102
|
+
- `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. The base also carries `runMayHaveStarted`, false unless a request that may create a run failed in a way that may have started one, and `runMayHaveStartedOf` reads it structurally the same way. 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).
|
|
103
103
|
- `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 drives its own code through the identical copy `make shared-files` writes.
|
|
104
|
+
- `run-may-have-started.ts` — the **pure** reading of whether a failed request that may create a run may still have started one: `answerMayHaveStartedRun(status, code)` for an answer and `transportMayHaveStartedRun(cause)` for a transport failure, every failure counting unless it proves otherwise (a failure of the connection's set-up, a `501`, the platform's `503` coded `pipeline_start_unavailable`, or any status that refuses the request). The client marks the requests that may create a run, `start` and the blocking `execute`, with a `RunCreation` flag it threads through `requestRaw`, `readObjectAnswer` and its error helpers into the constructors of `ApiUnreachableError` and `ApiResponseError`, which apply the reading and carry the answer as `runMayHaveStarted`, forcing `retryable` false when it is true; nothing changes an error after it is thrown. The Python twin is `pipelex_sdk/run_may_have_started.py`. See [errors.md](./errors.md#a-failed-run-start--runmayhavestarted).
|
|
104
105
|
- `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).
|
|
105
106
|
- `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.
|
|
106
107
|
- `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.
|
|
@@ -117,7 +118,7 @@ Flat `src/` (mirrors `mthds-js`'s `runners/api` flatness — the SDK has one cli
|
|
|
117
118
|
- **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).
|
|
118
119
|
- **Model reference check (`/v1/models/check`):** `checkModelReference(reference, category?)`, a Pipelex API extension served by any `pipelex-api` runner from pipelex 0.78.0 and on the hosted API, whose platform relays it byte-identically. It is a **diagnostic endpoint** like `validate`: a reference that resolves nowhere is a `200` verdict with `resolution: "not_found"` and the names the caller may have meant (`suggestions`, `other_kinds`, `other_categories`), never a thrown error. Only a request that cannot produce a verdict throws `ApiResponseError`, a `422` typed by its `errorType`: `InvalidModelReference` for a reference that is blank, a sigil or a namespace alone, or past the runner's length limit, `InvalidModelCategory` for an unknown `type`, `ValidationError` for a missing or repeated parameter. The SDK validates none of it, so the runner's rule is the only one. `ModelReferenceVerdict` is a union of one arm per reference kind, discriminated on the wire's own `kind` (`PresetReferenceVerdict`, `AliasReferenceVerdict`, `WaterfallReferenceVerdict`, `HandleReferenceVerdict`): a `matches` entry carries no kind of its own, but every entry of one verdict shares the verdict's, so narrowing on `kind` types `matches` as `PresetMatch[]`, `AliasMatch[]`, `WaterfallMatch[]` or `HandleMatch[]` without a field the wire does not carry. `ModelCheckCategory` is the protocol's model categories plus `doc_gen`, the family of `PipeDocGen`, which the protocol and so `models` leave out but a method's `model` field can name. `resolution` is typed open, `ModelReferenceResolution | (string & {})`, under the spec's reader rule that a client reading a value it does not know treats the reference as unresolved, and so is every category a verdict names, `ModelCheckCategory | (string & {})` as `mthds` types `ModelInfo.type`, since a runner of a later version may add one; the `category` a request names stays closed. A match's `resolves_to` is `null` when the reference resolves by name but a run through it would reach no model the runner can call, which a consumer shows as a warning rather than as an unknown name.
|
|
119
120
|
- **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.
|
|
120
|
-
- **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). The handshake's outcome is cached for the client's lifetime, under the rule the Python SDK follows too: an answer that is not a usable version assumes hosted and lets the start surface the real error, while no answer at all throws its `ApiUnreachableError` at once, caches nothing and sends no start. An answer is anything the server sent back: an error status, a body that is not JSON, not UTF-8 or no version, and a body that arrived but could not be decoded, such as a broken gzip stream, which fetch fails with the decompressor's code (`Z_DATA_ERROR` and the other zlib codes, brotli's `ERR__ERROR_…`, zstd's `ZSTD_error_…`). 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).
|
|
121
|
+
- **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). The handshake's outcome is cached for the client's lifetime, under the rule the Python SDK follows too: an answer that is not a usable version assumes hosted and lets the start surface the real error, while no answer at all throws its `ApiUnreachableError` at once, caches nothing and sends no start. An answer is anything the server sent back: an error status, a body that is not JSON, not UTF-8 or no version, and a body that arrived but could not be decoded, such as a broken gzip stream, which fetch fails with the decompressor's code (`Z_DATA_ERROR` and the other zlib codes, brotli's `ERR__ERROR_…`, zstd's `ZSTD_error_…`). 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). The status read also carries `degraded` and the `degradation` that explains it, whose `reason` tells a status the platform could not refresh (`status_unavailable`) from a run whose workflow task keeps failing until the platform ends it (`workflow_task_failing`), checked field by field so it never fails the poll, and the run's `request_id`, the id to quote to support. See [run-results.md](./run-results.md#a-degraded-status--degraded-and-degradation). 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).
|
|
121
122
|
- **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.
|
|
122
123
|
|
|
123
124
|
### Product routes (hosted management surface)
|
package/docs/cli.md
CHANGED
|
@@ -79,7 +79,7 @@ Every error goes to stderr, its first line `Error: <sentence>` and the lines und
|
|
|
79
79
|
- **An unreachable API**: `Error: could not reach the Pipelex API at <base URL> (<code>).`
|
|
80
80
|
- **A failed upload** of a file the inputs name: `Error: the upload of "<file>" failed (status <n>).`, the status left out when no answer came back, then `Reason: <the SDK's message>`, which says what the status means for an upload (a file past the size limit, a deployment without file upload, a credential refused), and `Next step:` and `Request id:` when the API's answer carries them. It covers the SDK's `RejectedAssetError`, `UploadAuthenticationError`, `UnsupportedUploadCapabilityError` and `UploadTransportError`, each of which names the file it was sending. It exits `1`, and no run starts.
|
|
81
81
|
- **A wait that fails once the run exists**, on an unreachable API, a refused poll or an answer the command cannot read: the failure's own lines, then `Run <id> may still be going on the server, so do not start it again.`, since the run was started and nothing says it ended. A run that ended in failure (`RunFailedError`) and a run that ended without its main output (`MissingMainStuffError`) get no such line. It exits `1`.
|
|
82
|
-
- **A start whose outcome is unknown**: once a request that may create a run
|
|
82
|
+
- **A start whose outcome is unknown**: once the command has reached a request that may create a run, the start or a bare runner's blocking execute, and before the API names the run, a failure the SDK reads as one that may have started a run, its error's `runMayHaveStarted` ([`errors.md`](errors.md#a-failed-run-start--runmayhavestarted)), adds `A run may have started on the server without the command learning of it, so check before starting it again.` under its own lines. That is an answer the command cannot read, a `408`, which a proxy in front of the platform may answer for a request it forwarded, any `5xx` but a `501` and the platform's `503` with the code `pipeline_start_unavailable`, which says the runner was never reached, a request the gateway cut off, and a transport failure that does not prove the request never left, such as an answer lost to a time limit or to a connection that closed once the request had left. Timing plays no part: a `503` or `504` that came back at once reads the same as one at the gateway's limit, since the platform can answer a `503` after the runner has started the run. Any other answer from the API, and a transport failure that proves the request never left, add nothing, since no run was created. Such a failure names a step of the connection's set-up, which no request follows: an unknown host (`ENOTFOUND`, `EAI_AGAIN`), a refused connection (`ECONNREFUSED`, from every address the host has included), no route to the host or to the network (`EHOSTUNREACH`, `ENETUNREACH`, from the `connect` call), the connection given up by the system's or undici's own connect time limit (`ETIMEDOUT` from `connect`, `UND_ERR_CONNECT_TIMEOUT`), a server certificate the TLS handshake refused (`CERT_HAS_EXPIRED`, `DEPTH_ZERO_SELF_SIGNED_CERT`, `ERR_TLS_CERT_ALTNAME_INVALID` and the other verdicts of the certificate's check Node names, then `UNSPECIFIED`, its code for every verdict it does not name, such as an unhandled critical extension). Both commands read the same failures the same way, each through its SDK's member, so where one command cannot tell whether the request had left, both take the reading that a run may exist: a connection dropped during the TLS handshake, which Node reports as the reset (`ECONNRESET`) of a connection dropped once the request had left, and another TLS failure. A host that drops packets is a connection that never comes, and each command meets its transport's connect time limit first, which proves nothing was sent: here undici's own, ten seconds for the TCP connect and the TLS handshake together (`UND_ERR_CONNECT_TIMEOUT`), which runs out before the SDK's own time limit (`ABORT_TIMEOUT`), at least 30 seconds on every request the command sends; in the Python command, httpx's connect timeout, which the one time limit the Python client passes bounds. Fetch cannot say whether the SDK's own time limit ran out before the connection was made or once the request had left, so the command reads it as an answer lost to a time limit; with Node's own dispatcher it is one, since undici gives up a connection that does not come sooner. It exits `1`.
|
|
83
83
|
|
|
84
84
|
The checks that need no request come first, so a mistake costs nothing. `run` checks, in this order, its flags, `--pipe`'s form, the method (reading a path from disk), the inputs, the poll interval, the key and the base URL. `script` checks its flags, `--pipe`'s form, a control character in any value, the method's form, `--name`, `--dir`, the target file when its name is already known, the key and the base URL. The flags are read in command-line order and the first problem is the one reported: `--help` or `-h` anywhere before the `--` that ends the options asks for the help whatever else is there, and an argument that is exactly one of the two is never taken as a flag's value, so `run --method --help` prints the help, and so does `run --pipe -- --help`, where the `--` is `--pipe`'s value and ends nothing; an unknown option or a positional argument is refused; a flag given twice is refused rather than the last one winning; a string flag needs a non-empty value, given as the next argument or after `=`, and a next argument starting with `-` is not taken as one, except `-` alone, which `--inputs` reads as stdin. Before a subcommand, `--help` prints the command's help whatever follows it, as a subcommand's does, while `--version` must stand alone: `pipelex-sdk --version run …` is a usage error, since printing the version would leave the rest of the command line unanswered.
|
|
85
85
|
|