@moltzap/client 2026.503.3 → 2026.504.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 (227) hide show
  1. package/dist/auth.d.ts +10 -1
  2. package/dist/auth.d.ts.map +1 -1
  3. package/dist/auth.js +8 -5
  4. package/dist/auth.js.map +1 -1
  5. package/dist/channel-core.d.ts +1 -4
  6. package/dist/channel-core.d.ts.map +1 -1
  7. package/dist/channel-core.js +0 -9
  8. package/dist/channel-core.js.map +1 -1
  9. package/dist/channel-core.test.js +90 -71
  10. package/dist/channel-core.test.js.map +1 -1
  11. package/dist/cli/commands/agents.d.ts.map +1 -1
  12. package/dist/cli/commands/agents.js +5 -3
  13. package/dist/cli/commands/agents.js.map +1 -1
  14. package/dist/cli/commands/apps.d.ts +9 -27
  15. package/dist/cli/commands/apps.d.ts.map +1 -1
  16. package/dist/cli/commands/apps.js +36 -57
  17. package/dist/cli/commands/apps.js.map +1 -1
  18. package/dist/cli/commands/apps.test.js +63 -75
  19. package/dist/cli/commands/apps.test.js.map +1 -1
  20. package/dist/cli/commands/contacts.d.ts +1 -5
  21. package/dist/cli/commands/contacts.d.ts.map +1 -1
  22. package/dist/cli/commands/contacts.js +14 -27
  23. package/dist/cli/commands/contacts.js.map +1 -1
  24. package/dist/cli/commands/conversations-v2.test.js +34 -29
  25. package/dist/cli/commands/conversations-v2.test.js.map +1 -1
  26. package/dist/cli/commands/conversations.d.ts +7 -3
  27. package/dist/cli/commands/conversations.d.ts.map +1 -1
  28. package/dist/cli/commands/conversations.js +63 -48
  29. package/dist/cli/commands/conversations.js.map +1 -1
  30. package/dist/cli/commands/messages.d.ts +7 -3
  31. package/dist/cli/commands/messages.d.ts.map +1 -1
  32. package/dist/cli/commands/messages.js +13 -15
  33. package/dist/cli/commands/messages.js.map +1 -1
  34. package/dist/cli/commands/messages.test.js +30 -31
  35. package/dist/cli/commands/messages.test.js.map +1 -1
  36. package/dist/cli/commands/ping.d.ts +9 -0
  37. package/dist/cli/commands/ping.d.ts.map +1 -1
  38. package/dist/cli/commands/ping.js +17 -4
  39. package/dist/cli/commands/ping.js.map +1 -1
  40. package/dist/cli/commands/presence.d.ts.map +1 -1
  41. package/dist/cli/commands/presence.js +6 -4
  42. package/dist/cli/commands/presence.js.map +1 -1
  43. package/dist/cli/commands/register.d.ts.map +1 -1
  44. package/dist/cli/commands/register.js +2 -1
  45. package/dist/cli/commands/register.js.map +1 -1
  46. package/dist/cli/commands/send.d.ts.map +1 -1
  47. package/dist/cli/commands/send.js +22 -11
  48. package/dist/cli/commands/send.js.map +1 -1
  49. package/dist/cli/commands/send.test.js +12 -9
  50. package/dist/cli/commands/send.test.js.map +1 -1
  51. package/dist/cli/commands/status.js +2 -2
  52. package/dist/cli/commands/status.js.map +1 -1
  53. package/dist/cli/commands/test-transport.d.ts +10 -0
  54. package/dist/cli/commands/test-transport.d.ts.map +1 -0
  55. package/dist/cli/commands/test-transport.js +29 -0
  56. package/dist/cli/commands/test-transport.js.map +1 -0
  57. package/dist/cli/commands/whoami.d.ts.map +1 -1
  58. package/dist/cli/commands/whoami.js +5 -1
  59. package/dist/cli/commands/whoami.js.map +1 -1
  60. package/dist/cli/config.d.ts +42 -6
  61. package/dist/cli/config.d.ts.map +1 -1
  62. package/dist/cli/config.js +91 -27
  63. package/dist/cli/config.js.map +1 -1
  64. package/dist/cli/http-client.d.ts +11 -1
  65. package/dist/cli/http-client.d.ts.map +1 -1
  66. package/dist/cli/http-client.js +13 -4
  67. package/dist/cli/http-client.js.map +1 -1
  68. package/dist/cli/index.d.ts.map +1 -1
  69. package/dist/cli/index.js +2 -3
  70. package/dist/cli/index.js.map +1 -1
  71. package/dist/cli/profile.d.ts +3 -4
  72. package/dist/cli/profile.d.ts.map +1 -1
  73. package/dist/cli/profile.js +42 -29
  74. package/dist/cli/profile.js.map +1 -1
  75. package/dist/cli/runtime.d.ts.map +1 -1
  76. package/dist/cli/runtime.js +9 -4
  77. package/dist/cli/runtime.js.map +1 -1
  78. package/dist/cli/socket-client.d.ts +29 -4
  79. package/dist/cli/socket-client.d.ts.map +1 -1
  80. package/dist/cli/socket-client.js +52 -21
  81. package/dist/cli/socket-client.js.map +1 -1
  82. package/dist/cli/transport.d.ts +6 -9
  83. package/dist/cli/transport.d.ts.map +1 -1
  84. package/dist/cli/transport.js +47 -37
  85. package/dist/cli/transport.js.map +1 -1
  86. package/dist/cli/transport.test.js +19 -16
  87. package/dist/cli/transport.test.js.map +1 -1
  88. package/dist/index.d.ts +2 -3
  89. package/dist/index.d.ts.map +1 -1
  90. package/dist/index.js +1 -1
  91. package/dist/index.js.map +1 -1
  92. package/dist/internal/__tests__/app-callback-partition-key.test.d.ts +2 -0
  93. package/dist/internal/__tests__/app-callback-partition-key.test.d.ts.map +1 -0
  94. package/dist/internal/__tests__/app-callback-partition-key.test.js +33 -0
  95. package/dist/internal/__tests__/app-callback-partition-key.test.js.map +1 -0
  96. package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts +2 -0
  97. package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts.map +1 -0
  98. package/dist/internal/__tests__/{s2c-partition-worker.test.js → app-callback-partition-worker.test.js} +6 -8
  99. package/dist/internal/__tests__/app-callback-partition-worker.test.js.map +1 -0
  100. package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.d.ts +2 -0
  101. package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.d.ts.map +1 -0
  102. package/dist/internal/__tests__/{s2c-partitioned-dispatcher-real-ws.test.js → app-callback-partitioned-dispatcher-real-ws.test.js} +69 -93
  103. package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.js.map +1 -0
  104. package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts +2 -0
  105. package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts.map +1 -0
  106. package/dist/internal/__tests__/{s2c-partitioned-dispatcher.test.js → app-callback-partitioned-dispatcher.test.js} +36 -69
  107. package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.js.map +1 -0
  108. package/dist/internal/__tests__/app-callback-test-requests.d.ts +58 -0
  109. package/dist/internal/__tests__/app-callback-test-requests.d.ts.map +1 -0
  110. package/dist/internal/__tests__/app-callback-test-requests.js +124 -0
  111. package/dist/internal/__tests__/app-callback-test-requests.js.map +1 -0
  112. package/dist/internal/{s2c-dispatcher-errors.d.ts → app-callback-dispatcher-errors.d.ts} +5 -21
  113. package/dist/internal/app-callback-dispatcher-errors.d.ts.map +1 -0
  114. package/dist/internal/{s2c-dispatcher-errors.js → app-callback-dispatcher-errors.js} +3 -13
  115. package/dist/internal/app-callback-dispatcher-errors.js.map +1 -0
  116. package/dist/internal/app-callback-partition-key.d.ts +68 -0
  117. package/dist/internal/app-callback-partition-key.d.ts.map +1 -0
  118. package/dist/internal/app-callback-partition-key.js +90 -0
  119. package/dist/internal/app-callback-partition-key.js.map +1 -0
  120. package/dist/internal/{s2c-partition-worker.d.ts → app-callback-partition-worker.d.ts} +5 -5
  121. package/dist/internal/app-callback-partition-worker.d.ts.map +1 -0
  122. package/dist/internal/{s2c-partition-worker.js → app-callback-partition-worker.js} +5 -5
  123. package/dist/internal/app-callback-partition-worker.js.map +1 -0
  124. package/dist/internal/{s2c-partitioned-dispatcher.d.ts → app-callback-partitioned-dispatcher.d.ts} +9 -10
  125. package/dist/internal/app-callback-partitioned-dispatcher.d.ts.map +1 -0
  126. package/dist/internal/{s2c-partitioned-dispatcher.js → app-callback-partitioned-dispatcher.js} +13 -21
  127. package/dist/internal/app-callback-partitioned-dispatcher.js.map +1 -0
  128. package/dist/runtime/close-info.d.ts +15 -16
  129. package/dist/runtime/close-info.d.ts.map +1 -1
  130. package/dist/runtime/close-info.js +12 -8
  131. package/dist/runtime/close-info.js.map +1 -1
  132. package/dist/runtime/errors.d.ts +2 -28
  133. package/dist/runtime/errors.d.ts.map +1 -1
  134. package/dist/runtime/errors.js +0 -9
  135. package/dist/runtime/errors.js.map +1 -1
  136. package/dist/runtime/errors.test.js +4 -3
  137. package/dist/runtime/errors.test.js.map +1 -1
  138. package/dist/runtime/frame.d.ts +17 -18
  139. package/dist/runtime/frame.d.ts.map +1 -1
  140. package/dist/runtime/frame.js +86 -31
  141. package/dist/runtime/frame.js.map +1 -1
  142. package/dist/runtime/frame.test.js +15 -11
  143. package/dist/runtime/frame.test.js.map +1 -1
  144. package/dist/runtime/index.d.ts +1 -1
  145. package/dist/runtime/index.d.ts.map +1 -1
  146. package/dist/runtime/index.js +1 -1
  147. package/dist/runtime/index.js.map +1 -1
  148. package/dist/runtime/local-service-commands.d.ts +7 -0
  149. package/dist/runtime/local-service-commands.d.ts.map +1 -0
  150. package/dist/runtime/local-service-commands.js +6 -0
  151. package/dist/runtime/local-service-commands.js.map +1 -0
  152. package/dist/runtime/runtime.test.js +3 -3
  153. package/dist/runtime/runtime.test.js.map +1 -1
  154. package/dist/runtime/subscribers.d.ts +37 -33
  155. package/dist/runtime/subscribers.d.ts.map +1 -1
  156. package/dist/runtime/subscribers.js +22 -21
  157. package/dist/runtime/subscribers.js.map +1 -1
  158. package/dist/runtime/subscribers.test.js +50 -31
  159. package/dist/runtime/subscribers.test.js.map +1 -1
  160. package/dist/service.d.ts +24 -39
  161. package/dist/service.d.ts.map +1 -1
  162. package/dist/service.js +190 -171
  163. package/dist/service.js.map +1 -1
  164. package/dist/service.test.js +117 -175
  165. package/dist/service.test.js.map +1 -1
  166. package/dist/test/index.d.ts +9 -1
  167. package/dist/test/index.d.ts.map +1 -1
  168. package/dist/test/index.js +14 -3
  169. package/dist/test/index.js.map +1 -1
  170. package/dist/test-utils/channel-service-fixture.d.ts +1 -2
  171. package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
  172. package/dist/test-utils/channel-service-fixture.js +28 -20
  173. package/dist/test-utils/channel-service-fixture.js.map +1 -1
  174. package/dist/test-utils/conformance-adapter.d.ts +2 -2
  175. package/dist/test-utils/conformance-adapter.d.ts.map +1 -1
  176. package/dist/test-utils/conformance-adapter.js +78 -54
  177. package/dist/test-utils/conformance-adapter.js.map +1 -1
  178. package/dist/test-utils/fake-service.d.ts +14 -39
  179. package/dist/test-utils/fake-service.d.ts.map +1 -1
  180. package/dist/test-utils/fake-service.js +33 -39
  181. package/dist/test-utils/fake-service.js.map +1 -1
  182. package/dist/test-utils/ids.d.ts +9 -0
  183. package/dist/test-utils/ids.d.ts.map +1 -0
  184. package/dist/test-utils/ids.js +52 -0
  185. package/dist/test-utils/ids.js.map +1 -0
  186. package/dist/test-utils/index.d.ts +10 -2
  187. package/dist/test-utils/index.d.ts.map +1 -1
  188. package/dist/test-utils/index.js +25 -9
  189. package/dist/test-utils/index.js.map +1 -1
  190. package/dist/ws-client.d.ts +59 -64
  191. package/dist/ws-client.d.ts.map +1 -1
  192. package/dist/ws-client.js +228 -175
  193. package/dist/ws-client.js.map +1 -1
  194. package/dist/ws-client.test.js +190 -176
  195. package/dist/ws-client.test.js.map +1 -1
  196. package/package.json +3 -3
  197. package/dist/cli/commands/permissions.d.ts +0 -66
  198. package/dist/cli/commands/permissions.d.ts.map +0 -1
  199. package/dist/cli/commands/permissions.js +0 -101
  200. package/dist/cli/commands/permissions.js.map +0 -1
  201. package/dist/cli/commands/permissions.test.d.ts +0 -2
  202. package/dist/cli/commands/permissions.test.d.ts.map +0 -1
  203. package/dist/cli/commands/permissions.test.js +0 -126
  204. package/dist/cli/commands/permissions.test.js.map +0 -1
  205. package/dist/internal/__tests__/s2c-partition-key.test.d.ts +0 -2
  206. package/dist/internal/__tests__/s2c-partition-key.test.d.ts.map +0 -1
  207. package/dist/internal/__tests__/s2c-partition-key.test.js +0 -230
  208. package/dist/internal/__tests__/s2c-partition-key.test.js.map +0 -1
  209. package/dist/internal/__tests__/s2c-partition-worker.test.d.ts +0 -2
  210. package/dist/internal/__tests__/s2c-partition-worker.test.d.ts.map +0 -1
  211. package/dist/internal/__tests__/s2c-partition-worker.test.js.map +0 -1
  212. package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.d.ts +0 -2
  213. package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.d.ts.map +0 -1
  214. package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.js.map +0 -1
  215. package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.d.ts +0 -2
  216. package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.d.ts.map +0 -1
  217. package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.js.map +0 -1
  218. package/dist/internal/s2c-dispatcher-errors.d.ts.map +0 -1
  219. package/dist/internal/s2c-dispatcher-errors.js.map +0 -1
  220. package/dist/internal/s2c-partition-key.d.ts +0 -71
  221. package/dist/internal/s2c-partition-key.d.ts.map +0 -1
  222. package/dist/internal/s2c-partition-key.js +0 -140
  223. package/dist/internal/s2c-partition-key.js.map +0 -1
  224. package/dist/internal/s2c-partition-worker.d.ts.map +0 -1
  225. package/dist/internal/s2c-partition-worker.js.map +0 -1
  226. package/dist/internal/s2c-partitioned-dispatcher.d.ts.map +0 -1
  227. package/dist/internal/s2c-partitioned-dispatcher.js.map +0 -1
@@ -1,9 +1,10 @@
1
1
  import { Effect } from "effect";
2
- import { type EventFrame, type RpcDefinition, type TSchema, type Static } from "@moltzap/protocol";
3
- import { DuplicateServerRpcHandlerError, NotConnectedError, RpcServerError, RpcTimeoutError } from "./runtime/errors.js";
4
- import { type EventSubscription, type SubscriberHandler, type SubscriptionFilter } from "./runtime/subscribers.js";
2
+ import { Connect, NotConnectedError, RpcServerError, RpcTimeoutError, type AnyAppCallbackRpcDefinition, type AnyNotificationDefinition, type JsonRpcStringId, type ParamsOf, type ResultOf, type RpcDefinition, type TSchema, type Static } from "@moltzap/protocol";
3
+ import { DuplicateServerRpcHandlerError } from "./runtime/errors.js";
4
+ import { type DecodedNotification } from "./runtime/frame.js";
5
+ import { type NotificationSubscription, type SubscriberHandler, type SubscriptionFilter } from "./runtime/subscribers.js";
5
6
  import { type CloseInfo } from "./runtime/close-info.js";
6
- import { type PartitionedDispatcherConfig } from "./internal/s2c-partitioned-dispatcher.js";
7
+ import { type PartitionedDispatcherConfig } from "./internal/app-callback-partitioned-dispatcher.js";
7
8
  export type { CloseInfo };
8
9
  /**
9
10
  * Default per-RPC timeout. Exported so tests driving `TestClock` can match
@@ -13,8 +14,9 @@ export declare const RPC_TIMEOUT_MS = 30000;
13
14
  export interface RpcCallOptions {
14
15
  readonly timeoutMs?: number;
15
16
  }
17
+ type ConnectResult = Static<typeof Connect.resultSchema>;
16
18
  /**
17
- * s2c dispatcher knobs exposed on `MoltZapWsClientOptions`. All optional;
19
+ * appCallback dispatcher knobs exposed on `MoltZapWsClientOptions`. All optional;
18
20
  * defaults from `DEFAULT_PARTITIONED_DISPATCHER_CONFIG`.
19
21
  *
20
22
  * Spec #356 OQ-3 (`idlePartitionTtlMs`) ships at the architect's
@@ -23,7 +25,7 @@ export interface RpcCallOptions {
23
25
  * at peak), so the cap doubles as a per-tenant DoS guard, not a
24
26
  * cardinality lever.
25
27
  */
26
- export type S2cDispatcherConfig = Partial<PartitionedDispatcherConfig>;
28
+ export type AppCallbackDispatcherConfig = Partial<PartitionedDispatcherConfig>;
27
29
  /**
28
30
  * Handler signature for `handleServerRpc`. The handler returns an
29
31
  * `Effect<unknown, RpcServerError>` — success values are encoded as the
@@ -32,15 +34,21 @@ export type S2cDispatcherConfig = Partial<PartitionedDispatcherConfig>;
32
34
  * generic InternalError reply.
33
35
  *
34
36
  * The `unknown`/`unknown` parameter and result types are transitional —
35
- * once Phase 1.1 (B.2) registers admission verbs in `s2cRpcMethods`, this
36
- * narrows generically against `S2cRpcMap[M]`.
37
+ * once Phase 1.1 (B.2) registers admission verbs in `appCallbackRpcMethods`, this
38
+ * narrows generically against `AppCallbackRpcMap[M]`.
37
39
  */
38
40
  export interface ServerRpcContext {
39
- readonly requestId: string;
40
- readonly method: string;
41
+ readonly requestId: JsonRpcStringId;
42
+ readonly definition: AnyAppCallbackRpcDefinition;
41
43
  readonly traceparent?: string;
42
44
  }
43
- export type ServerRpcHandler = (params: unknown, ctx: ServerRpcContext) => Effect.Effect<unknown, RpcServerError>;
45
+ export type ServerRpcHandler<D extends AnyAppCallbackRpcDefinition = AnyAppCallbackRpcDefinition> = (params: Static<D["paramsSchema"]>, ctx: ServerRpcContext & {
46
+ readonly definition: D;
47
+ }) => Effect.Effect<Static<D["resultSchema"]>, RpcServerError>;
48
+ type AnyDecodedNotification = DecodedNotification<AnyNotificationDefinition>;
49
+ type DecodedNotificationFor<D extends AnyNotificationDefinition> = Extract<AnyDecodedNotification, {
50
+ readonly definition: D;
51
+ }>;
44
52
  export interface WsClientLogger {
45
53
  info: (...args: unknown[]) => void;
46
54
  warn: (...args: unknown[]) => void;
@@ -56,38 +64,28 @@ export interface MoltZapWsClientOptions {
56
64
  * arg (OQ-6 rewrite): zero-arg `() => void` callers must migrate to
57
65
  * accept (and may ignore) the arg.
58
66
  *
59
- * Migration note (spec #222 OQ-4 rewrite): the previous `onEvent`
67
+ * Migration note (spec #222 OQ-4 rewrite): the previous `onNotification`
60
68
  * callback was deleted in this rewrite. Callers that want to observe
61
- * every inbound event register `client.subscribe({}, handler)` after
62
- * construction; events flow through the per-subscription registry,
69
+ * every inbound notification register `client.subscribe({}, handler)` after
70
+ * construction; notifications flow through the per-subscription registry,
63
71
  * not through a top-level option.
64
72
  */
65
73
  onDisconnect?: (close: CloseInfo) => void;
66
- onReconnect?: (helloOk: unknown) => void;
74
+ onReconnect?: (helloOk: ConnectResult) => void;
67
75
  logger?: WsClientLogger;
68
76
  /**
69
- * Spec #356 — partitioned s2c dispatcher knobs. Optional; omitted
77
+ * Spec #356 — partitioned appCallback dispatcher knobs. Optional; omitted
70
78
  * fields fall back to `DEFAULT_PARTITIONED_DISPATCHER_CONFIG`.
71
79
  */
72
- s2cDispatcher?: S2cDispatcherConfig;
80
+ appCallbackDispatcher?: AppCallbackDispatcherConfig;
73
81
  }
74
82
  /**
75
- * Return shape of `MoltZapWsClient.sendRpcTracked`. Spec #222 OQ-1
76
- * resolution (B): surface the outbound request `id` (un-vacuates B4 at
77
- * `packages/protocol/src/testing/conformance/client/rpc-semantics.ts:205-216`)
78
- * and the response envelope `type` (un-vacuates V5 at
79
- * `rpc-semantics.ts:103-110`), without leaking `jsonrpc` onto the
80
- * caller surface.
81
- *
82
- * `type` is the literal `"response"` — the only response-frame kind
83
- * `packages/protocol/src/schema/frames.ts:18` defines — but it is
84
- * surfaced as an observable value (not a synthesized adapter constant)
85
- * so the V5 predicate can flip under a mutation that forges a
86
- * non-response shape.
83
+ * Return shape of `MoltZapWsClient.sendRpcTracked`. Surfaces the outbound
84
+ * request `id` alongside the typed result without leaking the JSON-RPC wire
85
+ * object onto the caller surface.
87
86
  */
88
87
  export interface TrackedRpcResponse<R> {
89
- readonly id: string;
90
- readonly type: "response";
88
+ readonly id: JsonRpcStringId;
91
89
  readonly result: R;
92
90
  }
93
91
  /**
@@ -107,17 +105,15 @@ export declare class MoltZapWsClient {
107
105
  private readonly pendingRef;
108
106
  private readonly stateRef;
109
107
  private readonly malformedRef;
110
- private readonly eventsBufferRef;
108
+ private readonly notificationsBufferRef;
111
109
  /**
112
- * Waiters keyed by event name. Each bucket is a FIFO stack: delivery
113
- * pops the most recently registered waiter (the tail). Keying by event
114
- * name keeps dispatch O(1) per inbound frame regardless of total
115
- * outstanding waiters.
110
+ * Waiters keyed by notification descriptor identity. Each bucket is a FIFO
111
+ * stack: delivery pops the most recently registered waiter (the tail).
116
112
  */
117
- private readonly eventWaitersRef;
113
+ private readonly notificationWaitersRef;
118
114
  private readonly runtime;
119
115
  /**
120
- * Per-subscription event registry. Spec #222 §5.3 (C4 + the
116
+ * Per-subscription notification registry. Spec #222 §5.3 (C4 + the
121
117
  * `RealClientEventSubscriber.subscribe` filter stub). Constructed
122
118
  * synchronously alongside the other Refs; `MoltZapWsClient.subscribe`
123
119
  * delegates to it directly.
@@ -127,9 +123,9 @@ export declare class MoltZapWsClient {
127
123
  * Per-method handler registry for server-initiated RPCs. Survives
128
124
  * reconnects so apps register once and re-attach automatically when the
129
125
  * socket comes back. Each entry is invoked by the per-connection
130
- * dispatcher fiber when an s2c request frame arrives.
126
+ * dispatcher fiber when an appCallback request frame arrives.
131
127
  */
132
- private readonly s2cHandlersRef;
128
+ private readonly appCallbackHandlersRef;
133
129
  private requestCounter;
134
130
  private closed;
135
131
  private reconnectFiber;
@@ -145,42 +141,40 @@ export declare class MoltZapWsClient {
145
141
  *
146
142
  * The dispatcher fiber forked at `connect()` time picks up handlers via
147
143
  * `Ref.get` per-frame, so a registration made BEFORE `connect()` is
148
- * visible to the very first inbound s2c request, and a registration
144
+ * visible to the very first inbound appCallback request, and a registration
149
145
  * made AFTER `connect()` takes effect on the next inbound frame.
150
146
  */
151
- handleServerRpc(method: string, handler: ServerRpcHandler): Effect.Effect<void, DuplicateServerRpcHandlerError>;
152
- get helloOk(): unknown;
147
+ handleServerRpc<D extends AnyAppCallbackRpcDefinition>(definition: D, handler: ServerRpcHandler<D>): Effect.Effect<void, DuplicateServerRpcHandlerError>;
148
+ get helloOk(): ConnectResult | null;
153
149
  /** Open the socket, perform auth/connect, resolve with HelloOk. Fails
154
150
  * immediately on pre-open close or error. */
155
- connect(): Effect.Effect<unknown, NotConnectedError | RpcTimeoutError | RpcServerError>;
151
+ connect(): Effect.Effect<ConnectResult, NotConnectedError | RpcTimeoutError | RpcServerError>;
156
152
  /**
157
153
  * Send an RPC. Fails with a typed error:
158
154
  * - `NotConnectedError` if the socket isn't OPEN or closes mid-RPC
159
155
  * - `RpcTimeoutError` after `RPC_TIMEOUT_MS` — no automatic retry
160
156
  * - `RpcServerError` on a typed server-error frame
161
157
  *
162
- * Overloads: pass an `RpcDefinition` for compile-time param/result typing,
163
- * or a raw method string for untyped legacy call sites.
158
+ * Descriptor-backed RPC call. Callers pass the protocol descriptor, and the
159
+ * client extracts the wire method only inside the encoder path.
164
160
  */
165
- sendRpc<D extends RpcDefinition<string, TSchema, TSchema>>(method: D, params: Static<D["paramsSchema"]>, opts?: RpcCallOptions): Effect.Effect<Static<D["resultSchema"]>, NotConnectedError | RpcTimeoutError | RpcServerError>;
166
- sendRpc(method: string, params?: unknown, opts?: RpcCallOptions): Effect.Effect<unknown, NotConnectedError | RpcTimeoutError | RpcServerError>;
161
+ sendRpc<D extends RpcDefinition<string, TSchema, TSchema>>(definition: D, params: ParamsOf<D>, opts?: RpcCallOptions): Effect.Effect<ResultOf<D>, NotConnectedError | RpcTimeoutError | RpcServerError>;
167
162
  /**
168
163
  * Send an RPC and surface the outbound request id alongside the
169
164
  * response envelope `type` and `result`. Spec #222 §5.1–5.2:
170
165
  * un-vacuates B4 (request-id tracking) and V5 (response-type
171
- * exposure). Mirrors `sendRpc`'s typed/raw overloads.
166
+ * exposure). Mirrors `sendRpc`'s descriptor-backed call shape.
172
167
  *
173
168
  * Invariant 3 (spec #222 §4): the returned `id` is the same identity
174
169
  * minted inside the existing `rpc-${++counter}` site — no parallel
175
170
  * counter, no mirror. The single-id pre-condition is what makes B4 a
176
171
  * real check rather than a tautology.
177
172
  */
178
- sendRpcTracked<D extends RpcDefinition<string, TSchema, TSchema>>(method: D, params: Static<D["paramsSchema"]>): Effect.Effect<TrackedRpcResponse<Static<D["resultSchema"]>>, NotConnectedError | RpcTimeoutError | RpcServerError>;
179
- sendRpcTracked(method: string, params?: unknown): Effect.Effect<TrackedRpcResponse<unknown>, NotConnectedError | RpcTimeoutError | RpcServerError>;
173
+ sendRpcTracked<D extends RpcDefinition<string, TSchema, TSchema>>(definition: D, params: ParamsOf<D>): Effect.Effect<TrackedRpcResponse<ResultOf<D>>, NotConnectedError | RpcTimeoutError | RpcServerError>;
180
174
  /**
181
- * Register a per-subscription event handler. Spec #222 §5.3 + OQ-2
175
+ * Register a per-subscription notification handler. Spec #222 §5.3 + OQ-2
182
176
  * (A): filter grammar is the three-field `SubscriptionFilter`
183
- * (`emissionTag` / `conversationId` / `eventNamePrefix`). Returns a
177
+ * (`emissionTag` / `conversationId` / `notificationNamePrefix`). Returns a
184
178
  * handle whose `unsubscribe` Effect drops delivery starting with the
185
179
  * next inbound frame (OQ-3 A snapshot semantics).
186
180
  *
@@ -189,7 +183,7 @@ export declare class MoltZapWsClient {
189
183
  * producing frames. Fails with `NotConnectedError` only if the client
190
184
  * has been permanently torn down via `close()`.
191
185
  */
192
- subscribe(filter: SubscriptionFilter, handler: SubscriberHandler): Effect.Effect<EventSubscription, NotConnectedError>;
186
+ subscribe(filter: SubscriptionFilter, handler: SubscriberHandler): Effect.Effect<NotificationSubscription, NotConnectedError>;
193
187
  /**
194
188
  * Close the socket permanently (no reconnection). Writes a clean WebSocket
195
189
  * close frame (code 1000) before tearing down the scope so the server
@@ -197,12 +191,12 @@ export declare class MoltZapWsClient {
197
191
  * lingering CLOSE_WAIT sockets on the server side.
198
192
  */
199
193
  close(): Effect.Effect<void, never>;
200
- /** Wait for the next inbound event whose `event` field equals `eventName`.
194
+ /** Wait for the next inbound notification matching `definition`.
201
195
  * Consumes a buffered match if present; otherwise awaits the next match
202
196
  * with a per-call timeout. */
203
- waitForEvent(eventName: string, timeoutMs?: number): Effect.Effect<EventFrame, Error>;
204
- /** Return all buffered events and clear the buffer. Synchronous. */
205
- drainEvents(): EventFrame[];
197
+ waitForNotification<D extends AnyNotificationDefinition>(definition: D, timeoutMs?: number): Effect.Effect<DecodedNotificationFor<D>, Error>;
198
+ /** Return all buffered notifications and clear the buffer. Synchronous. */
199
+ drainNotifications(): DecodedNotification[];
206
200
  /** Close the socket without marking as permanently closed, triggering reconnection. */
207
201
  disconnect(): Effect.Effect<void, never>;
208
202
  private disconnectSync;
@@ -210,7 +204,7 @@ export declare class MoltZapWsClient {
210
204
  /**
211
205
  * Tracked variant of `sendRpcEffect`. Reuses the same Deferred /
212
206
  * pendingRef plumbing — the only difference is the resolved value:
213
- * `{id, type: "response", result}` instead of bare `result`. This
207
+ * `{id, result}` instead of bare `result`. This
214
208
  * keeps Invariant 3 (single id source) trivially: we mint `id` once
215
209
  * inside this body, register the Deferred under that id, and return
216
210
  * the same id to the caller alongside the result.
@@ -235,8 +229,9 @@ export declare class MoltZapWsClient {
235
229
  * new tag fails the compile here.
236
230
  */
237
231
  private writeOfferRejection;
232
+ private offerRejectedResponse;
238
233
  /**
239
- * Dispatch one inbound s2c request to the registered handler, encode
234
+ * Dispatch one inbound appCallback request to the registered handler, encode
240
235
  * the response, and write it back to the server. Errors are projected
241
236
  * onto an error response so the server's `Deferred.await` always
242
237
  * settles deterministically — never hangs on a missing or crashing
@@ -251,11 +246,11 @@ export declare class MoltZapWsClient {
251
246
  * - No handler registered → encode MethodNotFound error response.
252
247
  */
253
248
  private dispatchInboundServerRequest;
254
- /** Route an inbound frame. Malformed frames are logged + dropped; event
255
- * frames dispatch to `onEvent` after the shape check. */
249
+ /** Route an inbound frame. Malformed frames are logged + dropped; notification
250
+ * frames dispatch to `onNotification` after the shape check. */
256
251
  private handleIncoming;
257
- /** Fail every outstanding event waiter with `message` and clear the map. */
258
- private failAllEventWaiters;
252
+ /** Fail every outstanding notification waiter with `message` and clear the map. */
253
+ private failAllNotificationWaiters;
259
254
  private failAllPending;
260
255
  /** Schedule a reconnect attempt. Jittered exponential backoff (1s base,
261
256
  * 30s cap) routed through `Effect.sleep` so `TestClock` can drive it. */
@@ -1 +1 @@
1
- {"version":3,"file":"ws-client.d.ts","sourceRoot":"","sources":["../src/ws-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAIL,MAAM,EASP,MAAM,QAAQ,CAAC;AAChB,OAAO,EAKL,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,8BAA8B,EAC9B,iBAAiB,EACjB,cAAc,EACd,eAAe,EAChB,MAAM,qBAAqB,CAAC;AAE7B,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EACxB,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAoB,KAAK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