anthropic 2.8.0 → 2.9.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.
Files changed (170) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +36 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/error_classes.rb +4 -0
  5. data/lib/anthropic/helpers/threads/beta_message_thread.rb +30 -6
  6. data/lib/anthropic/helpers/tools/runner.rb +21 -4
  7. data/lib/anthropic/helpers/tracing/streamed_message.rb +8 -1
  8. data/lib/anthropic/internal/tracing.rb +1 -0
  9. data/lib/anthropic/internal/type/file_input.rb +11 -0
  10. data/lib/anthropic/internal/util.rb +43 -11
  11. data/lib/anthropic/models/anthropic_beta.rb +44 -30
  12. data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config.rb +1 -1
  13. data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config_params.rb +1 -1
  14. data/lib/anthropic/models/beta/beta_managed_agents_auto_policy.rb +3 -1
  15. data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config.rb +1 -1
  16. data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rb +1 -1
  17. data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config.rb +1 -1
  18. data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rb +1 -1
  19. data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config.rb +1 -1
  20. data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rb +1 -1
  21. data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config.rb +1 -1
  22. data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rb +1 -1
  23. data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config.rb +1 -1
  24. data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config_params.rb +1 -1
  25. data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config.rb +1 -1
  26. data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config_params.rb +1 -1
  27. data/lib/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rb +3 -2
  28. data/lib/anthropic/models/beta/beta_managed_agents_multiagent_params.rb +1 -1
  29. data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config.rb +1 -1
  30. data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rb +1 -1
  31. data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rb +1 -1
  32. data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb +1 -1
  33. data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rb +1 -1
  34. data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb +1 -1
  35. data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config.rb +1 -1
  36. data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rb +1 -1
  37. data/lib/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rb +24 -0
  38. data/lib/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rb +22 -0
  39. data/lib/anthropic/models/beta/organization/beta_bundle_on_call_error.rb +24 -0
  40. data/lib/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rb +22 -0
  41. data/lib/anthropic/models/beta/organization/beta_external_key.rb +2 -2
  42. data/lib/anthropic/models/beta/organization/beta_rbac_role.rb +14 -5
  43. data/lib/anthropic/models/beta/organization/beta_rbac_role_source.rb +52 -0
  44. data/lib/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rb +25 -0
  45. data/lib/anthropic/models/beta/organization/beta_rbac_role_source_custom.rb +20 -0
  46. data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rb +15 -2
  47. data/lib/anthropic/models/beta/organization/claude_tag/bundle_update_params.rb +50 -0
  48. data/lib/anthropic/models/beta/organization/external_key_create_params.rb +3 -2
  49. data/lib/anthropic/models/beta/organization/plugin_list_params.rb +2 -1
  50. data/lib/anthropic/models/beta/organization/plugin_marketplace_list_params.rb +2 -1
  51. data/lib/anthropic/models/beta/organization/plugin_marketplace_retrieve_params.rb +2 -1
  52. data/lib/anthropic/models/beta/organization/plugin_retrieve_params.rb +2 -1
  53. data/lib/anthropic/models/beta/organization/plugins/installation_setting_list_params.rb +2 -1
  54. data/lib/anthropic/models/beta/organization/plugins/share_list_params.rb +2 -1
  55. data/lib/anthropic/models/beta/organization/plugins/version_download_params.rb +2 -1
  56. data/lib/anthropic/models/beta/organization/plugins/version_list_params.rb +2 -1
  57. data/lib/anthropic/models/beta/organization/plugins/version_retrieve_params.rb +2 -1
  58. data/lib/anthropic/models/beta/organization/workspace_update_params.rb +2 -1
  59. data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission.rb +1 -1
  60. data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission_deny.rb +7 -4
  61. data/lib/anthropic/models/error_details.rb +28 -3
  62. data/lib/anthropic/models/organization/external_key.rb +2 -2
  63. data/lib/anthropic/models/organization/external_key_create_params.rb +3 -2
  64. data/lib/anthropic/models/organization/key_profile_mismatch_error.rb +3 -3
  65. data/lib/anthropic/models/organization/key_profile_mismatch_error_details.rb +3 -3
  66. data/lib/anthropic/models/organization/rbac_role.rb +14 -5
  67. data/lib/anthropic/models/organization/rbac_role_source.rb +50 -0
  68. data/lib/anthropic/models/organization/rbac_role_source_built_in.rb +22 -0
  69. data/lib/anthropic/models/organization/rbac_role_source_custom.rb +18 -0
  70. data/lib/anthropic/models/organization/workspace_update_params.rb +2 -1
  71. data/lib/anthropic/models/parent_organization_required_error.rb +20 -0
  72. data/lib/anthropic/models/parent_organization_required_error_details.rb +18 -0
  73. data/lib/anthropic/models/rbac_role_not_found_error.rb +19 -0
  74. data/lib/anthropic/models/rbac_role_not_found_error_details.rb +17 -0
  75. data/lib/anthropic/models.rb +8 -0
  76. data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
  77. data/lib/anthropic/resources/beta/messages.rb +5 -1
  78. data/lib/anthropic/resources/beta/organization/claude_tag/bundles.rb +51 -0
  79. data/lib/anthropic/resources/beta/organization/rbac_roles/permissions.rb +4 -0
  80. data/lib/anthropic/resources/beta/organization/rbac_roles.rb +7 -0
  81. data/lib/anthropic/resources/organization/rbac_roles/permissions.rb +4 -0
  82. data/lib/anthropic/resources/organization/rbac_roles.rb +7 -0
  83. data/lib/anthropic/version.rb +1 -1
  84. data/lib/anthropic.rb +15 -0
  85. data/rbi/anthropic/helpers/bedrock/client.rbi +6 -2
  86. data/rbi/anthropic/helpers/bedrock/event_stream.rbi +12 -3
  87. data/rbi/anthropic/helpers/bedrock/mantle_client.rbi +3 -1
  88. data/rbi/anthropic/helpers/google_cloud/client.rbi +3 -1
  89. data/rbi/anthropic/helpers/refusal_fallback.rbi +12 -4
  90. data/rbi/anthropic/helpers/vertex/client.rbi +6 -2
  91. data/rbi/anthropic/internal/tracing.rbi +2 -0
  92. data/rbi/anthropic/internal/util.rbi +2 -2
  93. data/rbi/anthropic/models/anthropic_beta.rbi +41 -41
  94. data/rbi/anthropic/models/beta/beta_managed_agents_auto_policy.rbi +3 -1
  95. data/rbi/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rbi +3 -2
  96. data/rbi/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rbi +25 -0
  97. data/rbi/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rbi +32 -0
  98. data/rbi/anthropic/models/beta/organization/beta_bundle_on_call_error.rbi +23 -0
  99. data/rbi/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rbi +32 -0
  100. data/rbi/anthropic/models/beta/organization/beta_external_key.rbi +4 -4
  101. data/rbi/anthropic/models/beta/organization/beta_rbac_role.rbi +23 -6
  102. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source.rbi +78 -0
  103. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rbi +36 -0
  104. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source_custom.rbi +34 -0
  105. data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbi +11 -1
  106. data/rbi/anthropic/models/beta/organization/claude_tag/bundle_update_params.rbi +88 -0
  107. data/rbi/anthropic/models/beta/organization/external_key_create_params.rbi +6 -4
  108. data/rbi/anthropic/models/beta/organization/plugin_list_params.rbi +4 -2
  109. data/rbi/anthropic/models/beta/organization/plugin_marketplace_list_params.rbi +4 -2
  110. data/rbi/anthropic/models/beta/organization/plugin_marketplace_retrieve_params.rbi +4 -2
  111. data/rbi/anthropic/models/beta/organization/plugin_retrieve_params.rbi +4 -2
  112. data/rbi/anthropic/models/beta/organization/plugins/installation_setting_list_params.rbi +4 -2
  113. data/rbi/anthropic/models/beta/organization/plugins/share_list_params.rbi +4 -2
  114. data/rbi/anthropic/models/beta/organization/plugins/version_download_params.rbi +4 -2
  115. data/rbi/anthropic/models/beta/organization/plugins/version_list_params.rbi +4 -2
  116. data/rbi/anthropic/models/beta/organization/plugins/version_retrieve_params.rbi +4 -2
  117. data/rbi/anthropic/models/beta/organization/workspace_update_params.rbi +4 -2
  118. data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission_deny.rbi +10 -6
  119. data/rbi/anthropic/models/error_details.rbi +25 -1
  120. data/rbi/anthropic/models/organization/external_key.rbi +4 -4
  121. data/rbi/anthropic/models/organization/external_key_create_params.rbi +6 -4
  122. data/rbi/anthropic/models/organization/key_profile_mismatch_error.rbi +3 -3
  123. data/rbi/anthropic/models/organization/key_profile_mismatch_error_details.rbi +3 -3
  124. data/rbi/anthropic/models/organization/rbac_role.rbi +20 -6
  125. data/rbi/anthropic/models/organization/rbac_role_source.rbi +68 -0
  126. data/rbi/anthropic/models/organization/rbac_role_source_built_in.rbi +34 -0
  127. data/rbi/anthropic/models/organization/rbac_role_source_custom.rbi +32 -0
  128. data/rbi/anthropic/models/organization/workspace_update_params.rbi +4 -2
  129. data/rbi/anthropic/models/parent_organization_required_error.rbi +17 -0
  130. data/rbi/anthropic/models/parent_organization_required_error_details.rbi +28 -0
  131. data/rbi/anthropic/models/rbac_role_not_found_error.rbi +16 -0
  132. data/rbi/anthropic/models/rbac_role_not_found_error_details.rbi +27 -0
  133. data/rbi/anthropic/models.rbi +10 -0
  134. data/rbi/anthropic/resources/beta/organization/claude_tag/bundles.rbi +30 -0
  135. data/rbi/anthropic/resources/beta/organization/external_keys.rbi +3 -2
  136. data/rbi/anthropic/resources/beta/organization/plugin_marketplaces.rbi +4 -2
  137. data/rbi/anthropic/resources/beta/organization/plugins/installation_settings.rbi +2 -1
  138. data/rbi/anthropic/resources/beta/organization/plugins/shares.rbi +2 -1
  139. data/rbi/anthropic/resources/beta/organization/plugins/versions.rbi +6 -3
  140. data/rbi/anthropic/resources/beta/organization/plugins.rbi +4 -2
  141. data/rbi/anthropic/resources/beta/organization/workspaces.rbi +2 -1
  142. data/rbi/anthropic/resources/organization/external_keys.rbi +3 -2
  143. data/rbi/anthropic/resources/organization/workspaces.rbi +2 -1
  144. data/rbi/lib/anthropic/helpers/stainless_helper_header.rbi +6 -1
  145. data/sig/anthropic/helpers/sessions/event_accumulator.rbs +6 -2
  146. data/sig/anthropic/internal/tracing.rbs +1 -0
  147. data/sig/anthropic/internal/util.rbs +1 -1
  148. data/sig/anthropic/models/anthropic_beta.rbs +21 -21
  149. data/sig/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rbs +13 -0
  150. data/sig/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rbs +20 -0
  151. data/sig/anthropic/models/beta/organization/beta_bundle_on_call_error.rbs +13 -0
  152. data/sig/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rbs +17 -0
  153. data/sig/anthropic/models/beta/organization/beta_rbac_role.rbs +5 -0
  154. data/sig/anthropic/models/beta/organization/beta_rbac_role_source.rbs +40 -0
  155. data/sig/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rbs +17 -0
  156. data/sig/anthropic/models/beta/organization/beta_rbac_role_source_custom.rbs +17 -0
  157. data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbs +5 -0
  158. data/sig/anthropic/models/beta/organization/claude_tag/bundle_update_params.rbs +46 -0
  159. data/sig/anthropic/models/error_details.rbs +26 -0
  160. data/sig/anthropic/models/organization/rbac_role.rbs +5 -0
  161. data/sig/anthropic/models/organization/rbac_role_source.rbs +38 -0
  162. data/sig/anthropic/models/organization/rbac_role_source_built_in.rbs +15 -0
  163. data/sig/anthropic/models/organization/rbac_role_source_custom.rbs +15 -0
  164. data/sig/anthropic/models/parent_organization_required_error.rbs +9 -0
  165. data/sig/anthropic/models/parent_organization_required_error_details.rbs +14 -0
  166. data/sig/anthropic/models/rbac_role_not_found_error.rbs +9 -0
  167. data/sig/anthropic/models/rbac_role_not_found_error_details.rbs +14 -0
  168. data/sig/anthropic/models.rbs +8 -0
  169. data/sig/anthropic/resources/beta/organization/claude_tag/bundles.rbs +7 -0
  170. metadata +47 -2
@@ -24,6 +24,10 @@ module Anthropic
24
24
  #
25
25
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
26
26
  #
27
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
28
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
29
+ # @raise [Anthropic::Models::RBACRoleNotFoundError]
30
+ #
27
31
  # @return [Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::RBACRoles::BetaRBACRolePermission>]
28
32
  #
29
33
  # @see Anthropic::Models::Beta::Organization::RBACRoles::PermissionListParams
@@ -18,6 +18,10 @@ module Anthropic
18
18
  #
19
19
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
20
20
  #
21
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
22
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
23
+ # @raise [Anthropic::Models::RBACRoleNotFoundError]
24
+ #
21
25
  # @return [Anthropic::Models::Beta::Organization::BetaRBACRole]
22
26
  #
23
27
  # @see Anthropic::Models::Beta::Organization::RBACRoleRetrieveParams
@@ -49,6 +53,9 @@ module Anthropic
49
53
  #
50
54
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
51
55
  #
56
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
57
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
58
+ #
52
59
  # @return [Anthropic::Internal::PageCursor<Anthropic::Models::Beta::Organization::BetaRBACRole>]
53
60
  #
54
61
  # @see Anthropic::Models::Beta::Organization::RBACRoleListParams
@@ -23,6 +23,10 @@ module Anthropic
23
23
  #
24
24
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
25
25
  #
26
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
27
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
28
+ # @raise [Anthropic::Models::RBACRoleNotFoundError]
29
+ #
26
30
  # @return [Anthropic::Internal::PageCursor<Anthropic::Models::Organization::RBACRoles::RBACRolePermission>]
27
31
  #
28
32
  # @see Anthropic::Models::Organization::RBACRoles::PermissionListParams
@@ -17,6 +17,10 @@ module Anthropic
17
17
  #
18
18
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
19
19
  #
20
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
21
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
22
+ # @raise [Anthropic::Models::RBACRoleNotFoundError]
23
+ #
20
24
  # @return [Anthropic::Models::Organization::RBACRole]
21
25
  #
22
26
  # @see Anthropic::Models::Organization::RBACRoleRetrieveParams
@@ -47,6 +51,9 @@ module Anthropic
47
51
  #
48
52
  # @param request_options [Anthropic::RequestOptions, Hash{Symbol=>Object}, nil]
49
53
  #
54
+ # @raise [Anthropic::Models::OrganizationTypeNotSupportedError]
55
+ # @raise [Anthropic::Models::ParentOrganizationRequiredError]
56
+ #
50
57
  # @return [Anthropic::Internal::PageCursor<Anthropic::Models::Organization::RBACRole>]
