claude-agent-sdk 1.2.0 → 1.3.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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +95 -71
- data/README.md +40 -40
- data/UPGRADING-1.0.md +1 -1
- data/docs/client.md +1 -1
- data/docs/configuration.md +6 -6
- data/docs/errors.md +2 -2
- data/docs/hooks-and-permissions.md +36 -7
- data/docs/mcp-servers.md +1 -1
- data/docs/observability.md +1 -1
- data/docs/rails.md +5 -5
- data/docs/sessions.md +1 -1
- data/docs/subagents.md +1 -1
- data/docs/types.md +2 -2
- data/lib/claude_agent_sdk/cli_installer.rb +1 -1
- data/lib/claude_agent_sdk/command_builder.rb +48 -130
- data/lib/claude_agent_sdk/option_forms.rb +379 -0
- data/lib/claude_agent_sdk/query/run_lifecycle.rb +373 -0
- data/lib/claude_agent_sdk/query.rb +95 -516
- data/lib/claude_agent_sdk/session_assembly.rb +311 -0
- data/lib/claude_agent_sdk/session_resume.rb +4 -4
- data/lib/claude_agent_sdk/subprocess_cli_transport.rb +10 -9
- data/lib/claude_agent_sdk/types/hooks.rb +378 -243
- data/lib/claude_agent_sdk/types/messages.rb +14 -3
- data/lib/claude_agent_sdk/version.rb +1 -1
- data/lib/claude_agent_sdk.rb +163 -406
- data/lib/generators/claude_agent_sdk/install/install_generator.rb +1 -1
- data/lib/generators/claude_agent_sdk/install/templates/claude_agent_sdk.rb.tt +1 -1
- data/sig/claude_agent_sdk/types/hooks.rbs +286 -3
- data/sig/claude_agent_sdk/types/messages.rbs +15 -0
- metadata +9 -6
|
@@ -128,12 +128,23 @@ module ClaudeAgentSDK
|
|
|
128
128
|
end
|
|
129
129
|
end
|
|
130
130
|
|
|
131
|
-
# Init system message (emitted at session start and after /clear)
|
|
131
|
+
# Init system message (emitted at session start and after /clear).
|
|
132
|
+
#
|
|
133
|
+
# `capabilities` lists the protocol features the CLI supports (e.g.
|
|
134
|
+
# "interrupt_receipt_v1"; an open set, absent before CLI 2.1.205): test it
|
|
135
|
+
# for a feature instead of comparing `claude_code_version`.
|
|
136
|
+
# `plugin_errors` lists plugins that failed to load (`{ plugin:, type:,
|
|
137
|
+
# message:, path: }`; the CLI omits it when none failed, and older CLIs never
|
|
138
|
+
# send it). `terminal_slash_commands` are the entries of `slash_commands`
|
|
139
|
+
# bound to the local terminal (e.g. "exit"), sent only when there are some.
|
|
140
|
+
# `fast_mode_disabled_reason` names the check that keeps fast mode off.
|
|
132
141
|
class InitMessage < SystemMessage
|
|
133
142
|
attr_accessor :uuid, :session_id, :agents, :api_key_source, :betas,
|
|
134
143
|
:claude_code_version, :cwd, :tools, :mcp_servers, :model,
|
|
135
|
-
:permission_mode, :slash_commands, :
|
|
136
|
-
:
|
|
144
|
+
:permission_mode, :slash_commands, :terminal_slash_commands,
|
|
145
|
+
:output_style, :skills, :plugins, :plugin_errors,
|
|
146
|
+
:fast_mode_state, # "off", "cooldown", or "on"
|
|
147
|
+
:fast_mode_disabled_reason, :capabilities
|
|
137
148
|
end
|
|
138
149
|
|
|
139
150
|
# Compact boundary system message (emitted after context compaction completes)
|