cadenya 1.7.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.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/api.md +51 -28
- data/lib/cadenya/client.rb +3 -2
- data/lib/cadenya/resources/api_keys.rb +43 -50
- data/lib/cadenya/resources/memory_layers.rb +7 -3
- data/lib/cadenya/resources/trusted_endpoints.rb +64 -0
- data/lib/cadenya/types.rb +518 -56
- data/lib/cadenya.rb +1 -0
- metadata +3 -2
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, :
|
|
261
|
+
attr_reader :token, :description, :permissions, :all_workspaces, :workspace_assignments, :default
|
|
259
262
|
|
|
260
|
-
def initialize(token: nil, description: nil, permissions: 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
|
-
@
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
@@ -1606,17 +1721,19 @@ module Cadenya
|
|
|
1606
1721
|
end
|
|
1607
1722
|
|
|
1608
1723
|
class Config_OpenAPI
|
|
1609
|
-
attr_reader :path, :method
|
|
1724
|
+
attr_reader :path, :method, :server_url
|
|
1610
1725
|
|
|
1611
|
-
def initialize(path: nil, method: nil)
|
|
1726
|
+
def initialize(path: nil, method: nil, server_url: nil)
|
|
1612
1727
|
@path = path
|
|
1613
1728
|
@method = method
|
|
1729
|
+
@server_url = server_url
|
|
1614
1730
|
end
|
|
1615
1731
|
|
|
1616
1732
|
def self.from_json(data)
|
|
1617
1733
|
new(
|
|
1618
1734
|
path: data["path"],
|
|
1619
1735
|
method: data["method"],
|
|
1736
|
+
server_url: data["serverUrl"],
|
|
1620
1737
|
)
|
|
1621
1738
|
end
|
|
1622
1739
|
|
|
@@ -1624,6 +1741,7 @@ module Cadenya
|
|
|
1624
1741
|
{
|
|
1625
1742
|
path: Util.plain(@path),
|
|
1626
1743
|
method: Util.plain(@method),
|
|
1744
|
+
server_url: Util.plain(@server_url),
|
|
1627
1745
|
}.reject { |_k, v| v.nil? }
|
|
1628
1746
|
end
|
|
1629
1747
|
end
|
|
@@ -1766,19 +1884,17 @@ module Cadenya
|
|
|
1766
1884
|
end
|
|
1767
1885
|
|
|
1768
1886
|
class CreateAPIKeyRequest
|
|
1769
|
-
attr_reader :metadata, :spec
|
|
1887
|
+
attr_reader :metadata, :spec
|
|
1770
1888
|
|
|
1771
|
-
def initialize(metadata: nil, spec: nil
|
|
1889
|
+
def initialize(metadata: nil, spec: nil)
|
|
1772
1890
|
@metadata = metadata
|
|
1773
1891
|
@spec = spec
|
|
1774
|
-
@workspace_id = workspace_id
|
|
1775
1892
|
end
|
|
1776
1893
|
|
|
1777
1894
|
def self.from_json(data)
|
|
1778
1895
|
new(
|
|
1779
1896
|
metadata: data["metadata"].nil? ? nil : Types::CreateAccountResourceMetadata.from_json(data["metadata"]),
|
|
1780
1897
|
spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]),
|
|
1781
|
-
workspace_id: data["workspaceId"],
|
|
1782
1898
|
)
|
|
1783
1899
|
end
|
|
1784
1900
|
|
|
@@ -1786,7 +1902,6 @@ module Cadenya
|
|
|
1786
1902
|
{
|
|
1787
1903
|
metadata: Util.plain(@metadata),
|
|
1788
1904
|
spec: Util.plain(@spec),
|
|
1789
|
-
workspace_id: Util.plain(@workspace_id),
|
|
1790
1905
|
}.reject { |_k, v| v.nil? }
|
|
1791
1906
|
end
|
|
1792
1907
|
end
|
|
@@ -2051,12 +2166,14 @@ module Cadenya
|
|
|
2051
2166
|
end
|
|
2052
2167
|
|
|
2053
2168
|
class CreateMemoryLayerRequest
|
|
2054
|
-
attr_reader :workspace_id, :metadata, :spec
|
|
2169
|
+
attr_reader :workspace_id, :metadata, :spec, :tenant, :subject
|
|
2055
2170
|
|
|
2056
|
-
def initialize(workspace_id: nil, metadata: nil, spec: nil)
|
|
2171
|
+
def initialize(workspace_id: nil, metadata: nil, spec: nil, tenant: nil, subject: nil)
|
|
2057
2172
|
@workspace_id = workspace_id
|
|
2058
2173
|
@metadata = metadata
|
|
2059
2174
|
@spec = spec
|
|
2175
|
+
@tenant = tenant
|
|
2176
|
+
@subject = subject
|
|
2060
2177
|
end
|
|
2061
2178
|
|
|
2062
2179
|
def self.from_json(data)
|
|
@@ -2064,6 +2181,8 @@ module Cadenya
|
|
|
2064
2181
|
workspace_id: data["workspaceId"],
|
|
2065
2182
|
metadata: data["metadata"].nil? ? nil : Types::CreateResourceMetadata.from_json(data["metadata"]),
|
|
2066
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"]),
|
|
2067
2186
|
)
|
|
2068
2187
|
end
|
|
2069
2188
|
|
|
@@ -2072,6 +2191,8 @@ module Cadenya
|
|
|
2072
2191
|
workspace_id: Util.plain(@workspace_id),
|
|
2073
2192
|
metadata: Util.plain(@metadata),
|
|
2074
2193
|
spec: Util.plain(@spec),
|
|
2194
|
+
tenant: Util.plain(@tenant),
|
|
2195
|
+
subject: Util.plain(@subject),
|
|
2075
2196
|
}.reject { |_k, v| v.nil? }
|
|
2076
2197
|
end
|
|
2077
2198
|
end
|
|
@@ -2346,6 +2467,29 @@ module Cadenya
|
|
|
2346
2467
|
end
|
|
2347
2468
|
end
|
|
2348
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
|
+
|
|
2349
2493
|
class CreateUploadRequest
|
|
2350
2494
|
attr_reader :workspace_id, :metadata, :spec
|
|
2351
2495
|
|
|
@@ -2661,23 +2805,20 @@ module Cadenya
|
|
|
2661
2805
|
end
|
|
2662
2806
|
|
|
2663
2807
|
class DisableAPIKeyRequest
|
|
2664
|
-
attr_reader :
|
|
2808
|
+
attr_reader :id
|
|
2665
2809
|
|
|
2666
|
-
def initialize(
|
|
2667
|
-
@workspace_id = workspace_id
|
|
2810
|
+
def initialize(id: nil)
|
|
2668
2811
|
@id = id
|
|
2669
2812
|
end
|
|
2670
2813
|
|
|
2671
2814
|
def self.from_json(data)
|
|
2672
2815
|
new(
|
|
2673
|
-
workspace_id: data["workspaceId"],
|
|
2674
2816
|
id: data["id"],
|
|
2675
2817
|
)
|
|
2676
2818
|
end
|
|
2677
2819
|
|
|
2678
2820
|
def to_h
|
|
2679
2821
|
{
|
|
2680
|
-
workspace_id: Util.plain(@workspace_id),
|
|
2681
2822
|
id: Util.plain(@id),
|
|
2682
2823
|
}.reject { |_k, v| v.nil? }
|
|
2683
2824
|
end
|
|
@@ -2707,23 +2848,20 @@ module Cadenya
|
|
|
2707
2848
|
end
|
|
2708
2849
|
|
|
2709
2850
|
class EnableAPIKeyRequest
|
|
2710
|
-
attr_reader :
|
|
2851
|
+
attr_reader :id
|
|
2711
2852
|
|
|
2712
|
-
def initialize(
|
|
2713
|
-
@workspace_id = workspace_id
|
|
2853
|
+
def initialize(id: nil)
|
|
2714
2854
|
@id = id
|
|
2715
2855
|
end
|
|
2716
2856
|
|
|
2717
2857
|
def self.from_json(data)
|
|
2718
2858
|
new(
|
|
2719
|
-
workspace_id: data["workspaceId"],
|
|
2720
2859
|
id: data["id"],
|
|
2721
2860
|
)
|
|
2722
2861
|
end
|
|
2723
2862
|
|
|
2724
2863
|
def to_h
|
|
2725
2864
|
{
|
|
2726
|
-
workspace_id: Util.plain(@workspace_id),
|
|
2727
2865
|
id: Util.plain(@id),
|
|
2728
2866
|
}.reject { |_k, v| v.nil? }
|
|
2729
2867
|
end
|
|
@@ -3456,6 +3594,29 @@ module Cadenya
|
|
|
3456
3594
|
end
|
|
3457
3595
|
end
|
|
3458
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
|
+
|
|
3459
3620
|
class ListWidgetSessionsResponse
|
|
3460
3621
|
attr_reader :items, :pagination
|
|
3461
3622
|
|
|
@@ -3772,13 +3933,15 @@ module Cadenya
|
|
|
3772
3933
|
end
|
|
3773
3934
|
|
|
3774
3935
|
class MemoryLayerInfo
|
|
3775
|
-
attr_reader :entry_count, :created_by, :last_used_at, :agent
|
|
3936
|
+
attr_reader :entry_count, :created_by, :last_used_at, :agent, :tenant, :subject
|
|
3776
3937
|
|
|
3777
|
-
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)
|
|
3778
3939
|
@entry_count = entry_count
|
|
3779
3940
|
@created_by = created_by
|
|
3780
3941
|
@last_used_at = last_used_at
|
|
3781
3942
|
@agent = agent
|
|
3943
|
+
@tenant = tenant
|
|
3944
|
+
@subject = subject
|
|
3782
3945
|
end
|
|
3783
3946
|
|
|
3784
3947
|
def self.from_json(data)
|
|
@@ -3787,6 +3950,8 @@ module Cadenya
|
|
|
3787
3950
|
created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
|
|
3788
3951
|
last_used_at: data["lastUsedAt"].nil? ? nil : Time.iso8601(data["lastUsedAt"]),
|
|
3789
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"]),
|
|
3790
3955
|
)
|
|
3791
3956
|
end
|
|
3792
3957
|
|
|
@@ -3796,6 +3961,8 @@ module Cadenya
|
|
|
3796
3961
|
created_by: Util.plain(@created_by),
|
|
3797
3962
|
last_used_at: Util.plain(@last_used_at),
|
|
3798
3963
|
agent: Util.plain(@agent),
|
|
3964
|
+
tenant: Util.plain(@tenant),
|
|
3965
|
+
subject: Util.plain(@subject),
|
|
3799
3966
|
}.reject { |_k, v| v.nil? }
|
|
3800
3967
|
end
|
|
3801
3968
|
end
|
|
@@ -3803,15 +3970,17 @@ module Cadenya
|
|
|
3803
3970
|
MemoryLayerSpecType = ["MEMORY_LAYER_TYPE_UNSPECIFIED", "MEMORY_LAYER_TYPE_EPISODIC", "MEMORY_LAYER_TYPE_SKILLS"].freeze
|
|
3804
3971
|
|
|
3805
3972
|
class MemoryLayerSpec
|
|
3806
|
-
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
|
|
3807
3974
|
|
|
3808
|
-
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)
|
|
3809
3976
|
@type = type
|
|
3810
3977
|
@description = description
|
|
3811
3978
|
@system_managed = system_managed
|
|
3812
3979
|
@expires_at = expires_at
|
|
3813
3980
|
@agent_id = agent_id
|
|
3814
3981
|
@episodic_key = episodic_key
|
|
3982
|
+
@tenant_id = tenant_id
|
|
3983
|
+
@subject_id = subject_id
|
|
3815
3984
|
end
|
|
3816
3985
|
|
|
3817
3986
|
def self.from_json(data)
|
|
@@ -3822,6 +3991,8 @@ module Cadenya
|
|
|
3822
3991
|
expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]),
|
|
3823
3992
|
agent_id: data["agentId"],
|
|
3824
3993
|
episodic_key: data["episodicKey"],
|
|
3994
|
+
tenant_id: data["tenantId"],
|
|
3995
|
+
subject_id: data["subjectId"],
|
|
3825
3996
|
)
|
|
3826
3997
|
end
|
|
3827
3998
|
|
|
@@ -3833,6 +4004,8 @@ module Cadenya
|
|
|
3833
4004
|
expires_at: Util.plain(@expires_at),
|
|
3834
4005
|
agent_id: Util.plain(@agent_id),
|
|
3835
4006
|
episodic_key: Util.plain(@episodic_key),
|
|
4007
|
+
tenant_id: Util.plain(@tenant_id),
|
|
4008
|
+
subject_id: Util.plain(@subject_id),
|
|
3836
4009
|
}.reject { |_k, v| v.nil? }
|
|
3837
4010
|
end
|
|
3838
4011
|
end
|
|
@@ -4318,17 +4491,19 @@ module Cadenya
|
|
|
4318
4491
|
end
|
|
4319
4492
|
|
|
4320
4493
|
class ObjectiveEpisodicConfig
|
|
4321
|
-
attr_reader :key, :memory_layer_id
|
|
4494
|
+
attr_reader :key, :memory_layer_id, :included_memory_layer_ids
|
|
4322
4495
|
|
|
4323
|
-
def initialize(key: nil, memory_layer_id: nil)
|
|
4496
|
+
def initialize(key: nil, memory_layer_id: nil, included_memory_layer_ids: nil)
|
|
4324
4497
|
@key = key
|
|
4325
4498
|
@memory_layer_id = memory_layer_id
|
|
4499
|
+
@included_memory_layer_ids = included_memory_layer_ids
|
|
4326
4500
|
end
|
|
4327
4501
|
|
|
4328
4502
|
def self.from_json(data)
|
|
4329
4503
|
new(
|
|
4330
4504
|
key: data["key"],
|
|
4331
4505
|
memory_layer_id: data["memoryLayerId"],
|
|
4506
|
+
included_memory_layer_ids: data["includedMemoryLayerIds"],
|
|
4332
4507
|
)
|
|
4333
4508
|
end
|
|
4334
4509
|
|
|
@@ -4336,6 +4511,7 @@ module Cadenya
|
|
|
4336
4511
|
{
|
|
4337
4512
|
key: Util.plain(@key),
|
|
4338
4513
|
memory_layer_id: Util.plain(@memory_layer_id),
|
|
4514
|
+
included_memory_layer_ids: Util.plain(@included_memory_layer_ids),
|
|
4339
4515
|
}.reject { |_k, v| v.nil? }
|
|
4340
4516
|
end
|
|
4341
4517
|
end
|
|
@@ -4814,14 +4990,15 @@ module Cadenya
|
|
|
4814
4990
|
end
|
|
4815
4991
|
|
|
4816
4992
|
class ObjectiveToolCallData
|
|
4817
|
-
attr_reader :callable, :arguments, :memo, :status_changed_by, :resolved_secrets
|
|
4993
|
+
attr_reader :callable, :arguments, :memo, :status_changed_by, :resolved_secrets, :decision_scores
|
|
4818
4994
|
|
|
4819
|
-
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)
|
|
4820
4996
|
@callable = callable
|
|
4821
4997
|
@arguments = arguments
|
|
4822
4998
|
@memo = memo
|
|
4823
4999
|
@status_changed_by = status_changed_by
|
|
4824
5000
|
@resolved_secrets = resolved_secrets
|
|
5001
|
+
@decision_scores = decision_scores
|
|
4825
5002
|
end
|
|
4826
5003
|
|
|
4827
5004
|
def self.from_json(data)
|
|
@@ -4831,6 +5008,7 @@ module Cadenya
|
|
|
4831
5008
|
memo: data["memo"],
|
|
4832
5009
|
status_changed_by: data["statusChangedBy"].nil? ? nil : Types::Profile.from_json(data["statusChangedBy"]),
|
|
4833
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"]),
|
|
4834
5012
|
)
|
|
4835
5013
|
end
|
|
4836
5014
|
|
|
@@ -4841,6 +5019,7 @@ module Cadenya
|
|
|
4841
5019
|
memo: Util.plain(@memo),
|
|
4842
5020
|
status_changed_by: Util.plain(@status_changed_by),
|
|
4843
5021
|
resolved_secrets: Util.plain(@resolved_secrets),
|
|
5022
|
+
decision_scores: Util.plain(@decision_scores),
|
|
4844
5023
|
}.reject { |_k, v| v.nil? }
|
|
4845
5024
|
end
|
|
4846
5025
|
end
|
|
@@ -5429,6 +5608,29 @@ module Cadenya
|
|
|
5429
5608
|
end
|
|
5430
5609
|
end
|
|
5431
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
|
+
|
|
5432
5634
|
def self.decode_RemoveAgentVariationAssignmentRequest(data)
|
|
5433
5635
|
return nil if data.nil? || data["type"].to_s.empty?
|
|
5434
5636
|
case data["type"]
|
|
@@ -5649,6 +5851,26 @@ module Cadenya
|
|
|
5649
5851
|
end
|
|
5650
5852
|
end
|
|
5651
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
|
+
|
|
5652
5874
|
class RevokeWidgetSessionRequest
|
|
5653
5875
|
attr_reader :workspace_id, :id
|
|
5654
5876
|
|
|
@@ -5673,23 +5895,20 @@ module Cadenya
|
|
|
5673
5895
|
end
|
|
5674
5896
|
|
|
5675
5897
|
class RotateAPIKeyRequest
|
|
5676
|
-
attr_reader :
|
|
5898
|
+
attr_reader :id
|
|
5677
5899
|
|
|
5678
|
-
def initialize(
|
|
5679
|
-
@workspace_id = workspace_id
|
|
5900
|
+
def initialize(id: nil)
|
|
5680
5901
|
@id = id
|
|
5681
5902
|
end
|
|
5682
5903
|
|
|
5683
5904
|
def self.from_json(data)
|
|
5684
5905
|
new(
|
|
5685
|
-
workspace_id: data["workspaceId"],
|
|
5686
5906
|
id: data["id"],
|
|
5687
5907
|
)
|
|
5688
5908
|
end
|
|
5689
5909
|
|
|
5690
5910
|
def to_h
|
|
5691
5911
|
{
|
|
5692
|
-
workspace_id: Util.plain(@workspace_id),
|
|
5693
5912
|
id: Util.plain(@id),
|
|
5694
5913
|
}.reject { |_k, v| v.nil? }
|
|
5695
5914
|
end
|
|
@@ -6406,6 +6625,38 @@ module Cadenya
|
|
|
6406
6625
|
end
|
|
6407
6626
|
end
|
|
6408
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
|
+
|
|
6409
6660
|
ToolState = ["STATE_UNSPECIFIED", "STATE_AVAILABLE", "STATE_OMITTED", "STATE_ARCHIVED"].freeze
|
|
6410
6661
|
|
|
6411
6662
|
class Tool
|
|
@@ -6477,6 +6728,55 @@ module Cadenya
|
|
|
6477
6728
|
end
|
|
6478
6729
|
end
|
|
6479
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
|
+
|
|
6480
6780
|
class ToolCalled
|
|
6481
6781
|
attr_reader :tool_call_id, :tool, :config, :arguments, :arguments_exposed_in_widgets
|
|
6482
6782
|
|
|
@@ -6588,15 +6888,16 @@ module Cadenya
|
|
|
6588
6888
|
end
|
|
6589
6889
|
|
|
6590
6890
|
class ToolOverlay
|
|
6591
|
-
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
|
|
6592
6892
|
|
|
6593
|
-
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)
|
|
6594
6894
|
@key = key
|
|
6595
6895
|
@selector = selector
|
|
6596
6896
|
@parameter_actions = parameter_actions
|
|
6597
6897
|
@result_actions = result_actions
|
|
6598
6898
|
@disabled = disabled
|
|
6599
6899
|
@widget_argument_exposure = widget_argument_exposure
|
|
6900
|
+
@auto_mode = auto_mode
|
|
6600
6901
|
end
|
|
6601
6902
|
|
|
6602
6903
|
def self.from_json(data)
|
|
@@ -6607,6 +6908,7 @@ module Cadenya
|
|
|
6607
6908
|
result_actions: data["resultActions"].nil? ? nil : (data["resultActions"]).map { |item| Types.decode_ToolOverlay_ResultAction(item) },
|
|
6608
6909
|
disabled: data["disabled"],
|
|
6609
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"]),
|
|
6610
6912
|
)
|
|
6611
6913
|
end
|
|
6612
6914
|
|
|
@@ -6618,6 +6920,7 @@ module Cadenya
|
|
|
6618
6920
|
result_actions: Util.plain(@result_actions),
|
|
6619
6921
|
disabled: Util.plain(@disabled),
|
|
6620
6922
|
widget_argument_exposure: Util.plain(@widget_argument_exposure),
|
|
6923
|
+
auto_mode: Util.plain(@auto_mode),
|
|
6621
6924
|
}.reject { |_k, v| v.nil? }
|
|
6622
6925
|
end
|
|
6623
6926
|
end
|
|
@@ -7273,6 +7576,72 @@ module Cadenya
|
|
|
7273
7576
|
end
|
|
7274
7577
|
end
|
|
7275
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
|
|
7627
|
+
|
|
7628
|
+
def initialize(host: nil)
|
|
7629
|
+
@host = host
|
|
7630
|
+
end
|
|
7631
|
+
|
|
7632
|
+
def self.from_json(data)
|
|
7633
|
+
new(
|
|
7634
|
+
host: data["host"],
|
|
7635
|
+
)
|
|
7636
|
+
end
|
|
7637
|
+
|
|
7638
|
+
def to_h
|
|
7639
|
+
{
|
|
7640
|
+
host: Util.plain(@host),
|
|
7641
|
+
}.reject { |_k, v| v.nil? }
|
|
7642
|
+
end
|
|
7643
|
+
end
|
|
7644
|
+
|
|
7276
7645
|
class UnarchiveAgentPoolRequest
|
|
7277
7646
|
attr_reader :workspace_id, :id
|
|
7278
7647
|
|
|
@@ -7424,10 +7793,9 @@ module Cadenya
|
|
|
7424
7793
|
end
|
|
7425
7794
|
|
|
7426
7795
|
class UpdateAPIKeyRequest
|
|
7427
|
-
attr_reader :
|
|
7796
|
+
attr_reader :id, :metadata, :spec, :update_mask
|
|
7428
7797
|
|
|
7429
|
-
def initialize(
|
|
7430
|
-
@workspace_id = workspace_id
|
|
7798
|
+
def initialize(id: nil, metadata: nil, spec: nil, update_mask: nil)
|
|
7431
7799
|
@id = id
|
|
7432
7800
|
@metadata = metadata
|
|
7433
7801
|
@spec = spec
|
|
@@ -7436,7 +7804,6 @@ module Cadenya
|
|
|
7436
7804
|
|
|
7437
7805
|
def self.from_json(data)
|
|
7438
7806
|
new(
|
|
7439
|
-
workspace_id: data["workspaceId"],
|
|
7440
7807
|
id: data["id"],
|
|
7441
7808
|
metadata: data["metadata"].nil? ? nil : Types::UpdateAccountResourceMetadata.from_json(data["metadata"]),
|
|
7442
7809
|
spec: data["spec"].nil? ? nil : Types::APIKeySpec.from_json(data["spec"]),
|
|
@@ -7446,7 +7813,6 @@ module Cadenya
|
|
|
7446
7813
|
|
|
7447
7814
|
def to_h
|
|
7448
7815
|
{
|
|
7449
|
-
workspace_id: Util.plain(@workspace_id),
|
|
7450
7816
|
id: Util.plain(@id),
|
|
7451
7817
|
metadata: Util.plain(@metadata),
|
|
7452
7818
|
spec: Util.plain(@spec),
|
|
@@ -8112,6 +8478,54 @@ module Cadenya
|
|
|
8112
8478
|
end
|
|
8113
8479
|
end
|
|
8114
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
|
+
|
|
8115
8529
|
class VertexConfig
|
|
8116
8530
|
attr_reader :project_id, :location
|
|
8117
8531
|
|
|
@@ -11189,14 +11603,27 @@ module Cadenya
|
|
|
11189
11603
|
ENCODE_API_KEY_SPEC = {
|
|
11190
11604
|
"description" => ["description", nil],
|
|
11191
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 }],
|
|
11192
11610
|
}.freeze
|
|
11193
11611
|
|
|
11194
|
-
DROP_API_KEY_SPEC = ["
|
|
11612
|
+
DROP_API_KEY_SPEC = ["default", "token"].freeze
|
|
11195
11613
|
|
|
11196
11614
|
def self.encode_APIKeySpec(data)
|
|
11197
11615
|
encode_fields(ENCODE_API_KEY_SPEC, data, drop: DROP_API_KEY_SPEC)
|
|
11198
11616
|
end
|
|
11199
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
|
+
|
|
11200
11627
|
def self.encode_AddAgentVariationAssignmentRequest(data)
|
|
11201
11628
|
data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
|
|
11202
11629
|
unless data.is_a?(Hash)
|
|
@@ -11290,6 +11717,8 @@ module Cadenya
|
|
|
11290
11717
|
"enableEpisodicMemory" => ["enableEpisodicMemory", nil],
|
|
11291
11718
|
"episodic_memory_ttl" => ["episodicMemoryTtl", nil],
|
|
11292
11719
|
"episodicMemoryTtl" => ["episodicMemoryTtl", nil],
|
|
11720
|
+
"always_include_subject_memories" => ["alwaysIncludeSubjectMemories", nil],
|
|
11721
|
+
"alwaysIncludeSubjectMemories" => ["alwaysIncludeSubjectMemories", nil],
|
|
11293
11722
|
}.freeze
|
|
11294
11723
|
|
|
11295
11724
|
def self.encode_AgentSpec(data)
|
|
@@ -11375,6 +11804,27 @@ module Cadenya
|
|
|
11375
11804
|
encode_fields(ENCODE_AGENT_VARIATION_SPEC_PROGRESSIVE_DISCOVERY, data)
|
|
11376
11805
|
end
|
|
11377
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
|
+
|
|
11378
11828
|
ENCODE_BEDROCK_CONFIG = {
|
|
11379
11829
|
"region" => ["region", nil],
|
|
11380
11830
|
}.freeze
|
|
@@ -11454,8 +11904,10 @@ module Cadenya
|
|
|
11454
11904
|
"method" => ["method", nil],
|
|
11455
11905
|
}.freeze
|
|
11456
11906
|
|
|
11907
|
+
DROP_CONFIG_OPEN_API = ["serverUrl", "server_url"].freeze
|
|
11908
|
+
|
|
11457
11909
|
def self.encode_Config_OpenAPI(data)
|
|
11458
|
-
encode_fields(ENCODE_CONFIG_OPEN_API, data)
|
|
11910
|
+
encode_fields(ENCODE_CONFIG_OPEN_API, data, drop: DROP_CONFIG_OPEN_API)
|
|
11459
11911
|
end
|
|
11460
11912
|
|
|
11461
11913
|
ENCODE_CREATE_ACCOUNT_RESOURCE_METADATA = {
|
|
@@ -11616,7 +12068,7 @@ module Cadenya
|
|
|
11616
12068
|
"description" => ["description", nil],
|
|
11617
12069
|
}.freeze
|
|
11618
12070
|
|
|
11619
|
-
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
|
|
11620
12072
|
|
|
11621
12073
|
def self.encode_MemoryLayerSpec(data)
|
|
11622
12074
|
encode_fields(ENCODE_MEMORY_LAYER_SPEC, data, drop: DROP_MEMORY_LAYER_SPEC)
|
|
@@ -11698,7 +12150,7 @@ module Cadenya
|
|
|
11698
12150
|
"key" => ["key", nil],
|
|
11699
12151
|
}.freeze
|
|
11700
12152
|
|
|
11701
|
-
DROP_OBJECTIVE_EPISODIC_CONFIG = ["memoryLayerId", "memory_layer_id"].freeze
|
|
12153
|
+
DROP_OBJECTIVE_EPISODIC_CONFIG = ["includedMemoryLayerIds", "included_memory_layer_ids", "memoryLayerId", "memory_layer_id"].freeze
|
|
11702
12154
|
|
|
11703
12155
|
def self.encode_ObjectiveEpisodicConfig(data)
|
|
11704
12156
|
encode_fields(ENCODE_OBJECTIVE_EPISODIC_CONFIG, data, drop: DROP_OBJECTIVE_EPISODIC_CONFIG)
|
|
@@ -11953,6 +12405,8 @@ module Cadenya
|
|
|
11953
12405
|
"disabled" => ["disabled", nil],
|
|
11954
12406
|
"widget_argument_exposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
|
|
11955
12407
|
"widgetArgumentExposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
|
|
12408
|
+
"auto_mode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
|
|
12409
|
+
"autoMode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
|
|
11956
12410
|
}.freeze
|
|
11957
12411
|
|
|
11958
12412
|
def self.encode_ToolOverlay(data)
|
|
@@ -12216,6 +12670,14 @@ module Cadenya
|
|
|
12216
12670
|
end
|
|
12217
12671
|
end
|
|
12218
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
|
+
|
|
12219
12681
|
ENCODE_UPDATE_ACCOUNT_RESOURCE_METADATA = {
|
|
12220
12682
|
"name" => ["name", nil],
|
|
12221
12683
|
"external_id" => ["externalId", nil],
|