@the-vibe-company/armada 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -93,7 +93,7 @@ armada release --reason "wrong ticket"
93
93
  - `report`, `ask` and `answer` accept `--message-file -` to read standard input to EOF, including a pipe or a shell heredoc. For example: `printf 'line one\nline two' | bun run armada report implementing --ticket ABC-12 --message-file -`. An explicitly empty or whitespace-only message file or stdin exits 2 before any tracker or database write, with a retry naming `--message` or a non-empty pipe. A `ready-to-merge` report may still omit the message option.
94
94
  - `claim` and `report` read the ticket back and print where it stands, for example `Now: In Progress · phase implementing · runtime Conductor · profile none`, so a worker can check it without opening Linear. `--json` carries the same as `state`.
95
95
  - `ready-to-merge` is refused unless the pull request is open in the project repository, `--sha` is the full 40-character SHA of its head, and every check in `[gates] required_checks` is green on that head (with none declared: at least one check, all green). It needs a GitHub token.
96
- - `release` removes the phase and runtime labels, moves the ticket back to the team's first unstarted state and posts `Agent status: released — <reason>`.
96
+ - `release` removes the phase and runtime labels, keeps the configured ready label so the ticket can be taken again, moves the ticket back to the team's first unstarted state and posts `Agent status: released — <reason>`.
97
97
  - `report` and `release` find the ticket from `--ticket`, then `ARMADA_TICKET`, then the current git branch (`feature/abc-12-…`).
98
98
  - Turso is optional. When it is not configured or not reachable, the commands still write Linear and print a warning.
99
99
 
@@ -109,6 +109,7 @@ armada answer --note ABC-12 "main moved: rebase before you ship" # an unsolicit
109
109
 
110
110
  - `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 in Turso. The worker then stops and waits for the answer in its session, and reports the phase it resumes. It finds the ticket like `report`.
111
111
  - `inbox` lists the coordinator's open items (questions, requests, hand-backs) and silent workers, oldest first. A worker is silent when it holds a ticket, its newest Turso event is older than `policy.silence_minutes`, and its phase does not wait on someone else. It reads Turso only (no Linear key) and records that the coordinator is at work, for the dashboard. `--wait` polls every 5 s and marks the items that were not there before with `*`; loop on it.
112
+ - A coordinator's own claim is never listed as silent in its inbox: only an exact, nonempty handle match is excluded, not its questions, requests or hand-backs. `inbox` takes the reading coordinator's handle from `ARMADA_COORDINATOR_HANDLE` first, otherwise from both `CONDUCTOR_WORKSPACE_ID` and `CONDUCTOR_SESSION_ID` joined as `workspace/session`. Blank values are ignored; with no complete identity, silence detection is unchanged. Local coordinators should set `ARMADA_COORDINATOR_HANDLE` to the handle used for their claim. The same identity is used for every `--wait` poll and the dashboard presence record; the fleet-wide `status` and dashboard silence rules are unchanged.
112
113
  - `answer` never calls a runtime: deliver the answer first with the runtime guide's message section. It posts `Agent status: <current phase> — answer: …` on the ticket and resolves the item. An item id needs Turso; a ticket id answers that ticket's open questions and also works without Turso. `--note` records a message the worker did not ask for as `Agent status: <phase> — note: …`. These two are the coordinator's records: Armada never reads them as the worker's phase, hand-back or sign of life. Only questions and requests can be answered; `merge` resolves hand-backs, and `release` and `merge` resolve the ticket's open questions. A worker that does not report within `policy.silence_minutes` of an answer shows as silent.
113
114
  - The dashboard adds two kinds of request, signed by the person who made them. An `answer-request` carries the owner's answer to an open question: deliver it, then `armada answer <request id> "<answer>"`, which resolves the request and its question and names the requester on the ticket (answering the question itself also closes a waiting request). A `launch-request` asks to launch a ready ticket on a profile: launch it as usual; the worker's `armada claim` resolves it and posts who asked. To decline one, `armada answer <request id> "<why>"`: it is closed with the reason and nothing is posted on the ticket.
114
115
 
@@ -124,7 +125,7 @@ armada merge 34 # or the pull request URL; --ticket ABC-12 when the
124
125
  - Hints, never blocking: top-level functions, classes, types and constants the pull request removes or renames that the base branch still uses in files the pull request does not touch.
125
126
  - One merge at a time per project: a `merge` lease in Turso (20 minutes, renewed before the merge) makes a second coordinator wait. When Turso is configured but unreachable the merge is refused; `--no-lock` forces it, with a warning and "merged without lock" in the ticket's merged comment. Without Turso configured at all (one coordinator) the merge runs unlocked with a warning.
126
127
  - The merge is `gh pr merge <n> --squash --match-head-commit <sha>`, never `--delete-branch` (it removes local worktrees that have the branch checked out). A GitHub 5xx is retried with backoff, each time after checking that the pull request is still open at the same head. Success is reported only once GitHub shows the pull request as merged at that head.
127
- - Then the ticket moves to Done with its agent labels removed, the pull request is linked, `Agent status: merged — …` is posted, the Turso hand-back is resolved and the runtime handle released. The output lists the workers in flight to tell and the worker session to archive with its runtime guide, when one is installed for that runtime in `.agents/skills` or `.claude/skills`; otherwise it says there is none, since a local session or subagent has nothing to archive.
128
+ - Then the ticket moves to Done with its agent labels and `[tracker] ready_label` removed (unrelated labels stay), the pull request is linked, `Agent status: merged — …` is posted, the Turso hand-back is resolved and the runtime handle released. The output lists the workers in flight to tell and the worker session to archive with its runtime guide, when one is installed for that runtime in `.agents/skills` or `.claude/skills`; otherwise it says there is none, since a local session or subagent has nothing to archive.
128
129
  - It runs `gh` and `git` in the repository checkout and needs `LINEAR_API_KEY` and a GitHub token.
129
130
 
130
131
  ## Watch the fleet (dashboard)
package/dist/armada.js CHANGED
@@ -3726,6 +3726,8 @@ async function readInbox(db, o) {
3726
3726
  }));
3727
3727
  const asking = new Set(items.filter((i) => i.kind === "question").map((i) => i.ticket));
3728
3728
  for (const h of handles) {
3729
+ if (o.coordinator && h.handle === o.coordinator)
3730
+ continue;
3729
3731
  const e = events[h.ticket];
3730
3732
  if (e && (e.kind === "release" || e.kind === "merge"))
3731
3733
  continue;
@@ -4605,13 +4607,17 @@ async function closeTicket(ctx, ticket, merged, unlocked) {
4605
4607
  const done = ticket.statusType === "completed" ? null : firstState(ticket.states, "completed");
4606
4608
  await ctx.linear.updateTicket(ticket.uuid, {
4607
4609
  ...done ? { stateId: done.id } : {},
4608
- removeLabelIds: [...others(ticket, groups.phaseGroup, null), ...others(ticket, groups.runtimeGroup, null)]
4610
+ removeLabelIds: [
4611
+ ...others(ticket, groups.phaseGroup, null),
4612
+ ...others(ticket, groups.runtimeGroup, null),
4613
+ ...ticket.labels.filter((label) => label.name === ctx.config.tracker.readyLabel).map((label) => label.id)
4614
+ ]
4609
4615
  });
4610
4616
  if (!ticket.prs.some((p) => p.url === merged.url))
4611
4617
  await ctx.linear.linkUrl(ticket.uuid, merged.url, merged.title || `Pull request #${merged.number}`);
