@pgxsinkit/server 0.2.5 → 0.2.7

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.
@@ -0,0 +1,99 @@
1
+ import { type EventEnvelope, type EventStreamRegistry, type JwtClaims, type SyncTableRegistry } from "@pgxsinkit/contracts";
2
+ import type { FetchHandler } from "../router";
3
+ import type { EventQueue, EventQueueExecutor } from "./queue";
4
+ /**
5
+ * The **Event lane**'s ingestion endpoint (ADR-0053 decisions 3, 4 and 5): the mutation endpoint's sibling,
6
+ * minus what events don't need. `createSyncServer` mounts it automatically at `batchEventPaths` when — and
7
+ * only when — the registry registers at least one Event stream.
8
+ *
9
+ * Two shapes of verdict, and the split is the whole design:
10
+ *
11
+ * - **Framing is batch-level.** A body over the request cap OR an events array over the per-batch count cap
12
+ * (413), unparseable JSON or a body that fails the strict envelope parse (400), missing claims (401), or an
13
+ * unavailable queue (503) is a WHOLE-batch fault: a malformed item without a parseable `eventId` cannot
14
+ * receive a per-event verdict, and a queue that cannot take the batch must not half-take it.
15
+ * - **Every well-formed envelope gets a per-event verdict.** `acked` (enqueued), `refused` (the gating hook
16
+ * said no), `rejected` (schema-invalid payload for a KNOWN stream, oversized payload, or an unresolvable
17
+ * identity claim) and `deferred` (an Event stream this server does not know — ordinary rollout skew, and
18
+ * the ONLY non-terminal verdict). A batch-level 400 on one bad event would wedge the whole Outbox behind
19
+ * that row, which is exactly what the layering avoids.
20
+ *
21
+ * It keeps the write path's **zero-startup-query** posture (ADR-0030): nothing is probed, verified or created
22
+ * at construction — queue provisioning is deploy-time DDL — so the first statement this route sends is the
23
+ * enqueue transaction itself.
24
+ */
25
+ /** What the gating hook is told about one event. `identity` is already resolved from the verified claims. */
26
+ export interface EventGateInput {
27
+ /** The Event-stream name — the key the hook dispatches on. */
28
+ stream: string;
29
+ /** The client's envelope, with its payload already validated against the stream's registered schema. */
30
+ event: EventEnvelope;
31
+ /** The verified claims of the ingesting request (`{}` when the registry needs none). */
32
+ claims: JwtClaims;
33
+ /** The server-stamped identity this event would carry onto the queue. */
34
+ identity: Record<string, string>;
35
+ }
36
+ /** `true` allows; `false` or `{ allow: false, reason }` refuses (a TERMINAL `refused` verdict). */
37
+ export type EventGateDecision = boolean | {
38
+ allow: boolean;
39
+ reason?: string;
40
+ };
41
+ /**
42
+ * The consent/entitlement gate (ADR-0053 decision 1): the one FUNCTION of the Event lane's contract, and so a
43
+ * `createSyncServer` option rather than a registry field (the registry stays declarative data only).
44
+ *
45
+ * Called **once per event**, after the payload validated and the identity resolved, and before anything is
46
+ * enqueued. Per-event (rather than per stream × batch) is the simplest correct shape: a consent or entitlement
47
+ * decision may legitimately depend on the payload, and a per-batch hook could only express the subset that
48
+ * does not. The claims are constant across a batch, so a hook that consults a store should memoize on them —
49
+ * a batch can carry up to `MAX_EVENTS_PER_BATCH` events.
50
+ *
51
+ * A hook that THROWS fails the whole batch retryably (500, nothing enqueued): a gate that cannot decide must
52
+ * never be read as "allow".
53
+ */
54
+ export type EventGate = (input: EventGateInput) => EventGateDecision | Promise<EventGateDecision>;
55
+ /** What {@link EventsEnqueuedHook} is told about a request that enqueued something. */
56
+ export interface EventsEnqueuedInfo {
57
+ /** The Event streams this request put a sub-batch onto, deduplicated, in first-appearance order. */
58
+ streams: string[];
59
+ }
60
+ /**
61
+ * Fired after a request has ENQUEUED at least one sub-batch (ADR-0053 amendment, 2026-08-02) — the
62
+ * deployment-agnostic seam a serverless deployment uses to NUDGE its drain function.
63
+ *
64
+ * The library stays out of the transport: this hook hands over "something landed on these streams" and the
65
+ * deployment decides what that means. A long-lived runner deployment wires nothing (its poller is already
66
+ * about to read). A serverless one fires a fetch-and-forget at whatever endpoint calls the consumer's
67
+ * `drainOnce()`, so an interactive append is drained in milliseconds rather than at the next scheduled tick.
68
+ *
69
+ * **It is latency, never delivery.** The scheduled sweep is the guarantee; a nudge that is lost, refused or
70
+ * never sent costs nothing but time. So it is fire-and-forget by construction: it is called AFTER the
71
+ * enqueue transaction committed, its return value is ignored (it is `void` — do not await anything through
72
+ * it), and a throw is caught and warn-logged rather than affecting the response the client already earned.
73
+ */
74
+ export type EventsEnqueuedHook = (info: EventsEnqueuedInfo) => void;
75
+ /** The minimal transaction seam the endpoint needs — satisfied by a drizzle `PgAsyncDatabase`. */
76
+ export interface EventIngestDb {
77
+ transaction: <TResult>(callback: (tx: EventQueueExecutor) => Promise<TResult>) => Promise<TResult>;
78
+ }
79
+ export interface CreateEventIngestHandlerOptions {
80
+ resolveAuthClaims?: (request: Request) => Promise<JwtClaims | null> | JwtClaims | null;
81
+ eventGate?: EventGate;
82
+ /** See {@link EventsEnqueuedHook}. Fired only when something was actually enqueued. */
83
+ onEventsEnqueued?: EventsEnqueuedHook;
84
+ logTimings?: boolean;
85
+ }
86
+ /**
87
+ * What a 503 asks the client to wait, in seconds. The client honours `Retry-After` over its own jittered
88
+ * backoff when it asks for longer, so this is a floor on the retry of a batch the queue could not take.
89
+ */
90
+ export declare const EVENT_QUEUE_UNAVAILABLE_RETRY_AFTER_SECONDS = 5;
91
+ /**
92
+ * Whether ANY registered Event stream declares an identity field — i.e. whether ingest NEEDS verified claims.
93
+ * The mutation path's posture, mirrored: it demands claims when the registry actually requires them (an RLS
94
+ * policy or an `authClaim` managed field) rather than unconditionally. A registry whose streams declare no
95
+ * identity at all stamps nothing from claims, so it does not force an auth adapter into existence.
96
+ */
97
+ export declare function eventIngestRequiresClaims(streams: EventStreamRegistry): boolean;
98
+ export declare function createEventIngestHandler<TRegistry extends SyncTableRegistry>(db: EventIngestDb, registry: TRegistry, queue: EventQueue, options?: CreateEventIngestHandlerOptions): FetchHandler;
99
+ //# sourceMappingURL=route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"route.d.ts","sourceRoot":"","sources":["../../src/events/route.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,SAAS,EAEd,KAAK,iBAAiB,EACvB,MAAM,sB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AC;IACvF,SAAS,CAAC,EAAE,SAAS,CAAC;IACtB,uFAAuF;IACvF,gBAAgB,CAAC,EAAE,kBAAkB,CAAC;IACtC,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,2CAA2C,IAAI,CAAC;AAwE7D;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,OAAO,EAAE,mBAAmB,GAAG,OAAO,CAE/E;AAED,wBAAgB,wBAAwB,CAAC,SAAS,SAAS,iBAAiB,EAC1E,EAAE,EAAE,aAAa,EACjB,QAAQ,EAAE,SAAS,EACnB,KAAK,EAAE,UAAU,EACjB,OAAO,GAAE,+BAAoC,GAC5C,YAAY,CAiSd"}
package/dist/index.d.ts CHANGED
@@ -1,5 +1,7 @@
1
1
  import type { PgAsyncDatabase, PgQueryResultHKT } from "drizzle-orm/pg-core";
2
2
  import type { JwtClaims, RegistryRelations, RegistryTables, SyncRuntimeStatus, SyncServerAddress, SyncTableRegistry } from "@pgxsinkit/contracts";
3
+ import type { EventQueue } from "./events/queue";
4
+ import { type EventGate, type EventsEnqueuedHook } from "./events/route";
3
5
  import { type StartupVerificationMode } from "./mutations/route";
4
6
  /**
5
7
  * How the operations-log table's presence is resolved at startup (ADR-0030 decision 3):
@@ -59,6 +61,28 @@ export interface CreateSyncServerOptions<TRegistry extends SyncTableRegistry, TD
59
61
  * are the safe degradation posture (ADR-0030). See {@link DeploymentProfile}.
60
62
  */
61
63
  deployment?: DeploymentProfile;
64
+ /**
65
+ * The **Event lane**'s consent/entitlement gate (ADR-0053 decision 1): the lane's one function, and so an
66
+ * option here rather than a registry field (the registry stays declarative data only). Called once per
67
+ * event, after its payload validated and its identity resolved, and before anything is enqueued; a refusal
68
+ * is a per-event `refused` verdict. Absent → every well-formed event is allowed. See {@link EventGate}.
69
+ */
70
+ eventGate?: EventGate;
71
+ /**
72
+ * Fired after an ingest request ENQUEUED at least one sub-batch (ADR-0053 amendment, 2026-08-02): the
73
+ * deployment-agnostic seam a SERVERLESS deployment uses to nudge whatever endpoint runs the consumer's
74
+ * `drainOnce()`, so an interactive append drains in milliseconds instead of waiting for the next
75
+ * scheduled tick. Fire-and-forget — it is called after the commit, its throw is caught and warn-logged,
76
+ * and the scheduled sweep (not the nudge) is the delivery guarantee. Absent → nothing is nudged, which is
77
+ * right for a deployment hosting the long-lived runner. See {@link EventsEnqueuedHook}.
78
+ */
79
+ onEventsEnqueued?: EventsEnqueuedHook;
80
+ /**
81
+ * The Event lane's queue backend. Defaults to the shipped pgmq backend over this server's own `db`
82
+ * (`createPgmqEventQueue`), which is what makes an enqueue join the endpoint's transaction. Override it to
83
+ * run the lane on another backend, or to substitute a fake in tests.
84
+ */
85
+ eventQueue?: EventQueue;
62
86
  /**
63
87
  * Opt-in per-request timing log (default false). When on, each mutation and shape-proxy request emits
64
88
  * one compact `[pgxsinkit-timing]` line with an ISO-8601(ms, UTC) timestamp and phase durations, for
@@ -66,6 +90,28 @@ export interface CreateSyncServerOptions<TRegistry extends SyncTableRegistry, TD
66
90
  * diagnostic surface that adds no standing query or latency when unset.
67
91
  */
