@fulldivevr/workcord-cli 1.2.1 → 1.6.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/README.md +75 -19
- package/dist/cli.js +7 -1
- package/dist/client.js +8 -1
- package/dist/commands/agent-skills.js +127 -0
- package/dist/commands/agent.js +191 -0
- package/dist/commands/custom-agents.js +3 -3
- package/dist/commands/hermes.js +12 -7
- package/dist/commands/messages.js +150 -4
- package/dist/commands/reflections.js +96 -0
- package/dist/commands/rooms.js +7 -3
- package/dist/generated/commands/agent-feedback-admin.js +69 -0
- package/dist/generated/commands/ai.js +31 -0
- package/dist/generated/commands/call-recordings.js +119 -0
- package/dist/generated/commands/contact-match.js +20 -1
- package/dist/generated/commands/credit-packs.js +112 -0
- package/dist/generated/commands/custom-agents.js +483 -1
- package/dist/generated/commands/desktop-releases.js +2 -2
- package/dist/generated/commands/edge-sizecheck.js +25 -0
- package/dist/generated/commands/feed.js +6 -0
- package/dist/generated/commands/interactive-events.js +47 -0
- package/dist/generated/commands/internal.js +205 -0
- package/dist/generated/commands/meetings.js +12 -0
- package/dist/generated/commands/messages.js +30 -0
- package/dist/generated/commands/my-feedback.js +18 -0
- package/dist/generated/commands/pinned-messages.js +6 -0
- package/dist/generated/commands/proxy-nodes.js +83 -0
- package/dist/generated/commands/push.js +20 -0
- package/dist/generated/commands/reviews.js +96 -0
- package/dist/generated/commands/room-agents.js +243 -1
- package/dist/generated/commands/room-invites.js +12 -0
- package/dist/generated/commands/rooms.js +79 -1
- package/dist/generated/commands/search.js +1 -1
- package/dist/generated/commands/shadow-dispatch-push.js +20 -0
- package/dist/generated/commands/shadow-reflections.js +111 -0
- package/dist/generated/index.js +22 -0
- package/dist/hermes-guards.js +1 -1
- package/dist/http.js +6 -2
- package/dist/room-types.js +10 -0
- package/package.json +2 -2
- package/dist/generated/commands/health.js +0 -29
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { call } from "../../client.js";
|
|
2
|
+
import { actingUserId } from "../../auth.js";
|
|
3
|
+
import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
|
|
4
|
+
export function register(program) {
|
|
5
|
+
const group = getOrCreateGroup(program, "credit-packs", "CreditPacks operations");
|
|
6
|
+
if (!hasSubcommand(group, "list")) {
|
|
7
|
+
group
|
|
8
|
+
.command("list")
|
|
9
|
+
.description("GET /api/v1/credit-packs")
|
|
10
|
+
.action(async (opts) => {
|
|
11
|
+
const as = actingUserId(program);
|
|
12
|
+
const path = `/api/v1/credit-packs`;
|
|
13
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
14
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
15
|
+
});
|
|
16
|
+
}
|
|
17
|
+
if (!hasSubcommand(group, "verify-apple")) {
|
|
18
|
+
group
|
|
19
|
+
.command("verify-apple")
|
|
20
|
+
.description("POST /api/v1/credit-packs/apple/verify")
|
|
21
|
+
.requiredOption("--signed-transaction-jws <value>", "string")
|
|
22
|
+
.action(async (opts) => {
|
|
23
|
+
const as = actingUserId(program);
|
|
24
|
+
const path = `/api/v1/credit-packs/apple/verify`;
|
|
25
|
+
const body = {};
|
|
26
|
+
{
|
|
27
|
+
const v = opts.signedTransactionJws;
|
|
28
|
+
if (v !== undefined)
|
|
29
|
+
body["signedTransactionJws"] = v;
|
|
30
|
+
}
|
|
31
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
32
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
if (!hasSubcommand(group, "verify-google")) {
|
|
36
|
+
group
|
|
37
|
+
.command("verify-google")
|
|
38
|
+
.description("POST /api/v1/credit-packs/google/verify")
|
|
39
|
+
.requiredOption("--purchase-token <value>", "string")
|
|
40
|
+
.requiredOption("--product-id <value>", "string")
|
|
41
|
+
.action(async (opts) => {
|
|
42
|
+
const as = actingUserId(program);
|
|
43
|
+
const path = `/api/v1/credit-packs/google/verify`;
|
|
44
|
+
const body = {};
|
|
45
|
+
{
|
|
46
|
+
const v = opts.purchaseToken;
|
|
47
|
+
if (v !== undefined)
|
|
48
|
+
body["purchaseToken"] = v;
|
|
49
|
+
}
|
|
50
|
+
{
|
|
51
|
+
const v = opts.productId;
|
|
52
|
+
if (v !== undefined)
|
|
53
|
+
body["productId"] = v;
|
|
54
|
+
}
|
|
55
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
56
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (!hasSubcommand(group, "create-stripe-checkout")) {
|
|
60
|
+
group
|
|
61
|
+
.command("create-stripe-checkout")
|
|
62
|
+
.description("POST /api/v1/credit-packs/stripe/checkout-session")
|
|
63
|
+
.requiredOption("--product-id <value>", "string")
|
|
64
|
+
.action(async (opts) => {
|
|
65
|
+
const as = actingUserId(program);
|
|
66
|
+
const path = `/api/v1/credit-packs/stripe/checkout-session`;
|
|
67
|
+
const body = {};
|
|
68
|
+
{
|
|
69
|
+
const v = opts.productId;
|
|
70
|
+
if (v !== undefined)
|
|
71
|
+
body["productId"] = v;
|
|
72
|
+
}
|
|
73
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
74
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
if (!hasSubcommand(group, "stripe-purchase")) {
|
|
78
|
+
group
|
|
79
|
+
.command("stripe-purchase")
|
|
80
|
+
.description("GET /api/v1/credit-packs/stripe/purchase/{sessionId}")
|
|
81
|
+
.requiredOption("--session-id <value>", "sessionId (path param)")
|
|
82
|
+
.action(async (opts) => {
|
|
83
|
+
const as = actingUserId(program);
|
|
84
|
+
const path = `/api/v1/credit-packs/stripe/purchase/${encodeURIComponent(opts.sessionId)}`;
|
|
85
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
86
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
if (!hasSubcommand(group, "success-page")) {
|
|
90
|
+
group
|
|
91
|
+
.command("success-page")
|
|
92
|
+
.description("GET /api/v1/credit-packs/success")
|
|
93
|
+
.action(async (opts) => {
|
|
94
|
+
const as = actingUserId(program);
|
|
95
|
+
const path = `/api/v1/credit-packs/success`;
|
|
96
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
97
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
if (!hasSubcommand(group, "cancel-page")) {
|
|
101
|
+
group
|
|
102
|
+
.command("cancel-page")
|
|
103
|
+
.description("GET /api/v1/credit-packs/cancel")
|
|
104
|
+
.action(async (opts) => {
|
|
105
|
+
const as = actingUserId(program);
|
|
106
|
+
const path = `/api/v1/credit-packs/cancel`;
|
|
107
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
108
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
//# sourceMappingURL=credit-packs.js.map
|
|
@@ -2,7 +2,7 @@ import { call } from "../../client.js";
|
|
|
2
2
|
import { actingUserId } from "../../auth.js";
|
|
3
3
|
import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
|
|
4
4
|
export function register(program) {
|
|
5
|
-
const group = getOrCreateGroup(program, "custom-agents", "
|
|
5
|
+
const group = getOrCreateGroup(program, "custom-agents", "Agents operations");
|
|
6
6
|
if (!hasSubcommand(group, "create")) {
|
|
7
7
|
group
|
|
8
8
|
.command("create")
|
|
@@ -93,6 +93,36 @@ export function register(program) {
|
|
|
93
93
|
process.stdout.write(JSON.stringify(data) + "\n");
|
|
94
94
|
});
|
|
95
95
|
}
|
|
96
|
+
if (!hasSubcommand(group, "voices")) {
|
|
97
|
+
group
|
|
98
|
+
.command("voices")
|
|
99
|
+
.description("GET /api/v1/agents/voices")
|
|
100
|
+
.action(async (opts) => {
|
|
101
|
+
const as = actingUserId(program);
|
|
102
|
+
const path = `/api/v1/agents/voices`;
|
|
103
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
104
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
105
|
+
});
|
|
106
|
+
}
|
|
107
|
+
if (!hasSubcommand(group, "voice-sample")) {
|
|
108
|
+
group
|
|
109
|
+
.command("voice-sample")
|
|
110
|
+
.description("GET /api/v1/agents/voices/{voiceName}/sample.wav")
|
|
111
|
+
.requiredOption("--voice-name <value>", "voiceName (path param)")
|
|
112
|
+
.option("--speed <value>", "string")
|
|
113
|
+
.action(async (opts) => {
|
|
114
|
+
const as = actingUserId(program);
|
|
115
|
+
const path = `/api/v1/agents/voices/${encodeURIComponent(opts.voiceName)}/sample.wav`;
|
|
116
|
+
const query = {};
|
|
117
|
+
{
|
|
118
|
+
const v = opts.speed;
|
|
119
|
+
if (v !== undefined)
|
|
120
|
+
query["speed"] = v;
|
|
121
|
+
}
|
|
122
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
123
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
124
|
+
});
|
|
125
|
+
}
|
|
96
126
|
if (!hasSubcommand(group, "marketplace")) {
|
|
97
127
|
group
|
|
98
128
|
.command("marketplace")
|
|
@@ -141,6 +171,415 @@ export function register(program) {
|
|
|
141
171
|
process.stdout.write(JSON.stringify(data) + "\n");
|
|
142
172
|
});
|
|
143
173
|
}
|
|
174
|
+
if (!hasSubcommand(group, "list-agent-files")) {
|
|
175
|
+
group
|
|
176
|
+
.command("list-agent-files")
|
|
177
|
+
.description("GET /api/v1/agents/{id}/files")
|
|
178
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
179
|
+
.option("--path <json>", " (JSON)")
|
|
180
|
+
.action(async (opts) => {
|
|
181
|
+
const as = actingUserId(program);
|
|
182
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/files`;
|
|
183
|
+
const query = {};
|
|
184
|
+
{
|
|
185
|
+
const v = opts.path === undefined ? undefined : JSON.parse(opts.path);
|
|
186
|
+
if (v !== undefined)
|
|
187
|
+
query["path"] = v;
|
|
188
|
+
}
|
|
189
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
190
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
if (!hasSubcommand(group, "list-agent-skills")) {
|
|
194
|
+
group
|
|
195
|
+
.command("list-agent-skills")
|
|
196
|
+
.description("GET /api/v1/agents/{id}/skills")
|
|
197
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
198
|
+
.action(async (opts) => {
|
|
199
|
+
const as = actingUserId(program);
|
|
200
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skills`;
|
|
201
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
202
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
203
|
+
});
|
|
204
|
+
}
|
|
205
|
+
if (!hasSubcommand(group, "install-agent-skill")) {
|
|
206
|
+
group
|
|
207
|
+
.command("install-agent-skill")
|
|
208
|
+
.description("PUT /api/v1/agents/{id}/skills/{skillId}/market")
|
|
209
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
210
|
+
.requiredOption("--skill-id <value>", "skillId (path param)")
|
|
211
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
212
|
+
.action(async (opts) => {
|
|
213
|
+
const as = actingUserId(program);
|
|
214
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skills/${encodeURIComponent(opts.skillId)}/market`;
|
|
215
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
216
|
+
const data = await call({ method: "PUT", path, asUserId: as, body });
|
|
217
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
218
|
+
});
|
|
219
|
+
}
|
|
220
|
+
if (!hasSubcommand(group, "remove-agent-skill")) {
|
|
221
|
+
group
|
|
222
|
+
.command("remove-agent-skill")
|
|
223
|
+
.description("DELETE /api/v1/agents/{id}/skills/{skillId}/market")
|
|
224
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
225
|
+
.requiredOption("--skill-id <value>", "skillId (path param)")
|
|
226
|
+
.action(async (opts) => {
|
|
227
|
+
const as = actingUserId(program);
|
|
228
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skills/${encodeURIComponent(opts.skillId)}/market`;
|
|
229
|
+
const data = await call({ method: "DELETE", path, asUserId: as });
|
|
230
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
231
|
+
});
|
|
232
|
+
}
|
|
233
|
+
if (!hasSubcommand(group, "set-agent-skill-state")) {
|
|
234
|
+
group
|
|
235
|
+
.command("set-agent-skill-state")
|
|
236
|
+
.description("PUT /api/v1/agents/{id}/skills/{skillName}/state")
|
|
237
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
238
|
+
.requiredOption("--skill-name <value>", "skillName (path param)")
|
|
239
|
+
.requiredOption("--enabled <true|false>", "boolean")
|
|
240
|
+
.action(async (opts) => {
|
|
241
|
+
const as = actingUserId(program);
|
|
242
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skills/${encodeURIComponent(opts.skillName)}/state`;
|
|
243
|
+
const body = {};
|
|
244
|
+
{
|
|
245
|
+
const v = opts.enabled === undefined ? undefined : opts.enabled === "true";
|
|
246
|
+
if (v !== undefined)
|
|
247
|
+
body["enabled"] = v;
|
|
248
|
+
}
|
|
249
|
+
const data = await call({ method: "PUT", path, asUserId: as, body });
|
|
250
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
251
|
+
});
|
|
252
|
+
}
|
|
253
|
+
if (!hasSubcommand(group, "list-agent-skill-files")) {
|
|
254
|
+
group
|
|
255
|
+
.command("list-agent-skill-files")
|
|
256
|
+
.description("GET /api/v1/agents/{id}/skills/{category}/{skill}/files")
|
|
257
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
258
|
+
.requiredOption("--category <value>", "category (path param)")
|
|
259
|
+
.requiredOption("--skill <value>", "skill (path param)")
|
|
260
|
+
.action(async (opts) => {
|
|
261
|
+
const as = actingUserId(program);
|
|
262
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skills/${encodeURIComponent(opts.category)}/${encodeURIComponent(opts.skill)}/files`;
|
|
263
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
264
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
265
|
+
});
|
|
266
|
+
}
|
|
267
|
+
if (!hasSubcommand(group, "get-agent-skill-file")) {
|
|
268
|
+
group
|
|
269
|
+
.command("get-agent-skill-file")
|
|
270
|
+
.description("GET /api/v1/agents/{id}/skill-files/{path}")
|
|
271
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
272
|
+
.action(async (opts) => {
|
|
273
|
+
const as = actingUserId(program);
|
|
274
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/skill-files/${encodeURIComponent(opts.path)}`;
|
|
275
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
276
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
277
|
+
});
|
|
278
|
+
}
|
|
279
|
+
if (!hasSubcommand(group, "list-agent-market-skills")) {
|
|
280
|
+
group
|
|
281
|
+
.command("list-agent-market-skills")
|
|
282
|
+
.description("GET /api/v1/agents/{id}/market-skills")
|
|
283
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
284
|
+
.action(async (opts) => {
|
|
285
|
+
const as = actingUserId(program);
|
|
286
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/market-skills`;
|
|
287
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
288
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
if (!hasSubcommand(group, "install-agent-market-skill")) {
|
|
292
|
+
group
|
|
293
|
+
.command("install-agent-market-skill")
|
|
294
|
+
.description("POST /api/v1/agents/{id}/market-skills")
|
|
295
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
296
|
+
.requiredOption("--body-id <value>", "string")
|
|
297
|
+
.requiredOption("--body-version <value>", "string")
|
|
298
|
+
.action(async (opts) => {
|
|
299
|
+
const as = actingUserId(program);
|
|
300
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/market-skills`;
|
|
301
|
+
const body = {};
|
|
302
|
+
{
|
|
303
|
+
const v = opts.bodyId;
|
|
304
|
+
if (v !== undefined)
|
|
305
|
+
body["id"] = v;
|
|
306
|
+
}
|
|
307
|
+
{
|
|
308
|
+
const v = opts.bodyVersion;
|
|
309
|
+
if (v !== undefined)
|
|
310
|
+
body["version"] = v;
|
|
311
|
+
}
|
|
312
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
313
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
314
|
+
});
|
|
315
|
+
}
|
|
316
|
+
if (!hasSubcommand(group, "uninstall-agent-market-skill")) {
|
|
317
|
+
group
|
|
318
|
+
.command("uninstall-agent-market-skill")
|
|
319
|
+
.description("DELETE /api/v1/agents/{id}/market-skills/{skillId}")
|
|
320
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
321
|
+
.requiredOption("--skill-id <value>", "skillId (path param)")
|
|
322
|
+
.action(async (opts) => {
|
|
323
|
+
const as = actingUserId(program);
|
|
324
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/market-skills/${encodeURIComponent(opts.skillId)}`;
|
|
325
|
+
const data = await call({ method: "DELETE", path, asUserId: as });
|
|
326
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
327
|
+
});
|
|
328
|
+
}
|
|
329
|
+
if (!hasSubcommand(group, "stop-agent")) {
|
|
330
|
+
group
|
|
331
|
+
.command("stop-agent")
|
|
332
|
+
.description("POST /api/v1/agents/{id}/stop")
|
|
333
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
334
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
335
|
+
.action(async (opts) => {
|
|
336
|
+
const as = actingUserId(program);
|
|
337
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/stop`;
|
|
338
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
339
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
340
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
341
|
+
});
|
|
342
|
+
}
|
|
343
|
+
if (!hasSubcommand(group, "list-agent-egress-credentials")) {
|
|
344
|
+
group
|
|
345
|
+
.command("list-agent-egress-credentials")
|
|
346
|
+
.description("GET /api/v1/agents/{id}/egress-credentials")
|
|
347
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
348
|
+
.action(async (opts) => {
|
|
349
|
+
const as = actingUserId(program);
|
|
350
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/egress-credentials`;
|
|
351
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
352
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
353
|
+
});
|
|
354
|
+
}
|
|
355
|
+
if (!hasSubcommand(group, "create-agent-egress-credential")) {
|
|
356
|
+
group
|
|
357
|
+
.command("create-agent-egress-credential")
|
|
358
|
+
.description("POST /api/v1/agents/{id}/egress-credentials")
|
|
359
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
360
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
361
|
+
.action(async (opts) => {
|
|
362
|
+
const as = actingUserId(program);
|
|
363
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/egress-credentials`;
|
|
364
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
365
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
366
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
367
|
+
});
|
|
368
|
+
}
|
|
369
|
+
if (!hasSubcommand(group, "replace-agent-egress-credential")) {
|
|
370
|
+
group
|
|
371
|
+
.command("replace-agent-egress-credential")
|
|
372
|
+
.description("PUT /api/v1/agents/{id}/egress-credentials/{name}")
|
|
373
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
374
|
+
.requiredOption("--name <value>", "name (path param)")
|
|
375
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
376
|
+
.action(async (opts) => {
|
|
377
|
+
const as = actingUserId(program);
|
|
378
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/egress-credentials/${encodeURIComponent(opts.name)}`;
|
|
379
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
380
|
+
const data = await call({ method: "PUT", path, asUserId: as, body });
|
|
381
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
382
|
+
});
|
|
383
|
+
}
|
|
384
|
+
if (!hasSubcommand(group, "delete-agent-egress-credential")) {
|
|
385
|
+
group
|
|
386
|
+
.command("delete-agent-egress-credential")
|
|
387
|
+
.description("DELETE /api/v1/agents/{id}/egress-credentials/{name}")
|
|
388
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
389
|
+
.requiredOption("--name <value>", "name (path param)")
|
|
390
|
+
.action(async (opts) => {
|
|
391
|
+
const as = actingUserId(program);
|
|
392
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/egress-credentials/${encodeURIComponent(opts.name)}`;
|
|
393
|
+
const data = await call({ method: "DELETE", path, asUserId: as });
|
|
394
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
395
|
+
});
|
|
396
|
+
}
|
|
397
|
+
if (!hasSubcommand(group, "rotate-agent-egress-credential")) {
|
|
398
|
+
group
|
|
399
|
+
.command("rotate-agent-egress-credential")
|
|
400
|
+
.description("POST /api/v1/agents/{id}/egress-credentials/{name}/rotate")
|
|
401
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
402
|
+
.requiredOption("--name <value>", "name (path param)")
|
|
403
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
404
|
+
.action(async (opts) => {
|
|
405
|
+
const as = actingUserId(program);
|
|
406
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/egress-credentials/${encodeURIComponent(opts.name)}/rotate`;
|
|
407
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
408
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
409
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
if (!hasSubcommand(group, "get-agent-file-content")) {
|
|
413
|
+
group
|
|
414
|
+
.command("get-agent-file-content")
|
|
415
|
+
.description("GET /api/v1/agents/{id}/files/content")
|
|
416
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
417
|
+
.requiredOption("--path <value>", "string")
|
|
418
|
+
.action(async (opts) => {
|
|
419
|
+
const as = actingUserId(program);
|
|
420
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/files/content`;
|
|
421
|
+
const query = {};
|
|
422
|
+
{
|
|
423
|
+
const v = opts.path;
|
|
424
|
+
if (v !== undefined)
|
|
425
|
+
query["path"] = v;
|
|
426
|
+
}
|
|
427
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
428
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
429
|
+
});
|
|
430
|
+
}
|
|
431
|
+
if (!hasSubcommand(group, "download-agent-file")) {
|
|
432
|
+
group
|
|
433
|
+
.command("download-agent-file")
|
|
434
|
+
.description("GET /api/v1/agents/{id}/files/download")
|
|
435
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
436
|
+
.requiredOption("--path <value>", "string")
|
|
437
|
+
.action(async (opts) => {
|
|
438
|
+
const as = actingUserId(program);
|
|
439
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/files/download`;
|
|
440
|
+
const query = {};
|
|
441
|
+
{
|
|
442
|
+
const v = opts.path;
|
|
443
|
+
if (v !== undefined)
|
|
444
|
+
query["path"] = v;
|
|
445
|
+
}
|
|
446
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
447
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
if (!hasSubcommand(group, "list-running-scheduled-jobs")) {
|
|
451
|
+
group
|
|
452
|
+
.command("list-running-scheduled-jobs")
|
|
453
|
+
.description("GET /api/v1/agents/me/scheduled-jobs/running")
|
|
454
|
+
.option("--agents <value>", "string")
|
|
455
|
+
.action(async (opts) => {
|
|
456
|
+
const as = actingUserId(program);
|
|
457
|
+
const path = `/api/v1/agents/me/scheduled-jobs/running`;
|
|
458
|
+
const query = {};
|
|
459
|
+
{
|
|
460
|
+
const v = opts.agents;
|
|
461
|
+
if (v !== undefined)
|
|
462
|
+
query["agents"] = v;
|
|
463
|
+
}
|
|
464
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
465
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
if (!hasSubcommand(group, "list-my-scheduled-jobs")) {
|
|
469
|
+
group
|
|
470
|
+
.command("list-my-scheduled-jobs")
|
|
471
|
+
.description("GET /api/v1/agents/me/scheduled-jobs")
|
|
472
|
+
.option("--limit <value>", "string")
|
|
473
|
+
.option("--offset <value>", "string")
|
|
474
|
+
.option("--agents <value>", "string")
|
|
475
|
+
.action(async (opts) => {
|
|
476
|
+
const as = actingUserId(program);
|
|
477
|
+
const path = `/api/v1/agents/me/scheduled-jobs`;
|
|
478
|
+
const query = {};
|
|
479
|
+
{
|
|
480
|
+
const v = opts.limit;
|
|
481
|
+
if (v !== undefined)
|
|
482
|
+
query["limit"] = v;
|
|
483
|
+
}
|
|
484
|
+
{
|
|
485
|
+
const v = opts.offset;
|
|
486
|
+
if (v !== undefined)
|
|
487
|
+
query["offset"] = v;
|
|
488
|
+
}
|
|
489
|
+
{
|
|
490
|
+
const v = opts.agents;
|
|
491
|
+
if (v !== undefined)
|
|
492
|
+
query["agents"] = v;
|
|
493
|
+
}
|
|
494
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
495
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
496
|
+
});
|
|
497
|
+
}
|
|
498
|
+
if (!hasSubcommand(group, "list-agent-scheduled-jobs")) {
|
|
499
|
+
group
|
|
500
|
+
.command("list-agent-scheduled-jobs")
|
|
501
|
+
.description("GET /api/v1/agents/{id}/scheduled-jobs")
|
|
502
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
503
|
+
.action(async (opts) => {
|
|
504
|
+
const as = actingUserId(program);
|
|
505
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs`;
|
|
506
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
507
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
508
|
+
});
|
|
509
|
+
}
|
|
510
|
+
if (!hasSubcommand(group, "pause-agent-scheduled-job")) {
|
|
511
|
+
group
|
|
512
|
+
.command("pause-agent-scheduled-job")
|
|
513
|
+
.description("POST /api/v1/agents/{id}/scheduled-jobs/{jobId}/pause")
|
|
514
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
515
|
+
.requiredOption("--job-id <value>", "jobId (path param)")
|
|
516
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
517
|
+
.action(async (opts) => {
|
|
518
|
+
const as = actingUserId(program);
|
|
519
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs/${encodeURIComponent(opts.jobId)}/pause`;
|
|
520
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
521
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
522
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
523
|
+
});
|
|
524
|
+
}
|
|
525
|
+
if (!hasSubcommand(group, "resume-agent-scheduled-job")) {
|
|
526
|
+
group
|
|
527
|
+
.command("resume-agent-scheduled-job")
|
|
528
|
+
.description("POST /api/v1/agents/{id}/scheduled-jobs/{jobId}/resume")
|
|
529
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
530
|
+
.requiredOption("--job-id <value>", "jobId (path param)")
|
|
531
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
532
|
+
.action(async (opts) => {
|
|
533
|
+
const as = actingUserId(program);
|
|
534
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs/${encodeURIComponent(opts.jobId)}/resume`;
|
|
535
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
536
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
537
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
if (!hasSubcommand(group, "run-agent-scheduled-job")) {
|
|
541
|
+
group
|
|
542
|
+
.command("run-agent-scheduled-job")
|
|
543
|
+
.description("POST /api/v1/agents/{id}/scheduled-jobs/{jobId}/run")
|
|
544
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
545
|
+
.requiredOption("--job-id <value>", "jobId (path param)")
|
|
546
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
547
|
+
.action(async (opts) => {
|
|
548
|
+
const as = actingUserId(program);
|
|
549
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs/${encodeURIComponent(opts.jobId)}/run`;
|
|
550
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
551
|
+
const data = await call({ method: "POST", path, asUserId: as, body });
|
|
552
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
553
|
+
});
|
|
554
|
+
}
|
|
555
|
+
if (!hasSubcommand(group, "update-agent-scheduled-job")) {
|
|
556
|
+
group
|
|
557
|
+
.command("update-agent-scheduled-job")
|
|
558
|
+
.description("PATCH /api/v1/agents/{id}/scheduled-jobs/{jobId}")
|
|
559
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
560
|
+
.requiredOption("--job-id <value>", "jobId (path param)")
|
|
561
|
+
.option("--body <json>", "request body as JSON (no schema available)")
|
|
562
|
+
.action(async (opts) => {
|
|
563
|
+
const as = actingUserId(program);
|
|
564
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs/${encodeURIComponent(opts.jobId)}`;
|
|
565
|
+
const body = opts.body ? JSON.parse(opts.body) : undefined;
|
|
566
|
+
const data = await call({ method: "PATCH", path, asUserId: as, body });
|
|
567
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
568
|
+
});
|
|
569
|
+
}
|
|
570
|
+
if (!hasSubcommand(group, "delete-agent-scheduled-job")) {
|
|
571
|
+
group
|
|
572
|
+
.command("delete-agent-scheduled-job")
|
|
573
|
+
.description("DELETE /api/v1/agents/{id}/scheduled-jobs/{jobId}")
|
|
574
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
575
|
+
.requiredOption("--job-id <value>", "jobId (path param)")
|
|
576
|
+
.action(async (opts) => {
|
|
577
|
+
const as = actingUserId(program);
|
|
578
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/scheduled-jobs/${encodeURIComponent(opts.jobId)}`;
|
|
579
|
+
const data = await call({ method: "DELETE", path, asUserId: as });
|
|
580
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
581
|
+
});
|
|
582
|
+
}
|
|
144
583
|
if (!hasSubcommand(group, "get-by-id")) {
|
|
145
584
|
group
|
|
146
585
|
.command("get-by-id")
|
|
@@ -275,6 +714,49 @@ export function register(program) {
|
|
|
275
714
|
process.stdout.write(JSON.stringify(data) + "\n");
|
|
276
715
|
});
|
|
277
716
|
}
|
|
717
|
+
if (!hasSubcommand(group, "earnings")) {
|
|
718
|
+
group
|
|
719
|
+
.command("earnings")
|
|
720
|
+
.description("GET /api/v1/agents/{id}/earnings")
|
|
721
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
722
|
+
.action(async (opts) => {
|
|
723
|
+
const as = actingUserId(program);
|
|
724
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/earnings`;
|
|
725
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
726
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
if (!hasSubcommand(group, "price-quote")) {
|
|
730
|
+
group
|
|
731
|
+
.command("price-quote")
|
|
732
|
+
.description("GET /api/v1/agents/{id}/price-quote")
|
|
733
|
+
.requiredOption("--id <value>", "id (path param)")
|
|
734
|
+
.option("--multiplier <value>", "string")
|
|
735
|
+
.action(async (opts) => {
|
|
736
|
+
const as = actingUserId(program);
|
|
737
|
+
const path = `/api/v1/agents/${encodeURIComponent(opts.id)}/price-quote`;
|
|
738
|
+
const query = {};
|
|
739
|
+
{
|
|
740
|
+
const v = opts.multiplier;
|
|
741
|
+
if (v !== undefined)
|
|
742
|
+
query["multiplier"] = v;
|
|
743
|
+
}
|
|
744
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
745
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
if (!hasSubcommand(group, "room-reflections")) {
|
|
749
|
+
group
|
|
750
|
+
.command("room-reflections")
|
|
751
|
+
.description("GET /api/v1/rooms/{roomId}/reflections")
|
|
752
|
+
.requiredOption("--room-id <value>", "roomId (path param)")
|
|
753
|
+
.action(async (opts) => {
|
|
754
|
+
const as = actingUserId(program);
|
|
755
|
+
const path = `/api/v1/rooms/${encodeURIComponent(opts.roomId)}/reflections`;
|
|
756
|
+
const data = await call({ method: "GET", path, asUserId: as });
|
|
757
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
758
|
+
});
|
|
759
|
+
}
|
|
278
760
|
if (!hasSubcommand(group, "start-direct-chat")) {
|
|
279
761
|
group
|
|
280
762
|
.command("start-direct-chat")
|
|
@@ -53,7 +53,7 @@ export function register(program) {
|
|
|
53
53
|
.requiredOption("--env <value>", "string")
|
|
54
54
|
.requiredOption("--platform <value>", "string")
|
|
55
55
|
.requiredOption("--arch <value>", "string")
|
|
56
|
-
.requiredOption("--version <value>", "string")
|
|
56
|
+
.requiredOption("--body-version <value>", "string")
|
|
57
57
|
.requiredOption("--file-name <value>", "string")
|
|
58
58
|
.requiredOption("--file-type <value>", "string")
|
|
59
59
|
.requiredOption("--size-bytes <n>", "number")
|
|
@@ -87,7 +87,7 @@ export function register(program) {
|
|
|
87
87
|
body["arch"] = v;
|
|
88
88
|
}
|
|
89
89
|
{
|
|
90
|
-
const v = opts.
|
|
90
|
+
const v = opts.bodyVersion;
|
|
91
91
|
if (v !== undefined)
|
|
92
92
|
body["version"] = v;
|
|
93
93
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { call } from "../../client.js";
|
|
2
|
+
import { actingUserId } from "../../auth.js";
|
|
3
|
+
import { getOrCreateGroup, hasSubcommand } from "../_helpers.js";
|
|
4
|
+
export function register(program) {
|
|
5
|
+
const group = getOrCreateGroup(program, "edge-sizecheck", "EdgeSizecheck operations");
|
|
6
|
+
if (!hasSubcommand(group, "sizecheck")) {
|
|
7
|
+
group
|
|
8
|
+
.command("sizecheck")
|
|
9
|
+
.description("GET /api/v1/edge/sizecheck")
|
|
10
|
+
.option("--bytes <value>", "string")
|
|
11
|
+
.action(async (opts) => {
|
|
12
|
+
const as = actingUserId(program);
|
|
13
|
+
const path = `/api/v1/edge/sizecheck`;
|
|
14
|
+
const query = {};
|
|
15
|
+
{
|
|
16
|
+
const v = opts.bytes;
|
|
17
|
+
if (v !== undefined)
|
|
18
|
+
query["bytes"] = v;
|
|
19
|
+
}
|
|
20
|
+
const data = await call({ method: "GET", path, asUserId: as, query });
|
|
21
|
+
process.stdout.write(JSON.stringify(data) + "\n");
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=edge-sizecheck.js.map
|