@letterstory/cli 0.177.129 → 0.177.131
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 +2 -1
- package/lib/commands/admin.mjs +1 -6
- package/lib/commands/ask.mjs +1 -12
- package/lib/commands/targets.mjs +2 -0
- package/package.json +1 -1
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.
|
|
96
|
+
export const VERSION = "0.177.131";
|
|
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;
|
|
@@ -953,6 +953,7 @@ Offerings (context layered org → offering → collection; a layer sets only wh
|
|
|
953
953
|
Ranking targets (what the org wants to be THE answer for — company-wide or on one offering):
|
|
954
954
|
targets list [--offering <offering-id|company>] Targets grouped by scope, each with its active cap and usage
|
|
955
955
|
targets add <phrase> [--framing <f>] [--offering <offering-id|company>] [--priority high|normal|low]
|
|
956
|
+
[--keyword <keyword-id>] Made from a Keyword tracking keyword: its AI answers read as that keyword's
|
|
956
957
|
Lands active while its scope has room, inactive after —
|
|
957
958
|
adding never fails on the cap
|
|
958
959
|
targets update <target-id> [--phrase <p>] [--framing <f> | --clear-framing] [--offering <offering-id|company>]
|
package/lib/commands/admin.mjs
CHANGED
|
@@ -5219,14 +5219,12 @@ const RECIPE_FILE_FIELDS = [
|
|
|
5219
5219
|
"repeats",
|
|
5220
5220
|
// The site's pages the fit reads before deciding it (2026-11-16); left out here, an export would drop it.
|
|
5221
5221
|
"read_pages",
|
|
5222
|
-
// Where its row shows: ideas or fix (a deficit, 2026-11-13); left out here, an export would drop it.
|
|
5223
|
-
"shows_in",
|
|
5224
5222
|
"status",
|
|
5225
5223
|
"needs",
|
|
5226
5224
|
"variations",
|
|
5227
5225
|
];
|
|
5228
5226
|
const RECIPES_USAGE =
|
|
5229
|
-
"Usage: admin recipes list [--kind recipe|known_issue] [--status live|parked] [--approach seo|geo|agent_conviction|inbound_conversion|outbound|other] | show <id|name> | runs <id|name> [--days 1..90] [--limit n] | vocab | stats | export [--out <file>] | import <file> [--dry-run] | refit [--org <id>,…] [--recipe <id|name>] [--limit n] | save [<id>] [--file <recipe.json>] [--kind recipe|known_issue] [--name …] [--description …] [--recipe …] [--when-to-use …] [--when-not-to-use …] [--weight 1..10] [--approaches seo,geo,…] [--reads llms_txt,github,…] [--runs <catalog action id>] [--primitives-access true|false] [--immediate true|false] [--names-subject true|false] [--repeats true|false] [--read-pages /compare/*,/docs/**/quickstart*] [--
|
|
5227
|
+
"Usage: admin recipes list [--kind recipe|known_issue] [--status live|parked] [--approach seo|geo|agent_conviction|inbound_conversion|outbound|other] | show <id|name> | runs <id|name> [--days 1..90] [--limit n] | vocab | stats | export [--out <file>] | import <file> [--dry-run] | refit [--org <id>,…] [--recipe <id|name>] [--limit n] | save [<id>] [--file <recipe.json>] [--kind recipe|known_issue] [--name …] [--description …] [--recipe …] [--when-to-use …] [--when-not-to-use …] [--weight 1..10] [--approaches seo,geo,…] [--reads llms_txt,github,…] [--runs <catalog action id>] [--primitives-access true|false] [--immediate true|false] [--names-subject true|false] [--repeats true|false] [--read-pages /compare/*,/docs/**/quickstart*] [--status live|parked] [--needs <what a parked recipe is missing>] | delete <id> --yes";
|
|
5230
5228
|
|
|
5231
5229
|
const recipeForFile = (r) => Object.fromEntries(RECIPE_FILE_FIELDS.map((k) => [k, r[k]]));
|
|
5232
5230
|
|
|
@@ -5279,7 +5277,6 @@ function recipeDetail(r) {
|
|
|
5279
5277
|
...(r.names_subject ? [" title: names what it acts on, or it is a no (names_subject)"] : []),
|
|
5280
5278
|
...(r.repeats ? [" rows: one per thing the account has, up to 4 (repeats)"] : []),
|
|
5281
5279
|
...(r.read_pages?.length ? [` reads pages: ${r.read_pages.join(", ")} (read_pages)`] : []),
|
|
5282
|
-
...(r.shows_in === "fix" ? [" shows in: Fix, as a deficit (shows_in)"] : []),
|
|
5283
5280
|
...(variations.length > 1
|
|
5284
5281
|
? variations.flatMap((v, i) => [` variation ${i + 1}: ${v.name}`, ...fields(v, " ")])
|
|
5285
5282
|
: fields(r, " ")),
|
|
@@ -5338,8 +5335,6 @@ function recipeFromFlags(flags) {
|
|
|
5338
5335
|
names_subject: flags["names-subject"] === undefined ? undefined : String(flags["names-subject"]) === "true",
|
|
5339
5336
|
// --repeats true: a row per thing the account has (a comparison per rival), up to 4; false: one row.
|
|
5340
5337
|
repeats: flags.repeats === undefined ? undefined : String(flags.repeats) === "true",
|
|
5341
|
-
// --shows-in fix: its row is a deficit, in Fix's Deficits; ideas (the default): a thing to build, on Ideas.
|
|
5342
|
-
shows_in: flagStr(flags["shows-in"]),
|
|
5343
5338
|
// --reads llms_txt,github declares the facts its conditions rest on; --reads "" clears them.
|
|
5344
5339
|
reads: flagStr(flags.reads)
|
|
5345
5340
|
?.split(",")
|
package/lib/commands/ask.mjs
CHANGED
|
@@ -68,17 +68,6 @@ export function ideaLines(item, n) {
|
|
|
68
68
|
return lines;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
|
-
/**
|
|
72
|
-
* Pure: Fix's strategic rows (the door's `problems`: recipes staff placed in Fix), under the issues as the Fix tab's
|
|
73
|
-
* Strategic view lists them, numbered on from the items (2026-11-14: the terminal never showed them).
|
|
74
|
-
*/
|
|
75
|
-
export function problemLines(r) {
|
|
76
|
-
const problems = r.problems ?? [];
|
|
77
|
-
if (!problems.length) return [];
|
|
78
|
-
const from = r.items?.length ?? 0;
|
|
79
|
-
return ["Strategic:", ...problems.flatMap((p, at) => ideaLines(p, from + at + 1))];
|
|
80
|
-
}
|
|
81
|
-
|
|
82
71
|
/** Pure: an answer's footer: what nothing does, and a first read still under way. */
|
|
83
72
|
function tailLines(r) {
|
|
84
73
|
const lines = [];
|
|
@@ -98,7 +87,7 @@ export async function cmdAsk(ctx) {
|
|
|
98
87
|
throw new CliError("One ask at a time: --outcome, --strategy <id>, --lens fix|build, or your words.");
|
|
99
88
|
const result = await client.callTool("ask_letterpress", args);
|
|
100
89
|
printResult(io, flags, result, (r) =>
|
|
101
|
-
[r.message, ...r.items.flatMap((i, at) => ideaLines(i, at + 1)), ...
|
|
90
|
+
[r.message, ...r.items.flatMap((i, at) => ideaLines(i, at + 1)), ...tailLines(r)].join("\n")
|
|
102
91
|
);
|
|
103
92
|
return 0;
|
|
104
93
|
}
|
package/lib/commands/targets.mjs
CHANGED
|
@@ -59,6 +59,8 @@ export const ARGS = {
|
|
|
59
59
|
priority,
|
|
60
60
|
// `--stance <text>`, repeatable: one point of view per flag.
|
|
61
61
|
stances: { flag: "stance", type: "list" },
|
|
62
|
+
// `--keyword <keyword-id>`: the Keyword tracking keyword it is made from (insights keywords lists ids).
|
|
63
|
+
keyword_id: "keyword",
|
|
62
64
|
},
|
|
63
65
|
update_ranking_target: {
|
|
64
66
|
target_id: { positional: 0, label: "target-id", required: true },
|