@the-vibe-company/armada 0.2.46 → 0.2.47
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/armada.js +148 -29
- package/package.json +1 -1
package/dist/armada.js
CHANGED
|
@@ -8,7 +8,7 @@ import { hostname as hostname2 } from "node:os";
|
|
|
8
8
|
import { isatty } from "node:tty";
|
|
9
9
|
|
|
10
10
|
// src/cli.ts
|
|
11
|
-
import { dirname as dirname9, join as
|
|
11
|
+
import { dirname as dirname9, join as join9, resolve as resolve3 } from "node:path";
|
|
12
12
|
|
|
13
13
|
// ../core/src/types.ts
|
|
14
14
|
var LABEL_PHASES = [
|
|
@@ -10491,7 +10491,7 @@ ${attachments.join(`
|
|
|
10491
10491
|
};
|
|
10492
10492
|
}
|
|
10493
10493
|
// package.json
|
|
10494
|
-
var version = "0.2.
|
|
10494
|
+
var version = "0.2.47";
|
|
10495
10495
|
|
|
10496
10496
|
// src/attach.ts
|
|
10497
10497
|
import { resolve } from "node:path";
|
|
@@ -10824,7 +10824,7 @@ async function authLogout(io) {
|
|
|
10824
10824
|
}
|
|
10825
10825
|
|
|
10826
10826
|
// src/brief.ts
|
|
10827
|
-
import { dirname as dirname4, join as
|
|
10827
|
+
import { dirname as dirname4, join as join3 } from "node:path";
|
|
10828
10828
|
|
|
10829
10829
|
// src/watch.ts
|
|
10830
10830
|
import { dirname as dirname3 } from "node:path";
|
|
@@ -11030,7 +11030,7 @@ async function logout(io) {
|
|
|
11030
11030
|
|
|
11031
11031
|
// src/herdr.ts
|
|
11032
11032
|
import { createHash as createHash3 } from "node:crypto";
|
|
11033
|
-
import { dirname as dirname2 } from "node:path";
|
|
11033
|
+
import { dirname as dirname2, join as join2 } from "node:path";
|
|
11034
11034
|
|
|
11035
11035
|
// src/first-run.ts
|
|
11036
11036
|
import { stripVTControlCharacters } from "node:util";
|
|
@@ -11176,6 +11176,46 @@ var harnessArgs = (p) => [
|
|
|
11176
11176
|
];
|
|
11177
11177
|
var object = (v) => typeof v === "object" && v !== null && !Array.isArray(v) ? v : null;
|
|
11178
11178
|
var id = (v) => typeof v === "string" && /^[a-zA-Z0-9][a-zA-Z0-9:_-]{0,127}$/.test(v);
|
|
11179
|
+
function herdrWorktreesDirectory(env, configText) {
|
|
11180
|
+
const configured = configText ? worktreesDirectoryOf(configText) : null;
|
|
11181
|
+
const directory = configured ?? "~/.herdr/worktrees";
|
|
11182
|
+
const home = env.HOME;
|
|
11183
|
+
if (directory === "~")
|
|
11184
|
+
return home ?? directory;
|
|
11185
|
+
if (directory.startsWith("~/"))
|
|
11186
|
+
return home ? join2(home, directory.slice(2)) : directory;
|
|
11187
|
+
return directory;
|
|
11188
|
+
}
|
|
11189
|
+
function herdrWorktreePath(directory, repoName, branch) {
|
|
11190
|
+
return join2(directory, repoName, branch.replaceAll("/", "-"));
|
|
11191
|
+
}
|
|
11192
|
+
function worktreesDirectoryOf(text) {
|
|
11193
|
+
let inWorktrees = false;
|
|
11194
|
+
for (const raw of text.split(`
|
|
11195
|
+
`)) {
|
|
11196
|
+
const line = raw.trim();
|
|
11197
|
+
if (!line || line.startsWith("#"))
|
|
11198
|
+
continue;
|
|
11199
|
+
const table = line.match(/^\[([^\]]+)\]\s*(?:#.*)?$/);
|
|
11200
|
+
if (table) {
|
|
11201
|
+
inWorktrees = table[1]?.trim() === "worktrees";
|
|
11202
|
+
continue;
|
|
11203
|
+
}
|
|
11204
|
+
if (!inWorktrees)
|
|
11205
|
+
continue;
|
|
11206
|
+
const value = line.match(/^directory\s*=\s*("(?:[^"\\]|\\.)*"|'[^']*')\s*(?:#.*)?$/)?.[1];
|
|
11207
|
+
if (!value)
|
|
11208
|
+
continue;
|
|
11209
|
+
if (value.startsWith("'"))
|
|
11210
|
+
return value.slice(1, -1);
|
|
11211
|
+
try {
|
|
11212
|
+
return JSON.parse(value);
|
|
11213
|
+
} catch {
|
|
11214
|
+
return null;
|
|
11215
|
+
}
|
|
11216
|
+
}
|
|
11217
|
+
return null;
|
|
11218
|
+
}
|
|
11179
11219
|
function parseHerdrHandle(raw) {
|
|
11180
11220
|
let h = null;
|
|
11181
11221
|
try {
|
|
@@ -12529,7 +12569,7 @@ async function brief(io, config, credentials, a, version, configPath) {
|
|
|
12529
12569
|
if (!credentials.linearApiKey)
|
|
12530
12570
|
throw missingKey(LINEAR_KEY);
|
|
12531
12571
|
const extraPath = config.brief.extra;
|
|
12532
|
-
const conventions = extraPath ? { path: extraPath, text: await io.readFile(
|
|
12572
|
+
const conventions = extraPath ? { path: extraPath, text: await io.readFile(join3(dirname4(configPath), extraPath)).catch(() => null) } : null;
|
|
12533
12573
|
let b;
|
|
12534
12574
|
try {
|
|
12535
12575
|
b = await loadBrief(config, {
|
|
@@ -12597,7 +12637,7 @@ ${next.line}
|
|
|
12597
12637
|
}
|
|
12598
12638
|
|
|
12599
12639
|
// src/doctor.ts
|
|
12600
|
-
import { join as
|
|
12640
|
+
import { join as join5 } from "node:path";
|
|
12601
12641
|
|
|
12602
12642
|
// src/local-tools.ts
|
|
12603
12643
|
import { stripVTControlCharacters as stripVTControlCharacters3 } from "node:util";
|
|
@@ -12916,14 +12956,14 @@ async function ensureLocalProfile(io, configPath, name, profile) {
|
|
|
12916
12956
|
|
|
12917
12957
|
// src/repo.ts
|
|
12918
12958
|
import { lstat, mkdir as mkdir2, readdir, readFile as readFile2, readlink, rm as rm2, symlink, writeFile as writeFile2 } from "node:fs/promises";
|
|
12919
|
-
import { dirname as dirname5, join as
|
|
12959
|
+
import { dirname as dirname5, join as join4, relative, sep } from "node:path";
|
|
12920
12960
|
var absent = (err) => {
|
|
12921
12961
|
const code = err.code;
|
|
12922
12962
|
return code === "ENOENT" || code === "ENOTDIR" || code === "EISDIR";
|
|
12923
12963
|
};
|
|
12924
12964
|
async function collect(base, dir, out) {
|
|
12925
12965
|
for (const entry of await readdir(dir, { withFileTypes: true })) {
|
|
12926
|
-
const full =
|
|
12966
|
+
const full = join4(dir, entry.name);
|
|
12927
12967
|
if (entry.isDirectory()) {
|
|
12928
12968
|
if (![".git", "node_modules", "__pycache__"].includes(entry.name))
|
|
12929
12969
|
await collect(base, full, out);
|
|
@@ -12933,12 +12973,12 @@ async function collect(base, dir, out) {
|
|
|
12933
12973
|
}
|
|
12934
12974
|
function fsRepoView(root) {
|
|
12935
12975
|
return {
|
|
12936
|
-
readFile: (path) => readFile2(
|
|
12976
|
+
readFile: (path) => readFile2(join4(root, path), "utf8").catch((err) => {
|
|
12937
12977
|
if (absent(err))
|
|
12938
12978
|
return null;
|
|
12939
12979
|
throw err;
|
|
12940
12980
|
}),
|
|
12941
|
-
readLink: (path) => readlink(
|
|
12981
|
+
readLink: (path) => readlink(join4(root, path)).catch((err) => {
|
|
12942
12982
|
if (absent(err) || err.code === "EINVAL")
|
|
12943
12983
|
return null;
|
|
12944
12984
|
throw err;
|
|
@@ -12946,7 +12986,7 @@ function fsRepoView(root) {
|
|
|
12946
12986
|
readFolder: async (path) => {
|
|
12947
12987
|
const out = [];
|
|
12948
12988
|
try {
|
|
12949
|
-
await collect(
|
|
12989
|
+
await collect(join4(root, path), join4(root, path), out);
|
|
12950
12990
|
} catch (err) {
|
|
12951
12991
|
if (absent(err))
|
|
12952
12992
|
return null;
|
|
@@ -12960,7 +13000,7 @@ async function assertNoLinkedParent(root, path) {
|
|
|
12960
13000
|
const parts = path.split("/").slice(0, -1);
|
|
12961
13001
|
for (let k = 1;k <= parts.length; k++) {
|
|
12962
13002
|
const parent = parts.slice(0, k).join("/");
|
|
12963
|
-
if ((await lstat(
|
|
13003
|
+
if ((await lstat(join4(root, parent)).catch(() => null))?.isSymbolicLink())
|
|
12964
13004
|
throw new CommandError(`${parent} is a link; Armada does not write through it. Replace it with a folder first.`);
|
|
12965
13005
|
}
|
|
12966
13006
|
}
|
|
@@ -12968,17 +13008,17 @@ async function applyPlan(root, plan) {
|
|
|
12968
13008
|
for (const path of [...plan.removes, ...plan.writes.map((w) => w.path), ...plan.links.map((l) => l.path)])
|
|
12969
13009
|
await assertNoLinkedParent(root, path);
|
|
12970
13010
|
for (const w of plan.writes)
|
|
12971
|
-
if ((await lstat(
|
|
13011
|
+
if ((await lstat(join4(root, w.path)).catch(() => null))?.isSymbolicLink())
|
|
12972
13012
|
throw new CommandError(`${w.path} is a link; Armada does not write through it. Replace it with a file first.`);
|
|
12973
13013
|
for (const path of plan.removes)
|
|
12974
|
-
await rm2(
|
|
13014
|
+
await rm2(join4(root, path), { force: true });
|
|
12975
13015
|
for (const w of plan.writes) {
|
|
12976
|
-
const full =
|
|
13016
|
+
const full = join4(root, w.path);
|
|
12977
13017
|
await mkdir2(dirname5(full), { recursive: true });
|
|
12978
13018
|
await writeFile2(full, w.content);
|
|
12979
13019
|
}
|
|
12980
13020
|
for (const l of plan.links) {
|
|
12981
|
-
const full =
|
|
13021
|
+
const full = join4(root, l.path);
|
|
12982
13022
|
await mkdir2(dirname5(full), { recursive: true });
|
|
12983
13023
|
if (await lstat(full).catch(() => null))
|
|
12984
13024
|
await rm2(full, { recursive: true, force: true });
|
|
@@ -13242,7 +13282,7 @@ async function localRuntimeChecks(io, config, options = { readOnly: true }) {
|
|
|
13242
13282
|
if (!harnesses.length)
|
|
13243
13283
|
return [];
|
|
13244
13284
|
const result = await offerLocalInstalls(io, await detectLocalTools(io, harnesses, config ? localModelProfiles(config) : []), options);
|
|
13245
|
-
const selected = await offerLocalModels(io, result, options.configPath ??
|
|
13285
|
+
const selected = await offerLocalModels(io, result, options.configPath ?? join5(io.cwd, CONFIG_FILE), options);
|
|
13246
13286
|
return [
|
|
13247
13287
|
...selected.checks,
|
|
13248
13288
|
...harnesses.some((harness) => harness === "opencode" || harness === "deepseek") ? [
|
|
@@ -13287,7 +13327,7 @@ async function buildDoctor(io, armadaVersion, options = { readOnly: true }) {
|
|
|
13287
13327
|
...keyFileChecks(machine, credentials),
|
|
13288
13328
|
...await labelChecks(io, config, credentials),
|
|
13289
13329
|
...await conductorChecks(io, config),
|
|
13290
|
-
...await localRuntimeChecks(io, config, { ...options, configPath:
|
|
13330
|
+
...await localRuntimeChecks(io, config, { ...options, configPath: join5(root, CONFIG_FILE) }),
|
|
13291
13331
|
...config ? await reviewRuntimeChecks(io, root) : [],
|
|
13292
13332
|
...await secretChecks(api, config, credentials)
|
|
13293
13333
|
];
|
|
@@ -13428,7 +13468,7 @@ async function heartbeat(io, config, credentials, args) {
|
|
|
13428
13468
|
// src/init.ts
|
|
13429
13469
|
import { mkdtemp, realpath, rm as rm3 } from "node:fs/promises";
|
|
13430
13470
|
import { tmpdir } from "node:os";
|
|
13431
|
-
import { join as
|
|
13471
|
+
import { join as join6 } from "node:path";
|
|
13432
13472
|
var STOP_HOOK_QUESTION = "Add the Claude Code stop hook to this repository's .claude/settings.json? A coordinator then cannot end its turn while workers are in flight and no armada watch runs; your user settings are not touched. [Y/n] ";
|
|
13433
13473
|
async function wantsStopHook(io, opts) {
|
|
13434
13474
|
if (opts.stopHook !== null)
|
|
@@ -13461,7 +13501,7 @@ async function resolveConfig(exec, root, checkout, opts) {
|
|
|
13461
13501
|
return { config: parse(onDefault, `${CONFIG_FILE} on the default branch`), text: null, source: "default branch" };
|
|
13462
13502
|
const local = await fsRepoView(root).readFile(CONFIG_FILE);
|
|
13463
13503
|
if (local !== null && !opts.programRoot)
|
|
13464
|
-
return { config: parse(local,
|
|
13504
|
+
return { config: parse(local, join6(root, CONFIG_FILE)), text: local, source: "working tree" };
|
|
13465
13505
|
const branch = initBranch(opts.armadaVersion);
|
|
13466
13506
|
if (!opts.programRoot && await sh(exec, root, "git", ["ls-remote", "origin", `refs/heads/${branch}`])) {
|
|
13467
13507
|
await sh(exec, root, "git", ["fetch", "--quiet", "origin", branch]);
|
|
@@ -13532,7 +13572,7 @@ async function init(io, opts) {
|
|
|
13532
13572
|
const base = await defaultBranch(exec, root);
|
|
13533
13573
|
await sh(exec, root, "git", ["fetch", "--quiet", "origin", base]);
|
|
13534
13574
|
const baseSha = await sh(exec, root, "git", ["rev-parse", "FETCH_HEAD"]);
|
|
13535
|
-
const checkout = await realpath(await mkdtemp(
|
|
13575
|
+
const checkout = await realpath(await mkdtemp(join6(tmpdir(), "armada-init-")));
|
|
13536
13576
|
try {
|
|
13537
13577
|
await sh(exec, root, "git", ["worktree", "add", "--quiet", "--detach", checkout, baseSha]);
|
|
13538
13578
|
const { config, text, source } = await resolveConfig(exec, root, checkout, opts);
|
|
@@ -13635,7 +13675,7 @@ async function init(io, opts) {
|
|
|
13635
13675
|
}
|
|
13636
13676
|
|
|
13637
13677
|
// src/launch.ts
|
|
13638
|
-
import { dirname as dirname6, join as
|
|
13678
|
+
import { basename, dirname as dirname6, join as join7 } from "node:path";
|
|
13639
13679
|
async function launch(io, config, credentials, args, version, configPath) {
|
|
13640
13680
|
if (args.rest[0] !== "revoke")
|
|
13641
13681
|
return launchLocal(io, config, credentials, args, version, configPath);
|
|
@@ -13726,6 +13766,8 @@ async function launchLocal(io, config, credentials, args, version, configPath) {
|
|
|
13726
13766
|
throw new UsageError("local launch needs a [herdr.profiles.<name>] with harness, model and effort");
|
|
13727
13767
|
if (o.harness && o.harness !== choice.profile.harness)
|
|
13728
13768
|
throw new UsageError(`profile "${choice.name}" uses ${choice.profile.harness}; choose a matching --profile with --reason to change harness`);
|
|
13769
|
+
if (o["dry-run"] === "true")
|
|
13770
|
+
return await launchPlan(io, args.json, { ticketId, choice, branch, version });
|
|
13729
13771
|
const execute = io.exec;
|
|
13730
13772
|
const preflight = {
|
|
13731
13773
|
...io,
|
|
@@ -13752,7 +13794,7 @@ async function launchLocal(io, config, credentials, args, version, configPath) {
|
|
|
13752
13794
|
const base = remote.code === 0 ? remote.stdout.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD/m)?.[1] : null;
|
|
13753
13795
|
if (!base)
|
|
13754
13796
|
throw new UsageError("could not read the default branch of origin");
|
|
13755
|
-
const conventions = config.brief.extra ? { path: config.brief.extra, text: await io.readFile(
|
|
13797
|
+
const conventions = config.brief.extra ? { path: config.brief.extra, text: await io.readFile(join7(dirname6(configPath), config.brief.extra)) } : null;
|
|
13756
13798
|
const npm = await checkPublished(version, io.fetch ?? fetch);
|
|
13757
13799
|
if (npm.state === "missing")
|
|
13758
13800
|
throw new UsageError(`armada ${version} is not on npm yet; publish this version before launching local workers`);
|
|
@@ -13764,7 +13806,7 @@ async function launchLocal(io, config, credentials, args, version, configPath) {
|
|
|
13764
13806
|
await runtime.ensureServer();
|
|
13765
13807
|
handle = await runtime.create({ repo, branch, base, ticket: ticketId, secrets: config.secrets.names });
|
|
13766
13808
|
if (configSnapshot !== null && io.writeFile)
|
|
13767
|
-
await io.writeFile(
|
|
13809
|
+
await io.writeFile(join7(handle.path, CONFIG_FILE), configSnapshot);
|
|
13768
13810
|
const b = buildBrief({
|
|
13769
13811
|
config,
|
|
13770
13812
|
ticket,
|
|
@@ -13827,6 +13869,78 @@ ${watch.line}
|
|
|
13827
13869
|
`);
|
|
13828
13870
|
return 0;
|
|
13829
13871
|
}
|
|
13872
|
+
async function launchPlan(io, json, input) {
|
|
13873
|
+
const openCode = herdrHarnessKind(input.choice.profile.harness) === "opencode";
|
|
13874
|
+
const detected = await detectLocalTools(io, [input.choice.profile.harness], openCode ? [{ name: input.choice.name, harness: input.choice.profile.harness, model: input.choice.profile.model }] : []);
|
|
13875
|
+
const npm = await checkPublished(input.version, io.fetch ?? fetch);
|
|
13876
|
+
const describe = (checks) => checks.map((check) => `${check.message}${check.fix ? `: ${check.fix}` : ""}`);
|
|
13877
|
+
const gaps = describe(detected.checks.filter((check) => check.level === "error"));
|
|
13878
|
+
const warnings = describe(detected.checks.filter((check) => check.level === "warning"));
|
|
13879
|
+
if (npm.state === "missing")
|
|
13880
|
+
gaps.push(`armada ${input.version} is not on npm yet; publish this version before launching local workers`);
|
|
13881
|
+
let worktree = null;
|
|
13882
|
+
let base = null;
|
|
13883
|
+
try {
|
|
13884
|
+
const execute = io.exec;
|
|
13885
|
+
if (!execute)
|
|
13886
|
+
throw new UsageError("local launch needs process execution");
|
|
13887
|
+
const root = await execute("git", ["rev-parse", "--show-toplevel"], { cwd: io.cwd, timeoutMs: 1e4 });
|
|
13888
|
+
if (root.code !== 0 || !root.stdout.trim().startsWith("/"))
|
|
13889
|
+
throw new UsageError("local launch must run in a git repository");
|
|
13890
|
+
const repo = root.stdout.trim();
|
|
13891
|
+
const common = await execute("git", ["rev-parse", "--path-format=absolute", "--git-common-dir"], {
|
|
13892
|
+
cwd: repo,
|
|
13893
|
+
timeoutMs: 1e4
|
|
13894
|
+
});
|
|
13895
|
+
const mainRoot = common.code === 0 && common.stdout.trim().startsWith("/") ? dirname6(common.stdout.trim()) : repo;
|
|
13896
|
+
const remote = await execute("git", ["ls-remote", "--symref", "origin", "HEAD"], { cwd: repo, timeoutMs: 20000 });
|
|
13897
|
+
base = remote.code === 0 ? remote.stdout.match(/^ref:\s+refs\/heads\/(\S+)\s+HEAD/m)?.[1] ?? null : null;
|
|
13898
|
+
if (!base)
|
|
13899
|
+
throw new UsageError("could not read the default branch of origin");
|
|
13900
|
+
const configHome = io.env.XDG_CONFIG_HOME ?? (io.env.HOME ? join7(io.env.HOME, ".config") : null);
|
|
13901
|
+
const herdrConfigPath = io.env.HERDR_CONFIG_PATH ?? (configHome ? join7(configHome, "herdr", "config.toml") : null);
|
|
13902
|
+
const herdrConfig = herdrConfigPath ? await io.readFile(herdrConfigPath).catch(() => null) : null;
|
|
13903
|
+
worktree = herdrWorktreePath(herdrWorktreesDirectory(io.env, herdrConfig), basename(mainRoot), input.branch);
|
|
13904
|
+
} catch (error) {
|
|
13905
|
+
gaps.push(error instanceof UsageError ? error.message : "could not read the repository state");
|
|
13906
|
+
}
|
|
13907
|
+
const ready = gaps.length === 0;
|
|
13908
|
+
const plan = {
|
|
13909
|
+
ticket: input.ticketId,
|
|
13910
|
+
runtime: "herdr",
|
|
13911
|
+
dryRun: true,
|
|
13912
|
+
profile: input.choice.name,
|
|
13913
|
+
profileWhy: input.choice.why,
|
|
13914
|
+
routed: input.choice.routed,
|
|
13915
|
+
reason: input.choice.reason,
|
|
13916
|
+
harness: input.choice.profile.harness,
|
|
13917
|
+
actualHarness: herdrHarnessKind(input.choice.profile.harness),
|
|
13918
|
+
harnessDescription: herdrHarnessLabel(input.choice.profile.harness),
|
|
13919
|
+
model: input.choice.profile.model,
|
|
13920
|
+
effort: input.choice.profile.effort,
|
|
13921
|
+
branch: input.branch,
|
|
13922
|
+
worktree,
|
|
13923
|
+
base,
|
|
13924
|
+
preflight: { ready, gaps, warnings }
|
|
13925
|
+
};
|
|
13926
|
+
io.stdout(json ? `${JSON.stringify(plan, null, 2)}
|
|
13927
|
+
` : `Launch plan for ${input.ticketId} (dry run: nothing is created)
|
|
13928
|
+
|
|
13929
|
+
Profile ${input.choice.name} — ${input.choice.why}
|
|
13930
|
+
Harness ${plan.harnessDescription} (exact model: ${plan.model || "not set"}, effort ${plan.effort})
|
|
13931
|
+
Branch ${plan.branch}
|
|
13932
|
+
Worktree ${worktree ?? "unknown"}
|
|
13933
|
+
Base ${base ?? "unknown"}
|
|
13934
|
+
Preflight ${ready ? "ready" : "blocked"}
|
|
13935
|
+
`);
|
|
13936
|
+
for (const warning of warnings)
|
|
13937
|
+
io.stderr(`armada: warning: ${warning}
|
|
13938
|
+
`);
|
|
13939
|
+
for (const gap of gaps)
|
|
13940
|
+
io.stderr(`armada: ${gap}
|
|
13941
|
+
`);
|
|
13942
|
+
return ready ? 0 : 1;
|
|
13943
|
+
}
|
|
13830
13944
|
|
|
13831
13945
|
// src/local-setup.ts
|
|
13832
13946
|
async function setupLocal(io, initial, configPath, args) {
|
|
@@ -13956,7 +14070,7 @@ Claude Code: trusting this parent folder does not cover Git repositories beneath
|
|
|
13956
14070
|
import { randomUUID } from "node:crypto";
|
|
13957
14071
|
import { rm as rm4 } from "node:fs/promises";
|
|
13958
14072
|
import { hostname, tmpdir as tmpdir2 } from "node:os";
|
|
13959
|
-
import { dirname as dirname7, join as
|
|
14073
|
+
import { dirname as dirname7, join as join8 } from "node:path";
|
|
13960
14074
|
var TRANSIENT = /\bHTTP 5\d\d\b|\b5\d\d (?:Bad Gateway|Service Unavailable|Gateway Time-?out|Internal Server Error)\b|Bad Gateway|Service Unavailable|Gateway Time-?out|ECONNRESET|ETIMEDOUT|connection reset|i\/o timeout|TLS handshake timeout/i;
|
|
13961
14075
|
var tail = (text, lines = 30) => text.trimEnd().split(`
|
|
13962
14076
|
`).slice(-lines).join(`
|
|
@@ -14034,7 +14148,7 @@ function gitRepo(exec, cwd) {
|
|
|
14034
14148
|
},
|
|
14035
14149
|
async testMerge({ branch, base, head, number, commands }) {
|
|
14036
14150
|
await must(["fetch", "--quiet", "origin", branch, `refs/pull/${number}/head`]);
|
|
14037
|
-
const dir =
|
|
14151
|
+
const dir = join8(tmpdir2(), `armada-merge-${number}-${randomUUID().slice(0, 8)}`);
|
|
14038
14152
|
const remove = async () => {
|
|
14039
14153
|
await git(["worktree", "remove", "--force", dir]);
|
|
14040
14154
|
await git(["worktree", "prune"]);
|
|
@@ -14178,7 +14292,7 @@ async function merge(io, config, credentials, a, configPath) {
|
|
|
14178
14292
|
`),
|
|
14179
14293
|
installedSkill: async (name) => {
|
|
14180
14294
|
for (const dir of [AGENTS_SKILLS_DIR, CLAUDE_SKILLS_DIR])
|
|
14181
|
-
if (await io.readFile(
|
|
14295
|
+
if (await io.readFile(join8(repoDir, dir, name, "SKILL.md")) !== null)
|
|
14182
14296
|
return true;
|
|
14183
14297
|
return false;
|
|
14184
14298
|
}
|
|
@@ -14850,6 +14964,11 @@ var COMMAND_HELP = {
|
|
|
14850
14964
|
[--profile <name> [--reason <why>]] [--validation <n|none>]
|
|
14851
14965
|
Create the ticket's worktree and start a persistent local worker
|
|
14852
14966
|
with its launch-token brief. Profiles follow [[herdr.routing]]
|
|
14967
|
+
launch <ticket> --runtime herdr --dry-run [--json]
|
|
14968
|
+
Print the launch plan (profile and why, harness and exact model,
|
|
14969
|
+
branch and worktree path, preflight) and create nothing: no
|
|
14970
|
+
worktree, token, pane or install. Exits 0 when the preflight
|
|
14971
|
+
passes, else non-zero, listing every gap
|
|
14853
14972
|
launch revoke <ticket>
|
|
14854
14973
|
Cancel the newest pending launch through Armada, including a worker
|
|
14855
14974
|
signed in but not claimed. A claimed launch needs armada release instead
|
|
@@ -15054,7 +15173,7 @@ var COMMAND_OPTIONS = {
|
|
|
15054
15173
|
init: ["program-root", "name", "slug", "no-stop-hook"],
|
|
15055
15174
|
merge: ["ticket", "no-ticket", "dry-run", "no-lock", "wait", "timeout", "reason", "ask-owner"],
|
|
15056
15175
|
brief: ["profile", "reason", "prompt", "profile-line", "validation", "validation-reason"],
|
|
15057
|
-
launch: ["runtime", "harness", "profile", "reason", "validation", "validation-reason"],
|
|
15176
|
+
launch: ["runtime", "harness", "profile", "reason", "validation", "validation-reason", "dry-run"],
|
|
15058
15177
|
validate: ["ticket", "attach", "caption", "choices", "message", "message-file"],
|
|
15059
15178
|
"ask-owner": ["choices"],
|
|
15060
15179
|
login: ["api-key", "launch-token", "api-url"],
|
|
@@ -15121,7 +15240,7 @@ async function findConfig(io, explicit, command = "status") {
|
|
|
15121
15240
|
return { path, text };
|
|
15122
15241
|
}
|
|
15123
15242
|
for (let dir = resolve3(io.cwd);; dir = dirname9(dir)) {
|
|
15124
|
-
const path =
|
|
15243
|
+
const path = join9(dir, CONFIG_FILE);
|
|
15125
15244
|
const text = await io.readFile(path);
|
|
15126
15245
|
if (text !== null)
|
|
15127
15246
|
return { path, text };
|