claude_agent 0.7.11 → 0.7.13
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/.claude/rules/testing.md +51 -10
- data/.claude/settings.json +1 -0
- data/ARCHITECTURE.md +237 -0
- data/CHANGELOG.md +52 -0
- data/CLAUDE.md +2 -0
- data/README.md +47 -1
- data/Rakefile +17 -0
- data/SPEC.md +314 -133
- data/lib/claude_agent/client/commands.rb +225 -0
- data/lib/claude_agent/client.rb +4 -204
- data/lib/claude_agent/content_blocks/generic_block.rb +39 -0
- data/lib/claude_agent/content_blocks/image_content_block.rb +54 -0
- data/lib/claude_agent/content_blocks/server_tool_result_block.rb +22 -0
- data/lib/claude_agent/content_blocks/server_tool_use_block.rb +48 -0
- data/lib/claude_agent/content_blocks/text_block.rb +19 -0
- data/lib/claude_agent/content_blocks/thinking_block.rb +19 -0
- data/lib/claude_agent/content_blocks/tool_result_block.rb +25 -0
- data/lib/claude_agent/content_blocks/tool_use_block.rb +134 -0
- data/lib/claude_agent/content_blocks.rb +8 -335
- data/lib/claude_agent/control_protocol/commands.rb +304 -0
- data/lib/claude_agent/control_protocol/lifecycle.rb +113 -0
- data/lib/claude_agent/control_protocol/messaging.rb +166 -0
- data/lib/claude_agent/control_protocol/primitives.rb +168 -0
- data/lib/claude_agent/control_protocol/request_handling.rb +231 -0
- data/lib/claude_agent/control_protocol.rb +27 -861
- data/lib/claude_agent/event_handler.rb +1 -0
- data/lib/claude_agent/get_session_info.rb +86 -0
- data/lib/claude_agent/hooks.rb +23 -2
- data/lib/claude_agent/list_sessions.rb +22 -13
- data/lib/claude_agent/message_parser.rb +27 -4
- data/lib/claude_agent/messages/conversation.rb +138 -0
- data/lib/claude_agent/messages/generic.rb +39 -0
- data/lib/claude_agent/messages/hook_lifecycle.rb +158 -0
- data/lib/claude_agent/messages/result.rb +80 -0
- data/lib/claude_agent/messages/streaming.rb +84 -0
- data/lib/claude_agent/messages/system.rb +67 -0
- data/lib/claude_agent/messages/task_lifecycle.rb +240 -0
- data/lib/claude_agent/messages/tool_lifecycle.rb +95 -0
- data/lib/claude_agent/messages.rb +11 -827
- data/lib/claude_agent/options/serializer.rb +194 -0
- data/lib/claude_agent/options.rb +11 -176
- data/lib/claude_agent/sandbox_settings.rb +3 -0
- data/lib/claude_agent/session.rb +0 -204
- data/lib/claude_agent/session_mutations.rb +148 -0
- data/lib/claude_agent/types/mcp.rb +30 -0
- data/lib/claude_agent/types/models.rb +146 -0
- data/lib/claude_agent/types/operations.rb +38 -0
- data/lib/claude_agent/types/sessions.rb +50 -0
- data/lib/claude_agent/types/tools.rb +32 -0
- data/lib/claude_agent/types.rb +6 -264
- data/lib/claude_agent/v2_session.rb +207 -0
- data/lib/claude_agent/version.rb +1 -1
- data/lib/claude_agent.rb +37 -3
- data/sig/claude_agent.rbs +146 -13
- metadata +33 -1
data/sig/claude_agent.rbs
CHANGED
|
@@ -131,8 +131,10 @@ module ClaudeAgent
|
|
|
131
131
|
attr_reader supports_effort: bool?
|
|
132
132
|
attr_reader supported_effort_levels: Array[String]?
|
|
133
133
|
attr_reader supports_adaptive_thinking: bool?
|
|
134
|
+
attr_reader supports_fast_mode: bool?
|
|
135
|
+
attr_reader supports_auto_mode: bool?
|
|
134
136
|
|
|
135
|
-
def initialize: (value: String, ?display_name: String?, ?description: String?, ?supports_effort: bool?, ?supported_effort_levels: Array[String]?, ?supports_adaptive_thinking: bool?) -> void
|
|
137
|
+
def initialize: (value: String, ?display_name: String?, ?description: String?, ?supports_effort: bool?, ?supported_effort_levels: Array[String]?, ?supports_adaptive_thinking: bool?, ?supports_fast_mode: bool?, ?supports_auto_mode: bool?) -> void
|
|
136
138
|
end
|
|
137
139
|
|
|
138
140
|
class McpServerStatus
|
|
@@ -165,14 +167,24 @@ module ClaudeAgent
|
|
|
165
167
|
def initialize: (?email: String?, ?organization: String?, ?subscription_type: String?, ?token_source: String?, ?api_key_source: String?) -> void
|
|
166
168
|
end
|
|
167
169
|
|
|
170
|
+
class AgentInfo
|
|
171
|
+
attr_reader name: String
|
|
172
|
+
attr_reader description: String?
|
|
173
|
+
attr_reader model: String?
|
|
174
|
+
|
|
175
|
+
def initialize: (name: String, ?description: String?, ?model: String?) -> void
|
|
176
|
+
end
|
|
177
|
+
|
|
168
178
|
class InitializationResult
|
|
169
179
|
attr_reader commands: Array[SlashCommand]
|
|
170
180
|
attr_reader output_style: String?
|
|
171
181
|
attr_reader available_output_styles: Array[String]
|
|
172
182
|
attr_reader models: Array[ModelInfo]
|
|
173
183
|
attr_reader account: AccountInfo?
|
|
184
|
+
attr_reader agents: Array[AgentInfo]
|
|
185
|
+
attr_reader fast_mode_state: String?
|
|
174
186
|
|
|
175
|
-
def initialize: (?commands: Array[SlashCommand], ?output_style: String?, ?available_output_styles: Array[String], ?models: Array[ModelInfo], ?account: AccountInfo?) -> void
|
|
187
|
+
def initialize: (?commands: Array[SlashCommand], ?output_style: String?, ?available_output_styles: Array[String], ?models: Array[ModelInfo], ?account: AccountInfo?, ?agents: Array[AgentInfo], ?fast_mode_state: String?) -> void
|
|
176
188
|
end
|
|
177
189
|
|
|
178
190
|
class ModelUsage
|
|
@@ -226,8 +238,10 @@ module ClaudeAgent
|
|
|
226
238
|
attr_reader first_prompt: String?
|
|
227
239
|
attr_reader git_branch: String?
|
|
228
240
|
attr_reader cwd: String?
|
|
241
|
+
attr_reader tag: String?
|
|
242
|
+
attr_reader created_at: Integer?
|
|
229
243
|
|
|
230
|
-
def initialize: (session_id: String, summary: String, last_modified: Integer, file_size: Integer, ?custom_title: String?, ?first_prompt: String?, ?git_branch: String?, ?cwd: String?) -> void
|
|
244
|
+
def initialize: (session_id: String, summary: String, last_modified: Integer, file_size: Integer, ?custom_title: String?, ?first_prompt: String?, ?git_branch: String?, ?cwd: String?, ?tag: String?, ?created_at: Integer?) -> void
|
|
231
245
|
end
|
|
232
246
|
|
|
233
247
|
# Session transcript message returned by get_session_messages (TypeScript SDK v0.2.59 parity)
|
|
@@ -302,10 +316,11 @@ module ClaudeAgent
|
|
|
302
316
|
attr_reader network: SandboxNetworkConfig?
|
|
303
317
|
attr_reader ignore_violations: SandboxIgnoreViolations?
|
|
304
318
|
attr_reader enable_weaker_nested_sandbox: bool
|
|
319
|
+
attr_reader enable_weaker_network_isolation: bool
|
|
305
320
|
attr_reader ripgrep: SandboxRipgrepConfig?
|
|
306
321
|
attr_reader filesystem: SandboxFilesystemConfig?
|
|
307
322
|
|
|
308
|
-
def initialize: (?enabled: bool, ?auto_allow_bash_if_sandboxed: bool, ?excluded_commands: Array[String], ?allow_unsandboxed_commands: bool, ?network: SandboxNetworkConfig?, ?ignore_violations: SandboxIgnoreViolations?, ?enable_weaker_nested_sandbox: bool, ?ripgrep: SandboxRipgrepConfig?, ?filesystem: SandboxFilesystemConfig?) -> void
|
|
323
|
+
def initialize: (?enabled: bool, ?auto_allow_bash_if_sandboxed: bool, ?excluded_commands: Array[String], ?allow_unsandboxed_commands: bool, ?network: SandboxNetworkConfig?, ?ignore_violations: SandboxIgnoreViolations?, ?enable_weaker_nested_sandbox: bool, ?enable_weaker_network_isolation: bool, ?ripgrep: SandboxRipgrepConfig?, ?filesystem: SandboxFilesystemConfig?) -> void
|
|
309
324
|
def to_h: () -> Hash[Symbol, untyped]
|
|
310
325
|
end
|
|
311
326
|
|
|
@@ -323,6 +338,11 @@ module ClaudeAgent
|
|
|
323
338
|
|
|
324
339
|
# Options for configuring Claude Code CLI
|
|
325
340
|
class Options
|
|
341
|
+
module Serializer
|
|
342
|
+
end
|
|
343
|
+
|
|
344
|
+
include Serializer
|
|
345
|
+
|
|
326
346
|
# Constants
|
|
327
347
|
DEFAULTS: Hash[Symbol, untyped]
|
|
328
348
|
ATTRIBUTES: Array[Symbol]
|
|
@@ -345,6 +365,7 @@ module ClaudeAgent
|
|
|
345
365
|
attr_accessor permission_mode: String?
|
|
346
366
|
attr_accessor permission_prompt_tool_name: String?
|
|
347
367
|
attr_accessor can_use_tool: (^(String, Hash[String, untyped], untyped) -> permission_result)?
|
|
368
|
+
attr_accessor on_elicitation: (^(Hash[Symbol, untyped], ?signal: AbortSignal?) -> Hash[Symbol, untyped]?)?
|
|
348
369
|
attr_accessor allow_dangerously_skip_permissions: bool
|
|
349
370
|
attr_accessor permission_queue: bool?
|
|
350
371
|
|
|
@@ -388,6 +409,7 @@ module ClaudeAgent
|
|
|
388
409
|
# Advanced features
|
|
389
410
|
attr_accessor agents: Hash[String, untyped]?
|
|
390
411
|
attr_accessor setting_sources: Array[String]?
|
|
412
|
+
attr_accessor settings: (String | Hash[String, untyped])?
|
|
391
413
|
attr_accessor plugins: Array[String | Hash[Symbol, String]]
|
|
392
414
|
|
|
393
415
|
# Output & streaming
|
|
@@ -406,6 +428,8 @@ module ClaudeAgent
|
|
|
406
428
|
attr_accessor stderr_callback: (^(String) -> void)?
|
|
407
429
|
attr_accessor debug: bool
|
|
408
430
|
attr_accessor debug_file: String?
|
|
431
|
+
attr_accessor tool_config: Hash[Symbol, untyped]?
|
|
432
|
+
attr_accessor agent_progress_summaries: bool?
|
|
409
433
|
|
|
410
434
|
# Logging
|
|
411
435
|
attr_accessor logger: Logger?
|
|
@@ -517,6 +541,27 @@ module ClaudeAgent
|
|
|
517
541
|
|
|
518
542
|
CONTENT_BLOCK_TYPES: Array[Class]
|
|
519
543
|
|
|
544
|
+
# Elicitation complete message (TypeScript SDK v0.2.63 parity)
|
|
545
|
+
class ElicitationCompleteMessage
|
|
546
|
+
attr_reader uuid: String
|
|
547
|
+
attr_reader session_id: String
|
|
548
|
+
attr_reader mcp_server_name: String
|
|
549
|
+
attr_reader elicitation_id: String
|
|
550
|
+
|
|
551
|
+
def initialize: (?uuid: String, ?session_id: String, ?mcp_server_name: String, ?elicitation_id: String) -> void
|
|
552
|
+
def type: () -> :elicitation_complete
|
|
553
|
+
end
|
|
554
|
+
|
|
555
|
+
# Local command output message (TypeScript SDK v0.2.63 parity)
|
|
556
|
+
class LocalCommandOutputMessage
|
|
557
|
+
attr_reader uuid: String
|
|
558
|
+
attr_reader session_id: String
|
|
559
|
+
attr_reader content: String
|
|
560
|
+
|
|
561
|
+
def initialize: (?uuid: String, ?session_id: String, ?content: String) -> void
|
|
562
|
+
def type: () -> :local_command_output
|
|
563
|
+
end
|
|
564
|
+
|
|
520
565
|
class GenericMessage
|
|
521
566
|
attr_reader message_type: String?
|
|
522
567
|
attr_reader raw: Hash[Symbol, untyped]
|
|
@@ -528,7 +573,7 @@ module ClaudeAgent
|
|
|
528
573
|
end
|
|
529
574
|
|
|
530
575
|
# Message types
|
|
531
|
-
type message = UserMessage | UserMessageReplay | AssistantMessage | SystemMessage | ResultMessage | StreamEvent | CompactBoundaryMessage | StatusMessage | ToolProgressMessage | HookResponseMessage | AuthStatusMessage | TaskNotificationMessage | HookStartedMessage | HookProgressMessage | ToolUseSummaryMessage | FilesPersistedEvent | TaskStartedMessage | TaskProgressMessage | RateLimitEvent | PromptSuggestionMessage | GenericMessage
|
|
576
|
+
type message = UserMessage | UserMessageReplay | AssistantMessage | SystemMessage | ResultMessage | StreamEvent | CompactBoundaryMessage | StatusMessage | ToolProgressMessage | HookResponseMessage | AuthStatusMessage | TaskNotificationMessage | HookStartedMessage | HookProgressMessage | ToolUseSummaryMessage | FilesPersistedEvent | TaskStartedMessage | TaskProgressMessage | RateLimitEvent | PromptSuggestionMessage | ElicitationCompleteMessage | LocalCommandOutputMessage | GenericMessage
|
|
532
577
|
|
|
533
578
|
MESSAGE_TYPES: Array[Class]
|
|
534
579
|
|
|
@@ -591,6 +636,7 @@ module ClaudeAgent
|
|
|
591
636
|
attr_reader is_error: bool
|
|
592
637
|
attr_reader num_turns: Integer
|
|
593
638
|
attr_reader session_id: String
|
|
639
|
+
attr_reader uuid: String?
|
|
594
640
|
attr_reader total_cost_usd: Float?
|
|
595
641
|
attr_reader usage: Hash[String, untyped]?
|
|
596
642
|
attr_reader result: String?
|
|
@@ -599,6 +645,7 @@ module ClaudeAgent
|
|
|
599
645
|
attr_reader permission_denials: Array[SDKPermissionDenial]?
|
|
600
646
|
attr_reader model_usage: Hash[String, untyped]?
|
|
601
647
|
attr_reader stop_reason: String?
|
|
648
|
+
attr_reader fast_mode_state: String?
|
|
602
649
|
|
|
603
650
|
def initialize: (
|
|
604
651
|
subtype: String,
|
|
@@ -607,6 +654,7 @@ module ClaudeAgent
|
|
|
607
654
|
is_error: bool,
|
|
608
655
|
num_turns: Integer,
|
|
609
656
|
session_id: String,
|
|
657
|
+
?uuid: String?,
|
|
610
658
|
?total_cost_usd: Float?,
|
|
611
659
|
?usage: Hash[String, untyped]?,
|
|
612
660
|
?result: String?,
|
|
@@ -614,7 +662,8 @@ module ClaudeAgent
|
|
|
614
662
|
?errors: Array[String]?,
|
|
615
663
|
?permission_denials: Array[SDKPermissionDenial]?,
|
|
616
664
|
?model_usage: Hash[String, untyped]?,
|
|
617
|
-
?stop_reason: String
|
|
665
|
+
?stop_reason: String?,
|
|
666
|
+
?fast_mode_state: String?
|
|
618
667
|
) -> void
|
|
619
668
|
|
|
620
669
|
def type: () -> :result
|
|
@@ -769,7 +818,7 @@ module ClaudeAgent
|
|
|
769
818
|
def type: () -> :files_persisted
|
|
770
819
|
end
|
|
771
820
|
|
|
772
|
-
# Task started message (TypeScript SDK v0.2.
|
|
821
|
+
# Task started message (TypeScript SDK v0.2.75 parity)
|
|
773
822
|
class TaskStartedMessage
|
|
774
823
|
attr_reader uuid: String
|
|
775
824
|
attr_reader session_id: String
|
|
@@ -777,12 +826,13 @@ module ClaudeAgent
|
|
|
777
826
|
attr_reader tool_use_id: String?
|
|
778
827
|
attr_reader description: String?
|
|
779
828
|
attr_reader task_type: String?
|
|
829
|
+
attr_reader prompt: String?
|
|
780
830
|
|
|
781
|
-
def initialize: (uuid: String, session_id: String, task_id: String, ?tool_use_id: String?, ?description: String?, ?task_type: String?) -> void
|
|
831
|
+
def initialize: (uuid: String, session_id: String, task_id: String, ?tool_use_id: String?, ?description: String?, ?task_type: String?, ?prompt: String?) -> void
|
|
782
832
|
def type: () -> :task_started
|
|
783
833
|
end
|
|
784
834
|
|
|
785
|
-
# Task progress message (TypeScript SDK v0.2.
|
|
835
|
+
# Task progress message (TypeScript SDK v0.2.75 parity)
|
|
786
836
|
class TaskProgressMessage
|
|
787
837
|
attr_reader uuid: String
|
|
788
838
|
attr_reader session_id: String
|
|
@@ -791,8 +841,9 @@ module ClaudeAgent
|
|
|
791
841
|
attr_reader description: String
|
|
792
842
|
attr_reader usage: Hash[String, untyped]?
|
|
793
843
|
attr_reader last_tool_name: String?
|
|
844
|
+
attr_reader summary: String?
|
|
794
845
|
|
|
795
|
-
def initialize: (uuid: String, session_id: String, task_id: String, description: String, ?usage: Hash[String, untyped]?, ?tool_use_id: String?, ?last_tool_name: String?) -> void
|
|
846
|
+
def initialize: (uuid: String, session_id: String, task_id: String, description: String, ?usage: Hash[String, untyped]?, ?tool_use_id: String?, ?last_tool_name: String?, ?summary: String?) -> void
|
|
796
847
|
def type: () -> :task_progress
|
|
797
848
|
end
|
|
798
849
|
|
|
@@ -850,8 +901,10 @@ module ClaudeAgent
|
|
|
850
901
|
attr_reader transcript_path: String?
|
|
851
902
|
attr_reader cwd: String?
|
|
852
903
|
attr_reader permission_mode: String?
|
|
904
|
+
attr_reader agent_id: String?
|
|
905
|
+
attr_reader agent_type: String?
|
|
853
906
|
|
|
854
|
-
def initialize: (hook_event_name: String, ?session_id: String?, ?transcript_path: String?, ?cwd: String?, ?permission_mode: String?, **untyped) -> void
|
|
907
|
+
def initialize: (hook_event_name: String, ?session_id: String?, ?transcript_path: String?, ?cwd: String?, ?permission_mode: String?, ?agent_id: String?, ?agent_type: String?, **untyped) -> void
|
|
855
908
|
|
|
856
909
|
def self.define_input: (String event_name, ?required: Array[Symbol], ?optional: Hash[Symbol, untyped], ?constants: Hash[Symbol, untyped]) -> Class
|
|
857
910
|
| (String event_name, ?required: Array[Symbol], ?optional: Hash[Symbol, untyped], ?constants: Hash[Symbol, untyped]) { () -> void } -> Class
|
|
@@ -976,6 +1029,27 @@ module ClaudeAgent
|
|
|
976
1029
|
def initialize: (task_id: String, task_subject: String, ?task_description: String?, ?teammate_name: String?, ?team_name: String?, **untyped) -> void
|
|
977
1030
|
end
|
|
978
1031
|
|
|
1032
|
+
class ElicitationInput < BaseHookInput
|
|
1033
|
+
attr_reader mcp_server_name: String
|
|
1034
|
+
attr_reader message: String
|
|
1035
|
+
attr_reader mode: String?
|
|
1036
|
+
attr_reader url: String?
|
|
1037
|
+
attr_reader elicitation_id: String?
|
|
1038
|
+
attr_reader requested_schema: untyped
|
|
1039
|
+
|
|
1040
|
+
def initialize: (mcp_server_name: String, message: String, ?mode: String?, ?url: String?, ?elicitation_id: String?, ?requested_schema: untyped, **untyped) -> void
|
|
1041
|
+
end
|
|
1042
|
+
|
|
1043
|
+
class ElicitationResultInput < BaseHookInput
|
|
1044
|
+
attr_reader mcp_server_name: String
|
|
1045
|
+
attr_reader action: String
|
|
1046
|
+
attr_reader elicitation_id: String?
|
|
1047
|
+
attr_reader mode: String?
|
|
1048
|
+
attr_reader content: untyped
|
|
1049
|
+
|
|
1050
|
+
def initialize: (mcp_server_name: String, action: String, ?elicitation_id: String?, ?mode: String?, ?content: untyped, **untyped) -> void
|
|
1051
|
+
end
|
|
1052
|
+
|
|
979
1053
|
class ConfigChangeInput < BaseHookInput
|
|
980
1054
|
attr_reader source: String
|
|
981
1055
|
attr_reader file_path: String?
|
|
@@ -997,6 +1071,20 @@ module ClaudeAgent
|
|
|
997
1071
|
def initialize: (worktree_path: String, **untyped) -> void
|
|
998
1072
|
end
|
|
999
1073
|
|
|
1074
|
+
class InstructionsLoadedInput < BaseHookInput
|
|
1075
|
+
attr_reader file_path: String
|
|
1076
|
+
attr_reader memory_type: String
|
|
1077
|
+
attr_reader load_reason: String
|
|
1078
|
+
attr_reader globs: Array[String]?
|
|
1079
|
+
attr_reader trigger_file_path: String?
|
|
1080
|
+
attr_reader parent_file_path: String?
|
|
1081
|
+
|
|
1082
|
+
MEMORY_TYPES: Array[String]
|
|
1083
|
+
LOAD_REASONS: Array[String]
|
|
1084
|
+
|
|
1085
|
+
def initialize: (file_path: String, memory_type: String, load_reason: String, ?globs: Array[String]?, ?trigger_file_path: String?, ?parent_file_path: String?, **untyped) -> void
|
|
1086
|
+
end
|
|
1087
|
+
|
|
1000
1088
|
# Permission types
|
|
1001
1089
|
type permission_result = PermissionResultAllow | PermissionResultDeny
|
|
1002
1090
|
|
|
@@ -1291,8 +1379,11 @@ module ClaudeAgent
|
|
|
1291
1379
|
end
|
|
1292
1380
|
|
|
1293
1381
|
# Session discovery
|
|
1294
|
-
def self.list_sessions: (?dir: String?, ?limit: Integer?) -> Array[SessionInfo]
|
|
1382
|
+
def self.list_sessions: (?dir: String?, ?limit: Integer?, ?offset: Integer?, ?include_worktrees: bool) -> Array[SessionInfo]
|
|
1295
1383
|
def self.get_session_messages: (String session_id, ?dir: String?, ?limit: Integer?, ?offset: Integer?) -> Array[SessionMessage]
|
|
1384
|
+
def self.rename_session: (String session_id, String title, ?dir: String?) -> void
|
|
1385
|
+
def self.tag_session: (String session_id, String? tag, ?dir: String?) -> void
|
|
1386
|
+
def self.get_session_info: (String session_id, ?dir: String?) -> SessionInfo?
|
|
1296
1387
|
|
|
1297
1388
|
# Shared session path infrastructure
|
|
1298
1389
|
module SessionPaths
|
|
@@ -1313,7 +1404,7 @@ module ClaudeAgent
|
|
|
1313
1404
|
module ListSessions
|
|
1314
1405
|
BUFFER_SIZE: Integer
|
|
1315
1406
|
|
|
1316
|
-
def self.call: (?dir: String?, ?limit: Integer?) -> Array[SessionInfo]
|
|
1407
|
+
def self.call: (?dir: String?, ?limit: Integer?, ?offset: Integer?) -> Array[SessionInfo]
|
|
1317
1408
|
end
|
|
1318
1409
|
|
|
1319
1410
|
# GetSessionMessages module (TypeScript SDK v0.2.59 parity)
|
|
@@ -1323,12 +1414,30 @@ module ClaudeAgent
|
|
|
1323
1414
|
def self.call: (String session_id, ?dir: String?, ?limit: Integer?, ?offset: Integer?) -> Array[SessionMessage]
|
|
1324
1415
|
end
|
|
1325
1416
|
|
|
1417
|
+
# Session mutations module (TypeScript SDK v0.2.75 parity)
|
|
1418
|
+
module SessionMutations
|
|
1419
|
+
UNICODE_SANITIZE_PATTERN: Regexp
|
|
1420
|
+
|
|
1421
|
+
def self.rename_session: (String session_id, String title, ?dir: String?) -> void
|
|
1422
|
+
def self.tag_session: (String session_id, String? tag, ?dir: String?) -> void
|
|
1423
|
+
end
|
|
1424
|
+
|
|
1425
|
+
# Single session lookup (TypeScript SDK v0.2.75 parity)
|
|
1426
|
+
module GetSessionInfo
|
|
1427
|
+
def self.call: (String session_id, ?dir: String?) -> SessionInfo?
|
|
1428
|
+
end
|
|
1429
|
+
|
|
1326
1430
|
# Convenience methods
|
|
1327
1431
|
def self.conversation: (**untyped) -> Conversation
|
|
1328
1432
|
def self.resume_conversation: (String session_id, **untyped) -> Conversation
|
|
1329
1433
|
|
|
1330
1434
|
# Client
|
|
1331
1435
|
class Client
|
|
1436
|
+
module Commands
|
|
1437
|
+
end
|
|
1438
|
+
|
|
1439
|
+
include Commands
|
|
1440
|
+
|
|
1332
1441
|
attr_reader options: Options
|
|
1333
1442
|
attr_reader transport: Transport::Base
|
|
1334
1443
|
attr_reader server_info: Hash[String, untyped]?
|
|
@@ -1401,6 +1510,7 @@ module ClaudeAgent
|
|
|
1401
1510
|
def apply_flag_settings: (Hash[String, untyped] settings) -> Hash[String, untyped]
|
|
1402
1511
|
def supported_commands: () -> Array[SlashCommand]
|
|
1403
1512
|
def supported_models: () -> Array[ModelInfo]
|
|
1513
|
+
def supported_agents: () -> Array[AgentInfo]
|
|
1404
1514
|
def mcp_server_status: () -> Array[McpServerStatus]
|
|
1405
1515
|
def account_info: () -> AccountInfo
|
|
1406
1516
|
def initialization_result: () -> InitializationResult
|
|
@@ -1414,6 +1524,28 @@ module ClaudeAgent
|
|
|
1414
1524
|
REQUEST_ID_PREFIX: String
|
|
1415
1525
|
HOOK_RESPONSE_KEYS: Hash[Symbol, String]
|
|
1416
1526
|
|
|
1527
|
+
# Mixin modules that compose the protocol's behavior
|
|
1528
|
+
module Primitives
|
|
1529
|
+
end
|
|
1530
|
+
|
|
1531
|
+
module Lifecycle
|
|
1532
|
+
end
|
|
1533
|
+
|
|
1534
|
+
module Messaging
|
|
1535
|
+
end
|
|
1536
|
+
|
|
1537
|
+
module Commands
|
|
1538
|
+
end
|
|
1539
|
+
|
|
1540
|
+
module RequestHandling
|
|
1541
|
+
end
|
|
1542
|
+
|
|
1543
|
+
include Primitives
|
|
1544
|
+
include Lifecycle
|
|
1545
|
+
include Messaging
|
|
1546
|
+
include Commands
|
|
1547
|
+
include RequestHandling
|
|
1548
|
+
|
|
1417
1549
|
attr_reader transport: Transport::Base
|
|
1418
1550
|
attr_reader options: Options
|
|
1419
1551
|
attr_reader server_info: Hash[String, untyped]?
|
|
@@ -1444,6 +1576,7 @@ module ClaudeAgent
|
|
|
1444
1576
|
def apply_flag_settings: (Hash[String, untyped] settings) -> Hash[String, untyped]
|
|
1445
1577
|
def supported_commands: () -> Array[SlashCommand]
|
|
1446
1578
|
def supported_models: () -> Array[ModelInfo]
|
|
1579
|
+
def supported_agents: () -> Array[AgentInfo]
|
|
1447
1580
|
def mcp_server_status: () -> Array[McpServerStatus]
|
|
1448
1581
|
def account_info: () -> AccountInfo
|
|
1449
1582
|
def initialization_result: () -> InitializationResult
|
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.
|
|
4
|
+
version: 0.7.13
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Thomas Carr
|
|
@@ -44,6 +44,7 @@ files:
|
|
|
44
44
|
- ".claude/skills/spec/commands/complete.md"
|
|
45
45
|
- ".claude/skills/spec/commands/update.md"
|
|
46
46
|
- ".worktreeinclude"
|
|
47
|
+
- ARCHITECTURE.md
|
|
47
48
|
- CHANGELOG.md
|
|
48
49
|
- CLAUDE.md
|
|
49
50
|
- LICENSE.txt
|
|
@@ -53,12 +54,27 @@ files:
|
|
|
53
54
|
- lib/claude_agent.rb
|
|
54
55
|
- lib/claude_agent/abort_controller.rb
|
|
55
56
|
- lib/claude_agent/client.rb
|
|
57
|
+
- lib/claude_agent/client/commands.rb
|
|
56
58
|
- lib/claude_agent/content_blocks.rb
|
|
59
|
+
- lib/claude_agent/content_blocks/generic_block.rb
|
|
60
|
+
- lib/claude_agent/content_blocks/image_content_block.rb
|
|
61
|
+
- lib/claude_agent/content_blocks/server_tool_result_block.rb
|
|
62
|
+
- lib/claude_agent/content_blocks/server_tool_use_block.rb
|
|
63
|
+
- lib/claude_agent/content_blocks/text_block.rb
|
|
64
|
+
- lib/claude_agent/content_blocks/thinking_block.rb
|
|
65
|
+
- lib/claude_agent/content_blocks/tool_result_block.rb
|
|
66
|
+
- lib/claude_agent/content_blocks/tool_use_block.rb
|
|
57
67
|
- lib/claude_agent/control_protocol.rb
|
|
68
|
+
- lib/claude_agent/control_protocol/commands.rb
|
|
69
|
+
- lib/claude_agent/control_protocol/lifecycle.rb
|
|
70
|
+
- lib/claude_agent/control_protocol/messaging.rb
|
|
71
|
+
- lib/claude_agent/control_protocol/primitives.rb
|
|
72
|
+
- lib/claude_agent/control_protocol/request_handling.rb
|
|
58
73
|
- lib/claude_agent/conversation.rb
|
|
59
74
|
- lib/claude_agent/cumulative_usage.rb
|
|
60
75
|
- lib/claude_agent/errors.rb
|
|
61
76
|
- lib/claude_agent/event_handler.rb
|
|
77
|
+
- lib/claude_agent/get_session_info.rb
|
|
62
78
|
- lib/claude_agent/get_session_messages.rb
|
|
63
79
|
- lib/claude_agent/hooks.rb
|
|
64
80
|
- lib/claude_agent/list_sessions.rb
|
|
@@ -68,7 +84,16 @@ files:
|
|
|
68
84
|
- lib/claude_agent/mcp/tool.rb
|
|
69
85
|
- lib/claude_agent/message_parser.rb
|
|
70
86
|
- lib/claude_agent/messages.rb
|
|
87
|
+
- lib/claude_agent/messages/conversation.rb
|
|
88
|
+
- lib/claude_agent/messages/generic.rb
|
|
89
|
+
- lib/claude_agent/messages/hook_lifecycle.rb
|
|
90
|
+
- lib/claude_agent/messages/result.rb
|
|
91
|
+
- lib/claude_agent/messages/streaming.rb
|
|
92
|
+
- lib/claude_agent/messages/system.rb
|
|
93
|
+
- lib/claude_agent/messages/task_lifecycle.rb
|
|
94
|
+
- lib/claude_agent/messages/tool_lifecycle.rb
|
|
71
95
|
- lib/claude_agent/options.rb
|
|
96
|
+
- lib/claude_agent/options/serializer.rb
|
|
72
97
|
- lib/claude_agent/permission_queue.rb
|
|
73
98
|
- lib/claude_agent/permission_request.rb
|
|
74
99
|
- lib/claude_agent/permissions.rb
|
|
@@ -76,6 +101,7 @@ files:
|
|
|
76
101
|
- lib/claude_agent/sandbox_settings.rb
|
|
77
102
|
- lib/claude_agent/session.rb
|
|
78
103
|
- lib/claude_agent/session_message_relation.rb
|
|
104
|
+
- lib/claude_agent/session_mutations.rb
|
|
79
105
|
- lib/claude_agent/session_paths.rb
|
|
80
106
|
- lib/claude_agent/spawn.rb
|
|
81
107
|
- lib/claude_agent/tool_activity.rb
|
|
@@ -84,6 +110,12 @@ files:
|
|
|
84
110
|
- lib/claude_agent/transport/subprocess.rb
|
|
85
111
|
- lib/claude_agent/turn_result.rb
|
|
86
112
|
- lib/claude_agent/types.rb
|
|
113
|
+
- lib/claude_agent/types/mcp.rb
|
|
114
|
+
- lib/claude_agent/types/models.rb
|
|
115
|
+
- lib/claude_agent/types/operations.rb
|
|
116
|
+
- lib/claude_agent/types/sessions.rb
|
|
117
|
+
- lib/claude_agent/types/tools.rb
|
|
118
|
+
- lib/claude_agent/v2_session.rb
|
|
87
119
|
- lib/claude_agent/version.rb
|
|
88
120
|
- sig/claude_agent.rbs
|
|
89
121
|
- sig/manifest.yaml
|