cadenya 1.8.0 → 1.9.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: 46343a16c9b5115f974c1adece9ea3a9c73545c874d8e49bc722f729555aca6e
4
- data.tar.gz: 3410780a17133cdc51db580b522d1dfc65f31f05b4c433da87fd5b2568b3ba27
3
+ metadata.gz: eecb6d4f82f8979e9e5b6353bba75ca96097bcfcba0b023a7287996f7867c04b
4
+ data.tar.gz: 6d65c5f9ea8484123b41c7de59968ef0bbd539e6521908ed4a48ed97a72211b9
5
5
  SHA512:
6
- metadata.gz: ad7711a70eb3536b373ce2b600ba4b67fb5d6c2f84e529d107e3591dffaa3a52ad34fd589a83b3fa3d6296bcca60760ce58ad20726b6212afb0dbd0df73c9cab
7
- data.tar.gz: f67228827825272d48f09744da5168e551c5cf561abe7a4c1fc716c2c5e3df258b38ac27580b12ba8394afba08b39744cf4a4865140078ac2fdbd151ece18377
6
+ metadata.gz: e0abbd8000d1341c0359001f98f057429b128b746b0244c930f160e4572c2fbb54b0459cbe1f6712dbf274c2de9d968ece4aa462e7d4087910cd021e7e5d8ecc
7
+ data.tar.gz: 77686a8de6a5595239d0ae18edd14a7c376a4ef130e556a00ab5c637d66de4c39ddb15b7d48aefad6ee126799bca5861fb46afce9425465b78542c0ce7e03d90
data/api.md CHANGED
@@ -504,7 +504,7 @@ client.objectives.list(workspace_id: nil, limit: nil, cursor: nil, agent_id: nil
504
504
  Create a new objective
505
505
 
506
506
  ```ruby
507
- client.objectives.create(agent_id:, workspace_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil) # => Cadenya::Types::Objective
507
+ client.objectives.create(agent_id:, workspace_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil) # => Cadenya::Types::Objective
508
508
  ```
509
509
  Get an objective by ID
510
510
 
@@ -529,7 +529,7 @@ client.objectives.list_events(objective_id, workspace_id: nil, limit: nil, curso
529
529
  Stream objective events
530
530
 
531
531
  ```ruby
532
- client.objectives.stream_events(objective_id, workspace_id: nil, last_event_id: nil) # => Cadenya::Stream
532
+ client.objectives.stream_events(objective_id, workspace_id: nil, include_deltas: nil, last_event_id: nil) # => Cadenya::Stream
533
533
  ```
534
534
  List feedback for an objective
535
535
 
@@ -604,7 +604,7 @@ client.objectives.interrupt(objective_id, workspace_id: nil) # => Cadenya::Types
604
604
  Create an objective and stream its events
605
605
 
606
606
  ```ruby
607
- client.objectives.create_and_stream(agent_id:, metadata:, workspace_id: nil, variation_id: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, last_event_id: nil) # => Cadenya::Stream
607
+ client.objectives.create_and_stream(agent_id:, metadata:, workspace_id: nil, variation_id: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, include_deltas: nil, last_event_id: nil) # => Cadenya::Stream
608
608
  ```
609
609
 
610
610
  ## client.tool_search
@@ -38,7 +38,7 @@ module Cadenya
38
38
  end
39
39
 
40
40
  # Create a new objective
41
- def create(agent_id:, workspace_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, request_options: nil)
41
+ def create(agent_id:, workspace_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, request_options: nil)
42
42
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
43
43
  _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/objectives"
44
44
  _body = {
@@ -54,6 +54,7 @@ module Cadenya
54
54
  "tenant" => tenant.nil? ? nil : (->(_v) { Types.encode_TenantAssertion(_v) }).call(tenant),
55
55
  "subject" => subject.nil? ? nil : (->(_v) { Types.encode_SubjectAssertion(_v) }).call(subject),
56
56
  "pinnedParameters" => pinned_parameters,
57
+ "clientTools" => client_tools.nil? ? nil : (->(_v) { Types.encode_ClientTools(_v) }).call(client_tools),
57
58
  }.reject { |_k, v| v.nil? }
58
59
  _data = @core.request(:post, _path, body: _body, request_options: request_options)
59
60
  Types::Objective.from_json(_data)
@@ -115,14 +116,17 @@ module Cadenya
115
116
  end
116
117
 
117
118
  # Stream objective events
118
- def stream_events(objective_id, workspace_id: nil, last_event_id: nil, request_options: nil)
119
+ def stream_events(objective_id, workspace_id: nil, include_deltas: nil, last_event_id: nil, request_options: nil)
119
120
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
120
121
  _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/objectives/#{Util.path_param('objectiveId', objective_id)}/events:stream"
122
+ _query = {
123
+ "includeDeltas" => include_deltas,
124
+ }
121
125
  _headers = last_event_id ? { "Last-Event-ID" => last_event_id } : nil
122
126
  _decoder = ->(event) { Types::ObjectiveEvent.from_json(event) }
123
127
  _auto_reconnect = !(request_options && request_options[:reconnect] == false)
124
128
  Stream.new(_decoder, last_event_id: last_event_id, skip_events: ["ping", "open"], auto_reconnect: _auto_reconnect) do |_cancel, _resume, &on_chunk|
125
- @core.stream_request(:get, _path, headers: (_resume ? { "Last-Event-ID" => _resume } : nil), request_options: request_options, cancel: _cancel, &on_chunk)
129
+ @core.stream_request(:get, _path, query: _query, headers: (_resume ? { "Last-Event-ID" => _resume } : nil), request_options: request_options, cancel: _cancel, &on_chunk)
126
130
  end
127
131
  end
128
132
 
@@ -297,7 +301,7 @@ module Cadenya
297
301
  end
298
302
 
299
303
  # Create an objective and stream its events
300
- def create_and_stream(agent_id:, metadata:, workspace_id: nil, variation_id: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, last_event_id: nil, request_options: nil)
304
+ def create_and_stream(agent_id:, metadata:, workspace_id: nil, variation_id: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, include_deltas: nil, last_event_id: nil, request_options: nil)
301
305
  workspace_id = @core.resolve_default("workspaceId", "CADENYA_WORKSPACE_ID", workspace_id)
302
306
  _path = "/v1/workspaces/#{Util.path_param('workspaceId', workspace_id)}/objectives:stream"
303
307
  _body = {
@@ -313,6 +317,8 @@ module Cadenya
313
317
  "tenant" => tenant.nil? ? nil : (->(_v) { Types.encode_TenantAssertion(_v) }).call(tenant),
314
318
  "subject" => subject.nil? ? nil : (->(_v) { Types.encode_SubjectAssertion(_v) }).call(subject),
315
319
  "pinnedParameters" => pinned_parameters,
320
+ "clientTools" => client_tools.nil? ? nil : (->(_v) { Types.encode_ClientTools(_v) }).call(client_tools),
321
+ "includeDeltas" => include_deltas,
316
322
  }.reject { |_k, v| v.nil? }
317
323
  _headers = last_event_id ? { "Last-Event-ID" => last_event_id } : nil
318
324
  _decoder = ->(event) { Types.decode_CreateAndStreamObjectiveResponse(event) }
data/lib/cadenya/types.rb CHANGED
@@ -1084,9 +1084,9 @@ module Cadenya
1084
1084
  AgentVariationSpecModelConfigReasoningEffort = ["REASONING_EFFORT_UNSPECIFIED", "REASONING_EFFORT_NONE", "REASONING_EFFORT_LOW", "REASONING_EFFORT_MEDIUM", "REASONING_EFFORT_HIGH"].freeze
1085
1085
 
1086
1086
  class AgentVariationSpec_ModelConfig
1087
- attr_reader :model_id, :temperature, :top_p, :top_k, :stop_sequences, :max_output_tokens, :reasoning_effort, :caching_enabled
1087
+ attr_reader :model_id, :temperature, :top_p, :top_k, :stop_sequences, :max_output_tokens, :reasoning_effort, :caching_enabled, :streaming_enabled
1088
1088
 
1089
- def initialize(model_id: nil, temperature: nil, top_p: nil, top_k: nil, stop_sequences: nil, max_output_tokens: nil, reasoning_effort: nil, caching_enabled: nil)
1089
+ def initialize(model_id: nil, temperature: nil, top_p: nil, top_k: nil, stop_sequences: nil, max_output_tokens: nil, reasoning_effort: nil, caching_enabled: nil, streaming_enabled: nil)
1090
1090
  @model_id = model_id
1091
1091
  @temperature = temperature
1092
1092
  @top_p = top_p
@@ -1095,6 +1095,7 @@ module Cadenya
1095
1095
  @max_output_tokens = max_output_tokens
1096
1096
  @reasoning_effort = reasoning_effort
1097
1097
  @caching_enabled = caching_enabled
1098
+ @streaming_enabled = streaming_enabled
1098
1099
  end
1099
1100
 
1100
1101
  def self.from_json(data)
@@ -1107,6 +1108,7 @@ module Cadenya
1107
1108
  max_output_tokens: data["maxOutputTokens"],
1108
1109
  reasoning_effort: data["reasoningEffort"],
1109
1110
  caching_enabled: data["cachingEnabled"],
1111
+ streaming_enabled: data["streamingEnabled"],
1110
1112
  )
1111
1113
  end
1112
1114
 
@@ -1120,6 +1122,7 @@ module Cadenya
1120
1122
  max_output_tokens: Util.plain(@max_output_tokens),
1121
1123
  reasoning_effort: Util.plain(@reasoning_effort),
1122
1124
  caching_enabled: Util.plain(@caching_enabled),
1125
+ streaming_enabled: Util.plain(@streaming_enabled),
1123
1126
  }.reject { |_k, v| v.nil? }
1124
1127
  end
1125
1128
  end
@@ -1292,13 +1295,14 @@ module Cadenya
1292
1295
  end
1293
1296
 
1294
1297
  class AssistantMessage
1295
- attr_reader :content, :tool_calls, :usage, :model
1298
+ attr_reader :content, :tool_calls, :usage, :model, :completion_id
1296
1299
 
1297
- def initialize(content: nil, tool_calls: nil, usage: nil, model: nil)
1300
+ def initialize(content: nil, tool_calls: nil, usage: nil, model: nil, completion_id: nil)
1298
1301
  @content = content
1299
1302
  @tool_calls = tool_calls
1300
1303
  @usage = usage
1301
1304
  @model = model
1305
+ @completion_id = completion_id
1302
1306
  end
1303
1307
 
1304
1308
  def self.from_json(data)
@@ -1307,6 +1311,7 @@ module Cadenya
1307
1311
  tool_calls: data["toolCalls"].nil? ? nil : (data["toolCalls"]).map { |item| Types::AssistantToolCall.from_json(item) },
1308
1312
  usage: data["usage"].nil? ? nil : Types::TokenUsage.from_json(data["usage"]),
1309
1313
  model: data["model"].nil? ? nil : Types::ResourceMetadata.from_json(data["model"]),
1314
+ completion_id: data["completionId"],
1310
1315
  )
1311
1316
  end
1312
1317
 
@@ -1316,6 +1321,36 @@ module Cadenya
1316
1321
  tool_calls: Util.plain(@tool_calls),
1317
1322
  usage: Util.plain(@usage),
1318
1323
  model: Util.plain(@model),
1324
+ completion_id: Util.plain(@completion_id),
1325
+ }.reject { |_k, v| v.nil? }
1326
+ end
1327
+ end
1328
+
1329
+ class AssistantMessageDelta
1330
+ attr_reader :completion_id, :text, :after_sequence, :offset
1331
+
1332
+ def initialize(completion_id: nil, text: nil, after_sequence: nil, offset: nil)
1333
+ @completion_id = completion_id
1334
+ @text = text
1335
+ @after_sequence = after_sequence
1336
+ @offset = offset
1337
+ end
1338
+
1339
+ def self.from_json(data)
1340
+ new(
1341
+ completion_id: data["completionId"],
1342
+ text: data["text"],
1343
+ after_sequence: data["afterSequence"],
1344
+ offset: data["offset"],
1345
+ )
1346
+ end
1347
+
1348
+ def to_h
1349
+ {
1350
+ completion_id: Util.plain(@completion_id),
1351
+ text: Util.plain(@text),
1352
+ after_sequence: Util.plain(@after_sequence),
1353
+ offset: Util.plain(@offset),
1319
1354
  }.reject { |_k, v| v.nil? }
1320
1355
  end
1321
1356
  end
@@ -1547,6 +1582,16 @@ module Cadenya
1547
1582
  end
1548
1583
  end
1549
1584
 
1585
+ class Capability_Streaming
1586
+ def self.from_json(_data)
1587
+ new
1588
+ end
1589
+
1590
+ def to_h
1591
+ {}
1592
+ end
1593
+ end
1594
+
1550
1595
  class Capability_Temperature
1551
1596
  def self.from_json(_data)
1552
1597
  new
@@ -1577,6 +1622,55 @@ module Cadenya
1577
1622
  end
1578
1623
  end
1579
1624
 
1625
+ class ClientToolDefinition
1626
+ attr_reader :name, :description, :parameters, :requires_approval
1627
+
1628
+ def initialize(name: nil, description: nil, parameters: nil, requires_approval: nil)
1629
+ @name = name
1630
+ @description = description
1631
+ @parameters = parameters
1632
+ @requires_approval = requires_approval
1633
+ end
1634
+
1635
+ def self.from_json(data)
1636
+ new(
1637
+ name: data["name"],
1638
+ description: data["description"],
1639
+ parameters: data["parameters"],
1640
+ requires_approval: data["requiresApproval"],
1641
+ )
1642
+ end
1643
+
1644
+ def to_h
1645
+ {
1646
+ name: Util.plain(@name),
1647
+ description: Util.plain(@description),
1648
+ parameters: Util.plain(@parameters),
1649
+ requires_approval: Util.plain(@requires_approval),
1650
+ }.reject { |_k, v| v.nil? }
1651
+ end
1652
+ end
1653
+
1654
+ class ClientTools
1655
+ attr_reader :definitions
1656
+
1657
+ def initialize(definitions: nil)
1658
+ @definitions = definitions
1659
+ end
1660
+
1661
+ def self.from_json(data)
1662
+ new(
1663
+ definitions: data["definitions"].nil? ? nil : (data["definitions"]).map { |item| Types::ClientToolDefinition.from_json(item) },
1664
+ )
1665
+ end
1666
+
1667
+ def to_h
1668
+ {
1669
+ definitions: Util.plain(@definitions),
1670
+ }.reject { |_k, v| v.nil? }
1671
+ end
1672
+ end
1673
+
1580
1674
  class CompactObjectiveRequest
1581
1675
  attr_reader :workspace_id, :objective_id, :compaction_config
1582
1676
 
@@ -2046,9 +2140,9 @@ module Cadenya
2046
2140
  end
2047
2141
 
2048
2142
  class CreateAndStreamObjectiveRequest
2049
- attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters
2143
+ attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools, :include_deltas
2050
2144
 
2051
- def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil)
2145
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, include_deltas: nil)
2052
2146
  @workspace_id = workspace_id
2053
2147
  @agent_id = agent_id
2054
2148
  @variation_id = variation_id
@@ -2062,6 +2156,8 @@ module Cadenya
2062
2156
  @tenant = tenant
2063
2157
  @subject = subject
2064
2158
  @pinned_parameters = pinned_parameters
2159
+ @client_tools = client_tools
2160
+ @include_deltas = include_deltas
2065
2161
  end
2066
2162
 
2067
2163
  def self.from_json(data)
@@ -2079,6 +2175,8 @@ module Cadenya
2079
2175
  tenant: data["tenant"].nil? ? nil : Types::TenantAssertion.from_json(data["tenant"]),
2080
2176
  subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
2081
2177
  pinned_parameters: data["pinnedParameters"],
2178
+ client_tools: data["clientTools"].nil? ? nil : Types::ClientTools.from_json(data["clientTools"]),
2179
+ include_deltas: data["includeDeltas"],
2082
2180
  )
2083
2181
  end
2084
2182
 
@@ -2097,6 +2195,8 @@ module Cadenya
2097
2195
  tenant: Util.plain(@tenant),
2098
2196
  subject: Util.plain(@subject),
2099
2197
  pinned_parameters: Util.plain(@pinned_parameters),
2198
+ client_tools: Util.plain(@client_tools),
2199
+ include_deltas: Util.plain(@include_deltas),
2100
2200
  }.reject { |_k, v| v.nil? }
2101
2201
  end
2102
2202
  end
@@ -2256,9 +2356,9 @@ module Cadenya
2256
2356
  end
2257
2357
 
2258
2358
  class CreateObjectiveRequest
2259
- attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters
2359
+ attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools
2260
2360
 
2261
- def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil)
2361
+ def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil)
2262
2362
  @workspace_id = workspace_id
2263
2363
  @agent_id = agent_id
2264
2364
  @variation_id = variation_id
@@ -2272,6 +2372,7 @@ module Cadenya
2272
2372
  @tenant = tenant
2273
2373
  @subject = subject
2274
2374
  @pinned_parameters = pinned_parameters
2375
+ @client_tools = client_tools
2275
2376
  end
2276
2377
 
2277
2378
  def self.from_json(data)
@@ -2289,6 +2390,7 @@ module Cadenya
2289
2390
  tenant: data["tenant"].nil? ? nil : Types::TenantAssertion.from_json(data["tenant"]),
2290
2391
  subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
2291
2392
  pinned_parameters: data["pinnedParameters"],
2393
+ client_tools: data["clientTools"].nil? ? nil : Types::ClientTools.from_json(data["clientTools"]),
2292
2394
  )
2293
2395
  end
2294
2396
 
@@ -2307,6 +2409,7 @@ module Cadenya
2307
2409
  tenant: Util.plain(@tenant),
2308
2410
  subject: Util.plain(@subject),
2309
2411
  pinned_parameters: Util.plain(@pinned_parameters),
2412
+ client_tools: Util.plain(@client_tools),
2310
2413
  }.reject { |_k, v| v.nil? }
2311
2414
  end
2312
2415
  end
@@ -4240,6 +4343,8 @@ module Cadenya
4240
4343
  Types::ModelSpec_Capability_Reasoning.from_json(data)
4241
4344
  when "caching"
4242
4345
  Types::ModelSpec_Capability_Caching.from_json(data)
4346
+ when "streaming"
4347
+ Types::ModelSpec_Capability_Streaming.from_json(data)
4243
4348
  else
4244
4349
  raise ArgumentError, "ModelSpec_Capability: unknown type #{data["type"].inspect}"
4245
4350
  end
@@ -4540,15 +4645,16 @@ module Cadenya
4540
4645
  end
4541
4646
 
4542
4647
  class ObjectiveEvent
4543
- attr_reader :metadata, :data, :context_window_id, :info, :duration, :started_at
4648
+ attr_reader :metadata, :data, :context_window_id, :info, :duration, :started_at, :sequence
4544
4649
 
4545
- def initialize(metadata: nil, data: nil, context_window_id: nil, info: nil, duration: nil, started_at: nil)
4650
+ def initialize(metadata: nil, data: nil, context_window_id: nil, info: nil, duration: nil, started_at: nil, sequence: nil)
4546
4651
  @metadata = metadata
4547
4652
  @data = data
4548
4653
  @context_window_id = context_window_id
4549
4654
  @info = info
4550
4655
  @duration = duration
4551
4656
  @started_at = started_at
4657
+ @sequence = sequence
4552
4658
  end
4553
4659
 
4554
4660
  def self.from_json(data)
@@ -4559,6 +4665,7 @@ module Cadenya
4559
4665
  info: data["info"].nil? ? nil : Types::ObjectiveEventInfo.from_json(data["info"]),
4560
4666
  duration: data["duration"],
4561
4667
  started_at: data["startedAt"].nil? ? nil : Time.iso8601(data["startedAt"]),
4668
+ sequence: data["sequence"],
4562
4669
  )
4563
4670
  end
4564
4671
 
@@ -4570,6 +4677,7 @@ module Cadenya
4570
4677
  info: Util.plain(@info),
4571
4678
  duration: Util.plain(@duration),
4572
4679
  started_at: Util.plain(@started_at),
4680
+ sequence: Util.plain(@sequence),
4573
4681
  }.reject { |_k, v| v.nil? }
4574
4682
  end
4575
4683
  end
@@ -4619,6 +4727,10 @@ module Cadenya
4619
4727
  Types::ObjectiveEventData_Heartbeat.from_json(data)
4620
4728
  when "interrupted"
4621
4729
  Types::ObjectiveEventData_Interrupted.from_json(data)
4730
+ when "assistantMessageDelta"
4731
+ Types::ObjectiveEventData_AssistantMessageDelta.from_json(data)
4732
+ when "reasoningDelta"
4733
+ Types::ObjectiveEventData_ReasoningDelta.from_json(data)
4622
4734
  else
4623
4735
  raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
4624
4736
  end
@@ -4743,12 +4855,22 @@ module Cadenya
4743
4855
  end
4744
4856
 
4745
4857
  class ObjectiveHeartbeat
4746
- def self.from_json(_data)
4747
- new
4858
+ attr_reader :last_sequence
4859
+
4860
+ def initialize(last_sequence: nil)
4861
+ @last_sequence = last_sequence
4862
+ end
4863
+
4864
+ def self.from_json(data)
4865
+ new(
4866
+ last_sequence: data["lastSequence"],
4867
+ )
4748
4868
  end
4749
4869
 
4750
4870
  def to_h
4751
- {}
4871
+ {
4872
+ last_sequence: Util.plain(@last_sequence),
4873
+ }.reject { |_k, v| v.nil? }
4752
4874
  end
4753
4875
  end
4754
4876
 
@@ -4875,6 +4997,8 @@ module Cadenya
4875
4997
  Types::ObjectiveQueuedActionData_UserMessage.from_json(data)
4876
4998
  when "compaction"
4877
4999
  Types::ObjectiveQueuedActionData_Compaction.from_json(data)
5000
+ when "subAgentUpdated"
5001
+ Types::ObjectiveQueuedActionData_SubAgentUpdated.from_json(data)
4878
5002
  else
4879
5003
  raise ArgumentError, "ObjectiveQueuedActionData: unknown type #{data["type"].inspect}"
4880
5004
  end
@@ -5589,21 +5713,53 @@ module Cadenya
5589
5713
  end
5590
5714
 
5591
5715
  class Reasoning
5592
- attr_reader :content
5716
+ attr_reader :content, :completion_id
5593
5717
 
5594
- def initialize(content: nil)
5718
+ def initialize(content: nil, completion_id: nil)
5595
5719
  @content = content
5720
+ @completion_id = completion_id
5596
5721
  end
5597
5722
 
5598
5723
  def self.from_json(data)
5599
5724
  new(
5600
5725
  content: data["content"],
5726
+ completion_id: data["completionId"],
5601
5727
  )
5602
5728
  end
5603
5729
 
5604
5730
  def to_h
5605
5731
  {
5606
5732
  content: Util.plain(@content),
5733
+ completion_id: Util.plain(@completion_id),
5734
+ }.reject { |_k, v| v.nil? }
5735
+ end
5736
+ end
5737
+
5738
+ class ReasoningDelta
5739
+ attr_reader :completion_id, :text, :after_sequence, :offset
5740
+
5741
+ def initialize(completion_id: nil, text: nil, after_sequence: nil, offset: nil)
5742
+ @completion_id = completion_id
5743
+ @text = text
5744
+ @after_sequence = after_sequence
5745
+ @offset = offset
5746
+ end
5747
+
5748
+ def self.from_json(data)
5749
+ new(
5750
+ completion_id: data["completionId"],
5751
+ text: data["text"],
5752
+ after_sequence: data["afterSequence"],
5753
+ offset: data["offset"],
5754
+ )
5755
+ end
5756
+
5757
+ def to_h
5758
+ {
5759
+ completion_id: Util.plain(@completion_id),
5760
+ text: Util.plain(@text),
5761
+ after_sequence: Util.plain(@after_sequence),
5762
+ offset: Util.plain(@offset),
5607
5763
  }.reject { |_k, v| v.nil? }
5608
5764
  end
