@moltzap/client 2026.507.0 → 2026.508.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/channel-core.d.ts +118 -2
- package/dist/channel-core.d.ts.map +1 -1
- package/dist/channel-core.js +195 -27
- package/dist/channel-core.js.map +1 -1
- package/dist/channel-core.test.js +117 -26
- package/dist/channel-core.test.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/runtime/frame.d.ts +9 -5
- package/dist/runtime/frame.d.ts.map +1 -1
- package/dist/runtime/frame.js +19 -15
- package/dist/runtime/frame.js.map +1 -1
- package/dist/service.d.ts +18 -3
- package/dist/service.d.ts.map +1 -1
- package/dist/service.js +28 -50
- package/dist/service.js.map +1 -1
- package/dist/service.test.js +27 -25
- package/dist/service.test.js.map +1 -1
- package/dist/test-utils/channel-service-fixture.d.ts +2 -1
- package/dist/test-utils/channel-service-fixture.d.ts.map +1 -1
- package/dist/test-utils/channel-service-fixture.js +8 -0
- package/dist/test-utils/channel-service-fixture.js.map +1 -1
- package/dist/ws-client.d.ts +5 -26
- package/dist/ws-client.d.ts.map +1 -1
- package/dist/ws-client.js +71 -97
- package/dist/ws-client.js.map +1 -1
- package/dist/ws-client.test.js +40 -12
- package/dist/ws-client.test.js.map +1 -1
- package/package.json +3 -3
- package/dist/internal/__tests__/app-callback-partition-key.test.d.ts +0 -2
- package/dist/internal/__tests__/app-callback-partition-key.test.d.ts.map +0 -1
- package/dist/internal/__tests__/app-callback-partition-key.test.js +0 -20
- package/dist/internal/__tests__/app-callback-partition-key.test.js.map +0 -1
- package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts +0 -2
- package/dist/internal/__tests__/app-callback-partition-worker.test.d.ts.map +0 -1
- package/dist/internal/__tests__/app-callback-partition-worker.test.js +0 -265
- package/dist/internal/__tests__/app-callback-partition-worker.test.js.map +0 -1
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts +0 -2
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.d.ts.map +0 -1
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.js +0 -228
- package/dist/internal/__tests__/app-callback-partitioned-dispatcher.test.js.map +0 -1
- package/dist/internal/__tests__/app-callback-test-requests.d.ts +0 -22
- package/dist/internal/__tests__/app-callback-test-requests.d.ts.map +0 -1
- package/dist/internal/__tests__/app-callback-test-requests.js +0 -45
- package/dist/internal/__tests__/app-callback-test-requests.js.map +0 -1
- package/dist/internal/app-callback-dispatcher-errors.d.ts +0 -50
- package/dist/internal/app-callback-dispatcher-errors.d.ts.map +0 -1
- package/dist/internal/app-callback-dispatcher-errors.js +0 -36
- package/dist/internal/app-callback-dispatcher-errors.js.map +0 -1
- package/dist/internal/app-callback-partition-key.d.ts +0 -58
- package/dist/internal/app-callback-partition-key.d.ts.map +0 -1
- package/dist/internal/app-callback-partition-key.js +0 -80
- package/dist/internal/app-callback-partition-key.js.map +0 -1
- package/dist/internal/app-callback-partition-worker.d.ts +0 -160
- package/dist/internal/app-callback-partition-worker.d.ts.map +0 -1
- package/dist/internal/app-callback-partition-worker.js +0 -141
- package/dist/internal/app-callback-partition-worker.js.map +0 -1
- package/dist/internal/app-callback-partitioned-dispatcher.d.ts +0 -180
- package/dist/internal/app-callback-partitioned-dispatcher.d.ts.map +0 -1
- package/dist/internal/app-callback-partitioned-dispatcher.js +0 -282
- package/dist/internal/app-callback-partitioned-dispatcher.js.map +0 -1
|
@@ -1,228 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Unit tests for the partitioned task-callback dispatcher.
|
|
3
|
-
*
|
|
4
|
-
* Spec: moltzap#356 §8 (test plan, file 3).
|
|
5
|
-
*
|
|
6
|
-
* Phase 9b consumer-migration (sub-issue #460): the legacy `appCallback`
|
|
7
|
-
* group retired. Only `task/authorizeDispatch` survives as the
|
|
8
|
-
* server→client awaitable RPC, so cross-method partitioning scenarios
|
|
9
|
-
* (the pre-Phase-9b deadlock-fix reproducer that pitted
|
|
10
|
-
* `apps/onBeforeDispatch` against `apps/onBeforeMessageDelivery`)
|
|
11
|
-
* dropped: every request now flows through one descriptor segment, so
|
|
12
|
-
* partitioning is by `(taskId, conversationId)` alone. The surviving
|
|
13
|
-
* coverage — FIFO, cross-partition independence, soft-cap, idle reaper,
|
|
14
|
-
* scope-anchored teardown — still validates the dispatcher contract.
|
|
15
|
-
*/
|
|
16
|
-
import { describe, it, expect } from "vitest";
|
|
17
|
-
import { Deferred, Effect, Exit, Ref, Scope } from "effect";
|
|
18
|
-
import { DEFAULT_PARTITIONED_DISPATCHER_CONFIG, makePartitionedDispatcher, } from "../app-callback-partitioned-dispatcher.js";
|
|
19
|
-
import { authorizeDispatch, conversationIdForIndex, CONV_X, CONV_Y, CONV_Z, SESSION_A, } from "./app-callback-test-requests.js";
|
|
20
|
-
/** Drive a body under a fresh CloseableScope; close on exit. */
|
|
21
|
-
function withScope(body) {
|
|
22
|
-
return Effect.gen(function* () {
|
|
23
|
-
const scope = yield* Scope.make();
|
|
24
|
-
const result = yield* body(scope);
|
|
25
|
-
yield* Scope.close(scope, Exit.void);
|
|
26
|
-
return result;
|
|
27
|
-
});
|
|
28
|
-
}
|
|
29
|
-
describe("makePartitionedDispatcher — routing", () => {
|
|
30
|
-
it("two offers with the same key land on the same worker (FIFO preserved)", async () => {
|
|
31
|
-
const seen = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
32
|
-
const order = yield* Ref.make([]);
|
|
33
|
-
const allDone = yield* Deferred.make();
|
|
34
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
35
|
-
handle: (req) => Effect.gen(function* () {
|
|
36
|
-
yield* Ref.update(order, (xs) => [...xs, req.id]);
|
|
37
|
-
const xs = yield* Ref.get(order);
|
|
38
|
-
if (xs.length === 3) {
|
|
39
|
-
yield* Deferred.succeed(allDone, undefined);
|
|
40
|
-
}
|
|
41
|
-
}),
|
|
42
|
-
scope,
|
|
43
|
-
});
|
|
44
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-1"));
|
|
45
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-2"));
|
|
46
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-3"));
|
|
47
|
-
yield* Deferred.await(allDone);
|
|
48
|
-
return yield* Ref.get(order);
|
|
49
|
-
})));
|
|
50
|
-
expect(seen).toEqual(["rpc-1", "rpc-2", "rpc-3"]);
|
|
51
|
-
});
|
|
52
|
-
it("offers to different (taskId, conversationId) keys run in parallel (no head-of-line blocking)", async () => {
|
|
53
|
-
// Park partition X (CONV_X). Partition Y (CONV_Y) must still run.
|
|
54
|
-
const result = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
55
|
-
const releaseX = yield* Deferred.make();
|
|
56
|
-
const yDone = yield* Deferred.make();
|
|
57
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
58
|
-
handle: (req) => Effect.gen(function* () {
|
|
59
|
-
if (req.partition.conversationId === CONV_X) {
|
|
60
|
-
yield* Deferred.await(releaseX);
|
|
61
|
-
}
|
|
62
|
-
else if (req.id === "rpc-Y-go") {
|
|
63
|
-
yield* Deferred.succeed(yDone, undefined);
|
|
64
|
-
}
|
|
65
|
-
}),
|
|
66
|
-
scope,
|
|
67
|
-
});
|
|
68
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-X-park", SESSION_A, CONV_X));
|
|
69
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-Y-go", SESSION_A, CONV_Y));
|
|
70
|
-
yield* Deferred.await(yDone);
|
|
71
|
-
yield* Deferred.succeed(releaseX, undefined);
|
|
72
|
-
return "Y-ran";
|
|
73
|
-
})));
|
|
74
|
-
expect(result).toBe("Y-ran");
|
|
75
|
-
});
|
|
76
|
-
it("partitions are bounded by maxPartitions (config cap)", async () => {
|
|
77
|
-
const cap = 4;
|
|
78
|
-
const offers = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
79
|
-
const release = yield* Deferred.make();
|
|
80
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
81
|
-
handle: () => Deferred.await(release),
|
|
82
|
-
scope,
|
|
83
|
-
config: { maxPartitions: cap },
|
|
84
|
-
});
|
|
85
|
-
let succeeded = 0;
|
|
86
|
-
for (let i = 0; i < 10; i++) {
|
|
87
|
-
const outcome = yield* Effect.either(dispatcher.offer(authorizeDispatch(`rpc-${i}`, SESSION_A, conversationIdForIndex(i))));
|
|
88
|
-
if (outcome._tag === "Right")
|
|
89
|
-
succeeded += 1;
|
|
90
|
-
}
|
|
91
|
-
yield* Deferred.succeed(release, undefined);
|
|
92
|
-
return succeeded;
|
|
93
|
-
})));
|
|
94
|
-
expect(offers).toBeLessThanOrEqual(DEFAULT_PARTITIONED_DISPATCHER_CONFIG.maxPartitions);
|
|
95
|
-
});
|
|
96
|
-
});
|
|
97
|
-
describe("makePartitionedDispatcher — backpressure", () => {
|
|
98
|
-
it("partitionQueueFull on partition A does not block partition B (independent fibers)", async () => {
|
|
99
|
-
// Park partition A's handler so its queue fills; offer to
|
|
100
|
-
// partition B must still succeed and run.
|
|
101
|
-
const result = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
102
|
-
const releaseA = yield* Deferred.make();
|
|
103
|
-
const bDone = yield* Deferred.make();
|
|
104
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
105
|
-
handle: (req) => Effect.gen(function* () {
|
|
106
|
-
if (req.partition.conversationId === CONV_X) {
|
|
107
|
-
yield* Deferred.await(releaseA);
|
|
108
|
-
}
|
|
109
|
-
else if (req.id === "rpc-B-go") {
|
|
110
|
-
yield* Deferred.succeed(bDone, undefined);
|
|
111
|
-
}
|
|
112
|
-
}),
|
|
113
|
-
scope,
|
|
114
|
-
config: { partitionQueueCapacity: 1 },
|
|
115
|
-
});
|
|
116
|
-
// Start partition A; first offer goes into the handler.
|
|
117
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-A-1", SESSION_A, CONV_X));
|
|
118
|
-
// Wait until the handler has actually taken rpc-A-1 off the
|
|
119
|
-
// queue (queue size 0). Then fill the queue with rpc-A-2 so
|
|
120
|
-
// a third offer to A would fail.
|
|
121
|
-
for (let i = 0; i < 200; i++) {
|
|
122
|
-
const stats = yield* dispatcher.stats;
|
|
123
|
-
const partA = stats.partitions.find((p) => p.queueSize >= 0);
|
|
124
|
-
if (partA && partA.queueSize === 0)
|
|
125
|
-
break;
|
|
126
|
-
yield* Effect.yieldNow();
|
|
127
|
-
}
|
|
128
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-A-2", SESSION_A, CONV_X));
|
|
129
|
-
// Partition A is now at capacity. A different-key offer
|
|
130
|
-
// (partition B / CONV_Y) must still run.
|
|
131
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-B-go", SESSION_A, CONV_Y));
|
|
132
|
-
yield* Deferred.await(bDone);
|
|
133
|
-
yield* Deferred.succeed(releaseA, undefined);
|
|
134
|
-
return "B-ran";
|
|
135
|
-
})));
|
|
136
|
-
expect(result).toBe("B-ran");
|
|
137
|
-
});
|
|
138
|
-
it("PartitionQueueFullError is returned when one partition fills, leaving sibling partitions unaffected", async () => {
|
|
139
|
-
// Verify the exact failure tag. Park A's handler, fill the queue,
|
|
140
|
-
// then push one more — it should fail with PartitionQueueFullError.
|
|
141
|
-
const verdict = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
142
|
-
const release = yield* Deferred.make();
|
|
143
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
144
|
-
handle: () => Deferred.await(release),
|
|
145
|
-
scope,
|
|
146
|
-
config: { partitionQueueCapacity: 1 },
|
|
147
|
-
});
|
|
148
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-1", SESSION_A, CONV_X));
|
|
149
|
-
// Wait for the handler to take rpc-1 off the queue.
|
|
150
|
-
for (let i = 0; i < 200; i++) {
|
|
151
|
-
const stats = yield* dispatcher.stats;
|
|
152
|
-
const part = stats.partitions[0];
|
|
153
|
-
if (part && part.queueSize === 0)
|
|
154
|
-
break;
|
|
155
|
-
yield* Effect.yieldNow();
|
|
156
|
-
}
|
|
157
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-2", SESSION_A, CONV_X));
|
|
158
|
-
const overflow = yield* Effect.either(dispatcher.offer(authorizeDispatch("rpc-3", SESSION_A, CONV_X)));
|
|
159
|
-
yield* Deferred.succeed(release, undefined);
|
|
160
|
-
return overflow;
|
|
161
|
-
})));
|
|
162
|
-
expect(verdict._tag).toBe("Left");
|
|
163
|
-
if (verdict._tag === "Left") {
|
|
164
|
-
expect(verdict.left._tag).toBe("PartitionQueueFullError");
|
|
165
|
-
}
|
|
166
|
-
});
|
|
167
|
-
});
|
|
168
|
-
describe("makePartitionedDispatcher — idle reaper", () => {
|
|
169
|
-
it("idle reaper tick reclaims drained partitions when the configured TTL elapses", async () => {
|
|
170
|
-
// Drives the live reaper with a tight TTL/tick. The reaper runs
|
|
171
|
-
// on the dispatcher's scope-anchored fiber; the test polls
|
|
172
|
-
// `stats.activePartitions` until it observes the reclaim. No
|
|
173
|
-
// virtual-clock injection — that surface is private.
|
|
174
|
-
const verdict = await Effect.runPromise(withScope((scope) => Effect.gen(function* () {
|
|
175
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
176
|
-
handle: () => Effect.void,
|
|
177
|
-
scope,
|
|
178
|
-
config: {
|
|
179
|
-
idlePartitionTtlMs: 50,
|
|
180
|
-
idleReaperIntervalMs: 25,
|
|
181
|
-
},
|
|
182
|
-
});
|
|
183
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-1", SESSION_A, CONV_Z));
|
|
184
|
-
// Drain — the worker accepts and completes immediately.
|
|
185
|
-
for (let i = 0; i < 200; i++) {
|
|
186
|
-
const stats = yield* dispatcher.stats;
|
|
187
|
-
if (stats.activePartitions === 0 ||
|
|
188
|
-
stats.partitions.every((p) => p.idle && p.queueSize === 0)) {
|
|
189
|
-
break;
|
|
190
|
-
}
|
|
191
|
-
yield* Effect.sleep("10 millis");
|
|
192
|
-
}
|
|
193
|
-
// Wait for the reaper to fire at least once past the TTL.
|
|
194
|
-
for (let i = 0; i < 200; i++) {
|
|
195
|
-
const stats = yield* dispatcher.stats;
|
|
196
|
-
if (stats.activePartitions === 0)
|
|
197
|
-
return 0;
|
|
198
|
-
yield* Effect.sleep("10 millis");
|
|
199
|
-
}
|
|
200
|
-
const stats = yield* dispatcher.stats;
|
|
201
|
-
return stats.activePartitions;
|
|
202
|
-
})));
|
|
203
|
-
expect(verdict).toBe(0);
|
|
204
|
-
});
|
|
205
|
-
});
|
|
206
|
-
describe("makePartitionedDispatcher — scope teardown", () => {
|
|
207
|
-
it("closing the scope finalizes every partition worker (no leaked fibers)", async () => {
|
|
208
|
-
const result = await Effect.runPromise(Effect.gen(function* () {
|
|
209
|
-
const scope = yield* Scope.make();
|
|
210
|
-
const releaseAll = yield* Deferred.make();
|
|
211
|
-
const dispatcher = yield* makePartitionedDispatcher({
|
|
212
|
-
handle: () => Deferred.await(releaseAll),
|
|
213
|
-
scope,
|
|
214
|
-
});
|
|
215
|
-
yield* dispatcher.offer(authorizeDispatch("rpc-1"));
|
|
216
|
-
// Close the scope — finalizers fire; the parked handlers are
|
|
217
|
-
// interrupted. Without scope-anchored teardown, this would
|
|
218
|
-
// hang forever.
|
|
219
|
-
yield* Scope.close(scope, Exit.void);
|
|
220
|
-
// The Deferred is now garbage; succeeding it post-close is a
|
|
221
|
-
// safe no-op (Deferred semantics allow late settle).
|
|
222
|
-
yield* Deferred.succeed(releaseAll, undefined);
|
|
223
|
-
return "scope-closed";
|
|
224
|
-
}));
|
|
225
|
-
expect(result).toBe("scope-closed");
|
|
226
|
-
});
|
|
227
|
-
});
|
|
228
|
-
//# sourceMappingURL=app-callback-partitioned-dispatcher.test.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-partitioned-dispatcher.test.js","sourceRoot":"","sources":["../../../src/internal/__tests__/app-callback-partitioned-dispatcher.test.ts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CAAC,OAAO,CAAC,UAAU,EAAE,SAAS,CAAC,CAAC;YAC/C,OAAO,cAAuB,CAAC;QACjC,CAAC,CAAC,CACH,CAAC;QACF,MAAM,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,cAAc,CAAC,CAAC;IACtC,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import { TaskAuthorizeDispatch, type ParamsOf } from "@moltzap/protocol";
|
|
2
|
-
import { type PartitionableRequest } from "../app-callback-partition-key.js";
|
|
3
|
-
export declare const SESSION_A: string & import("effect/Brand").Brand<"TaskId">;
|
|
4
|
-
export declare const SESSION_B: string & import("effect/Brand").Brand<"TaskId">;
|
|
5
|
-
export declare const CONV_X: string & import("effect/Brand").Brand<"ConversationId">;
|
|
6
|
-
export declare const CONV_Y: string & import("effect/Brand").Brand<"ConversationId">;
|
|
7
|
-
export declare const CONV_Z: string & import("effect/Brand").Brand<"ConversationId">;
|
|
8
|
-
export declare const AGENT_A: string & import("effect/Brand").Brand<"AgentId">;
|
|
9
|
-
export declare const MESSAGE_A: string & import("effect/Brand").Brand<"MessageId">;
|
|
10
|
-
export declare const conversationIdForIndex: (index: number) => string & import("effect/Brand").Brand<"ConversationId">;
|
|
11
|
-
/**
|
|
12
|
-
* Phase 9b consumer-migration (sub-issue #460): the client-test fixtures
|
|
13
|
-
* for the deleted appCallback verbs (`apps/onBeforeMessageDelivery`,
|
|
14
|
-
* `apps/onSessionActive`, `apps/onClose`) retired. Only
|
|
15
|
-
* `task/authorizeDispatch` (renamed from `apps/onBeforeDispatch`) remains;
|
|
16
|
-
* its fixture keeps the same shape — the verdict union, the recipient
|
|
17
|
-
* envelope, the params layout — because werewolf's dispatch state
|
|
18
|
-
* machine consumes it unchanged.
|
|
19
|
-
*/
|
|
20
|
-
export declare function authorizeDispatchParams(taskId?: string & import("effect/Brand").Brand<"TaskId">, conv?: string & import("effect/Brand").Brand<"ConversationId">): ParamsOf<typeof TaskAuthorizeDispatch>;
|
|
21
|
-
export declare function authorizeDispatch(id: string, taskId?: string & import("effect/Brand").Brand<"TaskId">, conv?: string & import("effect/Brand").Brand<"ConversationId">): PartitionableRequest;
|
|
22
|
-
//# sourceMappingURL=app-callback-test-requests.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-test-requests.d.ts","sourceRoot":"","sources":["../../../src/internal/__tests__/app-callback-test-requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,EAErB,KAAK,QAAQ,EACd,MAAM,mBAAmB,CAAC;AAO3B,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,kCAAkC,CAAC;AAE7E,eAAO,MAAM,SAAS,iDAAqD,CAAC;AAC5E,eAAO,MAAM,SAAS,iDAAqD,CAAC;AAC5E,eAAO,MAAM,MAAM,yDAAyD,CAAC;AAC7E,eAAO,MAAM,MAAM,yDAAyD,CAAC;AAC7E,eAAO,MAAM,MAAM,yDAAyD,CAAC;AAC7E,eAAO,MAAM,OAAO,kDAAkD,CAAC;AACvE,eAAO,MAAM,SAAS,oDAAoD,CAAC;AAG3E,eAAO,MAAM,sBAAsB,GAAI,OAAO,MAAM,4DAGjD,CAAC;AAEJ;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,kDAAY,EAClB,IAAI,0DAAS,GACZ,QAAQ,CAAC,OAAO,qBAAqB,CAAC,CAaxC;AAED,wBAAgB,iBAAiB,CAC/B,EAAE,EAAE,MAAM,EACV,MAAM,kDAAY,EAClB,IAAI,0DAAS,GACZ,oBAAoB,CAQtB"}
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
import { TaskAuthorizeDispatch, } from "@moltzap/protocol";
|
|
2
|
-
import { agentId, conversationId, messageId, taskId as makeTaskId, } from "@moltzap/protocol/testing";
|
|
3
|
-
import {} from "../app-callback-partition-key.js";
|
|
4
|
-
export const SESSION_A = makeTaskId("11111111-1111-4111-8111-111111111111");
|
|
5
|
-
export const SESSION_B = makeTaskId("22222222-2222-4222-8222-222222222222");
|
|
6
|
-
export const CONV_X = conversationId("33333333-3333-4333-8333-333333333333");
|
|
7
|
-
export const CONV_Y = conversationId("44444444-4444-4444-8444-444444444444");
|
|
8
|
-
export const CONV_Z = conversationId("77777777-7777-4777-8777-777777777777");
|
|
9
|
-
export const AGENT_A = agentId("55555555-5555-4555-8555-555555555555");
|
|
10
|
-
export const MESSAGE_A = messageId("66666666-6666-4666-8666-666666666666");
|
|
11
|
-
const UUID_SUFFIX_WIDTH = 12;
|
|
12
|
-
export const conversationIdForIndex = (index) => conversationId(`33333333-3333-4333-8333-${index.toString().padStart(UUID_SUFFIX_WIDTH, "0")}`);
|
|
13
|
-
/**
|
|
14
|
-
* Phase 9b consumer-migration (sub-issue #460): the client-test fixtures
|
|
15
|
-
* for the deleted appCallback verbs (`apps/onBeforeMessageDelivery`,
|
|
16
|
-
* `apps/onSessionActive`, `apps/onClose`) retired. Only
|
|
17
|
-
* `task/authorizeDispatch` (renamed from `apps/onBeforeDispatch`) remains;
|
|
18
|
-
* its fixture keeps the same shape — the verdict union, the recipient
|
|
19
|
-
* envelope, the params layout — because werewolf's dispatch state
|
|
20
|
-
* machine consumes it unchanged.
|
|
21
|
-
*/
|
|
22
|
-
export function authorizeDispatchParams(taskId = SESSION_A, conv = CONV_X) {
|
|
23
|
-
return {
|
|
24
|
-
taskId,
|
|
25
|
-
appId: "test-app",
|
|
26
|
-
conversationId: conv,
|
|
27
|
-
recipient: { agentId: AGENT_A, ownerId: "owner-a" },
|
|
28
|
-
message: {
|
|
29
|
-
id: MESSAGE_A,
|
|
30
|
-
senderAgentId: AGENT_A,
|
|
31
|
-
parts: [{ type: "text", text: "hello" }],
|
|
32
|
-
},
|
|
33
|
-
attempt: 0,
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
export function authorizeDispatch(id, taskId = SESSION_A, conv = CONV_X) {
|
|
37
|
-
const params = authorizeDispatchParams(taskId, conv);
|
|
38
|
-
return {
|
|
39
|
-
id: id,
|
|
40
|
-
definition: TaskAuthorizeDispatch,
|
|
41
|
-
params,
|
|
42
|
-
partition: { taskId, conversationId: conv },
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=app-callback-test-requests.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-test-requests.js","sourceRoot":"","sources":["../../../src/internal/__tests__/app-callback-test-requests.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,qBAAqB,GAGtB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,OAAO,EACP,cAAc,EACd,SAAS,EACT,MAAM,IAAI,UAAU,GACrB,MAAM,2BAA2B,CAAC;AACnC,OAAO,EAA6B,MAAM,kCAAkC,CAAC;AAE7E,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,sCAAsC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,SAAS,GAAG,UAAU,CAAC,sCAAsC,CAAC,CAAC;AAC5E,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC,sCAAsC,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC,sCAAsC,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,MAAM,GAAG,cAAc,CAAC,sCAAsC,CAAC,CAAC;AAC7E,MAAM,CAAC,MAAM,OAAO,GAAG,OAAO,CAAC,sCAAsC,CAAC,CAAC;AACvE,MAAM,CAAC,MAAM,SAAS,GAAG,SAAS,CAAC,sCAAsC,CAAC,CAAC;AAC3E,MAAM,iBAAiB,GAAG,EAAE,CAAC;AAE7B,MAAM,CAAC,MAAM,sBAAsB,GAAG,CAAC,KAAa,EAAE,EAAE,CACtD,cAAc,CACZ,2BAA2B,KAAK,CAAC,QAAQ,EAAE,CAAC,QAAQ,CAAC,iBAAiB,EAAE,GAAG,CAAC,EAAE,CAC/E,CAAC;AAEJ;;;;;;;;GAQG;AACH,MAAM,UAAU,uBAAuB,CACrC,MAAM,GAAG,SAAS,EAClB,IAAI,GAAG,MAAM;IAEb,OAAO;QACL,MAAM;QACN,KAAK,EAAE,UAAU;QACjB,cAAc,EAAE,IAAI;QACpB,SAAS,EAAE,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,SAAS,EAAE;QACnD,OAAO,EAAE;YACP,EAAE,EAAE,SAAS;YACb,aAAa,EAAE,OAAO;YACtB,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC;SACzC;QACD,OAAO,EAAE,CAAC;KACX,CAAC;AACJ,CAAC;AAED,MAAM,UAAU,iBAAiB,CAC/B,EAAU,EACV,MAAM,GAAG,SAAS,EAClB,IAAI,GAAG,MAAM;IAEb,MAAM,MAAM,GAAG,uBAAuB,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IACrD,OAAO;QACL,EAAE,EAAE,EAAe;QACnB,UAAU,EAAE,qBAAqB;QACjC,MAAM;QACN,SAAS,EAAE,EAAE,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE;KAC5C,CAAC;AACJ,CAAC"}
|
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
import type { JsonRpcId } from "@moltzap/protocol";
|
|
2
|
-
declare const PartitionLimitError_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 & {
|
|
3
|
-
readonly _tag: "PartitionLimitError";
|
|
4
|
-
} & Readonly<A>;
|
|
5
|
-
/**
|
|
6
|
-
* The active-partition count has reached `maxPartitions` (soft cap, default
|
|
7
|
-
* 256). New partitions cannot be allocated until an existing partition is
|
|
8
|
-
* reaped by the idle reaper or the connection scope closes. Per-tenant DoS
|
|
9
|
-
* guard.
|
|
10
|
-
*
|
|
11
|
-
* Failure mode is liveness — the request is rejected without contention
|
|
12
|
-
* with existing partitions. Reader synthesizes a `-32000 Server busy`
|
|
13
|
-
* error response so the server retries / falls through.
|
|
14
|
-
*/
|
|
15
|
-
export declare class PartitionLimitError extends PartitionLimitError_base<{
|
|
16
|
-
readonly key: string;
|
|
17
|
-
readonly activePartitions: number;
|
|
18
|
-
readonly maxPartitions: number;
|
|
19
|
-
readonly requestId: JsonRpcId;
|
|
20
|
-
}> {
|
|
21
|
-
}
|
|
22
|
-
declare const PartitionQueueFullError_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 & {
|
|
23
|
-
readonly _tag: "PartitionQueueFullError";
|
|
24
|
-
} & Readonly<A>;
|
|
25
|
-
/**
|
|
26
|
-
* The target partition's bounded queue is at capacity (default 32). Slow
|
|
27
|
-
* handler is backpressuring its own partition. Other partitions are
|
|
28
|
-
* unaffected.
|
|
29
|
-
*
|
|
30
|
-
* Failure mode is per-partition liveness — the queue is full ONLY for this
|
|
31
|
-
* tuple. Reader synthesizes a `-32000 Partition busy` error response;
|
|
32
|
-
* server may retry or surface the failure to the originator (AppHost
|
|
33
|
-
* fail-CLOSED verdict for hooks).
|
|
34
|
-
*/
|
|
35
|
-
export declare class PartitionQueueFullError extends PartitionQueueFullError_base<{
|
|
36
|
-
readonly key: string;
|
|
37
|
-
readonly capacity: number;
|
|
38
|
-
readonly requestId: JsonRpcId;
|
|
39
|
-
}> {
|
|
40
|
-
}
|
|
41
|
-
/**
|
|
42
|
-
* Discriminated union over every reason `PartitionedDispatcher.offer` can
|
|
43
|
-
* reject an inbound request. Exhaustive: adding a new branch fails every
|
|
44
|
-
* `match` site at compile time. Branch handlers in the reader's
|
|
45
|
-
* frame-routing path discriminate on `_tag` to pick the right wire-error
|
|
46
|
-
* code.
|
|
47
|
-
*/
|
|
48
|
-
export type OfferRejected = PartitionLimitError | PartitionQueueFullError;
|
|
49
|
-
export {};
|
|
50
|
-
//# sourceMappingURL=app-callback-dispatcher-errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-dispatcher-errors.d.ts","sourceRoot":"","sources":["../../src/internal/app-callback-dispatcher-errors.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;;;;AAEnD;;;;;;;;;GASG;AACH,qBAAa,mBAAoB,SAAQ,yBAEvC;IACA,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,gBAAgB,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAAC;CAAG;;;;AAEL;;;;;;;;;GASG;AACH,qBAAa,uBAAwB,SAAQ,6BAE3C;IACA,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,SAAS,EAAE,SAAS,CAAC;CAC/B,CAAC;CAAG;AAEL;;;;;;GAMG;AACH,MAAM,MAAM,aAAa,GAAG,mBAAmB,GAAG,uBAAuB,CAAC"}
|
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Tagged error types for the partitioned appCallback dispatcher.
|
|
3
|
-
*
|
|
4
|
-
* Spec: moltzap#356 — partitioned dispatch keyed on
|
|
5
|
-
* `(taskId, conversationId, hookKind)`.
|
|
6
|
-
*
|
|
7
|
-
* All errors are surfaced on `PartitionedDispatcher.offer`'s typed channel.
|
|
8
|
-
* The reader fiber translates each tag into an immediate appCallback error response
|
|
9
|
-
* so the server's `Deferred.await` resolves deterministically (no hangs).
|
|
10
|
-
*/
|
|
11
|
-
import { Data } from "effect";
|
|
12
|
-
/**
|
|
13
|
-
* The active-partition count has reached `maxPartitions` (soft cap, default
|
|
14
|
-
* 256). New partitions cannot be allocated until an existing partition is
|
|
15
|
-
* reaped by the idle reaper or the connection scope closes. Per-tenant DoS
|
|
16
|
-
* guard.
|
|
17
|
-
*
|
|
18
|
-
* Failure mode is liveness — the request is rejected without contention
|
|
19
|
-
* with existing partitions. Reader synthesizes a `-32000 Server busy`
|
|
20
|
-
* error response so the server retries / falls through.
|
|
21
|
-
*/
|
|
22
|
-
export class PartitionLimitError extends Data.TaggedError("PartitionLimitError") {
|
|
23
|
-
}
|
|
24
|
-
/**
|
|
25
|
-
* The target partition's bounded queue is at capacity (default 32). Slow
|
|
26
|
-
* handler is backpressuring its own partition. Other partitions are
|
|
27
|
-
* unaffected.
|
|
28
|
-
*
|
|
29
|
-
* Failure mode is per-partition liveness — the queue is full ONLY for this
|
|
30
|
-
* tuple. Reader synthesizes a `-32000 Partition busy` error response;
|
|
31
|
-
* server may retry or surface the failure to the originator (AppHost
|
|
32
|
-
* fail-CLOSED verdict for hooks).
|
|
33
|
-
*/
|
|
34
|
-
export class PartitionQueueFullError extends Data.TaggedError("PartitionQueueFullError") {
|
|
35
|
-
}
|
|
36
|
-
//# sourceMappingURL=app-callback-dispatcher-errors.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-dispatcher-errors.js","sourceRoot":"","sources":["../../src/internal/app-callback-dispatcher-errors.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAG9B;;;;;;;;;GASG;AACH,MAAM,OAAO,mBAAoB,SAAQ,IAAI,CAAC,WAAW,CACvD,qBAAqB,CAMrB;CAAG;AAEL;;;;;;;;;GASG;AACH,MAAM,OAAO,uBAAwB,SAAQ,IAAI,CAAC,WAAW,CAC3D,yBAAyB,CAKzB;CAAG"}
|
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure partition-key extractor for the partitioned appCallback dispatcher.
|
|
3
|
-
*
|
|
4
|
-
* Spec: moltzap#356.
|
|
5
|
-
*
|
|
6
|
-
* `decodeFrames` is the wire boundary. It matches the JSON-RPC method to an
|
|
7
|
-
* app-callback descriptor, validates params against that descriptor, and
|
|
8
|
-
* projects the routing tuple. This module only receives that typed decoded
|
|
9
|
-
* request and turns the tuple into an opaque branded `PartitionKey`.
|
|
10
|
-
*
|
|
11
|
-
* There is no malformed-input branch here: malformed app-callback frames are
|
|
12
|
-
* rejected before a request can enter the dispatcher.
|
|
13
|
-
*/
|
|
14
|
-
import { Brand } from "effect";
|
|
15
|
-
import { type AnyTaskCallbackRpcDefinition, type DecodedRpcRequest, type JsonRpcId } from "@moltzap/protocol";
|
|
16
|
-
/**
|
|
17
|
-
* Branded partition-key string. Constructed only by `extractPartitionKey`.
|
|
18
|
-
* Format is opaque to consumers; equality is value equality.
|
|
19
|
-
*/
|
|
20
|
-
export type PartitionKey = string & Brand.Brand<"PartitionKey">;
|
|
21
|
-
export declare const PartitionKey: Brand.Brand.Constructor<PartitionKey>;
|
|
22
|
-
declare const PartitionKeyInvariantError_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 & {
|
|
23
|
-
readonly _tag: "PartitionKeyInvariantError";
|
|
24
|
-
} & Readonly<A>;
|
|
25
|
-
export declare class PartitionKeyInvariantError extends PartitionKeyInvariantError_base<{
|
|
26
|
-
readonly key: PartitionKey;
|
|
27
|
-
readonly message: string;
|
|
28
|
-
}> {
|
|
29
|
-
}
|
|
30
|
-
export interface AppCallbackPartitionRoute {
|
|
31
|
-
readonly taskId: string;
|
|
32
|
-
readonly conversationId: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Shape the dispatcher receives after the wire decoder has matched an
|
|
36
|
-
* app-callback descriptor and validated params against that descriptor.
|
|
37
|
-
*/
|
|
38
|
-
export type PartitionableRequest = DecodedRpcRequest<AnyTaskCallbackRpcDefinition> & {
|
|
39
|
-
readonly id: JsonRpcId;
|
|
40
|
-
readonly partition: AppCallbackPartitionRoute;
|
|
41
|
-
};
|
|
42
|
-
/**
|
|
43
|
-
* Project a partition key from a typed appCallback request. The wire decoder
|
|
44
|
-
* has already validated method membership and params shape, so this function
|
|
45
|
-
* has no malformed-input branch.
|
|
46
|
-
*/
|
|
47
|
-
export declare function extractPartitionKey(request: PartitionableRequest): PartitionKey;
|
|
48
|
-
/**
|
|
49
|
-
* Inverse projection for tests + observability. Pure deconstruction of a
|
|
50
|
-
* `PartitionKey` back into its three components.
|
|
51
|
-
*/
|
|
52
|
-
export declare function describePartitionKey(key: PartitionKey): {
|
|
53
|
-
readonly taskId: string;
|
|
54
|
-
readonly conversationId: string;
|
|
55
|
-
readonly definition: AnyTaskCallbackRpcDefinition;
|
|
56
|
-
};
|
|
57
|
-
export {};
|
|
58
|
-
//# sourceMappingURL=app-callback-partition-key.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-partition-key.d.ts","sourceRoot":"","sources":["../../src/internal/app-callback-partition-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,KAAK,EAAQ,MAAM,QAAQ,CAAC;AAErC,OAAO,EACL,KAAK,4BAA4B,EACjC,KAAK,iBAAiB,EACtB,KAAK,SAAS,EACf,MAAM,mBAAmB,CAAC;AAE3B;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,KAAK,CAAC,KAAK,CAAC,cAAc,CAAC,CAAC;AAChE,eAAO,MAAM,YAAY,uCAAgC,CAAC;;;;AAE1D,qBAAa,0BAA2B,SAAQ,gCAE9C;IACA,QAAQ,CAAC,GAAG,EAAE,YAAY,CAAC;IAC3B,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC;CAC1B,CAAC;CAAG;AAwBL,MAAM,WAAW,yBAAyB;IACxC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;CACjC;AAED;;;GAGG;AACH,MAAM,MAAM,oBAAoB,GAC9B,iBAAiB,CAAC,4BAA4B,CAAC,GAAG;IAChD,QAAQ,CAAC,EAAE,EAAE,SAAS,CAAC;IACvB,QAAQ,CAAC,SAAS,EAAE,yBAAyB,CAAC;CAC/C,CAAC;AAEJ;;;;GAIG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,oBAAoB,GAC5B,YAAY,CAId;AAED;;;GAGG;AACH,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,YAAY,GAAG;IACvD,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,cAAc,EAAE,MAAM,CAAC;IAChC,QAAQ,CAAC,UAAU,EAAE,4BAA4B,CAAC;CACnD,CA6BA"}
|
|
@@ -1,80 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Pure partition-key extractor for the partitioned appCallback dispatcher.
|
|
3
|
-
*
|
|
4
|
-
* Spec: moltzap#356.
|
|
5
|
-
*
|
|
6
|
-
* `decodeFrames` is the wire boundary. It matches the JSON-RPC method to an
|
|
7
|
-
* app-callback descriptor, validates params against that descriptor, and
|
|
8
|
-
* projects the routing tuple. This module only receives that typed decoded
|
|
9
|
-
* request and turns the tuple into an opaque branded `PartitionKey`.
|
|
10
|
-
*
|
|
11
|
-
* There is no malformed-input branch here: malformed app-callback frames are
|
|
12
|
-
* rejected before a request can enter the dispatcher.
|
|
13
|
-
*/
|
|
14
|
-
import { Brand, Data } from "effect";
|
|
15
|
-
import {} from "@moltzap/protocol";
|
|
16
|
-
export const PartitionKey = Brand.nominal();
|
|
17
|
-
export class PartitionKeyInvariantError extends Data.TaggedError("PartitionKeyInvariantError") {
|
|
18
|
-
}
|
|
19
|
-
/**
|
|
20
|
-
* Field separator inside a `PartitionKey`. ASCII vertical bar; not legal
|
|
21
|
-
* in a UUID and not legal in any of our `appId` values, so the encoded
|
|
22
|
-
* key parses unambiguously.
|
|
23
|
-
*/
|
|
24
|
-
const KEY_SEP = "|";
|
|
25
|
-
const definitionSegments = new WeakMap();
|
|
26
|
-
const definitionsBySegment = new Map();
|
|
27
|
-
let nextDefinitionSegment = 0;
|
|
28
|
-
const segmentForDefinition = (definition) => {
|
|
29
|
-
const existing = definitionSegments.get(definition);
|
|
30
|
-
if (existing !== undefined)
|
|
31
|
-
return existing;
|
|
32
|
-
const segment = `rpc${nextDefinitionSegment}`;
|
|
33
|
-
nextDefinitionSegment += 1;
|
|
34
|
-
definitionSegments.set(definition, segment);
|
|
35
|
-
definitionsBySegment.set(segment, definition);
|
|
36
|
-
return segment;
|
|
37
|
-
};
|
|
38
|
-
/**
|
|
39
|
-
* Project a partition key from a typed appCallback request. The wire decoder
|
|
40
|
-
* has already validated method membership and params shape, so this function
|
|
41
|
-
* has no malformed-input branch.
|
|
42
|
-
*/
|
|
43
|
-
export function extractPartitionKey(request) {
|
|
44
|
-
return PartitionKey(`${request.partition.taskId}${KEY_SEP}${request.partition.conversationId}${KEY_SEP}${segmentForDefinition(request.definition)}`);
|
|
45
|
-
}
|
|
46
|
-
/**
|
|
47
|
-
* Inverse projection for tests + observability. Pure deconstruction of a
|
|
48
|
-
* `PartitionKey` back into its three components.
|
|
49
|
-
*/
|
|
50
|
-
export function describePartitionKey(key) {
|
|
51
|
-
// Method is the only field that can contain a slash; taskId is a
|
|
52
|
-
// UUID and conversationId is a UUID or the lifecycle sentinel. Split
|
|
53
|
-
// on the first two `KEY_SEP` occurrences only so a hypothetical
|
|
54
|
-
// future method name with `KEY_SEP` (impossible today; ASCII `|`)
|
|
55
|
-
// would still round-trip cleanly.
|
|
56
|
-
const first = key.indexOf(KEY_SEP);
|
|
57
|
-
const second = first === -1 ? -1 : key.indexOf(KEY_SEP, first + 1);
|
|
58
|
-
if (first === -1 || second === -1) {
|
|
59
|
-
// `extractPartitionKey` is the only constructor; an unparsable key
|
|
60
|
-
// means a caller bypassed branding. This is a programmer error,
|
|
61
|
-
// not a runtime user-input failure — fail loudly.
|
|
62
|
-
throw new PartitionKeyInvariantError({
|
|
63
|
-
key,
|
|
64
|
-
message: `describePartitionKey: malformed PartitionKey: ${key}`,
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
const definition = definitionsBySegment.get(key.slice(second + 1));
|
|
68
|
-
if (definition === undefined) {
|
|
69
|
-
throw new PartitionKeyInvariantError({
|
|
70
|
-
key,
|
|
71
|
-
message: `describePartitionKey: unknown descriptor segment: ${key}`,
|
|
72
|
-
});
|
|
73
|
-
}
|
|
74
|
-
return {
|
|
75
|
-
taskId: key.slice(0, first),
|
|
76
|
-
conversationId: key.slice(first + 1, second),
|
|
77
|
-
definition,
|
|
78
|
-
};
|
|
79
|
-
}
|
|
80
|
-
//# sourceMappingURL=app-callback-partition-key.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"app-callback-partition-key.js","sourceRoot":"","sources":["../../src/internal/app-callback-partition-key.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AACH,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAIN,MAAM,mBAAmB,CAAC;AAO3B,MAAM,CAAC,MAAM,YAAY,GAAG,KAAK,CAAC,OAAO,EAAgB,CAAC;AAE1D,MAAM,OAAO,0BAA2B,SAAQ,IAAI,CAAC,WAAW,CAC9D,4BAA4B,CAI5B;CAAG;AAEL;;;;GAIG;AACH,MAAM,OAAO,GAAG,GAAG,CAAC;AACpB,MAAM,kBAAkB,GAAG,IAAI,OAAO,EAAwC,CAAC;AAC/E,MAAM,oBAAoB,GAAG,IAAI,GAAG,EAAwC,CAAC;AAC7E,IAAI,qBAAqB,GAAG,CAAC,CAAC;AAE9B,MAAM,oBAAoB,GAAG,CAC3B,UAAwC,EAChC,EAAE;IACV,MAAM,QAAQ,GAAG,kBAAkB,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC;IACpD,IAAI,QAAQ,KAAK,SAAS;QAAE,OAAO,Q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