cadenya 0.11.0 → 0.13.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.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/agent_spec.rb +23 -1
  5. data/lib/cadenya/models/agents/agent_variation_spec.rb +1 -22
  6. data/lib/cadenya/models/memory_layer_list_params.rb +22 -1
  7. data/lib/cadenya/models/memory_layer_spec.rb +19 -1
  8. data/lib/cadenya/models/objective.rb +38 -1
  9. data/lib/cadenya/models/objective_create_params.rb +28 -1
  10. data/lib/cadenya/models/objectives/objective_tool_call_data.rb +1 -9
  11. data/lib/cadenya/models/objectives/objective_tool_call_result.rb +27 -0
  12. data/lib/cadenya/models/objectives/objective_tool_call_result_audio_block.rb +46 -0
  13. data/lib/cadenya/models/objectives/objective_tool_call_result_content_block.rb +34 -0
  14. data/lib/cadenya/models/objectives/objective_tool_call_result_image_block.rb +46 -0
  15. data/lib/cadenya/models/objectives/objective_tool_call_result_text_block.rb +21 -0
  16. data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +102 -0
  17. data/lib/cadenya/models/objectives/tool_call_retrieve_params.rb +34 -0
  18. data/lib/cadenya/models/tool_result.rb +15 -7
  19. data/lib/cadenya/resources/memory_layers.rb +10 -1
  20. data/lib/cadenya/resources/objectives/tool_calls.rb +39 -0
  21. data/lib/cadenya/resources/objectives.rb +3 -1
  22. data/lib/cadenya/version.rb +1 -1
  23. data/lib/cadenya.rb +7 -0
  24. data/rbi/cadenya/models/agent_spec.rbi +34 -0
  25. data/rbi/cadenya/models/agents/agent_variation_spec.rbi +0 -32
  26. data/rbi/cadenya/models/memory_layer_list_params.rbi +26 -0
  27. data/rbi/cadenya/models/memory_layer_spec.rbi +26 -0
  28. data/rbi/cadenya/models/objective.rbi +57 -0
  29. data/rbi/cadenya/models/objective_create_params.rbi +48 -0
  30. data/rbi/cadenya/models/objectives/objective_tool_call_data.rbi +0 -11
  31. data/rbi/cadenya/models/objectives/objective_tool_call_result.rbi +54 -0
  32. data/rbi/cadenya/models/objectives/objective_tool_call_result_audio_block.rbi +69 -0
  33. data/rbi/cadenya/models/objectives/objective_tool_call_result_content_block.rbi +90 -0
  34. data/rbi/cadenya/models/objectives/objective_tool_call_result_image_block.rbi +69 -0
  35. data/rbi/cadenya/models/objectives/objective_tool_call_result_text_block.rbi +31 -0
  36. data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +219 -0
  37. data/rbi/cadenya/models/objectives/tool_call_retrieve_params.rbi +58 -0
  38. data/rbi/cadenya/models/tool_result.rbi +34 -12
  39. data/rbi/cadenya/resources/memory_layers.rbi +8 -0
  40. data/rbi/cadenya/resources/objectives/tool_calls.rbi +20 -0
  41. data/rbi/cadenya/resources/objectives.rbi +4 -0
  42. data/sig/cadenya/models/agent_spec.rbs +14 -0
  43. data/sig/cadenya/models/agents/agent_variation_spec.rbs +0 -14
  44. data/sig/cadenya/models/memory_layer_list_params.rbs +14 -0
  45. data/sig/cadenya/models/memory_layer_spec.rbs +14 -0
  46. data/sig/cadenya/models/objective.rbs +25 -0
  47. data/sig/cadenya/models/objective_create_params.rbs +21 -0
  48. data/sig/cadenya/models/objectives/objective_tool_call_data.rbs +0 -7
  49. data/sig/cadenya/models/objectives/objective_tool_call_result.rbs +24 -0
  50. data/sig/cadenya/models/objectives/objective_tool_call_result_audio_block.rbs +34 -0
  51. data/sig/cadenya/models/objectives/objective_tool_call_result_content_block.rbs +46 -0
  52. data/sig/cadenya/models/objectives/objective_tool_call_result_image_block.rbs +34 -0
  53. data/sig/cadenya/models/objectives/objective_tool_call_result_text_block.rbs +17 -0
  54. data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +91 -0
  55. data/sig/cadenya/models/objectives/tool_call_retrieve_params.rbs +34 -0
  56. data/sig/cadenya/models/tool_result.rbs +15 -9
  57. data/sig/cadenya/resources/memory_layers.rbs +2 -0
  58. data/sig/cadenya/resources/objectives/tool_calls.rbs +7 -0
  59. data/sig/cadenya/resources/objectives.rbs +1 -0
  60. metadata +23 -2
@@ -0,0 +1,54 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResult = Objectives::ObjectiveToolCallResult
6
+
7
+ module Objectives
8
+ class ObjectiveToolCallResult < Cadenya::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Cadenya::Objectives::ObjectiveToolCallResult,
13
+ Cadenya::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig do
18
+ returns(
19
+ T::Array[Cadenya::Objectives::ObjectiveToolCallResultContentBlock]
20
+ )
21
+ end
22
+ attr_accessor :content
23
+
24
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
25
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
26
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
27
+ # rather than inline bytes.
28
+ sig do
29
+ params(
30
+ content:
31
+ T::Array[
32
+ Cadenya::Objectives::ObjectiveToolCallResultContentBlock::OrHash
33
+ ]
34
+ ).returns(T.attached_class)
35
+ end
36
+ def self.new(content:)
37
+ end
38
+
39
+ sig do
40
+ override.returns(
41
+ {
42
+ content:
43
+ T::Array[
44
+ Cadenya::Objectives::ObjectiveToolCallResultContentBlock
45
+ ]
46
+ }
47
+ )
48
+ end
49
+ def to_hash
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,69 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultAudioBlock =
6
+ Objectives::ObjectiveToolCallResultAudioBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultAudioBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # When the signed URL expires.
19
+ sig { returns(Time) }
20
+ attr_accessor :expires_at
21
+
22
+ # IANA media type of the stored audio, e.g. audio/wav.
23
+ sig { returns(String) }
24
+ attr_accessor :mime_type
25
+
26
+ # Size of the stored audio in bytes.
27
+ sig { returns(String) }
28
+ attr_accessor :size_bytes
29
+
30
+ # Short-lived signed URL to download the stored audio.
31
+ sig { returns(String) }
32
+ attr_accessor :url
33
+
34
+ sig do
35
+ params(
36
+ expires_at: Time,
37
+ mime_type: String,
38
+ size_bytes: String,
39
+ url: String
40
+ ).returns(T.attached_class)
41
+ end
42
+ def self.new(
43
+ # When the signed URL expires.
44
+ expires_at:,
45
+ # IANA media type of the stored audio, e.g. audio/wav.
46
+ mime_type:,
47
+ # Size of the stored audio in bytes.
48
+ size_bytes:,
49
+ # Short-lived signed URL to download the stored audio.
50
+ url:
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ expires_at: Time,
58
+ mime_type: String,
59
+ size_bytes: String,
60
+ url: String
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,90 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultContentBlock =
6
+ Objectives::ObjectiveToolCallResultContentBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultContentBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultContentBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig do
19
+ returns(
20
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultAudioBlock)
21
+ )
22
+ end
23
+ attr_reader :audio
24
+
25
+ sig do
26
+ params(
27
+ audio:
28
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock::OrHash
29
+ ).void
30
+ end
31
+ attr_writer :audio
32
+
33
+ sig do
34
+ returns(
35
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultImageBlock)
36
+ )
37
+ end
38
+ attr_reader :image
39
+
40
+ sig do
41
+ params(
42
+ image:
43
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock::OrHash
44
+ ).void
45
+ end
46
+ attr_writer :image
47
+
48
+ sig do
49
+ returns(
50
+ T.nilable(Cadenya::Objectives::ObjectiveToolCallResultTextBlock)
51
+ )
52
+ end
53
+ attr_reader :text
54
+
55
+ sig do
56
+ params(
57
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock::OrHash
58
+ ).void
59
+ end
60
+ attr_writer :text
61
+
62
+ # ContentBlock is a single block of tool result content. Exactly one of the
63
+ # variants is set.
64
+ sig do
65
+ params(
66
+ audio:
67
+ Cadenya::Objectives::ObjectiveToolCallResultAudioBlock::OrHash,
68
+ image:
69
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock::OrHash,
70
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock::OrHash
71
+ ).returns(T.attached_class)
72
+ end
73
+ def self.new(audio: nil, image: nil, text: nil)
74
+ end
75
+
76
+ sig do
77
+ override.returns(
78
+ {
79
+ audio: Cadenya::Objectives::ObjectiveToolCallResultAudioBlock,
80
+ image: Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
81
+ text: Cadenya::Objectives::ObjectiveToolCallResultTextBlock
82
+ }
83
+ )
84
+ end
85
+ def to_hash
86
+ end
87
+ end
88
+ end
89
+ end
90
+ end
@@ -0,0 +1,69 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultImageBlock =
6
+ Objectives::ObjectiveToolCallResultImageBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultImageBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultImageBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ # When the signed URL expires.
19
+ sig { returns(Time) }
20
+ attr_accessor :expires_at
21
+
22
+ # IANA media type of the stored image, e.g. image/png.
23
+ sig { returns(String) }
24
+ attr_accessor :mime_type
25
+
26
+ # Size of the stored image in bytes.
27
+ sig { returns(String) }
28
+ attr_accessor :size_bytes
29
+
30
+ # Short-lived signed URL to download the stored image.
31
+ sig { returns(String) }
32
+ attr_accessor :url
33
+
34
+ sig do
35
+ params(
36
+ expires_at: Time,
37
+ mime_type: String,
38
+ size_bytes: String,
39
+ url: String
40
+ ).returns(T.attached_class)
41
+ end
42
+ def self.new(
43
+ # When the signed URL expires.
44
+ expires_at:,
45
+ # IANA media type of the stored image, e.g. image/png.
46
+ mime_type:,
47
+ # Size of the stored image in bytes.
48
+ size_bytes:,
49
+ # Short-lived signed URL to download the stored image.
50
+ url:
51
+ )
52
+ end
53
+
54
+ sig do
55
+ override.returns(
56
+ {
57
+ expires_at: Time,
58
+ mime_type: String,
59
+ size_bytes: String,
60
+ url: String
61
+ }
62
+ )
63
+ end
64
+ def to_hash
65
+ end
66
+ end
67
+ end
68
+ end
69
+ end
@@ -0,0 +1,31 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallResultTextBlock =
6
+ Objectives::ObjectiveToolCallResultTextBlock
7
+
8
+ module Objectives
9
+ class ObjectiveToolCallResultTextBlock < Cadenya::Internal::Type::BaseModel
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ObjectiveToolCallResultTextBlock,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :text
20
+
21
+ sig { params(text: String).returns(T.attached_class) }
22
+ def self.new(text:)
23
+ end
24
+
25
+ sig { override.returns({ text: String }) }
26
+ def to_hash
27
+ end
28
+ end
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,219 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ ObjectiveToolCallWithResult = Objectives::ObjectiveToolCallWithResult
6
+
7
+ module Objectives
8
+ class ObjectiveToolCallWithResult < Cadenya::Internal::Type::BaseModel
9
+ OrHash =
10
+ T.type_alias do
11
+ T.any(
12
+ Cadenya::Objectives::ObjectiveToolCallWithResult,
13
+ Cadenya::Internal::AnyHash
14
+ )
15
+ end
16
+
17
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallData) }
18
+ attr_reader :data
19
+
20
+ sig do
21
+ params(data: Cadenya::Objectives::ObjectiveToolCallData::OrHash).void
22
+ end
23
+ attr_writer :data
24
+
25
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallInfo) }
26
+ attr_reader :info
27
+
28
+ sig do
29
+ params(info: Cadenya::Objectives::ObjectiveToolCallInfo::OrHash).void
30
+ end
31
+ attr_writer :info
32
+
33
+ # Metadata for ephemeral operations and activities (e.g., objectives, executions,
34
+ # runs)
35
+ sig { returns(Cadenya::OperationMetadata) }
36
+ attr_reader :metadata
37
+
38
+ sig { params(metadata: Cadenya::OperationMetadata::OrHash).void }
39
+ attr_writer :metadata
40
+
41
+ # Current status of the tool call
42
+ sig do
43
+ returns(
44
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
45
+ )
46
+ end
47
+ attr_accessor :status
48
+
49
+ sig do
50
+ returns(
51
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
52
+ )
53
+ end
54
+ attr_accessor :execution_status
55
+
56
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
57
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
58
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
59
+ # rather than inline bytes.
60
+ sig { returns(T.nilable(Cadenya::Objectives::ObjectiveToolCallResult)) }
61
+ attr_reader :result
62
+
63
+ sig do
64
+ params(
65
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
66
+ ).void
67
+ end
68
+ attr_writer :result
69
+
70
+ # ObjectiveToolCallWithResult is an ObjectiveToolCall plus the content the tool
71
+ # returned. Returned by GetObjectiveToolCall.
72
+ sig do
73
+ params(
74
+ data: Cadenya::Objectives::ObjectiveToolCallData::OrHash,
75
+ execution_status:
76
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::OrSymbol,
77
+ info: Cadenya::Objectives::ObjectiveToolCallInfo::OrHash,
78
+ metadata: Cadenya::OperationMetadata::OrHash,
79
+ status:
80
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::OrSymbol,
81
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
82
+ ).returns(T.attached_class)
83
+ end
84
+ def self.new(
85
+ data:,
86
+ execution_status:,
87
+ info:,
88
+ # Metadata for ephemeral operations and activities (e.g., objectives, executions,
89
+ # runs)
90
+ metadata:,
91
+ # Current status of the tool call
92
+ status:,
93
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
94
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
95
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
96
+ # rather than inline bytes.
97
+ result: nil
98
+ )
99
+ end
100
+
101
+ sig do
102
+ override.returns(
103
+ {
104
+ data: Cadenya::Objectives::ObjectiveToolCallData,
105
+ execution_status:
106
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol,
107
+ info: Cadenya::Objectives::ObjectiveToolCallInfo,
108
+ metadata: Cadenya::OperationMetadata,
109
+ status:
110
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol,
111
+ result: Cadenya::Objectives::ObjectiveToolCallResult
112
+ }
113
+ )
114
+ end
115
+ def to_hash
116
+ end
117
+
118
+ module ExecutionStatus
119
+ extend Cadenya::Internal::Type::Enum
120
+
121
+ TaggedSymbol =
122
+ T.type_alias do
123
+ T.all(
124
+ Symbol,
125
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus
126
+ )
127
+ end
128
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
129
+
130
+ TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED =
131
+ T.let(
132
+ :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED,
133
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
134
+ )
135
+ TOOL_CALL_EXECUTION_STATUS_PENDING =
136
+ T.let(
137
+ :TOOL_CALL_EXECUTION_STATUS_PENDING,
138
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
139
+ )
140
+ TOOL_CALL_EXECUTION_STATUS_RUNNING =
141
+ T.let(
142
+ :TOOL_CALL_EXECUTION_STATUS_RUNNING,
143
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
144
+ )
145
+ TOOL_CALL_EXECUTION_STATUS_COMPLETED =
146
+ T.let(
147
+ :TOOL_CALL_EXECUTION_STATUS_COMPLETED,
148
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
149
+ )
150
+ TOOL_CALL_EXECUTION_STATUS_ERRORED =
151
+ T.let(
152
+ :TOOL_CALL_EXECUTION_STATUS_ERRORED,
153
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
154
+ )
155
+
156
+ sig do
157
+ override.returns(
158
+ T::Array[
159
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
160
+ ]
161
+ )
162
+ end
163
+ def self.values
164
+ end
165
+ end
166
+
167
+ # Current status of the tool call
168
+ module Status
169
+ extend Cadenya::Internal::Type::Enum
170
+
171
+ TaggedSymbol =
172
+ T.type_alias do
173
+ T.all(
174
+ Symbol,
175
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status
176
+ )
177
+ end
178
+ OrSymbol = T.type_alias { T.any(Symbol, String) }
179
+
180
+ TOOL_CALL_STATUS_UNSPECIFIED =
181
+ T.let(
182
+ :TOOL_CALL_STATUS_UNSPECIFIED,
183
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
184
+ )
185
+ TOOL_CALL_STATUS_AUTO_APPROVED =
186
+ T.let(
187
+ :TOOL_CALL_STATUS_AUTO_APPROVED,
188
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
189
+ )
190
+ TOOL_CALL_STATUS_WAITING_FOR_APPROVAL =
191
+ T.let(
192
+ :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL,
193
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
194
+ )
195
+ TOOL_CALL_STATUS_APPROVED =
196
+ T.let(
197
+ :TOOL_CALL_STATUS_APPROVED,
198
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
199
+ )
200
+ TOOL_CALL_STATUS_DENIED =
201
+ T.let(
202
+ :TOOL_CALL_STATUS_DENIED,
203
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
204
+ )
205
+
206
+ sig do
207
+ override.returns(
208
+ T::Array[
209
+ Cadenya::Objectives::ObjectiveToolCallWithResult::Status::TaggedSymbol
210
+ ]
211
+ )
212
+ end
213
+ def self.values
214
+ end
215
+ end
216
+ end
217
+ end
218
+ end
219
+ end
@@ -0,0 +1,58 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Objectives
6
+ class ToolCallRetrieveParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ OrHash =
11
+ T.type_alias do
12
+ T.any(
13
+ Cadenya::Objectives::ToolCallRetrieveParams,
14
+ Cadenya::Internal::AnyHash
15
+ )
16
+ end
17
+
18
+ sig { returns(String) }
19
+ attr_accessor :workspace_id
20
+
21
+ sig { returns(String) }
22
+ attr_accessor :objective_id
23
+
24
+ sig { returns(String) }
25
+ attr_accessor :tool_call_id
26
+
27
+ sig do
28
+ params(
29
+ workspace_id: String,
30
+ objective_id: String,
31
+ tool_call_id: String,
32
+ request_options: Cadenya::RequestOptions::OrHash
33
+ ).returns(T.attached_class)
34
+ end
35
+ def self.new(
36
+ workspace_id:,
37
+ objective_id:,
38
+ tool_call_id:,
39
+ request_options: {}
40
+ )
41
+ end
42
+
43
+ sig do
44
+ override.returns(
45
+ {
46
+ workspace_id: String,
47
+ objective_id: String,
48
+ tool_call_id: String,
49
+ request_options: Cadenya::RequestOptions
50
+ }
51
+ )
52
+ end
53
+ def to_hash
54
+ end
55
+ end
56
+ end
57
+ end
58
+ end
@@ -6,25 +6,47 @@ module Cadenya
6
6
  OrHash =
7
7
  T.type_alias { T.any(Cadenya::ToolResult, Cadenya::Internal::AnyHash) }
8
8
 
9
- sig { returns(T.nilable(String)) }
10
- attr_reader :content
9
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
10
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
11
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
12
+ # rather than inline bytes.
13
+ sig { returns(Cadenya::Objectives::ObjectiveToolCallResult) }
14
+ attr_reader :result
11
15
 
12
- sig { params(content: String).void }
13
- attr_writer :content
14
-
15
- sig { returns(T.nilable(String)) }
16
- attr_reader :tool_call_id
16
+ sig do
17
+ params(
18
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash
19
+ ).void
20
+ end
21
+ attr_writer :result
17
22
 
18
- sig { params(tool_call_id: String).void }
19
- attr_writer :tool_call_id
23
+ sig { returns(String) }
24
+ attr_accessor :tool_call_id
20
25
 
21
26
  sig do
22
- params(content: String, tool_call_id: String).returns(T.attached_class)
27
+ params(
28
+ result: Cadenya::Objectives::ObjectiveToolCallResult::OrHash,
29
+ tool_call_id: String
30
+ ).returns(T.attached_class)
23
31
  end
24
- def self.new(content: nil, tool_call_id: nil)
32
+ def self.new(
33
+ # ObjectiveToolCallResult is the content a tool returned after execution. Tools
34
+ # can return multiple content blocks, and blocks can be multi-modal (text, image,
35
+ # audio). Media blocks are stored by Cadenya and served as short-lived signed URLs
36
+ # rather than inline bytes.
37
+ result:,
38
+ tool_call_id:
39
+ )
25
40
  end
