Skip to content

v0.1.1 — variance fix + minimal example

Choose a tag to compare

@Alfredao Alfredao released this 16 May 20:31
· 58 commits to main since this release

Patch release. Two changes since v0.1.0.

Changes

fix(core): relax adapter registry to AgentToolDefinition<any,any,TCtx>

Previously the adapter signatures used `readonly AnyAgentToolDefinition[]`, which rejected arrays of tools with different concrete input/output shapes — the common case, since real registries hold tools with varying schemas.

TypeScript variance can't unify `AgentToolDefinition<ZodObject, Y, Ctx>` and `AgentToolDefinition<ZodObject

, Q, Ctx>` into a single `ZodTypeAny` array element because the `execute` parameter sits on the contravariant side.

Switched to `AgentToolDefinition<any, any, TCtx>` at the adapter-input position. Broader acceptance, never narrower — backward-compatible.

feat(examples): add minimal-product Next.js host consuming maestro-core

New workspace package examples/minimal-product — smallest viable Next.js 15 app demonstrating kernel wiring. Doubles as integration-test surface and onboarding template.

What it ships:

  • 3 tools (echo, addNumbers, getTime) showing ok, err, and context use patterns
  • In-memory port implementations for TurnStore, AuditStore, MemoryStore, QuotaStore
  • /api/chat route hand-wiring buildAiSdkTools + streamText with Anthropic
  • No React chat UI on purpose — POST + curl is the integration surface

Discovered the variance bug above during integration. Worked as intended.

Coming

0.2.0 ships runChatTurn — the full streaming chat-turn orchestrator. Hand-wiring in the example will collapse into one call. After that, barbeiro adopts (P4 → P5 → P6+ in the DESIGN.md migration plan).