Store tool-result content compressed in its own column
This commit is contained in:
@@ -10,6 +10,8 @@ Add SQL migrations in `internal/store/migrations/` as `NNN-name.sql`. The number
|
||||
|
||||
Migrations up to a threshold are folded into `100-baseline.sql`, the schema as they left it, and no data conversion survives below it. A database that hasn't applied the migration `baselineThrough` names (in `internal/store/store.go`) is refused at startup as too old; one that has is marked as on the baseline. To move the threshold up, apply the migrations to be folded to an empty database, dump its schema into the baseline file in place of the old one, delete those migrations' files, and set `baselineThrough` to the last one's name.
|
||||
|
||||
Tool output is most of the database, so an `agent.tool_result` event's `content` is kept zstd-compressed in the `events.content` column, outside `payload`. The store splits it out on write and puts it back on read, so nothing above the store sees the difference. It never goes in an index or a `json_extract`, and a `sqlite3` query on `payload` won't see it. At startup byre runs `VACUUM` when at least a quarter of the file's pages are free, so a migration that shrinks rows gives the space back.
|
||||
|
||||
## Worktrees
|
||||
|
||||
byre runs nothing in a new worktree. Installing dependencies or copying untracked files such as `.env` is the project's own instruction in its AGENTS.md, carried out by the agent with its own tools.
|
||||
|
||||
Reference in New Issue
Block a user