@camadb/memory 0.0.0-alpha-20260831221150

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 ADDED
@@ -0,0 +1,3 @@
1
+ # @camadb/memory
2
+
3
+ Runtime-neutral contracts for AI memory, retrieval, and embedding provenance. Implementations depend on `@camadb/core`; core never depends on memory or an embedding provider.
@@ -0,0 +1,24 @@
1
+ export interface EmbeddingProvenance {
2
+ provider: string;
3
+ model: string;
4
+ dimensions: number;
5
+ createdAt: string;
6
+ revision?: string;
7
+ }
8
+ export interface MemoryRecord<Metadata extends Record<string, unknown> = Record<string, unknown>> {
9
+ id: string;
10
+ content: string;
11
+ embedding?: readonly number[];
12
+ embeddingProvenance?: EmbeddingProvenance;
13
+ metadata?: Metadata;
14
+ }
15
+ export interface RetrievalResult<Metadata extends Record<string, unknown> = Record<string, unknown>> {
16
+ memory: MemoryRecord<Metadata>;
17
+ score: number;
18
+ }
19
+ export interface MemoryStore<Metadata extends Record<string, unknown> = Record<string, unknown>> {
20
+ remember(memory: MemoryRecord<Metadata>): Promise<void>;
21
+ forget(id: string): Promise<void>;
22
+ retrieve(query: string, limit?: number): Promise<readonly RetrievalResult<Metadata>[]>;
23
+ }
24
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,MAAM,WAAW,YAAY,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC9F,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;IAC9B,mBAAmB,CAAC,EAAE,mBAAmB,CAAC;IAC1C,QAAQ,CAAC,EAAE,QAAQ,CAAC;CACrB;AAED,MAAM,WAAW,eAAe,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IACjG,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,CAAC;IAC/B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW,CAAC,QAAQ,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;IAC7F,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC,QAAQ,CAAC,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACxD,MAAM,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAClC,QAAQ,CAAC,KAAK,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,eAAe,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC;CACxF"}
package/dist/index.js ADDED
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":""}
package/package.json ADDED
@@ -0,0 +1,33 @@
1
+ {
2
+ "name": "@camadb/memory",
3
+ "version": "0.0.0-alpha-20260831221150",
4
+ "description": "AI memory, retrieval, and embedding provenance contracts for CamaDB",
5
+ "license": "MIT",
6
+ "main": "dist/index.js",
7
+ "types": "dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "require": "./dist/index.js",
12
+ "default": "./dist/index.js"
13
+ }
14
+ },
15
+ "files": [
16
+ "dist",
17
+ "README.md"
18
+ ],
19
+ "scripts": {
20
+ "build": "tsc --build",
21
+ "typecheck": "tsc --build --pretty false",
22
+ "test": "jest --config ../../jest.config.js packages/memory/src --runInBand"
23
+ },
24
+ "dependencies": {
25
+ "@camadb/core": "0.0.0-alpha-20260831221150"
26
+ },
27
+ "engines": {
28
+ "node": ">=18"
29
+ },
30
+ "publishConfig": {
31
+ "access": "public"
32
+ }
33
+ }