@erdoai/cli 0.72.0 → 0.73.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +17 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -2289,15 +2289,30 @@ wsCmd.command("phase-add <slug>").description("Append a new phase to a workstrea
2289
2289
  }
2290
2290
  }
2291
2291
  );
2292
- 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("--summary <text>", "one-line audit-log summary of this update").action(
2292
+ 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("--summary <text>", "one-line audit-log summary of this update").option(
2293
+ "--phase <slug=status>",
2294
+ "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",
2295
+ collect,
2296
+ []
2297
+ ).action(
2293
2298
  async (slug, opts) => {
2294
2299
  try {
2300
+ const phaseUpdates = opts.phase.map((raw) => {
2301
+ const eq = raw.indexOf("=");
2302
+ const phaseSlug = eq < 0 ? raw : raw.slice(0, eq);
2303
+ const status = eq < 0 ? "" : raw.slice(eq + 1);
2304
+ if (!phaseSlug || !status) {
2305
+ throw new Error(`--phase expects <slug>=<status>, got "${raw}"`);
2306
+ }
2307
+ return { slug: phaseSlug, status };
2308
+ });
2295
2309
  print(
2296
2310
  await new ErdoClient().updateWorkState(slug, {
2297
2311
  status: opts.status,
2298
2312
  title: opts.title,
2299
2313
  description: opts.description,
2300
- summary: opts.summary
2314
+ summary: opts.summary,
2315
+ phase_updates: phaseUpdates.length > 0 ? phaseUpdates : void 0
2301
2316
  })
2302
2317
  );
2303
2318
  } catch (e) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.72.0",
3
+ "version": "0.73.0",
4
4
  "description": "Erdo CLI \u2014 drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {