cadenya 1.1.0 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a34a1aa5ec8f93f32c4d4195c752a708703aa6d21271ddbde778fc714e156348
4
- data.tar.gz: a2f70c8273fc506459d921a218c2741ce7cff7f91173d533146b29f9bb17cfb7
3
+ metadata.gz: 5de3120685ecaac9cb2dc5f747caa32cc32210272811934b86e66242ebaa05ed
4
+ data.tar.gz: d7ddc9e902bff38d9d9292c3e6525e9993f513b44a157a990d39ca4195662402
5
5
  SHA512:
6
- metadata.gz: d5ad906af80f5f85092cb525d853b84a63d4bc5561423b05445b8c0ef7dbcd6d745630126a95baced17950c0b731e81735932912845babf5cbcab1c8d2782de2
7
- data.tar.gz: d03190e5823c1be2bbe24c2c2a564f141c65bcab927abc9c57e8464ef10f365fa7712ebf09facfab243a3bc3b2d705b80657f8a888d23409f8d5c473642242d2
6
+ metadata.gz: 4e26100b1ec642e14aae8ed87400f03af679f771cd2255b83da0980b4e9e9a7f846b8957591870d429042c2a7c0bae0fffbe7269dea330c60ec3c1449996d521
7
+ data.tar.gz: 24c3d5c36d6c1a665d29a621467921471de512123004688d7f0d2c4d67ae0ee22a5826040c610c652e45f31e1d3fffebd8a4e763af2a2957446a6fb5a9908ec3
data/api.md CHANGED
@@ -278,27 +278,27 @@ client.agents.variations.update(agent_id, id, workspace_id: nil, metadata: nil,
278
278
  Add an assignment to a variation
279
279
 
280
280
  ```ruby
281
- client.agents.variations.add_assignment(agent_id, variation_id, body:, workspace_id: nil) # => Cadenya::Types::VariationAssignment
281
+ client.agents.variations.add_assignment(agent_id, variation_id, body:, workspace_id: nil) # => Cadenya::Types::AgentVariation
282
282
  ```
283
- Remove an assignment from a variation
283
+ Attach a memory layer to a variation
284
284
 
285
285
  ```ruby
286
- client.agents.variations.remove_assignment(agent_id, variation_id, id, workspace_id: nil) # => nil
286
+ client.agents.variations.add_memory_layer(agent_id, variation_id, memory_layer_id:, workspace_id: nil, position: nil) # => Cadenya::Types::AgentVariation
287
287
  ```
288
- Attach a memory layer to a variation
288
+ Remove an assignment from a variation
289
289
 
290
290
  ```ruby
291
- client.agents.variations.add_memory_layer(agent_id, variation_id, memory_layer_id:, workspace_id: nil, position: nil) # => Cadenya::Types::VariationMemoryLayerAssignment
291
+ client.agents.variations.remove_assignment(agent_id, variation_id, body:, workspace_id: nil) # => Cadenya::Types::AgentVariation
292
292
  ```
293
293
  Remove a memory layer assignment from a variation
294
294
 
295
295
  ```ruby
296
- client.agents.variations.remove_memory_layer(agent_id, variation_id, id, workspace_id: nil) # => nil
296
+ client.agents.variations.remove_memory_layer(agent_id, variation_id, memory_layer_id:, workspace_id: nil) # => Cadenya::Types::AgentVariation
297
297
  ```
298
298
  Update a variation's memory layer assignment
299
299
 
300
300
  ```ruby
301
- client.agents.variations.update_memory_layer(agent_id, variation_id, id, workspace_id: nil, position: nil) # => Cadenya::Types::VariationMemoryLayerAssignment
301
+ client.agents.variations.update_memory_layer(agent_id, variation_id, memory_layer_id:, position:, workspace_id: nil) # => Cadenya::Types::AgentVariation
302
302
  ```
303
303
 
304
304
  ## client.ai_provider_keys
@@ -37,7 +37,7 @@ module Cadenya
37
37
  auth_header: ["Authorization", "Bearer #{api_key}"],
38
38
  max_retries: max_retries,
39
39
  defaults: defaults,
40
- user_agent: "cadenya-ruby/1.0.1 (api 1.0)",
40
+ user_agent: "cadenya-ruby/1.3.0 (api 1.0)",
41
41
  connection: connection,
42
42
  stream_transport: stream_transport
43
43
  )
@@ -72,48 +72,52 @@ module Cadenya
72
72
  # Add an assignment to a variation
73
73
  def add_assignment(agent_id, variation_id, body:, workspace_id: nil, request_options: nil)
74
74
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
75
- _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}/assignments"
75
+ _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}:addAssignment"
76
76
  _data = @core.request(:post, _path, body: (->(_v) { Types.encode_AddAgentVariationAssignmentRequest(_v) }).call(body), request_options: request_options)
77
- Types.decode_VariationAssignment(_data)
78
- end
79
-
80
- # Remove an assignment from a variation
81
- def remove_assignment(agent_id, variation_id, id, workspace_id: nil, request_options: nil)
82
- workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
83
- _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}/assignments/#{Util.path_param('id', id)}"
84
- @core.request(:delete, _path, expects_body: false, request_options: request_options)
85
- nil
77
+ Types::AgentVariation.from_json(_data)
86
78
  end
87
79
 
88
80
  # Attach a memory layer to a variation
89
81
  def add_memory_layer(agent_id, variation_id, memory_layer_id:, workspace_id: nil, position: nil, request_options: nil)
