@letterstory/cli 0.177.176 → 0.177.177

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.176";
96
+ export const VERSION = "0.177.177";
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;
@@ -102,6 +102,7 @@ export const EXIT_PAYMENT_REQUIRED = 3;
102
102
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
103
103
  // `negate` spelling) in a command's ARGS map must be listed; boolean-flags.test.ts enforces it.
104
104
  export const BOOLEAN_FLAGS = new Set([
105
+ "approve",
105
106
  "update",
106
107
  // repo list: open changes past --limit are listed unless --newest-only.
107
108
  "include-open",
@@ -51,6 +51,20 @@ const paymentScopeArgs = {
51
51
  };
52
52
 
53
53
  export const ARGS = {
54
+ list_evidence_snapshots: { site_id: { flag: "site" } },
55
+ draft_evidence_snapshot: {
56
+ fresh: { flag: "fresh", type: "bool" },
57
+ choice_id: { flag: "choice" },
58
+ days: { flag: "days", type: "num" },
59
+ site_id: { flag: "site" },
60
+ prompt: { positional: 0, required: true, label: "prompt" },
61
+ },
62
+ calculate_evidence_snapshot: { id: { positional: 0, required: true, label: "draft id" } },
63
+ publish_evidence_snapshot: {
64
+ id: { positional: 0, required: true, label: "reviewed draft id" },
65
+ approve: { value: (flags) => flags.approve === true },
66
+ },
67
+
54
68
  connect_usage_payments: {
55
69
  host: { flag: "host" },
56
70
  restricted_key: {
@@ -364,6 +378,17 @@ export async function cmdUsage(ctx) {
364
378
  printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, [])));
365
379
  return 0;
366
380
  }
381
+ if (ctx.positionals[0] === "evidence") {
382
+ const tool = {
383
+ list: "list_evidence_snapshots",
384
+ draft: "draft_evidence_snapshot",
385
+ calculate: "calculate_evidence_snapshot",
386
+ publish: "publish_evidence_snapshot",
387
+ }[ctx.positionals[1] || "list"];
388
+ if (!tool) throw new CliError("Use evidence list, draft, calculate or publish");
389
+ printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, ctx.positionals.slice(2))));
390
+ return 0;
391
+ }
367
392
  if (ctx.positionals[0] === "shown") {
368
393
  const sub = ctx.positionals[1] ?? "status";
369
394
  const rest = ctx.positionals.slice(2);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.176",
3
+ "version": "0.177.177",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",