claude-agent-sdk 1.4.1 → 1.4.2
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/CHANGELOG.md +5 -0
- data/lib/claude_agent_sdk/cli_installer.rb +6 -1
- data/lib/claude_agent_sdk/version.rb +1 -1
- 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: e818247c70aeb869293f08c2ae18750d4fdc03ac3caa77c3f40be464df2ed8d6
|
|
4
|
+
data.tar.gz: 3e29b5ea072ad2514ec3949efd1fa5dd339085d5859ac597fd2b4e1c44548ac2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 166b250491fc219607048dfe81a349002c2c206bb2f3838b566b6b7431215ffd2ad83f634baa94ea757c0b719559dd8c0d3f488b5152479f6c1ebec5013f6f0e
|
|
7
|
+
data.tar.gz: 69abc6fbb88df26a6d74a7f348a07f83fa7010df39f0f031d7d3ba39d5fdf083706b305f5561a072d84fbfe9e09eec6f2eb6e7e80b4f20b3600a6357707c8d1b
|
data/CHANGELOG.md
CHANGED
|
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
+
## [1.4.2] - 2026-10-27
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **`bin/rails claude_agent_sdk:install_cli` (and `CLIInstaller.install` whenever `Encoding.default_internal` is set) no longer fails with `Encoding::UndefinedConversionError`** (issue #177). The download was opened with `File::BINARY`, which is 0 outside Windows, so the file was in text mode; Rails sets `default_internal` to UTF-8, and each write then transcoded the binary chunks and raised on the first byte that is not valid UTF-8. The file is now opened with `binmode: true`.
|
|
14
|
+
|
|
10
15
|
## [1.4.1] - 2026-10-25
|
|
11
16
|
|
|
12
17
|
### Changed
|
|
@@ -178,10 +178,15 @@ module ClaudeAgentSDK
|
|
|
178
178
|
# place, and a rename only orders metadata. Without the sync, a power
|
|
179
179
|
# loss shortly after an install could leave the published name
|
|
180
180
|
# pointing at an empty or partial file.
|
|
181
|
+
#
|
|
182
|
+
# binmode, not File::BINARY: that flag is 0 outside Windows, so the
|
|
183
|
+
# file would be in text mode, and with Encoding.default_internal set
|
|
184
|
+
# (Rails sets it to UTF-8) every write would transcode the binary
|
|
185
|
+
# chunks and raise on the first byte that is not valid UTF-8 (#177).
|
|
181
186
|
def download_to(url, path, max_bytes: nil)
|
|
182
187
|
with_response(url) do |response|
|
|
183
188
|
written = 0
|
|
184
|
-
File.open(path, File::WRONLY | File::CREAT | File::EXCL
|
|
189
|
+
File.open(path, File::WRONLY | File::CREAT | File::EXCL, 0o600, binmode: true) do |file|
|
|
185
190
|
response.read_body do |chunk|
|
|
186
191
|
written += chunk.bytesize
|
|
187
192
|
if over?(written, max_bytes)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: claude-agent-sdk
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.4.
|
|
4
|
+
version: 1.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ya-luotao
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-10-
|
|
11
|
+
date: 2026-10-27 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: async
|