cadenya 1.1.0 → 1.2.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: 013b58ef0934a5ca4ea7040a002c80dbfeaf0f3b02f138f5d6925e6961a51295
4
+ data.tar.gz: a7c8de763e5b93f1def5de75836d3866ff5549d20493f34682efb62ef75358e7
5
5
  SHA512:
6
- metadata.gz: d5ad906af80f5f85092cb525d853b84a63d4bc5561423b05445b8c0ef7dbcd6d745630126a95baced17950c0b731e81735932912845babf5cbcab1c8d2782de2
7
- data.tar.gz: d03190e5823c1be2bbe24c2c2a564f141c65bcab927abc9c57e8464ef10f365fa7712ebf09facfab243a3bc3b2d705b80657f8a888d23409f8d5c473642242d2
6
+ metadata.gz: 841ee4ca3c6a6894bb9d1eaa56c97da4d27f162a35b7e35006493fed23ba7106fb1dc7188a5b30b9d24c0cf4e1d5633096d3da4ca3f2f1677e31d27dab57ee04
7
+ data.tar.gz: 9c44b073058d366d5176e58bc810ce0c0444a42cd2e64d6d67793cea5ab35e532ec43d6776624107b18eea7acad159b6a1be5fce6cd73b9359f7cc7b9df2fa91
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.2.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
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)
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,8 @@ 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
740
739
  end
741
740
 
742
741
  def self.from_json(data)
@@ -748,9 +747,8 @@ module Cadenya
748
747
  model: data["model"].nil? ? nil : Types::ResourceMetadata.from_json(data["model"]),
749
748
  score: data["score"],
750
749
  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
750
  memory_layer_count: data["memoryLayerCount"],
751
+ effective_tool_count: data["effectiveToolCount"],
754
752
  )
755
753
  end
756
754
 
@@ -763,17 +761,16 @@ module Cadenya
763
761
  model: Util.plain(@model),
764
762
  score: Util.plain(@score),
765
763
  feedback_count: Util.plain(@feedback_count),
766
- assignments: Util.plain(@assignments),
767
- memory_layer_assignments: Util.plain(@memory_layer_assignments),
768
764
  memory_layer_count: Util.plain(@memory_layer_count),
765
+ effective_tool_count: Util.plain(@effective_tool_count),
769
766
  }.reject { |_k, v| v.nil? }
770
767
  end
771
768
  end
772
769
 
773
770
  class AgentVariationSpec
774
- attr_reader :system_prompt_template, :progressive_discovery, :constraints, :description, :model_config, :compaction_config, :first_user_message_template
771
+ attr_reader :system_prompt_template, :progressive_discovery, :constraints, :description, :model_config, :compaction_config, :first_user_message_template, :assignments, :memory_layer_assignments
775
772
 
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)
773
+ 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
774
  @system_prompt_template = system_prompt_template
778
775
  @progressive_discovery = progressive_discovery
779
776
  @constraints = constraints
@@ -781,6 +778,8 @@ module Cadenya
781
778
  @model_config = model_config
782
779
  @compaction_config = compaction_config
783
780
  @first_user_message_template = first_user_message_template
781
+ @assignments = assignments
782
+ @memory_layer_assignments = memory_layer_assignments
784
783
  end
785
784
 
786
785
  def self.from_json(data)
@@ -792,6 +791,8 @@ module Cadenya
792
791
  model_config: data["modelConfig"].nil? ? nil : Types::AgentVariationSpec_ModelConfig.from_json(data["modelConfig"]),
793
792
  compaction_config: data["compactionConfig"].nil? ? nil : Types::AgentVariationSpec_CompactionConfig.from_json(data["compactionConfig"]),
794
793
  first_user_message_template: data["firstUserMessageTemplate"],
794
+ assignments: data["assignments"].nil? ? nil : (data["assignments"]).map { |item| Types.decode_VariationAssignment(item) },
795
+ memory_layer_assignments: data["memoryLayerAssignments"].nil? ? nil : (data["memoryLayerAssignments"]).map { |item| Types::VariationMemoryLayerAssignment.from_json(item) },
795
796
  )
796
797
  end
797
798
 
@@ -804,6 +805,8 @@ module Cadenya
804
805
  model_config: Util.plain(@model_config),
805
806
  compaction_config: Util.plain(@compaction_config),
