cadenya 0.16.0 → 0.18.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 +16 -0
- data/README.md +1 -1
- data/lib/cadenya/models/ai_provider_key.rb +17 -3
- data/lib/cadenya/models/ai_provider_key_list_params.rb +11 -1
- data/lib/cadenya/models/model.rb +13 -23
- data/lib/cadenya/models/model_list_params.rb +11 -1
- data/lib/cadenya/models/model_swap_params.rb +11 -1
- data/lib/cadenya/models/objectives/objective_tool_call_data.rb +11 -1
- data/lib/cadenya/models/objectives/objective_tool_call_info.rb +27 -1
- data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +11 -1
- data/lib/cadenya/models/objectives/resolved_secret.rb +43 -0
- data/lib/cadenya/models/tool_sets/secret_create_params.rb +50 -0
- data/lib/cadenya/models/tool_sets/secret_delete_params.rb +34 -0
- data/lib/cadenya/models/tool_sets/secret_list_params.rb +86 -0
- data/lib/cadenya/models/tool_sets/secret_retrieve_params.rb +34 -0
- data/lib/cadenya/models/tool_sets/secret_update_params.rb +65 -0
- data/lib/cadenya/models/tool_sets/tool_set_secret.rb +41 -0
- data/lib/cadenya/models/tool_sets/tool_set_secret_info.rb +34 -0
- data/lib/cadenya/models/tool_sets/tool_set_secret_spec.rb +19 -0
- data/lib/cadenya/resources/ai_provider_keys.rb +3 -1
- data/lib/cadenya/resources/models.rb +4 -1
- data/lib/cadenya/resources/tool_sets/secrets.rb +224 -0
- data/lib/cadenya/resources/tool_sets.rb +9 -0
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +10 -0
- data/rbi/cadenya/models/ai_provider_key.rbi +23 -5
- data/rbi/cadenya/models/ai_provider_key_list_params.rbi +15 -0
- data/rbi/cadenya/models/model.rbi +21 -43
- data/rbi/cadenya/models/model_list_params.rbi +15 -0
- data/rbi/cadenya/models/model_swap_params.rbi +21 -4
- data/rbi/cadenya/models/objectives/objective_tool_call_data.rbi +19 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_info.rbi +45 -3
- data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +19 -0
- data/rbi/cadenya/models/objectives/resolved_secret.rbi +104 -0
- data/rbi/cadenya/models/tool_sets/secret_create_params.rbi +76 -0
- data/rbi/cadenya/models/tool_sets/secret_delete_params.rbi +53 -0
- data/rbi/cadenya/models/tool_sets/secret_list_params.rbi +129 -0
- data/rbi/cadenya/models/tool_sets/secret_retrieve_params.rbi +53 -0
- data/rbi/cadenya/models/tool_sets/secret_update_params.rbi +93 -0
- data/rbi/cadenya/models/tool_sets/tool_set_secret.rbi +64 -0
- data/rbi/cadenya/models/tool_sets/tool_set_secret_info.rbi +55 -0
- data/rbi/cadenya/models/tool_sets/tool_set_secret_spec.rbi +33 -0
- data/rbi/cadenya/resources/ai_provider_keys.rbi +5 -0
- data/rbi/cadenya/resources/models.rbi +5 -0
- data/rbi/cadenya/resources/tool_sets/secrets.rbi +164 -0
- data/rbi/cadenya/resources/tool_sets.rbi +8 -0
- data/sig/cadenya/models/ai_provider_key.rbs +13 -3
- data/sig/cadenya/models/ai_provider_key_list_params.rbs +7 -0
- data/sig/cadenya/models/model.rbs +10 -25
- data/sig/cadenya/models/model_list_params.rbs +7 -0
- data/sig/cadenya/models/model_swap_params.rbs +16 -2
- data/sig/cadenya/models/objectives/objective_tool_call_data.rbs +9 -0
- data/sig/cadenya/models/objectives/objective_tool_call_info.rbs +20 -3
- data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +9 -0
- data/sig/cadenya/models/objectives/resolved_secret.rbs +50 -0
- data/sig/cadenya/models/tool_sets/secret_create_params.rbs +43 -0
- data/sig/cadenya/models/tool_sets/secret_delete_params.rbs +34 -0
- data/sig/cadenya/models/tool_sets/secret_list_params.rbs +82 -0
- data/sig/cadenya/models/tool_sets/secret_retrieve_params.rbs +34 -0
- data/sig/cadenya/models/tool_sets/secret_update_params.rbs +63 -0
- data/sig/cadenya/models/tool_sets/tool_set_secret.rbs +38 -0
- data/sig/cadenya/models/tool_sets/tool_set_secret_info.rbs +27 -0
- data/sig/cadenya/models/tool_sets/tool_set_secret_spec.rbs +19 -0
- data/sig/cadenya/resources/ai_provider_keys.rbs +1 -0
- data/sig/cadenya/resources/models.rbs +1 -0
- data/sig/cadenya/resources/tool_sets/secrets.rbs +54 -0
- data/sig/cadenya/resources/tool_sets.rbs +2 -0
- metadata +32 -2
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
# @see Cadenya::Resources::ToolSets::Secrets#create
|
|
7
|
+
class ToolSetSecret < Cadenya::Internal::Type::BaseModel
|
|
8
|
+
# @!attribute metadata
|
|
9
|
+
# Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
10
|
+
#
|
|
11
|
+
# @return [Cadenya::Models::ResourceMetadata]
|
|
12
|
+
required :metadata, -> { Cadenya::ResourceMetadata }
|
|
13
|
+
|
|
14
|
+
# @!attribute spec
|
|
15
|
+
#
|
|
16
|
+
# @return [Cadenya::Models::ToolSets::ToolSetSecretSpec]
|
|
17
|
+
required :spec, -> { Cadenya::ToolSets::ToolSetSecretSpec }
|
|
18
|
+
|
|
19
|
+
response_only do
|
|
20
|
+
# @!attribute info
|
|
21
|
+
# Tool set secret information
|
|
22
|
+
#
|
|
23
|
+
# @return [Cadenya::Models::ToolSets::ToolSetSecretInfo, nil]
|
|
24
|
+
optional :info, -> { Cadenya::ToolSets::ToolSetSecretInfo }
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# @!method initialize(metadata:, spec:, info: nil)
|
|
28
|
+
# Some parameter documentations has been truncated, see
|
|
29
|
+
# {Cadenya::Models::ToolSets::ToolSetSecret} for more details.
|
|
30
|
+
#
|
|
31
|
+
# @param metadata [Cadenya::Models::ResourceMetadata] Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
|
|
32
|
+
#
|
|
33
|
+
# @param spec [Cadenya::Models::ToolSets::ToolSetSecretSpec]
|
|
34
|
+
#
|
|
35
|
+
# @param info [Cadenya::Models::ToolSets::ToolSetSecretInfo] Tool set secret information
|
|
36
|
+
end
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
ToolSetSecret = ToolSets::ToolSetSecret
|
|
40
|
+
end
|
|
41
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
class ToolSetSecretInfo < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute created_by
|
|
8
|
+
# A profile identifies a user or non-human principal (such as an API key) at the
|
|
9
|
+
# account level. Profiles are account-scoped and can be granted access to multiple
|
|
10
|
+
# workspaces.
|
|
11
|
+
#
|
|
12
|
+
# @return [Cadenya::Models::Profile, nil]
|
|
13
|
+
optional :created_by, -> { Cadenya::Profile }, api_name: :createdBy
|
|
14
|
+
|
|
15
|
+
response_only do
|
|
16
|
+
# @!attribute last_used_at
|
|
17
|
+
#
|
|
18
|
+
# @return [Time, nil]
|
|
19
|
+
optional :last_used_at, Time, api_name: :lastUsedAt
|
|
20
|
+
end
|
|
21
|
+
|
|
22
|
+
# @!method initialize(created_by: nil, last_used_at: nil)
|
|
23
|
+
# Some parameter documentations has been truncated, see
|
|
24
|
+
# {Cadenya::Models::ToolSets::ToolSetSecretInfo} for more details.
|
|
25
|
+
#
|
|
26
|
+
# @param created_by [Cadenya::Models::Profile] A profile identifies a user or non-human principal (such as an API key)
|
|
27
|
+
#
|
|
28
|
+
# @param last_used_at [Time]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
ToolSetSecretInfo = ToolSets::ToolSetSecretInfo
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
class ToolSetSecretSpec < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute value
|
|
8
|
+
#
|
|
9
|
+
# @return [String, nil]
|
|
10
|
+
optional :value, String
|
|
11
|
+
|
|
12
|
+
# @!method initialize(value: nil)
|
|
13
|
+
# @param value [String]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
ToolSetSecretSpec = ToolSets::ToolSetSecretSpec
|
|
18
|
+
end
|
|
19
|
+
end
|
|
@@ -101,7 +101,7 @@ module Cadenya
|
|
|
101
101
|
#
|
|
102
102
|
# Lists all customer-provided AI provider keys in the workspace
|
|
103
103
|
#
|
|
104
|
-
# @overload list(workspace_id, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
|
|
104
|
+
# @overload list(workspace_id, cursor: nil, include_info: nil, limit: nil, prefix: nil, promotional: nil, query: nil, sort_order: nil, request_options: {})
|
|
105
105
|
#
|
|
106
106
|
# @param workspace_id [String] The workspace whose keys will be listed.
|
|
107
107
|
#
|
|
@@ -113,6 +113,8 @@ module Cadenya
|
|
|
113
113
|
#
|
|
114
114
|
# @param prefix [String] Filter expression (query param: prefix)
|
|
115
115
|
#
|
|
116
|
+
# @param promotional [Boolean] When true, return only promotional keys (provided by Cadenya, e.g. for
|
|
117
|
+
#
|
|
116
118
|
# @param query [String] Free-form search query
|
|
117
119
|
#
|
|
118
120
|
# @param sort_order [String] Sort order for results (asc or desc by creation time)
|
|
@@ -38,7 +38,7 @@ module Cadenya
|
|
|
38
38
|
#
|
|
39
39
|
# Lists all models in the workspace
|
|
40
40
|
#
|
|
41
|
-
# @overload list(workspace_id, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
|
|
41
|
+
# @overload list(workspace_id, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, is_assigned: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
|
|
42
42
|
#
|
|
43
43
|
# @param workspace_id [String] Workspace ID.
|
|
44
44
|
#
|
|
@@ -50,6 +50,8 @@ module Cadenya
|
|
|
50
50
|
#
|
|
51
51
|
# @param include_info [Boolean] When true, populate each item's info (e.g. the AI provider), at the cost of
|
|
52
52
|
#
|
|
53
|
+
# @param is_assigned [Boolean] Filter models to only ones assigned to an active agent variation/agent.
|
|
54
|
+
#
|
|
53
55
|
# @param limit [Integer] Maximum number of results to return
|
|
54
56
|
#
|
|
55
57
|
# @param prefix [String] Filter by name prefix
|
|
@@ -75,6 +77,7 @@ module Cadenya
|
|
|
75
77
|
ai_provider_key_id: "aiProviderKeyId",
|
|
76
78
|
bundle_key: "bundleKey",
|
|
77
79
|
include_info: "includeInfo",
|
|
80
|
+
is_assigned: "isAssigned",
|
|
78
81
|
sort_order: "sortOrder"
|
|
79
82
|
),
|
|
80
83
|
page: Cadenya::Internal::CursorPagination,
|
|
@@ -0,0 +1,224 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Resources
|
|
5
|
+
class ToolSets
|
|
6
|
+
# Manage tool sets and the tools they contain. Tool sets group related tools, and
|
|
7
|
+
# tools define specific capabilities available to agents.
|
|
8
|
+
#
|
|
9
|
+
# When a tool set is managed, only API key actors can modify its tools; human
|
|
10
|
+
# (profile) actors cannot.
|
|
11
|
+
class Secrets
|
|
12
|
+
# Some parameter documentations has been truncated, see
|
|
13
|
+
# {Cadenya::Models::ToolSets::SecretCreateParams} for more details.
|
|
14
|
+
#
|
|
15
|
+
# Creates a new secret scoped to the tool set
|
|
16
|
+
#
|
|
17
|
+
# @overload create(tool_set_id, workspace_id:, metadata:, spec:, request_options: {})
|
|
18
|
+
#
|
|
19
|
+
# @param tool_set_id [String] Path param: The tool set that will own this secret. Accepts the canonical ts\_…
|
|
20
|
+
# f
|
|
21
|
+
#
|
|
22
|
+
# @param workspace_id [String] Path param: The workspace that owns the tool set.
|
|
23
|
+
#
|
|
24
|
+
# @param metadata [Cadenya::Models::CreateResourceMetadata] Body param: CreateResourceMetadata contains the user-provided fields for creatin
|
|
25
|
+
#
|
|
26
|
+
# @param spec [Cadenya::Models::ToolSets::ToolSetSecretSpec] Body param
|
|
27
|
+
#
|
|
28
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
29
|
+
#
|
|
30
|
+
# @return [Cadenya::Models::ToolSets::ToolSetSecret]
|
|
31
|
+
#
|
|
32
|
+
# @see Cadenya::Models::ToolSets::SecretCreateParams
|
|
33
|
+
def create(tool_set_id, params)
|
|
34
|
+
parsed, options = Cadenya::ToolSets::SecretCreateParams.dump_request(params)
|
|
35
|
+
workspace_id =
|
|
36
|
+
parsed.delete(:workspace_id) do
|
|
37
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
38
|
+
end
|
|
39
|
+
@client.request(
|
|
40
|
+
method: :post,
|
|
41
|
+
path: ["v1/workspaces/%1$s/tool_sets/%2$s/secrets", workspace_id, tool_set_id],
|
|
42
|
+
body: parsed,
|
|
43
|
+
model: Cadenya::ToolSets::ToolSetSecret,
|
|
44
|
+
options: options
|
|
45
|
+
)
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Some parameter documentations has been truncated, see
|
|
49
|
+
# {Cadenya::Models::ToolSets::SecretRetrieveParams} for more details.
|
|
50
|
+
#
|
|
51
|
+
# Retrieves a tool set secret by ID from the tool set
|
|
52
|
+
#
|
|
53
|
+
# @overload retrieve(id, workspace_id:, tool_set_id:, request_options: {})
|
|
54
|
+
#
|
|
55
|
+
# @param id [String] The secret to retrieve.
|
|
56
|
+
#
|
|
57
|
+
# @param workspace_id [String] The workspace that owns the tool set.
|
|
58
|
+
#
|
|
59
|
+
# @param tool_set_id [String] The tool set the secret belongs to. Accepts the canonical ts\_… form
|
|
60
|
+
#
|
|
61
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
62
|
+
#
|
|
63
|
+
# @return [Cadenya::Models::ToolSets::ToolSetSecret]
|
|
64
|
+
#
|
|
65
|
+
# @see Cadenya::Models::ToolSets::SecretRetrieveParams
|
|
66
|
+
def retrieve(id, params)
|
|
67
|
+
parsed, options = Cadenya::ToolSets::SecretRetrieveParams.dump_request(params)
|
|
68
|
+
workspace_id =
|
|
69
|
+
parsed.delete(:workspace_id) do
|
|
70
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
71
|
+
end
|
|
72
|
+
tool_set_id =
|
|
73
|
+
parsed.delete(:tool_set_id) do
|
|
74
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
75
|
+
end
|
|
76
|
+
@client.request(
|
|
77
|
+
method: :get,
|
|
78
|
+
path: ["v1/workspaces/%1$s/tool_sets/%2$s/secrets/%3$s", workspace_id, tool_set_id, id],
|
|
79
|
+
model: Cadenya::ToolSets::ToolSetSecret,
|
|
80
|
+
options: options
|
|
81
|
+
)
|
|
82
|
+
end
|
|
83
|
+
|
|
84
|
+
# Some parameter documentations has been truncated, see
|
|
85
|
+
# {Cadenya::Models::ToolSets::SecretUpdateParams} for more details.
|
|
86
|
+
#
|
|
87
|
+
# Updates a secret scoped to the tool set
|
|
88
|
+
#
|
|
89
|
+
# @overload update(id, workspace_id:, tool_set_id:, metadata: nil, spec: nil, update_mask: nil, request_options: {})
|
|
90
|
+
#
|
|
91
|
+
# @param id [String] Path param: The secret to update.
|
|
92
|
+
#
|
|
93
|
+
# @param workspace_id [String] Path param: The workspace that owns the tool set.
|
|
94
|
+
#
|
|
95
|
+
# @param tool_set_id [String] Path param: The tool set the secret belongs to. Accepts the canonical ts\_… form
|
|
96
|
+
#
|
|
97
|
+
# @param metadata [Cadenya::Models::UpdateResourceMetadata] Body param: UpdateResourceMetadata contains the user-provided fields for updatin
|
|
98
|
+
#
|
|
99
|
+
# @param spec [Cadenya::Models::ToolSets::ToolSetSecretSpec] Body param
|
|
100
|
+
#
|
|
101
|
+
# @param update_mask [String] Body param: Fields to update.
|
|
102
|
+
#
|
|
103
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
104
|
+
#
|
|
105
|
+
# @return [Cadenya::Models::ToolSets::ToolSetSecret]
|
|
106
|
+
#
|
|
107
|
+
# @see Cadenya::Models::ToolSets::SecretUpdateParams
|
|
108
|
+
def update(id, params)
|
|
109
|
+
parsed, options = Cadenya::ToolSets::SecretUpdateParams.dump_request(params)
|
|
110
|
+
workspace_id =
|
|
111
|
+
parsed.delete(:workspace_id) do
|
|
112
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
113
|
+
end
|
|
114
|
+
tool_set_id =
|
|
115
|
+
parsed.delete(:tool_set_id) do
|
|
116
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
117
|
+
end
|
|
118
|
+
@client.request(
|
|
119
|
+
method: :patch,
|
|
120
|
+
path: ["v1/workspaces/%1$s/tool_sets/%2$s/secrets/%3$s", workspace_id, tool_set_id, id],
|
|
121
|
+
body: parsed,
|
|
122
|
+
model: Cadenya::ToolSets::ToolSetSecret,
|
|
123
|
+
options: options
|
|
124
|
+
)
|
|
125
|
+
end
|
|
126
|
+
|
|
127
|
+
# Some parameter documentations has been truncated, see
|
|
128
|
+
# {Cadenya::Models::ToolSets::SecretListParams} for more details.
|
|
129
|
+
#
|
|
130
|
+
# Lists all secrets scoped to the tool set
|
|
131
|
+
#
|
|
132
|
+
# @overload list(tool_set_id, workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
|
|
133
|
+
#
|
|
134
|
+
# @param tool_set_id [String] Path param: The tool set whose secrets will be listed. Accepts the canonical
|
|
135
|
+
# ts\_
|
|
136
|
+
#
|
|
137
|
+
# @param workspace_id [String] Path param: The workspace that owns the tool set.
|
|
138
|
+
#
|
|
139
|
+
# @param bundle_key [String] Query param: Filter by bundle_key — return only resources owned by this bundle.
|
|
140
|
+
#
|
|
141
|
+
# @param cursor [String] Query param: Pagination cursor from previous response
|
|
142
|
+
#
|
|
143
|
+
# @param include_info [Boolean] Query param: When set to true you may use more of your alloted API rate-limit
|
|
144
|
+
#
|
|
145
|
+
# @param limit [Integer] Query param: Maximum number of results to return
|
|
146
|
+
#
|
|
147
|
+
# @param prefix [String] Query param: Filter expression (query param: prefix)
|
|
148
|
+
#
|
|
149
|
+
# @param query [String] Query param: Free-form search query
|
|
150
|
+
#
|
|
151
|
+
# @param sort_order [String] Query param: Sort order for results (asc or desc by creation time)
|
|
152
|
+
#
|
|
153
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
154
|
+
#
|
|
155
|
+
# @return [Cadenya::Internal::CursorPagination<Cadenya::Models::ToolSets::ToolSetSecret>]
|
|
156
|
+
#
|
|
157
|
+
# @see Cadenya::Models::ToolSets::SecretListParams
|
|
158
|
+
def list(tool_set_id, params)
|
|
159
|
+
parsed, options = Cadenya::ToolSets::SecretListParams.dump_request(params)
|
|
160
|
+
query = Cadenya::Internal::Util.encode_query_params(parsed)
|
|
161
|
+
workspace_id =
|
|
162
|
+
parsed.delete(:workspace_id) do
|
|
163
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
164
|
+
end
|
|
165
|
+
@client.request(
|
|
166
|
+
method: :get,
|
|
167
|
+
path: ["v1/workspaces/%1$s/tool_sets/%2$s/secrets", workspace_id, tool_set_id],
|
|
168
|
+
query: query.transform_keys(
|
|
169
|
+
bundle_key: "bundleKey",
|
|
170
|
+
include_info: "includeInfo",
|
|
171
|
+
sort_order: "sortOrder"
|
|
172
|
+
),
|
|
173
|
+
page: Cadenya::Internal::CursorPagination,
|
|
174
|
+
model: Cadenya::ToolSets::ToolSetSecret,
|
|
175
|
+
options: options
|
|
176
|
+
)
|
|
177
|
+
end
|
|
178
|
+
|
|
179
|
+
# Some parameter documentations has been truncated, see
|
|
180
|
+
# {Cadenya::Models::ToolSets::SecretDeleteParams} for more details.
|
|
181
|
+
#
|
|
182
|
+
# Deletes a secret scoped to the tool set
|
|
183
|
+
#
|
|
184
|
+
# @overload delete(id, workspace_id:, tool_set_id:, request_options: {})
|
|
185
|
+
#
|
|
186
|
+
# @param id [String] The secret to delete.
|
|
187
|
+
#
|
|
188
|
+
# @param workspace_id [String] The workspace that owns the tool set.
|
|
189
|
+
#
|
|
190
|
+
# @param tool_set_id [String] The tool set the secret belongs to. Accepts the canonical ts\_… form
|
|
191
|
+
#
|
|
192
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
193
|
+
#
|
|
194
|
+
# @return [nil]
|
|
195
|
+
#
|
|
196
|
+
# @see Cadenya::Models::ToolSets::SecretDeleteParams
|
|
197
|
+
def delete(id, params)
|
|
198
|
+
parsed, options = Cadenya::ToolSets::SecretDeleteParams.dump_request(params)
|
|
199
|
+
workspace_id =
|
|
200
|
+
parsed.delete(:workspace_id) do
|
|
201
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
202
|
+
end
|
|
203
|
+
tool_set_id =
|
|
204
|
+
parsed.delete(:tool_set_id) do
|
|
205
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
206
|
+
end
|
|
207
|
+
@client.request(
|
|
208
|
+
method: :delete,
|
|
209
|
+
path: ["v1/workspaces/%1$s/tool_sets/%2$s/secrets/%3$s", workspace_id, tool_set_id, id],
|
|
210
|
+
model: NilClass,
|
|
211
|
+
options: options
|
|
212
|
+
)
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# @api private
|
|
216
|
+
#
|
|
217
|
+
# @param client [Cadenya::Client]
|
|
218
|
+
def initialize(client:)
|
|
219
|
+
@client = client
|
|
220
|
+
end
|
|
221
|
+
end
|
|
222
|
+
end
|
|
223
|
+
end
|
|
224
|
+
end
|
|
@@ -16,6 +16,14 @@ module Cadenya
|
|
|
16
16
|
# @return [Cadenya::Resources::ToolSets::Tools]
|
|
17
17
|
attr_reader :tools
|
|
18
18
|
|
|
19
|
+
# Manage tool sets and the tools they contain. Tool sets group related tools, and
|
|
20
|
+
# tools define specific capabilities available to agents.
|
|
21
|
+
#
|
|
22
|
+
# When a tool set is managed, only API key actors can modify its tools; human
|
|
23
|
+
# (profile) actors cannot.
|
|
24
|
+
# @return [Cadenya::Resources::ToolSets::Secrets]
|
|
25
|
+
attr_reader :secrets
|
|
26
|
+
|
|
19
27
|
# Some parameter documentations has been truncated, see
|
|
20
28
|
# {Cadenya::Models::ToolSetCreateParams} for more details.
|
|
21
29
|
#
|
|
@@ -333,6 +341,7 @@ module Cadenya
|
|
|
333
341
|
def initialize(client:)
|
|
334
342
|
@client = client
|
|
335
343
|
@tools = Cadenya::Resources::ToolSets::Tools.new(client: client)
|
|
344
|
+
@secrets = Cadenya::Resources::ToolSets::Secrets.new(client: client)
|
|
336
345
|
end
|
|
337
346
|
end
|
|
338
347
|
end
|
data/lib/cadenya/version.rb
CHANGED
data/lib/cadenya.rb
CHANGED
|
@@ -230,6 +230,7 @@ require_relative "cadenya/models/objectives/objective_tool_call_result_content_b
|
|
|
230
230
|
require_relative "cadenya/models/objectives/objective_tool_call_result_image_block"
|
|
231
231
|
require_relative "cadenya/models/objectives/objective_tool_call_result_text_block"
|
|
232
232
|
require_relative "cadenya/models/objectives/objective_tool_call_with_result"
|
|
233
|
+
require_relative "cadenya/models/objectives/resolved_secret"
|
|
233
234
|
require_relative "cadenya/models/objectives/task_list_params"
|
|
234
235
|
require_relative "cadenya/models/objectives/task_retrieve_params"
|
|
235
236
|
require_relative "cadenya/models/objectives/tool_call_approve_params"
|
|
@@ -281,6 +282,11 @@ require_relative "cadenya/models/tool_set_retrieve_params"
|
|
|
281
282
|
require_relative "cadenya/models/tool_sets/config_http"
|
|
282
283
|
require_relative "cadenya/models/tool_sets/config_mcp"
|
|
283
284
|
require_relative "cadenya/models/tool_sets/config_openapi"
|
|
285
|
+
require_relative "cadenya/models/tool_sets/secret_create_params"
|
|
286
|
+
require_relative "cadenya/models/tool_sets/secret_delete_params"
|
|
287
|
+
require_relative "cadenya/models/tool_sets/secret_list_params"
|
|
288
|
+
require_relative "cadenya/models/tool_sets/secret_retrieve_params"
|
|
289
|
+
require_relative "cadenya/models/tool_sets/secret_update_params"
|
|
284
290
|
require_relative "cadenya/models/tool_sets/tool"
|
|
285
291
|
require_relative "cadenya/models/tool_sets/tool_create_params"
|
|
286
292
|
require_relative "cadenya/models/tool_sets/tool_delete_params"
|
|
@@ -289,6 +295,9 @@ require_relative "cadenya/models/tool_sets/tool_list_params"
|
|
|
289
295
|
require_relative "cadenya/models/tool_sets/tool_omit_params"
|
|
290
296
|
require_relative "cadenya/models/tool_sets/tool_restore_params"
|
|
291
297
|
require_relative "cadenya/models/tool_sets/tool_retrieve_params"
|
|
298
|
+
require_relative "cadenya/models/tool_sets/tool_set_secret"
|
|
299
|
+
require_relative "cadenya/models/tool_sets/tool_set_secret_info"
|
|
300
|
+
require_relative "cadenya/models/tool_sets/tool_set_secret_spec"
|
|
292
301
|
require_relative "cadenya/models/tool_sets/tool_spec"
|
|
293
302
|
require_relative "cadenya/models/tool_sets/tool_spec_config"
|
|
294
303
|
require_relative "cadenya/models/tool_sets/tool_update_params"
|
|
@@ -353,6 +362,7 @@ require_relative "cadenya/resources/objectives/tools"
|
|
|
353
362
|
require_relative "cadenya/resources/profiles"
|
|
354
363
|
require_relative "cadenya/resources/search"
|
|
355
364
|
require_relative "cadenya/resources/tool_sets"
|
|
365
|
+
require_relative "cadenya/resources/tool_sets/secrets"
|
|
356
366
|
require_relative "cadenya/resources/tool_sets/tools"
|
|
357
367
|
require_relative "cadenya/resources/uploads"
|
|
358
368
|
require_relative "cadenya/resources/webhooks"
|
|
@@ -29,8 +29,10 @@ module Cadenya
|
|
|
29
29
|
sig { params(info: Cadenya::AIProviderKey::Info::OrHash).void }
|
|
30
30
|
attr_writer :info
|
|
31
31
|
|
|
32
|
-
# AIProviderKey is a
|
|
33
|
-
#
|
|
32
|
+
# AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
|
|
33
|
+
# keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
|
|
34
|
+
# AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
|
|
35
|
+
# account administrators. The secret value is never returned in responses.
|
|
34
36
|
sig do
|
|
35
37
|
params(
|
|
36
38
|
metadata: Cadenya::ResourceMetadata::OrHash,
|
|
@@ -80,25 +82,41 @@ module Cadenya
|
|
|
80
82
|
sig { params(enabled_model_count: Integer).void }
|
|
81
83
|
attr_writer :enabled_model_count
|
|
82
84
|
|
|
85
|
+
# Cadenya includes promotional keys (one for onboarding, and potentially more in
|
|
86
|
+
# the future). These are not added or maintained by account administrators.
|
|
87
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
88
|
+
attr_reader :is_promotional
|
|
89
|
+
|
|
90
|
+
sig { params(is_promotional: T::Boolean).void }
|
|
91
|
+
attr_writer :is_promotional
|
|
92
|
+
|
|
83
93
|
# AIProviderKeyInfo carries server-derived, read-only details about a key, for AI
|
|
84
94
|
# provider management UIs.
|
|
85
95
|
sig do
|
|
86
96
|
params(
|
|
87
97
|
disabled_model_count: Integer,
|
|
88
|
-
enabled_model_count: Integer
|
|
98
|
+
enabled_model_count: Integer,
|
|
99
|
+
is_promotional: T::Boolean
|
|
89
100
|
).returns(T.attached_class)
|
|
90
101
|
end
|
|
91
102
|
def self.new(
|
|
92
103
|
# Number of disabled models provisioned on this key.
|
|
93
104
|
disabled_model_count: nil,
|
|
94
105
|
# Number of enabled models provisioned on this key.
|
|
95
|
-
enabled_model_count: nil
|
|
106
|
+
enabled_model_count: nil,
|
|
107
|
+
# Cadenya includes promotional keys (one for onboarding, and potentially more in
|
|
108
|
+
# the future). These are not added or maintained by account administrators.
|
|
109
|
+
is_promotional: nil
|
|
96
110
|
)
|
|
97
111
|
end
|
|
98
112
|
|
|
99
113
|
sig do
|
|
100
114
|
override.returns(
|
|
101
|
-
{
|
|
115
|
+
{
|
|
116
|
+
disabled_model_count: Integer,
|
|
117
|
+
enabled_model_count: Integer,
|
|
118
|
+
is_promotional: T::Boolean
|
|
119
|
+
}
|
|
102
120
|
)
|
|
103
121
|
end
|
|
104
122
|
def to_hash
|
|
@@ -43,6 +43,15 @@ module Cadenya
|
|
|
43
43
|
sig { params(prefix: String).void }
|
|
44
44
|
attr_writer :prefix
|
|
45
45
|
|
|
46
|
+
# When true, return only promotional keys (provided by Cadenya, e.g. for
|
|
47
|
+
# onboarding). Defaults to returning all keys, customer-provided and promotional
|
|
48
|
+
# alike.
|
|
49
|
+
sig { returns(T.nilable(T::Boolean)) }
|
|
50
|
+
attr_reader :promotional
|
|
51
|
+
|
|
52
|
+
sig { params(promotional: T::Boolean).void }
|
|
53
|
+
attr_writer :promotional
|
|
54
|
+
|
|
46
55
|
# Free-form search query
|
|
47
56
|
sig { returns(T.nilable(String)) }
|
|
48
57
|
attr_reader :query
|
|
@@ -64,6 +73,7 @@ module Cadenya
|
|
|
64
73
|
include_info: T::Boolean,
|
|
65
74
|
limit: Integer,
|
|
66
75
|
prefix: String,
|
|
76
|
+
promotional: T::Boolean,
|
|
67
77
|
query: String,
|
|
68
78
|
sort_order: String,
|
|
69
79
|
request_options: Cadenya::RequestOptions::OrHash
|
|
@@ -80,6 +90,10 @@ module Cadenya
|
|
|
80
90
|
limit: nil,
|
|
81
91
|
# Filter expression (query param: prefix)
|
|
82
92
|
prefix: nil,
|
|
93
|
+
# When true, return only promotional keys (provided by Cadenya, e.g. for
|
|
94
|
+
# onboarding). Defaults to returning all keys, customer-provided and promotional
|
|
95
|
+
# alike.
|
|
96
|
+
promotional: nil,
|
|
83
97
|
# Free-form search query
|
|
84
98
|
query: nil,
|
|
85
99
|
# Sort order for results (asc or desc by creation time)
|
|
@@ -96,6 +110,7 @@ module Cadenya
|
|
|
96
110
|
include_info: T::Boolean,
|
|
97
111
|
limit: Integer,
|
|
98
112
|
prefix: String,
|
|
113
|
+
promotional: T::Boolean,
|
|
99
114
|
query: String,
|
|
100
115
|
sort_order: String,
|
|
101
116
|
request_options: Cadenya::RequestOptions
|
|
@@ -100,36 +100,42 @@ module Cadenya
|
|
|
100
100
|
sig { params(agent_variation_count: Integer).void }
|
|
101
101
|
attr_writer :agent_variation_count
|
|
102
102
|
|
|
103
|
-
#
|
|
104
|
-
|
|
103
|
+
# AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
|
|
104
|
+
# keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
|
|
105
|
+
# AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
|
|
106
|
+
# account administrators. The secret value is never returned in responses.
|
|
107
|
+
sig { returns(T.nilable(Cadenya::AIProviderKey)) }
|
|
105
108
|
attr_reader :ai_provider_key
|
|
106
109
|
|
|
107
|
-
sig { params(ai_provider_key: Cadenya::
|
|
110
|
+
sig { params(ai_provider_key: Cadenya::AIProviderKey::OrHash).void }
|
|
108
111
|
attr_writer :ai_provider_key
|
|
109
112
|
|
|
110
|
-
#
|
|
111
|
-
sig { returns(T.nilable(
|
|
112
|
-
attr_reader :
|
|
113
|
+
# Represents the last time this model was used in an agent objective
|
|
114
|
+
sig { returns(T.nilable(Time)) }
|
|
115
|
+
attr_reader :last_used_at
|
|
113
116
|
|
|
114
|
-
sig { params(
|
|
115
|
-
attr_writer :
|
|
117
|
+
sig { params(last_used_at: Time).void }
|
|
118
|
+
attr_writer :last_used_at
|
|
116
119
|
|
|
117
120
|
# ModelInfo carries server-derived, read-only details about a model.
|
|
118
121
|
sig do
|
|
119
122
|
params(
|
|
120
123
|
agent_variation_count: Integer,
|
|
121
|
-
ai_provider_key: Cadenya::
|
|
122
|
-
|
|
124
|
+
ai_provider_key: Cadenya::AIProviderKey::OrHash,
|
|
125
|
+
last_used_at: Time
|
|
123
126
|
).returns(T.attached_class)
|
|
124
127
|
end
|
|
125
128
|
def self.new(
|
|
126
129
|
# Number of agent variations currently provisioned on this model. Useful for
|
|
127
130
|
# previewing how many variations a swap would affect.
|
|
128
131
|
agent_variation_count: nil,
|
|
129
|
-
#
|
|
132
|
+
# AIProviderKey is a credential for an AI provider, scoped to a workspace. Most
|
|
133
|
+
# keys are customer-provided (BYOK); Cadenya also provisions promotional keys (see
|
|
134
|
+
# AIProviderKeyInfo.is_promotional), which cannot be modified or deleted by
|
|
135
|
+
# account administrators. The secret value is never returned in responses.
|
|
130
136
|
ai_provider_key: nil,
|
|
131
|
-
#
|
|
132
|
-
|
|
137
|
+
# Represents the last time this model was used in an agent objective
|
|
138
|
+
last_used_at: nil
|
|
133
139
|
)
|
|
134
140
|
end
|
|
135
141
|
|
|
@@ -137,41 +143,13 @@ module Cadenya
|
|
|
137
143
|
override.returns(
|
|
138
144
|
{
|
|
139
145
|
agent_variation_count: Integer,
|
|
140
|
-
ai_provider_key: Cadenya::
|
|
141
|
-
|
|
146
|
+
ai_provider_key: Cadenya::AIProviderKey,
|
|
147
|
+
last_used_at: Time
|
|
142
148
|
}
|
|
143
149
|
)
|
|
144
150
|
end
|
|
145
151
|
def to_hash
|
|
146
152
|
end
|
|
147
|
-
|
|
148
|
-
# The AI provider this model routes through (via its provider key).
|
|
149
|
-
module Provider
|
|
150
|
-
extend Cadenya::Internal::Type::Enum
|
|
151
|
-
|
|
152
|
-
TaggedSymbol =
|
|
153
|
-
T.type_alias { T.all(Symbol, Cadenya::Model::Info::Provider) }
|
|
154
|
-
OrSymbol = T.type_alias { T.any(Symbol, String) }
|
|
155
|
-
|
|
156
|
-
AI_PROVIDER_UNSPECIFIED =
|
|
157
|
-
T.let(
|
|
158
|
-
:AI_PROVIDER_UNSPECIFIED,
|
|
159
|
-
Cadenya::Model::Info::Provider::TaggedSymbol
|
|
160
|
-
)
|
|
161
|
-
AI_PROVIDER_OPENROUTER =
|
|
162
|
-
T.let(
|
|
163
|
-
:AI_PROVIDER_OPENROUTER,
|
|
164
|
-
Cadenya::Model::Info::Provider::TaggedSymbol
|
|
165
|
-
)
|
|
166
|
-
|
|
167
|
-
sig do
|
|
168
|
-
override.returns(
|
|
169
|
-
T::Array[Cadenya::Model::Info::Provider::TaggedSymbol]
|
|
170
|
-
)
|
|
171
|
-
end
|
|
172
|
-
def self.values
|
|
173
|
-
end
|
|
174
|
-
end
|
|
175
153
|
end
|
|
176
154
|
end
|
|
177
155
|
end
|