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
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,10 @@ jobs:
- run: sudo apt-get update && sudo apt-get install --yes musl-tools
- run: cargo build --release --locked --target x86_64-unknown-linux-musl
- run: |
mkdir -p dist
mkdir -p dist/skills
install -m 755 target/x86_64-unknown-linux-musl/release/netsandbox dist/netsandbox
tar -czf netsandbox-linux-x86_64.tar.gz -C dist netsandbox
cp -R skills/network-sandbox dist/skills/network-sandbox
tar -czf netsandbox-linux-x86_64.tar.gz -C dist netsandbox skills/network-sandbox
shasum -a 256 netsandbox-linux-x86_64.tar.gz > netsandbox-linux-x86_64.tar.gz.sha256
- uses: actions/upload-artifact@v7
with:
Expand All @@ -39,9 +40,10 @@ jobs:
targets: aarch64-apple-darwin
- run: cargo build --release --locked --target aarch64-apple-darwin
- run: |
mkdir -p dist
mkdir -p dist/skills
install -m 755 target/aarch64-apple-darwin/release/netsandbox dist/netsandbox
tar -czf netsandbox-macos-arm64.tar.gz -C dist netsandbox
cp -R skills/network-sandbox dist/skills/network-sandbox
tar -czf netsandbox-macos-arm64.tar.gz -C dist netsandbox skills/network-sandbox
shasum -a 256 netsandbox-macos-arm64.tar.gz > netsandbox-macos-arm64.tar.gz.sha256
- uses: actions/upload-artifact@v7
with:
Expand Down
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
# Changelog

## 0.6.2 — 2026-07-28

- Bundle the Network Sandbox agent skill with every release archive.
- Add one-command Homebrew installation for both the CLI and skill.
- Replace the Python preflight dependency with direct CLI checks.
- Add a concise Anaconda-style quick start and documented check exit codes.

## 0.6.1 — 2026-07-28

- Refresh required circuits after administrator authorization and before the
Expand Down
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "netsandbox"
version = "0.6.1"
version = "0.6.2"
edition = "2024"
rust-version = "1.85"
build = "build.rs"
Expand Down
43 changes: 37 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,45 @@ alone with the mess.
It gives agents an isolated place to validate configuration changes before
transactionally applying them to the real environment.

## Download
## Install

- [macOS — Apple silicon](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/netsandbox-macos-arm64.tar.gz)
- [Linux — x86_64](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/netsandbox-linux-x86_64.tar.gz)
- [SHA-256 checksums](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/SHA256SUMS)
```bash
brew install MildyNora/tap/network-sandbox
```

Each archive contains one ready-to-run `netsandbox` executable. No source build,
Rust toolchain, Docker, or virtual machine is required.
This installs both the `netsandbox` CLI and its agent skill. The skill is linked
into the standard Codex and agent skill directories, so agents automatically
follow the protected connectivity workflow.

No source build, Rust toolchain, Docker, or virtual machine is required.

Direct packages: [macOS — Apple silicon](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/netsandbox-macos-arm64.tar.gz)
· [Linux — x86_64](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/netsandbox-linux-x86_64.tar.gz)
· [checksums](https://github.com/MildyNora/NetworkSandbox/releases/latest/download/SHA256SUMS)

## Quick start

Think of Network Sandbox as Anaconda environments for risky connectivity
changes. An agent creates a named environment, rehearses its commands there,
checks the required connections, reviews the plan, and only then applies the
validated difference:

```text
create → exec → check → plan → apply
```

```bash
netsandbox create proxy-change
netsandbox exec proxy-change -- CHANGE_COMMAND
netsandbox check proxy-change
netsandbox plan proxy-change
sudo netsandbox apply proxy-change --yes
```

The real host stays unchanged until `apply`. `check` names every failed or
unverifiable connection and exits with `0` when required circuits are preserved,
`2` when connectivity validation blocks the change, or `1` for an operational
error. Post-apply validation automatically rolls back a failed change.

Technical and safety details are available in the
[reference documentation](docs/reference.md).
5 changes: 2 additions & 3 deletions docs/reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,8 @@ Linux container image. Docker supplies a persistent copy-on-write layer and a
private Linux network stack. The source image and Mac host are never mounted
writable.

Official macOS release builds embed their matching Linux helper in the main
executable. For a development build without an embedded helper, place both
binaries beside one another:
The optional legacy Linux-image backend requires a matching Linux helper beside
the main executable:

```text
/usr/local/bin/netsandbox
Expand Down
11 changes: 6 additions & 5 deletions skills/network-sandbox/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,16 @@ Treat the active agent connection as a required control circuit.

## Start with preflight

Run the bundled read-only preflight:
Run the dependency-free read-only preflight:

```bash
python3 <skill-dir>/scripts/preflight.py
netsandbox --version
netsandbox doctor
```

If it cannot find `netsandbox`, ask the user to install the binary. Do not replace it with direct
network mutations. If `doctor` reports an unsupported backend, continue read-only diagnosis and
stop before mutation.
If the shell cannot find `netsandbox`, ask the user to install the package. Do not replace it with
direct network mutations. If `doctor` reports an unsupported backend, continue read-only diagnosis
and stop before mutation.

`netsandbox` owns this workflow and does not require the legacy NCS helper, `ncsd`, or
`/var/run/ncsd.sock`. Do not invoke or wait for NCS unless the user explicitly requests the
Expand Down
4 changes: 2 additions & 2 deletions skills/network-sandbox/references/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ netsandbox mac linux-diff NAME
netsandbox mac linux-commit NAME OUTPUT_IMAGE --yes
```

Official macOS releases embed the Linux helper. Development builds can discover
`netsandbox-linux-guest` beside `netsandbox`. Override either only when necessary with
The optional legacy Linux-image backend requires a compatible
`netsandbox-linux-guest` beside `netsandbox`. Override discovery only when necessary with
`NETSANDBOX_LINUX_GUEST_BIN` or `--guest-binary PATH`.

Track files before mutation. Tracking an already changed path is rejected. `linux-diff` shows the
Expand Down
97 changes: 0 additions & 97 deletions skills/network-sandbox/scripts/preflight.py

This file was deleted.