@letterstory/cli 0.177.137 → 0.177.138

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 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.137";
96
+ export const VERSION = "0.177.138";
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;
@@ -933,6 +933,7 @@ Offerings (context layered org → offering → collection; a layer sets only wh
933
933
  offerings topic <topic-id> --offering <offering-id|none>
934
934
  Override which offering one planner topic promotes
935
935
  probes list [--collection <uuid>] [--active-only] [--kind mention|citation|page] [--days 30]
936
+ probes remove <probe_id>
936
937
  probes keep | pause | resume <probe_id> Keep = protect an AI probe from rotation (no pause)
937
938
  probes edit <probe_id> <new question text> Fix/sharpen a generated probe
938
939
  probes add <question> [--kind mention|citation] [--scope site|company|<blogId>] [--cluster <id>]
@@ -1922,8 +1923,9 @@ Insights:
1922
1923
  insights prompts [--period 14d|30d|90d] Measure → Prompt tracking: every prompt we ask, each engine's latest answer, share / change / cited
1923
1924
  insights keywords [topic] [--refresh] Measure → Keyword tracking: your keywords (searches, difficulty, intent, rank, tracked), or research a topic
1924
1925
  insights tracking-cadence Read prompt and keyword refresh schedules
1925
- insights set-tracking-cadence --tracking prompts|keywords --days <n>
1926
+ insights set-tracking-cadence --tracking prompts|keywords [--days <n>] [--engine <keys|all>]
1926
1927
  Set the refresh interval in days
1928
+ insights run-prompts [--question <keys>] [--engine <keys>] [--accepted-quote <json>]
1927
1929
  insights add-keywords --cluster <id> --keyword <k> Add keywords to a keyword cluster (repeat --keyword or comma-separate)
1928
1930
  insights pages [--period 14d|30d|90d] [--site own|phantoms|<key>] Measure → Pages: your pages AI answers cited, won questions first
1929
1931
  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", required: true },
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");
@@ -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
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.137",
3
+ "version": "0.177.138",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",