@letterstory/cli 0.134.0 → 0.135.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.134.0";
65
+ export const VERSION = "0.135.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
@@ -927,6 +927,7 @@ Admin (STAFF key — --staff-key / LETTERSTORY_STAFF_API_KEY; acts before an org
927
927
  [--save-result …] [--draft]
928
928
  | renewals [--days 90]
929
929
  | reach-outs [--day YYYY-MM-DD] [--fresh] the day's reach-outs, N of 5 (#crm-reminders' count)
930
+ | replies [--days 14] replies nobody has answered yet, newest first
930
931
  | track-record [--since YYYY-MM-DD] | at-risk | expansion-signals
931
932
  | weekly-note the Monday retention note for the last full week
932
933
  | collections [--org-ids a,b | --account-stages won,active]
@@ -1371,11 +1372,13 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letterstory GitHub A
1371
1372
  [--branch <base>] [--attach <path>]... [--attach-url <name>=<https url>]...
1372
1373
  [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
1373
1374
  [--action build|build_pr|build_merge|slack|linear] [--with-preview]
1374
- [--harness claude-code|letterpress-1] [--wait]
1375
+ [--harness claude-code|letterpress-1] [--verifier|--no-verifier] [--wait]
1375
1376
  Start a change (attached files go to the sandbox;
1376
1377
  -ref ones are context, never put in the repo);
1377
1378
  --with-preview keeps a preview up next to the PR;
1378
1379
  --harness picks the coding agent (default: the deployment's);
1380
+ --verifier reviews the change and has the agent fix
1381
+ what's blocking before it goes out;
1379
1382
  --wait follows it to the PR
1380
1383
  repo fix-audit --issue <issue-type>... [--audit <id>] [--branch <base>] [--action build|build_pr|build_merge|slack|linear] [--wait]
1381
1384
  One PR fixing site-audit issues (repeat --issue to bundle) on every affected page,
@@ -14,7 +14,7 @@
14
14
  // The old names — evals, eval-add, eval-set, proposals, propose-eval, capture-eval, reject-eval — still work.)
15
15
  // admin evals scoreboard|cases|runs|run|triage|guard|retire … (fleet:read / tuning:experiment)
16
16
  // admin fleet-experiments list|articles|clients|mark|unmark|new|assign|assign-eligible|assign-orgs|spin-up|apply|start|stop|decide … (fleet:read / fleet:experiment)
17
- // admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (crm:read / crm:write)
17
+ // admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|replies|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (crm:read / crm:write)
18
18
  // admin spend summary|reconcile|pnl|margin|pricing|entries|add|import|usage|remove|reference|stripe-sync|services|service … (spend:read / spend:write)
19
19
  // admin brand-detection <org-id> (fleet:read)
20
20
  // admin brand-detection <org-id> [--term t]... [--exact t]... [--exclude p]... [--note "…"] | --clear [--note "…"] (fleet:instrument)
@@ -3399,6 +3399,16 @@ async function cmdAdminCrm(ctx) {
3399
3399
  ].join("\n")
3400
3400
  );
3401
3401
  }
3402
+ case "replies": {
3403
+ // admin crm replies [--days 14] — companies that answered us and that nobody has
3404
+ // reached since, newest first (src/lib/crm/replies-waiting.ts).
3405
+ const params = new URLSearchParams(compact({ days: flagStr(flags.days) }));
3406
+ return out(await staffRequest(ctx, "GET", `${CRM}/replies?${params}`), (r) =>
3407
+ r.replies.length === 0
3408
+ ? "No replies waiting."
3409
+ : r.replies.map((x) => `${x.at.slice(0, 10)} ${x.name} ${x.title ?? ""}`.trimEnd()).join("\n")
3410
+ );
3411
+ }
3402
3412
  case "reach-outs": {
3403
3413
  // admin crm reach-outs [--day YYYY-MM-DD] [--fresh] — the day's reach-out count toward
3404
3414
  // the target, the same number #crm-reminders posts (src/lib/crm/reach-out-day.ts).
@@ -3732,7 +3742,7 @@ async function cmdAdminCrm(ctx) {
3732
3742
  }
3733
3743
  default:
3734
3744
  throw new CliError(
3735
- "Usage: admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (see --help)"
3745
+ "Usage: admin crm import|capture|outreach|signals|record|signal|accounts|account|score|slack-channels|link-slack|white-glove|set-white-glove|churn|revenue|reach-outs|replies|record-churn|draft-churn-reason|undo-churn|outcomes|record-outcome|renewals|track-record|weekly-note|at-risk|expansion-signals|collections|delivery-flags|pulse|case|onboard|onboarding|retry-onboarding|onboard-plan|payment-link … (see --help)"
3736
3746
  );
3737
3747
  }
3738
3748
  }
@@ -110,6 +110,10 @@ export const ARGS = {
110
110
  ...fields,
111
111
  },
112
112
  list_generator_starters: {},
113
+ write_generator_steps: {
114
+ generator_id: { positional: 0, label: "enclosure-id", required: true },
115
+ prospect_id: "prospect",
116
+ },
113
117
  get_generator_version: {
114
118
  generator_id: { positional: 0, label: "enclosure-id", required: true },
115
119
  version: { value: (_flags, positionals) => Number(requirePositional(positionals, 1, "version")) },
@@ -177,6 +181,7 @@ const USAGE = `Usage: enclosures <list|show|create|update|prints>
177
181
  enclosures prints <enclosure-id> [--status done|failed|no_fit|…] [--limit <n>]
178
182
  enclosures starters
179
183
  enclosures create --starter site_audit --login <app-id> Begin from a starter (its version 1 included)
184
+ enclosures write-steps <enclosure-id> [--prospect <id>] Claude Code writes its steps from its description
180
185
  enclosures version <enclosure-id> <n> One version in full: its steps and the script prints replay
181
186
  enclosures add-version <enclosure-id> (--script <code>|--script-file <path>) --step <text>… [--host <h>…] [--summary <s>]
182
187
  enclosures approve <enclosure-id> --version <n>
@@ -208,6 +213,8 @@ export async function cmdEnclosures(ctx) {
208
213
  return enclosuresStarters(rest);
209
214
  case "version":
210
215
  return enclosuresVersion(rest);
216
+ case "write-steps":
217
+ return enclosuresWriteSteps(rest);
211
218
  case "add-version":
212
219
  return enclosuresAddVersion(rest);
213
220
  case "approve":
@@ -353,6 +360,18 @@ async function enclosuresStarters(ctx) {
353
360
  return 0;
354
361
  }
355
362
 
363
+ async function enclosuresWriteSteps(ctx) {
364
+ const { client, flags, positionals, io } = ctx;
365
+ refuseUnknownFlags(ctx, ARGS.write_generator_steps, []);
366
+ const result = await client.callTool(
367
+ "write_generator_steps",
368
+ argsFromFlags(ARGS.write_generator_steps, flags, positionals)
369
+ );
370
+ ok(ctx, "Claude Code is writing the steps. It takes a few minutes: watch it with `enclosures show`.");
371
+ printResult(io, flags, result, (r) => `run ${r.run.id} (${r.run.phase}), budget $${r.run.budget_usd}`);
372
+ return 0;
373
+ }
374
+
356
375
  async function enclosuresVersion(ctx) {
357
376
  const { client, flags, positionals, io } = ctx;
358
377
  refuseUnknownFlags(ctx, ARGS.get_generator_version, []);
@@ -68,6 +68,8 @@ const ARGS = {
68
68
  with_preview: { flag: "with-preview", type: "bool" },
69
69
  // --harness claude-code|letterpress-1: the coding agent; omitted, the deployment's default.
70
70
  harness: { flag: "harness", enum: ["claude-code", "letterpress-1"] },
71
+ // --verifier / --no-verifier: review the change before it goes out; omitted, the deployment's choice.
72
+ verifier: { value: (flags) => (flags["no-verifier"] ? false : flags.verifier ? true : undefined) },
71
73
  },
72
74
  create_repo_change_upload: { file_names: { internal: "the basenames of the --attach files" } },
73
75
  list_repo_sites: {},
@@ -341,6 +343,8 @@ async function repoStart(ctx) {
341
343
  "preview",
342
344
  "with-preview",
343
345
  "harness",
346
+ "verifier",
347
+ "no-verifier",
344
348
  "wait",
345
349
  ]);
346
350
  // One upload for every file (names must be unique across both), then the references marked.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.134.0",
3
+ "version": "0.135.0",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",