@letterstory/cli 0.141.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 +3 -1
- package/lib/commands/sim.mjs +14 -1
- package/package.json +1 -1
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.
|
|
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.
|
package/lib/commands/sim.mjs
CHANGED
|
@@ -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(
|
|
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
|
];
|