Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]

### Changed
- Migrated from manual `require_relative` loading to Zeitwerk autoloading
- Split multi-class files into one-class-per-file (Zeitwerk convention)
- Collapsed `content_blocks/`, `messages/`, `types/`, `hooks/` directories (classes remain in `ClaudeAgent::` namespace)
- Converted `ClaudeAgent.query`/`query_turn` to a `ClaudeAgent::Query` module extended into the singleton class
- Moved logging and V2 session class methods into the main entry point
- Replaced all 63 `Data.define` types with plain class inheritance from `ImmutableRecord` base class
- `Message` module is now `include`d instead of `prepend`ed into message and content block types
- RBS signatures now use real supertype inheritance (`< ImmutableRecord`)
Expand All @@ -17,6 +22,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Moved hooks code into `hooks/` directory (`hook.rb`, `hook_context.rb`, `hook_input.rb`, `hook_registry.rb`)

### Added
- `zeitwerk` (~> 2.7) runtime dependency for autoloading
- `ClaudeAgent.loader` accessor for the Zeitwerk loader instance (useful for `eager_load` in production)
- `include Message` directly in each message and content block class (replaces iteration over `MESSAGE_TYPES`/`CONTENT_BLOCK_TYPES`)
- `HookRegistry.register(cli_event)` — registers a new hook event, generating both a `*Hook` subclass and a DSL method by convention
- `HookRegistry.wrap(input)` — normalizes `HookRegistry`, `Hash`, or `nil` into a `HookRegistry`
- `HookRegistry.from_hash(hash)` — builds a registry from a raw hooks hash
Expand Down
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ PATH
specs:
claude_agent (0.7.18)
activesupport (>= 7.0)
zeitwerk (~> 2.7)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -105,6 +106,7 @@ GEM
unicode-emoji (~> 4.1)
unicode-emoji (4.2.0)
uri (1.1.1)
zeitwerk (2.7.5)

PLATFORMS
arm64-darwin-25
Expand Down Expand Up @@ -168,6 +170,7 @@ CHECKSUMS
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f
uri (1.1.1) sha256=379fa58d27ffb1387eaada68c749d1426738bd0f654d812fcc07e7568f5c57c6
zeitwerk (2.7.5) sha256=d8da92128c09ea6ec62c949011b00ed4a20242b255293dd66bf41545398f73dd

BUNDLED WITH
4.0.3
1 change: 1 addition & 0 deletions claude_agent.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,5 @@ Gem::Specification.new do |spec|

# Runtime dependencies
spec.add_dependency "activesupport", ">= 7.0"
spec.add_dependency "zeitwerk", "~> 2.7"
end
Loading
Loading