@letterstory/cli 0.177.67 → 0.177.69

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.67";
93
+ export const VERSION = "0.177.69";
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;
@@ -1812,6 +1812,7 @@ Mailers (the sending mailboxes):
1812
1812
  mailers forward <mailer-id> (--to <email> | --clear) Forward replies to sequences to an address
1813
1813
  mailers forwards <mailer-id> [--outcome forwarded|held|failed] [--limit <n>]
1814
1814
  What forwarding forwarded or held, and why
1815
+ mailers test <mailer-id> --to <email> Send one test email (5 a mailer, 25 an org a day)
1815
1816
  mailers warmup start|pause <mailer-id> Start / pause warming (14+ days; ready at score 85)
1816
1817
  mailers limit <mailer-id> <per-day> Daily send limit, 0..500 (not while warming)
1817
1818
  mailers retire <mailer-id> [--release-mailbox --yes] Disable a mailer; --release-mailbox also deletes
package/lib/client.mjs CHANGED
@@ -34,6 +34,9 @@ export const PAYMENT_REQUIRED_CODES = ["CARD_REQUIRED", "PAYMENT_FAILED", "OUT_O
34
34
  export const REQUEST_TIMEOUT_MS = 30_000;
35
35
  export const TOOL_TIMEOUT_MS = 120_000;
36
36
  export const LONG_TOOL_TIMEOUT_MS = 300_000;
37
+ // A call to a sleeping writing model is held while it boots (up to seven minutes, voice.ts WAKE_WAIT_MS).
38
+ export const WAKE_TOOL_TIMEOUT_MS = 600_000;
39
+ export const WAKE_TOOLS = new Set(["rewrite_with_writing_model"]);
37
40
  export const LONG_TOOLS = new Set([
38
41
  "start_build",
39
42
  "send_build_message",
@@ -45,6 +48,7 @@ function timeoutFor(kind, toolName) {
45
48
  const env = Number(process.env.LETTERSTORY_TIMEOUT_MS);
46
49
  if (Number.isFinite(env) && env > 0) return env;
47
50
  if (kind !== "tool") return REQUEST_TIMEOUT_MS;
51
+ if (WAKE_TOOLS.has(toolName)) return WAKE_TOOL_TIMEOUT_MS;
48
52
  return LONG_TOOLS.has(toolName) ? LONG_TOOL_TIMEOUT_MS : TOOL_TIMEOUT_MS;
49
53
  }
50
54
 
@@ -379,6 +379,10 @@ export const ARGS = {
379
379
  outcome: { flag: "outcome", enum: ["pending", "forwarded", "held", "failed"] },
380
380
  limit: { flag: "limit", type: "num" },
381
381
  },
382
+ send_mailer_test: {
383
+ mailer_id: { positional: 0, label: "mailer-id", required: true },
384
+ to: { flag: "to", required: true },
385
+ },
382
386
  set_mailer_forwarding: {
383
387
  mailer_id: { positional: 0, label: "mailer-id", required: true },
384
388
  forward_to: {
@@ -725,7 +729,7 @@ async function prospectsColumns(ctx, sub) {
725
729
  }
726
730
  }
727
731
 
728
- const MAILERS_USAGE = `Usage: mailers <list|domains|domain|retry|quote|launch|move|messages|message|forward|forwards|warmup|limit|retire|suppressions>`;
732
+ const MAILERS_USAGE = `Usage: mailers <list|domains|domain|retry|quote|launch|move|messages|message|forward|forwards|test|warmup|limit|retire|suppressions>`;
729
733
 
730
734
  export async function cmdMailers(ctx) {
731
735
  const sub = ctx.positionals[0];
@@ -777,6 +781,12 @@ export async function cmdMailers(ctx) {
777
781
  return run(rest, "set_mailer_forwarding", "Forwarding updated.");
778
782
  case "forwards":
779
783
  return run(rest, "list_mailer_forwards");
784
+ case "test":
785
+ return run(
786
+ rest,
787
+ "send_mailer_test",
788
+ (r) => `Test sent from ${r?.from ?? "the mailer"} to ${r?.to ?? "the address"}.`
789
+ );
780
790
  case "warmup": {
781
791
  const action = rest.positionals[0];
782
792
  const inner = { ...rest, positionals: rest.positionals.slice(1) };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.177.67",
3
+ "version": "0.177.69",
4
4
  "description": "Spin up and manage Letter phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",