@pipelex/sdk 0.45.0 → 0.46.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/cli/script.d.ts +1 -1
- package/dist/client.d.ts +14 -2
- package/dist/client.js +52 -25
- package/dist/client.js.map +1 -1
- package/dist/error-models.d.ts +6 -6
- package/dist/error-verdicts.d.ts +10 -0
- package/dist/error-verdicts.js +38 -0
- package/dist/error-verdicts.js.map +1 -1
- package/dist/errors.d.ts +53 -19
- package/dist/errors.js +97 -33
- package/dist/errors.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +40 -31
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +3 -3
- package/docs/errors.md +6 -5
- package/package.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"error-verdicts.js","sourceRoot":"","sources":["../src/error-verdicts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;
|
|
1
|
+
{"version":3,"file":"error-verdicts.js","sourceRoot":"","sources":["../src/error-verdicts.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK7D,MAAM,KAAK,GAAiB,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AACtF,MAAM,MAAM,GAAiB,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;AACxF,MAAM,SAAS,GAAiB,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;AAC3F,MAAM,KA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,OAAO,EAAE,QAAQ;IACjB,QAAQ,EAAE,QAAQ;IAClB,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC;AAEH;;;;GAIG;AACH,MAAM,YAAY,GAA4C,MAAM,CAAC,MAAM,CAAC;IAC1E,GAAG,EAAE,IAAI;IACT,EAAE,EAAE,KAAK;IACT,eAAe,EAAE,KAAK;CACvB,CAAC,CAAC;AAEH;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc,CAAC,OAAmD;IAChF,OAAO;QACL,WAAW,EAAE,eAAe,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC;QACpD,SAAS,EAAE,YAAY,CAAC,YAAY,CAAC,OAAO,CAAC,CAAC;KAC/C,CAAC;AACJ,CAAC"}
|
package/dist/errors.d.ts
CHANGED
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* the family, `CodegenLockError`, declares the verdict's two members itself.
|
|
8
8
|
*/
|
|
9
9
|
import { PipelineRequestError } from "mthds/protocol";
|
|
10
|
+
import type { AnswerHeaders, Problem } from "mthds/protocol";
|
|
10
11
|
import type { ValidationErrorItem } from "./models.js";
|
|
11
12
|
import type { ArtifactScope, DownloadArtifactsResult } from "./artifacts.js";
|
|
12
13
|
import type { FieldError, MigrationErrorBlock, ProblemDetails, ProviderErrorMetadata, RunErrorReport, UserAction } from "./error-models.js";
|
|
@@ -76,15 +77,18 @@ export declare abstract class PipelexRequestError extends PipelineRequestError i
|
|
|
76
77
|
}
|
|
77
78
|
/**
|
|
78
79
|
* The verdict of anything a `catch` holds: the pair from an `Error` carrying a boolean
|
|
79
|
-
* `retryable` and a known `errorDomain`,
|
|
80
|
+
* `retryable` and a known `errorDomain`, else the verdict of the MTHDS standard's problem an
|
|
81
|
+
* `Error` carries as `problem`, and `undefined` otherwise.
|
|
80
82
|
*
|
|
81
83
|
* The check is structural rather than `instanceof`, so it reads every error of this SDK, of
|
|
82
|
-
* another copy of it installed beside this one, of a consumer's own subclass
|
|
83
|
-
* `
|
|
84
|
-
*
|
|
85
|
-
*
|
|
86
|
-
*
|
|
87
|
-
*
|
|
84
|
+
* another copy of it installed beside this one, and of a consumer's own subclass. An error of the
|
|
85
|
+
* standard's own client (`mthds`) carries its verdict on its problem, as `domain` and `retry` in
|
|
86
|
+
* the standard's vocabulary, and reads as that problem's verdict in this SDK's
|
|
87
|
+
* (`problemVerdict`), whatever the runner's body held beside it. `undefined` means the error
|
|
88
|
+
* carries no verdict: the `RangeError` or `TypeError` the SDK raises for an argument of the
|
|
89
|
+
* wrong type or range before any request is sent (a bug in the calling code), the caller's own
|
|
90
|
+
* abort, which the client rethrows untouched, or anything else a `try` block threw. An argument
|
|
91
|
+
* the client refuses for what it asks is a `RequestArgumentError`, which carries one.
|
|
88
92
|
*/
|
|
89
93
|
export declare function errorVerdictOf(err: unknown): ErrorVerdict | undefined;
|
|
90
94
|
/**
|
|
@@ -634,15 +638,21 @@ export type MethodErrorCode = "method_update_conflict" | "method_being_deleted"
|
|
|
634
638
|
*/
|
|
635
639
|
export type IdempotencyErrorCode = "idempotency_key_in_use";
|
|
636
640
|
/**
|
|
637
|
-
* The last constructor argument of `ApiResponseError`: the error's `cause`, the problem
|
|
638
|
-
* document's typed members, the decoded document whole,
|
|
639
|
-
* answer may create a run.
|
|
640
|
-
* `problemDocument` and `mayStartRun`.
|
|
641
|
+
* The last constructor argument of `ApiResponseError`: the error's `cause`, the hosted problem
|
|
642
|
+
* document's typed members, the decoded document whole, the answer's headers, and whether the
|
|
643
|
+
* request that met the answer may create a run.
|
|
641
644
|
*/
|
|
642
645
|
export interface ApiResponseErrorOptions {
|
|
643
646
|
cause?: unknown;
|
|
644
|
-
problem
|
|
647
|
+
/** The hosted problem document's typed members, as the client parsed them. */
|
|
648
|
+
details?: ProblemDetails;
|
|
645
649
|
problemDocument?: Record<string, unknown>;
|
|
650
|
+
/**
|
|
651
|
+
* The answer's headers, which the standard's reading takes a `Retry-After` from (see
|
|
652
|
+
* `ApiResponseError.problem`). The client passes them; a consumer building the error by hand
|
|
653
|
+
* may leave them out.
|
|
654
|
+
*/
|
|
655
|
+
headers?: AnswerHeaders;
|
|
646
656
|
/**
|
|
647
657
|
* The request was a `start` or an `execute`, so the answer is read for whether it may have
|
|
648
658
|
* started a run (see `ApiResponseError.runMayHaveStarted`). The client sets it on those two
|
|
@@ -656,9 +666,10 @@ export interface ApiResponseErrorOptions {
|
|
|
656
666
|
* non-2xx refusal, with its problem document parsed, or a 2xx answer the SDK could not read —
|
|
657
667
|
* a body that is not JSON, JSON that is not the object the route answers, or a stored method
|
|
658
668
|
* whose `python` field is not the serialized file list. The second carries the answer's status
|
|
659
|
-
* and raw text, no problem member, what made it unreadable as `cause` (the parse failure,
|
|
660
|
-
* `mthds`'s refusal of the `python` field),
|
|
661
|
-
* not retryable
|
|
669
|
+
* and raw text, no hosted problem member, what made it unreadable as `cause` (the parse failure,
|
|
670
|
+
* or `mthds`'s refusal of the `python` field), the verdict the fallback gives a 2xx (`runtime`,
|
|
671
|
+
* not retryable), and as `problem` the standard's reading of such an answer:
|
|
672
|
+
* `client.response_unreadable`, or `client.outcome_unknown` on a request that may create a run.
|
|
662
673
|
*
|
|
663
674
|
* Every error the hosted API answers is an RFC 9457 `application/problem+json` document, and
|
|
664
675
|
* this error carries its members as typed fields, each `undefined` when the document did not
|
|
@@ -704,13 +715,27 @@ export interface ApiResponseErrorOptions {
|
|
|
704
715
|
* - **Per-item failures.** `errors` is the platform's field-level list (`field`, `code`,
|
|
705
716
|
* `detail`), and `validationErrors` the structured diagnostics of a bundle that failed
|
|
706
717
|
* validation.
|
|
718
|
+
* - **The standard's reading.** `problem` is the same answer read as the MTHDS standard reads
|
|
719
|
+
* it, the problem `mthds`'s own `ApiResponseError` carries: the body itself when it is a core
|
|
720
|
+
* problem document, and otherwise the problem its status reads as (`readAnswer` in
|
|
721
|
+
* `mthds/protocol`), except on a request that may create a run, where `runMayHaveStarted`
|
|
722
|
+
* decides: `client.outcome_unknown` for every answer that leaves a run possibly started, a core
|
|
723
|
+
* problem document's body included. Branch on `problem.code` to handle this SDK's errors and the
|
|
724
|
+
* standard client's alike. The hosted plane's problem documents predate the core registry, so
|
|
725
|
+
* for them `problem` says little; the members above are read from the hosted document as they
|
|
726
|
+
* always were, and those the standard names its own way do not collide with it: `code` is the
|
|
727
|
+
* platform's code beside the registry's `problem.code`, and `errors` the platform's field
|
|
728
|
+
* errors beside the problem items of `problem.errors`.
|
|
707
729
|
*
|
|
708
730
|
* `problemDocument` is the decoded document whole, so a member this SDK does not name stays
|
|
709
731
|
* reachable without re-parsing `responseBody`, which is the raw text; it is `undefined` when
|
|
710
|
-
* the body was not a JSON object.
|
|
711
|
-
*
|
|
712
|
-
*
|
|
713
|
-
* `
|
|
732
|
+
* the body was not a JSON object.
|
|
733
|
+
*
|
|
734
|
+
* The error is a `PipelineRequestError`, as every error of this SDK is, rather than the
|
|
735
|
+
* standard's `ProblemError`: a `ProblemError`'s `code` is the registry's and its message the
|
|
736
|
+
* problem's sentence, while this error's `code` is the platform's and its message names the
|
|
737
|
+
* route and the hosted document's `detail`, so it carries the standard's reading as `problem`
|
|
738
|
+
* instead.
|
|
714
739
|
*/
|
|
715
740
|
export declare class ApiResponseError extends PipelexRequestError {
|
|
716
741
|
readonly apiUrl: string;
|
|
@@ -786,5 +811,14 @@ export declare class ApiResponseError extends PipelexRequestError {
|
|
|
786
811
|
* populated list — fall back to `serverMessage` when this is empty.
|
|
787
812
|
*/
|
|
788
813
|
readonly validationErrors: ValidationErrorItem[] | undefined;
|
|
814
|
+
/**
|
|
815
|
+
* The answer read as the MTHDS standard reads it, the problem `mthds`'s own client carries,
|
|
816
|
+
* agreeing with `runMayHaveStarted`: `client.outcome_unknown` where a run may have started,
|
|
817
|
+
* whatever the body, and where none started the body when it is a core problem document,
|
|
818
|
+
* otherwise the reading of an answer to a request that creates no run.
|
|
819
|
+
* Built from the constructor's arguments, so an error a consumer builds by hand carries the
|
|
820
|
+
* reading the client would give it.
|
|
821
|
+
*/
|
|
822
|
+
readonly problem: Problem;
|
|
789
823
|
constructor(message: string, apiUrl: string, status: number, statusText: string, responseBody: string, errorType: string | undefined, serverMessage: string | undefined, validationErrors: ValidationErrorItem[] | undefined, code: string | undefined, options?: ApiResponseErrorOptions);
|
|
790
824
|
}
|
package/dist/errors.js
CHANGED
|
@@ -6,8 +6,9 @@
|
|
|
6
6
|
* whether a failed start or execute may still have started a run. The one exported error outside
|
|
7
7
|
* the family, `CodegenLockError`, declares the verdict's two members itself.
|
|
8
8
|
*/
|
|
9
|
-
import { PipelineRequestError } from "mthds/protocol";
|
|
10
|
-
import {
|
|
9
|
+
import { PipelineRequestError, buildProblem, isProblem, parseJsonBody, readAnswer, unreadableAnswer, } from "mthds/protocol";
|
|
10
|
+
import { isPlainObject } from "./error-models.js";
|
|
11
|
+
import { fallbackVerdict, problemVerdict } from "./error-verdicts.js";
|
|
11
12
|
import { answerMayHaveStartedRun, transportMayHaveStartedRun } from "./run-may-have-started.js";
|
|
12
13
|
export { PipelineRequestError };
|
|
13
14
|
const ERROR_DOMAINS = new Set(["input", "config", "runtime"]);
|
|
@@ -58,23 +59,27 @@ export class PipelexRequestError extends PipelineRequestError {
|
|
|
58
59
|
}
|
|
59
60
|
/**
|
|
60
61
|
* The verdict of anything a `catch` holds: the pair from an `Error` carrying a boolean
|
|
61
|
-
* `retryable` and a known `errorDomain`,
|
|
62
|
+
* `retryable` and a known `errorDomain`, else the verdict of the MTHDS standard's problem an
|
|
63
|
+
* `Error` carries as `problem`, and `undefined` otherwise.
|
|
62
64
|
*
|
|
63
65
|
* The check is structural rather than `instanceof`, so it reads every error of this SDK, of
|
|
64
|
-
* another copy of it installed beside this one, of a consumer's own subclass
|
|
65
|
-
* `
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
*
|
|
69
|
-
*
|
|
66
|
+
* another copy of it installed beside this one, and of a consumer's own subclass. An error of the
|
|
67
|
+
* standard's own client (`mthds`) carries its verdict on its problem, as `domain` and `retry` in
|
|
68
|
+
* the standard's vocabulary, and reads as that problem's verdict in this SDK's
|
|
69
|
+
* (`problemVerdict`), whatever the runner's body held beside it. `undefined` means the error
|
|
70
|
+
* carries no verdict: the `RangeError` or `TypeError` the SDK raises for an argument of the
|
|
71
|
+
* wrong type or range before any request is sent (a bug in the calling code), the caller's own
|
|
72
|
+
* abort, which the client rethrows untouched, or anything else a `try` block threw. An argument
|
|
73
|
+
* the client refuses for what it asks is a `RequestArgumentError`, which carries one.
|
|
70
74
|
*/
|
|
71
75
|
export function errorVerdictOf(err) {
|
|
72
76
|
if (!(err instanceof Error))
|
|
73
77
|
return undefined;
|
|
74
|
-
const { retryable, errorDomain } = err;
|
|
75
|
-
if (typeof retryable
|
|
76
|
-
return
|
|
77
|
-
|
|
78
|
+
const { retryable, errorDomain, problem } = err;
|
|
79
|
+
if (typeof retryable === "boolean" && isErrorDomain(errorDomain)) {
|
|
80
|
+
return { retryable, errorDomain };
|
|
81
|
+
}
|
|
82
|
+
return isProblem(problem) ? problemVerdict(problem) : undefined;
|
|
78
83
|
}
|
|
79
84
|
/**
|
|
80
85
|
* Whether anything a `catch` holds is a failed run start that may still have started a run: true
|
|
@@ -671,9 +676,10 @@ export class PagingNotTerminatingError extends PipelexRequestError {
|
|
|
671
676
|
* non-2xx refusal, with its problem document parsed, or a 2xx answer the SDK could not read —
|
|
672
677
|
* a body that is not JSON, JSON that is not the object the route answers, or a stored method
|
|
673
678
|
* whose `python` field is not the serialized file list. The second carries the answer's status
|
|
674
|
-
* and raw text, no problem member, what made it unreadable as `cause` (the parse failure,
|
|
675
|
-
* `mthds`'s refusal of the `python` field),
|
|
676
|
-
* not retryable
|
|
679
|
+
* and raw text, no hosted problem member, what made it unreadable as `cause` (the parse failure,
|
|
680
|
+
* or `mthds`'s refusal of the `python` field), the verdict the fallback gives a 2xx (`runtime`,
|
|
681
|
+
* not retryable), and as `problem` the standard's reading of such an answer:
|
|
682
|
+
* `client.response_unreadable`, or `client.outcome_unknown` on a request that may create a run.
|
|
677
683
|
*
|
|
678
684
|
* Every error the hosted API answers is an RFC 9457 `application/problem+json` document, and
|
|
679
685
|
* this error carries its members as typed fields, each `undefined` when the document did not
|
|
@@ -719,13 +725,27 @@ export class PagingNotTerminatingError extends PipelexRequestError {
|
|
|
719
725
|
* - **Per-item failures.** `errors` is the platform's field-level list (`field`, `code`,
|
|
720
726
|
* `detail`), and `validationErrors` the structured diagnostics of a bundle that failed
|
|
721
727
|
* validation.
|
|
728
|
+
* - **The standard's reading.** `problem` is the same answer read as the MTHDS standard reads
|
|
729
|
+
* it, the problem `mthds`'s own `ApiResponseError` carries: the body itself when it is a core
|
|
730
|
+
* problem document, and otherwise the problem its status reads as (`readAnswer` in
|
|
731
|
+
* `mthds/protocol`), except on a request that may create a run, where `runMayHaveStarted`
|
|
732
|
+
* decides: `client.outcome_unknown` for every answer that leaves a run possibly started, a core
|
|
733
|
+
* problem document's body included. Branch on `problem.code` to handle this SDK's errors and the
|
|
734
|
+
* standard client's alike. The hosted plane's problem documents predate the core registry, so
|
|
735
|
+
* for them `problem` says little; the members above are read from the hosted document as they
|
|
736
|
+
* always were, and those the standard names its own way do not collide with it: `code` is the
|
|
737
|
+
* platform's code beside the registry's `problem.code`, and `errors` the platform's field
|
|
738
|
+
* errors beside the problem items of `problem.errors`.
|
|
722
739
|
*
|
|
723
740
|
* `problemDocument` is the decoded document whole, so a member this SDK does not name stays
|
|
724
741
|
* reachable without re-parsing `responseBody`, which is the raw text; it is `undefined` when
|
|
725
|
-
* the body was not a JSON object.
|
|
726
|
-
*
|
|
727
|
-
*
|
|
728
|
-
* `
|
|
742
|
+
* the body was not a JSON object.
|
|
743
|
+
*
|
|
744
|
+
* The error is a `PipelineRequestError`, as every error of this SDK is, rather than the
|
|
745
|
+
* standard's `ProblemError`: a `ProblemError`'s `code` is the registry's and its message the
|
|
746
|
+
* problem's sentence, while this error's `code` is the platform's and its message names the
|
|
747
|
+
* route and the hosted document's `detail`, so it carries the standard's reading as `problem`
|
|
748
|
+
* instead.
|
|
729
749
|
*/
|
|
730
750
|
export class ApiResponseError extends PipelexRequestError {
|
|
731
751
|
apiUrl;
|
|
@@ -801,8 +821,17 @@ export class ApiResponseError extends PipelexRequestError {
|
|
|
801
821
|
* populated list — fall back to `serverMessage` when this is empty.
|
|
802
822
|
*/
|
|
803
823
|
validationErrors;
|
|
824
|
+
/**
|
|
825
|
+
* The answer read as the MTHDS standard reads it, the problem `mthds`'s own client carries,
|
|
826
|
+
* agreeing with `runMayHaveStarted`: `client.outcome_unknown` where a run may have started,
|
|
827
|
+
* whatever the body, and where none started the body when it is a core problem document,
|
|
828
|
+
* otherwise the reading of an answer to a request that creates no run.
|
|
829
|
+
* Built from the constructor's arguments, so an error a consumer builds by hand carries the
|
|
830
|
+
* reading the client would give it.
|
|
831
|
+
*/
|
|
832
|
+
problem;
|
|
804
833
|
constructor(message, apiUrl, status, statusText, responseBody, errorType, serverMessage, validationErrors, code, options) {
|
|
805
|
-
super(message, responseVerdict(status, errorType, code, options?.
|
|
834
|
+
super(message, responseVerdict(status, errorType, code, options?.details), {
|
|
806
835
|
...(options?.cause === undefined ? {} : { cause: options.cause }),
|
|
807
836
|
runMayHaveStarted: options?.mayStartRun === true && answerMayHaveStartedRun(status, code),
|
|
808
837
|
});
|
|
@@ -815,20 +844,55 @@ export class ApiResponseError extends PipelexRequestError {
|
|
|
815
844
|
this.serverMessage = serverMessage;
|
|
816
845
|
this.validationErrors = validationErrors;
|
|
817
846
|
this.code = code;
|
|
818
|
-
const
|
|
819
|
-
this.type =
|
|
820
|
-
this.title =
|
|
821
|
-
this.instance =
|
|
822
|
-
this.requestId =
|
|
823
|
-
this.errorCategory =
|
|
824
|
-
this.userAction =
|
|
825
|
-
this.model =
|
|
826
|
-
this.provider =
|
|
827
|
-
this.providerMetadata =
|
|
828
|
-
this.migration =
|
|
829
|
-
this.errors =
|
|
847
|
+
const details = options?.details;
|
|
848
|
+
this.type = details?.type;
|
|
849
|
+
this.title = details?.title;
|
|
850
|
+
this.instance = details?.instance;
|
|
851
|
+
this.requestId = details?.requestId;
|
|
852
|
+
this.errorCategory = details?.errorCategory;
|
|
853
|
+
this.userAction = details?.userAction;
|
|
854
|
+
this.model = details?.model;
|
|
855
|
+
this.provider = details?.provider;
|
|
856
|
+
this.providerMetadata = details?.providerMetadata;
|
|
857
|
+
this.migration = details?.migration;
|
|
858
|
+
this.errors = details?.errors;
|
|
830
859
|
this.problemDocument = options?.problemDocument;
|
|
860
|
+
this.problem = standardReading(status, responseBody, options?.headers ?? {}, options?.mayStartRun === true, code);
|
|
861
|
+
}
|
|
862
|
+
}
|
|
863
|
+
/**
|
|
864
|
+
* An answer read as the MTHDS standard reads it, as `mthds`'s own client does, agreeing with the
|
|
865
|
+
* error's `runMayHaveStarted`: on a request that may create a run, the SDK's own reading of
|
|
866
|
+
* whether a run may have started (`answerMayHaveStartedRun`) decides, as an
|
|
867
|
+
* `ApiUnreachableError`'s does for a request that got no answer, so that `problem` never says a
|
|
868
|
+
* run may exist where `runMayHaveStarted` says none started, nor the reverse.
|
|
869
|
+
*
|
|
870
|
+
* - Where a run may have started, the answer reads as `client.outcome_unknown`, naming the run
|
|
871
|
+
* when the body names one (the platform's `bad_gateway` does when it lost a start's
|
|
872
|
+
* acknowledgement), whatever the body: a `408`, which a proxy may answer for a request it
|
|
873
|
+
* forwarded, every `5xx` but a `501` and a `503` carrying the platform's code
|
|
874
|
+
* `pipeline_start_unavailable`, and a `2xx` the SDK could not read, since the server accepted
|
|
875
|
+
* the request. A core problem document in such a body is not kept, since one inviting a retry
|
|
876
|
+
* would contradict `runMayHaveStarted`.
|
|
877
|
+
* - Where none started, which is every answer to a request that creates no run, a status outside
|
|
878
|
+
* `2xx` whose body is a core problem document reads as that document, and any other as the
|
|
879
|
+
* answer to a request that creates none: the code its status names (`runtime.unavailable` for
|
|
880
|
+
* that `503`), else `client.response_unreadable` naming the status (that `501`). A `2xx` the SDK
|
|
881
|
+
* could not read is `client.response_unreadable`.
|
|
882
|
+
*/
|
|
883
|
+
function standardReading(status, body, headers, mayStartRun, code) {
|
|
884
|
+
const runMayHaveStarted = mayStartRun && answerMayHaveStartedRun(status, code);
|
|
885
|
+
if (!runMayHaveStarted) {
|
|
886
|
+
if (status >= 200 && status < 300)
|
|
887
|
+
return unreadableAnswer(status);
|
|
888
|
+
return readAnswer({ status, headers, body }, { createsRun: false }).problem;
|
|
889
|
+
}
|
|
890
|
+
const reading = parseJsonBody(body);
|
|
891
|
+
const runId = reading.ok && isPlainObject(reading.value) ? reading.value.pipeline_run_id : undefined;
|
|
892
|
+
if (typeof runId !== "string" || runId === "") {
|
|
893
|
+
return buildProblem("client.outcome_unknown", {});
|
|
831
894
|
}
|
|
895
|
+
return buildProblem("client.outcome_unknown", { pipeline_run_id: runId }, { pipeline_run_id: runId });
|
|
832
896
|
}
|
|
833
897
|
/**
|
|
834
898
|
* The verdict of a refused request: each member the document's own when it is valid, and the
|
package/dist/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,uBAAuB,EAAE,0BAA0B,EAAE,MAAM,2BAA2B,CAAC;AAahG,OAAO,EAAE,oBAAoB,EAAE,CAAC;AAkBhC,MAAM,aAAa,GAAwB,IAAI,GAAG,CAAc,CAAC,OAAO,EAAE,QAAQ,EAAE,SAAS,CAAC,CAAC,CAAC;AAEhG,yDAAyD;AACzD,MAAM,UAAU,aAAa,CAAC,KAAc;IAC1C,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,aAAa,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC;AAC/D,CAAC;AAiBD,kEAAkE;AAClE,SAAS,WAAW,CAAC,WAAwB,EAAE,SAAkB;IAC/D,OAAO,MAAM,CAAC,MAAM,CA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AAE,KAAK,EAAE,EAC1B,EAAE,eAAe,EAAE,KAAK,EAAE,CAC3B,CAAC;AACJ,CAAC;AAED;;;;;;GAMG;AACH,SAAS,eAAe,CACtB,MAAc,EACd,SAA6B,EAC7B,IAAwB,EACxB,OAAmC;IAEnC,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,KAAK,SAAS,IAAI,SAAS,KAAK,SAAS,CAAC,CAAC;IAC9F,MAAM,UAAU,GAAG,OAAO,EAAE,WAAW,CAAC;IACxC,MAAM,aAAa,GAAG,OAAO,EAAE,SAAS,CAAC;IACzC,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,EAAE,CAAC;QAC/B,OAAO,WAAW,CAChB,QAAQ,CAAC,WAAW,EACpB,OAAO,aAAa,KAAK,SAAS,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CACxE,CAAC;IACJ,CAAC;IACD,IAAI,OAAO,aAAa,KAAK,SAAS;QAAE,OAAO,WAAW,CAAC,UAAU,EAAE,aAAa,CAAC,CAAC;IACtF,uFAAuF;IACvF,6FAA6F;IAC7F,oEAAoE;IACpE,OAAO,WAAW,CAAC,UAAU,EAAE,UAAU,KAAK,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,SAAS,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC;AACxF,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -34,6 +34,7 @@ export { isFresherRunProgress, isTerminalRunStatus, isSuccessRunStatus, RUN_RESU
|
|
|
34
34
|
export type { DegradationReason, GetRunResultOptions, ProgressAttempt, ProgressBatch, ProgressCondition, ProgressFailure, ProgressInvocation, ProgressInvocationStatus, RunDegradation, RunProgress, RunProgressStatus, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, StartAndWaitForResultOptions, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
|
|
35
35
|
export { summarizeUsage } from "./usage.js";
|
|
36
36
|
export type { PipeUsageSummary, RunUsagePair, UsageSummary, UsageSummaryState, UsageTokenTotals, } from "./usage.js";
|
|
37
|
+
export { problemVerdict } from "./error-verdicts.js";
|
|
37
38
|
export { PipelexRequestError, errorVerdictOf, runMayHaveStartedOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, InvalidInputValueError, UploadNotAllowedError, MethodLoadError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
|
|
38
39
|
export type { ApiResponseErrorOptions, ErrorDomain, ErrorVerdict, IdempotencyErrorCode, MethodErrorCode, RejectedAssetCode, UploadNotAllowedKind, UploadTransportCode, } from "./errors.js";
|
|
39
40
|
export type { FieldError, MigrationErrorBlock, ProblemDetails, ProviderErrorMetadata, RunErrorReport, UserAction, } from "./error-models.js";
|
package/dist/index.js
CHANGED
|
@@ -54,6 +54,8 @@ export { isFresherRunProgress, isTerminalRunStatus, isSuccessRunStatus, RUN_RESU
|
|
|
54
54
|
export { summarizeUsage } from "./usage.js";
|
|
55
55
|
// ── Typed errors (PipelineRequestError rides the protocol re-export above) ──
|
|
56
56
|
// Every one carries a verdict — `retryable` and `errorDomain` — read with `errorVerdictOf`, and
|
|
57
|
-
// `runMayHaveStarted`, read with `runMayHaveStartedOf`.
|
|
57
|
+
// `runMayHaveStarted`, read with `runMayHaveStartedOf`. `problemVerdict` reads the standard's
|
|
58
|
+
// problem in the same vocabulary, as `errorVerdictOf` reads an `mthds` error.
|
|
59
|
+
export { problemVerdict } from "./error-verdicts.js";
|
|
58
60
|
export { PipelexRequestError, errorVerdictOf, runMayHaveStartedOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, InvalidInputValueError, UploadNotAllowedError, MethodLoadError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
|
|
59
61
|
//# sourceMappingURL=index.js.map
|
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,eAAe,EAAE,MAAM,aAAa,CAAC;AACtF,sFAAsF;AACtF,yFAAyF;AACzF,2EAA2E;AAC3E,OAAO,EAAE,cAAc,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,iBAAiB,CAAC;AAgBzF,+FAA+F;AAC/F,OAAO,EAAE,sBAAsB,EAAE,MAAM,oBAAoB,CAAC;AAC5D,+FAA+F;AAC/F,OAAO,EAAE,mBAAmB,EAAE,MAAM,sBAAsB,CAAC;AAE3D,+FAA+F;AAC/F,6FAA6F;AAC7F,iGAAiG;AACjG,8FAA8F;AAC9F,iEAAiE;AACjE,OAAO,EAAE,yBAAyB,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAEhG,iGAAiG;AACjG,kFAAkF;AAClF,OAAO,EAAE,oBAAoB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAK/E,yFAAyF;AACzF,sEAAsE;AACtE,OAA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pB,gBAAgB,EAChB,mBAAmB,EACnB,qBAAqB,EACrB,yBAAyB,EACzB,2BAA2B,EAC3B,cAAc,EACd,eAAe,EACf,oBAAoB,EACpB,4BAA4B,EAC5B,qBAAqB,EACrB,sBAAsB,EACtB,uBAAuB,EACvB,sBAAsB,EACtB,qBAAqB,EACrB,eAAe,EACf,kBAAkB,EAClB,gCAAgC,EAChC,yBAAyB,EACzB,oBAAoB,EACpB,sBAAsB,EACtB,2BAA2B,EAC3B,kBAAkB,EAClB,qBAAqB,GACtB,MAAM,aAAa,CAAC"}
|
package/dist/models.d.ts
CHANGED
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* the model reference check. Built on the protocol wire types imported from the
|
|
9
9
|
* `mthds/protocol` subpath.
|
|
10
10
|
*/
|
|
11
|
-
import type { InputForm, OutputForm,
|
|
11
|
+
import type { InputForm, OutputForm, PipeIOContracts, RunResultExecute, RunResultStart } from "mthds/protocol";
|
|
12
12
|
import type { BundleResources } from "./bundle-resources.js";
|
|
13
13
|
export interface DictStuff {
|
|
14
14
|
concept: string;
|
|
@@ -141,9 +141,9 @@ export interface LiftablePipeEntry {
|
|
|
141
141
|
}
|
|
142
142
|
/**
|
|
143
143
|
* Pipelex's `POST /v1/validate` 200 body for a VALID bundle — the canonical
|
|
144
|
-
* `PipelexValidationReport`
|
|
145
|
-
*
|
|
146
|
-
*
|
|
144
|
+
* `PipelexValidationReport`, carrying the `is_valid: true` discriminant of the
|
|
145
|
+
* protocol's union, plus the route's wire-only extras (`message`, the
|
|
146
|
+
* `mthds_contents` echo). Field names follow the MTHDS brand
|
|
147
147
|
* boundary — blueprints/graphs are language artifacts, so no `pipelex_` prefix
|
|
148
148
|
* inside this envelope.
|
|
149
149
|
*
|
|
@@ -162,9 +162,11 @@ export interface LiftablePipeEntry {
|
|
|
162
162
|
* / `unknown`): their canonical schemas are owned elsewhere — the runtime's blueprint
|
|
163
163
|
* models, and `@pipelex/mthds-ui`'s `GraphSpec` — and neither has a wire declaration in
|
|
164
164
|
* the standard for this SDK to import. Each narrows on the day one exists.
|
|
165
|
-
*
|
|
165
|
+
* Carries an extension index signature, so any further server field is preserved.
|
|
166
166
|
*/
|
|
167
|
-
export interface PipelexValidationReport
|
|
167
|
+
export interface PipelexValidationReport {
|
|
168
|
+
/** Discriminant of the valid arm of the 200 response union. */
|
|
169
|
+
is_valid: true;
|
|
168
170
|
/** The batch's primary blueprint (first declaring `main_pipe`, else first). */
|
|
169
171
|
bundle_blueprint: Record<string, unknown>;
|
|
170
172
|
/**
|
|
@@ -258,18 +260,28 @@ export interface PipelexValidationReport extends ValidationReport {
|
|
|
258
260
|
* matches the local CLI's `--format markdown` output in format/structure.
|
|
259
261
|
*/
|
|
260
262
|
rendered_markdown?: string;
|
|
263
|
+
/** Further implementation extension fields, preserved as the server sent them. */
|
|
264
|
+
[extension: string]: unknown;
|
|
261
265
|
}
|
|
262
266
|
/**
|
|
263
267
|
* Pipelex's `POST /v1/validate` 200 body for an INVALID bundle — the `is_valid: false`
|
|
264
|
-
* arm of the response union,
|
|
265
|
-
*
|
|
268
|
+
* arm of the response union, carrying the closed-vocabulary `ValidationErrorItem[]`.
|
|
269
|
+
* The structural artifacts of the valid arm
|
|
266
270
|
* are absent (they don't exist when load/parse/wiring failed); `validation_errors[]` is
|
|
267
271
|
* non-empty on every invalid verdict (the structured-info invariant — even a parse-level
|
|
268
272
|
* failure carries one source-less `blueprint_validation` residual).
|
|
269
273
|
*/
|
|
270
|
-
export interface PipelexInvalidReport
|
|
274
|
+
export interface PipelexInvalidReport {
|
|
275
|
+
/** Discriminant of the invalid arm. */
|
|
276
|
+
is_valid: false;
|
|
271
277
|
/** Structured per-error diagnostics, built by pipelex's one shared builder. */
|
|
272
278
|
validation_errors: ValidationErrorItem[];
|
|
279
|
+
/** Outstanding signatures (best-effort; empty when no library could be assembled). */
|
|
280
|
+
pending_signatures: string[];
|
|
281
|
+
/** An invalid bundle is never runnable. */
|
|
282
|
+
is_runnable: false;
|
|
283
|
+
/** Human-readable summary of the verdict. */
|
|
284
|
+
message: string;
|
|
273
285
|
/**
|
|
274
286
|
* Opt-in Pipelex-API presentation extra: the server-rendered Markdown view of the
|
|
275
287
|
* invalid verdict (`# Validation failed` + the `validation_errors`), present only
|
|
@@ -279,8 +291,9 @@ export interface PipelexInvalidReport extends InvalidValidationReport {
|
|
|
279
291
|
}
|
|
280
292
|
/**
|
|
281
293
|
* The Pipelex `POST /v1/validate` 200 response — the discriminated union the
|
|
282
|
-
* `PipelexApiClient.validate` returns, keyed on `is_valid
|
|
283
|
-
* `ValidationResult`
|
|
294
|
+
* `PipelexApiClient.validate` returns, keyed on `is_valid`, as the protocol's
|
|
295
|
+
* `ValidationResult` is. Its arms are Pipelex's own, the verdict the hosted plane
|
|
296
|
+
* answers, not narrowings of the protocol's (see the section's heading above).
|
|
284
297
|
*/
|
|
285
298
|
export type PipelexValidationResult = PipelexValidationReport | PipelexInvalidReport;
|
|
286
299
|
/**
|
|
@@ -299,25 +312,19 @@ export type ValidationErrorCategory = "blueprint_validation" | "pipe_factory" |
|
|
|
299
312
|
* when the runner refuses the method for its validation errors
|
|
300
313
|
* (`ApiResponseError.validationErrors`), and by a failed run's stored report.
|
|
301
314
|
*
|
|
302
|
-
* **The shape is
|
|
303
|
-
*
|
|
304
|
-
*
|
|
305
|
-
*
|
|
306
|
-
*
|
|
307
|
-
*
|
|
308
|
-
* standard's, so a member added on one side and not the other fails the typecheck. The
|
|
309
|
-
* one difference it allows is the pair of template-check locators, `template_file` and
|
|
310
|
-
* `template_location`, which the runner's item carries and the `mthds` this SDK depends on
|
|
311
|
-
* does not declare yet; the test pins that difference too, so it fails the day `mthds`
|
|
312
|
-
* declares them.
|
|
315
|
+
* **The shape is the hosted plane's.** It is the item the runner sends today, which
|
|
316
|
+
* predates the standard's problem items: from protocol 2.0.0 a verdict lists its faults
|
|
317
|
+
* as `ProblemItem`s under a registry `code`, which the hosted plane does not send yet, so
|
|
318
|
+
* this declaration is not the standard's and is not pinned to it. Its fix shares the
|
|
319
|
+
* standard's operation and safety vocabularies, which `tests/validation-items.test.ts`
|
|
320
|
+
* pins.
|
|
313
321
|
*
|
|
314
322
|
* Only `category` and `message` are always present; the rest are populated per
|
|
315
|
-
* `category`. Every other member is `?: T | null`
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
*
|
|
319
|
-
*
|
|
320
|
-
* `=== undefined` check would be wrong on one of them.
|
|
323
|
+
* `category`. Every other member is `?: T | null` because the two channels serialize an
|
|
324
|
+
* unset locator differently: the invalid arm and the crate routes drop the key
|
|
325
|
+
* (`exclude_none` server-side) while the valid arm — which carries `warnings[]` — does
|
|
326
|
+
* not, so the same item arrives with explicit `null`s there. A truthiness check reads
|
|
327
|
+
* both; an `=== undefined` check would be wrong on one of them.
|
|
321
328
|
*
|
|
322
329
|
* `source` is the declaring file path (CLI) or the per-content `mthds_sources` name
|
|
323
330
|
* the API threads onto the in-memory load path — the owning file for cross-file
|
|
@@ -451,9 +458,11 @@ export type FixOp = SetKeyOp | EnsureTableOp | DeleteKeyOp | DeleteTableOp | Ren
|
|
|
451
458
|
* mirror of pipelex's `SuggestedFix`. The ops are semantic patches over the `.mthds`
|
|
452
459
|
* document, not a text diff, so an applier keeps the author's formatting.
|
|
453
460
|
*
|
|
454
|
-
* The shape is `
|
|
455
|
-
* `
|
|
456
|
-
*
|
|
461
|
+
* The shape is the hosted plane's, as `ValidationErrorItem`'s is: the standard's
|
|
462
|
+
* `SuggestedFix` names the file `file` rather than `source` and is open to members it does
|
|
463
|
+
* not declare. Its operation kinds, its safeties and the values a `set_key` writes are the
|
|
464
|
+
* standard's (this SDK's `TomlValue` is the standard's `FixValue`), and a type-level test
|
|
465
|
+
* pins them.
|
|
457
466
|
*/
|
|
458
467
|
export interface SuggestedFix {
|
|
459
468
|
/** The kebab-case rule id, e.g. `"match-sequence-output"`. */
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED