@moltzap/client 2026.528.0 → 2026.717.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.
- package/dist/agent-client.d.ts +2 -65
- package/dist/agent-client.d.ts.map +1 -1
- package/dist/agent-client.js +1 -286
- package/dist/agent-client.js.map +1 -1
- package/dist/app-client.d.ts +3 -0
- package/dist/app-client.d.ts.map +1 -0
- package/dist/app-client.js +2 -0
- package/dist/app-client.js.map +1 -0
- package/dist/auth.d.ts +6 -15
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +12 -16
- package/dist/auth.js.map +1 -1
- package/dist/channel-base/format-cross-conv.d.ts +10 -15
- package/dist/channel-base/format-cross-conv.d.ts.map +1 -1
- package/dist/channel-base/format-cross-conv.js +10 -15
- package/dist/channel-base/format-cross-conv.js.map +1 -1
- package/dist/channel-base/format-group-block.d.ts +8 -10
- package/dist/channel-base/format-group-block.d.ts.map +1 -1
- package/dist/channel-base/format-group-block.js +8 -10
- package/dist/channel-base/format-group-block.js.map +1 -1
- package/dist/channel-base/index.d.ts +3 -62
- package/dist/channel-base/index.d.ts.map +1 -1
- package/dist/channel-base/index.js +2 -65
- package/dist/channel-base/index.js.map +1 -1
- package/dist/channel-base/lease-guard.d.ts +0 -2
- package/dist/channel-base/lease-guard.d.ts.map +1 -1
- package/dist/channel-base/lease-guard.js +0 -2
- package/dist/channel-base/lease-guard.js.map +1 -1
- package/dist/channel-base/lease-store.d.ts +2 -3
- package/dist/channel-base/lease-store.d.ts.map +1 -1
- package/dist/channel-base/lease-store.js +2 -3
- package/dist/channel-base/lease-store.js.map +1 -1
- package/dist/channel-base/lease.d.ts +25 -31
- package/dist/channel-base/lease.d.ts.map +1 -1
- package/dist/channel-base/lease.js +29 -45
- package/dist/channel-base/lease.js.map +1 -1
- package/dist/channel-core-enrichment.d.ts +1 -1
- package/dist/channel-core-enrichment.d.ts.map +1 -1
- package/dist/channel-core-test-support.d.ts +17 -11
- package/dist/channel-core-test-support.d.ts.map +1 -1
- package/dist/channel-core-test-support.js +5 -6
- package/dist/channel-core-test-support.js.map +1 -1
- package/dist/channel-core.d.ts +24 -29
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +18 -42
- package/dist/channel-core.js.map +1 -1
- package/dist/cli/commands/agents.d.ts +3 -6
- package/dist/cli/commands/agents.d.ts.map +1 -1
- package/dist/cli/commands/agents.js +14 -50
- package/dist/cli/commands/agents.js.map +1 -1
- package/dist/cli/commands/contacts.d.ts +5 -6
- package/dist/cli/commands/contacts.d.ts.map +1 -1
- package/dist/cli/commands/contacts.js +15 -43
- package/dist/cli/commands/contacts.js.map +1 -1
- package/dist/cli/commands/conversations.d.ts +8 -18
- package/dist/cli/commands/conversations.d.ts.map +1 -1
- package/dist/cli/commands/conversations.js +14 -65
- package/dist/cli/commands/conversations.js.map +1 -1
- package/dist/cli/commands/messages.d.ts +13 -35
- package/dist/cli/commands/messages.d.ts.map +1 -1
- package/dist/cli/commands/messages.js +21 -46
- package/dist/cli/commands/messages.js.map +1 -1
- package/dist/cli/commands/register.d.ts +10 -12
- package/dist/cli/commands/register.d.ts.map +1 -1
- package/dist/cli/commands/register.js +47 -133
- package/dist/cli/commands/register.js.map +1 -1
- package/dist/cli/commands/send.d.ts +23 -36
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +25 -72
- package/dist/cli/commands/send.js.map +1 -1
- package/dist/cli/commands/start.d.ts +10 -124
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +28 -510
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.d.ts +1 -1
- package/dist/cli/commands/status.d.ts.map +1 -1
- package/dist/cli/commands/status.js +8 -9
- package/dist/cli/commands/status.js.map +1 -1
- package/dist/cli/commands/test-transport.d.ts +12 -5
- package/dist/cli/commands/test-transport.d.ts.map +1 -1
- package/dist/cli/commands/test-transport.js +15 -15
- package/dist/cli/commands/test-transport.js.map +1 -1
- package/dist/cli/index.js +13 -38
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +4 -0
- package/dist/cli/output.d.ts.map +1 -0
- package/dist/cli/output.js +9 -0
- package/dist/cli/output.js.map +1 -0
- package/dist/cli/socket-client.d.ts +7 -14
- package/dist/cli/socket-client.d.ts.map +1 -1
- package/dist/cli/socket-client.js +15 -38
- package/dist/cli/socket-client.js.map +1 -1
- package/dist/cli/transport.d.ts +53 -116
- package/dist/cli/transport.d.ts.map +1 -1
- package/dist/cli/transport.js +45 -295
- package/dist/cli/transport.js.map +1 -1
- package/dist/config.d.ts +24 -0
- package/dist/config.d.ts.map +1 -0
- package/dist/config.js +35 -0
- package/dist/config.js.map +1 -0
- package/dist/config.test-utils.d.ts +13 -0
- package/dist/config.test-utils.d.ts.map +1 -0
- package/dist/config.test-utils.js +46 -0
- package/dist/config.test-utils.js.map +1 -0
- package/dist/index.d.ts +3 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -12
- package/dist/index.js.map +1 -1
- package/dist/local-daemon-rpc.d.ts +259 -8
- package/dist/local-daemon-rpc.d.ts.map +1 -1
- package/dist/local-daemon-rpc.js +189 -12
- package/dist/local-daemon-rpc.js.map +1 -1
- package/dist/{runtime/local-history.d.ts → local-history.d.ts} +16 -21
- package/dist/local-history.d.ts.map +1 -0
- package/dist/{runtime/local-history.js → local-history.js} +16 -21
- package/dist/local-history.js.map +1 -0
- package/dist/local-paths.d.ts +0 -2
- package/dist/local-paths.d.ts.map +1 -1
- package/dist/local-paths.js +0 -4
- package/dist/local-paths.js.map +1 -1
- package/dist/local-socket-server.d.ts +22 -0
- package/dist/local-socket-server.d.ts.map +1 -0
- package/dist/{runtime/local-socket-server.js → local-socket-server.js} +4 -9
- package/dist/local-socket-server.js.map +1 -0
- package/dist/message-rendering.d.ts +3 -0
- package/dist/message-rendering.d.ts.map +1 -0
- package/dist/message-rendering.js +7 -0
- package/dist/message-rendering.js.map +1 -0
- package/dist/notification/__tests__/{snapshot-semantics.types-check.d.ts → subscribe-signatures.types-check.d.ts} +1 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +1 -0
- package/dist/notification/__tests__/subscribe-signatures.types-check.js +55 -0
- package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +1 -0
- package/dist/notification/errors.d.ts +18 -6
- package/dist/notification/errors.d.ts.map +1 -1
- package/dist/notification/errors.js +13 -15
- package/dist/notification/errors.js.map +1 -1
- package/dist/notification/index.d.ts +5 -0
- package/dist/notification/index.d.ts.map +1 -0
- package/dist/notification/index.js +5 -0
- package/dist/notification/index.js.map +1 -0
- package/dist/notification/stream.d.ts +33 -49
- package/dist/notification/stream.d.ts.map +1 -1
- package/dist/notification/stream.js +33 -76
- package/dist/notification/stream.js.map +1 -1
- package/dist/pagination.d.ts +20 -10
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +8 -9
- package/dist/pagination.js.map +1 -1
- package/dist/profile.d.ts +92 -0
- package/dist/profile.d.ts.map +1 -0
- package/dist/profile.js +149 -0
- package/dist/profile.js.map +1 -0
- package/dist/refs.d.ts.map +1 -0
- package/dist/refs.js.map +1 -0
- package/dist/service-archive-purge.d.ts +2 -1
- package/dist/service-archive-purge.d.ts.map +1 -1
- package/dist/service-archive-purge.js.map +1 -1
- package/dist/{runtime/service-helpers.d.ts → service-helpers.d.ts} +5 -11
- package/dist/service-helpers.d.ts.map +1 -0
- package/dist/{runtime/service-helpers.js → service-helpers.js} +2 -9
- package/dist/service-helpers.js.map +1 -0
- package/dist/service-local-daemon.d.ts +22 -0
- package/dist/service-local-daemon.d.ts.map +1 -0
- package/dist/service-local-daemon.js +185 -0
- package/dist/service-local-daemon.js.map +1 -0
- package/dist/service.d.ts +65 -57
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +205 -156
- package/dist/service.js.map +1 -1
- package/dist/test-utils/channel-service-fixture.d.ts +3 -2
- package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
- package/dist/test-utils/channel-service-fixture.js.map +1 -1
- package/dist/test-utils/fake-service.d.ts +26 -18
- package/dist/test-utils/fake-service.d.ts.map +1 -1
- package/dist/test-utils/fake-service.js +28 -42
- package/dist/test-utils/fake-service.js.map +1 -1
- package/dist/test-utils/ids.d.ts +3 -1
- package/dist/test-utils/ids.d.ts.map +1 -1
- package/dist/test-utils/ids.js.map +1 -1
- package/dist/test-utils/index.d.ts +9 -2
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +8 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/standalone-provisioning.d.ts +17 -0
- package/dist/test-utils/standalone-provisioning.d.ts.map +1 -0
- package/dist/test-utils/standalone-provisioning.js +14 -0
- package/dist/test-utils/standalone-provisioning.js.map +1 -0
- package/dist/tsconfig.tsbuildinfo +1 -0
- package/package.json +39 -17
- package/dist/auth.test.d.ts +0 -2
- package/dist/auth.test.d.ts.map +0 -1
- package/dist/auth.test.js +0 -121
- package/dist/auth.test.js.map +0 -1
- package/dist/channel-core-context.test.d.ts +0 -2
- package/dist/channel-core-context.test.d.ts.map +0 -1
- package/dist/channel-core-context.test.js +0 -342
- package/dist/channel-core-context.test.js.map +0 -1
- package/dist/channel-core-dispatch.test.d.ts +0 -2
- package/dist/channel-core-dispatch.test.d.ts.map +0 -1
- package/dist/channel-core-dispatch.test.js +0 -557
- package/dist/channel-core-dispatch.test.js.map +0 -1
- package/dist/channel-core.test.d.ts +0 -2
- package/dist/channel-core.test.d.ts.map +0 -1
- package/dist/channel-core.test.js +0 -232
- package/dist/channel-core.test.js.map +0 -1
- package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts +0 -2
- package/dist/cli/__tests__/cli-multi-agent.int.test.d.ts.map +0 -1
- package/dist/cli/__tests__/cli-multi-agent.int.test.js +0 -132
- package/dist/cli/__tests__/cli-multi-agent.int.test.js.map +0 -1
- package/dist/cli/commands/invite.d.ts +0 -7
- package/dist/cli/commands/invite.d.ts.map +0 -1
- package/dist/cli/commands/invite.js +0 -11
- package/dist/cli/commands/invite.js.map +0 -1
- package/dist/cli/commands/messages.test.d.ts +0 -2
- package/dist/cli/commands/messages.test.d.ts.map +0 -1
- package/dist/cli/commands/messages.test.js +0 -99
- package/dist/cli/commands/messages.test.js.map +0 -1
- package/dist/cli/commands/ping.d.ts +0 -7
- package/dist/cli/commands/ping.d.ts.map +0 -1
- package/dist/cli/commands/ping.js +0 -37
- package/dist/cli/commands/ping.js.map +0 -1
- package/dist/cli/commands/presence.d.ts +0 -11
- package/dist/cli/commands/presence.d.ts.map +0 -1
- package/dist/cli/commands/presence.js +0 -33
- package/dist/cli/commands/presence.js.map +0 -1
- package/dist/cli/commands/register.test.d.ts +0 -2
- package/dist/cli/commands/register.test.d.ts.map +0 -1
- package/dist/cli/commands/register.test.js +0 -91
- package/dist/cli/commands/register.test.js.map +0 -1
- package/dist/cli/commands/send.test.d.ts +0 -2
- package/dist/cli/commands/send.test.d.ts.map +0 -1
- package/dist/cli/commands/send.test.js +0 -59
- package/dist/cli/commands/send.test.js.map +0 -1
- package/dist/cli/commands/start.test.d.ts +0 -2
- package/dist/cli/commands/start.test.d.ts.map +0 -1
- package/dist/cli/commands/start.test.js +0 -624
- package/dist/cli/commands/start.test.js.map +0 -1
- package/dist/cli/commands/whoami.d.ts +0 -8
- package/dist/cli/commands/whoami.d.ts.map +0 -1
- package/dist/cli/commands/whoami.js +0 -28
- package/dist/cli/commands/whoami.js.map +0 -1
- package/dist/cli/config.d.ts +0 -66
- package/dist/cli/config.d.ts.map +0 -1
- package/dist/cli/config.js +0 -148
- package/dist/cli/config.js.map +0 -1
- package/dist/cli/config.test.d.ts +0 -2
- package/dist/cli/config.test.d.ts.map +0 -1
- package/dist/cli/config.test.js +0 -89
- package/dist/cli/config.test.js.map +0 -1
- package/dist/cli/http-client.d.ts +0 -17
- package/dist/cli/http-client.d.ts.map +0 -1
- package/dist/cli/http-client.js +0 -38
- package/dist/cli/http-client.js.map +0 -1
- package/dist/cli/profile.d.ts +0 -126
- package/dist/cli/profile.d.ts.map +0 -1
- package/dist/cli/profile.js +0 -231
- package/dist/cli/profile.js.map +0 -1
- package/dist/cli/profile.test.d.ts +0 -2
- package/dist/cli/profile.test.d.ts.map +0 -1
- package/dist/cli/profile.test.js +0 -369
- package/dist/cli/profile.test.js.map +0 -1
- package/dist/cli/transport.test.d.ts +0 -2
- package/dist/cli/transport.test.d.ts.map +0 -1
- package/dist/cli/transport.test.js +0 -312
- package/dist/cli/transport.test.js.map +0 -1
- package/dist/notification/__tests__/filter-equivalence.test.d.ts +0 -2
- package/dist/notification/__tests__/filter-equivalence.test.d.ts.map +0 -1
- package/dist/notification/__tests__/filter-equivalence.test.js +0 -123
- package/dist/notification/__tests__/filter-equivalence.test.js.map +0 -1
- package/dist/notification/__tests__/snapshot-semantics.test.d.ts +0 -2
- package/dist/notification/__tests__/snapshot-semantics.test.d.ts.map +0 -1
- package/dist/notification/__tests__/snapshot-semantics.test.js +0 -261
- package/dist/notification/__tests__/snapshot-semantics.test.js.map +0 -1
- package/dist/notification/__tests__/snapshot-semantics.types-check.d.ts.map +0 -1
- package/dist/notification/__tests__/snapshot-semantics.types-check.js +0 -62
- package/dist/notification/__tests__/snapshot-semantics.types-check.js.map +0 -1
- package/dist/pagination.test.d.ts +0 -2
- package/dist/pagination.test.d.ts.map +0 -1
- package/dist/pagination.test.js +0 -72
- package/dist/pagination.test.js.map +0 -1
- package/dist/runtime/close-info.d.ts +0 -84
- package/dist/runtime/close-info.d.ts.map +0 -1
- package/dist/runtime/close-info.js +0 -102
- package/dist/runtime/close-info.js.map +0 -1
- package/dist/runtime/close-info.test.d.ts +0 -2
- package/dist/runtime/close-info.test.d.ts.map +0 -1
- package/dist/runtime/close-info.test.js +0 -109
- package/dist/runtime/close-info.test.js.map +0 -1
- package/dist/runtime/errors.d.ts +0 -11
- package/dist/runtime/errors.d.ts.map +0 -1
- package/dist/runtime/errors.js +0 -41
- package/dist/runtime/errors.js.map +0 -1
- package/dist/runtime/errors.test.d.ts +0 -2
- package/dist/runtime/errors.test.d.ts.map +0 -1
- package/dist/runtime/errors.test.js +0 -79
- package/dist/runtime/errors.test.js.map +0 -1
- package/dist/runtime/frame.d.ts +0 -8
- package/dist/runtime/frame.d.ts.map +0 -1
- package/dist/runtime/frame.js +0 -12
- package/dist/runtime/frame.js.map +0 -1
- package/dist/runtime/frame.test.d.ts +0 -2
- package/dist/runtime/frame.test.d.ts.map +0 -1
- package/dist/runtime/frame.test.js +0 -59
- package/dist/runtime/frame.test.js.map +0 -1
- package/dist/runtime/index.d.ts +0 -10
- package/dist/runtime/index.d.ts.map +0 -1
- package/dist/runtime/index.js +0 -9
- package/dist/runtime/index.js.map +0 -1
- package/dist/runtime/local-history.d.ts.map +0 -1
- package/dist/runtime/local-history.js.map +0 -1
- package/dist/runtime/local-service-commands.d.ts +0 -26
- package/dist/runtime/local-service-commands.d.ts.map +0 -1
- package/dist/runtime/local-service-commands.js +0 -29
- package/dist/runtime/local-service-commands.js.map +0 -1
- package/dist/runtime/local-socket-server.d.ts +0 -20
- package/dist/runtime/local-socket-server.d.ts.map +0 -1
- package/dist/runtime/local-socket-server.js.map +0 -1
- package/dist/runtime/refs.d.ts.map +0 -1
- package/dist/runtime/refs.js.map +0 -1
- package/dist/runtime/runtime.test.d.ts +0 -2
- package/dist/runtime/runtime.test.d.ts.map +0 -1
- package/dist/runtime/runtime.test.js +0 -37
- package/dist/runtime/runtime.test.js.map +0 -1
- package/dist/runtime/service-helpers.d.ts.map +0 -1
- package/dist/runtime/service-helpers.js.map +0 -1
- package/dist/runtime/service-teardown.d.ts +0 -5
- package/dist/runtime/service-teardown.d.ts.map +0 -1
- package/dist/runtime/service-teardown.js +0 -36
- package/dist/runtime/service-teardown.js.map +0 -1
- package/dist/runtime/service-teardown.test.d.ts +0 -2
- package/dist/runtime/service-teardown.test.d.ts.map +0 -1
- package/dist/runtime/service-teardown.test.js +0 -80
- package/dist/runtime/service-teardown.test.js.map +0 -1
- package/dist/runtime/subscribers.d.ts +0 -152
- package/dist/runtime/subscribers.d.ts.map +0 -1
- package/dist/runtime/subscribers.js +0 -222
- package/dist/runtime/subscribers.js.map +0 -1
- package/dist/service-socket-path.test.d.ts +0 -2
- package/dist/service-socket-path.test.d.ts.map +0 -1
- package/dist/service-socket-path.test.js +0 -87
- package/dist/service-socket-path.test.js.map +0 -1
- package/dist/service.test.d.ts +0 -2
- package/dist/service.test.d.ts.map +0 -1
- package/dist/service.test.js +0 -796
- package/dist/service.test.js.map +0 -1
- package/dist/test/index.d.ts +0 -47
- package/dist/test/index.d.ts.map +0 -1
- package/dist/test/index.js +0 -39
- package/dist/test/index.js.map +0 -1
- package/dist/test-utils/conformance-adapter.d.ts +0 -40
- package/dist/test-utils/conformance-adapter.d.ts.map +0 -1
- package/dist/test-utils/conformance-adapter.js +0 -250
- package/dist/test-utils/conformance-adapter.js.map +0 -1
- package/dist/tm-client-test-support.d.ts +0 -184
- package/dist/tm-client-test-support.d.ts.map +0 -1
- package/dist/tm-client-test-support.js +0 -466
- package/dist/tm-client-test-support.js.map +0 -1
- package/dist/tm-client.d.ts +0 -269
- package/dist/tm-client.d.ts.map +0 -1
- package/dist/tm-client.js +0 -518
- package/dist/tm-client.js.map +0 -1
- package/dist/tm-client.test.d.ts +0 -2
- package/dist/tm-client.test.d.ts.map +0 -1
- package/dist/tm-client.test.js +0 -490
- package/dist/tm-client.test.js.map +0 -1
- /package/dist/{runtime/refs.d.ts → refs.d.ts} +0 -0
- /package/dist/{runtime/refs.js → refs.js} +0 -0
|
@@ -1,261 +0,0 @@
|
|
|
1
|
-
/* eslint-disable max-nested-callbacks, max-lines-per-function, sonarjs/max-lines-per-function, agent-code-guard/no-example-only-tests -- vitest + Effect.gen + Stream.runForEach nest by construction; AD1 properties are scenario-shaped (snapshot semantics + lifecycle); generative coverage lives in filter-equivalence.test.ts */
|
|
2
|
-
/**
|
|
3
|
-
* Snapshot-semantics property test (validates AD1 via spec #222 §5.3 OQ-3
|
|
4
|
-
* acceptance criterion). Spec B (#596).
|
|
5
|
-
*
|
|
6
|
-
* Four architect-named properties (see `snapshot-semantics.types-check.ts`
|
|
7
|
-
* for the compile-time AD1 canaries):
|
|
8
|
-
*
|
|
9
|
-
* 1. "No notification with arrival time > T_cancel is delivered through s."
|
|
10
|
-
* — verified via two subscriptions (`s_observer` + `s_target`) racing
|
|
11
|
-
* against a series of dispatched frames. After `s_target` cancels at
|
|
12
|
-
* frame index K, only `s_observer` keeps receiving frames K+1…N.
|
|
13
|
-
* 2. "Unregister between frames doesn't affect prior dispatches." —
|
|
14
|
-
* verified by registering three subscribers, running `dispatch(frameN)`
|
|
15
|
-
* once; *after* the dispatch returns, interrupt `s2`, then
|
|
16
|
-
* `dispatch(frameN+1)` — assert s2 received frameN but not frameN+1.
|
|
17
|
-
* (Renamed in r1 cleanup per P2-3: this test does NOT exercise true
|
|
18
|
-
* mid-dispatch interleaving; the standalone "mid-dispatch" test below
|
|
19
|
-
* does.)
|
|
20
|
-
* 3. "In-flight dispatch of frame N is NOT interrupted by an unregister
|
|
21
|
-
* that commits during frame N." — verified by forking a dispatch whose
|
|
22
|
-
* first invoked subscriber suspends on a `Deferred`. While the
|
|
23
|
-
* dispatch fiber is parked mid-handler, interrupt a SIBLING
|
|
24
|
-
* subscriber's consumer fiber (which calls `handle.unregister`
|
|
25
|
-
* via the Stream finalizer); release the dispatch fiber and assert
|
|
26
|
-
* the interrupted sibling STILL received the frame — proving the
|
|
27
|
-
* dispatch is iterating a snapshot, not the live list.
|
|
28
|
-
* 4. "Closed client terminates all in-flight Streams with `NotConnectedError`."
|
|
29
|
-
* — verified by forking a `Stream.runForEach` consumer, calling
|
|
30
|
-
* `closeAll`, then asserting the fiber's exit is a typed
|
|
31
|
-
* `NotConnectedError` failure.
|
|
32
|
-
*
|
|
33
|
-
* The tests intentionally exercise `SubscriberRegistry` + the
|
|
34
|
-
* `notification/stream.ts` Stream factories together (the public API
|
|
35
|
-
* surface), not the registry alone — Canary #3's "internal Scope, no
|
|
36
|
-
* leakage" contract is what we are validating end-to-end.
|
|
37
|
-
*
|
|
38
|
-
* Per P3 #612 fix (architect revision): each `expect` here asserts a
|
|
39
|
-
* value computed by the system under test rather than the test's own
|
|
40
|
-
* input — no tautological "X === X" patterns.
|
|
41
|
-
*
|
|
42
|
-
* Determinism (r1 cleanup, P2-2): readiness between forked consumers and
|
|
43
|
-
* the dispatch path uses `Effect.yieldNow()` (deterministic single-tick
|
|
44
|
-
* scheduling) rather than `Effect.sleep(...)` (wall-clock dependent).
|
|
45
|
-
* Mid-dispatch suspension uses `Deferred` so the dispatch fiber is parked
|
|
46
|
-
* at a known point inside the handler, independent of any timer.
|
|
47
|
-
*/
|
|
48
|
-
import { describe, expect, it } from "vitest";
|
|
49
|
-
import { Cause, Deferred, Effect, Exit, Fiber, Option, Ref, Stream, } from "effect";
|
|
50
|
-
import { NotConnectedError, } from "@moltzap/protocol";
|
|
51
|
-
import { PresenceChangedNotificationDefinition, MessageReceivedNotificationDefinition, } from "@moltzap/protocol";
|
|
52
|
-
import { makeSubscriberRegistry } from "../../runtime/subscribers.js";
|
|
53
|
-
import { subscribe, subscribeAll } from "../stream.js";
|
|
54
|
-
const PROP_TEST_FRAME_COUNT = 6;
|
|
55
|
-
const PROP_TEST_CANCEL_AT = 3;
|
|
56
|
-
function decodedPresence(seq) {
|
|
57
|
-
return {
|
|
58
|
-
_tag: "Notification",
|
|
59
|
-
jsonrpc: "2.0",
|
|
60
|
-
definition: PresenceChangedNotificationDefinition,
|
|
61
|
-
method: PresenceChangedNotificationDefinition.name,
|
|
62
|
-
params: {
|
|
63
|
-
agentId: `agent-${seq}`,
|
|
64
|
-
status: seq % 2 === 0 ? "online" : "offline",
|
|
65
|
-
},
|
|
66
|
-
};
|
|
67
|
-
}
|
|
68
|
-
function decodedMessageReceived() {
|
|
69
|
-
return {
|
|
70
|
-
_tag: "Notification",
|
|
71
|
-
jsonrpc: "2.0",
|
|
72
|
-
definition: MessageReceivedNotificationDefinition,
|
|
73
|
-
method: MessageReceivedNotificationDefinition.name,
|
|
74
|
-
params: {
|
|
75
|
-
message: {
|
|
76
|
-
id: "m1",
|
|
77
|
-
conversationId: "c1",
|
|
78
|
-
senderId: "agent-0",
|
|
79
|
-
parts: [{ type: "text", text: "hi" }],
|
|
80
|
-
},
|
|
81
|
-
},
|
|
82
|
-
};
|
|
83
|
-
}
|
|
84
|
-
describe("AD1 snapshot semantics — Stream cancellation", () => {
|
|
85
|
-
it("no notification with index > T_cancel is delivered through s_target", () => Effect.runPromise(Effect.gen(function* () {
|
|
86
|
-
const registry = yield* makeSubscriberRegistry();
|
|
87
|
-
const observerSeen = yield* Ref.make([]);
|
|
88
|
-
const targetSeen = yield* Ref.make([]);
|
|
89
|
-
const observerFiber = yield* Effect.fork(subscribe(registry, PresenceChangedNotificationDefinition).pipe(Stream.runForEach((frame) => Ref.update(observerSeen, (xs) => [
|
|
90
|
-
...xs,
|
|
91
|
-
Number(frame.params.agentId.slice("agent-".length)),
|
|
92
|
-
])), Effect.catchAll(() => Effect.void)));
|
|
93
|
-
const targetStream = subscribe(registry, PresenceChangedNotificationDefinition);
|
|
94
|
-
const targetFiber = yield* Effect.fork(targetStream.pipe(Stream.take(PROP_TEST_CANCEL_AT), Stream.runForEach((frame) => Ref.update(targetSeen, (xs) => [
|
|
95
|
-
...xs,
|
|
96
|
-
Number(frame.params.agentId.slice("agent-".length)),
|
|
97
|
-
])), Effect.catchAll(() => Effect.void)));
|
|
98
|
-
// Yield once so each forked consumer's Stream.async register
|
|
99
|
-
// callback commits its subscription into `subsRef` before the
|
|
100
|
-
// dispatch loop reads the snapshot. `Effect.yieldNow()` is
|
|
101
|
-
// deterministic (single-tick scheduling) — replaces the prior
|
|
102
|
-
// `Effect.sleep("10 millis")` which was wall-clock dependent
|
|
103
|
-
// (P2-2 r1 cleanup).
|
|
104
|
-
yield* Effect.yieldNow();
|
|
105
|
-
for (let i = 0; i < PROP_TEST_FRAME_COUNT; i++) {
|
|
106
|
-
yield* registry.dispatch(decodedPresence(i));
|
|
107
|
-
}
|
|
108
|
-
yield* Effect.yieldNow();
|
|
109
|
-
yield* Fiber.join(targetFiber);
|
|
110
|
-
// Drain the registry by running closeAll so the observer fiber
|
|
111
|
-
// terminates with NotConnectedError and we can assert what it saw.
|
|
112
|
-
yield* registry.closeAll;
|
|
113
|
-
yield* Fiber.join(observerFiber);
|
|
114
|
-
const target = yield* Ref.get(targetSeen);
|
|
115
|
-
const observer = yield* Ref.get(observerSeen);
|
|
116
|
-
// Target only saw the first PROP_TEST_CANCEL_AT frames before
|
|
117
|
-
// Stream.take cancelled its subscription.
|
|
118
|
-
expect(target.length).toBe(PROP_TEST_CANCEL_AT);
|
|
119
|
-
for (const idx of target) {
|
|
120
|
-
expect(idx).toBeLessThan(PROP_TEST_CANCEL_AT);
|
|
121
|
-
}
|
|
122
|
-
// Observer (never cancelled) saw every frame.
|
|
123
|
-
expect(observer.length).toBe(PROP_TEST_FRAME_COUNT);
|
|
124
|
-
})));
|
|
125
|
-
it("unregister between frames doesn't affect prior dispatches", () => Effect.runPromise(Effect.gen(function* () {
|
|
126
|
-
// This test confirms a sequential property — dispatch frameN, then
|
|
127
|
-
// interrupt s2 BETWEEN dispatches, then dispatch frameN+1 — and
|
|
128
|
-
// observes that s2 received frameN (because it was registered) and
|
|
129
|
-
// did NOT receive frameN+1 (because the snapshot at the start of
|
|
130
|
-
// frameN+1's dispatch excludes the now-unregistered s2). Note that
|
|
131
|
-
// there is NO concurrent interleaving here: every step completes
|
|
132
|
-
// before the next begins. True mid-dispatch interleaving is
|
|
133
|
-
// exercised by the "in-flight dispatch is NOT interrupted by an
|
|
134
|
-
// unregister that commits during frame N" test below.
|
|
135
|
-
const registry = yield* makeSubscriberRegistry();
|
|
136
|
-
const receivedByS2 = yield* Ref.make([]);
|
|
137
|
-
const s1Fiber = yield* Effect.fork(subscribe(registry, PresenceChangedNotificationDefinition).pipe(Stream.runDrain, Effect.catchAll(() => Effect.void)));
|
|
138
|
-
const s3Fiber = yield* Effect.fork(subscribe(registry, PresenceChangedNotificationDefinition).pipe(Stream.runDrain, Effect.catchAll(() => Effect.void)));
|
|
139
|
-
const s2Stream = subscribe(registry, PresenceChangedNotificationDefinition);
|
|
140
|
-
const s2Fiber = yield* Effect.fork(s2Stream.pipe(Stream.runForEach((frame) => Ref.update(receivedByS2, (xs) => [
|
|
141
|
-
...xs,
|
|
142
|
-
Number(frame.params.agentId.slice("agent-".length)),
|
|
143
|
-
])), Effect.catchAll(() => Effect.void)));
|
|
144
|
-
// Single-tick yield so every forked consumer's Stream.async
|
|
145
|
-
// register callback commits before the first dispatch reads
|
|
146
|
-
// the snapshot. Deterministic — see file header (P2-2 r1).
|
|
147
|
-
yield* Effect.yieldNow();
|
|
148
|
-
yield* registry.dispatch(decodedPresence(0));
|
|
149
|
-
// Drain s2's onFrame Effect into receivedByS2 deterministically.
|
|
150
|
-
yield* Effect.yieldNow();
|
|
151
|
-
// Interrupt s2's consumer; Stream finalizer runs `unregister`
|
|
152
|
-
// synchronously. Subsequent dispatch's snapshot must exclude s2.
|
|
153
|
-
yield* Fiber.interrupt(s2Fiber);
|
|
154
|
-
yield* registry.dispatch(decodedPresence(1));
|
|
155
|
-
yield* Effect.yieldNow();
|
|
156
|
-
const seen = yield* Ref.get(receivedByS2);
|
|
157
|
-
expect(seen).toEqual([0]);
|
|
158
|
-
// Tidy up sibling fibers.
|
|
159
|
-
yield* registry.closeAll;
|
|
160
|
-
yield* Fiber.join(s1Fiber);
|
|
161
|
-
yield* Fiber.join(s3Fiber);
|
|
162
|
-
})));
|
|
163
|
-
it("in-flight dispatch is NOT interrupted by an unregister that commits during frame N", () => Effect.runPromise(Effect.gen(function* () {
|
|
164
|
-
// True mid-dispatch interleaving — distinguishes the snapshot
|
|
165
|
-
// semantic from a live-list-iteration semantic (which would skip
|
|
166
|
-
// the unregistered subscriber).
|
|
167
|
-
//
|
|
168
|
-
// Method: register two subscribers directly via the registry API
|
|
169
|
-
// so we control the dispatch fiber's progress mid-handler. s1's
|
|
170
|
-
// handler parks the dispatcher on a `Deferred` inside onFrame.
|
|
171
|
-
// While parked, we call `s2.unregister` synchronously — mutating
|
|
172
|
-
// `subsRef`. We then release s1; the dispatcher continues to s2
|
|
173
|
-
// (per its captured snapshot) and invokes `s2.onFrame`. If the
|
|
174
|
-
// dispatcher iterated the LIVE list, s2 would have been skipped
|
|
175
|
-
// and `s2Received` would still be empty.
|
|
176
|
-
//
|
|
177
|
-
// (Stream-API end-to-end coverage is exercised by tests #1 and
|
|
178
|
-
// the closeAll lifecycle test #4; here we need the registry's
|
|
179
|
-
// direct API to control dispatch ordering deterministically.)
|
|
180
|
-
const registry = yield* makeSubscriberRegistry();
|
|
181
|
-
const enteredS1 = yield* Deferred.make();
|
|
182
|
-
const releaseS1 = yield* Deferred.make();
|
|
183
|
-
const s2Received = yield* Ref.make([]);
|
|
184
|
-
yield* registry.register(PresenceChangedNotificationDefinition, undefined, {
|
|
185
|
-
onFrame: () => Effect.gen(function* () {
|
|
186
|
-
yield* Deferred.succeed(enteredS1, void 0);
|
|
187
|
-
yield* Deferred.await(releaseS1);
|
|
188
|
-
}),
|
|
189
|
-
onClose: () => Effect.void,
|
|
190
|
-
});
|
|
191
|
-
const s2Handle = yield* registry.register(PresenceChangedNotificationDefinition, undefined, {
|
|
192
|
-
onFrame: (frame) => Ref.update(s2Received, (xs) => [
|
|
193
|
-
...xs,
|
|
194
|
-
Number(frame.params.agentId.slice("agent-".length)),
|
|
195
|
-
]),
|
|
196
|
-
onClose: () => Effect.void,
|
|
197
|
-
});
|
|
198
|
-
// Fork dispatch. Snapshot at fork time has both s1 and s2.
|
|
199
|
-
const dispatchFiber = yield* Effect.fork(registry.dispatch(decodedPresence(0)));
|
|
200
|
-
// Wait until s1's handler enters (dispatch is parked mid-flight).
|
|
201
|
-
yield* Deferred.await(enteredS1);
|
|
202
|
-
// Unregister s2 NOW — concurrently with the parked dispatch.
|
|
203
|
-
// Mutates subsRef; in-flight snapshot is unaffected.
|
|
204
|
-
yield* s2Handle.unregister;
|
|
205
|
-
// Release s1; dispatch proceeds to s2 per its snapshot.
|
|
206
|
-
yield* Deferred.succeed(releaseS1, void 0);
|
|
207
|
-
yield* Fiber.join(dispatchFiber);
|
|
208
|
-
const observed = yield* Ref.get(s2Received);
|
|
209
|
-
// Snapshot semantic: s2 was in the snapshot, so its onFrame fires
|
|
210
|
-
// even though it was unregistered while dispatch was mid-flight.
|
|
211
|
-
expect(observed).toEqual([0]);
|
|
212
|
-
// Sanity: confirm s2's unregister DID commit to subsRef — a
|
|
213
|
-
// subsequent dispatch must NOT deliver to s2.
|
|
214
|
-
yield* registry.dispatch(decodedPresence(1));
|
|
215
|
-
expect(yield* Ref.get(s2Received)).toEqual([0]);
|
|
216
|
-
yield* registry.closeAll;
|
|
217
|
-
})));
|
|
218
|
-
it("closeAll terminates in-flight Streams with NotConnectedError", () => Effect.runPromise(Effect.gen(function* () {
|
|
219
|
-
const registry = yield* makeSubscriberRegistry();
|
|
220
|
-
const fiber = yield* Effect.fork(subscribe(registry, MessageReceivedNotificationDefinition).pipe(Stream.runDrain));
|
|
221
|
-
// Deterministic single-tick yield so the Stream materialises its
|
|
222
|
-
// subscription (Stream.async register callback runs synchronously
|
|
223
|
-
// inside Stream.runDrain's setup on the forked fiber's first turn)
|
|
224
|
-
// before we call closeAll. P2-2 r1 cleanup.
|
|
225
|
-
yield* Effect.yieldNow();
|
|
226
|
-
yield* registry.closeAll;
|
|
227
|
-
const exit = yield* Fiber.await(fiber);
|
|
228
|
-
const failure = Exit.causeOption(exit).pipe(Option.flatMap(Cause.failureOption));
|
|
229
|
-
// Verify the typed failure was NotConnectedError, not a defect.
|
|
230
|
-
const ok = Option.match(failure, {
|
|
231
|
-
onNone: () => false,
|
|
232
|
-
onSome: (e) => e instanceof NotConnectedError,
|
|
233
|
-
});
|
|
234
|
-
expect(ok).toBe(true);
|
|
235
|
-
})));
|
|
236
|
-
it("subscribeAll receives every notification regardless of definition", () => Effect.runPromise(Effect.gen(function* () {
|
|
237
|
-
const registry = yield* makeSubscriberRegistry();
|
|
238
|
-
const observed = yield* Ref.make([]);
|
|
239
|
-
const fiber = yield* Effect.fork(subscribeAll(registry).pipe(Stream.runForEach((frame) => Ref.update(observed, (xs) => [
|
|
240
|
-
...xs,
|
|
241
|
-
frame.definition.name,
|
|
242
|
-
])), Effect.catchAll(() => Effect.void)));
|
|
243
|
-
// Single-tick yield ensures the forked subscribeAll consumer's
|
|
244
|
-
// register callback commits before dispatch reads the snapshot
|
|
245
|
-
// (P2-2 r1).
|
|
246
|
-
yield* Effect.yieldNow();
|
|
247
|
-
yield* registry.dispatch(decodedPresence(0));
|
|
248
|
-
yield* registry.dispatch(decodedMessageReceived());
|
|
249
|
-
// Drain the consumer's onFrame Effect into `observed` before
|
|
250
|
-
// closing — deterministic single-tick.
|
|
251
|
-
yield* Effect.yieldNow();
|
|
252
|
-
yield* registry.closeAll;
|
|
253
|
-
yield* Fiber.join(fiber);
|
|
254
|
-
const names = yield* Ref.get(observed);
|
|
255
|
-
expect(names).toEqual([
|
|
256
|
-
PresenceChangedNotificationDefinition.name,
|
|
257
|
-
MessageReceivedNotificationDefinition.name,
|
|
258
|
-
]);
|
|
259
|
-
})));
|
|
260
|
-
});
|
|
261
|
-
//# sourceMappingURL=snapshot-semantics.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-semantics.test.js","sourceRoot":"","sources":["../../../src/notification/__tests__/snapshot-semantics.test.ts"],"names":[],"mappings":"AAAA,uUAAuU;AAEvU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6CG;AACH,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EACL,KAAK,EACL,QAAQ,EACR,MAAM,EACN,IAAI,EACJ,KAAK,EACL,MAAM,EACN,GAAG,EACH,MAAM,GACP,MAAM,QAAQ,CAAC;A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,KAAK,CAAC,UAAwC,CAAC,IAAI;SACrD,CAAC,CACH,EACD,MAAM,CAAC,QAAQ,CAAC,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,CACnC,CACF,CAAC;QAEF,+DAA+D;QAC/D,+DAA+D;QAC/D,aAAa;QACb,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC;QAC7C,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CACtB,sBAAsB,EAAoD,CAC3E,CAAC;QAEF,6DAA6D;QAC7D,uCAAuC;QACvC,KAAK,CAAC,CAAC,MAAM,CAAC,QAAQ,EAAE,CAAC;QACzB,KAAK,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC;QACzB,KAAK,CAAC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;QAEzB,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvC,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YACpB,qCAAqC,CAAC,IAAI;YAC1C,qCAAqC,CAAC,IAAI;SAC3C,CAAC,CAAC;IACL,CAAC,CAAC,CACH,CAAC,CAAC;AACP,CAAC,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-semantics.types-check.d.ts","sourceRoot":"","sources":["../../../src/notification/__tests__/snapshot-semantics.types-check.ts"],"names":[],"mappings":"AAkLA,QAAA,MAAM,yBAAyB,EAAE,OAAsB,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Type-canary for AD1 (architect-decision: trust `Stream.runForEach`
|
|
3
|
-
* cancellation to preserve spec #222 §5.3 OQ-3 snapshot semantics).
|
|
4
|
-
*
|
|
5
|
-
* Compile-time assertions only — this file is referenced by `tsc --build`
|
|
6
|
-
* (via the package's vitest config glob) but has no runtime test bodies.
|
|
7
|
-
* Any drift in `subscribe` / `subscribeAll` public signatures, or in the
|
|
8
|
-
* Stream lifecycle contract, surfaces as a TypeScript error here.
|
|
9
|
-
*
|
|
10
|
-
* **DO NOT delete this file** without first updating spec #596 AD1 and
|
|
11
|
-
* the architect plan at issue #604.
|
|
12
|
-
*
|
|
13
|
-
* **Architect stub** (Spec B): canaries probe the architect-stubbed
|
|
14
|
-
* `subscribe` / `subscribeAll` signatures in `../stream.ts`. Impl-staff
|
|
15
|
-
* preserves the canary shapes and re-targets them at
|
|
16
|
-
* `MoltZapAgentClient.prototype.subscribe` / `.subscribeAll` once the
|
|
17
|
-
* methods are wired.
|
|
18
|
-
*/
|
|
19
|
-
import { Stream } from "effect";
|
|
20
|
-
import { subscribe, subscribeAll } from "../stream.js";
|
|
21
|
-
// Phantom value-level pin: passing a Canary alias forces tsc to resolve
|
|
22
|
-
// the alias; a `false` resolution fires TS2344 because `false` is not
|
|
23
|
-
// assignable to the `true` constraint.
|
|
24
|
-
function assertCanary() {
|
|
25
|
-
// intentionally empty: type-level pin
|
|
26
|
-
}
|
|
27
|
-
import { PresenceChangedNotificationDefinition } from "@moltzap/protocol";
|
|
28
|
-
const _canary1bStream = subscribe(_canary1bRegistry, PresenceChangedNotificationDefinition, _canary1bIsOnline);
|
|
29
|
-
// P3 #612 fix: ground Canary #3 in the ACTUAL return type of a real
|
|
30
|
-
// `Stream.runForEach(_subStreamForCanary, _handlerForCanary)` call,
|
|
31
|
-
// not a manually-reconstructed `Effect<…, E, R>` inferred from the
|
|
32
|
-
// Stream's own type parameters (which would be a tautology). Calling
|
|
33
|
-
// `runForEach` and capturing the return type forces TypeScript to
|
|
34
|
-
// resolve the overloads using the real Stream value's signature.
|
|
35
|
-
const _ad1Canary3Helper = () => Stream.runForEach(_subStreamForCanary, _handlerForCanary);
|
|
36
|
-
// Phantom value-level call sites: pin each Canary alias as used and let
|
|
37
|
-
// knip/oxlint see the file as fully reachable. tsc never invokes
|
|
38
|
-
// `_ad1Canaries`; the canary alias resolutions happen at type-check
|
|
39
|
-
// time inside the function body.
|
|
40
|
-
function _ad1Canaries() {
|
|
41
|
-
assertCanary();
|
|
42
|
-
assertCanary();
|
|
43
|
-
assertCanary();
|
|
44
|
-
assertCanary();
|
|
45
|
-
assertCanary();
|
|
46
|
-
// Force the runtime-shape value declarations to be used (otherwise
|
|
47
|
-
// tsc warns even on `declare const`). Also exercises a real call
|
|
48
|
-
// into Stream.runForEach to keep Canary #3's premise grounded.
|
|
49
|
-
Stream.runForEach(_subStreamForCanary, _handlerForCanary);
|
|
50
|
-
_ad1Canary3Helper();
|
|
51
|
-
// Touch `_canary1bStream` so tsc keeps the canary-call expression
|
|
52
|
-
// alive (the `Equal<>` assertion + the assignment below force the
|
|
53
|
-
// overload to resolve at compile time).
|
|
54
|
-
const _touch1b = _canary1bStream;
|
|
55
|
-
if (false)
|
|
56
|
-
_touch1b;
|
|
57
|
-
}
|
|
58
|
-
// Discard return so module-level `_ad1Canaries` is read; an assignment
|
|
59
|
-
// to `_` satisfies the linter without invoking the function.
|
|
60
|
-
const _adhoc_phantom_canary_ref = _ad1Canaries;
|
|
61
|
-
export { _adhoc_phantom_canary_ref };
|
|
62
|
-
//# sourceMappingURL=snapshot-semantics.types-check.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"snapshot-semantics.types-check.js","sourceRoot":"","sources":["../../../src/notification/__tests__/snapshot-semantics.types-check.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQhC,OAAO,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAQvD,wEAAwE;AACxE,sEAAsE;AACtE,uCAAuC;AACvC,SAAS,YAAY;IACnB,sCAAsC;AACxC,CAAC;AA2CD,OAAO,EAAE,qCAAqC,EAAE,MAAM,mBAAmB,CAAC;AAS1E,MAAM,eAAe,GAAG,SAAS,CAC/B,iBAAiB,EACjB,qCAAqC,EACrC,iBAAiB,CAClB,CAAC;AAsCF,oEAAoE;AACpE,oEAAoE;AACpE,mEAAmE;AACnE,qEAAqE;AACrE,kEAAkE;AAClE,iEAAiE;AACjE,MAAM,iBAAiB,GAAG,GAAG,EAAE,CAC7B,MAAM,CAAC,UAAU,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;AAe5D,wEAAwE;AACxE,iEAAiE;AACjE,oEAAoE;AACpE,iCAAiC;AACjC,SAAS,YAAY;IACnB,YAAY,EAAmC,CAAC;IAChD,YAAY,EAAsC,CAAC;IACnD,YAAY,EAAmC,CAAC;IAChD,YAAY,EAA6C,CAAC;IAC1D,YAAY,EAA6B,CAAC;IAC1C,mEAAmE;IACnE,iEAAiE;IACjE,+DAA+D;IAC/D,MAAM,CAAC,UAAU,CAAC,mBAAmB,EAAE,iBAAiB,CAAC,CAAC;IAC1D,iBAAiB,EAAE,CAAC;IACpB,kEAAkE;IAClE,kEAAkE;IAClE,wCAAwC;IACxC,MAAM,QAAQ,GAA2B,eAAe,CAAC;IACzD,IAAI,KAAgB;QAAE,QAAQ,CAAC;AACjC,CAAC;AACD,uEAAuE;AACvE,6DAA6D;AAC7D,MAAM,yBAAyB,GAAY,YAAY,CAAC;AACxD,OAAO,EAAE,yBAAyB,EAAE,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.test.d.ts","sourceRoot":"","sources":["../src/pagination.test.ts"],"names":[],"mappings":""}
|
package/dist/pagination.test.js
DELETED
|
@@ -1,72 +0,0 @@
|
|
|
1
|
-
import { it as effectIt } from "@effect/vitest";
|
|
2
|
-
import { describe, expect } from "vitest";
|
|
3
|
-
import { Effect } from "effect";
|
|
4
|
-
const it = effectIt.effect;
|
|
5
|
-
import { ContactsList, } from "@moltzap/protocol";
|
|
6
|
-
import { drainPaginatedList, NonAdvancingCursorError, } from "./pagination.js";
|
|
7
|
-
// The drainer is wire-generic; we exercise it through `contacts/list`
|
|
8
|
-
// because its result is the `{ contacts: T[], nextCursor? }` shape the
|
|
9
|
-
// drain enumerates. The fake `sendRpc` never fails (`SendRpcFn<never>`),
|
|
10
|
-
// so the ONLY error channel left is the cursor-cycle guard — keeping the
|
|
11
|
-
// non-advancing assertion non-vacuous.
|
|
12
|
-
const PAGE_SIZE = 2;
|
|
13
|
-
const TOTAL = 5;
|
|
14
|
-
const EXPECTED_PAGE_CALLS = Math.ceil(TOTAL / PAGE_SIZE);
|
|
15
|
-
const CONSTANT_CURSOR = "stuck-cursor";
|
|
16
|
-
const ALL_CONTACTS = Array.from({ length: TOTAL }, (_unused, i) => ({ id: `contact-${i}` }));
|
|
17
|
-
// Keyset paging over an opaque cursor: the cursor encodes the index of
|
|
18
|
-
// the first row of the NEXT page. `nextCursor` present iff more rows
|
|
19
|
-
// remain (Invariant 1: a present cursor means a further page exists).
|
|
20
|
-
function pagingSendRpc() {
|
|
21
|
-
let calls = 0;
|
|
22
|
-
const send = ((_definition, params) => {
|
|
23
|
-
calls++;
|
|
24
|
-
const cursor = params.cursor;
|
|
25
|
-
const start = cursor === undefined ? 0 : Number(cursor);
|
|
26
|
-
const slice = ALL_CONTACTS.slice(start, start + PAGE_SIZE);
|
|
27
|
-
const nextStart = start + PAGE_SIZE;
|
|
28
|
-
const hasMore = nextStart < ALL_CONTACTS.length;
|
|
29
|
-
return Effect.succeed((hasMore
|
|
30
|
-
? { contacts: slice, nextCursor: String(nextStart) }
|
|
31
|
-
: { contacts: slice }));
|
|
32
|
-
});
|
|
33
|
-
return { send, callCount: () => calls };
|
|
34
|
-
}
|
|
35
|
-
// Byzantine server: always claims "more" with the SAME cursor — the
|
|
36
|
-
// drain must terminate via the cycle guard rather than loop forever.
|
|
37
|
-
function nonAdvancingSendRpc() {
|
|
38
|
-
let calls = 0;
|
|
39
|
-
const send = ((_definition, _params) => {
|
|
40
|
-
calls++;
|
|
41
|
-
return Effect.succeed({
|
|
42
|
-
contacts: ALL_CONTACTS.slice(0, PAGE_SIZE),
|
|
43
|
-
nextCursor: CONSTANT_CURSOR,
|
|
44
|
-
});
|
|
45
|
-
});
|
|
46
|
-
return { send, callCount: () => calls };
|
|
47
|
-
}
|
|
48
|
-
function contactId(c) {
|
|
49
|
-
return c.id;
|
|
50
|
-
}
|
|
51
|
-
const EXPECTED_IDS = ALL_CONTACTS.map(contactId);
|
|
52
|
-
describe("drainPaginatedList", () => {
|
|
53
|
-
it("drains every page, following nextCursor to the tail", () => Effect.gen(function* () {
|
|
54
|
-
const fake = pagingSendRpc();
|
|
55
|
-
const contacts = yield* drainPaginatedList(fake.send, ContactsList, "contacts");
|
|
56
|
-
expect(contacts).toHaveLength(TOTAL);
|
|
57
|
-
const ids = contacts.map(contactId);
|
|
58
|
-
expect(ids).toEqual(EXPECTED_IDS);
|
|
59
|
-
// One RPC call per page — no over-fetch, no truncation.
|
|
60
|
-
expect(fake.callCount()).toBe(EXPECTED_PAGE_CALLS);
|
|
61
|
-
}));
|
|
62
|
-
it("fails with NonAdvancingCursorError on a repeated cursor (cycle guard)", () => Effect.gen(function* () {
|
|
63
|
-
const fake = nonAdvancingSendRpc();
|
|
64
|
-
const error = yield* drainPaginatedList(fake.send, ContactsList, "contacts").pipe(Effect.flip);
|
|
65
|
-
expect(error).toBeInstanceOf(NonAdvancingCursorError);
|
|
66
|
-
expect(error.method).toBe(ContactsList.name);
|
|
67
|
-
// Page 1 records cursor C; page 2 (sent with cursor=C) returns C
|
|
68
|
-
// again → already seen → typed fail. Bounded at 2 calls, no loop.
|
|
69
|
-
expect(fake.callCount()).toBe(2);
|
|
70
|
-
}));
|
|
71
|
-
});
|
|
72
|
-
//# sourceMappingURL=pagination.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.test.js","sourceRoot":"","sources":["../src/pagination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AM,QAAQ,GAAG,KAAK,CAAC,CAAC,kBAAkB,CACxC,IAAI,CAAC,IAAI,EACT,YAAY,EACZ,UAAU,CACX,CAAC;QACF,MAAM,CAAC,QAAQ,CAAC,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC;QACrC,MAAM,GAAG,GAAI,QAAuC,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC;QACpE,MAAM,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC;QAClC,wDAAwD;QACxD,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,mBAAmB,CAAC,CAAC;IACrD,CAAC,CAAC,CAAC,CAAC;IAEN,EAAE,CAAC,uEAAuE,EAAE,GAAG,EAAE,CAC/E,MAAM,CAAC,GAAG,CAAC,QAAQ,CAAC;QAClB,MAAM,IAAI,GAAG,mBAAmB,EAAE,CAAC;QACnC,MAAM,KAAK,GAAG,KAAK,CAAC,CAAC,kBAAkB,CACrC,IAAI,CAAC,IAAI,EACT,YAAY,EACZ,UAAU,CACX,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;QACpB,MAAM,CAAC,KAAK,CAAC,CAAC,cAAc,CAAC,uBAAuB,CAAC,CAAC;QACtD,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,IAAI,CAAC,CAAC;QAC7C,iEAAiE;QACjE,kEAAkE;QAClE,MAAM,CAAC,IAAI,CAAC,SAAS,EAAE,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IACnC,CAAC,CAAC,CAAC,CAAC;AACR,CAAC,CAAC,CAAC"}
|
|
@@ -1,84 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Close-metadata extraction for the WebSocket reader fiber.
|
|
3
|
-
*
|
|
4
|
-
* Responsibility: inspect an `Exit.Exit<void, Socket.SocketError>` produced by
|
|
5
|
-
* `Socket.runRaw(...)` and project it onto a caller-facing `CloseInfo`
|
|
6
|
-
* (WebSocket `{code, reason}`). Spec #222 AC 5.4 requires the real close
|
|
7
|
-
* metadata, not hardcoded constants, when upstream surfaces it; OQ-5 names
|
|
8
|
-
* the defaults to synthesize when it does not.
|
|
9
|
-
*
|
|
10
|
-
* Pure module: no I/O, no Refs, no fibers. Called exactly once per socket
|
|
11
|
-
* lifetime from `MoltZapAgentClient`'s reader-fiber `Effect.onExit` hook
|
|
12
|
-
* (`ws-client.ts:386-411` today — post-impl the extraction happens at that
|
|
13
|
-
* same point before calling `onDisconnect(close)`).
|
|
14
|
-
*
|
|
15
|
-
* Error channel: `extractCloseInfo` is total — every possible `Exit` maps to
|
|
16
|
-
* a `CloseInfo`. The defaults below are the resolution of OQ-5 (A). No
|
|
17
|
-
* typed error surface on this module.
|
|
18
|
-
*/
|
|
19
|
-
import { Cause, Data, Exit } from "effect";
|
|
20
|
-
import * as Socket from "@effect/platform/Socket";
|
|
21
|
-
/**
|
|
22
|
-
* WebSocket close metadata surfaced to `AgentClientOptions.onDisconnect`
|
|
23
|
-
* (required arg post-migration — see design doc §Deletions, OQ-6) and to
|
|
24
|
-
* the conformance-adapter's `RealClientCloseEvent`. Mirrors the WHATWG
|
|
25
|
-
* WebSocket `CloseEvent` fields restricted to `{code, reason}` — `wasClean`
|
|
26
|
-
* is derivable from `code` and not worth its own field.
|
|
27
|
-
*/
|
|
28
|
-
export interface CloseInfo {
|
|
29
|
-
readonly code: number;
|
|
30
|
-
readonly reason: string;
|
|
31
|
-
}
|
|
32
|
-
/**
|
|
33
|
-
* Discriminated shape the reader-fiber exit falls into. Implementation's
|
|
34
|
-
* `extractCloseInfo` pattern-matches this union and returns the `{code,
|
|
35
|
-
* reason}` projection. Named here so downstream review can check that
|
|
36
|
-
* every branch has an assigned close pair.
|
|
37
|
-
*
|
|
38
|
-
* Exhaustiveness (Principle 4): the `Unknown` branch is the residual for
|
|
39
|
-
* any `SocketError` variant `@effect/platform` adds in the future. The
|
|
40
|
-
* implementation's pattern-match ends in `default: return absurd(kind)`.
|
|
41
|
-
*/
|
|
42
|
-
export type CloseKind = Data.TaggedEnum<{
|
|
43
|
-
/** Graceful `SocketCloseError` — upstream code + reason round-tripped. */
|
|
44
|
-
Clean: {
|
|
45
|
-
readonly code: number;
|
|
46
|
-
readonly reason: string;
|
|
47
|
-
};
|
|
48
|
-
/** `Exit.Success` with no close frame observed — socket ended cleanly. */
|
|
49
|
-
EndOfStream: {};
|
|
50
|
-
/** `SocketGenericError` with reason "Open" / "OpenTimeout". */
|
|
51
|
-
HandshakeFailure: {
|
|
52
|
-
readonly underlying: "Open" | "OpenTimeout";
|
|
53
|
-
};
|
|
54
|
-
/** `SocketGenericError` with reason "Read" / "Write" — transport broke. */
|
|
55
|
-
TransportFailure: {
|
|
56
|
-
readonly underlying: "Read" | "Write";
|
|
57
|
-
};
|
|
58
|
-
/** Cause did not match any known `SocketError` shape. */
|
|
59
|
-
Unknown: {};
|
|
60
|
-
}>;
|
|
61
|
-
/**
|
|
62
|
-
* OQ-5 resolution defaults. Exported so the implementation, tests, and
|
|
63
|
-
* the conformance-adapter's V7 proof share one source of truth.
|
|
64
|
-
*/
|
|
65
|
-
export declare const DEFAULT_GRACEFUL_CLOSE: CloseInfo;
|
|
66
|
-
export declare const DEFAULT_ABNORMAL_CLOSE: CloseInfo;
|
|
67
|
-
/**
|
|
68
|
-
* Classify a reader-fiber exit cause into `CloseKind`. Total; the
|
|
69
|
-
* `Unknown` branch is the residual for future `SocketError` variants.
|
|
70
|
-
*
|
|
71
|
-
* Logic:
|
|
72
|
-
* 1. If the cause carries a `SocketCloseError` failure (reason ===
|
|
73
|
-
* "Close"), surface its `code` + `closeReason` as `Clean`.
|
|
74
|
-
* 2. If it carries a `SocketGenericError`, branch on `reason`:
|
|
75
|
-
* - "Open" / "OpenTimeout" → `HandshakeFailure`
|
|
76
|
-
* - "Read" / "Write" → `TransportFailure`
|
|
77
|
-
* 3. Anything else (interrupt, unknown defect, no failure) →
|
|
78
|
-
* `Unknown`. The caller (`extractCloseInfo`) maps this to the
|
|
79
|
-
* OQ-5 abnormal default.
|
|
80
|
-
*/
|
|
81
|
-
export declare function classifyCloseCause(cause: Cause.Cause<Socket.SocketError>): CloseKind;
|
|
82
|
-
/** Projects an `Exit` onto `CloseInfo`. */
|
|
83
|
-
export declare function extractCloseInfo(exit: Exit.Exit<void, Socket.SocketError>): CloseInfo;
|
|
84
|
-
//# sourceMappingURL=close-info.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"close-info.d.ts","sourceRoot":"","sources":["../../src/runtime/close-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AAElD;;;;;;GAMG;AACH,MAAM,WAAW,SAAS;IACxB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;GASG;AACH,MAAM,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC;IACtC,0EAA0E;IAC1E,KAAK,EAAE;QACL,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;QACtB,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,0EAA0E;IAC1E,WAAW,EAAE,EAAE,CAAC;IAChB,+DAA+D;IAC/D,gBAAgB,EAAE;QAChB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,aAAa,CAAC;KAC7C,CAAC;IACF,2EAA2E;IAC3E,gBAAgB,EAAE;QAChB,QAAQ,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC;KACvC,CAAC;IACF,yDAAyD;IACzD,OAAO,EAAE,EAAE,CAAC;CACb,CAAC,CAAC;AAIH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,SAGpC,CAAC;AACF,eAAO,MAAM,sBAAsB,EAAE,SAGpC,CAAC;AAOF;;;;;;;;;;;;;GAaG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,WAAW,CAAC,GACrC,SAAS,CAMX;AA4BD,2CAA2C;AAC3C,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,IAAI,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,WAAW,CAAC,GACxC,SAAS,CAiBX"}
|
|
@@ -1,102 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Close-metadata extraction for the WebSocket reader fiber.
|
|
3
|
-
*
|
|
4
|
-
* Responsibility: inspect an `Exit.Exit<void, Socket.SocketError>` produced by
|
|
5
|
-
* `Socket.runRaw(...)` and project it onto a caller-facing `CloseInfo`
|
|
6
|
-
* (WebSocket `{code, reason}`). Spec #222 AC 5.4 requires the real close
|
|
7
|
-
* metadata, not hardcoded constants, when upstream surfaces it; OQ-5 names
|
|
8
|
-
* the defaults to synthesize when it does not.
|
|
9
|
-
*
|
|
10
|
-
* Pure module: no I/O, no Refs, no fibers. Called exactly once per socket
|
|
11
|
-
* lifetime from `MoltZapAgentClient`'s reader-fiber `Effect.onExit` hook
|
|
12
|
-
* (`ws-client.ts:386-411` today — post-impl the extraction happens at that
|
|
13
|
-
* same point before calling `onDisconnect(close)`).
|
|
14
|
-
*
|
|
15
|
-
* Error channel: `extractCloseInfo` is total — every possible `Exit` maps to
|
|
16
|
-
* a `CloseInfo`. The defaults below are the resolution of OQ-5 (A). No
|
|
17
|
-
* typed error surface on this module.
|
|
18
|
-
*/
|
|
19
|
-
import { Cause, Data, Exit } from "effect";
|
|
20
|
-
import * as Socket from "@effect/platform/Socket";
|
|
21
|
-
const CloseKind = Data.taggedEnum();
|
|
22
|
-
/**
|
|
23
|
-
* OQ-5 resolution defaults. Exported so the implementation, tests, and
|
|
24
|
-
* the conformance-adapter's V7 proof share one source of truth.
|
|
25
|
-
*/
|
|
26
|
-
export const DEFAULT_GRACEFUL_CLOSE = {
|
|
27
|
-
code: 1000,
|
|
28
|
-
reason: "normal",
|
|
29
|
-
};
|
|
30
|
-
export const DEFAULT_ABNORMAL_CLOSE = {
|
|
31
|
-
code: 1006,
|
|
32
|
-
reason: "abnormal",
|
|
33
|
-
};
|
|
34
|
-
/** Exhaustiveness sentinel for `CloseKind` switches (Principle 4). */
|
|
35
|
-
function absurd(x) {
|
|
36
|
-
throw new Error(`unreachable CloseKind branch: ${JSON.stringify(x)}`);
|
|
37
|
-
}
|
|
38
|
-
/**
|
|
39
|
-
* Classify a reader-fiber exit cause into `CloseKind`. Total; the
|
|
40
|
-
* `Unknown` branch is the residual for future `SocketError` variants.
|
|
41
|
-
*
|
|
42
|
-
* Logic:
|
|
43
|
-
* 1. If the cause carries a `SocketCloseError` failure (reason ===
|
|
44
|
-
* "Close"), surface its `code` + `closeReason` as `Clean`.
|
|
45
|
-
* 2. If it carries a `SocketGenericError`, branch on `reason`:
|
|
46
|
-
* - "Open" / "OpenTimeout" → `HandshakeFailure`
|
|
47
|
-
* - "Read" / "Write" → `TransportFailure`
|
|
48
|
-
* 3. Anything else (interrupt, unknown defect, no failure) →
|
|
49
|
-
* `Unknown`. The caller (`extractCloseInfo`) maps this to the
|
|
50
|
-
* OQ-5 abnormal default.
|
|
51
|
-
*/
|
|
52
|
-
export function classifyCloseCause(cause) {
|
|
53
|
-
for (const failure of Cause.failures(cause)) {
|
|
54
|
-
const kind = classifySocketFailure(failure);
|
|
55
|
-
if (kind !== null)
|
|
56
|
-
return kind;
|
|
57
|
-
}
|
|
58
|
-
return CloseKind.Unknown();
|
|
59
|
-
}
|
|
60
|
-
function classifySocketFailure(failure) {
|
|
61
|
-
if (Socket.SocketCloseError.is(failure)) {
|
|
62
|
-
return CloseKind.Clean({
|
|
63
|
-
code: failure.code,
|
|
64
|
-
reason: failure.closeReason ?? "",
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
if (!Socket.isSocketError(failure))
|
|
68
|
-
return null;
|
|
69
|
-
return classifyGenericSocketError(failure);
|
|
70
|
-
}
|
|
71
|
-
function classifyGenericSocketError(failure) {
|
|
72
|
-
switch (failure.reason) {
|
|
73
|
-
case "Open":
|
|
74
|
-
case "OpenTimeout":
|
|
75
|
-
return CloseKind.HandshakeFailure({ underlying: failure.reason });
|
|
76
|
-
case "Read":
|
|
77
|
-
case "Write":
|
|
78
|
-
return CloseKind.TransportFailure({ underlying: failure.reason });
|
|
79
|
-
default:
|
|
80
|
-
return CloseKind.Unknown();
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
/** Projects an `Exit` onto `CloseInfo`. */
|
|
84
|
-
export function extractCloseInfo(exit) {
|
|
85
|
-
if (Exit.isSuccess(exit)) {
|
|
86
|
-
return DEFAULT_GRACEFUL_CLOSE;
|
|
87
|
-
}
|
|
88
|
-
const kind = classifyCloseCause(exit.cause);
|
|
89
|
-
switch (kind._tag) {
|
|
90
|
-
case "Clean":
|
|
91
|
-
return { code: kind.code, reason: kind.reason };
|
|
92
|
-
case "EndOfStream":
|
|
93
|
-
return DEFAULT_GRACEFUL_CLOSE;
|
|
94
|
-
case "HandshakeFailure":
|
|
95
|
-
case "TransportFailure":
|
|
96
|
-
case "Unknown":
|
|
97
|
-
return DEFAULT_ABNORMAL_CLOSE;
|
|
98
|
-
default:
|
|
99
|
-
return absurd(kind);
|
|
100
|
-
}
|
|
101
|
-
}
|
|
102
|
-
//# sourceMappingURL=close-info.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"close-info.js","sourceRoot":"","sources":["../../src/runtime/close-info.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAC3C,OAAO,KAAK,MAAM,MAAM,yBAAyB,CAAC;AA4ClD,MAAM,S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