@hasna/mementos 0.14.88 → 0.16.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 +119 -30
- package/bun.lock +4 -65
- package/dist/audit-contract.d.ts +87 -0
- package/dist/audit-contract.d.ts.map +1 -0
- package/dist/cli/commands/info-context.d.ts.map +1 -1
- package/dist/cli/commands/info-history.d.ts.map +1 -1
- package/dist/cli/commands/info-stale.d.ts.map +1 -1
- package/dist/cli/commands/io-backup.d.ts.map +1 -1
- package/dist/cli/commands/io-export.d.ts.map +1 -1
- package/dist/cli/commands/io-restore.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-chain.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-list.d.ts +25 -0
- package/dist/cli/commands/memory-cmd-list.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-recall.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-search.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-tail.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-view.d.ts.map +1 -1
- package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +1 -1
- package/dist/cli/commands/project.d.ts.map +1 -1
- package/dist/cli/commands/storage.d.ts.map +1 -1
- package/dist/cli/commands/system-doctor.d.ts.map +1 -1
- package/dist/cli/commands/system-session.d.ts.map +1 -1
- package/dist/cli/commands/system-status.d.ts +43 -0
- package/dist/cli/commands/system-status.d.ts.map +1 -0
- package/dist/cli/commands/system-synthesized-profile.d.ts.map +1 -1
- package/dist/cli/commands/system.d.ts.map +1 -1
- package/dist/cli/helpers.d.ts.map +1 -1
- package/dist/cli/index.js +4964 -2168
- package/dist/cli/register-all.d.ts +1 -1
- package/dist/cli/register-all.d.ts.map +1 -1
- package/dist/db/api-mode.d.ts +145 -37
- package/dist/db/api-mode.d.ts.map +1 -1
- package/dist/db/api-response-contract.d.ts +23 -0
- package/dist/db/api-response-contract.d.ts.map +1 -0
- package/dist/db/audit.d.ts +34 -45
- package/dist/db/audit.d.ts.map +1 -1
- package/dist/db/database.d.ts +1 -0
- package/dist/db/database.d.ts.map +1 -1
- package/dist/db/locks.d.ts.map +1 -1
- package/dist/db/machines.d.ts +50 -13
- package/dist/db/machines.d.ts.map +1 -1
- package/dist/db/memories.d.ts.map +1 -1
- package/dist/db/migrations.d.ts.map +1 -1
- package/dist/db/pg-migrate.d.ts.map +1 -1
- package/dist/db/pg-migrations.d.ts.map +1 -1
- package/dist/db/session-jobs.d.ts +2 -0
- package/dist/db/session-jobs.d.ts.map +1 -1
- package/dist/db/store-backend.d.ts +8 -2
- package/dist/db/store-backend.d.ts.map +1 -1
- package/dist/diagnostics/historical-project-registration-receipt.js +299 -50
- package/dist/generated/storage-kit/backend.d.ts +12 -2
- package/dist/generated/storage-kit/backend.d.ts.map +1 -1
- package/dist/generated/storage-kit/index.d.ts +1 -1
- package/dist/generated/storage-kit/index.d.ts.map +1 -1
- package/dist/generated/storage-kit/migrations.d.ts +21 -0
- package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
- package/dist/generated/storage-kit/pool.d.ts +2 -5
- package/dist/generated/storage-kit/pool.d.ts.map +1 -1
- package/dist/generated/storage-kit/query.d.ts +1 -1
- package/dist/generated/storage-kit/query.d.ts.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4328 -1485
- package/dist/lib/built-in-hooks.d.ts.map +1 -1
- package/dist/lib/config.d.ts.map +1 -1
- package/dist/lib/env.d.ts +10 -0
- package/dist/lib/env.d.ts.map +1 -0
- package/dist/lib/gatherer.d.ts.map +1 -1
- package/dist/lib/injection-project.d.ts +10 -0
- package/dist/lib/injection-project.d.ts.map +1 -0
- package/dist/lib/injector.d.ts +1 -0
- package/dist/lib/injector.d.ts.map +1 -1
- package/dist/lib/local-opt-in.d.ts +114 -0
- package/dist/lib/local-opt-in.d.ts.map +1 -0
- package/dist/lib/machine-visibility.d.ts.map +1 -1
- package/dist/lib/memory-lock.d.ts.map +1 -1
- package/dist/lib/paths.d.ts +9 -0
- package/dist/lib/paths.d.ts.map +1 -1
- package/dist/lib/profile-synthesizer.d.ts +13 -2
- package/dist/lib/profile-synthesizer.d.ts.map +1 -1
- package/dist/lib/redact.d.ts +70 -10
- package/dist/lib/redact.d.ts.map +1 -1
- package/dist/lib/reflection.d.ts.map +1 -1
- package/dist/lib/session-queue.d.ts.map +1 -1
- package/dist/lib/session-registry.d.ts +38 -1
- package/dist/lib/session-registry.d.ts.map +1 -1
- package/dist/lib/storage-sync.d.ts +5 -0
- package/dist/lib/storage-sync.d.ts.map +1 -1
- package/dist/lib/synthesis/index.d.ts.map +1 -1
- package/dist/mcp/index.d.ts +1 -1
- package/dist/mcp/index.d.ts.map +1 -1
- package/dist/mcp/index.js +6215 -2598
- package/dist/mcp/profile.d.ts +23 -0
- package/dist/mcp/profile.d.ts.map +1 -0
- package/dist/mcp/tools/lock-tools.d.ts.map +1 -1
- package/dist/mcp/tools/memory-audit.d.ts +1 -1
- package/dist/mcp/tools/memory-audit.d.ts.map +1 -1
- package/dist/mcp/tools/memory-crud.d.ts.map +1 -1
- package/dist/mcp/tools/memory-inject.d.ts.map +1 -1
- package/dist/mcp/tools/project-tools.d.ts.map +1 -1
- package/dist/mcp/tools/session-tools.d.ts.map +1 -1
- package/dist/mcp/tools/tool-registry.d.ts +22 -19
- package/dist/mcp/tools/tool-registry.d.ts.map +1 -1
- package/dist/mcp/tools/utility-tools.d.ts +2 -1
- package/dist/mcp/tools/utility-tools.d.ts.map +1 -1
- package/dist/project-registration.js +549 -205
- package/dist/sdk/index.d.ts +282 -14
- package/dist/sdk/index.d.ts.map +1 -1
- package/dist/sdk/index.js +1691 -35
- package/dist/server/auth.d.ts +2 -0
- package/dist/server/auth.d.ts.map +1 -1
- package/dist/server/helpers.d.ts +21 -7
- package/dist/server/helpers.d.ts.map +1 -1
- package/dist/server/index.d.ts +2 -0
- package/dist/server/index.d.ts.map +1 -1
- package/dist/server/index.js +6040 -2475
- package/dist/server/openapi.d.ts.map +1 -1
- package/dist/server/routes/audit.d.ts +2 -0
- package/dist/server/routes/audit.d.ts.map +1 -0
- package/dist/server/routes/machines.d.ts +2 -0
- package/dist/server/routes/machines.d.ts.map +1 -0
- package/dist/server/routes/system-sessions.d.ts.map +1 -1
- package/dist/server/routes/system-synthesis.d.ts.map +1 -1
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +78 -129
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.d.ts.map +1 -1
- package/docker-entrypoint.sh +7 -0
- package/hasna.contract.json +19 -7
- package/package.json +12 -11
- package/postinstall.mjs +52 -1
- package/dashboard/bun.lock +0 -519
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +0 -2
- package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +0 -1
- package/dist/cli/__fixtures__/io-restore-stub-server.d.ts +0 -2
- package/dist/cli/__fixtures__/io-restore-stub-server.d.ts.map +0 -1
- package/dist/cli/brains.d.ts +0 -3
- package/dist/cli/brains.d.ts.map +0 -1
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +0 -2
- package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +0 -1
- package/dist/db/__fixtures__/list-filter-capture-server.d.ts +0 -2
- package/dist/db/__fixtures__/list-filter-capture-server.d.ts.map +0 -1
- package/dist/db/__fixtures__/list-filter-client-runner.d.ts +0 -2
- package/dist/db/__fixtures__/list-filter-client-runner.d.ts.map +0 -1
- package/dist/lib/retired-storage-mode.d.ts +0 -11
- package/dist/lib/retired-storage-mode.d.ts.map +0 -1
- package/dist/test-support/memories-page-stub-server.d.ts +0 -2
- package/dist/test-support/memories-page-stub-server.d.ts.map +0 -1
- package/dist/test-support/memories-page-stub.d.ts +0 -28
- package/dist/test-support/memories-page-stub.d.ts.map +0 -1
- package/dist/test-support/pg-sync-stub-worker.d.ts +0 -2
- package/dist/test-support/pg-sync-stub-worker.d.ts.map +0 -1
- package/dist/test-support/preload-local-store.d.ts +0 -2
- package/dist/test-support/preload-local-store.d.ts.map +0 -1
- package/dist/test-support/project-authority-identity.d.ts +0 -8
- package/dist/test-support/project-authority-identity.d.ts.map +0 -1
- package/dist/test-support/store-isolation.d.ts +0 -108
- package/dist/test-support/store-isolation.d.ts.map +0 -1
- package/dist/test-support/strip-ansi.d.ts +0 -3
- package/dist/test-support/strip-ansi.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"built-in-hooks.d.ts","sourceRoot":"","sources":["../../src/lib/built-in-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"built-in-hooks.d.ts","sourceRoot":"","sources":["../../src/lib/built-in-hooks.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAQH,OAAO,KAAK,EAAE,2BAA2B,EAAE,MAAM,wBAAwB,CAAC;AAC1E,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,mBAAmB,CAAC;AA2PlD,wBAAsB,kBAAkB,IAAI,OAAO,CAAC,IAAI,CAAC,CAqCxD;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,kBAAkB,CAChC,SAAS,EAAE,MAAM,EACjB,GAAG,EAAE,MAAM,EACX,IAAI,CAAC,EAAE,2BAA2B,IAEpB,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAG,OAAO,CAAC,IAAI,CAAC,CAc/D;AAGD,wBAAsB,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAGpD;AAGD,YAAY,EAAE,QAAQ,EAAE,CAAC"}
|
package/dist/lib/config.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/lib/config.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAA+B,MAAM,UAAU,CAAC;AAiB5E,eAAO,MAAM,cAAc,EAAE,cA4B5B,CAAC;AA4DF,wBAAgB,UAAU,IAAI,cAAc,CAwC3C;AA2FD,wBAAgB,gBAAgB,IAAI,MAAM,GAAG,IAAI,CAMhD;AAED,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAQ1D;AAED,wBAAgB,YAAY,IAAI,MAAM,EAAE,CAOvC;AAED,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAOnD;AAED,wBAAgB,SAAS,IAAI,MAAM,CAuDlC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare const env: {
|
|
2
|
+
readonly apiKey: () => string | undefined;
|
|
3
|
+
readonly defaultScope: () => string | undefined;
|
|
4
|
+
readonly defaultCategory: () => string | undefined;
|
|
5
|
+
readonly defaultImportance: () => string | undefined;
|
|
6
|
+
readonly pgsyncQueryTimeoutMs: () => string | undefined;
|
|
7
|
+
readonly reflectProvider: () => string | undefined;
|
|
8
|
+
readonly reflectModel: () => string | undefined;
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=env.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"env.d.ts","sourceRoot":"","sources":["../../src/lib/env.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,GAAG;2BACF,MAAM,GAAG,SAAS;iCACZ,MAAM,GAAG,SAAS;oCAEf,MAAM,GAAG,SAAS;sCAEhB,MAAM,GAAG,SAAS;yCAEf,MAAM,GAAG,SAAS;oCAEvB,MAAM,GAAG,SAAS;iCAErB,MAAM,GAAG,SAAS;CAE5B,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"gatherer.d.ts","sourceRoot":"","sources":["../../src/lib/gatherer.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"gatherer.d.ts","sourceRoot":"","sources":["../../src/lib/gatherer.ts"],"names":[],"mappings":"AAOA,KAAK,oBAAoB,GAAG,CAAC,OAAO,CAAC,EAAE;IACrC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,IAAI,CAAC;CACd,KAAK,OAAO,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,KAAK,CAAC;QACd,QAAQ,EAAE,KAAK,CAAC;YAAE,IAAI,EAAE,QAAQ,GAAG,MAAM,GAAG,WAAW,CAAC;YAAC,OAAO,EAAE,MAAM,CAAA;SAAE,CAAC,CAAC;KAC7E,CAAC,CAAC;IACH,KAAK,EAAE,MAAM,CAAC;CACf,CAAC,CAAC;AAyEH,eAAO,MAAM,kBAAkB,EAAE,oBAkDhC,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { SqliteAdapter as Database } from "../storage.js";
|
|
2
|
+
/**
|
|
3
|
+
* Resolve one optional injection project reference to its stable project id.
|
|
4
|
+
*
|
|
5
|
+
* Project names and registered paths remain accepted for compatibility, but no
|
|
6
|
+
* downstream selector should receive the alias: memory, profile, search and
|
|
7
|
+
* hook paths all operate on the stable id returned here.
|
|
8
|
+
*/
|
|
9
|
+
export declare function resolveInjectionProjectId(projectRef: string | undefined, db?: Database): string | undefined;
|
|
10
|
+
//# sourceMappingURL=injection-project.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"injection-project.d.ts","sourceRoot":"","sources":["../../src/lib/injection-project.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG/D;;;;;;GAMG;AACH,wBAAgB,yBAAyB,CACvC,UAAU,EAAE,MAAM,GAAG,SAAS,EAC9B,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,GAAG,SAAS,CAKpB"}
|
package/dist/lib/injector.d.ts
CHANGED
|
@@ -56,6 +56,7 @@ export declare class MemoryInjector {
|
|
|
56
56
|
* Token-budget aware.
|
|
57
57
|
*/
|
|
58
58
|
getInjectionContext(options?: InjectionOptions): string;
|
|
59
|
+
private getInjectionContextForProject;
|
|
59
60
|
/**
|
|
60
61
|
* Async smart injection: scores memories by embedding similarity + importance + recency.
|
|
61
62
|
* Falls back to default strategy if no embeddings exist or no query is provided.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"injector.d.ts","sourceRoot":"","sources":["../../src/lib/injector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAU,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"injector.d.ts","sourceRoot":"","sources":["../../src/lib/injector.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAU,cAAc,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAC;AAkBhF,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,OAAO,GAAG,gBAAgB,CAAC;AAEvE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,UAAU,CAAC,EAAE,cAAc,EAAE,CAAC;IAC9B,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,EAAE,iBAA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IACH,UAAU,IAAI,IAAI;IAIlB;;OAEG;IACH,gBAAgB,IAAI,MAAM;CAG3B;AAqKD;;;;;;;;;;;;;;GAcG;AACH,wBAAsB,WAAW,CAAC,OAAO,EAAE,qBAAqB,GAAG,OAAO,CAAC,oBAAoB,CAAC,CA8Q/F"}
|
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import type { CredentialChainOptions } from "@hasna/contracts/client";
|
|
2
|
+
/** The deliberate unhosted opt-in flag, canonical name first. */
|
|
3
|
+
export declare const MEMENTOS_LOCAL_OPT_IN_ENV_KEYS: readonly ["HASNA_MEMENTOS_LOCAL", "MEMENTOS_LOCAL"];
|
|
4
|
+
/** The explicit local SQLite file — the narrowest signal, precedence 1. */
|
|
5
|
+
export declare const MEMENTOS_DB_PATH_ENV_KEYS: readonly ["HASNA_MEMENTOS_DB_PATH", "MEMENTOS_DB_PATH"];
|
|
6
|
+
/**
|
|
7
|
+
* The retired storage-mode variables. The resolver never reads them — they are
|
|
8
|
+
* inert since the adoption stripped the fail-loud ratchet — but test harnesses
|
|
9
|
+
* DELETE them so a fixture can never depend on a stale fragment from the host
|
|
10
|
+
* environment, and docs list them as removed.
|
|
11
|
+
*/
|
|
12
|
+
export declare const REMOVED_MEMENTOS_MODE_ENV_KEYS: readonly ["HASNA_MEMENTOS_STORAGE_MODE", "HASNA_MEMENTOS_MODE", "MEMENTOS_STORAGE_MODE", "MEMENTOS_MODE"];
|
|
13
|
+
export type MementosLocalOptInEnv = Record<string, string | undefined>;
|
|
14
|
+
/** True when the operator deliberately asked for the unhosted local store. */
|
|
15
|
+
export declare function isMementosLocalOptIn(env?: MementosLocalOptInEnv): boolean;
|
|
16
|
+
/** True when the environment pins an explicit local SQLite file. */
|
|
17
|
+
export declare function hasExplicitLocalDbPath(env?: MementosLocalOptInEnv): boolean;
|
|
18
|
+
/** Every env name that can configure a mementos authority or credential, resolver-derived. */
|
|
19
|
+
export declare function mementosAuthorityEnvKeys(): string[];
|
|
20
|
+
/**
|
|
21
|
+
* Does the ENVIRONMENT itself configure a mementos authority or credential?
|
|
22
|
+
*
|
|
23
|
+
* Deliberately narrower than "does a credential resolve": answering it must not
|
|
24
|
+
* touch the Keychain or the filesystem, because doing so would defeat the
|
|
25
|
+
* isolation the opt-in short-circuit exists to provide. It reads the env
|
|
26
|
+
* dictionary and nothing else.
|
|
27
|
+
*
|
|
28
|
+
* A DECLARED-BUT-BLANK variable counts as absent HERE — a blank has always been
|
|
29
|
+
* this package's spelling for "not configured", and helpers in the wild blank
|
|
30
|
+
* rather than delete. It is NOT absent once we do go hosted: the resolver
|
|
31
|
+
* refuses a blank loudly rather than falling through to another identity, which
|
|
32
|
+
* is the behaviour that matters at that point.
|
|
33
|
+
*/
|
|
34
|
+
export declare function hasMementosEnvAuthorityIntent(env?: MementosLocalOptInEnv): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* True when this environment should be served by the on-box SQLite store.
|
|
37
|
+
*
|
|
38
|
+
* An explicit DB path wins unconditionally (precedence 1 — the narrowest
|
|
39
|
+
* signal). The flag opt-in wins only when the environment configures no
|
|
40
|
+
* authority or credential at all, and both are answered WITHOUT the resolver,
|
|
41
|
+
* so the Keychain and the credential file are never read for a local run.
|
|
42
|
+
*/
|
|
43
|
+
export declare function selectsMementosLocalStore(env?: MementosLocalOptInEnv): boolean;
|
|
44
|
+
/**
|
|
45
|
+
* The environment as the resolver should see it: every authority/credential
|
|
46
|
+
* variable that is DECLARED BUT BLANK removed.
|
|
47
|
+
*
|
|
48
|
+
* A blank has always been this package's spelling for "not configured" — it is
|
|
49
|
+
* how fixtures scrubbed an inherited environment and how the CLI's test
|
|
50
|
+
* harnesses neutralise routing. @hasna/contracts takes the opposite and, for
|
|
51
|
+
* its purposes, correct view: a declared-but-blank credential is a
|
|
52
|
+
* misconfiguration it refuses loudly rather than resolving around, because a
|
|
53
|
+
* blank that fell through would authenticate as a different principal than the
|
|
54
|
+
* operator named.
|
|
55
|
+
*
|
|
56
|
+
* Both are right at their own layer, and the mismatch is not hypothetical: an
|
|
57
|
+
* environment carrying a real `HASNA_MEMENTOS_API_KEY` alongside a blank legacy
|
|
58
|
+
* alias — the exact shape a scrubbed-then-overridden fixture produces — is a
|
|
59
|
+
* complete, unambiguous configuration that would otherwise be refused for the
|
|
60
|
+
* alias nobody set. Normalising here keeps "blank means unset" true at the
|
|
61
|
+
* mementos seam while leaving the resolver's stricter rule intact for
|
|
62
|
+
* everything it does receive.
|
|
63
|
+
*/
|
|
64
|
+
export declare function mementosResolverEnv<T extends MementosLocalOptInEnv>(env: T): T;
|
|
65
|
+
/** The env object and credential options a mementos surface hands @hasna/contracts. */
|
|
66
|
+
export interface MementosResolverInputs<T extends MementosLocalOptInEnv> {
|
|
67
|
+
/** The environment with every declared-but-blank authority variable removed. */
|
|
68
|
+
env: T;
|
|
69
|
+
/** The chain options, with the Keychain tier's ambient gate already decided. */
|
|
70
|
+
credentials: CredentialChainOptions;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Build the resolver's inputs: the normalised environment AND the credential
|
|
74
|
+
* options that keep the machine's Keychain tier reachable across it.
|
|
75
|
+
*
|
|
76
|
+
* WHY THIS IS NOT JUST {@link mementosResolverEnv}. Blanking a variable and
|
|
77
|
+
* deleting it are not the same operation to @hasna/contracts, because dropping
|
|
78
|
+
* a key forces us to hand the resolver a COPY, and the resolver gates its
|
|
79
|
+
* ambient tiers on OBJECT IDENTITY (`env === process.env`, or the registry
|
|
80
|
+
* symbol its own snapshot carries). A copy is, by that test, a caller-built
|
|
81
|
+
* world — the hermetic seam — so the Keychain is outside it and tier 3 turns
|
|
82
|
+
* itself off. Silently: there is no error, no warning and no diagnostic,
|
|
83
|
+
* because from the resolver's side nothing went wrong.
|
|
84
|
+
*
|
|
85
|
+
* The consequence is the one failure this whole ruling exists to prevent. On a
|
|
86
|
+
* station whose Keychain holds `hasna.credentials.mementos.api-key`, ONE
|
|
87
|
+
* declared-but-blank authority variable — any name in
|
|
88
|
+
* {@link mementosAuthorityEnvKeys}, canonical or legacy; the shape a scrubbed
|
|
89
|
+
* fixture leaves behind — dropped the run from the Keychain identity to
|
|
90
|
+
* whatever came next: to `~/.hasna/mementos/config/credentials`, a DIFFERENT
|
|
91
|
+
* principal, with no notice; or, with nothing on disk, to a bare refusal on a
|
|
92
|
+
* station that is in fact configured. A deliberate tier must never fall
|
|
93
|
+
* through to another identity, so the gate is decided HERE, on the original
|
|
94
|
+
* env, and carried across the copy as the documented `keychain.enabled`
|
|
95
|
+
* control rather than being left to an identity test the copy cannot pass.
|
|
96
|
+
*
|
|
97
|
+
* An explicit `enabled` from the caller still wins, and an injected `run`
|
|
98
|
+
* (which @hasna/contracts already treats as "enabled") is left alone, so the
|
|
99
|
+
* hermetic seam tests rely on is untouched. When there is no blank to remove
|
|
100
|
+
* the inputs pass through by identity, exactly as before.
|
|
101
|
+
*/
|
|
102
|
+
export declare function mementosResolverInputs<T extends MementosLocalOptInEnv>(env: T, credentials?: CredentialChainOptions): MementosResolverInputs<T>;
|
|
103
|
+
/** Reset the once-per-process local-mode notice. Test seam only. */
|
|
104
|
+
export declare function __resetMementosLocalModeNotice(): void;
|
|
105
|
+
/**
|
|
106
|
+
* The one stderr line a local-mode run MUST print (owner ruling 2026-09-04,
|
|
107
|
+
* fail-closed wave): "local" — so a run that is deliberately serving the
|
|
108
|
+
* on-box store can never be mistaken for a hosted one. Printed once per
|
|
109
|
+
* process by every surface (CLI command startup, MCP server startup); a
|
|
110
|
+
* long-lived server that re-resolves per request does not spam the notice.
|
|
111
|
+
* A no-op unless the environment actually selects the on-box store.
|
|
112
|
+
*/
|
|
113
|
+
export declare function announceMementosLocalMode(env?: MementosLocalOptInEnv, stderr?: (line: string) => void): void;
|
|
114
|
+
//# sourceMappingURL=local-opt-in.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"local-opt-in.d.ts","sourceRoot":"","sources":["../../src/lib/local-opt-in.ts"],"names":[],"mappings":"AAoEA,OAAO,KAAK,E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AED;;;;;;;GAOG;AACH,wBAAgB,yBAAyB,CACvC,GAAG,GAAE,qBAAmC,EACxC,MAAM,GAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAEzB,GACA,IAAI,CAYN"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"machine-visibility.d.ts","sourceRoot":"","sources":["../../src/lib/machine-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"machine-visibility.d.ts","sourceRoot":"","sources":["../../src/lib/machine-visibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAG1D,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAE9D,wBAAgB,uBAAuB,CACrC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,EAAE,CAAC,EAAE,QAAQ,GACZ,MAAM,GAAG,IAAI,CAaf;AAED,wBAAgB,sBAAsB,CACpC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,EAAE,CAAC,EAAE,QAAQ,GACZ,IAAI,CAAC,YAAY,EAAE,uBAAuB,CAAC,CAI7C;AAED,wBAAgB,wBAAwB,CACtC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,YAAY,CAAC,EAClC,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,EACzB,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAOT"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-lock.d.ts","sourceRoot":"","sources":["../../src/lib/memory-lock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,EAAuC,KAAK,YAAY,EAAE,MAAM,gBAAgB,CAAC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AChD,SAAgB,QAAQ,EAAG,IAAI,CAAU;IACzC,SAAgB,GAAG,EAAE,MAAM,CAAC;IAC5B,SAAgB,KAAK,EAAE,MAAM,CAAC;IAC9B,SAAgB,iBAAiB,EAAE,MAAM,CAAC;gBAE9B,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM;CAUhE"}
|
package/dist/lib/paths.d.ts
CHANGED
|
@@ -1,3 +1,12 @@
|
|
|
1
|
+
export type PathKind = "data" | "state" | "cache";
|
|
2
|
+
export interface PathsResolverOptions {
|
|
3
|
+
app: string;
|
|
4
|
+
internal?: boolean;
|
|
5
|
+
platform?: string;
|
|
6
|
+
home?: string;
|
|
7
|
+
env?: Record<string, string | undefined>;
|
|
8
|
+
}
|
|
9
|
+
export declare function dataDir(options: PathsResolverOptions): string;
|
|
1
10
|
/**
|
|
2
11
|
* @hasna/mementos data-home resolution through the @hasna/paths resolver.
|
|
3
12
|
*
|
package/dist/lib/paths.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"paths.d.ts","sourceRoot":"","sources":["../../src/lib/paths.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAQlD,MAAM,WAAW,oBAAoB;IACnC,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,GAAG,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,SAAS,CAAC,CAAC;CAC1C;AAuDD,wBAAgB,OAAO,CAAC,OAAO,EAAE,oBAAoB,GAAG,MAAM,CAE7D;AAED;;;;;;;;;;;;;;;;;;GAkBG;AAEH,yGAAyG;AACzG,wBAAgB,aAAa,IAAI,MAAM,CAEtC;AAED,2DAA2D;AAC3D,wBAAgB,cAAc,IAAI,MAAM,CAEvC;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,MAAM,CAKzC;AAED;;;;;;;;;GASG;AACH,wBAAgB,qBAAqB,CACnC,QAAQ,EAAE,MAAM,EAChB,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAIT;AAED,0FAA0F;AAC1F,wBAAgB,aAAa,IAAI,MAAM,GAAG,SAAS,CAQlD;AAED;;;;GAIG;AACH,wBAAgB,WAAW,IAAI,MAAM,CAKpC"}
|
|
@@ -2,12 +2,23 @@
|
|
|
2
2
|
* Profile Synthesizer — aggregates preference and fact memories into a coherent profile.
|
|
3
3
|
* Cached as a special pinned memory, auto-refreshed when preferences change.
|
|
4
4
|
*/
|
|
5
|
+
export type ProfileScope = "agent" | "project" | "global";
|
|
6
|
+
export declare const PROFILE_SYNTHESIS_CONTRACT: "mementos.profile.synthesize.v2";
|
|
7
|
+
export declare class ProfileScopeError extends Error {
|
|
8
|
+
readonly code = "MEMENTOS_PROFILE_SCOPE";
|
|
9
|
+
constructor(message: string);
|
|
10
|
+
}
|
|
11
|
+
export declare class ProfileSynthesisError extends Error {
|
|
12
|
+
readonly code = "MEMENTOS_PROFILE_SYNTHESIS";
|
|
13
|
+
constructor();
|
|
14
|
+
}
|
|
5
15
|
export declare function getProfileKey(scope: string, id: string): string;
|
|
6
16
|
export declare function synthesizeProfile(options: {
|
|
7
17
|
project_id?: string;
|
|
8
18
|
agent_id?: string;
|
|
9
|
-
scope?:
|
|
19
|
+
scope?: ProfileScope;
|
|
10
20
|
force_refresh?: boolean;
|
|
21
|
+
fail_on_provider_error?: boolean;
|
|
11
22
|
}): Promise<{
|
|
12
23
|
profile: string;
|
|
13
24
|
memory_count: number;
|
|
@@ -16,5 +27,5 @@ export declare function synthesizeProfile(options: {
|
|
|
16
27
|
/**
|
|
17
28
|
* Mark profile as stale. Called from PostMemorySave hook when a preference/fact is saved.
|
|
18
29
|
*/
|
|
19
|
-
export declare function markProfileStale(projectId?: string,
|
|
30
|
+
export declare function markProfileStale(projectId?: string, agentId?: string): void;
|
|
20
31
|
//# sourceMappingURL=profile-synthesizer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"profile-synthesizer.d.ts","sourceRoot":"","sources":["../../src/lib/profile-synthesizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;
|
|
1
|
+
{"version":3,"file":"profile-synthesizer.d.ts","sourceRoot":"","sources":["../../src/lib/profile-synthesizer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAwBH,MAAM,MAAM,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,CAAC;AAC1D,eAAO,MAAM,0BAA0B,EAAG,gCAAyC,CAAC;AAEpF,qBAAa,iBAAkB,SAAQ,KAAK;IAC1C,QAAQ,CAAC,IAAI,4BAA4B;gBAC7B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,qBAAsB,SAAQ,KAAK;IAC9C,QAAQ,CAAC,IAAI,gCAAgC;;CAK9C;AA2BD,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,GAAG,MAAM,CAE/D;AA2BD,wBAAsB,iBAAiB,CAAC,OAAO,EAAE;IAC/C,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,YAAY,CAAC;IACrB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,sBAAsB,CAAC,EAAE,OAAO,CAAC;CAClC,GAAG,OAAO,CAAC;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAAC,CAiHjF;AA2BD;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,SAAS,CAAC,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,IAAI,CA2B3E"}
|
package/dist/lib/redact.d.ts
CHANGED
|
@@ -4,23 +4,83 @@ import type { Memory } from "../types/index.js";
|
|
|
4
4
|
* Returns the text with secrets replaced by [REDACTED].
|
|
5
5
|
*/
|
|
6
6
|
export declare function redactSecrets(text: string): string;
|
|
7
|
+
/**
|
|
8
|
+
* Redact a credential-shaped MEMORY KEY or TAG. Uses only the conservative
|
|
9
|
+
* high-confidence token shapes (see {@link KEY_TAG_SECRET_PATTERNS}) so
|
|
10
|
+
* ordinary identifiers survive untouched — the broad set's heuristic patterns
|
|
11
|
+
* false-positive on benign keys/tags that merely contain the substrings
|
|
12
|
+
* `key-`, `token-`, `SECRET=`, etc.
|
|
13
|
+
*/
|
|
14
|
+
export declare function redactCredentialKey(text: string): string;
|
|
7
15
|
/**
|
|
8
16
|
* Check if text contains any detectable secrets.
|
|
9
17
|
*/
|
|
10
18
|
export declare function containsSecrets(text: string): boolean;
|
|
11
19
|
/**
|
|
12
20
|
* Return a display-safe copy of a memory for READ surfaces (list, search,
|
|
13
|
-
* show
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
*
|
|
17
|
-
*
|
|
21
|
+
* show, recall, tail, chain, versions, when-to-use, pin/unpin/archive/update/
|
|
22
|
+
* save receipts). The write path redacts `value`/`summary` at save time but
|
|
23
|
+
* historically NEVER the `key` — and both TAGS and `key` are storable raw via
|
|
24
|
+
* `save --tags` / `update --tags` and via any bypassing write path — so a
|
|
25
|
+
* credential-shaped key OR TAG can otherwise reach stdout verbatim and trip
|
|
26
|
+
* the high-confidence token detectors (registry-token and AWS-access-key-id
|
|
27
|
+
* shapes among them).
|
|
18
28
|
*
|
|
19
|
-
* Free-text fields — `key`, `value`, `summary`, `when_to_use
|
|
20
|
-
* string leaf of `metadata` — are passed through
|
|
21
|
-
*
|
|
22
|
-
*
|
|
23
|
-
*
|
|
29
|
+
* Free-text fields — `key`, `value`, `summary`, `when_to_use`, every TAG and
|
|
30
|
+
* every string leaf of `metadata` — are passed through redaction. `key` and
|
|
31
|
+
* `tags` use the conservative {@link redactCredentialKey} (so ordinary
|
|
32
|
+
* identifiers survive — acceptance criterion 5); `value`, `summary`,
|
|
33
|
+
* `when_to_use` and `metadata` use the broad {@link redactSecrets} (over-
|
|
34
|
+
* redaction in inline free text is acceptable). Coordination metadata (id,
|
|
35
|
+
* scope, category, importance, status, timestamps, agent/project/session/
|
|
36
|
+
* machine attribution, version, flags) is preserved unchanged so consumers
|
|
37
|
+
* can still coordinate on the row.
|
|
24
38
|
*/
|
|
25
39
|
export declare function redactMemoryForOutput(memory: Memory): Memory;
|
|
40
|
+
/**
|
|
41
|
+
* Redact the free-text fields of a version-history row before it reaches a READ
|
|
42
|
+
* surface (`versions`, `diff`). `value`, `summary`, `when_to_use` and `tags`
|
|
43
|
+
* carry the same stored free-text leak class as the memory fields; coordination
|
|
44
|
+
* metadata (version, importance, scope, category, pinned, status, created_at,
|
|
45
|
+
* ids) is preserved. Tags use the conservative {@link redactCredentialKey}.
|
|
46
|
+
*/
|
|
47
|
+
export declare function redactVersionForOutput<V extends {
|
|
48
|
+
value: string;
|
|
49
|
+
summary: string | null;
|
|
50
|
+
tags?: string[];
|
|
51
|
+
when_to_use?: string | null;
|
|
52
|
+
}>(version: V): V;
|
|
53
|
+
/**
|
|
54
|
+
* Redact the free-text fields of a WRITE input (`CreateMemoryInput` /
|
|
55
|
+
* `UpdateMemoryInput`) BEFORE storage and BEFORE any lookup/guard that keys on
|
|
56
|
+
* those values. The write path must not persist a credential-shaped key or tag
|
|
57
|
+
* raw (acceptance criterion 2): `key` and `tags` use the conservative
|
|
58
|
+
* {@link redactCredentialKey} (so ordinary identifiers survive — criterion 5),
|
|
59
|
+
* while `value`, `summary`, `when_to_use` and every string leaf of `metadata`
|
|
60
|
+
* use the broad {@link redactSecrets}. Redaction is idempotent, so a double
|
|
61
|
+
* application (CLI layer + db layer) is safe. Coordination fields (category,
|
|
62
|
+
* scope, importance, source, status, version, ids, timestamps) are preserved.
|
|
63
|
+
*/
|
|
64
|
+
export declare function redactMemoryWriteInput<T extends object>(input: T): T;
|
|
65
|
+
/**
|
|
66
|
+
* Redact a string leaf that is NOT part of the Memory object but carries
|
|
67
|
+
* memory-derived text on a read surface — notably the highlight SNIPPETS of a
|
|
68
|
+
* search result. A query that matches inside a credential-shaped key produces
|
|
69
|
+
* a snippet window that spans the whole key, so redacting the memory alone is
|
|
70
|
+
* not enough for the search read path.
|
|
71
|
+
*/
|
|
72
|
+
export declare function redactTextFragment(text: string): string;
|
|
73
|
+
/**
|
|
74
|
+
* A display-safe copy of a search result: the memory is passed through
|
|
75
|
+
* {@link redactMemoryForOutput} and every highlight snippet is passed through
|
|
76
|
+
* {@link redactTextFragment}. The result's own coordination fields (score,
|
|
77
|
+
* match_type, field names) survive unchanged.
|
|
78
|
+
*/
|
|
79
|
+
export declare function redactSearchResultForOutput<T extends {
|
|
80
|
+
memory: Memory;
|
|
81
|
+
highlights?: {
|
|
82
|
+
field: string;
|
|
83
|
+
snippet: string;
|
|
84
|
+
}[];
|
|
85
|
+
}>(result: T): T;
|
|
26
86
|
//# sourceMappingURL=redact.d.ts.map
|
package/dist/lib/redact.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/lib/redact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"redact.d.ts","sourceRoot":"","sources":["../../src/lib/redact.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAiEhD;;;GAGG;AACH,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQlD;AAED;;;;;;GAMG;AACH,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAQxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAMrD;AAoBD;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAa5D;AAED;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,EAAE,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;CAAE,EACtI,OAAO,EAAE,CAAC,GACT,CAAC,CAQH;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,sBAAsB,CAAC,CAAC,SAAS,MAAM,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAiBpE;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEvD;AAED;;;;;GAKG;AACH,wBAAgB,2BAA2B,CAAC,CAAC,SAAS;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,UAAU,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,EAAE,CAAA;CAAE,EACzH,MAAM,EAAE,CAAC,GACR,CAAC,CASH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"reflection.d.ts","sourceRoot":"","sources":["../../src/lib/reflection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,MAAM,eAAe,CAAC;AAC1D,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;
|
|
1
|
+
{"version":3,"file":"reflection.d.ts","sourceRoot":"","sources":["../../src/lib/reflection.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,IAAI,QAAQ,EAAE,M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AC;QACvB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;IACF,OAAO,EAAE,gBAAgB,EAAE,CAAC;IAC5B,eAAe,EAAE,MAAM,EAAE,CAAC;CAC3B;AA0SD,wBAAgB,yBAAyB,CAAC,UAAU,EAAE,oBAAoB,GAAG,sBAAsB,CAoClG;AA+BD,wBAAgB,2BAA2B,CAAC,OAAO,GAAE;IACnD,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GAAG,gBAAgB,CAsCxB;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,gBAAgB,CAAC,CA0E/F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-queue.d.ts","sourceRoot":"","sources":["../../src/lib/session-queue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;
|
|
1
|
+
{"version":3,"file":"session-queue.d.ts","sourceRoot":"","sources":["../../src/lib/session-queue.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAaH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;CAChB;AAeD;;;GAGG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAWrD;AAED;;;;GAIG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CA4CxD;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CAoB9C"}
|
|
@@ -2,9 +2,30 @@
|
|
|
2
2
|
* Session Registry — shared registry of active Claude Code sessions.
|
|
3
3
|
* Designed to be reusable across the open-* ecosystem (mementos, todos, conversations).
|
|
4
4
|
*
|
|
5
|
-
* Uses a shared SQLite DB at ~/.open-sessions-registry.db.
|
|
6
5
|
* Each MCP server registers on connect, heartbeats, and can query peers.
|
|
7
6
|
* PID identifies the Claude Code process — all MCPs in same session share a PID.
|
|
7
|
+
*
|
|
8
|
+
* WHERE IT LIVES, AND WHEN (fleet fail-closed wave, 2026-09-11). Until this
|
|
9
|
+
* revision the registry was an ungated SQLite file at the HOME ROOT
|
|
10
|
+
* (`~/.open-sessions-registry.db`), created by the first `registerSession`
|
|
11
|
+
* call — i.e. by every `mementos-mcp` start, including a hosted one that had
|
|
12
|
+
* just refused to open the memory store (T1 §3.5 mementos). Two rules broke
|
|
13
|
+
* at once: "no local fleet SQLite on any station" and "an app's files live
|
|
14
|
+
* under ~/.hasna/<app>". Now:
|
|
15
|
+
*
|
|
16
|
+
* - The registry is an on-box SQLite file ONLY when this process is allowed
|
|
17
|
+
* to have an on-box store at all: the explicit local opt-in
|
|
18
|
+
* (`HASNA_MEMENTOS_LOCAL=1` / `HASNA_MEMENTOS_DB_PATH`, see
|
|
19
|
+
* `selectsMementosLocalStore`) or the server context (`mementos-serve`).
|
|
20
|
+
* It then lives NEXT TO the memory store — `<dir of the store>/
|
|
21
|
+
* sessions-registry.db` — never at the home root; a `:memory:` store gets
|
|
22
|
+
* a `:memory:` registry.
|
|
23
|
+
* - On the HOSTED route (a credential resolved, no opt-in) the registry is
|
|
24
|
+
* PROCESS-LOCAL: the same API, backed by an in-process map, so the
|
|
25
|
+
* auto-inject orchestrator and the channel pusher keep working for this
|
|
26
|
+
* server's own session, and nothing is read from or written to disk.
|
|
27
|
+
* Cross-process peer discovery is a local-store feature; it does not
|
|
28
|
+
* exist on a hosted station and must not invent a file to fake it.
|
|
8
29
|
*/
|
|
9
30
|
export interface SessionInfo {
|
|
10
31
|
id: string;
|
|
@@ -26,6 +47,20 @@ export interface SessionFilter {
|
|
|
26
47
|
agent_name?: string;
|
|
27
48
|
exclude_pid?: number;
|
|
28
49
|
}
|
|
50
|
+
/** File name of the registry, placed next to the memory store. */
|
|
51
|
+
export declare const SESSION_REGISTRY_FILE = "sessions-registry.db";
|
|
52
|
+
/**
|
|
53
|
+
* Is an on-box registry file permitted for this process? Only under the
|
|
54
|
+
* explicit local opt-in or in the server. Answered from the env dictionary
|
|
55
|
+
* (and the server flag) — no Keychain, no filesystem.
|
|
56
|
+
*/
|
|
57
|
+
export declare function sessionRegistryUsesLocalStore(env?: Record<string, string | undefined>): boolean;
|
|
58
|
+
/**
|
|
59
|
+
* Where the registry file lives when one is permitted: beside the memory
|
|
60
|
+
* store (`getDbPath()`), so a pinned scratch store gets a scratch registry
|
|
61
|
+
* and a `:memory:` store gets a `:memory:` registry. Never the home root.
|
|
62
|
+
*/
|
|
63
|
+
export declare function sessionRegistryPath(): string;
|
|
29
64
|
export declare function registerSession(opts: {
|
|
30
65
|
mcp_server: string;
|
|
31
66
|
agent_name?: string;
|
|
@@ -44,4 +79,6 @@ export declare function getSessionsByProject(projectName: string): SessionInfo[]
|
|
|
44
79
|
export declare function cleanStaleSessions(): number;
|
|
45
80
|
export declare function updateSessionAgent(mcpServer: string, agentName: string): void;
|
|
46
81
|
export declare function closeRegistry(): void;
|
|
82
|
+
/** Drop the process-local registry. Test seam only. */
|
|
83
|
+
export declare function __resetProcessLocalRegistry(): void;
|
|
47
84
|
//# sourceMappingURL=session-registry.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"session-registry.d.ts","sourceRoot":"","sources":["../../src/lib/session-registry.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"session-registry.d.ts","sourceRoot":"","sources":["../../src/lib/session-registry.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAYH,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAC;IACxB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;IAC1B,YAA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BAAgB,YAAY,CAAC,MAAM,CAAC,EAAE,aAAa,GAAG,WAAW,EAAE,CAkDlE;AAED,wBAAgB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,WAAW,GAAG,IAAI,CAGvE;AAED,wBAAgB,oBAAoB,CAAC,WAAW,EAAE,MAAM,GAAG,WAAW,EAAE,CAEvE;AAED,wBAAgB,kBAAkB,IAAI,MAAM,CAqB3C;AAED,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,IAAI,CAgB7E;AAMD,wBAAgB,aAAa,IAAI,IAAI,CAMpC;AAED,uDAAuD;AACvD,wBAAgB,2BAA2B,IAAI,IAAI,CAElD"}
|
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { type DbAdapter, type SyncMeta, getStorageStatus } from "../storage.js";
|
|
2
|
+
/**
|
|
3
|
+
* The refusal `storage push|pull|sync|status` (CLI) and the `storage_*` MCP
|
|
4
|
+
* tools raise on the hosted route. Names only variables, never a value.
|
|
5
|
+
*/
|
|
6
|
+
export declare const STORAGE_SYNC_LOCAL_ONLY_MESSAGE: string;
|
|
2
7
|
export interface MemoryStorageSyncMeta {
|
|
3
8
|
table_name: string;
|
|
4
9
|
direction: "push" | "pull";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage-sync.d.ts","sourceRoot":"","sources":["../../src/lib/storage-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EAQb,gBAAgB,
|
|
1
|
+
{"version":3,"file":"storage-sync.d.ts","sourceRoot":"","sources":["../../src/lib/storage-sync.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,SAAS,EACd,KAAK,QAAQ,EAQb,gBAAgB,EAOjB,MAAM,eAAe,CAAC;AAMvB;;;GAGG;AACH,eAAO,MAAM,+BAA+B,QAKwE,CAAC;AA+BrH,MAAM,WAAW,qBAAqB;IACpC,UAAU,EAAE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AY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,YAAY,CAAC,EAAE,OAAO,CAAC,YAAY,CAAC,CAAC;IACrC,EAAE,CAAC,EAAE,QAAQ,CAAC;CACf;AAED,MAAM,WAAW,eAAe;IAC9B,GAAG,EAAE,YAAY,CAAC;IAClB,SAAS,EAAE,iBAAiB,EAAE,CAAC;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,mBAAmB,GAAG,IAAI,CAAC;IACpC,MAAM,EAAE,OAAO,CAAC;CACjB;AAMD,wBAAsB,YAAY,CAAC,OAAO,GAAE,gBAAqB,GAAG,OAAO,CAAC,eAAe,CAAC,CA4K3F;AAMD,wBAAsB,iBAAiB,CACrC,KAAK,EAAE,MAAM,EACb,EAAE,CAAC,EAAE,QAAQ,GACZ,OAAO,CAAC;IAAE,WAAW,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC,CAoBpD;AAMD,wBAAgB,kBAAkB,CAChC,KAAK,CAAC,EAAE,MAAM,EACd,SAAS,CAAC,EAAE,MAAM,EAClB,EAAE,CAAC,EAAE,QAAQ,GACZ;IAAE,OAAO,EAAE,YAAY,GAAG,IAAI,CAAC;IAAC,UAAU,EAAE,YAAY,EAAE,CAAA;CAAE,CAgC9D"}
|
package/dist/mcp/index.d.ts
CHANGED
|
@@ -2,5 +2,5 @@
|
|
|
2
2
|
import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
3
3
|
/** Exported so other modules can push channel notifications via the underlying Server. */
|
|
4
4
|
export declare let mcpServer: McpServer | null;
|
|
5
|
-
export declare function buildServer(): McpServer;
|
|
5
|
+
export declare function buildServer(profileValue?: string): McpServer;
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/mcp/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/mcp/index.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AA0DpE,0FAA0F;AAC1F,eAAO,IAAI,SAAS,EAAE,SAAS,GAAG,IAAW,CAAC;AAyB9C,wBAAgB,WAAW,CAAC,YAAY,SAA2B,GAAG,SAAS,CAqD9E"}
|