cadenya 0.9.0 → 0.11.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 +7 -7
- data/lib/cadenya/models/agent.rb +28 -1
- data/lib/cadenya/models/agent_archive_params.rb +26 -0
- data/lib/cadenya/models/agent_entry.rb +31 -1
- data/lib/cadenya/models/agent_list_params.rb +12 -12
- data/lib/cadenya/models/agent_publish_params.rb +26 -0
- data/lib/cadenya/models/agent_schedule_entry.rb +31 -1
- data/lib/cadenya/models/agent_spec.rb +1 -24
- data/lib/cadenya/models/agent_unarchive_params.rb +26 -0
- data/lib/cadenya/models/agent_unpublish_params.rb +26 -0
- data/lib/cadenya/models/agents/agent_schedule.rb +30 -1
- data/lib/cadenya/models/agents/agent_schedule_info.rb +1 -1
- data/lib/cadenya/models/agents/agent_schedule_spec.rb +18 -30
- data/lib/cadenya/models/agents/agent_variation_spec.rb +18 -5
- data/lib/cadenya/models/agents/schedule_archive_params.rb +34 -0
- data/lib/cadenya/models/agents/schedule_pause_params.rb +34 -0
- data/lib/cadenya/models/agents/schedule_resume_params.rb +34 -0
- data/lib/cadenya/models/bulk_workspace_apply_data.rb +6 -7
- data/lib/cadenya/models/model.rb +25 -1
- data/lib/cadenya/models/model_disable_params.rb +26 -0
- data/lib/cadenya/models/model_enable_params.rb +26 -0
- data/lib/cadenya/models/model_list_params.rb +11 -11
- data/lib/cadenya/models/model_spec.rb +1 -23
- data/lib/cadenya/models/objective.rb +11 -1
- data/lib/cadenya/models/objective_create_params.rb +19 -5
- data/lib/cadenya/models/resource_metadata.rb +9 -1
- data/lib/cadenya/models/tool_entry.rb +31 -1
- data/lib/cadenya/models/tool_set.rb +27 -1
- data/lib/cadenya/models/tool_set_archive_params.rb +26 -0
- data/lib/cadenya/models/tool_set_list_params.rb +26 -1
- data/lib/cadenya/models/tool_set_unarchive_params.rb +26 -0
- data/lib/cadenya/models/tool_sets/tool.rb +28 -1
- data/lib/cadenya/models/tool_sets/tool_list_params.rb +11 -12
- data/lib/cadenya/models/tool_sets/tool_omit_params.rb +34 -0
- data/lib/cadenya/models/tool_sets/tool_restore_params.rb +34 -0
- data/lib/cadenya/models/tool_sets/tool_spec.rb +3 -23
- data/lib/cadenya/models.rb +16 -2
- data/lib/cadenya/resources/account.rb +1 -1
- data/lib/cadenya/resources/agents/schedules.rb +112 -0
- data/lib/cadenya/resources/agents.rb +126 -2
- data/lib/cadenya/resources/api_keys.rb +2 -2
- data/lib/cadenya/resources/models.rb +39 -13
- data/lib/cadenya/resources/objectives.rb +4 -2
- data/lib/cadenya/resources/tool_sets/tools.rb +77 -3
- data/lib/cadenya/resources/tool_sets.rb +73 -2
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +13 -1
- data/rbi/cadenya/models/agent.rbi +34 -0
- data/rbi/cadenya/models/agent_archive_params.rbi +43 -0
- data/rbi/cadenya/models/agent_entry.rbi +41 -0
- data/rbi/cadenya/models/agent_list_params.rbi +22 -31
- data/rbi/cadenya/models/agent_publish_params.rbi +43 -0
- data/rbi/cadenya/models/agent_schedule_entry.rbi +52 -3
- data/rbi/cadenya/models/agent_spec.rbi +0 -41
- data/rbi/cadenya/models/agent_unarchive_params.rbi +43 -0
- data/rbi/cadenya/models/agent_unpublish_params.rbi +43 -0
- data/rbi/cadenya/models/agents/agent_schedule.rbi +54 -0
- data/rbi/cadenya/models/agents/agent_schedule_info.rbi +2 -2
- data/rbi/cadenya/models/agents/agent_schedule_spec.rbi +28 -67
- data/rbi/cadenya/models/agents/agent_variation_spec.rbi +29 -8
- data/rbi/cadenya/models/agents/schedule_archive_params.rbi +53 -0
- data/rbi/cadenya/models/agents/schedule_pause_params.rbi +53 -0
- data/rbi/cadenya/models/agents/schedule_resume_params.rbi +53 -0
- data/rbi/cadenya/models/bulk_workspace_apply_data.rbi +12 -14
- data/rbi/cadenya/models/model.rbi +30 -0
- data/rbi/cadenya/models/model_disable_params.rbi +43 -0
- data/rbi/cadenya/models/model_enable_params.rbi +43 -0
- data/rbi/cadenya/models/model_list_params.rbi +20 -26
- data/rbi/cadenya/models/model_spec.rbi +3 -42
- data/rbi/cadenya/models/objective.rbi +14 -3
- data/rbi/cadenya/models/objective_create_params.rbi +25 -6
- data/rbi/cadenya/models/resource_metadata.rbi +14 -3
- data/rbi/cadenya/models/tool_entry.rbi +44 -3
- data/rbi/cadenya/models/tool_set.rbi +35 -0
- data/rbi/cadenya/models/tool_set_archive_params.rbi +43 -0
- data/rbi/cadenya/models/tool_set_list_params.rbi +44 -0
- data/rbi/cadenya/models/tool_set_unarchive_params.rbi +43 -0
- data/rbi/cadenya/models/tool_sets/tool.rbi +43 -0
- data/rbi/cadenya/models/tool_sets/tool_list_params.rbi +26 -27
- data/rbi/cadenya/models/tool_sets/tool_omit_params.rbi +50 -0
- data/rbi/cadenya/models/tool_sets/tool_restore_params.rbi +53 -0
- data/rbi/cadenya/models/tool_sets/tool_spec.rbi +3 -49
- data/rbi/cadenya/models.rbi +16 -2
- data/rbi/cadenya/resources/agents/schedules.rbi +70 -0
- data/rbi/cadenya/resources/agents.rbi +79 -3
- data/rbi/cadenya/resources/models.rbi +26 -10
- data/rbi/cadenya/resources/objectives.rbi +10 -3
- data/rbi/cadenya/resources/tool_sets/tools.rbi +46 -4
- data/rbi/cadenya/resources/tool_sets.rbi +44 -0
- data/sig/cadenya/models/agent.rbs +19 -0
- data/sig/cadenya/models/agent_archive_params.rbs +28 -0
- data/sig/cadenya/models/agent_entry.rbs +23 -0
- data/sig/cadenya/models/agent_list_params.rbs +15 -18
- data/sig/cadenya/models/agent_publish_params.rbs +28 -0
- data/sig/cadenya/models/agent_schedule_entry.rbs +26 -3
- data/sig/cadenya/models/agent_spec.rbs +0 -22
- data/sig/cadenya/models/agent_unarchive_params.rbs +28 -0
- data/sig/cadenya/models/agent_unpublish_params.rbs +28 -0
- data/sig/cadenya/models/agents/agent_schedule.rbs +19 -0
- data/sig/cadenya/models/agents/agent_schedule_spec.rbs +12 -29
- data/sig/cadenya/models/agents/agent_variation_spec.rbs +12 -5
- data/sig/cadenya/models/agents/schedule_archive_params.rbs +34 -0
- data/sig/cadenya/models/agents/schedule_pause_params.rbs +34 -0
- data/sig/cadenya/models/agents/schedule_resume_params.rbs +34 -0
- data/sig/cadenya/models/model.rbs +17 -0
- data/sig/cadenya/models/model_disable_params.rbs +28 -0
- data/sig/cadenya/models/model_enable_params.rbs +28 -0
- data/sig/cadenya/models/model_list_params.rbs +13 -16
- data/sig/cadenya/models/model_spec.rbs +3 -27
- data/sig/cadenya/models/objective.rbs +10 -3
- data/sig/cadenya/models/objective_create_params.rbs +7 -0
- data/sig/cadenya/models/resource_metadata.rbs +10 -3
- data/sig/cadenya/models/tool_entry.rbs +26 -3
- data/sig/cadenya/models/tool_set.rbs +17 -0
- data/sig/cadenya/models/tool_set_archive_params.rbs +28 -0
- data/sig/cadenya/models/tool_set_list_params.rbs +22 -1
- data/sig/cadenya/models/tool_set_unarchive_params.rbs +28 -0
- data/sig/cadenya/models/tool_sets/tool.rbs +22 -0
- data/sig/cadenya/models/tool_sets/tool_list_params.rbs +18 -18
- data/sig/cadenya/models/tool_sets/tool_omit_params.rbs +34 -0
- data/sig/cadenya/models/tool_sets/tool_restore_params.rbs +34 -0
- data/sig/cadenya/models/tool_sets/tool_spec.rbs +2 -26
- data/sig/cadenya/models.rbs +16 -2
- data/sig/cadenya/resources/agents/schedules.rbs +21 -0
- data/sig/cadenya/resources/agents.rbs +25 -1
- data/sig/cadenya/resources/models.rbs +8 -3
- data/sig/cadenya/resources/objectives.rbs +1 -0
- data/sig/cadenya/resources/tool_sets/tools.rbs +15 -1
- data/sig/cadenya/resources/tool_sets.rbs +13 -0
- metadata +41 -5
- data/lib/cadenya/models/model_set_status_params.rb +0 -48
- data/rbi/cadenya/models/model_set_status_params.rbi +0 -95
- data/sig/cadenya/models/model_set_status_params.rbs +0 -55
|
@@ -73,14 +73,13 @@ module Cadenya
|
|
|
73
73
|
# @return [String, nil]
|
|
74
74
|
optional :sort_order, String
|
|
75
75
|
|
|
76
|
-
# @!attribute
|
|
77
|
-
# Filter by tool
|
|
76
|
+
# @!attribute states
|
|
77
|
+
# Filter by tool state. Multiple values are OR'd together.
|
|
78
78
|
#
|
|
79
|
-
# @return [Array<Symbol, Cadenya::Models::ToolSets::ToolListParams::
|
|
80
|
-
optional :
|
|
81
|
-
-> { Cadenya::Internal::Type::ArrayOf[enum: Cadenya::ToolSets::ToolListParams::Status] }
|
|
79
|
+
# @return [Array<Symbol, Cadenya::Models::ToolSets::ToolListParams::State>, nil]
|
|
80
|
+
optional :states, -> { Cadenya::Internal::Type::ArrayOf[enum: Cadenya::ToolSets::ToolListParams::State] }
|
|
82
81
|
|
|
83
|
-
# @!method initialize(workspace_id:, tool_set_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, names: nil, prefix: nil, query: nil, requires_approval: nil, sort_order: nil,
|
|
82
|
+
# @!method initialize(workspace_id:, tool_set_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, names: nil, prefix: nil, query: nil, requires_approval: nil, sort_order: nil, states: nil, request_options: {})
|
|
84
83
|
# Some parameter documentations has been truncated, see
|
|
85
84
|
# {Cadenya::Models::ToolSets::ToolListParams} for more details.
|
|
86
85
|
#
|
|
@@ -106,17 +105,17 @@ module Cadenya
|
|
|
106
105
|
#
|
|
107
106
|
# @param sort_order [String] Sort order for results (asc or desc by creation time)
|
|
108
107
|
#
|
|
109
|
-
# @param
|
|
108
|
+
# @param states [Array<Symbol, Cadenya::Models::ToolSets::ToolListParams::State>] Filter by tool state. Multiple values are OR'd together.
|
|
110
109
|
#
|
|
111
110
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
112
111
|
|
|
113
|
-
module
|
|
112
|
+
module State
|
|
114
113
|
extend Cadenya::Internal::Type::Enum
|
|
115
114
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
115
|
+
STATE_UNSPECIFIED = :STATE_UNSPECIFIED
|
|
116
|
+
STATE_AVAILABLE = :STATE_AVAILABLE
|
|
117
|
+
STATE_OMITTED = :STATE_OMITTED
|
|
118
|
+
STATE_ARCHIVED = :STATE_ARCHIVED
|
|
120
119
|
|
|
121
120
|
# @!method self.values
|
|
122
121
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
# @see Cadenya::Resources::ToolSets::Tools#omit
|
|
7
|
+
class ToolOmitParams < Cadenya::Internal::Type::BaseModel
|
|
8
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute workspace_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :workspace_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute tool_set_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :tool_set_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute id
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :id, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(workspace_id:, tool_set_id:, id:, request_options: {})
|
|
27
|
+
# @param workspace_id [String]
|
|
28
|
+
# @param tool_set_id [String]
|
|
29
|
+
# @param id [String]
|
|
30
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
# @see Cadenya::Resources::ToolSets::Tools#restore
|
|
7
|
+
class ToolRestoreParams < Cadenya::Internal::Type::BaseModel
|
|
8
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute workspace_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :workspace_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute tool_set_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :tool_set_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute id
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :id, String
|
|
25
|
+
|
|
26
|
+
# @!method initialize(workspace_id:, tool_set_id:, id:, request_options: {})
|
|
27
|
+
# @param workspace_id [String]
|
|
28
|
+
# @param tool_set_id [String]
|
|
29
|
+
# @param id [String]
|
|
30
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
end
|
|
@@ -22,17 +22,12 @@ module Cadenya
|
|
|
22
22
|
# @return [Hash{Symbol=>Object}]
|
|
23
23
|
required :parameters, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
|
|
24
24
|
|
|
25
|
-
# @!attribute status
|
|
26
|
-
#
|
|
27
|
-
# @return [Symbol, Cadenya::Models::ToolSets::ToolSpec::Status]
|
|
28
|
-
required :status, enum: -> { Cadenya::ToolSets::ToolSpec::Status }
|
|
29
|
-
|
|
30
25
|
# @!attribute requires_approval
|
|
31
26
|
#
|
|
32
|
-
# @return [Boolean
|
|
33
|
-
|
|
27
|
+
# @return [Boolean]
|
|
28
|
+
required :requires_approval, Cadenya::Internal::Type::Boolean, api_name: :requiresApproval
|
|
34
29
|
|
|
35
|
-
# @!method initialize(config:, description:, parameters:,
|
|
30
|
+
# @!method initialize(config:, description:, parameters:, requires_approval:)
|
|
36
31
|
# Some parameter documentations has been truncated, see
|
|
37
32
|
# {Cadenya::Models::ToolSets::ToolSpec} for more details.
|
|
38
33
|
#
|
|
@@ -42,22 +37,7 @@ module Cadenya
|
|
|
42
37
|
#
|
|
43
38
|
# @param parameters [Hash{Symbol=>Object}]
|
|
44
39
|
#
|
|
45
|
-
# @param status [Symbol, Cadenya::Models::ToolSets::ToolSpec::Status]
|
|
46
|
-
#
|
|
47
40
|
# @param requires_approval [Boolean]
|
|
48
|
-
|
|
49
|
-
# @see Cadenya::Models::ToolSets::ToolSpec#status
|
|
50
|
-
module Status
|
|
51
|
-
extend Cadenya::Internal::Type::Enum
|
|
52
|
-
|
|
53
|
-
TOOL_STATUS_UNSPECIFIED = :TOOL_STATUS_UNSPECIFIED
|
|
54
|
-
TOOL_STATUS_AVAILABLE = :TOOL_STATUS_AVAILABLE
|
|
55
|
-
TOOL_STATUS_OMITTED = :TOOL_STATUS_OMITTED
|
|
56
|
-
TOOL_STATUS_ARCHIVED = :TOOL_STATUS_ARCHIVED
|
|
57
|
-
|
|
58
|
-
# @!method self.values
|
|
59
|
-
# @return [Array<Symbol>]
|
|
60
|
-
end
|
|
61
41
|
end
|
|
62
42
|
end
|
|
63
43
|
end
|
data/lib/cadenya/models.rb
CHANGED
|
@@ -53,6 +53,8 @@ module Cadenya
|
|
|
53
53
|
|
|
54
54
|
Agent = Cadenya::Models::Agent
|
|
55
55
|
|
|
56
|
+
AgentArchiveParams = Cadenya::Models::AgentArchiveParams
|
|
57
|
+
|
|
56
58
|
AgentCreateParams = Cadenya::Models::AgentCreateParams
|
|
57
59
|
|
|
58
60
|
AgentDeleteParams = Cadenya::Models::AgentDeleteParams
|
|
@@ -63,6 +65,8 @@ module Cadenya
|
|
|
63
65
|
|
|
64
66
|
AgentListParams = Cadenya::Models::AgentListParams
|
|
65
67
|
|
|
68
|
+
AgentPublishParams = Cadenya::Models::AgentPublishParams
|
|
69
|
+
|
|
66
70
|
AgentRetrieveParams = Cadenya::Models::AgentRetrieveParams
|
|
67
71
|
|
|
68
72
|
Agents = Cadenya::Models::Agents
|
|
@@ -71,6 +75,10 @@ module Cadenya
|
|
|
71
75
|
|
|
72
76
|
AgentSpec = Cadenya::Models::AgentSpec
|
|
73
77
|
|
|
78
|
+
AgentUnarchiveParams = Cadenya::Models::AgentUnarchiveParams
|
|
79
|
+
|
|
80
|
+
AgentUnpublishParams = Cadenya::Models::AgentUnpublishParams
|
|
81
|
+
|
|
74
82
|
AgentUpdateParams = Cadenya::Models::AgentUpdateParams
|
|
75
83
|
|
|
76
84
|
AgentVariationEntry = Cadenya::Models::AgentVariationEntry
|
|
@@ -171,12 +179,14 @@ module Cadenya
|
|
|
171
179
|
|
|
172
180
|
Model = Cadenya::Models::Model
|
|
173
181
|
|
|
182
|
+
ModelDisableParams = Cadenya::Models::ModelDisableParams
|
|
183
|
+
|
|
184
|
+
ModelEnableParams = Cadenya::Models::ModelEnableParams
|
|
185
|
+
|
|
174
186
|
ModelListParams = Cadenya::Models::ModelListParams
|
|
175
187
|
|
|
176
188
|
ModelRetrieveParams = Cadenya::Models::ModelRetrieveParams
|
|
177
189
|
|
|
178
|
-
ModelSetStatusParams = Cadenya::Models::ModelSetStatusParams
|
|
179
|
-
|
|
180
190
|
ModelSpec = Cadenya::Models::ModelSpec
|
|
181
191
|
|
|
182
192
|
ModelSwapParams = Cadenya::Models::ModelSwapParams
|
|
@@ -271,6 +281,8 @@ module Cadenya
|
|
|
271
281
|
|
|
272
282
|
ToolSetAdapterOpenAPI = Cadenya::Models::ToolSetAdapterOpenAPI
|
|
273
283
|
|
|
284
|
+
ToolSetArchiveParams = Cadenya::Models::ToolSetArchiveParams
|
|
285
|
+
|
|
274
286
|
ToolSetCreateParams = Cadenya::Models::ToolSetCreateParams
|
|
275
287
|
|
|
276
288
|
ToolSetDeleteParams = Cadenya::Models::ToolSetDeleteParams
|
|
@@ -295,6 +307,8 @@ module Cadenya
|
|
|
295
307
|
|
|
296
308
|
ToolSetSpec = Cadenya::Models::ToolSetSpec
|
|
297
309
|
|
|
310
|
+
ToolSetUnarchiveParams = Cadenya::Models::ToolSetUnarchiveParams
|
|
311
|
+
|
|
298
312
|
ToolSetUpdateParams = Cadenya::Models::ToolSetUpdateParams
|
|
299
313
|
|
|
300
314
|
UnsafeUnwrapWebhookEvent = Cadenya::Models::UnsafeUnwrapWebhookEvent
|
|
@@ -36,7 +36,7 @@ module Cadenya
|
|
|
36
36
|
def rotate_webhook_signing_key(params = {})
|
|
37
37
|
@client.request(
|
|
38
38
|
method: :post,
|
|
39
|
-
path: "v1/account
|
|
39
|
+
path: "v1/account:rotateWebhookSigningKey",
|
|
40
40
|
model: Cadenya::RotateWebhookSigningKeyResponse,
|
|
41
41
|
options: params[:request_options]
|
|
42
42
|
)
|
|
@@ -207,6 +207,118 @@ module Cadenya
|
|
|
207
207
|
)
|
|
208
208
|
end
|
|
209
209
|
|
|
210
|
+
# Some parameter documentations has been truncated, see
|
|
211
|
+
# {Cadenya::Models::Agents::ScheduleArchiveParams} for more details.
|
|
212
|
+
#
|
|
213
|
+
# Transitions a schedule to STATE_ARCHIVED and removes its underlying timer.
|
|
214
|
+
# Archiving is terminal: archived schedules never fire and cannot be reactivated;
|
|
215
|
+
# create a new schedule instead.
|
|
216
|
+
#
|
|
217
|
+
# @overload archive(id, workspace_id:, agent_id:, request_options: {})
|
|
218
|
+
#
|
|
219
|
+
# @param id [String] Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form
|
|
220
|
+
#
|
|
221
|
+
# @param workspace_id [String] Workspace ID.
|
|
222
|
+
#
|
|
223
|
+
# @param agent_id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
224
|
+
#
|
|
225
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
226
|
+
#
|
|
227
|
+
# @return [Cadenya::Models::Agents::AgentSchedule]
|
|
228
|
+
#
|
|
229
|
+
# @see Cadenya::Models::Agents::ScheduleArchiveParams
|
|
230
|
+
def archive(id, params)
|
|
231
|
+
parsed, options = Cadenya::Agents::ScheduleArchiveParams.dump_request(params)
|
|
232
|
+
workspace_id =
|
|
233
|
+
parsed.delete(:workspace_id) do
|
|
234
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
235
|
+
end
|
|
236
|
+
agent_id =
|
|
237
|
+
parsed.delete(:agent_id) do
|
|
238
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
239
|
+
end
|
|
240
|
+
@client.request(
|
|
241
|
+
method: :post,
|
|
242
|
+
path: ["v1/workspaces/%1$s/agents/%2$s/schedules/%3$s:archive", workspace_id, agent_id, id],
|
|
243
|
+
model: Cadenya::Agents::AgentSchedule,
|
|
244
|
+
options: options
|
|
245
|
+
)
|
|
246
|
+
end
|
|
247
|
+
|
|
248
|
+
# Some parameter documentations has been truncated, see
|
|
249
|
+
# {Cadenya::Models::Agents::SchedulePauseParams} for more details.
|
|
250
|
+
#
|
|
251
|
+
# Transitions a schedule to STATE_PAUSED. Paused schedules retain history but do
|
|
252
|
+
# not fire.
|
|
253
|
+
#
|
|
254
|
+
# @overload pause(id, workspace_id:, agent_id:, request_options: {})
|
|
255
|
+
#
|
|
256
|
+
# @param id [String] Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form
|
|
257
|
+
#
|
|
258
|
+
# @param workspace_id [String] Workspace ID.
|
|
259
|
+
#
|
|
260
|
+
# @param agent_id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
261
|
+
#
|
|
262
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
263
|
+
#
|
|
264
|
+
# @return [Cadenya::Models::Agents::AgentSchedule]
|
|
265
|
+
#
|
|
266
|
+
# @see Cadenya::Models::Agents::SchedulePauseParams
|
|
267
|
+
def pause(id, params)
|
|
268
|
+
parsed, options = Cadenya::Agents::SchedulePauseParams.dump_request(params)
|
|
269
|
+
workspace_id =
|
|
270
|
+
parsed.delete(:workspace_id) do
|
|
271
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
272
|
+
end
|
|
273
|
+
agent_id =
|
|
274
|
+
parsed.delete(:agent_id) do
|
|
275
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
276
|
+
end
|
|
277
|
+
@client.request(
|
|
278
|
+
method: :post,
|
|
279
|
+
path: ["v1/workspaces/%1$s/agents/%2$s/schedules/%3$s:pause", workspace_id, agent_id, id],
|
|
280
|
+
model: Cadenya::Agents::AgentSchedule,
|
|
281
|
+
options: options
|
|
282
|
+
)
|
|
283
|
+
end
|
|
284
|
+
|
|
285
|
+
# Some parameter documentations has been truncated, see
|
|
286
|
+
# {Cadenya::Models::Agents::ScheduleResumeParams} for more details.
|
|
287
|
+
#
|
|
288
|
+
# Transitions a paused schedule back to STATE_ACTIVE so it fires on its cadence
|
|
289
|
+
# again. Archived schedules cannot be resumed.
|
|
290
|
+
#
|
|
291
|
+
# @overload resume(id, workspace_id:, agent_id:, request_options: {})
|
|
292
|
+
#
|
|
293
|
+
# @param id [String] Schedule ID. Accepts the canonical `as_…` form or the `external_id:<value>` form
|
|
294
|
+
#
|
|
295
|
+
# @param workspace_id [String] Workspace ID.
|
|
296
|
+
#
|
|
297
|
+
# @param agent_id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
298
|
+
#
|
|
299
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
300
|
+
#
|
|
301
|
+
# @return [Cadenya::Models::Agents::AgentSchedule]
|
|
302
|
+
#
|
|
303
|
+
# @see Cadenya::Models::Agents::ScheduleResumeParams
|
|
304
|
+
def resume(id, params)
|
|
305
|
+
parsed, options = Cadenya::Agents::ScheduleResumeParams.dump_request(params)
|
|
306
|
+
workspace_id =
|
|
307
|
+
parsed.delete(:workspace_id) do
|
|
308
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
309
|
+
end
|
|
310
|
+
agent_id =
|
|
311
|
+
parsed.delete(:agent_id) do
|
|
312
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
313
|
+
end
|
|
314
|
+
@client.request(
|
|
315
|
+
method: :post,
|
|
316
|
+
path: ["v1/workspaces/%1$s/agents/%2$s/schedules/%3$s:resume", workspace_id, agent_id, id],
|
|
317
|
+
model: Cadenya::Agents::AgentSchedule,
|
|
318
|
+
options: options
|
|
319
|
+
)
|
|
320
|
+
end
|
|
321
|
+
|
|
210
322
|
# @api private
|
|
211
323
|
#
|
|
212
324
|
# @param client [Cadenya::Client]
|
|
@@ -125,7 +125,7 @@ module Cadenya
|
|
|
125
125
|
#
|
|
126
126
|
# Lists all agents in the workspace
|
|
127
127
|
#
|
|
128
|
-
# @overload list(workspace_id, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil,
|
|
128
|
+
# @overload list(workspace_id, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, variation_selection_mode: nil, request_options: {})
|
|
129
129
|
#
|
|
130
130
|
# @param workspace_id [String] Workspace ID.
|
|
131
131
|
#
|
|
@@ -143,7 +143,7 @@ module Cadenya
|
|
|
143
143
|
#
|
|
144
144
|
# @param sort_order [String] Sort order for results (asc or desc by creation time)
|
|
145
145
|
#
|
|
146
|
-
# @param
|
|
146
|
+
# @param state [Symbol, Cadenya::Models::AgentListParams::State] Filter by agent lifecycle state
|
|
147
147
|
#
|
|
148
148
|
# @param variation_selection_mode [Symbol, Cadenya::Models::AgentListParams::VariationSelectionMode] Filter by variation selection mode
|
|
149
149
|
#
|
|
@@ -200,6 +200,130 @@ module Cadenya
|
|
|
200
200
|
)
|
|
201
201
|
end
|
|
202
202
|
|
|
203
|
+
# Some parameter documentations has been truncated, see
|
|
204
|
+
# {Cadenya::Models::AgentArchiveParams} for more details.
|
|
205
|
+
#
|
|
206
|
+
# Transitions an agent to STATE_ARCHIVED. Archived agents are hidden from list
|
|
207
|
+
# results and cannot be used for objectives; active schedules are paused.
|
|
208
|
+
#
|
|
209
|
+
# @overload archive(id, workspace_id:, request_options: {})
|
|
210
|
+
#
|
|
211
|
+
# @param id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
212
|
+
#
|
|
213
|
+
# @param workspace_id [String] Workspace ID.
|
|
214
|
+
#
|
|
215
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
216
|
+
#
|
|
217
|
+
# @return [Cadenya::Models::Agent]
|
|
218
|
+
#
|
|
219
|
+
# @see Cadenya::Models::AgentArchiveParams
|
|
220
|
+
def archive(id, params)
|
|
221
|
+
parsed, options = Cadenya::AgentArchiveParams.dump_request(params)
|
|
222
|
+
workspace_id =
|
|
223
|
+
parsed.delete(:workspace_id) do
|
|
224
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
225
|
+
end
|
|
226
|
+
@client.request(
|
|
227
|
+
method: :post,
|
|
228
|
+
path: ["v1/workspaces/%1$s/agents/%2$s:archive", workspace_id, id],
|
|
229
|
+
model: Cadenya::Agent,
|
|
230
|
+
options: options
|
|
231
|
+
)
|
|
232
|
+
end
|
|
233
|
+
|
|
234
|
+
# Some parameter documentations has been truncated, see
|
|
235
|
+
# {Cadenya::Models::AgentPublishParams} for more details.
|
|
236
|
+
#
|
|
237
|
+
# Transitions an agent to STATE_PUBLISHED, making it available for objectives. The
|
|
238
|
+
# agent must have at least one variation.
|
|
239
|
+
#
|
|
240
|
+
# @overload publish(id, workspace_id:, request_options: {})
|
|
241
|
+
#
|
|
242
|
+
# @param id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
243
|
+
#
|
|
244
|
+
# @param workspace_id [String] Workspace ID.
|
|
245
|
+
#
|
|
246
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
247
|
+
#
|
|
248
|
+
# @return [Cadenya::Models::Agent]
|
|
249
|
+
#
|
|
250
|
+
# @see Cadenya::Models::AgentPublishParams
|
|
251
|
+
def publish(id, params)
|
|
252
|
+
parsed, options = Cadenya::AgentPublishParams.dump_request(params)
|
|
253
|
+
workspace_id =
|
|
254
|
+
parsed.delete(:workspace_id) do
|
|
255
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
256
|
+
end
|
|
257
|
+
@client.request(
|
|
258
|
+
method: :post,
|
|
259
|
+
path: ["v1/workspaces/%1$s/agents/%2$s:publish", workspace_id, id],
|
|
260
|
+
model: Cadenya::Agent,
|
|
261
|
+
options: options
|
|
262
|
+
)
|
|
263
|
+
end
|
|
264
|
+
|
|
265
|
+
# Some parameter documentations has been truncated, see
|
|
266
|
+
# {Cadenya::Models::AgentUnarchiveParams} for more details.
|
|
267
|
+
#
|
|
268
|
+
# Transitions an archived agent back to STATE_DRAFT. Publish the agent again to
|
|
269
|
+
# make it available for objectives.
|
|
270
|
+
#
|
|
271
|
+
# @overload unarchive(id, workspace_id:, request_options: {})
|
|
272
|
+
#
|
|
273
|
+
# @param id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
274
|
+
#
|
|
275
|
+
# @param workspace_id [String] Workspace ID.
|
|
276
|
+
#
|
|
277
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
278
|
+
#
|
|
279
|
+
# @return [Cadenya::Models::Agent]
|
|
280
|
+
#
|
|
281
|
+
# @see Cadenya::Models::AgentUnarchiveParams
|
|
282
|
+
def unarchive(id, params)
|
|
283
|
+
parsed, options = Cadenya::AgentUnarchiveParams.dump_request(params)
|
|
284
|
+
workspace_id =
|
|
285
|
+
parsed.delete(:workspace_id) do
|
|
286
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
287
|
+
end
|
|
288
|
+
@client.request(
|
|
289
|
+
method: :post,
|
|
290
|
+
path: ["v1/workspaces/%1$s/agents/%2$s:unarchive", workspace_id, id],
|
|
291
|
+
model: Cadenya::Agent,
|
|
292
|
+
options: options
|
|
293
|
+
)
|
|
294
|
+
end
|
|
295
|
+
|
|
296
|
+
# Some parameter documentations has been truncated, see
|
|
297
|
+
# {Cadenya::Models::AgentUnpublishParams} for more details.
|
|
298
|
+
#
|
|
299
|
+
# Transitions a published agent back to STATE_DRAFT. Active schedules for the
|
|
300
|
+
# agent are paused until it is published again.
|
|
301
|
+
#
|
|
302
|
+
# @overload unpublish(id, workspace_id:, request_options: {})
|
|
303
|
+
#
|
|
304
|
+
# @param id [String] Agent ID. Accepts the canonical `agent_…` form or the `external_id:<value>` form
|
|
305
|
+
#
|
|
306
|
+
# @param workspace_id [String] Workspace ID.
|
|
307
|
+
#
|
|
308
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
309
|
+
#
|
|
310
|
+
# @return [Cadenya::Models::Agent]
|
|
311
|
+
#
|
|
312
|
+
# @see Cadenya::Models::AgentUnpublishParams
|
|
313
|
+
def unpublish(id, params)
|
|
314
|
+
parsed, options = Cadenya::AgentUnpublishParams.dump_request(params)
|
|
315
|
+
workspace_id =
|
|
316
|
+
parsed.delete(:workspace_id) do
|
|
317
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
318
|
+
end
|
|
319
|
+
@client.request(
|
|
320
|
+
method: :post,
|
|
321
|
+
path: ["v1/workspaces/%1$s/agents/%2$s:unpublish", workspace_id, id],
|
|
322
|
+
model: Cadenya::Agent,
|
|
323
|
+
options: options
|
|
324
|
+
)
|
|
325
|
+
end
|
|
326
|
+
|
|
203
327
|
# @api private
|
|
204
328
|
#
|
|
205
329
|
# @param client [Cadenya::Client]
|
|
@@ -171,8 +171,8 @@ module Cadenya
|
|
|
171
171
|
# @see Cadenya::Models::APIKeyRotateParams
|
|
172
172
|
def rotate(id, params = {})
|
|
173
173
|
@client.request(
|
|
174
|
-
method: :
|
|
175
|
-
path: ["v1/account/api_keys/%1$s
|
|
174
|
+
method: :post,
|
|
175
|
+
path: ["v1/account/api_keys/%1$s:rotate", id],
|
|
176
176
|
model: Cadenya::APIKey,
|
|
177
177
|
options: params[:request_options]
|
|
178
178
|
)
|
|
@@ -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,
|
|
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: {})
|
|
42
42
|
#
|
|
43
43
|
# @param workspace_id [String] Workspace ID.
|
|
44
44
|
#
|
|
@@ -58,7 +58,7 @@ module Cadenya
|
|
|
58
58
|
#
|
|
59
59
|
# @param sort_order [String] Sort order for results (asc or desc by creation time)
|
|
60
60
|
#
|
|
61
|
-
# @param
|
|
61
|
+
# @param state [Symbol, Cadenya::Models::ModelListParams::State] Filter by model state
|
|
62
62
|
#
|
|
63
63
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
64
64
|
#
|
|
@@ -83,31 +83,57 @@ module Cadenya
|
|
|
83
83
|
)
|
|
84
84
|
end
|
|
85
85
|
|
|
86
|
-
#
|
|
86
|
+
# Transitions a model to STATE_DISABLED. Fails while agent variations are still
|
|
87
|
+
# provisioned on the model; use :swapModelOnVariations to move them first.
|
|
87
88
|
#
|
|
88
|
-
# @overload
|
|
89
|
+
# @overload disable(id, workspace_id:, request_options: {})
|
|
89
90
|
#
|
|
90
|
-
# @param id [String]
|
|
91
|
+
# @param id [String] Model ID
|
|
92
|
+
#
|
|
93
|
+
# @param workspace_id [String] Workspace ID.
|
|
94
|
+
#
|
|
95
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
96
|
+
#
|
|
97
|
+
# @return [Cadenya::Models::Model]
|
|
98
|
+
#
|
|
99
|
+
# @see Cadenya::Models::ModelDisableParams
|
|
100
|
+
def disable(id, params)
|
|
101
|
+
parsed, options = Cadenya::ModelDisableParams.dump_request(params)
|
|
102
|
+
workspace_id =
|
|
103
|
+
parsed.delete(:workspace_id) do
|
|
104
|
+
raise ArgumentError.new("missing required path argument #{_1}")
|
|
105
|
+
end
|
|
106
|
+
@client.request(
|
|
107
|
+
method: :post,
|
|
108
|
+
path: ["v1/workspaces/%1$s/models/%2$s:disable", workspace_id, id],
|
|
109
|
+
model: Cadenya::Model,
|
|
110
|
+
options: options
|
|
111
|
+
)
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# Transitions a model to STATE_ENABLED, making it available for agent variations
|
|
115
|
+
# in the workspace
|
|
116
|
+
#
|
|
117
|
+
# @overload enable(id, workspace_id:, request_options: {})
|
|
91
118
|
#
|
|
92
|
-
# @param
|
|
119
|
+
# @param id [String] Model ID
|
|
93
120
|
#
|
|
94
|
-
# @param
|
|
121
|
+
# @param workspace_id [String] Workspace ID.
|
|
95
122
|
#
|
|
96
123
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|
|
97
124
|
#
|
|
98
125
|
# @return [Cadenya::Models::Model]
|
|
99
126
|
#
|
|
100
|
-
# @see Cadenya::Models::
|
|
101
|
-
def
|
|
102
|
-
parsed, options = Cadenya::
|
|
127
|
+
# @see Cadenya::Models::ModelEnableParams
|
|
128
|
+
def enable(id, params)
|
|
129
|
+
parsed, options = Cadenya::ModelEnableParams.dump_request(params)
|
|
103
130
|
workspace_id =
|
|
104
131
|
parsed.delete(:workspace_id) do
|
|
105
132
|
raise ArgumentError.new("missing required path argument #{_1}")
|
|
106
133
|
end
|
|
107
134
|
@client.request(
|
|
108
|
-
method: :
|
|
109
|
-
path: ["v1/workspaces/%1$s/models/%2$s
|
|
110
|
-
body: parsed,
|
|
135
|
+
method: :post,
|
|
136
|
+
path: ["v1/workspaces/%1$s/models/%2$s:enable", workspace_id, id],
|
|
111
137
|
model: Cadenya::Model,
|
|
112
138
|
options: options
|
|
113
139
|
)
|
|
@@ -20,7 +20,7 @@ module Cadenya
|
|
|
20
20
|
#
|
|
21
21
|
# Creates a new objective in the workspace
|
|
22
22
|
#
|
|
23
|
-
# @overload create(workspace_id, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
|
|
23
|
+
# @overload create(workspace_id, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
|
|
24
24
|
#
|
|
25
25
|
# @param workspace_id [String]
|
|
26
26
|
#
|
|
@@ -28,7 +28,7 @@ module Cadenya
|
|
|
28
28
|
#
|
|
29
29
|
# @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
|
|
30
30
|
#
|
|
31
|
-
# @param initial_message [String] Optional override for initial message sent to the agent. This becomes the
|
|
31
|
+
# @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
|
|
32
32
|
#
|
|
33
33
|
# @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
|
|
34
34
|
#
|
|
@@ -36,6 +36,8 @@ module Cadenya
|
|
|
36
36
|
#
|
|
37
37
|
# @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
|
|
38
38
|
#
|
|
39
|
+
# @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
|
|
40
|
+
#
|
|
39
41
|
# @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
|
|
40
42
|
#
|
|
41
43
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
|