@agimon-ai/doompi-sandbox 0.0.1-alpha.55 → 0.0.1-alpha.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -21
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -16,7 +16,8 @@ Part of the [DoomPi distribution](https://www.npmjs.com/package/@agimon-ai/doomp
|
|
|
16
16
|
pi install npm:@agimon-ai/doompi-sandbox
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
-
|
|
19
|
+
Pi loads the extension after installation. Container launches use the DoomPi launcher and require
|
|
20
|
+
this package in the selected major mode's layers, as shown below.
|
|
20
21
|
|
|
21
22
|
## Enable the sandbox
|
|
22
23
|
|
|
@@ -45,9 +46,10 @@ disposable Linux container instead of running Pi on the host:
|
|
|
45
46
|
|
|
46
47
|
1. The harness resolves this package's `./sandbox-harness` export and delegates the launch.
|
|
47
48
|
2. The layer detects the first available engine in the order `docker`, `podman`, `nerdctl`,
|
|
48
|
-
`finch` (override with `DOOMPI_SANDBOX_ENGINE`), and builds
|
|
49
|
-
image
|
|
50
|
-
|
|
49
|
+
`finch` (override with `DOOMPI_SANDBOX_ENGINE`), and builds a
|
|
50
|
+
`doompi-sandbox:v<version>-<digest>` image when that tag is not cached. The digest covers the
|
|
51
|
+
image definition and bridge source. The image installs DoomPi from the registry rather than
|
|
52
|
+
copying the host's platform-specific packages.
|
|
51
53
|
3. It starts `docker run --rm` with the repository bind-mounted at its host path, an isolated
|
|
52
54
|
home volume, and a volume shadowing the repository's `.pi` package store. Inside, the
|
|
53
55
|
`doompi` launcher replays the same major mode, domains, profile, and Pi arguments.
|
|
@@ -61,8 +63,8 @@ settings, and `DOOMPI_PRESET`. Everything else a shell accumulates stays on the
|
|
|
61
63
|
|
|
62
64
|
## Engine and runtime selection
|
|
63
65
|
|
|
64
|
-
|
|
65
|
-
|
|
66
|
+
The harness invokes each supported engine with Docker-compatible arguments. The engine and its
|
|
67
|
+
VM, if any, must already be running on the host.
|
|
66
68
|
|
|
67
69
|
`DOOMPI_SANDBOX_RUN_FLAGS` passes extra options straight to the engine, which is how you select a
|
|
68
70
|
different isolation runtime without the layer having to know about it:
|
|
@@ -75,9 +77,8 @@ Options must be self-contained (`--flag` or `--flag=value`). A separated value s
|
|
|
75
77
|
`--runtime runsc` is refused, because a bare word cannot be told apart from an image name and
|
|
76
78
|
would silently launch a different container.
|
|
77
79
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
bind-mounted unix socket, so expect to turn brokering off or move it to a port first.
|
|
80
|
+
Alternative isolation runtimes such as Kata or Firecracker are not verified here. Check their
|
|
81
|
+
mount and broker-transport support before relying on them.
|
|
81
82
|
|
|
82
83
|
## Workspace dev containers
|
|
83
84
|
|
|
@@ -86,10 +87,9 @@ container instead of the built-in image, because a workspace that describes its
|
|
|
86
87
|
describing the toolchain its agent needs. The Dev Containers CLI brings it up, so the file decides
|
|
87
88
|
the image, features, mounts, run arguments and lifecycle hooks in full.
|
|
88
89
|
|
|
89
|
-
**
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
ignore the file and use the built-in image, which is a boundary.
|
|
90
|
+
**Workspace devcontainer configuration is trusted executable input, not an isolation policy.**
|
|
91
|
+
It can mount your home directory or the Docker socket and run lifecycle hooks. The launch warns
|
|
92
|
+
about this mode. Set `DOOMPI_SANDBOX_DEVCONTAINER=0` to ignore the file and use the built-in image.
|
|
93
93
|
|
|
94
94
|
What still applies: the environment allowlist and the credential broker. The container receives the
|
|
95
95
|
session token rather than any real key, and reaches the broker over the host gateway.
|
|
@@ -125,10 +125,8 @@ published ahead of the flow and are not covered.
|
|
|
125
125
|
|
|
126
126
|
## Terminal behavior
|
|
127
127
|
|
|
128
|
-
The
|
|
129
|
-
|
|
130
|
-
re-renders frames, so rendering, keybindings, mouse and every extension's custom panel behave
|
|
131
|
-
exactly as they do unsandboxed.
|
|
128
|
+
The container runs Pi's TUI directly with inherited stdio: `-i` is always passed and `-t` is added
|
|
129
|
+
when the host has a terminal. The harness does not proxy or re-render terminal frames.
|
|
132
130
|
|
|
133
131
|
Host integrations are the exception, because the process is not on your host:
|
|
134
132
|
|
|
@@ -145,8 +143,7 @@ falling back to the editor that is there.
|
|
|
145
143
|
|
|
146
144
|
## Provider credential broker
|
|
147
145
|
|
|
148
|
-
|
|
149
|
-
for, the launch:
|
|
146
|
+
For supported providers with a host API key, the credential broker:
|
|
150
147
|
|
|
151
148
|
1. Starts a broker on the host and grants the container exactly one route to it.
|
|
152
149
|
2. Replaces the credential variable with a random per-session token.
|
|
@@ -179,7 +176,7 @@ Reports whether the current session runs inside the sandbox container or directl
|
|
|
179
176
|
## Current limits
|
|
180
177
|
|
|
181
178
|
- The broker carries a curated provider list. OAuth subscription logins are not brokered, so they
|
|
182
|
-
are performed inside the sandbox
|
|
179
|
+
are performed inside the sandbox and stored in that container's home volume.
|
|
183
180
|
- A host `*_BASE_URL` override is dropped rather than used as the broker's upstream.
|
|
184
181
|
- Compositions that declare local workspace packages cannot load their platform-specific
|
|
185
182
|
dependencies inside the Linux container; use registry-installed layers for sandboxed work.
|
|
@@ -187,6 +184,8 @@ Reports whether the current session runs inside the sandbox container or directl
|
|
|
187
184
|
in-process against synchronized settings, and a fresh container has none to load, so the
|
|
188
185
|
session is composed from the repository the way a first run is.
|
|
189
186
|
- Container network access follows the engine's defaults and is not restricted yet.
|
|
187
|
+
- Mounted repositories are writable. Containers do not protect those files from agent edits,
|
|
188
|
+
and the container engine remains part of the trusted base.
|
|
190
189
|
|
|
191
190
|
## Public API
|
|
192
191
|
|
|
@@ -201,10 +200,14 @@ The Pi host entry is also available at:
|
|
|
201
200
|
@agimon-ai/doompi-sandbox/extensions/pi
|
|
202
201
|
```
|
|
203
202
|
|
|
204
|
-
The service layer is host-neutral.
|
|
203
|
+
The service layer is host-neutral. `/extensions/pi` registers the in-session command;
|
|
204
|
+
`/sandbox-harness` owns launcher provisioning. The separate `/cockpit-harness` export supports
|
|
205
|
+
the web cockpit's container lifecycle and credential broker.
|
|
205
206
|
|
|
206
207
|
## Development
|
|
207
208
|
|
|
209
|
+
Run from this package directory in the workspace:
|
|
210
|
+
|
|
208
211
|
```bash
|
|
209
212
|
pnpm build
|
|
210
213
|
pnpm typecheck
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agimon-ai/doompi-sandbox",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.57",
|
|
4
4
|
"description": "Container sandbox for DoomPi launches: the agent, extensions, and tools run inside Docker or Podman while the terminal stays on the host",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"coding-agent",
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
64
|
"@deepseek-ai/cordis": "4.0.1",
|
|
65
|
-
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.
|
|
65
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.57"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
68
|
"@earendil-works/pi-coding-agent": "0.85.0",
|
|
@@ -71,7 +71,7 @@
|
|
|
71
71
|
"tsdown": "0.22.14",
|
|
72
72
|
"typescript": "7.0.2",
|
|
73
73
|
"vitest": "4.1.11",
|
|
74
|
-
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.
|
|
74
|
+
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.54"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
77
|
"@earendil-works/pi-coding-agent": "0.85.0"
|