cadenya 0.8.0 → 0.9.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 (41) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +8 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/objective.rb +116 -18
  5. data/lib/cadenya/models/objective_config_snapshot.rb +39 -0
  6. data/lib/cadenya/models/objective_create_params.rb +65 -4
  7. data/lib/cadenya/models/objective_info.rb +45 -29
  8. data/lib/cadenya/models/objective_secret.rb +15 -0
  9. data/lib/cadenya/models/objectives/objective_tool_call.rb +19 -19
  10. data/lib/cadenya/models.rb +3 -5
  11. data/lib/cadenya/resources/objectives/tool_calls.rb +4 -4
  12. data/lib/cadenya/resources/objectives.rb +11 -5
  13. data/lib/cadenya/version.rb +1 -1
  14. data/lib/cadenya.rb +2 -3
  15. data/rbi/cadenya/models/objective.rbi +172 -32
  16. data/rbi/cadenya/models/objective_config_snapshot.rbi +70 -0
  17. data/rbi/cadenya/models/objective_create_params.rbi +112 -6
  18. data/rbi/cadenya/models/objective_info.rbi +50 -56
  19. data/rbi/cadenya/models/objective_secret.rbi +26 -0
  20. data/rbi/cadenya/models/objectives/objective_tool_call.rbi +47 -57
  21. data/rbi/cadenya/models/profile_spec.rbi +2 -2
  22. data/rbi/cadenya/models.rbi +3 -5
  23. data/rbi/cadenya/resources/objectives.rbi +29 -1
  24. data/sig/cadenya/models/objective.rbs +85 -15
  25. data/sig/cadenya/models/objective_config_snapshot.rbs +40 -0
  26. data/sig/cadenya/models/objective_create_params.rbs +45 -4
  27. data/sig/cadenya/models/objective_info.rbs +26 -38
  28. data/sig/cadenya/models/objective_secret.rbs +15 -0
  29. data/sig/cadenya/models/objectives/objective_tool_call.rbs +23 -27
  30. data/sig/cadenya/models.rbs +3 -5
  31. data/sig/cadenya/resources/objectives.rbs +4 -1
  32. metadata +8 -11
  33. data/lib/cadenya/models/objective_data.rb +0 -127
  34. data/lib/cadenya/models/objective_data_secret.rb +0 -21
  35. data/lib/cadenya/models/objective_status.rb +0 -37
  36. data/rbi/cadenya/models/objective_data.rbi +0 -198
  37. data/rbi/cadenya/models/objective_data_secret.rbi +0 -32
  38. data/rbi/cadenya/models/objective_status.rbi +0 -75
  39. data/sig/cadenya/models/objective_data.rbs +0 -98
  40. data/sig/cadenya/models/objective_data_secret.rbs +0 -19
  41. data/sig/cadenya/models/objective_status.rbs +0 -47
@@ -4,8 +4,11 @@ module Cadenya
4
4
  {
5
5
  workspace_id: String,
6
6
  agent_id: String,
7
- data: Cadenya::ObjectiveData,
7
+ data: ::Hash[Symbol, top],
8
+ initial_message: String,
9
+ memory_stack: ::Array[Cadenya::MemoryReference],
8
10
  metadata: Cadenya::CreateOperationMetadata,
11
+ secrets: ::Array[Cadenya::ObjectiveCreateParams::Secret],
9
12
  variation_id: String
10
13
  }
11
14
  & Cadenya::Internal::Type::request_parameters
@@ -18,7 +21,17 @@ module Cadenya
18
21
 
19
22
  attr_accessor agent_id: String
20
23
 
21
- attr_accessor data: Cadenya::ObjectiveData
24
+ attr_accessor data: ::Hash[Symbol, top]
25
+
26
+ attr_reader initial_message: String?
27
+
28
+ def initial_message=: (String) -> String
29
+
30
+ attr_reader memory_stack: ::Array[Cadenya::MemoryReference]?
31
+
32
+ def memory_stack=: (
33
+ ::Array[Cadenya::MemoryReference]
34
+ ) -> ::Array[Cadenya::MemoryReference]
22
35
 
23
36
  attr_reader metadata: Cadenya::CreateOperationMetadata?
24
37
 
@@ -26,6 +39,12 @@ module Cadenya
26
39
  Cadenya::CreateOperationMetadata
27
40
  ) -> Cadenya::CreateOperationMetadata
28
41
 
42
+ attr_reader secrets: ::Array[Cadenya::ObjectiveCreateParams::Secret]?
43
+
44
+ def secrets=: (
45
+ ::Array[Cadenya::ObjectiveCreateParams::Secret]
46
+ ) -> ::Array[Cadenya::ObjectiveCreateParams::Secret]
47
+
29
48
  attr_reader variation_id: String?
30
49
 
31
50
  def variation_id=: (String) -> String
@@ -33,8 +52,11 @@ module Cadenya
33
52
  def initialize: (
34
53
  workspace_id: String,
35
54
  agent_id: String,
36
- data: Cadenya::ObjectiveData,
55
+ data: ::Hash[Symbol, top],
56
+ ?initial_message: String,
57
+ ?memory_stack: ::Array[Cadenya::MemoryReference],
37
58
  ?metadata: Cadenya::CreateOperationMetadata,
59
+ ?secrets: ::Array[Cadenya::ObjectiveCreateParams::Secret],
38
60
  ?variation_id: String,
39
61
  ?request_options: Cadenya::request_opts
40
62
  ) -> void
@@ -42,11 +64,30 @@ module Cadenya
42
64
  def to_hash: -> {
43
65
  workspace_id: String,
44
66
  agent_id: String,
45
- data: Cadenya::ObjectiveData,
67
+ data: ::Hash[Symbol, top],
68
+ initial_message: String,
69
+ memory_stack: ::Array[Cadenya::MemoryReference],
46
70
  metadata: Cadenya::CreateOperationMetadata,
71
+ secrets: ::Array[Cadenya::ObjectiveCreateParams::Secret],
47
72
  variation_id: String,
48
73
  request_options: Cadenya::RequestOptions
49
74
  }
75
+
76
+ type secret = { name: String, value: String }
77
+
78
+ class Secret < Cadenya::Internal::Type::BaseModel
79
+ attr_reader name: String?
80
+
81
+ def name=: (String) -> String
82
+
83
+ attr_reader value: String?
84
+
85
+ def value=: (String) -> String
86
+
87
+ def initialize: (?name: String, ?value: String) -> void
88
+
89
+ def to_hash: -> { name: String, value: String }
90
+ end
50
91
  end
51
92
  end
52
93
  end
@@ -5,75 +5,63 @@ module Cadenya
5
5
  agent: Cadenya::ResourceMetadata,
6
6
  agent_variation: Cadenya::ResourceMetadata,
7
7
  created_by: Cadenya::Profile,
8
+ current_context_window_id: String,
8
9
  effective_memory_stack: ::Array[Cadenya::MemoryReference],
9
10
  total_context_windows: Integer,
10
11
  total_events: Integer,
11
12
  total_input_tokens: Integer,
13
+ total_iterations: Integer,
12
14
  total_output_tokens: Integer,
13
15
  total_tool_calls: Integer
14
16
  }
15
17
 
16
18
  class ObjectiveInfo < Cadenya::Internal::Type::BaseModel
17
- attr_reader agent: Cadenya::ResourceMetadata?
19
+ attr_accessor created_by: Cadenya::Profile
18
20
 
19
- def agent=: (Cadenya::ResourceMetadata) -> Cadenya::ResourceMetadata
21
+ attr_accessor agent: Cadenya::ResourceMetadata
20
22
 
21
- attr_reader agent_variation: Cadenya::ResourceMetadata?
23
+ attr_accessor agent_variation: Cadenya::ResourceMetadata
22
24
 
23
- def agent_variation=: (
24
- Cadenya::ResourceMetadata
25
- ) -> Cadenya::ResourceMetadata
25
+ attr_accessor current_context_window_id: String
26
26
 
27
- attr_reader created_by: Cadenya::Profile?
27
+ attr_accessor effective_memory_stack: ::Array[Cadenya::MemoryReference]
28
28
 
29
- def created_by=: (Cadenya::Profile) -> Cadenya::Profile
29
+ attr_accessor total_context_windows: Integer
30
30
 
31
- attr_reader effective_memory_stack: ::Array[Cadenya::MemoryReference]?
31
+ attr_accessor total_events: Integer
32
32
 
33
- def effective_memory_stack=: (
34
- ::Array[Cadenya::MemoryReference]
35
- ) -> ::Array[Cadenya::MemoryReference]
33
+ attr_accessor total_input_tokens: Integer
36
34
 
37
- attr_reader total_context_windows: Integer?
35
+ attr_accessor total_iterations: Integer
38
36
 
39
- def total_context_windows=: (Integer) -> Integer
37
+ attr_accessor total_output_tokens: Integer
40
38
 
41
- attr_reader total_events: Integer?
42
-
43
- def total_events=: (Integer) -> Integer
44
-
45
- attr_reader total_input_tokens: Integer?
46
-
47
- def total_input_tokens=: (Integer) -> Integer
48
-
49
- attr_reader total_output_tokens: Integer?
50
-
51
- def total_output_tokens=: (Integer) -> Integer
52
-
53
- attr_reader total_tool_calls: Integer?
54
-
55
- def total_tool_calls=: (Integer) -> Integer
39
+ attr_accessor total_tool_calls: Integer
56
40
 
57
41
  def initialize: (
58
- ?agent: Cadenya::ResourceMetadata,
59
- ?agent_variation: Cadenya::ResourceMetadata,
60
- ?created_by: Cadenya::Profile,
61
- ?effective_memory_stack: ::Array[Cadenya::MemoryReference],
62
- ?total_context_windows: Integer,
63
- ?total_events: Integer,
64
- ?total_input_tokens: Integer,
65
- ?total_output_tokens: Integer,
66
- ?total_tool_calls: Integer
42
+ agent: Cadenya::ResourceMetadata,
43
+ agent_variation: Cadenya::ResourceMetadata,
44
+ created_by: Cadenya::Profile,
45
+ current_context_window_id: String,
46
+ effective_memory_stack: ::Array[Cadenya::MemoryReference],
47
+ total_context_windows: Integer,
48
+ total_events: Integer,
49
+ total_input_tokens: Integer,
50
+ total_iterations: Integer,
51
+ total_output_tokens: Integer,
52
+ total_tool_calls: Integer
67
53
  ) -> void
68
54
 
69
55
  def to_hash: -> {
70
56
  agent: Cadenya::ResourceMetadata,
71
57
  agent_variation: Cadenya::ResourceMetadata,
72
58
  created_by: Cadenya::Profile,
59
+ current_context_window_id: String,
73
60
  effective_memory_stack: ::Array[Cadenya::MemoryReference],
74
61
  total_context_windows: Integer,
75
62
  total_events: Integer,
76
63
  total_input_tokens: Integer,
64
+ total_iterations: Integer,
77
65
  total_output_tokens: Integer,
78
66
  total_tool_calls: Integer
79
67
  }
@@ -0,0 +1,15 @@
1
+ module Cadenya
2
+ module Models
3
+ type objective_secret = { name: String }
4
+
5
+ class ObjectiveSecret < Cadenya::Internal::Type::BaseModel
6
+ attr_reader name: String?
7
+
8
+ def name=: (String) -> String
9
+
10
+ def initialize: (?name: String) -> void
11
+
12
+ def to_hash: -> { name: String }
13
+ end
14
+ end
15
+ end
@@ -6,9 +6,9 @@ module Cadenya
6
6
  type objective_tool_call =
7
7
  {
8
8
  data: Cadenya::Objectives::ObjectiveToolCallData,
9
+ execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
9
10
  metadata: Cadenya::OperationMetadata,
10
11
  status: Cadenya::Models::Objectives::ObjectiveToolCall::status,
11
- execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
12
12
  info: Cadenya::Objectives::ObjectiveToolCallInfo
13
13
  }
14
14
 
@@ -25,47 +25,24 @@ module Cadenya
25
25
  Cadenya::Objectives::ObjectiveToolCallInfo
26
26
  ) -> Cadenya::Objectives::ObjectiveToolCallInfo
27
27
 
28
- attr_reader execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status?
29
-
30
- def execution_status=: (
31
- Cadenya::Models::Objectives::ObjectiveToolCall::execution_status
32
- ) -> Cadenya::Models::Objectives::ObjectiveToolCall::execution_status
28
+ attr_accessor execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status
33
29
 
34
30
  def initialize: (
35
31
  data: Cadenya::Objectives::ObjectiveToolCallData,
32
+ execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
36
33
  metadata: Cadenya::OperationMetadata,
37
34
  status: Cadenya::Models::Objectives::ObjectiveToolCall::status,
38
- ?execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
39
35
  ?info: Cadenya::Objectives::ObjectiveToolCallInfo
40
36
  ) -> void
41
37
 
42
38
  def to_hash: -> {
43
39
  data: Cadenya::Objectives::ObjectiveToolCallData,
40
+ execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
44
41
  metadata: Cadenya::OperationMetadata,
45
42
  status: Cadenya::Models::Objectives::ObjectiveToolCall::status,
46
- execution_status: Cadenya::Models::Objectives::ObjectiveToolCall::execution_status,
47
43
  info: Cadenya::Objectives::ObjectiveToolCallInfo
48
44
  }
49
45
 
50
- type status =
51
- :TOOL_CALL_STATUS_UNSPECIFIED
52
- | :TOOL_CALL_STATUS_AUTO_APPROVED
53
- | :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
54
- | :TOOL_CALL_STATUS_APPROVED
55
- | :TOOL_CALL_STATUS_DENIED
56
-
57
- module Status
58
- extend Cadenya::Internal::Type::Enum
59
-
60
- TOOL_CALL_STATUS_UNSPECIFIED: :TOOL_CALL_STATUS_UNSPECIFIED
61
- TOOL_CALL_STATUS_AUTO_APPROVED: :TOOL_CALL_STATUS_AUTO_APPROVED
62
- TOOL_CALL_STATUS_WAITING_FOR_APPROVAL: :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
63
- TOOL_CALL_STATUS_APPROVED: :TOOL_CALL_STATUS_APPROVED
64
- TOOL_CALL_STATUS_DENIED: :TOOL_CALL_STATUS_DENIED
65
-
66
- def self?.values: -> ::Array[Cadenya::Models::Objectives::ObjectiveToolCall::status]
67
- end
68
-
69
46
  type execution_status =
70
47
  :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
71
48
  | :TOOL_CALL_EXECUTION_STATUS_PENDING
@@ -84,6 +61,25 @@ module Cadenya
84
61
 
85
62
  def self?.values: -> ::Array[Cadenya::Models::Objectives::ObjectiveToolCall::execution_status]
86
63
  end
64
+
65
+ type status =
66
+ :TOOL_CALL_STATUS_UNSPECIFIED
67
+ | :TOOL_CALL_STATUS_AUTO_APPROVED
68
+ | :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
69
+ | :TOOL_CALL_STATUS_APPROVED
70
+ | :TOOL_CALL_STATUS_DENIED
71
+
72
+ module Status
73
+ extend Cadenya::Internal::Type::Enum
74
+
75
+ TOOL_CALL_STATUS_UNSPECIFIED: :TOOL_CALL_STATUS_UNSPECIFIED
76
+ TOOL_CALL_STATUS_AUTO_APPROVED: :TOOL_CALL_STATUS_AUTO_APPROVED
77
+ TOOL_CALL_STATUS_WAITING_FOR_APPROVAL: :TOOL_CALL_STATUS_WAITING_FOR_APPROVAL
78
+ TOOL_CALL_STATUS_APPROVED: :TOOL_CALL_STATUS_APPROVED
79
+ TOOL_CALL_STATUS_DENIED: :TOOL_CALL_STATUS_DENIED
80
+
81
+ def self?.values: -> ::Array[Cadenya::Models::Objectives::ObjectiveToolCall::status]
82
+ end
87
83
  end
88
84
  end
89
85
  end
@@ -147,6 +147,8 @@ module Cadenya
147
147
 
148
148
  class ObjectiveCompactParams = Cadenya::Models::ObjectiveCompactParams
149
149
 
150
+ class ObjectiveConfigSnapshot = Cadenya::Models::ObjectiveConfigSnapshot
151
+
150
152
  class ObjectiveContextWindow = Cadenya::Models::ObjectiveContextWindow
151
153
 
152
154
  class ObjectiveContextWindowData = Cadenya::Models::ObjectiveContextWindowData
@@ -155,10 +157,6 @@ module Cadenya
155
157
 
156
158
  class ObjectiveCreateParams = Cadenya::Models::ObjectiveCreateParams
157
159
 
158
- class ObjectiveData = Cadenya::Models::ObjectiveData
159
-
160
- class ObjectiveDataSecret = Cadenya::Models::ObjectiveDataSecret
161
-
162
160
  class ObjectiveError = Cadenya::Models::ObjectiveError
163
161
 
164
162
  class ObjectiveEventData = Cadenya::Models::ObjectiveEventData
@@ -179,7 +177,7 @@ module Cadenya
179
177
 
180
178
  module Objectives = Cadenya::Models::Objectives
181
179
 
182
- class ObjectiveStatus = Cadenya::Models::ObjectiveStatus
180
+ class ObjectiveSecret = Cadenya::Models::ObjectiveSecret
183
181
 
184
182
  class OperationMetadata = Cadenya::Models::OperationMetadata
185
183
 
@@ -12,8 +12,11 @@ module Cadenya
12
12
  def create: (
13
13
  String workspace_id,
14
14
  agent_id: String,
15
- data: Cadenya::ObjectiveData,
15
+ data: ::Hash[Symbol, top],
16
+ ?initial_message: String,
17
+ ?memory_stack: ::Array[Cadenya::MemoryReference],
16
18
  ?metadata: Cadenya::CreateOperationMetadata,
19
+ ?secrets: ::Array[Cadenya::ObjectiveCreateParams::Secret],
17
20
  ?variation_id: String,
18
21
  ?request_options: Cadenya::request_opts
19
22
  ) -> Cadenya::Objective
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cadenya
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cadenya
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-06-07 00:00:00.000000000 Z
11
+ date: 2026-06-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: cgi
@@ -219,13 +219,12 @@ files:
219
219
  - lib/cadenya/models/objective_cancel_params.rb
220
220
  - lib/cadenya/models/objective_compact_params.rb
221
221
  - lib/cadenya/models/objective_compact_response.rb
222
+ - lib/cadenya/models/objective_config_snapshot.rb
222
223
  - lib/cadenya/models/objective_context_window.rb
223
224
  - lib/cadenya/models/objective_context_window_data.rb
224
225
  - lib/cadenya/models/objective_continue_params.rb
225
226
  - lib/cadenya/models/objective_continue_response.rb
226
227
  - lib/cadenya/models/objective_create_params.rb
227
- - lib/cadenya/models/objective_data.rb
228
- - lib/cadenya/models/objective_data_secret.rb
229
228
  - lib/cadenya/models/objective_error.rb
230
229
  - lib/cadenya/models/objective_event_data.rb
231
230
  - lib/cadenya/models/objective_event_info.rb
@@ -236,7 +235,7 @@ files:
236
235
  - lib/cadenya/models/objective_list_events_response.rb
237
236
  - lib/cadenya/models/objective_list_params.rb
238
237
  - lib/cadenya/models/objective_retrieve_params.rb
239
- - lib/cadenya/models/objective_status.rb
238
+ - lib/cadenya/models/objective_secret.rb
240
239
  - lib/cadenya/models/objectives/feedback_create_params.rb
241
240
  - lib/cadenya/models/objectives/feedback_list_params.rb
242
241
  - lib/cadenya/models/objectives/objective_feedback.rb
@@ -528,13 +527,12 @@ files:
528
527
  - rbi/cadenya/models/objective_cancel_params.rbi
529
528
  - rbi/cadenya/models/objective_compact_params.rbi
530
529
  - rbi/cadenya/models/objective_compact_response.rbi
530
+ - rbi/cadenya/models/objective_config_snapshot.rbi
531
531
  - rbi/cadenya/models/objective_context_window.rbi
532
532
  - rbi/cadenya/models/objective_context_window_data.rbi
533
533
  - rbi/cadenya/models/objective_continue_params.rbi
534
534
  - rbi/cadenya/models/objective_continue_response.rbi
535
535
  - rbi/cadenya/models/objective_create_params.rbi
536
- - rbi/cadenya/models/objective_data.rbi
537
- - rbi/cadenya/models/objective_data_secret.rbi
538
536
  - rbi/cadenya/models/objective_error.rbi
539
537
  - rbi/cadenya/models/objective_event_data.rbi
540
538
  - rbi/cadenya/models/objective_event_info.rbi
@@ -545,7 +543,7 @@ files:
545
543
  - rbi/cadenya/models/objective_list_events_response.rbi
546
544
  - rbi/cadenya/models/objective_list_params.rbi
547
545
  - rbi/cadenya/models/objective_retrieve_params.rbi
548
- - rbi/cadenya/models/objective_status.rbi
546
+ - rbi/cadenya/models/objective_secret.rbi
549
547
  - rbi/cadenya/models/objectives/feedback_create_params.rbi
550
548
  - rbi/cadenya/models/objectives/feedback_list_params.rbi
551
549
  - rbi/cadenya/models/objectives/objective_feedback.rbi
@@ -836,13 +834,12 @@ files:
836
834
  - sig/cadenya/models/objective_cancel_params.rbs
837
835
  - sig/cadenya/models/objective_compact_params.rbs
838
836
  - sig/cadenya/models/objective_compact_response.rbs
837
+ - sig/cadenya/models/objective_config_snapshot.rbs
839
838
  - sig/cadenya/models/objective_context_window.rbs
840
839
  - sig/cadenya/models/objective_context_window_data.rbs
841
840
  - sig/cadenya/models/objective_continue_params.rbs
842
841
  - sig/cadenya/models/objective_continue_response.rbs
843
842
  - sig/cadenya/models/objective_create_params.rbs
844
- - sig/cadenya/models/objective_data.rbs
845
- - sig/cadenya/models/objective_data_secret.rbs
846
843
  - sig/cadenya/models/objective_error.rbs
847
844
  - sig/cadenya/models/objective_event_data.rbs
848
845
  - sig/cadenya/models/objective_event_info.rbs
@@ -853,7 +850,7 @@ files:
853
850
  - sig/cadenya/models/objective_list_events_response.rbs
854
851
  - sig/cadenya/models/objective_list_params.rbs
855
852
  - sig/cadenya/models/objective_retrieve_params.rbs
856
- - sig/cadenya/models/objective_status.rbs
853
+ - sig/cadenya/models/objective_secret.rbs
857
854
  - sig/cadenya/models/objectives/feedback_create_params.rbs
858
855
  - sig/cadenya/models/objectives/feedback_list_params.rbs
859
856
  - sig/cadenya/models/objectives/objective_feedback.rbs