51
58
  #
52
59
  # @see Anthropic::Models::Organization::RBACRoleListParams
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anthropic
4
- VERSION = "2.8.0"
4
+ VERSION = "2.9.0"
5
5
  end
data/lib/anthropic.rb CHANGED
@@ -119,6 +119,8 @@ require_relative "anthropic/models/beta/beta_invalid_config_type_change_error"
119
119
  require_relative "anthropic/models/beta/beta_invalid_metadata_error"
120
120
  require_relative "anthropic/models/beta/environments/beta_heartbeat_precondition_failed_error"
121
121
  require_relative "anthropic/models/beta/organization/beta_api_key_scope_missing_error"
122
+ require_relative "anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error"
123
+ require_relative "anthropic/models/beta/organization/beta_bundle_on_call_error"
122
124
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error"
123
125
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error"
124
126
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_owner_error"
@@ -177,7 +179,9 @@ require_relative "anthropic/models/organization/workspace_policy_violation_error
177
179
  require_relative "anthropic/models/organization_on_hold_error"
178
180
  require_relative "anthropic/models/organization_type_not_supported_error"
179
181
  require_relative "anthropic/models/org_member_limit_exceeded_error"
182
+ require_relative "anthropic/models/parent_organization_required_error"
180
183
  require_relative "anthropic/models/ramp_limit_exceeded_error"
184
+ require_relative "anthropic/models/rbac_role_not_found_error"
181
185
  require_relative "anthropic/models/request_body_encoding_invalid_error"
182
186
  require_relative "anthropic/models/request_body_encoding_unsupported_error"
183
187
  require_relative "anthropic/models/request_body_too_large_after_decoding_error"
@@ -1184,6 +1188,8 @@ require_relative "anthropic/models/beta/organization/beta_api_key_workspace_scop
1184
1188
  require_relative "anthropic/models/beta/organization/beta_aws_external_key_config"
1185
1189
  require_relative "anthropic/models/beta/organization/beta_azure_external_key_config"
1186
1190
  require_relative "anthropic/models/beta/organization/beta_azure_external_key_config_param"
1191
+ require_relative "anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details"
1192
+ require_relative "anthropic/models/beta/organization/beta_bundle_on_call_error_details"
1187
1193
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_managed_member_error_details"
1188
1194
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_membership_admin_error_details"
1189
1195
  require_relative "anthropic/models/beta/organization/beta_cannot_sign_out_owner_error_details"
@@ -1266,6 +1272,9 @@ require_relative "anthropic/models/beta/organization/beta_plugin_target_rbac_gro
1266
1272
  require_relative "anthropic/models/beta/organization/beta_plugin_user_actor"
1267
1273
  require_relative "anthropic/models/beta/organization/beta_rbac_group"
1268
1274
  require_relative "anthropic/models/beta/organization/beta_rbac_role"
1275
+ require_relative "anthropic/models/beta/organization/beta_rbac_role_source"
1276
+ require_relative "anthropic/models/beta/organization/beta_rbac_role_source_built_in"
1277
+ require_relative "anthropic/models/beta/organization/beta_rbac_role_source_custom"
1269
1278
  require_relative "anthropic/models/beta/organization/beta_registration_pending_error_details"
1270
1279
  require_relative "anthropic/models/beta/organization/beta_scan_failed_error_details"
1271
1280
  require_relative "anthropic/models/beta/organization/beta_scan_pending_error_details"
@@ -1335,6 +1344,7 @@ require_relative "anthropic/models/beta/organization/claude_tag/bundles/target_c
1335
1344
  require_relative "anthropic/models/beta/organization/claude_tag/bundles/target_delete_params"
1336
1345
  require_relative "anthropic/models/beta/organization/claude_tag/bundles/target_list_params"
1337
1346
  require_relative "anthropic/models/beta/organization/claude_tag/bundles/target_retrieve_params"
1347
+ require_relative "anthropic/models/beta/organization/claude_tag/bundle_update_params"
1338
1348
  require_relative "anthropic/models/beta/organization/claude_tag/slack_channel_create_params"
1339
1349
  require_relative "anthropic/models/beta/organization/claude_tag/slack_channel_delete_params"
1340
1350
  require_relative "anthropic/models/beta/organization/claude_tag/slack_channel_list_params"
@@ -2201,6 +2211,9 @@ require_relative "anthropic/models/organization/rbac_roles/rbac_connector_scope_
2201
2211
  require_relative "anthropic/models/organization/rbac_roles/rbac_connector_tool_permission_resource"
2202
2212
  require_relative "anthropic/models/organization/rbac_roles/rbac_organization_permission_resource"
2203
2213
  require_relative "anthropic/models/organization/rbac_roles/rbac_role_permission"
2214
+ require_relative "anthropic/models/organization/rbac_role_source"
2215
+ require_relative "anthropic/models/organization/rbac_role_source_built_in"
2216
+ require_relative "anthropic/models/organization/rbac_role_source_custom"
2204
2217
  require_relative "anthropic/models/organization/service_account"
2205
2218
  require_relative "anthropic/models/organization/service_account_archive_params"
2206
2219
  require_relative "anthropic/models/organization/service_account_create_params"
@@ -2280,6 +2293,7 @@ require_relative "anthropic/models/org_member_limit_exceeded_error_details"
2280
2293
  require_relative "anthropic/models/output_config"
2281
2294
  require_relative "anthropic/models/output_tokens_details"
2282
2295
  require_relative "anthropic/models/overloaded_error"
2296
+ require_relative "anthropic/models/parent_organization_required_error_details"
2283
2297
  require_relative "anthropic/models/permission_error"
2284
2298
  require_relative "anthropic/models/plain_text_source"
2285
2299
  require_relative "anthropic/models/ramp_limit_exceeded_error_details"
@@ -2292,6 +2306,7 @@ require_relative "anthropic/models/raw_message_delta_event"
2292
2306
  require_relative "anthropic/models/raw_message_start_event"
2293
2307
  require_relative "anthropic/models/raw_message_stop_event"
2294
2308
  require_relative "anthropic/models/raw_message_stream_event"
2309
+ require_relative "anthropic/models/rbac_role_not_found_error_details"
2295
2310
  require_relative "anthropic/models/redacted_thinking_block"
2296
2311
  require_relative "anthropic/models/redacted_thinking_block_param"
2297
2312
  require_relative "anthropic/models/refusal_stop_details"
@@ -53,12 +53,16 @@ module Anthropic
53
53
  end
54
54
 
55
55
  # @api private
56
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
56
+ sig do
57
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
58
+ end
57
59
  private def adapt_request(req)
58
60
  end
59
61
 
60
62
  # @api private
61
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
63
+ sig do
64
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
65
+ end
62
66
  private def sign_request(req)
63
67
  end
64
68
 
@@ -4,14 +4,23 @@ module Anthropic
4
4
  module Helpers
5
5
  module Bedrock
6
6
  module EventStream
7
- AWS_CONTENT_TYPE = T.let(%r{^application/vnd\.amazon\.eventstream}, Regexp)
7
+ AWS_CONTENT_TYPE =
8
+ T.let(%r{^application/vnd\.amazon\.eventstream}, Regexp)
8
9
 
9
10
  class << self
10
- sig { params(chunks: T::Enumerable[String]).returns(T::Enumerable[String]) }
11
+ sig do
12
+ params(chunks: T::Enumerable[String]).returns(T::Enumerable[String])
13
+ end
11
14
  def to_sse(chunks)
12
15
  end
13
16
 
14
- sig { params(decoder: T.untyped, chunk: T.nilable(String), y: Enumerator::Yielder).void }
17
+ sig do
18
+ params(
19
+ decoder: T.untyped,
20
+ chunk: T.nilable(String),
21
+ y: Enumerator::Yielder
22
+ ).void
23
+ end
15
24
  def drain(decoder, chunk, y)
16
25
  end
17
26
 
@@ -83,7 +83,9 @@ module Anthropic
83
83
  end
84
84
 
85
85
  # @api private
86
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
86
+ sig do
87
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
88
+ end
87
89
  private def adapt_request(req)
88
90
  end
89
91
  end
@@ -44,7 +44,9 @@ module Anthropic
44
44
  end
45
45
 
46
46
  # @api private
47
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
47
+ sig do
48
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
49
+ end
48
50
  private def apply_auth(req)
49
51
  end
50
52
 
@@ -23,9 +23,13 @@ module Anthropic
23
23
 
24
24
  sig do
25
25
  params(
26
- fallbacks: T::Array[
27
- T.any(Anthropic::Models::Beta::BetaFallbackParam, T::Hash[Symbol, T.anything])
28
- ],
26
+ fallbacks:
27
+ T::Array[
28
+ T.any(
29
+ Anthropic::Models::Beta::BetaFallbackParam,
30
+ T::Hash[Symbol, T.anything]
31
+ )
32
+ ],
29
33
  betas: T::Array[String]
30
34
  ).void
31
35
  end
@@ -36,7 +40,11 @@ module Anthropic
36
40
  override
37
41
  .params(
38
42
  request: Anthropic::APIRequest,
39
- nxt: T.proc.params(req: Anthropic::APIRequest).returns(Anthropic::APIResponse)
43
+ nxt:
44
+ T
45
+ .proc
46
+ .params(req: Anthropic::APIRequest)
47
+ .returns(Anthropic::APIResponse)
40
48
  )
41
49
  .returns(Anthropic::APIResponse)
42
50
  end
@@ -57,12 +57,16 @@ module Anthropic
57
57
  end
58
58
 
59
59
  # @api private
60
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
60
+ sig do
61
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
62
+ end
61
63
  private def adapt_request(req)
62
64
  end
63
65
 
64
66
  # @api private
65
- sig { params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest) }
67
+ sig do
68
+ params(req: Anthropic::APIRequest).returns(Anthropic::APIRequest)
69
+ end
66
70
  private def apply_google_auth(req)
67
71
  end
68
72
 
@@ -477,6 +477,8 @@ module Anthropic
477
477
  "anthropic.organization.claude_tag.slack_workspaces.list"
478
478
  ORGANIZATION_CLAUDE_TAG_BUNDLES_RETRIEVE =
