|
1 | 1 | # Changelog |
2 | 2 |
|
| 3 | +## [v0.2.0] - 2025-10-29 |
| 4 | + |
| 5 | +**Breaking Changes**: |
| 6 | +- Removed `pkg/capabilities` package - protocol handling now integrated directly into `pkg/types` |
| 7 | +- Removed `pkg/models` package - model abstraction replaced by `types.Model` runtime type |
| 8 | +- Removed `pkg/protocols` package - merged into `pkg/types` with protocol-specific request types |
| 9 | +- Removed `pkg/transport` package - renamed to `pkg/client` with enhanced retry logic |
| 10 | +- `Agent.Client()` now returns `client.Client` instead of `transport.Client` |
| 11 | +- `Agent.Model()` now returns `*types.Model` instead of `models.Model` |
| 12 | +- `Agent.ChatStream()` now returns `<-chan *types.StreamingChunk` instead of `<-chan types.StreamingChunk` |
| 13 | +- `Agent.VisionStream()` now returns `<-chan *types.StreamingChunk` instead of `<-chan types.StreamingChunk` |
| 14 | +- Configuration field `AgentConfig.Transport` renamed to `AgentConfig.Client` |
| 15 | + |
| 16 | +**Added**: |
| 17 | +- `pkg/types` package consolidating protocol types, request/response structures, and model runtime type |
| 18 | + - `Protocol` type with constants: `Chat`, `Vision`, `Tools`, `Embeddings` |
| 19 | + - Protocol-specific request types: `ChatRequest`, `VisionRequest`, `ToolsRequest`, `EmbeddingsRequest` |
| 20 | + - `ProtocolRequest` interface for unified request handling |
| 21 | + - `Model` runtime type with protocol-specific options |
| 22 | + - `NewModel()` function for creating models |
| 23 | + - `FromConfig()` function for converting `ModelConfig` to `Model` |
| 24 | + - `Protocol.SupportsStreaming()` method |
| 25 | + - `IsValid()` function for protocol validation |
| 26 | + - `ValidProtocols()` function returning all supported protocols |
| 27 | + - `ProtocolStrings()` function for display formatting |
| 28 | + - `ParseResponse()` function for protocol-aware response parsing |
| 29 | + - `ParseStreamChunk()` function for protocol-aware streaming chunk parsing |
| 30 | + - `ExtractOption[T]()` generic function for type-safe option extraction |
| 31 | + - `ToolDefinition` type for provider-agnostic tool definitions |
| 32 | + - Protocol-specific parsers: `ParseChatResponse()`, `ParseVisionResponse()`, `ParseToolsResponse()`, `ParseEmbeddingsResponse()` |
| 33 | + - Protocol-specific streaming parsers: `ParseChatStreamChunk()`, `ParseVisionStreamChunk()`, `ParseToolsStreamChunk()` |
| 34 | +- `pkg/client` package for HTTP client orchestration with retry logic |
| 35 | + - `Client` interface with `ExecuteProtocol()` and `ExecuteProtocolStream()` methods |
| 36 | + - `New()` function for creating clients from configuration |
| 37 | + - Exponential backoff retry logic with jitter for transient failures |
| 38 | + - Health tracking via `IsHealthy()` method |
| 39 | +- `pkg/config` package additions: |
| 40 | + - `ClientConfig` type replacing `TransportConfig` |
| 41 | + - `RetryConfig` type for configuring retry behavior |
| 42 | + - `DefaultClientConfig()` function |
| 43 | + - `DefaultRetryConfig()` function |
| 44 | + - `ClientConfig.Merge()` method |
| 45 | +- `pkg/agent` package additions: |
| 46 | + - `ErrorType` type for categorizing agent errors |
| 47 | + - `AgentError` type with detailed error context |
| 48 | + - `NewAgentError()` function |
| 49 | + - `NewAgentInitError()` helper function |
| 50 | + - `NewAgentLLMError()` helper function |
| 51 | + - Error option functions: `WithCode()`, `WithCause()`, `WithName()`, `WithClient()`, `WithID()` |
| 52 | +- `pkg/providers` package additions: |
| 53 | + - `PrepareStreamRequest()` method for streaming-specific request preparation |
| 54 | + - `ProcessStreamResponse()` method for streaming response processing |
| 55 | + |
| 56 | +**Changed**: |
| 57 | +- `Provider.GetEndpoint()` now accepts `types.Protocol` instead of `protocols.Protocol` |
| 58 | +- `Provider.PrepareRequest()` now accepts `types.ProtocolRequest` instead of separate protocol and request parameters |
| 59 | +- `Provider.ProcessResponse()` now accepts `types.Protocol` parameter for protocol-aware parsing |
| 60 | +- `Provider.Model()` now returns `*types.Model` instead of `models.Model` |
| 61 | +- Agent protocol methods now accept variadic options: `Chat()`, `ChatStream()`, `Vision()`, `VisionStream()`, `Tools()`, `Embed()` |
| 62 | +- Mock package types updated to use `pkg/types` and `pkg/client` instead of removed packages |
| 63 | + - `MockAgent` uses `client.Client` instead of `transport.Client` |
| 64 | + - Mock helper functions use `types.*` response types |
| 65 | + - `WithClient()` accepts `client.Client` |
| 66 | + |
| 67 | +**Removed**: |
| 68 | +- `Capability` interface and all capability-related types |
| 69 | +- `CapabilityRequest` type (replaced by protocol-specific request types) |
| 70 | +- `CapabilityOption` type |
| 71 | +- `StreamingCapability` interface |
| 72 | +- `StandardCapability` type |
| 73 | +- `StandardStreamingCapability` type |
| 74 | +- Capability registry and format registration system |
| 75 | +- `Model` interface from `pkg/models` |
| 76 | +- `ProtocolHandler` type |
| 77 | +- `TransportConfig` type (replaced by `ClientConfig`) |
| 78 | +- Model option merging and update methods |
| 79 | +- `MockModel` type |
| 80 | +- `MockCapability` type |
| 81 | + |
3 | 82 | ## [v0.1.3] - 2025-10-23 |
4 | 83 |
|
5 | 84 | **Changed**: |
|
0 commit comments