@moltzap/client 2026.726.0 → 2026.730.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 -0
- package/dist/agent-client.d.ts.map +1 -1
- package/dist/agent-client.js +1 -0
- package/dist/agent-client.js.map +1 -1
- package/dist/app-client.d.ts +2 -0
- package/dist/app-client.d.ts.map +1 -1
- package/dist/app-client.js +1 -0
- package/dist/app-client.js.map +1 -1
- package/dist/auth.d.ts +7 -2
- package/dist/auth.d.ts.map +1 -1
- package/dist/auth.js +10 -5
- package/dist/auth.js.map +1 -1
- package/dist/channel-base/format-cross-conv.d.ts +8 -3
- package/dist/channel-base/format-cross-conv.d.ts.map +1 -1
- package/dist/channel-base/format-cross-conv.js +10 -9
- package/dist/channel-base/format-cross-conv.js.map +1 -1
- package/dist/channel-base/format-group-block.d.ts +9 -2
- package/dist/channel-base/format-group-block.d.ts.map +1 -1
- package/dist/channel-base/format-group-block.js +12 -7
- package/dist/channel-base/format-group-block.js.map +1 -1
- package/dist/channel-base/index.d.ts +8 -0
- package/dist/channel-base/index.d.ts.map +1 -1
- package/dist/channel-base/index.js +8 -0
- package/dist/channel-base/index.js.map +1 -1
- package/dist/channel-base/lease-guard.d.ts +6 -3
- package/dist/channel-base/lease-guard.d.ts.map +1 -1
- package/dist/channel-base/lease-guard.js +10 -4
- package/dist/channel-base/lease-guard.js.map +1 -1
- package/dist/channel-base/lease-store.d.ts +29 -10
- package/dist/channel-base/lease-store.d.ts.map +1 -1
- package/dist/channel-base/lease-store.js +33 -13
- package/dist/channel-base/lease-store.js.map +1 -1
- package/dist/channel-base/lease.d.ts +9 -1
- package/dist/channel-base/lease.d.ts.map +1 -1
- package/dist/channel-base/lease.js +16 -4
- package/dist/channel-base/lease.js.map +1 -1
- package/dist/channel-core-enrichment.d.ts +9 -2
- package/dist/channel-core-enrichment.d.ts.map +1 -1
- package/dist/channel-core-enrichment.js +17 -5
- package/dist/channel-core-enrichment.js.map +1 -1
- package/dist/channel-core-test-support.d.ts +46 -0
- package/dist/channel-core-test-support.d.ts.map +1 -1
- package/dist/channel-core-test-support.js +67 -13
- package/dist/channel-core-test-support.js.map +1 -1
- package/dist/channel-core.d.ts +37 -22
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +45 -38
- package/dist/channel-core.js.map +1 -1
- package/dist/cli/adapters.d.ts +4 -1
- package/dist/cli/adapters.d.ts.map +1 -1
- package/dist/cli/adapters.js +11 -4
- package/dist/cli/adapters.js.map +1 -1
- package/dist/cli/commands/agents.js +3 -3
- package/dist/cli/commands/contacts.d.ts +3 -3
- package/dist/cli/commands/contacts.d.ts.map +1 -1
- package/dist/cli/commands/contacts.js +13 -9
- package/dist/cli/commands/contacts.js.map +1 -1
- package/dist/cli/commands/conversations.d.ts +3 -2
- package/dist/cli/commands/conversations.d.ts.map +1 -1
- package/dist/cli/commands/conversations.js +7 -6
- package/dist/cli/commands/conversations.js.map +1 -1
- package/dist/cli/commands/messages.d.ts +6 -2
- package/dist/cli/commands/messages.d.ts.map +1 -1
- package/dist/cli/commands/messages.js +8 -5
- package/dist/cli/commands/messages.js.map +1 -1
- package/dist/cli/commands/register.d.ts +1 -1
- package/dist/cli/commands/register.js +4 -4
- package/dist/cli/commands/send.d.ts +7 -6
- package/dist/cli/commands/send.d.ts.map +1 -1
- package/dist/cli/commands/send.js +7 -6
- package/dist/cli/commands/send.js.map +1 -1
- package/dist/cli/commands/start.d.ts +15 -7
- package/dist/cli/commands/start.d.ts.map +1 -1
- package/dist/cli/commands/start.js +12 -5
- package/dist/cli/commands/start.js.map +1 -1
- package/dist/cli/commands/status.js +2 -2
- package/dist/cli/commands/test-transport.d.ts +9 -1
- package/dist/cli/commands/test-transport.d.ts.map +1 -1
- package/dist/cli/commands/test-transport.js +5 -1
- package/dist/cli/commands/test-transport.js.map +1 -1
- package/dist/cli/index.js +8 -7
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/output.d.ts +10 -0
- package/dist/cli/output.d.ts.map +1 -1
- package/dist/cli/output.js +10 -0
- package/dist/cli/output.js.map +1 -1
- package/dist/cli/socket-client.d.ts +13 -3
- package/dist/cli/socket-client.d.ts.map +1 -1
- package/dist/cli/socket-client.js +16 -5
- package/dist/cli/socket-client.js.map +1 -1
- package/dist/cli/transport.d.ts +16 -3
- package/dist/cli/transport.d.ts.map +1 -1
- package/dist/cli/transport.js +19 -6
- package/dist/cli/transport.js.map +1 -1
- package/dist/config.d.ts +15 -6
- package/dist/config.d.ts.map +1 -1
- package/dist/config.js +15 -5
- package/dist/config.js.map +1 -1
- package/dist/config.test-utils.d.ts +7 -2
- package/dist/config.test-utils.d.ts.map +1 -1
- package/dist/config.test-utils.js +8 -1
- package/dist/config.test-utils.js.map +1 -1
- package/dist/index.d.ts +3 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/local-daemon-rpc.d.ts +122 -99
- package/dist/local-daemon-rpc.d.ts.map +1 -1
- package/dist/local-daemon-rpc.js +128 -108
- package/dist/local-daemon-rpc.js.map +1 -1
- package/dist/local-history.d.ts +40 -20
- package/dist/local-history.d.ts.map +1 -1
- package/dist/local-history.js +45 -23
- package/dist/local-history.js.map +1 -1
- package/dist/local-paths.d.ts +17 -0
- package/dist/local-paths.d.ts.map +1 -1
- package/dist/local-paths.js +21 -4
- package/dist/local-paths.js.map +1 -1
- package/dist/local-socket-server.d.ts +13 -2
- package/dist/local-socket-server.d.ts.map +1 -1
- package/dist/local-socket-server.js +13 -2
- package/dist/local-socket-server.js.map +1 -1
- package/dist/message-rendering.d.ts +1 -0
- package/dist/message-rendering.d.ts.map +1 -1
- package/dist/message-rendering.js +1 -0
- package/dist/message-rendering.js.map +1 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts +50 -2
- package/dist/notification/__tests__/subscribe-signatures.types-check.d.ts.map +1 -1
- package/dist/notification/__tests__/subscribe-signatures.types-check.js +22 -48
- package/dist/notification/__tests__/subscribe-signatures.types-check.js.map +1 -1
- package/dist/notification/errors.d.ts +4 -2
- package/dist/notification/errors.d.ts.map +1 -1
- package/dist/notification/errors.js +3 -1
- package/dist/notification/errors.js.map +1 -1
- package/dist/notification/index.d.ts +1 -0
- package/dist/notification/index.d.ts.map +1 -1
- package/dist/notification/index.js +1 -0
- package/dist/notification/index.js.map +1 -1
- package/dist/notification/stream.d.ts +16 -9
- package/dist/notification/stream.d.ts.map +1 -1
- package/dist/notification/stream.js +5 -38
- package/dist/notification/stream.js.map +1 -1
- package/dist/pagination.d.ts +13 -16
- package/dist/pagination.d.ts.map +1 -1
- package/dist/pagination.js +9 -1
- package/dist/pagination.js.map +1 -1
- package/dist/profile.d.ts +21 -9
- package/dist/profile.d.ts.map +1 -1
- package/dist/profile.js +30 -16
- package/dist/profile.js.map +1 -1
- package/dist/refs.d.ts +9 -1
- package/dist/refs.d.ts.map +1 -1
- package/dist/refs.js +9 -1
- package/dist/refs.js.map +1 -1
- package/dist/service-archive-purge.d.ts +18 -0
- package/dist/service-archive-purge.d.ts.map +1 -1
- package/dist/service-archive-purge.js +18 -0
- package/dist/service-archive-purge.js.map +1 -1
- package/dist/service-event-trace.d.ts +15 -0
- package/dist/service-event-trace.d.ts.map +1 -0
- package/dist/service-event-trace.js +35 -0
- package/dist/service-event-trace.js.map +1 -0
- package/dist/service-helpers.d.ts +35 -6
- package/dist/service-helpers.d.ts.map +1 -1
- package/dist/service-helpers.js +38 -8
- package/dist/service-helpers.js.map +1 -1
- package/dist/service-local-daemon.d.ts +12 -2
- package/dist/service-local-daemon.d.ts.map +1 -1
- package/dist/service-local-daemon.js +38 -25
- package/dist/service-local-daemon.js.map +1 -1
- package/dist/service.d.ts +62 -23
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +138 -89
- package/dist/service.js.map +1 -1
- package/dist/test-utils/channel-service-fixture.d.ts +8 -1
- package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
- package/dist/test-utils/channel-service-fixture.js +31 -21
- package/dist/test-utils/channel-service-fixture.js.map +1 -1
- package/dist/test-utils/fake-service.d.ts +20 -7
- package/dist/test-utils/fake-service.d.ts.map +1 -1
- package/dist/test-utils/fake-service.js +20 -5
- package/dist/test-utils/fake-service.js.map +1 -1
- package/dist/test-utils/harness.d.ts +8 -4
- package/dist/test-utils/harness.d.ts.map +1 -1
- package/dist/test-utils/harness.js +3 -0
- package/dist/test-utils/harness.js.map +1 -1
- package/dist/test-utils/ids.d.ts +25 -0
- package/dist/test-utils/ids.d.ts.map +1 -1
- package/dist/test-utils/ids.js +27 -1
- package/dist/test-utils/ids.js.map +1 -1
- package/dist/test-utils/index.d.ts +7 -1
- package/dist/test-utils/index.d.ts.map +1 -1
- package/dist/test-utils/index.js +7 -1
- package/dist/test-utils/index.js.map +1 -1
- package/dist/test-utils/standalone-provisioning.d.ts +5 -0
- package/dist/test-utils/standalone-provisioning.d.ts.map +1 -1
- package/dist/test-utils/standalone-provisioning.js +3 -0
- package/dist/test-utils/standalone-provisioning.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +6 -6
|
@@ -58,6 +58,11 @@ export type LeaseInvalidProjectionError<E> = LeaseAlreadyConsumed | ForbiddenErr
|
|
|
58
58
|
* requires it and this function is synchronous (no Clock access). Callers
|
|
59
59
|
* either pass `Date.now()` directly or use `catchLeaseInvalid` which reads
|
|
60
60
|
* `Clock.currentTimeMillis` inside the Effect.
|
|
61
|
+
* @param err Value supplied to the operation.
|
|
62
|
+
* @param ctx Context for the operation.
|
|
63
|
+
* @param ctx.leaseId Value supplied to the operation.
|
|
64
|
+
* @param ctx.consumedAt Value supplied to the operation.
|
|
65
|
+
* @returns The project lease invalid result.
|
|
61
66
|
*/
|
|
62
67
|
export declare function projectLeaseInvalid(err: ForbiddenError, ctx: {
|
|
63
68
|
readonly leaseId?: string;
|
|
@@ -72,7 +77,7 @@ export declare function projectLeaseInvalid(err: ForbiddenError, ctx: {
|
|
|
72
77
|
* re-raised unchanged so downstream `mapError`s see the original
|
|
73
78
|
* `ForbiddenError`.
|
|
74
79
|
*
|
|
75
|
-
* Use at every channel's outbound `core.sendReply(...)` boundary
|
|
80
|
+
* Use at every channel's outbound `core.sendReply(...)` boundary:.
|
|
76
81
|
*
|
|
77
82
|
* ```ts
|
|
78
83
|
* core.sendReply(conv, text, { dispatchLeaseId: leaseId }).pipe(
|
|
@@ -80,6 +85,9 @@ export declare function projectLeaseInvalid(err: ForbiddenError, ctx: {
|
|
|
80
85
|
* // ... per-channel surfacing
|
|
81
86
|
* )
|
|
82
87
|
* ```
|
|
88
|
+
* @param ctx Context for the operation.
|
|
89
|
+
* @param ctx.leaseId Value supplied to the operation.
|
|
90
|
+
* @returns The catch lease invalid result.
|
|
83
91
|
*/
|
|
84
92
|
export declare function catchLeaseInvalid<A, E2, R>(ctx?: {
|
|
85
93
|
readonly leaseId?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lease.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAe,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;;;;AAEvD;;;;;;;;;GASG;AACH,qBAAa,oBAAqB,SAAQ,0BAExC;IACA,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;IACzB,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAC;IAC5B,QAAQ,CAAC,KAAK,EAAE,cAAc,CAAC;IAC/B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAEL;;;;;GAKG;AACH,MAAM,MAAM,2BAA2B,CAAC,CAAC,IACrC,oBAAoB,GACpB,cAAc,GACd,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"lease.d.ts","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;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) {
|
|
30
|
-
if (typeof data !== "object" || data === null)
|
|
30
|
+
if (typeof data !== "object" || data === null) {
|
|
31
31
|
return false;
|
|
32
|
-
|
|
32
|
+
}
|
|
33
|
+
const reason =
|
|
34
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */
|
|
35
|
+
data.reason;
|
|
33
36
|
return reason === "LeaseInvalid";
|
|
34
37
|
}
|
|
35
38
|
/**
|
|
@@ -50,10 +53,16 @@ function isLeaseInvalidData(data) {
|
|
|
50
53
|
* requires it and this function is synchronous (no Clock access). Callers
|
|
51
54
|
* either pass `Date.now()` directly or use `catchLeaseInvalid` which reads
|
|
52
55
|
* `Clock.currentTimeMillis` inside the Effect.
|
|
56
|
+
* @param err Value supplied to the operation.
|
|
57
|
+
* @param ctx Context for the operation.
|
|
58
|
+
* @param ctx.leaseId Value supplied to the operation.
|
|
59
|
+
* @param ctx.consumedAt Value supplied to the operation.
|
|
60
|
+
* @returns The project lease invalid result.
|
|
53
61
|
*/
|
|
54
62
|
export function projectLeaseInvalid(err, ctx) {
|
|
55
|
-
if (!isLeaseInvalidData(err.data))
|
|
63
|
+
if (!isLeaseInvalidData(err.data)) {
|
|
56
64
|
return err;
|
|
65
|
+
}
|
|
57
66
|
return new LeaseAlreadyConsumed({
|
|
58
67
|
leaseId: ctx.leaseId ?? LEASE_ID_FALLBACK,
|
|
59
68
|
consumedAt: ctx.consumedAt,
|
|
@@ -70,7 +79,7 @@ export function projectLeaseInvalid(err, ctx) {
|
|
|
70
79
|
* re-raised unchanged so downstream `mapError`s see the original
|
|
71
80
|
* `ForbiddenError`.
|
|
72
81
|
*
|
|
73
|
-
* Use at every channel's outbound `core.sendReply(...)` boundary
|
|
82
|
+
* Use at every channel's outbound `core.sendReply(...)` boundary:.
|
|
74
83
|
*
|
|
75
84
|
* ```ts
|
|
76
85
|
* core.sendReply(conv, text, { dispatchLeaseId: leaseId }).pipe(
|
|
@@ -78,6 +87,9 @@ export function projectLeaseInvalid(err, ctx) {
|
|
|
78
87
|
* // ... per-channel surfacing
|
|
79
88
|
* )
|
|
80
89
|
* ```
|
|
90
|
+
* @param ctx Context for the operation.
|
|
91
|
+
* @param ctx.leaseId Value supplied to the operation.
|
|
92
|
+
* @returns The catch lease invalid result.
|
|
81
93
|
*/
|
|
82
94
|
export function catchLeaseInvalid(ctx) {
|
|
83
95
|
// `Effect.catchIf` with an `instanceof` refinement handles only the
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"lease.js","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAqB,SAAQ,IAAI,CAAC,WAAW,CACxD,sBAAsB,CAMtB;CAAG;AAaL,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC,SAAS,kBAAkB,CAAC,IAAa;IACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI;
|
|
1
|
+
{"version":3,"file":"lease.js","sourceRoot":"","sources":["../../src/channel-base/lease.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC7C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAEvD;;;;;;;;;GASG;AACH,MAAM,OAAO,oBAAqB,SAAQ,IAAI,CAAC,WAAW,CACxD,sBAAsB,CAMtB;CAAG;AAaL,MAAM,iBAAiB,GAAG,WAAW,CAAC;AAEtC,SAAS,kBAAkB,CAAC,IAAa;IACvC,IAAI,OAAO,IAAI,KAAK,QAAQ,IAAI,IAAI,KAAK,IAAI,EAAE,CAAC;QAC9C,OAAO,KAAK,CAAC;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TaskId } from "@moltzap/protocol/task";
|
|
4
4
|
import type { ChannelService, EnrichedInboundMessage } from "./channel-core.js";
|
|
5
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Executes the enrich channel message operation.
|
|
7
|
+
* @param service Value supplied to the operation.
|
|
8
|
+
* @param taskId Value supplied to the operation.
|
|
9
|
+
* @param messageOrMessages Value supplied to the operation.
|
|
10
|
+
* @returns The enrich channel message result.
|
|
11
|
+
*/
|
|
12
|
+
export declare function enrichChannelMessage(service: ChannelService, taskId: TaskId, messageOrMessages: Message | readonly Message[]): Effect.Effect<{
|
|
6
13
|
enriched: EnrichedInboundMessage;
|
|
7
14
|
commitContext?: () => void;
|
|
8
|
-
}
|
|
15
|
+
}>;
|
|
9
16
|
//# sourceMappingURL=channel-core-enrichment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-core-enrichment.d.ts","sourceRoot":"","sources":["../src/channel-core-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EAGd,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"channel-core-enrichment.d.ts","sourceRoot":"","sources":["../src/channel-core-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAChC,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,KAAK,EACV,cAAc,EAGd,sBAAsB,EACvB,MAAM,mBAAmB,CAAC;AAuL3B;;;;;;GAMG;AACH,wBAAgB,oBAAoB,CAClC,OAAO,EAAE,cAAc,EACvB,MAAM,EAAE,MAAM,EACd,iBAAiB,EAAE,OAAO,GAAG,SAAS,OAAO,EAAE,GAC9C,MAAM,CAAC,MAAM,CAAC;IACf,QAAQ,EAAE,sBAAsB,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;CAC5B,CAAC,CAkCD"}
|
|
@@ -8,8 +8,10 @@ function asMessageArray(messageOrMessages) {
|
|
|
8
8
|
: [messageOrMessages];
|
|
9
9
|
}
|
|
10
10
|
function formatCoalescedText(coalesced) {
|
|
11
|
-
if (coalesced.length === 1)
|
|
12
|
-
return coalesced[0]
|
|
11
|
+
if (coalesced.length === 1) {
|
|
12
|
+
return /* Safe because the surrounding invariant establishes this asserted shape. */ coalesced[0]
|
|
13
|
+
.text;
|
|
14
|
+
}
|
|
13
15
|
return coalesced
|
|
14
16
|
.map((message, index) => index === 0
|
|
15
17
|
? message.text
|
|
@@ -17,8 +19,9 @@ function formatCoalescedText(coalesced) {
|
|
|
17
19
|
.join("\n\n");
|
|
18
20
|
}
|
|
19
21
|
function conversationMetaFrom(convMeta) {
|
|
20
|
-
if (!convMeta)
|
|
22
|
+
if (!convMeta) {
|
|
21
23
|
return undefined;
|
|
24
|
+
}
|
|
22
25
|
return {
|
|
23
26
|
type: convMeta.type === "group" ? "group" : "dm",
|
|
24
27
|
name: convMeta.name,
|
|
@@ -51,7 +54,8 @@ function coalescedMessageFrom(message, senderName) {
|
|
|
51
54
|
}
|
|
52
55
|
function buildCoalescedMessages(service, messages, primarySenderName) {
|
|
53
56
|
return Effect.gen(function* () {
|
|
54
|
-
const primaryMessage =
|
|
57
|
+
const primaryMessage =
|
|
58
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ messages[0];
|
|
55
59
|
const coalesced = [coalescedMessageFrom(primaryMessage, primarySenderName)];
|
|
56
60
|
for (const message of messages.slice(1)) {
|
|
57
61
|
const senderName = yield* resolveSenderName(service, message.senderId);
|
|
@@ -110,10 +114,18 @@ function buildEnrichedInboundMessage({ service, message, taskId, senderName, coa
|
|
|
110
114
|
...(coalesced.length > 1 ? { coalescedMessages: coalesced } : {}),
|
|
111
115
|
};
|
|
112
116
|
}
|
|
117
|
+
/**
|
|
118
|
+
* Executes the enrich channel message operation.
|
|
119
|
+
* @param service Value supplied to the operation.
|
|
120
|
+
* @param taskId Value supplied to the operation.
|
|
121
|
+
* @param messageOrMessages Value supplied to the operation.
|
|
122
|
+
* @returns The enrich channel message result.
|
|
123
|
+
*/
|
|
113
124
|
export function enrichChannelMessage(service, taskId, messageOrMessages) {
|
|
114
125
|
return Effect.gen(function* () {
|
|
115
126
|
const messages = asMessageArray(messageOrMessages);
|
|
116
|
-
const message =
|
|
127
|
+
const message =
|
|
128
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ messages[0];
|
|
117
129
|
const senderName = yield* resolveSenderName(service, message.senderId);
|
|
118
130
|
const coalesced = yield* buildCoalescedMessages(service, messages, senderName);
|
|
119
131
|
const conversationMeta = conversationMetaFrom(service.getConversation(message.conversationId));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-core-enrichment.js","sourceRoot":"","sources":["../src/channel-core-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA6BhC,SAAS,aAAa,CACpB,
|
|
1
|
+
{"version":3,"file":"channel-core-enrichment.js","sourceRoot":"","sources":["../src/channel-core-enrichment.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AA6BhC,SAAS,aAAa,CACpB,iBAA+C;IAE/C,OAAO,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;AAC1C,CAAC;AAED,SAAS,cAAc,CACrB,iBAA+C;IAE/C,OAAO,aAAa,CAAC,iBAAiB,CAAC;QACrC,CAAC,CAAC,CAAC,GAAG,iBAAiB,CAAC;QACxB,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC;AAC1B,CAAC;AA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OAAO,CAAC,cAAc,EACtB,gBAAgB,CACjB,CAAC;QAEF,OAAO;YACL,QAAQ,EAAE,2BAA2B,CAAC;gBACpC,OAAO;gBACP,OAAO;gBACP,MAAM;gBACN,UAAU;gBACV,SAAS;gBACT,OAAO;aACR,CAAC;YACF,GAAG,CAAC,OAAO,CAAC,aAAa;gBACvB,CAAC,CAAC,EAAE,aAAa,EAAE,OAAO,CAAC,aAAa,EAAE;gBAC1C,CAAC,CAAC,EAAE,CAAC;SACR,CAAC;IACJ,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC;AACnD,CAAC"}
|
|
@@ -8,49 +8,95 @@ import { Effect } from "effect";
|
|
|
8
8
|
import { MoltZapChannelCore, type ChannelService, type DispatchAdmissionDecision, type DispatchAdmissionRequest, type EnrichedInboundMessage } from "./channel-core.js";
|
|
9
9
|
import type { CrossConversationEntry, ServiceRpcError } from "./service.js";
|
|
10
10
|
import { buildMessage, createFakeChannelService, flushDispatchChainEffect, testLeaseId, type FakeChannelService } from "./test-utils/index.js";
|
|
11
|
+
/** Re-exports the public API from `current module`. */
|
|
11
12
|
export { MoltZapChannelCore, ForbiddenError, buildMessage, createFakeChannelService, flushDispatchChainEffect, };
|
|
13
|
+
/** Re-exports the public API from `current module`. */
|
|
12
14
|
export type { ChannelService, CrossConversationEntry, EnrichedInboundMessage, FakeChannelService, Message, };
|
|
15
|
+
/** Provides the stuck message lease timeout ms runtime value. */
|
|
13
16
|
export declare const STUCK_MESSAGE_LEASE_TIMEOUT_MS = 50;
|
|
17
|
+
/** Provides the effect test runtime value. */
|
|
14
18
|
export declare const effectTest: import("@effect/vitest").Vitest.Tester<import("effect/TestServices").TestServices>;
|
|
19
|
+
/** Provides the alice cached name runtime value. */
|
|
15
20
|
export declare const ALICE_CACHED_NAME = "Alice (cached)";
|
|
21
|
+
/** Provides the alice resolved name runtime value. */
|
|
16
22
|
export declare const ALICE_RESOLVED_NAME = "Alice (via resolve)";
|
|
23
|
+
/** Provides the multiline text runtime value. */
|
|
17
24
|
export declare const MULTILINE_TEXT = "line one\nline two";
|
|
25
|
+
/** Provides the caption text runtime value. */
|
|
18
26
|
export declare const CAPTION_TEXT = "caption";
|
|
27
|
+
/** Provides the first text runtime value. */
|
|
19
28
|
export declare const FIRST_TEXT = "first";
|
|
29
|
+
/** Provides the second text runtime value. */
|
|
20
30
|
export declare const SECOND_TEXT = "second";
|
|
31
|
+
/** Provides the denied lease id runtime value. */
|
|
21
32
|
export declare const DENIED_LEASE_ID: LeaseId;
|
|
33
|
+
/** Provides the time to vote text runtime value. */
|
|
22
34
|
export declare const TIME_TO_VOTE_TEXT = "Time to vote";
|
|
35
|
+
/** Provides the after marker text runtime value. */
|
|
23
36
|
export declare const AFTER_MARKER_TEXT = "after marker";
|
|
37
|
+
/** Provides the old discussion text runtime value. */
|
|
24
38
|
export declare const OLD_DISCUSSION_TEXT = "old discussion";
|
|
39
|
+
/** Provides the marker lease id runtime value. */
|
|
25
40
|
export declare const MARKER_LEASE_ID: LeaseId;
|
|
41
|
+
/** Provides the devs group name runtime value. */
|
|
26
42
|
export declare const DEVS_GROUP_NAME = "devs";
|
|
43
|
+
/** Provides the first visit text runtime value. */
|
|
27
44
|
export declare const FIRST_VISIT_TEXT = "first visit";
|
|
28
45
|
declare const TestInboundHandlerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
29
46
|
readonly _tag: "TestInboundHandlerError";
|
|
30
47
|
} & Readonly<A>;
|
|
48
|
+
/** Reports test inbound handler failures. */
|
|
31
49
|
export declare class TestInboundHandlerError extends TestInboundHandlerError_base<{
|
|
32
50
|
readonly message: string;
|
|
33
51
|
}> {
|
|
34
52
|
}
|
|
35
53
|
type AdmissionRequest = DispatchAdmissionRequest;
|
|
54
|
+
/**
|
|
55
|
+
* Executes the install admission operation.
|
|
56
|
+
* @param fake Value supplied to the operation.
|
|
57
|
+
* @param decide Value supplied to the operation.
|
|
58
|
+
*/
|
|
36
59
|
export declare function installAdmission(fake: FakeChannelService, decide: (request: AdmissionRequest) => Effect.Effect<DispatchAdmissionDecision, ServiceRpcError>): void;
|
|
60
|
+
/** Provides the agent runtime value. */
|
|
37
61
|
export declare const agent: (agentLabel: string) => AgentId;
|
|
62
|
+
/** Provides the conversation runtime value. */
|
|
38
63
|
export declare const conversation: (conversationLabel: string) => ConversationId;
|
|
64
|
+
/** Provides the message runtime value. */
|
|
39
65
|
export declare const message: (messageLabel: string) => MessageId;
|
|
66
|
+
/** Provides the task runtime value. */
|
|
40
67
|
export declare const task: (taskLabel: string) => TaskId;
|
|
68
|
+
/** Re-exports the public API from `current module`. */
|
|
41
69
|
export { testLeaseId };
|
|
70
|
+
/**
|
|
71
|
+
* Provides the participant runtime value.
|
|
72
|
+
* @param agentLabel Value supplied to the operation.
|
|
73
|
+
* @returns The created channel core fixture.
|
|
74
|
+
*/
|
|
42
75
|
export declare const participant: (agentLabel: string) => string;
|
|
76
|
+
/** Describes channel core fixture. */
|
|
43
77
|
export interface ChannelCoreFixture {
|
|
44
78
|
readonly fake: FakeChannelService;
|
|
45
79
|
readonly service: ChannelService;
|
|
46
80
|
readonly core: MoltZapChannelCore;
|
|
47
81
|
readonly inbound: EnrichedInboundMessage[];
|
|
48
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Creates channel core fixture.
|
|
85
|
+
* @returns The created channel core fixture.
|
|
86
|
+
*/
|
|
49
87
|
export declare function createChannelCoreFixture(): ChannelCoreFixture;
|
|
88
|
+
/**
|
|
89
|
+
* Executes the custom setup operation.
|
|
90
|
+
* @returns The custom setup result.
|
|
91
|
+
*/
|
|
50
92
|
export declare function customSetup(): {
|
|
51
93
|
fake: FakeChannelService;
|
|
52
94
|
core: MoltZapChannelCore;
|
|
53
95
|
received: EnrichedInboundMessage[];
|
|
54
96
|
};
|
|
97
|
+
/**
|
|
98
|
+
* Executes the force resolve agent name path operation.
|
|
99
|
+
* @param fake Value supplied to the operation.
|
|
100
|
+
*/
|
|
55
101
|
export declare function forceResolveAgentNamePath(fake: FakeChannelService): void;
|
|
56
102
|
//# sourceMappingURL=channel-core-test-support.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-core-test-support.d.ts","sourceRoot":"","sources":["../src/channel-core-test-support.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,oCAAoC,CAAC;AAClE,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,2BAA2B,CAAC;AACzD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,4BAA4B,CAAC;AAC1D,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChF,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,wBAAwB,CAAC;AACrD,OAAO,EAAQ,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EACL,kBAAkB,EAClB,KAAK,cAAc,EACnB,KAAK,yBAAyB,EAC9B,KAAK,wBAAwB,EAE7B,KAAK,sBAAsB,EAC5B,MAAM,mBAAmB,CAAC;AAC3B,OAAO,KAAK,EAAE,sBAAsB,EAAE,eAAe,EAAE,MAAM,cAAc,CAAC;AAC5E,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EAGxB,WAAW,EAGX,KAAK,kBAAkB,EACxB,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,GACzB,CAAC;AACF,YAAY,EACV,cAAc,EACd,sBAAsB,EACtB,sBAAsB,EACtB,kBAAkB,EAClB,OAAO,GACR,CAAC;AAEF,eAAO,MAAM,8BAA8B,KAAK,CAAC;AACjD,eAAO,MAA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E,kBAAkB,CAAC;IACzB,QAAQ,EAAE,sBAAsB,EAAE,CAAC;CACpC,CAUA;AAED;;;GAGG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,kBAAkB,GAAG,IAAI,CAKxE"}
|
|
@@ -3,41 +3,67 @@ import { ForbiddenError } from "@moltzap/protocol/rpc";
|
|
|
3
3
|
import { Data, Effect } from "effect";
|
|
4
4
|
import { MoltZapChannelCore, } from "./channel-core.js";
|
|
5
5
|
import { buildMessage, createFakeChannelService, flushDispatchChainEffect, testAgentId, testConversationId, testLeaseId, testMessageId, testTaskId, } from "./test-utils/index.js";
|
|
6
|
+
/** Re-exports the public API from `current module`. */
|
|
6
7
|
export { MoltZapChannelCore, ForbiddenError, buildMessage, createFakeChannelService, flushDispatchChainEffect, };
|
|
8
|
+
/** Provides the stuck message lease timeout ms runtime value. */
|
|
7
9
|
export const STUCK_MESSAGE_LEASE_TIMEOUT_MS = 50;
|
|
10
|
+
/** Provides the effect test runtime value. */
|
|
8
11
|
export const effectTest = effectIt.effect;
|
|
12
|
+
/** Provides the alice cached name runtime value. */
|
|
9
13
|
export const ALICE_CACHED_NAME = "Alice (cached)";
|
|
14
|
+
/** Provides the alice resolved name runtime value. */
|
|
10
15
|
export const ALICE_RESOLVED_NAME = "Alice (via resolve)";
|
|
16
|
+
/** Provides the multiline text runtime value. */
|
|
11
17
|
export const MULTILINE_TEXT = "line one\nline two";
|
|
18
|
+
/** Provides the caption text runtime value. */
|
|
12
19
|
export const CAPTION_TEXT = "caption";
|
|
20
|
+
/** Provides the first text runtime value. */
|
|
13
21
|
export const FIRST_TEXT = "first";
|
|
22
|
+
/** Provides the second text runtime value. */
|
|
14
23
|
export const SECOND_TEXT = "second";
|
|
24
|
+
/** Provides the denied lease id runtime value. */
|
|
15
25
|
export const DENIED_LEASE_ID = testLeaseId("lease-den");
|
|
26
|
+
/** Provides the time to vote text runtime value. */
|
|
16
27
|
export const TIME_TO_VOTE_TEXT = "Time to vote";
|
|
28
|
+
/** Provides the after marker text runtime value. */
|
|
17
29
|
export const AFTER_MARKER_TEXT = "after marker";
|
|
30
|
+
/** Provides the old discussion text runtime value. */
|
|
18
31
|
export const OLD_DISCUSSION_TEXT = "old discussion";
|
|
32
|
+
/** Provides the marker lease id runtime value. */
|
|
19
33
|
export const MARKER_LEASE_ID = testLeaseId("lease-marker");
|
|
34
|
+
/** Provides the devs group name runtime value. */
|
|
20
35
|
export const DEVS_GROUP_NAME = "devs";
|
|
36
|
+
/** Provides the first visit text runtime value. */
|
|
21
37
|
export const FIRST_VISIT_TEXT = "first visit";
|
|
38
|
+
/** Reports test inbound handler failures. */
|
|
22
39
|
export class TestInboundHandlerError extends Data.TaggedError("TestInboundHandlerError") {
|
|
23
40
|
}
|
|
24
41
|
const FALLBACK_RECEIVED_AT = "1970-01-01T00:00:00.000Z";
|
|
25
42
|
const LEASE_MOCK_PREFIX = "lease-mock";
|
|
26
43
|
const DISPATCH_MOCK_PREFIX = "dispatch-mock";
|
|
27
|
-
const admissionRequest = (params) =>
|
|
28
|
-
message
|
|
29
|
-
id: params.messageId,
|
|
30
|
-
conversationId:
|
|
31
|
-
|
|
32
|
-
|
|
44
|
+
const admissionRequest = (params) => {
|
|
45
|
+
const message = {
|
|
46
|
+
id: /* Safe because the surrounding invariant establishes this asserted shape. */ params.messageId,
|
|
47
|
+
conversationId:
|
|
48
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ params.conversationId,
|
|
49
|
+
senderId:
|
|
50
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ params.senderAgentId,
|
|
51
|
+
parts:
|
|
52
|
+
/* Safe because admission fixtures establish nonempty protocol message parts before this adapter runs. */ (params.parts ??
|
|
53
|
+
[]),
|
|
33
54
|
createdAt: params.receivedAt ?? FALLBACK_RECEIVED_AT,
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
55
|
+
};
|
|
56
|
+
return {
|
|
57
|
+
message,
|
|
58
|
+
conversationId: params.conversationId,
|
|
59
|
+
senderAgentId: params.senderAgentId,
|
|
60
|
+
attempt: params.attempt ?? 0,
|
|
61
|
+
receivedAt: params.receivedAt ?? FALLBACK_RECEIVED_AT,
|
|
62
|
+
pending:
|
|
63
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */ (params.pending ??
|
|
64
|
+
[]),
|
|
65
|
+
};
|
|
66
|
+
};
|
|
41
67
|
const grantVerdict = (decision) => ({
|
|
42
68
|
decision: "grant",
|
|
43
69
|
...(decision.leaseId !== undefined ? { leaseId: decision.leaseId } : {}),
|
|
@@ -70,6 +96,11 @@ const leaseIdForDecision = (decision, counter) => decision._tag === "grant" && d
|
|
|
70
96
|
? decision.leaseId
|
|
71
97
|
: testLeaseId(LEASE_MOCK_PREFIX + "-" + counter.toString());
|
|
72
98
|
const dispatchIdForCounter = (counter) => DISPATCH_MOCK_PREFIX + "-" + counter.toString();
|
|
99
|
+
/**
|
|
100
|
+
* Executes the install admission operation.
|
|
101
|
+
* @param fake Value supplied to the operation.
|
|
102
|
+
* @param decide Value supplied to the operation.
|
|
103
|
+
*/
|
|
73
104
|
export function installAdmission(fake, decide) {
|
|
74
105
|
let counter = 0;
|
|
75
106
|
fake.service.requestDispatch = (params) => decide(admissionRequest(params)).pipe(Effect.map((decision) => {
|
|
@@ -82,12 +113,26 @@ export function installAdmission(fake, decide) {
|
|
|
82
113
|
return { leaseId, dispatchId };
|
|
83
114
|
}));
|
|
84
115
|
}
|
|
116
|
+
/** Provides the agent runtime value. */
|
|
85
117
|
export const agent = testAgentId;
|
|
118
|
+
/** Provides the conversation runtime value. */
|
|
86
119
|
export const conversation = testConversationId;
|
|
120
|
+
/** Provides the message runtime value. */
|
|
87
121
|
export const message = testMessageId;
|
|
122
|
+
/** Provides the task runtime value. */
|
|
88
123
|
export const task = testTaskId;
|
|
124
|
+
/** Re-exports the public API from `current module`. */
|
|
89
125
|
export { testLeaseId };
|
|
126
|
+
/**
|
|
127
|
+
* Provides the participant runtime value.
|
|
128
|
+
* @param agentLabel Value supplied to the operation.
|
|
129
|
+
* @returns The created channel core fixture.
|
|
130
|
+
*/
|
|
90
131
|
export const participant = (agentLabel) => "agent:" + agent(agentLabel);
|
|
132
|
+
/**
|
|
133
|
+
* Creates channel core fixture.
|
|
134
|
+
* @returns The created channel core fixture.
|
|
135
|
+
*/
|
|
91
136
|
export function createChannelCoreFixture() {
|
|
92
137
|
const fake = createFakeChannelService({ ownAgentId: "agent-self" });
|
|
93
138
|
const inbound = [];
|
|
@@ -97,6 +142,10 @@ export function createChannelCoreFixture() {
|
|
|
97
142
|
}));
|
|
98
143
|
return { fake, service: fake.service, core, inbound };
|
|
99
144
|
}
|
|
145
|
+
/**
|
|
146
|
+
* Executes the custom setup operation.
|
|
147
|
+
* @returns The custom setup result.
|
|
148
|
+
*/
|
|
100
149
|
export function customSetup() {
|
|
101
150
|
const fake = createFakeChannelService({ ownAgentId: "agent-self" });
|
|
102
151
|
const received = [];
|
|
@@ -106,7 +155,12 @@ export function customSetup() {
|
|
|
106
155
|
}));
|
|
107
156
|
return { fake, core, received };
|
|
108
157
|
}
|
|
158
|
+
/**
|
|
159
|
+
* Executes the force resolve agent name path operation.
|
|
160
|
+
* @param fake Value supplied to the operation.
|
|
161
|
+
*/
|
|
109
162
|
export function forceResolveAgentNamePath(fake) {
|
|
163
|
+
/* Safe because the surrounding invariant establishes this asserted shape. */
|
|
110
164
|
fake.service.getAgentName = () => undefined;
|
|
111
165
|
}
|
|
112
166
|
//# sourceMappingURL=channel-core-test-support.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-core-test-support.js","sourceRoot":"","sources":["../src/channel-core-test-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EACL,kBAAkB,GAMnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,GAEX,MAAM,uBAAuB,CAAC;AAE/B,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,GACzB,CAAC;
|
|
1
|
+
{"version":3,"file":"channel-core-test-support.js","sourceRoot":"","sources":["../src/channel-core-test-support.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAMvD,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEtC,OAAO,EACL,kBAAkB,GAMnB,MAAM,mBAAmB,CAAC;AAE3B,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,EACxB,WAAW,EACX,kBAAkB,EAClB,WAAW,EACX,aAAa,EACb,UAAU,GAEX,MAAM,uBAAuB,CAAC;AAE/B,uDAAuD;AACvD,OAAO,EACL,kBAAkB,EAClB,cAAc,EACd,YAAY,EACZ,wBAAwB,EACxB,wBAAwB,GACzB,CAAC;AAUF,iEAAiE;AACjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,EAAE,CAAC;AACjD,8CAA8C;AAC9C,MAAM,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,MAAM,CAAC;AAC1C,oDAAoD;AACpD,MAAM,CAAC,MAAM,iBAAiB,GAAG,gBAAgB,CAAC;AAClD,sDAAsD;AACtD,MAAM,CAAC,MAAM,mBAAmB,GAAG,qBAAqB,CAAC;AACzD,iDAAiD;AACjD,MAAM,CAAC,MAAM,cAAc,GAAG,oBAAoB,CAAC;AACnD,+CAA+C;A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