bullswarm 0.38.21 → 0.39.0

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 (75) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/README.md +3 -2
  3. package/bin/bullswarm.js +6 -3
  4. package/data/openrouter-benchmarks.json +16204 -15448
  5. package/docs/guide/getting-started.md +1 -1
  6. package/docs/index.md +1 -1
  7. package/docs/integrations/agent-clis.md +9 -7
  8. package/docs/integrations/claude-code.md +2 -2
  9. package/docs/reference/cli.md +23 -6
  10. package/docs/reference/configuration.md +7 -5
  11. package/docs/reference/providers.md +47 -3
  12. package/mods/bullswarm/hooks/names.ts +7 -4
  13. package/mods/bullswarm/hooks/step.ts +20 -6
  14. package/package.json +1 -1
  15. package/providers/contrib/README.md +1 -1
  16. package/skill/SKILL.md +3 -3
  17. package/skill/references/operations.md +8 -2
  18. package/src/cli.js +98 -59
  19. package/src/help.js +83 -26
  20. package/src/home-cli.js +1 -1
  21. package/src/integrate.js +193 -31
  22. package/src/lib/cli-flags.js +3 -2
  23. package/src/lib/config.js +10 -2
  24. package/src/lib/forecast.js +2 -1
  25. package/src/lib/model-family.js +14 -0
  26. package/src/lib/pool-lanes.js +91 -0
  27. package/src/lib/pool-limits.js +54 -4
  28. package/src/lib/pool-toggle.js +99 -0
  29. package/src/lib/route.js +18 -17
  30. package/src/lib/run-step.js +9 -0
  31. package/src/lib/spend.js +7 -4
  32. package/src/lib/state.js +184 -11
  33. package/src/lib/strategy.js +204 -32
  34. package/src/lib/tasks.js +2 -1
  35. package/src/meters/registry.js +11 -2
  36. package/src/provider-cli.js +2 -1
  37. package/src/providers/README.md +2 -2
  38. package/src/providers/agy/connector-history.json +306 -0
  39. package/src/providers/agy/connector.json +425 -0
  40. package/src/providers/agy/provider.mjs +345 -0
  41. package/src/setup.js +101 -16
  42. package/src/strategy-cli.js +190 -55
  43. package/src/strategy-dashboard.js +3 -3
  44. package/src/workflow/cli-capabilities.js +10 -2
  45. package/src/workflow/cli-goal.js +3 -2
  46. package/src/workflow/cli-inspect.js +37 -12
  47. package/src/workflow/cli-launch.js +50 -16
  48. package/src/workflow/cli-plan.js +4 -3
  49. package/src/workflow/cli-pool-checks.js +61 -7
  50. package/src/workflow/cli-run-lookup.js +25 -2
  51. package/src/workflow/cli-run-verbs.js +12 -5
  52. package/src/workflow/cli-step-verbs.js +6 -2
  53. package/src/workflow/cli-steps.js +21 -5
  54. package/src/workflow/cli.js +46 -20
  55. package/src/workflow/dashboard-details.js +10 -1
  56. package/src/workflow/dashboard-render.js +13 -1
  57. package/src/workflow/dashboard-rows.js +24 -1
  58. package/src/workflow/dashboard.js +28 -6
  59. package/src/workflow/dispatch-no-pool.js +4 -3
  60. package/src/workflow/dispatch-silence.js +2 -1
  61. package/src/workflow/history.js +4 -1
  62. package/src/workflow/metrics-legacy.js +14 -5
  63. package/src/workflow/no-pool-why.js +6 -5
  64. package/src/workflow/pick-preview.js +12 -5
  65. package/src/workflow/reconcile.js +40 -17
  66. package/src/workflow/reprice-cli.js +2 -0
  67. package/src/workflow/reprice.js +42 -17
  68. package/src/workflow/run-model.js +5 -1
  69. package/src/workflow/runs-cli.js +58 -11
  70. package/src/workflow/short-id.js +81 -3
  71. package/src/workflow/stats-model.js +3 -1
  72. package/src/workflow/step-route.js +23 -2
  73. package/src/workflow/usage-view.js +3 -3
  74. package/src/workflow/v2-dispatch.js +31 -9
  75. package/src/workflow/watch-cli.js +77 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,61 @@
1
1
  # bullswarm changelog
2
2
 
3
+ ## Unreleased
4
+
5
+ ## 0.39.0 — AGY: Google Antigravity as a first-class provider
6
+
7
+ - `bench/eval-suite/rank.mjs` ranks two or more `run-bench.mjs` output directories on the tasks every label ran: pass rate first, then fewer interventions, lower wall minutes, lower API-equivalent USD (#91).
8
+ - New first-class provider `agy`, the Google Antigravity CLI. One AGY login gives two pools, one per AGY quota group: `agy` runs the Gemini models and `agy:claude` runs the Claude and GPT-OSS models AGY also serves. They share the credential group `agy`, so a sign-in failure on one skips the other for that step. Both are paced like any other pool: the meter runs `agy -p /usage --output-format json`, which starts no model turn and spends no quota, and reads the pool's own group's weekly and 5-hour limits. A 5-hour reading at 99% or more keeps the pool out of picks until it resets, as for every pool. `bullswarm run --use-provider agy` pins a step to it.
9
+
10
+ - Models come from `agy models`. AGY writes the effort level into the id (`gemini-4-carbon-high`), so Bullswarm lists one model per base id with the levels it accepts, and `--effort` is clamped to them. `xhigh` is never sent: `agy models` lists `gemini-4-hydrogen-xhigh`, but AGY's server refuses it (`INVALID_ARGUMENT: Thinking level is unsupported: THINKING_LEVEL_XHIGH`, 2026-11-18), so a request for `xhigh` runs at `high`. The Claude and GPT-OSS models get no `--effort` flag. The orchestrator ids are AGY's own multi-agent mode and are not offered.
11
+
12
+ - Strategy suggests Gemini 4 Hydrogen on every `agy` tier: high and medium at `high` effort, low at `medium` (the owner's choice after the 2026-11-18 benchmark, where all four Gemini models scored 265/265 and Hydrogen was fastest: 44 min against Carbon's 263, with no interventions). It uses grok's `generationFallback` pattern; each AGY pool now ranks only its own model families, so `agy:claude`'s families no longer block it. Gemini 4 Carbon, Argon and 3.8 Flash are never suggested but run when pinned (`--model`, `strategy set-rung`). On `agy:claude`, there is no `high` pick (high work goes to other pools — Opus 4.6 via `agy:claude` missed full marks on task 3 in the 2026-11-18 eval suite and spent 100% of the group's 5-hour window and 50% of its week, against 19% 5-hour and 5.8% weekly across four Gemini benchmarks): medium is Claude Opus 4.6 and low is Claude Sonnet 4.6; GPT-OSS 120B is unbenchmarked and not suggested (`autoRecommend: false`), though selectable with `strategy set-rung`. Gemini prices are Google's AI Studio rates read on 2026-11-17; the announced Carbon/Argon change on 2026-12-01 and the Flash change on 2027-01-01 are noted in the connector and not applied yet.
13
+
14
+ - `agy` and `agy:claude` are two ordinary pools that routing paces and drains on their own, with no pin: each is metered by its own AGY quota group and picked when it is the most behind. Setup turns both on when it finds agy, and both off when it does not. Both meters come from one `agy -p /usage` call, shared for 30 seconds, so refreshing both pools runs agy once; the read right after a quota refusal always runs it again. A quota refusal on one pool keeps only that pool out; a sign-in failure keeps both out, since they are one login. `--use-provider agy --model claude-opus-4-6-thinking` runs on `agy:claude`, and a Gemini model always runs on `agy`. On `agy:claude`, medium-effort work runs Claude Opus 4.6 and low-effort work runs Claude Sonnet 4.6, while high-effort work goes to other pools unless a model is pinned. docs/reference/providers.md explains the pattern under "One login, several quota pools".
15
+
16
+ - The worker reads agy's `stream-json` output: the answer is the `result` line's `response`, tool steps are counted (read, edit, command, search), and tokens are read from the `result` line, or summed from each step's usage when the stream ends early. A visibly cut-off answer gets one follow-up turn in the same AGY conversation (`--conversation <id>`).
17
+
18
+ - Claude Code mod UI and `agy:claude` rates: the mod keeps `agy:claude` whole instead of shortening it to `agy:c` (while `claude-code:<account>` still shortens to `claude-code:<letter>`), renders pre-response tool steps on the Step page without treating the `result` envelope as a tool row, and prices `claude-opus-4-6-thinking` and `claude-sonnet-4-6` on `agy:claude` from Anthropic's published rate card (`gpt-oss-120b-medium` stays unpriced).
19
+
20
+ - Upgrade path for new pools and step-level `model` validation: a pool that appears for the first time on a home whose strategy already holds tier selections gets its provider's suggested picks automatically on first discovery or refresh without touching other pools' approved picks, recorded under `strategy.rungSeeds` with who, when and why; `workflow plan validate`, `workflow step rerun --avoid` and route/pin checks also honour a step's own `model` when the pool's tier selection is empty.
21
+
22
+ - `bullswarm integrate` now supports `agy` (`--agents agy`, and included in the default set when `agy` is installed): `install` creates `~/.gemini/config/skills/bullswarm/` with top-level entry symlinks into the packaged `skill/` (since AGY ignores a symlinked skill directory) and manages the recursion-safe awareness block in `~/.gemini/config/AGENTS.md`; `remove` deletes only Bullswarm-managed entry symlinks (and the directory when empty) and refuses to touch non-Bullswarm folders.
23
+
24
+ - Faster CLI startup and bounded `state.json`: `--version`, `--help` and usage errors no longer initialize, load or migrate home state; the OpenCode pool-rename check and test-fixture pool migration record a small `.migrations.json` marker once so later CLI invocations skip rescanning or parsing `state.json`; and `state.decisionLog` keeps the most recent 200 entries in `state.json` (one JSON row per line) while moving older entries to the append-only `decision-log-archive.jsonl` read alongside live entries by spend, strategy rungs, tasks, health, legacy metrics and repricing.
25
+
26
+ ## 0.38.22 — pool lanes setting, hold --allow-pinned, starting runs are not legacy, timeouts read interrupted, pool toggle record, build --check hint
27
+
28
+ - `bullswarm run --lane build` without `--check` prints one hint on stderr before it dispatches (`hint: no --check, so this build can only finish unproven; ...`), and the skill's first single-step example is a build with `--check`. Why: in the week to 14 Nov none of 19 single-step builds used `--check`, and 23 of 49 OK builds were proven by nothing. Not printed for analyze, chore, `--dry-run` or usage exits; `--json` stdout is unchanged (#85).
29
+
30
+ - Every pool enable or disable records who, when, why and through which command: `strategy set-provider <pool> on|off --yes [--reason <text>]`, the strategy TUI toggle, `strategy configure` and setup store `{enabled, at, by, reason, via}` under `strategy` in state.json (latest per pool plus a capped history). `by` is the OS user name; no environment value is recorded. `bullswarm pools` shows `disabled since <time> by <by>: <reason>`; `pools --json` and `strategy inventory --json` carry a `toggle` field (#86).
31
+
32
+ - A step stopped by its own `--timeout` is failure kind `interrupted` on every pool, as the help says. `classifyFailure` checked the exit code before `timedOut`, so a Claude worker that exited with a code after SIGTERM read `process` (the same 540 s timeout read `process` on one pool and `interrupted` on another). A non-zero exit without a timeout is still `process` (#87).
33
+
34
+ - `bullswarm strategy set-lanes <pool> <lane,...|default> --yes` chooses which lanes a pool serves instead of only its `connector.json` lanes, stored at `strategy.laneOverrides[pool]`; `default` clears it. Routing, `bullswarm pools` (`lanes=analyze (set-lanes)`), `workflow capabilities`, `strategy inventory`, stats, setup, plan validate and pick preview all read one resolver. A pinned dispatch for a lane the pool no longer serves is refused before any worker starts, naming the setting and how to clear it (#88).
35
+
36
+ - bench: the frozen biweekly eval suite (`bench/eval-suite/`: four tasks with hidden tests, `run-bench.mjs`, and the real-use `scorecard.mjs`). The scorecard no longer counts not-produced attempts as stalls, and the runner waits for a launched run's state.json before it watches. Development only; not in the CLI (#71).
37
+
38
+ - `bullswarm strategy hold <pool> ... --allow-pinned --yes` keeps a pool out
39
+ of every pick routing makes on its own while still letting a run that pins
40
+ it use it. These count as pinned: the run pin (`workflow goal
41
+ --worker-pool`, a step restart onto the pool) and a step route that names
42
+ the pool in `pools.use` or its provider in `providers.use` (`bullswarm run
43
+ --use-provider command-code`). An avoid list (`--avoid-pool`,
44
+ `--avoid-provider`) is not a pin, even when it leaves the held pool the
45
+ only one. The flag takes no value (`--allow-pinned=true` is refused). An
46
+ allow-pinned hold stores `allowPinned: true` (also in `pools --json`); a
47
+ plain hold prints and stores exactly what it did before.
48
+ `bullswarm pools` shows `held until <date> (<reason>) · pinned runs
49
+ allowed`, and the reason on an unpinned pick that kept the pool out says
50
+ the same. One rule (pool-limits.js `holdPins`) serves the router (R14),
51
+ the dispatch's no-pool reason, `run --dry-run` and plan validate. A plain
52
+ hold still keeps pinned runs out, and `workflow plan validate` and
53
+ `workflow goal` now refuse a program pinned (by `--worker-pool` or a route
54
+ that names only held pools) to a pool under a plain hold, since it could
55
+ not start. Holding again without the flag replaces the record.
56
+
57
+ - A run that is still starting is no longer called legacy. On 0.38.21 `workflow goal --json` returned after waiting 10 s for the detached kernel's state.json, the caller's `workflow watch <id> --until outcome` started at once and printed `legacy authored-graph run wf-...: its executor was removed in 0.27.0`, while the run was starting: its state.json appeared about 38 s after launch (2 of 4 launches in a benchmark). A run folder without state.json now counts as legacy only when nothing in it says a new run is starting (its kernel.lock, features.json with `programFormat: 3`, caller.json, or a live launcher process). `watch` waits for a starting run with one `watching <runId> · starting` line and attaches when state.json appears, or prints `run <runId> stopped before it started` with the kernel log and exits 1 when the kernel is gone first; `runs show`, `runs result`, `runs`, `tui` and the dashboard (its Run and Step pages too) show it as starting, and driving verbs, `cancel` and `tui --cancel` print the starting line and exit 2. The wait for a starting run counts against `watch --timeout`, and without one lasts at most 10 minutes (`STARTING_WAIT_MS`); past it the watch exits 0 with a `next:` relaunch line. A kernel.lock counts as a live starter only while its pid still has the identity the lock recorded, so a lock left by a killed kernel whose pid was reused never keeps a run starting. A launcher that died before the run folder existed is reported as stopped before it started, with its log, not `no run found`. The launch now waits for the state.json for as long as the child lives, at most 5 minutes (`LAUNCH_STATE_WAIT_MS`), so the shortId it returns can be watched at once; the `--json` output is unchanged.
58
+
3
59
  ## 0.38.21 — named quota resets hold, sign-in holds, a 99% 5-hour wall, loops that end themselves, saved stale warnings
4
60
 
5
61
  - A quota reset the provider named now outlives a meter read. Until now the
package/README.md CHANGED
@@ -39,9 +39,9 @@ flowchart LR
39
39
  - **Runs one task or a whole workflow.** `bullswarm run` is a one-step workflow: one task to one agent, one automatic retry, and an optional answer checked against a JSON schema. For bigger goals your main agent writes a program from four blocks: steps (each with an optional checked answer), phases that group them, gates where the run waits for you, and loops that repeat steps until a condition holds, such as "until the tests pass". Independent steps run in parallel across agents, and a step can be routed away from the agents that did the work it checks.
40
40
  - **Checks the work, not the exit code.** A delegate saying "done" isn't enough. Bullswarm reads what it actually produced, runs the checks a step declares (a command, a schema), checks each answer itself, and labels every finished step by what backs it: `proven by command` (a check Bullswarm ran passed), `answer checked` (the answer is well formed, which is a claim, not proof), or `unproven`. A run reports these facts, not a verdict; `verified` requirements belong to old v2 programs only.
41
41
  - **Shows everything live.** A terminal dashboard covers quota, history, running workflows and each agent's individual turns.
42
- - **Works with the agent you already use.** The `/bullswarm` skill teaches Claude Code, Codex and Grok when to delegate. There's also an early-access Claude Code Mod that shows runs and usage inside Claude Code.
42
+ - **Works with the agent you already use.** The `/bullswarm` skill teaches Claude Code, Codex, Grok and AGY when to delegate. There's also an early-access Claude Code Mod that shows runs and usage inside Claude Code.
43
43
  - **Lets you steer mid-run.** Add steps, gates or loops while a workflow runs (`workflow add`, also straight from a step's answer), continue a waiting gate or give a loop more rounds, rerun a step, or pause and resume it.
44
- - **Extends with providers.** Claude Code, Codex and Grok are built in. Other CLIs can be added as providers without touching the core.
44
+ - **Extends with providers.** Claude Code, Codex, Grok and AGY (Google Antigravity) are built in. Other CLIs can be added as providers without touching the core.
45
45
 
46
46
  ## See it
47
47
 
@@ -102,6 +102,7 @@ To set things up by hand, or to choose models and reasoning yourself, see [Getti
102
102
  | Claude Code | Built in | weekly + 5-hour | `claude -p` |
103
103
  | Codex | Built in | weekly | `codex exec` |
104
104
  | Grok | Built in | weekly | `grok -p` |
105
+ | AGY (Google Antigravity) | Built in | weekly + 5-hour (Gemini and Claude/GPT groups) | `agy -p` |
105
106
  | OpenCode | Contributed | none | `opencode run --auto` |
106
107
  | Command Code | Contributed | weekly + monthly + 5-hour | `command-code -p` |
107
108
 
package/bin/bullswarm.js CHANGED
@@ -5,13 +5,16 @@ import { cachedCall, cachedCallMain } from '../src/lib/pools-cache.js';
5
5
 
6
6
  const argv = process.argv.slice(2);
7
7
 
8
+ // `--version` / `version` needs neither the CLI module graph nor BULLSWARM_HOME.
8
9
  // `pools`, `workflow runs` and `assignments` with `--json --max-age <s>` are
9
10
  // what every Claude session's mod asks on a timer: answer them from the shared
10
11
  // cache before loading the rest of the CLI, which alone is ~280 MB RSS. Only
11
12
  // the caller that rebuilds loads it.
12
- const run = cachedCall(argv) !== null
13
- ? cachedCallMain(argv)
14
- : import('../src/cli.js').then((m) => m.main(argv));
13
+ const run = argv.length === 1 && (argv[0] === '--version' || argv[0] === 'version')
14
+ ? import('../src/lib/version.js').then((m) => { console.log(m.getVersion()); return 0; })
15
+ : cachedCall(argv) !== null
16
+ ? cachedCallMain(argv)
17
+ : import('../src/cli.js').then((m) => m.main(argv));
15
18
 
16
19
  run.then(
17
20
  (code) => { process.exitCode = code; },