@cleocode/core 2026.8.1 → 2026.8.3

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 (323) hide show
  1. package/dist/bootstrap.d.ts.map +1 -1
  2. package/dist/bootstrap.js +57 -27
  3. package/dist/bootstrap.js.map +1 -1
  4. package/dist/check/pr-gate.d.ts.map +1 -1
  5. package/dist/check/pr-gate.js +9 -0
  6. package/dist/check/pr-gate.js.map +1 -1
  7. package/dist/db/index.d.ts +13 -0
  8. package/dist/db/index.d.ts.map +1 -1
  9. package/dist/db/index.js +13 -0
  10. package/dist/db/index.js.map +1 -1
  11. package/dist/docs/display-alias.js +1 -1
  12. package/dist/docs/display-alias.js.map +1 -1
  13. package/dist/docs/export-document.js +499 -380
  14. package/dist/docs/export-document.js.map +3 -3
  15. package/dist/docs/numbering.js +1 -1
  16. package/dist/docs/numbering.js.map +1 -1
  17. package/dist/docs/supersede.js +1 -1
  18. package/dist/docs/supersede.js.map +1 -1
  19. package/dist/hooks/registry.d.ts +2 -2
  20. package/dist/hooks/registry.d.ts.map +1 -1
  21. package/dist/hooks/registry.js +5 -0
  22. package/dist/hooks/registry.js.map +1 -1
  23. package/dist/hooks/types.d.ts +59 -0
  24. package/dist/hooks/types.d.ts.map +1 -1
  25. package/dist/init/scaffold-workflows.d.ts +12 -0
  26. package/dist/init/scaffold-workflows.d.ts.map +1 -1
  27. package/dist/init/scaffold-workflows.js +16 -0
  28. package/dist/init/scaffold-workflows.js.map +1 -1
  29. package/dist/init/upgrade-workflows.d.ts.map +1 -1
  30. package/dist/init/upgrade-workflows.js +16 -0
  31. package/dist/init/upgrade-workflows.js.map +1 -1
  32. package/dist/init.d.ts.map +1 -1
  33. package/dist/init.js +16 -1
  34. package/dist/init.js.map +1 -1
  35. package/dist/injection.d.ts.map +1 -1
  36. package/dist/injection.js +44 -3
  37. package/dist/injection.js.map +1 -1
  38. package/dist/internal.d.ts +1 -0
  39. package/dist/internal.d.ts.map +1 -1
  40. package/dist/internal.js +2 -0
  41. package/dist/internal.js.map +1 -1
  42. package/dist/lifecycle/index.js +1 -1
  43. package/dist/lifecycle/index.js.map +1 -1
  44. package/dist/llm/credentials.d.ts +16 -1
  45. package/dist/llm/credentials.d.ts.map +1 -1
  46. package/dist/llm/credentials.js.map +1 -1
  47. package/dist/llm/cross-provider-selector.d.ts +25 -0
  48. package/dist/llm/cross-provider-selector.d.ts.map +1 -1
  49. package/dist/llm/cross-provider-selector.js +76 -3
  50. package/dist/llm/cross-provider-selector.js.map +1 -1
  51. package/dist/llm/local-inference-probe.d.ts +101 -0
  52. package/dist/llm/local-inference-probe.d.ts.map +1 -0
  53. package/dist/llm/local-inference-probe.js +174 -0
  54. package/dist/llm/local-inference-probe.js.map +1 -0
  55. package/dist/llm/plugin-facade.js +429 -115
  56. package/dist/llm/plugin-facade.js.map +3 -3
  57. package/dist/llm/role-executor.d.ts.map +1 -1
  58. package/dist/llm/role-executor.js +95 -9
  59. package/dist/llm/role-executor.js.map +1 -1
  60. package/dist/llm/role-resolver.d.ts +10 -0
  61. package/dist/llm/role-resolver.d.ts.map +1 -1
  62. package/dist/llm/role-resolver.js +92 -1
  63. package/dist/llm/role-resolver.js.map +1 -1
  64. package/dist/llm/system-resolver.d.ts.map +1 -1
  65. package/dist/llm/system-resolver.js +2 -0
  66. package/dist/llm/system-resolver.js.map +1 -1
  67. package/dist/memory/brain-backfill.js +3 -3
  68. package/dist/memory/brain-backfill.js.map +1 -1
  69. package/dist/memory/brain-consolidator.js +2 -2
  70. package/dist/memory/brain-consolidator.js.map +1 -1
  71. package/dist/memory/brain-doctor.js +1 -1
  72. package/dist/memory/brain-doctor.js.map +1 -1
  73. package/dist/memory/brain-health-dashboard.js +1 -1
  74. package/dist/memory/brain-health-dashboard.js.map +1 -1
  75. package/dist/memory/brain-lifecycle.js +10 -10
  76. package/dist/memory/brain-lifecycle.js.map +1 -1
  77. package/dist/memory/brain-maintenance.js +1 -1
  78. package/dist/memory/brain-maintenance.js.map +1 -1
  79. package/dist/memory/brain-page-nodes.js +4 -4
  80. package/dist/memory/brain-page-nodes.js.map +1 -1
  81. package/dist/memory/brain-reasoning.js +1 -1
  82. package/dist/memory/brain-reasoning.js.map +1 -1
  83. package/dist/memory/brain-search.d.ts +109 -0
  84. package/dist/memory/brain-search.d.ts.map +1 -1
  85. package/dist/memory/brain-search.js +150 -38
  86. package/dist/memory/brain-search.js.map +1 -1
  87. package/dist/memory/brain-similarity.js +1 -1
  88. package/dist/memory/brain-similarity.js.map +1 -1
  89. package/dist/memory/brain-stdp.js +6 -6
  90. package/dist/memory/brain-stdp.js.map +1 -1
  91. package/dist/memory/brain-stub-prune.d.ts +109 -0
  92. package/dist/memory/brain-stub-prune.d.ts.map +1 -0
  93. package/dist/memory/brain-stub-prune.js +155 -0
  94. package/dist/memory/brain-stub-prune.js.map +1 -0
  95. package/dist/memory/brain-sweep-executor.js +1 -1
  96. package/dist/memory/brain-sweep-executor.js.map +1 -1
  97. package/dist/memory/brain-writer-handlers.js +2 -2
  98. package/dist/memory/brain-writer-handlers.js.map +1 -1
  99. package/dist/memory/claude-mem-migration.d.ts.map +1 -1
  100. package/dist/memory/claude-mem-migration.js +2 -2
  101. package/dist/memory/claude-mem-migration.js.map +1 -1
  102. package/dist/memory/engine-compat.d.ts.map +1 -1
  103. package/dist/memory/engine-compat.js +65 -7
  104. package/dist/memory/engine-compat.js.map +1 -1
  105. package/dist/memory/extraction-gate.js +3 -3
  106. package/dist/memory/extraction-gate.js.map +1 -1
  107. package/dist/memory/graph-memory-bridge.js +9 -9
  108. package/dist/memory/graph-memory-bridge.js.map +1 -1
  109. package/dist/memory/graph-queries.js +4 -4
  110. package/dist/memory/graph-queries.js.map +1 -1
  111. package/dist/memory/llm-extraction.js +1 -1
  112. package/dist/memory/llm-extraction.js.map +1 -1
  113. package/dist/memory/memory-bridge.js +1 -1
  114. package/dist/memory/memory-bridge.js.map +1 -1
  115. package/dist/memory/nexus-plasticity.js +1 -1
  116. package/dist/memory/nexus-plasticity.js.map +1 -1
  117. package/dist/memory/observer-reflector.js +1 -1
  118. package/dist/memory/observer-reflector.js.map +1 -1
  119. package/dist/memory/pipeline-manifest-sqlite.d.ts.map +1 -1
  120. package/dist/memory/pipeline-manifest-sqlite.js +13 -3
  121. package/dist/memory/pipeline-manifest-sqlite.js.map +1 -1
  122. package/dist/memory/quality-feedback.js +4 -4
  123. package/dist/memory/quality-feedback.js.map +1 -1
  124. package/dist/memory/retrieval/increment-citation-counts.js +1 -1
  125. package/dist/memory/retrieval/increment-citation-counts.js.map +1 -1
  126. package/dist/memory/retrieval/log-retrieval.js +1 -1
  127. package/dist/memory/retrieval/log-retrieval.js.map +1 -1
  128. package/dist/memory/retrieval/observe.js +1 -1
  129. package/dist/memory/retrieval/observe.js.map +1 -1
  130. package/dist/memory/retrieval/search.js +1 -1
  131. package/dist/memory/retrieval/search.js.map +1 -1
  132. package/dist/memory/retrieval/timeline.js +1 -1
  133. package/dist/memory/retrieval/timeline.js.map +1 -1
  134. package/dist/memory/sleep-consolidation.js +4 -4
  135. package/dist/memory/sleep-consolidation.js.map +1 -1
  136. package/dist/memory/temporal-supersession.js +5 -5
  137. package/dist/memory/temporal-supersession.js.map +1 -1
  138. package/dist/memory/transcript-extractor.js +1 -1
  139. package/dist/memory/transcript-extractor.js.map +1 -1
  140. package/dist/memory/transcript-ingestor.js +1 -1
  141. package/dist/memory/transcript-ingestor.js.map +1 -1
  142. package/dist/memory/transcript-scanner.js +1 -1
  143. package/dist/memory/transcript-scanner.js.map +1 -1
  144. package/dist/nexus/analyze-orchestrator.d.ts.map +1 -1
  145. package/dist/nexus/analyze-orchestrator.js +28 -0
  146. package/dist/nexus/analyze-orchestrator.js.map +1 -1
  147. package/dist/nexus/context.d.ts.map +1 -1
  148. package/dist/nexus/context.js +3 -3
  149. package/dist/nexus/context.js.map +1 -1
  150. package/dist/nexus/impact.d.ts.map +1 -1
  151. package/dist/nexus/impact.js +3 -3
  152. package/dist/nexus/impact.js.map +1 -1
  153. package/dist/nexus/living-brain.js +7 -7
  154. package/dist/nexus/living-brain.js.map +1 -1
  155. package/dist/nexus/symbol-miss.d.ts +132 -0
  156. package/dist/nexus/symbol-miss.d.ts.map +1 -0
  157. package/dist/nexus/symbol-miss.js +168 -0
  158. package/dist/nexus/symbol-miss.js.map +1 -0
  159. package/dist/nexus/tasks-bridge.js +4 -4
  160. package/dist/nexus/tasks-bridge.js.map +1 -1
  161. package/dist/orchestrate/spawn-ops.d.ts +21 -1
  162. package/dist/orchestrate/spawn-ops.d.ts.map +1 -1
  163. package/dist/orchestrate/spawn-ops.js +39 -2
  164. package/dist/orchestrate/spawn-ops.js.map +1 -1
  165. package/dist/orchestrate/worker-verify.d.ts.map +1 -1
  166. package/dist/orchestrate/worker-verify.js +22 -0
  167. package/dist/orchestrate/worker-verify.js.map +1 -1
  168. package/dist/release/changesets-aggregator.d.ts.map +1 -1
  169. package/dist/release/changesets-aggregator.js +15 -1
  170. package/dist/release/changesets-aggregator.js.map +1 -1
  171. package/dist/release/open.d.ts +29 -2
  172. package/dist/release/open.d.ts.map +1 -1
  173. package/dist/release/open.js +48 -11
  174. package/dist/release/open.js.map +1 -1
  175. package/dist/release/reconcile.d.ts.map +1 -1
  176. package/dist/release/reconcile.js +5 -1
  177. package/dist/release/reconcile.js.map +1 -1
  178. package/dist/resources/governor.d.ts +12 -2
  179. package/dist/resources/governor.d.ts.map +1 -1
  180. package/dist/resources/governor.js +12 -3
  181. package/dist/resources/governor.js.map +1 -1
  182. package/dist/sagas/migrate-containment.d.ts.map +1 -1
  183. package/dist/sagas/migrate-containment.js +4 -2
  184. package/dist/sagas/migrate-containment.js.map +1 -1
  185. package/dist/scaffold/ensure-dirs.d.ts.map +1 -1
  186. package/dist/scaffold/ensure-dirs.js +15 -3
  187. package/dist/scaffold/ensure-dirs.js.map +1 -1
  188. package/dist/scaffold/project-detection.d.ts.map +1 -1
  189. package/dist/scaffold/project-detection.js +2 -1
  190. package/dist/scaffold/project-detection.js.map +1 -1
  191. package/dist/selfimprove/draft-pr.d.ts +14 -1
  192. package/dist/selfimprove/draft-pr.d.ts.map +1 -1
  193. package/dist/selfimprove/draft-pr.js.map +1 -1
  194. package/dist/selfimprove/fix-gen.d.ts +0 -21
  195. package/dist/selfimprove/fix-gen.d.ts.map +1 -1
  196. package/dist/selfimprove/fix-gen.js +509 -173
  197. package/dist/selfimprove/fix-gen.js.map +3 -3
  198. package/dist/selfimprove/run-loop.d.ts.map +1 -1
  199. package/dist/selfimprove/run-loop.js +50 -19
  200. package/dist/selfimprove/run-loop.js.map +1 -1
  201. package/dist/selfimprove/scenarios/dhq-replay-find/golden.json +114 -4
  202. package/dist/selfimprove/scenarios/dhq-replay-find/scenario.json +3 -3
  203. package/dist/sentient/dream-cycle.d.ts +20 -19
  204. package/dist/sentient/dream-cycle.d.ts.map +1 -1
  205. package/dist/sentient/dream-cycle.js +323 -12
  206. package/dist/sentient/dream-cycle.js.map +1 -1
  207. package/dist/sentient/dream-watermark.d.ts +134 -0
  208. package/dist/sentient/dream-watermark.d.ts.map +1 -0
  209. package/dist/sentient/dream-watermark.js +156 -0
  210. package/dist/sentient/dream-watermark.js.map +1 -0
  211. package/dist/sentient/hygiene-scan.js +1 -1
  212. package/dist/sentient/hygiene-scan.js.map +1 -1
  213. package/dist/sentient/propose-tick.js +3 -3
  214. package/dist/sentient/propose-tick.js.map +1 -1
  215. package/dist/sentient/stage-drift-tick.js +1 -1
  216. package/dist/sentient/stage-drift-tick.js.map +1 -1
  217. package/dist/sentient/state.d.ts +17 -0
  218. package/dist/sentient/state.d.ts.map +1 -1
  219. package/dist/sentient/state.js +22 -3
  220. package/dist/sentient/state.js.map +1 -1
  221. package/dist/sentient/tick.d.ts.map +1 -1
  222. package/dist/sentient/tick.js +79 -2
  223. package/dist/sentient/tick.js.map +1 -1
  224. package/dist/sequence/index.js +1 -1
  225. package/dist/sequence/index.js.map +1 -1
  226. package/dist/sessions/index.d.ts.map +1 -1
  227. package/dist/sessions/index.js +5 -1
  228. package/dist/sessions/index.js.map +1 -1
  229. package/dist/sessions/snapshot.d.ts.map +1 -1
  230. package/dist/sessions/snapshot.js +6 -3
  231. package/dist/sessions/snapshot.js.map +1 -1
  232. package/dist/store/agent-registry-store.d.ts.map +1 -1
  233. package/dist/store/agent-registry-store.js +71 -28
  234. package/dist/store/agent-registry-store.js.map +1 -1
  235. package/dist/store/attachment-store.js +3 -3
  236. package/dist/store/attachment-store.js.map +1 -1
  237. package/dist/store/checkpoint-git-dir.d.ts +95 -0
  238. package/dist/store/checkpoint-git-dir.d.ts.map +1 -0
  239. package/dist/store/checkpoint-git-dir.js +111 -0
  240. package/dist/store/checkpoint-git-dir.js.map +1 -0
  241. package/dist/store/conduit-sqlite.d.ts +21 -1
  242. package/dist/store/conduit-sqlite.d.ts.map +1 -1
  243. package/dist/store/conduit-sqlite.js +42 -56
  244. package/dist/store/conduit-sqlite.js.map +1 -1
  245. package/dist/store/dual-scope-db.d.ts +39 -0
  246. package/dist/store/dual-scope-db.d.ts.map +1 -1
  247. package/dist/store/dual-scope-db.js +26 -8
  248. package/dist/store/dual-scope-db.js.map +1 -1
  249. package/dist/store/git-checkpoint.d.ts.map +1 -1
  250. package/dist/store/git-checkpoint.js +6 -5
  251. package/dist/store/git-checkpoint.js.map +1 -1
  252. package/dist/store/memory-sqlite.d.ts +57 -3
  253. package/dist/store/memory-sqlite.d.ts.map +1 -1
  254. package/dist/store/memory-sqlite.js +70 -89
  255. package/dist/store/memory-sqlite.js.map +1 -1
  256. package/dist/store/nexus-sqlite.d.ts +42 -0
  257. package/dist/store/nexus-sqlite.d.ts.map +1 -1
  258. package/dist/store/nexus-sqlite.js +79 -115
  259. package/dist/store/nexus-sqlite.js.map +1 -1
  260. package/dist/store/ports/domain-binding.d.ts +233 -0
  261. package/dist/store/ports/domain-binding.d.ts.map +1 -0
  262. package/dist/store/ports/domain-binding.js +500 -0
  263. package/dist/store/ports/domain-binding.js.map +1 -0
  264. package/dist/store/ports/fk-integrity.d.ts +155 -0
  265. package/dist/store/ports/fk-integrity.d.ts.map +1 -0
  266. package/dist/store/ports/fk-integrity.js +182 -0
  267. package/dist/store/ports/fk-integrity.js.map +1 -0
  268. package/dist/store/role-accessors-impl.js +2 -2
  269. package/dist/store/role-accessors-impl.js.map +1 -1
  270. package/dist/store/skills-db.d.ts +19 -0
  271. package/dist/store/skills-db.d.ts.map +1 -1
  272. package/dist/store/skills-db.js +80 -72
  273. package/dist/store/skills-db.js.map +1 -1
  274. package/dist/store/sqlite-backup.js +2 -2
  275. package/dist/store/sqlite-backup.js.map +1 -1
  276. package/dist/store/sqlite-data-accessor.js +1 -1
  277. package/dist/store/sqlite-data-accessor.js.map +1 -1
  278. package/dist/store/sqlite.d.ts +72 -10
  279. package/dist/store/sqlite.d.ts.map +1 -1
  280. package/dist/store/sqlite.js +173 -160
  281. package/dist/store/sqlite.js.map +1 -1
  282. package/dist/store/tasks-sqlite.js +2 -2
  283. package/dist/store/tasks-sqlite.js.map +1 -1
  284. package/dist/system/health.d.ts +0 -4
  285. package/dist/system/health.d.ts.map +1 -1
  286. package/dist/system/health.js +60 -3
  287. package/dist/system/health.js.map +1 -1
  288. package/dist/tasks/add.d.ts.map +1 -1
  289. package/dist/tasks/add.js +40 -4
  290. package/dist/tasks/add.js.map +1 -1
  291. package/dist/tasks/collection.d.ts +51 -0
  292. package/dist/tasks/collection.d.ts.map +1 -0
  293. package/dist/tasks/collection.js +81 -0
  294. package/dist/tasks/collection.js.map +1 -0
  295. package/dist/tasks/complete.d.ts.map +1 -1
  296. package/dist/tasks/complete.js +8 -3
  297. package/dist/tasks/complete.js.map +1 -1
  298. package/dist/tasks/evidence.d.ts.map +1 -1
  299. package/dist/tasks/evidence.js +17 -0
  300. package/dist/tasks/evidence.js.map +1 -1
  301. package/dist/tasks/find.d.ts +50 -0
  302. package/dist/tasks/find.d.ts.map +1 -1
  303. package/dist/tasks/find.js +63 -2
  304. package/dist/tasks/find.js.map +1 -1
  305. package/dist/tasks/tool-resolver.d.ts +1 -1
  306. package/dist/tasks/tool-resolver.d.ts.map +1 -1
  307. package/dist/tasks/tool-resolver.js +83 -0
  308. package/dist/tasks/tool-resolver.js.map +1 -1
  309. package/dist/tasks/tool-semaphore.d.ts +82 -12
  310. package/dist/tasks/tool-semaphore.d.ts.map +1 -1
  311. package/dist/tasks/tool-semaphore.js +79 -17
  312. package/dist/tasks/tool-semaphore.js.map +1 -1
  313. package/dist/upgrade.js +2 -2
  314. package/dist/upgrade.js.map +1 -1
  315. package/dist/validation/doctor/checks.d.ts +23 -1
  316. package/dist/validation/doctor/checks.d.ts.map +1 -1
  317. package/dist/validation/doctor/checks.js +79 -19
  318. package/dist/validation/doctor/checks.js.map +1 -1
  319. package/dist/worktree/list.js +1 -1
  320. package/dist/worktree/list.js.map +1 -1
  321. package/package.json +23 -13
  322. package/templates/CLEO-INJECTION.md +40 -25
  323. package/templates/workflows/release-prepare.yml.tmpl +73 -16
@@ -79,6 +79,10 @@ import { getCleoHome } from '../paths.js';
79
79
  // existing callers (nexusSchema.* queries) compile and run without change.
80
80
  import { openDualScopeDb, resolveDualScopeDbPath } from './dual-scope-db.js';
81
81
  import { ensureColumns, migrateWithRetry, reconcileJournal } from './migration-manager.js';
82
+ // T12039: the nexus domain no longer owns a singleton — the path-keyed binding
83
+ // registry does. This module contributes only its schema reconciliation + the
84
+ // GLOBAL registry ATTACH.
85
+ import { bindProjectDomain, boundProjectNative, peekProjectDomain, releaseDomainBindings, } from './ports/domain-binding.js';
82
86
  import { resolveConsolidatedJournalSiblings, resolveCorePackageMigrationsFolder, } from './resolve-migrations-folder.js';
83
87
  import * as nexusSchema from './schema/nexus-schema.js';
84
88
  // isSqliteBusy is a pure predicate with no node:sqlite dependency — import it
@@ -87,20 +91,6 @@ import * as nexusSchema from './schema/nexus-schema.js';
87
91
  import { isSqliteBusy } from './with-retry.js';
88
92
  /** Schema version for newly created nexus databases. Single source of truth. */
89
93
  export const NEXUS_SCHEMA_VERSION = '1.0.0';
90
- /** Singleton state for lazy initialization. */
91
- let _nexusDb = null;
92
- let _nexusNativeDb = null;
93
- let _nexusDbPath = null;
94
- /**
95
- * The GLOBAL registry path the current singleton's ATTACH targets (ADR-090 ·
96
- * T11648). When `getCleoHome()` changes (e.g. tests mutating `CLEO_HOME`), the
97
- * attached global differs AND must be migrated via `openDualScopeDb('global')` —
98
- * which only runs on the init path. So a registry-path change forces a full
99
- * singleton reset rather than a cheap re-attach to an unmigrated file.
100
- */
101
- let _nexusRegistryPath = null;
102
- /** Guard against concurrent initialization (async migration). */
103
- let _nexusInitPromise = null;
104
94
  /**
105
95
  * SQLite ATTACH alias under which the GLOBAL consolidated `cleo.db` is mounted
106
96
  * into the PROJECT-scope nexus handle so the cross-project registry/identity
@@ -554,17 +544,19 @@ function ensureNexusRelationWeights(nativeDb) {
554
544
  * @task T11578
555
545
  * @task T11648
556
546
  */
557
- function runNexusMigrations(nativeDb, db) {
547
+ function runNexusMigrations(nativeDb, db, dbPath) {
558
548
  const migrationsFolder = resolveNexusMigrationsFolder();
559
549
  // If existing DB with populated graph, create a safety backup (cleo compat).
560
550
  // Sentinel is `nexus_nodes` — the canonical project-scope graph table in
561
551
  // `main` (ADR-090 · T11648); the former `nexus_project_registry` sentinel now
562
552
  // lives in the attached GLOBAL db, not this project handle.
563
- if (tableExists(nativeDb, 'nexus_nodes') && _nexusDbPath) {
564
- const backupPath = _nexusDbPath.replace(/\.db$/, '-pre-cleo.db.bak');
553
+ // `dbPath` is passed explicitly (T12039) — it used to be read from the
554
+ // module-global `_nexusDbPath`.
555
+ if (tableExists(nativeDb, 'nexus_nodes')) {
556
+ const backupPath = dbPath.replace(/\.db$/, '-pre-cleo.db.bak');
565
557
  if (!existsSync(backupPath)) {
566
558
  try {
567
- copyFileSync(_nexusDbPath, backupPath);
559
+ copyFileSync(dbPath, backupPath);
568
560
  }
569
561
  catch {
570
562
  /* non-fatal */
@@ -644,84 +636,58 @@ function runNexusMigrations(nativeDb, db) {
644
636
  * @task T11648 (ADR-090 runtime read half — project-scope graph + global attach)
645
637
  */
646
638
  export async function getNexusDb() {
647
- const requestedPath = getNexusDbPath();
639
+ return (await bindNexusDomain()).db.drizzle;
640
+ }
641
+ /**
642
+ * Bind the nexus schema to the {@link ProjectStore} holding the code graph,
643
+ * with the GLOBAL `cleo.db` ATTACHed for registry/identity reads.
644
+ *
645
+ * ## E6-L15 cutover (T12039)
646
+ *
647
+ * Replaces this module's singleton quintet (`_nexusDb` / `_nexusNativeDb` /
648
+ * `_nexusDbPath` / `_nexusRegistryPath` / `_nexusInitPromise`). Path keying,
649
+ * single-flight, and handle liveness move to the binding registry; this
650
+ * function keeps only what is genuinely nexus-specific — the two-scope open
651
+ * order and the registry ATTACH.
652
+ *
653
+ * The GLOBAL registry path is captured in the bound value rather than a
654
+ * separate module-global, so a `CLEO_HOME` change invalidates exactly this
655
+ * binding (and re-runs the global migration before re-attaching) instead of
656
+ * resetting a process-wide singleton that other projects also depended on.
657
+ *
658
+ * @returns The live nexus-domain binding.
659
+ *
660
+ * @task T12039 (E6-L15)
661
+ */
662
+ export async function bindNexusDomain() {
648
663
  const requestedRegistryPath = getNexusRegistryDbPath();
649
- // If singleton exists but points to a different PROJECT graph path (e.g.
650
- // CLEO_DIR changed between tests), reset it.
651
- if (_nexusDb && _nexusDbPath !== requestedPath) {
652
- resetNexusDbState();
653
- }
654
- // If the GLOBAL registry path changed (e.g. CLEO_HOME changed), reset fully so
655
- // the init path runs `openDualScopeDb('global')` to MIGRATE the new registry
656
- // file before the ATTACH — a cheap re-attach alone would bind an unmigrated
657
- // global (→ "no such table: nexus_project_registry"). (ADR-090 · T11648)
658
- if (_nexusDb && _nexusRegistryPath !== requestedRegistryPath) {
659
- resetNexusDbState();
664
+ // The registry home (`getCleoHome()`) can change between calls — tests that
665
+ // mutate `CLEO_HOME`, or a re-homed install. A stale binding would keep the
666
+ // OLD global ATTACHed, so drop it and re-establish (which re-runs the global
667
+ // consolidated migration before re-attaching; a bare re-attach would bind an
668
+ // unmigrated global → "no such table: nexus_project_registry"). ADR-090 · T11648.
669
+ const bound = peekProjectDomain('nexus');
670
+ if (bound && bound.db.registryPath !== requestedRegistryPath) {
671
+ releaseDomainBindings({ scope: 'project', domain: 'nexus' });
660
672
  }
661
- // Liveness guard (T11524): nexus shares the consolidated PROJECT `cleo.db`
662
- // handle with the other project-tier domains (tasks/brain/conduit). Another
663
- // domain may have closed + re-opened the shared `DatabaseSync` while our nexus
664
- // singleton still references the now-closed handle. Detect a stale (closed)
665
- // handle and drop the singleton so we re-derive from the live openDualScopeDb
666
- // cache below.
667
- if (_nexusDb && (_nexusNativeDb === null || !_nexusNativeDb.isOpen)) {
668
- resetNexusDbState();
669
- }
670
- if (_nexusDb) {
671
- // Re-validate the GLOBAL registry ATTACH on every singleton hit (ADR-090 ·
672
- // T11648). The registry home (`getCleoHome()`) can change between calls —
673
- // tests that mutate `CLEO_HOME` while the cwd-keyed project handle stays
674
- // cached, or a sibling domain that re-opened the shared project handle and
675
- // dropped the attach. `ensureGlobalRegistryAttached` early-returns when the
676
- // current attach already points at the right file, so this is cheap.
677
- if (_nexusNativeDb) {
678
- try {
679
- ensureGlobalRegistryAttached(_nexusNativeDb);
680
- }
681
- catch {
682
- // A failed re-attach means the shared handle is unusable — drop the
683
- // singleton so the next call re-derives a fresh handle + attach.
684
- resetNexusDbState();
685
- }
686
- }
687
- if (_nexusDb)
688
- return _nexusDb;
689
- }
690
- // If already initializing, wait for the in-flight init
691
- if (_nexusInitPromise)
692
- return _nexusInitPromise;
693
- _nexusInitPromise = (async () => {
694
- const dbPath = requestedPath;
695
- _nexusDbPath = dbPath;
696
- _nexusRegistryPath = requestedRegistryPath;
697
- // ADR-086 / T10321 — warn (one-shot, non-blocking) if the install still
698
- // carries the nested-nexus migration debris. Does not alter the open.
699
- detectAndWarnOnNestedNexus();
700
- // ── Registry home: open GLOBAL first (T11648) ──────────────────────────
701
- // The registry/identity tables are global (ADR-090 §2.2). Opening the GLOBAL
702
- // scope through the dual-scope chokepoint runs its consolidated migration,
703
- // guaranteeing those tables (and their schema) physically exist before we
704
- // ATTACH the global file into the project handle below. This is the same
705
- // shared handle the global-tier siblings (skills/agent-registry) hold; we do
706
- // NOT keep a reference to it — we only need its schema materialised on disk.
707
- await openDualScopeDb('global');
708
- // ── Graph home: open PROJECT scope as `main` (T11648 · ADR-090 §2.1/§2.4) ─
709
- // openDualScopeDb('project') applies the pragma SSoT, creates the directory,
710
- // runs the consolidated cleo-project migrations (which OWN the five PREFIXED
711
- // graph tables), and manages the singleton cache. We pass NO cwd: the
712
- // dual-scope resolver resolves the canonical project root via the
713
- // `resolveCleoDir()` SSoT (CWD-walk / CLEO_DIR / worktree scope) — never a
714
- // bare `process.cwd()` (T9584). Omitting the cwd also keeps the exodus-on-open
715
- // hook un-armed, which is correct for the runtime READ path (exodus is a
716
- // separate explicit step).
717
- const dualHandle = await openDualScopeDb('project');
718
- // Extract the underlying DatabaseSync. Drizzle exposes it via `$client`.
719
- const nativeDb = dualHandle.db.$client ?? null;
720
- if (!nativeDb) {
721
- throw new Error('T11648: openDualScopeDb returned a handle without $client — ' +
722
- 'cannot extract DatabaseSync for the nexus-schema drizzle wrapping.');
723
- }
724
- _nexusNativeDb = nativeDb;
673
+ // ADR-086 / T10321 — warn (one-shot, non-blocking) if the install still
674
+ // carries the nested-nexus migration debris. Does not alter the open.
675
+ detectAndWarnOnNestedNexus();
676
+ // ── Registry home: open GLOBAL first (T11648) ────────────────────────────
677
+ // The registry/identity tables are global (ADR-090 §2.2). Opening the GLOBAL
678
+ // scope through the dual-scope chokepoint runs its consolidated migration,
679
+ // guaranteeing those tables (and their schema) physically exist before we
680
+ // ATTACH the global file into the project handle below. This is the same
681
+ // shared handle the global-tier siblings (skills/agent-registry) hold; we do
682
+ // NOT keep a reference to it — we only need its schema materialised on disk.
683
+ await openDualScopeDb('global');
684
+ // ── Graph home: open PROJECT scope as `main` (T11648 · ADR-090 §2.1/§2.4) ──
685
+ // We pass NO cwd: the dual-scope resolver resolves the canonical project root
686
+ // via the `resolveCleoDir()` SSoT (CWD-walk / CLEO_DIR / worktree scope) —
687
+ // never a bare `process.cwd()` (T9584). Omitting the cwd also keeps the
688
+ // exodus-on-open hook un-armed, which is correct for the runtime READ path
689
+ // (exodus is a separate explicit step).
690
+ const binding = await bindProjectDomain('nexus', undefined, (nativeDb, store) => {
725
691
  // ATTACH the GLOBAL `cleo.db` so the registry/identity tables resolve by
726
692
  // their bare names via SQLite's fall-through (ADR-090 · T11648). Idempotent.
727
693
  ensureGlobalRegistryAttached(nativeDb);
@@ -735,21 +701,27 @@ export async function getNexusDb() {
735
701
  // inline-column DROP), and the `_nexus_meta` health-probe sentinel. The
736
702
  // legacy drop/rebuild (`establishLegacyNexusSchema`) is GONE — the
737
703
  // consolidated migration is the single SSoT for the base tables (T11578 · AC3).
738
- runNexusMigrations(nativeDb, db);
704
+ runNexusMigrations(nativeDb, db, store.dbPath);
739
705
  // Seed schema version for new databases (no-op if already set)
740
706
  nativeDb
741
707
  .prepare(`INSERT OR IGNORE INTO nexus_schema_meta (key, value) VALUES ('schemaVersion', '${NEXUS_SCHEMA_VERSION}')`)
742
708
  .run();
743
- // Set singleton only after migrations complete
744
- _nexusDb = db;
745
- return db;
746
- })();
709
+ return { drizzle: db, registryPath: requestedRegistryPath };
710
+ });
711
+ // Re-validate the GLOBAL registry ATTACH on every bind, including cache hits.
712
+ // A sibling domain that re-opened the shared project handle drops the attach
713
+ // without invalidating our binding. `ensureGlobalRegistryAttached` early-returns
714
+ // when the current attach already points at the right file, so this is cheap.
747
715
  try {
748
- return await _nexusInitPromise;
716
+ ensureGlobalRegistryAttached(binding.native);
749
717
  }
750
- finally {
751
- _nexusInitPromise = null;
718
+ catch {
719
+ // A failed re-attach means this handle is unusable — drop the binding so the
720
+ // next call re-derives a fresh handle + attach.
721
+ releaseDomainBindings({ scope: 'project', domain: 'nexus' });
722
+ throw new Error('T12039: nexus binding lost its GLOBAL registry ATTACH and could not re-attach.');
752
723
  }
724
+ return binding;
753
725
  }
754
726
  /**
755
727
  * Close the nexus-domain database connection and release resources.
@@ -767,13 +739,9 @@ export async function getNexusDb() {
767
739
  * coordinated reset (`closeAllDatabases` → `_resetDualScopeDbCache`).
768
740
  */
769
741
  export function closeNexusDb() {
770
- // Drop only the nexus singleton references. Do NOT close `_nexusNativeDb` — it
771
- // is the shared dual-scope project handle, possibly still in use by siblings.
772
- _nexusNativeDb = null;
773
- _nexusDb = null;
774
- _nexusDbPath = null;
775
- _nexusRegistryPath = null;
776
- _nexusInitPromise = null;
742
+ // Drop only the nexus-domain binding. Do NOT close the connection — it is the
743
+ // shared dual-scope project handle, possibly still in use by siblings.
744
+ releaseDomainBindings({ scope: 'project', domain: 'nexus' });
777
745
  }
778
746
  /**
779
747
  * Reset nexus singleton state without saving.
@@ -787,11 +755,7 @@ export function closeNexusDb() {
787
755
  * is shared with the other project-tier domains). Mirrors {@link closeNexusDb}.
788
756
  */
789
757
  export function resetNexusDbState() {
790
- _nexusNativeDb = null;
791
- _nexusDb = null;
792
- _nexusDbPath = null;
793
- _nexusRegistryPath = null;
794
- _nexusInitPromise = null;
758
+ releaseDomainBindings({ scope: 'project', domain: 'nexus' });
795
759
  }
796
760
  /**
797
761
  * Get the underlying node:sqlite DatabaseSync instance for the nexus domain.
@@ -799,7 +763,7 @@ export function resetNexusDbState() {
799
763
  * Returns null if the database hasn't been initialized.
800
764
  */
801
765
  export function getNexusNativeDb() {
802
- return _nexusNativeDb;
766
+ return boundProjectNative('nexus');
803
767
  }
804
768
  /**
805
769
  * Re-export nexus schema for external use.
@@ -1 +1 @@
1
- {"version":3,"file":"nexus-sqlite.js","sourceRoot":"","sources":["../../src/store/nexus-sqlite.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoEG;AAEH,OAAO,EAAE,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC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AAC;AACjB,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,YAAY;IAC1B,8EAA8E;IAC9E,uEAAuE;IACvE,qBAAqB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/D,CAAC;AAED;;;;;;;;;;GAUG;AACH,MAAM,UAAU,iBAAiB;IAC/B,qBAAqB,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,CAAC;AAC/D,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,gBAAgB;IAC9B,OAAO,kBAAkB,CAAC,OAAO,CAAC,CAAC;AACrC,CAAC;AAGD;;GAEG;AACH,OAAO,EAAE,WAAW,EAAE,CAAC"}
@@ -0,0 +1,233 @@
1
+ /**
2
+ * Path-keyed domain binding registry — the single owner of every per-domain
3
+ * Drizzle wrapper in the CLEO runtime.
4
+ *
5
+ * ## Why this module exists (E6-L13 · T12037)
6
+ *
7
+ * Before this leaf, each store facade (`sqlite.ts`, `memory-sqlite.ts`,
8
+ * `conduit-sqlite.ts`, `nexus-sqlite.ts`, `skills-db.ts`) owned its OWN
9
+ * process-global singleton quartet:
10
+ *
11
+ * ```ts
12
+ * let _db: NodeSQLiteDatabase | null = null;
13
+ * let _nativeDb: DatabaseSync | null = null;
14
+ * let _dbPath: string | null = null;
15
+ * let _initPromise: Promise<NodeSQLiteDatabase> | null = null;
16
+ * ```
17
+ *
18
+ * Five independent caches over ONE shared `DatabaseSync` produced a documented
19
+ * class of defects:
20
+ *
21
+ * - **Last-project-wins** — `_dbPath` held a single project. Touching project B
22
+ * reset the singleton, so an interleaved project-A query re-opened and
23
+ * re-migrated on every alternation (thrash, not just slowness).
24
+ * - **Cross-domain staleness** — the tasks singleton could reference a
25
+ * `DatabaseSync` that the brain domain had already closed (T12019/T12020),
26
+ * surfacing as `database is not open` or, worse, a silently-nulled
27
+ * `sourceSessionId`.
28
+ * - **Band-aid retry loops** — both `getDb` and `getBrainDb` grew bounded
29
+ * re-acquisition loops (T12035) purely to paper over the above.
30
+ *
31
+ * This module replaces all five with ONE registry keyed by
32
+ * `${scope}::${canonical dbPath}::${domain}`, layered on the
33
+ * {@link CleoRuntime} store registry (T12036). A binding is valid only while
34
+ * the {@link ProjectStore} / {@link GlobalStore} instance it was established
35
+ * against is still the one the runtime hands out AND its native handle is
36
+ * open. Any eviction — a `close()`, a `_resetDualScopeDbCache`, an external
37
+ * teardown — yields a fresh store object, which invalidates every binding
38
+ * derived from it by identity comparison. No liveness polling, no retry loop,
39
+ * no "last opened project".
40
+ *
41
+ * ## What a domain owns after this leaf
42
+ *
43
+ * A domain owns its `establish` function — the schema reconciliation it must
44
+ * run against a native handle (legacy Drizzle wrapping, `runMigrations`,
45
+ * vec0 extension loading, seed rows). It no longer owns caching, path
46
+ * resolution, single-flight, or liveness. Those are this module's job.
47
+ *
48
+ * @packageDocumentation
49
+ * @task T12037 (E6-L13)
50
+ * @epic T11249 (E6)
51
+ * @saga T11242 (SG-DB-SUBSTRATE-V2)
52
+ */
53
+ import type { DatabaseSync } from 'node:sqlite';
54
+ import { type CleoRuntime, type GlobalStore, type ProjectStore } from '../dual-scope-db.js';
55
+ /**
56
+ * Get (or lazily create) the process-wide {@link CleoRuntime}.
57
+ *
58
+ * @returns The shared runtime store registry.
59
+ */
60
+ export declare function getCleoRuntime(): CleoRuntime;
61
+ /**
62
+ * Tear down the process-wide runtime: close every registry entry and drop
63
+ * every domain binding. The next {@link getCleoRuntime} call builds a fresh
64
+ * registry.
65
+ *
66
+ * Used by full-teardown paths (`closeAllDatabases`) and by tests that need a
67
+ * pristine process state between cases.
68
+ */
69
+ export declare function resetCleoRuntime(): void;
70
+ /**
71
+ * A domain's live binding to one store.
72
+ *
73
+ * @typeParam TDb - The domain's Drizzle handle type (its legacy schema shape).
74
+ */
75
+ export interface DomainBinding<TDb, TStore extends ProjectStore | GlobalStore> {
76
+ /** The store this binding was established against. */
77
+ readonly store: TStore;
78
+ /** The native `DatabaseSync` extracted from {@link store}. */
79
+ readonly native: DatabaseSync;
80
+ /** The domain-typed Drizzle handle produced by the domain's `establish`. */
81
+ readonly db: TDb;
82
+ }
83
+ /**
84
+ * Bind a project-scope domain schema to the {@link ProjectStore} for `cwd`.
85
+ *
86
+ * This is the replacement for every `getXxxDb(cwd)` project-domain facade.
87
+ * The returned binding carries the store itself, so callers that need a
88
+ * cross-domain transaction hold an explicit handle rather than reaching for a
89
+ * process global.
90
+ *
91
+ * @typeParam TDb - The domain's Drizzle handle type.
92
+ * @param domain - Stable domain id; part of the registry key.
93
+ * @param cwd - Project working directory. Resolved to the canonical
94
+ * `cleo.db` path and forwarded as `exodusCwd` so a port open arms the
95
+ * exodus-on-open auto-migration exactly like the facade it replaces.
96
+ * @param establish - Reconcile the domain's schema against the native handle
97
+ * and return the domain-typed Drizzle instance. Called once per
98
+ * (path, domain, store instance); MUST be idempotent because a store
99
+ * eviction re-runs it.
100
+ * @returns The live {@link DomainBinding}.
101
+ */
102
+ export declare function bindProjectDomain<TDb>(domain: string, cwd: string | undefined, establish: (native: DatabaseSync, store: ProjectStore) => TDb | Promise<TDb>): Promise<DomainBinding<TDb, ProjectStore>>;
103
+ /**
104
+ * Bind a project-scope domain schema to an EXPLICIT database path.
105
+ *
106
+ * Used by domains whose legacy lifecycle API accepted an on-disk path (test
107
+ * fixtures, snapshot inspection). Never arms exodus-on-open — an explicit
108
+ * path must not auto-migrate a legacy fleet into a fixture.
109
+ *
110
+ * @typeParam TDb - The domain's Drizzle handle type.
111
+ * @param domain - Stable domain id.
112
+ * @param dbPath - Absolute path to a consolidated `cleo.db`.
113
+ * @param establish - See {@link bindProjectDomain}.
114
+ */
115
+ export declare function bindProjectDomainAtPath<TDb>(domain: string, dbPath: string, establish: (native: DatabaseSync, store: ProjectStore) => TDb | Promise<TDb>): Promise<DomainBinding<TDb, ProjectStore>>;
116
+ /**
117
+ * Bind a global-scope domain schema to the {@link GlobalStore}.
118
+ *
119
+ * This is the replacement for every `getXxxDb()` global-domain facade
120
+ * (nexus, skills, agents, telemetry).
121
+ *
122
+ * @typeParam TDb - The domain's Drizzle handle type.
123
+ * @param domain - Stable domain id; part of the registry key.
124
+ * @param establish - See {@link bindProjectDomain}.
125
+ * @param cwd - Optional cwd forwarded as `exodusCwd` for the global scope's
126
+ * own legacy-fleet auto-migration.
127
+ */
128
+ export declare function bindGlobalDomain<TDb>(domain: string, establish: (native: DatabaseSync, store: GlobalStore) => TDb | Promise<TDb>, cwd?: string): Promise<DomainBinding<TDb, GlobalStore>>;
129
+ /**
130
+ * Bind a global-scope domain schema to an EXPLICIT database path.
131
+ *
132
+ * The path-aware sibling of {@link bindGlobalDomain}, for domains whose
133
+ * lifecycle API accepts an on-disk path — notably the skills registry's
134
+ * test-sandbox `{ path }` override. Never arms exodus-on-open.
135
+ *
136
+ * @typeParam TDb - The domain's Drizzle handle type.
137
+ * @param domain - Stable domain id.
138
+ * @param dbPath - Absolute path to a global-scope `cleo.db`.
139
+ * @param establish - See {@link bindProjectDomain}.
140
+ */
141
+ export declare function bindGlobalDomainAtPath<TDb>(domain: string, dbPath: string, establish: (native: DatabaseSync, store: GlobalStore) => TDb | Promise<TDb>): Promise<DomainBinding<TDb, GlobalStore>>;
142
+ /**
143
+ * Synchronously read an ALREADY-established binding at an EXPLICIT path.
144
+ *
145
+ * @typeParam TDb - The domain's Drizzle handle type.
146
+ * @param scope - Dual-scope discriminator.
147
+ * @param dbPath - Absolute database path.
148
+ * @param domain - Stable domain id.
149
+ */
150
+ export declare function peekDomainAtPath<TDb>(scope: 'project' | 'global', dbPath: string, domain: string): DomainBinding<TDb, ProjectStore | GlobalStore> | null;
151
+ /**
152
+ * Drop cached bindings.
153
+ *
154
+ * Dropping a binding does NOT close any connection — the runtime registry and
155
+ * the dual-scope chokepoint own connection lifecycle. This only forces the
156
+ * next bind to re-run the domain's `establish`.
157
+ *
158
+ * @param filter - Restrict the drop. Omit any field to match all values of it.
159
+ * `{ scope: 'project' }` drops every project-domain binding;
160
+ * `{ domain: 'brain' }` drops the brain binding for every project.
161
+ */
162
+ export declare function releaseDomainBindings(filter?: {
163
+ scope?: 'project' | 'global';
164
+ dbPath?: string;
165
+ domain?: string;
166
+ }): void;
167
+ /**
168
+ * Drop every cached binding in every scope. Equivalent to
169
+ * `releaseDomainBindings()` with no filter; named for call-site clarity in
170
+ * teardown paths.
171
+ */
172
+ export declare function releaseAllDomainBindings(): void;
173
+ /**
174
+ * Snapshot of currently-established binding keys.
175
+ *
176
+ * Read-only diagnostic surface for `cleo health` / architecture tests that
177
+ * assert a process holds exactly one binding per (path, domain).
178
+ */
179
+ export declare function boundDomainKeys(): ReadonlySet<string>;
180
+ /**
181
+ * Synchronously look up the native `DatabaseSync` of an ALREADY-established
182
+ * project-domain binding.
183
+ *
184
+ * This exists solely to keep the legacy synchronous native getters
185
+ * (`getNativeDb`, `getNativeTasksDb`, `getBrainNativeDb`) working while their
186
+ * call sites migrate to the async binding. Unlike the module-global they
187
+ * replace, this lookup is **path-keyed** — passing the caller's `cwd` returns
188
+ * that project's handle rather than "whichever project was opened last".
189
+ *
190
+ * Returns `null` when nothing is bound yet or the connection has since
191
+ * closed; callers must have awaited the domain's async binder first.
192
+ *
193
+ * @param domain - Stable domain id.
194
+ * @param cwd - Project working directory; resolved to the canonical path.
195
+ * @returns The live native connection, or `null`.
196
+ *
197
+ * @deprecated Read `.native` from the {@link DomainBinding} instead. Removed
198
+ * when the last synchronous native getter is retired (T12040 · E6-L16).
199
+ */
200
+ export declare function boundProjectNative(domain: string, cwd?: string): DatabaseSync | null;
201
+ /**
202
+ * Synchronously read an ALREADY-established project-domain binding without
203
+ * opening anything.
204
+ *
205
+ * Returns `null` when the domain is unbound for that project or its
206
+ * connection has closed. Unlike {@link bindProjectDomain} this never triggers
207
+ * an open, so it is safe on synchronous code paths (accessor predicates,
208
+ * health probes) that must not force a migration.
209
+ *
210
+ * @typeParam TDb - The domain's Drizzle handle type, as passed to
211
+ * {@link bindProjectDomain}. Unchecked at runtime — the caller is
212
+ * responsible for using the same type it bound with.
213
+ * @param domain - Stable domain id.
214
+ * @param cwd - Project working directory.
215
+ */
216
+ export declare function peekProjectDomain<TDb>(domain: string, cwd?: string): DomainBinding<TDb, ProjectStore> | null;
217
+ /**
218
+ * Synchronous sibling of {@link peekProjectDomain} for the global scope.
219
+ *
220
+ * @typeParam TDb - The domain's Drizzle handle type.
221
+ * @param domain - Stable domain id.
222
+ */
223
+ export declare function peekGlobalDomain<TDb>(domain: string): DomainBinding<TDb, GlobalStore> | null;
224
+ /**
225
+ * Synchronous sibling of {@link boundProjectNative} for the global scope.
226
+ *
227
+ * @param domain - Stable domain id.
228
+ * @returns The live native connection, or `null`.
229
+ *
230
+ * @deprecated See {@link boundProjectNative}.
231
+ */
232
+ export declare function boundGlobalNative(domain: string): DatabaseSync | null;
233
+ //# sourceMappingURL=domain-binding.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"domain-binding.d.ts","sourceRoot":"","sources":["../../../src/store/ports/domain-binding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmDG;AAGH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EACL,KAAK,WAAW,EAEhB,KAAK,WAAW,EAChB,KAAK,YAAY,EAElB,MAAM,qBAAqB,CAAC;AAY7B;;;;GAIG;AACH,wBAAgB,cAAc,IAAI,WAAW,CAK5C;AAED;;;;;;;GAOG;AACH,wBAAgB,gBAAgB,IAAI,IAAI,CAUvC;AAED;;;;GAIG;AACH,MAAM,WAAW,aAAa,CAAC,GAAG,EAAE,MAAM,SAAS,YAAY,GAAG,WAAW;IAC3E,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,8DAA8D;IAC9D,QAAQ,CAAC,MAAM,EAAE,YAAY,CAAC;IAC9B,4EAA4E;IAC5E,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