instar 1.3.501 → 1.3.503

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.
Files changed (93) hide show
  1. package/dist/commands/server.d.ts.map +1 -1
  2. package/dist/commands/server.js +616 -9
  3. package/dist/commands/server.js.map +1 -1
  4. package/dist/config/ConfigDefaults.d.ts.map +1 -1
  5. package/dist/config/ConfigDefaults.js +48 -0
  6. package/dist/config/ConfigDefaults.js.map +1 -1
  7. package/dist/core/BackupManager.d.ts.map +1 -1
  8. package/dist/core/BackupManager.js +7 -0
  9. package/dist/core/BackupManager.js.map +1 -1
  10. package/dist/core/CoherenceJournal.d.ts +1 -1
  11. package/dist/core/CoherenceJournal.d.ts.map +1 -1
  12. package/dist/core/CoherenceJournal.js +5 -1
  13. package/dist/core/CoherenceJournal.js.map +1 -1
  14. package/dist/core/DeliverMessageHandler.d.ts +13 -1
  15. package/dist/core/DeliverMessageHandler.d.ts.map +1 -1
  16. package/dist/core/DeliverMessageHandler.js +7 -0
  17. package/dist/core/DeliverMessageHandler.js.map +1 -1
  18. package/dist/core/MachinePoolRegistry.d.ts +3 -0
  19. package/dist/core/MachinePoolRegistry.d.ts.map +1 -1
  20. package/dist/core/MachinePoolRegistry.js +1 -0
  21. package/dist/core/MachinePoolRegistry.js.map +1 -1
  22. package/dist/core/OwnerSuspectBreaker.d.ts +37 -0
  23. package/dist/core/OwnerSuspectBreaker.d.ts.map +1 -1
  24. package/dist/core/OwnerSuspectBreaker.js +58 -0
  25. package/dist/core/OwnerSuspectBreaker.js.map +1 -1
  26. package/dist/core/OwnershipReconciler.d.ts +102 -0
  27. package/dist/core/OwnershipReconciler.d.ts.map +1 -0
  28. package/dist/core/OwnershipReconciler.js +185 -0
  29. package/dist/core/OwnershipReconciler.js.map +1 -0
  30. package/dist/core/PendingInboundStore.d.ts +310 -0
  31. package/dist/core/PendingInboundStore.d.ts.map +1 -0
  32. package/dist/core/PendingInboundStore.js +715 -0
  33. package/dist/core/PendingInboundStore.js.map +1 -0
  34. package/dist/core/PostUpdateMigrator.d.ts.map +1 -1
  35. package/dist/core/PostUpdateMigrator.js +13 -0
  36. package/dist/core/PostUpdateMigrator.js.map +1 -1
  37. package/dist/core/QueueDrainLoop.d.ts +247 -0
  38. package/dist/core/QueueDrainLoop.d.ts.map +1 -0
  39. package/dist/core/QueueDrainLoop.js +0 -0
  40. package/dist/core/QueueDrainLoop.js.map +1 -0
  41. package/dist/core/SessionOwnership.d.ts +16 -1
  42. package/dist/core/SessionOwnership.d.ts.map +1 -1
  43. package/dist/core/SessionOwnership.js +14 -0
  44. package/dist/core/SessionOwnership.js.map +1 -1
  45. package/dist/core/SessionRouter.d.ts +36 -2
  46. package/dist/core/SessionRouter.d.ts.map +1 -1
  47. package/dist/core/SessionRouter.js +34 -9
  48. package/dist/core/SessionRouter.js.map +1 -1
  49. package/dist/core/devGatedFeatures.d.ts.map +1 -1
  50. package/dist/core/devGatedFeatures.js +10 -0
  51. package/dist/core/devGatedFeatures.js.map +1 -1
  52. package/dist/core/inboundQueueBootSweep.d.ts +61 -0
  53. package/dist/core/inboundQueueBootSweep.d.ts.map +1 -0
  54. package/dist/core/inboundQueueBootSweep.js +207 -0
  55. package/dist/core/inboundQueueBootSweep.js.map +1 -0
  56. package/dist/core/inboundQueueConfig.d.ts +78 -0
  57. package/dist/core/inboundQueueConfig.d.ts.map +1 -0
  58. package/dist/core/inboundQueueConfig.js +135 -0
  59. package/dist/core/inboundQueueConfig.js.map +1 -0
  60. package/dist/core/types.d.ts +23 -0
  61. package/dist/core/types.d.ts.map +1 -1
  62. package/dist/core/types.js.map +1 -1
  63. package/dist/messaging/TelegramAdapter.d.ts +4 -0
  64. package/dist/messaging/TelegramAdapter.d.ts.map +1 -1
  65. package/dist/messaging/TelegramAdapter.js +12 -0
  66. package/dist/messaging/TelegramAdapter.js.map +1 -1
  67. package/dist/monitoring/SessionReaper.d.ts +5 -0
  68. package/dist/monitoring/SessionReaper.d.ts.map +1 -1
  69. package/dist/monitoring/SessionReaper.js +22 -2
  70. package/dist/monitoring/SessionReaper.js.map +1 -1
  71. package/dist/monitoring/guardManifest.d.ts.map +1 -1
  72. package/dist/monitoring/guardManifest.js +27 -0
  73. package/dist/monitoring/guardManifest.js.map +1 -1
  74. package/dist/scaffold/templates.d.ts.map +1 -1
  75. package/dist/scaffold/templates.js +6 -0
  76. package/dist/scaffold/templates.js.map +1 -1
  77. package/dist/server/AgentServer.d.ts +2 -0
  78. package/dist/server/AgentServer.d.ts.map +1 -1
  79. package/dist/server/AgentServer.js +1 -0
  80. package/dist/server/AgentServer.js.map +1 -1
  81. package/dist/server/routes.d.ts +4 -0
  82. package/dist/server/routes.d.ts.map +1 -1
  83. package/dist/server/routes.js +37 -1
  84. package/dist/server/routes.js.map +1 -1
  85. package/package.json +1 -1
  86. package/scripts/lint-guard-manifest.js +2 -0
  87. package/src/data/builtin-manifest.json +65 -65
  88. package/src/scaffold/templates.ts +6 -0
  89. package/upgrades/1.3.502.md +75 -0
  90. package/upgrades/1.3.503.md +61 -0
  91. package/upgrades/side-effects/1.3.492.md +20 -0
  92. package/upgrades/side-effects/durable-inbound-message-queue.md +213 -0
  93. package/upgrades/side-effects/multi-machine-seamlessness-ws13.md +122 -0
