brass-runtime 1.15.0 → 1.16.1

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 (209) hide show
  1. package/CHANGELOG.md +17 -0
  2. package/README.md +673 -136
  3. package/dist/agent/cli/main.cjs +40 -35
  4. package/dist/agent/cli/main.js +9 -4
  5. package/dist/agent/cli/main.mjs +9 -4
  6. package/dist/agent/index.cjs +8 -4
  7. package/dist/agent/index.d.ts +1 -1
  8. package/dist/agent/index.js +7 -3
  9. package/dist/agent/index.mjs +7 -3
  10. package/dist/chunk-2HQTDLHF.mjs +683 -0
  11. package/dist/chunk-36I3M4UC.mjs +370 -0
  12. package/dist/chunk-3AYM6WPJ.js +1629 -0
  13. package/dist/chunk-3LOYJFRR.cjs +300 -0
  14. package/dist/chunk-3RG5ZIWI.js +10 -0
  15. package/dist/chunk-3Y2RIUMM.js +300 -0
  16. package/dist/{chunk-VEZNF5GZ.cjs → chunk-4ROBZFL6.cjs} +130 -126
  17. package/dist/{chunk-3QMOKAS5.js → chunk-52OB2ROS.js} +9 -5
  18. package/dist/chunk-52PPNNI4.cjs +416 -0
  19. package/dist/chunk-5EC274J5.cjs +2874 -0
  20. package/dist/chunk-5QC7LRZ3.js +229 -0
  21. package/dist/chunk-5VRJNBLZ.mjs +2874 -0
  22. package/dist/chunk-62AZW6UT.cjs +313 -0
  23. package/dist/chunk-6IXXWIUM.js +683 -0
  24. package/dist/chunk-74ZTY6CP.js +2871 -0
  25. package/dist/chunk-76YMRMH2.cjs +777 -0
  26. package/dist/chunk-7CMJS3QE.mjs +2871 -0
  27. package/dist/{chunk-4NHES7VK.mjs → chunk-7JIJOVCT.js} +27 -13
  28. package/dist/chunk-A2OM6NEH.mjs +194 -0
  29. package/dist/chunk-AGR5B2BC.cjs +683 -0
  30. package/dist/chunk-AVNQLJ5V.js +777 -0
  31. package/dist/chunk-B33ICAKP.js +313 -0
  32. package/dist/{chunk-ELOOF35R.mjs → chunk-B5JD23U7.mjs} +1 -1
  33. package/dist/chunk-BABBZK4Y.js +2024 -0
  34. package/dist/chunk-C3MDXTRZ.js +354 -0
  35. package/dist/chunk-CIZFIMK5.js +2193 -0
  36. package/dist/chunk-CZIVE6NT.cjs +354 -0
  37. package/dist/chunk-DNFJLJMW.mjs +354 -0
  38. package/dist/chunk-DNFO2EIZ.mjs +777 -0
  39. package/dist/chunk-EJ6BPYVR.mjs +416 -0
  40. package/dist/chunk-ENKODRU3.cjs +2193 -0
  41. package/dist/chunk-EOC4UHBS.mjs +229 -0
  42. package/dist/{chunk-BMH5AV44.js → chunk-FH2X7BVP.js} +756 -440
  43. package/dist/{chunk-PPUXIH5R.js → chunk-FHQGHPMO.mjs} +27 -13
  44. package/dist/{chunk-TGIFUAK4.cjs → chunk-GLE2WY7Z.cjs} +951 -635
  45. package/dist/{chunk-BDF4AMWX.mjs → chunk-GYM3LLGS.mjs} +756 -440
  46. package/dist/chunk-HLWLMW2F.mjs +2024 -0
  47. package/dist/chunk-JF5WGYJJ.cjs +194 -0
  48. package/dist/chunk-KH4SYAOS.mjs +1629 -0
  49. package/dist/chunk-KN32XNTH.mjs +313 -0
  50. package/dist/chunk-KQLYONSE.cjs +2871 -0
  51. package/dist/{chunk-STVLQ3XD.cjs → chunk-KZJQ723N.cjs} +92 -78
  52. package/dist/chunk-L2SYFEBS.js +194 -0
  53. package/dist/chunk-L6VB5N7Q.cjs +104 -0
  54. package/dist/{chunk-K6M7MDZ4.mjs → chunk-MBEJI5HF.mjs} +9 -5
  55. package/dist/chunk-MIIYDLGM.js +2874 -0
  56. package/dist/chunk-MOO4L7F4.mjs +104 -0
  57. package/dist/chunk-MT3OWDPC.mjs +2193 -0
  58. package/dist/chunk-MVGUEJ5Z.cjs +370 -0
  59. package/dist/chunk-OBGZSXTJ.cjs +10 -0
  60. package/dist/chunk-PD4EJTQC.cjs +229 -0
  61. package/dist/chunk-PWC3RBQE.mjs +300 -0
  62. package/dist/chunk-Q2I37RP3.cjs +1629 -0
  63. package/dist/chunk-RKGKFN2A.js +416 -0
  64. package/dist/{chunk-R3R2FVLG.cjs → chunk-SA6HUJVI.cjs} +5 -5
  65. package/dist/chunk-TRM4JUZQ.js +104 -0
  66. package/dist/chunk-UB4B6OFY.js +370 -0
  67. package/dist/{chunk-TO7IKXYT.js → chunk-UCUBNWM2.js} +1 -1
  68. package/dist/chunk-VN44DYYT.cjs +2024 -0
  69. package/dist/chunk-Y6FXYEAI.mjs +10 -0
  70. package/dist/client-CZHU674n.d.ts +820 -0
  71. package/dist/core/index.cjs +198 -4
  72. package/dist/core/index.d.ts +311 -212
  73. package/dist/core/index.js +237 -43
  74. package/dist/core/index.mjs +237 -43
  75. package/dist/{effect-CMOQKX8y.d.ts → effect-DIUHZ9IN.d.ts} +195 -1
  76. package/dist/effectRunner-CFLC32IK.cjs +8 -0
  77. package/dist/effectRunner-L4S7IPT3.js +8 -0
  78. package/dist/effectRunner-NNGG75QA.mjs +8 -0
  79. package/dist/http/index.cjs +1227 -2971
  80. package/dist/http/index.d.ts +826 -280
  81. package/dist/http/index.js +1089 -2833
  82. package/dist/http/index.mjs +1089 -2833
  83. package/dist/http/testing.cjs +161 -0
  84. package/dist/http/testing.d.ts +43 -0
  85. package/dist/http/testing.js +161 -0
  86. package/dist/http/testing.mjs +161 -0
  87. package/dist/index.cjs +486 -250
  88. package/dist/index.d.ts +87 -95
  89. package/dist/index.js +391 -155
  90. package/dist/index.mjs +391 -155
  91. package/dist/observability/index.cjs +162 -0
  92. package/dist/observability/index.d.ts +152 -0
  93. package/dist/observability/index.js +162 -0
  94. package/dist/observability/index.mjs +162 -0
  95. package/dist/perf/cli.cjs +401 -0
  96. package/dist/perf/cli.d.ts +1 -0
  97. package/dist/perf/cli.js +401 -0
  98. package/dist/perf/cli.mjs +401 -0
  99. package/dist/perf/index.cjs +141 -0
  100. package/dist/perf/index.d.ts +483 -0
  101. package/dist/perf/index.js +141 -0
  102. package/dist/perf/index.mjs +141 -0
  103. package/dist/schedule-CK3Ml_7p.d.ts +259 -0
  104. package/dist/schema/index.cjs +29 -0
  105. package/dist/schema/index.d.ts +179 -0
  106. package/dist/schema/index.js +29 -0
  107. package/dist/schema/index.mjs +29 -0
  108. package/dist/server-GJPg8ZSG.d.ts +675 -0
  109. package/dist/{stream-FQm9h4Mg.d.ts → stream-B4oK9JFP.d.ts} +1 -1
  110. package/dist/tracer-Hwt1cl7h.d.ts +189 -0
  111. package/dist/tracing-DqbTKGcf.d.ts +148 -0
  112. package/docs/ARCHITECTURE.md +292 -0
  113. package/docs/README.md +63 -0
  114. package/docs/adr/0001-ai-context-pack.md +32 -0
  115. package/docs/agent-apply-mode.md +104 -0
  116. package/docs/agent-approvals.md +110 -0
  117. package/docs/agent-batch.md +185 -0
  118. package/docs/agent-boundaries.md +112 -0
  119. package/docs/agent-chat-sessions.md +160 -0
  120. package/docs/agent-ci.md +17 -0
  121. package/docs/agent-cli.md +405 -0
  122. package/docs/agent-config.md +480 -0
  123. package/docs/agent-context-discovery.md +159 -0
  124. package/docs/agent-copilot-like-dx.md +126 -0
  125. package/docs/agent-declarative-optimized-planning.md +138 -0
  126. package/docs/agent-dx.md +224 -0
  127. package/docs/agent-env-files.md +126 -0
  128. package/docs/agent-follow-up-context.md +43 -0
  129. package/docs/agent-global-usage.md +180 -0
  130. package/docs/agent-init.md +109 -0
  131. package/docs/agent-install-and-configure.md +516 -0
  132. package/docs/agent-language-workspace-ux.md +99 -0
  133. package/docs/agent-llm-adapters.md +123 -0
  134. package/docs/agent-local-install.md +190 -0
  135. package/docs/agent-local-tests.md +51 -0
  136. package/docs/agent-observability.md +155 -0
  137. package/docs/agent-patch-quality-loop.md +162 -0
  138. package/docs/agent-presets.md +22 -0
  139. package/docs/agent-project-commands.md +237 -0
  140. package/docs/agent-project-intelligence.md +156 -0
  141. package/docs/agent-redaction.md +18 -0
  142. package/docs/agent-release-readiness.md +76 -0
  143. package/docs/agent-rollback-safety.md +162 -0
  144. package/docs/agent-rollback.md +23 -0
  145. package/docs/agent-run-artifacts.md +16 -0
  146. package/docs/agent-vscode-auto-discovery.md +137 -0
  147. package/docs/agent-vscode-batch-runner.md +100 -0
  148. package/docs/agent-vscode-chat-layout.md +90 -0
  149. package/docs/agent-vscode-clean-install.md +147 -0
  150. package/docs/agent-vscode-code-actions.md +70 -0
  151. package/docs/agent-vscode-diff-preview.md +45 -0
  152. package/docs/agent-vscode-inline-assist.md +56 -0
  153. package/docs/agent-vscode-install.md +186 -0
  154. package/docs/agent-vscode-model-setup.md +97 -0
  155. package/docs/agent-vscode-patch-preview.md +92 -0
  156. package/docs/agent-vscode-problems.md +79 -0
  157. package/docs/agent-vscode-project-dashboard.md +106 -0
  158. package/docs/agent-vscode-run-history.md +92 -0
  159. package/docs/agent-vscode-ux.md +73 -0
  160. package/docs/ai/INVARIANTS.md +84 -0
  161. package/docs/ai/PROJECT_MAP.md +338 -0
  162. package/docs/ai/PUBLIC_API.md +336 -0
  163. package/docs/ai/VALIDATION_MATRIX.md +67 -0
  164. package/docs/api-polish.md +37 -0
  165. package/docs/cancellation.md +162 -0
  166. package/docs/coverage.md +46 -0
  167. package/docs/getting-started.md +159 -0
  168. package/docs/guides/README.md +40 -0
  169. package/docs/guides/circuit-breaker.md +89 -0
  170. package/docs/guides/error-handling.md +91 -0
  171. package/docs/guides/getting-started.md +107 -0
  172. package/docs/guides/layers.md +189 -0
  173. package/docs/guides/metrics.md +101 -0
  174. package/docs/guides/resource-management.md +141 -0
  175. package/docs/guides/retry.md +215 -0
  176. package/docs/guides/semaphore.md +66 -0
  177. package/docs/guides/streams.md +117 -0
  178. package/docs/guides/supervisors.md +98 -0
  179. package/docs/guides/testing.md +162 -0
  180. package/docs/guides/tracing.md +71 -0
  181. package/docs/http-recipes.md +399 -0
  182. package/docs/http.md +749 -0
  183. package/docs/modules.md +285 -0
  184. package/docs/observability-collector-smoke.md +31 -0
  185. package/docs/observability-framework-examples.md +98 -0
  186. package/docs/observability.md +542 -0
  187. package/docs/otel-collector-smoke.yaml +27 -0
  188. package/docs/performance-profiler.md +199 -0
  189. package/docs/production-readiness.md +73 -0
  190. package/docs/recipes/README.md +12 -0
  191. package/docs/recipes/http-server.md +45 -0
  192. package/docs/recipes/layers.md +44 -0
  193. package/docs/recipes/performance.md +47 -0
  194. package/docs/recipes/runtime.md +41 -0
  195. package/docs/recipes/testing.md +41 -0
  196. package/docs/release.md +53 -0
  197. package/docs/wasm-bounded-queues.md +44 -0
  198. package/docs/wasm-engine-observability-benchmarks.md +85 -0
  199. package/docs/wasm-fiber-engine.md +117 -0
  200. package/docs/wasm-scheduler-state-machine.md +122 -0
  201. package/docs/wasm-stream-chunks.md +54 -0
  202. package/package.json +48 -2
  203. package/dist/chunk-AR22SXML.js +0 -1043
  204. package/dist/chunk-BDYEENHT.js +0 -224
  205. package/dist/chunk-JFPU5GQI.mjs +0 -1043
  206. package/dist/chunk-MS34J5LY.cjs +0 -224
  207. package/dist/chunk-UMAZLXAB.mjs +0 -224
  208. package/dist/chunk-XPZNXSVN.cjs +0 -1043
  209. package/dist/tracing-DNT9jEbr.d.ts +0 -106
