claude_agent 0.7.5 → 0.7.6

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: 7243ce9755ad2adeca4eee580a6011ba3a35f51f1bfe7d00a2df1f4b5313bc52
4
- data.tar.gz: 9331f577e970716bd9c3573eaa44e6e96b8ef5c3f3798673d4ff20eef0ca23f3
3
+ metadata.gz: 461539691af2ef7a8824d3d5976a7d9741e7e41cbd1bf7d5c07fa13f7909894b
4
+ data.tar.gz: 7c56823efe8f18b0502c652e5cf3e214ed81a6a057322e871dabb4b4d19fbbc2
5
5
  SHA512:
6
- metadata.gz: b452df3dde194a5c092f2c1cae97c5b51fea119dce3aa8fe6bfadd2607ceb27e5d1fc9ded9206ed49f92db309acb6714e7fa38365150a373ea0fb3c77c5baa66
7
- data.tar.gz: b2016921e13e9a3c811d126f78ea545b121bc8480ecb064c23b55807a444d3db361f42e205128302d4c303de598bf5d30754fcf3169cfedaeeb2e4dfc550ca22
6
+ metadata.gz: 84a3b38295cab7f4d28969a73573b97028d0fd26d61e65520fc6375804e67128ea7f08678cb094a6763fffb7a837248d9f6a06e1616985af9615957d10b4d6a2
7
+ data.tar.gz: 423cda325548a65dd32780582efdcefb352c2d83b6c852d362564d0391d7287b20ab4fb9ec2aa39c0348069d451da773e95c29e34a74766b3c52434afc261563
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
+ ## [0.7.6] - 2026-02-13
11
+
12
+ ### Added
13
+ - `stop_task` control request and `Client#stop_task` method for stopping running background tasks (TypeScript SDK parity)
14
+
10
15
  ## [0.7.5] - 2026-02-10
11
16
 
12
17
  ### Added
data/SPEC.md CHANGED
@@ -3,11 +3,11 @@
3
3
  This document provides a comprehensive specification of the Claude Agent SDK, comparing feature parity across the official TypeScript and Python SDKs with this Ruby implementation.
4
4
 
5
5
  **Reference Versions:**
6
- - TypeScript SDK: v0.2.38 (npm package)
7
- - Python SDK: v0.1.34 from GitHub (commit a969042)
6
+ - TypeScript SDK: v0.2.42 (npm package)
7
+ - Python SDK: v0.1.36 from GitHub (commit 4d74748)
8
8
  - Ruby SDK: This repository
9
9
 
10
- **Last Updated:** 2026-02-09
10
+ **Last Updated:** 2026-02-13
11
11
 
12
12
  ---
13
13
 
@@ -47,8 +47,8 @@ Configuration options for SDK queries and clients.
47
47
  | `permissionPromptToolName` | ✅ | ✅ | ✅ | MCP tool for permission prompts |
48
48
  | `maxTurns` | ✅ | ✅ | ✅ | Max conversation turns |
49
49
  | `maxBudgetUsd` | ✅ | ✅ | ✅ | Max USD budget |
50
- | `thinking` | ✅ | | ✅ | Thinking mode config (adaptive/enabled/disabled) (v0.2.35+) |
51
- | `effort` | ✅ | | ✅ | Response effort level (low/medium/high/max) (v0.2.35+) |
50
+ | `thinking` | ✅ | | ✅ | Thinking mode config (adaptive/enabled/disabled) (v0.2.35+) |
51
+ | `effort` | ✅ | | ✅ | Response effort level (low/medium/high/max) (v0.2.35+) |
52
52
  | `maxThinkingTokens` | ✅ | ✅ | ✅ | Max thinking tokens (deprecated in TS, use `thinking`) |
53
53
  | `continue` | ✅ | ✅ | ✅ | Continue most recent conversation |
54
54
  | `resume` | ✅ | ✅ | ✅ | Resume session by ID |
@@ -227,6 +227,7 @@ Bidirectional control protocol for SDK-CLI communication.
227
227
  | `mcp_status` | ✅ | ✅ | ✅ | Get MCP server status |
228
228
  | `mcp_reconnect` | ✅ | ❌ | ✅ | Reconnect to MCP server |
229
229
  | `mcp_toggle` | ✅ | ❌ | ✅ | Enable/disable MCP server |
230
+ | `stop_task` | ✅ | ❌ | ✅ | Stop a running background task |
230
231
  | `supported_commands` | ✅ | ❌ | ✅ | Get available slash commands |
231
232
  | `supported_models` | ✅ | ❌ | ✅ | Get available models |
232
233
  | `account_info` | ✅ | ❌ | ✅ | Get account information |
@@ -628,6 +629,7 @@ Public API surface for SDK clients.
628
629
  | `setMcpServers()` | ✅ | ❌ | ✅ | Dynamic MCP servers |
629
630
  | `reconnectMcpServer()` | ✅ | ❌ | ✅ | Reconnect MCP server |
630
631
  | `toggleMcpServer()` | ✅ | ❌ | ✅ | Enable/disable MCP |
