@creator-notes/cnotes 0.79.0 → 0.81.0

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.
Files changed (92) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/README.md +1 -0
  3. package/dist/commands/auth-keys.js +2 -2
  4. package/dist/commands/auth-keys.js.map +1 -1
  5. package/dist/commands/brief.js +1 -1
  6. package/dist/commands/brief.js.map +1 -1
  7. package/dist/commands/canvas-milestone.js +3 -3
  8. package/dist/commands/canvas-milestone.js.map +1 -1
  9. package/dist/commands/canvas.d.ts.map +1 -1
  10. package/dist/commands/canvas.js +125 -78
  11. package/dist/commands/canvas.js.map +1 -1
  12. package/dist/commands/deps.js +3 -3
  13. package/dist/commands/deps.js.map +1 -1
  14. package/dist/commands/draft.d.ts.map +1 -1
  15. package/dist/commands/draft.js +301 -141
  16. package/dist/commands/draft.js.map +1 -1
  17. package/dist/commands/feedback.js +3 -3
  18. package/dist/commands/feedback.js.map +1 -1
  19. package/dist/commands/files.js +3 -3
  20. package/dist/commands/files.js.map +1 -1
  21. package/dist/commands/focus.js +3 -3
  22. package/dist/commands/focus.js.map +1 -1
  23. package/dist/commands/init.js +1 -1
  24. package/dist/commands/init.js.map +1 -1
  25. package/dist/commands/notes.d.ts.map +1 -1
  26. package/dist/commands/notes.js +15 -14
  27. package/dist/commands/notes.js.map +1 -1
  28. package/dist/commands/operations.d.ts +9 -0
  29. package/dist/commands/operations.d.ts.map +1 -1
  30. package/dist/commands/operations.js +152 -49
  31. package/dist/commands/operations.js.map +1 -1
  32. package/dist/commands/quality.js +1 -1
  33. package/dist/commands/quality.js.map +1 -1
  34. package/dist/commands/relationships.js +3 -3
  35. package/dist/commands/relationships.js.map +1 -1
  36. package/dist/commands/review.d.ts.map +1 -1
  37. package/dist/commands/review.js +10 -7
  38. package/dist/commands/review.js.map +1 -1
  39. package/dist/commands/schema.js +1 -1
  40. package/dist/commands/schema.js.map +1 -1
  41. package/dist/commands/search.js +2 -2
  42. package/dist/commands/search.js.map +1 -1
  43. package/dist/commands/shared.js +1 -1
  44. package/dist/commands/shared.js.map +1 -1
  45. package/dist/commands/theme.js +5 -5
  46. package/dist/commands/theme.js.map +1 -1
  47. package/dist/commands/timeline.js +1 -1
  48. package/dist/commands/timeline.js.map +1 -1
  49. package/dist/commands/types.js +4 -4
  50. package/dist/commands/types.js.map +1 -1
  51. package/dist/commands/upgrade.js +1 -1
  52. package/dist/commands/upgrade.js.map +1 -1
  53. package/dist/commands/versions.js +2 -2
  54. package/dist/commands/versions.js.map +1 -1
  55. package/dist/commands/workspace.d.ts.map +1 -1
  56. package/dist/commands/workspace.js +90 -9
  57. package/dist/commands/workspace.js.map +1 -1
  58. package/dist/lib/active-run.d.ts +62 -0
  59. package/dist/lib/active-run.d.ts.map +1 -0
  60. package/dist/lib/active-run.js +75 -0
  61. package/dist/lib/active-run.js.map +1 -0
  62. package/dist/lib/api-client.d.ts +19 -1
  63. package/dist/lib/api-client.d.ts.map +1 -1
  64. package/dist/lib/api-client.js +32 -2
  65. package/dist/lib/api-client.js.map +1 -1
  66. package/dist/lib/auth-store.d.ts +66 -0
  67. package/dist/lib/auth-store.d.ts.map +1 -1
  68. package/dist/lib/auth-store.js +204 -28
  69. package/dist/lib/auth-store.js.map +1 -1
  70. package/dist/lib/build-schema.d.ts +1 -1
  71. package/dist/lib/build-schema.js +1 -1
  72. package/dist/lib/build-schema.js.map +1 -1
  73. package/dist/lib/config.d.ts +14 -0
  74. package/dist/lib/config.d.ts.map +1 -1
  75. package/dist/lib/config.js +20 -5
  76. package/dist/lib/config.js.map +1 -1
  77. package/dist/lib/draft-view.d.ts +306 -0
  78. package/dist/lib/draft-view.d.ts.map +1 -0
  79. package/dist/lib/draft-view.js +358 -0
  80. package/dist/lib/draft-view.js.map +1 -0
  81. package/dist/lib/errors.d.ts +6 -0
  82. package/dist/lib/errors.d.ts.map +1 -1
  83. package/dist/lib/errors.js +64 -1
  84. package/dist/lib/errors.js.map +1 -1
  85. package/dist/lib/urls.d.ts +15 -0
  86. package/dist/lib/urls.d.ts.map +1 -1
  87. package/dist/lib/urls.js +20 -0
  88. package/dist/lib/urls.js.map +1 -1
  89. package/dist/mcp-server.js +6 -2
  90. package/dist/mcp-server.js.map +1 -1
  91. package/package.json +1 -1
  92. package/skills/cnotes/SKILL.md +104 -64
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: cnotes
3
- description: CreatorNotes CLI for the terminal. The command is `cnotes`. Use when the user mentions CreatorNotes or the cnotes CLI, asks to use this CLI skill, or wants to create, read, update, search, summarize, organize, or visualize notes, canvases, or transcripts in a CreatorNotes workspace. Covers cnotes notes, cnotes canvas, cnotes timeline, cnotes shared (what teammates shared with you), cnotes draft (private drafts of a workspace, merged or dismissed as one unit), cnotes review (official review requests: request, receive, complete), cnotes focus (plan flow-state blocks landed on a target card), cnotes search, cnotes versions, relationships, and operations. Prefer the cnotes CLI, verify the active workspace with cnotes workspace current, use --json when parsing output, and wrap write operations in cnotes operations begin and cnotes operations end.
3
+ description: CreatorNotes CLI for the terminal. The command is `cnotes`. Use when the user mentions CreatorNotes or the cnotes CLI, asks to use this CLI skill, or wants to create, read, update, search, summarize, organize, or visualize notes, canvases, or transcripts in a CreatorNotes workspace. Covers cnotes notes, cnotes canvas, cnotes timeline, cnotes shared (what teammates shared with you), cnotes draft (private drafts of a workspace that land only when a person approves them in the browser), cnotes review (official review requests: request, receive, complete), cnotes focus (plan flow-state blocks landed on a target card), cnotes search, cnotes versions, relationships, and operations. Prefer the cnotes CLI, verify the active workspace with cnotes workspace current, use --json when parsing output, and wrap write operations in cnotes operations begin and cnotes operations end.
4
4
  metadata:
