mnemocyte 0.1.2 → 0.1.4

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.
@@ -0,0 +1 @@
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,SAAA;EAkEgB;;;;EA7DhB,OAAA;EAgFgB;EA9EhB,WAAA;;EAEA,UAAA;EA8ES;;;;;;;;EArET,WAAA,IAAe,KAAA,WAAgB,OAAA;AAAA;AA8FhC;;;AAAA,UAxFiB,eAAA;EAkGJ;;;;;EA5FZ,WAAA;EA2HW;EAzHX,QAAA,EAAU,QAAA;EAyHK;EAvHf,QAAA;IAkFA,0DAhFC,KAAA,WAoFD;IAlFC,QAAA;EAAA;EAoFW;EAjFZ,SAAA,GAAY,eAAA;EAqFZ;EAnFA,aAAA,GAAgB,mBAAA;EAqFN;;;;;EA/EV,QA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IAAS,OAAA;AAAA;;;;;;;UASO,2BAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EA+BhB,WAAA,CAAY,KAAA,EAAO,gBAAA,GAAmB,OAAA,CAAQ,iBAAA;AAAA"}
@@ -1,46 +1,35 @@
1
- CREATE EXTENSION IF NOT EXISTS vector;
2
-
3
- CREATE TABLE IF NOT EXISTS mnemocyte_memories (
4
- id text PRIMARY KEY,
5
- entity_id text NOT NULL,
6
- content text NOT NULL,
7
- type text NOT NULL DEFAULT 'fact',
8
- importance text NOT NULL DEFAULT 'normal',
9
- tags text[] NOT NULL DEFAULT '{}',
10
- source text,
11
- metadata jsonb NOT NULL DEFAULT '{}',
12
- confidence real NOT NULL DEFAULT 1.0,
13
- embedding vector(1536),
14
- embedding_model text NOT NULL,
15
- embedding_dimensions integer NOT NULL,
16
- superseded_by text REFERENCES mnemocyte_memories(id),
17
- superseded_at timestamptz,
18
- expires_at timestamptz,
19
- last_accessed_at timestamptz,
20
- access_count integer NOT NULL DEFAULT 0,
21
- created_at timestamptz NOT NULL DEFAULT now(),
22
- updated_at timestamptz NOT NULL DEFAULT now()
1
+ CREATE TABLE "mnemocyte_events" (
2
+ "id" text PRIMARY KEY NOT NULL,
3
+ "entity_id" text NOT NULL,
4
+ "description" text NOT NULL,
5
+ "metadata" jsonb DEFAULT '{}'::jsonb NOT NULL,
6
+ "timestamp" timestamp with time zone DEFAULT now() NOT NULL
23
7
  );
24
-
25
- CREATE TABLE IF NOT EXISTS mnemocyte_events (
26
- id text PRIMARY KEY,
27
- entity_id text NOT NULL,
28
- description text NOT NULL,
29
- metadata jsonb NOT NULL DEFAULT '{}',
30
- timestamp timestamptz NOT NULL DEFAULT now()
8
+ --> statement-breakpoint
9
+ CREATE TABLE "mnemocyte_memories" (
10
+ "id" text PRIMARY KEY NOT NULL,
11
+ "entity_id" text NOT NULL,
12
+ "content" text NOT NULL,
13
+ "type" text DEFAULT 'fact' NOT NULL,
14
+ "importance" text DEFAULT 'normal' NOT NULL,
15
+ "tags" text[] DEFAULT '{}'::text[] NOT NULL,
16
+ "source" text,
17
+ "metadata" jsonb DEFAULT '{}'::jsonb NOT NULL,
18
+ "confidence" real DEFAULT 1 NOT NULL,
19
+ "embedding" vector(1536),
20
+ "embedding_model" text NOT NULL,
21
+ "embedding_dimensions" integer NOT NULL,
22
+ "superseded_by" text,
23
+ "superseded_at" timestamp with time zone,
24
+ "expires_at" timestamp with time zone,
25
+ "last_accessed_at" timestamp with time zone,
26
+ "access_count" integer DEFAULT 0 NOT NULL,
27
+ "created_at" timestamp with time zone DEFAULT now() NOT NULL,
28
+ "updated_at" timestamp with time zone DEFAULT now() NOT NULL
31
29
  );
32
-
33
- CREATE INDEX IF NOT EXISTS mnemocyte_memories_entity_idx
34
- ON mnemocyte_memories (entity_id);
35
-
36
- CREATE INDEX IF NOT EXISTS mnemocyte_memories_entity_type_idx
37
- ON mnemocyte_memories (entity_id, type);
38
-
39
- CREATE INDEX IF NOT EXISTS mnemocyte_events_entity_time_idx
40
- ON mnemocyte_events (entity_id, timestamp DESC);
41
-
42
- CREATE INDEX IF NOT EXISTS mnemocyte_memories_fts_idx
43
- ON mnemocyte_memories USING gin (to_tsvector('english', content));
44
-
45
- CREATE INDEX IF NOT EXISTS mnemocyte_memories_embedding_hnsw_idx
46
- ON mnemocyte_memories USING hnsw (embedding vector_cosine_ops);
30
+ --> statement-breakpoint
31
+ 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
32
+ CREATE INDEX "mnemocyte_events_entity_time_idx" ON "mnemocyte_events" USING btree ("entity_id","timestamp");--> statement-breakpoint
33
+ CREATE INDEX "mnemocyte_memories_entity_idx" ON "mnemocyte_memories" USING btree ("entity_id");--> statement-breakpoint
34
+ CREATE INDEX "mnemocyte_memories_entity_type_idx" ON "mnemocyte_memories" USING btree ("entity_id","type");--> statement-breakpoint
35
+ CREATE INDEX "mnemocyte_memories_embedding_hnsw_idx" ON "mnemocyte_memories" USING hnsw ("embedding" vector_cosine_ops);
@@ -0,0 +1,284 @@
1
+ {
2
+ "id": "feeb327d-c000-40d3-9c3c-3eb82b2e2e81",
3
+ "prevId": "00000000-0000-0000-0000-000000000000",
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
+ },
273
+ "enums": {},
274
+ "schemas": {},
275
+ "sequences": {},
276
+ "roles": {},
277
+ "policies": {},
278
+ "views": {},
279
+ "_meta": {
280
+ "columns": {},
281
+ "schemas": {},
282
+ "tables": {}
283
+ }
284
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ "version": "7",
3
+ "dialect": "postgresql",
4
+ "entries": [
5
+ {
6
+ "idx": 0,
7
+ "version": "7",
8
+ "when": 1779280110397,
9
+ "tag": "0000_initial",
10
+ "breakpoints": true
11
+ }
12
+ ]
13
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mnemocyte",
3
- "version": "0.1.2",
3
+ "version": "0.1.4",
4
4
  "description": "Persistent memory for TypeScript AI apps.",
5
5
  "type": "module",
6
6
  "sideEffects": false,
@@ -12,6 +12,10 @@
12
12
  ".": {
13
13
  "types": "./dist/index.d.mts",
14
14
  "import": "./dist/index.mjs"
15
+ },
16
+ "./embedders/openai": {
17
+ "types": "./dist/embedders/openai.d.mts",
18
+ "import": "./dist/embedders/openai.mjs"
15
19
  }
16
20
  },
17
21
  "types": "./dist/index.d.mts",
@@ -51,24 +55,28 @@
51
55
  "@types/node": "^25.9.0",
52
56
  "drizzle-kit": "^0.31.10",
53
57
  "tsdown": "^0.22.0",
54
- "typescript": "^6.0.3"
58
+ "typescript": "^6.0.3",
59
+ "vitest": "4.1.6"
55
60
  },
