Skip to content

Releases: papi-ai/papi-core

v0.9.1

10 Mar 18:33

Choose a tag to compare

Changes since v0.9:

  • Add PHPDoc to all classes and public methods

v0.9

07 Mar 22:35

Choose a tag to compare

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 errors
    • ProviderException — provider errors with status code and response body
    • RateLimitException — rate limit errors with optional retry-after
    • AuthenticationException — authentication failures
  • CostEstimate — value object for estimating API call costs from token usage and model pricing
  • 183 tests, 0 psalm errors

v0.8

07 Mar 20:44

Choose a tag to compare

Changes in this release

  • Middleware pipelineMiddlewareInterface contract with process(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 AgentJob and JobStatus for 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 dependencies
    • RetryMiddleware — configurable retry with exponential backoff, zero dependencies
  • 167 tests, 81.6% coverage

v0.7

07 Mar 20:26

Choose a tag to compare

Changes in this release

  • Add TextToSpeechProviderInterface contract for TTS providers
  • Add TranscriptionProviderInterface contract for STT providers
  • Add ConversationStoreInterface with FileConversationStore implementation for conversation persistence
  • Add AudioResponse and TranscriptionResponse value objects
  • Add toArray() / fromArray() serialization to Conversation and Message
  • 140 tests, 83.5% coverage

v0.6

07 Mar 19:48

Choose a tag to compare

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

07 Mar 15:52

Choose a tag to compare

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

02 Feb 06:17

Choose a tag to compare

v0.4

Fix library name

v0.3

02 Feb 06:15

Choose a tag to compare

Fix build badge

v0.2

08 Aug 20:27

Choose a tag to compare

Fix further CI errors (code sniffer)

v0.1

06 Jul 09:28
ae0c34f

Choose a tag to compare

Merge pull request #1 from papi-ai/8.4

Bump php version