@siteoshq/cli 2.4.0 → 2.5.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/README.md +1 -0
- package/dist/cli.js +22 -2
- package/dist/cli.js.map +1 -1
- package/package.json +18 -20
package/README.md
CHANGED
|
@@ -222,6 +222,7 @@ siteos seo research serp export <run-id> --keyword "website analytics" --format
|
|
|
222
222
|
siteos seo research plan --input ./research-request.json --json
|
|
223
223
|
siteos seo research run --input ./research-request.json --idempotency-key <retry-key> --json
|
|
224
224
|
siteos seo research wait <run-id> --json
|
|
225
|
+
siteos seo research retry <run-id> --idempotency-key <continuation-key> --json
|
|
225
226
|
siteos seo research export <run-id> --format json --output ./research-report.json --json
|
|
226
227
|
siteos seo gsc status --json
|
|
227
228
|
siteos seo gsc report --dataset queries --filter all --json
|
package/dist/cli.js
CHANGED
|
@@ -9001,6 +9001,7 @@ var RESEARCH_HELP = `
|
|
|
9001
9001
|
siteos seo research show <run-id> [--environment <slug>] [--json]
|
|
9002
9002
|
siteos seo research plan --input <request.json> [--environment <slug>] [--json]
|
|
9003
9003
|
siteos seo research run --input <request.json> [--idempotency-key <key>] [--environment <slug>] [--json]
|
|
9004
|
+
siteos seo research retry <run-id> [--idempotency-key <key>] [--environment <slug>] [--json]
|
|
9004
9005
|
siteos seo research wait <run-id> [--timeout <seconds>] [--environment <slug>] [--json]
|
|
9005
9006
|
siteos seo research cancel <run-id> [--environment <slug>] [--json]
|
|
9006
9007
|
siteos seo research export <run-id> --format <json|csv> --output <new-file> [--environment <slug>] [--json]
|
|
@@ -9022,6 +9023,7 @@ Rankings accepts up to 10 keywords and 5 competitors. AI visibility accepts bran
|
|
|
9022
9023
|
Markets: US, GB, ES, DE, FR, CA, AU. Languages: en, es, de, fr, pt, it, nl, ru.
|
|
9023
9024
|
Platforms: chat_gpt, claude, gemini, perplexity. Brand lookup uses brandPlatform chat_gpt|google and brandMatch domain|brand.
|
|
9024
9025
|
Plan validates the request and shows planned parts and available research credits without enqueueing work.
|
|
9026
|
+
Retry creates a continuation using the original questions and settings; it preserves usable saved answers and only requests missing parts. It consumes credits and requires explicit scope authorization, like Run. Original reports and observation dates remain available.
|
|
9025
9027
|
Run consumes Organization research credits through the same worker as the interface. Preserve the retry key after an uncertain response.
|
|
9026
9028
|
SERP ensure collects one saved organic snapshot for a keyword returned by the selected completed Keyword Research report. It uses research credits once; repeating the same report/word returns the saved job, including failures. Show/wait/export only read and never spend. New reports can collect fresh snapshots.
|
|
9027
9029
|
History returns the latest 30 checks per section; show/export can address older retained run IDs. Saved checks are limited to 100 per resource.
|
|
@@ -9089,6 +9091,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9089
9091
|
show: { args: 2, flags: [] },
|
|
9090
9092
|
plan: { args: 1, flags: ["input"] },
|
|
9091
9093
|
run: { args: 1, flags: ["input", "idempotency-key"] },
|
|
9094
|
+
retry: { args: 2, flags: ["idempotency-key"] },
|
|
9092
9095
|
wait: { args: 2, flags: ["timeout"] },
|
|
9093
9096
|
cancel: { args: 2, flags: [] },
|
|
9094
9097
|
export: { args: 2, flags: ["format", "output"] },
|
|
@@ -9131,7 +9134,7 @@ async function runSeoResearchCommand(options) {
|
|
|
9131
9134
|
"The request file needs a research kind and target domain. Run siteos seo --help."
|
|
9132
9135
|
);
|
|
9133
9136
|
}
|
|
9134
|
-
if (action === "run") {
|
|
9137
|
+
if (action === "run" || action === "retry") {
|
|
9135
9138
|
idempotencyKey = values["idempotency-key"] ?? randomUUID6();
|
|
9136
9139
|
if (!/^[a-zA-Z0-9_-]{8,100}$/u.test(idempotencyKey))
|
|
9137
9140
|
throw new Error(
|
|
@@ -9274,7 +9277,24 @@ async function runSeoResearchCommand(options) {
|
|
|
9274
9277
|
stdout: JSON.stringify(record, null, 2)
|
|
9275
9278
|
};
|
|
9276
9279
|
}
|
|
9277
|
-
if (action === "
|
|
9280
|
+
if (action === "retry") {
|
|
9281
|
+
const source = await get(`/runs/${encodeURIComponent(id)}`);
|
|
9282
|
+
resourceSchema.parse(source.resource);
|
|
9283
|
+
const original = runSchema.parse(source.run);
|
|
9284
|
+
if (original.id !== id || ["queued", "running"].includes(original.state))
|
|
9285
|
+
throw new Error("Choose the exact stopped research report to retry.");
|
|
9286
|
+
record = await get("/runs", "run", {
|
|
9287
|
+
request: original.request,
|
|
9288
|
+
retryOf: id,
|
|
9289
|
+
idempotencyKey
|
|
9290
|
+
});
|
|
9291
|
+
const next = runSchema.parse(record.run);
|
|
9292
|
+
if (next.retryOf !== id || !isDeepStrictEqual(next.request, original.request))
|
|
9293
|
+
throw new Error(
|
|
9294
|
+
"The continued check does not match the original report."
|
|
9295
|
+
);
|
|
9296
|
+
record = { ...record, idempotencyKey };
|
|
9297
|
+
} else if (action === "plan" || action === "run" || action === "saved save") {
|
|
9278
9298
|
const plan = await get("/plan", "read", input);
|
|
9279
9299
|
resourceSchema.parse(plan.resource);
|
|
9280
9300
|
const canonical = requestSchema.parse(plan.request);
|