@erdoai/cli 0.115.0 → 0.116.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 +28 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -7686,11 +7686,39 @@ working hours ${wh.days.join(", ")} ${wh.start}\u2013${wh.end} ${wh.timezone}`)
7686
7686
  must not affect priority ${rb.priority.forbidden_factors.join(", ")}`);
7687
7687
  }
7688
7688
  }
7689
+ if (rb.flow) printLeadPlaybookFlow(rb.flow);
7689
7690
  if (rb.limits?.length) {
7690
7691
  console.log("\nlimits Erdo applied");
7691
7692
  for (const l of rb.limits) console.log(` ${l.kind} \u2192 ${l.mode}: ${l.reason}`);
7692
7693
  }
7693
7694
  }
7695
+ function printLeadPlaybookFlow(flow) {
7696
+ const unfound = (found) => found ? "" : " (passage not found in the text)";
7697
+ if (flow.any_time.length) {
7698
+ console.log("\nat any point, from any stage (not enforced)");
7699
+ for (const r of flow.any_time) {
7700
+ console.log(` ${r.if} \u2192 ${r.exit_to || r.action}${unfound(r.source_found)}`);
7701
+ }
7702
+ }
7703
+ for (const stage of flow.stages) {
7704
+ console.log(`
7705
+ flow: ${stage.name}`);
7706
+ for (const phase of stage.phases) {
7707
+ if (phase.name || phase.aim) console.log(` ${[phase.name, phase.aim].filter(Boolean).join(": ")}`);
7708
+ printAlignedTable(
7709
+ ["when", "step", "applies to", "goes to"],
7710
+ phase.steps.map((st) => [
7711
+ st.when || "\u2014",
7712
+ `${st.label}${unfound(st.source_found)}`,
7713
+ st.only_if.map((m) => `${m.key}=${m.values.join("/")}`).join(", ") || "every lead",
7714
+ st.exit_to || "\u2014"
7715
+ ])
7716
+ );
7717
+ }
7718
+ }
7719
+ for (const c of flow.conflicts) console.log(`
7720
+ conflict in the text: ${c.description}`);
7721
+ }
7694
7722
  function printLeadPlaybookRevision(rev) {
7695
7723
  console.log(`revision ${rev.revision} (saved ${rev.saved_at}${rev.saved_by ? ` by ${rev.saved_by}` : ""})`);
7696
7724
  console.log(`enabled ${rev.enabled ? "yes" : "no"}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.115.0",
3
+ "version": "0.116.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {