cadenya 1.6.0 → 1.8.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.
data/lib/cadenya/types.rb CHANGED
@@ -235,33 +235,38 @@ module Cadenya
235
235
  end
236
236
 
237
237
  class APIKeyInfo
238
- attr_reader :created_by
238
+ attr_reader :created_by, :workspaces
239
239
 
240
- def initialize(created_by: nil)
240
+ def initialize(created_by: nil, workspaces: nil)
241
241
  @created_by = created_by
242
+ @workspaces = workspaces
242
243
  end
243
244
 
244
245
  def self.from_json(data)
245
246
  new(
246
247
  created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
248
+ workspaces: data["workspaces"].nil? ? nil : (data["workspaces"]).map { |item| Types::AccountResourceMetadata.from_json(item) },
247
249
  )
248
250
  end
249
251
 
250
252
  def to_h
251
253
  {
252
254
  created_by: Util.plain(@created_by),
255
+ workspaces: Util.plain(@workspaces),
253
256
  }.reject { |_k, v| v.nil? }
254
257
  end
255
258
  end
256
259
 
257
260
  class APIKeySpec
258
- attr_reader :token, :description, :permissions, :system
261
+ attr_reader :token, :description, :permissions, :all_workspaces, :workspace_assignments, :default
259
262
 
260
- def initialize(token: nil, description: nil, permissions: nil, system: nil)
263
+ def initialize(token: nil, description: nil, permissions: nil, all_workspaces: nil, workspace_assignments: nil, default: nil)
261
264
  @token = token
262
265
  @description = description
263
266
  @permissions = permissions
264
- @system = system
267
+ @all_workspaces = all_workspaces
268
+ @workspace_assignments = workspace_assignments
269
+ @default = default
265
270
  end
266
271
 
267
272
  def self.from_json(data)
@@ -269,7 +274,9 @@ module Cadenya
269
274
  token: data["token"],
270
275
  description: data["description"],
271
276
  permissions: data["permissions"],
272
- system: data["system"],
277
+ all_workspaces: data["allWorkspaces"],
278
+ workspace_assignments: data["workspaceAssignments"].nil? ? nil : (data["workspaceAssignments"]).map { |item| Types::APIKeyWorkspaceAssignment.from_json(item) },
279
+ default: data["default"],
273
280
  )
274
281
  end
275
282
 
@@ -278,7 +285,29 @@ module Cadenya
278
285
  token: Util.plain(@token),
279
286
  description: Util.plain(@description),
280
287
  permissions: Util.plain(@permissions),
281
- system: Util.plain(@system),
288
+ all_workspaces: Util.plain(@all_workspaces),
289
+ workspace_assignments: Util.plain(@workspace_assignments),
290
+ default: Util.plain(@default),
291
+ }.reject { |_k, v| v.nil? }
292
+ end
293
+ end
294
+
295
+ class APIKeyWorkspaceAssignment
296
+ attr_reader :workspace_id
297
+
298
+ def initialize(workspace_id: nil)
299
+ @workspace_id = workspace_id
300
+ end
301
+
302
+ def self.from_json(data)
303
+ new(
304
+ workspace_id: data["workspaceId"],
305
+ )
306
+ end
307
+
308
+ def to_h
309
+ {
310
+ workspace_id: Util.plain(@workspace_id),
282
311
  }.reject { |_k, v| v.nil? }
283
312
  end
284
313
  end
@@ -422,6 +451,29 @@ module Cadenya
422
451
  end
423
452
  end
424
453
 
454
+ class AddAPIKeyWorkspaceRequest
455
+ attr_reader :id, :workspace_id
456
+
457
+ def initialize(id: nil, workspace_id: nil)
458
+ @id = id
459
+ @workspace_id = workspace_id
460
+ end
461
+
462
+ def self.from_json(data)
463
+ new(
464
+ id: data["id"],
465
+ workspace_id: data["workspaceId"],
466
+ )
467
+ end
468
+
469
+ def to_h
470
+ {
471
+ id: Util.plain(@id),
472
+ workspace_id: Util.plain(@workspace_id),
473
+ }.reject { |_k, v| v.nil? }
474
+ end
475
+ end
476
+
425
477
  def self.decode_AddAgentVariationAssignmentRequest(data)
426
478
  return nil if data.nil? || data["type"].to_s.empty?
427
479
  case data["type"]
@@ -817,9 +869,9 @@ module Cadenya
817
869
  AgentSpecVariationSelectionMode = ["VARIATION_SELECTION_MODE_UNSPECIFIED", "VARIATION_SELECTION_MODE_RANDOM", "VARIATION_SELECTION_MODE_WEIGHTED"].freeze
818
870
 
819
871
  class AgentSpec
820
- attr_reader :description, :webhook_events_url, :variation_selection_mode, :system_prompt_data_schema, :output_definition, :enable_episodic_memory, :episodic_memory_ttl
872
+ attr_reader :description, :webhook_events_url, :variation_selection_mode, :system_prompt_data_schema, :output_definition, :enable_episodic_memory, :episodic_memory_ttl, :always_include_subject_memories
821
873
 
822
- def initialize(description: nil, webhook_events_url: nil, variation_selection_mode: nil, system_prompt_data_schema: nil, output_definition: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil)
874
+ def initialize(description: nil, webhook_events_url: nil, variation_selection_mode: nil, system_prompt_data_schema: nil, output_definition: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, always_include_subject_memories: nil)
823
875
  @description = description
824
876
  @webhook_events_url = webhook_events_url
825
877
  @variation_selection_mode = variation_selection_mode
@@ -827,6 +879,7 @@ module Cadenya
827
879
  @output_definition = output_definition
828
880
  @enable_episodic_memory = enable_episodic_memory
829
881
  @episodic_memory_ttl = episodic_memory_ttl
882
+ @always_include_subject_memories = always_include_subject_memories
830
883
  end
831
884
 
832
885
  def self.from_json(data)
@@ -838,6 +891,7 @@ module Cadenya
838
891
  output_definition: data["outputDefinition"],
839
892
  enable_episodic_memory: data["enableEpisodicMemory"],
840
893
  episodic_memory_ttl: data["episodicMemoryTtl"],
894
+ always_include_subject_memories: data["alwaysIncludeSubjectMemories"],
841
895
  )
842
896
  end
843
897
 
@@ -850,6 +904,7 @@ module Cadenya
850
904
  output_definition: Util.plain(@output_definition),
851
905
  enable_episodic_memory: Util.plain(@enable_episodic_memory),
852
906
  episodic_memory_ttl: Util.plain(@episodic_memory_ttl),
907
+ always_include_subject_memories: Util.plain(@always_include_subject_memories),
853
908
  }.reject { |_k, v| v.nil? }
854
909
  end
855
910
  end
@@ -1237,17 +1292,21 @@ module Cadenya
1237
1292
  end
1238
1293
 
1239
1294
  class AssistantMessage
1240
- attr_reader :content, :tool_calls
1295
+ attr_reader :content, :tool_calls, :usage, :model
1241
1296
 
1242
- def initialize(content: nil, tool_calls: nil)
1297
+ def initialize(content: nil, tool_calls: nil, usage: nil, model: nil)
1243
1298
  @content = content
1244
1299
  @tool_calls = tool_calls
1300
+ @usage = usage
1301
+ @model = model
1245
1302
  end
1246
1303
 
1247
1304
  def self.from_json(data)
1248
1305
  new(
1249
1306
  content: data["content"],
1250
1307
  tool_calls: data["toolCalls"].nil? ? nil : (data["toolCalls"]).map { |item| Types::AssistantToolCall.from_json(item) },
1308
+ usage: data["usage"].nil? ? nil : Types::TokenUsage.from_json(data["usage"]),
1309
+ model: data["model"].nil? ? nil : Types::ResourceMetadata.from_json(data["model"]),
1251
1310
  )
1252
1311
  end
1253
1312
 
@@ -1255,17 +1314,20 @@ module Cadenya
1255
1314
  {
1256
1315
  content: Util.plain(@content),
1257
1316
  tool_calls: Util.plain(@tool_calls),
1317
+ usage: Util.plain(@usage),
1318
+ model: Util.plain(@model),
1258
1319
  }.reject { |_k, v| v.nil? }
1259
1320
  end
1260
1321
  end
1261
1322
 
1262
1323
  class AssistantToolCall
1263
- attr_reader :tool, :arguments, :function_name
1324
+ attr_reader :tool, :arguments, :function_name, :tool_call_id
1264
1325
 
1265
- def initialize(tool: nil, arguments: nil, function_name: nil)
1326
+ def initialize(tool: nil, arguments: nil, function_name: nil, tool_call_id: nil)
1266
1327
  @tool = tool
1267
1328
  @arguments = arguments
1268
1329
  @function_name = function_name
1330
+ @tool_call_id = tool_call_id
1269
1331
  end
1270
1332
 
1271
1333
  def self.from_json(data)
@@ -1273,6 +1335,7 @@ module Cadenya
1273
1335
  tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
1274
1336
  arguments: data["arguments"],
1275
1337
  function_name: data["functionName"],
1338
+ tool_call_id: data["toolCallId"],
1276
1339
  )
1277
1340
  end
1278
1341
 
@@ -1281,6 +1344,58 @@ module Cadenya
1281
1344
  tool: Util.plain(@tool),
1282
1345
  arguments: Util.plain(@arguments),
1283
1346
  function_name: Util.plain(@function_name),
1347
+ tool_call_id: Util.plain(@tool_call_id),
1348
+ }.reject { |_k, v| v.nil? }
1349
+ end
1350
+ end
1351
+
1352
+ AutoModeConfigPassingMode = ["PASSING_MODE_UNSPECIFIED", "PASSING_MODE_ALL", "PASSING_MODE_NONE", "PASSING_MODE_MOST"].freeze
1353
+
1354
+ class AutoModeConfig
1355
+ attr_reader :questions, :passing_mode, :failure_message
1356
+
1357
+ def initialize(questions: nil, passing_mode: nil, failure_message: nil)
1358
+ @questions = questions
1359
+ @passing_mode = passing_mode
1360
+ @failure_message = failure_message
1361
+ end
1362
+
1363
+ def self.from_json(data)
1364
+ new(
1365
+ questions: data["questions"].nil? ? nil : (data["questions"]).map { |item| Types::AutoModeQuestion.from_json(item) },
1366
+ passing_mode: data["passingMode"],
1367
+ failure_message: data["failureMessage"],
1368
+ )
1369
+ end
1370
+
1371
+ def to_h
1372
+ {
1373
+ questions: Util.plain(@questions),
1374
+ passing_mode: Util.plain(@passing_mode),
1375
+ failure_message: Util.plain(@failure_message),
1376
+ }.reject { |_k, v| v.nil? }
1377
+ end
1378
+ end
1379
+
1380
+ class AutoModeQuestion
1381
+ attr_reader :question, :threshold
1382
+
1383
+ def initialize(question: nil, threshold: nil)
1384
+ @question = question
1385
+ @threshold = threshold
1386
+ end
1387
+
1388
+ def self.from_json(data)
1389
+ new(
1390
+ question: data["question"],
1391
+ threshold: data["threshold"],
1392
+ )
1393
+ end
1394
+
1395
+ def to_h
1396
+ {
1397
+ question: Util.plain(@question),
1398
+ threshold: Util.plain(@threshold),
1284
1399
  }.reject { |_k, v| v.nil? }
1285
1400
  end
1286
1401
  end
@@ -1488,26 +1603,6 @@ module Cadenya
1488
1603
  end
1489
1604
  end
1490
1605
 
1491
- class CompactObjectiveResponse
1492
- attr_reader :context_window
1493
-
1494
- def initialize(context_window: nil)
1495
- @context_window = context_window
1496
- end
1497
-
1498
- def self.from_json(data)
1499
- new(
1500
- context_window: data["contextWindow"].nil? ? nil : Types::ObjectiveContextWindowData.from_json(data["contextWindow"]),
1501
- )
1502
- end
1503
-
1504
- def to_h
1505
- {
1506
- context_window: Util.plain(@context_window),
1507
- }.reject { |_k, v| v.nil? }
1508
- end
1509
- end
1510
-
1511
1606
  class CompactionConfig_SummarizationStrategy
1512
1607
  attr_reader :instructions
1513
1608
 
@@ -1626,17 +1721,19 @@ module Cadenya
1626
1721
  end
1627
1722
 
1628
1723
  class Config_OpenAPI
1629
- attr_reader :path, :method
1724
+ attr_reader :path, :method, :server_url
1630
1725
 
1631
- def initialize(path: nil, method: nil)
1726
+ def initialize(path: nil, method: nil, server_url: nil)
1632
1727
  @path = path
1633
1728
  @method = method
1729
+ @server_url = server_url
1634
1730
  end
1635
1731
 
1636
1732
  def self.from_json(data)
1637
1733
  new(
1638
1734
  path: data["path"],
1639
1735
  method: data["method"],
1736
+ server_url: data["serverUrl"],
1640
1737
  )
1641
1738
  end
1642
1739
 
@@ -1644,6 +1741,7 @@ module Cadenya
1644
1741
  {
1645
1742
  path: Util.plain(@path),
1646
1743
  method: Util.plain(@method),
1744
+ server_url: Util.plain(@server_url),
1647
1745
  }.reject { |_k, v| v.nil? }
1648
1746
  end
1649
1747
  end
@@ -1747,6 +1845,18 @@ module Cadenya
1747
1845
  end
1748
1846
  end
1749
1847
 
1848
+ def self.decode_ContinueObjectiveResponse(data)
1849
+ return nil if data.nil? || data["type"].to_s.empty?
1850
+ case data["type"]
1851
+ when "event"
1852
+ Types::ContinueObjectiveResponse_Event.from_json(data)
1853
+ when "queuedAction"
1854
+ Types::ContinueObjectiveResponse_QueuedAction.from_json(data)
1855
+ else
1856
+ raise ArgumentError, "ContinueObjectiveResponse: unknown type #{data["type"].inspect}"
1857
+ end
1858
+ end
1859
+
1750
1860
  class CreateAIProviderKeyRequest
1751
1861
  attr_reader :workspace_id, :metadata, :spec
1752
1862
 
@@ -1774,19 +1884,17 @@ module Cadenya
1774
1884
  end
1775
1885
 
1776
1886
  class CreateAPIKeyRequest
1777
- attr_reader :metadata, :spec, :workspace_id
1887
+ attr_reader :metadata, :spec
1778
1888
 
1779
- def initialize(metadata: nil, spec: nil, workspace_id: nil)
1889
+ def initialize(metadata: nil, spec: nil)
1780
1890
  @metadata = metadata
1781
1891
  @spec = spec
1782
- @workspace_id = workspace_id
1783
1892
  end
1784
1893
 
1785
1894
  def self.from_json(data)
1786
1895
  new(
1787
1896
  metadata: data["metadata"].nil? ? nil : Types::CreateAccountResourceMetadata.from_json(data["metadata"]),
1788
1897
  spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]),
1789
- workspace_id: data["workspaceId"],
1790
1898
  )
1791
1899
  end
1792
1900
 
@@ -1794,7 +1902,6 @@ module Cadenya
1794
1902
  {
1795
1903
  metadata: Util.plain(@metadata),
1796
1904
  spec: Util.plain(@spec),
1797
- workspace_id: Util.plain(@workspace_id),
1798
1905
  }.reject { |_k, v| v.nil? }
1799
1906
  end
1800
1907
  end
@@ -1938,6 +2045,97 @@ module Cadenya
1938
2045
  end
1939
2046
  end
1940
2047
 
2048
+ 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
2050
+
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)
2052
+ @workspace_id = workspace_id
2053
+ @agent_id = agent_id
2054
+ @variation_id = variation_id
2055
+ @metadata = metadata
2056
+ @system_prompt_data = system_prompt_data
2057
+ @first_user_message = first_user_message
2058
+ @secrets = secrets
2059
+ @memory_cascade = memory_cascade
2060
+ @first_user_message_data = first_user_message_data
2061
+ @episodic_memory = episodic_memory
2062
+ @tenant = tenant
2063
+ @subject = subject
2064
+ @pinned_parameters = pinned_parameters
2065
+ end
2066
+
2067
+ def self.from_json(data)
2068
+ new(
2069
+ workspace_id: data["workspaceId"],
2070
+ agent_id: data["agentId"],
2071
+ variation_id: data["variationId"],
2072
+ metadata: data["metadata"].nil? ? nil : Types::CreateAndStreamObjectiveRequest_Metadata.from_json(data["metadata"]),
2073
+ system_prompt_data: data["systemPromptData"],
2074
+ first_user_message: data["firstUserMessage"],
2075
+ secrets: data["secrets"].nil? ? nil : (data["secrets"]).map { |item| Types::CreateObjectiveRequest_Secret.from_json(item) },
2076
+ memory_cascade: data["memoryCascade"].nil? ? nil : (data["memoryCascade"]).map { |item| Types::MemoryReference.from_json(item) },
2077
+ first_user_message_data: data["firstUserMessageData"],
2078
+ episodic_memory: data["episodicMemory"].nil? ? nil : Types::ObjectiveEpisodicConfig.from_json(data["episodicMemory"]),
2079
+ tenant: data["tenant"].nil? ? nil : Types::TenantAssertion.from_json(data["tenant"]),
2080
+ subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
2081
+ pinned_parameters: data["pinnedParameters"],
2082
+ )
2083
+ end
2084
+
2085
+ def to_h
2086
+ {
2087
+ workspace_id: Util.plain(@workspace_id),
2088
+ agent_id: Util.plain(@agent_id),
2089
+ variation_id: Util.plain(@variation_id),
2090
+ metadata: Util.plain(@metadata),
2091
+ system_prompt_data: Util.plain(@system_prompt_data),
2092
+ first_user_message: Util.plain(@first_user_message),
2093
+ secrets: Util.plain(@secrets),
2094
+ memory_cascade: Util.plain(@memory_cascade),
2095
+ first_user_message_data: Util.plain(@first_user_message_data),
2096
+ episodic_memory: Util.plain(@episodic_memory),
2097
+ tenant: Util.plain(@tenant),
2098
+ subject: Util.plain(@subject),
2099
+ pinned_parameters: Util.plain(@pinned_parameters),
2100
+ }.reject { |_k, v| v.nil? }
2101
+ end
2102
+ end
2103
+
2104
+ class CreateAndStreamObjectiveRequest_Metadata
2105
+ attr_reader :labels, :external_id
2106
+
2107
+ def initialize(labels: nil, external_id: nil)
2108
+ @labels = labels
2109
+ @external_id = external_id
2110
+ end
2111
+
2112
+ def self.from_json(data)
2113
+ new(
2114
+ labels: data["labels"],
2115
+ external_id: data["externalId"],
2116
+ )
2117
+ end
2118
+
2119
+ def to_h
2120
+ {
2121
+ labels: Util.plain(@labels),
2122
+ external_id: Util.plain(@external_id),
2123
+ }.reject { |_k, v| v.nil? }
2124
+ end
2125
+ end
2126
+
2127
+ def self.decode_CreateAndStreamObjectiveResponse(data)
2128
+ return nil if data.nil? || data["type"].to_s.empty?
2129
+ case data["type"]
2130
+ when "objective"
2131
+ Types::CreateAndStreamObjectiveResponse_Objective.from_json(data)
2132
+ when "event"
2133
+ Types::CreateAndStreamObjectiveResponse_Event.from_json(data)
2134
+ else
2135
+ raise ArgumentError, "CreateAndStreamObjectiveResponse: unknown type #{data["type"].inspect}"
2136
+ end
2137
+ end
2138
+
1941
2139
  class CreateMemoryEntryRequest
1942
2140
  attr_reader :workspace_id, :memory_layer_id, :metadata, :spec
1943
2141
 
@@ -1968,12 +2166,14 @@ module Cadenya
1968
2166
  end
1969
2167
 
1970
2168
  class CreateMemoryLayerRequest
1971
- attr_reader :workspace_id, :metadata, :spec
2169
+ attr_reader :workspace_id, :metadata, :spec, :tenant, :subject
1972
2170
 
1973
- def initialize(workspace_id: nil, metadata: nil, spec: nil)
2171
+ def initialize(workspace_id: nil, metadata: nil, spec: nil, tenant: nil, subject: nil)
1974
2172
  @workspace_id = workspace_id
1975
2173
  @metadata = metadata
1976
2174
  @spec = spec
2175
+ @tenant = tenant
2176
+ @subject = subject
1977
2177
  end
1978
2178
 
1979
2179
  def self.from_json(data)
@@ -1981,6 +2181,8 @@ module Cadenya
1981
2181
  workspace_id: data["workspaceId"],
1982
2182
  metadata: data["metadata"].nil? ? nil : Types::CreateResourceMetadata.from_json(data["metadata"]),
1983
2183
  spec: data["spec"].nil? ? nil : Types::MemoryLayerSpec.from_json(data["spec"]),
2184
+ tenant: data["tenant"].nil? ? nil : Types::TenantAssertion.from_json(data["tenant"]),
2185
+ subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
1984
2186
  )
1985
2187
  end
1986
2188
 
@@ -1989,6 +2191,8 @@ module Cadenya
1989
2191
  workspace_id: Util.plain(@workspace_id),
1990
2192
  metadata: Util.plain(@metadata),
1991
2193
  spec: Util.plain(@spec),
2194
+ tenant: Util.plain(@tenant),
2195
+ subject: Util.plain(@subject),
1992
2196
  }.reject { |_k, v| v.nil? }
1993
2197
  end
1994
2198
  end
@@ -2263,6 +2467,29 @@ module Cadenya
2263
2467
  end
2264
2468
  end
2265
2469
 
2470
+ class CreateTrustedEndpointRequest
2471
+ attr_reader :metadata, :spec
2472
+
2473
+ def initialize(metadata: nil, spec: nil)
2474
+ @metadata = metadata
2475
+ @spec = spec
2476
+ end
2477
+
2478
+ def self.from_json(data)
2479
+ new(
2480
+ metadata: data["metadata"].nil? ? nil : Types::CreateAccountResourceMetadata.from_json(data["metadata"]),
2481
+ spec: data["spec"].nil? ? nil : Types::TrustedEndpointSpec.from_json(data["spec"]),
2482
+ )
2483
+ end
2484
+
2485
+ def to_h
2486
+ {
2487
+ metadata: Util.plain(@metadata),
2488
+ spec: Util.plain(@spec),
2489
+ }.reject { |_k, v| v.nil? }
2490
+ end
2491
+ end
2492
+
2266
2493
  class CreateUploadRequest
2267
2494
  attr_reader :workspace_id, :metadata, :spec
2268
2495
 
@@ -2578,23 +2805,20 @@ module Cadenya
2578
2805
  end
2579
2806
 
2580
2807
  class DisableAPIKeyRequest
2581
- attr_reader :workspace_id, :id
2808
+ attr_reader :id
2582
2809
 
2583
- def initialize(workspace_id: nil, id: nil)
2584
- @workspace_id = workspace_id
2810
+ def initialize(id: nil)
2585
2811
  @id = id
2586
2812
  end
2587
2813
 
2588
2814
  def self.from_json(data)
2589
2815
  new(
2590
- workspace_id: data["workspaceId"],
2591
2816
  id: data["id"],
2592
2817
  )
2593
2818
  end
2594
2819
 
2595
2820
  def to_h
2596
2821
  {
2597
- workspace_id: Util.plain(@workspace_id),
2598
2822
  id: Util.plain(@id),
2599
2823
  }.reject { |_k, v| v.nil? }
2600
2824
  end
@@ -2624,23 +2848,20 @@ module Cadenya
2624
2848
  end
2625
2849
 
2626
2850
  class EnableAPIKeyRequest
2627
- attr_reader :workspace_id, :id
2851
+ attr_reader :id
2628
2852
 
2629
- def initialize(workspace_id: nil, id: nil)
2630
- @workspace_id = workspace_id
2853
+ def initialize(id: nil)
2631
2854
  @id = id
2632
2855
  end
2633
2856
 
2634
2857
  def self.from_json(data)
2635
2858
  new(
2636
- workspace_id: data["workspaceId"],
2637
2859
  id: data["id"],
2638
2860
  )
2639
2861
  end
2640
2862
 
2641
2863
  def to_h
2642
2864
  {
2643
- workspace_id: Util.plain(@workspace_id),
2644
2865
  id: Util.plain(@id),
2645
2866
  }.reject { |_k, v| v.nil? }
2646
2867
  end
@@ -2729,6 +2950,29 @@ module Cadenya
2729
2950
  end
2730
2951
  end
2731
2952
 
2953
+ class InterruptObjectiveRequest
2954
+ attr_reader :workspace_id, :objective_id
2955
+
2956
+ def initialize(workspace_id: nil, objective_id: nil)
2957
+ @workspace_id = workspace_id
2958
+ @objective_id = objective_id
2959
+ end
2960
+
2961
+ def self.from_json(data)
2962
+ new(
2963
+ workspace_id: data["workspaceId"],
2964
+ objective_id: data["objectiveId"],
2965
+ )
2966
+ end
2967
+
2968
+ def to_h
2969
+ {
2970
+ workspace_id: Util.plain(@workspace_id),
2971
+ objective_id: Util.plain(@objective_id),
2972
+ }.reject { |_k, v| v.nil? }
2973
+ end
2974
+ end
2975
+
2732
2976
  class ListAIProviderKeysResponse
2733
2977
  attr_reader :items, :pagination
2734
2978
 
@@ -3074,7 +3318,7 @@ module Cadenya
3074
3318
  end
3075
3319
  end
3076
3320
 
3077
- class ListObjectiveToolCallsResponse
3321
+ class ListObjectiveQueuedActionsResponse
3078
3322
  attr_reader :items, :pagination
3079
3323
 
3080
3324
  def initialize(items: nil, pagination: nil)
@@ -3084,7 +3328,7 @@ module Cadenya
3084
3328
 
3085
3329
  def self.from_json(data)
3086
3330
  new(
3087
- items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ObjectiveToolCall.from_json(item) },
3331
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ObjectiveQueuedAction.from_json(item) },
3088
3332
  pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3089
3333
  )
3090
3334
  end
@@ -3097,7 +3341,7 @@ module Cadenya
3097
3341
  end
3098
3342
  end
3099
3343
 
3100
- class ListObjectiveToolsResponse
3344
+ class ListObjectiveToolCallsResponse
3101
3345
  attr_reader :items, :pagination
3102
3346
 
3103
3347
  def initialize(items: nil, pagination: nil)
@@ -3107,7 +3351,7 @@ module Cadenya
3107
3351
 
3108
3352
  def self.from_json(data)
3109
3353
  new(
3110
- items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ObjectiveTool.from_json(item) },
3354
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ObjectiveToolCall.from_json(item) },
3111
3355
  pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3112
3356
  )
3113
3357
  end
@@ -3120,7 +3364,7 @@ module Cadenya
3120
3364
  end
3121
3365
  end
3122
3366
 
3123
- class ListObjectivesResponse
3367
+ class ListObjectiveToolsResponse
3124
3368
  attr_reader :items, :pagination
3125
3369
 
3126
3370
  def initialize(items: nil, pagination: nil)
@@ -3130,7 +3374,7 @@ module Cadenya
3130
3374
 
3131
3375
  def self.from_json(data)
3132
3376
  new(
3133
- items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::Objective.from_json(item) },
3377
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ObjectiveTool.from_json(item) },
3134
3378
  pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3135
3379
  )
3136
3380
  end
@@ -3143,7 +3387,7 @@ module Cadenya
3143
3387
  end
3144
3388
  end
3145
3389
 
3146
- class ListProfilesResponse
3390
+ class ListObjectivesResponse
3147
3391
  attr_reader :items, :pagination
3148
3392
 
3149
3393
  def initialize(items: nil, pagination: nil)
@@ -3153,7 +3397,30 @@ module Cadenya
3153
3397
 
3154
3398
  def self.from_json(data)
3155
3399
  new(
3156
- items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::Profile.from_json(item) },
3400
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::Objective.from_json(item) },
3401
+ pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3402
+ )
3403
+ end
3404
+
3405
+ def to_h
3406
+ {
3407
+ items: Util.plain(@items),
3408
+ pagination: Util.plain(@pagination),
3409
+ }.reject { |_k, v| v.nil? }
3410
+ end
3411
+ end
3412
+
3413
+ class ListProfilesResponse
3414
+ attr_reader :items, :pagination
3415
+
3416
+ def initialize(items: nil, pagination: nil)
3417
+ @items = items
3418
+ @pagination = pagination
3419
+ end
3420
+
3421
+ def self.from_json(data)
3422
+ new(
3423
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::Profile.from_json(item) },
3157
3424
  pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3158
3425
  )
3159
3426
  end
@@ -3327,6 +3594,29 @@ module Cadenya
3327
3594
  end
3328
3595
  end
3329
3596
 
3597
+ class ListTrustedEndpointsResponse
3598
+ attr_reader :items, :pagination
3599
+
3600
+ def initialize(items: nil, pagination: nil)
3601
+ @items = items
3602
+ @pagination = pagination
3603
+ end
3604
+
3605
+ def self.from_json(data)
3606
+ new(
3607
+ items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::TrustedEndpoint.from_json(item) },
3608
+ pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
3609
+ )
3610
+ end
3611
+
3612
+ def to_h
3613
+ {
3614
+ items: Util.plain(@items),
3615
+ pagination: Util.plain(@pagination),
3616
+ }.reject { |_k, v| v.nil? }
3617
+ end
3618
+ end
3619
+
3330
3620
  class ListWidgetSessionsResponse
3331
3621
  attr_reader :items, :pagination
3332
3622
 
@@ -3643,13 +3933,15 @@ module Cadenya
3643
3933
  end
3644
3934
 
3645
3935
  class MemoryLayerInfo
3646
- attr_reader :entry_count, :created_by, :last_used_at, :agent
3936
+ attr_reader :entry_count, :created_by, :last_used_at, :agent, :tenant, :subject
3647
3937
 
3648
- def initialize(entry_count: nil, created_by: nil, last_used_at: nil, agent: nil)
3938
+ def initialize(entry_count: nil, created_by: nil, last_used_at: nil, agent: nil, tenant: nil, subject: nil)
3649
3939
  @entry_count = entry_count
3650
3940
  @created_by = created_by
3651
3941
  @last_used_at = last_used_at
3652
3942
  @agent = agent
3943
+ @tenant = tenant
3944
+ @subject = subject
3653
3945
  end
3654
3946
 
3655
3947
  def self.from_json(data)
@@ -3658,6 +3950,8 @@ module Cadenya
3658
3950
  created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
3659
3951
  last_used_at: data["lastUsedAt"].nil? ? nil : Time.iso8601(data["lastUsedAt"]),
3660
3952
  agent: data["agent"].nil? ? nil : Types::ResourceMetadata.from_json(data["agent"]),
3953
+ tenant: data["tenant"].nil? ? nil : Types::TenantReference.from_json(data["tenant"]),
3954
+ subject: data["subject"].nil? ? nil : Types::SubjectReference.from_json(data["subject"]),
3661
3955
  )
3662
3956
  end
3663
3957
 
@@ -3667,6 +3961,8 @@ module Cadenya
3667
3961
  created_by: Util.plain(@created_by),
3668
3962
  last_used_at: Util.plain(@last_used_at),
3669
3963
  agent: Util.plain(@agent),
3964
+ tenant: Util.plain(@tenant),
3965
+ subject: Util.plain(@subject),
3670
3966
  }.reject { |_k, v| v.nil? }
3671
3967
  end
3672
3968
  end
@@ -3674,15 +3970,17 @@ module Cadenya
3674
3970
  MemoryLayerSpecType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
3675
3971
 
3676
3972
  class MemoryLayerSpec
3677
- attr_reader :type, :description, :system_managed, :expires_at, :agent_id, :episodic_key
3973
+ attr_reader :type, :description, :system_managed, :expires_at, :agent_id, :episodic_key, :tenant_id, :subject_id
3678
3974
 
3679
- def initialize(type: nil, description: nil, system_managed: nil, expires_at: nil, agent_id: nil, episodic_key: nil)
3975
+ def initialize(type: nil, description: nil, system_managed: nil, expires_at: nil, agent_id: nil, episodic_key: nil, tenant_id: nil, subject_id: nil)
3680
3976
  @type = type
3681
3977
  @description = description
3682
3978
  @system_managed = system_managed
3683
3979
  @expires_at = expires_at
3684
3980
  @agent_id = agent_id
3685
3981
  @episodic_key = episodic_key
3982
+ @tenant_id = tenant_id
3983
+ @subject_id = subject_id
3686
3984
  end
3687
3985
 
3688
3986
  def self.from_json(data)
@@ -3693,6 +3991,8 @@ module Cadenya
3693
3991
  expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]),
3694
3992
  agent_id: data["agentId"],
3695
3993
  episodic_key: data["episodicKey"],
3994
+ tenant_id: data["tenantId"],
3995
+ subject_id: data["subjectId"],
3696
3996
  )
3697
3997
  end
3698
3998
 
@@ -3704,6 +4004,8 @@ module Cadenya
3704
4004
  expires_at: Util.plain(@expires_at),
3705
4005
  agent_id: Util.plain(@agent_id),
3706
4006
  episodic_key: Util.plain(@episodic_key),
4007
+ tenant_id: Util.plain(@tenant_id),
4008
+ subject_id: Util.plain(@subject_id),
3707
4009
  }.reject { |_k, v| v.nil? }
3708
4010
  end
3709
4011
  end
@@ -3800,17 +4102,19 @@ module Cadenya
3800
4102
  end
3801
4103
 
3802
4104
  class ModelBasePricing
3803
- attr_reader :input_price_per_million_tokens, :output_price_per_million_tokens
4105
+ attr_reader :input_price_per_million_tokens, :output_price_per_million_tokens, :cached_input_price_per_million_tokens
3804
4106
 
3805
- def initialize(input_price_per_million_tokens: nil, output_price_per_million_tokens: nil)
4107
+ def initialize(input_price_per_million_tokens: nil, output_price_per_million_tokens: nil, cached_input_price_per_million_tokens: nil)
3806
4108
  @input_price_per_million_tokens = input_price_per_million_tokens
3807
4109
  @output_price_per_million_tokens = output_price_per_million_tokens
4110
+ @cached_input_price_per_million_tokens = cached_input_price_per_million_tokens
3808
4111
  end
3809
4112
 
3810
4113
  def self.from_json(data)
3811
4114
  new(
3812
4115
  input_price_per_million_tokens: data["inputPricePerMillionTokens"],
3813
4116
  output_price_per_million_tokens: data["outputPricePerMillionTokens"],
4117
+ cached_input_price_per_million_tokens: data["cachedInputPricePerMillionTokens"],
3814
4118
  )
3815
4119
  end
3816
4120
 
@@ -3818,6 +4122,7 @@ module Cadenya
3818
4122
  {
3819
4123
  input_price_per_million_tokens: Util.plain(@input_price_per_million_tokens),
3820
4124
  output_price_per_million_tokens: Util.plain(@output_price_per_million_tokens),
4125
+ cached_input_price_per_million_tokens: Util.plain(@cached_input_price_per_million_tokens),
3821
4126
  }.reject { |_k, v| v.nil? }
3822
4127
  end
3823
4128
  end
@@ -3849,17 +4154,19 @@ module Cadenya
3849
4154
  end
3850
4155
 
3851
4156
  class ModelPricingOverride
3852
- attr_reader :input_price_per_million_tokens, :output_price_per_million_tokens
4157
+ attr_reader :input_price_per_million_tokens, :output_price_per_million_tokens, :cached_input_price_per_million_tokens
3853
4158
 
3854
- def initialize(input_price_per_million_tokens: nil, output_price_per_million_tokens: nil)
4159
+ def initialize(input_price_per_million_tokens: nil, output_price_per_million_tokens: nil, cached_input_price_per_million_tokens: nil)
3855
4160
  @input_price_per_million_tokens = input_price_per_million_tokens
3856
4161
  @output_price_per_million_tokens = output_price_per_million_tokens
4162
+ @cached_input_price_per_million_tokens = cached_input_price_per_million_tokens
3857
4163
  end
3858
4164
 
3859
4165
  def self.from_json(data)
3860
4166
  new(
3861
4167
  input_price_per_million_tokens: data["inputPricePerMillionTokens"],
3862
4168
  output_price_per_million_tokens: data["outputPricePerMillionTokens"],
4169
+ cached_input_price_per_million_tokens: data["cachedInputPricePerMillionTokens"],
3863
4170
  )
3864
4171
  end
3865
4172
 
@@ -3867,20 +4174,22 @@ module Cadenya
3867
4174
  {
3868
4175
  input_price_per_million_tokens: Util.plain(@input_price_per_million_tokens),
3869
4176
  output_price_per_million_tokens: Util.plain(@output_price_per_million_tokens),
4177
+ cached_input_price_per_million_tokens: Util.plain(@cached_input_price_per_million_tokens),
3870
4178
  }.reject { |_k, v| v.nil? }
3871
4179
  end
3872
4180
  end
3873
4181
 
3874
4182
  class ModelSpec
3875
- attr_reader :provider, :family, :max_input_tokens, :max_output_tokens, :input_price_per_million_tokens, :output_price_per_million_tokens, :capabilities, :provider_model_id
4183
+ attr_reader :provider, :family, :max_input_tokens, :max_output_tokens, :input_price_per_million_tokens, :output_price_per_million_tokens, :cached_input_price_per_million_tokens, :capabilities, :provider_model_id
3876
4184
 
3877
- def initialize(provider: nil, family: nil, max_input_tokens: nil, max_output_tokens: nil, input_price_per_million_tokens: nil, output_price_per_million_tokens: nil, capabilities: nil, provider_model_id: nil)
4185
+ def initialize(provider: nil, family: nil, max_input_tokens: nil, max_output_tokens: nil, input_price_per_million_tokens: nil, output_price_per_million_tokens: nil, cached_input_price_per_million_tokens: nil, capabilities: nil, provider_model_id: nil)
3878
4186
  @provider = provider
3879
4187
  @family = family
3880
4188
  @max_input_tokens = max_input_tokens
3881
4189
  @max_output_tokens = max_output_tokens
3882
4190
  @input_price_per_million_tokens = input_price_per_million_tokens
3883
4191
  @output_price_per_million_tokens = output_price_per_million_tokens
4192
+ @cached_input_price_per_million_tokens = cached_input_price_per_million_tokens
3884
4193
  @capabilities = capabilities
3885
4194
  @provider_model_id = provider_model_id
3886
4195
  end
@@ -3893,6 +4202,7 @@ module Cadenya
3893
4202
  max_output_tokens: data["maxOutputTokens"],
3894
4203
  input_price_per_million_tokens: data["inputPricePerMillionTokens"],
3895
4204
  output_price_per_million_tokens: data["outputPricePerMillionTokens"],
4205
+ cached_input_price_per_million_tokens: data["cachedInputPricePerMillionTokens"],
3896
4206
  capabilities: data["capabilities"].nil? ? nil : (data["capabilities"]).map { |item| Types.decode_ModelSpec_Capability(item) },
3897
4207
  provider_model_id: data["providerModelId"],
3898
4208
  )
@@ -3906,6 +4216,7 @@ module Cadenya
3906
4216
  max_output_tokens: Util.plain(@max_output_tokens),
3907
4217
  input_price_per_million_tokens: Util.plain(@input_price_per_million_tokens),
3908
4218
  output_price_per_million_tokens: Util.plain(@output_price_per_million_tokens),
4219
+ cached_input_price_per_million_tokens: Util.plain(@cached_input_price_per_million_tokens),
3909
4220
  capabilities: Util.plain(@capabilities),
3910
4221
  provider_model_id: Util.plain(@provider_model_id),
3911
4222
  }.reject { |_k, v| v.nil? }
@@ -3962,7 +4273,7 @@ module Cadenya
3962
4273
  end
3963
4274
  end
3964
4275
 
3965
- 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
4276
+ 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", "OBJECTIVE_STATE_INTERRUPTING"].freeze
3966
4277
 
3967
4278
  class Objective
3968
4279
  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
@@ -4180,17 +4491,19 @@ module Cadenya
4180
4491
  end
4181
4492
 
4182
4493
  class ObjectiveEpisodicConfig
4183
- attr_reader :key, :memory_layer_id
4494
+ attr_reader :key, :memory_layer_id, :included_memory_layer_ids
4184
4495
 
4185
- def initialize(key: nil, memory_layer_id: nil)
4496
+ def initialize(key: nil, memory_layer_id: nil, included_memory_layer_ids: nil)
4186
4497
  @key = key
4187
4498
  @memory_layer_id = memory_layer_id
4499
+ @included_memory_layer_ids = included_memory_layer_ids
4188
4500
  end
4189
4501
 
4190
4502
  def self.from_json(data)
4191
4503
  new(
4192
4504
  key: data["key"],
4193
4505
  memory_layer_id: data["memoryLayerId"],
4506
+ included_memory_layer_ids: data["includedMemoryLayerIds"],
4194
4507
  )
4195
4508
  end
4196
4509
 
@@ -4198,6 +4511,7 @@ module Cadenya
4198
4511
  {
4199
4512
  key: Util.plain(@key),
4200
4513
  memory_layer_id: Util.plain(@memory_layer_id),
4514
+ included_memory_layer_ids: Util.plain(@included_memory_layer_ids),
4201
4515
  }.reject { |_k, v| v.nil? }
4202
4516
  end
4203
4517
  end
@@ -4303,6 +4617,8 @@ module Cadenya
4303
4617
  Types::ObjectiveEventData_StateChanged.from_json(data)
4304
4618
  when "heartbeat"
4305
4619
  Types::ObjectiveEventData_Heartbeat.from_json(data)
4620
+ when "interrupted"
4621
+ Types::ObjectiveEventData_Interrupted.from_json(data)
4306
4622
  else
4307
4623
  raise ArgumentError, "ObjectiveEventData: unknown type #{data["type"].inspect}"
4308
4624
  end
@@ -4495,9 +4811,78 @@ module Cadenya
4495
4811
  end
4496
4812
  end
4497
4813
 
4498
- 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
4814
+ class ObjectiveInterrupted
4815
+ attr_reader :message
4816
+
4817
+ def initialize(message: nil)
4818
+ @message = message
4819
+ end
4820
+
4821
+ def self.from_json(data)
4822
+ new(
4823
+ message: data["message"],
4824
+ )
4825
+ end
4826
+
4827
+ def to_h
4828
+ {
4829
+ message: Util.plain(@message),
4830
+ }.reject { |_k, v| v.nil? }
4831
+ end
4832
+ end
4833
+
4834
+ ObjectiveQueuedActionState = ["STATE_UNSPECIFIED", "STATE_QUEUED", "STATE_SENT", "STATE_REMOVED", "STATE_DISCARDED"].freeze
4499
4835
 
4500
- 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
4836
+ class ObjectiveQueuedAction
4837
+ attr_reader :metadata, :objective_id, :data, :state, :sent_at, :objective_event_id
4838
+
4839
+ def initialize(metadata: nil, objective_id: nil, data: nil, state: nil, sent_at: nil, objective_event_id: nil)
4840
+ @metadata = metadata
4841
+ @objective_id = objective_id
4842
+ @data = data
4843
+ @state = state
4844
+ @sent_at = sent_at
4845
+ @objective_event_id = objective_event_id
4846
+ end
4847
+
4848
+ def self.from_json(data)
4849
+ new(
4850
+ metadata: data["metadata"].nil? ? nil : Types::OperationMetadata.from_json(data["metadata"]),
4851
+ objective_id: data["objectiveId"],
4852
+ data: data["data"].nil? ? nil : Types.decode_ObjectiveQueuedActionData(data["data"]),
4853
+ state: data["state"],
4854
+ sent_at: data["sentAt"].nil? ? nil : Time.iso8601(data["sentAt"]),
4855
+ objective_event_id: data["objectiveEventId"],
4856
+ )
4857
+ end
4858
+
4859
+ def to_h
4860
+ {
4861
+ metadata: Util.plain(@metadata),
4862
+ objective_id: Util.plain(@objective_id),
4863
+ data: Util.plain(@data),
4864
+ state: Util.plain(@state),
4865
+ sent_at: Util.plain(@sent_at),
4866
+ objective_event_id: Util.plain(@objective_event_id),
4867
+ }.reject { |_k, v| v.nil? }
4868
+ end
4869
+ end
4870
+
4871
+ def self.decode_ObjectiveQueuedActionData(data)
4872
+ return nil if data.nil? || data["type"].to_s.empty?
4873
+ case data["type"]
4874
+ when "userMessage"
4875
+ Types::ObjectiveQueuedActionData_UserMessage.from_json(data)
4876
+ when "compaction"
4877
+ Types::ObjectiveQueuedActionData_Compaction.from_json(data)
4878
+ else
4879
+ raise ArgumentError, "ObjectiveQueuedActionData: unknown type #{data["type"].inspect}"
4880
+ end
4881
+ end
4882
+
4883
+ 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", "OBJECTIVE_STATE_INTERRUPTING"].freeze
4884
+
4885
+ 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", "OBJECTIVE_STATE_INTERRUPTING"].freeze
4501
4886
 
4502
4887
  class ObjectiveStateChanged
4503
4888
  attr_reader :from_state, :to_state, :message
@@ -4570,7 +4955,7 @@ module Cadenya
4570
4955
 
4571
4956
  ObjectiveToolCallStatus = ["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
4572
4957
 
4573
- ObjectiveToolCallExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
4958
+ ObjectiveToolCallExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT", "TOOL_CALL_EXECUTION_STATUS_INTERRUPTED"].freeze
4574
4959
 
4575
4960
  class ObjectiveToolCall
4576
4961
  attr_reader :metadata, :data, :status, :info, :execution_status
@@ -4605,14 +4990,15 @@ module Cadenya
4605
4990
  end
4606
4991
 
4607
4992
  class ObjectiveToolCallData
4608
- attr_reader :callable, :arguments, :memo, :status_changed_by, :resolved_secrets
4993
+ attr_reader :callable, :arguments, :memo, :status_changed_by, :resolved_secrets, :decision_scores
4609
4994
 
4610
- def initialize(callable: nil, arguments: nil, memo: nil, status_changed_by: nil, resolved_secrets: nil)
4995
+ def initialize(callable: nil, arguments: nil, memo: nil, status_changed_by: nil, resolved_secrets: nil, decision_scores: nil)
4611
4996
  @callable = callable
4612
4997
  @arguments = arguments
4613
4998
  @memo = memo
4614
4999
  @status_changed_by = status_changed_by
4615
5000
  @resolved_secrets = resolved_secrets
5001
+ @decision_scores = decision_scores
4616
5002
  end
4617
5003
 
4618
5004
  def self.from_json(data)
@@ -4622,6 +5008,7 @@ module Cadenya
4622
5008
  memo: data["memo"],
4623
5009
  status_changed_by: data["statusChangedBy"].nil? ? nil : Types::Profile.from_json(data["statusChangedBy"]),
4624
5010
  resolved_secrets: data["resolvedSecrets"].nil? ? nil : (data["resolvedSecrets"]).map { |item| Types::ResolvedSecret.from_json(item) },
5011
+ decision_scores: data["decisionScores"].nil? ? nil : Types::ToolCallDecisionScores.from_json(data["decisionScores"]),
4625
5012
  )
4626
5013
  end
4627
5014
 
@@ -4632,6 +5019,7 @@ module Cadenya
4632
5019
  memo: Util.plain(@memo),
4633
5020
  status_changed_by: Util.plain(@status_changed_by),
4634
5021
  resolved_secrets: Util.plain(@resolved_secrets),
5022
+ decision_scores: Util.plain(@decision_scores),
4635
5023
  }.reject { |_k, v| v.nil? }
4636
5024
  end
4637
5025
  end
@@ -4782,7 +5170,7 @@ module Cadenya
4782
5170
 
4783
5171
  ObjectiveToolCallWithResultStatus = ["TOOL_CALL_STATUS_UNSPECIFIED", "TOOL_CALL_STATUS_AUTO_APPROVED", "TOOL_CALL_STATUS_WAITING_FOR_APPROVAL", "TOOL_CALL_STATUS_APPROVED", "TOOL_CALL_STATUS_DENIED"].freeze
4784
5172
 
4785
- ObjectiveToolCallWithResultExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
5173
+ ObjectiveToolCallWithResultExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT", "TOOL_CALL_EXECUTION_STATUS_INTERRUPTED"].freeze
4786
5174
 
4787
5175
  class ObjectiveToolCallWithResult
4788
5176
  attr_reader :metadata, :data, :status, :info, :execution_status, :result, :resolved_secrets
@@ -5160,6 +5548,46 @@ module Cadenya
5160
5548
  end
5161
5549
  end
5162
5550
 
5551
+ class QueuedCompaction
5552
+ attr_reader :compaction_config
5553
+
5554
+ def initialize(compaction_config: nil)
5555
+ @compaction_config = compaction_config
5556
+ end
5557
+
5558
+ def self.from_json(data)
5559
+ new(
5560
+ compaction_config: data["compactionConfig"].nil? ? nil : Types::AgentVariationSpec_CompactionConfig.from_json(data["compactionConfig"]),
5561
+ )
5562
+ end
5563
+
5564
+ def to_h
5565
+ {
5566
+ compaction_config: Util.plain(@compaction_config),
5567
+ }.reject { |_k, v| v.nil? }
5568
+ end
5569
+ end
5570
+
5571
+ class QueuedUserMessage
5572
+ attr_reader :content
5573
+
5574
+ def initialize(content: nil)
5575
+ @content = content
5576
+ end
5577
+
5578
+ def self.from_json(data)
5579
+ new(
5580
+ content: data["content"],
5581
+ )
5582
+ end
5583
+
5584
+ def to_h
5585
+ {
5586
+ content: Util.plain(@content),
5587
+ }.reject { |_k, v| v.nil? }
5588
+ end
5589
+ end
5590
+
5163
5591
  class Reasoning
5164
5592
  attr_reader :content
5165
5593
 
@@ -5180,6 +5608,29 @@ module Cadenya
5180
5608
  end
5181
5609
  end
5182
5610
 
5611
+ class RemoveAPIKeyWorkspaceRequest
5612
+ attr_reader :id, :workspace_id
5613
+
5614
+ def initialize(id: nil, workspace_id: nil)
5615
+ @id = id
5616
+ @workspace_id = workspace_id
5617
+ end
5618
+
5619
+ def self.from_json(data)
5620
+ new(
5621
+ id: data["id"],
5622
+ workspace_id: data["workspaceId"],
5623
+ )
5624
+ end
5625
+
5626
+ def to_h
5627
+ {
5628
+ id: Util.plain(@id),
5629
+ workspace_id: Util.plain(@workspace_id),
5630
+ }.reject { |_k, v| v.nil? }
5631
+ end
5632
+ end
5633
+
5183
5634
  def self.decode_RemoveAgentVariationAssignmentRequest(data)
5184
5635
  return nil if data.nil? || data["type"].to_s.empty?
5185
5636
  case data["type"]
@@ -5225,6 +5676,32 @@ module Cadenya
5225
5676
  end
5226
5677
  end
5227
5678
 
5679
+ class RemoveObjectiveQueuedActionRequest
5680
+ attr_reader :workspace_id, :objective_id, :queued_action_id
5681
+
5682
+ def initialize(workspace_id: nil, objective_id: nil, queued_action_id: nil)
5683
+ @workspace_id = workspace_id
5684
+ @objective_id = objective_id
5685
+ @queued_action_id = queued_action_id
5686
+ end
5687
+
5688
+ def self.from_json(data)
5689
+ new(
5690
+ workspace_id: data["workspaceId"],
5691
+ objective_id: data["objectiveId"],
5692
+ queued_action_id: data["queuedActionId"],
5693
+ )
5694
+ end
5695
+
5696
+ def to_h
5697
+ {
5698
+ workspace_id: Util.plain(@workspace_id),
5699
+ objective_id: Util.plain(@objective_id),
5700
+ queued_action_id: Util.plain(@queued_action_id),
5701
+ }.reject { |_k, v| v.nil? }
5702
+ end
5703
+ end
5704
+
5228
5705
  ResolvedSecretSource = ["RESOLVED_SECRET_SOURCE_UNSPECIFIED", "RESOLVED_SECRET_SOURCE_WORKSPACE", "RESOLVED_SECRET_SOURCE_TOOLSET", "RESOLVED_SECRET_SOURCE_OBJECTIVE"].freeze
5229
5706
 
5230
5707
  class ResolvedSecret
@@ -5374,6 +5851,26 @@ module Cadenya
5374
5851
  end
5375
5852
  end
5376
5853
 
5854
+ class RevealAPIKeyRequest
5855
+ attr_reader :id
5856
+
5857
+ def initialize(id: nil)
5858
+ @id = id
5859
+ end
5860
+
5861
+ def self.from_json(data)
5862
+ new(
5863
+ id: data["id"],
5864
+ )
5865
+ end
5866
+
5867
+ def to_h
5868
+ {
5869
+ id: Util.plain(@id),
5870
+ }.reject { |_k, v| v.nil? }
5871
+ end
5872
+ end
5873
+
5377
5874
  class RevokeWidgetSessionRequest
5378
5875
  attr_reader :workspace_id, :id
5379
5876
 
@@ -5398,23 +5895,20 @@ module Cadenya
5398
5895
  end
5399
5896
 
5400
5897
  class RotateAPIKeyRequest
5401
- attr_reader :workspace_id, :id
5898
+ attr_reader :id
5402
5899
 
5403
- def initialize(workspace_id: nil, id: nil)
5404
- @workspace_id = workspace_id
5900
+ def initialize(id: nil)
5405
5901
  @id = id
5406
5902
  end
5407
5903
 
5408
5904
  def self.from_json(data)
5409
5905
  new(
5410
- workspace_id: data["workspaceId"],
5411
5906
  id: data["id"],
5412
5907
  )
5413
5908
  end
5414
5909
 
5415
5910
  def to_h
5416
5911
  {
5417
- workspace_id: Util.plain(@workspace_id),
5418
5912
  id: Util.plain(@id),
5419
5913
  }.reject { |_k, v| v.nil? }
5420
5914
  end
@@ -6131,6 +6625,38 @@ module Cadenya
6131
6625
  end
6132
6626
  end
6133
6627
 
6628
+ class TokenUsage
6629
+ attr_reader :input_tokens, :cache_read_input_tokens, :cache_write_input_tokens, :output_tokens, :reasoning_output_tokens
6630
+
6631
+ def initialize(input_tokens: nil, cache_read_input_tokens: nil, cache_write_input_tokens: nil, output_tokens: nil, reasoning_output_tokens: nil)
6632
+ @input_tokens = input_tokens
6633
+ @cache_read_input_tokens = cache_read_input_tokens
6634
+ @cache_write_input_tokens = cache_write_input_tokens
6635
+ @output_tokens = output_tokens
6636
+ @reasoning_output_tokens = reasoning_output_tokens
6637
+ end
6638
+
6639
+ def self.from_json(data)
6640
+ new(
6641
+ input_tokens: data["inputTokens"],
6642
+ cache_read_input_tokens: data["cacheReadInputTokens"],
6643
+ cache_write_input_tokens: data["cacheWriteInputTokens"],
6644
+ output_tokens: data["outputTokens"],
6645
+ reasoning_output_tokens: data["reasoningOutputTokens"],
6646
+ )
6647
+ end
6648
+
6649
+ def to_h
6650
+ {
6651
+ input_tokens: Util.plain(@input_tokens),
6652
+ cache_read_input_tokens: Util.plain(@cache_read_input_tokens),
6653
+ cache_write_input_tokens: Util.plain(@cache_write_input_tokens),
6654
+ output_tokens: Util.plain(@output_tokens),
6655
+ reasoning_output_tokens: Util.plain(@reasoning_output_tokens),
6656
+ }.reject { |_k, v| v.nil? }
6657
+ end
6658
+ end
6659
+
6134
6660
  ToolState = ["STATE_UNSPECIFIED", "STATE_AVAILABLE", "STATE_OMITTED", "STATE_ARCHIVED"].freeze
6135
6661
 
6136
6662
  class Tool
@@ -6202,6 +6728,55 @@ module Cadenya
6202
6728
  end
6203
6729
  end
6204
6730
 
6731
+ class ToolCallDecisionScore
6732
+ attr_reader :score, :passed
6733
+
6734
+ def initialize(score: nil, passed: nil)
6735
+ @score = score
6736
+ @passed = passed
6737
+ end
6738
+
6739
+ def self.from_json(data)
6740
+ new(
6741
+ score: data["score"],
6742
+ passed: data["passed"],
6743
+ )
6744
+ end
6745
+
6746
+ def to_h
6747
+ {
6748
+ score: Util.plain(@score),
6749
+ passed: Util.plain(@passed),
6750
+ }.reject { |_k, v| v.nil? }
6751
+ end
6752
+ end
6753
+
6754
+ class ToolCallDecisionScores
6755
+ attr_reader :auto_mode, :scores, :approved
6756
+
6757
+ def initialize(auto_mode: nil, scores: nil, approved: nil)
6758
+ @auto_mode = auto_mode
6759
+ @scores = scores
6760
+ @approved = approved
6761
+ end
6762
+
6763
+ def self.from_json(data)
6764
+ new(
6765
+ auto_mode: data["autoMode"].nil? ? nil : Types::AutoModeConfig.from_json(data["autoMode"]),
6766
+ scores: data["scores"].nil? ? nil : (data["scores"]).map { |item| Types::ToolCallDecisionScore.from_json(item) },
6767
+ approved: data["approved"],
6768
+ )
6769
+ end
6770
+
6771
+ def to_h
6772
+ {
6773
+ auto_mode: Util.plain(@auto_mode),
6774
+ scores: Util.plain(@scores),
6775
+ approved: Util.plain(@approved),
6776
+ }.reject { |_k, v| v.nil? }
6777
+ end
6778
+ end
6779
+
6205
6780
  class ToolCalled
6206
6781
  attr_reader :tool_call_id, :tool, :config, :arguments, :arguments_exposed_in_widgets
6207
6782
 
@@ -6313,15 +6888,16 @@ module Cadenya
6313
6888
  end
6314
6889
 
6315
6890
  class ToolOverlay
6316
- attr_reader :key, :selector, :parameter_actions, :result_actions, :disabled, :widget_argument_exposure
6891
+ attr_reader :key, :selector, :parameter_actions, :result_actions, :disabled, :widget_argument_exposure, :auto_mode
6317
6892
 
6318
- def initialize(key: nil, selector: nil, parameter_actions: nil, result_actions: nil, disabled: nil, widget_argument_exposure: nil)
6893
+ def initialize(key: nil, selector: nil, parameter_actions: nil, result_actions: nil, disabled: nil, widget_argument_exposure: nil, auto_mode: nil)
6319
6894
  @key = key
6320
6895
  @selector = selector
6321
6896
  @parameter_actions = parameter_actions
6322
6897
  @result_actions = result_actions
6323
6898
  @disabled = disabled
6324
6899
  @widget_argument_exposure = widget_argument_exposure
6900
+ @auto_mode = auto_mode
6325
6901
  end
6326
6902
 
6327
6903
  def self.from_json(data)
@@ -6332,6 +6908,7 @@ module Cadenya
6332
6908
  result_actions: data["resultActions"].nil? ? nil : (data["resultActions"]).map { |item| Types.decode_ToolOverlay_ResultAction(item) },
6333
6909
  disabled: data["disabled"],
6334
6910
  widget_argument_exposure: data["widgetArgumentExposure"].nil? ? nil : Types::ToolOverlay_WidgetArgumentExposure.from_json(data["widgetArgumentExposure"]),
6911
+ auto_mode: data["autoMode"].nil? ? nil : Types::AutoModeConfig.from_json(data["autoMode"]),
6335
6912
  )
6336
6913
  end
6337
6914
 
@@ -6343,6 +6920,7 @@ module Cadenya
6343
6920
  result_actions: Util.plain(@result_actions),
6344
6921
  disabled: Util.plain(@disabled),
6345
6922
  widget_argument_exposure: Util.plain(@widget_argument_exposure),
6923
+ auto_mode: Util.plain(@auto_mode),
6346
6924
  }.reject { |_k, v| v.nil? }
6347
6925
  end
6348
6926
  end
@@ -6870,12 +7448,13 @@ module Cadenya
6870
7448
  end
6871
7449
 
6872
7450
  class ToolSetSpec
6873
- attr_reader :description, :adapter, :overlays
7451
+ attr_reader :description, :adapter, :overlays, :secrets
6874
7452
 
6875
- def initialize(description: nil, adapter: nil, overlays: nil)
7453
+ def initialize(description: nil, adapter: nil, overlays: nil, secrets: nil)
6876
7454
  @description = description
6877
7455
  @adapter = adapter
6878
7456
  @overlays = overlays
7457
+ @secrets = secrets
6879
7458
  end
6880
7459
 
6881
7460
  def self.from_json(data)
@@ -6883,6 +7462,7 @@ module Cadenya
6883
7462
  description: data["description"],
6884
7463
  adapter: data["adapter"].nil? ? nil : Types.decode_ToolSetAdapter(data["adapter"]),
6885
7464
  overlays: data["overlays"].nil? ? nil : (data["overlays"]).map { |item| Types::ToolOverlay.from_json(item) },
7465
+ secrets: data["secrets"].nil? ? nil : (data["secrets"]).map { |item| Types::ToolSetSpec_Secret.from_json(item) },
6886
7466
  )
6887
7467
  end
6888
7468
 
@@ -6891,6 +7471,30 @@ module Cadenya
6891
7471
  description: Util.plain(@description),
6892
7472
  adapter: Util.plain(@adapter),
6893
7473
  overlays: Util.plain(@overlays),
7474
+ secrets: Util.plain(@secrets),
7475
+ }.reject { |_k, v| v.nil? }
7476
+ end
7477
+ end
7478
+
7479
+ class ToolSetSpec_Secret
7480
+ attr_reader :name, :value
7481
+
7482
+ def initialize(name: nil, value: nil)
7483
+ @name = name
7484
+ @value = value
7485
+ end
7486
+
7487
+ def self.from_json(data)
7488
+ new(
7489
+ name: data["name"],
7490
+ value: data["value"],
7491
+ )
7492
+ end
7493
+
7494
+ def to_h
7495
+ {
7496
+ name: Util.plain(@name),
7497
+ value: Util.plain(@value),
6894
7498
  }.reject { |_k, v| v.nil? }
6895
7499
  end
6896
7500
  end
@@ -6924,54 +7528,120 @@ module Cadenya
6924
7528
  end
6925
7529
  end
6926
7530
 
6927
- class ToolSpec
6928
- attr_reader :description, :requires_approval, :parameters, :config, :llm_tool_name
7531
+ class ToolSpec
7532
+ attr_reader :description, :requires_approval, :parameters, :config, :llm_tool_name
7533
+
7534
+ def initialize(description: nil, requires_approval: nil, parameters: nil, config: nil, llm_tool_name: nil)
7535
+ @description = description
7536
+ @requires_approval = requires_approval
7537
+ @parameters = parameters
7538
+ @config = config
7539
+ @llm_tool_name = llm_tool_name
7540
+ end
7541
+
7542
+ def self.from_json(data)
7543
+ new(
7544
+ description: data["description"],
7545
+ requires_approval: data["requiresApproval"],
7546
+ parameters: data["parameters"],
7547
+ config: data["config"].nil? ? nil : Types.decode_ToolSpec_Config(data["config"]),
7548
+ llm_tool_name: data["llmToolName"],
7549
+ )
7550
+ end
7551
+
7552
+ def to_h
7553
+ {
7554
+ description: Util.plain(@description),
7555
+ requires_approval: Util.plain(@requires_approval),
7556
+ parameters: Util.plain(@parameters),
7557
+ config: Util.plain(@config),
7558
+ llm_tool_name: Util.plain(@llm_tool_name),
7559
+ }.reject { |_k, v| v.nil? }
7560
+ end
7561
+ end
7562
+
7563
+ def self.decode_ToolSpec_Config(data)
7564
+ return nil if data.nil? || data["type"].to_s.empty?
7565
+ case data["type"]
7566
+ when "http"
7567
+ Types::ToolSpec_Config_Http.from_json(data)
7568
+ when "mcp"
7569
+ Types::ToolSpec_Config_Mcp.from_json(data)
7570
+ when "openapi"
7571
+ Types::ToolSpec_Config_Openapi.from_json(data)
7572
+ when "bare"
7573
+ Types::ToolSpec_Config_Bare.from_json(data)
7574
+ else
7575
+ raise ArgumentError, "ToolSpec_Config: unknown type #{data["type"].inspect}"
7576
+ end
7577
+ end
7578
+
7579
+ class TrustedEndpoint
7580
+ attr_reader :metadata, :spec, :info
7581
+
7582
+ def initialize(metadata: nil, spec: nil, info: nil)
7583
+ @metadata = metadata
7584
+ @spec = spec
7585
+ @info = info
7586
+ end
7587
+
7588
+ def self.from_json(data)
7589
+ new(
7590
+ metadata: data["metadata"].nil? ? nil : Types::AccountResourceMetadata.from_json(data["metadata"]),
7591
+ spec: data["spec"].nil? ? nil : Types::TrustedEndpointSpec.from_json(data["spec"]),
7592
+ info: data["info"].nil? ? nil : Types::TrustedEndpointInfo.from_json(data["info"]),
7593
+ )
7594
+ end
7595
+
7596
+ def to_h
7597
+ {
7598
+ metadata: Util.plain(@metadata),
7599
+ spec: Util.plain(@spec),
7600
+ info: Util.plain(@info),
7601
+ }.reject { |_k, v| v.nil? }
7602
+ end
7603
+ end
7604
+
7605
+ class TrustedEndpointInfo
7606
+ attr_reader :created_by
7607
+
7608
+ def initialize(created_by: nil)
7609
+ @created_by = created_by
7610
+ end
7611
+
7612
+ def self.from_json(data)
7613
+ new(
7614
+ created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
7615
+ )
7616
+ end
7617
+
7618
+ def to_h
7619
+ {
7620
+ created_by: Util.plain(@created_by),
7621
+ }.reject { |_k, v| v.nil? }
7622
+ end
7623
+ end
7624
+
7625
+ class TrustedEndpointSpec
7626
+ attr_reader :host
6929
7627
 
6930
- def initialize(description: nil, requires_approval: nil, parameters: nil, config: nil, llm_tool_name: nil)
6931
- @description = description
6932
- @requires_approval = requires_approval
6933
- @parameters = parameters
6934
- @config = config
6935
- @llm_tool_name = llm_tool_name
7628
+ def initialize(host: nil)
7629
+ @host = host
6936
7630
  end
6937
7631
 
6938
7632
  def self.from_json(data)
6939
7633
  new(
6940
- description: data["description"],
6941
- requires_approval: data["requiresApproval"],
6942
- parameters: data["parameters"],
6943
- config: data["config"].nil? ? nil : Types.decode_ToolSpec_Config(data["config"]),
6944
- llm_tool_name: data["llmToolName"],
7634
+ host: data["host"],
6945
7635
  )
6946
7636
  end
6947
7637
 
6948
7638
  def to_h
6949
7639
  {
6950
- description: Util.plain(@description),
6951
- requires_approval: Util.plain(@requires_approval),
6952
- parameters: Util.plain(@parameters),
6953
- config: Util.plain(@config),
6954
- llm_tool_name: Util.plain(@llm_tool_name),
7640
+ host: Util.plain(@host),
6955
7641
  }.reject { |_k, v| v.nil? }
6956
7642
  end
6957
7643
  end
6958
7644
 
6959
- def self.decode_ToolSpec_Config(data)
6960
- return nil if data.nil? || data["type"].to_s.empty?
6961
- case data["type"]
6962
- when "http"
6963
- Types::ToolSpec_Config_Http.from_json(data)
6964
- when "mcp"
6965
- Types::ToolSpec_Config_Mcp.from_json(data)
6966
- when "openapi"
6967
- Types::ToolSpec_Config_Openapi.from_json(data)
6968
- when "bare"
6969
- Types::ToolSpec_Config_Bare.from_json(data)
6970
- else
6971
- raise ArgumentError, "ToolSpec_Config: unknown type #{data["type"].inspect}"
6972
- end
6973
- end
6974
-
6975
7645
  class UnarchiveAgentPoolRequest
6976
7646
  attr_reader :workspace_id, :id
6977
7647
 
@@ -7123,10 +7793,9 @@ module Cadenya
7123
7793
  end
7124
7794
 
7125
7795
  class UpdateAPIKeyRequest
7126
- attr_reader :workspace_id, :id, :metadata, :spec, :update_mask
7796
+ attr_reader :id, :metadata, :spec, :update_mask
7127
7797
 
7128
- def initialize(workspace_id: nil, id: nil, metadata: nil, spec: nil, update_mask: nil)
7129
- @workspace_id = workspace_id
7798
+ def initialize(id: nil, metadata: nil, spec: nil, update_mask: nil)
7130
7799
  @id = id
7131
7800
  @metadata = metadata
7132
7801
  @spec = spec
@@ -7135,7 +7804,6 @@ module Cadenya
7135
7804
 
7136
7805
  def self.from_json(data)
7137
7806
  new(
7138
- workspace_id: data["workspaceId"],
7139
7807
  id: data["id"],
7140
7808
  metadata: data["metadata"].nil? ? nil : Types::UpdateAccountResourceMetadata.from_json(data["metadata"]),
7141
7809
  spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]),
@@ -7145,7 +7813,6 @@ module Cadenya
7145
7813
 
7146
7814
  def to_h
7147
7815
  {
7148
- workspace_id: Util.plain(@workspace_id),
7149
7816
  id: Util.plain(@id),
7150
7817
  metadata: Util.plain(@metadata),
7151
7818
  spec: Util.plain(@spec),
@@ -7811,6 +8478,54 @@ module Cadenya
7811
8478
  end
7812
8479
  end
7813
8480
 
8481
+ class VerifyTrustedEndpointRequest
8482
+ attr_reader :url
8483
+
8484
+ def initialize(url: nil)
8485
+ @url = url
8486
+ end
8487
+
8488
+ def self.from_json(data)
8489
+ new(
8490
+ url: data["url"],
8491
+ )
8492
+ end
8493
+
8494
+ def to_h
8495
+ {
8496
+ url: Util.plain(@url),
8497
+ }.reject { |_k, v| v.nil? }
8498
+ end
8499
+ end
8500
+
8501
+ VerifyTrustedEndpointResponseResult = ["RESULT_UNSPECIFIED", "RESULT_TRUSTED", "RESULT_UNTRUSTED", "RESULT_TEMPLATED"].freeze
8502
+
8503
+ class VerifyTrustedEndpointResponse
8504
+ attr_reader :result, :host, :trusted_endpoint
8505
+
8506
+ def initialize(result: nil, host: nil, trusted_endpoint: nil)
8507
+ @result = result
8508
+ @host = host
8509
+ @trusted_endpoint = trusted_endpoint
8510
+ end
8511
+
8512
+ def self.from_json(data)
8513
+ new(
8514
+ result: data["result"],
8515
+ host: data["host"],
8516
+ trusted_endpoint: data["trustedEndpoint"].nil? ? nil : Types::TrustedEndpoint.from_json(data["trustedEndpoint"]),
8517
+ )
8518
+ end
8519
+
8520
+ def to_h
8521
+ {
8522
+ result: Util.plain(@result),
8523
+ host: Util.plain(@host),
8524
+ trusted_endpoint: Util.plain(@trusted_endpoint),
8525
+ }.reject { |_k, v| v.nil? }
8526
+ end
8527
+ end
8528
+
7814
8529
  class VertexConfig
7815
8530
  attr_reader :project_id, :location
7816
8531
 
@@ -7859,7 +8574,7 @@ module Cadenya
7859
8574
 
7860
8575
  WebhookDeliveryDataStatus = ["WEBHOOK_DELIVERY_STATUS_UNSPECIFIED", "WEBHOOK_DELIVERY_STATUS_PENDING", "WEBHOOK_DELIVERY_STATUS_COMPLETED", "WEBHOOK_DELIVERY_STATUS_FAILED", "WEBHOOK_DELIVERY_STATUS_DISABLED"].freeze
7861
8576
 
7862
- 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
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
7863
8578
 
7864
8579
  class WebhookDeliveryData
7865
8580
  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
@@ -7920,6 +8635,29 @@ module Cadenya
7920
8635
  end
7921
8636
  end
7922
8637
 
8638
+ class WhoamiResponse
8639
+ attr_reader :profile, :default_workspace
8640
+
8641
+ def initialize(profile: nil, default_workspace: nil)
8642
+ @profile = profile
8643
+ @default_workspace = default_workspace
8644
+ end
8645
+
8646
+ def self.from_json(data)
8647
+ new(
8648
+ profile: data["profile"].nil? ? nil : Types::Profile.from_json(data["profile"]),
8649
+ default_workspace: data["defaultWorkspace"].nil? ? nil : Types::AccountResourceMetadata.from_json(data["defaultWorkspace"]),
8650
+ )
8651
+ end
8652
+
8653
+ def to_h
8654
+ {
8655
+ profile: Util.plain(@profile),
8656
+ default_workspace: Util.plain(@default_workspace),
8657
+ }.reject { |_k, v| v.nil? }
8658
+ end
8659
+ end
8660
+
7923
8661
  WidgetState = ["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
7924
8662
 
7925
8663
  class Widget
@@ -9700,6 +10438,29 @@ module Cadenya
9700
10438
  end
9701
10439
  end
9702
10440
 
10441
+ class ObjectiveEventData_Interrupted
10442
+ attr_reader :type, :interrupted
10443
+
10444
+ def initialize(type: nil, interrupted: nil)
10445
+ @type = type
10446
+ @interrupted = interrupted
10447
+ end
10448
+
10449
+ def self.from_json(data)
10450
+ new(
10451
+ type: data["type"],
10452
+ interrupted: data["interrupted"].nil? ? nil : Types::ObjectiveInterrupted.from_json(data["interrupted"]),
10453
+ )
10454
+ end
10455
+
10456
+ def to_h
10457
+ {
10458
+ type: Util.plain(@type),
10459
+ interrupted: Util.plain(@interrupted),
10460
+ }.reject { |_k, v| v.nil? }
10461
+ end
10462
+ end
10463
+
9703
10464
  class CallableTool_Tool
9704
10465
  attr_reader :type, :tool
9705
10466
 
@@ -9850,6 +10611,98 @@ module Cadenya
9850
10611
  end
9851
10612
  end
9852
10613
 
10614
+ class ObjectiveQueuedActionData_UserMessage
10615
+ attr_reader :type, :user_message
10616
+
10617
+ def initialize(type: nil, user_message: nil)
10618
+ @type = type
10619
+ @user_message = user_message
10620
+ end
10621
+
10622
+ def self.from_json(data)
10623
+ new(
10624
+ type: data["type"],
10625
+ user_message: data["userMessage"].nil? ? nil : Types::QueuedUserMessage.from_json(data["userMessage"]),
10626
+ )
10627
+ end
10628
+
10629
+ def to_h
10630
+ {
10631
+ type: Util.plain(@type),
10632
+ user_message: Util.plain(@user_message),
10633
+ }.reject { |_k, v| v.nil? }
10634
+ end
10635
+ end
10636
+
10637
+ class ObjectiveQueuedActionData_Compaction
10638
+ attr_reader :type, :compaction
10639
+
10640
+ def initialize(type: nil, compaction: nil)
10641
+ @type = type
10642
+ @compaction = compaction
10643
+ end
10644
+
10645
+ def self.from_json(data)
10646
+ new(
10647
+ type: data["type"],
10648
+ compaction: data["compaction"].nil? ? nil : Types::QueuedCompaction.from_json(data["compaction"]),
10649
+ )
10650
+ end
10651
+
10652
+ def to_h
10653
+ {
10654
+ type: Util.plain(@type),
10655
+ compaction: Util.plain(@compaction),
10656
+ }.reject { |_k, v| v.nil? }
10657
+ end
10658
+ end
10659
+
10660
+ class ContinueObjectiveResponse_Event
10661
+ attr_reader :type, :event
10662
+
10663
+ def initialize(type: nil, event: nil)
10664
+ @type = type
10665
+ @event = event
10666
+ end
10667
+
10668
+ def self.from_json(data)
10669
+ new(
10670
+ type: data["type"],
10671
+ event: data["event"].nil? ? nil : Types::ObjectiveEvent.from_json(data["event"]),
10672
+ )
10673
+ end
10674
+
10675
+ def to_h
10676
+ {
10677
+ type: Util.plain(@type),
10678
+ event: Util.plain(@event),
10679
+ }.reject { |_k, v| v.nil? }
10680
+ end
10681
+ end
10682
+
10683
+ class ContinueObjectiveResponse_QueuedAction
10684
+ attr_reader :type, :queued_action
10685
+
10686
+ def initialize(type: nil, queued_action: nil)
10687
+ @type = type
10688
+ @queued_action = queued_action
10689
+ end
10690
+
10691
+ def self.from_json(data)
10692
+ new(
10693
+ type: data["type"],
10694
+ queued_action: data["queuedAction"].nil? ? nil : Types::ObjectiveQueuedAction.from_json(data["queuedAction"]),
10695
+ )
10696
+ end
10697
+
10698
+ def to_h
10699
+ {
10700
+ type: Util.plain(@type),
10701
+ queued_action: Util.plain(@queued_action),
10702
+ }.reject { |_k, v| v.nil? }
10703
+ end
10704
+ end
10705
+
9853
10706
  class SetToolCallContentRequest_ContentBlock_Text
9854
10707
  attr_reader :type, :text
9855
10708
 
@@ -10543,6 +11396,52 @@ module Cadenya
10543
11396
  end
10544
11397
  end
10545
11398
 
11399
+ class CreateAndStreamObjectiveResponse_Objective
11400
+ attr_reader :type, :objective
11401
+
11402
+ def initialize(type: nil, objective: nil)
11403
+ @type = type
11404
+ @objective = objective
11405
+ end
11406
+
11407
+ def self.from_json(data)
11408
+ new(
11409
+ type: data["type"],
11410
+ objective: data["objective"].nil? ? nil : Types::Objective.from_json(data["objective"]),
11411
+ )
11412
+ end
11413
+
11414
+ def to_h
11415
+ {
11416
+ type: Util.plain(@type),
11417
+ objective: Util.plain(@objective),
11418
+ }.reject { |_k, v| v.nil? }
11419
+ end
11420
+ end
11421
+
11422
+ class CreateAndStreamObjectiveResponse_Event
11423
+ attr_reader :type, :event
11424
+
11425
+ def initialize(type: nil, event: nil)
11426
+ @type = type
11427
+ @event = event
11428
+ end
11429
+
11430
+ def self.from_json(data)
11431
+ new(
11432
+ type: data["type"],
11433
+ event: data["event"].nil? ? nil : Types::ObjectiveEvent.from_json(data["event"]),
11434
+ )
11435
+ end
11436
+
11437
+ def to_h
11438
+ {
11439
+ type: Util.plain(@type),
11440
+ event: Util.plain(@event),
11441
+ }.reject { |_k, v| v.nil? }
11442
+ end
11443
+ end
11444
+
10546
11445
  WidgetSessionErrorReason = ["TOKEN_EXPIRED", "SESSION_REVOKED", "SESSION_EXPIRED", "SESSION_EXHAUSTED"].freeze
10547
11446
 
10548
11447
  class WidgetSessionErrorInfo
@@ -10582,17 +11481,19 @@ module Cadenya
10582
11481
 
10583
11482
  AgentServiceListAgentFeedbackSentiment = ["FEEDBACK_SENTIMENT_UNSPECIFIED", "FEEDBACK_SENTIMENT_POSITIVE", "FEEDBACK_SENTIMENT_NEGATIVE"].freeze
10584
11483
 
10585
- 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
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
10586
11485
 
10587
11486
  MemoryServiceListMemoryLayersType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
10588
11487
 
10589
11488
  ModelServiceListModelsState = ["STATE_UNSPECIFIED", "STATE_ENABLED", "STATE_DISABLED"].freeze
10590
11489
 
10591
- 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
11490
+ 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", "OBJECTIVE_STATE_INTERRUPTING"].freeze
11491
+
11492
+ ObjectiveServiceListObjectiveQueuedActionsState = ["STATE_UNSPECIFIED", "STATE_QUEUED", "STATE_SENT", "STATE_REMOVED", "STATE_DISCARDED"].freeze
10592
11493
 
10593
11494
  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
10594
11495
 
10595
- ObjectiveServiceListObjectiveToolCallsExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT"].freeze
11496
+ ObjectiveServiceListObjectiveToolCallsExecutionStatus = ["TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED", "TOOL_CALL_EXECUTION_STATUS_PENDING", "TOOL_CALL_EXECUTION_STATUS_RUNNING", "TOOL_CALL_EXECUTION_STATUS_COMPLETED", "TOOL_CALL_EXECUTION_STATUS_ERRORED", "TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT", "TOOL_CALL_EXECUTION_STATUS_INTERRUPTED"].freeze
10596
11497
 
10597
11498
  ToolServiceListToolSetsState = ["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ARCHIVED"].freeze
10598
11499
 
@@ -10702,14 +11603,27 @@ module Cadenya
10702
11603
  ENCODE_API_KEY_SPEC = {
10703
11604
  "description" => ["description", nil],
10704
11605
  "permissions" => ["permissions", nil],
11606
+ "all_workspaces" => ["allWorkspaces", nil],
11607
+ "allWorkspaces" => ["allWorkspaces", nil],
11608
+ "workspace_assignments" => ["workspaceAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_APIKeyWorkspaceAssignment(_v) }).call(_i) } : _v }],
11609
+ "workspaceAssignments" => ["workspaceAssignments", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_APIKeyWorkspaceAssignment(_v) }).call(_i) } : _v }],
10705
11610
  }.freeze
10706
11611
 
10707
- DROP_API_KEY_SPEC = ["system", "token"].freeze
11612
+ DROP_API_KEY_SPEC = ["default", "token"].freeze
10708
11613
 
10709
11614
  def self.encode_APIKeySpec(data)
10710
11615
  encode_fields(ENCODE_API_KEY_SPEC, data, drop: DROP_API_KEY_SPEC)
10711
11616
  end
10712
11617
 
11618
+ ENCODE_API_KEY_WORKSPACE_ASSIGNMENT = {
11619
+ "workspace_id" => ["workspaceId", nil],
11620
+ "workspaceId" => ["workspaceId", nil],
11621
+ }.freeze
11622
+
11623
+ def self.encode_APIKeyWorkspaceAssignment(data)
11624
+ encode_fields(ENCODE_API_KEY_WORKSPACE_ASSIGNMENT, data)
11625
+ end
11626
+
10713
11627
  def self.encode_AddAgentVariationAssignmentRequest(data)
10714
11628
  data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
10715
11629
  unless data.is_a?(Hash)
@@ -10803,6 +11717,8 @@ module Cadenya
10803
11717
  "enableEpisodicMemory" => ["enableEpisodicMemory", nil],
10804
11718
  "episodic_memory_ttl" => ["episodicMemoryTtl", nil],
10805
11719
  "episodicMemoryTtl" => ["episodicMemoryTtl", nil],
11720
+ "always_include_subject_memories" => ["alwaysIncludeSubjectMemories", nil],
11721
+ "alwaysIncludeSubjectMemories" => ["alwaysIncludeSubjectMemories", nil],
10806
11722
  }.freeze
10807
11723
 
10808
11724
  def self.encode_AgentSpec(data)
@@ -10888,6 +11804,27 @@ module Cadenya
10888
11804
  encode_fields(ENCODE_AGENT_VARIATION_SPEC_PROGRESSIVE_DISCOVERY, data)
10889
11805
  end
10890
11806
 
11807
+ ENCODE_AUTO_MODE_CONFIG = {
11808
+ "questions" => ["questions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_AutoModeQuestion(_v) }).call(_i) } : _v }],
11809
+ "passing_mode" => ["passingMode", nil],
11810
+ "passingMode" => ["passingMode", nil],
11811
+ "failure_message" => ["failureMessage", nil],
11812
+ "failureMessage" => ["failureMessage", nil],
11813
+ }.freeze
11814
+
11815
+ def self.encode_AutoModeConfig(data)
11816
+ encode_fields(ENCODE_AUTO_MODE_CONFIG, data)
11817
+ end
11818
+
11819
+ ENCODE_AUTO_MODE_QUESTION = {
11820
+ "question" => ["question", nil],
11821
+ "threshold" => ["threshold", nil],
11822
+ }.freeze
11823
+
11824
+ def self.encode_AutoModeQuestion(data)
11825
+ encode_fields(ENCODE_AUTO_MODE_QUESTION, data)
11826
+ end
11827
+
10891
11828
  ENCODE_BEDROCK_CONFIG = {
10892
11829
  "region" => ["region", nil],
10893
11830
  }.freeze
@@ -10967,8 +11904,10 @@ module Cadenya
10967
11904
  "method" => ["method", nil],
10968
11905
  }.freeze
10969
11906
 
11907
+ DROP_CONFIG_OPEN_API = ["serverUrl", "server_url"].freeze
11908
+
10970
11909
  def self.encode_Config_OpenAPI(data)
10971
- encode_fields(ENCODE_CONFIG_OPEN_API, data)
11910
+ encode_fields(ENCODE_CONFIG_OPEN_API, data, drop: DROP_CONFIG_OPEN_API)
10972
11911
  end
10973
11912
 
10974
11913
  ENCODE_CREATE_ACCOUNT_RESOURCE_METADATA = {
@@ -10993,6 +11932,16 @@ module Cadenya
10993
11932
  encode_fields(ENCODE_CREATE_AGENT_VARIATION_REQUEST, data, drop: DROP_CREATE_AGENT_VARIATION_REQUEST)
10994
11933
  end
10995
11934
 
11935
+ ENCODE_CREATE_AND_STREAM_OBJECTIVE_REQUEST_METADATA = {
11936
+ "labels" => ["labels", nil],
11937
+ "external_id" => ["externalId", nil],
11938
+ "externalId" => ["externalId", nil],
11939
+ }.freeze
11940
+
11941
+ def self.encode_CreateAndStreamObjectiveRequest_Metadata(data)
11942
+ encode_fields(ENCODE_CREATE_AND_STREAM_OBJECTIVE_REQUEST_METADATA, data)
11943
+ end
11944
+
10996
11945
  ENCODE_CREATE_OBJECTIVE_REQUEST_SECRET = {
10997
11946
  "name" => ["name", nil],
10998
11947
  "value" => ["value", nil],
@@ -11119,7 +12068,7 @@ module Cadenya
11119
12068
  "description" => ["description", nil],
11120
12069
  }.freeze
11121
12070
 
11122
- DROP_MEMORY_LAYER_SPEC = ["agentId", "agent_id", "episodicKey", "episodic_key", "expiresAt", "expires_at", "systemManaged", "system_managed"].freeze
12071
+ DROP_MEMORY_LAYER_SPEC = ["agentId", "agent_id", "episodicKey", "episodic_key", "expiresAt", "expires_at", "subjectId", "subject_id", "systemManaged", "system_managed", "tenantId", "tenant_id"].freeze
11123
12072
 
11124
12073
  def self.encode_MemoryLayerSpec(data)
11125
12074
  encode_fields(ENCODE_MEMORY_LAYER_SPEC, data, drop: DROP_MEMORY_LAYER_SPEC)
@@ -11141,6 +12090,8 @@ module Cadenya
11141
12090
  "inputPricePerMillionTokens" => ["inputPricePerMillionTokens", nil],
11142
12091
  "output_price_per_million_tokens" => ["outputPricePerMillionTokens", nil],
11143
12092
  "outputPricePerMillionTokens" => ["outputPricePerMillionTokens", nil],
12093
+ "cached_input_price_per_million_tokens" => ["cachedInputPricePerMillionTokens", nil],
12094
+ "cachedInputPricePerMillionTokens" => ["cachedInputPricePerMillionTokens", nil],
11144
12095
  }.freeze
11145
12096
 
11146
12097
  def self.encode_ModelPricingOverride(data)
@@ -11158,6 +12109,8 @@ module Cadenya
11158
12109
  "inputPricePerMillionTokens" => ["inputPricePerMillionTokens", nil],
11159
12110
  "output_price_per_million_tokens" => ["outputPricePerMillionTokens", nil],
11160
12111
  "outputPricePerMillionTokens" => ["outputPricePerMillionTokens", nil],
12112
+ "cached_input_price_per_million_tokens" => ["cachedInputPricePerMillionTokens", nil],
12113
+ "cachedInputPricePerMillionTokens" => ["cachedInputPricePerMillionTokens", nil],
11161
12114
  "capabilities" => ["capabilities", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ModelSpec_Capability(_v) }).call(_i) } : _v }],
11162
12115
  "provider_model_id" => ["providerModelId", nil],
11163
12116
  "providerModelId" => ["providerModelId", nil],
@@ -11197,7 +12150,7 @@ module Cadenya
11197
12150
  "key" => ["key", nil],
11198
12151
  }.freeze
11199
12152
 
11200
- DROP_OBJECTIVE_EPISODIC_CONFIG = ["memoryLayerId", "memory_layer_id"].freeze
12153
+ DROP_OBJECTIVE_EPISODIC_CONFIG = ["includedMemoryLayerIds", "included_memory_layer_ids", "memoryLayerId", "memory_layer_id"].freeze
11201
12154
 
11202
12155
  def self.encode_ObjectiveEpisodicConfig(data)
11203
12156
  encode_fields(ENCODE_OBJECTIVE_EPISODIC_CONFIG, data, drop: DROP_OBJECTIVE_EPISODIC_CONFIG)
@@ -11452,6 +12405,8 @@ module Cadenya
11452
12405
  "disabled" => ["disabled", nil],
11453
12406
  "widget_argument_exposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
11454
12407
  "widgetArgumentExposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
12408
+ "auto_mode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
12409
+ "autoMode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
11455
12410
  }.freeze
11456
12411
 
11457
12412
  def self.encode_ToolOverlay(data)
@@ -11665,12 +12620,22 @@ module Cadenya
11665
12620
  "description" => ["description", nil],
11666
12621
  "adapter" => ["adapter", ->(_v) { encode_ToolSetAdapter(_v) }],
11667
12622
  "overlays" => ["overlays", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay(_v) }).call(_i) } : _v }],
12623
+ "secrets" => ["secrets", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolSetSpec_Secret(_v) }).call(_i) } : _v }],
11668
12624
  }.freeze
11669
12625
 
11670
12626
  def self.encode_ToolSetSpec(data)
11671
12627
  encode_fields(ENCODE_TOOL_SET_SPEC, data)
11672
12628
  end
11673
12629
 
12630
+ ENCODE_TOOL_SET_SPEC_SECRET = {
12631
+ "name" => ["name", nil],
12632
+ "value" => ["value", nil],
12633
+ }.freeze
12634
+
12635
+ def self.encode_ToolSetSpec_Secret(data)
12636
+ encode_fields(ENCODE_TOOL_SET_SPEC_SECRET, data)
12637
+ end
12638
+
11674
12639
  ENCODE_TOOL_SPEC = {
11675
12640
  "description" => ["description", nil],
11676
12641
  "requires_approval" => ["requiresApproval", nil],
@@ -11705,6 +12670,14 @@ module Cadenya
11705
12670
  end
11706
12671
  end
11707
12672
 
12673
+ ENCODE_TRUSTED_ENDPOINT_SPEC = {
12674
+ "host" => ["host", nil],
12675
+ }.freeze
12676
+
12677
+ def self.encode_TrustedEndpointSpec(data)
12678
+ encode_fields(ENCODE_TRUSTED_ENDPOINT_SPEC, data)
12679
+ end
12680
+
11708
12681
  ENCODE_UPDATE_ACCOUNT_RESOURCE_METADATA = {
11709
12682
  "name" => ["name", nil],
11710
12683
  "external_id" => ["externalId", nil],