@creator-notes/cnotes 0.104.0 → 0.105.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 (324) hide show
  1. package/.claude-plugin/plugin.json +1 -1
  2. package/dist/cn.js +0 -1
  3. package/dist/commands/auth-keys.js +0 -1
  4. package/dist/commands/auth.js +0 -1
  5. package/dist/commands/brief.js +0 -1
  6. package/dist/commands/canvas-milestone.js +0 -1
  7. package/dist/commands/canvas.js +42 -2
  8. package/dist/commands/claude-hook.js +0 -1
  9. package/dist/commands/config.js +0 -1
  10. package/dist/commands/deps.js +0 -1
  11. package/dist/commands/draft.js +0 -37
  12. package/dist/commands/feedback.js +0 -1
  13. package/dist/commands/files.js +0 -1
  14. package/dist/commands/focus.js +0 -1
  15. package/dist/commands/goals.js +0 -1
  16. package/dist/commands/init.js +4 -2
  17. package/dist/commands/mcp.js +0 -1
  18. package/dist/commands/notes.js +4 -2
  19. package/dist/commands/operations.js +0 -1
  20. package/dist/commands/quality.js +0 -1
  21. package/dist/commands/relationships.js +0 -1
  22. package/dist/commands/review.js +0 -1
  23. package/dist/commands/schema.js +0 -1
  24. package/dist/commands/search.js +0 -1
  25. package/dist/commands/shared.js +0 -1
  26. package/dist/commands/skills.js +0 -1
  27. package/dist/commands/theme.js +0 -1
  28. package/dist/commands/timeline.js +0 -1
  29. package/dist/commands/types.js +0 -1
  30. package/dist/commands/upgrade.js +0 -1
  31. package/dist/commands/versions.js +0 -1
  32. package/dist/commands/workspace.js +1 -2
  33. package/dist/generated/embedded-build.js +0 -1
  34. package/dist/lib/active-run.js +0 -1
  35. package/dist/lib/agent-client.js +0 -1
  36. package/dist/lib/agent-grade.js +0 -1
  37. package/dist/lib/api-client.js +16 -5
  38. package/dist/lib/auth-store.js +0 -1
  39. package/dist/lib/billing-block.js +0 -1
  40. package/dist/lib/brand.js +0 -1
  41. package/dist/lib/build-schema.js +0 -1
  42. package/dist/lib/canvas-goal.js +0 -1
  43. package/dist/lib/canvas-layout.js +0 -1
  44. package/dist/lib/canvas-paths.js +0 -1
  45. package/dist/lib/claude-session.js +0 -1
  46. package/dist/lib/config.js +0 -1
  47. package/dist/lib/decision-citation.js +0 -1
  48. package/dist/lib/display-id.js +0 -1
  49. package/dist/lib/draft-ref.js +0 -1
  50. package/dist/lib/draft-view.js +0 -1
  51. package/dist/lib/errors.js +37 -6
  52. package/dist/lib/expand-notes.js +0 -1
  53. package/dist/lib/focus-time.js +0 -1
  54. package/dist/lib/fs-utils.js +0 -1
  55. package/dist/lib/goal-tree.js +0 -1
  56. package/dist/lib/headline-warnings.js +0 -1
  57. package/dist/lib/install-hook.js +0 -1
  58. package/dist/lib/install-mcp.js +0 -1
  59. package/dist/lib/install-skill.js +0 -1
  60. package/dist/lib/mcp-local-file.js +0 -1
  61. package/dist/lib/mention-lint.js +0 -1
  62. package/dist/lib/milestone-message.js +0 -1
  63. package/dist/lib/output.js +0 -1
  64. package/dist/lib/quality.js +0 -1
  65. package/dist/lib/resolve-note.js +0 -1
  66. package/dist/lib/review-helpers.js +0 -1
  67. package/dist/lib/rubric-sections.js +0 -1
  68. package/dist/lib/rubrics.js +0 -1
  69. package/dist/lib/runtime.js +0 -1
  70. package/dist/lib/server-url.js +0 -1
  71. package/dist/lib/session-brief.js +0 -1
  72. package/dist/lib/share-link.js +0 -1
  73. package/dist/lib/shared-rows.js +0 -1
  74. package/dist/lib/stdin.js +0 -1
  75. package/dist/lib/storage-id.js +0 -1
  76. package/dist/lib/style.js +0 -1
  77. package/dist/lib/superseded-by.js +0 -1
  78. package/dist/lib/themes.js +0 -1
  79. package/dist/lib/urls.js +0 -1
  80. package/dist/mcp-server.js +19 -17
  81. package/dist/program.js +0 -1
  82. package/package.json +1 -1
  83. package/skills/cnotes/references/canvas-elements.md +1 -0
  84. package/skills/cnotes/references/canvas.md +8 -1
  85. package/dist/cn.d.ts +0 -3
  86. package/dist/cn.d.ts.map +0 -1
  87. package/dist/cn.js.map +0 -1
  88. package/dist/commands/auth-keys.d.ts +0 -3
  89. package/dist/commands/auth-keys.d.ts.map +0 -1
  90. package/dist/commands/auth-keys.js.map +0 -1
  91. package/dist/commands/auth.d.ts +0 -11
  92. package/dist/commands/auth.d.ts.map +0 -1
  93. package/dist/commands/auth.js.map +0 -1
  94. package/dist/commands/brief.d.ts +0 -9
  95. package/dist/commands/brief.d.ts.map +0 -1
  96. package/dist/commands/brief.js.map +0 -1
  97. package/dist/commands/canvas-milestone.d.ts +0 -14
  98. package/dist/commands/canvas-milestone.d.ts.map +0 -1
  99. package/dist/commands/canvas-milestone.js.map +0 -1
  100. package/dist/commands/canvas.d.ts +0 -20
  101. package/dist/commands/canvas.d.ts.map +0 -1
  102. package/dist/commands/canvas.js.map +0 -1
  103. package/dist/commands/claude-hook.d.ts +0 -28
  104. package/dist/commands/claude-hook.d.ts.map +0 -1
  105. package/dist/commands/claude-hook.js.map +0 -1
  106. package/dist/commands/config.d.ts +0 -3
  107. package/dist/commands/config.d.ts.map +0 -1
  108. package/dist/commands/config.js.map +0 -1
  109. package/dist/commands/deps.d.ts +0 -94
  110. package/dist/commands/deps.d.ts.map +0 -1
  111. package/dist/commands/deps.js.map +0 -1
  112. package/dist/commands/draft.d.ts +0 -3
  113. package/dist/commands/draft.d.ts.map +0 -1
  114. package/dist/commands/draft.js.map +0 -1
  115. package/dist/commands/feedback.d.ts +0 -3
  116. package/dist/commands/feedback.d.ts.map +0 -1
  117. package/dist/commands/feedback.js.map +0 -1
  118. package/dist/commands/files.d.ts +0 -3
  119. package/dist/commands/files.d.ts.map +0 -1
  120. package/dist/commands/files.js.map +0 -1
  121. package/dist/commands/focus.d.ts +0 -3
  122. package/dist/commands/focus.d.ts.map +0 -1
  123. package/dist/commands/focus.js.map +0 -1
  124. package/dist/commands/goals.d.ts +0 -3
  125. package/dist/commands/goals.d.ts.map +0 -1
  126. package/dist/commands/goals.js.map +0 -1
  127. package/dist/commands/init.d.ts +0 -3
  128. package/dist/commands/init.d.ts.map +0 -1
  129. package/dist/commands/init.js.map +0 -1
  130. package/dist/commands/mcp.d.ts +0 -15
  131. package/dist/commands/mcp.d.ts.map +0 -1
  132. package/dist/commands/mcp.js.map +0 -1
  133. package/dist/commands/notes.d.ts +0 -3
  134. package/dist/commands/notes.d.ts.map +0 -1
  135. package/dist/commands/notes.js.map +0 -1
  136. package/dist/commands/operations.d.ts +0 -27
  137. package/dist/commands/operations.d.ts.map +0 -1
  138. package/dist/commands/operations.js.map +0 -1
  139. package/dist/commands/quality.d.ts +0 -14
  140. package/dist/commands/quality.d.ts.map +0 -1
  141. package/dist/commands/quality.js.map +0 -1
  142. package/dist/commands/relationships.d.ts +0 -8
  143. package/dist/commands/relationships.d.ts.map +0 -1
  144. package/dist/commands/relationships.js.map +0 -1
  145. package/dist/commands/review.d.ts +0 -19
  146. package/dist/commands/review.d.ts.map +0 -1
  147. package/dist/commands/review.js.map +0 -1
  148. package/dist/commands/schema.d.ts +0 -12
  149. package/dist/commands/schema.d.ts.map +0 -1
  150. package/dist/commands/schema.js.map +0 -1
  151. package/dist/commands/search.d.ts +0 -3
  152. package/dist/commands/search.d.ts.map +0 -1
  153. package/dist/commands/search.js.map +0 -1
  154. package/dist/commands/shared.d.ts +0 -3
  155. package/dist/commands/shared.d.ts.map +0 -1
  156. package/dist/commands/shared.js.map +0 -1
  157. package/dist/commands/skills.d.ts +0 -3
  158. package/dist/commands/skills.d.ts.map +0 -1
  159. package/dist/commands/skills.js.map +0 -1
  160. package/dist/commands/theme.d.ts +0 -3
  161. package/dist/commands/theme.d.ts.map +0 -1
  162. package/dist/commands/theme.js.map +0 -1
  163. package/dist/commands/timeline.d.ts +0 -4
  164. package/dist/commands/timeline.d.ts.map +0 -1
  165. package/dist/commands/timeline.js.map +0 -1
  166. package/dist/commands/types.d.ts +0 -3
  167. package/dist/commands/types.d.ts.map +0 -1
  168. package/dist/commands/types.js.map +0 -1
  169. package/dist/commands/upgrade.d.ts +0 -13
  170. package/dist/commands/upgrade.d.ts.map +0 -1
  171. package/dist/commands/upgrade.js.map +0 -1
  172. package/dist/commands/versions.d.ts +0 -3
  173. package/dist/commands/versions.d.ts.map +0 -1
  174. package/dist/commands/versions.js.map +0 -1
  175. package/dist/commands/workspace.d.ts +0 -13
  176. package/dist/commands/workspace.d.ts.map +0 -1
  177. package/dist/commands/workspace.js.map +0 -1
  178. package/dist/generated/embedded-build.d.ts +0 -22
  179. package/dist/generated/embedded-build.d.ts.map +0 -1
  180. package/dist/generated/embedded-build.js.map +0 -1
  181. package/dist/lib/active-run.d.ts +0 -62
  182. package/dist/lib/active-run.d.ts.map +0 -1
  183. package/dist/lib/active-run.js.map +0 -1
  184. package/dist/lib/agent-client.d.ts +0 -12
  185. package/dist/lib/agent-client.d.ts.map +0 -1
  186. package/dist/lib/agent-client.js.map +0 -1
  187. package/dist/lib/agent-grade.d.ts +0 -24
  188. package/dist/lib/agent-grade.d.ts.map +0 -1
  189. package/dist/lib/agent-grade.js.map +0 -1
  190. package/dist/lib/api-client.d.ts +0 -124
  191. package/dist/lib/api-client.d.ts.map +0 -1
  192. package/dist/lib/api-client.js.map +0 -1
  193. package/dist/lib/auth-store.d.ts +0 -177
  194. package/dist/lib/auth-store.d.ts.map +0 -1
  195. package/dist/lib/auth-store.js.map +0 -1
  196. package/dist/lib/billing-block.d.ts +0 -12
  197. package/dist/lib/billing-block.d.ts.map +0 -1
  198. package/dist/lib/billing-block.js.map +0 -1
  199. package/dist/lib/brand.d.ts +0 -35
  200. package/dist/lib/brand.d.ts.map +0 -1
  201. package/dist/lib/brand.js.map +0 -1
  202. package/dist/lib/build-schema.d.ts +0 -109
  203. package/dist/lib/build-schema.d.ts.map +0 -1
  204. package/dist/lib/build-schema.js.map +0 -1
  205. package/dist/lib/canvas-goal.d.ts +0 -59
  206. package/dist/lib/canvas-goal.d.ts.map +0 -1
  207. package/dist/lib/canvas-goal.js.map +0 -1
  208. package/dist/lib/canvas-layout.d.ts +0 -77
  209. package/dist/lib/canvas-layout.d.ts.map +0 -1
  210. package/dist/lib/canvas-layout.js.map +0 -1
  211. package/dist/lib/canvas-paths.d.ts +0 -31
  212. package/dist/lib/canvas-paths.d.ts.map +0 -1
  213. package/dist/lib/canvas-paths.js.map +0 -1
  214. package/dist/lib/claude-session.d.ts +0 -112
  215. package/dist/lib/claude-session.d.ts.map +0 -1
  216. package/dist/lib/claude-session.js.map +0 -1
  217. package/dist/lib/config.d.ts +0 -76
  218. package/dist/lib/config.d.ts.map +0 -1
  219. package/dist/lib/config.js.map +0 -1
  220. package/dist/lib/decision-citation.d.ts +0 -10
  221. package/dist/lib/decision-citation.d.ts.map +0 -1
  222. package/dist/lib/decision-citation.js.map +0 -1
  223. package/dist/lib/display-id.d.ts +0 -12
  224. package/dist/lib/display-id.d.ts.map +0 -1
  225. package/dist/lib/display-id.js.map +0 -1
  226. package/dist/lib/draft-ref.d.ts +0 -61
  227. package/dist/lib/draft-ref.d.ts.map +0 -1
  228. package/dist/lib/draft-ref.js.map +0 -1
  229. package/dist/lib/draft-view.d.ts +0 -566
  230. package/dist/lib/draft-view.d.ts.map +0 -1
  231. package/dist/lib/draft-view.js.map +0 -1
  232. package/dist/lib/errors.d.ts +0 -105
  233. package/dist/lib/errors.d.ts.map +0 -1
  234. package/dist/lib/errors.js.map +0 -1
  235. package/dist/lib/expand-notes.d.ts +0 -79
  236. package/dist/lib/expand-notes.d.ts.map +0 -1
  237. package/dist/lib/expand-notes.js.map +0 -1
  238. package/dist/lib/focus-time.d.ts +0 -16
  239. package/dist/lib/focus-time.d.ts.map +0 -1
  240. package/dist/lib/focus-time.js.map +0 -1
  241. package/dist/lib/fs-utils.d.ts +0 -10
  242. package/dist/lib/fs-utils.d.ts.map +0 -1
  243. package/dist/lib/fs-utils.js.map +0 -1
  244. package/dist/lib/goal-tree.d.ts +0 -71
  245. package/dist/lib/goal-tree.d.ts.map +0 -1
  246. package/dist/lib/goal-tree.js.map +0 -1
  247. package/dist/lib/headline-warnings.d.ts +0 -8
  248. package/dist/lib/headline-warnings.d.ts.map +0 -1
  249. package/dist/lib/headline-warnings.js.map +0 -1
  250. package/dist/lib/install-hook.d.ts +0 -86
  251. package/dist/lib/install-hook.d.ts.map +0 -1
  252. package/dist/lib/install-hook.js.map +0 -1
  253. package/dist/lib/install-mcp.d.ts +0 -21
  254. package/dist/lib/install-mcp.d.ts.map +0 -1
  255. package/dist/lib/install-mcp.js.map +0 -1
  256. package/dist/lib/install-skill.d.ts +0 -84
  257. package/dist/lib/install-skill.d.ts.map +0 -1
  258. package/dist/lib/install-skill.js.map +0 -1
  259. package/dist/lib/mcp-local-file.d.ts +0 -11
  260. package/dist/lib/mcp-local-file.d.ts.map +0 -1
  261. package/dist/lib/mcp-local-file.js.map +0 -1
  262. package/dist/lib/mention-lint.d.ts +0 -159
  263. package/dist/lib/mention-lint.d.ts.map +0 -1
  264. package/dist/lib/mention-lint.js.map +0 -1
  265. package/dist/lib/milestone-message.d.ts +0 -37
  266. package/dist/lib/milestone-message.d.ts.map +0 -1
  267. package/dist/lib/milestone-message.js.map +0 -1
  268. package/dist/lib/output.d.ts +0 -57
  269. package/dist/lib/output.d.ts.map +0 -1
  270. package/dist/lib/output.js.map +0 -1
  271. package/dist/lib/quality.d.ts +0 -142
  272. package/dist/lib/quality.d.ts.map +0 -1
  273. package/dist/lib/quality.js.map +0 -1
  274. package/dist/lib/resolve-note.d.ts +0 -7
  275. package/dist/lib/resolve-note.d.ts.map +0 -1
  276. package/dist/lib/resolve-note.js.map +0 -1
  277. package/dist/lib/review-helpers.d.ts +0 -37
  278. package/dist/lib/review-helpers.d.ts.map +0 -1
  279. package/dist/lib/review-helpers.js.map +0 -1
  280. package/dist/lib/rubric-sections.d.ts +0 -29
  281. package/dist/lib/rubric-sections.d.ts.map +0 -1
  282. package/dist/lib/rubric-sections.js.map +0 -1
  283. package/dist/lib/rubrics.d.ts +0 -60
  284. package/dist/lib/rubrics.d.ts.map +0 -1
  285. package/dist/lib/rubrics.js.map +0 -1
  286. package/dist/lib/runtime.d.ts +0 -40
  287. package/dist/lib/runtime.d.ts.map +0 -1
  288. package/dist/lib/runtime.js.map +0 -1
  289. package/dist/lib/server-url.d.ts +0 -33
  290. package/dist/lib/server-url.d.ts.map +0 -1
  291. package/dist/lib/server-url.js.map +0 -1
  292. package/dist/lib/session-brief.d.ts +0 -60
  293. package/dist/lib/session-brief.d.ts.map +0 -1
  294. package/dist/lib/session-brief.js.map +0 -1
  295. package/dist/lib/share-link.d.ts +0 -19
  296. package/dist/lib/share-link.d.ts.map +0 -1
  297. package/dist/lib/share-link.js.map +0 -1
  298. package/dist/lib/shared-rows.d.ts +0 -46
  299. package/dist/lib/shared-rows.d.ts.map +0 -1
  300. package/dist/lib/shared-rows.js.map +0 -1
  301. package/dist/lib/stdin.d.ts +0 -5
  302. package/dist/lib/stdin.d.ts.map +0 -1
  303. package/dist/lib/stdin.js.map +0 -1
  304. package/dist/lib/storage-id.d.ts +0 -12
  305. package/dist/lib/storage-id.d.ts.map +0 -1
  306. package/dist/lib/storage-id.js.map +0 -1
  307. package/dist/lib/style.d.ts +0 -10
  308. package/dist/lib/style.d.ts.map +0 -1
  309. package/dist/lib/style.js.map +0 -1
  310. package/dist/lib/superseded-by.d.ts +0 -20
  311. package/dist/lib/superseded-by.d.ts.map +0 -1
  312. package/dist/lib/superseded-by.js.map +0 -1
  313. package/dist/lib/themes.d.ts +0 -44
  314. package/dist/lib/themes.d.ts.map +0 -1
  315. package/dist/lib/themes.js.map +0 -1
  316. package/dist/lib/urls.d.ts +0 -44
  317. package/dist/lib/urls.d.ts.map +0 -1
  318. package/dist/lib/urls.js.map +0 -1
  319. package/dist/mcp-server.d.ts +0 -3
  320. package/dist/mcp-server.d.ts.map +0 -1
  321. package/dist/mcp-server.js.map +0 -1
  322. package/dist/program.d.ts +0 -13
  323. package/dist/program.d.ts.map +0 -1
  324. package/dist/program.js.map +0 -1
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.104.0",
3
+ "version": "0.105.0",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
package/dist/cn.js CHANGED
@@ -87,4 +87,3 @@ process.on("unhandledRejection", (reason) => {
87
87
  program.parseAsync(process.argv).catch((error) => {
88
88
  handleError(error, isJsonMode());
89
89
  });
90
- //# sourceMappingURL=cn.js.map
@@ -66,4 +66,3 @@ export function registerAuthKeysCommands(auth, program) {
66
66
  }
67
67
  });
68
68
  }
69
- //# sourceMappingURL=auth-keys.js.map
@@ -343,4 +343,3 @@ export async function browserLogin(rawServerUrl, json, options) {
343
343
  }, 120_000);
344
344
  });
345
345
  }
346
- //# sourceMappingURL=auth.js.map
@@ -49,4 +49,3 @@ Examples:
49
49
  }
50
50
  });
51
51
  }
52
- //# sourceMappingURL=brief.js.map
@@ -207,4 +207,3 @@ Examples:
207
207
  }
208
208
  });
209
209
  }
210
- //# sourceMappingURL=canvas-milestone.js.map
@@ -613,7 +613,7 @@ Examples:
613
613
  .description("Check a board for cards that contradict each other and claims nothing on the board backs. " +
614
614
  "Writes nothing: turn each finding into a Tension note (a contradiction, linking both cards) or a " +
615
615
  "Question note (what would back this claim?) inside a draft, so a person accepts them. " +
616
- "One model call per card; editors only; the deployment must turn the check on.")
616
+ "One model call per card; editors only; refused where the deployment has no decision model for this workspace.")
617
617
  .argument("<canvasId>", "Canvas ID or display ID (CANVAS-12)")
618
618
  .action(async (canvasId) => {
619
619
  const cfg = resolveConfig(program.opts());
@@ -1468,6 +1468,47 @@ Examples:
1468
1468
  handleError(error, cfg.json);
1469
1469
  }
1470
1470
  });
1471
+ canvas
1472
+ .command("add-quote")
1473
+ .description("Quote words from a note onto a canvas as a quote card pinned to the note's saved version")
1474
+ .argument("<canvasId>", "Canvas ID (CANVAS-<n> or id)")
1475
+ .requiredOption("--note <ref>", "The note to quote (display id like TRANSCRIPT-4, or id)")
1476
+ .requiredOption("--text <words>", "The exact words to quote; they must appear in the note's saved version")
1477
+ .addOption(new Option("--style <style>", "How the card shows the words").choices(["pull", "highlight", "evidence"]))
1478
+ .option("--x <n>", "Raw X position (default: beside the note's card, else below everything)")
1479
+ .option("--y <n>", "Raw Y position")
1480
+ .addHelpText("after", `
1481
+ A quote is evidence, not a claim: the words stay pinned to the version they came
1482
+ from and never change. To say what a quote means, write an Insight that cites
1483
+ the source note.
1484
+
1485
+ Examples:
1486
+ $ cnotes canvas add-quote CANVAS-12 --note TRANSCRIPT-4 --text "We lose them at the invite step"
1487
+ $ cnotes canvas add-quote CANVAS-12 --note TRANSCRIPT-4 --text "every time" --style highlight
1488
+ `)
1489
+ .action(async (canvasId, opts) => {
1490
+ const cfg = resolveConfig(program.opts());
1491
+ const api = new ApiClient(cfg.serverUrl, cfg.token, cfg.workspaceId);
1492
+ try {
1493
+ const position = rawPosition(opts);
1494
+ const data = await api.post(canvasActionPath(canvasId, cfg.workspaceId), {
1495
+ action: "addQuote",
1496
+ note: opts.note,
1497
+ text: opts.text,
1498
+ ...(opts.style ? { style: opts.style } : {}),
1499
+ ...(position ? { positionX: position.x, positionY: position.y } : {}),
1500
+ });
1501
+ if (cfg.quiet)
1502
+ outputQuiet(String(data.nodeId ?? ""));
1503
+ else if (cfg.json)
1504
+ outputJson(data);
1505
+ else
1506
+ console.log(`Quoted ${data.noteDisplayId} v${data.versionNumber} on ${canvasId} at (${data.positionX}, ${data.positionY})`);
1507
+ }
1508
+ catch (error) {
1509
+ handleError(error, cfg.json);
1510
+ }
1511
+ });
1471
1512
  canvas
1472
1513
  .command("bulk-add")
1473
1514
  .description("Add multiple notes to a canvas in one operation with positions")
@@ -3158,4 +3199,3 @@ Examples:
3158
3199
  }
3159
3200
  });
3160
3201
  }
3161
- //# sourceMappingURL=canvas.js.map
@@ -56,4 +56,3 @@ export function registerClaudeHookCommand(program) {
56
56
  process.exit(0);
57
57
  });
58
58
  }
59
- //# sourceMappingURL=claude-hook.js.map
@@ -51,4 +51,3 @@ export function registerConfigCommands(program) {
51
51
  }
52
52
  });
53
53
  }
54
- //# sourceMappingURL=config.js.map
@@ -236,4 +236,3 @@ function indent(text) {
236
236
  .map((line) => ` ${line}`)
237
237
  .join("\n");
238
238
  }
239
- //# sourceMappingURL=deps.js.map
@@ -943,42 +943,6 @@ cnotes draft ask --reviewer <email|me>, and stop.
943
943
  }), cfg.json);
944
944
  }
945
945
  });
946
- draft
947
- .command("undo-merge")
948
- .description("Undo a merge, in a browser session only. Undoing reverses a person's decision, so a key is always refused and gets the link to hand the person who approved it (Undo on the merge row in History). `cnotes draft status` prints the same link")
949
- .argument("[draft]", "Draft id or name; defaults to the draft you work in")
950
- .action(async (ref) => {
951
- const cfg = resolveBaseConfig(program.opts());
952
- const api = new ApiClient(cfg.serverUrl, cfg.token, cfg.workspaceId);
953
- try {
954
- const id = await resolveTarget(api, ref, cfg);
955
- const result = await api
956
- .post(`/api/workspace-drafts/${id}`, { action: "undo-merge" })
957
- .catch(async (e) => {
958
- if (!(e instanceof ApiError) || e.reason !== "human_undo_required")
959
- throw notADraft(e, Boolean(ref));
960
- // A key never undoes a merge. Hand back where the person does.
961
- const detail = await api.get(`/api/workspace-drafts/${id}`).catch(() => null);
962
- const url = detail ? mergeUndoLink(cfg.serverUrl, detail) : null;
963
- throw new CliError("A person undoes a merge, in the browser: Undo on the merge row in History", EXIT_CODES.PERMISSION, url
964
- ? `Send this link to the person who approved it: ${url}`
965
- : "Ask the person who approved it: Undo is on the merge row in History, in the browser", { reason: "human_undo_required", draftId: id, url });
966
- });
967
- if (cfg.quiet) {
968
- console.log(result.draftId);
969
- return;
970
- }
971
- if (cfg.json) {
972
- outputJson(result);
973
- return;
974
- }
975
- console.log(`Undone: ${result.notesReturned} notes and ${result.canvasesReturned} canvases are back in the draft, ${result.editsReverted} shared note${result.editsReverted === 1 ? "" : "s"} restored. The draft is open again.`);
976
- console.log(`Resume it with: cnotes draft checkout ${result.draftId}`);
977
- }
978
- catch (error) {
979
- handleError(error, cfg.json);
980
- }
981
- });
982
946
  draft
983
947
  .command("dismiss")
984
948
  .description("Close the draft without merging; nothing in it, including proposed edits, reaches the shared workspace")
@@ -1104,4 +1068,3 @@ Examples:
1104
1068
  }
1105
1069
  });
1106
1070
  }
1107
- //# sourceMappingURL=draft.js.map
@@ -208,4 +208,3 @@ Examples:
208
208
  await setStatus(id, status, opts.note);
209
209
  });
210
210
  }
211
- //# sourceMappingURL=feedback.js.map
@@ -363,4 +363,3 @@ Examples:
363
363
  }
364
364
  });
365
365
  }
366
- //# sourceMappingURL=files.js.map
@@ -174,4 +174,3 @@ Examples:
174
174
  }
175
175
  });
176
176
  }
177
- //# sourceMappingURL=focus.js.map
@@ -157,4 +157,3 @@ Examples:
157
157
  }
158
158
  });
159
159
  }
160
- //# sourceMappingURL=goals.js.map
@@ -1,4 +1,3 @@
1
- import { confirm, select } from "@inquirer/prompts";
2
1
  import { spawnSync } from "child_process";
3
2
  import { loadConfig, getServerConfig, setWorkspaceId, } from "../lib/auth-store.js";
4
3
  import { ApiClient } from "../lib/api-client.js";
@@ -256,6 +255,7 @@ async function runInit(program, nonInteractive) {
256
255
  // don't need MCP. Claude Desktop has no skill mechanism — MCP is how it reaches
257
256
  // CreatorNotes. Codex users who still want MCP can run `cnotes mcp setup-codex`.
258
257
  console.log();
258
+ const { select } = await import("@inquirer/prompts");
259
259
  const mcpChoice = await select({
260
260
  message: "Set up the MCP server for Claude Desktop?",
261
261
  choices: [
@@ -414,6 +414,7 @@ async function maybeInstallSkill() {
414
414
  return;
415
415
  const labels = targets.map(skillTargetLabel).join(" and ");
416
416
  console.log();
417
+ const { confirm } = await import("@inquirer/prompts");
417
418
  const wantSkill = await confirm({
418
419
  message: `Install the ${labels} skill so your agent knows how to use cnotes?`,
419
420
  default: true,
@@ -451,6 +452,7 @@ async function maybeInstallSessionHook(installedGlobally) {
451
452
  if (isClaudeSessionHookInstalled())
452
453
  return; // already set up — no prompt
453
454
  console.log();
455
+ const { confirm } = await import("@inquirer/prompts");
454
456
  const want = await confirm({
455
457
  message: "Link Claude Code conversations to your agent runs? (adds a SessionStart hook to ~/.claude/settings.json)",
456
458
  default: true,
@@ -482,6 +484,7 @@ async function maybeInstallGlobally() {
482
484
  if (!isRunningUnderDlx())
483
485
  return true;
484
486
  console.log();
487
+ const { confirm } = await import("@inquirer/prompts");
485
488
  const wantGlobal = await confirm({
486
489
  message: "Install `cnotes` globally so future calls are faster?",
487
490
  default: true,
@@ -511,4 +514,3 @@ async function maybeInstallGlobally() {
511
514
  console.log(` ${dim("Or keep using")} ${cyan("npx @creator-notes/cnotes")}${dim(" — both work.")}`);
512
515
  return false;
513
516
  }
514
- //# sourceMappingURL=init.js.map
@@ -122,4 +122,3 @@ export function registerMcpCommands(program) {
122
122
  }
123
123
  });
124
124
  }
125
- //# sourceMappingURL=mcp.js.map
@@ -1,4 +1,3 @@
1
- import { select } from "@inquirer/prompts";
2
1
  import { ApiClient } from "../lib/api-client.js";
3
2
  import { resolveConfig } from "../lib/config.js";
4
3
  import { handleError, NotFoundError, ValidationError, EXIT_CODES } from "../lib/errors.js";
@@ -998,6 +997,9 @@ async function displayNotesList(notesList, limit, cfg, api, message) {
998
997
  return;
999
998
  }
1000
999
  if (process.stdout.isTTY) {
1000
+ // Loaded only on the interactive path: the prompt library costs ~20 ms at
1001
+ // startup and most `cnotes notes` calls come from agents with no TTY.
1002
+ const { select } = await import("@inquirer/prompts");
1001
1003
  const chosenIndex = await select({
1002
1004
  message: `${sliced.length} ${message}`,
1003
1005
  choices: sliced.map((n, i) => ({
@@ -1050,6 +1052,7 @@ async function viewNoteInteractive(api, workspaceId, displayId) {
1050
1052
  console.log("\n(no content)");
1051
1053
  return;
1052
1054
  }
1055
+ const { select } = await import("@inquirer/prompts");
1053
1056
  const viewMode = await select({
1054
1057
  message: "View:",
1055
1058
  choices: [
@@ -1206,4 +1209,3 @@ function printNote(note, version) {
1206
1209
  console.log(`\n${searchContent}`);
1207
1210
  }
1208
1211
  }
1209
- //# sourceMappingURL=notes.js.map
@@ -451,4 +451,3 @@ Examples:
451
451
  }
452
452
  });
453
453
  }
454
- //# sourceMappingURL=operations.js.map
@@ -314,4 +314,3 @@ function printReport(items, summary) {
314
314
  `${summary.needsAgent} waiting on your grade, ${summary.withIssues} with structural issues. ` +
315
315
  `Grading spends no credits.`);
316
316
  }
317
- //# sourceMappingURL=quality.js.map
@@ -236,4 +236,3 @@ closest match before coining a new one.
236
236
  }
237
237
  });
238
238
  }
239
- //# sourceMappingURL=relationships.js.map
@@ -553,4 +553,3 @@ Examples:
553
553
  }
554
554
  });
555
555
  }
556
- //# sourceMappingURL=review.js.map
@@ -85,4 +85,3 @@ Examples:
85
85
  }
86
86
  });
87
87
  }
88
- //# sourceMappingURL=schema.js.map
@@ -192,4 +192,3 @@ Examples:
192
192
  }
193
193
  });
194
194
  }
195
- //# sourceMappingURL=search.js.map
@@ -68,4 +68,3 @@ Examples:
68
68
  }
69
69
  });
70
70
  }
71
- //# sourceMappingURL=shared.js.map
@@ -110,4 +110,3 @@ Examples:
110
110
  }
111
111
  });
112
112
  }
113
- //# sourceMappingURL=skills.js.map
@@ -181,4 +181,3 @@ export function registerThemeCommands(program) {
181
181
  }
182
182
  });
183
183
  }
184
- //# sourceMappingURL=theme.js.map
@@ -161,4 +161,3 @@ async function runSearch(api, cfg, opts) {
161
161
  const how = data.meta.semantic ? "semantic + keyword" : "keyword";
162
162
  console.log(`\n${data.results.length} matching changes for "${opts.query}" (${how})`);
163
163
  }
164
- //# sourceMappingURL=timeline.js.map
@@ -191,4 +191,3 @@ Examples:
191
191
  }
192
192
  });
193
193
  }
194
- //# sourceMappingURL=types.js.map
@@ -84,4 +84,3 @@ Notes:
84
84
  }
85
85
  });
86
86
  }
87
- //# sourceMappingURL=upgrade.js.map
@@ -187,4 +187,3 @@ Examples:
187
187
  }
188
188
  });
189
189
  }
190
- //# sourceMappingURL=versions.js.map
@@ -1,4 +1,3 @@
1
- import { select } from "@inquirer/prompts";
2
1
  import { ApiClient } from "../lib/api-client.js";
3
2
  import { liveWorkspaceId, resolveBaseConfig } from "../lib/config.js";
4
3
  import { clearProposalById, loadConfig, setWorkspaceId } from "../lib/auth-store.js";
@@ -100,6 +99,7 @@ export async function fetchAndSelectWorkspace(serverUrl, token, currentWorkspace
100
99
  chosenName = String(list[0].name || "(unnamed)");
101
100
  }
102
101
  else {
102
+ const { select } = await import("@inquirer/prompts");
103
103
  chosenId = await select({
104
104
  message: "Select a workspace to activate:",
105
105
  choices: list.map((w) => {
@@ -480,4 +480,3 @@ Examples:
480
480
  }
481
481
  });
482
482
  }
483
- //# sourceMappingURL=workspace.js.map
@@ -11,4 +11,3 @@
11
11
  * source of truth.
12
12
  */
13
13
  export const EMBEDDED_BUILD = null;
14
- //# sourceMappingURL=embedded-build.js.map
@@ -72,4 +72,3 @@ export async function reconcileOpenAgentRuns(api, serverUrl, opts) {
72
72
  }
73
73
  return { runs: report, pruned };
74
74
  }
75
- //# sourceMappingURL=active-run.js.map
@@ -35,4 +35,3 @@ export function detectAgentClient(env = process.env, session = resolveAgentSessi
35
35
  }
36
36
  return "CLI";
37
37
  }
