@letterstory/cli 0.176.83 → 0.176.84
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/lib/cli.mjs +5 -2
- package/lib/commands/automate.mjs +1 -0
- package/lib/commands/insights.mjs +16 -2
- package/lib/commands/replicate.mjs +13 -2
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -85,7 +85,7 @@ import {
|
|
|
85
85
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
86
86
|
|
|
87
87
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
88
|
-
export const VERSION = "0.176.
|
|
88
|
+
export const VERSION = "0.176.84";
|
|
89
89
|
|
|
90
90
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
91
91
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -656,7 +656,7 @@ Reviewers:
|
|
|
656
656
|
automate show <automation-id>
|
|
657
657
|
automate add [--template post_new_issues|recommended_actions|competitor_pages|competitor_takes|
|
|
658
658
|
competitor_changes|icp_visitors|vc_visitors|plan_updates|weekly_release_notes|monthly_page_refresh|
|
|
659
|
-
relink_posts|mention_revisions|fix_autopilot|auto_plan] [--letterbase <id>|--host <site>]
|
|
659
|
+
relink_posts|mention_revisions|fix_autopilot|auto_plan|ai_portrayal] [--letterbase <id>|--host <site>]
|
|
660
660
|
[--name <n>] [--trigger competitor_page|competitor_change|visitor_identified|issue_found|build_suggestion|plan_update|custom|
|
|
661
661
|
schedule]
|
|
662
662
|
[--prompt <what Letterpress does with each event>] [--slack-channel <C…>] [--instruction <which events>]
|
|
@@ -1764,6 +1764,9 @@ Insights:
|
|
|
1764
1764
|
insights page <page> [--period 14d|30d|90d] [--question <prompt-id>] [--filter all|won] [--limit n]
|
|
1765
1765
|
One cited page: the AI answers that linked it, word for word
|
|
1766
1766
|
insights mentions [--site phantoms|<key>]... Measure → Pages → Naming you: which posts on your phantom sites name you
|
|
1767
|
+
insights portrayal [--period 14d|30d|90d] How AI answers describe you, what they get wrong
|
|
1768
|
+
insights claims [--period …] [--verdict true|outdated|wrong|unknown|unchecked] [--entity self|<rival>] [--limit n]
|
|
1769
|
+
The claims AI answers make about you, each checked against your facts
|
|
1767
1770
|
insights competitors [--period 14d|30d|90d] GEO → Competitors: share of mentions per brand, is it moving, by engine/question
|
|
1768
1771
|
insights question <key> [--period 14d|30d|90d] [--filter all|named_you|rival_not_you|no_one] [--limit n]
|
|
1769
1772
|
One By-question row: the wordings asked and the AI answers
|
|
@@ -36,6 +36,7 @@ const TEMPLATES = [
|
|
|
36
36
|
"mention_revisions",
|
|
37
37
|
"fix_autopilot",
|
|
38
38
|
"auto_plan",
|
|
39
|
+
"ai_portrayal",
|
|
39
40
|
];
|
|
40
41
|
const UNITS = ["hours", "days", "weeks", "months"];
|
|
41
42
|
const STATUSES = ["pending", "proposed", "acting", "acted", "answered", "skipped", "failed", "rejected"];
|
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
// network, single-post, and top-posts levels (ported from phantomstory-cli's
|
|
3
3
|
// insights.ts); plus Measure's Overview (`summary`), GEO → Competitors
|
|
4
4
|
// (`competitors`), AI Visibility Bank (`bank`) and phantom Page Access (`access`);
|
|
5
|
-
// Measure → Reads (`reads`), Questions (`questions`), Pages (`pages`, one page's answers `page`)
|
|
5
|
+
// Measure → Reads (`reads`), Questions (`questions`), Pages (`pages`, one page's answers `page`), the posts naming you (`mentions`)
|
|
6
|
+
// and Portrayal (`portrayal`, its claims `claims`: how AI answers describe you), and the live feed of what
|
|
6
7
|
// is reading the phantom sites (`activity`) — the same reads the web app renders. Search Console's
|
|
7
8
|
// property: which ones the connected Google account can read (`properties`) and the one tracked (`property`).
|
|
8
9
|
|
|
@@ -53,6 +54,15 @@ export const ARGS = {
|
|
|
53
54
|
list_site_mentions: {
|
|
54
55
|
sites: { flag: "site", type: "list" },
|
|
55
56
|
},
|
|
57
|
+
get_ai_portrayal: {
|
|
58
|
+
period: { flag: "period", enum: PERIODS },
|
|
59
|
+
},
|
|
60
|
+
list_answer_claims: {
|
|
61
|
+
period: { flag: "period", enum: PERIODS },
|
|
62
|
+
verdict: { flag: "verdict", enum: ["true", "outdated", "wrong", "unknown", "unchecked"] },
|
|
63
|
+
entity: { flag: "entity" },
|
|
64
|
+
limit: { flag: "limit", type: "num" },
|
|
65
|
+
},
|
|
56
66
|
get_recent_activity: {
|
|
57
67
|
phantom_id: { flag: "phantom" },
|
|
58
68
|
limit: { flag: "limit", type: "num" },
|
|
@@ -101,6 +111,10 @@ export async function cmdInsights(ctx) {
|
|
|
101
111
|
return call(rest, "get_cited_page_answers");
|
|
102
112
|
case "mentions":
|
|
103
113
|
return call(rest, "list_site_mentions");
|
|
114
|
+
case "portrayal":
|
|
115
|
+
return call(rest, "get_ai_portrayal");
|
|
116
|
+
case "claims":
|
|
117
|
+
return call(rest, "list_answer_claims");
|
|
104
118
|
case "activity":
|
|
105
119
|
return call(rest, "get_recent_activity");
|
|
106
120
|
case "properties":
|
|
@@ -109,7 +123,7 @@ export async function cmdInsights(ctx) {
|
|
|
109
123
|
return call(rest, "select_gsc_property");
|
|
110
124
|
default:
|
|
111
125
|
throw new CliError(
|
|
112
|
-
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, questions, pages, page, mentions, competitors, question, detection, activity, site, post, top, bank, access, properties, property`
|
|
126
|
+
`Unknown insights subcommand: ${sub ?? "(none)"}. Try: summary, reads, questions, pages, page, mentions, portrayal, claims, competitors, question, detection, activity, site, post, top, bank, access, properties, property`
|
|
113
127
|
);
|
|
114
128
|
}
|
|
115
129
|
}
|
|
@@ -203,8 +203,19 @@ function replicationDetail(ctx, result) {
|
|
|
203
203
|
}
|
|
204
204
|
if (r.dropped?.length)
|
|
205
205
|
lines.push("", `The site's own code left out (needs its builder's runtime): ${r.dropped.length}`);
|
|
206
|
-
|
|
207
|
-
|
|
206
|
+
// The runs as get_replication words them (lib/replicator/activity.ts): the latest in full, older ones in a line.
|
|
207
|
+
const runs = r.activity ?? [];
|
|
208
|
+
if (runs.length) {
|
|
209
|
+
lines.push("", "Activity:");
|
|
210
|
+
runs.forEach((run, i) => {
|
|
211
|
+
lines.push(` ${run.headline}`);
|
|
212
|
+
if (i > 0) return;
|
|
213
|
+
for (const e of run.events)
|
|
214
|
+
lines.push(
|
|
215
|
+
` ${e.at} ${e.title}${e.count > 1 ? ` (x${e.count})` : ""}${e.link ? ` ${e.link.href}` : ""}`
|
|
216
|
+
);
|
|
217
|
+
});
|
|
218
|
+
}
|
|
208
219
|
return lines.join("\n");
|
|
209
220
|
});
|
|
210
221
|
return 0;
|