@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/dist/errors.js CHANGED
@@ -2,11 +2,13 @@
2
2
  * Pipelex SDK errors — the argument, transport, run-lifecycle, input-preparation and artifact
3
3
  * errors `PipelexApiClient` raises. Every one derives from `PipelexRequestError`, itself a
4
4
  * `PipelineRequestError` (the protocol base, re-exported from `mthds/protocol`), and so carries
5
- * a verdict: `retryable` and `errorDomain`, always decided. The one exported error outside the
6
- * family, `CodegenLockError`, declares the same two members itself.
5
+ * a verdict: `retryable` and `errorDomain`, always decided, and `runMayHaveStarted`, which says
6
+ * whether a failed start or execute may still have started a run. The one exported error outside
7
+ * the family, `CodegenLockError`, declares the verdict's two members itself.
7
8
  */
8
9
  import { PipelineRequestError } from "mthds/protocol";
9
10
  import { fallbackVerdict } from "./error-verdicts.js";
11
+ import { answerMayHaveStartedRun, transportMayHaveStartedRun } from "./run-may-have-started.js";
10
12
  export { PipelineRequestError };
11
13
  const ERROR_DOMAINS = new Set(["input", "config", "runtime"]);
12
14
  /** Whether a value is one of the three error domains. */
@@ -19,23 +21,38 @@ function makeVerdict(errorDomain, retryable) {
19
21
  }
20
22
  /**
21
23
  * The base of every error this SDK raises over a request, carrying the verdict as two readonly
22
- * own properties: `retryable` and `errorDomain`. Each subclass passes its verdict to this
23
- * constructor, so a class that forgets one does not compile, and every class says its verdict
24
- * where it is defined.
24
+ * own properties, `retryable` and `errorDomain`, and a third, `runMayHaveStarted`. Each subclass
25
+ * passes its verdict to this constructor, so a class that forgets one does not compile, and every
26
+ * class says its verdict where it is defined.
27
+ *
28
+ * `runMayHaveStarted` is false unless the subclass passes it: only `ApiUnreachableError` and
29
+ * `ApiResponseError` built for a request that may create a run, and `PipelineExecuteTimeoutError`,
30
+ * ever carry it as true, and when they do, `retryable` is false whatever the verdict passed.
25
31
  *
26
32
  * It refines the standard's `PipelineRequestError`, so `instanceof PipelineRequestError` still
27
33
  * matches every SDK error. To read a verdict from anything a `catch` holds, use
28
- * `errorVerdictOf`, which also reads it off an error raised by another copy of this SDK.
34
+ * `errorVerdictOf`, which also reads it off an error raised by another copy of this SDK, and
35
+ * `runMayHaveStartedOf` for the third member.
29
36
  */
30
37
  export class PipelexRequestError extends PipelineRequestError {
31
38
  /** Whether asking again can plausibly succeed. Always decided. */
32
39
  retryable;
33
40
  /** Who can fix the failure: `input`, `config` or `runtime`. Always decided. */
34
41
  errorDomain;
42
+ /**
43
+ * Whether the failed request may still have started a run whose id never reached the caller:
44
+ * a `start` or an `execute` (and so `startAndWaitForResult`'s start, or the blocking execute it
45
+ * falls back to) that failed in a way that does not prove the server started nothing. When it
46
+ * is true, `retryable` is false: look the run up in the run history before starting it again.
47
+ * False for every other request, a wait on a run already named included. Always decided.
48
+ */
49
+ runMayHaveStarted;
35
50
  constructor(message, verdict, options) {
36
51
  super(message, options);
37
52
  this.name = "PipelexRequestError";
38
- this.retryable = verdict.retryable;
53
+ this.runMayHaveStarted = options?.runMayHaveStarted === true;
54
+ // Asking again could start a second run, so a run that may have started is never retryable.
55
+ this.retryable = this.runMayHaveStarted ? false : verdict.retryable;
39
56
  this.errorDomain = verdict.errorDomain;
40
57
  }
41
58
  }
@@ -59,6 +76,20 @@ export function errorVerdictOf(err) {
59
76
  return undefined;
60
77
  return { retryable, errorDomain };
61
78
  }
79
+ /**
80
+ * Whether anything a `catch` holds is a failed run start that may still have started a run: true
81
+ * only for an `Error` carrying `runMayHaveStarted` as `true`.
82
+ *
83
+ * The check is structural, as `errorVerdictOf`'s is, so it reads an error raised by another copy
84
+ * of this SDK installed beside this one. Anything else is false: an error of a request that
85
+ * cannot start a run, an `mthds` error, which the standard's client never raises over a start of
86
+ * this SDK, and a value that is not an `Error`.
87
+ */
88
+ export function runMayHaveStartedOf(err) {
89
+ if (!(err instanceof Error))
90
+ return false;
91
+ return err.runMayHaveStarted === true;
92
+ }
62
93
  // ── Argument refusals ────────────────────────────────────────────────
