cadenya 0.28.0 → 0.30.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/CHANGELOG.md +16 -0
- data/README.md +1 -1
- data/lib/cadenya/models/context_lengths.rb +87 -0
- data/lib/cadenya/models/objective_diagnostics.rb +50 -0
- data/lib/cadenya/models/objective_retrieve_diagnostics_params.rb +26 -0
- data/lib/cadenya/models/objective_retrieve_diagnostics_response.rb +25 -0
- data/lib/cadenya/models/objectives/objective_tool_call.rb +1 -0
- data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +1 -0
- data/lib/cadenya/models/objectives/set_tool_call_content_request_audio_block.rb +26 -0
- data/lib/cadenya/models/objectives/set_tool_call_content_request_content_block.rb +32 -0
- data/lib/cadenya/models/objectives/set_tool_call_content_request_image_block.rb +26 -0
- data/lib/cadenya/models/objectives/set_tool_call_content_request_text_block.rb +17 -0
- data/lib/cadenya/models/objectives/tool_call_list_params.rb +31 -1
- data/lib/cadenya/models/objectives/tool_call_set_content_params.rb +51 -0
- data/lib/cadenya/models/tool_called.rb +33 -1
- data/lib/cadenya/models/tool_set_adapter.rb +18 -1
- data/lib/cadenya/models/tool_set_adapter_bare.rb +26 -0
- data/lib/cadenya/models/tool_sets/config_bare.rb +14 -0
- data/lib/cadenya/models/tool_sets/tool_spec_config.rb +16 -1
- data/lib/cadenya/models.rb +8 -0
- data/lib/cadenya/resources/objectives/tool_calls.rb +53 -2
- data/lib/cadenya/resources/objectives.rb +30 -0
- data/lib/cadenya/version.rb +1 -1
- data/lib/cadenya.rb +11 -0
- data/rbi/cadenya/models/context_lengths.rbi +103 -0
- data/rbi/cadenya/models/objective_diagnostics.rbi +76 -0
- data/rbi/cadenya/models/objective_retrieve_diagnostics_params.rbi +46 -0
- data/rbi/cadenya/models/objective_retrieve_diagnostics_response.rbi +43 -0
- data/rbi/cadenya/models/objectives/objective_tool_call.rbi +5 -0
- data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +5 -0
- data/rbi/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbi +40 -0
- data/rbi/cadenya/models/objectives/set_tool_call_content_request_content_block.rbi +89 -0
- data/rbi/cadenya/models/objectives/set_tool_call_content_request_image_block.rbi +40 -0
- data/rbi/cadenya/models/objectives/set_tool_call_content_request_text_block.rbi +28 -0
- data/rbi/cadenya/models/objectives/tool_call_list_params.rbi +85 -0
- data/rbi/cadenya/models/objectives/tool_call_set_content_params.rbi +80 -0
- data/rbi/cadenya/models/tool_called.rbi +55 -2
- data/rbi/cadenya/models/tool_set_adapter.rbi +24 -1
- data/rbi/cadenya/models/tool_set_adapter_bare.rbi +37 -0
- data/rbi/cadenya/models/tool_sets/config_bare.rbi +25 -0
- data/rbi/cadenya/models/tool_sets/tool_spec_config.rbi +20 -1
- data/rbi/cadenya/models.rbi +9 -0
- data/rbi/cadenya/resources/objectives/tool_calls.rbi +37 -0
- data/rbi/cadenya/resources/objectives.rbi +19 -0
- data/sig/cadenya/models/context_lengths.rbs +55 -0
- data/sig/cadenya/models/objective_diagnostics.rbs +30 -0
- data/sig/cadenya/models/objective_retrieve_diagnostics_params.rbs +28 -0
- data/sig/cadenya/models/objective_retrieve_diagnostics_response.rbs +14 -0
- data/sig/cadenya/models/objectives/objective_tool_call.rbs +2 -0
- data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +2 -0
- data/sig/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbs +18 -0
- data/sig/cadenya/models/objectives/set_tool_call_content_request_content_block.rbs +44 -0
- data/sig/cadenya/models/objectives/set_tool_call_content_request_image_block.rbs +18 -0
- data/sig/cadenya/models/objectives/set_tool_call_content_request_text_block.rbs +15 -0
- data/sig/cadenya/models/objectives/tool_call_list_params.rbs +30 -0
- data/sig/cadenya/models/objectives/tool_call_set_content_params.rbs +43 -0
- data/sig/cadenya/models/tool_called.rbs +33 -3
- data/sig/cadenya/models/tool_set_adapter.rbs +7 -0
- data/sig/cadenya/models/tool_set_adapter_bare.rbs +15 -0
- data/sig/cadenya/models/tool_sets/config_bare.rbs +13 -0
- data/sig/cadenya/models/tool_sets/tool_spec_config.rbs +9 -0
- data/sig/cadenya/models.rbs +8 -0
- data/sig/cadenya/resources/objectives/tool_calls.rbs +9 -0
- data/sig/cadenya/resources/objectives.rbs +6 -0
- metadata +35 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5cf6a4a48bd9ffd441f8fb6b4a6ee91fc25a5296c50d52e49ec22892ebec3a87
|
|
4
|
+
data.tar.gz: c787c51e169c0eea08e7e61773b06df45a3bde4f5749ed82f2188c488333b2e4
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a3136f051b1bd97d922220532c5daf6d511aea663ec00c9831729c45bcbbda56a3d7e860072448e3ffca1a8a19839da4ec44cec2b3c31ab91d5940aa35ef171b
|
|
7
|
+
data.tar.gz: 33f6214ff31c4612cf1024908088b7727e818ef15d14ab740f3d51b4ecd1f33a7c4745d5d0aa2403344c1270fd5ec8b17f20b3e81e661540ed7f3b8144daa118
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.30.0 (2026-07-06)
|
|
4
|
+
|
|
5
|
+
Full Changelog: [v0.29.0...v0.30.0](https://github.com/cadenya/cadenya-ruby/compare/v0.29.0...v0.30.0)
|
|
6
|
+
|
|
7
|
+
### Features
|
|
8
|
+
|
|
9
|
+
* Bare toolset proto contract: Bare adapter, SetToolCallContent, WAITING_FOR_CONTENT (ENG-385) ([075baa7](https://github.com/cadenya/cadenya-ruby/commit/075baa7b039c12f2f097c7b688935f3e14d4f98f))
|
|
10
|
+
|
|
11
|
+
## 0.29.0 (2026-07-05)
|
|
12
|
+
|
|
13
|
+
Full Changelog: [v0.28.0...v0.29.0](https://github.com/cadenya/cadenya-ruby/compare/v0.28.0...v0.29.0)
|
|
14
|
+
|
|
15
|
+
### Features
|
|
16
|
+
|
|
17
|
+
* **api:** api update ([e14c0d7](https://github.com/cadenya/cadenya-ruby/commit/e14c0d7509075b97bf655215eb5f266e8903b3a6))
|
|
18
|
+
|
|
3
19
|
## 0.28.0 (2026-07-04)
|
|
4
20
|
|
|
5
21
|
Full Changelog: [v0.27.0...v0.28.0](https://github.com/cadenya/cadenya-ruby/compare/v0.27.0...v0.28.0)
|
data/README.md
CHANGED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
class ContextLengths < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
response_only do
|
|
7
|
+
# @!attribute assistant_messages
|
|
8
|
+
# Chat history messages with the assistant role.
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer]
|
|
11
|
+
required :assistant_messages, Integer, api_name: :assistantMessages
|
|
12
|
+
|
|
13
|
+
# @!attribute available_tools
|
|
14
|
+
# The discoverable/available-tools appendix attached to the system prompt.
|
|
15
|
+
#
|
|
16
|
+
# @return [Integer]
|
|
17
|
+
required :available_tools, Integer, api_name: :availableTools
|
|
18
|
+
|
|
19
|
+
# @!attribute episodic_memory
|
|
20
|
+
# The episodic memory appendix attached to the system prompt.
|
|
21
|
+
#
|
|
22
|
+
# @return [Integer]
|
|
23
|
+
required :episodic_memory, Integer, api_name: :episodicMemory
|
|
24
|
+
|
|
25
|
+
# @!attribute skills_memory
|
|
26
|
+
# The skills memory appendix attached to the system prompt.
|
|
27
|
+
#
|
|
28
|
+
# @return [Integer]
|
|
29
|
+
required :skills_memory, Integer, api_name: :skillsMemory
|
|
30
|
+
|
|
31
|
+
# @!attribute system_prompt
|
|
32
|
+
# The objective's base system prompt (rendered variation template).
|
|
33
|
+
#
|
|
34
|
+
# @return [Integer]
|
|
35
|
+
required :system_prompt, Integer, api_name: :systemPrompt
|
|
36
|
+
|
|
37
|
+
# @!attribute tool_definitions
|
|
38
|
+
# Serialized tool definitions sent with the completion request (names,
|
|
39
|
+
# descriptions, and JSON-schema parameters).
|
|
40
|
+
#
|
|
41
|
+
# @return [Integer]
|
|
42
|
+
required :tool_definitions, Integer, api_name: :toolDefinitions
|
|
43
|
+
|
|
44
|
+
# @!attribute tool_results
|
|
45
|
+
# Tool results present in the chat history.
|
|
46
|
+
#
|
|
47
|
+
# @return [Integer]
|
|
48
|
+
required :tool_results, Integer, api_name: :toolResults
|
|
49
|
+
|
|
50
|
+
# @!attribute user_messages
|
|
51
|
+
# Chat history messages with the user role.
|
|
52
|
+
#
|
|
53
|
+
# @return [Integer]
|
|
54
|
+
required :user_messages, Integer, api_name: :userMessages
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
# @!method initialize(assistant_messages:, available_tools:, episodic_memory:, skills_memory:, system_prompt:, tool_definitions:, tool_results:, user_messages:)
|
|
58
|
+
# Some parameter documentations has been truncated, see
|
|
59
|
+
# {Cadenya::Models::ContextLengths} for more details.
|
|
60
|
+
#
|
|
61
|
+
# ContextLengths is the measured character length of each distinct component of an
|
|
62
|
+
# iteration's assembled context window. Values are raw character lengths of the
|
|
63
|
+
# component as assembled into the request — token estimates are derived by the
|
|
64
|
+
# client against input_tokens (component share = component length / sum of all
|
|
65
|
+
# lengths).
|
|
66
|
+
#
|
|
67
|
+
# New components are added as new fields — wire-compatible; absent components read
|
|
68
|
+
# as 0.
|
|
69
|
+
#
|
|
70
|
+
# @param assistant_messages [Integer] Chat history messages with the assistant role.
|
|
71
|
+
#
|
|
72
|
+
# @param available_tools [Integer] The discoverable/available-tools appendix attached to the system prompt.
|
|
73
|
+
#
|
|
74
|
+
# @param episodic_memory [Integer] The episodic memory appendix attached to the system prompt.
|
|
75
|
+
#
|
|
76
|
+
# @param skills_memory [Integer] The skills memory appendix attached to the system prompt.
|
|
77
|
+
#
|
|
78
|
+
# @param system_prompt [Integer] The objective's base system prompt (rendered variation template).
|
|
79
|
+
#
|
|
80
|
+
# @param tool_definitions [Integer] Serialized tool definitions sent with the completion request
|
|
81
|
+
#
|
|
82
|
+
# @param tool_results [Integer] Tool results present in the chat history.
|
|
83
|
+
#
|
|
84
|
+
# @param user_messages [Integer] Chat history messages with the user role.
|
|
85
|
+
end
|
|
86
|
+
end
|
|
87
|
+
end
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
class ObjectiveDiagnostics < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
response_only do
|
|
7
|
+
# @!attribute cached_input_tokens
|
|
8
|
+
# The portion of input_tokens served from the provider's prompt cache. Lets
|
|
9
|
+
# clients distinguish "big but cached" from "big and paid fresh every iteration".
|
|
10
|
+
#
|
|
11
|
+
# @return [Integer]
|
|
12
|
+
required :cached_input_tokens, Integer, api_name: :cachedInputTokens
|
|
13
|
+
|
|
14
|
+
# @!attribute context_lengths
|
|
15
|
+
# ContextLengths is the measured character length of each distinct component of an
|
|
16
|
+
# iteration's assembled context window. Values are raw character lengths of the
|
|
17
|
+
# component as assembled into the request — token estimates are derived by the
|
|
18
|
+
# client against input_tokens (component share = component length / sum of all
|
|
19
|
+
# lengths).
|
|
20
|
+
#
|
|
21
|
+
# New components are added as new fields — wire-compatible; absent components read
|
|
22
|
+
# as 0.
|
|
23
|
+
#
|
|
24
|
+
# @return [Cadenya::Models::ContextLengths]
|
|
25
|
+
required :context_lengths, -> { Cadenya::ContextLengths }, api_name: :contextLengths
|
|
26
|
+
|
|
27
|
+
# @!attribute input_tokens
|
|
28
|
+
# Input tokens reported by the LLM provider for the iteration's completion.
|
|
29
|
+
#
|
|
30
|
+
# @return [Integer]
|
|
31
|
+
required :input_tokens, Integer, api_name: :inputTokens
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
# @!method initialize(cached_input_tokens:, context_lengths:, input_tokens:)
|
|
35
|
+
# Some parameter documentations has been truncated, see
|
|
36
|
+
# {Cadenya::Models::ObjectiveDiagnostics} for more details.
|
|
37
|
+
#
|
|
38
|
+
# ObjectiveDiagnostics is the context-usage breakdown measured for a single
|
|
39
|
+
# iteration at request-assembly time. It reports how much of the context window
|
|
40
|
+
# each component occupies so tool parameters, memory cascades, and prompts can be
|
|
41
|
+
# tuned against real token usage.
|
|
42
|
+
#
|
|
43
|
+
# @param cached_input_tokens [Integer] The portion of input_tokens served from the provider's prompt cache.
|
|
44
|
+
#
|
|
45
|
+
# @param context_lengths [Cadenya::Models::ContextLengths] ContextLengths is the measured character length of each distinct component
|
|
46
|
+
#
|
|
47
|
+
# @param input_tokens [Integer] Input tokens reported by the LLM provider for the iteration's completion.
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::Objectives#retrieve_diagnostics
|
|
6
|
+
class ObjectiveRetrieveDiagnosticsParams < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
8
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
9
|
+
|
|
10
|
+
# @!attribute workspace_id
|
|
11
|
+
#
|
|
12
|
+
# @return [String]
|
|
13
|
+
required :workspace_id, String
|
|
14
|
+
|
|
15
|
+
# @!attribute objective_id
|
|
16
|
+
#
|
|
17
|
+
# @return [String]
|
|
18
|
+
required :objective_id, String
|
|
19
|
+
|
|
20
|
+
# @!method initialize(workspace_id:, objective_id:, request_options: {})
|
|
21
|
+
# @param workspace_id [String]
|
|
22
|
+
# @param objective_id [String]
|
|
23
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
# @see Cadenya::Resources::Objectives#retrieve_diagnostics
|
|
6
|
+
class ObjectiveRetrieveDiagnosticsResponse < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
response_only do
|
|
8
|
+
# @!attribute diagnostics
|
|
9
|
+
# ObjectiveDiagnostics is the context-usage breakdown measured for a single
|
|
10
|
+
# iteration at request-assembly time. It reports how much of the context window
|
|
11
|
+
# each component occupies so tool parameters, memory cascades, and prompts can be
|
|
12
|
+
# tuned against real token usage.
|
|
13
|
+
#
|
|
14
|
+
# @return [Cadenya::Models::ObjectiveDiagnostics]
|
|
15
|
+
required :diagnostics, -> { Cadenya::ObjectiveDiagnostics }
|
|
16
|
+
end
|
|
17
|
+
|
|
18
|
+
# @!method initialize(diagnostics:)
|
|
19
|
+
# Some parameter documentations has been truncated, see
|
|
20
|
+
# {Cadenya::Models::ObjectiveRetrieveDiagnosticsResponse} for more details.
|
|
21
|
+
#
|
|
22
|
+
# @param diagnostics [Cadenya::Models::ObjectiveDiagnostics] ObjectiveDiagnostics is the context-usage breakdown measured for a single
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -64,6 +64,7 @@ module Cadenya
|
|
|
64
64
|
TOOL_CALL_EXECUTION_STATUS_RUNNING = :TOOL_CALL_EXECUTION_STATUS_RUNNING
|
|
65
65
|
TOOL_CALL_EXECUTION_STATUS_COMPLETED = :TOOL_CALL_EXECUTION_STATUS_COMPLETED
|
|
66
66
|
TOOL_CALL_EXECUTION_STATUS_ERRORED = :TOOL_CALL_EXECUTION_STATUS_ERRORED
|
|
67
|
+
TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT = :TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT
|
|
67
68
|
|
|
68
69
|
# @!method self.values
|
|
69
70
|
# @return [Array<Symbol>]
|
|
@@ -84,6 +84,7 @@ module Cadenya
|
|
|
84
84
|
TOOL_CALL_EXECUTION_STATUS_RUNNING = :TOOL_CALL_EXECUTION_STATUS_RUNNING
|
|
85
85
|
TOOL_CALL_EXECUTION_STATUS_COMPLETED = :TOOL_CALL_EXECUTION_STATUS_COMPLETED
|
|
86
86
|
TOOL_CALL_EXECUTION_STATUS_ERRORED = :TOOL_CALL_EXECUTION_STATUS_ERRORED
|
|
87
|
+
TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT = :TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT
|
|
87
88
|
|
|
88
89
|
# @!method self.values
|
|
89
90
|
# @return [Array<Symbol>]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module Objectives
|
|
6
|
+
class SetToolCallContentRequestAudioBlock < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Base64-encoded audio bytes.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :data, String
|
|
12
|
+
|
|
13
|
+
# @!attribute mime_type
|
|
14
|
+
# IANA media type of the audio, e.g. audio/wav.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :mime_type, String, api_name: :mimeType
|
|
18
|
+
|
|
19
|
+
# @!method initialize(data:, mime_type:)
|
|
20
|
+
# @param data [String] Base64-encoded audio bytes.
|
|
21
|
+
#
|
|
22
|
+
# @param mime_type [String] IANA media type of the audio, e.g. audio/wav.
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module Objectives
|
|
6
|
+
class SetToolCallContentRequestContentBlock < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute audio
|
|
8
|
+
#
|
|
9
|
+
# @return [Cadenya::Models::Objectives::SetToolCallContentRequestAudioBlock, nil]
|
|
10
|
+
optional :audio, -> { Cadenya::Objectives::SetToolCallContentRequestAudioBlock }
|
|
11
|
+
|
|
12
|
+
# @!attribute image
|
|
13
|
+
#
|
|
14
|
+
# @return [Cadenya::Models::Objectives::SetToolCallContentRequestImageBlock, nil]
|
|
15
|
+
optional :image, -> { Cadenya::Objectives::SetToolCallContentRequestImageBlock }
|
|
16
|
+
|
|
17
|
+
# @!attribute text
|
|
18
|
+
#
|
|
19
|
+
# @return [Cadenya::Models::Objectives::SetToolCallContentRequestTextBlock, nil]
|
|
20
|
+
optional :text, -> { Cadenya::Objectives::SetToolCallContentRequestTextBlock }
|
|
21
|
+
|
|
22
|
+
# @!method initialize(audio: nil, image: nil, text: nil)
|
|
23
|
+
# ContentBlock is a single block of tool call content supplied on input. Exactly
|
|
24
|
+
# one of the variants is set.
|
|
25
|
+
#
|
|
26
|
+
# @param audio [Cadenya::Models::Objectives::SetToolCallContentRequestAudioBlock]
|
|
27
|
+
# @param image [Cadenya::Models::Objectives::SetToolCallContentRequestImageBlock]
|
|
28
|
+
# @param text [Cadenya::Models::Objectives::SetToolCallContentRequestTextBlock]
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module Objectives
|
|
6
|
+
class SetToolCallContentRequestImageBlock < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute data
|
|
8
|
+
# Base64-encoded image bytes.
|
|
9
|
+
#
|
|
10
|
+
# @return [String]
|
|
11
|
+
required :data, String
|
|
12
|
+
|
|
13
|
+
# @!attribute mime_type
|
|
14
|
+
# IANA media type of the image, e.g. image/png.
|
|
15
|
+
#
|
|
16
|
+
# @return [String]
|
|
17
|
+
required :mime_type, String, api_name: :mimeType
|
|
18
|
+
|
|
19
|
+
# @!method initialize(data:, mime_type:)
|
|
20
|
+
# @param data [String] Base64-encoded image bytes.
|
|
21
|
+
#
|
|
22
|
+
# @param mime_type [String] IANA media type of the image, e.g. image/png.
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module Objectives
|
|
6
|
+
class SetToolCallContentRequestTextBlock < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute text
|
|
8
|
+
#
|
|
9
|
+
# @return [String]
|
|
10
|
+
required :text, String
|
|
11
|
+
|
|
12
|
+
# @!method initialize(text:)
|
|
13
|
+
# @param text [String]
|
|
14
|
+
end
|
|
15
|
+
end
|
|
16
|
+
end
|
|
17
|
+
end
|
|
@@ -24,6 +24,14 @@ module Cadenya
|
|
|
24
24
|
# @return [String, nil]
|
|
25
25
|
optional :cursor, String
|
|
26
26
|
|
|
27
|
+
# @!attribute execution_status
|
|
28
|
+
# Filter by tool call execution status. Useful for reverse-harness polling of bare
|
|
29
|
+
# tool calls waiting for externally supplied content
|
|
30
|
+
# (TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT).
|
|
31
|
+
#
|
|
32
|
+
# @return [Symbol, Cadenya::Models::Objectives::ToolCallListParams::ExecutionStatus, nil]
|
|
33
|
+
optional :execution_status, enum: -> { Cadenya::Objectives::ToolCallListParams::ExecutionStatus }
|
|
34
|
+
|
|
27
35
|
# @!attribute include_info
|
|
28
36
|
# When set to true you may use more of your alloted API rate-limit
|
|
29
37
|
#
|
|
@@ -42,13 +50,18 @@ module Cadenya
|
|
|
42
50
|
# @return [Symbol, Cadenya::Models::Objectives::ToolCallListParams::Status, nil]
|
|
43
51
|
optional :status, enum: -> { Cadenya::Objectives::ToolCallListParams::Status }
|
|
44
52
|
|
|
45
|
-
# @!method initialize(workspace_id:, objective_id:, cursor: nil, include_info: nil, limit: nil, status: nil, request_options: {})
|
|
53
|
+
# @!method initialize(workspace_id:, objective_id:, cursor: nil, execution_status: nil, include_info: nil, limit: nil, status: nil, request_options: {})
|
|
54
|
+
# Some parameter documentations has been truncated, see
|
|
55
|
+
# {Cadenya::Models::Objectives::ToolCallListParams} for more details.
|
|
56
|
+
#
|
|
46
57
|
# @param workspace_id [String]
|
|
47
58
|
#
|
|
48
59
|
# @param objective_id [String]
|
|
49
60
|
#
|
|
50
61
|
# @param cursor [String] Pagination cursor from previous response
|
|
51
62
|
#
|
|
63
|
+
# @param execution_status [Symbol, Cadenya::Models::Objectives::ToolCallListParams::ExecutionStatus] Filter by tool call execution status. Useful for reverse-harness
|
|
64
|
+
#
|
|
52
65
|
# @param include_info [Boolean] When set to true you may use more of your alloted API rate-limit
|
|
53
66
|
#
|
|
54
67
|
# @param limit [Integer] Maximum number of results to return
|
|
@@ -57,6 +70,23 @@ module Cadenya
|
|
|
57
70
|
#
|
|
58
71
|
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
59
72
|
|
|
73
|
+
# Filter by tool call execution status. Useful for reverse-harness polling of bare
|
|
74
|
+
# tool calls waiting for externally supplied content
|
|
75
|
+
# (TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT).
|
|
76
|
+
module ExecutionStatus
|
|
77
|
+
extend Cadenya::Internal::Type::Enum
|
|
78
|
+
|
|
79
|
+
TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED = :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
|
|
80
|
+
TOOL_CALL_EXECUTION_STATUS_PENDING = :TOOL_CALL_EXECUTION_STATUS_PENDING
|
|
81
|
+
TOOL_CALL_EXECUTION_STATUS_RUNNING = :TOOL_CALL_EXECUTION_STATUS_RUNNING
|
|
82
|
+
TOOL_CALL_EXECUTION_STATUS_COMPLETED = :TOOL_CALL_EXECUTION_STATUS_COMPLETED
|
|
83
|
+
TOOL_CALL_EXECUTION_STATUS_ERRORED = :TOOL_CALL_EXECUTION_STATUS_ERRORED
|
|
84
|
+
TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT = :TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT
|
|
85
|
+
|
|
86
|
+
# @!method self.values
|
|
87
|
+
# @return [Array<Symbol>]
|
|
88
|
+
end
|
|
89
|
+
|
|
60
90
|
# Filter by tool call status
|
|
61
91
|
module Status
|
|
62
92
|
extend Cadenya::Internal::Type::Enum
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module Objectives
|
|
6
|
+
# @see Cadenya::Resources::Objectives::ToolCalls#set_content
|
|
7
|
+
class ToolCallSetContentParams < Cadenya::Internal::Type::BaseModel
|
|
8
|
+
extend Cadenya::Internal::Type::RequestParameters::Converter
|
|
9
|
+
include Cadenya::Internal::Type::RequestParameters
|
|
10
|
+
|
|
11
|
+
# @!attribute workspace_id
|
|
12
|
+
#
|
|
13
|
+
# @return [String]
|
|
14
|
+
required :workspace_id, String
|
|
15
|
+
|
|
16
|
+
# @!attribute objective_id
|
|
17
|
+
#
|
|
18
|
+
# @return [String]
|
|
19
|
+
required :objective_id, String
|
|
20
|
+
|
|
21
|
+
# @!attribute tool_call_id
|
|
22
|
+
#
|
|
23
|
+
# @return [String]
|
|
24
|
+
required :tool_call_id, String
|
|
25
|
+
|
|
26
|
+
# @!attribute content
|
|
27
|
+
# The content to set on the tool call. Mirrors
|
|
28
|
+
# ObjectiveToolCallResult.ContentBlock but writable: media blocks carry raw data
|
|
29
|
+
# on input where the result-side carries a signed url on output.
|
|
30
|
+
#
|
|
31
|
+
# @return [Array<Cadenya::Models::Objectives::SetToolCallContentRequestContentBlock>]
|
|
32
|
+
required :content,
|
|
33
|
+
-> { Cadenya::Internal::Type::ArrayOf[Cadenya::Objectives::SetToolCallContentRequestContentBlock] }
|
|
34
|
+
|
|
35
|
+
# @!method initialize(workspace_id:, objective_id:, tool_call_id:, content:, request_options: {})
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Cadenya::Models::Objectives::ToolCallSetContentParams} for more details.
|
|
38
|
+
#
|
|
39
|
+
# @param workspace_id [String]
|
|
40
|
+
#
|
|
41
|
+
# @param objective_id [String]
|
|
42
|
+
#
|
|
43
|
+
# @param tool_call_id [String]
|
|
44
|
+
#
|
|
45
|
+
# @param content [Array<Cadenya::Models::Objectives::SetToolCallContentRequestContentBlock>] The content to set on the tool call. Mirrors
|
|
46
|
+
#
|
|
47
|
+
# @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
end
|
|
51
|
+
end
|
|
@@ -3,13 +3,45 @@
|
|
|
3
3
|
module Cadenya
|
|
4
4
|
module Models
|
|
5
5
|
class ToolCalled < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute arguments
|
|
7
|
+
# The arguments passed to the tool.
|
|
8
|
+
#
|
|
9
|
+
# @return [Hash{Symbol=>Object}, nil]
|
|
10
|
+
optional :arguments, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
|
|
11
|
+
|
|
12
|
+
# @!attribute config
|
|
13
|
+
# Config defines the adapter to use for the tool. This is used to determine how
|
|
14
|
+
# the tool is called. For example, if the tool is an HTTP tool, the adapter will
|
|
15
|
+
# be Http. If the tool is an inline tool, the adapter will be Inline.
|
|
16
|
+
#
|
|
17
|
+
# @return [Cadenya::Models::ToolSets::ToolSpecConfig, nil]
|
|
18
|
+
optional :config, -> { Cadenya::ToolSets::ToolSpecConfig }
|
|
19
|
+
|
|
20
|
+
# @!attribute tool
|
|
21
|
+
# CallableTool is a union that represents a tool that can be called by an agent.
|
|
22
|
+
# In Cadenya, a tool that is used within an agent objective might be a
|
|
23
|
+
# user-defined tool (IE: MCP, HTTP), another Agent (useful to separate context),
|
|
24
|
+
# or a Cadenya Tool (one Cadenya provides).
|
|
25
|
+
#
|
|
26
|
+
# @return [Cadenya::Models::CallableTool, nil]
|
|
27
|
+
optional :tool, -> { Cadenya::CallableTool }
|
|
28
|
+
|
|
6
29
|
# @!attribute tool_call_id
|
|
7
30
|
# The ID of the objective tool call record that was executed.
|
|
8
31
|
#
|
|
9
32
|
# @return [String, nil]
|
|
10
33
|
optional :tool_call_id, String, api_name: :toolCallId
|
|
11
34
|
|
|
12
|
-
# @!method initialize(tool_call_id: nil)
|
|
35
|
+
# @!method initialize(arguments: nil, config: nil, tool: nil, tool_call_id: nil)
|
|
36
|
+
# Some parameter documentations has been truncated, see
|
|
37
|
+
# {Cadenya::Models::ToolCalled} for more details.
|
|
38
|
+
#
|
|
39
|
+
# @param arguments [Hash{Symbol=>Object}] The arguments passed to the tool.
|
|
40
|
+
#
|
|
41
|
+
# @param config [Cadenya::Models::ToolSets::ToolSpecConfig] Config defines the adapter to use for the tool.
|
|
42
|
+
#
|
|
43
|
+
# @param tool [Cadenya::Models::CallableTool] CallableTool is a union that represents a tool that can be called by an agent. I
|
|
44
|
+
#
|
|
13
45
|
# @param tool_call_id [String] The ID of the objective tool call record that was executed.
|
|
14
46
|
end
|
|
15
47
|
end
|
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
module Cadenya
|
|
4
4
|
module Models
|
|
5
5
|
class ToolSetAdapter < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute bare
|
|
7
|
+
# Bare tool sets define tools without an execution adapter. A bare tool call
|
|
8
|
+
# doesn't fire anything: the objective's workflow pauses and waits for an external
|
|
9
|
+
# API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
|
|
10
|
+
# reverse harness that polls for pending tool calls, executes locally, and reports
|
|
11
|
+
# results back via SetToolCallContent).
|
|
12
|
+
#
|
|
13
|
+
# @return [Cadenya::Models::ToolSetAdapterBare, nil]
|
|
14
|
+
optional :bare, -> { Cadenya::ToolSetAdapterBare }
|
|
15
|
+
|
|
6
16
|
# @!attribute http
|
|
7
17
|
#
|
|
8
18
|
# @return [Cadenya::Models::ToolSetAdapterHTTP, nil]
|
|
@@ -18,9 +28,16 @@ module Cadenya
|
|
|
18
28
|
# @return [Cadenya::Models::ToolSetAdapterOpenAPI, nil]
|
|
19
29
|
optional :openapi, -> { Cadenya::ToolSetAdapterOpenAPI }
|
|
20
30
|
|
|
21
|
-
# @!method initialize(http: nil, mcp: nil, openapi: nil)
|
|
31
|
+
# @!method initialize(bare: nil, http: nil, mcp: nil, openapi: nil)
|
|
32
|
+
# Some parameter documentations has been truncated, see
|
|
33
|
+
# {Cadenya::Models::ToolSetAdapter} for more details.
|
|
34
|
+
#
|
|
35
|
+
# @param bare [Cadenya::Models::ToolSetAdapterBare] Bare tool sets define tools without an execution adapter. A bare tool
|
|
36
|
+
#
|
|
22
37
|
# @param http [Cadenya::Models::ToolSetAdapterHTTP]
|
|
38
|
+
#
|
|
23
39
|
# @param mcp [Cadenya::Models::ToolSetAdapterMcp]
|
|
40
|
+
#
|
|
24
41
|
# @param openapi [Cadenya::Models::ToolSetAdapterOpenAPI]
|
|
25
42
|
end
|
|
26
43
|
end
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
class ToolSetAdapterBare < Cadenya::Internal::Type::BaseModel
|
|
6
|
+
# @!attribute content_timeout
|
|
7
|
+
# How long to wait for content to be set before the tool call errors. If unset,
|
|
8
|
+
# the call waits indefinitely.
|
|
9
|
+
#
|
|
10
|
+
# @return [Integer, nil]
|
|
11
|
+
optional :content_timeout, Integer, api_name: :contentTimeout
|
|
12
|
+
|
|
13
|
+
# @!method initialize(content_timeout: nil)
|
|
14
|
+
# Some parameter documentations has been truncated, see
|
|
15
|
+
# {Cadenya::Models::ToolSetAdapterBare} for more details.
|
|
16
|
+
#
|
|
17
|
+
# Bare tool sets define tools without an execution adapter. A bare tool call
|
|
18
|
+
# doesn't fire anything: the objective's workflow pauses and waits for an external
|
|
19
|
+
# API consumer to set the tool call's content (e.g. human-in-the-loop tools, or a
|
|
20
|
+
# reverse harness that polls for pending tool calls, executes locally, and reports
|
|
21
|
+
# results back via SetToolCallContent).
|
|
22
|
+
#
|
|
23
|
+
# @param content_timeout [Integer] How long to wait for content to be set before the tool call errors.
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
end
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module Cadenya
|
|
4
|
+
module Models
|
|
5
|
+
module ToolSets
|
|
6
|
+
class ConfigBare < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!method initialize
|
|
8
|
+
# Marks the tool as bare: it has no execution adapter of its own and relies on the
|
|
9
|
+
# parent tool set being a Bare tool set. Present so a webhook consumer can tell a
|
|
10
|
+
# tool is bare from the tool data alone, without cross-referencing the tool set.
|
|
11
|
+
end
|
|
12
|
+
end
|
|
13
|
+
end
|
|
14
|
+
end
|
|
@@ -4,6 +4,14 @@ module Cadenya
|
|
|
4
4
|
module Models
|
|
5
5
|
module ToolSets
|
|
6
6
|
class ToolSpecConfig < Cadenya::Internal::Type::BaseModel
|
|
7
|
+
# @!attribute bare
|
|
8
|
+
# Marks the tool as bare: it has no execution adapter of its own and relies on the
|
|
9
|
+
# parent tool set being a Bare tool set. Present so a webhook consumer can tell a
|
|
10
|
+
# tool is bare from the tool data alone, without cross-referencing the tool set.
|
|
11
|
+
#
|
|
12
|
+
# @return [Cadenya::Models::ToolSets::ConfigBare, nil]
|
|
13
|
+
optional :bare, -> { Cadenya::ToolSets::ConfigBare }
|
|
14
|
+
|
|
7
15
|
# @!attribute http
|
|
8
16
|
#
|
|
9
17
|
# @return [Cadenya::Models::ToolSets::ConfigHTTP, nil]
|
|
@@ -19,13 +27,20 @@ module Cadenya
|
|
|
19
27
|
# @return [Cadenya::Models::ToolSets::ConfigOpenAPI, nil]
|
|
20
28
|
optional :openapi, -> { Cadenya::ToolSets::ConfigOpenAPI }
|
|
21
29
|
|
|
22
|
-
# @!method initialize(http: nil, mcp: nil, openapi: nil)
|
|
30
|
+
# @!method initialize(bare: nil, http: nil, mcp: nil, openapi: nil)
|
|
31
|
+
# Some parameter documentations has been truncated, see
|
|
32
|
+
# {Cadenya::Models::ToolSets::ToolSpecConfig} for more details.
|
|
33
|
+
#
|
|
23
34
|
# Config defines the adapter to use for the tool. This is used to determine how
|
|
24
35
|
# the tool is called. For example, if the tool is an HTTP tool, the adapter will
|
|
25
36
|
# be Http. If the tool is an inline tool, the adapter will be Inline.
|
|
26
37
|
#
|
|
38
|
+
# @param bare [Cadenya::Models::ToolSets::ConfigBare] Marks the tool as bare: it has no execution adapter of its own and
|
|
39
|
+
#
|
|
27
40
|
# @param http [Cadenya::Models::ToolSets::ConfigHTTP]
|
|
41
|
+
#
|
|
28
42
|
# @param mcp [Cadenya::Models::ToolSets::ConfigMcp]
|
|
43
|
+
#
|
|
29
44
|
# @param openapi [Cadenya::Models::ToolSets::ConfigOpenAPI]
|
|
30
45
|
end
|
|
31
46
|
end
|
data/lib/cadenya/models.rb
CHANGED
|
@@ -125,6 +125,8 @@ module Cadenya
|
|
|
125
125
|
|
|
126
126
|
CallableTool = Cadenya::Models::CallableTool
|
|
127
127
|
|
|
128
|
+
ContextLengths = Cadenya::Models::ContextLengths
|
|
129
|
+
|
|
128
130
|
ContextWindowCompacted = Cadenya::Models::ContextWindowCompacted
|
|
129
131
|
|
|
130
132
|
CreateOperationMetadata = Cadenya::Models::CreateOperationMetadata
|
|
@@ -183,6 +185,8 @@ module Cadenya
|
|
|
183
185
|
|
|
184
186
|
ObjectiveCreateParams = Cadenya::Models::ObjectiveCreateParams
|
|
185
187
|
|
|
188
|
+
ObjectiveDiagnostics = Cadenya::Models::ObjectiveDiagnostics
|
|
189
|
+
|
|
186
190
|
ObjectiveError = Cadenya::Models::ObjectiveError
|
|
187
191
|
|
|
188
192
|
ObjectiveEvent = Cadenya::Models::ObjectiveEvent
|
|
@@ -201,6 +205,8 @@ module Cadenya
|
|
|
201
205
|
|
|
202
206
|
ObjectiveListParams = Cadenya::Models::ObjectiveListParams
|
|
203
207
|
|
|
208
|
+
ObjectiveRetrieveDiagnosticsParams = Cadenya::Models::ObjectiveRetrieveDiagnosticsParams
|
|
209
|
+
|
|
204
210
|
ObjectiveRetrieveParams = Cadenya::Models::ObjectiveRetrieveParams
|
|
205
211
|
|
|
206
212
|
Objectives = Cadenya::Models::Objectives
|
|
@@ -257,6 +263,8 @@ module Cadenya
|
|
|
257
263
|
|
|
258
264
|
ToolSetAdapter = Cadenya::Models::ToolSetAdapter
|
|
259
265
|
|
|
266
|
+
ToolSetAdapterBare = Cadenya::Models::ToolSetAdapterBare
|
|
267
|
+
|
|
260
268
|
ToolSetAdapterHTTP = Cadenya::Models::ToolSetAdapterHTTP
|
|
261
269
|
|
|
262
270
|
ToolSetAdapterMcp = Cadenya::Models::ToolSetAdapterMcp
|