@dhaneshpurohit/mockstar 0.3.0 → 0.4.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 (41) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/cli.js +589 -169
  3. package/dist/core/config/schema.d.ts +197 -165
  4. package/dist/core/config/schema.d.ts.map +1 -1
  5. package/dist/core/http/body-cap.d.ts +37 -0
  6. package/dist/core/http/body-cap.d.ts.map +1 -0
  7. package/dist/core/http/rate-limit.d.ts +55 -0
  8. package/dist/core/http/rate-limit.d.ts.map +1 -0
  9. package/dist/core/matching/discriminators.d.ts +25 -0
  10. package/dist/core/matching/discriminators.d.ts.map +1 -1
  11. package/dist/core/matching/index.d.ts +3 -1
  12. package/dist/core/matching/index.d.ts.map +1 -1
  13. package/dist/features/openapi/converter.d.ts.map +1 -1
  14. package/dist/features/pass-through.d.ts +7 -0
  15. package/dist/features/pass-through.d.ts.map +1 -1
  16. package/dist/features/proxy/cli.d.ts +11 -0
  17. package/dist/features/proxy/cli.d.ts.map +1 -1
  18. package/dist/features/proxy/dns.d.ts +21 -3
  19. package/dist/features/proxy/dns.d.ts.map +1 -1
  20. package/dist/features/proxy/index.d.ts +1 -1
  21. package/dist/features/proxy/index.d.ts.map +1 -1
  22. package/dist/features/proxy/port-bind.d.ts +18 -1
  23. package/dist/features/proxy/port-bind.d.ts.map +1 -1
  24. package/dist/features/proxy/sni-gate.d.ts +4 -3
  25. package/dist/features/proxy/sni-gate.d.ts.map +1 -1
  26. package/dist/features/url-validator.d.ts +48 -0
  27. package/dist/features/url-validator.d.ts.map +1 -1
  28. package/dist/features/webhooks/event-registry.d.ts +7 -0
  29. package/dist/features/webhooks/event-registry.d.ts.map +1 -1
  30. package/dist/features/webhooks/journal.d.ts +23 -0
  31. package/dist/features/webhooks/journal.d.ts.map +1 -1
  32. package/dist/features/webhooks/queue.d.ts +18 -0
  33. package/dist/features/webhooks/queue.d.ts.map +1 -1
  34. package/dist/features/webhooks/types.d.ts +15 -2
  35. package/dist/features/webhooks/types.d.ts.map +1 -1
  36. package/dist/index.d.ts.map +1 -1
  37. package/dist/index.js +426 -123
  38. package/dist/server.d.ts +17 -0
  39. package/dist/server.d.ts.map +1 -1
  40. package/dist/version.d.ts +1 -1
  41. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../src/core/config/schema.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAaxB,eAAO,MAAM,WAAW,8EAA4E,CAAC;AAyCrG,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AASZ,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAShB,CAAC;AAEZ,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;EAMjB,CAAC;AAEZ,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAOrB,CAAC;AAEZ,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAIvB,CAAC;AAMH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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AAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,MAAM,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AAClD,MAAM,MAAM,KAAK,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,SAAS,CAAC,CAAC;AAC9C,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AACvD,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACrD,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACzD,MAAM,MAAM,kBAAkB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AACnE,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,CAAC;AACjE,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,CAAC;AACvD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,YAAY,CAAC,CAAC;AACzD,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAC;AAC7D,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,aAAa,CAAC,CAAC"}
@@ -0,0 +1,37 @@
1
+ import type { Context } from "hono";
2
+ /**
3
+ * S5 / #33: splice a byte-counting `TransformStream` in front of a request body so an
4
+ * oversized body is refused WHILE STREAMING — never by trusting `Content-Length` (a
5
+ * chunked request carries none) and never by buffering the whole body first and
6
+ * measuring after. The capped stream is swapped into `ctx.req.raw` before anything
7
+ * reads it, so every consumer downstream (Hono's `.text()`/`.json()` body cache, or a
8
+ * raw `.arrayBuffer()` read for pass-through forwarding) reads through the same cap.
9
+ *
10
+ * Once the running total exceeds `maxBodyBytes` the stream is errored, which aborts the
11
+ * read immediately — the remainder of an oversized body is never pulled off the wire
12
+ * into memory.
13
+ *
14
+ * Shared by both consumers of the request body so the cap can't drift out of sync
15
+ * between them:
16
+ * - `safeParseBody` (src/server.ts) — the JSON path, cap applied before `.text()`/`.json()`.
17
+ * - `renderPassThrough` (src/features/pass-through.ts) — the pass-through forwarding
18
+ * path, cap applied before `.arrayBuffer()`. Content-type is irrelevant here: a
19
+ * non-JSON body is never routed through the JSON path's cap at all (it early-returns
20
+ * before this function is even called), so pass-through forwarding is the only
21
+ * remaining place a chunked, oversized, non-JSON body would otherwise be buffered
22
+ * unbounded.
23
+ *
24
+ * No-op (returns a predicate that always reports `false`) when there is no body, or when
25
+ * the body has already been fully consumed by an earlier call (`bodyUsed`) — that's the
26
+ * signal a prior caller (the JSON path) already decided the outcome for this request, and
27
+ * calling this again must not disturb that. In that case a caller's own subsequent read
28
+ * behaves exactly as it did before this cap existed (typically an "already used" error),
29
+ * which is intentional: this function only ever ADDS a cap to a stream nothing has
30
+ * touched yet, it never changes how an already-consumed stream behaves.
31
+ */
32
+ export declare function capRequestBodyStream(ctx: Context, maxBodyBytes: number): {
33
+ tooLarge: () => boolean;
34
+ };
35
+ /** The one 413 shape used everywhere a body exceeds the tenant's cap. */
36
+ export declare function bodyTooLargeResponse(limit: number): Response;
37
+ //# sourceMappingURL=body-cap.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"body-cap.d.ts","sourceRoot":"","sources":["../../../src/core/http/body-cap.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AAEpC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,GAAG;IAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;CAAE,CAqBpG;AAED,yEAAyE;AACzE,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,QAAQ,CAK5D"}
@@ -0,0 +1,55 @@
1
+ /**
2
+ * Per-tenant token-bucket rate limiter.
3
+ *
4
+ * ALGORITHM CHOICE — token bucket, not a fixed window counter:
5
+ * A fixed window (count requests in the current N-ms window, reset the counter at the
6
+ * window boundary) 429s a burst that happens to land inside one window even when the
7
+ * caller's AVERAGE rate is far under the configured limit. That is exactly the shape of
8
+ * real traffic this limiter must not punish: a test suite firing 200 assertions against a
9
+ * mock in the same event-loop tick, then going quiet for the rest of the second. A fixed
10
+ * window would see "200 requests in this window" and throttle; a token bucket does not.
11
+ *
12
+ * A token bucket gives each tenant a bucket whose CAPACITY equals its configured
13
+ * requests-per-second, refilled continuously (tokens/ms == rps / 1000, not in discrete
14
+ * per-second steps). A fresh bucket starts full, so a burst of up to `rps` requests in a
15
+ * single tick — however tightly packed — always succeeds immediately. Only once the whole
16
+ * one-second allowance has actually been spent does the bucket run dry and start
17
+ * returning 429s; it then refills smoothly as time passes, so recovery is gradual rather
18
+ * than an abrupt reset back to full at a window edge.
19
+ *
20
+ * MEMORY (issue #34 class of bug): this class does no tenant bucketing of its own — it
21
+ * trusts the `tenant` key it is given. The caller (`src/server.ts`) is responsible for
22
+ * mapping an unresolved tenant (one with no config snapshot — which, in header-mode
23
+ * tenancy, is an attacker-controlled string never checked against configured tenants) to
24
+ * the single shared `UNKNOWN_TENANT_BUCKET` sentinel BEFORE calling `tryAcquire`. Do that
25
+ * and this map's size is bounded by the configured tenant count plus one, never by the
26
+ * number of distinct header values a caller can send.
27
+ */
28
+ export interface RateLimitResult {
29
+ allowed: boolean;
30
+ /** Seconds to report in `Retry-After`. 0 when `allowed` is true. */
31
+ retryAfterSeconds: number;
32
+ }
33
+ export interface TenantRateLimiterOptions {
34
+ /**
35
+ * Overridable time source (ms epoch), defaults to `Date.now`. Tests inject a fake clock
36
+ * here so the token-bucket window can be advanced deterministically — no wall-clock
37
+ * sleeps required for the behavioural test matrix.
38
+ */
39
+ now?: () => number;
40
+ }
41
+ export declare class TenantRateLimiter {
42
+ private readonly buckets;
43
+ private readonly now;
44
+ constructor(opts?: TenantRateLimiterOptions);
45
+ /** Number of distinct tenant buckets currently tracked. Exposed for memory-bound tests (mirrors #34). */
46
+ get bucketCount(): number;
47
+ /**
48
+ * Attempt to consume one token from `tenant`'s bucket, whose capacity/refill rate is
49
+ * `limitPerSecond`. O(1), no allocation on the hit path once the tenant's bucket exists.
50
+ */
51
+ tryAcquire(tenant: string, limitPerSecond: number): RateLimitResult;
52
+ }
53
+ /** The one 429 shape used everywhere a tenant exceeds its request rate cap. Mirrors `bodyTooLargeResponse`. */
54
+ export declare function rateLimitedResponse(limit: number, retryAfterSeconds: number): Response;
55
+ //# sourceMappingURL=rate-limit.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"rate-limit.d.ts","sourceRoot":"","sources":["../../../src/core/http/rate-limit.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,OAAO,CAAC;IACjB,oEAAoE;IACpE,iBAAiB,EAAE,MAAM,CAAC;CAC3B;AAED,MAAM,WAAW,wBAAwB;IACvC;;;;OAIG;IACH,GAAG,CAAC,EAAE,MAAM,MAAM,CAAC;CACpB;AAOD,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,QAAQ,CAAC,OAAO,CAA6B;IACrD,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAe;gBAEvB,IAAI,GAAE,wBAA6B;IAI/C,yGAAyG;IACzG,IAAI,WAAW,IAAI,MAAM,CAExB;IAED;;;OAGG;IACH,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,GAAG,eAAe;CA2BpE;AAED,+GAA+G;AAC/G,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,QAAQ,CAQtF"}
@@ -26,4 +26,29 @@ export interface PredicateFailure {
26
26
  */
27
27
  export declare function evaluateDiscriminators(pred: Predicate, req: RequestView): PredicateFailure | null;
28
28
  export declare function stringMatchOk(spec: StringMatch, got: string | undefined): boolean;
29
+ export type CompiledMatcher = {
30
+ kind: "exact";
31
+ value: string;
32
+ } | {
33
+ kind: "regex";
34
+ re: RegExp;
35
+ } | {
36
+ kind: "startsWith";
37
+ value: string;
38
+ } | {
39
+ kind: "contains";
40
+ value: string;
41
+ };
42
+ export interface CompiledPredicate {
43
+ query?: ReadonlyMap<string, CompiledMatcher>;
44
+ headers?: ReadonlyMap<string, CompiledMatcher>;
45
+ body?: Predicate["body"];
46
+ }
47
+ /** Compile a match predicate's regex-bearing dimensions once. Called at MatchIndex build time. */
48
+ export declare function compilePredicate(pred: Predicate): CompiledPredicate;
49
+ /**
50
+ * Same semantics as evaluateDiscriminators, but reads from a precompiled predicate — no
51
+ * `new RegExp` on this path. Used by MatchIndex.match/nearestMatch on the request hot path.
52
+ */
53
+ export declare function evaluateCompiledDiscriminators(pred: CompiledPredicate, req: RequestView): PredicateFailure | null;
29
54
  //# sourceMappingURL=discriminators.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"discriminators.d.ts","sourceRoot":"","sources":["../../../src/core/matching/discriminators.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAErD,MAAM,MAAM,WAAW,GACnB,MAAM,GACN;IAAE,MAAM,EAAE,MAAM,CAAA;CAAE,GAClB;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,GACjB;IAAE,UAAU,EAAE,MAAM,CAAA;CAAE,GACtB;IAAE,QAAQ,EAAE,MAAM,CAAA;CA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M,CAAC;IACd,QAAQ,EAAE,MAAM,CAAC;IACjB,GAAG,EAAE,MAAM,GAAG,SAAS,CAAC;CACzB;AAED;;;;GAIG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,SAAS,EAAE,GAAG,EAAE,WAAW,GAAG,gBAAgB,GAAG,IAAI,CAqCjG;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAQjF;AAcD,MAAM,MAAM,eAAe,GACvB;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GAChC;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,EAAE,EAAE,MAAM,CAAA;CAAE,GAC7B;IAAE,IAAI,EAAE,YAAY,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,GACrC;IAAE,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAAC;AAExC,MAAM,WAAW,iBAAiB;IAChC,KAAK,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC7C,OAAO,CAAC,EAAE,WAAW,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;IAC/C,IAAI,CAAC,EAAE,SAAS,CAAC,MAAM,CAAC,CAAC;CAC1B;AAcD,kGAAkG;AAClG,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,SAAS,GAAG,iBAAiB,CAMnE;AAuBD;;;GAGG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,iBAAiB,EACvB,GAAG,EAAE,WAAW,GACf,gBAAgB,GAAG,IAAI,CAqCzB"}
@@ -1,9 +1,11 @@
1
1
  import type { Entry } from "../config/schema.ts";
2
- import { type PredicateFailure, type RequestView } from "./discriminators.ts";
2
+ import { type CompiledPredicate, type PredicateFailure, type RequestView } from "./discriminators.ts";
3
3
  export interface IndexedEntry {
4
4
  entry: Entry;
5
5
  /** Position in the source list — used as a tiebreaker after priority. */
6
6
  order: number;
7
+ /** #41: discriminator regexes precompiled once here, not per request. */
8
+ compiled: CompiledPredicate;
7
9
  }
8
10
  export interface MatchResult {
9
11
  entry: Entry;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/matching/index.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AACjD,OAAO,EAAE,KAAK,gBAAgB,EAAE,KAAK,WAAW,EAA0B,MAAM,qBAAqB,CAAC;AAGtG,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,KAAK,CAAC;IACb,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC/B,OAAO,EAAE,gBAAgB,CAAC;CAC3B;AAED,MAAM,WAAW,UAAU;IACzB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,KAAK,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,GAAG,WAAW,GAAG,IAAI,CAAC;IAC1E,4FAA4F;IAC5F,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,WAAW,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,YAAY,EAAE,CAAC;CAC9F;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,SAAS,KAAK,EAAE,GAAG,UAAU,CA4DrE"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/core/matching/index.ts"],"names":[],"m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OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE;QAAE,KAAK,CAAC,EAAE,OAAO,CAAA;KAAE,CAAC,CAAC;IAC/C,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,qBAAa,kBAAmB,SAAQ,KAAK;aAGzB,MAAM,CAAC,EAAE,OAAO;gBADhC,OAAO,EAAE,MAAM,EACC,MAAM,CAAC,EAAE,OAAO,YAAA;CAKnC;AAED,MAAM,WAAW,cAAc;IAC7B,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,GAAG,EAAE,OAAO,EAAE,IAAI,GAAE,cAAmB,GAAG,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,CAiEtG;AAqGD;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,MAAM,EAAE,OAAO,EACf,GAAG,EAAE,UAAU,EACf,IAAI,GAAE,WAAW,CAAC,MAAM,CAAa,EACrC,KAAK,SAAI,GACR,OAAO,CAkDT;AAmCD;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAmB9D"}
@@ -4,6 +4,13 @@ import type { StructuredLogger } from "../core/observability/logger.ts";
4
4
  export interface PassThroughOptions {
5
5
  allowPrivateUpstreams: boolean;
6
6
  logger: StructuredLogger;
7
+ /**
8
+ * S5 / #33: the tenant's request body size cap. `safeParseBody` (src/server.ts) only
9
+ * caps JSON bodies — a non-JSON body (chunked, no Content-Length) reaches this function
10
+ * with its stream untouched, so we apply the SAME cap (via `capRequestBodyStream`)
11
+ * before reading it for upstream forwarding. See the read below.
12
+ */
13
+ maxBodyBytes: number;
7
14
  }
8
15
  export declare function renderPassThrough(entry: Entry, ctx: Context, opts: PassThroughOptions): Promise<Response>;
9
16
  //# sourceMappingURL=pass-through.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pass-through.d.ts","sourceRoot":"","sources":["../../src/features/pass-through.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AACtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,MAAM,EAAE,gBAAgB,CAAC;CAC1B;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,QAAQ,CAAC,CAsFnB"}
1
+ {"version":3,"file":"pass-through.d.ts","sourceRoot":"","sources":["../../src/features/pass-through.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,MAAM,CAAC;AACpC,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,0BAA0B,CAAC;AAEtD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,iCAAiC,CAAC;AAGxE,MAAM,WAAW,kBAAkB;IACjC,qBAAqB,EAAE,OAAO,CAAC;IAC/B,MAAM,EAAE,gBAAgB,CAAC;IACzB;;;;;OAKG;IACH,YAAY,EAAE,MAAM,CAAC;CACtB;AAED,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,KAAK,EACZ,GAAG,EAAE,OAAO,EACZ,IAAI,EAAE,kBAAkB,GACvB,OAAO,CAAC,QAAQ,CAAC,CAiInB"}
@@ -1,2 +1,13 @@
1
1
  export declare function dispatchProxyCommand(argv: readonly string[]): Promise<number>;
2
+ /**
3
+ * Resolve the #39 escape hatch: explicit opt-in to grant cap_net_bind_service (or the
4
+ * launchd equivalent) to a general-purpose interpreter rather than a packaged mockstar
5
+ * binary. Pure (no I/O) so it's unit-testable without exercising the rest of `install()`,
6
+ * which shells out to mkcert/setcap/launchctl.
7
+ *
8
+ * Two forms, either one enables it: the CLI flag is what a human types; the env var is
9
+ * what a CI step or Dockerfile can set without rewriting the invoked command. Default
10
+ * stays "not opted in" — the caller (portBindMutation) still refuses unless this is true.
11
+ */
12
+ export declare function resolveAllowInterpreterGrant(argv: readonly string[], env: Readonly<Record<string, string | undefined>>): boolean;
2
13
  //# sourceMappingURL=cli.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/cli.ts"],"names":[],"mappings":"AAoCA,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBnF"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/cli.ts"],"names":[],"mappings":"AAsCA,wBAAsB,oBAAoB,CAAC,IAAI,EAAE,SAAS,MAAM,EAAE,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBnF;AAwND;;;;;;;;;GASG;AACH,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,SAAS,MAAM,EAAE,EACvB,GAAG,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC,GAChD,OAAO,CAKT"}
@@ -1,6 +1,9 @@
1
1
  import { join } from "node:path";
2
2
  import type { Mutation } from "./install-journal.ts";
3
- import type { ProxyConfig } from "./types.ts";
3
+ import { runPrivileged } from "./port-bind.ts";
4
+ import type { HostConfig, ProxyConfig } from "./types.ts";
5
+ /** Signature of {@link runPrivileged} — injectable so tests never shell out to real `sudo`. */
6
+ type PrivilegedRunner = typeof runPrivileged;
4
7
  export declare const HOSTS_BLOCK_MARKER = "# BEGIN mockstar-proxy (do not edit)";
5
8
  export declare const HOSTS_BLOCK_END = "# END mockstar-proxy";
6
9
  export declare const HOSTS_PATH = "/etc/hosts";
@@ -10,9 +13,24 @@ export declare const HOSTS_PATH = "/etc/hosts";
10
13
  * - /etc/hosts block append
11
14
  */
12
15
  export declare function buildDnsMutations(config: ProxyConfig): Promise<Mutation[]>;
13
- /** Reverse a hosts-fallback block. Used by install-journal's reverse_hosts_entries handler. */
14
- export declare function revertHostsBlock(marker: string): Promise<void>;
16
+ /**
17
+ * Reverse a hosts-fallback block. Used by install-journal's reverse_hosts_entries handler.
18
+ *
19
+ * `hostsPath` and `runner` are injectable purely for tests — real callers never pass them,
20
+ * so they default to the real `/etc/hosts` and the real privileged `sudo` runner.
21
+ */
22
+ export declare function revertHostsBlock(marker: string, opts?: {
23
+ hostsPath?: string;
24
+ runner?: PrivilegedRunner;
25
+ }): Promise<void>;
15
26
  /** Stop and remove the dnsmasq service installed by buildDnsmasqMutations. */
16
27
  export declare function stopAndRemoveDnsmasq(): Promise<void>;
28
+ /**
29
+ * `overrides.runner` is injectable purely for tests — real callers never pass it, so
30
+ * privileged writes go through the real `sudo` runner.
31
+ */
32
+ export declare function buildDnsmasqMutations(hosts: readonly HostConfig[], overrides?: {
33
+ runner?: PrivilegedRunner;
34
+ }): Mutation[];
17
35
  export { join };
18
36
  //# sourceMappingURL=dns.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"dns.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/dns.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,IAAI,EAAE,MAAM,WAAW,CAAC;AACjC,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAErD,OAAO,KAAK,EAAc,WAAW,EAAkB,MAAM,YAAY,CAAC;AAK1E,eAAO,MAAM,kBAAkB,yCAAyC,CAAC;AACzE,eAAO,MAAM,eAAe,yBAAyB,CAAC;AACtD,eAAO,MAAM,UAAU,eAAe,CAAC;AAEvC;;;;GAIG;AACH,wBAAsB,iBAAiB,CAAC,MAAM,EAAE,WAAW,GAAG,OAAO,CAAC,QAAQ,EAAE,CAAC,CAKhF;AAED,+FAA+F;AAC/F,wBAAsB,gBAAgB,CAAC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AAC"}
@@ -7,7 +7,7 @@ export { startTlsServer, bunVersion, snapshotResolver, listenParams, leavesFromS
7
7
  export type { TlsLeaf, TlsServerHandle, TlsServerOptions, RequestMeta } from "./tls-adapter.ts";
8
8
  export { startProxyServer, type ProxyRuntime, type StartOptions } from "./server.ts";
9
9
  export { detectEnvHostility, remediationMessage } from "./env-detector.ts";
10
- export { portBindMutation, isPlatformSupported, runPrivileged } from "./port-bind.ts";
10
+ export { portBindMutation, isPlatformSupported, runPrivileged, ALLOW_INTERPRETER_CAPABILITY_GRANT_FLAG, ALLOW_INTERPRETER_CAPABILITY_GRANT_ENV, } from "./port-bind.ts";
11
11
  export { appendStep, readJournal, reverseSteps, clearJournal, journalFacts, atomicInstall, executeReverse, type Mutation, } from "./install-journal.ts";
12
12
  export { buildDnsMutations, revertHostsBlock, stopAndRemoveDnsmasq, HOSTS_BLOCK_MARKER, HOSTS_BLOCK_END, } from "./dns.ts";
13
13
  export type { ProxyConfig, HostConfig, LeafCert, ProxySnapshot, EnvHostility, InstallStep, ReverseCommand, } from "./types.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/index.ts"],"names":[],"mappings":"AACA,OAAO,EACL,OAAO,EACP,cAAc,EACd,SAAS,EACT,WAAW,EACX,qBAAqB,EACrB,uBAAuB,EACvB,gBAAgB,EAChB,YAAY,GACb,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,WAAW,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAC1F,OAAO,EAAE,cAAc,EAAE,aAAa,EAAE,gBAAgB,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAChG,OAAO,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAC;AACpD,OAAO,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,EA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O,EAAE,iBAAiB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AACvE,OAAO,EACL,cAAc,EACd,UAAU,EACV,gBAAgB,EAChB,YAAY,EACZ,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAChG,OAAO,EAAE,gBAAgB,EAAE,KAAK,YAAY,EAAE,KAAK,YAAY,EAAE,MAAM,aAAa,CAAC;AACrF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAC;AAC3E,OAAO,EACL,gBAAgB,EAChB,mBAAmB,EACnB,aAAa,EACb,uCAAuC,EACvC,sCAAsC,GACvC,MAAM,gBAAgB,CAAC;AACxB,OAAO,EACL,UAAU,EACV,WAAW,EACX,YAAY,EACZ,YAAY,EACZ,YAAY,EACZ,aAAa,EACb,cAAc,EACd,KAAK,QAAQ,GACd,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,iBAAiB,EACjB,gBAAgB,EAChB,oBAAoB,EACpB,kBAAkB,EAClB,eAAe,GAChB,MAAM,UAAU,CAAC;AAClB,YAAY,EACV,WAAW,EACX,UAAU,EACV,QAAQ,EACR,aAAa,EACb,YAAY,EACZ,WAAW,EACX,cAAc,GACf,MAAM,YAAY,CAAC;AACpB,OAAO,EAAE,UAAU,EAAE,MAAM,YAAY,CAAC"}
@@ -1,4 +1,14 @@
1
1
  import { type ReverseCommand } from "./types.ts";
2
+ /**
3
+ * The explicit, opt-in escape hatch for #39's interpreter refusal (see below). Named so
4
+ * both the CLI flag and the env var make the consequence obvious at the call site — a
5
+ * reviewer reading a CI step or Dockerfile should not need to chase this into source to
6
+ * know it grants the network-bind capability to the interpreter itself, not a packaged
7
+ * binary. Two forms because a flag is what a human types, an env var is what a CI step
8
+ * or Dockerfile `ENV`/`RUN` line can set without rewriting the invoked command.
9
+ */
10
+ export declare const ALLOW_INTERPRETER_CAPABILITY_GRANT_FLAG = "--allow-interpreter-capability-grant";
11
+ export declare const ALLOW_INTERPRETER_CAPABILITY_GRANT_ENV = "MOCKSTAR_ALLOW_INTERPRETER_CAPABILITY_GRANT";
2
12
  export interface PortBindMutation {
3
13
  /** Human-readable description for the install journal. */
4
14
  readonly action: string;
@@ -13,17 +23,24 @@ export interface PortBindMutation {
13
23
  *
14
24
  * @param binaryPath The absolute path to the mockstar binary (or the Bun binary when
15
25
  * running from source). On Linux, setcap is applied to this path.
26
+ * @param allowInterpreter Explicit opt-in to grant the capability even when `binaryPath`
27
+ * resolves to a general-purpose interpreter. Default `false` (refuse).
28
+ * See {@link ALLOW_INTERPRETER_CAPABILITY_GRANT_FLAG} /
29
+ * {@link ALLOW_INTERPRETER_CAPABILITY_GRANT_ENV}.
16
30
  */
17
31
  export declare function portBindMutation(params: {
18
32
  binaryPath: string;
19
33
  plistPath?: string;
20
34
  launchdLabel?: string;
35
+ allowInterpreter?: boolean;
21
36
  }): PortBindMutation;
22
37
  /**
23
38
  * Spawn a process via `sudo` (macOS/Linux). Used by install mutations that require
24
39
  * elevated privileges. The user sees the OS password prompt.
25
40
  */
26
- export declare function runPrivileged(argv: readonly string[]): Promise<{
41
+ export declare function runPrivileged(argv: readonly string[], opts?: {
42
+ stdin?: string;
43
+ }): Promise<{
27
44
  exitCode: number;
28
45
  stdout: string;
29
46
  stderr: string;
@@ -1 +1 @@
1
- {"version":3,"file":"port-bind.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/port-bind.ts"],"names":[],"mappings":"AAaA,OAAO,EAAc,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAI7D,MAAM,WAAW,gBAAgB;IAC/B,0DAA0D;IAC1D,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,iEAAiE;IACjE,QAAQ,CAAC,cAAc,EAAE,cAAc,CAAC;IACxC,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC;CACxB;AAED;;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AAA;CAAO,GAC5B,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAE/D;AAED,8DAA8D;AAC9D,wBAAgB,mBAAmB,IAAI,OAAO,CAG7C"}
@@ -2,13 +2,14 @@ import type { SnapshotHolder } from "./cert-cache.ts";
2
2
  import { type SniResolver } from "./tls-adapter.ts";
3
3
  /**
4
4
  * Build an SniResolver that ALWAYS reads the current snapshot (captured per-call,
5
- * not per-closure-build). This keeps it safe to pass to the TLS adapter and have
6
- * it reflect reloads.
5
+ * not per-closure-build). Not consumed by Bun.serve (see file header) — exported
6
+ * for callers that want to reproduce the SNI decision outside the live TLS path.
7
7
  */
8
8
  export declare function sniGate(holder: SnapshotHolder): SniResolver;
9
9
  /**
10
10
  * For diagnostics: given a hostname and the current snapshot, explain why
11
- * we'd accept or reject. Useful for `mockstar proxy status --explain-sni`.
11
+ * we'd accept or reject. Not currently wired to any CLI command — no
12
+ * `mockstar proxy status --explain-sni` flag exists yet.
12
13
  */
13
14
  export declare function explainSni(holder: SnapshotHolder, servername: string): {
14
15
  accepted: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"sni-gate.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/sni-gate.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AAEtE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,CAK3D;AAED;;;GAGG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA0BvC"}
1
+ {"version":3,"file":"sni-gate.d.ts","sourceRoot":"","sources":["../../../src/features/proxy/sni-gate.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AACtD,OAAO,EAAE,KAAK,WAAW,EAAoB,MAAM,kBAAkB,CAAC;AAEtE;;;;GAIG;AACH,wBAAgB,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,WAAW,CAK3D;AAED;;;;GAIG;AACH,wBAAgB,UAAU,CACxB,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,MAAM,GACjB;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CA0BvC"}
@@ -49,5 +49,53 @@ export declare function assertResolvedHostPublic(parsed: URL, opts?: {
49
49
  * `validateUpstreamUrl` for config-load-time checks where DNS is undesirable.
50
50
  */
51
51
  export declare function validateUpstreamUrlResolved(raw: string, opts?: ResolvedValidationOptions): Promise<URL>;
52
+ /** Default cap on redirect hops followed by `fetchWithRedirectGuard` (see #37). */
53
+ export declare const DEFAULT_MAX_REDIRECT_HOPS = 5;
54
+ export interface RedirectGuardInit {
55
+ method: string;
56
+ headers: Headers;
57
+ /** Must be a fully-buffered body (string/ArrayBuffer/etc), NOT a stream — it may be resent on a 307/308 hop. */
58
+ body: RequestInit["body"];
59
+ signal?: AbortSignal;
60
+ }
61
+ export interface RedirectGuardResult {
62
+ response: Response;
63
+ /** The URL the returned `response` actually came from (post-redirect-chain). */
64
+ finalUrl: URL;
65
+ redirectsFollowed: number;
66
+ }
67
+ /**
68
+ * Fetch `initialUrl` with `redirect: "manual"`, and when the response is a redirect,
69
+ * resolve its `Location` header against the CURRENT url and re-validate the target
70
+ * with the SAME `validation` options used for the initial request before following
71
+ * it — closing the gap where `validateUpstreamUrlResolved` only checked the
72
+ * pre-redirect URL and a permitted public host could 302 the caller to
73
+ * `169.254.169.254` or `127.0.0.1` with no revalidation (#37).
74
+ *
75
+ * `initialUrl` is NOT re-validated here — callers are expected to have already
76
+ * validated it (e.g. via `validateUpstreamUrlResolved`) before calling this function.
77
+ * Only redirect targets are validated inside the loop.
78
+ *
79
+ * Hop cap: after `maxRedirects` (default `DEFAULT_MAX_REDIRECT_HOPS` = 5) redirects
80
+ * have been followed, a further redirect throws `UrlValidationError` rather than
81
+ * being followed or silently truncating the chain. 5 covers realistic legitimate
82
+ * chains (scheme upgrade, canonical-host bounce, an auth gateway hop) while bounding
83
+ * worst-case latency and request amplification from a malicious or misbehaving
84
+ * receiver — a hostile server cannot turn one delivery attempt into an unbounded
85
+ * redirect loop.
86
+ *
87
+ * Redirect semantics implemented — NOT full RFC 9110 fidelity:
88
+ * - 303, and 301/302 on a request whose method is not GET/HEAD: the next hop
89
+ * switches to GET with no body (matches WHATWG fetch's browser-compatible
90
+ * redirect algorithm, which is what the previous `redirect: "follow"` default
91
+ * already did under the hood).
92
+ * - 307/308: method and body are resent unchanged on the next hop.
93
+ * - Headers are forwarded unchanged to every hop, INCLUDING across a scheme or
94
+ * host change. We do NOT strip credential-bearing headers (e.g. `Authorization`)
95
+ * on a cross-origin redirect — every hop's target still passes the same SSRF
96
+ * validation as the initial URL, so this fix's scope is "never reach a
97
+ * disallowed destination," not "never forward a header to an allowed one."
98
+ */
99
+ export declare function fetchWithRedirectGuard(initialUrl: URL, init: RedirectGuardInit, validation: ResolvedValidationOptions, maxRedirects?: number): Promise<RedirectGuardResult>;
52
100
  export declare function isPrivateHost(hostname: string): boolean;
53
101
  //# sourceMappingURL=url-validator.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"url-validator.d.ts","sourceRoot":"","sources":["../../src/features/url-validator.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,oBAAoB;IACnC,2CAA2C;IAC3C,cAAc,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IACnC,oFAAoF;IACpF,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,MAAM,SAAS,GAAG,CAAC,QAAQ,EAAE,MAAM,K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}
@@ -28,6 +28,13 @@ export declare class DeliveryEventRegistry {
28
28
  await(deliveryId: string, timeoutMs: number): Promise<DeliverySummary | null>;
29
29
  /** Called by the queue when a delivery reaches a terminal state. */
30
30
  publish(summary: DeliverySummary): void;
31
+ /**
32
+ * Stop the registry: cancel every live await-timeout timer and settle every pending
33
+ * awaiter with `null` — the same value a natural timeout produces — so a caller
34
+ * blocked on `await(deliveryId, ...)` at server-stop time returns instead of hanging
35
+ * forever (issue #40). Idempotent-safe to call with no pending awaiters.
36
+ */
37
+ stop(): void;
31
38
  /** Test-helper: number of awaiters currently waiting. */
32
39
  pendingCount(): number;
33
40
  /** Test-helper: number of cached terminal summaries. */
@@ -1 +1 @@
1
- {"version":3,"file":"event-registry.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/event-registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAUD,qBAAa,qBAAqB;;gBAKpB,IAAI,GAAE,4BAAiC;IAInD;;;OAGG;IACG,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAwBnF,oEAAoE;IACpE,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAwBvC,yDAAyD;IACzD,YAAY,IAAI,MAAM;IAItB,wDAAwD;IACxD,cAAc,IAAI,MAAM;CAGzB"}
1
+ {"version":3,"file":"event-registry.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/event-registry.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAElD;;;;;;;;;;;;;;GAcG;AACH,MAAM,WAAW,4BAA4B;IAC3C,qFAAqF;IACrF,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAWD,qBAAa,qBAAqB;;gBAKpB,IAAI,GAAE,4BAAiC;IAInD;;;OAGG;IACG,KAAK,CAAC,UAAU,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,eAAe,GAAG,IAAI,CAAC;IAwBnF,oEAAoE;IACpE,OAAO,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAwBvC;;;;;OAKG;IACH,IAAI,IAAI,IAAI;IASZ,yDAAyD;IACzD,YAAY,IAAI,MAAM;IAItB,wDAAwD;IACxD,cAAc,IAAI,MAAM;CAGzB"}
@@ -1,4 +1,27 @@
1
1
  import type { WebhookJournalEntry } from "./types.ts";
2
+ /**
3
+ * Redact a single URL down to `<origin>/[redacted]` for persistence (#38).
4
+ *
5
+ * Webhook URLs support `{{ env.NAME }}` templating in any position, and provider
6
+ * webhook URLs (Slack, Discord, Teams, ...) carry a bearer secret in their PATH —
7
+ * not just the query string or userinfo. `URL.origin` never includes userinfo,
8
+ * path, query, or fragment, so keeping only it and replacing everything else with
9
+ * a fixed marker strips all three secret-bearing components in one step, while
10
+ * still recording exactly which host/port/scheme was actually reached — the part
11
+ * an SDET asserting "which webhook fired, to which host" actually needs.
12
+ *
13
+ * Unparseable input (should not happen for a URL that already passed `fetch()`,
14
+ * but the journal must never throw) redacts to a fixed marker with no host at all.
15
+ */
16
+ export declare function redactUrlForJournal(rawUrl: string): string;
17
+ /**
18
+ * Redact every http(s) URL embedded in free-form text (e.g. an `error` message
19
+ * that happened to interpolate a rejected/failed URL) down to its origin (#38).
20
+ * Belt-and-suspenders alongside the structured `resolvedUrl` redaction above —
21
+ * closes the same secret-in-URL leak for any error text that embeds a URL,
22
+ * present or future, without requiring every throw site to remember to redact.
23
+ */
24
+ export declare function redactUrlsInText(text: string): string;
2
25
  export interface WebhookJournalOptions {
3
26
  /**
4
27
  * Optional path for an append-only JSONL log (INT-1). When set, every record() call
@@ -1 +1 @@
1
- {"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/journal.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAsB;;gBAKrB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,IAAI,GAAE,qBAA0B;IAKrF,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAiBxC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,mBAAmB,EAAE;IAMxD,yFAAyF;IACzF,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;CAkBvF"}
1
+ {"version":3,"file":"journal.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/journal.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAC;AAEtD;;;;;;;;;;;;;GAaG;AACH,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAM1D;AASD;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAErD;AAiBD,MAAM,WAAW,qBAAqB;IACpC;;;;;;;;OAQG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;;;;;;;GASG;AACH,qBAAa,sBAAsB;;gBAKrB,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,EAAE,IAAI,GAAE,qBAA0B;IAKrF,MAAM,CAAC,KAAK,EAAE,mBAAmB,GAAG,IAAI;IAoBxC,QAAQ,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,mBAAmB,EAAE;IAMxD,yFAAyF;IACzF,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,UAAU,EAAE,MAAM,GAAG,mBAAmB,GAAG,IAAI;CAkBvF"}
@@ -77,12 +77,30 @@ export interface BoundedRetryQueueOptions {
77
77
  export declare class BoundedRetryQueue {
78
78
  #private;
79
79
  constructor(opts?: Partial<BoundedRetryQueueOptions>);
80
+ /**
81
+ * Stop the queue: cancel every live backoff timer, settle any promise that was awaiting
82
+ * one (so no caller hangs), and terminate every delivery that never got a chance to run.
83
+ *
84
+ * Decision (issue #40): in-flight HTTP attempts (already inside `req.attempt()`, i.e.
85
+ * `#pq.pending`) are left to SETTLE, not cancelled — the fetch has its own bounded
86
+ * per-attempt timeout (T8, `AbortSignal.timeout(spec.timeoutMs)`) so it cannot hang the
87
+ * process indefinitely, and severing it mid-flight would leave the receiver's HTTP
88
+ * state ambiguous (did it apply the webhook or not?) for no benefit. Everything this
89
+ * queue itself controls — deliveries still waiting in the FIFO, and deliveries currently
90
+ * sleeping between retry attempts — is cancelled immediately: waiting entries terminate
91
+ * via the existing drop path, and a delivery asleep in backoff terminates as 'failed'
92
+ * the moment its sleep is force-resolved (see #runWithRetry), rather than firing another
93
+ * HTTP attempt after the caller asked the server to stop.
94
+ */
95
+ stop(): void;
80
96
  /** Total deliveries occupying a slot (waiting + in-flight). */
81
97
  size(): number;
82
98
  /** Count of waiting (not yet dispatched) deliveries. */
83
99
  waiting(): number;
84
100
  /** Count of in-flight (currently executing) deliveries. */
85
101
  inflight(): number;
102
+ /** Test-helper: number of live backoff timers currently tracked (should be 0 after stop()). */
103
+ liveTimerCount(): number;
86
104
  /**
87
105
  * Enqueue a delivery. If queue is at cap, evict OLDEST waiting entries first
88
106
  * (resolved with outcome:'dropped'). If still no slack — i.e. cap entries are
@@ -1 +1 @@
1
- {"version":3,"file":"queue.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/queue.ts"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAEn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I,CAAC;IAC/C,2GAA2G;IAC3G,WAAW,EAAE,MAAM,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;IACnD,2DAA2D;IAC3D,oBAAoB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;CAClD;AAED,MAAM,WAAW,aAAa;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,wBAAwB;IACvC,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,2DAA2D;IAC3D,GAAG,EAAE,MAAM,CAAC;IACZ,mFAAmF;IACnF,SAAS,CAAC,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,IAAI,CAAC;IAC9C;;;;;OAKG;IACH,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;CACvC;AAKD;;;;;;;;;;;;;;;;GAgBG;AACH,qBAAa,iBAAiB;;gBAiBhB,IAAI,GAAE,OAAO,CAAC,wBAAwB,CAAM;IAOxD;;;;;;;;;;;;;;OAcG;IACH,IAAI,IAAI,IAAI;IA+CZ,+DAA+D;IAC/D,IAAI,IAAI,MAAM;IAId,wDAAwD;IACxD,OAAO,IAAI,MAAM;IAIjB,2DAA2D;IAC3D,QAAQ,IAAI,MAAM;IAIlB,+FAA+F;IAC/F,cAAc,IAAI,MAAM;IAIxB;;;;OAIG;IACH,OAAO,CAAC,GAAG,EAAE,cAAc,GAAG,IAAI;CAmKnC"}
@@ -1,7 +1,20 @@
1
1
  import type { CompiledTemplate } from "../../core/templating/index.ts";
2
2
  import type { DigestEncoding } from "./scheme.ts";
3
- /** Terminal outcome of a delivery — every delivery resolves to exactly one of these. */
4
- export type DeliveryOutcome = "success" | "failed" | "dropped" | "circuit-open";
3
+ /**
4
+ * Outcome recorded against a single attempt row in the webhook journal, OR the
5
+ * terminal outcome of a whole delivery (every delivery resolves to exactly one
6
+ * of the terminal members below via DeliverySummary.outcome).
7
+ *
8
+ * 'retrying' (#44) is attempt-scoped only — it can appear on a per-attempt
9
+ * WebhookJournalEntry row, but NEVER on a DeliverySummary: a delivery's terminal
10
+ * state is always one of success/failed/dropped/circuit-open. Before #44, a
11
+ * failed-but-will-retry attempt was journaled as outcome:"success" (with an
12
+ * `error` field populated) because DeliveryOutcome had no member for "this
13
+ * attempt failed but the delivery isn't done yet" — an SDET asserting
14
+ * `entries.some(e => e.outcome === "success")` got a false green on a webhook
15
+ * that never actually succeeded. 'retrying' closes that gap.
16
+ */
17
+ export type DeliveryOutcome = "success" | "failed" | "dropped" | "circuit-open" | "retrying";
5
18
  /** Signing config for a single webhook. Off unless explicitly enabled (S1). */
6
19
  export interface WebhookSigningSpec {
7
20
  /** Signature mechanism. Only `hmac` in v0.x; the union exists so ed25519/oidc can follow (#30). */
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD,wFAAwF;AACxF,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,QAAQ,GACR,SAAS,GACT,cAAc,CAAC;AAEnB,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,OAAO,CAAC;IACjB,iDAAiD;IACjD,SAAS,EAAE,QAAQ,CAAC;IACpB,sHAAsH;IACtH,SAAS,EAAE,MAAM,CAAC;IAClB,wEAAwE;IACxE,aAAa,EAAE,MAAM,CAAC;IACtB,kFAAkF;IAClF,iBAAiB,EAAE,MAAM,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AC/B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC,IAAI,EAAE,SAAS,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,qGAAqG;IACrG,UAAU,EAAE,MAAM,CAAC;IACnB,4GAA4G;IAC5G,OAAO,EAAE,MAAM,CAAC;IAChB,+DAA+D;IAC/D,SAAS,EAAE,MAAM,CAAC;IAClB,0EAA0E;IAC1E,gBAAgB,EAAE,MAAM,CAAC;IACzB,oEAAoE;IACpE,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,eAAe,CAAC;IACzB,0GAA0G;IAC1G,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,oFAAoF;IACpF,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,mFAAmF;IACnF,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,iGAAiG;IACjG,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AAED,mFAAmF;AACnF,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,eAAe,CAAC;IACzB,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,eAAe,EAAE,MAAM,CAAC;CACzB"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/features/webhooks/types.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAElD;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,eAAe,GACvB,SAAS,GACT,QAAQ,GACR,SAAS,GACT,cAAc,GACd,UAAU,CAAC;AAEf,+EAA+E;AAC/E,MAAM,WAAW,kBAAkB;IACjC,mGAAmG;IACnG,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,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