@asteroidai/cli 1.9.99 → 1.9.103
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/dist/asteroid.js +133 -2
- package/dist/core.js +132 -1
- package/package.json +1 -1
package/dist/asteroid.js
CHANGED
|
@@ -25,6 +25,61 @@ var COMMANDS = [
|
|
|
25
25
|
readOnly: false,
|
|
26
26
|
destructive: true
|
|
27
27
|
},
|
|
28
|
+
{
|
|
29
|
+
command: "batch create",
|
|
30
|
+
tool: "execution_batch_create",
|
|
31
|
+
title: "Create execution batch",
|
|
32
|
+
description: 'Queue one execution per row of `items` for `workflowId`, starting at `startAt` (ISO 8601; now or earlier starts at once). `config` paces the runs: `{type: "maxConcurrent", maxConcurrent}` or `{type: "timeBatching", batchSize, batchInterval}` (seconds). Each item takes `inputs` (see `workflow_version_inputs_get`), optional `profileId` or `profileGroupId`, `metadata`, and `workflowVersionId` to pin a version. Check the same body first with `execution_batch_validate`. Returns the batch; follow it with `execution_batch_get`, and its runs with `executions_list` filtered by `batchId`.',
|
|
33
|
+
method: "POST",
|
|
34
|
+
path: "/agents/v2/execution-batches",
|
|
35
|
+
args: [],
|
|
36
|
+
query: [],
|
|
37
|
+
binary: false,
|
|
38
|
+
readOnly: false,
|
|
39
|
+
destructive: false,
|
|
40
|
+
body: {
|
|
41
|
+
required: true,
|
|
42
|
+
contentType: "application/json",
|
|
43
|
+
fields: [
|
|
44
|
+
{
|
|
45
|
+
name: "workflowId",
|
|
46
|
+
flag: "workflow-id",
|
|
47
|
+
type: "string",
|
|
48
|
+
required: false,
|
|
49
|
+
description: "Workflow ID for this batch. Set this or agentId."
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
name: "name",
|
|
53
|
+
flag: "name",
|
|
54
|
+
type: "string",
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
name: "startAt",
|
|
59
|
+
flag: "start-at",
|
|
60
|
+
type: "string",
|
|
61
|
+
required: true,
|
|
62
|
+
description: "When to start triggering executions"
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
name: "config",
|
|
66
|
+
flag: "config",
|
|
67
|
+
type: "json",
|
|
68
|
+
required: true,
|
|
69
|
+
description: "Discriminated union of batch configuration types (discriminated by type)"
|
|
70
|
+
},
|
|
71
|
+
{
|
|
72
|
+
name: "items",
|
|
73
|
+
flag: "items",
|
|
74
|
+
type: "json",
|
|
75
|
+
required: true
|
|
76
|
+
}
|
|
77
|
+
],
|
|
78
|
+
files: [],
|
|
79
|
+
credentialOrganization: false
|
|
80
|
+
},
|
|
81
|
+
capability: "run_execution"
|
|
82
|
+
},
|
|
28
83
|
{
|
|
29
84
|
command: "batch get",
|
|
30
85
|
tool: "execution_batch_get",
|
|
@@ -127,6 +182,60 @@ var COMMANDS = [
|
|
|
127
182
|
destructive: false,
|
|
128
183
|
capability: "run_execution"
|
|
129
184
|
},
|
|
185
|
+
{
|
|
186
|
+
command: "batch validate",
|
|
187
|
+
tool: "execution_batch_validate",
|
|
188
|
+
title: "Validate execution batch",
|
|
189
|
+
description: "Check an `execution_batch_create` body without creating anything. Returns `valid`, `itemCount`, and `issues`: each row (by its 0-based `index` in `items`) whose inputs would fail the input schema of the version it runs. A problem with the whole batch, such as an empty `items` or a bad `config`, returns the same error create would.",
|
|
190
|
+
method: "POST",
|
|
191
|
+
path: "/agents/v2/execution-batches/validate",
|
|
192
|
+
args: [],
|
|
193
|
+
query: [],
|
|
194
|
+
binary: false,
|
|
195
|
+
readOnly: true,
|
|
196
|
+
destructive: false,
|
|
197
|
+
body: {
|
|
198
|
+
required: true,
|
|
199
|
+
contentType: "application/json",
|
|
200
|
+
fields: [
|
|
201
|
+
{
|
|
202
|
+
name: "workflowId",
|
|
203
|
+
flag: "workflow-id",
|
|
204
|
+
type: "string",
|
|
205
|
+
required: false,
|
|
206
|
+
description: "Workflow ID for this batch. Set this or agentId."
|
|
207
|
+
},
|
|
208
|
+
{
|
|
209
|
+
name: "name",
|
|
210
|
+
flag: "name",
|
|
211
|
+
type: "string",
|
|
212
|
+
required: true
|
|
213
|
+
},
|
|
214
|
+
{
|
|
215
|
+
name: "startAt",
|
|
216
|
+
flag: "start-at",
|
|
217
|
+
type: "string",
|
|
218
|
+
required: true,
|
|
219
|
+
description: "When to start triggering executions"
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
name: "config",
|
|
223
|
+
flag: "config",
|
|
224
|
+
type: "json",
|
|
225
|
+
required: true,
|
|
226
|
+
description: "Discriminated union of batch configuration types (discriminated by type)"
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
name: "items",
|
|
230
|
+
flag: "items",
|
|
231
|
+
type: "json",
|
|
232
|
+
required: true
|
|
233
|
+
}
|
|
234
|
+
],
|
|
235
|
+
files: [],
|
|
236
|
+
credentialOrganization: false
|
|
237
|
+
}
|
|
238
|
+
},
|
|
130
239
|
{
|
|
131
240
|
command: "context",
|
|
132
241
|
tool: "get_context",
|
|
@@ -1336,6 +1445,13 @@ var COMMANDS = [
|
|
|
1336
1445
|
type: "string[]",
|
|
1337
1446
|
required: false,
|
|
1338
1447
|
description: "Filter by login profile IDs (can specify multiple, there is an 'OR' condition applied to these)"
|
|
1448
|
+
},
|
|
1449
|
+
{
|
|
1450
|
+
name: "batchId",
|
|
1451
|
+
flag: "batch-id",
|
|
1452
|
+
type: "string",
|
|
1453
|
+
required: false,
|
|
1454
|
+
description: "Only executions started by this batch, an ID from `execution_batches_list`. Rows not yet triggered have no execution yet: list them with `scheduled_executions_list` and `batchId`."
|
|
1339
1455
|
}
|
|
1340
1456
|
],
|
|
1341
1457
|
binary: false,
|
|
@@ -1610,6 +1726,13 @@ var COMMANDS = [
|
|
|
1610
1726
|
type: "string[]",
|
|
1611
1727
|
required: false,
|
|
1612
1728
|
description: "Filter by login profile IDs (can specify multiple, there is an 'OR' condition applied to these)"
|
|
1729
|
+
},
|
|
1730
|
+
{
|
|
1731
|
+
name: "batchId",
|
|
1732
|
+
flag: "batch-id",
|
|
1733
|
+
type: "string",
|
|
1734
|
+
required: false,
|
|
1735
|
+
description: "Only executions started by this batch, an ID from `execution_batches_list`. Rows not yet triggered have no execution yet: list them with `scheduled_executions_list` and `batchId`."
|
|
1613
1736
|
}
|
|
1614
1737
|
],
|
|
1615
1738
|
binary: false,
|
|
@@ -6680,7 +6803,7 @@ var ApiError = class extends Error {
|
|
|
6680
6803
|
status;
|
|
6681
6804
|
body;
|
|
6682
6805
|
};
|
|
6683
|
-
var VERSION = "1.9.
|
|
6806
|
+
var VERSION = "1.9.103";
|
|
6684
6807
|
function problem(status, body, fallback) {
|
|
6685
6808
|
if (body && typeof body === "object") {
|
|
6686
6809
|
const record2 = body;
|
|
@@ -7811,6 +7934,8 @@ async function entryBytes(sync, workflowId, tree, entry) {
|
|
|
7811
7934
|
if (entry.contentBase64 !== void 0)
|
|
7812
7935
|
return Buffer.from(entry.contentBase64, "base64");
|
|
7813
7936
|
if (entry.content !== void 0) return Buffer.from(entry.content, "utf8");
|
|
7937
|
+
if (entry.storageObjectKey && sync.remote.object)
|
|
7938
|
+
return sync.remote.object(entry.storageObjectKey);
|
|
7814
7939
|
if (!entry.fileId) return void 0;
|
|
7815
7940
|
return agentFileBytes(sync, workflowId, tree, entry);
|
|
7816
7941
|
}
|
|
@@ -7939,6 +8064,9 @@ async function pullWorkflow(sync, options) {
|
|
|
7939
8064
|
...variants !== void 0 && { variants },
|
|
7940
8065
|
...options.maxFileBytes !== void 0 && {
|
|
7941
8066
|
maxFileBytes: options.maxFileBytes
|
|
8067
|
+
},
|
|
8068
|
+
...options.maxTotalBytes !== void 0 && {
|
|
8069
|
+
maxTotalBytes: options.maxTotalBytes
|
|
7942
8070
|
}
|
|
7943
8071
|
});
|
|
7944
8072
|
}
|
|
@@ -8043,6 +8171,8 @@ function headRequest(manifest) {
|
|
|
8043
8171
|
request.query.set("variants", manifest.variants);
|
|
8044
8172
|
if (manifest.maxFileBytes !== void 0)
|
|
8045
8173
|
request.query.set("maxFileBytes", String(manifest.maxFileBytes));
|
|
8174
|
+
if (manifest.maxTotalBytes !== void 0)
|
|
8175
|
+
request.query.set("maxTotalBytes", String(manifest.maxTotalBytes));
|
|
8046
8176
|
return request;
|
|
8047
8177
|
}
|
|
8048
8178
|
async function refresh2(sync, dir, manifest, pushed) {
|
|
@@ -8074,7 +8204,8 @@ async function rebase(sync, dir, manifest) {
|
|
|
8074
8204
|
request: headRequest(manifest),
|
|
8075
8205
|
dir,
|
|
8076
8206
|
keepEdits: true,
|
|
8077
|
-
maxFileBytes: manifest.maxFileBytes
|
|
8207
|
+
maxFileBytes: manifest.maxFileBytes,
|
|
8208
|
+
maxTotalBytes: manifest.maxTotalBytes
|
|
8078
8209
|
});
|
|
8079
8210
|
return readManifest(sync, dir);
|
|
8080
8211
|
}
|
package/dist/core.js
CHANGED
|
@@ -46,6 +46,61 @@ var COMMANDS = [
|
|
|
46
46
|
readOnly: false,
|
|
47
47
|
destructive: true
|
|
48
48
|
},
|
|
49
|
+
{
|
|
50
|
+
command: "batch create",
|
|
51
|
+
tool: "execution_batch_create",
|
|
52
|
+
title: "Create execution batch",
|
|
53
|
+
description: 'Queue one execution per row of `items` for `workflowId`, starting at `startAt` (ISO 8601; now or earlier starts at once). `config` paces the runs: `{type: "maxConcurrent", maxConcurrent}` or `{type: "timeBatching", batchSize, batchInterval}` (seconds). Each item takes `inputs` (see `workflow_version_inputs_get`), optional `profileId` or `profileGroupId`, `metadata`, and `workflowVersionId` to pin a version. Check the same body first with `execution_batch_validate`. Returns the batch; follow it with `execution_batch_get`, and its runs with `executions_list` filtered by `batchId`.',
|
|
54
|
+
method: "POST",
|
|
55
|
+
path: "/agents/v2/execution-batches",
|
|
56
|
+
args: [],
|
|
57
|
+
query: [],
|
|
58
|
+
binary: false,
|
|
59
|
+
readOnly: false,
|
|
60
|
+
destructive: false,
|
|
61
|
+
body: {
|
|
62
|
+
required: true,
|
|
63
|
+
contentType: "application/json",
|
|
64
|
+
fields: [
|
|
65
|
+
{
|
|
66
|
+
name: "workflowId",
|
|
67
|
+
flag: "workflow-id",
|
|
68
|
+
type: "string",
|
|
69
|
+
required: false,
|
|
70
|
+
description: "Workflow ID for this batch. Set this or agentId."
|
|
71
|
+
},
|
|
72
|
+
{
|
|
73
|
+
name: "name",
|
|
74
|
+
flag: "name",
|
|
75
|
+
type: "string",
|
|
76
|
+
required: true
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
name: "startAt",
|
|
80
|
+
flag: "start-at",
|
|
81
|
+
type: "string",
|
|
82
|
+
required: true,
|
|
83
|
+
description: "When to start triggering executions"
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
name: "config",
|
|
87
|
+
flag: "config",
|
|
88
|
+
type: "json",
|
|
89
|
+
required: true,
|
|
90
|
+
description: "Discriminated union of batch configuration types (discriminated by type)"
|
|
91
|
+
},
|
|
92
|
+
{
|
|
93
|
+
name: "items",
|
|
94
|
+
flag: "items",
|
|
95
|
+
type: "json",
|
|
96
|
+
required: true
|
|
97
|
+
}
|
|
98
|
+
],
|
|
99
|
+
files: [],
|
|
100
|
+
credentialOrganization: false
|
|
101
|
+
},
|
|
102
|
+
capability: "run_execution"
|
|
103
|
+
},
|
|
49
104
|
{
|
|
50
105
|
command: "batch get",
|
|
51
106
|
tool: "execution_batch_get",
|
|
@@ -148,6 +203,60 @@ var COMMANDS = [
|
|
|
148
203
|
destructive: false,
|
|
149
204
|
capability: "run_execution"
|
|
150
205
|
},
|
|
206
|
+
{
|
|
207
|
+
command: "batch validate",
|
|
208
|
+
tool: "execution_batch_validate",
|
|
209
|
+
title: "Validate execution batch",
|
|
210
|
+
description: "Check an `execution_batch_create` body without creating anything. Returns `valid`, `itemCount`, and `issues`: each row (by its 0-based `index` in `items`) whose inputs would fail the input schema of the version it runs. A problem with the whole batch, such as an empty `items` or a bad `config`, returns the same error create would.",
|
|
211
|
+
method: "POST",
|
|
212
|
+
path: "/agents/v2/execution-batches/validate",
|
|
213
|
+
args: [],
|
|
214
|
+
query: [],
|
|
215
|
+
binary: false,
|
|
216
|
+
readOnly: true,
|
|
217
|
+
destructive: false,
|
|
218
|
+
body: {
|
|
219
|
+
required: true,
|
|
220
|
+
contentType: "application/json",
|
|
221
|
+
fields: [
|
|
222
|
+
{
|
|
223
|
+
name: "workflowId",
|
|
224
|
+
flag: "workflow-id",
|
|
225
|
+
type: "string",
|
|
226
|
+
required: false,
|
|
227
|
+
description: "Workflow ID for this batch. Set this or agentId."
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
name: "name",
|
|
231
|
+
flag: "name",
|
|
232
|
+
type: "string",
|
|
233
|
+
required: true
|
|
234
|
+
},
|
|
235
|
+
{
|
|
236
|
+
name: "startAt",
|
|
237
|
+
flag: "start-at",
|
|
238
|
+
type: "string",
|
|
239
|
+
required: true,
|
|
240
|
+
description: "When to start triggering executions"
|
|
241
|
+
},
|
|
242
|
+
{
|
|
243
|
+
name: "config",
|
|
244
|
+
flag: "config",
|
|
245
|
+
type: "json",
|
|
246
|
+
required: true,
|
|
247
|
+
description: "Discriminated union of batch configuration types (discriminated by type)"
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
name: "items",
|
|
251
|
+
flag: "items",
|
|
252
|
+
type: "json",
|
|
253
|
+
required: true
|
|
254
|
+
}
|
|
255
|
+
],
|
|
256
|
+
files: [],
|
|
257
|
+
credentialOrganization: false
|
|
258
|
+
}
|
|
259
|
+
},
|
|
151
260
|
{
|
|
152
261
|
command: "context",
|
|
153
262
|
tool: "get_context",
|
|
@@ -1357,6 +1466,13 @@ var COMMANDS = [
|
|
|
1357
1466
|
type: "string[]",
|
|
1358
1467
|
required: false,
|
|
1359
1468
|
description: "Filter by login profile IDs (can specify multiple, there is an 'OR' condition applied to these)"
|
|
1469
|
+
},
|
|
1470
|
+
{
|
|
1471
|
+
name: "batchId",
|
|
1472
|
+
flag: "batch-id",
|
|
1473
|
+
type: "string",
|
|
1474
|
+
required: false,
|
|
1475
|
+
description: "Only executions started by this batch, an ID from `execution_batches_list`. Rows not yet triggered have no execution yet: list them with `scheduled_executions_list` and `batchId`."
|
|
1360
1476
|
}
|
|
1361
1477
|
],
|
|
1362
1478
|
binary: false,
|
|
@@ -1631,6 +1747,13 @@ var COMMANDS = [
|
|
|
1631
1747
|
type: "string[]",
|
|
1632
1748
|
required: false,
|
|
1633
1749
|
description: "Filter by login profile IDs (can specify multiple, there is an 'OR' condition applied to these)"
|
|
1750
|
+
},
|
|
1751
|
+
{
|
|
1752
|
+
name: "batchId",
|
|
1753
|
+
flag: "batch-id",
|
|
1754
|
+
type: "string",
|
|
1755
|
+
required: false,
|
|
1756
|
+
description: "Only executions started by this batch, an ID from `execution_batches_list`. Rows not yet triggered have no execution yet: list them with `scheduled_executions_list` and `batchId`."
|
|
1634
1757
|
}
|
|
1635
1758
|
],
|
|
1636
1759
|
binary: false,
|
|
@@ -6809,6 +6932,8 @@ async function entryBytes(sync, workflowId, tree, entry) {
|
|
|
6809
6932
|
if (entry.contentBase64 !== void 0)
|
|
6810
6933
|
return Buffer.from(entry.contentBase64, "base64");
|
|
6811
6934
|
if (entry.content !== void 0) return Buffer.from(entry.content, "utf8");
|
|
6935
|
+
if (entry.storageObjectKey && sync.remote.object)
|
|
6936
|
+
return sync.remote.object(entry.storageObjectKey);
|
|
6812
6937
|
if (!entry.fileId) return void 0;
|
|
6813
6938
|
return agentFileBytes(sync, workflowId, tree, entry);
|
|
6814
6939
|
}
|
|
@@ -6937,6 +7062,9 @@ async function pullWorkflow(sync, options) {
|
|
|
6937
7062
|
...variants !== void 0 && { variants },
|
|
6938
7063
|
...options.maxFileBytes !== void 0 && {
|
|
6939
7064
|
maxFileBytes: options.maxFileBytes
|
|
7065
|
+
},
|
|
7066
|
+
...options.maxTotalBytes !== void 0 && {
|
|
7067
|
+
maxTotalBytes: options.maxTotalBytes
|
|
6940
7068
|
}
|
|
6941
7069
|
});
|
|
6942
7070
|
}
|
|
@@ -7041,6 +7169,8 @@ function headRequest(manifest) {
|
|
|
7041
7169
|
request.query.set("variants", manifest.variants);
|
|
7042
7170
|
if (manifest.maxFileBytes !== void 0)
|
|
7043
7171
|
request.query.set("maxFileBytes", String(manifest.maxFileBytes));
|
|
7172
|
+
if (manifest.maxTotalBytes !== void 0)
|
|
7173
|
+
request.query.set("maxTotalBytes", String(manifest.maxTotalBytes));
|
|
7044
7174
|
return request;
|
|
7045
7175
|
}
|
|
7046
7176
|
async function refresh(sync, dir, manifest, pushed) {
|
|
@@ -7072,7 +7202,8 @@ async function rebase(sync, dir, manifest) {
|
|
|
7072
7202
|
request: headRequest(manifest),
|
|
7073
7203
|
dir,
|
|
7074
7204
|
keepEdits: true,
|
|
7075
|
-
maxFileBytes: manifest.maxFileBytes
|
|
7205
|
+
maxFileBytes: manifest.maxFileBytes,
|
|
7206
|
+
maxTotalBytes: manifest.maxTotalBytes
|
|
7076
7207
|
});
|
|
7077
7208
|
return readManifest(sync, dir);
|
|
7078
7209
|
}
|