@clickminded/coauthor-cli 0.0.57 → 0.0.58

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.js CHANGED
@@ -2273,8 +2273,10 @@ function seoPlanShowMessage(data, kind) {
2273
2273
  const plan = view.plan === null || view.plan === undefined ? null : planRecord(view.plan);
2274
2274
  const estimate = typeof view.estimate_credits === 'number' ? view.estimate_credits : null;
2275
2275
  const status = plan ? planString(plan, 'status') : null;
2276
+ const firstPlanFree = view.first_plan_free === true;
2276
2277
  if (!plan || status === 'idle') {
2277
- return `No SEO content plan for this profile yet. Make one with \`coauthor seo-plan generate --wait\`${estimate ? ` (about ${estimate} credits)` : ''}.`;
2278
+ const cost = firstPlanFree ? ' (your first plan is free)' : estimate ? ` (about ${estimate} credits)` : '';
2279
+ return `No SEO content plan for this profile yet. Make one with \`coauthor seo-plan generate --wait\`${cost}.`;
2278
2280
  }
2279
2281
  const lines = [];
2280
2282
  if (status === 'queued' || status === 'running') {
@@ -2283,7 +2285,7 @@ function seoPlanShowMessage(data, kind) {
2283
2285
  }
2284
2286
  else if (status === 'failed') {
2285
2287
  const code = planString(plan, 'error_code');
2286
- lines.push(`The last plan run failed${code ? ` (${code})` : ''}: ${planString(plan, 'error_message') ?? 'unknown error'}. Try again with \`coauthor seo-plan generate --wait\`.`);
2288
+ lines.push(`The last plan run failed${code ? ` (${code})` : ''}: ${planString(plan, 'error_message') ?? 'unknown error'}. Try again with \`coauthor seo-plan generate --wait\`.${firstPlanFree ? ' Your first plan is free, so the retry uses no credits.' : ''}`);
2287
2289
  }
2288
2290
  if (view.stale === true)
2289
2291
  lines.push('The profile\'s website or market changed since this plan was made. `coauthor seo-plan generate` updates it.');
@@ -2412,7 +2414,9 @@ async function runSeoPlanCommand(action, input, client) {
2412
2414
  throw error;
2413
2415
  }
2414
2416
  const estimate = getResponseNumber(started, 'estimate_credits');
2415
- const queued = `Plan queued${estimate ? ` (about ${estimate} credits, charged as it runs)` : ''}. It takes about 5 to 12 minutes.`;
2417
+ const free = planRecord(started).free === true;
2418
+ const cost = free ? ' (your first plan is free: no credits are used)' : estimate ? ` (about ${estimate} credits, charged as it runs)` : '';
2419
+ const queued = `Plan queued${cost}. It takes about 5 to 12 minutes.`;
2416
2420
  if (!wait) {
2417
2421
  return {
2418
2422
  ok: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.57",
3
+ "version": "0.0.58",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -9,7 +9,7 @@ Rough costs, to set expectations before starting:
9
9
  - A complete article (brief through draft) is typically about 300 credits.
10
10
  - Images and extra rework rounds (regenerating, many revisions) drive cost more than word count does.
11
11
  - Adding the repurposed formats in the web app (social posts, newsletter, slideshow) adds roughly 100–150 more.
12
- - An SEO content plan (`coauthor seo-plan generate`) is about 420 credits (most plans 300–500) and needs 500 remaining to start. See `references/seo-content-plan.md`.
12
+ - An SEO content plan (`coauthor seo-plan generate`): the first plan an account makes is free. Later plans are about 420 credits (most plans 300–500) and need 500 remaining to start. See `references/seo-content-plan.md`.
13
13
 
14
14
  Tell the user the expected cost before large or repeated work, and report credits used at the end.
15
15
 
@@ -12,8 +12,9 @@ Accounts outside the rollout get `not_enabled` from every `seo-plan` command. Ca
12
12
 
13
13
  ## Cost and timing
14
14
 
15
- - A plan costs about 420 credits (most plans 300 to 500), charged as it runs, and takes about 5 to 12 minutes. `generate` prints an estimate; tell the user before you start, and get a yes if they have not asked for a plan.
16
- - The account needs at least 500 credits remaining to start, otherwise `insufficient_credits` (nothing is spent).
15
+ - The first plan an account makes is free: no credits are used. `show` reports `data.first_plan_free: true` until any plan has finished, and `generate` returns `data.free: true` with `data.estimate_credits: 0`. A first run that fails leaves the account eligible, so the retry is free too. It starts only if the account has at least 1 credit remaining (`insufficient_credits` with `details.required: 1` otherwise).
16
+ - Every later plan costs about 420 credits (most plans 300 to 500), charged as it runs, and takes about 5 to 12 minutes. This includes Update plan, `--adjust`, and a plan for another profile. `generate` prints an estimate; tell the user before you start, and get a yes if they have not asked for a plan.
17
+ - A paid plan needs at least 500 credits remaining to start, otherwise `insufficient_credits` (nothing is spent).
17
18
  - Reading the plan (`show`), writing from it, and dismissing or marking ideas done cost nothing. Writing a post from an idea then costs credits like any other piece.
18
19
  - Only one plan runs per account at a time (`plan_running`).
19
20
 
@@ -29,7 +30,7 @@ coauthor seo-plan done <item-id> [--undo] --json
29
30
  ```
30
31
 
31
32
  - Without `--profile` the default profile is used. Run `coauthor profile list --json` first when the user has several profiles and the request names a site or brand.
32
- - `generate` returns at once with `data.plan_id` and `data.estimate_credits`. With `--wait` it polls until the plan is ready. After 9 minutes it exits with code 2 and `still_running`; run the same `generate ... --wait` command again to keep waiting (it joins the running plan; it does not start a second one).
33
+ - `generate` returns at once with `data.plan_id`, `data.free` and `data.estimate_credits`. With `--wait` it polls until the plan is ready. After 9 minutes it exits with code 2 and `still_running`; run the same `generate ... --wait` command again to keep waiting (it joins the running plan; it does not start a second one).
33
34
  - `--adjust` is a short steer for this run, for example `--adjust "focus on B2B buyers, skip anything about hiring"`. Use it when the user wants a different emphasis. Competitors are found automatically; the user corrects them in the web app.
34
35
  - `show` returns `data.plan` (`strategy_line`, `competitors_line`, `status`), `data.do_next` (the five best next moves), `data.counts_by_kind`, and `data.items` for one `--kind` (default `post`). Items are sorted as the web app shows them.
35
36
  - A plan run that fails says why in `data.error_code` and `data.error_message` (see `references/troubleshooting.md`). Credits for a failed run are only charged for work that finished.
@@ -61,7 +61,7 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
61
61
  | `site_indexing` | CoAuthor is still reading the profile's website. | Check `coauthor site status`; run `generate` again when it is `ready` (a few minutes). Nothing was spent. |
62
62
  | `market_confirmation_needed` | CoAuthor can't tell which country's search results to plan for. | The user confirms the search country in the profile settings in the web app, then run `generate` again. Nothing was spent. |
63
63
  | `market_not_supported` | Search data doesn't fully cover the profile's country and language. | Give the user `details.explanation.message` and its alternatives; they change the profile's country or language in the web app. Nothing was spent. |
64
- | `insufficient_credits` | A plan needs at least 500 credits remaining (`details.required`, `details.remaining`). | Tell the user; resume after the reset (`coauthor credits --json`). Nothing was spent. |
64
+ | `insufficient_credits` | A plan needs at least 500 credits remaining (`details.required`, `details.remaining`). The first plan is free but still needs at least 1 credit remaining (`details.free: true`). | Tell the user; resume after the reset (`coauthor credits --json`). Nothing was spent. |
65
65
  | `plan_running` | A plan is already being made on this account (only one runs at a time). | `coauthor seo-plan generate --profile <id> --wait` joins the running plan for that profile; otherwise wait and use `seo-plan show`. |
66
66
  | `worker_unavailable` | The plan service couldn't be reached. Nothing was spent. | Try again in a few minutes. |
67
67
  | `dataforseo_busy` | A plan run stopped because the search data provider was busy (`seo-plan show` or the `--wait` result carries it as `error_code`). | Run `coauthor seo-plan generate --wait` again in a few minutes. Work already done is cached, so a retry costs less. |
@@ -276,7 +276,7 @@ Rough costs, to set expectations before starting:
276
276
  - A complete article (brief through draft) is typically about 300 credits.
277
277
  - Images and extra rework rounds (regenerating, many revisions) drive cost more than word count does.
278
278
  - Adding the repurposed formats in the web app (social posts, newsletter, slideshow) adds roughly 100–150 more.
279
- - An SEO content plan (`coauthor seo-plan generate`) is about 420 credits (most plans 300–500) and needs 500 remaining to start. See `references/seo-content-plan.md`.
279
+ - An SEO content plan (`coauthor seo-plan generate`): the first plan an account makes is free. Later plans are about 420 credits (most plans 300–500) and need 500 remaining to start. See `references/seo-content-plan.md`.
280
280
 
281
281
  Tell the user the expected cost before large or repeated work, and report credits used at the end.
282
282
 
@@ -592,8 +592,9 @@ Accounts outside the rollout get `not_enabled` from every `seo-plan` command. Ca
592
592
 
593
593
  ### Cost and timing
594
594
 
595
- - A plan costs about 420 credits (most plans 300 to 500), charged as it runs, and takes about 5 to 12 minutes. `generate` prints an estimate; tell the user before you start, and get a yes if they have not asked for a plan.
596
- - The account needs at least 500 credits remaining to start, otherwise `insufficient_credits` (nothing is spent).
595
+ - The first plan an account makes is free: no credits are used. `show` reports `data.first_plan_free: true` until any plan has finished, and `generate` returns `data.free: true` with `data.estimate_credits: 0`. A first run that fails leaves the account eligible, so the retry is free too. It starts only if the account has at least 1 credit remaining (`insufficient_credits` with `details.required: 1` otherwise).
596
+ - Every later plan costs about 420 credits (most plans 300 to 500), charged as it runs, and takes about 5 to 12 minutes. This includes Update plan, `--adjust`, and a plan for another profile. `generate` prints an estimate; tell the user before you start, and get a yes if they have not asked for a plan.
597
+ - A paid plan needs at least 500 credits remaining to start, otherwise `insufficient_credits` (nothing is spent).
597
598
  - Reading the plan (`show`), writing from it, and dismissing or marking ideas done cost nothing. Writing a post from an idea then costs credits like any other piece.
598
599
  - Only one plan runs per account at a time (`plan_running`).
599
600
 
@@ -609,7 +610,7 @@ coauthor seo-plan done <item-id> [--undo] --json
609
610
  ```
610
611
 
611
612
  - Without `--profile` the default profile is used. Run `coauthor profile list --json` first when the user has several profiles and the request names a site or brand.
612
- - `generate` returns at once with `data.plan_id` and `data.estimate_credits`. With `--wait` it polls until the plan is ready. After 9 minutes it exits with code 2 and `still_running`; run the same `generate ... --wait` command again to keep waiting (it joins the running plan; it does not start a second one).
613
+ - `generate` returns at once with `data.plan_id`, `data.free` and `data.estimate_credits`. With `--wait` it polls until the plan is ready. After 9 minutes it exits with code 2 and `still_running`; run the same `generate ... --wait` command again to keep waiting (it joins the running plan; it does not start a second one).
613
614
  - `--adjust` is a short steer for this run, for example `--adjust "focus on B2B buyers, skip anything about hiring"`. Use it when the user wants a different emphasis. Competitors are found automatically; the user corrects them in the web app.
614
615
  - `show` returns `data.plan` (`strategy_line`, `competitors_line`, `status`), `data.do_next` (the five best next moves), `data.counts_by_kind`, and `data.items` for one `--kind` (default `post`). Items are sorted as the web app shows them.
615
616
  - A plan run that fails says why in `data.error_code` and `data.error_message` (see `references/troubleshooting.md`). Credits for a failed run are only charged for work that finished.
@@ -722,7 +723,7 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
722
723
  | `site_indexing` | CoAuthor is still reading the profile's website. | Check `coauthor site status`; run `generate` again when it is `ready` (a few minutes). Nothing was spent. |
723
724
  | `market_confirmation_needed` | CoAuthor can't tell which country's search results to plan for. | The user confirms the search country in the profile settings in the web app, then run `generate` again. Nothing was spent. |
724
725
  | `market_not_supported` | Search data doesn't fully cover the profile's country and language. | Give the user `details.explanation.message` and its alternatives; they change the profile's country or language in the web app. Nothing was spent. |
725
- | `insufficient_credits` | A plan needs at least 500 credits remaining (`details.required`, `details.remaining`). | Tell the user; resume after the reset (`coauthor credits --json`). Nothing was spent. |
726
+ | `insufficient_credits` | A plan needs at least 500 credits remaining (`details.required`, `details.remaining`). The first plan is free but still needs at least 1 credit remaining (`details.free: true`). | Tell the user; resume after the reset (`coauthor credits --json`). Nothing was spent. |
726
727
  | `plan_running` | A plan is already being made on this account (only one runs at a time). | `coauthor seo-plan generate --profile <id> --wait` joins the running plan for that profile; otherwise wait and use `seo-plan show`. |
727
728
  | `worker_unavailable` | The plan service couldn't be reached. Nothing was spent. | Try again in a few minutes. |
728
729
  | `dataforseo_busy` | A plan run stopped because the search data provider was busy (`seo-plan show` or the `--wait` result carries it as `error_code`). | Run `coauthor seo-plan generate --wait` again in a few minutes. Work already done is cached, so a retry costs less. |