anthropic 2.2.0 → 2.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +34 -0
- data/README.md +2 -2
- data/lib/anthropic/client.rb +1 -1
- data/lib/anthropic/helpers/bedrock/client.rb +6 -3
- data/lib/anthropic/helpers/google_cloud/client.rb +9 -25
- data/lib/anthropic/helpers/refusal_fallback.rb +1 -2
- data/lib/anthropic/helpers/stainless_helper_header.rb +3 -2
- data/lib/anthropic/internal/tracing.rb +20 -0
- data/lib/anthropic/internal/transport/base_client.rb +16 -2
- data/lib/anthropic/models/anthropic_beta.rb +3 -0
- data/lib/anthropic/models/beta/beta_code_execution_tool_20260120.rb +10 -2
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_content.rb +5 -1
- data/lib/anthropic/models/beta/beta_code_execution_tool_result_block_param_content.rb +1 -1
- data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block.rb +9 -1
- data/lib/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rb +2 -1
- data/lib/anthropic/models/beta/beta_response_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/beta_skill_params.rb +1 -1
- data/lib/anthropic/models/beta/beta_tool_union.rb +5 -1
- data/lib/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rb +7 -2
- data/lib/anthropic/models/beta/environments/beta_self_hosted_work_queue_stats.rb +2 -4
- data/lib/anthropic/models/beta/message_count_tokens_params.rb +5 -1
- data/lib/anthropic/models/beta/organization/beta_claude_tag_default_setting_source.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_guest_policy.rb +63 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_guest_policy_allow.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_guest_policy_channel_only.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_guest_policy_restrict.rb +21 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_setting_source.rb +87 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rb +72 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_settings.rb +70 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_settings_create.rb +67 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_settings_update.rb +67 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_channel_identifiers.rb +37 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_channel_setting_source.rb +29 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_default_setting_source.rb +22 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_grid_channel_setting_source.rb +31 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_parent_channel_setting_source.rb +30 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_identifiers.rb +23 -0
- data/lib/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_setting_source.rb +29 -0
- data/lib/anthropic/models/beta/organization/beta_external_key.rb +3 -3
- data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rb +66 -0
- data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_deleted_slack_channel.rb +32 -0
- data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_channel.rb +87 -0
- data/lib/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_workspace.rb +86 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundle_list_params.rb +49 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundle_retrieve_params.rb +41 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target.rb +76 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target_create.rb +70 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_deleted_bundle_target.rb +34 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target.rb +57 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target_create.rb +38 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target.rb +57 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target_create.rb +38 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/target_create_params.rb +43 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/target_delete_params.rb +53 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/target_list_params.rb +59 -0
- data/lib/anthropic/models/beta/organization/claude_tag/bundles/target_retrieve_params.rb +53 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_channel_create_params.rb +50 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_channel_delete_params.rb +41 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_channel_list_params.rb +79 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_channel_retrieve_params.rb +52 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_channel_update_params.rb +49 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_workspace_list_params.rb +70 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_workspace_retrieve_params.rb +52 -0
- data/lib/anthropic/models/beta/organization/claude_tag/slack_workspace_update_params.rb +49 -0
- data/lib/anthropic/models/code_execution_tool_20260120.rb +10 -2
- data/lib/anthropic/models/code_execution_tool_result_block_content.rb +5 -1
- data/lib/anthropic/models/code_execution_tool_result_block_param_content.rb +1 -1
- data/lib/anthropic/models/encrypted_code_execution_result_block.rb +9 -1
- data/lib/anthropic/models/encrypted_code_execution_result_block_param.rb +2 -1
- data/lib/anthropic/models/message_count_tokens_tool.rb +5 -1
- data/lib/anthropic/models/organization/external_key.rb +3 -3
- data/lib/anthropic/models/skill_params.rb +1 -1
- data/lib/anthropic/models/tool_union.rb +5 -1
- data/lib/anthropic/resources/beta/agents/versions.rb +2 -1
- data/lib/anthropic/resources/beta/agents.rb +10 -5
- data/lib/anthropic/resources/beta/deployment_runs.rb +4 -2
- data/lib/anthropic/resources/beta/deployments.rb +16 -8
- data/lib/anthropic/resources/beta/dreams.rb +10 -5
- data/lib/anthropic/resources/beta/environments/work.rb +16 -8
- data/lib/anthropic/resources/beta/environments.rb +12 -6
- data/lib/anthropic/resources/beta/files.rb +10 -5
- data/lib/anthropic/resources/beta/memory_stores/memories.rb +10 -5
- data/lib/anthropic/resources/beta/memory_stores/memory_versions.rb +6 -11
- data/lib/anthropic/resources/beta/memory_stores.rb +12 -6
- data/lib/anthropic/resources/beta/messages/batches.rb +12 -6
- data/lib/anthropic/resources/beta/messages.rb +6 -3
- data/lib/anthropic/resources/beta/models.rb +4 -2
- data/lib/anthropic/resources/beta/organization/analytics/apps/chat/projects.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/artifacts.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/connectors.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/cost.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/cost_report.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/plugins.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/skills.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/summaries.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/usage.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/usage_report.rb +2 -1
- data/lib/anthropic/resources/beta/organization/analytics/user_cost_report.rb +5 -4
- data/lib/anthropic/resources/beta/organization/analytics/user_usage_report.rb +5 -4
- data/lib/anthropic/resources/beta/organization/analytics/users.rb +2 -1
- data/lib/anthropic/resources/beta/organization/api_keys.rb +6 -3
- data/lib/anthropic/resources/beta/organization/claude_tag/bundles/targets.rb +204 -0
- data/lib/anthropic/resources/beta/organization/claude_tag/bundles.rb +102 -0
- data/lib/anthropic/resources/beta/organization/claude_tag/slack_channels.rb +263 -0
- data/lib/anthropic/resources/beta/organization/claude_tag/slack_workspaces.rb +162 -0
- data/lib/anthropic/resources/beta/organization/claude_tag.rb +31 -0
- data/lib/anthropic/resources/beta/organization/compliance_settings.rb +4 -2
- data/lib/anthropic/resources/beta/organization/external_keys.rb +12 -6
- data/lib/anthropic/resources/beta/organization/federation/issuers.rb +10 -5
- data/lib/anthropic/resources/beta/organization/federation/rules/workspaces.rb +6 -3
- data/lib/anthropic/resources/beta/organization/federation/rules.rb +10 -5
- data/lib/anthropic/resources/beta/organization/invites.rb +8 -4
- data/lib/anthropic/resources/beta/organization/plugin_marketplaces.rb +10 -5
- data/lib/anthropic/resources/beta/organization/plugins/installation_settings.rb +6 -11
- data/lib/anthropic/resources/beta/organization/plugins/shares.rb +2 -1
- data/lib/anthropic/resources/beta/organization/plugins/versions.rb +8 -4
- data/lib/anthropic/resources/beta/organization/plugins.rb +10 -5
- data/lib/anthropic/resources/beta/organization/rate_limits.rb +2 -1
- data/lib/anthropic/resources/beta/organization/rbac_groups/members.rb +6 -3
- data/lib/anthropic/resources/beta/organization/rbac_groups.rb +10 -5
- data/lib/anthropic/resources/beta/organization/rbac_roles/permissions.rb +2 -1
- data/lib/anthropic/resources/beta/organization/rbac_roles.rb +4 -2
- data/lib/anthropic/resources/beta/organization/service_accounts/workspaces.rb +6 -3
- data/lib/anthropic/resources/beta/organization/service_accounts.rb +10 -5
- data/lib/anthropic/resources/beta/organization/spend_limits/effective.rb +2 -1
- data/lib/anthropic/resources/beta/organization/spend_limits/increase_requests.rb +8 -4
- data/lib/anthropic/resources/beta/organization/spend_limits.rb +8 -4
- data/lib/anthropic/resources/beta/organization/telemetry_destinations/workspaces.rb +6 -3
- data/lib/anthropic/resources/beta/organization/telemetry_destinations.rb +12 -6
- data/lib/anthropic/resources/beta/organization/users.rb +8 -4
- data/lib/anthropic/resources/beta/organization/webhooks.rb +12 -9
- data/lib/anthropic/resources/beta/organization/workspaces/members.rb +10 -5
- data/lib/anthropic/resources/beta/organization/workspaces/rate_limits.rb +4 -6
- data/lib/anthropic/resources/beta/organization/workspaces/service_accounts.rb +10 -5
- data/lib/anthropic/resources/beta/organization/workspaces.rb +10 -5
- data/lib/anthropic/resources/beta/organization.rb +6 -1
- data/lib/anthropic/resources/beta/sessions/events.rb +6 -3
- data/lib/anthropic/resources/beta/sessions/resources.rb +10 -5
- data/lib/anthropic/resources/beta/sessions/threads/events.rb +4 -2
- data/lib/anthropic/resources/beta/sessions/threads.rb +6 -3
- data/lib/anthropic/resources/beta/sessions.rb +12 -6
- data/lib/anthropic/resources/beta/skills/versions.rb +10 -5
- data/lib/anthropic/resources/beta/skills.rb +8 -4
- data/lib/anthropic/resources/beta/tunnels/certificates.rb +8 -4
- data/lib/anthropic/resources/beta/tunnels.rb +12 -6
- data/lib/anthropic/resources/beta/user_profiles/action_urls.rb +2 -1
- data/lib/anthropic/resources/beta/user_profiles.rb +12 -6
- data/lib/anthropic/resources/beta/vaults/credentials.rb +14 -7
- data/lib/anthropic/resources/beta/vaults.rb +12 -6
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +47 -0
- data/rbi/anthropic/helpers/google_cloud/client.rbi +0 -4
- data/rbi/anthropic/internal/tracing.rbi +28 -0
- data/rbi/anthropic/internal/transport/base_client.rbi +5 -1
- data/rbi/anthropic/internal/type/base_page.rbi +2 -0
- data/rbi/anthropic/internal/type/base_stream.rbi +2 -0
- data/rbi/anthropic/internal/type/request_parameters.rbi +4 -0
- data/rbi/anthropic/models/anthropic_beta.rbi +5 -0
- data/rbi/anthropic/models/beta/beta_code_execution_tool_20260120.rbi +10 -2
- data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block.rbi +9 -1
- data/rbi/anthropic/models/beta/beta_encrypted_code_execution_result_block_param.rbi +2 -1
- data/rbi/anthropic/models/beta/beta_skill_params.rbi +1 -1
- data/rbi/anthropic/models/beta/environments/beta_self_hosted_work_heartbeat_response.rbi +4 -2
- data/rbi/anthropic/models/beta/environments/beta_self_hosted_work_queue_stats.rbi +2 -4
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_default_setting_source.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_guest_policy.rbi +87 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_guest_policy_allow.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_guest_policy_channel_only.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_guest_policy_restrict.rbi +31 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_setting_source.rbi +115 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rbi +178 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings.rbi +108 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings_create.rbi +110 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_settings_update.rbi +110 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_channel_identifiers.rbi +50 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_channel_setting_source.rbi +43 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_default_setting_source.rbi +32 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_grid_channel_setting_source.rbi +67 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_parent_channel_setting_source.rbi +44 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_identifiers.rbi +36 -0
- data/rbi/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_setting_source.rbi +43 -0
- data/rbi/anthropic/models/beta/organization/beta_external_key.rbi +4 -4
- data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbi +87 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_deleted_slack_channel.rbi +41 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_channel.rbi +154 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_workspace.rbi +151 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundle_list_params.rbi +92 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundle_retrieve_params.rbi +78 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target.rbi +102 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target_create.rbi +92 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_deleted_bundle_target.rbi +43 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target.rbi +78 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target_create.rbi +51 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target.rbi +78 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target_create.rbi +51 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/target_create_params.rbi +82 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/target_delete_params.rbi +94 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/target_list_params.rbi +104 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/bundles/target_retrieve_params.rbi +94 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_channel_create_params.rbi +118 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_channel_delete_params.rbi +78 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_channel_list_params.rbi +134 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_channel_retrieve_params.rbi +95 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_channel_update_params.rbi +100 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_workspace_list_params.rbi +124 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_workspace_retrieve_params.rbi +95 -0
- data/rbi/anthropic/models/beta/organization/claude_tag/slack_workspace_update_params.rbi +100 -0
- data/rbi/anthropic/models/code_execution_tool_20260120.rbi +10 -2
- data/rbi/anthropic/models/encrypted_code_execution_result_block.rbi +9 -1
- data/rbi/anthropic/models/encrypted_code_execution_result_block_param.rbi +2 -1
- data/rbi/anthropic/models/organization/external_key.rbi +4 -4
- data/rbi/anthropic/models/skill_params.rbi +1 -1
- data/rbi/anthropic/resources/beta/organization/analytics/user_cost_report.rbi +3 -3
- data/rbi/anthropic/resources/beta/organization/analytics/user_usage_report.rbi +3 -3
- data/rbi/anthropic/resources/beta/organization/claude_tag/bundles/targets.rbi +140 -0
- data/rbi/anthropic/resources/beta/organization/claude_tag/bundles.rbi +75 -0
- data/rbi/anthropic/resources/beta/organization/claude_tag/slack_channels.rbi +203 -0
- data/rbi/anthropic/resources/beta/organization/claude_tag/slack_workspaces.rbi +123 -0
- data/rbi/anthropic/resources/beta/organization/claude_tag.rbi +37 -0
- data/rbi/anthropic/resources/beta/organization.rbi +3 -0
- data/sig/anthropic/helpers/google_cloud/client.rbs +0 -2
- data/sig/anthropic/internal/tracing.rbs +14 -0
- data/sig/anthropic/internal/transport/base_client.rbs +3 -0
- data/sig/anthropic/internal/type/request_parameters.rbs +2 -0
- data/sig/anthropic/models/anthropic_beta.rbs +2 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_default_setting_source.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_guest_policy.rbs +45 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_guest_policy_allow.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_guest_policy_channel_only.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_guest_policy_restrict.rbs +17 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_setting_source.rbs +73 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_setting_sources.rbs +44 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_settings.rbs +44 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_settings_create.rbs +44 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_settings_update.rbs +44 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_channel_identifiers.rbs +20 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_channel_setting_source.rbs +23 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_default_setting_source.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_grid_channel_setting_source.rbs +29 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_parent_channel_setting_source.rbs +26 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_identifiers.rbs +18 -0
- data/sig/anthropic/models/beta/organization/beta_claude_tag_slack_workspace_setting_source.rbs +23 -0
- data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_bundle.rbs +51 -0
- data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_deleted_slack_channel.rbs +22 -0
- data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_channel.rbs +56 -0
- data/sig/anthropic/models/beta/organization/claude_tag/beta_claude_tag_slack_workspace.rbs +56 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundle_list_params.rbs +50 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundle_retrieve_params.rbs +41 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target.rbs +54 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_bundle_target_create.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_deleted_bundle_target.rbs +27 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_channel_bundle_target_create.rbs +27 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/beta_claude_tag_slack_workspace_bundle_target_create.rbs +30 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/target_create_params.rbs +43 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/target_delete_params.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/target_list_params.rbs +57 -0
- data/sig/anthropic/models/beta/organization/claude_tag/bundles/target_retrieve_params.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_channel_create_params.rbs +50 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_channel_delete_params.rbs +38 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_channel_list_params.rbs +69 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_channel_retrieve_params.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_channel_update_params.rbs +46 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_workspace_list_params.rbs +64 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_workspace_retrieve_params.rbs +48 -0
- data/sig/anthropic/models/beta/organization/claude_tag/slack_workspace_update_params.rbs +46 -0
- data/sig/anthropic/resources/beta/organization/claude_tag/bundles/targets.rbs +44 -0
- data/sig/anthropic/resources/beta/organization/claude_tag/bundles.rbs +28 -0
- data/sig/anthropic/resources/beta/organization/claude_tag/slack_channels.rbs +50 -0
- data/sig/anthropic/resources/beta/organization/claude_tag/slack_workspaces.rbs +36 -0
- data/sig/anthropic/resources/beta/organization/claude_tag.rbs +17 -0
- data/sig/anthropic/resources/beta/organization.rbs +2 -0
- metadata +142 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 19e65c78c32b38c06866fa6d8bc50f8219170fc73c7a2171c118e89a3c8fdf65
|
|
4
|
+
data.tar.gz: d2a9d4159eaf896aa79f238e7980f9fb15a523a44aa77e7165ef18bbb2bd3969
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a875dfc422ae1a9257e133e34307c40d3779f1560cb3c4b88a1193e2824f6a6b8b245ac2c459cd1a31c75a357bdfabc06a55f2f2620863b3928d54588c91cc11
|
|
7
|
+
data.tar.gz: 72a6f11b4fa46e78254ce2593557d6bdb48b4e9db948b973a1392536e05fe332b7544149095c78ca7239cc4e11fd5a7e97fc552825316c433aae0392920ce01a
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,39 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [2.3.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.2.0...v2.3.0) (2026-10-23)
|
|
4
|
+
|
|
5
|
+
### Features
|
|
6
|
+
|
|
7
|
+
* **api:** add Claude Tag endpoints for Claude Enterprise organizations
|
|
8
|
+
* **google-cloud:** add user profiles and send them to the organization endpoint; `user_profiles` calls used to raise `NotImplementedError`
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* **bedrock:** `BedrockClient` with an API key takes its region from `AWS_REGION`, then `AWS_DEFAULT_REGION`, when `aws_region` is not passed
|
|
14
|
+
* **client:** link the long-request error message to the SDK documentation
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Chores
|
|
18
|
+
|
|
19
|
+
* **client:** stop sending query params hardcoded in endpoint paths
|
|
20
|
+
* **docs:** improve the descriptions of the code execution tool and its encrypted results
|
|
21
|
+
* **docs:** reword work queue, skill and external key descriptions
|
|
22
|
+
* **docs:** update descriptions of the per-user usage and cost reports
|
|
23
|
+
* **internal:** carry endpoint path query params to the request layer
|
|
24
|
+
* **internal:** check the repository by owner and public name in workflows
|
|
25
|
+
* **internal:** lint against mixing a module into a class from outside
|
|
26
|
+
* **internal:** read the beta route qualifier instead of the beta=true query
|
|
27
|
+
* **internal:** remove preview build upload from CI
|
|
28
|
+
* **internal:** stop expecting the beta query param in tests
|
|
29
|
+
* **internal:** test that rbi and sig declare every public method
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Documentation
|
|
33
|
+
|
|
34
|
+
* **google-cloud:** update the product name
|
|
35
|
+
* update the README and the example request
|
|
36
|
+
|
|
3
37
|
## [2.2.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v2.1.0...v2.2.0) (2026-10-23)
|
|
4
38
|
|
|
5
39
|
### Features
|
data/README.md
CHANGED
|
@@ -15,7 +15,7 @@ Add to your application's Gemfile:
|
|
|
15
15
|
<!-- x-release-please-start-version -->
|
|
16
16
|
|
|
17
17
|
```ruby
|
|
18
|
-
gem "anthropic", "~> 2.
|
|
18
|
+
gem "anthropic", "~> 2.3.0"
|
|
19
19
|
```
|
|
20
20
|
|
|
21
21
|
<!-- x-release-please-end -->
|
|
@@ -33,7 +33,7 @@ anthropic = Anthropic::Client.new(
|
|
|
33
33
|
message = anthropic.messages.create(
|
|
34
34
|
max_tokens: 1024,
|
|
35
35
|
messages: [{role: "user", content: "Hello, Claude"}],
|
|
36
|
-
model:
|
|
36
|
+
model: Anthropic::Model::CLAUDE_OPUS_5_5
|
|
37
37
|
)
|
|
38
38
|
|
|
39
39
|
puts(message.content)
|
data/lib/anthropic/client.rb
CHANGED
|
@@ -118,7 +118,7 @@ module Anthropic
|
|
|
118
118
|
if expected_time > default_time || (max_nonstreaming_tokens && max_tokens > max_nonstreaming_tokens)
|
|
119
119
|
raise ArgumentError.new(
|
|
120
120
|
"Streaming is required for operations that may take longer than 10 minutes. " \
|
|
121
|
-
"See https://
|
|
121
|
+
"See https://platform.claude.com/docs/en/cli-sdks-libraries/sdks/ruby#streaming for more details"
|
|
122
122
|
)
|
|
123
123
|
end
|
|
124
124
|
|
|
@@ -28,6 +28,7 @@ module Anthropic
|
|
|
28
28
|
#
|
|
29
29
|
# @param aws_region [String, nil] Enforce the AWS Region to use. If unset, the region is set according to the
|
|
30
30
|
# AWS SDK's default resolution order, described at https://github.com/aws/aws-sdk-ruby?tab=readme-ov-file#configuration
|
|
31
|
+
# With an API key, defaults to `ENV["AWS_REGION"]`, then `ENV["AWS_DEFAULT_REGION"]`.
|
|
31
32
|
#
|
|
32
33
|
# @param aws_access_key [String, nil] Optional AWS access key to use for authentication. Overrides profile and credential provider chain
|
|
33
34
|
#
|
|
@@ -118,7 +119,7 @@ module Anthropic
|
|
|
118
119
|
credentials: @aws_credentials
|
|
119
120
|
)
|
|
120
121
|
else
|
|
121
|
-
@aws_region = aws_region
|
|
122
|
+
@aws_region = aws_region || env_lookup("AWS_REGION", "AWS_DEFAULT_REGION")
|
|
122
123
|
end
|
|
123
124
|
|
|
124
125
|
base_url = ENV["ANTHROPIC_BEDROCK_BASE_URL"] if base_url.to_s.empty?
|
|
@@ -309,14 +310,16 @@ module Anthropic
|
|
|
309
310
|
private def validate_bedrock_request!(request_components)
|
|
310
311
|
# Id-parameterized routes pass `path` as an Array whose first element
|
|
311
312
|
# is the format string (e.g. `["v1/messages/batches/%1$s", id]`).
|
|
312
|
-
|
|
313
|
+
path = Array(request_components[:path]).first.to_s
|
|
314
|
+
beta = request_components.dig(:qualifiers, :beta) == "true" || path.include?("?beta=true")
|
|
315
|
+
case path
|
|
313
316
|
in %r{^v1/messages/batches}
|
|
314
317
|
message = "The Batch API is not supported in Bedrock yet"
|
|
315
318
|
raise NotImplementedError.new(message)
|
|
316
319
|
in %r{v1/messages/count_tokens}
|
|
317
320
|
message = "Token counting is not supported in Bedrock yet"
|
|
318
321
|
raise NotImplementedError.new(message)
|
|
319
|
-
in %r{v1/models
|
|
322
|
+
in %r{v1/models(\?|\z)} if beta
|
|
320
323
|
# rubocop:disable Layout/LineLength
|
|
321
324
|
message = "Please instead use https://docs.anthropic.com/en/api/claude-on-amazon-bedrock#list-available-models to list available models on Bedrock."
|
|
322
325
|
# rubocop:enable Layout/LineLength
|
|
@@ -3,14 +3,14 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Helpers
|
|
5
5
|
module GoogleCloud
|
|
6
|
-
# Client for Claude
|
|
7
|
-
# API served through the Google Cloud gateway.
|
|
6
|
+
# Client for Claude Models on Google Cloud (Anthropic managed) — the
|
|
7
|
+
# first-party Anthropic API served through the Google Cloud gateway.
|
|
8
8
|
#
|
|
9
9
|
# This is distinct from {Anthropic::VertexClient}, which targets the
|
|
10
10
|
# `:rawPredict` publisher-model API (publisher model IDs, messages
|
|
11
11
|
# only). This client speaks the full first-party Anthropic API: requests
|
|
12
12
|
# pass through the gateway unchanged — standard `/v1/*` paths, standard
|
|
13
|
-
# model names.
|
|
13
|
+
# model names.
|
|
14
14
|
class Client < Anthropic::Client
|
|
15
15
|
# OAuth2 scope required to call the gateway.
|
|
16
16
|
SCOPE = "https://www.googleapis.com/auth/cloud-platform"
|
|
@@ -26,9 +26,9 @@ module Anthropic
|
|
|
26
26
|
# served from a base with no workspace in it.
|
|
27
27
|
ORGANIZATION_URL_TEMPLATE = "#{LOCATION_URL_TEMPLATE}/claudeOrganization/invoke".freeze
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
ORGANIZATION_PATH_PATTERN = %r{\A/v1/(?:organizations/|user_profiles(?:/|\z))}
|
|
30
30
|
|
|
31
|
-
private_constant :LOCATION_URL_TEMPLATE, :
|
|
31
|
+
private_constant :LOCATION_URL_TEMPLATE, :ORGANIZATION_PATH_PATTERN
|
|
32
32
|
|
|
33
33
|
# @return [String, nil]
|
|
34
34
|
attr_reader :project
|
|
@@ -63,7 +63,8 @@ module Anthropic
|
|
|
63
63
|
# @param workspace_id [String, nil] Defaults to
|
|
64
64
|
# `ENV["ANTHROPIC_GOOGLE_CLOUD_WORKSPACE_ID"]`. Required when the base
|
|
65
65
|
# URL is derived, except for organization-level routes
|
|
66
|
-
# (`/v1/organizations/`), which need no
|
|
66
|
+
# (`/v1/organizations/` and `/v1/user_profiles`), which need no
|
|
67
|
+
# workspace ID.
|
|
67
68
|
#
|
|
68
69
|
# @param base_url [String, nil] Override the gateway base URL for every
|
|
69
70
|
# route. Defaults to `ENV["ANTHROPIC_GOOGLE_CLOUD_BASE_URL"]`, otherwise
|
|
@@ -154,10 +155,7 @@ module Anthropic
|
|
|
154
155
|
# No first-party credential is ever passed up, and
|
|
155
156
|
# {#resolve_default_credentials?} keeps the parent from discovering
|
|
156
157
|
# one; `base_url` is always resolved by this point, so the parent's
|
|
157
|
-
# `ANTHROPIC_BASE_URL` fallback never applies.
|
|
158
|
-
# every resource; {#user_profiles} withholds the one the gateway does
|
|
159
|
-
# not serve, and {#build_request} refuses the user profile routes
|
|
160
|
-
# however the resource is reached.
|
|
158
|
+
# `ANTHROPIC_BASE_URL` fallback never applies.
|
|
161
159
|
super(
|
|
162
160
|
base_url: base_url,
|
|
163
161
|
timeout: timeout,
|
|
@@ -175,13 +173,6 @@ module Anthropic
|
|
|
175
173
|
# @see Anthropic::Client#resolve_default_credentials?
|
|
176
174
|
private def resolve_default_credentials? = false
|
|
177
175
|
|
|
178
|
-
# User profiles are not supported on the Google Cloud gateway.
|
|
179
|
-
#
|
|
180
|
-
# @raise [NotImplementedError]
|
|
181
|
-
def user_profiles
|
|
182
|
-
raise NotImplementedError.new("User profiles are not supported on the Google Cloud gateway.")
|
|
183
|
-
end
|
|
184
|
-
|
|
185
176
|
# @api private
|
|
186
177
|
#
|
|
187
178
|
# @param req [Hash{Symbol=>Object}] .
|
|
@@ -219,15 +210,8 @@ module Anthropic
|
|
|
219
210
|
# @option opts [Float, nil] :timeout
|
|
220
211
|
#
|
|
221
212
|
# @raise [ArgumentError]
|
|
222
|
-
# @raise [NotImplementedError]
|
|
223
213
|
# @return [Hash{Symbol=>Object}]
|
|
224
214
|
private def build_request(req, opts)
|
|
225
|
-
# Id-parameterized routes pass `path` as an Array whose first element
|
|
226
|
-
# is the format string (e.g. `["v1/user_profiles/%1$s", id]`).
|
|
227
|
-
if Array(req[:path]).first.to_s.start_with?("v1/user_profiles")
|
|
228
|
-
raise NotImplementedError.new("User profiles are not supported on the Google Cloud gateway.")
|
|
229
|
-
end
|
|
230
|
-
|
|
231
215
|
request = super
|
|
232
216
|
return request if @organization_base_url.nil?
|
|
233
217
|
|
|
@@ -238,7 +222,7 @@ module Anthropic
|
|
|
238
222
|
return request unless under_base_url
|
|
239
223
|
|
|
240
224
|
path = url.path.delete_prefix(base_url.path)
|
|
241
|
-
if path.
|
|
225
|
+
if path.match?(ORGANIZATION_PATH_PATTERN)
|
|
242
226
|
url = url.dup
|
|
243
227
|
url.path = "#{@organization_base_url.path}#{path}"
|
|
244
228
|
{**request, url: url}
|
|
@@ -225,8 +225,7 @@ module Anthropic
|
|
|
225
225
|
return false unless req.method == :post
|
|
226
226
|
return false unless req.body.is_a?(Hash)
|
|
227
227
|
return false unless req.url.path&.end_with?("/v1/messages")
|
|
228
|
-
|
|
229
|
-
query["beta"] == "true"
|
|
228
|
+
req.metadata.dig(:qualifiers, :beta) == "true"
|
|
230
229
|
end
|
|
231
230
|
|
|
232
231
|
# @return [Anthropic::APIRequest] `req` with `@betas` appended to the
|
|
@@ -24,8 +24,9 @@ module Anthropic
|
|
|
24
24
|
# The {HEADER} value to set after appending `value` to whatever is
|
|
25
25
|
# already present in `headers` — existing tags keep their position, the
|
|
26
26
|
# new tag goes at the end, duplicates are dropped, joined as one
|
|
27
|
-
# comma-separated string. The
|
|
28
|
-
#
|
|
27
|
+
# comma-separated string. The new tag is merged into the existing value
|
|
28
|
+
# rather than replacing it, because a second header line or a clobbered
|
|
29
|
+
# value loses data.
|
|
29
30
|
#
|
|
30
31
|
# @param headers [Hash{String => String}]
|
|
31
32
|
# @param value [String]
|
|
@@ -353,6 +353,26 @@ module Anthropic
|
|
|
353
353
|
ORGANIZATION_WEBHOOKS_DELETE = "anthropic.organization.webhooks.delete"
|
|
354
354
|
ORGANIZATION_WEBHOOKS_REGENERATE_SIGNING_SECRET =
|
|
355
355
|
"anthropic.organization.webhooks.regenerate_signing_secret"
|
|
356
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_CHANNELS_CREATE = "anthropic.organization.claude_tag.slack_channels.create"
|
|
357
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_CHANNELS_RETRIEVE =
|
|
358
|
+
"anthropic.organization.claude_tag.slack_channels.retrieve"
|
|
359
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_CHANNELS_UPDATE = "anthropic.organization.claude_tag.slack_channels.update"
|
|
360
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_CHANNELS_LIST = "anthropic.organization.claude_tag.slack_channels.list"
|
|
361
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_CHANNELS_DELETE = "anthropic.organization.claude_tag.slack_channels.delete"
|
|
362
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_WORKSPACES_RETRIEVE =
|
|
363
|
+
"anthropic.organization.claude_tag.slack_workspaces.retrieve"
|
|
364
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_WORKSPACES_UPDATE =
|
|
365
|
+
"anthropic.organization.claude_tag.slack_workspaces.update"
|
|
366
|
+
ORGANIZATION_CLAUDE_TAG_SLACK_WORKSPACES_LIST = "anthropic.organization.claude_tag.slack_workspaces.list"
|
|
367
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_RETRIEVE = "anthropic.organization.claude_tag.bundles.retrieve"
|
|
368
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_LIST = "anthropic.organization.claude_tag.bundles.list"
|
|
369
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_TARGETS_CREATE =
|
|
370
|
+
"anthropic.organization.claude_tag.bundles.targets.create"
|
|
371
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_TARGETS_RETRIEVE =
|
|
372
|
+
"anthropic.organization.claude_tag.bundles.targets.retrieve"
|
|
373
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_TARGETS_LIST = "anthropic.organization.claude_tag.bundles.targets.list"
|
|
374
|
+
ORGANIZATION_CLAUDE_TAG_BUNDLES_TARGETS_DELETE =
|
|
375
|
+
"anthropic.organization.claude_tag.bundles.targets.delete"
|
|
356
376
|
end
|
|
357
377
|
|
|
358
378
|
# @type [Hash{String=>String}]
|
|
@@ -41,6 +41,7 @@ module Anthropic
|
|
|
41
41
|
:page,
|
|
42
42
|
:stream,
|
|
43
43
|
:model,
|
|
44
|
+
:qualifiers,
|
|
44
45
|
:span_name,
|
|
45
46
|
:span_attributes,
|
|
46
47
|
:span_created_id,
|
|
@@ -100,6 +101,8 @@ module Anthropic
|
|
|
100
101
|
#
|
|
101
102
|
# @option request [Float] :timeout
|
|
102
103
|
#
|
|
104
|
+
# @option request [Hash{Symbol=>String}, nil] :qualifiers
|
|
105
|
+
#
|
|
103
106
|
# @option request [Array<String>, nil] :span_query
|
|
104
107
|
#
|
|
105
108
|
# @option request [Array<String>, nil] :span_content_query
|
|
@@ -335,6 +338,9 @@ module Anthropic
|
|
|
335
338
|
#
|
|
336
339
|
# @option req [Anthropic::Internal::Type::Converter, Class, nil] :model
|
|
337
340
|
#
|
|
341
|
+
# @option req [Hash{Symbol=>String}, nil] :qualifiers internal: the query pairs that tell the operation apart from the others with its
|
|
342
|
+
# path in the OpenAPI document
|
|
343
|
+
#
|
|
338
344
|
# @option req [String, nil] :span_name
|
|
339
345
|
#
|
|
340
346
|
# @option req [Hash{String=>Object}, nil] :span_attributes
|
|
@@ -428,6 +434,7 @@ module Anthropic
|
|
|
428
434
|
body: body,
|
|
429
435
|
max_retries: opts.fetch(:max_retries, @max_retries),
|
|
430
436
|
timeout: timeout,
|
|
437
|
+
qualifiers: req[:qualifiers],
|
|
431
438
|
user_header_keys: user_header_keys,
|
|
432
439
|
# For paginated requests `model` is the page's *item* type, not the
|
|
433
440
|
# response envelope's — middleware `parse` falls back to the raw
|
|
@@ -439,7 +446,7 @@ module Anthropic
|
|
|
439
446
|
span_content_query: req[:span_content_query],
|
|
440
447
|
options: opts.except(:middleware),
|
|
441
448
|
middleware: request_middleware,
|
|
442
|
-
metadata: {}
|
|
449
|
+
metadata: {qualifiers: req[:qualifiers]}.compact
|
|
443
450
|
}
|
|
444
451
|
end
|
|
445
452
|
|
|
@@ -540,6 +547,8 @@ module Anthropic
|
|
|
540
547
|
#
|
|
541
548
|
# @option request [Float] :timeout
|
|
542
549
|
#
|
|
550
|
+
# @option request [Hash{Symbol=>String}, nil] :qualifiers
|
|
551
|
+
#
|
|
543
552
|
# @option request [Array<String>, nil] :span_query
|
|
544
553
|
#
|
|
545
554
|
# @option request [Array<String>, nil] :span_content_query
|
|
@@ -738,7 +747,7 @@ module Anthropic
|
|
|
738
747
|
# Execute the request specified by `req`. This is the method that all resource
|
|
739
748
|
# methods call into.
|
|
740
749
|
#
|
|
741
|
-
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: Anthropic::Internal::Type::Unknown, span_name: nil, span_attributes: nil, span_created_id: nil, span_route: nil, span_query: nil, span_content_query: nil, options: {})
|
|
750
|
+
# @overload request(method, path, query: {}, headers: {}, body: nil, unwrap: nil, page: nil, stream: nil, model: Anthropic::Internal::Type::Unknown, qualifiers: nil, span_name: nil, span_attributes: nil, span_created_id: nil, span_route: nil, span_query: nil, span_content_query: nil, options: {})
|
|
742
751
|
#
|
|
743
752
|
# @param method [Symbol]
|
|
744
753
|
#
|
|
@@ -758,6 +767,9 @@ module Anthropic
|
|
|
758
767
|
#
|
|
759
768
|
# @param model [Anthropic::Internal::Type::Converter, Class, nil]
|
|
760
769
|
#
|
|
770
|
+
# @param qualifiers [Hash{Symbol=>String}, nil] internal: the query pairs that tell the operation apart from the others with its
|
|
771
|
+
# path in the OpenAPI document
|
|
772
|
+
#
|
|
761
773
|
# @param span_name [String, nil]
|
|
762
774
|
#
|
|
763
775
|
# @param span_attributes [Hash{String=>Object}, nil]
|
|
@@ -913,6 +925,7 @@ module Anthropic
|
|
|
913
925
|
T::Class[Anthropic::Internal::Type::BaseStream[T.anything, Anthropic::Internal::Type::BaseModel]]
|
|
914
926
|
),
|
|
915
927
|
model: T.nilable(Anthropic::Internal::Type::Converter::Input),
|
|
928
|
+
qualifiers: T.nilable(T::Hash[Symbol, String]),
|
|
916
929
|
span_name: T.nilable(String),
|
|
917
930
|
span_attributes: T.nilable(T::Hash[String, T.anything]),
|
|
918
931
|
span_created_id: T.nilable(T.any(String, T::Hash[String, Symbol])),
|
|
@@ -932,6 +945,7 @@ module Anthropic
|
|
|
932
945
|
body: T.anything,
|
|
933
946
|
max_retries: Integer,
|
|
934
947
|
timeout: Float,
|
|
948
|
+
qualifiers: T.nilable(T::Hash[Symbol, String]),
|
|
935
949
|
user_header_keys: T::Array[String],
|
|
936
950
|
cast_to: T.nilable(Anthropic::Internal::Type::Converter::Input),
|
|
937
951
|
stream: T.nilable(T::Class[T.anything]),
|
|
@@ -113,6 +113,8 @@ module Anthropic
|
|
|
113
113
|
|
|
114
114
|
variant const: -> { Anthropic::Models::AnthropicBeta::ANALYTICS_USAGE_COST_2026_08_24 }
|
|
115
115
|
|
|
116
|
+
variant const: -> { Anthropic::Models::AnthropicBeta::EXPERIMENTAL_CLAUDE_TAG_2026_10_21 }
|
|
117
|
+
|
|
116
118
|
variant String
|
|
117
119
|
|
|
118
120
|
# @!method self.variants
|
|
@@ -178,6 +180,7 @@ module Anthropic
|
|
|
178
180
|
WEBHOOKS_2026_10_07 = :"webhooks-2026-10-07"
|
|
179
181
|
MESSAGE_THREADS_2026_08_12 = :"message-threads-2026-08-12"
|
|
180
182
|
ANALYTICS_USAGE_COST_2026_08_24 = :"analytics-usage-cost-2026-08-24"
|
|
183
|
+
EXPERIMENTAL_CLAUDE_TAG_2026_10_21 = :"experimental-claude-tag-2026-10-21"
|
|
181
184
|
|
|
182
185
|
# @!endgroup
|
|
183
186
|
end
|
|
@@ -43,8 +43,16 @@ module Anthropic
|
|
|
43
43
|
optional :strict, Anthropic::Internal::Type::Boolean
|
|
44
44
|
|
|
45
45
|
# @!method initialize(allowed_callers: nil, cache_control: nil, defer_loading: nil, strict: nil, name: :code_execution, type: :code_execution_20260120)
|
|
46
|
-
#
|
|
47
|
-
#
|
|
46
|
+
# A `tools` entry for the code execution tool, version `code_execution_20260120`.
|
|
47
|
+
# It adds REPL state persistence to version `code_execution_20250825`.
|
|
48
|
+
#
|
|
49
|
+
# REPL state persistence applies with programmatic tool calling. With it, the
|
|
50
|
+
# Python interpreter state, such as variable bindings, persists across requests
|
|
51
|
+
# that reuse the container.
|
|
52
|
+
#
|
|
53
|
+
# See the
|
|
54
|
+
# [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions)
|
|
55
|
+
# to learn what each tool version adds.
|
|
48
56
|
#
|
|
49
57
|
# Some parameter documentations has been truncated, see
|
|
50
58
|
# {Anthropic::Models::Beta::BetaCodeExecutionTool20260120} for more details.
|
|
@@ -10,7 +10,11 @@ module Anthropic
|
|
|
10
10
|
|
|
11
11
|
variant -> { Anthropic::Beta::BetaCodeExecutionResultBlock }
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form.
|
|
14
|
+
#
|
|
15
|
+
# The API returns this block in place of `code_execution_result` when the code called the web search tool.
|
|
16
|
+
#
|
|
17
|
+
# See the [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling) to learn more about programmatic tool calling.
|
|
14
18
|
variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlock }
|
|
15
19
|
|
|
16
20
|
# @!method self.variants
|
|
@@ -10,7 +10,7 @@ module Anthropic
|
|
|
10
10
|
|
|
11
11
|
variant -> { Anthropic::Beta::BetaCodeExecutionResultBlockParam }
|
|
12
12
|
|
|
13
|
-
#
|
|
13
|
+
# The output and exit code of Python code that Claude ran with the code execution tool, with standard output in encrypted form, sent back in a later request.
|
|
14
14
|
variant -> { Anthropic::Beta::BetaEncryptedCodeExecutionResultBlockParam }
|
|
15
15
|
|
|
16
16
|
# @!method self.variants
|
|
@@ -31,7 +31,15 @@ module Anthropic
|
|
|
31
31
|
required :type, const: :encrypted_code_execution_result
|
|
32
32
|
|
|
33
33
|
# @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
|
|
34
|
-
#
|
|
34
|
+
# The output and exit code of Python code that Claude ran with the code execution
|
|
35
|
+
# tool, with standard output in encrypted form.
|
|
36
|
+
#
|
|
37
|
+
# The API returns this block in place of `code_execution_result` when the code
|
|
38
|
+
# called the web search tool.
|
|
39
|
+
#
|
|
40
|
+
# See the
|
|
41
|
+
# [programmatic tool calling guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/programmatic-tool-calling)
|
|
42
|
+
# to learn more about programmatic tool calling.
|
|
35
43
|
#
|
|
36
44
|
# @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlock>]
|
|
37
45
|
# @param encrypted_stdout [String]
|
|
@@ -31,7 +31,8 @@ module Anthropic
|
|
|
31
31
|
required :type, const: :encrypted_code_execution_result
|
|
32
32
|
|
|
33
33
|
# @!method initialize(content:, encrypted_stdout:, return_code:, stderr:, type: :encrypted_code_execution_result)
|
|
34
|
-
#
|
|
34
|
+
# The output and exit code of Python code that Claude ran with the code execution
|
|
35
|
+
# tool, with standard output in encrypted form, sent back in a later request.
|
|
35
36
|
#
|
|
36
37
|
# @param content [Array<Anthropic::Models::Beta::BetaCodeExecutionOutputBlockParam>]
|
|
37
38
|
# @param encrypted_stdout [String]
|
|
@@ -17,7 +17,11 @@ module Anthropic
|
|
|
17
17
|
|
|
18
18
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20250825 }
|
|
19
19
|
|
|
20
|
-
#
|
|
20
|
+
# A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.
|
|
21
|
+
#
|
|
22
|
+
# REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.
|
|
23
|
+
#
|
|
24
|
+
# See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds.
|
|
21
25
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20260120 }
|
|
22
26
|
|
|
23
27
|
# Code execution tool with REPL state persistence.
|
|
@@ -23,7 +23,7 @@ module Anthropic
|
|
|
23
23
|
optional :version, String
|
|
24
24
|
|
|
25
25
|
# @!method initialize(skill_id:, type:, version: nil)
|
|
26
|
-
# Specification for a skill to be loaded in a container
|
|
26
|
+
# Specification for a skill to be loaded in a container.
|
|
27
27
|
#
|
|
28
28
|
# @param skill_id [String] Skill ID
|
|
29
29
|
#
|
|
@@ -16,7 +16,11 @@ module Anthropic
|
|
|
16
16
|
|
|
17
17
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20250825 }
|
|
18
18
|
|
|
19
|
-
#
|
|
19
|
+
# A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.
|
|
20
|
+
#
|
|
21
|
+
# REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.
|
|
22
|
+
#
|
|
23
|
+
# See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds.
|
|
20
24
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20260120 }
|
|
21
25
|
|
|
22
26
|
# Code execution tool with REPL state persistence.
|
|
@@ -7,7 +7,8 @@ module Anthropic
|
|
|
7
7
|
# @see Anthropic::Resources::Beta::Environments::Work#heartbeat
|
|
8
8
|
class BetaSelfHostedWorkHeartbeatResponse < Anthropic::Internal::Type::BaseModel
|
|
9
9
|
# @!attribute last_heartbeat
|
|
10
|
-
# RFC 3339 timestamp of the
|
|
10
|
+
# RFC 3339 timestamp of the most recent heartbeat recorded for this work item, or
|
|
11
|
+
# an empty string if none has been recorded
|
|
11
12
|
#
|
|
12
13
|
# @return [String]
|
|
13
14
|
required :last_heartbeat, String
|
|
@@ -39,7 +40,11 @@ module Anthropic
|
|
|
39
40
|
# @!method initialize(last_heartbeat:, lease_extended:, state:, ttl_seconds:, type: :work_heartbeat)
|
|
40
41
|
# Response after recording a heartbeat for a work item.
|
|
41
42
|
#
|
|
42
|
-
#
|
|
43
|
+
# Some parameter documentations has been truncated, see
|
|
44
|
+
# {Anthropic::Models::Beta::Environments::BetaSelfHostedWorkHeartbeatResponse} for
|
|
45
|
+
# more details.
|
|
46
|
+
#
|
|
47
|
+
# @param last_heartbeat [String] RFC 3339 timestamp of the most recent heartbeat recorded for this work item, or
|
|
43
48
|
#
|
|
44
49
|
# @param lease_extended [Boolean] Whether the heartbeat succeeded in extending the lease
|
|
45
50
|
#
|
|
@@ -7,7 +7,7 @@ module Anthropic
|
|
|
7
7
|
# @see Anthropic::Resources::Beta::Environments::Work#stats
|
|
8
8
|
class BetaSelfHostedWorkQueueStats < Anthropic::Internal::Type::BaseModel
|
|
9
9
|
# @!attribute depth
|
|
10
|
-
# Number of work items waiting to be picked up
|
|
10
|
+
# Number of work items waiting to be picked up
|
|
11
11
|
#
|
|
12
12
|
# @return [Integer]
|
|
13
13
|
required :depth, Integer
|
|
@@ -41,13 +41,11 @@ module Anthropic
|
|
|
41
41
|
# @!method initialize(depth:, oldest_queued_at:, pending:, workers_polling:, type: :work_queue_stats)
|
|
42
42
|
# Statistics about the work queue for an environment.
|
|
43
43
|
#
|
|
44
|
-
# Uses Redis Stream consumer group metrics for O(1) queries.
|
|
45
|
-
#
|
|
46
44
|
# Some parameter documentations has been truncated, see
|
|
47
45
|
# {Anthropic::Models::Beta::Environments::BetaSelfHostedWorkQueueStats} for more
|
|
48
46
|
# details.
|
|
49
47
|
#
|
|
50
|
-
# @param depth [Integer] Number of work items waiting to be picked up
|
|
48
|
+
# @param depth [Integer] Number of work items waiting to be picked up
|
|
51
49
|
#
|
|
52
50
|
# @param oldest_queued_at [String, nil] RFC 3339 timestamp of oldest item in the work stream (includes both queued and p
|
|
53
51
|
#
|
|
@@ -386,7 +386,11 @@ module Anthropic
|
|
|
386
386
|
|
|
387
387
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20250825 }
|
|
388
388
|
|
|
389
|
-
#
|
|
389
|
+
# A `tools` entry for the code execution tool, version `code_execution_20260120`. It adds REPL state persistence to version `code_execution_20250825`.
|
|
390
|
+
#
|
|
391
|
+
# REPL state persistence applies with programmatic tool calling. With it, the Python interpreter state, such as variable bindings, persists across requests that reuse the container.
|
|
392
|
+
#
|
|
393
|
+
# See the [code execution tool guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool#tool-versions) to learn what each tool version adds.
|
|
390
394
|
variant -> { Anthropic::Beta::BetaCodeExecutionTool20260120 }
|
|
391
395
|
|
|
392
396
|
# Code execution tool with REPL state persistence.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
class BetaClaudeTagDefaultSettingSource < Anthropic::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute type
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :default]
|
|
11
|
+
required :type, const: :default
|
|
12
|
+
|
|
13
|
+
# @!method initialize(type: :default)
|
|
14
|
+
# No settings level sets a value, and the built-in default applies.
|
|
15
|
+
#
|
|
16
|
+
# @param type [Symbol, :default]
|
|
17
|
+
end
|
|
18
|
+
end
|
|
19
|
+
end
|
|
20
|
+
end
|
|
21
|
+
end
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
module Organization
|
|
7
|
+
# What Claude does in a channel while a Slack guest is in it, for everyone in the
|
|
8
|
+
# channel. It changes nothing in a channel without Slack guests. More types can be
|
|
9
|
+
# added.
|
|
10
|
+
module BetaClaudeTagGuestPolicy
|
|
11
|
+
extend Anthropic::Internal::Type::Union
|
|
12
|
+
|
|
13
|
+
discriminator :type
|
|
14
|
+
|
|
15
|
+
# Claude answers in the channel.
|
|
16
|
+
variant :allow, -> { Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyAllow }
|
|
17
|
+
|
|
18
|
+
# Claude does not answer in the channel.
|
|
19
|
+
variant :restrict, -> { Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyRestrict }
|
|
20
|
+
|
|
21
|
+
# Claude answers with only the Bundles attached to the channel itself.
|
|
22
|
+
variant :channel_only, -> { Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyChannelOnly }
|
|
23
|
+
|
|
24
|
+
module Type
|
|
25
|
+
extend Anthropic::Internal::Type::Enum
|
|
26
|
+
|
|
27
|
+
ALLOW = :allow
|
|
28
|
+
RESTRICT = :restrict
|
|
29
|
+
CHANNEL_ONLY = :channel_only
|
|
30
|
+
|
|
31
|
+
# @!method self.values
|
|
32
|
+
# @return [Array<Symbol>]
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
# @!method self.variants
|
|
36
|
+
# @return [Array(Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyAllow, Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyRestrict, Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyChannelOnly)]
|
|
37
|
+
|
|
38
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
39
|
+
# value, passing the remaining arguments to its constructor.
|
|
40
|
+
#
|
|
41
|
+
# @param type [Symbol, Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicy::Type, String]
|
|
42
|
+
#
|
|
43
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
44
|
+
#
|
|
45
|
+
# @raise [ArgumentError]
|
|
46
|
+
# @return [Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyAllow, Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyRestrict, Anthropic::Models::Beta::Organization::BetaClaudeTagGuestPolicyChannelOnly]
|
|
47
|
+
def self.new(type:, **args)
|
|
48
|
+
case type.to_sym
|
|
49
|
+
when :allow
|
|
50
|
+
Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyAllow.new(**args)
|
|
51
|
+
when :restrict
|
|
52
|
+
Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyRestrict.new(**args)
|
|
53
|
+
when :channel_only
|
|
54
|
+
Anthropic::Beta::Organization::BetaClaudeTagGuestPolicyChannelOnly.new(**args)
|
|
55
|
+
else
|
|
56
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
57
|
+
end
|
|
58
|
+
end
|
|
59
|
+
end
|
|
60
|
+
end
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
end
|