cadenya 0.9.0 → 0.11.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 (135) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +16 -0
  3. data/README.md +7 -7
  4. data/lib/cadenya/models/agent.rb +28 -1
  5. data/lib/cadenya/models/agent_archive_params.rb +26 -0
  6. data/lib/cadenya/models/agent_entry.rb +31 -1
  7. data/lib/cadenya/models/agent_list_params.rb +12 -12
  8. data/lib/cadenya/models/agent_publish_params.rb +26 -0
  9. data/lib/cadenya/models/agent_schedule_entry.rb +31 -1
  10. data/lib/cadenya/models/agent_spec.rb +1 -24
  11. data/lib/cadenya/models/agent_unarchive_params.rb +26 -0
  12. data/lib/cadenya/models/agent_unpublish_params.rb +26 -0
  13. data/lib/cadenya/models/agents/agent_schedule.rb +30 -1
  14. data/lib/cadenya/models/agents/agent_schedule_info.rb +1 -1
  15. data/lib/cadenya/models/agents/agent_schedule_spec.rb +18 -30
  16. data/lib/cadenya/models/agents/agent_variation_spec.rb +18 -5
  17. data/lib/cadenya/models/agents/schedule_archive_params.rb +34 -0
  18. data/lib/cadenya/models/agents/schedule_pause_params.rb +34 -0
  19. data/lib/cadenya/models/agents/schedule_resume_params.rb +34 -0
  20. data/lib/cadenya/models/bulk_workspace_apply_data.rb +6 -7
  21. data/lib/cadenya/models/model.rb +25 -1
  22. data/lib/cadenya/models/model_disable_params.rb +26 -0
  23. data/lib/cadenya/models/model_enable_params.rb +26 -0
  24. data/lib/cadenya/models/model_list_params.rb +11 -11
  25. data/lib/cadenya/models/model_spec.rb +1 -23
  26. data/lib/cadenya/models/objective.rb +11 -1
  27. data/lib/cadenya/models/objective_create_params.rb +19 -5
  28. data/lib/cadenya/models/resource_metadata.rb +9 -1
  29. data/lib/cadenya/models/tool_entry.rb +31 -1
  30. data/lib/cadenya/models/tool_set.rb +27 -1
  31. data/lib/cadenya/models/tool_set_archive_params.rb +26 -0
  32. data/lib/cadenya/models/tool_set_list_params.rb +26 -1
  33. data/lib/cadenya/models/tool_set_unarchive_params.rb +26 -0
  34. data/lib/cadenya/models/tool_sets/tool.rb +28 -1
  35. data/lib/cadenya/models/tool_sets/tool_list_params.rb +11 -12
  36. data/lib/cadenya/models/tool_sets/tool_omit_params.rb +34 -0
  37. data/lib/cadenya/models/tool_sets/tool_restore_params.rb +34 -0
  38. data/lib/cadenya/models/tool_sets/tool_spec.rb +3 -23
  39. data/lib/cadenya/models.rb +16 -2
  40. data/lib/cadenya/resources/account.rb +1 -1
  41. data/lib/cadenya/resources/agents/schedules.rb +112 -0
  42. data/lib/cadenya/resources/agents.rb +126 -2
  43. data/lib/cadenya/resources/api_keys.rb +2 -2
  44. data/lib/cadenya/resources/models.rb +39 -13
  45. data/lib/cadenya/resources/objectives.rb +4 -2
  46. data/lib/cadenya/resources/tool_sets/tools.rb +77 -3
  47. data/lib/cadenya/resources/tool_sets.rb +73 -2
  48. data/lib/cadenya/version.rb +1 -1
  49. data/lib/cadenya.rb +13 -1
  50. data/rbi/cadenya/models/agent.rbi +34 -0
  51. data/rbi/cadenya/models/agent_archive_params.rbi +43 -0
  52. data/rbi/cadenya/models/agent_entry.rbi +41 -0
  53. data/rbi/cadenya/models/agent_list_params.rbi +22 -31
  54. data/rbi/cadenya/models/agent_publish_params.rbi +43 -0
  55. data/rbi/cadenya/models/agent_schedule_entry.rbi +52 -3
  56. data/rbi/cadenya/models/agent_spec.rbi +0 -41
  57. data/rbi/cadenya/models/agent_unarchive_params.rbi +43 -0
  58. data/rbi/cadenya/models/agent_unpublish_params.rbi +43 -0
  59. data/rbi/cadenya/models/agents/agent_schedule.rbi +54 -0
  60. data/rbi/cadenya/models/agents/agent_schedule_info.rbi +2 -2
  61. data/rbi/cadenya/models/agents/agent_schedule_spec.rbi +28 -67
  62. data/rbi/cadenya/models/agents/agent_variation_spec.rbi +29 -8
  63. data/rbi/cadenya/models/agents/schedule_archive_params.rbi +53 -0
  64. data/rbi/cadenya/models/agents/schedule_pause_params.rbi +53 -0
  65. data/rbi/cadenya/models/agents/schedule_resume_params.rbi +53 -0
  66. data/rbi/cadenya/models/bulk_workspace_apply_data.rbi +12 -14
  67. data/rbi/cadenya/models/model.rbi +30 -0
  68. data/rbi/cadenya/models/model_disable_params.rbi +43 -0
  69. data/rbi/cadenya/models/model_enable_params.rbi +43 -0
  70. data/rbi/cadenya/models/model_list_params.rbi +20 -26
  71. data/rbi/cadenya/models/model_spec.rbi +3 -42
  72. data/rbi/cadenya/models/objective.rbi +14 -3
  73. data/rbi/cadenya/models/objective_create_params.rbi +25 -6
  74. data/rbi/cadenya/models/resource_metadata.rbi +14 -3
  75. data/rbi/cadenya/models/tool_entry.rbi +44 -3
  76. data/rbi/cadenya/models/tool_set.rbi +35 -0
  77. data/rbi/cadenya/models/tool_set_archive_params.rbi +43 -0
  78. data/rbi/cadenya/models/tool_set_list_params.rbi +44 -0
  79. data/rbi/cadenya/models/tool_set_unarchive_params.rbi +43 -0
  80. data/rbi/cadenya/models/tool_sets/tool.rbi +43 -0
  81. data/rbi/cadenya/models/tool_sets/tool_list_params.rbi +26 -27
  82. data/rbi/cadenya/models/tool_sets/tool_omit_params.rbi +50 -0
  83. data/rbi/cadenya/models/tool_sets/tool_restore_params.rbi +53 -0
  84. data/rbi/cadenya/models/tool_sets/tool_spec.rbi +3 -49
  85. data/rbi/cadenya/models.rbi +16 -2
  86. data/rbi/cadenya/resources/agents/schedules.rbi +70 -0
  87. data/rbi/cadenya/resources/agents.rbi +79 -3
  88. data/rbi/cadenya/resources/models.rbi +26 -10
  89. data/rbi/cadenya/resources/objectives.rbi +10 -3
  90. data/rbi/cadenya/resources/tool_sets/tools.rbi +46 -4
  91. data/rbi/cadenya/resources/tool_sets.rbi +44 -0
  92. data/sig/cadenya/models/agent.rbs +19 -0
  93. data/sig/cadenya/models/agent_archive_params.rbs +28 -0
  94. data/sig/cadenya/models/agent_entry.rbs +23 -0
  95. data/sig/cadenya/models/agent_list_params.rbs +15 -18
  96. data/sig/cadenya/models/agent_publish_params.rbs +28 -0
  97. data/sig/cadenya/models/agent_schedule_entry.rbs +26 -3
  98. data/sig/cadenya/models/agent_spec.rbs +0 -22
  99. data/sig/cadenya/models/agent_unarchive_params.rbs +28 -0
  100. data/sig/cadenya/models/agent_unpublish_params.rbs +28 -0
  101. data/sig/cadenya/models/agents/agent_schedule.rbs +19 -0
  102. data/sig/cadenya/models/agents/agent_schedule_spec.rbs +12 -29
  103. data/sig/cadenya/models/agents/agent_variation_spec.rbs +12 -5
  104. data/sig/cadenya/models/agents/schedule_archive_params.rbs +34 -0
  105. data/sig/cadenya/models/agents/schedule_pause_params.rbs +34 -0
  106. data/sig/cadenya/models/agents/schedule_resume_params.rbs +34 -0
  107. data/sig/cadenya/models/model.rbs +17 -0
  108. data/sig/cadenya/models/model_disable_params.rbs +28 -0
  109. data/sig/cadenya/models/model_enable_params.rbs +28 -0
  110. data/sig/cadenya/models/model_list_params.rbs +13 -16
  111. data/sig/cadenya/models/model_spec.rbs +3 -27
  112. data/sig/cadenya/models/objective.rbs +10 -3
  113. data/sig/cadenya/models/objective_create_params.rbs +7 -0
  114. data/sig/cadenya/models/resource_metadata.rbs +10 -3
  115. data/sig/cadenya/models/tool_entry.rbs +26 -3
  116. data/sig/cadenya/models/tool_set.rbs +17 -0
  117. data/sig/cadenya/models/tool_set_archive_params.rbs +28 -0
  118. data/sig/cadenya/models/tool_set_list_params.rbs +22 -1
  119. data/sig/cadenya/models/tool_set_unarchive_params.rbs +28 -0
  120. data/sig/cadenya/models/tool_sets/tool.rbs +22 -0
  121. data/sig/cadenya/models/tool_sets/tool_list_params.rbs +18 -18
  122. data/sig/cadenya/models/tool_sets/tool_omit_params.rbs +34 -0
  123. data/sig/cadenya/models/tool_sets/tool_restore_params.rbs +34 -0
  124. data/sig/cadenya/models/tool_sets/tool_spec.rbs +2 -26
  125. data/sig/cadenya/models.rbs +16 -2
  126. data/sig/cadenya/resources/agents/schedules.rbs +21 -0
  127. data/sig/cadenya/resources/agents.rbs +25 -1
  128. data/sig/cadenya/resources/models.rbs +8 -3
  129. data/sig/cadenya/resources/objectives.rbs +1 -0
  130. data/sig/cadenya/resources/tool_sets/tools.rbs +15 -1
  131. data/sig/cadenya/resources/tool_sets.rbs +13 -0
  132. metadata +41 -5
  133. data/lib/cadenya/models/model_set_status_params.rb +0 -48
  134. data/rbi/cadenya/models/model_set_status_params.rbi +0 -95
  135. data/sig/cadenya/models/model_set_status_params.rbs +0 -55
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#archive
7
+ class ScheduleArchiveParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#pause
7
+ class SchedulePauseParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -0,0 +1,34 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module Agents
6
+ # @see Cadenya::Resources::Agents::Schedules#resume
7
+ class ScheduleResumeParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ # @!attribute workspace_id
12
+ #
13
+ # @return [String]
14
+ required :workspace_id, String
15
+
16
+ # @!attribute agent_id
17
+ #
18
+ # @return [String]
19
+ required :agent_id, String
20
+
21
+ # @!attribute id
22
+ #
23
+ # @return [String]
24
+ required :id, String
25
+
26
+ # @!method initialize(workspace_id:, agent_id:, id:, request_options: {})
27
+ # @param workspace_id [String]
28
+ # @param agent_id [String]
29
+ # @param id [String]
30
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
31
+ end
32
+ end
33
+ end
34
+ end
@@ -19,14 +19,13 @@ module Cadenya
19
19
  optional :agents, -> { Cadenya::Internal::Type::HashOf[Cadenya::AgentEntry] }
20
20
 
21
21
  # @!attribute automatically_publish_agents
22
- # When true, every agent created or updated by this Apply has its status forced to
23
- # AGENT_STATUS_PUBLISHED, regardless of the status declared in the agent's
24
- # AgentSpec. Useful when the bundle represents a production configuration and you
25
- # want all of its agents live without setting status: AGENT_STATUS_PUBLISHED on
26
- # each entry.
22
+ # When true, every agent created or updated by this Apply has its state forced to
23
+ # STATE_PUBLISHED, regardless of the state declared on the agent's entry. Useful
24
+ # when the bundle represents a production configuration and you want all of its
25
+ # agents live without setting state: STATE_PUBLISHED on each entry.
27
26
  #
28
- # Default false: each agent's AgentSpec.status controls (which is
29
- # AGENT_STATUS_DRAFT on create when unspecified).
27
+ # Default false: each agent entry's `state` controls (which is STATE_DRAFT on
28
+ # create when unspecified).
30
29
  #
31
30
  # @return [Boolean, nil]
32
31
  optional :automatically_publish_agents,
@@ -17,6 +17,13 @@ module Cadenya
17
17
  required :spec, -> { Cadenya::ModelSpec }
18
18
 
19
19
  response_only do
20
+ # @!attribute state
21
+ # Whether the model is usable in this workspace. Output only. Use the :enable and
22
+ # :disable actions to transition.
23
+ #
24
+ # @return [Symbol, Cadenya::Models::Model::State]
25
+ required :state, enum: -> { Cadenya::Model::State }
26
+
20
27
  # @!attribute info
21
28
  # ModelInfo carries server-derived, read-only details about a model.
22
29
  #
@@ -24,7 +31,7 @@ module Cadenya
24
31
  optional :info, -> { Cadenya::Model::Info }
25
32
  end
26
33
 
27
- # @!method initialize(metadata:, spec:, info: nil)
34
+ # @!method initialize(metadata:, spec:, state:, info: nil)
28
35
  # Some parameter documentations has been truncated, see {Cadenya::Models::Model}
29
36
  # for more details.
30
37
  #
@@ -32,8 +39,25 @@ module Cadenya
32
39
  #
33
40
  # @param spec [Cadenya::Models::ModelSpec] Model specification
34
41
  #
42
+ # @param state [Symbol, Cadenya::Models::Model::State] Whether the model is usable in this workspace. Output only. Use the
43
+ #
35
44
  # @param info [Cadenya::Models::Model::Info] ModelInfo carries server-derived, read-only details about a model.
36
45
 
46
+ # Whether the model is usable in this workspace. Output only. Use the :enable and
47
+ # :disable actions to transition.
48
+ #
49
+ # @see Cadenya::Models::Model#state
50
+ module State
51
+ extend Cadenya::Internal::Type::Enum
52
+
53
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
54
+ STATE_ENABLED = :STATE_ENABLED
55
+ STATE_DISABLED = :STATE_DISABLED
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
60
+
37
61
  # @see Cadenya::Models::Model#info
