claude-agent-sdk 0.32.0 → 0.33.0

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.
@@ -302,6 +302,15 @@ module ClaudeAgentSDK
302
302
  Sessions.list_subagents(session_id: session_id, directory: directory)
303
303
  end
304
304
 
305
+ # Read a subagent's optional metadata (not live status) from local disk.
306
+ # @param session_id [String] The parent session UUID
307
+ # @param agent_id [String] The subagent ID, without the agent- prefix
308
+ # @param directory [String, nil] Project directory to search in
309
+ # @return [Hash{String => Object}, nil] CLI metadata, or nil if unavailable
310
+ def self.get_subagent_metadata(session_id:, agent_id:, directory: nil)
311
+ Sessions.get_subagent_metadata(session_id: session_id, agent_id: agent_id, directory: directory)
312
+ end
313
+
305
314
  # Read a subagent's conversation messages from local disk
306
315
  # @param session_id [String] The session UUID
307
316
  # @param agent_id [String] The subagent ID (without the agent- prefix)
@@ -394,6 +403,13 @@ module ClaudeAgentSDK
394
403
  Sessions.list_subagents_from_store(session_store: session_store, session_id: session_id, directory: directory)
395
404
  end
396
405
 
406
+ # Read the latest subagent metadata from a SessionStore, without its synthetic type marker.
407
+ # @return [Hash{String => Object}, nil]
408
+ def self.get_subagent_metadata_from_store(session_store:, session_id:, agent_id:, directory: nil)
409
+ Sessions.get_subagent_metadata_from_store(session_store: session_store, session_id: session_id,
410
+ agent_id: agent_id, directory: directory)
411
+ end
412
+
397
413
  # Read a subagent's conversation messages from a SessionStore.
398
414
  # @return [Array<SessionMessage>]
399
415
  def self.get_subagent_messages_from_store(session_store:, session_id:, agent_id:, directory: nil, limit: nil,
@@ -572,6 +588,7 @@ module ClaudeAgentSDK
572
588
  system_prompt_snapshot: ClaudeAgentSDK.extract_system_prompt_snapshot(configured_options.system_prompt),
573
589
  skills: configured_options.skills,
574
590
  forward_subagent_text: configured_options.forward_subagent_text?,
591
+ agent_progress_summaries: configured_options.agent_progress_summaries,
575
592
  callback_scheduling: callback_scheduling,
576
593
  callback_wrapper: callback_wrapper
577
594
  )
@@ -969,6 +986,31 @@ module ClaudeAgentSDK
969
986
  @query_handler.stop_task(task_id)
970
987
  end
971
988
 
989
+ # Background in-flight foreground tasks (Bash commands and subagents) — the
990
+ # control-request equivalent of pressing Ctrl+B in the terminal. Each
991
+ # blocking tool call returns a "running in the background" tool_result and
992
+ # the turn continues; the task keeps running and emits a
993
+ # TaskNotificationMessage when it settles.
994
+ #
995
+ # The targeted form reports its outcome: `{ backgrounded: true }`, or
996
+ # `{ backgrounded: false }` — a definitive miss (no matching foreground
997
+ # task), so do not wait for an event after it. The all-tasks form returns
998
+ # `{}` and says nothing about whether any task existed. Observe
999
+ # TaskUpdatedMessage#is_backgrounded / BackgroundTasksChangedMessage for the
1000
+ # lifecycle state that follows.
1001
+ #
1002
+ # @param tool_use_id [String, nil] The id of the tool_use block that spawned
1003
+ # the task — NOT a task_id or agent_id. nil is the explicit all-tasks form.
1004
+ # Never substitute nil or '' for a per-task id you do not have yet
1005
+ # (TaskStartedMessage#tool_use_id is optional on the wire)
1006
+ # @return [Hash] `{ backgrounded: true/false }` when tool_use_id was given,
1007
+ # `{}` otherwise
1008
+ # @raise [ArgumentError] if tool_use_id is neither nil nor a non-empty String
1009
+ def background_tasks(tool_use_id: nil)
1010
+ raise CLIConnectionError, 'Not connected. Call connect() first' unless @connected
1011
+ @query_handler.background_tasks(tool_use_id: tool_use_id)
1012
+ end
1013
+
972
1014
  # Rewind files to a previous checkpoint (v0.1.15+)
973
1015
  # Restores file state to what it was at the given user message
974
1016
  # Requires enable_file_checkpointing to be true in options
@@ -1102,6 +1144,7 @@ module ClaudeAgentSDK
1102
1144
  system_prompt_snapshot: system_prompt_snapshot,
1103
1145
  skills: configured_options.skills,
1104
1146
  forward_subagent_text: configured_options.forward_subagent_text?,
1147
+ agent_progress_summaries: configured_options.agent_progress_summaries,
1105
1148
  callback_scheduling: @callback_scheduling,
1106
1149
  callback_wrapper: @callback_wrapper
1107
1150
  )
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: 0.32.0
4
+ version: 0.33.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Community Contributors
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-17 00:00:00.000000000 Z
11
+ date: 2026-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: async
@@ -119,9 +119,11 @@ files:
119
119
  - docs/observability.md
120
120
  - docs/rails.md
121
121
  - docs/sessions.md
122
+ - docs/subagents.md
122
123
  - docs/types.md
123
124
  - lib/claude-agent-sdk.rb
124
125
  - lib/claude_agent_sdk.rb
126
+ - lib/claude_agent_sdk/cancellation_signal.rb
125
127
  - lib/claude_agent_sdk/cli_installer.rb
126
128
  - lib/claude_agent_sdk/command_builder.rb
127
129
  - lib/claude_agent_sdk/configuration.rb