@pipelex/sdk 0.71.1 → 0.72.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/cli/script.d.ts +1 -1
- package/dist/cli/source.js +25 -5
- package/dist/cli/source.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/docs/architecture.md +1 -1
- package/docs/cli.md +2 -2
- package/package.json +2 -2
package/dist/cli/script.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ import type { CommandIO } from "./io.js";
|
|
|
15
15
|
* update notice and npm 12's run notices off the script's stderr, which carries the command's
|
|
16
16
|
* own lines, while npm's warnings and errors still print.
|
|
17
17
|
*/
|
|
18
|
-
export declare const SCRIPT_RUNNER = "npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@0.
|
|
18
|
+
export declare const SCRIPT_RUNNER = "npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@0.72.0";
|
|
19
19
|
export declare const SCRIPT_WRITER = "@pipelex/sdk";
|
|
20
20
|
export declare const SCRIPT_NEEDS = "Node 22.12 or later";
|
|
21
21
|
/** Run `pipelex-sdk script` and return its exit code. */
|
package/dist/cli/source.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* sends a method's tree as the SDKs do. An address travels as `method_ref` and a catalog id as
|
|
10
10
|
* `method_id`, both resolved by the server.
|
|
11
11
|
*/
|
|
12
|
-
import { inputFormFault, readProblemItems } from "../index.js";
|
|
12
|
+
import { InputsTemplateError, inputFormFault, readProblemItems, renderInputsTemplate, } from "../index.js";
|
|
13
13
|
import { CommandError, EXIT_FAILED, untilInterrupted } from "./io.js";
|
|
14
14
|
import { loadFailureLines, METHOD_DOES_NOT_LOAD_SENTENCE } from "./present.js";
|
|
15
15
|
export function crateSelector(source) {
|
|
@@ -78,16 +78,36 @@ export async function describePipe(client, source, pipe, interrupt) {
|
|
|
78
78
|
// names the fault. Python's closed models refuse more than this, such as a member the standard
|
|
79
79
|
// does not define, which the template never reads.
|
|
80
80
|
const entry = inputForm[pipeRef];
|
|
81
|
-
if (inputFormFault(entry) !== undefined ||
|
|
81
|
+
if (inputFormFault(entry) !== undefined ||
|
|
82
|
+
!templateReadable(entry) ||
|
|
83
|
+
!templateRenders(entry)) {
|
|
82
84
|
throw new CommandError("the API's pipe I/O answer describes the pipe it selected with a malformed input form.", { exitCode: EXIT_FAILED });
|
|
83
85
|
}
|
|
84
86
|
return { report, pipeRef, descriptor: entry };
|
|
85
87
|
}
|
|
88
|
+
/**
|
|
89
|
+
* Whether the compact inputs template renders from an entry the checks above passed. The renderer
|
|
90
|
+
* refuses shapes those checks do not read, such as a `JSON` input, or one whose concept refines
|
|
91
|
+
* `JSON`, that is not an object carrying `json_obj`, so the entry is rendered once here and its
|
|
92
|
+
* refusal is a malformed input form, for `script` as for `--inputs-template`.
|
|
93
|
+
*/
|
|
94
|
+
function templateRenders(descriptor) {
|
|
95
|
+
try {
|
|
96
|
+
renderInputsTemplate(descriptor, { explicit: false, format: "json" });
|
|
97
|
+
return true;
|
|
98
|
+
}
|
|
99
|
+
catch (error) {
|
|
100
|
+
if (error instanceof InputsTemplateError)
|
|
101
|
+
return false;
|
|
102
|
+
throw error;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
86
105
|
/**
|
|
87
106
|
* Whether an entry `inputFormFault` passed also holds what the inputs template reads beyond the
|
|
88
107
|
* walk, in a shape it can render: every node's `concept_ref` a string, its `refines` a list of
|
|
89
|
-
* strings, an enum's `choices` a list and a list's `item_count` a whole number of at
|
|
90
|
-
* the last three when present. Members the template only tests for truth are not
|
|
108
|
+
* strings, an enum's `choices` a list of strings and a list's `item_count` a whole number of at
|
|
109
|
+
* least two, the last three when present. Members the template only tests for truth are not
|
|
110
|
+
* checked.
|
|
91
111
|
*/
|
|
92
112
|
function templateReadable(entry) {
|
|
93
113
|
return entry.fields.every(templateReadableNode);
|
|
@@ -116,7 +136,7 @@ function templateReadableNode(node) {
|
|
|
116
136
|
case "object":
|
|
117
137
|
return templateReadable(node);
|
|
118
138
|
case "enum":
|
|
119
|
-
return Array.isArray(node.choices);
|
|
139
|
+
return (Array.isArray(node.choices) && node.choices.every((choice) => typeof choice === "string"));
|
|
120
140
|
case "list":
|
|
121
141
|
return ((node.item_count === undefined ||
|
|
122
142
|
node.item_count === null ||
|
package/dist/cli/source.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/cli/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,
|
|
1
|
+
{"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/cli/source.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAUH,OAAO,EACL,mBAAmB,EACnB,cAAc,EACd,gBAAgB,EAChB,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAErB,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AACtE,OAAO,EAAE,gBAAgB,EAAE,6BAA6B,EAAE,MAAM,cAAc,CAAC;AAY/E,MAAM,UAAU,aAAa,CAAC,MAAoB;IAChD,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO;gBACL,KAAK,EAAE,MAAM,CAAC,WAAW,CAAC,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC,IAAI,CAAC,IAAI,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC;aACjF,CAAC;QACJ,KAAK,SAAS;YACZ,OAAO,EAAE,UAAU,EAAE,MAAM,CAAC,SAAS,EAAE,CAAC;QAC1C,KAAK,SAAS;YACZ,OAAO,EAAE,SAAS,EAAE,MAAM,CAAC,QAAQ,EAAE,CAAC;IAC1C,CAAC;AACH,CAAC;AAED,4CAA4C;AAC5C,MAAM,UAAU,WAAW,CAAC,MAAoB;IAC9C,QA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CAAC,MAAM,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,IAAK,IAAI,CAAC,UAAqB,IAAI,CAAC,CAAC,CAAC;gBAC1E,oBAAoB,CAAC,IAAI,CAAC,IAA+B,CAAC,CAC3D,CAAC;QACJ,OAAO,CAAC,CAAC,CAAC;YACR,yEAAyE;YACzE,MAAM,WAAW,GAAU,IAAI,CAAC;YAChC,OAAO,WAAW,CAAC;QACrB,CAAC;IACH,CAAC;AACH,CAAC;AAED,SAAS,aAAa,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;AAC9E,CAAC"}
|
package/dist/version.d.ts
CHANGED
package/dist/version.js
CHANGED
package/docs/architecture.md
CHANGED
|
@@ -70,7 +70,7 @@ The `imports` map points into `dist/`, which is what ships, so the tools that ru
|
|
|
70
70
|
|
|
71
71
|
### Standard artifacts on the validate report
|
|
72
72
|
|
|
73
|
-
`PipelexValidationReport` is a Pipelex envelope that carries artifacts the MTHDS standard owns, and it names their types by importing them: `pipe_io_contracts` is `PipeIOContracts` and `input_form` is `InputForm`, both from `mthds/protocol`, where the standard declares them as the recommended extension fields of a validation report. The SDK restates nothing about their shape, and a consumer importing from `@pipelex/sdk` reaches the node types too (`InputFormTopLevelField`, `PipeInputContract`, the `FieldKind` vocabulary) through the barrel's `export * from "mthds/protocol"`.
|
|
73
|
+
`PipelexValidationReport` is a Pipelex envelope that carries artifacts the MTHDS standard owns, and it names their types by importing them: `pipe_io_contracts` is `PipeIOContracts` and `input_form` is `InputForm`, both from `mthds/protocol`, where the standard declares them as the recommended extension fields of a validation report. The SDK restates nothing about their shape, and a consumer importing from `@pipelex/sdk` reaches the node types too (`InputFormTopLevelField`, `PipeInputContract`, the `FieldKind` vocabulary) through the barrel's `export * from "mthds/protocol"`. That includes the facts MTHDS `9.2.0` adds to the descriptor nodes: a `number` node's `unit` and `aggregate` (`Aggregate`), an `enum` node's `options` (`ChoiceOption`, `OptionTone`) beside its `choices`, which are strings, a `text` node's closed `format` (`ContractFormat`), and the intent-hint vocabularies (`HINT_KEYS`, `INTENT_WORDS`, `ROLE_WORDS`, `PART_WORDS` and their guards).
|
|
74
74
|
|
|
75
75
|
That supersedes the earlier ruling which kept both fields opaque as `Record<string, unknown>`. The ruling was defending a real principle — this SDK does not own these types, and a second declaration here would be free to drift from the one the server emits — and the principle is unchanged. What changed is that the standard's TypeScript client now declares them, so importing enforces the same boundary the opaque typing was reaching for, and enforces it at compile time instead of leaving every consumer to cast. `bundle_blueprint` and `graph_spec` stay opaque for exactly the original reason: their canonical schemas live in the runtime's blueprint models and in `@pipelex/mthds-ui`'s `GraphSpec`, and neither has a declaration in the standard for this SDK to import. Each narrows the day the standard declares one.
|
|
76
76
|
|
package/docs/cli.md
CHANGED
|
@@ -22,7 +22,7 @@ pipelex-sdk run --method <method> [--pipe <domain.pipe_code>] [--inputs <file> |
|
|
|
22
22
|
- **`--method`**, required, names the method in one of the forms below, told apart by shape alone. A value starting with `mt_` is a catalog id, sent as `method_id`. A value starting with `github.com/` is a published method's address, `github.com/<owner>/<repo>[/<package>][@<tag>]`, sent as `method_ref`. Anything else is a path to a `.mthds` file or a bundle directory, which must exist and is read from disk and sent inline (see "Reading a bundle" below). A file or directory that happens to be named `mt_…` is reached as `./mt_…`, so what a value names never depends on what the current directory holds, and an address is written without its scheme. An `mt_` value holding a character no catalog id holds, anything but letters, digits, `_` and `-` (the ids are minted as `mt_` and a UUID, and the run route takes no other character), is a usage error made before any request, which says to write `./` to name a file: `mt_review.mthds` is refused, `./mt_review.mthds` is a path. A catalog id may end in a version suffix, which is sent whole: a bare `mt_…` runs the method's latest published version, `mt_…@<n>` the fixed version `n` and `mt_…@draft` its draft. A suffix that is neither a positive number without a leading zero nor `draft` (`@0`, `@03`, `@Draft`, two suffixes) is a usage error made before any request, as `parseMethodSelector` reads it.
|
|
23
23
|
- **`--pipe`** names the pipe by its qualified ref, `domain.pipe_code`. It is sent as `pipe_ref` to the input preparation and as `pipe_code` to the run. A bare code, and an `alias->domain.pipe_code` ref naming a dependency's pipe, are usage errors. Without it, the run takes the method's main pipe, as the API resolves it.
|
|
24
24
|
- **`--inputs`** names a JSON file holding one object, one entry per input, the shape `mthds run --inputs` and `cli-python`'s `--inputs` take; `-` reads it from stdin. The text is UTF-8, and a byte-order mark at its start is dropped, as RFC 8259 lets a JSON reader do, since Windows PowerShell 5.1 writes one (`Out-File -Encoding utf8`); a bundle's mark, by contrast, is sent as it is on disk. A relative path resolves against the current directory. A file or stdin that cannot be read is a usage error, `cannot read stdin.` with the system's reason under it (`Reason: EIO`), and a stdin closed when the command starts reads as empty, so it is not valid JSON: Node opens the null device on a standard stream a process starts without, and the Python command reads the missing stream the same way. A `process.stdin` destroyed before the command reads it is unreadable too, with the reason `ERR_STREAM_PREMATURE_CLOSE`. Without it the run gets no inputs. When the object has entries, they first go through the SDK's input preparation (`prepareInputs`, one `POST /v1/pipe-io` call): a local path or a `data:` URL at a file input is uploaded and replaced by its `pipelex-storage://` reference, each upload is reported on stderr, and a URL passes through. An empty object or no `--inputs` makes no preparation request. A value at a file input that is no file, a `data:` URL that does not decode or a value of another type such as a number, is a usage error, as is a local path that cannot be read; a method that does not load, met during the preparation, is reported as `--inputs-template` reports it ("Exit codes, errors and Ctrl-C" below). The command tells the two apart by the SDK's error classes, `InvalidLocalSourceError` and `InvalidInputValueError` for the inputs' mistakes and `MethodLoadError` for the method's ([`input-preparation.md`](input-preparation.md)).
|
|
25
|
-
- **`--inputs-template`** prints the pipe's inputs template, the object `--inputs` takes with a placeholder for every input, and runs nothing. The template is rendered by `mthds`' `renderInputsTemplate`, in its compact JSON shape, from the input-form descriptor one `POST /v1/pipe-io` call returns, which spends no inference. It takes no `--inputs`.
|
|
25
|
+
- **`--inputs-template`** prints the pipe's inputs template, the object `--inputs` takes with a placeholder for every input, and runs nothing. The template is rendered by `mthds`' `renderInputsTemplate`, in its compact JSON shape, from the input-form descriptor one `POST /v1/pipe-io` call returns, which spends no inference. A `JSON` input, or one whose concept refines `JSON`, is written as the bare object it carries, `{}` to fill in, which a run reads literally. It takes no `--inputs`.
|
|
26
26
|
|
|
27
27
|
The run goes through the SDK's `startAndWaitForResult`: on the hosted API a durable start, then polls until the run ends, however long it takes, and on a bare runner the blocking execute. Its `onStarted` callback prints `Run started: <id>` on stderr as soon as the run exists ([`run-results.md`](run-results.md)). The poll reads only the `main_stuff` artifact.
|
|
28
28
|
|
|
@@ -75,7 +75,7 @@ Every error goes to stderr, its first line `Error: <sentence>` and the lines und
|
|
|
75
75
|
- **An answer the command cannot read**, a 2xx whose body the SDK could not read into what the route answers: `Error: the API's answer could not be read (status <n>).`, then `Reason: <the SDK's message>`, which names the route and what could not be read (`API POST /v1/start answered 202 with a body that is not JSON`), since such an answer carries no problem document, and `Request id: <id>` when its `X-Request-ID` header carries one.
|
|
76
76
|
- **A failed run**: `Error: run <id> ended with status <STATUS>.`, then `Reason: <the report's message>` (the problem's own sentence when the run has no report) and `Next step: <the report's advised action>`.
|
|
77
77
|
- **A method that does not load**: `Error: the method does not load.`, then one line per validation error that carries a string category and message, as ` - <file>: <message>`, or, when there is none, ` - <the answer's own message>`. It reads the same whichever request found it: the pipe I/O call of `--inputs-template` and `script`, or the input preparation of a run with inputs.
|
|
78
|
-
- **A pipe I/O answer the command cannot use** for `--inputs-template` and `script`: `Error: the API's pipe I/O answer says neither that the method loads nor why it does not.` when it carries no verdict, `Error: the API's pipe I/O answer does not describe the pipe it selected.` when it names no pipe, carries no input form or describes another pipe, and `Error: the API's pipe I/O answer describes the pipe it selected with a malformed input form.` when the selected pipe's entry is malformed where input preparation or the template reads it, such as an enum
|
|
78
|
+
- **A pipe I/O answer the command cannot use** for `--inputs-template` and `script`: `Error: the API's pipe I/O answer says neither that the method loads nor why it does not.` when it carries no verdict, `Error: the API's pipe I/O answer does not describe the pipe it selected.` when it names no pipe, carries no input form or describes another pipe, and `Error: the API's pipe I/O answer describes the pipe it selected with a malformed input form.` when the selected pipe's entry is malformed where input preparation or the template reads it, such as an enum whose `choices` is not a list of strings, a `concept_ref` that is not a string, a fixed list counting fewer than two elements or a `JSON` input that is not an object carrying `json_obj`, or names a kind the SDK does not know, rather than crashing or rendering a template under made-up keys. Neither command says where the input form is malformed, since the Python client refuses it whole when it parses the answer, and the Python command refuses more, such as a member the standard does not define.
|
|
79
79
|
- **A value at a file input that is no file**: `Error: the inputs hold a value at a file input that cannot be read as a file.`, then `Reason: <the SDK's message>` and the forms a file input takes. An unreadable local path reads `Error: Local file cannot be read: "<path>" (<reason>).`
|
|
80
80
|
- **An unreachable API**: `Error: could not reach the Pipelex API at <base URL> (<code>).`
|
|
81
81
|
- **A failed upload** of a file the inputs name: `Error: the upload of "<file>" failed (status <n>).`, the status left out when no answer came back, then `Reason: <the SDK's message>`, which says what the status means for an upload (a file past the size limit, a deployment without file upload, a credential refused), and `Next step:` and `Request id:` when the API's answer carries them. It covers the SDK's `RejectedAssetError`, `UploadAuthenticationError`, `UnsupportedUploadCapabilityError` and `UploadTransportError`, each of which names the file it was sending. It exits `1`, and no run starts.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@pipelex/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.72.0",
|
|
4
4
|
"description": "TypeScript SDK for the Pipelex hosted API — execute methods, manage runs, and call the product surface.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -80,7 +80,7 @@
|
|
|
80
80
|
"vitest": "^4.0.18"
|
|
81
81
|
},
|
|
82
82
|
"dependencies": {
|
|
83
|
-
"mthds": "^0.
|
|
83
|
+
"mthds": "^0.38.0",
|
|
84
84
|
"smol-toml": "^1.6.0",
|
|
85
85
|
"undici": "^7.29.1"
|
|
86
86
|
}
|