Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .agents/skills/sync-agent-infra/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ Use this map when product behavior, commands, or development workflows change. I
| Sandbox policy schema, presets, or enforcement behavior | `generate-sandbox-policy`, `openshell-cli` |
| Supervisor middleware policy, registrations, runtime, or failure behavior | `generate-sandbox-policy`, `openshell-cli`, `debug-openshell-cluster` |
| Gateway deployment, Helm, runtime drivers, or health checks | `debug-openshell-cluster`, `helm-dev-environment` |
| Inference providers, native model endpoints, or migration from `inference.local` | `debug-inference`, `openshell-cli`, `generate-sandbox-policy` |
| Inference providers, native model endpoints, or migration from the retired managed endpoint | `debug-inference`, `openshell-cli`, `generate-sandbox-policy` |
| TUI architecture, navigation, data fetching, or UX | `tui-development` |
| Release artifacts or post-publish smoke coverage | `test-release-canary` |
| GitHub Actions workflows, required checks, or CI diagnostics | `watch-github-actions`; also `test-release-canary` for release smoke coverage |
Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/tui-development/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ Phase 1: GetSandboxLogs → 500 initial lines → send via Event::LogLines
Phase 2: WatchSandbox(follow_logs: true) → live tail → send via Event::LogLines
```

**Sandboxes**: Fetched via `ListSandboxes` in a background collection-refresh task scheduled from the 2-second tick, scoped to the current workspace (or all workspaces). Follow `next_page_token` until empty so the dashboard reflects the complete collection.
**Sandboxes**: Fetched via `ListSandboxes` in a background collection-refresh task scheduled from the 2-second tick, scoped to the current workspace (or all workspaces). Follow `next_page_token` until empty so the dashboard reflects the complete collection. The NOTES column summarizes active `ConfigurationInvalid` readiness conditions as `Invalid config` before port forwards and clears the note on refresh after repair. Full diagnostics remain available through `openshell sandbox get <name> -o json`. Timed-out provisioning attempts show `Provisioning timed out` with cleanup pending or compute reclaimed, preserving port forwards. The sandbox detail pane wraps the full configuration error in its Notes field.

**Providers**: Fetched via `ListProviders` in the background collection-refresh task. Provider profiles are fetched per-workspace via `ListProviderProfiles` and cached in a `ProviderProfileCache` keyed by `(workspace, profile_id)`. Follow each list RPC's `next_page_token` until empty.

Expand Down
6 changes: 3 additions & 3 deletions .claude/agent-memory/arch-doc-writer/MEMORY.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@
- Proto message field `filesystem` maps to YAML key `filesystem_policy` (different names!)
- IMPORTANT: Sandbox always runs in Proxy mode. NetworkMode::Block exists as enum variant but is NEVER set.
- Both file mode and gRPC mode set NetworkMode::Proxy unconditionally (see load_policy() in lib.rs and TryFrom in policy.rs)
- Reason: proxy always needed so inference.local is addressable + all egress evaluated by OPA
- Reason: proxy always needed so all egress is evaluated by OPA
- OPA two-action model: Allow, Deny (NetworkAction in opa.rs). InspectForInference was REMOVED.
- Rego network_action rule: "allow" or "deny" only (no "inspect_for_inference")
- Behavioral trigger: endpoint `protocol` field -> L7 inspection; absent -> L4 raw copy_bidirectional
Expand Down Expand Up @@ -152,9 +152,9 @@
- Route sources: `--inference-routes` YAML file (standalone) > cluster bundle via gRPC; empty routes gracefully disable
- Cluster bundle refreshed every ROUTE_REFRESH_INTERVAL_SECS (30s)
- Patterns: POST /v1/chat/completions, /v1/completions, /v1/responses, /v1/messages; GET /v1/models, /v1/models/*
- inference.local CONNECT intercepted BEFORE OPA evaluation in proxy
- Managed inference CONNECT traffic was intercepted before OPA evaluation in the proxy
- InferenceProviderProfile in openshell-core/src/inference.rs: centralized provider metadata
- proxy.rs: ONLY CONNECT to inference.local is handled; non-CONNECT requests get 403 for ALL hosts
- proxy.rs: only managed inference CONNECT traffic was handled; non-CONNECT requests received 403 for all hosts
- Buffer: INITIAL_INFERENCE_BUF=64KiB, MAX_INFERENCE_BUF=10MiB; grows by doubling
- Dev sandbox: `mise run sandbox -e VAR_NAME` forwards host env vars; NVIDIA_API_KEY always passed

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ jobs:
uses: ./.github/workflows/conformance.yml
with:
scenarios: '["ubuntu-docker-rootful", "fedora-podman-rootful", "fedora-podman-rootless"]'
testsuites: '["smoke"]'
testsuites: '["conformance"]'

docker-e2e:
needs: [build-binaries, build-images]
Expand Down
59 changes: 55 additions & 4 deletions .github/workflows/release-tag.yml
Original file line number Diff line number Diff line change
Expand Up @@ -407,7 +407,6 @@ jobs:
cat openshell-supervisor-checksums-sha256.txt

- name: Generate Homebrew formula
if: needs.compute-versions.outputs.is_prerelease != 'true'
run: |
set -euo pipefail
python3 tasks/scripts/release.py generate-homebrew-formula \
Expand Down Expand Up @@ -493,12 +492,64 @@ jobs:
release/openshell-supervisor-checksums-sha256.txt
release/openshell-prover-checksums-sha256.txt

- name: Upload pre-release artifacts
- name: Upload amd64 Debian prerelease package
if: needs.compute-versions.outputs.is_prerelease == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openshell-${{ env.RELEASE_TAG }}
path: release/
name: openshell-${{ env.RELEASE_TAG }}-linux-amd64-deb
path: |
release/openshell_*_amd64.deb
release/openshell-checksums-sha256.txt
retention-days: 90
if-no-files-found: error

- name: Upload arm64 Debian prerelease package
if: needs.compute-versions.outputs.is_prerelease == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openshell-${{ env.RELEASE_TAG }}-linux-arm64-deb
path: |
release/openshell_*_arm64.deb
release/openshell-checksums-sha256.txt
retention-days: 90
if-no-files-found: error

- name: Upload x86_64 RPM prerelease packages
if: needs.compute-versions.outputs.is_prerelease == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openshell-${{ env.RELEASE_TAG }}-linux-x86_64-rpm
path: |
release/openshell-*.x86_64.rpm
release/openshell-checksums-sha256.txt
retention-days: 90
if-no-files-found: error

- name: Upload aarch64 RPM prerelease packages
if: needs.compute-versions.outputs.is_prerelease == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openshell-${{ env.RELEASE_TAG }}-linux-aarch64-rpm
path: |
release/openshell-*.aarch64.rpm
release/openshell-checksums-sha256.txt
retention-days: 90
if-no-files-found: error

- name: Upload macOS prerelease packages
if: needs.compute-versions.outputs.is_prerelease == 'true'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: openshell-${{ env.RELEASE_TAG }}-macos-arm64
path: |
release/openshell-aarch64-apple-darwin.tar.gz
release/openshell-gateway-aarch64-apple-darwin.tar.gz
release/openshell-driver-vm-aarch64-apple-darwin.tar.gz
release/openshell-prover-aarch64-apple-darwin.tar.gz
release/openshell.rb
release/openshell-checksums-sha256.txt
release/openshell-gateway-checksums-sha256.txt
release/openshell-prover-checksums-sha256.txt
retention-days: 90
if-no-files-found: error

Expand Down
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Public skills live in `skills/` and work without an OpenShell source checkout. I
| --- | --- |
| `openshell-cli` | CLI usage, sandbox lifecycle, provider management, and BYOC workflows |
| `debug-openshell-cluster` | Diagnose gateway deployment and health issues |
| `debug-inference` | Diagnose attached-provider inference, native endpoints, and migration from `inference.local` |
| `debug-inference` | Diagnose attached-provider inference, native endpoints, and migration from the retired managed endpoint |
| `generate-sandbox-policy` | Generate YAML sandbox policies from requirements or API documentation |

Public skills use `openshell --help` for installed command syntax and published OpenShell documentation for product concepts and configuration. They must not depend on repository-relative source or documentation files.
Expand Down
94 changes: 84 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
[![Documentation](https://img.shields.io/badge/docs-latest-brightgreen)](https://docs.nvidia.com/openshell/latest/index.html)
[![Project Status](https://img.shields.io/badge/status-alpha-orange)](https://docs.nvidia.com/openshell/latest/about/release-notes.html)

> [!IMPORTANT]
> **OpenShell 0.1.0 is coming soon.** [Track progress in the 0.1.0 milestone](https://github.com/NVIDIA/OpenShell/milestone/10), [read the prerelease documentation](https://docs.nvidia.com/openshell/dev/index.html), or [install a prerelease](#prerelease-and-development-builds).

OpenShell is the safe, private runtime for autonomous AI agents. It provides sandboxed execution environments that protect your data, credentials, and infrastructure — governed by declarative YAML policies that prevent unauthorized file access, data exfiltration, and uncontrolled network activity.

OpenShell is built agent-first. It ships public agent skills for using and operating OpenShell, plus separate repository-aware workflows for contributors and maintainers.
Expand All @@ -27,21 +30,15 @@ OpenShell is built agent-first. It ships public agent skills for using and opera

### Install

**Binary (recommended):**
**Local installation:**

```bash
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | sh
```

The installer installs the latest stable release by default. To install a specific version, set `OPENSHELL_VERSION`. A [`dev` release](https://github.com/NVIDIA/OpenShell/releases/tag/dev) is also available that tracks the latest commit on `main`.

The `openshell` package on PyPI provides the Python SDK only. It does not install the `openshell` CLI. Add the SDK to a Python project with [uv](https://docs.astral.sh/uv/):

```bash
uv add openshell
```
The installer installs the latest stable release by default. See [Prerelease and development builds](#prerelease-and-development-builds) to install an upcoming release or the latest commit on `main`.

**Helm chart:**
**Kubernetes installation:**

> **Experimental** — the Kubernetes deployment path is under active development. Expect rough edges and breaking changes.

Expand Down Expand Up @@ -104,6 +101,44 @@ See the [full walkthrough](examples/sandbox-policy-quickstart/) or run the autom
bash examples/sandbox-policy-quickstart/demo.sh
```

## SDKs

OpenShell provides client SDKs for Python, TypeScript, Go, and Rust. SDK packages connect applications to an OpenShell gateway; they do not install the `openshell` CLI. Use the SDK and gateway from the same OpenShell release when possible.

### Python

The [Python SDK](python/openshell/) is published to [PyPI](https://pypi.org/project/openshell/):

```shell
uv add openshell
```

### TypeScript

The [TypeScript SDK](sdk/typescript/README.md) is published to GitHub Packages as `@nvidia/openshell-sdk`. Configure the `@nvidia` npm scope for `https://npm.pkg.github.com`, authenticate with a token that has `read:packages`, and install it:

```shell
npm install @nvidia/openshell-sdk
```

### Go

Add the [Go SDK](sdk/go/README.md) to a Go module:

```shell
go get github.com/NVIDIA/OpenShell/sdk/go@latest
```

### Rust

The [Rust SDK](crates/openshell-sdk/README.md) is currently consumed from source. Pin the Git dependency to the same OpenShell release as the gateway:

```shell
cargo add openshell-sdk \
--git https://github.com/NVIDIA/OpenShell \
--tag <release-tag>
```

## How It Works

OpenShell isolates each sandbox in its own container with policy-enforced egress routing. A lightweight gateway coordinates sandbox lifecycle, and every outbound connection is intercepted by the policy engine, which does one of three things:
Expand Down Expand Up @@ -136,7 +171,9 @@ Policies are declarative YAML files. Static sections (filesystem, process) are l

## Providers

Agents need credentials — API keys, tokens, service accounts. OpenShell manages these as **providers**: named credential bundles that are injected into sandboxes at creation. The CLI auto-discovers credentials for recognized agents (Claude, Codex, OpenCode, Copilot) from your shell environment, or you can create providers explicitly with `openshell provider create`. Credentials never leak into the sandbox filesystem; they are injected as environment variables at runtime.
Agents need credentials — API keys, tokens, service accounts. OpenShell manages these as **providers**: named credential bundles that are injected into sandboxes at creation. Credentials never leak into the sandbox filesystem; they are injected as environment variables at runtime.

A provider is created from a **provider profile**, which declares the credentials, endpoints, and client binaries the provider needs. Profiles are import-only: a gateway serves exactly the profiles you imported with `openshell provider profile import`, and ships none of its own. The [`providers/`](providers/) directory holds reviewable examples to copy and adapt. Once a profile is imported, the CLI can auto-discover credentials for its provider from your shell environment, or you can create providers explicitly with `openshell provider create`.

Inference access uses the same provider workflow. Attach an inference-capable provider to a sandbox, call the provider's native endpoint, and select the model in the client. Provider profiles contribute the endpoint policy and bind credential placeholders to the authorized destination.

Expand Down Expand Up @@ -255,6 +292,43 @@ Agent implementation is human-directed: a user may request a phase directly, or
- [Brev Launchable](https://brev.nvidia.com/launchable/deploy/now?launchableID=env-3Ap3tL55zq4a8kew1AuW0FpSLsg) — try OpenShell on cloud compute without local setup
- [Agent Instructions](AGENTS.md) — system prompt and workflow documentation for agent contributors

## Prerelease and development builds

Use a prerelease candidate to evaluate an upcoming release, or use the rolling development build to test the latest commit on `main`. These builds may change before the next stable release. The matching documentation is published in the [development channel](https://docs.nvidia.com/openshell/dev/index.html).

Prerelease packages are retained as GitHub Actions artifacts for 90 days and require an authenticated [GitHub CLI](https://cli.github.com/) session. The `pre` alias installs the latest prerelease:

```shell
gh auth login
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | \
OPENSHELL_VERSION=pre sh
```

The installer downloads only the artifact for the current platform and rejects expired candidates during discovery. Installed packages retain the candidate's exact version, such as `0.1.0-pre.3`. Prerelease tags do not create entries on the GitHub Releases page.

The rolling [`dev` release](https://github.com/NVIDIA/OpenShell/releases/tag/dev) does not require GitHub authentication:

```shell
curl -LsSf https://raw.githubusercontent.com/NVIDIA/OpenShell/main/install.sh | \
OPENSHELL_VERSION=dev sh
```

For Kubernetes, select the corresponding Helm chart version. Helm chart versions omit the leading `v` from release tags:

```shell
# Pin an exact candidate
helm upgrade --install openshell \
oci://ghcr.io/nvidia/openshell/helm-chart \
--version 0.1.0-pre.3

# Rolling development build
helm upgrade --install openshell \
oci://ghcr.io/nvidia/openshell/helm-chart \
--version 0.0.0-dev
```

Prerelease charts use exact `<version>-pre.N` versions. Development charts are also published as immutable `0.0.0-dev.<commit-sha>` versions when you need to pin a specific commit. See the [Helm chart documentation](deploy/helm/openshell/README.md#available-versions) for version and configuration details.

## Contributing

OpenShell is built agent-first. Issues should include a user story, problem statement, impact, and acceptance criteria. The impact should explain the consequences of the current behavior and why existing workarounds are insufficient. Feature requests also require a workflow-level proposed design and alternatives; bug reports add reproduction steps, environment details, and relevant logs. Once work is authorized through the project workflow or a direct request, contributors should use the skills in `.agents/skills/` to investigate the current code and behavior, implement the change, and verify it. If an issue contains earlier diagnostics, verify them rather than relying on them. See [CONTRIBUTING.md](CONTRIBUTING.md) for the full agent skills table, contribution workflow, and development setup.
Expand Down
9 changes: 9 additions & 0 deletions architecture/compute-runtimes.md
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,15 @@ A driver stop operation does not complete while its backend still reports an
in-progress stop. This prevents an immediate start from racing the previous
run's delayed exit event and regressing the new run to `Error`.

The Kubernetes driver records stop as a durable two-phase transition. The
`releasing` phase releases the sandbox's runtime-control relationship while the
workload boundary remains reachable. The `suspending` phase then suspends the
Agent Sandbox workload and cleans generation bootstrap material. The current
dedicated-supervisor implementation releases control by deleting the supervisor
Pod. Periodic reconciliation resumes either phase after a gateway restart. Pod
deletion waits include the configured termination grace period plus Kubernetes
API observation headroom.

Persisted `Stopping` and `Starting` rows are retried at startup. Stable
`Stopped` rows remain stopped. Docker and Podman retain the stopped container
and attached storage, Kubernetes retains the Sandbox CR and PVC while scaling
Expand Down
Loading
Loading