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
@@ -0,0 +1,78 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ module BetaRBACRoleSource
8
+ extend Anthropic::Internal::Type::Union
9
+
10
+ Variants =
11
+ T.type_alias do
12
+ T.any(
13
+ Anthropic::Beta::Organization::BetaRBACRoleSourceBuiltIn,
14
+ Anthropic::Beta::Organization::BetaRBACRoleSourceCustom
15
+ )
16
+ end
17
+
18
+ module Type
19
+ extend Anthropic::Internal::Type::Enum
20
+
21
+ TaggedSymbol =
22
+ T.type_alias do
23
+ T.all(
24
+ Symbol,
25
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Type
26
+ )
27
+ end
28
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
29
+
30
+ BUILT_IN =
31
+ T.let(
32
+ :built_in,
33
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Type::TaggedSymbol
34
+ )
35
+ CUSTOM =
36
+ T.let(
37
+ :custom,
38
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Type::TaggedSymbol
39
+ )
40
+
41
+ sig do
42
+ override.returns(
43
+ T::Array[
44
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Type::TaggedSymbol
45
+ ]
46
+ )
47
+ end
48
+ def self.values
49
+ end
50
+ end
51
+
52
+ sig do
53
+ override.returns(
54
+ T::Array[
55
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Variants
56
+ ]
57
+ )
58
+ end
59
+ def self.variants
60
+ end
61
+
62
+ # Creates a new instance of the variant class whose `type` matches the given
63
+ # value, passing the remaining arguments to its constructor.
64
+ sig do
65
+ params(
66
+ type:
67
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Type::OrSymbol
68
+ ).returns(
69
+ Anthropic::Beta::Organization::BetaRBACRoleSource::Variants
70
+ )
71
+ end
72
+ def self.new(type:)
73
+ end
74
+ end
75
+ end
76
+ end
77
+ end
78
+ end
@@ -0,0 +1,36 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaRBACRoleSourceBuiltIn < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaRBACRoleSourceBuiltIn,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # Anthropic provisions the RBAC Role, and the organization's administrators cannot
17
+ # change or delete it.
18
+ sig { returns(Symbol) }
19
+ attr_accessor :type
20
+
21
+ sig { params(type: Symbol).returns(T.attached_class) }
22
+ def self.new(
23
+ # Anthropic provisions the RBAC Role, and the organization's administrators cannot
24
+ # change or delete it.
25
+ type: :built_in
26
+ )
27
+ end
28
+
29
+ sig { override.returns({ type: Symbol }) }
30
+ def to_hash
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,34 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaRBACRoleSourceCustom < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaRBACRoleSourceCustom,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ # The organization's administrators can change and delete the RBAC Role.
17
+ sig { returns(Symbol) }
18
+ attr_accessor :type
19
+
20
+ sig { params(type: Symbol).returns(T.attached_class) }
21
+ def self.new(
22
+ # The organization's administrators can change and delete the RBAC Role.
23
+ type: :custom
24
+ )
25
+ end
26
+
27
+ sig { override.returns({ type: Symbol }) }
28
+ def to_hash
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
34
+ end
@@ -30,6 +30,11 @@ module Anthropic
30
30
  sig { returns(String) }
31
31
  attr_accessor :display_name
32
32
 
33
+ # Instructions for Claude, added to the instructions of every session that can use
34
+ # the Bundle. Null when it has none.
35
+ sig { returns(T.nilable(String)) }
36
+ attr_accessor :instructions
37
+
33
38
  sig { returns(Symbol) }
34
39
  attr_accessor :type
35
40
 
@@ -39,13 +44,14 @@ module Anthropic
39
44
 
40
45
  # A named set of access that Claude can use in a Slack channel or a Slack
41
46
  # workspace: connectors, repositories and credentials. Created and edited in
42
- # claude.ai.
47
+ # claude.ai; Update Bundle also changes its instructions.
43
48
  sig do
44
49
  params(
45
50
  id: String,
46
51
  created_at: Time,
47
52
  description: T.nilable(String),
48
53
  display_name: String,
54
+ instructions: T.nilable(String),
49
55
  updated_at: Time,
50
56
  type: Symbol
51
57
  ).returns(T.attached_class)
@@ -59,6 +65,9 @@ module Anthropic
59
65
  description:,
60
66
  # The Bundle's name. Always set. Read-only.
61
67
  display_name:,
