Commit Graph

7 Commits

Author SHA1 Message Date
JackChen e696d877e7 fix: address second-round review findings
- 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
2026-04-03 15:24:41 +08:00
JackChen a49b24c22a fix: address code review findings
- 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
2026-04-03 15:11:45 +08:00
JackChen f4d3bb4e8d feat: add onTrace observability callback (#18)
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.
2026-04-03 15:07:09 +08:00
JackChen 99b028dc1d
fix: address Codex review for structured output (#36) (#38)
- 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
2026-04-03 14:08:27 +08:00
JackChen fbc5546fa1
feat: add optional outputSchema (Zod) for structured agent output (#36)
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
2026-04-03 13:45:47 +08:00
JackChen 62d6fa9e26 feat: add baseURL and apiKey support for OpenAI-compatible APIs
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
2026-04-02 19:33:10 +08:00
JackChen a6244cfe64 Initial release: open-multi-agent v0.1.0
Production-grade multi-agent orchestration framework.
Model-agnostic, supports team collaboration, task scheduling
with dependency resolution, and inter-agent communication.
2026-04-01 04:33:15 +08:00