mirror of
https://github.com/garrytan/gbrain.git
synced 2026-07-29 16:39:15 +00:00
chore: bump version and changelog (v0.42.15.0)
Decouple CLI primary output from process.stdout.isTTY (#1784): human by default, JSON only with --json; jobs watch non-TTY one-shots; eval banners annotate non-interactive defaults; reindex-code refusal is human unless --json. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
b683855eb8
commit
be2d91d0e7
@@ -2,6 +2,43 @@
|
||||
|
||||
All notable changes to GBrain will be documented in this file.
|
||||
|
||||
## [0.42.15.0] - 2026-06-02
|
||||
|
||||
**Commands print real data when you run them from a subagent, a pipe, or cron, not just when you have a terminal.** A handful of gbrain commands quietly changed what they printed based on whether a terminal was attached. Run them from a coding agent, a `| cat` pipe, or a cron job and you'd get JSON when you wanted human text, or nothing useful at all. The read commands (`get`, `list`, `search`, `query`) were already fine; this fixes the ones that weren't.
|
||||
|
||||
The clearest case was `gbrain jobs watch`. In a terminal you got the live dashboard; piped or from a subagent you got an endless stream of JSON with no way to a human view. Now the rule is simple and the same for every command: **human output by default, JSON only when you pass `--json`.** A terminal still controls cosmetics (the live cursor-managed dashboard, colors), never the data.
|
||||
|
||||
```
|
||||
gbrain jobs watch # terminal: live dashboard. piped: one human snapshot, then exits.
|
||||
gbrain jobs watch --json # one JSON snapshot (machine-readable)
|
||||
gbrain jobs watch --follow # stream continuously (human, or JSONL with --json)
|
||||
```
|
||||
|
||||
`jobs watch` split into two independent knobs: `--json` picks the format, `--follow` picks the cadence. Non-interactive runs print one snapshot and exit (clean for capture), so a subagent that just wants the current queue state gets it in one shot instead of a loop it has to kill.
|
||||
|
||||
### What else changed
|
||||
|
||||
- **`gbrain reindex --code` refusal is now readable.** When it declines to spend money re-embedding without `--yes` in a non-interactive shell, it now prints a plain-English refusal instead of a JSON error blob (JSON only with `--json`). The safety behavior is unchanged: it still refuses and exits 2 rather than spending unconfirmed.
|
||||
- **The eval commands stop hiding why they did less work.** `gbrain eval cross-modal` and `gbrain eval takes-quality` run fewer cycles non-interactively (a deliberate cost guard). They already printed the cycle count; now the line says *why* it's low and how to change it: `cycles: 1 (non-interactive default; --cycles N for more)`. Same for the `$1` budget default on `gbrain eval suspected-contradictions` (`--budget-usd N to raise`).
|
||||
|
||||
Nothing here changes a TTY/interactive session: the live `jobs watch` dashboard, prompts, and your normal terminal output are all identical.
|
||||
|
||||
## To take advantage of v0.42.15.0
|
||||
|
||||
`gbrain upgrade` is all you need. There's no migration and no schema change.
|
||||
|
||||
1. **Update:**
|
||||
```bash
|
||||
gbrain upgrade
|
||||
```
|
||||
2. **Verify the fix:** run a command non-interactively and confirm you get real output.
|
||||
```bash
|
||||
gbrain jobs watch </dev/null | cat # one human snapshot, exits 0
|
||||
gbrain jobs watch --json </dev/null | cat # one JSON line
|
||||
```
|
||||
3. **If you scripted `gbrain jobs watch` for a JSON stream non-interactively,** add `--json --follow` to keep the old streaming behavior. (For scripting, `gbrain jobs stats --json` / `gbrain jobs list --json` remain the cleaner surfaces.)
|
||||
4. **If anything looks wrong,** file an issue at https://github.com/garrytan/gbrain/issues with the command you ran and what you saw.
|
||||
|
||||
## [0.42.10.0] - 2026-06-02
|
||||
|
||||
**Wikilinks like `[[struktura]]` that point at pages in another folder finally connect.** Until now, if you wrote `[[struktura]]` in `concepts/knowledge-graph.md` and the actual page lived at `projects/struktura.md`, GBrain silently dropped the link from its graph. Obsidian users saw a dense web of connections in their vault and a thin, broken graph inside GBrain. The issue reporter had 71 wikilinks across 20 pages — GBrain captured 12.
|
||||
|
||||
@@ -1,5 +1,26 @@
|
||||
# TODOS
|
||||
|
||||
## v0.42.15.0 isTTY-output follow-ups (v0.42+)
|
||||
|
||||
Filed from the v0.42.15.0 wave (#1784, decouple primary output from
|
||||
`process.stdout.isTTY`). Both are the same axis-conflation class the wave fixed
|
||||
but were deliberately scoped OUT — neither is a #1784 regression.
|
||||
|
||||
- [ ] **P2 — `sync.ts:2491` emits a JSON cost-refusal even without `--json`.** The
|
||||
`gbrain sync --all` cost gate has the byte-identical pattern that
|
||||
`reindex-code.ts:457` had before #1784: non-TTY or `--json` → JSON envelope +
|
||||
exit 2, conflating "refuse to spend" with "machine-readable output." The
|
||||
refusal should be human text unless `--json` is explicit. Out of scope for
|
||||
#1784 because the sync cost-gate is documented as intentional in CLAUDE.md and
|
||||
deserves its own deliberate change. Fix: mirror the extracted
|
||||
`buildCostRefusal({json, ...})` helper (`reindex-code.ts`). The guardrail
|
||||
(exit 2, no spend) stays; only the FORMAT splits on `--json`.
|
||||
- [ ] **P3 — `gbrain jobs --help` has no subcommand list.** jobs.ts dispatches
|
||||
on a bare subcommand string with no HELP const, so `watch` (and every other
|
||||
jobs subcommand) is undocumented in `--help`. The new `watch` `--json` /
|
||||
`--follow` flags are documented only in the file JSDoc. Add a HELP table to the
|
||||
`jobs` command listing every subcommand + its flags.
|
||||
|
||||
## v0.42.7.0 extract-in-default-loop follow-ups (v0.42+)
|
||||
|
||||
Filed from the v0.42.2.0 wave (#1696 link/timeline extraction freshness
|
||||
|
||||
+1
-1
@@ -142,5 +142,5 @@
|
||||
"bun": ">=1.3.10"
|
||||
},
|
||||
"license": "MIT",
|
||||
"version": "0.42.10.0"
|
||||
"version": "0.42.15.0"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user