@erdoai/cli 0.35.0 → 0.36.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 +27 -3
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -790,12 +790,24 @@ var ErdoClient = class {
790
790
  // review id immediately (poll getPageReview for the typed findings). goal is
791
791
  // the operator's optional declared campaign goal — it steers which conversion
792
792
  // principles apply, and a page whose evident form contradicts it is a finding.
793
- reviewPages(urls, goal) {
794
- return this.request("POST", "/v1/page-reviews", goal ? { urls, goal } : { urls });
793
+ reviewPages(urls, goal, audience) {
794
+ const body = { urls };
795
+ if (goal) body.goal = goal;
796
+ if (audience) body.audience = audience;
797
+ return this.request("POST", "/v1/page-reviews", body);
795
798
  }
796
799
  getPageReview(id) {
797
800
  return this.request("GET", `/v1/page-reviews/${encodeURIComponent(id)}`);
798
801
  }
802
+ // List past reviews newest first as lean summaries (id, status, URLs, scores —
803
+ // no findings). Pass a url to track one page's score over time.
804
+ listPageReviews(url, limit) {
805
+ const params = new URLSearchParams();
806
+ if (url) params.set("url", url);
807
+ if (limit) params.set("limit", String(limit));
808
+ const qs = params.toString();
809
+ return this.request("GET", `/v1/page-reviews${qs ? "?" + qs : ""}`);
810
+ }
799
811
  updatePage(pageID, input) {
800
812
  return this.request("PUT", `/v1/pages/${encodeURIComponent(pageID)}`, input);
801
813
  }
@@ -2562,10 +2574,13 @@ pagesCmd.command("review <url...>").description(
2562
2574
  ).option("--wait", "poll until the review is ready, then print the findings").option(
2563
2575
  "--goal <goal>",
2564
2576
  "what the page's campaign is trying to achieve ('book demos', 'brand awareness for a launch') \u2014 steers which conversion principles apply; a page whose evident form contradicts the goal is itself a finding"
2577
+ ).option(
2578
+ "--audience <audience>",
2579
+ "who the page targets \u2014 the ICP ('out-of-state condo investors') \u2014 the critic judges clarity, proof, and tone through that reader's eyes; a page that evidently speaks to someone else is itself a finding"
2565
2580
  ).action(async (urls, opts) => {
2566
2581
  try {
2567
2582
  const client = new ErdoClient();
2568
- const started = await client.reviewPages(urls, opts.goal);
2583
+ const started = await client.reviewPages(urls, opts.goal, opts.audience);
2569
2584
  if (!opts.wait) {
2570
2585
  print(started);
2571
2586
  return;
@@ -2588,6 +2603,15 @@ pagesCmd.command("review <url...>").description(
2588
2603
  fail(e);
2589
2604
  }
2590
2605
  });
2606
+ pagesCmd.command("reviews").description(
2607
+ "List past page reviews (newest first) as lean summaries \u2014 id, status, reviewed URLs, and conversion scores, without the findings. --url filters to reviews that included that exact page: the way to see one page's score over time."
2608
+ ).option("--url <url>", "only reviews whose submitted URLs include this exact page URL").option("--limit <n>", "max reviews to return (default 20, max 100)").action(async (opts) => {
2609
+ try {
2610
+ print(await new ErdoClient().listPageReviews(opts.url, opts.limit ? Number(opts.limit) : void 0));
2611
+ } catch (e) {
2612
+ fail(e);
2613
+ }
2614
+ });
2591
2615
  pagesCmd.command("review-result <id>").description("Read a page review by id \u2014 its status and, once ready, the typed per-page findings").action(async (id) => {
2592
2616
  try {
2593
2617
  print(await new ErdoClient().getPageReview(id));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@erdoai/cli",
3
- "version": "0.35.0",
3
+ "version": "0.36.0",
4
4
  "description": "Erdo CLI — drive datasets, pages, and evals from the terminal or CI",
5
5
  "type": "module",
6
6
  "bin": {