anthropic 1.64.0 → 1.65.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 +9 -1
- data/README.md +1 -1
- data/lib/anthropic/models/beta/agent_create_params.rb +1 -1
- data/lib/anthropic/models/beta/agent_update_params.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_agent.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_agent_tool_config.rb +65 -71
- data/lib/anthropic/models/beta/beta_managed_agents_agent_tool_config_params.rb +69 -78
- data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset20260401.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_agent_toolset20260401_params.rb +3 -3
- data/lib/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_managed_agents_session_agent.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_session_agent_update.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_session_thread_agent.rb +1 -1
- data/lib/anthropic/models/beta/beta_managed_agents_user_location.rb +54 -0
- data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rb +103 -0
- data/lib/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rb +131 -0
- data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rb +104 -0
- data/lib/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rb +130 -0
- data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config.rb +82 -0
- data/lib/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rb +100 -0
- data/lib/anthropic/models/beta/beta_skill.rb +2 -2
- data/lib/anthropic/models/container_skill.rb +2 -2
- data/lib/anthropic/version.rb +1 -1
- data/lib/anthropic.rb +17 -0
- data/rbi/anthropic/models/beta/agent_create_params.rbi +10 -1
- data/rbi/anthropic/models/beta/agent_update_params.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_agent.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_tool_config.rbi +37 -138
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_tool_config_params.rbi +49 -149
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_toolset20260401.rbi +18 -3
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_toolset20260401_params.rbi +42 -4
- data/rbi/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_bash_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_edit_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_glob_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_grep_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_read_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_session_agent.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_session_agent_update.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_session_thread_agent.rbi +10 -1
- data/rbi/anthropic/models/beta/beta_managed_agents_user_location.rbi +77 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rbi +130 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rbi +213 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rbi +144 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rbi +223 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_write_tool_config.rbi +105 -0
- data/rbi/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rbi +169 -0
- data/rbi/anthropic/models/beta/beta_skill.rbi +2 -2
- data/rbi/anthropic/models/container_skill.rbi +2 -2
- data/sig/anthropic/models/beta/agent_create_params.rbs +2 -2
- data/sig/anthropic/models/beta/agent_update_params.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_agent.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_agent_tool_config.rbs +91 -68
- data/sig/anthropic/models/beta/beta_managed_agents_agent_tool_config_params.rbs +91 -68
- data/sig/anthropic/models/beta/beta_managed_agents_agent_toolset20260401.rbs +4 -4
- data/sig/anthropic/models/beta/beta_managed_agents_agent_toolset20260401_params.rbs +6 -6
- data/sig/anthropic/models/beta/beta_managed_agents_agent_with_overrides_params.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_bash_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_bash_tool_config_params.rbs +74 -0
- data/sig/anthropic/models/beta/beta_managed_agents_edit_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_edit_tool_config_params.rbs +74 -0
- data/sig/anthropic/models/beta/beta_managed_agents_glob_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_glob_tool_config_params.rbs +74 -0
- data/sig/anthropic/models/beta/beta_managed_agents_grep_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_grep_tool_config_params.rbs +74 -0
- data/sig/anthropic/models/beta/beta_managed_agents_read_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_read_tool_config_params.rbs +74 -0
- data/sig/anthropic/models/beta/beta_managed_agents_session_agent.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_session_agent_update.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_session_thread_agent.rbs +2 -2
- data/sig/anthropic/models/beta/beta_managed_agents_user_location.rbs +44 -0
- data/sig/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config.rbs +79 -0
- data/sig/anthropic/models/beta/beta_managed_agents_web_fetch_tool_config_params.rbs +93 -0
- data/sig/anthropic/models/beta/beta_managed_agents_web_search_tool_config.rbs +79 -0
- data/sig/anthropic/models/beta/beta_managed_agents_web_search_tool_config_params.rbs +93 -0
- data/sig/anthropic/models/beta/beta_managed_agents_write_tool_config.rbs +60 -0
- data/sig/anthropic/models/beta/beta_managed_agents_write_tool_config_params.rbs +74 -0
- metadata +52 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2250e8bcc591b9822aba99c4c69d00f28495b14a6f7e03ec4997a3ec8fbaa63d
|
|
4
|
+
data.tar.gz: 1875230fde738ce6d365470dc781c264ec81147d4bf7382f111ea98f43777340
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: cd7fb0d6a181129755fc38183e4fa5f77aef8f29bed1fb01b1d53f94776d05a85a00c6173f0686968a470b9991258dcc37383067380594a6345e7fd402b41eeb
|
|
7
|
+
data.tar.gz: 16f85f7c7abc63b6aa4b3cd8b3172744e9852107dd56413038ac04fd3b08529b5029812cf651ca365b4565963e776dcfa01c4c742678a47a6ab70ed195094df1
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,13 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.65.0 (2026-08-19)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v1.64.0...v1.65.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.64.0...v1.65.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* **api:** managed agents web search config and self hosted sandbox memory ([c7a8dac](https://github.com/anthropics/anthropic-sdk-ruby/commit/c7a8dac314c1b05ef5e01d632f4d0a8c0b467e38))
|
|
10
|
+
|
|
3
11
|
## 1.64.0 (2026-08-19)
|
|
4
12
|
|
|
5
13
|
Full Changelog: [v1.63.0...v1.64.0](https://github.com/anthropics/anthropic-sdk-ruby/compare/v1.63.0...v1.64.0)
|
|
@@ -324,7 +332,7 @@ Full Changelog: [v1.43.0...v1.44.0](https://github.com/anthropics/anthropic-sdk-
|
|
|
324
332
|
|
|
325
333
|
### Bug Fixes
|
|
326
334
|
|
|
327
|
-
* **internal:** preserve path-qualified multipart filenames (
|
|
335
|
+
* **internal:** preserve path-qualified multipart filenames ([#937](https://github.com/anthropics/anthropic-sdk-ruby/issues/937)) ([000e793](https://github.com/anthropics/anthropic-sdk-ruby/commit/000e793062309ee421111866f1bd56d0384277f3))
|
|
328
336
|
|
|
329
337
|
|
|
330
338
|
### Documentation
|
data/README.md
CHANGED
|
@@ -153,7 +153,7 @@ module Anthropic
|
|
|
153
153
|
#
|
|
154
154
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
155
155
|
#
|
|
156
|
-
# @option args [Array<Anthropic::Models::Beta::
|
|
156
|
+
# @option args [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams>, Array<Anthropic::Models::Beta::BetaManagedAgentsMCPToolConfigParams>] :configs Per-tool configuration overrides.
|
|
157
157
|
#
|
|
158
158
|
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfigParams, nil, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetDefaultConfigParams, nil] :default_config Default configuration for all tools in a toolset.
|
|
159
159
|
#
|
|
@@ -181,7 +181,7 @@ module Anthropic
|
|
|
181
181
|
#
|
|
182
182
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
183
183
|
#
|
|
184
|
-
# @option args [Array<Anthropic::Models::Beta::
|
|
184
|
+
# @option args [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams>, Array<Anthropic::Models::Beta::BetaManagedAgentsMCPToolConfigParams>] :configs Per-tool configuration overrides.
|
|
185
185
|
#
|
|
186
186
|
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfigParams, nil, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetDefaultConfigParams, nil] :default_config Default configuration for all tools in a toolset.
|
|
187
187
|
#
|
|
@@ -189,7 +189,7 @@ module Anthropic
|
|
|
189
189
|
#
|
|
190
190
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
191
191
|
#
|
|
192
|
-
# @option args [Array<Anthropic::Models::Beta::
|
|
192
|
+
# @option args [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfig, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfig>, Array<Anthropic::Models::Beta::BetaManagedAgentsMCPToolConfig>] :configs
|
|
193
193
|
#
|
|
194
194
|
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfig, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetDefaultConfig] :default_config Resolved default configuration for agent tools.
|
|
195
195
|
#
|
|
@@ -3,88 +3,82 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
module Beta
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
# @return [Boolean]
|
|
10
|
-
required :enabled, Anthropic::Internal::Type::Boolean
|
|
6
|
+
# Configuration for a specific agent tool.
|
|
7
|
+
module BetaManagedAgentsAgentToolConfig
|
|
8
|
+
extend Anthropic::Internal::Type::Union
|
|
11
9
|
|
|
12
|
-
|
|
13
|
-
# Built-in agent tool identifier.
|
|
14
|
-
#
|
|
15
|
-
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfig::Name]
|
|
16
|
-
required :name, enum: -> { Anthropic::Beta::BetaManagedAgentsAgentToolConfig::Name }
|
|
10
|
+
discriminator :type
|
|
17
11
|
|
|
18
|
-
#
|
|
19
|
-
|
|
20
|
-
#
|
|
21
|
-
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy]
|
|
22
|
-
required :permission_policy,
|
|
23
|
-
union: -> { Anthropic::Beta::BetaManagedAgentsAgentToolConfig::PermissionPolicy }
|
|
24
|
-
|
|
25
|
-
# @!method initialize(enabled:, name:, permission_policy:)
|
|
26
|
-
# Configuration for a specific agent tool.
|
|
27
|
-
#
|
|
28
|
-
# @param enabled [Boolean]
|
|
29
|
-
#
|
|
30
|
-
# @param name [Symbol, Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfig::Name] Built-in agent tool identifier.
|
|
31
|
-
#
|
|
32
|
-
# @param permission_policy [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy] Permission policy for tool execution.
|
|
12
|
+
# Configuration for the bash tool.
|
|
13
|
+
variant :bash, -> { Anthropic::Beta::BetaManagedAgentsBashToolConfig }
|
|
33
14
|
|
|
34
|
-
#
|
|
35
|
-
|
|
36
|
-
# @see Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfig#name
|
|
37
|
-
module Name
|
|
38
|
-
extend Anthropic::Internal::Type::Enum
|
|
15
|
+
# Configuration for the edit tool.
|
|
16
|
+
variant :edit, -> { Anthropic::Beta::BetaManagedAgentsEditToolConfig }
|
|
39
17
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
READ = :read
|
|
43
|
-
WRITE = :write
|
|
44
|
-
GLOB = :glob
|
|
45
|
-
GREP = :grep
|
|
46
|
-
WEB_FETCH = :web_fetch
|
|
47
|
-
WEB_SEARCH = :web_search
|
|
18
|
+
# Configuration for the read tool.
|
|
19
|
+
variant :read, -> { Anthropic::Beta::BetaManagedAgentsReadToolConfig }
|
|
48
20
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
end
|
|
21
|
+
# Configuration for the write tool.
|
|
22
|
+
variant :write, -> { Anthropic::Beta::BetaManagedAgentsWriteToolConfig }
|
|
52
23
|
|
|
53
|
-
#
|
|
54
|
-
|
|
55
|
-
# @see Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfig#permission_policy
|
|
56
|
-
module PermissionPolicy
|
|
57
|
-
extend Anthropic::Internal::Type::Union
|
|
24
|
+
# Configuration for the glob tool.
|
|
25
|
+
variant :glob, -> { Anthropic::Beta::BetaManagedAgentsGlobToolConfig }
|
|
58
26
|
|
|
59
|
-
|
|
27
|
+
# Configuration for the grep tool.
|
|
28
|
+
variant :grep, -> { Anthropic::Beta::BetaManagedAgentsGrepToolConfig }
|
|
60
29
|
|
|
61
|
-
|
|
62
|
-
|
|
30
|
+
# Configuration for the web_fetch tool.
|
|
31
|
+
variant :web_fetch, -> { Anthropic::Beta::BetaManagedAgentsWebFetchToolConfig }
|
|
63
32
|
|
|
64
|
-
|
|
65
|
-
|
|
33
|
+
# Configuration for the web_search tool.
|
|
34
|
+
variant :web_search, -> { Anthropic::Beta::BetaManagedAgentsWebSearchToolConfig }
|
|
66
35
|
|
|
67
|
-
|
|
68
|
-
|
|
36
|
+
# @!method self.variants
|
|
37
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfig, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfig)]
|
|
69
38
|
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
39
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
40
|
+
# value, passing the remaining arguments to its constructor.
|
|
41
|
+
#
|
|
42
|
+
# @param type [Symbol, String]
|
|
43
|
+
#
|
|
44
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
45
|
+
#
|
|
46
|
+
# @option args [Boolean] :enabled
|
|
47
|
+
#
|
|
48
|
+
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy] :permission_policy Permission policy for tool execution.
|
|
49
|
+
#
|
|
50
|
+
# @option args [Symbol, :bash, Symbol, :edit, Symbol, :read, Symbol, :write, Symbol, :glob, Symbol, :grep, Symbol, :web_fetch, Symbol, :web_search] :name
|
|
51
|
+
#
|
|
52
|
+
# @option args [Array<String>] :allowed_domains
|
|
53
|
+
#
|
|
54
|
+
# @option args [Array<String>] :blocked_domains
|
|
55
|
+
#
|
|
56
|
+
# @option args [Integer, nil] :max_content_tokens
|
|
57
|
+
#
|
|
58
|
+
# @option args [Anthropic::Models::Beta::BetaManagedAgentsUserLocation, nil] :user_location Approximate user location for search result localization.
|
|
59
|
+
#
|
|
60
|
+
# @raise [ArgumentError]
|
|
61
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfig, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfig]
|
|
62
|
+
def self.new(type:, **args)
|
|
63
|
+
case type.to_sym
|
|
64
|
+
when :bash
|
|
65
|
+
Anthropic::Beta::BetaManagedAgentsBashToolConfig.new(**args)
|
|
66
|
+
when :edit
|
|
67
|
+
Anthropic::Beta::BetaManagedAgentsEditToolConfig.new(**args)
|
|
68
|
+
when :read
|
|
69
|
+
Anthropic::Beta::BetaManagedAgentsReadToolConfig.new(**args)
|
|
70
|
+
when :write
|
|
71
|
+
Anthropic::Beta::BetaManagedAgentsWriteToolConfig.new(**args)
|
|
72
|
+
when :glob
|
|
73
|
+
Anthropic::Beta::BetaManagedAgentsGlobToolConfig.new(**args)
|
|
74
|
+
when :grep
|
|
75
|
+
Anthropic::Beta::BetaManagedAgentsGrepToolConfig.new(**args)
|
|
76
|
+
when :web_fetch
|
|
77
|
+
Anthropic::Beta::BetaManagedAgentsWebFetchToolConfig.new(**args)
|
|
78
|
+
when :web_search
|
|
79
|
+
Anthropic::Beta::BetaManagedAgentsWebSearchToolConfig.new(**args)
|
|
80
|
+
else
|
|
81
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
88
82
|
end
|
|
89
83
|
end
|
|
90
84
|
end
|
|
@@ -3,95 +3,86 @@
|
|
|
3
3
|
module Anthropic
|
|
4
4
|
module Models
|
|
5
5
|
module Beta
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
#
|
|
10
|
-
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams::Name]
|
|
11
|
-
required :name, enum: -> { Anthropic::Beta::BetaManagedAgentsAgentToolConfigParams::Name }
|
|
6
|
+
# Configuration override for a specific tool within a toolset.
|
|
7
|
+
module BetaManagedAgentsAgentToolConfigParams
|
|
8
|
+
extend Anthropic::Internal::Type::Union
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
# Whether this tool is enabled and available to Claude. Overrides the
|
|
15
|
-
# default_config setting.
|
|
16
|
-
#
|
|
17
|
-
# @return [Boolean, nil]
|
|
18
|
-
optional :enabled, Anthropic::Internal::Type::Boolean, nil?: true
|
|
10
|
+
discriminator :type
|
|
19
11
|
|
|
20
|
-
#
|
|
21
|
-
|
|
22
|
-
#
|
|
23
|
-
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, nil]
|
|
24
|
-
optional :permission_policy,
|
|
25
|
-
union: -> { Anthropic::Beta::BetaManagedAgentsAgentToolConfigParams::PermissionPolicy },
|
|
26
|
-
nil?: true
|
|
12
|
+
# Configuration override for the bash tool.
|
|
13
|
+
variant :bash, -> { Anthropic::Beta::BetaManagedAgentsBashToolConfigParams }
|
|
27
14
|
|
|
28
|
-
#
|
|
29
|
-
|
|
30
|
-
#
|
|
31
|
-
# Some parameter documentations has been truncated, see
|
|
32
|
-
# {Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams} for more
|
|
33
|
-
# details.
|
|
34
|
-
#
|
|
35
|
-
# @param name [Symbol, Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams::Name] Built-in agent tool identifier.
|
|
36
|
-
#
|
|
37
|
-
# @param enabled [Boolean, nil] Whether this tool is enabled and available to Claude. Overrides the default_conf
|
|
38
|
-
#
|
|
39
|
-
# @param permission_policy [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, nil] Permission policy for tool execution.
|
|
15
|
+
# Configuration override for the edit tool.
|
|
16
|
+
variant :edit, -> { Anthropic::Beta::BetaManagedAgentsEditToolConfigParams }
|
|
40
17
|
|
|
41
|
-
#
|
|
42
|
-
|
|
43
|
-
# @see Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams#name
|
|
44
|
-
module Name
|
|
45
|
-
extend Anthropic::Internal::Type::Enum
|
|
18
|
+
# Configuration override for the read tool.
|
|
19
|
+
variant :read, -> { Anthropic::Beta::BetaManagedAgentsReadToolConfigParams }
|
|
46
20
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
READ = :read
|
|
50
|
-
WRITE = :write
|
|
51
|
-
GLOB = :glob
|
|
52
|
-
GREP = :grep
|
|
53
|
-
WEB_FETCH = :web_fetch
|
|
54
|
-
WEB_SEARCH = :web_search
|
|
21
|
+
# Configuration override for the write tool.
|
|
22
|
+
variant :write, -> { Anthropic::Beta::BetaManagedAgentsWriteToolConfigParams }
|
|
55
23
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
end
|
|
59
|
-
|
|
60
|
-
# Permission policy for tool execution.
|
|
61
|
-
#
|
|
62
|
-
# @see Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams#permission_policy
|
|
63
|
-
module PermissionPolicy
|
|
64
|
-
extend Anthropic::Internal::Type::Union
|
|
24
|
+
# Configuration override for the glob tool.
|
|
25
|
+
variant :glob, -> { Anthropic::Beta::BetaManagedAgentsGlobToolConfigParams }
|
|
65
26
|
|
|
66
|
-
|
|
27
|
+
# Configuration override for the grep tool.
|
|
28
|
+
variant :grep, -> { Anthropic::Beta::BetaManagedAgentsGrepToolConfigParams }
|
|
67
29
|
|
|
68
|
-
|
|
69
|
-
|
|
30
|
+
# Configuration override for the web_fetch tool.
|
|
31
|
+
variant :web_fetch, -> { Anthropic::Beta::BetaManagedAgentsWebFetchToolConfigParams }
|
|
70
32
|
|
|
71
|
-
|
|
72
|
-
|
|
33
|
+
# Configuration override for the web_search tool.
|
|
34
|
+
variant :web_search, -> { Anthropic::Beta::BetaManagedAgentsWebSearchToolConfigParams }
|
|
73
35
|
|
|
74
|
-
|
|
75
|
-
|
|
36
|
+
# @!method self.variants
|
|
37
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams)]
|
|
76
38
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
39
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
40
|
+
# value, passing the remaining arguments to its constructor.
|
|
41
|
+
#
|
|
42
|
+
# Some parameter documentations has been truncated, see
|
|
43
|
+
# {Anthropic::Models::Beta::BetaManagedAgentsAgentToolConfigParams} for more
|
|
44
|
+
# details.
|
|
45
|
+
#
|
|
46
|
+
# @param type [Symbol, String]
|
|
47
|
+
#
|
|
48
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
49
|
+
#
|
|
50
|
+
# @option args [Boolean, nil] :enabled Whether this tool is enabled and available to Claude. Overrides the default_conf
|
|
51
|
+
#
|
|
52
|
+
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, nil] :permission_policy Permission policy for tool execution.
|
|
53
|
+
#
|
|
54
|
+
# @option args [Symbol, :bash, Symbol, :edit, Symbol, :read, Symbol, :write, Symbol, :glob, Symbol, :grep, Symbol, :web_fetch, Symbol, :web_search] :name Must be "bash".
|
|
55
|
+
#
|
|
56
|
+
# @option args [Array<String>] :allowed_domains Only fetch URLs whose host is one of these domains or a subdomain of one. Each e
|
|
57
|
+
#
|
|
58
|
+
# @option args [Array<String>] :blocked_domains Never fetch URLs whose host is one of these domains or a subdomain of one. Each
|
|
59
|
+
#
|
|
60
|
+
# @option args [Integer, nil] :max_content_tokens Maximum number of tokens of fetched text content to include in context per call.
|
|
61
|
+
#
|
|
62
|
+
# @option args [Anthropic::Models::Beta::BetaManagedAgentsUserLocation, nil] :user_location Approximate user location for search result localization.
|
|
63
|
+
#
|
|
64
|
+
# @raise [ArgumentError]
|
|
65
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams]
|
|
66
|
+
def self.new(type:, **args)
|
|
67
|
+
case type.to_sym
|
|
68
|
+
when :bash
|
|
69
|
+
Anthropic::Beta::BetaManagedAgentsBashToolConfigParams.new(**args)
|
|
70
|
+
when :edit
|
|
71
|
+
Anthropic::Beta::BetaManagedAgentsEditToolConfigParams.new(**args)
|
|
72
|
+
when :read
|
|
73
|
+
Anthropic::Beta::BetaManagedAgentsReadToolConfigParams.new(**args)
|
|
74
|
+
when :write
|
|
75
|
+
Anthropic::Beta::BetaManagedAgentsWriteToolConfigParams.new(**args)
|
|
76
|
+
when :glob
|
|
77
|
+
Anthropic::Beta::BetaManagedAgentsGlobToolConfigParams.new(**args)
|
|
78
|
+
when :grep
|
|
79
|
+
Anthropic::Beta::BetaManagedAgentsGrepToolConfigParams.new(**args)
|
|
80
|
+
when :web_fetch
|
|
81
|
+
Anthropic::Beta::BetaManagedAgentsWebFetchToolConfigParams.new(**args)
|
|
82
|
+
when :web_search
|
|
83
|
+
Anthropic::Beta::BetaManagedAgentsWebSearchToolConfigParams.new(**args)
|
|
84
|
+
else
|
|
85
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
95
86
|
end
|
|
96
87
|
end
|
|
97
88
|
end
|
|
@@ -6,9 +6,9 @@ module Anthropic
|
|
|
6
6
|
class BetaManagedAgentsAgentToolset20260401 < Anthropic::Internal::Type::BaseModel
|
|
7
7
|
# @!attribute configs
|
|
8
8
|
#
|
|
9
|
-
# @return [Array<Anthropic::Models::Beta::
|
|
9
|
+
# @return [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfig, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfig>]
|
|
10
10
|
required :configs,
|
|
11
|
-
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaManagedAgentsAgentToolConfig] }
|
|
11
|
+
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaManagedAgentsAgentToolConfig] }
|
|
12
12
|
|
|
13
13
|
# @!attribute default_config
|
|
14
14
|
# Resolved default configuration for agent tools.
|
|
@@ -22,7 +22,7 @@ module Anthropic
|
|
|
22
22
|
required :type, enum: -> { Anthropic::Beta::BetaManagedAgentsAgentToolset20260401::Type }
|
|
23
23
|
|
|
24
24
|
# @!method initialize(configs:, default_config:, type:)
|
|
25
|
-
# @param configs [Array<Anthropic::Models::Beta::
|
|
25
|
+
# @param configs [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfig, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfig, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfig, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfig>]
|
|
26
26
|
#
|
|
27
27
|
# @param default_config [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfig] Resolved default configuration for agent tools.
|
|
28
28
|
#
|
|
@@ -12,9 +12,9 @@ module Anthropic
|
|
|
12
12
|
# @!attribute configs
|
|
13
13
|
# Per-tool configuration overrides.
|
|
14
14
|
#
|
|
15
|
-
# @return [Array<Anthropic::Models::Beta::
|
|
15
|
+
# @return [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams>, nil]
|
|
16
16
|
optional :configs,
|
|
17
|
-
-> { Anthropic::Internal::Type::ArrayOf[Anthropic::Beta::BetaManagedAgentsAgentToolConfigParams] }
|
|
17
|
+
-> { Anthropic::Internal::Type::ArrayOf[union: Anthropic::Beta::BetaManagedAgentsAgentToolConfigParams] }
|
|
18
18
|
|
|
19
19
|
# @!attribute default_config
|
|
20
20
|
# Default configuration for all tools in a toolset.
|
|
@@ -30,7 +30,7 @@ module Anthropic
|
|
|
30
30
|
#
|
|
31
31
|
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsAgentToolset20260401Params::Type]
|
|
32
32
|
#
|
|
33
|
-
# @param configs [Array<Anthropic::Models::Beta::
|
|
33
|
+
# @param configs [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams>] Per-tool configuration overrides.
|
|
34
34
|
#
|
|
35
35
|
# @param default_config [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfigParams, nil] Default configuration for all tools in a toolset.
|
|
36
36
|
|
|
@@ -142,7 +142,7 @@ module Anthropic
|
|
|
142
142
|
#
|
|
143
143
|
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
144
144
|
#
|
|
145
|
-
# @option args [Array<Anthropic::Models::Beta::
|
|
145
|
+
# @option args [Array<Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsEditToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsReadToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWriteToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGlobToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsGrepToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebFetchToolConfigParams, Anthropic::Models::Beta::BetaManagedAgentsWebSearchToolConfigParams>, Array<Anthropic::Models::Beta::BetaManagedAgentsMCPToolConfigParams>] :configs Per-tool configuration overrides.
|
|
146
146
|
#
|
|
147
147
|
# @option args [Anthropic::Models::Beta::BetaManagedAgentsAgentToolsetDefaultConfigParams, nil, Anthropic::Models::Beta::BetaManagedAgentsMCPToolsetDefaultConfigParams, nil] :default_config Default configuration for all tools in a toolset.
|
|
148
148
|
#
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsBashToolConfig < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute enabled
|
|
8
|
+
#
|
|
9
|
+
# @return [Boolean]
|
|
10
|
+
required :enabled, Anthropic::Internal::Type::Boolean
|
|
11
|
+
|
|
12
|
+
# @!attribute name
|
|
13
|
+
#
|
|
14
|
+
# @return [Symbol, :bash]
|
|
15
|
+
required :name, const: :bash
|
|
16
|
+
|
|
17
|
+
# @!attribute permission_policy
|
|
18
|
+
# Permission policy for tool execution.
|
|
19
|
+
#
|
|
20
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy]
|
|
21
|
+
required :permission_policy,
|
|
22
|
+
union: -> { Anthropic::Beta::BetaManagedAgentsBashToolConfig::PermissionPolicy }
|
|
23
|
+
|
|
24
|
+
# @!attribute type
|
|
25
|
+
#
|
|
26
|
+
# @return [Symbol, :bash]
|
|
27
|
+
required :type, const: :bash
|
|
28
|
+
|
|
29
|
+
# @!method initialize(enabled:, permission_policy:, name: :bash, type: :bash)
|
|
30
|
+
# Configuration for the bash tool.
|
|
31
|
+
#
|
|
32
|
+
# @param enabled [Boolean]
|
|
33
|
+
#
|
|
34
|
+
# @param permission_policy [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy] Permission policy for tool execution.
|
|
35
|
+
#
|
|
36
|
+
# @param name [Symbol, :bash]
|
|
37
|
+
#
|
|
38
|
+
# @param type [Symbol, :bash]
|
|
39
|
+
|
|
40
|
+
# Permission policy for tool execution.
|
|
41
|
+
#
|
|
42
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsBashToolConfig#permission_policy
|
|
43
|
+
module PermissionPolicy
|
|
44
|
+
extend Anthropic::Internal::Type::Union
|
|
45
|
+
|
|
46
|
+
discriminator :type
|
|
47
|
+
|
|
48
|
+
# Tool calls are automatically approved without user confirmation.
|
|
49
|
+
variant :always_allow, -> { Anthropic::Beta::BetaManagedAgentsAlwaysAllowPolicy }
|
|
50
|
+
|
|
51
|
+
# Tool calls require user confirmation before execution.
|
|
52
|
+
variant :always_ask, -> { Anthropic::Beta::BetaManagedAgentsAlwaysAskPolicy }
|
|
53
|
+
|
|
54
|
+
# @!method self.variants
|
|
55
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy)]
|
|
56
|
+
|
|
57
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
58
|
+
# value, passing the remaining arguments to its constructor.
|
|
59
|
+
#
|
|
60
|
+
# @param type [Symbol, String]
|
|
61
|
+
#
|
|
62
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
63
|
+
#
|
|
64
|
+
# @raise [ArgumentError]
|
|
65
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy]
|
|
66
|
+
def self.new(type:, **args)
|
|
67
|
+
case type.to_sym
|
|
68
|
+
when :always_allow
|
|
69
|
+
Anthropic::Beta::BetaManagedAgentsAlwaysAllowPolicy.new(**args)
|
|
70
|
+
when :always_ask
|
|
71
|
+
Anthropic::Beta::BetaManagedAgentsAlwaysAskPolicy.new(**args)
|
|
72
|
+
else
|
|
73
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
74
|
+
end
|
|
75
|
+
end
|
|
76
|
+
end
|
|
77
|
+
end
|
|
78
|
+
end
|
|
79
|
+
|
|
80
|
+
BetaManagedAgentsBashToolConfig = Beta::BetaManagedAgentsBashToolConfig
|
|
81
|
+
end
|
|
82
|
+
end
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Anthropic
|
|
4
|
+
module Models
|
|
5
|
+
module Beta
|
|
6
|
+
class BetaManagedAgentsBashToolConfigParams < Anthropic::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute name
|
|
8
|
+
# Must be "bash".
|
|
9
|
+
#
|
|
10
|
+
# @return [Symbol, :bash]
|
|
11
|
+
required :name, const: :bash
|
|
12
|
+
|
|
13
|
+
# @!attribute enabled
|
|
14
|
+
# Whether this tool is enabled and available to Claude. Overrides the
|
|
15
|
+
# default_config setting.
|
|
16
|
+
#
|
|
17
|
+
# @return [Boolean, nil]
|
|
18
|
+
optional :enabled, Anthropic::Internal::Type::Boolean, nil?: true
|
|
19
|
+
|
|
20
|
+
# @!attribute permission_policy
|
|
21
|
+
# Permission policy for tool execution.
|
|
22
|
+
#
|
|
23
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, nil]
|
|
24
|
+
optional :permission_policy,
|
|
25
|
+
union: -> { Anthropic::Beta::BetaManagedAgentsBashToolConfigParams::PermissionPolicy },
|
|
26
|
+
nil?: true
|
|
27
|
+
|
|
28
|
+
# @!attribute type
|
|
29
|
+
#
|
|
30
|
+
# @return [Symbol, Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams::Type, nil]
|
|
31
|
+
optional :type, enum: -> { Anthropic::Beta::BetaManagedAgentsBashToolConfigParams::Type }
|
|
32
|
+
|
|
33
|
+
# @!method initialize(enabled: nil, permission_policy: nil, type: nil, name: :bash)
|
|
34
|
+
# Configuration override for the bash tool.
|
|
35
|
+
#
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams} for more
|
|
38
|
+
# details.
|
|
39
|
+
#
|
|
40
|
+
# @param enabled [Boolean, nil] Whether this tool is enabled and available to Claude. Overrides the default_conf
|
|
41
|
+
#
|
|
42
|
+
# @param permission_policy [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy, nil] Permission policy for tool execution.
|
|
43
|
+
#
|
|
44
|
+
# @param type [Symbol, Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams::Type]
|
|
45
|
+
#
|
|
46
|
+
# @param name [Symbol, :bash] Must be "bash".
|
|
47
|
+
|
|
48
|
+
# Permission policy for tool execution.
|
|
49
|
+
#
|
|
50
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams#permission_policy
|
|
51
|
+
module PermissionPolicy
|
|
52
|
+
extend Anthropic::Internal::Type::Union
|
|
53
|
+
|
|
54
|
+
discriminator :type
|
|
55
|
+
|
|
56
|
+
# Tool calls are automatically approved without user confirmation.
|
|
57
|
+
variant :always_allow, -> { Anthropic::Beta::BetaManagedAgentsAlwaysAllowPolicy }
|
|
58
|
+
|
|
59
|
+
# Tool calls require user confirmation before execution.
|
|
60
|
+
variant :always_ask, -> { Anthropic::Beta::BetaManagedAgentsAlwaysAskPolicy }
|
|
61
|
+
|
|
62
|
+
# @!method self.variants
|
|
63
|
+
# @return [Array(Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy)]
|
|
64
|
+
|
|
65
|
+
# Creates a new instance of the variant class whose `type` matches the given
|
|
66
|
+
# value, passing the remaining arguments to its constructor.
|
|
67
|
+
#
|
|
68
|
+
# @param type [Symbol, String]
|
|
69
|
+
#
|
|
70
|
+
# @param args [Hash{Symbol=>Object}] Attributes for the chosen variant.
|
|
71
|
+
#
|
|
72
|
+
# @raise [ArgumentError]
|
|
73
|
+
# @return [Anthropic::Models::Beta::BetaManagedAgentsAlwaysAllowPolicy, Anthropic::Models::Beta::BetaManagedAgentsAlwaysAskPolicy]
|
|
74
|
+
def self.new(type:, **args)
|
|
75
|
+
case type.to_sym
|
|
76
|
+
when :always_allow
|
|
77
|
+
Anthropic::Beta::BetaManagedAgentsAlwaysAllowPolicy.new(**args)
|
|
78
|
+
when :always_ask
|
|
79
|
+
Anthropic::Beta::BetaManagedAgentsAlwaysAskPolicy.new(**args)
|
|
80
|
+
else
|
|
81
|
+
raise ArgumentError, "unknown type: #{type}"
|
|
82
|
+
end
|
|
83
|
+
end
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
# @see Anthropic::Models::Beta::BetaManagedAgentsBashToolConfigParams#type
|
|
87
|
+
module Type
|
|
88
|
+
extend Anthropic::Internal::Type::Enum
|
|
89
|
+
|
|
90
|
+
BASH = :bash
|
|
91
|
+
|
|
92
|
+
# @!method self.values
|
|
93
|
+
# @return [Array<Symbol>]
|
|
94
|
+
end
|
|
95
|
+
end
|
|
96
|
+
end
|
|
97
|
+
|
|
98
|
+
BetaManagedAgentsBashToolConfigParams = Beta::BetaManagedAgentsBashToolConfigParams
|
|
99
|
+
end
|
|
100
|
+
end
|