5609
5765
  end
@@ -6268,7 +6424,7 @@ module Cadenya
6268
6424
  end
6269
6425
  end
6270
6426
 
6271
- SubAgentUpdatedStatus = ["STATUS_UNSPECIFIED", "STATUS_PENDING", "STATUS_RUNNING", "STATUS_COMPLETED", "STATUS_FAILED", "STATUS_CANCELLED"].freeze
6427
+ SubAgentUpdatedStatus = ["STATUS_UNSPECIFIED", "STATUS_PENDING", "STATUS_RUNNING", "STATUS_COMPLETED", "STATUS_FAILED", "STATUS_CANCELLED", "STATUS_WAITING", "STATUS_TIMED_OUT"].freeze
6272
6428
 
6273
6429
  class SubAgentUpdated
6274
6430
  attr_reader :agent, :objective, :status, :message
@@ -6689,41 +6845,56 @@ module Cadenya
6689
6845
  end
6690
6846
 
6691
6847
  class ToolApprovalRequested
6692
- attr_reader :tool_call_id
6848
+ attr_reader :tool_call_id, :tool, :llm_tool_name, :arguments
6693
6849
 
6694
- def initialize(tool_call_id: nil)
6850
+ def initialize(tool_call_id: nil, tool: nil, llm_tool_name: nil, arguments: nil)
6695
6851
  @tool_call_id = tool_call_id
6852
+ @tool = tool
6853
+ @llm_tool_name = llm_tool_name
6854
+ @arguments = arguments
6696
6855
  end
6697
6856
 
6698
6857
  def self.from_json(data)
6699
6858
  new(
6700
6859
  tool_call_id: data["toolCallId"],
6860
+ tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
6861
+ llm_tool_name: data["llmToolName"],
6862
+ arguments: data["arguments"],
6701
6863
  )
6702
6864
  end
6703
6865
 
6704
6866
  def to_h
6705
6867
  {
6706
6868
  tool_call_id: Util.plain(@tool_call_id),
6869
+ tool: Util.plain(@tool),
6870
+ llm_tool_name: Util.plain(@llm_tool_name),
6871
+ arguments: Util.plain(@arguments),
6707
6872
  }.reject { |_k, v| v.nil? }
6708
6873
  end
6709
6874
  end
6710
6875
 
6711
6876
  class ToolApproved
6712
- attr_reader :tool_call_id
6877
+ attr_reader :tool_call_id, :tool, :llm_tool_name
6713
6878
 
6714
- def initialize(tool_call_id: nil)
6879
+ def initialize(tool_call_id: nil, tool: nil, llm_tool_name: nil)
6715
6880
  @tool_call_id = tool_call_id
6881
+ @tool = tool
6882
+ @llm_tool_name = llm_tool_name
6716
6883
  end
6717
6884
 
6718
6885
  def self.from_json(data)
6719
6886
  new(
6720
6887
  tool_call_id: data["toolCallId"],
6888
+ tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
6889
+ llm_tool_name: data["llmToolName"],
6721
6890
  )
6722
6891
  end
6723
6892
 
6724
6893
  def to_h
6725
6894
  {
6726
6895
  tool_call_id: Util.plain(@tool_call_id),
6896
+ tool: Util.plain(@tool),
6897
+ llm_tool_name: Util.plain(@llm_tool_name),
6727
6898
  }.reject { |_k, v| v.nil? }
6728
6899
  end
6729
6900
  end
@@ -6778,14 +6949,15 @@ module Cadenya
6778
6949
  end
6779
6950
 
6780
6951
  class ToolCalled
6781
- attr_reader :tool_call_id, :tool, :config, :arguments, :arguments_exposed_in_widgets
6952
+ attr_reader :tool_call_id, :tool, :config, :arguments, :arguments_exposed_in_widgets, :llm_tool_name
6782
6953
 
6783
- def initialize(tool_call_id: nil, tool: nil, config: nil, arguments: nil, arguments_exposed_in_widgets: nil)
6954
+ def initialize(tool_call_id: nil, tool: nil, config: nil, arguments: nil, arguments_exposed_in_widgets: nil, llm_tool_name: nil)
6784
6955
  @tool_call_id = tool_call_id
6785
6956
  @tool = tool
6786
6957
  @config = config
6787
6958
  @arguments = arguments
6788
6959
  @arguments_exposed_in_widgets = arguments_exposed_in_widgets
6960
+ @llm_tool_name = llm_tool_name
6789
6961
  end
6790
6962
 
6791
6963
  def self.from_json(data)
@@ -6795,6 +6967,7 @@ module Cadenya
6795
6967
  config: data["config"].nil? ? nil : Types.decode_ToolSpec_Config(data["config"]),
6796
6968
  arguments: data["arguments"],
6797
6969
  arguments_exposed_in_widgets: data["argumentsExposedInWidgets"],
6970
+ llm_tool_name: data["llmToolName"],
6798
6971
  )
6799
6972
  end
6800
6973
 
@@ -6805,22 +6978,27 @@ module Cadenya
6805
6978
  config: Util.plain(@config),
6806
6979
  arguments: Util.plain(@arguments),
6807
6980
  arguments_exposed_in_widgets: Util.plain(@arguments_exposed_in_widgets),
6981
+ llm_tool_name: Util.plain(@llm_tool_name),
6808
6982
  }.reject { |_k, v| v.nil? }
6809
6983
  end
6810
6984
  end
6811
6985
 
6812
6986
  class ToolDenied
6813
- attr_reader :tool_call_id, :memo
6987
+ attr_reader :tool_call_id, :memo, :tool, :llm_tool_name
6814
6988
 
6815
- def initialize(tool_call_id: nil, memo: nil)
6989
+ def initialize(tool_call_id: nil, memo: nil, tool: nil, llm_tool_name: nil)
6816
6990
  @tool_call_id = tool_call_id
6817
6991
  @memo = memo
6992
+ @tool = tool
6993
+ @llm_tool_name = llm_tool_name
6818
6994
  end
6819
6995
 
6820
6996
  def self.from_json(data)
6821
6997
  new(
6822
6998
  tool_call_id: data["toolCallId"],
6823
6999
  memo: data["memo"],
7000
+ tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
7001
+ llm_tool_name: data["llmToolName"],
6824
7002
  )
6825
7003
  end
6826
7004
 
@@ -6828,22 +7006,28 @@ module Cadenya
6828
7006
  {
6829
7007
  tool_call_id: Util.plain(@tool_call_id),
6830
7008
  memo: Util.plain(@memo),
7009
+ tool: Util.plain(@tool),
7010
+ llm_tool_name: Util.plain(@llm_tool_name),
6831
7011
  }.reject { |_k, v| v.nil? }
6832
7012
  end
6833
7013
  end
6834
7014
 
6835
7015
  class ToolError
6836
- attr_reader :tool_call_id, :message
7016
+ attr_reader :tool_call_id, :message, :tool, :llm_tool_name
6837
7017
 
6838
- def initialize(tool_call_id: nil, message: nil)
7018
+ def initialize(tool_call_id: nil, message: nil, tool: nil, llm_tool_name: nil)
6839
7019
  @tool_call_id = tool_call_id
6840
7020
  @message = message
7021
+ @tool = tool
7022
+ @llm_tool_name = llm_tool_name
6841
7023
  end
6842
7024
 
6843
7025
  def self.from_json(data)
6844
7026
  new(
6845
7027
  tool_call_id: data["toolCallId"],
6846
7028
  message: data["message"],
7029
+ tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
7030
+ llm_tool_name: data["llmToolName"],
6847
7031
  )
6848
7032
  end
6849
7033
 
@@ -6851,6 +7035,8 @@ module Cadenya
6851
7035
  {
6852
7036
  tool_call_id: Util.plain(@tool_call_id),
6853
7037
  message: Util.plain(@message),
7038
+ tool: Util.plain(@tool),
7039
+ llm_tool_name: Util.plain(@llm_tool_name),
6854
7040
  }.reject { |_k, v| v.nil? }
6855
7041
  end
6856
7042
  end
@@ -7015,17 +7201,21 @@ module Cadenya
7015
7201
  end
7016
7202
 
7017
7203
  class ToolResult
7018
- attr_reader :tool_call_id, :result
7204
+ attr_reader :tool_call_id, :result, :tool, :llm_tool_name
7019
7205
 
7020
- def initialize(tool_call_id: nil, result: nil)
7206
+ def initialize(tool_call_id: nil, result: nil, tool: nil, llm_tool_name: nil)
7021
7207
  @tool_call_id = tool_call_id
7022
7208
  @result = result
7209
+ @tool = tool
7210
+ @llm_tool_name = llm_tool_name
7023
7211
  end
7024
7212
 
7025
7213
  def self.from_json(data)
7026
7214
  new(
7027
7215
  tool_call_id: data["toolCallId"],
7028
7216
  result: data["result"].nil? ? nil : Types::ObjectiveToolCallResult.from_json(data["result"]),
7217
+ tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
7218
+ llm_tool_name: data["llmToolName"],
7029
7219
  )
7030
7220
  end
7031
7221
 
@@ -7033,6 +7223,8 @@ module Cadenya
7033
7223
  {
7034
7224
  tool_call_id: Util.plain(@tool_call_id),
7035
7225
  result: Util.plain(@result),
7226
+ tool: Util.plain(@tool),
7227
+ llm_tool_name: Util.plain(@llm_tool_name),
7036
7228
  }.reject { |_k, v| v.nil? }
7037
7229
  end
7038
7230
  end
@@ -7040,13 +7232,14 @@ module Cadenya
7040
7232
  ToolSetState = ["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
7041
7233
 
7042
7234
  class ToolSet
7043
- attr_reader :metadata, :spec, :info, :state
7235
+ attr_reader :metadata, :spec, :info, :state, :client_tools_agent_id
7044
7236
 
7045
- def initialize(metadata: nil, spec: nil, info: nil, state: nil)
7237
+ def initialize(metadata: nil, spec: nil, info: nil, state: nil, client_tools_agent_id: nil)
7046
7238
  @metadata = metadata
7047
7239
  @spec = spec
7048
7240
  @info = info
7049
7241
  @state = state
7242
+ @client_tools_agent_id = client_tools_agent_id
7050
7243
  end
7051
7244
 
7052
7245
  def self.from_json(data)
@@ -7055,6 +7248,7 @@ module Cadenya
7055
7248
  spec: data["spec"].nil? ? nil : Types::ToolSetSpec.from_json(data["spec"]),
7056
7249
  info: data["info"].nil? ? nil : Types::ToolSetInfo.from_json(data["info"]),
7057
7250
  state: data["state"],
7251
+ client_tools_agent_id: data["clientToolsAgentId"],
7058
7252
  )
7059
7253
  end
7060
7254
 
@@ -7064,6 +7258,7 @@ module Cadenya
7064
7258
  spec: Util.plain(@spec),
7065
7259
  info: Util.plain(@info),
7066
7260
  state: Util.plain(@state),
7261
+ client_tools_agent_id: Util.plain(@client_tools_agent_id),
7067
7262
  }.reject { |_k, v| v.nil? }
7068
7263
  end
7069
7264
  end
@@ -8574,7 +8769,7 @@ module Cadenya
8574
8769
 
8575
8770
  WebhookDeliveryDataStatus = ["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
8576
8771
 
8577
- 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", "OBJECTIVE_EVENT_TYPE_INTERRUPTED"].freeze
8772
+ 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", "OBJECTIVE_EVENT_TYPE_INTERRUPTED", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE_DELTA", "OBJECTIVE_EVENT_TYPE_REASONING_DELTA"].freeze
8578
8773
 
8579
8774
  class WebhookDeliveryData
8580
8775
  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
@@ -10461,18 +10656,66 @@ module Cadenya
10461
10656
  end
10462
10657
  end
10463
10658
 
10659
+ class ObjectiveEventData_AssistantMessageDelta
10660
+ attr_reader :type, :assistant_message_delta
10661
+
10662
+ def initialize(type: nil, assistant_message_delta: nil)
10663
+ @type = type
10664
+ @assistant_message_delta = assistant_message_delta
10665
+ end
10666
+
10667
+ def self.from_json(data)
10668
+ new(
10669
+ type: data["type"],
10670
+ assistant_message_delta: data["assistantMessageDelta"].nil? ? nil : Types::AssistantMessageDelta.from_json(data["assistantMessageDelta"]),
10671
+ )
10672
+ end
10673
+
10674
+ def to_h
10675
+ {
10676
+ type: Util.plain(@type),
10677
+ assistant_message_delta: Util.plain(@assistant_message_delta),
10678
+ }.reject { |_k, v| v.nil? }
10679
+ end
10680
+ end
10681
+
10682
+ class ObjectiveEventData_ReasoningDelta
10683
+ attr_reader :type, :reasoning_delta
10684
+
10685
+ def initialize(type: nil, reasoning_delta: nil)
10686
+ @type = type
10687
+ @reasoning_delta = reasoning_delta
10688
+ end
10689
+
10690
+ def self.from_json(data)
10691
+ new(
10692
+ type: data["type"],
10693
+ reasoning_delta: data["reasoningDelta"].nil? ? nil : Types::ReasoningDelta.from_json(data["reasoningDelta"]),
10694
+ )
10695
+ end
10696
+
10697
+ def to_h
10698
+ {
10699
+ type: Util.plain(@type),
10700
+ reasoning_delta: Util.plain(@reasoning_delta),
10701
+ }.reject { |_k, v| v.nil? }
10702
+ end
10703
+ end
10704
+
10464
10705
  class CallableTool_Tool
10465
- attr_reader :type, :tool
10706
+ attr_reader :type, :tool, :client_tool
10466
10707
 
10467
- def initialize(type: nil, tool: nil)
10708
+ def initialize(type: nil, tool: nil, client_tool: nil)
10468
10709
  @type = type
10469
10710
  @tool = tool
10711
+ @client_tool = client_tool
10470
10712
  end
10471
10713
 
10472
10714
  def self.from_json(data)
10473
10715
  new(
10474
10716
  type: data["type"],
10475
10717
  tool: data["tool"].nil? ? nil : Types::ResourceMetadata.from_json(data["tool"]),
10718
+ client_tool: data["clientTool"],
10476
10719
  )
10477
10720
  end
10478
10721
 
@@ -10480,22 +10723,25 @@ module Cadenya
10480
10723
  {
10481
10724
  type: Util.plain(@type),
10482
10725
  tool: Util.plain(@tool),
10726
+ client_tool: Util.plain(@client_tool),
10483
10727
  }.reject { |_k, v| v.nil? }
10484
10728
  end
10485
10729
  end
10486
10730
 
10487
10731
  class CallableTool_Agent
10488
- attr_reader :type, :agent
10732
+ attr_reader :type, :agent, :client_tool
10489
10733
 
10490
- def initialize(type: nil, agent: nil)
10734
+ def initialize(type: nil, agent: nil, client_tool: nil)
10491
10735
  @type = type
10492
10736
  @agent = agent
10737
+ @client_tool = client_tool
10493
10738
  end
10494
10739
 
10495
10740
  def self.from_json(data)
10496
10741
  new(
10497
10742
  type: data["type"],
10498
10743
  agent: data["agent"].nil? ? nil : Types::ResourceMetadata.from_json(data["agent"]),
10744
+ client_tool: data["clientTool"],
10499
10745
  )
10500
10746
  end
10501
10747
 
@@ -10503,22 +10749,25 @@ module Cadenya
10503
10749
  {
10504
10750
  type: Util.plain(@type),
10505
10751
  agent: Util.plain(@agent),
10752
+ client_tool: Util.plain(@client_tool),
10506
10753
  }.reject { |_k, v| v.nil? }
10507
10754
  end
10508
10755
  end
10509
10756
 
10510
10757
  class CallableTool_CadenyaProvidedTool
10511
- attr_reader :type, :cadenya_provided_tool
10758
+ attr_reader :type, :cadenya_provided_tool, :client_tool
10512
10759
 
10513
- def initialize(type: nil, cadenya_provided_tool: nil)
10760
+ def initialize(type: nil, cadenya_provided_tool: nil, client_tool: nil)
10514
10761
  @type = type
10515
10762
  @cadenya_provided_tool = cadenya_provided_tool
10763
+ @client_tool = client_tool
10516
10764
  end
10517
10765
 
10518
10766
  def self.from_json(data)
10519
10767
  new(
10520
10768
  type: data["type"],
10521
10769
  cadenya_provided_tool: data["cadenyaProvidedTool"].nil? ? nil : Types::ResourceMetadata.from_json(data["cadenyaProvidedTool"]),
10770
+ client_tool: data["clientTool"],
10522
10771
  )
10523
10772
  end
10524
10773
 
@@ -10526,22 +10775,25 @@ module Cadenya
10526
10775
  {
10527
10776
  type: Util.plain(@type),
10528
10777
  cadenya_provided_tool: Util.plain(@cadenya_provided_tool),
10778
+ client_tool: Util.plain(@client_tool),
10529
10779
  }.reject { |_k, v| v.nil? }
10530
10780
  end
10531
10781
  end
10532
10782
 
10533
10783
  class CallableTool_AgentPool
10534
- attr_reader :type, :agent_pool
10784
+ attr_reader :type, :agent_pool, :client_tool
10535
10785
 
10536
- def initialize(type: nil, agent_pool: nil)
10786
+ def initialize(type: nil, agent_pool: nil, client_tool: nil)
10537
10787
  @type = type
10538
10788
  @agent_pool = agent_pool
10789
+ @client_tool = client_tool
10539
10790
  end
10540
10791
 
10541
10792
  def self.from_json(data)
10542
10793
  new(
10543
10794
  type: data["type"],
10544
10795
  agent_pool: data["agentPool"].nil? ? nil : Types::ResourceMetadata.from_json(data["agentPool"]),
10796
+ client_tool: data["clientTool"],
10545
10797
  )
10546
10798
  end
10547
10799
 
@@ -10549,6 +10801,7 @@ module Cadenya
10549
10801
  {
10550
10802
  type: Util.plain(@type),
10551
10803
  agent_pool: Util.plain(@agent_pool),
10804
+ client_tool: Util.plain(@client_tool),
10552
10805
  }.reject { |_k, v| v.nil? }
