@letterstory/cli 0.132.0 → 0.134.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.
package/lib/cli.mjs CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  } from "./commands.mjs";
63
63
 
64
64
  // Keep in sync with cli/package.json.
65
- export const VERSION = "0.132.0";
65
+ export const VERSION = "0.134.0";
66
66
 
67
67
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
68
68
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -449,6 +449,10 @@ Reviewers:
449
449
  automations show <automation-id> --collection <id> What it covers, its queued posts, its next ideas
450
450
  automations ideas --collection <id> The ideas waiting, grouped by the automation that owns each
451
451
  automations suggest --collection <id> What it could add: topics, series formats, signals
452
+ automations starter --collection <id> The first automations, from its evidence, with the
453
+ calls that accept them (steps)
454
+ automations ground --collection <id> Its ground: strengths, near wins and gaps, with the numbers
455
+ automations works --collection <id> What works: each post and automation against its peers
452
456
  automations preview topic|series --collection <id> [--name <name>|--topic <id>] [--brief <text>]
453
457
  What it would write, before adding it
454
458
  automations more --collection <id> New topics it doesn't cover yet
@@ -1343,6 +1347,7 @@ The Site (one model of your whole marketing site, keyed by host and path):
1343
1347
  [--observation <id>]... Propose a registry tool call; input is validated now
1344
1348
  site decide <proposal-id> --decision accept|dismiss [--reason <why>]
1345
1349
  site fix <host> <observation-id>... [--action build|build_pr|build_merge|slack|linear|handoff] [--with-preview]
1350
+ [--harness claude-code|letterpress-1]
1346
1351
  One change for N observations; handoff prints the prompt, slack/linear need no repo
1347
1352
  site competitors [--since <iso> | --days <n>] [--limit <n>] Tracked competitors' sites: new and removed pages, by folder
1348
1353
  site watch-competitors [domain] [--limit <n>] Map competitors' sitemaps (the next few unmapped, or one now)
@@ -1365,10 +1370,12 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letterstory GitHub A
1365
1370
  repo start --repo <owner/name> --instructions <text>|--instructions-file <path|->
1366
1371
  [--branch <base>] [--attach <path>]... [--attach-url <name>=<https url>]...
1367
1372
  [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
1368
- [--action build|build_pr|build_merge|slack|linear] [--with-preview] [--wait]
1373
+ [--action build|build_pr|build_merge|slack|linear] [--with-preview]
1374
+ [--harness claude-code|letterpress-1] [--wait]
1369
1375
  Start a change (attached files go to the sandbox;
1370
1376
  -ref ones are context, never put in the repo);
1371
1377
  --with-preview keeps a preview up next to the PR;
1378
+ --harness picks the coding agent (default: the deployment's);
1372
1379
  --wait follows it to the PR
1373
1380
  repo fix-audit --issue <issue-type>... [--audit <id>] [--branch <base>] [--action build|build_pr|build_merge|slack|linear] [--wait]
1374
1381
  One PR fixing site-audit issues (repeat --issue to bundle) on every affected page,
@@ -1,5 +1,5 @@
1
1
  // `automations` — a letterbase's automations (docs/architecture/automations.md): what it writes,
2
- // how often, and why. list / show / ideas / suggest / preview / more / add / set / dismiss / remove, through the same tools the app uses.
2
+ // how often, and why. list / show / ideas / suggest / starter / ground / works / preview / more / add / set / dismiss / remove, through the same tools the app uses.
3
3
  // Same flag/positional/io conventions as posts.mjs — no commander, no color.
4
4
 
5
5
  import { CliError } from "../client.mjs";
@@ -16,6 +16,15 @@ export const ARGS = {
16
16
  suggest_automations: {
17
17
  collection_id: { flag: "collection", required: true },
18
18
  },
19
+ suggest_starter_automations: {
20
+ collection_id: { flag: "collection", required: true },
21
+ },
22
+ get_ground_measures: {
23
+ collection_id: { flag: "collection", required: true },
24
+ },
25
+ get_what_works: {
26
+ collection_id: { flag: "collection", required: true },
27
+ },
19
28
  get_automation: {
20
29
  collection_id: { flag: "collection", required: true },
21
30
  automation_id: { positional: 0, label: "automation-id", required: true },
@@ -61,6 +70,7 @@ export const ARGS = {
61
70
  dismiss_subject: {
62
71
  collection_id: { flag: "collection", required: true },
63
72
  topic_id: { positional: 0, label: "topic-id", required: true },
73
+ reason: { flag: "reason" },
64
74
  },
65
75
  delete_automation: {
66
76
  collection_id: { flag: "collection", required: true },
@@ -81,6 +91,12 @@ export async function cmdAutomations(ctx) {
81
91
  return run(rest, "list_automation_ideas");
82
92
  case "suggest":
83
93
  return run(rest, "suggest_automations");
94
+ case "starter":
95
+ return run(rest, "suggest_starter_automations");
96
+ case "ground":
97
+ return run(rest, "get_ground_measures");
98
+ case "works":
99
+ return run(rest, "get_what_works");
84
100
  case "preview":
85
101
  return run(rest, "preview_automation");
86
102
  case "more":
@@ -97,7 +113,7 @@ export async function cmdAutomations(ctx) {
97
113
  return run(rest, "delete_automation", "Removed.");
98
114
  default:
99
115
  throw new CliError(
100
- `Unknown automations subcommand: ${sub ?? "(none)"}. Try: list, show, ideas, suggest, preview, more, add, set, dismiss, remove`
116
+ `Unknown automations subcommand: ${sub ?? "(none)"}. Try: list, show, ideas, suggest, starter, ground, works, preview, more, add, set, dismiss, remove`
101
117
  );
102
118
  }
103
119
  }
@@ -103,9 +103,11 @@ export async function cmdSuggestions(ctx) {
103
103
  return suggestionsDecide(rest, "dismiss");
104
104
  case "snooze":
105
105
  return suggestionsDecide(rest, "snooze");
106
+ case "undo":
107
+ return suggestionsDecide(rest, "undo");
106
108
  default:
107
109
  throw new CliError(
108
- "Usage: suggestions <list <collection_id>|approve|dismiss|snooze <verdict|proposal> <id>>"
110
+ "Usage: suggestions <list <collection_id>|approve|dismiss|snooze|undo <verdict|proposal> <id>>"
109
111
  );
110
112
  }
111
113
  }
@@ -117,7 +119,9 @@ function formatSuggestionLine(s) {
117
119
  ? `snoozed→${s.snoozed_until.slice(0, 10)}`
118
120
  : `auto→${(s.auto_apply_at ?? "").slice(0, 10)}`
119
121
  : "hold";
120
- return `${s.kind} ${s.id} [${when}] ${s.cluster_name ?? "site"}: ${s.title}`;
122
+ const line = `${s.kind} ${s.id} [${when}] ${s.cluster_name ?? "site"}: ${s.title}`;
123
+ // A change to the automations' week: the week after, and why.
124
+ return s.week ? `${line}\n ${s.week.line}\n ${s.reason ?? ""}` : line;
121
125
  }
122
126
 
123
127
  async function suggestionsList(ctx) {
@@ -66,6 +66,8 @@ const ARGS = {
66
66
  preview: { flag: "preview", type: "bool" },
67
67
  // --with-preview: the PR opens straight away and a preview of the change stays up next to it.
68
68
  with_preview: { flag: "with-preview", type: "bool" },
69
+ // --harness claude-code|letterpress-1: the coding agent; omitted, the deployment's default.
70
+ harness: { flag: "harness", enum: ["claude-code", "letterpress-1"] },
69
71
  },
70
72
  create_repo_change_upload: { file_names: { internal: "the basenames of the --attach files" } },
71
73
  list_repo_sites: {},
@@ -338,6 +340,7 @@ async function repoStart(ctx) {
338
340
  "action",
339
341
  "preview",
340
342
  "with-preview",
343
+ "harness",
341
344
  "wait",
342
345
  ]);
343
346
  // One upload for every file (names must be unique across both), then the references marked.
@@ -180,6 +180,8 @@ const ARGS = {
180
180
  action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear", "handoff"] },
181
181
  // --with-preview: the PR opens straight away and a preview of the fix stays up next to it.
182
182
  with_preview: { flag: "with-preview", type: "bool" },
183
+ // --harness claude-code|letterpress-1: the coding agent; omitted, the deployment's default.
184
+ harness: { flag: "harness", enum: ["claude-code", "letterpress-1"] },
183
185
  },
184
186
  };
185
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.132.0",
3
+ "version": "0.134.0",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",