@creator-notes/cnotes 0.125.5 → 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.
@@ -0,0 +1,21 @@
1
+ /**
2
+ * What `canvas update-section` and the MCP tool `cnotes_canvas_update_section`
3
+ * send for a frame edit, decided in one place for both. The rule itself lives
4
+ * in lib/mcp-spec.ts (planSectionUpdate), where the remote connector in the app
5
+ * reads it too; this wrapper turns a refusal into the CLI's ValidationError.
6
+ */
7
+ import { ValidationError } from "./errors.js";
8
+ import { MCP_SECTION_WORDING, planSectionUpdate, } from "./mcp-spec.js";
9
+ export { MCP_SECTION_WORDING };
10
+ export const CLI_SECTION_WORDING = {
11
+ x: "--x",
12
+ y: "--y",
13
+ size: "--width/--height",
14
+ label: "--name/--color",
15
+ };
16
+ export function buildSectionUpdateRequest(input, wording) {
17
+ const plan = planSectionUpdate(input, wording);
18
+ if (!plan.ok)
19
+ throw new ValidationError(plan.message, plan.hint);
20
+ return plan.value;
21
+ }