@laoyuehanni/dsh-token-usage 0.4.14 → 0.4.16

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 (134) hide show
  1. package/README.md +2 -2
  2. package/README.zh.md +2 -2
  3. package/docs/DETAIL.md +18 -0
  4. package/docs/DETAIL.zh.md +18 -0
  5. package/lib/aux-request.d.ts +18 -13
  6. package/lib/aux-request.d.ts.map +1 -1
  7. package/lib/aux-request.js +32 -19
  8. package/lib/aux-request.js.map +1 -1
  9. package/lib/backup.d.ts +32 -0
  10. package/lib/backup.d.ts.map +1 -0
  11. package/lib/backup.js +114 -0
  12. package/lib/backup.js.map +1 -0
  13. package/lib/client/CostPill.d.ts +3 -4
  14. package/lib/client/CostPill.d.ts.map +1 -1
  15. package/lib/client/CostPill.js +50 -37
  16. package/lib/client/CostPill.js.map +1 -1
  17. package/lib/client/DashboardCards.d.ts +4 -2
  18. package/lib/client/DashboardCards.d.ts.map +1 -1
  19. package/lib/client/DashboardCards.js +2 -2
  20. package/lib/client/DashboardCards.js.map +1 -1
  21. package/lib/client/OverheadRows.d.ts +17 -12
  22. package/lib/client/OverheadRows.d.ts.map +1 -1
  23. package/lib/client/OverheadRows.js +32 -20
  24. package/lib/client/OverheadRows.js.map +1 -1
  25. package/lib/client/OverviewBoard.js +3 -3
  26. package/lib/client/OverviewBoard.js.map +1 -1
  27. package/lib/client/TokenUsageCard.d.ts.map +1 -1
  28. package/lib/client/TokenUsageCard.js +6 -0
  29. package/lib/client/TokenUsageCard.js.map +1 -1
  30. package/lib/client/TokenUsageSection.d.ts.map +1 -1
  31. package/lib/client/TokenUsageSection.js +11 -9
  32. package/lib/client/TokenUsageSection.js.map +1 -1
  33. package/lib/client/UsageRows.js +2 -2
  34. package/lib/client/UsageRows.js.map +1 -1
  35. package/lib/client/UsageView.d.ts +7 -6
  36. package/lib/client/UsageView.d.ts.map +1 -1
  37. package/lib/client/UsageView.js +100 -51
  38. package/lib/client/UsageView.js.map +1 -1
  39. package/lib/client/async-resource.d.ts +5 -2
  40. package/lib/client/async-resource.d.ts.map +1 -1
  41. package/lib/client/async-resource.js +14 -6
  42. package/lib/client/async-resource.js.map +1 -1
  43. package/lib/client/cost-inflate-motion.d.ts +0 -4
  44. package/lib/client/cost-inflate-motion.d.ts.map +1 -1
  45. package/lib/client/cost-inflate-motion.js +0 -19
  46. package/lib/client/cost-inflate-motion.js.map +1 -1
  47. package/lib/client/cost-inflate.d.ts +4 -6
  48. package/lib/client/cost-inflate.d.ts.map +1 -1
  49. package/lib/client/cost-inflate.js +3 -5
  50. package/lib/client/cost-inflate.js.map +1 -1
  51. package/lib/client/format.d.ts +11 -0
  52. package/lib/client/format.d.ts.map +1 -1
  53. package/lib/client/format.js +32 -3
  54. package/lib/client/format.js.map +1 -1
  55. package/lib/client/index.d.ts.map +1 -1
  56. package/lib/client/index.js.map +1 -1
  57. package/lib/client/locales.d.ts +25 -1
  58. package/lib/client/locales.d.ts.map +1 -1
  59. package/lib/client/locales.js +50 -2
  60. package/lib/client/locales.js.map +1 -1
  61. package/lib/client/project-rows.d.ts +3 -2
  62. package/lib/client/project-rows.d.ts.map +1 -1
  63. package/lib/client/project-rows.js +3 -2
  64. package/lib/client/project-rows.js.map +1 -1
  65. package/lib/client/session-stats.d.ts +52 -10
  66. package/lib/client/session-stats.d.ts.map +1 -1
  67. package/lib/client/session-stats.js +88 -11
  68. package/lib/client/session-stats.js.map +1 -1
  69. package/lib/client/use-cost-inflate.d.ts +5 -15
  70. package/lib/client/use-cost-inflate.d.ts.map +1 -1
  71. package/lib/client/use-cost-inflate.js +11 -51
  72. package/lib/client/use-cost-inflate.js.map +1 -1
  73. package/lib/client.js +517 -319
  74. package/lib/client.js.map +1 -1
  75. package/lib/field-completion.d.ts.map +1 -1
  76. package/lib/field-completion.js +4 -1
  77. package/lib/field-completion.js.map +1 -1
  78. package/lib/index.d.ts +4 -4
  79. package/lib/index.d.ts.map +1 -1
  80. package/lib/index.js +134 -22
  81. package/lib/index.js.map +1 -1
  82. package/lib/migrate.d.ts +7 -1
  83. package/lib/migrate.d.ts.map +1 -1
  84. package/lib/migrate.js +116 -9
  85. package/lib/migrate.js.map +1 -1
  86. package/lib/project-rows.d.ts +20 -4
  87. package/lib/project-rows.d.ts.map +1 -1
  88. package/lib/project-rows.js +33 -8
  89. package/lib/project-rows.js.map +1 -1
  90. package/lib/request-observe.d.ts +7 -5
  91. package/lib/request-observe.d.ts.map +1 -1
  92. package/lib/request-observe.js +19 -16
  93. package/lib/request-observe.js.map +1 -1
  94. package/lib/rollup.d.ts +6 -1
  95. package/lib/rollup.d.ts.map +1 -1
  96. package/lib/rollup.js +15 -1
  97. package/lib/rollup.js.map +1 -1
  98. package/lib/session-request-details.d.ts.map +1 -1
  99. package/lib/session-request-details.js +5 -1
  100. package/lib/session-request-details.js.map +1 -1
  101. package/lib/stats-route.d.ts.map +1 -1
  102. package/lib/stats-route.js +65 -8
  103. package/lib/stats-route.js.map +1 -1
  104. package/lib/stats.d.ts +42 -1
  105. package/lib/stats.d.ts.map +1 -1
  106. package/lib/stats.js +240 -16
  107. package/lib/stats.js.map +1 -1
  108. package/lib/sync.d.ts +32 -0
  109. package/lib/sync.d.ts.map +1 -1
  110. package/lib/sync.js +286 -30
  111. package/lib/sync.js.map +1 -1
  112. package/lib/usage-log.d.ts +14 -9
  113. package/lib/usage-log.d.ts.map +1 -1
  114. package/lib/usage-log.js +190 -144
  115. package/lib/usage-log.js.map +1 -1
  116. package/lib/usage-record.d.ts +150 -27
  117. package/lib/usage-record.d.ts.map +1 -1
  118. package/lib/usage-record.js +221 -34
  119. package/lib/usage-record.js.map +1 -1
  120. package/lib/web-call.d.ts +55 -0
  121. package/lib/web-call.d.ts.map +1 -0
  122. package/lib/web-call.js +222 -0
  123. package/lib/web-call.js.map +1 -0
  124. package/lib/wire.d.ts +122 -11
  125. package/lib/wire.d.ts.map +1 -1
  126. package/lib/wire.js +40 -7
  127. package/lib/wire.js.map +1 -1
  128. package/locale/en.json +5 -1
  129. package/locale/zh.json +2 -1
  130. package/package.json +3 -3
  131. package/lib/client/CostDeltaFlyLabel.d.ts +0 -8
  132. package/lib/client/CostDeltaFlyLabel.d.ts.map +0 -1
  133. package/lib/client/CostDeltaFlyLabel.js +0 -24
  134. package/lib/client/CostDeltaFlyLabel.js.map +0 -1
