@letterstory/cli 0.177.165 → 0.177.167

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/README.md CHANGED
@@ -856,6 +856,11 @@ letterstory insights summary [--period 14d|30d|90d] [--part <block>]...
856
856
  # weeks vs the 2 before, 30d → 4 vs 4, 90d → 13 vs 13.
857
857
  letterstory insights competitors [--period 14d|30d|90d]
858
858
 
859
+ # GEO → Competitors tab: per tracked competitor, the posts and landing pages it
860
+ # published in the window (each with the answers citing it) and the AI answers
861
+ # citing its site. Its share of voice is `insights competitors`, on `key`.
862
+ letterstory insights competitor-geo [--period 14d|30d|90d]
863
+
859
864
  # The AI Visibility Bank: which questions named you, cited your pages, or both (a
860
865
  # breakthrough). All time unless --period; --source picks the phantom network
861
866
  # (default), your marketing site, or the whole portfolio; --phantom narrows to
package/lib/cli.mjs CHANGED
@@ -93,7 +93,7 @@ import {
93
93
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
94
94
 
95
95
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
96
- export const VERSION = "0.177.165";
96
+ export const VERSION = "0.177.167";
97
97
 
98
98
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
99
99
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -106,6 +106,8 @@ export const BOOLEAN_FLAGS = new Set([
106
106
  // repo list: open changes past --limit are listed unless --newest-only.
107
107
  "include-open",
108
108
  "newest-only",
109
+ // org overview: only what waits on someone (the More menu's closed read).
110
+ "needs-only",
109
111
  "include-tests",
110
112
  "as-test",
111
113
  "discover",
@@ -1955,6 +1957,7 @@ Insights:
1955
1957
  insights claims [--period …] [--verdict true|outdated|wrong|unknown|unchecked] [--entity self|<rival>] [--limit n]
1956
1958
  The claims AI answers make about you, each checked against your facts
1957
1959
  insights competitors [--period 14d|30d|90d] GEO → Competitors: share of mentions per brand, is it moving, by engine/question
1960
+ insights competitor-geo [--period 14d|30d|90d] What each competitor published and the AI answers citing its site
1958
1961
  insights question <key> [--period 14d|30d|90d] [--filter all|named_you|rival_not_you|no_one] [--limit n]
1959
1962
  One By-question row: the wordings asked and the AI answers
1960
1963
  insights detection How your brand is detected in AI answers (terms, who set them)
@@ -1,7 +1,7 @@
1
1
  // `insights` — Search Console impressions/clicks across the phantom network, at the
2
2
  // network, single-post, and top-posts levels (ported from phantomstory-cli's
3
- // insights.ts); plus Measure's Overview (`summary`), GEO → Competitors
4
- // (`competitors`), AI Visibility Bank (`bank`) and phantom Page Access (`access`);
3
+ // insights.ts); plus Measure's Overview (`summary`), share of voice by competitor
4
+ // (`competitors`), what each competitor published and where AI answers cite it (`competitor-geo`), AI Visibility Bank (`bank`) and phantom Page Access (`access`);
5
5
  // Measure → Reads (`reads`), Prompt tracking (`prompts`, also `questions`), Keyword tracking (`keywords`, or
6
6
  // `keywords <topic>` to research one, `add-keywords` to add some to a cluster), Pages (`pages`, one page's answers `page`), the posts naming you (`mentions`)
7
7
  // and Portrayal (`portrayal`, its claims `claims`: how AI answers describe you), and the live feed of what
@@ -102,6 +102,9 @@ export const ARGS = {
102
102
  question: { flag: "question" },
103
103
  limit: { flag: "limit", type: "num" },
104
104
  },
105
+ list_competitor_geo: {
106
+ period: { flag: "period", enum: PERIODS },
107
+ },
105
108
  get_cited_page_answers: {
106
109
  page: { positional: 0, label: "page", required: true },
107
110
  period: { flag: "period", enum: PERIODS },
@@ -157,6 +160,8 @@ export async function cmdInsights(ctx) {
157
160
  return call(rest, "get_measure_summary");
158
161
  case "competitors":
159
162
  return call(rest, "get_share_of_voice_detail");
163
+ case "competitor-geo":
164
+ return call(rest, "list_competitor_geo");
160
165
  case "question":
161
166
  return call(rest, "get_share_of_voice_question");
162
167
  case "detection":
@@ -200,7 +205,7 @@ export async function cmdInsights(ctx) {
200
205
  return call(rest, "select_gsc_property");
201
206
  default:
202
207
  throw new CliError(
203
- `Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, tracking-cadence, set-tracking-cadence, prompts, keywords [topic], add-keywords, pages, page, sources, mentions, portrayal, claims, competitors, question, detection, set-detection, activity, story, site, post, top, bank, access, properties, property`
208
+ `Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, tracking-cadence, set-tracking-cadence, prompts, keywords [topic], add-keywords, pages, page, sources, mentions, portrayal, claims, competitors, competitor-geo, question, detection, set-detection, activity, story, site, post, top, bank, access, properties, property`
204
209
  );
205
210
  }
206
211
  }
@@ -54,7 +54,11 @@ export const ARGS = {
54
54
  undo_billing_plan_cancel: {},
55
55
  update_billing_card: {},
56
56
  list_integrations: {},
57
- get_workspace_overview: {},
57
+ get_workspace_overview: {
58
+ needs_only: {
59
+ value: (flags) => (flags["needs-only"] === undefined ? undefined : flagBool(flags["needs-only"])),
60
+ },
61
+ },
58
62
  get_linear_connection: {},
59
63
  list_linear_targets: { team_id: { flag: "team" } },
60
64
  set_linear_target: {
@@ -155,8 +159,10 @@ const NEED_WORDS = {
155
159
  */
156
160
  async function orgOverview(ctx) {
157
161
  const { client, flags, io } = ctx;
158
- refuseUnknownFlags(ctx, {}, []);
159
- const result = await client.callTool("get_workspace_overview", {});
162
+ refuseUnknownFlags(ctx, {}, ["needs-only"]);
163
+ // --needs-only: only what waits on someone, as the app's closed More menu reads it.
164
+ const needsOnly = flagBool(flags["needs-only"]);
165
+ const result = await client.callTool("get_workspace_overview", needsOnly ? { needs_only: true } : {});
160
166
  ok(ctx, result.message);
161
167
  printResult(io, flags, result, (r) => {
162
168
  const needs = r.needs.length
@@ -166,6 +172,7 @@ async function orgOverview(ctx) {
166
172
  .filter(([, n]) => n > 0)
167
173
  .map(([key, n]) => ` ${key.replace(/^\//, "")}: ${formatCount(n)}`);
168
174
  const recent = r.recent.map((x) => ` ${x.name} (${x.kind === "sequence" ? "sequence" : "list"})`);
175
+ if (needsOnly) return needs.join("\n");
169
176
  return [...needs, "", "Holds:", ...counts, ...(recent.length ? ["", "Recent:", ...recent] : [])].join("\n");
170
177
  });
171
178
  return 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.165",
3
+ "version": "0.177.167",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",