brass-runtime 1.17.0 → 1.18.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 (120) hide show
  1. package/README.md +36 -3
  2. package/dist/agent/cli/main.cjs +31 -32
  3. package/dist/agent/cli/main.js +3 -4
  4. package/dist/agent/cli/main.mjs +3 -4
  5. package/dist/agent/index.cjs +4 -5
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +3 -4
  8. package/dist/agent/index.mjs +3 -4
  9. package/dist/{chunk-GYM3LLGS.mjs → chunk-2QNREG6K.mjs} +188 -5
  10. package/dist/{chunk-4ROBZFL6.cjs → chunk-2SLT3X6G.cjs} +6 -8
  11. package/dist/{chunk-KZJQ723N.cjs → chunk-3PFZGP23.cjs} +13 -15
  12. package/dist/{chunk-VWIPB6I5.js → chunk-3PHU7FWS.js} +528 -23
  13. package/dist/{chunk-BKK77SBA.js → chunk-4YQHPIWJ.js} +32 -11
  14. package/dist/chunk-5XADBMSU.cjs +33 -0
  15. package/dist/{chunk-DNFJLJMW.mjs → chunk-6MLAZPBL.mjs} +48 -24
  16. package/dist/chunk-7TKI527D.cjs +123 -0
  17. package/dist/{chunk-AGR5B2BC.cjs → chunk-7TXQJFZX.cjs} +564 -12
  18. package/dist/{chunk-RKGKFN2A.js → chunk-AADFFVYS.js} +1 -1
  19. package/dist/{chunk-52PPNNI4.cjs → chunk-AJMKZXRB.cjs} +2 -2
  20. package/dist/{chunk-3AYM6WPJ.js → chunk-BG5RNEA2.js} +20 -299
  21. package/dist/{chunk-2HQTDLHF.mjs → chunk-ELLF55ER.mjs} +555 -3
  22. package/dist/{chunk-EOC4UHBS.mjs → chunk-G5JTCFMI.mjs} +2 -2
  23. package/dist/chunk-H5GYX7RZ.js +6126 -0
  24. package/dist/{chunk-C3MDXTRZ.js → chunk-HCJ4S3YB.js} +48 -24
  25. package/dist/{chunk-6IXXWIUM.js → chunk-IBRHSH5H.js} +555 -3
  26. package/dist/{chunk-Q2I37RP3.cjs → chunk-IFRBVMWJ.cjs} +44 -323
  27. package/dist/{chunk-52OB2ROS.js → chunk-ITG6I7ZS.js} +2 -4
  28. package/dist/chunk-ITZQ526U.mjs +33 -0
  29. package/dist/{chunk-7JIJOVCT.js → chunk-JH4GI3DW.js} +2 -4
  30. package/dist/{chunk-F6XWZQY4.cjs → chunk-KHACHFBQ.cjs} +583 -78
  31. package/dist/{chunk-4P2HHGAX.mjs → chunk-KRYP6CAE.mjs} +32 -11
  32. package/dist/chunk-KTGDLBLD.mjs +123 -0
  33. package/dist/{chunk-WBGRHGBP.cjs → chunk-LXBU5E77.cjs} +114 -93
  34. package/dist/{chunk-PD4EJTQC.cjs → chunk-N6QNSTWD.cjs} +5 -5
  35. package/dist/{chunk-6RY2FFN4.mjs → chunk-OI4ESUMC.mjs} +9 -11
  36. package/dist/{chunk-EJ6BPYVR.mjs → chunk-OT2TESZU.mjs} +1 -1
  37. package/dist/{chunk-7X3K5RMS.js → chunk-PSEU65ND.js} +9 -11
  38. package/dist/{chunk-SK7UZRNI.mjs → chunk-QCOLAHU3.mjs} +528 -23
  39. package/dist/{chunk-KH4SYAOS.mjs → chunk-QZ6QFJNM.mjs} +20 -299
  40. package/dist/{chunk-MBEJI5HF.mjs → chunk-R6WDSZA6.mjs} +2 -4
  41. package/dist/{chunk-FHQGHPMO.mjs → chunk-RREBJX2S.mjs} +2 -4
  42. package/dist/{chunk-5QC7LRZ3.js → chunk-S4HHFUYP.js} +2 -2
  43. package/dist/{chunk-GLE2WY7Z.cjs → chunk-SSQJKDN3.cjs} +194 -11
  44. package/dist/{chunk-CZIVE6NT.cjs → chunk-UUMKZJRJ.cjs} +48 -24
  45. package/dist/chunk-VIFA4DPN.cjs +6126 -0
  46. package/dist/chunk-W6WR37HN.js +33 -0
  47. package/dist/{chunk-FH2X7BVP.js → chunk-XSAHV5HQ.js} +188 -5
  48. package/dist/chunk-YM3EDNYD.js +123 -0
  49. package/dist/{chunk-7ZPEZ57L.cjs → chunk-YTX2JYYP.cjs} +18 -20
  50. package/dist/chunk-Z3PSSXP3.mjs +6126 -0
  51. package/dist/core/index.cjs +31 -9
  52. package/dist/core/index.d.ts +19 -152
  53. package/dist/core/index.js +80 -58
  54. package/dist/core/index.mjs +80 -58
  55. package/dist/defaultClient-DhpCQW9m.d.ts +1623 -0
  56. package/dist/{effect-DIUHZ9IN.d.ts → effect-CtUDl5M5.d.ts} +1 -1
  57. package/dist/http/index.cjs +202 -59
  58. package/dist/http/index.d.ts +55 -819
  59. package/dist/http/index.js +216 -73
  60. package/dist/http/index.mjs +216 -73
  61. package/dist/http/testing.cjs +31 -10
  62. package/dist/http/testing.d.ts +16 -5
  63. package/dist/http/testing.js +29 -8
  64. package/dist/http/testing.mjs +29 -8
  65. package/dist/index.cjs +110 -88
  66. package/dist/index.d.ts +9 -8
  67. package/dist/index.js +81 -59
  68. package/dist/index.mjs +81 -59
  69. package/dist/{schedule-CK3Ml_7p.d.ts → layer-BalPI6cN.d.ts} +176 -2
  70. package/dist/observability/index.cjs +20 -7
  71. package/dist/observability/index.d.ts +32 -8
  72. package/dist/observability/index.js +19 -6
  73. package/dist/observability/index.mjs +19 -6
  74. package/dist/perf/cli.cjs +26 -28
  75. package/dist/perf/cli.js +11 -13
  76. package/dist/perf/cli.mjs +11 -13
  77. package/dist/perf/index.cjs +13 -15
  78. package/dist/perf/index.js +11 -13
  79. package/dist/perf/index.mjs +11 -13
  80. package/dist/schema/index.cjs +2 -2
  81. package/dist/schema/index.js +1 -1
  82. package/dist/schema/index.mjs +1 -1
  83. package/dist/{server-D6JZ15_e.d.ts → server-C1zVmqE6.d.ts} +5 -5
  84. package/dist/{stream-B4oK9JFP.d.ts → stream-Bb4FTejt.d.ts} +1 -1
  85. package/dist/{tracer-Hwt1cl7h.d.ts → tracer-DzfuE6um.d.ts} +2 -2
  86. package/dist/{tracing-DqbTKGcf.d.ts → tracing-BABA5arE.d.ts} +1 -1
  87. package/docs/README.md +2 -0
  88. package/docs/ai/PUBLIC_API.md +28 -7
  89. package/docs/articles/brass-runtime-http-observability.md +467 -0
  90. package/docs/frameworks/angular.md +51 -0
  91. package/docs/frameworks/express.md +58 -0
  92. package/docs/frameworks/fastify.md +49 -0
  93. package/docs/frameworks/nestjs.md +53 -0
  94. package/docs/frameworks/nextjs.md +55 -0
  95. package/docs/frameworks/react.md +44 -0
  96. package/docs/frameworks/vanilla.md +56 -0
  97. package/docs/guides/layers.md +130 -0
  98. package/docs/http-recipes.md +31 -1
  99. package/docs/http.md +50 -1
  100. package/docs/observability.md +132 -0
  101. package/docs/performance-profiler.md +6 -2
  102. package/docs/recipes/layers.md +46 -2
  103. package/docs/recipes/testing.md +25 -0
  104. package/package.json +4 -1
  105. package/dist/chunk-3LOYJFRR.cjs +0 -300
  106. package/dist/chunk-3Y2RIUMM.js +0 -300
  107. package/dist/chunk-5EC274J5.cjs +0 -2874
  108. package/dist/chunk-5VRJNBLZ.mjs +0 -2874
  109. package/dist/chunk-62AZW6UT.cjs +0 -313
  110. package/dist/chunk-74ZTY6CP.js +0 -2871
  111. package/dist/chunk-7CMJS3QE.mjs +0 -2871
  112. package/dist/chunk-A2OM6NEH.mjs +0 -194
  113. package/dist/chunk-B33ICAKP.js +0 -313
  114. package/dist/chunk-JF5WGYJJ.cjs +0 -194
  115. package/dist/chunk-KN32XNTH.mjs +0 -313
  116. package/dist/chunk-KQLYONSE.cjs +0 -2871
  117. package/dist/chunk-L2SYFEBS.js +0 -194
  118. package/dist/chunk-MIIYDLGM.js +0 -2874
  119. package/dist/chunk-PWC3RBQE.mjs +0 -300
  120. package/dist/client-CZHU674n.d.ts +0 -820
@@ -30,27 +30,25 @@
30
30
 
31
31
 
32
32
 
33
- var _chunk7ZPEZ57Lcjs = require('../chunk-7ZPEZ57L.cjs');
34
- require('../chunk-PD4EJTQC.cjs');
35
- require('../chunk-KQLYONSE.cjs');
36
- require('../chunk-5EC274J5.cjs');
33
+ var _chunkYTX2JYYPcjs = require('../chunk-YTX2JYYP.cjs');
34
+ require('../chunk-N6QNSTWD.cjs');
35
+ require('../chunk-KHACHFBQ.cjs');
36
+ require('../chunk-5XADBMSU.cjs');
37
+ require('../chunk-LXBU5E77.cjs');
38
+ require('../chunk-AJMKZXRB.cjs');
39
+ require('../chunk-VIFA4DPN.cjs');
37
40
  require('../chunk-L6VB5N7Q.cjs');
38
- require('../chunk-KZJQ723N.cjs');
41
+ require('../chunk-3PFZGP23.cjs');
39
42
  require('../chunk-SA6HUJVI.cjs');
40
- require('../chunk-AGR5B2BC.cjs');
41
- require('../chunk-JF5WGYJJ.cjs');
42
- require('../chunk-F6XWZQY4.cjs');
43
- require('../chunk-WBGRHGBP.cjs');
44
- require('../chunk-52PPNNI4.cjs');
45
- require('../chunk-3LOYJFRR.cjs');
46
- require('../chunk-GLE2WY7Z.cjs');
43
+ require('../chunk-7TXQJFZX.cjs');
44
+ require('../chunk-SSQJKDN3.cjs');
47
45
  require('../chunk-MVGUEJ5Z.cjs');
48
- require('../chunk-CZIVE6NT.cjs');
46
+ require('../chunk-UUMKZJRJ.cjs');
49
47
  require('../chunk-OBGZSXTJ.cjs');
50
48
 
51
49
  // src/perf/budget.ts
52
50
  async function runRuntimePerfBudget(options = {}) {
53
- const ab = await _chunk7ZPEZ57Lcjs.profileRuntimeAb.call(void 0, {
51
+ const ab = await _chunkYTX2JYYPcjs.profileRuntimeAb.call(void 0, {
54
52
  ...options,
55
53
  thresholds: {
56
54
  maxRegressionPercent: _nullishCoalesce(_optionalChain([options, 'access', _ => _.thresholds, 'optionalAccess', _2 => _2.maxRegressionPercent]), () => ( 50)),
@@ -138,4 +136,4 @@ function positiveNumber(value, fallback) {
138
136
 
139
137
 
140
138
 
141
- exports.HTTP_PROFILE_VARIANTS = _chunk7ZPEZ57Lcjs.HTTP_PROFILE_VARIANTS; exports.captureMemorySnapshot = _chunk7ZPEZ57Lcjs.captureMemorySnapshot; exports.comparePerfToBaseline = _chunk7ZPEZ57Lcjs.comparePerfToBaseline; exports.compareRuntimeProfiles = _chunk7ZPEZ57Lcjs.compareRuntimeProfiles; exports.createPerfHistoryEntry = _chunk7ZPEZ57Lcjs.createPerfHistoryEntry; exports.defaultPerfHistoryDirectory = _chunk7ZPEZ57Lcjs.defaultPerfHistoryDirectory; exports.diagnoseRuntimeProfile = _chunk7ZPEZ57Lcjs.diagnoseRuntimeProfile; exports.diffMemorySnapshots = _chunk7ZPEZ57Lcjs.diffMemorySnapshots; exports.extractPerfMetrics = _chunk7ZPEZ57Lcjs.extractPerfMetrics; exports.forceGc = _chunk7ZPEZ57Lcjs.forceGc; exports.formatHttpMemoryLabReport = _chunk7ZPEZ57Lcjs.formatHttpMemoryLabReport; exports.formatPerfBaselineComparison = _chunk7ZPEZ57Lcjs.formatPerfBaselineComparison; exports.formatPerformanceReport = _chunk7ZPEZ57Lcjs.formatPerformanceReport; exports.formatRuntimeAbReport = _chunk7ZPEZ57Lcjs.formatRuntimeAbReport; exports.formatRuntimePerfBudgetReport = formatRuntimePerfBudgetReport; exports.formatRuntimeSoakReport = _chunk7ZPEZ57Lcjs.formatRuntimeSoakReport; exports.hasGc = _chunk7ZPEZ57Lcjs.hasGc; exports.loadPerfBaseline = _chunk7ZPEZ57Lcjs.loadPerfBaseline; exports.makePerfRecorder = _chunk7ZPEZ57Lcjs.makePerfRecorder; exports.profileHttpLayers = _chunk7ZPEZ57Lcjs.profileHttpLayers; exports.profileHttpMemoryLab = _chunk7ZPEZ57Lcjs.profileHttpMemoryLab; exports.profileMemoryRetention = _chunk7ZPEZ57Lcjs.profileMemoryRetention; exports.profileRuntimeAb = _chunk7ZPEZ57Lcjs.profileRuntimeAb; exports.profileRuntimePrimitives = _chunk7ZPEZ57Lcjs.profileRuntimePrimitives; exports.profileRuntimeSoak = _chunk7ZPEZ57Lcjs.profileRuntimeSoak; exports.readPerfHistory = _chunk7ZPEZ57Lcjs.readPerfHistory; exports.recommendPerformance = _chunk7ZPEZ57Lcjs.recommendPerformance; exports.recordPerfHistoryRun = _chunk7ZPEZ57Lcjs.recordPerfHistoryRun; exports.runBrassPerformanceProfile = _chunk7ZPEZ57Lcjs.runBrassPerformanceProfile; exports.runRuntimePerfBudget = runRuntimePerfBudget; exports.savePerfBaseline = _chunk7ZPEZ57Lcjs.savePerfBaseline; exports.summarizePerfEvents = _chunk7ZPEZ57Lcjs.summarizePerfEvents; exports.writePerfHistoryEntry = _chunk7ZPEZ57Lcjs.writePerfHistoryEntry;
139
+ exports.HTTP_PROFILE_VARIANTS = _chunkYTX2JYYPcjs.HTTP_PROFILE_VARIANTS; exports.captureMemorySnapshot = _chunkYTX2JYYPcjs.captureMemorySnapshot; exports.comparePerfToBaseline = _chunkYTX2JYYPcjs.comparePerfToBaseline; exports.compareRuntimeProfiles = _chunkYTX2JYYPcjs.compareRuntimeProfiles; exports.createPerfHistoryEntry = _chunkYTX2JYYPcjs.createPerfHistoryEntry; exports.defaultPerfHistoryDirectory = _chunkYTX2JYYPcjs.defaultPerfHistoryDirectory; exports.diagnoseRuntimeProfile = _chunkYTX2JYYPcjs.diagnoseRuntimeProfile; exports.diffMemorySnapshots = _chunkYTX2JYYPcjs.diffMemorySnapshots; exports.extractPerfMetrics = _chunkYTX2JYYPcjs.extractPerfMetrics; exports.forceGc = _chunkYTX2JYYPcjs.forceGc; exports.formatHttpMemoryLabReport = _chunkYTX2JYYPcjs.formatHttpMemoryLabReport; exports.formatPerfBaselineComparison = _chunkYTX2JYYPcjs.formatPerfBaselineComparison; exports.formatPerformanceReport = _chunkYTX2JYYPcjs.formatPerformanceReport; exports.formatRuntimeAbReport = _chunkYTX2JYYPcjs.formatRuntimeAbReport; exports.formatRuntimePerfBudgetReport = formatRuntimePerfBudgetReport; exports.formatRuntimeSoakReport = _chunkYTX2JYYPcjs.formatRuntimeSoakReport; exports.hasGc = _chunkYTX2JYYPcjs.hasGc; exports.loadPerfBaseline = _chunkYTX2JYYPcjs.loadPerfBaseline; exports.makePerfRecorder = _chunkYTX2JYYPcjs.makePerfRecorder; exports.profileHttpLayers = _chunkYTX2JYYPcjs.profileHttpLayers; exports.profileHttpMemoryLab = _chunkYTX2JYYPcjs.profileHttpMemoryLab; exports.profileMemoryRetention = _chunkYTX2JYYPcjs.profileMemoryRetention; exports.profileRuntimeAb = _chunkYTX2JYYPcjs.profileRuntimeAb; exports.profileRuntimePrimitives = _chunkYTX2JYYPcjs.profileRuntimePrimitives; exports.profileRuntimeSoak = _chunkYTX2JYYPcjs.profileRuntimeSoak; exports.readPerfHistory = _chunkYTX2JYYPcjs.readPerfHistory; exports.recommendPerformance = _chunkYTX2JYYPcjs.recommendPerformance; exports.recordPerfHistoryRun = _chunkYTX2JYYPcjs.recordPerfHistoryRun; exports.runBrassPerformanceProfile = _chunkYTX2JYYPcjs.runBrassPerformanceProfile; exports.runRuntimePerfBudget = runRuntimePerfBudget; exports.savePerfBaseline = _chunkYTX2JYYPcjs.savePerfBaseline; exports.summarizePerfEvents = _chunkYTX2JYYPcjs.summarizePerfEvents; exports.writePerfHistoryEntry = _chunkYTX2JYYPcjs.writePerfHistoryEntry;
@@ -30,22 +30,20 @@ import {
30
30
  savePerfBaseline,
31
31
  summarizePerfEvents,
32
32
  writePerfHistoryEntry
33
- } from "../chunk-7X3K5RMS.js";
34
- import "../chunk-5QC7LRZ3.js";
35
- import "../chunk-74ZTY6CP.js";
36
- import "../chunk-MIIYDLGM.js";
33
+ } from "../chunk-PSEU65ND.js";
34
+ import "../chunk-S4HHFUYP.js";
35
+ import "../chunk-3PHU7FWS.js";
36
+ import "../chunk-W6WR37HN.js";
37
+ import "../chunk-4YQHPIWJ.js";
38
+ import "../chunk-AADFFVYS.js";
39
+ import "../chunk-H5GYX7RZ.js";
37
40
  import "../chunk-TRM4JUZQ.js";
38
- import "../chunk-7JIJOVCT.js";
41
+ import "../chunk-JH4GI3DW.js";
39
42
  import "../chunk-UCUBNWM2.js";
40
- import "../chunk-6IXXWIUM.js";
41
- import "../chunk-L2SYFEBS.js";
42
- import "../chunk-VWIPB6I5.js";
43
- import "../chunk-BKK77SBA.js";
44
- import "../chunk-RKGKFN2A.js";
45
- import "../chunk-3Y2RIUMM.js";
46
- import "../chunk-FH2X7BVP.js";
43
+ import "../chunk-IBRHSH5H.js";
44
+ import "../chunk-XSAHV5HQ.js";
47
45
  import "../chunk-UB4B6OFY.js";
48
- import "../chunk-C3MDXTRZ.js";
46
+ import "../chunk-HCJ4S3YB.js";
49
47
  import "../chunk-3RG5ZIWI.js";
50
48
 
51
49
  // src/perf/budget.ts
@@ -30,22 +30,20 @@ import {
30
30
  savePerfBaseline,
31
31
  summarizePerfEvents,
32
32
  writePerfHistoryEntry
33
- } from "../chunk-6RY2FFN4.mjs";
34
- import "../chunk-EOC4UHBS.mjs";
35
- import "../chunk-7CMJS3QE.mjs";
36
- import "../chunk-5VRJNBLZ.mjs";
33
+ } from "../chunk-OI4ESUMC.mjs";
34
+ import "../chunk-G5JTCFMI.mjs";
35
+ import "../chunk-QCOLAHU3.mjs";
36
+ import "../chunk-ITZQ526U.mjs";
37
+ import "../chunk-KRYP6CAE.mjs";
38
+ import "../chunk-OT2TESZU.mjs";
39
+ import "../chunk-Z3PSSXP3.mjs";
37
40
  import "../chunk-MOO4L7F4.mjs";
38
- import "../chunk-FHQGHPMO.mjs";
41
+ import "../chunk-RREBJX2S.mjs";
39
42
  import "../chunk-B5JD23U7.mjs";
40
- import "../chunk-2HQTDLHF.mjs";
41
- import "../chunk-A2OM6NEH.mjs";
42
- import "../chunk-SK7UZRNI.mjs";
43
- import "../chunk-4P2HHGAX.mjs";
44
- import "../chunk-EJ6BPYVR.mjs";
45
- import "../chunk-PWC3RBQE.mjs";
46
- import "../chunk-GYM3LLGS.mjs";
43
+ import "../chunk-ELLF55ER.mjs";
44
+ import "../chunk-2QNREG6K.mjs";
47
45
  import "../chunk-36I3M4UC.mjs";
48
- import "../chunk-DNFJLJMW.mjs";
46
+ import "../chunk-6MLAZPBL.mjs";
49
47
  import "../chunk-Y6FXYEAI.mjs";
50
48
 
51
49
  // src/perf/budget.ts
@@ -11,7 +11,7 @@
11
11
 
12
12
 
13
13
 
14
- var _chunkCZIVE6NTcjs = require('../chunk-CZIVE6NT.cjs');
14
+ var _chunkUUMKZJRJcjs = require('../chunk-UUMKZJRJ.cjs');
15
15
  require('../chunk-OBGZSXTJ.cjs');
16
16
 
17
17
 
@@ -26,4 +26,4 @@ require('../chunk-OBGZSXTJ.cjs');
26
26
 
27
27
 
28
28
 
29
- exports.ConfigValidationError = _chunkCZIVE6NTcjs.ConfigValidationError; exports.Schema = _chunkCZIVE6NTcjs.Schema; exports.SchemaValidationException = _chunkCZIVE6NTcjs.SchemaValidationException; exports.formatConfigError = _chunkCZIVE6NTcjs.formatConfigError; exports.formatIssues = _chunkCZIVE6NTcjs.formatIssues; exports.isConfigValidationError = _chunkCZIVE6NTcjs.isConfigValidationError; exports.isSchema = _chunkCZIVE6NTcjs.isSchema; exports.makeSchemaIssue = _chunkCZIVE6NTcjs.makeSchemaIssue; exports.parseConfig = _chunkCZIVE6NTcjs.parseConfig; exports.s = _chunkCZIVE6NTcjs.s; exports.schema = _chunkCZIVE6NTcjs.schema; exports.validateValue = _chunkCZIVE6NTcjs.validateValue;
29
+ exports.ConfigValidationError = _chunkUUMKZJRJcjs.ConfigValidationError; exports.Schema = _chunkUUMKZJRJcjs.Schema; exports.SchemaValidationException = _chunkUUMKZJRJcjs.SchemaValidationException; exports.formatConfigError = _chunkUUMKZJRJcjs.formatConfigError; exports.formatIssues = _chunkUUMKZJRJcjs.formatIssues; exports.isConfigValidationError = _chunkUUMKZJRJcjs.isConfigValidationError; exports.isSchema = _chunkUUMKZJRJcjs.isSchema; exports.makeSchemaIssue = _chunkUUMKZJRJcjs.makeSchemaIssue; exports.parseConfig = _chunkUUMKZJRJcjs.parseConfig; exports.s = _chunkUUMKZJRJcjs.s; exports.schema = _chunkUUMKZJRJcjs.schema; exports.validateValue = _chunkUUMKZJRJcjs.validateValue;
@@ -11,7 +11,7 @@ import {
11
11
  s,
12
12
  schema,
13
13
  validateValue
14
- } from "../chunk-C3MDXTRZ.js";
14
+ } from "../chunk-HCJ4S3YB.js";
15
15
  import "../chunk-3RG5ZIWI.js";
16
16
  export {
17
17
  ConfigValidationError,
@@ -11,7 +11,7 @@ import {
11
11
  s,
12
12
  schema,
13
13
  validateValue
14
- } from "../chunk-DNFJLJMW.mjs";
14
+ } from "../chunk-6MLAZPBL.mjs";
15
15
  import "../chunk-Y6FXYEAI.mjs";
16
16
  export {
17
17
  ConfigValidationError,
@@ -1,7 +1,7 @@
1
- import { a as MetricExemplar, b as MetricSnapshot, M as MetricsRegistry, T as TraceSampler, c as TraceSamplingInput, E as EventBus, B as BrassEnv, I as InMemoryTracer, d as Tracer, R as RuntimeSpan, e as InMemoryTracerOptions } from './tracer-Hwt1cl7h.js';
2
- import { T as TraceContext, R as RuntimeHooks, A as Async, J as JSONValue, B as Baggage, f as Runtime, g as RuntimeRegistry, h as RuntimeOptions } from './effect-DIUHZ9IN.js';
3
- import { b as CircuitBreakerStats } from './schedule-CK3Ml_7p.js';
4
- import { A as AdaptiveLimiterStats } from './client-CZHU674n.js';
1
+ import { a as MetricExemplar, b as MetricSnapshot, M as MetricsRegistry, T as TraceSampler, c as TraceSamplingInput, E as EventBus, B as BrassEnv, I as InMemoryTracer, d as Tracer, R as RuntimeSpan, e as InMemoryTracerOptions } from './tracer-DzfuE6um.js';
2
+ import { T as TraceContext, R as RuntimeHooks, A as Async, J as JSONValue, B as Baggage, b as Runtime, h as RuntimeRegistry, a as RuntimeOptions } from './effect-CtUDl5M5.js';
3
+ import { C as CircuitBreakerStats } from './layer-BalPI6cN.js';
4
+ import { A as AdaptiveLimiterStats } from './defaultClient-DhpCQW9m.js';
5
5
 
6
6
  declare const PROMETHEUS_CONTENT_TYPE = "text/plain; version=0.0.4; charset=utf-8";
7
7
  declare const OTLP_JSON_CONTENT_TYPE = "application/json";
@@ -683,4 +683,4 @@ type ObservedHttpServerResult<A> = {
683
683
  declare function runObservedHttpServerEffect<R extends object = {}, E = never, A = never>(observability: Observability, input: RequestObservabilityContextInput, effect: Async<R, E, A>, options?: HttpServerObservabilityOptions<A>, env?: R, runtimeOptions?: RequestObservabilityRuntimeOptions<R>): Promise<ObservedHttpServerResult<A>>;
684
684
  declare function observeHttpServerRequest<A>(observability: Observability, input: RequestObservabilityContextInput, handler: (ctx: RequestObservabilityContext) => Promise<A>, options?: HttpServerObservabilityOptions<A>): Promise<ObservedHttpServerResult<A>>;
685
685
 
686
- export { type RuntimeHealthOptions as $, type ObservabilityRequestEnvInput as A, type ObservabilityRuntimeEnv as B, type CardinalityConfig as C, type ObservabilityTraceExportResult as D, type ExportBatchResult as E, type ObservedHttpServerResult as F, type OtlpAttributeValue as G, type HealthCheck as H, type InjectTraceContextOptions as I, type OtlpExportOptions as J, type OtlpFetch as K, type LogLevel as L, type MakeOtlpOptionsInput as M, type OtlpHttpExportResult as N, type Observability as O, type OtlpHttpExporterOptions as P, type OtlpHttpResponse as Q, type RequestObservabilityContextInput as R, type SpanAttributes as S, type TraceContextCarrier as T, PROMETHEUS_CONTENT_TYPE as U, type PrometheusMetricsExporter as V, type PrometheusMetricsOptions as W, type RedactionConfig as X, type RedactionOptions as Y, type RequestObservabilityRuntimeOptions as Z, type ResolvedTraceSampling as _, type RequestObservabilityContext as a, spanLink as a$, type RuntimeHealthReport as a0, type RuntimeMetricsSinkOptions as a1, type SpanLink as a2, type SpanOptions as a3, type SpanSource as a4, type StructuredLogRecord as a5, type StructuredLogSinkOptions as a6, type StructuredLogSource as a7, type TraceContextHeaderValue as a8, type TraceSamplingConfig as a9, makeOtlpOptions as aA, makePrometheusMetricsExporter as aB, makeRequestObservabilityContext as aC, makeRuntimeHealth as aD, makeRuntimeMetricsSink as aE, makeStructuredLogSink as aF, makeTraceSampler as aG, metricsSnapshotToOtlp as aH, normalizeHttpRoute as aI, normalizeSpanId as aJ, normalizeTraceId as aK, observeHttpServerRequest as aL, otlpAnyValue as aM, parseBaggage as aN, parseTraceparent as aO, postOtlpJson as aP, ratioSampler as aQ, readiness as aR, resolveRequestBaggage as aS, resolveRequestTraceSeed as aT, resolveTraceSampling as aU, runObservedHttpServerEffect as aV, runtimeHealth as aW, sanitizeHttpTarget as aX, shouldSampleWith as aY, snapshotRuntimeHealth as aZ, spanEvent as a_, type TraceSamplingOptions as aa, type TraceSamplingRule as ab, alwaysOffSampler as ac, alwaysOnSampler as ad, currentBaggage as ae, currentSpanLink as af, defaultStructuredLogWriter as ag, exemplarFromTraceContext as ah, exportWithRetry as ai, extractBaggage as aj, extractTraceContext as ak, formatBaggage as al, formatPrometheusMetrics as am, formatStructuredLog as an, formatTraceparent as ao, healthToHttpResponse as ap, injectBaggage as aq, injectTraceContext as ar, logEffect as as, makeCardinalityLimitedMetrics as at, makeExportPipeline as au, makeObservability as av, makeObservabilityRedactor as aw, makeOtlpHttpLogExporter as ax, makeOtlpHttpMetricsExporter as ay, makeOtlpHttpSpanExporter as az, type ObservabilityOptions as b, spansToOtlp as b0, structuredLogsToOtlp as b1, toOtlpAttributes as b2, unixNanoFromMs as b3, withBaggage as b4, withLogContext as b5, withSpan as b6, withTimeout as b7, type CardinalityLimiterOptions as c, type ExportPipeline as d, type ExportPipelineFlushOptions as e, type ExportPipelineFlushResult as f, type ExportPipelineOptions as g, type ExportPipelineStats as h, type ExportPipelineTuning as i, type ExportRetryOptions as j, type ExportSignal as k, type HealthCheckResult as l, type HealthHttpResponse as m, type HealthStatus as n, type HttpServerObservabilityLogOptions as o, type HttpServerObservabilityOptions as p, type HttpServerObservabilitySpanOptions as q, type HttpServerOutcome as r, OTLP_JSON_CONTENT_TYPE as s, type ObservabilityExporters as t, type ObservabilityFlushError as u, type ObservabilityFlushResult as v, type ObservabilityLogExportResult as w, type ObservabilityOtlpOptions as x, type ObservabilityOtlpSignal as y, type ObservabilityRedactor as z };
686
+ export { type RuntimeHealthOptions as $, type ObservabilityRedactor as A, type ObservabilityRequestEnvInput as B, type CardinalityConfig as C, type ObservabilityTraceExportResult as D, type ExportBatchResult as E, type ObservedHttpServerResult as F, type OtlpAttributeValue as G, type HealthCheck as H, type InjectTraceContextOptions as I, type OtlpExportOptions as J, type OtlpFetch as K, type LogLevel as L, type MakeOtlpOptionsInput as M, type OtlpHttpExportResult as N, type Observability as O, type OtlpHttpExporterOptions as P, type OtlpHttpResponse as Q, type RequestObservabilityContextInput as R, type SpanAttributes as S, type TraceContextCarrier as T, PROMETHEUS_CONTENT_TYPE as U, type PrometheusMetricsExporter as V, type PrometheusMetricsOptions as W, type RedactionConfig as X, type RedactionOptions as Y, type RequestObservabilityRuntimeOptions as Z, type ResolvedTraceSampling as _, type RequestObservabilityContext as a, spanLink as a$, type RuntimeHealthReport as a0, type RuntimeMetricsSinkOptions as a1, type SpanLink as a2, type SpanOptions as a3, type SpanSource as a4, type StructuredLogRecord as a5, type StructuredLogSinkOptions as a6, type StructuredLogSource as a7, type TraceContextHeaderValue as a8, type TraceSamplingConfig as a9, makeOtlpOptions as aA, makePrometheusMetricsExporter as aB, makeRequestObservabilityContext as aC, makeRuntimeHealth as aD, makeRuntimeMetricsSink as aE, makeStructuredLogSink as aF, makeTraceSampler as aG, metricsSnapshotToOtlp as aH, normalizeHttpRoute as aI, normalizeSpanId as aJ, normalizeTraceId as aK, observeHttpServerRequest as aL, otlpAnyValue as aM, parseBaggage as aN, parseTraceparent as aO, postOtlpJson as aP, ratioSampler as aQ, readiness as aR, resolveRequestBaggage as aS, resolveRequestTraceSeed as aT, resolveTraceSampling as aU, runObservedHttpServerEffect as aV, runtimeHealth as aW, sanitizeHttpTarget as aX, shouldSampleWith as aY, snapshotRuntimeHealth as aZ, spanEvent as a_, type TraceSamplingOptions as aa, type TraceSamplingRule as ab, alwaysOffSampler as ac, alwaysOnSampler as ad, currentBaggage as ae, currentSpanLink as af, defaultStructuredLogWriter as ag, exemplarFromTraceContext as ah, exportWithRetry as ai, extractBaggage as aj, extractTraceContext as ak, formatBaggage as al, formatPrometheusMetrics as am, formatStructuredLog as an, formatTraceparent as ao, healthToHttpResponse as ap, injectBaggage as aq, injectTraceContext as ar, logEffect as as, makeCardinalityLimitedMetrics as at, makeExportPipeline as au, makeObservability as av, makeObservabilityRedactor as aw, makeOtlpHttpLogExporter as ax, makeOtlpHttpMetricsExporter as ay, makeOtlpHttpSpanExporter as az, type ObservabilityOptions as b, spansToOtlp as b0, structuredLogsToOtlp as b1, toOtlpAttributes as b2, unixNanoFromMs as b3, withBaggage as b4, withLogContext as b5, withSpan as b6, withTimeout as b7, type ObservabilityRuntimeEnv as c, type CardinalityLimiterOptions as d, type ExportPipeline as e, type ExportPipelineFlushOptions as f, type ExportPipelineFlushResult as g, type ExportPipelineOptions as h, type ExportPipelineStats as i, type ExportPipelineTuning as j, type ExportRetryOptions as k, type ExportSignal as l, type HealthCheckResult as m, type HealthHttpResponse as n, type HealthStatus as o, type HttpServerObservabilityLogOptions as p, type HttpServerObservabilityOptions as q, type HttpServerObservabilitySpanOptions as r, type HttpServerOutcome as s, OTLP_JSON_CONTENT_TYPE as t, type ObservabilityExporters as u, type ObservabilityFlushError as v, type ObservabilityFlushResult as w, type ObservabilityLogExportResult as x, type ObservabilityOtlpOptions as y, type ObservabilityOtlpSignal as z };
@@ -1,4 +1,4 @@
1
- import { Z as ZIO, O as Option, E as Exit, A as Async } from './effect-DIUHZ9IN.js';
1
+ import { Z as ZIO, O as Option, E as Exit, A as Async } from './effect-CtUDl5M5.js';
2
2
 
3
3
  type Empty<R, E, A> = {
4
4
  readonly _tag: "Empty";
@@ -1,5 +1,5 @@
1
- import { R as RuntimeHooks, b as RingBufferOptions, c as RuntimeEvent, a as RuntimeEmitContext, d as RuntimeEventRecord, e as RuntimeSpanLink, T as TraceContext, B as Baggage } from './effect-DIUHZ9IN.js';
2
- import { R as RuntimeClock } from './schedule-CK3Ml_7p.js';
1
+ import { R as RuntimeHooks, c as RingBufferOptions, d as RuntimeEvent, e as RuntimeEmitContext, f as RuntimeEventRecord, g as RuntimeSpanLink, T as TraceContext, B as Baggage } from './effect-CtUDl5M5.js';
2
+ import { R as RuntimeClock } from './layer-BalPI6cN.js';
3
3
 
4
4
  type MetricType = "counter" | "gauge" | "histogram";
5
5
  type MetricValue = {
@@ -1,4 +1,4 @@
1
- import { A as Async, E as Exit } from './effect-DIUHZ9IN.js';
1
+ import { A as Async, E as Exit } from './effect-CtUDl5M5.js';
2
2
 
3
3
  /**
4
4
  * Acquires a resource, uses it, and guarantees release regardless of outcome.
package/docs/README.md CHANGED
@@ -7,7 +7,9 @@ Start here:
7
7
  - **[Cancellation & interruption](./cancellation.md)** — interruption semantics, scopes, and cancellable `Async`
8
8
  - **[Observability](./observability.md)** — hooks, events, sinks, tracing, and HTTP policy context
9
9
  - **[Framework integrations](./framework-integrations.md)** — Vanilla, React, Next.js, Angular, Express, Fastify, and Nest patterns
10
+ - **[Runnable examples](https://github.com/BaldrVivaldelli/brass-runtime/tree/main/examples)** — Vanilla, Express, NestJS, Next.js, React, Angular, and shared helper apps
10
11
  - **[NestJS integration](./frameworks/nestjs.md)** — Brass module, Grafana/OTLP observability, HTTP client DI, and inbound spans
12
+ - **[Article: HTTP and observability in Brass](./articles/brass-runtime-http-observability.md)** — narrative summary of the HTTP, policy, transport, and observability work
11
13
  - **[HTTP client](./http.md)** — ZIO-style HTTP built on brass-runtime
12
14
  - **[HTTP recipes](./http-recipes.md)** — typed clients, custom transports, production adoption, observability, and config validation
13
15
  - **[Recipes](./recipes/README.md)** — copyable runtime, layer, HTTP server, testing, and performance paths
@@ -49,8 +49,11 @@ Primary categories:
49
49
  `TestRuntime`, `TestScheduler`, `TestClock`, and testing helpers
50
50
  - Layer 2.0 dependency graph helpers: `Layer`, `LayerContext`,
51
51
  `ServiceTag`, `makeServiceTag`, `layerValue`, `layerEffect`,
52
- `defineService`, `getService`, `formatLayerError`, `buildLayer`,
53
- `makeLayerScope`, `provide`, and `provideLayerContext`
52
+ `defineService`, `getService`, `getServices`, `useService`,
53
+ `useServices`, `composeAll`, `mergeAll`, `makeConfigLayer`,
54
+ `makeRuntimeLayer`, `RuntimeService`, `makeTestLayer`, `makeTestLayers`,
55
+ `formatLayerError`, `buildLayer`, `makeLayerScope`, `provide`, and
56
+ `provideLayerContext`
54
57
  - worker pool, tracing, metrics, runtime observability hooks/events
55
58
  - typed errors
56
59
  - runtime engines and capabilities
@@ -81,7 +84,11 @@ Observability helpers include `RuntimeHooks`, `RuntimeEvent`,
81
84
  `Schedule.driver` / `makeScheduleDriver`, runtime-clock-aware schedule runners,
82
85
  supervisor APIs, `makeRuntime` / `runPromise` / `runExit`, and Layer 2.0
83
86
  primitives for typed service tags, immutable contexts, scoped memoized builds,
84
- missing-service formatting, and idempotent release.
87
+ multi-layer `Layer.all(...)` composition for independent layers,
88
+ `Layer.composeAll(...)` for ordered context graphs, typed `Layer.use(...)` /
89
+ `Layer.useAll(...)` accessors, schema-backed config layers, runtime service
90
+ layers, test-service replacement layers, missing-service formatting, and
91
+ idempotent release.
85
92
 
86
93
  ## HTTP export: `brass-runtime/http`
87
94
 
@@ -90,8 +97,11 @@ Source: `src/http/index.ts`
90
97
  Recommended API order:
91
98
 
92
99
  - `makeDefaultHttpClient` for the one-stop default client with JSON/text
93
- helpers, lifecycle presets (`production`, `default`, `balanced`, `minimal`),
100
+ helpers, lifecycle presets (`production`, `default`, `balanced`,
101
+ `highThroughputProxy`, `proxy`, `minimal`),
94
102
  compression, stats, cache controls, `cancelAll`, and middleware integration.
103
+ - `HttpClientService` and `makeDefaultHttpClientLayer` for optional Layer/DI
104
+ application graphs with owned default-client lifecycle.
95
105
  - `makeHttpRouter`, `route` / `httpRoute`, and `makeNodeHttpServerResource`
96
106
  for the first-party HTTP server MVP: Node adapter, simple router,
97
107
  effect-based middleware, schema validation, observability, runtime
@@ -114,6 +124,10 @@ Recommended API order:
114
124
  - `HttpTransport`, `HttpStreamTransport`, `makeFetchTransport`, and
115
125
  `makeFetchStreamTransport` for replacing the default fetch-backed transport
116
126
  with an effect-based backend such as Axios, undici, or test doubles.
127
+ - `makeNodeHttpProxyClient`, `makeNodeHttpTransport`, `NodeHttpTransport`, and
128
+ `NodeHttpTransportConfig` for Node-only BFF/proxy workloads that should use
129
+ `node:http` / `node:https` keep-alive agents instead of the default fetch
130
+ backend.
117
131
  - `makePromiseHttpTransport`, `promiseHttpTransport`, and
118
132
  `normalizeHttpHeaders` for adapting Promise-based clients without writing
119
133
  `Async.async` / `Cause.fail` plumbing in consuming projects; the fluent
@@ -144,7 +158,7 @@ Primary categories:
144
158
  - HTTP server router, Node adapter, response helpers, and server resources
145
159
  - HTTP runtime probe helpers: `makeRuntimeHealthRoute` and
146
160
  `makeRuntimeReadinessRoute`
147
- - production HTTP client presets (`minimal`, `balanced`, `default`)
161
+ - production HTTP client presets (`minimal`, `proxy`, `highThroughputProxy`, `balanced`, `default`, `production`)
148
162
  - dependency-free schema validation for JSON responses
149
163
  - builder API for default HTTP client configuration
150
164
  - adaptive limiter presets, diagnostics, and public config helper
@@ -164,7 +178,8 @@ Source: `src/http/testing.ts`
164
178
 
165
179
  Dependency-free helpers for users' test suites:
166
180
 
167
- - `makeMockHttpClient`, `makeSequenceHttpClient`
181
+ - `makeMockHttpClient`, `makeSequenceHttpClient`,
182
+ `makeMockDefaultHttpClient`, and `makeMockDefaultHttpClientLayer`
168
183
  - `makeHttpResponse`, `makeTextHttpResponse`, `makeJsonHttpResponse`
169
184
  - `runHttpEffect`
170
185
  - `installMockFetch`, `withMockFetch`
@@ -221,9 +236,15 @@ Primary categories:
221
236
  - structured log sink plus effect-level logging helpers
222
237
  - `withSpan` and `spanEvent` for trace spans across effect composition
223
238
  - `makeObservability` production preset with `flush()` and `shutdown()`
239
+ - `ObservabilityService`, `makeObservabilityLayer`,
240
+ `makeObservedRuntimeLayer`, and `makeObservedHttpClientLayer` for optional
241
+ Layer/DI wiring across observability, runtime, and HTTP without making any
242
+ factory mandatory.
224
243
  - `withHttpObservability` middleware for HTTP client metrics, logs, spans, and
225
244
  W3C `traceparent` injection, including request-policy context in logs/spans
226
- and opt-in policy metric labels
245
+ and opt-in policy metric labels. Hot proxy paths can use
246
+ `spans: { events: false, sampleRate }` plus `spanSink` to emit sampled HTTP
247
+ spans without enabling global runtime hooks.
227
248
  - `HTTP_OBSERVABILITY_CONTRACT` for stable dashboard metric names, label names,
228
249
  span attribute names, and structured log message names
229
250
  - adaptive limiter gauges and HTTP span attributes when the wrapped client