@usearazzo/runner 1.0.1-alpha.26 → 1.0.1-alpha.28

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/CHANGELOG.md CHANGED
@@ -3,6 +3,30 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ ## [1.0.1-alpha.28](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.27...v1.0.1-alpha.28) (2026-11-11)
7
+
8
+ ### Features
9
+
10
+ - **runner:** add reference options for document retrieval ([#343](https://github.com/usearazzo/arazzo-toolkit/issues/343)) ([e26323c](https://github.com/usearazzo/arazzo-toolkit/commit/e26323cafe9a15e89e5e327ce7cee74deefb4cf8)), closes [#310](https://github.com/usearazzo/arazzo-toolkit/issues/310)
11
+
12
+ ## [1.0.1-alpha.27](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.26...v1.0.1-alpha.27) (2026-11-08)
13
+
14
+ ### Bug Fixes
15
+
16
+ - **runner:** check action parameters before the first request ([#335](https://github.com/usearazzo/arazzo-toolkit/issues/335)) ([39f78a2](https://github.com/usearazzo/arazzo-toolkit/commit/39f78a2bb5f5aaa7f94d7b106a54fe0c879f97b6)), closes [#115](https://github.com/usearazzo/arazzo-toolkit/issues/115)
17
+ - **validator:** handle nested Arazzo sources and in on action params ([#336](https://github.com/usearazzo/arazzo-toolkit/issues/336)) ([b984d15](https://github.com/usearazzo/arazzo-toolkit/commit/b984d157ea67e8ffde1951475820af3c73c38bf5)), closes [speclynx/apidom#769](https://github.com/speclynx/apidom/issues/769) [speclynx/api-languageservice#106](https://github.com/speclynx/api-languageservice/issues/106) [#197](https://github.com/usearazzo/arazzo-toolkit/issues/197) [#115](https://github.com/usearazzo/arazzo-toolkit/issues/115)
18
+
19
+ ### Features
20
+
21
+ - **runner:** pass action parameters to referenced workflows ([#334](https://github.com/usearazzo/arazzo-toolkit/issues/334)) ([a65eb68](https://github.com/usearazzo/arazzo-toolkit/commit/a65eb68166575fed1a20c8c69f410556ff896dcc)), closes [speclynx/apidom#751](https://github.com/speclynx/apidom/issues/751) [#115](https://github.com/usearazzo/arazzo-toolkit/issues/115) [#62](https://github.com/usearazzo/arazzo-toolkit/issues/62)
22
+
23
+ ### BREAKING CHANGES
24
+
25
+ - **runner:** StepExecutionResult gains a required `actionContext`
26
+ field, so a StepExecutionResult built outside StepExecutor.execute (a
27
+ stub or an override returning the previous shape) no longer type-checks
28
+ until it supplies one.
29
+
6
30
  ## [1.0.1-alpha.26](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.25...v1.0.1-alpha.26) (2026-11-05)
7
31
 
8
32
  ### Bug Fixes
package/README.md CHANGED
@@ -25,7 +25,7 @@ It loads the workflow and the OpenAPI documents its source descriptions point at
25
25
  Use it to test an API flow end to end in CI, to drive a workflow from your own service, or to let an agent run a workflow instead of improvising the calls. It handles:
26
26
 
27
27
  - **Steps.** Parameters and request bodies resolved from runtime expressions, `successCriteria` evaluated (`simple`, `regex`, `jsonpath`, `xpath`), `outputs` resolved from the response.
28
- - **Control flow.** `goto`, `retry` (with `retryLimit`, `retryAfter`, and references), and `end`, as the specification defines them, with workflow-level default actions and parameters.
28
+ - **Control flow.** `goto`, `retry` (with `retryLimit`, `retryAfter`, and references), and `end`, as the specification defines them, with workflow-level default actions and parameters, and action `parameters` as the inputs of a `goto` or `retry` workflow target.
29
29
  - **Composition.** Sub-workflow steps, `dependsOn` prerequisites, one-way transfer to another workflow, and workflows in other Arazzo documents.
30
30
  - **Your HTTP stack.** Global `fetch` by default, or any client you plug in. Credentials go in through a request interceptor, since Arazzo is auth-agnostic.
31
31
 
@@ -110,7 +110,7 @@ const result = await runner.execute('authenticateAndOrderPet', {
110
110
  });
111
111
  ```
112
112
 
113
- `runner.document` and `runner.registry` are the loaded entry document and the registry holding its source descriptions; unless you pass one, every runner `load` returns has a registry of its own. `load` takes the seams of the building blocks it wires: `registry` (one registry backs one entry document, so loading a different document into it throws `InvalidEntryDocumentError`), `httpClient` and `requestInterceptor`, and the workflow executor's `maxSteps`, `maxWorkflowDepth`, `sleep` and `now`. To bind a runner to a document you already acquired, use `new ArazzoRunner({ document, registry })`; it throws `InvalidEntryDocumentError` unless `document` is the entry document of `registry`.
113
+ `runner.document` and `runner.registry` are the loaded entry document and the registry holding its source descriptions; unless you pass one, every runner `load` returns has a registry of its own. `load` takes the seams of the building blocks it wires: `registry` (one registry backs one entry document, so loading a different document into it throws `InvalidEntryDocumentError`), `reference` (how documents are retrieved, see below), `httpClient` and `requestInterceptor`, and the workflow executor's `maxSteps`, `maxWorkflowDepth`, `sleep` and `now`. To bind a runner to a document you already acquired, use `new ArazzoRunner({ document, registry })`; it throws `InvalidEntryDocumentError` unless `document` is the entry document of `registry`.
114
114
 
115
115
  To see what a document offers before running it, `runner.document.listWorkflows()` returns a `WorkflowDescriptor` for each workflow `execute` accepts, in document order: its `workflowId`, its `jsonPointer` in the document and, when the document gives them as strings, its `summary` and `description`. It reads the entry document only; source descriptions are not loaded.
116
116
 
@@ -138,6 +138,32 @@ const runner = await ArazzoRunner.load(uri, {
138
138
 
139
139
  The two combine: the interceptor changes the request, and the client sends it. Both are options of `OpenAPIOperationExecutor` too, for when you compose the building blocks yourself.
140
140
 
141
+ Retrieving documents is separate from calling APIs. The entry document, its source descriptions and every externally referenced document are fetched by [ApiDOM reference](https://github.com/speclynx/apidom/tree/main/packages/apidom-reference#resolver-plugin-options), which `httpClient` and `requestInterceptor` never touch, so credentials for an API do not reach a host that only serves a document. Configure it with `reference`, which takes its `resolve` options; here a client certificate (mutual TLS) for both sides:
142
+
143
+ ```js
144
+ import https from 'node:https';
145
+ import { fetch, Agent } from 'undici';
146
+
147
+ const tls = { cert, key, ca };
148
+ const dispatcher = new Agent({ connect: tls });
149
+
150
+ const runner = await ArazzoRunner.load(uri, {
151
+ // document retrieval
152
+ reference: {
153
+ resolve: { resolverOpts: { axiosConfig: { httpsAgent: new https.Agent(tls) } } },
154
+ },
155
+ // API calls
156
+ httpClient: (request) => fetch(request.url, { ...request, dispatcher }),
157
+ });
158
+ ```
159
+
160
+ For documents behind an API key or token, add the header per origin with `axiosConfig.interceptors.request`; plain `axiosConfig.headers` are sent to every host a document or reference points at. In the errors of failed downloads, standard credentials such as the `Authorization` header are masked. A custom header is masked only when listed in `axiosConfig.redact`, and that list replaces the default one, so spread ApiDOM's `HTTPResolverAxios.defaultRedact` into it. Credentials embedded in a URL are not masked.
161
+
162
+ Two things to know:
163
+
164
+ - A `registry` of your own is configured through its providers (`new ArazzoDocumentRegistryProvider({ resolve })`, `new OpenAPIDocumentRegistryProvider({ resolve })`, both need the options). Pass the same options to `load` as `reference` too: they then reach the normalizers, which fetch external references.
165
+ - Retrieved documents are cached per process by URL, for all registries. A registry whose providers get an HTTP resolver of their own in `resolve.resolvers` has a private cache; `resolvers` replaces the default list, so include a file resolver if you load local documents.
166
+
141
167
  ## Documentation
142
168
 
143
169
  The example above is the happy path. Everything else is on [usearazzo.com](https://usearazzo.com/):