@the-vibe-company/armada 0.2.9 → 0.2.10

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.
Files changed (3) hide show
  1. package/README.md +6 -3
  2. package/dist/armada.js +146 -33
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -35,6 +35,7 @@ Workers then need no key either: each one's launch message carries a one-time to
35
35
  `armada status` reads the `armada.toml` of the current repository (or the nearest parent directory) and prints:
36
36
 
37
37
  - **In flight**: tickets an agent holds, with their phase, runtime, last report and pull request. A worker with no report (an `armada report` event recorded through Armada, an `Agent status:` comment or its claim) for longer than `policy.silence_minutes` is flagged `silent`, unless it is waiting on a human (`awaiting-approval`, `blocked`, `ready-to-merge`). A ticket that never had a report falls back to its last sign of life (ticket edit, comment or pull request update).
38
+ - **Launched, not started**: signed in to Armada, the workers launched with a launch token that have not claimed their ticket after `policy.not_started_minutes`, each saying whether the token was never used (the worker never reached its `armada login` line) or used without a claim.
38
39
  - **Ready to start**: tickets without sub-issues that are not started, not held by an agent, have no open pull request, and whose blocked-by tickets are all closed, ranked by what they unlock. Tickets without the ready label, or still in triage, are listed separately.
39
40
  - **Pull requests waiting**: open pull requests with their CI state and mergeability.
40
41
 
@@ -84,7 +85,8 @@ armada brief ABC-12 --profile codex --reason "a back-end bug behind a web label"
84
85
  - The prompt names the ticket and its Linear branch, starts by installing the coordinator's Armada version (`npm install -g`, with an `npm exec` fallback), signing in with `armada login --launch-token <token>` and running `armada claim` with the handle `$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID`, and carries the blockers with their hand-back notes, the comments already on the ticket and the workers in flight.
85
86
  - **Plan rule.** A "Plan" section says in one line whether the worker waits for approval: "post your plan with `armada report implementing --plan-file -` and go on" when plans are pre-approved, "post your plan with `armada report awaiting-approval --plan-file -` and wait for approval" otherwise. `[policy] plans` decides (`approve` by default, or `pre-approved`); a ticket labelled `plan-approved` (`policy.pre_approved_label`) is pre-approved, and one labelled `needs-plan-approval` (`policy.approval_label`) waits for approval, which wins when a ticket has both. The settings show the rule and where it comes from (`Plans:`), and `--json` carries it as `plans`.
86
87
  - **Project conventions.** `[brief] extra = "<path>"` names a file of the repository (relative to `armada.toml`) that every prompt ends with, under "Project conventions": the checks to run, the generated files to refresh, how to bring main in. A missing file is a brief warning, and `armada doctor` checks it.
87
- - **Workers need no key.** When the coordinator is signed in to an Armada that keeps the organization's keys, the brief asks it for a launch token: one ticket, used once, valid one hour. The worker exchanges it for a session limited to its ticket's `claim`, `report`, `ask` and `release`, and Armada gives each of those commands its keys. The `Launch:` line says whether the prompt carries one, and when there is none, why (not signed in, or an Armada without accounts or keys). Only `--prompt` prints the token; the full brief and `--json` show it as `armada_launch_••••`, so it stays out of the coordinator's transcript. Make the brief right before the launch; the token is the only secret a prompt ever holds, useless once used. Merging or releasing the ticket ends the worker's session, and Organization > Workers on the dashboard revokes one.
88
+ - **Workers need no key.** When the coordinator is signed in to an Armada that keeps the organization's keys, the brief asks it for a launch token: one ticket, used once, valid one hour. The worker exchanges it for a session limited to its ticket's `claim`, `report`, `ask` and `release`, and Armada gives each of those commands its keys. The `Launch:` line says whether the prompt carries one, and when there is none, why (not signed in, or an Armada without accounts or keys). Only `--prompt` prints the token; the full brief and `--json` show it as `armada_launch_••••`, so it stays out of the coordinator's transcript. Make the brief right before the launch; the token is the only secret a prompt ever holds, useless once used. The launch message is the `--prompt` output only: a worker given the masked token is told so by `armada login`.
89
+ - **A version npm serves.** The brief pins the coordinator's Armada version, after one request to npm (3 s at most, beside the Linear reads). When npm does not serve it yet (a release still publishing, a checkout ahead of npm), the brief pins the newest published version and warns; offline, it only warns. Merging or releasing the ticket ends the worker's session, and Organization > Workers on the dashboard revokes one.
88
90
  - The settings give the profile's agent, model and effort from `[conductor]` in `armada.toml`, and the environment variables: `ARMADA_TICKET=<ticket>`, and, only without a launch token, `LINEAR_API_KEY` (required). Each shows whether this shell has it. No value is ever printed.
89
91
  - A profile with `runtime = "claude-code"` routes the launch to the `armada-runtime-claude-code` skill: the `Runtime:` line names the skill, the claim runs `--runtime claude-code` with the subagent's name as its handle (the ticket id in lowercase), and the prompt first makes the worker check it runs in its own worktree. The Agent tool applies no effort; the brief says so.
90
92
  - The profile follows the ticket's Linear labels: the first `[[conductor.routing]]` rule with a label the ticket carries (case, spaces and punctuation ignored), else `conductor.default_profile`, else the only profile. The settings say which rule chose it.
@@ -129,7 +131,7 @@ armada answer --note ABC-12 "main moved: bring it in before you ship" # an unso
129
131
 
130
132
  - `ask` reports the `blocked` phase with `Agent status: blocked — question: <first line>` (the rest and the numbered options below it) and adds a `question` item to the coordinator's inbox on Armada. The worker then stops and waits for the answer in its session, and reports the phase it resumes. It finds the ticket like `report`.
131
133
  - `report awaiting-approval` adds a `plan` item with the full message (and the `--plan` block) and worker handle to the coordinator's inbox. Same-phase heartbeats neither duplicate nor reopen it. Answering it, recording a note, leaving the phase or releasing the ticket closes the plan and any pending approval request. For a pre-approved plan (the brief's "Plan" line says which), post the plan with `report implementing --plan-file -` instead: no approval item is needed.
