@cadenya/cadenya 0.61.0 → 0.63.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 (66) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/client.d.mts +13 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +13 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +24 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +24 -0
  9. package/client.mjs.map +1 -1
  10. package/internal/types.d.mts +6 -6
  11. package/internal/types.d.mts.map +1 -1
  12. package/internal/types.d.ts +6 -6
  13. package/internal/types.d.ts.map +1 -1
  14. package/package.json +1 -1
  15. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +288 -0
  16. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -0
  17. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +288 -0
  18. package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -0
  19. package/resources/bulk-workspace-resources/bulk-workspace-resources.js +51 -0
  20. package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -0
  21. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +46 -0
  22. package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -0
  23. package/resources/bulk-workspace-resources/index.d.mts +3 -0
  24. package/resources/bulk-workspace-resources/index.d.mts.map +1 -0
  25. package/resources/bulk-workspace-resources/index.d.ts +3 -0
  26. package/resources/bulk-workspace-resources/index.d.ts.map +1 -0
  27. package/resources/bulk-workspace-resources/index.js +9 -0
  28. package/resources/bulk-workspace-resources/index.js.map +1 -0
  29. package/resources/bulk-workspace-resources/index.mjs +4 -0
  30. package/resources/bulk-workspace-resources/index.mjs.map +1 -0
  31. package/resources/bulk-workspace-resources/results.d.mts +638 -0
  32. package/resources/bulk-workspace-resources/results.d.mts.map +1 -0
  33. package/resources/bulk-workspace-resources/results.d.ts +638 -0
  34. package/resources/bulk-workspace-resources/results.d.ts.map +1 -0
  35. package/resources/bulk-workspace-resources/results.js +27 -0
  36. package/resources/bulk-workspace-resources/results.js.map +1 -0
  37. package/resources/bulk-workspace-resources/results.mjs +23 -0
  38. package/resources/bulk-workspace-resources/results.mjs.map +1 -0
  39. package/resources/bulk-workspace-resources.d.mts +2 -0
  40. package/resources/bulk-workspace-resources.d.mts.map +1 -0
  41. package/resources/bulk-workspace-resources.d.ts +2 -0
  42. package/resources/bulk-workspace-resources.d.ts.map +1 -0
  43. package/resources/bulk-workspace-resources.js +6 -0
  44. package/resources/bulk-workspace-resources.js.map +1 -0
  45. package/resources/bulk-workspace-resources.mjs +3 -0
  46. package/resources/bulk-workspace-resources.mjs.map +1 -0
  47. package/resources/index.d.mts +1 -0
  48. package/resources/index.d.mts.map +1 -1
  49. package/resources/index.d.ts +1 -0
  50. package/resources/index.d.ts.map +1 -1
  51. package/resources/index.js +3 -1
  52. package/resources/index.js.map +1 -1
  53. package/resources/index.mjs +1 -0
  54. package/resources/index.mjs.map +1 -1
  55. package/src/client.ts +63 -0
  56. package/src/internal/types.ts +6 -8
  57. package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +409 -0
  58. package/src/resources/bulk-workspace-resources/index.ts +37 -0
  59. package/src/resources/bulk-workspace-resources/results.ts +821 -0
  60. package/src/resources/bulk-workspace-resources.ts +3 -0
  61. package/src/resources/index.ts +19 -0
  62. package/src/version.ts +1 -1
  63. package/version.d.mts +1 -1
  64. package/version.d.ts +1 -1
  65. package/version.js +1 -1
  66. package/version.mjs +1 -1