68
92
  logTimings?: boolean;
93
+ /**
94
+ * The roles the INSTALLED apply function was generated with (`pgxsinkit-generate
95
+ * --grant-execute-to <role>`, ADR-0054). Default `[]` — owner-only, the default the CLI generates.
96
+ *
97
+ * It is not a grant this server performs; it is how the server reproduces the artifact's ADR-0018
98
+ * fingerprint, which hashes the ACL along with the rest of the body. Generate with a grant and leave
99
+ * this unset and every write fails `PXS01` (stale artifact) — so the two lists must stay identical.
100
+ */
101
+ applyFunctionGrantExecuteTo?: readonly string[];
102
+ /**
103
+ * The schema the INSTALLED apply function lives in (`pgxsinkit-generate --function-schema <schema>`).
104
+ * Default: unset — the artifact is generated unqualified and resolved through the connection's
105
+ * `search_path`.
106
+ *
107
+ * It does two things at once, which is why one option drives both: the schema is part of the
108
+ * fingerprinted body (the function names itself in its own self-check), AND it is how this server
109
+ * QUALIFIES the call. Generate with `--function-schema` and leave this unset and the call goes out
110
+ * unqualified — which either finds nothing (`42883`) or, worse, finds a same-named function elsewhere
111
+ * on the `search_path` that then fails `PXS01` against a fingerprint it does not carry. The two must
112
+ * name the same schema.
113
+ */
114
+ applyFunctionSchema?: string;
69
115
  }
70
116
  export interface ServerDiagnostics<TRegistry extends SyncTableRegistry> {
71
117
  tables: Array<keyof TRegistry & string>;
@@ -88,10 +134,22 @@ export type { StartupVerificationMode } from "./mutations/route";
88
134
  export type { CorsConfig, CorsScope, FetchHandler, RouterErrorHandler } from "./router";
89
135
  export { FetchRouter } from "./router";
90
136
  export { buildPlpgsqlBatchFunctionDdl, expectedApplyFingerprint } from "./mutations/plpgsql-apply";
137
+ export type { ApplyFunctionRenderOptions } from "./mutations/plpgsql-apply";
91
138
  export { renderPgxsinkitUtilitiesMigration } from "./migrations/utilities";
92
139
  export { ensureOperationsLogSchema, operationsLogRegclassTarget } from "./operations-log/ddl";
93
140
  export { operationsLogTable } from "./operations-log/schema";
94
141
  export { proxyElectricShapeRequest } from "./electric-proxy";
95
142
  export type { ElectricProxyOptions } from "./electric-proxy";
96
143
  export { readSqlState } from "./sql-state";
144
+ export { createEventIngestHandler, eventIngestRequiresClaims, EVENT_QUEUE_UNAVAILABLE_RETRY_AFTER_SECONDS, } from "./events/route";
145
+ export type { CreateEventIngestHandlerOptions, EventGate, EventGateDecision, EventGateInput, EventIngestDb, EventsEnqueuedHook, EventsEnqueuedInfo, } from "./events/route";
146
+ export { assertEventQueueReceipts, eventStreamQueueName, MalformedEventQueueMessageError } from "./events/queue";
147
+ export type { DeadLetteredEventMessage, DeliveredEventMessage, EventQueue, EventQueueExecutor, EventQueueReadOptions, EventQueueReceipt, } from "./events/queue";
148
+ export { createPgmqEventQueue, PGMQ_DEAD_LETTER_KEY } from "./events/pgmq-queue";
149
+ export type { CreatePgmqEventQueueOptions } from "./events/pgmq-queue";
150
+ export { computeEventPollWaitMs, defineEventConsumer, DEFAULT_EVENT_CONSUMER_BATCH_SIZE, DEFAULT_EVENT_DRAIN_BUDGET_MS, DEFAULT_EVENT_MAX_ATTEMPTS, DEFAULT_EVENT_POLL_CEILING_MS, DEFAULT_EVENT_POLL_FACTOR, DEFAULT_EVENT_POLL_FLOOR_MS, DEFAULT_EVENT_VISIBILITY_TIMEOUT_SECONDS, } from "./events/consumer";
151
+ export type { DefineEventConsumerOptions, EventConsumer, EventConsumerBatch, EventConsumerCallback, EventConsumerPollOptions, EventConsumerSleep, EventDeadLetterReport, EventDrainOptions, EventDrainSummary, } from "./events/consumer";
152
+ export { EVENT_LANE_FINGERPRINT_PREFIX, eventLaneDdlFingerprint, eventLaneStreamNames, renderEventLaneMigration, } from "./events/ddl";
153
+ export { resolveEventIdentity } from "./events/identity";
154
+ export type { IdentityResolution } from "./events/identity";
97
155
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AAE7E,OAAO,KAAK,EACV,SAAS,EACT,iBAAiB,EACjB,cAAc,EACd,iBAAiB,EACjB,iBAAiB,EACjB,iBAAiB,EAClB,MAAM,sBAAsB,CAAC;AAG9B,OAAO,EAIL,KAAK,uBAAuB,EAC7B,MAAM,mBAAmB,CAAC;AAoB3B;;;;;;;;;;GAUG;AACH,MAAM,MAAM,wBAAwB,GAAG,OAAO,GAAG,SAAS,GAAG,UAAU,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,WAAW,iBAAiB;IAChC,8GAA8G;IAC9G,mBAAmB,CAAC,EAAE,uBAAuB,CAAC;IAC9C,4EAA4E;IAC5E,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C;AAED,MAAM,WAAW,uBAAuB,CACtC,SAAS,SAAS,iBAAiB,EACnC,GAAG,SAAS,eAAe,CAAC,gBAAgB,EAAE,iBAAiB,CAAC,SAAS,CAAC,CAAC,GAAG,eA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