@brainbase-labs/cli 0.27.0 → 0.28.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.
- package/README.md +85 -3
- package/dist/index.js +5824 -1357
- package/package.json +2 -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
|
|
@@ -97,9 +159,28 @@ remains their final cleanup boundary. Isolated evaluator workspace copies omit
|
|
|
97
159
|
|
|
98
160
|
## Development
|
|
99
161
|
|
|
100
|
-
|
|
101
|
-
`dist/index.js` is committed
|
|
102
|
-
can produce different bundle
|
|
162
|
+
Build with the Bun version in `.bun-version` (currently 1.3.10) — CI and both
|
|
163
|
+
release workflows read that file. The generated `dist/index.js` is committed
|
|
164
|
+
and byte-checked in CI, and Bun patch releases can produce different bundle
|
|
165
|
+
output.
|
|
166
|
+
|
|
167
|
+
### Releasing
|
|
168
|
+
|
|
169
|
+
1. Run **Prepare Release** from `main` with the exact version. It refuses a
|
|
170
|
+
version already on npm, or a `release/*` branch or tag that already exists,
|
|
171
|
+
then pushes the branch and prints a link to open the pull request. The org
|
|
172
|
+
does not let Actions open pull requests, so that last step is yours.
|
|
173
|
+
2. Merge the release pull request. CI checks any pull request that moves the
|
|
174
|
+
version, or comes from a `release/*` branch, against npm — so a hand-made
|
|
175
|
+
release pull request is held to the same bar as a generated one.
|
|
176
|
+
3. Run **Publish**, naming the same version. It refuses to run if the commit
|
|
177
|
+
it checked out declares a different one, and the tarball's `dist/index.js`
|
|
178
|
+
must match the committed bundle.
|
|
179
|
+
|
|
180
|
+
Prepare and publish share a `release` concurrency group, so two releases queue
|
|
181
|
+
instead of interleaving. A published version is immutable: if a release goes
|
|
182
|
+
out without something you meant to include, ship the next version rather than
|
|
183
|
+
re-cutting the number.
|
|
103
184
|
|
|
104
185
|
## Agent runtime configuration
|
|
105
186
|
|
|
@@ -167,6 +248,7 @@ it talks to:
|
|
|
167
248
|
| `agent`, `orchestration`, `link`, `unlink`, `sync`, `status`, `team` | `BRAINBASE_TOKEN`, then the `auth.json` session |
|
|
168
249
|
| `template`, `skill`, `token` | `BRAINBASE_TOKEN`, then the session, then `token.json` |
|
|
169
250
|
| `task create` | `BRAINBASE_TOKEN`, then the session, then `token.json` — the last only when no session is configured |
|
|
251
|
+
| `benchmark` control-plane commands | `BRAINBASE_TOKEN`, then the session |
|
|
170
252
|
|
|
171
253
|
`brainbase whoami` (or `--json`) reports which one is active.
|
|
172
254
|
|