26
41
 
27
- sig { override.returns({ content: String, tool_call_id: String }) }
42
+ sig do
43
+ override.returns(
44
+ {
45
+ result: Cadenya::Objectives::ObjectiveToolCallResult,
46
+ tool_call_id: String
47
+ }
48
+ )
49
+ end
28
50
  def to_hash
29
51
  end
30
52
  end
@@ -84,8 +84,10 @@ module Cadenya
84
84
  sig do
85
85
  params(
86
86
  workspace_id: String,
87
+ agent_id: String,
87
88
  bundle_key: String,
88
89
  cursor: String,
90
+ episodic_key_prefix: String,
89
91
  include_info: T::Boolean,
90
92
  limit: Integer,
91
93
  prefix: String,
@@ -97,10 +99,16 @@ module Cadenya
97
99
  end
98
100
  def list(
99
101
  workspace_id,
102
+ # Filter to episodic layers belonging to this agent.
103
+ agent_id: nil,
100
104
  # Filter by bundle_key — return only resources owned by this bundle.
101
105
  bundle_key: nil,
102
106
  # Pagination cursor from previous response
103
107
  cursor: nil,
108
+ # Filter to episodic layers whose episodic key starts with this prefix (e.g.
109
+ # "customer/" matches "customer/42" and "customer/43"). Useful for namespaced
110
+ # keys, similar to a redis key scan.
111
+ episodic_key_prefix: nil,
104
112
  # When set to true you may use more of your alloted API rate-limit
105
113
  include_info: nil,
106
114
  # Maximum number of results to return