@series-a/cli 0.19.1 → 0.20.1

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 CHANGED
@@ -4,6 +4,16 @@ All notable changes to this package are documented here. This project follows
4
4
  [Semantic Versioning](https://semver.org/) and uses
5
5
  [Changesets](https://github.com/changesets/changesets) to manage releases.
6
6
 
7
+ ## 0.20.0 — Sequence migration fixes and hour-level waits
8
+
9
+ - Hour- and minute-level waits from the terminal: `sequences add-step --delay-hours 3` and `--delay-minutes 45` (also on `update-step`), and in `replace-steps` JSON via `delay_hours` / `delay_minutes`. The step table now prints `3h` / `45m` instead of forcing days.
10
+ - `replace-steps` now accepts a flat ordered list (no `parent` links) and treats it as a chain — HeyReach-style exports import directly.
11
+ - Condition children without a `branch_label` default to the `yes` branch instead of failing validation.
12
+ - Short ID prefixes (first characters of an ID) resolve for sequences and campaigns; invalid IDs return a structured 404 "not found" instead of a malformed-UUID 500.
13
+ - `sequences show` works with both short and full IDs; alias actions (`show`, `get`) accepted.
14
+ - `content generate` without `--wait` now returns a queued job id immediately instead of risking a gateway timeout; poll with `agents job-status <id>`. With `--wait` it blocks until the draft is ready. Finished drafts now reliably carry their final voice result and citation metadata.
15
+ - Invite-withdraw and warm-up steps remain API-side only (not yet exposed); auto-withdraw stays off by default.
16
+
7
17
  ## 0.15.1 — Engine fixes and reliability patch
8
18
 
9
19
  - `voice set` / `voice pin-benchmark` no longer fail with a `user_id` null violation — the Agent API now resolves the actor from the API key, workspace member, or owner context automatically.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@series-a/cli",
3
- "version": "0.19.1",
3
+ "version": "0.20.1",
4
4
  "description": "AdvisorPro command-line interface — drive leads, campaigns, sequences and agents from your terminal.",
5
5
  "type": "module",
6
6
  "bin": {
@@ -436,6 +436,13 @@ function renderPreflight(p) {
436
436
  }
437
437
 
438
438
 
439
+
440
+ function delayLabel(s) {
441
+ const unit = s?.config?.delay_unit || "days";
442
+ const n = s?.delay_days ?? 0;
443
+ return unit === "hours" ? `${n}h` : unit === "minutes" ? `${n}m` : `${n}d`;
444
+ }
445
+
439
446
  export function registerSequences(program) {
440
447
  const s = program.command("sequences").description("Manage LinkedIn sequences");
441
448
 
@@ -465,7 +472,7 @@ export function registerSequences(program) {
465
472
  process.stdout.write(table(
466
473
  ["#", "action", "channel", "delay", "variant", "preview"],
467
474
  (d.steps || []).map((s) => [
468
- s.step_order, s.action, s.channel, `${s.delay_days}d`, s.variant,
475
+ s.step_order, s.action, s.channel, delayLabel(s), s.variant,
469
476
  truncate(s.message_content, 60),
470
477
  ]),
471
478
  ) + "\n");
@@ -521,6 +528,8 @@ export function registerSequences(program) {
521
528
  )
522
529
  .option("--text <message>", "message_content (required for sendInvitation/sendMessage)")
523
530
  .option("--delay <days>", "delay_days before this step", "0")
531
+ .option("--delay-hours <hours>", "wait this many hours instead of days")
532
+ .option("--delay-minutes <minutes>", "wait this many minutes instead of days")
524
533
  .option("--variant <v>", "variant label", "A")
525
534
  .option("--step-type <t>", "action|condition|delay (defaults from --action)")
526
535
  .option("--channel <c>", "channel (defaults from --action)")
@@ -536,6 +545,8 @@ export function registerSequences(program) {
536
545
  action: opts.action,
537
546
  message_content: opts.text,
538
547
  delay_days: Number(opts.delay) || 0,
548
+ delay_hours: opts.delayHours !== undefined ? Number(opts.delayHours) : undefined,
549
+ delay_minutes: opts.delayMinutes !== undefined ? Number(opts.delayMinutes) : undefined,
539
550
  variant: opts.variant,
540
551
  step_type: opts.stepType,
541
552
  channel: opts.channel,
@@ -546,7 +557,7 @@ export function registerSequences(program) {
546
557
  }, ctxFrom(this));
547
558
  emit(this, r, (d) => {
548
559
  const st = d.step || {};
549
- process.stdout.write(`✓ Added step ${st.id}\n #${st.step_order} ${st.action} (${st.channel}) delay=${st.delay_days}d variant=${st.variant}\n parent=${st.parent_step_id || "root"}${st.branch_label ? ` branch=${st.branch_label}` : ""}\n`);
560
+ process.stdout.write(`✓ Added step ${st.id}\n #${st.step_order} ${st.action} (${st.channel}) delay=${delayLabel(st)} variant=${st.variant}\n parent=${st.parent_step_id || "root"}${st.branch_label ? ` branch=${st.branch_label}` : ""}\n`);
550
561
  for (const w of d.graph?.warnings || []) process.stdout.write(` ⚠ ${w.message}\n`);
551
562
  });
552
563
  } catch (e) { fail(e); }
@@ -555,7 +566,7 @@ export function registerSequences(program) {
555
566
 
556
567
  withCommonOpts(s.command("replace-steps <id>"))
557
568
  .description("Replace every step of a sequence with a validated tree from a JSON file (atomic)")
558
- .requiredOption("--file <path>", "JSON file: [{ temp_id, parent, branch_label, action, message_content, delay_days }]")
569
+ .requiredOption("--file <path>", "JSON file: [{ temp_id, parent, branch_label, action, message_content, delay_days | delay_hours | delay_minutes }] (a flat ordered list is treated as a chain)")
559
570
  .option("--dry-run", "validate the graph without writing")
560
571
  .action(async function (id, opts) {
561
572
  try {
@@ -624,6 +635,8 @@ export function registerSequences(program) {
624
635
  .option("--action <action>", "step action")
625
636
  .option("--message <text>", "message_content")
626
637
  .option("--delay <days>", "delay_days")
638
+ .option("--delay-hours <hours>", "wait this many hours instead of days")
639
+ .option("--delay-minutes <minutes>", "wait this many minutes instead of days")
627
640
  .option("--variant <v>", "variant")
628
641
  .option("--channel <c>", "channel")
629
642
  .action(async function (stepId, opts) {
@@ -632,6 +645,8 @@ export function registerSequences(program) {
632
645
  if (opts.action !== undefined) params.action = opts.action;
633
646
  if (opts.message !== undefined) params.message_content = opts.message;
634
647
  if (opts.delay !== undefined) params.delay_days = Number(opts.delay);
648
+ if (opts.delayHours !== undefined) params.delay_hours = Number(opts.delayHours);
649
+ if (opts.delayMinutes !== undefined) params.delay_minutes = Number(opts.delayMinutes);
635
650
  if (opts.variant !== undefined) params.variant = opts.variant;
636
651
  if (opts.channel !== undefined) params.channel = opts.channel;
637
652
  const r = await call("sequences", "update_step", params, ctxFrom(this));