90
82
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
91
- _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}/memory_layer_assignments"
83
+ _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}:addMemoryLayer"
92
84
  _body = {
93
85
  "memoryLayerId" => memory_layer_id,
94
86
  "position" => position,
95
87
  }.reject { |_k, v| v.nil? }
96
88
  _data = @core.request(:post, _path, body: _body, request_options: request_options)
97
- Types::VariationMemoryLayerAssignment.from_json(_data)
89
+ Types::AgentVariation.from_json(_data)
90
+ end
91
+
92
+ # Remove an assignment from a variation
93
+ def remove_assignment(agent_id, variation_id, body:, workspace_id: nil, request_options: nil)
94
+ workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
95
+ _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}:removeAssignment"
96
+ _data = @core.request(:post, _path, body: (->(_v) { Types.encode_RemoveAgentVariationAssignmentRequest(_v) }).call(body), request_options: request_options)
97
+ Types::AgentVariation.from_json(_data)
98
98
  end
99
99
 
100
100
  # Remove a memory layer assignment from a variation
101
- def remove_memory_layer(agent_id, variation_id, id, workspace_id: nil, request_options: nil)
101
+ def remove_memory_layer(agent_id, variation_id, memory_layer_id:, workspace_id: nil, request_options: nil)
102
102
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
103
- _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}/memory_layer_assignments/#{Util.path_param('id', id)}"
104
- @core.request(:delete, _path, expects_body: false, request_options: request_options)
105
- nil
103
+ _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}:removeMemoryLayer"
104
+ _body = {
105
+ "memoryLayerId" => memory_layer_id,
106
+ }.reject { |_k, v| v.nil? }
107
+ _data = @core.request(:post, _path, body: _body, request_options: request_options)
108
+ Types::AgentVariation.from_json(_data)
106
109
  end
107
110
 
108
111
  # Update a variation's memory layer assignment
109
- def update_memory_layer(agent_id, variation_id, id, workspace_id: nil, position: nil, request_options: nil)
112
+ def update_memory_layer(agent_id, variation_id, memory_layer_id:, position:, workspace_id: nil, request_options: nil)
110
113
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
111
- _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}/memory_layer_assignments/#{Util.path_param('id', id)}"
114
+ _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/agents/#{Util.path_param('agentId', agent_id)}/variations/#{Util.path_param('variationId', variation_id)}:updateMemoryLayer"
112
115
  _body = {
116
+ "memoryLayerId" => memory_layer_id,
113
117
  "position" => position,
114
118
  }.reject { |_k, v| v.nil? }
115
- _data = @core.request(:patch, _path, body: _body, request_options: request_options)
116
- Types::VariationMemoryLayerAssignment.from_json(_data)
119
+ _data = @core.request(:post, _path, body: _body, request_options: request_options)
120
+ Types::AgentVariation.from_json(_data)
117
121
  end
118
122
  end
119
123
  end
data/lib/cadenya/types.rb CHANGED
@@ -724,9 +724,9 @@ module Cadenya
724
724
  end
725
725
 
726
726
  class AgentVariationInfo
727
- attr_reader :tool_count, :tool_set_count, :sub_agent_count, :created_by, :model, :score, :feedback_count, :assignments, :memory_layer_assignments, :memory_layer_count
727
+ attr_reader :tool_count, :tool_set_count, :sub_agent_count, :created_by, :model, :score, :feedback_count, :memory_layer_count, :effective_tool_count, :assignment_metadata
728
728
 
729
- def initialize(tool_count: nil, tool_set_count: nil, sub_agent_count: nil, created_by: nil, model: nil, score: nil, feedback_count: nil, assignments: nil, memory_layer_assignments: nil, memory_layer_count: nil)
729
+ def initialize(tool_count: nil, tool_set_count: nil, sub_agent_count: nil, created_by: nil, model: nil, score: nil, feedback_count: nil, memory_layer_count: nil, effective_tool_count: nil, assignment_metadata: nil)
730
730
  @tool_count = tool_count
731
731
  @tool_set_count = tool_set_count
732
732
  @sub_agent_count = sub_agent_count
@@ -734,9 +734,9 @@ module Cadenya
734
734
  @model = model
735
735
  @score = score
736
736
  @feedback_count = feedback_count
737
- @assignments = assignments
738
- @memory_layer_assignments = memory_layer_assignments
739
737
  @memory_layer_count = memory_layer_count
738
+ @effective_tool_count = effective_tool_count
739
+ @assignment_metadata = assignment_metadata
740
740
  end
741
741
 
742
742
  def self.from_json(data)
@@ -748,9 +748,9 @@ module Cadenya
748
748
  model: data["model"].nil? ? nil : Types::ResourceMetadata.from_json(data["model"]),
749
749
  score: data["score"],
750
750
  feedback_count: data["feedbackCount"],
751
- assignments: data["assignments"].nil? ? nil : (data["assignments"]).map { |item| Types.decode_VariationAssignment(item) },
752
- memory_layer_assignments: data["memoryLayerAssignments"].nil? ? nil : (data["memoryLayerAssignments"]).map { |item| Types::VariationMemoryLayerAssignment.from_json(item) },
753
751
  memory_layer_count: data["memoryLayerCount"],
752
+ effective_tool_count: data["effectiveToolCount"],
753
+ assignment_metadata: data["assignmentMetadata"].nil? ? nil : (data["assignmentMetadata"]).transform_values { |v| Types::BareMetadata.from_json(v) },
754
754
  )
755
755
  end
756
756
 
@@ -763,17 +763,17 @@ module Cadenya
763
763
  model: Util.plain(@model),
764
764
  score: Util.plain(@score),
765
765
  feedback_count: Util.plain(@feedback_count),
766
- assignments: Util.plain(@assignments),
767
- memory_layer_assignments: Util.plain(@memory_layer_assignments),
768
766
  memory_layer_count: Util.plain(@memory_layer_count),
767
+ effective_tool_count: Util.plain(@effective_tool_count),
768
+ assignment_metadata: Util.plain(@assignment_metadata),
769
769
  }.reject { |_k, v| v.nil? }
770
770
  end
771
771
  end
772
772
 
773
773
  class AgentVariationSpec
774
- attr_reader :system_prompt_template, :progressive_discovery, :constraints, :description, :model_config, :compaction_config, :first_user_message_template
774
+ attr_reader :system_prompt_template, :progressive_discovery, :constraints, :description, :model_config, :compaction_config, :first_user_message_template, :assignments, :memory_layer_assignments
775
775
 
776
- def initialize(system_prompt_template: nil, progressive_discovery: nil, constraints: nil, description: nil, model_config: nil, compaction_config: nil, first_user_message_template: nil)
776
+ def initialize(system_prompt_template: nil, progressive_discovery: nil, constraints: nil, description: nil, model_config: nil, compaction_config: nil, first_user_message_template: nil, assignments: nil, memory_layer_assignments: nil)
777
777
  @system_prompt_template = system_prompt_template
778
778
  @progressive_discovery = progressive_discovery
779
779
  @constraints = constraints
@@ -781,6 +781,8 @@ module Cadenya
781
781
  @model_config = model_config
782
782
  @compaction_config = compaction_config
783
783
  @first_user_message_template = first_user_message_template
784
+ @assignments = assignments
785
+ @memory_layer_assignments = memory_layer_assignments
784
786
  end
785
787
 
786
788
  def self.from_json(data)
@@ -792,6 +794,8 @@ module Cadenya
792
794
  model_config: data["modelConfig"].nil? ? nil : Types::AgentVariationSpec_ModelConfig.from_json(data["modelConfig"]),
793
795
  compaction_config: data["compactionConfig"].nil? ? nil : Types::AgentVariationSpec_CompactionConfig.from_json(data["compactionConfig"]),
794
796
  first_user_message_template: data["firstUserMessageTemplate"],
797
+ assignments: data["assignments"].nil? ? nil : (data["assignments"]).map { |item| Types.decode_VariationAssignment(item) },
798
+ memory_layer_assignments: data["memoryLayerAssignments"].nil? ? nil : (data["memoryLayerAssignments"]).map { |item| Types::VariationMemoryLayerAssignment.from_json(item) },
795
799
  )
796
800
  end
797
801
 
@@ -804,6 +808,8 @@ module Cadenya
804
808
  model_config: Util.plain(@model_config),
805
809
  compaction_config: Util.plain(@compaction_config),
806
810
  first_user_message_template: Util.plain(@first_user_message_template),
811
+ assignments: Util.plain(@assignments),
812
+ memory_layer_assignments: Util.plain(@memory_layer_assignments),
807
813
  }.reject { |_k, v| v.nil? }
808
814
  end
809
815
  end
@@ -3699,7 +3705,7 @@ module Cadenya
3699
3705
  end
3700
3706
  end
3701
3707
 
3702
- ObjectiveState = ["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
3708
+ ObjectiveState = ["OBJECTIVE_STATE_UNSPECIFIED", "OBJECTIVE_STATE_PENDING", "OBJECTIVE_STATE_RUNNING", "OBJECTIVE_STATE_WAITING", "OBJECTIVE_STATE_FAILED", "OBJECTIVE_STATE_CANCELLED", "OBJECTIVE_STATE_FINALIZED", "OBJECTIVE_STATE_TIMED_OUT"].freeze
3703
3709
 
3704
3710
  class Objective
3705
3711
  attr_reader :metadata, :config_snapshot, :state, :state_message, :info, :system_prompt, :first_user_message, :parent_objective_id, :secrets, :system_prompt_data, :memory_cascade, :output, :first_user_message_data, :episodic_memory, :pinned_parameters
@@ -4036,6 +4042,8 @@ module Cadenya
4036
4042
  Types::ObjectiveEventData_TimedOut.from_json(data)
4037
4043
  when "reasoning"
4038
4044
  Types::ObjectiveEventData_Reasoning.from_json(data)
4045
+ when "stateChanged"
4046
+ Types::ObjectiveEventData_StateChanged.from_json(data)
4039
4047
  else
4040
4048
  raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
4041
4049
  end
@@ -4218,6 +4226,36 @@ module Cadenya
4218
4226
  end
4219
4227
  end
4220
4228
 
4229
+ ObjectiveStateChangedFromState = ["OBJECTIVE_STATE_UNSPECIFIED", "OBJECTIVE_STATE_PENDING", "OBJECTIVE_STATE_RUNNING", "OBJECTIVE_STATE_WAITING", "OBJECTIVE_STATE_FAILED", "OBJECTIVE_STATE_CANCELLED", "OBJECTIVE_STATE_FINALIZED", "OBJECTIVE_STATE_TIMED_OUT"].freeze
4230
+
4231
+ ObjectiveStateChangedToState = ["OBJECTIVE_STATE_UNSPECIFIED", "OBJECTIVE_STATE_PENDING", "OBJECTIVE_STATE_RUNNING", "OBJECTIVE_STATE_WAITING", "OBJECTIVE_STATE_FAILED", "OBJECTIVE_STATE_CANCELLED", "OBJECTIVE_STATE_FINALIZED", "OBJECTIVE_STATE_TIMED_OUT"].freeze
4232
+
4233
+ class ObjectiveStateChanged
4234
+ attr_reader :from_state, :to_state, :message
4235
+
4236
+ def initialize(from_state: nil, to_state: nil, message: nil)
4237
+ @from_state = from_state
4238
+ @to_state = to_state
4239
+ @message = message
4240
+ end
4241
+
4242
+ def self.from_json(data)
4243
+ new(
4244
+ from_state: data["fromState"],
4245
+ to_state: data["toState"],
4246
+ message: data["message"],
4247
+ )
4248
+ end
4249
+
4250
+ def to_h
4251
+ {
4252
+ from_state: Util.plain(@from_state),
4253
+ to_state: Util.plain(@to_state),
4254
+ message: Util.plain(@message),
4255
+ }.reject { |_k, v| v.nil? }
4256
+ end
4257
+ end
4258
+
4221
4259
  class ObjectiveTimedOut
4222
4260
  attr_reader :message
4223
4261
 
@@ -4873,6 +4911,49 @@ module Cadenya
4873
4911
  end
4874
4912
  end
4875
4913
 
4914
+ def self.decode_RemoveAgentVariationAssignmentRequest(data)
4915
+ return nil if data.nil? || data["type"].to_s.empty?
4916
+ case data["type"]
4917
+ when "toolId"
4918
+ Types::RemoveAgentVariationAssignmentRequest_ToolId.from_json(data)
4919
+ when "toolSetId"
4920
+ Types::RemoveAgentVariationAssignmentRequest_ToolSetId.from_json(data)
4921
+ when "subAgentId"
4922
+ Types::RemoveAgentVariationAssignmentRequest_SubAgentId.from_json(data)
4923
+ else
4924
+ raise ArgumentError, "RemoveAgentVariationAssignmentRequest: unknown type #{data["type"].inspect}"
4925
+ end
4926
+ end
4927
+
4928
+ class RemoveAgentVariationMemoryLayerRequest
4929
+ attr_reader :workspace_id, :agent_id, :variation_id, :memory_layer_id
4930
+
4931
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil)
4932
+ @workspace_id = workspace_id
4933
+ @agent_id = agent_id
4934
+ @variation_id = variation_id
4935
+ @memory_layer_id = memory_layer_id
4936
+ end
4937
+
4938
+ def self.from_json(data)
4939
+ new(
4940
+ workspace_id: data["workspaceId"],
4941
+ agent_id: data["agentId"],
4942
+ variation_id: data["variationId"],
4943
+ memory_layer_id: data["memoryLayerId"],
4944
+ )
4945
+ end
4946
+
4947
+ def to_h
4948
+ {
4949
+ workspace_id: Util.plain(@workspace_id),
4950
+ agent_id: Util.plain(@agent_id),
4951
+ variation_id: Util.plain(@variation_id),
4952
+ memory_layer_id: Util.plain(@memory_layer_id),
4953
+ }.reject { |_k, v| v.nil? }
4954
+ end
4955
+ end
4956
+
4876
4957
  ResolvedSecretSource = ["RESOLVED_SECRET_SOURCE_UNSPECIFIED", "RESOLVED_SECRET_SOURCE_WORKSPACE", "RESOLVED_SECRET_SOURCE_TOOLSET", "RESOLVED_SECRET_SOURCE_OBJECTIVE"].freeze
4877
4958
 
4878
4959
  class ResolvedSecret
@@ -6867,13 +6948,13 @@ module Cadenya
6867
6948
  end
6868
6949
 
6869
6950
  class UpdateAgentVariationMemoryLayerRequest
6870
- attr_reader :workspace_id, :agent_id, :variation_id, :id, :position
6951
+ attr_reader :workspace_id, :agent_id, :variation_id, :memory_layer_id, :position
6871
6952
 
6872
- def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, id: nil, position: nil)
6953
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil, position: nil)
6873
6954
  @workspace_id = workspace_id
6874
6955
  @agent_id = agent_id
6875
6956
  @variation_id = variation_id
6876
- @id = id
6957
+ @memory_layer_id = memory_layer_id
6877
6958
  @position = position
6878
6959
  end
6879
6960
 
@@ -6882,7 +6963,7 @@ module Cadenya
6882
6963
  workspace_id: data["workspaceId"],
6883
6964
  agent_id: data["agentId"],
6884
6965
  variation_id: data["variationId"],
6885
- id: data["id"],
6966
+ memory_layer_id: data["memoryLayerId"],
6886
6967
  position: data["position"],
6887
6968
  )
6888
6969
  end
@@ -6892,7 +6973,7 @@ module Cadenya
6892
6973
  workspace_id: Util.plain(@workspace_id),
6893
6974
  agent_id: Util.plain(@agent_id),
6894
6975
  variation_id: Util.plain(@variation_id),
6895
- id: Util.plain(@id),
6976
+ memory_layer_id: Util.plain(@memory_layer_id),
6896
6977
  position: Util.plain(@position),
6897
6978
  }.reject { |_k, v| v.nil? }
6898
6979
  end
@@ -7362,38 +7443,35 @@ module Cadenya
7362
7443
  def self.decode_VariationAssignment(data)
7363
7444
  return nil if data.nil? || data["type"].to_s.empty?
7364
7445
  case data["type"]
7365
- when "tool"
7366
- Types::VariationAssignment_Tool.from_json(data)
7367
- when "toolSet"
7368
- Types::VariationAssignment_ToolSet.from_json(data)
7369
- when "agent"
7370
- Types::VariationAssignment_Agent.from_json(data)
7446
+ when "toolId"
7447
+ Types::VariationAssignment_ToolId.from_json(data)
7448
+ when "toolSetId"
7449
+ Types::VariationAssignment_ToolSetId.from_json(data)
7450
+ when "subAgentId"
7451
+ Types::VariationAssignment_SubAgentId.from_json(data)
7371
7452
  else
7372
7453
  raise ArgumentError, "VariationAssignment: unknown type #{data["type"].inspect}"
7373
7454
  end
7374
7455
  end
7375
7456
 
7376
7457
  class VariationMemoryLayerAssignment
7377
- attr_reader :id, :memory_layer, :position
7458
+ attr_reader :memory_layer_id, :position
7378
7459
 
7379
- def initialize(id: nil, memory_layer: nil, position: nil)
7380
- @id = id
7381
- @memory_layer = memory_layer
7460
+ def initialize(memory_layer_id: nil, position: nil)
7461
+ @memory_layer_id = memory_layer_id
7382
7462
  @position = position
7383
7463
  end
7384
7464
 
7385
7465
  def self.from_json(data)
7386
7466
  new(
7387
- id: data["id"],
7388
- memory_layer: data["memoryLayer"].nil? ? nil : Types::BareMetadata.from_json(data["memoryLayer"]),
7467
+ memory_layer_id: data["memoryLayerId"],
7389
7468
  position: data["position"],
7390
7469
  )
7391
7470
  end
7392
7471
 
7393
7472
  def to_h
7394
7473
  {
7395
- id: Util.plain(@id),
7396
- memory_layer: Util.plain(@memory_layer),
7474
+ memory_layer_id: Util.plain(@memory_layer_id),
7397
7475
  position: Util.plain(@position),
7398
7476
  }.reject { |_k, v| v.nil? }
7399
7477
  end
@@ -7447,7 +7525,7 @@ module Cadenya
7447
7525
 
