@agimon-ai/doompi-sandbox 0.0.1-alpha.56 → 0.0.1-alpha.63
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/dist/adapters/brokerHost.d.cts +1 -2
- package/dist/adapters/brokerHost.d.cts.map +1 -1
- package/dist/adapters/brokerHost.d.mts +1 -2
- package/dist/adapters/brokerHost.d.mts.map +1 -1
- package/dist/adapters/cockpitHarness.d.cts +4 -5
- package/dist/adapters/cockpitHarness.d.cts.map +1 -1
- package/dist/adapters/cockpitHarness.d.mts +4 -5
- package/dist/adapters/cockpitHarness.d.mts.map +1 -1
- package/dist/adapters/harness.d.cts +3 -4
- package/dist/adapters/harness.d.cts.map +1 -1
- package/dist/adapters/harness.d.mts +3 -4
- package/dist/adapters/harness.d.mts.map +1 -1
- package/dist/adapters/pi/extension.d.cts +2 -2
- package/dist/adapters/pi/extension.d.cts.map +1 -1
- package/dist/adapters/pi/extension.d.mts +2 -2
- package/dist/adapters/pi/extension.d.mts.map +1 -1
- package/dist/container/index.d.cts +1 -2
- package/dist/container/index.d.cts.map +1 -1
- package/dist/container/index.d.mts +1 -2
- package/dist/container/index.d.mts.map +1 -1
- package/dist/services/cockpitPlan.d.cts +1 -2
- package/dist/services/cockpitPlan.d.cts.map +1 -1
- package/dist/services/cockpitPlan.d.mts +1 -2
- package/dist/services/cockpitPlan.d.mts.map +1 -1
- package/dist/services/extensionService.d.cts +1 -2
- package/dist/services/extensionService.d.cts.map +1 -1
- package/dist/services/extensionService.d.mts +1 -2
- package/dist/services/extensionService.d.mts.map +1 -1
- package/dist/types/extension.d.cts +4 -5
- package/dist/types/extension.d.cts.map +1 -1
- package/dist/types/extension.d.mts +4 -5
- package/dist/types/extension.d.mts.map +1 -1
- package/dist/types/sandboxHarness.d.cts +5 -6
- package/dist/types/sandboxHarness.d.cts.map +1 -1
- package/dist/types/sandboxHarness.d.mts +5 -6
- package/dist/types/sandboxHarness.d.mts.map +1 -1
- package/package.json +10 -10
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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BrokerEndpoint } from "../types/sandboxHarness.cjs";
|
|
2
2
|
//#region src/adapters/brokerHost.d.ts
|
|
3
|
-
interface RunningBroker {
|
|
3
|
+
export interface RunningBroker {
|
|
4
4
|
/** How a container reaches this broker. */
|
|
5
5
|
endpoint: BrokerEndpoint;
|
|
6
6
|
/** Secret the container presents instead of any real credential. */
|
|
@@ -12,5 +12,4 @@ interface RunningBroker {
|
|
|
12
12
|
stop(): Promise<void>;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
export { RunningBroker };
|
|
16
15
|
//# sourceMappingURL=brokerHost.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brokerHost.d.cts","names":[],"sources":["../../src/adapters/brokerHost.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"brokerHost.d.cts","names":[],"sources":["../../src/adapters/brokerHost.ts"],"mappings":";;iBAiBiB;;EAEf,UAAU;;EAEV;;EAEA;;EAEA;EACA,QAAQ"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { BrokerEndpoint } from "../types/sandboxHarness.mjs";
|
|
2
2
|
//#region src/adapters/brokerHost.d.ts
|
|
3
|
-
interface RunningBroker {
|
|
3
|
+
export interface RunningBroker {
|
|
4
4
|
/** How a container reaches this broker. */
|
|
5
5
|
endpoint: BrokerEndpoint;
|
|
6
6
|
/** Secret the container presents instead of any real credential. */
|
|
@@ -12,5 +12,4 @@ interface RunningBroker {
|
|
|
12
12
|
stop(): Promise<void>;
|
|
13
13
|
}
|
|
14
14
|
//#endregion
|
|
15
|
-
export { RunningBroker };
|
|
16
15
|
//# sourceMappingURL=brokerHost.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"brokerHost.d.mts","names":[],"sources":["../../src/adapters/brokerHost.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"brokerHost.d.mts","names":[],"sources":["../../src/adapters/brokerHost.ts"],"mappings":";;iBAiBiB;;EAEf,UAAU;;EAEV;;EAEA;;EAEA;EACA,QAAQ"}
|
|
@@ -2,7 +2,7 @@ import { EngineProcessRunner } from "../types/sandboxHarness.cjs";
|
|
|
2
2
|
import { CockpitGitIdentity } from "../services/cockpitPlan.cjs";
|
|
3
3
|
import { CockpitContainerHarnessModule, CockpitContainerRequest, CockpitContainerStart } from "@agimon-ai/doompi-extension-contracts/cockpit-container";
|
|
4
4
|
//#region src/adapters/cockpitHarness.d.ts
|
|
5
|
-
interface CockpitHarnessDependencies {
|
|
5
|
+
export interface CockpitHarnessDependencies {
|
|
6
6
|
runner?: EngineProcessRunner;
|
|
7
7
|
version?: string;
|
|
8
8
|
/** Test seam: reports whether the cockpit inside is answering yet. */
|
|
@@ -11,10 +11,9 @@ interface CockpitHarnessDependencies {
|
|
|
11
11
|
gitIdentity?: () => CockpitGitIdentity | undefined;
|
|
12
12
|
now?: () => number;
|
|
13
13
|
}
|
|
14
|
-
declare function createCockpitHarness(dependencies?: CockpitHarnessDependencies): CockpitContainerHarnessModule;
|
|
14
|
+
export declare function createCockpitHarness(dependencies?: CockpitHarnessDependencies): CockpitContainerHarnessModule;
|
|
15
15
|
/** The module-shaped entry a host resolves from the composition. */
|
|
16
|
-
declare function startCockpitContainer(request: CockpitContainerRequest): Promise<CockpitContainerStart>;
|
|
17
|
-
declare function reapCockpitContainer(containerId: string): Promise<boolean>;
|
|
16
|
+
export declare function startCockpitContainer(request: CockpitContainerRequest): Promise<CockpitContainerStart>;
|
|
17
|
+
export declare function reapCockpitContainer(containerId: string): Promise<boolean>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { CockpitHarnessDependencies, createCockpitHarness, reapCockpitContainer, startCockpitContainer };
|
|
20
19
|
//# sourceMappingURL=cockpitHarness.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpitHarness.d.cts","names":[],"sources":["../../src/adapters/cockpitHarness.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"cockpitHarness.d.cts","names":[],"sources":["../../src/adapters/cockpitHarness.ts"],"mappings":";;;;iBA6BiB;EACf,SAAS;EACT;;EAEA,SAAS,iBAAiB;;EAE1B,oBAAoB;EACpB;;wBAwDc,qBAAqB,eAAc,6BAAkC;;wBAgG/D,sBAAsB,SAAS,0BAA0B,QAAQ;wBAIjE,qBAAqB,sBAAsB"}
|
|
@@ -2,7 +2,7 @@ import { EngineProcessRunner } from "../types/sandboxHarness.mjs";
|
|
|
2
2
|
import { CockpitGitIdentity } from "../services/cockpitPlan.mjs";
|
|
3
3
|
import { CockpitContainerHarnessModule, CockpitContainerRequest, CockpitContainerStart } from "@agimon-ai/doompi-extension-contracts/cockpit-container";
|
|
4
4
|
//#region src/adapters/cockpitHarness.d.ts
|
|
5
|
-
interface CockpitHarnessDependencies {
|
|
5
|
+
export interface CockpitHarnessDependencies {
|
|
6
6
|
runner?: EngineProcessRunner;
|
|
7
7
|
version?: string;
|
|
8
8
|
/** Test seam: reports whether the cockpit inside is answering yet. */
|
|
@@ -11,10 +11,9 @@ interface CockpitHarnessDependencies {
|
|
|
11
11
|
gitIdentity?: () => CockpitGitIdentity | undefined;
|
|
12
12
|
now?: () => number;
|
|
13
13
|
}
|
|
14
|
-
declare function createCockpitHarness(dependencies?: CockpitHarnessDependencies): CockpitContainerHarnessModule;
|
|
14
|
+
export declare function createCockpitHarness(dependencies?: CockpitHarnessDependencies): CockpitContainerHarnessModule;
|
|
15
15
|
/** The module-shaped entry a host resolves from the composition. */
|
|
16
|
-
declare function startCockpitContainer(request: CockpitContainerRequest): Promise<CockpitContainerStart>;
|
|
17
|
-
declare function reapCockpitContainer(containerId: string): Promise<boolean>;
|
|
16
|
+
export declare function startCockpitContainer(request: CockpitContainerRequest): Promise<CockpitContainerStart>;
|
|
17
|
+
export declare function reapCockpitContainer(containerId: string): Promise<boolean>;
|
|
18
18
|
//#endregion
|
|
19
|
-
export { CockpitHarnessDependencies, createCockpitHarness, reapCockpitContainer, startCockpitContainer };
|
|
20
19
|
//# sourceMappingURL=cockpitHarness.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpitHarness.d.mts","names":[],"sources":["../../src/adapters/cockpitHarness.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"cockpitHarness.d.mts","names":[],"sources":["../../src/adapters/cockpitHarness.ts"],"mappings":";;;;iBA6BiB;EACf,SAAS;EACT;;EAEA,SAAS,iBAAiB;;EAE1B,oBAAoB;EACpB;;wBAwDc,qBAAqB,eAAc,6BAAkC;;wBAgG/D,sBAAsB,SAAS,0BAA0B,QAAQ;wBAIjE,qBAAqB,sBAAsB"}
|
|
@@ -2,7 +2,7 @@ import { EngineProcessRunner, SandboxHostFacts } from "../types/sandboxHarness.c
|
|
|
2
2
|
import { RunningBroker } from "./brokerHost.cjs";
|
|
3
3
|
import { SandboxLaunchRequest } from "@agimon-ai/doompi-extension-contracts/sandbox-harness";
|
|
4
4
|
//#region src/adapters/harness.d.ts
|
|
5
|
-
interface SandboxLauncherDependencies {
|
|
5
|
+
export interface SandboxLauncherDependencies {
|
|
6
6
|
runner?: EngineProcessRunner;
|
|
7
7
|
/** Seam for tests; defaults to probing the real OAuth callback ports. */
|
|
8
8
|
loginPorts?: () => Promise<number[]>;
|
|
@@ -16,11 +16,10 @@ interface SandboxLauncherDependencies {
|
|
|
16
16
|
hostFacts?: Partial<SandboxHostFacts>;
|
|
17
17
|
}
|
|
18
18
|
/** Builds the launcher with injectable seams for tests. */
|
|
19
|
-
declare function createSandboxLauncher(dependencies?: SandboxLauncherDependencies): {
|
|
19
|
+
export declare function createSandboxLauncher(dependencies?: SandboxLauncherDependencies): {
|
|
20
20
|
launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
21
21
|
};
|
|
22
22
|
/** Contract entry the DoomPi harness resolves for `--sandbox`. */
|
|
23
|
-
declare function launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
23
|
+
export declare function launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { SandboxLauncherDependencies, createSandboxLauncher, launchSandbox };
|
|
26
25
|
//# sourceMappingURL=harness.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.d.cts","names":[],"sources":["../../src/adapters/harness.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"harness.d.cts","names":[],"sources":["../../src/adapters/harness.ts"],"mappings":";;;;iBAmCiB;EACf,SAAS;;EAET,mBAAmB;;EAEnB,eAAe;IACb,aAAa,SAAS;IACtB,YAAY;QACR,QAAQ;;EAEd;EACA,YAAY,QAAQ;;;wBAyFN,sBAAsB,eAAc;EAK1C,cAAa,SAAU,uBAAuB;;;wBAmGxC,cAAc,SAAS,uBAAuB"}
|
|
@@ -2,7 +2,7 @@ import { EngineProcessRunner, SandboxHostFacts } from "../types/sandboxHarness.m
|
|
|
2
2
|
import { RunningBroker } from "./brokerHost.mjs";
|
|
3
3
|
import { SandboxLaunchRequest } from "@agimon-ai/doompi-extension-contracts/sandbox-harness";
|
|
4
4
|
//#region src/adapters/harness.d.ts
|
|
5
|
-
interface SandboxLauncherDependencies {
|
|
5
|
+
export interface SandboxLauncherDependencies {
|
|
6
6
|
runner?: EngineProcessRunner;
|
|
7
7
|
/** Seam for tests; defaults to probing the real OAuth callback ports. */
|
|
8
8
|
loginPorts?: () => Promise<number[]>;
|
|
@@ -16,11 +16,10 @@ interface SandboxLauncherDependencies {
|
|
|
16
16
|
hostFacts?: Partial<SandboxHostFacts>;
|
|
17
17
|
}
|
|
18
18
|
/** Builds the launcher with injectable seams for tests. */
|
|
19
|
-
declare function createSandboxLauncher(dependencies?: SandboxLauncherDependencies): {
|
|
19
|
+
export declare function createSandboxLauncher(dependencies?: SandboxLauncherDependencies): {
|
|
20
20
|
launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
21
21
|
};
|
|
22
22
|
/** Contract entry the DoomPi harness resolves for `--sandbox`. */
|
|
23
|
-
declare function launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
23
|
+
export declare function launchSandbox(request: SandboxLaunchRequest): Promise<number>;
|
|
24
24
|
//#endregion
|
|
25
|
-
export { SandboxLauncherDependencies, createSandboxLauncher, launchSandbox };
|
|
26
25
|
//# sourceMappingURL=harness.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"harness.d.mts","names":[],"sources":["../../src/adapters/harness.ts"],"mappings":";;;;
|
|
1
|
+
{"version":3,"file":"harness.d.mts","names":[],"sources":["../../src/adapters/harness.ts"],"mappings":";;;;iBAmCiB;EACf,SAAS;;EAET,mBAAmB;;EAEnB,eAAe;IACb,aAAa,SAAS;IACtB,YAAY;QACR,QAAQ;;EAEd;EACA,YAAY,QAAQ;;;wBAyFN,sBAAsB,eAAc;EAK1C,cAAa,SAAU,uBAAuB;;;wBAmGxC,cAAc,SAAS,uBAAuB"}
|
|
@@ -3,7 +3,7 @@ import "@deepseek-ai/cordis";
|
|
|
3
3
|
import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
//#region src/adapters/pi/extension.d.ts
|
|
5
5
|
/** Connects the package's standard Pi entry to DoomPi's shared Cordis host. */
|
|
6
|
-
declare function activateSandboxExtension(pi: ExtensionAPI, dependencies?: SandboxExtensionDependencies): Promise<void>;
|
|
6
|
+
export declare function activateSandboxExtension(pi: ExtensionAPI, dependencies?: SandboxExtensionDependencies): Promise<void>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { activateSandboxExtension
|
|
8
|
+
export { activateSandboxExtension as default };
|
|
9
9
|
//# sourceMappingURL=extension.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../../src/adapters/pi/extension.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../../src/adapters/pi/extension.ts"],"mappings":";;;;;wBAsEsB,yBACpB,IAAI,cACJ,eAAc,+BACb"}
|
|
@@ -3,7 +3,7 @@ import "@deepseek-ai/cordis";
|
|
|
3
3
|
import { ExtensionAPI } from "@earendil-works/pi-coding-agent";
|
|
4
4
|
//#region src/adapters/pi/extension.d.ts
|
|
5
5
|
/** Connects the package's standard Pi entry to DoomPi's shared Cordis host. */
|
|
6
|
-
declare function activateSandboxExtension(pi: ExtensionAPI, dependencies?: SandboxExtensionDependencies): Promise<void>;
|
|
6
|
+
export declare function activateSandboxExtension(pi: ExtensionAPI, dependencies?: SandboxExtensionDependencies): Promise<void>;
|
|
7
7
|
//#endregion
|
|
8
|
-
export { activateSandboxExtension
|
|
8
|
+
export { activateSandboxExtension as default };
|
|
9
9
|
//# sourceMappingURL=extension.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../../src/adapters/pi/extension.ts"],"mappings":";;;;;
|
|
1
|
+
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../../src/adapters/pi/extension.ts"],"mappings":";;;;;wBAsEsB,yBACpB,IAAI,cACJ,eAAc,+BACb"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SandboxExtensionDependencies } from "../types/extension.cjs";
|
|
2
2
|
//#region src/container/index.d.ts
|
|
3
|
-
declare function createSandboxContainer(overrides?: Partial<SandboxExtensionDependencies>): SandboxExtensionDependencies;
|
|
3
|
+
export declare function createSandboxContainer(overrides?: Partial<SandboxExtensionDependencies>): SandboxExtensionDependencies;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { createSandboxContainer };
|
|
6
5
|
//# sourceMappingURL=index.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/container/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.cts","names":[],"sources":["../../src/container/index.ts"],"mappings":";;wBAGgB,uBACd,YAAW,QAAQ,gCAClB"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { SandboxExtensionDependencies } from "../types/extension.mjs";
|
|
2
2
|
//#region src/container/index.d.ts
|
|
3
|
-
declare function createSandboxContainer(overrides?: Partial<SandboxExtensionDependencies>): SandboxExtensionDependencies;
|
|
3
|
+
export declare function createSandboxContainer(overrides?: Partial<SandboxExtensionDependencies>): SandboxExtensionDependencies;
|
|
4
4
|
//#endregion
|
|
5
|
-
export { createSandboxContainer };
|
|
6
5
|
//# sourceMappingURL=index.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/container/index.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"index.d.mts","names":[],"sources":["../../src/container/index.ts"],"mappings":";;wBAGgB,uBACd,YAAW,QAAQ,gCAClB"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "@agimon-ai/doompi-extension-contracts/cockpit-container";
|
|
2
2
|
//#region src/services/cockpitPlan.d.ts
|
|
3
3
|
/** Git identity the agent commits under; no key crosses the boundary, so it cannot push. */
|
|
4
|
-
interface CockpitGitIdentity {
|
|
4
|
+
export interface CockpitGitIdentity {
|
|
5
5
|
name: string;
|
|
6
6
|
email: string;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { CockpitGitIdentity };
|
|
10
9
|
//# sourceMappingURL=cockpitPlan.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpitPlan.d.cts","names":[],"sources":["../../src/services/cockpitPlan.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cockpitPlan.d.cts","names":[],"sources":["../../src/services/cockpitPlan.ts"],"mappings":";;;iBA4CiB;EACf;EACA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import "@agimon-ai/doompi-extension-contracts/cockpit-container";
|
|
2
2
|
//#region src/services/cockpitPlan.d.ts
|
|
3
3
|
/** Git identity the agent commits under; no key crosses the boundary, so it cannot push. */
|
|
4
|
-
interface CockpitGitIdentity {
|
|
4
|
+
export interface CockpitGitIdentity {
|
|
5
5
|
name: string;
|
|
6
6
|
email: string;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { CockpitGitIdentity };
|
|
10
9
|
//# sourceMappingURL=cockpitPlan.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cockpitPlan.d.mts","names":[],"sources":["../../src/services/cockpitPlan.ts"],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"cockpitPlan.d.mts","names":[],"sources":["../../src/services/cockpitPlan.ts"],"mappings":";;;iBA4CiB;EACf;EACA"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SandboxExtensionResult, SandboxExtensionService } from "../types/extension.cjs";
|
|
2
2
|
//#region src/services/extensionService.d.ts
|
|
3
|
-
declare class DefaultSandboxExtensionService implements SandboxExtensionService {
|
|
3
|
+
export declare class DefaultSandboxExtensionService implements SandboxExtensionService {
|
|
4
4
|
private readonly environment;
|
|
5
5
|
constructor(environment: Readonly<Record<string, string | undefined>>);
|
|
6
6
|
execute(): Promise<SandboxExtensionResult>;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { DefaultSandboxExtensionService };
|
|
10
9
|
//# sourceMappingURL=extensionService.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionService.d.cts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extensionService.d.cts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;qBAMa,0CAA0C;mBACpC;EAEjB,YAAY,aAAa,SAAS;EAI5B,WAAW,QAAQ"}
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import { SandboxExtensionResult, SandboxExtensionService } from "../types/extension.mjs";
|
|
2
2
|
//#region src/services/extensionService.d.ts
|
|
3
|
-
declare class DefaultSandboxExtensionService implements SandboxExtensionService {
|
|
3
|
+
export declare class DefaultSandboxExtensionService implements SandboxExtensionService {
|
|
4
4
|
private readonly environment;
|
|
5
5
|
constructor(environment: Readonly<Record<string, string | undefined>>);
|
|
6
6
|
execute(): Promise<SandboxExtensionResult>;
|
|
7
7
|
}
|
|
8
8
|
//#endregion
|
|
9
|
-
export { DefaultSandboxExtensionService };
|
|
10
9
|
//# sourceMappingURL=extensionService.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extensionService.d.mts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"extensionService.d.mts","names":[],"sources":["../../src/services/extensionService.ts"],"mappings":";;qBAMa,0CAA0C;mBACpC;EAEjB,YAAY,aAAa,SAAS;EAI5B,WAAW,QAAQ"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
//#region src/types/extension.d.ts
|
|
2
|
-
type SandboxNotificationLevel = 'info';
|
|
3
|
-
interface SandboxExtensionResult {
|
|
2
|
+
export type SandboxNotificationLevel = 'info';
|
|
3
|
+
export interface SandboxExtensionResult {
|
|
4
4
|
message: string;
|
|
5
5
|
level: SandboxNotificationLevel;
|
|
6
6
|
}
|
|
7
|
-
interface SandboxExtensionService {
|
|
7
|
+
export interface SandboxExtensionService {
|
|
8
8
|
execute(): Promise<SandboxExtensionResult>;
|
|
9
9
|
}
|
|
10
|
-
interface SandboxExtensionDependencies {
|
|
10
|
+
export interface SandboxExtensionDependencies {
|
|
11
11
|
service: SandboxExtensionService;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { SandboxExtensionDependencies, SandboxExtensionResult, SandboxExtensionService, SandboxNotificationLevel };
|
|
15
14
|
//# sourceMappingURL=extension.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"extension.d.cts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";YACY;iBAEK;EACf;EACA,OAAO;;iBAGQ;EACf,WAAW,QAAQ;;iBAGJ;EACf,SAAS"}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
1
|
//#region src/types/extension.d.ts
|
|
2
|
-
type SandboxNotificationLevel = 'info';
|
|
3
|
-
interface SandboxExtensionResult {
|
|
2
|
+
export type SandboxNotificationLevel = 'info';
|
|
3
|
+
export interface SandboxExtensionResult {
|
|
4
4
|
message: string;
|
|
5
5
|
level: SandboxNotificationLevel;
|
|
6
6
|
}
|
|
7
|
-
interface SandboxExtensionService {
|
|
7
|
+
export interface SandboxExtensionService {
|
|
8
8
|
execute(): Promise<SandboxExtensionResult>;
|
|
9
9
|
}
|
|
10
|
-
interface SandboxExtensionDependencies {
|
|
10
|
+
export interface SandboxExtensionDependencies {
|
|
11
11
|
service: SandboxExtensionService;
|
|
12
12
|
}
|
|
13
13
|
//#endregion
|
|
14
|
-
export { SandboxExtensionDependencies, SandboxExtensionResult, SandboxExtensionService, SandboxNotificationLevel };
|
|
15
14
|
//# sourceMappingURL=extension.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"extension.d.mts","names":[],"sources":["../../src/types/extension.ts"],"mappings":";YACY;iBAEK;EACf;EACA,OAAO;;iBAGQ;EACf,WAAW,QAAQ;;iBAGJ;EACf,SAAS"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
//#region src/types/sandboxHarness.d.ts
|
|
2
|
-
interface EngineRunOptions {
|
|
2
|
+
export interface EngineRunOptions {
|
|
3
3
|
/** Pipes this to stdin instead of attaching the session's stdio. */
|
|
4
4
|
input?: string;
|
|
5
5
|
}
|
|
6
|
-
interface EngineCaptureResult {
|
|
6
|
+
export interface EngineCaptureResult {
|
|
7
7
|
exitCode: number;
|
|
8
8
|
stdout: string;
|
|
9
9
|
}
|
|
10
10
|
/** Runs container engine commands with the session's terminal attached. */
|
|
11
|
-
interface EngineProcessRunner {
|
|
11
|
+
export interface EngineProcessRunner {
|
|
12
12
|
run(command: string, args: string[], options?: EngineRunOptions): Promise<number>;
|
|
13
13
|
/** Captures stdout for probes; an unspawnable command reports undefined. */
|
|
14
14
|
capture(command: string, args: string[]): Promise<EngineCaptureResult | undefined>;
|
|
15
15
|
}
|
|
16
16
|
/** Host facts the plan builder projects into engine arguments. */
|
|
17
|
-
interface SandboxHostFacts {
|
|
17
|
+
export interface SandboxHostFacts {
|
|
18
18
|
/** Both ends of the session are terminals, so the container gets one too. */
|
|
19
19
|
hasTty: boolean;
|
|
20
20
|
platform: string;
|
|
@@ -26,7 +26,7 @@ interface SandboxHostFacts {
|
|
|
26
26
|
version: string;
|
|
27
27
|
}
|
|
28
28
|
/** How a sandboxed container reaches the host broker. */
|
|
29
|
-
type BrokerEndpoint = {
|
|
29
|
+
export type BrokerEndpoint = {
|
|
30
30
|
transport: 'unix';
|
|
31
31
|
socketDirectory: string;
|
|
32
32
|
} | {
|
|
@@ -34,5 +34,4 @@ type BrokerEndpoint = {
|
|
|
34
34
|
port: number;
|
|
35
35
|
};
|
|
36
36
|
//#endregion
|
|
37
|
-
export { BrokerEndpoint, EngineCaptureResult, EngineProcessRunner, EngineRunOptions, SandboxHostFacts };
|
|
38
37
|
//# sourceMappingURL=sandboxHarness.d.cts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandboxHarness.d.cts","names":[],"sources":["../../src/types/sandboxHarness.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"sandboxHarness.d.cts","names":[],"sources":["../../src/types/sandboxHarness.ts"],"mappings":";iBAEiB;;EAEf;;iBAGe;EACf;EACA;;;iBAIe;EACf,IAAI,iBAAiB,gBAAgB,UAAU,mBAAmB;;EAElE,QAAQ,iBAAiB,iBAAiB,QAAQ;;;iBAInC;;EAEf;EACA;EACA;EACA;;EAEA;;EAEA;;;YAIU;EAAmB;EAAmB;;EAA8B;EAAkB"}
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
//#region src/types/sandboxHarness.d.ts
|
|
2
|
-
interface EngineRunOptions {
|
|
2
|
+
export interface EngineRunOptions {
|
|
3
3
|
/** Pipes this to stdin instead of attaching the session's stdio. */
|
|
4
4
|
input?: string;
|
|
5
5
|
}
|
|
6
|
-
interface EngineCaptureResult {
|
|
6
|
+
export interface EngineCaptureResult {
|
|
7
7
|
exitCode: number;
|
|
8
8
|
stdout: string;
|
|
9
9
|
}
|
|
10
10
|
/** Runs container engine commands with the session's terminal attached. */
|
|
11
|
-
interface EngineProcessRunner {
|
|
11
|
+
export interface EngineProcessRunner {
|
|
12
12
|
run(command: string, args: string[], options?: EngineRunOptions): Promise<number>;
|
|
13
13
|
/** Captures stdout for probes; an unspawnable command reports undefined. */
|
|
14
14
|
capture(command: string, args: string[]): Promise<EngineCaptureResult | undefined>;
|
|
15
15
|
}
|
|
16
16
|
/** Host facts the plan builder projects into engine arguments. */
|
|
17
|
-
interface SandboxHostFacts {
|
|
17
|
+
export interface SandboxHostFacts {
|
|
18
18
|
/** Both ends of the session are terminals, so the container gets one too. */
|
|
19
19
|
hasTty: boolean;
|
|
20
20
|
platform: string;
|
|
@@ -26,7 +26,7 @@ interface SandboxHostFacts {
|
|
|
26
26
|
version: string;
|
|
27
27
|
}
|
|
28
28
|
/** How a sandboxed container reaches the host broker. */
|
|
29
|
-
type BrokerEndpoint = {
|
|
29
|
+
export type BrokerEndpoint = {
|
|
30
30
|
transport: 'unix';
|
|
31
31
|
socketDirectory: string;
|
|
32
32
|
} | {
|
|
@@ -34,5 +34,4 @@ type BrokerEndpoint = {
|
|
|
34
34
|
port: number;
|
|
35
35
|
};
|
|
36
36
|
//#endregion
|
|
37
|
-
export { BrokerEndpoint, EngineCaptureResult, EngineProcessRunner, EngineRunOptions, SandboxHostFacts };
|
|
38
37
|
//# sourceMappingURL=sandboxHarness.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sandboxHarness.d.mts","names":[],"sources":["../../src/types/sandboxHarness.ts"],"mappings":";
|
|
1
|
+
{"version":3,"file":"sandboxHarness.d.mts","names":[],"sources":["../../src/types/sandboxHarness.ts"],"mappings":";iBAEiB;;EAEf;;iBAGe;EACf;EACA;;;iBAIe;EACf,IAAI,iBAAiB,gBAAgB,UAAU,mBAAmB;;EAElE,QAAQ,iBAAiB,iBAAiB,QAAQ;;;iBAInC;;EAEf;EACA;EACA;EACA;;EAEA;;EAEA;;;YAIU;EAAmB;EAAmB;;EAA8B;EAAkB"}
|
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.63",
|
|
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",
|
|
@@ -61,20 +61,20 @@
|
|
|
61
61
|
"access": "public"
|
|
62
62
|
},
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@deepseek-ai/cordis": "4.0.
|
|
65
|
-
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.
|
|
64
|
+
"@deepseek-ai/cordis": "4.0.2",
|
|
65
|
+
"@agimon-ai/doompi-extension-contracts": "0.0.1-alpha.63"
|
|
66
66
|
},
|
|
67
67
|
"devDependencies": {
|
|
68
|
-
"@earendil-works/pi-coding-agent": "0.85.
|
|
69
|
-
"@types/node": "26.4.
|
|
70
|
-
"@vitest/coverage-v8": "
|
|
71
|
-
"tsdown": "0.
|
|
68
|
+
"@earendil-works/pi-coding-agent": "0.85.1",
|
|
69
|
+
"@types/node": "26.4.1",
|
|
70
|
+
"@vitest/coverage-v8": "5.0.0",
|
|
71
|
+
"tsdown": "0.23.0",
|
|
72
72
|
"typescript": "7.0.2",
|
|
73
|
-
"vitest": "
|
|
74
|
-
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.
|
|
73
|
+
"vitest": "5.0.0",
|
|
74
|
+
"@agimon-ai/vibe-lint-plugin-doom-extension": "0.0.1-alpha.60"
|
|
75
75
|
},
|
|
76
76
|
"peerDependencies": {
|
|
77
|
-
"@earendil-works/pi-coding-agent": "0.85.
|
|
77
|
+
"@earendil-works/pi-coding-agent": "0.85.1"
|
|
78
78
|
},
|
|
79
79
|
"peerDependenciesMeta": {
|
|
80
80
|
"@earendil-works/pi-coding-agent": {
|