@gilangjavier/chrona 0.1.0 → 0.1.1

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/dist/index.d.cts CHANGED
@@ -1,4 +1,6 @@
1
1
  import Database from 'better-sqlite3';
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import * as z from 'zod/v4';
2
4
 
3
5
  declare const memoryTypes: readonly ["decision", "preference", "fact", "incident", "constraint"];
4
6
  declare const memoryScopes: readonly ["user", "project", "org", "shared"];
@@ -89,4 +91,310 @@ declare function parseMemoryScope(value: string): MemoryScope;
89
91
  declare function parseSourceKind(value: string): SourceKind;
90
92
  declare function normalizeEntry(input: AddMemoryInput | MemoryEntry): MemoryEntry;
91
93
 
92
- export { type AddMemoryInput, ChromaStore, type ExportOptions, type GcResult, type ImportResult, type MemoryEntry, type MemoryScope, type MemorySource, type MemoryType, type QueryOptions, type SearchOptions, type SourceKind, type TimelineOptions, memoryScopes, memoryTypes, normalizeEntry, parseMemoryScope, parseMemoryType, parseSourceKind, sourceKinds };
94
+ declare const chronaAddInputSchema: z.ZodObject<{
95
+ id: z.ZodOptional<z.ZodString>;
96
+ type: z.ZodEnum<{
97
+ decision: "decision";
98
+ preference: "preference";
99
+ fact: "fact";
100
+ incident: "incident";
101
+ constraint: "constraint";
102
+ }>;
103
+ text: z.ZodString;
104
+ createdAt: z.ZodOptional<z.ZodString>;
105
+ source: z.ZodObject<{
106
+ kind: z.ZodEnum<{
107
+ tool: "tool";
108
+ session: "session";
109
+ repo: "repo";
110
+ }>;
111
+ value: z.ZodString;
112
+ }, z.core.$strip>;
113
+ confidence: z.ZodNumber;
114
+ scope: z.ZodEnum<{
115
+ user: "user";
116
+ project: "project";
117
+ org: "org";
118
+ shared: "shared";
119
+ }>;
120
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
121
+ expiresAt: z.ZodOptional<z.ZodString>;
122
+ links: z.ZodDefault<z.ZodArray<z.ZodString>>;
123
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
124
+ }, z.core.$strip>;
125
+ declare const chronaAddResultSchema: z.ZodObject<{
126
+ entry: z.ZodObject<{
127
+ id: z.ZodString;
128
+ type: z.ZodEnum<{
129
+ decision: "decision";
130
+ preference: "preference";
131
+ fact: "fact";
132
+ incident: "incident";
133
+ constraint: "constraint";
134
+ }>;
135
+ text: z.ZodString;
136
+ createdAt: z.ZodString;
137
+ source: z.ZodObject<{
138
+ kind: z.ZodEnum<{
139
+ tool: "tool";
140
+ session: "session";
141
+ repo: "repo";
142
+ }>;
143
+ value: z.ZodString;
144
+ }, z.core.$strip>;
145
+ confidence: z.ZodNumber;
146
+ scope: z.ZodEnum<{
147
+ user: "user";
148
+ project: "project";
149
+ org: "org";
150
+ shared: "shared";
151
+ }>;
152
+ tags: z.ZodArray<z.ZodString>;
153
+ expiresAt: z.ZodOptional<z.ZodString>;
154
+ links: z.ZodArray<z.ZodString>;
155
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
156
+ }, z.core.$strip>;
157
+ }, z.core.$strip>;
158
+ declare const chronaGetInputSchema: z.ZodObject<{
159
+ id: z.ZodString;
160
+ }, z.core.$strip>;
161
+ declare const chronaGetResultSchema: z.ZodObject<{
162
+ entry: z.ZodNullable<z.ZodObject<{
163
+ id: z.ZodString;
164
+ type: z.ZodEnum<{
165
+ decision: "decision";
166
+ preference: "preference";
167
+ fact: "fact";
168
+ incident: "incident";
169
+ constraint: "constraint";
170
+ }>;
171
+ text: z.ZodString;
172
+ createdAt: z.ZodString;
173
+ source: z.ZodObject<{
174
+ kind: z.ZodEnum<{
175
+ tool: "tool";
176
+ session: "session";
177
+ repo: "repo";
178
+ }>;
179
+ value: z.ZodString;
180
+ }, z.core.$strip>;
181
+ confidence: z.ZodNumber;
182
+ scope: z.ZodEnum<{
183
+ user: "user";
184
+ project: "project";
185
+ org: "org";
186
+ shared: "shared";
187
+ }>;
188
+ tags: z.ZodArray<z.ZodString>;
189
+ expiresAt: z.ZodOptional<z.ZodString>;
190
+ links: z.ZodArray<z.ZodString>;
191
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>;
194
+ declare const chronaSearchInputSchema: z.ZodObject<{
195
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
196
+ user: "user";
197
+ project: "project";
198
+ org: "org";
199
+ shared: "shared";
200
+ }>>>;
201
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
202
+ decision: "decision";
203
+ preference: "preference";
204
+ fact: "fact";
205
+ incident: "incident";
206
+ constraint: "constraint";
207
+ }>>>;
208
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ sourceKind: z.ZodOptional<z.ZodEnum<{
210
+ tool: "tool";
211
+ session: "session";
212
+ repo: "repo";
213
+ }>>;
214
+ sourceValue: z.ZodOptional<z.ZodString>;
215
+ before: z.ZodOptional<z.ZodString>;
216
+ after: z.ZodOptional<z.ZodString>;
217
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
218
+ query: z.ZodString;
219
+ limit: z.ZodDefault<z.ZodNumber>;
220
+ }, z.core.$strip>;
221
+ declare const chronaSearchResultSchema: z.ZodObject<{
222
+ count: z.ZodNumber;
223
+ items: z.ZodArray<z.ZodObject<{
224
+ id: z.ZodString;
225
+ type: z.ZodEnum<{
226
+ decision: "decision";
227
+ preference: "preference";
228
+ fact: "fact";
229
+ incident: "incident";
230
+ constraint: "constraint";
231
+ }>;
232
+ text: z.ZodString;
233
+ createdAt: z.ZodString;
234
+ source: z.ZodObject<{
235
+ kind: z.ZodEnum<{
236
+ tool: "tool";
237
+ session: "session";
238
+ repo: "repo";
239
+ }>;
240
+ value: z.ZodString;
241
+ }, z.core.$strip>;
242
+ confidence: z.ZodNumber;
243
+ scope: z.ZodEnum<{
244
+ user: "user";
245
+ project: "project";
246
+ org: "org";
247
+ shared: "shared";
248
+ }>;
249
+ tags: z.ZodArray<z.ZodString>;
250
+ expiresAt: z.ZodOptional<z.ZodString>;
251
+ links: z.ZodArray<z.ZodString>;
252
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
253
+ }, z.core.$strip>>;
254
+ }, z.core.$strip>;
255
+ declare const chronaTimelineInputSchema: z.ZodObject<{
256
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
257
+ user: "user";
258
+ project: "project";
259
+ org: "org";
260
+ shared: "shared";
261
+ }>>>;
262
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
263
+ decision: "decision";
264
+ preference: "preference";
265
+ fact: "fact";
266
+ incident: "incident";
267
+ constraint: "constraint";
268
+ }>>>;
269
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ sourceKind: z.ZodOptional<z.ZodEnum<{
271
+ tool: "tool";
272
+ session: "session";
273
+ repo: "repo";
274
+ }>>;
275
+ sourceValue: z.ZodOptional<z.ZodString>;
276
+ before: z.ZodOptional<z.ZodString>;
277
+ after: z.ZodOptional<z.ZodString>;
278
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
279
+ order: z.ZodDefault<z.ZodEnum<{
280
+ asc: "asc";
281
+ desc: "desc";
282
+ }>>;
283
+ limit: z.ZodDefault<z.ZodNumber>;
284
+ }, z.core.$strip>;
285
+ declare const chronaTimelineResultSchema: z.ZodObject<{
286
+ count: z.ZodNumber;
287
+ items: z.ZodArray<z.ZodObject<{
288
+ id: z.ZodString;
289
+ type: z.ZodEnum<{
290
+ decision: "decision";
291
+ preference: "preference";
292
+ fact: "fact";
293
+ incident: "incident";
294
+ constraint: "constraint";
295
+ }>;
296
+ text: z.ZodString;
297
+ createdAt: z.ZodString;
298
+ source: z.ZodObject<{
299
+ kind: z.ZodEnum<{
300
+ tool: "tool";
301
+ session: "session";
302
+ repo: "repo";
303
+ }>;
304
+ value: z.ZodString;
305
+ }, z.core.$strip>;
306
+ confidence: z.ZodNumber;
307
+ scope: z.ZodEnum<{
308
+ user: "user";
309
+ project: "project";
310
+ org: "org";
311
+ shared: "shared";
312
+ }>;
313
+ tags: z.ZodArray<z.ZodString>;
314
+ expiresAt: z.ZodOptional<z.ZodString>;
315
+ links: z.ZodArray<z.ZodString>;
316
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>;
319
+ declare const chronaExportInputSchema: z.ZodObject<{
320
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
321
+ user: "user";
322
+ project: "project";
323
+ org: "org";
324
+ shared: "shared";
325
+ }>>>;
326
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
327
+ decision: "decision";
328
+ preference: "preference";
329
+ fact: "fact";
330
+ incident: "incident";
331
+ constraint: "constraint";
332
+ }>>>;
333
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
334
+ sourceKind: z.ZodOptional<z.ZodEnum<{
335
+ tool: "tool";
336
+ session: "session";
337
+ repo: "repo";
338
+ }>>;
339
+ sourceValue: z.ZodOptional<z.ZodString>;
340
+ before: z.ZodOptional<z.ZodString>;
341
+ after: z.ZodOptional<z.ZodString>;
342
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
343
+ order: z.ZodDefault<z.ZodEnum<{
344
+ asc: "asc";
345
+ desc: "desc";
346
+ }>>;
347
+ limit: z.ZodDefault<z.ZodNumber>;
348
+ }, z.core.$strip>;
349
+ declare const chronaExportResultSchema: z.ZodObject<{
350
+ count: z.ZodNumber;
351
+ jsonl: z.ZodString;
352
+ }, z.core.$strip>;
353
+ declare const chronaImportInputSchema: z.ZodObject<{
354
+ jsonl: z.ZodString;
355
+ }, z.core.$strip>;
356
+ declare const chronaImportResultSchema: z.ZodObject<{
357
+ imported: z.ZodNumber;
358
+ updated: z.ZodNumber;
359
+ ids: z.ZodArray<z.ZodString>;
360
+ }, z.core.$strip>;
361
+ declare const chronaGcInputSchema: z.ZodObject<{
362
+ now: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>;
364
+ declare const chronaGcResultSchema: z.ZodObject<{
365
+ deleted: z.ZodNumber;
366
+ ids: z.ZodArray<z.ZodString>;
367
+ now: z.ZodString;
368
+ }, z.core.$strip>;
369
+ type ChronaAddInput = z.input<typeof chronaAddInputSchema>;
370
+ type ChronaAddResult = z.infer<typeof chronaAddResultSchema>;
371
+ type ChronaGetInput = z.input<typeof chronaGetInputSchema>;
372
+ type ChronaGetResult = z.infer<typeof chronaGetResultSchema>;
373
+ type ChronaSearchInput = z.input<typeof chronaSearchInputSchema>;
374
+ type ChronaSearchResult = z.infer<typeof chronaSearchResultSchema>;
375
+ type ChronaTimelineInput = z.input<typeof chronaTimelineInputSchema>;
376
+ type ChronaTimelineResult = z.infer<typeof chronaTimelineResultSchema>;
377
+ type ChronaExportInput = z.input<typeof chronaExportInputSchema>;
378
+ type ChronaExportResult = z.infer<typeof chronaExportResultSchema>;
379
+ type ChronaImportInput = z.input<typeof chronaImportInputSchema>;
380
+ type ChronaImportResult = z.infer<typeof chronaImportResultSchema>;
381
+ type ChronaGcInput = z.input<typeof chronaGcInputSchema>;
382
+ type ChronaGcResult = z.infer<typeof chronaGcResultSchema>;
383
+ interface ChronaMcpHandlers {
384
+ add(input: ChronaAddInput): ChronaAddResult;
385
+ get(input: ChronaGetInput): ChronaGetResult;
386
+ search(input: ChronaSearchInput): ChronaSearchResult;
387
+ timeline(input: ChronaTimelineInput): ChronaTimelineResult;
388
+ export(input: ChronaExportInput): ChronaExportResult;
389
+ import(input: ChronaImportInput): ChronaImportResult;
390
+ gc(input?: ChronaGcInput): ChronaGcResult;
391
+ }
392
+ interface StartChronaMcpServerOptions {
393
+ dbPath: string;
394
+ port?: number;
395
+ }
396
+ declare function createChronaMcpHandlers(dbPath: string): ChronaMcpHandlers;
397
+ declare function createChronaMcpServer(dbPath: string): McpServer;
398
+ declare function startChronaMcpServer(options: StartChronaMcpServerOptions): Promise<void>;
399
+
400
+ export { type AddMemoryInput, ChromaStore, type ChronaAddInput, type ChronaAddResult, type ChronaExportInput, type ChronaExportResult, type ChronaGcInput, type ChronaGcResult, type ChronaGetInput, type ChronaGetResult, type ChronaImportInput, type ChronaImportResult, type ChronaMcpHandlers, type ChronaSearchInput, type ChronaSearchResult, type ChronaTimelineInput, type ChronaTimelineResult, type ExportOptions, type GcResult, type ImportResult, type MemoryEntry, type MemoryScope, type MemorySource, type MemoryType, type QueryOptions, type SearchOptions, type SourceKind, type StartChronaMcpServerOptions, type TimelineOptions, chronaAddInputSchema, chronaAddResultSchema, chronaExportInputSchema, chronaExportResultSchema, chronaGcInputSchema, chronaGcResultSchema, chronaGetInputSchema, chronaGetResultSchema, chronaImportInputSchema, chronaImportResultSchema, chronaSearchInputSchema, chronaSearchResultSchema, chronaTimelineInputSchema, chronaTimelineResultSchema, createChronaMcpHandlers, createChronaMcpServer, memoryScopes, memoryTypes, normalizeEntry, parseMemoryScope, parseMemoryType, parseSourceKind, sourceKinds, startChronaMcpServer };
package/dist/index.d.ts CHANGED
@@ -1,4 +1,6 @@
1
1
  import Database from 'better-sqlite3';
2
+ import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
3
+ import * as z from 'zod/v4';
2
4
 
3
5
  declare const memoryTypes: readonly ["decision", "preference", "fact", "incident", "constraint"];
4
6
  declare const memoryScopes: readonly ["user", "project", "org", "shared"];
@@ -89,4 +91,310 @@ declare function parseMemoryScope(value: string): MemoryScope;
89
91
  declare function parseSourceKind(value: string): SourceKind;
90
92
  declare function normalizeEntry(input: AddMemoryInput | MemoryEntry): MemoryEntry;
91
93
 
92
- export { type AddMemoryInput, ChromaStore, type ExportOptions, type GcResult, type ImportResult, type MemoryEntry, type MemoryScope, type MemorySource, type MemoryType, type QueryOptions, type SearchOptions, type SourceKind, type TimelineOptions, memoryScopes, memoryTypes, normalizeEntry, parseMemoryScope, parseMemoryType, parseSourceKind, sourceKinds };
94
+ declare const chronaAddInputSchema: z.ZodObject<{
95
+ id: z.ZodOptional<z.ZodString>;
96
+ type: z.ZodEnum<{
97
+ decision: "decision";
98
+ preference: "preference";
99
+ fact: "fact";
100
+ incident: "incident";
101
+ constraint: "constraint";
102
+ }>;
103
+ text: z.ZodString;
104
+ createdAt: z.ZodOptional<z.ZodString>;
105
+ source: z.ZodObject<{
106
+ kind: z.ZodEnum<{
107
+ tool: "tool";
108
+ session: "session";
109
+ repo: "repo";
110
+ }>;
111
+ value: z.ZodString;
112
+ }, z.core.$strip>;
113
+ confidence: z.ZodNumber;
114
+ scope: z.ZodEnum<{
115
+ user: "user";
116
+ project: "project";
117
+ org: "org";
118
+ shared: "shared";
119
+ }>;
120
+ tags: z.ZodDefault<z.ZodArray<z.ZodString>>;
121
+ expiresAt: z.ZodOptional<z.ZodString>;
122
+ links: z.ZodDefault<z.ZodArray<z.ZodString>>;
123
+ metadata: z.ZodDefault<z.ZodRecord<z.ZodString, z.ZodJSONSchema>>;
124
+ }, z.core.$strip>;
125
+ declare const chronaAddResultSchema: z.ZodObject<{
126
+ entry: z.ZodObject<{
127
+ id: z.ZodString;
128
+ type: z.ZodEnum<{
129
+ decision: "decision";
130
+ preference: "preference";
131
+ fact: "fact";
132
+ incident: "incident";
133
+ constraint: "constraint";
134
+ }>;
135
+ text: z.ZodString;
136
+ createdAt: z.ZodString;
137
+ source: z.ZodObject<{
138
+ kind: z.ZodEnum<{
139
+ tool: "tool";
140
+ session: "session";
141
+ repo: "repo";
142
+ }>;
143
+ value: z.ZodString;
144
+ }, z.core.$strip>;
145
+ confidence: z.ZodNumber;
146
+ scope: z.ZodEnum<{
147
+ user: "user";
148
+ project: "project";
149
+ org: "org";
150
+ shared: "shared";
151
+ }>;
152
+ tags: z.ZodArray<z.ZodString>;
153
+ expiresAt: z.ZodOptional<z.ZodString>;
154
+ links: z.ZodArray<z.ZodString>;
155
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
156
+ }, z.core.$strip>;
157
+ }, z.core.$strip>;
158
+ declare const chronaGetInputSchema: z.ZodObject<{
159
+ id: z.ZodString;
160
+ }, z.core.$strip>;
161
+ declare const chronaGetResultSchema: z.ZodObject<{
162
+ entry: z.ZodNullable<z.ZodObject<{
163
+ id: z.ZodString;
164
+ type: z.ZodEnum<{
165
+ decision: "decision";
166
+ preference: "preference";
167
+ fact: "fact";
168
+ incident: "incident";
169
+ constraint: "constraint";
170
+ }>;
171
+ text: z.ZodString;
172
+ createdAt: z.ZodString;
173
+ source: z.ZodObject<{
174
+ kind: z.ZodEnum<{
175
+ tool: "tool";
176
+ session: "session";
177
+ repo: "repo";
178
+ }>;
179
+ value: z.ZodString;
180
+ }, z.core.$strip>;
181
+ confidence: z.ZodNumber;
182
+ scope: z.ZodEnum<{
183
+ user: "user";
184
+ project: "project";
185
+ org: "org";
186
+ shared: "shared";
187
+ }>;
188
+ tags: z.ZodArray<z.ZodString>;
189
+ expiresAt: z.ZodOptional<z.ZodString>;
190
+ links: z.ZodArray<z.ZodString>;
191
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
192
+ }, z.core.$strip>>;
193
+ }, z.core.$strip>;
194
+ declare const chronaSearchInputSchema: z.ZodObject<{
195
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
196
+ user: "user";
197
+ project: "project";
198
+ org: "org";
199
+ shared: "shared";
200
+ }>>>;
201
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
202
+ decision: "decision";
203
+ preference: "preference";
204
+ fact: "fact";
205
+ incident: "incident";
206
+ constraint: "constraint";
207
+ }>>>;
208
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
209
+ sourceKind: z.ZodOptional<z.ZodEnum<{
210
+ tool: "tool";
211
+ session: "session";
212
+ repo: "repo";
213
+ }>>;
214
+ sourceValue: z.ZodOptional<z.ZodString>;
215
+ before: z.ZodOptional<z.ZodString>;
216
+ after: z.ZodOptional<z.ZodString>;
217
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
218
+ query: z.ZodString;
219
+ limit: z.ZodDefault<z.ZodNumber>;
220
+ }, z.core.$strip>;
221
+ declare const chronaSearchResultSchema: z.ZodObject<{
222
+ count: z.ZodNumber;
223
+ items: z.ZodArray<z.ZodObject<{
224
+ id: z.ZodString;
225
+ type: z.ZodEnum<{
226
+ decision: "decision";
227
+ preference: "preference";
228
+ fact: "fact";
229
+ incident: "incident";
230
+ constraint: "constraint";
231
+ }>;
232
+ text: z.ZodString;
233
+ createdAt: z.ZodString;
234
+ source: z.ZodObject<{
235
+ kind: z.ZodEnum<{
236
+ tool: "tool";
237
+ session: "session";
238
+ repo: "repo";
239
+ }>;
240
+ value: z.ZodString;
241
+ }, z.core.$strip>;
242
+ confidence: z.ZodNumber;
243
+ scope: z.ZodEnum<{
244
+ user: "user";
245
+ project: "project";
246
+ org: "org";
247
+ shared: "shared";
248
+ }>;
249
+ tags: z.ZodArray<z.ZodString>;
250
+ expiresAt: z.ZodOptional<z.ZodString>;
251
+ links: z.ZodArray<z.ZodString>;
252
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
253
+ }, z.core.$strip>>;
254
+ }, z.core.$strip>;
255
+ declare const chronaTimelineInputSchema: z.ZodObject<{
256
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
257
+ user: "user";
258
+ project: "project";
259
+ org: "org";
260
+ shared: "shared";
261
+ }>>>;
262
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
263
+ decision: "decision";
264
+ preference: "preference";
265
+ fact: "fact";
266
+ incident: "incident";
267
+ constraint: "constraint";
268
+ }>>>;
269
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
270
+ sourceKind: z.ZodOptional<z.ZodEnum<{
271
+ tool: "tool";
272
+ session: "session";
273
+ repo: "repo";
274
+ }>>;
275
+ sourceValue: z.ZodOptional<z.ZodString>;
276
+ before: z.ZodOptional<z.ZodString>;
277
+ after: z.ZodOptional<z.ZodString>;
278
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
279
+ order: z.ZodDefault<z.ZodEnum<{
280
+ asc: "asc";
281
+ desc: "desc";
282
+ }>>;
283
+ limit: z.ZodDefault<z.ZodNumber>;
284
+ }, z.core.$strip>;
285
+ declare const chronaTimelineResultSchema: z.ZodObject<{
286
+ count: z.ZodNumber;
287
+ items: z.ZodArray<z.ZodObject<{
288
+ id: z.ZodString;
289
+ type: z.ZodEnum<{
290
+ decision: "decision";
291
+ preference: "preference";
292
+ fact: "fact";
293
+ incident: "incident";
294
+ constraint: "constraint";
295
+ }>;
296
+ text: z.ZodString;
297
+ createdAt: z.ZodString;
298
+ source: z.ZodObject<{
299
+ kind: z.ZodEnum<{
300
+ tool: "tool";
301
+ session: "session";
302
+ repo: "repo";
303
+ }>;
304
+ value: z.ZodString;
305
+ }, z.core.$strip>;
306
+ confidence: z.ZodNumber;
307
+ scope: z.ZodEnum<{
308
+ user: "user";
309
+ project: "project";
310
+ org: "org";
311
+ shared: "shared";
312
+ }>;
313
+ tags: z.ZodArray<z.ZodString>;
314
+ expiresAt: z.ZodOptional<z.ZodString>;
315
+ links: z.ZodArray<z.ZodString>;
316
+ metadata: z.ZodRecord<z.ZodString, z.ZodJSONSchema>;
317
+ }, z.core.$strip>>;
318
+ }, z.core.$strip>;
319
+ declare const chronaExportInputSchema: z.ZodObject<{
320
+ scopes: z.ZodOptional<z.ZodArray<z.ZodEnum<{
321
+ user: "user";
322
+ project: "project";
323
+ org: "org";
324
+ shared: "shared";
325
+ }>>>;
326
+ types: z.ZodOptional<z.ZodArray<z.ZodEnum<{
327
+ decision: "decision";
328
+ preference: "preference";
329
+ fact: "fact";
330
+ incident: "incident";
331
+ constraint: "constraint";
332
+ }>>>;
333
+ tags: z.ZodOptional<z.ZodArray<z.ZodString>>;
334
+ sourceKind: z.ZodOptional<z.ZodEnum<{
335
+ tool: "tool";
336
+ session: "session";
337
+ repo: "repo";
338
+ }>>;
339
+ sourceValue: z.ZodOptional<z.ZodString>;
340
+ before: z.ZodOptional<z.ZodString>;
341
+ after: z.ZodOptional<z.ZodString>;
342
+ includeExpired: z.ZodDefault<z.ZodBoolean>;
343
+ order: z.ZodDefault<z.ZodEnum<{
344
+ asc: "asc";
345
+ desc: "desc";
346
+ }>>;
347
+ limit: z.ZodDefault<z.ZodNumber>;
348
+ }, z.core.$strip>;
349
+ declare const chronaExportResultSchema: z.ZodObject<{
350
+ count: z.ZodNumber;
351
+ jsonl: z.ZodString;
352
+ }, z.core.$strip>;
353
+ declare const chronaImportInputSchema: z.ZodObject<{
354
+ jsonl: z.ZodString;
355
+ }, z.core.$strip>;
356
+ declare const chronaImportResultSchema: z.ZodObject<{
357
+ imported: z.ZodNumber;
358
+ updated: z.ZodNumber;
359
+ ids: z.ZodArray<z.ZodString>;
360
+ }, z.core.$strip>;
361
+ declare const chronaGcInputSchema: z.ZodObject<{
362
+ now: z.ZodOptional<z.ZodString>;
363
+ }, z.core.$strip>;
364
+ declare const chronaGcResultSchema: z.ZodObject<{
365
+ deleted: z.ZodNumber;
366
+ ids: z.ZodArray<z.ZodString>;
367
+ now: z.ZodString;
368
+ }, z.core.$strip>;
369
+ type ChronaAddInput = z.input<typeof chronaAddInputSchema>;
370
+ type ChronaAddResult = z.infer<typeof chronaAddResultSchema>;
371
+ type ChronaGetInput = z.input<typeof chronaGetInputSchema>;
372
+ type ChronaGetResult = z.infer<typeof chronaGetResultSchema>;
373
+ type ChronaSearchInput = z.input<typeof chronaSearchInputSchema>;
374
+ type ChronaSearchResult = z.infer<typeof chronaSearchResultSchema>;
375
+ type ChronaTimelineInput = z.input<typeof chronaTimelineInputSchema>;
376
+ type ChronaTimelineResult = z.infer<typeof chronaTimelineResultSchema>;
377
+ type ChronaExportInput = z.input<typeof chronaExportInputSchema>;
378
+ type ChronaExportResult = z.infer<typeof chronaExportResultSchema>;
379
+ type ChronaImportInput = z.input<typeof chronaImportInputSchema>;
380
+ type ChronaImportResult = z.infer<typeof chronaImportResultSchema>;
381
+ type ChronaGcInput = z.input<typeof chronaGcInputSchema>;
382
+ type ChronaGcResult = z.infer<typeof chronaGcResultSchema>;
383
+ interface ChronaMcpHandlers {
384
+ add(input: ChronaAddInput): ChronaAddResult;
385
+ get(input: ChronaGetInput): ChronaGetResult;
386
+ search(input: ChronaSearchInput): ChronaSearchResult;
387
+ timeline(input: ChronaTimelineInput): ChronaTimelineResult;
388
+ export(input: ChronaExportInput): ChronaExportResult;
389
+ import(input: ChronaImportInput): ChronaImportResult;
390
+ gc(input?: ChronaGcInput): ChronaGcResult;
391
+ }
392
+ interface StartChronaMcpServerOptions {
393
+ dbPath: string;
394
+ port?: number;
395
+ }
396
+ declare function createChronaMcpHandlers(dbPath: string): ChronaMcpHandlers;
397
+ declare function createChronaMcpServer(dbPath: string): McpServer;
398
+ declare function startChronaMcpServer(options: StartChronaMcpServerOptions): Promise<void>;
399
+
400
+ export { type AddMemoryInput, ChromaStore, type ChronaAddInput, type ChronaAddResult, type ChronaExportInput, type ChronaExportResult, type ChronaGcInput, type ChronaGcResult, type ChronaGetInput, type ChronaGetResult, type ChronaImportInput, type ChronaImportResult, type ChronaMcpHandlers, type ChronaSearchInput, type ChronaSearchResult, type ChronaTimelineInput, type ChronaTimelineResult, type ExportOptions, type GcResult, type ImportResult, type MemoryEntry, type MemoryScope, type MemorySource, type MemoryType, type QueryOptions, type SearchOptions, type SourceKind, type StartChronaMcpServerOptions, type TimelineOptions, chronaAddInputSchema, chronaAddResultSchema, chronaExportInputSchema, chronaExportResultSchema, chronaGcInputSchema, chronaGcResultSchema, chronaGetInputSchema, chronaGetResultSchema, chronaImportInputSchema, chronaImportResultSchema, chronaSearchInputSchema, chronaSearchResultSchema, chronaTimelineInputSchema, chronaTimelineResultSchema, createChronaMcpHandlers, createChronaMcpServer, memoryScopes, memoryTypes, normalizeEntry, parseMemoryScope, parseMemoryType, parseSourceKind, sourceKinds, startChronaMcpServer };
package/dist/index.js CHANGED
@@ -1,21 +1,55 @@
1
1
  import {
2
2
  ChromaStore,
3
+ chronaAddInputSchema,
4
+ chronaAddResultSchema,
5
+ chronaExportInputSchema,
6
+ chronaExportResultSchema,
7
+ chronaGcInputSchema,
8
+ chronaGcResultSchema,
9
+ chronaGetInputSchema,
10
+ chronaGetResultSchema,
11
+ chronaImportInputSchema,
12
+ chronaImportResultSchema,
13
+ chronaSearchInputSchema,
14
+ chronaSearchResultSchema,
15
+ chronaTimelineInputSchema,
16
+ chronaTimelineResultSchema,
17
+ createChronaMcpHandlers,
18
+ createChronaMcpServer,
3
19
  memoryScopes,
4
20
  memoryTypes,
5
21
  normalizeEntry,
6
22
  parseMemoryScope,
7
23
  parseMemoryType,
8
24
  parseSourceKind,
9
- sourceKinds
10
- } from "./chunk-PPAKIDJE.js";
25
+ sourceKinds,
26
+ startChronaMcpServer
27
+ } from "./chunk-4QI4QC33.js";
11
28
  export {
12
29
  ChromaStore,
30
+ chronaAddInputSchema,
31
+ chronaAddResultSchema,
32
+ chronaExportInputSchema,
33
+ chronaExportResultSchema,
34
+ chronaGcInputSchema,
35
+ chronaGcResultSchema,
36
+ chronaGetInputSchema,
37
+ chronaGetResultSchema,
38
+ chronaImportInputSchema,
39
+ chronaImportResultSchema,
40
+ chronaSearchInputSchema,
41
+ chronaSearchResultSchema,
42
+ chronaTimelineInputSchema,
43
+ chronaTimelineResultSchema,
44
+ createChronaMcpHandlers,
45
+ createChronaMcpServer,
13
46
  memoryScopes,
14
47
  memoryTypes,
15
48
  normalizeEntry,
16
49
  parseMemoryScope,
17
50
  parseMemoryType,
18
51
  parseSourceKind,
19
- sourceKinds
52
+ sourceKinds,
53
+ startChronaMcpServer
20
54
  };
21
55
  //# sourceMappingURL=index.js.map