Context
#10582 surfaced an asymmetry: KB's defaultConfig exports neoRootDir; Memory Core and Neural Link have it as a module-local const but don't export it. As a result, consumers (loggers, services, future) can't read aiConfig.neoRootDir from MC/NL — they have to compute their own import.meta.url-based fallback.
This was caught empirically during #10582 implementation: my first-pass MC logger used aiConfig.neoRootDir and threw in the KB regression suite (transitive load → undefined → path.resolve(undefined, ...) TypeError). Worked around with local neoRootFallback consts in both MC and NL loggers; symmetry on the config side is the cleaner fix.
Proposed Fix
Two-line change per server:
Memory Core (ai/mcp/server/memory-core/config.template.mjs):
The local neoRootDir const at line 8 is already computed. Add it as the first key of defaultConfig:
const defaultConfig = {
neoRootDir,
autoSummarizeOnStartup: process.env.AUTO_SUMMARIZE_ON_STARTUP === 'true',
};
Neural Link (ai/mcp/server/neural-link/config.template.mjs):
The local neoRootDir const (added in #10582) is already computed. Add to defaultConfig:
const defaultConfig = {
neoRootDir,
autoConnect: true,
};
After the merge, all three MCP server configs expose aiConfig.neoRootDir symmetrically (matching KB's pattern from before #10582).
Acceptance Criteria
aiConfig.neoRootDir returns the repo root from MC's exported config (parity with KB)
aiConfig.neoRootDir returns the repo root from NL's exported config (parity with KB)
- Loggers' local
neoRootFallback consts can stay or be cleaned up — non-binding cleanup either way
- No regression on any existing test suite
Avoided Traps
- NOT a config refactor. Each server keeps its existing config structure; this is a single-key addition mirroring KB.
- NOT removing the loggers' local fallbacks in this ticket. Belt-and-suspenders against test overrides + stale gitignored
config.mjs deployments. A separate cleanup ticket can simplify if desired, but the redundancy is harmless.
- NOT touching service-level paths that currently use
cwd or os.homedir() — those have their own ownership semantics; this ticket is scoped to exposing neoRootDir for consumers that want it.
Origin
- Empirical surface: 2026-05-01 #10582 implementation hit the asymmetry in KB regression suite
- Tobiu's question post-#10583 merge: "why not add the same root dir config to MC? might be a quick win ticket."
- Follow-up to #10582 commits:
7fb158ec64de (introduces local neoRootFallback consts in MC + NL loggers)
- Origin Session ID: 7a2c3c2a-d0f1-462a-8489-69b031221040
Context
#10582 surfaced an asymmetry: KB's
defaultConfigexportsneoRootDir; Memory Core and Neural Link have it as a module-local const but don't export it. As a result, consumers (loggers, services, future) can't readaiConfig.neoRootDirfrom MC/NL — they have to compute their ownimport.meta.url-based fallback.This was caught empirically during #10582 implementation: my first-pass MC logger used
aiConfig.neoRootDirand threw in the KB regression suite (transitive load → undefined →path.resolve(undefined, ...)TypeError). Worked around with localneoRootFallbackconsts in both MC and NL loggers; symmetry on the config side is the cleaner fix.Proposed Fix
Two-line change per server:
Memory Core (
ai/mcp/server/memory-core/config.template.mjs): The localneoRootDirconst at line 8 is already computed. Add it as the first key ofdefaultConfig:const defaultConfig = { neoRootDir, // <-- new autoSummarizeOnStartup: process.env.AUTO_SUMMARIZE_ON_STARTUP === 'true', // ... };Neural Link (
ai/mcp/server/neural-link/config.template.mjs): The localneoRootDirconst (added in #10582) is already computed. Add todefaultConfig:const defaultConfig = { neoRootDir, // <-- new autoConnect: true, // ... };After the merge, all three MCP server configs expose
aiConfig.neoRootDirsymmetrically (matching KB's pattern from before #10582).Acceptance Criteria
aiConfig.neoRootDirreturns the repo root from MC's exported config (parity with KB)aiConfig.neoRootDirreturns the repo root from NL's exported config (parity with KB)neoRootFallbackconsts can stay or be cleaned up — non-binding cleanup either wayAvoided Traps
config.mjsdeployments. A separate cleanup ticket can simplify if desired, but the redundancy is harmless.cwdoros.homedir()— those have their own ownership semantics; this ticket is scoped to exposingneoRootDirfor consumers that want it.Origin
7fb158ec64de(introduces localneoRootFallbackconsts in MC + NL loggers)