Packages
claude_code
0.1.0
0.36.5
0.36.4
0.36.3
0.36.2
0.36.1
0.36.0
0.35.0
0.34.0
0.33.1
0.32.2
0.32.0
0.31.0
0.30.0
0.29.0
0.28.0
0.27.0
0.26.0
0.25.0
0.24.0
0.23.0
0.22.0
0.21.0
0.20.0
0.19.0
0.18.0
0.17.0
0.16.0
0.15.0
0.14.0
0.13.3
0.13.2
0.13.1
0.13.0
0.12.0
0.11.0
0.10.0
0.9.0
0.8.1
0.8.0
0.7.0
0.6.0
0.5.0
0.4.0
0.3.0
0.2.0
0.1.0
Claude Agent SDK for Elixir – Build AI agents with Claude Code
Current section
Files
Jump to
Current section
Files
claude_code
CHANGELOG.md
CHANGELOG.md
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
## [0.1.0] - 2025-06-16
### Added
- **Complete SDK Implementation (Phases 1-4):**
- Session management with GenServer-based architecture
- Synchronous queries with `query_sync/3`
- Streaming queries with native Elixir streams via `query/3`
- Async queries with `query_async/3` for manual message handling
- Complete message type parsing (system, assistant, user, result)
- Content block handling (text, tool use, tool result) with proper struct types
- Flattened options API with NimbleOptions validation
- Option precedence system: query > session > app config > defaults
- Application configuration support via `config :claude_code`
- Comprehensive CLI flag mapping for all Claude Code options
- **Core Modules:**
- `ClaudeCode` - Main interface with session management
- `ClaudeCode.Session` - GenServer for CLI subprocess management
- `ClaudeCode.CLI` - Binary detection and command building
- `ClaudeCode.Options` - Options validation and CLI conversion
- `ClaudeCode.Stream` - Stream utilities for real-time processing
- `ClaudeCode.Message` - Unified message parsing
- `ClaudeCode.Content` - Content block parsing
- `ClaudeCode.Types` - Type definitions matching SDK schema
- **Message Type Support:**
- System messages with session initialization
- Assistant messages with nested content structure
- User messages with proper content blocks
- Result messages with error subtypes
- Tool use and tool result content blocks
- **Streaming Features:**
- Native Elixir Stream integration with backpressure handling
- Stream utilities: `text_content/1`, `tool_uses/1`, `filter_type/2`
- Buffered text streaming with `buffered_text/1`
- Concurrent streaming request support
- Proper stream cleanup and error handling
- **Configuration System:**
- 15+ configuration options with full validation
- Support for API key, model, system prompt, allowed tools
- Permission mode options: `:default`, `:accept_edits`, `:bypass_permissions`
- Timeout, max turns, working directory configuration
- Custom permission handler support
- Query-level option overrides
### Implementation Details
- Flattened options API for intuitive configuration
- Updated CLI flag mappings to match latest Claude Code CLI
- Enhanced error handling with proper message subtypes
- Shell wrapper implementation to prevent CLI hanging
- Proper JSON parsing for all message types
- Concurrent query isolation with dedicated ports
- Memory management for long-running sessions
- Session continuity across multiple queries
### Security
- API keys passed via environment variables only
- Shell command injection prevention with proper escaping
- Subprocess isolation with dedicated ports per query
- No sensitive data in command arguments or logs
### Documentation
- Complete module documentation with doctests
- Comprehensive README with installation and usage examples
- Architecture documentation explaining CLI integration
- Streamlined roadmap focusing on current status and future enhancements
### Testing
- 146+ comprehensive tests covering all functionality
- Unit tests for all modules with mock CLI support
- Integration tests with real CLI when available
- Property-based testing for message parsing
- Stream testing with concurrent scenarios
- Coverage reporting with ExCoveralls