@slorenzot/memento-core 0.7.0 → 2.0.0

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.
package/README.md CHANGED
@@ -6,68 +6,68 @@
6
6
 
7
7
  > Core memory engine with SQLite FTS5 search, session management, and observation persistence for AI coding agents.
8
8
 
9
- ## 🚀 Instalación
9
+ ## 🚀 Installation
10
10
 
11
11
  ```bash
12
- # Using Bun (recomendado)
12
+ # Using Bun (recommended)
13
13
  bun add @slorenzot/memento-core
14
14
 
15
15
  # Using npm
16
16
  npm install @slorenzot/memento-core
17
17
  ```
18
18
 
19
- ## 💡 Uso Básico
19
+ ## 💡 Basic Usage
20
20
 
21
21
  ### TypeScript
22
22
  ```typescript
23
23
  import { MemoryEngine } from '@slorenzot/memento-core';
24
24
 
25
- // Inicializar motor de memoria
25
+ // Initialize memory engine
26
26
  const memory = new MemoryEngine('./data/memento.db');
27
27
 
28
- // Crear una observación
28
+ // Create an observation
29
29
  const observation = await memory.createObservation({
30
- title: 'Decisión de arquitectura',
31
- content: 'Usar SQLite como motor de base de datos',
30
+ title: 'Architecture decision',
31
+ content: 'Use SQLite as the database engine',
32
32
  type: 'decision',
33
33
  topicKey: 'architecture',
34
34
  projectId: 'my-project'
35
35
  });
36
36
 
37
- console.log('Observación guardada:', observation);
37
+ console.log('Observation saved:', observation);
38
38
  ```
39
39
 
40
40
  ### Shell/Bun
41
41
  ```bash
42
- # Ejecutar script TypeScript con motor de memoria
42
+ # Run TypeScript script with memory engine
43
43
  bun run memory-script.ts
44
44
  ```
45
45
 
46
- ## 🔧 API Esencial
46
+ ## 🔧 Core API
47
47
 
48
- ### Clase Principal
48
+ ### Main Class
49
49
 
50
50
  #### `MemoryEngine(dbPath?: string)`
51
51
 
52
- Constructor del motor de memoria.
52
+ Memory engine constructor.
53
53
 
54
- **Parámetros:**
55
- - `dbPath` (opcional): Ruta al archivo de base de datos SQLite. Default: `'./data/memento.db'`
54
+ **Parameters:**
55
+ - `dbPath` (optional): Path to the SQLite database file. Default: `'./data/memento.db'`
56
56
 
57
- **Ejemplo:**
57
+ **Example:**
58
58
  ```typescript
59
59
  const memory = new MemoryEngine('./custom/path.db');
60
60
  ```
61
61
 
62
62
  ---
63
63
 
64
- #### Métodos de Observaciones
64
+ #### Observation Methods
65
65
 
66
66
  ##### `createObservation(data)`
67
67
 
68
- Crea una nueva observación en la memoria.
68
+ Creates a new observation in memory.
69
69
 
70
- **Parámetros:**
70
+ **Parameters:**
71
71
  ```typescript
72
72
  {
73
73
  title: string;
@@ -80,13 +80,13 @@ Crea una nueva observación en la memoria.
80
80
  }
81
81
  ```
82
82
 
83
- **Retorna:** `Promise<Observation>`
83
+ **Returns:** `Promise<Observation>`
84
84
 
85
- **Ejemplo:**
85
+ **Example:**
86
86
  ```typescript
87
87
  const observation = await memory.createObservation({
88
- title: 'Bug encontrado',
89
- content: 'Error de conexión al servidor',
88
+ title: 'Bug found',
89
+ content: 'Server connection error',
90
90
  type: 'bug',
91
91
  projectId: 'project-123',
92
92
  metadata: { severity: 'high', priority: 1 }
@@ -97,9 +97,9 @@ const observation = await memory.createObservation({
97
97
 
98
98
  ##### `search(params)`
99
99
 
100
- Busca observaciones usando búsqueda full-text FTS5.
100
+ Searches observations using FTS5 full-text search.
101
101
 
102
- **Parámetros:**
102
+ **Parameters:**
103
103
  ```typescript
