@moltzap/client 2026.503.4 → 2026.504.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel-core.d.ts +1 -4
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +0 -9
- package/dist/channel-core.js.map +1 -1
- package/dist/channel-core.test.js +90 -71
- package/dist/channel-core.test.js.map +1 -1
- package/dist/cli/commands/agents.js +2 -2
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/apps.d.ts +2 -24
- package/dist/cli/commands/apps.d.ts.map +1 -1
- package/dist/cli/commands/apps.js +22 -47
- package/dist/cli/commands/apps.js.map +1 -1
- package/dist/cli/commands/apps.test.js +59 -72
- package/dist/cli/commands/apps.test.js.map +1 -1
- package/dist/cli/commands/contacts.d.ts +1 -5
- package/dist/cli/commands/contacts.d.ts.map +1 -1
- package/dist/cli/commands/contacts.js +11 -26
- package/dist/cli/commands/contacts.js.map +1 -1
- package/dist/cli/commands/conversations-v2.test.js +30 -26
- package/dist/cli/commands/conversations-v2.test.js.map +1 -1
- package/dist/cli/commands/conversations.d.ts.map +1 -1
- package/dist/cli/commands/conversations.js +48 -33
- package/dist/cli/commands/conversations.js.map +1 -1
- package/dist/cli/commands/messages.d.ts.map +1 -1
- package/dist/cli/commands/messages.js +11 -8
- package/dist/cli/commands/messages.js.map +1 -1
- package/dist/cli/commands/messages.test.js +28 -30
- package/dist/cli/commands/messages.test.js.map +1 -1
- package/dist/cli/commands/presence.d.ts.map +1 -1
- package/dist/cli/commands/presence.js +5 -4
- package/dist/cli/commands/presence.js.map +1 -1
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +20 -11
- package/dist/cli/commands/send.js.map +1 -1
- package/dist/cli/commands/send.test.js +11 -9
- package/dist/cli/commands/send.test.js.map +1 -1
- package/dist/cli/commands/status.js +2 -2
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/test-transport.d.ts +10 -0
- package/dist/cli/commands/test-transport.d.ts.map +1 -0
- package/dist/cli/commands/test-transport.js +29 -0
- package/dist/cli/commands/test-transport.js.map +1 -0
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +0 -2
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/socket-client.d.ts +9 -4
- package/dist/cli/socket-client.d.ts.map +1 -1
- package/dist/cli/socket-client.js +27 -12
- package/dist/cli/socket-client.js.map +1 -1
- package/dist/cli/transport.d.ts +3 -2
- package/dist/cli/transport.d.ts.map +1 -1
- package/dist/cli/transport.js +6 -6
- package/dist/cli/transport.js.map +1 -1
- package/dist/cli/transport.test.js +4 -4
- package/dist/cli/transport.test.js.map +1 -1
- package/dist/index.d.ts +2 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/internal/__tests__/app-callback-partition-key.test.d.ts +2 -0
- package/dist/internal/__tests__/app-callback-partition-key.test.d.ts.map +1 -0
- package/dist/internal/__tests__/app-callback-partition-key.test.js +33 -0
- package/dist/internal/__tests__/app-callback-partition-key.test.js.map +1 -0
- package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts +2 -0
- package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts.map +1 -0
- package/dist/internal/__tests__/{s2c-partition-worker.test.js → app-callback-partition-worker.test.js} +6 -9
- package/dist/internal/__tests__/app-callback-partition-worker.test.js.map +1 -0
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.d.ts +2 -0
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.d.ts.map +1 -0
- package/dist/internal/__tests__/{s2c-partitioned-dispatcher-real-ws.test.js → app-callback-partitioned-dispatcher-real-ws.test.js} +69 -94
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher-real-ws.test.js.map +1 -0
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts +2 -0
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts.map +1 -0
- package/dist/internal/__tests__/{s2c-partitioned-dispatcher.test.js → app-callback-partitioned-dispatcher.test.js} +35 -69
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.js.map +1 -0
- package/dist/internal/__tests__/app-callback-test-requests.d.ts +43 -0
- package/dist/internal/__tests__/app-callback-test-requests.d.ts.map +1 -0
- package/dist/internal/__tests__/app-callback-test-requests.js +101 -0
- package/dist/internal/__tests__/app-callback-test-requests.js.map +1 -0
- package/dist/internal/{s2c-dispatcher-errors.d.ts → app-callback-dispatcher-errors.d.ts} +5 -21
- package/dist/internal/app-callback-dispatcher-errors.d.ts.map +1 -0
- package/dist/internal/{s2c-dispatcher-errors.js → app-callback-dispatcher-errors.js} +3 -13
- package/dist/internal/app-callback-dispatcher-errors.js.map +1 -0
- package/dist/internal/app-callback-partition-key.d.ts +68 -0
- package/dist/internal/app-callback-partition-key.d.ts.map +1 -0
- package/dist/internal/app-callback-partition-key.js +90 -0
- package/dist/internal/app-callback-partition-key.js.map +1 -0
- package/dist/internal/{s2c-partition-worker.d.ts → app-callback-partition-worker.d.ts} +5 -5
- package/dist/internal/app-callback-partition-worker.d.ts.map +1 -0
- package/dist/internal/{s2c-partition-worker.js → app-callback-partition-worker.js} +5 -5
- package/dist/internal/app-callback-partition-worker.js.map +1 -0
- package/dist/internal/{s2c-partitioned-dispatcher.d.ts → app-callback-partitioned-dispatcher.d.ts} +9 -10
- package/dist/internal/app-callback-partitioned-dispatcher.d.ts.map +1 -0
- package/dist/internal/{s2c-partitioned-dispatcher.js → app-callback-partitioned-dispatcher.js} +12 -19
- package/dist/internal/app-callback-partitioned-dispatcher.js.map +1 -0
- package/dist/runtime/errors.d.ts +2 -28
- package/dist/runtime/errors.d.ts.map +1 -1
- package/dist/runtime/errors.js +0 -9
- package/dist/runtime/errors.js.map +1 -1
- package/dist/runtime/errors.test.js +2 -2
- package/dist/runtime/errors.test.js.map +1 -1
- package/dist/runtime/frame.d.ts +17 -18
- package/dist/runtime/frame.d.ts.map +1 -1
- package/dist/runtime/frame.js +83 -31
- package/dist/runtime/frame.js.map +1 -1
- package/dist/runtime/frame.test.js +15 -11
- package/dist/runtime/frame.test.js.map +1 -1
- package/dist/runtime/index.d.ts +1 -1
- package/dist/runtime/index.d.ts.map +1 -1
- package/dist/runtime/index.js +1 -1
- package/dist/runtime/index.js.map +1 -1
- package/dist/runtime/local-service-commands.d.ts +7 -0
- package/dist/runtime/local-service-commands.d.ts.map +1 -0
- package/dist/runtime/local-service-commands.js +6 -0
- package/dist/runtime/local-service-commands.js.map +1 -0
- package/dist/runtime/runtime.test.js +1 -2
- package/dist/runtime/runtime.test.js.map +1 -1
- package/dist/runtime/subscribers.d.ts +34 -29
- package/dist/runtime/subscribers.d.ts.map +1 -1
- package/dist/runtime/subscribers.js +19 -19
- package/dist/runtime/subscribers.js.map +1 -1
- package/dist/runtime/subscribers.test.js +50 -31
- package/dist/runtime/subscribers.test.js.map +1 -1
- package/dist/service.d.ts +24 -39
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +165 -161
- package/dist/service.js.map +1 -1
- package/dist/service.test.js +111 -170
- package/dist/service.test.js.map +1 -1
- package/dist/test-utils/channel-service-fixture.d.ts +1 -2
- package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
- package/dist/test-utils/channel-service-fixture.js +28 -20
- package/dist/test-utils/channel-service-fixture.js.map +1 -1
- package/dist/test-utils/conformance-adapter.d.ts +2 -2
- package/dist/test-utils/conformance-adapter.d.ts.map +1 -1
- package/dist/test-utils/conformance-adapter.js +33 -26
- package/dist/test-utils/conformance-adapter.js.map +1 -1
- package/dist/test-utils/fake-service.d.ts +14 -39
- package/dist/test-utils/fake-service.d.ts.map +1 -1
- package/dist/test-utils/fake-service.js +33 -39
- package/dist/test-utils/fake-service.js.map +1 -1
- package/dist/test-utils/ids.d.ts +9 -0
- package/dist/test-utils/ids.d.ts.map +1 -0
- package/dist/test-utils/ids.js +52 -0
- package/dist/test-utils/ids.js.map +1 -0
- package/dist/test-utils/index.d.ts +10 -2
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +12 -5
- package/dist/test-utils/index.js.map +1 -1
- package/dist/ws-client.d.ts +58 -64
- package/dist/ws-client.d.ts.map +1 -1
- package/dist/ws-client.js +151 -133
- package/dist/ws-client.js.map +1 -1
- package/dist/ws-client.test.js +157 -167
- package/dist/ws-client.test.js.map +1 -1
- package/package.json +3 -3
- package/dist/cli/commands/permissions.d.ts +0 -70
- package/dist/cli/commands/permissions.d.ts.map +0 -1
- package/dist/cli/commands/permissions.js +0 -100
- package/dist/cli/commands/permissions.js.map +0 -1
- package/dist/cli/commands/permissions.test.d.ts +0 -2
- package/dist/cli/commands/permissions.test.d.ts.map +0 -1
- package/dist/cli/commands/permissions.test.js +0 -127
- package/dist/cli/commands/permissions.test.js.map +0 -1
- package/dist/internal/__tests__/s2c-partition-key.test.d.ts +0 -2
- package/dist/internal/__tests__/s2c-partition-key.test.d.ts.map +0 -1
- package/dist/internal/__tests__/s2c-partition-key.test.js +0 -231
- package/dist/internal/__tests__/s2c-partition-key.test.js.map +0 -1
- package/dist/internal/__tests__/s2c-partition-worker.test.d.ts +0 -2
- package/dist/internal/__tests__/s2c-partition-worker.test.d.ts.map +0 -1
- package/dist/internal/__tests__/s2c-partition-worker.test.js.map +0 -1
- package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.d.ts +0 -2
- package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.d.ts.map +0 -1
- package/dist/internal/__tests__/s2c-partitioned-dispatcher-real-ws.test.js.map +0 -1
- package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.d.ts +0 -2
- package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.d.ts.map +0 -1
- package/dist/internal/__tests__/s2c-partitioned-dispatcher.test.js.map +0 -1
- package/dist/internal/s2c-dispatcher-errors.d.ts.map +0 -1
- package/dist/internal/s2c-dispatcher-errors.js.map +0 -1
- package/dist/internal/s2c-partition-key.d.ts +0 -79
- package/dist/internal/s2c-partition-key.d.ts.map +0 -1
- package/dist/internal/s2c-partition-key.js +0 -146
- package/dist/internal/s2c-partition-key.js.map +0 -1
- package/dist/internal/s2c-partition-worker.d.ts.map +0 -1
- package/dist/internal/s2c-partition-worker.js.map +0 -1
- package/dist/internal/s2c-partitioned-dispatcher.d.ts.map +0 -1
- package/dist/internal/s2c-partitioned-dispatcher.js.map +0 -1
|
@@ -4,34 +4,23 @@
|
|
|
4
4
|
*
|
|
5
5
|
* Strategy: extend the real `MoltZapService`, keeping all stateful logic
|
|
6
6
|
* intact, and override only `sendRpc` so every RPC is answered from a
|
|
7
|
-
* canned-response map.
|
|
8
|
-
*
|
|
9
|
-
* methods fail *at compile time*, not at runtime.
|
|
7
|
+
* canned-response map. `setResponse` indexes by protocol descriptor so a
|
|
8
|
+
* typo in the wire name cannot compile.
|
|
10
9
|
*
|
|
11
10
|
* Motivation: the `sendToAgent` contract drift bug (A7) happened because a
|
|
12
11
|
* hand-maintained mock drifted from the real wire shape. Typed method names
|
|
13
12
|
* surface renames and additions to the RPC surface as compile errors across
|
|
14
13
|
* every test that uses the fake.
|
|
15
14
|
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
18
|
-
* `RpcMethodName`; `result` must match `RpcMap[M]["result"]`.
|
|
19
|
-
* (2) `responses` — the underlying `Map<string, unknown>`. Permissive,
|
|
20
|
-
* preserved so existing callers that set unstyped shapes
|
|
21
|
-
* (e.g. `{}` for a method whose real result has required fields)
|
|
22
|
-
* keep working. Prefer `setResponse` in new code.
|
|
15
|
+
* Canned responses are validated through the descriptor's result schema before
|
|
16
|
+
* they are returned, matching the real transport boundary.
|
|
23
17
|
*/
|
|
18
|
+
import { decodeRpcResult, decodeNotification, ErrorCodes, notificationGroup, RpcServerError, } from "@moltzap/protocol";
|
|
24
19
|
import { Effect, HashMap, Option, Ref } from "effect";
|
|
25
20
|
import { MoltZapService } from "../service.js";
|
|
26
|
-
import {
|
|
21
|
+
import { testAgentId } from "./ids.js";
|
|
27
22
|
export class FakeMoltZapService extends MoltZapService {
|
|
28
23
|
calls = [];
|
|
29
|
-
/**
|
|
30
|
-
* Permissive response map. Prefer {@link setResponse} for typed
|
|
31
|
-
* registration. Keep this as `Map<string, unknown>` so tests that pass
|
|
32
|
-
* partial or loosely-shaped canned values — and tests that assert on
|
|
33
|
-
* unknown-method rejection — keep working.
|
|
34
|
-
*/
|
|
35
24
|
responses = new Map();
|
|
36
25
|
constructor(opts = {}) {
|
|
37
26
|
super({
|
|
@@ -40,34 +29,31 @@ export class FakeMoltZapService extends MoltZapService {
|
|
|
40
29
|
});
|
|
41
30
|
}
|
|
42
31
|
/**
|
|
43
|
-
* Register a canned response, typed against the real RPC
|
|
44
|
-
* method names are a compile error (`RpcMethodName` is a union literal),
|
|
45
|
-
* and values must match `RpcMap[M]["result"]` — a schema change in the
|
|
46
|
-
* protocol flows through to every test that sets a response for that
|
|
47
|
-
* method.
|
|
32
|
+
* Register a canned response, typed against the real RPC descriptor.
|
|
48
33
|
*/
|
|
49
|
-
setResponse(
|
|
50
|
-
this.responses.set(
|
|
34
|
+
setResponse(definition, result) {
|
|
35
|
+
this.responses.set(definition.name, () => Effect.succeed(result));
|
|
51
36
|
}
|
|
52
37
|
/**
|
|
53
|
-
* Remove a previously-registered response.
|
|
54
|
-
* so `deleteResponse("agents/lookpByName")` (typo) is a compile error.
|
|
38
|
+
* Remove a previously-registered response.
|
|
55
39
|
*/
|
|
56
|
-
deleteResponse(
|
|
57
|
-
this.responses.delete(
|
|
40
|
+
deleteResponse(definition) {
|
|
41
|
+
this.responses.delete(definition.name);
|
|
58
42
|
}
|
|
59
|
-
sendRpc(
|
|
43
|
+
sendRpc(definition, params, opts) {
|
|
60
44
|
return Effect.suspend(() => {
|
|
45
|
+
const method = definition.name;
|
|
61
46
|
this.calls.push(opts === undefined ? { method, params } : { method, params, opts });
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
47
|
+
const responder = this.responses.get(method);
|
|
48
|
+
if (responder !== undefined) {
|
|
49
|
+
return responder(params).pipe(Effect.flatMap((result) => decodeRpcResult(definition, result).pipe(Effect.mapError(() => new RpcServerError({
|
|
50
|
+
code: ErrorCodes.InternalError,
|
|
51
|
+
message: `FakeMoltZapService: invalid result for ${method}`,
|
|
52
|
+
data: result,
|
|
53
|
+
})))));
|
|
68
54
|
}
|
|
69
55
|
return Effect.fail(new RpcServerError({
|
|
70
|
-
code:
|
|
56
|
+
code: ErrorCodes.MethodNotFound,
|
|
71
57
|
message: `FakeMoltZapService: no canned response for ${method}`,
|
|
72
58
|
}));
|
|
73
59
|
});
|
|
@@ -84,13 +70,21 @@ export class FakeMoltZapService extends MoltZapService {
|
|
|
84
70
|
return HashMap.set(m, convId, [...existing, msg]);
|
|
85
71
|
}));
|
|
86
72
|
}
|
|
87
|
-
/** Deliver a protocol
|
|
73
|
+
/** Deliver a protocol notification through the real service handler. */
|
|
88
74
|
emitEvent(event) {
|
|
89
|
-
|
|
75
|
+
const notification = Effect.runSync(decodeNotification(notificationGroup, event).pipe(Effect.mapError(() => new RpcServerError({
|
|
76
|
+
code: ErrorCodes.InvalidParams,
|
|
77
|
+
message: `FakeMoltZapService: invalid notification ${event.method}`,
|
|
78
|
+
data: event.params,
|
|
79
|
+
}))));
|
|
80
|
+
this.emitNotification(notification);
|
|
81
|
+
}
|
|
82
|
+
emitNotification(notification) {
|
|
83
|
+
this.handleNotification(notification);
|
|
90
84
|
}
|
|
91
85
|
/** Pin an agent name in the internal cache without an RPC round-trip. */
|
|
92
86
|
setAgentNameDirect(id, name) {
|
|
93
|
-
Effect.runSync(Ref.update(this.parentAgentNamesRef, (m) => HashMap.set(m, id, name)));
|
|
87
|
+
Effect.runSync(Ref.update(this.parentAgentNamesRef, (m) => HashMap.set(m, testAgentId(id), name)));
|
|
94
88
|
}
|
|
95
89
|
/**
|
|
96
90
|
* Typed views of the parent class's private Refs, exposed only to this
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fake-service.js","sourceRoot":"","sources":["../../src/test-utils/fake-service.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"fake-service.js","sourceRoot":"","sources":["../../src/test-utils/fake-service.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAYH,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,iBAAiB,EACjB,cAAc,GACf,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,cAAc,EAAwB,MAAM,eAAe,CAAC;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AASvC,MAAM,OAAO,kBAAmB,SAAQ,cAAc;IACpD,KAAK,GAAmB,EAAE,CAAC;IACV,SAAS,GAAG,IAAI,GAAG,EAGjC,CAAC;IAEJ,YACE,OAGI,EAAE;QAEN,KAAK,CAAC;YACJ,SAAS,EAAE,IAAI,CAAC,SAAS,IAAI,mBAAmB;YAChD,QAAQ,EAAE,IAAI,CAAC,QAAQ,IAAI,UAAU;SACtC,CAAC,CAAC;IACL,CAAC;IAED;;OAEG;IACH,WAAW,CACT,UAAa,EACb,MAAmB;QAEnB,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,UAAU,CAAC,IAAI,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC;IACpE,CAAC;IAED;;OAEG;IACH,cAAc,CACZ,UAAa;QAEb,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IACzC,CAAC;IAEQ,OAAO,CACd,UAAa,EACb,MAAmB,EACnB,IAAqB;QAErB,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;YACzB,MAAM,MAAM,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,GAAG,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,GAAG,QAAQ,EAAE,GAAG,CAAC,CAAC,CAAC;QACpD,CAAC,CAAC,CACH,CAAC;IACJ,CAAC;IAED,wEAAwE;IACxE,SAAS,CAAC,KAAwB;QAChC,MAAM,YAAY,GAAG,MAAM,CAAC,OAAO,CACjC,kBAAkB,CAAC,iBAAiB,EAAE,KAAK,CAAC,CAAC,IAAI,CAC/C,MAAM,CAAC,QAAQ,CACb,GAAG,EAAE,CACH,IAAI,cAAc,CAAC;YACjB,IAAI,EAAE,UAAU,CAAC,aAAa;YAC9B,OAAO,EAAE,4CAA4C,KAAK,CAAC,MAAM,EAAE;YACnE,IAAI,EAAE,KAAK,CAAC,MAAM;SACnB,CAAC,CACL,CACF,CACF,CAAC;QACF,IAAI,CAAC,gBAAgB,CAAC,YAAY,CAAC,CAAC;IACtC,CAAC;IAED,gBAAgB,CACd,YAA4D;QAE5D,IAAI,CAAC,kBAAkB,CAAC,YAAY,CAAC,CAAC;IACxC,CAAC;IAED,yEAAyE;IACzE,kBAAkB,CAAC,EAAU,EAAE,IAAY;QACzC,MAAM,CAAC,OAAO,CACZ,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,mBAAmB,EAAE,CAAC,CAAC,EAAE,EAAE,CACzC,OAAO,CAAC,GAAG,CAAC,CAAC,EAAE,WAAW,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,CACtC,CACF,CAAC;IACJ,CAAC;IAED;;;;OAIG;IACH,IAAY,iBAAiB;QAC3B,OAAO,OAAO,CAAC,GAAG,CAAC,IAAI,EAAE,aAAa,CAAmC,CAAC;IAC5E,CAAC;IAED,IAAY,mBAAmB;QAC7B,OAAO,OAAO,CAAC,GAAG,CAChB,IAAI,EACJ,eAAe,CACoB,CAAC;IACxC,CAAC;CACF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AgentId as AgentIdSchema, ConversationId as ConversationIdSchema, MessageId as MessageIdSchema, type Static } from "@moltzap/protocol";
|
|
2
|
+
type AgentId = Static<typeof AgentIdSchema>;
|
|
3
|
+
type ConversationId = Static<typeof ConversationIdSchema>;
|
|
4
|
+
type MessageId = Static<typeof MessageIdSchema>;
|
|
5
|
+
export declare const testAgentId: (label: string) => AgentId;
|
|
6
|
+
export declare const testConversationId: (label: string) => ConversationId;
|
|
7
|
+
export declare const testMessageId: (label: string) => MessageId;
|
|
8
|
+
export {};
|
|
9
|
+
//# sourceMappingURL=ids.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.d.ts","sourceRoot":"","sources":["../../src/test-utils/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,cAAc,IAAI,oBAAoB,EACtC,SAAS,IAAI,eAAe,EAI5B,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAE3B,KAAK,OAAO,GAAG,MAAM,CAAC,OAAO,aAAa,CAAC,CAAC;AAC5C,KAAK,cAAc,GAAG,MAAM,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAC1D,KAAK,SAAS,GAAG,MAAM,CAAC,OAAO,eAAe,CAAC,CAAC;AAoDhD,eAAO,MAAM,WAAW,GAAI,OAAO,MAAM,KAAG,OACV,CAAC;AAEnC,eAAO,MAAM,kBAAkB,GAAI,OAAO,MAAM,KAAG,cACH,CAAC;AAEjD,eAAO,MAAM,aAAa,GAAI,OAAO,MAAM,KAAG,SACR,CAAC"}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { AgentId as AgentIdSchema, ConversationId as ConversationIdSchema, MessageId as MessageIdSchema, agentId, conversationId, messageId, } from "@moltzap/protocol";
|
|
2
|
+
const UUID_RE = /^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;
|
|
3
|
+
const HEX_ALPHABET = "0123456789abcdef";
|
|
4
|
+
const HEX_WORD = "00000000";
|
|
5
|
+
const UUID_GROUP = "0000";
|
|
6
|
+
const FNV_OFFSET_BASIS = Number("0x811c9dc5");
|
|
7
|
+
const FNV_PRIME = Number("0x01000193");
|
|
8
|
+
const HEX_RADIX = HEX_ALPHABET.length;
|
|
9
|
+
const HEX_WORD_WIDTH = HEX_WORD.length;
|
|
10
|
+
const UUID_FIRST_END = HEX_WORD.length;
|
|
11
|
+
const UUID_SECOND_END = UUID_FIRST_END + UUID_GROUP.length;
|
|
12
|
+
const UUID_VERSION_TAIL_START = UUID_SECOND_END + "0".length;
|
|
13
|
+
const UUID_VERSION_END = UUID_SECOND_END + UUID_GROUP.length;
|
|
14
|
+
const UUID_VARIANT_TAIL_START = UUID_VERSION_END + "0".length;
|
|
15
|
+
const UUID_VARIANT_END = UUID_VERSION_END + UUID_GROUP.length;
|
|
16
|
+
const UUID_TAIL_END = HEX_WORD.length * UUID_GROUP.length;
|
|
17
|
+
function hex32(input) {
|
|
18
|
+
let h1 = FNV_OFFSET_BASIS;
|
|
19
|
+
let h2 = FNV_PRIME;
|
|
20
|
+
for (let i = 0; i < input.length; i++) {
|
|
21
|
+
const c = input.charCodeAt(i);
|
|
22
|
+
h1 ^= c;
|
|
23
|
+
h1 = Math.imul(h1, FNV_PRIME);
|
|
24
|
+
h2 ^= c + i;
|
|
25
|
+
h2 = Math.imul(h2, FNV_OFFSET_BASIS);
|
|
26
|
+
}
|
|
27
|
+
const parts = [
|
|
28
|
+
h1,
|
|
29
|
+
h2,
|
|
30
|
+
Math.imul(h1 ^ h2, FNV_PRIME),
|
|
31
|
+
Math.imul(h1 + h2, FNV_OFFSET_BASIS),
|
|
32
|
+
];
|
|
33
|
+
return parts
|
|
34
|
+
.map((p) => (p >>> 0).toString(HEX_RADIX).padStart(HEX_WORD_WIDTH, "0"))
|
|
35
|
+
.join("");
|
|
36
|
+
}
|
|
37
|
+
function uuidFor(namespace, label) {
|
|
38
|
+
if (UUID_RE.test(label))
|
|
39
|
+
return label;
|
|
40
|
+
const h = hex32(`${namespace}:${label}`);
|
|
41
|
+
return [
|
|
42
|
+
h.slice(0, UUID_FIRST_END),
|
|
43
|
+
h.slice(UUID_FIRST_END, UUID_SECOND_END),
|
|
44
|
+
`4${h.slice(UUID_VERSION_TAIL_START, UUID_VERSION_END)}`,
|
|
45
|
+
`8${h.slice(UUID_VARIANT_TAIL_START, UUID_VARIANT_END)}`,
|
|
46
|
+
h.slice(UUID_VARIANT_END, UUID_TAIL_END),
|
|
47
|
+
].join("-");
|
|
48
|
+
}
|
|
49
|
+
export const testAgentId = (label) => agentId(uuidFor("agent", label));
|
|
50
|
+
export const testConversationId = (label) => conversationId(uuidFor("conversation", label));
|
|
51
|
+
export const testMessageId = (label) => messageId(uuidFor("message", label));
|
|
52
|
+
//# sourceMappingURL=ids.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ids.js","sourceRoot":"","sources":["../../src/test-utils/ids.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,IAAI,aAAa,EACxB,cAAc,IAAI,oBAAoB,EACtC,SAAS,IAAI,eAAe,EAC5B,OAAO,EACP,cAAc,EACd,SAAS,GAEV,MAAM,mBAAmB,CAAC;AAM3B,MAAM,OAAO,GACX,4EAA4E,CAAC;AAC/E,MAAM,YAAY,GAAG,kBAAkB,CAAC;AACxC,MAAM,QAAQ,GAAG,UAAU,CAAC;AAC5B,MAAM,UAAU,GAAG,MAAM,CAAC;AAC1B,MAAM,gBAAgB,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AAC9C,MAAM,SAAS,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC;AACvC,MAAM,SAAS,GAAG,YAAY,CAAC,MAAM,CAAC;AACtC,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;AACvC,MAAM,cAAc,GAAG,QAAQ,CAAC,MAAM,CAAC;AACvC,MAAM,eAAe,GAAG,cAAc,GAAG,UAAU,CAAC,MAAM,CAAC;AAC3D,MAAM,uBAAuB,GAAG,e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,SAAS,OAAO,CAAC,SAAiB,EAAE,KAAa;IAC/C,IAAI,OAAO,CAAC,IAAI,CAAC,KAAK,CAAC;QAAE,OAAO,KAAK,CAAC;IACtC,MAAM,CAAC,GAAG,KAAK,CAAC,GAAG,SAAS,IAAI,KAAK,EAAE,CAAC,CAAC;IACzC,OAAO;QACL,CAAC,CAAC,KAAK,CAAC,CAAC,EAAE,cAAc,CAAC;QAC1B,CAAC,CAAC,KAAK,CAAC,cAAc,EAAE,eAAe,CAAC;QACxC,IAAI,CAAC,CAAC,KAAK,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,EAAE;QACxD,IAAI,CAAC,CAAC,KAAK,CAAC,uBAAuB,EAAE,gBAAgB,CAAC,EAAE;QACxD,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAAE,aAAa,CAAC;KACzC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AACd,CAAC;AAED,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,KAAa,EAAW,EAAE,CACpD,OAAO,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC;AAEnC,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,KAAa,EAAkB,EAAE,CAClE,cAAc,CAAC,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC,CAAC,CAAC;AAEjD,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,KAAa,EAAa,EAAE,CACxD,SAAS,CAAC,OAAO,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC"}
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
export { createFakeChannelService, type ChannelServiceEmit, type ChannelServiceState, type CreateFakeChannelServiceOptions, type FakeChannelService, } from "./channel-service-fixture.js";
|
|
2
|
-
export { FakeMoltZapService, type
|
|
2
|
+
export { FakeMoltZapService, type RecordedCall } from "./fake-service.js";
|
|
3
3
|
export { createMoltZapRealClientFactory, type RealClientFactoryOptions, } from "./conformance-adapter.js";
|
|
4
4
|
import type { Message } from "@moltzap/protocol";
|
|
5
|
-
export
|
|
5
|
+
export { testAgentId, testConversationId, testMessageId } from "./ids.js";
|
|
6
|
+
type MessageFixtureOverrides = Omit<Partial<Message>, "id" | "conversationId" | "senderId" | "replyToId" | "taggedEntities"> & {
|
|
7
|
+
readonly id?: string;
|
|
8
|
+
readonly conversationId?: string;
|
|
9
|
+
readonly senderId?: string;
|
|
10
|
+
readonly replyToId?: string;
|
|
11
|
+
readonly taggedEntities?: ReadonlyArray<string>;
|
|
12
|
+
};
|
|
13
|
+
export declare function buildMessage(overrides?: MessageFixtureOverrides): Message;
|
|
6
14
|
export declare function flushDispatchChain(): Promise<void>;
|
|
7
15
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,GACxB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/test-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,kBAAkB,EACvB,KAAK,mBAAmB,EACxB,KAAK,+BAA+B,EACpC,KAAK,kBAAkB,GACxB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAE,KAAK,YAAY,EAAE,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACL,8BAA8B,EAC9B,KAAK,wBAAwB,GAC9B,MAAM,0BAA0B,CAAC;AAElC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,mBAAmB,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAU1E,KAAK,uBAAuB,GAAG,IAAI,CACjC,OAAO,CAAC,OAAO,CAAC,EAChB,IAAI,GAAG,gBAAgB,GAAG,UAAU,GAAG,WAAW,GAAG,gBAAgB,CACtE,GAAG;IACF,QAAQ,CAAC,EAAE,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;IACjC,QAAQ,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAC3B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,cAAc,CAAC,EAAE,aAAa,CAAC,MAAM,CAAC,CAAC;CACjD,CAAC;AAEF,wBAAgB,YAAY,CAAC,SAAS,GAAE,uBAA4B,GAAG,OAAO,CAe7E;AAED,wBAAgB,kBAAkB,kBAWjC"}
|
package/dist/test-utils/index.js
CHANGED
|
@@ -1,18 +1,25 @@
|
|
|
1
1
|
export { createFakeChannelService, } from "./channel-service-fixture.js";
|
|
2
|
-
export { FakeMoltZapService
|
|
2
|
+
export { FakeMoltZapService } from "./fake-service.js";
|
|
3
3
|
export { createMoltZapRealClientFactory, } from "./conformance-adapter.js";
|
|
4
4
|
import { Data, Effect } from "effect";
|
|
5
|
+
import { testAgentId, testConversationId, testMessageId } from "./ids.js";
|
|
6
|
+
export { testAgentId, testConversationId, testMessageId } from "./ids.js";
|
|
5
7
|
const FLUSH_DISPATCH_TURNS = 20;
|
|
6
8
|
class FlushDispatchChainError extends Data.TaggedError("FlushDispatchChainError") {
|
|
7
9
|
}
|
|
8
10
|
export function buildMessage(overrides = {}) {
|
|
11
|
+
const { id, conversationId, senderId, replyToId, taggedEntities, ...rest } = overrides;
|
|
9
12
|
return {
|
|
10
|
-
id: "msg-1",
|
|
11
|
-
conversationId: "conv-1",
|
|
12
|
-
senderId: "agent-alice",
|
|
13
|
+
id: testMessageId(id ?? "msg-1"),
|
|
14
|
+
conversationId: testConversationId(conversationId ?? "conv-1"),
|
|
15
|
+
senderId: testAgentId(senderId ?? "agent-alice"),
|
|
13
16
|
parts: [{ type: "text", text: "hello" }],
|
|
14
17
|
createdAt: "2026-04-10T12:00:00.000Z",
|
|
15
|
-
...
|
|
18
|
+
...(replyToId !== undefined ? { replyToId: testMessageId(replyToId) } : {}),
|
|
19
|
+
...(taggedEntities !== undefined
|
|
20
|
+
? { taggedEntities: taggedEntities.map(testAgentId) }
|
|
21
|
+
: {}),
|
|
22
|
+
...rest,
|
|
16
23
|
};
|
|
17
24
|
}
|
|
18
25
|
export function flushDispatchChain() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAKzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/test-utils/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,GAKzB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,kBAAkB,EAAqB,MAAM,mBAAmB,CAAC;AAE1E,OAAO,EACL,8BAA8B,GAE/B,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1E,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE1E,MAAM,oBAAoB,GAAG,EAAE,CAAC;AAEhC,MAAM,uBAAwB,SAAQ,IAAI,CAAC,WAAW,CACpD,yBAAyB,CAGzB;CAAG;AAaL,MAAM,UAAU,YAAY,CAAC,YAAqC,EAAE;IAClE,MAAM,EAAE,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,SAAS,EAAE,cAAc,EAAE,GAAG,IAAI,EAAE,GACxE,SAAS,CAAC;IACZ,OAAO;QACL,EAAE,EAAE,aAAa,CAAC,EAAE,IAAI,OAAO,CAAC;QAChC,cAAc,EAAE,kBAAkB,CAAC,cAAc,IAAI,QAAQ,CAAC;QAC9D,QAAQ,EAAE,WAAW,CAAC,QAAQ,IAAI,aAAa,CAAC;QAChD,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;QACxC,SAAS,EAAE,0BAA0B;QACrC,GAAG,CAAC,SAAS,KAAK,SAAS,CAAC,CAAC,CAAC,EAAE,SAAS,EAAE,aAAa,CAAC,SAAS,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAC3E,GAAG,CAAC,cAAc,KAAK,SAAS;YAC9B,CAAC,CAAC,EAAE,cAAc,EAAE,cAAc,CAAC,GAAG,CAAC,WAAW,CAAC,EAAE;YACrD,CAAC,CAAC,EAAE,CAAC;QACP,GAAG,IAAI;KACR,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,kBAAkB;IAChC,OAAO,MAAM,CAAC,UAAU,CACtB,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,oBAAoB,EAAE,CAAC,EAAE,EAAE,CAAC;YAC9C,KAAK,CAAC,CAAC,MAAM,CAAC,UAAU,CAAC;gBACvB,GAAG,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;gBAC5B,KAAK,EAAE,CAAC,KAAK,EAAE,EAAE,CAAC,IAAI,uBAAuB,CAAC,EAAE,KAAK,EAAE,CAAC;aACzD,CAAC,CAAC;QACL,CAAC;IACH,CAAC,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/dist/ws-client.d.ts
CHANGED
|
@@ -1,9 +1,10 @@
|
|
|
1
1
|
import { Effect } from "effect";
|
|
2
|
-
import { type
|
|
3
|
-
import { DuplicateServerRpcHandlerError
|
|
4
|
-
import { type
|
|
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/
|
|
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
|
-
*
|
|
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
|
|
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 `
|
|
36
|
-
* narrows generically against `
|
|
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:
|
|
40
|
-
readonly
|
|
41
|
+
readonly requestId: JsonRpcStringId;
|
|
42
|
+
readonly definition: AnyAppCallbackRpcDefinition;
|
|
41
43
|
readonly traceparent?: string;
|
|
42
44
|
}
|
|
43
|
-
export type ServerRpcHandler = (params:
|
|
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 `
|
|
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
|
|
62
|
-
* construction;
|
|
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:
|
|
74
|
+
onReconnect?: (helloOk: ConnectResult) => void;
|
|
67
75
|
logger?: WsClientLogger;
|
|
68
76
|
/**
|
|
69
|
-
* Spec #356 — partitioned
|
|
77
|
+
* Spec #356 — partitioned appCallback dispatcher knobs. Optional; omitted
|
|
70
78
|
* fields fall back to `DEFAULT_PARTITIONED_DISPATCHER_CONFIG`.
|
|
71
79
|
*/
|
|
72
|
-
|
|
80
|
+
appCallbackDispatcher?: AppCallbackDispatcherConfig;
|
|
73
81
|
}
|
|
74
82
|
/**
|
|
75
|
-
* Return shape of `MoltZapWsClient.sendRpcTracked`.
|
|
76
|
-
*
|
|
77
|
-
*
|
|
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:
|
|
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
|
|
108
|
+
private readonly notificationsBufferRef;
|
|
111
109
|
/**
|
|
112
|
-
* Waiters keyed by
|
|
113
|
-
* pops the most recently registered waiter (the tail).
|
|
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
|
|
113
|
+
private readonly notificationWaitersRef;
|
|
118
114
|
private readonly runtime;
|
|
119
115
|
/**
|
|
120
|
-
* Per-subscription
|
|
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
|
|
126
|
+
* dispatcher fiber when an appCallback request frame arrives.
|
|
131
127
|
*/
|
|
132
|
-
private readonly
|
|
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
|
|
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(
|
|
152
|
-
get helloOk():
|
|
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<
|
|
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
|
-
*
|
|
163
|
-
*
|
|
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>>(
|
|
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
|
|
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>>(
|
|
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
|
|
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` / `
|
|
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<
|
|
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
|
|
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
|
-
|
|
204
|
-
/** Return all buffered
|
|
205
|
-
|
|
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,
|
|
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.
|
|
@@ -237,7 +231,7 @@ export declare class MoltZapWsClient {
|
|
|
237
231
|
private writeOfferRejection;
|
|
238
232
|
private offerRejectedResponse;
|
|
239
233
|
/**
|
|
240
|
-
* Dispatch one inbound
|
|
234
|
+
* Dispatch one inbound appCallback request to the registered handler, encode
|
|
241
235
|
* the response, and write it back to the server. Errors are projected
|
|
242
236
|
* onto an error response so the server's `Deferred.await` always
|
|
243
237
|
* settles deterministically — never hangs on a missing or crashing
|
|
@@ -252,11 +246,11 @@ export declare class MoltZapWsClient {
|
|
|
252
246
|
* - No handler registered → encode MethodNotFound error response.
|
|
253
247
|
*/
|
|
254
248
|
private dispatchInboundServerRequest;
|
|
255
|
-
/** Route an inbound frame. Malformed frames are logged + dropped;
|
|
256
|
-
* frames dispatch to `
|
|
249
|
+
/** Route an inbound frame. Malformed frames are logged + dropped; notification
|
|
250
|
+
* frames dispatch to `onNotification` after the shape check. */
|
|
257
251
|
private handleIncoming;
|
|
258
|
-
/** Fail every outstanding
|
|
259
|
-
private
|
|
252
|
+
/** Fail every outstanding notification waiter with `message` and clear the map. */
|
|
253
|
+
private failAllNotificationWaiters;
|
|
260
254
|
private failAllPending;
|
|
261
255
|
/** Schedule a reconnect attempt. Jittered exponential backoff (1s base,
|
|
262
256
|
* 30s cap) routed through `Effect.sleep` so `TestClock` can drive it. */
|
package/dist/ws-client.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ws-client.d.ts","sourceRoot":"","sources":["../src/ws-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,MAAM,EASP,MAAM,QAAQ,CAAC;AAChB,OAAO,
|
|
1
|
+
{"version":3,"file":"ws-client.d.ts","sourceRoot":"","sources":["../src/ws-client.ts"],"names":[],"mappings":"AAEA,OAAO,EAML,MAAM,EASP,MAAM,QAAQ,CAAC;AAChB,OAAO,EAEL,OAAO,EAGP,iBAAiB,EAGjB,cAAc,EACd,eAAe,EACf,KAAK,2BAA2B,EAChC,KAAK,yBAAyB,EAC9B,KAAK,eAAe,EACpB,KAAK,QAAQ,EAGb,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,OAAO,EACZ,KAAK,MAAM,EACZ,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EAAE,8BAA8B,EAAE,MAAM,qBAAqB,CAAC;AACrE,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAEL,KAAK,wBAAwB,EAC7B,KAAK,iBAAiB,EAEtB,KAAK,kBAAkB,EACxB,MAAM,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