@letterstory/cli 0.177.121 → 0.177.122

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
@@ -70,6 +70,7 @@ import {
70
70
  cmdPlan,
71
71
  cmdMemory,
72
72
  cmdGoals,
73
+ cmdRail,
73
74
  cmdSite,
74
75
  cmdEvals,
75
76
  cmdOfferings,
@@ -92,7 +93,7 @@ import {
92
93
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
93
94
 
94
95
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
95
- export const VERSION = "0.177.121";
96
+ export const VERSION = "0.177.122";
96
97
 
97
98
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
98
99
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1904,6 +1905,7 @@ Insights:
1904
1905
  plan strategy add "<words…>" [--site host] Keep a goal in your words as a strategy
1905
1906
  plan strategy archive <strategy-id> [--restore] Put one away (its card leaves the Plan), or bring it back
1906
1907
  goals list|save|commit [goal] --host <host> Set up goals, save to Memory and commit intent JSON
1908
+ rail [list] | rail set <key>… | rail reset Your Letterpress sidebar's pins, in order
1907
1909
  memory ingest [--text|--text-file <path|->] [--link <url>]… [--include-website] [--mcp-url <url>] Push context to Memory: a reviewable proposal
1908
1910
  memory apply <ingestion-id> --changes <id>,<id> Save the proposed changes you accept
1909
1911
  memory add --section <id> --body <text> [--title] [--origin] File one entry in a custom memory section
@@ -2371,6 +2373,7 @@ const CLIENT_COMMANDS = {
2371
2373
  plan: cmdPlan,
2372
2374
  memory: cmdMemory,
2373
2375
  goals: cmdGoals,
2376
+ rail: cmdRail,
2374
2377
  site: cmdSite,
2375
2378
  evals: cmdEvals,
2376
2379
  visits: cmdVisits,
@@ -0,0 +1,38 @@
1
+ // `rail` — your own Letterpress rail (the sidebar), the same list pinning from More sets in the app. Thin wrappers
2
+ // over get_rail_pins / set_rail_pins (lib/rail/pins.ts).
3
+ //
4
+ // letterstory rail your pins, in order
5
+ // letterstory rail set build plan fix templates pin exactly these, in this order
6
+ // letterstory rail reset back to the defaults
7
+
8
+ import { CliError } from "../client.mjs";
9
+ import { argsFromFlags, printResult, refuseUnknownFlags } from "./shared.mjs";
10
+
11
+ export const ARGS = {
12
+ get_rail_pins: {},
13
+ set_rail_pins: {
14
+ // `rail set <key>…` pins exactly these, in order; `rail reset` is the tool's null (the defaults).
15
+ pins: { value: (_flags, positionals) => (positionals[0] === "reset" ? null : positionals.slice(1)) },
16
+ },
17
+ };
18
+
19
+ export async function cmdRail(ctx) {
20
+ const [sub, ...keys] = ctx.positionals;
21
+ refuseUnknownFlags(ctx, {}, []);
22
+ let result;
23
+ if (!sub || sub === "list") result = await ctx.client.callTool("get_rail_pins", {});
24
+ else if (sub === "set") {
25
+ if (!keys.length) throw new CliError("Usage: rail set <key> [<key>…] (rail reset puts the defaults back)");
26
+ result = await ctx.client.callTool(
27
+ "set_rail_pins",
28
+ argsFromFlags(ARGS.set_rail_pins, ctx.flags, ctx.positionals)
29
+ );
30
+ } else if (sub === "reset")
31
+ result = await ctx.client.callTool(
32
+ "set_rail_pins",
33
+ argsFromFlags(ARGS.set_rail_pins, ctx.flags, ctx.positionals)
34
+ );
35
+ else throw new CliError("Usage: rail [list] | rail set <key>… | rail reset");
36
+ printResult(ctx.io, ctx.flags, result, (r) => (r.pins ?? []).join("\n"));
37
+ return 0;
38
+ }
package/lib/commands.mjs CHANGED
@@ -65,3 +65,4 @@ export * from "./commands/refs.mjs";
65
65
  export * from "./commands/models.mjs";
66
66
 
67
67
  export * from "./commands/goals.mjs";
68
+ export * from "./commands/rail.mjs";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.121",
3
+ "version": "0.177.122",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",