Armada for VS Code
The Armada extension brings Armada into the editor. It connects to your Armada Admiral (the local one with no setup),
shows your missions, voyages, captains, fleet, merge queue and everything that needs you as live VS Code views, and
works the mission and voyage black box: when a mission or
voyage fails, the Admiral records where it failed, how, why, which files and missions conflicted, and the ranked
recovery paths. The extension lists those entries for the repository you have open, hands the FIX THIS brief to
your coding agent, and runs recovery paths with a dry run and a confirmation.
Everything is native VS Code: trees with live updates, context menus and inline actions, pages drawn with the editor's
own theme, logs and changes as read-only documents, forms for dispatch, create and edit, and Ask Armada as a sidebar
chat. The extension is being built out to full parity with the dashboard, the TUI, Harbor and the CLI
(archive/VSCODE_EXTENSION_PLAN.md); the areas without a native view yet are listed there.
The Armada view container
The Armada icon in the activity bar opens three views, as in Mux: Ask Armada (the chat), Conversations (its
conversation list) and Manage (everything else, in one tree laid out like the dashboard's navigation). They update
live from the Admiral's event stream, and a status bar item shows the active mission count and what needs you.
- Ask Armada: a chat with a captain, as on the dashboard's Ask page: your messages on the right, Armada's replies
on the left, streaming replies with a running timer, tool calls, and cards to approve or reject the actions it
proposes and the CLI tools it asks to run. Each reply shows its telemetry (time to first token, streaming and total
time, prompt, completion and cached tokens, tokens per second, cost, tool calls; hover for detail), and the
conversation's totals show at the end. The header picks the Captain that answers (or none, for quick actions
only), turns Auto-approve on or off (proposed actions run without a confirm card; it asks before turning on),
sets CLI tools (inherit, ask in Armada, refuse, or bypass for tenant and global admins, with the policy in
force), and chooses where the captain runs: Run on a Harbor (this computer's Harbor by default, so the captain
runs on your machine and answers "what files do you see?" from it) or the Armada server, in a Folder (the open
workspace folder by default on this computer;
~ is your home directory). Its buttons open it in an editor tab,
start a new conversation, reopen or delete an earlier one, and run quick actions (summarize, rename, mark unread,
show the work the conversation tracks, and the Admiral's own quick actions). Run on and Folder need an Admiral
newer than 1.3.0.
- Conversations: your Ask Armada conversations, pinned first and then the most recent, with unread counts and
age; hover for the summary. Click one to open it in the chat (the open one is marked). The pin button pins or unpins;
right-click to rename, summarize, mark read or unread, archive or unarchive, or delete (select several to act on
them together). The title bar starts a new conversation, searches titles, summaries and messages, shows or hides
archived conversations, and refreshes.
- Manage: the dashboard's navigation as a table of contents. Armada Overview, then the dashboard's hubs in its
order (Operations: Needs You, Dispatch, Fleet Actions, Missions, Activity; Build: Vessels, Captains, Delivery;
Configuration; System: API Explorer, Settings), each listing its tabs as the dashboard does (Activity: All Activity,
API Requests, Events, Signals, Token Usage, Captain Usage, Concurrency; Configuration: Workflow Profiles through
Memory; and so on). Click any entry to open its dashboard page in an editor tab (see Dashboard pages below); the
arrow on a hub lists its tabs. The tree never loads records itself, so it opens instantly, and Needs You shows how
many items wait for you. The title bar has Open Page..., the Overview, Dispatch Mission, Refresh and the
connection; its ... menu has backup and restore, the local Harbor (start, stop, restart, show, log, folder, id),
Install Armada MCP for Agents..., copy the MCP URL or diagnostics, change password, documentation and About
Armada.
Dashboard pages
What you open from Manage is the dashboard's own page, in an editor tab: the same charts, tables, forms, pickers
and actions as the browser, following the VS Code theme.
- Armada Overview: status, mission history, API requests over time and the token usage heatmap; it shows as soon as
the status arrives and fills in Recent Missions when its rows do.
- Needs You: every item waiting for you, each with the button that acts on it (approve or deny a review, answer a
CLI permission request, act on a model alert, open the failure).
- Dispatch, Create Voyage and Planning: vessel, pipeline, captain and Harbor pickers, each with a link to
manage what it offers; the backlog form picks its vessel.
- Activity: All Activity over the last hour, day, week or month (or all time), API Requests with its chart,
Events, Signals, the Token Usage heatmap, Captain Usage and Concurrency.
- Captains: Captains, Logins (
/captains?tab=logins), Model Profiles (each model as served: tier, recovery policy,
timeouts, discovered context and capabilities), Docks, Battery Packs and Evaluations. A mdl_ id opens its model
profile page and an rlg_ id its login page.
Runtime logins
On an Admiral with 1.6.0 or later, a captain can run as one of several vendor accounts (a runtime login) for its harness
on its host. The extension shows and uses them without ever handling a credential.
By default (armada.pages.openRecords is dashboardPage), the Logins view and every login and mission page are the
dashboard's own pages inside a VS Code editor tab, so they read and behave exactly as the dashboard does. The
extension's native pages (the Logins record kind, its login page and its compact mission view) appear only when
armada.pages.openRecords is set to details:
"armada.pages.openRecords": "details"
Where logins appear:
- Captains view and captain pickers: each captain shows the account it runs as (for example
personal@example.com), or nothing when it uses the host default login. A captain whose login is signed out or
expired gets a warning icon and a tooltip that says to sign in again and verify. The captain quick pick (Refine and
Plan with a Captain) shows the same login text.
- Logins (the Captains hub's Logins tab; with
armada.pages.openRecords set to details, the native Logins record
kind): every login with its account, runtime, host, status and how much of its plan limits is left ("62% left",
read with includeUsage in the same list call). Actions: Verify (probe it on its host now), Open Sign-in
Terminal on Host (when the host can open one: a connected 1.6.0 Harbor, or the Admiral host with
RuntimeLogins.AdmiralOpensSignInTerminal on; otherwise it says why and to copy the command), Show Sign-in
Commands and Copy Sign-in Command (the exact command for the host's shell; run it in a terminal on that host,
then Verify), Import Current Login, Set API Key... for API-key logins (sent once in a password box; only the
last four characters come back), Show Usage, Show Captains, Drain (says whether the login is idle or how
many missions still finish), Reactivate, and Delete and Unbind Captains. The create form makes a login on the
Admiral host or a Harbor; the captain create form picks a Login from the Admiral host's logins.
- Discover Runtime Logins on a Host... (command palette): pick the Admiral host or a Harbor, choose one of the login
locations found there that Armada does not track yet, name it, and Armada adopts it in place (never moving or
copying it) and verifies it.
- Roles: a viewer (neither a tenant nor a global admin, from
GET /api/v1/whoami) sees logins, their usage and
their captains, but not Verify, sign-in, import, API key, drain, edit or delete, which the Admiral refuses for that
role anyway; Discover is hidden from the palette.
- Who runs it: the native Dispatch Mission and Dispatch Voyage forms (with
armada.pages.openRecords set to
details) offer default routing plus the four target modes: This captain, Any captain on a login, Any
captain of a runtime and Lowest usage of a runtime (an optional exact model narrows a runtime target).
Strict (wait for a matching captain rather than fall back to other routing) defaults on for login and runtime
targets and off for a captain. Only the fields the chosen mode needs are shown. While the form is filled, a Who
would run it line (announced to screen readers) says who the Admiral would pick now, the runner-up and how many
matching captains are free (POST /api/v1/captain-selection/preview, 400 ms after the last change), for example
"Will run on: claude-2, foundation@example.org, 62% left; runner-up claude-1. 2 of 3 matching captains are free
now", or what the target still needs. The dashboard's own Dispatch and Create Voyage pages carry the same choice.
- Missions held by a login: a pending mission waiting on a login reason (signed out, drained, at its concurrency
limit, cooling down) gets an Open Logins action; one waiting because its Harbor is too old for runtime logins
gets Open Harbors.
Older Admirals have no logins: the Logins kind shows the server's error and the forms dispatch with default routing.
- API Explorer: every route at once from the built-in catalog, upgraded with the server's request schemas when its
OpenAPI document loads.
Requests go through the extension's connection and the page updates live from its event stream, so there is nothing
to sign in to. Each tab has back, forward and reload, the page's breadcrumbs, live status, Open in another tab and
Open in browser. Links move within the tab; Cmd/Ctrl+click opens a link in its own tab. One tab per area is reused
(armada.pages.tabReuse), and open tabs come back after a reload. Armada: Open Page... lists every page.
Commands, notifications and the status bar open missions, voyages, captains and records as dashboard pages too; set
armada.pages.openRecords to details for the extension's compact detail views. The compact mission view shows the
mission's mode, why a waiting mission has no captain yet (the typed reason and the advice that clears it), and, on an
Admiral with 1.5.0 or later, its attempts: each attempt's model and captain, disposition, failure kind, repair,
escalation, Judge verdict and duration, with the tier, escalation count and recovery counters above them. It reloads
on every mission event, including escalations, repairs and attempt changes. Logs and changes open as read-only
documents with search and diff highlighting, and Open Vessel Workspace adds a vessel's checkout to the Explorer as a
VS Code file system (browse, edit and save, search, run a command, see changes, open a terminal on its host, even on a
remote Admiral or Harbor). Labels follow VS Code's display language through the Admiral's translation catalog
(armada.language).
While the extension is not connected, the views show what to do: connect, or open the output.
Connecting
The extension connects by itself after VS Code starts; nothing runs while the extension is activating. It takes the
Admiral and the credential from the Armada settings already on the machine, so nothing about the connection lives in
VS Code settings. It looks, in this order, at:
- Harbor:
~/.armada-harbor/settings.json (or $ARMADA_HARBOR_HOME). ServerLinkUrl names the Admiral Harbor
links to, whose REST API is the same host and port over http or https, and AccessKey is sent as a bearer token.
A running Harbor puts its Admiral first.
- The local Admiral:
~/.armada/settings.json (or $ARMADA_DATA_DIR): admiralPort and the local apiKey,
sent as X-Api-Key to http://127.0.0.1:<port>. The Admiral writes the key the first time it starts.
- The TUI's server profiles:
~/.armada/tui.json, with each profile's session token from the TUI's credential
store (the macOS Keychain or libsecret, else tui-credentials.json).
Entries for the same Admiral are merged, and every credential found for it is tried in turn. When none works, Connect
offers to sign in with email and password (the session token is kept in secret storage) or to enter a key. At startup the extension
connects to the Admiral last picked with Armada: Connect, else to the first one that answers and accepts a
credential.
Armada: Connect is the one connect command. It lists the Admirals found on the machine (with where each came from,
whether it responds, and whether a credential was found) and Enter an Admiral URL... for any other. A key is asked
for only when no stored credential works; it is tried as a bearer token and then as X-Api-Key, and the one that
works is kept in VS Code secret storage for that Admiral.
Each connection probes GET /api/v1/status/health, checks the Admiral's contract version (the major part must match
the extension's; otherwise it says whether the Admiral or the extension is too old; an Admiral from before contract
versions, 1.3.0 and earlier, reports none and is treated as contract 1), then proves the credential with
GET /api/v1/whoami. The context keys armada.connected, armada.connectionState, armada.role.globalAdmin and
armada.role.tenantAdmin follow the result, for menus and when clauses.
The status bar shows the state and the target (Armada: local, Armada: armada.example.com, Armada: server too old, ...), and its tooltip says where the Admiral was found and which credential is in use. Click it for connection
actions: open the dashboard, connect to another Admiral, reconnect or retry, disconnect, show the output, open the
settings. Armada: Show Output opens the Armada log, which
records every connection attempt and live-update change (never a key).
Armada: Disconnect drops the connection and removes a stored remote key; the extension then stays disconnected,
also after a restart, until you run Armada: Connect.
The extension does not start an Admiral yet; start Armada yourself (for example with armada server start).
Live updates
The extension keeps one WebSocket connection (/ws) per Admiral, subscribes once, and passes every event to the
surfaces that listen (today the black box). When the socket drops it reconnects after 5 seconds, doubling up to 5
minutes, and meanwhile polls every armada.liveUpdates.pollIntervalSeconds. With armada.liveUpdates.useWebSocket
off it only polls.
Black box
- Black Box under Missions in the Manage tree (and, with
armada.failures.showInExplorer, as Armada Failures in the
Explorer): recent black box entries grouped by vessel, with kind, step and age. By default it shows only the vessel
whose repository is open (matched by git remote URL against the vessel's RepoUrl). The view badge counts open
entries.
- FIX THIS: copy the brief, open it as a Markdown document with a preview, or send it to the editor chat.
- Recovery paths: a dry run shows what will happen, a modal dialog confirms, and only then does the path run.
Paths marked
dataLossRisk are refused unless you tick an explicit acknowledgement.
- Resolve entries and add notes.
- Ask Armada About This Failure: opens the dashboard Ask page with the canonical prompt.
- Armada resilience: right after the Summary the entry view shows whether Armada's own handoff and landing could
have healed the failure (and what it could have done), the detection gap and invariant, severity with recurrence,
the recoveries Armada already attempted, code pointers at the Armada build, the proposed Armada changes with
acceptance tests and the regression test; outside handoff and landing, one line saying why no Armada change is
suggested. An entry triaged ArmadaDefect carries a "Suspected Armada defect" badge. Draft Armada Fix Mission
copies the top proposed change as a mission brief and opens it in the editor chat; Show Resilience Gaps lists the
Armada resilience gaps (failure modes triaged ArmadaDefect in handoff and landing scope) page by page.
- Entry view: Summary, Armada resilience, Where, How, Status, Why, Conflict, What would have prevented it, What Armada could change,
Recovery (with each path's tracked success rate and, when a runbook is linked, the runbook name linking to the
dashboard), Attempts, Recurring on this vessel (the vessel's configuration doctor: recommendations that keep
recurring, with a link to an example entry) and Notes, with buttons for every action, including Timeline and Compare
Attempts.
- Black box timeline: one ordered timeline across the entry and its notes, the mission, the dock, the merge queue
entry, the captain and the Harbor link, as a Markdown table, page by page.
- Attempt diff: what changed between two attempts of a mission (or any two entries) side by side: captain, model,
base commit, configuration, step, and the files only each attempt changed.
- Mission overlap preview: before dispatching, enter a brief for the open repository's vessel and see the overlap
warnings (active missions, reserved and hotspot directories) and brief lint warnings dispatch would return.
- File decorations: files that conflicted in an open entry's landing get a
BX badge and the hover text
"conflicted in msn_x landing, 2026-10-28"; the vessel's hotspot directories get an H badge.
- Live updates from the extension's single Armada WebSocket connection (see Live updates).
Requirements
- VS Code 1.101 or later (or a compatible editor such as Cursor).
- An Armada Admiral with contract version 1.x (or one from before contract versions), and a credential for it: one
already on the machine (Harbor's access key, the local API key, a TUI session), or a bearer token from
POST /api/v1/credentials or an API key entered in Armada: Connect.
Install
From the VS Code Marketplace: search the Extensions view for Armada AI, or run
code --install-extension LatticeAI.armada-ai.
From source: ./build-vscode.sh --install (or build-vscode.bat --install) at the repository root builds
vsix/armada-vscode-<version>.vsix and installs it. For a .vsix from a release, use
code --install-extension <file>.
Settings
| Setting |
Default |
Meaning |
armada.tenant |
empty |
Optional tenant id; admin credentials use it to narrow lists to one tenant |
armada.dashboardUrl |
empty |
Dashboard URL for links and Ask Armada; empty means Harbor's DashboardUrl for Harbor's Admiral, else the connected Admiral plus /dashboard |
armada.pages.openRecords |
dashboardPage |
dashboardPage opens hubs, records and Needs You items as the dashboard's pages in editor tabs; details uses the compact detail views and only expands hubs |
armada.pages.tabReuse |
area |
area: one page tab per area (opening another Activity page navigates the Activity tab); single: one tab for all pages; never: a new tab each time |
armada.fixThis.openPreview |
true |
Open a Markdown preview beside the FIX THIS editor |
armada.failures.showInExplorer |
false |
Also show the black box tree in the Explorer, as Armada Failures |
armada.failures.filterToWorkspaceVessel |
true |
Show only the open repository's vessel (falls back to all vessels when none matches) |
armada.failures.includeResolved |
false |
Also list resolved entries |
armada.failures.maxEntries |
50 |
Entries loaded per vessel |
armada.liveUpdates.useWebSocket |
true |
Listen on the Armada WebSocket |
armada.liveUpdates.pollIntervalSeconds |
60 |
Polling interval when the socket is off or down (10 to 3600) |
armada.decorations.enabled |
true |
Conflict and hotspot file decorations |
armada.decorations.hotspotLimit |
10 |
Hotspot directories to decorate (0 turns them off) |
armada.notifications.onCapture |
true |
Notify when an entry is captured for the open repository's vessel |
Commands
| Command |
What it does |
| Armada: Open Page... |
Open any dashboard page (Overview, Needs You, Dispatch, Activity tabs, hubs, Settings) in an editor tab |
| Armada: Connect |
Pick an Admiral found on this machine or enter a URL, and connect (asks for a key only when none works) |
| Armada: Reconnect |
Connect again to the current Admiral |
| Armada: Disconnect |
Drop the connection and remove a key entered for that Admiral |
| Armada: Connection Actions... |
The status bar's quick pick of connection actions |
| Armada: Show Output |
Open the Armada log |
| Armada: Open Settings |
Open ~/.armada/settings.json, Harbor's settings, the TUI profiles, or the extension's preferences |
| Armada: Open Dashboard in Browser |
Open the connected Admiral's dashboard in the browser |
| Armada: Dispatch Mission... |
The dispatch form (vessel, title, brief, priority) |
| Armada: Dispatch Voyage... |
The voyage form (one mission per line) |
| Armada: Process Merge Queue |
Land everything queued |
| Armada: Refresh |
Reload the Armada views |
| Armada: Refresh Failures |
Reload vessels and entries |
| Armada: Toggle Workspace Vessel Filter |
Switch between the open repository's vessel and every vessel |
| Armada: Open Black Box for Mission... |
Quick pick of recent failures, or paste a mission, voyage or entry id |
| Armada: Copy FIX THIS |
Copy the brief to the clipboard |
| Armada: Open FIX THIS in Editor |
Open the brief as an untitled Markdown document (save it as .md if you want to keep it) |
| Armada: Send FIX THIS to Chat |
Open the editor chat with the brief attached; copies it when the editor has no chat |
| Armada: Run Recovery Path... |
Dry run, show the plan, confirm, then run with the confirm token |
| Armada: Resolve Black Box Entry |
Set Resolved, Duplicate, WontFix or ArmadaFixed, with an optional note and link |
| Armada: Add Note |
Add a note to the entry |
| Armada: Ask Armada About This Failure |
Open the dashboard Ask page with the canonical prompt pre-filled |
| Armada: Show Black Box Timeline |
Open the entry's combined timeline as Markdown (100 events per page, with Next Page and Previous Page) |
| Armada: Compare Black Box Attempts |
Pick another attempt of the mission (or enter any entry id) and open the side-by-side diff |
| Armada: Draft Armada Fix Mission |
Copy the entry's top proposed Armada change as a mission brief and open it in the editor chat (copied only when the editor has no chat) |
| Armada: Show Resilience Gaps |
Open the Armada resilience gaps (handoff and landing failure modes triaged ArmadaDefect, most severe first) as Markdown, 25 per page with Next Page and Previous Page; filtered to the open repository's vessel when exactly one matches |
| Armada: Preview Mission Overlap |
For the open repository's vessel (or one you pick), enter a title and brief and see the overlap and brief lint warnings; nothing is dispatched |
Every entry command works from the tree view's context menu, from the entry view, or from the Command Palette (where
it asks which entry).
The Ask Armada prompt is: "Show me the pertinent details from the black box for mission {id} and give me your opinion
on why it failed and what could have been done differently". The extension opens /dashboard/ask?prompt=<prompt>, which
starts a new conversation with the prompt in the message box; if the browser cannot be opened, the prompt is copied to
the clipboard instead.
Errors
The extension never crashes on server errors. It explains each one: no connection, an unreachable Admiral, an Admiral
or extension that is too old, a rejected key (401), a forbidden action (403), a missing entry (404), a changed mission
or expired confirm token (409), a missing black box object (410), and an unavailable black box store or action host
(503). The Failures view shows the current error with a click-to-retry row.
How it is built
- Thin client. The extension imports the dashboard's own API client, types and helpers (
@dashboard/api/client,
@dashboard/types/*, @dashboard/lib/*) through the @dashboard/* alias the mobile app uses (tsconfig.json
paths and the esbuild alias in esbuild.mjs), so there is no second copy of any route or DTO.
npm run lint:shared lints those shared modules against the same sharing contract as the mobile app
(src/Armada.Mobile/sharing.config.js and eslint.shared.js) plus the Node host's rules, so a dashboard change
that breaks a non-browser host fails here and in the mobile app.
- Shared client gaps.
src/transport/hostClient.ts holds the few things the shared client does not: pointing it at
an Admiral with the extension's credential, a typed reading of the health response (the shared getHealth returns a
plain record), the mission/voyage/entry id dispatch for black box lookups, the runtime login routes
(/api/v1/runtime-logins*, including open-terminal and includeUsage) and the mission-less selection preview
(POST /api/v1/captain-selection/preview, with CandidateCount and EligibleCount), and dashboard URL builders. src/surfaces/ops/captainTargets.ts builds the
CaptainTarget each dispatch mode sends.
src/transport/errors.ts turns the shared client's errors into messages.
- Dashboard page tabs.
webview/dashboard/ renders the dashboard's routes (Armada.Dashboard/src/AppRoutes.tsx)
under a MemoryRouter and a slim shell in a webview, bundled by esbuild.mjs into dist/webview/ from the dashboard's
sources and its node_modules (run npm ci in src/Armada.Dashboard first; the build scripts and CI do). The page's
fetch and WebSocket are bridged to the extension host (src/surfaces/dashboard/), which sends each request to
the connected Admiral with the extension's credential and forwards its event stream. The theme variables map to VS
Code's (embed.css).
- Layout.
src/connection/ (discovery, contract check, connection manager, status bar), src/transport/
(shared client host side, the /ws event bus), src/surfaces/nav/ and src/surfaces/blackbox/.
- Parity.
parity.json tracks every dashboard route, tab, client call, event and settings field, the TUI-only
surfaces, Harbor's menu and windows, and the CLI commands in scope, with the status of each; it is generated by
scripts/vscode/generate-parity-manifest.py and checked by the VsCode.Parity test suite.
Development
cd src/Armada.VSCode
npm ci
npm run build # type check (src and tests) and bundle to dist/extension.js
npm run lint # ESLint, then the shared-module contract (lint:shared)
npm test # unit tests (Node test runner, fake vscode module, no VS Code needed)
npm run test:integration # @vscode/test-electron; skipped when offline or without a display
npm run package # ../../vsix/armada-vscode-<version>.vsix
The integration tests never read your ~/.armada: they point ARMADA_DATA_DIR at an empty temporary directory. To
run them against a throwaway Admiral, start one with its own data directory and set ARMADA_VSCODE_TEST_DATA_DIR to
it and ARMADA_VSCODE_EXPECT_ADMIRAL=1; the suite then checks the connection, whoami, the role keys, the navigation
tree, the black box store and the WebSocket subscription.
From the repository root, build-vscode.sh (or build-vscode.bat) runs install, build, lint, tests and packaging into
vsix/, and the vscode-extension GitHub workflow does the same in CI, plus the integration tests and the parity
check.
License
MIT. See LICENSE.md.
| |