104
104
  {
105
105
  query?: string;
@@ -111,18 +111,18 @@ Busca observaciones usando búsqueda full-text FTS5.
111
111
  }
112
112
  ```
113
113
 
114
- **Retorna:** `Promise<SearchResult>`
114
+ **Returns:** `Promise<SearchResult>`
115
115
 
116
- **Ejemplo:**
116
+ **Example:**
117
117
  ```typescript
118
118
  const results = await memory.search({
119
- query: 'arquitectura base de datos',
119
+ query: 'database architecture',
120
120
  type: 'decision',
121
121
  projectId: 'project-123',
122
122
  limit: 10
123
123
  });
124
124
 
125
- console.log(`Encontrados ${results.total} observaciones:`);
125
+ console.log(`Found ${results.total} observations:`);
126
126
  results.observations.forEach(obs => console.log(obs.title));
127
127
  ```
128
128
 
@@ -130,18 +130,18 @@ results.observations.forEach(obs => console.log(obs.title));
130
130
 
131
131
  ##### `getObservation(id)`
132
132
 
133
- Obtiene una observación por su ID.
133
+ Gets an observation by its ID.
134
134
 
135
- **Parámetros:**
136
- - `id`: ID numérico de la observación
135
+ **Parameters:**
136
+ - `id`: Numeric ID of the observation
137
137
 
138
- **Retorna:** `Promise<Observation | null>`
138
+ **Returns:** `Promise<Observation | null>`
139
139
 
140
- **Ejemplo:**
140
+ **Example:**
141
141
  ```typescript
142
142
  const observation = await memory.getObservation(123);
143
143
  if (observation) {
144
- console.log('Observación encontrada:', observation.title);
144
+ console.log('Observation found:', observation.title);
145
145
  }
146
146
  ```
147
147
 
@@ -149,19 +149,19 @@ if (observation) {
149
149
 
150
150
  ##### `updateObservation(id, updates)`
151
151
 
152
- Actualiza una observación existente.
152
+ Updates an existing observation.
153
153
 
154
- **Parámetros:**
155
- - `id`: ID numérico de la observación
156
- - `updates`: Objeto con campos a actualizar
154
+ **Parameters:**
155
+ - `id`: Numeric ID of the observation
156
+ - `updates`: Object with fields to update
157
157
 
158
- **Retorna:** `Promise<Observation>`
158
+ **Returns:** `Promise<Observation>`
159
159
 
160
- **Ejemplo:**
160
+ **Example:**
161
161
  ```typescript
162
162
  const updated = await memory.updateObservation(123, {
163
- title: 'Título actualizado',
164
- content: 'Contenido modificado'
163
+ title: 'Updated title',
164
+ content: 'Modified content'
165
165
  });
166
166
  ```
167
167
 
@@ -169,28 +169,28 @@ const updated = await memory.updateObservation(123, {
169
169
 
170
170
  ##### `deleteObservation(id)`
171
171
 
172
- Elimina una observación por su ID.
172
+ Deletes an observation by its ID.
173
173
 
174
- **Parámetros:**
175
- - `id`: ID numérico de la observación
174
+ **Parameters:**
175
+ - `id`: Numeric ID of the observation
176
176
 
177
- **Retorna:** `Promise<void>`
177
+ **Returns:** `Promise<void>`
178
178
 
179
- **Ejemplo:**
179
+ **Example:**
180
180
  ```typescript
181
181
  await memory.deleteObservation(123);
182
- console.log('Observación eliminada');
182
+ console.log('Observation deleted');
183
183
  ```
184
184
 
185
185
  ---
186
186
 
187
- #### Métodos de Sesiones
187
+ #### Session Methods
188
188
 
189
189
  ##### `createSession(data)`
190
190
 
191
- Crea una nueva sesión para seguimiento de conversaciones.
191
+ Creates a new session for conversation tracking.
192
192
 
193
- **Parámetros:**
193
+ **Parameters:**
194
194
  ```typescript
