From c054c41943bd0497663d3efea9894897bd974bc9 Mon Sep 17 00:00:00 2001 From: David Snelling Date: Thu, 19 Mar 2026 09:46:11 -0700 Subject: [PATCH] fix: add rootDirectory to BrainyConfig.storage type MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The storage config type only exposed { type, options, branch } but plugin storage factories (e.g. Cortex mmap) read rootDirectory from the top level of the config object. This caused undefined storage paths when Cortex was active. The underlying StorageOptions interface already declares rootDirectory — this aligns BrainyConfig.storage to match. Co-Authored-By: Claude Opus 4.6 (1M context) --- package.json | 2 +- src/types/brainy.types.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/package.json b/package.json index b7bd08c6..b5cbd006 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@soulcraft/brainy", - "version": "7.19.10", + "version": "7.19.11", "description": "Universal Knowledge Protocol™ - World's first Triple Intelligence database unifying vector, graph, and document search in one API. Stage 3 CANONICAL: 42 nouns × 127 verbs covering 96-97% of all human knowledge.", "main": "dist/index.js", "module": "dist/index.js", diff --git a/src/types/brainy.types.ts b/src/types/brainy.types.ts index d1d4c12c..c39e6c5e 100644 --- a/src/types/brainy.types.ts +++ b/src/types/brainy.types.ts @@ -889,6 +889,9 @@ export interface BrainyConfig { // Storage configuration storage?: { type: 'auto' | 'memory' | 'filesystem' | 's3' | 'r2' | 'opfs' | 'gcs' + /** Root directory for filesystem storage. Passed through to storage factories + * including plugin-provided factories (e.g. Cortex mmap). */ + rootDirectory?: string options?: any branch?: string // COW branch name (default: 'main') }