@letterstory/cli 0.33.0 → 0.33.2

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
@@ -45,7 +45,7 @@ import {
45
45
  } from "./commands.mjs";
46
46
 
47
47
  // Keep in sync with cli/package.json.
48
- export const VERSION = "0.33.0";
48
+ export const VERSION = "0.33.2";
49
49
 
50
50
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
51
51
  // can't accidentally swallow the id as --json's value.
@@ -249,9 +249,6 @@ Authors (the per-collection author bank — recurring bylines):
249
249
  Batch-swap bylines (auto-distribute, or --author to pin one)
250
250
 
251
251
  Flows:
252
- flows list List available editorial flows
253
- flows run <flow-id> <article-id> Start a flow run
254
- flows status <run-id> Show a flow run's status
255
252
  flows webhook get Show the completion webhook
256
253
  flows webhook set --url <https://…|none|off> [--secret <secret>]
257
254
 
@@ -1,58 +1,22 @@
1
- // `flows` — run editorial passes over articles, check run status, and manage the
2
- // flow_run.completed completion webhook. Ported from phantomstory-cli's flows.ts.
1
+ // `flows` — manage the flow_run.completed completion webhook. list/run/status
2
+ // (Enhance flow authoring + running) are retired along with the rest of that UI;
3
+ // see docs/architecture/enhance-flows-retirement.md for the removal. get_webhook/set_webhook are untouched —
4
+ // they configure a webhook on the API key, not an Enhance flow.
3
5
 
4
6
  import { CliError } from "../client.mjs";
5
- import { flagStr, requirePositional, printResult, compact, ok, argsFromFlags } from "./shared.mjs";
6
-
7
- /** See `argsFromFlags` in shared.mjs; `scripts/parity-check.ts` diffs these keys against the tool. */
8
- export const ARGS = {
9
- run_flow: {
10
- flow_id: { positional: 0, label: "flow-id", required: true },
11
- article_id: { positional: 1, label: "article-id", required: true },
12
- },
13
- };
7
+ import { flagStr, printResult, compact, ok } from "./shared.mjs";
14
8
 
15
9
  export async function cmdFlows(ctx) {
16
10
  const sub = ctx.positionals[0];
17
11
  const rest = { ...ctx, positionals: ctx.positionals.slice(1) };
18
12
  switch (sub) {
19
- case "list":
20
- case "ls":
21
- return flowsList(rest);
22
- case "run":
23
- return flowsRun(rest);
24
- case "status":
25
- return flowsStatus(rest);
26
13
  case "webhook":
27
14
  return flowsWebhook(rest);
28
15
  default:
29
- throw new CliError(`Unknown flows subcommand: ${sub ?? "(none)"}. Try: list, run, status, webhook`);
16
+ throw new CliError(`Unknown flows subcommand: ${sub ?? "(none)"}. Try: webhook`);
30
17
  }
31
18
  }
32
19
 
33
- async function flowsList(ctx) {
34
- const { client, flags, io } = ctx;
35
- const result = await client.callTool("list_flows", {});
36
- printResult(io, flags, result);
37
- return 0;
38
- }
39
-
40
- async function flowsRun(ctx) {
41
- const { client, positionals, flags, io } = ctx;
42
- const result = await client.callTool("run_flow", argsFromFlags(ARGS.run_flow, flags, positionals));
43
- ok(ctx, "Flow run started.");
44
- printResult(io, flags, result);
45
- return 0;
46
- }
47
-
48
- async function flowsStatus(ctx) {
49
- const { client, positionals, flags, io } = ctx;
50
- const runId = requirePositional(positionals, 0, "run-id");
51
- const result = await client.callTool("get_run_status", { flow_run_id: runId });
52
- printResult(io, flags, result);
53
- return 0;
54
- }
55
-
56
20
  async function flowsWebhook(ctx) {
57
21
  const sub = ctx.positionals[0];
58
22
  const rest = { ...ctx, positionals: ctx.positionals.slice(1) };
@@ -170,10 +170,6 @@ export const ARGS = {
170
170
  // `[{"name":"...","treatment":"never"|"mention_once"|"mention_often"|"lead_company",
171
171
  // "linkable":false}, ...]` (linkable optional, default true).
172
172
  entities: { value: (flags) => readJsonFileFlag(flags, "entities-file") },
173
- // Hold the input's own shape and embedded media through the rewrite, on any kind that
174
- // is decomposed. Default true; pass --no-preserve-shape to let the kernel restructure
175
- // freely.
176
- preserve_shape: { flag: "preserve-shape", type: "bool" },
177
173
  },
178
174
  create_kernel_endpoint: {
179
175
  name: { flag: "name", required: true },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.33.0",
3
+ "version": "0.33.2",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",