@zackbart/connecta 0.7.5 → 0.7.7

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 (72) hide show
  1. package/CHANGELOG.md +108 -0
  2. package/README.md +1 -0
  3. package/dist/activity.d.ts +17 -0
  4. package/dist/activity.d.ts.map +1 -1
  5. package/dist/activity.js.map +1 -1
  6. package/dist/auth/clerk.d.ts.map +1 -1
  7. package/dist/auth/clerk.js +101 -0
  8. package/dist/auth/clerk.js.map +1 -1
  9. package/dist/auth/downstream-oauth.d.ts +57 -20
  10. package/dist/auth/downstream-oauth.d.ts.map +1 -1
  11. package/dist/auth/downstream-oauth.js +275 -67
  12. package/dist/auth/downstream-oauth.js.map +1 -1
  13. package/dist/connectors/remote-mcp.d.ts.map +1 -1
  14. package/dist/connectors/remote-mcp.js +165 -103
  15. package/dist/connectors/remote-mcp.js.map +1 -1
  16. package/dist/execute.d.ts.map +1 -1
  17. package/dist/execute.js +11 -0
  18. package/dist/execute.js.map +1 -1
  19. package/dist/executor-admission.d.ts +18 -1
  20. package/dist/executor-admission.d.ts.map +1 -1
  21. package/dist/executor-admission.js +82 -3
  22. package/dist/executor-admission.js.map +1 -1
  23. package/dist/executors/quickjs-protocol.d.ts +1 -0
  24. package/dist/executors/quickjs-protocol.d.ts.map +1 -1
  25. package/dist/executors/quickjs-protocol.js +7 -4
  26. package/dist/executors/quickjs-protocol.js.map +1 -1
  27. package/dist/executors/quickjs-runtime.d.ts.map +1 -1
  28. package/dist/executors/quickjs-runtime.js +22 -9
  29. package/dist/executors/quickjs-runtime.js.map +1 -1
  30. package/dist/executors/quickjs.d.ts.map +1 -1
  31. package/dist/executors/quickjs.js +44 -10
  32. package/dist/executors/quickjs.js.map +1 -1
  33. package/dist/index.d.ts +31 -2
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +38 -1
  36. package/dist/index.js.map +1 -1
  37. package/dist/registry.d.ts +12 -0
  38. package/dist/registry.d.ts.map +1 -1
  39. package/dist/registry.js +70 -15
  40. package/dist/registry.js.map +1 -1
  41. package/dist/server.d.ts +3 -0
  42. package/dist/server.d.ts.map +1 -1
  43. package/dist/server.js +413 -35
  44. package/dist/server.js.map +1 -1
  45. package/dist/storage/file.d.ts.map +1 -1
  46. package/dist/storage/file.js +8 -0
  47. package/dist/storage/file.js.map +1 -1
  48. package/dist/types.d.ts +47 -0
  49. package/dist/types.d.ts.map +1 -1
  50. package/dist/ui.d.ts +7 -1
  51. package/dist/ui.d.ts.map +1 -1
  52. package/dist/ui.js +118 -4
  53. package/dist/ui.js.map +1 -1
  54. package/dist/version.d.ts +1 -1
  55. package/dist/version.js +1 -1
  56. package/package.json +2 -1
  57. package/src/activity.ts +20 -0
  58. package/src/auth/clerk.ts +124 -0
  59. package/src/auth/downstream-oauth.ts +359 -68
  60. package/src/connectors/remote-mcp.ts +172 -104
  61. package/src/execute.ts +11 -0
  62. package/src/executor-admission.ts +90 -3
  63. package/src/executors/quickjs-protocol.ts +7 -4
  64. package/src/executors/quickjs-runtime.ts +31 -9
  65. package/src/executors/quickjs.ts +61 -12
  66. package/src/index.ts +90 -1
  67. package/src/registry.ts +79 -19
  68. package/src/server.ts +523 -45
  69. package/src/storage/file.ts +7 -0
  70. package/src/types.ts +50 -0
  71. package/src/ui.ts +124 -3
  72. package/src/version.ts +1 -1