5
5
  short-description: Work with CreatorNotes via the cnotes CLI
6
6
  ---
@@ -159,8 +159,12 @@ cnotes notes get MEETING-12 PRD-3 IDEA-7
159
159
  # references). Each linked note is labelled `assumes -> OBSERVATION-6K13`.
160
160
  # --depth N (default 1, max 4) walks further, deduped, and stops at 40 notes
161
161
  # with a notice when truncated. --rel assumes,depends-on limits which slugs
162
- # are followed. --summary keeps the title and opening paragraph of linked
163
- # notes (the requested notes stay whole). --incoming also includes notes that
162
+ # are followed. --summary keeps the title and the first real prose paragraph
163
+ # of linked notes (the requested notes stay whole). It skips leading headings,
164
+ # blank lines, and chip-only lines, so a Metric that starts
165
+ # `## Primary measure` returns the sentence after it, not the heading.
166
+ # Heading-only notes fall back to the last heading text; list-only notes
167
+ # fall back to the first list. --incoming also includes notes that
164
168
  # link to the target (`assumes <- OTHER-1`).
165
169
  cnotes notes get DECISION-6KN --expand
166
170
  cnotes notes get DECISION-6KN --expand --depth 2 --rel assumes,depends-on
@@ -632,80 +636,106 @@ cnotes shared --quiet # target refs only (CANVAS-12, ...)
632
636
 
633
637
  ### Drafts (`cnotes draft`)
634
638
 
635
- A draft is a private workspace opened FROM the active one, for a body of work
636
- (many notes, several canvases, and proposed edits of shared notes) that should
637
- not appear in the shared workspace until it is ready. Only the person who
638
- opened it, and agents using their login, can see it. It is merged into the
639
- shared workspace through checks, or dismissed, as one unit. Think branch and
640
- pull request: the draft is the branch, `propose` is how it changes a shared
641
- note, the checks are the CI, your own review round is the approval, and merge
642
- is one undoable row on the shared timeline.
639
+ A draft is a private workspace opened FROM the active one. Only the person who
640
+ opened it, and agents using their login, can see it. Nothing in it reaches the
641
+ shared workspace until a person approves it in the browser. You build the
642
+ draft; your person decides it.
643
+
644
+ Open a draft before you:
645
+ - rework notes other people read (a guide, a decision others cite);
646
+ - rework a board other people read (branch it, below);
647
+ - write many interlinked notes at once;
648
+ - do anything you were asked to "draft".
649
+
650
+ **To rework a board other people read, branch it:** `cnotes draft open
651
+ --from-canvas CANVAS-390`. The draft holds your working copy (it prints its
652
+ id, say CANVAS-412) and the live board does not change. Inside the draft, the
653
+ ordinary canvas verbs work on CANVAS-412: `canvas read`, `place` (shared notes
654
+ included), `move-node` / `bulk-move` / `arrange`, `remove-node` /
655
+ `bulk-remove`, `add-edge`. A canvas write aimed at
656
+ CANVAS-390 from inside the draft is refused and names your copy; never pass
657
+ `-w <shared workspace>` to reach it, which edits the live board. A person
658
+ accepts your copy as the board's next version (V2), on the live board.
643
659
 
644
660
  ```bash
645
661
  cnotes draft open "Pricing rethink" --intent "Rework tiers for teams" # opens AND switches to it
662
+ cnotes draft open --from-canvas CANVAS-390 --intent "Restamp screens 4 to 7" # branch a board
646
663
  cnotes notes create --notes '[...]' # lands in the draft (it is the active workspace)
647
664
  cnotes notes get DECISION-12 # a SHARED note reads through from the draft (sharedFrom in --json)
648
665
  cnotes draft propose DECISION-12 --markdown-file new.md --description "Annual is the default"
649
666
  cnotes draft edits # the proposals: proposed title, base version, conflict marker
650
667
  cnotes draft discard DECISION-12 # withdraw one; the shared note was never touched
668
+ cnotes draft status # who it waits on, what V2 changes, the checks, the link
669
+ cnotes draft ask --reviewer sam@example.com # name who decides; then STOP
651
670
  cnotes draft list # your open drafts across workspaces (--all adds closed)
652
671
  cnotes draft checkout pricing # resume in a NEW session: id or unique name substring
653
- cnotes draft status # what it holds, the checks a merge runs, the review round
654
- cnotes draft merge # checks, then notes + canvases + proposals land as one row
655
- cnotes draft undo-merge # put it back while nothing has built on it
656
- cnotes draft dismiss # or close it; nothing reaches the shared workspace
672
+ cnotes draft dismiss # close it; nothing reaches the shared workspace
657
673
  ```
658
674
 
