@creator-notes/cnotes 0.103.5 → 0.104.1

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 (325) 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 +52 -4
  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 +7 -4
  19. package/dist/commands/operations.js +2 -3
  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 +3 -3
  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 +2 -3
  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 +105 -9
  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 +20 -18
  81. package/dist/program.js +0 -1
  82. package/package.json +1 -1
  83. package/skills/cnotes/references/canvas.md +7 -0
  84. package/skills/cnotes/references/notes.md +7 -0
  85. package/skills/cnotes/references/operations.md +6 -2
  86. package/dist/cn.d.ts +0 -3
  87. package/dist/cn.d.ts.map +0 -1
  88. package/dist/cn.js.map +0 -1
  89. package/dist/commands/auth-keys.d.ts +0 -3
  90. package/dist/commands/auth-keys.d.ts.map +0 -1
  91. package/dist/commands/auth-keys.js.map +0 -1
  92. package/dist/commands/auth.d.ts +0 -11
  93. package/dist/commands/auth.d.ts.map +0 -1
  94. package/dist/commands/auth.js.map +0 -1
  95. package/dist/commands/brief.d.ts +0 -9
  96. package/dist/commands/brief.d.ts.map +0 -1
  97. package/dist/commands/brief.js.map +0 -1
  98. package/dist/commands/canvas-milestone.d.ts +0 -14
  99. package/dist/commands/canvas-milestone.d.ts.map +0 -1
  100. package/dist/commands/canvas-milestone.js.map +0 -1
  101. package/dist/commands/canvas.d.ts +0 -20
  102. package/dist/commands/canvas.d.ts.map +0 -1
  103. package/dist/commands/canvas.js.map +0 -1
  104. package/dist/commands/claude-hook.d.ts +0 -28
  105. package/dist/commands/claude-hook.d.ts.map +0 -1
  106. package/dist/commands/claude-hook.js.map +0 -1
  107. package/dist/commands/config.d.ts +0 -3
  108. package/dist/commands/config.d.ts.map +0 -1
  109. package/dist/commands/config.js.map +0 -1
  110. package/dist/commands/deps.d.ts +0 -94
  111. package/dist/commands/deps.d.ts.map +0 -1
  112. package/dist/commands/deps.js.map +0 -1
  113. package/dist/commands/draft.d.ts +0 -3
  114. package/dist/commands/draft.d.ts.map +0 -1
  115. package/dist/commands/draft.js.map +0 -1
  116. package/dist/commands/feedback.d.ts +0 -3
  117. package/dist/commands/feedback.d.ts.map +0 -1
  118. package/dist/commands/feedback.js.map +0 -1
  119. package/dist/commands/files.d.ts +0 -3
  120. package/dist/commands/files.d.ts.map +0 -1
  121. package/dist/commands/files.js.map +0 -1
  122. package/dist/commands/focus.d.ts +0 -3
  123. package/dist/commands/focus.d.ts.map +0 -1
  124. package/dist/commands/focus.js.map +0 -1
  125. package/dist/commands/goals.d.ts +0 -3
  126. package/dist/commands/goals.d.ts.map +0 -1
  127. package/dist/commands/goals.js.map +0 -1
  128. package/dist/commands/init.d.ts +0 -3
  129. package/dist/commands/init.d.ts.map +0 -1
  130. package/dist/commands/init.js.map +0 -1
  131. package/dist/commands/mcp.d.ts +0 -15
  132. package/dist/commands/mcp.d.ts.map +0 -1
  133. package/dist/commands/mcp.js.map +0 -1
  134. package/dist/commands/notes.d.ts +0 -3
  135. package/dist/commands/notes.d.ts.map +0 -1
  136. package/dist/commands/notes.js.map +0 -1
  137. package/dist/commands/operations.d.ts +0 -27
  138. package/dist/commands/operations.d.ts.map +0 -1
  139. package/dist/commands/operations.js.map +0 -1
  140. package/dist/commands/quality.d.ts +0 -14
  141. package/dist/commands/quality.d.ts.map +0 -1
  142. package/dist/commands/quality.js.map +0 -1
  143. package/dist/commands/relationships.d.ts +0 -8
  144. package/dist/commands/relationships.d.ts.map +0 -1
  145. package/dist/commands/relationships.js.map +0 -1
  146. package/dist/commands/review.d.ts +0 -19
  147. package/dist/commands/review.d.ts.map +0 -1
  148. package/dist/commands/review.js.map +0 -1
  149. package/dist/commands/schema.d.ts +0 -12
  150. package/dist/commands/schema.d.ts.map +0 -1
  151. package/dist/commands/schema.js.map +0 -1
  152. package/dist/commands/search.d.ts +0 -3
  153. package/dist/commands/search.d.ts.map +0 -1
  154. package/dist/commands/search.js.map +0 -1
  155. package/dist/commands/shared.d.ts +0 -3
  156. package/dist/commands/shared.d.ts.map +0 -1
  157. package/dist/commands/shared.js.map +0 -1
  158. package/dist/commands/skills.d.ts +0 -3
  159. package/dist/commands/skills.d.ts.map +0 -1
  160. package/dist/commands/skills.js.map +0 -1
  161. package/dist/commands/theme.d.ts +0 -3
  162. package/dist/commands/theme.d.ts.map +0 -1
  163. package/dist/commands/theme.js.map +0 -1
  164. package/dist/commands/timeline.d.ts +0 -4
  165. package/dist/commands/timeline.d.ts.map +0 -1
  166. package/dist/commands/timeline.js.map +0 -1
  167. package/dist/commands/types.d.ts +0 -3
  168. package/dist/commands/types.d.ts.map +0 -1
  169. package/dist/commands/types.js.map +0 -1
  170. package/dist/commands/upgrade.d.ts +0 -13
  171. package/dist/commands/upgrade.d.ts.map +0 -1
  172. package/dist/commands/upgrade.js.map +0 -1
  173. package/dist/commands/versions.d.ts +0 -3
  174. package/dist/commands/versions.d.ts.map +0 -1
  175. package/dist/commands/versions.js.map +0 -1
  176. package/dist/commands/workspace.d.ts +0 -13
  177. package/dist/commands/workspace.d.ts.map +0 -1
  178. package/dist/commands/workspace.js.map +0 -1
  179. package/dist/generated/embedded-build.d.ts +0 -22
  180. package/dist/generated/embedded-build.d.ts.map +0 -1
  181. package/dist/generated/embedded-build.js.map +0 -1
  182. package/dist/lib/active-run.d.ts +0 -62
  183. package/dist/lib/active-run.d.ts.map +0 -1
  184. package/dist/lib/active-run.js.map +0 -1
  185. package/dist/lib/agent-client.d.ts +0 -12
  186. package/dist/lib/agent-client.d.ts.map +0 -1
  187. package/dist/lib/agent-client.js.map +0 -1
  188. package/dist/lib/agent-grade.d.ts +0 -24
  189. package/dist/lib/agent-grade.d.ts.map +0 -1
  190. package/dist/lib/agent-grade.js.map +0 -1
  191. package/dist/lib/api-client.d.ts +0 -124
  192. package/dist/lib/api-client.d.ts.map +0 -1
  193. package/dist/lib/api-client.js.map +0 -1
  194. package/dist/lib/auth-store.d.ts +0 -177
  195. package/dist/lib/auth-store.d.ts.map +0 -1
  196. package/dist/lib/auth-store.js.map +0 -1
  197. package/dist/lib/billing-block.d.ts +0 -12
  198. package/dist/lib/billing-block.d.ts.map +0 -1
  199. package/dist/lib/billing-block.js.map +0 -1
  200. package/dist/lib/brand.d.ts +0 -35
  201. package/dist/lib/brand.d.ts.map +0 -1
  202. package/dist/lib/brand.js.map +0 -1
  203. package/dist/lib/build-schema.d.ts +0 -109
  204. package/dist/lib/build-schema.d.ts.map +0 -1
  205. package/dist/lib/build-schema.js.map +0 -1
  206. package/dist/lib/canvas-goal.d.ts +0 -59
  207. package/dist/lib/canvas-goal.d.ts.map +0 -1
  208. package/dist/lib/canvas-goal.js.map +0 -1
  209. package/dist/lib/canvas-layout.d.ts +0 -77
  210. package/dist/lib/canvas-layout.d.ts.map +0 -1
  211. package/dist/lib/canvas-layout.js.map +0 -1
  212. package/dist/lib/canvas-paths.d.ts +0 -31
  213. package/dist/lib/canvas-paths.d.ts.map +0 -1
  214. package/dist/lib/canvas-paths.js.map +0 -1
  215. package/dist/lib/claude-session.d.ts +0 -81
  216. package/dist/lib/claude-session.d.ts.map +0 -1
  217. package/dist/lib/claude-session.js.map +0 -1
  218. package/dist/lib/config.d.ts +0 -76
  219. package/dist/lib/config.d.ts.map +0 -1
  220. package/dist/lib/config.js.map +0 -1
  221. package/dist/lib/decision-citation.d.ts +0 -10
  222. package/dist/lib/decision-citation.d.ts.map +0 -1
  223. package/dist/lib/decision-citation.js.map +0 -1
  224. package/dist/lib/display-id.d.ts +0 -12
  225. package/dist/lib/display-id.d.ts.map +0 -1
  226. package/dist/lib/display-id.js.map +0 -1
  227. package/dist/lib/draft-ref.d.ts +0 -61
  228. package/dist/lib/draft-ref.d.ts.map +0 -1
  229. package/dist/lib/draft-ref.js.map +0 -1
  230. package/dist/lib/draft-view.d.ts +0 -566
  231. package/dist/lib/draft-view.d.ts.map +0 -1
  232. package/dist/lib/draft-view.js.map +0 -1
  233. package/dist/lib/errors.d.ts +0 -105
  234. package/dist/lib/errors.d.ts.map +0 -1
  235. package/dist/lib/errors.js.map +0 -1
  236. package/dist/lib/expand-notes.d.ts +0 -79
  237. package/dist/lib/expand-notes.d.ts.map +0 -1
  238. package/dist/lib/expand-notes.js.map +0 -1
  239. package/dist/lib/focus-time.d.ts +0 -16
  240. package/dist/lib/focus-time.d.ts.map +0 -1
  241. package/dist/lib/focus-time.js.map +0 -1
  242. package/dist/lib/fs-utils.d.ts +0 -10
  243. package/dist/lib/fs-utils.d.ts.map +0 -1
  244. package/dist/lib/fs-utils.js.map +0 -1
  245. package/dist/lib/goal-tree.d.ts +0 -71
  246. package/dist/lib/goal-tree.d.ts.map +0 -1
  247. package/dist/lib/goal-tree.js.map +0 -1
  248. package/dist/lib/headline-warnings.d.ts +0 -8
  249. package/dist/lib/headline-warnings.d.ts.map +0 -1
  250. package/dist/lib/headline-warnings.js.map +0 -1
  251. package/dist/lib/install-hook.d.ts +0 -86
  252. package/dist/lib/install-hook.d.ts.map +0 -1
  253. package/dist/lib/install-hook.js.map +0 -1
  254. package/dist/lib/install-mcp.d.ts +0 -21
  255. package/dist/lib/install-mcp.d.ts.map +0 -1
  256. package/dist/lib/install-mcp.js.map +0 -1
  257. package/dist/lib/install-skill.d.ts +0 -84
  258. package/dist/lib/install-skill.d.ts.map +0 -1
  259. package/dist/lib/install-skill.js.map +0 -1
  260. package/dist/lib/mcp-local-file.d.ts +0 -11
  261. package/dist/lib/mcp-local-file.d.ts.map +0 -1
  262. package/dist/lib/mcp-local-file.js.map +0 -1
  263. package/dist/lib/mention-lint.d.ts +0 -159
  264. package/dist/lib/mention-lint.d.ts.map +0 -1
  265. package/dist/lib/mention-lint.js.map +0 -1
  266. package/dist/lib/milestone-message.d.ts +0 -37
  267. package/dist/lib/milestone-message.d.ts.map +0 -1
  268. package/dist/lib/milestone-message.js.map +0 -1
  269. package/dist/lib/output.d.ts +0 -57
  270. package/dist/lib/output.d.ts.map +0 -1
  271. package/dist/lib/output.js.map +0 -1
  272. package/dist/lib/quality.d.ts +0 -142
  273. package/dist/lib/quality.d.ts.map +0 -1
  274. package/dist/lib/quality.js.map +0 -1
  275. package/dist/lib/resolve-note.d.ts +0 -7
  276. package/dist/lib/resolve-note.d.ts.map +0 -1
  277. package/dist/lib/resolve-note.js.map +0 -1
  278. package/dist/lib/review-helpers.d.ts +0 -37
  279. package/dist/lib/review-helpers.d.ts.map +0 -1
  280. package/dist/lib/review-helpers.js.map +0 -1
  281. package/dist/lib/rubric-sections.d.ts +0 -29
  282. package/dist/lib/rubric-sections.d.ts.map +0 -1
  283. package/dist/lib/rubric-sections.js.map +0 -1
  284. package/dist/lib/rubrics.d.ts +0 -60
  285. package/dist/lib/rubrics.d.ts.map +0 -1
  286. package/dist/lib/rubrics.js.map +0 -1
  287. package/dist/lib/runtime.d.ts +0 -40
  288. package/dist/lib/runtime.d.ts.map +0 -1
  289. package/dist/lib/runtime.js.map +0 -1
  290. package/dist/lib/server-url.d.ts +0 -33
  291. package/dist/lib/server-url.d.ts.map +0 -1
  292. package/dist/lib/server-url.js.map +0 -1
  293. package/dist/lib/session-brief.d.ts +0 -60
  294. package/dist/lib/session-brief.d.ts.map +0 -1
  295. package/dist/lib/session-brief.js.map +0 -1
  296. package/dist/lib/share-link.d.ts +0 -19
  297. package/dist/lib/share-link.d.ts.map +0 -1
  298. package/dist/lib/share-link.js.map +0 -1
  299. package/dist/lib/shared-rows.d.ts +0 -46
  300. package/dist/lib/shared-rows.d.ts.map +0 -1
  301. package/dist/lib/shared-rows.js.map +0 -1
  302. package/dist/lib/stdin.d.ts +0 -5
  303. package/dist/lib/stdin.d.ts.map +0 -1
  304. package/dist/lib/stdin.js.map +0 -1
  305. package/dist/lib/storage-id.d.ts +0 -12
  306. package/dist/lib/storage-id.d.ts.map +0 -1
  307. package/dist/lib/storage-id.js.map +0 -1
  308. package/dist/lib/style.d.ts +0 -10
  309. package/dist/lib/style.d.ts.map +0 -1
  310. package/dist/lib/style.js.map +0 -1
  311. package/dist/lib/superseded-by.d.ts +0 -20
  312. package/dist/lib/superseded-by.d.ts.map +0 -1
  313. package/dist/lib/superseded-by.js.map +0 -1
  314. package/dist/lib/themes.d.ts +0 -44
  315. package/dist/lib/themes.d.ts.map +0 -1
  316. package/dist/lib/themes.js.map +0 -1
  317. package/dist/lib/urls.d.ts +0 -44
  318. package/dist/lib/urls.d.ts.map +0 -1
  319. package/dist/lib/urls.js.map +0 -1
  320. package/dist/mcp-server.d.ts +0 -3
  321. package/dist/mcp-server.d.ts.map +0 -1
  322. package/dist/mcp-server.js.map +0 -1
  323. package/dist/program.d.ts +0 -13
  324. package/dist/program.d.ts.map +0 -1
  325. package/dist/program.js.map +0 -1
