brass-runtime 1.14.0 → 1.16.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 (90) hide show
  1. package/README.md +410 -135
  2. package/dist/agent/cli/main.cjs +49 -43
  3. package/dist/agent/cli/main.js +11 -5
  4. package/dist/agent/cli/main.mjs +11 -5
  5. package/dist/agent/index.cjs +8 -3
  6. package/dist/agent/index.d.ts +1 -1
  7. package/dist/agent/index.js +7 -2
  8. package/dist/agent/index.mjs +7 -2
  9. package/dist/{chunk-BMRF4FN6.js → chunk-2WC63LJK.mjs} +68 -242
  10. package/dist/chunk-3RG5ZIWI.js +10 -0
  11. package/dist/chunk-45F7OKGT.cjs +104 -0
  12. package/dist/chunk-5YOQOXEQ.cjs +2491 -0
  13. package/dist/chunk-7HUOJA4W.cjs +493 -0
  14. package/dist/{chunk-4N2JEK4H.mjs → chunk-7LVI2GIN.js} +252 -495
  15. package/dist/chunk-7TL2LHQJ.js +2491 -0
  16. package/dist/chunk-7V4KY4RL.mjs +104 -0
  17. package/dist/chunk-7XOPAB5Q.js +2143 -0
  18. package/dist/chunk-CCKHV5BT.mjs +193 -0
  19. package/dist/chunk-CY33PGEX.mjs +1110 -0
  20. package/dist/chunk-DJQ7OMMB.cjs +144 -0
  21. package/dist/chunk-F5EUMJL7.mjs +2143 -0
  22. package/dist/chunk-FM4W4QPL.js +193 -0
  23. package/dist/chunk-G3XGCZDQ.js +131 -0
  24. package/dist/{chunk-JT7D6M5H.js → chunk-G6IQOE4P.mjs} +252 -495
  25. package/dist/chunk-GOV47PPB.mjs +552 -0
  26. package/dist/chunk-H55LI6WY.js +93 -0
  27. package/dist/chunk-IJT6RRQ5.cjs +93 -0
  28. package/dist/chunk-J3H54ZRV.mjs +131 -0
  29. package/dist/chunk-JF4XXPZ5.cjs +552 -0
  30. package/dist/chunk-JNFRRJYH.cjs +2143 -0
  31. package/dist/chunk-JX3LZQJH.cjs +354 -0
  32. package/dist/chunk-K2T3DV26.mjs +93 -0
  33. package/dist/chunk-KCPT2D6G.js +552 -0
  34. package/dist/chunk-MWXMNYJS.cjs +1110 -0
  35. package/dist/{chunk-XTMZTVIT.cjs → chunk-N6VHMOWB.cjs} +140 -134
  36. package/dist/{chunk-WJESVBWN.js → chunk-NC5SDRYE.js} +16 -10
  37. package/dist/chunk-NOYZIMUJ.mjs +144 -0
  38. package/dist/chunk-NYL4D7SK.cjs +131 -0
  39. package/dist/chunk-OBGZSXTJ.cjs +10 -0
  40. package/dist/{chunk-UWMMYKVK.mjs → chunk-OOGJ73B6.js} +68 -242
  41. package/dist/chunk-PNVFW245.js +144 -0
  42. package/dist/chunk-PRWCB3QL.mjs +2491 -0
  43. package/dist/chunk-QY5FKYEQ.js +1110 -0
  44. package/dist/chunk-ROJC3NBJ.js +104 -0
  45. package/dist/chunk-SPUEME2B.cjs +343 -0
  46. package/dist/chunk-TDVMADDN.js +343 -0
  47. package/dist/chunk-TVN5I4U6.cjs +193 -0
  48. package/dist/chunk-U5KWK3PX.mjs +343 -0
  49. package/dist/chunk-VFIUZG7J.mjs +354 -0
  50. package/dist/{chunk-BKBFSOGT.cjs → chunk-WQ5QNU5R.cjs} +460 -703
  51. package/dist/chunk-XDZOO4L5.js +354 -0
  52. package/dist/chunk-Y6FXYEAI.mjs +10 -0
  53. package/dist/{chunk-MQF7HZ7Y.mjs → chunk-ZGLD4TVZ.mjs} +16 -10
  54. package/dist/client-CtFmoDvM.d.ts +645 -0
  55. package/dist/core/index.cjs +284 -0
  56. package/dist/core/index.d.ts +567 -0
  57. package/dist/core/index.js +284 -0
  58. package/dist/core/index.mjs +284 -0
  59. package/dist/{effect-DM56H743.d.ts → effect-CGNl5Rqp.d.ts} +118 -11
  60. package/dist/effectRunner-3ZHAD3LE.cjs +8 -0
  61. package/dist/effectRunner-A4CHJXJI.js +8 -0
  62. package/dist/effectRunner-OPUF6QRN.mjs +8 -0
  63. package/dist/http/index.cjs +4130 -890
  64. package/dist/http/index.d.ts +2289 -219
  65. package/dist/http/index.js +4116 -876
  66. package/dist/http/index.mjs +4116 -876
  67. package/dist/http/testing.cjs +159 -0
  68. package/dist/http/testing.d.ts +42 -0
  69. package/dist/http/testing.js +159 -0
  70. package/dist/http/testing.mjs +159 -0
  71. package/dist/index.cjs +305 -1168
  72. package/dist/index.d.ts +9 -701
  73. package/dist/index.js +176 -1039
  74. package/dist/index.mjs +176 -1039
  75. package/dist/observability/index.cjs +677 -0
  76. package/dist/observability/index.d.ts +79 -0
  77. package/dist/observability/index.js +677 -0
  78. package/dist/observability/index.mjs +677 -0
  79. package/dist/schedule-Fque9Abz.d.ts +70 -0
  80. package/dist/schema/index.cjs +25 -0
  81. package/dist/schema/index.d.ts +177 -0
  82. package/dist/schema/index.js +25 -0
  83. package/dist/schema/index.mjs +25 -0
  84. package/dist/server-C8hDXA74.d.ts +674 -0
  85. package/dist/stream-dvSs0QS5.d.ts +74 -0
  86. package/dist/tracer-B5tRH9H7.d.ts +230 -0
  87. package/dist/tracing-Dt9S_6V8.d.ts +148 -0
  88. package/package.json +37 -3
  89. package/dist/chunk-SKVY72E5.cjs +0 -667
  90. package/dist/stream-Oqe6WeLE.d.ts +0 -173
