@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,4 +1,5 @@
1
1
  import { readFileSync } from "node:fs";
2
+ import { request as httpRequest } from "node:http";
2
3
  import { join, relative, isAbsolute } from "node:path";
3
4
  import { homedir } from "node:os";
4
5
  import { BRAND } from "./brand.js";
@@ -18,6 +19,35 @@ export const CLAUDE_SESSION_FILE = join(homedir(), BRAND.configDir, "claude-sess
18
19
  * stamping a later, unrelated run.
19
20
  */
20
21
  export const SESSION_FILE_MAX_AGE_MS = 24 * 60 * 60 * 1000; // 24h
22
+ /**
23
+ * `cursor.com/agents/<id>` only opens a cloud agent id. Subagent
24
+ * conversation ids (`sand-subagent-…`, or a child `bc-…` that is not the
25
+ * run the person started) are not that page.
26
+ */
27
+ const CURSOR_CLOUD_AGENT_ID = /^bc-[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i;
28
+ /** How long to wait on the agent metadata socket before giving up the parent id. */
29
+ const CURSOR_AGENT_SOCKET_TIMEOUT_MS = 400;
30
+ const CURSOR_AGENT_SOCKET_DEFAULT = "/run/cursor/api.sock";
31
+ export function isCursorCloudAgentId(id) {
32
+ return CURSOR_CLOUD_AGENT_ID.test(id);
33
+ }
34
+ /**
35
+ * Id to stamp so "Open Cursor agent" lands on a page that exists.
36
+ *
37
+ * Prefer the metadata socket's agent id: inside a Task subagent,
38
+ * `CURSOR_CONVERSATION_ID` is the subagent (`sand-subagent-…` or a child
39
+ * `bc-…`) and `https://cursor.com/agents/<that>` is "Cloud Agent not found".
40
+ * The socket still returns the parent cloud agent.
41
+ */
42
+ export function cursorResumeId(args) {
43
+ const cloud = args.cloudAgentId?.trim() ?? "";
44
+ if (isCursorCloudAgentId(cloud))
45
+ return cloud;
46
+ const conversation = args.conversationId?.trim() ?? "";
47
+ if (isCursorCloudAgentId(conversation))
48
+ return conversation;
49
+ return null;
50
+ }
21
51
  /**
22
52
  * Decide whether a stored hook session is still a trustworthy stand-in for
23
53
  * "the agent driving THIS cnotes run". Pure (takes `now` + `cwd` rather than
@@ -67,14 +97,18 @@ function isWithin(child, parent) {
67
97
  * 3. CLAUDE_CODE_SESSION_ID — Claude Code's per-process env var. Zero-config
68
98
  * but undocumented; best-effort fallback when no hook is installed. It's
69
99
  * the live process's own env, so no staleness check applies.
70
- * 4. CURSOR_CONVERSATION_ID — Cursor cloud/background agent conversation id
71
- * (`bc-…`). Present in Cursor Agent shells; resumable at
72
- * `https://cursor.com/agents/<id>` with no local transcript required.
100
+ * 4. The Cursor cloud agent id. `CURSOR_CONVERSATION_ID` is that id in the
101
+ * parent shell (`bc-…`, resumable at `https://cursor.com/agents/<id>`).
102
+ * In a subagent it is `sand-subagent-…` or a child `bc-…`, and that URL
103
+ * does not open. Pass `cursorCloudAgentId` from {@link readCursorCloudAgentId}
104
+ * (the parent on the metadata socket) and that id wins.
73
105
  *
74
106
  * Returns null when nothing is known (e.g. cnotes run outside any agent), in which
75
- * case the run simply isn't session-stamped — no error.
107
+ * case the run simply isn't session-stamped — no error. A Cursor conversation
108
+ * id that is not an openable `bc-…` cloud agent is also skipped: stamping it
109
+ * would offer a resume link to a page that does not exist.
76
110
  */
77
- export function resolveAgentSession() {
111
+ export function resolveAgentSession(options) {
78
112
  const overrideId = process.env.CNOTES_AGENT_SESSION_ID?.trim();
79
113
  if (overrideId) {
80
114
  return {
@@ -88,11 +122,74 @@ export function resolveAgentSession() {
88
122
  const claudeEnvId = process.env.CLAUDE_CODE_SESSION_ID?.trim();
89
123
  if (claudeEnvId)
90
124
  return { kind: "claude-code", id: claudeEnvId };
91
- const cursorEnvId = process.env.CURSOR_CONVERSATION_ID?.trim();
92
- if (cursorEnvId)
93
- return { kind: "cursor", id: cursorEnvId };
125
+ const cursorId = cursorResumeId({
126
+ conversationId: process.env.CURSOR_CONVERSATION_ID,
127
+ cloudAgentId: options?.cursorCloudAgentId,
128
+ });
129
+ if (cursorId)
130
+ return { kind: "cursor", id: cursorId };
94
131
  return null;
95
132
  }
133
+ /**
134
+ * {@link resolveAgentSession} plus the parent cloud agent id from the local
135
+ * metadata socket. This is what `operations begin` stamps.
136
+ */
137
+ export async function resolveHostAgentSession() {
138
+ const cursorCloudAgentId = await readCursorCloudAgentId();
139
+ return resolveAgentSession({ cursorCloudAgentId });
140
+ }
141
+ /**
142
+ * Parent cloud agent id from `GET /v1/meta-data/agent/id` on
143
+ * `CURSOR_AGENT_SOCKET`. Returns null outside Cursor, when the socket is
144
+ * missing, or when the value is not a `bc-…` id. Never throws.
145
+ */
146
+ export function readCursorCloudAgentId(env = process.env, timeoutMs = CURSOR_AGENT_SOCKET_TIMEOUT_MS) {
147
+ const inCursor = Boolean(env.CURSOR_AGENT || env.CURSOR_CONVERSATION_ID || env.CURSOR_AGENT_SOCKET);
148
+ if (!inCursor)
149
+ return Promise.resolve(null);
150
+ const socketPath = env.CURSOR_AGENT_SOCKET?.trim() || CURSOR_AGENT_SOCKET_DEFAULT;
151
+ return new Promise((resolve) => {
152
+ let settled = false;
153
+ let timer;
154
+ const finish = (value) => {
155
+ if (settled)
156
+ return;
157
+ settled = true;
158
+ if (timer)
159
+ clearTimeout(timer);
160
+ resolve(value);
161
+ };
162
+ const req = httpRequest({
163
+ socketPath,
164
+ path: "/v1/meta-data/agent/id",
165
+ method: "GET",
166
+ timeout: timeoutMs,
167
+ }, (res) => {
168
+ const chunks = [];
169
+ res.on("data", (chunk) => {
170
+ chunks.push(chunk);
171
+ });
172
+ res.on("end", () => {
173
+ if (res.statusCode !== 200) {
174
+ finish(null);
175
+ return;
176
+ }
177
+ const id = Buffer.concat(chunks).toString("utf8").trim();
178
+ finish(isCursorCloudAgentId(id) ? id : null);
179
+ });
180
+ });
181
+ timer = setTimeout(() => {
182
+ req.destroy();
183
+ finish(null);
184
+ }, timeoutMs);
185
+ req.on("error", () => finish(null));
186
+ req.on("timeout", () => {
187
+ req.destroy();
188
+ finish(null);
189
+ });
190
+ req.end();
191
+ });
192
+ }
96
193
  function readSessionFile(now, cwd) {
97
194
  try {
98
195
  const raw = readFileSync(CLAUDE_SESSION_FILE, "utf-8");
@@ -106,4 +203,3 @@ function readSessionFile(now, cwd) {
106
203
  }
107
204
  return null;
108
205
  }
109
- //# 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
@@ -278,4 +278,3 @@ export function installSkill(target = "claude") {
278
278
  removeLegacySkill(target); // drop the old `cn` skill once the new one is in place
279
279
  return { target, installed: true, destPath: dest };
280
280
  }
281
- //# sourceMappingURL=install-skill.js.map
@@ -59,4 +59,3 @@ export function getMcpLocalFileRoots() {
59
59
  const implicitRoots = unsafeImplicitRoots.has(cwd) ? [] : [cwd];
60
60
  return [...new Set([...implicitRoots, ...parseAllowedDirs()])];
61
61
  }
62
- //# sourceMappingURL=mcp-local-file.js.map
@@ -443,4 +443,3 @@ export function describeUnresolvedMentions(unresolved) {
443
443
  });
444
444
  return lines.join("\n");
445
445
  }
446
- //# sourceMappingURL=mention-lint.js.map
@@ -85,4 +85,3 @@ export function readMilestoneHeadline(raw) {
85
85
  }
86
86
  return headline;
87
87
  }
88
- //# sourceMappingURL=milestone-message.js.map
@@ -174,4 +174,3 @@ export function truncate(str, max) {
174
174
  return str;
175
175
  return str.slice(0, max - 1) + "\u2026";
176
176
  }
177
- //# sourceMappingURL=output.js.map
@@ -299,4 +299,3 @@ export function parseGradeSubmission(input) {
299
299
  },
300
300
  };
301
301
  }
302
- //# sourceMappingURL=quality.js.map
@@ -24,4 +24,3 @@ export async function resolveNoteId(api, workspaceId, idOrDisplayId) {
24
24
  }
25
25
  return String(note._id || note.id);
26
26
  }
27
- //# sourceMappingURL=resolve-note.js.map
@@ -95,4 +95,3 @@ export function parseAnswerOptions(opts) {
95
95
  ...(opts.confirmAll ? { confirmAllOpen: true } : {}),
96
96
  };
97
97
  }
