@clickminded/coauthor-cli 0.0.82 → 0.0.83
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/package.json
CHANGED
|
@@ -20,6 +20,8 @@ coauthor draft revise <id> --instruction "Cut the intro to two sentences and lea
|
|
|
20
20
|
- While a revision runs, up to 100 available credits are temporarily held for its steps. Only actual usage is charged; unused held credits are released when it finishes or stops. A hold is included in `coauthor credits <id> --json` and does not change the request's spending limit.
|
|
21
21
|
- A revision that ends without a result (it failed, or didn't finish within 12 minutes and was closed) has the credits it used refunded automatically. A revision you cancel is not refunded.
|
|
22
22
|
- `revise_unavailable` means this account cannot revise by instruction yet; use a direct edit.
|
|
23
|
+
- `draft revise` targets whatever version is saved when it starts, and retries once by itself if a save lands at the same moment. A `stale_draft` after that names `details.base_version` and the command to re-read the draft.
|
|
24
|
+
- When `draft revise` is refused, the error's `code` and `details.reason` say why. `editor_context_too_large` will not clear on retry (the project's research and recent editor messages are over the editor's size limit), so make the change with a direct edit.
|
|
23
25
|
|
|
24
26
|
## 2. Direct edit (exact text you already have)
|
|
25
27
|
|
|
@@ -29,6 +29,10 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
|
|
|
29
29
|
| `review_pending`, `document_locked` | An AI review or edit is in progress in the editor. | Wait, or apply or discard it. |
|
|
30
30
|
| `revision_pending` | Another draft revision is open. | Apply or discard it (`details.revision_id`). An agent revision left in review is discarded automatically at `details.expires_at`. |
|
|
31
31
|
| `revise_unavailable` | Revise by instruction isn't available on this account. | Use a direct edit (`references/editing-drafts.md`). |
|
|
32
|
+
| `editor_context_too_large` | `draft revise` refused: the project's research, sources, reference documents and recent editor messages are over the editor's size limit (`details.request_context_bytes`, `details.limit_bytes`). Retrying won't help. | Make the change with a direct edit (`references/editing-drafts.md`). |
|
|
33
|
+
| `editor_history_invalid` | `draft revise` refused because an earlier message in the draft's editor conversation has an attachment the editor can no longer read. | Use a direct edit and tell the user. |
|
|
34
|
+
| `project_changed` | Another step started or finished on the project while a revision was being set up. | Run `coauthor workflow status <id> --json`, then retry once. |
|
|
35
|
+
| `invalid_request` with `details.reason` | The editor rejected the request; `details.reason` names the check. | Don't retry the same request. Report `details.reason` and use a direct edit. |
|
|
32
36
|
| `invalid_document` | `draft save` content isn't an editor document. | Send the edited `data.content` from `draft get --format json`, never markdown. |
|
|
33
37
|
| `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. |
|
|
34
38
|
| `insufficient_scope` | The token can't publish. | `coauthor auth login --with-publish`. |
|
|
@@ -322,6 +322,8 @@ coauthor draft revise <id> --instruction "Cut the intro to two sentences and lea
|
|
|
322
322
|
- While a revision runs, up to 100 available credits are temporarily held for its steps. Only actual usage is charged; unused held credits are released when it finishes or stops. A hold is included in `coauthor credits <id> --json` and does not change the request's spending limit.
|
|
323
323
|
- A revision that ends without a result (it failed, or didn't finish within 12 minutes and was closed) has the credits it used refunded automatically. A revision you cancel is not refunded.
|
|
324
324
|
- `revise_unavailable` means this account cannot revise by instruction yet; use a direct edit.
|
|
325
|
+
- `draft revise` targets whatever version is saved when it starts, and retries once by itself if a save lands at the same moment. A `stale_draft` after that names `details.base_version` and the command to re-read the draft.
|
|
326
|
+
- When `draft revise` is refused, the error's `code` and `details.reason` say why. `editor_context_too_large` will not clear on retry (the project's research and recent editor messages are over the editor's size limit), so make the change with a direct edit.
|
|
325
327
|
|
|
326
328
|
### 2. Direct edit (exact text you already have)
|
|
327
329
|
|
|
@@ -748,6 +750,10 @@ Every failure prints JSON on stderr with `ok: false`, `error` (a readable messag
|
|
|
748
750
|
| `review_pending`, `document_locked` | An AI review or edit is in progress in the editor. | Wait, or apply or discard it. |
|
|
749
751
|
| `revision_pending` | Another draft revision is open. | Apply or discard it (`details.revision_id`). An agent revision left in review is discarded automatically at `details.expires_at`. |
|
|
750
752
|
| `revise_unavailable` | Revise by instruction isn't available on this account. | Use a direct edit (`references/editing-drafts.md`). |
|
|
753
|
+
| `editor_context_too_large` | `draft revise` refused: the project's research, sources, reference documents and recent editor messages are over the editor's size limit (`details.request_context_bytes`, `details.limit_bytes`). Retrying won't help. | Make the change with a direct edit (`references/editing-drafts.md`). |
|
|
754
|
+
| `editor_history_invalid` | `draft revise` refused because an earlier message in the draft's editor conversation has an attachment the editor can no longer read. | Use a direct edit and tell the user. |
|
|
755
|
+
| `project_changed` | Another step started or finished on the project while a revision was being set up. | Run `coauthor workflow status <id> --json`, then retry once. |
|
|
756
|
+
| `invalid_request` with `details.reason` | The editor rejected the request; `details.reason` names the check. | Don't retry the same request. Report `details.reason` and use a direct edit. |
|
|
751
757
|
| `invalid_document` | `draft save` content isn't an editor document. | Send the edited `data.content` from `draft get --format json`, never markdown. |
|
|
752
758
|
| `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. |
|
|
753
759
|
| `insufficient_scope` | The token can't publish. | `coauthor auth login --with-publish`. |
|