cadenya 1.2.0 → 1.4.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: 013b58ef0934a5ca4ea7040a002c80dbfeaf0f3b02f138f5d6925e6961a51295
4
- data.tar.gz: a7c8de763e5b93f1def5de75836d3866ff5549d20493f34682efb62ef75358e7
3
+ metadata.gz: 85ab8209a6ed24b13c3d761856689187cfed649adf0290d564fd906ce87a0e4b
4
+ data.tar.gz: d623e6697eb7de5bd7c41c5c1374ed6dbf79d722855ef5c7c4c3d6e2867c2463
5
5
  SHA512:
6
- metadata.gz: 841ee4ca3c6a6894bb9d1eaa56c97da4d27f162a35b7e35006493fed23ba7106fb1dc7188a5b30b9d24c0cf4e1d5633096d3da4ca3f2f1677e31d27dab57ee04
7
- data.tar.gz: 9c44b073058d366d5176e58bc810ce0c0444a42cd2e64d6d67793cea5ab35e532ec43d6776624107b18eea7acad159b6a1be5fce6cd73b9359f7cc7b9df2fa91
6
+ metadata.gz: 2275f85ca44b0d036de084a93f235b9f08ef6da73869c17d49241a7b1d2ed42baab12173e2c7ae814958b8e0a9e25e7fb6bcba2a8ef52972e11650a7cf9164d5
7
+ data.tar.gz: 20a10bfca04b7eb57d96788a1f4b9d7c0d642d4b092bf52a7327394bb2f717eaab6728aa483b4acf99025480c9dd9d249ae5fc8ca7016eee53af195dbf337302
@@ -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.2.0 (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
  )
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, :memory_layer_count, :effective_tool_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, memory_layer_count: nil, effective_tool_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
@@ -736,6 +736,7 @@ module Cadenya
736
736
  @feedback_count = feedback_count
737
737
  @memory_layer_count = memory_layer_count
738
738
  @effective_tool_count = effective_tool_count
739
+ @assignment_metadata = assignment_metadata
739
740
  end
740
741
 
741
742
  def self.from_json(data)
@@ -749,6 +750,7 @@ module Cadenya
749
750
  feedback_count: data["feedbackCount"],
750
751
  memory_layer_count: data["memoryLayerCount"],
751
752
  effective_tool_count: data["effectiveToolCount"],
753
+ assignment_metadata: data["assignmentMetadata"].nil? ? nil : (data["assignmentMetadata"]).transform_values { |v| Types::BareMetadata.from_json(v) },
752
754
  )
753
755
  end
754
756
 
@@ -763,6 +765,7 @@ module Cadenya
763
765
  feedback_count: Util.plain(@feedback_count),
764
766
  memory_layer_count: Util.plain(@memory_layer_count),
765
767
  effective_tool_count: Util.plain(@effective_tool_count),
768
+ assignment_metadata: Util.plain(@assignment_metadata),
766
769
  }.reject { |_k, v| v.nil? }
767
770
  end
768
771
  end
@@ -4041,6 +4044,8 @@ module Cadenya
4041
4044
  Types::ObjectiveEventData_Reasoning.from_json(data)
4042
4045
  when "stateChanged"
4043
4046
  Types::ObjectiveEventData_StateChanged.from_json(data)
4047
+ when "heartbeat"
4048
+ Types::ObjectiveEventData_Heartbeat.from_json(data)
4044
4049
  else
4045
4050
  raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
4046
4051
  end
@@ -4164,6 +4169,16 @@ module Cadenya
4164
4169
  end
4165
4170
  end
4166
4171
 
4172
+ class ObjectiveHeartbeat
4173
+ def self.from_json(_data)
4174
+ new
4175
+ end
4176
+
4177
+ def to_h
4178
+ {}
4179
+ end
4180
+ end
4181
+
4167
4182
  class ObjectiveInfo
4168
4183
  attr_reader :total_events, :total_tool_calls, :total_input_tokens, :total_output_tokens, :total_context_windows, :total_iterations, :created_by, :effective_memory_cascade, :agent, :agent_variation, :current_context_window_id, :tenant, :subject, :widget
4169
4184
 
@@ -7522,7 +7537,7 @@ module Cadenya
7522
7537
 
7523
7538
  WebhookDeliveryDataStatus = ["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
7524
7539
 
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
7540
+ 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", "OBJECTIVE_EVENT_TYPE_HEARTBEAT"].freeze
7526
7541
 
7527
7542
  class WebhookDeliveryData
7528
7543
  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
@@ -9282,6 +9297,29 @@ module Cadenya
9282
9297
  end
9283
9298
  end
9284
9299
 
9300
+ class ObjectiveEventData_Heartbeat
9301
+ attr_reader :type, :heartbeat
9302
+
9303
+ def initialize(type: nil, heartbeat: nil)
9304
+ @type = type
9305
+ @heartbeat = heartbeat
9306
+ end
9307
+
9308
+ def self.from_json(data)
9309
+ new(
9310
+ type: data["type"],
9311
+ heartbeat: data["heartbeat"].nil? ? nil : Types::ObjectiveHeartbeat.from_json(data["heartbeat"]),
9312
+ )
9313
+ end
9314
+
9315
+ def to_h
9316
+ {
9317
+ type: Util.plain(@type),
9318
+ heartbeat: Util.plain(@heartbeat),
9319
+ }.reject { |_k, v| v.nil? }
9320
+ end
9321
+ end
9322
+
9285
9323
  class CallableTool_Tool
9286
9324
  attr_reader :type, :tool
9287
9325
 
@@ -10044,7 +10082,7 @@ module Cadenya
10044
10082
 
10045
10083
  AgentServiceListAgentFeedbackSentiment = ["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
10046
10084
 
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
10085
+ 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", "OBJECTIVE_EVENT_TYPE_HEARTBEAT"].freeze
10048
10086
 
10049
10087
  MemoryServiceListMemoryLayersType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
10050
10088
 
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.2.0
4
+ version: 1.4.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-13 00:00:00.000000000 Z
11
+ date: 2026-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday