@clickminded/coauthor-cli 0.0.88 → 0.0.89
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/dist/commands.d.ts
CHANGED
|
@@ -22,6 +22,8 @@ export declare function draftCompletionMessage(base: string, status: JsonValue):
|
|
|
22
22
|
* question. Nothing when the plan has no AI search data.
|
|
23
23
|
*/
|
|
24
24
|
export declare function seoPlanAiSearchLines(value: unknown): string[];
|
|
25
|
+
/** "AI search mentions since 2026-11-18: Google AI answers 482 (up 12), ChatGPT 37 (down 3)." Null without a comparison. */
|
|
26
|
+
export declare function seoPlanAiTrendLine(value: unknown): string | null;
|
|
25
27
|
/**
|
|
26
28
|
* `--cta save,follow,custom:Join the webinar` -> the web app's cta_variants
|
|
27
29
|
* list (at most 4 endings, at most one custom).
|
package/dist/commands.js
CHANGED
|
@@ -2708,11 +2708,32 @@ function seoPlanResultsMessage(data) {
|
|
|
2708
2708
|
if (missing.length > RESULT_ROWS_SHOWN)
|
|
2709
2709
|
lines.push(` and ${missing.length - RESULT_ROWS_SHOWN} more (see --json data.missing_urls).`);
|
|
2710
2710
|
}
|
|
2711
|
+
const aiTrend = seoPlanAiTrendLine(lastCheck?.ai_visibility);
|
|
2712
|
+
if (aiTrend)
|
|
2713
|
+
lines.push('', aiTrend);
|
|
2711
2714
|
const reason = seoPlanCheckReason(lastCheck);
|
|
2712
2715
|
if (reason)
|
|
2713
2716
|
lines.push('', reason);
|
|
2714
2717
|
return lines.join('\n');
|
|
2715
2718
|
}
|
|
2719
|
+
/** "AI search mentions since 2026-11-18: Google AI answers 482 (up 12), ChatGPT 37 (down 3)." Null without a comparison. */
|
|
2720
|
+
export function seoPlanAiTrendLine(value) {
|
|
2721
|
+
if (!value || typeof value !== 'object')
|
|
2722
|
+
return null;
|
|
2723
|
+
const trend = planRecord(value);
|
|
2724
|
+
const since = planString(trend, 'previous_at');
|
|
2725
|
+
if (!since)
|
|
2726
|
+
return null;
|
|
2727
|
+
const parts = [];
|
|
2728
|
+
for (const [key, label] of [['google', 'Google AI answers'], ['chat_gpt', 'ChatGPT']]) {
|
|
2729
|
+
const row = trend[key] && typeof trend[key] === 'object' ? planRecord(trend[key]) : null;
|
|
2730
|
+
if (!row || typeof row.mentions !== 'number' || typeof row.change !== 'number')
|
|
2731
|
+
continue;
|
|
2732
|
+
const change = row.change === 0 ? 'no change' : `${row.change > 0 ? 'up' : 'down'} ${Math.abs(row.change)}`;
|
|
2733
|
+
parts.push(`${label} ${row.mentions} (${change})`);
|
|
2734
|
+
}
|
|
2735
|
+
return parts.length > 0 ? `AI search mentions since ${since.slice(0, 10)}: ${parts.join(', ')}.` : null;
|
|
2736
|
+
}
|
|
2716
2737
|
function seoPlanWaitFailure(status) {
|
|
2717
2738
|
const code = planString(status, 'error_code');
|
|
2718
2739
|
const message = planString(status, 'error_message') ?? 'The plan run failed.';
|
package/package.json
CHANGED
|
@@ -128,7 +128,8 @@ Posts written without a target search (mostly drafted before SEO mode) are track
|
|
|
128
128
|
|
|
129
129
|
- `data.results` has one row per tracked post (a live address and a search), best news first (moved up, then page one by position, then the rest, then posts no check has read yet): `project_id`, `title`, `keyword`, `tracked_url`, `position`, `previous_position`, `movement`, `ranking_url`, `checked_at` and `tracking`. `tracking` is `null` for a post written for a target search; for a post written without one it is `{keyword, source}`: the search tracked now (`keyword` is `""` while the next check will pick one; it can differ from the row's `keyword`, which is what the last reading used) and who chose it (`source`: `ranked` or `suggested` = CoAuthor picked it, `manual` = the user did, `null` = not picked yet). `position` is Google's organic position; page one means 10 or better. It is `null` when the post's address is not within the top results the check looked at (`data.last_check.depth`, 30 by default), and `movement` is then `not_found`; if `ranking_url` is set, another page of the same site ranks for that search instead, which is worth telling the user. `movement` is `up` or `down` only for a move of 3 places or more, or a move onto or off page one; `same` is steady; `new` means the first reading of that search and address, so there is nothing to compare with yet; `pending` means the post went live after the last check and has no reading yet (`position` and `checked_at` are `null`; the next check reads it).
|
|
130
130
|
- `data.missing_urls` lists posts that have no live address (`project_id`, `title`, `keyword`, `needs_search`, `publication_status`: `needs_search` is `true`, with `keyword` `""`, for a post written without a target search that has no search to track yet, so the next check picks one; `publication_status`: `published`, `submitted`, or `null` when nobody marked the post); only posts explicitly marked as still being edited are left out. Most posts are unmarked, so a `null` post may not be live yet: ask the user before setting an address. They are not tracked until you set one with `coauthor post-details set <project-id> --live-url <url>` (add `--track-search "<search>"` to choose the search for a post without a target search); the next check picks it up.
|
|
131
|
-
- `data.last_check` is `{status, finished_at, partial, partial_reason, plan_refresh_skipped, error_code, credits_charged, free, depth}`. `partial` means the check stopped early (for example credits ran out); `plan_refresh_skipped` (`stale` or `failed`) means the plan's own chances were not refreshed because the plan needs updating, so run `coauthor seo-plan generate`. `status` `skipped` with `error_code` `insufficient_credits` means the account had too few credits and nothing was spent.
|
|
131
|
+
- `data.last_check` is `{status, finished_at, partial, partial_reason, plan_refresh_skipped, error_code, credits_charged, free, depth, ai_visibility}`. `partial` means the check stopped early (for example credits ran out); `plan_refresh_skipped` (`stale` or `failed`) means the plan's own chances were not refreshed because the plan needs updating, so run `coauthor seo-plan generate`. `status` `skipped` with `error_code` `insufficient_credits` means the account had too few credits and nothing was spent.
|
|
132
|
+
- `data.last_check.ai_visibility` is how many AI answers mentioned the site at that check, next to the previous reading: `{fetched_at, previous_at, google, chat_gpt}`. Each platform is `{mentions, cited, previous_mentions, change}` or `null` (`chat_gpt` is `null` outside United States / English). `previous_at` is `null` on the first reading, and `change` is then `null`. The previous reading is the last check's, or the plan's when the plan was updated since. The whole field is `null` when the check did not read AI mentions. Report the change as it is. A change of a few mentions is normal month to month, so don't explain it as the effect of a post. The human output of `results` prints one line for it.
|
|
132
133
|
- Everything is empty or `null` while monthly checks are not switched on for the account, and before the first check has run.
|
|
133
134
|
|
|
134
135
|
When you report results, lead with what moved up and what reached page one, then name any posts without a live address. Do not call a `same` post a failure: one monthly reading is noisy.
|
|
@@ -733,7 +733,8 @@ Posts written without a target search (mostly drafted before SEO mode) are track
|
|
|
733
733
|
|
|
734
734
|
- `data.results` has one row per tracked post (a live address and a search), best news first (moved up, then page one by position, then the rest, then posts no check has read yet): `project_id`, `title`, `keyword`, `tracked_url`, `position`, `previous_position`, `movement`, `ranking_url`, `checked_at` and `tracking`. `tracking` is `null` for a post written for a target search; for a post written without one it is `{keyword, source}`: the search tracked now (`keyword` is `""` while the next check will pick one; it can differ from the row's `keyword`, which is what the last reading used) and who chose it (`source`: `ranked` or `suggested` = CoAuthor picked it, `manual` = the user did, `null` = not picked yet). `position` is Google's organic position; page one means 10 or better. It is `null` when the post's address is not within the top results the check looked at (`data.last_check.depth`, 30 by default), and `movement` is then `not_found`; if `ranking_url` is set, another page of the same site ranks for that search instead, which is worth telling the user. `movement` is `up` or `down` only for a move of 3 places or more, or a move onto or off page one; `same` is steady; `new` means the first reading of that search and address, so there is nothing to compare with yet; `pending` means the post went live after the last check and has no reading yet (`position` and `checked_at` are `null`; the next check reads it).
|
|
735
735
|
- `data.missing_urls` lists posts that have no live address (`project_id`, `title`, `keyword`, `needs_search`, `publication_status`: `needs_search` is `true`, with `keyword` `""`, for a post written without a target search that has no search to track yet, so the next check picks one; `publication_status`: `published`, `submitted`, or `null` when nobody marked the post); only posts explicitly marked as still being edited are left out. Most posts are unmarked, so a `null` post may not be live yet: ask the user before setting an address. They are not tracked until you set one with `coauthor post-details set <project-id> --live-url <url>` (add `--track-search "<search>"` to choose the search for a post without a target search); the next check picks it up.
|
|
736
|
-
- `data.last_check` is `{status, finished_at, partial, partial_reason, plan_refresh_skipped, error_code, credits_charged, free, depth}`. `partial` means the check stopped early (for example credits ran out); `plan_refresh_skipped` (`stale` or `failed`) means the plan's own chances were not refreshed because the plan needs updating, so run `coauthor seo-plan generate`. `status` `skipped` with `error_code` `insufficient_credits` means the account had too few credits and nothing was spent.
|
|
736
|
+
- `data.last_check` is `{status, finished_at, partial, partial_reason, plan_refresh_skipped, error_code, credits_charged, free, depth, ai_visibility}`. `partial` means the check stopped early (for example credits ran out); `plan_refresh_skipped` (`stale` or `failed`) means the plan's own chances were not refreshed because the plan needs updating, so run `coauthor seo-plan generate`. `status` `skipped` with `error_code` `insufficient_credits` means the account had too few credits and nothing was spent.
|
|
737
|
+
- `data.last_check.ai_visibility` is how many AI answers mentioned the site at that check, next to the previous reading: `{fetched_at, previous_at, google, chat_gpt}`. Each platform is `{mentions, cited, previous_mentions, change}` or `null` (`chat_gpt` is `null` outside United States / English). `previous_at` is `null` on the first reading, and `change` is then `null`. The previous reading is the last check's, or the plan's when the plan was updated since. The whole field is `null` when the check did not read AI mentions. Report the change as it is. A change of a few mentions is normal month to month, so don't explain it as the effect of a post. The human output of `results` prints one line for it.
|
|
737
738
|
- Everything is empty or `null` while monthly checks are not switched on for the account, and before the first check has run.
|
|
738
739
|
|
|
739
740
|
When you report results, lead with what moved up and what reached page one, then name any posts without a live address. Do not call a `same` post a failure: one monthly reading is noisy.
|