anthropic 1.19.0 → 1.21.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 +21 -0
- data/README.md +1 -1
- data/lib/anthropic/internal/type/enum.rb +11 -11
- data/lib/anthropic/models/bash_code_execution_output_block.rb +21 -0
- data/lib/anthropic/models/bash_code_execution_output_block_param.rb +21 -0
- data/lib/anthropic/models/bash_code_execution_result_block.rb +39 -0
- data/lib/anthropic/models/bash_code_execution_result_block_param.rb +39 -0
- data/lib/anthropic/models/bash_code_execution_tool_result_block.rb +39 -0
- data/lib/anthropic/models/bash_code_execution_tool_result_block_param.rb +49 -0
- data/lib/anthropic/models/bash_code_execution_tool_result_error.rb +21 -0
- data/lib/anthropic/models/bash_code_execution_tool_result_error_code.rb +18 -0
- data/lib/anthropic/models/bash_code_execution_tool_result_error_param.rb +21 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250522.rb +1 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20250825.rb +1 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +79 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block.rb +5 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_content.rb +5 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param.rb +3 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rb +5 -1
- data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block.rb +46 -0
- data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rb +46 -0
- data/lib/anthropic/models/beta/beta_memory_tool_20250818.rb +1 -0
- data/lib/anthropic/models/beta/beta_server_tool_caller_20260120.rb +25 -0
- data/lib/anthropic/models/beta/beta_server_tool_use_block.rb +5 -3
- data/lib/anthropic/models/beta/beta_server_tool_use_block_param.rb +5 -3
- data/lib/anthropic/models/beta/beta_tool.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_bash_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_computer_use_20251124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20241022.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250124.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250429.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_text_editor_20250728.rb +1 -0
- data/lib/anthropic/models/beta/beta_tool_union.rb +10 -5
- data/lib/anthropic/models/beta/beta_tool_use_block.rb +5 -3
- data/lib/anthropic/models/beta/beta_tool_use_block_param.rb +5 -3
- data/lib/anthropic/models/beta/beta_user_location.rb +56 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20250910.rb +1 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_20260209.rb +118 -0
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block.rb +35 -1
- data/lib/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rb +31 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_20250305.rb +4 -55
- data/lib/anthropic/models/beta/beta_web_search_tool_20260209.rb +111 -0
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block.rb +35 -1
- data/lib/anthropic/models/beta/beta_web_search_tool_result_block_param.rb +31 -1
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +12 -7
- data/lib/anthropic/models/beta/message_create_params.rb +2 -2
- data/lib/anthropic/models/beta/messages/batch_create_params.rb +2 -2
- data/lib/anthropic/models/citations_config.rb +15 -0
- data/lib/anthropic/models/code_execution_output_block.rb +21 -0
- data/lib/anthropic/models/code_execution_output_block_param.rb +21 -0
- data/lib/anthropic/models/code_execution_result_block.rb +39 -0
- data/lib/anthropic/models/code_execution_result_block_param.rb +39 -0
- data/lib/anthropic/models/code_execution_tool_20250522.rb +72 -0
- data/lib/anthropic/models/code_execution_tool_20250825.rb +72 -0
- data/lib/anthropic/models/code_execution_tool_20260120.rb +75 -0
- data/lib/anthropic/models/code_execution_tool_result_block.rb +30 -0
- data/lib/anthropic/models/code_execution_tool_result_block_content.rb +20 -0
- data/lib/anthropic/models/code_execution_tool_result_block_param.rb +38 -0
- data/lib/anthropic/models/code_execution_tool_result_block_param_content.rb +20 -0
- data/lib/anthropic/models/code_execution_tool_result_error.rb +21 -0
- data/lib/anthropic/models/code_execution_tool_result_error_code.rb +17 -0
- data/lib/anthropic/models/code_execution_tool_result_error_param.rb +21 -0
- data/lib/anthropic/models/container.rb +27 -0
- data/lib/anthropic/models/container_upload_block.rb +23 -0
- data/lib/anthropic/models/container_upload_block_param.rb +33 -0
- data/lib/anthropic/models/content_block.rb +15 -1
- data/lib/anthropic/models/content_block_param.rb +16 -1
- data/lib/anthropic/models/direct_caller.rb +17 -0
- data/lib/anthropic/models/document_block.rb +52 -0
- data/lib/anthropic/models/encrypted_code_execution_result_block.rb +41 -0
- data/lib/anthropic/models/encrypted_code_execution_result_block_param.rb +41 -0
- data/lib/anthropic/models/memory_tool_20250818.rb +80 -0
- data/lib/anthropic/models/message.rb +12 -3
- data/lib/anthropic/models/message_count_tokens_params.rb +2 -2
- data/lib/anthropic/models/message_count_tokens_tool.rb +22 -1
- data/lib/anthropic/models/message_create_params.rb +11 -3
- data/lib/anthropic/models/message_param.rb +3 -3
- data/lib/anthropic/models/messages/batch_create_params.rb +11 -3
- data/lib/anthropic/models/model.rb +5 -0
- data/lib/anthropic/models/raw_content_block_start_event.rb +21 -3
- data/lib/anthropic/models/raw_message_delta_event.rb +14 -1
- data/lib/anthropic/models/server_tool_caller.rb +23 -0
- data/lib/anthropic/models/server_tool_caller_20260120.rb +21 -0
- data/lib/anthropic/models/server_tool_usage.rb +9 -1
- data/lib/anthropic/models/server_tool_use_block.rb +51 -4
- data/lib/anthropic/models/server_tool_use_block_param.rb +48 -4
- data/lib/anthropic/models/text_editor_code_execution_create_result_block.rb +21 -0
- data/lib/anthropic/models/text_editor_code_execution_create_result_block_param.rb +21 -0
- data/lib/anthropic/models/text_editor_code_execution_str_replace_result_block.rb +45 -0
- data/lib/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rb +45 -0
- data/lib/anthropic/models/text_editor_code_execution_tool_result_block.rb +43 -0
- data/lib/anthropic/models/text_editor_code_execution_tool_result_block_param.rb +53 -0
- data/lib/anthropic/models/text_editor_code_execution_tool_result_error.rb +27 -0
- data/lib/anthropic/models/text_editor_code_execution_tool_result_error_code.rb +18 -0
- data/lib/anthropic/models/text_editor_code_execution_tool_result_error_param.rb +27 -0
- data/lib/anthropic/models/text_editor_code_execution_view_result_block.rb +57 -0
- data/lib/anthropic/models/text_editor_code_execution_view_result_block_param.rb +57 -0
- data/lib/anthropic/models/tool.rb +36 -1
- data/lib/anthropic/models/tool_bash_20250124.rb +37 -1
- data/lib/anthropic/models/tool_reference_block.rb +21 -0
- data/lib/anthropic/models/tool_reference_block_param.rb +32 -0
- data/lib/anthropic/models/tool_result_block_param.rb +8 -4
- data/lib/anthropic/models/tool_search_tool_bm25_20251119.rb +83 -0
- data/lib/anthropic/models/tool_search_tool_regex_20251119.rb +83 -0
- data/lib/anthropic/models/tool_search_tool_result_block.rb +39 -0
- data/lib/anthropic/models/tool_search_tool_result_block_param.rb +49 -0
- data/lib/anthropic/models/tool_search_tool_result_error.rb +27 -0
- data/lib/anthropic/models/tool_search_tool_result_error_code.rb +17 -0
- data/lib/anthropic/models/tool_search_tool_result_error_param.rb +21 -0
- data/lib/anthropic/models/tool_search_tool_search_result_block.rb +21 -0
- data/lib/anthropic/models/tool_search_tool_search_result_block_param.rb +21 -0
- data/lib/anthropic/models/tool_text_editor_20250124.rb +37 -1
- data/lib/anthropic/models/tool_text_editor_20250429.rb +37 -1
- data/lib/anthropic/models/tool_text_editor_20250728.rb +37 -1
- data/lib/anthropic/models/tool_union.rb +22 -1
- data/lib/anthropic/models/tool_use_block.rb +31 -1
- data/lib/anthropic/models/tool_use_block_param.rb +29 -1
- data/lib/anthropic/models/web_fetch_block.rb +38 -0
- data/lib/anthropic/models/web_fetch_block_param.rb +38 -0
- data/lib/anthropic/models/web_fetch_tool_20250910.rb +114 -0
- data/lib/anthropic/models/web_fetch_tool_20260209.rb +114 -0
- data/lib/anthropic/models/web_fetch_tool_result_block.rb +69 -0
- data/lib/anthropic/models/web_fetch_tool_result_block_param.rb +77 -0
- data/lib/anthropic/models/web_fetch_tool_result_error_block.rb +21 -0
- data/lib/anthropic/models/web_fetch_tool_result_error_block_param.rb +21 -0
- data/lib/anthropic/models/web_fetch_tool_result_error_code.rb +21 -0
- data/lib/anthropic/models/web_search_tool_20250305.rb +29 -1
- data/lib/anthropic/models/web_search_tool_20260209.rb +158 -0
- data/lib/anthropic/models/web_search_tool_result_block.rb +31 -1
- data/lib/anthropic/models/web_search_tool_result_block_param.rb +29 -1
- data/lib/anthropic/models.rb +139 -0
- data/lib/anthropic/resources/beta/messages.rb +3 -3
- data/lib/anthropic/resources/messages.rb +9 -5
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +73 -0
- data/rbi/anthropic/models/bash_code_execution_output_block.rbi +29 -0
- data/rbi/anthropic/models/bash_code_execution_output_block_param.rbi +29 -0
- data/rbi/anthropic/models/bash_code_execution_result_block.rbi +62 -0
- data/rbi/anthropic/models/bash_code_execution_result_block_param.rbi +63 -0
- data/rbi/anthropic/models/bash_code_execution_tool_result_block.rbi +79 -0
- data/rbi/anthropic/models/bash_code_execution_tool_result_block_param.rbi +102 -0
- data/rbi/anthropic/models/bash_code_execution_tool_result_error.rbi +44 -0
- data/rbi/anthropic/models/bash_code_execution_tool_result_error_code.rbi +51 -0
- data/rbi/anthropic/models/bash_code_execution_tool_result_error_param.rbi +42 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250522.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20250825.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +167 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block.rbi +9 -2
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param.rbi +8 -3
- data/rbi/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbi +3 -1
- data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block.rbi +69 -0
- data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rbi +74 -0
- data/rbi/anthropic/models/beta/beta_memory_tool_20250818.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_server_tool_caller_20260120.rbi +33 -0
- data/rbi/anthropic/models/beta/beta_server_tool_use_block.rbi +6 -3
- data/rbi/anthropic/models/beta/beta_server_tool_use_block_param.rbi +10 -5
- data/rbi/anthropic/models/beta/beta_tool.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_bash_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_computer_use_20251124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20241022.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250124.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250429.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_text_editor_20250728.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_tool_union.rbi +5 -4
- data/rbi/anthropic/models/beta/beta_tool_use_block.rbi +6 -3
- data/rbi/anthropic/models/beta/beta_tool_use_block_param.rbi +10 -5
- data/rbi/anthropic/models/beta/beta_user_location.rbi +78 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20250910.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_20260209.rbi +218 -0
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block.rbi +62 -2
- data/rbi/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbi +65 -1
- data/rbi/anthropic/models/beta/beta_web_search_tool_20250305.rbi +9 -88
- data/rbi/anthropic/models/beta/beta_web_search_tool_20260209.rbi +210 -0
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block.rbi +62 -2
- data/rbi/anthropic/models/beta/beta_web_search_tool_result_block_param.rbi +65 -1
- data/rbi/anthropic/models/beta/message_count_tokens_params.rbi +17 -4
- data/rbi/anthropic/models/beta/message_create_params.rbi +12 -0
- data/rbi/anthropic/models/beta/messages/batch_create_params.rbi +12 -0
- data/rbi/anthropic/models/citations_config.rbi +23 -0
- data/rbi/anthropic/models/code_execution_output_block.rbi +29 -0
- data/rbi/anthropic/models/code_execution_output_block_param.rbi +29 -0
- data/rbi/anthropic/models/code_execution_result_block.rbi +62 -0
- data/rbi/anthropic/models/code_execution_result_block_param.rbi +62 -0
- data/rbi/anthropic/models/code_execution_tool_20250522.rbi +155 -0
- data/rbi/anthropic/models/code_execution_tool_20250825.rbi +155 -0
- data/rbi/anthropic/models/code_execution_tool_20260120.rbi +157 -0
- data/rbi/anthropic/models/code_execution_tool_result_block.rbi +57 -0
- data/rbi/anthropic/models/code_execution_tool_result_block_content.rbi +27 -0
- data/rbi/anthropic/models/code_execution_tool_result_block_param.rbi +85 -0
- data/rbi/anthropic/models/code_execution_tool_result_block_param_content.rbi +29 -0
- data/rbi/anthropic/models/code_execution_tool_result_error.rbi +42 -0
- data/rbi/anthropic/models/code_execution_tool_result_error_code.rbi +44 -0
- data/rbi/anthropic/models/code_execution_tool_result_error_param.rbi +41 -0
- data/rbi/anthropic/models/container.rbi +35 -0
- data/rbi/anthropic/models/container_upload_block.rbi +27 -0
- data/rbi/anthropic/models/container_upload_block_param.rbi +61 -0
- data/rbi/anthropic/models/content_block.rbi +8 -1
- data/rbi/anthropic/models/content_block_param.rbi +7 -1
- data/rbi/anthropic/models/direct_caller.rbi +24 -0
- data/rbi/anthropic/models/document_block.rbi +81 -0
- data/rbi/anthropic/models/encrypted_code_execution_result_block.rbi +63 -0
- data/rbi/anthropic/models/encrypted_code_execution_result_block_param.rbi +63 -0
- data/rbi/anthropic/models/memory_tool_20250818.rbi +151 -0
- data/rbi/anthropic/models/message.rbi +20 -1
- data/rbi/anthropic/models/message_count_tokens_params.rbi +40 -4
- data/rbi/anthropic/models/message_count_tokens_tool.rbi +12 -1
- data/rbi/anthropic/models/message_create_params.rbi +48 -4
- data/rbi/anthropic/models/messages/batch_create_params.rbi +48 -4
- data/rbi/anthropic/models/model.rbi +4 -0
- data/rbi/anthropic/models/raw_content_block_start_event.rbi +22 -3
- data/rbi/anthropic/models/raw_message_delta_event.rbi +17 -1
- data/rbi/anthropic/models/server_tool_caller.rbi +27 -0
- data/rbi/anthropic/models/server_tool_caller_20260120.rbi +29 -0
- data/rbi/anthropic/models/server_tool_usage.rbi +17 -2
- data/rbi/anthropic/models/server_tool_use_block.rbi +90 -4
- data/rbi/anthropic/models/server_tool_use_block_param.rbi +121 -5
- data/rbi/anthropic/models/text_editor_code_execution_create_result_block.rbi +36 -0
- data/rbi/anthropic/models/text_editor_code_execution_create_result_block_param.rbi +36 -0
- data/rbi/anthropic/models/text_editor_code_execution_str_replace_result_block.rbi +68 -0
- data/rbi/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rbi +68 -0
- data/rbi/anthropic/models/text_editor_code_execution_tool_result_block.rbi +85 -0
- data/rbi/anthropic/models/text_editor_code_execution_tool_result_block_param.rbi +110 -0
- data/rbi/anthropic/models/text_editor_code_execution_tool_result_error.rbi +56 -0
- data/rbi/anthropic/models/text_editor_code_execution_tool_result_error_code.rbi +51 -0
- data/rbi/anthropic/models/text_editor_code_execution_tool_result_error_param.rbi +54 -0
- data/rbi/anthropic/models/text_editor_code_execution_view_result_block.rbi +113 -0
- data/rbi/anthropic/models/text_editor_code_execution_view_result_block_param.rbi +113 -0
- data/rbi/anthropic/models/tool.rbi +65 -0
- data/rbi/anthropic/models/tool_bash_20250124.rbi +78 -0
- data/rbi/anthropic/models/tool_reference_block.rbi +26 -0
- data/rbi/anthropic/models/tool_reference_block_param.rbi +60 -0
- data/rbi/anthropic/models/tool_result_block_param.rbi +3 -1
- data/rbi/anthropic/models/tool_search_tool_bm25_20251119.rbi +184 -0
- data/rbi/anthropic/models/tool_search_tool_regex_20251119.rbi +184 -0
- data/rbi/anthropic/models/tool_search_tool_result_block.rbi +70 -0
- data/rbi/anthropic/models/tool_search_tool_result_block_param.rbi +102 -0
- data/rbi/anthropic/models/tool_search_tool_result_error.rbi +50 -0
- data/rbi/anthropic/models/tool_search_tool_result_error_code.rbi +42 -0
- data/rbi/anthropic/models/tool_search_tool_result_error_param.rbi +41 -0
- data/rbi/anthropic/models/tool_search_tool_search_result_block.rbi +41 -0
- data/rbi/anthropic/models/tool_search_tool_search_result_block_param.rbi +41 -0
- data/rbi/anthropic/models/tool_text_editor_20250124.rbi +84 -0
- data/rbi/anthropic/models/tool_text_editor_20250429.rbi +84 -0
- data/rbi/anthropic/models/tool_text_editor_20250728.rbi +84 -0
- data/rbi/anthropic/models/tool_union.rbi +12 -1
- data/rbi/anthropic/models/tool_use_block.rbi +39 -1
- data/rbi/anthropic/models/tool_use_block_param.rbi +63 -1
- data/rbi/anthropic/models/web_fetch_block.rbi +60 -0
- data/rbi/anthropic/models/web_fetch_block_param.rbi +60 -0
- data/rbi/anthropic/models/web_fetch_tool_20250910.rbi +197 -0
- data/rbi/anthropic/models/web_fetch_tool_20260209.rbi +197 -0
- data/rbi/anthropic/models/web_fetch_tool_result_block.rbi +109 -0
- data/rbi/anthropic/models/web_fetch_tool_result_block_param.rbi +162 -0
- data/rbi/anthropic/models/web_fetch_tool_result_error_block.rbi +41 -0
- data/rbi/anthropic/models/web_fetch_tool_result_error_block_param.rbi +41 -0
- data/rbi/anthropic/models/web_fetch_tool_result_error_code.rbi +62 -0
- data/rbi/anthropic/models/web_search_tool_20250305.rbi +73 -0
- data/rbi/anthropic/models/web_search_tool_20260209.rbi +265 -0
- data/rbi/anthropic/models/web_search_tool_result_block.rbi +40 -1
- data/rbi/anthropic/models/web_search_tool_result_block_param.rbi +63 -1
- data/rbi/anthropic/models.rbi +165 -0
- data/rbi/anthropic/resources/beta/messages.rbi +9 -0
- data/rbi/anthropic/resources/messages.rbi +36 -3
- data/sig/anthropic/models/bash_code_execution_output_block.rbs +19 -0
- data/sig/anthropic/models/bash_code_execution_output_block_param.rbs +19 -0
- data/sig/anthropic/models/bash_code_execution_result_block.rbs +40 -0
- data/sig/anthropic/models/bash_code_execution_result_block_param.rbs +40 -0
- data/sig/anthropic/models/bash_code_execution_tool_result_block.rbs +40 -0
- data/sig/anthropic/models/bash_code_execution_tool_result_block_param.rbs +45 -0
- data/sig/anthropic/models/bash_code_execution_tool_result_error.rbs +25 -0
- data/sig/anthropic/models/bash_code_execution_tool_result_error_code.rbs +22 -0
- data/sig/anthropic/models/bash_code_execution_tool_result_error_param.rbs +25 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250522.rbs +3 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20250825.rbs +3 -1
- data/sig/anthropic/models/beta/beta_code_execution_tool_20260120.rbs +70 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_content.rbs +1 -0
- data/sig/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rbs +1 -0
- data/sig/anthropic/models/beta/beta_encrypted_code_execution_result_block.rbs +44 -0
- data/sig/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rbs +44 -0
- data/sig/anthropic/models/beta/beta_memory_tool_20250818.rbs +3 -1
- data/sig/anthropic/models/beta/beta_server_tool_caller_20260120.rbs +23 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block.rbs +1 -0
- data/sig/anthropic/models/beta/beta_server_tool_use_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_tool.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_bash_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_computer_use_20251124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_bm25_20251119.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_search_tool_regex_20251119.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20241022.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250124.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250429.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_text_editor_20250728.rbs +3 -1
- data/sig/anthropic/models/beta/beta_tool_union.rbs +3 -0
- data/sig/anthropic/models/beta/beta_tool_use_block.rbs +1 -0
- data/sig/anthropic/models/beta/beta_tool_use_block_param.rbs +1 -0
- data/sig/anthropic/models/beta/beta_user_location.rbs +44 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20250910.rbs +3 -1
- data/sig/anthropic/models/beta/beta_web_fetch_tool_20260209.rbs +95 -0
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block.rbs +22 -2
- data/sig/anthropic/models/beta/beta_web_fetch_tool_result_block_param.rbs +22 -2
- data/sig/anthropic/models/beta/beta_web_search_tool_20250305.rbs +7 -42
- data/sig/anthropic/models/beta/beta_web_search_tool_20260209.rbs +90 -0
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block.rbs +22 -2
- data/sig/anthropic/models/beta/beta_web_search_tool_result_block_param.rbs +22 -2
- data/sig/anthropic/models/beta/message_count_tokens_params.rbs +3 -0
- data/sig/anthropic/models/citations_config.rbs +13 -0
- data/sig/anthropic/models/code_execution_output_block.rbs +16 -0
- data/sig/anthropic/models/code_execution_output_block_param.rbs +16 -0
- data/sig/anthropic/models/code_execution_result_block.rbs +40 -0
- data/sig/anthropic/models/code_execution_result_block_param.rbs +40 -0
- data/sig/anthropic/models/code_execution_tool_20250522.rbs +66 -0
- data/sig/anthropic/models/code_execution_tool_20250825.rbs +66 -0
- data/sig/anthropic/models/code_execution_tool_20260120.rbs +66 -0
- data/sig/anthropic/models/code_execution_tool_result_block.rbs +30 -0
- data/sig/anthropic/models/code_execution_tool_result_block_content.rbs +14 -0
- data/sig/anthropic/models/code_execution_tool_result_block_param.rbs +35 -0
- data/sig/anthropic/models/code_execution_tool_result_block_param_content.rbs +14 -0
- data/sig/anthropic/models/code_execution_tool_result_error.rbs +25 -0
- data/sig/anthropic/models/code_execution_tool_result_error_code.rbs +20 -0
- data/sig/anthropic/models/code_execution_tool_result_error_param.rbs +25 -0
- data/sig/anthropic/models/container.rbs +15 -0
- data/sig/anthropic/models/container_upload_block.rbs +15 -0
- data/sig/anthropic/models/container_upload_block_param.rbs +30 -0
- data/sig/anthropic/models/content_block.rbs +6 -0
- data/sig/anthropic/models/content_block_param.rbs +6 -0
- data/sig/anthropic/models/direct_caller.rbs +13 -0
- data/sig/anthropic/models/document_block.rbs +43 -0
- data/sig/anthropic/models/encrypted_code_execution_result_block.rbs +40 -0
- data/sig/anthropic/models/encrypted_code_execution_result_block_param.rbs +40 -0
- data/sig/anthropic/models/memory_tool_20250818.rbs +75 -0
- data/sig/anthropic/models/message.rbs +5 -0
- data/sig/anthropic/models/message_count_tokens_tool.rbs +9 -0
- data/sig/anthropic/models/message_create_params.rbs +5 -0
- data/sig/anthropic/models/messages/batch_create_params.rbs +5 -0
- data/sig/anthropic/models/model.rbs +4 -0
- data/sig/anthropic/models/raw_content_block_start_event.rbs +6 -0
- data/sig/anthropic/models/raw_message_delta_event.rbs +9 -1
- data/sig/anthropic/models/server_tool_caller.rbs +16 -0
- data/sig/anthropic/models/server_tool_caller_20260120.rbs +16 -0
- data/sig/anthropic/models/server_tool_usage.rbs +12 -3
- data/sig/anthropic/models/server_tool_use_block.rbs +43 -4
- data/sig/anthropic/models/server_tool_use_block_param.rbs +49 -6
- data/sig/anthropic/models/text_editor_code_execution_create_result_block.rbs +22 -0
- data/sig/anthropic/models/text_editor_code_execution_create_result_block_param.rbs +22 -0
- data/sig/anthropic/models/text_editor_code_execution_str_replace_result_block.rbs +45 -0
- data/sig/anthropic/models/text_editor_code_execution_str_replace_result_block_param.rbs +45 -0
- data/sig/anthropic/models/text_editor_code_execution_tool_result_block.rbs +42 -0
- data/sig/anthropic/models/text_editor_code_execution_tool_result_block_param.rbs +47 -0
- data/sig/anthropic/models/text_editor_code_execution_tool_result_error.rbs +30 -0
- data/sig/anthropic/models/text_editor_code_execution_tool_result_error_code.rbs +22 -0
- data/sig/anthropic/models/text_editor_code_execution_tool_result_error_param.rbs +30 -0
- data/sig/anthropic/models/text_editor_code_execution_view_result_block.rbs +57 -0
- data/sig/anthropic/models/text_editor_code_execution_view_result_block_param.rbs +57 -0
- data/sig/anthropic/models/tool.rbs +38 -0
- data/sig/anthropic/models/tool_bash_20250124.rbs +38 -0
- data/sig/anthropic/models/tool_reference_block.rbs +15 -0
- data/sig/anthropic/models/tool_reference_block_param.rbs +30 -0
- data/sig/anthropic/models/tool_result_block_param.rbs +1 -0
- data/sig/anthropic/models/tool_search_tool_bm25_20251119.rbs +77 -0
- data/sig/anthropic/models/tool_search_tool_regex_20251119.rbs +77 -0
- data/sig/anthropic/models/tool_search_tool_result_block.rbs +40 -0
- data/sig/anthropic/models/tool_search_tool_result_block_param.rbs +45 -0
- data/sig/anthropic/models/tool_search_tool_result_error.rbs +30 -0
- data/sig/anthropic/models/tool_search_tool_result_error_code.rbs +20 -0
- data/sig/anthropic/models/tool_search_tool_result_error_param.rbs +25 -0
- data/sig/anthropic/models/tool_search_tool_search_result_block.rbs +25 -0
- data/sig/anthropic/models/tool_search_tool_search_result_block_param.rbs +25 -0
- data/sig/anthropic/models/tool_text_editor_20250124.rbs +38 -0
- data/sig/anthropic/models/tool_text_editor_20250429.rbs +38 -0
- data/sig/anthropic/models/tool_text_editor_20250728.rbs +38 -0
- data/sig/anthropic/models/tool_union.rbs +9 -0
- data/sig/anthropic/models/tool_use_block.rbs +22 -1
- data/sig/anthropic/models/tool_use_block_param.rbs +22 -2
- data/sig/anthropic/models/web_fetch_block.rbs +35 -0
- data/sig/anthropic/models/web_fetch_block_param.rbs +35 -0
- data/sig/anthropic/models/web_fetch_tool_20250910.rbs +91 -0
- data/sig/anthropic/models/web_fetch_tool_20260209.rbs +91 -0
- data/sig/anthropic/models/web_fetch_tool_result_block.rbs +55 -0
- data/sig/anthropic/models/web_fetch_tool_result_block_param.rbs +65 -0
- data/sig/anthropic/models/web_fetch_tool_result_error_block.rbs +25 -0
- data/sig/anthropic/models/web_fetch_tool_result_error_block_param.rbs +25 -0
- data/sig/anthropic/models/web_fetch_tool_result_error_code.rbs +28 -0
- data/sig/anthropic/models/web_search_tool_20250305.rbs +29 -0
- data/sig/anthropic/models/web_search_tool_20260209.rbs +123 -0
- data/sig/anthropic/models/web_search_tool_result_block.rbs +16 -0
- data/sig/anthropic/models/web_search_tool_result_block_param.rbs +22 -2
- data/sig/anthropic/models.rbs +132 -0
- data/sig/anthropic/resources/messages.rbs +2 -0
- metadata +221 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b0cb095656f34acdf22be107efb79087c1a80fea2d873f11010fb374d8965d7b
|
|
4
|
+
data.tar.gz: 706ea210c80c1ba1462fa7ee93b23dd8a8067aeddbb37c0b549d7cc7402832a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a35a161860f9e605e035c773160948f014185031108c81f108dc1b54656ae655ef9a0455d39eb79aaf1dbe4ef0a5d9c3268bd2293cd6601568efc11adff7a8f8
|
|
7
|
+
data.tar.gz: 3259249d2d3ac3c716f6d365e71d91dab168a634dc679d256647d22d161ddce1991da94f04c47c034572d3fe63d42cc2c9be16fa22d23eb53a530995d70b44fd
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.21.0 (2026-02-18)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.20.0...v1.21.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.20.0...v1.21.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** manual updates ([3e6a003](https://github.com/anthropics/anthropic-sdk-ruby/commit/3e6a00343dd617f94eeeb27b25571dff3ce54b8b))
|
|
10
|
+
|
|
11
|
+
## 1.20.0 (2026-02-17)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v1.19.0...v1.20.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.19.0...v1.20.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** Releasing claude-sonnet-4-6 ([389bc47](https://github.com/anthropics/anthropic-sdk-ruby/commit/389bc4755468998ffed4841c9e1a054957224152))
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Bug Fixes
|
|
21
|
+
|
|
22
|
+
* **api:** fix spec errors ([85567d3](https://github.com/anthropics/anthropic-sdk-ruby/commit/85567d31b7520311f6607a7a0af682c513ad32e1))
|
|
23
|
+
|
|
3
24
|
## 1.19.0 (2026-02-07)
|
|
4
25
|
|
|
5
26
|
Full Changelog: [v1.18.1...v1.19.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.18.1...v1.19.0)
|
data/README.md
CHANGED
|
@@ -17,28 +17,28 @@ module Anthropic
|
|
|
17
17
|
# values safely.
|
|
18
18
|
#
|
|
19
19
|
# @example
|
|
20
|
-
# # `
|
|
21
|
-
# case
|
|
22
|
-
# when Anthropic::
|
|
20
|
+
# # `bash_code_execution_tool_result_error_code` is a `Anthropic::BashCodeExecutionToolResultErrorCode`
|
|
21
|
+
# case bash_code_execution_tool_result_error_code
|
|
22
|
+
# when Anthropic::BashCodeExecutionToolResultErrorCode::INVALID_TOOL_INPUT
|
|
23
23
|
# # ...
|
|
24
|
-
# when Anthropic::
|
|
24
|
+
# when Anthropic::BashCodeExecutionToolResultErrorCode::UNAVAILABLE
|
|
25
25
|
# # ...
|
|
26
|
-
# when Anthropic::
|
|
26
|
+
# when Anthropic::BashCodeExecutionToolResultErrorCode::TOO_MANY_REQUESTS
|
|
27
27
|
# # ...
|
|
28
28
|
# else
|
|
29
|
-
# puts(
|
|
29
|
+
# puts(bash_code_execution_tool_result_error_code)
|
|
30
30
|
# end
|
|
31
31
|
#
|
|
32
32
|
# @example
|
|
33
|
-
# case
|
|
34
|
-
# in :
|
|
33
|
+
# case bash_code_execution_tool_result_error_code
|
|
34
|
+
# in :invalid_tool_input
|
|
35
35
|
# # ...
|
|
36
|
-
# in :
|
|
36
|
+
# in :unavailable
|
|
37
37
|
# # ...
|
|
38
|
-
# in :
|
|
38
|
+
# in :too_many_requests
|
|
39
39
|
# # ...
|
|
40
40
|
# else
|
|
41
|
-
# puts(
|
|
41
|
+
# puts(bash_code_execution_tool_result_error_code)
|
|
42
42
|
# end
|
|
43
43
|
module Enum
|
|
44
44
|
include Anthropic::Internal::Type::Converter
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionOutputBlock < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute file_id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :file_id, String
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :bash_code_execution_output]
|
|
14
|
+
required :type, const: :bash_code_execution_output
|
|
15
|
+
|
|
16
|
+
# @!method initialize(file_id:, type: :bash_code_execution_output)
|
|
17
|
+
# @param file_id [String]
|
|
18
|
+
# @param type [Symbol, :bash_code_execution_output]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionOutputBlockParam < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute file_id
|
|
7
|
+
#
|
|
8
|
+
# @return [String]
|
|
9
|
+
required :file_id, String
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :bash_code_execution_output]
|
|
14
|
+
required :type, const: :bash_code_execution_output
|
|
15
|
+
|
|
16
|
+
# @!method initialize(file_id:, type: :bash_code_execution_output)
|
|
17
|
+
# @param file_id [String]
|
|
18
|
+
# @param type [Symbol, :bash_code_execution_output]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Anthropic::Models::BashCodeExecutionOutputBlock>]
|
|
9
|
+
required :content, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::BashCodeExecutionOutputBlock] }
|
|
10
|
+
|
|
11
|
+
# @!attribute return_code
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
required :return_code, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute stderr
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :stderr, String
|
|
20
|
+
|
|
21
|
+
# @!attribute stdout
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :stdout, String
|
|
25
|
+
|
|
26
|
+
# @!attribute type
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, :bash_code_execution_result]
|
|
29
|
+
required :type, const: :bash_code_execution_result
|
|
30
|
+
|
|
31
|
+
# @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
|
|
32
|
+
# @param content [Array<Anthropic::Models::BashCodeExecutionOutputBlock>]
|
|
33
|
+
# @param return_code [Integer]
|
|
34
|
+
# @param stderr [String]
|
|
35
|
+
# @param stdout [String]
|
|
36
|
+
# @param type [Symbol, :bash_code_execution_result]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
#
|
|
8
|
+
# @return [Array<Anthropic::Models::BashCodeExecutionOutputBlockParam>]
|
|
9
|
+
required :content, -> { Anthropic::Internal::Type::ArrayOf[Anthropic::BashCodeExecutionOutputBlockParam] }
|
|
10
|
+
|
|
11
|
+
# @!attribute return_code
|
|
12
|
+
#
|
|
13
|
+
# @return [Integer]
|
|
14
|
+
required :return_code, Integer
|
|
15
|
+
|
|
16
|
+
# @!attribute stderr
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :stderr, String
|
|
20
|
+
|
|
21
|
+
# @!attribute stdout
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :stdout, String
|
|
25
|
+
|
|
26
|
+
# @!attribute type
|
|
27
|
+
#
|
|
28
|
+
# @return [Symbol, :bash_code_execution_result]
|
|
29
|
+
required :type, const: :bash_code_execution_result
|
|
30
|
+
|
|
31
|
+
# @!method initialize(content:, return_code:, stderr:, stdout:, type: :bash_code_execution_result)
|
|
32
|
+
# @param content [Array<Anthropic::Models::BashCodeExecutionOutputBlockParam>]
|
|
33
|
+
# @param return_code [Integer]
|
|
34
|
+
# @param stderr [String]
|
|
35
|
+
# @param stdout [String]
|
|
36
|
+
# @param type [Symbol, :bash_code_execution_result]
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
#
|
|
8
|
+
# @return [Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock]
|
|
9
|
+
required :content, union: -> { Anthropic::BashCodeExecutionToolResultBlock::Content }
|
|
10
|
+
|
|
11
|
+
# @!attribute tool_use_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :tool_use_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute type
|
|
17
|
+
#
|
|
18
|
+
# @return [Symbol, :bash_code_execution_tool_result]
|
|
19
|
+
required :type, const: :bash_code_execution_tool_result
|
|
20
|
+
|
|
21
|
+
# @!method initialize(content:, tool_use_id:, type: :bash_code_execution_tool_result)
|
|
22
|
+
# @param content [Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock]
|
|
23
|
+
# @param tool_use_id [String]
|
|
24
|
+
# @param type [Symbol, :bash_code_execution_tool_result]
|
|
25
|
+
|
|
26
|
+
# @see Anthropic::Models::BashCodeExecutionToolResultBlock#content
|
|
27
|
+
module Content
|
|
28
|
+
extend Anthropic::Internal::Type::Union
|
|
29
|
+
|
|
30
|
+
variant -> { Anthropic::BashCodeExecutionToolResultError }
|
|
31
|
+
|
|
32
|
+
variant -> { Anthropic::BashCodeExecutionResultBlock }
|
|
33
|
+
|
|
34
|
+
# @!method self.variants
|
|
35
|
+
# @return [Array(Anthropic::Models::BashCodeExecutionToolResultError, Anthropic::Models::BashCodeExecutionResultBlock)]
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
end
|
|
39
|
+
end
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content
|
|
7
|
+
#
|
|
8
|
+
# @return [Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam]
|
|
9
|
+
required :content, union: -> { Anthropic::BashCodeExecutionToolResultBlockParam::Content }
|
|
10
|
+
|
|
11
|
+
# @!attribute tool_use_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :tool_use_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute type
|
|
17
|
+
#
|
|
18
|
+
# @return [Symbol, :bash_code_execution_tool_result]
|
|
19
|
+
required :type, const: :bash_code_execution_tool_result
|
|
20
|
+
|
|
21
|
+
# @!attribute cache_control
|
|
22
|
+
# Create a cache control breakpoint at this content block.
|
|
23
|
+
#
|
|
24
|
+
# @return [Anthropic::Models::CacheControlEphemeral, nil]
|
|
25
|
+
optional :cache_control, -> { Anthropic::CacheControlEphemeral }, nil?: true
|
|
26
|
+
|
|
27
|
+
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :bash_code_execution_tool_result)
|
|
28
|
+
# @param content [Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam]
|
|
29
|
+
#
|
|
30
|
+
# @param tool_use_id [String]
|
|
31
|
+
#
|
|
32
|
+
# @param cache_control [Anthropic::Models::CacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
33
|
+
#
|
|
34
|
+
# @param type [Symbol, :bash_code_execution_tool_result]
|
|
35
|
+
|
|
36
|
+
# @see Anthropic::Models::BashCodeExecutionToolResultBlockParam#content
|
|
37
|
+
module Content
|
|
38
|
+
extend Anthropic::Internal::Type::Union
|
|
39
|
+
|
|
40
|
+
variant -> { Anthropic::BashCodeExecutionToolResultErrorParam }
|
|
41
|
+
|
|
42
|
+
variant -> { Anthropic::BashCodeExecutionResultBlockParam }
|
|
43
|
+
|
|
44
|
+
# @!method self.variants
|
|
45
|
+
# @return [Array(Anthropic::Models::BashCodeExecutionToolResultErrorParam, Anthropic::Models::BashCodeExecutionResultBlockParam)]
|
|
46
|
+
end
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionToolResultError < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute error_code
|
|
7
|
+
#
|
|
8
|
+
# @return [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
|
|
9
|
+
required :error_code, enum: -> { Anthropic::BashCodeExecutionToolResultErrorCode }
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :bash_code_execution_tool_result_error]
|
|
14
|
+
required :type, const: :bash_code_execution_tool_result_error
|
|
15
|
+
|
|
16
|
+
# @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
|
|
17
|
+
# @param error_code [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
|
|
18
|
+
# @param type [Symbol, :bash_code_execution_tool_result_error]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module BashCodeExecutionToolResultErrorCode
|
|
6
|
+
extend Anthropic::Internal::Type::Enum
|
|
7
|
+
|
|
8
|
+
INVALID_TOOL_INPUT = :invalid_tool_input
|
|
9
|
+
UNAVAILABLE = :unavailable
|
|
10
|
+
TOO_MANY_REQUESTS = :too_many_requests
|
|
11
|
+
EXECUTION_TIME_EXCEEDED = :execution_time_exceeded
|
|
12
|
+
OUTPUT_FILE_TOO_LARGE = :output_file_too_large
|
|
13
|
+
|
|
14
|
+
# @!method self.values
|
|
15
|
+
# @return [Array<Symbol>]
|
|
16
|
+
end
|
|
17
|
+
end
|
|
18
|
+
end
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
class BashCodeExecutionToolResultErrorParam < Anthropic::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute error_code
|
|
7
|
+
#
|
|
8
|
+
# @return [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
|
|
9
|
+
required :error_code, enum: -> { Anthropic::BashCodeExecutionToolResultErrorCode }
|
|
10
|
+
|
|
11
|
+
# @!attribute type
|
|
12
|
+
#
|
|
13
|
+
# @return [Symbol, :bash_code_execution_tool_result_error]
|
|
14
|
+
required :type, const: :bash_code_execution_tool_result_error
|
|
15
|
+
|
|
16
|
+
# @!method initialize(error_code:, type: :bash_code_execution_tool_result_error)
|
|
17
|
+
# @param error_code [Symbol, Anthropic::Models::BashCodeExecutionToolResultErrorCode]
|
|
18
|
+
# @param type [Symbol, :bash_code_execution_tool_result_error]
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaCodeExecutionTool20260120 < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute name
|
|
8
|
+
# Name of the tool.
|
|
9
|
+
#
|
|
10
|
+
# This is how the tool will be called by the model and in `tool_use` blocks.
|
|
11
|
+
#
|
|
12
|
+
# @return [Symbol, :code_execution]
|
|
13
|
+
required :name, const: :code_execution
|
|
14
|
+
|
|
15
|
+
# @!attribute type
|
|
16
|
+
#
|
|
17
|
+
# @return [Symbol, :code_execution_20260120]
|
|
18
|
+
required :type, const: :code_execution_20260120
|
|
19
|
+
|
|
20
|
+
# @!attribute allowed_callers
|
|
21
|
+
#
|
|
22
|
+
# @return [Array<Symbol, Anthropic::Models::Beta::BetaCodeExecutionTool20260120::AllowedCaller>, nil]
|
|
23
|
+
optional :allowed_callers,
|
|
24
|
+
-> { Anthropic::Internal::Type::ArrayOf[enum: Anthropic::Beta::BetaCodeExecutionTool20260120::AllowedCaller] }
|
|
25
|
+
|
|
26
|
+
# @!attribute cache_control
|
|
27
|
+
# Create a cache control breakpoint at this content block.
|
|
28
|
+
#
|
|
29
|
+
# @return [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil]
|
|
30
|
+
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
31
|
+
|
|
32
|
+
# @!attribute defer_loading
|
|
33
|
+
# If true, tool will not be included in initial system prompt. Only loaded when
|
|
34
|
+
# returned via tool_reference from tool search.
|
|
35
|
+
#
|
|
36
|
+
# @return [Boolean, nil]
|
|
37
|
+
optional :defer_loading, Anthropic::Internal::Type::Boolean
|
|
38
|
+
|
|
39
|
+
# @!attribute strict
|
|
40
|
+
# When true, guarantees schema validation on tool names and inputs
|
|
41
|
+
#
|
|
42
|
+
# @return [Boolean, nil]
|
|
43
|
+
optional :strict, Anthropic::Internal::Type::Boolean
|
|
44
|
+
|
|
45
|
+
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, strict: nil, name: :code_execution, type: :code_execution_20260120)
|
|
46
|
+
# Some parameter documentations has been truncated, see
|
|
47
|
+
# {Anthropic::Models::Beta::BetaCodeExecutionTool20260120} for more details.
|
|
48
|
+
#
|
|
49
|
+
# Code execution tool with REPL state persistence (daemon mode + gVisor
|
|
50
|
+
# checkpoint).
|
|
51
|
+
#
|
|
52
|
+
# @param allowed_callers [Array<Symbol, Anthropic::Models::Beta::BetaCodeExecutionTool20260120::AllowedCaller>]
|
|
53
|
+
#
|
|
54
|
+
# @param cache_control [Anthropic::Models::Beta::BetaCacheControlEphemeral, nil] Create a cache control breakpoint at this content block.
|
|
55
|
+
#
|
|
56
|
+
# @param defer_loading [Boolean] If true, tool will not be included in initial system prompt. Only loaded when re
|
|
57
|
+
#
|
|
58
|
+
# @param strict [Boolean] When true, guarantees schema validation on tool names and inputs
|
|
59
|
+
#
|
|
60
|
+
# @param name [Symbol, :code_execution] Name of the tool.
|
|
61
|
+
#
|
|
62
|
+
# @param type [Symbol, :code_execution_20260120]
|
|
63
|
+
|
|
64
|
+
module AllowedCaller
|
|
65
|
+
extend Anthropic::Internal::Type::Enum
|
|
66
|
+
|
|
67
|
+
DIRECT = :direct
|
|
68
|
+
CODE_EXECUTION_20250825 = :code_execution_20250825
|
|
69
|
+
CODE_EXECUTION_20260120 = :code_execution_20260120
|
|
70
|
+
|
|
71
|
+
# @!method self.values
|
|
72
|
+
# @return [Array<Symbol>]
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
BetaCodeExecutionTool20260120 = Beta::BetaCodeExecutionTool20260120
|
|
78
|
+
end
|
|
79
|
+
end
|
|
@@ -5,8 +5,9 @@ module Anthropic
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaCodeExecutionToolResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute content
|
|
8
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
8
9
|
#
|
|
9
|
-
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock]
|
|
10
|
+
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock]
|
|
10
11
|
required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockContent }
|
|
11
12
|
|
|
12
13
|
# @!attribute tool_use_id
|
|
@@ -20,8 +21,10 @@ module Anthropic
|
|
|
20
21
|
required :type, const: :code_execution_tool_result
|
|
21
22
|
|
|
22
23
|
# @!method initialize(content:, tool_use_id:, type: :code_execution_tool_result)
|
|
23
|
-
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock]
|
|
24
|
+
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock] Code execution result with encrypted stdout for PFC + web_search results.
|
|
25
|
+
#
|
|
24
26
|
# @param tool_use_id [String]
|
|
27
|
+
#
|
|
25
28
|
# @param type [Symbol, :code_execution_tool_result]
|
|
26
29
|
end
|
|
27
30
|
end
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
module Beta
|
|
6
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
6
7
|
module BetaCodeExecutionToolResultBlockContent
|
|
7
8
|
extend Anthropic::Internal::Type::Union
|
|
8
9
|
|
|
@@ -10,8 +11,11 @@ module Anthropic
|
|
|
10
11
|
|
|
11
12
|
variant -> { Anthropic::Beta::BetaCodeExecutionResultBlock }
|
|
12
13
|
|
|
14
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
15
|
+
variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlock }
|
|
16
|
+
|
|
13
17
|
# @!method self.variants
|
|
14
|
-
# @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock)]
|
|
18
|
+
# @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultError, Anthropic::Models::Beta::BetaCodeExecutionResultBlock, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlock)]
|
|
15
19
|
end
|
|
16
20
|
end
|
|
17
21
|
|
|
@@ -5,8 +5,9 @@ module Anthropic
|
|
|
5
5
|
module Beta
|
|
6
6
|
class BetaCodeExecutionToolResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute content
|
|
8
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
8
9
|
#
|
|
9
|
-
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam]
|
|
10
|
+
# @return [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam]
|
|
10
11
|
required :content, union: -> { Anthropic::Beta::BetaCodeExecutionToolResultBlockParamContent }
|
|
11
12
|
|
|
12
13
|
# @!attribute tool_use_id
|
|
@@ -26,7 +27,7 @@ module Anthropic
|
|
|
26
27
|
optional :cache_control, -> { Anthropic::Beta::BetaCacheControlEphemeral }, nil?: true
|
|
27
28
|
|
|
28
29
|
# @!method initialize(content:, tool_use_id:, cache_control: nil, type: :code_execution_tool_result)
|
|
29
|
-
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam]
|
|
30
|
+
# @param content [Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam] Code execution result with encrypted stdout for PFC + web_search results.
|
|
30
31
|
#
|
|
31
32
|
# @param tool_use_id [String]
|
|
32
33
|
#
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
module Beta
|
|
6
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
6
7
|
module BetaCodeExecutionToolResultBlockParamContent
|
|
7
8
|
extend Anthropic::Internal::Type::Union
|
|
8
9
|
|
|
@@ -10,8 +11,11 @@ module Anthropic
|
|
|
10
11
|
|
|
11
12
|
variant -> { Anthropic::Beta::BetaCodeExecutionResultBlockParam }
|
|
12
13
|
|
|
14
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
15
|
+
variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlockParam }
|
|
16
|
+
|
|
13
17
|
# @!method self.variants
|
|
14
|
-
# @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam)]
|
|
18
|
+
# @return [Array(Anthropic::Models::Beta::BetaCodeExecutionToolResultErrorParam, Anthropic::Models::Beta::BetaCodeExecutionResultBlockParam, Anthropic::Models::Beta::BetaEncryptedCodeExecutionResultBlockParam)]
|
|
15
19
|
end
|
|
16
20
|
end
|
|
17
21
|
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaEncryptedCodeExecutionResultBlock < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlock>]
|
|
10
|
+
required :content,
|
|
11
|
+
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaCodeExecutionOutputBlock] }
|
|
12
|
+
|
|
13
|
+
# @!attribute encrypted_stdout
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :encrypted_stdout, String
|
|
17
|
+
|
|
18
|
+
# @!attribute return_code
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer]
|
|
21
|
+
required :return_code, Integer
|
|
22
|
+
|
|
23
|
+
# @!attribute stderr
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :stderr, String
|
|
27
|
+
|
|
28
|
+
# @!attribute type
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, :encrypted_code_execution_result]
|
|
31
|
+
required :type, const: :encrypted_code_execution_result
|
|
32
|
+
|
|
33
|
+
# @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
|
|
34
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
35
|
+
#
|
|
36
|
+
# @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlock>]
|
|
37
|
+
# @param encrypted_stdout [String]
|
|
38
|
+
# @param return_code [Integer]
|
|
39
|
+
# @param stderr [String]
|
|
40
|
+
# @param type [Symbol, :encrypted_code_execution_result]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
BetaEncryptedCodeExecutionResultBlock = Beta::BetaEncryptedCodeExecutionResultBlock
|
|
45
|
+
end
|
|
46
|
+
end
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaEncryptedCodeExecutionResultBlockParam < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute content
|
|
8
|
+
#
|
|
9
|
+
# @return [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlockParam>]
|
|
10
|
+
required :content,
|
|
11
|
+
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaCodeExecutionOutputBlockParam] }
|
|
12
|
+
|
|
13
|
+
# @!attribute encrypted_stdout
|
|
14
|
+
#
|
|
15
|
+
# @return [String]
|
|
16
|
+
required :encrypted_stdout, String
|
|
17
|
+
|
|
18
|
+
# @!attribute return_code
|
|
19
|
+
#
|
|
20
|
+
# @return [Integer]
|
|
21
|
+
required :return_code, Integer
|
|
22
|
+
|
|
23
|
+
# @!attribute stderr
|
|
24
|
+
#
|
|
25
|
+
# @return [String]
|
|
26
|
+
required :stderr, String
|
|
27
|
+
|
|
28
|
+
# @!attribute type
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, :encrypted_code_execution_result]
|
|
31
|
+
required :type, const: :encrypted_code_execution_result
|
|
32
|
+
|
|
33
|
+
# @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
|
|
34
|
+
# Code execution result with encrypted stdout for PFC + web_search results.
|
|
35
|
+
#
|
|
36
|
+
# @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlockParam>]
|
|
37
|
+
# @param encrypted_stdout [String]
|
|
38
|
+
# @param return_code [Integer]
|
|
39
|
+
# @param stderr [String]
|
|
40
|
+
# @param type [Symbol, :encrypted_code_execution_result]
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
BetaEncryptedCodeExecutionResultBlockParam = Beta::BetaEncryptedCodeExecutionResultBlockParam
|
|
45
|
+
end
|
|
46
|
+
end
|