@hatk/hatk 0.0.1-alpha.11 → 0.0.1-alpha.111

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 (224) hide show
  1. package/dist/adapter.d.ts +19 -0
  2. package/dist/adapter.d.ts.map +1 -0
  3. package/dist/adapter.js +113 -0
  4. package/dist/backfill.d.ts +36 -2
  5. package/dist/backfill.d.ts.map +1 -1
  6. package/dist/backfill.js +153 -37
  7. package/dist/car.js +1 -1
  8. package/dist/classifiers.d.ts +228 -0
  9. package/dist/classifiers.d.ts.map +1 -0
  10. package/dist/classifiers.js +688 -0
  11. package/dist/cli.js +248 -1043
  12. package/dist/config.d.ts +179 -1
  13. package/dist/config.d.ts.map +1 -1
  14. package/dist/config.js +78 -8
  15. package/dist/database/adapter-factory.d.ts +6 -0
  16. package/dist/database/adapter-factory.d.ts.map +1 -0
  17. package/dist/database/adapter-factory.js +20 -0
  18. package/dist/database/adapters/duckdb-search.d.ts +12 -0
  19. package/dist/database/adapters/duckdb-search.d.ts.map +1 -0
  20. package/dist/database/adapters/duckdb-search.js +27 -0
  21. package/dist/database/adapters/duckdb.d.ts +25 -0
  22. package/dist/database/adapters/duckdb.d.ts.map +1 -0
  23. package/dist/database/adapters/duckdb.js +161 -0
  24. package/dist/database/adapters/sqlite-search.d.ts +16 -0
  25. package/dist/database/adapters/sqlite-search.d.ts.map +1 -0
  26. package/dist/database/adapters/sqlite-search.js +76 -0
  27. package/dist/database/adapters/sqlite.d.ts +18 -0
  28. package/dist/database/adapters/sqlite.d.ts.map +1 -0
  29. package/dist/database/adapters/sqlite.js +88 -0
  30. package/dist/database/db.d.ts +290 -0
  31. package/dist/database/db.d.ts.map +1 -0
  32. package/dist/database/db.js +2073 -0
  33. package/dist/database/dialect.d.ts +45 -0
  34. package/dist/database/dialect.d.ts.map +1 -0
  35. package/dist/database/dialect.js +72 -0
  36. package/dist/{fts.d.ts → database/fts.d.ts} +7 -0
  37. package/dist/database/fts.d.ts.map +1 -0
  38. package/dist/{fts.js → database/fts.js} +122 -34
  39. package/dist/database/index.d.ts +7 -0
  40. package/dist/database/index.d.ts.map +1 -0
  41. package/dist/database/index.js +6 -0
  42. package/dist/database/ports.d.ts +50 -0
  43. package/dist/database/ports.d.ts.map +1 -0
  44. package/dist/database/ports.js +1 -0
  45. package/dist/database/schema.d.ts +91 -0
  46. package/dist/database/schema.d.ts.map +1 -0
  47. package/dist/{schema.js → database/schema.js} +153 -54
  48. package/dist/dev-entry.d.ts +8 -0
  49. package/dist/dev-entry.d.ts.map +1 -0
  50. package/dist/dev-entry.js +131 -0
  51. package/dist/feeds.d.ts +26 -8
  52. package/dist/feeds.d.ts.map +1 -1
  53. package/dist/feeds.js +72 -16
  54. package/dist/hooks.d.ts +102 -0
  55. package/dist/hooks.d.ts.map +1 -0
  56. package/dist/hooks.js +186 -0
  57. package/dist/hydrate.d.ts +55 -6
  58. package/dist/hydrate.d.ts.map +1 -1
  59. package/dist/hydrate.js +21 -20
  60. package/dist/indexer.d.ts +194 -3
  61. package/dist/indexer.d.ts.map +1 -1
  62. package/dist/indexer.js +627 -92
  63. package/dist/jetstream.d.ts +118 -0
  64. package/dist/jetstream.d.ts.map +1 -0
  65. package/dist/jetstream.js +238 -0
  66. package/dist/labels.d.ts +36 -0
  67. package/dist/labels.d.ts.map +1 -1
  68. package/dist/labels.js +71 -6
  69. package/dist/lex-types.d.ts +2 -0
  70. package/dist/lex-types.d.ts.map +1 -1
  71. package/dist/lexicon-resolve.d.ts.map +1 -1
  72. package/dist/lexicon-resolve.js +27 -112
  73. package/dist/lexicons/com/atproto/label/defs.json +75 -0
  74. package/dist/lexicons/com/atproto/moderation/defs.json +30 -0
  75. package/dist/lexicons/com/atproto/repo/strongRef.json +21 -0
  76. package/dist/lexicons/dev/hatk/applyWrites.json +87 -0
  77. package/dist/lexicons/dev/hatk/createRecord.json +40 -0
  78. package/dist/lexicons/dev/hatk/createReport.json +48 -0
  79. package/dist/lexicons/dev/hatk/deleteRecord.json +25 -0
  80. package/dist/lexicons/dev/hatk/describeCollections.json +41 -0
  81. package/dist/lexicons/dev/hatk/describeFeeds.json +29 -0
  82. package/dist/lexicons/dev/hatk/describeLabels.json +45 -0
  83. package/dist/lexicons/dev/hatk/getFeed.json +30 -0
  84. package/dist/lexicons/dev/hatk/getPreferences.json +19 -0
  85. package/dist/lexicons/dev/hatk/getRecord.json +26 -0
  86. package/dist/lexicons/dev/hatk/getRecords.json +32 -0
  87. package/dist/lexicons/dev/hatk/putPreference.json +28 -0
  88. package/dist/lexicons/dev/hatk/putRecord.json +41 -0
  89. package/dist/lexicons/dev/hatk/searchRecords.json +32 -0
  90. package/dist/lexicons/dev/hatk/uploadBlob.json +23 -0
  91. package/dist/logger.d.ts +29 -0
  92. package/dist/logger.d.ts.map +1 -1
  93. package/dist/logger.js +29 -0
  94. package/dist/main.js +212 -75
  95. package/dist/mst.d.ts +15 -0
  96. package/dist/mst.d.ts.map +1 -1
  97. package/dist/mst.js +13 -0
  98. package/dist/oauth/db.d.ts +27 -1
  99. package/dist/oauth/db.d.ts.map +1 -1
  100. package/dist/oauth/db.js +80 -19
  101. package/dist/oauth/discovery.d.ts +10 -0
  102. package/dist/oauth/discovery.d.ts.map +1 -1
  103. package/dist/oauth/discovery.js +54 -2
  104. package/dist/oauth/server.d.ts +131 -1
  105. package/dist/oauth/server.d.ts.map +1 -1
  106. package/dist/oauth/server.js +504 -39
  107. package/dist/oauth/service-describe.d.ts +42 -0
  108. package/dist/oauth/service-describe.d.ts.map +1 -0
  109. package/dist/oauth/service-describe.js +108 -0
  110. package/dist/oauth/session.d.ts +32 -0
  111. package/dist/oauth/session.d.ts.map +1 -0
  112. package/dist/oauth/session.js +131 -0
  113. package/dist/opengraph.d.ts +10 -0
  114. package/dist/opengraph.d.ts.map +1 -1
  115. package/dist/opengraph.js +94 -42
  116. package/dist/pds-proxy.d.ts +92 -0
  117. package/dist/pds-proxy.d.ts.map +1 -0
  118. package/dist/pds-proxy.js +396 -0
  119. package/dist/private-collections.d.ts +13 -0
  120. package/dist/private-collections.d.ts.map +1 -0
  121. package/dist/private-collections.js +27 -0
  122. package/dist/push.d.ts +54 -0
  123. package/dist/push.d.ts.map +1 -0
  124. package/dist/push.js +367 -0
  125. package/dist/renderer.d.ts +27 -0
  126. package/dist/renderer.d.ts.map +1 -0
  127. package/dist/renderer.js +46 -0
  128. package/dist/resolve-hatk.d.ts +6 -0
  129. package/dist/resolve-hatk.d.ts.map +1 -0
  130. package/dist/resolve-hatk.js +20 -0
  131. package/dist/response.d.ts +16 -0
  132. package/dist/response.d.ts.map +1 -0
  133. package/dist/response.js +69 -0
  134. package/dist/scanner.d.ts +22 -0
  135. package/dist/scanner.d.ts.map +1 -0
  136. package/dist/scanner.js +92 -0
  137. package/dist/seed.d.ts +19 -0
  138. package/dist/seed.d.ts.map +1 -1
  139. package/dist/seed.js +43 -4
  140. package/dist/server-init.d.ts +8 -0
  141. package/dist/server-init.d.ts.map +1 -0
  142. package/dist/server-init.js +75 -0
  143. package/dist/server.d.ts +46 -3
  144. package/dist/server.d.ts.map +1 -1
  145. package/dist/server.js +1137 -649
  146. package/dist/setup.d.ts +28 -1
  147. package/dist/setup.d.ts.map +1 -1
  148. package/dist/setup.js +50 -3
  149. package/dist/spaces/blob.d.ts +112 -0
  150. package/dist/spaces/blob.d.ts.map +1 -0
  151. package/dist/spaces/blob.js +460 -0
  152. package/dist/spaces/credential.d.ts +82 -0
  153. package/dist/spaces/credential.d.ts.map +1 -0
  154. package/dist/spaces/credential.js +220 -0
  155. package/dist/spaces/engine.d.ts +97 -0
  156. package/dist/spaces/engine.d.ts.map +1 -0
  157. package/dist/spaces/engine.js +563 -0
  158. package/dist/spaces/guard.d.ts +41 -0
  159. package/dist/spaces/guard.d.ts.map +1 -0
  160. package/dist/spaces/guard.js +79 -0
  161. package/dist/spaces/identity.d.ts +37 -0
  162. package/dist/spaces/identity.d.ts.map +1 -0
  163. package/dist/spaces/identity.js +93 -0
  164. package/dist/spaces/index.d.ts +56 -0
  165. package/dist/spaces/index.d.ts.map +1 -0
  166. package/dist/spaces/index.js +134 -0
  167. package/dist/spaces/notify.d.ts +60 -0
  168. package/dist/spaces/notify.d.ts.map +1 -0
  169. package/dist/spaces/notify.js +128 -0
  170. package/dist/spaces/records.d.ts +37 -0
  171. package/dist/spaces/records.d.ts.map +1 -0
  172. package/dist/spaces/records.js +63 -0
  173. package/dist/spaces/signature.d.ts +36 -0
  174. package/dist/spaces/signature.d.ts.map +1 -0
  175. package/dist/spaces/signature.js +83 -0
  176. package/dist/spaces/store.d.ts +51 -0
  177. package/dist/spaces/store.d.ts.map +1 -0
  178. package/dist/spaces/store.js +99 -0
  179. package/dist/spaces/uri.d.ts +60 -0
  180. package/dist/spaces/uri.d.ts.map +1 -0
  181. package/dist/spaces/uri.js +97 -0
  182. package/dist/spaces/verify.d.ts +46 -0
  183. package/dist/spaces/verify.d.ts.map +1 -0
  184. package/dist/spaces/verify.js +94 -0
  185. package/dist/spaces/viewer.d.ts +51 -0
  186. package/dist/spaces/viewer.d.ts.map +1 -0
  187. package/dist/spaces/viewer.js +167 -0
  188. package/dist/spaces/visibility.d.ts +57 -0
  189. package/dist/spaces/visibility.d.ts.map +1 -0
  190. package/dist/spaces/visibility.js +81 -0
  191. package/dist/templates/feed.tpl +18 -0
  192. package/dist/templates/hook.tpl +5 -0
  193. package/dist/templates/label.tpl +15 -0
  194. package/dist/templates/og.tpl +17 -0
  195. package/dist/templates/seed.tpl +11 -0
  196. package/dist/templates/setup.tpl +5 -0
  197. package/dist/templates/test-feed.tpl +19 -0
  198. package/dist/templates/test-xrpc.tpl +19 -0
  199. package/dist/templates/xrpc.tpl +53 -0
  200. package/dist/test.d.ts +3 -1
  201. package/dist/test.d.ts.map +1 -1
  202. package/dist/test.js +60 -36
  203. package/dist/views.js +1 -1
  204. package/dist/vite-plugin.d.ts +1 -1
  205. package/dist/vite-plugin.d.ts.map +1 -1
  206. package/dist/vite-plugin.js +254 -66
  207. package/dist/xrpc.d.ts +143 -12
  208. package/dist/xrpc.d.ts.map +1 -1
  209. package/dist/xrpc.js +282 -55
  210. package/package.json +29 -9
  211. package/public/admin-auth.js +271 -306
  212. package/public/admin.html +652 -61
  213. package/dist/db.d.ts +0 -135
  214. package/dist/db.d.ts.map +0 -1
  215. package/dist/db.js +0 -1365
  216. package/dist/fts.d.ts.map +0 -1
  217. package/dist/oauth/hooks.d.ts +0 -10
  218. package/dist/oauth/hooks.d.ts.map +0 -1
  219. package/dist/oauth/hooks.js +0 -40
  220. package/dist/schema.d.ts +0 -51
  221. package/dist/schema.d.ts.map +0 -1
  222. package/dist/test-browser.d.ts +0 -14
  223. package/dist/test-browser.d.ts.map +0 -1
  224. package/dist/test-browser.js +0 -26
@@ -0,0 +1,228 @@
1
+ /** A typed question in the shape Clef accepts. */
2
+ export interface ClassifierQuestion {
3
+ type: 'noul' | 'choice' | 'score';
4
+ instructions: string | Record<string, unknown> | unknown[];
5
+ criteria?: unknown;
6
+ }
7
+ /** The thing being scored: an account (by DID) or a single record. */
8
+ export interface ClassifierSubject {
9
+ /** `at://` URI for a record subject; the bare DID for an account subject. */
10
+ uri: string;
11
+ did: string;
12
+ handle?: string | null;
13
+ collection?: string;
14
+ value?: Record<string, any>;
15
+ }
16
+ export interface ClassifierContext {
17
+ db: {
18
+ query: (sql: string, params?: any[]) => Promise<any[]>;
19
+ run: (sql: string, ...params: any[]) => Promise<void>;
20
+ };
21
+ subject: ClassifierSubject;
22
+ }
23
+ export interface ClassifierModule {
24
+ /** `account` scans every indexed repo; `record` scans rows of `collections`. */
25
+ subject: 'account' | 'record';
26
+ /** Collections to scan. Required when `subject` is `record`. */
27
+ collections?: string[];
28
+ /** The questions to ask. Answers come back under the same keys. Omit when
29
+ * the classifier supplies its own `classify`. */
30
+ questions?: Record<string, ClassifierQuestion>;
31
+ /**
32
+ * Produce signals without asking Clef.
33
+ *
34
+ * A classifier that runs its own model — an image classifier on the host, a
35
+ * hash lookup, a heuristic — sets this instead of `questions`. Everything
36
+ * downstream is unchanged: the same thresholds, the same report, the same
37
+ * review card. Return a bare number for a plain score.
38
+ */
39
+ classify?: (state: Record<string, unknown>, ctx: ClassifierContext) => Promise<Record<string, number | Signal>>;
40
+ /**
41
+ * Build the model `state` for this subject. Return `null` to skip it — a
42
+ * skipped subject costs no tokens. Gate on whatever makes the question
43
+ * answerable: an account with no content cannot be judged on its content.
44
+ */
45
+ buildState: (ctx: ClassifierContext) => Promise<Record<string, unknown> | null>;
46
+ /**
47
+ * URLs of images to show the model alongside `state`, at most four. hatk
48
+ * fetches each and embeds it in the request, since Clef takes images inline
49
+ * rather than by reference.
50
+ *
51
+ * Return small renditions. Clef's context window is counted on the encoded
52
+ * bytes, so a full-size photo can overflow it where a 512px one never does.
53
+ * The state should carry whatever identifies the image — a blob CID — so
54
+ * that a changed image changes the fingerprint and is scored again.
55
+ */
56
+ images?: (state: Record<string, unknown>, ctx: ClassifierContext) => Promise<string[]> | string[];
57
+ /**
58
+ * Score at or above which a signal files a report. A number applies to every
59
+ * question; a map sets it per question. Questions absent from the map never
60
+ * file, though their scores are still stored and shown.
61
+ */
62
+ threshold?: number | Record<string, number>;
63
+ /** Label the filed report carries. A function receives the crossing signal. */
64
+ label?: string | ((signal: string, score: number) => string);
65
+ }
66
+ export declare function defineClassifier(module: ClassifierModule): {
67
+ /** `account` scans every indexed repo; `record` scans rows of `collections`. */
68
+ subject: "account" | "record";
69
+ /** Collections to scan. Required when `subject` is `record`. */
70
+ collections?: string[];
71
+ /** The questions to ask. Answers come back under the same keys. Omit when
72
+ * the classifier supplies its own `classify`. */
73
+ questions?: Record<string, ClassifierQuestion>;
74
+ /**
75
+ * Produce signals without asking Clef.
76
+ *
77
+ * A classifier that runs its own model — an image classifier on the host, a
78
+ * hash lookup, a heuristic — sets this instead of `questions`. Everything
79
+ * downstream is unchanged: the same thresholds, the same report, the same
80
+ * review card. Return a bare number for a plain score.
81
+ */
82
+ classify?: (state: Record<string, unknown>, ctx: ClassifierContext) => Promise<Record<string, number | Signal>>;
83
+ /**
84
+ * Build the model `state` for this subject. Return `null` to skip it — a
85
+ * skipped subject costs no tokens. Gate on whatever makes the question
86
+ * answerable: an account with no content cannot be judged on its content.
87
+ */
88
+ buildState: (ctx: ClassifierContext) => Promise<Record<string, unknown> | null>;
89
+ /**
90
+ * URLs of images to show the model alongside `state`, at most four. hatk
91
+ * fetches each and embeds it in the request, since Clef takes images inline
92
+ * rather than by reference.
93
+ *
94
+ * Return small renditions. Clef's context window is counted on the encoded
95
+ * bytes, so a full-size photo can overflow it where a 512px one never does.
96
+ * The state should carry whatever identifies the image — a blob CID — so
97
+ * that a changed image changes the fingerprint and is scored again.
98
+ */
99
+ images?: (state: Record<string, unknown>, ctx: ClassifierContext) => Promise<string[]> | string[];
100
+ /**
101
+ * Score at or above which a signal files a report. A number applies to every
102
+ * question; a map sets it per question. Questions absent from the map never
103
+ * file, though their scores are still stored and shown.
104
+ */
105
+ threshold?: number | Record<string, number>;
106
+ /** Label the filed report carries. A function receives the crossing signal. */
107
+ label?: string | ((signal: string, score: number) => string);
108
+ __type: "classifiers";
109
+ };
110
+ interface LoadedClassifier extends ClassifierModule {
111
+ name: string;
112
+ }
113
+ /** Discover and load classifier modules from the `classifiers/` directory. */
114
+ export declare function initClassifiers(classifiersDir: string): Promise<void>;
115
+ /**
116
+ * Register a classifier directly, bypassing directory discovery.
117
+ *
118
+ * Mirrors {@link registerLabelModule}: tests and embedders that build their own
119
+ * module graph have no `classifiers/` directory to read.
120
+ */
121
+ export declare function registerClassifier(name: string, module: ClassifierModule): void;
122
+ /** Clear all registered classifiers (for hot-reload). */
123
+ export declare function clearClassifiers(): void;
124
+ /** Names of all loaded classifiers. */
125
+ export declare function listClassifiers(): string[];
126
+ export declare function getClassifier(name: string): LoadedClassifier | undefined;
127
+ export interface ClefClientConfig {
128
+ apiToken: string;
129
+ model: string;
130
+ endpoint: string;
131
+ }
132
+ export declare function configureClef(config: ClefClientConfig | null): void;
133
+ export declare function isClefConfigured(): boolean;
134
+ /** A single answer, normalized to a 0–1 score regardless of question type. */
135
+ export interface Signal {
136
+ score: number;
137
+ type: string;
138
+ /** Choice/Score only: the selected option and its confidence. */
139
+ choice?: string;
140
+ confidence?: number;
141
+ }
142
+ /**
143
+ * Ask Clef one request's worth of questions about one state.
144
+ *
145
+ * Retries on 429 and 5xx, honoring `retry-after` when the response carries one.
146
+ * The caller's concurrency is what keeps us under the rate limit; this only
147
+ * recovers the requests that still slip past it.
148
+ */
149
+ export declare function askClef(state: Record<string, unknown>, questions: Record<string, ClassifierQuestion>, opts?: {
150
+ images?: string[];
151
+ attempts?: number;
152
+ signal?: AbortSignal;
153
+ }): Promise<{
154
+ answers: Record<string, Signal>;
155
+ model: string;
156
+ inputTokens: number;
157
+ }>;
158
+ export interface ScanProgress {
159
+ /** Subjects considered. */
160
+ scanned: number;
161
+ /** Gated out by `buildState` returning null, or unchanged since the last scan. */
162
+ skipped: number;
163
+ /** Sent to the model and stored. */
164
+ scored: number;
165
+ /** Reports filed for crossing a threshold. */
166
+ filed: number;
167
+ errors: number;
168
+ inputTokens: number;
169
+ running: boolean;
170
+ startedAt: string;
171
+ finishedAt?: string;
172
+ error?: string;
173
+ }
174
+ /** When a TID record key was minted, or null if the key is not a TID. */
175
+ export declare function tidTime(rkey: string): Date | null;
176
+ /** Progress of the scan in flight, or the last one to finish. */
177
+ export declare function getScanProgress(): ScanProgress | null;
178
+ /**
179
+ * Score every subject a classifier applies to, storing results and filing a
180
+ * report for each crossing signal.
181
+ *
182
+ * Subjects whose state is unchanged since the last scan are skipped unless
183
+ * `force` is set, so a repeat scan costs only what actually moved.
184
+ */
185
+ export declare function runScan(opts?: {
186
+ classifier?: string;
187
+ force?: boolean;
188
+ limit?: number;
189
+ concurrency?: number;
190
+ signal?: AbortSignal;
191
+ /** Only subjects new after this ISO time; see {@link enumerateSubjects}. */
192
+ since?: string;
193
+ }): Promise<ScanProgress>;
194
+ /** For tests: run the boot catch-up after `ms` rather than a minute. */
195
+ export declare function _setCatchUpDelayForTests(ms: number): void;
196
+ /**
197
+ * Score new content as it is indexed, from the moment this was first switched
198
+ * on. What existed before then is never scored here — a pass over the existing
199
+ * library is a deliberate, manual scan from /admin.
200
+ *
201
+ * Starts with one catch-up pass over everything new since that moment, which
202
+ * picks up what a restart dropped from the queue; anything already scored is
203
+ * skipped on its fingerprint before it costs a model call.
204
+ */
205
+ export declare function startScoringOnIndex(): Promise<void>;
206
+ export declare function stopScoringOnIndex(): void;
207
+ /**
208
+ * Called by the indexer with each batch it applied. Queues every new record for
209
+ * the record classifiers that cover its collection, and its author for the
210
+ * account classifiers once the author has settled. Returns immediately: the
211
+ * indexer never waits on a model.
212
+ */
213
+ export declare function noteIndexed(items: Array<{
214
+ action: 'create' | 'delete';
215
+ collection: string;
216
+ uri: string;
217
+ authorDid: string;
218
+ }>): void;
219
+ /**
220
+ * Called by the indexer when a repo backfill lands. Its rows were written
221
+ * without passing through {@link noteIndexed} — a new account's first posts
222
+ * arrive this way — so queue whatever in it is new.
223
+ */
224
+ export declare function noteBackfilled(did: string): void;
225
+ /** Items waiting to be scored, for tests and the admin view. */
226
+ export declare function pendingCount(): number;
227
+ export {};
228
+ //# sourceMappingURL=classifiers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"classifiers.d.ts","sourceRoot":"","sources":["../src/classifiers.ts"],"names":[],"mappings":"AAoDA,kDAAkD;AAClD,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAA;IACjC,YAAY,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,OAAO,EAAE,CAAA;IAC1D,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,sEAAsE;AACtE,MAAM,WAAW,iBAAiB;IAChC,6EAA6E;IAC7E,GAAG,EAAE,MAAM,CAAA;IACX,GAAG,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAA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