claude-agent-sdk 0.13.0 → 0.13.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f58f68ab3fa3b156f329c2f1757840166e449cb74f0a8513522e7fddaa177daa
4
- data.tar.gz: 4d2c107fce9aa21978c983b264799a0a795e2cc58bcac615a0a9786f982221d9
3
+ metadata.gz: 4c6c249367872221d23d090bf162658963a287f88abb9f62a5037e1b85977949
4
+ data.tar.gz: a09ae1f2ecd82344afa972c3e8c74d9032ae85b5084bf96d72b0d834d45fa839
5
5
  SHA512:
6
- metadata.gz: 656e3dc5eacd58edb5da35a0055771674e09fcff5a7754a79ab5fae4346ba34e4000e61d31d25743cf244cdb6241907b84696bd16ea63411af7dee70d9bc46af
7
- data.tar.gz: 5da72d45e25794e720b011f19de10de076d1927e50863b13b1aa4ccde801dd6b697073e82025c281963752cb8408c1a0267cbe2ea7a9a233f3bee4c07e636b9e
6
+ metadata.gz: c608d05dfe74cbd90ec64836f7c6b3808357db831debbd268e35ef30699867c7f5409ecb101c01dbf899229a14f17bea10ad8d8ed0f359778ae04ad6b87a2c3f
7
+ data.tar.gz: 2f1bf0d44b541104d7fba0433b32260c8cda247d79f7f36f46d1aedfed93afea6fb55bbc26657210686602703ea0727e27d7056670f5eda66f23886164f28033
data/CHANGELOG.md CHANGED
@@ -5,6 +5,11 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.13.1] - 2026-04-05
9
+
10
+ ### Fixed
11
+ - Handle `ProcessError` when CLI exits non-zero after delivering a valid result (e.g., StructuredOutput `tool_use` triggers exit code 1). Previously this propagated as a fatal error; now it is suppressed when a result was already received.
12
+
8
13
  ## [0.13.0] - 2026-04-03
9
14
 
10
15
  ### Added
@@ -175,6 +175,19 @@ module ClaudeAgentSDK
175
175
  @message_queue.enqueue(message)
176
176
  end
177
177
  end
178
+ rescue ProcessError => e
179
+ # The CLI can exit non-zero after delivering a valid result (e.g.,
180
+ # StructuredOutput tool_use triggers exit code 1). When we already
181
+ # received a result message, treat the process error as non-fatal.
182
+ if @first_result_received
183
+ warn "Claude SDK: Process exited with code #{e.exit_code} after result — ignoring"
184
+ else
185
+ @pending_control_responses.dup.each do |request_id, condition|
186
+ @pending_control_results[request_id] ||= e
187
+ condition.signal
188
+ end
189
+ @message_queue.enqueue({ type: 'error', error: e })
190
+ end
178
191
  rescue StandardError => e
179
192
  # Unblock pending control requests (e.g., initialize) so callers don't hang until timeout.
180
193
  @pending_control_responses.dup.each do |request_id, condition|
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeAgentSDK
4
- VERSION = '0.13.0'
4
+ VERSION = '0.13.1'
5
5
  end
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.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Community Contributors
8
8
  bindir: bin
9
9
  cert_chain: []
10
- date: 2026-04-03 00:00:00.000000000 Z
10
+ date: 2026-04-05 00:00:00.000000000 Z
11
11
  dependencies:
12
12
  - !ruby/object:Gem::Dependency
13
13
  name: async
@@ -126,7 +126,7 @@ metadata:
126
126
  homepage_uri: https://github.com/ya-luotao/claude-agent-sdk-ruby
127
127
  source_code_uri: https://github.com/ya-luotao/claude-agent-sdk-ruby
128
128
  changelog_uri: https://github.com/ya-luotao/claude-agent-sdk-ruby/blob/main/CHANGELOG.md
129
- documentation_uri: https://docs.anthropic.com/en/docs/claude-code/sdk
129
+ documentation_uri: https://rubydoc.info/gems/claude-agent-sdk
130
130
  allowed_push_host: https://rubygems.org
131
131
  rdoc_options: []
132
132
  require_paths: