@clickminded/coauthor-cli 0.0.17 → 0.0.19

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
@@ -106,6 +106,7 @@ coauthor workflow run <project-id> --target draft --wait --json
106
106
  coauthor workflow run <project-id> --target draft --planning-model gpt-5.6-sol --writing-model gpt-5.6-terra --wait --json
107
107
  coauthor workflow resume <project-id> --target draft --wait --json
108
108
  coauthor credits <project-id> --json
109
+ coauthor share <project-id> --json
109
110
  ```
110
111
 
111
112
  List and save text model preferences:
package/dist/commands.js CHANGED
@@ -34,6 +34,8 @@ export async function runCommand(input, context) {
34
34
  return runWorkflowCommand(action, input, context);
35
35
  if (scope === 'credits')
36
36
  return runCreditsCommand(input, context.client);
37
+ if (scope === 'share')
38
+ return runShareCommand(input, context.client);
37
39
  if (scope === 'image')
38
40
  return runResourceCommand('images', action, input, context.client);
39
41
  if (scope === 'thread')
@@ -331,6 +333,12 @@ async function runCreditsCommand(input, client) {
331
333
  const data = await client.request({ path: `projects/${encodeURIComponent(projectId)}/credits` });
332
334
  return { ok: true, data };
333
335
  }
336
+ async function runShareCommand(input, client) {
337
+ const projectId = requireProjectId(input);
338
+ const data = await client.request({ method: 'POST', path: `projects/${encodeURIComponent(projectId)}/share` });
339
+ const shareUrl = getResponseString(data, 'share_url');
340
+ return { ok: true, message: shareUrl, data };
341
+ }
334
342
  async function runModelsCommand(action, input, client) {
335
343
  if (!action || action === 'list') {
336
344
  const data = await client.request({ path: 'models' });
@@ -1201,6 +1209,7 @@ export function helpResult(command = []) {
1201
1209
  ' export blog|clickminded|wordpress',
1202
1210
  ' operation list|show|status',
1203
1211
  ' credits',
1212
+ ' share <project-id>',
1204
1213
  ' models list|preferences show|preferences set',
1205
1214
  ' skills list|install',
1206
1215
  ' skills install supports codex|claude|cursor|agents|all',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@clickminded/coauthor-cli",
3
- "version": "0.0.17",
3
+ "version": "0.0.19",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "coauthor": "dist/index.js",
@@ -26,11 +26,22 @@ This skill guides agent use of the CoAuthor CLI.
26
26
  - `coauthor workflow run <project-id> --target draft --wait` should not be treated as complete until the CLI reports draft completion, a key pause, terminal failure, `research_running_stale`, or `timed_out`.
27
27
  - For images, run `coauthor image list <project-id> --json` and pass an existing placeholder with `coauthor image generate <project-id> --placeholder-id <placeholder-id> --json`. Draft generation creates placeholders.
28
28
  - Use `coauthor credits <project-id> --json` to check credit allowance, pending credits, and remaining credits.
29
+ - Use `coauthor share <project-id> --json` to mint or fetch the project's public share URL (`share_url`). Safe to call repeatedly: it returns the existing token instead of minting a new one.
29
30
  - Use `coauthor models list` to see user-visible planning and writing models. Use `--planning-model <id>` for outline/research-plan/workflow planning overrides and `--writing-model <id>` for draft/thread/workflow writing overrides; do not use a global `--model`.
30
31
  - Use `coauthor models preferences show|set` to inspect or update saved planning/writing preferences. Internal structuring models are not exposed through the CLI.
31
32
  - After a timeout, interruption, network error, or unclear result, check operation status before retrying.
32
33
  - `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
33
34
 
35
+ ## Draft-Stage Mutation Guard
36
+
37
+ CoAuthor artifacts form a dependency chain: contract/brief -> outline -> research plan -> research -> draft. Saving or approving an upstream artifact after a draft exists can deliberately rewind the project and mark every downstream artifact stale, even though the saved draft version still exists.
38
+
39
+ - Before any `contract save|approve`, `outline save|generate|approve`, or `research-plan save|generate|approve` on an existing project, inspect `coauthor workflow status <project-id> --json`. Also inspect `coauthor draft status <project-id> --json` when the project may already have reached drafting.
40
+ - Treat `draft_generated` and `editing` as an upstream-artifact lock. While in either state, make requested prose or document changes with `coauthor draft save`; do not mirror draft changes back into the contract, outline, or research plan as a cleanup, bookkeeping, or finalization step.
41
+ - Do not run an upstream `save`, `generate`, or `approve` command after `draft save` merely to record constraints discovered during editing. That command order can hide the draft in the web app by rewinding the project to an earlier stage.
42
+ - Change an upstream artifact after drafting only when the user explicitly asks to revise the premise, structure, or research inputs and understands that CoAuthor must regenerate the downstream chain. Before the change, preserve the current document with `coauthor draft get <project-id> --format json --json`. Then complete the regeneration with `coauthor workflow run <project-id> --target draft --wait --json`; do not leave the project at an intermediate stale checkpoint.
43
+ - After ordinary draft editing, finish with read-only verification such as `coauthor draft get`, `coauthor draft status`, or `coauthor workflow status`.
44
+
34
45
  ## Plans, Models, And Credits
35
46
 
36
47
  - Starter includes 2,500 credits per monthly subscription-anniversary period. It supports the full user-visible model list, but it cannot store or use customer provider keys. When its credits reach zero, work pauses until the next reset.
@@ -26,11 +26,22 @@ This skill guides agent use of the CoAuthor CLI.
26
26
  - `coauthor workflow run <project-id> --target draft --wait` should not be treated as complete until the CLI reports draft completion, a key pause, terminal failure, `research_running_stale`, or `timed_out`.
27
27
  - For images, run `coauthor image list <project-id> --json` and pass an existing placeholder with `coauthor image generate <project-id> --placeholder-id <placeholder-id> --json`. Draft generation creates placeholders.
28
28
  - Use `coauthor credits <project-id> --json` to check credit allowance, pending credits, and remaining credits.
29
+ - Use `coauthor share <project-id> --json` to mint or fetch the project's public share URL (`share_url`). Safe to call repeatedly: it returns the existing token instead of minting a new one.
29
30
  - Use `coauthor models list` to see user-visible planning and writing models. Use `--planning-model <id>` for outline/research-plan/workflow planning overrides and `--writing-model <id>` for draft/thread/workflow writing overrides; do not use a global `--model`.
30
31
  - Use `coauthor models preferences show|set` to inspect or update saved planning/writing preferences. Internal structuring models are not exposed through the CLI.
31
32
  - After a timeout, interruption, network error, or unclear result, check operation status before retrying.
32
33
  - `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
33
34
 
35
+ ## Draft-Stage Mutation Guard
36
+
37
+ CoAuthor artifacts form a dependency chain: contract/brief -> outline -> research plan -> research -> draft. Saving or approving an upstream artifact after a draft exists can deliberately rewind the project and mark every downstream artifact stale, even though the saved draft version still exists.
38
+
39
+ - Before any `contract save|approve`, `outline save|generate|approve`, or `research-plan save|generate|approve` on an existing project, inspect `coauthor workflow status <project-id> --json`. Also inspect `coauthor draft status <project-id> --json` when the project may already have reached drafting.
40
+ - Treat `draft_generated` and `editing` as an upstream-artifact lock. While in either state, make requested prose or document changes with `coauthor draft save`; do not mirror draft changes back into the contract, outline, or research plan as a cleanup, bookkeeping, or finalization step.
41
+ - Do not run an upstream `save`, `generate`, or `approve` command after `draft save` merely to record constraints discovered during editing. That command order can hide the draft in the web app by rewinding the project to an earlier stage.
42
+ - Change an upstream artifact after drafting only when the user explicitly asks to revise the premise, structure, or research inputs and understands that CoAuthor must regenerate the downstream chain. Before the change, preserve the current document with `coauthor draft get <project-id> --format json --json`. Then complete the regeneration with `coauthor workflow run <project-id> --target draft --wait --json`; do not leave the project at an intermediate stale checkpoint.
43
+ - After ordinary draft editing, finish with read-only verification such as `coauthor draft get`, `coauthor draft status`, or `coauthor workflow status`.
44
+
34
45
  ## Plans, Models, And Credits
35
46
 
36
47
  - Starter includes 2,500 credits per monthly subscription-anniversary period. It supports the full user-visible model list, but it cannot store or use customer provider keys. When its credits reach zero, work pauses until the next reset.
@@ -26,11 +26,22 @@ This skill guides agent use of the CoAuthor CLI.
26
26
  - `coauthor workflow run <project-id> --target draft --wait` should not be treated as complete until the CLI reports draft completion, a key pause, terminal failure, `research_running_stale`, or `timed_out`.
27
27
  - For images, run `coauthor image list <project-id> --json` and pass an existing placeholder with `coauthor image generate <project-id> --placeholder-id <placeholder-id> --json`. Draft generation creates placeholders.
28
28
  - Use `coauthor credits <project-id> --json` to check credit allowance, pending credits, and remaining credits.
29
+ - Use `coauthor share <project-id> --json` to mint or fetch the project's public share URL (`share_url`). Safe to call repeatedly: it returns the existing token instead of minting a new one.
29
30
  - Use `coauthor models list` to see user-visible planning and writing models. Use `--planning-model <id>` for outline/research-plan/workflow planning overrides and `--writing-model <id>` for draft/thread/workflow writing overrides; do not use a global `--model`.
30
31
  - Use `coauthor models preferences show|set` to inspect or update saved planning/writing preferences. Internal structuring models are not exposed through the CLI.
31
32
  - After a timeout, interruption, network error, or unclear result, check operation status before retrying.
32
33
  - `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
33
34
 
