@letterstory/cli 0.177.192 → 0.177.194

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
@@ -93,7 +93,7 @@ import {
93
93
  import { fetchParkedSections, withoutParked } from "./parked.mjs";
94
94
 
95
95
  // Matches cli/package.json; publish-cli.yml rewrites both to the published version.
96
- export const VERSION = "0.177.192";
96
+ export const VERSION = "0.177.194";
97
97
 
98
98
  /** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
99
99
  export const EXIT_PAYMENT_REQUIRED = 3;
@@ -91,6 +91,7 @@ export const ARGS = {
91
91
  prompt: { positional: 0, required: true, label: "prompt" },
92
92
  },
93
93
  calculate_evidence_snapshot: { id: { positional: 0, required: true, label: "draft id" } },
94
+ discard_evidence_snapshot: { id: { positional: 0, required: true, label: "draft id" } },
94
95
  publish_evidence_snapshot: {
95
96
  website: { flag: "share-website", type: "bool" },
96
97
  agent_site_id: { flag: "agent-site" },
@@ -431,10 +432,11 @@ export async function cmdUsage(ctx) {
431
432
  list: "list_evidence_snapshots",
432
433
  draft: "draft_evidence_snapshot",
433
434
  calculate: "calculate_evidence_snapshot",
435
+ discard: "discard_evidence_snapshot",
434
436
  publish: "publish_evidence_snapshot",
435
437
  share: "publish_evidence_snapshot",
436
438
  }[ctx.positionals[1] || "list"];
437
- if (!tool) throw new CliError("Use evidence list, draft, calculate or publish");
439
+ if (!tool) throw new CliError("Use evidence list, draft, calculate, discard or publish");
438
440
  printResult(io, flags, await client.callTool(tool, argsFromFlags(ARGS[tool], flags, ctx.positionals.slice(2))));
439
441
  return 0;
440
442
  }
@@ -161,7 +161,10 @@ export const ARGS = {
161
161
  },
162
162
  ask_id: "ask",
163
163
  directory: {
164
- value: (flags) => (flags.file || flags.prompt || flags.supporting || flags.prepare ? false : undefined),
164
+ value: (flags, positionals) =>
165
+ (flags.file || flags.prompt || flags.supporting || flags.prepare) && positionals[0] === "text"
166
+ ? false
167
+ : undefined,
165
168
  },
166
169
  prepare: {
167
170
  value: (flags) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.192",
3
+ "version": "0.177.194",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",