anthropic 2.7.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 (228) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +62 -0
  3. data/README.md +1 -1
  4. data/lib/anthropic/error_classes.rb +4 -0
  5. data/lib/anthropic/helpers/bedrock/client.rb +17 -5
  6. data/lib/anthropic/helpers/google_cloud/client.rb +4 -1
  7. data/lib/anthropic/helpers/threads/beta_message_thread.rb +30 -6
  8. data/lib/anthropic/helpers/tools/runner.rb +21 -4
  9. data/lib/anthropic/helpers/tracing/streamed_message.rb +8 -1
  10. data/lib/anthropic/helpers/vertex/client.rb +26 -12
  11. data/lib/anthropic/internal/tracing.rb +1 -0
  12. data/lib/anthropic/internal/type/file_input.rb +11 -0
  13. data/lib/anthropic/internal/util.rb +43 -11
  14. data/lib/anthropic/models/anthropic_beta.rb +44 -30
  15. data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config.rb +1 -1
  16. data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset_default_config_params.rb +1 -1
  17. data/lib/anthropic/models/beta/beta_managed_agents_auto_policy.rb +3 -1
  18. data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config.rb +1 -1
  19. data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rb +1 -1
  20. data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config.rb +1 -1
  21. data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rb +1 -1
  22. data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config.rb +1 -1
  23. data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rb +1 -1
  24. data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config.rb +1 -1
  25. data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rb +1 -1
  26. data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config.rb +1 -1
  27. data/lib/anthropic/models/beta/beta_managed_agents_mcp_tool_config_params.rb +1 -1
  28. data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config.rb +1 -1
  29. data/lib/anthropic/models/beta/beta_managed_agents_mcp_toolset_default_config_params.rb +1 -1
  30. data/lib/anthropic/models/beta/beta_managed_agents_model.rb +1 -1
  31. data/lib/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rb +3 -2
  32. data/lib/anthropic/models/beta/beta_managed_agents_multiagent_params.rb +1 -1
  33. data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config.rb +1 -1
  34. data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rb +1 -1
  35. data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rb +1 -1
  36. data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb +1 -1
  37. data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rb +1 -1
  38. data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb +1 -1
  39. data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config.rb +1 -1
  40. data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rb +1 -1
  41. data/lib/anthropic/models/beta/organization/beta_analytics_claude_tag_metrics.rb +42 -0
  42. data/lib/anthropic/models/beta/organization/beta_analytics_single_day_activity_summary.rb +43 -1
  43. data/lib/anthropic/models/beta/organization/beta_analytics_user_activity.rb +14 -1
  44. data/lib/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rb +24 -0
  45. data/lib/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rb +22 -0
  46. data/lib/anthropic/models/beta/organization/beta_bundle_on_call_error.rb +24 -0
  47. data/lib/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rb +22 -0
  48. data/lib/anthropic/models/beta/organization/beta_claude_tag_reply_mode.rb +68 -0
  49. data/lib/anthropic/models/beta/organization/beta_claude_tag_reply_mode_always_awake.rb +22 -0
  50. data/lib/anthropic/models/beta/organization/beta_claude_tag_reply_mode_automatic.rb +22 -0
  51. data/lib/anthropic/models/beta/organization/beta_claude_tag_reply_mode_mention_only.rb +21 -0
  52. data/lib/anthropic/models/beta/organization/beta_claude_tag_reply_mode_thread.rb +23 -0
  53. data/lib/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rb +14 -1
  54. data/lib/anthropic/models/beta/organization/beta_claude_tag_settings.rb +20 -3
  55. data/lib/anthropic/models/beta/organization/beta_claude_tag_settings_create.rb +22 -2
  56. data/lib/anthropic/models/beta/organization/beta_claude_tag_settings_update.rb +22 -2
  57. data/lib/anthropic/models/beta/organization/beta_external_key.rb +2 -2
  58. data/lib/anthropic/models/beta/organization/beta_rbac_role.rb +13 -4
  59. data/lib/anthropic/models/beta/organization/beta_rbac_role_source.rb +52 -0
  60. data/lib/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rb +25 -0
  61. data/lib/anthropic/models/beta/organization/beta_rbac_role_source_custom.rb +20 -0
  62. data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rb +15 -2
  63. data/lib/anthropic/models/beta/organization/claude_tag/bundle_update_params.rb +50 -0
  64. data/lib/anthropic/models/beta/organization/external_key_create_params.rb +8 -5
  65. data/lib/anthropic/models/beta/organization/plugin_list_params.rb +2 -1
  66. data/lib/anthropic/models/beta/organization/plugin_marketplace_list_params.rb +2 -1
  67. data/lib/anthropic/models/beta/organization/plugin_marketplace_retrieve_params.rb +2 -1
  68. data/lib/anthropic/models/beta/organization/plugin_retrieve_params.rb +2 -1
  69. data/lib/anthropic/models/beta/organization/plugins/installation_setting_list_params.rb +2 -1
  70. data/lib/anthropic/models/beta/organization/plugins/share_list_params.rb +2 -1
  71. data/lib/anthropic/models/beta/organization/plugins/version_download_params.rb +2 -1
  72. data/lib/anthropic/models/beta/organization/plugins/version_list_params.rb +2 -1
  73. data/lib/anthropic/models/beta/organization/plugins/version_retrieve_params.rb +2 -1
  74. data/lib/anthropic/models/beta/organization/workspace_update_params.rb +2 -1
  75. data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission.rb +1 -1
  76. data/lib/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission_deny.rb +7 -4
  77. data/lib/anthropic/models/error_details.rb +28 -3
  78. data/lib/anthropic/models/model.rb +2 -2
  79. data/lib/anthropic/models/organization/analytics_claude_tag_metrics.rb +39 -0
  80. data/lib/anthropic/models/organization/analytics_single_day_activity_summary.rb +43 -1
  81. data/lib/anthropic/models/organization/analytics_user_activity.rb +12 -1
  82. data/lib/anthropic/models/organization/external_key.rb +2 -2
  83. data/lib/anthropic/models/organization/external_key_create_params.rb +8 -5
  84. data/lib/anthropic/models/organization/key_profile_mismatch_error.rb +3 -3
  85. data/lib/anthropic/models/organization/key_profile_mismatch_error_details.rb +3 -3
  86. data/lib/anthropic/models/organization/rbac_role.rb +13 -4
  87. data/lib/anthropic/models/organization/rbac_role_source.rb +50 -0
  88. data/lib/anthropic/models/organization/rbac_role_source_built_in.rb +22 -0
  89. data/lib/anthropic/models/organization/rbac_role_source_custom.rb +18 -0
  90. data/lib/anthropic/models/organization/workspace_update_params.rb +2 -1
  91. data/lib/anthropic/models/parent_organization_required_error.rb +20 -0
  92. data/lib/anthropic/models/parent_organization_required_error_details.rb +18 -0
  93. data/lib/anthropic/models/rbac_role_not_found_error.rb +19 -0
  94. data/lib/anthropic/models/rbac_role_not_found_error_details.rb +17 -0
  95. data/lib/anthropic/models.rb +8 -0
  96. data/lib/anthropic/resources/beta/messages/batches.rb +6 -6
  97. data/lib/anthropic/resources/beta/messages.rb +5 -1
  98. data/lib/anthropic/resources/beta/organization/claude_tag/bundles.rb +51 -0
  99. data/lib/anthropic/resources/beta/organization/external_keys.rb +1 -1
  100. data/lib/anthropic/resources/beta/organization/plugins/versions.rb +4 -5
  101. data/lib/anthropic/resources/beta/organization/plugins.rb +13 -12
  102. data/lib/anthropic/resources/beta/organization/rbac_roles/permissions.rb +4 -0
  103. data/lib/anthropic/resources/beta/organization/rbac_roles.rb +7 -0
  104. data/lib/anthropic/resources/organization/external_keys.rb +1 -1
  105. data/lib/anthropic/resources/organization/rbac_roles/permissions.rb +4 -0
  106. data/lib/anthropic/resources/organization/rbac_roles.rb +7 -0
  107. data/lib/anthropic/version.rb +1 -1
  108. data/lib/anthropic.rb +22 -0
  109. data/rbi/anthropic/helpers/bedrock/client.rbi +6 -2
  110. data/rbi/anthropic/helpers/bedrock/event_stream.rbi +12 -3
  111. data/rbi/anthropic/helpers/bedrock/mantle_client.rbi +3 -1
  112. data/rbi/anthropic/helpers/google_cloud/client.rbi +3 -1
  113. data/rbi/anthropic/helpers/refusal_fallback.rbi +12 -4
  114. data/rbi/anthropic/helpers/vertex/client.rbi +6 -2
  115. data/rbi/anthropic/internal/tracing.rbi +2 -0
  116. data/rbi/anthropic/internal/util.rbi +2 -2
  117. data/rbi/anthropic/models/anthropic_beta.rbi +41 -41
  118. data/rbi/anthropic/models/beta/beta_managed_agents_auto_policy.rbi +3 -1
  119. data/rbi/anthropic/models/beta/beta_managed_agents_model.rbi +1 -1
  120. data/rbi/anthropic/models/beta/beta_managed_agents_multiagent_coordinator_params.rbi +3 -2
  121. data/rbi/anthropic/models/beta/organization/beta_analytics_claude_tag_metrics.rbi +69 -0
  122. data/rbi/anthropic/models/beta/organization/beta_analytics_single_day_activity_summary.rbi +60 -0
  123. data/rbi/anthropic/models/beta/organization/beta_analytics_user_activity.rbi +36 -0
  124. data/rbi/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rbi +25 -0
  125. data/rbi/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rbi +32 -0
  126. data/rbi/anthropic/models/beta/organization/beta_bundle_on_call_error.rbi +23 -0
  127. data/rbi/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rbi +32 -0
  128. data/rbi/anthropic/models/beta/organization/beta_claude_tag_reply_mode.rbi +92 -0
  129. data/rbi/anthropic/models/beta/organization/beta_claude_tag_reply_mode_always_awake.rbi +32 -0
  130. data/rbi/anthropic/models/beta/organization/beta_claude_tag_reply_mode_automatic.rbi +32 -0
  131. data/rbi/anthropic/models/beta/organization/beta_claude_tag_reply_mode_mention_only.rbi +31 -0
  132. data/rbi/anthropic/models/beta/organization/beta_claude_tag_reply_mode_thread.rbi +33 -0
  133. data/rbi/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rbi +30 -1
  134. data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings.rbi +39 -5
  135. data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings_create.rbi +56 -5
  136. data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings_update.rbi +56 -5
  137. data/rbi/anthropic/models/beta/organization/beta_external_key.rbi +4 -4
  138. data/rbi/anthropic/models/beta/organization/beta_rbac_role.rbi +21 -4
  139. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source.rbi +78 -0
  140. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rbi +36 -0
  141. data/rbi/anthropic/models/beta/organization/beta_rbac_role_source_custom.rbi +34 -0
  142. data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbi +11 -1
  143. data/rbi/anthropic/models/beta/organization/claude_tag/bundle_update_params.rbi +88 -0
  144. data/rbi/anthropic/models/beta/organization/external_key_create_params.rbi +14 -8
  145. data/rbi/anthropic/models/beta/organization/plugin_list_params.rbi +4 -2
  146. data/rbi/anthropic/models/beta/organization/plugin_marketplace_list_params.rbi +4 -2
  147. data/rbi/anthropic/models/beta/organization/plugin_marketplace_retrieve_params.rbi +4 -2
  148. data/rbi/anthropic/models/beta/organization/plugin_retrieve_params.rbi +4 -2
  149. data/rbi/anthropic/models/beta/organization/plugins/installation_setting_list_params.rbi +4 -2
  150. data/rbi/anthropic/models/beta/organization/plugins/share_list_params.rbi +4 -2
  151. data/rbi/anthropic/models/beta/organization/plugins/version_download_params.rbi +4 -2
  152. data/rbi/anthropic/models/beta/organization/plugins/version_list_params.rbi +4 -2
  153. data/rbi/anthropic/models/beta/organization/plugins/version_retrieve_params.rbi +4 -2
  154. data/rbi/anthropic/models/beta/organization/workspace_update_params.rbi +4 -2
  155. data/rbi/anthropic/models/beta/sessions/beta_managed_agents_agent_auto_evaluated_permission_deny.rbi +10 -6
  156. data/rbi/anthropic/models/error_details.rbi +25 -1
  157. data/rbi/anthropic/models/model.rbi +2 -2
  158. data/rbi/anthropic/models/organization/analytics_claude_tag_metrics.rbi +67 -0
  159. data/rbi/anthropic/models/organization/analytics_single_day_activity_summary.rbi +60 -0
  160. data/rbi/anthropic/models/organization/analytics_user_activity.rbi +30 -0
  161. data/rbi/anthropic/models/organization/external_key.rbi +4 -4
  162. data/rbi/anthropic/models/organization/external_key_create_params.rbi +14 -8
  163. data/rbi/anthropic/models/organization/key_profile_mismatch_error.rbi +3 -3
  164. data/rbi/anthropic/models/organization/key_profile_mismatch_error_details.rbi +3 -3
  165. data/rbi/anthropic/models/organization/rbac_role.rbi +18 -4
  166. data/rbi/anthropic/models/organization/rbac_role_source.rbi +68 -0
  167. data/rbi/anthropic/models/organization/rbac_role_source_built_in.rbi +34 -0
  168. data/rbi/anthropic/models/organization/rbac_role_source_custom.rbi +32 -0
  169. data/rbi/anthropic/models/organization/workspace_update_params.rbi +4 -2
  170. data/rbi/anthropic/models/parent_organization_required_error.rbi +17 -0
  171. data/rbi/anthropic/models/parent_organization_required_error_details.rbi +28 -0
  172. data/rbi/anthropic/models/rbac_role_not_found_error.rbi +16 -0
  173. data/rbi/anthropic/models/rbac_role_not_found_error_details.rbi +27 -0
  174. data/rbi/anthropic/models.rbi +10 -0
  175. data/rbi/anthropic/resources/beta/organization/claude_tag/bundles.rbi +30 -0
  176. data/rbi/anthropic/resources/beta/organization/external_keys.rbi +7 -4
  177. data/rbi/anthropic/resources/beta/organization/plugin_marketplaces.rbi +4 -2
  178. data/rbi/anthropic/resources/beta/organization/plugins/installation_settings.rbi +2 -1
  179. data/rbi/anthropic/resources/beta/organization/plugins/shares.rbi +2 -1
  180. data/rbi/anthropic/resources/beta/organization/plugins/versions.rbi +10 -8
  181. data/rbi/anthropic/resources/beta/organization/plugins.rbi +17 -14
  182. data/rbi/anthropic/resources/beta/organization/workspaces.rbi +2 -1
  183. data/rbi/anthropic/resources/organization/external_keys.rbi +7 -4
  184. data/rbi/anthropic/resources/organization/workspaces.rbi +2 -1
  185. data/rbi/lib/anthropic/helpers/stainless_helper_header.rbi +6 -1
  186. data/sig/anthropic/helpers/sessions/event_accumulator.rbs +6 -2
  187. data/sig/anthropic/internal/tracing.rbs +1 -0
  188. data/sig/anthropic/internal/util.rbs +1 -1
  189. data/sig/anthropic/models/anthropic_beta.rbs +21 -21
  190. data/sig/anthropic/models/beta/beta_managed_agents_model.rbs +1 -1
  191. data/sig/anthropic/models/beta/organization/beta_analytics_claude_tag_metrics.rbs +26 -0
  192. data/sig/anthropic/models/beta/organization/beta_analytics_single_day_activity_summary.rbs +15 -0
  193. data/sig/anthropic/models/beta/organization/beta_analytics_user_activity.rbs +5 -0
  194. data/sig/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error.rbs +13 -0
  195. data/sig/anthropic/models/beta/organization/beta_bundle_attachment_not_supported_error_details.rbs +20 -0
  196. data/sig/anthropic/models/beta/organization/beta_bundle_on_call_error.rbs +13 -0
  197. data/sig/anthropic/models/beta/organization/beta_bundle_on_call_error_details.rbs +17 -0
  198. data/sig/anthropic/models/beta/organization/beta_claude_tag_reply_mode.rbs +50 -0
  199. data/sig/anthropic/models/beta/organization/beta_claude_tag_reply_mode_always_awake.rbs +17 -0
  200. data/sig/anthropic/models/beta/organization/beta_claude_tag_reply_mode_automatic.rbs +17 -0
  201. data/sig/anthropic/models/beta/organization/beta_claude_tag_reply_mode_mention_only.rbs +17 -0
  202. data/sig/anthropic/models/beta/organization/beta_claude_tag_reply_mode_thread.rbs +17 -0
  203. data/sig/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rbs +8 -3
  204. data/sig/anthropic/models/beta/organization/beta_claude_tag_settings.rbs +8 -3
  205. data/sig/anthropic/models/beta/organization/beta_claude_tag_settings_create.rbs +8 -3
  206. data/sig/anthropic/models/beta/organization/beta_claude_tag_settings_update.rbs +8 -3
  207. data/sig/anthropic/models/beta/organization/beta_rbac_role.rbs +5 -0
  208. data/sig/anthropic/models/beta/organization/beta_rbac_role_source.rbs +40 -0
  209. data/sig/anthropic/models/beta/organization/beta_rbac_role_source_built_in.rbs +17 -0
  210. data/sig/anthropic/models/beta/organization/beta_rbac_role_source_custom.rbs +17 -0
  211. data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbs +5 -0
  212. data/sig/anthropic/models/beta/organization/claude_tag/bundle_update_params.rbs +46 -0
  213. data/sig/anthropic/models/error_details.rbs +26 -0
  214. data/sig/anthropic/models/model.rbs +2 -2
  215. data/sig/anthropic/models/organization/analytics_claude_tag_metrics.rbs +24 -0
  216. data/sig/anthropic/models/organization/analytics_single_day_activity_summary.rbs +15 -0
  217. data/sig/anthropic/models/organization/analytics_user_activity.rbs +5 -0
  218. data/sig/anthropic/models/organization/rbac_role.rbs +5 -0
  219. data/sig/anthropic/models/organization/rbac_role_source.rbs +38 -0
  220. data/sig/anthropic/models/organization/rbac_role_source_built_in.rbs +15 -0
  221. data/sig/anthropic/models/organization/rbac_role_source_custom.rbs +15 -0
  222. data/sig/anthropic/models/parent_organization_required_error.rbs +9 -0
  223. data/sig/anthropic/models/parent_organization_required_error_details.rbs +14 -0
  224. data/sig/anthropic/models/rbac_role_not_found_error.rbs +9 -0
  225. data/sig/anthropic/models/rbac_role_not_found_error_details.rbs +14 -0
  226. data/sig/anthropic/models.rbs +8 -0
  227. data/sig/anthropic/resources/beta/organization/claude_tag/bundles.rbs +7 -0
  228. metadata +68 -2
@@ -0,0 +1,92 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ # How Claude takes part in a Slack channel. A channel alone stores one. More types
8
+ # can be added.
9
+ module BetaClaudeTagReplyMode
10
+ extend Anthropic::Internal::Type::Union
11
+
12
+ Variants =
13
+ T.type_alias do
14
+ T.any(
15
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
16
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
17
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
18
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread
19
+ )
20
+ end
21
+
22
+ module Type
23
+ extend Anthropic::Internal::Type::Enum
24
+
25
+ TaggedSymbol =
26
+ T.type_alias do
27
+ T.all(
28
+ Symbol,
29
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type
30
+ )
31
+ end
32
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
33
+
34
+ AUTOMATIC =
35
+ T.let(
36
+ :automatic,
37
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::TaggedSymbol
38
+ )
39
+ MENTION_ONLY =
40
+ T.let(
41
+ :mention_only,
42
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::TaggedSymbol
43
+ )
44
+ ALWAYS_AWAKE =
45
+ T.let(
46
+ :always_awake,
47
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::TaggedSymbol
48
+ )
49
+ THREAD =
50
+ T.let(
51
+ :thread,
52
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::TaggedSymbol
53
+ )
54
+
55
+ sig do
56
+ override.returns(
57
+ T::Array[
58
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::TaggedSymbol
59
+ ]
60
+ )
61
+ end
62
+ def self.values
63
+ end
64
+ end
65
+
66
+ sig do
67
+ override.returns(
68
+ T::Array[
69
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Variants
70
+ ]
71
+ )
72
+ end
73
+ def self.variants
74
+ end
75
+
76
+ # Creates a new instance of the variant class whose `type` matches the given
77
+ # value, passing the remaining arguments to its constructor.
78
+ sig do
79
+ params(
80
+ type:
81
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Type::OrSymbol
82
+ ).returns(
83
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Variants
84
+ )
85
+ end
86
+ def self.new(type:)
87
+ end
88
+ end
89
+ end
90
+ end
91
+ end
92
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaClaudeTagReplyModeAlwaysAwake < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :type
18
+
19
+ # Like `automatic`, but Claude never pauses on its own. Available where it is
20
+ # enabled for the channel.
21
+ sig { params(type: Symbol).returns(T.attached_class) }
22
+ def self.new(type: :always_awake)
23
+ end
24
+
25
+ sig { override.returns({ type: Symbol }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,32 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaClaudeTagReplyModeAutomatic < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :type
18
+
19
+ # Claude reads along and joins in when it can help, and pauses on its own in quiet
20
+ # or busy channels.
21
+ sig { params(type: Symbol).returns(T.attached_class) }
22
+ def self.new(type: :automatic)
23
+ end
24
+
25
+ sig { override.returns({ type: Symbol }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaClaudeTagReplyModeMentionOnly < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :type
18
+
19
+ # Claude replies only when it is @-mentioned.
20
+ sig { params(type: Symbol).returns(T.attached_class) }
21
+ def self.new(type: :mention_only)
22
+ end
23
+
24
+ sig { override.returns({ type: Symbol }) }
25
+ def to_hash
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,33 @@
1
+ # typed: strong
2
+
3
+ module Anthropic
4
+ module Models
5
+ module Beta
6
+ module Organization
7
+ class BetaClaudeTagReplyModeThread < Anthropic::Internal::Type::BaseModel
8
+ OrHash =
9
+ T.type_alias do
10
+ T.any(
11
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread,
12
+ Anthropic::Internal::AnyHash
13
+ )
14
+ end
15
+
16
+ sig { returns(Symbol) }
17
+ attr_accessor :type
18
+
19
+ # Every new top-level message in the channel gets its own reply from Claude, in a
20
+ # thread under it. Available where it is enabled for the channel, and only once
21
+ # Claude has been used in the channel.
22
+ sig { params(type: Symbol).returns(T.attached_class) }
23
+ def self.new(type: :thread)
24
+ end
25
+
26
+ sig { override.returns({ type: Symbol }) }
27
+ def to_hash
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -64,6 +64,17 @@ module Anthropic
64
64
  end
65
65
  attr_accessor :model
66
66
 
67
+ # The settings level `reply_mode` comes from: the channel when it stores one. With
68
+ # `include_inherited=true` and no stored mode it is `default`.
69
+ sig do
70
+ returns(
71
+ T.nilable(
72
+ Anthropic::Beta::Organization::BetaClaudeTagSettingSource::Variants
73
+ )
74
+ )
75
+ end
76
+ attr_accessor :reply_mode
77
+
67
78
  # For each setting, the settings level its value in `settings` comes from. Without
68
79
  # `include_inherited`, a setting the channel or workspace stores has a source that
69
80
  # names the channel or workspace itself, and one it does not store has null, or an
@@ -116,6 +127,17 @@ module Anthropic
116
127
  )
117
128
  ],
118
129
  model:
130
+ T.nilable(
131
+ T.any(
132
+ Anthropic::Beta::Organization::BetaClaudeTagSlackChannelSettingSource::OrHash,
133
+ Anthropic::Beta::Organization::BetaClaudeTagSlackWorkspaceSettingSource::OrHash,
134
+ Anthropic::Beta::Organization::BetaClaudeTagSlackParentChannelSettingSource::OrHash,
135
+ Anthropic::Beta::Organization::BetaClaudeTagSlackDefaultSettingSource::OrHash,
136
+ Anthropic::Beta::Organization::BetaClaudeTagDefaultSettingSource::OrHash,
137
+ Anthropic::Beta::Organization::BetaClaudeTagSlackGridChannelSettingSource::OrHash
138
+ )
139
+ ),
140
+ reply_mode:
119
141
  T.nilable(
120
142
  T.any(
121
143
  Anthropic::Beta::Organization::BetaClaudeTagSlackChannelSettingSource::OrHash,
@@ -139,7 +161,10 @@ module Anthropic
139
161
  # the order their text is joined. Empty when none does.
140
162
  instructions:,
141
163
  # The settings level `model` comes from.
142
- model:
164
+ model:,
165
+ # The settings level `reply_mode` comes from: the channel when it stores one. With
166
+ # `include_inherited=true` and no stored mode it is `default`.
167
+ reply_mode:
143
168
  )
144
169
  end
145
170
 
@@ -163,6 +188,10 @@ module Anthropic
163
188
  Anthropic::Beta::Organization::BetaClaudeTagSettingSource::Variants
164
189
  ],
165
190
  model:
191
+ T.nilable(
192
+ Anthropic::Beta::Organization::BetaClaudeTagSettingSource::Variants
193
+ ),
194
+ reply_mode:
166
195
  T.nilable(
167
196
  Anthropic::Beta::Organization::BetaClaudeTagSettingSource::Variants
168
197
  )
@@ -45,10 +45,25 @@ module Anthropic
45
45
  sig { returns(T.nilable(String)) }
46
46
  attr_accessor :model
47
47
 
48
+ # How Claude takes part in the channel. Only a channel stores one, and no settings
49
+ # level passes one on, so it is always null on a workspace. Null on a channel
50
+ # means the channel stores none yet: Claude then follows the reply mode chosen in
51
+ # Slack, if one was, else `automatic`. A stored reply mode can be changed but
52
+ # never cleared.
53
+ sig do
54
+ returns(
55
+ T.nilable(
56
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Variants
57
+ )
58
+ )
59
+ end
60
+ attr_accessor :reply_mode
61
+
48
62
  # Claude Tag settings. Without `include_inherited`, a setting that is null is not
49
63
  # set on the settings level and is inherited. With it, `enabled` and
50
- # `guest_policy` are never null, and `instructions`, `model` and `environment_id`
51
- # are null when no settings level sets them.
64
+ # `guest_policy` are never null, `instructions`, `model` and `environment_id` are
65
+ # null when no settings level sets them, and `reply_mode` is null unless the
66
+ # channel itself stores one.
52
67
  sig do
53
68
  params(
54
69
  enabled: T.nilable(T::Boolean),
@@ -62,7 +77,16 @@ module Anthropic
62
77
  )
63
78
  ),
64
79
  instructions: T.nilable(String),
65
- model: T.nilable(String)
80
+ model: T.nilable(String),
81
+ reply_mode:
82
+ T.nilable(
83
+ T.any(
84
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic::OrHash,
85
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly::OrHash,
86
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake::OrHash,
87
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread::OrHash
88
+ )
89
+ )
66
90
  ).returns(T.attached_class)
67
91
  end
68
92
  def self.new(
@@ -81,7 +105,13 @@ module Anthropic
81
105
  # The model Claude uses: a model identifier or the name of a model line. The
82
106
  # nearest settings level that sets it decides. When none does, Claude uses the
83
107
  # product's default model.
84
- model:
108
+ model:,
109
+ # How Claude takes part in the channel. Only a channel stores one, and no settings
110
+ # level passes one on, so it is always null on a workspace. Null on a channel
111
+ # means the channel stores none yet: Claude then follows the reply mode chosen in
112
+ # Slack, if one was, else `automatic`. A stored reply mode can be changed but
113
+ # never cleared.
114
+ reply_mode:
85
115
  )
86
116
  end
87
117
 
@@ -95,7 +125,11 @@ module Anthropic
95
125
  Anthropic::Beta::Organization::BetaClaudeTagGuestPolicy::Variants
96
126
  ),
97
127
  instructions: T.nilable(String),
98
- model: T.nilable(String)
128
+ model: T.nilable(String),
129
+ reply_mode:
130
+ T.nilable(
131
+ Anthropic::Beta::Organization::BetaClaudeTagReplyMode::Variants
132
+ )
99
133
  }
100
134
  )
101
135
  end
@@ -19,7 +19,9 @@ module Anthropic
19
19
  attr_accessor :enabled
20
20
 
21
21
  # The environment Claude's sessions run in: the identifier of an active
22
- # environment of the organization, starting with `env_`. Null clears it.
22
+ # environment of the organization, starting with `env_`, or of a self-hosted
23
+ # runner pool of the organization that every member may use, starting with
24
+ # `ccpool_`. Null clears it.
23
25
  sig { returns(T.nilable(String)) }
24
26
  attr_accessor :environment_id
25
27
 
@@ -47,6 +49,27 @@ module Anthropic
47
49
  sig { returns(T.nilable(String)) }
48
50
  attr_accessor :model
49
51
 
52
+ # How Claude takes part in the channel: `automatic`, `mention_only`,
53
+ # `always_awake` or `thread`. Only a channel takes one: an update of a workspace
54
+ # that sends a value is refused, and one that sends null changes nothing. Null
55
+ # never clears it: sent to a channel that stores none it changes nothing, and sent
56
+ # to a channel that stores one it is refused, because a stored reply mode can be
57
+ # changed but never cleared; a caller that wants Claude's default behavior sends
58
+ # `automatic`.
59
+ sig do
60
+ returns(
61
+ T.nilable(
62
+ T.any(
63
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
64
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
65
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
66
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread
67
+ )
68
+ )
69
+ )
70
+ end
71
+ attr_accessor :reply_mode
72
+
50
73
  # The settings in a request that sets a Slack channel up. A setting left out is