@@ -1,127 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Cadenya
4
- module Models
5
- class ObjectiveData < Cadenya::Internal::Type::BaseModel
6
- # @!attribute data
7
- # Represents a dynamically typed value which can be either null, a number, a
8
- # string, a boolean, a recursive struct value, or a list of values.
9
- #
10
- # @return [Object, nil]
11
- optional :data, Cadenya::Internal::Type::Unknown
12
-
13
- # @!attribute initial_message
14
- # The initial message sent to the agent. This becomes the first user message in
15
- # the LLM chat history.
16
- #
17
- # @return [String, nil]
18
- optional :initial_message, String, api_name: :initialMessage
19
-
20
- # @!attribute memory_stack
21
- # Memory layers/entries to push onto this objective's memory stack on top of the
22
- # baseline stack inherited from the selected variation.
23
- #
24
- # Array order is push order: the first element sits lower in the objective's
25
- # contribution to the stack; the LAST element ends up on top of the effective
26
- # stack. Entries pinned via memory_entry_id behave as single-entry layers at their
27
- # position.
28
- #
29
- # System-managed layers (e.g., episodic) cannot be referenced here; they attach
30
- # themselves automatically based on episodic_key.
31
- #
32
- # Stack size cap: the TOTAL effective stack (variation's memory layers
33
- #
34
- # - this field) must not exceed 10 entries. A request that would produce an
35
- # effective stack larger than 10 is rejected with InvalidArgument.
36
- #
37
- # @return [Array<Cadenya::Models::MemoryReference>, nil]
38
- optional :memory_stack,
39
- -> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
40
- api_name: :memoryStack
41
-
42
- # @!attribute secrets
43
- # Secrets that can be used in the headers for tool calls using the secret
44
- # interpolation format.
45
- #
46
- # @return [Array<Cadenya::Models::ObjectiveDataSecret>, nil]
47
- optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveDataSecret] }
48
-
49
- response_only do
50
- # @!attribute agent
51
- # Agent resource
52
- #
53
- # @return [Cadenya::Models::Agent, nil]
54
- optional :agent, -> { Cadenya::Agent }
55
-
56
- # @!attribute output
57
- # The output of the objective, populated when the objective completes. Will match
58
- # the schema of output_json_schema or output_json_inferred.
59
- #
60
- # @return [Hash{Symbol=>Object}, nil]
61
- optional :output, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
62
-
63
- # @!attribute output_definition
64
- # Snapshot of the agent spec's output_definition at objective creation time. When
65
- # present, the objective will run an extraction step after the LLM finishes.
66
- #
67
- # @return [Hash{Symbol=>Object}, nil]
68
- optional :output_definition,
69
- Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
70
- api_name: :outputDefinition
71
-
72
- # @!attribute parent_objective_id
73
- # A parent objective means the objective was spawned off using a separate agent to
74
- # complete an objective
75
- #
76
- # @return [String, nil]
77
- optional :parent_objective_id, String, api_name: :parentObjectiveId
78
-
79
- # @!attribute source_schedule_id
80
- # ID of the AgentSchedule that produced this objective, when applicable. Populated
81
- # when the objective is created from a schedule fire; empty when the objective was
82
- # created via CreateObjective directly.
83
- #
84
- # @return [String, nil]
85
- optional :source_schedule_id, String, api_name: :sourceScheduleId
86
-
87
- # @!attribute system_prompt
88
- # system_prompt is read-only, derived from the selected variation's prompt
89
- #
90
- # @return [String, nil]
91
- optional :system_prompt, String, api_name: :systemPrompt
92
-
93
- # @!attribute variation
94
- # AgentVariation resource
95
- #
96
- # @return [Cadenya::Models::Agents::AgentVariation, nil]
97
- optional :variation, -> { Cadenya::Agents::AgentVariation }
98
- end
99
-
100
- # @!method initialize(agent: nil, data: nil, initial_message: nil, memory_stack: nil, output: nil, output_definition: nil, parent_objective_id: nil, secrets: nil, source_schedule_id: nil, system_prompt: nil, variation: nil)
101
- # Some parameter documentations has been truncated, see
102
- # {Cadenya::Models::ObjectiveData} for more details.
103
- #
104
- # @param agent [Cadenya::Models::Agent] Agent resource
105
- #
106
- # @param data [Object] Represents a dynamically typed value which can be either null, a number, a strin
107
- #
108
- # @param initial_message [String] The initial message sent to the agent. This becomes the first user message in th
109
- #
110
- # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
111
- #
112
- # @param output [Hash{Symbol=>Object}] The output of the objective, populated when the objective completes. Will match
113
- #
114
- # @param output_definition [Hash{Symbol=>Object}] Snapshot of the agent spec's output_definition at objective creation time.
115
- #
116
- # @param parent_objective_id [String] A parent objective means the objective was spawned off using a separate agent to
117
- #
118
- # @param secrets [Array<Cadenya::Models::ObjectiveDataSecret>] Secrets that can be used in the headers for tool calls using the secret interpol
119
- #
120
- # @param source_schedule_id [String] ID of the AgentSchedule that produced this objective, when applicable.
121
- #
122
- # @param system_prompt [String] system_prompt is read-only, derived from the selected variation's prompt
123
- #
124
- # @param variation [Cadenya::Models::Agents::AgentVariation] AgentVariation resource
125
- end
126
- end
127
- end
@@ -1,21 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Cadenya
4
- module Models
5
- class ObjectiveDataSecret < Cadenya::Internal::Type::BaseModel
6
- # @!attribute name
7
- #
8
- # @return [String, nil]
9
- optional :name, String
10
-
11
- # @!attribute value
12
- #
13
- # @return [String, nil]
14
- optional :value, String
15
-
16
- # @!method initialize(name: nil, value: nil)
17
- # @param name [String]
18
- # @param value [String]
19
- end
20
- end
21
- end
@@ -1,37 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Cadenya
4
- module Models
5
- class ObjectiveStatus < Cadenya::Internal::Type::BaseModel
6
- # @!attribute state
7
- #
8
- # @return [Symbol, Cadenya::Models::ObjectiveStatus::State]
9
- required :state, enum: -> { Cadenya::ObjectiveStatus::State }
10
-
11
- # @!attribute message
12
- #
13
- # @return [String, nil]
14
- optional :message, String
15
-
16
- # @!method initialize(state:, message: nil)
17
- # @param state [Symbol, Cadenya::Models::ObjectiveStatus::State]
18
- # @param message [String]
19
-
20
- # @see Cadenya::Models::ObjectiveStatus#state
21
- module State
22
- extend Cadenya::Internal::Type::Enum
23
-
24
- STATE_UNSPECIFIED = :STATE_UNSPECIFIED
25
- STATE_PENDING = :STATE_PENDING
26
- STATE_RUNNING = :STATE_RUNNING
27
- STATE_WAITING = :STATE_WAITING
28
- STATE_FAILED = :STATE_FAILED
29
- STATE_CANCELLED = :STATE_CANCELLED
30
- STATE_FINALIZED = :STATE_FINALIZED
31
-
32
- # @!method self.values
33
- # @return [Array<Symbol>]
34
- end
35
- end
36
- end
37
- end