@@ -0,0 +1,821 @@
1
+ // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
2
+
3
+ import { APIResource } from '../../core/resource';
4
+ import * as Shared from '../shared';
5
+ import * as AgentsAPI from '../agents/agents';
6
+ import * as SchedulesAPI from '../agents/schedules';
7
+ import * as VariationsAPI from '../agents/variations';
8
+ import * as EntriesAPI from '../memory-layers/entries';
9
+ import * as MemoryLayersAPI from '../memory-layers/memory-layers';
10
+ import * as ToolSetsAPI from '../tool-sets/tool-sets';
11
+ import * as ToolsAPI from '../tool-sets/tools';
12
+ import { CursorPagination, type CursorPaginationParams, PagePromise } from '../../core/pagination';
13
+ import { RequestOptions } from '../../internal/request-options';
14
+ import { path } from '../../internal/utils/path';
15
+
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
25
+ */
26
+ export class Results extends APIResource {
27
+ /**
28
+ * Lists each resource action recorded by a bulk workspace apply operation.
29
+ */
30
+ list(
31
+ bulkWorkspaceApplyID: string,
32
+ query: ResultListParams | null | undefined = {},
33
+ options?: RequestOptions,
34
+ ): PagePromise<BulkWorkspaceApplyResultsCursorPagination, BulkWorkspaceApplyResult> {
35
+ return this._client.getAPIList(
36
+ path`/v1/bulk_workspace_applies/${bulkWorkspaceApplyID}/results`,
37
+ CursorPagination<BulkWorkspaceApplyResult>,
38
+ { query, ...options },
39
+ );
40
+ }
41
+ }
42
+
43
+ export type BulkWorkspaceApplyResultsCursorPagination = CursorPagination<BulkWorkspaceApplyResult>;
44
+
45
+ /**
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.
50
+ */
51
+ export interface BulkWorkspaceApplyResult {
52
+ /**
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).
59
+ */
60
+ data: BulkWorkspaceApplyResultData;
61
+
62
+ /**
63
+ * Metadata for ephemeral operations and activities (e.g., objectives, executions,
64
+ * runs)
65
+ */
66
+ metadata: Shared.OperationMetadata;
67
+ }
68
+
69
+ /**
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).
76
+ */
77
+ export interface BulkWorkspaceApplyResultData {
78
+ agent?: BulkWorkspaceApplyResultDataAgentOutcome;
79
+
80
+ agentSchedule?: BulkWorkspaceApplyResultDataAgentScheduleOutcome;
81
+
82
+ agentVariation?: BulkWorkspaceApplyResultDataAgentVariationOutcome;
83
+
84
+ memoryEntry?: BulkWorkspaceApplyResultDataMemoryEntryOutcome;
85
+
86
+ memoryLayer?: BulkWorkspaceApplyResultDataMemoryLayerOutcome;
87
+
88
+ tool?: BulkWorkspaceApplyResultDataToolOutcome;
89
+
90
+ toolSet?: BulkWorkspaceApplyResultDataToolSetOutcome;
91
+
92
+ type?: string;
93
+
94
+ variationAssignment?: BulkWorkspaceApplyResultDataVariationAssignmentOutcome;
95
+
96
+ variationMemoryLayer?: BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome;
97
+ }
98
+
99
+ export interface BulkWorkspaceApplyResultDataAgentOutcome {
100
+ action?:
101
+ | 'ACTION_UNSPECIFIED'
102
+ | 'ACTION_CREATED'
103
+ | 'ACTION_UPDATED'
104
+ | 'ACTION_UNCHANGED'
105
+ | 'ACTION_DELETED'
106
+ | 'ACTION_FAILED';
107
+
108
+ /**
109
+ * The `Status` type defines a logical error model that is suitable for different
110
+ * programming environments, including REST APIs and RPC APIs. It is used by
111
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
112
+ * data: error code, error message, and error details. You can find out more about
113
+ * this error model and how to work with it in the
114
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
115
+ */
116
+ error?: BulkWorkspaceApplyResultDataAgentOutcome.Error;
117
+
118
+ externalId?: string;
119
+
120
+ /**
121
+ * Agent resource
122
+ */
123
+ resource?: AgentsAPI.Agent;
124
+ }
125
+
126
+ export namespace BulkWorkspaceApplyResultDataAgentOutcome {
127
+ /**
128
+ * The `Status` type defines a logical error model that is suitable for different
129
+ * programming environments, including REST APIs and RPC APIs. It is used by
130
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
131
+ * data: error code, error message, and error details. You can find out more about
132
+ * this error model and how to work with it in the
133
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
134
+ */
135
+ export interface Error {
136
+ /**
137
+ * The status code, which should be an enum value of
138
+ * [google.rpc.Code][google.rpc.Code].
139
+ */
140
+ code?: number;
141
+
142
+ /**
143
+ * A list of messages that carry the error details. There is a common set of
144
+ * message types for APIs to use.
145
+ */
146
+ details?: Array<Error.Detail>;
147
+
148
+ /**
149
+ * A developer-facing error message, which should be in English. Any user-facing
150
+ * error message should be localized and sent in the
151
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
152
+ * the client.
153
+ */
154
+ message?: string;
155
+ }
156
+
157
+ export namespace Error {
158
+ /**
159
+ * Contains an arbitrary serialized message along with a @type that describes the
160
+ * type of the serialized message.
161
+ */
162
+ export interface Detail {
163
+ /**
164
+ * The type of the serialized message.
165
+ */
166
+ '@type'?: string;
167
+
168
+ [k: string]: unknown;
169
+ }
170
+ }
171
+ }
172
+
173
+ export interface BulkWorkspaceApplyResultDataAgentScheduleOutcome {
174
+ action?:
175
+ | 'ACTION_UNSPECIFIED'
176
+ | 'ACTION_CREATED'
177
+ | 'ACTION_UPDATED'
178
+ | 'ACTION_UNCHANGED'
179
+ | 'ACTION_DELETED'
180
+ | 'ACTION_FAILED';
181
+
182
+ /**
183
+ * The `Status` type defines a logical error model that is suitable for different
184
+ * programming environments, including REST APIs and RPC APIs. It is used by
185
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
186
+ * data: error code, error message, and error details. You can find out more about
187
+ * this error model and how to work with it in the
188
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
189
+ */
190
+ error?: BulkWorkspaceApplyResultDataAgentScheduleOutcome.Error;
191
+
192
+ externalId?: string;
193
+
194
+ /**
195
+ * AgentSchedule resource — a recurring trigger attached to an agent that creates
196
+ * objectives on its cadence.
197
+ */
198
+ resource?: SchedulesAPI.AgentSchedule;
199
+ }
200
+
201
+ export namespace BulkWorkspaceApplyResultDataAgentScheduleOutcome {
202
+ /**
203
+ * The `Status` type defines a logical error model that is suitable for different
204
+ * programming environments, including REST APIs and RPC APIs. It is used by
205
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
206
+ * data: error code, error message, and error details. You can find out more about
207
+ * this error model and how to work with it in the
208
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
209
+ */
210
+ export interface Error {
211
+ /**
212
+ * The status code, which should be an enum value of
213
+ * [google.rpc.Code][google.rpc.Code].
214
+ */
215
+ code?: number;
216
+
217
+ /**
218
+ * A list of messages that carry the error details. There is a common set of
219
+ * message types for APIs to use.
220
+ */
221
+ details?: Array<Error.Detail>;
222
+
223
+ /**
224
+ * A developer-facing error message, which should be in English. Any user-facing
225
+ * error message should be localized and sent in the
226
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
227
+ * the client.
228
+ */
229
+ message?: string;
230
+ }
231
+
232
+ export namespace Error {
233
+ /**
234
+ * Contains an arbitrary serialized message along with a @type that describes the
235
+ * type of the serialized message.
236
+ */
237
+ export interface Detail {
238
+ /**
239
+ * The type of the serialized message.
240
+ */
241
+ '@type'?: string;
242
+
243
+ [k: string]: unknown;
244
+ }
245
+ }
246
+ }
247
+
248
+ export interface BulkWorkspaceApplyResultDataAgentVariationOutcome {
249
+ action?:
250
+ | 'ACTION_UNSPECIFIED'
251
+ | 'ACTION_CREATED'
252
+ | 'ACTION_UPDATED'
253
+ | 'ACTION_UNCHANGED'
254
+ | 'ACTION_DELETED'
255
+ | 'ACTION_FAILED';
256
+
257
+ /**
258
+ * The `Status` type defines a logical error model that is suitable for different
259
+ * programming environments, including REST APIs and RPC APIs. It is used by
260
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
261
+ * data: error code, error message, and error details. You can find out more about
262
+ * this error model and how to work with it in the
263
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
264
+ */
265
+ error?: BulkWorkspaceApplyResultDataAgentVariationOutcome.Error;
266
+
267
+ externalId?: string;
268
+
269
+ /**
270
+ * AgentVariation resource
271
+ */
272
+ resource?: VariationsAPI.AgentVariation;
273
+ }
274
+
275
+ export namespace BulkWorkspaceApplyResultDataAgentVariationOutcome {
276
+ /**
277
+ * The `Status` type defines a logical error model that is suitable for different
278
+ * programming environments, including REST APIs and RPC APIs. It is used by
279
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
280
+ * data: error code, error message, and error details. You can find out more about
281
+ * this error model and how to work with it in the
282
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
283
+ */
284
+ export interface Error {
285
+ /**
286
+ * The status code, which should be an enum value of
287
+ * [google.rpc.Code][google.rpc.Code].
288
+ */
289
+ code?: number;
290
+
291
+ /**
292
+ * A list of messages that carry the error details. There is a common set of
293
+ * message types for APIs to use.
294
+ */
295
+ details?: Array<Error.Detail>;
296
+
297
+ /**
298
+ * A developer-facing error message, which should be in English. Any user-facing
299
+ * error message should be localized and sent in the
300
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
301
+ * the client.
302
+ */
303
+ message?: string;
304
+ }
305
+
306
+ export namespace Error {
307
+ /**
308
+ * Contains an arbitrary serialized message along with a @type that describes the
309
+ * type of the serialized message.
310
+ */
311
+ export interface Detail {
312
+ /**
313
+ * The type of the serialized message.
314
+ */
315
+ '@type'?: string;
316
+
317
+ [k: string]: unknown;
318
+ }
319
+ }
320
+ }
321
+
322
+ export interface BulkWorkspaceApplyResultDataMemoryEntryOutcome {
323
+ action?:
324
+ | 'ACTION_UNSPECIFIED'
325
+ | 'ACTION_CREATED'
326
+ | 'ACTION_UPDATED'
327
+ | 'ACTION_UNCHANGED'
328
+ | 'ACTION_DELETED'
329
+ | 'ACTION_FAILED';
330
+
331
+ /**
332
+ * The `Status` type defines a logical error model that is suitable for different
333
+ * programming environments, including REST APIs and RPC APIs. It is used by
334
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
335
+ * data: error code, error message, and error details. You can find out more about
336
+ * this error model and how to work with it in the
337
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
338
+ */
339
+ error?: BulkWorkspaceApplyResultDataMemoryEntryOutcome.Error;
340
+
341
+ externalId?: string;
342
+
343
+ /**
344
+ * MemoryEntry is a single keyed value within a MemoryLayer. Entries are addressed
345
+ * by their key, which follows the S3 object key safe-character convention (see
346
+ * MemoryEntrySpec.key for the full rule). Keys are unique within a single layer;
347
+ * the same key may appear in multiple layers, in which case the LIFO stack-walk
348
+ * determines which one wins for a given objective.
349
+ *
350
+ * MemoryEntry is the summary shape, returned by ListMemoryEntries. It does not
351
+ * carry the entry body — callers that need the body must fetch the entry
352
+ * individually via GetMemoryEntry, which returns a MemoryEntryDetail.
353
+ */
354
+ resource?: EntriesAPI.MemoryEntry;
355
+ }
356
+
357
+ export namespace BulkWorkspaceApplyResultDataMemoryEntryOutcome {
358
+ /**
359
+ * The `Status` type defines a logical error model that is suitable for different
360
+ * programming environments, including REST APIs and RPC APIs. It is used by
361
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
362
+ * data: error code, error message, and error details. You can find out more about
363
+ * this error model and how to work with it in the
364
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
365
+ */
366
+ export interface Error {
367
+ /**
368
+ * The status code, which should be an enum value of
369
+ * [google.rpc.Code][google.rpc.Code].
370
+ */
371
+ code?: number;
372
+
373
+ /**
374
+ * A list of messages that carry the error details. There is a common set of
375
+ * message types for APIs to use.
376
+ */
377
+ details?: Array<Error.Detail>;
378
+
379
+ /**
380
+ * A developer-facing error message, which should be in English. Any user-facing
381
+ * error message should be localized and sent in the
382
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
383
+ * the client.
384
+ */
385
+ message?: string;
386
+ }
387
+
388
+ export namespace Error {
389
+ /**
390
+ * Contains an arbitrary serialized message along with a @type that describes the
391
+ * type of the serialized message.
392
+ */
393
+ export interface Detail {
394
+ /**
395
+ * The type of the serialized message.
396
+ */
397
+ '@type'?: string;
398
+
399
+ [k: string]: unknown;
400
+ }
401
+ }
402
+ }
403
+
404
+ export interface BulkWorkspaceApplyResultDataMemoryLayerOutcome {
405
+ action?:
406
+ | 'ACTION_UNSPECIFIED'
407
+ | 'ACTION_CREATED'
408
+ | 'ACTION_UPDATED'
409
+ | 'ACTION_UNCHANGED'
410
+ | 'ACTION_DELETED'
411
+ | 'ACTION_FAILED';
412
+
413
+ /**
414
+ * The `Status` type defines a logical error model that is suitable for different
415
+ * programming environments, including REST APIs and RPC APIs. It is used by
416
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
417
+ * data: error code, error message, and error details. You can find out more about
418
+ * this error model and how to work with it in the
419
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
420
+ */
421
+ error?: BulkWorkspaceApplyResultDataMemoryLayerOutcome.Error;
422
+
423
+ externalId?: string;
424
+
425
+ /**
426
+ * MemoryLayer is a named container of memory entries that can be composed into an
427
+ * objective's memory stack. Layers are workspace-scoped resources. The layer type
428
+ * controls how its entries participate in the agent loop — see MemoryLayerType for
429
+ * details.
430
+ *
431
+ * See "Memory stack composition" above for how layers compose at lookup time.
432
+ */
433
+ resource?: MemoryLayersAPI.MemoryLayer;
434
+ }
435
+
436
+ export namespace BulkWorkspaceApplyResultDataMemoryLayerOutcome {
437
+ /**
438
+ * The `Status` type defines a logical error model that is suitable for different
439
+ * programming environments, including REST APIs and RPC APIs. It is used by
440
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
441
+ * data: error code, error message, and error details. You can find out more about
442
+ * this error model and how to work with it in the
443
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
444
+ */
445
+ export interface Error {
446
+ /**
447
+ * The status code, which should be an enum value of
448
+ * [google.rpc.Code][google.rpc.Code].
449
+ */
450
+ code?: number;
451
+
452
+ /**
453
+ * A list of messages that carry the error details. There is a common set of
454
+ * message types for APIs to use.
455
+ */
456
+ details?: Array<Error.Detail>;
457
+
458
+ /**
459
+ * A developer-facing error message, which should be in English. Any user-facing
460
+ * error message should be localized and sent in the
461
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
462
+ * the client.
463
+ */
464
+ message?: string;
465
+ }
466
+
467
+ export namespace Error {
468
+ /**
469
+ * Contains an arbitrary serialized message along with a @type that describes the
470
+ * type of the serialized message.
471
+ */
472
+ export interface Detail {
473
+ /**
474
+ * The type of the serialized message.
475
+ */
476
+ '@type'?: string;
477
+
478
+ [k: string]: unknown;
479
+ }
480
+ }
481
+ }
482
+
483
+ export interface BulkWorkspaceApplyResultDataToolOutcome {
484
+ action?:
485
+ | 'ACTION_UNSPECIFIED'
486
+ | 'ACTION_CREATED'
487
+ | 'ACTION_UPDATED'
488
+ | 'ACTION_UNCHANGED'
489
+ | 'ACTION_DELETED'
490
+ | 'ACTION_FAILED';
491
+
492
+ /**
493
+ * The `Status` type defines a logical error model that is suitable for different
494
+ * programming environments, including REST APIs and RPC APIs. It is used by
495
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
496
+ * data: error code, error message, and error details. You can find out more about
497
+ * this error model and how to work with it in the
498
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
499
+ */
500
+ error?: BulkWorkspaceApplyResultDataToolOutcome.Error;
501
+
502
+ externalId?: string;
503
+
504
+ resource?: ToolsAPI.Tool;
505
+ }
506
+
507
+ export namespace BulkWorkspaceApplyResultDataToolOutcome {
508
+ /**
509
+ * The `Status` type defines a logical error model that is suitable for different
510
+ * programming environments, including REST APIs and RPC APIs. It is used by
511
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
512
+ * data: error code, error message, and error details. You can find out more about
513
+ * this error model and how to work with it in the
514
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
515
+ */
516
+ export interface Error {
517
+ /**
518
+ * The status code, which should be an enum value of
519
+ * [google.rpc.Code][google.rpc.Code].
520
+ */
521
+ code?: number;
522
+
523
+ /**
524
+ * A list of messages that carry the error details. There is a common set of
525
+ * message types for APIs to use.
526
+ */
527
+ details?: Array<Error.Detail>;
528
+
529
+ /**
530
+ * A developer-facing error message, which should be in English. Any user-facing
531
+ * error message should be localized and sent in the
532
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
533
+ * the client.
534
+ */
535
+ message?: string;
536
+ }
537
+
538
+ export namespace Error {
539
+ /**
540
+ * Contains an arbitrary serialized message along with a @type that describes the
541
+ * type of the serialized message.
542
+ */
543
+ export interface Detail {
544
+ /**
545
+ * The type of the serialized message.
546
+ */
547
+ '@type'?: string;
548
+
549
+ [k: string]: unknown;
550
+ }
551
+ }
552
+ }
553
+
554
+ export interface BulkWorkspaceApplyResultDataToolSetOutcome {
555
+ action?:
556
+ | 'ACTION_UNSPECIFIED'
557
+ | 'ACTION_CREATED'
558
+ | 'ACTION_UPDATED'
559
+ | 'ACTION_UNCHANGED'
560
+ | 'ACTION_DELETED'
561
+ | 'ACTION_FAILED';
562
+
563
+ /**
564
+ * The `Status` type defines a logical error model that is suitable for different
565
+ * programming environments, including REST APIs and RPC APIs. It is used by
566
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
567
+ * data: error code, error message, and error details. You can find out more about
568
+ * this error model and how to work with it in the
569
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
570
+ */
571
+ error?: BulkWorkspaceApplyResultDataToolSetOutcome.Error;
572
+
573
+ externalId?: string;
574
+
575
+ resource?: ToolSetsAPI.ToolSet;
576
+ }
577
+
578
+ export namespace BulkWorkspaceApplyResultDataToolSetOutcome {
579
+ /**
580
+ * The `Status` type defines a logical error model that is suitable for different
581
+ * programming environments, including REST APIs and RPC APIs. It is used by
582
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
583
+ * data: error code, error message, and error details. You can find out more about
584
+ * this error model and how to work with it in the
585
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
586
+ */
587
+ export interface Error {
588
+ /**
589
+ * The status code, which should be an enum value of
590
+ * [google.rpc.Code][google.rpc.Code].
591
+ */
592
+ code?: number;
593
+
594
+ /**
595
+ * A list of messages that carry the error details. There is a common set of
596
+ * message types for APIs to use.
597
+ */
598
+ details?: Array<Error.Detail>;
599
+
600
+ /**
601
+ * A developer-facing error message, which should be in English. Any user-facing
602
+ * error message should be localized and sent in the
603
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
604
+ * the client.
605
+ */
606
+ message?: string;
607
+ }
608
+
609
+ export namespace Error {
610
+ /**
611
+ * Contains an arbitrary serialized message along with a @type that describes the
612
+ * type of the serialized message.
613
+ */
614
+ export interface Detail {
615
+ /**
616
+ * The type of the serialized message.
617
+ */
618
+ '@type'?: string;
619
+
620
+ [k: string]: unknown;
621
+ }
622
+ }
623
+ }
624
+
625
+ export interface BulkWorkspaceApplyResultDataVariationAssignmentOutcome {
626
+ action?:
627
+ | 'ACTION_UNSPECIFIED'
628
+ | 'ACTION_CREATED'
629
+ | 'ACTION_UPDATED'
630
+ | 'ACTION_UNCHANGED'
631
+ | 'ACTION_DELETED'
632
+ | 'ACTION_FAILED';
633
+
634
+ /**
635
+ * The `Status` type defines a logical error model that is suitable for different
636
+ * programming environments, including REST APIs and RPC APIs. It is used by
637
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
638
+ * data: error code, error message, and error details. You can find out more about
639
+ * this error model and how to work with it in the
640
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
641
+ */
642
+ error?: BulkWorkspaceApplyResultDataVariationAssignmentOutcome.Error;
643
+
644
+ /**
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
647
+ * `AgentVariationInfo.assignments`; mutations go through the dedicated add/remove
648
+ * assignment endpoints under
649
+ * /v1/agents/{agent_id}/variations/{variation_id}/assignments.
650
+ *
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.
654
+ */
655
+ resource?: VariationsAPI.VariationAssignment;
656
+ }
657
+
658
+ export namespace BulkWorkspaceApplyResultDataVariationAssignmentOutcome {
659
+ /**
660
+ * The `Status` type defines a logical error model that is suitable for different
661
+ * programming environments, including REST APIs and RPC APIs. It is used by
662
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
663
+ * data: error code, error message, and error details. You can find out more about
664
+ * this error model and how to work with it in the
665
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
666
+ */
667
+ export interface Error {
668
+ /**
669
+ * The status code, which should be an enum value of
670
+ * [google.rpc.Code][google.rpc.Code].
671
+ */
672
+ code?: number;
673
+
674
+ /**
675
+ * A list of messages that carry the error details. There is a common set of
676
+ * message types for APIs to use.
677
+ */
678
+ details?: Array<Error.Detail>;
679
+
680
+ /**
681
+ * A developer-facing error message, which should be in English. Any user-facing
682
+ * error message should be localized and sent in the
683
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
684
+ * the client.
685
+ */
686
+ message?: string;
687
+ }
688
+
689
+ export namespace Error {
690
+ /**
691
+ * Contains an arbitrary serialized message along with a @type that describes the
692
+ * type of the serialized message.
693
+ */
694
+ export interface Detail {
695
+ /**
696
+ * The type of the serialized message.
697
+ */
698
+ '@type'?: string;
699
+
700
+ [k: string]: unknown;
701
+ }
702
+ }
703
+ }
704
+
705
+ export interface BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome {
706
+ action?:
707
+ | 'ACTION_UNSPECIFIED'
708
+ | 'ACTION_CREATED'
709
+ | 'ACTION_UPDATED'
710
+ | 'ACTION_UNCHANGED'
711
+ | 'ACTION_DELETED'
712
+ | 'ACTION_FAILED';
713
+
714
+ /**
715
+ * The `Status` type defines a logical error model that is suitable for different
716
+ * programming environments, including REST APIs and RPC APIs. It is used by
717
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
718
+ * data: error code, error message, and error details. You can find out more about
719
+ * this error model and how to work with it in the
720
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
721
+ */
722
+ error?: BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome.Error;
723
+
724
+ /**
725
+ * VariationMemoryLayerAssignment attaches a single MemoryLayer to a variation at a
726
+ * given position in the variation's baseline memory stack. A variation has at most
727
+ * one assignment per memory_layer_id.
728
+ *
729
+ * Variations only support whole-layer attachments — entry pinning is an
730
+ * objective-level capability.
731
+ */
732
+ resource?: VariationsAPI.VariationMemoryLayerAssignment;
733
+ }
734
+
735
+ export namespace BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome {
736
+ /**
737
+ * The `Status` type defines a logical error model that is suitable for different
738
+ * programming environments, including REST APIs and RPC APIs. It is used by
739
+ * [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of
740
+ * data: error code, error message, and error details. You can find out more about
741
+ * this error model and how to work with it in the
742
+ * [API Design Guide](https://cloud.google.com/apis/design/errors).
743
+ */
744
+ export interface Error {
745
+ /**
746
+ * The status code, which should be an enum value of
747
+ * [google.rpc.Code][google.rpc.Code].
748
+ */
749
+ code?: number;
750
+
751
+ /**
752
+ * A list of messages that carry the error details. There is a common set of
753
+ * message types for APIs to use.
754
+ */
755
+ details?: Array<Error.Detail>;
756
+
757
+ /**
758
+ * A developer-facing error message, which should be in English. Any user-facing
759
+ * error message should be localized and sent in the
760
+ * [google.rpc.Status.details][google.rpc.Status.details] field, or localized by
761
+ * the client.
762
+ */
763
+ message?: string;
764
+ }
765
+
766
+ export namespace Error {
767
+ /**
768
+ * Contains an arbitrary serialized message along with a @type that describes the
769
+ * type of the serialized message.
770
+ */
771
+ export interface Detail {
772
+ /**
773
+ * The type of the serialized message.
774
+ */
775
+ '@type'?: string;
776
+
777
+ [k: string]: unknown;
778
+ }
779
+ }
780
+ }
781
+
782
+ export interface ResultListParams extends CursorPaginationParams {
783
+ /**
784
+ * Filter by action.
785
+ */
786
+ action?:
787
+ | 'ACTION_UNSPECIFIED'
788
+ | 'ACTION_CREATED'
789
+ | 'ACTION_UPDATED'
790
+ | 'ACTION_UNCHANGED'
791
+ | 'ACTION_DELETED'
792
+ | 'ACTION_FAILED';
793
+
794
+ /**
795
+ * Sort order for results (asc or desc by creation time)
796
+ */
797
+ sortOrder?: string;
798
+
799
+ /**
800
+ * Filter by data.type discriminator (e.g., "toolSet", "memoryEntry").
801
+ */
802
+ type?: string;
803
+ }
804
+
805
+ export declare namespace Results {
806
+ export {
807
+ type BulkWorkspaceApplyResult as BulkWorkspaceApplyResult,
808
+ type BulkWorkspaceApplyResultData as BulkWorkspaceApplyResultData,
809
+ type BulkWorkspaceApplyResultDataAgentOutcome as BulkWorkspaceApplyResultDataAgentOutcome,
810
+ type BulkWorkspaceApplyResultDataAgentScheduleOutcome as BulkWorkspaceApplyResultDataAgentScheduleOutcome,
811
+ type BulkWorkspaceApplyResultDataAgentVariationOutcome as BulkWorkspaceApplyResultDataAgentVariationOutcome,
812
+ type BulkWorkspaceApplyResultDataMemoryEntryOutcome as BulkWorkspaceApplyResultDataMemoryEntryOutcome,
813
+ type BulkWorkspaceApplyResultDataMemoryLayerOutcome as BulkWorkspaceApplyResultDataMemoryLayerOutcome,
814
+ type BulkWorkspaceApplyResultDataToolOutcome as BulkWorkspaceApplyResultDataToolOutcome,
815
+ type BulkWorkspaceApplyResultDataToolSetOutcome as BulkWorkspaceApplyResultDataToolSetOutcome,
816
+ type BulkWorkspaceApplyResultDataVariationAssignmentOutcome as BulkWorkspaceApplyResultDataVariationAssignmentOutcome,
817
+ type BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome as BulkWorkspaceApplyResultDataVariationMemoryLayerOutcome,
818
+ type BulkWorkspaceApplyResultsCursorPagination as BulkWorkspaceApplyResultsCursorPagination,
819
+ type ResultListParams as ResultListParams,
820
+ };
821
+ }