632
+ | `stopTask()` | ✅ | ❌ | ✅ | Stop running task |
631
633
  | `streamInput()` | ✅ | ✅ | ✅ | Stream user input |
632
634
  | `initializationResult()` | ✅ | ❌ | ✅ | Full init response |
633
635
  | `close()` | ✅ | ✅ | ✅ | Close query/session |
@@ -677,12 +679,13 @@ Public API surface for SDK clients.
677
679
  - Partial control protocol: query and client support interrupt, setPermissionMode, setModel, rewindFiles, mcpStatus
678
680
  - Missing hooks: SessionStart, SessionEnd, Setup, TeammateIdle, TaskCompleted
679
681
  - Missing permission modes: `delegate`, `dontAsk`
680
- - Missing options: `thinking`, `effort`, `allowDangerouslySkipPermissions`, `persistSession`, `resumeSessionAt`, `sessionId`, `strictMcpConfig`, `init`/`initOnly`/`maintenance`, `debug`/`debugFile`
682
+ - Missing options: `allowDangerouslySkipPermissions`, `persistSession`, `resumeSessionAt`, `sessionId`, `strictMcpConfig`, `init`/`initOnly`/`maintenance`, `debug`/`debugFile`
681
683
  - `ToolPermissionContext` missing `blockedPath`, `decisionReason`, `toolUseID`, `agentID`, `description`
682
684
  - Has SDK MCP server support with `tool()` helper and annotations
685
+ - Added `thinking` config and `effort` option in v0.1.36
683
686
 
684
687
  ### Ruby SDK (This Repository)
685
- - Feature parity with TypeScript SDK v0.2.38
688
+ - Full feature parity with TypeScript SDK v0.2.42
686
689
  - Ruby-idiomatic patterns (Data.define, snake_case)
687
690
  - Complete control protocol, hook, and V2 Session API support
688
691
  - Dedicated Client class for multi-turn conversations
@@ -281,6 +281,23 @@ module ClaudeAgent
281
281
  @protocol.initialization_result
282
282
  end
283
283
 
284
+ # Stop a running background task (TypeScript SDK parity)
285
+ #
286
+ # Sends a stop signal to a running task. A task_notification message
287
+ # with status 'stopped' will be emitted when the task stops.
288
+ #
289
+ # @param task_id [String] The task ID from task_notification events
290
+ # @return [void]
291
+ #
292
+ # @example
293
+ # client.stop_task("task-123")
294
+ #
295
+ def stop_task(task_id)
296
+ require_connection!
297
+
298
+ @protocol.stop_task(task_id)
299
+ end
300
+
284
301
  # Dynamically set MCP servers for this session (TypeScript SDK parity)
285
302
  #
286
303
  # This replaces the current set of dynamically-added MCP servers.
@@ -443,6 +443,21 @@ module ClaudeAgent
443
443
  send_control_request(subtype: "mcp_toggle", serverName: server_name, enabled: enabled)
444
444
  end
445
445
 
446
+ # Stop a running background task (TypeScript SDK parity)
447
+ #
448
+ # Sends a stop signal to a running task. A task_notification message
449
+ # with status 'stopped' will be emitted when the task stops.
450
+ #
451
+ # @param task_id [String] The task ID from task_notification events
452
+ # @return [void]
453
+ #
454
+ # @example
455
+ # protocol.stop_task("task-123")
456
+ #
457
+ def stop_task(task_id)
458
+ send_control_request(subtype: "stop_task", task_id: task_id)
459
+ end
460
+
446
461
  # Dynamically set MCP servers for this session (TypeScript SDK parity)
447
462
  #
448
463
  # This replaces the current set of dynamically-added MCP servers.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ClaudeAgent
4
- VERSION = "0.7.5"
4
+ VERSION = "0.7.6"
5
5
  end
data/sig/claude_agent.rbs CHANGED
@@ -910,6 +910,7 @@ module ClaudeAgent
910
910
  def set_mcp_servers: (Hash[String, untyped] servers) -> McpSetServersResult
911
911
  def mcp_reconnect: (String server_name) -> Hash[String, untyped]
912
912
  def mcp_toggle: (String server_name, enabled: bool) -> Hash[String, untyped]
913
+ def stop_task: (String task_id) -> Hash[String, untyped]
913
914
  def supported_commands: () -> Array[SlashCommand]
914
915
  def supported_models: () -> Array[ModelInfo]
915
916
  def mcp_server_status: () -> Array[McpServerStatus]
@@ -946,6 +947,7 @@ module ClaudeAgent
946
947
  def set_mcp_servers: (Hash[String, untyped] servers) -> McpSetServersResult
947
948
  def mcp_reconnect: (String server_name) -> Hash[String, untyped]
948
949
  def mcp_toggle: (String server_name, enabled: bool) -> Hash[String, untyped]
950
+ def stop_task: (String task_id) -> Hash[String, untyped]
949
951
  def supported_commands: () -> Array[SlashCommand]
950
952
  def supported_models: () -> Array[ModelInfo]
951
953
  def mcp_server_status: () -> Array[McpServerStatus]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: claude_agent
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.5
4
+ version: 0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Carr