@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.
- package/.claude-plugin/plugin.json +1 -1
- package/dist/commands/canvas.js +6 -11
- package/dist/commands/notes.js +3 -9
- package/dist/lib/mcp-spec.js +636 -0
- package/dist/lib/section-update.js +9 -46
- package/dist/mcp-server.js +87 -316
- package/package.json +1 -1
package/dist/commands/canvas.js
CHANGED
|
@@ -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
|
-
|
|
364
|
-
|
|
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")
|
package/dist/commands/notes.js
CHANGED
|
@@ -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
|
-
|
|
186
|
-
const
|
|
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,
|