@cadenya/cadenya 0.66.0 → 0.68.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 (267) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/README.md +2 -2
  3. package/client.d.mts +42 -81
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +42 -81
  6. package/client.d.ts.map +1 -1
  7. package/client.js +24 -63
  8. package/client.js.map +1 -1
  9. package/client.mjs +24 -63
  10. package/client.mjs.map +1 -1
  11. package/package.json +1 -1
  12. package/resources/account.d.mts +18 -22
  13. package/resources/account.d.mts.map +1 -1
  14. package/resources/account.d.ts +18 -22
  15. package/resources/account.d.ts.map +1 -1
  16. package/resources/account.js +2 -6
  17. package/resources/account.js.map +1 -1
  18. package/resources/account.mjs +2 -6
  19. package/resources/account.mjs.map +1 -1
  20. package/resources/agents/agents.d.mts +34 -21
  21. package/resources/agents/agents.d.mts.map +1 -1
  22. package/resources/agents/agents.d.ts +34 -21
  23. package/resources/agents/agents.d.ts.map +1 -1
  24. package/resources/agents/agents.js +17 -16
  25. package/resources/agents/agents.js.map +1 -1
  26. package/resources/agents/agents.mjs +17 -16
  27. package/resources/agents/agents.mjs.map +1 -1
  28. package/resources/agents/feedback.d.mts +15 -15
  29. package/resources/agents/feedback.d.mts.map +1 -1
  30. package/resources/agents/feedback.d.ts +15 -15
  31. package/resources/agents/feedback.d.ts.map +1 -1
  32. package/resources/agents/feedback.js +4 -8
  33. package/resources/agents/feedback.js.map +1 -1
  34. package/resources/agents/feedback.mjs +4 -8
  35. package/resources/agents/feedback.mjs.map +1 -1
  36. package/resources/agents/index.d.mts +1 -1
  37. package/resources/agents/index.d.mts.map +1 -1
  38. package/resources/agents/index.d.ts +1 -1
  39. package/resources/agents/index.d.ts.map +1 -1
  40. package/resources/agents/index.js.map +1 -1
  41. package/resources/agents/index.mjs.map +1 -1
  42. package/resources/agents/schedules.d.mts +44 -26
  43. package/resources/agents/schedules.d.mts.map +1 -1
  44. package/resources/agents/schedules.d.ts +44 -26
  45. package/resources/agents/schedules.d.ts.map +1 -1
  46. package/resources/agents/schedules.js +20 -19
  47. package/resources/agents/schedules.js.map +1 -1
  48. package/resources/agents/schedules.mjs +20 -19
  49. package/resources/agents/schedules.mjs.map +1 -1
  50. package/resources/agents/variations.d.mts +88 -43
  51. package/resources/agents/variations.d.mts.map +1 -1
  52. package/resources/agents/variations.d.ts +88 -43
  53. package/resources/agents/variations.d.ts.map +1 -1
  54. package/resources/agents/variations.js +31 -32
  55. package/resources/agents/variations.js.map +1 -1
  56. package/resources/agents/variations.mjs +31 -32
  57. package/resources/agents/variations.mjs.map +1 -1
  58. package/resources/agents/webhook-deliveries.d.mts +10 -11
  59. package/resources/agents/webhook-deliveries.d.mts.map +1 -1
  60. package/resources/agents/webhook-deliveries.d.ts +10 -11
  61. package/resources/agents/webhook-deliveries.d.ts.map +1 -1
  62. package/resources/agents/webhook-deliveries.js +4 -8
  63. package/resources/agents/webhook-deliveries.js.map +1 -1
  64. package/resources/agents/webhook-deliveries.mjs +4 -8
  65. package/resources/agents/webhook-deliveries.mjs.map +1 -1
  66. package/resources/api-keys.d.mts +48 -28
  67. package/resources/api-keys.d.mts.map +1 -1
  68. package/resources/api-keys.d.ts +48 -28
  69. package/resources/api-keys.d.ts.map +1 -1
  70. package/resources/api-keys.js +21 -17
  71. package/resources/api-keys.js.map +1 -1
  72. package/resources/api-keys.mjs +21 -17
  73. package/resources/api-keys.mjs.map +1 -1
  74. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
  75. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
  76. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
  77. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
  78. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
  79. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
  80. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
  81. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
  82. package/resources/bulk-workspace-resources/index.d.mts +1 -1
  83. package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
  84. package/resources/bulk-workspace-resources/index.d.ts +1 -1
  85. package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
  86. package/resources/bulk-workspace-resources/index.js.map +1 -1
  87. package/resources/bulk-workspace-resources/index.mjs.map +1 -1
  88. package/resources/bulk-workspace-resources/results.d.mts +30 -35
  89. package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
  90. package/resources/bulk-workspace-resources/results.d.ts +30 -35
  91. package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
  92. package/resources/bulk-workspace-resources/results.js +6 -10
  93. package/resources/bulk-workspace-resources/results.js.map +1 -1
  94. package/resources/bulk-workspace-resources/results.mjs +6 -10
  95. package/resources/bulk-workspace-resources/results.mjs.map +1 -1
  96. package/resources/index.d.mts +9 -9
  97. package/resources/index.d.mts.map +1 -1
  98. package/resources/index.d.ts +9 -9
  99. package/resources/index.d.ts.map +1 -1
  100. package/resources/index.js.map +1 -1
  101. package/resources/index.mjs +1 -1
  102. package/resources/index.mjs.map +1 -1
  103. package/resources/memory-layers/entries.d.mts +40 -33
  104. package/resources/memory-layers/entries.d.mts.map +1 -1
  105. package/resources/memory-layers/entries.d.ts +40 -33
  106. package/resources/memory-layers/entries.d.ts.map +1 -1
  107. package/resources/memory-layers/entries.js +19 -23
  108. package/resources/memory-layers/entries.js.map +1 -1
  109. package/resources/memory-layers/entries.mjs +19 -23
  110. package/resources/memory-layers/entries.mjs.map +1 -1
  111. package/resources/memory-layers/index.d.mts +1 -1
  112. package/resources/memory-layers/index.d.mts.map +1 -1
  113. package/resources/memory-layers/index.d.ts +1 -1
  114. package/resources/memory-layers/index.d.ts.map +1 -1
  115. package/resources/memory-layers/index.js.map +1 -1
  116. package/resources/memory-layers/index.mjs.map +1 -1
  117. package/resources/memory-layers/memory-layers.d.mts +33 -22
  118. package/resources/memory-layers/memory-layers.d.mts.map +1 -1
  119. package/resources/memory-layers/memory-layers.d.ts +33 -22
  120. package/resources/memory-layers/memory-layers.d.ts.map +1 -1
  121. package/resources/memory-layers/memory-layers.js +17 -20
  122. package/resources/memory-layers/memory-layers.js.map +1 -1
  123. package/resources/memory-layers/memory-layers.mjs +17 -20
  124. package/resources/memory-layers/memory-layers.mjs.map +1 -1
  125. package/resources/models.d.mts +18 -12
  126. package/resources/models.d.mts.map +1 -1
  127. package/resources/models.d.ts +18 -12
  128. package/resources/models.d.ts.map +1 -1
  129. package/resources/models.js +14 -13
  130. package/resources/models.js.map +1 -1
  131. package/resources/models.mjs +14 -13
  132. package/resources/models.mjs.map +1 -1
  133. package/resources/objectives/feedback.d.mts +19 -8
  134. package/resources/objectives/feedback.d.mts.map +1 -1
  135. package/resources/objectives/feedback.d.ts +19 -8
  136. package/resources/objectives/feedback.d.ts.map +1 -1
  137. package/resources/objectives/feedback.js +9 -4
  138. package/resources/objectives/feedback.js.map +1 -1
  139. package/resources/objectives/feedback.mjs +9 -4
  140. package/resources/objectives/feedback.mjs.map +1 -1
  141. package/resources/objectives/index.d.mts +1 -1
  142. package/resources/objectives/index.d.mts.map +1 -1
  143. package/resources/objectives/index.d.ts +1 -1
  144. package/resources/objectives/index.d.ts.map +1 -1
  145. package/resources/objectives/index.js.map +1 -1
  146. package/resources/objectives/index.mjs.map +1 -1
  147. package/resources/objectives/objectives.d.mts +63 -44
  148. package/resources/objectives/objectives.d.mts.map +1 -1
  149. package/resources/objectives/objectives.d.ts +63 -44
  150. package/resources/objectives/objectives.d.ts.map +1 -1
  151. package/resources/objectives/objectives.js +31 -16
  152. package/resources/objectives/objectives.js.map +1 -1
  153. package/resources/objectives/objectives.mjs +31 -16
  154. package/resources/objectives/objectives.mjs.map +1 -1
  155. package/resources/objectives/tasks.d.mts +7 -2
  156. package/resources/objectives/tasks.d.mts.map +1 -1
  157. package/resources/objectives/tasks.d.ts +7 -2
  158. package/resources/objectives/tasks.d.ts.map +1 -1
  159. package/resources/objectives/tasks.js +5 -4
  160. package/resources/objectives/tasks.js.map +1 -1
  161. package/resources/objectives/tasks.mjs +5 -4
  162. package/resources/objectives/tasks.mjs.map +1 -1
  163. package/resources/objectives/tool-calls.d.mts +18 -9
  164. package/resources/objectives/tool-calls.d.mts.map +1 -1
  165. package/resources/objectives/tool-calls.d.ts +18 -9
  166. package/resources/objectives/tool-calls.d.ts.map +1 -1
  167. package/resources/objectives/tool-calls.js +7 -12
  168. package/resources/objectives/tool-calls.js.map +1 -1
  169. package/resources/objectives/tool-calls.mjs +7 -12
  170. package/resources/objectives/tool-calls.mjs.map +1 -1
  171. package/resources/objectives/tools.d.mts +5 -1
  172. package/resources/objectives/tools.d.mts.map +1 -1
  173. package/resources/objectives/tools.d.ts +5 -1
  174. package/resources/objectives/tools.d.ts.map +1 -1
  175. package/resources/objectives/tools.js +3 -2
  176. package/resources/objectives/tools.js.map +1 -1
  177. package/resources/objectives/tools.mjs +3 -2
  178. package/resources/objectives/tools.mjs.map +1 -1
  179. package/resources/search.d.mts +1 -1
  180. package/resources/search.d.mts.map +1 -1
  181. package/resources/search.d.ts +1 -1
  182. package/resources/search.d.ts.map +1 -1
  183. package/resources/search.js +6 -2
  184. package/resources/search.js.map +1 -1
  185. package/resources/search.mjs +6 -2
  186. package/resources/search.mjs.map +1 -1
  187. package/resources/tool-sets/index.d.mts +1 -1
  188. package/resources/tool-sets/index.d.mts.map +1 -1
  189. package/resources/tool-sets/index.d.ts +1 -1
  190. package/resources/tool-sets/index.d.ts.map +1 -1
  191. package/resources/tool-sets/index.js.map +1 -1
  192. package/resources/tool-sets/index.mjs.map +1 -1
  193. package/resources/tool-sets/tool-sets.d.mts +66 -43
  194. package/resources/tool-sets/tool-sets.d.mts.map +1 -1
  195. package/resources/tool-sets/tool-sets.d.ts +66 -43
  196. package/resources/tool-sets/tool-sets.d.ts.map +1 -1
  197. package/resources/tool-sets/tool-sets.js +23 -23
  198. package/resources/tool-sets/tool-sets.js.map +1 -1
  199. package/resources/tool-sets/tool-sets.mjs +23 -23
  200. package/resources/tool-sets/tool-sets.mjs.map +1 -1
  201. package/resources/tool-sets/tools.d.mts +50 -31
  202. package/resources/tool-sets/tools.d.mts.map +1 -1
  203. package/resources/tool-sets/tools.d.ts +50 -31
  204. package/resources/tool-sets/tools.d.ts.map +1 -1
  205. package/resources/tool-sets/tools.js +22 -21
  206. package/resources/tool-sets/tools.js.map +1 -1
  207. package/resources/tool-sets/tools.mjs +22 -21
  208. package/resources/tool-sets/tools.mjs.map +1 -1
  209. package/resources/uploads.d.mts +21 -19
  210. package/resources/uploads.d.mts.map +1 -1
  211. package/resources/uploads.d.ts +21 -19
  212. package/resources/uploads.d.ts.map +1 -1
  213. package/resources/uploads.js +8 -11
  214. package/resources/uploads.js.map +1 -1
  215. package/resources/uploads.mjs +8 -11
  216. package/resources/uploads.mjs.map +1 -1
  217. package/resources/workspace-secrets.d.mts +33 -13
  218. package/resources/workspace-secrets.d.mts.map +1 -1
  219. package/resources/workspace-secrets.d.ts +33 -13
  220. package/resources/workspace-secrets.d.ts.map +1 -1
  221. package/resources/workspace-secrets.js +16 -13
  222. package/resources/workspace-secrets.js.map +1 -1
  223. package/resources/workspace-secrets.mjs +16 -13
  224. package/resources/workspace-secrets.mjs.map +1 -1
  225. package/resources/workspaces.d.mts +2 -6
  226. package/resources/workspaces.d.mts.map +1 -1
  227. package/resources/workspaces.d.ts +2 -6
  228. package/resources/workspaces.d.ts.map +1 -1
  229. package/resources/workspaces.js +2 -6
  230. package/resources/workspaces.js.map +1 -1
  231. package/resources/workspaces.mjs +2 -6
  232. package/resources/workspaces.mjs.map +1 -1
  233. package/src/client.ts +54 -63
  234. package/src/resources/account.ts +18 -22
  235. package/src/resources/agents/agents.ts +49 -24
  236. package/src/resources/agents/feedback.ts +18 -16
  237. package/src/resources/agents/index.ts +2 -0
  238. package/src/resources/agents/schedules.ts +69 -37
  239. package/src/resources/agents/variations.ts +141 -73
  240. package/src/resources/agents/webhook-deliveries.ts +13 -12
  241. package/src/resources/api-keys.ts +67 -32
  242. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
  243. package/src/resources/bulk-workspace-resources/index.ts +1 -0
  244. package/src/resources/bulk-workspace-resources/results.ts +33 -36
  245. package/src/resources/index.ts +22 -1
  246. package/src/resources/memory-layers/entries.ts +67 -44
  247. package/src/resources/memory-layers/index.ts +2 -0
  248. package/src/resources/memory-layers/memory-layers.ts +53 -25
  249. package/src/resources/models.ts +28 -13
  250. package/src/resources/objectives/feedback.ts +29 -11
  251. package/src/resources/objectives/index.ts +1 -0
  252. package/src/resources/objectives/objectives.ts +100 -50
  253. package/src/resources/objectives/tasks.ts +16 -5
  254. package/src/resources/objectives/tool-calls.ts +33 -20
  255. package/src/resources/objectives/tools.ts +9 -3
  256. package/src/resources/search.ts +6 -1
  257. package/src/resources/tool-sets/index.ts +2 -0
  258. package/src/resources/tool-sets/tool-sets.ts +88 -50
  259. package/src/resources/tool-sets/tools.ts +75 -42
  260. package/src/resources/uploads.ts +25 -20
  261. package/src/resources/workspace-secrets.ts +60 -19
  262. package/src/resources/workspaces.ts +2 -6
  263. package/src/version.ts +1 -1
  264. package/version.d.mts +1 -1
  265. package/version.d.ts +1 -1
  266. package/version.js +1 -1
  267. package/version.mjs +1 -1
@@ -32,14 +32,9 @@ import { RequestOptions } from '../../internal/request-options';
32
32
  import { path } from '../../internal/utils/path';
33
33
 
34
34
  /**
35
- * BulkWorkspaceResources is the workspace-scoped service that applies
36
- * a declarative bundle of workspace resources (tool sets, memory
37
- * layers, agents, variations, assignments, schedules) in one async
38
- * operation. See docs/superpowers/specs/2026-05-02-bulk-workspace-resources-design.md
39
- * for the full design.
40
- *
41
- * Authentication: Bearer token (JWT)
42
- * Scope: Workspace-level operations
35
+ * Apply a declarative bundle of workspace resources tool sets, memory
36
+ * layers, agents, variations, assignments, and schedules in a single
37
+ * asynchronous operation.
43
38
  */
44
39
  export class BulkWorkspaceResources extends APIResource {
45
40
  results: ResultsAPI.Results = new ResultsAPI.Results(this._client);
@@ -47,29 +42,43 @@ export class BulkWorkspaceResources extends APIResource {
47
42
  /**
48
43
  * Retrieves a bulk workspace apply operation by ID.
49
44
  */
50
- retrieve(id: string, options?: RequestOptions): APIPromise<BulkWorkspaceApply> {
51
- return this._client.get(path`/v1/bulk_workspace_applies/${id}`, options);
45
+ retrieve(
46
+ id: string,
47
+ params: BulkWorkspaceResourceRetrieveParams,
48
+ options?: RequestOptions,
49
+ ): APIPromise<BulkWorkspaceApply> {
50
+ const { workspaceId } = params;
51
+ return this._client.get(path`/v1/workspaces/${workspaceId}/bulk_workspace_applies/${id}`, options);
52
52
  }
53
53
 
54
54
  /**
55
55
  * Lists past and in-flight bulk workspace apply operations in the workspace.
56
56
  */
57
57
  list(
58
+ workspaceID: string,
58
59
  query: BulkWorkspaceResourceListParams | null | undefined = {},
59
60
  options?: RequestOptions,
60
61
  ): PagePromise<BulkWorkspaceAppliesCursorPagination, BulkWorkspaceApply> {
61
- return this._client.getAPIList('/v1/bulk_workspace_applies', CursorPagination<BulkWorkspaceApply>, {
62
- query,
63
- ...options,
64
- });
62
+ return this._client.getAPIList(
63
+ path`/v1/workspaces/${workspaceID}/bulk_workspace_applies`,
64
+ CursorPagination<BulkWorkspaceApply>,
65
+ { query, ...options },
66
+ );
65
67
  }
66
68
 
67
69
  /**
68
70
  * Asynchronously applies a declarative bundle of workspace resources. Returns the
69
71
  * operation immediately in PENDING; clients poll Get to track progress.
70
72
  */
71
- apply(body: BulkWorkspaceResourceApplyParams, options?: RequestOptions): APIPromise<BulkWorkspaceApply> {
72
- return this._client.post('/v1/bulk_workspace_applies', { body, ...options });
73
+ apply(
74
+ workspaceID: string,
75
+ body: BulkWorkspaceResourceApplyParams,
76
+ options?: RequestOptions,
77
+ ): APIPromise<BulkWorkspaceApply> {
78
+ return this._client.post(path`/v1/workspaces/${workspaceID}/bulk_workspace_applies`, {
79
+ body,
80
+ ...options,
81
+ });
73
82
  }
74
83
  }
75
84
 
@@ -124,17 +133,15 @@ export interface AgentVariationEntry {
124
133
  labels?: { [key: string]: string };
125
134
 
126
135
  /**
127
- * Reconciled list capped at 10 to match the existing variation
128
- * memory-layer-assignment cap.
136
+ * Reconciled list of memory layer assignments. Up to 10 entries.
129
137
  */
130
138
  memoryLayers?: Array<VariationMemoryLayerEntry>;
131
139
  }
132
140
 
133
141
  /**
134
- * BulkWorkspaceApply is the operation resource produced by a call to
135
- * BulkWorkspaceResources.Apply. It is operation-typed (uses OperationMetadata,
136
- * like Objective and ObjectiveEvent) and carries the input bundle in `data`, the
137
- * lifecycle state in `status`, and aggregate counts in `info`.
142
+ * The operation resource produced by a call to BulkWorkspaceResources.Apply. It
143
+ * carries the input bundle in `data`, the lifecycle state in `status`, and
144
+ * aggregate counts in `info`.
138
145
  */
139
146
  export interface BulkWorkspaceApply {
140
147
  data: BulkWorkspaceApplyData;
@@ -199,9 +206,9 @@ export interface BulkWorkspaceApplyInfo {
199
206
  completedAt?: string;
200
207
 
201
208
  /**
202
- * Profile represents a human user at the account level. Profiles are
203
- * account-scoped resources that can be associated with multiple workspaces through
204
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
209
+ * A profile identifies a user or non-human principal (such as an API key) at the
210
+ * account level. Profiles are account-scoped and can be granted access to multiple
211
+ * workspaces.
205
212
  */
206
213
  createdBy?: AccountAPI.Profile;
207
214
 
@@ -352,6 +359,13 @@ export interface VariationMemoryLayerEntry {
352
359
  position?: number;
353
360
  }
354
361
 
362
+ export interface BulkWorkspaceResourceRetrieveParams {
363
+ /**
364
+ * Workspace ID.
365
+ */
366
+ workspaceId: string;
367
+ }
368
+
355
369
  export interface BulkWorkspaceResourceListParams extends CursorPaginationParams {
356
370
  /**
357
371
  * Filter by bundle_key — list every apply for a given bundle.
@@ -399,6 +413,7 @@ export declare namespace BulkWorkspaceResources {
399
413
  type VariationAssignmentEntry as VariationAssignmentEntry,
400
414
  type VariationMemoryLayerEntry as VariationMemoryLayerEntry,
401
415
  type BulkWorkspaceAppliesCursorPagination as BulkWorkspaceAppliesCursorPagination,
416
+ type BulkWorkspaceResourceRetrieveParams as BulkWorkspaceResourceRetrieveParams,
402
417
  type BulkWorkspaceResourceListParams as BulkWorkspaceResourceListParams,
403
418
  type BulkWorkspaceResourceApplyParams as BulkWorkspaceResourceApplyParams,
404
419
  };
@@ -15,6 +15,7 @@ export {
15
15
  type ToolSetEntry,
16
16
  type VariationAssignmentEntry,
17
17
  type VariationMemoryLayerEntry,
18
+ type BulkWorkspaceResourceRetrieveParams,
18
19
  type BulkWorkspaceResourceListParams,
19
20
  type BulkWorkspaceResourceApplyParams,
20
21
  type BulkWorkspaceAppliesCursorPagination,
@@ -14,14 +14,9 @@ import { RequestOptions } from '../../internal/request-options';
14
14
  import { path } from '../../internal/utils/path';
15
15
 
16
16
  /**
17
- * BulkWorkspaceResources is the workspace-scoped service that applies
18
- * a declarative bundle of workspace resources (tool sets, memory
19
- * layers, agents, variations, assignments, schedules) in one async
20
- * operation. See docs/superpowers/specs/2026-05-02-bulk-workspace-resources-design.md
21
- * for the full design.
22
- *
23
- * Authentication: Bearer token (JWT)
24
- * Scope: Workspace-level operations
17
+ * Apply a declarative bundle of workspace resources tool sets, memory
18
+ * layers, agents, variations, assignments, and schedules in a single
19
+ * asynchronous operation.
25
20
  */
26
21
  export class Results extends APIResource {
27
22
  /**
@@ -29,11 +24,12 @@ export class Results extends APIResource {
29
24
  */
30
25
  list(
31
26
  bulkWorkspaceApplyID: string,
32
- query: ResultListParams | null | undefined = {},
27
+ params: ResultListParams,
33
28
  options?: RequestOptions,
34
29
  ): PagePromise<BulkWorkspaceApplyResultsCursorPagination, BulkWorkspaceApplyResult> {
30
+ const { workspaceId, ...query } = params;
35
31
  return this._client.getAPIList(
36
- path`/v1/bulk_workspace_applies/${bulkWorkspaceApplyID}/results`,
32
+ path`/v1/workspaces/${workspaceId}/bulk_workspace_applies/${bulkWorkspaceApplyID}/results`,
37
33
  CursorPagination<BulkWorkspaceApplyResult>,
38
34
  { query, ...options },
39
35
  );
@@ -43,19 +39,17 @@ export class Results extends APIResource {
43
39
  export type BulkWorkspaceApplyResultsCursorPagination = CursorPagination<BulkWorkspaceApplyResult>;
44
40
 
45
41
  /**
46
- * BulkWorkspaceApplyResult is one row of the per-resource result list for a
47
- * BulkWorkspaceApply. Each row is itself an operation (OperationMetadata-typed) so
48
- * it can be paginated, sorted by created_at, and individually addressed. Mirrors
49
- * the Objective → ObjectiveEvent relationship.
42
+ * One row of the per-resource result list for a BulkWorkspaceApply. Each row is
43
+ * itself an operation that can be paginated, sorted by created_at, and addressed
44
+ * individually.
50
45
  */
51
46
  export interface BulkWorkspaceApplyResult {
52
47
  /**
53
- * BulkWorkspaceApplyResultData carries the outcome for a single resource. The
54
- * `type` field is the discriminator string that names the populated `outcome`
55
- * oneof variant (e.g., "toolSet", "memoryEntry"). Every Outcome shell carries an
56
- * `action` enum and either a resulting resource snapshot (for ACTION_CREATED /
57
- * ACTION_UPDATED / ACTION_UNCHANGED / ACTION_DELETED) or a google.rpc.Status (for
58
- * ACTION_FAILED).
48
+ * Outcome for a single resource within a bulk apply. The `type` field is the
49
+ * discriminator string naming the populated `outcome` oneof variant (e.g.,
50
+ * "toolSet", "memoryEntry"). Every outcome shell carries an `action` enum and
51
+ * either a resulting resource snapshot (for ACTION_CREATED, ACTION_UPDATED,
52
+ * ACTION_UNCHANGED, ACTION_DELETED) or a google.rpc.Status (for ACTION_FAILED).
59
53
  */
60
54
  data: BulkWorkspaceApplyResultData;
61
55
 
@@ -67,12 +61,11 @@ export interface BulkWorkspaceApplyResult {
67
61
  }
68
62
 
69
63
  /**
70
- * BulkWorkspaceApplyResultData carries the outcome for a single resource. The
71
- * `type` field is the discriminator string that names the populated `outcome`
72
- * oneof variant (e.g., "toolSet", "memoryEntry"). Every Outcome shell carries an
73
- * `action` enum and either a resulting resource snapshot (for ACTION_CREATED /
74
- * ACTION_UPDATED / ACTION_UNCHANGED / ACTION_DELETED) or a google.rpc.Status (for
75
- * ACTION_FAILED).
64
+ * Outcome for a single resource within a bulk apply. The `type` field is the
65
+ * discriminator string naming the populated `outcome` oneof variant (e.g.,
66
+ * "toolSet", "memoryEntry"). Every outcome shell carries an `action` enum and
67
+ * either a resulting resource snapshot (for ACTION_CREATED, ACTION_UPDATED,
68
+ * ACTION_UNCHANGED, ACTION_DELETED) or a google.rpc.Status (for ACTION_FAILED).
76
69
  */
77
70
  export interface BulkWorkspaceApplyResultData {
78
71
  agent?: BulkWorkspaceApplyResultDataAgentOutcome;
@@ -642,15 +635,14 @@ export interface BulkWorkspaceApplyResultDataVariationAssignmentOutcome {
642
635
  error?: BulkWorkspaceApplyResultDataVariationAssignmentOutcome.Error;
643
636
 
644
637
  /**
645
- * VariationAssignment is a read-only reference to a single tool, tool set, or
646
- * sub-agent attached to a variation. Clients read the full set of assignments via
638
+ * A read-only reference to a single tool, tool set, or sub-agent attached to a
639
+ * variation. Read the full set of assignments via
647
640
  * `AgentVariationInfo.assignments`; mutations go through the dedicated add/remove
648
- * assignment endpoints under
649
- * /v1/agents/{agent_id}/variations/{variation_id}/assignments.
641
+ * assignment endpoints.
650
642
  *
651
- * The `id` identifies the assignment row itself (not the referenced resource) and
652
- * is the handle used to remove the assignment. It is returned by the add endpoint
653
- * and present on every entry in AgentVariationInfo.assignments.
643
+ * The `id` identifies the assignment itself (not the referenced resource) and is
644
+ * the handle used to remove the assignment. It is returned by the add endpoint and
645
+ * present on every entry in `AgentVariationInfo.assignments`.
654
646
  */
655
647
  resource?: VariationsAPI.VariationAssignment;
656
648
  }
@@ -781,7 +773,12 @@ export namespace BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome {
781
773
 
782
774
  export interface ResultListParams extends CursorPaginationParams {
783
775
  /**
784
- * Filter by action.
776
+ * Path param: Workspace ID.
777
+ */
778
+ workspaceId: string;
779
+
780
+ /**
781
+ * Query param: Filter by action.
785
782
  */
786
783
  action?:
787
784
  | 'ACTION_UNSPECIFIED'
@@ -792,12 +789,12 @@ export interface ResultListParams extends CursorPaginationParams {
792
789
  | 'ACTION_FAILED';
793
790
 
794
791
  /**
795
- * Sort order for results (asc or desc by creation time)
792
+ * Query param: Sort order for results (asc or desc by creation time)
796
793
  */
797
794
  sortOrder?: string;
798
795
 
799
796
  /**
800
- * Filter by data.type discriminator (e.g., "toolSet", "memoryEntry").
797
+ * Query param: Filter by data.type discriminator (e.g., "toolSet", "memoryEntry").
801
798
  */
802
799
  type?: string;
803
800
  }
@@ -7,8 +7,11 @@ export {
7
7
  type APIKeyInfo,
8
8
  type APIKeySpec,
9
9
  type APIKeyCreateParams,
10
+ type APIKeyRetrieveParams,
10
11
  type APIKeyUpdateParams,
11
12
  type APIKeyListParams,
13
+ type APIKeyDeleteParams,
14
+ type APIKeyRotateParams,
12
15
  type APIKeysCursorPagination,
13
16
  } from './api-keys';
14
17
  export {
@@ -26,8 +29,10 @@ export {
26
29
  type AgentSpec,
27
30
  type Page,
28
31
  type AgentCreateParams,
32
+ type AgentRetrieveParams,
29
33
  type AgentUpdateParams,
30
34
  type AgentListParams,
35
+ type AgentDeleteParams,
31
36
  type AgentsCursorPagination,
32
37
  } from './agents/agents';
33
38
  export {
@@ -45,6 +50,7 @@ export {
45
50
  type ToolSetEntry,
46
51
  type VariationAssignmentEntry,
47
52
  type VariationMemoryLayerEntry,
53
+ type BulkWorkspaceResourceRetrieveParams,
48
54
  type BulkWorkspaceResourceListParams,
49
55
  type BulkWorkspaceResourceApplyParams,
50
56
  type BulkWorkspaceAppliesCursorPagination,
@@ -55,14 +61,17 @@ export {
55
61
  type MemoryLayerInfo,
56
62
  type MemoryLayerSpec,
57
63
  type MemoryLayerCreateParams,
64
+ type MemoryLayerRetrieveParams,
58
65
  type MemoryLayerUpdateParams,
59
66
  type MemoryLayerListParams,
67
+ type MemoryLayerDeleteParams,
60
68
  type MemoryLayersCursorPagination,
61
69
  } from './memory-layers/memory-layers';
62
70
  export {
63
71
  Models,
64
72
  type Model,
65
73
  type ModelSpec,
74
+ type ModelRetrieveParams,
66
75
  type ModelListParams,
67
76
  type ModelSetStatusParams,
68
77
  type ModelsCursorPagination,
@@ -98,6 +107,7 @@ export {
98
107
  type ObjectiveContinueResponse,
99
108
  type ObjectiveListEventsResponse,
100
109
  type ObjectiveCreateParams,
110
+ type ObjectiveRetrieveParams,
101
111
  type ObjectiveListParams,
102
112
  type ObjectiveCancelParams,
103
113
  type ObjectiveCompactParams,
@@ -128,13 +138,22 @@ export {
128
138
  type ToolSetInfo,
129
139
  type ToolSetSpec,
130
140
  type ToolSetCreateParams,
141
+ type ToolSetRetrieveParams,
131
142
  type ToolSetUpdateParams,
132
143
  type ToolSetListParams,
144
+ type ToolSetDeleteParams,
133
145
  type ToolSetListEventsParams,
134
146
  type ToolSetsCursorPagination,
135
147
  type ToolSetEventsCursorPagination,
136
148
  } from './tool-sets/tool-sets';
137
- export { Uploads, type Upload, type UploadInfo, type UploadSpec, type UploadCreateParams } from './uploads';
149
+ export {
150
+ Uploads,
151
+ type Upload,
152
+ type UploadInfo,
153
+ type UploadSpec,
154
+ type UploadCreateParams,
155
+ type UploadRetrieveParams,
156
+ } from './uploads';
138
157
  export { Webhooks, type UnsafeUnwrapWebhookEvent, type UnwrapWebhookEvent } from './webhooks';
139
158
  export {
140
159
  WorkspaceSecrets,
@@ -142,8 +161,10 @@ export {
142
161
  type WorkspaceSecretInfo,
143
162
  type WorkspaceSecretSpec,
144
163
  type WorkspaceSecretCreateParams,
164
+ type WorkspaceSecretRetrieveParams,
145
165
  type WorkspaceSecretUpdateParams,
146
166
  type WorkspaceSecretListParams,
167
+ type WorkspaceSecretDeleteParams,
147
168
  type WorkspaceSecretsCursorPagination,
148
169
  } from './workspace-secrets';
149
170
  export {
@@ -10,16 +10,10 @@ import { RequestOptions } from '../../internal/request-options';
10
10
  import { path } from '../../internal/utils/path';
11
11
 
12
12
  /**
13
- * MemoryService manages memory layers and their entries at the WORKSPACE level.
14
- * Layers are named containers that can be composed into an objective's memory
15
- * stack; entries are the keyed values within a layer.
16
- *
17
- * All operations are implicitly scoped to the workspace determined by the JWT
18
- * token. System-managed layers (e.g., episodic layers created by the runtime)
19
- * cannot be mutated through this API.
20
- *
21
- * Authentication: Bearer token (JWT)
22
- * Scope: Workspace-level operations
13
+ * Manage memory layers and their entries. Layers are named containers that can
14
+ * be composed into an objective's memory stack; entries are the keyed values
15
+ * within a layer. System-managed layers (e.g., episodic layers created by the
16
+ * runtime) cannot be mutated through this API.
23
17
  */
24
18
  export class Entries extends APIResource {
25
19
  /**
@@ -28,10 +22,14 @@ export class Entries extends APIResource {
28
22
  */
29
23
  create(
30
24
  memoryLayerID: string,
31
- body: EntryCreateParams,
25
+ params: EntryCreateParams,
32
26
  options?: RequestOptions,
33
27
  ): APIPromise<MemoryEntryDetail> {
34
- return this._client.post(path`/v1/memory_layers/${memoryLayerID}/entries`, { body, ...options });
28
+ const { workspaceId, ...body } = params;
29
+ return this._client.post(path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`, {
30
+ body,
31
+ ...options,
32
+ });
35
33
  }
36
34
 
37
35
  /**
@@ -39,8 +37,11 @@ export class Entries extends APIResource {
39
37
  * including the content body.
40
38
  */
41
39
  retrieve(id: string, params: EntryRetrieveParams, options?: RequestOptions): APIPromise<MemoryEntryDetail> {
42
- const { memoryLayerId } = params;
43
- return this._client.get(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, options);
40
+ const { workspaceId, memoryLayerId } = params;
41
+ return this._client.get(
42
+ path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
43
+ options,
44
+ );
44
45
  }
45
46
 
46
47
  /**
@@ -48,8 +49,11 @@ export class Entries extends APIResource {
48
49
  * resolved content body.
49
50
  */
50
51
  update(id: string, params: EntryUpdateParams, options?: RequestOptions): APIPromise<MemoryEntryDetail> {
51
- const { memoryLayerId, ...body } = params;
52
- return this._client.patch(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, { body, ...options });
52
+ const { workspaceId, memoryLayerId, ...body } = params;
53
+ return this._client.patch(
54
+ path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
55
+ { body, ...options },
56
+ );
53
57
  }
54
58
 
55
59
  /**
@@ -57,11 +61,12 @@ export class Entries extends APIResource {
57
61
  */
58
62
  list(
59
63
  memoryLayerID: string,
60
- query: EntryListParams | null | undefined = {},
64
+ params: EntryListParams,
61
65
  options?: RequestOptions,
62
66
  ): PagePromise<MemoryEntriesCursorPagination, MemoryEntry> {
67
+ const { workspaceId, ...query } = params;
63
68
  return this._client.getAPIList(
64
- path`/v1/memory_layers/${memoryLayerID}/entries`,
69
+ path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerID}/entries`,
65
70
  CursorPagination<MemoryEntry>,
66
71
  { query, ...options },
67
72
  );
@@ -71,11 +76,11 @@ export class Entries extends APIResource {
71
76
  * Deletes a memory entry from a memory layer
72
77
  */
73
78
  delete(id: string, params: EntryDeleteParams, options?: RequestOptions): APIPromise<void> {
74
- const { memoryLayerId } = params;
75
- return this._client.delete(path`/v1/memory_layers/${memoryLayerId}/entries/${id}`, {
76
- ...options,
77
- headers: buildHeaders([{ Accept: '*/*' }, options?.headers]),
78
- });
79
+ const { workspaceId, memoryLayerId } = params;
80
+ return this._client.delete(
81
+ path`/v1/workspaces/${workspaceId}/memory_layers/${memoryLayerId}/entries/${id}`,
82
+ { ...options, headers: buildHeaders([{ Accept: '*/*' }, options?.headers]) },
83
+ );
79
84
  }
80
85
  }
81
86
 
@@ -164,9 +169,9 @@ export interface MemoryEntryDetail {
164
169
 
165
170
  export interface MemoryEntryInfo {
166
171
  /**
167
- * Profile represents a human user at the account level. Profiles are
168
- * account-scoped resources that can be associated with multiple workspaces through
169
- * the Actor model. Authentication for profiles is handled via SSO/OAuth (WorkOS).
172
+ * A profile identifies a user or non-human principal (such as an API key) at the
173
+ * account level. Profiles are account-scoped and can be granted access to multiple
174
+ * workspaces.
170
175
  */
171
176
  createdBy?: AccountAPI.Profile;
172
177
 
@@ -229,32 +234,44 @@ export interface MemoryEntryUpdateSpec {
229
234
 
230
235
  export interface EntryCreateParams {
231
236
  /**
232
- * CreateResourceMetadata contains the user-provided fields for creating a
233
- * workspace-scoped resource. Read-only fields (id, account_id, workspace_id,
234
- * profile_id, created_at) are excluded since they are set by the server.
237
+ * Path param
238
+ */
239
+ workspaceId: string;
240
+
241
+ /**
242
+ * Body param: CreateResourceMetadata contains the user-provided fields for
243
+ * creating a workspace-scoped resource. Read-only fields (id, account_id,
244
+ * workspace_id, profile_id, created_at) are excluded since they are set by the
245
+ * server.
235
246
  */
236
247
  metadata: Shared.CreateResourceMetadata;
237
248
 
238
249
  /**
239
- * MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It accepts
240
- * either inline content or a reference to a completed Upload; exactly one of the
241
- * two must be set.
250
+ * Body param: MemoryEntryCreateSpec is the input shape for CreateMemoryEntry. It
251
+ * accepts either inline content or a reference to a completed Upload; exactly one
252
+ * of the two must be set.
242
253
  */
243
254
  spec: MemoryEntryCreateSpec;
244
255
  }
245
256
 
246
257
  export interface EntryRetrieveParams {
258
+ workspaceId: string;
259
+
247
260
  /**
248
- * Memory layer ID (from path). Accepts canonical memlyr\_… form or
249
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
261
+ * Memory layer ID. Accepts canonical memlyr\_… form or external_id:<value> form.
250
262
  */
251
263
  memoryLayerId: string;
252
264
  }
253
265
 
254
266
  export interface EntryUpdateParams {
255
267
  /**
256
- * Path param: Memory layer ID (from path). Accepts canonical memlyr\_… form or
257
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
268
+ * Path param
269
+ */
270
+ workspaceId: string;
271
+
272
+ /**
273
+ * Path param: Memory layer ID. Accepts canonical memlyr\_… form or
274
+ * external_id:<value> form.
258
275
  */
259
276
  memoryLayerId: string;
260
277
 
@@ -282,36 +299,42 @@ export interface EntryUpdateParams {
282
299
 
283
300
  export interface EntryListParams extends CursorPaginationParams {
284
301
  /**
285
- * Filter by bundle_key — return only resources owned by this bundle.
302
+ * Path param
303
+ */
304
+ workspaceId: string;
305
+
306
+ /**
307
+ * Query param: Filter by bundle_key — return only resources owned by this bundle.
286
308
  */
287
309
  bundleKey?: string;
288
310
 
289
311
  /**
290
- * When set to true you may use more of your alloted API rate-limit
312
+ * Query param: When set to true you may use more of your alloted API rate-limit
291
313
  */
292
314
  includeInfo?: boolean;
293
315
 
294
316
  /**
295
- * Filter by key prefix (e.g., "skills/postmortem/" to list all entries under that
296
- * hierarchy). Matches against the entry's key, not its name.
317
+ * Query param: Filter by key prefix (e.g., "skills/postmortem/" to list all
318
+ * entries under that hierarchy). Matches against the entry's key, not its name.
297
319
  */
298
320
  prefix?: string;
299
321
 
300
322
  /**
301
- * Free-form search query
323
+ * Query param: Free-form search query
302
324
  */
303
325
  query?: string;
304
326
 
305
327
  /**
306
- * Sort order for results (asc or desc by creation time)
328
+ * Query param: Sort order for results (asc or desc by creation time)
307
329
  */
308
330
  sortOrder?: string;
309
331
  }
310
332
 
311
333
  export interface EntryDeleteParams {
334
+ workspaceId: string;
335
+
312
336
  /**
313
- * Memory layer ID (from path). Accepts canonical memlyr\_… form or
314
- * external_id:<value> form (see common.proto "Path-parameter ID resolution").
337
+ * Memory layer ID. Accepts canonical memlyr\_… form or external_id:<value> form.
315
338
  */
316
339
  memoryLayerId: string;
317
340
  }
@@ -21,7 +21,9 @@ export {
21
21
  type MemoryLayerInfo,
22
22
  type MemoryLayerSpec,
23
23
  type MemoryLayerCreateParams,
24
+ type MemoryLayerRetrieveParams,
24
25
  type MemoryLayerUpdateParams,
25
26
  type MemoryLayerListParams,
27
+ type MemoryLayerDeleteParams,
26
28
  type MemoryLayersCursorPagination,
27
29
  } from './memory-layers';