56
61
  "scripts": {
57
- "build": "tsdown src/index.ts",
58
- "dev": "tsdown src/index.ts --watch",
59
- "checktypes": "tsc --noEmit",
60
- "test:exports": "tsdown src/index.ts && node test/package/exports.test.mjs && tsc -p test/package/tsconfig.json",
61
- "test:observability": "tsdown src/index.ts && node test/observability/hooks.test.mjs",
62
- "test:resilience": "tsdown src/index.ts && node test/resilience/resilience.test.mjs",
63
- "test:prune": "tsdown src/index.ts && node test/prune/prune.test.mjs",
64
- "test:lifecycle": "tsdown src/index.ts && node test/lifecycle/close.test.mjs",
65
- "test:dedup": "tsdown src/index.ts && node test/dedup/find-duplicates.test.mjs",
66
- "test:audit": "tsdown src/index.ts && node test/audit/audit-log.test.mjs",
67
- "test:consolidate": "tsdown src/index.ts && node test/consolidate/consolidate.test.mjs",
68
- "test:retrieval": "tsdown src/index.ts && node test/retrieval/quality.test.mjs",
69
- "test:context": "tsdown src/index.ts && node test/context/builder.test.mjs",
70
- "test:integration": "tsdown src/index.ts && node test/integration/postgres.test.mjs",
71
- "bench:retrieval": "tsdown src/index.ts && node test/benchmarks/retrieval.bench.mjs",
62
+ "build": "tsdown src/index.ts src/embedders/openai.ts",
63
+ "dev": "tsdown src/index.ts src/embedders/openai.ts --watch",
64
+ "checktypes": "tsc --noEmit && tsc --noEmit --project tsconfig.test.json",
65
+ "test": "pnpm run test:ci",
66
+ "test:ci": "pnpm build && vitest run --typecheck --project unit --project package",
67
+ "test:unit": "vitest run --project unit",
68
+ "test:exports": "pnpm build && vitest run --typecheck --project package",
69
+ "test:observability": "vitest run --project unit test/observability/hooks.test.ts",
70
+ "test:resilience": "vitest run --project unit test/resilience/resilience.test.ts",
71
+ "test:prune": "vitest run --project unit test/prune/prune.test.ts",
72
+ "test:lifecycle": "vitest run --project unit test/lifecycle/close.test.ts",
73
+ "test:dedup": "vitest run --project unit test/dedup/find-duplicates.test.ts",
74
+ "test:audit": "vitest run --project unit test/audit/audit-log.test.ts",
75
+ "test:consolidate": "vitest run --project unit test/consolidate/consolidate.test.ts",
76
+ "test:retrieval": "vitest run --project unit test/retrieval/quality.test.ts",
77
+ "test:context": "vitest run --project unit test/context/builder.test.ts",
78
+ "test:integration": "vitest run --project integration",
79
+ "bench:retrieval": "vitest bench --project unit test/benchmarks/retrieval.bench.ts",
72
80
  "lint": "biome lint --write",
73
81
  "format": "biome format --write",
74
82
  "db:generate": "drizzle-kit generate",