51
74
  # not set. A setting sent as null is cleared.
52
75
  sig do
@@ -62,7 +85,16 @@ module Anthropic
62
85
  )
63
86
  ),
64
87
  instructions: T.nilable(String),
65
- model: T.nilable(String)
88
+ model: T.nilable(String),
89
+ reply_mode:
90
+ T.nilable(
91
+ T.any(
92
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic::OrHash,
93
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly::OrHash,
94
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake::OrHash,
95
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread::OrHash
96
+ )
97
+ )
66
98
  ).returns(T.attached_class)
67
99
  end
68
100
  def self.new(
@@ -70,7 +102,9 @@ module Anthropic
70
102
  # workspace stores `false`. Null clears it.
71
103
  enabled: nil,
72
104
  # The environment Claude's sessions run in: the identifier of an active
73
- # environment of the organization, starting with `env_`. Null clears it.
105
+ # environment of the organization, starting with `env_`, or of a self-hosted
106
+ # runner pool of the organization that every member may use, starting with
107
+ # `ccpool_`. Null clears it.
74
108
  environment_id: nil,
75
109
  # What Claude does in a channel while a Slack guest is in it. Null clears it.
76
110
  guest_policy: nil,
@@ -79,7 +113,15 @@ module Anthropic
79
113
  instructions: nil,
80
114
  # The model Claude uses: the identifier of a model, or the name of a model line,
81
115
  # that the organization is entitled to for Claude Tag. Null clears it.
82
- model: nil
116
+ model: nil,
117
+ # How Claude takes part in the channel: `automatic`, `mention_only`,
118
+ # `always_awake` or `thread`. Only a channel takes one: an update of a workspace
119
+ # that sends a value is refused, and one that sends null changes nothing. Null
120
+ # never clears it: sent to a channel that stores none it changes nothing, and sent
121
+ # to a channel that stores one it is refused, because a stored reply mode can be
122
+ # changed but never cleared; a caller that wants Claude's default behavior sends
123
+ # `automatic`.
124
+ reply_mode: nil
83
125
  )
