@usearazzo/runner 1.0.1-alpha.32 → 1.0.1-alpha.34
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 +29 -0
- package/README.md +10 -1
- package/dist/arazzo-runner.browser.js +1789 -403
- package/dist/arazzo-runner.browser.min.js +1 -1
- package/package.json +18 -17
- package/src/ArazzoRunner.cjs +26 -3
- package/src/ArazzoRunner.mjs +26 -3
- package/src/action/ActionResolver.cjs +13 -12
- package/src/action/ActionResolver.mjs +13 -12
- package/src/client/OpenAPIOperationResponse.cjs +9 -0
- package/src/client/OpenAPIOperationResponse.mjs +9 -0
- package/src/criterion/CriterionEvaluator.cjs +13 -8
- package/src/criterion/CriterionEvaluator.mjs +13 -8
- package/src/criterion/SimpleCriterionEvaluator.cjs +5 -3
- package/src/criterion/SimpleCriterionEvaluator.mjs +6 -4
- package/src/document/APIDocument.cjs +53 -0
- package/src/document/APIDocument.mjs +53 -0
- package/src/executor/OpenAPIOperationExecutor.cjs +66 -6
- package/src/executor/OpenAPIOperationExecutor.mjs +66 -6
- package/src/executor/OpenAPIOperationLocatorNormalizer.cjs +1 -1
- package/src/executor/OpenAPIOperationLocatorNormalizer.mjs +1 -1
- package/src/executor/StepExecutor.cjs +34 -15
- package/src/executor/StepExecutor.mjs +34 -15
- package/src/executor/StepRetryRunner.cjs +5 -3
- package/src/executor/StepRetryRunner.mjs +5 -3
- package/src/executor/StepTransitionInterpreter.cjs +1 -1
- package/src/executor/StepTransitionInterpreter.mjs +1 -1
- package/src/executor/WorkflowCallStack.cjs +1 -1
- package/src/executor/WorkflowCallStack.mjs +1 -1
- package/src/executor/WorkflowExecutor.cjs +277 -61
- package/src/executor/WorkflowExecutor.mjs +277 -61
- package/src/expression/RuntimeExpressionEvaluator.cjs +52 -9
- package/src/expression/RuntimeExpressionEvaluator.mjs +52 -9
- package/src/index.cjs +7 -0
- package/src/index.mjs +2 -0
- package/src/observability/ArazzoRunnerEvent.cjs +5 -0
- package/src/observability/ArazzoRunnerEvent.mjs +1 -0
- package/src/observability/DocumentRegistryEvent.cjs +5 -0
- package/src/observability/DocumentRegistryEvent.mjs +1 -0
- package/src/observability/EventChannel.cjs +96 -0
- package/src/observability/EventChannel.mjs +91 -0
- package/src/observability/OpenAPIOperationEvent.cjs +5 -0
- package/src/observability/OpenAPIOperationEvent.mjs +1 -0
- package/src/observability/Redactor.cjs +213 -0
- package/src/observability/Redactor.mjs +208 -0
- package/src/observability/WorkflowExecutionEvent.cjs +5 -0
- package/src/observability/WorkflowExecutionEvent.mjs +1 -0
- package/src/registry/DocumentRegistry.cjs +57 -11
- package/src/registry/DocumentRegistry.mjs +57 -11
- package/src/registry/providers/ArazzoDocumentRegistryProvider.cjs +21 -0
- package/src/registry/providers/ArazzoDocumentRegistryProvider.mjs +22 -1
- package/src/registry/providers/DocumentRegistryProvider.cjs +33 -1
- package/src/registry/providers/DocumentRegistryProvider.mjs +33 -1
- package/src/registry/providers/OpenAPIDocumentRegistryProvider.cjs +28 -5
- package/src/registry/providers/OpenAPIDocumentRegistryProvider.mjs +28 -5
- package/src/resolver/ArazzoValueResolver.cjs +6 -3
- package/src/resolver/ArazzoValueResolver.mjs +6 -3
- package/src/resolver/OpenAPIOperationParameterResolver.cjs +2 -2
- package/src/resolver/OpenAPIOperationParameterResolver.mjs +2 -2
- package/src/resolver/OutputResolver.cjs +10 -3
- package/src/resolver/OutputResolver.mjs +10 -3
- package/src/resolver/RequestBodyResolver.cjs +37 -17
- package/src/resolver/RequestBodyResolver.mjs +37 -17
- package/src/resolver/WorkflowParameterResolver.cjs +2 -2
- package/src/resolver/WorkflowParameterResolver.mjs +2 -2
- package/types/runner.d.ts +788 -41
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,35 @@
|
|
|
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.34](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.33...v1.0.1-alpha.34) (2026-11-19)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **runner:** emit HTTP request events, redact at export ([#356](https://github.com/usearazzo/arazzo-toolkit/issues/356)) ([e872d25](https://github.com/usearazzo/arazzo-toolkit/commit/e872d25bc6af721c25b0cf0aec515ebf4ab785f3)), closes [#85](https://github.com/usearazzo/arazzo-toolkit/issues/85)
|
|
11
|
+
- **runner:** emit structured execution events to an observer ([#355](https://github.com/usearazzo/arazzo-toolkit/issues/355)) ([3eacded](https://github.com/usearazzo/arazzo-toolkit/commit/3eacdedf2dd777a404433f69e3747006f48ce877)), closes [#85](https://github.com/usearazzo/arazzo-toolkit/issues/85)
|
|
12
|
+
- **runner:** locate events and trace records in their documents ([#362](https://github.com/usearazzo/arazzo-toolkit/issues/362)) ([013c4cb](https://github.com/usearazzo/arazzo-toolkit/commit/013c4cb9d2abb7da3452e44ecf2496007fd9a6b8)), closes [#85](https://github.com/usearazzo/arazzo-toolkit/issues/85)
|
|
13
|
+
|
|
14
|
+
## [1.0.1-alpha.33](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.32...v1.0.1-alpha.33) (2026-11-16)
|
|
15
|
+
|
|
16
|
+
### Bug Fixes
|
|
17
|
+
|
|
18
|
+
- **runner:** resolve $sourceDescriptions targets through acquire ([#354](https://github.com/usearazzo/arazzo-toolkit/issues/354)), closes [#74](https://github.com/usearazzo/arazzo-toolkit/issues/74)
|
|
19
|
+
|
|
20
|
+
### BREAKING CHANGES
|
|
21
|
+
|
|
22
|
+
- **runner:** DocumentRegistry.get is removed; use acquire.
|
|
23
|
+
RuntimeExpressionEvaluator.evaluate, interpolate and resolve return
|
|
24
|
+
Promises. So do CriterionEvaluator.evaluate,
|
|
25
|
+
SimpleCriterionEvaluator.evaluate, ActionResolver.resolveOnSuccess and
|
|
26
|
+
resolveOnFailure, the abstract StepParameterResolver.resolve and the
|
|
27
|
+
protected ArazzoValueResolver.resolveValue, the resolve method of
|
|
28
|
+
OpenAPIOperationParameterResolver, WorkflowParameterResolver,
|
|
29
|
+
OutputResolver and RequestBodyResolver, and StepExecutor.evaluateCriteria
|
|
30
|
+
and selectActions. Resolver callbacks and CriterionPredicate may return
|
|
31
|
+
a Promise. A $sourceDescriptions reference whose document cannot be
|
|
32
|
+
loaded rejects with the load error unless it names a Source Description
|
|
33
|
+
field.
|
|
34
|
+
|
|
6
35
|
## [1.0.1-alpha.32](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.31...v1.0.1-alpha.32) (2026-11-13)
|
|
7
36
|
|
|
8
37
|
### Bug Fixes
|
package/README.md
CHANGED
|
@@ -41,6 +41,7 @@ Use it to test an API flow end to end in CI, to drive a workflow from your own s
|
|
|
41
41
|
- **Steps.** Parameters and request bodies resolved from runtime expressions, `successCriteria` evaluated (`simple`, `regex`, `jsonpath`, `xpath`), `outputs` resolved from the response.
|
|
42
42
|
- **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.
|
|
43
43
|
- **Composition.** Sub-workflow steps, `dependsOn` prerequisites, one-way transfer to another workflow, and workflows in other Arazzo documents.
|
|
44
|
+
- **Observability.** A typed event stream while the run happens: workflows, dependencies, steps, attempts, criterion outcomes and selected actions, plus document loads, normalization, request assembly and every request sent with its response (bodies on request) underneath. Events carry what the run saw, credentials included; a `Redactor` masks them by name before they leave the process. Folding a run's workflow events gives back its trace.
|
|
44
45
|
- **Your HTTP stack.** Global `fetch` by default, or any client you plug in. Arazzo is auth-agnostic, so credentials come from you: static ones per API, or a request interceptor.
|
|
45
46
|
|
|
46
47
|
## At a glance
|
|
@@ -58,7 +59,11 @@ A runner is four building blocks, composed bottom-up; `ArazzoRunner` composes th
|
|
|
58
59
|
<img alt="Runner architecture: WorkflowExecutor runs steps through StepExecutor, which runs OpenAPI operations through OpenAPIOperationExecutor and the HTTPClient; DocumentRegistry supplies documents to all three executors" src="https://raw.githubusercontent.com/usearazzo/arazzo-toolkit/main/packages/runner/assets/architecture.svg">
|
|
59
60
|
</p>
|
|
60
61
|
|
|
61
|
-
|
|
62
|
+
### Failed runs and errors
|
|
63
|
+
|
|
64
|
+
A failed run is a result, not an exception. When a step's criteria go unmet, the run resolves with `status: 'failed'`. A criterion that can't be evaluated, such as an invalid regex, counts as unmet. Each step in `result.steps` lists its criteria and whether each was met ([The result](https://usearazzo.com/docs/runner/#result)).
|
|
65
|
+
|
|
66
|
+
Only three things throw: a document that can't be loaded or run as written, a request that can't be built or sent, and a cancelled run. Every such error extends `ArazzoRunnerError`, and most carry a `reason` to compare against static fields such as `ExecutionError.WorkflowNotFound` ([Errors](https://usearazzo.com/docs/runner/#errors)).
|
|
62
67
|
|
|
63
68
|
## Installation
|
|
64
69
|
|
|
@@ -135,6 +140,10 @@ const result = await runner.execute('authenticateAndOrderPet', {
|
|
|
135
140
|
| Use another HTTP stack, a proxy or a client certificate for API calls | `httpClient` | [The HTTP client](https://usearazzo.com/docs/runner/#http-client) |
|
|
136
141
|
| Load documents behind credentials or mutual TLS | `reference` on `load` | [Document retrieval](https://usearazzo.com/docs/runner/#document-retrieval) |
|
|
137
142
|
| Cancel a run | `signal` | [Cancellation](https://usearazzo.com/docs/runner/#cancellation) |
|
|
143
|
+
| Watch a run as it happens (progress, logs, debugging) | `observer` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
|
|
144
|
+
| Include request and response bodies in those events | `captureBodies` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
|
|
145
|
+
| Give each `location` (on events, and on the result's steps and criteria) its range in the document, not only its JSON Pointer | `sourceMap` on `load` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
|
|
146
|
+
| Mask credentials before logging or exporting events | `new Redactor().event(event)` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
|
|
138
147
|
| Compose the building blocks yourself | `DocumentRegistry`, the executors | [Runner API Reference](https://usearazzo.com/docs/runner/) |
|
|
139
148
|
|
|
140
149
|
Retrieving documents and calling APIs are separate: credentials for one never reach the other.
|