35
+ ## Draft-Stage Mutation Guard
36
+
37
+ CoAuthor artifacts form a dependency chain: contract/brief -> outline -> research plan -> research -> draft. Saving or approving an upstream artifact after a draft exists can deliberately rewind the project and mark every downstream artifact stale, even though the saved draft version still exists.
38
+
39
+ - Before any `contract save|approve`, `outline save|generate|approve`, or `research-plan save|generate|approve` on an existing project, inspect `coauthor workflow status <project-id> --json`. Also inspect `coauthor draft status <project-id> --json` when the project may already have reached drafting.
40
+ - Treat `draft_generated` and `editing` as an upstream-artifact lock. While in either state, make requested prose or document changes with `coauthor draft save`; do not mirror draft changes back into the contract, outline, or research plan as a cleanup, bookkeeping, or finalization step.
41
+ - Do not run an upstream `save`, `generate`, or `approve` command after `draft save` merely to record constraints discovered during editing. That command order can hide the draft in the web app by rewinding the project to an earlier stage.
42
+ - Change an upstream artifact after drafting only when the user explicitly asks to revise the premise, structure, or research inputs and understands that CoAuthor must regenerate the downstream chain. Before the change, preserve the current document with `coauthor draft get <project-id> --format json --json`. Then complete the regeneration with `coauthor workflow run <project-id> --target draft --wait --json`; do not leave the project at an intermediate stale checkpoint.
43
+ - After ordinary draft editing, finish with read-only verification such as `coauthor draft get`, `coauthor draft status`, or `coauthor workflow status`.
44
+
34
45
  ## Plans, Models, And Credits
35
46
 
36
47
  - Starter includes 2,500 credits per monthly subscription-anniversary period. It supports the full user-visible model list, but it cannot store or use customer provider keys. When its credits reach zero, work pauses until the next reset.
@@ -23,6 +23,7 @@ alwaysApply: true
23
23
  - `coauthor workflow run <project-id> --target draft --wait` should not be treated as complete until the CLI reports draft completion, a key pause, terminal failure, `research_running_stale`, or `timed_out`.
24
24
  - For images, run `coauthor image list <project-id> --json` and pass an existing placeholder with `coauthor image generate <project-id> --placeholder-id <placeholder-id> --json`. Draft generation creates placeholders.
25
25
  - Use `coauthor credits <project-id> --json` to check credit allowance, pending credits, and remaining credits.
26
+ - Use `coauthor share <project-id> --json` to mint or fetch the project's public share URL (`share_url`). Safe to call repeatedly: it returns the existing token instead of minting a new one.
26
27
  - Use `coauthor models list` to see user-visible planning and writing models. Use `--planning-model <id>` for outline/research-plan/workflow planning overrides and `--writing-model <id>` for draft/thread/workflow writing overrides; do not use a global `--model`.
27
28
  - Use `coauthor models preferences show|set` to inspect or update saved planning/writing preferences. Internal structuring models are not exposed through the CLI.
28
29
  - Starter includes 2,500 credits per monthly subscription-anniversary period, can select any supported user-visible model, cannot use BYOK, and waits for reset after `credits_exhausted`.
@@ -34,6 +35,17 @@ alwaysApply: true
34
35
  - The Supabase `admins` table is the canonical admin source and grants the cross-surface access/quota bypass.
35
36
  - After timeout, interruption, network error, or ambiguous output, check operation status before retrying or reporting success.
36
37
  - `contract approve`, `outline approve`, and `research-plan approve` approve the saved artifact when `--data` is omitted. Pass `--data` only when intentionally approving a replacement payload.
38
+
39
+ ## Draft-Stage Mutation Guard
40
+
41
+ CoAuthor artifacts form a dependency chain: contract/brief -> outline -> research plan -> research -> draft. Saving or approving an upstream artifact after a draft exists can deliberately rewind the project and mark every downstream artifact stale, even though the saved draft version still exists.
42
+
43
+ - Before any `contract save|approve`, `outline save|generate|approve`, or `research-plan save|generate|approve` on an existing project, inspect `coauthor workflow status <project-id> --json`. Also inspect `coauthor draft status <project-id> --json` when the project may already have reached drafting.
44
+ - Treat `draft_generated` and `editing` as an upstream-artifact lock. While in either state, make requested prose or document changes with `coauthor draft save`; do not mirror draft changes back into the contract, outline, or research plan as a cleanup, bookkeeping, or finalization step.
45
+ - Do not run an upstream `save`, `generate`, or `approve` command after `draft save` merely to record constraints discovered during editing. That command order can hide the draft in the web app by rewinding the project to an earlier stage.
46
+ - Change an upstream artifact after drafting only when the user explicitly asks to revise the premise, structure, or research inputs and understands that CoAuthor must regenerate the downstream chain. Before the change, preserve the current document with `coauthor draft get <project-id> --format json --json`. Then complete the regeneration with `coauthor workflow run <project-id> --target draft --wait --json`; do not leave the project at an intermediate stale checkpoint.
47
+ - After ordinary draft editing, finish with read-only verification such as `coauthor draft get`, `coauthor draft status`, or `coauthor workflow status`.
48
+
37
49
  - For simple starts, use `coauthor project create --title "..." --topic "prose brief" --audience "target reader" --json`.
38
50
  - When you know the editorial contract fields, prefer `coauthor project create --contract '<json>' --json` instead of cramming structured data into `--topic`.
39
51
  - Keep `--topic` as a plain prose brief. Do not pass JSON through `--topic`.