@letterstory/cli 0.177.75 → 0.177.76

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
@@ -90,7 +90,7 @@ import {
90
90
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
91
91
 
92
92
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
93
- export const VERSION = "0.177.75";
93
+ export const VERSION = "0.177.76";
94
94
 
95
95
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
96
96
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -2128,6 +2128,7 @@ Usage data (what signed-in people do in your own app):
2128
2128
  usage proofs [--id <id>] Read saved proof analysis
2129
2129
  usage find-proofs --since <ISO> --until <ISO> [--focus <text>] Analyze actions
2130
2130
  usage review-proof --analysis-id <id> --card-id <id> --decision approved|dismissed
2131
+ usage instrument --action <words> [--event <name>] [--owner <o> --repo <r>] PR that records an action
2131
2132
  usage discover-actions --since <ISO> --until <ISO> Event inventory from connected PostHog
2132
2133
  usage evaluate-action --since <ISO> --until <ISO> --definition <file.json>
2133
2134
  usage [--days 7|30|90] [--site <id>] [--limit <n>] People, companies and the features they use
@@ -44,6 +44,15 @@ export const ARGS = {
44
44
  card_id: { flag: "card-id" },
45
45
  decision: { flag: "decision" },
46
46
  },
47
+ instrument_proof_action: {
48
+ action: { flag: "action" },
49
+ event: { flag: "event" },
50
+ repo_owner: { flag: "owner" },
51
+ repo_name: { flag: "repo" },
52
+ provider: { flag: "provider" },
53
+ base_branch: { flag: "base" },
54
+ mode: { flag: "mode" },
55
+ },
47
56
  discover_action_events: { window: { value: (flags) => ({ since: flags.since, until: flags.until }) } },
48
57
  evaluate_action: {
49
58
  window: { value: (flags) => ({ since: flags.since, until: flags.until }) },
@@ -237,6 +246,16 @@ export async function cmdUsage(ctx) {
237
246
  printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, [])));
238
247
  return 0;
239
248
  }
249
+ if (ctx.positionals[0] === "instrument") {
250
+ if (!flags.action)
251
+ throw new CliError('Use --action with what the product should record ("a report is delivered").');
252
+ printResult(
253
+ io,
254
+ flags,
255
+ await client.callTool("instrument_proof_action", argsFromFlags(ARGS.instrument_proof_action, flags, []))
256
+ );
257
+ return 0;
258
+ }
240
259
  if (["discover-actions", "evaluate-action"].includes(ctx.positionals[0])) {
241
260
  const tool = ctx.positionals[0] === "discover-actions" ? "discover_action_events" : "evaluate_action";
242
261
  if (!flags.since || !flags.until) throw new CliError("Use --since and --until with ISO timestamps.");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.75",
3
+ "version": "0.177.76",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",