@hyperwindmill/caretaker-cli 0.12.1 → 0.13.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/dist/cli/web/scheduler/task_review.d.ts +6 -0
- package/dist/cli/web/scheduler/task_review.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_review.js +22 -5
- package/dist/cli/web/scheduler/task_roles.d.ts +6 -0
- package/dist/cli/web/scheduler/task_roles.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_roles.js +9 -0
- package/dist/cli/web/scheduler/task_strategy.d.ts.map +1 -1
- package/dist/cli/web/scheduler/task_strategy.js +121 -11
- package/dist/cli/web/server.d.ts.map +1 -1
- package/dist/cli/web/server.js +15 -1
- package/dist/harness/claude_code_runner.d.ts +5 -0
- package/dist/harness/claude_code_runner.d.ts.map +1 -1
- package/dist/harness/claude_code_runner.js +17 -0
- package/dist/harness/loop.d.ts +2 -0
- package/dist/harness/loop.d.ts.map +1 -1
- package/dist/harness/loop.js +1 -0
- package/dist/harness/tools/builtin/bash.d.ts.map +1 -1
- package/dist/harness/tools/builtin/bash.js +18 -9
- package/dist/harness/tools/builtin/task_tools.d.ts.map +1 -1
- package/dist/harness/tools/builtin/task_tools.js +13 -0
- package/dist/harness/tools/types.d.ts +4 -0
- package/dist/harness/tools/types.d.ts.map +1 -1
- package/dist/lib/docker.d.ts +43 -0
- package/dist/lib/docker.d.ts.map +1 -0
- package/dist/lib/docker.js +160 -0
- package/dist/lib/task_git.d.ts +9 -1
- package/dist/lib/task_git.d.ts.map +1 -1
- package/dist/lib/task_git.js +24 -1
- package/dist/store/db.d.ts +6 -0
- package/dist/store/db.d.ts.map +1 -1
- package/dist/webview/standalone.css +6 -2
- package/dist/webview/standalone.css.map +2 -2
- package/dist/webview/standalone.js +521 -450
- package/dist/webview/standalone.js.map +2 -2
- package/package.json +3 -3
|
@@ -2,6 +2,7 @@ import { randomUUID } from 'node:crypto';
|
|
|
2
2
|
import { getDb, getTaskById, saveTask, createTask, addTaskMessage, deleteTask, tryNormalizeChecklistStatus } from '../../../store/db.js';
|
|
3
3
|
import { loadConfig, loadAgents } from '../../../store/json.js';
|
|
4
4
|
import { discardWorktree } from '../../../lib/task_git.js';
|
|
5
|
+
import { removeContainer } from '../../../lib/docker.js';
|
|
5
6
|
import { runningTasks } from '../../../cli/web/scheduler/locks.js';
|
|
6
7
|
import { resolveReviewEnabled, resolvePlanningEnabled, activationStatus } from '../../../cli/web/scheduler/task_roles.js';
|
|
7
8
|
function ok(data = {}) {
|
|
@@ -532,6 +533,10 @@ export const taskDiscardWorktreeTool = {
|
|
|
532
533
|
return err(`Task ${taskId} not found`);
|
|
533
534
|
if (!task.worktreePath)
|
|
534
535
|
return err(`Task ${taskId} has no active worktree`);
|
|
536
|
+
if (task.dockerContainer) {
|
|
537
|
+
await removeContainer(task.dockerContainer);
|
|
538
|
+
task.dockerContainer = null;
|
|
539
|
+
}
|
|
535
540
|
await discardWorktree(task.worktreePath, task.title);
|
|
536
541
|
task.worktreePath = null;
|
|
537
542
|
task.updatedAt = new Date().toISOString();
|
|
@@ -623,6 +628,14 @@ export const taskDeleteTool = {
|
|
|
623
628
|
return err(`Task ${taskId} is currently running (locked). Wait for it to finish or pause it first.`);
|
|
624
629
|
}
|
|
625
630
|
// Clean up any active worktree before deleting the task record.
|
|
631
|
+
if (task.dockerContainer) {
|
|
632
|
+
try {
|
|
633
|
+
await removeContainer(task.dockerContainer);
|
|
634
|
+
}
|
|
635
|
+
catch {
|
|
636
|
+
// Best-effort
|
|
637
|
+
}
|
|
638
|
+
}
|
|
626
639
|
if (task.worktreePath) {
|
|
627
640
|
try {
|
|
628
641
|
await discardWorktree(task.worktreePath, task.title);
|
|
@@ -40,6 +40,10 @@ export interface ToolContext {
|
|
|
40
40
|
};
|
|
41
41
|
/** The session ID of the current conversation run. Useful for attachment directories. */
|
|
42
42
|
sessionId?: string;
|
|
43
|
+
/** When set, the `bash` tool runs commands inside this docker container
|
|
44
|
+
* (`docker exec`) instead of on the host. A run-level isolation property —
|
|
45
|
+
* the caller decides; the tool only honors it. */
|
|
46
|
+
dockerContainer?: string;
|
|
43
47
|
}
|
|
44
48
|
export interface ToolAttachment {
|
|
45
49
|
mime: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/harness/tools/types.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAClD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,QAAQ,GAAG,QAAQ,CAAC;AAC3D,MAAM,MAAM,WAAW,GAAG,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,KAAK,OAAO,CAAC,eAAe,CAAC,CAAC;AAoBhG,MAAM,WAAW,WAAW;IAC1B;6EACyE;IACzE,MAAM,EAAE,WAAW,CAAC;IACpB,sEAAsE;IACtE,UAAU,EAAE,MAAM,CAAC;IACnB;;;yCAGqC;IACrC,SAAS,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC;IACvB;;;kFAG8E;IAC9E,aAAa,CAAC,EAAE,MAAM,EAAE,CAAC;IACzB;;;gFAG4E;IAC5E,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;kDAE8C;IAC9C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB;;oCAEgC;IAChC,WAAW,CAAC,EAAE,WAAW,CAAC;IAC1B;;wEAEoE;IACpE,SAAS,CAAC,EAAE;QAAE,QAAQ,CAAC,EAAE,cAAc,CAAC;QAAC,UAAU,EAAE,cAAc,CAAA;KAAE,CAAC;IACtE,yFAAyF;IACzF,SAAS,CAAC,EAAE,MAAM,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/harness/tools/types.ts"],"names":[],"mapp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,WAAW,EAAE,MAAM,CAAC;IACpB,gEAAgE;IAChE,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;IACpC;uCACmC;IACnC,OAAO,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,GAAG,EAAE,WAAW,KAAK,OAAO,CAAC,UAAU,CAAC,CAAC;IAClE;;;yBAGqB;IACrB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAED,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EAAE;QACR,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,EAAE,MAAM,CAAC;QACpB,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KACrC,CAAC;CACH;AAED,iFAAiF;AACjF,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,GAAG,kBAAkB,CAS3D"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/** Deterministic container name for a task — the caller's naming policy. */
|
|
2
|
+
export declare function containerName(projectId: number, taskId: number): string;
|
|
3
|
+
/** `docker run` argv. Mount is identical-path (`-v <root>:<root>`) so host and
|
|
4
|
+
* container agree on absolute paths. `--user` keeps written files owned by the
|
|
5
|
+
* host user (else root-owned files break the host WIP commit / review diff).
|
|
6
|
+
* ponytail: if an image lacks a matching /etc/passwd entry, set HOME=/tmp; tune when a real image needs it. */
|
|
7
|
+
export declare function containerRunArgs(name: string, image: string, mountRoot: string, workdir: string, uid?: number, gid?: number, extraMounts?: string[]): string[];
|
|
8
|
+
export declare function containerExecArgs(name: string, cwd: string, cmd: string): string[];
|
|
9
|
+
/** Idempotent: reuse a running container of this name; recreate a stopped/absent one. */
|
|
10
|
+
export declare function ensureContainer(name: string, image: string, mountRoot: string, workdir: string, extraMounts?: string[]): Promise<void>;
|
|
11
|
+
/** True if `git` is on PATH inside the container. In-container git is
|
|
12
|
+
* best-effort — a minimal image may not ship it; the harness commits
|
|
13
|
+
* host-side regardless, so a missing git only affects the agent's own git
|
|
14
|
+
* commands (we warn it via the prompt). */
|
|
15
|
+
export declare function containerHasGit(name: string): Promise<boolean>;
|
|
16
|
+
/** Run one command in the container. Never throws on a non-zero exit — returns
|
|
17
|
+
* the code + combined output, mirroring the bash tool's contract. */
|
|
18
|
+
export declare function execInContainer(name: string, cwd: string, cmd: string, timeoutMs: number, signal?: AbortSignal): Promise<{
|
|
19
|
+
exitCode: number;
|
|
20
|
+
output: string;
|
|
21
|
+
}>;
|
|
22
|
+
export declare function removeContainer(name: string): Promise<void>;
|
|
23
|
+
/** True if a container of this name is currently running. */
|
|
24
|
+
export declare function containerRunning(name: string): Promise<boolean>;
|
|
25
|
+
/** True when the dockerImage value is a Dockerfile path rather than a pullable
|
|
26
|
+
* image ref. Image refs never start with '.', '/', or '\', so a leading one of
|
|
27
|
+
* those unambiguously marks a path (relative `./Dockerfile`, absolute, Windows). */
|
|
28
|
+
export declare function isDockerfilePath(image: string): boolean;
|
|
29
|
+
/** Build an image from a Dockerfile into `tag`. `contextDir` is the build
|
|
30
|
+
* context. Throws with the build output on failure so the caller can surface
|
|
31
|
+
* why setup broke (same policy as a failed bootstrap). */
|
|
32
|
+
export declare function buildImage(dockerfilePath: string, contextDir: string, tag: string): Promise<void>;
|
|
33
|
+
export declare const DOCKER_BASH_HOOK_SCRIPT = "let raw = '';\nprocess.stdin.on('data', (c) => { raw += c; });\nprocess.stdin.on('end', () => {\n const [container, workdir] = process.argv.slice(2);\n let cmd = '';\n try { cmd = JSON.parse(raw)?.tool_input?.command ?? ''; } catch { cmd = ''; }\n const b64 = Buffer.from(cmd, 'utf8').toString('base64');\n const wrapped = `docker exec -w ${workdir} ${container} sh -lc \"echo ${b64} | base64 -d | sh\"`;\n process.stdout.write(JSON.stringify({\n hookSpecificOutput: { hookEventName: 'PreToolUse', updatedInput: { command: wrapped } },\n }));\n});\n";
|
|
34
|
+
export declare function dockerClaudeSettings(container: string, workdir: string, hookScriptPath: string): Record<string, unknown>;
|
|
35
|
+
/** Confine claude-code file tools to the working dir. Bash is allowed (the docker
|
|
36
|
+
* hook contains it); readers/writers are path-scoped to workdir; mcp__task stays
|
|
37
|
+
* open. NOTE: Claude Code's Read/Edit/Write rule syntax uses `//path` for an
|
|
38
|
+
* ABSOLUTE path and `/path` for project-relative. `workdir` is absolute (leads
|
|
39
|
+
* with `/`), so the rule must be `//<workdir>/**` — hence the extra leading `/`.
|
|
40
|
+
* With a single slash the rule is read as project-relative, matches nothing, and
|
|
41
|
+
* `--permission-mode manual` then denies every file-tool call (even in-workspace). */
|
|
42
|
+
export declare function dockerDevAllowlist(workdir: string): string[];
|
|
43
|
+
//# sourceMappingURL=docker.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../src/lib/docker.ts"],"names":[],"mappings":"AASA,4EAA4E;AAC5E,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,MAAM,CAEvE;AAED;;;gHAGgH;AAChH,wBAAgB,gBAAgB,CAC9B,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,GAAG,CAAC,EAAE,MAAM,EACZ,GAAG,CAAC,EAAE,MAAM,EACZ,WAAW,GAAE,MAAM,EAAO,GACzB,MAAM,EAAE,CAWV;AAED,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,MAAM,EAAE,CAElF;AAcD,yFAAyF;AACzF,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,EACb,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,WAAW,GAAE,MAAM,EAAO,GACzB,OAAO,CAAC,IAAI,CAAC,CAUf;AAED;;;4CAG4C;AAC5C,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAGpE;AAED;sEACsE;AACtE,wBAAsB,eAAe,CACnC,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,MAAM,EACX,GAAG,EAAE,MAAM,EACX,SAAS,EAAE,MAAM,EACjB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC;IAAE,QAAQ,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAAC,CAc/C;AAED,wBAAsB,eAAe,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAEjE;AAED,6DAA6D;AAC7D,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAErE;AAED;;qFAEqF;AACrF,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEvD;AAED;;2DAE2D;AAC3D,wBAAsB,UAAU,CAC9B,cAAc,EAAE,MAAM,EACtB,UAAU,EAAE,MAAM,EAClB,GAAG,EAAE,MAAM,GACV,OAAO,CAAC,IAAI,CAAC,CAWf;AAKD,eAAO,MAAM,uBAAuB,ojBAYnC,CAAC;AAEF,wBAAgB,oBAAoB,CAClC,SAAS,EAAE,MAAM,EACjB,OAAO,EAAE,MAAM,EACf,cAAc,EAAE,MAAM,GACrB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAWzB;AAED;;;;;;uFAMuF;AACvF,wBAAgB,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,MAAM,EAAE,CAY5D"}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
// Task-agnostic Docker container primitives. The container NAME is always a
|
|
2
|
+
// parameter — this module knows nothing about tasks/projects, so a future
|
|
3
|
+
// agent-level isolation can reuse it with a different naming scheme + mount.
|
|
4
|
+
import { execFile } from 'node:child_process';
|
|
5
|
+
import { promisify } from 'node:util';
|
|
6
|
+
import { commandEnv } from '../harness/tools/builtin/shell-env.js';
|
|
7
|
+
const exec = promisify(execFile);
|
|
8
|
+
/** Deterministic container name for a task — the caller's naming policy. */
|
|
9
|
+
export function containerName(projectId, taskId) {
|
|
10
|
+
return `caretaker-task-${projectId}-${taskId}`;
|
|
11
|
+
}
|
|
12
|
+
/** `docker run` argv. Mount is identical-path (`-v <root>:<root>`) so host and
|
|
13
|
+
* container agree on absolute paths. `--user` keeps written files owned by the
|
|
14
|
+
* host user (else root-owned files break the host WIP commit / review diff).
|
|
15
|
+
* ponytail: if an image lacks a matching /etc/passwd entry, set HOME=/tmp; tune when a real image needs it. */
|
|
16
|
+
export function containerRunArgs(name, image, mountRoot, workdir, uid, gid, extraMounts = []) {
|
|
17
|
+
const args = ['run', '-d'];
|
|
18
|
+
if (typeof uid === 'number' && typeof gid === 'number') {
|
|
19
|
+
args.push('--user', `${uid}:${gid}`);
|
|
20
|
+
}
|
|
21
|
+
args.push('-v', `${mountRoot}:${mountRoot}`);
|
|
22
|
+
// Extra identical-path mounts (e.g. the git common dir, so a linked
|
|
23
|
+
// worktree's gitdir resolves and in-container git works).
|
|
24
|
+
for (const m of extraMounts)
|
|
25
|
+
args.push('-v', `${m}:${m}`);
|
|
26
|
+
args.push('-w', workdir, '--name', name, image, 'sleep', 'infinity');
|
|
27
|
+
return args;
|
|
28
|
+
}
|
|
29
|
+
export function containerExecArgs(name, cwd, cmd) {
|
|
30
|
+
return ['exec', '-w', cwd, name, 'sh', '-lc', cmd];
|
|
31
|
+
}
|
|
32
|
+
/** Returns 'running' | 'stopped' | 'absent' for a container name. */
|
|
33
|
+
async function containerState(name) {
|
|
34
|
+
try {
|
|
35
|
+
const { stdout } = await exec('docker', ['inspect', '-f', '{{.State.Running}}', name], {
|
|
36
|
+
env: commandEnv(),
|
|
37
|
+
});
|
|
38
|
+
return stdout.trim() === 'true' ? 'running' : 'stopped';
|
|
39
|
+
}
|
|
40
|
+
catch {
|
|
41
|
+
return 'absent';
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
/** Idempotent: reuse a running container of this name; recreate a stopped/absent one. */
|
|
45
|
+
export async function ensureContainer(name, image, mountRoot, workdir, extraMounts = []) {
|
|
46
|
+
const state = await containerState(name);
|
|
47
|
+
if (state === 'running')
|
|
48
|
+
return;
|
|
49
|
+
if (state === 'stopped')
|
|
50
|
+
await removeContainer(name);
|
|
51
|
+
const uid = process.getuid?.();
|
|
52
|
+
const gid = process.getgid?.();
|
|
53
|
+
await exec('docker', containerRunArgs(name, image, mountRoot, workdir, uid, gid, extraMounts), {
|
|
54
|
+
env: commandEnv(),
|
|
55
|
+
maxBuffer: 8 * 1024 * 1024,
|
|
56
|
+
});
|
|
57
|
+
}
|
|
58
|
+
/** True if `git` is on PATH inside the container. In-container git is
|
|
59
|
+
* best-effort — a minimal image may not ship it; the harness commits
|
|
60
|
+
* host-side regardless, so a missing git only affects the agent's own git
|
|
61
|
+
* commands (we warn it via the prompt). */
|
|
62
|
+
export async function containerHasGit(name) {
|
|
63
|
+
const { exitCode } = await execInContainer(name, '/', 'command -v git', 5000);
|
|
64
|
+
return exitCode === 0;
|
|
65
|
+
}
|
|
66
|
+
/** Run one command in the container. Never throws on a non-zero exit — returns
|
|
67
|
+
* the code + combined output, mirroring the bash tool's contract. */
|
|
68
|
+
export async function execInContainer(name, cwd, cmd, timeoutMs, signal) {
|
|
69
|
+
try {
|
|
70
|
+
const { stdout, stderr } = await exec('docker', containerExecArgs(name, cwd, cmd), {
|
|
71
|
+
env: commandEnv(),
|
|
72
|
+
timeout: timeoutMs,
|
|
73
|
+
maxBuffer: 32 * 1024 * 1024,
|
|
74
|
+
signal,
|
|
75
|
+
});
|
|
76
|
+
return { exitCode: 0, output: stdout + stderr };
|
|
77
|
+
}
|
|
78
|
+
catch (err) {
|
|
79
|
+
const e = err;
|
|
80
|
+
const code = typeof e.code === 'number' ? e.code : 1;
|
|
81
|
+
return { exitCode: code, output: (e.stdout ?? '') + (e.stderr ?? '') + (e.message ?? '') };
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
export async function removeContainer(name) {
|
|
85
|
+
await exec('docker', ['rm', '-f', name], { env: commandEnv() }).catch(() => { });
|
|
86
|
+
}
|
|
87
|
+
/** True if a container of this name is currently running. */
|
|
88
|
+
export async function containerRunning(name) {
|
|
89
|
+
return (await containerState(name)) === 'running';
|
|
90
|
+
}
|
|
91
|
+
/** True when the dockerImage value is a Dockerfile path rather than a pullable
|
|
92
|
+
* image ref. Image refs never start with '.', '/', or '\', so a leading one of
|
|
93
|
+
* those unambiguously marks a path (relative `./Dockerfile`, absolute, Windows). */
|
|
94
|
+
export function isDockerfilePath(image) {
|
|
95
|
+
return /^[./\\]/.test(image);
|
|
96
|
+
}
|
|
97
|
+
/** Build an image from a Dockerfile into `tag`. `contextDir` is the build
|
|
98
|
+
* context. Throws with the build output on failure so the caller can surface
|
|
99
|
+
* why setup broke (same policy as a failed bootstrap). */
|
|
100
|
+
export async function buildImage(dockerfilePath, contextDir, tag) {
|
|
101
|
+
try {
|
|
102
|
+
await exec('docker', ['build', '-f', dockerfilePath, '-t', tag, contextDir], {
|
|
103
|
+
env: commandEnv(),
|
|
104
|
+
maxBuffer: 64 * 1024 * 1024,
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
catch (err) {
|
|
108
|
+
const e = err;
|
|
109
|
+
const detail = (e.stderr || e.stdout || e.message || '').toString().trim();
|
|
110
|
+
throw new Error(`docker build failed for \`${dockerfilePath}\`:\n${detail}`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
// PreToolUse hook: rewrite every Bash command so it runs inside the container.
|
|
114
|
+
// Mechanical (not a prompt instruction) — the agent cannot forget. argv:
|
|
115
|
+
// [container, workdir]. base64 dodges nested-quote hell in the wrapped command.
|
|
116
|
+
export const DOCKER_BASH_HOOK_SCRIPT = `let raw = '';
|
|
117
|
+
process.stdin.on('data', (c) => { raw += c; });
|
|
118
|
+
process.stdin.on('end', () => {
|
|
119
|
+
const [container, workdir] = process.argv.slice(2);
|
|
120
|
+
let cmd = '';
|
|
121
|
+
try { cmd = JSON.parse(raw)?.tool_input?.command ?? ''; } catch { cmd = ''; }
|
|
122
|
+
const b64 = Buffer.from(cmd, 'utf8').toString('base64');
|
|
123
|
+
const wrapped = \`docker exec -w \${workdir} \${container} sh -lc "echo \${b64} | base64 -d | sh"\`;
|
|
124
|
+
process.stdout.write(JSON.stringify({
|
|
125
|
+
hookSpecificOutput: { hookEventName: 'PreToolUse', updatedInput: { command: wrapped } },
|
|
126
|
+
}));
|
|
127
|
+
});
|
|
128
|
+
`;
|
|
129
|
+
export function dockerClaudeSettings(container, workdir, hookScriptPath) {
|
|
130
|
+
return {
|
|
131
|
+
hooks: {
|
|
132
|
+
PreToolUse: [
|
|
133
|
+
{
|
|
134
|
+
matcher: 'Bash',
|
|
135
|
+
hooks: [{ type: 'command', command: `node ${hookScriptPath} ${container} ${workdir}` }],
|
|
136
|
+
},
|
|
137
|
+
],
|
|
138
|
+
},
|
|
139
|
+
};
|
|
140
|
+
}
|
|
141
|
+
/** Confine claude-code file tools to the working dir. Bash is allowed (the docker
|
|
142
|
+
* hook contains it); readers/writers are path-scoped to workdir; mcp__task stays
|
|
143
|
+
* open. NOTE: Claude Code's Read/Edit/Write rule syntax uses `//path` for an
|
|
144
|
+
* ABSOLUTE path and `/path` for project-relative. `workdir` is absolute (leads
|
|
145
|
+
* with `/`), so the rule must be `//<workdir>/**` — hence the extra leading `/`.
|
|
146
|
+
* With a single slash the rule is read as project-relative, matches nothing, and
|
|
147
|
+
* `--permission-mode manual` then denies every file-tool call (even in-workspace). */
|
|
148
|
+
export function dockerDevAllowlist(workdir) {
|
|
149
|
+
const scope = `/${workdir}/**`; // workdir starts with '/', so this yields '//<abs>/**'
|
|
150
|
+
return [
|
|
151
|
+
`Read(${scope})`,
|
|
152
|
+
`Edit(${scope})`,
|
|
153
|
+
`Write(${scope})`,
|
|
154
|
+
`MultiEdit(${scope})`,
|
|
155
|
+
'Glob',
|
|
156
|
+
'Grep',
|
|
157
|
+
'mcp__task',
|
|
158
|
+
'Bash',
|
|
159
|
+
];
|
|
160
|
+
}
|
package/dist/lib/task_git.d.ts
CHANGED
|
@@ -1,4 +1,12 @@
|
|
|
1
1
|
export declare function isGitRepo(dir: string): Promise<boolean>;
|
|
2
|
+
/**
|
|
3
|
+
* Absolute git common dir for a (linked) worktree — the main repo's shared
|
|
4
|
+
* `.git`, which holds the object store and `worktrees/<id>`. A worktree's own
|
|
5
|
+
* `.git` file points inside here, so mounting this path into a container (at
|
|
6
|
+
* an identical path) is what makes in-container git resolve. Returns null when
|
|
7
|
+
* it can't be determined (e.g. not a git dir).
|
|
8
|
+
*/
|
|
9
|
+
export declare function gitCommonDir(worktreePath: string): Promise<string | null>;
|
|
2
10
|
export declare function agentDirIn(worktreePath: string, projectWorkingDir: string): Promise<string>;
|
|
3
11
|
export declare function ensureWorktree(projectWorkingDir: string, projectId: number, taskId: number, title: string): Promise<{
|
|
4
12
|
branch: string;
|
|
@@ -12,7 +20,7 @@ export declare function ensureWorktree(projectWorkingDir: string, projectId: num
|
|
|
12
20
|
* generous timeout so a hung install can't wedge the scheduler tick.
|
|
13
21
|
* ponytail: 10-min per-command timeout; make it configurable if a real project needs longer.
|
|
14
22
|
*/
|
|
15
|
-
export declare function runBootstrap(cwd: string, commands: string[]): Promise<void>;
|
|
23
|
+
export declare function runBootstrap(cwd: string, commands: string[], dockerContainer?: string): Promise<void>;
|
|
16
24
|
export declare function commitWip(worktreePath: string, title: string): Promise<boolean>;
|
|
17
25
|
export declare function finalizeDone(worktreePath: string): Promise<void>;
|
|
18
26
|
export declare function discardWorktree(worktreePath: string, title: string): Promise<void>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"task_git.d.ts","sourceRoot":"","sources":["../../src/lib/task_git.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"task_git.d.ts","sourceRoot":"","sources":["../../src/lib/task_git.ts"],"names":[],"mappings":"AAoBA,wBAAsB,SAAS,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAM7D;AAgBD;;;;;;GAMG;AACH,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC,CAM/E;AAED,wBAAsB,UAAU,CAAC,YAAY,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAKjG;AAED,wBAAsB,cAAc,CAClC,iBAAiB,EAAE,MAAM,EACzB,SAAS,EAAE,MAAM,EACjB,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,GACZ,OAAO,CAAC;IAAE,MAAM,EAAE,MAAM,CAAC;IAAC,YAAY,EAAE,MAAM,CAAC;IAAC,eAAe,EAAE,MAAM,CAAA;CAAE,CAAC,CAe5E;AAED;;;;;;GAMG;AACH,wBAAsB,YAAY,CAChC,GAAG,EAAE,MAAM,EACX,QAAQ,EAAE,MAAM,EAAE,EAClB,eAAe,CAAC,EAAE,MAAM,GACvB,OAAO,CAAC,IAAI,CAAC,CAwBf;AAcD,wBAAsB,SAAS,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAcrF;AAED,wBAAsB,YAAY,CAAC,YAAY,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAgBtE;AAED,wBAAsB,eAAe,CAAC,YAAY,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAGxF"}
|
package/dist/lib/task_git.js
CHANGED
|
@@ -4,6 +4,7 @@ import { rm } from 'node:fs/promises';
|
|
|
4
4
|
import { join, relative, dirname } from 'node:path';
|
|
5
5
|
import { dataDir } from '../store/db.js';
|
|
6
6
|
import { commandEnv } from '../harness/tools/builtin/shell-env.js';
|
|
7
|
+
import { execInContainer } from './docker.js';
|
|
7
8
|
const exec = promisify(execFile);
|
|
8
9
|
const execShell = promisify(execCb);
|
|
9
10
|
async function git(cwd, args) {
|
|
@@ -32,6 +33,21 @@ function slug(title) {
|
|
|
32
33
|
function worktreePathFor(projectId, taskId) {
|
|
33
34
|
return join(dataDir(), 'worktrees', `${projectId}-${taskId}`);
|
|
34
35
|
}
|
|
36
|
+
/**
|
|
37
|
+
* Absolute git common dir for a (linked) worktree — the main repo's shared
|
|
38
|
+
* `.git`, which holds the object store and `worktrees/<id>`. A worktree's own
|
|
39
|
+
* `.git` file points inside here, so mounting this path into a container (at
|
|
40
|
+
* an identical path) is what makes in-container git resolve. Returns null when
|
|
41
|
+
* it can't be determined (e.g. not a git dir).
|
|
42
|
+
*/
|
|
43
|
+
export async function gitCommonDir(worktreePath) {
|
|
44
|
+
try {
|
|
45
|
+
return await git(worktreePath, ['rev-parse', '--path-format=absolute', '--git-common-dir']);
|
|
46
|
+
}
|
|
47
|
+
catch {
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
35
51
|
export async function agentDirIn(worktreePath, projectWorkingDir) {
|
|
36
52
|
// Preserve a sub-directory working dir when the project points below the repo root.
|
|
37
53
|
const repoRoot = await git(projectWorkingDir, ['rev-parse', '--show-toplevel']);
|
|
@@ -60,11 +76,18 @@ export async function ensureWorktree(projectWorkingDir, projectId, taskId, title
|
|
|
60
76
|
* generous timeout so a hung install can't wedge the scheduler tick.
|
|
61
77
|
* ponytail: 10-min per-command timeout; make it configurable if a real project needs longer.
|
|
62
78
|
*/
|
|
63
|
-
export async function runBootstrap(cwd, commands) {
|
|
79
|
+
export async function runBootstrap(cwd, commands, dockerContainer) {
|
|
64
80
|
for (const command of commands) {
|
|
65
81
|
const cmd = command.trim();
|
|
66
82
|
if (!cmd)
|
|
67
83
|
continue;
|
|
84
|
+
if (dockerContainer) {
|
|
85
|
+
const { exitCode, output } = await execInContainer(dockerContainer, cwd, cmd, 10 * 60 * 1000);
|
|
86
|
+
if (exitCode !== 0) {
|
|
87
|
+
throw new Error(`Bootstrap command failed: \`${cmd}\`\n${output.trim()}`);
|
|
88
|
+
}
|
|
89
|
+
continue;
|
|
90
|
+
}
|
|
68
91
|
try {
|
|
69
92
|
await execShell(cmd, {
|
|
70
93
|
cwd,
|
package/dist/store/db.d.ts
CHANGED
|
@@ -40,6 +40,9 @@ export interface Task {
|
|
|
40
40
|
sddEnabled?: boolean | null;
|
|
41
41
|
/** Per-invocation wall-clock budget (seconds). Inherits from the project; unset = default. */
|
|
42
42
|
maxRunSeconds?: number | null;
|
|
43
|
+
/** Name of the docker container isolating this task's runs (set when the
|
|
44
|
+
* project has a dockerImage). Parallel to branch/worktreePath. */
|
|
45
|
+
dockerContainer?: string | null;
|
|
43
46
|
createdAt: string;
|
|
44
47
|
updatedAt: string;
|
|
45
48
|
}
|
|
@@ -51,6 +54,9 @@ export interface TaskMessage {
|
|
|
51
54
|
content: string;
|
|
52
55
|
toolCallId?: string | null;
|
|
53
56
|
agentId?: string | null;
|
|
57
|
+
/** Identity of the agent that produced this message, captured at creation as
|
|
58
|
+
* `name · model` text (of that moment — survives later agent reconfig/rename). */
|
|
59
|
+
agentLabel?: string | null;
|
|
54
60
|
createdAt: string;
|
|
55
61
|
}
|
|
56
62
|
export declare function dataDir(): string;
|
package/dist/store/db.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"db.d.ts","sourceRoot":"","sources":["../../src/store/db.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAGvC,MAAM,WAAW,aAAa;IAC5B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,SAAS,GAAG,aAAa,GAAG,MAAM,GAAG,SAAS,CAAC;IACvD,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IAC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ow-shadow);
|
|
1587
1587
|
animation: slideFormUp 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
|
|
1588
|
-
|
|
1588
|
+
flex: 1 1 auto;
|
|
1589
|
+
min-height: 0;
|
|
1590
|
+
max-height: 100%;
|
|
1589
1591
|
}
|
|
1590
1592
|
.glass-form__body {
|
|
1591
|
-
flex: 1;
|
|
1593
|
+
flex: 1 1 0;
|
|
1594
|
+
min-height: 0;
|
|
1592
1595
|
overflow-y: auto;
|
|
1593
1596
|
display: flex;
|
|
1594
1597
|
flex-direction: column;
|
|
@@ -1671,6 +1674,7 @@ body.vscode-light .settings-panel__tab-btn--active {
|
|
|
1671
1674
|
}
|
|
1672
1675
|
.form-row > .form-group {
|
|
1673
1676
|
flex: 1;
|
|
1677
|
+
min-width: 0;
|
|
1674
1678
|
}
|
|
1675
1679
|
.form-actions {
|
|
1676
1680
|
display: flex;
|