479
479
  "anthropic.organization.claude_tag.bundles.retrieve"
480
+ ORGANIZATION_CLAUDE_TAG_BUNDLES_UPDATE =
481
+ "anthropic.organization.claude_tag.bundles.update"
480
482
  ORGANIZATION_CLAUDE_TAG_BUNDLES_LIST =
481
483
  "anthropic.organization.claude_tag.bundles.list"
482
484
  ORGANIZATION_CLAUDE_TAG_BUNDLES_TARGETS_CREATE =
@@ -273,7 +273,7 @@ module Anthropic
273
273
  end
274
274
 
275
275
  # @api private
276
- sig { params(max_len: T.nilable(Integer)).returns(String) }
276
+ sig { params(max_len: T.nilable(Integer)).returns(T.nilable(String)) }
277
277
  private def read_enum(max_len)
278
278
  end
279
279
 
@@ -311,7 +311,7 @@ module Anthropic
311
311
  JSON_CONTENT =
312
312
  T.let(%r{^application/(?:[a-zA-Z0-9.-]+\+)?json(?!l)}, Regexp)
313
313
  JSONL_CONTENT =
314
- T.let(%r{^application/(:?x-(?:n|l)djson)|(:?(?:x-)?jsonl)}, Regexp)
314
+ T.let(%r{^application/(?:x-(?:n|l)djson|(?:x-)?jsonl)}, Regexp)
315
315
 
316
316
  class << self
317
317
  # @api private
@@ -19,16 +19,6 @@ module Anthropic
19
19
  TaggedSymbol = T.type_alias { T.all(Symbol, Anthropic::AnthropicBeta) }
20
20
  OrSymbol = T.type_alias { T.any(Symbol, String) }
21
21
 
22
- MESSAGE_BATCHES_2024_09_24 =
23
- T.let(
24
- :"message-batches-2024-09-24",
25
- Anthropic::AnthropicBeta::TaggedSymbol
26
- )
27
- PROMPT_CACHING_2024_07_31 =
28
- T.let(
29
- :"prompt-caching-2024-07-31",
30
- Anthropic::AnthropicBeta::TaggedSymbol
31
- )
32
22
  COMPUTER_USE_2024_10_22 =
33
23
  T.let(
34
24
  :"computer-use-2024-10-22",
@@ -39,22 +29,8 @@ module Anthropic
39
29
  :"computer-use-2025-01-24",
40
30
  Anthropic::AnthropicBeta::TaggedSymbol
41
31
  )
42
- PDFS_2024_09_25 =
43
- T.let(:"pdfs-2024-09-25", Anthropic::AnthropicBeta::TaggedSymbol)
44
- TOKEN_COUNTING_2024_11_01 =
45
- T.let(
46
- :"token-counting-2024-11-01",
47
- Anthropic::AnthropicBeta::TaggedSymbol
48
- )
49
- TOKEN_EFFICIENT_TOOLS_2025_02_19 =
50
- T.let(
51
- :"token-efficient-tools-2025-02-19",
52
- Anthropic::AnthropicBeta::TaggedSymbol
53
- )
54
32
  OUTPUT_128K_2025_02_19 =
55
33
  T.let(:"output-128k-2025-02-19", Anthropic::AnthropicBeta::TaggedSymbol)
56
- FILES_API_2025_04_14 =
57
- T.let(:"files-api-2025-04-14", Anthropic::AnthropicBeta::TaggedSymbol)
58
34
  MCP_CLIENT_2025_04_04 =
59
35
  T.let(:"mcp-client-2025-04-04", Anthropic::AnthropicBeta::TaggedSymbol)
60
36
  MCP_CLIENT_2025_11_20 =
@@ -74,11 +50,6 @@ module Anthropic
74
50
  :"code-execution-2025-05-22",
75
51
  Anthropic::AnthropicBeta::TaggedSymbol
76
52
  )
77
- EXTENDED_CACHE_TTL_2025_04_11 =
78
- T.let(
79
- :"extended-cache-ttl-2025-04-11",
80
- Anthropic::AnthropicBeta::TaggedSymbol
81
- )
82
53
  CONTEXT_1M_2025_08_07 =
83
54
  T.let(:"context-1m-2025-08-07", Anthropic::AnthropicBeta::TaggedSymbol)
84
55
  CONTEXT_MANAGEMENT_2025_06_27 =
@@ -91,8 +62,6 @@ module Anthropic
91
62
  :"model-context-window-exceeded-2025-08-26",
92
63
  Anthropic::AnthropicBeta::TaggedSymbol
93
64
  )
94
- SKILLS_2025_10_02 =
95
- T.let(:"skills-2025-10-02", Anthropic::AnthropicBeta::TaggedSymbol)
96
65
  FAST_MODE_2026_02_01 =
97
66
  T.let(:"fast-mode-2026-02-01", Anthropic::AnthropicBeta::TaggedSymbol)
98
67
  OUTPUT_300K_2026_03_24 =
@@ -122,11 +91,6 @@ module Anthropic
122
91
  :"managed-agents-2026-04-01",
123
92
  Anthropic::AnthropicBeta::TaggedSymbol
124
93
  )
