Skip to content

Commit 287c4f9

Browse files
authored
Replace Incus sandbox with Docker OverlayFS (#503)
* feat: evidence-gated plans and Docker OverlayFS sandbox backend Plan execution no longer treats checkboxes as proof: announce_plan requires outcome/verify/verify_kind, update_plan(complete) runs the phase verify command, and announce_completion writes PLAN.md Results before leaving execution mode. Add a Docker sandbox backend that composes overlay inside session containers using the sandbox-base entrypoint contract (not Incus-in-Docker). BackendKindDocker is registered but not yet the default. * feat(sandbox): default to Docker OverlayFS for CLI, setup, and Studio astonish sandbox status/init and the setup wizard use Docker instead of Incus. Empty sandbox.backend now selects docker and Studio wires it through the backend-agnostic pool. Explicit sandbox.backend: incus still works until that backend is removed. * feat(sandbox): Docker browser wiring and session CLI Studio browser tools use WireBackendBrowserManager for Docker as well as K8s. astonish sandbox list/create/shell/destroy/prune talk to Docker session containers instead of Incus. * feat(sandbox): Docker reset and save-session-as-layer astonish sandbox reset re-seeds @base from the sandbox-base image. astonish sandbox save captures the session upper as a content-addressed overlay layer. * feat(sandbox): convert remaining CLI and drill off Incus Template/refresh/cp now talk to the Docker OverlayFS backend: named layers are aliases of captured uppers, refresh re-seeds @base, and cp pulls through astonish-shell so files come from the composed rootfs. Drill CLI provisions via BackendPool and wires in-container Chromium through WireBackendBrowserManager. * feat(sandbox): route Studio, chat, and daemon off Incus Legacy sandbox.backend: incus now aliases to docker. Chat factory, Studio sandbox/status/init/proxy/VNC, template tools, and daemon prune/file-read use the OverlayFS backend. save/use_sandbox_template and run_drill take the backend pool path instead of LazyNodeClient. * fix(sandbox): ignore leftover Incus base config on Docker Studio treated Incus base_config JSON as a live layer (Configured, layer none, 0 B) and BuildTemplate failed because @base/rootfs was never seeded. Docker now seeds @base from the sandbox-base image before a first build, GET reports overlay_ready/legacy_config, and the admin UI shows Needs rebuild instead of Configured. * fix(sandbox): apply HWCAP mask during CloakBrowser base builds Apple Silicon Docker VMs advertise ARMv9 features CloakBrowser cannot execute. The template already compiled hwcap_mask.so but only used it at Incus browser launch, so cloakbrowser.ensure_binary() died with SIGILL (exit 132) at build step 26. Install the shim in ld.so.preload and LD_PRELOAD the download step; Docker OverlayFS launches do the same. * fix(sandbox): make apt/dpkg work in Docker OverlayFS base builds Core apt-get install failed with dpkg error 2 because fuse-overlayfs rejects apt's _apt sandbox user and docker.io's postinst tries to start systemd. Write overlay apt policy (root sandbox, unsafe-io, policy-rc.d 101) before package steps and include stdout in step errors so the real dpkg line is not dropped. * fix(sandbox): show apt E: lines instead of truncated package lists Step-2 failures dumped the last 2.5KB of apt's package list and hid the real error on stderr. Prefer E:/dpkg error lines in the Studio message, and fail fast with a clear hint if the overlay has under 2GB free. Package set is unchanged (docker.io stays in core tools). * fix(sandbox): stream base-layer build steps to Studio as they run The configure UI listed every step up front, then went silent while apt ran inside docker exec. PID 1 only sleeps, so docker logs looked stuck. Report each BuildTemplate step through Progress as it starts. * fix(sandbox): survive CloakBrowser SIGSEGV after a successful download Step 26 downloaded chrome then exited 139. The chrome path in the Studio error was ensure_binary stdout concatenated with a later segfault, not a launched browser. Stop resolving getauxval via dlsym(RTLD_NEXT) from the HWCAP preload shim (NULL/self-recursion under ld.so.preload). Cache /proc/self/auxv instead. Treat the install step as success when chrome exists on disk even if Python dies at shutdown. * fix(sandbox): stream overlay capture instead of a /tmp tar copy Base rebuilds finished all 30 steps then died capturing the layer: tar could not write /tmp/astn-layer.tar (ENOSPC). That second copy of the overlay is 1–2GB on the Docker VM disk, which was already full of leaked anonymous overlay volumes from docker rm without -v. Stream tar through a POSIX fifo onto the layers volume, name and delete overlay volumes with the session, and prune dangling ones before the next build. * fix(sandbox): create capture fifo on /dev/shm, not the layers bind mount mkfifo on /mnt/astonish-layers failed with EPERM because that path is a Docker Desktop virtiofs mount of the Mac host. Keep the fifo on tmpfs (/dev/shm, falling back to /tmp) and still extract the layer onto the layers volume so capture does not need a full tar copy. * fix(sandbox): retry CloakBrowser download and cache it on the layers volume GitHub 504s on the linux-arm64 tarball aborted the last install step after a full apt run. Retry ensure_binary, fall back to curl --retry with resume, and keep a successful extract on /mnt/astonish-layers/.cache (host bind mount, not the overlay upper) so the next rebuild can skip the network. * fix(sandbox): make overlay capture finish on Colima instead of vanishing The 30 install steps were fine. Capture then ran a fifo+tee+xattrs extract of a 1–2GB overlay onto a Mac virtiofs bind mount with no SSE writes. That copy can deadlock or OOM an 8GiB VM; when the Studio request dies the build container is deleted and the UI keeps the last "Capturing overlay layer..." line because a dropped stream was not an error. Hash and extract as two tar pipelines (no fifo, no /tmp tar). Skip xattrs on Docker virtiofs. Heartbeat SSE every 15s. Treat a stream that ends without done/error as a build failure. * fix(sandbox): do not abort overlay capture when the Studio SSE drops Capture was copying ~3GB and still running when the live log died at ~2 minutes. Vite's /api proxy defaults to a 120s timeout; that closed the POST, cancelled r.Context(), SIGTERM'd docker exec, and the bash EXIT trap deleted the staging dir. Studio then reported a dropped stream as a hard failure. Run the rebuild on a context that outlives the HTTP request, persist with that context, raise the Vite proxy timeout, and if the log drops poll /status until the server finishes or a layer is saved. * fix(sandbox): capture overlay on the host instead of virtiofs-in-VM In-container tar extract onto the Mac layers bind mount was dying after the live log dropped, so polling only saw "no new base layer" and the real tar error was discarded. Stream `tar -cf -` out of the build container and extract on the host filesystem in one pass, skip device nodes virtiofs cannot store, record the capture error on GET /status, and report copied megabytes in the progress heartbeat. * fix(sandbox): stop APFS HEAD/head clobber from breaking in-container Chrome Host-side layer extract onto macOS APFS folded libwww-perl HEAD onto coreutils /usr/bin/head. The browser launch script then piped find to head, failed to resolve CloakBrowser, and left CDP unbound even though the session and chrome binary were present. Skip GET/HEAD/POST (and other case collisions) when extracting layers, and resolve chrome via glob instead of find|head. Fall back to Xvfb if KasmVNC fails to start. * fix(sandbox): resolve Docker overlay sessions for in-container browser WireBackendBrowserManager treated an empty PodName as "no sandbox", but Docker records ContainerName. Accept either field, persist both on Docker session rows, and re-record already-running containers after Studio restart. * chore(sandbox): stop building the astonish-incus image Incus is no longer a sandbox backend. Remove the Docker image, Makefile and CI targets, and current-state docs that still described Docker+Incus. sandbox.backend: incus remains a legacy alias for docker. * refactor(sandbox): delete the Incus backend Move CloakBrowser install commands, distro types, and launch-script builders into pkg/sandbox. Local sessions stay on Docker OverlayFS; Kubernetes and OpenShell are unchanged. sandbox.backend: incus still aliases to docker.
1 parent e9dbc7c commit 287c4f9

169 files changed

Lines changed: 8051 additions & 13382 deletions

File tree

Some content is hidden

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

‎.github/workflows/beta-release.yml‎

Lines changed: 0 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ jobs:
156156
**Docker:**
157157
```
158158
docker pull ghcr.io/sap/astonish:beta
159-
docker pull ghcr.io/sap/astonish-incus:beta
160159
docker pull ghcr.io/sap/astonish-sandbox-base:beta
161160
docker pull ghcr.io/sap/astonish-sandbox-openshell:beta
162161
```
@@ -262,91 +261,6 @@ jobs:
262261
subject-digest: ${{ steps.push.outputs.digest }}
263262
push-to-registry: true
264263

265-
docker-incus:
266-
name: Docker astonish-incus (beta)
267-
needs: [prepare, release]
268-
runs-on: ubuntu-latest
269-
permissions:
270-
contents: read
271-
packages: write
272-
attestations: write
273-
id-token: write
274-
steps:
275-
- name: Checkout code
276-
uses: actions/checkout@v7
277-
278-
- name: Set up Node.js
279-
uses: actions/setup-node@v7
280-
with:
281-
node-version: '24'
282-
cache: 'npm'
283-
cache-dependency-path: web/package-lock.json
284-
285-
- name: Build frontend
286-
run: |
287-
cd web
288-
npm ci
289-
npm run build
290-
291-
- name: Set up Go
292-
uses: actions/setup-go@v7
293-
with:
294-
go-version-file: 'go.mod'
295-
296-
- name: Cross-compile Linux binaries
297-
env:
298-
VERSION_TAG: ${{ needs.prepare.outputs.version_tag }}
299-
run: |
300-
touch web/embed.go
301-
LDFLAGS="-s -w -X github.com/SAP/astonish/cmd/astonish.Version=${VERSION_TAG}"
302-
echo "Building linux/amd64..."
303-
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="$LDFLAGS" -o astonish-linux-amd64 .
304-
echo "Building linux/arm64..."
305-
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="$LDFLAGS" -o astonish-linux-arm64 .
306-
ls -la astonish-linux-*
307-
308-
- name: Set up QEMU
309-
uses: docker/setup-qemu-action@v4
310-
311-
- name: Set up Docker Buildx
312-
uses: docker/setup-buildx-action@v4
313-
314-
- name: Log in to the Container registry
315-
uses: docker/login-action@v4
316-
with:
317-
registry: ghcr.io
318-
username: ${{ github.actor }}
319-
password: ${{ secrets.GITHUB_TOKEN }}
320-
321-
- name: Extract metadata (tags, labels) for Docker
322-
id: meta
323-
uses: docker/metadata-action@v6
324-
with:
325-
images: ghcr.io/sap/astonish-incus
326-
tags: |
327-
type=raw,value=beta
328-
type=raw,value=${{ needs.prepare.outputs.version_tag }}
329-
330-
- name: Build and push Docker image
331-
id: push
332-
uses: docker/build-push-action@v7
333-
with:
334-
context: .
335-
file: docker/incus/Dockerfile
336-
platforms: linux/amd64,linux/arm64
337-
push: true
338-
tags: ${{ steps.meta.outputs.tags }}
339-
labels: ${{ steps.meta.outputs.labels }}
340-
cache-from: type=gha
341-
cache-to: type=gha,mode=max
342-
343-
- name: Generate artifact attestation
344-
uses: actions/attest-build-provenance@v4
345-
with:
346-
subject-name: ghcr.io/sap/astonish-incus
347-
subject-digest: ${{ steps.push.outputs.digest }}
348-
push-to-registry: true
349-
350264
docker-sandbox-base:
351265
name: Docker sandbox-base (beta)
352266
needs: [prepare, release]

‎.github/workflows/docker-images.yml‎

Lines changed: 0 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -143,100 +143,6 @@ jobs:
143143
subject-digest: ${{ steps.push.outputs.digest }}
144144
push-to-registry: true
145145

146-
# --------------------------------------------------------------------------
147-
# Build and push ghcr.io/sap/astonish-incus (multi-arch)
148-
# Cross-compiles Go binaries on the runner, then builds the Ubuntu-based image
149-
# --------------------------------------------------------------------------
150-
build-incus:
151-
name: Build and push astonish-incus
152-
runs-on: ubuntu-latest
153-
needs: prepare
154-
permissions:
155-
contents: read
156-
packages: write
157-
attestations: write
158-
id-token: write
159-
steps:
160-
- name: Checkout code
161-
uses: actions/checkout@v7
162-
with:
163-
ref: ${{ needs.prepare.outputs.is_release == 'true' && needs.prepare.outputs.version_tag || github.ref }}
164-
165-
- name: Set up Node.js
166-
uses: actions/setup-node@v7
167-
with:
168-
node-version: '24'
169-
cache: 'npm'
170-
cache-dependency-path: web/package-lock.json
171-
172-
- name: Build frontend
173-
run: |
174-
cd web
175-
npm ci
176-
npm run build
177-
178-
- name: Set up Go
179-
uses: actions/setup-go@v7
180-
with:
181-
go-version-file: 'go.mod'
182-
183-
- name: Cross-compile Linux binaries
184-
env:
185-
VERSION_TAG: ${{ needs.prepare.outputs.version_tag }}
186-
run: |
187-
touch web/embed.go
188-
LDFLAGS="-s -w -X github.com/SAP/astonish/cmd/astonish.Version=${VERSION_TAG}"
189-
190-
echo "Building linux/amd64..."
191-
GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -ldflags="$LDFLAGS" -o astonish-linux-amd64 .
192-
193-
echo "Building linux/arm64..."
194-
GOOS=linux GOARCH=arm64 CGO_ENABLED=0 go build -ldflags="$LDFLAGS" -o astonish-linux-arm64 .
195-
196-
ls -la astonish-linux-*
197-
198-
- name: Set up QEMU
199-
uses: docker/setup-qemu-action@v4
200-
201-
- name: Set up Docker Buildx
202-
uses: docker/setup-buildx-action@v4
203-
204-
- name: Log in to the Container registry
205-
uses: docker/login-action@v4
206-
with:
207-
registry: ghcr.io
208-
username: ${{ github.actor }}
209-
password: ${{ secrets.GITHUB_TOKEN }}
210-
211-
- name: Extract metadata (tags, labels) for Docker
212-
id: meta
213-
uses: docker/metadata-action@v6
214-
with:
215-
images: ghcr.io/sap/astonish-incus
216-
tags: |
217-
type=raw,value=${{ needs.prepare.outputs.version_tag }}
218-
type=raw,value=latest,enable=${{ needs.prepare.outputs.is_release == 'true' }}
219-
220-
- name: Build and push Docker image
221-
id: push
222-
uses: docker/build-push-action@v7
223-
with:
224-
context: .
225-
file: docker/incus/Dockerfile
226-
platforms: linux/amd64,linux/arm64
227-
push: true
228-
tags: ${{ steps.meta.outputs.tags }}
229-
labels: ${{ steps.meta.outputs.labels }}
230-
cache-from: type=gha
231-
cache-to: type=gha,mode=max
232-
233-
- name: Generate artifact attestation
234-
uses: actions/attest-build-provenance@v4
235-
with:
236-
subject-name: ghcr.io/sap/astonish-incus
237-
subject-digest: ${{ steps.push.outputs.digest }}
238-
push-to-registry: true
239-
240146
# --------------------------------------------------------------------------
241147
# Build and push ghcr.io/sap/astonish-sandbox-base (multi-arch).
242148
# Host-cross-compiles the agent binary + generates the entrypoint script;

‎.github/workflows/lint.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949

5050
- name: Run govulncheck
5151
run: govulncheck ./...
52-
# Informational: unfixed third-party vulns (e.g. incus) cause exit 3
52+
# Informational: unfixed third-party vulns cause exit 3
5353
# which cannot be suppressed. Fail only on fixable vulns by reviewing output.
5454
continue-on-error: true
5555

‎AGENTS.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Project overview
44

5-
Astonish is an AI-agent platform distributed as one Go binary. It supports a local coding TUI, a remote multi-tenant chat/platform, HTTP/SSE APIs, reusable flows, tools/MCP, memory, browser automation, fleet orchestration, and isolated execution through Incus, Kubernetes, or OpenShell backends. The Studio UI is a React SPA embedded into the Go binary.
5+
Astonish is an AI-agent platform distributed as one Go binary. It supports a local coding TUI, a remote multi-tenant chat/platform, HTTP/SSE APIs, reusable flows, tools/MCP, memory, browser automation, fleet orchestration, and isolated execution through Docker OverlayFS, Kubernetes, or OpenShell backends. The Studio UI is a React SPA embedded into the Go binary.
66

77
The repository is primarily:
88

@@ -26,7 +26,7 @@ Before changing a subsystem, read the nearest nested `AGENTS.md`; those files co
2626
- [`pkg/memory/`](pkg/memory/AGENTS.md), `pkg/session/`, `pkg/fleet/`, `pkg/drill/`, `pkg/channels/` — major domain subsystems.
2727
- [`pkg/scheduler/`](pkg/scheduler/AGENTS.md) — scheduled-job registration and execution.
2828
- [`web/src/api/`](web/src/api/AGENTS.md), [`web/src/components/chat/`](web/src/components/chat/AGENTS.md) — Studio transport contracts and chat rendering/interaction guidance.
29-
- `pkg/sandbox/` — backend-neutral sandbox contracts plus Incus/Kubernetes/OpenShell implementations. `Backend` implementations must be concurrency-safe and lifecycle methods are intentionally idempotent.
29+
- `pkg/sandbox/` — backend-neutral sandbox contracts plus Docker OverlayFS / Kubernetes / OpenShell implementations. `Backend` implementations must be concurrency-safe and lifecycle methods are intentionally idempotent.
3030
- `ent/{platform,org,team,personal}/` — four persistence scopes. Only `schema/*.go` and `generate.go` are normally hand-edited; the remaining Ent files are generated.
3131
- `web/src/` — Studio SPA. Entry points are `main.tsx` and `App.tsx`; `api/` contains REST/SSE clients and `components/` contains UI.
3232
- `tests/e2e/`, `tests/e2eboot/`, `tests/scenarios/` — tagged E2E suites, shared bootstrap harness, and scenario catalogs/reporters.

‎Makefile‎

Lines changed: 4 additions & 66 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ help:
5959
@echo " make docker-down - Stop persistent container"
6060
@echo " make docker-rebuild - Rebuild and restart persistent container"
6161
@echo ""
62-
@echo "Sandbox (Docker+Incus for macOS/Windows):"
62+
@echo "Sandbox (Docker OverlayFS + Kubernetes images):"
6363
@echo " make build-linux - Cross-compile Linux amd64 binary"
6464
@echo " make build-linux-arm64 - Cross-compile Linux arm64 binary"
6565
@echo " make sandbox-entrypoint - Generate astonish-sandbox-entrypoint script (host)"
66-
@echo " make docker-incus - Build+LOAD local Incus image (native arch; tags :$(VERSION) and :latest when VERSION=dev)"
6766
@echo " make docker-sandbox-base - Build+LOAD local sandbox-base image (native arch)"
6867
@echo ""
6968
@echo "OpenShell Sandbox:"
@@ -73,15 +72,13 @@ help:
7372
@echo ""
7473
@echo "Registry Push (multi-arch, requires docker login + buildx):"
7574
@echo " make push-dev - Build+push astonish:dev (multi-arch)"
76-
@echo " make push-incus-dev - Build+push astonish-incus:dev (multi-arch)"
7775
@echo " make push-sandbox-base-dev - Build+push astonish-sandbox-base:dev (multi-arch)"
7876
@echo " make push-sandbox-openshell-dev - Build+push astonish-sandbox-openshell:dev (multi-arch)"
7977
@echo " make push-all-dev - Push all dev images"
8078
@echo ""
8179
@echo "Registry Push (fast single-arch, dev iteration):"
8280
@echo " make push-dev-fast - Build+push astonish:dev (native arch only)"
8381
@echo " make push-sandbox-base-dev-fast - Build+push sandbox-base:dev (native arch only)"
84-
@echo " make push-incus-dev-fast - Build+push incus:dev (native arch only)"
8582
@echo " make push-sandbox-openshell-dev-fast - Build+push sandbox-openshell:dev (native arch only)"
8683
@echo " make push-all-dev-fast - Push all dev images (native arch only)"
8784

@@ -552,7 +549,7 @@ update-mcp-stars:
552549
GITHUB_TOKEN=$$(gh auth token) python3 scripts/update-mcp-stars.py
553550
@echo "Star counts updated!"
554551

555-
.PHONY: all help build build-ui build-all run studio studio-dev test test-unit test-integration test-e2e test-e2e-sqlite test-e2e-inspect test-e2e-inspect-stop e2e-k8s-up e2e-k8s-down install clean update-mcp-stars setup-hooks platform-init create-secrets e2e-env-up e2e-env-down e2e-env-rebuild docker-up docker-down docker-rebuild build-linux build-linux-arm64 sandbox-entrypoint docker-incus docker-sandbox-base docker-sandbox-openshell ensure-builder push-dev push-incus-dev push-sandbox-base-dev push-sandbox-openshell-dev push-all-dev push-dev-fast push-sandbox-base-dev-fast push-incus-dev-fast push-sandbox-openshell-dev-fast push-all-dev-fast ent-generate proto-gen
552+
.PHONY: all help build build-ui build-all run studio studio-dev test test-unit test-integration test-e2e test-e2e-sqlite test-e2e-inspect test-e2e-inspect-stop e2e-k8s-up e2e-k8s-down install clean update-mcp-stars setup-hooks platform-init create-secrets e2e-env-up e2e-env-down e2e-env-rebuild docker-up docker-down docker-rebuild build-linux build-linux-arm64 sandbox-entrypoint docker-sandbox-base docker-sandbox-openshell ensure-builder push-dev push-sandbox-base-dev push-sandbox-openshell-dev push-all-dev push-dev-fast push-sandbox-base-dev-fast push-sandbox-openshell-dev-fast push-all-dev-fast ent-generate proto-gen
556553

557554
# Docker Test Environment - isolated environment for running integration/E2E tests
558555
e2e-env-up:
@@ -652,40 +649,6 @@ helm-deps:
652649
helm dependency update deploy/helm/astonish
653650
@echo "Helm dependencies updated (Chart.lock + charts/ archive)"
654651

655-
# Build the Incus Docker image for local use (macOS/Windows Docker+Incus).
656-
#
657-
# Pitfalls this target avoids:
658-
# 1. docker-container buildx driver discards the result unless --load is set
659-
# (plain `docker build` can leave the image only in build cache).
660-
# 2. Dockerfile COPYs astonish-linux-${TARGETARCH}; on Apple Silicon that is
661-
# arm64, so we must build that binary — not only amd64.
662-
# 3. Runtime DockerImageTag() uses :latest when host version is "dev", not :dev.
663-
# When VERSION=dev we dual-tag so EnsureIncusDockerContainer can find it.
664-
#
665-
# After this: docker rm -f astonish-incus && astonish sandbox refresh --force
666-
# and start a new chat session (existing session containers keep the old binary).
667-
docker-incus:
668-
@if [ "$(DEV_ARCH)" = "arm64" ]; then \
669-
$(MAKE) build-linux-arm64; \
670-
else \
671-
$(MAKE) build-linux; \
672-
fi
673-
@echo "Building Incus Docker image (linux/$(DEV_ARCH)) and loading into local Docker..."
674-
# Single -t with --load: multi-tag --load is unreliable on docker-container
675-
# buildx (only the first tag may stick). Retag explicitly afterward.
676-
docker buildx build \
677-
--platform linux/$(DEV_ARCH) \
678-
-f docker/incus/Dockerfile \
679-
-t $(DOCKER_REGISTRY)/astonish-incus:$(VERSION) \
680-
--load \
681-
.
682-
@echo "Image loaded: $(DOCKER_REGISTRY)/astonish-incus:$(VERSION)"
683-
@if [ "$(VERSION)" = "dev" ]; then \
684-
docker tag $(DOCKER_REGISTRY)/astonish-incus:dev $(DOCKER_REGISTRY)/astonish-incus:latest; \
685-
echo "Also tagged: $(DOCKER_REGISTRY)/astonish-incus:latest (runtime looks for this when host version is dev)"; \
686-
fi
687-
@echo "Next: docker rm -f astonish-incus && ./astonish sandbox refresh --force (then new chat session)"
688-
689652
# Build the K8s sandbox-base image locally (native arch). Host-builds the
690653
# binary + entrypoint so Docker only layers apt/treesitter + COPY.
691654
docker-sandbox-base: sandbox-entrypoint
@@ -729,16 +692,6 @@ push-dev: ensure-builder build-linux build-linux-arm64
729692
--push .
730693
@echo "Pushed: $(DOCKER_REGISTRY)/astonish:$(DEV_TAG)"
731694

732-
# Build and push the Incus image (multi-arch)
733-
# Requires local cross-compiled binaries for both architectures
734-
push-incus-dev: ensure-builder build-linux build-linux-arm64
735-
@echo "Building and pushing $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG) (linux/amd64,linux/arm64)..."
736-
docker buildx build --platform linux/amd64,linux/arm64 \
737-
-f docker/incus/Dockerfile \
738-
-t $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG) \
739-
--push .
740-
@echo "Pushed: $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG)"
741-
742695
# Build and push the sandbox base image (multi-arch).
743696
# Host-cross-compiles both arches + generates the entrypoint, then Docker only
744697
# runs apt + treesitter + COPY (stable layers cache across code edits).
@@ -764,7 +717,7 @@ push-sandbox-openshell-dev: ensure-builder build-linux
764717
@echo "Pushed: $(DOCKER_REGISTRY)/astonish-sandbox-openshell:$(DEV_TAG)"
765718

766719
# Push all dev images
767-
push-all-dev: push-dev push-incus-dev push-sandbox-base-dev push-sandbox-openshell-dev
720+
push-all-dev: push-dev push-sandbox-base-dev push-sandbox-openshell-dev
768721
@echo "All dev images pushed successfully!"
769722

770723
# --- Fast single-arch dev builds (native architecture only) ---
@@ -805,21 +758,6 @@ push-sandbox-base-dev-fast: ensure-builder sandbox-entrypoint
805758
--push .
806759
@echo "Pushed: $(DOCKER_REGISTRY)/astonish-sandbox-base:$(DEV_TAG)"
807760

808-
# Fast: build and push Incus image (single arch). Build the binary for DEV_ARCH
809-
# (arm64 on Apple Silicon), not only amd64.
810-
push-incus-dev-fast: ensure-builder
811-
@if [ "$(DEV_ARCH)" = "arm64" ]; then \
812-
$(MAKE) build-linux-arm64; \
813-
else \
814-
$(MAKE) build-linux; \
815-
fi
816-
@echo "Building and pushing $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG) (linux/$(DEV_ARCH) only)..."
817-
docker buildx build --platform linux/$(DEV_ARCH) \
818-
-f docker/incus/Dockerfile \
819-
-t $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG) \
820-
--push .
821-
@echo "Pushed: $(DOCKER_REGISTRY)/astonish-incus:$(DEV_TAG)"
822-
823761
# Fast: build and push OpenShell sandbox image (amd64 only — KasmVNC + CloakBrowser are amd64)
824762
push-sandbox-openshell-dev-fast: ensure-builder build-linux
825763
@echo "Building and pushing $(DOCKER_REGISTRY)/astonish-sandbox-openshell:$(DEV_TAG) (linux/amd64)..."
@@ -830,7 +768,7 @@ push-sandbox-openshell-dev-fast: ensure-builder build-linux
830768
@echo "Pushed: $(DOCKER_REGISTRY)/astonish-sandbox-openshell:$(DEV_TAG)"
831769

832770
# Fast: push all dev images (single arch)
833-
push-all-dev-fast: push-dev-fast push-sandbox-base-dev-fast push-incus-dev-fast push-sandbox-openshell-dev-fast
771+
push-all-dev-fast: push-dev-fast push-sandbox-base-dev-fast push-sandbox-openshell-dev-fast
834772
@echo "All dev images pushed ($(DEV_ARCH) only)!"
835773

836774
# Regenerate Ent client code only when a scope's schema inputs or generated

‎README.md‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,13 @@ Master Key (KEK) → Per-Org DEK → Credential Data (AES-256-GCM)
9898
(stored encrypted)
9999
```
100100

101-
**Per-Team Sandboxes.** Each organization gets network-isolated execution environments. Two backends supported:
101+
**Per-Team Sandboxes.** Each organization gets network-isolated execution environments. Three backends supported:
102102

103-
| Backend | Isolation | Use Case |
104-
| -------------- | --------------------------------------- | ----------------------- |
105-
| **Incus** | Per-org bridge networks, LXC containers | Self-hosted, bare metal |
106-
| **Kubernetes** | NetworkPolicies, org/team pod labels | Cloud-native, scalable |
103+
| Backend | Isolation | Use Case |
104+
| -------------------- | ---------------------------------------------- | ---------------------------- |
105+
| **Docker OverlayFS** | Session containers + overlay layers | Local Studio / self-hosted |
106+
| **Kubernetes** | NetworkPolicies, org/team pod labels | Cloud-native, scalable |
107+
| **OpenShell** | Landlock + seccomp + L7 egress via gateway | Highest isolation on K8s |
107108

108109
Team admins customize container templates and get terminal access for configuration. Sandbox templates cascade: personal > team > org > global.
109110

0 commit comments

Comments
 (0)