- Remove redundant `agent` re-declarations from trace subtypes
- Change TraceEventBase.type from `string` to literal union type
- Update onTrace callback type to `=> void | Promise<void>`
- Add readonly to onProgress/onTrace on OrchestratorConfig
- Remove Date.now() conditional guards (always capture timing)
- Auto-generate runId fallback when onTrace is set without runId
- Remove emitTrace from public API surface (keep generateRunId)
- Add TODO comments for runParallel()/runAny() trace forwarding
- Export TraceEventBase for consumer utility functions
- Make agent required on TraceEventBase (all subtypes already require it)
- Make model required on LLMCallTrace (always populated from RunnerOptions)
- Fix retryCount to use increment instead of attempt assignment
- Add TODO comments for prompt()/stream() trace forwarding
Add a lightweight onTrace callback to OrchestratorConfig that emits
structured span events for LLM calls, tool executions, task lifecycle,
and agent lifecycle. Zero overhead when not subscribed, zero new
dependencies.
- Include error feedback user turn in mergedMessages to maintain
alternating user/assistant roles required by Anthropic API
- Use explicit undefined check instead of ?? for structured merge
to preserve null as a valid structured output value
When `outputSchema` is set on AgentConfig, the agent's final text output
is parsed as JSON, validated against the Zod schema, and exposed via
`result.structured`. On validation failure a single retry with error
feedback is attempted automatically.
Closes#29
Enable connecting to any OpenAI-compatible API (Ollama, vLLM, LM Studio,
etc.) by adding baseURL and apiKey fields to AgentConfig and
OrchestratorConfig, threaded through to adapter constructors.
- OpenAIAdapter and AnthropicAdapter accept optional baseURL
- createAdapter() forwards baseURL to both adapters, warns if used with copilot
- All execution paths (runAgent, runTeam coordinator, buildPool) merge defaults
- Fully backward compatible — omitting new fields preserves existing behavior