@@ -1,124 +0,0 @@
1
- export interface ActiveAgentRun {
2
- agentRunId: string;
3
- /** The run's `auto.before_agent` snapshot. Canvas runs only. */
4
- beforeSnapshotId?: string;
5
- }
6
- /**
7
- * Resolve the agent-run to attach to writes against `serverUrl`, in precedence
8
- * order:
9
- *
10
- * 1. `CNOTES_AGENT_RUN_ID` env var (explicit override, wins everything).
11
- * `canvas agent-run wrap` sets this for its subprocess, so a wrapped run
12
- * correctly beats any outer persisted run.
13
- * 2. The active run persisted on this server's config, written by
14
- * `cnotes operations begin` / `cnotes canvas agent-run begin` and cleared
15
- * by their matching `end`.
16
- *
17
- * The run id and its before-snapshot resolve together, from ONE source. They
18
- * are a pair — the snapshot is the state of the canvas at that run's begin — so
19
- * mixing them across sources would hand a wrapped run the *outer* run's
20
- * before-snapshot. The server drops a snapshot that belongs to another canvas,
21
- * so the run would quietly lose its revert point rather than fail loudly.
22
- *
23
- * Exported so the bracketing commands resolve the run the same way the client
24
- * attaches it — `canvas agent-run end` closing a run the client would not have
25
- * attached to is exactly the desync that let agent edits record as human ones.
26
- */
27
- export declare function resolveActiveAgentRun(serverUrl: string): ActiveAgentRun | undefined;
28
- /**
29
- * The header that tells the server which workspace the caller is working in.
30
- * From inside an open draft, the server refuses a live write to a SHARED note
31
- * (409 `shared_write_from_draft`, pointing at `cnotes draft propose`), so the
32
- * draft's work reaches the shared workspace only when a person approves it.
33
- * Advisory: it can only make a write stricter, never wider.
34
- */
35
- export declare const WORKSPACE_HEADER = "X-Cnotes-Workspace";
36
- export declare class ApiClient {
37
- private serverUrl;
38
- private token;
39
- private workspaceId?;
40
- /**
41
- * @param workspaceId The workspace the command works in (`-w`, then
42
- * CNOTES_WORKSPACE, then the saved active workspace; see resolveConfig).
43
- * Sent as {@link WORKSPACE_HEADER} on every request. When omitted, the
44
- * client falls back to CNOTES_WORKSPACE, then the saved workspace for this
45
- * server, so no request leaves without it while one is known.
46
- */
47
- constructor(serverUrl: string, token: string, workspaceId?: string | undefined);
48
- /** The working workspace sent as {@link WORKSPACE_HEADER}, if one is known. */
49
- private workingWorkspace;
50
- /**
51
- * Build request headers, attaching the active agent-run when one is
52
- * open (see {@link resolveActiveAgentRun} for the resolution order).
53
- *
54
- * The config fallback exists because env vars don't survive across
55
- * separate shell processes (or stateless tool calls — e.g. an agent
56
- * running `cnotes` from disjoint Bash invocations). Persisting the active
57
- * run on disk lets every subsequent cnotes write auto-attach, no matter
58
- * which shell it runs in, until the run is explicitly ended.
59
- *
60
- * X-Agent-Before-Snapshot-Id carries the begin-checkpoint's snapshot
61
- * ID so the first mutation under the run can back-link
62
- * operation.checkpointBeforeId at open time — no header, no revert point.
63
- * The server validates the snapshot belongs to the target canvas before
64
- * stamping it, and ignores it entirely without a run id.
65
- *
66
- * Prompt + rationale are deliberately NOT carried per-request — they
67
- * were already persisted on the operation row at begin time, and
68
- * resending them on every mutation would create a spoofing surface (a
69
- * leaked runId could overwrite stored intent metadata).
70
- *
71
- * @internal exposed (not private) so tests can assert the run actually
72
- * rides on the request — the header being silently absent is the bug.
73
- */
74
- buildHeaders(): Record<string, string>;
75
- /**
76
- * Execute a fetch with retry for 5xx and 429 errors.
77
- * Retries up to 3 times with exponential backoff (1s, 2s, 4s).
78
- * Never retries 4xx client errors (except 429).
79
- */
80
- private fetchWithRetry;
81
- /**
82
- * Read an error-response body for ApiError. Non-JSON bodies (an HTML 502
83
- * from a proxy, a plaintext 413 from a body-size limit) are preserved as a
84
- * text snippet instead of collapsing to `{}` — "API error: HTTP 502" with
85
- * no body is not actionable; the first line of the body usually is.
86
- */
87
- private errorBody;
88
- get<T = unknown>(path: string, params?: Record<string, string | undefined>, onHeaders?: (headers: Headers) => void): Promise<T>;
89
- post<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
90
- postFormData<T = unknown>(path: string, buildFormData: () => FormData): Promise<T>;
91
- put<T = unknown>(path: string, body?: Record<string, unknown>): Promise<T>;
92
- patch<T = unknown>(path: string, body?: Record<string, unknown>, params?: Record<string, string | undefined>): Promise<T>;
93
- delete<T = unknown>(path: string, body?: unknown): Promise<T>;
94
- /**
95
- * Resolve an image (or any storage-backed asset) to a directly-fetchable
96
- * URL by asking the route where it redirects, WITHOUT downloading the bytes.
97
- * The bearer key authenticates the first hop; the returned URL is a signed,
98
- * public Convex storage URL the caller can fetch on its own.
99
- *
100
- * Throws ApiError on 401/403/404 (the route answers with an error JSON
101
- * instead of a redirect).
102
- */
103
- resolveRedirectUrl(path: string): Promise<string>;
104
- /**
105
- * Download raw bytes from a storage-backed route, following its redirect to
106
- * Convex storage. The Authorization header authenticates our route; fetch
107
- * drops it on the cross-origin hop to the (signed, public) storage URL.
108
- *
109
- * Throws ApiError on auth/not-found.
110
- */
111
- downloadBytes(path: string): Promise<{
112
- bytes: Buffer;
113
- contentType: string | null;
114
- }>;
115
- /**
116
- * Parse a success (2xx) response body as JSON. A non-JSON body here (an
117
- * HTML page from an intercepting proxy, a plaintext response from a
118
- * misrouted request) would otherwise escape as a raw SyntaxError with zero
119
- * context — name the request, the status, and show the head of the body
120
- * instead. Mirrors the errorBody() treatment of non-JSON error responses.
121
- */
122
- private parseJsonSafe;
123
- }
124
- //# sourceMappingURL=api-client.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"api-client.d.ts","sourceRoot":"","sources":["../../src/lib/api-client.ts"],"names":[],"mappings":"AAeA,MAAM,WAAW,cAAc;IAC7B,UAAU,EAAE,MAAM,CAAC;IACnB,gEAAgE;IAChE,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,wBAAgB,qBAAqB,CAAC,SAAS,EAAE,MAAM,GAAG,cAAc,GAAG,SAAS,CAcnF;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,uBAAuB,CAAC;AAErD,qBAAa,SAAS;IASlB,OAAO,CAAC,SAAS;IACjB,OAAO,CAAC,KAAK;IACb,OAAO,CAAC,WAAW,CAAC;IAVtB;;;;;;OAMG;gBAEO,SAAS,EAAE,MAAM,EACjB,KAAK,EAAE,MAAM,EACb,WAAW,C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AC,KAAK,CAAC,IAAI,CAAM,CAAC;QAC/B,CAAC;QAAC,MAAM,CAAC;YACP,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;YAC/D,MAAM,IAAI,QAAQ,CAChB,uCAAuC,GAAG,CAAC,GAAG,UAAU,GAAG,CAAC,MAAM,MAAM,OAAO,EAAE,EACjF,UAAU,CAAC,OAAO,EAClB,mKAAmK,CACpK,CAAC;QACJ,CAAC;IACH,CAAC;CACF"}
@@ -1,177 +0,0 @@
1
- export interface ServerConfig {
2
- token: string;
3
- email: string;
4
- workspaceId?: string;
5
- /**
6
- * Currently-open agent-run on this server, written by `cnotes operations
7
- * begin` / `cnotes canvas agent-run begin` and cleared by their matching
8
- * `end`. The api-client falls back to this when CNOTES_AGENT_RUN_ID env is
9
- * unset, so cnotes writes across separate shell processes (or stateless tool
10
- * calls) auto-attach to the active run. Env wins when set, for explicit
11
- * overrides.
12
- *
13
- * Both bracketing commands share this one slot on purpose: a request carries
14
- * exactly one X-Agent-Run-Id, so two concurrent "active" runs would be
15
- * ambiguous. `begin` refuses when this is already set (unless --force).
16
- *
17
- * This slot is only the IMPLICIT-attach default. It is not the record of
18
- * which runs this CLI has open — that is `agentRuns` below. A run opened
19
- * with `begin --detached` never touches this slot: its writes carry the run
20
- * id through CNOTES_AGENT_RUN_ID instead, so two agents sharing one config
21
- * (two bots on one machine) can each hold their own run without one
22
- * overwriting, or ending, the other's.
23
- */
24
- activeAgentRunId?: string;
25
- /** When activeAgentRunId was opened — used to surface helpful "started
26
- * Xm ago" context on the "already-active" warning at begin time. */
27
- activeAgentRunStartedAt?: number;
28
- /**
29
- * The `auto.before_agent` snapshot captured when a *canvas* agent-run was
30
- * opened. Rides on every subsequent write as X-Agent-Before-Snapshot-Id so
31
- * the run's first canvas mutation can back-link `checkpointBeforeId` onto its
32
- * operation row.
33
- *
34
- * Load-bearing, not decorative: the server only back-links this at the first
35
- * mutation (at begin time the operation row doesn't exist yet), and
36
- * getRevertContext returns null without it — so a run that never carries this
37
- * header cannot be reverted. Persisting it beside the run id is what makes
38
- * "Revert this run" work for callers that don't inherit an env var.
39
- *
40
- * Unset for `operations begin` runs: those are workspace-scoped and have no
41
- * canvas snapshot to carry.
42
- */
43
- activeAgentBeforeSnapshotId?: string;
44
- /**
45
- * Every agent-run this CLI config opened on this server and has not yet
46
- * ended, keyed by agentRunId — the active one AND any detached ones. This is
47
- * the ownership record `end` checks before closing a run: a run that is not
48
- * here was opened by someone else (another machine, another login), and
49
- * `end` refuses it unless told --force. The active pointer above is always
50
- * also a key here (except for configs written by older CLIs, which `end`
51
- * still honours).
52
- */
53
- agentRuns?: Record<string, OpenAgentRun>;
54
- /**
55
- * The proposal (draft) this CLI works in, keyed by the shared workspace it
56
- * lands in. While one is set, every command aimed at that workspace goes
57
- * into the proposal instead, whichever way the workspace was picked (saved,
58
- * CNOTES_WORKSPACE or -w): a proposal is something you work in, never your
59
- * workspace. CNOTES_PROPOSAL beats it per terminal. Set by `draft open` and
60
- * `draft checkout`, cleared by `draft leave` and `draft dismiss`.
61
- */
62
- proposals?: Record<string, ActiveProposal>;
63
- }
64
- /** One entry in {@link ServerConfig.proposals}. */
65
- export interface ActiveProposal {
66
- /** The draft's id: where the proposal's notes and canvases are stored. */
67
- draftId: string;
68
- /** "PROPOSAL-9", when the server named it. */
69
- handle?: string;
70
- name?: string;
71
- }
72
- /** One open run in {@link ServerConfig.agentRuns}. */
73
- export interface OpenAgentRun {
74
- startedAt: number;
75
- /** Canvas runs only — see {@link ServerConfig.activeAgentBeforeSnapshotId}. */
76
- beforeSnapshotId?: string;
77
- /** Canvas runs only: the canvas the run was opened on. */
78
- canvasId?: string;
79
- /**
80
- * Opened with --detached: never installed as the active pointer, so its
81
- * writes attach only through CNOTES_AGENT_RUN_ID.
82
- */
83
- detached?: boolean;
84
- }
85
- export interface CliConfig {
86
- version: 1;
87
- servers: Record<string, ServerConfig>;
88
- currentServer: string;
89
- }
90
- export declare function loadConfig(): CliConfig;
91
- export declare function saveConfig(config: CliConfig): void;
92
- export declare function getServerConfig(config: CliConfig, server?: string): ServerConfig | null;
93
- export declare function setServerConfig(config: CliConfig, serverUrl: string, serverConfig: ServerConfig): void;
94
- export declare function removeServerConfig(config: CliConfig, serverUrl: string): void;
95
- export declare function setCurrentServer(config: CliConfig, serverUrl: string): void;
96
- /**
97
- * Persist the active workspace for a server. Returns false (a no-op) when there
98
- * is no stored config entry for `serverUrl` — i.e. the token came from a flag or
99
- * env var against a server never logged into with `cnotes auth login`, so there
100
- * is nowhere on disk to record the selection. Callers that report activation
101
- * back to a caller should surface this instead of claiming success.
102
- */
103
- export declare function setWorkspaceId(config: CliConfig, serverUrl: string, workspaceId: string): boolean;
104
- /**
105
- * Work in `proposal` whenever a command aims at `sharedWorkspaceId`, or stop
106
- * (`null`). Same contract as setWorkspaceId: false when there is no config
107
- * entry to write to.
108
- */
109
- export declare function setActiveProposal(config: CliConfig, serverUrl: string, sharedWorkspaceId: string, proposal: ActiveProposal | null): boolean;
110
- /** Forget every saved proposal stored in `draftId` (it closed), whichever workspace it was saved under. */
111
- export declare function clearProposalById(config: CliConfig, serverUrl: string, draftId: string): boolean;
112
- /**
113
- * Mark a given agent-run as the active one for a server. Subsequent cnotes
114
- * writes against this server will carry X-Agent-Run-Id automatically —
115
- * plus X-Agent-Before-Snapshot-Id when `beforeSnapshotId` is given (canvas
116
- * runs), which is what makes the run revertable.
117
- *
118
- * Returns false (a no-op) when there is no stored config entry for `serverUrl`
119
- * — i.e. the token came from a flag or env var against a server never logged
120
- * into with `cnotes auth login`, so there is nowhere on disk to record the run.
121
- * Callers MUST surface this instead of claiming the run is active: silently
122
- * persisting nothing is exactly how bracketed agent writes end up recorded as
123
- * unattributed human edits. Same contract as setWorkspaceId above.
124
- */
125
- export declare function setActiveAgentRunId(config: CliConfig, serverUrl: string, agentRunId: string, startedAt: number, beforeSnapshotId?: string): boolean;
126
- /**
127
- * Record an open run WITHOUT making it the active one. This is what
128
- * `begin --detached` and `agent-run wrap` use: the run is tracked here (so
129
- * `end` recognises it as ours) but writes attach to it only through
130
- * CNOTES_AGENT_RUN_ID, never implicitly — so it can coexist with another
131
- * agent's active run on the same config.
132
- *
133
- * Returns false when there is no stored config entry for `serverUrl` (same
134
- * contract as setActiveAgentRunId): nothing on disk to record the run in.
135
- */
136
- export declare function registerAgentRun(config: CliConfig, serverUrl: string, agentRunId: string, run: OpenAgentRun): boolean;
137
- /**
138
- * Forget one open run after it was ended: drops it from the registry and, if
139
- * it was the active pointer, clears the pointer too. Any OTHER run — the
140
- * active one when a detached run ends, or a detached run when the active one
141
- * ends — is left exactly as it was. No-op when the run is unknown.
142
- */
143
- export declare function unregisterAgentRun(config: CliConfig, serverUrl: string, agentRunId: string): void;
144
- /**
145
- * Did this CLI config open `agentRunId` on `serverUrl`? The answer `end` uses
146
- * to refuse closing somebody else's run.
147
- *
148
- * - true: it is in the registry, or it is the active pointer (configs from
149
- * CLIs that predate the registry only have the pointer).
150
- * - false: there is a stored login for the server and the run is not ours.
151
- * - null: no stored login for the server at all (token came from --token /
152
- * CNOTES_TOKEN), so there is no record to check against. Callers
153
- * treat this as "cannot tell" rather than "not ours": the run id
154
- * can only have come from the caller's own `begin` output.
155
- */
156
- export declare function isOwnedAgentRun(config: CliConfig, serverUrl: string, agentRunId: string): boolean | null;
157
- /** Every run this CLI config has open on `serverUrl`, oldest first. */
158
- export declare function listOpenAgentRuns(config: CliConfig, serverUrl: string): Array<{
159
- agentRunId: string;
160
- active: boolean;
161
- } & OpenAgentRun>;
162
- /**
163
- * Clear the active agent-run for a server. Called by `cnotes operations end` /
164
- * `cnotes canvas agent-run end` after a successful close, so the next cnotes
165
- * write reverts to "unattached" unless the user opens a new run.
166
- */
167
- export declare function clearActiveAgentRunId(config: CliConfig, serverUrl: string): void;
168
- /**
169
- * Read the active agent-run for a server (if any). `beforeSnapshotId` is
170
- * present only for canvas runs (see the field docs on ServerConfig).
171
- */
172
- export declare function getActiveAgentRunId(config: CliConfig, serverUrl: string): {
173
- agentRunId: string;
174
- startedAt: number;
175
- beforeSnapshotId?: string;
176
- } | null;
177
- //# sourceMappingURL=auth-store.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-store.d.ts","sourceRoot":"","sources":["../../src/lib/auth-store.ts"],"names":[],"mappings":"AAcA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;;;;;;;;;;;;;;OAkBG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;yEACqE;IACrE,uBAAuB,CAAC,EAAE,MAAM,CAAC;IACjC;;;;;;;;;;;;;;OAcG;IACH,2BAA2B,CAAC,EAAE,MAAM,CAAC;IACrC;;;;;;;;OAQG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;IACzC;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,CAAC;CAC5C;AAED,mDAAmD;AACnD,MAAM,WAAW,cAAc;IAC7B,0EAA0E;IAC1E,OAAO,EAAE,MAAM,CAAC;IAChB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,sDAAsD;AACtD,MAAM,WAAW,YAAY;IAC3B,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,0DAA0D;IAC1D,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,SAAS;IACxB,OAAO,EAAE,CAAC,CAAC;IACX,OAAO,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AE,EAAE,EAAE;QAC3C,IAAI,CAAC,CAAC,EAAE,CAAC,gBAAgB,IAAI,EAAE,CAAC,uBAAuB,IAAI,EAAE,CAAC,2BAA2B,CAAC,EAAE,CAAC;YAC3F,OAAO,KAAK,CAAC;QACf,CAAC;QACD,wEAAwE;QACxE,uEAAuE;QACvE,oBAAoB;QACpB,IAAI,EAAE,CAAC,gBAAgB,IAAI,EAAE,CAAC,SAAS,IAAI,EAAE,CAAC,gBAAgB,IAAI,EAAE,CAAC,SAAS,EAAE,CAAC;YAC/E,OAAO,EAAE,CAAC,SAAS,CAAC,EAAE,CAAC,gBAAgB,CAAC,CAAC;YACzC,IAAI,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC;gBAAE,OAAO,EAAE,CAAC,SAAS,CAAC;QAClE,CAAC;QACD,OAAO,EAAE,CAAC,gBAAgB,CAAC;QAC3B,OAAO,EAAE,CAAC,uBAAuB,CAAC;QAClC,OAAO,EAAE,CAAC,2BAA2B,CAAC;IACxC,CAAC,CAAC,CAAC;AACL,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,mBAAmB,CACjC,MAAiB,EACjB,SAAiB;IAEjB,MAAM,EAAE,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IACrC,IAAI,EAAE,EAAE,gBAAgB,IAAI,EAAE,CAAC,uBAAuB,EAAE,CAAC;QACvD,OAAO;YACL,UAAU,EAAE,EAAE,CAAC,gBAAgB;YAC/B,SAAS,EAAE,EAAE,CAAC,uBAAuB;YACrC,gBAAgB,EAAE,EAAE,CAAC,2BAA2B;SACjD,CAAC;IACJ,CAAC;IACD,OAAO,IAAI,CAAC;AACd,CAAC"}
@@ -1,12 +0,0 @@
1
- /**
2
- * How the CLI prints a workspace the server flagged as billing-blocked.
3
- * The server owns the decision (`billingBlocked`, `billingMessage`,
4
- * `billingState`, `billingFixPath`). This only renders it.
5
- */
6
- export declare function workspaceListState(row: Record<string, unknown>): string;
7
- /**
8
- * One line per blocked workspace: the server's billing sentence, then where
9
- * to update billing.
10
- */
11
- export declare function blockedWorkspaceNotes(rows: Array<Record<string, unknown>>, serverUrl: string): string[];
12
- //# sourceMappingURL=billing-block.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"billing-block.d.ts","sourceRoot":"","sources":["../../src/lib/billing-block.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAcvE;AAUD;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,IAAI,EAAE,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACpC,SAAS,EAAE,MAAM,GAChB,MAAM,EAAE,CAWV"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"billing-block.js","sourceRoot":"","sources":["../../src/lib/billing-block.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,MAAM,UAAU,kBAAkB,CAAC,GAA4B;IAC7D,IAAI,GAAG,CAAC,cAAc,KAAK,IAAI;QAAE,OAAO,EAAE,CAAC;IAC3C,QAAQ,GAAG,CAAC,YAAY,EAAE,CAAC;QACzB,KAAK,aAAa;YAChB,OAAO,aAAa,CAAC;QACvB,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,UAAU;YACb,OAAO,UAAU,CAAC;QACpB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;QAClB;YACE,OAAO,SAAS,CAAC;IACrB,CAAC;AACH,CAAC;AAED,SAAS,MAAM,CAAC,SAAiB,EAAE,GAA4B;IAC7D,MAAM,MAAM,GAAG,SAAS,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAC7C,MAAM,IAAI,GAAG,OAAO,GAAG,CAAC,cAAc,KAAK,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,EAAE,CAAC;IAC9E,IAAI,IAAI,CAAC,UAAU,CAAC,GAAG,CAAC;QAAE,OAAO,GAAG,MAAM,GAAG,IAAI,EAAE,CAAC;IACpD,MAAM,EAAE,GAAG,MAAM,CAAC,GAAG,CAAC,GAAG,IAAI,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC;IAC3C,OAAO,GAAG,MAAM,cAAc,EAAE,UAAU,CAAC;AAC7C,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,qBAAqB,CACnC,IAAoC,EACpC,SAAiB;IAEjB,MAAM,KAAK,GAAa,EAAE,CAAC;IAC3B,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,IAAI,GAAG,CAAC,cAAc,KAAK,IAAI;YAAE,SAAS;QAC1C,MAAM,OAAO,GACX,OAAO,GAAG,CAAC,cAAc,KAAK,QAAQ,IAAI,GAAG,CAAC,cAAc,CAAC,MAAM,GAAG,CAAC;YACrE,CAAC,CAAC,GAAG,CAAC,cAAc;YACpB,CAAC,CAAC,GAAG,MAAM,CAAC,GAAG,CAAC,IAAI,IAAI,gBAAgB,CAAC,wBAAwB,CAAC;QACtE,KAAK,CAAC,IAAI,CAAC,GAAG,OAAO,uBAAuB,MAAM,CAAC,SAAS,EAAE,GAAG,CAAC,GAAG,CAAC,CAAC;IACzE,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC"}
@@ -1,35 +0,0 @@
1
- /**
2
- * Brand single source of truth for the CLI.
3
- *
4
- * This is the CLI-side MIRROR of the app's `lib/brand.ts`. The CLI ships as a
5
- * separate npm package and cannot import from the Next.js app, so the shared
6
- * identity is duplicated here. A drift guard in the app
7
- * (`__tests__/brand.test.ts`) asserts the shared fields below stay in sync with
8
- * `lib/brand.ts` — update both together.
9
- *
10
- * On a rename, changing `configDir` orphans existing logins and changing
11
- * `packageName` breaks `npx`/global-install updates — so when either moves, ship
12
- * a migration. `configDir` carries a one-time rename of the old directory on
13
- * load (see `auth-store.ts`); the old npm package should be deprecated to point
14
- * at the new one.
15
- */
16
- export declare const BRAND: {
17
- /** Display name, used in CLI help/banner text. */
18
- readonly name: "Creator Notes";
19
- /** Canonical production origin (the published default server). */
20
- readonly url: "https://creatornotes.app";
21
- /** Bare domain. */
22
- readonly domain: "creatornotes.app";
23
- /** Developer portal (docs only). The API stays on `url`; never a server target. */
24
- readonly devUrl: "https://cnotes.dev";
25
- readonly devDomain: "cnotes.dev";
26
- /** The installed command. */
27
- readonly command: "cnotes";
28
- /** Published package name. */
29
- readonly packageName: "@creator-notes/cnotes";
30
- /** Config dir under $HOME (holds login tokens). Migrated from the old name on load. */
31
- readonly configDir: ".cnotes";
32
- /** Source repo, owner/name form. */
33
- readonly repo: "creatornotes/pm-notes";
34
- };
35
- //# sourceMappingURL=brand.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"brand.d.ts","sourceRoot":"","sources":["../../src/lib/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,KAAK;IAChB,kDAAkD;;IAElD,kEAAkE;;IAElE,mBAAmB;;IAEnB,mFAAmF;;;IAGnF,6BAA6B;;IAE7B,8BAA8B;;IAE9B,uFAAuF;;IAEvF,oCAAoC;;CAE5B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"brand.js","sourceRoot":"","sources":["../../src/lib/brand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AACH,MAAM,CAAC,MAAM,KAAK,GAAG;IACnB,kDAAkD;IAClD,IAAI,EAAE,eAAe;IACrB,kEAAkE;IAClE,GAAG,EAAE,0BAA0B;IAC/B,mBAAmB;IACnB,MAAM,EAAE,kBAAkB;IAC1B,mFAAmF;IACnF,MAAM,EAAE,oBAAoB;IAC5B,SAAS,EAAE,YAAY;IACvB,6BAA6B;IAC7B,OAAO,EAAE,QAAQ;IACjB,8BAA8B;IAC9B,WAAW,EAAE,uBAAuB;IACpC,uFAAuF;IACvF,SAAS,EAAE,SAAS;IACpB,oCAAoC;IACpC,IAAI,EAAE,uBAAuB;CACrB,CAAC"}
@@ -1,109 +0,0 @@
1
- /**
2
- * Shared schema builder for `cnotes schema` and the `cn_schema` MCP tool.
3
- *
4
- * Returns the things an agent would otherwise have to read SKILL.md or guess
5
- * at: valid note types (from the current workspace), common relationship
6
- * slugs, resource field shapes, exit codes, and env vars. One source of truth
7
- * so the CLI and MCP surfaces never drift.
8
- */
9
- import { ApiClient } from "./api-client.js";
10
- export declare const STATIC_SCHEMA: {
11
- readonly relationships: {
12
- readonly note: "Relationship slugs are free-form strings. The values below are common conventions, not an enum — the server accepts any string.";
13
- readonly common: readonly ["references", "supports", "blocks", "derives_from", "contradicts", "triggers", "related"];
14
- };
15
- readonly syntax: {
16
- readonly noteMention: "[NOTE-12: Title](relationship:<type>)";
17
- readonly batchPlaceholder: "[@key: Title](relationship:<type>) — '@key' is replaced with the new display ID after batch create";
18
- readonly rules: readonly ["Always include `: Title` after the ID. The title-less form renders as 'Untitled' in the UI.", "Pick the relationship slug from the verb your own prose uses: 'blocks X' → relationship:blocks, 'depends on X' → relationship:depends-on. Slugs are free-form (unknown ones auto-create); `cnotes rel types` lists the workspace vocabulary — reuse before coining.", "Reserve `references` for pure citations. A verb narrated in prose around a `references` chip is invisible to backlinks and `rel list` — create/version responses flag these as `mentionWarnings`; treat each as a retype instruction."];
19
- };
20
- readonly discovery: {
21
- readonly note: "After finding a note (search semantic / notes list), see how it connects before acting — the agent mirror of the editor's Backlinks + Canvases affordances.";
22
- readonly backlinks: "`cnotes rel list --note <displayId> --json` → { incoming, outgoing, all }. `incoming` = what links TO this note (backlinks); `outgoing` = what it cites. Each row carries relatedNote {displayId,title,type}, relationshipType {name,label}, and isStale.";
23
- readonly canvases: "`cnotes notes canvases <displayId> --json` → the canvases the note appears on (container-aware: direct node OR nested in a list/grid). Each row: { id, name, via, viewType, visibility, isHome, goal, updatedAt }. `via` = node | list | both.";
24
- readonly expand: "`cnotes notes get <id> --expand` returns the note plus the notes it links to, in one round-trip. Sources: live outgoing relationship rows and inline [[rel::ID]] / [[ID]] mentions (a bare [[ID]] is references). Each linked note is labelled `assumes -> OBSERVATION-6K13` (incoming: `assumes <- OTHER-1`). `--depth N` (default 1, max 4) walks further, deduped. The walk stops at 40 notes and sets `notice` when it does. `--rel a,b` limits slugs. `--summary` keeps the title and the first real prose paragraph of linked notes (skips leading headings, blanks, and chip-only lines; heading-only notes fall back to the last heading text, list-only notes to the first list); requested notes stay whole. `--incoming` also follows backlinks. JSON is `{ notes, linked, truncated, cap, omitted, notice }`. Each linked entry is `{ displayId, relation, direction, depth, from, label, links, note }` and `note` matches a `notes get` row. Without `--expand`, `notes get --json` stays a bare array.";
25
- };
26
- readonly resources: {
27
- readonly note: {
28
- readonly fields: {
29
- readonly id: "Convex ID (string)";
30
- readonly displayId: "Human-readable ID (e.g. MEETING-12, PRD-3)";
31
- readonly title: "string";
32
- readonly type: "string (must match a supertag name from `types`)";
33
- readonly tags: "string[]";
34
- readonly isPinned: "boolean";
35
- readonly isArchived: "boolean";
36
- readonly updatedAt: "number (unix ms)";
37
- };
38
- };
39
- readonly canvasNode: {
40
- readonly kinds: readonly ["note", "richtext", "list", "canvas", "section"];
41
- readonly legacyKinds: readonly ["text"];
42
- readonly kindsNote: "`kinds` is the CREATABLE set. `richtext` is the wire type of the UI's 'Text' element (free-form rich text on the canvas; a heading is just `# Title`). `canvas` is the portal kind. `text` is LEGACY — old heading nodes still render, move and delete, but nothing creates them any more.";
43
- readonly note: "Use `cnotes canvas place` with the declarative layout DSL whenever you can — it packs items without overlaps so you avoid x/y math.";
44
- };
45
- readonly canvasEdge: {
46
- readonly fields: {
47
- readonly sourceNodeId: "string";
48
- readonly targetNodeId: "string";
49
- readonly label: "string (optional, free-form)";
50
- readonly lineStyle: "solid | dashed";
51
- readonly arrow: "end | start | both | none";
52
- };
53
- };
54
- };
55
- readonly exitCodes: {
56
- readonly "0": "ok";
57
- readonly "1": "generic error";
58
- readonly "2": "auth required (run `cnotes auth login`)";
59
- readonly "3": "validation (bad input)";
60
- readonly "4": "not found";
61
- readonly "5": "conflict (state collision)";
62
- readonly "6": "rate-limited";
63
- readonly "7": "permission denied";
64
- };
65
- readonly env: {
66
- readonly CNOTES_SERVER: "Override server URL";
67
- readonly CNOTES_TOKEN: "Auth token (alternative to `cnotes auth login`)";
68
- readonly CNOTES_WORKSPACE: "Override workspace ID for this invocation";
69
- readonly CNOTES_JSON: "Set to 1 to force JSON output";
70
- readonly CNOTES_AGENT_RUN_ID: "Active agent-run bracket (set by `cnotes canvas agent-run begin/wrap`)";
71
- readonly CNOTES_AGENT_BEFORE_SNAPSHOT_ID: "Begin-snapshot ID carried with the agent-run";
72
- readonly CNOTES_AGENT_SESSION_ID: "Explicit agent conversation id to stamp on operations begin (overrides auto-detect)";
73
- readonly CNOTES_AGENT_SESSION_KIND: "Namespace for CNOTES_AGENT_SESSION_ID (e.g. claude-code, cursor)";
74
- readonly CURSOR_CONVERSATION_ID: "Auto-detected by Cursor Agent; stamped as agentSession kind=cursor";
75
- readonly CLAUDE_CODE_SESSION_ID: "Auto-detected by Claude Code; stamped as agentSession kind=claude-code";
76
- };
77
- readonly agentRun: {
78
- readonly note: "Wrap multi-step canvas mutations in an agent-run so they show up as one revertable unit in the UI history.";
79
- readonly wrap: "cnotes canvas agent-run wrap --canvas <id> --prompt \"<intent>\" -- <command>";
80
- };
81
- };
82
- export interface SchemaType {
83
- name: string;
84
- prefix: string;
85
- displayName: string;
86
- color: string | null;
87
- isBuiltIn: boolean;
88
- }
89
- export interface SchemaFetchError {
90
- resource: "workspace" | "types";
91
- error: string;
92
- }
93
- export interface BuiltSchema {
94
- workspace: {
95
- id: string;
96
- name: string | null;
97
- verified: boolean;
98
- };
99
- types: SchemaType[];
100
- dynamicFetchErrors?: SchemaFetchError[];
101
- }
102
- /**
103
- * Build the full schema document. The static metadata (exit codes, syntax,
104
- * resource shapes) is always present; the dynamic bits (workspace + types)
105
- * are fetched and any failures are reported in `dynamicFetchErrors` so callers
106
- * never treat a partial schema as authoritative.
107
- */
108
- export declare function buildSchema(api: ApiClient, workspaceId: string): Promise<BuiltSchema & typeof STATIC_SCHEMA>;
109
- //# sourceMappingURL=build-schema.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-schema.d.ts","sourceRoot":"","sources":["../../src/lib/build-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AAE5C,eAAO,MAAM,aAAa;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqFhB,CAAC;AAgBX,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,SAAS,EAAE,OAAO,CAAC;CACpB;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,WAAW,GAAG,OAAO,CAAC;IAChC,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,WAAW;IAC1B,SAAS,EAAE;QAAE,EAAE,EAAE,MAAM,CAAC;QAAC,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,QAAQ,EAAE,OAAO,CAAA;KAAE,CAAC;IAClE,KAAK,EAAE,UAAU,EAAE,CAAC;IACpB,kBAAkB,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACzC;AAED;;;;;GAKG;AACH,wBAAsB,WAAW,CAC/B,GAAG,EAAE,SAAS,EACd,WAAW,EAAE,MAAM,GAClB,OAAO,CAAC,WAAW,GAAG,OAAO,aAAa,CAAC,CAyD7C"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"build-schema.js","sourceRoot":"","sources":["../../src/lib/build-schema.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;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AC,eAAe;aAC3B;QACL,KAAK;QACL,GAAG,CAAC,kBAAkB,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,EAAE,kBAAkB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;QAChE,GAAG,aAAa;KACjB,CAAC;AACJ,CAAC"}
@@ -1,59 +0,0 @@
1
- /**
2
- * Canvas goal standard.
3
- *
4
- * A canvas goal is two short sentences. The first names the result the board
5
- * exists to produce: a result verb and its object. The second starts with
6
- * "Done when" and says what is visibly true on the board once the goal is met.
7
- * That second sentence is the verifier: the digest grades alignment against
8
- * it, and a done-check can score it from the board's content alone.
9
- *
10
- * What stays out: the list of sections (the orientation banner's job), the
11
- * method, dates, and the audience (its own field).
12
- *
13
- * This module has no dependencies. It lives in the CLI package so the CLI help
14
- * and the stdio MCP server can import it, and lib/canvas/goal-lint.ts
15
- * re-exports it for Convex, the Next.js routes, the remote MCP server and the
16
- * web client, so every surface shares one text and one check.
17
- */
18
- export declare const MAX_GOAL_WORDS = 60;
19
- export declare const CANVAS_GOAL_EXAMPLE = "Decide which phone-section bugs ship in the next PR. Done when every card is in a PR or marked won't fix.";
20
- export declare const CANVAS_GOAL_SHAPE = "<Decide | Rank | Agree | Show | Plan | Record> <the object>. Done when <what is visibly true on the board>.";
21
- /** The rule in one breath, quoted by rejections. */
22
- export declare const CANVAS_GOAL_RULE: string;
23
- /** Flag and tool description shared by the CLI help, both MCP servers and the web placeholder. */
24
- export declare const CANVAS_GOAL_DESCRIPTION: string;
25
- /** Placeholder for the web goal editor: the shape, nothing else. */
26
- export declare const CANVAS_GOAL_PLACEHOLDER = "Decide <what> so <who> can <act>. Done when <what is visibly true on this board>.";
27
- export type GoalRejectionCode = "empty" | "missing_done_clause" | "too_long";
28
- export interface GoalRejection {
29
- code: GoalRejectionCode;
30
- /** One or two sentences the caller can show as is. Quotes the goal and the rule. */
31
- message: string;
32
- }
33
- export declare function hasDoneClause(goal: string): boolean;
34
- /**
35
- * The aim (everything before "Done when") and the done clause (from "Done
36
- * when" to the end). `doneWhen` is null when the goal has no clause.
37
- */
38
- export declare function splitCanvasGoal(goal: string): {
39
- aim: string;
40
- doneWhen: string | null;
41
- };
42
- /**
43
- * Hard check for a canvas goal as the caller wrote it. Returns null when the
44
- * goal may be saved. Callers decide whether a blank goal is allowed: the web
45
- * app creates a canvas with no goal, and clearing one stays legal.
46
- */
47
- export declare function checkCanvasGoal(goal: string): GoalRejection | null;
48
- /**
49
- * The "Done when" sentence inside a longer text, such as a Goal note's body:
50
- * from "Done when" to the end of that sentence (or line). Null when absent.
51
- */
52
- export declare function extractDoneWhen(text: string): string | null;
53
- /**
54
- * Two "Done when" sentences match when they differ only in case, spacing,
55
- * quote style or trailing punctuation. A Goal note's board is the canvas it
56
- * sits on whose goal carries the same Done when.
57
- */
58
- export declare function normalizeDoneWhen(doneWhen: string): string;
59
- //# sourceMappingURL=canvas-goal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"canvas-goal.d.ts","sourceRoot":"","sources":["../../src/lib/canvas-goal.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AAEH,eAAO,MAAM,cAAc,KAAK,CAAC;AAEjC,eAAO,MAAM,mBAAmB,8GAC6E,CAAC;AAE9G,eAAO,MAAM,iBAAiB,gHACiF,CAAC;AAEhH,oDAAoD;AACpD,eAAO,MAAM,gBAAgB,QAIQ,CAAC;AAEtC,kGAAkG;AAClG,eAAO,MAAM,uBAAuB,QAG+C,CAAC;AAEpF,oEAAoE;AACpE,eAAO,MAAM,uBAAuB,sFACiD,CAAC;AAEtF,MAAM,MAAM,iBAAiB,GAAG,OAAO,GAAG,qBAAqB,GAAG,UAAU,CAAC;AAE7E,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,iBAAiB,CAAC;IACxB,oFAAoF;IACpF,OAAO,EAAE,MAAM,CAAC;CACjB;AASD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO,CAEnD;AAED;;;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