Replace synthetic-message instruction injection with a durable
discovery projection so discovered AGENTS.md files survive compaction,
forks, reverts, and restarts.
- Add the instruction_file table and the durable
session.instructions.discovered event; projection stores each
discovered path and content with its owning assistant-message
boundary and durable discovery order.
- Fold discovered files into the core/instructions source through
InstructionDiscovery, absorbing SessionInstructions. Completed
compaction rebaselines restate discovered instructions instead of
summarizing them away.
- Re-read discovered files live at each observation so mid-session
edits reach the model; the frozen discovery content stands in only
when a file becomes unreadable.
- Narrate instruction file changes as per-file deltas via diffByKey,
restating the full set only for pure reorderings.
- Fork copies discoveries within the inherited transcript, committed
revert removes discoveries past the revert boundary, and Session
movement clears them so the destination initializes a complete
baseline.
Refactored skill discovery to download skills in parallel instead of sequentially,
reducing load times when multiple skills need to be fetched from remote URLs.
Also updated AGENTS.md with guidance on using dev branch for diffs.
This release has a bunch of minor breaking changes if you are using opencode plugins or sdk
1. storage events have been removed (we might bring this back but had some issues)
2. concept of `app` is gone - there is a new concept called `project` and endpoints to list projects and get the current project
3. plugin receives `directory` which is cwd and `worktree` which is where the root of the project is if it's a git repo
4. the session.chat function has been renamed to session.prompt in sdk. it no longer requires model to be passed in (model is now an object)
5. every endpoint takes an optional `directory` parameter to operate as though opencode is running in that directory