10553
10806
  end
10554
10807
  end
@@ -10657,6 +10910,29 @@ module Cadenya
10657
10910
  end
10658
10911
  end
10659
10912
 
10913
+ class ObjectiveQueuedActionData_SubAgentUpdated
10914
+ attr_reader :type, :sub_agent_updated
10915
+
10916
+ def initialize(type: nil, sub_agent_updated: nil)
10917
+ @type = type
10918
+ @sub_agent_updated = sub_agent_updated
10919
+ end
10920
+
10921
+ def self.from_json(data)
10922
+ new(
10923
+ type: data["type"],
10924
+ sub_agent_updated: data["subAgentUpdated"].nil? ? nil : Types::SubAgentUpdated.from_json(data["subAgentUpdated"]),
10925
+ )
10926
+ end
10927
+
10928
+ def to_h
10929
+ {
10930
+ type: Util.plain(@type),
10931
+ sub_agent_updated: Util.plain(@sub_agent_updated),
10932
+ }.reject { |_k, v| v.nil? }
10933
+ end
10934
+ end
10935
+
10660
10936
  class ContinueObjectiveResponse_Event
10661
10937
  attr_reader :type, :event
10662
10938
 
@@ -11396,6 +11672,29 @@ module Cadenya
11396
11672
  end
11397
11673
  end
11398
11674
 
11675
+ class ModelSpec_Capability_Streaming
11676
+ attr_reader :type, :streaming
11677
+
11678
+ def initialize(type: nil, streaming: nil)
11679
+ @type = type
11680
+ @streaming = streaming
11681
+ end
11682
+
11683
+ def self.from_json(data)
11684
+ new(
11685
+ type: data["type"],
11686
+ streaming: data["streaming"].nil? ? nil : Types::Capability_Streaming.from_json(data["streaming"]),
11687
+ )
11688
+ end
11689
+
11690
+ def to_h
11691
+ {
11692
+ type: Util.plain(@type),
11693
+ streaming: Util.plain(@streaming),
11694
+ }.reject { |_k, v| v.nil? }
11695
+ end
11696
+ end
11697
+
11399
11698
  class CreateAndStreamObjectiveResponse_Objective
11400
11699
  attr_reader :type, :objective
11401
11700
 
@@ -11481,7 +11780,7 @@ module Cadenya
11481
11780
 
11482
11781
  AgentServiceListAgentFeedbackSentiment = ["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
11483
11782
 
11484
- 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", "OBJECTIVE_EVENT_TYPE_INTERRUPTED"].freeze
11783
+ 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", "OBJECTIVE_EVENT_TYPE_INTERRUPTED", "OBJECTIVE_EVENT_TYPE_ASSISTANT_MESSAGE_DELTA", "OBJECTIVE_EVENT_TYPE_REASONING_DELTA"].freeze
11485
11784
 
11486
11785
  MemoryServiceListMemoryLayersType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
11487
11786
 
@@ -11788,6 +12087,8 @@ module Cadenya
11788
12087
  "reasoningEffort" => ["reasoningEffort", nil],
11789
12088
  "caching_enabled" => ["cachingEnabled", nil],
11790
12089
  "cachingEnabled" => ["cachingEnabled", nil],
12090
+ "streaming_enabled" => ["streamingEnabled", nil],
12091
+ "streamingEnabled" => ["streamingEnabled", nil],
11791
12092
  }.freeze
11792
12093
 
11793
12094
  def self.encode_AgentVariationSpec_ModelConfig(data)
@@ -11849,6 +12150,26 @@ module Cadenya
11849
12150
  encode_fields(ENCODE_CAPABILITY_STOP_SEQUENCES, data)
11850
12151
  end
11851
12152
 
12153
+ ENCODE_CLIENT_TOOL_DEFINITION = {
12154
+ "name" => ["name", nil],
12155
+ "description" => ["description", nil],
12156
+ "parameters" => ["parameters", nil],
12157
+ "requires_approval" => ["requiresApproval", nil],
12158
+ "requiresApproval" => ["requiresApproval", nil],
12159
+ }.freeze
12160
+
12161
+ def self.encode_ClientToolDefinition(data)
12162
+ encode_fields(ENCODE_CLIENT_TOOL_DEFINITION, data)
12163
+ end
12164
+
12165
+ ENCODE_CLIENT_TOOLS = {
12166
+ "definitions" => ["definitions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ClientToolDefinition(_v) }).call(_i) } : _v }],
12167
+ }.freeze
12168
+
12169
+ def self.encode_ClientTools(data)
12170
+ encode_fields(ENCODE_CLIENT_TOOLS, data)
12171
+ end
12172
+
11852
12173
  ENCODE_COMPACTION_CONFIG_SUMMARIZATION_STRATEGY = {
11853
12174
  "instructions" => ["instructions", nil],
11854
12175
  }.freeze
@@ -12141,6 +12462,8 @@ module Cadenya
12141
12462
  (->(_v) { encode_ModelSpec_Capability_Reasoning(_v) }).call(data)
12142
12463
  when "caching"
12143
12464
  (->(_v) { encode_ModelSpec_Capability_Caching(_v) }).call(data)
12465
+ when "streaming"
12466
+ (->(_v) { encode_ModelSpec_Capability_Streaming(_v) }).call(data)
12144
12467
  else
12145
12468
  data
12146
12469
  end
@@ -13388,5 +13711,14 @@ module Cadenya
13388
13711
  encode_fields(ENCODE_MODEL_SPEC_CAPABILITY_CACHING, data)
13389
13712
  end
13390
13713
 
13714
+ ENCODE_MODEL_SPEC_CAPABILITY_STREAMING = {
13715
+ "type" => ["type", nil],
13716
+ "streaming" => ["streaming", nil],
13717
+ }.freeze
13718
+
13719
+ def self.encode_ModelSpec_Capability_Streaming(data)
13720
+ encode_fields(ENCODE_MODEL_SPEC_CAPABILITY_STREAMING, data)
13721
+ end
13722
+
13391
13723
  end
13392
13724
  end
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.8.0
4
+ version: 1.9.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-10-18 00:00:00.000000000 Z
11
+ date: 2026-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday