cadenya 0.27.0 → 0.28.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c6eb50e3dd9cd1e5abf056602489f69eb105ade97ee895cc3317800037f7fc38
4
- data.tar.gz: e09e1f78f5785eb72204bf9f386bcab14a520860c398976ad0924c687104ae7d
3
+ metadata.gz: bf555cd84ae5279087a5b60695fec05f03451abbb21cc910c5e85cb1ed52c56e
4
+ data.tar.gz: b7662e178b9f76f9e044bdff89f57bb78a75fd58ef92c9f7ac4c75ed45aef3a6
5
5
  SHA512:
6
- metadata.gz: d04c3cecc0ff18faf6f7ed78f3534212d31dc3cc232810b2d3f27e479f9c2e25cc4dc2f14cabce32bdc2e1937e00043032608400d67c2d30cde27ce315230967
7
- data.tar.gz: 52851b33c7aa1d0fcceaf8f82807900525f38074b0437c951f193ee1c0de8baadcb2624e80b840f970d0ec5220fb989b8d7c4eec07bc2a516c18e994a539ad69
6
+ metadata.gz: eb71eb5d8238a2f9d63ceadf1ebd77230fbed22f146eada9da0abeb2b578128646b6bbe3feaaf4cc179d5e894cd9c94ab96f413cbf63cbf72ebe94e1b6d42c66
7
+ data.tar.gz: 4bb21c37969a3c091aa854523f4e45e323ad513f299b384978befb9d975ad442b0ad24c0c064ae1ff41ec9b1cb781c92ce1bd744531504707ec912e79a4f800c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.28.0 (2026-07-04)
4
+
5
+ Full Changelog: [v0.27.0...v0.28.0](https://github.com/cadenya/cadenya-ruby/compare/v0.27.0...v0.28.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([c9dc7c5](https://github.com/cadenya/cadenya-ruby/commit/c9dc7c5f0fc9da27463add06430456abdaaa7163))
10
+
3
11
  ## 0.27.0 (2026-07-03)
4
12
 
5
13
  Full Changelog: [v0.26.0...v0.27.0](https://github.com/cadenya/cadenya-ruby/compare/v0.26.0...v0.27.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.27.0"
20
+ gem "cadenya", "~> 0.28.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -36,18 +36,6 @@ module Cadenya
36
36
  # @return [Integer, nil]
37
37
  optional :episodic_memory_ttl, Integer, api_name: :episodicMemoryTtl
38
38
 
39
- # @!attribute input_data_schema
40
- # InputDataSchema is used for enforcing a data input when objectives are created.
41
- # This is valuable when using liquid formatting in agent variation prompts. Input
42
- # data schema is also valuable when using an agent as a sub-agent, as the schema
43
- # is used as the tool's input parameter schema. If omitted, the sub-agent schema
44
- # will be loaded with a simple "prompt" free text string as its schema.
45
- #
46
- # @return [Hash{Symbol=>Object}, nil]
47
- optional :input_data_schema,
48
- Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
49
- api_name: :inputDataSchema
50
-
51
39
  # @!attribute output_definition
52
40
  # Optional output definition for objectives created for this agent. When provided,
53
41
  # Cadenya will append a tool to that will be called by the LLM in use by the
@@ -59,13 +47,26 @@ module Cadenya
59
47
  Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
60
48
  api_name: :outputDefinition
61
49
 
50
+ # @!attribute system_prompt_data_schema
51
+ # SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
52
+ # are created. This is valuable when using liquid formatting in agent variation
53
+ # system prompt templates. The schema is also used when the agent is attached as a
54
+ # sub-agent, as it becomes the tool's input parameter schema. If omitted, the
55
+ # sub-agent schema will be loaded with a simple "prompt" free text string as its
56
+ # schema.
57
+ #
58
+ # @return [Hash{Symbol=>Object}, nil]
59
+ optional :system_prompt_data_schema,
60
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
61
+ api_name: :systemPromptDataSchema
62
+
62
63
  # @!attribute webhook_events_url
63
64
  # The URL that Cadenya will send events for any objective assigned to the agent.
64
65
  #
65
66
  # @return [String, nil]
66
67
  optional :webhook_events_url, String, api_name: :webhookEventsUrl
67
68
 
68
- # @!method initialize(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, input_data_schema: nil, output_definition: nil, webhook_events_url: nil)
69
+ # @!method initialize(variation_selection_mode:, description: nil, enable_episodic_memory: nil, episodic_memory_ttl: nil, output_definition: nil, system_prompt_data_schema: nil, webhook_events_url: nil)
69
70
  # Some parameter documentations has been truncated, see
70
71
  # {Cadenya::Models::AgentSpec} for more details.
71
72
  #
@@ -79,10 +80,10 @@ module Cadenya
79
80
  #
80
81
  # @param episodic_memory_ttl [Integer] How long episodic memories should be retained.
81
82
  #
82
- # @param input_data_schema [Hash{Symbol=>Object}] InputDataSchema is used for enforcing a data input when objectives are created.
83
- #
84
83
  # @param output_definition [Hash{Symbol=>Object}] Optional output definition for objectives created for this agent.
85
84
  #
85
+ # @param system_prompt_data_schema [Hash{Symbol=>Object}] SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
86
+ #
86
87
  # @param webhook_events_url [String] The URL that Cadenya will send events for any objective assigned to the agent.
87
88
 
88
89
  # Controls how variations are automatically selected when creating objectives
@@ -12,20 +12,21 @@ module Cadenya
12
12
  # @return [Cadenya::Models::Agents::AgentScheduleSpecSchedule]
13
13
  required :schedule, -> { Cadenya::Agents::AgentScheduleSpecSchedule }
14
14
 
15
- # @!attribute data
16
- # Optional input data passed to the objective. If the agent has an
17
- # input_data_schema, this must satisfy it.
15
+ # @!attribute first_user_message
16
+ # Optional explicit first user message passed to CreateObjective on each fire.
17
+ # Becomes the first user message in the objective's chat history. When unset, the
18
+ # fired objective defers to the selected variation's first_user_message_template.
18
19
  #
19
- # @return [Object, nil]
20
- optional :data, Cadenya::Internal::Type::Unknown
20
+ # @return [String, nil]
21
+ optional :first_user_message, String, api_name: :firstUserMessage
21
22
 
22
- # @!attribute initial_message
23
- # Optional initial message passed to CreateObjective on each fire. Becomes the
24
- # first user message in the objective's chat history. When unset, the fired
25
- # objective defers to the selected variation's user_message_template.
23
+ # @!attribute first_user_message_data
24
+ # Optional data rendered into the variation's first_user_message_template when
25
+ # each fired objective is created. Separate from `system_prompt_data`, which
26
+ # renders the system prompt template.
26
27
  #
27
- # @return [String, nil]
28
- optional :initial_message, String, api_name: :initialMessage
28
+ # @return [Object, nil]
29
+ optional :first_user_message_data, Cadenya::Internal::Type::Unknown, api_name: :firstUserMessageData
29
30
 
30
31
  # @!attribute overlap_policy
31
32
  # What to do when the previous run is still in flight. Defaults to SKIP.
@@ -35,13 +36,13 @@ module Cadenya
35
36
  enum: -> { Cadenya::Agents::AgentScheduleSpec::OverlapPolicy },
36
37
  api_name: :overlapPolicy
37
38
 
38
- # @!attribute user_data
39
- # Optional data rendered into the variation's user_message_template when each
40
- # fired objective is created. Separate from `data`, which renders the system
41
- # prompt template.
39
+ # @!attribute system_prompt_data
40
+ # Optional data rendered into the variation's system_prompt_template when each
41
+ # fired objective is created. If the agent has a system_prompt_data_schema, this
42
+ # must satisfy it.
42
43
  #
43
44
  # @return [Object, nil]
44
- optional :user_data, Cadenya::Internal::Type::Unknown, api_name: :userData
45
+ optional :system_prompt_data, Cadenya::Internal::Type::Unknown, api_name: :systemPromptData
45
46
 
46
47
  # @!attribute variation_id
47
48
  # Optional explicit variation. When unset, the agent's variation_selection_mode
@@ -50,7 +51,7 @@ module Cadenya
50
51
  # @return [String, nil]
51
52
  optional :variation_id, String, api_name: :variationId
52
53
 
53
- # @!method initialize(schedule:, data: nil, initial_message: nil, overlap_policy: nil, user_data: nil, variation_id: nil)
54
+ # @!method initialize(schedule:, first_user_message: nil, first_user_message_data: nil, overlap_policy: nil, system_prompt_data: nil, variation_id: nil)
54
55
  # Some parameter documentations has been truncated, see
55
56
  # {Cadenya::Models::Agents::AgentScheduleSpec} for more details.
56
57
  #
@@ -58,13 +59,13 @@ module Cadenya
58
59
  #
59
60
  # @param schedule [Cadenya::Models::Agents::AgentScheduleSpecSchedule] Schedule defines WHEN the schedule fires. Temporal-style structured form:
60
61
  #
61
- # @param data [Object] Optional input data passed to the objective. If the agent has an
62
+ # @param first_user_message [String] Optional explicit first user message passed to CreateObjective on each fire.
62
63
  #
63
- # @param initial_message [String] Optional initial message passed to CreateObjective on each fire. Becomes the
64
+ # @param first_user_message_data [Object] Optional data rendered into the variation's first_user_message_template when
64
65
  #
65
66
  # @param overlap_policy [Symbol, Cadenya::Models::Agents::AgentScheduleSpec::OverlapPolicy] What to do when the previous run is still in flight. Defaults to SKIP.
66
67
  #
67
- # @param user_data [Object] Optional data rendered into the variation's user_message_template when each
68
+ # @param system_prompt_data [Object] Optional data rendered into the variation's system_prompt_template when each
68
69
  #
69
70
  # @param variation_id [String] Optional explicit variation. When unset, the agent's variation_selection_mode
70
71
 
@@ -25,6 +25,17 @@ module Cadenya
25
25
  # @return [String, nil]
26
26
  optional :description, String
27
27
 
28
+ # @!attribute first_user_message_template
29
+ # Liquid template for the first user message of objectives using this variation.
30
+ # Rendered with CreateObjectiveRequest.first_user_message_data into
31
+ # Objective.first_user_message, the first user message in the LLM chat history.
32
+ # CreateObjectiveRequest.first_user_message, when set, overrides the rendered
33
+ # result. If neither this template nor first_user_message is present, objective
34
+ # creation is rejected with InvalidArgument.
35
+ #
36
+ # @return [String, nil]
37
+ optional :first_user_message_template, String, api_name: :firstUserMessageTemplate
38
+
28
39
  # @!attribute model_config
29
40
  # ModelConfig defines the model configuration for a variation
30
41
  #
@@ -45,21 +56,12 @@ module Cadenya
45
56
 
46
57
  # @!attribute system_prompt_template
47
58
  # Liquid template for the system prompt of objectives using this variation.
48
- # Rendered with CreateObjectiveRequest.data into Objective.system_prompt.
59
+ # Rendered with CreateObjectiveRequest.system_prompt_data into
60
+ # Objective.system_prompt.
49
61
  #
50
62
  # @return [String, nil]
51
63
  optional :system_prompt_template, String, api_name: :systemPromptTemplate
52
64
 
53
- # @!attribute user_message_template
54
- # Liquid template for the initial user message of objectives using this variation.
55
- # Rendered with CreateObjectiveRequest.user_data and becomes the first user
56
- # message in the LLM chat history. CreateObjectiveRequest.initial_message, when
57
- # set, overrides the rendered result. If neither this template nor initial_message
58
- # is present, objective creation is rejected with InvalidArgument.
59
- #
60
- # @return [String, nil]
61
- optional :user_message_template, String, api_name: :userMessageTemplate
62
-
63
65
  # @!attribute weight
64
66
  # Weight for weighted random selection (>= 0). P(v) = v.weight / sum(all_weights).
65
67
  # Only used when the agent's variation_selection_mode is WEIGHTED. A weight of 0
@@ -69,7 +71,7 @@ module Cadenya
69
71
  # @return [Integer, nil]
70
72
  optional :weight, Integer
71
73
 
72
- # @!method initialize(compaction_config: nil, constraints: nil, description: nil, model_config: nil, progressive_discovery: nil, system_prompt_template: nil, user_message_template: nil, weight: nil)
74
+ # @!method initialize(compaction_config: nil, constraints: nil, description: nil, first_user_message_template: nil, model_config: nil, progressive_discovery: nil, system_prompt_template: nil, weight: nil)
73
75
  # Some parameter documentations has been truncated, see
74
76
  # {Cadenya::Models::Agents::AgentVariationSpec} for more details.
75
77
  #
@@ -81,14 +83,14 @@ module Cadenya
81
83
  #
82
84
  # @param description [String] Human-readable description of what this variation does or when it should be used
83
85
  #
86
+ # @param first_user_message_template [String] Liquid template for the first user message of objectives using this variation.
87
+ #
84
88
  # @param model_config [Cadenya::Models::Agents::AgentVariationSpecModelConfig] ModelConfig defines the model configuration for a variation
85
89
  #
86
90
  # @param progressive_discovery [Cadenya::Models::Agents::AgentVariationSpecProgressiveDiscovery] ProgressiveDiscovery is used to indicate that the agent should automatically dis
87
91
  #
88
92
  # @param system_prompt_template [String] Liquid template for the system prompt of objectives using this variation.
89
93
  #
90
- # @param user_message_template [String] Liquid template for the initial user message of objectives using this variation.
91
- #
92
94
  # @param weight [Integer] Weight for weighted random selection (>= 0). P(v) = v.weight / sum(all_weights).
93
95
  end
94
96
  end
@@ -4,12 +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 initial_message
8
- # The initial message sent to the agent. This becomes the first user message in
9
- # the LLM chat history.
7
+ # @!attribute first_user_message
8
+ # The first user message in the LLM chat history, either provided explicitly at
9
+ # creation or rendered from the variation's first_user_message_template.
10
10
  #
11
11
  # @return [String]
12
- required :initial_message, String, api_name: :initialMessage
12
+ required :first_user_message, String, api_name: :firstUserMessage
13
13
 
14
14
  # @!attribute metadata
15
15
  # Metadata for ephemeral operations and activities (e.g., objectives, executions,
@@ -71,11 +71,13 @@ module Cadenya
71
71
  # @return [String]
72
72
  required :system_prompt, String, api_name: :systemPrompt
73
73
 
74
- # @!attribute data
75
- # Arbitrary data for the objective
74
+ # @!attribute first_user_message_data
75
+ # Arbitrary data rendered into the variation's first_user_message_template
76
76
  #
77
77
  # @return [Hash{Symbol=>Object}, nil]
78
- optional :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
78
+ optional :first_user_message_data,
79
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
80
+ api_name: :firstUserMessageData
79
81
 
80
82
  # @!attribute info
81
83
  # ObjectiveInfo provides read-only aggregated statistics about an objective's
@@ -105,16 +107,16 @@ module Cadenya
105
107
  # @return [String, nil]
106
108
  optional :state_message, String, api_name: :stateMessage
107
109
 
108
- # @!attribute user_data
109
- # Arbitrary data used to render the variation's user_message_template
110
+ # @!attribute system_prompt_data
111
+ # Arbitrary data rendered into the variation's system_prompt_template
110
112
  #
111
113
  # @return [Hash{Symbol=>Object}, nil]
112
- optional :user_data,
114
+ optional :system_prompt_data,
113
115
  Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
114
- api_name: :userData
116
+ api_name: :systemPromptData
115
117
  end
116
118
 
117
- # @!method initialize(config_snapshot:, initial_message:, metadata:, state:, system_prompt:, data: nil, episodic_memory: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, user_data: nil)
119
+ # @!method initialize(config_snapshot:, first_user_message:, metadata:, state:, system_prompt:, episodic_memory: nil, first_user_message_data: nil, info: nil, memory_cascade: nil, output: nil, parent_objective_id: nil, secrets: nil, state_message: nil, system_prompt_data: nil)
118
120
  # Some parameter documentations has been truncated, see
119
121
  # {Cadenya::Models::Objective} for more details.
120
122
  #
@@ -124,7 +126,7 @@ module Cadenya
124
126
  #
125
127
  # @param config_snapshot [Cadenya::Models::ObjectiveConfigSnapshot] ObjectiveConfigSnapshot is the point-in-time snapshot of the agent, variation, a
126
128
  #
127
- # @param initial_message [String] The initial message sent to the agent. This becomes the first user message in th
129
+ # @param first_user_message [String] The first user message in the LLM chat history, either provided explicitly at
128
130
  #
129
131
  # @param metadata [Cadenya::Models::OperationMetadata] Metadata for ephemeral operations and activities (e.g., objectives, executions,
130
132
  #
@@ -132,10 +134,10 @@ module Cadenya
132
134
  #
133
135
  # @param system_prompt [String] system_prompt is read-only, derived from the selected variation's prompt
134
136
  #
135
- # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective
136
- #
137
137
  # @param episodic_memory [Cadenya::Models::Objective::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
138
138
  #
139
+ # @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the variation's first_user_message_template
140
+ #
139
141
  # @param info [Cadenya::Models::ObjectiveInfo] ObjectiveInfo provides read-only aggregated statistics about an objective's exec
140
142
  #
141
143
  # @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
@@ -148,7 +150,7 @@ module Cadenya
148
150
  #
149
151
  # @param state_message [String] Optional human-readable detail about the current state (e.g. a failure reason).
150
152
  #
151
- # @param user_data [Hash{Symbol=>Object}] Arbitrary data used to render the variation's user_message_template
153
+ # @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the variation's system_prompt_template
152
154
 
153
155
  # The current lifecycle state of the objective.
154
156
  #
@@ -17,12 +17,15 @@ module Cadenya
17
17
  # @return [String]
18
18
  required :agent_id, String, api_name: :agentId
19
19
 
20
- # @!attribute data
21
- # Arbitrary data for the objective. May be used in liquid templates for prompts
22
- # configured on the agent variation
20
+ # @!attribute system_prompt_data
21
+ # Arbitrary data rendered into the selected variation's system_prompt_template
22
+ # (liquid) to produce the objective's system prompt. If the agent has a
23
+ # system_prompt_data_schema, this must satisfy it.
23
24
  #
24
25
  # @return [Hash{Symbol=>Object}]
25
- required :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
26
+ required :system_prompt_data,
27
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
28
+ api_name: :systemPromptData
26
29
 
27
30
  # @!attribute episodic_memory
28
31
  # Episodic is used to configure the episodic memory for the objective
@@ -32,15 +35,25 @@ module Cadenya
32
35
  -> { Cadenya::ObjectiveCreateParams::EpisodicMemory },
33
36
  api_name: :episodicMemory
34
37
 
35
- # @!attribute initial_message
36
- # Optional override for the initial message sent to the agent. This becomes the
37
- # first user message in the LLM chat history. When not set, the selected
38
- # variation's user_message_template is rendered with user_data instead. If neither
39
- # this field nor a user_message_template is present, the request is rejected with
38
+ # @!attribute first_user_message
39
+ # Optional explicit first user message for the LLM chat history. When not set, the
40
+ # selected variation's first_user_message_template is rendered with
41
+ # first_user_message_data instead. If neither this field nor a
42
+ # first_user_message_template is present, the request is rejected with
40
43
  # InvalidArgument.
41
44
  #
42
45
  # @return [String, nil]
43
- optional :initial_message, String, api_name: :initialMessage
46
+ optional :first_user_message, String, api_name: :firstUserMessage
47
+
48
+ # @!attribute first_user_message_data
49
+ # Arbitrary data rendered into the selected variation's
50
+ # first_user_message_template (liquid) to produce the first user message. Separate
51
+ # from `system_prompt_data`, which renders the system prompt template.
52
+ #
53
+ # @return [Hash{Symbol=>Object}, nil]
54
+ optional :first_user_message_data,
55
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
56
+ api_name: :firstUserMessageData
44
57
 
45
58
  # @!attribute memory_cascade
46
59
  # Memory layers/entries layered over the baseline cascade inherited from the
@@ -77,16 +90,6 @@ module Cadenya
77
90
  # @return [Array<Cadenya::Models::ObjectiveCreateParams::Secret>, nil]
78
91
  optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveCreateParams::Secret] }
79
92
 
80
- # @!attribute user_data
81
- # Arbitrary data rendered into the selected variation's user_message_template
82
- # (liquid) to produce the initial user message. Separate from `data`, which
83
- # renders the system prompt template.
84
- #
85
- # @return [Hash{Symbol=>Object}, nil]
86
- optional :user_data,
87
- Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
88
- api_name: :userData
89
-
90
93
  # @!attribute variation_id
91
94
  # Optional explicit variation selection. Overrides the agent's
92
95
  # variation_selection_mode.
@@ -94,7 +97,7 @@ module Cadenya
94
97
  # @return [String, nil]
95
98
  optional :variation_id, String, api_name: :variationId
96
99
 
97
- # @!method initialize(workspace_id:, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_cascade: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
100
+ # @!method initialize(workspace_id:, agent_id:, system_prompt_data:, episodic_memory: nil, first_user_message: nil, first_user_message_data: nil, memory_cascade: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
98
101
  # Some parameter documentations has been truncated, see
99
102
  # {Cadenya::Models::ObjectiveCreateParams} for more details.
100
103
  #
@@ -102,11 +105,13 @@ module Cadenya
102
105
  #
103
106
  # @param agent_id [String]
104
107
  #
105
- # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
108
+ # @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's system_prompt_template
106
109
  #
107
110
  # @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
108
111
  #
109
- # @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
112
+ # @param first_user_message [String] Optional explicit first user message for the LLM chat history. When not set,
113
+ #
114
+ # @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's first_user_message_templat
110
115
  #
111
116
  # @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
112
117
  #
@@ -114,8 +119,6 @@ module Cadenya
114
119
  #
115
120
  # @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
116
121
  #
117
- # @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
118
- #
119
122
  # @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
120
123
  #
121
124
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
@@ -20,17 +20,19 @@ module Cadenya
20
20
  #
21
21
  # Creates a new objective in the workspace
22
22
  #
23
- # @overload create(workspace_id, agent_id:, data:, episodic_memory: nil, initial_message: nil, memory_cascade: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
23
+ # @overload create(workspace_id, agent_id:, system_prompt_data:, episodic_memory: nil, first_user_message: nil, first_user_message_data: nil, memory_cascade: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
24
24
  #
25
25
  # @param workspace_id [String]
26
26
  #
27
27
  # @param agent_id [String]
28
28
  #
29
- # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
29
+ # @param system_prompt_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's system_prompt_template
30
30
  #
31
31
  # @param episodic_memory [Cadenya::Models::ObjectiveCreateParams::EpisodicMemory] Episodic is used to configure the episodic memory for the objective