125
- CACHE_DIAGNOSIS_2026_04_07 =
126
- T.let(
127
- :"cache-diagnosis-2026-04-07",
128
- Anthropic::AnthropicBeta::TaggedSymbol
129
- )
130
94
  DREAMING_2026_04_21 =
131
95
  T.let(:"dreaming-2026-04-21", Anthropic::AnthropicBeta::TaggedSymbol)
132
96
  THINKING_TOKEN_COUNT_2026_05_13 =
@@ -188,11 +152,6 @@ module Anthropic
188
152
  :"thinking-display-updates-2026-08-18",
189
153
  Anthropic::AnthropicBeta::TaggedSymbol
190
154
  )
191
- CE_USER_MANAGEMENT_2026_07_13 =
192
- T.let(
193
- :"ce-user-management-2026-07-13",
194
- Anthropic::AnthropicBeta::TaggedSymbol
195
- )
196
155
  MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01 =
197
156
  T.let(
198
157
  :"mid-conversation-output-config-2026-07-01",
@@ -251,6 +210,47 @@ module Anthropic
251
210
  :"experimental-claude-tag-2026-10-21",
252
211
  Anthropic::AnthropicBeta::TaggedSymbol
253
212
  )
213
+ MESSAGE_BATCHES_2024_09_24 =
214
+ T.let(
215
+ :"message-batches-2024-09-24",
216
+ Anthropic::AnthropicBeta::TaggedSymbol
217
+ )
218
+ PROMPT_CACHING_2024_07_31 =
219
+ T.let(
220
+ :"prompt-caching-2024-07-31",
221
+ Anthropic::AnthropicBeta::TaggedSymbol
222
+ )
223
+ PDFS_2024_09_25 =
224
+ T.let(:"pdfs-2024-09-25", Anthropic::AnthropicBeta::TaggedSymbol)
225
+ TOKEN_COUNTING_2024_11_01 =
226
+ T.let(
227
+ :"token-counting-2024-11-01",
228
+ Anthropic::AnthropicBeta::TaggedSymbol
229
+ )
230
+ TOKEN_EFFICIENT_TOOLS_2025_02_19 =
231
+ T.let(
232
+ :"token-efficient-tools-2025-02-19",
233
+ Anthropic::AnthropicBeta::TaggedSymbol
234
+ )
235
+ FILES_API_2025_04_14 =
236
+ T.let(:"files-api-2025-04-14", Anthropic::AnthropicBeta::TaggedSymbol)
237
+ EXTENDED_CACHE_TTL_2025_04_11 =
238
+ T.let(
239
+ :"extended-cache-ttl-2025-04-11",
240
+ Anthropic::AnthropicBeta::TaggedSymbol
241
+ )
242
+ SKILLS_2025_10_02 =
243
+ T.let(:"skills-2025-10-02", Anthropic::AnthropicBeta::TaggedSymbol)
244
+ CACHE_DIAGNOSIS_2026_04_07 =
245
+ T.let(
246
+ :"cache-diagnosis-2026-04-07",
247
+ Anthropic::AnthropicBeta::TaggedSymbol
248
+ )
249
+ CE_USER_MANAGEMENT_2026_07_13 =
250
+ T.let(
251
+ :"ce-user-management-2026-07-13",
252
+ Anthropic::AnthropicBeta::TaggedSymbol
253
+ )
254
254
  end
255
255
  end
256
256
  end
@@ -20,7 +20,9 @@ module Anthropic
20
20
  # The server decides each tool call individually: it judges, from the tool, its
21
21
  # input, and the session content so far, whether the call is safe to execute or
22
22
  # high-risk, and evaluates it to allow when judged safe and to deny when judged
23
- # high-risk. A call the server cannot reach a judgement on evaluates to ask.
23
+ # high-risk. A call the server cannot reach a judgement on evaluates to ask, or
24
+ # for some causes to deny, for example when the organization is out of credits or
25
+ # has reached a spend limit.
24
26
  sig { params(type: Symbol).returns(T.attached_class) }
25
27
  def self.new(type: :auto)
26
28
  end
@@ -38,8 +38,9 @@ module Anthropic
38
38
  sig { returns(Symbol) }
39
39
  attr_accessor :type
40
40
 
41
- # A coordinator topology: the session's primary thread orchestrates work by
42
- # spawning session threads, each running an agent drawn from the `agents` roster.
41
+ # Recommendation: use `multiagent_20261001` instead of `coordinator`. A
42
+ # coordinator topology: the session's primary thread orchestrates work by spawning
43
+ # session threads, each running an agent drawn from the `agents` roster.
43
44
  sig do
