@letterstory/cli 0.177.137 → 0.177.139
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 +8 -2
- package/lib/commands/insights.mjs +25 -2
- package/lib/commands/posts.mjs +11 -1
- package/lib/commands/probes.mjs +3 -1
- package/package.json +1 -1
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.
|
|
96
|
+
export const VERSION = "0.177.139";
|
|
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;
|
|
@@ -109,6 +109,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
109
109
|
"disconnect",
|
|
110
110
|
// models list: say whether each trained model's server is up now.
|
|
111
111
|
"serving",
|
|
112
|
+
// posts remediate: change a post a person has edited.
|
|
113
|
+
"allow-edited",
|
|
112
114
|
// Models material: retain a request for attachments before preparing it.
|
|
113
115
|
"stage-only",
|
|
114
116
|
// visits export: only the people or companies who fit the ICP, or only those who don't.
|
|
@@ -701,6 +703,8 @@ Content:
|
|
|
701
703
|
[--paper-trail '<json>'] [--metadata-json '<json>']
|
|
702
704
|
Edit a post; only what you pass changes
|
|
703
705
|
posts edit <article-id> --instruction "<what to change>"
|
|
706
|
+
posts remediate <article-id> [--instruction "<what to change>"] [--line "<sentence>" ...] [--apply] [--allow-edited]
|
|
707
|
+
change only the named sentences, never the rest; a dry run unless --apply
|
|
704
708
|
Rewrite the post with AI from an instruction
|
|
705
709
|
posts mentions <article-id> Re-apply the brand-mention & competitor policy
|
|
706
710
|
posts history <article-id> The post's versions, newest first
|
|
@@ -933,6 +937,7 @@ Offerings (context layered org → offering → collection; a layer sets only wh
|
|
|
933
937
|
offerings topic <topic-id> --offering <offering-id|none>
|
|
934
938
|
Override which offering one planner topic promotes
|
|
935
939
|
probes list [--collection <uuid>] [--active-only] [--kind mention|citation|page] [--days 30]
|
|
940
|
+
probes remove <probe_id>
|
|
936
941
|
probes keep | pause | resume <probe_id> Keep = protect an AI probe from rotation (no pause)
|
|
937
942
|
probes edit <probe_id> <new question text> Fix/sharpen a generated probe
|
|
938
943
|
probes add <question> [--kind mention|citation] [--scope site|company|<blogId>] [--cluster <id>]
|
|
@@ -1922,8 +1927,9 @@ Insights:
|
|
|
1922
1927
|
insights prompts [--period 14d|30d|90d] Measure → Prompt tracking: every prompt we ask, each engine's latest answer, share / change / cited
|
|
1923
1928
|
insights keywords [topic] [--refresh] Measure → Keyword tracking: your keywords (searches, difficulty, intent, rank, tracked), or research a topic
|
|
1924
1929
|
insights tracking-cadence Read prompt and keyword refresh schedules
|
|
1925
|
-
insights set-tracking-cadence --tracking prompts|keywords --days <n>
|
|
1930
|
+
insights set-tracking-cadence --tracking prompts|keywords [--days <n>] [--engine <keys|all>]
|
|
1926
1931
|
Set the refresh interval in days
|
|
1932
|
+
insights run-prompts [--question <keys>] [--engine <keys>] [--accepted-quote <json>]
|
|
1927
1933
|
insights add-keywords --cluster <id> --keyword <k> Add keywords to a keyword cluster (repeat --keyword or comma-separate)
|
|
1928
1934
|
insights pages [--period 14d|30d|90d] [--site own|phantoms|<key>] Measure → Pages: your pages AI answers cited, won questions first
|
|
1929
1935
|
insights page <page> [--period 14d|30d|90d] [--question <prompt-id>] [--filter all|won] [--limit n]
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
// property: which ones the connected Google account can read (`properties`) and the one tracked (`property`).
|
|
10
10
|
|
|
11
11
|
import { CliError } from "../client.mjs";
|
|
12
|
-
import { flagStr, flagNum, requirePositional, printResult, compact, argsFromFlags } from "./shared.mjs";
|
|
12
|
+
import { flagStr, flagNum, flagList, requirePositional, printResult, compact, argsFromFlags } from "./shared.mjs";
|
|
13
13
|
|
|
14
14
|
const PERIODS = ["14d", "30d", "90d"];
|
|
15
15
|
|
|
@@ -41,7 +41,28 @@ export const ARGS = {
|
|
|
41
41
|
get_tracking_cadence: {},
|
|
42
42
|
set_tracking_cadence: {
|
|
43
43
|
tracking: { flag: "tracking", enum: ["prompts", "keywords"], required: true },
|
|
44
|
-
days: { flag: "days", type: "num"
|
|
44
|
+
days: { flag: "days", type: "num" },
|
|
45
|
+
engines: {
|
|
46
|
+
value: (flags) => {
|
|
47
|
+
const keys = flagList(flags.engine);
|
|
48
|
+
return keys?.length === 1 && keys[0] === "all" ? null : keys?.length ? keys : undefined;
|
|
49
|
+
},
|
|
50
|
+
},
|
|
51
|
+
},
|
|
52
|
+
run_tracked_prompts: {
|
|
53
|
+
question_keys: { flag: "question", type: "list" },
|
|
54
|
+
engines: { flag: "engine", type: "list" },
|
|
55
|
+
accepted_quote: {
|
|
56
|
+
value: (flags) => {
|
|
57
|
+
const quote = flagStr(flags["accepted-quote"]);
|
|
58
|
+
if (quote === undefined) return undefined;
|
|
59
|
+
try {
|
|
60
|
+
return JSON.parse(quote);
|
|
61
|
+
} catch {
|
|
62
|
+
throw new CliError("--accepted-quote takes JSON.");
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
},
|
|
45
66
|
},
|
|
46
67
|
list_measure_questions: {
|
|
47
68
|
period: { flag: "period", enum: PERIODS },
|
|
@@ -127,6 +148,8 @@ export async function cmdInsights(ctx) {
|
|
|
127
148
|
return call(rest, "get_tracking_cadence");
|
|
128
149
|
case "set-tracking-cadence":
|
|
129
150
|
return call(rest, "set_tracking_cadence");
|
|
151
|
+
case "run-prompts":
|
|
152
|
+
return call(rest, "run_tracked_prompts");
|
|
130
153
|
case "questions":
|
|
131
154
|
case "prompts":
|
|
132
155
|
return call(rest, "list_measure_questions");
|
package/lib/commands/posts.mjs
CHANGED
|
@@ -88,6 +88,13 @@ export const ARGS = {
|
|
|
88
88
|
article_id: ARTICLE,
|
|
89
89
|
instruction: { flag: "instruction", required: true },
|
|
90
90
|
},
|
|
91
|
+
remediate_article: {
|
|
92
|
+
article_id: ARTICLE,
|
|
93
|
+
instruction: "instruction",
|
|
94
|
+
lines: { flag: "line", type: "list", label: "line" },
|
|
95
|
+
apply: { flag: "apply", type: "bool" },
|
|
96
|
+
allow_edited: { flag: "allow-edited", type: "bool" },
|
|
97
|
+
},
|
|
91
98
|
run_mention_pass: {
|
|
92
99
|
article_id: ARTICLE,
|
|
93
100
|
},
|
|
@@ -155,6 +162,8 @@ export async function cmdPosts(ctx) {
|
|
|
155
162
|
return postsWrite(rest, "update_article", "Updated.");
|
|
156
163
|
case "edit":
|
|
157
164
|
return postsWrite(rest, "edit_article_with_prompt", "Edited.");
|
|
165
|
+
case "remediate":
|
|
166
|
+
return postsWrite(rest, "remediate_article", "Remediated.");
|
|
158
167
|
case "mentions":
|
|
159
168
|
return postsWrite(rest, "run_mention_pass", "Mention pass done.");
|
|
160
169
|
case "history":
|
|
@@ -174,7 +183,7 @@ export async function cmdPosts(ctx) {
|
|
|
174
183
|
return postsDelete(rest);
|
|
175
184
|
default:
|
|
176
185
|
throw new CliError(
|
|
177
|
-
`Unknown posts subcommand: ${sub ?? "(none)"}. Try: list, show, new, update, edit, mentions, history, restore, export, comments, publish, unpublish, delete`
|
|
186
|
+
`Unknown posts subcommand: ${sub ?? "(none)"}. Try: list, show, new, update, edit, remediate, mentions, history, restore, export, comments, publish, unpublish, delete`
|
|
178
187
|
);
|
|
179
188
|
}
|
|
180
189
|
}
|
|
@@ -183,6 +192,7 @@ export async function cmdPosts(ctx) {
|
|
|
183
192
|
const CALL = {
|
|
184
193
|
update_article: (client, args) => client.callTool("update_article", args),
|
|
185
194
|
edit_article_with_prompt: (client, args) => client.callTool("edit_article_with_prompt", args),
|
|
195
|
+
remediate_article: (client, args) => client.callTool("remediate_article", args),
|
|
186
196
|
run_mention_pass: (client, args) => client.callTool("run_mention_pass", args),
|
|
187
197
|
get_article_history: (client, args) => client.callTool("get_article_history", args),
|
|
188
198
|
restore_article_version: (client, args) => client.callTool("restore_article_version", args),
|
package/lib/commands/probes.mjs
CHANGED
|
@@ -37,6 +37,8 @@ export async function cmdProbes(ctx) {
|
|
|
37
37
|
return probesControl(rest, "keep");
|
|
38
38
|
case "pause":
|
|
39
39
|
return probesControl(rest, "pause");
|
|
40
|
+
case "remove":
|
|
41
|
+
return probesControl(rest, "remove");
|
|
40
42
|
case "resume":
|
|
41
43
|
return probesControl(rest, "resume");
|
|
42
44
|
case "edit":
|
|
@@ -46,7 +48,7 @@ export async function cmdProbes(ctx) {
|
|
|
46
48
|
case "priority":
|
|
47
49
|
return probesPriority(rest);
|
|
48
50
|
default:
|
|
49
|
-
throw new CliError("Usage: probes <list|keep|pause|resume|edit|add|priority>");
|
|
51
|
+
throw new CliError("Usage: probes <list|keep|pause|resume|remove|edit|add|priority>");
|
|
50
52
|
}
|
|
51
53
|
}
|
|
52
54
|
|