@letterstory/cli 0.177.47 → 0.177.49
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 +3 -1
- package/lib/commands/ask.mjs +12 -1
- package/lib/commands/site.mjs +2 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -89,7 +89,7 @@ import {
|
|
|
89
89
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
90
90
|
|
|
91
91
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
92
|
-
export const VERSION = "0.177.
|
|
92
|
+
export const VERSION = "0.177.49";
|
|
93
93
|
|
|
94
94
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
95
95
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -226,6 +226,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
226
226
|
"no-host",
|
|
227
227
|
// site metrics: skip the previous window (no deltas, no revamp indicator).
|
|
228
228
|
"no-compare",
|
|
229
|
+
// site metrics: the last reading kept, at once.
|
|
230
|
+
"stored",
|
|
229
231
|
// site refresh / observe: the loop's switches.
|
|
230
232
|
"force-map",
|
|
231
233
|
"force-audit",
|
package/lib/commands/ask.mjs
CHANGED
|
@@ -59,6 +59,17 @@ export function ideaLines(item, n) {
|
|
|
59
59
|
return lines;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
|
+
/**
|
|
63
|
+
* Pure: Fix's strategic rows (the door's `problems`: recipes staff placed in Fix), under the issues as the Fix tab's
|
|
64
|
+
* Strategic view lists them, numbered on from the items (2026-11-14: the terminal never showed them).
|
|
65
|
+
*/
|
|
66
|
+
export function problemLines(r) {
|
|
67
|
+
const problems = r.problems ?? [];
|
|
68
|
+
if (!problems.length) return [];
|
|
69
|
+
const from = r.items?.length ?? 0;
|
|
70
|
+
return ["Strategic:", ...problems.flatMap((p, at) => ideaLines(p, from + at + 1))];
|
|
71
|
+
}
|
|
72
|
+
|
|
62
73
|
/** Pure: an answer's footer: what nothing does, and a first read still under way. */
|
|
63
74
|
function tailLines(r) {
|
|
64
75
|
const lines = [];
|
|
@@ -78,7 +89,7 @@ export async function cmdAsk(ctx) {
|
|
|
78
89
|
throw new CliError("One ask at a time: --outcome, --strategy <id>, --lens fix|build, or your words.");
|
|
79
90
|
const result = await client.callTool("ask_letterpress", args);
|
|
80
91
|
printResult(io, flags, result, (r) =>
|
|
81
|
-
[r.message, ...r.items.flatMap((i, at) => ideaLines(i, at + 1)), ...tailLines(r)].join("\n")
|
|
92
|
+
[r.message, ...r.items.flatMap((i, at) => ideaLines(i, at + 1)), ...problemLines(r), ...tailLines(r)].join("\n")
|
|
82
93
|
);
|
|
83
94
|
return 0;
|
|
84
95
|
}
|
package/lib/commands/site.mjs
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
// site builds <host> → list_build_suggestions (--limit n)
|
|
7
7
|
// site research-builds <host> → research_builds (Build's suggestion pass: propose, check, Jev, store)
|
|
8
8
|
// site research-fixes <host> → research_fixes (Fix's suggestion pass: exact edits on pages that exist)
|
|
9
|
-
// site metrics <host> [path] → get_site_metrics (--window 1d|7d|28d|90d, --page <path>…, --no-compare)
|
|
9
|
+
// site metrics <host> [path] → get_site_metrics (--window 1d|7d|28d|90d, --page <path>…, --no-compare, --stored)
|
|
10
10
|
// site observations <host> → list_site_observations site observe <host> → observe_site
|
|
11
11
|
// site dismiss <host> <id> → dismiss_site_observation
|
|
12
12
|
// site families <host> → list_site_families site decide-family <id> → decide_site_family
|
|
@@ -113,6 +113,7 @@ const ARGS = {
|
|
|
113
113
|
paths: { flag: "page", type: "list" },
|
|
114
114
|
window: { flag: "window", enum: ["1d", "7d", "28d", "90d"] },
|
|
115
115
|
compare: { flag: "no-compare", type: "bool", invert: true },
|
|
116
|
+
stored: { flag: "stored", type: "bool" },
|
|
116
117
|
},
|
|
117
118
|
list_competitor_sites: {
|
|
118
119
|
// --since <iso>, or --days <n> as shorthand for "the last n days" (--days 1 is the last 24 hours).
|