@ewhauser/world-celld 0.4.0 → 0.5.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/worker.d.ts CHANGED
@@ -1,4 +1,31 @@
1
- import { CreateEventParams, CreateEventRequest, Event, Hook, RunCreatedEventRequest, Step, TerminalWorkflowRunStatus, ValidQueueName, Wait, WorkflowRun, WorkflowRunStatus } from "@workflow/world";
1
+ import { i as QueuePayloadRegistration, r as QueuePayloadOrphan, t as QueueDeliveryResult } from "./queue-delivery-DzNOtCYA.js";
2
+ import { CreateEventParams, CreateEventRequest, Event, Hook, RunCreatedEventRequest, Step, TerminalWorkflowRunStatus, Wait, WorkflowRun, WorkflowRunStatus } from "@workflow/world";
3
+ //#region src/worker/queue-payload-store.d.ts
4
+ /**
5
+ * Provider-neutral storage used for run-bearing native Queue payloads.
6
+ *
7
+ * celld v0.4 exposes a namespace in the fleet's existing object store through
8
+ * the Workers R2-compatible binding shape. Keep that platform shape here so
9
+ * queue and retention code depend only on QueuePayloadStore.
10
+ */
11
+ interface QueuePayloadStore {
12
+ write(key: string, value: string, metadata: {
13
+ runId: string;
14
+ messageId: string;
15
+ }): Promise<void>;
16
+ read(key: string): Promise<string | null>;
17
+ delete(keys: string | string[]): Promise<void>;
18
+ }
19
+ interface QueuePayloadObjectStorageBinding {
20
+ put(key: string, value: string, options?: {
21
+ customMetadata?: Record<string, string>;
22
+ }): Promise<unknown>;
23
+ get(key: string): Promise<{
24
+ text(): Promise<string>;
25
+ } | null>;
26
+ delete(keys: string | string[]): Promise<void>;
27
+ }
28
+ //#endregion
2
29
  //#region src/worker/router.d.ts
3
30
  /** Minimal structural DO namespace type (celld provides the real thing). */
4
31
  interface DONamespaceLike {
@@ -9,20 +36,49 @@ interface DONamespaceLike {
9
36
  toString(): string;
10
37
  }): unknown;
11
38
  }
39
+ interface NativeQueueBindingLike {
40
+ send(body: string, options?: {
41
+ contentType?: 'text';
42
+ delaySeconds?: number;
43
+ }): Promise<unknown>;
44
+ }
12
45
  interface WorkerEnv {
13
46
  WORKFLOW_DB: DONamespaceLike;
14
47
  WORKFLOW_STREAMS: DONamespaceLike;
15
48
  WORKFLOW_RUN_CATALOG: DONamespaceLike;
16
49
  WORKFLOW_HOOK_TOKENS: DONamespaceLike;
17
50
  WORKFLOW_HOOK_IDS: DONamespaceLike;
18
- WORKFLOW_QUEUE: DONamespaceLike;
51
+ WORKFLOW_QUEUE: NativeQueueBindingLike;
52
+ WORKFLOW_QUEUE_PAYLOADS?: QueuePayloadStore;
19
53
  WORLD_SECRET?: string;
54
+ WORKFLOW_CALLBACK_SECRET?: string;
20
55
  WORKFLOW_RETENTION_MS?: string | number;
21
56
  WORKFLOW_RETENTION_BATCH_SIZE?: string | number;
22
- WORKFLOW_RETENTION_QUEUE_SHARDS?: string | number;
23
57
  }
24
58
  declare function createRouter(env: WorkerEnv): (request: Request) => Promise<Response>;
25
59
  //#endregion
60
+ //#region src/worker/do-base.d.ts
61
+ /**
62
+ * Durable Object base class — Node variant.
63
+ *
64
+ * The cell classes extend `DurableObject` so celld's JS RPC works on their
65
+ * stubs. This module is what Node builds (tests, the `./testing` in-process
66
+ * fleet) resolve; the worker build swaps it for do-base-workerd.ts, which
67
+ * re-exports the real `cloudflare:workers` base (see tsdown.config.ts).
68
+ * Behaviorally identical at this layer: the base only assigns ctx/env.
69
+ */
70
+ declare class DurableObject<TEnv = unknown> {
71
+ readonly ctx: DurableObjectState;
72
+ readonly env: TEnv;
73
+ constructor(ctx: DurableObjectState, env: TEnv);
74
+ }
75
+ /** Node-only base for testing named Worker entrypoints. */
76
+ declare class WorkerEntrypoint<TEnv = unknown> {
77
+ readonly ctx: ExecutionContext;
78
+ readonly env: TEnv;
79
+ constructor(ctx: ExecutionContext, env: TEnv);
80
+ }
81
+ //#endregion
26
82
  //#region src/retention.d.ts
