@letterstory/cli 0.177.98 → 0.177.100
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 -2
- package/lib/commands/goals.mjs +1 -3
- package/lib/commands/site.mjs +21 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -91,7 +91,7 @@ import {
|
|
|
91
91
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
92
92
|
|
|
93
93
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
94
|
-
export const VERSION = "0.177.
|
|
94
|
+
export const VERSION = "0.177.100";
|
|
95
95
|
|
|
96
96
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
97
97
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -1881,7 +1881,7 @@ Insights:
|
|
|
1881
1881
|
plan strategies [--site host] [--archived] The goals typed on Ideas, each a strategy
|
|
1882
1882
|
plan strategy add "<words…>" [--site host] Keep a goal in your words as a strategy
|
|
1883
1883
|
plan strategy archive <strategy-id> [--restore] Put one away (its card leaves the Plan), or bring it back
|
|
1884
|
-
goals list|
|
|
1884
|
+
goals list|save|commit [goal] --host <host> Set up goals, save to Memory and commit intent JSON
|
|
1885
1885
|
memory ingest [--text|--text-file <path|->] [--link <url>]… [--include-website] [--mcp-url <url>] Push context to Memory: a reviewable proposal
|
|
1886
1886
|
memory apply <ingestion-id> --changes <id>,<id> Save the proposed changes you accept
|
|
1887
1887
|
memory add --section <id> --body <text> [--title] [--origin] File one entry in a custom memory section
|
package/lib/commands/goals.mjs
CHANGED
|
@@ -2,7 +2,6 @@ import { CliError } from "../client.mjs";
|
|
|
2
2
|
import { argsFromFlags, printResult, readTextInput, refuseUnknownFlags } from "./shared.mjs";
|
|
3
3
|
export const ARGS = {
|
|
4
4
|
get_goal_setups: { host: { flag: "host", required: true } },
|
|
5
|
-
suggest_goal_phrases: { host: { flag: "host", required: true }, goal: { positional: 0, required: true } },
|
|
6
5
|
save_goal_setup: {
|
|
7
6
|
host: { flag: "host", required: true },
|
|
8
7
|
goal: { positional: 0, required: true },
|
|
@@ -23,11 +22,10 @@ export const ARGS = {
|
|
|
23
22
|
export async function cmdGoals(ctx) {
|
|
24
23
|
const tool = {
|
|
25
24
|
list: "get_goal_setups",
|
|
26
|
-
suggest: "suggest_goal_phrases",
|
|
27
25
|
save: "save_goal_setup",
|
|
28
26
|
commit: "commit_goal_setup",
|
|
29
27
|
}[ctx.positionals[0]];
|
|
30
|
-
if (!tool) throw new CliError("Usage: goals list|
|
|
28
|
+
if (!tool) throw new CliError("Usage: goals list|save|commit [goal] --host <host> [--answers-file <path>]");
|
|
31
29
|
refuseUnknownFlags(ctx, ARGS[tool], tool === "save_goal_setup" ? ["answers", "answers-file"] : []);
|
|
32
30
|
const args = argsFromFlags(ARGS[tool], ctx.flags, ctx.positionals.slice(1));
|
|
33
31
|
printResult(ctx.io, ctx.flags, await ctx.client.callTool(tool, args), (r) => JSON.stringify(r, null, 2));
|
package/lib/commands/site.mjs
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
// site list → list_sites site map <host> → map_site
|
|
4
4
|
// site tree <host> [path] → get_site_tree site page <host> <path> → get_site_page
|
|
5
5
|
// site llms-txt <host> → get_llms_txt (the file Letter writes; --out <file> to save it)
|
|
6
|
+
// site facts [host] → get_site_facts (what Letter has read about the site, and how fresh)
|
|
6
7
|
// site builds <host> → list_build_suggestions (--limit n)
|
|
7
8
|
// site research-builds <host> → research_builds (Build's suggestion pass: propose, check, Jev, store)
|
|
8
9
|
// site research-fixes <host> → research_fixes (Fix's suggestion pass: exact edits on pages that exist)
|
|
@@ -80,6 +81,7 @@ const ARGS = {
|
|
|
80
81
|
depth: { flag: "depth", type: "num" },
|
|
81
82
|
},
|
|
82
83
|
get_llms_txt: { host: { positional: 0, required: true, label: "host" } },
|
|
84
|
+
get_site_facts: { domain: { positional: 0, label: "host" } },
|
|
83
85
|
get_site_tree: {
|
|
84
86
|
host: { positional: 0, required: true, label: "host" },
|
|
85
87
|
path: { positional: 1, label: "path" },
|
|
@@ -247,6 +249,8 @@ export async function cmdSite(ctx) {
|
|
|
247
249
|
return siteUnmap(rest);
|
|
248
250
|
case "tree":
|
|
249
251
|
return siteTree(rest);
|
|
252
|
+
case "facts":
|
|
253
|
+
return siteFacts(rest);
|
|
250
254
|
case "llms-txt":
|
|
251
255
|
return siteLlmsTxt(rest);
|
|
252
256
|
case "research-builds":
|
|
@@ -289,7 +293,7 @@ export async function cmdSite(ctx) {
|
|
|
289
293
|
return siteSuggest(rest);
|
|
290
294
|
default:
|
|
291
295
|
throw new CliError(
|
|
292
|
-
`Unknown site subcommand: ${sub ?? "(none)"}. Try: list, map, refresh, unmap, tree, builds, metrics, page, observations, observe, dismiss, families, decide-family, proposals, propose, decide, fix, competitors, watch-competitors, highlight, prospect, suggest`
|
|
296
|
+
`Unknown site subcommand: ${sub ?? "(none)"}. Try: list, map, refresh, unmap, tree, facts, builds, metrics, page, observations, observe, dismiss, families, decide-family, proposals, propose, decide, fix, competitors, watch-competitors, highlight, prospect, suggest`
|
|
293
297
|
);
|
|
294
298
|
}
|
|
295
299
|
}
|
|
@@ -478,6 +482,22 @@ async function siteUnmap(ctx) {
|
|
|
478
482
|
return 0;
|
|
479
483
|
}
|
|
480
484
|
|
|
485
|
+
async function siteFacts(ctx) {
|
|
486
|
+
const { client, flags, io } = ctx;
|
|
487
|
+
refuseUnknownFlags(ctx, ARGS.get_site_facts);
|
|
488
|
+
const result = await client.callTool("get_site_facts", argsFromFlags(ARGS.get_site_facts, flags, ctx.positionals));
|
|
489
|
+
printResult(io, flags, result, ({ facts }) =>
|
|
490
|
+
[
|
|
491
|
+
`${facts.host}: what Letter has read`,
|
|
492
|
+
...facts.stored.map(
|
|
493
|
+
(f) =>
|
|
494
|
+
` ${f.key.padEnd(18)} ${f.read_at ? `${f.read_at.slice(0, 10)}${f.live ? "" : " (stale)"}` : "not read"} ${JSON.stringify(f.value)}`
|
|
495
|
+
),
|
|
496
|
+
].join("\n")
|
|
497
|
+
);
|
|
498
|
+
return 0;
|
|
499
|
+
}
|
|
500
|
+
|
|
481
501
|
async function siteLlmsTxt(ctx) {
|
|
482
502
|
const { client, flags, io } = ctx;
|
|
483
503
|
refuseUnknownFlags(ctx, ARGS.get_llms_txt, ["out"]);
|