7448
7526
  WebhookDeliveryDataStatus = ["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
7449
7527
 
7450
- WebhookDeliveryDataEventType = ["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING"].freeze
7528
+ WebhookDeliveryDataEventType = ["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING", "OBJECTIVE_EVENT_TYPE_STATE_CHANGED"].freeze
7451
7529
 
7452
7530
  class WebhookDeliveryData
7453
7531
  attr_reader :agent_id, :objective_id, :objective_event_id, :webhook_url, :webhook_id, :status, :attempt_count, :last_attempt_at, :http_status_code, :error_message, :latency_ms, :event_type, :response_headers, :response_content_length
@@ -7960,80 +8038,71 @@ module Cadenya
7960
8038
  end
7961
8039
  end
7962
8040
 
7963
- class VariationAssignment_Tool
7964
- attr_reader :type, :tool, :id
8041
+ class VariationAssignment_ToolId
8042
+ attr_reader :type, :tool_id
7965
8043
 
7966
- def initialize(type: nil, tool: nil, id: nil)
8044
+ def initialize(type: nil, tool_id: nil)
7967
8045
  @type = type
7968
- @tool = tool
7969
- @id = id
8046
+ @tool_id = tool_id
7970
8047
  end
7971
8048
 
7972
8049
  def self.from_json(data)
7973
8050
  new(
7974
8051
  type: data["type"],
7975
- tool: data["tool"].nil? ? nil : Types::BareMetadata.from_json(data["tool"]),
7976
- id: data["id"],
8052
+ tool_id: data["toolId"],
7977
8053
  )
7978
8054
  end
7979
8055
 
7980
8056
  def to_h
7981
8057
  {
7982
8058
  type: Util.plain(@type),
7983
- tool: Util.plain(@tool),
7984
- id: Util.plain(@id),
8059
+ tool_id: Util.plain(@tool_id),
7985
8060
  }.reject { |_k, v| v.nil? }
7986
8061
  end
7987
8062
  end
7988
8063
 
7989
- class VariationAssignment_ToolSet
7990
- attr_reader :type, :tool_set, :id
8064
+ class VariationAssignment_ToolSetId
8065
+ attr_reader :type, :tool_set_id
7991
8066
 
7992
- def initialize(type: nil, tool_set: nil, id: nil)
8067
+ def initialize(type: nil, tool_set_id: nil)
7993
8068
  @type = type
7994
- @tool_set = tool_set
7995
- @id = id
8069
+ @tool_set_id = tool_set_id
7996
8070
  end
7997
8071
 
7998
8072
  def self.from_json(data)
7999
8073
  new(
8000
8074
  type: data["type"],
8001
- tool_set: data["toolSet"].nil? ? nil : Types::BareMetadata.from_json(data["toolSet"]),
8002
- id: data["id"],
8075
+ tool_set_id: data["toolSetId"],
8003
8076
  )
8004
8077
  end
8005
8078
 
8006
8079
  def to_h
8007
8080
  {
8008
8081
  type: Util.plain(@type),
8009
- tool_set: Util.plain(@tool_set),
8010
- id: Util.plain(@id),
8082
+ tool_set_id: Util.plain(@tool_set_id),
8011
8083
  }.reject { |_k, v| v.nil? }
8012
8084
  end
8013
8085
  end
8014
8086
 
8015
- class VariationAssignment_Agent
8016
- attr_reader :type, :agent, :id
8087
+ class VariationAssignment_SubAgentId
8088
+ attr_reader :type, :sub_agent_id
8017
8089
 
8018
- def initialize(type: nil, agent: nil, id: nil)
8090
+ def initialize(type: nil, sub_agent_id: nil)
8019
8091
  @type = type
8020
- @agent = agent
8021
- @id = id
8092
+ @sub_agent_id = sub_agent_id
8022
8093
  end
8023
8094
 
8024
8095
  def self.from_json(data)
8025
8096
  new(
8026
8097
  type: data["type"],
8027
- agent: data["agent"].nil? ? nil : Types::BareMetadata.from_json(data["agent"]),
8028
- id: data["id"],
8098
+ sub_agent_id: data["subAgentId"],
8029
8099
  )
8030
8100
  end
8031
8101
 
8032
8102
  def to_h
8033
8103
  {
8034
8104
  type: Util.plain(@type),
8035
- agent: Util.plain(@agent),
8036
- id: Util.plain(@id),
8105
+ sub_agent_id: Util.plain(@sub_agent_id),
8037
8106
  }.reject { |_k, v| v.nil? }
8038
8107
  end
8039
8108
  end
@@ -9193,6 +9262,29 @@ module Cadenya
9193
9262
  end
9194
9263
  end
9195
9264
 
9265
+ class ObjectiveEventData_StateChanged
9266
+ attr_reader :type, :state_changed
9267
+
9268
+ def initialize(type: nil, state_changed: nil)
9269
+ @type = type
9270
+ @state_changed = state_changed
9271
+ end
9272
+
9273
+ def self.from_json(data)
9274
+ new(
9275
+ type: data["type"],
9276
+ state_changed: data["stateChanged"].nil? ? nil : Types::ObjectiveStateChanged.from_json(data["stateChanged"]),
9277
+ )
9278
+ end
9279
+
9280
+ def to_h
9281
+ {
9282
+ type: Util.plain(@type),
9283
+ state_changed: Util.plain(@state_changed),
9284
+ }.reject { |_k, v| v.nil? }
9285
+ end
9286
+ end
9287
+
9196
9288
  class CallableTool_Tool
9197
9289
  attr_reader :type, :tool
9198
9290
 
@@ -9485,6 +9577,102 @@ module Cadenya
9485
9577
  end
9486
9578
  end
9487
9579
 
9580
+ class RemoveAgentVariationAssignmentRequest_ToolId
9581
+ attr_reader :type, :tool_id, :workspace_id, :agent_id, :variation_id
9582
+
9583
+ def initialize(type: nil, tool_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9584
+ @type = type
9585
+ @tool_id = tool_id
9586
+ @workspace_id = workspace_id
9587
+ @agent_id = agent_id
9588
+ @variation_id = variation_id
9589
+ end
9590
+
9591
+ def self.from_json(data)
9592
+ new(
9593
+ type: data["type"],
9594
+ tool_id: data["toolId"],
9595
+ workspace_id: data["workspaceId"],
9596
+ agent_id: data["agentId"],
9597
+ variation_id: data["variationId"],
9598
+ )
9599
+ end
9600
+
9601
+ def to_h
9602
+ {
9603
+ type: Util.plain(@type),
9604
+ tool_id: Util.plain(@tool_id),
9605
+ workspace_id: Util.plain(@workspace_id),
9606
+ agent_id: Util.plain(@agent_id),
9607
+ variation_id: Util.plain(@variation_id),
9608
+ }.reject { |_k, v| v.nil? }
9609
+ end
9610
+ end
9611
+
9612
+ class RemoveAgentVariationAssignmentRequest_ToolSetId
9613
+ attr_reader :type, :tool_set_id, :workspace_id, :agent_id, :variation_id
9614
+
9615
+ def initialize(type: nil, tool_set_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9616
+ @type = type
9617
+ @tool_set_id = tool_set_id
9618
+ @workspace_id = workspace_id
9619
+ @agent_id = agent_id
9620
+ @variation_id = variation_id
9621
+ end
9622
+
9623
+ def self.from_json(data)
9624
+ new(
9625
+ type: data["type"],
9626
+ tool_set_id: data["toolSetId"],
9627
+ workspace_id: data["workspaceId"],
9628
+ agent_id: data["agentId"],
9629
+ variation_id: data["variationId"],
9630
+ )
9631
+ end
9632
+
9633
+ def to_h
9634
+ {
9635
+ type: Util.plain(@type),
9636
+ tool_set_id: Util.plain(@tool_set_id),
9637
+ workspace_id: Util.plain(@workspace_id),
9638
+ agent_id: Util.plain(@agent_id),
9639
+ variation_id: Util.plain(@variation_id),
9640
+ }.reject { |_k, v| v.nil? }
9641
+ end
9642
+ end
9643
+
9644
+ class RemoveAgentVariationAssignmentRequest_SubAgentId
9645
+ attr_reader :type, :sub_agent_id, :workspace_id, :agent_id, :variation_id
9646
+
9647
+ def initialize(type: nil, sub_agent_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9648
+ @type = type
9649
+ @sub_agent_id = sub_agent_id
9650
+ @workspace_id = workspace_id
9651
+ @agent_id = agent_id
9652
+ @variation_id = variation_id
9653
+ end
9654
+
9655
+ def self.from_json(data)
9656
+ new(
9657
+ type: data["type"],
9658
+ sub_agent_id: data["subAgentId"],
9659
+ workspace_id: data["workspaceId"],
9660
+ agent_id: data["agentId"],
9661
+ variation_id: data["variationId"],
9662
+ )
9663
+ end
9664
+
9665
+ def to_h
9666
+ {
9667
+ type: Util.plain(@type),
9668
+ sub_agent_id: Util.plain(@sub_agent_id),
9669
+ workspace_id: Util.plain(@workspace_id),
9670
+ agent_id: Util.plain(@agent_id),
9671
+ variation_id: Util.plain(@variation_id),
9672
+ }.reject { |_k, v| v.nil? }
9673
+ end
9674
+ end
9675
+
9488
9676
  class AIProviderCredential_ApiKey
9489
9677
  attr_reader :type, :api_key
9490
9678
 
@@ -9859,13 +10047,13 @@ module Cadenya
9859
10047
 
9860
10048
  AgentServiceListAgentFeedbackSentiment = ["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
9861
10049
 
9862
- AgentServiceListAgentWebhookDeliveriesEventType = ["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING"].freeze
10050
+ AgentServiceListAgentWebhookDeliveriesEventType = ["OBJECTIVE_EVENT_TYPE_UNSPECIFIED", "OBJECTIVE_EVENT_TYPE_USER_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVAL_REQUESTED", "OBJECTIVE_EVENT_TYPE_TOOL_APPROVED", "OBJECTIVE_EVENT_TYPE_TOOL_DENIED", "OBJECTIVE_EVENT_TYPE_TOOL_CALLED", "OBJECTIVE_EVENT_TYPE_ERROR", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE", "OBJECTIVE_EVENT_TYPE_TOOL_RESULT", "OBJECTIVE_EVENT_TYPE_TOOL_ERROR", "OBJECTIVE_EVENT_TYPE_CONTEXT_WINDOW_COMPACTED", "OBJECTIVE_EVENT_TYPE_MEMORY_READ", "OBJECTIVE_EVENT_TYPE_CANCELLED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED", "OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED", "OBJECTIVE_EVENT_TYPE_FINALIZED", "OBJECTIVE_EVENT_TYPE_NOTICE", "OBJECTIVE_EVENT_TYPE_TIMED_OUT", "OBJECTIVE_EVENT_TYPE_REASONING", "OBJECTIVE_EVENT_TYPE_STATE_CHANGED"].freeze
9863
10051
 
9864
10052
  MemoryServiceListMemoryLayersType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
9865
10053
 
9866
10054
  ModelServiceListModelsState = ["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
9867
10055
 
9868
- ObjectiveServiceListObjectivesState = ["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
10056
+ ObjectiveServiceListObjectivesState = ["OBJECTIVE_STATE_UNSPECIFIED", "OBJECTIVE_STATE_PENDING", "OBJECTIVE_STATE_RUNNING", "OBJECTIVE_STATE_WAITING", "OBJECTIVE_STATE_FAILED", "OBJECTIVE_STATE_CANCELLED", "OBJECTIVE_STATE_FINALIZED", "OBJECTIVE_STATE_TIMED_OUT"].freeze
9869
10057
 
9870
10058
  ObjectiveServiceListObjectiveToolCallsStatus = ["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
9871
10059
 
@@ -10066,6 +10254,9 @@ module Cadenya
10066
10254
  "compactionConfig" => ["compactionConfig", ->(_v) { encode_AgentVariationSpec_CompactionConfig(_v) }],
10067
10255
  "first_user_message_template" => ["firstUserMessageTemplate", nil],
10068
10256
  "firstUserMessageTemplate" => ["firstUserMessageTemplate", nil],
10257
+ "assignments" => ["assignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationAssignment(_v) }).call(_i) } : _v }],
10258
+ "memory_layer_assignments" => ["memoryLayerAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationMemoryLayerAssignment(_v) }).call(_i) } : _v }],
10259
+ "memoryLayerAssignments" => ["memoryLayerAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationMemoryLayerAssignment(_v) }).call(_i) } : _v }],
10069
10260
  }.freeze
10070
10261
 
10071
10262
  def self.encode_AgentVariationSpec(data)
@@ -10511,6 +10702,24 @@ module Cadenya
10511
10702
  encode_fields(ENCODE_PARAMETER_ACTION_SET, data)
10512
10703
  end
10513
10704
 
10705
+ def self.encode_RemoveAgentVariationAssignmentRequest(data)
10706
+ data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
10707
+ unless data.is_a?(Hash)
10708
+ raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
10709
+ end
10710
+
10711
+ case data["type"] || data[:type]
10712
+ when "toolId"
10713
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_ToolId(_v) }).call(data)
10714
+ when "toolSetId"
10715
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_ToolSetId(_v) }).call(data)
10716
+ when "subAgentId"
10717
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_SubAgentId(_v) }).call(data)
10718
+ else
10719
+ data
10720
+ end
10721
+ end
10722
+
10514
10723
  ENCODE_RESULT_ACTION_TRANSFORM = {
10515
10724
  "content_template" => ["contentTemplate", nil],
10516
10725
  "contentTemplate" => ["contentTemplate", nil],
@@ -10960,6 +11169,34 @@ module Cadenya
10960
11169
  encode_fields(ENCODE_UPLOAD_SPEC, data)
10961
11170
  end
10962
11171
 
11172
+ def self.encode_VariationAssignment(data)
11173
+ data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
11174
+ unless data.is_a?(Hash)
11175
+ raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
11176
+ end
11177
+
11178
+ case data["type"] || data[:type]
11179
+ when "toolId"
11180
+ (->(_v) { encode_VariationAssignment_ToolId(_v) }).call(data)
11181
+ when "toolSetId"
11182
+ (->(_v) { encode_VariationAssignment_ToolSetId(_v) }).call(data)
11183
+ when "subAgentId"
11184
+ (->(_v) { encode_VariationAssignment_SubAgentId(_v) }).call(data)
11185
+ else
11186
+ data
11187
+ end
11188
+ end
11189
+
11190
+ ENCODE_VARIATION_MEMORY_LAYER_ASSIGNMENT = {
11191
+ "memory_layer_id" => ["memoryLayerId", nil],
11192
+ "memoryLayerId" => ["memoryLayerId", nil],
11193
+ "position" => ["position", nil],
11194
+ }.freeze
11195
+
11196
+ def self.encode_VariationMemoryLayerAssignment(data)
11197
+ encode_fields(ENCODE_VARIATION_MEMORY_LAYER_ASSIGNMENT, data)
11198
+ end
11199
+
10963
11200
  ENCODE_VERTEX_CONFIG = {
10964
11201
  "project_id" => ["projectId", nil],
10965
11202
  "projectId" => ["projectId", nil],
@@ -11016,6 +11253,36 @@ module Cadenya
11016
11253
  encode_fields(ENCODE_WORKSPACE_SPEC, data)
11017
11254
  end
11018
11255
 
11256
+ ENCODE_VARIATION_ASSIGNMENT_TOOL_ID = {
11257
+ "type" => ["type", nil],
11258
+ "tool_id" => ["toolId", nil],
11259
+ "toolId" => ["toolId", nil],
11260
+ }.freeze
11261
+
11262
+ def self.encode_VariationAssignment_ToolId(data)
11263
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_TOOL_ID, data)
11264
+ end
11265
+
11266
+ ENCODE_VARIATION_ASSIGNMENT_TOOL_SET_ID = {
11267
+ "type" => ["type", nil],
11268
+ "tool_set_id" => ["toolSetId", nil],
11269
+ "toolSetId" => ["toolSetId", nil],
11270
+ }.freeze
11271
+
11272
+ def self.encode_VariationAssignment_ToolSetId(data)
11273
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_TOOL_SET_ID, data)
11274
+ end
11275
+
11276
+ ENCODE_VARIATION_ASSIGNMENT_SUB_AGENT_ID = {
11277
+ "type" => ["type", nil],
11278
+ "sub_agent_id" => ["subAgentId", nil],
11279
+ "subAgentId" => ["subAgentId", nil],
11280
+ }.freeze
11281
+
11282
+ def self.encode_VariationAssignment_SubAgentId(data)
11283
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_SUB_AGENT_ID, data)
11284
+ end
11285
+
11019
11286
  ENCODE_TOOL_SET_ADAPTER_MCP_VARIANT = {
11020
11287
  "type" => ["type", nil],
11021
11288
  "mcp" => ["mcp", ->(_v) { encode_ToolSetAdapter_MCP(_v) }],
@@ -11354,6 +11621,42 @@ module Cadenya
11354
11621
  encode_fields(ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID, data, drop: DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID)
11355
11622
  end
11356
11623
 
11624
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID = {
11625
+ "type" => ["type", nil],
11626
+ "tool_id" => ["toolId", nil],
11627
+ "toolId" => ["toolId", nil],
11628
+ }.freeze
11629
+
11630
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11631
+
11632
+ def self.encode_RemoveAgentVariationAssignmentRequest_ToolId(data)
11633
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID)
11634
+ end
11635
+
11636
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID = {
11637
+ "type" => ["type", nil],
11638
+ "tool_set_id" => ["toolSetId", nil],
11639
+ "toolSetId" => ["toolSetId", nil],
11640
+ }.freeze
11641
+
11642
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11643
+
11644
+ def self.encode_RemoveAgentVariationAssignmentRequest_ToolSetId(data)
11645
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID)
11646
+ end
11647
+
11648
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID = {
11649
+ "type" => ["type", nil],
11650
+ "sub_agent_id" => ["subAgentId", nil],
11651
+ "subAgentId" => ["subAgentId", nil],
11652
+ }.freeze
11653
+
11654
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11655
+
11656
+ def self.encode_RemoveAgentVariationAssignmentRequest_SubAgentId(data)
11657
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID)
11658
+ end
11659
+
11357
11660
  ENCODE_AI_PROVIDER_CREDENTIAL_API_KEY = {
11358
11661
  "type" => ["type", nil],
11359
11662
  "api_key" => ["apiKey", ->(_v) { encode_CredentialAPIKey(_v) }],
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadenya
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cadenya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-09-09 00:00:00.000000000 Z
11
+ date: 2026-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday