VS Code extension

Grounded code-knowledge and the tracked insrc workflow, wired into your AI assistant — the VS Code counterpart to the insrc JetBrains plugin. Like it, the extension is a thin orchestrator that owns no reasoning: it installs and manages the backing daemon, wires insrc into your AI host's MCP config, and registers your workspace — so your assistant answers from a citation-grounded model of your codebase.

What it is

All the reasoning still runs through the insrc MCP server that your host's assistant invokes — the extension opens no cloud path of its own. Its whole job is orchestration at editor lifecycle moments (activation, install, uninstall):

Privacy. The extension stores no secrets and opens no cloud path — all reasoning routes through your assistant's existing CLI / OAuth sessions. Every write into a host-owned config or rules file is marker-delimited and replace-only, so it preserves your surrounding content and is fully reversed on uninstall.

Requirements

RequirementWhy
VS Code 1.75+Stock Visual Studio Code (or a compatible fork such as Cursor). The extension activates on startup and stays dormant until you accept its onboarding prompts.
An MCP-capable AI hostThe agentic assistant that invokes the insrc MCP server — e.g. Claude Code or Cursor. The extension writes the MCP registration into that host's config; without one, insrc's tools simply aren't wired.
The insrc daemonThe backend the extension talks to. It is installed on first use (see onboarding below); no manual step needed.
Node + gitUsed by the daemon and its installer to clone and build the daemon into ~/.insrc/.

Install

A · VS Code Marketplace (recommended)

Open the Extensions view (⇧⌘X / Ctrl+Shift+X), search for insrc, and click Install — or install insors.insrc-vscode from the Marketplace page. Updates arrive like any other extension.

B · Install from a .vsix (pre-release / internal)

Build the package (see building from source) — a single insrc-vscode-<version>.vsix — then install it directly:

Extensions view → ⋯ → Install from VSIX… and select the built file, or from a shell: code --install-extension insrc-vscode-<version>.vsix.

First-run onboarding

Installing the extension does not touch the daemon by itself — setup happens on first activation, as one coalesced flow that prompts for each step independently and only when it is actually needed:

  1. Install the insrc daemon into ~/.insrc/. Accepting runs the bootstrap installer that clones and builds the daemon; if it is already present it is silently kept current instead.
  2. Register this workspace with the daemon (repo.add) so it gets indexed.
  3. Wire your AI host (Claude Code, Cursor, …) so insrc's MCP tools are available to your assistant.
Skipped a prompt? Every action is also a durable Command-Palette command: insrc: Install daemon / Start / Stop / Restart / Update daemon, insrc: Wire AI hosts, and insrc: Register workspace. Nothing happens without your explicit consent.

How it works

Once a workspace is registered, you keep using your assistant exactly as before — the extension just makes it far more grounded:

In the editor

Beyond the invisible wiring, the extension adds a small set of native surfaces so you can drive and inspect insrc without leaving VS Code or dropping to a shell:

These surfaces are read/edit views over the local daemon socket — no background polling (only the Debug log tails while its tab is open), and no cloud path. The only state-changing controls are explicit and, where they matter, consent-gated: config edits, the daemon lifecycle commands, the Debug stray-process cleanup, and repo-config writes.

Keeping the daemon current

On activation (only when the daemon is already reachable) the extension compares the installed daemon's commit against its upstream and, on drift, offers an Update / Dismiss notification that updates the daemon in place on your OK; updating the extension itself brings the daemon current automatically. A failed update surfaces once with the reason — nothing is retried or rolled back, because the daemon owns its own state.

After a successful update the extension nudges you to Reload Window so the insrc MCP connection reconnects to the freshly-updated daemon. A claude / codex session running outside the editor needs a manual restart instead — reloading the window respawns the editor's own MCP host, not an external CLI.

Clean removal

All of the extension's writes into host-owned files are reversible:

Build from source

The extension lives in-repo under vscode-plugin/. It bundles with esbuild to a self-contained .vsix that inlines the shared IPC client and marks vscode external (shipping no repo source):

bash
$ cd vscode-plugin
$ npm install
$ npm test          # the node:test (tsx --test) suite — the local gate
$ npm run bundle    # esbuild → out/extension.js + out/uninstall.js (CJS)
$ npm run package   # @vscode/vsce package → a single .vsix
Publishing is a deliberate, manually-triggered action — never a per-push CI job — and targets the VS Code Marketplace only: bump the version in package.json, then run the vscode-plugin GitHub Actions workflow (workflow_dispatch), which bundles, packages and vsce publishes using the VSCE_PAT secret.

Where next