@clickminded/coauthor-cli 0.0.55 → 0.0.56

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
@@ -2130,12 +2130,18 @@ async function runWidgetsCommand(action, input, client) {
2130
2130
  const placeholder = getResponseValue(data, 'placeholder');
2131
2131
  const updated = getResponseValue(data, 'document_updated') === true;
2132
2132
  const note = getResponseString(data, 'document_note');
2133
+ const alreadyDone = !updated && getResponseString(data, 'document_status') === 'already_removed';
2134
+ const placeholderId = placeholder?.placeholder_id ? String(placeholder.placeholder_id) : '<placeholder-id>';
2133
2135
  return {
2134
2136
  ok: true,
2135
2137
  message: [
2136
- `The interactive is replaced by an image placeholder${placeholder?.placeholder_id ? ` (${String(placeholder.placeholder_id)})` : ''}.`,
2137
- updated ? 'The draft was updated.' : `The draft was NOT updated${note ? `: ${note}` : '.'}`,
2138
- `Generate the image with: coauthor image generate ${projectId} --placeholder-id <placeholder-id>`,
2138
+ `The interactive is replaced by an image placeholder${placeholder?.placeholder_id ? ` (${placeholderId})` : ''}.`,
2139
+ updated
2140
+ ? 'The draft was updated.'
2141
+ : alreadyDone
2142
+ ? 'Already done: the draft no longer has this interactive.'
2143
+ : `The draft was NOT updated${note ? `: ${note}` : '.'}`,
2144
+ `Generate the image with: coauthor image generate ${projectId} --placeholder-id ${placeholderId}`,
2139
2145
  ].join('\n'),
2140
2146
  data,
2141
2147
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.55",
3
+ "version": "0.0.56",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -25,7 +25,7 @@ coauthor models preferences set --widget-model claude-opus-5-5|claude-sonnet-5-5
25
25
  - `list` returns `data.widgets` (each with `id`, `spec.title`, `spec.aha`, `spec.move`, `spec.visual`, `credit_cap`, `edit_credit_cap`, `replaces_image`, `build_state`, `current_version`, `embed_url`, and `error` when a build failed), `data.availability` (`canBuild` and the reason when not), and `data.model` (the build model and its cap). A placeholder has `current_version: null` and `build_state: "idle"`.
26
26
  - `build` and `edit` queue the build and return at once (`already_running: true` if it was already building: calling again is safe). A build takes a few minutes. With `--wait` the command follows it for up to 9 minutes; on `still_running` run the `resume_command` it prints. Rebuilding a built widget works the same and costs credits again. Retries after a failure wait a minute (`widget_rate_limited`), and after 3 failed builds in a day the account must wait.
27
27
  - `build-all` with no ids builds every placeholder; with ids, only those.
28
- - `use-image` is for a placeholder that took over a planned image (`replaces_image: true`). It turns the node in the draft back into an image placeholder (it updates the draft for you); then generate it with `coauthor image generate <project-id> --placeholder-id <placeholder-id>`. If `document_updated` is false, the response says why. The call is safe to repeat.
28
+ - `use-image` is for a placeholder that took over a planned image (`replaces_image: true`). It turns the node in the draft back into an image placeholder (it updates the draft for you); then generate it with `coauthor image generate <project-id> --placeholder-id <placeholder-id>`. If `document_updated` is false, `document_status` says why: `already_removed` means a repeat (the swap was already done, nothing to fix); `not_updated` is a real failure and `document_note` has the manual fix. The call is safe to repeat.
29
29
  - `edit` takes a plain instruction of up to 500 characters and rebuilds the widget. `edit` and `delete` change every published copy, so both need `--yes`: confirm with the user first. `delete` removes the interactive everywhere, including posts already published, and cannot be undone. It also removes the node from the draft.
30
30
  - A built widget exports as its poster image linked to the live version in markdown and HTML (`draft get --format markdown`), and live in WordPress when the connection allows it.
31
31
 
@@ -419,7 +419,7 @@ coauthor models preferences set --widget-model claude-opus-5-5|claude-sonnet-5-5
419
419
  - `list` returns `data.widgets` (each with `id`, `spec.title`, `spec.aha`, `spec.move`, `spec.visual`, `credit_cap`, `edit_credit_cap`, `replaces_image`, `build_state`, `current_version`, `embed_url`, and `error` when a build failed), `data.availability` (`canBuild` and the reason when not), and `data.model` (the build model and its cap). A placeholder has `current_version: null` and `build_state: "idle"`.
420
420
  - `build` and `edit` queue the build and return at once (`already_running: true` if it was already building: calling again is safe). A build takes a few minutes. With `--wait` the command follows it for up to 9 minutes; on `still_running` run the `resume_command` it prints. Rebuilding a built widget works the same and costs credits again. Retries after a failure wait a minute (`widget_rate_limited`), and after 3 failed builds in a day the account must wait.
421
421
  - `build-all` with no ids builds every placeholder; with ids, only those.
422
- - `use-image` is for a placeholder that took over a planned image (`replaces_image: true`). It turns the node in the draft back into an image placeholder (it updates the draft for you); then generate it with `coauthor image generate <project-id> --placeholder-id <placeholder-id>`. If `document_updated` is false, the response says why. The call is safe to repeat.
422
+ - `use-image` is for a placeholder that took over a planned image (`replaces_image: true`). It turns the node in the draft back into an image placeholder (it updates the draft for you); then generate it with `coauthor image generate <project-id> --placeholder-id <placeholder-id>`. If `document_updated` is false, `document_status` says why: `already_removed` means a repeat (the swap was already done, nothing to fix); `not_updated` is a real failure and `document_note` has the manual fix. The call is safe to repeat.
423
423
  - `edit` takes a plain instruction of up to 500 characters and rebuilds the widget. `edit` and `delete` change every published copy, so both need `--yes`: confirm with the user first. `delete` removes the interactive everywhere, including posts already published, and cannot be undone. It also removes the node from the draft.
424
424
  - A built widget exports as its poster image linked to the live version in markdown and HTML (`draft get --format markdown`), and live in WordPress when the connection allows it.
425
425