cadenya 0.29.0 → 0.31.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 (69) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/agents/agent_variation_spec_constraints.rb +15 -1
  5. data/lib/cadenya/models/agents/webhook_delivery_data.rb +1 -0
  6. data/lib/cadenya/models/agents/webhook_delivery_list_params.rb +1 -0
  7. data/lib/cadenya/models/objective.rb +1 -0
  8. data/lib/cadenya/models/objective_event_data.rb +37 -1
  9. data/lib/cadenya/models/objective_list_params.rb +1 -0
  10. data/lib/cadenya/models/objectives/objective_tool_call.rb +1 -0
  11. data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +1 -0
  12. data/lib/cadenya/models/objectives/set_tool_call_content_request_audio_block.rb +26 -0
  13. data/lib/cadenya/models/objectives/set_tool_call_content_request_content_block.rb +32 -0
  14. data/lib/cadenya/models/objectives/set_tool_call_content_request_image_block.rb +26 -0
  15. data/lib/cadenya/models/objectives/set_tool_call_content_request_text_block.rb +17 -0
  16. data/lib/cadenya/models/objectives/tool_call_list_params.rb +31 -1
  17. data/lib/cadenya/models/objectives/tool_call_set_content_params.rb +51 -0
  18. data/lib/cadenya/models/tool_called.rb +33 -1
  19. data/lib/cadenya/models/tool_set_adapter.rb +18 -1
  20. data/lib/cadenya/models/tool_set_adapter_bare.rb +26 -0
  21. data/lib/cadenya/models/tool_sets/config_bare.rb +14 -0
  22. data/lib/cadenya/models/tool_sets/tool_spec_config.rb +16 -1
  23. data/lib/cadenya/models.rb +2 -0
  24. data/lib/cadenya/resources/objectives/tool_calls.rb +53 -2
  25. data/lib/cadenya/version.rb +1 -1
  26. data/lib/cadenya.rb +7 -0
  27. data/rbi/cadenya/models/agents/agent_variation_spec_constraints.rbi +25 -4
  28. data/rbi/cadenya/models/agents/webhook_delivery_data.rbi +5 -0
  29. data/rbi/cadenya/models/agents/webhook_delivery_list_params.rbi +5 -0
  30. data/rbi/cadenya/models/objective.rbi +2 -0
  31. data/rbi/cadenya/models/objective_event_data.rbi +59 -0
  32. data/rbi/cadenya/models/objective_list_params.rbi +5 -0
  33. data/rbi/cadenya/models/objectives/objective_tool_call.rbi +5 -0
  34. data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +5 -0
  35. data/rbi/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbi +40 -0
  36. data/rbi/cadenya/models/objectives/set_tool_call_content_request_content_block.rbi +89 -0
  37. data/rbi/cadenya/models/objectives/set_tool_call_content_request_image_block.rbi +40 -0
  38. data/rbi/cadenya/models/objectives/set_tool_call_content_request_text_block.rbi +28 -0
  39. data/rbi/cadenya/models/objectives/tool_call_list_params.rbi +85 -0
  40. data/rbi/cadenya/models/objectives/tool_call_set_content_params.rbi +80 -0
  41. data/rbi/cadenya/models/tool_called.rbi +55 -2
  42. data/rbi/cadenya/models/tool_set_adapter.rbi +24 -1
  43. data/rbi/cadenya/models/tool_set_adapter_bare.rbi +37 -0
  44. data/rbi/cadenya/models/tool_sets/config_bare.rbi +25 -0
  45. data/rbi/cadenya/models/tool_sets/tool_spec_config.rbi +20 -1
  46. data/rbi/cadenya/models.rbi +2 -0
  47. data/rbi/cadenya/resources/objectives/tool_calls.rbi +37 -0
  48. data/sig/cadenya/models/agents/agent_variation_spec_constraints.rbs +15 -2
  49. data/sig/cadenya/models/agents/webhook_delivery_data.rbs +2 -0
  50. data/sig/cadenya/models/agents/webhook_delivery_list_params.rbs +2 -0
  51. data/sig/cadenya/models/objective.rbs +2 -0
  52. data/sig/cadenya/models/objective_event_data.rbs +21 -0
  53. data/sig/cadenya/models/objective_list_params.rbs +2 -0
  54. data/sig/cadenya/models/objectives/objective_tool_call.rbs +2 -0
  55. data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +2 -0
  56. data/sig/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbs +18 -0
  57. data/sig/cadenya/models/objectives/set_tool_call_content_request_content_block.rbs +44 -0
  58. data/sig/cadenya/models/objectives/set_tool_call_content_request_image_block.rbs +18 -0
  59. data/sig/cadenya/models/objectives/set_tool_call_content_request_text_block.rbs +15 -0
  60. data/sig/cadenya/models/objectives/tool_call_list_params.rbs +30 -0
  61. data/sig/cadenya/models/objectives/tool_call_set_content_params.rbs +43 -0
  62. data/sig/cadenya/models/tool_called.rbs +33 -3
  63. data/sig/cadenya/models/tool_set_adapter.rbs +7 -0
  64. data/sig/cadenya/models/tool_set_adapter_bare.rbs +15 -0
  65. data/sig/cadenya/models/tool_sets/config_bare.rbs +13 -0
  66. data/sig/cadenya/models/tool_sets/tool_spec_config.rbs +9 -0
  67. data/sig/cadenya/models.rbs +2 -0
  68. data/sig/cadenya/resources/objectives/tool_calls.rbs +9 -0
  69. metadata +23 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d00d248c33699a4a01039ddd4d6123e9648ff8bc367c20a8e65e4885851cb60e
4
- data.tar.gz: 81189360913ae6f04eb92b83ffdad219dade81eeb6eccb400318d39e89bc8e47
3
+ metadata.gz: dac0e8c6022a63f3c33c62fca0c5bb8ba01434057ed39f8550e2e47069c6e701
4
+ data.tar.gz: 8612305347fd260fc37629022d774ef83a6b8a964f76dcfaca996810f86a4ecc
5
5
  SHA512:
6
- metadata.gz: c276b5b5f6499525a452490dc7df6de4ffd9109a666aa712dbcbc201420a9de9ef0cfbffae86174836e055bc31272a72303de43aa6c0ceb4c1de9123f4531ab3
7
- data.tar.gz: c2f2abd24fa38008337bda2931e8c27e9e39ca1412a9a523ae3d678766e62f58a855de3373a533e4c9733b327ae40286764161dd2e7ef823cf65fa99cc7b820f
6
+ metadata.gz: 6805e7d3a55694fbcbcbaba00c56dbfd7eae5b28e5a6b9b7a2e524ac902cfb1f6a79fa03dd282b7dde3d88954b51d7d7c6a3b30ec88e6f71eb83b3a76f220c84
7
+ data.tar.gz: 10847a32205e46f2b42a110d458cb1236dafcbc1d55bce5aabc80dcf334aee9dba326b7a660ee98e05f0bc35fddd60f7a5072f602f1b7936d41ca50c77d694c6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.31.0 (2026-07-07)
4
+
5
+ Full Changelog: [v0.30.0...v0.31.0](https://github.com/cadenya/cadenya-ruby/compare/v0.30.0...v0.31.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([7b43203](https://github.com/cadenya/cadenya-ruby/commit/7b43203524536c3646637effe7f6c0babb3911a7))
10
+
11
+ ## 0.30.0 (2026-07-06)
12
+
13
+ Full Changelog: [v0.29.0...v0.30.0](https://github.com/cadenya/cadenya-ruby/compare/v0.29.0...v0.30.0)
14
+
15
+ ### Features
16
+
17
+ * Bare toolset proto contract: Bare adapter, SetToolCallContent, WAITING_FOR_CONTENT (ENG-385) ([075baa7](https://github.com/cadenya/cadenya-ruby/commit/075baa7b039c12f2f097c7b688935f3e14d4f98f))
18
+
3
19
  ## 0.29.0 (2026-07-05)
4
20
 
5
21
  Full Changelog: [v0.28.0...v0.29.0](https://github.com/cadenya/cadenya-ruby/compare/v0.28.0...v0.29.0)
data/README.md CHANGED
@@ -17,7 +17,7 @@ To use this gem, install via Bundler by adding the following to your application
17
17
  <!-- x-release-please-start-version -->
18
18
 
19
19
  ```ruby
20
- gem "cadenya", "~> 0.29.0"
20
+ gem "cadenya", "~> 0.31.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -4,6 +4,15 @@ module Cadenya
4
4
  module Models
5
5
  module Agents
6
6
  class AgentVariationSpecConstraints < Cadenya::Internal::Type::BaseModel
7
+ # @!attribute inactivity_timeout
8
+ # How long an objective may sit with no activity (no user messages, no LLM calls)
9
+ # before it is finalized as timed out. Between 1 minute and 24 hours. When not
10
+ # set, objectives are still swept at the system-wide 24 hour maximum — every
11
+ # objective eventually reaches a terminal state.
12
+ #
13
+ # @return [Integer, nil]
14
+ optional :inactivity_timeout, Integer, api_name: :inactivityTimeout
15
+
7
16
  # @!attribute max_sub_objectives
8
17
  # The maximum number of sub-objectives that can be created. 0 means no limit.
9
18
  #
@@ -16,7 +25,12 @@ module Cadenya
16
25
  # @return [Integer, nil]
17
26
  optional :max_tool_calls, Integer, api_name: :maxToolCalls
18
27
 
19
- # @!method initialize(max_sub_objectives: nil, max_tool_calls: nil)
28
+ # @!method initialize(inactivity_timeout: nil, max_sub_objectives: nil, max_tool_calls: nil)
29
+ # Some parameter documentations has been truncated, see
30
+ # {Cadenya::Models::Agents::AgentVariationSpecConstraints} for more details.
31
+ #
32
+ # @param inactivity_timeout [Integer] How long an objective may sit with no activity (no user messages, no
33
+ #
20
34
  # @param max_sub_objectives [Integer] The maximum number of sub-objectives that can be created. 0 means no limit.
21
35
  #
22
36
  # @param max_tool_calls [Integer] The maximum number of tool calls that can be made. 0 means no limit.
@@ -136,6 +136,7 @@ module Cadenya
136
136
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
137
137
  OBJECTIVE_EVENT_TYPE_FINALIZED = :OBJECTIVE_EVENT_TYPE_FINALIZED
138
138
  OBJECTIVE_EVENT_TYPE_NOTICE = :OBJECTIVE_EVENT_TYPE_NOTICE
139
+ OBJECTIVE_EVENT_TYPE_TIMED_OUT = :OBJECTIVE_EVENT_TYPE_TIMED_OUT
139
140
 
140
141
  # @!method self.values
141
142
  # @return [Array<Symbol>]
@@ -78,6 +78,7 @@ module Cadenya
78
78
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
79
79
  OBJECTIVE_EVENT_TYPE_FINALIZED = :OBJECTIVE_EVENT_TYPE_FINALIZED
80
80
  OBJECTIVE_EVENT_TYPE_NOTICE = :OBJECTIVE_EVENT_TYPE_NOTICE
81
+ OBJECTIVE_EVENT_TYPE_TIMED_OUT = :OBJECTIVE_EVENT_TYPE_TIMED_OUT
81
82
 
82
83
  # @!method self.values
83
84
  # @return [Array<Symbol>]
@@ -165,6 +165,7 @@ module Cadenya
165
165
  STATE_FAILED = :STATE_FAILED
166
166
  STATE_CANCELLED = :STATE_CANCELLED
167
167
  STATE_FINALIZED = :STATE_FINALIZED
168
+ STATE_TIMED_OUT = :STATE_TIMED_OUT
168
169
 
169
170
  # @!method self.values
170
171
  # @return [Array<Symbol>]
@@ -64,6 +64,17 @@ module Cadenya
64
64
  # @return [Cadenya::Models::SubAgentUpdated, nil]
65
65
  optional :sub_agent_updated, -> { Cadenya::SubAgentUpdated }, api_name: :subAgentUpdated
66
66
 
67
+ # @!attribute timed_out
68
+ # ObjectiveTimedOut is the terminal event written when an objective is finalized
69
+ # by the inactivity sweep because it saw no activity (no user messages, no LLM
70
+ # calls) within its variation's inactivity timeout — or the system-wide 24 hour
71
+ # maximum when no timeout is configured. The objective produces no output. After
72
+ # this event, the objective is super-terminal: no further iterations, compaction,
73
+ # or continuation are permitted.
74
+ #
75
+ # @return [Cadenya::Models::ObjectiveEventData::TimedOut, nil]
76
+ optional :timed_out, -> { Cadenya::ObjectiveEventData::TimedOut }, api_name: :timedOut
77
+
67
78
  # @!attribute tool_approval_requested
68
79
  #
69
80
  # @return [Cadenya::Models::ToolApprovalRequested, nil]
@@ -108,7 +119,7 @@ module Cadenya
108
119
  # @return [Cadenya::Models::UserMessage, nil]
109
120
  optional :user_message, -> { Cadenya::UserMessage }, api_name: :userMessage
110
121
 
111
- # @!method initialize(assistant_message: nil, cancelled: nil, context_window_compacted: nil, error: nil, finalized: nil, memory_read: nil, notice: nil, sub_agent_spawned: nil, sub_agent_updated: nil, tool_approval_requested: nil, tool_approved: nil, tool_called: nil, tool_denied: nil, tool_error: nil, tool_result: nil, type: nil, user_message: nil)
122
+ # @!method initialize(assistant_message: nil, cancelled: nil, context_window_compacted: nil, error: nil, finalized: nil, memory_read: nil, notice: nil, sub_agent_spawned: nil, sub_agent_updated: nil, timed_out: nil, tool_approval_requested: nil, tool_approved: nil, tool_called: nil, tool_denied: nil, tool_error: nil, tool_result: nil, type: nil, user_message: nil)
112
123
  # Some parameter documentations has been truncated, see
113
124
  # {Cadenya::Models::ObjectiveEventData} for more details.
114
125
  #
@@ -130,6 +141,8 @@ module Cadenya
130
141
  #
131
142
  # @param sub_agent_updated [Cadenya::Models::SubAgentUpdated]
132
143
  #
144
+ # @param timed_out [Cadenya::Models::ObjectiveEventData::TimedOut] ObjectiveTimedOut is the terminal event written when an objective is
145
+ #
133
146
  # @param tool_approval_requested [Cadenya::Models::ToolApprovalRequested]
134
147
  #
135
148
  # @param tool_approved [Cadenya::Models::ToolApproved]
@@ -237,6 +250,29 @@ module Cadenya
237
250
  # @return [Array<Symbol>]
238
251
  end
239
252
  end
253
+
254
+ # @see Cadenya::Models::ObjectiveEventData#timed_out
255
+ class TimedOut < Cadenya::Internal::Type::BaseModel
256
+ # @!attribute message
257
+ # Human-readable note recorded at timeout time (e.g. "Timed out after 2h of
258
+ # inactivity").
259
+ #
260
+ # @return [String, nil]
261
+ optional :message, String
262
+
263
+ # @!method initialize(message: nil)
264
+ # Some parameter documentations has been truncated, see
265
+ # {Cadenya::Models::ObjectiveEventData::TimedOut} for more details.
266
+ #
267
+ # ObjectiveTimedOut is the terminal event written when an objective is finalized
268
+ # by the inactivity sweep because it saw no activity (no user messages, no LLM
269
+ # calls) within its variation's inactivity timeout — or the system-wide 24 hour
270
+ # maximum when no timeout is configured. The objective produces no output. After
271
+ # this event, the objective is super-terminal: no further iterations, compaction,
272
+ # or continuation are permitted.
273
+ #
274
+ # @param message [String] Human-readable note recorded at timeout time (e.g. "Timed out after 2h
275
+ end
240
276
  end
241
277
  end
242
278
  end
@@ -103,6 +103,7 @@ module Cadenya
103
103
  STATE_FAILED = :STATE_FAILED
104
104
  STATE_CANCELLED = :STATE_CANCELLED
105
105
  STATE_FINALIZED = :STATE_FINALIZED
106
+ STATE_TIMED_OUT = :STATE_TIMED_OUT
106
107
 
107
108
  # @!method self.values
108
109
  # @return [Array<Symbol>]
@@ -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
@@ -263,6 +263,8 @@ module Cadenya
263
263
 
264
264
  ToolSetAdapter = Cadenya::Models::ToolSetAdapter
265
265
 
266
+ ToolSetAdapterBare = Cadenya::Models::ToolSetAdapterBare
267
+
266
268
  ToolSetAdapterHTTP = Cadenya::Models::ToolSetAdapterHTTP
267
269
 
268
270
  ToolSetAdapterMcp = Cadenya::Models::ToolSetAdapterMcp