32
32
  #
33
- # @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
33
+ # @param first_user_message [String] Optional explicit first user message for the LLM chat history. When not set,
34
+ #
35
+ # @param first_user_message_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's first_user_message_templat
34
36
  #
35
37
  # @param memory_cascade [Array<Cadenya::Models::MemoryReference>] Memory layers/entries layered over the baseline cascade inherited
36
38
  #
@@ -38,8 +40,6 @@ module Cadenya
38
40
  #
39
41
  # @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
40
42
  #
41
- # @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
42
- #
43
43
  # @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
44
44
  #
45
45
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}, nil]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.27.0"
4
+ VERSION = "0.28.0"
5
5
  end
@@ -38,17 +38,6 @@ module Cadenya
38
38
  sig { params(episodic_memory_ttl: Integer).void }
39
39
  attr_writer :episodic_memory_ttl
40
40
 
41
- # InputDataSchema is used for enforcing a data input when objectives are created.
42
- # This is valuable when using liquid formatting in agent variation prompts. Input
43
- # data schema is also valuable when using an agent as a sub-agent, as the schema
44
- # is used as the tool's input parameter schema. If omitted, the sub-agent schema
45
- # will be loaded with a simple "prompt" free text string as its schema.
46
- sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
47
- attr_reader :input_data_schema
48
-
49
- sig { params(input_data_schema: T::Hash[Symbol, T.anything]).void }
50
- attr_writer :input_data_schema
51
-
52
41
  # Optional output definition for objectives created for this agent. When provided,
53
42
  # Cadenya will append a tool to that will be called by the LLM in use by the
54
43
  # variant to extract information in the format provided here. Use this option when
@@ -59,6 +48,20 @@ module Cadenya
59
48
  sig { params(output_definition: T::Hash[Symbol, T.anything]).void }
60
49
  attr_writer :output_definition
61
50
 
51
+ # SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
52
+ # are created. This is valuable when using liquid formatting in agent variation
53
+ # system prompt templates. The schema is also used when the agent is attached as a
54
+ # sub-agent, as it becomes the tool's input parameter schema. If omitted, the
55
+ # sub-agent schema will be loaded with a simple "prompt" free text string as its
56
+ # schema.
57
+ sig { returns(T.nilable(T::Hash[Symbol, T.anything])) }
58
+ attr_reader :system_prompt_data_schema
59
+
60
+ sig do
61
+ params(system_prompt_data_schema: T::Hash[Symbol, T.anything]).void
62
+ end
63
+ attr_writer :system_prompt_data_schema
64
+
62
65
  # The URL that Cadenya will send events for any objective assigned to the agent.
63
66
  sig { returns(T.nilable(String)) }
64
67
  attr_reader :webhook_events_url
@@ -74,8 +77,8 @@ module Cadenya
74
77
  description: String,
75
78
  enable_episodic_memory: T::Boolean,
76
79
  episodic_memory_ttl: Integer,
77
- input_data_schema: T::Hash[Symbol, T.anything],
78
80
  output_definition: T::Hash[Symbol, T.anything],
81
+ system_prompt_data_schema: T::Hash[Symbol, T.anything],
79
82
  webhook_events_url: String
80
83
  ).returns(T.attached_class)
81
84
  end
@@ -95,17 +98,18 @@ module Cadenya
95
98
  # layer's expiry forward by this duration, and stored entries expire this long
96
99
  # after they are written. If not set, episodic memories are retained indefinitely.
97
100
  episodic_memory_ttl: nil,
98
- # InputDataSchema is used for enforcing a data input when objectives are created.
99
- # This is valuable when using liquid formatting in agent variation prompts. Input
100
- # data schema is also valuable when using an agent as a sub-agent, as the schema
101
- # is used as the tool's input parameter schema. If omitted, the sub-agent schema
102
- # will be loaded with a simple "prompt" free text string as its schema.
103
- input_data_schema: nil,
104
101
  # Optional output definition for objectives created for this agent. When provided,
105
102
  # Cadenya will append a tool to that will be called by the LLM in use by the
106
103
  # variant to extract information in the format provided here. Use this option when
107
104
  # you want structured data to be created by your objectives.
108
105
  output_definition: nil,
106
+ # SystemPromptDataSchema enforces the shape of system_prompt_data when objectives
107
+ # are created. This is valuable when using liquid formatting in agent variation
108
+ # system prompt templates. The schema is also used when the agent is attached as a
109
+ # sub-agent, as it becomes the tool's input parameter schema. If omitted, the
110
+ # sub-agent schema will be loaded with a simple "prompt" free text string as its
111
+ # schema.
112
+ system_prompt_data_schema: nil,
109
113
  # The URL that Cadenya will send events for any objective assigned to the agent.
110
114
  webhook_events_url: nil
111
115
  )
@@ -119,8 +123,8 @@ module Cadenya
119
123
  description: String,
120
124
  enable_episodic_memory: T::Boolean,
121
125
  episodic_memory_ttl: Integer,
122
- input_data_schema: T::Hash[Symbol, T.anything],
123
126
  output_definition: T::Hash[Symbol, T.anything],
127
+ system_prompt_data_schema: T::Hash[Symbol, T.anything],
124
128
  webhook_events_url: String
125
129
  }
126
130
  )