68
+ # Instructions for Claude, added to the instructions of every session that can use
69
+ # the Bundle. Null when it has none.
70
+ instructions:,
62
71
  # Time of the last change to the Bundle.
63
72
  updated_at:,
64
73
  type: :bundle
@@ -72,6 +81,7 @@ module Anthropic
72
81
  created_at: Time,
73
82
  description: T.nilable(String),
74
83
  display_name: String,
84
+ instructions: T.nilable(String),
75
85
  type: Symbol,
76
86
  updated_at: Time
77
87
  }
@@ -0,0 +1,88 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ module ClaudeTag
8
+ class BundleUpdateParams < Anthropic::Internal::Type::BaseModel
9
+ extend Anthropic::Internal::Type::RequestParameters::Converter
10
+ include Anthropic::Internal::Type::RequestParameters
11
+
12
+ OrHash =
13
+ T.type_alias do
14
+ T.any(
15
+ Anthropic::Beta::Organization::ClaudeTag::BundleUpdateParams,
16
+ Anthropic::Internal::AnyHash
17
+ )
18
+ end
19
+
20
+ # The Bundle's identifier, starting with `capp_`.
21
+ sig { returns(String) }
22
+ attr_accessor :bundle_id
23
+
24
+ # Instructions for Claude, up to 10,000 bytes (UTF-8), added to the instructions
25
+ # of every session that can use the Bundle. Null or an empty string clears them.
26
+ sig { returns(T.nilable(String)) }
27
+ attr_accessor :instructions
28
+
29
+ # This endpoint is in beta: requests must send
30
+ # `experimental-claude-tag-2026-10-21` in this header.
31
+ sig do
32
+ returns(
33
+ T.nilable(
34
+ T::Array[T.any(Anthropic::AnthropicBeta::OrSymbol, String)]
35
+ )
36
+ )
37
+ end
38
+ attr_reader :betas
39
+
40
+ sig do
41
+ params(
42
+ betas:
43
+ T::Array[T.any(Anthropic::AnthropicBeta::OrSymbol, String)]
44
+ ).void
45
+ end
46
+ attr_writer :betas
47
+
48
+ sig do
49
+ params(
50
+ bundle_id: String,
51
+ instructions: T.nilable(String),
52
+ betas:
53
+ T::Array[T.any(Anthropic::AnthropicBeta::OrSymbol, String)],
54
+ request_options: Anthropic::RequestOptions::OrHash
55
+ ).returns(T.attached_class)
56
+ end
57
+ def self.new(
58
+ # The Bundle's identifier, starting with `capp_`.
59
+ bundle_id:,
60
+ # Instructions for Claude, up to 10,000 bytes (UTF-8), added to the instructions
61
+ # of every session that can use the Bundle. Null or an empty string clears them.
62
+ instructions: nil,
63
+ # This endpoint is in beta: requests must send
64
+ # `experimental-claude-tag-2026-10-21` in this header.
65
+ betas: nil,
66
+ request_options: {}
67
+ )
68
+ end
69
+
70
+ sig do
71
+ override.returns(
72
+ {
73
+ bundle_id: String,
74
+ instructions: T.nilable(String),
75
+ betas:
76
+ T::Array[T.any(Anthropic::AnthropicBeta::OrSymbol, String)],
77
+ request_options: Anthropic::RequestOptions
78
+ }
79
+ )
80
+ end
81
+ def to_hash
82
+ end
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -54,8 +54,9 @@ module Anthropic
54
54
  # customers: bind a customer's key to that customer's user profile. A key bound to
55
55
  # a user profile can only be attached to a Workspace that has the same user
56
56
  # profile, and the binding cannot be changed later. Omit this field only for your
57
- # organization's own key, because a key created without a user profile ID can be
58
- # attached to any Workspace, including another customer's.
57
+ # organization's own key, never a customer's. A key created without a user profile
58
+ # ID can't be attached to a Workspace that has a user profile, and you can't add
59
+ # one to the key later.
59
60
  sig { returns(T.nilable(String)) }
60
61
  attr_accessor :user_profile_id
61
62
 
@@ -85,8 +86,9 @@ module Anthropic
85
86
  # customers: bind a customer's key to that customer's user profile. A key bound to
86
87
  # a user profile can only be attached to a Workspace that has the same user
87
88
  # profile, and the binding cannot be changed later. Omit this field only for your