84
126
  end
85
127
 
@@ -97,7 +139,16 @@ module Anthropic
97
139
  )
98
140
  ),
99
141
  instructions: T.nilable(String),
100
- model: T.nilable(String)
142
+ model: T.nilable(String),
143
+ reply_mode:
144
+ T.nilable(
145
+ T.any(
146
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
147
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
148
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
149
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread
150
+ )
151
+ )
101
152
  }
102
153
  )
103
154
  end
@@ -19,7 +19,9 @@ module Anthropic
19
19
  attr_accessor :enabled
20
20
 
21
21
  # The environment Claude's sessions run in: the identifier of an active
22
- # environment of the organization, starting with `env_`. Null clears it.
22
+ # environment of the organization, starting with `env_`, or of a self-hosted
23
+ # runner pool of the organization that every member may use, starting with
24
+ # `ccpool_`. Null clears it.
23
25
  sig { returns(T.nilable(String)) }
24
26
  attr_accessor :environment_id
25
27
 
@@ -47,6 +49,27 @@ module Anthropic
47
49
  sig { returns(T.nilable(String)) }
48
50
  attr_accessor :model
49
51
 
52
+ # How Claude takes part in the channel: `automatic`, `mention_only`,
53
+ # `always_awake` or `thread`. Only a channel takes one: an update of a workspace
54
+ # that sends a value is refused, and one that sends null changes nothing. Null
55
+ # never clears it: sent to a channel that stores none it changes nothing, and sent
56
+ # to a channel that stores one it is refused, because a stored reply mode can be
57
+ # changed but never cleared; a caller that wants Claude's default behavior sends
58
+ # `automatic`.
59
+ sig do
60
+ returns(
61
+ T.nilable(
62
+ T.any(
63
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
64
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
65
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
66
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread
67
+ )
68
+ )
69
+ )
70
+ end
71
+ attr_accessor :reply_mode
72
+
50
73
  # The settings to change. A setting left out is unchanged. A setting sent as null
