@letterstory/cli 0.177.33 → 0.177.34
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/models.mjs +10 -0
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
89
89
|
|
|
90
90
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
91
|
-
export const VERSION = "0.177.
|
|
91
|
+
export const VERSION = "0.177.34";
|
|
92
92
|
|
|
93
93
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
94
94
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
package/lib/commands/models.mjs
CHANGED
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
// letterstory models create "<name>" [--budget <usd>] [--description <d>]
|
|
9
9
|
// letterstory models show <id>
|
|
10
10
|
// letterstory models add <id> <url>… [--train]
|
|
11
|
+
// letterstory models material <id> "<material or request>"
|
|
11
12
|
// letterstory models find <id> "<the writing to find>" [--max <n>]
|
|
12
13
|
// letterstory models confirm <id> [<link-id>…] [--keep-rest] [--no-train] no link ids: all of them
|
|
13
14
|
// letterstory models remove <id> <link-id>…
|
|
@@ -46,6 +47,11 @@ export const ARGS = {
|
|
|
46
47
|
urls: { value: rest(1) },
|
|
47
48
|
train: { flag: "train", type: "bool" },
|
|
48
49
|
},
|
|
50
|
+
ingest_writing_model_material: {
|
|
51
|
+
model_id: modelId,
|
|
52
|
+
text: { value: (flags, positionals) => positionals.slice(1).join(" ") },
|
|
53
|
+
documents: { internal: "extract_document then generic mcp call" },
|
|
54
|
+
},
|
|
49
55
|
add_writing_model_texts: {
|
|
50
56
|
model_id: modelId,
|
|
51
57
|
documents: {
|
|
@@ -125,6 +131,10 @@ export async function cmdModels(ctx) {
|
|
|
125
131
|
}
|
|
126
132
|
case "show":
|
|
127
133
|
return modelShow(next, await call(next, "get_writing_model"));
|
|
134
|
+
case "material": {
|
|
135
|
+
refuseUnknownFlags(next, ARGS.ingest_writing_model_material, []);
|
|
136
|
+
return modelShow(next, await call(next, "ingest_writing_model_material"));
|
|
137
|
+
}
|
|
128
138
|
case "add-text": {
|
|
129
139
|
refuseUnknownFlags(next, ARGS.add_writing_model_texts, ["title"]);
|
|
130
140
|
const result = await call(next, "add_writing_model_texts");
|