- openai_compat: extract reasoning_content from streaming SSE deltas,
benefiting providers like DeepSeek, Mimo, and Kimi that return
chain-of-thought content in streamed chunks
Media handling refactor (addresses review feedback):
- agent: centralize video/audio inline decisions in resolveMediaRefs
with provider capability gating via VideoCapable/AudioCapable interfaces
- agent: add mediaInlinePolicy + mediaInlinePolicyFromProvider() to probe
provider capabilities before encoding media as data URLs
- agent: add size guard via encodeMediaToDataURL (respects MaxMediaSize)
- providers: add VideoCapable and AudioCapable interfaces (same pattern as
ThinkingCapable/NativeSearchCapable)
- openai_compat: implement SupportsVideo/SupportsAudio for Mimo, Qwen,
OpenAI (host and providerName detection)
- httpapi: delegate SupportsVideo/SupportsAudio through HTTPProvider
- httpapi: GeminiProvider declares video + audio support
- common: add video_url serialization in SerializeMessages (now reachable
via the centralized pipeline); fix missing continue after audio branch
- Tests for capability detection, inline policy, oversized media skip,
and provider-unsupported media fallback to path tags
Drop the old agent EventBus, SubscribeEvents/EventDrops public surface, legacy hook observer dispatch, and hook.event process notification path. Agent observations now flow through pkg/events runtime events.
Validation: go test ./pkg/agent; make lint
Migrate hook observation to runtime events and update the process hook notification protocol. Add runtime event publication for message bus failures, channel lifecycle/outbound flow, gateway reloads, MCP server state, and MCP tool calls.
Validation: go test ./pkg/events/... ./pkg/bus ./pkg/agent ./pkg/channels ./pkg/mcp ./pkg/tools/integration ./pkg/gateway; make lint
Introduce pkg/events with filtered channels, subscription policies, backpressure, and stats. Wire AgentLoop to dual-publish legacy agent events into runtime events while preserving old event APIs.
Validation: go test ./pkg/events/... ./pkg/agent; go test -race ./pkg/events/...; make lint
- centralize web search provider readiness and resolution logic
- fall back when the configured provider is unavailable or invalid
- allow native-search-capable models to use built-in search without the client tool
- simplify the tools page and add direct access to web search settings
- add backend, agent, and integration tests for the new selection behavior