feat(system): add worker and VPS catalogs with guarded local removal
This commit is contained in:
@@ -0,0 +1,107 @@
|
||||
# System inventory: Workers and VPS
|
||||
|
||||
Owner-approved composition, 2026-11-09.
|
||||
|
||||
## Product surface decision
|
||||
|
||||
The recurring operator job is to find a worker/server, configure its connections
|
||||
and inspect its actual services. System contains two categories: Workers and VPS.
|
||||
Both use the admitted Vehicles catalog composition: ResourceList/ResourceRow,
|
||||
header add and row settings. Worker rows retain eye/detail/back; VPS rows only
|
||||
expand services, with no duplicate eye view (owner revision at 23:38).
|
||||
Selecting a sidebar category
|
||||
returns to its catalog. The alternative device selector in the detail header was
|
||||
rejected by the owner in favor of a consistent catalog with Vehicles.
|
||||
|
||||
Worker detail retains Modules/Network and existing power/connection operations.
|
||||
VPS rows expand into services; + on a server opens a service setup window.
|
||||
No new shared control, root, generic deployment engine or executor installer.
|
||||
Design Guideline ResourceList, ResourceRow, Window, SettingsCard, Select,
|
||||
Description, IconButton, AdminNavigationPanel and ApplicationPanel are reused.
|
||||
States: initial loading, empty, fetch failure/retry, catalog, expanded services,
|
||||
detail/back, settings/save/error/stale revision, setup/import/pending/error/success.
|
||||
Catalog presence is not proof of network availability or completed installation.
|
||||
|
||||
## Data authority
|
||||
|
||||
`fleet/server_catalog.py` stores only operator metadata in
|
||||
`fleet.root/server-catalog.sqlite3`. It is durable configuration, not a cache.
|
||||
Writes are transactional and revision checked. Existing service registries remain
|
||||
the sole authorities for identity, certificates, tokens, participants, vehicle
|
||||
assignments and remote execution. Their public projections are grouped by the
|
||||
literal normalized endpoint hostname/IP, not by a DNS lookup. The grouping is
|
||||
presentation, not proof that service identities are interchangeable. Different
|
||||
DNS aliases are not merged. No live credentials or network routes are migrated.
|
||||
|
||||
Existing endpoints appear on first catalog read. Metadata edits persist stable
|
||||
server IDs; editing the address of a server with services is rejected. Adding a
|
||||
service verifies its invitation endpoint matches the selected server before
|
||||
calling the existing pinned-trust admission. Membership is derived from that
|
||||
registry, so a lost response cannot orphan an admitted service in a second store.
|
||||
An unavailable service store is an error, never an empty catalog.
|
||||
|
||||
Routes: `/api/v1/system/servers` GET/POST, `/{id}` PUT,
|
||||
`/{id}/services` POST. All use the existing local operator boundary.
|
||||
There is no raw SSH credential/command endpoint. Explicit local removal is described below; it never administers the remote VPS.
|
||||
|
||||
## Live availability
|
||||
|
||||
Rows use the same leading StatusBadge indicator as Vehicles. Worker availability
|
||||
uses its existing identity-checked telemetry, polling a single history sample.
|
||||
VPS and service indicators use `/{id}/health`: read-only GET `/v1/status` against
|
||||
already trusted endpoints, with the existing pinned certificate and identity
|
||||
validation. Four concurrent exchanges maximum, shared 15-second RAM observations,
|
||||
no persisted history or network mutation. Online never follows from stored
|
||||
`ready`/`paired` alone. Partial service availability is amber; no fresh answer is
|
||||
gray. Service observations expire in the UI; failures replace prior green state.
|
||||
|
||||
Catalog metadata/synchronization status refreshes every five seconds. Open ARNavi
|
||||
settings receive live observations separately from the captured editable draft
|
||||
and revision, so refresh neither ages a frozen status nor overwrites unsaved edits.
|
||||
WireGuard service availability does not claim this Mac is using that VPN tunnel.
|
||||
|
||||
## Installation boundary
|
||||
|
||||
The service window supplies the existing ARNavi or WireGuard installer and its
|
||||
version/OS/instructions. The operator runs it on the chosen VPS and returns the
|
||||
single-use ARNavi key or WireGuard invitation over a trusted transfer. Existing
|
||||
service registration owns secure exchange and profile persistence. A WireGuard
|
||||
profile is shared with the existing fleet/worker connection catalog immediately.
|
||||
No additional manual import into each device is needed.
|
||||
|
||||
This change does not remotely install packages, retrieve root-owned files using
|
||||
unprovisioned SSH credentials, or qualify a fresh VPS. Those require a separate
|
||||
trusted administration bootstrap; inventory registration alone grants none.
|
||||
WireGuard's existing peer protocol still admits Core/Node, not worker execution
|
||||
roles. This catalog does not claim to close that separate protocol gap.
|
||||
|
||||
## Ownership and verification
|
||||
|
||||
UI: `workspaces/system/WorkersWorkspace.tsx`, `ServersWorkspace.tsx`;
|
||||
forms: `components/system/ServerSettings.tsx`, `ServerServiceSetup.tsx`;
|
||||
read adapter: `core/system/servers.ts`; API: `web/server_catalog_api.py`.
|
||||
ARNavi service settings reuse `workspaces/fleet/equipment/VPSHostSettings.tsx`
|
||||
and preserve all existing vehicle assignments.
|
||||
|
||||
Acceptance evidence is recorded under `outputs/system-catalog-20261109`.
|
||||
|
||||
## Explicit removal — owner amendment, 2026-11-10
|
||||
|
||||
The VPS settings header provides trash between move and close. The same mounted
|
||||
Window changes to a confirmation context, with Cancel returning to the untouched
|
||||
settings draft. A server-side preflight lists the exact service owners and hashes
|
||||
stable identities, revisions and bindings. Delete rechecks that snapshot under
|
||||
owner locks; stale confirmations cannot delete changed connections.
|
||||
|
||||
Removal is local: forget the owned WireGuard tunnel, routes and helper key;
|
||||
remove service credentials, inactive device connection references and catalog
|
||||
metadata. The VPS machine and remote installations/peer records are not removed
|
||||
or revoked. ARNavi device records, source recordings and command audit history
|
||||
remain separate owners. Pending equipment commands or active/unknown device
|
||||
routes block deletion until the operator completes or switches them.
|
||||
|
||||
A failed cleanup retains a retryable server row. The UI reports success only after
|
||||
all local owners acknowledge; a retry processes remaining owners. The existing
|
||||
WireGuard helper installer may request macOS administrator authorization when it
|
||||
needs the updated forget operation. No helper update is silently performed during
|
||||
catalog browsing or deletion preflight. No production VPS was deleted during QA.
|
||||
Reference in New Issue
Block a user