Repository navigation
Description
User Story
As an OpenShell Maintainer I want the desktop drivers to exist in their own repository so that their ownership and maintenance can be considered separately to core OpenShell. Launched drivers need a stable way to receive configuration.
Problem Statement
The gateway starts the VM driver with one command-line flag per setting, built by the append_*_args functions in vm.rs. That does not scale to more drivers, puts settings in the process list, and has no version to refuse on mismatch.
Impact / Why This Matters
Every launched driver needs the gateway's context and its own config. Without a versioned document, a gateway and a driver from different releases cannot detect that they disagree.
Proposed Design
The gateway writes one document with mode 0600 into a private 0700 directory and passes --config <path>. It has two parts:
- Gateway context, with a fixed schema defined in the driver SDK and a schema version: bind address, log level, TLS CA, telemetry endpoints, upstream proxy, and the network trust bundle.
- Driver config, the
driver_configtable from gateway configuration, opaque to the gateway.
The network trust bundle is passed as the staged artifact's path, digest, and certificate count, as the VM driver receives it today. The driver verifies and snapshots the file. The PEM bytes do not cross the process boundary.
Acceptance Criteria
- The document and its schema version are defined in
openshell-driver-sdk. - The VM
append_*_argsflags become fields of the document. - The document schema is covered by breaking-change detection, as the proto is.
- A driver refuses a document whose schema version it does not accept, with an error naming both versions.
- The document is created with mode 0600 in a 0700 directory and contains no secrets that would otherwise appear in argv.
Alternatives Considered
- Keep one flag per setting. Simple for one driver, but argv grows with each setting and secrets can appear in the process list.
- Environment variables. Also visible to other processes in some environments, and unversioned.
Agent Investigation
- The trust bundle is staged by the gateway as a
0444file in a0700directory (crates/openshell-server/src/network_trust.rs). The VM driver receives its path, digest, and certificate count as flags (vm.rs) and reads and verifies the file itself. - The artifact must be readable by the driver, which holds for host-local drivers.
Activity