@@ -29,12 +29,13 @@ export interface UsageFields {
29
29
  * compaction summarize request (a provider-billed call of its own), a
30
30
  * failed model request (a turn that ended in an LLM error, or a provider
31
31
  * attempt that `dsh-llm-retry` scheduled a retry for — counted in its own
32
- * `failures` dimension, never in `requests`), or an auxiliary request (a
32
+ * `failures` dimension, never in `requests`), an auxiliary request (a
33
33
  * bypass model call that is not part of the conversation turn: the Auto
34
- * review authorization gate, session-title generation, or reasoning
35
- * translation).
34
+ * review authorization gate, session-title generation, timeline report
35
+ * generation, or reasoning translation), or a web search (one `web_search`
36
+ * tool call whose model-turn tokens are recorded when the host reports them).
36
37
  */
37
- export type UsageRecordKind = 'request' | 'compaction' | 'failure' | 'aux';
38
+ export type UsageRecordKind = 'request' | 'compaction' | 'failure' | 'aux' | 'web';
38
39
  /**
39
40
  * The origin of one auxiliary (bypass) model request. These calls are
40
41
  * issued by host packages directly through `ctx.llm.stream()` and do not
@@ -42,19 +43,61 @@ export type UsageRecordKind = 'request' | 'compaction' | 'failure' | 'aux';
42
43
  * on the `llm/stream` waterfall instead:
43
44
  *
44
45
  * - `auto-review` — the per-tool-call authorization reviewer of
45
- * `@deepseek-ai/dsh-experimental-auto-review`.
46
+ * `@deepseek-ai/dsh-experimental-auto-review` (`purpose: 'auto-review'` on
47
+ * current hosts; `REVIEW_POLICY` prompt prefix fallback on older hosts).
46
48
  * - `session-title` — the logged `session/title-llm-request` generation
47
49
  * (`purpose: 'session-title'` on the request).
50
+ * - `timeline-report` — timed progress report synthesis of
51
+ * `@deepseek-ai/dsh-experimental-timeline` (`purpose: 'timeline-report'`).
48
52
  * - `translation` — the reasoning/CoT translator
49
53
  * (`@deepseek-ai/dsh-experimental-translator`).
50
- * - `other` — any other unmarked bypass request. A defensive bucket: DSH
51
- * gives Auto review and the translator no purpose marker, so their
52
- * identification is prompt-text based and a host upgrade can move them
53
- * here without dropping the usage data.
54
+ * - `other` — any other unmarked or unrecognized-purpose bypass request. A
55
+ * defensive bucket: a host upgrade adding a new purpose or changing an
56
+ * unmarked prompt lands here without dropping the usage data.
54
57
  */
55
- export type AuxKind = 'auto-review' | 'session-title' | 'translation' | 'other';
58
+ export type AuxKind = 'auto-review' | 'session-title' | 'timeline-report' | 'translation' | 'other';
56
59
  /** Every auxiliary kind, in the fixed display order the tables use. */
57
60
  export declare const AUX_KINDS: readonly AuxKind[];
61
+ /** The model-visible tools whose calls the web dimension records. */
62
+ export declare const WEB_SEARCH_TOOL = "web_search";
63
+ export declare const WEB_FETCH_TOOL = "web_fetch";
64
+ /** Every recorded web tool, in the fixed display order the overhead card uses. */
65
+ export declare const WEB_TOOLS: readonly ["web_search", "web_fetch"];
66
+ /** One recorded web-tool name. */
67
+ export type WebTool = (typeof WEB_TOOLS)[number];
68
+ /** Whether a `tool/call` name belongs to the recorded web-tools dimension. */
69
+ export declare function isWebTool(name: unknown): name is WebTool;
70
+ /**
71
+ * Invocation facts of one recorded web search. They are deliberately kept
72
+ * apart from the billing fields: `rounds` says how many model turns the call
73
+ * actually spent (0 when the selected backend bills per search instead of
74
+ * per turn), while `usage` on the record carries the token figures only when
75
+ * the host reported them.
76
+ */
77
+ export interface WebCallInfo {
78
+ /** The tool that made the call (`web_search` or `web_fetch`). */
79
+ tool: string;
80
+ /** The model's tool-call id, pairing this row with the call event. */
81
+ callId: string;
82
+ /** Number of queries the call submitted; absent when the arguments carried
83
+ * none. The query text stays in the session log and is not copied into the
84
+ * ledger. */
85
+ queryCount?: number;
86
+ /** Model rounds the call triggered; absent when none (per-search backend). */
87
+ rounds?: number;
88
+ /** Present when the tool result reported a failure. */
89
+ failed?: true;
90
+ /** Provider-neutral failure code from the tool result, when it named one. */
91
+ errorCode?: string;
92
+ /** Wall time from the tool call to its result, in milliseconds. */
93
+ durationMs?: number;
94
+ }
95
+ /**
96
+ * Whether a raw JSONL row's `kind` field belongs to session-log-derived
97
+ * origins that `reconcile` may drop or reassign. Auxiliary rows (`'aux'`)
98
+ * and any unknown future kind are unconditionally exempt.
99
+ */
100
+ export declare function isReconcilableKind(rawKind: unknown): boolean;
58
101
  /** One JSONL row: one provider model call (successful or failed). */
59
102
  export interface UsageRecord {
60
103
  /** Stable request identity: the assistant message id (dedupe key), a
@@ -64,7 +107,7 @@ export interface UsageRecord {
64
107
  /** Session-event wall time, epoch milliseconds. */
65
108
  time: number;
66
109
  /** Owning session id; '' for an auxiliary row whose host call cannot be
67
- * attributed safely (for example Auto review on older hosts). */
110
+ * attributed safely (for example translation or Auto review on older hosts). */
68
111
  sessionId: string;
69
112
  /** Provider model id that produced the message; a failure row carries the
70
113
  * session's last-known route model ('' when none was ever observed). */
@@ -84,9 +127,9 @@ export interface UsageRecord {
84
127
  /** Auxiliary row only: which bypass call produced it. Absent on every
85
128
  * other kind; a future unknown value normalizes to `'other'` on read. */
86
129
  auxKind?: AuxKind;
87
- /** Failure row only: the provider-neutral `LlmFailure.code` the attempt
88
- * failed with (RATE_LIMIT, TRANSPORT, QUOTA, …). Absent on every other
89
- * kind; a future code renders verbatim. */
130
+ /** Failure row (or refused billed auxiliary row) only: the provider-neutral
131
+ * `LlmFailure.code` the attempt failed with (RATE_LIMIT, CONTENT_REFUSED, …).
132
+ * Absent on other rows; a future code renders verbatim. */
90
133
  failureCode?: string;
91
134
  /** Wall time in milliseconds from request dispatch (`step/start`) to message settlement (`assistant/message`). */
92
135
  latencyMs?: number;
@@ -126,6 +169,10 @@ export interface UsageRecord {
126
169
  * philosophy as `kind`); never written on compaction / failure / aux
127
170
  * rows. */
128
171
  compactionAttribution?: CompactionAttributionItem[];
172
+ /** Web-search rows only: the invocation facts of one recorded `web_search`
173
+ * call. Absent on every other kind; the optional `usage` on the row carries
174
+ * the model-turn tokens when the host reported them. */
175
+ web?: WebCallInfo;
129
176
  }
130
177
  /** Optional timing figures for one model request. */
131
178
  export interface RequestTiming {
@@ -145,6 +192,12 @@ export declare function isTokenDelta(chunk: unknown): boolean;
145
192
  * Mirrors DSH llm assistantStreamFirstTokenTime for durable compact streams.
146
193
  */
147
194
  export declare function extractFirstTokenTimeFromStream(stream: unknown): number | undefined;
195
+ /**
196
+ * Extract the last valid provider usage chunk embedded in a compact assistant
197
+ * stream (`assistant/attempt` / `assistant/message` `stream`). Used to retain
198
+ * billed tokens emitted before a failure settlement (such as `CONTENT_REFUSED`).
199
+ */
200
+ export declare function extractUsageFromStream(stream: unknown): UsageFields | undefined;
148
201
  /**
149
202
  * Project the event's optional provider usage into the four base buckets.
150
203
  * A missing record or an invalid required bucket renders the whole usage
@@ -194,6 +247,47 @@ export declare function recordFromEvent(event: SessionEvent<'assistant/message'>
194
247
  * @returns the record, or null when the event carries no usable usage.
195
248
  */
196
249
  export declare function recordFromCompaction(event: SessionEvent<'compaction/summary'>, sessionId: string): UsageRecord | null;
250
+ /**
251
+ * Read the token figure a host may attach to a search event. Two shapes are
252
+ * accepted because the host owns the web-search event contract: the plugin's
253
+ * own `UsageFields` spelling and the Anthropic Messages `usage` spelling the
254
+ * provider receives from DeepSeek. A value without both input and output
255
+ * counts is not usable and reads as absent — a search whose host reported no
256
+ * usage must stay unmetered instead of becoming a zero-cost row.
257
+ * @param value - an opaque `usage` payload from an event or result meta.
258
+ * @returns the normalised token buckets, or undefined when none is usable.
259
+ */
260
+ export declare function extractWebUsage(value: unknown): UsageFields | undefined;
261
+ /** Input of one web-search row emitted when a `web_search` tool call settles. */
262
+ export interface WebCallRecordInput {
263
+ sessionId: string;
264
+ /** Settlement wall time (the `tool/result` event time). */
265
+ time: number;
266
+ /** Settlement event seq: unique within the session, so repeated syncs dedupe. */
267
+ seq: number;
268
+ tool: string;
269
+ callId: string;
270
+ queryCount?: number;
271
+ rounds?: number;
272
+ failed?: boolean;
273
+ errorCode?: string;
274
+ durationMs?: number;
275
+ /** Model that served the searched rounds, when the host named one. */
276
+ model?: string;
277
+ /** Reported token figures of all rounds the call triggered, when any. */
278
+ usage?: UsageFields;
279
+ }
280
+ /**
281
+ * Build the log row for one settled `web_search` tool call. The request id is
282
+ * `web:<sessionId>:<seq>` — the settlement event's persistent seq, so a
283
+ * repeated sync dedupes and history backfill is reproducible. Invocation
284
+ * facts live under `web`; token figures stay in the ordinary `usage` field
285
+ * only when the host reported them, so a backend that bills per search keeps
286
+ * a truthful unmetered row instead of a fabricated one.
287
+ * @param input - the settled call's facts.
288
+ * @returns the row to append.
289
+ */
290
+ export declare function recordFromWebCall(input: WebCallRecordInput): UsageRecord;
197
291
  /** One JSONL line without the trailing newline. */
198
292
  export declare function serializeRecord(record: UsageRecord): string;
199
293
  /**
@@ -214,46 +308,75 @@ export declare function serializeRecord(record: UsageRecord): string;
214
308
  * when none was observed — the field is then omitted, never guessed).
215
309
  * @returns the record, or null when the turn ended for a non-error reason.
216
310
  */
217
- export declare function recordFromTurnEnd(event: SessionEvent<'turn/end'>, sessionId: string, model: string, provider?: string): UsageRecord | null;
311
+ export declare function recordFromTurnEnd(event: SessionEvent<'turn/end'>, sessionId: string, model: string, provider?: string, usage?: UsageFields): UsageRecord | null;
218
312
  /**
219
313
  * Build the log row for one `llm/retry` session event — a provider attempt
220
314
  * that failed and that `dsh-llm-retry` scheduled another try for. Every
221
315
  * such event is a real failed call (the plugin writes it before the wait,
222
316
  * so a later cancel during backoff still counts the original attempt).
223
- * The row carries no usage; `model` is the session's last-known route
317
+ * The row carries optional billed usage when the attempt emitted one before
318
+ * failing; `model` is the session's last-known route
224
319
  * (the event names the provider, not the model); the route key is this
225
320
  * attempt's own `data.provider`, not the session's last-known route.
226
321
  * `failureCode` is the `LlmFailure.code` on the payload.
227
322
  * `llm/retry-started` is the wait-complete marker and is not a failure —
228
323
  * the caller ignores it.
229
324
  */
230
- export declare function recordFromRetry(event: SessionEvent<'llm/retry'>, sessionId: string, model: string): UsageRecord;
325
+ export declare function recordFromRetry(event: SessionEvent<'llm/retry'>, sessionId: string, model: string, usage?: UsageFields): UsageRecord;
326
+ /**
327
+ * Route key the experimental `@deepseek-ai/dsh-deepseek-chat-import` plugin
328
+ * writes as both `provider` and `model` on every imported assistant message
329
+ * (upstream `IMPORTED_MODEL_SOURCE`). Mirrored here because the plugin is not
330
+ * a dependency of this package.
331
+ */
332
+ export declare const IMPORTED_CHAT_EXPORT_PROVIDER = "deepseek-chat-export";
333
+ /**
334
+ * Failure-code prefix of the `turn/end` errors the same importer writes for
335
+ * exported replies it excludes from model history (no reply, unfinished
336
+ * status, server template, empty reply). These turns never reached a provider.
337
+ */
338
+ export declare const IMPORTED_CHAT_EXPORT_FAILURE_PREFIX = "DEEPSEEK_EXPORT_";
339
+ /**
340
+ * Whether one session event is conversation history the DeepSeek chat
341
+ * importer synthesized rather than a provider call: an imported
342
+ * `assistant/message` (the importer's route key with no usage) or a
343
+ * `turn/end` error carrying an importer failure code. Such events never
344
+ * become log rows and never reveal the session's route. A later turn the
345
+ * user runs on an imported session names a real route and records normally.
346
+ * @param event - one session event.
347
+ * @returns true for importer-synthesized history.
348
+ */
349
+ export declare function isImportedHistoryEvent(event: SessionEvent): boolean;
231
350
  /**
232
351
  * Project one session event into a log row, or null when the event is not
233
- * a recorded origin. Live listening and history sync share this so a new
234
- * origin cannot land on only one path. `lastModel` is the session's last
352
+ * a recorded origin (including history the DeepSeek chat importer
353
+ * synthesized, see {@link isImportedHistoryEvent}). Live listening and
354
+ * history sync share this so a new origin cannot land on only one path.
355
+ * `lastModel` is the session's last
235
356
  * known model and `lastProvider` its last known route key (a `turn/end`
236
357
  * error names neither; compaction and `llm/retry` carry their own route
237
358
  * on the event). Compaction recording follows the same `recordCompaction`
238
359
  * switch both callers take.
239
360
  */
240
- export declare function recordOfEvent(event: SessionEvent, sessionId: string, lastModel: string, recordCompaction?: boolean, timing?: RequestTiming, lastProvider?: string): UsageRecord | null;
361
+ export declare function recordOfEvent(event: SessionEvent, sessionId: string, lastModel: string, recordCompaction?: boolean, timing?: RequestTiming, lastProvider?: string, failureUsage?: UsageFields): UsageRecord | null;
241
362
  /**
242
363
  * The model id an event reveals about the session's current route, when it
243
- * does: `request/context` announces route changes before dispatch (it logs
244
- * only on change), and `assistant/message` confirms the model that actually
245
- * produced a message. Both fold into the same last-known value, so a turn
246
- * that ends in an error can still attribute its failure row to a model.
364
+ * does: `request/header` establishes the call config at the start of an epoch
365
+ * or fork resume, `request/context` announces route changes before dispatch
366
+ * (it logs only on change), and `assistant/message` confirms the model that
367
+ * actually produced a message. All three fold into the same last-known value,
368
+ * so a turn that ends in an error can still attribute its failure row to a model.
369
+ * An imported DeepSeek chat message reveals nothing: its route key is not a model.
247
370
  */
248
371
  export declare function modelOfEvent(event: SessionEvent): string | undefined;
249
372
  /**
250
373
  * The route key an event reveals about the session's current route, when
251
- * it does. Same two sources as {@link modelOfEvent}: `request/context`
252
- * announces a route change before dispatch, and `assistant/message`
253
- * confirms the route that produced a message. An empty key reveals
374
+ * it does. Same sources as {@link modelOfEvent}: `request/header`,
375
+ * `request/context`, and `assistant/message`. An empty key reveals
254
376
  * nothing — it must not wipe a route already known. Compaction and
255
377
  * `llm/retry` name their own route on the row, but they do not move this
256
378
  * last-known value; a later `turn/end` keeps following the request route.
379
+ * An imported DeepSeek chat message reveals nothing, same as in {@link modelOfEvent}.
257
380
  */
258
381
  export declare function providerOfEvent(event: SessionEvent): string | undefined;
259
382
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"usage-record.d.ts","sourceRoot":"","sources":["../src/usage-record.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAC5D,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,6BAA6B,CAAA;AAQ5E,4EAA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