4612
4618
  await ctx.linear.comment(ticket.uuid, `Agent status: merged — PR #${merged.number} squash-merged into ${merged.baseRef} as ${merged.mergeCommit ?? "unknown"}, head ${merged.headSha}${unlocked ? ", merged without lock (--no-lock)" : ""}`);
4613
4619
  return [
4614
- `${ticket.id}: ${done ? `moved to ${done.name}` : "state unchanged"}, agent labels removed, merged status posted.`
4620
+ `${ticket.id}: ${done ? `moved to ${done.name}` : "state unchanged"}, agent and ready labels removed, merged status posted.`
4615
4621
  ];
4616
4622
  }
4617
4623
  async function mergePullRequest(ctx, input) {
@@ -4637,7 +4643,7 @@ async function mergePullRequest(ctx, input) {
4637
4643
  try {
4638
4644
  lines.push(...await closeTicket(ctx, c.ticket, merged, !!input.noLock));
4639
4645
  } catch (err) {
4640
- throw new Error(`#${merged.number} is merged, but Linear could not be updated (${err instanceof Error ? err.message : String(err)}); close ${c.ticket.id} by hand: Done, agent labels removed, pull request linked`);
4646
+ throw new Error(`#${merged.number} is merged, but Linear could not be updated (${err instanceof Error ? err.message : String(err)}); close ${c.ticket.id} by hand: Done, agent and ready labels removed, pull request linked`);
4641
4647
  }
4642
4648
  return after(ctx, c, merged, lines);
4643
4649
  };
@@ -5229,7 +5235,7 @@ async function loadStatus(config, opts) {
5229
5235
  });
5230
5236
  }
5231
5237
  // package.json
5232
- var version = "0.1.14";
5238
+ var version = "0.1.15";
5233
5239
 
5234
5240
  // src/io.ts
5235
5241
  class UsageError extends Error {
@@ -5938,8 +5944,12 @@ async function inbox2(io, config, credentials, a) {
5938
5944
  if (!db)
5939
5945
  throw new Refusal(`the inbox lives in Turso, which is unavailable: ${warning ?? "no answer"}`, "armada inbox again once Turso answers (armada auth status shows the URL in use)");
5940
5946
  try {
5947
+ const workspace = io.env.CONDUCTOR_WORKSPACE_ID?.trim();
5948
+ const session = io.env.CONDUCTOR_SESSION_ID?.trim();
5949
+ const coordinator = io.env.ARMADA_COORDINATOR_HANDLE?.trim() || (workspace && session ? `${workspace}/${session}` : null);
5941
5950
  const report = await checkInbox(db, {
5942
5951
  project: config.project.slug,
5952
+ coordinator,
5943
5953
  silentAfterMinutes: config.policy.silentAfterMinutes,
5944
5954
  now: io.now ?? (() => new Date),
5945
5955
  ...wait ? { wait: { timeoutMs, sleep: io.sleep ?? ((ms) => new Promise((done) => setTimeout(done, ms))) } } : {}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@the-vibe-company/armada",
3
- "version": "0.1.14",
3
+ "version": "0.1.15",
4
4
  "type": "module",
5
5
  "description": "Run a fleet of coding agents on one project: the armada command line.",
6
6
  "license": "MIT",