@ai-hero/sandcastle 0.2.4 → 0.4.0
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 +322 -42
- package/dist/AgentProvider.d.ts +0 -10
- package/dist/AgentProvider.d.ts.map +1 -1
- package/dist/AgentProvider.js +28 -45
- package/dist/AgentProvider.js.map +1 -1
- package/dist/DockerLifecycle.d.ts +5 -1
- package/dist/DockerLifecycle.d.ts.map +1 -1
- package/dist/DockerLifecycle.js +8 -1
- package/dist/DockerLifecycle.js.map +1 -1
- package/dist/InitService.d.ts.map +1 -1
- package/dist/InitService.js +2 -0
- package/dist/InitService.js.map +1 -1
- package/dist/Orchestrator.d.ts +0 -1
- package/dist/Orchestrator.d.ts.map +1 -1
- package/dist/Orchestrator.js +2 -13
- package/dist/Orchestrator.js.map +1 -1
- package/dist/SandboxFactory.d.ts +22 -11
- package/dist/SandboxFactory.d.ts.map +1 -1
- package/dist/SandboxFactory.js +166 -209
- package/dist/SandboxFactory.js.map +1 -1
- package/dist/SandboxProvider.d.ts +141 -0
- package/dist/SandboxProvider.d.ts.map +1 -0
- package/dist/SandboxProvider.js +27 -0
- package/dist/SandboxProvider.js.map +1 -0
- package/dist/cli.d.ts +7 -5
- package/dist/cli.d.ts.map +1 -1
- package/dist/cli.js +12 -11
- package/dist/cli.js.map +1 -1
- package/dist/createSandbox.d.ts +3 -2
- package/dist/createSandbox.d.ts.map +1 -1
- package/dist/createSandbox.js +19 -32
- package/dist/createSandbox.js.map +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/run.d.ts +4 -25
- package/dist/run.d.ts.map +1 -1
- package/dist/run.js +21 -35
- package/dist/run.js.map +1 -1
- package/dist/sandboxExec.d.ts +12 -0
- package/dist/sandboxExec.d.ts.map +1 -0
- package/dist/sandboxExec.js +26 -0
- package/dist/sandboxExec.js.map +1 -0
- package/dist/sandboxes/docker.d.ts +28 -0
- package/dist/sandboxes/docker.d.ts.map +1 -0
- package/dist/sandboxes/docker.js +134 -0
- package/dist/sandboxes/docker.js.map +1 -0
- package/dist/sandboxes/test-isolated.d.ts +21 -0
- package/dist/sandboxes/test-isolated.d.ts.map +1 -0
- package/dist/sandboxes/test-isolated.js +87 -0
- package/dist/sandboxes/test-isolated.js.map +1 -0
- package/dist/syncIn.d.ts +24 -0
- package/dist/syncIn.d.ts.map +1 -0
- package/dist/syncIn.js +107 -0
- package/dist/syncIn.js.map +1 -0
- package/dist/syncOut.d.ts +27 -0
- package/dist/syncOut.d.ts.map +1 -0
- package/dist/syncOut.js +271 -0
- package/dist/syncOut.js.map +1 -0
- package/dist/templates/blank/.env.example +1 -0
- package/dist/templates/blank/main.mts +2 -0
- package/dist/templates/parallel-planner/.env.example +1 -0
- package/dist/templates/parallel-planner/main.mts +5 -2
- package/dist/templates/sequential-reviewer/.env.example +1 -0
- package/dist/templates/sequential-reviewer/main.mts +3 -1
- package/dist/templates/simple-loop/.env.example +1 -0
- package/dist/templates/simple-loop/main.mts +4 -0
- package/package.json +5 -1
package/dist/SandboxFactory.js
CHANGED
|
@@ -1,142 +1,64 @@
|
|
|
1
1
|
import { Context, Effect, Exit, Layer } from "effect";
|
|
2
2
|
import { FileSystem } from "@effect/platform";
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import { execFile, execFileSync, spawn } from "node:child_process";
|
|
6
|
-
import { dirname, join, resolve } from "node:path";
|
|
7
|
-
import { createInterface } from "node:readline";
|
|
8
|
-
import { startContainer, removeContainer, chownInContainer, } from "./DockerLifecycle.js";
|
|
3
|
+
import { existsSync } from "node:fs";
|
|
4
|
+
import { join, resolve } from "node:path";
|
|
9
5
|
import { AgentError, CopyError, ExecError, TimeoutError, WorktreeError, } from "./errors.js";
|
|
10
6
|
import * as WorktreeManager from "./WorktreeManager.js";
|
|
11
7
|
import { copyToSandbox } from "./CopyToSandbox.js";
|
|
12
8
|
import { Display } from "./Display.js";
|
|
9
|
+
import { syncIn } from "./syncIn.js";
|
|
10
|
+
import { syncOut } from "./syncOut.js";
|
|
13
11
|
export class Sandbox extends Context.Tag("Sandbox")() {
|
|
14
12
|
}
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
resume(Effect.fail(new ExecError({
|
|
27
|
-
command,
|
|
28
|
-
message: `docker exec failed: ${error.message}`,
|
|
29
|
-
})));
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
resume(Effect.succeed({
|
|
33
|
-
stdout: stdout.toString(),
|
|
34
|
-
stderr: stderr.toString(),
|
|
35
|
-
exitCode: typeof error?.code === "number"
|
|
36
|
-
? error.code
|
|
37
|
-
: 0,
|
|
38
|
-
}));
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
}),
|
|
42
|
-
execStreaming: (command, onStdoutLine, options) => Effect.async((resume) => {
|
|
43
|
-
const args = ["exec"];
|
|
44
|
-
if (options?.cwd) {
|
|
45
|
-
args.push("-w", options.cwd);
|
|
46
|
-
}
|
|
47
|
-
args.push(containerName, "sh", "-c", command);
|
|
48
|
-
const proc = spawn("docker", args, {
|
|
49
|
-
stdio: ["ignore", "pipe", "pipe"],
|
|
50
|
-
});
|
|
51
|
-
const stdoutChunks = [];
|
|
52
|
-
const stderrChunks = [];
|
|
53
|
-
const rl = createInterface({ input: proc.stdout });
|
|
54
|
-
rl.on("line", (line) => {
|
|
55
|
-
stdoutChunks.push(line);
|
|
56
|
-
onStdoutLine(line);
|
|
57
|
-
});
|
|
58
|
-
proc.stderr.on("data", (chunk) => {
|
|
59
|
-
stderrChunks.push(chunk.toString());
|
|
60
|
-
});
|
|
61
|
-
proc.on("error", (error) => {
|
|
62
|
-
resume(Effect.fail(new ExecError({
|
|
63
|
-
command,
|
|
64
|
-
message: `docker exec streaming failed: ${error.message}`,
|
|
65
|
-
})));
|
|
66
|
-
});
|
|
67
|
-
proc.on("close", (code) => {
|
|
68
|
-
resume(Effect.succeed({
|
|
69
|
-
stdout: stdoutChunks.join("\n"),
|
|
70
|
-
stderr: stderrChunks.join(""),
|
|
71
|
-
exitCode: code ?? 0,
|
|
72
|
-
}));
|
|
73
|
-
});
|
|
13
|
+
/**
|
|
14
|
+
* Wrap a Promise-based sandbox handle into an Effect-based SandboxService layer.
|
|
15
|
+
* Works with both bind-mount handles (copyIn/copyOut unsupported) and
|
|
16
|
+
* isolated handles (copyIn/copyOut delegated to the handle).
|
|
17
|
+
*/
|
|
18
|
+
export const makeSandboxLayerFromHandle = (handle) => Layer.succeed(Sandbox, {
|
|
19
|
+
exec: (command, options) => Effect.tryPromise({
|
|
20
|
+
try: () => handle.exec(command, options),
|
|
21
|
+
catch: (e) => new ExecError({
|
|
22
|
+
command,
|
|
23
|
+
message: `exec failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
74
24
|
}),
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
message: `Failed to create dir ${parentDir}: ${error.message}`,
|
|
82
|
-
})));
|
|
83
|
-
}
|
|
84
|
-
else {
|
|
85
|
-
resume(Effect.succeed(undefined));
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
});
|
|
89
|
-
yield* Effect.async((resume) => {
|
|
90
|
-
execFile("docker", ["cp", hostPath, `${containerName}:${sandboxPath}`], (error) => {
|
|
91
|
-
if (error) {
|
|
92
|
-
resume(Effect.fail(new CopyError({
|
|
93
|
-
message: `Failed to copy ${hostPath} -> ${containerName}:${sandboxPath}: ${error.message}`,
|
|
94
|
-
})));
|
|
95
|
-
}
|
|
96
|
-
else {
|
|
97
|
-
resume(Effect.succeed(undefined));
|
|
98
|
-
}
|
|
99
|
-
});
|
|
100
|
-
});
|
|
25
|
+
}),
|
|
26
|
+
execStreaming: (command, onStdoutLine, options) => Effect.tryPromise({
|
|
27
|
+
try: () => handle.execStreaming(command, onStdoutLine, options),
|
|
28
|
+
catch: (e) => new ExecError({
|
|
29
|
+
command,
|
|
30
|
+
message: `exec streaming failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
101
31
|
}),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
32
|
+
}),
|
|
33
|
+
copyIn: "copyIn" in handle
|
|
34
|
+
? (hostPath, sandboxPath) => Effect.tryPromise({
|
|
35
|
+
try: () => handle.copyIn(hostPath, sandboxPath),
|
|
36
|
+
catch: (e) => new CopyError({
|
|
37
|
+
message: `copyIn failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
38
|
+
}),
|
|
39
|
+
})
|
|
40
|
+
: () => Effect.fail(new CopyError({
|
|
41
|
+
message: "copyIn is not supported for bind-mount sandbox providers",
|
|
42
|
+
})),
|
|
43
|
+
copyOut: "copyOut" in handle
|
|
44
|
+
? (sandboxPath, hostPath) => Effect.tryPromise({
|
|
45
|
+
try: () => handle.copyOut(sandboxPath, hostPath),
|
|
46
|
+
catch: (e) => new CopyError({
|
|
47
|
+
message: `copyOut failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
48
|
+
}),
|
|
49
|
+
})
|
|
50
|
+
: () => Effect.fail(new CopyError({
|
|
51
|
+
message: "copyOut is not supported for bind-mount sandbox providers",
|
|
52
|
+
})),
|
|
120
53
|
});
|
|
121
|
-
export const makeDockerSandboxLayer = (containerName) => Layer.effect(Sandbox, makeDockerSandbox(containerName)).pipe(Layer.provide(NodeFileSystem.layer));
|
|
122
54
|
/** The mount point inside the container where the project worktree is bound. */
|
|
123
55
|
export const SANDBOX_WORKSPACE_DIR = "/home/agent/workspace";
|
|
124
56
|
export class SandboxFactory extends Context.Tag("SandboxFactory")() {
|
|
125
57
|
}
|
|
126
|
-
|
|
127
|
-
* Synchronously force-remove a Docker container.
|
|
128
|
-
* Used in process exit handlers where async operations are not possible.
|
|
129
|
-
*/
|
|
130
|
-
const forceRemoveContainerSync = (containerName) => {
|
|
131
|
-
try {
|
|
132
|
-
execFileSync("docker", ["rm", "-f", containerName], { stdio: "ignore" });
|
|
133
|
-
}
|
|
134
|
-
catch {
|
|
135
|
-
// Best-effort — container may already be gone
|
|
136
|
-
}
|
|
137
|
-
};
|
|
138
|
-
export class WorktreeSandboxConfig extends Context.Tag("WorktreeSandboxConfig")() {
|
|
58
|
+
export class SandboxConfig extends Context.Tag("SandboxConfig")() {
|
|
139
59
|
}
|
|
60
|
+
/** @deprecated Use SandboxConfig instead. */
|
|
61
|
+
export const WorktreeSandboxConfig = SandboxConfig;
|
|
140
62
|
/**
|
|
141
63
|
* Print a message to stderr about a preserved worktree, with review and cleanup instructions.
|
|
142
64
|
*/
|
|
@@ -146,93 +68,143 @@ const printWorktreePreservedMessage = (worktreePath, reason) => {
|
|
|
146
68
|
console.error(` To clean up: git worktree remove --force ${worktreePath}`);
|
|
147
69
|
};
|
|
148
70
|
/**
|
|
149
|
-
*
|
|
150
|
-
* Shared between worktree and none modes.
|
|
151
|
-
*/
|
|
152
|
-
const startSandboxContainer = (containerName, imageName, env, volumeMounts) => {
|
|
153
|
-
const cleanupContainerOnly = () => {
|
|
154
|
-
forceRemoveContainerSync(containerName);
|
|
155
|
-
};
|
|
156
|
-
const onSignal = () => {
|
|
157
|
-
cleanupContainerOnly();
|
|
158
|
-
process.exit(1);
|
|
159
|
-
};
|
|
160
|
-
const hostUid = process.getuid?.() ?? 1000;
|
|
161
|
-
const hostGid = process.getgid?.() ?? 1000;
|
|
162
|
-
return startContainer(containerName, imageName, { ...env, HOME: "/home/agent" }, {
|
|
163
|
-
volumeMounts,
|
|
164
|
-
workdir: SANDBOX_WORKSPACE_DIR,
|
|
165
|
-
user: `${hostUid}:${hostGid}`,
|
|
166
|
-
}).pipe(Effect.andThen(chownInContainer(containerName, `${hostUid}:${hostGid}`, "/home/agent")), Effect.tap(() => Effect.sync(() => {
|
|
167
|
-
process.on("exit", cleanupContainerOnly);
|
|
168
|
-
process.on("SIGINT", onSignal);
|
|
169
|
-
process.on("SIGTERM", onSignal);
|
|
170
|
-
})), Effect.map(() => ({ cleanupContainerOnly, onSignal })));
|
|
171
|
-
};
|
|
172
|
-
/**
|
|
173
|
-
* Resolves the git-related volume mounts needed for the Docker container.
|
|
71
|
+
* Resolves the git-related mounts needed for the sandbox.
|
|
174
72
|
* Handles both normal repos (where .git is a directory) and worktrees
|
|
175
73
|
* (where .git is a file pointing to the parent repo's .git/worktrees/<name>).
|
|
176
74
|
*/
|
|
177
|
-
export const
|
|
75
|
+
export const resolveGitMounts = (gitPath) => Effect.gen(function* () {
|
|
178
76
|
const fs = yield* FileSystem.FileSystem;
|
|
179
77
|
const stat = yield* fs.stat(gitPath);
|
|
180
78
|
if (stat.type === "Directory") {
|
|
181
|
-
return [
|
|
79
|
+
return [{ hostPath: gitPath, sandboxPath: gitPath }];
|
|
182
80
|
}
|
|
183
81
|
// Worktree: .git is a file with "gitdir: <path>"
|
|
184
82
|
const content = (yield* fs.readFileString(gitPath)).trim();
|
|
185
83
|
const match = content.match(/^gitdir:\s*(.+)$/);
|
|
186
84
|
if (!match) {
|
|
187
85
|
// Unrecognized format — fall back to mounting the file as-is
|
|
188
|
-
return [
|
|
86
|
+
return [{ hostPath: gitPath, sandboxPath: gitPath }];
|
|
189
87
|
}
|
|
190
88
|
const gitdirPath = match[1];
|
|
191
89
|
// gitdirPath is like /path/to/repo/.git/worktrees/<name>
|
|
192
90
|
// Mount both the .git file and the parent .git directory
|
|
193
91
|
const parentGitDir = resolve(gitdirPath, "..", "..");
|
|
194
|
-
return [
|
|
92
|
+
return [
|
|
93
|
+
{ hostPath: gitPath, sandboxPath: gitPath },
|
|
94
|
+
{ hostPath: parentGitDir, sandboxPath: parentGitDir },
|
|
95
|
+
];
|
|
96
|
+
});
|
|
97
|
+
/**
|
|
98
|
+
* Start a sandbox using the provider abstraction.
|
|
99
|
+
* Returns the handle, sandbox layer, and workspace path.
|
|
100
|
+
*/
|
|
101
|
+
const startProviderSandbox = (provider, worktreeOrRepoPath, hostRepoDir, env, gitMounts, workspaceDir) => Effect.tryPromise({
|
|
102
|
+
try: () => {
|
|
103
|
+
const mounts = [
|
|
104
|
+
{
|
|
105
|
+
hostPath: worktreeOrRepoPath,
|
|
106
|
+
sandboxPath: workspaceDir,
|
|
107
|
+
},
|
|
108
|
+
...gitMounts,
|
|
109
|
+
];
|
|
110
|
+
return provider.create({
|
|
111
|
+
worktreePath: worktreeOrRepoPath,
|
|
112
|
+
hostRepoPath: hostRepoDir,
|
|
113
|
+
mounts,
|
|
114
|
+
env,
|
|
115
|
+
});
|
|
116
|
+
},
|
|
117
|
+
catch: (e) => new WorktreeError({
|
|
118
|
+
message: `Provider '${provider.name}' create failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
119
|
+
}),
|
|
120
|
+
}).pipe(Effect.map((handle) => ({
|
|
121
|
+
handle,
|
|
122
|
+
sandboxLayer: makeSandboxLayerFromHandle(handle),
|
|
123
|
+
workspacePath: handle.workspacePath,
|
|
124
|
+
})));
|
|
125
|
+
/**
|
|
126
|
+
* Start an isolated sandbox: create handle, sync host repo via git bundle.
|
|
127
|
+
* Returns the handle, sandbox layer, and workspace path.
|
|
128
|
+
*/
|
|
129
|
+
const startIsolatedProviderSandbox = (provider, hostRepoDir, env, copyPaths) => Effect.gen(function* () {
|
|
130
|
+
const handle = yield* Effect.tryPromise({
|
|
131
|
+
try: () => provider.create({ env }),
|
|
132
|
+
catch: (e) => new WorktreeError({
|
|
133
|
+
message: `Isolated provider '${provider.name}' setup failed: ${e instanceof Error ? e.message : String(e)}`,
|
|
134
|
+
}),
|
|
135
|
+
});
|
|
136
|
+
yield* syncIn(hostRepoDir, handle);
|
|
137
|
+
if (copyPaths && copyPaths.length > 0) {
|
|
138
|
+
for (const relativePath of copyPaths) {
|
|
139
|
+
const hostPath = join(hostRepoDir, relativePath);
|
|
140
|
+
if (!existsSync(hostPath)) {
|
|
141
|
+
continue;
|
|
142
|
+
}
|
|
143
|
+
const sandboxPath = join(handle.workspacePath, relativePath);
|
|
144
|
+
yield* Effect.tryPromise({
|
|
145
|
+
try: () => handle.copyIn(hostPath, sandboxPath),
|
|
146
|
+
catch: (e) => new WorktreeError({
|
|
147
|
+
message: `Failed to copy ${relativePath} into sandbox: ${e instanceof Error ? e.message : String(e)}`,
|
|
148
|
+
}),
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
handle,
|
|
154
|
+
sandboxLayer: makeSandboxLayerFromHandle(handle),
|
|
155
|
+
workspacePath: handle.workspacePath,
|
|
156
|
+
};
|
|
195
157
|
});
|
|
196
158
|
export const WorktreeDockerSandboxFactory = {
|
|
197
159
|
layer: Layer.effect(SandboxFactory, Effect.gen(function* () {
|
|
198
|
-
const {
|
|
199
|
-
|
|
200
|
-
const
|
|
160
|
+
const { env, hostRepoDir, copyToSandbox: copyPaths, name, sandboxProvider, } = yield* SandboxConfig;
|
|
161
|
+
// Read branch strategy from the provider
|
|
162
|
+
const branchStrategy = sandboxProvider.branchStrategy;
|
|
163
|
+
const isHeadMode = branchStrategy.type === "head";
|
|
164
|
+
const branch = branchStrategy.type === "branch" ? branchStrategy.branch : undefined;
|
|
201
165
|
const fileSystem = yield* FileSystem.FileSystem;
|
|
202
166
|
const display = yield* Display;
|
|
203
167
|
return {
|
|
204
168
|
withSandbox: (makeEffect) => {
|
|
205
|
-
|
|
206
|
-
if (
|
|
207
|
-
|
|
169
|
+
// Isolated providers: skip worktree, sync via git bundle
|
|
170
|
+
if (sandboxProvider.tag === "isolated") {
|
|
171
|
+
return Effect.acquireUseRelease(startIsolatedProviderSandbox(sandboxProvider, hostRepoDir, env, copyPaths),
|
|
172
|
+
// Use
|
|
173
|
+
({ sandboxLayer }) => makeEffect({}).pipe(Effect.provide(sandboxLayer)),
|
|
174
|
+
// Release: sync commits back to host, then close
|
|
175
|
+
({ handle }) => syncOut(hostRepoDir, handle).pipe(Effect.catchAll((e) => Effect.sync(() => {
|
|
176
|
+
console.error(`[sandcastle] Warning: syncOut failed: ${e.message}`);
|
|
177
|
+
})), Effect.andThen(Effect.tryPromise({
|
|
178
|
+
try: () => handle.close(),
|
|
179
|
+
catch: () => undefined,
|
|
180
|
+
})), Effect.orDie)).pipe(Effect.map((value) => ({
|
|
181
|
+
value,
|
|
182
|
+
preservedWorktreePath: undefined,
|
|
183
|
+
})));
|
|
184
|
+
}
|
|
185
|
+
if (isHeadMode) {
|
|
186
|
+
// Head mode: bind-mount host directory directly, no worktree
|
|
208
187
|
const gitPath = join(hostRepoDir, ".git");
|
|
209
|
-
return
|
|
188
|
+
return resolveGitMounts(gitPath).pipe(Effect.provideService(FileSystem.FileSystem, fileSystem), Effect.mapError((e) => new WorktreeError({
|
|
210
189
|
message: `Failed to resolve git mounts: ${e}`,
|
|
211
|
-
})), Effect.flatMap((gitMounts) =>
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
process.removeListener("SIGINT", onSignal);
|
|
223
|
-
process.removeListener("SIGTERM", onSignal);
|
|
224
|
-
}).pipe(Effect.andThen(removeContainer(containerName)), Effect.orDie)).pipe(Effect.map((value) => ({
|
|
225
|
-
value,
|
|
226
|
-
preservedWorktreePath: undefined,
|
|
227
|
-
})));
|
|
228
|
-
}));
|
|
190
|
+
})), Effect.flatMap((gitMounts) => Effect.acquireUseRelease(startProviderSandbox(sandboxProvider, hostRepoDir, hostRepoDir, env, gitMounts, SANDBOX_WORKSPACE_DIR),
|
|
191
|
+
// Use
|
|
192
|
+
({ sandboxLayer }) => makeEffect({}).pipe(Effect.provide(sandboxLayer)),
|
|
193
|
+
// Release
|
|
194
|
+
({ handle }) => Effect.tryPromise({
|
|
195
|
+
try: () => handle.close(),
|
|
196
|
+
catch: () => undefined,
|
|
197
|
+
}).pipe(Effect.orDie)).pipe(Effect.map((value) => ({
|
|
198
|
+
value,
|
|
199
|
+
preservedWorktreePath: undefined,
|
|
200
|
+
})))));
|
|
229
201
|
}
|
|
230
|
-
// Worktree mode (
|
|
202
|
+
// Worktree mode (merge-to-head or explicit branch)
|
|
231
203
|
// Populated by the release phase when a worktree is preserved on failure,
|
|
232
204
|
// so we can attach the path to recognized error types before they propagate.
|
|
233
205
|
let preservedWorktreePath;
|
|
234
206
|
return Effect.acquireUseRelease(
|
|
235
|
-
// Acquire: prune stale worktrees (best-effort), create worktree, then start
|
|
207
|
+
// Acquire: prune stale worktrees (best-effort), create worktree, then start sandbox
|
|
236
208
|
WorktreeManager.pruneStale(hostRepoDir)
|
|
237
209
|
.pipe(Effect.catchAll((e) => Effect.sync(() => {
|
|
238
210
|
console.error("[sandcastle] Warning: failed to prune stale worktrees:", e.message);
|
|
@@ -246,39 +218,24 @@ export const WorktreeDockerSandboxFactory = {
|
|
|
246
218
|
: Effect.succeed(undefined)).pipe(Effect.map(() => worktreeInfo))))
|
|
247
219
|
.pipe(Effect.flatMap((worktreeInfo) => {
|
|
248
220
|
const gitPath = join(hostRepoDir, ".git");
|
|
249
|
-
return
|
|
221
|
+
return resolveGitMounts(gitPath).pipe(Effect.provideService(FileSystem.FileSystem, fileSystem), Effect.mapError((e) => new WorktreeError({
|
|
250
222
|
message: `Failed to resolve git mounts: ${e}`,
|
|
251
|
-
})), Effect.flatMap((gitMounts) =>
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
process.removeListener("SIGTERM", onSignal);
|
|
260
|
-
const onSignalWithWorktree = () => {
|
|
261
|
-
cleanupContainerOnly();
|
|
262
|
-
printWorktreePreservedMessage(worktreeInfo.path, `Worktree preserved at ${worktreeInfo.path}`);
|
|
263
|
-
process.exit(1);
|
|
264
|
-
};
|
|
265
|
-
process.on("SIGINT", onSignalWithWorktree);
|
|
266
|
-
process.on("SIGTERM", onSignalWithWorktree);
|
|
267
|
-
})), Effect.map(({ cleanupContainerOnly, onSignal }) => ({
|
|
268
|
-
worktreeInfo,
|
|
269
|
-
cleanupContainerOnly,
|
|
270
|
-
onSignal,
|
|
271
|
-
})));
|
|
272
|
-
}));
|
|
223
|
+
})), Effect.flatMap((gitMounts) =>
|
|
224
|
+
// sandboxProvider is guaranteed bind-mount here
|
|
225
|
+
// (isolated providers return early above)
|
|
226
|
+
startProviderSandbox(sandboxProvider, worktreeInfo.path, hostRepoDir, env, gitMounts, SANDBOX_WORKSPACE_DIR).pipe(Effect.map(({ handle, sandboxLayer }) => ({
|
|
227
|
+
worktreeInfo,
|
|
228
|
+
handle,
|
|
229
|
+
sandboxLayer,
|
|
230
|
+
})))));
|
|
273
231
|
})),
|
|
274
232
|
// Use
|
|
275
|
-
({ worktreeInfo }) => makeEffect({ hostWorktreePath: worktreeInfo.path }).pipe(Effect.provide(
|
|
276
|
-
// Release:
|
|
277
|
-
({ worktreeInfo,
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
}).pipe(Effect.andThen(removeContainer(containerName)), Effect.andThen(WorktreeManager.hasUncommittedChanges(worktreeInfo.path).pipe(Effect.catchAll(() => Effect.succeed(false)), Effect.flatMap((isDirty) => {
|
|
233
|
+
({ worktreeInfo, sandboxLayer }) => makeEffect({ hostWorktreePath: worktreeInfo.path }).pipe(Effect.provide(sandboxLayer)),
|
|
234
|
+
// Release: close provider handle, then remove/preserve worktree based on dirty state.
|
|
235
|
+
({ worktreeInfo, handle }, exit) => Effect.tryPromise({
|
|
236
|
+
try: () => handle.close(),
|
|
237
|
+
catch: () => undefined,
|
|
238
|
+
}).pipe(Effect.asVoid, Effect.andThen(WorktreeManager.hasUncommittedChanges(worktreeInfo.path).pipe(Effect.catchAll(() => Effect.succeed(false)), Effect.flatMap((isDirty) => {
|
|
282
239
|
if (isDirty) {
|
|
283
240
|
preservedWorktreePath = worktreeInfo.path;
|
|
284
241
|
printWorktreePreservedMessage(worktreeInfo.path, Exit.isSuccess(exit)
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SandboxFactory.js","sourceRoot":"","sources":["../src/SandboxFactory.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,QAAQ,CAAC;AACtD,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,KAAK,EAAE,MAAM,oBAAoB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEnD,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAChD,OAAO,EACL,cAAc,EACd,eAAe,EACf,gBAAgB,GACjB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,EACL,UAAU,EACV,SAAS,EACT,SAAS,EACT,YAAY,EACZ,aAAa,GAEd,MAAM,aAAa,CAAC;AACrB,OAAO,KAAK,eAAe,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AA+BvC,MAAM,OAAO,OAAQ,SAAQ,OAAO,CAAC,GAAG,CAAC,SAAS,CAAC,EAGhD;CAAG;AAEN,MAAM,iBAAiB,GAAG,CACxB,aAAqB,EACwC,EAAE,CAC/D,MAAM,CAAC,GAAG,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,IAAI,IAAI,KAAK,SAAS,EAAE,CAAC;wBACvB,IAAI,CAAC,YAAY,YAAY,EAAE,CAAC;4BAC9B,OAAO,IAAI,YAAY,CAAC;gCACtB,OAAO,EAAE,CAAC,CAAC,OAAO;gCAClB,kBAAkB,EAAE,CAAC,CAAC,kBAAkB;gCACxC,qBAAqB,EAAE,IAAI;6BAC5B,CAA+C,CAAC;wBACnD,CAAC;wBACD,IAAI,CAAC,YAAY,UAAU,EAAE,CAAC;4BAC5B,OAAO,IAAI,UAAU,CAAC;gCACpB,OAAO,EAAE,CAAC,CAAC,OAAO;gCAClB,qBAAqB,EAAE,IAAI;6BAC5B,CAA+C,CAAC;wBACnD,CAAC;oBACH,CAAC;oBACD,OAAO,CAAC,CAAC;gBACX,CAAC,CAAC,CACH,CAAC;YACJ,CAAC;SACF,CAAC;IACJ,CAAC,CAAC,CACH;CACF,CAAC"}
|
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Sandbox provider types — the pluggable interface for sandbox runtimes.
|
|
3
|
+
*
|
|
4
|
+
* Provider authors implement a small Promise-based interface. Sandcastle
|
|
5
|
+
* handles worktree creation, git mount resolution, and commit extraction.
|
|
6
|
+
*/
|
|
7
|
+
/** Result of executing a command inside a sandbox. */
|
|
8
|
+
export interface ExecResult {
|
|
9
|
+
readonly stdout: string;
|
|
10
|
+
readonly stderr: string;
|
|
11
|
+
readonly exitCode: number;
|
|
12
|
+
}
|
|
13
|
+
/** Handle to a running bind-mount sandbox. */
|
|
14
|
+
export interface BindMountSandboxHandle {
|
|
15
|
+
/** Absolute path to the workspace inside the sandbox. */
|
|
16
|
+
readonly workspacePath: string;
|
|
17
|
+
/** Execute a command inside the sandbox. */
|
|
18
|
+
exec(command: string, options?: {
|
|
19
|
+
cwd?: string;
|
|
20
|
+
}): Promise<ExecResult>;
|
|
21
|
+
/** Execute a command, streaming stdout line-by-line. */
|
|
22
|
+
execStreaming(command: string, onLine: (line: string) => void, options?: {
|
|
23
|
+
cwd?: string;
|
|
24
|
+
}): Promise<ExecResult>;
|
|
25
|
+
/** Tear down the sandbox. */
|
|
26
|
+
close(): Promise<void>;
|
|
27
|
+
}
|
|
28
|
+
/** Options passed to a bind-mount provider's `create` function. */
|
|
29
|
+
export interface BindMountCreateOptions {
|
|
30
|
+
/** Host-side path to the worktree directory. */
|
|
31
|
+
readonly worktreePath: string;
|
|
32
|
+
/** Host-side path to the original repo root. */
|
|
33
|
+
readonly hostRepoPath: string;
|
|
34
|
+
/** Volume mounts to apply (host:sandbox pairs). */
|
|
35
|
+
readonly mounts: Array<{
|
|
36
|
+
hostPath: string;
|
|
37
|
+
sandboxPath: string;
|
|
38
|
+
readonly?: boolean;
|
|
39
|
+
}>;
|
|
40
|
+
/** Environment variables to inject into the sandbox. */
|
|
41
|
+
readonly env: Record<string, string>;
|
|
42
|
+
}
|
|
43
|
+
/** Configuration for createBindMountSandboxProvider. */
|
|
44
|
+
export interface BindMountSandboxProviderConfig {
|
|
45
|
+
/** Human-readable name for this provider (e.g. "docker", "podman"). */
|
|
46
|
+
readonly name: string;
|
|
47
|
+
/** Branch strategy. Defaults to { type: "head" } if omitted. */
|
|
48
|
+
readonly branchStrategy?: BindMountBranchStrategy;
|
|
49
|
+
/** Create a sandbox handle from the given options. */
|
|
50
|
+
readonly create: (options: BindMountCreateOptions) => Promise<BindMountSandboxHandle>;
|
|
51
|
+
}
|
|
52
|
+
/** Handle to a running isolated sandbox (extends bind-mount with file transfer). */
|
|
53
|
+
export interface IsolatedSandboxHandle {
|
|
54
|
+
/** Absolute path to the workspace inside the sandbox. */
|
|
55
|
+
readonly workspacePath: string;
|
|
56
|
+
/** Execute a command inside the sandbox. */
|
|
57
|
+
exec(command: string, options?: {
|
|
58
|
+
cwd?: string;
|
|
59
|
+
}): Promise<ExecResult>;
|
|
60
|
+
/** Execute a command, streaming stdout line-by-line. */
|
|
61
|
+
execStreaming(command: string, onLine: (line: string) => void, options?: {
|
|
62
|
+
cwd?: string;
|
|
63
|
+
}): Promise<ExecResult>;
|
|
64
|
+
/** Copy a file from the host into the sandbox. */
|
|
65
|
+
copyIn(hostPath: string, sandboxPath: string): Promise<void>;
|
|
66
|
+
/** Copy a file from the sandbox to the host. */
|
|
67
|
+
copyOut(sandboxPath: string, hostPath: string): Promise<void>;
|
|
68
|
+
/** Tear down the sandbox. */
|
|
69
|
+
close(): Promise<void>;
|
|
70
|
+
}
|
|
71
|
+
/** Options passed to an isolated provider's `create` function. */
|
|
72
|
+
export interface IsolatedCreateOptions {
|
|
73
|
+
/** Environment variables to inject into the sandbox. */
|
|
74
|
+
readonly env: Record<string, string>;
|
|
75
|
+
}
|
|
76
|
+
/** Configuration for createIsolatedSandboxProvider. */
|
|
77
|
+
export interface IsolatedSandboxProviderConfig {
|
|
78
|
+
/** Human-readable name for this provider (e.g. "daytona", "e2b"). */
|
|
79
|
+
readonly name: string;
|
|
80
|
+
/** Branch strategy. Defaults to { type: "merge-to-head" } if omitted. */
|
|
81
|
+
readonly branchStrategy?: IsolatedBranchStrategy;
|
|
82
|
+
/** Create an isolated sandbox handle from the given options. */
|
|
83
|
+
readonly create: (options: IsolatedCreateOptions) => Promise<IsolatedSandboxHandle>;
|
|
84
|
+
}
|
|
85
|
+
/** A bind-mount sandbox provider. */
|
|
86
|
+
export interface BindMountSandboxProvider {
|
|
87
|
+
/** @internal Discriminator for internal dispatch. */
|
|
88
|
+
readonly tag: "bind-mount";
|
|
89
|
+
/** Human-readable provider name. */
|
|
90
|
+
readonly name: string;
|
|
91
|
+
/** Branch strategy — controls how the agent's changes relate to branches. Defaults to head. */
|
|
92
|
+
readonly branchStrategy: BindMountBranchStrategy;
|
|
93
|
+
/** @internal Create a sandbox handle. */
|
|
94
|
+
readonly create: (options: BindMountCreateOptions) => Promise<BindMountSandboxHandle>;
|
|
95
|
+
}
|
|
96
|
+
/** An isolated sandbox provider. */
|
|
97
|
+
export interface IsolatedSandboxProvider {
|
|
98
|
+
/** @internal Discriminator for internal dispatch. */
|
|
99
|
+
readonly tag: "isolated";
|
|
100
|
+
/** Human-readable provider name. */
|
|
101
|
+
readonly name: string;
|
|
102
|
+
/** Branch strategy — controls how the agent's changes relate to branches. Defaults to merge-to-head. */
|
|
103
|
+
readonly branchStrategy: IsolatedBranchStrategy;
|
|
104
|
+
/** @internal Create an isolated sandbox handle. */
|
|
105
|
+
readonly create: (options: IsolatedCreateOptions) => Promise<IsolatedSandboxHandle>;
|
|
106
|
+
}
|
|
107
|
+
/** Head strategy: agent writes directly to host working directory. Bind-mount only. */
|
|
108
|
+
export interface HeadBranchStrategy {
|
|
109
|
+
readonly type: "head";
|
|
110
|
+
}
|
|
111
|
+
/** Merge-to-head strategy: temp branch, merge back to HEAD, delete temp branch. */
|
|
112
|
+
export interface MergeToHeadBranchStrategy {
|
|
113
|
+
readonly type: "merge-to-head";
|
|
114
|
+
}
|
|
115
|
+
/** Branch strategy: commits land on an explicit named branch. */
|
|
116
|
+
export interface NamedBranchStrategy {
|
|
117
|
+
readonly type: "branch";
|
|
118
|
+
readonly branch: string;
|
|
119
|
+
}
|
|
120
|
+
/** Branch strategy for bind-mount providers (all three variants). */
|
|
121
|
+
export type BindMountBranchStrategy = HeadBranchStrategy | MergeToHeadBranchStrategy | NamedBranchStrategy;
|
|
122
|
+
/** Branch strategy for isolated providers (no head — can't write to host). */
|
|
123
|
+
export type IsolatedBranchStrategy = MergeToHeadBranchStrategy | NamedBranchStrategy;
|
|
124
|
+
/** Union of all branch strategy variants. */
|
|
125
|
+
export type BranchStrategy = BindMountBranchStrategy | IsolatedBranchStrategy;
|
|
126
|
+
/**
|
|
127
|
+
* A sandbox provider — the pluggable unit that `run()` and `createSandbox()` accept.
|
|
128
|
+
* Tagged for internal dispatch: "bind-mount" or "isolated".
|
|
129
|
+
*/
|
|
130
|
+
export type SandboxProvider = BindMountSandboxProvider | IsolatedSandboxProvider;
|
|
131
|
+
/**
|
|
132
|
+
* Create a bind-mount sandbox provider from a config object.
|
|
133
|
+
* The returned provider can be passed to `run()` or `createSandbox()`.
|
|
134
|
+
*/
|
|
135
|
+
export declare const createBindMountSandboxProvider: (config: BindMountSandboxProviderConfig) => BindMountSandboxProvider;
|
|
136
|
+
/**
|
|
137
|
+
* Create an isolated sandbox provider from a config object.
|
|
138
|
+
* The returned provider can be passed to `run()` or `createSandbox()`.
|
|
139
|
+
*/
|
|
140
|
+
export declare const createIsolatedSandboxProvider: (config: IsolatedSandboxProviderConfig) => IsolatedSandboxProvider;
|
|
141
|
+
//# sourceMappingURL=SandboxProvider.d.ts.map
|