@letterstory/cli 0.140.0 → 0.142.0

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
@@ -64,7 +64,7 @@ import {
64
64
  } from "./commands.mjs";
65
65
 
66
66
  // Keep in sync with cli/package.json.
67
- export const VERSION = "0.140.0";
67
+ export const VERSION = "0.142.0";
68
68
 
69
69
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
70
70
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -75,6 +75,8 @@ export const BOOLEAN_FLAGS = new Set([
75
75
  // sim seed: make the new seed active; collections it doesn't cover start empty.
76
76
  "activate",
77
77
  "empty",
78
+ // sim create: agents can use it at once, instead of starting paused for review.
79
+ "live",
78
80
  // admin models runs: only the starred ones.
79
81
  "starred",
80
82
  // shredder file / arena file: save the version as a candidate beside live.
@@ -114,6 +114,10 @@ export const ARGS = {
114
114
  generator_id: { positional: 0, label: "enclosure-id", required: true },
115
115
  prospect_id: "prospect",
116
116
  },
117
+ set_generator_photo: {
118
+ generator_id: { positional: 0, label: "enclosure-id", required: true },
119
+ photo_url: { flag: "url", required: true },
120
+ },
117
121
  get_generator_version: {
118
122
  generator_id: { positional: 0, label: "enclosure-id", required: true },
119
123
  version: { value: (_flags, positionals) => Number(requirePositional(positionals, 1, "version")) },
@@ -182,6 +186,7 @@ const USAGE = `Usage: enclosures <list|show|create|update|prints>
182
186
  enclosures starters
183
187
  enclosures create --starter site_audit --login <app-id> Begin from a starter (its version 1 included)
184
188
  enclosures write-steps <enclosure-id> [--prospect <id>] Claude Code writes its steps from its description
189
+ enclosures photo <enclosure-id> --url <https link> A sign photo's photo: you holding a blank sheet
185
190
  enclosures version <enclosure-id> <n> One version in full: its steps and the script prints replay
186
191
  enclosures add-version <enclosure-id> (--script <code>|--script-file <path>) --step <text>… [--host <h>…] [--summary <s>]
187
192
  enclosures approve <enclosure-id> --version <n>
@@ -215,6 +220,8 @@ export async function cmdEnclosures(ctx) {
215
220
  return enclosuresVersion(rest);
216
221
  case "write-steps":
217
222
  return enclosuresWriteSteps(rest);
223
+ case "photo":
224
+ return enclosuresPhoto(rest);
218
225
  case "add-version":
219
226
  return enclosuresAddVersion(rest);
220
227
  case "approve":
@@ -372,6 +379,18 @@ async function enclosuresWriteSteps(ctx) {
372
379
  return 0;
373
380
  }
374
381
 
382
+ async function enclosuresPhoto(ctx) {
383
+ const { client, flags, positionals, io } = ctx;
384
+ refuseUnknownFlags(ctx, ARGS.set_generator_photo, []);
385
+ const result = await client.callTool(
386
+ "set_generator_photo",
387
+ argsFromFlags(ARGS.set_generator_photo, flags, positionals)
388
+ );
389
+ ok(ctx, `Added version ${result.version} with your photo. Test it, then approve it to print with it.`);
390
+ printResult(io, flags, result, (r) => `version ${r.version}`);
391
+ return 0;
392
+ }
393
+
375
394
  async function enclosuresVersion(ctx) {
376
395
  const { client, flags, positionals, io } = ctx;
377
396
  refuseUnknownFlags(ctx, ARGS.get_generator_version, []);
@@ -10,6 +10,7 @@
10
10
  // letterstory sim key <id> --agent our-ci --goal "nightly integration test"
11
11
  // letterstory sim seed <id> --prompt "a 3-person content team with two blogs" --activate
12
12
  // letterstory sim seed <id> --use <seed-id|none>
13
+ // letterstory sim limits <id> --daily-calls 5000 --daily-sessions 100
13
14
  // letterstory sim report <id> --since 7d
14
15
  // letterstory sim sessions <id>
15
16
  // letterstory sim session <session-id>
@@ -57,12 +58,15 @@ export const ARGS = {
57
58
  },
58
59
  },
59
60
  tool_route: "tool-route",
61
+ live: { flag: "live", type: "bool" },
60
62
  auth_header: "auth-header",
61
63
  },
62
64
  list_simulations: {},
63
65
  get_simulation: { simulation_id: simulationId },
64
66
  update_simulation: {
65
67
  simulation_id: simulationId,
68
+ daily_call_cap: { flag: "daily-calls", type: "num" },
69
+ daily_session_cap: { flag: "daily-sessions", type: "num" },
66
70
  status: { flag: "status", enum: ["live", "paused"] },
67
71
  active_seed_id: {
68
72
  value: (flags) => {
@@ -119,6 +123,9 @@ export async function cmdSim(ctx) {
119
123
  if (sub !== "rule") rest.flags = { ...rest.flags, status: sub === "pause" ? "paused" : "live" };
120
124
  return simShow(rest, await call(rest, "update_simulation"));
121
125
  }
126
+ case "limits":
127
+ refuseUnknownFlags(rest, ARGS.update_simulation, []);
128
+ return simShow(rest, await call(rest, "update_simulation"));
122
129
  case "seed":
123
130
  return simSeed(rest);
124
131
  case "key":
@@ -130,7 +137,9 @@ export async function cmdSim(ctx) {
130
137
  case "report":
131
138
  return simReport(rest);
132
139
  default:
133
- throw new CliError("Usage: sim [list|create|show|rule|pause|resume|seed|key|sessions|session|report]");
140
+ throw new CliError(
141
+ "Usage: sim [list|create|show|rule|pause|resume|limits|seed|key|sessions|session|report]"
142
+ );
134
143
  }
135
144
  }
136
145
 
@@ -157,6 +166,10 @@ function simShow(ctx, result) {
157
166
  ` REST ${s.urls.base}`,
158
167
  ` MCP ${s.urls.mcp}`,
159
168
  ` Docs ${s.urls.llms}`,
169
+ ` Limits ${s.daily_call_cap} calls and ${s.daily_session_cap} new sessions per 24 h; ${s.session_call_cap} calls per session`,
170
+ ...(s.status === "paused"
171
+ ? [" Paused: review the rules below, then `sim resume <id>` to let agents in."]
172
+ : []),
160
173
  "",
161
174
  "Resources (rule · side effect · who set it):",
162
175
  ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.140.0",
3
+ "version": "0.142.0",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",