claude-agent-sdk 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +6 -1
- data/lib/claude_agent_sdk/version.rb +1 -1
- data/lib/claude_agent_sdk.rb +6 -3
- metadata +2 -2
    
        checksums.yaml
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            ---
         | 
| 2 2 | 
             
            SHA256:
         | 
| 3 | 
            -
              metadata.gz:  | 
| 4 | 
            -
              data.tar.gz:  | 
| 3 | 
            +
              metadata.gz: 4d8b669f4c3f02dea0763113551838bb0a3a5ec514125876f28dbc5d23ee44aa
         | 
| 4 | 
            +
              data.tar.gz: 6ce126558a2d99e3b6aba03527d5b4ce8954ff3a99a13ee25f54dd6fa0141980
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 54e48e83a98845d56d6dc4c1843ebf8728fd74ffd3e7670e826c0fdbf3ef297359c18f5b27c2fac0757da0fab5e28d6c19ab084ac1842c5615d06cf52a0a94f8
         | 
| 7 | 
            +
              data.tar.gz: 224aca0535d196fa3b348da69af9e4cbcc46276af8d36b7b58f6e35811704f93506ff31df7449e9aae9ebd252c8b5c035fa581dc4d500a5bade82d0d15f37ddc
         | 
    
        data/README.md
    CHANGED
    
    | @@ -131,7 +131,11 @@ For a complete example, see [examples/streaming_input_example.rb](examples/strea | |
| 131 131 |  | 
| 132 132 | 
             
            ## Client
         | 
| 133 133 |  | 
| 134 | 
            -
            `ClaudeAgentSDK::Client` supports bidirectional, interactive conversations with Claude Code. Unlike `query()`, `Client` enables **custom tools**, **hooks**, and **permission callbacks**, all of which can be defined as Ruby procs/lambdas. | 
| 134 | 
            +
            `ClaudeAgentSDK::Client` supports bidirectional, interactive conversations with Claude Code. Unlike `query()`, `Client` enables **custom tools**, **hooks**, and **permission callbacks**, all of which can be defined as Ruby procs/lambdas.
         | 
| 135 | 
            +
             | 
| 136 | 
            +
            **The Client class automatically uses streaming mode** for bidirectional communication, allowing you to send multiple queries dynamically during a single session without closing the connection. This matches the Python SDK's `ClaudeSDKClient` behavior.
         | 
| 137 | 
            +
             | 
| 138 | 
            +
            See [lib/claude_agent_sdk.rb](lib/claude_agent_sdk.rb) for implementation details.
         | 
| 135 139 |  | 
| 136 140 | 
             
            ### Custom Tools (SDK MCP Servers)
         | 
| 137 141 |  | 
| @@ -292,6 +296,7 @@ Async do | |
| 292 296 | 
             
              client = ClaudeAgentSDK::Client.new
         | 
| 293 297 |  | 
| 294 298 | 
             
              begin
         | 
| 299 | 
            +
                # Connect automatically uses streaming mode for bidirectional communication
         | 
| 295 300 | 
             
                client.connect
         | 
| 296 301 |  | 
| 297 302 | 
             
                # Send a query
         | 
    
        data/lib/claude_agent_sdk.rb
    CHANGED
    
    | @@ -86,11 +86,12 @@ module ClaudeAgentSDK | |
| 86 86 | 
             
              #
         | 
| 87 87 | 
             
              # This client provides full control over the conversation flow with support
         | 
| 88 88 | 
             
              # for streaming, hooks, permission callbacks, and dynamic message sending.
         | 
| 89 | 
            +
              # The Client class always uses streaming mode for bidirectional communication.
         | 
| 89 90 | 
             
              #
         | 
| 90 91 | 
             
              # @example Basic usage
         | 
| 91 92 | 
             
              #   Async do
         | 
| 92 93 | 
             
              #     client = ClaudeAgentSDK::Client.new
         | 
| 93 | 
            -
              #     client.connect
         | 
| 94 | 
            +
              #     client.connect  # No arguments needed - automatically uses streaming mode
         | 
| 94 95 | 
             
              #
         | 
| 95 96 | 
             
              #     client.query("What is the capital of France?")
         | 
| 96 97 | 
             
              #     client.receive_response do |msg|
         | 
| @@ -150,8 +151,10 @@ module ClaudeAgentSDK | |
| 150 151 | 
             
                    configured_options = @options.dup_with(permission_prompt_tool_name: 'stdio')
         | 
| 151 152 | 
             
                  end
         | 
| 152 153 |  | 
| 153 | 
            -
                  #  | 
| 154 | 
            -
                   | 
| 154 | 
            +
                  # Auto-connect with empty enumerator if no prompt is provided
         | 
| 155 | 
            +
                  # This matches the Python SDK pattern where ClaudeSDKClient always uses streaming mode
         | 
| 156 | 
            +
                  # An empty enumerator keeps stdin open for bidirectional communication
         | 
| 157 | 
            +
                  actual_prompt = prompt || [].to_enum
         | 
| 155 158 | 
             
                  @transport = SubprocessCLITransport.new(actual_prompt, configured_options)
         | 
| 156 159 | 
             
                  @transport.connect
         | 
| 157 160 |  | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: claude-agent-sdk
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.4
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - Community Contributors
         | 
| 8 8 | 
             
            bindir: bin
         | 
| 9 9 | 
             
            cert_chain: []
         | 
| 10 | 
            -
            date: 2025-10- | 
| 10 | 
            +
            date: 2025-10-17 00:00:00.000000000 Z
         | 
| 11 11 | 
             
            dependencies:
         | 
| 12 12 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 13 13 | 
             
              name: async
         |