@abuaboud/box 0.7.13 → 0.7.15
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/cbox.mjs +12 -4
- package/package.json +1 -1
package/dist/cbox.mjs
CHANGED
|
@@ -63,7 +63,7 @@ function localClaudeHome() {
|
|
|
63
63
|
const paths = [...dirs, ...Object.values(plugins).flat().map((e) => e.installPath), ...Object.values(marketplaces).map((m) => m.installLocation)].map((p) => p.startsWith(root) ? p.slice(root.length + 1) : p);
|
|
64
64
|
const tar = !paths.length ? Promise.resolve(void 0) : new Promise((done) => execFile("tar", ["-chf", "-", "--no-xattrs", "--exclude=.git", "--exclude=node_modules", "--exclude=.DS_Store", "-C", root, ...new Set(paths)], { encoding: "buffer", maxBuffer: 256 << 20, env: { ...process.env, COPYFILE_DISABLE: "1" } }, (err, out) => err ? done(void 0) : gzip(out, (e, gz) => done(e ? void 0 : gz))));
|
|
65
65
|
const memory = existsSync(join(root, "CLAUDE.md")) ? readFileSync(join(root, "CLAUDE.md"), "utf8") : "";
|
|
66
|
-
return { from: root, pending: paths.length > 0, tar, plugins, marketplaces, enabled: Object.keys(plugins), memory, skills: existsSync(join(root, "skills")) ? readdirSync(join(root, "skills")).filter((f) => !f.startsWith("."))
|
|
66
|
+
return { from: root, pending: paths.length > 0, tar, plugins, marketplaces, enabled: Object.keys(plugins), memory, skills: existsSync(join(root, "skills")) ? readdirSync(join(root, "skills")).filter((f) => !f.startsWith(".")) : [] };
|
|
67
67
|
}
|
|
68
68
|
function laptopKey() {
|
|
69
69
|
const priv = join(CONFIG_DIR, "id_ed25519");
|
|
@@ -816,9 +816,9 @@ async function sendSetup() {
|
|
|
816
816
|
const { tar, skills, enabled, memory, ...home2 } = localClaudeHome();
|
|
817
817
|
const buf = await tar;
|
|
818
818
|
const sha = buf && buf.length <= MAX_SETUP_MB << 20 ? createHash("sha256").update(buf).digest("hex") : void 0;
|
|
819
|
-
const put = (body) => api("/api/laptop-setup", { method: "PUT", body: JSON.stringify({ home: { ...home2, memory }, sha, ...body }) });
|
|
819
|
+
const put = (body) => api("/api/laptop-setup", { method: "PUT", body: JSON.stringify({ home: { ...home2, memory, skills }, sha, ...body }) });
|
|
820
820
|
if ((await put({})).need && buf) await put({ tgz: buf.toString("base64") });
|
|
821
|
-
return { skills, plugins: enabled.length, memory: !!memory.trim(), tooBig: !!buf && !sha };
|
|
821
|
+
return { skills: skills.length, plugins: enabled.length, memory: !!memory.trim(), tooBig: !!buf && !sha };
|
|
822
822
|
}
|
|
823
823
|
var claude = (folder, args) => new Promise((done) => spawn3("claude", args, { cwd: folder, stdio: "inherit", env: { ...process.env, ...process.getuid?.() === 0 && { IS_SANDBOX: "1" } } }).on("error", () => fail(`Claude Code is not installed on this laptop. npm i -g @anthropic-ai/claude-code, or use ${brand.command} --remote.`)).on("close", (c) => done(c ?? 0)));
|
|
824
824
|
function trustFolder(folder) {
|
|
@@ -990,7 +990,7 @@ async function newRemoteBox(env, branch, name, o) {
|
|
|
990
990
|
[900, `Unpacking the ${env} snapshot`],
|
|
991
991
|
[2e3, "Signing Claude Code in"],
|
|
992
992
|
[2900, `Copying ${mcpCount(mcpServers)}`],
|
|
993
|
-
[3300, `Copying ${claudeHome.skills} skill${claudeHome.skills === 1 ? "" : "s"} and ${claudeHome.enabled.length} plugin${claudeHome.enabled.length === 1 ? "" : "s"}`],
|
|
993
|
+
[3300, `Copying ${claudeHome.skills.length} skill${claudeHome.skills.length === 1 ? "" : "s"} and ${claudeHome.enabled.length} plugin${claudeHome.enabled.length === 1 ? "" : "s"}`],
|
|
994
994
|
[3700, "Connecting GitHub"],
|
|
995
995
|
[4600, "Waking Claude up"],
|
|
996
996
|
[9e3, "Bigger machines take a few extra seconds"]
|
|
@@ -1310,6 +1310,13 @@ async function setup() {
|
|
|
1310
1310
|
if (missing.length) miss(`Before @${brand.name} can start agents as you, ${missing.join(" and ")}: ${new URL("/boxes?new", load().server)}`);
|
|
1311
1311
|
else ok("Claude and GitHub are connected");
|
|
1312
1312
|
}
|
|
1313
|
+
async function submit(issues, o) {
|
|
1314
|
+
const env = await chooseEnvironment(o.env, gitRepo());
|
|
1315
|
+
const body = { envId: env.id, issues: issues.map((text) => ({ title: text.trim().split("\n")[0].slice(0, 200), prompt: text.trim() })) };
|
|
1316
|
+
const { data } = await api("/api/issues", { method: "POST", body: JSON.stringify(body) });
|
|
1317
|
+
const width = Math.max(...data.map((s) => s.title.length)) + 2;
|
|
1318
|
+
for (const s of data) s.agent ? ok(`${s.title.padEnd(width)}${dim(`${s.agent} \xB7 ${s.url}`)}`) : miss(`${s.title.padEnd(width)}${dim(s.error ?? `already submitted \xB7 ${s.url}`)}`);
|
|
1319
|
+
}
|
|
1313
1320
|
var quiet = ["proxy", "sync"].includes(process.argv[2] ?? "");
|
|
1314
1321
|
if (quiet) console.log = console.error;
|
|
1315
1322
|
if (!quiet && !process.env.CBOX_UPDATED && !process.argv.slice(2).some((a) => ["-V", "--version", "-h", "--help", "help"].includes(a))) console.log(dim(`${brand.command} ${VERSION}`));
|
|
@@ -1323,6 +1330,7 @@ boxOptions(cli.command("new").description("always make a fresh agent")).action((
|
|
|
1323
1330
|
cli.command("ls").description("list your agents").action(ls);
|
|
1324
1331
|
cli.command("code [env]").description("open an environment's agents in one VS Code window, each a git worktree, and sync your saves").action((env) => code(env));
|
|
1325
1332
|
cli.command("rm <agent>").option("-f, --force", "delete even while someone is attached or Claude is working").description("delete an agent, pushing unpushed work to cb/<agent>").action(rm);
|
|
1333
|
+
cli.command("submit <issue...>").option("-e, --env <name>", "environment (default: this repo's, or asked)").description("start one agent per issue; the first line of each issue is its title").action(submit);
|
|
1326
1334
|
cli.command("setup").description(`send your skills, plugins and CLAUDE.md for @${brand.name} and webhooks, and check Claude and GitHub`).action(setup);
|
|
1327
1335
|
cli.command("login").option("--server <url>", `${brand.name} server`).description("sign in from the browser").action((o) => login(o.server));
|
|
1328
1336
|
cli.command("upgrade").description(`update ${brand.command} to the latest version now`).action(upgrade);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@abuaboud/box",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.15",
|
|
4
4
|
"description": "skyfleet: Claude Code on your laptop, the work on a cloud dev machine (a ship) you reach as <name>.skyfleet, with your team databases through MCP.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|