Releases: papi-ai/papi-core
Releases · papi-ai/papi-core
v0.9.1
v0.9
Changes in this release
- AgentBuilder — fluent builder API:
Agent::build()->provider($p)->model($m)->tools([...])->middleware([...])->create() - Exception hierarchy:
PapiException— base exception for all PapiAI errorsProviderException— provider errors with status code and response bodyRateLimitException— rate limit errors with optional retry-afterAuthenticationException— authentication failures
- CostEstimate — value object for estimating API call costs from token usage and model pricing
- 183 tests, 0 psalm errors
v0.8
Changes in this release
- Middleware pipeline —
MiddlewareInterfacecontract withprocess(AgentRequest, callable $next): Response - Agent refactored to run requests through a configurable middleware pipeline (backwards-compatible)
- AgentRequest value object representing a request flowing through middleware
- QueueInterface contract with
AgentJobandJobStatusfor async agent execution - Built-in middleware:
LoggingMiddleware— PSR-3 compatible logging (psr/log suggested, not required)CacheMiddleware— PSR-16 compatible response caching (psr/simple-cache suggested, not required)RateLimitMiddleware— in-memory token bucket rate limiter, zero dependenciesRetryMiddleware— configurable retry with exponential backoff, zero dependencies
- 167 tests, 81.6% coverage
v0.7
Changes in this release
- Add
TextToSpeechProviderInterfacecontract for TTS providers - Add
TranscriptionProviderInterfacecontract for STT providers - Add
ConversationStoreInterfacewithFileConversationStoreimplementation for conversation persistence - Add
AudioResponseandTranscriptionResponsevalue objects - Add
toArray()/fromArray()serialization toConversationandMessage - 140 tests, 83.5% coverage
v0.6
Changes in this release:
- EmbeddingProviderInterface — new contract for generating text embeddings via embed(string|array $input, array $options): EmbeddingResponse
- EmbeddingResponse — value object for embedding results with first(), dimensions(), count(), and usage tracking
- VectorStoreInterface — new contract for vector storage with upsert(), query(), delete(), flush(), and count()
- InMemoryVectorStore — pure PHP implementation with cosine similarity search and metadata filtering, zero dependencies
- FailoverProvider — wraps multiple providers with automatic failover on failure, configurable retry exception types, and getLastUsedProvider() tracking
- SearchResult — value object for vector query results with id, score, metadata, and content
- Development tooling — PHP CS Fixer (PSR-12), Psalm level 4 static analysis, CI workflow for PHP 8.2–8.5, pre-commit hooks, 75% minimum test coverage
- Bug fixes — removed unused variables in Agent, added toAnthropic()/toOpenAI() to ToolInterface, fixed redundant null check in Schema, adding missing imports in AgentInterface
v0.5
Changes in this release:
- Add ImageProviderInterface for image generation capability discovery
- Add Message and StreamChunk imports to ProviderInterface
- Fix issue in composer lock
v.0.4
v0.4 Fix library name
v0.3
Fix build badge
v0.2
Fix further CI errors (code sniffer)
v0.1
Merge pull request #1 from papi-ai/8.4 Bump php version