@sixb/client 0.2.3 → 0.2.6

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 (49) hide show
  1. package/dist/agent-streams.d.ts +11 -2
  2. package/dist/agent-streams.d.ts.map +1 -1
  3. package/dist/artifact-live.js +1 -1
  4. package/dist/browser.js +1 -1
  5. package/dist/{chunk-ktqfenfd.js → chunk-3dxa8d3r.js} +46 -6
  6. package/dist/chunk-3dxa8d3r.js.map +10 -0
  7. package/dist/{chunk-90q7wa43.js → chunk-4t68c4gf.js} +10 -3
  8. package/dist/{chunk-90q7wa43.js.map → chunk-4t68c4gf.js.map} +3 -3
  9. package/dist/{chunk-bgpzb1fn.js → chunk-6caavk8p.js} +1 -1
  10. package/dist/{chunk-seeyb9k9.js → chunk-pzz6gtn5.js} +2 -2
  11. package/dist/{chunk-zerhr00d.js → chunk-vydypkf1.js} +98 -2
  12. package/dist/chunk-vydypkf1.js.map +10 -0
  13. package/dist/connectors/connection.d.ts +12 -0
  14. package/dist/connectors/connection.d.ts.map +1 -1
  15. package/dist/connectors/index.d.ts +1 -1
  16. package/dist/connectors/index.d.ts.map +1 -1
  17. package/dist/connectors/queries.d.ts.map +1 -1
  18. package/dist/generated/@tanstack/react-query.gen.d.ts +6678 -4623
  19. package/dist/generated/@tanstack/react-query.gen.d.ts.map +1 -1
  20. package/dist/generated/index.d.ts +2 -2
  21. package/dist/generated/index.d.ts.map +1 -1
  22. package/dist/generated/sdk.gen.d.ts +58 -6
  23. package/dist/generated/sdk.gen.d.ts.map +1 -1
  24. package/dist/generated/types.gen.d.ts +2468 -227
  25. package/dist/generated/types.gen.d.ts.map +1 -1
  26. package/dist/hooks.js +180 -6
  27. package/dist/hooks.js.map +4 -4
  28. package/dist/index.js +26 -6
  29. package/dist/index.js.map +1 -1
  30. package/dist/logs.js +3 -3
  31. package/dist/models.js +23 -3
  32. package/dist/models.js.map +1 -1
  33. package/dist/query.js +2 -2
  34. package/dist/users-hooks.d.ts.map +1 -1
  35. package/dist/ws-socket.d.ts +2 -0
  36. package/dist/ws-socket.d.ts.map +1 -1
  37. package/package.json +2 -2
  38. package/src/agent-streams.ts +23 -0
  39. package/src/connectors/connection.ts +59 -0
  40. package/src/connectors/index.ts +1 -0
  41. package/src/generated/@tanstack/react-query.gen.ts +319 -5
  42. package/src/generated/index.ts +55 -0
  43. package/src/generated/sdk.gen.ts +235 -5
  44. package/src/generated/types.gen.ts +3408 -187
  45. package/src/ws-socket.ts +62 -7
  46. package/dist/chunk-ktqfenfd.js.map +0 -10
  47. package/dist/chunk-zerhr00d.js.map +0 -10
  48. /package/dist/{chunk-bgpzb1fn.js.map → chunk-6caavk8p.js.map} +0 -0
  49. /package/dist/{chunk-seeyb9k9.js.map → chunk-pzz6gtn5.js.map} +0 -0
package/src/ws-socket.ts CHANGED
@@ -22,6 +22,11 @@ import { getSixbSessionAccessToken, SixbSessionEndedError } from "./session"
22
22
  const DEFAULT_SIXB_API_BASE_URL = "http://localhost:3002"
23
23
  const DEFAULT_RECONNECT_DELAY_MS = 1000
24
24
  const DEFAULT_READY_TIMEOUT_MS = 10_000
25
+ /** RFC 6455 Service Restart: sent when a server drains so clients hop silently to the new slot. */
26
+ export const SERVICE_RESTART_CLOSE_CODE = 1012
27
+ const SERVICE_RESTART_MIN_DELAY_MS = 50
28
+ const SERVICE_RESTART_JITTER_MS = 100
29
+ const SERVICE_RESTART_GRACE_MS = 1_500
25
30
 
26
31
  export interface ReconnectingSocketState {
27
32
  readonly connected: boolean
@@ -112,12 +117,22 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
112
117
  let state = INITIAL_STATE
113
118
  let stopped = false
114
119
  let openedOnce = false
120
+ let handingOff = false
115
121
  let socket: WebSocket | null = null
116
122
  let reconnectTimer: ReturnType<typeof setTimeout> | null = null
123
+ let handoffTimer: ReturnType<typeof setTimeout> | null = null
117
124
  let connectionGeneration = 0
118
125
  // Reconnects since the last connection that was ready, for the backoff.
119
126
  let failures = 0
120
127
 
128
+ const clearHandoff = () => {
129
+ handingOff = false
130
+ if (handoffTimer) {
131
+ clearTimeout(handoffTimer)
132
+ handoffTimer = null
133
+ }
134
+ }
135
+
121
136
  const setState = (next: ReconnectingSocketState) => {
122
137
  state = next
123
138
  options.onStateChange?.(next)
@@ -130,12 +145,17 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
130
145
  },
131
146
  }
132
147
 
133
- const scheduleReconnect = () => {
148
+ const scheduleReconnect = (serviceRestart = false) => {
134
149
  if (!reconnect || stopped || reconnectTimer) return
135
- const delay = options.maxReconnectDelayMs
136
- ? Math.min(options.maxReconnectDelayMs, reconnectDelayMs * 2 ** failures)
137
- : reconnectDelayMs
138
- failures += 1
150
+ const delay = serviceRestart
151
+ ? Math.min(
152
+ reconnectDelayMs,
153
+ SERVICE_RESTART_MIN_DELAY_MS + Math.floor(Math.random() * SERVICE_RESTART_JITTER_MS)
154
+ )
155
+ : options.maxReconnectDelayMs
156
+ ? Math.min(options.maxReconnectDelayMs, reconnectDelayMs * 2 ** failures)
157
+ : reconnectDelayMs
158
+ if (!serviceRestart) failures += 1
139
159
  reconnectTimer = setTimeout(() => {
140
160
  reconnectTimer = null
141
161
  void connect()
@@ -145,7 +165,11 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
145
165
  const connect = async () => {
146
166
  if (stopped) return
147
167
  const generation = ++connectionGeneration
148
- setState({ connected: false, reconnecting: openedOnce || state.reconnecting, error: null })
168
+ setState({
169
+ connected: false,
170
+ reconnecting: !handingOff && (openedOnce || state.reconnecting),
171
+ error: null,
172
+ })
149
173
 
150
174
  let protocols: readonly string[] | undefined
151
175
  let accessToken: string | null = null
@@ -161,6 +185,7 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
161
185
  }
162
186
  } catch (error) {
163
187
  if (stopped || generation !== connectionGeneration) return
188
+ clearHandoff()
164
189
  sink.reportError(error instanceof Error ? error.message : String(error))
165
190
  const retry =
166
191
  reconnect &&
@@ -193,13 +218,17 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
193
218
  ws.onopen = () => {
194
219
  if (stopped) return
195
220
  openedOnce = true
196
- if (!options.readyWhen) failures = 0
221
+ if (!options.readyWhen) {
222
+ failures = 0
223
+ clearHandoff()
224
+ }
197
225
  setState({ connected: true, reconnecting: false, error: null })
198
226
  if (!options.subscribeWhen) subscribe()
199
227
  if (options.readyWhen) {
200
228
  readyTimer = setTimeout(
201
229
  () => {
202
230
  if (stopped || socket !== ws) return
231
+ clearHandoff()
203
232
  try {
204
233
  sink.reportError(
205
234
  options.readyTimeoutMessage ?? "Websocket protocol handshake timed out."
@@ -218,6 +247,7 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
218
247
  if (options.subscribeWhen?.(messageEvent.data)) subscribe()
219
248
  if (options.readyWhen?.(messageEvent.data)) {
220
249
  clearReadyTimer()
250
+ clearHandoff()
221
251
  failures = 0
222
252
  }
223
253
  options.onMessage(messageEvent.data, sink)
@@ -225,6 +255,7 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
225
255
 
226
256
  ws.onerror = () => {
227
257
  if (stopped) return
258
+ clearHandoff()
228
259
  sink.reportError(options.connectionErrorMessage)
229
260
  }
230
261
 
@@ -237,6 +268,7 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
237
268
 
238
269
  // The shared link ended: the server would refuse every reconnect.
239
270
  if (event?.code === SHARED_ACCESS_ENDED_CLOSE_CODE) {
271
+ clearHandoff()
240
272
  stopped = true
241
273
  sink.reportError(SHARED_ACCESS_ENDED)
242
274
  setState({ connected: false, reconnecting: false, error: SHARED_ACCESS_ENDED })
@@ -244,6 +276,28 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
244
276
  return
245
277
  }
246
278
 
279
+ // Planned server restart (1012): hop immediately with jitter and suppress the reconnecting
280
+ // indicator during the brief handoff unless the new server fails to answer in time.
281
+ if (
282
+ reconnect &&
283
+ event?.code === SERVICE_RESTART_CLOSE_CODE &&
284
+ !handingOff &&
285
+ failures === 0
286
+ ) {
287
+ handingOff = true
288
+ handoffTimer = setTimeout(() => {
289
+ handoffTimer = null
290
+ if (!stopped && handingOff && !state.connected) {
291
+ handingOff = false
292
+ setState({ connected: false, reconnecting: true, error: state.error })
293
+ }
294
+ }, SERVICE_RESTART_GRACE_MS)
295
+ setState({ connected: false, reconnecting: false, error: state.error })
296
+ scheduleReconnect(true)
297
+ return
298
+ }
299
+
300
+ clearHandoff()
247
301
  setState({ connected: false, reconnecting: reconnect, error: state.error })
248
302
  scheduleReconnect()
249
303
  }
@@ -261,6 +315,7 @@ export function createReconnectingSocket(options: ReconnectingSocketOptions): Re
261
315
  close() {
262
316
  stopped = true
263
317
  connectionGeneration += 1
318
+ clearHandoff()
264
319
  if (reconnectTimer) {
265
320
  clearTimeout(reconnectTimer)
266
321
  reconnectTimer = null
@@ -1,10 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../src/ws-socket.ts"],
4
- "sourcesContent": [
5
- "/**\n * React-free reconnecting WebSocket transport shared by the event and agent-run streams.\n *\n * It owns the whole connection lifecycle — connect, send the subscribe frame, reconnect with\n * backoff, tear down — plus the connected/reconnecting/error state machine. Callers inject the URL,\n * a cursor-aware subscribe payload, and message handling, so each stream keeps its own wire\n * protocol while sharing one reconnection loop. React is an optional peer of `@sixb/client`;\n * nothing here may import it.\n */\nimport {\n endClientSharedAccess,\n getClientSessionAuthority,\n getClientSharedGrantId,\n SHARED_ACCESS_ENDED,\n SHARED_ACCESS_ENDED_CLOSE_CODE,\n SHARED_ACCESS_REALTIME_UNAVAILABLE,\n} from \"./client-authority\"\nimport type { Client } from \"./generated/client\"\nimport { client as generatedClient } from \"./generated/client.gen\"\nimport { getSixbSessionAccessToken, SixbSessionEndedError } from \"./session\"\n\nconst DEFAULT_SIXB_API_BASE_URL = \"http://localhost:3002\"\nconst DEFAULT_RECONNECT_DELAY_MS = 1000\nconst DEFAULT_READY_TIMEOUT_MS = 10_000\n\nexport interface ReconnectingSocketState {\n readonly connected: boolean\n readonly reconnecting: boolean\n readonly error: string | null\n}\n\n/** Handed to `onMessage` so a stream-level error frame updates socket state + notifies the caller. */\nexport interface ReconnectingSocketErrorSink {\n reportError(message: string): void\n}\n\nexport interface ReconnectingSocketOptions {\n readonly url: string\n /** The client whose credential the socket presents. Defaults to the package's shared client. */\n readonly client?: Client\n /**\n * The stream also serves a shared link's session: a shared client names its grant in the URL,\n * as file links do, and its session cookie is the credential. Any other stream refuses one.\n */\n readonly sharedAccess?: boolean\n /** Built before every connection; useful for one-shot WebSocket tickets. */\n readonly protocols?: () => readonly string[] | Promise<readonly string[]>\n /** Decide whether a failed async connection setup should be retried. */\n readonly shouldReconnectAfterSetupError?: (error: unknown) => boolean\n readonly reconnect?: boolean\n readonly reconnectDelayMs?: number\n /**\n * Doubles the wait before each reconnect after the first, from `reconnectDelayMs` up to this,\n * until a connection is ready again. Without it, every reconnect waits `reconnectDelayMs`.\n */\n readonly maxReconnectDelayMs?: number\n /**\n * Built fresh for each subscription so it can carry the latest resume cursor. A stream that\n * subscribes its own way, with messages of its own through `send`, has none.\n */\n readonly subscribeMessage?: () => unknown\n /**\n * Optional protocol-level readiness check. When provided, defer the subscribe\n * frame until an inbound message passes this check. Without it, subscribe as\n * soon as the websocket opens.\n */\n readonly subscribeWhen?: (data: unknown) => boolean\n /** Inbound message that marks the protocol handshake as complete. */\n readonly readyWhen?: (data: unknown) => boolean\n /** Close and reconnect when `readyWhen` does not pass within this duration. */\n readonly readyTimeoutMs?: number\n readonly readyTimeoutMessage?: string\n /** Handle one inbound message; call `sink.reportError` for stream-level error frames. */\n readonly onMessage: (data: unknown, sink: ReconnectingSocketErrorSink) => void\n /** Message surfaced when the socket itself errors (connection failure). */\n readonly connectionErrorMessage: string\n readonly onError?: (message: string) => void\n readonly onStateChange?: (state: ReconnectingSocketState) => void\n}\n\nexport interface ReconnectingSocket {\n /** Sends a message as JSON on the connection open now; false when none is. */\n send(message: unknown): boolean\n /** Stop reconnecting and close the underlying WebSocket. */\n close(): void\n}\n\nconst INITIAL_STATE: ReconnectingSocketState = {\n connected: false,\n reconnecting: false,\n error: null,\n}\n\nexport function createReconnectingSocket(options: ReconnectingSocketOptions): ReconnectingSocket {\n const client = options.client ?? generatedClient\n const sharedGrantId = getClientSharedGrantId(client)\n if (sharedGrantId !== null && !options.sharedAccess) {\n options.onError?.(SHARED_ACCESS_REALTIME_UNAVAILABLE)\n options.onStateChange?.({\n connected: false,\n reconnecting: false,\n error: SHARED_ACCESS_REALTIME_UNAVAILABLE,\n })\n return { send: () => false, close: () => undefined }\n }\n\n const { reconnect = true, reconnectDelayMs = DEFAULT_RECONNECT_DELAY_MS } = options\n // Like the session fetch, present the token only to the API the session belongs to.\n const session = getClientSessionAuthority(client)\n const socketSession = session && servesSocket(session.baseUrl, options.url) ? session : null\n\n let state = INITIAL_STATE\n let stopped = false\n let openedOnce = false\n let socket: WebSocket | null = null\n let reconnectTimer: ReturnType<typeof setTimeout> | null = null\n let connectionGeneration = 0\n // Reconnects since the last connection that was ready, for the backoff.\n let failures = 0\n\n const setState = (next: ReconnectingSocketState) => {\n state = next\n options.onStateChange?.(next)\n }\n\n const sink: ReconnectingSocketErrorSink = {\n reportError(message: string) {\n options.onError?.(message)\n setState({ ...state, error: message })\n },\n }\n\n const scheduleReconnect = () => {\n if (!reconnect || stopped || reconnectTimer) return\n const delay = options.maxReconnectDelayMs\n ? Math.min(options.maxReconnectDelayMs, reconnectDelayMs * 2 ** failures)\n : reconnectDelayMs\n failures += 1\n reconnectTimer = setTimeout(() => {\n reconnectTimer = null\n void connect()\n }, delay)\n }\n\n const connect = async () => {\n if (stopped) return\n const generation = ++connectionGeneration\n setState({ connected: false, reconnecting: openedOnce || state.reconnecting, error: null })\n\n let protocols: readonly string[] | undefined\n let accessToken: string | null = null\n try {\n if (options.protocols) protocols = await options.protocols()\n // Read on every connection: the token refreshes shortly before it expires, and the server\n // checks it only at the upgrade.\n if (socketSession) {\n accessToken = await getSixbSessionAccessToken(socketSession)\n if (!accessToken) {\n throw new SixbSessionEndedError(\"[SixbClient] No session is stored. Sign in first.\")\n }\n }\n } catch (error) {\n if (stopped || generation !== connectionGeneration) return\n sink.reportError(error instanceof Error ? error.message : String(error))\n const retry =\n reconnect &&\n !(error instanceof SixbSessionEndedError) &&\n (options.shouldReconnectAfterSetupError?.(error) ?? true)\n setState({ connected: false, reconnecting: retry, error: state.error })\n if (retry) scheduleReconnect()\n return\n }\n if (stopped || generation !== connectionGeneration) return\n\n const ws = openWebSocket(withSharedGrant(options.url, sharedGrantId), protocols, accessToken)\n socket = ws\n let subscribed = false\n let readyTimer: ReturnType<typeof setTimeout> | null = null\n\n const clearReadyTimer = () => {\n if (readyTimer) {\n clearTimeout(readyTimer)\n readyTimer = null\n }\n }\n\n const subscribe = () => {\n if (stopped || subscribed || socket !== ws) return\n subscribed = true\n if (options.subscribeMessage) ws.send(JSON.stringify(options.subscribeMessage()))\n }\n\n ws.onopen = () => {\n if (stopped) return\n openedOnce = true\n if (!options.readyWhen) failures = 0\n setState({ connected: true, reconnecting: false, error: null })\n if (!options.subscribeWhen) subscribe()\n if (options.readyWhen) {\n readyTimer = setTimeout(\n () => {\n if (stopped || socket !== ws) return\n try {\n sink.reportError(\n options.readyTimeoutMessage ?? \"Websocket protocol handshake timed out.\"\n )\n } finally {\n ws.close()\n }\n },\n Math.max(0, options.readyTimeoutMs ?? DEFAULT_READY_TIMEOUT_MS)\n )\n }\n }\n\n ws.onmessage = (messageEvent) => {\n if (stopped) return\n if (options.subscribeWhen?.(messageEvent.data)) subscribe()\n if (options.readyWhen?.(messageEvent.data)) {\n clearReadyTimer()\n failures = 0\n }\n options.onMessage(messageEvent.data, sink)\n }\n\n ws.onerror = () => {\n if (stopped) return\n sink.reportError(options.connectionErrorMessage)\n }\n\n ws.onclose = (event?: { readonly code?: number }) => {\n clearReadyTimer()\n if (socket === ws) {\n socket = null\n }\n if (stopped) return\n\n // The shared link ended: the server would refuse every reconnect.\n if (event?.code === SHARED_ACCESS_ENDED_CLOSE_CODE) {\n stopped = true\n sink.reportError(SHARED_ACCESS_ENDED)\n setState({ connected: false, reconnecting: false, error: SHARED_ACCESS_ENDED })\n endClientSharedAccess(client)\n return\n }\n\n setState({ connected: false, reconnecting: reconnect, error: state.error })\n scheduleReconnect()\n }\n }\n\n void connect()\n\n return {\n send(message) {\n // 1 is OPEN: read as a number, so a socket that is not the browser's still answers it.\n if (stopped || !socket || socket.readyState !== 1) return false\n socket.send(JSON.stringify(message))\n return true\n },\n close() {\n stopped = true\n connectionGeneration += 1\n if (reconnectTimer) {\n clearTimeout(reconnectTimer)\n reconnectTimer = null\n }\n socket?.close()\n socket = null\n },\n }\n}\n\n/** The socket's URL naming the shared link's grant, for a shared client; as it is otherwise. */\nfunction withSharedGrant(url: string, grantId: string | null): string {\n if (grantId === null) return url\n\n const shared = new URL(url)\n shared.searchParams.set(\"shareGrant\", grantId)\n return shared.toString()\n}\n\nfunction servesSocket(apiBaseUrl: string, socketUrl: string): boolean {\n try {\n const api = new URL(apiBaseUrl)\n const socket = new URL(socketUrl)\n return (\n socket.protocol === (api.protocol === \"https:\" ? \"wss:\" : \"ws:\") && socket.host === api.host\n )\n } catch {\n return false\n }\n}\n\n// Browsers cannot set WebSocket headers, and never hold a native session. Bun and Node take headers\n// in an options object in place of the protocols argument.\ntype HeaderWebSocketConstructor = new (\n url: string,\n options: { readonly protocols?: string[]; readonly headers: Record<string, string> }\n) => WebSocket\n\nfunction openWebSocket(\n url: string,\n protocols: readonly string[] | undefined,\n accessToken: string | null\n): WebSocket {\n if (accessToken) {\n return new (WebSocket as unknown as HeaderWebSocketConstructor)(url, {\n ...(protocols ? { protocols: [...protocols] } : {}),\n headers: { authorization: `Bearer ${accessToken}` },\n })\n }\n return protocols ? new WebSocket(url, [...protocols]) : new WebSocket(url)\n}\n\n/** Build the `ws(s)://.../<path>` URL for a Sixb WebSocket stream from the client's API base URL. */\nexport function createSixbWebSocketUrl(path: string, baseUrl?: string): string {\n const url = new URL(baseUrl ?? generatedClient.getConfig().baseUrl ?? DEFAULT_SIXB_API_BASE_URL)\n url.protocol = url.protocol === \"https:\" ? \"wss:\" : \"ws:\"\n url.pathname = path\n url.search = \"\"\n url.hash = \"\"\n return url.toString()\n}\n"
6
- ],
7
- "mappings": ";;;;;;;;;;;;;;;;AAqBA,IAAM,4BAA4B;AAClC,IAAM,6BAA6B;AACnC,IAAM,2BAA2B;AAgEjC,IAAM,gBAAyC;AAAA,EAC7C,WAAW;AAAA,EACX,cAAc;AAAA,EACd,OAAO;AACT;AAEO,SAAS,wBAAwB,CAAC,SAAwD;AAAA,EAC/F,MAAM,SAAS,QAAQ,UAAU;AAAA,EACjC,MAAM,gBAAgB,uBAAuB,MAAM;AAAA,EACnD,IAAI,kBAAkB,QAAQ,CAAC,QAAQ,cAAc;AAAA,IACnD,QAAQ,UAAU,kCAAkC;AAAA,IACpD,QAAQ,gBAAgB;AAAA,MACtB,WAAW;AAAA,MACX,cAAc;AAAA,MACd,OAAO;AAAA,IACT,CAAC;AAAA,IACD,OAAO,EAAE,MAAM,MAAM,OAAO,OAAO,MAAG;AAAA,MAAG;AAAA,MAAU;AAAA,EACrD;AAAA,EAEA,QAAQ,YAAY,MAAM,mBAAmB,+BAA+B;AAAA,EAE5E,MAAM,UAAU,0BAA0B,MAAM;AAAA,EAChD,MAAM,gBAAgB,WAAW,aAAa,QAAQ,SAAS,QAAQ,GAAG,IAAI,UAAU;AAAA,EAExF,IAAI,QAAQ;AAAA,EACZ,IAAI,UAAU;AAAA,EACd,IAAI,aAAa;AAAA,EACjB,IAAI,SAA2B;AAAA,EAC/B,IAAI,iBAAuD;AAAA,EAC3D,IAAI,uBAAuB;AAAA,EAE3B,IAAI,WAAW;AAAA,EAEf,MAAM,WAAW,CAAC,SAAkC;AAAA,IAClD,QAAQ;AAAA,IACR,QAAQ,gBAAgB,IAAI;AAAA;AAAA,EAG9B,MAAM,OAAoC;AAAA,IACxC,WAAW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