cadenya 0.26.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.
Files changed (57) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +1 -1
  4. data/lib/cadenya/models/account_info.rb +13 -1
  5. data/lib/cadenya/models/account_rotate_challenge_token_params.rb +14 -0
  6. data/lib/cadenya/models/agent_spec.rb +16 -15
  7. data/lib/cadenya/models/agents/agent_schedule_spec.rb +21 -20
  8. data/lib/cadenya/models/agents/agent_variation_spec.rb +16 -14
  9. data/lib/cadenya/models/agents/webhook_delivery_data.rb +1 -0
  10. data/lib/cadenya/models/agents/webhook_delivery_list_params.rb +1 -0
  11. data/lib/cadenya/models/objective.rb +18 -16
  12. data/lib/cadenya/models/objective_continue_params.rb +1 -26
  13. data/lib/cadenya/models/objective_create_params.rb +28 -25
  14. data/lib/cadenya/models/objective_event_data.rb +63 -1
  15. data/lib/cadenya/models/rotate_challenge_token_response.rb +18 -0
  16. data/lib/cadenya/models/tool_set_adapter_mcp.rb +38 -1
  17. data/lib/cadenya/models/tool_sets/tool_info.rb +14 -1
  18. data/lib/cadenya/models.rb +4 -0
  19. data/lib/cadenya/resources/account.rb +19 -0
  20. data/lib/cadenya/resources/objectives.rb +6 -8
  21. data/lib/cadenya/version.rb +1 -1
  22. data/lib/cadenya.rb +2 -0
  23. data/rbi/cadenya/models/account_info.rbi +19 -0
  24. data/rbi/cadenya/models/account_rotate_challenge_token_params.rbi +30 -0
  25. data/rbi/cadenya/models/agent_spec.rbi +23 -19
  26. data/rbi/cadenya/models/agents/agent_schedule_spec.rbi +38 -36
  27. data/rbi/cadenya/models/agents/agent_variation_spec.rbi +25 -21
  28. data/rbi/cadenya/models/agents/webhook_delivery_data.rbi +5 -0
  29. data/rbi/cadenya/models/agents/webhook_delivery_list_params.rbi +5 -0
  30. data/rbi/cadenya/models/objective.rbi +24 -24
  31. data/rbi/cadenya/models/objective_continue_params.rbi +0 -49
  32. data/rbi/cadenya/models/objective_create_params.rbi +39 -37
  33. data/rbi/cadenya/models/objective_event_data.rbi +128 -0
  34. data/rbi/cadenya/models/rotate_challenge_token_response.rbi +30 -0
  35. data/rbi/cadenya/models/tool_set_adapter_mcp.rbi +69 -0
  36. data/rbi/cadenya/models/tool_sets/tool_info.rbi +17 -0
  37. data/rbi/cadenya/models.rbi +5 -0
  38. data/rbi/cadenya/resources/account.rbi +10 -0
  39. data/rbi/cadenya/resources/objectives.rbi +16 -20
  40. data/sig/cadenya/models/account_info.rbs +11 -1
  41. data/sig/cadenya/models/account_rotate_challenge_token_params.rbs +15 -0
  42. data/sig/cadenya/models/agent_spec.rbs +9 -7
  43. data/sig/cadenya/models/agents/agent_schedule_spec.rbs +15 -15
  44. data/sig/cadenya/models/agents/agent_variation_spec.rbs +7 -7
  45. data/sig/cadenya/models/agents/webhook_delivery_data.rbs +2 -0
  46. data/sig/cadenya/models/agents/webhook_delivery_list_params.rbs +2 -0
  47. data/sig/cadenya/models/objective.rbs +14 -14
  48. data/sig/cadenya/models/objective_continue_params.rbs +1 -26
  49. data/sig/cadenya/models/objective_create_params.rbs +16 -16
  50. data/sig/cadenya/models/objective_event_data.rbs +56 -0
  51. data/sig/cadenya/models/rotate_challenge_token_response.rbs +15 -0
  52. data/sig/cadenya/models/tool_set_adapter_mcp.rbs +32 -0
  53. data/sig/cadenya/models/tool_sets/tool_info.rbs +11 -1
  54. data/sig/cadenya/models.rbs +4 -0
  55. data/sig/cadenya/resources/account.rbs +4 -0
  56. data/sig/cadenya/resources/objectives.rbs +3 -4
  57. metadata +8 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9e5f872c6b3d400630fe4c6ff1429e78b994dc389ab7e610a0b6d208837ac0b
4
- data.tar.gz: 8fab533c3fac313a45a7458b0c27d4d4be58bb8f27c0a33d8783a48ec246690f
3
+ metadata.gz: bf555cd84ae5279087a5b60695fec05f03451abbb21cc910c5e85cb1ed52c56e
4
+ data.tar.gz: b7662e178b9f76f9e044bdff89f57bb78a75fd58ef92c9f7ac4c75ed45aef3a6
5
5
  SHA512:
6
- metadata.gz: 5edd2c17b031c2044ab6dc3ffe5a94585c6f2860511951bd9721c546571287c176f25cd10648bb008385f989611d86f998dc560250267fb3bc0ba1425ba5579d
7
- data.tar.gz: f593a86264bf46b5ff61d546e63e93926bc2850ef10d6d8bc82f906c2ce587b03455bdf62d755a1a66f39a6d715383f0374668dd73f5e525e1d79850fcdaf9bc
6
+ metadata.gz: eb71eb5d8238a2f9d63ceadf1ebd77230fbed22f146eada9da0abeb2b578128646b6bbe3feaaf4cc179d5e894cd9c94ab96f413cbf63cbf72ebe94e1b6d42c66
7
+ data.tar.gz: 4bb21c37969a3c091aa854523f4e45e323ad513f299b384978befb9d975ad442b0ad24c0c064ae1ff41ec9b1cb781c92ce1bd744531504707ec912e79a4f800c
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
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
+
11
+ ## 0.27.0 (2026-07-03)
12
+
13
+ Full Changelog: [v0.26.0...v0.27.0](https://github.com/cadenya/cadenya-ruby/compare/v0.26.0...v0.27.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([f407d32](https://github.com/cadenya/cadenya-ruby/commit/f407d328b0177f7048eb6d2a90916bd98351d3d3))
18
+
3
19
  ## 0.26.0 (2026-07-02)
4
20
 
5
21
  Full Changelog: [v0.25.0...v0.26.0](https://github.com/cadenya/cadenya-ruby/compare/v0.25.0...v0.26.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.26.0"
20
+ gem "cadenya", "~> 0.28.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -4,6 +4,16 @@ module Cadenya
4
4
  module Models
5
5
  class AccountInfo < Cadenya::Internal::Type::BaseModel
6
6
  response_only do
7
+ # @!attribute challenge_token
8
+ # The challenge token Cadenya sends in the X-Cadenya-Challenge-Token header on
9
+ # every MCP tools/list request. Server implementations can accept a valid
10
+ # challenge token in place of per-user auth when listing tools, while still
11
+ # requiring real auth on tools/call. Rotate with RotateChallengeToken; update any
12
+ # servers validating the token before rotating.
13
+ #
14
+ # @return [String, nil]
15
+ optional :challenge_token, String, api_name: :challengeToken
16
+
7
17
  # @!attribute global_api_key
8
18
  # An API key for the account. Use workspace-association RPCs to grant the key
9
19
  # access to specific workspaces; a key with zero workspaces is valid but cannot
@@ -21,12 +31,14 @@ module Cadenya
21
31
  optional :webhook_events_hmac_secret, String, api_name: :webhookEventsHmacSecret
22
32
  end
23
33
 
24
- # @!method initialize(global_api_key: nil, webhook_events_hmac_secret: nil)
34
+ # @!method initialize(challenge_token: nil, global_api_key: nil, webhook_events_hmac_secret: nil)
25
35
  # Some parameter documentations has been truncated, see
26
36
  # {Cadenya::Models::AccountInfo} for more details.
27
37
  #
28
38
  # Server-populated information about the account.
29
39
  #
40
+ # @param challenge_token [String] The challenge token Cadenya sends in the X-Cadenya-Challenge-Token header
41
+ #
30
42
  # @param global_api_key [Cadenya::Models::APIKey] An API key for the account. Use workspace-association RPCs to grant the
31
43
  #
32
44
  # @param webhook_events_hmac_secret [String] The generated secret that will sign all webhooks that are sent to your configure
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Account#rotate_challenge_token
6
+ class AccountRotateChallengeTokenParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!method initialize(request_options: {})
11
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
12
+ end
13
+ end
14
+ 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
@@ -135,6 +135,7 @@ module Cadenya
135
135
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
136
136
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
137
137
  OBJECTIVE_EVENT_TYPE_FINALIZED = :OBJECTIVE_EVENT_TYPE_FINALIZED
138
+ OBJECTIVE_EVENT_TYPE_NOTICE = :OBJECTIVE_EVENT_TYPE_NOTICE
138
139
 
139
140
  # @!method self.values
140
141
  # @return [Array<Symbol>]
@@ -77,6 +77,7 @@ module Cadenya
77
77
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
78
78
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED = :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
79
79
  OBJECTIVE_EVENT_TYPE_FINALIZED = :OBJECTIVE_EVENT_TYPE_FINALIZED
80
+ OBJECTIVE_EVENT_TYPE_NOTICE = :OBJECTIVE_EVENT_TYPE_NOTICE
80
81
 
81
82
  # @!method self.values
82
83
  # @return [Array<Symbol>]
@@ -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
  #
@@ -30,14 +30,7 @@ module Cadenya
30
30
  # @return [String, nil]
31
31
  optional :message, String
32
32
 
33
- # @!attribute secrets
34
- # Secrets that should be included with the message. Helpful for when you need to
35
- # update secrets on the objective (IE: A secret expires and needs to be refreshed)
36
- #
37
- # @return [Array<Cadenya::Models::ObjectiveContinueParams::Secret>, nil]
38
- optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveContinueParams::Secret] }
39
-
40
- # @!method initialize(workspace_id:, objective_id:, enqueue: nil, message: nil, secrets: nil, request_options: {})
33
+ # @!method initialize(workspace_id:, objective_id:, enqueue: nil, message: nil, request_options: {})
41
34
  # Some parameter documentations has been truncated, see
42
35
  # {Cadenya::Models::ObjectiveContinueParams} for more details.
43
36
  #
@@ -49,25 +42,7 @@ module Cadenya
49
42
  #
50
43
  # @param message [String] The message to continue an objective that has completed (or you are enqueing)
51
44
  #
52
- # @param secrets [Array<Cadenya::Models::ObjectiveContinueParams::Secret>] Secrets that should be included with the message. Helpful for when you need to u
53
- #
54
45
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
55
-
56
- class Secret < Cadenya::Internal::Type::BaseModel
57
- # @!attribute name
58
- #
59
- # @return [String, nil]
60
- optional :name, String
61
-
62
- # @!attribute value
63
- #
64
- # @return [String, nil]
65
- optional :value, String
66
-
67
- # @!method initialize(name: nil, value: nil)
68
- # @param name [String]
69
- # @param value [String]
70
- end
71
46
  end
72
47
  end
73
48
  end
@@ -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}]
@@ -44,6 +44,16 @@ module Cadenya
44
44
  # @return [Cadenya::Models::MemoryRead, nil]
45
45
  optional :memory_read, -> { Cadenya::MemoryRead }, api_name: :memoryRead
46
46
 
47
+ # @!attribute notice
48
+ # Notice is a non-terminal diagnostic emitted by the runtime when something
49
+ # noteworthy but non-fatal happens during an objective — for example a
50
+ # just-in-time tool set failing to load, or a previously loaded tool being dropped
51
+ # because it was archived. Notices carry no structured payload; they exist to make
52
+ # the objective timeline self-explanatory.
53
+ #
54
+ # @return [Cadenya::Models::ObjectiveEventData::Notice, nil]
55
+ optional :notice, -> { Cadenya::ObjectiveEventData::Notice }
56
+
47
57
  # @!attribute sub_agent_spawned
48
58
  #
49
59
  # @return [Cadenya::Models::SubAgentSpawned, nil]
@@ -98,7 +108,7 @@ module Cadenya
98
108
  # @return [Cadenya::Models::UserMessage, nil]
99
109
  optional :user_message, -> { Cadenya::UserMessage }, api_name: :userMessage
100
110
 
101
- # @!method initialize(assistant_message: nil, cancelled: nil, context_window_compacted: nil, error: nil, finalized: nil, memory_read: nil, sub_agent_spawned: nil, sub_agent_updated: nil, tool_approval_requested: nil, tool_approved: nil, tool_called: nil, tool_denied: nil, tool_error: nil, tool_result: nil, type: nil, user_message: nil)
111
+ # @!method initialize(assistant_message: nil, cancelled: nil, context_window_compacted: nil, error: nil, finalized: nil, memory_read: nil, notice: nil, sub_agent_spawned: nil, sub_agent_updated: nil, tool_approval_requested: nil, tool_approved: nil, tool_called: nil, tool_denied: nil, tool_error: nil, tool_result: nil, type: nil, user_message: nil)
102
112
  # Some parameter documentations has been truncated, see
103
113
  # {Cadenya::Models::ObjectiveEventData} for more details.
104
114
  #
@@ -114,6 +124,8 @@ module Cadenya
114
124
  #
115
125
  # @param memory_read [Cadenya::Models::MemoryRead] MemoryRead is emitted each time the agent resolves a key against the
116
126
  #
127
+ # @param notice [Cadenya::Models::ObjectiveEventData::Notice] Notice is a non-terminal diagnostic emitted by the runtime when something
128
+ #
117
129
  # @param sub_agent_spawned [Cadenya::Models::SubAgentSpawned]
118
130
  #
119
131
  # @param sub_agent_updated [Cadenya::Models::SubAgentUpdated]
@@ -175,6 +187,56 @@ module Cadenya
175
187
  #
176
188
  # @param output [Object] If the objective was created with an output schema, and the agent
177
189
  end
190
+
191
+ # @see Cadenya::Models::ObjectiveEventData#notice
192
+ class Notice < Cadenya::Internal::Type::BaseModel
193
+ # @!attribute key
194
+ # Stable machine-readable identifier for the notice kind (for example
195
+ # "tool_set_load_failed", "tool_archived"). Clients can switch on it or use it as
196
+ # an i18n key; the message is the English fallback.
197
+ #
198
+ # @return [String, nil]
199
+ optional :key, String
200
+
201
+ # @!attribute level
202
+ #
203
+ # @return [Symbol, Cadenya::Models::ObjectiveEventData::Notice::Level, nil]
204
+ optional :level, enum: -> { Cadenya::ObjectiveEventData::Notice::Level }
205
+
206
+ # @!attribute message
207
+ # Human-readable description of what happened.
208
+ #
209
+ # @return [String, nil]
210
+ optional :message, String
211
+
212
+ # @!method initialize(key: nil, level: nil, message: nil)
213
+ # Some parameter documentations has been truncated, see
214
+ # {Cadenya::Models::ObjectiveEventData::Notice} for more details.
215
+ #
216
+ # Notice is a non-terminal diagnostic emitted by the runtime when something
217
+ # noteworthy but non-fatal happens during an objective — for example a
218
+ # just-in-time tool set failing to load, or a previously loaded tool being dropped
219
+ # because it was archived. Notices carry no structured payload; they exist to make
220
+ # the objective timeline self-explanatory.
221
+ #
222
+ # @param key [String] Stable machine-readable identifier for the notice kind (for example
223
+ #
224
+ # @param level [Symbol, Cadenya::Models::ObjectiveEventData::Notice::Level]
225
+ #
226
+ # @param message [String] Human-readable description of what happened.
227
+
228
+ # @see Cadenya::Models::ObjectiveEventData::Notice#level
229
+ module Level
230
+ extend Cadenya::Internal::Type::Enum
231
+
232
+ LEVEL_UNSPECIFIED = :LEVEL_UNSPECIFIED
233
+ LEVEL_INFO = :LEVEL_INFO
234
+ LEVEL_WARN = :LEVEL_WARN
235
+
236
+ # @!method self.values
237
+ # @return [Array<Symbol>]
238
+ end
239
+ end
178
240
  end
179
241
  end
180
242
  end