195
195
  {
196
196
  projectId: string;
@@ -198,34 +198,34 @@ Crea una nueva sesión para seguimiento de conversaciones.
198
198
  }
199
199
  ```
200
200
 
201
- **Retorna:** `Promise<Session>`
201
+ **Returns:** `Promise<Session>`
202
202
 
203
- **Ejemplo:**
203
+ **Example:**
204
204
  ```typescript
205
205
  const session = await memory.createSession({
206
206
  projectId: 'my-project',
207
207
  metadata: { agent: 'claude', userId: 'user-123' }
208
208
  });
209
209
 
210
- console.log('Sesión iniciada:', session.uuid);
210
+ console.log('Session started:', session.uuid);
211
211
  ```
212
212
 
213
213
  ---
214
214
 
215
215
  ##### `getSession(id)`
216
216
 
217
- Obtiene una sesión por su ID.
217
+ Gets a session by its ID.
218
218
 
219
- **Parámetros:**
220
- - `id`: ID numérico de la sesión
219
+ **Parameters:**
220
+ - `id`: Numeric ID of the session
221
221
 
222
- **Retorna:** `Promise<Session | null>`
222
+ **Returns:** `Promise<Session | null>`
223
223
 
224
- **Ejemplo:**
224
+ **Example:**
225
225
  ```typescript
226
226
  const session = await memory.getSession(456);
227
227
  if (session) {
228
- console.log('Sesión encontrada:', session.uuid);
228
+ console.log('Session found:', session.uuid);
229
229
  }
230
230
  ```
231
231
 
@@ -233,38 +233,38 @@ if (session) {
233
233
 
234
234
  ##### `endSession(id)`
235
235
 
236
- Finaliza una sesión activa.
236
+ Ends an active session.
237
237
 
238
- **Parámetros:**
239
- - `id`: ID numérico de la sesión
238
+ **Parameters:**
239
+ - `id`: Numeric ID of the session
240
240
 
241
- **Retorna:** `Promise<Session>`
241
+ **Returns:** `Promise<Session>`
242
242
 
243
- **Ejemplo:**
243
+ **Example:**
244
244
  ```typescript
245
245
  const endedSession = await memory.endSession(456);
246
- console.log('Sesión finalizada:', endedSession.endedAt);
246
+ console.log('Session ended:', endedSession.endedAt);
247
247
  ```
248
248
 
249
249
  ---
250
250
 
251
- #### Método de Cierre
251
+ #### Close Method
252
252
 
253
253
  ##### `close()`
254
254
 
255
- Cierra la conexión con la base de datos.
255
+ Closes the database connection.
256
256
 
257
- **Retorna:** `void`
257
+ **Returns:** `void`
258
258
 
259
- **Ejemplo:**
259
+ **Example:**
260
260
  ```typescript
261
- // En cleanup de aplicación
261
+ // On application cleanup
262
262
  memory.close();
263
263
  ```
264
264
 
265
265
  ---
266
266
 
267
- ## 📝 Tipos Principales
267
+ ## 📝 Core Types
268
268
 
269
269
  ```typescript
270
270
  interface Observation {
@@ -304,26 +304,26 @@ interface SearchResult {
304
304
  }
305
305
  ```
306
306
 
307
- ## ⚡ Ejemplos Prácticos
307
+ ## ⚡ Practical Examples
308
308
 
309
- ### Ejemplo 1: Flujo Completo de Memoria
309
+ ### Example 1: Complete Memory Workflow
310
310
 
311
311
  ```typescript
312
312
  import { MemoryEngine } from '@slorenzot/memento-core';
313
313
 
314
314
  const memory = new MemoryEngine('./memory.db');
315
315
 
316
- // Crear sesión para seguimiento
316
+ // Create session for tracking
317
317
  const session = await memory.createSession({
318
318
  projectId: 'my-app',
319
319
  metadata: { agent: 'claude' }
320
320
  });
321
321
 
322
- // Guardar observaciones durante el trabajo
322
+ // Save observations during work
323
323
  await memory.createObservation({
324
324
  sessionId: session.id,
325
- title: 'Configuración de servidor',
326
- content: 'Usar Express.js con middleware de seguridad',
325
+ title: 'Server configuration',
326
+ content: 'Use Express.js with security middleware',
327
327
  type: 'decision',
328
328
  projectId: 'my-app',
329
329
  topicKey: 'backend'
@@ -331,85 +331,85 @@ await memory.createObservation({
331
331
 
332
332
  await memory.createObservation({
333
333
  sessionId: session.id,
334
- title: 'Bug en autenticación',
335
- content: 'El JWT no expira correctamente',
334
+ title: 'Authentication bug',
335
+ content: 'JWT not expiring correctly',
336
336
  type: 'bug',
337
337
  projectId: 'my-app',
338
338
  topicKey: 'security'
339
339
  });
340
340
 
341
- // Buscar decisiones relacionadas
341
+ // Search for related decisions
342
342
  const decisions = await memory.search({
343
343
  type: 'decision',
344
344
  projectId: 'my-app'
345
345
  });
346
346
 
347
- console.log('Decisiones tomadas:', decisions.observations);
347
+ console.log('Decisions made:', decisions.observations);
348
348
 
349
- // Finalizar sesión
349
+ // End session
350
350
  await memory.endSession(session.id);
351
351
 
352
- // Cerrar conexión
352
+ // Close connection
353
353
  memory.close();
354
354
  ```
355
355
 
356
- ### Ejemplo 2: Búsqueda Avanzada
356
+ ### Example 2: Advanced Search
357
357
 
358
358
  ```typescript
359
359
  import { MemoryEngine } from '@slorenzot/memento-core';
360
360
 
361
361
  const memory = new MemoryEngine('./memory.db');
362
362
 
363
- // Búsqueda compleja con múltiples filtros
363
+ // Complex search with multiple filters
364
364
  const results = await memory.search({
365
- query: 'base de datos arquitectura',
365
+ query: 'database architecture',
366
366
  type: 'decision',
367
367
  projectId: 'my-app',
368
368
  limit: 5,
369
369
  offset: 10
370
370
  });
371
371
 
372
- console.log(`Total de resultados: ${results.total}`);
372
+ console.log(`Total results: ${results.total}`);
373
373
  results.observations.forEach((obs, index) => {
374
374
  console.log(`${index + 1}. ${obs.title}`);
375
375
  console.log(` ${obs.content.substring(0, 100)}...`);
376
- console.log(` Tipo: ${obs.type} | Tópico: ${obs.topicKey}`);
376
+ console.log(` Type: ${obs.type} | Topic: ${obs.topicKey}`);
377
377
  });
378
378
 
379
379
  memory.close();
380
380
  ```
381
381
 
382
- ## ⚠️ Licencia Restrictiva
382
+ ## ⚠️ Restrictive License
383
383
 
384
- Este paquete está bajo **Licencia CC BY-NC-ND 4.0**:
385
- - ✅ **Uso personal y educacional permitido**
386
- - ✅ **Compartir con atribución al autor**
387
- - ❌ **Uso comercial NO permitido**
388
- - ❌ **Modificaciones o forks NO permitidos**
384
+ This package is under **CC BY-NC-ND 4.0 License**:
385
+ - ✅ **Personal and educational use permitted**
386
+ - ✅ **Share with attribution to the author**
387
+ - ❌ **Commercial use NOT permitted**
388
+ - ❌ **Modifications or forks NOT permitted**
389
389
 
390
- **Autor**: Soulberto Lorenzo (slorenzot@gmail.com)
390
+ **Author:** Soulberto Lorenzo (slorenzot@gmail.com)
391
391
 
392
- ## 🔄 Dependencias
392
+ ## 🔄 Dependencies
393
393
 
394
- ### Dependencias Principales
395
- - `zod` - Validación de esquemas
396
- - `nanoid` - Generación de IDs únicos
394
+ ### Main Dependencies
395
+ - `zod` - Schema validation
396
+ - `nanoid` - Unique ID generation
397
397
 
398
398
  ### Peer Dependencies
399
- - `bun` v1.0+ (recomendado)
399
+ - `bun` v1.0+ (recommended)
400
400
  - `node` v20+ (compatible)
401
401
 
402
- ## 🛠️ Desarrollo
402
+ ## 🛠️ Development
403
403
 
404
404
  ```bash
405
- # Clonar el proyecto
405
+ # Clone the project
406
406
  git clone https://github.com/slorenzot/memento.git
407
407
  cd memento/packages/core
408
408
 
409
- # Instalar dependencias
409
+ # Install dependencies
410
410
  bun install
411
411
 
412
- # Desarrollo
412
+ # Development
413
413
  bun run dev
414
414
 
415
415
  # Build
@@ -422,23 +422,25 @@ bun test
422
422
  ## 📋 Changelog
423
423
 
424
424
  ### [0.1.0] - 2024-04-04
425
- - **Added**: Versión inicial del motor de memoria
426
- - **Added**: SQLite con FTS5 para búsqueda full-text
427
- - **Added**: Gestión de sesiones y observaciones
428
- - **Added**: Soporte completo de TypeScript
425
+ - **Added**: Initial version of the memory engine
426
+ - **Added**: SQLite with FTS5 for full-text search
427
+ - **Added**: Session and observation management
428
+ - **Added**: Full TypeScript support
429
429
 
430
- ## 👤 Autor
430
+ ## 👤 Author
431
431
 
432
- **Soulberto Lorenzo**
432
+ **Soulberto Lorenzo**
433
433
  - GitHub: [@slorenzot](https://github.com/slorenzot)
434
434
  - Email: slorenzot@gmail.com
435
435
 
436
- ## 📄 Licencia
436
+ ## 📄 License
437
437
 
438
- Este paquete está bajo Licencia **Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International**.
438
+ This package is licensed under **Creative Commons Attribution-NonCommercial-NoDerivs 4.0 International**.
439
439
 
440
- [Ver Licencia Completa](https://github.com/slorenzot/memento/blob/main/LICENSE)
440
+ [View Full License](https://github.com/slorenzot/memento/blob/main/LICENSE)
441
441
 
442
442
  ---
443
443
 
444
- **⚠️ Importante**: Este paquete tiene licencia restrictiva. Respeta los términos de la licencia CC BY-NC-ND 4.0.
444
+ **⚠️ Important:** This package has a restrictive license. Please respect the CC BY-NC-ND 4.0 license terms.
445
+
446
+ **[📖 Spanish version (Versión en español)](./README.es.md)**
@@ -1,12 +1,102 @@
1
+ /** Legacy flat config format (.mementorc) */
1
2
  export interface MementoConfig {
2
3
  storageMethod?: 'database' | 'storage';
3
4
  dbPath?: string;
4
5
  storagePath?: string;
5
6
  projectId?: string;
6
7
  }
8
+ /** New structured config format (.memento/config.json) */
9
+ export interface MementoConfigV1 {
10
+ version: 1;
11
+ project: string;
12
+ database: {
13
+ path: string;
14
+ wal?: boolean;
15
+ };
16
+ defaults?: {
17
+ autoSeed?: boolean;
18
+ scope?: 'project' | 'personal';
19
+ session?: {
20
+ /** Max ms a session can be active before considered stale. Default: 86400000 (24h) */
21
+ staleThresholdMs?: number;
22
+ };
23
+ };
24
+ }
25
+ /** Default stale threshold: 24 hours in milliseconds */
26
+ export declare const DEFAULT_STALE_THRESHOLD_MS: number;
27
+ /** Options for creating a new config */
28
+ export interface CreateConfigOptions {
29
+ project?: string;
30
+ dbPath?: string;
31
+ targetDir?: string;
32
+ force?: boolean;
33
+ global?: boolean;
34
+ }
35
+ /** Result of config creation */
36
+ export interface CreateConfigResult {
37
+ configPath: string;
38
+ dbPath: string;
39
+ projectDir: string;
40
+ migrated: boolean;
41
+ backupPath?: string;
42
+ }
43
+ /** Result of config migration */
44
+ export interface MigrateConfigResult {
45
+ success: boolean;
46
+ sourcePath: string;
47
+ targetPath: string;
48
+ backupPath: string;
49
+ config: MementoConfigV1;
50
+ error?: string;
51
+ }
52
+ declare const LEGACY_CONFIG_FILE = ".mementorc";
53
+ declare const NEW_CONFIG_DIR = ".memento";
54
+ declare const NEW_CONFIG_FILE = "config.json";
55
+ declare const GLOBAL_CONFIG_DIR: string;
56
+ declare const GLOBAL_CONFIG_PATH: string;
57
+ /**
58
+ * Normalize a project identifier to a canonical form.
59
+ * - Lowercase
60
+ * - Replace spaces, underscores, and special chars with hyphens
61
+ * - Collapse multiple consecutive hyphens into one
62
+ * - Strip leading/trailing hyphens
63
+ *
64
+ * Examples:
65
+ * "sura chile autos" → "sura-chile-autos"
66
+ * "suratech-salesforce-CL-app" → "suratech-salesforce-cl-app"
67
+ * "my__cool project" → "my-cool-project"
68
+ * "--leading-trailing--" → "leading-trailing"
69
+ * " spaces everywhere " → "spaces-everywhere"
70
+ */
71
+ export declare function normalizeProjectId(name: string): string;
72
+ /**
73
+ * Find project config searching upward from startDir.
74
+ * Priority: .memento/config.json → .mementorc (legacy)
75
+ */
7
76
  export declare function findProjectConfig(startDir?: string): MementoConfig | null;
77
+ /**
78
+ * Find the raw config path (new or legacy format).
79
+ * Returns the absolute path to the config file found.
80
+ */
81
+ export declare function findConfigPath(startDir?: string): string | null;
82
+ /**
83
+ * Read the stale session threshold from V1 config.
84
+ * Returns DEFAULT_STALE_THRESHOLD_MS (24h) if not configured.
85
+ */
86
+ export declare function getStaleThresholdMs(): number;
8
87
  export declare function loadConfig(): MementoConfig;
9
88
  export declare function resolveStoragePath(config: MementoConfig): string;
10
89
  export declare function resolveDbPath(config: MementoConfig): string;
11
90
  export declare function getProjectId(config: MementoConfig): string;
91
+ /**
92
+ * Create a new config file (.memento/config.json or global).
93
+ * Returns the result with paths and whether migration occurred.
94
+ */
95
+ export declare function createConfig(options?: CreateConfigOptions): CreateConfigResult;
96
+ /**
97
+ * Migrate a legacy .mementorc to the new .memento/config.json format.
98
+ * Backs up the original file as .mementorc.bak.
99
+ */
100
+ export declare function migrateConfig(sourceDir?: string): MigrateConfigResult;
101
+ export { GLOBAL_CONFIG_DIR, GLOBAL_CONFIG_PATH, NEW_CONFIG_DIR, NEW_CONFIG_FILE, LEGACY_CONFIG_FILE };
12
102
  //# sourceMappingURL=ConfigManager.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../src/ConfigManager.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAwBD,wBAAgB,iBAAiB,CAAC,QAAQ,GAAE,MAAsB,GAAG,aAAa,GAAG,IAAI,CA0BxF;AAED,wBAAgB,UAAU,IAAI,aAAa,CA8B1C;AAED,wBAAgB,kBAAkB,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAYhE;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAY3D;AAED,wBAAgB,YAAY,CAAC,MAAM,EAAE,aAAa,GAAG,MAAM,CAS1D"}
1
+ {"version":3,"file":"ConfigManager.d.ts","sourceRoot":"","sources":["../src/ConfigManager.ts"],"names":[],"mappings":"AAMA,6CAA6C;AAC7C,MAAM,WAAW,aAAa;IAC5B,aAAa,CAAC,EAAE,UAAU,GAAG,SAAS,CAAC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED,0DAA0D;AAC1D,MAAM,WAAW,eAAe;IAC9B,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QAC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