cadenya 1.9.0 → 1.10.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/api.md +41 -3
- data/lib/cadenya/resources/objectives.rb +4 -2
- data/lib/cadenya/resources/tool_set_rules.rb +70 -0
- data/lib/cadenya/resources/tool_sets.rb +10 -1
- data/lib/cadenya/resources/tools.rb +2 -4
- data/lib/cadenya/resources/workspaces.rb +7 -0
- data/lib/cadenya/types.rb +770 -470
- data/lib/cadenya.rb +1 -0
- metadata +3 -2
data/lib/cadenya/types.rb
CHANGED
|
@@ -175,7 +175,7 @@ module Cadenya
|
|
|
175
175
|
end
|
|
176
176
|
end
|
|
177
177
|
|
|
178
|
-
AiProviderKeySpecProvider = ["AI_PROVIDER_UNSPECIFIED", "AI_PROVIDER_OPENROUTER", "AI_PROVIDER_OPENAI", "AI_PROVIDER_ANTHROPIC", "AI_PROVIDER_GEMINI", "AI_PROVIDER_OPENAI_COMPATIBLE", "AI_PROVIDER_VERTEX", "AI_PROVIDER_BEDROCK"].freeze
|
|
178
|
+
AiProviderKeySpecProvider = ["AI_PROVIDER_UNSPECIFIED", "AI_PROVIDER_OPENROUTER", "AI_PROVIDER_OPENAI", "AI_PROVIDER_ANTHROPIC", "AI_PROVIDER_GEMINI", "AI_PROVIDER_OPENAI_COMPATIBLE", "AI_PROVIDER_VERTEX", "AI_PROVIDER_BEDROCK", "AI_PROVIDER_DEMO"].freeze
|
|
179
179
|
|
|
180
180
|
class AIProviderKeySpec
|
|
181
181
|
attr_reader :provider, :credentials, :config
|
|
@@ -2140,9 +2140,9 @@ module Cadenya
|
|
|
2140
2140
|
end
|
|
2141
2141
|
|
|
2142
2142
|
class CreateAndStreamObjectiveRequest
|
|
2143
|
-
attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools, :include_deltas
|
|
2143
|
+
attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools, :system_prompt, :include_deltas
|
|
2144
2144
|
|
|
2145
|
-
def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, include_deltas: nil)
|
|
2145
|
+
def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, system_prompt: nil, include_deltas: nil)
|
|
2146
2146
|
@workspace_id = workspace_id
|
|
2147
2147
|
@agent_id = agent_id
|
|
2148
2148
|
@variation_id = variation_id
|
|
@@ -2157,6 +2157,7 @@ module Cadenya
|
|
|
2157
2157
|
@subject = subject
|
|
2158
2158
|
@pinned_parameters = pinned_parameters
|
|
2159
2159
|
@client_tools = client_tools
|
|
2160
|
+
@system_prompt = system_prompt
|
|
2160
2161
|
@include_deltas = include_deltas
|
|
2161
2162
|
end
|
|
2162
2163
|
|
|
@@ -2176,6 +2177,7 @@ module Cadenya
|
|
|
2176
2177
|
subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
|
|
2177
2178
|
pinned_parameters: data["pinnedParameters"],
|
|
2178
2179
|
client_tools: data["clientTools"].nil? ? nil : Types::ClientTools.from_json(data["clientTools"]),
|
|
2180
|
+
system_prompt: data["systemPrompt"],
|
|
2179
2181
|
include_deltas: data["includeDeltas"],
|
|
2180
2182
|
)
|
|
2181
2183
|
end
|
|
@@ -2196,6 +2198,7 @@ module Cadenya
|
|
|
2196
2198
|
subject: Util.plain(@subject),
|
|
2197
2199
|
pinned_parameters: Util.plain(@pinned_parameters),
|
|
2198
2200
|
client_tools: Util.plain(@client_tools),
|
|
2201
|
+
system_prompt: Util.plain(@system_prompt),
|
|
2199
2202
|
include_deltas: Util.plain(@include_deltas),
|
|
2200
2203
|
}.reject { |_k, v| v.nil? }
|
|
2201
2204
|
end
|
|
@@ -2356,9 +2359,9 @@ module Cadenya
|
|
|
2356
2359
|
end
|
|
2357
2360
|
|
|
2358
2361
|
class CreateObjectiveRequest
|
|
2359
|
-
attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools
|
|
2362
|
+
attr_reader :workspace_id, :agent_id, :variation_id, :metadata, :system_prompt_data, :first_user_message, :secrets, :memory_cascade, :first_user_message_data, :episodic_memory, :tenant, :subject, :pinned_parameters, :client_tools, :system_prompt
|
|
2360
2363
|
|
|
2361
|
-
def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil)
|
|
2364
|
+
def initialize(workspace_id: nil, agent_id: nil, variation_id: nil, metadata: nil, system_prompt_data: nil, first_user_message: nil, secrets: nil, memory_cascade: nil, first_user_message_data: nil, episodic_memory: nil, tenant: nil, subject: nil, pinned_parameters: nil, client_tools: nil, system_prompt: nil)
|
|
2362
2365
|
@workspace_id = workspace_id
|
|
2363
2366
|
@agent_id = agent_id
|
|
2364
2367
|
@variation_id = variation_id
|
|
@@ -2373,6 +2376,7 @@ module Cadenya
|
|
|
2373
2376
|
@subject = subject
|
|
2374
2377
|
@pinned_parameters = pinned_parameters
|
|
2375
2378
|
@client_tools = client_tools
|
|
2379
|
+
@system_prompt = system_prompt
|
|
2376
2380
|
end
|
|
2377
2381
|
|
|
2378
2382
|
def self.from_json(data)
|
|
@@ -2391,6 +2395,7 @@ module Cadenya
|
|
|
2391
2395
|
subject: data["subject"].nil? ? nil : Types::SubjectAssertion.from_json(data["subject"]),
|
|
2392
2396
|
pinned_parameters: data["pinnedParameters"],
|
|
2393
2397
|
client_tools: data["clientTools"].nil? ? nil : Types::ClientTools.from_json(data["clientTools"]),
|
|
2398
|
+
system_prompt: data["systemPrompt"],
|
|
2394
2399
|
)
|
|
2395
2400
|
end
|
|
2396
2401
|
|
|
@@ -2410,6 +2415,7 @@ module Cadenya
|
|
|
2410
2415
|
subject: Util.plain(@subject),
|
|
2411
2416
|
pinned_parameters: Util.plain(@pinned_parameters),
|
|
2412
2417
|
client_tools: Util.plain(@client_tools),
|
|
2418
|
+
system_prompt: Util.plain(@system_prompt),
|
|
2413
2419
|
}.reject { |_k, v| v.nil? }
|
|
2414
2420
|
end
|
|
2415
2421
|
end
|
|
@@ -2541,6 +2547,47 @@ module Cadenya
|
|
|
2541
2547
|
end
|
|
2542
2548
|
end
|
|
2543
2549
|
|
|
2550
|
+
class CreateToolSetRuleRequest
|
|
2551
|
+
attr_reader :workspace_id, :tool_set_id, :name, :description, :when_, :actions, :disabled, :position
|
|
2552
|
+
|
|
2553
|
+
def initialize(workspace_id: nil, tool_set_id: nil, name: nil, description: nil, when_: nil, actions: nil, disabled: nil, position: nil)
|
|
2554
|
+
@workspace_id = workspace_id
|
|
2555
|
+
@tool_set_id = tool_set_id
|
|
2556
|
+
@name = name
|
|
2557
|
+
@description = description
|
|
2558
|
+
@when_ = when_
|
|
2559
|
+
@actions = actions
|
|
2560
|
+
@disabled = disabled
|
|
2561
|
+
@position = position
|
|
2562
|
+
end
|
|
2563
|
+
|
|
2564
|
+
def self.from_json(data)
|
|
2565
|
+
new(
|
|
2566
|
+
workspace_id: data["workspaceId"],
|
|
2567
|
+
tool_set_id: data["toolSetId"],
|
|
2568
|
+
name: data["name"],
|
|
2569
|
+
description: data["description"],
|
|
2570
|
+
when_: data["when"],
|
|
2571
|
+
actions: data["actions"].nil? ? nil : Types::ToolActions.from_json(data["actions"]),
|
|
2572
|
+
disabled: data["disabled"],
|
|
2573
|
+
position: data["position"],
|
|
2574
|
+
)
|
|
2575
|
+
end
|
|
2576
|
+
|
|
2577
|
+
def to_h
|
|
2578
|
+
{
|
|
2579
|
+
workspace_id: Util.plain(@workspace_id),
|
|
2580
|
+
tool_set_id: Util.plain(@tool_set_id),
|
|
2581
|
+
name: Util.plain(@name),
|
|
2582
|
+
description: Util.plain(@description),
|
|
2583
|
+
when_: Util.plain(@when_),
|
|
2584
|
+
actions: Util.plain(@actions),
|
|
2585
|
+
disabled: Util.plain(@disabled),
|
|
2586
|
+
position: Util.plain(@position),
|
|
2587
|
+
}.reject { |_k, v| v.nil? }
|
|
2588
|
+
end
|
|
2589
|
+
end
|
|
2590
|
+
|
|
2544
2591
|
class CreateToolSetSecretRequest
|
|
2545
2592
|
attr_reader :workspace_id, :tool_set_id, :metadata, :spec
|
|
2546
2593
|
|
|
@@ -3605,6 +3652,29 @@ module Cadenya
|
|
|
3605
3652
|
end
|
|
3606
3653
|
end
|
|
3607
3654
|
|
|
3655
|
+
class ListToolSetRulesResponse
|
|
3656
|
+
attr_reader :items, :pagination
|
|
3657
|
+
|
|
3658
|
+
def initialize(items: nil, pagination: nil)
|
|
3659
|
+
@items = items
|
|
3660
|
+
@pagination = pagination
|
|
3661
|
+
end
|
|
3662
|
+
|
|
3663
|
+
def self.from_json(data)
|
|
3664
|
+
new(
|
|
3665
|
+
items: data["items"].nil? ? nil : (data["items"]).map { |item| Types::ToolRule.from_json(item) },
|
|
3666
|
+
pagination: data["pagination"].nil? ? nil : Types::Page.from_json(data["pagination"]),
|
|
3667
|
+
)
|
|
3668
|
+
end
|
|
3669
|
+
|
|
3670
|
+
def to_h
|
|
3671
|
+
{
|
|
3672
|
+
items: Util.plain(@items),
|
|
3673
|
+
pagination: Util.plain(@pagination),
|
|
3674
|
+
}.reject { |_k, v| v.nil? }
|
|
3675
|
+
end
|
|
3676
|
+
end
|
|
3677
|
+
|
|
3608
3678
|
class ListToolSetSecretsResponse
|
|
3609
3679
|
attr_reader :items, :pagination
|
|
3610
3680
|
|
|
@@ -4381,9 +4451,9 @@ module Cadenya
|
|
|
4381
4451
|
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
|
|
4382
4452
|
|
|
4383
4453
|
class Objective
|
|
4384
|
-
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
|
|
4454
|
+
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, :system_prompt_overridden
|
|
4385
4455
|
|
|
4386
|
-
def initialize(metadata: nil, config_snapshot: nil, state: nil, state_message: nil, info: nil, system_prompt: nil, first_user_message: nil, parent_objective_id: nil, secrets: nil, system_prompt_data: nil, memory_cascade: nil, output: nil, first_user_message_data: nil, episodic_memory: nil, pinned_parameters: nil)
|
|
4456
|
+
def initialize(metadata: nil, config_snapshot: nil, state: nil, state_message: nil, info: nil, system_prompt: nil, first_user_message: nil, parent_objective_id: nil, secrets: nil, system_prompt_data: nil, memory_cascade: nil, output: nil, first_user_message_data: nil, episodic_memory: nil, pinned_parameters: nil, system_prompt_overridden: nil)
|
|
4387
4457
|
@metadata = metadata
|
|
4388
4458
|
@config_snapshot = config_snapshot
|
|
4389
4459
|
@state = state
|
|
@@ -4399,6 +4469,7 @@ module Cadenya
|
|
|
4399
4469
|
@first_user_message_data = first_user_message_data
|
|
4400
4470
|
@episodic_memory = episodic_memory
|
|
4401
4471
|
@pinned_parameters = pinned_parameters
|
|
4472
|
+
@system_prompt_overridden = system_prompt_overridden
|
|
4402
4473
|
end
|
|
4403
4474
|
|
|
4404
4475
|
def self.from_json(data)
|
|
@@ -4418,6 +4489,7 @@ module Cadenya
|
|
|
4418
4489
|
first_user_message_data: data["firstUserMessageData"],
|
|
4419
4490
|
episodic_memory: data["episodicMemory"].nil? ? nil : Types::ObjectiveEpisodicConfig.from_json(data["episodicMemory"]),
|
|
4420
4491
|
pinned_parameters: data["pinnedParameters"],
|
|
4492
|
+
system_prompt_overridden: data["systemPromptOverridden"],
|
|
4421
4493
|
)
|
|
4422
4494
|
end
|
|
4423
4495
|
|
|
@@ -4438,6 +4510,7 @@ module Cadenya
|
|
|
4438
4510
|
first_user_message_data: Util.plain(@first_user_message_data),
|
|
4439
4511
|
episodic_memory: Util.plain(@episodic_memory),
|
|
4440
4512
|
pinned_parameters: Util.plain(@pinned_parameters),
|
|
4513
|
+
system_prompt_overridden: Util.plain(@system_prompt_overridden),
|
|
4441
4514
|
}.reject { |_k, v| v.nil? }
|
|
4442
4515
|
end
|
|
4443
4516
|
end
|
|
@@ -4645,9 +4718,9 @@ module Cadenya
|
|
|
4645
4718
|
end
|
|
4646
4719
|
|
|
4647
4720
|
class ObjectiveEvent
|
|
4648
|
-
attr_reader :metadata, :data, :context_window_id, :info, :duration, :started_at, :sequence
|
|
4721
|
+
attr_reader :metadata, :data, :context_window_id, :info, :duration, :started_at, :sequence, :iteration_id
|
|
4649
4722
|
|
|
4650
|
-
def initialize(metadata: nil, data: nil, context_window_id: nil, info: nil, duration: nil, started_at: nil, sequence: nil)
|
|
4723
|
+
def initialize(metadata: nil, data: nil, context_window_id: nil, info: nil, duration: nil, started_at: nil, sequence: nil, iteration_id: nil)
|
|
4651
4724
|
@metadata = metadata
|
|
4652
4725
|
@data = data
|
|
4653
4726
|
@context_window_id = context_window_id
|
|
@@ -4655,6 +4728,7 @@ module Cadenya
|
|
|
4655
4728
|
@duration = duration
|
|
4656
4729
|
@started_at = started_at
|
|
4657
4730
|
@sequence = sequence
|
|
4731
|
+
@iteration_id = iteration_id
|
|
4658
4732
|
end
|
|
4659
4733
|
|
|
4660
4734
|
def self.from_json(data)
|
|
@@ -4666,6 +4740,7 @@ module Cadenya
|
|
|
4666
4740
|
duration: data["duration"],
|
|
4667
4741
|
started_at: data["startedAt"].nil? ? nil : Time.iso8601(data["startedAt"]),
|
|
4668
4742
|
sequence: data["sequence"],
|
|
4743
|
+
iteration_id: data["iterationId"],
|
|
4669
4744
|
)
|
|
4670
4745
|
end
|
|
4671
4746
|
|
|
@@ -4678,6 +4753,7 @@ module Cadenya
|
|
|
4678
4753
|
duration: Util.plain(@duration),
|
|
4679
4754
|
started_at: Util.plain(@started_at),
|
|
4680
4755
|
sequence: Util.plain(@sequence),
|
|
4756
|
+
iteration_id: Util.plain(@iteration_id),
|
|
4681
4757
|
}.reject { |_k, v| v.nil? }
|
|
4682
4758
|
end
|
|
4683
4759
|
end
|
|
@@ -5501,77 +5577,6 @@ module Cadenya
|
|
|
5501
5577
|
end
|
|
5502
5578
|
end
|
|
5503
5579
|
|
|
5504
|
-
ParameterActionPinOnMissing = ["ON_MISSING_UNSPECIFIED", "ON_MISSING_FAIL", "ON_MISSING_SKIP"].freeze
|
|
5505
|
-
|
|
5506
|
-
class ParameterAction_Pin
|
|
5507
|
-
attr_reader :path, :pinned_parameter, :on_missing
|
|
5508
|
-
|
|
5509
|
-
def initialize(path: nil, pinned_parameter: nil, on_missing: nil)
|
|
5510
|
-
@path = path
|
|
5511
|
-
@pinned_parameter = pinned_parameter
|
|
5512
|
-
@on_missing = on_missing
|
|
5513
|
-
end
|
|
5514
|
-
|
|
5515
|
-
def self.from_json(data)
|
|
5516
|
-
new(
|
|
5517
|
-
path: data["path"],
|
|
5518
|
-
pinned_parameter: data["pinnedParameter"],
|
|
5519
|
-
on_missing: data["onMissing"],
|
|
5520
|
-
)
|
|
5521
|
-
end
|
|
5522
|
-
|
|
5523
|
-
def to_h
|
|
5524
|
-
{
|
|
5525
|
-
path: Util.plain(@path),
|
|
5526
|
-
pinned_parameter: Util.plain(@pinned_parameter),
|
|
5527
|
-
on_missing: Util.plain(@on_missing),
|
|
5528
|
-
}.reject { |_k, v| v.nil? }
|
|
5529
|
-
end
|
|
5530
|
-
end
|
|
5531
|
-
|
|
5532
|
-
class ParameterAction_Remove
|
|
5533
|
-
attr_reader :path
|
|
5534
|
-
|
|
5535
|
-
def initialize(path: nil)
|
|
5536
|
-
@path = path
|
|
5537
|
-
end
|
|
5538
|
-
|
|
5539
|
-
def self.from_json(data)
|
|
5540
|
-
new(
|
|
5541
|
-
path: data["path"],
|
|
5542
|
-
)
|
|
5543
|
-
end
|
|
5544
|
-
|
|
5545
|
-
def to_h
|
|
5546
|
-
{
|
|
5547
|
-
path: Util.plain(@path),
|
|
5548
|
-
}.reject { |_k, v| v.nil? }
|
|
5549
|
-
end
|
|
5550
|
-
end
|
|
5551
|
-
|
|
5552
|
-
class ParameterAction_Set
|
|
5553
|
-
attr_reader :path, :value_template
|
|
5554
|
-
|
|
5555
|
-
def initialize(path: nil, value_template: nil)
|
|
5556
|
-
@path = path
|
|
5557
|
-
@value_template = value_template
|
|
5558
|
-
end
|
|
5559
|
-
|
|
5560
|
-
def self.from_json(data)
|
|
5561
|
-
new(
|
|
5562
|
-
path: data["path"],
|
|
5563
|
-
value_template: data["valueTemplate"],
|
|
5564
|
-
)
|
|
5565
|
-
end
|
|
5566
|
-
|
|
5567
|
-
def to_h
|
|
5568
|
-
{
|
|
5569
|
-
path: Util.plain(@path),
|
|
5570
|
-
value_template: Util.plain(@value_template),
|
|
5571
|
-
}.reject { |_k, v| v.nil? }
|
|
5572
|
-
end
|
|
5573
|
-
end
|
|
5574
|
-
|
|
5575
5580
|
class PauseAgentScheduleRequest
|
|
5576
5581
|
attr_reader :workspace_id, :agent_id, :id
|
|
5577
5582
|
|
|
@@ -5953,34 +5958,6 @@ module Cadenya
|
|
|
5953
5958
|
end
|
|
5954
5959
|
end
|
|
5955
5960
|
|
|
5956
|
-
ResultActionTransformOnError = ["ON_ERROR_UNSPECIFIED", "ON_ERROR_RAW_CONTENT", "ON_ERROR_FAIL"].freeze
|
|
5957
|
-
|
|
5958
|
-
class ResultAction_Transform
|
|
5959
|
-
attr_reader :content_template, :on_error, :expect_json
|
|
5960
|
-
|
|
5961
|
-
def initialize(content_template: nil, on_error: nil, expect_json: nil)
|
|
5962
|
-
@content_template = content_template
|
|
5963
|
-
@on_error = on_error
|
|
5964
|
-
@expect_json = expect_json
|
|
5965
|
-
end
|
|
5966
|
-
|
|
5967
|
-
def self.from_json(data)
|
|
5968
|
-
new(
|
|
5969
|
-
content_template: data["contentTemplate"],
|
|
5970
|
-
on_error: data["onError"],
|
|
5971
|
-
expect_json: data["expectJson"],
|
|
5972
|
-
)
|
|
5973
|
-
end
|
|
5974
|
-
|
|
5975
|
-
def to_h
|
|
5976
|
-
{
|
|
5977
|
-
content_template: Util.plain(@content_template),
|
|
5978
|
-
on_error: Util.plain(@on_error),
|
|
5979
|
-
expect_json: Util.plain(@expect_json),
|
|
5980
|
-
}.reject { |_k, v| v.nil? }
|
|
5981
|
-
end
|
|
5982
|
-
end
|
|
5983
|
-
|
|
5984
5961
|
class ResumeAgentScheduleRequest
|
|
5985
5962
|
attr_reader :workspace_id, :agent_id, :id
|
|
5986
5963
|
|
|
@@ -6223,40 +6200,6 @@ module Cadenya
|
|
|
6223
6200
|
end
|
|
6224
6201
|
end
|
|
6225
6202
|
|
|
6226
|
-
def self.decode_Selector_Condition(data)
|
|
6227
|
-
return nil if data.nil? || data["type"].to_s.empty?
|
|
6228
|
-
case data["type"]
|
|
6229
|
-
when "attribute"
|
|
6230
|
-
Types::Selector_Condition_Attribute.from_json(data)
|
|
6231
|
-
when "hasParameter"
|
|
6232
|
-
Types::Selector_Condition_HasParameter.from_json(data)
|
|
6233
|
-
when "tools"
|
|
6234
|
-
Types::Selector_Condition_Tools.from_json(data)
|
|
6235
|
-
else
|
|
6236
|
-
raise ArgumentError, "Selector_Condition: unknown type #{data["type"].inspect}"
|
|
6237
|
-
end
|
|
6238
|
-
end
|
|
6239
|
-
|
|
6240
|
-
class Selector_ToolNames
|
|
6241
|
-
attr_reader :names
|
|
6242
|
-
|
|
6243
|
-
def initialize(names: nil)
|
|
6244
|
-
@names = names
|
|
6245
|
-
end
|
|
6246
|
-
|
|
6247
|
-
def self.from_json(data)
|
|
6248
|
-
new(
|
|
6249
|
-
names: data["names"],
|
|
6250
|
-
)
|
|
6251
|
-
end
|
|
6252
|
-
|
|
6253
|
-
def to_h
|
|
6254
|
-
{
|
|
6255
|
-
names: Util.plain(@names),
|
|
6256
|
-
}.reject { |_k, v| v.nil? }
|
|
6257
|
-
end
|
|
6258
|
-
end
|
|
6259
|
-
|
|
6260
6203
|
class SetToolCallContentRequest
|
|
6261
6204
|
attr_reader :workspace_id, :objective_id, :tool_call_id, :content
|
|
6262
6205
|
|
|
@@ -6366,6 +6309,39 @@ module Cadenya
|
|
|
6366
6309
|
end
|
|
6367
6310
|
end
|
|
6368
6311
|
|
|
6312
|
+
class Source_Rule
|
|
6313
|
+
attr_reader :id, :name
|
|
6314
|
+
|
|
6315
|
+
def initialize(id: nil, name: nil)
|
|
6316
|
+
@id = id
|
|
6317
|
+
@name = name
|
|
6318
|
+
end
|
|
6319
|
+
|
|
6320
|
+
def self.from_json(data)
|
|
6321
|
+
new(
|
|
6322
|
+
id: data["id"],
|
|
6323
|
+
name: data["name"],
|
|
6324
|
+
)
|
|
6325
|
+
end
|
|
6326
|
+
|
|
6327
|
+
def to_h
|
|
6328
|
+
{
|
|
6329
|
+
id: Util.plain(@id),
|
|
6330
|
+
name: Util.plain(@name),
|
|
6331
|
+
}.reject { |_k, v| v.nil? }
|
|
6332
|
+
end
|
|
6333
|
+
end
|
|
6334
|
+
|
|
6335
|
+
class Source_Tool
|
|
6336
|
+
def self.from_json(_data)
|
|
6337
|
+
new
|
|
6338
|
+
end
|
|
6339
|
+
|
|
6340
|
+
def to_h
|
|
6341
|
+
{}
|
|
6342
|
+
end
|
|
6343
|
+
end
|
|
6344
|
+
|
|
6369
6345
|
def self.decode_StatusDetails(data)
|
|
6370
6346
|
return Types::WidgetSessionErrorInfo.from_json(data) if data.is_a?(Hash) && ["@type", "domain", "reason"].all? { |k| data.key?(k) }
|
|
6371
6347
|
return Types::GoogleProtobufAny.from_json(data) if data.is_a?(Hash)
|
|
@@ -6632,6 +6608,26 @@ module Cadenya
|
|
|
6632
6608
|
end
|
|
6633
6609
|
end
|
|
6634
6610
|
|
|
6611
|
+
class SyncDisabled
|
|
6612
|
+
attr_reader :message
|
|
6613
|
+
|
|
6614
|
+
def initialize(message: nil)
|
|
6615
|
+
@message = message
|
|
6616
|
+
end
|
|
6617
|
+
|
|
6618
|
+
def self.from_json(data)
|
|
6619
|
+
new(
|
|
6620
|
+
message: data["message"],
|
|
6621
|
+
)
|
|
6622
|
+
end
|
|
6623
|
+
|
|
6624
|
+
def to_h
|
|
6625
|
+
{
|
|
6626
|
+
message: Util.plain(@message),
|
|
6627
|
+
}.reject { |_k, v| v.nil? }
|
|
6628
|
+
end
|
|
6629
|
+
end
|
|
6630
|
+
|
|
6635
6631
|
class SyncFailed
|
|
6636
6632
|
attr_reader :error, :message, :error_type
|
|
6637
6633
|
|
|
@@ -6678,47 +6674,104 @@ module Cadenya
|
|
|
6678
6674
|
end
|
|
6679
6675
|
end
|
|
6680
6676
|
|
|
6681
|
-
|
|
6682
|
-
|
|
6683
|
-
class Tenant
|
|
6684
|
-
attr_reader :metadata, :info, :state
|
|
6677
|
+
class SyncToolSetRequest
|
|
6678
|
+
attr_reader :workspace_id, :id
|
|
6685
6679
|
|
|
6686
|
-
def initialize(
|
|
6687
|
-
@
|
|
6688
|
-
@
|
|
6689
|
-
@state = state
|
|
6680
|
+
def initialize(workspace_id: nil, id: nil)
|
|
6681
|
+
@workspace_id = workspace_id
|
|
6682
|
+
@id = id
|
|
6690
6683
|
end
|
|
6691
6684
|
|
|
6692
6685
|
def self.from_json(data)
|
|
6693
6686
|
new(
|
|
6694
|
-
|
|
6695
|
-
|
|
6696
|
-
state: data["state"],
|
|
6687
|
+
workspace_id: data["workspaceId"],
|
|
6688
|
+
id: data["id"],
|
|
6697
6689
|
)
|
|
6698
6690
|
end
|
|
6699
6691
|
|
|
6700
6692
|
def to_h
|
|
6701
6693
|
{
|
|
6702
|
-
|
|
6703
|
-
|
|
6704
|
-
state: Util.plain(@state),
|
|
6694
|
+
workspace_id: Util.plain(@workspace_id),
|
|
6695
|
+
id: Util.plain(@id),
|
|
6705
6696
|
}.reject { |_k, v| v.nil? }
|
|
6706
6697
|
end
|
|
6707
6698
|
end
|
|
6708
6699
|
|
|
6709
|
-
|
|
6710
|
-
attr_reader :id, :name
|
|
6700
|
+
TemporaryWorkspaceState = ["STATE_UNSPECIFIED", "STATE_UNCLAIMED", "STATE_PENDING", "STATE_CLAIMED", "STATE_EXPIRED"].freeze
|
|
6711
6701
|
|
|
6712
|
-
|
|
6713
|
-
|
|
6714
|
-
|
|
6702
|
+
class TemporaryWorkspace
|
|
6703
|
+
attr_reader :workspace_id, :state, :expires_at, :claimed_at, :poll_interval
|
|
6704
|
+
|
|
6705
|
+
def initialize(workspace_id: nil, state: nil, expires_at: nil, claimed_at: nil, poll_interval: nil)
|
|
6706
|
+
@workspace_id = workspace_id
|
|
6707
|
+
@state = state
|
|
6708
|
+
@expires_at = expires_at
|
|
6709
|
+
@claimed_at = claimed_at
|
|
6710
|
+
@poll_interval = poll_interval
|
|
6715
6711
|
end
|
|
6716
6712
|
|
|
6717
6713
|
def self.from_json(data)
|
|
6718
6714
|
new(
|
|
6719
|
-
|
|
6720
|
-
|
|
6721
|
-
|
|
6715
|
+
workspace_id: data["workspaceId"],
|
|
6716
|
+
state: data["state"],
|
|
6717
|
+
expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]),
|
|
6718
|
+
claimed_at: data["claimedAt"].nil? ? nil : Time.iso8601(data["claimedAt"]),
|
|
6719
|
+
poll_interval: data["pollInterval"],
|
|
6720
|
+
)
|
|
6721
|
+
end
|
|
6722
|
+
|
|
6723
|
+
def to_h
|
|
6724
|
+
{
|
|
6725
|
+
workspace_id: Util.plain(@workspace_id),
|
|
6726
|
+
state: Util.plain(@state),
|
|
6727
|
+
expires_at: Util.plain(@expires_at),
|
|
6728
|
+
claimed_at: Util.plain(@claimed_at),
|
|
6729
|
+
poll_interval: Util.plain(@poll_interval),
|
|
6730
|
+
}.reject { |_k, v| v.nil? }
|
|
6731
|
+
end
|
|
6732
|
+
end
|
|
6733
|
+
|
|
6734
|
+
TenantState = ["STATE_UNSPECIFIED", "STATE_ACTIVE", "STATE_ERASING"].freeze
|
|
6735
|
+
|
|
6736
|
+
class Tenant
|
|
6737
|
+
attr_reader :metadata, :info, :state
|
|
6738
|
+
|
|
6739
|
+
def initialize(metadata: nil, info: nil, state: nil)
|
|
6740
|
+
@metadata = metadata
|
|
6741
|
+
@info = info
|
|
6742
|
+
@state = state
|
|
6743
|
+
end
|
|
6744
|
+
|
|
6745
|
+
def self.from_json(data)
|
|
6746
|
+
new(
|
|
6747
|
+
metadata: data["metadata"].nil? ? nil : Types::ResourceMetadata.from_json(data["metadata"]),
|
|
6748
|
+
info: data["info"].nil? ? nil : Types::TenantInfo.from_json(data["info"]),
|
|
6749
|
+
state: data["state"],
|
|
6750
|
+
)
|
|
6751
|
+
end
|
|
6752
|
+
|
|
6753
|
+
def to_h
|
|
6754
|
+
{
|
|
6755
|
+
metadata: Util.plain(@metadata),
|
|
6756
|
+
info: Util.plain(@info),
|
|
6757
|
+
state: Util.plain(@state),
|
|
6758
|
+
}.reject { |_k, v| v.nil? }
|
|
6759
|
+
end
|
|
6760
|
+
end
|
|
6761
|
+
|
|
6762
|
+
class TenantAssertion
|
|
6763
|
+
attr_reader :id, :name
|
|
6764
|
+
|
|
6765
|
+
def initialize(id: nil, name: nil)
|
|
6766
|
+
@id = id
|
|
6767
|
+
@name = name
|
|
6768
|
+
end
|
|
6769
|
+
|
|
6770
|
+
def self.from_json(data)
|
|
6771
|
+
new(
|
|
6772
|
+
id: data["id"],
|
|
6773
|
+
name: data["name"],
|
|
6774
|
+
)
|
|
6722
6775
|
end
|
|
6723
6776
|
|
|
6724
6777
|
def to_h
|
|
@@ -6844,6 +6897,35 @@ module Cadenya
|
|
|
6844
6897
|
end
|
|
6845
6898
|
end
|
|
6846
6899
|
|
|
6900
|
+
class ToolActions
|
|
6901
|
+
attr_reader :parameter_actions, :result_actions, :widget_argument_exposure, :auto_mode
|
|
6902
|
+
|
|
6903
|
+
def initialize(parameter_actions: nil, result_actions: nil, widget_argument_exposure: nil, auto_mode: nil)
|
|
6904
|
+
@parameter_actions = parameter_actions
|
|
6905
|
+
@result_actions = result_actions
|
|
6906
|
+
@widget_argument_exposure = widget_argument_exposure
|
|
6907
|
+
@auto_mode = auto_mode
|
|
6908
|
+
end
|
|
6909
|
+
|
|
6910
|
+
def self.from_json(data)
|
|
6911
|
+
new(
|
|
6912
|
+
parameter_actions: data["parameterActions"].nil? ? nil : (data["parameterActions"]).map { |item| Types.decode_ToolParameterAction(item) },
|
|
6913
|
+
result_actions: data["resultActions"].nil? ? nil : (data["resultActions"]).map { |item| Types.decode_ToolResultAction(item) },
|
|
6914
|
+
widget_argument_exposure: data["widgetArgumentExposure"].nil? ? nil : Types::ToolWidgetArgumentExposure.from_json(data["widgetArgumentExposure"]),
|
|
6915
|
+
auto_mode: data["autoMode"].nil? ? nil : Types::AutoModeConfig.from_json(data["autoMode"]),
|
|
6916
|
+
)
|
|
6917
|
+
end
|
|
6918
|
+
|
|
6919
|
+
def to_h
|
|
6920
|
+
{
|
|
6921
|
+
parameter_actions: Util.plain(@parameter_actions),
|
|
6922
|
+
result_actions: Util.plain(@result_actions),
|
|
6923
|
+
widget_argument_exposure: Util.plain(@widget_argument_exposure),
|
|
6924
|
+
auto_mode: Util.plain(@auto_mode),
|
|
6925
|
+
}.reject { |_k, v| v.nil? }
|
|
6926
|
+
end
|
|
6927
|
+
end
|
|
6928
|
+
|
|
6847
6929
|
class ToolApprovalRequested
|
|
6848
6930
|
attr_reader :tool_call_id, :tool, :llm_tool_name, :arguments
|
|
6849
6931
|
|
|
@@ -7012,6 +7094,174 @@ module Cadenya
|
|
|
7012
7094
|
end
|
|
7013
7095
|
end
|
|
7014
7096
|
|
|
7097
|
+
class ToolEffective
|
|
7098
|
+
attr_reader :parameters, :parameter_actions, :result_actions, :auto_mode, :widget_argument_exposure, :requires_approval, :rule_errors
|
|
7099
|
+
|
|
7100
|
+
def initialize(parameters: nil, parameter_actions: nil, result_actions: nil, auto_mode: nil, widget_argument_exposure: nil, requires_approval: nil, rule_errors: nil)
|
|
7101
|
+
@parameters = parameters
|
|
7102
|
+
@parameter_actions = parameter_actions
|
|
7103
|
+
@result_actions = result_actions
|
|
7104
|
+
@auto_mode = auto_mode
|
|
7105
|
+
@widget_argument_exposure = widget_argument_exposure
|
|
7106
|
+
@requires_approval = requires_approval
|
|
7107
|
+
@rule_errors = rule_errors
|
|
7108
|
+
end
|
|
7109
|
+
|
|
7110
|
+
def self.from_json(data)
|
|
7111
|
+
new(
|
|
7112
|
+
parameters: data["parameters"],
|
|
7113
|
+
parameter_actions: data["parameterActions"].nil? ? nil : (data["parameterActions"]).map { |item| Types::ToolEffective_ParameterAction.from_json(item) },
|
|
7114
|
+
result_actions: data["resultActions"].nil? ? nil : (data["resultActions"]).map { |item| Types::ToolEffective_ResultAction.from_json(item) },
|
|
7115
|
+
auto_mode: data["autoMode"].nil? ? nil : Types::ToolEffective_AutoMode.from_json(data["autoMode"]),
|
|
7116
|
+
widget_argument_exposure: data["widgetArgumentExposure"].nil? ? nil : Types::ToolEffective_WidgetArgumentExposure.from_json(data["widgetArgumentExposure"]),
|
|
7117
|
+
requires_approval: data["requiresApproval"],
|
|
7118
|
+
rule_errors: data["ruleErrors"].nil? ? nil : (data["ruleErrors"]).map { |item| Types::ToolEffective_RuleError.from_json(item) },
|
|
7119
|
+
)
|
|
7120
|
+
end
|
|
7121
|
+
|
|
7122
|
+
def to_h
|
|
7123
|
+
{
|
|
7124
|
+
parameters: Util.plain(@parameters),
|
|
7125
|
+
parameter_actions: Util.plain(@parameter_actions),
|
|
7126
|
+
result_actions: Util.plain(@result_actions),
|
|
7127
|
+
auto_mode: Util.plain(@auto_mode),
|
|
7128
|
+
widget_argument_exposure: Util.plain(@widget_argument_exposure),
|
|
7129
|
+
requires_approval: Util.plain(@requires_approval),
|
|
7130
|
+
rule_errors: Util.plain(@rule_errors),
|
|
7131
|
+
}.reject { |_k, v| v.nil? }
|
|
7132
|
+
end
|
|
7133
|
+
end
|
|
7134
|
+
|
|
7135
|
+
class ToolEffective_AutoMode
|
|
7136
|
+
attr_reader :config, :source
|
|
7137
|
+
|
|
7138
|
+
def initialize(config: nil, source: nil)
|
|
7139
|
+
@config = config
|
|
7140
|
+
@source = source
|
|
7141
|
+
end
|
|
7142
|
+
|
|
7143
|
+
def self.from_json(data)
|
|
7144
|
+
new(
|
|
7145
|
+
config: data["config"].nil? ? nil : Types::AutoModeConfig.from_json(data["config"]),
|
|
7146
|
+
source: data["source"].nil? ? nil : Types.decode_ToolEffective_Source(data["source"]),
|
|
7147
|
+
)
|
|
7148
|
+
end
|
|
7149
|
+
|
|
7150
|
+
def to_h
|
|
7151
|
+
{
|
|
7152
|
+
config: Util.plain(@config),
|
|
7153
|
+
source: Util.plain(@source),
|
|
7154
|
+
}.reject { |_k, v| v.nil? }
|
|
7155
|
+
end
|
|
7156
|
+
end
|
|
7157
|
+
|
|
7158
|
+
class ToolEffective_ParameterAction
|
|
7159
|
+
attr_reader :action, :source
|
|
7160
|
+
|
|
7161
|
+
def initialize(action: nil, source: nil)
|
|
7162
|
+
@action = action
|
|
7163
|
+
@source = source
|
|
7164
|
+
end
|
|
7165
|
+
|
|
7166
|
+
def self.from_json(data)
|
|
7167
|
+
new(
|
|
7168
|
+
action: data["action"].nil? ? nil : Types.decode_ToolParameterAction(data["action"]),
|
|
7169
|
+
source: data["source"].nil? ? nil : Types.decode_ToolEffective_Source(data["source"]),
|
|
7170
|
+
)
|
|
7171
|
+
end
|
|
7172
|
+
|
|
7173
|
+
def to_h
|
|
7174
|
+
{
|
|
7175
|
+
action: Util.plain(@action),
|
|
7176
|
+
source: Util.plain(@source),
|
|
7177
|
+
}.reject { |_k, v| v.nil? }
|
|
7178
|
+
end
|
|
7179
|
+
end
|
|
7180
|
+
|
|
7181
|
+
class ToolEffective_ResultAction
|
|
7182
|
+
attr_reader :action, :source
|
|
7183
|
+
|
|
7184
|
+
def initialize(action: nil, source: nil)
|
|
7185
|
+
@action = action
|
|
7186
|
+
@source = source
|
|
7187
|
+
end
|
|
7188
|
+
|
|
7189
|
+
def self.from_json(data)
|
|
7190
|
+
new(
|
|
7191
|
+
action: data["action"].nil? ? nil : Types.decode_ToolResultAction(data["action"]),
|
|
7192
|
+
source: data["source"].nil? ? nil : Types.decode_ToolEffective_Source(data["source"]),
|
|
7193
|
+
)
|
|
7194
|
+
end
|
|
7195
|
+
|
|
7196
|
+
def to_h
|
|
7197
|
+
{
|
|
7198
|
+
action: Util.plain(@action),
|
|
7199
|
+
source: Util.plain(@source),
|
|
7200
|
+
}.reject { |_k, v| v.nil? }
|
|
7201
|
+
end
|
|
7202
|
+
end
|
|
7203
|
+
|
|
7204
|
+
class ToolEffective_RuleError
|
|
7205
|
+
attr_reader :rule, :message, :applied
|
|
7206
|
+
|
|
7207
|
+
def initialize(rule: nil, message: nil, applied: nil)
|
|
7208
|
+
@rule = rule
|
|
7209
|
+
@message = message
|
|
7210
|
+
@applied = applied
|
|
7211
|
+
end
|
|
7212
|
+
|
|
7213
|
+
def self.from_json(data)
|
|
7214
|
+
new(
|
|
7215
|
+
rule: data["rule"].nil? ? nil : Types::Source_Rule.from_json(data["rule"]),
|
|
7216
|
+
message: data["message"],
|
|
7217
|
+
applied: data["applied"],
|
|
7218
|
+
)
|
|
7219
|
+
end
|
|
7220
|
+
|
|
7221
|
+
def to_h
|
|
7222
|
+
{
|
|
7223
|
+
rule: Util.plain(@rule),
|
|
7224
|
+
message: Util.plain(@message),
|
|
7225
|
+
applied: Util.plain(@applied),
|
|
7226
|
+
}.reject { |_k, v| v.nil? }
|
|
7227
|
+
end
|
|
7228
|
+
end
|
|
7229
|
+
|
|
7230
|
+
def self.decode_ToolEffective_Source(data)
|
|
7231
|
+
return nil if data.nil? || data["type"].to_s.empty?
|
|
7232
|
+
case data["type"]
|
|
7233
|
+
when "rule"
|
|
7234
|
+
Types::ToolEffective_Source_Rule.from_json(data)
|
|
7235
|
+
when "tool"
|
|
7236
|
+
Types::ToolEffective_Source_Tool.from_json(data)
|
|
7237
|
+
else
|
|
7238
|
+
raise ArgumentError, "ToolEffective_Source: unknown type #{data["type"].inspect}"
|
|
7239
|
+
end
|
|
7240
|
+
end
|
|
7241
|
+
|
|
7242
|
+
class ToolEffective_WidgetArgumentExposure
|
|
7243
|
+
attr_reader :enabled, :source
|
|
7244
|
+
|
|
7245
|
+
def initialize(enabled: nil, source: nil)
|
|
7246
|
+
@enabled = enabled
|
|
7247
|
+
@source = source
|
|
7248
|
+
end
|
|
7249
|
+
|
|
7250
|
+
def self.from_json(data)
|
|
7251
|
+
new(
|
|
7252
|
+
enabled: data["enabled"],
|
|
7253
|
+
source: data["source"].nil? ? nil : Types.decode_ToolEffective_Source(data["source"]),
|
|
7254
|
+
)
|
|
7255
|
+
end
|
|
7256
|
+
|
|
7257
|
+
def to_h
|
|
7258
|
+
{
|
|
7259
|
+
enabled: Util.plain(@enabled),
|
|
7260
|
+
source: Util.plain(@source),
|
|
7261
|
+
}.reject { |_k, v| v.nil? }
|
|
7262
|
+
end
|
|
7263
|
+
end
|
|
7264
|
+
|
|
7015
7265
|
class ToolError
|
|
7016
7266
|
attr_reader :tool_call_id, :message, :tool, :llm_tool_name
|
|
7017
7267
|
|
|
@@ -7042,14 +7292,13 @@ module Cadenya
|
|
|
7042
7292
|
end
|
|
7043
7293
|
|
|
7044
7294
|
class ToolInfo
|
|
7045
|
-
attr_reader :tool_set, :created_by, :signature, :
|
|
7295
|
+
attr_reader :tool_set, :created_by, :signature, :effective
|
|
7046
7296
|
|
|
7047
|
-
def initialize(tool_set: nil, created_by: nil, signature: nil,
|
|
7297
|
+
def initialize(tool_set: nil, created_by: nil, signature: nil, effective: nil)
|
|
7048
7298
|
@tool_set = tool_set
|
|
7049
7299
|
@created_by = created_by
|
|
7050
7300
|
@signature = signature
|
|
7051
|
-
@
|
|
7052
|
-
@effective_parameters = effective_parameters
|
|
7301
|
+
@effective = effective
|
|
7053
7302
|
end
|
|
7054
7303
|
|
|
7055
7304
|
def self.from_json(data)
|
|
@@ -7057,8 +7306,7 @@ module Cadenya
|
|
|
7057
7306
|
tool_set: data["toolSet"].nil? ? nil : Types::ResourceMetadata.from_json(data["toolSet"]),
|
|
7058
7307
|
created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
|
|
7059
7308
|
signature: data["signature"],
|
|
7060
|
-
|
|
7061
|
-
effective_parameters: data["effectiveParameters"],
|
|
7309
|
+
effective: data["effective"].nil? ? nil : Types::ToolEffective.from_json(data["effective"]),
|
|
7062
7310
|
)
|
|
7063
7311
|
end
|
|
7064
7312
|
|
|
@@ -7067,65 +7315,54 @@ module Cadenya
|
|
|
7067
7315
|
tool_set: Util.plain(@tool_set),
|
|
7068
7316
|
created_by: Util.plain(@created_by),
|
|
7069
7317
|
signature: Util.plain(@signature),
|
|
7070
|
-
|
|
7071
|
-
effective_parameters: Util.plain(@effective_parameters),
|
|
7318
|
+
effective: Util.plain(@effective),
|
|
7072
7319
|
}.reject { |_k, v| v.nil? }
|
|
7073
7320
|
end
|
|
7074
7321
|
end
|
|
7075
7322
|
|
|
7076
|
-
|
|
7077
|
-
|
|
7323
|
+
def self.decode_ToolParameterAction(data)
|
|
7324
|
+
return nil if data.nil? || data["type"].to_s.empty?
|
|
7325
|
+
case data["type"]
|
|
7326
|
+
when "remove"
|
|
7327
|
+
Types::ToolParameterAction_RemoveVariant.from_json(data)
|
|
7328
|
+
when "set"
|
|
7329
|
+
Types::ToolParameterAction_SetVariant.from_json(data)
|
|
7330
|
+
when "pin"
|
|
7331
|
+
Types::ToolParameterAction_PinVariant.from_json(data)
|
|
7332
|
+
else
|
|
7333
|
+
raise ArgumentError, "ToolParameterAction: unknown type #{data["type"].inspect}"
|
|
7334
|
+
end
|
|
7335
|
+
end
|
|
7078
7336
|
|
|
7079
|
-
|
|
7080
|
-
|
|
7081
|
-
|
|
7082
|
-
|
|
7083
|
-
|
|
7084
|
-
|
|
7085
|
-
@
|
|
7086
|
-
@
|
|
7337
|
+
ToolParameterActionPinOnMissing = ["ON_MISSING_UNSPECIFIED", "ON_MISSING_FAIL", "ON_MISSING_SKIP"].freeze
|
|
7338
|
+
|
|
7339
|
+
class ToolParameterAction_Pin
|
|
7340
|
+
attr_reader :path, :pinned_parameter, :on_missing
|
|
7341
|
+
|
|
7342
|
+
def initialize(path: nil, pinned_parameter: nil, on_missing: nil)
|
|
7343
|
+
@path = path
|
|
7344
|
+
@pinned_parameter = pinned_parameter
|
|
7345
|
+
@on_missing = on_missing
|
|
7087
7346
|
end
|
|
7088
7347
|
|
|
7089
7348
|
def self.from_json(data)
|
|
7090
7349
|
new(
|
|
7091
|
-
|
|
7092
|
-
|
|
7093
|
-
|
|
7094
|
-
result_actions: data["resultActions"].nil? ? nil : (data["resultActions"]).map { |item| Types.decode_ToolOverlay_ResultAction(item) },
|
|
7095
|
-
disabled: data["disabled"],
|
|
7096
|
-
widget_argument_exposure: data["widgetArgumentExposure"].nil? ? nil : Types::ToolOverlay_WidgetArgumentExposure.from_json(data["widgetArgumentExposure"]),
|
|
7097
|
-
auto_mode: data["autoMode"].nil? ? nil : Types::AutoModeConfig.from_json(data["autoMode"]),
|
|
7350
|
+
path: data["path"],
|
|
7351
|
+
pinned_parameter: data["pinnedParameter"],
|
|
7352
|
+
on_missing: data["onMissing"],
|
|
7098
7353
|
)
|
|
7099
7354
|
end
|
|
7100
7355
|
|
|
7101
7356
|
def to_h
|
|
7102
7357
|
{
|
|
7103
|
-
|
|
7104
|
-
|
|
7105
|
-
|
|
7106
|
-
result_actions: Util.plain(@result_actions),
|
|
7107
|
-
disabled: Util.plain(@disabled),
|
|
7108
|
-
widget_argument_exposure: Util.plain(@widget_argument_exposure),
|
|
7109
|
-
auto_mode: Util.plain(@auto_mode),
|
|
7358
|
+
path: Util.plain(@path),
|
|
7359
|
+
pinned_parameter: Util.plain(@pinned_parameter),
|
|
7360
|
+
on_missing: Util.plain(@on_missing),
|
|
7110
7361
|
}.reject { |_k, v| v.nil? }
|
|
7111
7362
|
end
|
|
7112
7363
|
end
|
|
7113
7364
|
|
|
7114
|
-
|
|
7115
|
-
return nil if data.nil? || data["type"].to_s.empty?
|
|
7116
|
-
case data["type"]
|
|
7117
|
-
when "remove"
|
|
7118
|
-
Types::ToolOverlay_ParameterAction_Remove.from_json(data)
|
|
7119
|
-
when "set"
|
|
7120
|
-
Types::ToolOverlay_ParameterAction_Set.from_json(data)
|
|
7121
|
-
when "pin"
|
|
7122
|
-
Types::ToolOverlay_ParameterAction_Pin.from_json(data)
|
|
7123
|
-
else
|
|
7124
|
-
raise ArgumentError, "ToolOverlay_ParameterAction: unknown type #{data["type"].inspect}"
|
|
7125
|
-
end
|
|
7126
|
-
end
|
|
7127
|
-
|
|
7128
|
-
class ToolOverlay_ParameterPath
|
|
7365
|
+
class ToolParameterAction_Remove
|
|
7129
7366
|
attr_reader :path
|
|
7130
7367
|
|
|
7131
7368
|
def initialize(path: nil)
|
|
@@ -7145,86 +7382,136 @@ module Cadenya
|
|
|
7145
7382
|
end
|
|
7146
7383
|
end
|
|
7147
7384
|
|
|
7148
|
-
|
|
7149
|
-
|
|
7150
|
-
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7385
|
+
class ToolParameterAction_Set
|
|
7386
|
+
attr_reader :path, :value_template
|
|
7387
|
+
|
|
7388
|
+
def initialize(path: nil, value_template: nil)
|
|
7389
|
+
@path = path
|
|
7390
|
+
@value_template = value_template
|
|
7391
|
+
end
|
|
7392
|
+
|
|
7393
|
+
def self.from_json(data)
|
|
7394
|
+
new(
|
|
7395
|
+
path: data["path"],
|
|
7396
|
+
value_template: data["valueTemplate"],
|
|
7397
|
+
)
|
|
7155
7398
|
end
|
|
7156
|
-
end
|
|
7157
7399
|
|
|
7158
|
-
|
|
7400
|
+
def to_h
|
|
7401
|
+
{
|
|
7402
|
+
path: Util.plain(@path),
|
|
7403
|
+
value_template: Util.plain(@value_template),
|
|
7404
|
+
}.reject { |_k, v| v.nil? }
|
|
7405
|
+
end
|
|
7406
|
+
end
|
|
7159
7407
|
|
|
7160
|
-
class
|
|
7161
|
-
attr_reader :
|
|
7408
|
+
class ToolResult
|
|
7409
|
+
attr_reader :tool_call_id, :result, :tool, :llm_tool_name
|
|
7162
7410
|
|
|
7163
|
-
def initialize(
|
|
7164
|
-
@
|
|
7165
|
-
@
|
|
7411
|
+
def initialize(tool_call_id: nil, result: nil, tool: nil, llm_tool_name: nil)
|
|
7412
|
+
@tool_call_id = tool_call_id
|
|
7413
|
+
@result = result
|
|
7414
|
+
@tool = tool
|
|
7415
|
+
@llm_tool_name = llm_tool_name
|
|
7166
7416
|
end
|
|
7167
7417
|
|
|
7168
7418
|
def self.from_json(data)
|
|
7169
7419
|
new(
|
|
7170
|
-
|
|
7171
|
-
|
|
7420
|
+
tool_call_id: data["toolCallId"],
|
|
7421
|
+
result: data["result"].nil? ? nil : Types::ObjectiveToolCallResult.from_json(data["result"]),
|
|
7422
|
+
tool: data["tool"].nil? ? nil : Types.decode_CallableTool(data["tool"]),
|
|
7423
|
+
llm_tool_name: data["llmToolName"],
|
|
7172
7424
|
)
|
|
7173
7425
|
end
|
|
7174
7426
|
|
|
7175
7427
|
def to_h
|
|
7176
7428
|
{
|
|
7177
|
-
|
|
7178
|
-
|
|
7429
|
+
tool_call_id: Util.plain(@tool_call_id),
|
|
7430
|
+
result: Util.plain(@result),
|
|
7431
|
+
tool: Util.plain(@tool),
|
|
7432
|
+
llm_tool_name: Util.plain(@llm_tool_name),
|
|
7179
7433
|
}.reject { |_k, v| v.nil? }
|
|
7180
7434
|
end
|
|
7181
7435
|
end
|
|
7182
7436
|
|
|
7183
|
-
|
|
7184
|
-
|
|
7437
|
+
def self.decode_ToolResultAction(data)
|
|
7438
|
+
return nil if data.nil? || data["type"].to_s.empty?
|
|
7439
|
+
case data["type"]
|
|
7440
|
+
when "transform"
|
|
7441
|
+
Types::ToolResultAction_TransformVariant.from_json(data)
|
|
7442
|
+
else
|
|
7443
|
+
raise ArgumentError, "ToolResultAction: unknown type #{data["type"].inspect}"
|
|
7444
|
+
end
|
|
7445
|
+
end
|
|
7185
7446
|
|
|
7186
|
-
|
|
7187
|
-
|
|
7447
|
+
ToolResultActionTransformOnError = ["ON_ERROR_UNSPECIFIED", "ON_ERROR_RAW_CONTENT", "ON_ERROR_FAIL"].freeze
|
|
7448
|
+
|
|
7449
|
+
class ToolResultAction_Transform
|
|
7450
|
+
attr_reader :content_template, :on_error, :expect_json
|
|
7451
|
+
|
|
7452
|
+
def initialize(content_template: nil, on_error: nil, expect_json: nil)
|
|
7453
|
+
@content_template = content_template
|
|
7454
|
+
@on_error = on_error
|
|
7455
|
+
@expect_json = expect_json
|
|
7188
7456
|
end
|
|
7189
7457
|
|
|
7190
7458
|
def self.from_json(data)
|
|
7191
7459
|
new(
|
|
7192
|
-
|
|
7460
|
+
content_template: data["contentTemplate"],
|
|
7461
|
+
on_error: data["onError"],
|
|
7462
|
+
expect_json: data["expectJson"],
|
|
7193
7463
|
)
|
|
7194
7464
|
end
|
|
7195
7465
|
|
|
7196
7466
|
def to_h
|
|
7197
7467
|
{
|
|
7198
|
-
|
|
7468
|
+
content_template: Util.plain(@content_template),
|
|
7469
|
+
on_error: Util.plain(@on_error),
|
|
7470
|
+
expect_json: Util.plain(@expect_json),
|
|
7199
7471
|
}.reject { |_k, v| v.nil? }
|
|
7200
7472
|
end
|
|
7201
7473
|
end
|
|
7202
7474
|
|
|
7203
|
-
class
|
|
7204
|
-
attr_reader :
|
|
7475
|
+
class ToolRule
|
|
7476
|
+
attr_reader :id, :name, :description, :when_, :actions, :disabled, :position, :created_at, :updated_at
|
|
7205
7477
|
|
|
7206
|
-
def initialize(
|
|
7207
|
-
@
|
|
7208
|
-
@
|
|
7209
|
-
@
|
|
7210
|
-
@
|
|
7478
|
+
def initialize(id: nil, name: nil, description: nil, when_: nil, actions: nil, disabled: nil, position: nil, created_at: nil, updated_at: nil)
|
|
7479
|
+
@id = id
|
|
7480
|
+
@name = name
|
|
7481
|
+
@description = description
|
|
7482
|
+
@when_ = when_
|
|
7483
|
+
@actions = actions
|
|
7484
|
+
@disabled = disabled
|
|
7485
|
+
@position = position
|
|
7486
|
+
@created_at = created_at
|
|
7487
|
+
@updated_at = updated_at
|
|
7211
7488
|
end
|
|
7212
7489
|
|
|
7213
7490
|
def self.from_json(data)
|
|
7214
7491
|
new(
|
|
7215
|
-
|
|
7216
|
-
|
|
7217
|
-
|
|
7218
|
-
|
|
7492
|
+
id: data["id"],
|
|
7493
|
+
name: data["name"],
|
|
7494
|
+
description: data["description"],
|
|
7495
|
+
when_: data["when"],
|
|
7496
|
+
actions: data["actions"].nil? ? nil : Types::ToolActions.from_json(data["actions"]),
|
|
7497
|
+
disabled: data["disabled"],
|
|
7498
|
+
position: data["position"],
|
|
7499
|
+
created_at: data["createdAt"].nil? ? nil : Time.iso8601(data["createdAt"]),
|
|
7500
|
+
updated_at: data["updatedAt"].nil? ? nil : Time.iso8601(data["updatedAt"]),
|
|
7219
7501
|
)
|
|
7220
7502
|
end
|
|
7221
7503
|
|
|
7222
7504
|
def to_h
|
|
7223
7505
|
{
|
|
7224
|
-
|
|
7225
|
-
|
|
7226
|
-
|
|
7227
|
-
|
|
7506
|
+
id: Util.plain(@id),
|
|
7507
|
+
name: Util.plain(@name),
|
|
7508
|
+
description: Util.plain(@description),
|
|
7509
|
+
when_: Util.plain(@when_),
|
|
7510
|
+
actions: Util.plain(@actions),
|
|
7511
|
+
disabled: Util.plain(@disabled),
|
|
7512
|
+
position: Util.plain(@position),
|
|
7513
|
+
created_at: Util.plain(@created_at),
|
|
7514
|
+
updated_at: Util.plain(@updated_at),
|
|
7228
7515
|
}.reject { |_k, v| v.nil? }
|
|
7229
7516
|
end
|
|
7230
7517
|
end
|
|
@@ -7510,6 +7797,8 @@ module Cadenya
|
|
|
7510
7797
|
Types::ToolSetEventData_SyncCompleted.from_json(data)
|
|
7511
7798
|
when "syncFailed"
|
|
7512
7799
|
Types::ToolSetEventData_SyncFailed.from_json(data)
|
|
7800
|
+
when "syncDisabled"
|
|
7801
|
+
Types::ToolSetEventData_SyncDisabled.from_json(data)
|
|
7513
7802
|
else
|
|
7514
7803
|
raise ArgumentError, "ToolSetEventData: unknown type #{data["type"].inspect}"
|
|
7515
7804
|
end
|
|
@@ -7539,15 +7828,18 @@ module Cadenya
|
|
|
7539
7828
|
end
|
|
7540
7829
|
|
|
7541
7830
|
class ToolSetInfo
|
|
7542
|
-
attr_reader :tool_count, :agent_count, :last_sync, :created_by, :available_tools, :omitted_tools
|
|
7831
|
+
attr_reader :tool_count, :agent_count, :last_sync, :created_by, :available_tools, :omitted_tools, :sync_disabled, :consecutive_failure_count, :last_sync_error
|
|
7543
7832
|
|
|
7544
|
-
def initialize(tool_count: nil, agent_count: nil, last_sync: nil, created_by: nil, available_tools: nil, omitted_tools: nil)
|
|
7833
|
+
def initialize(tool_count: nil, agent_count: nil, last_sync: nil, created_by: nil, available_tools: nil, omitted_tools: nil, sync_disabled: nil, consecutive_failure_count: nil, last_sync_error: nil)
|
|
7545
7834
|
@tool_count = tool_count
|
|
7546
7835
|
@agent_count = agent_count
|
|
7547
7836
|
@last_sync = last_sync
|
|
7548
7837
|
@created_by = created_by
|
|
7549
7838
|
@available_tools = available_tools
|
|
7550
7839
|
@omitted_tools = omitted_tools
|
|
7840
|
+
@sync_disabled = sync_disabled
|
|
7841
|
+
@consecutive_failure_count = consecutive_failure_count
|
|
7842
|
+
@last_sync_error = last_sync_error
|
|
7551
7843
|
end
|
|
7552
7844
|
|
|
7553
7845
|
def self.from_json(data)
|
|
@@ -7558,6 +7850,9 @@ module Cadenya
|
|
|
7558
7850
|
created_by: data["createdBy"].nil? ? nil : Types::Profile.from_json(data["createdBy"]),
|
|
7559
7851
|
available_tools: data["availableTools"],
|
|
7560
7852
|
omitted_tools: data["omittedTools"],
|
|
7853
|
+
sync_disabled: data["syncDisabled"],
|
|
7854
|
+
consecutive_failure_count: data["consecutiveFailureCount"],
|
|
7855
|
+
last_sync_error: data["lastSyncError"],
|
|
7561
7856
|
)
|
|
7562
7857
|
end
|
|
7563
7858
|
|
|
@@ -7569,6 +7864,9 @@ module Cadenya
|
|
|
7569
7864
|
created_by: Util.plain(@created_by),
|
|
7570
7865
|
available_tools: Util.plain(@available_tools),
|
|
7571
7866
|
omitted_tools: Util.plain(@omitted_tools),
|
|
7867
|
+
sync_disabled: Util.plain(@sync_disabled),
|
|
7868
|
+
consecutive_failure_count: Util.plain(@consecutive_failure_count),
|
|
7869
|
+
last_sync_error: Util.plain(@last_sync_error),
|
|
7572
7870
|
}.reject { |_k, v| v.nil? }
|
|
7573
7871
|
end
|
|
7574
7872
|
end
|
|
@@ -7643,12 +7941,11 @@ module Cadenya
|
|
|
7643
7941
|
end
|
|
7644
7942
|
|
|
7645
7943
|
class ToolSetSpec
|
|
7646
|
-
attr_reader :description, :adapter, :
|
|
7944
|
+
attr_reader :description, :adapter, :secrets
|
|
7647
7945
|
|
|
7648
|
-
def initialize(description: nil, adapter: nil,
|
|
7946
|
+
def initialize(description: nil, adapter: nil, secrets: nil)
|
|
7649
7947
|
@description = description
|
|
7650
7948
|
@adapter = adapter
|
|
7651
|
-
@overlays = overlays
|
|
7652
7949
|
@secrets = secrets
|
|
7653
7950
|
end
|
|
7654
7951
|
|
|
@@ -7656,7 +7953,6 @@ module Cadenya
|
|
|
7656
7953
|
new(
|
|
7657
7954
|
description: data["description"],
|
|
7658
7955
|
adapter: data["adapter"].nil? ? nil : Types.decode_ToolSetAdapter(data["adapter"]),
|
|
7659
|
-
overlays: data["overlays"].nil? ? nil : (data["overlays"]).map { |item| Types::ToolOverlay.from_json(item) },
|
|
7660
7956
|
secrets: data["secrets"].nil? ? nil : (data["secrets"]).map { |item| Types::ToolSetSpec_Secret.from_json(item) },
|
|
7661
7957
|
)
|
|
7662
7958
|
end
|
|
@@ -7665,7 +7961,6 @@ module Cadenya
|
|
|
7665
7961
|
{
|
|
7666
7962
|
description: Util.plain(@description),
|
|
7667
7963
|
adapter: Util.plain(@adapter),
|
|
7668
|
-
overlays: Util.plain(@overlays),
|
|
7669
7964
|
secrets: Util.plain(@secrets),
|
|
7670
7965
|
}.reject { |_k, v| v.nil? }
|
|
7671
7966
|
end
|
|
@@ -7724,14 +8019,15 @@ module Cadenya
|
|
|
7724
8019
|
end
|
|
7725
8020
|
|
|
7726
8021
|
class ToolSpec
|
|
7727
|
-
attr_reader :description, :requires_approval, :parameters, :config, :llm_tool_name
|
|
8022
|
+
attr_reader :description, :requires_approval, :parameters, :config, :llm_tool_name, :actions
|
|
7728
8023
|
|
|
7729
|
-
def initialize(description: nil, requires_approval: nil, parameters: nil, config: nil, llm_tool_name: nil)
|
|
8024
|
+
def initialize(description: nil, requires_approval: nil, parameters: nil, config: nil, llm_tool_name: nil, actions: nil)
|
|
7730
8025
|
@description = description
|
|
7731
8026
|
@requires_approval = requires_approval
|
|
7732
8027
|
@parameters = parameters
|
|
7733
8028
|
@config = config
|
|
7734
8029
|
@llm_tool_name = llm_tool_name
|
|
8030
|
+
@actions = actions
|
|
7735
8031
|
end
|
|
7736
8032
|
|
|
7737
8033
|
def self.from_json(data)
|
|
@@ -7741,6 +8037,7 @@ module Cadenya
|
|
|
7741
8037
|
parameters: data["parameters"],
|
|
7742
8038
|
config: data["config"].nil? ? nil : Types.decode_ToolSpec_Config(data["config"]),
|
|
7743
8039
|
llm_tool_name: data["llmToolName"],
|
|
8040
|
+
actions: data["actions"].nil? ? nil : Types::ToolActions.from_json(data["actions"]),
|
|
7744
8041
|
)
|
|
7745
8042
|
end
|
|
7746
8043
|
|
|
@@ -7751,6 +8048,7 @@ module Cadenya
|
|
|
7751
8048
|
parameters: Util.plain(@parameters),
|
|
7752
8049
|
config: Util.plain(@config),
|
|
7753
8050
|
llm_tool_name: Util.plain(@llm_tool_name),
|
|
8051
|
+
actions: Util.plain(@actions),
|
|
7754
8052
|
}.reject { |_k, v| v.nil? }
|
|
7755
8053
|
end
|
|
7756
8054
|
end
|
|
@@ -7771,6 +8069,26 @@ module Cadenya
|
|
|
7771
8069
|
end
|
|
7772
8070
|
end
|
|
7773
8071
|
|
|
8072
|
+
class ToolWidgetArgumentExposure
|
|
8073
|
+
attr_reader :enabled
|
|
8074
|
+
|
|
8075
|
+
def initialize(enabled: nil)
|
|
8076
|
+
@enabled = enabled
|
|
8077
|
+
end
|
|
8078
|
+
|
|
8079
|
+
def self.from_json(data)
|
|
8080
|
+
new(
|
|
8081
|
+
enabled: data["enabled"],
|
|
8082
|
+
)
|
|
8083
|
+
end
|
|
8084
|
+
|
|
8085
|
+
def to_h
|
|
8086
|
+
{
|
|
8087
|
+
enabled: Util.plain(@enabled),
|
|
8088
|
+
}.reject { |_k, v| v.nil? }
|
|
8089
|
+
end
|
|
8090
|
+
end
|
|
8091
|
+
|
|
7774
8092
|
class TrustedEndpoint
|
|
7775
8093
|
attr_reader :metadata, :spec, :info
|
|
7776
8094
|
|
|
@@ -8403,6 +8721,53 @@ module Cadenya
|
|
|
8403
8721
|
end
|
|
8404
8722
|
end
|
|
8405
8723
|
|
|
8724
|
+
class UpdateToolSetRuleRequest
|
|
8725
|
+
attr_reader :workspace_id, :tool_set_id, :id, :name, :description, :when_, :actions, :disabled, :position, :update_mask
|
|
8726
|
+
|
|
8727
|
+
def initialize(workspace_id: nil, tool_set_id: nil, id: nil, name: nil, description: nil, when_: nil, actions: nil, disabled: nil, position: nil, update_mask: nil)
|
|
8728
|
+
@workspace_id = workspace_id
|
|
8729
|
+
@tool_set_id = tool_set_id
|
|
8730
|
+
@id = id
|
|
8731
|
+
@name = name
|
|
8732
|
+
@description = description
|
|
8733
|
+
@when_ = when_
|
|
8734
|
+
@actions = actions
|
|
8735
|
+
@disabled = disabled
|
|
8736
|
+
@position = position
|
|
8737
|
+
@update_mask = update_mask
|
|
8738
|
+
end
|
|
8739
|
+
|
|
8740
|
+
def self.from_json(data)
|
|
8741
|
+
new(
|
|
8742
|
+
workspace_id: data["workspaceId"],
|
|
8743
|
+
tool_set_id: data["toolSetId"],
|
|
8744
|
+
id: data["id"],
|
|
8745
|
+
name: data["name"],
|
|
8746
|
+
description: data["description"],
|
|
8747
|
+
when_: data["when"],
|
|
8748
|
+
actions: data["actions"].nil? ? nil : Types::ToolActions.from_json(data["actions"]),
|
|
8749
|
+
disabled: data["disabled"],
|
|
8750
|
+
position: data["position"],
|
|
8751
|
+
update_mask: data["updateMask"],
|
|
8752
|
+
)
|
|
8753
|
+
end
|
|
8754
|
+
|
|
8755
|
+
def to_h
|
|
8756
|
+
{
|
|
8757
|
+
workspace_id: Util.plain(@workspace_id),
|
|
8758
|
+
tool_set_id: Util.plain(@tool_set_id),
|
|
8759
|
+
id: Util.plain(@id),
|
|
8760
|
+
name: Util.plain(@name),
|
|
8761
|
+
description: Util.plain(@description),
|
|
8762
|
+
when_: Util.plain(@when_),
|
|
8763
|
+
actions: Util.plain(@actions),
|
|
8764
|
+
disabled: Util.plain(@disabled),
|
|
8765
|
+
position: Util.plain(@position),
|
|
8766
|
+
update_mask: Util.plain(@update_mask),
|
|
8767
|
+
}.reject { |_k, v| v.nil? }
|
|
8768
|
+
end
|
|
8769
|
+
end
|
|
8770
|
+
|
|
8406
8771
|
class UpdateToolSetSecretRequest
|
|
8407
8772
|
attr_reader :workspace_id, :tool_set_id, :id, :metadata, :spec, :update_mask
|
|
8408
8773
|
|
|
@@ -9107,13 +9472,14 @@ module Cadenya
|
|
|
9107
9472
|
WorkspaceStatus = ["STATUS_ENABLED", "STATUS_DISABLED", "STATUS_ARCHIVED"].freeze
|
|
9108
9473
|
|
|
9109
9474
|
class Workspace
|
|
9110
|
-
attr_reader :metadata, :spec, :status, :info
|
|
9475
|
+
attr_reader :metadata, :spec, :status, :info, :expires_at
|
|
9111
9476
|
|
|
9112
|
-
def initialize(metadata: nil, spec: nil, status: nil, info: nil)
|
|
9477
|
+
def initialize(metadata: nil, spec: nil, status: nil, info: nil, expires_at: nil)
|
|
9113
9478
|
@metadata = metadata
|
|
9114
9479
|
@spec = spec
|
|
9115
9480
|
@status = status
|
|
9116
9481
|
@info = info
|
|
9482
|
+
@expires_at = expires_at
|
|
9117
9483
|
end
|
|
9118
9484
|
|
|
9119
9485
|
def self.from_json(data)
|
|
@@ -9122,6 +9488,7 @@ module Cadenya
|
|
|
9122
9488
|
spec: data["spec"].nil? ? nil : Types::WorkspaceSpec.from_json(data["spec"]),
|
|
9123
9489
|
status: data["status"],
|
|
9124
9490
|
info: data["info"].nil? ? nil : Types::WorkspaceInfo.from_json(data["info"]),
|
|
9491
|
+
expires_at: data["expiresAt"].nil? ? nil : Time.iso8601(data["expiresAt"]),
|
|
9125
9492
|
)
|
|
9126
9493
|
end
|
|
9127
9494
|
|
|
@@ -9131,6 +9498,7 @@ module Cadenya
|
|
|
9131
9498
|
spec: Util.plain(@spec),
|
|
9132
9499
|
status: Util.plain(@status),
|
|
9133
9500
|
info: Util.plain(@info),
|
|
9501
|
+
expires_at: Util.plain(@expires_at),
|
|
9134
9502
|
}.reject { |_k, v| v.nil? }
|
|
9135
9503
|
end
|
|
9136
9504
|
end
|
|
@@ -9286,13 +9654,15 @@ module Cadenya
|
|
|
9286
9654
|
end
|
|
9287
9655
|
|
|
9288
9656
|
class ObjectiveEventWebhookDataData
|
|
9289
|
-
attr_reader :agent, :agent_variation, :objective, :objective_event
|
|
9657
|
+
attr_reader :agent, :agent_variation, :objective, :objective_event, :parent_objective, :root_objective
|
|
9290
9658
|
|
|
9291
|
-
def initialize(agent: nil, agent_variation: nil, objective: nil, objective_event: nil)
|
|
9659
|
+
def initialize(agent: nil, agent_variation: nil, objective: nil, objective_event: nil, parent_objective: nil, root_objective: nil)
|
|
9292
9660
|
@agent = agent
|
|
9293
9661
|
@agent_variation = agent_variation
|
|
9294
9662
|
@objective = objective
|
|
9295
9663
|
@objective_event = objective_event
|
|
9664
|
+
@parent_objective = parent_objective
|
|
9665
|
+
@root_objective = root_objective
|
|
9296
9666
|
end
|
|
9297
9667
|
|
|
9298
9668
|
def self.from_json(data)
|
|
@@ -9301,6 +9671,8 @@ module Cadenya
|
|
|
9301
9671
|
agent_variation: data["agentVariation"].nil? ? nil : Types::ResourceMetadata.from_json(data["agentVariation"]),
|
|
9302
9672
|
objective: data["objective"].nil? ? nil : Types::OperationMetadata.from_json(data["objective"]),
|
|
9303
9673
|
objective_event: data["objectiveEvent"].nil? ? nil : Types::ObjectiveEvent.from_json(data["objectiveEvent"]),
|
|
9674
|
+
parent_objective: data["parentObjective"].nil? ? nil : Types::OperationMetadata.from_json(data["parentObjective"]),
|
|
9675
|
+
root_objective: data["rootObjective"].nil? ? nil : Types::OperationMetadata.from_json(data["rootObjective"]),
|
|
9304
9676
|
)
|
|
9305
9677
|
end
|
|
9306
9678
|
|
|
@@ -9310,6 +9682,8 @@ module Cadenya
|
|
|
9310
9682
|
agent_variation: Util.plain(@agent_variation),
|
|
9311
9683
|
objective: Util.plain(@objective),
|
|
9312
9684
|
objective_event: Util.plain(@objective_event),
|
|
9685
|
+
parent_objective: Util.plain(@parent_objective),
|
|
9686
|
+
root_objective: Util.plain(@root_objective),
|
|
9313
9687
|
}.reject { |_k, v| v.nil? }
|
|
9314
9688
|
end
|
|
9315
9689
|
end
|
|
@@ -9570,6 +9944,29 @@ module Cadenya
|
|
|
9570
9944
|
end
|
|
9571
9945
|
end
|
|
9572
9946
|
|
|
9947
|
+
class ToolSetEventData_SyncDisabled
|
|
9948
|
+
attr_reader :type, :sync_disabled
|
|
9949
|
+
|
|
9950
|
+
def initialize(type: nil, sync_disabled: nil)
|
|
9951
|
+
@type = type
|
|
9952
|
+
@sync_disabled = sync_disabled
|
|
9953
|
+
end
|
|
9954
|
+
|
|
9955
|
+
def self.from_json(data)
|
|
9956
|
+
new(
|
|
9957
|
+
type: data["type"],
|
|
9958
|
+
sync_disabled: data["syncDisabled"].nil? ? nil : Types::SyncDisabled.from_json(data["syncDisabled"]),
|
|
9959
|
+
)
|
|
9960
|
+
end
|
|
9961
|
+
|
|
9962
|
+
def to_h
|
|
9963
|
+
{
|
|
9964
|
+
type: Util.plain(@type),
|
|
9965
|
+
sync_disabled: Util.plain(@sync_disabled),
|
|
9966
|
+
}.reject { |_k, v| v.nil? }
|
|
9967
|
+
end
|
|
9968
|
+
end
|
|
9969
|
+
|
|
9573
9970
|
class ToolSetAdapter_McpVariant
|
|
9574
9971
|
attr_reader :type, :mcp
|
|
9575
9972
|
|
|
@@ -9920,163 +10317,140 @@ module Cadenya
|
|
|
9920
10317
|
end
|
|
9921
10318
|
end
|
|
9922
10319
|
|
|
9923
|
-
class
|
|
9924
|
-
attr_reader :type, :
|
|
9925
|
-
|
|
9926
|
-
def initialize(type: nil, attribute: nil)
|
|
9927
|
-
@type = type
|
|
9928
|
-
@attribute = attribute
|
|
9929
|
-
end
|
|
9930
|
-
|
|
9931
|
-
def self.from_json(data)
|
|
9932
|
-
new(
|
|
9933
|
-
type: data["type"],
|
|
9934
|
-
attribute: data["attribute"].nil? ? nil : Types::ToolSetAdapter_AttributeFilter.from_json(data["attribute"]),
|
|
9935
|
-
)
|
|
9936
|
-
end
|
|
9937
|
-
|
|
9938
|
-
def to_h
|
|
9939
|
-
{
|
|
9940
|
-
type: Util.plain(@type),
|
|
9941
|
-
attribute: Util.plain(@attribute),
|
|
9942
|
-
}.reject { |_k, v| v.nil? }
|
|
9943
|
-
end
|
|
9944
|
-
end
|
|
9945
|
-
|
|
9946
|
-
class Selector_Condition_HasParameter
|
|
9947
|
-
attr_reader :type, :has_parameter
|
|
10320
|
+
class ToolParameterAction_RemoveVariant
|
|
10321
|
+
attr_reader :type, :remove
|
|
9948
10322
|
|
|
9949
|
-
def initialize(type: nil,
|
|
10323
|
+
def initialize(type: nil, remove: nil)
|
|
9950
10324
|
@type = type
|
|
9951
|
-
@
|
|
10325
|
+
@remove = remove
|
|
9952
10326
|
end
|
|
9953
10327
|
|
|
9954
10328
|
def self.from_json(data)
|
|
9955
10329
|
new(
|
|
9956
10330
|
type: data["type"],
|
|
9957
|
-
|
|
10331
|
+
remove: data["remove"].nil? ? nil : Types::ToolParameterAction_Remove.from_json(data["remove"]),
|
|
9958
10332
|
)
|
|
9959
10333
|
end
|
|
9960
10334
|
|
|
9961
10335
|
def to_h
|
|
9962
10336
|
{
|
|
9963
10337
|
type: Util.plain(@type),
|
|
9964
|
-
|
|
10338
|
+
remove: Util.plain(@remove),
|
|
9965
10339
|
}.reject { |_k, v| v.nil? }
|
|
9966
10340
|
end
|
|
9967
10341
|
end
|
|
9968
10342
|
|
|
9969
|
-
class
|
|
9970
|
-
attr_reader :type, :
|
|
10343
|
+
class ToolParameterAction_SetVariant
|
|
10344
|
+
attr_reader :type, :set
|
|
9971
10345
|
|
|
9972
|
-
def initialize(type: nil,
|
|
10346
|
+
def initialize(type: nil, set: nil)
|
|
9973
10347
|
@type = type
|
|
9974
|
-
@
|
|
10348
|
+
@set = set
|
|
9975
10349
|
end
|
|
9976
10350
|
|
|
9977
10351
|
def self.from_json(data)
|
|
9978
10352
|
new(
|
|
9979
10353
|
type: data["type"],
|
|
9980
|
-
|
|
10354
|
+
set: data["set"].nil? ? nil : Types::ToolParameterAction_Set.from_json(data["set"]),
|
|
9981
10355
|
)
|
|
9982
10356
|
end
|
|
9983
10357
|
|
|
9984
10358
|
def to_h
|
|
9985
10359
|
{
|
|
9986
10360
|
type: Util.plain(@type),
|
|
9987
|
-
|
|
10361
|
+
set: Util.plain(@set),
|
|
9988
10362
|
}.reject { |_k, v| v.nil? }
|
|
9989
10363
|
end
|
|
9990
10364
|
end
|
|
9991
10365
|
|
|
9992
|
-
class
|
|
9993
|
-
attr_reader :type, :
|
|
10366
|
+
class ToolParameterAction_PinVariant
|
|
10367
|
+
attr_reader :type, :pin
|
|
9994
10368
|
|
|
9995
|
-
def initialize(type: nil,
|
|
10369
|
+
def initialize(type: nil, pin: nil)
|
|
9996
10370
|
@type = type
|
|
9997
|
-
@
|
|
10371
|
+
@pin = pin
|
|
9998
10372
|
end
|
|
9999
10373
|
|
|
10000
10374
|
def self.from_json(data)
|
|
10001
10375
|
new(
|
|
10002
10376
|
type: data["type"],
|
|
10003
|
-
|
|
10377
|
+
pin: data["pin"].nil? ? nil : Types::ToolParameterAction_Pin.from_json(data["pin"]),
|
|
10004
10378
|
)
|
|
10005
10379
|
end
|
|
10006
10380
|
|
|
10007
10381
|
def to_h
|
|
10008
10382
|
{
|
|
10009
10383
|
type: Util.plain(@type),
|
|
10010
|
-
|
|
10384
|
+
pin: Util.plain(@pin),
|
|
10011
10385
|
}.reject { |_k, v| v.nil? }
|
|
10012
10386
|
end
|
|
10013
10387
|
end
|
|
10014
10388
|
|
|
10015
|
-
class
|
|
10016
|
-
attr_reader :type, :
|
|
10389
|
+
class ToolResultAction_TransformVariant
|
|
10390
|
+
attr_reader :type, :transform
|
|
10017
10391
|
|
|
10018
|
-
def initialize(type: nil,
|
|
10392
|
+
def initialize(type: nil, transform: nil)
|
|
10019
10393
|
@type = type
|
|
10020
|
-
@
|
|
10394
|
+
@transform = transform
|
|
10021
10395
|
end
|
|
10022
10396
|
|
|
10023
10397
|
def self.from_json(data)
|
|
10024
10398
|
new(
|
|
10025
10399
|
type: data["type"],
|
|
10026
|
-
|
|
10400
|
+
transform: data["transform"].nil? ? nil : Types::ToolResultAction_Transform.from_json(data["transform"]),
|
|
10027
10401
|
)
|
|
10028
10402
|
end
|
|
10029
10403
|
|
|
10030
10404
|
def to_h
|
|
10031
10405
|
{
|
|
10032
10406
|
type: Util.plain(@type),
|
|
10033
|
-
|
|
10407
|
+
transform: Util.plain(@transform),
|
|
10034
10408
|
}.reject { |_k, v| v.nil? }
|
|
10035
10409
|
end
|
|
10036
10410
|
end
|
|
10037
10411
|
|
|
10038
|
-
class
|
|
10039
|
-
attr_reader :type, :
|
|
10412
|
+
class ToolEffective_Source_Rule
|
|
10413
|
+
attr_reader :type, :rule
|
|
10040
10414
|
|
|
10041
|
-
def initialize(type: nil,
|
|
10415
|
+
def initialize(type: nil, rule: nil)
|
|
10042
10416
|
@type = type
|
|
10043
|
-
@
|
|
10417
|
+
@rule = rule
|
|
10044
10418
|
end
|
|
10045
10419
|
|
|
10046
10420
|
def self.from_json(data)
|
|
10047
10421
|
new(
|
|
10048
10422
|
type: data["type"],
|
|
10049
|
-
|
|
10423
|
+
rule: data["rule"].nil? ? nil : Types::Source_Rule.from_json(data["rule"]),
|
|
10050
10424
|
)
|
|
10051
10425
|
end
|
|
10052
10426
|
|
|
10053
10427
|
def to_h
|
|
10054
10428
|
{
|
|
10055
10429
|
type: Util.plain(@type),
|
|
10056
|
-
|
|
10430
|
+
rule: Util.plain(@rule),
|
|
10057
10431
|
}.reject { |_k, v| v.nil? }
|
|
10058
10432
|
end
|
|
10059
10433
|
end
|
|
10060
10434
|
|
|
10061
|
-
class
|
|
10062
|
-
attr_reader :type, :
|
|
10435
|
+
class ToolEffective_Source_Tool
|
|
10436
|
+
attr_reader :type, :tool
|
|
10063
10437
|
|
|
10064
|
-
def initialize(type: nil,
|
|
10438
|
+
def initialize(type: nil, tool: nil)
|
|
10065
10439
|
@type = type
|
|
10066
|
-
@
|
|
10440
|
+
@tool = tool
|
|
10067
10441
|
end
|
|
10068
10442
|
|
|
10069
10443
|
def self.from_json(data)
|
|
10070
10444
|
new(
|
|
10071
10445
|
type: data["type"],
|
|
10072
|
-
|
|
10446
|
+
tool: data["tool"].nil? ? nil : Types::Source_Tool.from_json(data["tool"]),
|
|
10073
10447
|
)
|
|
10074
10448
|
end
|
|
10075
10449
|
|
|
10076
10450
|
def to_h
|
|
10077
10451
|
{
|
|
10078
10452
|
type: Util.plain(@type),
|
|
10079
|
-
|
|
10453
|
+
tool: Util.plain(@tool),
|
|
10080
10454
|
}.reject { |_k, v| v.nil? }
|
|
10081
10455
|
end
|
|
10082
10456
|
end
|
|
@@ -12516,36 +12890,6 @@ module Cadenya
|
|
|
12516
12890
|
encode_fields(ENCODE_OPEN_ROUTER_CONFIG, data)
|
|
12517
12891
|
end
|
|
12518
12892
|
|
|
12519
|
-
ENCODE_PARAMETER_ACTION_PIN = {
|
|
12520
|
-
"path" => ["path", nil],
|
|
12521
|
-
"pinned_parameter" => ["pinnedParameter", nil],
|
|
12522
|
-
"pinnedParameter" => ["pinnedParameter", nil],
|
|
12523
|
-
"on_missing" => ["onMissing", nil],
|
|
12524
|
-
"onMissing" => ["onMissing", nil],
|
|
12525
|
-
}.freeze
|
|
12526
|
-
|
|
12527
|
-
def self.encode_ParameterAction_Pin(data)
|
|
12528
|
-
encode_fields(ENCODE_PARAMETER_ACTION_PIN, data)
|
|
12529
|
-
end
|
|
12530
|
-
|
|
12531
|
-
ENCODE_PARAMETER_ACTION_REMOVE = {
|
|
12532
|
-
"path" => ["path", nil],
|
|
12533
|
-
}.freeze
|
|
12534
|
-
|
|
12535
|
-
def self.encode_ParameterAction_Remove(data)
|
|
12536
|
-
encode_fields(ENCODE_PARAMETER_ACTION_REMOVE, data)
|
|
12537
|
-
end
|
|
12538
|
-
|
|
12539
|
-
ENCODE_PARAMETER_ACTION_SET = {
|
|
12540
|
-
"path" => ["path", nil],
|
|
12541
|
-
"value_template" => ["valueTemplate", nil],
|
|
12542
|
-
"valueTemplate" => ["valueTemplate", nil],
|
|
12543
|
-
}.freeze
|
|
12544
|
-
|
|
12545
|
-
def self.encode_ParameterAction_Set(data)
|
|
12546
|
-
encode_fields(ENCODE_PARAMETER_ACTION_SET, data)
|
|
12547
|
-
end
|
|
12548
|
-
|
|
12549
12893
|
def self.encode_RemoveAgentVariationAssignmentRequest(data)
|
|
12550
12894
|
data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
|
|
12551
12895
|
unless data.is_a?(Hash)
|
|
@@ -12566,19 +12910,6 @@ module Cadenya
|
|
|
12566
12910
|
end
|
|
12567
12911
|
end
|
|
12568
12912
|
|
|
12569
|
-
ENCODE_RESULT_ACTION_TRANSFORM = {
|
|
12570
|
-
"content_template" => ["contentTemplate", nil],
|
|
12571
|
-
"contentTemplate" => ["contentTemplate", nil],
|
|
12572
|
-
"on_error" => ["onError", nil],
|
|
12573
|
-
"onError" => ["onError", nil],
|
|
12574
|
-
"expect_json" => ["expectJson", nil],
|
|
12575
|
-
"expectJson" => ["expectJson", nil],
|
|
12576
|
-
}.freeze
|
|
12577
|
-
|
|
12578
|
-
def self.encode_ResultAction_Transform(data)
|
|
12579
|
-
encode_fields(ENCODE_RESULT_ACTION_TRANSFORM, data)
|
|
12580
|
-
end
|
|
12581
|
-
|
|
12582
12913
|
ENCODE_SCHEDULE_CALENDAR = {
|
|
12583
12914
|
"second" => ["second", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
|
|
12584
12915
|
"minute" => ["minute", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_Schedule_Range(_v) }).call(_i) } : _v }],
|
|
@@ -12615,32 +12946,6 @@ module Cadenya
|
|
|
12615
12946
|
encode_fields(ENCODE_SCHEDULE_RANGE, data)
|
|
12616
12947
|
end
|
|
12617
12948
|
|
|
12618
|
-
def self.encode_Selector_Condition(data)
|
|
12619
|
-
data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
|
|
12620
|
-
unless data.is_a?(Hash)
|
|
12621
|
-
raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
|
|
12622
|
-
end
|
|
12623
|
-
|
|
12624
|
-
case data["type"] || data[:type]
|
|
12625
|
-
when "attribute"
|
|
12626
|
-
(->(_v) { encode_Selector_Condition_Attribute(_v) }).call(data)
|
|
12627
|
-
when "hasParameter"
|
|
12628
|
-
(->(_v) { encode_Selector_Condition_HasParameter(_v) }).call(data)
|
|
12629
|
-
when "tools"
|
|
12630
|
-
(->(_v) { encode_Selector_Condition_Tools(_v) }).call(data)
|
|
12631
|
-
else
|
|
12632
|
-
data
|
|
12633
|
-
end
|
|
12634
|
-
end
|
|
12635
|
-
|
|
12636
|
-
ENCODE_SELECTOR_TOOL_NAMES = {
|
|
12637
|
-
"names" => ["names", nil],
|
|
12638
|
-
}.freeze
|
|
12639
|
-
|
|
12640
|
-
def self.encode_Selector_ToolNames(data)
|
|
12641
|
-
encode_fields(ENCODE_SELECTOR_TOOL_NAMES, data)
|
|
12642
|
-
end
|
|
12643
|
-
|
|
12644
12949
|
ENCODE_SET_TOOL_CALL_CONTENT_REQUEST_AUDIO_BLOCK = {
|
|
12645
12950
|
"data" => ["data", nil],
|
|
12646
12951
|
"mime_type" => ["mimeType", nil],
|
|
@@ -12718,25 +13023,22 @@ module Cadenya
|
|
|
12718
13023
|
encode_fields(ENCODE_TENANT_ASSERTION, data)
|
|
12719
13024
|
end
|
|
12720
13025
|
|
|
12721
|
-
|
|
12722
|
-
"
|
|
12723
|
-
"
|
|
12724
|
-
"
|
|
12725
|
-
"
|
|
12726
|
-
"
|
|
12727
|
-
"
|
|
12728
|
-
"disabled" => ["disabled", nil],
|
|
12729
|
-
"widget_argument_exposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
|
|
12730
|
-
"widgetArgumentExposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolOverlay_WidgetArgumentExposure(_v) }],
|
|
13026
|
+
ENCODE_TOOL_ACTIONS = {
|
|
13027
|
+
"parameter_actions" => ["parameterActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolParameterAction(_v) }).call(_i) } : _v }],
|
|
13028
|
+
"parameterActions" => ["parameterActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolParameterAction(_v) }).call(_i) } : _v }],
|
|
13029
|
+
"result_actions" => ["resultActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolResultAction(_v) }).call(_i) } : _v }],
|
|
13030
|
+
"resultActions" => ["resultActions", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolResultAction(_v) }).call(_i) } : _v }],
|
|
13031
|
+
"widget_argument_exposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolWidgetArgumentExposure(_v) }],
|
|
13032
|
+
"widgetArgumentExposure" => ["widgetArgumentExposure", ->(_v) { encode_ToolWidgetArgumentExposure(_v) }],
|
|
12731
13033
|
"auto_mode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
|
|
12732
13034
|
"autoMode" => ["autoMode", ->(_v) { encode_AutoModeConfig(_v) }],
|
|
12733
13035
|
}.freeze
|
|
12734
13036
|
|
|
12735
|
-
def self.
|
|
12736
|
-
encode_fields(
|
|
13037
|
+
def self.encode_ToolActions(data)
|
|
13038
|
+
encode_fields(ENCODE_TOOL_ACTIONS, data)
|
|
12737
13039
|
end
|
|
12738
13040
|
|
|
12739
|
-
def self.
|
|
13041
|
+
def self.encode_ToolParameterAction(data)
|
|
12740
13042
|
data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
|
|
12741
13043
|
unless data.is_a?(Hash)
|
|
12742
13044
|
raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
|
|
@@ -12744,25 +13046,47 @@ module Cadenya
|
|
|
12744
13046
|
|
|
12745
13047
|
case data["type"] || data[:type]
|
|
12746
13048
|
when "remove"
|
|
12747
|
-
(->(_v) {
|
|
13049
|
+
(->(_v) { encode_ToolParameterAction_RemoveVariant(_v) }).call(data)
|
|
12748
13050
|
when "set"
|
|
12749
|
-
(->(_v) {
|
|
13051
|
+
(->(_v) { encode_ToolParameterAction_SetVariant(_v) }).call(data)
|
|
12750
13052
|
when "pin"
|
|
12751
|
-
(->(_v) {
|
|
13053
|
+
(->(_v) { encode_ToolParameterAction_PinVariant(_v) }).call(data)
|
|
12752
13054
|
else
|
|
12753
13055
|
data
|
|
12754
13056
|
end
|
|
12755
13057
|
end
|
|
12756
13058
|
|
|
12757
|
-
|
|
13059
|
+
ENCODE_TOOL_PARAMETER_ACTION_PIN = {
|
|
12758
13060
|
"path" => ["path", nil],
|
|
13061
|
+
"pinned_parameter" => ["pinnedParameter", nil],
|
|
13062
|
+
"pinnedParameter" => ["pinnedParameter", nil],
|
|
13063
|
+
"on_missing" => ["onMissing", nil],
|
|
13064
|
+
"onMissing" => ["onMissing", nil],
|
|
13065
|
+
}.freeze
|
|
13066
|
+
|
|
13067
|
+
def self.encode_ToolParameterAction_Pin(data)
|
|
13068
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_PIN, data)
|
|
13069
|
+
end
|
|
13070
|
+
|
|
13071
|
+
ENCODE_TOOL_PARAMETER_ACTION_REMOVE = {
|
|
13072
|
+
"path" => ["path", nil],
|
|
13073
|
+
}.freeze
|
|
13074
|
+
|
|
13075
|
+
def self.encode_ToolParameterAction_Remove(data)
|
|
13076
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_REMOVE, data)
|
|
13077
|
+
end
|
|
13078
|
+
|
|
13079
|
+
ENCODE_TOOL_PARAMETER_ACTION_SET = {
|
|
13080
|
+
"path" => ["path", nil],
|
|
13081
|
+
"value_template" => ["valueTemplate", nil],
|
|
13082
|
+
"valueTemplate" => ["valueTemplate", nil],
|
|
12759
13083
|
}.freeze
|
|
12760
13084
|
|
|
12761
|
-
def self.
|
|
12762
|
-
encode_fields(
|
|
13085
|
+
def self.encode_ToolParameterAction_Set(data)
|
|
13086
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_SET, data)
|
|
12763
13087
|
end
|
|
12764
13088
|
|
|
12765
|
-
def self.
|
|
13089
|
+
def self.encode_ToolResultAction(data)
|
|
12766
13090
|
data = data.to_h if !data.is_a?(Hash) && data.class.name.to_s.start_with?(name.split("::").first + "::Types")
|
|
12767
13091
|
unless data.is_a?(Hash)
|
|
12768
13092
|
raise TypeError, "expected a Hash (or a decoded Types value object), got #{data.class}"
|
|
@@ -12770,27 +13094,23 @@ module Cadenya
|
|
|
12770
13094
|
|
|
12771
13095
|
case data["type"] || data[:type]
|
|
12772
13096
|
when "transform"
|
|
12773
|
-
(->(_v) {
|
|
13097
|
+
(->(_v) { encode_ToolResultAction_TransformVariant(_v) }).call(data)
|
|
12774
13098
|
else
|
|
12775
13099
|
data
|
|
12776
13100
|
end
|
|
12777
13101
|
end
|
|
12778
13102
|
|
|
12779
|
-
|
|
12780
|
-
"
|
|
12781
|
-
"
|
|
12782
|
-
|
|
12783
|
-
|
|
12784
|
-
|
|
12785
|
-
|
|
12786
|
-
end
|
|
12787
|
-
|
|
12788
|
-
ENCODE_TOOL_OVERLAY_WIDGET_ARGUMENT_EXPOSURE = {
|
|
12789
|
-
"enabled" => ["enabled", nil],
|
|
13103
|
+
ENCODE_TOOL_RESULT_ACTION_TRANSFORM = {
|
|
13104
|
+
"content_template" => ["contentTemplate", nil],
|
|
13105
|
+
"contentTemplate" => ["contentTemplate", nil],
|
|
13106
|
+
"on_error" => ["onError", nil],
|
|
13107
|
+
"onError" => ["onError", nil],
|
|
13108
|
+
"expect_json" => ["expectJson", nil],
|
|
13109
|
+
"expectJson" => ["expectJson", nil],
|
|
12790
13110
|
}.freeze
|
|
12791
13111
|
|
|
12792
|
-
def self.
|
|
12793
|
-
encode_fields(
|
|
13112
|
+
def self.encode_ToolResultAction_Transform(data)
|
|
13113
|
+
encode_fields(ENCODE_TOOL_RESULT_ACTION_TRANSFORM, data)
|
|
12794
13114
|
end
|
|
12795
13115
|
|
|
12796
13116
|
def self.encode_ToolSetAdapter(data)
|
|
@@ -12942,7 +13262,6 @@ module Cadenya
|
|
|
12942
13262
|
ENCODE_TOOL_SET_SPEC = {
|
|
12943
13263
|
"description" => ["description", nil],
|
|
12944
13264
|
"adapter" => ["adapter", ->(_v) { encode_ToolSetAdapter(_v) }],
|
|
12945
|
-
"overlays" => ["overlays", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolOverlay(_v) }).call(_i) } : _v }],
|
|
12946
13265
|
"secrets" => ["secrets", ->(_v) { _v.is_a?(Array) ? _v.map { |_i| (->(_v) { encode_ToolSetSpec_Secret(_v) }).call(_i) } : _v }],
|
|
12947
13266
|
}.freeze
|
|
12948
13267
|
|
|
@@ -12967,6 +13286,7 @@ module Cadenya
|
|
|
12967
13286
|
"config" => ["config", ->(_v) { encode_ToolSpec_Config(_v) }],
|
|
12968
13287
|
"llm_tool_name" => ["llmToolName", nil],
|
|
12969
13288
|
"llmToolName" => ["llmToolName", nil],
|
|
13289
|
+
"actions" => ["actions", ->(_v) { encode_ToolActions(_v) }],
|
|
12970
13290
|
}.freeze
|
|
12971
13291
|
|
|
12972
13292
|
def self.encode_ToolSpec(data)
|
|
@@ -12993,6 +13313,14 @@ module Cadenya
|
|
|
12993
13313
|
end
|
|
12994
13314
|
end
|
|
12995
13315
|
|
|
13316
|
+
ENCODE_TOOL_WIDGET_ARGUMENT_EXPOSURE = {
|
|
13317
|
+
"enabled" => ["enabled", nil],
|
|
13318
|
+
}.freeze
|
|
13319
|
+
|
|
13320
|
+
def self.encode_ToolWidgetArgumentExposure(data)
|
|
13321
|
+
encode_fields(ENCODE_TOOL_WIDGET_ARGUMENT_EXPOSURE, data)
|
|
13322
|
+
end
|
|
13323
|
+
|
|
12996
13324
|
ENCODE_TRUSTED_ENDPOINT_SPEC = {
|
|
12997
13325
|
"host" => ["host", nil],
|
|
12998
13326
|
}.freeze
|
|
@@ -13313,68 +13641,40 @@ module Cadenya
|
|
|
13313
13641
|
encode_fields(ENCODE_TOOL_SET_ADAPTER_OPEN_API_UPLOAD_ID, data)
|
|
13314
13642
|
end
|
|
13315
13643
|
|
|
13316
|
-
|
|
13317
|
-
"type" => ["type", nil],
|
|
13318
|
-
"attribute" => ["attribute", ->(_v) { encode_ToolSetAdapter_AttributeFilter(_v) }],
|
|
13319
|
-
}.freeze
|
|
13320
|
-
|
|
13321
|
-
def self.encode_Selector_Condition_Attribute(data)
|
|
13322
|
-
encode_fields(ENCODE_SELECTOR_CONDITION_ATTRIBUTE, data)
|
|
13323
|
-
end
|
|
13324
|
-
|
|
13325
|
-
ENCODE_SELECTOR_CONDITION_HAS_PARAMETER = {
|
|
13326
|
-
"type" => ["type", nil],
|
|
13327
|
-
"has_parameter" => ["hasParameter", ->(_v) { encode_ToolOverlay_ParameterPath(_v) }],
|
|
13328
|
-
"hasParameter" => ["hasParameter", ->(_v) { encode_ToolOverlay_ParameterPath(_v) }],
|
|
13329
|
-
}.freeze
|
|
13330
|
-
|
|
13331
|
-
def self.encode_Selector_Condition_HasParameter(data)
|
|
13332
|
-
encode_fields(ENCODE_SELECTOR_CONDITION_HAS_PARAMETER, data)
|
|
13333
|
-
end
|
|
13334
|
-
|
|
13335
|
-
ENCODE_SELECTOR_CONDITION_TOOLS = {
|
|
13336
|
-
"type" => ["type", nil],
|
|
13337
|
-
"tools" => ["tools", ->(_v) { encode_Selector_ToolNames(_v) }],
|
|
13338
|
-
}.freeze
|
|
13339
|
-
|
|
13340
|
-
def self.encode_Selector_Condition_Tools(data)
|
|
13341
|
-
encode_fields(ENCODE_SELECTOR_CONDITION_TOOLS, data)
|
|
13342
|
-
end
|
|
13343
|
-
|
|
13344
|
-
ENCODE_TOOL_OVERLAY_PARAMETER_ACTION_REMOVE = {
|
|
13644
|
+
ENCODE_TOOL_PARAMETER_ACTION_REMOVE_VARIANT = {
|
|
13345
13645
|
"type" => ["type", nil],
|
|
13346
|
-
"remove" => ["remove", ->(_v) {
|
|
13646
|
+
"remove" => ["remove", ->(_v) { encode_ToolParameterAction_Remove(_v) }],
|
|
13347
13647
|
}.freeze
|
|
13348
13648
|
|
|
13349
|
-
def self.
|
|
13350
|
-
encode_fields(
|
|
13649
|
+
def self.encode_ToolParameterAction_RemoveVariant(data)
|
|
13650
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_REMOVE_VARIANT, data)
|
|
13351
13651
|
end
|
|
13352
13652
|
|
|
13353
|
-
|
|
13653
|
+
ENCODE_TOOL_PARAMETER_ACTION_SET_VARIANT = {
|
|
13354
13654
|
"type" => ["type", nil],
|
|
13355
|
-
"set" => ["set", ->(_v) {
|
|
13655
|
+
"set" => ["set", ->(_v) { encode_ToolParameterAction_Set(_v) }],
|
|
13356
13656
|
}.freeze
|
|
13357
13657
|
|
|
13358
|
-
def self.
|
|
13359
|
-
encode_fields(
|
|
13658
|
+
def self.encode_ToolParameterAction_SetVariant(data)
|
|
13659
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_SET_VARIANT, data)
|
|
13360
13660
|
end
|
|
13361
13661
|
|
|
13362
|
-
|
|
13662
|
+
ENCODE_TOOL_PARAMETER_ACTION_PIN_VARIANT = {
|
|
13363
13663
|
"type" => ["type", nil],
|
|
13364
|
-
"pin" => ["pin", ->(_v) {
|
|
13664
|
+
"pin" => ["pin", ->(_v) { encode_ToolParameterAction_Pin(_v) }],
|
|
13365
13665
|
}.freeze
|
|
13366
13666
|
|
|
13367
|
-
def self.
|
|
13368
|
-
encode_fields(
|
|
13667
|
+
def self.encode_ToolParameterAction_PinVariant(data)
|
|
13668
|
+
encode_fields(ENCODE_TOOL_PARAMETER_ACTION_PIN_VARIANT, data)
|
|
13369
13669
|
end
|
|
13370
13670
|
|
|
13371
|
-
|
|
13671
|
+
ENCODE_TOOL_RESULT_ACTION_TRANSFORM_VARIANT = {
|
|
13372
13672
|
"type" => ["type", nil],
|
|
13373
|
-
"transform" => ["transform", ->(_v) {
|
|
13673
|
+
"transform" => ["transform", ->(_v) { encode_ToolResultAction_Transform(_v) }],
|
|
13374
13674
|
}.freeze
|
|
13375
13675
|
|
|
13376
|
-
def self.
|
|
13377
|
-
encode_fields(
|
|
13676
|
+
def self.encode_ToolResultAction_TransformVariant(data)
|
|
13677
|
+
encode_fields(ENCODE_TOOL_RESULT_ACTION_TRANSFORM_VARIANT, data)
|
|
13378
13678
|
end
|
|
13379
13679
|
|
|
13380
13680
|
ENCODE_TOOL_SPEC_CONFIG_HTTP = {
|