@letterstory/cli 0.177.52 → 0.177.54
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 +5 -3
- package/lib/commands/models.mjs +21 -2
- package/package.json +1 -1
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.
|
|
93
|
+
export const VERSION = "0.177.54";
|
|
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;
|
|
@@ -2121,8 +2121,9 @@ Usage data (what signed-in people do in your own app):
|
|
|
2121
2121
|
|
|
2122
2122
|
Models (your own writing models, each trained on writing you give it so it writes in your voice):
|
|
2123
2123
|
models [list] [--archived] Your models: where each stands, its links, its version
|
|
2124
|
-
models create "<name>" [--budget <usd>] [--description <d>]
|
|
2124
|
+
models create "<name>" [--budget <usd>] [--description <d>] [--base <base-id>]
|
|
2125
2125
|
Budget: the most one training run may cost (default $100)
|
|
2126
|
+
Base: qwen2.5-14b-instruct (default), qwen3.5-27b or gemma-3-27b-it
|
|
2126
2127
|
models show <id> Its links, its training and what it cost
|
|
2127
2128
|
models upload <id> <file-or-folder>… Import files, folders or ZIPs without training
|
|
2128
2129
|
models material <id> "<material or request>" [--stage-only] [--request <id>] [--from-request <id>]
|
|
@@ -2132,6 +2133,7 @@ Models (your own writing models, each trained on writing you give it so it write
|
|
|
2132
2133
|
models material-review <id> <request-id> [<selection-id>…] [--cancel]
|
|
2133
2134
|
Accept this request, or cancel it; never trains
|
|
2134
2135
|
models material-history <id> [--offset <n>] Earlier material requests
|
|
2136
|
+
models preview <id> [--offset <n>] The training rows a run would build
|
|
2135
2137
|
models add <id> <url>… [--train] Links to pieces of your writing; --train starts training
|
|
2136
2138
|
models find <id> "<the writing to find>" [--max <n>] Letter finds the links and proposes them
|
|
2137
2139
|
models confirm <id> [<link-id>…] [--keep-rest] [--no-train]
|
|
@@ -2142,7 +2144,7 @@ Models (your own writing models, each trained on writing you give it so it write
|
|
|
2142
2144
|
models rewrite <id> "<source text>" Rewrite supplied prose in its trained voice
|
|
2143
2145
|
models compare <id> "<source text>" Compare your model, Astra and Claude + Skill
|
|
2144
2146
|
models write <id> "<what to write>" [--words <n>] Legacy ask-based generation
|
|
2145
|
-
models update <id> [--name <n>] [--budget <usd>] [--description <d>]
|
|
2147
|
+
models update <id> [--name <n>] [--budget <usd>] [--description <d>] [--base <base-id>]
|
|
2146
2148
|
models archive <id> | models restore <id>
|
|
2147
2149
|
|
|
2148
2150
|
Bench (Benches: open-source benchmarks on their own domains, kept running; @letterstory.com only):
|
package/lib/commands/models.mjs
CHANGED
|
@@ -5,18 +5,19 @@
|
|
|
5
5
|
// write_with_writing_model), the same lib functions the app calls.
|
|
6
6
|
//
|
|
7
7
|
// letterstory models [list] [--archived]
|
|
8
|
-
// letterstory models create "<name>" [--budget <usd>] [--description <d>]
|
|
8
|
+
// letterstory models create "<name>" [--budget <usd>] [--description <d>] [--base qwen2.5-14b-instruct|qwen3.5-27b|gemma-3-27b-it]
|
|
9
9
|
// letterstory models show <id>
|
|
10
10
|
// letterstory models add <id> <url>… [--train]
|
|
11
11
|
// letterstory models upload <id> <file-or-folder>…
|
|
12
12
|
// letterstory models material <id> "<material or request>"
|
|
13
|
+
// letterstory models preview <id> [--offset <n>] the training set a run would build
|
|
13
14
|
// letterstory models find <id> "<the writing to find>" [--max <n>]
|
|
14
15
|
// letterstory models confirm <id> [<link-id>…] [--keep-rest] [--no-train] no link ids: all of them
|
|
15
16
|
// letterstory models remove <id> <link-id>…
|
|
16
17
|
// letterstory models train <id> [--retry]
|
|
17
18
|
// letterstory models stop <id> stop what is training
|
|
18
19
|
// letterstory models write <id> "<what to write>" [--words <n>]
|
|
19
|
-
// letterstory models update <id> [--name <n>] [--budget <usd>] [--description <d>]
|
|
20
|
+
// letterstory models update <id> [--name <n>] [--budget <usd>] [--description <d>] [--base <base-id>]
|
|
20
21
|
// letterstory models archive <id> | models restore <id>
|
|
21
22
|
|
|
22
23
|
import { readFileSync, readdirSync, statSync } from "node:fs";
|
|
@@ -35,6 +36,7 @@ export const ARGS = {
|
|
|
35
36
|
name: { value: (flags, positionals) => flagStr(flags.name) ?? (positionals.join(" ").trim() || undefined) },
|
|
36
37
|
description: "description",
|
|
37
38
|
budget_usd: { flag: "budget", type: "num" },
|
|
39
|
+
base_model: "base",
|
|
38
40
|
},
|
|
39
41
|
list_writing_models: { archived: { flag: "archived", type: "bool" } },
|
|
40
42
|
get_writing_model: { model_id: modelId },
|
|
@@ -43,6 +45,7 @@ export const ARGS = {
|
|
|
43
45
|
name: "name",
|
|
44
46
|
description: "description",
|
|
45
47
|
budget_usd: { flag: "budget", type: "num" },
|
|
48
|
+
base_model: "base",
|
|
46
49
|
archived: { internal: "models archive / models restore" },
|
|
47
50
|
},
|
|
48
51
|
add_writing_model_links: {
|
|
@@ -71,6 +74,7 @@ export const ARGS = {
|
|
|
71
74
|
selection_id: "selection",
|
|
72
75
|
statuses: { flag: "status", type: "list" },
|
|
73
76
|
},
|
|
77
|
+
preview_writing_model_training: { model_id: modelId, offset: { flag: "offset", type: "num" } },
|
|
74
78
|
review_writing_model_material: {
|
|
75
79
|
model_id: modelId,
|
|
76
80
|
request_id: { positional: 1, required: true, label: "request-id" },
|
|
@@ -210,6 +214,21 @@ export async function cmdModels(ctx) {
|
|
|
210
214
|
case "material-show":
|
|
211
215
|
printResult(next.io, next.flags, await call(next, "get_writing_model_material"), (r) => JSON.stringify(r));
|
|
212
216
|
return 0;
|
|
217
|
+
case "preview": {
|
|
218
|
+
refuseUnknownFlags(next, ARGS.preview_writing_model_training, []);
|
|
219
|
+
printResult(next.io, next.flags, await call(next, "preview_writing_model_training"), (r) =>
|
|
220
|
+
[
|
|
221
|
+
`${r.sources} sources, ${r.pieces} pieces (${r.repeatedPieces} repeated, kept once), ${r.passages} rows, ${r.words} words`,
|
|
222
|
+
`${r.trainRows} to train on, ${r.heldOutRows} held out${r.blockedOn ? `; ${r.blockedOn}` : ""}`,
|
|
223
|
+
...r.rows.map(
|
|
224
|
+
(row) =>
|
|
225
|
+
`\n--- ${row.title ?? row.sourceId}${row.parts > 1 ? ` (part ${row.part} of ${row.parts})` : ""}, ${row.words} words${row.heldOut ? ", held out" : ""}\n${row.text}${row.truncated ? "\n…" : ""}`
|
|
226
|
+
),
|
|
227
|
+
...(r.hasMore ? ["\nMore: --offset"] : []),
|
|
228
|
+
].join("\n")
|
|
229
|
+
);
|
|
230
|
+
return 0;
|
|
231
|
+
}
|
|
213
232
|
case "material": {
|
|
214
233
|
refuseUnknownFlags(next, ARGS.ingest_writing_model_material, []);
|
|
215
234
|
return modelShow(next, await call(next, "ingest_writing_model_material"));
|