88
- # organization's own key, because a key created without a user profile ID can be
89
- # attached to any Workspace, including another customer's.
89
+ # organization's own key, never a customer's. A key created without a user profile
90
+ # ID can't be attached to a Workspace that has a user profile, and you can't add
91
+ # one to the key later.
90
92
  user_profile_id: nil,
91
93
  request_options: {}
92
94
  )
@@ -51,7 +51,8 @@ module Anthropic
51
51
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
52
52
  # 400; an organization that is not a child of the key's parent, or where the
53
53
  # Plugins API is not available, returns a 404. Any other key may pass only its own
54
- # organization's ID here; another organization returns a 404.
54
+ # organization's ID here; another organization returns a 404. A key with no
55
+ # organization of its own must always pass `organization_id`.
55
56
  sig { returns(T.nilable(String)) }
56
57
  attr_accessor :organization_id
57
58
 
@@ -134,7 +135,8 @@ module Anthropic
134
135
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
135
136
  # 400; an organization that is not a child of the key's parent, or where the
136
137
  # Plugins API is not available, returns a 404. Any other key may pass only its own
137
- # organization's ID here; another organization returns a 404.
138
+ # organization's ID here; another organization returns a 404. A key with no
139
+ # organization of its own must always pass `organization_id`.
138
140
  organization_id: nil,
139
141
  # `organization` for Plugins in the organization's plugin marketplaces, `user` for
140
142
  # Plugins in members' personal plugin marketplaces.
@@ -31,7 +31,8 @@ module Anthropic
31
31
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
32
32
  # 400; an organization that is not a child of the key's parent, or where the
33
33
  # Plugins API is not available, returns a 404. Any other key may pass only its own
34
- # organization's ID here; another organization returns a 404.
34
+ # organization's ID here; another organization returns a 404. A key with no
35
+ # organization of its own must always pass `organization_id`.
35
36
  sig { returns(T.nilable(String)) }
36
37
  attr_accessor :organization_id
37
38
 
@@ -109,7 +110,8 @@ module Anthropic
109
110
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
110
111
  # 400; an organization that is not a child of the key's parent, or where the
111
112
  # Plugins API is not available, returns a 404. Any other key may pass only its own
112
- # organization's ID here; another organization returns a 404.
113
+ # organization's ID here; another organization returns a 404. A key with no
114
+ # organization of its own must always pass `organization_id`.
113
115
  organization_id: nil,
114
116
  # `organization` for the organization's plugin marketplaces, `user` for members'
115
117
  # personal plugin marketplaces.
@@ -26,7 +26,8 @@ module Anthropic
26
26
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
27
27
  # 400; an organization that is not a child of the key's parent, or where the
28
28
  # Plugins API is not available, returns a 404. Any other key may pass only its own
29
- # organization's ID here; another organization returns a 404.
29
+ # organization's ID here; another organization returns a 404. A key with no
30
+ # organization of its own must always pass `organization_id`.
30
31
  sig { returns(T.nilable(String)) }
31
32
  attr_accessor :organization_id
32
33
 
@@ -66,7 +67,8 @@ module Anthropic
66
67
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
67
68
  # 400; an organization that is not a child of the key's parent, or where the
68
69
  # Plugins API is not available, returns a 404. Any other key may pass only its own
69
- # organization's ID here; another organization returns a 404.
70
+ # organization's ID here; another organization returns a 404. A key with no
71
+ # organization of its own must always pass `organization_id`.
70
72
  organization_id: nil,
71
73
  # This endpoint is in beta: requests must send `ce-plugins-2026-09-01` in this
72
74
  # header.
@@ -26,7 +26,8 @@ module Anthropic
26
26
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
27
27
  # 400; an organization that is not a child of the key's parent, or where the
28
28
  # Plugins API is not available, returns a 404. Any other key may pass only its own
29
- # organization's ID here; another organization returns a 404.
29
+ # organization's ID here; another organization returns a 404. A key with no
30
+ # organization of its own must always pass `organization_id`.
30
31
  sig { returns(T.nilable(String)) }
31
32
  attr_accessor :organization_id
32
33
 
@@ -66,7 +67,8 @@ module Anthropic
66
67
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
67
68
  # 400; an organization that is not a child of the key's parent, or where the
68
69
  # Plugins API is not available, returns a 404. Any other key may pass only its own
69
- # organization's ID here; another organization returns a 404.
70
+ # organization's ID here; another organization returns a 404. A key with no
71
+ # organization of its own must always pass `organization_id`.
70
72
  organization_id: nil,
71
73
  # This endpoint is in beta: requests must send `ce-plugins-2026-09-01` in this
72
74
  # header.
@@ -36,7 +36,8 @@ module Anthropic
36
36
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
37
37
  # 400; an organization that is not a child of the key's parent, or where the
38
38
  # Plugins API is not available, returns a 404. Any other key may pass only its own
39
- # organization's ID here; another organization returns a 404.
39
+ # organization's ID here; another organization returns a 404. A key with no
40
+ # organization of its own must always pass `organization_id`.
40
41
  sig { returns(T.nilable(String)) }
41
42
  attr_accessor :organization_id
42
43
 
@@ -102,7 +103,8 @@ module Anthropic
102
103
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
103
104
  # 400; an organization that is not a child of the key's parent, or where the
104
105
  # Plugins API is not available, returns a 404. Any other key may pass only its own
105
- # organization's ID here; another organization returns a 404.
106
+ # organization's ID here; another organization returns a 404. A key with no
107
+ # organization of its own must always pass `organization_id`.
106
108
  organization_id: nil,
107
109
  # Optionally set to the `next_page` token from the previous response.
108
110
  page: nil,
@@ -36,7 +36,8 @@ module Anthropic
36
36
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
37
37
  # 400; an organization that is not a child of the key's parent, or where the
38
38
  # Plugins API is not available, returns a 404. Any other key may pass only its own
39
- # organization's ID here; another organization returns a 404.
39
+ # organization's ID here; another organization returns a 404. A key with no
40
+ # organization of its own must always pass `organization_id`.
40
41
  sig { returns(T.nilable(String)) }
41
42
  attr_accessor :organization_id
42
43
 
@@ -102,7 +103,8 @@ module Anthropic
102
103
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
103
104
  # 400; an organization that is not a child of the key's parent, or where the
104
105
  # Plugins API is not available, returns a 404. Any other key may pass only its own
105
- # organization's ID here; another organization returns a 404.
106
+ # organization's ID here; another organization returns a 404. A key with no
107
+ # organization of its own must always pass `organization_id`.
106
108
  organization_id: nil,
107
109
  # Optionally set to the `next_page` token from the previous response.
108
110
  page: nil,
@@ -31,7 +31,8 @@ module Anthropic
31
31
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
32
32
  # 400; an organization that is not a child of the key's parent, or where the
33
33
  # Plugins API is not available, returns a 404. Any other key may pass only its own
34
- # organization's ID here; another organization returns a 404.
34
+ # organization's ID here; another organization returns a 404. A key with no
35
+ # organization of its own must always pass `organization_id`.
35
36
  sig { returns(T.nilable(String)) }
36
37
  attr_accessor :organization_id
37
38
 
@@ -75,7 +76,8 @@ module Anthropic
75
76
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
76
77
  # 400; an organization that is not a child of the key's parent, or where the
77
78
  # Plugins API is not available, returns a 404. Any other key may pass only its own
78
- # organization's ID here; another organization returns a 404.
79
+ # organization's ID here; another organization returns a 404. A key with no
80
+ # organization of its own must always pass `organization_id`.
79
81
  organization_id: nil,
80
82
  # This endpoint is in beta: requests must send `ce-plugins-2026-09-01` in this
81
83
  # header.
@@ -36,7 +36,8 @@ module Anthropic
36
36
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
37
37
  # 400; an organization that is not a child of the key's parent, or where the
38
38
  # Plugins API is not available, returns a 404. Any other key may pass only its own
39
- # organization's ID here; another organization returns a 404.
39
+ # organization's ID here; another organization returns a 404. A key with no
40
+ # organization of its own must always pass `organization_id`.
40
41
  sig { returns(T.nilable(String)) }
41
42
  attr_accessor :organization_id
42
43
 
@@ -87,7 +88,8 @@ module Anthropic
87
88
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
88
89
  # 400; an organization that is not a child of the key's parent, or where the
89
90
  # Plugins API is not available, returns a 404. Any other key may pass only its own
90
- # organization's ID here; another organization returns a 404.
91
+ # organization's ID here; another organization returns a 404. A key with no
92
+ # organization of its own must always pass `organization_id`.
91
93
  organization_id: nil,
92
94
  # Optionally set to the `next_page` token from the previous response.
93
95
  page: nil,
@@ -32,7 +32,8 @@ module Anthropic
32
32
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
33
33
  # 400; an organization that is not a child of the key's parent, or where the
34
34
  # Plugins API is not available, returns a 404. Any other key may pass only its own
35
- # organization's ID here; another organization returns a 404.
35
+ # organization's ID here; another organization returns a 404. A key with no
36
+ # organization of its own must always pass `organization_id`.
36
37
  sig { returns(T.nilable(String)) }
37
38
  attr_accessor :organization_id
38
39
 
@@ -77,7 +78,8 @@ module Anthropic
77
78
  # organization's UUID or its `org_`-prefixed ID. A value that is neither returns a
78
79
  # 400; an organization that is not a child of the key's parent, or where the
79
80
  # Plugins API is not available, returns a 404. Any other key may pass only its own
80
- # organization's ID here; another organization returns a 404.
81
+ # organization's ID here; another organization returns a 404. A key with no
82
+ # organization of its own must always pass `organization_id`.
81
83
  organization_id: nil,
82
84
  # This endpoint is in beta: requests must send `ce-plugins-2026-09-01` in this
83
85
  # header.
@@ -79,7 +79,8 @@ module Anthropic
79
79
  # the Workspace must then name this user profile; the API rejects a request that
80
80
  # names none or a different one. Once set, it can't be replaced or removed
81
81
  # (sending the same ID again changes nothing); only deleting the user profile
82
- # clears it. The default Workspace can't have a user profile.
82
+ # clears it. It can't be set on a Workspace whose External Key isn't bound to this
83
+ # user profile. The default Workspace can't have a user profile.
83
84
  sig { returns(T.nilable(String)) }
84
85
  attr_reader :user_profile_id
85
86
 
@@ -128,7 +129,8 @@ module Anthropic
128
129
  # the Workspace must then name this user profile; the API rejects a request that
129
130
  # names none or a different one. Once set, it can't be replaced or removed
130
131
  # (sending the same ID again changes nothing); only deleting the user profile
131
- # clears it. The default Workspace can't have a user profile.
132
+ # clears it. It can't be set on a Workspace whose External Key isn't bound to this
133
+ # user profile. The default Workspace can't have a user profile.
132
134
  user_profile_id: nil,
133
135
  request_options: {}
134
136
  )
@@ -14,23 +14,27 @@ module Anthropic
14
14
  end
15
15
 
16
16
  # The judgement's grounds in registry-bound terms. Open registry; currently
17
- # "high_risk" (judged high-risk; the call does not run). Clients must tolerate
18
- # values outside this set.
17
+ # "high_risk" (judged high-risk; the call does not run) and "indeterminate" (no
18
+ # judgement was reached; the call does not run). Clients must tolerate values
19
+ # outside this set.
19
20
  sig { returns(String) }
20
21
  attr_accessor :reason_code
21
22
 
22
23
  sig { returns(Symbol) }
23
24
  attr_accessor :type
24
25
 
25
- # The server judged the invocation high-risk; it does not execute and a synthetic
26
- # error tool result is appended.
26
+ # The server judged the invocation high-risk, or reached no judgement and did not
27
+ # hold it for client approval (for example, because the organization is out of
28
+ # credits or has reached a spend limit); it does not execute and a synthetic error
29
+ # tool result is appended.
27
30
  sig do
28
31
  params(reason_code: String, type: Symbol).returns(T.attached_class)
29
32
  end
30
33
  def self.new(
31
34
  # The judgement's grounds in registry-bound terms. Open registry; currently
32
- # "high_risk" (judged high-risk; the call does not run). Clients must tolerate
33
- # values outside this set.
35
+ # "high_risk" (judged high-risk; the call does not run) and "indeterminate" (no
36
+ # judgement was reached; the call does not run). Clients must tolerate values
37
+ # outside this set.
34
38
  reason_code:,
35
39
  type: :deny
36
40
  )
@@ -62,6 +62,8 @@ module Anthropic
62
62
  Anthropic::Organization::ExternalKeyChangedErrorDetails,
63
63
  Anthropic::Organization::WorkspaceMemberLimitExceededErrorDetails,
64
64
  Anthropic::OrganizationTypeNotSupportedErrorDetails,
65
+ Anthropic::ParentOrganizationRequiredErrorDetails,
66
+ Anthropic::RBACRoleNotFoundErrorDetails,
65
67
  Anthropic::Beta::BetaEnvironmentCreateDisabledErrorDetails,
66
68
  Anthropic::Beta::BetaEnvironmentArchivedErrorDetails,
67
69
  Anthropic::Beta::BetaInvalidConfigTypeChangeErrorDetails,
