@letterstory/cli 0.177.138 → 0.177.139
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 -1
- package/lib/commands/posts.mjs +11 -1
- package/package.json +1 -1
package/lib/cli.mjs
CHANGED
|
@@ -93,7 +93,7 @@ import {
|
|
|
93
93
|
import { fetchParkedSections, withoutParked } from "./parked.mjs";
|
|
94
94
|
|
|
95
95
|
// Matches cli/package.json; publish-cli.yml rewrites both to the published version.
|
|
96
|
-
export const VERSION = "0.177.
|
|
96
|
+
export const VERSION = "0.177.139";
|
|
97
97
|
|
|
98
98
|
/** The exit code for a gate refusal (CARD_REQUIRED, PAYMENT_FAILED, OUT_OF_TOKENS): 1 is a plain error. */
|
|
99
99
|
export const EXIT_PAYMENT_REQUIRED = 3;
|
|
@@ -109,6 +109,8 @@ export const BOOLEAN_FLAGS = new Set([
|
|
|
109
109
|
"disconnect",
|
|
110
110
|
// models list: say whether each trained model's server is up now.
|
|
111
111
|
"serving",
|
|
112
|
+
// posts remediate: change a post a person has edited.
|
|
113
|
+
"allow-edited",
|
|
112
114
|
// Models material: retain a request for attachments before preparing it.
|
|
113
115
|
"stage-only",
|
|
114
116
|
// visits export: only the people or companies who fit the ICP, or only those who don't.
|
|
@@ -701,6 +703,8 @@ Content:
|
|
|
701
703
|
[--paper-trail '<json>'] [--metadata-json '<json>']
|
|
702
704
|
Edit a post; only what you pass changes
|
|
703
705
|
posts edit <article-id> --instruction "<what to change>"
|
|
706
|
+
posts remediate <article-id> [--instruction "<what to change>"] [--line "<sentence>" ...] [--apply] [--allow-edited]
|
|
707
|
+
change only the named sentences, never the rest; a dry run unless --apply
|
|
704
708
|
Rewrite the post with AI from an instruction
|
|
705
709
|
posts mentions <article-id> Re-apply the brand-mention & competitor policy
|
|
706
710
|
posts history <article-id> The post's versions, newest first
|
package/lib/commands/posts.mjs
CHANGED
|
@@ -88,6 +88,13 @@ export const ARGS = {
|
|
|
88
88
|
article_id: ARTICLE,
|
|
89
89
|
instruction: { flag: "instruction", required: true },
|
|
90
90
|
},
|
|
91
|
+
remediate_article: {
|
|
92
|
+
article_id: ARTICLE,
|
|
93
|
+
instruction: "instruction",
|
|
94
|
+
lines: { flag: "line", type: "list", label: "line" },
|
|
95
|
+
apply: { flag: "apply", type: "bool" },
|
|
96
|
+
allow_edited: { flag: "allow-edited", type: "bool" },
|
|
97
|
+
},
|
|
91
98
|
run_mention_pass: {
|
|
92
99
|
article_id: ARTICLE,
|
|
93
100
|
},
|
|
@@ -155,6 +162,8 @@ export async function cmdPosts(ctx) {
|
|
|
155
162
|
return postsWrite(rest, "update_article", "Updated.");
|
|
156
163
|
case "edit":
|
|
157
164
|
return postsWrite(rest, "edit_article_with_prompt", "Edited.");
|
|
165
|
+
case "remediate":
|
|
166
|
+
return postsWrite(rest, "remediate_article", "Remediated.");
|
|
158
167
|
case "mentions":
|
|
159
168
|
return postsWrite(rest, "run_mention_pass", "Mention pass done.");
|
|
160
169
|
case "history":
|
|
@@ -174,7 +183,7 @@ export async function cmdPosts(ctx) {
|
|
|
174
183
|
return postsDelete(rest);
|
|
175
184
|
default:
|
|
176
185
|
throw new CliError(
|
|
177
|
-
`Unknown posts subcommand: ${sub ?? "(none)"}. Try: list, show, new, update, edit, mentions, history, restore, export, comments, publish, unpublish, delete`
|
|
186
|
+
`Unknown posts subcommand: ${sub ?? "(none)"}. Try: list, show, new, update, edit, remediate, mentions, history, restore, export, comments, publish, unpublish, delete`
|
|
178
187
|
);
|
|
179
188
|
}
|
|
180
189
|
}
|
|
@@ -183,6 +192,7 @@ export async function cmdPosts(ctx) {
|
|
|
183
192
|
const CALL = {
|
|
184
193
|
update_article: (client, args) => client.callTool("update_article", args),
|
|
185
194
|
edit_article_with_prompt: (client, args) => client.callTool("edit_article_with_prompt", args),
|
|
195
|
+
remediate_article: (client, args) => client.callTool("remediate_article", args),
|
|
186
196
|
run_mention_pass: (client, args) => client.callTool("run_mention_pass", args),
|
|
187
197
|
get_article_history: (client, args) => client.callTool("get_article_history", args),
|
|
188
198
|
restore_article_version: (client, args) => client.callTool("restore_article_version", args),
|