675
+ The loop:
676
+ 1. **Build inside the draft.** New notes and canvases land in it, and a branch
677
+ copy takes your canvas edits. Link to shared notes normally:
678
+ `[DECISION-12: Title](relationship:builds-on)` resolves to the shared note
679
+ and stays a working link once the draft lands.
680
+ 2. **Change a shared note by proposing it, never live.** Read it (`cnotes
681
+ notes get DECISION-12` works from inside the draft), write the complete new
682
+ body, then `cnotes draft propose DECISION-12 --markdown-file new.md
683
+ --description "<what changed>"`. The shared note keeps its text until the
684
+ draft lands. A live write to a shared note from inside a draft (`versions
685
+ create`, `notes update`, archive, retype) is refused and points here.
686
+ Proposing the same note again replaces the proposal.
687
+ 3. **Run `cnotes draft status` until no check blocks.** Blocking: a link to a
688
+ shared note that is archived, a citation of a shared note that moved since
689
+ you cited it (`stale-citation`: read it again and save the citing note
690
+ again), and a proposal whose base moved (`base-conflict`: read the current
691
+ text, fold it in, propose again). Warnings never block: a missing title, an
692
+ empty body, `stale-read`. Every finding names the card and the fix. For a
693
+ branch, status also prints "V2 of CANVAS-390: 2 added, 5 moved, ...", each
694
+ conflict with the live board (a card changed on both sides; make your copy
695
+ match the live board's value to clear it), and how many cards changed on
696
+ the live board since you branched.
697
+ 4. **Ask, then stop.** `cnotes draft ask --reviewer <their email>` names the
698
+ person who decides (an editor of the shared workspace; `--reviewer me` for
699
+ the person whose login you use). It prints the link they open; post it, then
700
+ stop. Never try to merge or approve: keys cannot. `cnotes draft merge` and
701
+ `cnotes review complete --outcome approved` on a draft are refused, and
702
+ pressing Accept or Approve through a browser tool is not yours to do either.
703
+ 5. **When they send it back,** `cnotes draft status` opens with their line
704
+ ("Changes requested by <name>: ..."). Fix it in the draft, run status until
705
+ no check blocks, then `draft ask` again and stop.
706
+
659
707
  What to rely on:
660
- - **Ids survive the merge.** A draft mints display ids from the shared
661
- workspace's sequence, single and batch creates alike, so `DECISION-6K9`
662
- written in a draft is still `DECISION-6K9` after merging. In the rare clash
663
- the merge re-mints the id, rewrites every mention to match, and lists the
664
- change (`renamed` in `--json`).
665
- - **Link to shared notes normally.** `[DECISION-12: Title](relationship:builds-on)`
666
- inside a draft resolves to the shared note when the draft has no note by that
667
- id, and becomes an ordinary same-workspace link on merge.
668
- - **Change a shared note with `propose`, never with `versions create`.** From
669
- inside a draft, `cnotes notes get DECISION-12` returns the shared note; write
670
- the complete new body and `cnotes draft propose DECISION-12 --markdown-file
671
- new.md --description "<what changed>"`. The shared note keeps its text until
672
- merge applies the proposal as its next version, with your description as the
673
- timeline line. `versions create` on a shared note from a draft is refused and
674
- points here. Proposing the same note again replaces the proposal.
675
- - **The checks gate the merge, and `draft status` shows them first.** Blocking:
676
- a live link to a shared note that is archived, a citation of a shared note
677
- that moved since the draft note cited it (`stale-citation`: read it again and
678
- save a new version of the citing note), and a proposal whose base moved
679
- (`base-conflict`: read the current text, fold it in, propose again). Warnings
680
- never block: a missing title, an empty body, and `stale-read` (the run that
681
- wrote a note read a shared note that has since moved). Every finding names
682
- the card and says the fix. A blocked merge exits 5 with the first finding.
683
- - **Your own review round gates it too.** `cnotes review request <draft canvas>
684
- --reviewer me` works inside a draft (any other reviewer still refuses: a
685
- draft is private). While that round is open the merge waits; `changes-
686
- requested` sends it back with the rationale in `draft status`, so the agent
687
- that built the draft knows what to fix, fixes it in the draft, and asks
688
- again with a fresh request. `approved` lets the merge through.
689
- - **Merge is one row and can be undone.** The shared timeline shows "Merged
690
- <draft>" once; `cnotes draft undo-merge` moves every note and canvas back,
691
- restores each applied edit as a NEW version (history is never deleted) and
692
- reopens the draft with its proposals pending. Undo refuses once the team has
693
- built on the merge: a moved note re-versioned or placed on a shared canvas,
694
- a moved canvas changed, or an applied edit edited again.
695
- - **Canvases in a draft hold draft notes.** Placing a shared note on a draft
696
- canvas is not supported; mention it from a draft note instead.
697
- - **Merge is all or nothing, owner only, at most 100 notes, 25 canvases and
698
- 100 proposals.** Only live items count: archived notes and canvases stay in
699
- the draft, and any link, card or list item pointing at them is dropped on
700
- merge so their titles never reach the shared workspace. The draft's empty
701
- starting canvas is left behind. Merge and dismiss switch the CLI back to the
702
- shared workspace when the draft was active.
703
- - **A draft can't be shared.** Invites, email shares, review requests to
704
- anyone but yourself, and public links all refuse in a draft; merge is the
705
- only way its work reaches anyone else.
708
+ - **One line says who it waits on.** `draft status`, `draft checkout` and
709
+ `workspace current` print it: nobody asked yet, the changes a person asked
710
+ for, or a named reviewer. When the next move is yours, it ends with the
711
+ `draft ask` to run. `--json` carries it as `decision.line`, with
712
+ `decision.state` (`awaiting_person`, `changes_requested`,
713
+ `waiting_on_reviewer`).
714
+ - **Ids survive.** A draft mints display ids from the shared workspace's
715
+ sequence, so `DECISION-6K9` written in a draft is still `DECISION-6K9` once it
716
+ lands. In the rare clash the id is re-minted, every mention is rewritten, and
717
+ `draft status` lists the change (`merge.renamed` in `--json`).
718
+ - **A saved switch can be shadowed.** `draft open` and `draft checkout` save the
719
+ draft as the active workspace, but `CNOTES_WORKSPACE` and `-w` beat the saved
720
+ one. When either names another workspace the command says writes still go
721
+ there; unset it to work in the draft. `workspace current` shows what picked
722
+ the workspace.
723
+ - **After it lands,** `draft status` says who approved it and which ids were
724
+ renamed. Your CLI still points at the closed draft: `cnotes workspace
725
+ current` names it and prints the `cnotes workspace select` that switches
726
+ back. The person can undo the merge while nobody has built on it.
727
+ - **Canvases in a draft can hold shared notes.** Place them as usual; the card
728
+ points at the shared note, and to change what it says, propose it.
729
+ - **It lands all at once:** at most 100 notes, 25 canvases and 100 proposals.
730
+ Only live items count: archived notes and canvases stay in the draft, and any
731
+ link, card or list item pointing at them is dropped so their titles never
732
+ reach the shared workspace. The draft's empty starting canvas stays behind.
733
+ - **A draft can't be shared.** Invites, email shares and public links refuse
734
+ in a draft. The hand-over is `draft ask`, nothing else: for a branch, it is
735
+ what lets the person you name see your version at all.
706
736
  - **Wrap the work in an operation as usual** (`operations begin` while the
707
737
  draft is active): runs attribute to the draft like any workspace, and follow
708
- the work onto the shared timeline at merge.
738
+ the work onto the shared timeline when it lands.
709
739
 
710
740
  ### Review requests (`cnotes review` / `cnotes reviews`)
711
741
 
@@ -1227,9 +1257,19 @@ Agent via `CURSOR_CONVERSATION_ID` (`bc-…`). The timeline then offers resume
1227
1257
  Override with `CNOTES_AGENT_SESSION_ID` + `CNOTES_AGENT_SESSION_KIND` when needed.
1228
1258
 
1229
1259
 
1230
- **Always close the run.** If `begin` succeeded, `end` must run — otherwise the operation stays `running` and subsequent `cnotes operations begin` calls will refuse (with a clear "active run already exists, end it first or pass --force" message). The server-side reaper will eventually mark a stale `running` row as `abandoned` after about an hour, but that's a safety net, not the intended flow.
1260
+ **Always close the run.** If `begin` succeeded, `end` must run — otherwise the operation stays `running` and subsequent `cnotes operations begin` calls will refuse (with a clear "active run already exists" message naming the ways out). The server-side reaper marks a stale `running` row as `abandoned` after about an hour; `begin` checks the server and forgets such a run on its own, so a crashed earlier session never needs `--force`. `cnotes operations open` lists the runs this machine has open with the server's view of each; `--prune` forgets the ones no longer running.
1261
+
1262
+ **If something goes wrong mid-batch** and you can't recover: `cnotes operations begin --force` ends the prior run server-side and starts a fresh one. Only do this to a run you abandoned yourself: `--force` ends whichever run holds the active slot, which may be another agent's.
1263
+
1264
+ **Two agents on one machine.** Each run is tracked on its own. The active run (plain `begin`) is only the implicit default for writes that carry no run id. A second agent opens its own run with `--detached` and carries the returned id in `CNOTES_AGENT_RUN_ID` (or passes it to `end --agent-run-id`); a detached run never touches the shared active-run pointer, so neither agent can clobber or close the other's run:
1265
+
1266
+ ```bash
1267
+ RUN=$(cnotes operations begin --prompt "Triage inbox" --detached -q)
1268
+ CNOTES_AGENT_RUN_ID=$RUN cnotes notes create --notes '[ ... ]'
1269
+ cnotes operations end --agent-run-id $RUN
1270
+ ```
1231
1271
 
1232
- **If something goes wrong mid-batch** and you can't recover: `cnotes operations end --force` (on a future begin) ends the prior run server-side and starts a fresh one.
1272
+ `end` resolves the run from `--agent-run-id`, then `CNOTES_AGENT_RUN_ID`, then the active pointer, and refuses (exit code 5) a run this machine did not open — only the actor who opened a run can end it server-side too. Ending one run never clears or ends another. `--force` on `end` is the explicit override for a run opened elsewhere.
1233
1273
 
1234
1274
  #### Writing a good `--prompt`
1235
1275