@@ -0,0 +1,310 @@
1
+ /**
2
+ * PendingInboundStore — durable custody store for inbound messages the router
3
+ * cannot deliver right now (Durable Inbound Message Queue spec §1).
4
+ *
5
+ * Spec: docs/specs/durable-inbound-message-queue.md (CMT-1118).
6
+ *
7
+ * Path: `<stateDir>/state/pending-inbound.<sanitizedAgentId>.sqlite`, 0600.
8
+ * Pattern: PendingRelayStore, with the spec's named deviations:
9
+ * - `synchronous=FULL` — a custody-ack must survive power loss; this store
10
+ * has no sender-side exit-1 backstop, and write volume is
11
+ * human-message-rate.
12
+ * - chmod 0600 happens BEFORE the WAL pragma so the -wal/-shm sidecars
13
+ * inherit the mode.
14
+ * - The DB handle is a #private field — no raw-handle export, every
15
+ * mutation is a named method (spec §1 round-8: the single-writer executor
16
+ * is a CONTRACT, enforced by encapsulation + a unit test, not convention).
17
+ *
18
+ * Sanitization-collision caveat (inherited from PendingRelayStore): two agent
19
+ * ids that sanitize to the same string would share a file. Same blast radius
20
+ * as the relay store — same-machine, same-user; documented, not defended.
21
+ *
22
+ * The store is data + invariants only. Policy (selection, holds, halt, clock
23
+ * discipline) lives in QueueDrainLoop; the store's methods take explicit
24
+ * `nowIso`/`monoMs` so the policy layer owns time.
25
+ */
26
+ export type InboundEntryState = 'queued' | 'claimed' | 'delivered' | 'expired' | 'dropped-overflow';
27
+ export interface SenderEnvelope {
28
+ userId?: string | number;
29
+ username?: string;
30
+ firstName?: string;
31
+ }
32
+ export interface PendingInboundRow {
33
+ enqueue_seq: number;
34
+ session_key: string;
35
+ message_id: string;
36
+ payload: string | null;
37
+ payload_bytes: number;
38
+ sender_envelope: string | null;
39
+ sender_display: string | null;
40
+ topic_metadata: string | null;
41
+ reason: string;
42
+ state: InboundEntryState;
43
+ terminal_reason: string | null;
44
+ enqueued_at: string;
45
+ enqueued_mono: number | null;
46
+ boot_session_id: string | null;
47
+ lease_epoch: string | null;
48
+ first_held_at: string | null;
49
+ first_frozen_at: string | null;
50
+ total_frozen_ms: number;
51
+ frozen_since: string | null;
52
+ attempts: number;
53
+ next_attempt_at: string | null;
54
+ last_error: string | null;
55
+ delivered_unconfirmed: 0 | 1;
56
+ status_history: string;
57
+ }
58
+ export interface EnqueueInput {
59
+ sessionKey: string;
60
+ messageId: string;
61
+ payload: string;
62
+ senderEnvelope?: SenderEnvelope | null;
63
+ topicMetadata?: unknown;
64
+ reason: string;
65
+ /** Tenure id at enqueue (§3.5) — opaque string from the drain's tenure source. */
66
+ tenure: string | null;
67
+ nowIso: string;
68
+ monoMs: number | null;
69
+ bootSessionId: string | null;
70
+ /** When a pause is durably in effect, new rows are frozen at enqueue (§3.6 round-10). */
71
+ frozenAtEnqueue?: boolean;
72
+ }
73
+ export interface InboundQueueBounds {
74
+ maxPerSession: number;
75
+ maxTotal: number;
76
+ hardMaxTotal: number;
77
+ maxPayloadBytes: number;
78
+ }
79
+ export type EnqueueOutcome = {
80
+ result: 'queued';
81
+ seq: number;
82
+ evicted: EvictedRowInfo | null;
83
+ } | {
84
+ result: 'already-queued';
85
+ existingState: InboundEntryState;
86
+ } | {
87
+ result: 'refused';
88
+ reason: string;
89
+ };
90
+ /** Loss-report locator for an evicted/expired row — NEVER payload content. */
91
+ export interface EvictedRowInfo {
92
+ sessionKey: string;
93
+ messageId: string;
94
+ enqueuedAt: string;
95
+ payloadBytes: number;
96
+ senderDisplay: string | null;
97
+ reason: string;
98
+ }
99
+ export type ReceiptClass = 'injection' | 'remote';
100
+ export interface ReceiptRow {
101
+ session_key: string;
102
+ message_id: string;
103
+ class: ReceiptClass;
104
+ created_at: string;
105
+ injected: 0 | 1;
106
+ reported: 0 | 1;
107
+ }
108
+ /**
109
+ * Durable counter keys (meta table) — spec §2.4 dry-run counters, §4.5 hold
110
+ * counters, and the observability counters. Well-known keys:
111
+ * wouldEnqueue, wouldHold, wouldRefuse, dryRunErrors, orderingViolations,
112
+ * mirrorDrift, possiblyNotInjected, holdBypassedByAttemptsCap, holdsStarted,
113
+ * holdsRecoveredInPlace, holdsReleasedToFailover:budget-exhausted,
114
+ * holdsReleasedToFailover:flap-forced, holdsReleasedToFailover:maxHeldTotal-refused,
115
+ * budgetOverrunHolds.
116
+ */
117
+ export type CounterKey = string;
118
+ export declare function resolvePendingInboundPath(stateDir: string, agentId: string): string;
119
+ export declare class PendingInboundStore {
120
+ #private;
121
+ private constructor();
122
+ /**
123
+ * Open (or create) the store. Throws on an unopenable file — the caller
124
+ * (QueueDrainLoop boot sweep) owns the §5.3 quarantine path; the store
125
+ * never quarantines itself.
126
+ */
127
+ static open(agentId: string, stateDir: string): PendingInboundStore;
128
+ pathOnDisk(): string;
129
+ close(): void;
130
+ /**
131
+ * Take custody of a message. One transaction: existence check + bounds +
132
+ * (possible per-session eviction) + insert (spec §1 Transactions/Bounds).
133
+ *
134
+ * Tri-state semantics (spec §1):
135
+ * - existing row non-terminal or `delivered` → `already-queued` (custody
136
+ * re-affirmed — correct dedupe);
137
+ * - existing row `expired`/`dropped-overflow` → `refused` (the prior
138
+ * instance was loss-reported; re-affirming custody against a row that
139
+ * will never dispatch would be silent loss);
140
+ * - oversize payload → `refused`;
141
+ * - `hardMaxTotal` reached → `refused` (even carve-out appends);
142
+ * - `maxTotal` reached and the session has nothing queued → `refused`
143
+ * (FIRST entries refused; sessions already queued may append);
144
+ * - `maxPerSession` reached → evict that session's oldest `queued` row
145
+ * (never `claimed`) as `dropped-overflow`, returned for loss-reporting.
146
+ *
147
+ * Storage failures (ENOSPC etc.) THROW — the caller maps a throw to
148
+ * `refused` → fall-through (the fail-safe direction, spec §1 round-5).
149
+ * Enqueue must be the caller's last fallible step before returning its
150
+ * outcome (no-throw-after-commit invariant, §2.2).
151
+ */
152
+ enqueue(input: EnqueueInput, bounds: InboundQueueBounds): EnqueueOutcome;
153
+ /** Point read for the custody-aware route-throw catch (§2.2): does a
154
+ * committed NON-TERMINAL row exist for THIS message? Indexed PK lookup.
155
+ * Throws propagate — the caller fails OPEN to fall-through on a read
156
+ * error (a bounded duplicate window, §5-enumerated). */
157
+ hasNonTerminalRow(sessionKey: string, messageId: string): boolean;
158
+ getRow(seq: number): PendingInboundRow | null;
159
+ getRowByCanonicalId(sessionKey: string, messageId: string): PendingInboundRow | null;
160
+ /**
161
+ * Head-only per-session selection (§3.2): for each session whose LOWEST
162
+ * non-terminal seq is `queued`, due (`next_attempt_at` null or <= now), and
163
+ * not frozen, return that head row. Successors inherit the head's schedule
164
+ * by construction (they are simply never selected while the head exists).
165
+ * A session whose lowest non-terminal row is `claimed` is in flight → skip.
166
+ */
167
+ selectEligibleHeads(nowIso: string, limit: number): PendingInboundRow[];
168
+ /** Queued rows with a hold clock running — the boot-rebuild source for the
169
+ * in-memory held-set cache (§3.2: the first_held_at column is AUTHORITATIVE). */
170
+ listHeldRows(): PendingInboundRow[];
171
+ /** Targeted deadline write for the §6 sleep-shift (queued rows only). */
172
+ setNextAttempt(seq: number, nextAttemptAtIso: string | null): void;
173
+ /** Scoped event-trigger reset (§3.2): make a session's queued rows due now. */
174
+ resetNextAttempt(sessionKey: string): number;
175
+ /** All non-terminal rows (boot sweep, §5.3). */
176
+ listNonTerminal(): PendingInboundRow[];
177
+ /** Sessions with operator-stop terminal rows still in retention — the boot
178
+ * sweep's PIS-veto scan (§3.4, STOP-scoped only). */
179
+ listOperatorStopSessions(): string[];
180
+ /** Per-session non-terminal counts + min seq — the mirror rebuild/reconcile
181
+ * source (§2.3). GROUP BY over ≤hardMaxTotal rows. */
182
+ sessionCounts(): Array<{
183
+ session_key: string;
184
+ count: number;
185
+ min_seq: number;
186
+ }>;
187
+ counts(): {
188
+ queued: number;
189
+ claimed: number;
190
+ held: number;
191
+ frozen: number;
192
+ delivered24h: number;
193
+ deliveredUnconfirmed24h: number;
194
+ expired24h: number;
195
+ droppedOverflow24h: number;
196
+ oldestQueuedAt: string | null;
197
+ };
198
+ /** Atomic claim: queued → claimed iff still queued. Returns the claimed row
199
+ * or null (lost race / no longer queued). */
200
+ claim(seq: number, nowIso: string): PendingInboundRow | null;
201
+ /**
202
+ * Generic transition with expected-prior-state assert (spec §1): mismatch is
203
+ * a LOGGED NO-OP (returns false), never a throw. Terminal transitions null
204
+ * payload/envelope/metadata in the same transaction (payload hygiene) while
205
+ * the locator (timestamps, ids, sender_display, payload_bytes) survives
206
+ * (MUST 11).
207
+ */
208
+ transition(seq: number, expectedPrior: InboundEntryState, to: InboundEntryState, opts: {
209
+ nowIso: string;
210
+ terminalReason?: string;
211
+ deliveredUnconfirmed?: boolean;
212
+ lastError?: string | null;
213
+ attempts?: number;
214
+ nextAttemptAt?: string | null;
215
+ }): boolean;
216
+ /** Release a claimed row back to queued with backoff (failed attempt, §3.3).
217
+ * When a pause is in effect the caller passes `freeze:true` — the row is
218
+ * frozen at release (§3.6 round-9). */
219
+ release(seq: number, opts: {
220
+ nowIso: string;
221
+ attempts: number;
222
+ nextAttemptAt: string | null;
223
+ lastError?: string | null;
224
+ freeze?: boolean;
225
+ }): boolean;
226
+ /** Mark a queued head held (first_held_at set once; §4.3 cumulative clock). */
227
+ markHeld(seq: number, nowIso: string): void;
228
+ /**
229
+ * The CONDITIONAL receipt commit (§3.6): writes the injection-class receipt
230
+ * iff the queue row is still `claimed` — one transaction, so a stop's
231
+ * claimed→expired transition makes a late receipt write fail atomically
232
+ * (which aborts the inject). Returns true when the receipt committed.
233
+ */
234
+ writeReceiptIfClaimed(seq: number, sessionKey: string, messageId: string, nowIso: string): boolean;
235
+ hasReceipt(sessionKey: string, messageId: string, cls?: ReceiptClass): boolean;
236
+ /** Remote path (§3.4): receive-side receipt, keyed on the canonical id. */
237
+ recordRemoteReceipt(sessionKey: string, messageId: string, nowIso: string): boolean;
238
+ /** Flip the `injected` marker after the local inject completes (§3.4 remote
239
+ * path round-8 — makes peer-crash-between-receipt-and-inject boot-detectable). */
240
+ markReceiptInjected(sessionKey: string, messageId: string, cls: ReceiptClass): void;
241
+ markReceiptReported(sessionKey: string, messageId: string, cls: ReceiptClass): void;
242
+ /** Unflipped (never-injected), unreported REMOTE receipts — the boot sweep's
243
+ * window-6 detection surface (§3.4 remote path). REMOTE-class only: local
244
+ * injection-class receipts never flip a marker — their loss variant is
245
+ * carried by the row's `delivered_unconfirmed` flag instead. */
246
+ findUnflippedUnreportedReceipts(): ReceiptRow[];
247
+ /**
248
+ * Receipt pruning (§3.4, §3.2 backstop duty): receipts older than the cutoff
249
+ * are pruned — but an UNFLIPPED receipt is never silently pruned: the rows
250
+ * about to be dropped while injected=0 AND reported=0 are RETURNED so the
251
+ * caller reports them first (report once, then prune — retention is never
252
+ * extended; spec round-10). The prune itself runs after the caller's report
253
+ * via `confirmPruneReceipts`.
254
+ */
255
+ listPrunableReceipts(cutoffIso: string): {
256
+ silent: number;
257
+ needsReport: ReceiptRow[];
258
+ };
259
+ confirmPruneReceipts(cutoffIso: string): number;
260
+ /** Delete a just-committed receipt (deliberate in-process un-commit — only
261
+ * legal while the caller KNOWS no inject ran; used by halt skip paths). */
262
+ deleteReceipt(sessionKey: string, messageId: string, cls: ReceiptClass): void;
263
+ /**
264
+ * Tenure source of truth (§3.5): the queue maintains its OWN
265
+ * acquisition-generation counter, persisted here, bumped iff the lease ref
266
+ * tip observed at this machine's claim names a holder ≠ self. Unchanged on
267
+ * renewals and same-holder re-acquire.
268
+ *
269
+ * Returns the current tenure id (`<selfMachineId>#<generation>`).
270
+ */
271
+ observeLeaseClaim(selfMachineId: string, tipHolderAtClaim: string | null): string;
272
+ currentTenure(selfMachineId: string): string | null;
273
+ /** The bare generation number (capacity-heartbeat field, §5.1). */
274
+ acquisitionGeneration(): number | null;
275
+ /** Durable pause flag — restart mid-pause stays paused. */
276
+ setPaused(paused: boolean, nowIso: string): void;
277
+ isPaused(): boolean;
278
+ /** Freeze all QUEUED rows (pause scope pin, §3.6 round-9 — claimed rows
279
+ * complete normally and freeze at release if they fail). */
280
+ freezeQueuedRows(nowIso: string): number;
281
+ /**
282
+ * Resume: fold each live frozen span into `total_frozen_ms`, clear
283
+ * `frozen_since`, shift `next_attempt_at` deadlines by the frozen span
284
+ * (the §6 sleep-shift pattern), and return rows whose CUMULATIVE frozen
285
+ * time now exceeds `pauseMaxMs` — the caller terminals those as
286
+ * `pause-expired` (the cumulative cap, §3.6 round-7/8).
287
+ */
288
+ resumeFrozenRows(nowIso: string, pauseMaxMs: number): {
289
+ resumed: number;
290
+ overCap: PendingInboundRow[];
291
+ };
292
+ /** Live cumulative frozen span for the cap check while still paused
293
+ * (`total_frozen_ms + (now − frozen_since)`, §1 columns round-8). */
294
+ liveFrozenMs(row: PendingInboundRow, nowIso: string): number;
295
+ /** Rows whose TTL has expired (frozen rows excluded — TTL accounting pauses
296
+ * while frozen, §3.6). Caller terminals + loss-reports them. */
297
+ listTtlExpired(nowIso: string, entryTtlMs: number): PendingInboundRow[];
298
+ /** Prune terminal rows past retention (payload already nulled at terminal). */
299
+ pruneTerminal(cutoffIso: string): number;
300
+ incrementCounter(key: CounterKey, by?: number): void;
301
+ getCounter(key: CounterKey): number;
302
+ /** File mode check support — path only; the test stats the file itself. */
303
+ countAll(): number;
304
+ }
305
+ /** Sanitized last_error (spec §1): error class + length-capped message; the
306
+ * caller must never pass payload-bearing text — this cap is the backstop. */
307
+ export declare function sanitizeError(err: unknown): string | null;
308
+ export declare const PENDING_INBOUND_TERMINAL_STATES: InboundEntryState[];
309
+ export declare const PENDING_INBOUND_NON_TERMINAL_STATES: InboundEntryState[];
310
+ //# sourceMappingURL=PendingInboundStore.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PendingInboundStore.d.ts","sourceRoot":"","sources":["../../src/core/PendingInboundStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAUH,MAAM,MAAM,iBAAiB,GACzB,QAAQ,GACR,SAAS,GACT,WAAW,GACX,SAAS,GACT,kBAAkB,CAAC;AAKvB,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACzB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,MAAM,WAAW,iBAAiB;IAChC,WAAW,EAAE,MAAM,CAAC;IACpB,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,aAAa,EAAE,MAAM,CAAC;IACtB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,iBAAiB,CAAC;IACzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAC;IAC/B,WAAW,EAAE,M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