@erdoai/cli 0.232.0 → 0.233.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/dist/index.js +7 -47
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1324,13 +1324,6 @@ var ErdoClient = class {
|
|
|
1324
1324
|
`/v1/workstreams/${encodeURIComponent(slug)}/events${qs}`
|
|
1325
1325
|
);
|
|
1326
1326
|
}
|
|
1327
|
-
addWorkstreamPhase(slug, input) {
|
|
1328
|
-
return this.request(
|
|
1329
|
-
"POST",
|
|
1330
|
-
`/v1/workstreams/${encodeURIComponent(slug)}/phases`,
|
|
1331
|
-
input
|
|
1332
|
-
);
|
|
1333
|
-
}
|
|
1334
1327
|
armWorkstreamLoop(slug, input) {
|
|
1335
1328
|
return this.request("POST", `/v1/workstreams/${encodeURIComponent(slug)}/arm`, input ?? {});
|
|
1336
1329
|
}
|
|
@@ -1440,7 +1433,6 @@ var ErdoClient = class {
|
|
|
1440
1433
|
if (params?.limit) q.set("limit", String(params.limit));
|
|
1441
1434
|
if (params?.offset) q.set("offset", String(params.offset));
|
|
1442
1435
|
if (params?.categories) q.set("categories", params.categories);
|
|
1443
|
-
if (params?.scope) q.set("scope", params.scope);
|
|
1444
1436
|
if (params?.workstream_slug) q.set("workstream_slug", params.workstream_slug);
|
|
1445
1437
|
const qs = q.toString();
|
|
1446
1438
|
return this.request(
|
|
@@ -4389,7 +4381,7 @@ wsCmd.command("list").description("List workstreams in the active org").option("
|
|
|
4389
4381
|
fail(e);
|
|
4390
4382
|
}
|
|
4391
4383
|
});
|
|
4392
|
-
wsCmd.command("get <slug>").description("Show a workstream \u2014 status,
|
|
4384
|
+
wsCmd.command("get <slug>").description("Show a workstream \u2014 status, resources, recent log").action(async (slug) => {
|
|
4393
4385
|
try {
|
|
4394
4386
|
print(await new ErdoClient().getWorkstream(slug));
|
|
4395
4387
|
} catch (e) {
|
|
@@ -4431,50 +4423,20 @@ wsCmd.command("events <slug>").description("Show a workstream's full event log (
|
|
|
4431
4423
|
fail(e);
|
|
4432
4424
|
}
|
|
4433
4425
|
});
|
|
4434
|
-
wsCmd.command("
|
|
4435
|
-
async (slug, opts) => {
|
|
4436
|
-
try {
|
|
4437
|
-
print(
|
|
4438
|
-
await new ErdoClient().addWorkstreamPhase(slug, {
|
|
4439
|
-
slug: opts.phaseSlug,
|
|
4440
|
-
title: opts.title,
|
|
4441
|
-
skill_slug: opts.skill
|
|
4442
|
-
})
|
|
4443
|
-
);
|
|
4444
|
-
} catch (e) {
|
|
4445
|
-
fail(e);
|
|
4446
|
-
}
|
|
4447
|
-
}
|
|
4448
|
-
);
|
|
4449
|
-
wsCmd.command("set-state <slug>").description("Update a workstream's status / title / description / phase statuses").option("--status <status>", "active, awaiting_user, blocked, completed").option("--title <title>", "retitle").option("--description <text>", "describe current state / surface a blocker").option(
|
|
4426
|
+
wsCmd.command("set-state <slug>").description("Update a workstream's status / title / description").option("--status <status>", "active, awaiting_user, blocked, completed").option("--title <title>", "retitle").option("--description <text>", "describe current state / surface a blocker").option(
|
|
4450
4427
|
"--token-budget <millicents>",
|
|
4451
4428
|
"spend ceiling in millicents \u2014 100,000 per dollar, so 25000000 = $250; this is how you raise a ceiling a loop has spent through",
|
|
4452
4429
|
(v) => parseInt(v, 10)
|
|
4453
|
-
).option("--escalation-budget <n>", "max urgent attention items per rolling 24h", (v) => parseInt(v, 10)).
|
|
4454
|
-
"--phase <slug=status>",
|
|
4455
|
-
"set one phase's status (repeatable), e.g. --phase brand-brief=completed --phase landing-pages=running; statuses: pending, running, awaiting_user, blocked, completed, skipped, failed",
|
|
4456
|
-
collect,
|
|
4457
|
-
[]
|
|
4458
|
-
).action(
|
|
4430
|
+
).option("--escalation-budget <n>", "max urgent attention items per rolling 24h", (v) => parseInt(v, 10)).action(
|
|
4459
4431
|
async (slug, opts) => {
|
|
4460
4432
|
try {
|
|
4461
|
-
const phaseUpdates = opts.phase.map((raw) => {
|
|
4462
|
-
const eq = raw.indexOf("=");
|
|
4463
|
-
const phaseSlug = eq < 0 ? raw : raw.slice(0, eq);
|
|
4464
|
-
const status = eq < 0 ? "" : raw.slice(eq + 1);
|
|
4465
|
-
if (!phaseSlug || !status) {
|
|
4466
|
-
throw new Error(`--phase expects <slug>=<status>, got "${raw}"`);
|
|
4467
|
-
}
|
|
4468
|
-
return { slug: phaseSlug, status };
|
|
4469
|
-
});
|
|
4470
4433
|
print(
|
|
4471
4434
|
await new ErdoClient().updateWorkState(slug, {
|
|
4472
4435
|
status: opts.status,
|
|
4473
4436
|
title: opts.title,
|
|
4474
4437
|
description: opts.description,
|
|
4475
4438
|
token_budget_millicents: opts.tokenBudget,
|
|
4476
|
-
escalation_budget_per_day: opts.escalationBudget
|
|
4477
|
-
phase_updates: phaseUpdates.length > 0 ? phaseUpdates : void 0
|
|
4439
|
+
escalation_budget_per_day: opts.escalationBudget
|
|
4478
4440
|
})
|
|
4479
4441
|
);
|
|
4480
4442
|
} catch (e) {
|
|
@@ -4537,7 +4499,7 @@ wsCmd.command("recommendations <slug>").description("Read resolved recommendatio
|
|
|
4537
4499
|
fail(e);
|
|
4538
4500
|
}
|
|
4539
4501
|
});
|
|
4540
|
-
wsCmd.command("attach <slug>").description("Link a resource (page, dataset, heartbeat, experiment_run, \u2026) to a workstream").requiredOption("--type <resourceType>", "resource type (page, dataset, heartbeat, experiment_run, \u2026)").requiredOption("--id <resourceId>", "the resource's UUID").requiredOption("--rel <relationshipType>", "output | input | evidence | monitoring | subject | parent | child | running").option("--title <title>", "optional label for the link").
|
|
4502
|
+
wsCmd.command("attach <slug>").description("Link a resource (page, dataset, heartbeat, experiment_run, \u2026) to a workstream").requiredOption("--type <resourceType>", "resource type (page, dataset, heartbeat, experiment_run, \u2026)").requiredOption("--id <resourceId>", "the resource's UUID").requiredOption("--rel <relationshipType>", "output | input | evidence | monitoring | subject | parent | child | running").option("--title <title>", "optional label for the link").action(
|
|
4541
4503
|
async (slug, opts) => {
|
|
4542
4504
|
try {
|
|
4543
4505
|
print(
|
|
@@ -4545,8 +4507,7 @@ wsCmd.command("attach <slug>").description("Link a resource (page, dataset, hear
|
|
|
4545
4507
|
resource_type: opts.type,
|
|
4546
4508
|
resource_id: opts.id,
|
|
4547
4509
|
relationship_type: opts.rel,
|
|
4548
|
-
title: opts.title
|
|
4549
|
-
phase_id: opts.phase
|
|
4510
|
+
title: opts.title
|
|
4550
4511
|
})
|
|
4551
4512
|
);
|
|
4552
4513
|
} catch (e) {
|
|
@@ -6478,14 +6439,13 @@ program.command("activity").alias("feed").description(
|
|
|
6478
6439
|
).option("-n, --limit <n>", "max items (default 20, max 100)", (v) => parseInt(v, 10)).option("--offset <n>", "pagination offset", (v) => parseInt(v, 10)).option(
|
|
6479
6440
|
"--categories <list>",
|
|
6480
6441
|
"comma-separated: attention,approval,workstream,catalog,job,heartbeat (default: attention,approval,workstream)"
|
|
6481
|
-
).option("--
|
|
6442
|
+
).option("--workstream <slug>", "only this workstream").option("--json", "raw JSON response").action(
|
|
6482
6443
|
async (opts) => {
|
|
6483
6444
|
try {
|
|
6484
6445
|
const feed = await new ErdoClient().listActivityFeed({
|
|
6485
6446
|
limit: opts.limit,
|
|
6486
6447
|
offset: opts.offset,
|
|
6487
6448
|
categories: opts.categories,
|
|
6488
|
-
scope: opts.scope,
|
|
6489
6449
|
workstream_slug: opts.workstream
|
|
6490
6450
|
});
|
|
6491
6451
|
if (opts.json) {
|