Skip to content

Commit f9f0e4e

Browse files
committed
refactor(compute): decouple gateway driver composition
Move first-party composition and VM process ownership into openshell-gateway, leaving openshell-server backend-independent. Update packaging and build references with the new crate, simplify the compiled-driver boundary, and keep the driver-free gateway path buildable with bundled Z3 tooling. Signed-off-by: Drew Newberry <anewberry@nvidia.com>
1 parent cdd5fd4 commit f9f0e4e

66 files changed

Lines changed: 1424 additions & 1861 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.agents/skills/debug-openshell-cluster/SKILL.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,9 @@ The target deployment flow is:
1919
4. The CLI registers a reachable gateway endpoint with `openshell gateway add`.
2020
5. The gateway creates sandboxes through the selected compute driver.
2121

22-
The standard gateway binary explicitly installs its compiled Docker, Podman,
23-
Kubernetes, and VM registrations at startup. With no configured driver, the
22+
The `openshell-gateway` composition crate explicitly installs its compiled
23+
Docker, Podman, Kubernetes, and VM registrations at startup; `openshell-server`
24+
does not link compute-driver crates. With no configured driver, the
2425
gateway probes only installed registrations in priority order (Kubernetes,
2526
Podman, then Docker); VM has no probe and remains opt-in. A custom gateway
2627
binary may install a different set, so confirm the binary's registered drivers

.github/workflows/e2e-kubernetes-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -96,14 +96,17 @@ jobs:
9696
run: mise install --locked
9797

9898
# The openshell-policy crate transitively pulls in z3-sys, whose
99-
# build script needs the z3 C/C++ headers and clang/bindgen to
100-
# compile. The bare runner doesn't ship them; the CI container
99+
# build script needs the z3 C/C++ headers, clang/bindgen, and CMake to
100+
# compile both system-linked and bundled-Z3 builds. The bare runner
101+
# doesn't ship them; the CI container
101102
# image used by other Rust e2e jobs does, but we can't run this job
102103
# there (the runner's container handler injects its own --network
103104
# bridge, which conflicts with the --network host we need so kind's
104105
# API server is reachable from the test process).
105106
- name: Install z3 build deps
106-
run: sudo apt-get update && sudo apt-get install -y --no-install-recommends libz3-dev clang
107+
run: |
108+
sudo apt-get update
109+
sudo apt-get install -y --no-install-recommends libz3-dev clang cmake
107110
108111
- name: Log in to GHCR
109112
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u "${{ github.actor }}" --password-stdin

.github/workflows/release-dev.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -442,7 +442,7 @@ jobs:
442442
run: |
443443
set -euo pipefail
444444
mise x -- rustup target add ${{ matrix.target }}
445-
mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway --features bundled-z3
445+
mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-gateway --bin openshell-gateway --features bundled-z3
446446
mkdir -p artifacts/bin
447447
install -m 0755 target/${{ matrix.target }}/release/openshell-gateway artifacts/bin/openshell-gateway
448448

.github/workflows/release-tag.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -478,7 +478,7 @@ jobs:
478478
run: |
479479
set -euo pipefail
480480
mise x -- rustup target add ${{ matrix.target }}
481-
mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-server --bin openshell-gateway --features bundled-z3
481+
mise x -- cargo zigbuild --release --target ${{ matrix.zig_target }} -p openshell-gateway --bin openshell-gateway --features bundled-z3
482482
mkdir -p artifacts/bin
483483
install -m 0755 target/${{ matrix.target }}/release/openshell-gateway artifacts/bin/openshell-gateway
484484

.github/workflows/rust-native-build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
124124
case "$COMPONENT" in
125125
gateway)
126-
crate=openshell-server
126+
crate=openshell-gateway
127127
binary=openshell-gateway
128128
zig_target=
129129
;;

AGENTS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ These pipelines connect skills into end-to-end workflows. Individual skill files
4040
| `crates/openshell-otel/` | OpenTelemetry support | Shared OTLP trace provider, resource, and tracing-layer construction |
4141
| `crates/openshell-core/` | Shared core | Common types, configuration, error handling |
4242
| `crates/openshell-extension-core/` | Extension core | Shared extension identity, JWT claims, bearer-token rotation, and TLS transport primitives |
43+
| `crates/openshell-gateway/` | Gateway binary composition | Links selected first-party compute drivers into the backend-agnostic server registry |
4344
| `crates/openshell-sdk/` | Shared client SDK | Async Rust gateway client (gRPC transport, TLS, OIDC refresh, edge tunnel); consumed by CLI, TUI, and `@openshell/sdk` |
4445
| `crates/openshell-providers/` | Provider management | Credential provider backends |
4546
| `crates/openshell-tui/` | Terminal UI | Ratatui-based dashboard for monitoring |

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ The following Bazel commands are available alongside the mise tasks above. Cargo
445445
| Build everything | `bazel build //...` | All crates and protos |
446446
| Run all tests | `bazel test //...` | Unit tests only, no E2E |
447447
| Build the CLI | `bazel build //crates/openshell-cli:openshell` | |
448-
| Build the gateway | `bazel build //crates/openshell-server:openshell-gateway` | |
448+
| Build the gateway | `bazel build //crates/openshell-gateway:openshell-gateway-bin` | |
449449
| Build the supervisor | `bazel build //crates/openshell-sandbox:openshell-sandbox-bin` | |
450450
| Clean | `bazel clean` | |
451451

Cargo.lock

Lines changed: 23 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ OpenShell collects anonymous telemetry to help improve the project for developer
258258

259259
Disable telemetry at runtime by setting `OPENSHELL_TELEMETRY_ENABLED=false` on the gateway deployment. For Helm installs, set `server.telemetryEnabled=false`. OpenShell propagates this deployment setting into sandbox supervisor environments so sandbox-side telemetry collection is disabled as well.
260260

261-
You can also compile telemetry out entirely. Telemetry support is a default-on `telemetry` Cargo feature; building with `--no-default-features` produces binaries that contain no telemetry endpoint, no telemetry HTTP client, and no emission code. Build telemetry-free artifacts with, for example, `cargo build --release -p openshell-server --no-default-features` (gateway) and the equivalent for `openshell-sandbox` and `openshell-driver-vm`. With telemetry compiled out, the gateway emits nothing and reports telemetry disabled to the sandboxes it launches.
261+
You can also compile telemetry out entirely. Telemetry support is a default-on `telemetry` Cargo feature; building with `--no-default-features` produces binaries that contain no telemetry endpoint, no telemetry HTTP client, and no emission code. Build a telemetry-free gateway with `cargo build --release -p openshell-gateway --no-default-features --features in-tree-compute-drivers`, and use the equivalent feature selection for `openshell-sandbox` and `openshell-driver-vm`. With telemetry compiled out, the gateway emits nothing and reports telemetry disabled to the sandboxes it launches.
262262

263263
Telemetry events are limited to anonymous operational categories and counts, such as sandbox lifecycle outcomes, provider profile buckets, policy decision counts, and aggregate network activity denial categories. OpenShell telemetry does not collect sandbox names or IDs, hostnames, file paths, binary paths, prompts, credentials, provider names, model names, or user content.
264264

architecture/build.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Sandbox community images are built outside this repository.
2626
Anonymous telemetry emission is gated behind a default-on `telemetry` Cargo
2727
feature. It is defined in `openshell-core` (where the emission code, HTTP
2828
client, and endpoint live) and forwarded by the binary crates that emit or
29-
collect telemetry: `openshell-server` (gateway), `openshell-sandbox`
29+
collect telemetry: `openshell-gateway`, `openshell-sandbox`
3030
(supervisor), and `openshell-driver-vm`. Every crate depends on
3131
`openshell-core` with `default-features = false`, so the binary crate's feature
3232
is the single switch that enables `openshell-core/telemetry` for its build

0 commit comments

Comments
 (0)