bullswarm 0.38.22 → 0.40.1

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 (60) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/README.md +3 -2
  3. package/bin/bullswarm.js +6 -3
  4. package/data/openrouter-benchmarks.json +20026 -16457
  5. package/docs/guide/getting-started.md +1 -1
  6. package/docs/guide/routing.md +4 -0
  7. package/docs/index.md +1 -1
  8. package/docs/integrations/agent-clis.md +9 -7
  9. package/docs/integrations/claude-code.md +2 -2
  10. package/docs/reference/cli.md +24 -6
  11. package/docs/reference/configuration.md +7 -5
  12. package/docs/reference/providers.md +47 -3
  13. package/mods/bullswarm/hooks/names.ts +7 -4
  14. package/mods/bullswarm/hooks/step.ts +20 -6
  15. package/package.json +1 -1
  16. package/providers/contrib/README.md +1 -1
  17. package/skill/references/operations.md +1 -1
  18. package/src/caps-cli.js +144 -0
  19. package/src/cli.js +86 -48
  20. package/src/help.js +102 -14
  21. package/src/home-cli.js +1 -1
  22. package/src/integrate.js +193 -31
  23. package/src/lib/caller.js +28 -11
  24. package/src/lib/caps.js +326 -0
  25. package/src/lib/cli-flags.js +8 -2
  26. package/src/lib/config.js +1 -1
  27. package/src/lib/forecast.js +2 -1
  28. package/src/lib/spend.js +7 -4
  29. package/src/lib/state.js +184 -11
  30. package/src/lib/strategy.js +202 -31
  31. package/src/lib/tasks.js +2 -1
  32. package/src/meters/registry.js +11 -2
  33. package/src/provider-cli.js +2 -1
  34. package/src/providers/README.md +2 -2
  35. package/src/providers/agy/connector-history.json +306 -0
  36. package/src/providers/agy/connector.json +425 -0
  37. package/src/providers/agy/provider.mjs +345 -0
  38. package/src/setup.js +78 -20
  39. package/src/strategy-cli.js +129 -43
  40. package/src/workflow/cli-capabilities.js +7 -1
  41. package/src/workflow/cli-goal.js +15 -2
  42. package/src/workflow/cli-inspect.js +37 -12
  43. package/src/workflow/cli-plan.js +4 -3
  44. package/src/workflow/cli-pool-checks.js +13 -9
  45. package/src/workflow/cli-run-verbs.js +11 -4
  46. package/src/workflow/cli-step-verbs.js +6 -2
  47. package/src/workflow/cli-steps.js +6 -3
  48. package/src/workflow/cli.js +28 -19
  49. package/src/workflow/dispatch-silence.js +2 -1
  50. package/src/workflow/metrics-legacy.js +14 -5
  51. package/src/workflow/pick-preview.js +2 -1
  52. package/src/workflow/reconcile.js +40 -17
  53. package/src/workflow/reprice-cli.js +2 -0
  54. package/src/workflow/reprice.js +42 -17
  55. package/src/workflow/runs-cli.js +15 -10
  56. package/src/workflow/usage-view.js +3 -3
  57. package/src/workflow/v2-dispatch.js +57 -5
  58. package/src/workflow/v2-runtime.js +11 -0
  59. package/src/workflow/watch-cli.js +19 -0
  60. package/src/workflow/workflow-flags.js +1 -1
package/CHANGELOG.md CHANGED
@@ -2,6 +2,37 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 0.40.1 — Concurrency caps (fixed)
6
+
7
+ - 0.40.0 was tagged but never published: its release check caught a race in the caps. Two steps that arrived in the same millisecond were ordered by a random id, so a newcomer could sort ahead of a step already running and both ran at a cap of 1. A slot that may run is now marked admitted, a waiting step never overtakes one, and arrival times are sub-millisecond.
8
+
9
+ - A herdr pane id whose pane part has capital letters (`w12:pA`, `w6:p5Z`) is now recorded as the caller's pane, accepted by `caps set --pane`, and matched by pane caps. Before, such a caller was recorded with no pane, so only a `--cwd` cap could match it.
10
+
11
+ ## 0.40.0 — Concurrency caps
12
+
13
+ - Concurrency caps (`bullswarm caps`). A caller (a lead) can be capped at N steps at once; a step over its caller's cap queues in arrival order and starts when a slot frees, instead of all of them running at once. A caller is matched by `--caller <name>` / `BULLSWARM_CALLER`, then its herdr pane, then the longest launch-directory prefix; every workflow step counts, and a worker's nested run never does. A per-pool cap (`caps set-pool claude-code:w 8`) is the backstop: a pool at its cap sits out picks, and a step no other pool can take waits. `run --no-wait` / `workflow goal --no-wait` refuse at launch instead of queueing. `workflow watch` shows the wait. With no caps set nothing changes.
14
+
15
+ ## 0.39.0 — AGY: Google Antigravity as a first-class provider
16
+
17
+ - `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).
18
+ - 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.
19
+
20
+ - 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.
21
+
22
+ - 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.
23
+
24
+ - `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".
25
+
26
+ - 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>`).
27
+
28
+ - 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).
29
+
30
+ - 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.
31
+
32
+ - `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.
33
+
34
+ - 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.
35
+
5
36
  ## 0.38.22 — pool lanes setting, hold --allow-pinned, starting runs are not legacy, timeouts read interrupted, pool toggle record, build --check hint
6
37
 
7
38
  - `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).
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; },