44
45
  params(
45
46
  agents:
@@ -0,0 +1,25 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ # The Bundle has an attachment this API does not support editing, so its
8
+ # instructions can be changed only in claude.ai.
9
+ class BetaBundleAttachmentNotSupportedError < Anthropic::Errors::BadRequestError
10
+ sig { returns(Symbol) }
11
+ def error_code
12
+ end
13
+
14
+ sig do
15
+ returns(
16
+ Anthropic::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails
17
+ )
18
+ end
19
+ def details
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaBundleAttachmentNotSupportedErrorDetails < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :error_code
18
+
19
+ # The Bundle has an attachment this API does not support editing, so its
20
+ # instructions can be changed only in claude.ai.
21
+ sig { params(error_code: Symbol).returns(T.attached_class) }
22
+ def self.new(error_code: :bundle_attachment_not_supported)
23
+ end
24
+
25
+ sig { override.returns({ error_code: Symbol }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,23 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ # This Bundle's instructions are managed in claude.ai and can't be changed through
8
+ # the API.
9
+ class BetaBundleOnCallError < Anthropic::Errors::BadRequestError
10
+ sig { returns(Symbol) }
11
+ def error_code
12
+ end
13
+
14
+ sig do
15
+ returns(Anthropic::Beta::Organization::BetaBundleOnCallErrorDetails)
16
+ end
17
+ def details
18
+ end
19
+ end
20
+ end
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaBundleOnCallErrorDetails < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaBundleOnCallErrorDetails,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :error_code
18
+
19
+ # This Bundle's instructions are managed in claude.ai and can't be changed through
20
+ # the API.
21
+ sig { params(error_code: Symbol).returns(T.attached_class) }
22
+ def self.new(error_code: :bundle_on_call)
23
+ end
24
+
25
+ sig { override.returns({ error_code: Symbol }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -56,8 +56,8 @@ module Anthropic
56
56
 
57
57
  # ID of the user profile the key is bound to, or null if the key is not bound to
58
58
  # one. A key bound to a user profile can only be attached to a Workspace that has
59
- # the same user profile. A key that isn't bound can be attached to a Workspace
60
- # whatever its user profile.
59
+ # the same user profile. A key that isn't bound can only be attached to a
60
+ # Workspace that has no user profile.
61
61
  sig { returns(T.nilable(String)) }
62
62
  attr_accessor :user_profile_id
63
63
 
@@ -107,8 +107,8 @@ module Anthropic
107
107
  updated_at:,
108
108
  # ID of the user profile the key is bound to, or null if the key is not bound to
109
109
  # one. A key bound to a user profile can only be attached to a Workspace that has
110
- # the same user profile. A key that isn't bound can be attached to a Workspace
111
- # whatever its user profile.
110
+ # the same user profile. A key that isn't bound can only be attached to a
111
+ # Workspace that has no user profile.
112
112
  user_profile_id:,
113
113
  type: :external_key
114
114
  )
@@ -21,12 +21,19 @@ module Anthropic
21
21
  sig { returns(Time) }
22
22
  attr_accessor :created_at
23
23
 
24
- # Name of the RBAC Role. For a role created by Anthropic, this is Anthropic's name
25
- # for the access that the role grants. Anthropic may change this name, so to keep
26
- # a lasting reference to a role, store its `id`.
24
+ # Name of the RBAC Role. For a built-in role, this is Anthropic's name for the
25
+ # access that the role grants. Anthropic may change this name, so to keep a
26
+ # lasting reference to a role, store its `id`.
27
27
  sig { returns(String) }
28
28
  attr_accessor :display_name
29
29
 
30
+ # Whether the RBAC Role is built-in or custom. More values of `type` may be added,
31
+ # so do not treat every role that is not `built_in` as `custom`.
32
+ sig do
33
+ returns(Anthropic::Beta::Organization::BetaRBACRoleSource::Variants)
34
+ end
35
+ attr_accessor :source
36
+
30
37
  # Object type.
31
38
  #
32
39
  # For RBAC Roles, this is always `"rbac_role"`.
@@ -42,6 +49,11 @@ module Anthropic
42
49
  id: String,
43
50
  created_at: Time,
44
51
  display_name: String,
52
+ source:
53
+ T.any(
54
+ Anthropic::Beta::Organization::BetaRBACRoleSourceBuiltIn::OrHash,
55
+ Anthropic::Beta::Organization::BetaRBACRoleSourceCustom::OrHash
56
+ ),
45
57
  updated_at: Time,
46
58
  type: Symbol
47
59
  ).returns(T.attached_class)
@@ -51,10 +63,13 @@ module Anthropic
51
63
  id:,
52
64
  # RFC 3339 datetime string indicating when the RBAC Role was created.
53
65
  created_at:,
54
- # Name of the RBAC Role. For a role created by Anthropic, this is Anthropic's name
55
- # for the access that the role grants. Anthropic may change this name, so to keep
56
- # a lasting reference to a role, store its `id`.
66
+ # Name of the RBAC Role. For a built-in role, this is Anthropic's name for the
67
+ # access that the role grants. Anthropic may change this name, so to keep a
68
+ # lasting reference to a role, store its `id`.
57
69
  display_name:,
70
+ # Whether the RBAC Role is built-in or custom. More values of `type` may be added,
71
+ # so do not treat every role that is not `built_in` as `custom`.
72
+ source:,
58
73
  # RFC 3339 datetime string indicating when the RBAC Role was last updated.
59
74
  updated_at:,
60
75
  # Object type.
@@ -70,6 +85,8 @@ module Anthropic
70
85
  id: String,
71
86
  created_at: Time,
72
87
  display_name: String,
88
+ source:
89
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Variants,
73
90
  type: Symbol,
74
91
  updated_at: Time
75
92
  }