cadenya 0.29.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.
Files changed (51) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/objectives/objective_tool_call.rb +1 -0
  5. data/lib/cadenya/models/objectives/objective_tool_call_with_result.rb +1 -0
  6. data/lib/cadenya/models/objectives/set_tool_call_content_request_audio_block.rb +26 -0
  7. data/lib/cadenya/models/objectives/set_tool_call_content_request_content_block.rb +32 -0
  8. data/lib/cadenya/models/objectives/set_tool_call_content_request_image_block.rb +26 -0
  9. data/lib/cadenya/models/objectives/set_tool_call_content_request_text_block.rb +17 -0
  10. data/lib/cadenya/models/objectives/tool_call_list_params.rb +31 -1
  11. data/lib/cadenya/models/objectives/tool_call_set_content_params.rb +51 -0
  12. data/lib/cadenya/models/tool_called.rb +33 -1
  13. data/lib/cadenya/models/tool_set_adapter.rb +18 -1
  14. data/lib/cadenya/models/tool_set_adapter_bare.rb +26 -0
  15. data/lib/cadenya/models/tool_sets/config_bare.rb +14 -0
  16. data/lib/cadenya/models/tool_sets/tool_spec_config.rb +16 -1
  17. data/lib/cadenya/models.rb +2 -0
  18. data/lib/cadenya/resources/objectives/tool_calls.rb +53 -2
  19. data/lib/cadenya/version.rb +1 -1
  20. data/lib/cadenya.rb +7 -0
  21. data/rbi/cadenya/models/objectives/objective_tool_call.rbi +5 -0
  22. data/rbi/cadenya/models/objectives/objective_tool_call_with_result.rbi +5 -0
  23. data/rbi/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbi +40 -0
  24. data/rbi/cadenya/models/objectives/set_tool_call_content_request_content_block.rbi +89 -0
  25. data/rbi/cadenya/models/objectives/set_tool_call_content_request_image_block.rbi +40 -0
  26. data/rbi/cadenya/models/objectives/set_tool_call_content_request_text_block.rbi +28 -0
  27. data/rbi/cadenya/models/objectives/tool_call_list_params.rbi +85 -0
  28. data/rbi/cadenya/models/objectives/tool_call_set_content_params.rbi +80 -0
  29. data/rbi/cadenya/models/tool_called.rbi +55 -2
  30. data/rbi/cadenya/models/tool_set_adapter.rbi +24 -1
  31. data/rbi/cadenya/models/tool_set_adapter_bare.rbi +37 -0
  32. data/rbi/cadenya/models/tool_sets/config_bare.rbi +25 -0
  33. data/rbi/cadenya/models/tool_sets/tool_spec_config.rbi +20 -1
  34. data/rbi/cadenya/models.rbi +2 -0
  35. data/rbi/cadenya/resources/objectives/tool_calls.rbi +37 -0
  36. data/sig/cadenya/models/objectives/objective_tool_call.rbs +2 -0
  37. data/sig/cadenya/models/objectives/objective_tool_call_with_result.rbs +2 -0
  38. data/sig/cadenya/models/objectives/set_tool_call_content_request_audio_block.rbs +18 -0
  39. data/sig/cadenya/models/objectives/set_tool_call_content_request_content_block.rbs +44 -0
  40. data/sig/cadenya/models/objectives/set_tool_call_content_request_image_block.rbs +18 -0
  41. data/sig/cadenya/models/objectives/set_tool_call_content_request_text_block.rbs +15 -0
  42. data/sig/cadenya/models/objectives/tool_call_list_params.rbs +30 -0
  43. data/sig/cadenya/models/objectives/tool_call_set_content_params.rbs +43 -0
  44. data/sig/cadenya/models/tool_called.rbs +33 -3
  45. data/sig/cadenya/models/tool_set_adapter.rbs +7 -0
  46. data/sig/cadenya/models/tool_set_adapter_bare.rbs +15 -0
  47. data/sig/cadenya/models/tool_sets/config_bare.rbs +13 -0
  48. data/sig/cadenya/models/tool_sets/tool_spec_config.rbs +9 -0
  49. data/sig/cadenya/models.rbs +2 -0
  50. data/sig/cadenya/resources/objectives/tool_calls.rbs +9 -0
  51. 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: 5cf6a4a48bd9ffd441f8fb6b4a6ee91fc25a5296c50d52e49ec22892ebec3a87
4
+ data.tar.gz: c787c51e169c0eea08e7e61773b06df45a3bde4f5749ed82f2188c488333b2e4
5
5
  SHA512:
6
- metadata.gz: c276b5b5f6499525a452490dc7df6de4ffd9109a666aa712dbcbc201420a9de9ef0cfbffae86174836e055bc31272a72303de43aa6c0ceb4c1de9123f4531ab3
7
- data.tar.gz: c2f2abd24fa38008337bda2931e8c27e9e39ca1412a9a523ae3d678766e62f58a855de3373a533e4c9733b327ae40286764161dd2e7ef823cf65fa99cc7b820f
6
+ metadata.gz: a3136f051b1bd97d922220532c5daf6d511aea663ec00c9831729c45bcbbda56a3d7e860072448e3ffca1a8a19839da4ec44cec2b3c31ab91d5940aa35ef171b
7
+ data.tar.gz: 33f6214ff31c4612cf1024908088b7727e818ef15d14ab740f3d51b4ecd1f33a7c4745d5d0aa2403344c1270fd5ec8b17f20b3e81e661540ed7f3b8144daa118
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
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
+
3
11
  ## 0.29.0 (2026-07-05)
4
12
 
5
13
  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.30.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-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
@@ -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
@@ -43,9 +43,12 @@ module Cadenya
43
43
  )
44
44
  end
45
45
 
46
+ # Some parameter documentations has been truncated, see
47
+ # {Cadenya::Models::Objectives::ToolCallListParams} for more details.
48
+ #
46
49
  # Lists all tool calls for an objective
47
50
  #
48
- # @overload list(objective_id, workspace_id:, cursor: nil, include_info: nil, limit: nil, status: nil, request_options: {})
51
+ # @overload list(objective_id, workspace_id:, cursor: nil, execution_status: nil, include_info: nil, limit: nil, status: nil, request_options: {})
49
52
  #
50
53
  # @param objective_id [String] Path param: The objective ID to return tool calls for
51
54
  #
@@ -53,6 +56,8 @@ module Cadenya
53
56
  #
54
57
  # @param cursor [String] Query param: Pagination cursor from previous response
55
58
  #
59
+ # @param execution_status [Symbol, Cadenya::Models::Objectives::ToolCallListParams::ExecutionStatus] Query param: Filter by tool call execution status. Useful for reverse-harness
60
+ #
56
61
  # @param include_info [Boolean] Query param: When set to true you may use more of your alloted API rate-limit
57
62
  #
58
63
  # @param limit [Integer] Query param: Maximum number of results to return
@@ -74,7 +79,7 @@ module Cadenya
74
79
  @client.request(
75
80
  method: :get,
76
81
  path: ["v1/workspaces/%1$s/objectives/%2$s/tool_calls", workspace_id, objective_id],
77
- query: query.transform_keys(include_info: "includeInfo"),
82
+ query: query.transform_keys(execution_status: "executionStatus", include_info: "includeInfo"),
78
83
  page: Cadenya::Internal::CursorPagination,
79
84
  model: Cadenya::Objectives::ObjectiveToolCall,
80
85
  options: options
@@ -166,6 +171,52 @@ module Cadenya
166
171
  )
167
172
  end
168
173
 
174
+ # Some parameter documentations has been truncated, see
175
+ # {Cadenya::Models::Objectives::ToolCallSetContentParams} for more details.
176
+ #
177
+ # For bare tool calls (tool sets with no execution adapter), sets the content an
178
+ # external API consumer supplies for the call — used for human-in-the-loop tools
179
+ # and reverse harnesses that execute tools locally and report results back.
180
+ #
181
+ # @overload set_content(tool_call_id, workspace_id:, objective_id:, content:, request_options: {})
182
+ #
183
+ # @param tool_call_id [String] Path param: The ID of the tool call to set content for
184
+ #
185
+ # @param workspace_id [String] Path param
186
+ #
187
+ # @param objective_id [String] Path param: The ID of the objective. Supports "external_id:" prefix for external
188
+ #
189
+ # @param content [Array<Cadenya::Models::Objectives::SetToolCallContentRequestContentBlock>] Body param: The content to set on the tool call. Mirrors
190
+ #
191
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
192
+ #
193
+ # @return [Cadenya::Models::Objectives::ObjectiveToolCall]
194
+ #
195
+ # @see Cadenya::Models::Objectives::ToolCallSetContentParams
196
+ def set_content(tool_call_id, params)
197
+ parsed, options = Cadenya::Objectives::ToolCallSetContentParams.dump_request(params)
198
+ workspace_id =
199
+ parsed.delete(:workspace_id) do
200
+ raise ArgumentError.new("missing required path argument #{_1}")
201
+ end
202
+ objective_id =
203
+ parsed.delete(:objective_id) do
204
+ raise ArgumentError.new("missing required path argument #{_1}")
205
+ end
206
+ @client.request(
207
+ method: :post,
208
+ path: [
209
+ "v1/workspaces/%1$s/objectives/%2$s/tool_calls/%3$s:setContent",
210
+ workspace_id,
211
+ objective_id,
212
+ tool_call_id
213
+ ],
214
+ body: parsed,
215
+ model: Cadenya::Objectives::ObjectiveToolCall,
216
+ options: options
217
+ )
218
+ end
219
+
169
220
  # @api private
170
221
  #
171
222
  # @param client [Cadenya::Client]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.29.0"
4
+ VERSION = "0.30.0"
5
5
  end
