@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.
- package/CHANGELOG.md +16 -0
- package/README.md +2 -2
- package/client.d.mts +42 -81
- package/client.d.mts.map +1 -1
- package/client.d.ts +42 -81
- package/client.d.ts.map +1 -1
- package/client.js +24 -63
- package/client.js.map +1 -1
- package/client.mjs +24 -63
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/account.d.mts +18 -22
- package/resources/account.d.mts.map +1 -1
- package/resources/account.d.ts +18 -22
- package/resources/account.d.ts.map +1 -1
- package/resources/account.js +2 -6
- package/resources/account.js.map +1 -1
- package/resources/account.mjs +2 -6
- package/resources/account.mjs.map +1 -1
- package/resources/agents/agents.d.mts +34 -21
- package/resources/agents/agents.d.mts.map +1 -1
- package/resources/agents/agents.d.ts +34 -21
- package/resources/agents/agents.d.ts.map +1 -1
- package/resources/agents/agents.js +17 -16
- package/resources/agents/agents.js.map +1 -1
- package/resources/agents/agents.mjs +17 -16
- package/resources/agents/agents.mjs.map +1 -1
- package/resources/agents/feedback.d.mts +15 -15
- package/resources/agents/feedback.d.mts.map +1 -1
- package/resources/agents/feedback.d.ts +15 -15
- package/resources/agents/feedback.d.ts.map +1 -1
- package/resources/agents/feedback.js +4 -8
- package/resources/agents/feedback.js.map +1 -1
- package/resources/agents/feedback.mjs +4 -8
- package/resources/agents/feedback.mjs.map +1 -1
- package/resources/agents/index.d.mts +1 -1
- package/resources/agents/index.d.mts.map +1 -1
- package/resources/agents/index.d.ts +1 -1
- package/resources/agents/index.d.ts.map +1 -1
- package/resources/agents/index.js.map +1 -1
- package/resources/agents/index.mjs.map +1 -1
- package/resources/agents/schedules.d.mts +44 -26
- package/resources/agents/schedules.d.mts.map +1 -1
- package/resources/agents/schedules.d.ts +44 -26
- package/resources/agents/schedules.d.ts.map +1 -1
- package/resources/agents/schedules.js +20 -19
- package/resources/agents/schedules.js.map +1 -1
- package/resources/agents/schedules.mjs +20 -19
- package/resources/agents/schedules.mjs.map +1 -1
- package/resources/agents/variations.d.mts +88 -43
- package/resources/agents/variations.d.mts.map +1 -1
- package/resources/agents/variations.d.ts +88 -43
- package/resources/agents/variations.d.ts.map +1 -1
- package/resources/agents/variations.js +31 -32
- package/resources/agents/variations.js.map +1 -1
- package/resources/agents/variations.mjs +31 -32
- package/resources/agents/variations.mjs.map +1 -1
- package/resources/agents/webhook-deliveries.d.mts +10 -11
- package/resources/agents/webhook-deliveries.d.mts.map +1 -1
- package/resources/agents/webhook-deliveries.d.ts +10 -11
- package/resources/agents/webhook-deliveries.d.ts.map +1 -1
- package/resources/agents/webhook-deliveries.js +4 -8
- package/resources/agents/webhook-deliveries.js.map +1 -1
- package/resources/agents/webhook-deliveries.mjs +4 -8
- package/resources/agents/webhook-deliveries.mjs.map +1 -1
- package/resources/api-keys.d.mts +48 -28
- package/resources/api-keys.d.mts.map +1 -1
- package/resources/api-keys.d.ts +48 -28
- package/resources/api-keys.d.ts.map +1 -1
- package/resources/api-keys.js +21 -17
- package/resources/api-keys.js.map +1 -1
- package/resources/api-keys.mjs +21 -17
- package/resources/api-keys.mjs.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts +20 -21
- package/resources/bulk-workspace-resources/bulk-workspace-resources.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.js.map +1 -1
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs +13 -17
- package/resources/bulk-workspace-resources/bulk-workspace-resources.mjs.map +1 -1
- package/resources/bulk-workspace-resources/index.d.mts +1 -1
- package/resources/bulk-workspace-resources/index.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/index.d.ts +1 -1
- package/resources/bulk-workspace-resources/index.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/index.js.map +1 -1
- package/resources/bulk-workspace-resources/index.mjs.map +1 -1
- package/resources/bulk-workspace-resources/results.d.mts +30 -35
- package/resources/bulk-workspace-resources/results.d.mts.map +1 -1
- package/resources/bulk-workspace-resources/results.d.ts +30 -35
- package/resources/bulk-workspace-resources/results.d.ts.map +1 -1
- package/resources/bulk-workspace-resources/results.js +6 -10
- package/resources/bulk-workspace-resources/results.js.map +1 -1
- package/resources/bulk-workspace-resources/results.mjs +6 -10
- package/resources/bulk-workspace-resources/results.mjs.map +1 -1
- package/resources/index.d.mts +9 -9
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +9 -9
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/memory-layers/entries.d.mts +40 -33
- package/resources/memory-layers/entries.d.mts.map +1 -1
- package/resources/memory-layers/entries.d.ts +40 -33
- package/resources/memory-layers/entries.d.ts.map +1 -1
- package/resources/memory-layers/entries.js +19 -23
- package/resources/memory-layers/entries.js.map +1 -1
- package/resources/memory-layers/entries.mjs +19 -23
- package/resources/memory-layers/entries.mjs.map +1 -1
- package/resources/memory-layers/index.d.mts +1 -1
- package/resources/memory-layers/index.d.mts.map +1 -1
- package/resources/memory-layers/index.d.ts +1 -1
- package/resources/memory-layers/index.d.ts.map +1 -1
- package/resources/memory-layers/index.js.map +1 -1
- package/resources/memory-layers/index.mjs.map +1 -1
- package/resources/memory-layers/memory-layers.d.mts +33 -22
- package/resources/memory-layers/memory-layers.d.mts.map +1 -1
- package/resources/memory-layers/memory-layers.d.ts +33 -22
- package/resources/memory-layers/memory-layers.d.ts.map +1 -1
- package/resources/memory-layers/memory-layers.js +17 -20
- package/resources/memory-layers/memory-layers.js.map +1 -1
- package/resources/memory-layers/memory-layers.mjs +17 -20
- package/resources/memory-layers/memory-layers.mjs.map +1 -1
- package/resources/models.d.mts +18 -12
- package/resources/models.d.mts.map +1 -1
- package/resources/models.d.ts +18 -12
- package/resources/models.d.ts.map +1 -1
- package/resources/models.js +14 -13
- package/resources/models.js.map +1 -1
- package/resources/models.mjs +14 -13
- package/resources/models.mjs.map +1 -1
- package/resources/objectives/feedback.d.mts +19 -8
- package/resources/objectives/feedback.d.mts.map +1 -1
- package/resources/objectives/feedback.d.ts +19 -8
- package/resources/objectives/feedback.d.ts.map +1 -1
- package/resources/objectives/feedback.js +9 -4
- package/resources/objectives/feedback.js.map +1 -1
- package/resources/objectives/feedback.mjs +9 -4
- package/resources/objectives/feedback.mjs.map +1 -1
- package/resources/objectives/index.d.mts +1 -1
- package/resources/objectives/index.d.mts.map +1 -1
- package/resources/objectives/index.d.ts +1 -1
- package/resources/objectives/index.d.ts.map +1 -1
- package/resources/objectives/index.js.map +1 -1
- package/resources/objectives/index.mjs.map +1 -1
- package/resources/objectives/objectives.d.mts +63 -44
- package/resources/objectives/objectives.d.mts.map +1 -1
- package/resources/objectives/objectives.d.ts +63 -44
- package/resources/objectives/objectives.d.ts.map +1 -1
- package/resources/objectives/objectives.js +31 -16
- package/resources/objectives/objectives.js.map +1 -1
- package/resources/objectives/objectives.mjs +31 -16
- package/resources/objectives/objectives.mjs.map +1 -1
- package/resources/objectives/tasks.d.mts +7 -2
- package/resources/objectives/tasks.d.mts.map +1 -1
- package/resources/objectives/tasks.d.ts +7 -2
- package/resources/objectives/tasks.d.ts.map +1 -1
- package/resources/objectives/tasks.js +5 -4
- package/resources/objectives/tasks.js.map +1 -1
- package/resources/objectives/tasks.mjs +5 -4
- package/resources/objectives/tasks.mjs.map +1 -1
- package/resources/objectives/tool-calls.d.mts +18 -9
- package/resources/objectives/tool-calls.d.mts.map +1 -1
- package/resources/objectives/tool-calls.d.ts +18 -9
- package/resources/objectives/tool-calls.d.ts.map +1 -1
- package/resources/objectives/tool-calls.js +7 -12
- package/resources/objectives/tool-calls.js.map +1 -1
- package/resources/objectives/tool-calls.mjs +7 -12
- package/resources/objectives/tool-calls.mjs.map +1 -1
- package/resources/objectives/tools.d.mts +5 -1
- package/resources/objectives/tools.d.mts.map +1 -1
- package/resources/objectives/tools.d.ts +5 -1
- package/resources/objectives/tools.d.ts.map +1 -1
- package/resources/objectives/tools.js +3 -2
- package/resources/objectives/tools.js.map +1 -1
- package/resources/objectives/tools.mjs +3 -2
- package/resources/objectives/tools.mjs.map +1 -1
- package/resources/search.d.mts +1 -1
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +1 -1
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tool-sets/index.d.mts +1 -1
- package/resources/tool-sets/index.d.mts.map +1 -1
- package/resources/tool-sets/index.d.ts +1 -1
- package/resources/tool-sets/index.d.ts.map +1 -1
- package/resources/tool-sets/index.js.map +1 -1
- package/resources/tool-sets/index.mjs.map +1 -1
- package/resources/tool-sets/tool-sets.d.mts +66 -43
- package/resources/tool-sets/tool-sets.d.mts.map +1 -1
- package/resources/tool-sets/tool-sets.d.ts +66 -43
- package/resources/tool-sets/tool-sets.d.ts.map +1 -1
- package/resources/tool-sets/tool-sets.js +23 -23
- package/resources/tool-sets/tool-sets.js.map +1 -1
- package/resources/tool-sets/tool-sets.mjs +23 -23
- package/resources/tool-sets/tool-sets.mjs.map +1 -1
- package/resources/tool-sets/tools.d.mts +50 -31
- package/resources/tool-sets/tools.d.mts.map +1 -1
- package/resources/tool-sets/tools.d.ts +50 -31
- package/resources/tool-sets/tools.d.ts.map +1 -1
- package/resources/tool-sets/tools.js +22 -21
- package/resources/tool-sets/tools.js.map +1 -1
- package/resources/tool-sets/tools.mjs +22 -21
- package/resources/tool-sets/tools.mjs.map +1 -1
- package/resources/uploads.d.mts +21 -19
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +21 -19
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -11
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -11
- package/resources/uploads.mjs.map +1 -1
- package/resources/workspace-secrets.d.mts +33 -13
- package/resources/workspace-secrets.d.mts.map +1 -1
- package/resources/workspace-secrets.d.ts +33 -13
- package/resources/workspace-secrets.d.ts.map +1 -1
- package/resources/workspace-secrets.js +16 -13
- package/resources/workspace-secrets.js.map +1 -1
- package/resources/workspace-secrets.mjs +16 -13
- package/resources/workspace-secrets.mjs.map +1 -1
- package/resources/workspaces.d.mts +2 -6
- package/resources/workspaces.d.mts.map +1 -1
- package/resources/workspaces.d.ts +2 -6
- package/resources/workspaces.d.ts.map +1 -1
- package/resources/workspaces.js +2 -6
- package/resources/workspaces.js.map +1 -1
- package/resources/workspaces.mjs +2 -6
- package/resources/workspaces.mjs.map +1 -1
- package/src/client.ts +54 -63
- package/src/resources/account.ts +18 -22
- package/src/resources/agents/agents.ts +49 -24
- package/src/resources/agents/feedback.ts +18 -16
- package/src/resources/agents/index.ts +2 -0
- package/src/resources/agents/schedules.ts +69 -37
- package/src/resources/agents/variations.ts +141 -73
- package/src/resources/agents/webhook-deliveries.ts +13 -12
- package/src/resources/api-keys.ts +67 -32
- package/src/resources/bulk-workspace-resources/bulk-workspace-resources.ts +40 -25
- package/src/resources/bulk-workspace-resources/index.ts +1 -0
- package/src/resources/bulk-workspace-resources/results.ts +33 -36
- package/src/resources/index.ts +22 -1
- package/src/resources/memory-layers/entries.ts +67 -44
- package/src/resources/memory-layers/index.ts +2 -0
- package/src/resources/memory-layers/memory-layers.ts +53 -25
- package/src/resources/models.ts +28 -13
- package/src/resources/objectives/feedback.ts +29 -11
- package/src/resources/objectives/index.ts +1 -0
- package/src/resources/objectives/objectives.ts +100 -50
- package/src/resources/objectives/tasks.ts +16 -5
- package/src/resources/objectives/tool-calls.ts +33 -20
- package/src/resources/objectives/tools.ts +9 -3
- package/src/resources/search.ts +6 -1
- package/src/resources/tool-sets/index.ts +2 -0
- package/src/resources/tool-sets/tool-sets.ts +88 -50
- package/src/resources/tool-sets/tools.ts +75 -42
- package/src/resources/uploads.ts +25 -20
- package/src/resources/workspace-secrets.ts +60 -19
- package/src/resources/workspaces.ts +2 -6
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- 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
|
-
*
|
|
36
|
-
*
|
|
37
|
-
*
|
|
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(
|
|
51
|
-
|
|
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(
|
|
62
|
-
|
|
63
|
-
|
|
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(
|
|
72
|
-
|
|
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
|
|
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
|
-
*
|
|
135
|
-
*
|
|
136
|
-
*
|
|
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
|
-
*
|
|
203
|
-
* account-scoped
|
|
204
|
-
*
|
|
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
|
-
*
|
|
18
|
-
*
|
|
19
|
-
*
|
|
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
|
-
|
|
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
|
-
*
|
|
47
|
-
*
|
|
48
|
-
*
|
|
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
|
-
*
|
|
54
|
-
*
|
|
55
|
-
*
|
|
56
|
-
*
|
|
57
|
-
*
|
|
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
|
-
*
|
|
71
|
-
*
|
|
72
|
-
*
|
|
73
|
-
*
|
|
74
|
-
*
|
|
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
|
-
*
|
|
646
|
-
*
|
|
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
|
|
649
|
-
* /v1/agents/{agent_id}/variations/{variation_id}/assignments.
|
|
641
|
+
* assignment endpoints.
|
|
650
642
|
*
|
|
651
|
-
* The `id` identifies the assignment
|
|
652
|
-
*
|
|
653
|
-
*
|
|
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
|
-
*
|
|
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
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -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 {
|
|
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
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
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
|
-
|
|
25
|
+
params: EntryCreateParams,
|
|
32
26
|
options?: RequestOptions,
|
|
33
27
|
): APIPromise<MemoryEntryDetail> {
|
|
34
|
-
|
|
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(
|
|
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(
|
|
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
|
-
|
|
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(
|
|
76
|
-
|
|
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
|
-
*
|
|
168
|
-
* account-scoped
|
|
169
|
-
*
|
|
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
|
-
*
|
|
233
|
-
|
|
234
|
-
|
|
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
|
|
240
|
-
* either inline content or a reference to a completed Upload; exactly one
|
|
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
|
|
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
|
|
257
|
-
|
|
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
|
-
*
|
|
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
|
|
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
|
|
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';
|