@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.
Files changed (161) hide show
  1. package/README.md +119 -30
  2. package/bun.lock +4 -65
  3. package/dist/audit-contract.d.ts +87 -0
  4. package/dist/audit-contract.d.ts.map +1 -0
  5. package/dist/cli/commands/info-context.d.ts.map +1 -1
  6. package/dist/cli/commands/info-history.d.ts.map +1 -1
  7. package/dist/cli/commands/info-stale.d.ts.map +1 -1
  8. package/dist/cli/commands/io-backup.d.ts.map +1 -1
  9. package/dist/cli/commands/io-export.d.ts.map +1 -1
  10. package/dist/cli/commands/io-restore.d.ts.map +1 -1
  11. package/dist/cli/commands/memory-cmd-chain.d.ts.map +1 -1
  12. package/dist/cli/commands/memory-cmd-crud.d.ts.map +1 -1
  13. package/dist/cli/commands/memory-cmd-list.d.ts +25 -0
  14. package/dist/cli/commands/memory-cmd-list.d.ts.map +1 -1
  15. package/dist/cli/commands/memory-cmd-recall.d.ts.map +1 -1
  16. package/dist/cli/commands/memory-cmd-search.d.ts.map +1 -1
  17. package/dist/cli/commands/memory-cmd-tail.d.ts.map +1 -1
  18. package/dist/cli/commands/memory-cmd-view.d.ts.map +1 -1
  19. package/dist/cli/commands/memory-cmd-when-to-use.d.ts.map +1 -1
  20. package/dist/cli/commands/project.d.ts.map +1 -1
  21. package/dist/cli/commands/storage.d.ts.map +1 -1
  22. package/dist/cli/commands/system-doctor.d.ts.map +1 -1
  23. package/dist/cli/commands/system-session.d.ts.map +1 -1
  24. package/dist/cli/commands/system-status.d.ts +43 -0
  25. package/dist/cli/commands/system-status.d.ts.map +1 -0
  26. package/dist/cli/commands/system-synthesized-profile.d.ts.map +1 -1
  27. package/dist/cli/commands/system.d.ts.map +1 -1
  28. package/dist/cli/helpers.d.ts.map +1 -1
  29. package/dist/cli/index.js +4964 -2168
  30. package/dist/cli/register-all.d.ts +1 -1
  31. package/dist/cli/register-all.d.ts.map +1 -1
  32. package/dist/db/api-mode.d.ts +145 -37
  33. package/dist/db/api-mode.d.ts.map +1 -1
  34. package/dist/db/api-response-contract.d.ts +23 -0
  35. package/dist/db/api-response-contract.d.ts.map +1 -0
  36. package/dist/db/audit.d.ts +34 -45
  37. package/dist/db/audit.d.ts.map +1 -1
  38. package/dist/db/database.d.ts +1 -0
  39. package/dist/db/database.d.ts.map +1 -1
  40. package/dist/db/locks.d.ts.map +1 -1
  41. package/dist/db/machines.d.ts +50 -13
  42. package/dist/db/machines.d.ts.map +1 -1
  43. package/dist/db/memories.d.ts.map +1 -1
  44. package/dist/db/migrations.d.ts.map +1 -1
  45. package/dist/db/pg-migrate.d.ts.map +1 -1
  46. package/dist/db/pg-migrations.d.ts.map +1 -1
  47. package/dist/db/session-jobs.d.ts +2 -0
  48. package/dist/db/session-jobs.d.ts.map +1 -1
  49. package/dist/db/store-backend.d.ts +8 -2
  50. package/dist/db/store-backend.d.ts.map +1 -1
  51. package/dist/diagnostics/historical-project-registration-receipt.js +299 -50
  52. package/dist/generated/storage-kit/backend.d.ts +12 -2
  53. package/dist/generated/storage-kit/backend.d.ts.map +1 -1
  54. package/dist/generated/storage-kit/index.d.ts +1 -1
  55. package/dist/generated/storage-kit/index.d.ts.map +1 -1
  56. package/dist/generated/storage-kit/migrations.d.ts +21 -0
  57. package/dist/generated/storage-kit/migrations.d.ts.map +1 -1
  58. package/dist/generated/storage-kit/pool.d.ts +2 -5
  59. package/dist/generated/storage-kit/pool.d.ts.map +1 -1
  60. package/dist/generated/storage-kit/query.d.ts +1 -1
  61. package/dist/generated/storage-kit/query.d.ts.map +1 -1
  62. package/dist/index.d.ts +4 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +4328 -1485
  65. package/dist/lib/built-in-hooks.d.ts.map +1 -1
  66. package/dist/lib/config.d.ts.map +1 -1
  67. package/dist/lib/env.d.ts +10 -0
  68. package/dist/lib/env.d.ts.map +1 -0
  69. package/dist/lib/gatherer.d.ts.map +1 -1
  70. package/dist/lib/injection-project.d.ts +10 -0
  71. package/dist/lib/injection-project.d.ts.map +1 -0
  72. package/dist/lib/injector.d.ts +1 -0
  73. package/dist/lib/injector.d.ts.map +1 -1
  74. package/dist/lib/local-opt-in.d.ts +114 -0
  75. package/dist/lib/local-opt-in.d.ts.map +1 -0
  76. package/dist/lib/machine-visibility.d.ts.map +1 -1
  77. package/dist/lib/memory-lock.d.ts.map +1 -1
  78. package/dist/lib/paths.d.ts +9 -0
  79. package/dist/lib/paths.d.ts.map +1 -1
  80. package/dist/lib/profile-synthesizer.d.ts +13 -2
  81. package/dist/lib/profile-synthesizer.d.ts.map +1 -1
  82. package/dist/lib/redact.d.ts +70 -10
  83. package/dist/lib/redact.d.ts.map +1 -1
  84. package/dist/lib/reflection.d.ts.map +1 -1
  85. package/dist/lib/session-queue.d.ts.map +1 -1
  86. package/dist/lib/session-registry.d.ts +38 -1
  87. package/dist/lib/session-registry.d.ts.map +1 -1
  88. package/dist/lib/storage-sync.d.ts +5 -0
  89. package/dist/lib/storage-sync.d.ts.map +1 -1
  90. package/dist/lib/synthesis/index.d.ts.map +1 -1
  91. package/dist/mcp/index.d.ts +1 -1
  92. package/dist/mcp/index.d.ts.map +1 -1
  93. package/dist/mcp/index.js +6215 -2598
  94. package/dist/mcp/profile.d.ts +23 -0
  95. package/dist/mcp/profile.d.ts.map +1 -0
  96. package/dist/mcp/tools/lock-tools.d.ts.map +1 -1
  97. package/dist/mcp/tools/memory-audit.d.ts +1 -1
  98. package/dist/mcp/tools/memory-audit.d.ts.map +1 -1
  99. package/dist/mcp/tools/memory-crud.d.ts.map +1 -1
  100. package/dist/mcp/tools/memory-inject.d.ts.map +1 -1
  101. package/dist/mcp/tools/project-tools.d.ts.map +1 -1
  102. package/dist/mcp/tools/session-tools.d.ts.map +1 -1
  103. package/dist/mcp/tools/tool-registry.d.ts +22 -19
  104. package/dist/mcp/tools/tool-registry.d.ts.map +1 -1
  105. package/dist/mcp/tools/utility-tools.d.ts +2 -1
  106. package/dist/mcp/tools/utility-tools.d.ts.map +1 -1
  107. package/dist/project-registration.js +549 -205
  108. package/dist/sdk/index.d.ts +282 -14
  109. package/dist/sdk/index.d.ts.map +1 -1
  110. package/dist/sdk/index.js +1691 -35
  111. package/dist/server/auth.d.ts +2 -0
  112. package/dist/server/auth.d.ts.map +1 -1
  113. package/dist/server/helpers.d.ts +21 -7
  114. package/dist/server/helpers.d.ts.map +1 -1
  115. package/dist/server/index.d.ts +2 -0
  116. package/dist/server/index.d.ts.map +1 -1
  117. package/dist/server/index.js +6040 -2475
  118. package/dist/server/openapi.d.ts.map +1 -1
  119. package/dist/server/routes/audit.d.ts +2 -0
  120. package/dist/server/routes/audit.d.ts.map +1 -0
  121. package/dist/server/routes/machines.d.ts +2 -0
  122. package/dist/server/routes/machines.d.ts.map +1 -0
  123. package/dist/server/routes/system-sessions.d.ts.map +1 -1
  124. package/dist/server/routes/system-synthesis.d.ts.map +1 -1
  125. package/dist/storage.d.ts.map +1 -1
  126. package/dist/storage.js +78 -129
  127. package/dist/types/index.d.ts +3 -0
  128. package/dist/types/index.d.ts.map +1 -1
  129. package/docker-entrypoint.sh +7 -0
  130. package/hasna.contract.json +19 -7
  131. package/package.json +12 -11
  132. package/postinstall.mjs +52 -1
  133. package/dashboard/bun.lock +0 -519
  134. package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts +0 -2
  135. package/dist/cli/__fixtures__/clean-fallback-stub-server.d.ts.map +0 -1
  136. package/dist/cli/__fixtures__/io-restore-stub-server.d.ts +0 -2
  137. package/dist/cli/__fixtures__/io-restore-stub-server.d.ts.map +0 -1
  138. package/dist/cli/brains.d.ts +0 -3
  139. package/dist/cli/brains.d.ts.map +0 -1
  140. package/dist/db/__fixtures__/fail-closed-stub-server.d.ts +0 -2
  141. package/dist/db/__fixtures__/fail-closed-stub-server.d.ts.map +0 -1
  142. package/dist/db/__fixtures__/list-filter-capture-server.d.ts +0 -2
  143. package/dist/db/__fixtures__/list-filter-capture-server.d.ts.map +0 -1
  144. package/dist/db/__fixtures__/list-filter-client-runner.d.ts +0 -2
  145. package/dist/db/__fixtures__/list-filter-client-runner.d.ts.map +0 -1
  146. package/dist/lib/retired-storage-mode.d.ts +0 -11
  147. package/dist/lib/retired-storage-mode.d.ts.map +0 -1
  148. package/dist/test-support/memories-page-stub-server.d.ts +0 -2
  149. package/dist/test-support/memories-page-stub-server.d.ts.map +0 -1
  150. package/dist/test-support/memories-page-stub.d.ts +0 -28
  151. package/dist/test-support/memories-page-stub.d.ts.map +0 -1
  152. package/dist/test-support/pg-sync-stub-worker.d.ts +0 -2
  153. package/dist/test-support/pg-sync-stub-worker.d.ts.map +0 -1
  154. package/dist/test-support/preload-local-store.d.ts +0 -2
  155. package/dist/test-support/preload-local-store.d.ts.map +0 -1
  156. package/dist/test-support/project-authority-identity.d.ts +0 -8
  157. package/dist/test-support/project-authority-identity.d.ts.map +0 -1
  158. package/dist/test-support/store-isolation.d.ts +0 -108
  159. package/dist/test-support/store-isolation.d.ts.map +0 -1
  160. package/dist/test-support/strip-ansi.d.ts +0 -3
  161. package/dist/test-support/strip-ansi.d.ts.map +0 -1
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=clean-fallback-stub-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"clean-fallback-stub-server.d.ts","sourceRoot":"","sources":["../../../src/cli/__fixtures__/clean-fallback-stub-server.ts"],"names":[],"mappings":"AAkBA,OAAO,EAAE,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=io-restore-stub-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"io-restore-stub-server.d.ts","sourceRoot":"","sources":["../../../src/cli/__fixtures__/io-restore-stub-server.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function makeBrainsCommand(): Command;
3
- //# sourceMappingURL=brains.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brains.d.ts","sourceRoot":"","sources":["../../src/cli/brains.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsCpC,wBAAgB,iBAAiB,IAAI,OAAO,CAyQ3C"}
@@ -1,2 +0,0 @@
1
- declare const server: Bun.Server<undefined>;
2
- //# sourceMappingURL=fail-closed-stub-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"fail-closed-stub-server.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/fail-closed-stub-server.ts"],"names":[],"mappings":"AAqBA,QAAA,MAAM,MAAM,uBAyCV,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=list-filter-capture-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-filter-capture-server.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/list-filter-capture-server.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=list-filter-client-runner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"list-filter-client-runner.d.ts","sourceRoot":"","sources":["../../../src/db/__fixtures__/list-filter-client-runner.ts"],"names":[],"mappings":""}
@@ -1,11 +0,0 @@
1
- declare const LEGACY_STORAGE_MODE_KEYS: readonly ["HASNA_MEMENTOS_STORAGE_MODE", "HASNA_MEMENTOS_MODE", "MEMENTOS_STORAGE_MODE", "MEMENTOS_MODE"];
2
- /** The retired storage-mode variable names, exported for tests and isolation harnesses. */
3
- export { LEGACY_STORAGE_MODE_KEYS };
4
- /**
5
- * Throw when a retired storage-mode variable is set. Naming the retired var
6
- * and the supported switches makes the error actionable without accepting the
7
- * value. Safe to call from any entry (client store resolution, db guard,
8
- * server backend resolution) — it is a no-op when no legacy key is set.
9
- */
10
- export declare function assertNoLegacyStorageMode(env?: NodeJS.ProcessEnv): void;
11
- //# sourceMappingURL=retired-storage-mode.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"retired-storage-mode.d.ts","sourceRoot":"","sources":["../../src/lib/retired-storage-mode.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,wBAAwB,2GAKpB,CAAC;AAEX,2FAA2F;AAC3F,OAAO,EAAE,wBAAwB,EAAE,CAAC;AASpC;;;;;GAKG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,IAAI,CAUpF"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=memories-page-stub-server.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memories-page-stub-server.d.ts","sourceRoot":"","sources":["../../src/test-support/memories-page-stub-server.ts"],"names":[],"mappings":"AA8CA,OAAO,EAAE,CAAC"}
@@ -1,28 +0,0 @@
1
- export interface MemoriesPageStub {
2
- server: ReturnType<typeof Bun.serve>;
3
- baseUrl: string;
4
- stop(): void;
5
- }
6
- /** Start a stub GET /v1/memories serving `rowCount` rows on capped pages. */
7
- export declare function startMemoriesPageStub(rowCount: number): MemoriesPageStub;
8
- /**
9
- * A process env for API mode pointed at a loopback stub. All store selectors
10
- * are stripped first (the ambient environment on fleet machines carries the
11
- * production API selectors), then the stub URL + a dummy key are set.
12
- */
13
- export declare function apiModeTestEnv(baseUrl: string): Record<string, string>;
14
- export interface MemoriesPageStubProcess {
15
- port: number;
16
- baseUrl: string;
17
- stop(): void;
18
- }
19
- /**
20
- * Start the stub as a SEPARATE process. Required whenever the caller under
21
- * test runs in the same process that would host the stub: the CLI's cloud
22
- * reads are SYNCHRONOUS curl children (Bun.spawnSync), which deadlock against
23
- * an in-process server whose event loop the spawn blocks.
24
- */
25
- export declare function startMemoriesPageStubProcess(rowCount: number): MemoriesPageStubProcess;
26
- /** Poll the stub until it serves a page, or throw after ~5s. */
27
- export declare function waitForMemoriesPageStub(baseUrl: string): Promise<void>;
28
- //# sourceMappingURL=memories-page-stub.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"memories-page-stub.d.ts","sourceRoot":"","sources":["../../src/test-support/memories-page-stub.ts"],"names":[],"mappings":"AAYA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,UAAU,CAAC,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,IAAI,IAAI,CAAC;CACd;AAED,6EAA6E;AAC7E,wBAAgB,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,gBAAgB,CAqCxE;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CActE;AAED,MAAM,WAAW,uBAAuB;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,IAAI,IAAI,CAAC;CACd;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAC1C,QAAQ,EAAE,MAAM,GACf,uBAAuB,CAuBzB;AAED,gEAAgE;AAChE,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAW5E"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=pg-sync-stub-worker.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"pg-sync-stub-worker.d.ts","sourceRoot":"","sources":["../../src/test-support/pg-sync-stub-worker.ts"],"names":[],"mappings":""}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=preload-local-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"preload-local-store.d.ts","sourceRoot":"","sources":["../../src/test-support/preload-local-store.ts"],"names":[],"mappings":""}
@@ -1,8 +0,0 @@
1
- export declare const TEST_MEMENTOS_PROJECT_AUTHORITY_IDENTITY: {
2
- readonly authority_id: "mementos";
3
- readonly tenant_id: "default";
4
- readonly corpus_id: "default";
5
- };
6
- export declare function projectAuthorityTestEnv(): Record<string, string>;
7
- export declare function configureProjectAuthorityTestIdentity(): void;
8
- //# sourceMappingURL=project-authority-identity.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"project-authority-identity.d.ts","sourceRoot":"","sources":["../../src/test-support/project-authority-identity.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,wCAAwC;;;;CAI3C,CAAC;AAEX,wBAAgB,uBAAuB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAShE;AAED,wBAAgB,qCAAqC,IAAI,IAAI,CAE5D"}
@@ -1,108 +0,0 @@
1
- import type { StoreBackendReport } from "../db/store-backend.js";
2
- /**
3
- * Every env var that can move the store off local SQLite, plus the store
4
- * credential. Derived from the resolver's own exported key lists rather than
5
- * retyped, so adding a selector in src/db/api-mode.ts or src/storage.ts
6
- * automatically widens what the harnesses neutralize.
7
- *
8
- * The retired storage-mode keys stay in the set even though the ratchet turns
9
- * them into errors: a harness child that inherits a stale variable from the
10
- * operator shell must have it DELETED (a blank value would still throw), and
11
- * the preload must keep the suite runnable on a machine that still exports one.
12
- *
13
- * `MEMENTOS_DATABASE_PASSWORD` is not a selector but is the store credential;
14
- * removing it can only make the child more local, never less.
15
- */
16
- export declare const STORE_SELECTOR_ENV_KEYS: readonly string[];
17
- /** The two env vars that point the CLI at a specific SQLite file. */
18
- export declare const DB_PATH_ENV_KEYS: readonly ["MEMENTOS_DB_PATH", "HASNA_MEMENTOS_DB_PATH"];
19
- export interface IsolatedStoreEnvOptions {
20
- /**
21
- * Extra vars to set in the child, applied last. Harnesses use this to blank
22
- * LLM provider keys so no test can make a billed call. Kept opt-in because
23
- * blanking them changes what commands like `doctor` report.
24
- */
25
- extra?: Record<string, string>;
26
- }
27
- /**
28
- * Build a child-process env that is pinned to a local SQLite file at `dbPath`.
29
- *
30
- * Selectors are DELETED rather than set to `""` — the resolver treats empty as
31
- * unset either way, but deleting leaves no ambiguity for a human reading the
32
- * child's environment during a postmortem.
33
- *
34
- * Building the env is necessary but NOT sufficient: pair it with
35
- * {@link assertLocalStoreBackend} before the suite performs any write.
36
- */
37
- export declare function isolatedStoreEnv(dbPath: string, options?: IsolatedStoreEnvOptions): Record<string, string>;
38
- export interface StubApiEnvOptions {
39
- /** Stub bearer token. Never a real credential — the stub does not check it. */
40
- apiKey?: string;
41
- }
42
- /**
43
- * Build a child env for a suite that *deliberately* runs in API mode against a
44
- * local stub server.
45
- *
46
- * Such a suite still must not inherit the operator's production API URL or key:
47
- * it overrides the URL, but if that override were ever empty or renamed, the
48
- * ambient value would take over and the suite would drive the real store. So
49
- * start from a fully de-selected env and add back only the stub's own values.
50
- *
51
- * @param baseUrl the stub's origin, e.g. `http://127.0.0.1:<port>/<mode>`
52
- */
53
- export declare function stubApiEnv(baseUrl: string, options?: StubApiEnvOptions): Record<string, string>;
54
- /**
55
- * Build a child env that DOES resolve to the cloud API — the negative case the
56
- * isolation guards are proved against.
57
- *
58
- * This exists because of the 2026-08-03 precedence-1 fix. Before it, a cloud
59
- * case could be built by taking any env and adding an API url+key, and several
60
- * tests did exactly that on top of {@link isolatedStoreEnv}. An explicit
61
- * `MEMENTOS_DB_PATH` now DEFEATS the API selectors (see getApiConfig in
62
- * src/db/api-mode.ts), so that recipe silently produces a LOCAL backend — which
63
- * would leave the isolation guards' positive controls unable to observe the bad
64
- * state they exist to detect, and `assertLocalStoreBackend`'s own self-test
65
- * unable to fail. Both would still be green.
66
- *
67
- * So the DB_PATH keys are removed here explicitly, and that removal is the
68
- * load-bearing line rather than an afterthought: it is the only way to reach the
69
- * cloud backend now. They are NOT in STORE_SELECTOR_ENV_KEYS because that set
70
- * means "moves the store OFF local SQLite", and DB_PATH does the opposite.
71
- *
72
- * @param baseUrl point this at a closed loopback port, never a real endpoint
73
- * @param apiKey never a real credential
74
- */
75
- export declare function cloudSelectingEnv(baseUrl: string, apiKey?: string): Record<string, string>;
76
- /** LLM provider keys most harnesses blank so no test can make a billed call. */
77
- export declare const LLM_PROVIDER_ENV_KEYS: readonly ["ANTHROPIC_API_KEY", "OPENAI_API_KEY", "CEREBRAS_API_KEY", "XAI_API_KEY"];
78
- /** `{ ANTHROPIC_API_KEY: "", ... }` — pass as `extra` to blank LLM providers. */
79
- export declare function blankLlmProviderEnv(): Record<string, string>;
80
- /**
81
- * Ask the child process which store it resolved, and THROW if it is not local.
82
- *
83
- * This is the guard that turns an unknown future selector into a red suite
84
- * rather than a silent production write. It asks the CLI itself
85
- * (`storage mode --json`) rather than recomputing the answer here, so the
86
- * verdict comes from the same resolution code the writes will use — and it runs
87
- * as a real child process with the real env, so an env var that fails to cross
88
- * the process boundary is caught rather than assumed away.
89
- *
90
- * `storage mode` opens no database and makes no network request, so this is
91
- * safe to call even when the ambient env points at production.
92
- *
93
- * @param cliPath path to src/cli/index.tsx
94
- * @param env the env produced by {@link isolatedStoreEnv}
95
- * @param expectedDbPath when given, also assert the child resolved this path
96
- */
97
- export declare function assertLocalStoreBackend(cliPath: string, env: Record<string, string>, expectedDbPath?: string): Promise<StoreBackendReport>;
98
- /**
99
- * Assert the scratch SQLite file now exists on disk.
100
- *
101
- * This is the second half of the proof and it is not redundant with
102
- * {@link assertLocalStoreBackend}: the mode report says where the child INTENDS
103
- * to write, whereas this says a write actually landed there. The reported
104
- * incident's signature was precisely a correct-looking path with no file ever
105
- * created, so call this AFTER the suite's first write.
106
- */
107
- export declare function assertScratchDbCreated(dbPath: string, context?: string): void;
108
- //# sourceMappingURL=store-isolation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"store-isolation.d.ts","sourceRoot":"","sources":["../../src/test-support/store-isolation.ts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAIjE;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,EAAE,SAAS,MAAM,EAUpD,CAAC;AAEF,qEAAqE;AACrE,eAAO,MAAM,gBAAgB,yDAA0D,CAAC;AAExF,MAAM,WAAW,uBAAuB;IACtC;;;;OAIG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAChC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,MAAM,EACd,OAAO,GAAE,uBAA4B,GACpC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAKxB;AASD,MAAM,WAAW,iBAAiB;IAChC,+EAA+E;IAC/E,MAAM,CAAC,EAAE,MAAM,CAAC;CAUjB;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,GAAE,iBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAQnG;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,MAAM,EACf,MAAM,SAAmB,GACxB,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAMxB;AAED,gFAAgF;AAChF,eAAO,MAAM,qBAAqB,qFAKxB,CAAC;AAEX,iFAAiF;AACjF,wBAAgB,mBAAmB,IAAI,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAE5D;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAsB,uBAAuB,CAC3C,OAAO,EAAE,MAAM,EACf,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC3B,cAAc,CAAC,EAAE,MAAM,GACtB,OAAO,CAAC,kBAAkB,CAAC,CAsD7B;AAED;;;;;;;;GAQG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,OAAO,SAA0B,GAAG,IAAI,CAQ9F"}
@@ -1,3 +0,0 @@
1
- /** Remove ANSI/VT100 SGR escape sequences from CLI output before asserting on content. */
2
- export declare function stripAnsi(input: string): string;
3
- //# sourceMappingURL=strip-ansi.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"strip-ansi.d.ts","sourceRoot":"","sources":["../../src/test-support/strip-ansi.ts"],"names":[],"mappings":"AAyBA,0FAA0F;AAC1F,wBAAgB,SAAS,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE/C"}