@@ -13,6 +13,46 @@ function timingSafeEqual(a, b) {
13
13
  diff |= a.charCodeAt(i) ^ b.charCodeAt(i);
14
14
  return diff === 0;
15
15
  }
16
+ const LEGACY_GENERATION = "legacy";
17
+ const ACTIVE_GENERATION_PREFIX = "v2:";
18
+ const RESETTING_GENERATION_PREFIX = "reset:";
19
+ const DISCONNECTED_GENERATION_PREFIX = "disconnected:";
20
+ const STORED_VALUE_VERSION = 1;
21
+ const OAUTH_VALUE_KEYS = [
22
+ "oauth:client",
23
+ "oauth:tokens",
24
+ "oauth:pending",
25
+ "oauth:verifier",
26
+ "oauth:state",
27
+ ];
28
+ const MAX_CLEANUP_BACKLOG = 1_000;
29
+ function storedOAuthValue(value) {
30
+ if (!value || typeof value !== "object")
31
+ return false;
32
+ const candidate = value;
33
+ return (candidate.connectaOAuthVersion === STORED_VALUE_VERSION &&
34
+ typeof candidate.generation === "string" &&
35
+ "value" in candidate);
36
+ }
37
+ function isModernGeneration(generation) {
38
+ return (generation.startsWith(ACTIVE_GENERATION_PREFIX) ||
39
+ generation.startsWith(RESETTING_GENERATION_PREFIX) ||
40
+ generation.startsWith(DISCONNECTED_GENERATION_PREFIX));
41
+ }
42
+ /**
43
+ * Physical key for an OAuth value in one authorization epoch. Legacy values
44
+ * keep their historical names so upgrades can read an existing grant. Modern
45
+ * values get an epoch-specific namespace: a stale write or delete can then
46
+ * affect only its own flow, even if it lands after a replacement flow.
47
+ */
48
+ export function oauthValueStorageKey(key, generation) {
49
+ return generation !== null && isModernGeneration(generation)
50
+ ? `${key}:epoch:${generation}`
51
+ : key;
52
+ }
53
+ function cleanupBacklogKey(generation) {
54
+ return `oauth:cleanup:${encodeURIComponent(generation)}`;
55
+ }
16
56
  /**
17
57
  * OAuthClientProvider implemented over KVStorage for a single downstream
18
58
  * connector. Keys live in the connector's namespace as `oauth:<field>`.
@@ -27,9 +67,9 @@ export class KvOAuthProvider {
27
67
  storage;
28
68
  redirectUri;
29
69
  /**
30
- * The force-reauth generation this provider's flow started under, captured by
31
- * the connector before it drives a connect. `null` until stamped a provider
32
- * used outside a connect flow (or in isolation) writes unconditionally.
70
+ * The reset generation this provider's flow started under. Every OAuth value
71
+ * it writes carries this epoch, so a late write can land after a reset without
72
+ * becoming readable under the new generation.
33
73
  */
34
74
  capturedGeneration = null;
35
75
  constructor(connectorId, storage, redirectUri) {
@@ -39,24 +79,132 @@ export class KvOAuthProvider {
39
79
  }
40
80
  /**
41
81
  * Stamp the force-reauth generation the current connect flow started under.
42
- * Subsequent saveTokens/saveClientInformation writes are dropped if KV's
43
- * generation has since advanced (a concurrent force wiped credentials) — see
44
- * isStale(). Called by the connector once per connect, before c.connect().
82
+ * Called by the connector once per connect, before c.connect(). The callback
83
+ * path captures the generation stored beside its verified state instead.
45
84
  */
46
85
  captureGeneration(gen) {
47
86
  this.capturedGeneration = gen;
48
87
  }
49
88
  /**
50
- * Whether a concurrent force re-auth advanced the KV generation past the one
51
- * this flow captured. When true, this isolate's SDK is mid-flight against
52
- * credentials that were just wiped — persisting them would resurrect the
53
- * wiped-and-reauthorized connector for later isolates. Fails open (writes)
54
- * when no generation was captured.
89
+ * The epoch this provider writes under. Direct unit/custom use lazily captures
90
+ * the current generation; connector-driven connect and callback paths stamp it
91
+ * explicitly before the SDK can write.
55
92
  */
56
- async isStale() {
57
- if (this.capturedGeneration === null)
58
- return false;
59
- return (await this.generation()) > this.capturedGeneration;
93
+ async writeGeneration() {
94
+ this.capturedGeneration ??= await this.generation();
95
+ return this.capturedGeneration;
96
+ }
97
+ /**
98
+ * Store a value in the flow's physical epoch namespace. The pre-write check
99
+ * avoids needless stale residue. The namespaced key closes the remaining
100
+ * check-then-write race: a late old write cannot overwrite a replacement
101
+ * flow's value because the two writes have different physical keys.
102
+ */
103
+ async writeValue(key, value, serializeLegacy) {
104
+ const generation = await this.writeGeneration();
105
+ if (generation.startsWith(RESETTING_GENERATION_PREFIX) ||
106
+ generation.startsWith(DISCONNECTED_GENERATION_PREFIX) ||
107
+ (await this.generation()) !== generation) {
108
+ return;
109
+ }
110
+ const stored = {
111
+ connectaOAuthVersion: STORED_VALUE_VERSION,
112
+ generation,
113
+ value,
114
+ };
115
+ const physicalKey = oauthValueStorageKey(key, generation);
116
+ await this.storage.set(physicalKey, isModernGeneration(generation)
117
+ ? JSON.stringify(stored)
118
+ : serializeLegacy(value));
119
+ // If reset landed after the pre-write check and completed its cleanup
120
+ // before this set, remove the now-unreachable residue ourselves. The epoch
121
+ // key already provides correctness; this second check is physical hygiene.
122
+ const current = await this.generation();
123
+ if (current !== generation) {
124
+ try {
125
+ await this.storage.delete(physicalKey);
126
+ }
127
+ catch {
128
+ // Make a transient cleanup failure retryable by the next force reset.
129
+ // This is still best-effort if storage cannot accept the backlog write.
130
+ try {
131
+ await this.rememberRetiredGeneration(current, generation);
132
+ }
133
+ catch {
134
+ // The old namespace is already unreadable; storage availability is
135
+ // the remaining physical-hygiene boundary.
136
+ }
137
+ }
138
+ }
139
+ }
140
+ /**
141
+ * Read a value only when it belongs to the active generation. Plain legacy
142
+ * values remain readable until the first v2 reset, so upgrades do not discard
143
+ * an existing grant; once a modern epoch exists, untagged residue fails
144
+ * closed.
145
+ */
146
+ async readValue(key, parseLegacy) {
147
+ const generation = await this.generation();
148
+ const raw = await this.storage.get(oauthValueStorageKey(key, generation));
149
+ if (raw === null)
150
+ return undefined;
151
+ if (generation.startsWith(RESETTING_GENERATION_PREFIX) ||
152
+ generation.startsWith(DISCONNECTED_GENERATION_PREFIX)) {
153
+ return undefined;
154
+ }
155
+ let parsed;
156
+ try {
157
+ parsed = JSON.parse(raw);
158
+ }
159
+ catch {
160
+ // Raw string state from a pre-envelope deployment is handled below.
161
+ }
162
+ if (storedOAuthValue(parsed)) {
163
+ return parsed.generation === generation
164
+ ? { value: parsed.value, generation }
165
+ : undefined;
166
+ }
167
+ if (isModernGeneration(generation))
168
+ return undefined;
169
+ return { value: parseLegacy(raw), generation };
170
+ }
171
+ /** Attempt every key deletion, then report the first backend failure. */
172
+ async deleteAll(keys) {
173
+ let firstError;
174
+ for (const key of keys) {
175
+ try {
176
+ await this.storage.delete(key);
177
+ }
178
+ catch (error) {
179
+ firstError ??= error;
180
+ }
181
+ }
182
+ if (firstError)
183
+ throw firstError;
184
+ }
185
+ async cleanupBacklog(generation) {
186
+ const raw = await this.storage.get(cleanupBacklogKey(generation));
187
+ if (raw === null)
188
+ return [];
189
+ const parsed = JSON.parse(raw);
190
+ if (!Array.isArray(parsed) ||
191
+ parsed.length > MAX_CLEANUP_BACKLOG ||
192
+ !parsed.every((value) => typeof value === "string")) {
193
+ throw new Error(`Invalid OAuth cleanup backlog for "${this.connectorId}"`);
194
+ }
195
+ return [...new Set(parsed)];
196
+ }
197
+ async rememberRetiredGeneration(active, retired) {
198
+ const backlog = await this.cleanupBacklog(active);
199
+ if (backlog.includes(retired))
200
+ return;
201
+ if (backlog.length >= MAX_CLEANUP_BACKLOG) {
202
+ throw new Error(`OAuth cleanup backlog for "${this.connectorId}" is full`);
203
+ }
204
+ await this.storage.set(cleanupBacklogKey(active), JSON.stringify([...backlog, retired]));
205
+ }
206
+ valueKeysForGeneration(generation) {
207
+ return OAUTH_VALUE_KEYS.map((key) => oauthValueStorageKey(key, generation));
60
208
  }
61
209
  get redirectUrl() {
62
210
  return this.redirectUri;
@@ -71,36 +219,16 @@ export class KvOAuthProvider {
71
219
  };
72
220
  }
73
221
  async clientInformation() {
74
- const raw = await this.storage.get("oauth:client");
75
- return raw ? JSON.parse(raw) : undefined;
222
+ return (await this.readValue("oauth:client", (raw) => JSON.parse(raw)))?.value;
76
223
  }
77
224
  async saveClientInformation(info) {
78
- // A concurrent force wiped credentials and bumped the generation while this
79
- // flow ran — skip rather than re-register a client under revoked state. The
80
- // in-memory SDK keeps this info for the current (doomed) connect, which the
81
- // connector's post-connect fence then discards.
82
- if (await this.isStale())
83
- return;
84
- await this.storage.set("oauth:client", JSON.stringify(info));
225
+ await this.writeValue("oauth:client", info, (value) => JSON.stringify(value));
85
226
  }
86
227
  async tokens() {
87
- const raw = await this.storage.get("oauth:tokens");
88
- return raw ? JSON.parse(raw) : undefined;
228
+ return (await this.readValue("oauth:tokens", (raw) => JSON.parse(raw)))?.value;
89
229
  }
90
230
  async saveTokens(tokens) {
91
- // Generation-guarded write. The dangerous case: an isolate mid-connect (or
92
- // mid-refresh) whose SDK just minted fresh tokens against a still-valid
93
- // grant, racing a force re-auth that wiped KV and bumped the generation.
94
- // Persisting here would resurrect those tokens for later isolates to read.
95
- // A silent skip (not a throw) is deliberate: throwing propagates out of the
96
- // SDK's auth() and fails the in-flight request/connect noisily, whereas
97
- // skipping lets the in-memory client finish its current operation while
98
- // leaving KV wiped — the connector's generation check drops that client on
99
- // its next call. Fails open when no generation was captured, so ordinary
100
- // token refresh (no force) still persists.
101
- if (await this.isStale())
102
- return;
103
- await this.storage.set("oauth:tokens", JSON.stringify(tokens));
231
+ await this.writeValue("oauth:tokens", tokens, (value) => JSON.stringify(value));
104
232
  }
105
233
  /**
106
234
  * OAuth `state`. The SDK calls this (when present) and appends the value to
@@ -113,7 +241,7 @@ export class KvOAuthProvider {
113
241
  */
114
242
  async state() {
115
243
  const value = randomState();
116
- await this.storage.set("oauth:state", value);
244
+ await this.writeValue("oauth:state", value, (raw) => raw);
117
245
  return value;
118
246
  }
119
247
  /**
@@ -121,59 +249,139 @@ export class KvOAuthProvider {
121
249
  * value. Absent stored state or absent candidate → false (fail closed).
122
250
  */
123
251
  async verifyState(candidate) {
124
- const expected = await this.storage.get("oauth:state");
252
+ const expected = await this.readValue("oauth:state", (raw) => raw);
125
253
  if (!expected || candidate === null)
126
254
  return false;
127
- return timingSafeEqual(candidate, expected);
255
+ const matches = timingSafeEqual(candidate, expected.value);
256
+ if (matches)
257
+ this.captureGeneration(expected.generation);
258
+ return matches;
128
259
  }
129
260
  async saveCodeVerifier(verifier) {
130
- await this.storage.set("oauth:verifier", verifier);
261
+ await this.writeValue("oauth:verifier", verifier, (raw) => raw);
131
262
  }
132
263
  async codeVerifier() {
133
- const raw = await this.storage.get("oauth:verifier");
134
- if (!raw)
264
+ const stored = await this.readValue("oauth:verifier", (raw) => raw);
265
+ if (!stored) {
135
266
  throw new Error(`No PKCE code verifier for "${this.connectorId}"`);
136
- return raw;
267
+ }
268
+ return stored.value;
137
269
  }
138
270
  async redirectToAuthorization(authorizationUrl) {
139
- await this.storage.set("oauth:pending", authorizationUrl.toString());
271
+ await this.writeValue("oauth:pending", authorizationUrl.toString(), (raw) => raw);
140
272
  }
141
273
  /** The stored authorization URL, if a flow is pending. */
142
274
  async pendingAuthorizationUrl() {
143
- return (await this.storage.get("oauth:pending")) ?? undefined;
275
+ return (await this.readValue("oauth:pending", (raw) => raw))?.value;
144
276
  }
145
277
  /** Clear one-shot flow state after the callback completes. */
146
278
  async clearPending() {
147
- await this.storage.delete("oauth:pending");
148
- await this.storage.delete("oauth:verifier");
149
- await this.storage.delete("oauth:state");
279
+ const generation = await this.writeGeneration();
280
+ await this.deleteAll([
281
+ oauthValueStorageKey("oauth:pending", generation),
282
+ oauthValueStorageKey("oauth:verifier", generation),
283
+ oauthValueStorageKey("oauth:state", generation),
284
+ ]);
150
285
  }
151
286
  /**
152
- * Force-reauth generation. Monotonic counter shared across isolates via KV;
153
- * NOT cleared by clearPending/invalidateCredentials its whole job is to
154
- * keep advancing so an isolate holding a client from a prior generation can
155
- * notice it went stale. Defaults to 0 when never bumped.
287
+ * Force-reauth epoch shared across isolates through storage. Old numeric
288
+ * generations remain valid strings for migration; new resets use unique
289
+ * nonces, avoiding the lost-update race of read/increment/write.
156
290
  */
157
291
  async generation() {
158
- const raw = await this.storage.get("oauth:generation");
159
- const n = raw ? Number(raw) : 0;
160
- return Number.isFinite(n) ? n : 0;
292
+ return (await this.storage.get("oauth:generation")) ?? LEGACY_GENERATION;
161
293
  }
162
- /** Advance the generation (on force re-auth) and return the new value. */
294
+ /** True only after an operator disconnect, until an explicit authorization starts. */
295
+ async operatorDisconnected() {
296
+ return this.isOperatorDisconnectedGeneration(await this.generation());
297
+ }
298
+ /** Interpret a generation already read by a connector without another KV lookup. */
299
+ isOperatorDisconnectedGeneration(generation) {
300
+ return generation.startsWith(DISCONNECTED_GENERATION_PREFIX);
301
+ }
302
+ /** Publish a unique active epoch without a read/modify/write race. */
163
303
  async bumpGeneration() {
164
- const next = (await this.generation()) + 1;
165
- await this.storage.set("oauth:generation", String(next));
304
+ const next = `${ACTIVE_GENERATION_PREFIX}${crypto.randomUUID()}`;
305
+ await this.storage.set("oauth:generation", next);
166
306
  return next;
167
307
  }
308
+ /**
309
+ * Fence every flow that could still write, then remove all durable and
310
+ * one-shot authorization state. The generation is intentionally retained:
311
+ * it is the epoch fence that tells another isolate not to resurrect
312
+ * credentials it read before this reset.
313
+ *
314
+ * Once the fence is durable, attempt every deletion even if one fails. A
315
+ * partial backend outage should not leave unrelated secrets behind merely
316
+ * because an earlier key happened to be the first failed delete.
317
+ */
318
+ async resetAuthorization(operatorDisconnected = false) {
319
+ const nonce = crypto.randomUUID();
320
+ const previous = await this.generation();
321
+ const inherited = await this.cleanupBacklog(previous);
322
+ const active = `${operatorDisconnected
323
+ ? DISCONNECTED_GENERATION_PREFIX
324
+ : ACTIVE_GENERATION_PREFIX}${nonce}`;
325
+ const retired = [...new Set([...inherited, previous])];
326
+ if (retired.length > MAX_CLEANUP_BACKLOG) {
327
+ throw new Error(`OAuth cleanup backlog for "${this.connectorId}" is full`);
328
+ }
329
+ // Publish the complete inherited cleanup work under the prospective epoch
330
+ // before making that epoch active. A crash or later retry can therefore
331
+ // always recover the older namespaces without a storage prefix scan.
332
+ await this.storage.set(cleanupBacklogKey(active), JSON.stringify(retired));
333
+ // This is the one authoritative transition. From this point onward every
334
+ // old physical namespace is unreadable. There is deliberately no second
335
+ // "finalize" write: concurrent resets therefore cannot overwrite a newer
336
+ // reset's epoch after their cleanup finishes out of order.
337
+ try {
338
+ await this.storage.set("oauth:generation", active);
339
+ }
340
+ catch (error) {
341
+ try {
342
+ await this.storage.delete(cleanupBacklogKey(active));
343
+ }
344
+ catch {
345
+ // Best-effort removal of a manifest for an epoch never activated.
346
+ }
347
+ throw error;
348
+ }
349
+ let firstError;
350
+ for (const generation of retired) {
351
+ try {
352
+ await this.deleteAll(this.valueKeysForGeneration(generation));
353
+ await this.storage.delete(cleanupBacklogKey(generation));
354
+ }
355
+ catch (error) {
356
+ firstError ??= error;
357
+ }
358
+ }
359
+ // Keep the active manifest immutable for the epoch's whole lifetime, even
360
+ // after successful cleanup. A late old-epoch write can land after cleanup;
361
+ // if its self-delete fails, the next reset must still inherit the complete
362
+ // lineage without racing a manifest shrink/delete. The successor copies
363
+ // this manifest before activation and then removes this retired copy.
364
+ if (firstError)
365
+ throw firstError;
366
+ }
168
367
  async invalidateCredentials(scope) {
169
- if (scope === "all" || scope === "client") {
170
- await this.storage.delete("oauth:client");
368
+ const generation = await this.writeGeneration();
369
+ if (scope === "all") {
370
+ await this.deleteAll([
371
+ oauthValueStorageKey("oauth:client", generation),
372
+ oauthValueStorageKey("oauth:tokens", generation),
373
+ oauthValueStorageKey("oauth:verifier", generation),
374
+ ]);
375
+ return;
376
+ }
377
+ if (scope === "client") {
378
+ await this.storage.delete(oauthValueStorageKey("oauth:client", generation));
171
379
  }
172
- if (scope === "all" || scope === "tokens") {
173
- await this.storage.delete("oauth:tokens");
380
+ if (scope === "tokens") {
381
+ await this.storage.delete(oauthValueStorageKey("oauth:tokens", generation));
174
382
  }
175
- if (scope === "all" || scope === "verifier") {
176
- await this.storage.delete("oauth:verifier");
383
+ if (scope === "verifier") {
384
+ await this.storage.delete(oauthValueStorageKey("oauth:verifier", generation));
177
385
  }
178
386
  }
179
387
  }
@@ -1 +1 @@
1
- {"version":3,"file":"downstream-oauth.js","sourceRoot":"","sources":["../../src/auth/downstream-oauth.ts"],"names":[],"mappings":"AAQA,+EAA+E;AAC/E,SAAS,WAAW;IAClB,MAAM,KAAK,GAAG,IAAI,UAAU,CAAC,EAAE,CAAC,CAAC;IACjC,MAAM,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;IAC9B,OAAO,KAAK,CAAC,IAAI,CAAC,KAAK,EAAE,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;AAC5E,CAAC;AAED,mFAAmF;AACnF,SAAS,eAAe,CAAC,CAAS,EAAE,CAAS;IAC3C,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;QAAE,OAAO,KAAK,CAAC;IACxC,IAAI,IAAI,GAAG,CAAC,CAA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