38
- //# sourceMappingURL=agent-client.js.map
@@ -28,4 +28,3 @@ export function resolveGradedBy(input) {
28
28
  return client.slice(0, 200);
29
29
  return "agent";
30
30
  }
31
- //# sourceMappingURL=agent-grade.js.map
@@ -1,4 +1,4 @@
1
- import { ApiError, asCliError, CliError, EXIT_CODES } from "./errors.js";
1
+ import { ApiError, asCliError, CliError, EXIT_CODES, isPermanentNetworkError, isRefusedBeforeSend } from "./errors.js";
2
2
  import { loadConfig, getActiveAgentRunId, getServerConfig } from "./auth-store.js";
3
3
  import { detectAgentClient } from "./agent-client.js";
4
4
  const MAX_RETRIES = 3;
@@ -122,8 +122,9 @@ export class ApiClient {
122
122
  }
123
123
  /**
124
124
  * Execute a fetch with retry for 5xx and 429 errors.
125
- * Retries up to 3 times with exponential backoff (1s, 2s, 4s).
126
- * Never retries 4xx client errors (except 429).
125
+ * Up to 3 attempts with exponential backoff (1s, 2s). Never retries 4xx
126
+ * client errors (except 429). Writes are not replayed after a 5xx or a
127
+ * dropped connection, because the first attempt may have committed.
127
128
  */
128
129
  async fetchWithRetry(url, init,
129
130
  // Typed off RequestInit rather than the BodyInit global: BodyInit is not
@@ -132,6 +133,11 @@ export class ApiClient {
132
133
  // standalone (cold/CI) build of the CLI fails on it.
133
134
  rebuildBody) {
134
135
  let lastError;
136
+ // A write that reached the server may have committed before the error, so
137
+ // replaying it can create a second note, version or canvas element. Writes
138
+ // retry only when the server says it did nothing (429) or the connection
139
+ // was refused before anything was sent.
140
+ const replaySafe = !init.method || init.method === "GET" || init.method === "HEAD";
135
141
  for (let attempt = 0; attempt < MAX_RETRIES; attempt++) {
136
142
  try {
137
143
  // Rebuild body on retries to avoid sending a consumed stream
@@ -139,7 +145,7 @@ export class ApiClient {
139
145
  init = { ...init, body: rebuildBody() };
140
146
  }
141
147
  const res = await fetch(url, init);
142
- if (res.ok || !isRetryable(res.status)) {
148
+ if (res.ok || !isRetryable(res.status) || (!replaySafe && res.status !== 429)) {
143
149
  return res;
144
150
  }
145
151
  // Retryable server error — wait and retry
@@ -156,6 +162,12 @@ export class ApiClient {
156
162
  catch (error) {
157
163
  // Network error (ECONNREFUSED, DNS failure, timeout, etc.)
158
164
  lastError = error instanceof Error ? error : new Error(String(error));
165
+ // A host that does not resolve or refuses the connection will not
166
+ // start answering during a 1 s backoff; fail now instead of in 3 s.
167
+ if (isPermanentNetworkError(error))
168
+ break;
169
+ if (!replaySafe && !isRefusedBeforeSend(error))
170
+ break;
159
171
  if (attempt < MAX_RETRIES - 1) {
160
172
  const delayMs = RETRY_BASE_MS * Math.pow(2, attempt);
161
173
  await sleep(delayMs);
@@ -375,4 +387,3 @@ export class ApiClient {
375
387
  }
376
388
  }
377
389
  }
378
- //# sourceMappingURL=api-client.js.map
@@ -361,4 +361,3 @@ export function getActiveAgentRunId(config, serverUrl) {
361
361
  }
362
362
  return null;
363
363
  }
364
- //# sourceMappingURL=auth-store.js.map
@@ -43,4 +43,3 @@ export function blockedWorkspaceNotes(rows, serverUrl) {
43
43
  }
44
44
  return lines;
45
45
  }
46
- //# sourceMappingURL=billing-block.js.map
package/dist/lib/brand.js CHANGED
@@ -32,4 +32,3 @@ export const BRAND = {
32
32
  /** Source repo, owner/name form. */
33
33
  repo: "creatornotes/pm-notes",
34
34
  };
35
- //# sourceMappingURL=brand.js.map
@@ -149,4 +149,3 @@ export async function buildSchema(api, workspaceId) {
149
149
  ...STATIC_SCHEMA,
150
150
  };
151
151
  }
152
- //# sourceMappingURL=build-schema.js.map
@@ -110,4 +110,3 @@ export function normalizeDoneWhen(doneWhen) {
110
110
  .replace(/[\s.!?]+$/, "")
111
111
  .trim();
112
112
  }
113
- //# sourceMappingURL=canvas-goal.js.map
@@ -152,4 +152,3 @@ export function resolveAnchor(items, near) {
152
152
  const hit = items.find((i) => i.ref === key || i.id === key || i.ref.toUpperCase() === key.toUpperCase());
153
153
  return hit ? { x: hit.x, y: hit.y, width: hit.width, height: hit.height } : null;
154
154
  }
155
- //# sourceMappingURL=canvas-layout.js.map
@@ -51,4 +51,3 @@ export function commentsListPath(opts) {
51
51
  }
52
52
  return `${canvasActionPath(opts.canvasId, opts.workspaceId)}&view=comments&status=${opts.status}${received}`;
53
53
  }
54
- //# sourceMappingURL=canvas-paths.js.map
@@ -203,4 +203,3 @@ function readSessionFile(now, cwd) {
203
203
  }
204
204
  return null;
205
205
  }
206
- //# sourceMappingURL=claude-session.js.map
@@ -125,4 +125,3 @@ export function resolveBaseConfig(opts) {
125
125
  ...resolveOutput(opts),
126
126
  };
127
127
  }
128
- //# sourceMappingURL=config.js.map
@@ -7,4 +7,3 @@
7
7
  * surfaces quote. Keep the skill's copy in step with it.
8
8
  */
9
9
  export const DECISION_CARD_RULE = "Anything settled in conversation that shapes what we build or say publicly gets its own Decision card, citing the cards it depends on (typed links such as depends-on / grounded-in). If something is stated as decided but no Decision card exists, say so and create one.";