132
- - `inbox` lists the coordinator's open items (questions, plans, requests, hand-backs) and silent workers, oldest first. A worker is silent when it holds a ticket, its newest event is older than `policy.silence_minutes`, and its phase does not wait on someone else. It reads Armada only (a sign-in, no Linear key) and records that the coordinator is at work, for the dashboard. `--wait` asks Armada every 15 s until `--timeout`; Armada answers "not modified" (HTTP 304, no body) while the inbox holds the same entries, so a waiting coordinator costs one short request per ask and holds nothing open. It marks the items that were not there before with `*`; loop on it.
134
+ - `inbox` lists the coordinator's open items (questions, plans, requests, hand-backs), silent workers and workers that never started, oldest first. A worker never started (`not-started`) was launched with a launch token and has not claimed its ticket after `policy.not_started_minutes`; the entry says whether the token was never used or used without a claim, names the worker's session when its sign-in gave one, and clears on the claim, when the launch ends (release, merge, revoke) or when a newer launch of the ticket replaces it. A launch on a ticket a session still holds is not followed (a brief made to read a running worker's prompt again launches nobody; a relaunch releases the old claim first). A launched worker counts as in flight from its launch until it shows as not started, so `armada watch` waits for its claim; past that, its entry carries it. A worker is silent when it holds a ticket, its newest event is older than `policy.silence_minutes`, and its phase does not wait on someone else. It reads Armada only (a sign-in, no Linear key) and records that the coordinator is at work, for the dashboard. `--wait` asks Armada every 15 s until `--timeout`; Armada answers "not modified" (HTTP 304, no body) while the inbox holds the same entries, so a waiting coordinator costs one short request per ask and holds nothing open. It marks the items that were not there before with `*`; loop on it. A hand-back handed back again on a new head (or a plan rewritten in place) counts as new.
133
135
  - `watch` is how a coordinator keeps listening, run in the background while a worker is in flight. It asks Armada like `inbox --wait` (every 15 s, every 60 s when no worker is in flight, 304 while nothing changed) with no time limit of its own, and exits as soon as something needs the coordinator that it has not been shown yet by `inbox` or `watch` on this machine: it prints the inbox, new items marked `*`. It exits with "nothing to watch" when no worker is in flight and nothing is open. Armada unreachable or answering 5xx only prints a warning and it keeps going, waiting longer each time; a refusal (signed out) ends it. One watch per project and machine: a second one says the first is running. Its state (a lock, the entries shown, the tickets in flight at the last read, the checkout it ran in) lives in `~/.config/armada/watch/`, no secret.
134
136
  - The last line of `inbox`, `watch`, `merge` and `brief` (not `brief --prompt`) says whether to start watching again, for example `2 workers in flight (ABC-1, ABC-2) — keep watching: armada watch`; with `--json`, the same is the `watch` field.
135
137
  - `armada hook stop` is the Claude Code Stop hook `armada init` adds to `.claude/settings.json` (it asks; `--no-stop-hook` leaves it out; `armada doctor` shows it). It reads only armada.toml and the watch state, so it answers at once without the network. It refuses to end the turn, and tells the agent to start `armada watch` in the background, only in the checkout where `armada watch` ran (never a worker's), while the last read had workers in flight and no watch runs. A watch that ended on a refusal lets the turn end, and `ARMADA_STOP_HOOK=off` turns the hook off.
@@ -163,7 +165,7 @@ armada merge 35 --no-ticket # a pull request no ticket owns: armada init's, a re
163
165
 
164
166
  `packages/dashboard` is a Next.js app whose main page is the Fleet of the projects registered in its database. With accounts, each person sees the projects of their organization; under the shared password, every project.
165
167
 
166
- - **Waiting for you** comes first, across projects. It lists questions, blocked workers, plans to approve, hand-backs and silent workers, the most urgent first.
168
+ - **Waiting for you** comes first, across projects. It lists questions, blocked workers, plans to approve, hand-backs, workers launched that never started and silent workers, the most urgent first.
167
169
  - **At work** has one row per ticket in flight. A row shows the project, the runtime and session, the six-step phase pipeline, time in phase, the last report, the pull request with its CI, and the flags (red CI, conflict, double claim).
168
170
  - A filter shows one project. Each project shows whether its coordinator is active, from its last inbox read.
169
171
  - **Answer** a question from its line in Waiting for you (an option of the question fills the answer in). **Ready to launch** lists the frontier with a Launch button and a profile picker, the routed profile preselected. Neither reaches a worker: each becomes a request in that project's coordinator inbox, signed with the signed-in person's name and address (with accounts) or with the name the viewer gives (under the shared password; remembered in a cookie, default `ARMADA_DASHBOARD_AUTHOR`), and shows as pending until the coordinator carries it out. The dashboard holds no runtime credential.
@@ -389,6 +391,7 @@ local_commands = ["npm ci", "npm test"] # run by `armada merge` on a test merge
389
391
  [policy]
390
392
  silence_minutes = 15 # a worker with no report for longer is flagged silent (default 15)
391
393
  coordinator_minutes = 10 # an inbox item open longer shows "waiting for the coordinator" (default 10)
394
+ not_started_minutes = 10 # a launched worker that has not claimed after this long shows as not started (default 10; a CLI older than this setting refuses it)
392
395
  plans = "approve" # or "pre-approved": workers post their plan and go on (default "approve")
393
396
  pre_approved_label = "plan-approved" # a ticket with this label is pre-approved (default)
394
397
  approval_label = "needs-plan-approval" # a ticket with this label waits for approval; wins over the other (default)
package/dist/armada.js CHANGED
@@ -319,6 +319,12 @@ var CHANGED_COMMENTS_QUERY = `
319
319
  }`;
320
320
 
321
321
  // ../core/src/armada-api.ts
322
+ var MASKED_LAUNCH_TOKEN = "armada_launch_••••";
323
+ var isMaskedLaunchToken = (token) => token.includes("•");
324
+ var MASKED_LAUNCH_TOKEN_REFUSAL = {
325
+ error: "this is the masked token from `armada brief`'s human view, not a launch token",
326
+ next: "ask the coordinator for the `armada brief <ticket> --prompt` text: only it carries the token"
327
+ };
322
328
  var displayCode = (code) => code.length === 8 ? `${code.slice(0, 4)}-${code.slice(4)}` : code;
323
329
  var CLI_PACKAGE = "@the-vibe-company/armada";
324
330
  var CLI_VERSION_HEADER = "x-armada-cli-version";
@@ -567,8 +573,10 @@ function armadaApi(opts) {
567
573
  throw new ArmadaApiError(`Armada (${host}) answered the launch token in a shape this CLI does not know`);
568
574
  return body;
569
575
  },
570
- async exchangeLaunchToken(token) {
571
- const { status, body } = await call("POST", "launch-tokens/exchange", { body: { token } });
576
+ async exchangeLaunchToken(token, handle = null) {
577
+ const { status, body } = await call("POST", "launch-tokens/exchange", {
578
+ body: handle ? { token, handle } : { token }
579
+ });
572
580
  if (status !== 200)
573
581
  throw refusal(status, body, null);
574
582
  const w = body.worker;
@@ -1905,6 +1913,7 @@ var CONFIG_DEFAULTS = {
1905
1913
  runtimes: ["Claude Code", "Codex", "Conductor"],
1906
1914
  silentAfterMinutes: 15,
1907
1915
  coordinatorMinutes: 10,
1916
+ notStartedMinutes: 10,
1908
1917
  plans: "approve",
1909
1918
  preApprovedLabel: "plan-approved",
1910
1919
  approvalLabel: "needs-plan-approval"
@@ -2019,6 +2028,7 @@ function parseConfig(text, source = CONFIG_FILE) {
2019
2028
  "silence_minutes",
2020
2029
  "silent_after_minutes",
2021
2030
  "coordinator_minutes",
2031
+ "not_started_minutes",
2022
2032
  "plans",
2023
2033
  "pre_approved_label",
2024
2034
  "approval_label"
@@ -2116,6 +2126,14 @@ function parseConfig(text, source = CONFIG_FILE) {
2116
2126
  else
2117
2127
  problems.push(`"policy.coordinator_minutes" must be a positive number`);
2118
2128
  }
2129
+ let notStartedMinutes = CONFIG_DEFAULTS.notStartedMinutes;
2130
+ if (policyT.not_started_minutes !== undefined) {
2131
+ const v = policyT.not_started_minutes;
2132
+ if (typeof v === "number" && Number.isFinite(v) && v > 0)
2133
+ notStartedMinutes = v;
2134
+ else
2135
+ problems.push(`"policy.not_started_minutes" must be a positive number`);
2136
+ }
2119
2137
  let plans = CONFIG_DEFAULTS.plans;
2120
2138
  if (policyT.plans !== undefined) {
2121
2139
  const v = policyT.plans;
@@ -2182,7 +2200,7 @@ function parseConfig(text, source = CONFIG_FILE) {
2182
2200
  repository: str(github, "github", "repository", { pattern: REPOSITORY, hint: "owner/name" })
2183
2201
  },
2184
2202
  gates: { requiredChecks, localCommands },
2185
- policy: { silentAfterMinutes, coordinatorMinutes, plans, preApprovedLabel, approvalLabel },
2203
+ policy: { silentAfterMinutes, coordinatorMinutes, notStartedMinutes, plans, preApprovedLabel, approvalLabel },
2186
2204
  brief: { extra },
2187
2205
  secrets: { names: secretNames },
2188
2206
  conductor: { defaultProfile, profiles, routing }
@@ -2220,6 +2238,7 @@ repository = ${q(p.repository)}
2220
2238
  [policy]
2221
2239
  silence_minutes = 15 # a worker with no report for longer than this shows as silent
2222
2240
  coordinator_minutes = 10 # an inbox item open longer than this shows "waiting for the coordinator"
2241
+ # not_started_minutes = 10 # a launched worker that has not claimed after this long shows as not started
2223
2242
  # plans = "approve" # or "pre-approved": workers post their plan and go on without waiting
2224
2243
  # pre_approved_label = "plan-approved" # a ticket with this label skips the approval
2225
2244
  # approval_label = "needs-plan-approval" # a ticket with this label waits for it; wins over the other
@@ -2753,6 +2772,27 @@ async function releaseTicket(ctx, input) {
2753
2772
 
2754
2773
  // ../core/src/brief.ts
2755
2774
  var ARMADA_PACKAGE = "@the-vibe-company/armada";
2775
+ var NPM_REGISTRY_URL = `https://registry.npmjs.org/${ARMADA_PACKAGE.replace("/", "%2f")}`;
2776
+ var NPM_CHECK_MS = 3000;
2777
+ async function checkPublished(version, fetch2, timeoutMs = NPM_CHECK_MS) {
2778
+ try {
2779
+ const res = await fetch2(NPM_REGISTRY_URL, {
2780
+ headers: { accept: "application/vnd.npm.install-v1+json" },
2781
+ signal: AbortSignal.timeout(timeoutMs)
2782
+ });
2783
+ if (!res.ok)
2784
+ return { state: "unknown", reason: `npm answered HTTP ${res.status}` };
2785
+ const versions = Object.keys((await res.json()).versions ?? {});
2786
+ if (!versions.length)
2787
+ return { state: "unknown", reason: "npm listed no version" };
2788
+ if (versions.includes(version))
2789
+ return { state: "published" };
2790
+ const older = versions.filter((v) => !v.includes("-") && compareVersions(v, version) < 0).sort(compareVersions);
2791
+ return { state: "missing", newest: older.at(-1) ?? null };
2792
+ } catch (err) {
2793
+ return { state: "unknown", reason: networkReason(err, timeoutMs) };
2794
+ }
2795
+ }
2756
2796
  var WORKER_SKILL_PATH = ".agents/skills/armada-worker/SKILL.md";
2757
2797
  var CONDUCTOR_HANDLE = '"$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID"';
2758
2798
  var subagentName = (ticket) => ticket.toLowerCase();
@@ -2876,7 +2916,8 @@ function buildBrief(input) {
2876
2916
  branch: l.claim?.branch ?? null,
2877
2917
  pr: l.pr?.url ?? null
2878
2918
  }));
2879
- const pkg = `${ARMADA_PACKAGE}@${input.version}`;
2919
+ const pinned = npmPin(input.version, input.npm ?? null, warnings);
2920
+ const pkg = `${ARMADA_PACKAGE}@${pinned}`;
2880
2921
  const branch = ticket.branchName;
2881
2922
  const runtime = choice?.profile.runtime ?? "conductor";
2882
2923
  const handle = runtime === "claude-code" ? subagentName(ticket.id) : CONDUCTOR_HANDLE;
@@ -2926,6 +2967,7 @@ function buildBrief(input) {
2926
2967
  profile: choice ? { name: choice.name, ...choice.profile } : null,
2927
2968
  routing: choice ? { source: choice.source, rule: choice.rule, routed: choice.routed, reason: choice.reason, why: choice.why } : null,
2928
2969
  repository: { name: config.github.repository, url: `https://github.com/${config.github.repository}` },
2970
+ armadaVersion: { pinned, coordinator: input.version },
2929
2971
  install: `npm install -g ${pkg}`,
2930
2972
  fallback: `npm exec --yes --package=${pkg} -- armada`,
2931
2973
  claimCommand,
@@ -2946,6 +2988,20 @@ function buildBrief(input) {
2946
2988
  warnings.push(`${ticket.id} has ${ticket.notes.length} comments; the brief carries the newest ${MAX_NOTES}`);
2947
2989
  return { ...brief, prompt: renderPrompt(brief) };
2948
2990
  }
2991
+ function npmPin(version, npm, warnings) {
2992
+ if (!npm || npm.state === "published")
2993
+ return version;
2994
+ if (npm.state === "unknown") {
2995
+ warnings.push(`could not check that armada ${version} is on npm (${npm.reason}); if it is not published yet, the worker's install fails`);
2996
+ return version;
2997
+ }
2998
+ if (!npm.newest) {
2999
+ warnings.push(`armada ${version} is not on npm, nor any older version: the worker's install and its fallback line fail until it is published`);
3000
+ return version;
3001
+ }
3002
+ warnings.push(`armada ${version} is not on npm yet: this brief pins ${npm.newest}, the newest published version. The skills of this checkout may describe commands ${npm.newest} lacks; publish ${version} (the release pull request) and brief again to launch with it`);
3003
+ return npm.newest;
3004
+ }
2949
3005
  var shellWord = (s) => /^\w[\w./:@+-]*$/.test(s) ? s : `'${s.replaceAll("'", `'\\''`)}'`;
2950
3006
  var quote = (body) => body.trim().split(`
2951
3007
  `).map((l) => l ? `> ${l}` : ">").join(`
@@ -2973,7 +3029,7 @@ function renderPrompt(b) {
2973
3029
  b.claimCommand,
2974
3030
  "```",
2975
3031
  "",
2976
- `This installs the coordinator's Armada version. If the global install is refused, use \`${b.fallback}\` wherever this brief or the skill says \`armada\`.`,
3032
+ `${b.armadaVersion.pinned === b.armadaVersion.coordinator ? "This installs the coordinator's Armada version." : `This installs Armada ${b.armadaVersion.pinned}, the newest on npm (the coordinator runs ${b.armadaVersion.coordinator}, not published yet).`} If the global install is refused, use \`${b.fallback}\` wherever this brief or the skill says \`armada\`.`,
2977
3033
  ...b.launch ? [
2978
3034
  "",
2979
3035
  `\`armada login --launch-token\` signs this workspace in to Armada as the worker of ${t.id}, with a one-time token valid until ${b.launch.expiresAt.slice(0, 16).replace("T", " ")} UTC. Run it first, once.`
@@ -3033,9 +3089,10 @@ async function loadBrief(config, opts) {
3033
3089
  throw new BriefError(err.message);
3034
3090
  throw err;
3035
3091
  }
3036
- const [ticket, program] = await Promise.all([
3092
+ const [ticket, program, npm] = await Promise.all([
3037
3093
  fetchBriefTicket(linear, opts.ticket),
3038
- fetchProgram({ ...linear, rootId: config.tracker.programRoot, labels: config.tracker.labels, now })
3094
+ fetchProgram({ ...linear, rootId: config.tracker.programRoot, labels: config.tracker.labels, now }),
3095
+ opts.npm?.(opts.version) ?? null
3039
3096
  ]);
3040
3097
  if (!ticket)
3041
3098
  throw new Refusal(`ticket ${opts.ticket} not found in Linear`, "armada status, to see the tickets of the program");
@@ -3052,6 +3109,7 @@ async function loadBrief(config, opts) {
3052
3109
  profile: opts.profile,
3053
3110
  reason: opts.reason ?? null,
3054
3111
  version: opts.version,
3112
+ npm,
3055
3113
  env: opts.env,
3056
3114
  ...opts.stored ? { stored: opts.stored } : {},
3057
3115
  launch: made,
@@ -3285,7 +3343,19 @@ function updateDotenv(text, updates) {
3285
3343
  ` : "";
3286
3344
  }
3287
3345
  // ../core/src/live.ts
3288
- var entryKey = (e) => e.id !== null ? `#${e.id}` : e.version ? `version:${e.version}` : `silent:${e.ticket}`;
3346
+ import { createHash } from "node:crypto";
3347
+ var LAUNCH_WINDOW_MS = 24 * 60 * 60000;
3348
+ var MIN2 = 60000;
3349
+ var REWRITTEN = ["hand-back", "plan"];
3350
+ var digest = (text) => createHash("sha256").update(text).digest("base64url").slice(0, 12);
3351
+ var entryKey = (e) => e.id !== null ? REWRITTEN.includes(e.kind) ? `#${e.id}@${digest(e.body)}` : `#${e.id}` : e.version ? `version:${e.version}` : `${e.kind}:${e.ticket}`;
3352
+ var hhmm = (iso) => `${iso.slice(11, 16)} UTC`;
3353
+ function notStartedBody(l, now) {
3354
+ const minutes = Math.floor((now.getTime() - Date.parse(l.launchedAt)) / MIN2);
3355
+ const why = l.tokenUsedAt ? `the worker signed in with its launch token at ${hhmm(l.tokenUsedAt)}, then stopped before \`armada claim\`` : "its launch token was never used: the worker never reached its `armada login` line (an install that failed, a prompt cut short)";
3356
+ return `launched ${minutes} min ago and never claimed; ${why}${l.handle ? ` (session ${l.handle})` : ""}. Check its session with the runtime guide's status section; launch it again with armada brief, or revoke the launch on the dashboard's Workers page`;
3357
+ }
3358
+ var notStartedLaunches = (launches, now, minutes) => launches.filter((l) => now.getTime() - Date.parse(l.launchedAt) > minutes * MIN2);
3289
3359
 
3290
3360
  // ../core/src/fleet-api.ts
3291
3361
  var WORKER_FLEET_OPS = ["claim", "report", "ask", "release"];
@@ -3293,6 +3363,7 @@ var FLEET_OPS = [
3293
3363
  ...WORKER_FLEET_OPS,
3294
3364
  "register",
3295
3365
  "events/latest",
3366
+ "launches",
3296
3367
  "inbox",
3297
3368
  "inbox/item",
3298
3369
  "inbox/ticket",
@@ -3313,6 +3384,7 @@ function fleetClient(o) {
3313
3384
  return;
3314
3385
  }),
3315
3386
  lastEventTimes: () => call("events/latest", {}),
3387
+ pendingLaunches: () => call("launches", {}),
3316
3388
  claim: (c) => call("claim", c),
3317
3389
  report: (r) => call("report", r),
3318
3390
  ask: (q) => call("ask", q),
@@ -3602,7 +3674,11 @@ async function askCoordinator(ctx, input) {
3602
3674
  var INBOX_POLL_MS = 15000;
3603
3675
  async function checkInbox(fleet, o) {
3604
3676
  const started = o.now();
3605
- const query = { coordinator: o.coordinator ?? null, silentAfterMinutes: o.silentAfterMinutes };
3677
+ const query = {
3678
+ coordinator: o.coordinator ?? null,
3679
+ silentAfterMinutes: o.silentAfterMinutes,
3680
+ ...o.notStartedMinutes !== undefined ? { notStartedMinutes: o.notStartedMinutes } : {}
3681
+ };
3606
3682
  const first = await fleet.inbox({ ...query, etag: null });
3607
3683
  if (!first)
3608
3684
  throw new Error("Armada answered the first inbox read with nothing");
@@ -3971,7 +4047,11 @@ function transientFailure(err) {
3971
4047
  return /\bunreachable\b|\bHTTP (?:5\d\d|408|429) without JSON\b/.test(err.message);
3972
4048
  }
3973
4049
  async function watchInbox(fleet, o) {
3974
- const query = { coordinator: o.coordinator, silentAfterMinutes: o.silentAfterMinutes };
4050
+ const query = {
4051
+ coordinator: o.coordinator,
4052
+ silentAfterMinutes: o.silentAfterMinutes,
4053
+ ...o.notStartedMinutes !== undefined ? { notStartedMinutes: o.notStartedMinutes } : {}
4054
+ };
3975
4055
  const pollMs = o.pollMs ?? WATCH_POLL_MS;
3976
4056
  const idlePollMs = o.idlePollMs ?? WATCH_IDLE_POLL_MS;
3977
4057
  let known = new Set(o.seen);
@@ -4994,7 +5074,7 @@ async function readProjectConfig(p, opts) {
4994
5074
  }
4995
5075
  }
4996
5076
  // ../core/src/skills.ts
4997
- import { createHash } from "node:crypto";
5077
+ import { createHash as createHash2 } from "node:crypto";
4998
5078
 
4999
5079
  // ../../skills/armada-coordinator/MERGE.md
5000
5080
  var MERGE_default = "# Merging a pull request\n\nRun `armada merge <pr>` (add `--dry-run` to see the checklist only, `--wait` when main keeps moving, `--no-ticket` for a pull request no ticket owns). It checks everything below, takes the project's merge lock, merges pinned to the handed-back SHA, confirms the merge on GitHub and closes the ticket. Its output lists the workers in flight to tell and the worker session to archive. When a refusal names a rule, fix the cause (usually: ask the worker to bring the default branch in and report again) rather than merging by hand. When you must merge by hand, follow the same steps.\n\n## Main kept moving: `--wait`\n\nWith several workers in flight, main often moves between a green hand-back and its merge. Instead of asking the worker to bring main in, run `armada merge <pr> --wait [--timeout <min>]` (30 minutes by default), in the background where your runtime allows it (Claude Code: `run_in_background`):\n\n- A head behind main that GitHub says merges cleanly is updated with GitHub's \"update branch\": a merge commit on the branch, no force-push. Squash merges make that merge commit harmless. When main does not require heads to be up to date and `[gates] local_commands` is set, it is test-merged instead, as without `--wait`, so a busy main does not restart CI each time.\n- It waits for every required check on the new head, then merges pinned to that head.\n- It holds the project's merge lock only while merging, not while waiting, so two waits never block each other. Signed in with Armada down, it refuses before touching the branch.\n- It stops at once, naming the cause, on a red check, a conflict, any other refused rule, or when GitHub refuses the update (a branch protection rule or ruleset can forbid it) or accepts it without the head moving within 3 minutes: ask the worker to fix it. A refusal after an update says so: the worker pulls the updated branch before pushing again.\n- The updated head still counts as the worker's hand-back, because the only change is main coming in: `armada merge` accepts a head that is the handed-back SHA followed only by merge commits, each bringing in a commit of main, with the tree of a clean merge (checked with git). That holds without `--wait` too, for example after \"Update branch\" on GitHub. The ticket's merged comment names both heads: `head <new>, the handed-back <old> updated with main`.\n\n## No ticket: `--no-ticket`\n\n`armada merge <pr> --no-ticket` merges a pull request no ticket owns: the `armada init` pull request (its output names the command) or the release pull request below. There is no hand-back and nothing is written to Linear; every other check is unchanged, and the merge is pinned to the head it checked. It refuses a branch that names a ticket of the program: that one is merged on its worker's hand-back.\n\nWhen none of the required checks ran on the head (a release pull request opened with the workflow's own token gets no CI run), it passes with a note, on GitHub's own state (`UNSTABLE` included, when nothing failed) and the checks that did run, once the head is a minute old; a younger head, or a head this run updated (its update starts CI), is waited for (`--wait`) or refused.\n\n## Before\n\n1. The worker has handed back: `Agent phase` is `ready-to-merge` and you have the full 40-character head SHA it reported.\n2. `gh pr view <n> --json headRefOid,mergeStateStatus,isDraft,title` shows that SHA (or that SHA with only main merged in), `CLEAN` (or `HAS_HOOKS`), not a draft, and a Commitizen title.\n3. `gh pr checks <n>` shows every required check passing.\n4. The head contains the current default branch: `git merge-base --is-ancestor origin/<default> <sha>`. If not, update it (`--wait`) or ask the worker to bring the default branch in (rebase, or merge it into their branch; never force-push a branch someone else pushed to).\n5. Semantic check: search the default branch for callers of anything the pull request deletes or renames.\n\n## Merge\n\n```sh\ngh pr merge <n> --squash --match-head-commit <full-sha>\n```\n\n- One merge at a time: `armada merge` holds the project's merge lock. If it refuses because Armada is down, use `--no-lock` only when you are sure no other coordinator merges in the project.\n- Leave out `--delete-branch`: it deletes local worktrees that have the branch checked out, including other agents'. Delete the branch once its worktree is gone.\n- If GitHub answers with a 5xx, check `gh pr view <n> --json state` before retrying.\n\n## After\n\n1. The ticket is Done, its `Agent phase` and `Agent runtime` labels removed, the pull request linked.\n2. Tell every in-flight worker what the merge changes for them: a shared file, a migration, a new check, code they must now reuse or delete.\n3. Archive the merged worker's workspace with the \"Stop and archive\" section of its runtime guide.\n4. Launch the tickets this merge unblocked.\n\n## The release pull request\n\nSome repositories publish through release-please: every merge to the default branch opens or updates one release pull request, and merging it tags the version and publishes it. When the repository's rules (`AGENTS.md`) say to merge it after each merge, do it right after the ticket's merge, without a hand-back: no worker owns it.\n\n- **What it looks like.** Title `chore(main): release <version>`, opened by `github-actions`, label `autorelease: pending`, and a diff that only touches the changelog, the manifest and version fields. It is opened with the workflow's own token, so **no CI check runs on it** (only checks from apps such as Vercel, if any) and `mergeStateStatus` is often `UNSTABLE` (`armada merge --no-ticket` accepts it when none of the required checks ran and nothing failed). Both are expected: the publish job runs the repository's checks again before publishing. Anything else in the diff, or a `DIRTY` state, is not expected: stop and tell the owner.\n- **Find it and its head:**\n\n```sh\ngh pr list --state open --label \"autorelease: pending\" --json number,title,headRefOid,mergeStateStatus\n```\n\n- **Merge it** with `armada merge <n> --no-ticket`: no ticket owns it, and no required check runs on it (see \"No ticket\" above). By hand, pin it to that head, like any merge, and without `--delete-branch`:\n\n```sh\ngh pr merge <n> --squash --match-head-commit <full-sha>\n```\n\n- **Check the publish.** After a minute or two the new version is on the registry, for example `npm view <package> version` for an npm package (the package is named in `AGENTS.md` or the release workflow). If it is not, open the Release run (`gh run list --workflow release.yml --limit 3`), fix the cause and re-run its failed jobs: a later push does not publish a version already tagged.\n- Release-please updates the same pull request on each merge to the default branch; one release pull request can carry several merges.\n";
@@ -5031,11 +5111,11 @@ A coordinator may start cold, on a laptop or in a fresh cloud session, with noth
5031
5111
  - \`answer-request\` (it names the question or plan it answers, \`answers #<id>\`): deliver its text in the worker's session with the runtime guide's *message* section, as the owner's answer or plan approval, then \`armada answer <request id> "<the text you delivered>"\`. That resolves the request and its question or plan, and the ticket names who answered. If the item is gone (the worker was released or changed phase), \`armada answer <request id> "<why>"\` closes it.
5032
5112
  - \`launch-request\` (it names the profile the owner chose): launch the ticket as in step 5, with that profile. When it differs from the routed one, the request's body gives the \`--profile\` and \`--reason\` to pass to \`armada brief\` and to the worker's claim. The worker's \`armada claim\` resolves the request and posts who asked. If the ticket must not start (it collides with work in flight, or its plan changed), decline it: \`armada answer <request id> "<why>"\`, and tell the owner in your report.
5033
5113
  Done when the inbox shows no open request.
5034
- 4. **Check silent workers** with the runtime guide's *status* section. A worker that is still working gets a nudge to report; a worker that died is relaunched or its ticket released.
5114
+ 4. **Check silent workers and workers that never started** with the runtime guide's *status* section. A worker that is still working gets a nudge to report; a worker that died is relaunched or its ticket released. A \`not-started\` entry is a worker launched that has not claimed after \`[policy] not_started_minutes\` (10 by default); it says whether the worker never used its launch token (it never reached its \`armada login\` line: an install that failed, a prompt cut short) or signed in and stopped before its claim. Read its session: a worker stuck on a setup choice gets a message to take the safe option and go on; one that is gone is launched again with a new brief, or its launch revoked on the dashboard's Workers page. The entry clears on the claim.
5035
5115
  5. **Launch ready tickets** that do not collide with work in flight, one at a time:
5036
5116
  - pick the ticket from the frontier in \`armada status\`;
5037
5117
  - run \`armada brief <ticket>\` and resolve its warnings. The profile (agent, model, effort) is routed from the ticket's labels by \`[[conductor.routing]]\` in \`armada.toml\`, else \`default_profile\`, and the brief says which rule chose it. Follow it. Override it only when the ticket's labels mislead (for example a \`web\` ticket that is really a tricky back-end bug): \`armada brief <ticket> --profile <name> --reason "<why>"\`. The reason lands in the worker's claim comment;
5038
- - write the prompt with \`armada brief <ticket> --prompt > <file>\` and add what only you know: which parallel workers touch neighbouring code and where the boundary is, and decisions not yet on the ticket. The brief already says whether the plan needs approval (\`[policy] plans\`, or the ticket's label) and ends with the project's conventions (\`[brief] extra\`): put a note every worker needs in that file, not in each prompt;
5118
+ - write the prompt with \`armada brief <ticket> --prompt > <file>\`. **The launch message is that \`--prompt\` output, never text cut from the human view or \`--json\`**: those show the token masked as \`armada_launch_••••\`, which signs nobody in. Add what only you know: which parallel workers touch neighbouring code and where the boundary is, and decisions not yet on the ticket. The brief already says whether the plan needs approval (\`[policy] plans\`, or the ticket's label) and ends with the project's conventions (\`[brief] extra\`): put a note every worker needs in that file, not in each prompt;
5039
5119
  - launch it with the runtime guide's *launch* section, passing the profile's values. When the brief's \`Launch:\` line says the prompt carries a one-time token, pass no key: the worker signs in with it. When it says there is none, fix the reason (usually your sign-in) and brief again, rather than pass keys; the token works once, within the hour, so brief right before the launch;
5040
5120
  - check the claim: \`armada status\` shows the ticket in flight, phase \`planning\`, with the handle the runtime returned. Done when every launched ticket is In Progress with a claim.
5041
5121
  6. **Merge handed-back pull requests** one at a time with \`armada merge <pr>\` (\`--wait\` when main moved since the hand-back, \`--no-ticket\` for a pull request no ticket owns), following [MERGE.md](MERGE.md). Done when the pull request is merged, the ticket is Done with its agent labels removed, and every in-flight worker affected by what landed has been told. When the repository's rules (\`AGENTS.md\`) ask you to ship each merge through its release pull request (release-please's \`chore(main): release …\`), merge that one next, as "The release pull request" in [MERGE.md](MERGE.md) describes.
@@ -5046,7 +5126,7 @@ Repeat from step 1.
5046
5126
 
5047
5127
  ## Keep watching
5048
5128
 
5049
- You only learn of something new when a command you run ends. So while a worker is in flight, always have exactly one \`armada watch\` running, in the background (in Claude Code, a Bash command with \`run_in_background\`; in another runtime, its own way of running a command in the background). It waits until something needs you (a question, a plan, a request, a hand-back or a silent worker you have not been shown yet), prints it and exits, and you are woken. Armada being down or a command time limit does not end it, and it tells the dashboard you are at work.
5129
+ You only learn of something new when a command you run ends. So while a worker is in flight, always have exactly one \`armada watch\` running, in the background (in Claude Code, a Bash command with \`run_in_background\`; in another runtime, its own way of running a command in the background). It waits until something needs you (a question, a plan, a request, a hand-back, a silent worker or one that never started, you have not been shown yet), prints it and exits, and you are woken. Armada being down or a command time limit does not end it, and it tells the dashboard you are at work.
5050
5130
 
5051
5131
  - Start it as soon as a worker is in flight, and start it again right after acting on what it returned. Never end your turn with a worker in flight and no watch running: that is how a hand-back sits unmerged.
5052
5132
  - The last line of \`armada inbox\`, \`armada watch\`, \`armada merge\` and \`armada brief\` says whether to: \`2 workers in flight (ABC-1, ABC-2) — keep watching: armada watch\`, \`armada watch is already running (pid …)\`, or \`nothing to watch\`. Follow it. A second \`armada watch\` on the same project only says the first one is running.
@@ -5083,7 +5163,7 @@ Armada never calls a runtime. This guide tells a coordinator running inside Clau
5083
5163
  1. Pick a ready ticket from \`armada status\` that does not collide with work in flight.
5084
5164
  2. Run \`armada brief ABC-12\` (with \`--profile <name> --reason "<why>"\` when you override the routed profile), right before the launch. Its \`Runtime:\` line must say \`claude-code\`: the profile has \`runtime = "claude-code"\` in \`armada.toml\`. Read the profile (model), the \`Launch:\` line and the warnings, and resolve every warning first. The profile's effort is not applied by the Agent tool; a worker that needs a set effort goes to Conductor.
5085
5165
  - \`Launch: one-time token in the prompt\` is the normal case. \`Launch: no launch token (…)\` says why: usually \`armada login\`, then brief again.
5086
- 3. Read the prompt: \`armada brief ABC-12 --prompt\`. The token in it works once, within the hour: brief again when that hour has passed before the launch. Add what only you know (the boundary with a parallel worker, a decision not yet on the ticket) at the end.
5166
+ 3. Read the prompt: \`armada brief ABC-12 --prompt\`. **The launch message is that \`--prompt\` output, and only it**: the human view and \`--json\` mask the token as \`armada_launch_••••\`, which signs nobody in. The token in it works once, within the hour: brief again when that hour has passed before the launch. Add what only you know (the boundary with a parallel worker, a decision not yet on the ticket) at the end.
5087
5167
  4. Launch with the Agent tool, every value set:
5088
5168
 
5089
5169
  \`\`\`json
@@ -5104,7 +5184,7 @@ Armada never calls a runtime. This guide tells a coordinator running inside Clau
5104
5184
  - The result gives the \`agentId\` and an \`output_file\`: the worker's transcript (JSONL). Keep both. Never read that file whole: it is the entire conversation (Status section).
5105
5185
  - \`.claude/worktrees/\` appears as untracked in your own checkout: never commit it (add it to \`.gitignore\`).
5106
5186
 
5107
- 5. **Check the claim.** Within a few minutes, \`armada status\` lists the ticket in flight, phase \`planning\`, runtime \`Claude Code\`, and the claim comment reads \`session: abc-12\` and \`profile: <name>\`. No claim: read the transcript (Status section). A worker whose launch token was refused needs a new one: brief again and message it only the \`armada login --launch-token …\` line of the new prompt. A worker cut off from Armada was revoked on the dashboard or left idle for three days: ask the owner before you give it a new token.
5187
+ 5. **Check the claim.** Within a few minutes, \`armada status\` lists the ticket in flight, phase \`planning\`, runtime \`Claude Code\`, and the claim comment reads \`session: abc-12\` and \`profile: <name>\`. No claim after \`[policy] not_started_minutes\` (ten by default): \`armada watch\` and \`armada inbox\` show a \`not-started\` entry saying whether the worker never used its token or signed in and stopped. Read the transcript (Status section). A worker whose launch token was refused needs a new one: brief again and message it only the \`armada login --launch-token …\` line of the new \`--prompt\` output. A worker cut off from Armada was revoked on the dashboard or left idle for three days: ask the owner before you give it a new token.
5108
5188
 
5109
5189
  ## Message
5110
5190
 
@@ -5174,7 +5254,7 @@ A subagent launched without \`isolation: "worktree"\` runs in your checkout. The
5174
5254
  `;
5175
5255
 
5176
5256
  // ../../skills/armada-runtime-conductor/SKILL.md
5177
- var SKILL_default3 = "---\nname: armada-runtime-conductor\ndescription: Runtime guide for running Armada workers on Conductor Cloud. Use when an Armada coordinator must launch a worker on a ticket, send it a message, check whether a silent worker is still alive, or stop and archive it. Four fixed sections, each with the exact conductor command and how to read its output.\n---\n\nArmada never calls a runtime. This guide tells the coordinator how to launch, message, check and stop a worker with the `conductor` command line tool, and what to record in Armada afterwards. It was checked against `conductor` 0.89.x (the desktop app's CLI, macOS) and 0.1.x (the CLI inside a Conductor Cloud workspace, Linux); every command below works in both. `conductor --version` prints yours; if a flag is refused, compare with `conductor <command> --help`.\n\n- On a Mac, the app ships the CLI at `/Applications/Conductor.app/Contents/Resources/bin/conductor`, which is not on PATH. `armada doctor` looks for it and prints the fix: a link from a directory already on PATH (`ln -s \"/Applications/Conductor.app/Contents/Resources/bin/conductor\" ~/.local/bin/conductor`), or a PATH line for your shell profile.\n- Always pass `--json` and read fields with `jq`. Exit codes: 0 ok, 1 runtime error, 2 usage error, 3 authentication, 4 server error.\n- On exit code 3, `conductor auth whoami` checks the token the CLI uses (it exits 0 when the token works). Do not rely on `conductor auth status`: it only looks for a macOS Keychain entry and fails on Linux (\"Keychain storage is only supported on macOS\"). In a Conductor Cloud workspace the CLI reads `CONDUCTOR_API_KEY` from the environment and needs no login; on a Mac, `conductor auth login` stores a token in the Keychain.\n- A worker is one workspace with one session. Its Armada handle is `<workspaceId>/<sessionId>`; the worker's claim comment carries it, so `armada status` and the ticket always lead back to the session.\n- A worker needs no key in its workspace: the prompt of `armada brief` carries a one-time launch token, and the worker's first command exchanges it for a session limited to its ticket, through which Armada gives each command its keys. The token works once, within the hour, so a copy left in a transcript is useless once used.\n- Never type a secret value into a command, a file or a message: name the variable and let your shell expand it. The expanded value is still in the `conductor` process's arguments while it runs, so launch from a machine only you use.\n\n## Launch\n\n1. Pick a ready ticket from `armada status` that does not collide with work in flight.\n2. Run `armada brief ABC-12` (with `--profile <name> --reason \"<why>\"` when you override the routed profile), right before the launch. Read the profile (agent, model, effort, fast mode), the `Launch:` line and the warnings. Resolve every warning first: an open blocker, a ticket already in flight.\n - `Launch: one-time token in the prompt` is the normal case: the worker signs in to Armada with it and fetches its own keys. Its workspace receives no key at all. This view and `--json` show the token as `armada_launch_••••`; only `--prompt` prints it.\n - `Launch: no launch token (…)` says why. Not signed in: `armada login` (a headless coordinator sets `ARMADA_API_KEY`), then brief again; `armada doctor` checks the sign-in. Launch with keys (step 4, second block) only on an Armada that keeps no keys yet (no accounts or no vault: a self-hosted one, CI, or before the owner's switch to the Keys page).\n3. Write the prompt to a file only you can read, and add what only you know (the boundary with a parallel worker, a decision not yet on the ticket). The token in it works once, within the hour: brief again when that hour has passed before the launch.\n\n```sh\n(umask 077; armada brief ABC-12 --prompt > /tmp/abc-12-brief.md)\n```\n\n4. Create the workspace with every value from the profile. Never leave the agent, model or effort to Conductor's defaults. Add `--fast-mode` when the profile says fast mode. Run the whole block as one command: shell state does not carry over between separate calls.\n\n```sh\nconductor --json workspace create \\\n --repo-url https://github.com/<owner>/<name> \\\n --branch main \\\n --name \"ABC-12 <short title>\" \\\n --agent claude --model opus-5-5-1m --effort high \\\n --message-file - \\\n --env ARMADA_TICKET=ABC-12 \\\n < /tmp/abc-12-brief.md > /tmp/abc-12-launch.json\nrm -f /tmp/abc-12-brief.md\njq -r '\"\\(.workspaceId)/\\(.sessionId)\"' /tmp/abc-12-launch.json\n```\n\nWithout a launch token (an Armada that keeps no keys), pass the keys the brief's environment table marks `required`, from your shell or from Armada's credentials file (`in credentials file`: the `set -a` line loads it without printing it; drop it when every variable is set in your shell). The subshell keeps the keys out of the rest of your session. Without a launch token the worker is not signed in to Armada: its claims and reports reach Linear only, with a warning. When Conductor's organization environment still holds the keys, every workspace already has them: use the first block.\n\n```sh\n(\n set -a; . \"${XDG_CONFIG_HOME:-$HOME/.config}/armada/credentials\"; set +a\n [ -n \"$LINEAR_API_KEY\" ] || { echo \"LINEAR_API_KEY is missing\" >&2; exit 1; }\n conductor --json workspace create \\\n --repo-url https://github.com/<owner>/<name> \\\n --branch main \\\n --name \"ABC-12 <short title>\" \\\n --agent claude --model opus-5-5-1m --effort high \\\n --message-file - \\\n --env ARMADA_TICKET=ABC-12 \\\n --env LINEAR_API_KEY=\"$LINEAR_API_KEY\" \\\n < /tmp/abc-12-brief.md > /tmp/abc-12-launch.json\n)\nrm -f /tmp/abc-12-brief.md\n```\n\n- `--branch` is the base branch (the default branch). Conductor creates a branch named `conductor/<slug of --name>`; the brief tells the worker to rename it to the ticket's branch.\n- The output has `workspaceId`, `sessionId`, `deepLink` and `initialMessage` (`messageId`, `state: \"queued\"`). Keep the handle the `jq` line prints, and give the owner the `deepLink` when they want to watch.\n- Conductor sets `CONDUCTOR_WORKSPACE_ID` and `CONDUCTOR_SESSION_ID` inside the workspace, and signs `gh` in for the worker's pushes. The brief's first commands install your Armada version (`npm install -g`), sign in with the launch token (`armada login --launch-token`) and claim the ticket. `--env` values are not shown back by `workspace get`.\n- Keys in Conductor's organization environment reach every workspace, workers included: once Armada keeps the organization's keys, they belong on Armada's Keys page, not there.\n- An unknown agent, model or effort fails the command. Check the ids with `conductor model` (each agent's models, efforts and defaults) and fix the profile in `armada.toml`.\n\n5. **Check the claim.** Within a few minutes, `armada status` lists the ticket in flight, phase `planning`, runtime `Conductor`, and the ticket's claim comment reads `session: <workspaceId>/<sessionId>` and `profile: <name>`. No claim after ten minutes: read the transcript (Status section). A worker whose launch token was refused (already used, or more than an hour old) needs a new one: `armada brief ABC-12 --prompt` again, and message it only the `armada login --launch-token …` line of the new prompt (Message section). A worker cut off from Armada was revoked on the dashboard (Organization > Workers says by whom) or left idle for three days: ask the owner before you give a revoked worker a new token. If the worker cannot claim for another reason, fix the cause and message it; as a last resort record the handle yourself with `armada claim ABC-12 --runtime conductor --handle <workspaceId>/<sessionId> --profile <name>`, adding the brief's `--reason` for an override.\n\n## Message\n\n```sh\nprintf '%s\\n' \"Plan approved. Go on.\" | conductor --json message create --session <sessionId> --message-file -\nconductor --json message create --session <sessionId> --message-file - < /tmp/abc-12-answer.md\n```\n\nThe output is `{\"messageId\": …, \"state\": \"sent\"}`. Exit code 0 means Conductor accepted the message, not that the worker read it: check that the session turns `working`, then read its reply in the transcript. Use it to deliver an answer, a plan approval, or a heads-up that the default branch moved. Then record it in Armada: `armada answer <item> \"<answer>\"` for a question from `armada inbox`, `armada answer --note ABC-12 \"<message>\"` for a message the worker did not ask for.\n\n## Status\n\n```sh\nconductor --json session status <sessionId>\n```\n\nThe output is `{\"workspaceId\", \"sessionId\", \"status\", \"updatedAt\"}`. For a worker:\n\n- `working`: a turn is running. A silent worker that is `working` is busy (a long build or test run): leave it, and read the transcript if it stays silent past twice `policy.silence_minutes`.\n- `idle`: no turn is running. The worker finished its turn: it handed back, it waits for an answer, or it stopped without finishing. If `armada status` does not show it `ready-to-merge`, `awaiting-approval` or `blocked`, it has stopped: read its last reply, then message it to go on, or release and relaunch the ticket.\n- `error`: the last turn failed (agent or provider failure). Read the transcript and message it to resume; if it fails again, cancel, archive, release and relaunch.\n- Right after launch the session is `idle` for a few seconds while the workspace is initializing and the first message is queued; it turns `working` when the agent starts.\n\nThe workspace itself: `conductor --json workspace status <workspaceId>` gives `status` `initializing`, `ready` or `archived`.\n\n**Read the transcript** to see what a worker did or said. Events come oldest first, 100 per page; `hasMore` tells when to fetch the next page with `--after` the last event id. Keep the last id you read and poll from it.\n\n```sh\nconductor --json session message <sessionId> --limit 100 > /tmp/abc-12-events.json\njq -r '.hasMore, .data[-1].id' /tmp/abc-12-events.json\nconductor --json session message <sessionId> --after <lastEventId> --limit 100\n```\n\nThe second line prints whether more pages exist and the id to continue from. `.content.rawPayload` is the agent's own event format, so the filters depend on the worker's agent (the `agent` of its profile in `armada.toml`).\n\nA `claude` worker: each turn's final reply, then the commands and tools it ran.\n\n```sh\njq -r '.data[] | select(.content.rawPayload.type == \"result\") | .content.rawPayload | \"error=\\(.is_error)\\n\\(.result)\"' /tmp/abc-12-events.json\njq -r '.data[] | select(.content.rawPayload.type == \"assistant\") | .content.rawPayload.message.content[] | select(.type == \"tool_use\") | .input.command // .name' /tmp/abc-12-events.json\n```\n\nA `codex` worker: its events are `.content.rawPayload.event`, each item once as `item.started` and once as `item.completed`; read the completed ones. Its messages (`phase` is `commentary` along the way, `final_answer` at the end of a turn), then each command with its exit code, and its tool calls (Linear and other MCP servers).\n\n```sh\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"agentMessage\") | \"[\\(.phase)] \\(.text)\"' /tmp/abc-12-events.json\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"commandExecution\") | \"exit=\\(.exitCode) \\(.command)\"' /tmp/abc-12-events.json\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"mcpToolCall\") | \"\\(.server) \\(.tool)\"' /tmp/abc-12-events.json\n```\n\nAnother agent, or a filter that prints nothing: count the event types, look at one event of the type you need, and adapt the filter.\n\n```sh\njq -r '.data[].content.rawPayload | .type // .event.type // \"(no payload)\"' /tmp/abc-12-events.json | sort | uniq -c\n```\n\n## Stop and archive\n\n```sh\nconductor --json session cancel <sessionId>\nconductor --json workspace archive <workspaceId>\n```\n\n- `session cancel` stops the running turn: `{\"status\", \"canceledQueuedMessages\"}`, and the session is `idle` within seconds. The workspace stays; a message starts a new turn. Use it on a worker that runs the wrong thing.\n- `workspace archive` answers `{\"status\": \"archived\"}`. Archive a worker's workspace after its pull request is merged, or after `armada release --ticket ABC-12 --reason \"<why>\"` for a worker that stops without handing back. The branch and the pull request stay on GitHub.\n- **Wait for `idle` before archiving.** A hand-back often arrives while the worker's session is still `working`: `armada report ready-to-merge` runs inside its last turn, which then writes its final reply. Archive only once `session status` answers `idle`. Poll it every 15 seconds; if it is still `working` after 10 minutes, cancel the turn and archive (the transcript keeps what it was doing). Run the whole block as one command; it can take up to 10 minutes, so run it in the background or give it a longer command timeout:\n\n```sh\nfor i in $(seq 40); do\n [ \"$(conductor --json session status <sessionId> | jq -r .status)\" = working ] || break\n sleep 15\ndone\n[ \"$(conductor --json session status <sessionId> | jq -r .status)\" = working ] && conductor --json session cancel <sessionId>\nconductor --json workspace archive <workspaceId>\n```\n- After an archive, `session status` still answers `idle`; `workspace status` says `archived`.\n";
5257
+ var SKILL_default3 = "---\nname: armada-runtime-conductor\ndescription: Runtime guide for running Armada workers on Conductor Cloud. Use when an Armada coordinator must launch a worker on a ticket, send it a message, check whether a silent worker is still alive, or stop and archive it. Four fixed sections, each with the exact conductor command and how to read its output.\n---\n\nArmada never calls a runtime. This guide tells the coordinator how to launch, message, check and stop a worker with the `conductor` command line tool, and what to record in Armada afterwards. It was checked against `conductor` 0.89.x (the desktop app's CLI, macOS) and 0.1.x (the CLI inside a Conductor Cloud workspace, Linux); every command below works in both. `conductor --version` prints yours; if a flag is refused, compare with `conductor <command> --help`.\n\n- On a Mac, the app ships the CLI at `/Applications/Conductor.app/Contents/Resources/bin/conductor`, which is not on PATH. `armada doctor` looks for it and prints the fix: a link from a directory already on PATH (`ln -s \"/Applications/Conductor.app/Contents/Resources/bin/conductor\" ~/.local/bin/conductor`), or a PATH line for your shell profile.\n- Always pass `--json` and read fields with `jq`. Exit codes: 0 ok, 1 runtime error, 2 usage error, 3 authentication, 4 server error.\n- On exit code 3, `conductor auth whoami` checks the token the CLI uses (it exits 0 when the token works). Do not rely on `conductor auth status`: it only looks for a macOS Keychain entry and fails on Linux (\"Keychain storage is only supported on macOS\"). In a Conductor Cloud workspace the CLI reads `CONDUCTOR_API_KEY` from the environment and needs no login; on a Mac, `conductor auth login` stores a token in the Keychain.\n- A worker is one workspace with one session. Its Armada handle is `<workspaceId>/<sessionId>`; the worker's claim comment carries it, so `armada status` and the ticket always lead back to the session.\n- A worker needs no key in its workspace: the prompt of `armada brief` carries a one-time launch token, and the worker's first command exchanges it for a session limited to its ticket, through which Armada gives each command its keys. The token works once, within the hour, so a copy left in a transcript is useless once used.\n- Never type a secret value into a command, a file or a message: name the variable and let your shell expand it. The expanded value is still in the `conductor` process's arguments while it runs, so launch from a machine only you use.\n\n## Launch\n\n1. Pick a ready ticket from `armada status` that does not collide with work in flight.\n2. Run `armada brief ABC-12` (with `--profile <name> --reason \"<why>\"` when you override the routed profile), right before the launch. Read the profile (agent, model, effort, fast mode), the `Launch:` line and the warnings. Resolve every warning first: an open blocker, a ticket already in flight.\n - `Launch: one-time token in the prompt` is the normal case: the worker signs in to Armada with it and fetches its own keys. Its workspace receives no key at all. This view and `--json` show the token as `armada_launch_••••`; only `--prompt` prints it.\n - `Launch: no launch token (…)` says why. Not signed in: `armada login` (a headless coordinator sets `ARMADA_API_KEY`), then brief again; `armada doctor` checks the sign-in. Launch with keys (step 4, second block) only on an Armada that keeps no keys yet (no accounts or no vault: a self-hosted one, CI, or before the owner's switch to the Keys page).\n3. **The launch message is the `--prompt` output, and only it.** Never cut the prompt out of the human view of `armada brief` or its `--json`: they mask the token as `armada_launch_••••`, which signs nobody in, and the worker's `armada login` stops on it. Write the prompt to a file only you can read with `--prompt`, and add what only you know (the boundary with a parallel worker, a decision not yet on the ticket). The token in it works once, within the hour: brief again when that hour has passed before the launch.\n\n```sh\n(umask 077; armada brief ABC-12 --prompt > /tmp/abc-12-brief.md)\n```\n\n4. Create the workspace with every value from the profile. Never leave the agent, model or effort to Conductor's defaults. Add `--fast-mode` when the profile says fast mode. Run the whole block as one command: shell state does not carry over between separate calls.\n\n```sh\nconductor --json workspace create \\\n --repo-url https://github.com/<owner>/<name> \\\n --branch main \\\n --name \"ABC-12 <short title>\" \\\n --agent claude --model opus-5-5-1m --effort high \\\n --message-file - \\\n --env ARMADA_TICKET=ABC-12 \\\n < /tmp/abc-12-brief.md > /tmp/abc-12-launch.json\nrm -f /tmp/abc-12-brief.md\njq -r '\"\\(.workspaceId)/\\(.sessionId)\"' /tmp/abc-12-launch.json\n```\n\nWithout a launch token (an Armada that keeps no keys), pass the keys the brief's environment table marks `required`, from your shell or from Armada's credentials file (`in credentials file`: the `set -a` line loads it without printing it; drop it when every variable is set in your shell). The subshell keeps the keys out of the rest of your session. Without a launch token the worker is not signed in to Armada: its claims and reports reach Linear only, with a warning. When Conductor's organization environment still holds the keys, every workspace already has them: use the first block.\n\n```sh\n(\n set -a; . \"${XDG_CONFIG_HOME:-$HOME/.config}/armada/credentials\"; set +a\n [ -n \"$LINEAR_API_KEY\" ] || { echo \"LINEAR_API_KEY is missing\" >&2; exit 1; }\n conductor --json workspace create \\\n --repo-url https://github.com/<owner>/<name> \\\n --branch main \\\n --name \"ABC-12 <short title>\" \\\n --agent claude --model opus-5-5-1m --effort high \\\n --message-file - \\\n --env ARMADA_TICKET=ABC-12 \\\n --env LINEAR_API_KEY=\"$LINEAR_API_KEY\" \\\n < /tmp/abc-12-brief.md > /tmp/abc-12-launch.json\n)\nrm -f /tmp/abc-12-brief.md\n```\n\n- `--branch` is the base branch (the default branch). Conductor creates a branch named `conductor/<slug of --name>`; the brief tells the worker to rename it to the ticket's branch.\n- The output has `workspaceId`, `sessionId`, `deepLink` and `initialMessage` (`messageId`, `state: \"queued\"`). Keep the handle the `jq` line prints, and give the owner the `deepLink` when they want to watch.\n- Conductor sets `CONDUCTOR_WORKSPACE_ID` and `CONDUCTOR_SESSION_ID` inside the workspace, and signs `gh` in for the worker's pushes. The brief's first commands install your Armada version (`npm install -g`), sign in with the launch token (`armada login --launch-token`) and claim the ticket. `--env` values are not shown back by `workspace get`.\n- Keys in Conductor's organization environment reach every workspace, workers included: once Armada keeps the organization's keys, they belong on Armada's Keys page, not there.\n- An unknown agent, model or effort fails the command. Check the ids with `conductor model` (each agent's models, efforts and defaults) and fix the profile in `armada.toml`.\n\n5. **Check the claim.** Within a few minutes, `armada status` lists the ticket in flight, phase `planning`, runtime `Conductor`, and the ticket's claim comment reads `session: <workspaceId>/<sessionId>` and `profile: <name>`. No claim after `[policy] not_started_minutes` (ten by default): `armada watch` and `armada inbox` show a `not-started` entry, and `armada status` lists the ticket under \"Launched, not started\". It says whether the worker never used its launch token (it never reached its login line) or signed in and stopped before its claim. Read the transcript (Status section). A worker whose launch token was refused (already used, or more than an hour old) needs a new one: `armada brief ABC-12 --prompt` again, and message it only the `armada login --launch-token …` line of the new `--prompt` output (Message section). A worker cut off from Armada was revoked on the dashboard (Organization > Workers says by whom) or left idle for three days: ask the owner before you give a revoked worker a new token. If the worker cannot claim for another reason, fix the cause and message it; as a last resort record the handle yourself with `armada claim ABC-12 --runtime conductor --handle <workspaceId>/<sessionId> --profile <name>`, adding the brief's `--reason` for an override.\n\n## Message\n\n```sh\nprintf '%s\\n' \"Plan approved. Go on.\" | conductor --json message create --session <sessionId> --message-file -\nconductor --json message create --session <sessionId> --message-file - < /tmp/abc-12-answer.md\n```\n\nThe output is `{\"messageId\": …, \"state\": \"sent\"}`. Exit code 0 means Conductor accepted the message, not that the worker read it: check that the session turns `working`, then read its reply in the transcript. Use it to deliver an answer, a plan approval, or a heads-up that the default branch moved. Then record it in Armada: `armada answer <item> \"<answer>\"` for a question from `armada inbox`, `armada answer --note ABC-12 \"<message>\"` for a message the worker did not ask for.\n\n## Status\n\n```sh\nconductor --json session status <sessionId>\n```\n\nThe output is `{\"workspaceId\", \"sessionId\", \"status\", \"updatedAt\"}`. For a worker:\n\n- `working`: a turn is running. A silent worker that is `working` is busy (a long build or test run): leave it, and read the transcript if it stays silent past twice `policy.silence_minutes`.\n- `idle`: no turn is running. The worker finished its turn: it handed back, it waits for an answer, or it stopped without finishing. If `armada status` does not show it `ready-to-merge`, `awaiting-approval` or `blocked`, it has stopped: read its last reply, then message it to go on, or release and relaunch the ticket.\n- `error`: the last turn failed (agent or provider failure). Read the transcript and message it to resume; if it fails again, cancel, archive, release and relaunch.\n- Right after launch the session is `idle` for a few seconds while the workspace is initializing and the first message is queued; it turns `working` when the agent starts.\n\nThe workspace itself: `conductor --json workspace status <workspaceId>` gives `status` `initializing`, `ready` or `archived`.\n\n**Read the transcript** to see what a worker did or said. Events come oldest first, 100 per page; `hasMore` tells when to fetch the next page with `--after` the last event id. Keep the last id you read and poll from it.\n\n```sh\nconductor --json session message <sessionId> --limit 100 > /tmp/abc-12-events.json\njq -r '.hasMore, .data[-1].id' /tmp/abc-12-events.json\nconductor --json session message <sessionId> --after <lastEventId> --limit 100\n```\n\nThe second line prints whether more pages exist and the id to continue from. `.content.rawPayload` is the agent's own event format, so the filters depend on the worker's agent (the `agent` of its profile in `armada.toml`).\n\nA `claude` worker: each turn's final reply, then the commands and tools it ran.\n\n```sh\njq -r '.data[] | select(.content.rawPayload.type == \"result\") | .content.rawPayload | \"error=\\(.is_error)\\n\\(.result)\"' /tmp/abc-12-events.json\njq -r '.data[] | select(.content.rawPayload.type == \"assistant\") | .content.rawPayload.message.content[] | select(.type == \"tool_use\") | .input.command // .name' /tmp/abc-12-events.json\n```\n\nA `codex` worker: its events are `.content.rawPayload.event`, each item once as `item.started` and once as `item.completed`; read the completed ones. Its messages (`phase` is `commentary` along the way, `final_answer` at the end of a turn), then each command with its exit code, and its tool calls (Linear and other MCP servers).\n\n```sh\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"agentMessage\") | \"[\\(.phase)] \\(.text)\"' /tmp/abc-12-events.json\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"commandExecution\") | \"exit=\\(.exitCode) \\(.command)\"' /tmp/abc-12-events.json\njq -r '.data[] | .content.rawPayload.event | select(.type == \"item.completed\") | .item | select(.type == \"mcpToolCall\") | \"\\(.server) \\(.tool)\"' /tmp/abc-12-events.json\n```\n\nAnother agent, or a filter that prints nothing: count the event types, look at one event of the type you need, and adapt the filter.\n\n```sh\njq -r '.data[].content.rawPayload | .type // .event.type // \"(no payload)\"' /tmp/abc-12-events.json | sort | uniq -c\n```\n\n## Stop and archive\n\n```sh\nconductor --json session cancel <sessionId>\nconductor --json workspace archive <workspaceId>\n```\n\n- `session cancel` stops the running turn: `{\"status\", \"canceledQueuedMessages\"}`, and the session is `idle` within seconds. The workspace stays; a message starts a new turn. Use it on a worker that runs the wrong thing.\n- `workspace archive` answers `{\"status\": \"archived\"}`. Archive a worker's workspace after its pull request is merged, or after `armada release --ticket ABC-12 --reason \"<why>\"` for a worker that stops without handing back. The branch and the pull request stay on GitHub.\n- **Wait for `idle` before archiving.** A hand-back often arrives while the worker's session is still `working`: `armada report ready-to-merge` runs inside its last turn, which then writes its final reply. Archive only once `session status` answers `idle`. Poll it every 15 seconds; if it is still `working` after 10 minutes, cancel the turn and archive (the transcript keeps what it was doing). Run the whole block as one command; it can take up to 10 minutes, so run it in the background or give it a longer command timeout:\n\n```sh\nfor i in $(seq 40); do\n [ \"$(conductor --json session status <sessionId> | jq -r .status)\" = working ] || break\n sleep 15\ndone\n[ \"$(conductor --json session status <sessionId> | jq -r .status)\" = working ] && conductor --json session cancel <sessionId>\nconductor --json workspace archive <workspaceId>\n```\n- After an archive, `session status` still answers `idle`; `workspace status` says `archived`.\n";
5178
5258
 
5179
5259
  // ../../skills/armada-worker/SKILL.md
5180
5260
  var SKILL_default4 = `---
@@ -5188,6 +5268,7 @@ You are a worker. You own exactly one ticket, named in your launch brief. You tu
5188
5268
 
5189
5269
  - **Never merge**, never enable auto-merge, never approve your own plan. The coordinator merges.
5190
5270
  - **Report at least every 15 minutes** of work with \`armada report <phase> --message "<what you are doing>"\`. The same phase is allowed: it is your heartbeat. A worker silent for longer than \`policy.silence_minutes\` shows as silent, and the coordinator comes to check on you.
5271
+ - **Keep going on setup choices.** When setup needs a choice (an install fallback, a retry, a missing tool), pick the safe option, say which in your next report, and keep going: never stop to ask about it. Ask only for product decisions.
5191
5272
  - **Ask instead of guessing** when a choice changes the ticket's outcome: \`armada ask "<question and your recommendation>" --options "<a> | <b>"\`. Your phase becomes \`blocked\` and the question reaches the coordinator's inbox. Then **stop and end your turn**: the answer arrives as a message in this session, not in a command's output. When it arrives, report the phase you resume, for example \`armada report implementing --message "resumed: <the decision>"\`. Decide reversible technical choices yourself and record each one, with its reason, on the ticket and in the pull request.
5192
5273
  - **The ticket is the source of truth.** Read it, its parent spec and the hand-back comments of its merged blockers in full before planning.
5193
5274
  - Work only in your own branch and worktree. Never touch another agent's checkout, and stop only the processes you started.
@@ -5196,7 +5277,7 @@ You are a worker. You own exactly one ticket, named in your launch brief. You tu
5196
5277
 
5197
5278
  ## Steps
5198
5279
 
5199
- 1. **Claim** with the exact commands your brief starts with, for example \`armada claim <ticket> --runtime conductor --handle "$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID"\`. Install the Armada version the brief names first; if it gives a fallback command, use it wherever this skill says \`armada\`. When the brief has an \`armada login --launch-token <token>\` line, run it once, right after the install and before the claim: it signs your workspace in to Armada for your ticket only, and Armada then gives your \`claim\`, \`report\`, \`ask\` and \`release\` their keys, so none is needed in your environment (do not ask for one; \`armada whoami\` shows the sign-in). The token works once, within the hour; never copy it anywhere else. If it is refused, or a later command says you were cut off from Armada, stop and say so in your reply: the coordinator decides whether you get a new one. The claim assigns the ticket, moves it to In Progress, sets \`Agent phase = planning\` and your \`Agent runtime\`, and posts the \`Agent claim\` comment. If it refuses because another claim exists, stop: the older claim wins.
5280
+ 1. **Claim** with the exact commands your brief starts with, for example \`armada claim <ticket> --runtime conductor --handle "$CONDUCTOR_WORKSPACE_ID/$CONDUCTOR_SESSION_ID"\`. Install the Armada version the brief names first; if it gives a fallback command, use it wherever this skill says \`armada\`. If neither installs (a version npm does not serve yet), install the newest published one (\`npm install -g @the-vibe-company/armada\`), say so in your first report, and go on. When the brief has an \`armada login --launch-token <token>\` line, run it once, right after the install and before the claim: it signs your workspace in to Armada for your ticket only, and Armada then gives your \`claim\`, \`report\`, \`ask\` and \`release\` their keys, so none is needed in your environment (do not ask for one; \`armada whoami\` shows the sign-in). The token works once, within the hour; never copy it anywhere else. If it is refused, or a later command says you were cut off from Armada, stop and say so in your reply: the coordinator decides whether you get a new one. A token shown as \`armada_launch_••••\` is the masked one of the brief's human view: it signs nobody in, and \`armada login\` says so; ask for the \`armada brief <ticket> --prompt\` text. The claim assigns the ticket, moves it to In Progress, sets \`Agent phase = planning\` and your \`Agent runtime\`, and posts the \`Agent claim\` comment. If it refuses because another claim exists, stop: the older claim wins.
5200
5281
  2. **Branch.** Use the branch named after the ticket (the tracker suggests one, for example \`feature/abc-12-short-title\`), created from the latest default branch.
5201
5282
  3. **Plan.** Write the plan: what changes, how it is tested, and the checks a person could observe when it is done. Your brief's "Plan" section says in one line whether it needs approval (from \`[policy] plans\` in \`armada.toml\`, or a label on the ticket); follow that line, do not guess. Pre-approved: post the plan with \`armada report implementing --plan-file -\` (or \`--plan-file <path>\`) and go on; do not enter \`awaiting-approval\`. Otherwise post it with \`armada report awaiting-approval --plan-file -\`: it creates a \`plan\` item in the coordinator's inbox. \`--plan-file\` posts the plan as its own block, under a one-line status (\`--message\` sets that line, else the plan's first line). Push your branch and wait for the coordinator's decision in your session. On approval, report \`implementing\`; on amendments, report \`planning\`, revise the plan and submit it for approval again.
5202
5283
  4. **Implement** test-first. A material change to the approved plan needs a new approval.
@@ -5226,7 +5307,7 @@ var BUNDLED_SKILLS = [
5226
5307
  { name: "armada-worker", files: [{ path: "SKILL.md", content: SKILL_default4 }] }
5227
5308
  ];
5228
5309
  function skillFolderHash(files) {
5229
- const hash = createHash("sha256");
5310
+ const hash = createHash2("sha256");
5230
5311
  for (const f of [...files].sort((a, b) => a.path.localeCompare(b.path))) {
5231
5312
  hash.update(f.path);
5232
5313
  hash.update(f.content);
@@ -5594,6 +5675,7 @@ function buildStatus({
5594
5675
  forgeError = null,
5595
5676
  lastEvents,
5596
5677
  live,
5678
+ launches = [],
5597
5679
  extraWarnings = [],
5598
5680
  now
5599
5681
  }) {
@@ -5645,6 +5727,10 @@ function buildStatus({
5645
5727
  openBlockers: l.openBlockers,
5646
5728
  flags: l.flags
5647
5729
  })),
5730
+ notStarted: notStartedLaunches(launches, now, config.policy.notStartedMinutes).map((l) => {
5731
+ const issue = issues.find((i) => i.id === l.ticket);
5732
+ return { ...l, title: issue?.title ?? null, url: issue?.url ?? null, detail: notStartedBody(l, now) };
5733
+ }),
5648
5734
  frontier: frontier(m, config.tracker.readyLabel).filter((c) => !phaseOf.has(c.issue.id)).map((c) => ({
5649
5735
  id: c.issue.id,
5650
5736
  title: c.issue.title,
@@ -5692,19 +5778,27 @@ async function loadStatus(config, opts) {
5692
5778
  const eventsP = opts.lastEvents ? opts.lastEvents().then((events) => ({ events }), (err) => ({
5693
5779
  warning: `Armada's live data could not be read (${err instanceof Error ? err.message : String(err)}); silence is measured from Linear only`
5694
5780
  })) : Promise.resolve({});
5695
- const [{ program, forge, forgeError }, events] = await Promise.all([readStatusSources(config, opts), eventsP]);
5781
+ const launchesP = opts.launches ? opts.launches().then((launches) => ({ launches }), (err) => ({
5782
+ warning: `Armada's launches could not be read (${err instanceof Error ? err.message : String(err)}); workers launched that never started are not listed`
5783
+ })) : Promise.resolve({});
5784
+ const [{ program, forge, forgeError }, events, launches] = await Promise.all([
5785
+ readStatusSources(config, opts),
5786
+ eventsP,
5787
+ launchesP
5788
+ ]);
5696
5789
  return buildStatus({
5697
5790
  config,
5698
5791
  program,
5699
5792
  forge,
5700
5793
  forgeError,
5701
5794
  ...events.events ? { lastEvents: events.events } : {},
5702
- extraWarnings: events.warning ? [events.warning] : [],
5795
+ ...launches.launches ? { launches: launches.launches } : {},
5796
+ extraWarnings: [events.warning, launches.warning].filter((w) => !!w),
5703
5797
  now: now()
5704
5798
  });
5705
5799
  }
5706
5800
  // package.json
5707
- var version = "0.2.9";
5801
+ var version = "0.2.10";
5708
5802
 
5709
5803
  // src/api.ts
5710
5804
  var runs = new WeakMap;
@@ -6047,7 +6141,14 @@ The key is stored in ${p.credentials}.
6047
6141
  `);
6048
6142
  return 0;
6049
6143
  }
6144
+ function sessionHandle(io) {
6145
+ const workspace = io.env.CONDUCTOR_WORKSPACE_ID?.trim();
6146
+ const session = io.env.CONDUCTOR_SESSION_ID?.trim();
6147
+ return workspace && session ? `${workspace}/${session}` : null;
6148
+ }
6050
6149
  async function loginWithLaunchToken(io, credentials, token, apiUrl) {
6150
+ if (isMaskedLaunchToken(token))
6151
+ throw new Refusal(MASKED_LAUNCH_TOKEN_REFUSAL.error, MASKED_LAUNCH_TOKEN_REFUSAL.next);
6051
6152
  const p = paths(io);
6052
6153
  let url = credentials.armadaApi.url;
6053
6154
  if (apiUrl) {
@@ -6056,7 +6157,7 @@ async function loginWithLaunchToken(io, credentials, token, apiUrl) {
6056
6157
  throw new UsageError(`the launch message names ${hostOf(apiUrl)}, but ARMADA_API_URL or [api] url names ${hostOf(url)}`, "unset ARMADA_API_URL, or ask the coordinator for a launch from that Armada");
6057
6158
  url = apiUrl;
6058
6159
  }
6059
- const session = await apiOf(io, url).exchangeLaunchToken(token.trim());
6160
+ const session = await apiOf(io, url).exchangeLaunchToken(token.trim(), sessionHandle(io));
6060
6161
  const w = session.worker;
6061
6162
  await updateCredentialStore(p, {
6062
6163
  [workerSessionVariable(w.ticket)]: formatWorkerSession({
@@ -6188,9 +6289,9 @@ function liveFleet(io, config, credentials) {
6188
6289
  };
6189
6290
  }
6190
6291
  }
6191
- function statusEvents(io, config, credentials) {
6292
+ function statusLive(io, config, credentials) {
6192
6293
  const { fleet } = liveFleet(io, config, credentials);
6193
- return fleet ? () => fleet.lastEventTimes() : undefined;
6294
+ return fleet ? { lastEvents: () => fleet.lastEventTimes(), launches: () => fleet.pendingLaunches() } : undefined;
6194
6295
  }
6195
6296
  function currentTicket(io, config, explicit, workers = []) {
6196
6297
  const fromEnv = io.env.ARMADA_TICKET?.trim();
@@ -6451,6 +6552,7 @@ async function inbox2(io, config, credentials, a) {
6451
6552
  project: config.project.slug,
6452
6553
  coordinator: coordinatorHandle(io),
6453
6554
  silentAfterMinutes: config.policy.silentAfterMinutes,
6555
+ notStartedMinutes: config.policy.notStartedMinutes,
6454
6556
  now: io.now ?? (() => new Date),
6455
6557
  ...wait ? { wait: { timeoutMs, sleep: io.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms))) } } : {}
6456
6558
  });
@@ -6578,6 +6680,7 @@ async function watchUntil(io, config, credentials, json, configPath) {
6578
6680
  project,
6579
6681
  coordinator: coordinatorHandle(io),
6580
6682
  silentAfterMinutes: config.policy.silentAfterMinutes,
6683
+ notStartedMinutes: config.policy.notStartedMinutes,
6581
6684
  seen: before?.seen ?? [],
6582
6685
  now: io.now ?? (() => new Date),
6583
6686
  sleep: io.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms))),
@@ -6634,7 +6737,7 @@ async function hookStop(io, rest, findConfig) {
6634
6737
  }
6635
6738
 
6636
6739
  // src/brief.ts
6637
- var HIDDEN_LAUNCH_TOKEN = "armada_launch_••••";
6740
+ var HIDDEN_LAUNCH_TOKEN = MASKED_LAUNCH_TOKEN;
6638
6741
  function hideLaunchToken(b) {
6639
6742
  if (!b.launch)
6640
6743
  return b;
@@ -6730,6 +6833,7 @@ async function brief2(io, config, credentials, a, version, configPath) {
6730
6833
  env: io.env,
6731
6834
  stored: STORED_KEYS.filter((k) => credentials.sources[k.name]?.kind === "store").map((k) => k.variable),
6732
6835
  launch: launcher(io, config, credentials),
6836
+ npm: (v) => checkPublished(v, io.fetch ?? fetch),
6733
6837
  conventions,
6734
6838
  ...io.fetch ? { fetch: io.fetch } : {},
6735
6839
  ...io.now ? { now: io.now } : {}
@@ -7572,10 +7676,10 @@ async function merge2(io, config, credentials, a, configPath) {
7572
7676
  }
7573
7677
 
7574
7678
  // src/render.ts
7575
- var MIN2 = 60000;
7679
+ var MIN3 = 60000;
7576
7680
  function relative2(iso, now) {
7577
7681
  const diff = now - Date.parse(iso);
7578
- const m = Math.round(Math.abs(diff) / MIN2);
7682
+ const m = Math.round(Math.abs(diff) / MIN3);
7579
7683
  const suffix = diff >= 0 ? "ago" : "from now";
7580
7684
  if (m < 1)
7581
7685
  return "just now";
@@ -7604,7 +7708,7 @@ var phaseLabel = (t) => t.phaseSource === "label" ? t.phase : `${t.phase} (${t.p
7604
7708
  function renderStatus(r) {
7605
7709
  const now = Date.parse(r.generatedAt);
7606
7710
  const out = [];
7607
- const idWidth = Math.max(6, ...r.inFlight.map((t) => t.id.length), ...r.frontier.map((t) => t.id.length), ...(r.pullRequests ?? []).map((p) => `#${p.number}`.length));
7711
+ const idWidth = Math.max(6, ...r.inFlight.map((t) => t.id.length), ...r.notStarted.map((l) => l.ticket.length), ...r.frontier.map((t) => t.id.length), ...(r.pullRequests ?? []).map((p) => `#${p.number}`.length));
7608
7712
  const indent = " ".repeat(idWidth + 4);
7609
7713
  const phaseWidth = Math.max(0, ...r.inFlight.map((t) => phaseLabel(t).length));
7610
7714
  out.push(`${r.project.name} · ${r.programRoot.id} ${r.programRoot.title}`);
@@ -7626,6 +7730,15 @@ function renderStatus(r) {
7626
7730
  if (t.flags.length)
7627
7731
  out.push(`${indent}! ${t.flags.join(", ")}`);
7628
7732
  }
7733
+ if (r.notStarted.length) {
7734
+ out.push("", `Launched, not started (${r.notStarted.length})`);
7735
+ for (const l of r.notStarted) {
7736
+ out.push(` ${pad(l.ticket, idWidth)} launched ${relative2(l.launchedAt, now)} · ${l.tokenUsedAt ? `signed in ${relative2(l.tokenUsedAt, now)}, no claim` : "launch token never used"}${l.handle ? ` · ${l.handle}` : ""}`);
7737
+ if (l.title)
7738
+ out.push(`${indent}${truncate(l.title, 90)}`);
7739
+ out.push(`${indent}! check its session with the runtime guide's status section`);
7740
+ }
7741
+ }
7629
7742
  const ready = r.frontier.filter((t) => t.readyForAgent);
7630
7743
  const untriaged = r.frontier.filter((t) => !t.readyForAgent);
7631
7744
  out.push("", `Ready to start (${ready.length})`);
@@ -7723,7 +7836,7 @@ ${"─".repeat(60)}
7723
7836
  // src/secrets.ts
7724
7837
  import { dirname as dirname6, relative as relative3, resolve } from "node:path";
7725
7838
  var NAME_HINT = "upper snake case, e.g. OPENAI_API_KEY";
7726
- var hhmm = (iso) => `${iso.slice(0, 16).replace("T", " ")} UTC`;
7839
+ var hhmm2 = (iso) => `${iso.slice(0, 16).replace("T", " ")} UTC`;
7727
7840
  function signInOf(config, credentials) {
7728
7841
  const signIn = credentials.armadaSignIn;
7729
7842
  if (!signIn)
@@ -7793,7 +7906,7 @@ Next: armada secrets set <NAME> (an owner or admin), or the Keys page of Armada
7793
7906
  const width = Math.max(...secrets.map((s) => s.name.length));
7794
7907
  const lines = [`Secrets for workers of ${p} (names only; values stay in Armada)`];
7795
7908
  for (const s of secrets)
7796
- lines.push(` ${s.name.padEnd(width)} ${s.scope.padEnd(12)} set by ${s.setBy}, ${hhmm(s.setAt)}${s.overridden ? " (the project's own wins)" : ""}`);
7909
+ lines.push(` ${s.name.padEnd(width)} ${s.scope.padEnd(12)} set by ${s.setBy}, ${hhmm2(s.setAt)}${s.overridden ? " (the project's own wins)" : ""}`);
7797
7910
  return `${lines.join(`
7798
7911
  `)}
7799
7912
  `;
@@ -8251,11 +8364,11 @@ async function status2(io, args) {
8251
8364
  const { linearApiKey, githubToken } = credentials;
8252
8365
  if (!linearApiKey)
8253
8366
  throw missingKey(LINEAR_KEY);
8254
- const events = statusEvents(io, config, credentials);
8367
+ const live = statusLive(io, config, credentials);
8255
8368
  const report = await loadStatus(config, {
8256
8369
  linearApiKey,
8257
8370
  githubToken,
8258
- ...events ? { lastEvents: events } : {},
8371
+ ...live ?? {},
8259
8372
  ...io.fetch ? { fetch: io.fetch } : {},
8260
8373
  ...io.now ? { now: io.now } : {}
8261
8374
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-vibe-company/armada",
3
- "version": "0.2.9",
3
+ "version": "0.2.10",
4
4
  "type": "module",
5
5
  "description": "Run a fleet of coding agents on one project: the armada command line.",
6
6
  "license": "MIT",