@clickminded/coauthor-cli 0.0.38 → 0.0.40

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 CHANGED
@@ -75,9 +75,13 @@ coauthor image replace <id> --placeholder-id <panel id> --file <path> --json #
75
75
  coauthor repurpose generate <id> --format all --json # X thread and post, LinkedIn, Facebook, email newsletter
76
76
  coauthor repurpose download <id> --out ./social # copy-ready files plus the article
77
77
  coauthor share <id> --json # public read-only link
78
- coauthor export wordpress <id> --yes --slug <slug> --json # creates a WordPress draft post
78
+ coauthor post-details show <id> --json # SEO title, meta description, slug, excerpt
79
+ coauthor post-details set <id> --seo-title "..." --json # exports use these as defaults
80
+ coauthor draft get <id> --format markdown --frontmatter --json # markdown with YAML frontmatter
81
+ coauthor export wordpress <id> --yes --json # creates a WordPress draft post (--slug to override)
79
82
  coauthor credits <id> --json
80
83
  coauthor integrations list --json # WordPress sites and X accounts
84
+ coauthor seo markets --country Mexico --language Spanish --json # Google search data coverage for a market
81
85
  ```
82
86
 
83
87
  Run `coauthor --help` or `coauthor <command> --help` for every command and option. `--json` gives machine-readable output, `--wait` waits for long-running work, and JSON options such as `--data` and `--contract` accept `@file.json` (or `@-` for stdin).
@@ -89,7 +93,7 @@ Publishing an X thread and exporting to WordPress are real side effects. They ne
89
93
  ```sh
90
94
  coauthor auth login --with-publish
91
95
  coauthor publish thread <id> --yes --json
92
- coauthor export wordpress <id> --yes --slug <slug> --json
96
+ coauthor export wordpress <id> --yes --json
93
97
  ```
94
98
 
95
99
  ## Credits
package/dist/commands.js CHANGED
@@ -43,6 +43,10 @@ export async function runCommand(input, context) {
43
43
  return runSourceCommand(action, input, context.client);
44
44
  if (scope === 'draft')
45
45
  return runDraftCommand(action, input, context);
46
+ if (scope === 'post-details')
47
+ return runPostDetailsCommand(action, input, context.client);
48
+ if (scope === 'seo')
49
+ return runSeoCommand(action, input, context.client);
46
50
  if (scope === 'workflow')
47
51
  return runWorkflowCommand(action, input, context);
48
52
  if (scope === 'credits')
@@ -600,7 +604,17 @@ async function runDraftCommand(action, input, context) {
600
604
  }
601
605
  if (action === 'get') {
602
606
  const format = getString(input.values, 'format');
603
- const data = await client.request({ path: format ? `${basePath}/get?format=${encodeURIComponent(format)}` : `${basePath}/get` });
607
+ const frontmatter = getBoolean(input.values, 'frontmatter');
608
+ if (frontmatter && format?.trim().toLowerCase() !== 'markdown') {
609
+ throw new Error('--frontmatter only applies to --format markdown.');
610
+ }
611
+ const query = new URLSearchParams();
612
+ if (format)
613
+ query.set('format', format);
614
+ if (frontmatter)
615
+ query.set('frontmatter', '1');
616
+ const suffix = query.toString();
617
+ const data = await client.request({ path: suffix ? `${basePath}/get?${suffix}` : `${basePath}/get` });
604
618
  return { ok: true, data };
605
619
  }
606
620
  if (action === 'revise')
@@ -627,6 +641,90 @@ async function runDraftCommand(action, input, context) {
627
641
  }
628
642
  throw new Error('Usage: coauthor draft <generate|status|get|save|revise|revision> <projectId>');
629
643
  }
644
+ const POST_DETAILS_FLAG_FIELDS = [
645
+ ['seo-title', 'seo_title'],
646
+ ['description', 'meta_description'],
647
+ ['slug', 'slug'],
648
+ ['excerpt', 'excerpt'],
649
+ ];
650
+ async function runSeoCommand(action, input, client) {
651
+ if (action !== 'markets')
652
+ throw new Error('Usage: coauthor seo markets [--country <country>] [--language <language>]');
653
+ const query = new URLSearchParams();
654
+ const country = getString(input.values, 'country')?.trim();
655
+ const language = getString(input.values, 'language')?.trim();
656
+ if (country)
657
+ query.set('country', country);
658
+ if (language)
659
+ query.set('language', language);
660
+ const suffix = query.toString();
661
+ const data = await client.request({ path: suffix ? `seo/markets?${suffix}` : 'seo/markets' });
662
+ return { ok: true, message: describeMarketCoverage(data), data };
663
+ }
664
+ function namesOf(value, key = 'name') {
665
+ if (!Array.isArray(value))
666
+ return [];
667
+ return value.flatMap((entry) => {
668
+ const name = entry && typeof entry === 'object' && !Array.isArray(entry) ? entry[key] : null;
669
+ return typeof name === 'string' ? [name] : [];
670
+ });
671
+ }
672
+ /** A one-paragraph summary of a seo/markets response; --json has the full data. */
673
+ function describeMarketCoverage(data) {
674
+ if (!data || typeof data !== 'object' || Array.isArray(data))
675
+ return undefined;
676
+ const record = data;
677
+ const explanation = record.explanation && typeof record.explanation === 'object' && !Array.isArray(record.explanation)
678
+ ? record.explanation.message
679
+ : null;
680
+ if (record.kind === 'pair') {
681
+ const support = record.support;
682
+ return typeof explanation === 'string' ? explanation : `Fully covered (tier: ${String(support?.tier ?? 'full')}).`;
683
+ }
684
+ if (record.kind === 'country') {
685
+ if (typeof explanation === 'string')
686
+ return explanation;
687
+ const country = record.country;
688
+ const full = namesOf(record.full_languages);
689
+ const limited = namesOf(record.limited_languages);
690
+ return `${String(country?.name ?? 'This country')}: full data for ${full.join(', ') || 'no languages'}; limited data for ${limited.length} other language(s).`;
691
+ }
692
+ if (record.kind === 'language') {
693
+ const language = record.language;
694
+ if (!language)
695
+ return "That language isn't one CoAuthor has Google search data for.";
696
+ const countries = namesOf(record.full_countries);
697
+ return `${String(language.name)} is fully covered in ${countries.length} countries: ${countries.join(', ')}.`;
698
+ }
699
+ if (record.kind === 'all' && Array.isArray(record.full_markets)) {
700
+ return `${record.full_markets.length} countries have full search data. Use --country or --language to check one market.`;
701
+ }
702
+ return undefined;
703
+ }
704
+ async function runPostDetailsCommand(action, input, client) {
705
+ const projectId = requireProjectId(input);
706
+ const path = `projects/${encodeURIComponent(projectId)}/post-details`;
707
+ if (!action || action === 'show') {
708
+ const data = await client.request({ path });
709
+ const details = getResponseValue(data, 'post_details');
710
+ return details === null
711
+ ? { ok: true, message: 'This post has no post details. They are generated for drafts created after the feature launched.', data }
712
+ : { ok: true, data };
713
+ }
714
+ if (action === 'set') {
715
+ const body = parseJsonOption(input.values);
716
+ for (const [flag, field] of POST_DETAILS_FLAG_FIELDS) {
717
+ const value = getString(input.values, flag);
718
+ if (value !== undefined)
719
+ body[field] = value.trim() ? value : null;
720
+ }
721
+ if (Object.keys(body).length === 0) {
722
+ throw new Error('Usage: coauthor post-details set <projectId> [--seo-title "..."] [--description "..."] [--slug "..."] [--excerpt "..."]');
723
+ }
724
+ return { ok: true, data: await client.request({ method: 'PATCH', path, body }) };
725
+ }
726
+ throw new Error('Usage: coauthor post-details <show|set> <projectId>');
727
+ }
630
728
  // Revise by instruction: CoAuthor's editor proposes the change, and the
631
729
  // calling agent reviews the groups and applies or discards them.
632
730
  async function runDraftReviseCommand(projectId, input, context) {
@@ -987,6 +1085,12 @@ function exportRequestBody(action, input) {
987
1085
  body.published = status === 'published';
988
1086
  if (description !== undefined)
989
1087
  body.seoDescription = description;
1088
+ const excerpt = getString(input.values, 'excerpt');
1089
+ if (excerpt !== undefined)
1090
+ body.excerpt = excerpt;
1091
+ const seoTitle = getString(input.values, 'seo-title');
1092
+ if (seoTitle !== undefined)
1093
+ body.seoTitle = seoTitle;
990
1094
  return body;
991
1095
  }
992
1096
  // blog
@@ -2504,7 +2608,9 @@ export function helpResult(command = []) {
2504
2608
  ' research run|status|structured',
2505
2609
  ' draft generate|status|get|save|revise',
2506
2610
  ' draft revision show|apply|discard',
2507
- ' draft get supports --format json|markdown|html|text',
2611
+ ' draft get supports --format json|markdown|html|text (--frontmatter adds post details to markdown)',
2612
+ ' post-details show|set',
2613
+ ' seo markets [--country <country>] [--language <language>]',
2508
2614
  ' workflow show|status|advance|run|rewind|approve|resume',
2509
2615
  ' workflow run/advance supports --briefing-mode auto|strict|off and --require-brief-review',
2510
2616
  ' image list|status|show|generate|edit|metadata|replace',
@@ -2573,9 +2679,10 @@ function commandHelp(command) {
2573
2679
  'Shows or updates saved primary planning/writing model preferences while preserving fallback order.',
2574
2680
  ].join('\n'),
2575
2681
  'draft get': [
2576
- 'Usage: coauthor draft get <project-id> [--format json|markdown|html|text] [--json]',
2682
+ 'Usage: coauthor draft get <project-id> [--format json|markdown|html|text] [--frontmatter] [--json]',
2577
2683
  '',
2578
2684
  'Retrieves a saved generated draft. Chat responses are available through coauthor chat show.',
2685
+ '--frontmatter (markdown only) prepends YAML frontmatter from the post details: title, seo_title, description, slug, excerpt, and the featured image. Posts without post details get no frontmatter.',
2579
2686
  ].join('\n'),
2580
2687
  'draft save': [
2581
2688
  'Usage: coauthor draft save <project-id> --data @payload.json [--force] [--json]',
@@ -2699,12 +2806,29 @@ function commandHelp(command) {
2699
2806
  ].join('\n'),
2700
2807
  export: [
2701
2808
  'Usage: coauthor export list <project-id> [--json]',
2702
- ' coauthor export wordpress <project-id> --yes --slug <slug> [--connection-id <id>] [--idempotency-key <key>] [--json]',
2809
+ ' coauthor export wordpress <project-id> --yes [--slug <slug>] [--connection-id <id>] [--idempotency-key <key>] [--json]',
2703
2810
  '',
2704
2811
  'wordpress creates a draft post on the connected WordPress site and returns wordpress_edit_url.',
2812
+ 'Without --slug it uses the post details slug, then the title. A new WordPress post also gets the post details excerpt.',
2705
2813
  'The export prints its operation key; check it with coauthor operation status <key>, or rerun with --idempotency-key <key> to replay safely.',
2706
2814
  'Needs a login with publish permission (coauthor auth login --with-publish). With several sites connected, the error lists their ids for --connection-id.',
2707
2815
  ].join('\n'),
2816
+ 'seo markets': [
2817
+ 'Usage: coauthor seo markets [--country <country>] [--language <language>] [--json]',
2818
+ '',
2819
+ 'Shows which countries and languages CoAuthor has Google search data for (from DataForSEO).',
2820
+ 'Full means keyword volume, difficulty and ranking checks are available. Limited means CoAuthor can analyze what ranks but not keyword difficulty or existing rankings.',
2821
+ 'With both --country and --language it checks one market and explains anything that is not covered, with alternatives.',
2822
+ 'Countries and languages accept names or codes ("Mexico" or "MX", "Spanish" or "es"). Markets are country-level.',
2823
+ ].join('\n'),
2824
+ 'post-details': [
2825
+ 'Usage: coauthor post-details show <project-id> [--json]',
2826
+ ' coauthor post-details set <project-id> [--seo-title "..."] [--description "..."] [--slug "..."] [--excerpt "..."] [--json]',
2827
+ '',
2828
+ 'Post details are the SEO title, meta description, slug and excerpt CoAuthor writes after a draft. Exports use them as defaults.',
2829
+ 'set changes only the fields you pass; an empty value clears a field. Edited fields are kept when the draft is regenerated.',
2830
+ 'Posts drafted before post details launched have none (show returns post_details: null; set returns post_details_unavailable).',
2831
+ ].join('\n'),
2708
2832
  share: [
2709
2833
  'Usage: coauthor share <project-id> [--json]',
2710
2834
  '',
package/dist/parser.js CHANGED
@@ -52,6 +52,11 @@ const OPTIONS = {
52
52
  slug: { type: 'string' },
53
53
  permalink: { type: 'string' },
54
54
  'connection-id': { type: 'string' },
55
+ excerpt: { type: 'string' },
56
+ 'seo-title': { type: 'string' },
57
+ frontmatter: { type: 'boolean', default: false },
58
+ country: { type: 'string' },
59
+ language: { type: 'string' },
55
60
  status: { type: 'string' },
56
61
  limit: { type: 'string' },
57
62
  cursor: { type: 'string' },
@@ -188,6 +193,10 @@ function commandLength(positionals) {
188
193
  return positionals[2] && ['show', 'apply', 'discard'].includes(positionals[2]) ? 3 : 2;
189
194
  if (first === 'credits')
190
195
  return 1;
196
+ if (first === 'post-details')
197
+ return second && ['show', 'set'].includes(second) ? 2 : 1;
198
+ if (first === 'seo')
199
+ return second === 'markets' ? 2 : 1;
191
200
  if (['contract', 'outline', 'research-plan', 'research', 'draft', 'image', 'thread', 'slideshow', 'publish', 'export', 'operation'].includes(first ?? ''))
192
201
  return second ? 2 : 1;
193
202
  return 1;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.38",
3
+ "version": "0.0.40",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -56,6 +56,7 @@ Typical timing: brief and outline under a minute; research and draft 3–10 minu
56
56
  | `user_recently_editing` | The user is typing in the browser. Wait or ask; use `--force` only with their OK. |
57
57
  | `revision_pending` | Apply or discard the open revision first. |
58
58
  | `revise_unavailable` | Edit the draft directly with `draft get` and `draft save`. |
59
+ | `post_details_unavailable` | The draft predates post details; pass slugs and descriptions to exports directly. |
59
60
  | `coauthor_access_required` | The CoAuthor subscription is inactive. Tell the user. |
60
61
 
61
62
  Everything else, including auth problems: `references/troubleshooting.md`. Credits, plans, and models: `references/credits-and-plans.md`.
@@ -16,6 +16,10 @@ All fields are optional and omitted ones get defaults, but always include at lea
16
16
  - `coauthor source add <id> <file>` uploads a reference document CoAuthor's research reads (PDF up to about 3.3 MB through the CLI, .txt or .md up to 512 KB, 5 per project). `coauthor source list <id> --json` shows them; `coauthor source remove <id> <source id> --yes` deletes one.
17
17
  - Add sources before research runs. Adding or removing one after research marks the research and draft stale (the output says `research_invalidated`), so research has to run again.
18
18
 
19
+ ## Search markets
20
+
21
+ `coauthor seo markets --country <country> --language <language> --json` checks whether CoAuthor has Google search data for a country and language (names or codes both work). `data.support.tier` is `full` (search volume, keyword difficulty, and ranking checks), `limited` (CoAuthor can analyze what ranks, but not difficulty or existing rankings), `unsupported`, or `unknown_country`. `data.explanation.message` is a sentence you can give the user, and `data.explanation.alternatives` lists covered languages for that country and covered countries for that language. Use `--country` or `--language` alone to list one side; markets are country-level.
22
+
19
23
  ## Writing a sharp brief
20
24
 
21
25
  - **Angle over topic.** "Google Business Profile descriptions" is a topic. "Most descriptions fail Google's rules in the first sentence; here is a 20-minute fix" is an angle. Push for the specific claim the piece will make.
@@ -11,6 +11,19 @@ coauthor draft get <id> --format json --json # data.content, the editor do
11
11
 
12
12
  The markdown and HTML have no H1: they start with the featured image (once generated) and then the first section. Add the title yourself from `coauthor project show <id> --json` (`data.project.title`) when you hand over a file. Images appear only after they have been generated, and their URLs are public, so the markdown can be pasted anywhere.
13
13
 
14
+ For a markdown file going into a static-site generator (Astro, Hugo, Next.js, Ghost), add `--frontmatter`: the markdown then starts with a YAML block holding the title, SEO title, meta description, slug, excerpt, and featured image from the post details. Drafts made before post details launched get no frontmatter.
15
+
16
+ ## Post details (SEO title, meta description, slug, excerpt)
17
+
18
+ After a draft, CoAuthor writes the post's SEO title, meta description, slug, and excerpt. Exports use them as defaults, so set them once here rather than on every export.
19
+
20
+ ```sh
21
+ coauthor post-details show <id> --json # data.post_details (null for drafts made before post details launched)
22
+ coauthor post-details set <id> --seo-title "..." --description "..." --slug "..." --excerpt "..." --json
23
+ ```
24
+
25
+ `set` changes only the fields you pass; an empty value clears one. Fields the user or you edited are kept when the draft is regenerated. Keep the SEO title near 60 characters and the description near 155. `post_details_unavailable` means the draft predates post details.
26
+
14
27
  ## Share link (public)
15
28
 
16
29
  `coauthor share <id> --json` returns `data.share_url`, a public read-only page anyone with the link can open. Create one only when the user asks for a link. Calling it again returns the same link.
@@ -21,7 +34,8 @@ Export creates a **draft post** in the user's WordPress site (it is not publishe
21
34
 
22
35
  1. The token needs publish permission. If an export fails with `insufficient_scope`, have the user run `coauthor auth login --with-publish` (in the background with `--no-browser`; they approve in the browser).
23
36
  2. With the user's yes:
24
- `coauthor export wordpress <id> --yes --slug <url-slug> --json`
37
+ `coauthor export wordpress <id> --yes --json`
38
+ The slug comes from the post details (or the title); pass `--slug <url-slug>` to override it. A new WordPress post also gets the post details excerpt.
25
39
  3. `coauthor integrations list --json` shows the connected WordPress sites (`id`, `label`, `site_base_url`, `enabled`) and X accounts. With several sites, ask which one and add `--connection-id <id>` (the error `wordpress_connection_required` lists them too).
26
40
  4. `wordpress_not_connected` means no site is connected yet. The user connects one in CoAuthor's settings (Publishing).
27
41
  5. Give the user `wordpress_edit_url` from the response (also `wordpress_link`) so they can review and publish the post in WordPress.
@@ -30,6 +30,8 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
30
30
  | `workflow_token_mismatch`, `conflict` | The project moved on since you read it (for example someone used the web app). | Re-read the state with `coauthor workflow status <id> --json` and continue from there. |
31
31
  | `insufficient_scope` | The token can't publish. | `coauthor auth login --with-publish`. |
32
32
  | `wordpress_connection_required` | Several WordPress sites are connected. | Ask which one from `details.connections`, add `--connection-id`. |
33
+ | `post_details_unavailable` | The draft was made before post details launched, so it has none to edit. | Pass the slug and description to the export directly. |
34
+ | `invalid_post_details` | `post-details set` got something other than text for a field. | Pass plain text with `--seo-title`, `--description`, `--slug`, or `--excerpt`. |
33
35
  | `structured_brief` | `image generate --prompt` on a comparison or technical-diagram image, which is built from structured fields. | Generate without `--prompt`, then `image edit --edit-prompt "..."`. |
34
36
  | `uploaded_image` | `image generate` on an image the user replaced with their own file. | Use `image edit --edit-prompt "..."`, or `image replace` again. |
35
37
  | `not_a_panel` | `image replace` on an article image. | Only slideshow and video panels can be replaced from the CLI. |
@@ -58,6 +58,7 @@ Typical timing: brief and outline under a minute; research and draft 3–10 minu
58
58
  | `user_recently_editing` | The user is typing in the browser. Wait or ask; use `--force` only with their OK. |
59
59
  | `revision_pending` | Apply or discard the open revision first. |
60
60
  | `revise_unavailable` | Edit the draft directly with `draft get` and `draft save`. |
61
+ | `post_details_unavailable` | The draft predates post details; pass slugs and descriptions to exports directly. |
61
62
  | `coauthor_access_required` | The CoAuthor subscription is inactive. Tell the user. |
62
63
 
63
64
  Everything else, including auth problems: `references/troubleshooting.md`. Credits, plans, and models: `references/credits-and-plans.md`.
@@ -94,6 +95,10 @@ All fields are optional and omitted ones get defaults, but always include at lea
94
95
  - `coauthor source add <id> <file>` uploads a reference document CoAuthor's research reads (PDF up to about 3.3 MB through the CLI, .txt or .md up to 512 KB, 5 per project). `coauthor source list <id> --json` shows them; `coauthor source remove <id> <source id> --yes` deletes one.
95
96
  - Add sources before research runs. Adding or removing one after research marks the research and draft stale (the output says `research_invalidated`), so research has to run again.
96
97
 
98
+ ### Search markets
99
+
100
+ `coauthor seo markets --country <country> --language <language> --json` checks whether CoAuthor has Google search data for a country and language (names or codes both work). `data.support.tier` is `full` (search volume, keyword difficulty, and ranking checks), `limited` (CoAuthor can analyze what ranks, but not difficulty or existing rankings), `unsupported`, or `unknown_country`. `data.explanation.message` is a sentence you can give the user, and `data.explanation.alternatives` lists covered languages for that country and covered countries for that language. Use `--country` or `--language` alone to list one side; markets are country-level.
101
+
97
102
  ### Writing a sharp brief
98
103
 
99
104
  - **Angle over topic.** "Google Business Profile descriptions" is a topic. "Most descriptions fail Google's rules in the first sentence; here is a 20-minute fix" is an angle. Push for the specific claim the piece will make.
@@ -375,6 +380,19 @@ coauthor draft get <id> --format json --json # data.content, the editor do
375
380
 
376
381
  The markdown and HTML have no H1: they start with the featured image (once generated) and then the first section. Add the title yourself from `coauthor project show <id> --json` (`data.project.title`) when you hand over a file. Images appear only after they have been generated, and their URLs are public, so the markdown can be pasted anywhere.
377
382
 
383
+ For a markdown file going into a static-site generator (Astro, Hugo, Next.js, Ghost), add `--frontmatter`: the markdown then starts with a YAML block holding the title, SEO title, meta description, slug, excerpt, and featured image from the post details. Drafts made before post details launched get no frontmatter.
384
+
385
+ ### Post details (SEO title, meta description, slug, excerpt)
386
+
387
+ After a draft, CoAuthor writes the post's SEO title, meta description, slug, and excerpt. Exports use them as defaults, so set them once here rather than on every export.
388
+
389
+ ```sh
390
+ coauthor post-details show <id> --json # data.post_details (null for drafts made before post details launched)
391
+ coauthor post-details set <id> --seo-title "..." --description "..." --slug "..." --excerpt "..." --json
392
+ ```
393
+
394
+ `set` changes only the fields you pass; an empty value clears one. Fields the user or you edited are kept when the draft is regenerated. Keep the SEO title near 60 characters and the description near 155. `post_details_unavailable` means the draft predates post details.
395
+
378
396
  ### Share link (public)
379
397
 
380
398
  `coauthor share <id> --json` returns `data.share_url`, a public read-only page anyone with the link can open. Create one only when the user asks for a link. Calling it again returns the same link.
@@ -385,7 +403,8 @@ Export creates a **draft post** in the user's WordPress site (it is not publishe
385
403
 
386
404
  1. The token needs publish permission. If an export fails with `insufficient_scope`, have the user run `coauthor auth login --with-publish` (in the background with `--no-browser`; they approve in the browser).
387
405
  2. With the user's yes:
388
- `coauthor export wordpress <id> --yes --slug <url-slug> --json`
406
+ `coauthor export wordpress <id> --yes --json`
407
+ The slug comes from the post details (or the title); pass `--slug <url-slug>` to override it. A new WordPress post also gets the post details excerpt.
389
408
  3. `coauthor integrations list --json` shows the connected WordPress sites (`id`, `label`, `site_base_url`, `enabled`) and X accounts. With several sites, ask which one and add `--connection-id <id>` (the error `wordpress_connection_required` lists them too).
390
409
  4. `wordpress_not_connected` means no site is connected yet. The user connects one in CoAuthor's settings (Publishing).
391
410
  5. Give the user `wordpress_edit_url` from the response (also `wordpress_link`) so they can review and publish the post in WordPress.
@@ -516,6 +535,8 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
516
535
  | `workflow_token_mismatch`, `conflict` | The project moved on since you read it (for example someone used the web app). | Re-read the state with `coauthor workflow status <id> --json` and continue from there. |
517
536
  | `insufficient_scope` | The token can't publish. | `coauthor auth login --with-publish`. |
518
537
  | `wordpress_connection_required` | Several WordPress sites are connected. | Ask which one from `details.connections`, add `--connection-id`. |
538
+ | `post_details_unavailable` | The draft was made before post details launched, so it has none to edit. | Pass the slug and description to the export directly. |
539
+ | `invalid_post_details` | `post-details set` got something other than text for a field. | Pass plain text with `--seo-title`, `--description`, `--slug`, or `--excerpt`. |
519
540
  | `structured_brief` | `image generate --prompt` on a comparison or technical-diagram image, which is built from structured fields. | Generate without `--prompt`, then `image edit --edit-prompt "..."`. |
520
541
  | `uploaded_image` | `image generate` on an image the user replaced with their own file. | Use `image edit --edit-prompt "..."`, or `image replace` again. |
521
542
  | `not_a_panel` | `image replace` on an article image. | Only slideshow and video panels can be replaced from the CLI. |