@letterstory/cli 0.29.2 → 0.29.4
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 +1 -1
- package/lib/commands/kernel.mjs +17 -9
- package/lib/commands/onboard.mjs +2 -2
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -44,7 +44,7 @@ import {
|
|
|
44
44
|
} from "./commands.mjs";
|
|
45
45
|
|
|
46
46
|
// Keep in sync with cli/package.json.
|
|
47
|
-
export const VERSION = "0.29.
|
|
47
|
+
export const VERSION = "0.29.4";
|
|
48
48
|
|
|
49
49
|
// Flags that never take a value. Listing them explicitly means `deploy get --json <id>`
|
|
50
50
|
// can't accidentally swallow the id as --json's value.
|
package/lib/commands/kernel.mjs
CHANGED
|
@@ -93,14 +93,15 @@ export const ARGS = {
|
|
|
93
93
|
// it from a path. Omit both to write from the article as it stands.
|
|
94
94
|
brief: { value: (flags) => flagStr(flags.brief) ?? readBodyInput({ file: flagStr(flags["brief-file"]) }) },
|
|
95
95
|
// How to read --brief: auto (default) treats a short topic as instruction and a pasted
|
|
96
|
-
// draft/article as source material to decompose first
|
|
96
|
+
// draft/article as source material to decompose first — your own finished post is
|
|
97
|
+
// `article`. Same flag name as run_kernel's.
|
|
97
98
|
content_kind: {
|
|
98
99
|
flag: "read-as",
|
|
99
100
|
enum: ["auto", "instruction", "document", "article", "outline", "research", "notes"],
|
|
100
101
|
},
|
|
101
102
|
},
|
|
102
103
|
// The standalone door. Two subcommands share this one tool: `write` and `polish` both
|
|
103
|
-
// send `input`, `polish`
|
|
104
|
+
// send `input`, `polish` defaulting content_kind to "article" — the map is one, so a field
|
|
104
105
|
// the tool gains is a field BOTH subcommands must learn (or knowingly gap) — that is the
|
|
105
106
|
// ratchet.
|
|
106
107
|
run_kernel: {
|
|
@@ -169,8 +170,9 @@ export const ARGS = {
|
|
|
169
170
|
// `[{"name":"...","treatment":"never"|"mention_once"|"mention_often"|"lead_company",
|
|
170
171
|
// "linkable":false}, ...]` (linkable optional, default true).
|
|
171
172
|
entities: { value: (flags) => readJsonFileFlag(flags, "entities-file") },
|
|
172
|
-
//
|
|
173
|
-
// true; pass --no-preserve-shape to let the kernel restructure
|
|
173
|
+
// Hold the input's own shape and embedded media through the rewrite, on any kind that
|
|
174
|
+
// is decomposed. Default true; pass --no-preserve-shape to let the kernel restructure
|
|
175
|
+
// freely.
|
|
174
176
|
preserve_shape: { flag: "preserve-shape", type: "bool" },
|
|
175
177
|
},
|
|
176
178
|
create_kernel_endpoint: {
|
|
@@ -364,16 +366,22 @@ async function kernelEndpoint(ctx) {
|
|
|
364
366
|
|
|
365
367
|
/**
|
|
366
368
|
* The OTHER door: run the same pipeline against a document you already have, instead of
|
|
367
|
-
* writing a new one. Decomposed into a brief and GENERATED FRESH (content_kind: "
|
|
368
|
-
*
|
|
369
|
+
* writing a new one. Decomposed into a brief and GENERATED FRESH (content_kind: "article",
|
|
370
|
+
* defaulted below) — not edited in place — with your own headings and embedded media (images,
|
|
369
371
|
* tables) extracted first and spliced back into the generated draft afterward, so they
|
|
370
372
|
* survive a pass that would otherwise be text-only and lose them.
|
|
371
373
|
*
|
|
374
|
+
* IT IS NOT ITS OWN CONTENT KIND any more (2026-09-22). This used to send `document`, the one
|
|
375
|
+
* kind that held media — which meant `letterstory kernel write --read-as article` on the same
|
|
376
|
+
* file quietly dropped it. Holding what a text-only decompose cannot carry is now the default
|
|
377
|
+
* on every decomposed kind, so `polish` is `write` with the kind named for you, and nothing
|
|
378
|
+
* else. `document` still parses if you pass it; it resolves to `article`.
|
|
379
|
+
*
|
|
372
380
|
* ASYNCHRONOUS, same as `write` — this used to be a separate, synchronous, unmetered "polish"
|
|
373
381
|
* that answered in one request, and before that an EARLIER `document` mode that skipped
|
|
374
382
|
* generation to hold shape "in place." Neither exists any more (2026-09-15, letterstory#1783;
|
|
375
|
-
* 2026-09-17).
|
|
376
|
-
*
|
|
383
|
+
* 2026-09-17). It now costs a run and follows the identical submit-and-poll shape `write`
|
|
384
|
+
* does, so this command does too — `--no-wait` behaves the same way here.
|
|
377
385
|
*/
|
|
378
386
|
async function kernelPolish(ctx) {
|
|
379
387
|
const { client, positionals, flags, io } = ctx;
|
|
@@ -381,7 +389,7 @@ async function kernelPolish(ctx) {
|
|
|
381
389
|
if (args.input === undefined) {
|
|
382
390
|
throw new CliError("Provide the document with --body <text>, --file <path>, or --file - (stdin).");
|
|
383
391
|
}
|
|
384
|
-
args.content_kind = args.content_kind ?? "
|
|
392
|
+
args.content_kind = args.content_kind ?? "article";
|
|
385
393
|
const result = await client.callTool("run_kernel", args);
|
|
386
394
|
const runId = toolField(result, "run_id");
|
|
387
395
|
if (!runId) {
|
package/lib/commands/onboard.mjs
CHANGED
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
//
|
|
16
16
|
// IMPORTANT: the masthead name is committed when the site is created (it seeds the URL),
|
|
17
17
|
// so to use a name other than the inferred one, pass --name BEFORE applying. The first
|
|
18
|
-
// posts are written by background
|
|
19
|
-
// this command does not block on them — poll with `
|
|
18
|
+
// posts are written by background runs (20-60min each); they're reported as run ids and
|
|
19
|
+
// this command does not block on them — poll with `collection run-status <run-id>`.
|
|
20
20
|
//
|
|
21
21
|
// `--accept-plan <path|->` closes the review loop: the apply PINS the plan instead of
|
|
22
22
|
// recomputing it, so the masthead that was reviewed is the masthead that is committed. In one
|