@usearazzo/runner 1.0.1-alpha.34 → 1.0.1-alpha.35

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 (44) hide show
  1. package/CHANGELOG.md +14 -0
  2. package/README.md +6 -1
  3. package/dist/arazzo-runner.browser.js +687 -317
  4. package/dist/arazzo-runner.browser.min.js +1 -1
  5. package/package.json +52 -7
  6. package/src/errors/ExecutionError.cjs +2 -0
  7. package/src/errors/ExecutionError.mjs +2 -0
  8. package/src/executor/OpenAPIOperationExecutor.cjs +58 -47
  9. package/src/executor/OpenAPIOperationExecutor.mjs +58 -47
  10. package/src/executor/WorkflowExecutor.cjs +302 -160
  11. package/src/executor/WorkflowExecutor.mjs +302 -160
  12. package/src/index.cjs +14 -0
  13. package/src/index.mjs +2 -0
  14. package/src/observability/EventChannel.cjs +30 -20
  15. package/src/observability/EventChannel.mjs +30 -23
  16. package/src/observability/Redactor.cjs +7 -5
  17. package/src/observability/Redactor.mjs +7 -5
  18. package/src/observability/combineObservers.cjs +18 -0
  19. package/src/observability/combineObservers.mjs +12 -0
  20. package/src/observability/instrument.cjs +159 -0
  21. package/src/observability/instrument.mjs +144 -0
  22. package/src/observability/logging/LoggingObserver.cjs +177 -0
  23. package/src/observability/logging/LoggingObserver.mjs +172 -0
  24. package/src/observability/logging/index.cjs +13 -0
  25. package/src/observability/logging/index.mjs +1 -0
  26. package/src/observability/opentelemetry/ArazzoRunnerInstrumentation.cjs +321 -0
  27. package/src/observability/opentelemetry/ArazzoRunnerInstrumentation.mjs +313 -0
  28. package/src/observability/opentelemetry/index.cjs +13 -0
  29. package/src/observability/opentelemetry/index.mjs +1 -0
  30. package/src/observability/stream/EventStream.cjs +112 -0
  31. package/src/observability/stream/EventStream.mjs +107 -0
  32. package/src/observability/stream/index.cjs +13 -0
  33. package/src/observability/stream/index.mjs +1 -0
  34. package/src/registry/DocumentRegistry.cjs +14 -9
  35. package/src/registry/DocumentRegistry.mjs +14 -9
  36. package/src/version.cjs +9 -0
  37. package/src/version.mjs +3 -0
  38. package/types/observability/logging/LoggingObserver.d.ts +82 -0
  39. package/types/observability/logging/index.d.ts +2 -0
  40. package/types/observability/opentelemetry/ArazzoRunnerInstrumentation.d.ts +84 -0
  41. package/types/observability/opentelemetry/index.d.ts +2 -0
  42. package/types/observability/stream/EventStream.d.ts +68 -0
  43. package/types/observability/stream/index.d.ts +2 -0
  44. package/types/runner.d.ts +131 -34
package/CHANGELOG.md CHANGED
@@ -3,6 +3,20 @@
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.35](https://github.com/usearazzo/arazzo-toolkit/compare/v1.0.1-alpha.34...v1.0.1-alpha.35) (2026-11-24)
7
+
8
+ ### Features
9
+
10
+ - **runner:** add observability adapters and OTel instrumentation ([#366](https://github.com/usearazzo/arazzo-toolkit/issues/366)), closes [#85](https://github.com/usearazzo/arazzo-toolkit/issues/85)
11
+
12
+ ### BREAKING CHANGES
13
+
14
+ - **runner:** event types use colon notation (workflow-start is now
15
+ workflow:start, openapi-operation-request-settled is
16
+ openapi:operation:request:settled, and so on), and the adapter subpaths
17
+ are @usearazzo/runner/observability/logging, /observability/stream and
18
+ /observability/opentelemetry.
19
+
6
20
  ## [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
21
 
8
22
  ### Features
package/README.md CHANGED
@@ -41,7 +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
+ - **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. Adapters log them through any logger (`@usearazzo/runner/observability/logging`) or stream them (`@usearazzo/runner/observability/stream`), masked by default, and an OpenTelemetry instrumentation (`@usearazzo/runner/observability/opentelemetry`) traces every run in the process. Folding a run's workflow events gives back its trace.
45
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.
46
46
 
47
47
  ## At a glance
@@ -144,6 +144,11 @@ const result = await runner.execute('authenticateAndOrderPet', {
144
144
  | Include request and response bodies in those events | `captureBodies` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
145
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
146
  | Mask credentials before logging or exporting events | `new Redactor().event(event)` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
147
+ | Send the events to several consumers at once | `combineObservers(...observers)` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
148
+ | Observe every runner in the process, and run code around each workflow and step | `instrument({ observer, wrap })` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
149
+ | Log a run through pino, winston, the console or any logger, masked | `loggingObserver(log)` from `@usearazzo/runner/observability/logging` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
150
+ | Read a run's events with `for await`, or pipe them as a `ReadableStream`, masked | `eventStream()` from `@usearazzo/runner/observability/stream` | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
151
+ | Trace every run with OpenTelemetry, with the HTTP spans of each step under it | `new ArazzoRunnerInstrumentation()` from `@usearazzo/runner/observability/opentelemetry`, listed with the SDK's instrumentations (needs `@opentelemetry/api`) | [Observing a run](https://usearazzo.com/docs/runner/#observability) |
147
152
  | Compose the building blocks yourself | `DocumentRegistry`, the executors | [Runner API Reference](https://usearazzo.com/docs/runner/) |
148
153
 
149
154
  Retrieving documents and calling APIs are separate: credentials for one never reach the other.