806
807
  first_user_message_template: Util.plain(@first_user_message_template),
808
+ assignments: Util.plain(@assignments),
809
+ memory_layer_assignments: Util.plain(@memory_layer_assignments),
807
810
  }.reject { |_k, v| v.nil? }
808
811
  end
809
812
  end
@@ -3699,7 +3702,7 @@ module Cadenya
3699
3702
  end
3700
3703
  end
3701
3704
 
3702
- ObjectiveState = ["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
3705
+ 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
3706
 
3704
3707
  class Objective
3705
3708
  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 +4039,8 @@ module Cadenya
4036
4039
  Types::ObjectiveEventData_TimedOut.from_json(data)
4037
4040
  when "reasoning"
4038
4041
  Types::ObjectiveEventData_Reasoning.from_json(data)
4042
+ when "stateChanged"
4043
+ Types::ObjectiveEventData_StateChanged.from_json(data)
4039
4044
  else
4040
4045
  raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
4041
4046
  end
@@ -4218,6 +4223,36 @@ module Cadenya
4218
4223
  end
4219
4224
  end
4220
4225
 
4226
+ 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
4227
+
4228
+ 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
4229
+
4230
+ class ObjectiveStateChanged
4231
+ attr_reader :from_state, :to_state, :message
4232
+
4233
+ def initialize(from_state: nil, to_state: nil, message: nil)
4234
+ @from_state = from_state
4235
+ @to_state = to_state
4236
+ @message = message
4237
+ end
4238
+
4239
+ def self.from_json(data)
4240
+ new(
4241
+ from_state: data["fromState"],
4242
+ to_state: data["toState"],
4243
+ message: data["message"],
4244
+ )
4245
+ end
4246
+
4247
+ def to_h
4248
+ {
4249
+ from_state: Util.plain(@from_state),
4250
+ to_state: Util.plain(@to_state),
4251
+ message: Util.plain(@message),
4252
+ }.reject { |_k, v| v.nil? }
4253
+ end
4254
+ end
4255
+
4221
4256
  class ObjectiveTimedOut
4222
4257
  attr_reader :message
4223
4258
 
@@ -4873,6 +4908,49 @@ module Cadenya
4873
4908
  end
4874
4909
  end
4875
4910
 
4911
+ def self.decode_RemoveAgentVariationAssignmentRequest(data)
4912
+ return nil if data.nil? || data["type"].to_s.empty?
4913
+ case data["type"]
4914
+ when "toolId"
4915
+ Types::RemoveAgentVariationAssignmentRequest_ToolId.from_json(data)
4916
+ when "toolSetId"
4917
+ Types::RemoveAgentVariationAssignmentRequest_ToolSetId.from_json(data)
4918
+ when "subAgentId"
4919
+ Types::RemoveAgentVariationAssignmentRequest_SubAgentId.from_json(data)
4920
+ else
4921
+ raise ArgumentError, "RemoveAgentVariationAssignmentRequest: unknown type #{data["type"].inspect}"
4922
+ end
4923
+ end
4924
+
4925
+ class RemoveAgentVariationMemoryLayerRequest
4926
+ attr_reader :workspace_id, :agent_id, :variation_id, :memory_layer_id
4927
+
4928
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil)
4929
+ @workspace_id = workspace_id
4930
+ @agent_id = agent_id
4931
+ @variation_id = variation_id
4932
+ @memory_layer_id = memory_layer_id
4933
+ end
4934
+
4935
+ def self.from_json(data)
4936
+ new(
4937
+ workspace_id: data["workspaceId"],
4938
+ agent_id: data["agentId"],
4939
+ variation_id: data["variationId"],
4940
+ memory_layer_id: data["memoryLayerId"],
4941
+ )
4942
+ end
4943
+
4944
+ def to_h
4945
+ {
4946
+ workspace_id: Util.plain(@workspace_id),
4947
+ agent_id: Util.plain(@agent_id),
4948
+ variation_id: Util.plain(@variation_id),
4949
+ memory_layer_id: Util.plain(@memory_layer_id),
4950
+ }.reject { |_k, v| v.nil? }
4951
+ end
4952
+ end
4953
+
4876
4954
  ResolvedSecretSource = ["RESOLVED_SECRET_SOURCE_UNSPECIFIED", "RESOLVED_SECRET_SOURCE_WORKSPACE", "RESOLVED_SECRET_SOURCE_TOOLSET", "RESOLVED_SECRET_SOURCE_OBJECTIVE"].freeze
4877
4955
 
4878
4956
  class ResolvedSecret
@@ -6867,13 +6945,13 @@ module Cadenya
6867
6945
  end
6868
6946
 
6869
6947
  class UpdateAgentVariationMemoryLayerRequest
6870
- attr_reader :workspace_id, :agent_id, :variation_id, :id, :position
6948
+ attr_reader :workspace_id, :agent_id, :variation_id, :memory_layer_id, :position
6871
6949
 
6872
- def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, id: nil, position: nil)
6950
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, memory_layer_id: nil, position: nil)
6873
6951
  @workspace_id = workspace_id
6874
6952
  @agent_id = agent_id
6875
6953
  @variation_id = variation_id
6876
- @id = id
6954
+ @memory_layer_id = memory_layer_id
6877
6955
  @position = position
6878
6956
  end
6879
6957
 
@@ -6882,7 +6960,7 @@ module Cadenya
6882
6960
  workspace_id: data["workspaceId"],
6883
6961
  agent_id: data["agentId"],
6884
6962
  variation_id: data["variationId"],
6885
- id: data["id"],
6963
+ memory_layer_id: data["memoryLayerId"],
6886
6964
  position: data["position"],
6887
6965
  )
6888
6966
  end
@@ -6892,7 +6970,7 @@ module Cadenya
6892
6970
  workspace_id: Util.plain(@workspace_id),
6893
6971
  agent_id: Util.plain(@agent_id),
6894
6972
  variation_id: Util.plain(@variation_id),
6895
- id: Util.plain(@id),
6973
+ memory_layer_id: Util.plain(@memory_layer_id),
6896
6974
  position: Util.plain(@position),
6897
6975
  }.reject { |_k, v| v.nil? }
6898
6976
  end
@@ -7362,38 +7440,35 @@ module Cadenya
7362
7440
  def self.decode_VariationAssignment(data)
7363
7441
  return nil if data.nil? || data["type"].to_s.empty?
7364
7442
  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)
7443
+ when "toolId"
7444
+ Types::VariationAssignment_ToolId.from_json(data)
7445
+ when "toolSetId"
7446
+ Types::VariationAssignment_ToolSetId.from_json(data)
7447
+ when "subAgentId"
7448
+ Types::VariationAssignment_SubAgentId.from_json(data)
7371
7449
  else
7372
7450
  raise ArgumentError, "VariationAssignment: unknown type #{data["type"].inspect}"
7373
7451
  end
7374
7452
  end
7375
7453
 
7376
7454
  class VariationMemoryLayerAssignment
7377
- attr_reader :id, :memory_layer, :position
7455
+ attr_reader :memory_layer_id, :position
7378
7456
 
7379
- def initialize(id: nil, memory_layer: nil, position: nil)
7380
- @id = id
7381
- @memory_layer = memory_layer
7457
+ def initialize(memory_layer_id: nil, position: nil)
7458
+ @memory_layer_id = memory_layer_id
7382
7459
  @position = position
7383
7460
  end
7384
7461
 
7385
7462
  def self.from_json(data)
7386
7463
  new(
7387
- id: data["id"],
7388
- memory_layer: data["memoryLayer"].nil? ? nil : Types::BareMetadata.from_json(data["memoryLayer"]),
7464
+ memory_layer_id: data["memoryLayerId"],
7389
7465
  position: data["position"],
7390
7466
  )
7391
7467
  end
7392
7468
 
7393
7469
  def to_h
7394
7470
  {
7395
- id: Util.plain(@id),
7396
- memory_layer: Util.plain(@memory_layer),
7471
+ memory_layer_id: Util.plain(@memory_layer_id),
7397
7472
  position: Util.plain(@position),
7398
7473
  }.reject { |_k, v| v.nil? }
7399
7474
  end
@@ -7447,7 +7522,7 @@ module Cadenya
7447
7522
 
7448
7523
  WebhookDeliveryDataStatus = ["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
7449
7524
 
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
7525
+ 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
7526
 
7452
7527
  class WebhookDeliveryData
7453
7528
  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 +8035,71 @@ module Cadenya
7960
8035
  end
7961
8036
  end
7962
8037
 
7963
- class VariationAssignment_Tool
7964
- attr_reader :type, :tool, :id
8038
+ class VariationAssignment_ToolId
8039
+ attr_reader :type, :tool_id
7965
8040
 
7966
- def initialize(type: nil, tool: nil, id: nil)
8041
+ def initialize(type: nil, tool_id: nil)
7967
8042
  @type = type
7968
- @tool = tool
7969
- @id = id
8043
+ @tool_id = tool_id
7970
8044
  end
7971
8045
 
7972
8046
  def self.from_json(data)
7973
8047
  new(
7974
8048
  type: data["type"],
7975
- tool: data["tool"].nil? ? nil : Types::BareMetadata.from_json(data["tool"]),
7976
- id: data["id"],
8049
+ tool_id: data["toolId"],
7977
8050
  )
7978
8051
  end
7979
8052
 
7980
8053
  def to_h
7981
8054
  {
7982
8055
  type: Util.plain(@type),
7983
- tool: Util.plain(@tool),
7984
- id: Util.plain(@id),
8056
+ tool_id: Util.plain(@tool_id),
7985
8057
  }.reject { |_k, v| v.nil? }
7986
8058
  end
7987
8059
  end
7988
8060
 
7989
- class VariationAssignment_ToolSet
7990
- attr_reader :type, :tool_set, :id
8061
+ class VariationAssignment_ToolSetId
8062
+ attr_reader :type, :tool_set_id
7991
8063
 
7992
- def initialize(type: nil, tool_set: nil, id: nil)
8064
+ def initialize(type: nil, tool_set_id: nil)
7993
8065
  @type = type
7994
- @tool_set = tool_set
7995
- @id = id
8066
+ @tool_set_id = tool_set_id
7996
8067
  end
7997
8068
 
7998
8069
  def self.from_json(data)
7999
8070
  new(
8000
8071
  type: data["type"],
8001
- tool_set: data["toolSet"].nil? ? nil : Types::BareMetadata.from_json(data["toolSet"]),
8002
- id: data["id"],
8072
+ tool_set_id: data["toolSetId"],
8003
8073
  )
8004
8074
  end
8005
8075
 
8006
8076
  def to_h
8007
8077
  {
8008
8078
  type: Util.plain(@type),
8009
- tool_set: Util.plain(@tool_set),
8010
- id: Util.plain(@id),
8079
+ tool_set_id: Util.plain(@tool_set_id),
8011
8080
  }.reject { |_k, v| v.nil? }
8012
8081
  end
8013
8082
  end
8014
8083
 
8015
- class VariationAssignment_Agent
8016
- attr_reader :type, :agent, :id
8084
+ class VariationAssignment_SubAgentId
8085
+ attr_reader :type, :sub_agent_id
8017
8086
 
8018
- def initialize(type: nil, agent: nil, id: nil)
8087
+ def initialize(type: nil, sub_agent_id: nil)
8019
8088
  @type = type
8020
- @agent = agent
8021
- @id = id
8089
+ @sub_agent_id = sub_agent_id
8022
8090
  end
8023
8091
 
8024
8092
  def self.from_json(data)
8025
8093
  new(
8026
8094
  type: data["type"],
8027
- agent: data["agent"].nil? ? nil : Types::BareMetadata.from_json(data["agent"]),
8028
- id: data["id"],
8095
+ sub_agent_id: data["subAgentId"],
8029
8096
  )
8030
8097
  end
8031
8098
 
8032
8099
  def to_h
8033
8100
  {
8034
8101
  type: Util.plain(@type),
8035
- agent: Util.plain(@agent),
8036
- id: Util.plain(@id),
8102
+ sub_agent_id: Util.plain(@sub_agent_id),
8037
8103
  }.reject { |_k, v| v.nil? }
8038
8104
  end
8039
8105
  end
@@ -9193,6 +9259,29 @@ module Cadenya
9193
9259
  end
9194
9260
  end
9195
9261
 
9262
+ class ObjectiveEventData_StateChanged
9263
+ attr_reader :type, :state_changed
9264
+
9265
+ def initialize(type: nil, state_changed: nil)
9266
+ @type = type
9267
+ @state_changed = state_changed
9268
+ end
9269
+
9270
+ def self.from_json(data)
9271
+ new(
9272
+ type: data["type"],
9273
+ state_changed: data["stateChanged"].nil? ? nil : Types::ObjectiveStateChanged.from_json(data["stateChanged"]),
9274
+ )
9275
+ end
9276
+
9277
+ def to_h
9278
+ {
9279
+ type: Util.plain(@type),
9280
+ state_changed: Util.plain(@state_changed),
9281
+ }.reject { |_k, v| v.nil? }
9282
+ end
9283
+ end
9284
+
9196
9285
  class CallableTool_Tool
9197
9286
  attr_reader :type, :tool
9198
9287
 
@@ -9485,6 +9574,102 @@ module Cadenya
9485
9574
  end
9486
9575
  end
9487
9576
 
9577
+ class RemoveAgentVariationAssignmentRequest_ToolId
9578
+ attr_reader :type, :tool_id, :workspace_id, :agent_id, :variation_id
9579
+
9580
+ def initialize(type: nil, tool_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9581
+ @type = type
9582
+ @tool_id = tool_id
9583
+ @workspace_id = workspace_id
9584
+ @agent_id = agent_id
9585
+ @variation_id = variation_id
9586
+ end
9587
+
9588
+ def self.from_json(data)
9589
+ new(
9590
+ type: data["type"],
9591
+ tool_id: data["toolId"],
9592
+ workspace_id: data["workspaceId"],
9593
+ agent_id: data["agentId"],
9594
+ variation_id: data["variationId"],
9595
+ )
9596
+ end
9597
+
9598
+ def to_h
9599
+ {
9600
+ type: Util.plain(@type),
9601
+ tool_id: Util.plain(@tool_id),
9602
+ workspace_id: Util.plain(@workspace_id),
9603
+ agent_id: Util.plain(@agent_id),
9604
+ variation_id: Util.plain(@variation_id),
9605
+ }.reject { |_k, v| v.nil? }
9606
+ end
9607
+ end
9608
+
9609
+ class RemoveAgentVariationAssignmentRequest_ToolSetId
9610
+ attr_reader :type, :tool_set_id, :workspace_id, :agent_id, :variation_id
9611
+
9612
+ def initialize(type: nil, tool_set_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9613
+ @type = type
9614
+ @tool_set_id = tool_set_id
9615
+ @workspace_id = workspace_id
9616
+ @agent_id = agent_id
9617
+ @variation_id = variation_id
9618
+ end
9619
+
9620
+ def self.from_json(data)
9621
+ new(
9622
+ type: data["type"],
9623
+ tool_set_id: data["toolSetId"],
9624
+ workspace_id: data["workspaceId"],
9625
+ agent_id: data["agentId"],
9626
+ variation_id: data["variationId"],
9627
+ )
9628
+ end
9629
+
9630
+ def to_h
9631
+ {
9632
+ type: Util.plain(@type),
9633
+ tool_set_id: Util.plain(@tool_set_id),
9634
+ workspace_id: Util.plain(@workspace_id),
9635
+ agent_id: Util.plain(@agent_id),
9636
+ variation_id: Util.plain(@variation_id),
9637
+ }.reject { |_k, v| v.nil? }
9638
+ end
9639
+ end
9640
+
9641
+ class RemoveAgentVariationAssignmentRequest_SubAgentId
9642
+ attr_reader :type, :sub_agent_id, :workspace_id, :agent_id, :variation_id
9643
+
9644
+ def initialize(type: nil, sub_agent_id: nil, workspace_id: nil, agent_id: nil, variation_id: nil)
9645
+ @type = type
9646
+ @sub_agent_id = sub_agent_id
9647
+ @workspace_id = workspace_id
9648
+ @agent_id = agent_id
9649
+ @variation_id = variation_id
9650
+ end
9651
+
9652
+ def self.from_json(data)
9653
+ new(
9654
+ type: data["type"],
9655
+ sub_agent_id: data["subAgentId"],
9656
+ workspace_id: data["workspaceId"],
9657
+ agent_id: data["agentId"],
9658
+ variation_id: data["variationId"],
9659
+ )
9660
+ end
9661
+
9662
+ def to_h
9663
+ {
9664
+ type: Util.plain(@type),
9665
+ sub_agent_id: Util.plain(@sub_agent_id),
9666
+ workspace_id: Util.plain(@workspace_id),
9667
+ agent_id: Util.plain(@agent_id),
9668
+ variation_id: Util.plain(@variation_id),
9669
+ }.reject { |_k, v| v.nil? }
9670
+ end
9671
+ end
9672
+
9488
9673
  class AIProviderCredential_ApiKey
9489
9674
  attr_reader :type, :api_key
9490
9675
 
@@ -9859,13 +10044,13 @@ module Cadenya
9859
10044
 
9860
10045
  AgentServiceListAgentFeedbackSentiment = ["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
9861
10046
 
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
10047
+ 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
10048
 
9864
10049
  MemoryServiceListMemoryLayersType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
9865
10050
 
9866
10051
  ModelServiceListModelsState = ["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
9867
10052
 
9868
- ObjectiveServiceListObjectivesState = ["STATE_UNSPECIFIED", "STATE_PENDING", "STATE_RUNNING", "STATE_WAITING", "STATE_FAILED", "STATE_CANCELLED", "STATE_FINALIZED", "STATE_TIMED_OUT"].freeze
10053
+ 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
10054
 
9870
10055
  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
10056
 
@@ -10066,6 +10251,9 @@ module Cadenya
10066
10251
  "compactionConfig" => ["compactionConfig", ->(_v) { encode_AgentVariationSpec_CompactionConfig(_v) }],
10067
10252
  "first_user_message_template" => ["firstUserMessageTemplate", nil],
10068
10253
  "firstUserMessageTemplate" => ["firstUserMessageTemplate", nil],
10254
+ "assignments" => ["assignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationAssignment(_v) }).call(_i) } : _v }],
10255
+ "memory_layer_assignments" => ["memoryLayerAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationMemoryLayerAssignment(_v) }).call(_i) } : _v }],
10256
+ "memoryLayerAssignments" => ["memoryLayerAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_VariationMemoryLayerAssignment(_v) }).call(_i) } : _v }],
10069
10257
  }.freeze
10070
10258
 
10071
10259
  def self.encode_AgentVariationSpec(data)
@@ -10511,6 +10699,24 @@ module Cadenya
10511
10699
  encode_fields(ENCODE_PARAMETER_ACTION_SET, data)
10512
10700
  end
10513
10701
 
10702
+ def self.encode_RemoveAgentVariationAssignmentRequest(data)
10703
+ data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
10704
+ unless data.is_a?(Hash)
10705
+ raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
10706
+ end
10707
+
10708
+ case data["type"] || data[:type]
10709
+ when "toolId"
10710
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_ToolId(_v) }).call(data)
10711
+ when "toolSetId"
10712
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_ToolSetId(_v) }).call(data)
10713
+ when "subAgentId"
10714
+ (->(_v) { encode_RemoveAgentVariationAssignmentRequest_SubAgentId(_v) }).call(data)
10715
+ else
10716
+ data
10717
+ end
10718
+ end
10719
+
10514
10720
  ENCODE_RESULT_ACTION_TRANSFORM = {
10515
10721
  "content_template" => ["contentTemplate", nil],
10516
10722
  "contentTemplate" => ["contentTemplate", nil],
@@ -10960,6 +11166,34 @@ module Cadenya
10960
11166
  encode_fields(ENCODE_UPLOAD_SPEC, data)
10961
11167
  end
10962
11168
 
11169
+ def self.encode_VariationAssignment(data)
11170
+ data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
11171
+ unless data.is_a?(Hash)
11172
+ raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
11173
+ end
11174
+
11175
+ case data["type"] || data[:type]
11176
+ when "toolId"
11177
+ (->(_v) { encode_VariationAssignment_ToolId(_v) }).call(data)
11178
+ when "toolSetId"
11179
+ (->(_v) { encode_VariationAssignment_ToolSetId(_v) }).call(data)
11180
+ when "subAgentId"
11181
+ (->(_v) { encode_VariationAssignment_SubAgentId(_v) }).call(data)
11182
+ else
11183
+ data
11184
+ end
11185
+ end
11186
+
11187
+ ENCODE_VARIATION_MEMORY_LAYER_ASSIGNMENT = {
11188
+ "memory_layer_id" => ["memoryLayerId", nil],
11189
+ "memoryLayerId" => ["memoryLayerId", nil],
11190
+ "position" => ["position", nil],
11191
+ }.freeze
11192
+
11193
+ def self.encode_VariationMemoryLayerAssignment(data)
11194
+ encode_fields(ENCODE_VARIATION_MEMORY_LAYER_ASSIGNMENT, data)
11195
+ end
11196
+
10963
11197
  ENCODE_VERTEX_CONFIG = {
10964
11198
  "project_id" => ["projectId", nil],
10965
11199
  "projectId" => ["projectId", nil],
@@ -11016,6 +11250,36 @@ module Cadenya
11016
11250
  encode_fields(ENCODE_WORKSPACE_SPEC, data)
11017
11251
  end
11018
11252
 
11253
+ ENCODE_VARIATION_ASSIGNMENT_TOOL_ID = {
11254
+ "type" => ["type", nil],
11255
+ "tool_id" => ["toolId", nil],
11256
+ "toolId" => ["toolId", nil],
11257
+ }.freeze
11258
+
11259
+ def self.encode_VariationAssignment_ToolId(data)
11260
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_TOOL_ID, data)
11261
+ end
11262
+
11263
+ ENCODE_VARIATION_ASSIGNMENT_TOOL_SET_ID = {
11264
+ "type" => ["type", nil],
11265
+ "tool_set_id" => ["toolSetId", nil],
11266
+ "toolSetId" => ["toolSetId", nil],
11267
+ }.freeze
11268
+
11269
+ def self.encode_VariationAssignment_ToolSetId(data)
11270
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_TOOL_SET_ID, data)
11271
+ end
11272
+
11273
+ ENCODE_VARIATION_ASSIGNMENT_SUB_AGENT_ID = {
11274
+ "type" => ["type", nil],
11275
+ "sub_agent_id" => ["subAgentId", nil],
11276
+ "subAgentId" => ["subAgentId", nil],
11277
+ }.freeze
11278
+
11279
+ def self.encode_VariationAssignment_SubAgentId(data)
11280
+ encode_fields(ENCODE_VARIATION_ASSIGNMENT_SUB_AGENT_ID, data)
11281
+ end
11282
+
11019
11283
  ENCODE_TOOL_SET_ADAPTER_MCP_VARIANT = {
11020
11284
  "type" => ["type", nil],
11021
11285
  "mcp" => ["mcp", ->(_v) { encode_ToolSetAdapter_MCP(_v) }],
@@ -11354,6 +11618,42 @@ module Cadenya
11354
11618
  encode_fields(ENCODE_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID, data, drop: DROP_ADD_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID)
11355
11619
  end
11356
11620
 
11621
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID = {
11622
+ "type" => ["type", nil],
11623
+ "tool_id" => ["toolId", nil],
11624
+ "toolId" => ["toolId", nil],
11625
+ }.freeze
11626
+
11627
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11628
+
11629
+ def self.encode_RemoveAgentVariationAssignmentRequest_ToolId(data)
11630
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_ID)
11631
+ end
11632
+
11633
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID = {
11634
+ "type" => ["type", nil],
11635
+ "tool_set_id" => ["toolSetId", nil],
11636
+ "toolSetId" => ["toolSetId", nil],
11637
+ }.freeze
11638
+
11639
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11640
+
11641
+ def self.encode_RemoveAgentVariationAssignmentRequest_ToolSetId(data)
11642
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_TOOL_SET_ID)
11643
+ end
11644
+
11645
+ ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID = {
11646
+ "type" => ["type", nil],
11647
+ "sub_agent_id" => ["subAgentId", nil],
11648
+ "subAgentId" => ["subAgentId", nil],
11649
+ }.freeze
11650
+
11651
+ DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID = ["agentId", "agent_id", "variationId", "variation_id", "workspaceId", "workspace_id"].freeze
11652
+
11653
+ def self.encode_RemoveAgentVariationAssignmentRequest_SubAgentId(data)
11654
+ encode_fields(ENCODE_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID, data, drop: DROP_REMOVE_AGENT_VARIATION_ASSIGNMENT_REQUEST_SUB_AGENT_ID)
11655
+ end
11656
+
11357
11657
  ENCODE_AI_PROVIDER_CREDENTIAL_API_KEY = {
11358
11658
  "type" => ["type", nil],
11359
11659
  "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.2.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-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday