cadenya 0.23.0 → 0.25.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: 88a495d13fa3197bd62108f4a356f43b3dc8d8b280f6a11584afd3484fbb0135
4
- data.tar.gz: 7cd25a4bbea3d69c830e18e2f61db051165da239d5d41d0c9547b426ea166aa9
3
+ metadata.gz: 85a23df17834062235e1de7898d6d6c30f688f8a42a0cb899446c44b860625cf
4
+ data.tar.gz: fb33b235dc855b0bf55c8ef4a968db692d3a06f652997d9c572a00627c7c544a
5
5
  SHA512:
6
- metadata.gz: b2f73a4957a9e5f1adcf9b8f51b9a39223a4cf1bc9e8c721c4c4d7ace807ce1eb73acc57cba38847967b99211b87726f1ca625b0ddfeeb140a3526851bfbb7da
7
- data.tar.gz: 8974859e7ae5d2035635ea7f0ea5a3c843cafd2f71b0efae359af83572b73402a81b4d683b306db724fc3b65beecd44eb1b50705f57bef1116f54ff63515ce82
6
+ metadata.gz: c8439ad320e591096765d4ea8b9a4537999afc841fcbf55b4ff0d6e09c5f9693f8faf48eadd8f373a56aa805c80347bab004b64db484f81a2498bd8efd605a8d
7
+ data.tar.gz: e65efdeaabac43576f78ad4e2f32c96de41cd4674679eeffaa815c7222de795b34f3b758b40137da6302aabee78b0efe0ac2f2dc918fd33abd75866fa90e6efa
data/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.25.0 (2026-07-02)
4
+
5
+ Full Changelog: [v0.24.0...v0.25.0](https://github.com/cadenya/cadenya-ruby/compare/v0.24.0...v0.25.0)
6
+
7
+ ### Features
8
+
9
+ * **api:** api update ([9adf4ad](https://github.com/cadenya/cadenya-ruby/commit/9adf4adeaf93b4774163acaad8ad941d55e6e3d0))
10
+
11
+ ## 0.24.0 (2026-07-01)
12
+
13
+ Full Changelog: [v0.23.0...v0.24.0](https://github.com/cadenya/cadenya-ruby/compare/v0.23.0...v0.24.0)
14
+
15
+ ### Features
16
+
17
+ * **api:** api update ([2dc6e63](https://github.com/cadenya/cadenya-ruby/commit/2dc6e631c0c63392b148ea3458ce560593bcf27a))
18
+
3
19
  ## 0.23.0 (2026-07-01)
4
20
 
5
21
  Full Changelog: [v0.22.0...v0.23.0](https://github.com/cadenya/cadenya-ruby/compare/v0.22.0...v0.23.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.23.0"
20
+ gem "cadenya", "~> 0.25.0"
21
21
  ```
22
22
 
23
23
  <!-- x-release-please-end -->
@@ -3,20 +3,23 @@
3
3
  module Cadenya
4
4
  module Models
5
5
  class AIProviderKeySpec < Cadenya::Internal::Type::BaseModel
6
- # @!attribute api_key
7
- # The provider credential. Accepted on create/update; never populated in responses
8
- # (the server returns an empty value to avoid leaking it).
6
+ # @!attribute config
7
+ # AIProviderConfig holds non-secret, provider-specific settings. The set case must
8
+ # correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic,
9
+ # Gemini) simply leave this unset. The endpoint of a named provider is fixed and
10
+ # intentionally not overridable here; use the OpenAI-compatible provider to target
11
+ # a custom endpoint.
9
12
  #
10
- # @return [String, nil]
11
- optional :api_key, String, api_name: :apiKey
13
+ # @return [Cadenya::Models::AIProviderKeySpec::Config, nil]
14
+ optional :config, -> { Cadenya::AIProviderKeySpec::Config }
12
15
 
13
- # @!attribute openrouter
14
- # OpenRouterConfig holds OpenRouter-specific settings. Empty for now; it exists as
15
- # the oneof seam so provider-specific options (region, base URL, etc.) can be
16
- # added later without restructuring the spec.
16
+ # @!attribute credentials
17
+ # AIProviderCredential is the secret material used to authenticate with a
18
+ # provider. The set case must correspond to AIProviderKeySpec.provider. The server
19
+ # encrypts the serialized message at rest and never returns it on reads.
17
20
  #
18
- # @return [Object, nil]
19
- optional :openrouter, Cadenya::Internal::Type::Unknown
21
+ # @return [Cadenya::Models::AIProviderKeySpec::Credentials, nil]
22
+ optional :credentials, -> { Cadenya::AIProviderKeySpec::Credentials }
20
23
 
21
24
  # @!attribute provider
22
25
  # The AI provider this key authenticates against.
@@ -24,16 +27,163 @@ module Cadenya
24
27
  # @return [Symbol, Cadenya::Models::AIProviderKeySpec::Provider, nil]
25
28
  optional :provider, enum: -> { Cadenya::AIProviderKeySpec::Provider }
26
29
 
27
- # @!method initialize(api_key: nil, openrouter: nil, provider: nil)
30
+ # @!method initialize(config: nil, credentials: nil, provider: nil)
28
31
  # Some parameter documentations has been truncated, see
29
32
  # {Cadenya::Models::AIProviderKeySpec} for more details.
30
33
  #
31
- # @param api_key [String] The provider credential. Accepted on create/update; never populated in
34
+ # @param config [Cadenya::Models::AIProviderKeySpec::Config] AIProviderConfig holds non-secret, provider-specific settings. The set case
32
35
  #
33
- # @param openrouter [Object] OpenRouterConfig holds OpenRouter-specific settings. Empty for now; it exists
36
+ # @param credentials [Cadenya::Models::AIProviderKeySpec::Credentials] AIProviderCredential is the secret material used to authenticate with a
34
37
  #
35
38
  # @param provider [Symbol, Cadenya::Models::AIProviderKeySpec::Provider] The AI provider this key authenticates against.
36
39
 
40
+ # @see Cadenya::Models::AIProviderKeySpec#config
41
+ class Config < Cadenya::Internal::Type::BaseModel
42
+ # @!attribute openai
43
+ # OpenAIConfig holds OpenAI-specific settings.
44
+ #
45
+ # @return [Cadenya::Models::AIProviderKeySpec::Config::OpenAI, nil]
46
+ optional :openai, -> { Cadenya::AIProviderKeySpec::Config::OpenAI }
47
+
48
+ # @!attribute openai_compatible
49
+ # OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
50
+ # Completions API. The base URL is required and its model catalog is discovered
51
+ # live via GET {base_url}/models.
52
+ #
53
+ # @return [Cadenya::Models::AIProviderKeySpec::Config::OpenAICompatible, nil]
54
+ optional :openai_compatible,
55
+ -> { Cadenya::AIProviderKeySpec::Config::OpenAICompatible },
56
+ api_name: :openaiCompatible
57
+
58
+ # @!attribute openrouter
59
+ # OpenRouterConfig holds OpenRouter-specific settings.
60
+ #
61
+ # @return [Cadenya::Models::AIProviderKeySpec::Config::Openrouter, nil]
62
+ optional :openrouter, -> { Cadenya::AIProviderKeySpec::Config::Openrouter }
63
+
64
+ # @!method initialize(openai: nil, openai_compatible: nil, openrouter: nil)
65
+ # Some parameter documentations has been truncated, see
66
+ # {Cadenya::Models::AIProviderKeySpec::Config} for more details.
67
+ #
68
+ # AIProviderConfig holds non-secret, provider-specific settings. The set case must
69
+ # correspond to AIProviderKeySpec.provider. Providers with no settings (Anthropic,
70
+ # Gemini) simply leave this unset. The endpoint of a named provider is fixed and
71
+ # intentionally not overridable here; use the OpenAI-compatible provider to target
72
+ # a custom endpoint.
73
+ #
74
+ # @param openai [Cadenya::Models::AIProviderKeySpec::Config::OpenAI] OpenAIConfig holds OpenAI-specific settings.
75
+ #
76
+ # @param openai_compatible [Cadenya::Models::AIProviderKeySpec::Config::OpenAICompatible] OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI
77
+ #
78
+ # @param openrouter [Cadenya::Models::AIProviderKeySpec::Config::Openrouter] OpenRouterConfig holds OpenRouter-specific settings.
79
+
80
+ # @see Cadenya::Models::AIProviderKeySpec::Config#openai
81
+ class OpenAI < Cadenya::Internal::Type::BaseModel
82
+ # @!attribute organization_id
83
+ # Sent as the OpenAI-Organization header when set.
84
+ #
85
+ # @return [String, nil]
86
+ optional :organization_id, String, api_name: :organizationId
87
+
88
+ # @!attribute project_id
89
+ # Sent as the OpenAI-Project header when set.
90
+ #
91
+ # @return [String, nil]
92
+ optional :project_id, String, api_name: :projectId
93
+
94
+ # @!method initialize(organization_id: nil, project_id: nil)
95
+ # OpenAIConfig holds OpenAI-specific settings.
96
+ #
97
+ # @param organization_id [String] Sent as the OpenAI-Organization header when set.
98
+ #
99
+ # @param project_id [String] Sent as the OpenAI-Project header when set.
100
+ end
101
+
102
+ # @see Cadenya::Models::AIProviderKeySpec::Config#openai_compatible
103
+ class OpenAICompatible < Cadenya::Internal::Type::BaseModel
104
+ # @!attribute base_url
105
+ #
106
+ # @return [String, nil]
107
+ optional :base_url, String, api_name: :baseUrl
108
+
109
+ # @!method initialize(base_url: nil)
110
+ # OpenAICompatibleConfig configures a generic endpoint that speaks the OpenAI Chat
111
+ # Completions API. The base URL is required and its model catalog is discovered
112
+ # live via GET {base_url}/models.
113
+ #
114
+ # @param base_url [String]
115
+ end
116
+
117
+ # @see Cadenya::Models::AIProviderKeySpec::Config#openrouter
118
+ class Openrouter < Cadenya::Internal::Type::BaseModel
119
+ # @!attribute region
120
+ # Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
121
+ #
122
+ # @return [String, nil]
123
+ optional :region, String
124
+
125
+ # @!method initialize(region: nil)
126
+ # OpenRouterConfig holds OpenRouter-specific settings.
127
+ #
128
+ # @param region [String] Data-residency region (e.g. "us", "eu"). Empty uses the provider default.
129
+ end
130
+ end
131
+
132
+ # @see Cadenya::Models::AIProviderKeySpec#credentials
133
+ class Credentials < Cadenya::Internal::Type::BaseModel
134
+ # @!attribute api_key
135
+ # CredentialAPIKey carries a single bearer/header API key.
136
+ #
137
+ # @return [Cadenya::Models::AIProviderKeySpec::Credentials::APIKey, nil]
138
+ optional :api_key, -> { Cadenya::AIProviderKeySpec::Credentials::APIKey }, api_name: :apiKey
139
+
140
+ # @!attribute headers
141
+ # CredentialHeaders carries arbitrary HTTP headers sent with every request to the
142
+ # provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
143
+ #
144
+ # @return [Cadenya::Models::AIProviderKeySpec::Credentials::Headers, nil]
145
+ optional :headers, -> { Cadenya::AIProviderKeySpec::Credentials::Headers }
146
+
147
+ # @!method initialize(api_key: nil, headers: nil)
148
+ # Some parameter documentations has been truncated, see
149
+ # {Cadenya::Models::AIProviderKeySpec::Credentials} for more details.
150
+ #
151
+ # AIProviderCredential is the secret material used to authenticate with a
152
+ # provider. The set case must correspond to AIProviderKeySpec.provider. The server
153
+ # encrypts the serialized message at rest and never returns it on reads.
154
+ #
155
+ # @param api_key [Cadenya::Models::AIProviderKeySpec::Credentials::APIKey] CredentialAPIKey carries a single bearer/header API key.
156
+ #
157
+ # @param headers [Cadenya::Models::AIProviderKeySpec::Credentials::Headers] CredentialHeaders carries arbitrary HTTP headers sent with every request to
158
+
159
+ # @see Cadenya::Models::AIProviderKeySpec::Credentials#api_key
160
+ class APIKey < Cadenya::Internal::Type::BaseModel
161
+ # @!attribute api_key
162
+ #
163
+ # @return [String, nil]
164
+ optional :api_key, String, api_name: :apiKey
165
+
166
+ # @!method initialize(api_key: nil)
167
+ # CredentialAPIKey carries a single bearer/header API key.
168
+ #
169
+ # @param api_key [String]
170
+ end
171
+
172
+ # @see Cadenya::Models::AIProviderKeySpec::Credentials#headers
173
+ class Headers < Cadenya::Internal::Type::BaseModel
174
+ # @!attribute headers
175
+ #
176
+ # @return [Hash{Symbol=>String}, nil]
177
+ optional :headers, Cadenya::Internal::Type::HashOf[String]
178
+
179
+ # @!method initialize(headers: nil)
180
+ # CredentialHeaders carries arbitrary HTTP headers sent with every request to the
181
+ # provider (e.g. {"Authorization": "Bearer ...", "X-Api-Key": "..."}).
182
+ #
183
+ # @param headers [Hash{Symbol=>String}]
184
+ end
185
+ end
186
+
37
187
  # The AI provider this key authenticates against.
38
188
  #
39
189
  # @see Cadenya::Models::AIProviderKeySpec#provider
@@ -42,6 +192,10 @@ module Cadenya
42
192
 
43
193
  AI_PROVIDER_UNSPECIFIED = :AI_PROVIDER_UNSPECIFIED
44
194
  AI_PROVIDER_OPENROUTER = :AI_PROVIDER_OPENROUTER
195
+ AI_PROVIDER_OPENAI = :AI_PROVIDER_OPENAI
196
+ AI_PROVIDER_ANTHROPIC = :AI_PROVIDER_ANTHROPIC
197
+ AI_PROVIDER_GEMINI = :AI_PROVIDER_GEMINI
198
+ AI_PROVIDER_OPENAI_COMPATIBLE = :AI_PROVIDER_OPENAI_COMPATIBLE
45
199
 
46
200
  # @!method self.values
47
201
  # @return [Array<Symbol>]
@@ -3,8 +3,23 @@
3
3
  module Cadenya
4
4
  module Models
5
5
  module ToolSets
6
- # @type [Cadenya::Internal::Type::Converter]
7
- ConfigMcp = Cadenya::Internal::Type::Unknown
6
+ class ConfigMcp < Cadenya::Internal::Type::BaseModel
7
+ # @!attribute annotations
8
+ # Behavior hints synced from the MCP server's tool definition (ToolAnnotations in
9
+ # the MCP specification). All hints are advisory: servers are not required to send
10
+ # them, and clients should not rely on them for security decisions. Absent hints
11
+ # keep the MCP spec defaults (destructiveHint and openWorldHint default to true;
12
+ # readOnlyHint and idempotentHint default to false).
13
+ #
14
+ # @return [Cadenya::Models::ToolSets::McpAnnotations, nil]
15
+ optional :annotations, -> { Cadenya::ToolSets::McpAnnotations }
16
+
17
+ # @!method initialize(annotations: nil)
18
+ # Some parameter documentations has been truncated, see
19
+ # {Cadenya::Models::ToolSets::ConfigMcp} for more details.
20
+ #
21
+ # @param annotations [Cadenya::Models::ToolSets::McpAnnotations] Behavior hints synced from the MCP server's tool definition
22
+ end
8
23
  end
9
24
  end
10
25
  end
@@ -0,0 +1,62 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Cadenya
4
+ module Models
5
+ module ToolSets
6
+ class McpAnnotations < Cadenya::Internal::Type::BaseModel
7
+ # @!attribute destructive_hint
8
+ # If true, the tool may perform destructive updates to its environment. Only
9
+ # meaningful when read_only_hint is false.
10
+ #
11
+ # @return [Boolean, nil]
12
+ optional :destructive_hint, Cadenya::Internal::Type::Boolean, api_name: :destructiveHint
13
+
14
+ # @!attribute idempotent_hint
15
+ # If true, calling the tool repeatedly with the same arguments has no additional
16
+ # effect. Only meaningful when read_only_hint is false.
17
+ #
18
+ # @return [Boolean, nil]
19
+ optional :idempotent_hint, Cadenya::Internal::Type::Boolean, api_name: :idempotentHint
20
+
21
+ # @!attribute open_world_hint
22
+ # If true, the tool may interact with an "open world" of external entities (e.g.
23
+ # web search); if false, its domain is closed.
24
+ #
25
+ # @return [Boolean, nil]
26
+ optional :open_world_hint, Cadenya::Internal::Type::Boolean, api_name: :openWorldHint
27
+
28
+ # @!attribute read_only_hint
29
+ # If true, the tool does not modify its environment.
30
+ #
31
+ # @return [Boolean, nil]
32
+ optional :read_only_hint, Cadenya::Internal::Type::Boolean, api_name: :readOnlyHint
33
+
34
+ # @!attribute title
35
+ # A human-readable title for the tool.
36
+ #
37
+ # @return [String, nil]
38
+ optional :title, String
39
+
40
+ # @!method initialize(destructive_hint: nil, idempotent_hint: nil, open_world_hint: nil, read_only_hint: nil, title: nil)
41
+ # Some parameter documentations has been truncated, see
42
+ # {Cadenya::Models::ToolSets::McpAnnotations} for more details.
43
+ #
44
+ # Behavior hints synced from the MCP server's tool definition (ToolAnnotations in
45
+ # the MCP specification). All hints are advisory: servers are not required to send
46
+ # them, and clients should not rely on them for security decisions. Absent hints
47
+ # keep the MCP spec defaults (destructiveHint and openWorldHint default to true;
48
+ # readOnlyHint and idempotentHint default to false).
49
+ #
50
+ # @param destructive_hint [Boolean] If true, the tool may perform destructive updates to its environment.
51
+ #
52
+ # @param idempotent_hint [Boolean] If true, calling the tool repeatedly with the same arguments has no
53
+ #
54
+ # @param open_world_hint [Boolean] If true, the tool may interact with an "open world" of external
55
+ #
56
+ # @param read_only_hint [Boolean] If true, the tool does not modify its environment.
57
+ #
58
+ # @param title [String] A human-readable title for the tool.
59
+ end
60
+ end
61
+ end
62
+ end
@@ -11,8 +11,8 @@ module Cadenya
11
11
 
12
12
  # @!attribute mcp
13
13
  #
14
- # @return [Object, nil]
15
- optional :mcp, Cadenya::Internal::Type::Unknown
14
+ # @return [Cadenya::Models::ToolSets::ConfigMcp, nil]
15
+ optional :mcp, -> { Cadenya::ToolSets::ConfigMcp }
16
16
 
17
17
  # @!attribute openapi
18
18
  #
@@ -25,7 +25,7 @@ module Cadenya
25
25
  # be Http. If the tool is an inline tool, the adapter will be Inline.
26
26
  #
27
27
  # @param http [Cadenya::Models::ToolSets::ConfigHTTP]
28
- # @param mcp [Object]
28
+ # @param mcp [Cadenya::Models::ToolSets::ConfigMcp]
29
29
  # @param openapi [Cadenya::Models::ToolSets::ConfigOpenAPI]
30
30
  end
31
31
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Cadenya
4
- VERSION = "0.23.0"
4
+ VERSION = "0.25.0"
5
5
  end
data/lib/cadenya.rb CHANGED
@@ -258,6 +258,7 @@ require_relative "cadenya/models/tool_set_retrieve_params"
258
258
  require_relative "cadenya/models/tool_sets/config_http"
259
259
  require_relative "cadenya/models/tool_sets/config_mcp"
260
260
  require_relative "cadenya/models/tool_sets/config_openapi"
261
+ require_relative "cadenya/models/tool_sets/mcp_annotations"
261
262
  require_relative "cadenya/models/tool_sets/secret_create_params"
262
263
  require_relative "cadenya/models/tool_sets/secret_delete_params"
263
264
  require_relative "cadenya/models/tool_sets/secret_list_params"