@letterstory/cli 0.177.117 → 0.177.118
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 +6 -1
- package/lib/commands/log.mjs +32 -0
- package/lib/commands.mjs +1 -0
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -87,11 +87,12 @@ import {
|
|
|
87
87
|
cmdRefs,
|
|
88
88
|
cmdModels,
|
|
89
89
|
cmdUsage,
|
|
90
|
+
cmdLog,
|
|
90
91
|
} from "./commands.mjs";
|
|
91
92
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
92
93
|
|
|
93
94
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
94
|
-
export const VERSION = "0.177.
|
|
95
|
+
export const VERSION = "0.177.118";
|
|
95
96
|
|
|
96
97
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
97
98
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -1585,6 +1586,9 @@ Seers (event-driven signals -> drafts):
|
|
|
1585
1586
|
seers apply --file <path> [--dry-run] Idempotent, name-keyed upsert from a manifest
|
|
1586
1587
|
(never deletes; --dry-run prints the plan)
|
|
1587
1588
|
|
|
1589
|
+
Log (what Letter did for your org, newest first: pull requests, posts, emails, purchases):
|
|
1590
|
+
log [--limit <n>] [--before <ISO>] One page; --before pages back
|
|
1591
|
+
|
|
1588
1592
|
Org (the account as one file, its integrations and billing):
|
|
1589
1593
|
org export [--sections <s>…] [--file <path>] The org's whole config as one JSON bundle
|
|
1590
1594
|
org export --split <dir> …as one file per record (for keeping config in git)
|
|
@@ -2373,6 +2377,7 @@ const CLIENT_COMMANDS = {
|
|
|
2373
2377
|
refs: cmdRefs,
|
|
2374
2378
|
models: cmdModels,
|
|
2375
2379
|
usage: cmdUsage,
|
|
2380
|
+
log: cmdLog,
|
|
2376
2381
|
// Platform-scoped (staff key) — the only commands that act BEFORE an org exists.
|
|
2377
2382
|
admin: cmdAdmin,
|
|
2378
2383
|
};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
// `log` — the Log from a terminal (docs/architecture/letter-log.md): what Letter did for the org, newest first.
|
|
2
|
+
// A thin wrapper over get_letter_log, the function the app's Log page calls.
|
|
3
|
+
//
|
|
4
|
+
// letterstory log [--limit <n>] [--before <ISO>]
|
|
5
|
+
|
|
6
|
+
import { argsFromFlags, printResult } from "./shared.mjs";
|
|
7
|
+
|
|
8
|
+
export const ARGS = {
|
|
9
|
+
get_letter_log: {
|
|
10
|
+
limit: { flag: "limit", type: "num" },
|
|
11
|
+
before: { flag: "before" },
|
|
12
|
+
},
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
export async function cmdLog(ctx) {
|
|
16
|
+
const { client, flags, io } = ctx;
|
|
17
|
+
const result = await client.callTool("get_letter_log", argsFromFlags(ARGS.get_letter_log, flags, ctx.positionals));
|
|
18
|
+
printResult(
|
|
19
|
+
io,
|
|
20
|
+
flags,
|
|
21
|
+
result,
|
|
22
|
+
(r) =>
|
|
23
|
+
[
|
|
24
|
+
...r.entries.map(
|
|
25
|
+
(e) =>
|
|
26
|
+
`${e.at.slice(0, 16).replace("T", " ")} ${e.action}${e.title ? ` ${e.title}` : ""}${e.by ? ` (${e.by})` : ""}`
|
|
27
|
+
),
|
|
28
|
+
...(r.next_before ? [`Older: letterstory log --before ${r.next_before}`] : []),
|
|
29
|
+
].join("\n") || "Nothing yet"
|
|
30
|
+
);
|
|
31
|
+
return 0;
|
|
32
|
+
}
|
package/lib/commands.mjs
CHANGED
|
@@ -56,6 +56,7 @@ export * from "./commands/sim.mjs";
|
|
|
56
56
|
export * from "./commands/vary.mjs";
|
|
57
57
|
export * from "./commands/domains.mjs";
|
|
58
58
|
export * from "./commands/usage.mjs";
|
|
59
|
+
export * from "./commands/log.mjs";
|
|
59
60
|
export * from "./commands/proofs.mjs";
|
|
60
61
|
export * from "./commands/bench.mjs";
|
|
61
62
|
export * from "./commands/replicate.mjs";
|