@pipelex/sdk 0.46.1 → 0.48.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.
Files changed (51) hide show
  1. package/README.md +20 -9
  2. package/dist/cli/script.d.ts +1 -1
  3. package/dist/cli/source.d.ts +8 -7
  4. package/dist/cli/source.js +11 -5
  5. package/dist/cli/source.js.map +1 -1
  6. package/dist/client.d.ts +455 -237
  7. package/dist/client.js +1067 -522
  8. package/dist/client.js.map +1 -1
  9. package/dist/errors.d.ts +49 -19
  10. package/dist/errors.js +50 -21
  11. package/dist/errors.js.map +1 -1
  12. package/dist/hooks/bundle-gather.d.ts +28 -40
  13. package/dist/hooks/bundle-gather.js +55 -230
  14. package/dist/hooks/bundle-gather.js.map +1 -1
  15. package/dist/hooks/claude-mthds-check.d.ts +7 -5
  16. package/dist/hooks/claude-mthds-check.js +8 -53
  17. package/dist/hooks/claude-mthds-check.js.map +1 -1
  18. package/dist/hooks/validate-stage.d.ts +27 -0
  19. package/dist/hooks/validate-stage.js +57 -0
  20. package/dist/hooks/validate-stage.js.map +1 -0
  21. package/dist/index.d.ts +7 -7
  22. package/dist/index.js +6 -3
  23. package/dist/index.js.map +1 -1
  24. package/dist/method-trees.d.ts +344 -0
  25. package/dist/method-trees.js +876 -0
  26. package/dist/method-trees.js.map +1 -0
  27. package/dist/models.d.ts +162 -59
  28. package/dist/prepare-inputs.d.ts +46 -27
  29. package/dist/prepare-inputs.js +123 -42
  30. package/dist/prepare-inputs.js.map +1 -1
  31. package/dist/product-models.d.ts +97 -75
  32. package/dist/runs.d.ts +5 -3
  33. package/dist/runs.js.map +1 -1
  34. package/dist/version.d.ts +1 -1
  35. package/dist/version.js +1 -1
  36. package/docs/architecture.md +20 -21
  37. package/docs/cli.md +1 -1
  38. package/docs/crate-routes.md +42 -20
  39. package/docs/errors.md +7 -6
  40. package/docs/hook-bundle.md +1 -1
  41. package/docs/input-preparation.md +15 -40
  42. package/docs/method-trees.md +199 -0
  43. package/docs/run-results.md +5 -2
  44. package/package.json +2 -2
  45. package/dist/bundle-resources.d.ts +0 -62
  46. package/dist/bundle-resources.js +0 -165
  47. package/dist/bundle-resources.js.map +0 -1
  48. package/dist/method-source.d.ts +0 -19
  49. package/dist/method-source.js +0 -50
  50. package/dist/method-source.js.map +0 -1
  51. package/docs/bundle-resources.md +0 -107
package/README.md CHANGED
@@ -42,16 +42,20 @@ See [`docs/cli.md`](./docs/cli.md) for every flag, the output, the exit codes an
42
42
  import { PipelexApiClient } from "@pipelex/sdk";
43
43
 
44
44
  // Base URL + key from PIPELEX_BASE_URL / PIPELEX_API_KEY, or pass them explicitly.
45
+ // `requestTimeoutMs` sets the client's request ceiling, twenty minutes by default.
45
46
  const client = new PipelexApiClient({
46
47
  baseUrl: "https://api.pipelex.com",
47
48
  apiKey: process.env.PIPELEX_API_KEY,
48
49
  });
49
50
 
