@brainbase-labs/cli 0.27.1 → 0.29.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 (3) hide show
  1. package/README.md +70 -0
  2. package/dist/index.js +6752 -669
  3. package/package.json +3 -2
package/README.md CHANGED
@@ -22,10 +22,72 @@ brainbase template search # find templates published by your team
22
22
  brainbase template onboard <creator/slug> # install or refresh a template
23
23
  brainbase agent create # claim a local brainbase.agent.yaml
24
24
  brainbase task create --message "Review this project and propose next steps"
25
+ brainbase benchmark list # list benchmarks for the linked agent
25
26
  ```
26
27
 
27
28
  Run `brainbase help` to see every command.
28
29
 
30
+ ## Benchmark management
31
+
32
+ `benchmark init`, `benchmark validate`, and command help are local and need no
33
+ login or linked agent. Control-plane commands use the claimed agent in
34
+ `brainbase.agent.yaml` by default; pass `--agent <id>` to override it.
35
+
36
+ ```sh
37
+ # Scaffold and validate locally.
38
+ brainbase benchmark init ./benchmarks/support-quality
39
+ brainbase benchmark validate ./benchmarks/support-quality
40
+
41
+ # Create accepts manifests and directories without attached files.
42
+ brainbase benchmark create ./benchmarks/support-quality --json
43
+
44
+ # A directory containing cases/*/files/** must be imported as a bundle.
45
+ brainbase benchmark import bundle ./benchmarks/support-quality --json
46
+
47
+ # Publish and run the resulting draft.
48
+ brainbase benchmark publish <benchmark-id> --expected-version <version> --json
49
+ brainbase benchmark run plan <benchmark-id> \
50
+ --revision <revision-id> \
51
+ --variant default \
52
+ --json
53
+ brainbase benchmark run start <plan-id> --yes --json
54
+ brainbase benchmark run watch <run-id> --jsonl
55
+
56
+ # Inspect and export terminal results.
57
+ brainbase benchmark diagnoses <run-id> --json
58
+ brainbase benchmark export-results <run-id> --output ./results.zip
59
+ ```
60
+
61
+ `benchmark pull` and `benchmark push` round-trip the local directory layout:
62
+
63
+ ```text
64
+ benchmark.yaml
65
+ cases/<case-key>/case.yaml
66
+ cases/<case-key>/files/**
67
+ bundle/<original-bundle-path>
68
+ ```
69
+
70
+ `benchmark.yaml` carries a local-only `case_order` list so pull and push
71
+ preserve case ordering; it is not sent as part of the remote manifest.
72
+ Case-local files stay beside their case. Shared, hidden, and root-level bundle
73
+ paths are stored below `bundle/` while retaining their original remote paths.
74
+ Pull destinations must be absent or empty. Use a new directory to refresh a
75
+ benchmark instead of overwriting local edits.
76
+
77
+ Human-readable output is the default. `--json` emits one versioned envelope.
78
+ For paginated commands, it returns one page and its `next_cursor` unless
79
+ `--all` is set. `--jsonl` emits item and page-boundary records, while watch
80
+ emits state-change events. Resume with `--cursor`; structured modes never
81
+ prompt.
82
+
83
+ Idempotency is explicit-only: requests omit the idempotency header unless
84
+ `--idempotency-key` is supplied. Reuse a key only for an identical retry.
85
+ Starting a run requires `--yes`; confirming the same plan ID is replay-safe.
86
+ Interrupting `run watch` does not cancel the remote run.
87
+
88
+ Use `brainbase benchmark --help`, `brainbase benchmark run --help`, or
89
+ `brainbase benchmark <command> --help` for local command help.
90
+
29
91
  ## Benchmark runtime commands
30
92
 
31
93
  Managed benchmark workers invoke two machine-only commands inside the same
@@ -102,6 +164,13 @@ release workflows read that file. The generated `dist/index.js` is committed
102
164
  and byte-checked in CI, and Bun patch releases can produce different bundle
103
165
  output.
104
166
 
167
+ The suite is version-sensitive too, so the pin is enforced at each entry point:
168
+ `bun run verify` and `bun run build` refuse another Bun outright, and `bun test`
169
+ prints a warning and carries on. Each names the pinned version and the command
170
+ to get it: `npx bun@<pinned> …`. Use `npx` rather than `bunx` — bunx runs most
171
+ published Bun versions but cannot resolve a bin for 1.3.10 specifically, which
172
+ is the current pin. Set `SKIP_BUN_VERSION_CHECK=1` to override any of them.
173
+
105
174
  ### Releasing
106
175
 
107
176
  1. Run **Prepare Release** from `main` with the exact version. It refuses a
@@ -186,6 +255,7 @@ it talks to:
186
255
  | `agent`, `orchestration`, `link`, `unlink`, `sync`, `status`, `team` | `BRAINBASE_TOKEN`, then the `auth.json` session |
187
256
  | `template`, `skill`, `token` | `BRAINBASE_TOKEN`, then the session, then `token.json` |
188
257
  | `task create` | `BRAINBASE_TOKEN`, then the session, then `token.json` — the last only when no session is configured |
258
+ | `benchmark` control-plane commands | `BRAINBASE_TOKEN`, then the session |
189
259
 
190
260
  `brainbase whoami` (or `--json`) reports which one is active.
191
261