@creator-notes/cnotes 0.125.6 → 0.125.7

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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "creator-notes-cli",
3
- "version": "0.125.6",
3
+ "version": "0.125.7",
4
4
  "description": "CreatorNotes CLI: create notes, build canvases, search knowledge from the terminal",
5
5
  "author": {
6
6
  "name": "CreatorNotes",
@@ -18,6 +18,7 @@ import { canvasUrl, canvasLinkForRef } from "../lib/urls.js";
18
18
  import { CANVAS_GOAL_DESCRIPTION } from "../lib/canvas-goal.js";
19
19
  import { canvasActionPath, commentsListPath, parseCommentStatus, } from "../lib/canvas-paths.js";
20
20
  import { buildSectionUpdateRequest, CLI_SECTION_WORDING } from "../lib/section-update.js";
21
+ import { arrowToMarkers } from "../lib/mcp-spec.js";
21
22
  import { registerCanvasMilestoneCommands } from "./canvas-milestone.js";
22
23
  import { DISPLAY_ID_CORE } from "../lib/display-id.js";
23
24
  import { resolveNoteBatchItems } from "../lib/note-batch.js";
@@ -359,19 +360,13 @@ function printRippleSummary(ripple, dryRun = false) {
359
360
  console.error(`Warning: the grown frame now overlaps ${r.blocked.length} straddling item(s) that could not shift without breaking their own context: ${names}. Reflow them (arrange / bulk-move) and re-check with canvas get.`);
360
361
  }
361
362
  }
363
+ const ARROW_MODES = ["end", "start", "both", "none"];
364
+ /** `--arrow` as arrowStart/arrowEnd, the same mapping the MCP tools use (lib/mcp-spec.ts). */
362
365
  function parseArrowMode(mode) {
363
- switch (mode) {
364
- case "end":
365
- return { arrowStart: false, arrowEnd: true };
366
- case "start":
367
- return { arrowStart: true, arrowEnd: false };
368
- case "both":
369
- return { arrowStart: true, arrowEnd: true };
370
- case "none":
371
- return { arrowStart: false, arrowEnd: false };
372
- default:
373
- throw new ValidationError(`Invalid --arrow value "${mode}". Expected one of: end, start, both, none.`);
366
+ if (!ARROW_MODES.includes(mode)) {
367
+ throw new ValidationError(`Invalid --arrow value "${mode}". Expected one of: end, start, both, none.`);
374
368
  }
369
+ return arrowToMarkers(mode);
375
370
  }
376
371
  function parseLineStyle(style) {
377
372
  if (style === "solid" || style === "dashed")
@@ -14,6 +14,7 @@ import { describeUnresolvedMentions, lintNarratedVerbMentions, lintPlainTextDisp
14
14
  import { attachRubricsToResults, loadRubricMap, rubricsForTypes, } from "../lib/rubrics.js";
15
15
  import { DECISION_CARD_RULE, } from "../lib/decision-citation.js";
16
16
  import { registerNotesImport } from "./notes-import.js";
17
+ import { orderByDisplayId } from "../lib/mcp-spec.js";
17
18
  export function registerNotesCommands(program) {
18
19
  const notes = program
19
20
  .command("notes")
@@ -182,13 +183,8 @@ paragraph after headings and chip-only lines. JSON is an object
182
183
  exact_ids: ids.join(","),
183
184
  format: "markdown",
184
185
  });
185
- const found = Array.isArray(notesList) ? notesList : [];
186
- const byDisplayId = new Map();
187
- for (const n of found) {
188
- if (typeof n.displayId === "string")
189
- byDisplayId.set(n.displayId, n);
190
- }
191
- const missing = ids.filter((id) => !byDisplayId.has(id));
186
+ // In input order, so callers can index by position.
187
+ const { ordered, missing } = orderByDisplayId(ids, notesList);
192
188
  if (missing.length > 0) {
193
189
  // A note written in one of your drafts has its id from the start but
194
190
  // lives in the draft until it lands: say which proposal holds it.
@@ -207,8 +203,6 @@ paragraph after headings and chip-only lines. JSON is an object
207
203
  }
208
204
  throw new NotFoundError(`Notes not found: ${missing.join(", ")}`, "Run `cnotes notes list` to see valid display IDs in this workspace.");
209
205
  }
210
- // Preserve input order so callers can index by position.
211
- const ordered = ids.map((id) => byDisplayId.get(id));
212
206
  if (opts.contentOnly) {
213
207
  // Raw markdown only — no JSON envelope, no chrome. When several notes
214
208
  // are requested, delimit each with an HTML comment (valid markdown,