maesttro 0.4.1 → 0.4.2
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 +3 -2
- package/dist/maesttro.js +11 -4
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -73,8 +73,9 @@ maesttro update # bump the package + rebuild image with
|
|
|
73
73
|
|
|
74
74
|
Run `maesttro` from the root of a repository (git 2.48+ required). Each run is a
|
|
75
75
|
**session** with its own isolated clone, `.worktrees/maesttro-<id>`, detached at
|
|
76
|
-
`origin/<default branch>` and mounted at `/workspace`.
|
|
77
|
-
|
|
76
|
+
`origin/<default branch>` and mounted at `/workspace`. The runner container is
|
|
77
|
+
named `maesttro-<id>` too, so `docker ps` and `docker logs maesttro-<id>` line up
|
|
78
|
+
with the session. That clone is the only part of the repo the container sees:
|
|
78
79
|
|
|
79
80
|
- Your real `.git` is never mounted, and neither is your main checkout or any
|
|
80
81
|
uncommitted work there. The container works in a `git clone --shared` that
|
package/dist/maesttro.js
CHANGED
|
@@ -1279,7 +1279,7 @@ Usage:
|
|
|
1279
1279
|
`;
|
|
1280
1280
|
|
|
1281
1281
|
// src/launch.ts
|
|
1282
|
-
import { execSync as execSync3, spawn } from "node:child_process";
|
|
1282
|
+
import { execSync as execSync3, spawn, spawnSync as spawnSync2 } from "node:child_process";
|
|
1283
1283
|
import { existsSync as existsSync4, rmSync as rmSync6 } from "node:fs";
|
|
1284
1284
|
import { constants, homedir as homedir4 } from "node:os";
|
|
1285
1285
|
import { join as join11 } from "node:path";
|
|
@@ -1979,7 +1979,8 @@ function dockerRunArgs({
|
|
|
1979
1979
|
command,
|
|
1980
1980
|
mounts,
|
|
1981
1981
|
workdir,
|
|
1982
|
-
extra = []
|
|
1982
|
+
extra = [],
|
|
1983
|
+
name
|
|
1983
1984
|
}) {
|
|
1984
1985
|
const volumes = mounts.flatMap(({ host, container, readOnly }) => [
|
|
1985
1986
|
"-v",
|
|
@@ -1989,6 +1990,7 @@ function dockerRunArgs({
|
|
|
1989
1990
|
"run",
|
|
1990
1991
|
"-it",
|
|
1991
1992
|
"--rm",
|
|
1993
|
+
...name ? ["--name", name] : [],
|
|
1992
1994
|
...volumes,
|
|
1993
1995
|
...extra,
|
|
1994
1996
|
"-w",
|
|
@@ -2016,6 +2018,9 @@ function ensureReady() {
|
|
|
2016
2018
|
throw new LaunchError("Runner isn't set up yet. Run `maesttro setup` first.");
|
|
2017
2019
|
}
|
|
2018
2020
|
}
|
|
2021
|
+
function clearStaleContainer(id) {
|
|
2022
|
+
spawnSync2("docker", ["rm", "-f", id], { stdio: "ignore" });
|
|
2023
|
+
}
|
|
2019
2024
|
function sharedSkillsDir() {
|
|
2020
2025
|
const dir = process.env.AGENT_SHARED_SKILLS ?? join11(homedir4(), "agent-shared", "skills");
|
|
2021
2026
|
return existsSync4(dir) ? dir : undefined;
|
|
@@ -2216,10 +2221,12 @@ async function launch({
|
|
|
2216
2221
|
"MAESTTRO_HOST_UID",
|
|
2217
2222
|
"MAESTTRO_HOST_GID"
|
|
2218
2223
|
].concat(repo ? ["MAESTTRO_REPO"] : []).flatMap((name) => ["-e", name]);
|
|
2224
|
+
clearStaleContainer(saved.id);
|
|
2219
2225
|
const child = spawn("docker", dockerRunArgs({
|
|
2220
2226
|
command: containerCommand(resolveCommand(args)),
|
|
2221
2227
|
mounts,
|
|
2222
2228
|
workdir,
|
|
2229
|
+
name: saved.id,
|
|
2223
2230
|
extra: [...github.dockerArgs, ...envFlags]
|
|
2224
2231
|
}), { stdio: "inherit", env: { ...process.env, ...sessionEnv } });
|
|
2225
2232
|
const forward = (signal) => child.kill(signal);
|
|
@@ -2238,7 +2245,7 @@ async function launch({
|
|
|
2238
2245
|
}
|
|
2239
2246
|
|
|
2240
2247
|
// src/push.ts
|
|
2241
|
-
import { spawnSync as
|
|
2248
|
+
import { spawnSync as spawnSync3 } from "node:child_process";
|
|
2242
2249
|
function pushCandidates(sessions) {
|
|
2243
2250
|
const candidates = new Map;
|
|
2244
2251
|
for (const session of sessions) {
|
|
@@ -2349,7 +2356,7 @@ Push? [y/N] `);
|
|
|
2349
2356
|
return;
|
|
2350
2357
|
}
|
|
2351
2358
|
}
|
|
2352
|
-
const pushed =
|
|
2359
|
+
const pushed = spawnSync3("git", ["-C", root, "push", "origin", `${tip}:refs/heads/${branch}`], { stdio: "inherit" });
|
|
2353
2360
|
if (pushed.status === 0) {
|
|
2354
2361
|
console.log(`Pushed ${branch}. Base for comparison was ${baseSha.slice(0, 8)}.`);
|
|
2355
2362
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "maesttro",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.2",
|
|
4
4
|
"description": "Isolated Docker runner for local coding agents (opencode, claude, ...) under a dedicated bot GitHub identity, with curated configs baked in per client.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|