v0.3.1 — Agent MD frontmatter support
Bug fix: read fallback_models from agent.options (MD frontmatter shape)
When agents are defined in .opencode/agents/<name>.md YAML frontmatter (the pattern used by harness-based opencode projects that ship agents via symlinks), opencode relocates unknown frontmatter keys into a nested `options` sub-object before the plugin sees the merged config. Before this release, the plugin only read `agentConfig.fallback_models` at the top level — so frontmatter-authored chains silently resolved to empty.
After 0.3.1, both shapes work:
```json
// opencode.json — explicit top-level (existing behavior, still works)
{
"agent": {
"coder": {
"fallback_models": ["openai/gpt-5.4"]
}
}
}
```
```yaml
.opencode/agents/coder.md — frontmatter (new in 0.3.1)
model: anthropic/claude-opus-4-6
fallback_models:
- openai/gpt-5.4
- kimi-for-coding/k2p5
```
Top-level entries win over frontmatter when both are set, so consumers can override upstream-shipped chains via their own `opencode.json`.
Source reference
Opencode's config merge happens at `packages/opencode/src/config/config.ts:536-540` — unknown frontmatter keys get folded into `agent.options` via the schema's `.catchall` transform. The plugin's `config` hook receives the fully-merged `cfg` object after this relocation runs.
Tests
- 390/390 pass (3 new: MD frontmatter shape, both-shapes precedence, options-but-no-fallback_models)