mnemocyte 0.1.5 → 0.3.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 +188 -14
- package/dist/embedders/openai.d.mts +1 -1
- package/dist/embedders/openai.mjs +1 -1
- package/dist/{errors-BG3-mNur.mjs → errors-B_7ZdjEO.mjs} +4 -3
- package/dist/{errors-BG3-mNur.mjs.map → errors-B_7ZdjEO.mjs.map} +1 -1
- package/dist/index.d.mts +9 -9
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +964 -806
- package/dist/index.mjs.map +1 -1
- package/dist/{types-QK_43oKJ.d.mts → types-gOPLre4V.d.mts} +63 -28
- package/dist/types-gOPLre4V.d.mts.map +1 -0
- package/migrations/0000_initial.sql.template +42 -0
- package/migrations/0001_add_mnemocyte_meta.sql +6 -0
- package/migrations/meta/0001_snapshot.json +309 -0
- package/migrations/meta/_journal.json +7 -0
- package/migrations/render-initial.mjs +36 -0
- package/package.json +5 -3
- package/dist/types-QK_43oKJ.d.mts.map +0 -1
|
@@ -29,6 +29,17 @@ type ImportanceLevel = "low" | "normal" | "high" | "critical";
|
|
|
29
29
|
* @defaultValue `"markdown"`
|
|
30
30
|
*/
|
|
31
31
|
type ContextFormat = "markdown" | "plain" | "xml";
|
|
32
|
+
/**
|
|
33
|
+
* A value that can be persisted losslessly as JSON.
|
|
34
|
+
*
|
|
35
|
+
* Metadata rejects unsupported runtime values such as `undefined`, functions,
|
|
36
|
+
* symbols, bigints, non-finite numbers, class instances, and cyclic objects.
|
|
37
|
+
*/
|
|
38
|
+
type JsonValue = string | number | boolean | null | JsonObject | JsonValue[];
|
|
39
|
+
/** A JSON-compatible object used for persisted memory and audit metadata. */
|
|
40
|
+
interface JsonObject {
|
|
41
|
+
[key: string]: JsonValue;
|
|
42
|
+
}
|
|
32
43
|
/**
|
|
33
44
|
* Identifies which backend a {@link MnemocyteClient} is using.
|
|
34
45
|
*
|
|
@@ -128,7 +139,8 @@ interface ProviderResilienceConfig {
|
|
|
128
139
|
interface MnemocyteConfig {
|
|
129
140
|
/**
|
|
130
141
|
* Postgres connection string. When set, the client uses the Postgres
|
|
131
|
-
* backend (requires the `pgvector` extension and
|
|
142
|
+
* backend (requires the `pgvector` extension and a rendered migration
|
|
143
|
+
* with `mnemocyte_meta.embedding_dimensions` matching the embedder).
|
|
132
144
|
* When omitted, an in-memory backend is used.
|
|
133
145
|
*/
|
|
134
146
|
databaseUrl?: string;
|
|
@@ -189,13 +201,15 @@ interface Embedder {
|
|
|
189
201
|
readonly dimensions: number;
|
|
190
202
|
/**
|
|
191
203
|
* Embed one or more texts. Implementations MUST return one vector per
|
|
192
|
-
* input, in the same order, each of length {@link Embedder.dimensions}
|
|
204
|
+
* input, in the same order, each of length {@link Embedder.dimensions} and
|
|
205
|
+
* containing only finite numeric values.
|
|
193
206
|
*
|
|
194
207
|
* The optional `options.signal` is forwarded by Mnemocyte when the
|
|
195
|
-
* caller passes a `signal` on a {@link RememberInput} /
|
|
196
|
-
*
|
|
197
|
-
*
|
|
198
|
-
*
|
|
208
|
+
* caller passes a `signal` on a {@link RememberInput} /
|
|
209
|
+
* {@link RememberManyInput} / {@link RecallInput} /
|
|
210
|
+
* {@link BuildContextInput}, or when Mnemocyte's own provider timeout fires.
|
|
211
|
+
* Implementations that integrate with `fetch` should forward the signal to
|
|
212
|
+
* it so requests can be cancelled promptly.
|
|
199
213
|
*/
|
|
200
214
|
embed(texts: readonly string[], options?: {
|
|
201
215
|
signal?: AbortSignal;
|
|
@@ -222,8 +236,8 @@ interface Memory {
|
|
|
222
236
|
tags: string[];
|
|
223
237
|
/** Optional human-readable source attribution (e.g. `"chat:2024-04-12"`). */
|
|
224
238
|
source: string | null;
|
|
225
|
-
/**
|
|
226
|
-
metadata:
|
|
239
|
+
/** JSON-compatible metadata persisted by value alongside the memory. */
|
|
240
|
+
metadata: JsonObject;
|
|
227
241
|
/** Confidence in `[0, 1]`. Used in retrieval ranking. */
|
|
228
242
|
confidence: number;
|
|
229
243
|
/** {@link Embedder.model} value at write time. */
|
|
@@ -271,21 +285,22 @@ interface RetrievalScores {
|
|
|
271
285
|
}
|
|
272
286
|
/**
|
|
273
287
|
* Optional overrides for the per-component retrieval weights. Missing keys
|
|
274
|
-
* fall back to library defaults. Weights
|
|
275
|
-
*
|
|
288
|
+
* fall back to library defaults. Weights must be finite and non-negative, and
|
|
289
|
+
* their effective total must be greater than zero. They need not sum to 1;
|
|
290
|
+
* the final score is computed as a weighted sum of {@link RetrievalScores}.
|
|
276
291
|
*/
|
|
277
292
|
interface RetrievalScoreWeights {
|
|
278
|
-
/**
|
|
293
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.vector}. */
|
|
279
294
|
vector?: number;
|
|
280
|
-
/**
|
|
295
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.lexical}. */
|
|
281
296
|
lexical?: number;
|
|
282
|
-
/**
|
|
297
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.recency}. */
|
|
283
298
|
recency?: number;
|
|
284
|
-
/**
|
|
299
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.confidence}. */
|
|
285
300
|
confidence?: number;
|
|
286
|
-
/**
|
|
301
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.access}. */
|
|
287
302
|
access?: number;
|
|
288
|
-
/**
|
|
303
|
+
/** Non-negative finite weight applied to {@link RetrievalScores.importance}. */
|
|
289
304
|
importance?: number;
|
|
290
305
|
}
|
|
291
306
|
/**
|
|
@@ -295,13 +310,14 @@ interface RetrievalScoreWeights {
|
|
|
295
310
|
interface RetrievalConfig {
|
|
296
311
|
/** Per-component score weights. See {@link RetrievalScoreWeights}. */
|
|
297
312
|
weights?: RetrievalScoreWeights;
|
|
298
|
-
/**
|
|
313
|
+
/** Positive finite half-life (days) for the time-decay recency component. */
|
|
299
314
|
recencyHalfLifeDays?: number;
|
|
300
|
-
/**
|
|
315
|
+
/** Positive finite access count at which the access score is saturated. */
|
|
301
316
|
accessSaturation?: number;
|
|
302
317
|
/**
|
|
303
318
|
* Multiplier applied to {@link RecallInput.limit} to determine how many
|
|
304
319
|
* candidates are fetched from the underlying store before re-ranking.
|
|
320
|
+
* Must be an integer greater than or equal to 1.
|
|
305
321
|
*/
|
|
306
322
|
candidateMultiplier?: number;
|
|
307
323
|
}
|
|
@@ -362,8 +378,8 @@ interface RememberInput {
|
|
|
362
378
|
tags?: string[];
|
|
363
379
|
/** Optional human-readable source attribution. */
|
|
364
380
|
source?: string;
|
|
365
|
-
/**
|
|
366
|
-
metadata?:
|
|
381
|
+
/** JSON-compatible metadata persisted by value alongside the memory. */
|
|
382
|
+
metadata?: JsonObject;
|
|
367
383
|
/** Confidence in `[0, 1]`. @defaultValue `1` */
|
|
368
384
|
confidence?: number;
|
|
369
385
|
/** Optional expiry; expired memories are filtered out by default. */
|
|
@@ -375,6 +391,18 @@ interface RememberInput {
|
|
|
375
391
|
*/
|
|
376
392
|
signal?: AbortSignal;
|
|
377
393
|
}
|
|
394
|
+
/**
|
|
395
|
+
* Batch-level input for {@link MnemocyteClient.rememberMany}.
|
|
396
|
+
*
|
|
397
|
+
* Cancellation belongs to the whole batch. Individual items accept every
|
|
398
|
+
* {@link RememberInput} field except `signal`.
|
|
399
|
+
*/
|
|
400
|
+
interface RememberManyInput {
|
|
401
|
+
/** Memories to persist in order. */
|
|
402
|
+
inputs: readonly Omit<RememberInput, "signal">[];
|
|
403
|
+
/** Optional cancellation signal for the entire batch. */
|
|
404
|
+
signal?: AbortSignal;
|
|
405
|
+
}
|
|
378
406
|
/**
|
|
379
407
|
* Input for {@link MnemocyteClient.recall}.
|
|
380
408
|
*/
|
|
@@ -411,8 +439,8 @@ interface RecallInput {
|
|
|
411
439
|
/**
|
|
412
440
|
* Pluggable token counter used by {@link MnemocyteClient.buildContext} to
|
|
413
441
|
* enforce {@link BuildContextInput.maxTokens}. Plug in your model's real
|
|
414
|
-
* tokenizer (e.g. `tiktoken`) for accurate budgeting; a simple
|
|
415
|
-
* heuristic is used when omitted.
|
|
442
|
+
* tokenizer (e.g. `tiktoken`) for accurate budgeting; a simple character-count
|
|
443
|
+
* heuristic (approximately one token per four characters) is used when omitted.
|
|
416
444
|
*/
|
|
417
445
|
interface TokenCounter {
|
|
418
446
|
/** Return the number of tokens in `text`. */
|
|
@@ -429,7 +457,7 @@ interface BuildContextInput {
|
|
|
429
457
|
query: string;
|
|
430
458
|
/** Output format. @defaultValue `"markdown"` */
|
|
431
459
|
format?: ContextFormat;
|
|
432
|
-
/** Optional token budget;
|
|
460
|
+
/** Optional positive-integer token budget; omission uses the default path. */
|
|
433
461
|
maxTokens?: number;
|
|
434
462
|
/** Maximum number of memories to consider. */
|
|
435
463
|
limit?: number;
|
|
@@ -573,8 +601,8 @@ interface AuditEvent {
|
|
|
573
601
|
* `"entity.cleared"`.
|
|
574
602
|
*/
|
|
575
603
|
description: string;
|
|
576
|
-
/**
|
|
577
|
-
metadata:
|
|
604
|
+
/** JSON-compatible structured details persisted by value with the change. */
|
|
605
|
+
metadata: JsonObject;
|
|
578
606
|
/** When the change was recorded. */
|
|
579
607
|
timestamp: Date;
|
|
580
608
|
}
|
|
@@ -691,7 +719,14 @@ interface MnemocyteClient {
|
|
|
691
719
|
remember(input: RememberInput): Promise<Memory>;
|
|
692
720
|
/**
|
|
693
721
|
* Persist multiple memories in one round-trip. Returns the stored records
|
|
694
|
-
* in the same order as `inputs
|
|
722
|
+
* in the same order as `input.inputs`; `input.signal` cancels the batch.
|
|
723
|
+
*/
|
|
724
|
+
rememberMany(input: RememberManyInput): Promise<Memory[]>;
|
|
725
|
+
/**
|
|
726
|
+
* Positional compatibility overload retained during pre-v1. The first
|
|
727
|
+
* item's `signal`, when present, acts as the batch signal.
|
|
728
|
+
*
|
|
729
|
+
* @deprecated Use `rememberMany({ inputs, signal })`.
|
|
695
730
|
*/
|
|
696
731
|
rememberMany(inputs: readonly RememberInput[]): Promise<Memory[]>;
|
|
697
732
|
/**
|
|
@@ -841,5 +876,5 @@ interface ExperimentalMnemocyteClient {
|
|
|
841
876
|
consolidate(input: ConsolidateInput): Promise<ConsolidateResult>;
|
|
842
877
|
}
|
|
843
878
|
//#endregion
|
|
844
|
-
export {
|
|
845
|
-
//# sourceMappingURL=types-
|
|
879
|
+
export { RecallInput as A, MnemocyteObservation as C, ProviderResilienceConfig as D, ObservabilityConfig as E, RetrievalScoreWeights as F, RetrievalScores as I, TokenCounter as L, RememberManyInput as M, RetrievalConfig as N, PruneInput as O, RetrievalExplanation as P, MnemocyteConfig as S, MnemocyteOperation as T, Memory as _, ConsolidateResult as a, MnemocyteBackend as b, Embedder as c, FindDuplicatesInput as d, GlobalStats as f, ListAuditLogInput as g, JsonValue as h, ConsolidateInput as i, RememberInput as j, PruneResult as k, EntityStats as l, JsonObject as m, AuditEvent as n, ContextFormat as o, ImportanceLevel as p, BuildContextInput as r, DuplicatePair as s, AuditConfig as t, ExperimentalMnemocyteClient as u, MemoryType as v, MnemocyteObservationPhase as w, MnemocyteClient as x, MemoryWithScore as y };
|
|
880
|
+
//# sourceMappingURL=types-gOPLre4V.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types-gOPLre4V.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;AAYA;;;;AAAsB;AActB;;;;AAA2B;AAW3B;KAzBY,UAAA;;;AAyBa;AAQzB;;;KAnBY,eAAA;AAyBA;AAGZ;;;;AACyB;AASzB;;;AAbY,KAdA,aAAA;AA2BgB;AAM5B;;;;AAA8B;AANF,KAnBhB,SAAA,sCAKT,UAAA,GACA,SAAS;;UAGK,UAAA;EAAA,CACf,GAAA,WAAc,SAAS;AAAA;AA2CzB;;;;;;AAAA,KAlCY,gBAAA;;;;;KAMA,kBAAA;;;;;;;KAoBA,yBAAA;;;;;AA0BN;AASN;UA3BiB,oBAAA;;EAEhB,SAAA,EAAW,kBAAA;EA+BX;EA7BA,KAAA,EAAO,yBAAA;EA6BI;EA3BX,OAAA,EAAS,gBAAA;EA2BgD;EA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L,
|
|
6
|
+
"timestamp" timestamp with time zone DEFAULT now() NOT NULL
|
|
7
|
+
);
|
|
8
|
+
--> statement-breakpoint
|
|
9
|
+
CREATE TABLE "mnemocyte_meta" (
|
|
10
|
+
"key" text PRIMARY KEY NOT NULL,
|
|
11
|
+
"embedding_dimensions" integer NOT NULL
|
|
12
|
+
);
|
|
13
|
+
--> statement-breakpoint
|
|
14
|
+
INSERT INTO "mnemocyte_meta" ("key", "embedding_dimensions") VALUES ('installation', {{EMBEDDING_DIMENSIONS}});
|
|
15
|
+
--> statement-breakpoint
|
|
16
|
+
CREATE TABLE "mnemocyte_memories" (
|
|
17
|
+
"id" text PRIMARY KEY NOT NULL,
|
|
18
|
+
"entity_id" text NOT NULL,
|
|
19
|
+
"content" text NOT NULL,
|
|
20
|
+
"type" text DEFAULT 'fact' NOT NULL,
|
|
21
|
+
"importance" text DEFAULT 'normal' NOT NULL,
|
|
22
|
+
"tags" text[] DEFAULT '{}'::text[] NOT NULL,
|
|
23
|
+
"source" text,
|
|
24
|
+
"metadata" jsonb DEFAULT '{}'::jsonb NOT NULL,
|
|
25
|
+
"confidence" real DEFAULT 1 NOT NULL,
|
|
26
|
+
"embedding" vector({{EMBEDDING_DIMENSIONS}}),
|
|
27
|
+
"embedding_model" text NOT NULL,
|
|
28
|
+
"embedding_dimensions" integer NOT NULL,
|
|
29
|
+
"superseded_by" text,
|
|
30
|
+
"superseded_at" timestamp with time zone,
|
|
31
|
+
"expires_at" timestamp with time zone,
|
|
32
|
+
"last_accessed_at" timestamp with time zone,
|
|
33
|
+
"access_count" integer DEFAULT 0 NOT NULL,
|
|
34
|
+
"created_at" timestamp with time zone DEFAULT now() NOT NULL,
|
|
35
|
+
"updated_at" timestamp with time zone DEFAULT now() NOT NULL
|
|
36
|
+
);
|
|
37
|
+
--> statement-breakpoint
|
|
38
|
+
ALTER TABLE "mnemocyte_memories" ADD CONSTRAINT "mnemocyte_memories_superseded_by_mnemocyte_memories_id_fk" FOREIGN KEY ("superseded_by") REFERENCES "public"."mnemocyte_memories"("id") ON DELETE no action ON UPDATE no action;--> statement-breakpoint
|
|
39
|
+
CREATE INDEX "mnemocyte_events_entity_time_idx" ON "mnemocyte_events" USING btree ("entity_id","timestamp");--> statement-breakpoint
|
|
40
|
+
CREATE INDEX "mnemocyte_memories_entity_idx" ON "mnemocyte_memories" USING btree ("entity_id");--> statement-breakpoint
|
|
41
|
+
CREATE INDEX "mnemocyte_memories_entity_type_idx" ON "mnemocyte_memories" USING btree ("entity_id","type");--> statement-breakpoint
|
|
42
|
+
CREATE INDEX "mnemocyte_memories_embedding_hnsw_idx" ON "mnemocyte_memories" USING hnsw ("embedding" vector_cosine_ops);
|
|
@@ -0,0 +1,309 @@
|
|
|
1
|
+
{
|
|
2
|
+
"id": "59920203-e7f9-4cdd-9580-1c7b42ac242e",
|
|
3
|
+
"prevId": "feeb327d-c000-40d3-9c3c-3eb82b2e2e81",
|
|
4
|
+
"version": "7",
|
|
5
|
+
"dialect": "postgresql",
|
|
6
|
+
"tables": {
|
|
7
|
+
"public.mnemocyte_events": {
|
|
8
|
+
"name": "mnemocyte_events",
|
|
9
|
+
"schema": "",
|
|
10
|
+
"columns": {
|
|
11
|
+
"id": {
|
|
12
|
+
"name": "id",
|
|
13
|
+
"type": "text",
|
|
14
|
+
"primaryKey": true,
|
|
15
|
+
"notNull": true
|
|
16
|
+
},
|
|
17
|
+
"entity_id": {
|
|
18
|
+
"name": "entity_id",
|
|
19
|
+
"type": "text",
|
|
20
|
+
"primaryKey": false,
|
|
21
|
+
"notNull": true
|
|
22
|
+
},
|
|
23
|
+
"description": {
|
|
24
|
+
"name": "description",
|
|
25
|
+
"type": "text",
|
|
26
|
+
"primaryKey": false,
|
|
27
|
+
"notNull": true
|
|
28
|
+
},
|
|
29
|
+
"metadata": {
|
|
30
|
+
"name": "metadata",
|
|
31
|
+
"type": "jsonb",
|
|
32
|
+
"primaryKey": false,
|
|
33
|
+
"notNull": true,
|
|
34
|
+
"default": "'{}'::jsonb"
|
|
35
|
+
},
|
|
36
|
+
"timestamp": {
|
|
37
|
+
"name": "timestamp",
|
|
38
|
+
"type": "timestamp with time zone",
|
|
39
|
+
"primaryKey": false,
|
|
40
|
+
"notNull": true,
|
|
41
|
+
"default": "now()"
|
|
42
|
+
}
|
|
43
|
+
},
|
|
44
|
+
"indexes": {
|
|
45
|
+
"mnemocyte_events_entity_time_idx": {
|
|
46
|
+
"name": "mnemocyte_events_entity_time_idx",
|
|
47
|
+
"columns": [
|
|
48
|
+
{
|
|
49
|
+
"expression": "entity_id",
|
|
50
|
+
"isExpression": false,
|
|
51
|
+
"asc": true,
|
|
52
|
+
"nulls": "last"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"expression": "timestamp",
|
|
56
|
+
"isExpression": false,
|
|
57
|
+
"asc": true,
|
|
58
|
+
"nulls": "last"
|
|
59
|
+
}
|
|
60
|
+
],
|
|
61
|
+
"isUnique": false,
|
|
62
|
+
"concurrently": false,
|
|
63
|
+
"method": "btree",
|
|
64
|
+
"with": {}
|
|
65
|
+
}
|
|
66
|
+
},
|
|
67
|
+
"foreignKeys": {},
|
|
68
|
+
"compositePrimaryKeys": {},
|
|
69
|
+
"uniqueConstraints": {},
|
|
70
|
+
"policies": {},
|
|
71
|
+
"checkConstraints": {},
|
|
72
|
+
"isRLSEnabled": false
|
|
73
|
+
},
|
|
74
|
+
"public.mnemocyte_memories": {
|
|
75
|
+
"name": "mnemocyte_memories",
|
|
76
|
+
"schema": "",
|
|
77
|
+
"columns": {
|
|
78
|
+
"id": {
|
|
79
|
+
"name": "id",
|
|
80
|
+
"type": "text",
|
|
81
|
+
"primaryKey": true,
|
|
82
|
+
"notNull": true
|
|
83
|
+
},
|
|
84
|
+
"entity_id": {
|
|
85
|
+
"name": "entity_id",
|
|
86
|
+
"type": "text",
|
|
87
|
+
"primaryKey": false,
|
|
88
|
+
"notNull": true
|
|
89
|
+
},
|
|
90
|
+
"content": {
|
|
91
|
+
"name": "content",
|
|
92
|
+
"type": "text",
|
|
93
|
+
"primaryKey": false,
|
|
94
|
+
"notNull": true
|
|
95
|
+
},
|
|
96
|
+
"type": {
|
|
97
|
+
"name": "type",
|
|
98
|
+
"type": "text",
|
|
99
|
+
"primaryKey": false,
|
|
100
|
+
"notNull": true,
|
|
101
|
+
"default": "'fact'"
|
|
102
|
+
},
|
|
103
|
+
"importance": {
|
|
104
|
+
"name": "importance",
|
|
105
|
+
"type": "text",
|
|
106
|
+
"primaryKey": false,
|
|
107
|
+
"notNull": true,
|
|
108
|
+
"default": "'normal'"
|
|
109
|
+
},
|
|
110
|
+
"tags": {
|
|
111
|
+
"name": "tags",
|
|
112
|
+
"type": "text[]",
|
|
113
|
+
"primaryKey": false,
|
|
114
|
+
"notNull": true,
|
|
115
|
+
"default": "'{}'::text[]"
|
|
116
|
+
},
|
|
117
|
+
"source": {
|
|
118
|
+
"name": "source",
|
|
119
|
+
"type": "text",
|
|
120
|
+
"primaryKey": false,
|
|
121
|
+
"notNull": false
|
|
122
|
+
},
|
|
123
|
+
"metadata": {
|
|
124
|
+
"name": "metadata",
|
|
125
|
+
"type": "jsonb",
|
|
126
|
+
"primaryKey": false,
|
|
127
|
+
"notNull": true,
|
|
128
|
+
"default": "'{}'::jsonb"
|
|
129
|
+
},
|
|
130
|
+
"confidence": {
|
|
131
|
+
"name": "confidence",
|
|
132
|
+
"type": "real",
|
|
133
|
+
"primaryKey": false,
|
|
134
|
+
"notNull": true,
|
|
135
|
+
"default": 1
|
|
136
|
+
},
|
|
137
|
+
"embedding": {
|
|
138
|
+
"name": "embedding",
|
|
139
|
+
"type": "vector(1536)",
|
|
140
|
+
"primaryKey": false,
|
|
141
|
+
"notNull": false
|
|
142
|
+
},
|
|
143
|
+
"embedding_model": {
|
|
144
|
+
"name": "embedding_model",
|
|
145
|
+
"type": "text",
|
|
146
|
+
"primaryKey": false,
|
|
147
|
+
"notNull": true
|
|
148
|
+
},
|
|
149
|
+
"embedding_dimensions": {
|
|
150
|
+
"name": "embedding_dimensions",
|
|
151
|
+
"type": "integer",
|
|
152
|
+
"primaryKey": false,
|
|
153
|
+
"notNull": true
|
|
154
|
+
},
|
|
155
|
+
"superseded_by": {
|
|
156
|
+
"name": "superseded_by",
|
|
157
|
+
"type": "text",
|
|
158
|
+
"primaryKey": false,
|
|
159
|
+
"notNull": false
|
|
160
|
+
},
|
|
161
|
+
"superseded_at": {
|
|
162
|
+
"name": "superseded_at",
|
|
163
|
+
"type": "timestamp with time zone",
|
|
164
|
+
"primaryKey": false,
|
|
165
|
+
"notNull": false
|
|
166
|
+
},
|
|
167
|
+
"expires_at": {
|
|
168
|
+
"name": "expires_at",
|
|
169
|
+
"type": "timestamp with time zone",
|
|
170
|
+
"primaryKey": false,
|
|
171
|
+
"notNull": false
|
|
172
|
+
},
|
|
173
|
+
"last_accessed_at": {
|
|
174
|
+
"name": "last_accessed_at",
|
|
175
|
+
"type": "timestamp with time zone",
|
|
176
|
+
"primaryKey": false,
|
|
177
|
+
"notNull": false
|
|
178
|
+
},
|
|
179
|
+
"access_count": {
|
|
180
|
+
"name": "access_count",
|
|
181
|
+
"type": "integer",
|
|
182
|
+
"primaryKey": false,
|
|
183
|
+
"notNull": true,
|
|
184
|
+
"default": 0
|
|
185
|
+
},
|
|
186
|
+
"created_at": {
|
|
187
|
+
"name": "created_at",
|
|
188
|
+
"type": "timestamp with time zone",
|
|
189
|
+
"primaryKey": false,
|
|
190
|
+
"notNull": true,
|
|
191
|
+
"default": "now()"
|
|
192
|
+
},
|
|
193
|
+
"updated_at": {
|
|
194
|
+
"name": "updated_at",
|
|
195
|
+
"type": "timestamp with time zone",
|
|
196
|
+
"primaryKey": false,
|
|
197
|
+
"notNull": true,
|
|
198
|
+
"default": "now()"
|
|
199
|
+
}
|
|
200
|
+
},
|
|
201
|
+
"indexes": {
|
|
202
|
+
"mnemocyte_memories_entity_idx": {
|
|
203
|
+
"name": "mnemocyte_memories_entity_idx",
|
|
204
|
+
"columns": [
|
|
205
|
+
{
|
|
206
|
+
"expression": "entity_id",
|
|
207
|
+
"isExpression": false,
|
|
208
|
+
"asc": true,
|
|
209
|
+
"nulls": "last"
|
|
210
|
+
}
|
|
211
|
+
],
|
|
212
|
+
"isUnique": false,
|
|
213
|
+
"concurrently": false,
|
|
214
|
+
"method": "btree",
|
|
215
|
+
"with": {}
|
|
216
|
+
},
|
|
217
|
+
"mnemocyte_memories_entity_type_idx": {
|
|
218
|
+
"name": "mnemocyte_memories_entity_type_idx",
|
|
219
|
+
"columns": [
|
|
220
|
+
{
|
|
221
|
+
"expression": "entity_id",
|
|
222
|
+
"isExpression": false,
|
|
223
|
+
"asc": true,
|
|
224
|
+
"nulls": "last"
|
|
225
|
+
},
|
|
226
|
+
{
|
|
227
|
+
"expression": "type",
|
|
228
|
+
"isExpression": false,
|
|
229
|
+
"asc": true,
|
|
230
|
+
"nulls": "last"
|
|
231
|
+
}
|
|
232
|
+
],
|
|
233
|
+
"isUnique": false,
|
|
234
|
+
"concurrently": false,
|
|
235
|
+
"method": "btree",
|
|
236
|
+
"with": {}
|
|
237
|
+
},
|
|
238
|
+
"mnemocyte_memories_embedding_hnsw_idx": {
|
|
239
|
+
"name": "mnemocyte_memories_embedding_hnsw_idx",
|
|
240
|
+
"columns": [
|
|
241
|
+
{
|
|
242
|
+
"expression": "embedding",
|
|
243
|
+
"isExpression": false,
|
|
244
|
+
"asc": true,
|
|
245
|
+
"nulls": "last",
|
|
246
|
+
"opclass": "vector_cosine_ops"
|
|
247
|
+
}
|
|
248
|
+
],
|
|
249
|
+
"isUnique": false,
|
|
250
|
+
"concurrently": false,
|
|
251
|
+
"method": "hnsw",
|
|
252
|
+
"with": {}
|
|
253
|
+
}
|
|
254
|
+
},
|
|
255
|
+
"foreignKeys": {
|
|
256
|
+
"mnemocyte_memories_superseded_by_mnemocyte_memories_id_fk": {
|
|
257
|
+
"name": "mnemocyte_memories_superseded_by_mnemocyte_memories_id_fk",
|
|
258
|
+
"tableFrom": "mnemocyte_memories",
|
|
259
|
+
"tableTo": "mnemocyte_memories",
|
|
260
|
+
"columnsFrom": ["superseded_by"],
|
|
261
|
+
"columnsTo": ["id"],
|
|
262
|
+
"onDelete": "no action",
|
|
263
|
+
"onUpdate": "no action"
|
|
264
|
+
}
|
|
265
|
+
},
|
|
266
|
+
"compositePrimaryKeys": {},
|
|
267
|
+
"uniqueConstraints": {},
|
|
268
|
+
"policies": {},
|
|
269
|
+
"checkConstraints": {},
|
|
270
|
+
"isRLSEnabled": false
|
|
271
|
+
},
|
|
272
|
+
"public.mnemocyte_meta": {
|
|
273
|
+
"name": "mnemocyte_meta",
|
|
274
|
+
"schema": "",
|
|
275
|
+
"columns": {
|
|
276
|
+
"key": {
|
|
277
|
+
"name": "key",
|
|
278
|
+
"type": "text",
|
|
279
|
+
"primaryKey": true,
|
|
280
|
+
"notNull": true
|
|
281
|
+
},
|
|
282
|
+
"embedding_dimensions": {
|
|
283
|
+
"name": "embedding_dimensions",
|
|
284
|
+
"type": "integer",
|
|
285
|
+
"primaryKey": false,
|
|
286
|
+
"notNull": true
|
|
287
|
+
}
|
|
288
|
+
},
|
|
289
|
+
"indexes": {},
|
|
290
|
+
"foreignKeys": {},
|
|
291
|
+
"compositePrimaryKeys": {},
|
|
292
|
+
"uniqueConstraints": {},
|
|
293
|
+
"policies": {},
|
|
294
|
+
"checkConstraints": {},
|
|
295
|
+
"isRLSEnabled": false
|
|
296
|
+
}
|
|
297
|
+
},
|
|
298
|
+
"enums": {},
|
|
299
|
+
"schemas": {},
|
|
300
|
+
"sequences": {},
|
|
301
|
+
"roles": {},
|
|
302
|
+
"policies": {},
|
|
303
|
+
"views": {},
|
|
304
|
+
"_meta": {
|
|
305
|
+
"columns": {},
|
|
306
|
+
"schemas": {},
|
|
307
|
+
"tables": {}
|
|
308
|
+
}
|
|
309
|
+
}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { readFile, writeFile } from "node:fs/promises";
|
|
3
|
+
import { dirname, resolve } from "node:path";
|
|
4
|
+
import { fileURLToPath } from "node:url";
|
|
5
|
+
|
|
6
|
+
function readOption(name) {
|
|
7
|
+
const index = process.argv.indexOf(name);
|
|
8
|
+
if (index === -1) return undefined;
|
|
9
|
+
return process.argv[index + 1];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
function parseDimensions(value) {
|
|
13
|
+
const dimensions = Number(value);
|
|
14
|
+
if (!Number.isInteger(dimensions) || dimensions < 1) {
|
|
15
|
+
throw new Error("--dimensions must be a positive integer.");
|
|
16
|
+
}
|
|
17
|
+
return dimensions;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const dimensions = parseDimensions(readOption("--dimensions"));
|
|
21
|
+
const out = readOption("--out");
|
|
22
|
+
const dir = dirname(fileURLToPath(import.meta.url));
|
|
23
|
+
const template = await readFile(
|
|
24
|
+
resolve(dir, "0000_initial.sql.template"),
|
|
25
|
+
"utf8",
|
|
26
|
+
);
|
|
27
|
+
const rendered = template.replaceAll(
|
|
28
|
+
"{{EMBEDDING_DIMENSIONS}}",
|
|
29
|
+
String(dimensions),
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
if (out) {
|
|
33
|
+
await writeFile(resolve(process.cwd(), out), rendered);
|
|
34
|
+
} else {
|
|
35
|
+
process.stdout.write(rendered);
|
|
36
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mnemocyte",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "Persistent memory for TypeScript AI apps.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"sideEffects": false,
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@biomejs/biome": "2.4.15",
|
|
60
|
-
"@types/node": "^
|
|
60
|
+
"@types/node": "^22.18.0",
|
|
61
61
|
"drizzle-kit": "^0.31.10",
|
|
62
62
|
"tsdown": "^0.22.0",
|
|
63
63
|
"typescript": "^6.0.3",
|
|
@@ -82,8 +82,10 @@
|
|
|
82
82
|
"test:context": "vitest run --project unit test/context/builder.test.ts",
|
|
83
83
|
"test:integration": "vitest run --project integration",
|
|
84
84
|
"bench:retrieval": "vitest bench --project unit test/benchmarks/retrieval.bench.ts",
|
|
85
|
-
"lint": "biome
|
|
85
|
+
"lint": "biome check --error-on-warnings .",
|
|
86
|
+
"lint:fix": "biome check --write .",
|
|
86
87
|
"format": "biome format --write",
|
|
88
|
+
"migration:render": "node migrations/render-initial.mjs",
|
|
87
89
|
"db:generate": "drizzle-kit generate",
|
|
88
90
|
"db:migrate": "drizzle-kit migrate",
|
|
89
91
|
"pack:check": "pnpm pack --dry-run"
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types-QK_43oKJ.d.mts","names":[],"sources":["../src/types.ts"],"mappings":";;AAYA;;;;AAAsB;AActB;;;;AAA2B;AAW3B;KAzBY,UAAA;;;AAyBa;AAQzB;;;KAnBY,eAAA;AAmBgB;AAM5B;;;;AAA8B;AAoB9B;;;AA1B4B,KARhB,aAAA;AAkCyB;AAQrC;;;;;AARqC,KA1BzB,gBAAA;;;;;KAMA,kBAAA;;;;;;;KAoBA,yBAAA;;;;;;AA0BN;UAlBW,oBAAA;EA2BmB;EAzBnC,SAAA,EAAW,kBAAA;EA+B8C;EA7BzD,KAAA,EAAO,yBAAA;EA6BW;EA3BlB,OAAA,EAAS,gBAAA;EA2ByC;EAzBlD,SAAA,EAAW,IAAA;EAyB8C;EAvBzD,UAAA;EAkCwC;EAhCxC,QAAA;EAgCwC;EA9BxC,QAAA;EAyCA;EAvCA,KAAA;EA2CA;EAzCA,KAAA;AAAA;;;AAkD8C;AAM/C;;;UA/CiB,mBAAA;EAgEJ;;;;;EA1DZ,OAAA,IAAW,KAAA,EAAO,oBAAA,YAAgC,OAAO;AAAA;;;;;;;;;UAWzC,wBAAA;EAuDhB;;;;;EAjDA,S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