@brainbase-labs/cli 0.46.0 → 0.48.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 +22 -22
  2. package/dist/index.js +2078 -965
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -53,8 +53,9 @@ brainbase task send <task-id> "Use the revised approach instead" --json
53
53
  brainbase task stop <task-id>
54
54
  ```
55
55
 
56
- `send` prints the input ID and generation to stderr before submitting and reports delivery
57
- status in stdout. Initial acceptance can say **delivery pending** while the
56
+ `send` reports the input ID and delivery status in stdout. The input ID and
57
+ generation needed to recover a send are printed only when one did not finish:
58
+ on an error, on an unconfirmed receipt, or when it is interrupted. Initial acceptance can say **delivery pending** while the
58
59
  server determines whether native steering is available. Native steering follows
59
60
  the harness's own timing. A confirmed fallback says **queued for the next turn**.
60
61
  `submitted` means the harness has received the input; it does not mean the agent
@@ -67,8 +68,8 @@ Resource-scoped keys can lack that read access when task-read enforcement is ena
67
68
  If the read fails, no mutation is sent. Use `--generation <n>` to bypass the read only
68
69
  with a trusted current cutoff for a new operation, or the original cutoff for a retry.
69
70
  A concurrent Stop prevents a send from joining newer work with an older generation.
70
- If the HTTP response is lost or you press Ctrl-C, keep the input ID and generation,
71
- and repeat the exact message with `--input-id <uuid> --generation <n>` to recover that request safely. Reusing an ID
71
+ If the HTTP response is lost or you press Ctrl-C, the command prints the input ID and generation;
72
+ repeat the exact message with `--input-id <uuid> --generation <n>` to recover that request safely. Reusing an ID
72
73
  does not replay an existing input. A **delivery unconfirmed** receipt means
73
74
  the agent may already have received the instruction; deliberately resend
74
75
  without `--input-id` only if you want to retry it as a new input.
@@ -97,15 +98,18 @@ this confirms admission or delivery, not task success.
97
98
 
98
99
  ## Renaming and labelling tasks
99
100
 
100
- Change a task's title or its metadata labels, including while it runs:
101
+ Change a task's title, its metadata labels or its model, including while it runs:
101
102
 
102
103
  ```sh
103
104
  brainbase task update <task-id> --title "Nightly smoke run" --metadata env=staging
104
105
  brainbase task update <task-id> --unset-metadata env --json
106
+ brainbase task update <task-id> --model claude-sonnet-5-5
105
107
  ```
106
108
 
107
109
  `--metadata` and `--unset-metadata` keep every label you do not name.
108
- `--clear-metadata` removes them all, and `--clear-title` removes the title. See
110
+ `--clear-metadata` removes them all, and `--clear-title` removes the title.
111
+ `--model` switches the model the task's next turn runs on; a turn already
112
+ running keeps its model. See
109
113
  [the command reference](docs/reference/commands.mdx) for every flag.
110
114
 
111
115
  ## Benchmark management
@@ -332,7 +336,7 @@ Playbook files carry a small YAML frontmatter (`title`, `description`) — the C
332
336
  | `BRAINBASE_API_URL` | Legacy KLS host override. Control requests use `/api/cli`; it is also the fallback for model-proxy and registry traffic. |
333
337
  | `BRAINBASE_PROXY_URL` | Override the model-proxy host used when enabling harness tracking. |
334
338
  | `BRAINBASE_REGISTRY_URL` | Override the registry API host. |
335
- | `BRAINBASE_TOKEN` | Use a PAT instead of the stored login session. The only way a PAT authenticates a control-plane command — see [Auth](#auth). |
339
+ | `BRAINBASE_TOKEN` | Use a PAT instead of the stored login session. Outranks both the session and the PAT saved in `token.json`. See [Auth](#auth). |
336
340
  | `BRAINBASE_HOME` | Where local state lives (default: `~/.brainbase`) |
337
341
 
338
342
  Model-proxy and registry traffic fall back through `BRAINBASE_API_URL`,
@@ -340,30 +344,26 @@ the server captured at login, and finally `https://api.v1.brainbaselabs.com`.
340
344
 
341
345
  ## Auth
342
346
 
343
- Three credentials, and which ones a command considers depends on the service
344
- it talks to:
347
+ Every command tries three credentials, in this order:
345
348
 
346
- | Commands | Credentials tried, in order |
347
- |-|-|
348
- | `agent`, `orchestration`, `link`, `unlink`, `sync`, `status`, `team` | `BRAINBASE_TOKEN`, then the `auth.json` session |
349
- | `template`, `skill`, `token` | `BRAINBASE_TOKEN`, then the session, then `token.json` |
350
- | `task` commands | `BRAINBASE_TOKEN`, then the session, then `token.json` — the last only when no session is configured |
351
- | `benchmark` control-plane commands | `BRAINBASE_TOKEN`, then the session |
349
+ 1. `BRAINBASE_TOKEN`
350
+ 2. the `auth.json` login session, renewed first if it has expired
351
+ 3. the PAT that `brainbase token create` saved in `~/.brainbase/token.json`,
352
+ when there is no session or it could not be renewed. A PAT minted by a
353
+ different account than the session is never used in its place.
352
354
 
353
- `brainbase whoami` (or `--json`) reports which one is active.
355
+ `brainbase whoami` (or `--json`) reports which one is active. It renews an
356
+ expired session itself, so what it reports is what the next command will use.
354
357
 
355
- **For CI:** `brainbase token create` saves the PAT to `~/.brainbase/token.json`,
356
- and control-plane commands never read that file — `brainbase agent push` needs
357
- the token in `BRAINBASE_TOKEN`:
358
+ **For CI:** a runner has no `token.json`, so hand it the PAT as a secret:
358
359
 
359
360
  ```bash
360
361
  export BRAINBASE_TOKEN=bbpat_…
361
362
  brainbase agent push
362
363
  ```
363
364
 
364
- Do not bake a `~/.brainbase` directory into a build image: a leftover
365
- `auth.json` outranks the stored PAT, and every control-plane command starts
366
- failing once its session expires.
365
+ Do not bake a `~/.brainbase` directory into a build image. Ship
366
+ `BRAINBASE_TOKEN` as a secret instead.
367
367
 
368
368
  An explicit PAT does not inherit routing from a stored login. Set
369
369
  `BRAINBASE_CONTROL_PLANE_URL` when using a PAT against a non-default MAS host.