@letterstory/cli 0.175.13 → 0.175.15

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
@@ -78,7 +78,7 @@ import {
78
78
  } from "./commands.mjs";
79
79
 
80
80
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
81
- export const VERSION = "0.175.13";
81
+ export const VERSION = "0.175.15";
82
82
 
83
83
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
84
84
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -505,7 +505,7 @@ Phantomstory (a collection Letter hosts as an independent publication):
505
505
  phantom delete <phantom-id> --yes
506
506
 
507
507
  Content:
508
- posts list [--limit <n>] [--offset <n>] [--collection <uuid>] [--search <words>] [--mine]
508
+ posts list [--limit <n>] [--offset <n>] [--collection <uuid>] [--search <words>] [--mine] [--published-after <date>] [--published-before <date>]
509
509
  List your articles
510
510
  posts show <article-id> Show one article
511
511
  posts new --title <t> --collection <uuid> (--body <text> | --file <path|->) [--article-id <uuid>] [--context <text>]
@@ -252,6 +252,8 @@ async function postsList(ctx) {
252
252
  collection_id: flagStr(flags.collection),
253
253
  search: flagStr(flags.search),
254
254
  mine: flags.mine === true ? true : undefined,
255
+ published_after: flagStr(flags["published-after"]),
256
+ published_before: flagStr(flags["published-before"]),
255
257
  });
256
258
  const result = await client.callTool("list_articles", args);
257
259
  printResult(io, flags, result);
@@ -5,6 +5,7 @@
5
5
  // repo list → list_repo_changes repo cancel → cancel_repo_change
6
6
  // repo publish → publish_repo_change (Make PR on a preview)
7
7
  // repo merge → merge_repo_change (merge its open PR, as a squash)
8
+ // repo retry → retry_repo_change (try a failed change again: same ask, fresh run)
8
9
  // repo revise → revise_repo_change (ask for more on a preview or an open PR; --copy-edits-file for exact copy)
9
10
  // repo say → send_repo_change_message (steer a build while its agent works)
10
11
  // repo repos → list_github_app_repos repo branches → list_repo_branches
@@ -260,6 +261,7 @@ const ARGS = {
260
261
  },
261
262
  publish_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
262
263
  merge_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
264
+ retry_repo_change: { run_id: { positional: 0, required: true, label: "run-id" } },
263
265
  revise_repo_change: {
264
266
  run_id: { positional: 0, required: true, label: "run-id" },
265
267
  instructions: { value: (flags) => readTextInput(flags, "instructions", "instructions-file") },
@@ -374,6 +376,8 @@ export async function cmdRepo(ctx) {
374
376
  return repoPublish(rest);
375
377
  case "merge":
376
378
  return repoMerge(rest);
379
+ case "retry":
380
+ return repoRetry(rest);
377
381
  case "revise":
378
382
  return repoRevise(rest);
379
383
  case "say":
@@ -396,7 +400,7 @@ export async function cmdRepo(ctx) {
396
400
  return repoSlackTest(rest);
397
401
  default:
398
402
  throw new CliError(
399
- `Unknown repo subcommand: ${sub ?? "(none)"}. Try: start, fix-audit, install-letterprove, install-visitors, sites, set-site, reset-site, secrets, set-secret, delete-secret, status, list, publish, merge, revise, say, cancel, repos, branches, prs, settings, suggestions, slack-targets, slack-test`
403
+ `Unknown repo subcommand: ${sub ?? "(none)"}. Try: start, fix-audit, install-letterprove, install-visitors, sites, set-site, reset-site, secrets, set-secret, delete-secret, status, list, publish, merge, retry, revise, say, cancel, repos, branches, prs, settings, suggestions, slack-targets, slack-test`
400
404
  );
401
405
  }
402
406
  }
@@ -733,6 +737,18 @@ async function repoMerge(ctx) {
733
737
  return 0;
734
738
  }
735
739
 
740
+ /** `repo retry <run-id>`: try a failed change again, as a fresh run with the same ask and options. */
741
+ async function repoRetry(ctx) {
742
+ const { client, flags, io } = ctx;
743
+ const result = await client.callTool(
744
+ "retry_repo_change",
745
+ argsFromFlags(ARGS.retry_repo_change, flags, ctx.positionals)
746
+ );
747
+ ok(ctx, result.message);
748
+ printResult(io, flags, result.run, describe);
749
+ return 0;
750
+ }
751
+
736
752
  /** `repo say <run-id> <message…>` (or --message): steer a build while its agent works. */
737
753
  async function repoSay(ctx) {
738
754
  const { client, flags, io } = ctx;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.175.13",
3
+ "version": "0.175.15",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",