@@ -0,0 +1,79 @@
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-C8hDXA74.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-C8hDXA74.js';
3
+ import { M as MetricsRegistry } from '../tracer-B5tRH9H7.js';
4
+ import { a as HttpRequest, d as HttpMiddleware } from '../client-CtFmoDvM.js';
5
+ import '../effect-CGNl5Rqp.js';
6
+ import '../stream-dvSs0QS5.js';
7
+ import '../schedule-Fque9Abz.js';
8
+
9
+ type HttpOutcome = "success" | "error" | "abort" | "bad_url" | "fetch_error" | "timeout" | "pool_rejected" | "pool_timeout" | "pool_closed" | "batch_split_error";
10
+ type HttpObservabilityLogOptions = {
11
+ readonly requestLevel?: LogLevel | false;
12
+ readonly responseLevel?: LogLevel | false;
13
+ readonly errorLevel?: LogLevel | false;
14
+ };
15
+ type HttpObservabilitySpanOptions = {
16
+ readonly name?: string | ((req: HttpRequest) => string);
17
+ readonly attributes?: SpanAttributes | ((req: HttpRequest) => SpanAttributes);
18
+ };
19
+ type HttpAdaptiveLimiterObservabilityOptions = {
20
+ readonly enabled?: boolean;
21
+ /**
22
+ * Adds a `key` metric label when a stable limiter key can be inferred.
23
+ * Keep disabled for high-cardinality downstreams.
24
+ */
25
+ readonly includeKeyLabel?: boolean;
26
+ };
27
+ type HttpObservabilityOptions = {
28
+ readonly metrics?: MetricsRegistry | false;
29
+ readonly logs?: false | HttpObservabilityLogOptions;
30
+ readonly spans?: false | HttpObservabilitySpanOptions;
31
+ readonly adaptiveLimiter?: boolean | HttpAdaptiveLimiterObservabilityOptions;
32
+ readonly injectTraceHeaders?: boolean;
33
+ readonly includeHostLabel?: boolean;
34
+ readonly route?: string | ((req: HttpRequest) => string | undefined);
35
+ readonly clock?: () => number;
36
+ readonly durationBuckets?: readonly number[];
37
+ };
38
+ declare function withHttpObservability(options?: Observability | HttpObservabilityOptions): HttpMiddleware;
39
+ declare const makeHttpObservabilityMiddleware: typeof withHttpObservability;
40
+
41
+ type FetchLikeRequest = {
42
+ readonly headers?: TraceContextCarrier;
43
+ readonly method?: string;
44
+ readonly url?: string;
45
+ };
46
+ type NodeLikeIncomingMessage = {
47
+ readonly headers?: Record<string, string | readonly string[] | undefined>;
48
+ readonly method?: string;
49
+ readonly url?: string;
50
+ };
51
+ type ExpressLikeRequest = NodeLikeIncomingMessage & {
52
+ readonly originalUrl?: string;
53
+ readonly path?: string;
54
+ readonly route?: {
55
+ readonly path?: string;
56
+ };
57
+ };
58
+ type FastifyLikeRequest = NodeLikeIncomingMessage & {
59
+ readonly routeOptions?: {
60
+ readonly url?: string;
61
+ };
62
+ readonly routerPath?: string;
63
+ };
64
+ declare function makeFetchRequestObservabilityContext(observability: Observability, request: FetchLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
65
+ declare function makeNodeRequestObservabilityContext(observability: Observability, request: NodeLikeIncomingMessage, input?: RequestObservabilityContextInput): RequestObservabilityContext;
66
+ declare function makeExpressRequestObservabilityContext(observability: Observability, request: ExpressLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
67
+ declare function makeFastifyRequestObservabilityContext(observability: Observability, request: FastifyLikeRequest, input?: RequestObservabilityContextInput): RequestObservabilityContext;
68
+ declare function withFetchRequestObservability<RequestLike extends FetchLikeRequest, A>(observability: Observability, handler: (ctx: RequestObservabilityContext, request: RequestLike) => A | Promise<A>, input?: RequestObservabilityContextInput): (request: RequestLike) => Promise<A>;
69
+ declare function withNodeRequestObservability<RequestLike extends NodeLikeIncomingMessage, A>(observability: Observability, handler: (ctx: RequestObservabilityContext, request: RequestLike) => A | Promise<A>, input?: RequestObservabilityContextInput): (request: RequestLike) => Promise<A>;
70
+
71
+ type ObservabilityPreset = "development" | "production" | "test" | "disabled";
72
+ type ObservabilityEnv = Record<string, string | undefined>;
73
+ declare function makeNoopObservability(): Observability;
74
+ declare function makeObservabilityPreset(preset: ObservabilityPreset, overrides?: ObservabilityOptions): Observability;
75
+ declare function makeObservabilityFromEnv(env?: ObservabilityEnv, overrides?: ObservabilityOptions): Observability;
76
+ declare function observabilityOptionsForPreset(preset: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
77
+ declare function observabilityOptionsFromEnv(env?: ObservabilityEnv, preset?: Exclude<ObservabilityPreset, "disabled">): ObservabilityOptions;
78
+
79
+ export { type ExpressLikeRequest, type FastifyLikeRequest, type FetchLikeRequest, type HttpAdaptiveLimiterObservabilityOptions, type HttpObservabilityLogOptions, type HttpObservabilityOptions, type HttpObservabilitySpanOptions, type HttpOutcome, 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 };