10
- //# sourceMappingURL=decision-citation.js.map
@@ -9,4 +9,3 @@
9
9
  * hand-rolling its own copy of the grammar.
10
10
  */
11
11
  export const DISPLAY_ID_CORE = String.raw `[A-Z][A-Z0-9-]*-\d[0-9A-Z]*`;
12
- //# sourceMappingURL=display-id.js.map
@@ -75,4 +75,3 @@ export function resolveProposalHandle(drafts, handle, activeParentId) {
75
75
  elsewhere,
76
76
  };
77
77
  }
78
- //# sourceMappingURL=draft-ref.js.map
@@ -675,4 +675,3 @@ export function statusLines({ serverUrl, detail, checks, edits, activeWorkspaceI
675
675
  lines.push("", ...footer);
676
676
  return lines;
677
677
  }
678
- //# sourceMappingURL=draft-view.js.map
@@ -229,6 +229,36 @@ function extractErrorCode(err) {
229
229
  }
230
230
  return undefined;
231
231
  }
232
+ /**
233
+ * Transport failures that will not heal within a retry's backoff: the host
234
+ * does not resolve, nothing is listening, the URL is malformed, or the TLS
235
+ * handshake is refused. Retrying these only turns a 200 ms failure into a
236
+ * 3 s one, which is the first thing an agent hits with a stale server URL.
237
+ * Resets, timeouts and resolver hiccups stay retryable.
238
+ */
239
+ const PERMANENT_NETWORK_CODES = new Set([
240
+ "ENOTFOUND",
241
+ "ECONNREFUSED",
242
+ "EAI_FAIL",
243
+ "ERR_INVALID_URL",
244
+ "EHOSTUNREACH",
245
+ "ENETUNREACH",
246
+ ]);
247
+ export function isPermanentNetworkError(err) {
248
+ const code = extractErrorCode(err);
249
+ if (!code)
250
+ return false;
251
+ return PERMANENT_NETWORK_CODES.has(code) || isTlsCode(code);
252
+ }
253
+ /**
254
+ * A transient failure that happened before any byte of the request reached
255
+ * the server (a DNS lookup that timed out), so even a write is safe to send
256
+ * again. A reset or timeout mid-request is not: the server may have
257
+ * committed the write.
258
+ */
259
+ export function isRefusedBeforeSend(err) {
260
+ return extractErrorCode(err) === "EAI_AGAIN";
261
+ }
232
262
  /**
233
263
  * True when an error means the request failed at the transport layer rather
234
264
  * than returning an HTTP status. Node fetch raises `TypeError: fetch failed`
@@ -320,14 +350,16 @@ function hintForStatus(status, message, resource) {
320
350
  }
321
351
  if (r === "edit")
322
352
  return "Run `cnotes draft edits` to see this draft's proposals.";
323
- if (r === "workspace" || (!r && /workspace/i.test(message))) {
324
- return "Run `cnotes workspace list` to see available workspaces.";
353
+ // Specific resources first: a message such as "Canvas not found in this
354
+ // workspace" must not send the agent to `workspace list`.
355
+ if (r === "canvas" || (!r && /canvas/i.test(message))) {
356
+ return "Run `cnotes canvas list` to see available canvases.";
325
357
  }
326
- if (r === "note" || (!r && /note/i.test(message))) {
358
+ if (r === "note" || r.endsWith(" note") || (!r && /\bnote\b/i.test(message))) {
327
359
  return "Run `cnotes notes list` to see valid display IDs.";
328
360
  }
329
- if (r === "canvas" || (!r && /canvas/i.test(message))) {
330
- return "Run `cnotes canvas list` to see available canvases.";
361
+ if (r === "workspace" || (!r && /workspace/i.test(message))) {
362
+ return "Run `cnotes workspace list` to see available workspaces.";
331
363
  }
332
364
  return "Run `cnotes schema` to see valid resource identifiers.";
333
365
  }
@@ -458,4 +490,3 @@ export function handleError(error, json) {
458
490
  }
459
491
  process.exit(EXIT_CODES.GENERIC);
460
492
  }
461
- //# sourceMappingURL=errors.js.map
@@ -161,4 +161,3 @@ export function projectExpandPayload(payload, fields) {
161
161
  linked: payload.linked.map((item) => ({ ...item, note: pick(item.note) })),
162
162
  };
163
163
  }
164
- //# sourceMappingURL=expand-notes.js.map
@@ -64,4 +64,3 @@ export function parseDuration(input) {
64
64
  throw new ValidationError("--duration must be positive");
65
65
  return Math.round(ms);
66
66
  }
67
- //# sourceMappingURL=focus-time.js.map
@@ -29,4 +29,3 @@ export function parseJsonOption(raw, flag, example) {
29
29
  throw new ValidationError(`${flag} is not valid JSON: ${reason}`, `Example: ${flag} '${example}'`);
30
30
  }
31
31
  }
32
- //# sourceMappingURL=fs-utils.js.map
@@ -138,4 +138,3 @@ export function deriveGoalTree(rootId, nodes) {
138
138
  counts[v.state]++;
139
139
  return { root: rootId, nodes: views, frontier, warnings: [...new Set(warnings)], counts };
140
140
  }
141
- //# sourceMappingURL=goal-tree.js.map
@@ -24,4 +24,3 @@ export function reportHeadlineWarnings(warnings, where) {
24
24
  `The platform rewrote the headline when it could. The body is unchanged.\n` +
25
25
  `${lines.join("\n")}\n`);
26
26
  }
27
- //# sourceMappingURL=headline-warnings.js.map
@@ -165,4 +165,3 @@ export function installClaudeSessionHook(command = SESSION_HOOK_COMMAND) {
165
165
  renameSync(tmpPath, configPath);
166
166
  return { configPath, status: existed ? "installed" : "created", backedUp };
167
167
  }
168
- //# sourceMappingURL=install-hook.js.map
@@ -145,4 +145,3 @@ function installCodex(cfg) {
145
145
  export function installMcpConfig(target, cfg) {
146
146
  return target === "claude" ? installClaude(cfg) : installCodex(cfg);
147
147
  }
148
- //# sourceMappingURL=install-mcp.js.map