98
- //# sourceMappingURL=review-helpers.js.map
@@ -74,4 +74,3 @@ export function missingRequiredSections(markdown, rubric) {
74
74
  const headings = new Set(headingTexts(markdown).map(norm));
75
75
  return required.filter((name) => !headings.has(norm(name)));
76
76
  }
77
- //# sourceMappingURL=rubric-sections.js.map
@@ -63,4 +63,3 @@ export function attachRubricsToResults(results, typeByKey, map) {
63
63
  return { ...r, type, rubric };
64
64
  });
65
65
  }
66
- //# sourceMappingURL=rubrics.js.map
@@ -76,4 +76,3 @@ export function mcpLaunchSpec() {
76
76
  const __dirname = dirname(fileURLToPath(import.meta.url));
77
77
  return { command: "node", args: [resolve(__dirname, "..", "mcp-server.js")] };
78
78
  }
79
- //# sourceMappingURL=runtime.js.map
@@ -103,4 +103,3 @@ export function unofficialServerWarning(url) {
103
103
  return null;
104
104
  }
105
105
  }
106
- //# sourceMappingURL=server-url.js.map
@@ -127,4 +127,3 @@ export function renderBrief(brief, now = Date.now()) {
127
127
  }
128
128
  return lines.join("\n");
129
129
  }
130
- //# sourceMappingURL=session-brief.js.map
@@ -30,4 +30,3 @@ export function sameServerOrigin(linkOrigin, serverUrl) {
30
30
  return false;
31
31
  }
32
32
  }
33
- //# sourceMappingURL=share-link.js.map
@@ -47,4 +47,3 @@ export function sharedNotes(items) {
47
47
  }
48
48
  return lines;
49
49
  }
50
- //# sourceMappingURL=shared-rows.js.map
package/dist/lib/stdin.js CHANGED
@@ -8,4 +8,3 @@ export async function readStdin() {
8
8
  }
9
9
  return Buffer.concat(chunks).toString("utf-8");
10
10
  }
11
- //# sourceMappingURL=stdin.js.map
@@ -16,4 +16,3 @@ export function extractStorageId(input) {
16
16
  // Bare id (possibly with trailing quote/paren/query if pasted loosely).
17
17
  return trimmed.split(/[\s)"'?#]/)[0];
18
18
  }
19
- //# sourceMappingURL=storage-id.js.map
package/dist/lib/style.js CHANGED
@@ -14,4 +14,3 @@ export const red = wrap("\x1b[31m", "\x1b[39m");
14
14
  export const CHECK = green("✓");
15
15
  export const ARROW = cyan("→");
16
16
  export const WARN = yellow("!");
17
- //# sourceMappingURL=style.js.map
@@ -28,4 +28,3 @@ export function formatSupersededBy(refs) {
28
28
  .map((r) => (r.title ? `${r.displayId} (${r.title})` : r.displayId))
29
29
  .join(", ");
30
30
  }
31
- //# sourceMappingURL=superseded-by.js.map
@@ -165,4 +165,3 @@ export function parseColorInput(value) {
165
165
  }
166
166
  return null;
167
167
  }
