@pipelex/sdk 0.39.0 → 0.41.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 +3 -0
- package/dist/bundle-resources.d.ts +62 -0
- package/dist/bundle-resources.js +165 -0
- package/dist/bundle-resources.js.map +1 -0
- package/dist/cli/script.d.ts +1 -1
- package/dist/cli/source.d.ts +2 -1
- package/dist/cli/source.js +61 -3
- package/dist/cli/source.js.map +1 -1
- package/dist/client.d.ts +107 -23
- package/dist/client.js +216 -113
- package/dist/client.js.map +1 -1
- package/dist/errors.d.ts +16 -5
- package/dist/errors.js +15 -5
- package/dist/errors.js.map +1 -1
- package/dist/hooks/bundle-gather.d.ts +28 -1
- package/dist/hooks/bundle-gather.js +163 -3
- package/dist/hooks/bundle-gather.js.map +1 -1
- package/dist/hooks/claude-mthds-check.d.ts +4 -2
- package/dist/hooks/claude-mthds-check.js +5 -2
- package/dist/hooks/claude-mthds-check.js.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +3 -0
- package/dist/index.js.map +1 -1
- package/dist/models.d.ts +42 -4
- package/dist/prepare-inputs.d.ts +48 -7
- package/dist/prepare-inputs.js +236 -35
- package/dist/prepare-inputs.js.map +1 -1
- package/dist/product-models.d.ts +46 -0
- package/dist/runs.d.ts +11 -0
- package/dist/runs.js +35 -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 +5 -3
- package/docs/bundle-resources.md +107 -0
- package/docs/cli.md +1 -0
- package/docs/crate-routes.md +5 -1
- package/docs/errors.md +4 -3
- package/docs/hook-bundle.md +2 -0
- package/docs/input-preparation.md +9 -5
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"bundle-gather.js","sourceRoot":"","sources":["../../src/hooks/bundle-gather.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"bundle-gather.js","sourceRoot":"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D,qFAAqF;AACrF,SAAS,iBAAiB,CAAC,IAAY;IACrC,IAAI,CAAC;QACH,MAAM,IAAI,GAAG,YAAY,CAAC,IAAI,CAAC,CAAC;QAChC,MAAM,KAAK,GAAG,QAAQ,CAAC,IAAI,CAAC,CAAC;QAC7B,OAAO,KAAK,CAAC,MAAM,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC;IAC5D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,IAAI,CAAC;IACd,CAAC;AACH,CAAC;AAED;;;;GAIG;AACH,SAAS,eAAe,CAAC,IAAiB,EAAE,KAAkB;IAC5D,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;QAAE,OAAO,IAAI,CAAC;IAC1C,IAAI,IAAI,CAAC,IAAI,KAAK,KAAK,CAAC,IAAI;QAAE,OAAO,KAAK,CAAC;IAC3C,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,OAAO,CAAC,YAAY,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,YAAY,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC;IACjF,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC;AAED,SAAS,QAAQ,CAAC,KAAc;IAC9B,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
* - no `.mthds` in the payload / unparseable stdin → pass silently
|
|
29
29
|
* - WASM engine fails to load → no file is checked; the note above is still sent
|
|
30
30
|
* - validate unavailable (no `PIPELEX_API_KEY`, network error, timeout, any
|
|
31
|
-
* non-2xx, bundle-gather overflow
|
|
32
|
-
*
|
|
31
|
+
* non-2xx, bundle-gather overflow, a template file leading out of the bundle's
|
|
32
|
+
* directory, or one path naming two different template files, or a file beside
|
|
33
|
+
* one `.mthds` file and nothing beside another) → the local lint/format
|
|
34
|
+
* verdicts already applied; the validate stage passes silently
|
|
33
35
|
*
|
|
34
36
|
* The hook always exits 0; a block/deny is expressed on stdout, never via the
|
|
35
37
|
* exit code.
|
|
@@ -28,8 +28,10 @@
|
|
|
28
28
|
* - no `.mthds` in the payload / unparseable stdin → pass silently
|
|
29
29
|
* - WASM engine fails to load → no file is checked; the note above is still sent
|
|
30
30
|
* - validate unavailable (no `PIPELEX_API_KEY`, network error, timeout, any
|
|
31
|
-
* non-2xx, bundle-gather overflow
|
|
32
|
-
*
|
|
31
|
+
* non-2xx, bundle-gather overflow, a template file leading out of the bundle's
|
|
32
|
+
* directory, or one path naming two different template files, or a file beside
|
|
33
|
+
* one `.mthds` file and nothing beside another) → the local lint/format
|
|
34
|
+
* verdicts already applied; the validate stage passes silently
|
|
33
35
|
*
|
|
34
36
|
* The hook always exits 0; a block/deny is expressed on stdout, never via the
|
|
35
37
|
* exit code.
|
|
@@ -135,6 +137,7 @@ async function runValidateStage(filePath) {
|
|
|
135
137
|
// request does not keep running after the hook has given up on it.
|
|
136
138
|
const result = await client.validateFiles(gathered.files, {
|
|
137
139
|
allowSignatures: true,
|
|
140
|
+
resources: gathered.resources,
|
|
138
141
|
timeoutMs: VALIDATE_TIMEOUT_MS,
|
|
139
142
|
});
|
|
140
143
|
if (result.is_valid === true) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"claude-mthds-check.js","sourceRoot":"","sources":["../../src/hooks/claude-mthds-check.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"claude-mthds-check.js","sourceRoot":"","sources":["../../src/hooks/claude-mthds-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqCG;AAEH,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,M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ACH,CAAC;IACH,CAAC;IACD,IAAI,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzB,QAAQ,CAAC,IAAI,CAAC,uBAAuB,CAAC,SAAS,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,IAAI,CAAC,aAAa,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAC;AAC1C,CAAC;AAED,IAAI,EAAE;KACH,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;IACtB,kEAAkE;IAClE,MAAM,OAAO,GAAG,GAAG,YAAY,KAAK,CAAC,CAAC,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;IACjE,IAAI,CAAC,2BAA2B,OAAO,EAAE,CAAC,CAAC;AAC7C,CAAC,CAAC;KACD,OAAO,CAAC,GAAG,EAAE;IACZ,0EAA0E;IAC1E,sEAAsE;IACtE,6BAA6B;IAC7B,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -12,7 +12,8 @@ export * from "mthds/protocol";
|
|
|
12
12
|
export { PipelexApiClient, DEFAULT_API_BASE_URL, isGatewayCutOff } from "./client.js";
|
|
13
13
|
export { buildUserAgent, validateAppInfo, MAX_USER_AGENT_LENGTH } from "./user-agent.js";
|
|
14
14
|
export type { AppInfo, RuntimeInfo } from "./user-agent.js";
|
|
15
|
-
export type { MthdsFile, PipelexApiRunExtensions, PipelexHostedRunExtensions, PipelexRunOptions, PipelexStartOptions, ValidateMethodSelector, ValidateFilesOptions, PipelexApiClientOptions, } from "./client.js";
|
|
15
|
+
export type { MthdsFile, PipelexApiRunExtensions, PipelexHostedRunExtensions, PipelexRunOptions, PipelexStartOptions, ValidateMethodSelector, ValidateFilesOptions, ValidateOptions, PipelexApiClientOptions, } from "./client.js";
|
|
16
|
+
export type { BundleResourceBytes, BundleResources } from "./bundle-resources.js";
|
|
16
17
|
export { methodSourceToContents } from "./method-source.js";
|
|
17
18
|
export { parseMethodSelector } from "./method-selector.js";
|
|
18
19
|
export type { ParsedMethodSelector } from "./method-selector.js";
|
|
@@ -20,7 +21,8 @@ export { PipelexExecuteResult, resultsFromExecute } from "./execute-result.js";
|
|
|
20
21
|
export type { UploadableAsset, UploadFileOptions, UploadRecord } from "./upload.js";
|
|
21
22
|
export { uploadWithGrant } from "./upload-grant.js";
|
|
22
23
|
export type { GrantedUpload, UploadWithGrantOptions } from "./upload-grant.js";
|
|
23
|
-
export type { PrepareInputsBase, PrepareInputsClosure, PrepareInputsRequest, PreparedInputs, } from "./prepare-inputs.js";
|
|
24
|
+
export type { InputFormFault, PrepareInputsBase, PrepareInputsClosure, PrepareInputsRequest, PreparedInputs, } from "./prepare-inputs.js";
|
|
25
|
+
export { inputFormFault } from "./prepare-inputs.js";
|
|
24
26
|
export { locateArtifacts, collectArtifacts, artifactFilename, PIPELEX_STORAGE_SCHEME, BULK_RESOLVE_MAX_URIS, DEFAULT_ARTIFACT_MAX_BYTES, DEFAULT_ARTIFACT_TIMEOUT_MS, DEFAULT_DOWNLOAD_MAX_TOTAL_BYTES, DEFAULT_DOWNLOAD_CONCURRENCY, } from "./artifacts.js";
|
|
25
27
|
export type { ArtifactItemError, ArtifactLocation, ArtifactScope, BulkResolveStorageUrlsInput, BulkResolvedStorageUrls, DownloadArtifactsOptions, DownloadArtifactsRequest, DownloadArtifactsResult, DownloadedArtifact, FetchArtifactOptions, ResolvedArtifact, } from "./artifacts.js";
|
|
26
28
|
export type { DiagnosticKind, DiagnosticRange, Diagnostic, LintResponse, FormatResponse, DictStuff, DictWorkingMemory, DictPipeOutput, DictRunResultExecute, MethodProvenance, PipelexRunResultStart, PipelexHostedToolingExtensions, DryRunStatus, ValidatedPipeEntry, LiftablePipeEntry, PipelexValidationReport, PipelexInvalidReport, PipelexValidationResult, ValidationErrorCategory, ValidationErrorItem, FixSafety, FixOpKind, TomlScalar, TomlValue, FixValue, SetKeyOp, EnsureTableOp, DeleteKeyOp, DeleteTableOp, RenameTableKeyOp, MoveKeyOp, RemapValueOp, FixOp, SuggestedFix, MthdsFileItem, CrateRequestBase, CrateInvalidReport, GeneratedArtifact, ResolveRequest, ResolveValidReport, ResolveResponse, CodegenKind, CodegenTarget, CodegenRequest, CodegenValidReport, CodegenResponse, PipeIORequest, PipeIOValidReport, PipeIOResponse, ModelCheckCategory, ModelReferenceKind, ModelReferenceResolution, ModelReferenceMatchBase, PresetMatch, AliasMatch, WaterfallMatch, HandleMatch, ModelReferenceMatch, ModelReferenceVerdictBase, PresetReferenceVerdict, AliasReferenceVerdict, WaterfallReferenceVerdict, HandleReferenceVerdict, ModelReferenceVerdict, } from "./models.js";
|
package/dist/index.js
CHANGED
|
@@ -29,6 +29,9 @@ export { PipelexExecuteResult, resultsFromExecute } from "./execute-result.js";
|
|
|
29
29
|
// Except the upload grant's sender, which is standalone so the holder of the bytes needs
|
|
30
30
|
// no client. It is also the browser-safe `@pipelex/sdk/upload` entry.
|
|
31
31
|
export { uploadWithGrant } from "./upload-grant.js";
|
|
32
|
+
// The check `prepareInputs` makes of a pipe's input-form entry before walking it, for a caller
|
|
33
|
+
// that reads the entry itself, as the command's `--inputs-template` does.
|
|
34
|
+
export { inputFormFault } from "./prepare-inputs.js";
|
|
32
35
|
// ── Artifacts (the download twin of input preparation) ──────────────
|
|
33
36
|
// `locateArtifacts`, `collectArtifacts` and `artifactFilename` are pure and standalone;
|
|
34
37
|
// the network operations (`resolveArtifacts` / `fetchArtifact` / `downloadArtifacts`) are
|
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,gB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C1B,2BAA2B,EAC3B,gCAAgC,EAChC,4BAA4B,GAC7B,MAAM,gBAAgB,CAAC;AAmFxB,+EAA+E;AAC/E,4EAA4E;AAC5E,iFAAiF;AACjF,0EAA0E;AAC1E,OAAO,EACL,eAAe,EACf,uBAAuB,EACvB,2BAA2B,EAC3B,gBAAgB,GACjB,MAAM,oBAAoB,CAAC;AA8D5B,wEAAwE;AACxE,OAAO,EAAE,mBAAmB,EAAE,kBAAkB,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"}
|
package/dist/models.d.ts
CHANGED
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* `mthds/protocol` subpath.
|
|
10
10
|
*/
|
|
11
11
|
import type { InputForm, OutputForm, InvalidValidationReport, PipeIOContracts, RunResultExecute, RunResultStart, ValidationReport } from "mthds/protocol";
|
|
12
|
+
import type { BundleResources } from "./bundle-resources.js";
|
|
12
13
|
export interface DictStuff {
|
|
13
14
|
concept: string;
|
|
14
15
|
content: unknown;
|
|
@@ -231,9 +232,15 @@ export interface PipelexValidationReport extends ValidationReport {
|
|
|
231
232
|
/** Per-pipe dry-run sweep outcomes. */
|
|
232
233
|
validated_pipes: ValidatedPipeEntry[];
|
|
233
234
|
/**
|
|
234
|
-
* Advisory
|
|
235
|
-
* parser serves both channels, but these never flip `is_valid`. Empty when
|
|
236
|
-
*
|
|
235
|
+
* Advisory findings on a VALID bundle — same item shape as `validation_errors[]`, so one
|
|
236
|
+
* parser serves both channels, but these never flip `is_valid`. Empty when there is
|
|
237
|
+
* nothing to report. Their `error_type`s come in families, always in this order: the
|
|
238
|
+
* useless-`!` lint (`optional_force_redundant`), the entry pipe's vacuous-presence lint
|
|
239
|
+
* (`input_presence_vacuous`), the intent-hint lints (`hint_unknown_key`,
|
|
240
|
+
* `hint_unknown_intent`, `hint_inapplicable_intent`, which ride here exclusively), then the
|
|
241
|
+
* findings a `PipeDocGen` step's template check made in its office template file during
|
|
242
|
+
* the dry run (`template_check_warning`, a `dry_run` item carrying `pipe_code`,
|
|
243
|
+
* `domain_code`, `template_file` and `template_location`).
|
|
237
244
|
*/
|
|
238
245
|
warnings: ValidationErrorItem[];
|
|
239
246
|
/** Qualified refs of pipes still declared as `PipeSignature`. */
|
|
@@ -298,7 +305,11 @@ export type ValidationErrorCategory = "blueprint_validation" | "pipe_factory" |
|
|
|
298
305
|
* only from its package root, which this SDK does not import (it takes `mthds` through
|
|
299
306
|
* `mthds/protocol` alone, the rule `.dependency-cruiser.cjs` enforces); a type-level test
|
|
300
307
|
* (`tests/validation-items.test.ts`) pins this declaration and `SuggestedFix`'s to the
|
|
301
|
-
* standard's, so a member added on one side and not the other fails the typecheck.
|
|
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.
|
|
302
313
|
*
|
|
303
314
|
* Only `category` and `message` are always present; the rest are populated per
|
|
304
315
|
* `category`. Every other member is `?: T | null` — the one way this declaration
|
|
@@ -316,6 +327,12 @@ export type ValidationErrorCategory = "blueprint_validation" | "pipe_factory" |
|
|
|
316
327
|
* carries the reference as written, the kind of model the field takes and the close
|
|
317
328
|
* matches, and, when there is exactly one close match, a `suggested_fix` that remaps
|
|
318
329
|
* the reference to it.
|
|
330
|
+
*
|
|
331
|
+
* A `template_check_warning` item, on the valid arm's `warnings[]` only, is a finding of a
|
|
332
|
+
* `PipeDocGen` step's template check in its office template file during the dry run, such
|
|
333
|
+
* as a field of the template that matches no input: a `dry_run` item carrying the step's
|
|
334
|
+
* `pipe_code` and `domain_code`, the template file as the step names it and the place in
|
|
335
|
+
* it the engine's finding names.
|
|
319
336
|
*/
|
|
320
337
|
export interface ValidationErrorItem {
|
|
321
338
|
category: ValidationErrorCategory;
|
|
@@ -344,6 +361,18 @@ export interface ValidationErrorItem {
|
|
|
344
361
|
* reference the field accepts.
|
|
345
362
|
*/
|
|
346
363
|
suggestions?: string[] | null;
|
|
364
|
+
/**
|
|
365
|
+
* On a `template_check_warning` item: the template file as the `PipeDocGen` step names it
|
|
366
|
+
* (`templates/invoice.xlsx`); `null` for a step of the server's own library, whose path is
|
|
367
|
+
* the server's and is never shown.
|
|
368
|
+
*/
|
|
369
|
+
template_file?: string | null;
|
|
370
|
+
/**
|
|
371
|
+
* On a `template_check_warning` item: the place in the template file the finding names, in
|
|
372
|
+
* the engine's own words (a defined name, a table, a cell, a shape, a tag); `null` when the
|
|
373
|
+
* finding names none.
|
|
374
|
+
*/
|
|
375
|
+
template_location?: string | null;
|
|
347
376
|
/** The server's deterministic repair proposal for this error, when it has one. */
|
|
348
377
|
suggested_fix?: SuggestedFix | null;
|
|
349
378
|
}
|
|
@@ -507,10 +536,19 @@ export interface MthdsFileItem {
|
|
|
507
536
|
* The XOR is a server-side invariant, not a type-level one: expressing it as a union
|
|
508
537
|
* here would make the common `{ files }` call site pick a branch for no gain, and the
|
|
509
538
|
* server rejects the illegal shapes with a typed `ApiResponseError` either way.
|
|
539
|
+
*
|
|
540
|
+
* `resources` accompanies inline `files`: the files the closure's steps read, such as a
|
|
541
|
+
* `PipeDocGen` step's `template_file`, keyed by the path the step names, each as its bytes,
|
|
542
|
+
* which the client encodes into the wire's base64 map before posting (see
|
|
543
|
+
* `docs/bundle-resources.md`). It is the one member the client does not post verbatim. Beside
|
|
544
|
+
* a `method_ref` it is the server's `422`, a published method's files being its package's
|
|
545
|
+
* own; a step whose template file was not sent makes the closure invalid.
|
|
510
546
|
*/
|
|
511
547
|
export interface CrateRequestBase {
|
|
512
548
|
files?: MthdsFileItem[];
|
|
513
549
|
method_ref?: string;
|
|
550
|
+
/** The files the closure's steps read, keyed by the path a step names, each as its bytes. */
|
|
551
|
+
resources?: BundleResources | null;
|
|
514
552
|
}
|
|
515
553
|
/**
|
|
516
554
|
* The `is_valid: false` arm shared by every crate route — `/v1/resolve`,
|
package/dist/prepare-inputs.d.ts
CHANGED
|
@@ -30,6 +30,7 @@
|
|
|
30
30
|
* dict. See `docs/input-preparation.md`, which `pipelex-sdk-python` mirrors case
|
|
31
31
|
* for case.
|
|
32
32
|
*/
|
|
33
|
+
import type { BundleResources } from "./bundle-resources.js";
|
|
33
34
|
import type { MthdsFileItem, PipeIORequest, PipeIOResponse } from "./models.js";
|
|
34
35
|
import type { UploadCapableClient, UploadRecord } from "./upload.js";
|
|
35
36
|
/** The shared half of the request: the target pipe and the caller's inputs. */
|
|
@@ -68,19 +69,28 @@ export interface PrepareInputsBase {
|
|
|
68
69
|
* `ValidateMethodSelector` states for `validate`). All three reach the
|
|
69
70
|
* server as-is: `files` inline, `method_ref` resolved by the runner, `method_id`
|
|
70
71
|
* resolved by the platform.
|
|
72
|
+
*
|
|
73
|
+
* Inline `files` may bring `resources`, the files the closure's steps read, such
|
|
74
|
+
* as a `PipeDocGen` step's `template_file`, keyed by the path the step names, each
|
|
75
|
+
* as its bytes: the pipe I/O route loads the closure, and a step whose template file
|
|
76
|
+
* was not sent makes it fail to load. A published or stored method's files are its
|
|
77
|
+
* own, so the other two selectors take none.
|
|
71
78
|
*/
|
|
72
79
|
export type PrepareInputsClosure = {
|
|
73
80
|
files: MthdsFileItem[];
|
|
81
|
+
resources?: BundleResources | null;
|
|
74
82
|
method_ref?: never;
|
|
75
83
|
method_id?: never;
|
|
76
84
|
} | {
|
|
77
85
|
method_ref: string;
|
|
78
86
|
files?: never;
|
|
79
87
|
method_id?: never;
|
|
88
|
+
resources?: never;
|
|
80
89
|
} | {
|
|
81
90
|
method_id: string;
|
|
82
91
|
files?: never;
|
|
83
92
|
method_ref?: never;
|
|
93
|
+
resources?: never;
|
|
84
94
|
};
|
|
85
95
|
/** What `prepareInputs` takes: one method selector, the target pipe, the caller's inputs. */
|
|
86
96
|
export type PrepareInputsRequest = PrepareInputsBase & PrepareInputsClosure;
|
|
@@ -99,23 +109,54 @@ export interface PreparedInputs {
|
|
|
99
109
|
export interface PrepareCapableClient extends UploadCapableClient {
|
|
100
110
|
pipeIo(request: PipeIORequest): Promise<PipeIOResponse>;
|
|
101
111
|
}
|
|
112
|
+
/**
|
|
113
|
+
* Where an input-form entry breaks the shape `prepareInputs` reads, and what was
|
|
114
|
+
* found there.
|
|
115
|
+
*/
|
|
116
|
+
export interface InputFormFault {
|
|
117
|
+
/** Where, in the entry's own terms (`fields[3].item`, `fields[2].fields[0].kind`); empty for the entry itself. */
|
|
118
|
+
path: string;
|
|
119
|
+
/** What was expected there and what was found. */
|
|
120
|
+
problem: string;
|
|
121
|
+
/** The two in one phrase: `malformed at fields[3].item: expected a node with a string kind, got null`. */
|
|
122
|
+
message: string;
|
|
123
|
+
}
|
|
124
|
+
/**
|
|
125
|
+
* The first fault of one pipe's input-form entry (`input_form[pipe_ref]`) in
|
|
126
|
+
* document order, or `undefined` when `prepareInputs` can walk it. It checks what
|
|
127
|
+
* the walk reads and only that: the entry is an object whose `fields` is a list;
|
|
128
|
+
* every field, at the top level or in an `object` node, is an object with a string
|
|
129
|
+
* `name`; every node, a field or a `list` node's `item`, has a string `kind` this
|
|
130
|
+
* SDK walks, the standard's vocabulary at the `mthds` it pins; an `object` node's
|
|
131
|
+
* `fields` is a list and a `list` node's `item` is a node. Members the walk does
|
|
132
|
+
* not read (`concept_ref`, `presence`, `hints`, …) are not checked. `prepareInputs`
|
|
133
|
+
* refuses an entry with a fault before it uploads anything; a caller that reads an
|
|
134
|
+
* entry itself, to render a form or a template, checks it here first.
|
|
135
|
+
*/
|
|
136
|
+
export declare function inputFormFault(entry: unknown): InputFormFault | undefined;
|
|
102
137
|
/**
|
|
103
138
|
* Prepare a pipe's inputs: upload local/byte/data-URL assets at the signature's
|
|
104
139
|
* file-bearing positions and return copy-on-write rewritten inputs plus upload
|
|
105
140
|
* records. HTTP(S) URLs and existing `pipelex-storage://` URIs pass through
|
|
106
141
|
* unchanged. All failures are raised before any run is created.
|
|
107
142
|
*
|
|
108
|
-
*
|
|
109
|
-
*
|
|
110
|
-
* where inside it the value
|
|
143
|
+
* A value at a file input that cannot be a file — a value of a type no file input
|
|
144
|
+
* takes, or a `data:` URL that does not decode — throws
|
|
145
|
+
* {@link InvalidInputValueError}, naming the input and where inside it the value
|
|
146
|
+
* sits. With `allowUploads: false`, nothing is read from disk or uploaded: a value
|
|
147
|
+
* that would need either throws {@link UploadNotAllowedError}, naming them too.
|
|
111
148
|
*
|
|
112
149
|
* The pipe and its signature come from one `POST /v1/pipe-io`, whatever the
|
|
113
150
|
* selector — inline `files`, a `method_ref` the runner resolves, or a
|
|
114
151
|
* `method_id` the platform resolves. A bare or alias-qualified `pipe_ref`, a
|
|
115
152
|
* closure that does not load, and a selection the route refuses (an unknown
|
|
116
|
-
* `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}
|
|
117
|
-
*
|
|
118
|
-
*
|
|
119
|
-
*
|
|
153
|
+
* `pipe_ref`, no entry pipe, several) throw {@link InputPreparationError}. So
|
|
154
|
+
* does an answer that breaks the route's contract, with a `runtime` verdict that
|
|
155
|
+
* is not retryable: no boolean `is_valid`, an `input_form` that does not describe
|
|
156
|
+
* the selected pipe, or a descriptor that is malformed or names a kind this SDK
|
|
157
|
+
* does not know, which is checked whole before anything is uploaded. Any other
|
|
158
|
+
* failure from the route (a malformed selector, an unknown or foreign-org id, no
|
|
159
|
+
* package at the address, auth, a server fault, a deployment that does not serve
|
|
160
|
+
* the route) surfaces as `ApiResponseError`, unchanged.
|
|
120
161
|
*/
|
|
121
162
|
export declare function prepareInputs(client: PrepareCapableClient, request: PrepareInputsRequest): Promise<PreparedInputs>;
|