51
74
  # is cleared, so it is inherited.
52
75
  sig do
@@ -62,7 +85,16 @@ module Anthropic
62
85
  )
63
86
  ),
64
87
  instructions: T.nilable(String),
65
- model: T.nilable(String)
88
+ model: T.nilable(String),
89
+ reply_mode:
90
+ T.nilable(
91
+ T.any(
92
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic::OrHash,
93
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly::OrHash,
94
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake::OrHash,
95
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread::OrHash
96
+ )
97
+ )
66
98
  ).returns(T.attached_class)
67
99
  end
68
100
  def self.new(
@@ -70,7 +102,9 @@ module Anthropic
70
102
  # workspace stores `false`. Null clears it.
71
103
  enabled: nil,
72
104
  # The environment Claude's sessions run in: the identifier of an active
73
- # environment of the organization, starting with `env_`. Null clears it.
105
+ # environment of the organization, starting with `env_`, or of a self-hosted
106
+ # runner pool of the organization that every member may use, starting with
107
+ # `ccpool_`. Null clears it.
74
108
  environment_id: nil,
75
109
  # What Claude does in a channel while a Slack guest is in it. Null clears it.
76
110
  guest_policy: nil,
@@ -79,7 +113,15 @@ module Anthropic
79
113
  instructions: nil,
80
114
  # The model Claude uses: the identifier of a model, or the name of a model line,
81
115
  # that the organization is entitled to for Claude Tag. Null clears it.
82
- model: nil
116
+ model: nil,
117
+ # How Claude takes part in the channel: `automatic`, `mention_only`,
118
+ # `always_awake` or `thread`. Only a channel takes one: an update of a workspace
119
+ # that sends a value is refused, and one that sends null changes nothing. Null
120
+ # never clears it: sent to a channel that stores none it changes nothing, and sent
121
+ # to a channel that stores one it is refused, because a stored reply mode can be
122
+ # changed but never cleared; a caller that wants Claude's default behavior sends
123
+ # `automatic`.
124
+ reply_mode: nil
83
125
  )
84
126
  end
85
127
 
@@ -97,7 +139,16 @@ module Anthropic
97
139
  )
98
140
  ),
99
141
  instructions: T.nilable(String),
100
- model: T.nilable(String)
142
+ model: T.nilable(String),
143
+ reply_mode:
144
+ T.nilable(
145
+ T.any(
146
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAutomatic,
147
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeMentionOnly,
148
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeAlwaysAwake,
149
+ Anthropic::Beta::Organization::BetaClaudeTagReplyModeThread
150
+ )
151
+ )
101
152
  }
102
153
  )
103
154
  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 name can differ
25
- # from the label claude.ai shows, and Anthropic may change the name. To keep a
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
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 name can differ
55
- # from the label claude.ai shows, and Anthropic may change the name. To keep a
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
56
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
  }