168
- //# sourceMappingURL=themes.js.map
package/dist/lib/urls.js CHANGED
@@ -55,4 +55,3 @@ export function workspaceUrl(serverUrl, workspaceId) {
55
55
  const origin = serverUrl.replace(/\/+$/, "");
56
56
  return `${origin}/${workspaceId}`;
57
57
  }
58
- //# sourceMappingURL=urls.js.map
@@ -288,19 +288,24 @@ server.tool("cnotes_notes_create", "Create one or more interlinked notes in a si
288
288
  .describe("Either a single item object or a non-empty array of items."),
289
289
  }, async ({ notes }) => withErrorHandling(async () => {
290
290
  const items = Array.isArray(notes) ? notes : [notes];
291
- // Narrated-verb lint (warn-only, pre-send): MCP has no stderr channel,
292
- // so `mentionWarnings` in the result is the only way the model sees it.
293
- let mentionWarnings = [];
294
- if (items.some((n) => hasGenericMention(String(n.markdown ?? "")))) {
295
- const relTypes = await fetchRelationshipTypeOptions(api, workspaceId);
296
- if (relTypes) {
297
- mentionWarnings = items.flatMap((n) => lintNarratedVerbMentions(String(n.markdown ?? ""), relTypes).map((w) => ({ item: n.key, ...w })));
298
- }
299
- }
300
- // Plain-text ID lint (warn-only): a real note named as bare prose
301
- // creates nothing in the graph. One batched lookup for the whole
302
- // batch; only IDs resolving to a workspace note warn.
303
- const plainTextIdWarnings = await lintPlainTextDisplayIdsBatch(items.map((n) => ({ key: n.key, markdown: String(n.markdown ?? "") })), api, workspaceId);
291
+ // The three pre-flight reads are independent of each other and of the
292
+ // create, so they run as one round trip instead of three in a row.
293
+ // - Narrated-verb lint (warn-only): MCP has no stderr channel, so
294
+ // `mentionWarnings` in the result is the only way the model sees it.
295
+ // - Plain-text ID lint (warn-only): a real note named as bare prose
296
+ // creates nothing in the graph; one batched lookup for the batch.
297
+ // - Rubric map: attached to each result below (loadRubricMap swallows
298
+ // its own failures, so it cannot block the create).
299
+ const [relTypes, plainTextIdWarnings, rubricMap] = await Promise.all([
300
+ items.some((n) => hasGenericMention(String(n.markdown ?? "")))
301
+ ? fetchRelationshipTypeOptions(api, workspaceId)
302
+ : Promise.resolve(null),
303
+ lintPlainTextDisplayIdsBatch(items.map((n) => ({ key: n.key, markdown: String(n.markdown ?? "") })), api, workspaceId),
304
+ loadRubricMap(api, workspaceId),
305
+ ]);
306
+ const mentionWarnings = relTypes
307
+ ? items.flatMap((n) => lintNarratedVerbMentions(String(n.markdown ?? ""), relTypes).map((w) => ({ item: n.key, ...w })))
308
+ : [];
304
309
  const result = await api.post("/api/notes/bulk", {
305
310
  action: "bulkCreate",
306
311
  workspaceId,
@@ -308,8 +313,6 @@ server.tool("cnotes_notes_create", "Create one or more interlinked notes in a si
308
313
  });
309
314
  // Attach rubrics ON EACH result so filtering to results[] still carries
310
315
  // the standard. Top-level rubrics kept for backward compatibility.
311
- // Non-fatal: create already succeeded if we got here.
312
- const rubricMap = await loadRubricMap(api, workspaceId);
313
316
  const typeByKey = new Map(items.map((n) => [n.key, n.type]));
314
317
  const rawResults = (result.results || []);
315
318
  const enriched = attachRubricsToResults(rawResults, typeByKey, rubricMap);
@@ -419,7 +422,7 @@ server.tool("cnotes_canvas_update", "Update canvas metadata: title, goal, and/or
419
422
  targetAudience: z.string().optional().describe("Target audience — who this canvas is meant to serve or inform, and what they do with it"),
420
423
  }, async ({ canvasId, title, goal, targetAudience }) => {
421
424
  if (!title && !goal && !targetAudience) {
422
- return { content: [{ type: "text", text: "Error: at least one of title, goal, or targetAudience is required" }] };
425
+ return err("at least one of title, goal, or targetAudience is required");
423
426
  }
424
427
  const body = {};
425
428
  if (title !== undefined)
@@ -1264,7 +1267,7 @@ server.tool("cnotes_versions_list", "List versions of a note.", {
1264
1267
  throw new Error(`Note not found: ${noteId}`);
1265
1268
  return note.versions || [];
1266
1269
  }));
1267
- server.tool("cnotes_versions_create", "Create a new version of a note. Content is markdown. To link to other notes, use [NOTE-123: Title](relationship:type) inside the markdown — always include the title (the part after the colon) or the chip renders as 'Untitled'. NEVER name another note as bare prose ('see DECISION-12') — plain text creates no chip, no relationship, no backlink; write the mention. This is exactly how to capture 'the answer to this QUESTION is that DECISION': a mention of the decision with a relationship type like 'answered-by'. Pick the relationship type from the verb your own prose uses ('blocks', 'depends-on', 'caused-by', …; free-form — unknown types auto-create); reserve 'references' for pure citations — a verb narrated in prose around a 'references' chip is invisible to backlinks. A `mentionWarnings` array in the result flags narrated verbs it detects; a `plainTextIdWarnings` array flags bare IDs that name real notes, each with a paste-ready mention rewrite — treat both as fix instructions unless the prose genuinely isn't asserting a relationship.", {
1270
+ server.tool("cnotes_versions_create", "Create a new version of a note. Content is markdown. To link to other notes, use [NOTE-123: Title](relationship:type) or [[type::NOTE-123]] inside the markdown — the title part is optional; the server stamps the linked note's current title onto the chip when it saves. NEVER name another note as bare prose ('see DECISION-12') — plain text creates no chip, no relationship, no backlink; write the mention. This is exactly how to capture 'the answer to this QUESTION is that DECISION': a mention of the decision with a relationship type like 'answered-by'. Pick the relationship type from the verb your own prose uses ('blocks', 'depends-on', 'caused-by', …; free-form — unknown types auto-create); reserve 'references' for pure citations — a verb narrated in prose around a 'references' chip is invisible to backlinks. A `mentionWarnings` array in the result flags narrated verbs it detects; a `plainTextIdWarnings` array flags bare IDs that name real notes, each with a paste-ready mention rewrite — treat both as fix instructions unless the prose genuinely isn't asserting a relationship.", {
1268
1271
  noteId: z.string().describe("Note display ID or Convex ID"),
1269
1272
  markdown: z.string().describe("New content as markdown"),
1270
1273
  description: z.string().describe("Change description (required)"),
@@ -1369,4 +1372,3 @@ main().catch((e) => {
1369
1372
  process.stderr.write(`cnotes-mcp fatal: ${e}\n`);
1370
1373
  process.exit(1);
1371
1374
  });
1372
- //# sourceMappingURL=mcp-server.js.map
package/dist/program.js CHANGED
@@ -154,4 +154,3 @@ Env vars:
154
154
  });
155
155
  return program;
156
156
  }
157
- //# sourceMappingURL=program.js.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@creator-notes/cnotes",
3
- "version": "0.103.5",
3
+ "version": "0.104.1",
4
4
  "description": "CLI for CreatorNotes — create notes, build canvases, search knowledge from the terminal",
5
5
  "type": "module",
6
6
  "bin": {
@@ -81,6 +81,13 @@ cnotes canvas update <canvasId> [--title "<text>"] [--goal "<text>"] [--audience
81
81
  # when the deployment has scoring off). Goal trees (`cnotes goals tree`, goal-tree skill)
82
82
  # are built from these.
83
83
  cnotes canvas done <canvasId> [--refresh]
84
+ # Which cards contradict each other, and which claims nothing on the board backs. Writes
85
+ # nothing and gives no reasons, so read each finding before acting on it. For a real one,
86
+ # open a draft (`cnotes draft open --from-canvas <canvasId>`) and write a Tension note that
87
+ # mentions both cards, or a Question note asking what would back the claim; the person
88
+ # accepts the draft. "Unsure" findings are for the person, not for a note. One model call
89
+ # per card; editors only; refused where the deployment has no decision model for the workspace.
90
+ cnotes canvas check <canvasId>
84
91
  cnotes canvas delete <canvasId>
85
92
  cnotes canvas set-as-home <canvasId>
86
93
  cnotes canvas archive <canvasId>
@@ -120,6 +120,13 @@ cnotes notes create --notes '[
120
120
  # On validation failure the response lists every bad item by index + key + field
121
121
  # (and `details.items` in --json mode), so you can fix the whole batch in one shot.
122
122
  # Each .results[] item carries .type + .rubric — keep them when filtering JSON.
123
+ # Where the deployment turns the rubric check on, each item also carries
124
+ # .quality: {level 1-4, label, missing[], nextStep, unsure}. `missing` quotes the
125
+ # rubric clauses the note does not yet do, weakest first. Fix those with
126
+ # `versions create` before placing the note (the new version is graded again
127
+ # and comes back with its own .quality). `unsure: true` means the level is a
128
+ # guess: read the note yourself instead of rewriting on its word. Without
129
+ # .quality, grade yourself as below.
123
130
 
124
131
  # THEN: grade what you just wrote and revise before ending the run.
125
132
  # You are the grader. Grading spends no credits. `cnotes quality` does not
@@ -66,8 +66,12 @@ cnotes operations end
66
66
  **Resume the chat that produced the run.** `operations begin` auto-stamps
67
67
  `agentSession` from the host agent when it can: Claude Code via
68
68
  `CLAUDE_CODE_SESSION_ID` / the SessionStart hook (`cnotes claude-hook`), Cursor
69
- Agent via `CURSOR_CONVERSATION_ID` (`bc-…`). The timeline then offers resume —
70
- `claude --resume <id>` (copy) or `https://cursor.com/agents/<bcId>` (open).
69
+ Agent via the openable cloud agent id (`bc-…`). Inside a subagent,
70
+ `CURSOR_CONVERSATION_ID` is `sand-subagent-…` or a child id, and
71
+ `https://cursor.com/agents/<that>` is "Cloud Agent not found", so begin
72
+ stamps the parent id from the agent metadata socket instead. The timeline
73
+ then offers resume: `claude --resume <id>` (copy) or
74
+ `https://cursor.com/agents/<bcId>` (open).
71
75
  Override with `CNOTES_AGENT_SESSION_ID` + `CNOTES_AGENT_SESSION_KIND` when needed.
72
76
 
73
77
 
package/dist/cn.d.ts DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env node
2
- export {};
3
- //# sourceMappingURL=cn.d.ts.map
package/dist/cn.d.ts.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cn.d.ts","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":""}
package/dist/cn.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"file":"cn.js","sourceRoot":"","sources":["../src/cn.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAErE,+EAA+E;AAC/E,sCAAsC;AACtC,MAAM,WAAW,GACf,eAAe,EAAE;IACjB,aAAa,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,iBAAiB,CAAC,CAAC,OAAO,CAAC;AAC5D,OAAO,EAAE,sBAAsB,EAAE,MAAM,wBAAwB,CAAC;AAChE,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,MAAM,OAAO,GAAG,YAAY,CAAC,WAAW,CAAC,CAAC;AAE1C,+EAA+E;AAC/E,6EAA6E;AAC7E,2EAA2E;AAC3E,MAAM,QAAQ,GAAG,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;AAE9C,2EAA2E;AAC3E,0EAA0E;AAC1E,0EAA0E;AAC1E,oEAAoE;AACpE,MAAM,aAAa,GACjB,OAAO,CAAC,MAAM,CAAC,KAAK;IACpB,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,CAAC,QAAQ,CAAC;IAChC,OAAO,CAAC,GAAG,CAAC,WAAW,KAAK,GAAG;IAC/B,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;IACf,CAAC,OAAO,CAAC,GAAG,CAAC,sBAAsB;IACnC,CAAC,OAAO,CAAC,GAAG,CAAC,kBAAkB,CAAC;AAElC,IA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E,2EAA2E;AAC3E,EAAE;AACF,yEAAyE;AACzE,gFAAgF;AAChF,+EAA+E;AAC/E,0EAA0E;AAC1E,iFAAiF;AACjF,OAAO,CAAC,EAAE,CAAC,oBAAoB,EAAE,CAAC,MAAM,EAAE,EAAE;IAC1C,WAAW,CAAC,MAAM,EAAE,UAAU,EAAE,CAAC,CAAC;AACpC,CAAC,CAAC,CAAC;AAEH,OAAO,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IAC/C,WAAW,CAAC,KAAK,EAAE,UAAU,EAAE,CAAC,CAAC;AACnC,CAAC,CAAC,CAAC"}
@@ -1,3 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function registerAuthKeysCommands(auth: Command, program: Command): void;
3
- //# sourceMappingURL=auth-keys.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-keys.d.ts","sourceRoot":"","sources":["../../src/commands/auth-keys.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAcpC,wBAAgB,wBAAwB,CAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAkE9E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth-keys.js","sourceRoot":"","sources":["../../src/commands/auth-keys.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AACjD,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAC;AACrD,OAAO,EAAE,WAAW,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAU9C,MAAM,UAAU,wBAAwB,CAAC,IAAa,EAAE,OAAgB;IACtE,MAAM,IAAI,GAAG,IAAI;SACd,OAAO,CAAC,MAAM,CAAC;SACf,WAAW,CAAC,+CAA+C,CAAC,CAAC;IAEhE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;iBAAM,CAAC;gBACN,OAAO,CAAC,GAAG,CAAC,uBAAuB,KAAK,EAAE,CAAC,CAAC;YAC9C,CAAC;QACH,CAAC;QAAC,OAAO,KAAK,EAAE,CAAC;YACf,WAAW,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAC3B,CAAC;IACH,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -1,11 +0,0 @@
1
- import { Command } from "commander";
2
- export declare function registerAuthCommands(program: Command): void;
3
- export interface LoginResult {
4
- email: string;
5
- serverUrl: string;
6
- expiresAt?: number;
7
- }
8
- export declare function browserLogin(rawServerUrl: string, json: boolean, options?: {
9
- quiet?: boolean;
10
- }): Promise<LoginResult>;
11
- //# sourceMappingURL=auth.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/commands/auth.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,wBAAgB,oBAAoB,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAiH3D;AAmED,MAAM,WAAW,WAAW;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAuCD,wBAAsB,YAAY,CAChC,YAAY,EAAE,MAAM,EACpB,IAAI,EAAE,OAAO,EACb,OAAO,CAAC,EAAE;IAAE,KAAK,CAAC,EAAE,OAAO,CAAA;CAAE,GAC5B,OAAO,CAAC,WAAW,CAAC,CAyKtB"}