@letterstory/cli 0.177.118 → 0.177.120

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
@@ -92,7 +92,7 @@ import {
92
92
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
93
93
 
94
94
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
95
- export const VERSION = "0.177.118";
95
+ export const VERSION = "0.177.120";
96
96
 
97
97
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
98
98
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -179,8 +179,10 @@ export const BOOLEAN_FLAGS = new Set([
179
179
  "fresh",
180
180
  // admin letterpress tokens: today so far against yesterday and a week ago.
181
181
  "so-far",
182
- // admin letterpress telemetry | prs | tokens: every org, test and demo orgs included.
182
+ // admin letterpress telemetry | prs | tokens: every org, test and demo orgs included. log: every org's Log.
183
183
  "all-orgs",
184
+ // log --all-orgs: test, demo and Letter's own orgs too.
185
+ "with-internal",
184
186
  // admin letterpress prs | failures: since the first PR or build (all_time).
185
187
  "all-time",
186
188
  // admin letterpress failures: the builds that took far longer than usual.
@@ -270,6 +272,8 @@ export const BOOLEAN_FLAGS = new Set([
270
272
  "keep-preview",
271
273
  "sample-banner",
272
274
  "with-preview",
275
+ // build / repo start / site fix --keep-open: the org's auto-merge window never merges its pull request.
276
+ "keep-open",
273
277
  // repo …: the repo is a GitLab project (--repo group/subgroup/project).
274
278
  "gitlab",
275
279
  "accept",
@@ -1588,6 +1592,7 @@ Seers (event-driven signals -> drafts):
1588
1592
 
1589
1593
  Log (what Letter did for your org, newest first: pull requests, posts, emails, purchases):
1590
1594
  log [--limit <n>] [--before <ISO>] One page; --before pages back
1595
+ log --all-orgs [--with-internal] Staff: every org's, each with its org
1591
1596
 
1592
1597
  Org (the account as one file, its integrations and billing):
1593
1598
  org export [--sections <s>…] [--file <path>] The org's whole config as one JSON bundle
@@ -66,6 +66,8 @@ const ARGS = {
66
66
  // -ref ones are context the agent reads, never put in the repo.
67
67
  files: { value: (_flags, _positionals, extra) => (extra.files?.length ? extra.files : undefined) },
68
68
  delivery: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear"] },
69
+ // --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
70
+ keep_open: { flag: "keep-open", type: "bool" },
69
71
  notify_slack: { flag: "notify-slack", type: "bool" },
70
72
  // --primitives-access: its change reads Letter's tools from its sandbox (a read-only MCP key beside the repo).
71
73
  primitives_access: { flag: "primitives-access", type: "bool" },
@@ -159,6 +161,8 @@ const ARGS = {
159
161
  repo: "repo",
160
162
  // --action build|build_pr|build_merge: how a build this message starts is delivered (Letter Edit's auto-merge sends build_merge).
161
163
  delivery: { flag: "action", enum: ["build", "build_pr", "build_merge"] },
164
+ // --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
165
+ keep_open: { flag: "keep-open", type: "bool" },
162
166
  // --intent build: the words are a command to make the change (what ⌘L's Make Pull Request sends), never answered with only a reply.
163
167
  intent: { flag: "intent", enum: ["build"] },
164
168
  },
@@ -2,19 +2,24 @@
2
2
  // A thin wrapper over get_letter_log, the function the app's Log page calls.
3
3
  //
4
4
  // letterstory log [--limit <n>] [--before <ISO>]
5
+ // letterstory log --all-orgs [--with-internal] staff: every org's (get_global_log)
5
6
 
6
7
  import { argsFromFlags, printResult } from "./shared.mjs";
7
8
 
9
+ const page = {
10
+ limit: { flag: "limit", type: "num" },
11
+ before: { flag: "before" },
12
+ };
13
+
8
14
  export const ARGS = {
9
- get_letter_log: {
10
- limit: { flag: "limit", type: "num" },
11
- before: { flag: "before" },
12
- },
15
+ get_letter_log: page,
16
+ get_global_log: { ...page, customer_only: { flag: "with-internal", type: "bool", invert: true } },
13
17
  };
14
18
 
15
19
  export async function cmdLog(ctx) {
16
20
  const { client, flags, io } = ctx;
17
- const result = await client.callTool("get_letter_log", argsFromFlags(ARGS.get_letter_log, flags, ctx.positionals));
21
+ const tool = flags["all-orgs"] ? "get_global_log" : "get_letter_log";
22
+ const result = await client.callTool(tool, argsFromFlags(ARGS[tool], flags, ctx.positionals));
18
23
  printResult(
19
24
  io,
20
25
  flags,
@@ -23,7 +28,7 @@ export async function cmdLog(ctx) {
23
28
  [
24
29
  ...r.entries.map(
25
30
  (e) =>
26
- `${e.at.slice(0, 16).replace("T", " ")} ${e.action}${e.title ? ` ${e.title}` : ""}${e.by ? ` (${e.by})` : ""}`
31
+ `${e.at.slice(0, 16).replace("T", " ")} ${e.action}${e.title ? ` ${e.title}` : ""}${e.by ? ` (${e.by})` : ""}${e.org ? ` [${e.org.name ?? e.org.id}]` : ""}`
27
32
  ),
28
33
  ...(r.next_before ? [`Older: letterstory log --before ${r.next_before}`] : []),
29
34
  ].join("\n") || "Nothing yet"
@@ -101,6 +101,8 @@ const ARGS = {
101
101
  preview: { flag: "preview", type: "bool" },
102
102
  // --with-preview: the PR opens straight away and a preview of the change stays up next to it.
103
103
  with_preview: { flag: "with-preview", type: "bool" },
104
+ // --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
105
+ keep_open: { flag: "keep-open", type: "bool" },
104
106
  // --harness letterpress-1|claude-code|codex: the coding agent (codex is GPT, through OpenAI's Codex CLI);
105
107
  // omitted, the organization's default.
106
108
  harness: { flag: "harness", enum: ["claude-code", "letterpress-1", "codex"] },
@@ -229,6 +229,8 @@ const ARGS = {
229
229
  action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear", "handoff"] },
230
230
  // --with-preview: the PR opens straight away and a preview of the fix stays up next to it.
231
231
  with_preview: { flag: "with-preview", type: "bool" },
232
+ // --keep-open: the organization's auto-merge window never merges its pull request (Merge still does).
233
+ keep_open: { flag: "keep-open", type: "bool" },
232
234
  // --harness letterpress-1|claude-code|codex: the coding agent (codex is GPT); omitted, the organization's default.
233
235
  harness: { flag: "harness", enum: ["letterpress-1", "claude-code", "codex"] },
234
236
  // --again: ask for held findings again on purpose (clears what the last change found on them, and starts).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.118",
3
+ "version": "0.177.120",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",