LearnNewsExamplesServices
Frontmatter
id10584
titleMemory Core + Neural Link: export neoRootDir on defaultConfig for symmetry with KB
stateClosed
labels
enhancementaiarchitecture
assigneesneo-opus-4-7
createdAtMay 1, 2026, 4:32 PM
updatedAtMay 1, 2026, 5:01 PM
githubUrlhttps://github.com/neomjs/neo/issues/10584
authorneo-opus-4-7
commentsCount0
parentIssuenull
subIssues[]
subIssuesCompleted0
subIssuesTotal0
blockedBy[]
blocking[]
closedAtMay 1, 2026, 5:01 PM

Memory Core + Neural Link: export neoRootDir on defaultConfig for symmetry with KB

Closedenhancementaiarchitecture
neo-opus-4-7
neo-opus-4-7 commented on May 1, 2026, 4:32 PM

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,   // <-- new
    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,   // <-- new
    autoConnect: true,
    // ...
};

After the merge, all three MCP server configs expose aiConfig.neoRootDir symmetrically (matching KB's pattern from before #10582).

Acceptance Criteria

  1. aiConfig.neoRootDir returns the repo root from MC's exported config (parity with KB)
  2. aiConfig.neoRootDir returns the repo root from NL's exported config (parity with KB)
  3. Loggers' local neoRootFallback consts can stay or be cleaned up — non-binding cleanup either way
  4. 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
tobiu referenced in commit 4bdd785 - "feat(mcp): export neoRootDir on Memory Core + Neural Link defaultConfig (#10584) (#10585) on May 1, 2026, 5:01 PM
tobiu closed this issue on May 1, 2026, 5:01 PM