cadenya 0.2.0 → 0.4.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 (144) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +25 -0
  3. data/README.md +6 -6
  4. data/lib/cadenya/client.rb +18 -0
  5. data/lib/cadenya/internal/cursor_pagination.rb +2 -2
  6. data/lib/cadenya/models/agent_spec.rb +19 -4
  7. data/lib/cadenya/models/agents/webhook_delivery_data.rb +1 -0
  8. data/lib/cadenya/models/agents/webhook_delivery_list_params.rb +1 -0
  9. data/lib/cadenya/models/ai_provider_key.rb +30 -0
  10. data/lib/cadenya/models/ai_provider_key_create_params.rb +41 -0
  11. data/lib/cadenya/models/ai_provider_key_delete_params.rb +26 -0
  12. data/lib/cadenya/models/ai_provider_key_list_params.rb +61 -0
  13. data/lib/cadenya/models/ai_provider_key_retrieve_params.rb +26 -0
  14. data/lib/cadenya/models/ai_provider_key_spec.rb +36 -0
  15. data/lib/cadenya/models/ai_provider_key_update_params.rb +56 -0
  16. data/lib/cadenya/models/approval_requirement_filter.rb +26 -0
  17. data/lib/cadenya/models/attribute_filter.rb +38 -0
  18. data/lib/cadenya/models/objective_data.rb +21 -1
  19. data/lib/cadenya/models/objective_event_data.rb +32 -1
  20. data/lib/cadenya/models/objective_list_params.rb +2 -1
  21. data/lib/cadenya/models/objective_status.rb +2 -1
  22. data/lib/cadenya/models/profile_spec.rb +1 -0
  23. data/lib/cadenya/models/string_matcher.rb +47 -0
  24. data/lib/cadenya/models/tool_filter.rb +35 -0
  25. data/lib/cadenya/models/tool_set_adapter.rb +7 -1
  26. data/lib/cadenya/models/tool_set_adapter_mcp.rb +11 -33
  27. data/lib/cadenya/models/tool_set_adapter_openapi.rb +79 -0
  28. data/lib/cadenya/models/tool_set_get_openapi_spec_params.rb +26 -0
  29. data/lib/cadenya/models/tool_set_get_openapi_spec_response.rb +17 -0
  30. data/lib/cadenya/models/tool_sets/config_openapi.rb +29 -0
  31. data/lib/cadenya/models/tool_sets/tool_spec_config.rb +7 -1
  32. data/lib/cadenya/models/workspace.rb +27 -1
  33. data/lib/cadenya/models/workspace_admin/member_add_params.rb +39 -0
  34. data/lib/cadenya/models/workspace_admin/member_list_params.rb +39 -0
  35. data/lib/cadenya/models/workspace_admin/member_remove_params.rb +28 -0
  36. data/lib/cadenya/models/workspace_admin/profile_list_params.rb +44 -0
  37. data/lib/cadenya/models/workspace_admin_archive_params.rb +20 -0
  38. data/lib/cadenya/models/workspace_admin_create_params.rb +70 -0
  39. data/lib/cadenya/models/workspace_admin_list_params.rb +42 -0
  40. data/lib/cadenya/models/workspace_admin_retrieve_params.rb +20 -0
  41. data/lib/cadenya/models/workspace_admin_update_params.rb +85 -0
  42. data/lib/cadenya/models/workspace_member.rb +53 -0
  43. data/lib/cadenya/models.rb +40 -2
  44. data/lib/cadenya/resources/ai_provider_keys.rb +168 -0
  45. data/lib/cadenya/resources/tool_sets.rb +31 -0
  46. data/lib/cadenya/resources/workspace_admin/members.rb +107 -0
  47. data/lib/cadenya/resources/workspace_admin/profiles.rb +54 -0
  48. data/lib/cadenya/resources/workspace_admin.rb +173 -0
  49. data/lib/cadenya/resources/workspaces.rb +4 -0
  50. data/lib/cadenya/version.rb +1 -1
  51. data/lib/cadenya.rb +29 -1
  52. data/rbi/cadenya/client.rbi +16 -0
  53. data/rbi/cadenya/models/agent_spec.rbi +21 -4
  54. data/rbi/cadenya/models/agents/webhook_delivery_data.rbi +5 -0
  55. data/rbi/cadenya/models/agents/webhook_delivery_list_params.rbi +5 -0
  56. data/rbi/cadenya/models/ai_provider_key.rbi +51 -0
  57. data/rbi/cadenya/models/ai_provider_key_create_params.rbi +65 -0
  58. data/rbi/cadenya/models/ai_provider_key_delete_params.rbi +43 -0
  59. data/rbi/cadenya/models/ai_provider_key_list_params.rbi +96 -0
  60. data/rbi/cadenya/models/ai_provider_key_retrieve_params.rbi +46 -0
  61. data/rbi/cadenya/models/ai_provider_key_spec.rbi +56 -0
  62. data/rbi/cadenya/models/ai_provider_key_update_params.rbi +82 -0
  63. data/rbi/cadenya/models/approval_requirement_filter.rbi +45 -0
  64. data/rbi/cadenya/models/attribute_filter.rbi +84 -0
  65. data/rbi/cadenya/models/objective_data.rbi +26 -0
  66. data/rbi/cadenya/models/objective_event_data.rbi +52 -0
  67. data/rbi/cadenya/models/objective_list_params.rbi +7 -2
  68. data/rbi/cadenya/models/objective_status.rbi +4 -2
  69. data/rbi/cadenya/models/profile_spec.rbi +5 -0
  70. data/rbi/cadenya/models/string_matcher.rbi +84 -0
  71. data/rbi/cadenya/models/tool_filter.rbi +66 -0
  72. data/rbi/cadenya/models/tool_set_adapter.rbi +14 -3
  73. data/rbi/cadenya/models/tool_set_adapter_mcp.rbi +16 -62
  74. data/rbi/cadenya/models/tool_set_adapter_openapi.rbi +127 -0
  75. data/rbi/cadenya/models/tool_set_get_openapi_spec_params.rbi +46 -0
  76. data/rbi/cadenya/models/tool_set_get_openapi_spec_response.rbi +33 -0
  77. data/rbi/cadenya/models/tool_sets/config_openapi.rbi +48 -0
  78. data/rbi/cadenya/models/tool_sets/tool_spec_config.rbi +11 -3
  79. data/rbi/cadenya/models/workspace.rbi +39 -3
  80. data/rbi/cadenya/models/workspace_admin/member_add_params.rbi +68 -0
  81. data/rbi/cadenya/models/workspace_admin/member_list_params.rbi +68 -0
  82. data/rbi/cadenya/models/workspace_admin/member_remove_params.rbi +48 -0
  83. data/rbi/cadenya/models/workspace_admin/profile_list_params.rbi +75 -0
  84. data/rbi/cadenya/models/workspace_admin_archive_params.rbi +38 -0
  85. data/rbi/cadenya/models/workspace_admin_create_params.rbi +127 -0
  86. data/rbi/cadenya/models/workspace_admin_list_params.rbi +70 -0
  87. data/rbi/cadenya/models/workspace_admin_retrieve_params.rbi +38 -0
  88. data/rbi/cadenya/models/workspace_admin_update_params.rbi +144 -0
  89. data/rbi/cadenya/models/workspace_member.rbi +80 -0
  90. data/rbi/cadenya/models.rbi +40 -2
  91. data/rbi/cadenya/resources/ai_provider_keys.rbi +125 -0
  92. data/rbi/cadenya/resources/tool_sets.rbi +18 -0
  93. data/rbi/cadenya/resources/workspace_admin/members.rbi +83 -0
  94. data/rbi/cadenya/resources/workspace_admin/profiles.rbi +42 -0
  95. data/rbi/cadenya/resources/workspace_admin.rbi +131 -0
  96. data/rbi/cadenya/resources/workspaces.rbi +4 -0
  97. data/sig/cadenya/client.rbs +4 -0
  98. data/sig/cadenya/models/agent_spec.rbs +12 -5
  99. data/sig/cadenya/models/agents/webhook_delivery_data.rbs +2 -0
  100. data/sig/cadenya/models/agents/webhook_delivery_list_params.rbs +2 -0
  101. data/sig/cadenya/models/ai_provider_key.rbs +22 -0
  102. data/sig/cadenya/models/ai_provider_key_create_params.rbs +36 -0
  103. data/sig/cadenya/models/ai_provider_key_delete_params.rbs +28 -0
  104. data/sig/cadenya/models/ai_provider_key_list_params.rbs +61 -0
  105. data/sig/cadenya/models/ai_provider_key_retrieve_params.rbs +28 -0
  106. data/sig/cadenya/models/ai_provider_key_spec.rbs +28 -0
  107. data/sig/cadenya/models/ai_provider_key_update_params.rbs +54 -0
  108. data/sig/cadenya/models/approval_requirement_filter.rbs +20 -0
  109. data/sig/cadenya/models/attribute_filter.rbs +44 -0
  110. data/sig/cadenya/models/objective_data.rbs +14 -0
  111. data/sig/cadenya/models/objective_event_data.rbs +21 -0
  112. data/sig/cadenya/models/objective_list_params.rbs +4 -2
  113. data/sig/cadenya/models/objective_status.rbs +4 -2
  114. data/sig/cadenya/models/profile_spec.rbs +5 -1
  115. data/sig/cadenya/models/string_matcher.rbs +57 -0
  116. data/sig/cadenya/models/tool_filter.rbs +41 -0
  117. data/sig/cadenya/models/tool_set_adapter.rbs +15 -3
  118. data/sig/cadenya/models/tool_set_adapter_mcp.rbs +16 -32
  119. data/sig/cadenya/models/tool_set_adapter_openapi.rbs +73 -0
  120. data/sig/cadenya/models/tool_set_get_openapi_spec_params.rbs +28 -0
  121. data/sig/cadenya/models/tool_set_get_openapi_spec_response.rbs +15 -0
  122. data/sig/cadenya/models/tool_sets/config_openapi.rbs +30 -0
  123. data/sig/cadenya/models/tool_sets/tool_spec_config.rbs +12 -3
  124. data/sig/cadenya/models/workspace.rbs +24 -3
  125. data/sig/cadenya/models/workspace_admin/member_add_params.rbs +38 -0
  126. data/sig/cadenya/models/workspace_admin/member_list_params.rbs +38 -0
  127. data/sig/cadenya/models/workspace_admin/member_remove_params.rbs +30 -0
  128. data/sig/cadenya/models/workspace_admin/profile_list_params.rbs +40 -0
  129. data/sig/cadenya/models/workspace_admin_archive_params.rbs +23 -0
  130. data/sig/cadenya/models/workspace_admin_create_params.rbs +58 -0
  131. data/sig/cadenya/models/workspace_admin_list_params.rbs +38 -0
  132. data/sig/cadenya/models/workspace_admin_retrieve_params.rbs +23 -0
  133. data/sig/cadenya/models/workspace_admin_update_params.rbs +76 -0
  134. data/sig/cadenya/models/workspace_member.rbs +46 -0
  135. data/sig/cadenya/models.rbs +40 -2
  136. data/sig/cadenya/resources/ai_provider_keys.rbs +45 -0
  137. data/sig/cadenya/resources/tool_sets.rbs +6 -0
  138. data/sig/cadenya/resources/workspace_admin/members.rbs +29 -0
  139. data/sig/cadenya/resources/workspace_admin/profiles.rbs +16 -0
  140. data/sig/cadenya/resources/workspace_admin.rbs +42 -0
  141. metadata +89 -5
  142. data/lib/cadenya/models/mcp_tool_filter.rb +0 -111
  143. data/rbi/cadenya/models/mcp_tool_filter.rbi +0 -235
  144. data/sig/cadenya/models/mcp_tool_filter.rbs +0 -138
@@ -0,0 +1,125 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class AIProviderKeys
6
+ # Creates a new customer-provided AI provider key in the workspace
7
+ sig do
8
+ params(
9
+ workspace_id: String,
10
+ metadata: Cadenya::CreateResourceMetadata::OrHash,
11
+ spec: Cadenya::AIProviderKeySpec::OrHash,
12
+ request_options: Cadenya::RequestOptions::OrHash
13
+ ).returns(Cadenya::AIProviderKey)
14
+ end
15
+ def create(
16
+ # The workspace that will own this key.
17
+ workspace_id,
18
+ # CreateResourceMetadata contains the user-provided fields for creating a
19
+ # workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
20
+ # profile_id, created_at) are excluded since they are set by the server.
21
+ metadata:,
22
+ spec:,
23
+ request_options: {}
24
+ )
25
+ end
26
+
27
+ # Retrieves an AI provider key by ID from the workspace
28
+ sig do
29
+ params(
30
+ id: String,
31
+ workspace_id: String,
32
+ request_options: Cadenya::RequestOptions::OrHash
33
+ ).returns(Cadenya::AIProviderKey)
34
+ end
35
+ def retrieve(
36
+ # The key to retrieve.
37
+ id,
38
+ # The workspace the key belongs to.
39
+ workspace_id:,
40
+ request_options: {}
41
+ )
42
+ end
43
+
44
+ # Updates an AI provider key's name or key value in the workspace
45
+ sig do
46
+ params(
47
+ id: String,
48
+ workspace_id: String,
49
+ metadata: Cadenya::UpdateResourceMetadata::OrHash,
50
+ spec: Cadenya::AIProviderKeySpec::OrHash,
51
+ update_mask: String,
52
+ request_options: Cadenya::RequestOptions::OrHash
53
+ ).returns(Cadenya::AIProviderKey)
54
+ end
55
+ def update(
56
+ # Path param: The key to update.
57
+ id,
58
+ # Path param: The workspace the key belongs to.
59
+ workspace_id:,
60
+ # Body param: UpdateResourceMetadata contains the user-provided fields for
61
+ # updating a workspace-scoped resource. Read-only fields (id, account_id,
62
+ # workspace_id, profile_id, created_at) are excluded since they are set by the
63
+ # server.
64
+ metadata: nil,
65
+ # Body param
66
+ spec: nil,
67
+ # Body param: Fields to update.
68
+ update_mask: nil,
69
+ request_options: {}
70
+ )
71
+ end
72
+
73
+ # Lists all customer-provided AI provider keys in the workspace
74
+ sig do
75
+ params(
76
+ workspace_id: String,
77
+ cursor: String,
78
+ limit: Integer,
79
+ prefix: String,
80
+ query: String,
81
+ sort_order: String,
82
+ request_options: Cadenya::RequestOptions::OrHash
83
+ ).returns(Cadenya::Internal::CursorPagination[Cadenya::AIProviderKey])
84
+ end
85
+ def list(
86
+ # The workspace whose keys will be listed.
87
+ workspace_id,
88
+ # Pagination cursor from previous response
89
+ cursor: nil,
90
+ # Maximum number of results to return
91
+ limit: nil,
92
+ # Filter expression (query param: prefix)
93
+ prefix: nil,
94
+ # Free-form search query
95
+ query: nil,
96
+ # Sort order for results (asc or desc by creation time)
97
+ sort_order: nil,
98
+ request_options: {}
99
+ )
100
+ end
101
+
102
+ # Deletes an AI provider key from the workspace
103
+ sig do
104
+ params(
105
+ id: String,
106
+ workspace_id: String,
107
+ request_options: Cadenya::RequestOptions::OrHash
108
+ ).void
109
+ end
110
+ def delete(
111
+ # The key to delete.
112
+ id,
113
+ # The workspace the key belongs to.
114
+ workspace_id:,
115
+ request_options: {}
116
+ )
117
+ end
118
+
119
+ # @api private
120
+ sig { params(client: Cadenya::Client).returns(T.attached_class) }
121
+ def self.new(client:)
122
+ end
123
+ end
124
+ end
125
+ end
@@ -136,6 +136,24 @@ module Cadenya
136
136
  )
137
137
  end
138
138
 
139
+ # Retrieves the current OpenAPI specification JSON that has been consumed by the
140
+ # tool set. Only applicable to tool sets using the OpenAPI adapter.
141
+ sig do
142
+ params(
143
+ tool_set_id: String,
144
+ workspace_id: String,
145
+ request_options: Cadenya::RequestOptions::OrHash
146
+ ).returns(Cadenya::Models::ToolSetGetOpenAPISpecResponse)
147
+ end
148
+ def get_openapi_spec(
149
+ # Tool set ID. Accepts the canonical ts\_… form or the external_id:<value> form.
150
+ tool_set_id,
151
+ # Workspace ID.
152
+ workspace_id:,
153
+ request_options: {}
154
+ )
155
+ end
156
+
139
157
  # Lists all events (including sync status) for a tool set
140
158
  sig do
141
159
  params(
@@ -0,0 +1,83 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class WorkspaceAdmin
6
+ # Administer workspaces across the account: create and archive workspaces and
7
+ # manage their membership. These operations are account-scoped and require the
8
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
9
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
10
+ # an admin can manage any workspace in the account, including ones they are not
11
+ # themselves a member of.
12
+ class Members
13
+ # Lists the members of a workspace. Admin only.
14
+ sig do
15
+ params(
16
+ workspace_id: String,
17
+ cursor: String,
18
+ limit: Integer,
19
+ request_options: Cadenya::RequestOptions::OrHash
20
+ ).returns(
21
+ Cadenya::Internal::CursorPagination[Cadenya::WorkspaceMember]
22
+ )
23
+ end
24
+ def list(
25
+ # The workspace whose members will be listed (path).
26
+ workspace_id,
27
+ # Pagination cursor from previous response
28
+ cursor: nil,
29
+ # Maximum number of results to return
30
+ limit: nil,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ # Grants a profile access to the workspace by creating (or reactivating) the actor
36
+ # that links the profile to the workspace. Accepts either an existing profile_id
37
+ # or an email to resolve-or-invite. Idempotent for an already-active member. Admin
38
+ # only.
39
+ sig do
40
+ params(
41
+ workspace_id: String,
42
+ email: String,
43
+ profile_id: String,
44
+ request_options: Cadenya::RequestOptions::OrHash
45
+ ).returns(Cadenya::WorkspaceMember)
46
+ end
47
+ def add(
48
+ # The workspace to add the member to (path).
49
+ workspace_id,
50
+ # Email address to add (resolve-or-invite). Mutually exclusive with profile_id.
51
+ email: nil,
52
+ # An existing account profile to add. Mutually exclusive with email.
53
+ profile_id: nil,
54
+ request_options: {}
55
+ )
56
+ end
57
+
58
+ # Revokes a member's access by deactivating their actor; the member is immediately
59
+ # cut off. The underlying profile is not deleted. Admin only.
60
+ sig do
61
+ params(
62
+ profile_id: String,
63
+ workspace_id: String,
64
+ request_options: Cadenya::RequestOptions::OrHash
65
+ ).void
66
+ end
67
+ def remove(
68
+ # The profile to remove from the workspace (path).
69
+ profile_id,
70
+ # The workspace to remove the member from (path).
71
+ workspace_id:,
72
+ request_options: {}
73
+ )
74
+ end
75
+
76
+ # @api private
77
+ sig { params(client: Cadenya::Client).returns(T.attached_class) }
78
+ def self.new(client:)
79
+ end
80
+ end
81
+ end
82
+ end
83
+ end
@@ -0,0 +1,42 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Resources
5
+ class WorkspaceAdmin
6
+ # Administer workspaces across the account: create and archive workspaces and
7
+ # manage their membership. These operations are account-scoped and require the
8
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
9
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
10
+ # an admin can manage any workspace in the account, including ones they are not
11
+ # themselves a member of.
12
+ class Profiles
13
+ # Searches the account's profiles for a member picker, with free-form name/email
14
+ # search and an optional type filter. Account-scoped; admin only.
15
+ sig do
16
+ params(
17
+ cursor: String,
18
+ limit: Integer,
19
+ query: String,
20
+ request_options: Cadenya::RequestOptions::OrHash
21
+ ).returns(Cadenya::Internal::CursorPagination[Cadenya::Profile])
22
+ end
23
+ def list(
24
+ # Pagination cursor from previous response
25
+ cursor: nil,
26
+ # Maximum number of results to return
27
+ limit: nil,
28
+ # Free-form search over profile name and email. Case-insensitive substring match;
29
+ # empty returns all profiles.
30
+ query: nil,
31
+ request_options: {}
32
+ )
33
+ end
34
+
35
+ # @api private
36
+ sig { params(client: Cadenya::Client).returns(T.attached_class) }
37
+ def self.new(client:)
38
+ end
39
+ end
40
+ end
41
+ end
42
+ end
@@ -0,0 +1,131 @@
1
+ # typed: strong
2
+
3
+ module Cadenya
4
+ module Resources
5
+ # Administer workspaces across the account: create and archive workspaces and
6
+ # manage their membership. These operations are account-scoped and require the
7
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
8
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
9
+ # an admin can manage any workspace in the account, including ones they are not
10
+ # themselves a member of.
11
+ class WorkspaceAdmin
12
+ # Administer workspaces across the account: create and archive workspaces and
13
+ # manage their membership. These operations are account-scoped and require the
14
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
15
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
16
+ # an admin can manage any workspace in the account, including ones they are not
17
+ # themselves a member of.
18
+ sig { returns(Cadenya::Resources::WorkspaceAdmin::Members) }
19
+ attr_reader :members
20
+
21
+ # Administer workspaces across the account: create and archive workspaces and
22
+ # manage their membership. These operations are account-scoped and require the
23
+ # admin role (a token whose profile holds the WorkOS admin role); they live under
24
+ # /v1/account/workspaces rather than the workspace-scoped /v1/workspaces tree so
25
+ # an admin can manage any workspace in the account, including ones they are not
26
+ # themselves a member of.
27
+ sig { returns(Cadenya::Resources::WorkspaceAdmin::Profiles) }
28
+ attr_reader :profiles
29
+
30
+ # Creates a new workspace in the account. Admin only.
31
+ sig do
32
+ params(
33
+ metadata: Cadenya::WorkspaceAdminCreateParams::Metadata::OrHash,
34
+ spec: Cadenya::WorkspaceSpec::OrHash,
35
+ request_options: Cadenya::RequestOptions::OrHash
36
+ ).returns(Cadenya::Workspace)
37
+ end
38
+ def create(
39
+ # CreateAccountResourceMetadata contains the user-provided fields for creating an
40
+ # account-scoped resource. Read-only fields (id, account_id, profile_id) are
41
+ # excluded since they are set by the server.
42
+ metadata:,
43
+ spec:,
44
+ request_options: {}
45
+ )
46
+ end
47
+
48
+ # Retrieves a workspace in the account by ID. Admin only.
49
+ sig do
50
+ params(
51
+ workspace_id: String,
52
+ request_options: Cadenya::RequestOptions::OrHash
53
+ ).returns(Cadenya::Workspace)
54
+ end
55
+ def retrieve(
56
+ # Workspace ID to retrieve (path).
57
+ workspace_id,
58
+ request_options: {}
59
+ )
60
+ end
61
+
62
+ # Updates a workspace's metadata (e.g. name) and spec. Admin only.
63
+ sig do
64
+ params(
65
+ workspace_id: String,
66
+ metadata: Cadenya::WorkspaceAdminUpdateParams::Metadata::OrHash,
67
+ spec: Cadenya::WorkspaceSpec::OrHash,
68
+ update_mask: String,
69
+ request_options: Cadenya::RequestOptions::OrHash
70
+ ).returns(Cadenya::Workspace)
71
+ end
72
+ def update(
73
+ # Workspace ID to update (path).
74
+ workspace_id,
75
+ # UpdateAccountResourceMetadata contains the user-provided fields for updating an
76
+ # account-scoped resource. Read-only fields (id, account_id, profile_id) are
77
+ # excluded since they are set by the server.
78
+ metadata: nil,
79
+ spec: nil,
80
+ # Fields to update.
81
+ update_mask: nil,
82
+ request_options: {}
83
+ )
84
+ end
85
+
86
+ # Lists every workspace in the account, optionally including archived ones. Admin
87
+ # only.
88
+ sig do
89
+ params(
90
+ cursor: String,
91
+ include_archived: T::Boolean,
92
+ limit: Integer,
93
+ request_options: Cadenya::RequestOptions::OrHash
94
+ ).returns(Cadenya::Internal::CursorPagination[Cadenya::Workspace])
95
+ end
96
+ def list(
97
+ # Pagination cursor from previous response
98
+ cursor: nil,
99
+ # When true, archived workspaces are included in the results. Defaults to false
100
+ # (active workspaces only).
101
+ include_archived: nil,
102
+ # Maximum number of results to return
103
+ limit: nil,
104
+ request_options: {}
105
+ )
106
+ end
107
+
108
+ # Archives a workspace (soft delete). The workspace is retained, but any
109
+ # subsequent request scoped to it returns a permission error. Archiving the
110
+ # account's last active (non-archived) workspace is not allowed and returns
111
+ # FailedPrecondition. Admin only.
112
+ sig do
113
+ params(
114
+ workspace_id: String,
115
+ request_options: Cadenya::RequestOptions::OrHash
116
+ ).void
117
+ end
118
+ def archive(
119
+ # Workspace ID to archive (path).
120
+ workspace_id,
121
+ request_options: {}
122
+ )
123
+ end
124
+
125
+ # @api private
126
+ sig { params(client: Cadenya::Client).returns(T.attached_class) }
127
+ def self.new(client:)
128
+ end
129
+ end
130
+ end
131
+ end
@@ -4,6 +4,10 @@ module Cadenya
4
4
  module Resources
5
5
  # Manage workspaces within an account. Workspaces provide organizational grouping
6
6
  # and isolation for resources such as agents, tools, and API keys.
7
+ #
8
+ # This is the workspace-scoped, end-user surface. Administrative operations
9
+ # (create / archive workspaces, manage members) live in WorkspaceAdminService
10
+ # under /v1/account/workspaces and require the admin role.
7
11
  class Workspaces
8
12
  # Lists all workspaces for the current account
9
13
  sig do
@@ -12,6 +12,8 @@ module Cadenya
12
12
 
13
13
  attr_reader webhook_key: String?
14
14
 
15
+ attr_reader ai_provider_keys: Cadenya::Resources::AIProviderKeys
16
+
15
17
  attr_reader account: Cadenya::Resources::Account
16
18
 
17
19
  attr_reader agents: Cadenya::Resources::Agents
@@ -34,6 +36,8 @@ module Cadenya
34
36
 
35
37
  attr_reader workspaces: Cadenya::Resources::Workspaces
36
38
 
39
+ attr_reader workspace_admin: Cadenya::Resources::WorkspaceAdmin
40
+
37
41
  attr_reader webhooks: Cadenya::Resources::Webhooks
38
42
 
39
43
  attr_reader bulk_workspace_resources: Cadenya::Resources::BulkWorkspaceResources
@@ -5,7 +5,8 @@ module Cadenya
5
5
  status: Cadenya::Models::AgentSpec::status,
6
6
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
7
7
  description: String,
8
- input_data_schema: top,
8
+ input_data_schema: ::Hash[Symbol, top],
9
+ output_definition: ::Hash[Symbol, top],
9
10
  webhook_events_url: String
10
11
  }
11
12
 
@@ -18,9 +19,13 @@ module Cadenya
18
19
 
19
20
  def description=: (String) -> String
20
21
 
21
- attr_reader input_data_schema: top?
22
+ attr_reader input_data_schema: ::Hash[Symbol, top]?
22
23
 
23
- def input_data_schema=: (top) -> top
24
+ def input_data_schema=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
25
+
26
+ attr_reader output_definition: ::Hash[Symbol, top]?
27
+
28
+ def output_definition=: (::Hash[Symbol, top]) -> ::Hash[Symbol, top]
24
29
 
25
30
  attr_reader webhook_events_url: String?
26
31
 
@@ -30,7 +35,8 @@ module Cadenya
30
35
  status: Cadenya::Models::AgentSpec::status,
31
36
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
32
37
  ?description: String,
33
- ?input_data_schema: top,
38
+ ?input_data_schema: ::Hash[Symbol, top],
39
+ ?output_definition: ::Hash[Symbol, top],
34
40
  ?webhook_events_url: String
35
41
  ) -> void
36
42
 
@@ -38,7 +44,8 @@ module Cadenya
38
44
  status: Cadenya::Models::AgentSpec::status,
39
45
  variation_selection_mode: Cadenya::Models::AgentSpec::variation_selection_mode,
40
46
  description: String,
41
- input_data_schema: top,
47
+ input_data_schema: ::Hash[Symbol, top],
48
+ output_definition: ::Hash[Symbol, top],
42
49
  webhook_events_url: String
43
50
  }
44
51
 
@@ -104,6 +104,7 @@ module Cadenya
104
104
  | :OBJECTIVE_EVENT_TYPE_CANCELLED
105
105
  | :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
106
106
  | :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
107
+ | :OBJECTIVE_EVENT_TYPE_FINALIZED
107
108
 
108
109
  module EventType
109
110
  extend Cadenya::Internal::Type::Enum
@@ -123,6 +124,7 @@ module Cadenya
123
124
  OBJECTIVE_EVENT_TYPE_CANCELLED: :OBJECTIVE_EVENT_TYPE_CANCELLED
124
125
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED: :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
125
126
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED: :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
127
+ OBJECTIVE_EVENT_TYPE_FINALIZED: :OBJECTIVE_EVENT_TYPE_FINALIZED
126
128
 
127
129
  def self?.values: -> ::Array[Cadenya::Models::Agents::WebhookDeliveryData::event_type]
128
130
  end
@@ -74,6 +74,7 @@ module Cadenya
74
74
  | :OBJECTIVE_EVENT_TYPE_CANCELLED
75
75
  | :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
76
76
  | :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
77
+ | :OBJECTIVE_EVENT_TYPE_FINALIZED
77
78
 
78
79
  module EventType
79
80
  extend Cadenya::Internal::Type::Enum
@@ -93,6 +94,7 @@ module Cadenya
93
94
  OBJECTIVE_EVENT_TYPE_CANCELLED: :OBJECTIVE_EVENT_TYPE_CANCELLED
94
95
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED: :OBJECTIVE_EVENT_TYPE_SUB_AGENT_SPAWNED
95
96
  OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED: :OBJECTIVE_EVENT_TYPE_SUB_AGENT_UPDATED
97
+ OBJECTIVE_EVENT_TYPE_FINALIZED: :OBJECTIVE_EVENT_TYPE_FINALIZED
96
98
 
97
99
  def self?.values: -> ::Array[Cadenya::Models::Agents::WebhookDeliveryListParams::event_type]
98
100
  end
@@ -0,0 +1,22 @@
1
+ module Cadenya
2
+ module Models
3
+ type ai_provider_key =
4
+ { metadata: Cadenya::ResourceMetadata, spec: Cadenya::AIProviderKeySpec }
5
+
6
+ class AIProviderKey < Cadenya::Internal::Type::BaseModel
7
+ attr_accessor metadata: Cadenya::ResourceMetadata
8
+
9
+ attr_accessor spec: Cadenya::AIProviderKeySpec
10
+
11
+ def initialize: (
12
+ metadata: Cadenya::ResourceMetadata,
13
+ spec: Cadenya::AIProviderKeySpec
14
+ ) -> void
15
+
16
+ def to_hash: -> {
17
+ metadata: Cadenya::ResourceMetadata,
18
+ spec: Cadenya::AIProviderKeySpec
19
+ }
20
+ end
21
+ end
22
+ end
@@ -0,0 +1,36 @@
1
+ module Cadenya
2
+ module Models
3
+ type ai_provider_key_create_params =
4
+ {
5
+ workspace_id: String,
6
+ metadata: Cadenya::CreateResourceMetadata,
7
+ spec: Cadenya::AIProviderKeySpec
8
+ }
9
+ & Cadenya::Internal::Type::request_parameters
10
+
11
+ class AIProviderKeyCreateParams < Cadenya::Internal::Type::BaseModel
12
+ extend Cadenya::Internal::Type::RequestParameters::Converter
13
+ include Cadenya::Internal::Type::RequestParameters
14
+
15
+ attr_accessor workspace_id: String
16
+
17
+ attr_accessor metadata: Cadenya::CreateResourceMetadata
18
+
19
+ attr_accessor spec: Cadenya::AIProviderKeySpec
20
+
21
+ def initialize: (
22
+ workspace_id: String,
23
+ metadata: Cadenya::CreateResourceMetadata,
24
+ spec: Cadenya::AIProviderKeySpec,
25
+ ?request_options: Cadenya::request_opts
26
+ ) -> void
27
+
28
+ def to_hash: -> {
29
+ workspace_id: String,
30
+ metadata: Cadenya::CreateResourceMetadata,
31
+ spec: Cadenya::AIProviderKeySpec,
32
+ request_options: Cadenya::RequestOptions
33
+ }
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,28 @@
1
+ module Cadenya
2
+ module Models
3
+ type ai_provider_key_delete_params =
4
+ { workspace_id: String, id: String }
5
+ & Cadenya::Internal::Type::request_parameters
6
+
7
+ class AIProviderKeyDeleteParams < Cadenya::Internal::Type::BaseModel
8
+ extend Cadenya::Internal::Type::RequestParameters::Converter
9
+ include Cadenya::Internal::Type::RequestParameters
10
+
11
+ attr_accessor workspace_id: String
12
+
13
+ attr_accessor id: String
14
+
15
+ def initialize: (
16
+ workspace_id: String,
17
+ id: String,
18
+ ?request_options: Cadenya::request_opts
19
+ ) -> void
20
+
21
+ def to_hash: -> {
22
+ workspace_id: String,
23
+ id: String,
24
+ request_options: Cadenya::RequestOptions
25
+ }
26
+ end
27
+ end
28
+ end
@@ -0,0 +1,61 @@
1
+ module Cadenya
2
+ module Models
3
+ type ai_provider_key_list_params =
4
+ {
5
+ workspace_id: String,
6
+ cursor: String,
7
+ limit: Integer,
8
+ prefix: String,
9
+ query: String,
10
+ sort_order: String
11
+ }
12
+ & Cadenya::Internal::Type::request_parameters
13
+
14
+ class AIProviderKeyListParams < Cadenya::Internal::Type::BaseModel
15
+ extend Cadenya::Internal::Type::RequestParameters::Converter
16
+ include Cadenya::Internal::Type::RequestParameters
17
+
18
+ attr_accessor workspace_id: String
19
+
20
+ attr_reader cursor: String?
21
+
22
+ def cursor=: (String) -> String
23
+
24
+ attr_reader limit: Integer?
25
+
26
+ def limit=: (Integer) -> Integer
27
+
28
+ attr_reader prefix: String?
29
+
30
+ def prefix=: (String) -> String
31
+
32
+ attr_reader query: String?
33
+
34
+ def query=: (String) -> String
35
+
36
+ attr_reader sort_order: String?
37
+
38
+ def sort_order=: (String) -> String
39
+
40
+ def initialize: (
41
+ workspace_id: String,
42
+ ?cursor: String,
43
+ ?limit: Integer,
44
+ ?prefix: String,
45
+ ?query: String,
46
+ ?sort_order: String,
47
+ ?request_options: Cadenya::request_opts
48
+ ) -> void
49
+
50
+ def to_hash: -> {
51
+ workspace_id: String,
52
+ cursor: String,
53
+ limit: Integer,
54
+ prefix: String,
55
+ query: String,
56
+ sort_order: String,
57
+ request_options: Cadenya::RequestOptions
58
+ }
59
+ end
60
+ end
61
+ end