@@ -0,0 +1,162 @@
1
+ "use strict";Object.defineProperty(exports, "__esModule", {value: true});
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+ var _chunk76YMRMH2cjs = require('../chunk-76YMRMH2.cjs');
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+
38
+
39
+
40
+
41
+
42
+
43
+
44
+
45
+
46
+
47
+
48
+
49
+
50
+
51
+
52
+
53
+
54
+
55
+
56
+
57
+
58
+
59
+
60
+
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+
74
+
75
+
76
+
77
+
78
+
79
+ var _chunkENKODRU3cjs = require('../chunk-ENKODRU3.cjs');
80
+ require('../chunk-52PPNNI4.cjs');
81
+ require('../chunk-3LOYJFRR.cjs');
82
+ require('../chunk-GLE2WY7Z.cjs');
83
+ require('../chunk-MVGUEJ5Z.cjs');
84
+ require('../chunk-CZIVE6NT.cjs');
85
+ require('../chunk-OBGZSXTJ.cjs');
86
+
87
+
88
+
89
+
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+
105
+
106
+
107
+
108
+
109
+
110
+
111
+
112
+
113
+
114
+
115
+
116
+
117
+
118
+
119
+
120
+
121
+
122
+
123
+
124
+
125
+
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+
150
+
151
+
152
+
153
+
154
+
155
+
156
+
157
+
158
+
159
+
160
+
161
+
162
+ exports.HTTP_OBSERVABILITY_CONTRACT = _chunk76YMRMH2cjs.HTTP_OBSERVABILITY_CONTRACT; exports.OTLP_JSON_CONTENT_TYPE = _chunkENKODRU3cjs.OTLP_JSON_CONTENT_TYPE; exports.PROMETHEUS_CONTENT_TYPE = _chunkENKODRU3cjs.PROMETHEUS_CONTENT_TYPE; exports.alwaysOffSampler = _chunkENKODRU3cjs.alwaysOffSampler; exports.alwaysOnSampler = _chunkENKODRU3cjs.alwaysOnSampler; exports.currentBaggage = _chunkENKODRU3cjs.currentBaggage; exports.currentSpanLink = _chunkENKODRU3cjs.currentSpanLink; exports.defaultStructuredLogWriter = _chunkENKODRU3cjs.defaultStructuredLogWriter; exports.exemplarFromTraceContext = _chunkENKODRU3cjs.exemplarFromTraceContext; exports.exportWithRetry = _chunkENKODRU3cjs.exportWithRetry; exports.extractBaggage = _chunkENKODRU3cjs.extractBaggage; exports.extractTraceContext = _chunkENKODRU3cjs.extractTraceContext; exports.formatBaggage = _chunkENKODRU3cjs.formatBaggage; exports.formatPrometheusMetrics = _chunkENKODRU3cjs.formatPrometheusMetrics; exports.formatStructuredLog = _chunkENKODRU3cjs.formatStructuredLog; exports.formatTraceparent = _chunkENKODRU3cjs.formatTraceparent; exports.healthToHttpResponse = _chunkENKODRU3cjs.healthToHttpResponse; exports.injectBaggage = _chunkENKODRU3cjs.injectBaggage; exports.injectTraceContext = _chunkENKODRU3cjs.injectTraceContext; exports.logEffect = _chunkENKODRU3cjs.logEffect; exports.makeCardinalityLimitedMetrics = _chunkENKODRU3cjs.makeCardinalityLimitedMetrics; exports.makeExportPipeline = _chunkENKODRU3cjs.makeExportPipeline; exports.makeExpressRequestObservabilityContext = _chunk76YMRMH2cjs.makeExpressRequestObservabilityContext; exports.makeFastifyRequestObservabilityContext = _chunk76YMRMH2cjs.makeFastifyRequestObservabilityContext; exports.makeFetchRequestObservabilityContext = _chunk76YMRMH2cjs.makeFetchRequestObservabilityContext; exports.makeHttpObservabilityMiddleware = _chunk76YMRMH2cjs.makeHttpObservabilityMiddleware; exports.makeNodeRequestObservabilityContext = _chunk76YMRMH2cjs.makeNodeRequestObservabilityContext; exports.makeNoopObservability = _chunk76YMRMH2cjs.makeNoopObservability; exports.makeObservability = _chunkENKODRU3cjs.makeObservability; exports.makeObservabilityFromEnv = _chunk76YMRMH2cjs.makeObservabilityFromEnv; exports.makeObservabilityPreset = _chunk76YMRMH2cjs.makeObservabilityPreset; exports.makeObservabilityRedactor = _chunkENKODRU3cjs.makeObservabilityRedactor; exports.makeOtlpHttpLogExporter = _chunkENKODRU3cjs.makeOtlpHttpLogExporter; exports.makeOtlpHttpMetricsExporter = _chunkENKODRU3cjs.makeOtlpHttpMetricsExporter; exports.makeOtlpHttpSpanExporter = _chunkENKODRU3cjs.makeOtlpHttpSpanExporter; exports.makePrometheusMetricsExporter = _chunkENKODRU3cjs.makePrometheusMetricsExporter; exports.makeRequestObservabilityContext = _chunkENKODRU3cjs.makeRequestObservabilityContext; exports.makeRuntimeHealth = _chunkENKODRU3cjs.makeRuntimeHealth; exports.makeRuntimeMetricsSink = _chunkENKODRU3cjs.makeRuntimeMetricsSink; exports.makeStructuredLogSink = _chunkENKODRU3cjs.makeStructuredLogSink; exports.makeTraceSampler = _chunkENKODRU3cjs.makeTraceSampler; exports.metricsSnapshotToOtlp = _chunkENKODRU3cjs.metricsSnapshotToOtlp; exports.normalizeHttpRoute = _chunkENKODRU3cjs.normalizeHttpRoute; exports.normalizeSpanId = _chunkENKODRU3cjs.normalizeSpanId; exports.normalizeTraceId = _chunkENKODRU3cjs.normalizeTraceId; exports.observabilityOptionsForPreset = _chunk76YMRMH2cjs.observabilityOptionsForPreset; exports.observabilityOptionsFromEnv = _chunk76YMRMH2cjs.observabilityOptionsFromEnv; exports.observeHttpServerRequest = _chunkENKODRU3cjs.observeHttpServerRequest; exports.otlpAnyValue = _chunkENKODRU3cjs.otlpAnyValue; exports.parseBaggage = _chunkENKODRU3cjs.parseBaggage; exports.parseTraceparent = _chunkENKODRU3cjs.parseTraceparent; exports.postOtlpJson = _chunkENKODRU3cjs.postOtlpJson; exports.ratioSampler = _chunkENKODRU3cjs.ratioSampler; exports.readiness = _chunkENKODRU3cjs.readiness; exports.resolveRequestBaggage = _chunkENKODRU3cjs.resolveRequestBaggage; exports.resolveRequestTraceSeed = _chunkENKODRU3cjs.resolveRequestTraceSeed; exports.resolveTraceSampling = _chunkENKODRU3cjs.resolveTraceSampling; exports.runObservedHttpServerEffect = _chunkENKODRU3cjs.runObservedHttpServerEffect; exports.runtimeHealth = _chunkENKODRU3cjs.runtimeHealth; exports.sanitizeHttpTarget = _chunkENKODRU3cjs.sanitizeHttpTarget; exports.shouldSampleWith = _chunkENKODRU3cjs.shouldSampleWith; exports.snapshotRuntimeHealth = _chunkENKODRU3cjs.snapshotRuntimeHealth; exports.spanEvent = _chunkENKODRU3cjs.spanEvent; exports.spanLink = _chunkENKODRU3cjs.spanLink; exports.spansToOtlp = _chunkENKODRU3cjs.spansToOtlp; exports.structuredLogsToOtlp = _chunkENKODRU3cjs.structuredLogsToOtlp; exports.toOtlpAttributes = _chunkENKODRU3cjs.toOtlpAttributes; exports.unixNanoFromMs = _chunkENKODRU3cjs.unixNanoFromMs; exports.withBaggage = _chunkENKODRU3cjs.withBaggage; exports.withFetchRequestObservability = _chunk76YMRMH2cjs.withFetchRequestObservability; exports.withHttpObservability = _chunk76YMRMH2cjs.withHttpObservability; exports.withLogContext = _chunkENKODRU3cjs.withLogContext; exports.withNodeRequestObservability = _chunk76YMRMH2cjs.withNodeRequestObservability; exports.withSpan = _chunkENKODRU3cjs.withSpan; exports.withTimeout = _chunkENKODRU3cjs.withTimeout;
@@ -0,0 +1,152 @@
1
+ import { L as LogLevel, S as SpanAttributes, O as Observability, T as TraceContextCarrier, R as RequestObservabilityContextInput, a as RequestObservabilityContext, b as ObservabilityOptions } from '../server-GJPg8ZSG.js';
2
+ export { C as CardinalityConfig, c as CardinalityLimiterOptions, E as ExportBatchResult, d as ExportPipeline, e as ExportPipelineFlushOptions, f as ExportPipelineFlushResult, g as ExportPipelineOptions, h as ExportPipelineStats, i as ExportPipelineTuning, j as ExportRetryOptions, k as ExportSignal, H as HealthCheck, l as HealthCheckResult, m as HealthHttpResponse, n as HealthStatus, o as HttpServerObservabilityLogOptions, p as HttpServerObservabilityOptions, q as HttpServerObservabilitySpanOptions, r as HttpServerOutcome, I as InjectTraceContextOptions, s as OTLP_JSON_CONTENT_TYPE, t as ObservabilityExporters, u as ObservabilityFlushError, v as ObservabilityFlushResult, w as ObservabilityLogExportResult, x as ObservabilityOtlpOptions, y as ObservabilityRedactor, z as ObservabilityRequestEnvInput, A as ObservabilityRuntimeEnv, B as ObservabilityTraceExportResult, D as ObservedHttpServerResult, F as OtlpAttributeValue, G as OtlpExportOptions, J as OtlpFetch, K as OtlpHttpExportResult, M as OtlpHttpExporterOptions, N as OtlpHttpResponse, P as PROMETHEUS_CONTENT_TYPE, Q as PrometheusMetricsExporter, U as PrometheusMetricsOptions, V as RedactionConfig, W as RedactionOptions, X as RequestObservabilityRuntimeOptions, Y as ResolvedTraceSampling, Z as RuntimeHealthOptions, _ as RuntimeHealthReport, $ as RuntimeMetricsSinkOptions, a0 as SpanLink, a1 as SpanOptions, a2 as SpanSource, a3 as StructuredLogRecord, a4 as StructuredLogSinkOptions, a5 as StructuredLogSource, a6 as TraceContextHeaderValue, a7 as TraceSamplingConfig, a8 as TraceSamplingOptions, a9 as TraceSamplingRule, aa as alwaysOffSampler, ab as alwaysOnSampler, ac as currentBaggage, ad as currentSpanLink, ae as defaultStructuredLogWriter, af as exemplarFromTraceContext, ag as exportWithRetry, ah as extractBaggage, ai as extractTraceContext, aj as formatBaggage, ak as formatPrometheusMetrics, al as formatStructuredLog, am as formatTraceparent, an as healthToHttpResponse, ao as injectBaggage, ap as injectTraceContext, aq as logEffect, ar as makeCardinalityLimitedMetrics, as as makeExportPipeline, at as makeObservability, au as makeObservabilityRedactor, av as makeOtlpHttpLogExporter, aw as makeOtlpHttpMetricsExporter, ax as makeOtlpHttpSpanExporter, ay as makePrometheusMetricsExporter, az as makeRequestObservabilityContext, aA as makeRuntimeHealth, aB as makeRuntimeMetricsSink, aC as makeStructuredLogSink, aD as makeTraceSampler, aE as metricsSnapshotToOtlp, aF as normalizeHttpRoute, aG as normalizeSpanId, aH as normalizeTraceId, aI as observeHttpServerRequest, aJ as otlpAnyValue, aK as parseBaggage, aL as parseTraceparent, aM as postOtlpJson, aN as ratioSampler, aO as readiness, aP as resolveRequestBaggage, aQ as resolveRequestTraceSeed, aR as resolveTraceSampling, aS as runObservedHttpServerEffect, aT as runtimeHealth, aU as sanitizeHttpTarget, aV as shouldSampleWith, aW as snapshotRuntimeHealth, aX as spanEvent, aY as spanLink, aZ as spansToOtlp, a_ as structuredLogsToOtlp, a$ as toOtlpAttributes, b0 as unixNanoFromMs, b1 as withBaggage, b2 as withLogContext, b3 as withSpan, b4 as withTimeout } from '../server-GJPg8ZSG.js';
3
+ import { M as MetricsRegistry } from '../tracer-Hwt1cl7h.js';
4
+ import { a as HttpRequest, d as HttpMiddleware } from '../client-CZHU674n.js';
5
+ import '../effect-DIUHZ9IN.js';
6
+ import '../schedule-CK3Ml_7p.js';
7
+ import '../stream-B4oK9JFP.js';
8
+ import '../schema/index.js';
9
+
10
+ type HttpOutcome = "success" | "error" | "abort" | "bad_url" | "fetch_error" | "timeout" | "pool_rejected" | "pool_timeout" | "pool_closed" | "batch_split_error";
11
+ type HttpObservabilityLogOptions = {
12
+ readonly requestLevel?: LogLevel | false;
13
+ readonly responseLevel?: LogLevel | false;
14
+ readonly errorLevel?: LogLevel | false;
15
+ };
16
+ type HttpObservabilitySpanOptions = {
17
+ readonly name?: string | ((req: HttpRequest) => string);
18
+ readonly attributes?: SpanAttributes | ((req: HttpRequest) => SpanAttributes);
19
+ };
20
+ type HttpAdaptiveLimiterObservabilityOptions = {
21
+ readonly enabled?: boolean;
22
+ /**
23
+ * Adds a `key` metric label when a stable limiter key can be inferred.
24
+ * Keep disabled for high-cardinality downstreams.
25
+ */
26
+ readonly includeKeyLabel?: boolean;
27
+ };
28
+ type HttpPolicyLabelKey = "preset" | "lane" | "poolKey" | "dedupKey" | "priority" | "retry";
29
+ type HttpPolicyObservabilityOptions = {
30
+ readonly enabled?: boolean;
31
+ /**
32
+ * Adds selected policy fields as metric labels. Disabled by default because
33
+ * pool keys, lanes, and dedup keys may be high-cardinality in user systems.
34
+ */
35
+ readonly labelKeys?: readonly HttpPolicyLabelKey[];
36
+ };
37
+ type HttpObservabilityOptions = {
38
+ readonly metrics?: MetricsRegistry | false;
39
+ readonly logs?: false | HttpObservabilityLogOptions;
40
+ readonly spans?: false | HttpObservabilitySpanOptions;
41
+ readonly adaptiveLimiter?: boolean | HttpAdaptiveLimiterObservabilityOptions;
42
+ readonly policy?: boolean | HttpPolicyObservabilityOptions;
43
+ readonly injectTraceHeaders?: boolean;
44
+ readonly includeHostLabel?: boolean;
45
+ readonly route?: string | ((req: HttpRequest) => string | undefined);
46
+ readonly clock?: () => number;
47
+ readonly durationBuckets?: readonly number[];
48
+ };
49
+ declare const HTTP_OBSERVABILITY_CONTRACT: Readonly<{
50
+ readonly metrics: Readonly<{
51
+ requestsTotal: "brass_http_client_requests_total";
52
+ durationMs: "brass_http_client_duration_ms";
53
+ inFlight: "brass_http_client_in_flight";
54
+ adaptiveLimiterLimit: "brass_http_adaptive_limiter_limit";
55
+ adaptiveLimiterInFlight: "brass_http_adaptive_limiter_in_flight";
56
+ adaptiveLimiterQueueDepth: "brass_http_adaptive_limiter_queue_depth";
57
+ adaptiveLimiterStateCount: "brass_http_adaptive_limiter_state_count";
58
+ adaptiveLimiterUtilization: "brass_http_adaptive_limiter_utilization";
59
+ adaptiveLimiterErrorRate: "brass_http_adaptive_limiter_error_rate";
60
+ adaptiveLimiterRequestsPerSecond: "brass_http_adaptive_limiter_requests_per_second";
61
+ adaptiveLimiterCompletionsPerSecond: "brass_http_adaptive_limiter_completions_per_second";
62
+ adaptiveLimiterRejectionRate: "brass_http_adaptive_limiter_rejection_rate";
63
+ }>;
64
+ readonly labels: Readonly<{
65
+ method: "method";
66
+ host: "host";
67
+ route: "route";
68
+ outcome: "outcome";
69
+ status: "status";
70
+ adaptiveLimiterKey: "key";
71
+ lane: "lane";
72
+ poolKey: "pool_key";
73
+ dedupKey: "dedup_key";
74
+ priority: "priority";
75
+ retry: "retry";
76
+ policy: "policy";
77
+ }>;
78
+ readonly spanAttributes: Readonly<{
79
+ method: "http.request.method";
80
+ url: "url.full";
81
+ route: "http.route";
82
+ host: "server.address";
83
+ durationMs: "http.duration_ms";
84
+ outcome: "http.outcome";
85
+ statusCode: "http.status_code";
86
+ retryable: "http.retryable";
87
+ policyLane: "http.request.policy.lane";
88
+ policyPreset: "http.request.policy.preset";
89
+ policyPoolKey: "http.request.policy.pool_key";
90
+ policyDedupKey: "http.request.policy.dedup_key";
91
+ policyPriority: "http.request.policy.priority";
92
+ policyRetry: "http.request.policy.retry";
93
+ }>;
94
+ readonly logMessages: Readonly<{
95
+ request: "http.client.request";
96
+ response: "http.client.response";
97
+ error: "http.client.error";
98
+ }>;
99
+ readonly logFields: Readonly<{
100
+ method: "method";
101
+ url: "url";
102
+ host: "host";
103
+ route: "route";
104
+ status: "status";
105
+ outcome: "outcome";
106
+ durationMs: "durationMs";
107
+ retryable: "retryable";
108
+ policy: "policy";
109
+ }>;
110
+ }>;
111
+ declare function withHttpObservability(options?: Observability | HttpObservabilityOptions): HttpMiddleware;
112
+ declare const makeHttpObservabilityMiddleware: typeof withHttpObservability;
113
+
114
+ type FetchLikeRequest = {
115
+ readonly headers?: TraceContextCarrier;
116
+ readonly method?: string;
117
+ readonly url?: string;
118
+ };
119
+ type NodeLikeIncomingMessage = {
120
+ readonly headers?: Record<string, string | readonly string[] | undefined>;
121
+ readonly method?: string;
122
+ readonly url?: string;
123
+ };
124
+ type ExpressLikeRequest = NodeLikeIncomingMessage & {
125
+ readonly originalUrl?: string;
126
+ readonly path?: string;
127
+ readonly route?: {
128
+ readonly path?: string;
129
+ };
130
+ };
131
+ type FastifyLikeRequest = NodeLikeIncomingMessage & {
132
+ readonly routeOptions?: {
133
+ readonly url?: string;
134
+ };
135
+ readonly routerPath?: string;
136
+ };
137
+ declare function makeFetchRequestObservabilityContext(observability: Observability, request: FetchLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
138
+ declare function makeNodeRequestObservabilityContext(observability: Observability, request: NodeLikeIncomingMessage, input?: RequestObservabilityContextInput): RequestObservabilityContext;
139
+ declare function makeExpressRequestObservabilityContext(observability: Observability, request: ExpressLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
140
+ declare function makeFastifyRequestObservabilityContext(observability: Observability, request: FastifyLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
141
+ declare function withFetchRequestObservability<RequestLike extends FetchLikeRequest, A>(observability: Observability, handler: (ctx: RequestObservabilityContext, request: RequestLike) => A | Promise<A>, input?: RequestObservabilityContextInput): (request: RequestLike) => Promise<A>;
142
+ declare function withNodeRequestObservability<RequestLike extends NodeLikeIncomingMessage, A>(observability: Observability, handler: (ctx: RequestObservabilityContext, request: RequestLike) => A | Promise<A>, input?: RequestObservabilityContextInput): (request: RequestLike) => Promise<A>;
143
+
144
+ type ObservabilityPreset = "development" | "production" | "test" | "disabled";
145
+ type ObservabilityEnv = Record<string, string | undefined>;
146
+ declare function makeNoopObservability(): Observability;
147
+ declare function makeObservabilityPreset(preset: ObservabilityPreset, overrides?: ObservabilityOptions): Observability;
148
+ declare function makeObservabilityFromEnv(env?: ObservabilityEnv, overrides?: ObservabilityOptions): Observability;
149
+ declare function observabilityOptionsForPreset(preset: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
150
+ declare function observabilityOptionsFromEnv(env?: ObservabilityEnv, preset?: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
151
+
152
+ export { type ExpressLikeRequest, type FastifyLikeRequest, type FetchLikeRequest, HTTP_OBSERVABILITY_CONTRACT, type HttpAdaptiveLimiterObservabilityOptions, type HttpObservabilityLogOptions, type HttpObservabilityOptions, type HttpObservabilitySpanOptions, type HttpOutcome, type HttpPolicyLabelKey, type HttpPolicyObservabilityOptions, LogLevel, type NodeLikeIncomingMessage, Observability, type ObservabilityEnv, ObservabilityOptions, type ObservabilityPreset, RequestObservabilityContext, RequestObservabilityContextInput, SpanAttributes, TraceContextCarrier, makeExpressRequestObservabilityContext, makeFastifyRequestObservabilityContext, makeFetchRequestObservabilityContext, makeHttpObservabilityMiddleware, makeNodeRequestObservabilityContext, makeNoopObservability, makeObservabilityFromEnv, makeObservabilityPreset, observabilityOptionsForPreset, observabilityOptionsFromEnv, withFetchRequestObservability, withHttpObservability, withNodeRequestObservability };
@@ -0,0 +1,162 @@
1
+ import {
2
+ HTTP_OBSERVABILITY_CONTRACT,
3
+ makeExpressRequestObservabilityContext,
4
+ makeFastifyRequestObservabilityContext,
5
+ makeFetchRequestObservabilityContext,
6
+ makeHttpObservabilityMiddleware,
7
+ makeNodeRequestObservabilityContext,
8
+ makeNoopObservability,
9
+ makeObservabilityFromEnv,
10
+ makeObservabilityPreset,
11
+ observabilityOptionsForPreset,
12
+ observabilityOptionsFromEnv,
13
+ withFetchRequestObservability,
14
+ withHttpObservability,
15
+ withNodeRequestObservability
16
+ } from "../chunk-AVNQLJ5V.js";
17
+ import {
18
+ OTLP_JSON_CONTENT_TYPE,
19
+ PROMETHEUS_CONTENT_TYPE,
20
+ alwaysOffSampler,
21
+ alwaysOnSampler,
22
+ currentBaggage,
23
+ currentSpanLink,
24
+ defaultStructuredLogWriter,
25
+ exemplarFromTraceContext,
26
+ exportWithRetry,
27
+ extractBaggage,
28
+ extractTraceContext,
29
+ formatBaggage,
30
+ formatPrometheusMetrics,
31
+ formatStructuredLog,
32
+ formatTraceparent,
33
+ healthToHttpResponse,
34
+ injectBaggage,
35
+ injectTraceContext,
36
+ logEffect,
37
+ makeCardinalityLimitedMetrics,
38
+ makeExportPipeline,
39
+ makeObservability,
40
+ makeObservabilityRedactor,
41
+ makeOtlpHttpLogExporter,
42
+ makeOtlpHttpMetricsExporter,
43
+ makeOtlpHttpSpanExporter,
44
+ makePrometheusMetricsExporter,
45
+ makeRequestObservabilityContext,
46
+ makeRuntimeHealth,
47
+ makeRuntimeMetricsSink,
48
+ makeStructuredLogSink,
49
+ makeTraceSampler,
50
+ metricsSnapshotToOtlp,
51
+ normalizeHttpRoute,
52
+ normalizeSpanId,
53
+ normalizeTraceId,
54
+ observeHttpServerRequest,
55
+ otlpAnyValue,
56
+ parseBaggage,
57
+ parseTraceparent,
58
+ postOtlpJson,
59
+ ratioSampler,
60
+ readiness,
61
+ resolveRequestBaggage,
62
+ resolveRequestTraceSeed,
63
+ resolveTraceSampling,
64
+ runObservedHttpServerEffect,
65
+ runtimeHealth,
66
+ sanitizeHttpTarget,
67
+ shouldSampleWith,
68
+ snapshotRuntimeHealth,
69
+ spanEvent,
70
+ spanLink,
71
+ spansToOtlp,
72
+ structuredLogsToOtlp,
73
+ toOtlpAttributes,
74
+ unixNanoFromMs,
75
+ withBaggage,
76
+ withLogContext,
77
+ withSpan,
78
+ withTimeout
79
+ } from "../chunk-CIZFIMK5.js";
80
+ import "../chunk-RKGKFN2A.js";
81
+ import "../chunk-3Y2RIUMM.js";
82
+ import "../chunk-FH2X7BVP.js";
83
+ import "../chunk-UB4B6OFY.js";
84
+ import "../chunk-C3MDXTRZ.js";
85
+ import "../chunk-3RG5ZIWI.js";
86
+ export {
87
+ HTTP_OBSERVABILITY_CONTRACT,
88
+ OTLP_JSON_CONTENT_TYPE,
89
+ PROMETHEUS_CONTENT_TYPE,
90
+ alwaysOffSampler,
91
+ alwaysOnSampler,
92
+ currentBaggage,
93
+ currentSpanLink,
94
+ defaultStructuredLogWriter,
95
+ exemplarFromTraceContext,
96
+ exportWithRetry,
97
+ extractBaggage,
98
+ extractTraceContext,
99
+ formatBaggage,
100
+ formatPrometheusMetrics,
101
+ formatStructuredLog,
102
+ formatTraceparent,
103
+ healthToHttpResponse,
104
+ injectBaggage,
105
+ injectTraceContext,
106
+ logEffect,
107
+ makeCardinalityLimitedMetrics,
108
+ makeExportPipeline,
109
+ makeExpressRequestObservabilityContext,
110
+ makeFastifyRequestObservabilityContext,
111
+ makeFetchRequestObservabilityContext,
112
+ makeHttpObservabilityMiddleware,
113
+ makeNodeRequestObservabilityContext,
114
+ makeNoopObservability,
115
+ makeObservability,
116
+ makeObservabilityFromEnv,
117
+ makeObservabilityPreset,
118
+ makeObservabilityRedactor,
119
+ makeOtlpHttpLogExporter,
120
+ makeOtlpHttpMetricsExporter,
121
+ makeOtlpHttpSpanExporter,
122
+ makePrometheusMetricsExporter,
123
+ makeRequestObservabilityContext,
124
+ makeRuntimeHealth,
125
+ makeRuntimeMetricsSink,
126
+ makeStructuredLogSink,
127
+ makeTraceSampler,
128
+ metricsSnapshotToOtlp,
129
+ normalizeHttpRoute,
130
+ normalizeSpanId,
131
+ normalizeTraceId,
132
+ observabilityOptionsForPreset,
133
+ observabilityOptionsFromEnv,
134
+ observeHttpServerRequest,
135
+ otlpAnyValue,
136
+ parseBaggage,
137
+ parseTraceparent,
138
+ postOtlpJson,
139
+ ratioSampler,
140
+ readiness,
141
+ resolveRequestBaggage,
142
+ resolveRequestTraceSeed,
143
+ resolveTraceSampling,
144
+ runObservedHttpServerEffect,
145
+ runtimeHealth,
146
+ sanitizeHttpTarget,
147
+ shouldSampleWith,
148
+ snapshotRuntimeHealth,
149
+ spanEvent,
150
+ spanLink,
151
+ spansToOtlp,
152
+ structuredLogsToOtlp,
153
+ toOtlpAttributes,
154
+ unixNanoFromMs,
155
+ withBaggage,
156
+ withFetchRequestObservability,
157
+ withHttpObservability,
158
+ withLogContext,
159
+ withNodeRequestObservability,
160
+ withSpan,
161
+ withTimeout
162
+ };
@@ -0,0 +1,162 @@
1
+ import {
2
+ HTTP_OBSERVABILITY_CONTRACT,
3
+ makeExpressRequestObservabilityContext,
4
+ makeFastifyRequestObservabilityContext,
5
+ makeFetchRequestObservabilityContext,
6
+ makeHttpObservabilityMiddleware,
7
+ makeNodeRequestObservabilityContext,
8
+ makeNoopObservability,
9
+ makeObservabilityFromEnv,
10
+ makeObservabilityPreset,
11
+ observabilityOptionsForPreset,
12
+ observabilityOptionsFromEnv,
13
+ withFetchRequestObservability,
14
+ withHttpObservability,
15
+ withNodeRequestObservability
16
+ } from "../chunk-DNFO2EIZ.mjs";
17
+ import {
18
+ OTLP_JSON_CONTENT_TYPE,
19
+ PROMETHEUS_CONTENT_TYPE,
20
+ alwaysOffSampler,
21
+ alwaysOnSampler,
22
+ currentBaggage,
23
+ currentSpanLink,
24
+ defaultStructuredLogWriter,
25
+ exemplarFromTraceContext,
26
+ exportWithRetry,
27
+ extractBaggage,
28
+ extractTraceContext,
29
+ formatBaggage,
30
+ formatPrometheusMetrics,
31
+ formatStructuredLog,
32
+ formatTraceparent,
33
+ healthToHttpResponse,
34
+ injectBaggage,
35
+ injectTraceContext,
36
+ logEffect,
37
+ makeCardinalityLimitedMetrics,
38
+ makeExportPipeline,
39
+ makeObservability,
40
+ makeObservabilityRedactor,
41
+ makeOtlpHttpLogExporter,
42
+ makeOtlpHttpMetricsExporter,
43
+ makeOtlpHttpSpanExporter,
44
+ makePrometheusMetricsExporter,
45
+ makeRequestObservabilityContext,
46
+ makeRuntimeHealth,
47
+ makeRuntimeMetricsSink,
48
+ makeStructuredLogSink,
49
+ makeTraceSampler,
50
+ metricsSnapshotToOtlp,
51
+ normalizeHttpRoute,
52
+ normalizeSpanId,
53
+ normalizeTraceId,
54
+ observeHttpServerRequest,
55
+ otlpAnyValue,
56
+ parseBaggage,
57
+ parseTraceparent,
58
+ postOtlpJson,
59
+ ratioSampler,
60
+ readiness,
61
+ resolveRequestBaggage,
62
+ resolveRequestTraceSeed,
63
+ resolveTraceSampling,
64
+ runObservedHttpServerEffect,
65
+ runtimeHealth,
66
+ sanitizeHttpTarget,
67
+ shouldSampleWith,
68
+ snapshotRuntimeHealth,
69
+ spanEvent,
70
+ spanLink,
71
+ spansToOtlp,
72
+ structuredLogsToOtlp,
73
+ toOtlpAttributes,
74
+ unixNanoFromMs,
75
+ withBaggage,
76
+ withLogContext,
77
+ withSpan,
78
+ withTimeout
79
+ } from "../chunk-MT3OWDPC.mjs";
80
+ import "../chunk-EJ6BPYVR.mjs";
81
+ import "../chunk-PWC3RBQE.mjs";
82
+ import "../chunk-GYM3LLGS.mjs";
83
+ import "../chunk-36I3M4UC.mjs";
84
+ import "../chunk-DNFJLJMW.mjs";
85
+ import "../chunk-Y6FXYEAI.mjs";
86
+ export {
87
+ HTTP_OBSERVABILITY_CONTRACT,
88
+ OTLP_JSON_CONTENT_TYPE,
89
+ PROMETHEUS_CONTENT_TYPE,
90
+ alwaysOffSampler,
91
+ alwaysOnSampler,
92
+ currentBaggage,
93
+ currentSpanLink,
94
+ defaultStructuredLogWriter,
95
+ exemplarFromTraceContext,
96
+ exportWithRetry,
97
+ extractBaggage,
98
+ extractTraceContext,
99
+ formatBaggage,
100
+ formatPrometheusMetrics,
101
+ formatStructuredLog,
102
+ formatTraceparent,
103
+ healthToHttpResponse,
104
+ injectBaggage,
105
+ injectTraceContext,
106
+ logEffect,
107
+ makeCardinalityLimitedMetrics,
108
+ makeExportPipeline,
109
+ makeExpressRequestObservabilityContext,
110
+ makeFastifyRequestObservabilityContext,
111
+ makeFetchRequestObservabilityContext,
112
+ makeHttpObservabilityMiddleware,
113
+ makeNodeRequestObservabilityContext,
114
+ makeNoopObservability,
115
+ makeObservability,
116
+ makeObservabilityFromEnv,
117
+ makeObservabilityPreset,
118
+ makeObservabilityRedactor,
119
+ makeOtlpHttpLogExporter,
120
+ makeOtlpHttpMetricsExporter,
121
+ makeOtlpHttpSpanExporter,
122
+ makePrometheusMetricsExporter,
123
+ makeRequestObservabilityContext,
124
+ makeRuntimeHealth,
125
+ makeRuntimeMetricsSink,
126
+ makeStructuredLogSink,
127
+ makeTraceSampler,
128
+ metricsSnapshotToOtlp,
129
+ normalizeHttpRoute,
130
+ normalizeSpanId,
131
+ normalizeTraceId,
132
+ observabilityOptionsForPreset,
133
+ observabilityOptionsFromEnv,
134
+ observeHttpServerRequest,
135
+ otlpAnyValue,
136
+ parseBaggage,
137
+ parseTraceparent,
138
+ postOtlpJson,
139
+ ratioSampler,
140
+ readiness,
141
+ resolveRequestBaggage,
142
+ resolveRequestTraceSeed,
143
+ resolveTraceSampling,
144
+ runObservedHttpServerEffect,
145
+ runtimeHealth,
146
+ sanitizeHttpTarget,
147
+ shouldSampleWith,
148
+ snapshotRuntimeHealth,
149
+ spanEvent,
150
+ spanLink,
151
+ spansToOtlp,
152
+ structuredLogsToOtlp,
153
+ toOtlpAttributes,
154
+ unixNanoFromMs,
155
+ withBaggage,
156
+ withFetchRequestObservability,
157
+ withHttpObservability,
158
+ withLogContext,
159
+ withNodeRequestObservability,
160
+ withSpan,
161
+ withTimeout
162
+ };