@letterstory/cli 0.17.0 → 0.19.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 +9 -1
- package/lib/commands/kernel.mjs +5 -0
- package/lib/commands/shredder.mjs +3 -0
- 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.
|
|
47
|
+
export const VERSION = "0.19.0";
|
|
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.
|
|
@@ -300,6 +300,9 @@ Writing kernels (kernels write the draft; they do not research — run research
|
|
|
300
300
|
kernel endpoints Your kernel endpoints
|
|
301
301
|
kernel write <endpoint-id> (--body <text>|--file <path>|--file -)
|
|
302
302
|
[--kernel <uuid>] [--words <n>] [--no-wait]
|
|
303
|
+
[--shredder <uuid>] shred every round in the loop, so the
|
|
304
|
+
kernel judges the text that ships
|
|
305
|
+
[--read-as brief|blog|outline|research|notes]
|
|
303
306
|
WRITE a new article from a headline,
|
|
304
307
|
outline, notes or a finished post.
|
|
305
308
|
Follows the run unless --no-wait.
|
|
@@ -450,6 +453,11 @@ Shredder (diversify content produced outside Letterstory; structure preserved):
|
|
|
450
453
|
standard (default) keeps the piece's own terminology;
|
|
451
454
|
high rewrites more and may reword recurring terms;
|
|
452
455
|
max rewrites hardest — expect vocabulary drift
|
|
456
|
+
[--apply-rules]
|
|
457
|
+
hold every rewrite to the publication's writing rules —
|
|
458
|
+
the shred runs last, so it is the one stage that can put
|
|
459
|
+
back what the rules remove; costs attempts, and a sentence
|
|
460
|
+
with no clean rewrite keeps its original
|
|
453
461
|
[--no-wait] queue it and print the job id, don't follow it
|
|
454
462
|
[--sync] wait inside one request (only for a few
|
|
455
463
|
sentences — anything longer is cut off)
|
package/lib/commands/kernel.mjs
CHANGED
|
@@ -117,6 +117,11 @@ async function kernelWrite(ctx) {
|
|
|
117
117
|
kernel_id: flagStr(flags.kernel),
|
|
118
118
|
target_word_count: flags.words === undefined ? undefined : Number(flags.words),
|
|
119
119
|
content_type: flagStr(flags["content-type"]),
|
|
120
|
+
// The two products, in one run: every round is shredded before the kernel's jury sees
|
|
121
|
+
// it, so the verdict lands on the text that actually ships. Costs a shred as well as a
|
|
122
|
+
// run. Reachable from every other surface and, until now, not from here.
|
|
123
|
+
shredder_endpoint_id: flagStr(flags.shredder),
|
|
124
|
+
brief_mode: flagStr(flags["read-as"]),
|
|
120
125
|
});
|
|
121
126
|
const result = await client.callTool("run_kernel", args);
|
|
122
127
|
const runId = readToolField(result, "run_id");
|
|
@@ -107,6 +107,9 @@ async function shredderRun(ctx) {
|
|
|
107
107
|
attempts_per_unit: flagNum(flags.attempts),
|
|
108
108
|
// How hard to rewrite. Validated service-side; sent only when the caller asked.
|
|
109
109
|
...(flags.aggression ? { aggression: String(flags.aggression) } : {}),
|
|
110
|
+
// Hold every rewrite to the live writing rules. A trade, not a free win: refused rewrites
|
|
111
|
+
// cost provider attempts and a sentence with no clean rewrite keeps its original.
|
|
112
|
+
...(flags["apply-rules"] === true ? { apply_rules: true } : {}),
|
|
110
113
|
...(sync ? {} : { async: true }),
|
|
111
114
|
});
|
|
112
115
|
const result = await client.callTool("run_shred", args);
|