@hasna/mementos 0.14.82 → 0.14.84
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/Dockerfile.package +0 -1
- package/README.md +13 -10
- package/dashboard/bun.lock +519 -0
- package/dist/cli/commands/storage.d.ts.map +1 -1
- package/dist/cli/index.js +3459 -1447
- package/dist/db/api-mode.d.ts +5 -1
- package/dist/db/api-mode.d.ts.map +1 -1
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/store-backend.d.ts +3 -3
- package/dist/db/store-backend.d.ts.map +1 -1
- package/dist/generated/storage-kit/backend.d.ts +20 -0
- package/dist/generated/storage-kit/backend.d.ts.map +1 -0
- package/dist/generated/storage-kit/index.d.ts +2 -2
- package/dist/generated/storage-kit/index.d.ts.map +1 -1
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/generated/storage-kit/own.d.ts +11 -0
- package/dist/generated/storage-kit/own.d.ts.map +1 -0
- package/dist/generated/storage-kit/pool.d.ts +7 -6
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/generated/storage-kit/tls.d.ts +30 -3
- package/dist/generated/storage-kit/tls.d.ts.map +1 -1
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3450 -1424
- package/dist/lib/retired-storage-mode.d.ts +11 -0
- package/dist/lib/retired-storage-mode.d.ts.map +1 -0
- package/dist/lib/storage-sync.d.ts +2 -2
- package/dist/lib/storage-sync.d.ts.map +1 -1
- package/dist/mcp/index.js +3416 -1423
- package/dist/mcp/tools/project-tools.d.ts.map +1 -1
- package/dist/project-registration/project-resources.d.ts.map +1 -1
- package/dist/project-registration.js +182 -132
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +24 -1
- package/dist/server/index.js +3390 -1379
- package/dist/storage.d.ts +18 -50
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +151 -122
- package/dist/test-support/store-isolation.d.ts +5 -0
- package/dist/test-support/store-isolation.d.ts.map +1 -1
- package/docker-entrypoint.sh +4 -5
- package/hasna.contract.json +2 -2
- package/package.json +5 -5
- package/dist/generated/storage-kit/mode.d.ts +0 -48
- package/dist/generated/storage-kit/mode.d.ts.map +0 -1
package/hasna.contract.json
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
"name": "mementos",
|
|
5
5
|
"class": "cli-with-store",
|
|
6
6
|
"contractVersion": "v1",
|
|
7
|
-
"kitVersion": "0.
|
|
8
|
-
"description": "Universal memory system for AI agents — CLI, MCP server, REST API, and TypeScript SDK over one SQLite or PostgreSQL store.",
|
|
7
|
+
"kitVersion": "0.10.6",
|
|
8
|
+
"description": "Universal memory system for AI agents — CLI, MCP server, REST API, and TypeScript SDK over one SQLite or PostgreSQL store. Clients use local SQLite or the HTTP API selected by HASNA_MEMENTOS_API_URL; mementos-serve reads PostgreSQL selected by HASNA_MEMENTOS_DATABASE_URL. The data backend is the only runtime switch.",
|
|
9
9
|
"bins": [
|
|
10
10
|
"mementos",
|
|
11
11
|
"mementos-mcp",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hasna/mementos",
|
|
3
|
-
"version": "0.14.
|
|
3
|
+
"version": "0.14.84",
|
|
4
4
|
"description": "Universal memory system for AI agents - CLI + MCP server + library API",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -88,8 +88,8 @@
|
|
|
88
88
|
"@ai-sdk/anthropic": "^3.0.82",
|
|
89
89
|
"@ai-sdk/openai": "^3.0.69",
|
|
90
90
|
"@ai-sdk/openai-compatible": "^2.0.48",
|
|
91
|
-
"@hasna/contracts": "0.
|
|
92
|
-
"@hasna/events": "
|
|
91
|
+
"@hasna/contracts": "0.10.6",
|
|
92
|
+
"@hasna/events": "0.1.6",
|
|
93
93
|
"@modelcontextprotocol/sdk": "^1.12.1",
|
|
94
94
|
"ai": "^6.0.199",
|
|
95
95
|
"chalk": "^5.4.1",
|
|
@@ -103,10 +103,10 @@
|
|
|
103
103
|
},
|
|
104
104
|
"devDependencies": {
|
|
105
105
|
"@types/bun": "^1.2.4",
|
|
106
|
+
"bun-types": "1.3.14",
|
|
106
107
|
"@types/pg": "^8.11.11",
|
|
107
108
|
"@types/react": "^18.3.18",
|
|
108
109
|
"sigstore": "5.0.0",
|
|
109
110
|
"typescript": "^5.7.3"
|
|
110
|
-
}
|
|
111
|
-
"gitHead": "0fc7a149302a080b19b7d78ac587fa035f0d58c7"
|
|
111
|
+
}
|
|
112
112
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
export declare const STORAGE_MODES: readonly ["local", "cloud"];
|
|
2
|
-
export type StorageMode = (typeof STORAGE_MODES)[number];
|
|
3
|
-
export declare const DEPRECATED_STORAGE_MODE_ALIASES: readonly ["remote", "hybrid", "self_hosted"];
|
|
4
|
-
export type Env = Record<string, string | undefined>;
|
|
5
|
-
export interface StorageModeNormalization {
|
|
6
|
-
mode: StorageMode;
|
|
7
|
-
/** The deprecated alias that was normalized to `cloud`, if any. */
|
|
8
|
-
deprecatedAlias: string | null;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Normalize a raw storage-mode string to the `local | cloud` runtime enum.
|
|
12
|
-
* Accepts deprecated aliases (`remote`, `hybrid`, `self_hosted`) and maps them
|
|
13
|
-
* to `cloud`. Throws on any other value.
|
|
14
|
-
*/
|
|
15
|
-
export declare function normalizeStorageMode(value: string): StorageModeNormalization;
|
|
16
|
-
/** Upper-snake env token for an app name, e.g. `todos` -> `TODOS`. */
|
|
17
|
-
export declare function envToken(name: string): string;
|
|
18
|
-
export interface StorageEnvKeys {
|
|
19
|
-
/** `HASNA_<NAME>_STORAGE_MODE` then the optional `<NAME>_STORAGE_MODE` alias. */
|
|
20
|
-
modeKeys: string[];
|
|
21
|
-
/** `HASNA_<NAME>_DATABASE_URL` then the optional `<NAME>_DATABASE_URL` alias. */
|
|
22
|
-
databaseUrlKeys: string[];
|
|
23
|
-
}
|
|
24
|
-
/** Resolve the canonical env-key spec for an app's storage config. */
|
|
25
|
-
export declare function storageEnvKeys(name: string): StorageEnvKeys;
|
|
26
|
-
export interface StorageModeResolution {
|
|
27
|
-
mode: StorageMode;
|
|
28
|
-
/** Env key the mode came from, or `"default"`. */
|
|
29
|
-
source: string;
|
|
30
|
-
deprecatedAlias: string | null;
|
|
31
|
-
databaseUrlPresent: boolean;
|
|
32
|
-
/** Env key the database URL came from, or `null`. */
|
|
33
|
-
databaseUrlSource: string | null;
|
|
34
|
-
warning: string | null;
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Resolve an app's storage mode from the environment per the contract env spec.
|
|
38
|
-
* Precedence: `HASNA_<NAME>_STORAGE_MODE`, then `<NAME>_STORAGE_MODE`, else
|
|
39
|
-
* `local`. Never reads secret values — only detects DATABASE_URL presence.
|
|
40
|
-
*/
|
|
41
|
-
export declare function resolveStorageMode(name: string, env?: Env): StorageModeResolution;
|
|
42
|
-
/**
|
|
43
|
-
* Resolve the database URL value for an app, honoring the canonical then alias
|
|
44
|
-
* env keys. Returns `null` when unset. The caller is responsible for never
|
|
45
|
-
* logging the returned value.
|
|
46
|
-
*/
|
|
47
|
-
export declare function resolveDatabaseUrl(name: string, env?: Env): string | null;
|
|
48
|
-
//# sourceMappingURL=mode.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"mode.d.ts","sourceRoot":"","sources":["../../../src/generated/storage-kit/mode.ts"],"names":[],"mappings":"AAiBA,eAAO,MAAM,aAAa,6BAA8B,CAAC;AACzD,MAAM,MAAM,WAAW,GAAG,CAAC,OAAO,aAAa,CAAC,CAAC,MAAM,CAAC,CAAC;AAEzD,eAAO,MAAM,+BAA+B,8CAIlC,CAAC;AAEX,MAAM,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;AAErD,MAAM,WAAW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