@@ -89,7 +91,9 @@ module Anthropic
89
91
  Anthropic::Beta::Organization::BetaOrganizationLevelScopedAPIKeyRequiredErrorDetails,
90
92
  Anthropic::Beta::BetaEnvironmentNotFoundErrorDetails,
91
93
  Anthropic::Beta::Organization::BetaSlackChannelSetUpEnvironmentNotFoundErrorDetails,
92
- Anthropic::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails
94
+ Anthropic::Beta::Organization::BetaSlackChannelSetUpSettingsConflictErrorDetails,
95
+ Anthropic::Beta::Organization::BetaBundleAttachmentNotSupportedErrorDetails,
96
+ Anthropic::Beta::Organization::BetaBundleOnCallErrorDetails
93
97
  )
94
98
  end
95
99
 
@@ -367,6 +371,16 @@ module Anthropic
367
371
  :organization_type_not_supported,
368
372
  Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
369
373
  )
374
+ PARENT_ORGANIZATION_REQUIRED =
375
+ T.let(
376
+ :parent_organization_required,
377
+ Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
378
+ )
379
+ RBAC_ROLE_NOT_FOUND =
380
+ T.let(
381
+ :rbac_role_not_found,
382
+ Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
383
+ )
370
384
  ENVIRONMENT_CREATE_DISABLED =
371
385
  T.let(
372
386
  :environment_create_disabled,
@@ -501,6 +515,16 @@ module Anthropic
501
515
  :slack_channel_set_up_settings_conflict,
502
516
  Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
503
517
  )
518
+ BUNDLE_ATTACHMENT_NOT_SUPPORTED =
519
+ T.let(
520
+ :bundle_attachment_not_supported,
521
+ Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
522
+ )
523
+ BUNDLE_ON_CALL =
524
+ T.let(
525
+ :bundle_on_call,
526
+ Anthropic::ErrorDetails::ErrorCode::TaggedSymbol
527
+ )
504
528
 
505
529
  sig do
506
530
  override.returns(
@@ -53,8 +53,8 @@ module Anthropic
53
53
 
54
54
  # ID of the user profile the key is bound to, or null if the key is not bound to
55
55
  # one. A key bound to a user profile can only be attached to a Workspace that has
56
- # the same user profile. A key that isn't bound can be attached to a Workspace
57
- # whatever its user profile.
56
+ # the same user profile. A key that isn't bound can only be attached to a
57
+ # Workspace that has no user profile.
58
58
  sig { returns(T.nilable(String)) }
59
59
  attr_accessor :user_profile_id
60
60
 
@@ -104,8 +104,8 @@ module Anthropic
104
104
  updated_at:,
105
105
  # ID of the user profile the key is bound to, or null if the key is not bound to
106
106
  # one. A key bound to a user profile can only be attached to a Workspace that has
107
- # the same user profile. A key that isn't bound can be attached to a Workspace
108
- # whatever its user profile.
107
+ # the same user profile. A key that isn't bound can only be attached to a
108
+ # Workspace that has no user profile.
109
109
  user_profile_id:,
110
110
  type: :external_key
111
111
  )
@@ -52,8 +52,9 @@ module Anthropic
52
52
  # customers: bind a customer's key to that customer's user profile. A key bound to
53
53
  # a user profile can only be attached to a Workspace that has the same user
54
54
  # profile, and the binding cannot be changed later. Omit this field only for your
55
- # organization's own key, because a key created without a user profile ID can be
56
- # attached to any Workspace, including another customer's.
55
+ # organization's own key, never a customer's. A key created without a user profile
56
+ # ID can't be attached to a Workspace that has a user profile, and you can't add
57
+ # one to the key later.
57
58
  sig { returns(T.nilable(String)) }
58
59
  attr_accessor :user_profile_id
59
60
 
@@ -83,8 +84,9 @@ module Anthropic
83
84
  # customers: bind a customer's key to that customer's user profile. A key bound to
84
85
  # a user profile can only be attached to a Workspace that has the same user
85
86
  # profile, and the binding cannot be changed later. Omit this field only for your
86
- # organization's own key, because a key created without a user profile ID can be
87
- # attached to any Workspace, including another customer's.
87
+ # organization's own key, never a customer's. A key created without a user profile
88
+ # ID can't be attached to a Workspace that has a user profile, and you can't add
89
+ # one to the key later.
88
90
  user_profile_id: nil,
89
91
  request_options: {}
90
92
  )