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
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 274ccbd26e73c45e670cfbb81466c39fc2077f6d5c5a32b2835ea5be0a46c03c
4
- data.tar.gz: 2e744abab3330f3fddd68aaa0e81d10aad222bc498db1be2946b1394d23d874f
3
+ metadata.gz: a3e78e865ea1a9838b148148fe690c8df1265661c672222de2646e0b90b2d840
4
+ data.tar.gz: 6404da69bb9771a5c784d9a93820b1ea22a8bc94d56d923eb95cfc9116ea7891
5
5
  SHA512:
6
- metadata.gz: dcda80d25e9295f303a4b5756f60658937682942f103d269a447bf594906fc0fe97cf4289e3d741cc5adc70373ae17f9e6ef47a8547bb58616910f36b5594d4e
7
- data.tar.gz: 3c173ff743a5022b8599b7a7b0464b1d9ced87c79ed946356ef14d5b4c7f872c30827ee8fa484ab50924766d3ac15ca88a7a72ca077cfd9a39fc65960654f07e
6
+ metadata.gz: 0e0f72e933688ded58e7fd885bf999c8fc74279b10447fe6c45e28436c8280dd2f05e9743cab5ca5b94d06afef6d74d92f153231c175b6961069677aa19a1b6a
7
+ data.tar.gz: 514982d691d62da5bf6b7a197dc9de64f81e8a4292d26e68be6406908584178b23f17ac20ab8e0f9933b7de63e46ff2f7392b3d9eca62357ce254f3e79945ceb
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.9.0 (2026-06-08)
4
+
5
+ Full Changelog: [v0.8.0...v0.9.0](https://github.com/cadenya/cadenya-ruby/compare/v0.8.0...v0.9.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([7f6f28a](https://github.com/cadenya/cadenya-ruby/commit/7f6f28a20acc5bd24d54edd97b7cace4fe1dd8a1))
10
+
3
11
  ## 0.8.0 (2026-06-07)
4
12
 
5
13
  Full Changelog: [v0.7.0...v0.8.0](https://github.com/cadenya/cadenya-ruby/compare/v0.7.0...v0.8.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.8.0"
20
+ gem "cadenya", "~> 0.9.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -4,10 +4,12 @@ module Cadenya
4
4
  module Models
5
5
  # @see Cadenya::Resources::Objectives#create
6
6
  class Objective < Cadenya::Internal::Type::BaseModel
7
- # @!attribute data
7
+ # @!attribute initial_message
8
+ # The initial message sent to the agent. This becomes the first user message in
9
+ # the LLM chat history.
8
10
  #
9
- # @return [Cadenya::Models::ObjectiveData]
10
- required :data, -> { Cadenya::ObjectiveData }
11
+ # @return [String]
12
+ required :initial_message, String, api_name: :initialMessage
11
13
 
12
14
  # @!attribute metadata
13
15
  # Metadata for ephemeral operations and activities (e.g., objectives, executions,
@@ -16,12 +18,61 @@ module Cadenya
16
18
  # @return [Cadenya::Models::OperationMetadata]
17
19
  required :metadata, -> { Cadenya::OperationMetadata }
18
20
 
19
- # @!attribute status
21
+ # @!attribute memory_stack
22
+ # Memory layers/entries to push onto this objective's memory stack on top of the
23
+ # baseline stack inherited from the selected variation.
20
24
  #
21
- # @return [Cadenya::Models::ObjectiveStatus]
22
- required :status, -> { Cadenya::ObjectiveStatus }
25
+ # Array order is push order: the first element sits lower in the objective's
26
+ # contribution to the stack; the LAST element ends up on top of the effective
27
+ # stack. Entries pinned via memory_entry_id behave as single-entry layers at their
28
+ # position.
29
+ #
30
+ # System-managed layers (e.g., episodic) cannot be referenced here; they attach
31
+ # themselves automatically based on episodic_key.
32
+ #
33
+ # Stack size cap: the TOTAL effective stack (variation's memory layers
34
+ #
35
+ # - this field) must not exceed 10 entries. A request that would produce an
36
+ # effective stack larger than 10 is rejected with InvalidArgument.
37
+ #
38
+ # @return [Array<Cadenya::Models::MemoryReference>, nil]
39
+ optional :memory_stack,
40
+ -> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
41
+ api_name: :memoryStack
42
+
43
+ # @!attribute secrets
44
+ # Secrets that can be used in the headers for tool calls using the secret
45
+ # interpolation format.
46
+ #
47
+ # @return [Array<Cadenya::Models::ObjectiveSecret>, nil]
48
+ optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveSecret] }
23
49
 
24
50
  response_only do
51
+ # @!attribute config_snapshot
52
+ # ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation,
53
+ # and (when applicable) schedule that an objective was started with.
54
+ #
55
+ # @return [Cadenya::Models::ObjectiveConfigSnapshot]
56
+ required :config_snapshot, -> { Cadenya::ObjectiveConfigSnapshot }, api_name: :configSnapshot
57
+
58
+ # @!attribute state
59
+ # The current lifecycle state of the objective.
60
+ #
61
+ # @return [Symbol, Cadenya::Models::Objective::State]
62
+ required :state, enum: -> { Cadenya::Objective::State }
63
+
64
+ # @!attribute system_prompt
65
+ # system_prompt is read-only, derived from the selected variation's prompt
66
+ #
67
+ # @return [String]
68
+ required :system_prompt, String, api_name: :systemPrompt
69
+
70
+ # @!attribute data
71
+ # Arbitrary data for the objective
72
+ #
73
+ # @return [Hash{Symbol=>Object}, nil]
74
+ optional :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
75
+
25
76
  # @!attribute info
26
77
  # ObjectiveInfo provides read-only aggregated statistics about an objective's
27
78
  # execution
@@ -29,30 +80,77 @@ module Cadenya
29
80
  # @return [Cadenya::Models::ObjectiveInfo, nil]
30
81
  optional :info, -> { Cadenya::ObjectiveInfo }
31
82
 
32
- # @!attribute last_five_windows
33
- # Read-only list of the last five windows of execution for this objective, ordered
34
- # by most recent first. Is only included in singular RPC calls (GetObjective, for
35
- # example).
83
+ # @!attribute output
84
+ # The output of the objective, populated when the objective completes. Will match
85
+ # the schema of output_json_schema or output_json_inferred. This will only be set
86
+ # if the state of the objective is set to STATE_FINALIZED
87
+ #
88
+ # @return [Hash{Symbol=>Object}, nil]
89
+ optional :output, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
90
+
91
+ # @!attribute parent_objective_id
92
+ # A parent objective means the objective was spawned off using a separate agent to
93
+ # complete an objective
36
94
  #
37
- # @return [Array<Cadenya::Models::ObjectiveContextWindow>, nil]
38
- optional :last_five_windows,
39
- -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveContextWindow] },
40
- api_name: :lastFiveWindows
95
+ # @return [String, nil]
96
+ optional :parent_objective_id, String, api_name: :parentObjectiveId
97
+
98
+ # @!attribute state_message
99
+ # Optional human-readable detail about the current state (e.g. a failure reason).
100
+ #
101
+ # @return [String, nil]
102
+ optional :state_message, String, api_name: :stateMessage
41
103
  end
42
104
 
43
- # @!method initialize(data:, metadata:, status:, info: nil, last_five_windows: nil)
105
+ # @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, info: nil, memory_stack: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil)
44
106
  # Some parameter documentations has been truncated, see
45
107
  # {Cadenya::Models::Objective} for more details.
46
108
  #
47
- # @param data [Cadenya::Models::ObjectiveData]
109
+ # Objective is the data for an objective. It contains the snapshotted fields for
110
+ # the selected agent and variation. Secrets are returned only with their names,
111
+ # and the output definition is copied from the agent's configuration.
112
+ #
113
+ # @param config_snapshot [Cadenya::Models::ObjectiveConfigSnapshot] ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation, a
114
+ #
115
+ # @param initial_message [String] The initial message sent to the agent. This becomes the first user message in th
48
116
  #
49
117
  # @param metadata [Cadenya::Models::OperationMetadata] Metadata for ephemeral operations and activities (e.g., objectives, executions,
50
118
  #
51
- # @param status [Cadenya::Models::ObjectiveStatus]
119
+ # @param state [Symbol, Cadenya::Models::Objective::State] The current lifecycle state of the objective.
120
+ #
121
+ # @param system_prompt [String] system_prompt is read-only, derived from the selected variation's prompt
122
+ #
123
+ # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective
52
124
  #
53
125
  # @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
54
126
  #
55
- # @param last_five_windows [Array<Cadenya::Models::ObjectiveContextWindow>] Read-only list of the last five windows of execution for this objective, ordered
127
+ # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
128
+ #
129
+ # @param output [Hash{Symbol=>Object}] The output of the objective, populated when the objective completes. Will match
130
+ #
131
+ # @param parent_objective_id [String] A parent objective means the objective was spawned off using a separate agent to
132
+ #
133
+ # @param secrets [Array<Cadenya::Models::ObjectiveSecret>] Secrets that can be used in the headers for tool calls using the secret interpol
134
+ #
135
+ # @param state_message [String] Optional human-readable detail about the current state (e.g. a failure reason).
136
+
137
+ # The current lifecycle state of the objective.
138
+ #
139
+ # @see Cadenya::Models::Objective#state
140
+ module State
141
+ extend Cadenya::Internal::Type::Enum
142
+
143
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
144
+ STATE_PENDING = :STATE_PENDING
145
+ STATE_RUNNING = :STATE_RUNNING
146
+ STATE_WAITING = :STATE_WAITING
147
+ STATE_FAILED = :STATE_FAILED
148
+ STATE_CANCELLED = :STATE_CANCELLED
149
+ STATE_FINALIZED = :STATE_FINALIZED
150
+
151
+ # @!method self.values
152
+ # @return [Array<Symbol>]
153
+ end
56
154
  end
57
155
  end
58
156
  end
@@ -0,0 +1,39 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ class ObjectiveConfigSnapshot < Cadenya::Internal::Type::BaseModel
6
+ # @!attribute agent
7
+ # Agent resource
8
+ #
9
+ # @return [Cadenya::Models::Agent, nil]
10
+ optional :agent, -> { Cadenya::Agent }
11
+
12
+ # @!attribute agent_schedule
13
+ # AgentSchedule resource — a recurring trigger attached to an agent that creates
14
+ # objectives on its cadence.
15
+ #
16
+ # @return [Cadenya::Models::Agents::AgentSchedule, nil]
17
+ optional :agent_schedule, -> { Cadenya::Agents::AgentSchedule }, api_name: :agentSchedule
18
+
19
+ # @!attribute agent_variation
20
+ # AgentVariation resource
21
+ #
22
+ # @return [Cadenya::Models::Agents::AgentVariation, nil]
23
+ optional :agent_variation, -> { Cadenya::Agents::AgentVariation }, api_name: :agentVariation
24
+
25
+ # @!method initialize(agent: nil, agent_schedule: nil, agent_variation: nil)
26
+ # Some parameter documentations has been truncated, see
27
+ # {Cadenya::Models::ObjectiveConfigSnapshot} for more details.
28
+ #
29
+ # ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation,
30
+ # and (when applicable) schedule that an objective was started with.
31
+ #
32
+ # @param agent [Cadenya::Models::Agent] Agent resource
33
+ #
34
+ # @param agent_schedule [Cadenya::Models::Agents::AgentSchedule] AgentSchedule resource — a recurring trigger attached to an agent that
35
+ #
36
+ # @param agent_variation [Cadenya::Models::Agents::AgentVariation] AgentVariation resource
37
+ end
38
+ end
39
+ end
@@ -18,9 +18,41 @@ module Cadenya
18
18
  required :agent_id, String, api_name: :agentId
19
19
 
20
20
  # @!attribute data
21
+ # Arbitrary data for the objective. May be used in liquid templates for prompts
22
+ # configured on the agent variation
21
23
  #
22
- # @return [Cadenya::Models::ObjectiveData]
23
- required :data, -> { Cadenya::ObjectiveData }
24
+ # @return [Hash{Symbol=>Object}]
25
+ required :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
26
+
27
+ # @!attribute initial_message
28
+ # Optional override for initial message sent to the agent. This becomes the first
29
+ # user message in the LLM chat history. The agent variation is used to set this if
30
+ # not present.
31
+ #
32
+ # @return [String, nil]
33
+ optional :initial_message, String, api_name: :initialMessage
34
+
35
+ # @!attribute memory_stack
36
+ # Memory layers/entries to push onto this objective's memory stack on top of the
37
+ # baseline stack inherited from the selected variation.
38
+ #
39
+ # Array order is push order: the first element sits lower in the objective's
40
+ # contribution to the stack; the LAST element ends up on top of the effective
41
+ # stack. Entries pinned via memory_entry_id behave as single-entry layers at their
42
+ # position.
43
+ #
44
+ # System-managed layers (e.g., episodic) cannot be referenced here; they attach
45
+ # themselves automatically based on episodic_key.
46
+ #
47
+ # Stack size cap: the TOTAL effective stack (variation's memory layers
48
+ #
49
+ # - this field) must not exceed 10 entries. A request that would produce an
50
+ # effective stack larger than 10 is rejected with InvalidArgument.
51
+ #
52
+ # @return [Array<Cadenya::Models::MemoryReference>, nil]
53
+ optional :memory_stack,
54
+ -> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
55
+ api_name: :memoryStack
24
56
 
25
57
  # @!attribute metadata
26
58
  # CreateOperationMetadata contains the user-provided fields for creating an
@@ -30,6 +62,13 @@ module Cadenya
30
62
  # @return [Cadenya::Models::CreateOperationMetadata, nil]
31
63
  optional :metadata, -> { Cadenya::CreateOperationMetadata }
32
64
 
65
+ # @!attribute secrets
66
+ # Secrets that can be used in the headers for tool calls using the secret
67
+ # interpolation format.
68
+ #
69
+ # @return [Array<Cadenya::Models::ObjectiveCreateParams::Secret>, nil]
70
+ optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveCreateParams::Secret] }
71
+
33
72
  # @!attribute variation_id
34
73
  # Optional explicit variation selection. Overrides the agent's
35
74
  # variation_selection_mode.
@@ -37,7 +76,7 @@ module Cadenya
37
76
  # @return [String, nil]
38
77
  optional :variation_id, String, api_name: :variationId
39
78
 
40
- # @!method initialize(workspace_id:, agent_id:, data:, metadata: nil, variation_id: nil, request_options: {})
79
+ # @!method initialize(workspace_id:, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
41
80
  # Some parameter documentations has been truncated, see
42
81
  # {Cadenya::Models::ObjectiveCreateParams} for more details.
43
82
  #
@@ -45,13 +84,35 @@ module Cadenya
45
84
  #
46
85
  # @param agent_id [String]
47
86
  #
48
- # @param data [Cadenya::Models::ObjectiveData]
87
+ # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
88
+ #
89
+ # @param initial_message [String] Optional override for initial message sent to the agent. This becomes the first
90
+ #
91
+ # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
49
92
  #
50
93
  # @param metadata [Cadenya::Models::CreateOperationMetadata] CreateOperationMetadata contains the user-provided fields for creating
51
94
  #
95
+ # @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
96
+ #
52
97
  # @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
53
98
  #
54
99
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
100
+
101
+ class Secret < Cadenya::Internal::Type::BaseModel
102
+ # @!attribute name
103
+ #
104
+ # @return [String, nil]
105
+ optional :name, String
106
+
107
+ # @!attribute value
108
+ #
109
+ # @return [String, nil]
110
+ optional :value, String
111
+
112
+ # @!method initialize(name: nil, value: nil)
113
+ # @param name [String]
114
+ # @param value [String]
115
+ end
55
116
  end
56
117
  end
57
118
  end
@@ -3,72 +3,84 @@
3
3
  module Cadenya
4
4
  module Models
5
5
  class ObjectiveInfo < Cadenya::Internal::Type::BaseModel
6
- # @!attribute agent
7
- # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
8
- #
9
- # @return [Cadenya::Models::ResourceMetadata, nil]
10
- optional :agent, -> { Cadenya::ResourceMetadata }
11
-
12
- # @!attribute agent_variation
13
- # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
14
- #
15
- # @return [Cadenya::Models::ResourceMetadata, nil]
16
- optional :agent_variation, -> { Cadenya::ResourceMetadata }, api_name: :agentVariation
17
-
18
6
  # @!attribute created_by
19
7
  # A profile identifies a user or non-human principal (such as an API key) at the
20
8
  # account level. Profiles are account-scoped and can be granted access to multiple
21
9
  # workspaces.
22
10
  #
23
- # @return [Cadenya::Models::Profile, nil]
24
- optional :created_by, -> { Cadenya::Profile }, api_name: :createdBy
11
+ # @return [Cadenya::Models::Profile]
12
+ required :created_by, -> { Cadenya::Profile }, api_name: :createdBy
25
13
 
26
14
  response_only do
15
+ # @!attribute agent
16
+ # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
17
+ #
18
+ # @return [Cadenya::Models::ResourceMetadata]
19
+ required :agent, -> { Cadenya::ResourceMetadata }
20
+
21
+ # @!attribute agent_variation
22
+ # Standard metadata for persistent, named resources (e.g., agents, tools, prompts)
23
+ #
24
+ # @return [Cadenya::Models::ResourceMetadata]
25
+ required :agent_variation, -> { Cadenya::ResourceMetadata }, api_name: :agentVariation
26
+
27
+ # @!attribute current_context_window_id
28
+ # ID of the objective's current (most recent) context window. Hydrated on demand;
29
+ # empty when the objective has not yet produced a context window.
30
+ #
31
+ # @return [String]
32
+ required :current_context_window_id, String, api_name: :currentContextWindowId
33
+
27
34
  # @!attribute effective_memory_stack
28
35
  # The effective memory stack at objective creation time, flattened from the
29
- # variation's baseline plus ObjectiveData.memory_stack. Order is push order (last
30
- # = top). Returned on reads so clients can see exactly what stack the objective is
36
+ # variation's baseline plus Objective.memory_stack. Order is push order (last =
37
+ # top). Returned on reads so clients can see exactly what stack the objective is
31
38
  # using without having to re-join variation state.
32
39
  #
33
- # @return [Array<Cadenya::Models::MemoryReference>, nil]
34
- optional :effective_memory_stack,
40
+ # @return [Array<Cadenya::Models::MemoryReference>]
41
+ required :effective_memory_stack,
35
42
  -> { Cadenya::Internal::Type::ArrayOf[Cadenya::MemoryReference] },
36
43
  api_name: :effectiveMemoryStack
37
44
 
38
45
  # @!attribute total_context_windows
39
46
  # Total number of context windows that this objective has generated
40
47
  #
41
- # @return [Integer, nil]
42
- optional :total_context_windows, Integer, api_name: :totalContextWindows
48
+ # @return [Integer]
49
+ required :total_context_windows, Integer, api_name: :totalContextWindows
43
50
 
44
51
  # @!attribute total_events
45
52
  # Total number of events generated during this objective's execution
46
53
  #
47
- # @return [Integer, nil]
48
- optional :total_events, Integer, api_name: :totalEvents
54
+ # @return [Integer]
55
+ required :total_events, Integer, api_name: :totalEvents
49
56
 
50
57
  # @!attribute total_input_tokens
51
58
  # Total input tokens consumed across all LLM completions across all context
52
59
  # windows
53
60
  #
54
- # @return [Integer, nil]
55
- optional :total_input_tokens, Integer, api_name: :totalInputTokens
61
+ # @return [Integer]
62
+ required :total_input_tokens, Integer, api_name: :totalInputTokens
63
+
64
+ # @!attribute total_iterations
65
+ #
66
+ # @return [Integer]
67
+ required :total_iterations, Integer, api_name: :totalIterations
56
68
 
57
69
  # @!attribute total_output_tokens
58
70
  # Total output tokens generated across all LLM completions across all context
59
71
  # windows
60
72
  #
61
- # @return [Integer, nil]
62
- optional :total_output_tokens, Integer, api_name: :totalOutputTokens
73
+ # @return [Integer]
74
+ required :total_output_tokens, Integer, api_name: :totalOutputTokens
63
75
 
64
76
  # @!attribute total_tool_calls
65
77
  # Total number of tool calls made during execution
66
78
  #
67
- # @return [Integer, nil]
68
- optional :total_tool_calls, Integer, api_name: :totalToolCalls
79
+ # @return [Integer]
80
+ required :total_tool_calls, Integer, api_name: :totalToolCalls
69
81
  end
70
82
 
71
- # @!method initialize(agent: nil, agent_variation: nil, created_by: nil, effective_memory_stack: nil, total_context_windows: nil, total_events: nil, total_input_tokens: nil, total_output_tokens: nil, total_tool_calls: nil)
83
+ # @!method initialize(agent:, agent_variation:, created_by:, current_context_window_id:, effective_memory_stack:, total_context_windows:, total_events:, total_input_tokens:, total_iterations:, total_output_tokens:, total_tool_calls:)
72
84
  # Some parameter documentations has been truncated, see
73
85
  # {Cadenya::Models::ObjectiveInfo} for more details.
74
86
  #
@@ -81,6 +93,8 @@ module Cadenya
81
93
  #
82
94
  # @param created_by [Cadenya::Models::Profile] A profile identifies a user or non-human principal (such as an API key)
83
95
  #
96
+ # @param current_context_window_id [String] ID of the objective's current (most recent) context window. Hydrated on
97
+ #
84
98
  # @param effective_memory_stack [Array<Cadenya::Models::MemoryReference>] The effective memory stack at objective creation time, flattened
85
99
  #
86
100
  # @param total_context_windows [Integer] Total number of context windows that this objective has generated
@@ -89,6 +103,8 @@ module Cadenya
89
103
  #
90
104
  # @param total_input_tokens [Integer] Total input tokens consumed across all LLM completions across all context window
91
105
  #
106
+ # @param total_iterations [Integer]
107
+ #
92
108
  # @param total_output_tokens [Integer] Total output tokens generated across all LLM completions across all context wind
93
109
  #
94
110
  # @param total_tool_calls [Integer] Total number of tool calls made during execution
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ class ObjectiveSecret < Cadenya::Internal::Type::BaseModel
6
+ # @!attribute name
7
+ #
8
+ # @return [String, nil]
9
+ optional :name, String
10
+
11
+ # @!method initialize(name: nil)
12
+ # @param name [String]
13
+ end
14
+ end
15
+ end
@@ -31,13 +31,13 @@ module Cadenya
31
31
  response_only do
32
32
  # @!attribute execution_status
33
33
  #
34
- # @return [Symbol, Cadenya::Models::Objectives::ObjectiveToolCall::ExecutionStatus, nil]
35
- optional :execution_status,
34
+ # @return [Symbol, Cadenya::Models::Objectives::ObjectiveToolCall::ExecutionStatus]
35
+ required :execution_status,
36
36
  enum: -> { Cadenya::Objectives::ObjectiveToolCall::ExecutionStatus },
37
37
  api_name: :executionStatus
38
38
  end
39
39
 
40
- # @!method initialize(data:, metadata:, status:, execution_status: nil, info: nil)
40
+ # @!method initialize(data:, execution_status:, metadata:, status:, info: nil)
41
41
  # Some parameter documentations has been truncated, see
42
42
  # {Cadenya::Models::Objectives::ObjectiveToolCall} for more details.
43
43
  #
@@ -47,14 +47,28 @@ module Cadenya
47
47
  #
48
48
  # @param data [Cadenya::Models::Objectives::ObjectiveToolCallData]
49
49
  #
50
+ # @param execution_status [Symbol, Cadenya::Models::Objectives::ObjectiveToolCall::ExecutionStatus]
51
+ #
50
52
  # @param metadata [Cadenya::Models::OperationMetadata] Metadata for ephemeral operations and activities (e.g., objectives, executions,
51
53
  #
52
54
  # @param status [Symbol, Cadenya::Models::Objectives::ObjectiveToolCall::Status] Current status of the tool call
53
55
  #
54
- # @param execution_status [Symbol, Cadenya::Models::Objectives::ObjectiveToolCall::ExecutionStatus]
55
- #
56
56
  # @param info [Cadenya::Models::Objectives::ObjectiveToolCallInfo]
57
57
 
58
+ # @see Cadenya::Models::Objectives::ObjectiveToolCall#execution_status
59
+ module ExecutionStatus
60
+ extend Cadenya::Internal::Type::Enum
61
+
62
+ TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED = :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
63
+ TOOL_CALL_EXECUTION_STATUS_PENDING = :TOOL_CALL_EXECUTION_STATUS_PENDING
64
+ TOOL_CALL_EXECUTION_STATUS_RUNNING = :TOOL_CALL_EXECUTION_STATUS_RUNNING
65
+ TOOL_CALL_EXECUTION_STATUS_COMPLETED = :TOOL_CALL_EXECUTION_STATUS_COMPLETED
66
+ TOOL_CALL_EXECUTION_STATUS_ERRORED = :TOOL_CALL_EXECUTION_STATUS_ERRORED
67
+
68
+ # @!method self.values
69
+ # @return [Array<Symbol>]
70
+ end
71
+
58
72
  # Current status of the tool call
