Provider plugin
Add a new external desktop kind without changing the public Sandboxes API.
Third parties integrate macOS (or other external) desktops without API changes
by implementing ExternalDesktopProvider and registering a catalog kind.
Windows VMs use the built-in ec2-vm backend; this plugin path is for
driver_hint: external.
Flow
Port: sandboxes_service/ports/external_desktop_provider.py
Checklist for a new kind
- Implement
ExternalDesktopProviderinsandboxes_service/infrastructure/external_desktop/providers/<kind>.py - Register with
@register_external_desktop_provider("<kind>") - Add catalog profile YAML with
driver_hint: externalanddesktop_provider.kind - Add GSM secret + Helm
secret_refmapping - Unit tests with a mocked vendor API
- Extend
verify-viewer-macos-dev.sh --kind <kind>or add a dedicated verify script - Document operator notes in
docs/sandbox/desktop/PROVIDERS.md
Auth rules (non-negotiable)
- Provider credentials via
secret_refonly — never on publicPOST /v1 - Adapter receives
tenant_id/project_idfor naming and storage prefixes - Stream must be proxyable through sandboxes (private network path documented)
- No provider-specific fields on the trainer-facing create body — catalog selects the plugin
Registration example
from sandboxes_service.infrastructure.external_desktop.registry import (
register_external_desktop_provider,
)
@register_external_desktop_provider("macstadium")
class MacStadiumProvider:
kind = "macstadium"
...Reference implementations
kind | Module |
|---|---|
aws-ec2-mac | providers/aws_ec2_mac.py |
fake | providers/fake_provider.py (tests only) |
Out of scope (v1)
- Daytona (Harbor worker environment override — not this plugin)
- Remote webhook control plane (see ADR 0002)