@letterstory/cli 0.131.1 → 0.133.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 CHANGED
@@ -62,7 +62,7 @@ import {
62
62
  } from "./commands.mjs";
63
63
 
64
64
  // Keep in sync with cli/package.json.
65
- export const VERSION = "0.131.1";
65
+ export const VERSION = "0.133.0";
66
66
 
67
67
  // Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
68
68
  // can't accidentally swallow the id as --json's value. Every `type: "bool"` flag (and its
@@ -1343,6 +1343,7 @@ The Site (one model of your whole marketing site, keyed by host and path):
1343
1343
  [--observation <id>]... Propose a registry tool call; input is validated now
1344
1344
  site decide <proposal-id> --decision accept|dismiss [--reason <why>]
1345
1345
  site fix <host> <observation-id>... [--action build|build_pr|build_merge|slack|linear|handoff] [--with-preview]
1346
+ [--harness claude-code|letterpress-1]
1346
1347
  One change for N observations; handoff prints the prompt, slack/linear need no repo
1347
1348
  site competitors [--since <iso> | --days <n>] [--limit <n>] Tracked competitors' sites: new and removed pages, by folder
1348
1349
  site watch-competitors [domain] [--limit <n>] Map competitors' sitemaps (the next few unmapped, or one now)
@@ -1364,9 +1365,13 @@ Repo changes (Claude Code edits your repo in a sandbox; the Letterstory GitHub A
1364
1365
  repo slack-test Post a test into the Send to Slack channel
1365
1366
  repo start --repo <owner/name> --instructions <text>|--instructions-file <path|->
1366
1367
  [--branch <base>] [--attach <path>]... [--attach-url <name>=<https url>]...
1367
- [--action build|build_pr|build_merge|slack|linear] [--with-preview] [--wait]
1368
- Start a change (attached files go to the sandbox);
1368
+ [--attach-ref <path>]... [--attach-url-ref <name>=<https url>]...
1369
+ [--action build|build_pr|build_merge|slack|linear] [--with-preview]
1370
+ [--harness claude-code|letterpress-1] [--wait]
1371
+ Start a change (attached files go to the sandbox;
1372
+ -ref ones are context, never put in the repo);
1369
1373
  --with-preview keeps a preview up next to the PR;
1374
+ --harness picks the coding agent (default: the deployment's);
1370
1375
  --wait follows it to the PR
1371
1376
  repo fix-audit --issue <issue-type>... [--audit <id>] [--branch <base>] [--action build|build_pr|build_merge|slack|linear] [--wait]
1372
1377
  One PR fixing site-audit issues (repeat --issue to bundle) on every affected page,
@@ -59,12 +59,15 @@ const ARGS = {
59
59
  base_branch: "branch",
60
60
  // --instructions, or a longer brief from --instructions-file <path> / - (stdin).
61
61
  instructions: { value: (flags) => readTextInput(flags, "instructions", "instructions-file") },
62
- // --attach <path> (uploaded first) and --attach-url <name>=<https url>, both repeatable.
62
+ // --attach <path> (uploaded first) and --attach-url <name>=<https url>, both repeatable;
63
+ // --attach-ref / --attach-url-ref the same for context the agent reads, never puts in the repo.
63
64
  files: { value: (_flags, _positionals, extra) => (extra.files?.length ? extra.files : undefined) },
64
65
  action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear"] },
65
66
  preview: { flag: "preview", type: "bool" },
66
67
  // --with-preview: the PR opens straight away and a preview of the change stays up next to it.
67
68
  with_preview: { flag: "with-preview", type: "bool" },
69
+ // --harness claude-code|letterpress-1: the coding agent; omitted, the deployment's default.
70
+ harness: { flag: "harness", enum: ["claude-code", "letterpress-1"] },
68
71
  },
69
72
  create_repo_change_upload: { file_names: { internal: "the basenames of the --attach files" } },
70
73
  list_repo_sites: {},
@@ -300,7 +303,7 @@ async function uploadAttachments(ctx, paths) {
300
303
  .replace(/[^A-Za-z0-9._ -]/g, "-")
301
304
  .replace(/^[^A-Za-z0-9]+/, "")
302
305
  );
303
- if (new Set(names).size !== names.length) throw new CliError("Two --attach files share a name; rename one.");
306
+ if (new Set(names).size !== names.length) throw new CliError("Two attached files share a name; rename one.");
304
307
  const bytes = paths.map((p) => {
305
308
  try {
306
309
  return readFileSync(p);
@@ -332,14 +335,21 @@ async function repoStart(ctx) {
332
335
  "instructions-file",
333
336
  "attach",
334
337
  "attach-url",
338
+ "attach-ref",
339
+ "attach-url-ref",
335
340
  "action",
336
341
  "preview",
337
342
  "with-preview",
343
+ "harness",
338
344
  "wait",
339
345
  ]);
346
+ // One upload for every file (names must be unique across both), then the references marked.
347
+ const place = flagList(flags.attach);
348
+ const uploaded = await uploadAttachments(ctx, [...place, ...flagList(flags["attach-ref"])]);
340
349
  const files = [
341
- ...(await uploadAttachments(ctx, flagList(flags.attach))),
350
+ ...uploaded.map((f, i) => (i < place.length ? f : { ...f, reference: true })),
342
351
  ...attachmentUrls(flagList(flags["attach-url"])),
352
+ ...attachmentUrls(flagList(flags["attach-url-ref"])).map((f) => ({ ...f, reference: true })),
343
353
  ];
344
354
  const args = argsFromFlags(ARGS.start_repo_change, flags, ctx.positionals, { files });
345
355
  if (!args.repo_owner || !args.repo_name) throw new CliError("Missing --repo owner/name");
@@ -180,6 +180,8 @@ const ARGS = {
180
180
  action: { flag: "action", enum: ["build", "build_pr", "build_merge", "slack", "linear", "handoff"] },
181
181
  // --with-preview: the PR opens straight away and a preview of the fix stays up next to it.
182
182
  with_preview: { flag: "with-preview", type: "bool" },
183
+ // --harness claude-code|letterpress-1: the coding agent; omitted, the deployment's default.
184
+ harness: { flag: "harness", enum: ["claude-code", "letterpress-1"] },
183
185
  },
184
186
  };
185
187
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@letterstory/cli",
3
- "version": "0.131.1",
3
+ "version": "0.133.0",
4
4
  "description": "Spin up and manage Letterstory phantom blogs from your terminal.",
5
5
  "type": "module",
6
6
  "license": "UNLICENSED",