Neural Inverse is Open Source →
GuidesArchitecture
GuidesOpen Source ContributingArchitecture

Architecture

Neural Inverse OSS is built on VS Code. All Neural Inverse features live under src/vs/workbench/contrib/.


Modules

ModuleWhat it isWindow
void/Core LLM integration — chat, inline edit, autocomplete, settings, threadsSidebar (Ctrl+L, Ctrl+K)
powerMode/Autonomous coding agent with tool callingCmd+Alt+P
neuralInverse/Agent manager, model management, deploymentsCmd+Alt+A
neuralInverseFirmware/Embedded development — MCU database, SVD, serial, debugCmd+Alt+F
neuralInverseModernisation/Legacy migration — 5-stage pipeline with KBCmd+Alt+M

Process Model

ProcessFolder patternHas access to
Browser (renderer)browser/DOM, window, React components
Main (Node.js)electron-main/node_modules, filesystem, network
Common (shared)common/Types and utilities — no process-specific APIs

LLM requests route from browser to main process via IPC. This avoids CSP restrictions and lets us use provider SDKs (Anthropic, OpenAI, Ollama, etc.) that require Node.js.


Service Registration

Every module has a .contribution.ts file that imports services as side-effects:

// void.contribution.ts
import './editCodeService.js'
import './sidebarPane.js'
import './autocompleteService.js'
// ...

Each imported file calls registerSingleton() which registers the service with VS Code's DI container.

Services inject dependencies via decorators:

constructor(
  @ILLMMessageService private readonly llm: ILLMMessageService,
  @IVoidSettingsService private readonly settings: IVoidSettingsService,
) {}

How Features Connect

User types in Sidebar Chat (Ctrl+L)
  -> ChatThreadService stores message
  -> LLMMessageService routes to main process
  -> Main process calls provider SDK (streaming)
  -> Response streams back via IPC events
  -> If tool calls: IToolsService dispatches to registered tools
  -> If code edits: EditCodeService creates DiffZones
  -> Inline diffs render in the editor (red/green)
  -> Checkpoints created for undo

User opens firmware workspace
  -> ProjectDetector scans for firmware markers
  -> MCUDatabase loads matching MCU profile
  -> SVDParser loads register maps
  -> HardwareContextProvider injects MCU context into LLM prompts
  -> fw_* tools become available in chat + Power Mode

User starts modernisation session
  -> ModernisationSessionService tracks state
  -> Discovery/Planning/Translation engines run per stage
  -> KnowledgeBase persists all decisions
  -> Tools auto-register for Power Mode access

Shared Infrastructure

ServiceWhat it doesUsed by
ILLMMessageServiceRoutes LLM requests to providersEverything
IVoidSettingsServiceProvider configs, model selections, preferencesEverything
IVoidInternalToolServiceTool registry for agent tool callingPower Mode, Sidebar, Modernisation
IEditCodeServiceCode modification (fast/slow apply, diffs)Chat, Ctrl+K, Power Mode
IChatThreadServiceConversation threads + checkpointsChat, Power Mode

Key Rules for Contributors

  1. ASCII only in TS/JS string literals — non-ASCII breaks the esbuild release build
  2. No any casts — find the correct type
  3. No changes outside contrib/ without discussion — upstream VS Code code is maintained separately
  4. BYOLLM attribution — AI-assisted commits need dual Co-authored-by trailers (see CONTRIBUTING.md)
  5. Semicolons — follow existing convention per file
  6. Service registration — always through .contribution.ts side-effect imports, never direct instantiation

Was this page helpful?