59
73
  #
60
74
  # @see Cadenya::Models::Objectives::ObjectiveToolCall#status
@@ -70,20 +84,6 @@ module Cadenya
70
84
  # @!method self.values
71
85
  # @return [Array<Symbol>]
72
86
  end
73
-
74
- # @see Cadenya::Models::Objectives::ObjectiveToolCall#execution_status
75
- module ExecutionStatus
76
- extend Cadenya::Internal::Type::Enum
77
-
78
- TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED = :TOOL_CALL_EXECUTION_STATUS_UNSPECIFIED
79
- TOOL_CALL_EXECUTION_STATUS_PENDING = :TOOL_CALL_EXECUTION_STATUS_PENDING
80
- TOOL_CALL_EXECUTION_STATUS_RUNNING = :TOOL_CALL_EXECUTION_STATUS_RUNNING
81
- TOOL_CALL_EXECUTION_STATUS_COMPLETED = :TOOL_CALL_EXECUTION_STATUS_COMPLETED
82
- TOOL_CALL_EXECUTION_STATUS_ERRORED = :TOOL_CALL_EXECUTION_STATUS_ERRORED
83
-
84
- # @!method self.values
85
- # @return [Array<Symbol>]
86
- end
87
87
  end
88
88
  end
89
89
 
@@ -187,6 +187,8 @@ module Cadenya
187
187
 
188
188
  ObjectiveCompactParams = Cadenya::Models::ObjectiveCompactParams
189
189
 
190
+ ObjectiveConfigSnapshot = Cadenya::Models::ObjectiveConfigSnapshot
191
+
190
192
  ObjectiveContextWindow = Cadenya::Models::ObjectiveContextWindow
191
193
 
192
194
  ObjectiveContextWindowData = Cadenya::Models::ObjectiveContextWindowData
@@ -195,10 +197,6 @@ module Cadenya
195
197
 
196
198
  ObjectiveCreateParams = Cadenya::Models::ObjectiveCreateParams
197
199
 
198
- ObjectiveData = Cadenya::Models::ObjectiveData
199
-
200
- ObjectiveDataSecret = Cadenya::Models::ObjectiveDataSecret
201
-
202
200
  ObjectiveError = Cadenya::Models::ObjectiveError
203
201
 
204
202
  ObjectiveEventData = Cadenya::Models::ObjectiveEventData
@@ -219,7 +217,7 @@ module Cadenya
219
217
 
220
218
  Objectives = Cadenya::Models::Objectives
221
219
 
222
- ObjectiveStatus = Cadenya::Models::ObjectiveStatus
220
+ ObjectiveSecret = Cadenya::Models::ObjectiveSecret
223
221
 
224
222
  OperationMetadata = Cadenya::Models::OperationMetadata
225
223
 
@@ -69,9 +69,9 @@ module Cadenya
69
69
  raise ArgumentError.new("missing required path argument #{_1}")
70
70
  end
71
71
  @client.request(
72
- method: :put,
72
+ method: :post,
73
73
  path: [
74
- "v1/workspaces/%1$s/objectives/%2$s/tool_calls/%3$s/approve",
74
+ "v1/workspaces/%1$s/objectives/%2$s/tool_calls/%3$s:approve",
75
75
  workspace_id,
76
76
  objective_id,
77
77
  tool_call_id
@@ -114,9 +114,9 @@ module Cadenya
114
114
  raise ArgumentError.new("missing required path argument #{_1}")
115
115
  end
116
116
  @client.request(
117
- method: :put,
117
+ method: :post,
118
118
  path: [
119
- "v1/workspaces/%1$s/objectives/%2$s/tool_calls/%3$s/deny",
119
+ "v1/workspaces/%1$s/objectives/%2$s/tool_calls/%3$s:deny",
120
120
  workspace_id,
121
121
  objective_id,
122
122
  tool_call_id