38
62
  class Info < Cadenya::Internal::Type::BaseModel
39
63
  response_only do
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Models#disable
6
+ class ModelDisableParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!attribute id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::Models#enable
6
+ class ModelEnableParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!attribute id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -62,13 +62,13 @@ module Cadenya
62
62
  # @return [String, nil]
63
63
  optional :sort_order, String
64
64
 
65
- # @!attribute status
66
- # Filter by model status
65
+ # @!attribute state
66
+ # Filter by model state
67
67
  #
68
- # @return [Symbol, Cadenya::Models::ModelListParams::Status, nil]
69
- optional :status, enum: -> { Cadenya::ModelListParams::Status }
68
+ # @return [Symbol, Cadenya::Models::ModelListParams::State, nil]
69
+ optional :state, enum: -> { Cadenya::ModelListParams::State }
70
70
 
71
- # @!method initialize(workspace_id:, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, status: nil, request_options: {})
71
+ # @!method initialize(workspace_id:, ai_provider_key_id: nil, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
72
72
  # Some parameter documentations has been truncated, see
73
73
  # {Cadenya::Models::ModelListParams} for more details.
74
74
  #
@@ -90,17 +90,17 @@ module Cadenya
90
90
  #
91
91
  # @param sort_order [String] Sort order for results (asc or desc by creation time)
92
92
  #
93
- # @param status [Symbol, Cadenya::Models::ModelListParams::Status] Filter by model status
93
+ # @param state [Symbol, Cadenya::Models::ModelListParams::State] Filter by model state
94
94
  #
95
95
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
96
96
 
97
- # Filter by model status
98
- module Status
97
+ # Filter by model state
98
+ module State
99
99
  extend Cadenya::Internal::Type::Enum
100
100
 
101
- MODEL_STATUS_UNSPECIFIED = :MODEL_STATUS_UNSPECIFIED
102
- MODEL_STATUS_ENABLED = :MODEL_STATUS_ENABLED
103
- MODEL_STATUS_DISABLED = :MODEL_STATUS_DISABLED
101
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
102
+ STATE_ENABLED = :STATE_ENABLED
103
+ STATE_DISABLED = :STATE_DISABLED
104
104
 
105
105
  # @!method self.values
106
106
  # @return [Array<Symbol>]
@@ -39,13 +39,7 @@ module Cadenya
39
39
  # @return [String, nil]
40
40
  optional :provider, String
41
41
 
42
- # @!attribute status
43
- # The status of the model in the workspace
44
- #
45
- # @return [Symbol, Cadenya::Models::ModelSpec::Status, nil]
46
- optional :status, enum: -> { Cadenya::ModelSpec::Status }
47
-
48
- # @!method initialize(family: nil, input_price_per_million_tokens: nil, max_input_tokens: nil, max_output_tokens: nil, output_price_per_million_tokens: nil, provider: nil, status: nil)
42
+ # @!method initialize(family: nil, input_price_per_million_tokens: nil, max_input_tokens: nil, max_output_tokens: nil, output_price_per_million_tokens: nil, provider: nil)
49
43
  # @param family [String] The model family (e.g., "claude-sonnet-4.6", "gpt-5.4", "gemini-2.5-flash")
50
44
  #
51
45
  # @param input_price_per_million_tokens [String] Cost per million input tokens in cents (e.g., 300 = $3.00)
@@ -57,22 +51,6 @@ module Cadenya
57
51
  # @param output_price_per_million_tokens [String] Cost per million output tokens in cents (e.g., 1500 = $15.00)
58
52
  #
59
53
  # @param provider [String] The model provider (e.g., "anthropic", "openai", "google")
60
- #
61
- # @param status [Symbol, Cadenya::Models::ModelSpec::Status] The status of the model in the workspace
62
-
63
- # The status of the model in the workspace
64
- #
65
- # @see Cadenya::Models::ModelSpec#status
66
- module Status
67
- extend Cadenya::Internal::Type::Enum
68
-
69
- MODEL_STATUS_UNSPECIFIED = :MODEL_STATUS_UNSPECIFIED
70
- MODEL_STATUS_ENABLED = :MODEL_STATUS_ENABLED
71
- MODEL_STATUS_DISABLED = :MODEL_STATUS_DISABLED
72
-
73
- # @!method self.values
74
- # @return [Array<Symbol>]
75
- end
76
54
  end
77
55
  end
78
56
  end
@@ -100,9 +100,17 @@ module Cadenya
100
100
  #
101
101
  # @return [String, nil]
102
102
  optional :state_message, String, api_name: :stateMessage
103
+
104
+ # @!attribute user_data
105
+ # Arbitrary data used to render the variation's user_message_template
106
+ #
107
+ # @return [Hash{Symbol=>Object}, nil]
108
+ optional :user_data,
109
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
110
+ api_name: :userData
103
111
  end
104
112
 
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)
113
+ # @!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, user_data: nil)
106
114
  # Some parameter documentations has been truncated, see
107
115
  # {Cadenya::Models::Objective} for more details.
108
116
  #
@@ -133,6 +141,8 @@ module Cadenya
133
141
  # @param secrets [Array<Cadenya::Models::ObjectiveSecret>] Secrets that can be used in the headers for tool calls using the secret interpol
134
142
  #
135
143
  # @param state_message [String] Optional human-readable detail about the current state (e.g. a failure reason).
144
+ #
145
+ # @param user_data [Hash{Symbol=>Object}] Arbitrary data used to render the variation's user_message_template
136
146
 
137
147
  # The current lifecycle state of the objective.
138
148
  #
@@ -25,9 +25,11 @@ module Cadenya
25
25
  required :data, Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown]
26
26
 
27
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.
28
+ # Optional override for the initial message sent to the agent. This becomes the
29
+ # first user message in the LLM chat history. When not set, the selected
30
+ # variation's user_message_template is rendered with user_data instead. If neither
31
+ # this field nor a user_message_template is present, the request is rejected with
32
+ # InvalidArgument.
31
33
  #
32
34
  # @return [String, nil]
33
35
  optional :initial_message, String, api_name: :initialMessage
@@ -69,6 +71,16 @@ module Cadenya
69
71
  # @return [Array<Cadenya::Models::ObjectiveCreateParams::Secret>, nil]
70
72
  optional :secrets, -> { Cadenya::Internal::Type::ArrayOf[Cadenya::ObjectiveCreateParams::Secret] }
71
73
 
74
+ # @!attribute user_data
75
+ # Arbitrary data rendered into the selected variation's user_message_template
76
+ # (liquid) to produce the initial user message. Separate from `data`, which
77
+ # renders the system prompt template.
78
+ #
79
+ # @return [Hash{Symbol=>Object}, nil]
80
+ optional :user_data,
81
+ Cadenya::Internal::Type::HashOf[Cadenya::Internal::Type::Unknown],
82
+ api_name: :userData
83
+
72
84
  # @!attribute variation_id
73
85
  # Optional explicit variation selection. Overrides the agent's
74
86
  # variation_selection_mode.
@@ -76,7 +88,7 @@ module Cadenya
76
88
  # @return [String, nil]
77
89
  optional :variation_id, String, api_name: :variationId
78
90
 
79
- # @!method initialize(workspace_id:, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, variation_id: nil, request_options: {})
91
+ # @!method initialize(workspace_id:, agent_id:, data:, initial_message: nil, memory_stack: nil, metadata: nil, secrets: nil, user_data: nil, variation_id: nil, request_options: {})
80
92
  # Some parameter documentations has been truncated, see
81
93
  # {Cadenya::Models::ObjectiveCreateParams} for more details.
82
94
  #
@@ -86,7 +98,7 @@ module Cadenya
86
98
  #
87
99
  # @param data [Hash{Symbol=>Object}] Arbitrary data for the objective. May be used in liquid templates for prompts co
88
100
  #
89
- # @param initial_message [String] Optional override for initial message sent to the agent. This becomes the first
101
+ # @param initial_message [String] Optional override for the initial message sent to the agent. This becomes the fi
90
102
  #
91
103
  # @param memory_stack [Array<Cadenya::Models::MemoryReference>] Memory layers/entries to push onto this objective's memory stack on
92
104
  #
@@ -94,6 +106,8 @@ module Cadenya
94
106
  #
95
107
  # @param secrets [Array<Cadenya::Models::ObjectiveCreateParams::Secret>] Secrets that can be used in the headers for tool calls using the secret interpol
96
108
  #
109
+ # @param user_data [Hash{Symbol=>Object}] Arbitrary data rendered into the selected variation's user_message_template
110
+ #
97
111
  # @param variation_id [String] Optional explicit variation selection. Overrides the agent's variation_selection
98
112
  #
99
113
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
@@ -62,9 +62,15 @@ module Cadenya
62
62
  #
63
63
  # @return [String]
64
64
  required :workspace_id, String, api_name: :workspaceId
65
+
66
+ # @!attribute updated_at
67
+ # Timestamp when this resource was last updated
68
+ #
69
+ # @return [Time, nil]
70
+ optional :updated_at, Time, api_name: :updatedAt
65
71
  end
66
72
 
67
- # @!method initialize(id:, account_id:, created_at:, name:, profile_id:, workspace_id:, bundle_key: nil, external_id: nil, labels: nil)
73
+ # @!method initialize(id:, account_id:, created_at:, name:, profile_id:, workspace_id:, bundle_key: nil, external_id: nil, labels: nil, updated_at: nil)
68
74
  # Some parameter documentations has been truncated, see
69
75
  # {Cadenya::Models::ResourceMetadata} for more details.
70
76
  #
@@ -87,6 +93,8 @@ module Cadenya
87
93
  # @param external_id [String] External ID for the resource (e.g., a workflow ID from an external system)
88
94
  #
89
95
  # @param labels [Hash{Symbol=>String}] Arbitrary key-value pairs for categorization and filtering
96
+ #
97
+ # @param updated_at [Time] Timestamp when this resource was last updated
90
98
  end
91
99
  end
92
100
  end
@@ -18,10 +18,40 @@ module Cadenya
18
18
  # @return [Hash{Symbol=>String}, nil]
19
19
  optional :labels, Cadenya::Internal::Type::HashOf[String]
20
20
 
21
- # @!method initialize(name:, spec:, labels: nil)
21
+ # @!attribute state
22
+ # Desired lifecycle state for the tool. Defaults to STATE_AVAILABLE when
23
+ # unspecified. STATE_ARCHIVED is server-managed and is rejected here.
24
+ #
25
+ # @return [Symbol, Cadenya::Models::ToolEntry::State, nil]
26
+ optional :state, enum: -> { Cadenya::ToolEntry::State }
27
+
28
+ # @!method initialize(name:, spec:, labels: nil, state: nil)
29
+ # Some parameter documentations has been truncated, see
30
+ # {Cadenya::Models::ToolEntry} for more details.
31
+ #
22
32
  # @param name [String]
33
+ #
23
34
  # @param spec [Cadenya::Models::ToolSets::ToolSpec]
35
+ #
24
36
  # @param labels [Hash{Symbol=>String}]
37
+ #
38
+ # @param state [Symbol, Cadenya::Models::ToolEntry::State] Desired lifecycle state for the tool. Defaults to STATE_AVAILABLE when
39
+
40
+ # Desired lifecycle state for the tool. Defaults to STATE_AVAILABLE when
41
+ # unspecified. STATE_ARCHIVED is server-managed and is rejected here.
42
+ #
43
+ # @see Cadenya::Models::ToolEntry#state
44
+ module State
45
+ extend Cadenya::Internal::Type::Enum
46
+
47
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
48
+ STATE_AVAILABLE = :STATE_AVAILABLE
49
+ STATE_OMITTED = :STATE_OMITTED
50
+ STATE_ARCHIVED = :STATE_ARCHIVED
51
+
52
+ # @!method self.values
53
+ # @return [Array<Symbol>]
54
+ end
25
55
  end
26
56
  end
27
57
  end
@@ -16,6 +16,14 @@ module Cadenya
16
16
  required :spec, -> { Cadenya::ToolSetSpec }
17
17
 
18
18
  response_only do
19
+ # @!attribute state
20
+ # The current lifecycle state of the tool set. Output only. Tool sets are created
21
+ # STATE_ACTIVE; use the :archive and :unarchive actions to transition between
22
+ # states.
23
+ #
24
+ # @return [Symbol, Cadenya::Models::ToolSet::State]
25
+ required :state, enum: -> { Cadenya::ToolSet::State }
26
+
19
27
  # @!attribute info
20
28
  # Tool set information
21
29
  #
@@ -23,7 +31,7 @@ module Cadenya
23
31
  optional :info, -> { Cadenya::ToolSetInfo }
24
32
  end
25
33
 
26
- # @!method initialize(metadata:, spec:, info: nil)
34
+ # @!method initialize(metadata:, spec:, state:, info: nil)
27
35
  # Some parameter documentations has been truncated, see {Cadenya::Models::ToolSet}
28
36
  # for more details.
29
37
  #
@@ -31,7 +39,25 @@ module Cadenya
31
39
  #
32
40
  # @param spec [Cadenya::Models::ToolSetSpec]
33
41
  #
42
+ # @param state [Symbol, Cadenya::Models::ToolSet::State] The current lifecycle state of the tool set. Output only. Tool sets are
43
+ #
34
44
  # @param info [Cadenya::Models::ToolSetInfo] Tool set information
45
+
46
+ # The current lifecycle state of the tool set. Output only. Tool sets are created
47
+ # STATE_ACTIVE; use the :archive and :unarchive actions to transition between
48
+ # states.
49
+ #
50
+ # @see Cadenya::Models::ToolSet#state
51
+ module State
52
+ extend Cadenya::Internal::Type::Enum
53
+
54
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
55
+ STATE_ACTIVE = :STATE_ACTIVE
56
+ STATE_ARCHIVED = :STATE_ARCHIVED
57
+
58
+ # @!method self.values
59
+ # @return [Array<Symbol>]
60
+ end
35
61
  end
36
62
  end
37
63
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::ToolSets#archive
6
+ class ToolSetArchiveParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!attribute id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -54,7 +54,17 @@ module Cadenya
54
54
  # @return [String, nil]
55
55
  optional :sort_order, String
56
56
 
57
- # @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, request_options: {})
57
+ # @!attribute state
58
+ # Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when unspecified;
59
+ # pass STATE_ARCHIVED to list archived tool sets.
60
+ #
61
+ # @return [Symbol, Cadenya::Models::ToolSetListParams::State, nil]
62
+ optional :state, enum: -> { Cadenya::ToolSetListParams::State }
63
+
64
+ # @!method initialize(workspace_id:, bundle_key: nil, cursor: nil, include_info: nil, limit: nil, prefix: nil, query: nil, sort_order: nil, state: nil, request_options: {})
65
+ # Some parameter documentations has been truncated, see
66
+ # {Cadenya::Models::ToolSetListParams} for more details.
67
+ #
58
68
  # @param workspace_id [String]
59
69
  #
60
70
  # @param bundle_key [String] Filter by bundle_key — return only resources owned by this bundle.
@@ -71,7 +81,22 @@ module Cadenya
71
81
  #
72
82
  # @param sort_order [String] Sort order for results (asc or desc by creation time)
73
83
  #
84
+ # @param state [Symbol, Cadenya::Models::ToolSetListParams::State] Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when
85
+ #
74
86
  # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
87
+
88
+ # Filter by tool set lifecycle state. Defaults to STATE_ACTIVE when unspecified;
89
+ # pass STATE_ARCHIVED to list archived tool sets.
90
+ module State
91
+ extend Cadenya::Internal::Type::Enum
92
+
93
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
94
+ STATE_ACTIVE = :STATE_ACTIVE
95
+ STATE_ARCHIVED = :STATE_ARCHIVED
96
+
97
+ # @!method self.values
98
+ # @return [Array<Symbol>]
99
+ end
75
100
  end
76
101
  end
77
102
  end
@@ -0,0 +1,26 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ # @see Cadenya::Resources::ToolSets#unarchive
6
+ class ToolSetUnarchiveParams < Cadenya::Internal::Type::BaseModel
7
+ extend Cadenya::Internal::Type::RequestParameters::Converter
8
+ include Cadenya::Internal::Type::RequestParameters
9
+
10
+ # @!attribute workspace_id
11
+ #
12
+ # @return [String]
13
+ required :workspace_id, String
14
+
15
+ # @!attribute id
16
+ #
17
+ # @return [String]
18
+ required :id, String
19
+
20
+ # @!method initialize(workspace_id:, id:, request_options: {})
21
+ # @param workspace_id [String]
22
+ # @param id [String]
23
+ # @param request_options [Cadenya::RequestOptions, Hash{Symbol=>Object}]
24
+ end
25
+ end
26
+ end
@@ -21,7 +21,16 @@ module Cadenya
21
21
  # @return [Cadenya::Models::ToolSets::ToolInfo, nil]
22
22
  optional :info, -> { Cadenya::ToolSets::ToolInfo }
23
23
 
24
- # @!method initialize(metadata:, spec:, info: nil)
24
+ response_only do
25
+ # @!attribute state
26
+ # The current lifecycle state of the tool. Output only. Use the :omit and :restore
27
+ # actions to transition; tool set syncs may also update it.
28
+ #
29
+ # @return [Symbol, Cadenya::Models::ToolSets::Tool::State]
30
+ required :state, enum: -> { Cadenya::ToolSets::Tool::State }
31
+ end
32
+
33
+ # @!method initialize(metadata:, spec:, state:, info: nil)
25
34
  # Some parameter documentations has been truncated, see
26
35
  # {Cadenya::Models::ToolSets::Tool} for more details.
27
36
  #
@@ -29,7 +38,25 @@ module Cadenya
29
38
  #
30
39
  # @param spec [Cadenya::Models::ToolSets::ToolSpec]
31
40
  #
41
+ # @param state [Symbol, Cadenya::Models::ToolSets::Tool::State] The current lifecycle state of the tool. Output only. Use the :omit and
42
+ #
32
43
  # @param info [Cadenya::Models::ToolSets::ToolInfo]
44
+
45
+ # The current lifecycle state of the tool. Output only. Use the :omit and :restore
46
+ # actions to transition; tool set syncs may also update it.
47
+ #
48
+ # @see Cadenya::Models::ToolSets::Tool#state
49
+ module State
50
+ extend Cadenya::Internal::Type::Enum
51
+
52
+ STATE_UNSPECIFIED = :STATE_UNSPECIFIED
53
+ STATE_AVAILABLE = :STATE_AVAILABLE
54
+ STATE_OMITTED = :STATE_OMITTED
55
+ STATE_ARCHIVED = :STATE_ARCHIVED
56
+
57
+ # @!method self.values
58
+ # @return [Array<Symbol>]
59
+ end
33
60
  end
34
61
  end
35
62
  end