50
- // Validate an MTHDS bundle (a 200-diagnostic verdict, discriminated on `is_valid`).
51
- const report = await client.validate(["domain = 'demo'"]);
51
+ // Validate a method from its directory (a 200-diagnostic verdict, discriminated on `is_valid`).
52
+ const report = await client.validate({ directory: "methods/demo" });
52
53
  if (report.is_valid) {
53
54
  // Run it and wait for the result (durable start + poll on the hosted API).
54
- const result = await client.startAndWaitForResult({ pipe_code: "demo.greet" });
55
+ const result = await client.startAndWaitForResult({
56
+ directory: "methods/demo",
57
+ pipe_code: "demo.greet",
58
+ });
55
59
  // Every completed run delivers a resolved `main_stuff`, and every named stuff of
56
60
  // the run in `working_memory`.
57
61
  console.log(result.main_stuff);
@@ -113,6 +117,7 @@ A reference the runner cannot read at all (blank, a sigil alone, too long) or an
113
117
  The hosted management surface (catalog, account, billing) hangs off the same client. Every route maps a non-2xx `problem+json` to a typed `ApiResponseError` (see [Errors](#errors) for how to branch on it):
114
118
 
115
119
  ```ts
120
+ import { listMethodTree } from "mthds";
116
121
  import { PipelexApiClient, ApiResponseError, parseMethodSelector } from "@pipelex/sdk";
117
122
 
118
123
  const client = new PipelexApiClient({ apiKey: process.env.PIPELEX_API_KEY });
@@ -124,13 +129,16 @@ const drafts = await client.listMethods({ published: false });
124
129
  for await (const method of client.iterateMethods()) {
125
130
  // follows the cursor for callers that genuinely want the whole catalog
126
131
  }
127
- const created = await client.createMethod({ name: "Greeter", mthds: "domain = 'demo'" });
132
+ // A saved method is a method tree: list one from a directory, under the deployment's limits,
133
+ // and the save sends it inline when small, or by hash after uploading the files it lacks.
134
+ const tree = await listMethodTree("methods/greeter", { limits: await client.methodTreeLimits() });
135
+ const created = await client.createMethod({ name: "Greeter", tree });
128
136
 
129
137
  // A saved method has a draft, written freely and never validated, and immutable published
130
- // versions. `updated_at` is the draft's token: echo it so no write or publish takes a draft
131
- // you have not seen.
138
+ // versions. A draft write replaces the whole tree. `updated_at` is the draft's token: echo it so
139
+ // no write or publish takes a draft you have not seen.
132
140
  const draft = await client.writeDraft(created.method_id, {
133
- mthds: "domain = 'demo'\n",
141
+ contents: { "main.mthds": "domain = 'demo'\n" },
134
142
  expected_updated_at: created.updated_at,
135
143
  });
136
144
  const published = await client.publishMethod(created.method_id, {
@@ -140,6 +148,9 @@ if (published.outcome === "refused") console.error(published.message, published.
140
148
  else console.log(`version ${published.version.version}`); // "published" or "unchanged"
141
149
  const versions = await client.listMethodVersions(created.method_id); // newest first
142
150
  const { method_id, version } = parseMethodSelector("mt_abc123@3"); // the method routes take a bare id
151
+ // A read lists the tree's files with short-lived links; write them to disk, checked (Node only).
152
+ const detail = await client.getMethod(created.method_id);
153
+ await client.writeMethodTree(detail.files, { destination: "greeter-draft" });
143
154
 
144
155
  // A saved example is a named set of inputs with the latest run of exactly those inputs. Record a
145
156
  // run against the revision whose inputs it used: an edit since answers `stale`, never an error.
@@ -243,10 +254,10 @@ These pages ship inside the published package, so a reader who has only installe
243
254
  | [`docs/run-usage.md`](./docs/run-usage.md) | What a run consumed, record by record, and `summarizeUsage` which folds them into one reading |
244
255
  | [`docs/artifact-download.md`](./docs/artifact-download.md) | Turning the `pipelex-storage://` references a run produced back into bytes: `locateArtifacts`, `collectArtifacts`, `resolveArtifacts`, `fetchArtifact`, `downloadArtifacts`, and how a saved file is named after the field it fills |
245
256
  | [`docs/input-preparation.md`](./docs/input-preparation.md) | The other direction — `uploadFile` and `prepareInputs`, which turn local files into references a run can take, and the upload grant a browser page sends a file with |
246
- | [`docs/bundle-resources.md`](./docs/bundle-resources.md) | Sending the files a bundle's steps read, such as a `PipeDocGen` step's template, as `resources` beside its `.mthds` contents: where they go, what is refused and by whom, and the template check's warnings |
257
+ | [`docs/method-trees.md`](./docs/method-trees.md) | A method's tree: the four forms a run, a validation, a save and the crate routes take it in (a directory on disk among them), how it travels inline or by hash and what is uploaded, the files a step reads, the template check's warnings and which step reads which file of the tree, the deployment's limits, the read's listing with its links, `writeMethodTree`, and `MethodFileTransferError` |
247
258
  | [`docs/method-examples.md`](./docs/method-examples.md) | A method's saved examples: the create, the paged list and its iterator, the edit that raises the input revision, the latest-run write and its `recorded` or `stale` verdict, how an integer past `Number.MAX_SAFE_INTEGER` in the inputs stays exact, and what is refused before sending |
248
259
  | [`docs/exact-integers.md`](./docs/exact-integers.md) | Which reads keep an integer past `Number.MAX_SAFE_INTEGER` exact, as a `bigint` (a run's inputs and outputs, an example's inputs), how a request body writes it back with its digits, and `parseExactJson` and `stringifyExactJson` for code showing such data as JSON text |
249
- | [`docs/crate-routes.md`](./docs/crate-routes.md) | `resolve`, `codegen` and `pipeIo` — the normalized crate, the stamped types, and a method's I/O artifacts without a validation — and the offline `runCodegenCheck` that guards a committed tree |
260
+ | [`docs/crate-routes.md`](./docs/crate-routes.md) | `resolve`, `codegen` and `pipeIo` — the method's tree as the protocol's `files` map, with its dependencies, the normalized crate, the stamped types, and a method's I/O artifacts without a validation — and the offline `runCodegenCheck` that guards a committed tree |
250
261
  | [`docs/client-identification.md`](./docs/client-identification.md) | The `User-Agent` every API request carries, and `appInfo`, the option that puts your program's name in front of it |
251
262
  | [`docs/errors.md`](./docs/errors.md) | The verdict every error carries (`retryable`, `errorDomain`, `errorVerdictOf`), a failed run's stored error report on `RunFailedError` and `RunRead`, and every member of a refused request's `ApiResponseError`, with the fields to branch on |
252
263
 
@@ -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.46.1";
18
+ export declare const SCRIPT_RUNNER = "npx --yes --no-update-notifier --loglevel=warn @pipelex/sdk@0.48.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. */
@@ -1,9 +1,13 @@
1
1
  /**
2
2
  * The method as each route names it, and the one pipe I/O call that checks it.
3
3
  *
4
- * A bundle read from disk travels to the pipe I/O route as `files`, each file under its name in the
5
- * bundle, and to the run as `mthds_contents`, in the same order. An address travels as
6
- * `method_ref` and a catalog id as `method_id`, both resolved by the server.
4
+ * A bundle read from disk travels to the pipe I/O route as the method's tree, given as the `files`
5
+ * map, each file's text under its name in the bundle, sent as given; and to the run as the runner's
6
+ * `mthds_contents`, in the bundle's order, through the client's `extra` passthrough, as the Python
7
+ * CLI sends it: the client names only the method's tree on a run. The case files both CLIs run pin
8
+ * both bodies, the whole bundle inline with no version handshake before it, until the command
9
+ * sends a method's tree as the SDKs do. An address travels as `method_ref` and a catalog id as
10
+ * `method_id`, both resolved by the server.
7
11
  */
8
12
  import type { PipeInputFormDescriptor, PipelexApiClient, PipeIOValidReport, PipelexStartOptions } from "../index.js";
9
13
  import type { BundleFile } from "./bundle.js";
@@ -20,10 +24,7 @@ export type MethodSource = {
20
24
  };
21
25
  /** The method as the crate routes and the input preparation name it. */
22
26
  export type CrateSelector = {
23
- files: Array<{
24
- content: string;
25
- source: string;
26
- }>;
27
+ files: Record<string, string>;
27
28
  } | {
28
29
  method_ref: string;
29
30
  } | {
@@ -1,9 +1,13 @@
1
1
  /**
2
2
  * The method as each route names it, and the one pipe I/O call that checks it.
3
3
  *
4
- * A bundle read from disk travels to the pipe I/O route as `files`, each file under its name in the
5
- * bundle, and to the run as `mthds_contents`, in the same order. An address travels as
6
- * `method_ref` and a catalog id as `method_id`, both resolved by the server.
4
+ * A bundle read from disk travels to the pipe I/O route as the method's tree, given as the `files`
5
+ * map, each file's text under its name in the bundle, sent as given; and to the run as the runner's
6
+ * `mthds_contents`, in the bundle's order, through the client's `extra` passthrough, as the Python
7
+ * CLI sends it: the client names only the method's tree on a run. The case files both CLIs run pin
8
+ * both bodies, the whole bundle inline with no version handshake before it, until the command
9
+ * sends a method's tree as the SDKs do. An address travels as `method_ref` and a catalog id as
10
+ * `method_id`, both resolved by the server.
7
11
  */
8
12
  import { inputFormFault } from "../index.js";
9
13
  import { CommandError, EXIT_FAILED, untilInterrupted } from "./io.js";
@@ -11,7 +15,9 @@ import { loadFailureLines, METHOD_DOES_NOT_LOAD_SENTENCE } from "./present.js";
11
15
  export function crateSelector(source) {
12
16
  switch (source.kind) {
13
17
  case "bundle":
14
- return { files: source.files.map((file) => ({ content: file.content, source: file.name })) };
18
+ return {
19
+ files: Object.fromEntries(source.files.map((file) => [file.name, file.content])),
20
+ };
15
21
  case "address":
16
22
  return { method_ref: source.methodRef };
17
23
  case "catalog":
@@ -22,7 +28,7 @@ export function crateSelector(source) {
22
28
  export function runSelector(source) {
23
29
  switch (source.kind) {
24
30
  case "bundle":
25
- return { mthds_contents: source.files.map((file) => file.content) };
31
+ return { extra: { mthds_contents: source.files.map((file) => file.content) } };
26
32
  case "address":
27
33
  return { method_ref: source.methodRef };
28
34
  case "catalog":
@@ -1 +1 @@
1
- {"version":3,"file":"source.js","sourceRoot":"","sources":["../../src/cli/source.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAUH,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAE7C,O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