@letterstory/cli 0.177.120 → 0.177.121
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/usage.mjs +28 -0
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -92,7 +92,7 @@ import {
|
|
|
92
92
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
93
93
|
|
|
94
94
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
95
|
-
export const VERSION = "0.177.
|
|
95
|
+
export const VERSION = "0.177.121";
|
|
96
96
|
|
|
97
97
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
98
98
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -2183,6 +2183,8 @@ Usage data (what signed-in people do in your own app):
|
|
|
2183
2183
|
usage find-proofs --since <ISO> --until <ISO> [--focus <text>] Analyze actions
|
|
2184
2184
|
usage review-proof --analysis-id <id> --card-id <id> --decision approved|dismissed
|
|
2185
2185
|
usage instrument --action <words> [--event <name>] [--owner <o> --repo <r>] PR that records an action
|
|
2186
|
+
usage test-agents [run [--rounds 4] [--engines chatgpt,claude]] Statistics on vs off with AI engines
|
|
2187
|
+
usage test-agents show <test_id> | stop <test_id> | questions --file <q.json>
|
|
2186
2188
|
usage discover-actions --since <ISO> --until <ISO> Event inventory from connected PostHog
|
|
2187
2189
|
usage evaluate-action --since <ISO> --until <ISO> --definition <file.json>
|
|
2188
2190
|
usage [--days 7|30|90] [--site <id>] [--limit <n>] People, companies and the features they use
|
package/lib/commands/usage.mjs
CHANGED
|
@@ -75,6 +75,17 @@ export const ARGS = {
|
|
|
75
75
|
},
|
|
76
76
|
set_usage_payment_scope: paymentScopeArgs,
|
|
77
77
|
preview_usage_payment_scope: paymentScopeArgs,
|
|
78
|
+
get_agent_tests: { test_id: { positional: 0, label: "test_id" } },
|
|
79
|
+
set_agent_test_questions: {
|
|
80
|
+
questions: {
|
|
81
|
+
value: (flags) => (flags.file ? JSON.parse(readFileSync(String(flags.file), "utf8")) : undefined),
|
|
82
|
+
},
|
|
83
|
+
},
|
|
84
|
+
start_agent_test: {
|
|
85
|
+
rounds: { flag: "rounds", type: "num" },
|
|
86
|
+
engines: { value: (flags) => (flags.engines ? flagCsv(flags.engines) : undefined) },
|
|
87
|
+
},
|
|
88
|
+
stop_agent_test: { test_id: { positional: 0, required: true, label: "test_id" } },
|
|
78
89
|
get_shown_statistics: {},
|
|
79
90
|
set_shown_statistic: {
|
|
80
91
|
choice_id: { positional: 0, required: true, label: "choice_id" },
|
|
@@ -377,6 +388,23 @@ export async function cmdUsage(ctx) {
|
|
|
377
388
|
}
|
|
378
389
|
throw new CliError("Use shown, shown show|hide <choice_id>, shown pr or shown check");
|
|
379
390
|
}
|
|
391
|
+
if (ctx.positionals[0] === "test-agents") {
|
|
392
|
+
const sub = ctx.positionals[1] ?? "status";
|
|
393
|
+
const rest = ctx.positionals.slice(2);
|
|
394
|
+
const tool = {
|
|
395
|
+
status: "get_agent_tests",
|
|
396
|
+
show: "get_agent_tests",
|
|
397
|
+
questions: "set_agent_test_questions",
|
|
398
|
+
run: "start_agent_test",
|
|
399
|
+
stop: "stop_agent_test",
|
|
400
|
+
}[sub];
|
|
401
|
+
if (!tool)
|
|
402
|
+
throw new CliError(
|
|
403
|
+
"Use test-agents, test-agents run, show <test_id>, questions --file <q.json> or stop <test_id>"
|
|
404
|
+
);
|
|
405
|
+
printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, rest)));
|
|
406
|
+
return 0;
|
|
407
|
+
}
|
|
380
408
|
if (ctx.positionals[0] === "payments") {
|
|
381
409
|
const tool = {
|
|
382
410
|
connect: "connect_usage_payments",
|