brass-runtime 1.16.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.
- package/CHANGELOG.md +17 -0
- package/README.md +283 -18
- package/dist/agent/cli/main.cjs +38 -38
- package/dist/agent/cli/main.js +6 -6
- package/dist/agent/cli/main.mjs +6 -6
- package/dist/agent/index.cjs +7 -7
- package/dist/agent/index.d.ts +1 -1
- package/dist/agent/index.js +6 -6
- package/dist/agent/index.mjs +6 -6
- package/dist/chunk-2HQTDLHF.mjs +683 -0
- package/dist/chunk-36I3M4UC.mjs +370 -0
- package/dist/{chunk-QY5FKYEQ.js → chunk-3AYM6WPJ.js} +570 -51
- package/dist/chunk-3LOYJFRR.cjs +300 -0
- package/dist/chunk-3Y2RIUMM.js +300 -0
- package/dist/{chunk-N6VHMOWB.cjs → chunk-4ROBZFL6.cjs} +128 -128
- package/dist/{chunk-NC5SDRYE.js → chunk-52OB2ROS.js} +4 -4
- package/dist/{chunk-JX3LZQJH.cjs → chunk-52PPNNI4.cjs} +82 -20
- package/dist/{chunk-5YOQOXEQ.cjs → chunk-5EC274J5.cjs} +676 -293
- package/dist/chunk-5QC7LRZ3.js +229 -0
- package/dist/{chunk-7TL2LHQJ.js → chunk-5VRJNBLZ.mjs} +524 -141
- package/dist/chunk-62AZW6UT.cjs +313 -0
- package/dist/chunk-6IXXWIUM.js +683 -0
- package/dist/chunk-74ZTY6CP.js +2871 -0
- package/dist/chunk-76YMRMH2.cjs +777 -0
- package/dist/chunk-7CMJS3QE.mjs +2871 -0
- package/dist/{chunk-2WC63LJK.mjs → chunk-7JIJOVCT.js} +20 -10
- package/dist/{chunk-FM4W4QPL.js → chunk-A2OM6NEH.mjs} +5 -4
- package/dist/chunk-AGR5B2BC.cjs +683 -0
- package/dist/chunk-AVNQLJ5V.js +777 -0
- package/dist/chunk-B33ICAKP.js +313 -0
- package/dist/{chunk-J3H54ZRV.mjs → chunk-B5JD23U7.mjs} +1 -1
- package/dist/chunk-BABBZK4Y.js +2024 -0
- package/dist/{chunk-U5KWK3PX.mjs → chunk-C3MDXTRZ.js} +11 -0
- package/dist/{chunk-F5EUMJL7.mjs → chunk-CIZFIMK5.js} +55 -5
- package/dist/{chunk-SPUEME2B.cjs → chunk-CZIVE6NT.cjs} +12 -1
- package/dist/{chunk-TDVMADDN.js → chunk-DNFJLJMW.mjs} +11 -0
- package/dist/chunk-DNFO2EIZ.mjs +777 -0
- package/dist/{chunk-XDZOO4L5.js → chunk-EJ6BPYVR.mjs} +79 -17
- package/dist/{chunk-JNFRRJYH.cjs → chunk-ENKODRU3.cjs} +242 -192
- package/dist/chunk-EOC4UHBS.mjs +229 -0
- package/dist/{chunk-7LVI2GIN.js → chunk-FH2X7BVP.js} +507 -72
- package/dist/{chunk-OOGJ73B6.js → chunk-FHQGHPMO.mjs} +20 -10
- package/dist/{chunk-WQ5QNU5R.cjs → chunk-GLE2WY7Z.cjs} +652 -217
- package/dist/{chunk-G6IQOE4P.mjs → chunk-GYM3LLGS.mjs} +507 -72
- package/dist/chunk-HLWLMW2F.mjs +2024 -0
- package/dist/{chunk-TVN5I4U6.cjs → chunk-JF5WGYJJ.cjs} +25 -24
- package/dist/{chunk-CY33PGEX.mjs → chunk-KH4SYAOS.mjs} +570 -51
- package/dist/chunk-KN32XNTH.mjs +313 -0
- package/dist/chunk-KQLYONSE.cjs +2871 -0
- package/dist/{chunk-7HUOJA4W.cjs → chunk-KZJQ723N.cjs} +90 -80
- package/dist/{chunk-CCKHV5BT.mjs → chunk-L2SYFEBS.js} +5 -4
- package/dist/{chunk-IJT6RRQ5.cjs → chunk-L6VB5N7Q.cjs} +20 -9
- package/dist/{chunk-ZGLD4TVZ.mjs → chunk-MBEJI5HF.mjs} +4 -4
- package/dist/{chunk-PRWCB3QL.mjs → chunk-MIIYDLGM.js} +524 -141
- package/dist/{chunk-H55LI6WY.js → chunk-MOO4L7F4.mjs} +15 -4
- package/dist/{chunk-7XOPAB5Q.js → chunk-MT3OWDPC.mjs} +55 -5
- package/dist/chunk-MVGUEJ5Z.cjs +370 -0
- package/dist/chunk-PD4EJTQC.cjs +229 -0
- package/dist/chunk-PWC3RBQE.mjs +300 -0
- package/dist/{chunk-MWXMNYJS.cjs → chunk-Q2I37RP3.cjs} +643 -124
- package/dist/{chunk-VFIUZG7J.mjs → chunk-RKGKFN2A.js} +79 -17
- package/dist/{chunk-NYL4D7SK.cjs → chunk-SA6HUJVI.cjs} +5 -5
- package/dist/{chunk-K2T3DV26.mjs → chunk-TRM4JUZQ.js} +15 -4
- package/dist/chunk-UB4B6OFY.js +370 -0
- package/dist/{chunk-G3XGCZDQ.js → chunk-UCUBNWM2.js} +1 -1
- package/dist/chunk-VN44DYYT.cjs +2024 -0
- package/dist/{client-CtFmoDvM.d.ts → client-CZHU674n.d.ts} +211 -36
- package/dist/core/index.cjs +135 -9
- package/dist/core/index.d.ts +238 -33
- package/dist/core/index.js +155 -29
- package/dist/core/index.mjs +155 -29
- package/dist/{effect-CGNl5Rqp.d.ts → effect-DIUHZ9IN.d.ts} +89 -1
- package/dist/effectRunner-CFLC32IK.cjs +8 -0
- package/dist/{effectRunner-A4CHJXJI.js → effectRunner-L4S7IPT3.js} +2 -2
- package/dist/{effectRunner-OPUF6QRN.mjs → effectRunner-NNGG75QA.mjs} +2 -2
- package/dist/http/index.cjs +324 -2986
- package/dist/http/index.d.ts +54 -68
- package/dist/http/index.js +238 -2900
- package/dist/http/index.mjs +238 -2900
- package/dist/http/testing.cjs +14 -12
- package/dist/http/testing.d.ts +5 -4
- package/dist/http/testing.js +10 -8
- package/dist/http/testing.mjs +10 -8
- package/dist/index.cjs +423 -255
- package/dist/index.d.ts +87 -69
- package/dist/index.js +301 -133
- package/dist/index.mjs +301 -133
- package/dist/observability/index.cjs +16 -531
- package/dist/observability/index.d.ts +81 -8
- package/dist/observability/index.js +23 -538
- package/dist/observability/index.mjs +23 -538
- package/dist/perf/cli.cjs +401 -0
- package/dist/perf/cli.d.ts +1 -0
- package/dist/perf/cli.js +401 -0
- package/dist/perf/cli.mjs +401 -0
- package/dist/perf/index.cjs +141 -0
- package/dist/perf/index.d.ts +483 -0
- package/dist/perf/index.js +141 -0
- package/dist/perf/index.mjs +141 -0
- package/dist/schedule-CK3Ml_7p.d.ts +259 -0
- package/dist/schema/index.cjs +6 -2
- package/dist/schema/index.d.ts +3 -1
- package/dist/schema/index.js +5 -1
- package/dist/schema/index.mjs +5 -1
- package/dist/{server-C8hDXA74.d.ts → server-GJPg8ZSG.d.ts} +4 -3
- package/dist/{stream-dvSs0QS5.d.ts → stream-B4oK9JFP.d.ts} +1 -1
- package/dist/{tracer-B5tRH9H7.d.ts → tracer-Hwt1cl7h.d.ts} +13 -54
- package/dist/{tracing-Dt9S_6V8.d.ts → tracing-DqbTKGcf.d.ts} +1 -1
- package/docs/ARCHITECTURE.md +292 -0
- package/docs/README.md +63 -0
- package/docs/adr/0001-ai-context-pack.md +32 -0
- package/docs/agent-apply-mode.md +104 -0
- package/docs/agent-approvals.md +110 -0
- package/docs/agent-batch.md +185 -0
- package/docs/agent-boundaries.md +112 -0
- package/docs/agent-chat-sessions.md +160 -0
- package/docs/agent-ci.md +17 -0
- package/docs/agent-cli.md +405 -0
- package/docs/agent-config.md +480 -0
- package/docs/agent-context-discovery.md +159 -0
- package/docs/agent-copilot-like-dx.md +126 -0
- package/docs/agent-declarative-optimized-planning.md +138 -0
- package/docs/agent-dx.md +224 -0
- package/docs/agent-env-files.md +126 -0
- package/docs/agent-follow-up-context.md +43 -0
- package/docs/agent-global-usage.md +180 -0
- package/docs/agent-init.md +109 -0
- package/docs/agent-install-and-configure.md +516 -0
- package/docs/agent-language-workspace-ux.md +99 -0
- package/docs/agent-llm-adapters.md +123 -0
- package/docs/agent-local-install.md +190 -0
- package/docs/agent-local-tests.md +51 -0
- package/docs/agent-observability.md +155 -0
- package/docs/agent-patch-quality-loop.md +162 -0
- package/docs/agent-presets.md +22 -0
- package/docs/agent-project-commands.md +237 -0
- package/docs/agent-project-intelligence.md +156 -0
- package/docs/agent-redaction.md +18 -0
- package/docs/agent-release-readiness.md +76 -0
- package/docs/agent-rollback-safety.md +162 -0
- package/docs/agent-rollback.md +23 -0
- package/docs/agent-run-artifacts.md +16 -0
- package/docs/agent-vscode-auto-discovery.md +137 -0
- package/docs/agent-vscode-batch-runner.md +100 -0
- package/docs/agent-vscode-chat-layout.md +90 -0
- package/docs/agent-vscode-clean-install.md +147 -0
- package/docs/agent-vscode-code-actions.md +70 -0
- package/docs/agent-vscode-diff-preview.md +45 -0
- package/docs/agent-vscode-inline-assist.md +56 -0
- package/docs/agent-vscode-install.md +186 -0
- package/docs/agent-vscode-model-setup.md +97 -0
- package/docs/agent-vscode-patch-preview.md +92 -0
- package/docs/agent-vscode-problems.md +79 -0
- package/docs/agent-vscode-project-dashboard.md +106 -0
- package/docs/agent-vscode-run-history.md +92 -0
- package/docs/agent-vscode-ux.md +73 -0
- package/docs/ai/INVARIANTS.md +84 -0
- package/docs/ai/PROJECT_MAP.md +338 -0
- package/docs/ai/PUBLIC_API.md +336 -0
- package/docs/ai/VALIDATION_MATRIX.md +67 -0
- package/docs/api-polish.md +37 -0
- package/docs/cancellation.md +162 -0
- package/docs/coverage.md +46 -0
- package/docs/getting-started.md +159 -0
- package/docs/guides/README.md +40 -0
- package/docs/guides/circuit-breaker.md +89 -0
- package/docs/guides/error-handling.md +91 -0
- package/docs/guides/getting-started.md +107 -0
- package/docs/guides/layers.md +189 -0
- package/docs/guides/metrics.md +101 -0
- package/docs/guides/resource-management.md +141 -0
- package/docs/guides/retry.md +215 -0
- package/docs/guides/semaphore.md +66 -0
- package/docs/guides/streams.md +117 -0
- package/docs/guides/supervisors.md +98 -0
- package/docs/guides/testing.md +162 -0
- package/docs/guides/tracing.md +71 -0
- package/docs/http-recipes.md +399 -0
- package/docs/http.md +749 -0
- package/docs/modules.md +285 -0
- package/docs/observability-collector-smoke.md +31 -0
- package/docs/observability-framework-examples.md +98 -0
- package/docs/observability.md +542 -0
- package/docs/otel-collector-smoke.yaml +27 -0
- package/docs/performance-profiler.md +199 -0
- package/docs/production-readiness.md +73 -0
- package/docs/recipes/README.md +12 -0
- package/docs/recipes/http-server.md +45 -0
- package/docs/recipes/layers.md +44 -0
- package/docs/recipes/performance.md +47 -0
- package/docs/recipes/runtime.md +41 -0
- package/docs/recipes/testing.md +41 -0
- package/docs/release.md +53 -0
- package/docs/wasm-bounded-queues.md +44 -0
- package/docs/wasm-engine-observability-benchmarks.md +85 -0
- package/docs/wasm-fiber-engine.md +117 -0
- package/docs/wasm-scheduler-state-machine.md +122 -0
- package/docs/wasm-stream-chunks.md +54 -0
- package/package.json +22 -2
- package/dist/chunk-45F7OKGT.cjs +0 -104
- package/dist/chunk-7V4KY4RL.mjs +0 -104
- package/dist/chunk-DJQ7OMMB.cjs +0 -144
- package/dist/chunk-GOV47PPB.mjs +0 -552
- package/dist/chunk-JF4XXPZ5.cjs +0 -552
- package/dist/chunk-KCPT2D6G.js +0 -552
- package/dist/chunk-NOYZIMUJ.mjs +0 -144
- package/dist/chunk-PNVFW245.js +0 -144
- package/dist/chunk-ROJC3NBJ.js +0 -104
- package/dist/effectRunner-3ZHAD3LE.cjs +0 -8
- package/dist/schedule-Fque9Abz.d.ts +0 -70
package/dist/http/index.d.ts
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { e as
|
|
2
|
-
export {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
export { AnySchema, ConfigValidationError, InferObject, InferSchema, JsonValidator, JsonValidatorResult, NumberSchemaOptions, ObjectSchemaOptions, Schema, SchemaPathPart, SchemaResult, SchemaShape, SchemaValidationException, StringSchemaOptions, formatIssues, isSchema, makeSchemaIssue, parseConfig, s, schema, validateValue } from '../schema/index.js';
|
|
6
|
-
import {
|
|
7
|
-
import { T as Tracer, R as Resource } from '../tracing-
|
|
1
|
+
import { e as HttpRequestPolicyRef, f as HttpRequestRetryOverride, a as HttpRequest, c as HttpError, b as HttpWireResponse, V as ValidationError, d as HttpMiddleware, R as RetryPolicy, H as HttpClient, M as MakeHttpConfig, g as HttpWireResponseStream, h as HttpClientStream, i as HttpClientStats, j as AdaptiveLimiter, k as HttpClientFn, l as AdaptiveLimiterConfig, m as HttpMethod, n as HttpPolicyPresets, o as HttpTransport, p as AdaptiveLimiterPreset, q as HttpPoolConfig } from '../client-CZHU674n.js';
|
|
2
|
+
export { r as AdaptiveAcquireOptions, s as AdaptiveBaselineStrategy, t as AdaptiveHeadroomContext, u as AdaptiveHeadroomMode, v as AdaptiveHeadroomStrategy, w as AdaptiveLease, x as AdaptiveLimiterDiagnostics, y as AdaptiveLimiterKeySnapshot, A as AdaptiveLimiterStats, z as AdaptiveQueueLoadShedding, B as AdaptiveQueueStrategy, C as AdaptiveReleaseInfo, D as HttpBody, E as HttpClientStreamFn, F as HttpConcurrencyPool, G as HttpErrorHandlers, I as HttpInit, J as HttpPolicyPreset, K as HttpPoolKeyResolver, L as HttpPoolKeyStats, N as HttpPoolLease, O as HttpPoolStats, P as HttpRequestPolicy, Q as HttpRetryScheduleInput, S as HttpStreamTransport, T as HttpTransportContext, U as HttpTransportTiming, W as JsonDecodeResult, X as KnownHttpError, Y as KnownHttpErrorTag, Z as LimitChangeEvent, _ as PerRequestRetryOverride, $ as PromiseHttpTransportBodyBuilder, a0 as PromiseHttpTransportBodySelector, a1 as PromiseHttpTransportConfig, a2 as PromiseHttpTransportConfigWithSignal, a3 as PromiseHttpTransportFluentResponseBuilder, a4 as PromiseHttpTransportRequestConfigBuilder, a5 as PromiseHttpTransportRequestConfigContext, a6 as PromiseHttpTransportRequestConfigMapper, a7 as PromiseHttpTransportResponse, a8 as PromiseHttpTransportResponseInfo, a9 as PromiseHttpTransportResponseInfoMapper, aa as PromiseHttpTransportStartBuilder, ab as ResolveHttpRequestPolicyOptions, ac as ResolvedConfig, ad as RetryEvent, ae as RetryScheduleInput, af as RetryableHttpErrorOptions, ag as ToHttpErrorOptions, ah as abortErrorForSignal, ai as adaptiveLimiterPresets, aj as backoffDelayMs, ak as decodeJsonBody, al as decodeJsonBodyEffect, am as decorate, an as defaultRetryOnError, ao as defaultRetryOnStatus, ap as defaultRetryableMethods, aq as defineHttpPolicyPresets, ar as encodeJsonBodyEffect, as as formatHttpError, at as getHttpRequestPolicy, au as headersOf, av as httpErrorStatus, aw as httpPolicy, ax as isAbortError, ay as isAbortHttpError, az as isCircuitBreakerOpen, aA as isExternalAbortError, aB as isExternalTimeoutError, aC as isFetchHttpError, aD as isHttpError, aE as isKnownHttpError, aF as isRetryableHttpError, aG as isRetryableHttpStatus, aH as isTaggedHttpError, aI as isTimeoutHttpError, aJ as isValidationError, aK as linkAbortSignals, aL as makeAdaptiveLimiterConfig, aM as makeFetchStreamTransport, aN as makeFetchTransport, aO as makeHttp, aP as makeHttpStream, aQ as makePromiseHttpTransport, aR as matchHttpError, aS as normalizeHeadersInit, aT as normalizeHttpError, aU as normalizeHttpHeaders, aV as normalizeRetryBudget, aW as promiseHttpTransport, aX as resolveConfig, aY as resolveHttpPoolKey, aZ as resolveHttpRequestPolicyPresets, a_ as retryAfterMs, a$ as toHttpError, b0 as validateConfig, b1 as validatedJson, b2 as validatedJsonResponse, b3 as withHttpPolicyPresets, b4 as withHttpRequestPolicy, b5 as withMiddleware, b6 as withRetry, b7 as withRetryStream } from '../client-CZHU674n.js';
|
|
3
|
+
import { C as AsyncWithPromise, A as Async, f as Runtime, h as RuntimeOptions } from '../effect-DIUHZ9IN.js';
|
|
4
|
+
import { AnyJsonSchemaLike, InferJsonSchema } from '../schema/index.js';
|
|
5
|
+
export { AnySchema, ConfigValidationError, InferObject, InferSchema, JsonSchemaLike, JsonValidator, JsonValidatorResult, NumberSchemaOptions, ObjectSchemaOptions, Schema, SchemaIssue, SchemaPathPart, SchemaResult, SchemaShape, SchemaValidationException, StringSchemaOptions, formatConfigError, formatIssues, isConfigValidationError, isSchema, makeSchemaIssue, parseConfig, s, schema, validateValue } from '../schema/index.js';
|
|
6
|
+
import { d as CircuitBreakerConfig, S as Schedule } from '../schedule-CK3Ml_7p.js';
|
|
7
|
+
import { T as Tracer, R as Resource } from '../tracing-DqbTKGcf.js';
|
|
8
8
|
import { Server } from 'node:http';
|
|
9
9
|
import { AddressInfo } from 'node:net';
|
|
10
|
-
import {
|
|
11
|
-
import
|
|
12
|
-
import '../
|
|
10
|
+
import { O as Observability, p as HttpServerObservabilityOptions, Z as RuntimeHealthOptions } from '../server-GJPg8ZSG.js';
|
|
11
|
+
import '../stream-B4oK9JFP.js';
|
|
12
|
+
import '../tracer-Hwt1cl7h.js';
|
|
13
13
|
|
|
14
14
|
/**
|
|
15
15
|
* A fixed-size circular buffer that stores latency samples and supports
|
|
@@ -104,36 +104,15 @@ declare function computeNewLimit(currentLimit: number, gradient: number, headroo
|
|
|
104
104
|
readonly maxDecreaseRatio?: number;
|
|
105
105
|
}): number;
|
|
106
106
|
|
|
107
|
-
type
|
|
108
|
-
readonly
|
|
109
|
-
readonly
|
|
110
|
-
readonly
|
|
111
|
-
readonly
|
|
112
|
-
readonly
|
|
113
|
-
readonly schema?: string;
|
|
114
|
-
};
|
|
115
|
-
type JsonDecodeResult<A> = {
|
|
116
|
-
readonly success: true;
|
|
117
|
-
readonly data: A;
|
|
118
|
-
} | {
|
|
119
|
-
readonly success: false;
|
|
120
|
-
readonly error: ValidationError;
|
|
107
|
+
type HttpRequestPolicyInit = {
|
|
108
|
+
readonly policy?: HttpRequestPolicyRef;
|
|
109
|
+
readonly lane?: string;
|
|
110
|
+
readonly dedupKey?: string;
|
|
111
|
+
readonly priority?: number;
|
|
112
|
+
readonly retry?: HttpRequestRetryOverride;
|
|
121
113
|
};
|
|
122
|
-
declare function decodeJsonBody<A = unknown>(bodyText: string, validator?: JsonSchemaLike<A>, options?: {
|
|
123
|
-
readonly schemaName?: string;
|
|
124
|
-
}): JsonDecodeResult<A>;
|
|
125
|
-
declare function encodeJsonBodyEffect(bodyObj: unknown, validator?: JsonSchemaLike<any>, options?: {
|
|
126
|
-
readonly schemaName?: string;
|
|
127
|
-
}): Async<unknown, ValidationError, string>;
|
|
128
|
-
declare function decodeJsonBodyEffect<A = unknown>(bodyText: string, validator?: JsonSchemaLike<A>, options?: {
|
|
129
|
-
readonly schemaName?: string;
|
|
130
|
-
}): Async<unknown, ValidationError, A>;
|
|
131
|
-
declare function validatedJson<A>(client: HttpClientFn, validator: JsonSchemaLike<A>): (req: Parameters<HttpClientFn>[0]) => Async<unknown, HttpError | ValidationError, A>;
|
|
132
|
-
declare function validatedJsonResponse<A>(client: HttpClientFn, validator: JsonSchemaLike<A>): (req: Parameters<HttpClientFn>[0]) => Async<unknown, HttpError | ValidationError, HttpWireResponse & {
|
|
133
|
-
readonly body: A;
|
|
134
|
-
}>;
|
|
135
114
|
|
|
136
|
-
type InitNoMethodBody$1 = Omit<RequestInit, "method" | "body"> & {
|
|
115
|
+
type InitNoMethodBody$1 = Omit<RequestInit, "method" | "body"> & HttpRequestPolicyInit & {
|
|
137
116
|
timeoutMs?: number;
|
|
138
117
|
poolKey?: string;
|
|
139
118
|
headers?: any;
|
|
@@ -195,7 +174,7 @@ type HttpResponseWithMeta<A> = {
|
|
|
195
174
|
response: HttpResponse<A>;
|
|
196
175
|
meta: HttpMeta;
|
|
197
176
|
};
|
|
198
|
-
type AnyInitWithHeaders = {
|
|
177
|
+
type AnyInitWithHeaders = HttpRequestPolicyInit & {
|
|
199
178
|
headers?: any;
|
|
200
179
|
timeoutMs?: number;
|
|
201
180
|
poolKey?: string;
|
|
@@ -223,15 +202,15 @@ type Dx = {
|
|
|
223
202
|
declare function httpClient(cfg?: MakeHttpConfig): Dx;
|
|
224
203
|
declare function httpClientWithMeta(cfg?: MakeHttpConfig): {
|
|
225
204
|
request: (req: HttpRequest) => AsyncWithPromise<unknown, HttpError, {
|
|
226
|
-
wire: HttpWireResponse
|
|
205
|
+
wire: HttpWireResponse<unknown>;
|
|
227
206
|
meta: HttpMeta;
|
|
228
207
|
}>;
|
|
229
208
|
get: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, {
|
|
230
|
-
wire: HttpWireResponse
|
|
209
|
+
wire: HttpWireResponse<unknown>;
|
|
231
210
|
meta: HttpMeta;
|
|
232
211
|
}>;
|
|
233
212
|
getText: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, {
|
|
234
|
-
wire: HttpWireResponse
|
|
213
|
+
wire: HttpWireResponse<unknown>;
|
|
235
214
|
response: {
|
|
236
215
|
status: number;
|
|
237
216
|
statusText: string;
|
|
@@ -241,12 +220,12 @@ declare function httpClientWithMeta(cfg?: MakeHttpConfig): {
|
|
|
241
220
|
meta: HttpMeta;
|
|
242
221
|
}>;
|
|
243
222
|
getJson: <A>(url: string, init?: AnyJsonInit) => AsyncWithPromise<unknown, HttpError | ValidationError, {
|
|
244
|
-
wire: HttpWireResponse
|
|
223
|
+
wire: HttpWireResponse<unknown>;
|
|
245
224
|
response: HttpResponse<A>;
|
|
246
225
|
meta: HttpMeta;
|
|
247
226
|
}>;
|
|
248
227
|
post: (url: string, body?: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, {
|
|
249
|
-
wire: HttpWireResponse
|
|
228
|
+
wire: HttpWireResponse<unknown>;
|
|
250
229
|
meta: HttpMeta;
|
|
251
230
|
}>;
|
|
252
231
|
postJson: <A>(url: string, bodyObj: unknown, init?: AnyInitWithHeaders & {
|
|
@@ -255,15 +234,15 @@ declare function httpClientWithMeta(cfg?: MakeHttpConfig): {
|
|
|
255
234
|
bodySchema?: AnyJsonSchemaLike;
|
|
256
235
|
bodySchemaName?: string;
|
|
257
236
|
}) => AsyncWithPromise<unknown, HttpError | ValidationError, {
|
|
258
|
-
wire: HttpWireResponse
|
|
237
|
+
wire: HttpWireResponse<unknown>;
|
|
259
238
|
response: HttpResponse<A>;
|
|
260
239
|
meta: HttpMeta;
|
|
261
240
|
}>;
|
|
262
241
|
};
|
|
263
242
|
declare function httpClientStream(cfg?: MakeHttpConfig): {
|
|
264
|
-
request: (req: HttpRequest) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream
|
|
265
|
-
getStream: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream
|
|
266
|
-
get: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream
|
|
243
|
+
request: (req: HttpRequest) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream<unknown>>;
|
|
244
|
+
getStream: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream<unknown>>;
|
|
245
|
+
get: (url: string, init?: InitNoMethodBody$1) => AsyncWithPromise<unknown, HttpError, HttpWireResponseStream<unknown>>;
|
|
267
246
|
with: (mw: (n: HttpClientStream) => HttpClientStream) => /*elided*/ any;
|
|
268
247
|
withRetry: (p: RetryPolicy) => /*elided*/ any;
|
|
269
248
|
wire: HttpClientStream;
|
|
@@ -289,22 +268,6 @@ declare function withCircuitBreaker(config?: HttpCircuitBreakerConfig): HttpMidd
|
|
|
289
268
|
*/
|
|
290
269
|
declare function withTracing(tracer: Tracer): HttpMiddleware;
|
|
291
270
|
|
|
292
|
-
type KnownHttpError = HttpError | ValidationError | CircuitBreakerError;
|
|
293
|
-
type KnownHttpErrorTag = KnownHttpError["_tag"];
|
|
294
|
-
type HttpErrorHandlers<R> = {
|
|
295
|
-
readonly [K in KnownHttpErrorTag]?: (error: Extract<KnownHttpError, {
|
|
296
|
-
readonly _tag: K;
|
|
297
|
-
}>) => R;
|
|
298
|
-
} & {
|
|
299
|
-
readonly default?: (error: unknown) => R;
|
|
300
|
-
};
|
|
301
|
-
declare function isHttpError(error: unknown): error is HttpError;
|
|
302
|
-
declare function isValidationError(error: unknown): error is ValidationError;
|
|
303
|
-
declare function isCircuitBreakerOpen(error: unknown): error is CircuitBreakerError;
|
|
304
|
-
declare function isKnownHttpError(error: unknown): error is KnownHttpError;
|
|
305
|
-
declare function matchHttpError<R>(error: unknown, handlers: HttpErrorHandlers<R>): R | undefined;
|
|
306
|
-
declare function formatHttpError(error: unknown): string;
|
|
307
|
-
|
|
308
271
|
/**
|
|
309
272
|
* Developer-provided function that defines how to combine multiple requests
|
|
310
273
|
* into one and split the response back.
|
|
@@ -2118,12 +2081,12 @@ type InitNoMethodBody = Omit<RequestInit, "method" | "body"> & {
|
|
|
2118
2081
|
timeoutMs?: number;
|
|
2119
2082
|
poolKey?: string;
|
|
2120
2083
|
headers?: unknown;
|
|
2121
|
-
};
|
|
2084
|
+
} & HttpRequestPolicyInit;
|
|
2122
2085
|
type InitWithHeaders = {
|
|
2123
2086
|
headers?: unknown;
|
|
2124
2087
|
timeoutMs?: number;
|
|
2125
2088
|
poolKey?: string;
|
|
2126
|
-
} & Record<string, unknown>;
|
|
2089
|
+
} & HttpRequestPolicyInit & Record<string, unknown>;
|
|
2127
2090
|
type HttpJsonInit<Validator extends AnyJsonSchemaLike> = InitNoMethodBody & {
|
|
2128
2091
|
readonly schema: Validator;
|
|
2129
2092
|
readonly schemaName?: string;
|
|
@@ -2166,7 +2129,7 @@ type DefaultPostJson = {
|
|
|
2166
2129
|
<Validator extends AnyJsonSchemaLike>(url: string, bodyObj: unknown, init: HttpPostJsonInit<Validator>): AsyncWithPromise<unknown, HttpError | ValidationError, HttpResponse<InferJsonSchema<Validator>>>;
|
|
2167
2130
|
<A = unknown>(url: string, bodyObj: unknown, init?: PostJsonInitNoSchema): AsyncWithPromise<unknown, HttpError | ValidationError, HttpResponse<A>>;
|
|
2168
2131
|
};
|
|
2169
|
-
type DefaultHttpClientPreset = "minimal" | "balanced" | "default";
|
|
2132
|
+
type DefaultHttpClientPreset = "minimal" | "balanced" | "default" | "production";
|
|
2170
2133
|
type DefaultHttpClientFeatures = {
|
|
2171
2134
|
readonly dedup: boolean;
|
|
2172
2135
|
readonly batch: boolean;
|
|
@@ -2184,12 +2147,18 @@ type DefaultHttpClientConfig = LifecycleClientConfig & {
|
|
|
2184
2147
|
* - minimal: wire client + timeout only.
|
|
2185
2148
|
* - balanced: retry, priority, dedup, adaptive limiter, response compression.
|
|
2186
2149
|
* - default: balanced + short safe-method response cache.
|
|
2150
|
+
* - production: stable alias for the full production-ready default preset.
|
|
2187
2151
|
*/
|
|
2188
2152
|
readonly preset?: DefaultHttpClientPreset;
|
|
2189
2153
|
/** Response decompression. Enabled by balanced/default presets; set false to disable. */
|
|
2190
2154
|
readonly compression?: CompressionConfig | false;
|
|
2191
2155
|
/** Extra middleware applied outermost after the preset stack, e.g. withHttpObservability(obs). */
|
|
2192
2156
|
readonly middleware?: readonly HttpMiddleware[];
|
|
2157
|
+
/**
|
|
2158
|
+
* Named per-request policy presets. Requests can use `policy: "readModel"` or
|
|
2159
|
+
* `policy: { preset: "readModel", ...overrides }`.
|
|
2160
|
+
*/
|
|
2161
|
+
readonly policyPresets?: HttpPolicyPresets;
|
|
2193
2162
|
};
|
|
2194
2163
|
type DefaultHttpClient = {
|
|
2195
2164
|
readonly request: (req: HttpRequest) => AsyncWithPromise<unknown, HttpError, HttpWireResponse>;
|
|
@@ -2227,10 +2196,12 @@ type HttpClientBuilder = {
|
|
|
2227
2196
|
readonly headers: (headers: Record<string, string>) => HttpClientBuilder;
|
|
2228
2197
|
readonly timeoutMs: (timeoutMs: number) => HttpClientBuilder;
|
|
2229
2198
|
readonly timeout: (timeoutMs: number) => HttpClientBuilder;
|
|
2199
|
+
readonly transport: (transport: HttpTransport) => HttpClientBuilder;
|
|
2230
2200
|
readonly preset: (preset: DefaultHttpClientPreset) => HttpClientBuilder;
|
|
2231
2201
|
readonly minimal: () => HttpClientBuilder;
|
|
2232
2202
|
readonly balanced: () => HttpClientBuilder;
|
|
2233
2203
|
readonly defaultPreset: () => HttpClientBuilder;
|
|
2204
|
+
readonly production: () => HttpClientBuilder;
|
|
2234
2205
|
readonly dedup: (config?: DedupConfig$1 | false) => HttpClientBuilder;
|
|
2235
2206
|
readonly noDedup: () => HttpClientBuilder;
|
|
2236
2207
|
readonly batch: (config: BatchConfig | false) => HttpClientBuilder;
|
|
@@ -2393,5 +2364,20 @@ declare function makeNodeHttpServer<R extends object = {}>(options: NodeHttpServ
|
|
|
2393
2364
|
declare function nodeHttpServerResource<R extends object = {}>(options: NodeHttpServerOptions<R>): Resource<unknown, NodeHttpServerError, NodeHttpServerHandle>;
|
|
2394
2365
|
declare const makeNodeHttpServerResource: typeof nodeHttpServerResource;
|
|
2395
2366
|
declare const makeHttpServerResource: typeof nodeHttpServerResource;
|
|
2367
|
+
declare const HttpServer: Readonly<{
|
|
2368
|
+
route: typeof route;
|
|
2369
|
+
httpRoute: typeof route;
|
|
2370
|
+
router: typeof makeHttpRouter;
|
|
2371
|
+
listen: typeof makeNodeHttpServer;
|
|
2372
|
+
resource: typeof nodeHttpServerResource;
|
|
2373
|
+
json: typeof json;
|
|
2374
|
+
text: typeof text;
|
|
2375
|
+
empty: typeof empty;
|
|
2376
|
+
healthRoute: typeof makeRuntimeHealthRoute;
|
|
2377
|
+
readinessRoute: typeof makeRuntimeReadinessRoute;
|
|
2378
|
+
middleware: Readonly<{
|
|
2379
|
+
header: typeof withResponseHeader;
|
|
2380
|
+
}>;
|
|
2381
|
+
}>;
|
|
2396
2382
|
|
|
2397
|
-
export { AdaptiveLimiter, AdaptiveLimiterConfig, AdaptiveLimiterPreset, AnyJsonSchemaLike, type BatchConfig, type BatchFunction, type BudgetSemaphore, type CacheConfig$1 as CacheConfig, type CacheKeyComponents, type CachePolicyResult$1 as CachePolicyResult, type CompressionConfig, type CompressionMiddlewareResult, type CompressionStats, type ConnectionPrewarmAttempt, type ConnectionPrewarmConfig, type ConnectionPrewarmEvent, type ConnectionPrewarmResult, type ConnectionPrewarmingMiddlewareConfig, type ConnectionStateMap, DEFAULT_CACHE_RELEVANT_HEADERS, type DecompressResult, type Decompressor, type DedupConfig$1 as DedupConfig, type DefaultGetJson, type DefaultHttpClient, type DefaultHttpClientConfig, type DefaultHttpClientFeatures, type DefaultHttpClientPreset, type DefaultPostJson, type Dx, EmaComputer, type HttpCircuitBreakerConfig, HttpClient, type HttpClientBuilder, HttpClientFn, HttpClientStats, HttpClientStream, HttpError, type
|
|
2383
|
+
export { AdaptiveLimiter, AdaptiveLimiterConfig, AdaptiveLimiterPreset, AnyJsonSchemaLike, type BatchConfig, type BatchFunction, type BudgetSemaphore, type CacheConfig$1 as CacheConfig, type CacheKeyComponents, type CachePolicyResult$1 as CachePolicyResult, type CompressionConfig, type CompressionMiddlewareResult, type CompressionStats, type ConnectionPrewarmAttempt, type ConnectionPrewarmConfig, type ConnectionPrewarmEvent, type ConnectionPrewarmResult, type ConnectionPrewarmingMiddlewareConfig, type ConnectionStateMap, DEFAULT_CACHE_RELEVANT_HEADERS, type DecompressResult, type Decompressor, type DedupConfig$1 as DedupConfig, type DefaultGetJson, type DefaultHttpClient, type DefaultHttpClientConfig, type DefaultHttpClientFeatures, type DefaultHttpClientPreset, type DefaultPostJson, type Dx, EmaComputer, type HttpCircuitBreakerConfig, HttpClient, type HttpClientBuilder, HttpClientFn, HttpClientStats, HttpClientStream, HttpError, type HttpJsonInit, type HttpMeta, HttpMethod, HttpMiddleware, HttpPolicyPresets, HttpPoolConfig, type HttpPostJsonBodyInit, type HttpPostJsonInit, type HttpPostJsonSchemaBodyInit, HttpRequest, HttpRequestPolicyRef, HttpRequestRetryOverride, type HttpResponse, type HttpResponseWithMeta, type HttpRouteMatch, type HttpRouteOptions, type HttpRouteSchemas, type HttpRouter, type HttpRouterOptions, type HttpRuntimeHealthRouteOptions, HttpServer, type HttpServerBody, type HttpServerContext, type HttpServerHandler, type HttpServerHeaders, type HttpServerMethod, type HttpServerMiddleware, type HttpServerParams, type HttpServerQuery, type HttpServerRequest, type HttpServerResponse, type HttpServerRoute, HttpTransport, HttpWireResponse, HttpWireResponseStream, type HttpWireWithMeta, InferJsonSchema, type InferServerPart, LRUCache, type LRUCacheConfig, LatencyWindow, type LifecycleClient, type LifecycleClientConfig, type LifecycleEvent, type LifecycleEventType, type LifecycleRequestOptions, type LifecycleStats, LifecycleStatsTracker, type LogEvent, MakeHttpConfig, type NodeHttpServerError, type NodeHttpServerHandle, type NodeHttpServerOptions, type NodeHttpServerShutdownState, type PrewarmConfig, type PrewarmEvent, type PrewarmEventType, type PrewarmLifecycleConfig, type PrewarmManager, type PrewarmOriginState, type PrewarmOriginStatus, type PrewarmResult, type PrewarmResultStatus, type PrewarmStatusSnapshot, type PriorityConfig$1 as PriorityConfig, PriorityQueue, type PriorityQueueEntry, type ProbeOutcome, type RequestBatchingConfig, type RequestBatchingEvent, type RequestCompressionConfig, type RequestCompressionMiddlewareResult, type RequestCompressionStats, RetryPolicy, type RoutePathParamNames, type RoutePathParams, SEPARATOR, SUPPORTED_ENCODINGS, type SupportedEncoding, ValidationError, clampPriority, computeCacheKey, computeGradient, computeNewLimit, defaultHttpClientPreset, detectPlatform, empty, executeProbe, httpBuilder, httpClient, httpClientBuilder, httpClientStream, httpClientWithMeta, httpRoute, json, makeBudgetSemaphore, makeCompressionMiddleware, makeConnectionStateMap, makeDefaultHttpClient, makeHttpClient, makeHttpClientBuilder, makeHttpRouter, makeHttpServerResource, makeLifecycleClient, makeNodeHttpServer, makeNodeHttpServerResource, makePrewarmManager, makeRequestCompressionMiddleware, makeResponseCompressionMiddleware, makeRuntimeHealthRoute, makeRuntimeReadinessRoute, nodeHttpServerResource, parseCacheKey, prewarmConnections, prewarmHttpConnections, route, runtimeHealthRoute, runtimeReadinessRoute, text, validateFetchAvailable, validateOrigin, withAuth, withBatch, withCache, withCircuitBreaker, withConnectionPrewarming, withDedup, withLogging, withPriority, withRequestBatching, withResponseHeader, withResponseTransform, withTracing };
|