63
94
  /**
64
95
  * The SDK refused a call's arguments before sending any request: no run source given to
@@ -144,6 +175,35 @@ export class InvalidInputValueError extends InputPreparationError {
144
175
  this.name = "InvalidInputValueError";
145
176
  }
146
177
  }
178
+ const UPLOAD_NOT_ALLOWED_KIND_WORDS = {
179
+ local_path: "a local file path",
180
+ data_url: "a data: URL",
181
+ bytes: "inline bytes",
182
+ };
183
+ /**
184
+ * `prepareInputs` was called with `allowUploads: false`, and a value at a file input would need an
185
+ * upload: a local path, a `data:` URL or bytes. It is raised before anything is read from disk,
186
+ * decoded or sent to the upload route, so a server preparing inputs on a caller's behalf never
187
+ * reads a file of its own because the caller named it. `inputName` is the input the value belongs
188
+ * to, `inputPath` where it sits inside that input (`report.attachments[1]`, or the name alone for a
189
+ * top-level file), and `valueKind` what it is. The value itself is neither in the message nor on
190
+ * the error, since it is the caller's data. Its verdict is `input`, not retryable: the caller must
191
+ * pass an `http(s)` URL or a `pipelex-storage://` reference instead.
192
+ */
193
+ export class UploadNotAllowedError extends InputPreparationError {
194
+ inputName;
195
+ inputPath;
196
+ valueKind;
197
+ constructor(details, options) {
198
+ super(`Input "${details.inputPath}" is ${UPLOAD_NOT_ALLOWED_KIND_WORDS[details.valueKind]}, which ` +
199
+ "would need an upload, and this preparation uploads nothing: pass an http(s) URL or a " +
200
+ "pipelex-storage:// reference instead.", options);
201
+ this.name = "UploadNotAllowedError";
202
+ this.inputName = details.inputName;
203
+ this.inputPath = details.inputPath;
204
+ this.valueKind = details.valueKind;
205
+ }
206
+ }
147
207
  /**
148
208
  * The pipe I/O answer said the method does not load (`is_valid: false`), so its signature cannot
149
209
  * be read and no input can be prepared: the method, not the inputs, must change.
@@ -404,12 +464,21 @@ export class ArtifactAuthenticationError extends ArtifactOperationError {
404
464
  * attempt can get through. With the code `ABORT_TIMEOUT`, the SDK's own request timeout, it is
405
465
  * `runtime` and retryable instead: the API took the request and did not answer in time, which is
406
466
  * no fault of the base URL.
467
+ *
468
+ * On a request that may create a run (`options.mayStartRun`, which the client sets on `start` and
469
+ * `execute`), `runMayHaveStarted` is true unless `cause`, the failure fetch threw, proves the
470
+ * request never left: the name lookup, the connection or the TLS handshake failed. A reset, a time
471
+ * limit or a body that could not be decoded proves nothing, so the run may have started and the
472
+ * error is not retryable.
407
473
  */
408
474
  export class ApiUnreachableError extends PipelexRequestError {
409
475
  apiUrl;
410
476
  code;
411
477
  constructor(message, apiUrl, code, options) {
412
- super(message, makeVerdict(code === "ABORT_TIMEOUT" ? "runtime" : "config", true), options);
478
+ super(message, makeVerdict(code === "ABORT_TIMEOUT" ? "runtime" : "config", true), {
479
+ ...options,
480
+ runMayHaveStarted: options?.mayStartRun === true && transportMayHaveStartedRun(options.cause),
481
+ });
413
482
  this.name = "ApiUnreachableError";
414
483
  this.apiUrl = apiUrl;
415
484
  this.code = code;
@@ -422,7 +491,8 @@ export class ApiUnreachableError extends PipelexRequestError {
422
491
  * lifecycle (start + poll) instead.
423
492
  *
424
493
  * Its verdict is `input`, not retryable: asking again meets the same limit, and the caller fixes
425
- * it by starting the run and polling.
494
+ * it by starting the run and polling. `runMayHaveStarted` is always true: the gateway gave up on
495
+ * the request, and the run it carried goes on without its id reaching the caller.
426
496
  */
427
497
  export class PipelineExecuteTimeoutError extends PipelexRequestError {
428
498
  elapsedMs;
@@ -430,7 +500,7 @@ export class PipelineExecuteTimeoutError extends PipelexRequestError {
430
500
  const seconds = Math.round(elapsedMs / 1000);
431
501
  super(`The Pipelex Hosted API times out synchronous requests after ~30s — this run took ${seconds}s. ` +
432
502
  "The blocking execute path can't run methods longer than 30s behind the gateway. " +
433
- "Start the run and poll for its result instead: `start()` then `waitForResult(runId)`.", makeVerdict("input", false), options);
503
+ "Start the run and poll for its result instead: `start()` then `waitForResult(runId)`.", makeVerdict("input", false), { ...options, runMayHaveStarted: true });
434
504
  this.name = "PipelineExecuteTimeoutError";
435
505
  this.elapsedMs = elapsedMs;
436
506
  }
@@ -443,15 +513,21 @@ export class PipelineExecuteTimeoutError extends PipelexRequestError {
443
513
  *
444
514
  * - `status` is the run's terminal status, read from the problem's `run_status` member, or from
445
515
  * its `detail` sentence on a platform that predates the member.
446
- * - `error` is the run's stored error report, typed whole as `RunErrorReport`: the runner's
447
- * `error_type`, `message`, `title`, `type_uri`, `error_domain`, `error_category`,
448
- * `retryable`, `user_action`, `model`, `provider`, `provider_metadata`, `validation_errors`
449
- * and anything newer through its index signature. Branch on `error.error_domain`,
450
- * `error.type_uri` and `error.retryable`; show `error.user_action` as the next step. It is
451
- * the runner's VERBOSE report, so `message` and `provider_metadata` can hold a provider's raw
452
- * text — deciding what a person sees is the consumer's. `null` when the run ended with no
453
- * stored report (a cancelled, terminated or timed-out run, or one the platform finalized
454
- * itself).
516
+ * - `error` is the run's stored error report as the platform serves it, typed whole as
517
+ * `RunErrorReport`: the runner's `error_type`, `message`, `title`, `type_uri`, `error_domain`,
518
+ * `error_category`, `retryable`, `user_action`, `provider_metadata`, `caller_facing_message`,
519
+ * `validation_errors` and anything newer through its index signature. Branch on
520
+ * `error.error_domain`, `error.type_uri` and `error.retryable`; show `error.user_action` as the
521
+ * next step. The platform serves the runner's STRICT projection, so `message` is the author's
522
+ * copy only when `caller_facing_message` is `true` and the placeholder
523
+ * `An internal error occurred.` otherwise, `user_action` comes only with caller-facing copy,
524
+ * `provider_metadata` keeps only `status_code` and `retry_after_seconds`, and `model`,
525
+ * `provider` and `migration` are absent; deciding what a person sees is still the consumer's.
526
+ * A run the platform ended or settled itself carries the caller-facing report the platform
527
+ * wrote, in the same shape. A cancelled, terminated or timed-out run carries a report when a
528
+ * completion callback carried one, and a timed-out run otherwise the platform's timeout report.
529
+ * `null` when the run ended with no stored report (one whose start failed, or one cancelled,
530
+ * terminated or given its status by hand with no completion callback carrying a report).
455
531
  * - The error's own `message` is the problem's `detail`, which names the status and then the
456
532
  * report's message (`Run finished with status FAILED: <message>`), so printing the error
457
533
  * already tells the reason.
@@ -603,6 +679,14 @@ export class PagingNotTerminatingError extends PipelexRequestError {
603
679
  * stored report that says nothing is not, since the caller or the environment must change,
604
680
  * while `runtime` takes the fallback's. Nothing on the error says which a value came from:
605
681
  * `problemDocument` keeps what the server sent.
682
+ * - **A run that may have started.** On a `start` or an `execute`, `runMayHaveStarted` says
683
+ * whether the answer leaves a run possibly started without its id reaching the caller: any
684
+ * `2xx` the SDK could not read, a `408`, and every `5xx` but a `501` and the platform's `503`
685
+ * coded `pipeline_start_unavailable`, which says the runner was never reached. Then
686
+ * `retryable` is false, whatever the server sent: asking again could start a second run. A
687
+ * runner's own failure of a blocking execute reads the same, since the SDK cannot tell a run
688
+ * that ended from one that goes on, and its `retryable` stays readable on `problemDocument`.
689
+ * On every other route it is false.
606
690
  * - **The branch fields.** `errorDomain`, and `type`, the stable URI naming the error class.
607
691
  * Branch on these, never on the HTTP status or on the wording of a message; they are the
608
692
  * fields that mean the same on both surfaces.
@@ -671,7 +755,13 @@ export class ApiResponseError extends PipelexRequestError {
671
755
  model;
672
756
  /** The body's `provider`: the provider an inference failure reached. */
673
757
  provider;
674
- /** The body's `provider_metadata`: what the provider's SDK said, raw text included. */
758
+ /**
759
+ * The body's `provider_metadata`: what the provider's SDK said. On the hosted API it comes
760
+ * from the runner's problem document, which the hosted runner renders under its STRICT
761
+ * disclosure, so it keeps only `status_code` and `retry_after_seconds`; a runner that
762
+ * discloses errors VERBOSE, as a self-hosted one does when `ERROR_DISCLOSURE` is unset, sends
763
+ * it whole, the provider's raw text included.
764
+ */
675
765
  providerMetadata;
676
766
  /** The body's `migration`: a pending configuration migration that explains the failure. */
677
767
  migration;
@@ -698,7 +788,10 @@ export class ApiResponseError extends PipelexRequestError {
698
788
  */
699
789
  validationErrors;
700
790
  constructor(message, apiUrl, status, statusText, responseBody, errorType, serverMessage, validationErrors, code, options) {
701
- super(message, responseVerdict(status, errorType, code, options?.problem), options?.cause === undefined ? undefined : { cause: options.cause });
791
+ super(message, responseVerdict(status, errorType, code, options?.problem), {
792
+ ...(options?.cause === undefined ? {} : { cause: options.cause }),
793
+ runMayHaveStarted: options?.mayStartRun === true && answerMayHaveStartedRun(status, code),
794
+ });
702
795
  this.name = "ApiResponseError";
703
796
  this.apiUrl = apiUrl;
704
797
  this.status = status;
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../src/errors.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,gBAAgB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAatD,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;AAeD,kEAAkE;AAClE,SAAS,WAAW,CAAC,WAAwB,EAAE,SAAkB;IAC/D,OAAO,MAAM,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,SAAS,EAAE,CAAC,CAAC;AACnD,CAAC;AAED;;;;;;;;;GASG;AACH,MAAM,OAAgB,mBAAoB,SAAQ,oBAAoB;IACpE,kEAAkE;IAClD,SAAS,CAAU;IACnC,+EAA+E;IAC/D,WAAW,CAAc;IAEzC,YAAY,OAAe,EAAE,OAAqB,EAAE,OAA6B;QAC/E,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACxB,IAAI,CAAC,IAAI,GAAG,qBAAqB,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,CAAC;QACnC,IAAI,CAAC,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC;IACzC,CAAC;CACF;AAED;;;;;;;;;;;GAWG;AACH,MAAM,UAAU,cAAc,CAAC,GAAY;IACzC,IAAI,C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C,SAAS,GAAG,OAAO,EAAE,SAAS,CAAC;QACpC,IAAI,CAAC,MAAM,GAAG,OAAO,EAAE,MAAM,CAAC;QAC9B,IAAI,CAAC,eAAe,GAAG,OAAO,EAAE,eAAe,CAAC;IAClD,CAAC;CACF;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"}
@@ -103,10 +103,10 @@ export class PipelexExecuteResult {
103
103
  * lifted here but absent from the hosted body.
104
104
  */
105
105
  export function resultsFromExecute(response) {
106
- // `working_memory` is a declared field of `DictPipeOutput`, so it lifts without a cast. By the
107
- // time it is read, `main_stuff` has already been resolved out of it, so a response that carries
108
- // no working memory has thrown `MissingMainStuffError` above; the `?? null` keeps the blocking
109
- // path's convention for an absent key all the same. The graph pair and the usage pair ride
106
+ // `working_memory` is a declared field of `DictPipeOutput`, so it lifts without a cast. The
107
+ // client's `execute` refuses an answer whose `pipe_output` carries no working memory as one it
108
+ // cannot read, so `pipe_output` and its working memory are objects here; the `?? null` keeps the
109
+ // blocking path's convention for an absent key all the same. The graph pair and the usage pair ride
110
110
  // `pipe_output` as Pipelex extension fields, beside `working_memory` — `DictPipeOutput` is
111
111
  // extension-open, mirroring the Python model's `extra="allow"`, so they are read through the
112
112
  // type rather than by casting the whole value away. Lifting every one of them onto its
@@ -1 +1 @@
1
- {"version":3,"file":"execute-result.js","sourceRoot":"","sources":["../src/execute-result.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAGH,OAAO,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAGpD;;;;;;;GAOG;AACH,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAC,CAAC,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,WAAW,CAAC,CAAC,CAAC;AAEjG;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,oBAAoB;IACtB,eAAe,CAAS;IACxB,WAAW,CAAiB;IACrC;;;;OAIG;IACM,eAAe,CAAgB;IAoBxC,YAAY,GAAyB;QACnC,IAAI,CAAC,eAAe,GAAG,GAAG,CAAC,eAAe,CAAC;QAC3C,IAAI,CAAC,WAAW,GAAG,GAAG,CAAC,WAAW,CAAC;QACnC,mGAAmG;QACnG,MAAM,OAAO,GAAG,GAAG,CAAC,eAAe,CAAC;QACpC,IAAI,CAAC,eAAe,GAAG,OAAO,OAAO,KAAK,QAAQ,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,IAAI,CAAC;QACpE,2FAA2F;QAC3F,2FAA2F;QAC3F,0FAA0F;QAC1F,2FAA2F;QAC3F,2FAA2F;QAC3F,0BAA0B;QAC1B,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE,CAAC;YAC/C,IAAI,CAAC,MA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;KAC9C,CAAC;AACJ,CAAC"}
package/dist/index.d.ts CHANGED
@@ -28,9 +28,9 @@ export { runCodegenCheck, isStampableArtifactPath, STAMPABLE_ARTIFACT_SUFFIXES,
28
28
  export type { CodegenCheckInput, CodegenCheckReport, CodegenDrift, CodegenDriftCategory, CodegenTreeFile, } from "./codegen-check.js";
29
29
  export type { UserProfile, ListMethodsQuery, ListMethodVersionsQuery, MethodData, MethodDeletionAccepted, MethodDeletionState, MethodDraftInput, MethodPage, MethodPublished, MethodPublishInput, MethodPublishOutcome, MethodPublishRefusalReason, MethodPublishRefused, MethodPublishResult, MethodPublishUnchanged, MethodRenameInput, MethodSummary, MethodVersion, MethodVersionPage, MethodVersionSummary, MethodWriteInput, Membership, MembershipsResponse, SubscriptionResponse, PlanView, InvoiceView, CheckoutResponse, ChangePlanResponse, BillingPortalResponse, PipelexApiKey, PipelexApiKeyCreated, PipelexApiKeyList, OnboardingRole, OnboardingCurrentTool, OnboardingInputType, OnboardingHeardFrom, OnboardingSubmission, ResolvedStorageUrl, UploadInput, UploadedFile, UploadGrantInput, UploadGrant, PipeStatus, ListRunsQuery, PipelineRun, RunDetail, RunHistoryItem, RunPage, UpdateRunInput, } from "./product-models.js";
30
30
  export { isTerminalRunStatus, isSuccessRunStatus, RUN_RESULT_ARTIFACTS } from "./runs.js";
31
- export type { GetRunResultOptions, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, StartAndWaitForResultOptions, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
31
+ export type { DegradationReason, GetRunResultOptions, RunDegradation, RunResultArtifact, RunStatus, RunPublic, RunRead, RunResults, RunResultState, StartAndWaitForResultOptions, TokensUsageRecord, WaitForResultOptions, } from "./runs.js";
32
32
  export { summarizeUsage } from "./usage.js";
33
33
  export type { PipeUsageSummary, RunUsagePair, UsageSummary, UsageSummaryState, UsageTokenTotals, } from "./usage.js";
34
- export { PipelexRequestError, errorVerdictOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, InvalidInputValueError, MethodLoadError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
35
- export type { ApiResponseErrorOptions, ErrorDomain, ErrorVerdict, MethodErrorCode, RejectedAssetCode, UploadTransportCode, } from "./errors.js";
34
+ 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";
35
+ export type { ApiResponseErrorOptions, ErrorDomain, ErrorVerdict, MethodErrorCode, RejectedAssetCode, UploadNotAllowedKind, UploadTransportCode, } from "./errors.js";
36
36
  export type { FieldError, MigrationErrorBlock, ProblemDetails, ProviderErrorMetadata, RunErrorReport, UserAction, } from "./error-models.js";
package/dist/index.js CHANGED
@@ -44,6 +44,7 @@ export { isTerminalRunStatus, isSuccessRunStatus, RUN_RESULT_ARTIFACTS } from ".
44
44
  // ── Usage summary (pure — folds a run's usage pair into one null-aware reading) ──
45
45
  export { summarizeUsage } from "./usage.js";
46
46
  // ── Typed errors (PipelineRequestError rides the protocol re-export above) ──
47
- // Every one carries a verdict — `retryable` and `errorDomain` — read with `errorVerdictOf`.
48
- export { PipelexRequestError, errorVerdictOf, RequestArgumentError, ApiResponseError, ApiUnreachableError, MissingMainStuffError, PagingNotTerminatingError, PipelineExecuteTimeoutError, RunFailedError, RunTimeoutError, RunStillRunningError, RunLifecycleUnavailableError, InputPreparationError, EmptyMethodSourceError, InvalidLocalSourceError, InvalidInputValueError, MethodLoadError, RejectedAssetError, UnsupportedUploadCapabilityError, UploadAuthenticationError, UploadTransportError, ArtifactOperationError, ArtifactAuthenticationError, ArtifactFetchError, ScopeUnavailableError, } from "./errors.js";
47
+ // Every one carries a verdict — `retryable` and `errorDomain` — read with `errorVerdictOf`, and
48
+ // `runMayHaveStarted`, read with `runMayHaveStartedOf`.
49
+ 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";
49
50
  //# 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;AAazF,+FAA+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kB,EAAE,oBAAoB,EAAE,MAAM,WAAW,CAAC;AAgB1F,oFAAoF;AACpF,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAS5C,+EAA+E;AAC/E,gGAAgG;AAChG,wDAAwD;AACxD,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACnB,oBAAoB,EACpB,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"}
@@ -52,6 +52,15 @@ export interface PrepareInputsBase {
52
52
  * abort. A request already sent runs to its end. It is not sent to the server.
53
53
  */
54
54
  signal?: AbortSignal;
55
+ /**
56
+ * Whether preparation may upload, `true` when omitted. With `false`, a value at a file input
57
+ * that would need an upload — a local path, a `data:` URL, bytes — is refused with an
58
+ * {@link UploadNotAllowedError} naming the input, and nothing is read from disk, decoded or
59
+ * sent to the upload route; `http(s)` URLs and `pipelex-storage://` references pass through as
60
+ * always. It is for a server preparing inputs on a caller's behalf, which must never read a file
61
+ * of its own because the caller named it. It is not sent to the server.
62
+ */
63
+ allowUploads?: boolean;
55
64
  }
56
65
  /**
57
66
  * How the method is named — exactly one of the three selectors, each pinning the
@@ -96,6 +105,10 @@ export interface PrepareCapableClient extends UploadCapableClient {
96
105
  * records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
97
106
  * unchanged. All failures are raised before any run is created.
98
107
  *
108
+ * With `allowUploads: false`, nothing is read from disk or uploaded: a value that
109
+ * would need either throws {@link UploadNotAllowedError}, naming the input and
110
+ * where inside it the value sits.
111
+ *
99
112
  * The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
100
113
  * selector — inline `files`, a `method_ref` the runner resolves, or a
101
114
  * `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
@@ -32,7 +32,7 @@
32
32
  */
33
33
  import { isValidationItem } from "./error-models.js";
34
34
  import { throwIfAborted } from "./runs.js";
35
- import { ApiResponseError, InputPreparationError, InvalidInputValueError, MethodLoadError, } from "./errors.js";
35
+ import { ApiResponseError, InputPreparationError, InvalidInputValueError, MethodLoadError, UploadNotAllowedError, } from "./errors.js";
36
36
  import { uploadFile } from "./upload.js";
37
37
  const PIPELEX_STORAGE_SCHEME = "pipelex-storage://";
38
38
  const HTTP_URL_RE = /^https?:\/\//i;
@@ -123,54 +123,73 @@ function base64ToBytes(base64) {
123
123
  bytes[index] = binary.charCodeAt(index);
124
124
  return bytes;
125
125
  }
126
- /** Resolve one source (string reference or bytes) to the URL/URI to write, deduped by identity. */
126
+ function classifySource(source) {
127
+ if (typeof source === "string") {
128
+ if (source.startsWith(PIPELEX_STORAGE_SCHEME) || HTTP_URL_RE.test(source)) {
129
+ return { kind: "reference", value: source };
130
+ }
131
+ if (source.startsWith("data:"))
132
+ return { kind: "data_url", value: source };
133
+ // Anything else is a local filesystem path — Node only (uploadFile enforces it).
134
+ return { kind: "local_path", value: source };
135
+ }
136
+ if (source instanceof Blob || source instanceof ArrayBuffer || source instanceof Uint8Array) {
137
+ return { kind: "bytes", value: source };
138
+ }
139
+ return { kind: "unsupported", value: source };
140
+ }
141
+ /** Resolve one classified source to the URL/URI to write, deduped by the caller's value's identity. */
127
142
  function resolveSource(ctx, source) {
128
- const cached = ctx.dedup.get(source);
143
+ const cached = ctx.dedup.get(source.value);
129
144
  if (cached !== undefined)
130
145
  return cached;
131
146
  const pending = doResolveSource(ctx, source);
132
- ctx.dedup.set(source, pending);
147
+ ctx.dedup.set(source.value, pending);
133
148
  return pending;
134
149
  }
135
150
  async function doResolveSource(ctx, source) {
136
- if (typeof source === "string") {
137
- if (source.startsWith(PIPELEX_STORAGE_SCHEME))
138
- return source; // already prepared
139
- if (HTTP_URL_RE.test(source))
140
- return source; // reachable URL — pass through
141
- if (source.startsWith("data:")) {
142
- const { bytes, contentType } = decodeDataUrl(source);
151
+ switch (source.kind) {
152
+ case "reference":
153
+ return source.value; // already prepared, or a reachable URL — pass through
154
+ case "data_url": {
155
+ const { bytes, contentType } = decodeDataUrl(source.value);
143
156
  throwIfAborted(ctx.signal);
144
157
  const record = await uploadFile(ctx.client, bytes, { contentType, signal: ctx.signal });
145
158
  ctx.uploads.push(record);
146
159
  return record.uri;
147
160
  }
148
- // Anything else is a local filesystem path — Node only (uploadFile enforces it).
149
- throwIfAborted(ctx.signal);
150
- const record = await uploadFile(ctx.client, source, { signal: ctx.signal });
151
- ctx.uploads.push(record);
152
- return record.uri;
153
- }
154
- if (source instanceof Blob || source instanceof ArrayBuffer || source instanceof Uint8Array) {
155
- throwIfAborted(ctx.signal);
156
- const record = await uploadFile(ctx.client, source, { signal: ctx.signal });
157
- ctx.uploads.push(record);
158
- return record.uri;
161
+ case "local_path":
162
+ case "bytes": {
163
+ throwIfAborted(ctx.signal);
164
+ const record = await uploadFile(ctx.client, source.value, { signal: ctx.signal });
165
+ ctx.uploads.push(record);
166
+ return record.uri;
167
+ }
168
+ case "unsupported":
169
+ // An unrecognized value sits at a file-bearing position (neither a source string,
170
+ // bytes, nor a canonical `{url}` content dict). Fail with a typed error rather than
171
+ // letting a raw TypeError escape from the byte-extraction path.
172
+ throw new InvalidInputValueError(`Unsupported value at a file input: expected a path string, bytes (Blob/File/ArrayBuffer/Uint8Array), ` +
173
+ `a data URL, an http(s)/pipelex-storage:// URL, or canonical {url} content; got ${typeof source.value}.`);
159
174
  }
160
- // An unrecognized value sits at a file-bearing position (neither a source string,
161
- // bytes, nor a canonical `{url}` content dict). Fail with a typed error rather than
162
- // letting a raw TypeError escape from the byte-extraction path.
163
- throw new InvalidInputValueError(`Unsupported value at a file input: expected a path string, bytes (Blob/File/ArrayBuffer/Uint8Array), ` +
164
- `a data URL, an http(s)/pipelex-storage:// URL, or canonical {url} content; got ${typeof source}.`);
165
175
  }
166
- /** Resolve a value known to sit at a file position into canonical content with a rewritten `url`. */
167
- async function resolveFilePosition(ctx, callerValue) {
168
- if (isFileContent(callerValue)) {
169
- const resolved = await resolveSource(ctx, callerValue.url);
170
- return { ...callerValue, url: resolved };
176
+ /**
177
+ * Resolve a value known to sit at a file position into canonical content with a rewritten `url`.
178
+ * Under `allowUploads: false`, a source that would need an upload is refused here, before
179
+ * `resolveSource` could read, decode or upload it.
180
+ */
181
+ async function resolveFilePosition(ctx, callerValue, at) {
182
+ const fileContent = isFileContent(callerValue);
183
+ const source = classifySource(fileContent ? callerValue.url : callerValue);
184
+ if (!ctx.allowUploads && source.kind !== "reference" && source.kind !== "unsupported") {
185
+ throw new UploadNotAllowedError({
186
+ inputName: at.name,
187
+ inputPath: at.path,
188
+ valueKind: source.kind,
189
+ });
171
190
  }
172
- const resolved = await resolveSource(ctx, callerValue);
173
- return { url: resolved };
191
+ const resolved = await resolveSource(ctx, source);
192
+ return fileContent ? { ...callerValue, url: resolved } : { url: resolved };
174
193
  }
175
194
  /**
176
195
  * Descriptor-guided walk, discriminated on the node's `kind`:
@@ -190,18 +209,21 @@ async function resolveFilePosition(ctx, callerValue) {
190
209
  * non-array at a `list`) passes through for the run to reject — preparation never
191
210
  * second-guesses the signature.
192
211
  */
193
- async function resolveNode(ctx, node, callerValue) {
212
+ async function resolveNode(ctx, node, callerValue, at) {
194
213
  switch (node.kind) {
195
214
  case "document":
196
215
  case "image":
197
- return resolveFilePosition(ctx, callerValue);
216
+ return resolveFilePosition(ctx, callerValue, at);
198
217
  case "object": {
199
218
  if (!isPlainObject(callerValue))
200
219
  return callerValue;
201
220
  const result = { ...callerValue };
202
221
  for (const field of node.fields) {
203
222
  if (Object.hasOwn(callerValue, field.name)) {
204
- result[field.name] = await resolveNode(ctx, field, callerValue[field.name]);
223
+ result[field.name] = await resolveNode(ctx, field, callerValue[field.name], {
224
+ name: at.name,
225
+ path: `${at.path}.${field.name}`,
226
+ });
205
227
  }
206
228
  }
207
229
  return result;
@@ -209,7 +231,7 @@ async function resolveNode(ctx, node, callerValue) {
209
231
  case "list": {
210
232
  if (!Array.isArray(callerValue))
211
233
  return callerValue;
212
- return Promise.all(callerValue.map((element) => resolveNode(ctx, node.item, element)));
234
+ return Promise.all(callerValue.map((element, index) => resolveNode(ctx, node.item, element, { name: at.name, path: `${at.path}[${index}]` })));
213
235
  }
214
236
  default:
215
237
  return callerValue;
@@ -281,6 +303,18 @@ function normalizePipeRef(raw) {
281
303
  }
282
304
  return pipeRef;
283
305
  }
306
+ /**
307
+ * Read the caller's `allowUploads`: `true` when omitted, the boolean when given, and refused
308
+ * before any request otherwise. A value of the wrong type is not read as either answer, since
309
+ * reading a stray `"false"` as permission would upload exactly what the caller meant to refuse.
310
+ */
311
+ function resolveAllowUploads(raw) {
312
+ if (raw === undefined)
313
+ return true;
314
+ if (typeof raw === "boolean")
315
+ return raw;
316
+ throw new InputPreparationError(`Cannot prepare inputs: \`allowUploads\` must be a boolean, got ${raw === null ? "null" : typeof raw}.`);
317
+ }
284
318
  /**
285
319
  * Ask `POST /v1/pipe-io` for the pipe and its signature, whatever the selector,
286
320
  * and hand back the valid report.
@@ -364,6 +398,10 @@ function selectedDescriptor(report) {
364
398
  * records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
365
399
  * unchanged. All failures are raised before any run is created.
366
400
  *
401
+ * With `allowUploads: false`, nothing is read from disk or uploaded: a value that
402
+ * would need either throws {@link UploadNotAllowedError}, naming the input and
403
+ * where inside it the value sits.
404
+ *
367
405
  * The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
368
406
  * selector — inline `files`, a `method_ref` the runner resolves, or a
369
407
  * `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
@@ -376,12 +414,19 @@ function selectedDescriptor(report) {
376
414
  export async function prepareInputs(client, request) {
377
415
  const selector = resolveSelector(request);
378
416
  const pipeRef = normalizePipeRef(request.pipe_ref);
417
+ const allowUploads = resolveAllowUploads(request.allowUploads);
379
418
  throwIfAborted(request.signal);
380
419
  const report = await fetchSignature(client, selector, pipeRef);
381
420
  throwIfAborted(request.signal);
382
421
  const descriptor = selectedDescriptor(report);
383
422
  const declared = new Map(descriptor.fields.map((field) => [field.name, field]));
384
- const ctx = { client, signal: request.signal, uploads: [], dedup: new Map() };
423
+ const ctx = {
424
+ client,
425
+ signal: request.signal,
426
+ allowUploads,
427
+ uploads: [],
428
+ dedup: new Map(),
429
+ };
385
430
  const rewritten = { ...request.inputs };
386
431
  for (const [name, callerValue] of Object.entries(request.inputs)) {
387
432
  const field = declared.get(name);
@@ -392,11 +437,11 @@ export async function prepareInputs(client, request) {
392
437
  // The caller filled the explicit `{ concept, content }` envelope: walk the
393
438
  // inner content against the same node, then re-wrap so the concept
394
439
  // annotation rides through to the run (the runtime accepts the envelope).
395
- const walked = await resolveNode(ctx, field, callerValue.content);
440
+ const walked = await resolveNode(ctx, field, callerValue.content, { name, path: name });
396
441
  rewritten[name] = { ...callerValue, content: walked };
397
442
  }
398
443
  else {
399
- rewritten[name] = await resolveNode(ctx, field, callerValue);
444
+ rewritten[name] = await resolveNode(ctx, field, callerValue, { name, path: name });
400
445
  }
401
446
  }
402
447
  return { inputs: rewritten, uploads: ctx.uploads };