27
83
  type CleanupPhase = 'retained' | 'index' | 'streams' | 'queues' | 'payload' | 'tombstoned';
28
84
  interface CleanupRecord {
@@ -38,7 +94,6 @@ interface CleanupRecord {
38
94
  terminalStatus?: TerminalWorkflowRunStatus;
39
95
  reason?: 'terminal-retention' | 'maximum-age' | 'manual';
40
96
  dueAt: Date;
41
- queueShards: number;
42
97
  phase: CleanupPhase;
43
98
  /** Optimistic-concurrency token for alarm/RPC work that awaits another cell. */
44
99
  generation: number;
@@ -48,7 +103,8 @@ interface CleanupRecord {
48
103
  tombstonedAt?: Date;
49
104
  deletedPayloadKeys: number;
50
105
  deletedStreams: number;
51
- deletedQueueMessages: number;
106
+ /** Queue payload objects removed from object storage during run cleanup. */
107
+ deletedQueuePayloads: number;
52
108
  }
53
109
  interface RunTombstone {
54
110
  version: 1;
@@ -92,26 +148,8 @@ interface ExpireStreamResult {
92
148
  bytes: number;
93
149
  done: boolean;
94
150
  }
95
- interface QueueExpiryReceipt {
96
- expiredAt: number;
97
- deleted: number;
98
- }
99
- type ExpireQueueRunResult = {
100
- /** Cumulative messages removed for this run in this queue shard. */
101
- deleted: number;
102
- } & ({
103
- done: false;
104
- } | {
105
- done: true;
106
- /** Durable receipt which the cleanup coordinator must acknowledge. */
107
- receipt: QueueExpiryReceipt;
108
- });
109
- interface AcknowledgeQueueExpiryResult {
110
- acknowledged: boolean;
111
- }
112
151
  interface ScheduleCleanupRequest {
113
152
  retentionMs: number;
114
- queueShards: number;
115
153
  }
116
154
  interface EnforceRetentionRequest extends ScheduleCleanupRequest {
117
155
  /** Cron occurrence being enforced. A run is eligible only at/before this time. */
@@ -216,44 +254,6 @@ interface StreamReadResult {
216
254
  error?: StreamErrorData;
217
255
  }
218
256
  //#endregion
219
- //#region src/queue.d.ts
220
- type Pathname = 'flow';
221
- /**
222
- * Enqueue request accepted by a QueueDO cell. The message payload travels
223
- * pre-encoded with the shared tagged-JSON codec (`body`), so the cell can
224
- * forward it byte-identical to the app's queue handler without re-encoding.
225
- */
226
- interface EnqueueRequest {
227
- messageId: string;
228
- queueName: ValidQueueName;
229
- pathname: Pathname;
230
- /** `stringify(message)` — the exact bytes POSTed to the app on delivery. */
231
- body: string;
232
- /** Owning workflow run; absent only for health-check messages. */
233
- runId?: string;
234
- idempotencyKey?: string;
235
- delaySeconds?: number;
236
- /**
237
- * Delivery configuration. The cell pins this from its first enqueue (the
238
- * eve-ambient pattern); a later mismatch is rejected as CONFIG_MISMATCH.
239
- */
240
- config: QueueCellConfig;
241
- }
242
- interface QueueCellConfig {
243
- /** Base URL of the app; deliveries POST to `${baseUrl}/.well-known/workflow/v1/flow`. */
244
- targetBaseUrl: string;
245
- queueShards: number;
246
- }
247
- type EnqueueOutcome = {
248
- ok: true;
249
- messageId: string;
250
- deduped: boolean;
251
- } | {
252
- ok: false;
253
- code: 'CONFIG_MISMATCH' | 'RUN_EXPIRED';
254
- message: string;
255
- };
256
- //#endregion
257
257
  //#region src/indexes.d.ts
258
258
  interface IndexListOptions {
259
259
  prefix?: string;
@@ -264,9 +264,11 @@ interface IndexListOptions {
264
264
  reverse?: boolean;
265
265
  }
266
266
  interface IndexListPage {
267
+ /** sourceShard is populated by the merged fleet index for exact follow-up mutation. */
267
268
  keys: Array<{
268
269
  name: string;
269
270
  value: string;
271
+ sourceShard?: string;
270
272
  }>;
271
273
  list_complete: boolean;
272
274
  cursor?: string;
@@ -285,22 +287,6 @@ interface HookTokenOwner {
285
287
  hookId: string;
286
288
  }
287
289
  //#endregion
288
- //#region src/worker/do-base.d.ts
289
- /**
290
- * Durable Object base class — Node variant.
291
- *
292
- * The cell classes extend `DurableObject` so celld's JS RPC works on their
293
- * stubs. This module is what Node builds (tests, the `./testing` in-process
294
- * fleet) resolve; the worker build swaps it for do-base-workerd.ts, which
295
- * re-exports the real `cloudflare:workers` base (see tsdown.config.ts).
296
- * Behaviorally identical at this layer: the base only assigns ctx/env.
297
- */
298
- declare class DurableObject<TEnv = unknown> {
299
- readonly ctx: DurableObjectState;
300
- readonly env: TEnv;
301
- constructor(ctx: DurableObjectState, env: TEnv);
302
- }
303
- //#endregion
304
290
  //#region src/worker/durable-objects/hook-index-shared.d.ts
305
291
  interface RunLifecycleStub {
306
292
  getLifecycleStatus(): Promise<RunLifecycleStatus>;
@@ -365,104 +351,6 @@ declare class HookTokenDO extends DurableObject<HookIndexEnv> {
365
351
  private compactClaims;
366
352
  }
367
353
  //#endregion
368
- //#region src/worker/durable-objects/QueueDO.d.ts
369
- /**
370
- * Queue cell: the celld replacement for Cloudflare Queues.
371
- *
372
- * One cell (`q:<shard>`) owns the full lifecycle of its messages: durable
373
- * scheduling via the cell alarm, delivery via outbound fetch (the same x-vqs
374
- * dialect as the in-process test pump), retries with capped exponential
375
- * backoff, idempotencyKey dedup, and a dead-letter table.
376
- *
377
- * Storage layout (KV-style, ordered scans via zero-padded epoch-ms keys):
378
- * cfg pinned QueueCellConfig (first-enqueue wins)
379
- * msg:<messageId> MessageRow
380
- * due:<paddedMs>:<messageId> schedule index -> messageId
381
- * inflight-deadline:<paddedMs>:<messageId>
382
- * ordered crash-recovery index -> messageId
383
- * key:<idempotencyKey> active dedup claim -> messageId
384
- * dlq:<paddedMs>:<messageId> DeadLetterRow
385
- * run:<runId>:<messageId> QueueRunReference for retention cleanup
386
- * expired-run:<runId> cumulative cleanup receipt; compactable only
387
- * after RunDO acknowledgement
388
- * expired-run-gc:<paddedMs>:<runId>
389
- * ordered compaction deadline -> runId
390
- *
391
- * celld gotchas designed around:
392
- * - celld#144 (alarm handlers can overlap): the storage-only claim phase runs
393
- * inside blockConcurrencyWhile; slow delivery I/O runs outside the gate via
394
- * waitUntil.
395
- * - six-failure alarm abandonment: the alarm handler never throws for data
396
- * conditions — backoff reschedules the alarm instead. rearmAlarm() is the
397
- * recovery hatch, and every enqueue also re-arms.
398
- * - deploys restart the fleet: in-flight deliveries die with the isolate; the
399
- * inflight-deadline sweep on the next alarm redelivers (at-least-once).
400
- */
401
- interface MessageRow {
402
- messageId: string;
403
- queueName: string;
404
- pathname: 'flow' | 'step';
405
- /** Pre-encoded tagged-JSON payload — forwarded byte-identical. */
406
- body: string;
407
- runId?: string;
408
- /**
409
- * Delivery target captured at enqueue time. Carried per message (not
410
- * pinned on the cell) so an app redeploy at a new URL never bricks the
411
- * queue: old messages deliver (or dead-letter) against their original
412
- * target, new messages against the new one.
413
- */
414
- targetBaseUrl: string;
415
- idempotencyKey?: string;
416
- /** Completed delivery attempts. */
417
- attempt: number;
418
- enqueuedAt: number;
419
- lastError?: string;
420
- }
421
- interface DeadLetterRow extends MessageRow {
422
- failedAt: number;
423
- }
424
- interface QueueStats {
425
- pending: number;
426
- inflight: number;
427
- deadLetters: number;
428
- alarmAt: number | null;
429
- }
430
- declare class QueueDO extends DurableObject {
431
- #private;
432
- enqueue(request: EnqueueRequest): Promise<EnqueueOutcome>;
433
- alarm(): Promise<void>;
434
- stats(): Promise<QueueStats>;
435
- listDeadLetters(params?: {
436
- limit?: number;
437
- cursor?: string;
438
- }): Promise<{
439
- data: DeadLetterRow[];
440
- cursor: string | null;
441
- hasMore: boolean;
442
- }>;
443
- /** Move a dead letter back to the live queue (attempt count reset). */
444
- redriveDeadLetter(messageId: string): Promise<{
445
- ok: boolean;
446
- }>;
447
- purgeDeadLetters(): Promise<{
448
- purged: number;
449
- hasMore: boolean;
450
- }>;
451
- /**
452
- * Recovery hatch for celld's six-failure alarm abandonment: derive the due
453
- * time again and arm it.
454
- */
455
- rearmAlarm(): Promise<{
456
- alarmAt: number | null;
457
- }>;
458
- /** Fence a run and purge every live, inflight, and dead-letter message it owns. */
459
- expireRun(runId: string, expiredAt: number, options?: {
460
- limit?: number;
461
- }): Promise<ExpireQueueRunResult>;
462
- /** Acknowledge a final cleanup receipt before making its marker compactable. */
463
- acknowledgeExpireRun(runId: string, receipt: QueueExpiryReceipt): Promise<AcknowledgeQueueExpiryResult>;
464
- }
465
- //#endregion
466
354
  //#region src/worker/durable-objects/RunCatalogDO.d.ts
467
355
  /** One of a fixed set of run-catalog shards, routed by the stable run ID hash. */
468
356
  declare class RunCatalogDO extends DurableObject {
@@ -475,7 +363,7 @@ declare class RunCatalogDO extends DurableObject {
475
363
  deleteStaleGlobalRun(runId: string, key: string, expectedValue: string): Promise<{
476
364
  deleted: boolean;
477
365
  }>;
478
- expireRun(runId: string, keys: string[], expiredAt: number): Promise<ExpireRunIndexesResult>;
366
+ expireRun(runId: string, expiredAt: number): Promise<ExpireRunIndexesResult>;
479
367
  alarm(): Promise<void>;
480
368
  private armAtMost;
481
369
  private compactExpiryFences;
@@ -540,8 +428,8 @@ declare class StreamDO extends DurableObject {
540
428
  * storage transaction: guard checks, the event append, and the entity
541
429
  * mutation are atomic even if the DO is evicted mid-operation.
542
430
  *
543
- * Instances named `claim:<queueName>:<idempotencyKey>` are used purely as
544
- * queue-message dedup claims (see claimInflight/releaseInflight).
431
+ * Instances named `claim:<queueName>:<idempotencyKey>` reserve one message ID
432
+ * at publication time and serialize its deliveries until completion.
545
433
  */
546
434
  declare class WorkflowRunDO extends DurableObject {
547
435
  private now;
@@ -624,13 +512,45 @@ declare class WorkflowRunDO extends DurableObject {
624
512
  private deletePayloadBatch;
625
513
  private recordCleanupFailure;
626
514
  private recordTerminalCleanupFailure;
515
+ registerQueuePayload(registration: QueuePayloadRegistration): Promise<{
516
+ ok: true;
517
+ } | {
518
+ ok: false;
519
+ message: string;
520
+ }>;
521
+ finalizeQueuePayload(messageId: string): Promise<{
522
+ ok: true;
523
+ } | {
524
+ ok: false;
525
+ message: string;
526
+ }>;
527
+ unregisterQueuePayload(messageId: string): Promise<void>;
528
+ scheduleQueuePayloadOrphan(orphan: QueuePayloadOrphan): Promise<void>;
529
+ cancelQueuePayloadOrphan(messageId: string): Promise<void>;
530
+ reserveQueueMessage(params: {
531
+ messageId: string;
532
+ expiresAt: number;
533
+ }): Promise<{
534
+ admitted: boolean;
535
+ messageId: string;
536
+ }>;
537
+ completeQueueMessage(messageId: string): Promise<void>;
627
538
  claimInflight(params: {
628
539
  messageId: string;
629
540
  staleMs: number;
630
541
  }): Promise<{
631
542
  claimed: boolean;
543
+ retryAt?: number;
544
+ }>;
545
+ holdInflight(params: {
546
+ messageId: string;
547
+ retryAt: number;
548
+ expiresAt: number;
549
+ reservationExpiresAt?: number;
550
+ }): Promise<{
551
+ held: boolean;
632
552
  }>;
633
- releaseInflight(): Promise<void>;
553
+ releaseInflight(messageId?: string): Promise<void>;
634
554
  }
635
555
  //#endregion
636
556
  //#region src/worker/worker.d.ts
@@ -638,11 +558,18 @@ interface ScheduledControllerLike {
638
558
  scheduledTime: number;
639
559
  cron: string;
640
560
  }
641
- declare function scheduled(controller: ScheduledControllerLike, env: WorkerEnv): Promise<void>;
561
+ type CelldWorkerEnv = Omit<WorkerEnv, 'WORKFLOW_QUEUE_PAYLOADS'> & {
562
+ WORKFLOW_QUEUE_PAYLOADS?: QueuePayloadObjectStorageBinding;
563
+ };
564
+ declare function scheduled(controller: ScheduledControllerLike, env: CelldWorkerEnv): Promise<void>;
642
565
  declare const _default: {
643
- fetch(request: Request, env: WorkerEnv): Promise<Response>;
566
+ fetch(request: Request, env: CelldWorkerEnv): Promise<Response>;
644
567
  scheduled: typeof scheduled;
645
568
  };
569
+ /** Only the companion consumer binds this internal delivery entrypoint. */
570
+ declare class QueueDeliveryRpc extends WorkerEntrypoint<CelldWorkerEnv> {
571
+ deliver(secret: unknown, envelope: unknown, attempt: unknown): Promise<QueueDeliveryResult>;
572
+ }
646
573
  //#endregion
647
- export { HookIdDO, HookTokenDO, QueueDO, RunCatalogDO, StreamDO, type WorkerEnv, WorkflowRunDO, createRouter, _default as default };
574
+ export { HookIdDO, HookTokenDO, QueueDeliveryRpc, RunCatalogDO, StreamDO, type WorkerEnv, WorkflowRunDO, createRouter, _default as default };
648
575
  //# sourceMappingURL=worker.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"worker.d.ts","names":[],"sources":["../src/worker/router.ts","../src/retention.ts","../src/apply-event.ts","../src/stream-protocol.ts","../src/queue.ts","../src/indexes.ts","../src/config.ts","../src/worker/do-base.ts","../src/worker/durable-objects/hook-index-shared.ts","../src/worker/durable-objects/HookIdDO.ts","../src/worker/durable-objects/HookTokenDO.ts","../src/worker/durable-objects/QueueDO.ts","../src/worker/durable-objects/RunCatalogDO.ts","../src/worker/durable-objects/StreamDO.ts","../src/worker/durable-objects/WorkflowRunDO.ts","../src/worker/worker.ts"],"mappings":";;;UA8CiB;EACf,WAAW;IAAiB;;EAC5B,IAAI;IAAM;;;UAGK;EACf,aAAa;EACb,kBAAkB;EAClB,sBAAsB;EACtB,sBAAsB;EACtB,mBAAmB;EACnB,gBAAgB;EAChB;EACA;EACA;EACA;;iBA8Ic,aAAa,KAAK,aAAS,SAClB,YAAU,QAAQ;;;KCrM/B;UAEK;EACf;EACA;EACA;EACA,WAAW;;EAEX,SAAS;;EAET,cAAc;;EAEd,iBAAiB;EACjB;EACA,OAAO;EACP;EACA,OAAO;;EAEP;EACA;EACA;EACA,gBAAgB;EAChB,eAAe;EACf;EACA;EACA;;UAGe;EACf;EACA;;EAEA,SAAS;EACT,cAAc;EACd,iBAAiB;EACjB,WAAW;EACX,cAAc;;EAEd,SAAS;;KAGC;KAEA,eAAe;EACrB;EAAU,OAAO;;EACjB;EAAW;EAAqB;EAAiB,WAAW;;UAiCjD;EACf;;UAGe;EACf;;UAGe;;EAEf;EACA;;UAGe;;EAEf;;EAEA;;EAEA;EACA;;UAGe;EACf;EACA;;KAGU;;EAEV;;EAEI;;EAEA;;EAEA,SAAS;;UAIE;EACf;;UAGe;EACf;EACA;;UAGe,gCAAgC;;EAE/C;;KAGU;EACN;EAA8B;;EAC9B;EAAgC,SAAS;;;;UCQ9B;;EAEf;EACA,MAAM,qBAAqB;;EAE3B,SAAS;;;;;EAKT;IAAgB;IAAe;;;EAE/B;;EAEA,UAAU;;KAGA;UAWK;EACf;EACA,MAAM;EACN;;EAEA;;EAEA;;UAGe;EACf;;EAEA,QAAQ;EACR,MAAM;EACN,OAAO;EACP,OAAO;EACP,OAAO;;EAEP;;EAEA,eAAe;IAAQ;IAAgB;;;EAEvC;IAAe;IAAsB,WAAW;;;EAEhD,cAA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,SAAS,oBAAoB,QAAQ;;;;;;EAsFhD,sBAAsB;IAC1B;IACA;IACA;MACE;IAAU;;EAkBR,UAAU,QAAQ,eAAe;;EAKjC,sBAAsB,QAAQ;EAgB9B,QAAQ,iBAAiB,QAAQ,eAAe;EAIhD,UAAU;IACd;IACA;IACA;MACE,QAAQ;IAAiB,MAAM;IAAQ;IAAuB;;EAU5D,SAAS,kBAAkB,QAAQ,eAAe;EAIlD,WAAW;IACf;IACA;IACA;MACE,QAAQ;IAAiB,MAAM;IAAS;IAAuB;;EAe7D,UAAU;IACd;IACA;IACA;MACE,QAAQ;IAAiB,MAAM;IAAQ;IAAuB;;EAU5D,oBAAoB,QAAQ;;EAY5B,gBAAgB,SAAS,yBAAyB,QAAQ;;;;;;;;EA+B1D,iBAAiB,SAAS,0BAA0B,QAAQ;EAqF5D,WAAW,SAAS,yBAAyB,QAAQ;EAqBrD,gBAAgB,QAAQ;EAiBxB,SAAS;UAIP;UAQA;UAQM;UA2BA;UAwCA;UA8BA;UAUA;UAoCA;UAiCA;UAsCA;UAqCA;UAsCA;UAgGA;UAsCA;UAwBA;EA0BR,cAAc;IAClB;IACA;MACE;IAAU;;EAgBR,mBAAmB;;;;UCzkCjB;EACR;EACA;;iBAGa,UAAU,YAAY,yBAAyB,KAAK,YAAY;;EAcxD,MAAA,SAAA,SAAO,KAAO,YAAY,QAAQ"}
1
+ {"version":3,"file":"worker.d.ts","names":[],"sources":["../src/worker/queue-payload-store.ts","../src/worker/router.ts","../src/worker/do-base.ts","../src/retention.ts","../src/apply-event.ts","../src/stream-protocol.ts","../src/indexes.ts","../src/config.ts","../src/worker/durable-objects/hook-index-shared.ts","../src/worker/durable-objects/HookIdDO.ts","../src/worker/durable-objects/HookTokenDO.ts","../src/worker/durable-objects/RunCatalogDO.ts","../src/worker/durable-objects/StreamDO.ts","../src/worker/durable-objects/WorkflowRunDO.ts","../src/worker/worker.ts"],"mappings":";;;;;;;;;;UAOiB;EACf,MAAM,aAAa,eAAe;IA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