data/lib/cadenya.rb CHANGED
@@ -213,12 +213,17 @@ require_relative "cadenya/models/objectives/objective_tool_call_result_image_blo
213
213
  require_relative "cadenya/models/objectives/objective_tool_call_result_text_block"
214
214
  require_relative "cadenya/models/objectives/objective_tool_call_with_result"
215
215
  require_relative "cadenya/models/objectives/resolved_secret"
216
+ require_relative "cadenya/models/objectives/set_tool_call_content_request_audio_block"
217
+ require_relative "cadenya/models/objectives/set_tool_call_content_request_content_block"
218
+ require_relative "cadenya/models/objectives/set_tool_call_content_request_image_block"
219
+ require_relative "cadenya/models/objectives/set_tool_call_content_request_text_block"
216
220
  require_relative "cadenya/models/objectives/task_list_params"
217
221
  require_relative "cadenya/models/objectives/task_retrieve_params"
218
222
  require_relative "cadenya/models/objectives/tool_call_approve_params"
219
223
  require_relative "cadenya/models/objectives/tool_call_deny_params"
220
224
  require_relative "cadenya/models/objectives/tool_call_list_params"
221
225
  require_relative "cadenya/models/objectives/tool_call_retrieve_params"
226
+ require_relative "cadenya/models/objectives/tool_call_set_content_params"
222
227
  require_relative "cadenya/models/objectives/tool_list_params"
223
228
  require_relative "cadenya/models/objective_secret"
224
229
  require_relative "cadenya/models/objective_stream_events_params"
@@ -247,6 +252,7 @@ require_relative "cadenya/models/tool_filter"
247
252
  require_relative "cadenya/models/tool_result"
248
253
  require_relative "cadenya/models/tool_set"
249
254
  require_relative "cadenya/models/tool_set_adapter"
255
+ require_relative "cadenya/models/tool_set_adapter_bare"
250
256
  require_relative "cadenya/models/tool_set_adapter_http"
251
257
  require_relative "cadenya/models/tool_set_adapter_mcp"
252
258
  require_relative "cadenya/models/tool_set_adapter_openapi"
@@ -261,6 +267,7 @@ require_relative "cadenya/models/tool_set_info"
261
267
  require_relative "cadenya/models/tool_set_list_events_params"
262
268
  require_relative "cadenya/models/tool_set_list_params"
263
269
  require_relative "cadenya/models/tool_set_retrieve_params"
270
+ require_relative "cadenya/models/tool_sets/config_bare"
264
271
  require_relative "cadenya/models/tool_sets/config_http"
265
272
  require_relative "cadenya/models/tool_sets/config_mcp"
266
273
  require_relative "cadenya/models/tool_sets/config_openapi"
@@ -129,6 +129,11 @@ module Cadenya
129
129
  :TOOL_CALL_EXECUTION_STATUS_ERRORED,
130
130
  Cadenya::Objectives::ObjectiveToolCall::ExecutionStatus::TaggedSymbol
131
131
  )
132
+ TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT =
133
+ T.let(
134
+ :TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT,
135
+ Cadenya::Objectives::ObjectiveToolCall::ExecutionStatus::TaggedSymbol
136
+ )
132
137
 
133
138
  sig do
134
139
  override.returns(
@@ -171,6 +171,11 @@ module Cadenya
171
171
  :TOOL_CALL_EXECUTION_STATUS_ERRORED,
172
172
  Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
173
173
  )
174
+ TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT =
175
+ T.let(
176
+ :TOOL_CALL_EXECUTION_STATUS_WAITING_FOR_CONTENT,
177
+ Cadenya::Objectives::ObjectiveToolCallWithResult::ExecutionStatus::TaggedSymbol
178
+ )
174
179
 
175
180
  sig do
176
181
  override.returns(
@@ -0,0 +1,40 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Objectives
6
+ class SetToolCallContentRequestAudioBlock < Cadenya::Internal::Type::BaseModel
7
+ OrHash =
8
+ T.type_alias do
9
+ T.any(
10
+ Cadenya::Objectives::SetToolCallContentRequestAudioBlock,
11
+ Cadenya::Internal::AnyHash
12
+ )
13
+ end
14
+
15
+ # Base64-encoded audio bytes.
16
+ sig { returns(String) }
17
+ attr_accessor :data
18
+
19
+ # IANA media type of the audio, e.g. audio/wav.
20
+ sig { returns(String) }
21
+ attr_accessor :mime_type
22
+
23
+ sig do
24
+ params(data: String, mime_type: String).returns(T.attached_class)
25
+ end
26
+ def self.new(
27
+ # Base64-encoded audio bytes.
28
+ data:,
29
+ # IANA media type of the audio, e.g. audio/wav.
30
+ mime_type:
31
+ )
32
+ end
33
+
34
+ sig { override.returns({ data: String, mime_type: String }) }
35
+ def to_hash
36
+ end
37
+ end
38
+ end
39
+ end
40
+ end