@letterstory/cli 0.176.41 → 0.176.42

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
@@ -83,7 +83,7 @@ import {
83
83
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
84
84
 
85
85
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
86
- export const VERSION = "0.176.41";
86
+ export const VERSION = "0.176.42";
87
87
 
88
88
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
89
89
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -1680,6 +1680,8 @@ Insights:
1680
1680
  them (--goal: one goal's strategies, else any); each pick waits --veto-hours for a veto. Settings shown when none given.
1681
1681
  plan pending [--site host] What Auto-Plan picked and is waiting to build
1682
1682
  plan veto <proposal-id> Veto one: it is never built
1683
+ plan start <proposal-id> Start one now (a Needs you pick, or one waiting out its review window)
1684
+ plan preview [--site host] What Auto-Plan would do first, before it is on
1683
1685
  plan later <action-id> [--outcome geo|…] [--site host] Queue a Plan row for later: Auto-Plan starts it once it's ready
1684
1686
  plan later remove <queued-id> Take a queued row back off
1685
1687
  plan strategies [--site host] [--archived] The goals typed on the Plan, each a strategy
@@ -6,6 +6,8 @@
6
6
  // [--slack-channel <C…>|none] → set_auto_plan
7
7
  // plan pending → list_auto_plan_proposals (status pending)
8
8
  // plan veto <proposal-id> → veto_auto_plan_proposal
9
+ // plan start <proposal-id> → start_auto_plan_proposal (a Needs you pick, or one waiting out its review window)
10
+ // plan preview → preview_auto_plan (what Auto-Plan would do first)
9
11
  // plan later <action-id> [--outcome geo|…] → queue_plan_action (Auto-Plan starts it once it's ready)
10
12
  // plan later remove <queued-id> → unqueue_plan_action
11
13
  // plan strategies [--archived] → list_plan_strategies (the goals typed on the Plan)
@@ -78,6 +80,8 @@ export const ARGS = {
78
80
  },
79
81
  unqueue_plan_action: { id: { positional: 0, required: true, label: "queued-id" } },
80
82
  veto_auto_plan_proposal: { id: { positional: 0, required: true, label: "proposal-id" } },
83
+ start_auto_plan_proposal: { id: { positional: 0, required: true, label: "proposal-id" } },
84
+ preview_auto_plan: { domain: "site" },
81
85
  list_plan_strategies: { domain: "site", archived: { flag: "archived", type: "bool" } },
82
86
  create_plan_strategy: {
83
87
  domain: "site",
@@ -143,6 +147,25 @@ export async function cmdPlan(ctx) {
143
147
  );
144
148
  return 0;
145
149
  }
150
+ if (sub === "start") {
151
+ refuseUnknownFlags(ctx, {}, []);
152
+ const result = await client.callTool(
153
+ "start_auto_plan_proposal",
154
+ argsFromFlags(ARGS.start_auto_plan_proposal, flags, rest)
155
+ );
156
+ printResult(io, flags, result, (r) => r.message);
157
+ return 0;
158
+ }
159
+ if (sub === "preview") {
160
+ refuseUnknownFlags(ctx, {}, ["site"]);
161
+ const result = await client.callTool("preview_auto_plan", argsFromFlags(ARGS.preview_auto_plan, flags, rest));
162
+ printResult(io, flags, result, (r) =>
163
+ [r.message, ...r.picks.map((p) => ` ${p.kind === "pr" ? "opens a PR " : "needs you "} ${p.title}`)].join(
164
+ "\n"
165
+ )
166
+ );
167
+ return 0;
168
+ }
146
169
  if (sub === "veto") {
147
170
  refuseUnknownFlags(ctx, {}, []);
148
171
  const result = await client.callTool(
@@ -187,6 +210,6 @@ export async function cmdPlan(ctx) {
187
210
  throw new CliError('Usage: plan strategy add "<words…>" | plan strategy archive <strategy-id> [--restore]');
188
211
  }
189
212
  throw new CliError(
190
- "Usage: plan auto [settings…] | plan pending | plan veto <proposal-id> | plan later <action-id> | plan later remove <id> | plan strategies | plan strategy add|archive"
213
+ "Usage: plan auto [settings…] | plan pending | plan veto <proposal-id> | plan start <proposal-id> | plan preview | plan later <action-id> | plan later remove <id> | plan strategies | plan strategy add|archive"
191
214
  );
192
215
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.176.41",
3
+ "version": "0.176.42",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",