Repository navigation
Fleet client: native Explorer shows host files via an amico-host:// FileSystemProvider (with honest capability label) #1267
Description
Important
Problem — In fleet-client (thin-client) posture the chat and the amicode panel's own file surface are host-correct, but VS Code's native Explorer shows the client's local files, because the extension host runs on the client. Users working "on the host" reasonably expect the sidebar to reflect the host — the split is confusing and undermines the mental model. (Note: local files in the native Explorer is ADR 0005's intended thin-client property, not a defect — this issue adds a host-file view, it does not fix a bug.)
Approach — Register a FileSystemProvider under a dedicated amico-host:// scheme, backed by the engine file data plane already proxied to the host by the client relay, and surface it as a workspace folder. The native Explorer, open-in-editor, and save then operate on host files — entirely inside the existing thin-client posture, reversing nothing. Because a virtual-scheme filesystem cannot carry language servers, the host terminal, native search, debug, or built-in git, this slice ships a disclosed capability label so those client-local behaviors are honest, and points users who need full host-native tooling at Remote-SSH.
Scope — in: the provider (list / read / stat / write / rename / delete over the host file routes); mounting it as a workspace folder in fleet-client posture; the honest capability label; consuming the transport's resolved base URL + auth injection through the existing relay path. · out: any Remote-SSH posture or default (a separate decision that would supersede ADR 0005); any auto-switch between postures; a search provider (follow-up); making LSP / terminal / debug operate on the host (that is Remote-SSH's job).
Assumptions — the engine file routes (list / read / status / write) are reachable through the relay with fleet auth injected (verified by the merged /amicode/* + engine proxy work); the panel's own file surface is already host-correct over the same plane.
Acceptance Criteria
- In fleet-client posture, a workspace folder under the
amico-hostscheme lists the host's directory tree in the native Explorer. - Opening a file from that folder shows host content; saving writes back to the host and an independent re-read reflects the change.
- Create / rename / delete within that folder mutate the host filesystem.
- A persistent, visible label discloses that the Explorer shows host files while the integrated terminal, language features, source control, and search operate on the local machine, and points to Remote-SSH for full host-native tooling.
- With no reachable host, the mount surfaces the honest hub-down posture — never a silent fallback to local files.
-
ssh-default fleet clients show no regression when the provider is absent/unmounted (standalone and server postures are unaffected).
Testing Decisions
Extend the existing fleet client-relay and /amicode/*-proxy suites (the stub-hub harness) with provider-conformance cases: list / read / write / rename / delete against the stub host, auth injection on the proxied file requests, and the honest-down posture with no upstream. Reuse the stub-hub support rather than standing up a new fixture.
Key Decisions
- A dedicated
amico-host://scheme, not an override offile:— keeps the local workspace intact and avoids fighting VS Code's real-filesystem assumptions. - The provider mounts only in fleet-client posture; standalone/server postures are untouched.
- The capability label is mandatory and part of this slice — a hollow host Explorer with terminal/LSP/git/search silently still on the client is a worse failure than the reported split, so disclosure ships with the mount, not later.
- Window-mode is not modeled on the link-health posture (single-writer, transition-only); if a window-mode indicator is ever needed it takes its own field.
Constraints & Invariants
- Loopback-only engine bind preserved (ADR 0002/0005) — the provider consumes the already-proxied data plane, never opens a new bind.
- No silent fallback — an unreachable host is the honest degraded posture, not a switch to local files.
- One topology reader / single posture writer preserved (ADR 0023 / the posture-state contract) — the provider reads posture, never writes it.
- Reuse the unified transport health/outcome stream — no per-provider liveness fork.
Prior Art
- The client relay +
/amicode/*proxy + the host proxy (host data plane + fleet-auth injection). - The pluggable transport provider seam (resolved base URL + health).
- The engine file route group (directory list / read / status / write).
- The posture state + feed for the honest hub-down render.
- The stub-hub test harness introduced by the relay/proxy suites.
Source
- Part of the PRD: Fleet thin client — local shell, remote data #792 thin-client program.
- Relates to Fleet thin client — Slice 2: proxy /amicode/* to the host (host owns all state) #1262 (host owns
/amicode/*) — the same "host owns state" principle applied to the file plane. - Durable record: the fleet file-surface deliberation (
spec-20260919-fleet-file-surface-and-posture-switch), which reviewed and rejected making Remote-SSH the default and auto-switch in favor of shipping this slice first.
Notes
Remote-SSH remains the path for full host-native tooling (LSP, terminal, debug, git, search). Making it a first-class opt-in posture, or the default, is a separate decision — the latter would supersede ADR 0005 — tracked outside this slice. A native search provider (FileSearchProvider / TextSearchProvider) over the mount is a possible follow-up.
Activity
docs(adr): 0025 Remote-SSH default posture, thin-client as lifeboat —…
fleet(#1276): auto-DOWN orchestration — safe (floor/dirty-guard/anti-…
fleet(#1278): cross-scheme editor-URI carry across the posture switch
docs(adr): 0025 Remote-SSH default posture, thin-client as lifeboat —…
fleet(#1267): amico-host:// FileSystemProvider — native Explorer show…
fleet(#1276): auto-DOWN orchestration — safe (floor/dirty-guard/anti-…
fleet(#1278): cross-scheme editor-URI carry across the posture switch