Agent Gloss for VS Code
Review long Markdown specs and agent-generated plans inside VS Code with the
same *.review.json sidecar as the AgentGloss terminal reviewer. The webview
renders Markdown and Mermaid diagrams (bundled Mermaid v11), and every comment
or suggested edit is stored by the Rust bridge so agloss request,
export, wait, and resolve keep working unchanged.
Requirements
- VS Code 1.90 or newer.
- The
agloss binary with the hidden bridge command. The agentgloss alias
also works. Build it from this repository (cargo build --release) or
install a release that includes it.
- A trusted workspace.
- Windows: use VS Code Remote - WSL with the Linux binary installed inside
WSL. Native Windows extension hosts need a native
agloss.exe, which is not
released yet; a WSL/Linux binary cannot be spawned from native Windows VS Code.
Setup
Put agloss on PATH, or set the machine-scoped agentgloss.path setting
(the key is unchanged for compatibility) to the binary:
{
"agentgloss.path": "/Users/you/.local/bin/agloss"
}
The extension never runs the binary in an untrusted workspace and spawns it
with execFile (no shell).
On Windows, connect VS Code to an x86_64 WSL2 distribution (Remote - WSL) and
install the Linux binary there. The extension runs in the WSL remote and uses
the same sidecar workflow as in the terminal.
Use
- The agent runs
agloss request spec.md (or open any Markdown file).
- Run Agent Gloss: Open Review from the Command Palette, the AgentGloss
annotation button in the editor title bar, the Explorer file context menu,
or the editor-tab context menu.
- Select rendered text or a block to comment or suggest an edit.
- Use the inline cards to edit, resolve, reopen, delete, or reattach stale
items.
- Choose Sign off. With open or stale items the review is sent as
feedback; otherwise the revision is approved.
- The agent runs
agloss export spec.md or agloss wait spec.md.
The webview reads the on-disk document. If the editor has unsaved changes it
shows a banner and asks you to save before editing the review.
Exact line selections
Rendered selections are block/paragraph level. For line-exact selections
(including inside tables and code fences), select text in the normal Markdown
editor and run Agent Gloss: Comment on Selection or Agent Gloss: Suggest
Edit for Selection from the context menu. Source-editor suggestions accept a
single-line replacement; use the rendered webview for multiline replacements.
Modes and interoperability
- TUI and webview are interchangeable. Both write the sidecar; the open
panel refreshes when another front end changes it.
- While a terminal
agloss review session holds the sidecar lock, the
webview stays readable but cannot mutate.
- Local images are shown when they live inside the document directory or a
workspace folder; remote images render as links.
- Mermaid uses strict security mode. A diagram that fails to parse shows its
source instead.
Development
npm install
npm run check # TypeScript
npm test # Vitest + jsdom
npm run build # esbuild bundles
npm run package # VSIX in this directory
Install the VSIX with:
code --install-extension agentgloss-<version>.vsix --force
Or install InnopiaPteLtd.agentgloss from the Visual Studio Marketplace.
Marketplace publishing
.github/workflows/publish-vscode.yml publishes the extension on v* tags or
on manual dispatch from main using Marketplace Trusted Publishing over GitHub
OIDC. It does not use a VSCE_PAT.
Configure the publisher (InnopiaPteLtd) Trusted Publishing policy with:
- Repository:
AgingChan/agentgloss
- Workflow:
publish-vscode.yml
- Environment: leave blank unless you add the same
environment: to the
workflow job
The workflow publishes every v* tag. It was first used for a manual v1.0.0
dispatch and now runs automatically on release tags.
Known limitations
- Rendered selections snap to annotated blocks/paragraphs; character-level
source selection is only available through the editor commands.
- Custom sidecar paths are not configurable in the webview yet.
- Remote extension hosts (WSL, SSH, containers) are out of scope for this
version.