@the-vibe-company/armada 0.1.13 → 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.
Files changed (3) hide show
  1. package/README.md +24 -3
  2. package/dist/armada.js +843 -460
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -61,7 +61,7 @@ On a repository without `armada.toml`, pass `--program-root <ISSUE-ID>`; the nam
61
61
 
62
62
  ## Launch a worker (coordinators)
63
63
 
64
- Armada prepares a launch; it never starts a runtime itself. The `armada-runtime-conductor` skill gives the exact Conductor Cloud commands.
64
+ Armada prepares a launch; it never starts a runtime itself. The `armada-runtime-conductor` skill gives the exact Conductor Cloud commands. [`docs/runbook.md`](docs/runbook.md) says how to start a coordinator on a laptop or in Conductor Cloud, what the owner sets up once, and how one coordinator hands over to the next.
65
65
 
66
66
  ```sh
67
67
  armada brief ABC-12 # launch settings, then the worker's prompt
@@ -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)
@@ -177,6 +178,7 @@ ARMADA_AUTH_URL=http://localhost:4822 ARMADA_AUTH_OWNER_EMAILS=you@example.com b
177
178
  - Accounts are by invitation: an account is created only for an owner address or an address with a pending invitation. The first owner to sign in creates the organization; the projects already registered, and those the CLI registers until it signs in, join the deployment's first organization. Organizations cannot be deleted.
178
179
  - An owner or admin invites by email from the Organization page (the name in the top bar). No email provider is plugged in yet: messages (invitations, address confirmations) go to the server log, and the Organization page shows each pending invitation's link to copy and send. The invited person signs in with that address and accepts.
179
180
  - Sessions are HttpOnly, SameSite=Lax cookies (Secure over https) valid 30 days; a revoked session can last up to five minutes (signed cookie cache). Without its accounts database the dashboard fails closed (503).
181
+ - Terminals sign in too (see [Sign in from a terminal](#sign-in-from-a-terminal)): `armada login` shows a code that the person confirms on the dashboard's `/device` page, and owners create API keys for headless coordinators on the Organization page. A key is shown once, belongs to the organization, and revoking it signs out whatever uses it. The CLI calls only `/api/cli/*`; without accounts those routes refuse with the next step.
180
182
 
181
183
  **Switch from the shared password to accounts** (a deployment that runs on `ARMADA_DASHBOARD_PASSWORD` keeps working until the redeploy of step 4; set every variable before it, since a partial set locks the dashboard):
182
184
 
@@ -196,6 +198,22 @@ ARMADA_AUTH_URL=http://localhost:4822 ARMADA_AUTH_OWNER_EMAILS=you@example.com b
196
198
 
197
199
  One deployment covers one Linear workspace and one GitHub organization: its keys must read every registered project.
198
200
 
201
+ ## Sign in from a terminal
202
+
203
+ The CLI knows who is acting, and for which organization, by signing in to Armada, the way `gh auth login` does:
204
+
205
+ ```sh
206
+ armada login # shows a one-time code, opens the confirmation page; you approve it in the browser
207
+ armada whoami # the person (or API key) and the organization; --json for scripts
208
+ armada logout # revokes this terminal's session and removes it from the machine
209
+ ```
210
+
211
+ - A coordinator without a browser (a cloud workspace, CI) uses an organization API key instead: an owner creates it on the Organization page (it is shown once), and the coordinator sets `ARMADA_API_KEY`, or stores it with `armada login --api-key` (hidden prompt, or standard input: `printf %s "$KEY" | armada login --api-key`; never on the command line). `ARMADA_API_KEY` in the environment wins over what `armada login` stored. Revoking the key signs the coordinator out.
212
+ - The session token or key is kept in the credentials file below (mode 0600) and never printed; `armada auth status` says how the terminal is signed in, without it. A session lasts 30 days and is renewed while in use.
213
+ - Commands that need a sign-in say so and name `armada login` as the next step; so does an expired session or a revoked key.
214
+ - The CLI talks to `https://armada.thevibecompany.co`. A self-hosted Armada is named by `ARMADA_API_URL`, or `[api] url` in `config.toml` (https; plain http only for `localhost`). A stored sign-in is sent only to the Armada that issued it: pointing the CLI at another one asks for `armada login` there.
215
+ - Until an Armada has accounts (it runs on the shared dashboard password), it refuses terminal sign-ins and says so; the keys below keep working as they do today.
216
+
199
217
  ## Keys
200
218
 
201
219
  Armada needs a few keys. Set them up once per machine with `armada auth login`, or pass them as environment variables, which always win over the stored ones (the way to go in CI and cloud sandboxes).
@@ -223,6 +241,9 @@ url = "libsql://<database>-<organization>.turso.io" # used when ARMADA_TURSO_U
223
241
 
224
242
  [dashboard]
225
243
  url = "https://<your-armada-dashboard>"
244
+
245
+ [api]
246
+ url = "https://armada.example.com" # a self-hosted Armada for `armada login`; used when ARMADA_API_URL is not set
226
247
  ```
227
248
 
228
249
  ## Configure a project