@rotorsoft/act-http 1.11.1 → 1.11.3

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 (77) hide show
  1. package/README.md +2 -5
  2. package/dist/.tsbuildinfo +1 -1
  3. package/dist/@types/api/actor.d.ts +4 -6
  4. package/dist/@types/api/actor.d.ts.map +1 -1
  5. package/dist/@types/api/dispatch.d.ts +46 -1
  6. package/dist/@types/api/dispatch.d.ts.map +1 -1
  7. package/dist/@types/api/index.d.ts +3 -3
  8. package/dist/@types/api/sse-wiring.d.ts +4 -4
  9. package/dist/@types/api/sse-wiring.d.ts.map +1 -1
  10. package/dist/@types/hono/index.d.ts +80 -13
  11. package/dist/@types/hono/index.d.ts.map +1 -1
  12. package/dist/@types/openapi/index.d.ts.map +1 -1
  13. package/dist/@types/receiver/extract.d.ts +4 -4
  14. package/dist/@types/receiver/hono/index.d.ts +1 -1
  15. package/dist/@types/receiver/verify.d.ts +2 -2
  16. package/dist/@types/sse/apply-patch.d.ts.map +1 -1
  17. package/dist/@types/sse/broadcast.d.ts +6 -24
  18. package/dist/@types/sse/broadcast.d.ts.map +1 -1
  19. package/dist/@types/sse/state-cache.d.ts +1 -1
  20. package/dist/@types/sse/types.d.ts +4 -5
  21. package/dist/@types/sse/types.d.ts.map +1 -1
  22. package/dist/@types/trpc/index.d.ts +107 -35
  23. package/dist/@types/trpc/index.d.ts.map +1 -1
  24. package/dist/@types/webhook/index.d.ts +1 -1
  25. package/dist/@types/webhook/index.d.ts.map +1 -1
  26. package/dist/@types/webhook/types.d.ts +1 -1
  27. package/dist/api/index.cjs +1 -3
  28. package/dist/api/index.cjs.map +1 -1
  29. package/dist/api/index.js +2 -2
  30. package/dist/{chunk-MKD3SM3N.js → chunk-BOJG4555.js} +1 -1
  31. package/dist/chunk-BOJG4555.js.map +1 -0
  32. package/dist/{chunk-EERALS5E.js → chunk-CVCTDLJA.js} +1 -1
  33. package/dist/chunk-CVCTDLJA.js.map +1 -0
  34. package/dist/{chunk-G5FNOSDX.js → chunk-ET2PACPO.js} +1 -1
  35. package/dist/chunk-ET2PACPO.js.map +1 -0
  36. package/dist/{chunk-TTVMQYNN.js → chunk-OEMQP5ZM.js} +2 -2
  37. package/dist/chunk-OEMQP5ZM.js.map +1 -0
  38. package/dist/{chunk-5KZI37IT.js → chunk-QSH2Y3YR.js} +3 -3
  39. package/dist/chunk-QSH2Y3YR.js.map +1 -0
  40. package/dist/{chunk-FSN52BXM.js → chunk-YEDAY2PC.js} +3 -5
  41. package/dist/chunk-YEDAY2PC.js.map +1 -0
  42. package/dist/hono/index.cjs +1 -3
  43. package/dist/hono/index.cjs.map +1 -1
  44. package/dist/hono/index.js +4 -4
  45. package/dist/hono/index.js.map +1 -1
  46. package/dist/openapi/index.cjs +103 -35
  47. package/dist/openapi/index.cjs.map +1 -1
  48. package/dist/openapi/index.js +104 -36
  49. package/dist/openapi/index.js.map +1 -1
  50. package/dist/receiver/express/index.cjs.map +1 -1
  51. package/dist/receiver/express/index.js +1 -1
  52. package/dist/receiver/fastify/index.cjs.map +1 -1
  53. package/dist/receiver/fastify/index.js +1 -1
  54. package/dist/receiver/hono/index.cjs.map +1 -1
  55. package/dist/receiver/hono/index.js +2 -2
  56. package/dist/receiver/index.cjs.map +1 -1
  57. package/dist/receiver/index.js +3 -3
  58. package/dist/receiver/index.js.map +1 -1
  59. package/dist/receiver/trpc/index.cjs.map +1 -1
  60. package/dist/receiver/trpc/index.js +1 -1
  61. package/dist/sse/index.cjs +7 -25
  62. package/dist/sse/index.cjs.map +1 -1
  63. package/dist/sse/index.js +8 -26
  64. package/dist/sse/index.js.map +1 -1
  65. package/dist/trpc/index.cjs +2 -8
  66. package/dist/trpc/index.cjs.map +1 -1
  67. package/dist/trpc/index.js +5 -9
  68. package/dist/trpc/index.js.map +1 -1
  69. package/dist/webhook/index.cjs.map +1 -1
  70. package/dist/webhook/index.js.map +1 -1
  71. package/package.json +2 -2
  72. package/dist/chunk-5KZI37IT.js.map +0 -1
  73. package/dist/chunk-EERALS5E.js.map +0 -1
  74. package/dist/chunk-FSN52BXM.js.map +0 -1
  75. package/dist/chunk-G5FNOSDX.js.map +0 -1
  76. package/dist/chunk-MKD3SM3N.js.map +0 -1
  77. package/dist/chunk-TTVMQYNN.js.map +0 -1
@@ -1,7 +1,60 @@
1
+ /**
2
+ * @packageDocumentation
3
+ * @module act-http/trpc
4
+ *
5
+ * tRPC subpath of the auto-generated API. Walks the
6
+ * registry of a built `Act` once at function call and emits a typed
7
+ * router that exposes every registered action as a flat `mutation`,
8
+ * matching the shape hand-written tRPC routers in the Act ecosystem
9
+ * already use.
10
+ *
11
+ * Usage:
12
+ *
13
+ * ```ts
14
+ * import { trpc } from "@rotorsoft/act-http/trpc";
15
+ *
16
+ * type Ctx = { user: { id: string; name: string }; tenant: string };
17
+ *
18
+ * const router = trpc<Ctx, typeof app>(app, {
19
+ * actor: (ctx) => ({ id: ctx.user.id, name: ctx.user.name }),
20
+ * stream: (action, input, ctx) => `tenant-${ctx.tenant}`,
21
+ * });
22
+ *
23
+ * // Client sees:
24
+ * // appRouter.PressKey.mutate({ key: "5" })
25
+ * // appRouter.OpenTicket.mutate({ title: "..." })
26
+ * ```
27
+ *
28
+ * The route shape is flat: one procedure per registered action at
29
+ * the top level. Action names are the unique identifiers across
30
+ * the registry (the framework already enforces no duplicates), so
31
+ * an extra namespace tier would be overhead in the common case.
32
+ * See `libs/act-http/README.md` for the full surface walkthrough.
33
+ *
34
+ * **Actor lives on the context.** The generator wires an internal
35
+ * tRPC middleware that runs the host's
36
+ * {@link TrpcOptions.actor | actor extractor} once per call and
37
+ * injects the resolved {@link Actor} onto the downstream context as
38
+ * `ctx.actor`. Every generated mutation reads from there — auth
39
+ * resolves at the procedure boundary, not inside each action body,
40
+ * and any composed middleware (logging, tracing) sees the same
41
+ * `ctx.actor`. The middleware factory is also exported as
42
+ * {@link authenticated} for hosts that need to compose it into
43
+ * their own procedure chain.
44
+ *
45
+ * Composes the shared utilities at `@rotorsoft/act-http/api`:
46
+ * {@link ActorExtractor} for the auth seam, {@link toApiError} for
47
+ * the uniform error→status/code mapping, {@link withIdempotency}
48
+ * for `Idempotency-Key` dedup. Three transports (this one, Hono,
49
+ * OpenAPI) ride the same utilities so a client talking to two
50
+ * transports never sees two error shapes for the same framework
51
+ * error.
52
+ */
53
+ import { type Actor } from "@rotorsoft/act";
1
54
  import type { IdempotencyStore } from "@rotorsoft/act-ops/idempotency";
2
- import { type AnyTRPCMiddlewareFunction, type AnyTRPCMutationProcedure, type AnyTRPCRootTypes, type TRPCBuiltRouter } from "@trpc/server";
3
- import { type ActSurface } from "../api/dispatch.js";
4
- import { type ActorExtractor, type SseOptions } from "../api/index.js";
55
+ import { type TRPCBuiltRouter, type TRPCDefaultErrorShape, type TRPCMiddlewareFunction, type TRPCMutationProcedure, type TRPCSubscriptionProcedure } from "@trpc/server";
56
+ import { type ActionResult, type ActSurface, type AppActions, type AppState, type AppStateNames, type ResolverArgs } from "../api/dispatch.js";
57
+ import { type ActorExtractor, type SseOptions, type SseSubscriptionFrame } from "../api/index.js";
5
58
  /**
6
59
  * Per-call options for {@link trpc}. The host supplies the three
7
60
  * seams the package can't make decisions on:
@@ -18,9 +71,9 @@ import { type ActorExtractor, type SseOptions } from "../api/index.js";
18
71
  * `target.expectedVersion` so `app.do` refuses to commit if the
19
72
  * stream has moved. Hosts typically read it from an `If-Match`
20
73
  * header on the underlying HTTP request, or pull it from the
21
- * client's last-known snapshot. Returning `undefined` skips the
22
- * check for that call — handy when only some actions are
23
- * concurrency-sensitive.
74
+ * client's last-known snapshot. Returning `undefined` leaves the
75
+ * call to the version the action loads; a number pins it, and a
76
+ * pinned conflict is never retried.
24
77
  * - `idempotency` (optional) — when set, the procedure honors
25
78
  * `Idempotency-Key` via the shared
26
79
  * {@link withIdempotency} helper. The host supplies the
@@ -38,10 +91,10 @@ import { type ActorExtractor, type SseOptions } from "../api/index.js";
38
91
  * procedures see this exact context type (plus `actor`) at
39
92
  * runtime.
40
93
  */
41
- export type TrpcOptions<Ctx> = {
42
- readonly actor: ActorExtractor;
43
- readonly stream: (action_name: string, input: unknown, ctx: Ctx) => string | Promise<string>;
44
- readonly expectedVersion?: (action_name: string, input: unknown, ctx: Ctx) => number | undefined | Promise<number | undefined>;
94
+ export type TrpcOptions<Ctx, TApp = ActSurface> = {
95
+ readonly actor: ActorExtractor<Ctx>;
96
+ readonly stream: (...args: ResolverArgs<TApp, NoInfer<Ctx>>) => string | Promise<string>;
97
+ readonly expectedVersion?: (...args: ResolverArgs<TApp, NoInfer<Ctx>>) => number | undefined | Promise<number | undefined>;
45
98
  readonly idempotency?: {
46
99
  readonly store: IdempotencyStore;
47
100
  readonly keyFrom: (ctx: Ctx) => string | undefined;
@@ -94,25 +147,43 @@ export type TrpcOptions<Ctx> = {
94
147
  * (typically wrap them as `TRPCError({ code: "UNAUTHORIZED" })`
95
148
  * in the extractor body).
96
149
  */
97
- export declare function authenticated(extractor: ActorExtractor): AnyTRPCMiddlewareFunction;
150
+ export declare function authenticated<Ctx extends object = object>(extractor: ActorExtractor<Ctx>): TRPCMiddlewareFunction<Ctx, object, object, {
151
+ actor: Actor;
152
+ }, unknown>;
153
+ /** The root types of the router {@link trpc} builds over `Ctx`. */
154
+ type GeneratedRoot<Ctx extends object> = {
155
+ ctx: Ctx;
156
+ meta: object;
157
+ errorShape: TRPCDefaultErrorShape;
158
+ transformer: false;
159
+ };
98
160
  /**
99
- * Generated router type — one mutation procedure per action name in
100
- * `TApp`'s registry. Mapped over the concrete action keys so
101
- * `createTRPCReact<typeof router>()` sees specific procedure names
102
- * (`PressKey`, `Clear`, …) instead of a wide `Record<string, ...>`
103
- * index signature — which is what trips tRPC React's
104
- * "useContext / Provider / useUtils collides" check on widely-typed
105
- * routers.
106
- *
107
- * @internal
161
+ * One mutation per action of `TApp`: the action's payload in, the
162
+ * snapshots `app.do` returns out. Mapped over the concrete action names,
163
+ * so `createTRPCReact<typeof router>()` sees `PressKey`, `Clear`, …
164
+ * instead of an index signature, which trips tRPC React's collision check.
108
165
  */
109
- type GeneratedRouter<TApp> = TRPCBuiltRouter<AnyTRPCRootTypes, TApp extends {
110
- registry: {
111
- actions: infer TActions;
166
+ type ActionProcedures<TApp> = {
167
+ [K in keyof AppActions<TApp> & string]: TRPCMutationProcedure<{
168
+ input: AppActions<TApp>[K];
169
+ output: ActionResult<TApp, K>;
170
+ meta: object;
171
+ }>;
172
+ };
173
+ /** One subscription per state of `TApp`, yielding that state's frames. */
174
+ type SubscribeRouter<TApp> = {
175
+ subscribe: {
176
+ [N in AppStateNames<TApp>]: TRPCSubscriptionProcedure<{
177
+ input: {
178
+ stream: string;
179
+ };
180
+ output: AsyncIterable<SseSubscriptionFrame<AppState<TApp, N>>, void, any>;
181
+ meta: object;
182
+ }>;
112
183
  };
113
- } ? {
114
- [K in keyof TActions]: AnyTRPCMutationProcedure;
115
- } : Record<string, AnyTRPCMutationProcedure>>;
184
+ };
185
+ /** The router {@link trpc} builds: the actions, and the subscriptions with `sse`. */
186
+ export type GeneratedRouter<Ctx extends object, TApp, TRecord> = TRPCBuiltRouter<GeneratedRoot<Ctx>, ActionProcedures<TApp> & TRecord>;
116
187
  /**
117
188
  * Build a typed tRPC router from a built `Act` instance.
118
189
  *
@@ -133,12 +204,11 @@ type GeneratedRouter<TApp> = TRPCBuiltRouter<AnyTRPCRootTypes, TApp extends {
133
204
  * 5. Maps any thrown framework error onto a `TRPCError` via
134
205
  * {@link toApiError}.
135
206
  *
136
- * The returned router's procedure inputs come straight from each
137
- * action's Zod schema; outputs are the framework's
138
- * `Snapshot<TState, TEvents>[]` shape. Strong typing flows
139
- * end-to-end via tRPC's normal inference path — the client sees
140
- * `appRouter.Calculator.PressKey.mutate({ key: "5" })` as a typed
141
- * call without any codegen.
207
+ * The router is typed from `TApp`: each mutation takes its action's
208
+ * payload and returns the `Snapshot[]` `app.do` returns, and with `sse`
209
+ * each `subscribe.<state>` yields that state's frames, so a client sees
210
+ * `client.PressKey.mutate({ key: "5" })` as a typed call without
211
+ * codegen. Pass `TApp` whenever you pass `Ctx`.
142
212
  *
143
213
  * @template Ctx The tRPC context shape the host's runtime feeds in.
144
214
  * Flows through `actor`, `stream`, and `idempotency.keyFrom` so
@@ -148,9 +218,11 @@ type GeneratedRouter<TApp> = TRPCBuiltRouter<AnyTRPCRootTypes, TApp extends {
148
218
  *
149
219
  * @param app A built `Act` orchestrator.
150
220
  * @param options Auth, stream, and (optional) idempotency seams.
151
- * @returns A tRPC router covering every registered action, grouped
152
- * by owning state.
221
+ * @returns A tRPC router with one mutation per registered action.
153
222
  */
154
- export declare function trpc<Ctx extends object = object, TApp extends ActSurface = ActSurface>(app: TApp, options: TrpcOptions<Ctx>): GeneratedRouter<TApp>;
223
+ export declare function trpc<Ctx extends object = object, TApp extends ActSurface = ActSurface>(app: TApp, options: TrpcOptions<Ctx, TApp> & {
224
+ readonly sse: SseOptions;
225
+ }): GeneratedRouter<Ctx, TApp, SubscribeRouter<TApp>>;
226
+ export declare function trpc<Ctx extends object = object, TApp extends ActSurface = ActSurface>(app: TApp, options: TrpcOptions<Ctx, TApp>): GeneratedRouter<Ctx, TApp, unknown>;
155
227
  export {};
156
228
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/trpc/index.ts"],"names":[],"mappings":"AA0DA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,gCAAgC,CAAC;AACvE,OAAO,EACL,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAC7B,KAAK,gBAAgB,EAErB,KAAK,eAAe,EAErB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,KAAK,UAAU,EAAiB,MAAM,oBAAoB,CAAC;AACpE,OAAO,EACL,KAAK,cAAc,EAInB,KAAK,UAAU,EAEhB,MAAM,iBAAiB,CAAC;AAEzB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,MAAM,M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;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE,CAAC;YAC1B,MAAM,EAAE,aAAa,CAAC,oBAAoB,CAAC,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,CAAC,CAAC;YAC1E,IAAI,EAAE,MAAM,CAAC;SACd,CAAC;KACH,CAAC;CACH,CAAC;AAEF,qFAAqF;AACrF,MAAM,MAAM,eAAe,CACzB,GAAG,SAAS,MAAM,EAClB,IAAI,EACJ,OAAO,IACL,eAAe,CAAC,aAAa,CAAC,GAAG,CAAC,EAAE,gBAAgB,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,CAAC;AAE1E;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,IAAI,CAClB,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,IAAI,SAAS,UAAU,GAAG,UAAU,EAEpC,GAAG,EAAE,IAAI,EACT,OAAO,EAAE,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,GAAG;IAAE,QAAQ,CAAC,GAAG,EAAE,UAAU,CAAA;CAAE,GAC7D,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,eAAe,CAAC,IAAI,CAAC,CAAC,CAAC;AACrD,wBAAgB,IAAI,CAClB,GAAG,SAAS,MAAM,GAAG,MAAM,EAC3B,IAAI,SAAS,UAAU,GAAG,UAAU,EAEpC,GAAG,EAAE,IAAI,EACT,OAAO,EAAE,WAAW,CAAC,GAAG,EAAE,IAAI,CAAC,GAC9B,eAAe,CAAC,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,CAAC"}
@@ -6,7 +6,7 @@
6
6
  *
7
7
  * Wraps `fetch` with timeouts, automatic `Idempotency-Key` derivation, and
8
8
  * status-classified errors. Designed to be composed with the reaction
9
- * options shipped in ACT-601 (`maxRetries`, `blockOnError`, `backoff`):
9
+ * options (`maxRetries`, `blockOnError`, `backoff`):
10
10
  *
11
11
  * ```ts
12
12
  * import { webhook } from "@rotorsoft/act-http/webhook";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webhook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAa,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG1E,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAInE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,GACb,MAAM,YAAY,CAAC;AAsBpB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,OAAO,SAAS,OAAO,GAAG,OAAO,EACvD,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,GAC7B,eAAe,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,CAiGzC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/webhook/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,OAAO,KAAK,EAAa,eAAe,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAG1E,OAAO,EAEL,KAAK,aAAa,EAEnB,MAAM,YAAY,CAAC;AAEpB,YAAY,EAAE,eAAe,EAAE,YAAY,EAAE,MAAM,eAAe,CAAC;AAEnE,OAAO,EAAE,oBAAoB,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAC5D,YAAY,EACV,qBAAqB,EACrB,WAAW,EACX,aAAa,EACb,eAAe,GAChB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,qBAAqB,EACrB,wBAAwB,EACxB,kBAAkB,EAClB,YAAY,GACb,MAAM,YAAY,CAAC;AAsBpB;;;;;;;;;;;;;GAaG;AACH,wBAAgB,OAAO,CAAC,OAAO,SAAS,OAAO,GAAG,OAAO,EACvD,MAAM,EAAE,aAAa,CAAC,OAAO,CAAC,GAC7B,eAAe,CAAC,OAAO,EAAE,MAAM,OAAO,CAAC,CA8FzC"}
@@ -47,7 +47,7 @@ export type WebhookConfig<TEvents extends Schemas = Schemas> = {
47
47
  * `fetch` resolves on response headers, so the timer stays armed through
48
48
  * the error-path body read as well. A receiver that answers with headers
49
49
  * and then stalls its body times out like any other overrun instead of
50
- * hanging the handler forever (#1701).
50
+ * hanging the handler forever.
51
51
  */
52
52
  readonly timeoutMs?: number;
53
53
  /**
@@ -19890,9 +19890,7 @@ async function* runSseSubscription(channel, stream_id, accounting, signal, optio
19890
19890
  pending.push(msg);
19891
19891
  return;
19892
19892
  }
19893
- const versioned = pending.findIndex(
19894
- (m) => !is_version_neutral(m)
19895
- );
19893
+ const versioned = pending.findIndex((m) => !is_version_neutral(m));
19896
19894
  if (versioned >= 0) {
19897
19895
  pending.splice(versioned, 1);
19898
19896
  pending.push(msg);