@stablebaseline/sdk 0.3.0 → 0.4.0

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/dist/index.d.cts CHANGED
@@ -74,7 +74,7 @@ interface paths {
74
74
  put?: never;
75
75
  /**
76
76
  * listArchitectureIcons
77
- * @description List curated software-architecture icons (AWS, Azure, GCP, Docker, Kubernetes, databases, message queues, etc.). Each result has an `iconPath` (e.g. 'dev/docker.svg'). TWO ways to use it: (1) on a WHITEBOARD, drop it via addWhiteboardElements({ type:'image', iconPath:'dev/docker.svg', x, y, width:96, height:96, text:'Docker' }); (2) in a D2 systems-architecture diagram, use the iconPath as-is in D2 code (e.g. icon: dev/docker.svg).
77
+ * @description SOFTWARE & CLOUD architecture icons ONLY (AWS, Azure, GCP, Docker, Kubernetes, databases, message queues, dev tools, etc.). This catalog has NO general/nature/science/people/business icons — so for any NON-technical topic (e.g. photosynthesis, biology, history, marketing), do NOT use this tool; instead put a relevant emoji directly in the element's label (e.g. ☀️ Sunlight, 💧 Water, 🌿 Leaf). It returns nothing for off-domain queries by design — never force an unrelated tech logo onto a non-tech concept. Each result has an `iconPath` (e.g. 'dev/docker.svg'). TWO ways to use it: (1) on a WHITEBOARD, drop it via addWhiteboardElements({ type:'image', iconPath:'dev/docker.svg', x, y, width:96, height:96, text:'Docker' }); (2) in a D2 systems-architecture diagram, use the iconPath as-is in D2 code (e.g. icon: dev/docker.svg).
78
78
  */
79
79
  post: operations["listArchitectureIcons"];
80
80
  delete?: never;
@@ -83,6 +83,26 @@ interface paths {
83
83
  patch?: never;
84
84
  trace?: never;
85
85
  };
86
+ "/tools/searchInfographicTemplates": {
87
+ parameters: {
88
+ query?: never;
89
+ header?: never;
90
+ path?: never;
91
+ cookie?: never;
92
+ };
93
+ get?: never;
94
+ put?: never;
95
+ /**
96
+ * searchInfographicTemplates
97
+ * @description Semantic search over the 276 AntV Infographic templates — call this FIRST when building an `infographic` diagram so you pick the right structure for the content. Describe the intent (e.g. 'compare two options', 'show a process timeline', 'pyramid of priorities', 'org hierarchy', 'flow between systems', 'parts of a whole'); results are vector-ranked. Each result has `key` (use as line 1 `infographic <key>`), `name`, `family` (list|sequence|compare|relation|chart|hierarchy|quadrant), and `description`. The result's `usage` explains the family→data-field mapping for writing the DSL.
98
+ */
99
+ post: operations["searchInfographicTemplates"];
100
+ delete?: never;
101
+ options?: never;
102
+ head?: never;
103
+ patch?: never;
104
+ trace?: never;
105
+ };
86
106
  "/tools/getCdmdLanguageGuide": {
87
107
  parameters: {
88
108
  query?: never;
@@ -603,6 +623,26 @@ interface paths {
603
623
  patch?: never;
604
624
  trace?: never;
605
625
  };
626
+ "/tools/designWhiteboard": {
627
+ parameters: {
628
+ query?: never;
629
+ header?: never;
630
+ path?: never;
631
+ cookie?: never;
632
+ };
633
+ get?: never;
634
+ put?: never;
635
+ /**
636
+ * designWhiteboard
637
+ * @description Design a complete, visually polished whiteboard from a natural-language goal using the PREMIUM multi-agent pipeline (the same one the in-app assistant uses): it browses the stencil/icon library, composes the board, renders it, critiques the rendered image, and refines — far better than hand-placing shapes. COST + APPROVAL: this costs 50 credits per board and requires the user's explicit approval. Call it FIRST without `confirm` to get the exact cost + the workspace credit balance; show that to the user and only call again with `confirm: true` once they agree. If they decline (or lack credits), build the board directly with the standard whiteboard tools (addWhiteboardElements / insertWhiteboardDiagram / listWhiteboardStencils) at no extra charge. It runs in the BACKGROUND and returns immediately with a sessionId; the board fills in over 1-3 minutes. The 50 credits are refunded automatically if the design fails on our side.
638
+ */
639
+ post: operations["designWhiteboard"];
640
+ delete?: never;
641
+ options?: never;
642
+ head?: never;
643
+ patch?: never;
644
+ trace?: never;
645
+ };
606
646
  "/tools/createWhiteboard": {
607
647
  parameters: {
608
648
  query?: never;
@@ -674,7 +714,7 @@ interface paths {
674
714
  put?: never;
675
715
  /**
676
716
  * updateWhiteboardScene
677
- * @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene (use ONLY when intentionally rewriting the whole board). To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.
717
+ * @description Edit elements on a whiteboard's canvas WITHOUT dropping the rest of the scene. A board may hold many diagrams/elements, so prefer surgical edits: mode='patch' (DEFAULT) shallow-merges each incoming object into the existing element with the same `id` (send just {id, backgroundColor:'blue'} to recolour one box, or {id, x, y} to move one) and appends any elements whose id is new/absent — everything else is left untouched. `deleteIds` removes specific elements by id. mode='append' only adds. mode='replace' overwrites the ENTIRE scene — to rebuild or edit only PART of a board, still use 'patch', because replace DELETES every element you don't resend (of ANY type). As a safeguard, a replace that would drop ANY existing element not in your payload is REJECTED unless you pass confirmReplace:true (or include those ids); diagrams/images/frames are flagged specially since they're inserted separately and costliest to lose. To author NEW shapes/connectors from a high-level spec, prefer addWhiteboardElements — and prefer library stencils / sticky notes / architecture icons over plain rectangles wherever a standard form fits (sticky notes, kanban/scrum, flowcharts, UML/ER, BPMN, org charts, wireframes). Optional appState/files are merged in. PROCESS: for a non-trivial edit call getWhiteboardGuide FIRST; after editing, ALWAYS call getWhiteboardImage to confirm the board still looks right (layout, labels, overlaps), and patch again if it doesn't.
678
718
  */
679
719
  post: operations["updateWhiteboardScene"];
680
720
  delete?: never;
@@ -694,7 +734,7 @@ interface paths {
694
734
  put?: never;
695
735
  /**
696
736
  * addWhiteboardElements
697
- * @description Author shapes onto a whiteboard from high-level specs (you do NOT need the full Excalidraw element schema). Appends to the canvas. PREFER THE RICHEST FORM THAT FITS, not plain rectangles: for a sticky/post-it note use { type:'sticky', text, backgroundColor } (a first-class note with an auto-fitting bound label — there is NO sticky-note stencil; OMIT x/y and it is auto-placed in clear space below existing content, so it doesn't land on top of the current drawing); for kanban/scrum/story boards, flowcharts, UML/ER, BPMN, org charts, wireframes/mockups, charts or people use a LIBRARY STENCIL in ONE call — { type:'stencil', stencil:'<name e.g. decision>', x, y } fuzzy-matches by name with no prior listWhiteboardStencils call (pass width/height to SCALE the whole stencil and text to fill its single label); for cloud/software-architecture use ICONS — { type:'image', iconPath:'dev/docker.svg', x, y } (paths from listArchitectureIcons); reserve raw rectangles/ellipses for when no standard form fits. Expressive enough to reproduce real Excalidraw templates (sticky-note brainstorm grids, sketchy mind maps, flowcharts). Each spec: { type: 'rectangle'|'ellipse'|'diamond'|'sticky'|'text'|'arrow'|'line'|'frame'|'image'|'stencil', id?, x, y, width, height, text? (STRONGLY PREFER setting a shape's label via its own `text` — it becomes a centered, auto-WRAPPED bound label fitted to the shape; do NOT drop a separate type:'text' element on top of a shape as its label. Standalone type:'text' is for free-floating titles/notes and now also wraps to its width; Yes/No label on an arrow — emojis are fine, e.g. 'Risks ⚠️'), fontSize?, fontFamily? (1=hand-drawn default, 2=normal, 3=code), textAlign?, backgroundColor? (name 'blue'/'green'/'yellow'/'pink'/'violet'/'orange'/'teal'/… or hex), strokeColor?, fillStyle? ('solid'|'hachure'|'cross-hatch'), strokeStyle? ('solid'|'dashed'|'dotted' — use 'dashed' for grid/category borders), strokeWidth? (1 thin/2 bold/4 extra), roughness? (0 clean, 1 default, 2 very sketchy/hand-drawn — use 2 for organic mind maps), roundness? (number type or null for sharp), opacity?, name? (frame title), frameId? (put a shape inside a frame), start?:{id}, end?:{id} (connect arrows/lines to shapes by id — connectors AUTO-CLIP to the shape edges, never overrun to the centre, AUTO-ROUTE around any shapes in between so a decision's No/loop-back branch never cuts straight through the boxes between source and target, and bound text auto-wraps + centres), routing? ('straight' default | 'elbow' for clean right-angle flowchart/org-chart connectors | 'curved'), startArrowhead?/endArrowhead? (arrowheads are SOLID filled triangles by default — just OMIT them. Pass null for a plain mind-map spoke with no head. Do NOT pass 'arrow': that is Excalidraw's open 'V' and is auto-upgraded to a solid triangle anyway), points? ([[0,0],[dx,dy]] relative, only for manual geometry — almost never needed; binding by id is better), props? (escape hatch: any other Excalidraw field) }. ARCHITECTURE ICONS: to place a software-architecture icon (AWS/Azure/GCP/Docker/Kubernetes/databases/etc.), first call listArchitectureIcons to find one, then add a spec { type:'image', iconPath:'<relative_url e.g. dev/docker.svg>', x, y, width:96, height:96, text?:'<caption shown below>' } — the icon is stored as a URL reference (never base64). Use imageUrl instead of iconPath for any other public image. Combine icons with labelled boxes + elbow arrows for clean architecture diagrams. LIBRARY STENCILS: for hand-drawn, on-brand elements (scrum/kanban columns, flowchart symbols, UML/ER, BPMN, org-chart nodes, wireframe widgets, stick figures), FIRST call listWhiteboardStencils to find one, then add { type:'stencil', stencilKey:'<key from listWhiteboardStencils>', x, y } (or { type:'stencil', stencil:'<name e.g. decision>', pack?:'<pack>', x, y } to fuzzy-match by name). A stencil is a mini-whiteboard (a collection of elements) of kind 'symbol' or 'template' (listWhiteboardStencils returns the kind + its embedded `labels`). For a SYMBOL (one atomic labelled node — flowchart box, BPMN task, org node), pass id + text + width/height: the label auto-fits its single slot and arrows bind to it via start/end {id}. For a TEMPLATE (a multi-component layout — Alerts, Forms, Tables, Charts), place it WHOLE (no single text); the result returns its `children` (id + text + colour + position) so you retext, recolour, or DELETE specific parts by id via updateWhiteboardScene (cluster children by y to act on a whole row/variant). STRONGLY prefer stencils over plain rectangles for wireframes/mockups, kanban/scrum boards, UML/BPMN, org charts; for dense flowcharts, plain shapes with bound text + elbow arrows are equally reliable. (For a plain sticky/post-it note use type:'sticky', NOT a stencil — there is no sticky-note stencil.) FRAMES: a frame is a NON-DESTRUCTIVE, ANY-SIZE container. To enclose shapes that ALREADY exist, add ONE type:'frame' sized to cover them (Excalidraw auto-captures elements inside a frame's bounds) or set those shapes' frameId — never recreate or delete-and-redraw content just to frame it. If a frame doesn't fully cover its content, just RESIZE the frame (patch its width/height). Deleting a frame (deleteIds:[frameId]) leaves all its contents intact on the canvas — it only removes the frame border + title. PRESENTATION/SLIDES: when the user wants a presentation or slide deck, create type:'frame' slides sized width:1280,height:720 (16:9), laid out LEFT-TO-RIGHT at the same y (x: 0, then 1440, 2880, 4320, …), each with a `name` (the slide title). Put every slide's shapes/text/images INSIDE its frame by setting their frameId to that frame's id (give the frame an id and reference it). Slides play in order (left-to-right, then top-to-bottom) in the board's Present mode and export to PPTX, so one frame = one slide. FLOWCHART recipe: rectangles (roundness null for sharp process boxes), diamonds for decisions, arrows with routing:'elbow' and Yes/No as the arrow's text. Use type 'sticky' for sticky/post-it notes (a solid-fill note with an auto-fitting bound label — set text + backgroundColor); type 'line' with no arrowheads + roughness:2 for sketchy mind-map spokes. Give shapes ids and reference them from connectors. Connectors may also bind to shapes ALREADY on the board by their id (get them via getWhiteboard includeElements:true) — you do NOT need to resend existing shapes; the server reads the live scene to bind the arrow and route it around the other boxes. Great for brainstorms, mind maps, flowcharts, org charts, SWOT, retros. PROCESS: for any non-trivial board call getWhiteboardGuide FIRST to plan it; then after adding, ALWAYS call getWhiteboardImage to SEE the result and check layout, labels, spacing, overlaps and how shapes connect — if anything looks off, fix it with updateWhiteboardScene (patch by id) and render again, iterating until it looks right. RESULT: returns `added` (count), `placement` (bounding box {x,y,width,height} of what you just added) and `autoPlaced` (true when you omitted x/y so it was placed in clear space below existing content) — use placement/autoPlaced to tell the user WHERE the new elements landed, never invent a location.
737
+ * @description Author shapes onto a whiteboard from high-level specs (you do NOT need the full Excalidraw element schema). Appends to the canvas. PLACEMENT ON AN EXISTING BOARD (critical): NEVER guess x/y onto a board that already has content — guessed coordinates land ON TOP of existing shapes and create an unreadable pile. Either (a) OMIT x/y entirely and the server auto-places the new elements together in clear space BELOW the current content, or (b) FIRST call getWhiteboard({ includeElements:true }) to see where existing shapes already are and choose a genuinely EMPTY region. Pass explicit x/y only for a deliberate layout in space you have confirmed is empty. PREFER THE RICHEST FORM THAT FITS, not plain rectangles: for a sticky/post-it note use { type:'sticky', text, backgroundColor } (a first-class note with an auto-fitting bound label — there is NO sticky-note stencil; OMIT x/y and it is auto-placed in clear space below existing content, so it doesn't land on top of the current drawing); for kanban/scrum/story boards, flowcharts, UML/ER, BPMN, org charts, wireframes/mockups, charts or people use a LIBRARY STENCIL in ONE call — { type:'stencil', stencil:'<name e.g. decision>', x, y } fuzzy-matches by name with no prior listWhiteboardStencils call (pass width/height to SCALE the whole stencil and text to fill its single label); for cloud/software-architecture use ICONS — { type:'image', iconPath:'dev/docker.svg', x, y } (paths from listArchitectureIcons); reserve raw rectangles/ellipses for when no standard form fits. Expressive enough to reproduce real Excalidraw templates (sticky-note brainstorm grids, sketchy mind maps, flowcharts). Each spec: { type: 'rectangle'|'ellipse'|'diamond'|'sticky'|'text'|'arrow'|'line'|'freedraw'|'frame'|'image'|'stencil', id?, x, y, width, height, text? (STRONGLY PREFER setting a shape's label via its own `text` — it becomes a centered, auto-WRAPPED bound label fitted to the shape; do NOT drop a separate type:'text' element on top of a shape as its label. Standalone type:'text' is for free-floating titles/notes and now also wraps to its width; Yes/No label on an arrow — emojis are fine, e.g. 'Risks ⚠️'), fontSize?, fontFamily? (1=hand-drawn default, 2=normal, 3=code), textAlign?, backgroundColor? (name 'blue'/'green'/'yellow'/'pink'/'violet'/'orange'/'teal'/… or hex), strokeColor?, fillStyle? ('solid'|'hachure'|'cross-hatch'), strokeStyle? ('solid'|'dashed'|'dotted' — use 'dashed' for grid/category borders), strokeWidth? (1 thin/2 bold/4 extra), roughness? (0 clean, 1 default, 2 very sketchy/hand-drawn — use 2 for organic mind maps), roundness? (number type or null for sharp), opacity?, name? (frame title), frameId? (put a shape inside a frame), start?:{id}, end?:{id} (connect arrows/lines to shapes by id — connectors AUTO-CLIP to the shape edges, never overrun to the centre, AUTO-ROUTE around any shapes in between so a decision's No/loop-back branch never cuts straight through the boxes between source and target, and bound text auto-wraps + centres), routing? ('straight' default | 'elbow' for clean right-angle flowchart/org-chart connectors | 'curved'), startArrowhead?/endArrowhead? (arrowheads are SOLID filled triangles by default — just OMIT them. Pass null for a plain mind-map spoke with no head. Do NOT pass 'arrow': that is Excalidraw's open 'V' and is auto-upgraded to a solid triangle anyway), points? ([[0,0],[dx,dy]] relative, only for manual geometry — almost never needed; binding by id is better), props? (escape hatch: any other Excalidraw field) }. ARCHITECTURE ICONS: to place a software-architecture icon (AWS/Azure/GCP/Docker/Kubernetes/databases/etc.), first call listArchitectureIcons to find one, then add a spec { type:'image', iconPath:'<relative_url e.g. dev/docker.svg>', x, y, width:96, height:96, text?:'<caption shown below>' } — the icon is stored as a URL reference (never base64). Use imageUrl instead of iconPath for any other public image. Combine icons with labelled boxes + elbow arrows for clean architecture diagrams. LIBRARY STENCILS: for hand-drawn, on-brand elements (scrum/kanban columns, flowchart symbols, UML/ER, BPMN, org-chart nodes, wireframe widgets, stick figures), FIRST call listWhiteboardStencils to find one, then add { type:'stencil', stencilKey:'<key from listWhiteboardStencils>', x, y } (or { type:'stencil', stencil:'<name e.g. decision>', pack?:'<pack>', x, y } to fuzzy-match by name). A stencil is a mini-whiteboard (a collection of elements) of kind 'symbol' or 'template' (listWhiteboardStencils returns the kind + its embedded `labels`). For a SYMBOL (one atomic labelled node — flowchart box, BPMN task, org node), pass id + text + width/height: the label auto-fits its single slot and arrows bind to it via start/end {id}. For a TEMPLATE (a multi-component layout — Alerts, Forms, Tables, Charts), place it WHOLE (no single text); the result returns its `children` (id + text + colour + position) so you retext, recolour, or DELETE specific parts by id via updateWhiteboardScene (cluster children by y to act on a whole row/variant). STRONGLY prefer stencils over plain rectangles for wireframes/mockups, kanban/scrum boards, UML/BPMN, org charts; for dense flowcharts, plain shapes with bound text + elbow arrows are equally reliable. (For a plain sticky/post-it note use type:'sticky', NOT a stencil — there is no sticky-note stencil.) FRAMES: a frame is a NON-DESTRUCTIVE, ANY-SIZE container. To enclose shapes that ALREADY exist, add ONE type:'frame' sized to cover them (Excalidraw auto-captures elements inside a frame's bounds) or set those shapes' frameId — never recreate or delete-and-redraw content just to frame it. If a frame doesn't fully cover its content, just RESIZE the frame (patch its width/height). Deleting a frame (deleteIds:[frameId]) leaves all its contents intact on the canvas — it only removes the frame border + title. PRESENTATION/SLIDES: when the user wants a presentation or slide deck, create type:'frame' slides sized width:1280,height:720 (16:9), laid out LEFT-TO-RIGHT at the same y (x: 0, then 1440, 2880, 4320, …), each with a `name` (the slide title). Put every slide's shapes/text/images INSIDE its frame by setting their frameId to that frame's id (give the frame an id and reference it). Slides play in order (left-to-right, then top-to-bottom) in the board's Present mode and export to PPTX, so one frame = one slide. FLOWCHART recipe: rectangles (roundness null for sharp process boxes), diamonds for decisions, arrows with routing:'elbow' and Yes/No as the arrow's text. Use type 'sticky' for sticky/post-it notes (a solid-fill note with an auto-fitting bound label — set text + backgroundColor); type 'line' with no arrowheads + roughness:2 for sketchy mind-map spokes. FREEHAND DOODLES: to actually draw/doodle/sketch freehand, use { type:'freedraw', points } where points is a RELATIVE [[x,y],…] path of the stroke (e.g. a squiggle, circling or annotating something, a hand-drawn star/heart/smiley/arrow, an organic blob) — it renders as one smooth freehand stroke. x/y is the origin; omit x/y to auto-place. Chain several freedraw specs for a multi-stroke doodle. NOTE: freehand is always SOLID (Excalidraw ignores strokeStyle on freedraw) — colour, strokeWidth and opacity DO apply; a freedraw with strokeStyle:'dashed' or 'dotted' is automatically rendered as a smooth dashed/dotted line so the dashes actually show. Give shapes ids and reference them from connectors. Connectors may also bind to shapes ALREADY on the board by their id (get them via getWhiteboard includeElements:true) — you do NOT need to resend existing shapes; the server reads the live scene to bind the arrow and route it around the other boxes. Great for brainstorms, mind maps, flowcharts, org charts, SWOT, retros. PROCESS: for any non-trivial board call getWhiteboardGuide FIRST to plan it; then after adding, ALWAYS call getWhiteboardImage to SEE the result and check layout, labels, spacing, overlaps and how shapes connect — if anything looks off, fix it with updateWhiteboardScene (patch by id) and render again, iterating until it looks right. RESULT: returns `added` (count), `placement` (bounding box {x,y,width,height} of what you just added) and `autoPlaced` (true when you omitted x/y so it was placed in clear space below existing content) — use placement/autoPlaced to tell the user WHERE the new elements landed, never invent a location.
698
738
  */
699
739
  post: operations["addWhiteboardElements"];
700
740
  delete?: never;
@@ -763,6 +803,46 @@ interface paths {
763
803
  patch?: never;
764
804
  trace?: never;
765
805
  };
806
+ "/tools/traceImage": {
807
+ parameters: {
808
+ query?: never;
809
+ header?: never;
810
+ path?: never;
811
+ cookie?: never;
812
+ };
813
+ get?: never;
814
+ put?: never;
815
+ /**
816
+ * traceImage
817
+ * @description Turn a raster image into hand-drawn freedraw strokes on a whiteboard, deterministically. Pass an image (imageUrl OR imageBase64) plus a style; the server fetches and vectorises it server-side and draws the strokes, so you do NOT emit any coordinates yourself (LLMs are poor at that and it wastes tokens). Use this for requests like 'sketch this image onto the board', portraits, or turning a logo into line art. style: 'sketch' (~3 colors, clean line art; default), 'color' (~8 colors), 'poster' (~12 colors). Returns a compact summary (stroke count), never the raw coordinates. Auto-places to the right of existing content unless x/y are given.
818
+ */
819
+ post: operations["traceImage"];
820
+ delete?: never;
821
+ options?: never;
822
+ head?: never;
823
+ patch?: never;
824
+ trace?: never;
825
+ };
826
+ "/tools/dataToTable": {
827
+ parameters: {
828
+ query?: never;
829
+ header?: never;
830
+ path?: never;
831
+ cookie?: never;
832
+ };
833
+ get?: never;
834
+ put?: never;
835
+ /**
836
+ * dataToTable
837
+ * @description Render tabular data as an aligned grid of labelled cells on a whiteboard, deterministically. Pass rows (an array of arrays) OR data (an array of objects), with optional headers; the server lays out evenly-spaced cells so you do NOT place each cell by hand. Use this to turn data, CSV, or JSON into a readable table on the board. Returns a compact summary. Auto-places below existing content unless x/y are given.
838
+ */
839
+ post: operations["dataToTable"];
840
+ delete?: never;
841
+ options?: never;
842
+ head?: never;
843
+ patch?: never;
844
+ trace?: never;
845
+ };
766
846
  "/tools/listWhiteboardStencils": {
767
847
  parameters: {
768
848
  query?: never;
@@ -3993,6 +4073,91 @@ interface operations {
3993
4073
  };
3994
4074
  };
3995
4075
  };
4076
+ searchInfographicTemplates: {
4077
+ parameters: {
4078
+ query?: never;
4079
+ header?: never;
4080
+ path?: never;
4081
+ cookie?: never;
4082
+ };
4083
+ requestBody?: {
4084
+ content: {
4085
+ "application/json": {
4086
+ /** @description What the infographic should show (intent/topic), e.g. 'compare pros and cons', 'launch roadmap timeline', 'market share pie'. */
4087
+ query: string;
4088
+ /** @description Max templates to return (default 12). */
4089
+ limit?: number;
4090
+ };
4091
+ };
4092
+ };
4093
+ responses: {
4094
+ /** @description Tool result (shape varies per tool — refer to the tool's docs for the exact return value). */
4095
+ 200: {
4096
+ headers: {
4097
+ [name: string]: unknown;
4098
+ };
4099
+ content: {
4100
+ "application/json": {
4101
+ [key: string]: unknown;
4102
+ };
4103
+ };
4104
+ };
4105
+ /** @description Validation error. */
4106
+ 400: {
4107
+ headers: {
4108
+ [name: string]: unknown;
4109
+ };
4110
+ content: {
4111
+ "application/json": components["schemas"]["ErrorResponse"];
4112
+ };
4113
+ };
4114
+ /** @description Missing or invalid credentials. */
4115
+ 401: {
4116
+ headers: {
4117
+ [name: string]: unknown;
4118
+ };
4119
+ content: {
4120
+ "application/json": components["schemas"]["ErrorResponse"];
4121
+ };
4122
+ };
4123
+ /** @description Authenticated but lacking the required permission or feature flag. */
4124
+ 403: {
4125
+ headers: {
4126
+ [name: string]: unknown;
4127
+ };
4128
+ content: {
4129
+ "application/json": components["schemas"]["ErrorResponse"];
4130
+ };
4131
+ };
4132
+ /** @description Resource not found. */
4133
+ 404: {
4134
+ headers: {
4135
+ [name: string]: unknown;
4136
+ };
4137
+ content: {
4138
+ "application/json": components["schemas"]["ErrorResponse"];
4139
+ };
4140
+ };
4141
+ /** @description Body did not match the tool's input schema. */
4142
+ 422: {
4143
+ headers: {
4144
+ [name: string]: unknown;
4145
+ };
4146
+ content: {
4147
+ "application/json": components["schemas"]["ErrorResponse"];
4148
+ };
4149
+ };
4150
+ /** @description Server error. */
4151
+ 500: {
4152
+ headers: {
4153
+ [name: string]: unknown;
4154
+ };
4155
+ content: {
4156
+ "application/json": components["schemas"]["ErrorResponse"];
4157
+ };
4158
+ };
4159
+ };
4160
+ };
3996
4161
  getCdmdLanguageGuide: {
3997
4162
  parameters: {
3998
4163
  query?: never;
@@ -5888,7 +6053,7 @@ interface operations {
5888
6053
  documentVersionTimestamp: number;
5889
6054
  /** @description Diagram type (e.g. mermaid, plantuml, bpmn, d2). Call listDiagramTypes for all types. */
5890
6055
  type: string;
5891
- /** @description Diagram DSL code. Call getDiagramTypeGuide for syntax. */
6056
+ /** @description Diagram DSL code. Call getDiagramTypeGuide for syntax. EXCEPTION — for type 'infographic', put a plain-English DESCRIPTION of the infographic here (NOT code); the system designs the AntV spec and renders it. */
5892
6057
  diagramCode: string;
5893
6058
  /** @description Short description of what the diagram shows (1-2 sentences). */
5894
6059
  prompt: string;
@@ -6345,6 +6510,97 @@ interface operations {
6345
6510
  };
6346
6511
  };
6347
6512
  };
6513
+ designWhiteboard: {
6514
+ parameters: {
6515
+ query?: never;
6516
+ header?: never;
6517
+ path?: never;
6518
+ cookie?: never;
6519
+ };
6520
+ requestBody?: {
6521
+ content: {
6522
+ "application/json": {
6523
+ /** @description The board to build, in plain language. */
6524
+ goal: string;
6525
+ /** @description Optional board title. If omitted, a clear title is derived from the goal (the board is never left 'Untitled'). When designing into an existing 'Untitled' board, the derived/explicit title replaces the placeholder. */
6526
+ title?: string;
6527
+ /** @description Optional. An existing whiteboard to design into. If omitted, a new whiteboard is created in projectId. */
6528
+ documentId?: string;
6529
+ /** @description The project to create the whiteboard in, when no documentId is given. */
6530
+ projectId?: string;
6531
+ /** @description Set true ONLY after the user has approved the 50-credit cost. Leave unset/false on the first call to receive the cost quote + balance. */
6532
+ confirm?: boolean;
6533
+ };
6534
+ };
6535
+ };
6536
+ responses: {
6537
+ /** @description Tool result (shape varies per tool — refer to the tool's docs for the exact return value). */
6538
+ 200: {
6539
+ headers: {
6540
+ [name: string]: unknown;
6541
+ };
6542
+ content: {
6543
+ "application/json": {
6544
+ [key: string]: unknown;
6545
+ };
6546
+ };
6547
+ };
6548
+ /** @description Validation error. */
6549
+ 400: {
6550
+ headers: {
6551
+ [name: string]: unknown;
6552
+ };
6553
+ content: {
6554
+ "application/json": components["schemas"]["ErrorResponse"];
6555
+ };
6556
+ };
6557
+ /** @description Missing or invalid credentials. */
6558
+ 401: {
6559
+ headers: {
6560
+ [name: string]: unknown;
6561
+ };
6562
+ content: {
6563
+ "application/json": components["schemas"]["ErrorResponse"];
6564
+ };
6565
+ };
6566
+ /** @description Authenticated but lacking the required permission or feature flag. */
6567
+ 403: {
6568
+ headers: {
6569
+ [name: string]: unknown;
6570
+ };
6571
+ content: {
6572
+ "application/json": components["schemas"]["ErrorResponse"];
6573
+ };
6574
+ };
6575
+ /** @description Resource not found. */
6576
+ 404: {
6577
+ headers: {
6578
+ [name: string]: unknown;
6579
+ };
6580
+ content: {
6581
+ "application/json": components["schemas"]["ErrorResponse"];
6582
+ };
6583
+ };
6584
+ /** @description Body did not match the tool's input schema. */
6585
+ 422: {
6586
+ headers: {
6587
+ [name: string]: unknown;
6588
+ };
6589
+ content: {
6590
+ "application/json": components["schemas"]["ErrorResponse"];
6591
+ };
6592
+ };
6593
+ /** @description Server error. */
6594
+ 500: {
6595
+ headers: {
6596
+ [name: string]: unknown;
6597
+ };
6598
+ content: {
6599
+ "application/json": components["schemas"]["ErrorResponse"];
6600
+ };
6601
+ };
6602
+ };
6603
+ };
6348
6604
  createWhiteboard: {
6349
6605
  parameters: {
6350
6606
  query?: never;
@@ -6356,8 +6612,8 @@ interface operations {
6356
6612
  content: {
6357
6613
  "application/json": {
6358
6614
  projectId: string;
6359
- /** @description Whiteboard title. Defaults to 'Untitled whiteboard'. */
6360
- title?: string;
6615
+ /** @description REQUIRED. A clear, descriptive board name (e.g. 'Q3 GTM plan'). Programmatic boards must be titled — blank/'Untitled' titles are rejected. */
6616
+ title: string;
6361
6617
  /** @description Optional folder to file the whiteboard under. */
6362
6618
  folderId?: string;
6363
6619
  };
@@ -6611,7 +6867,7 @@ interface operations {
6611
6867
  /** @description Elements to write. For mode 'patch', each may be a partial { id, ...changedFields } merged into the matching element by id; full Excalidraw elements for 'replace'/'append' (or new ids in 'patch'). */
6612
6868
  elements?: Record<string, never>[];
6613
6869
  /**
6614
- * @description patch (DEFAULT — merge by id, keep the rest), append (add only), or replace (overwrite the whole scene).
6870
+ * @description How to apply your `elements`. patch (DEFAULT — use this for ANY partial edit): merges each item into the element with the same id and leaves everything else untouched, like find-and-replace by id; new ids are added. append: only adds your items, changes nothing else. replace: OVERWRITES THE WHOLE CANVAS — every existing element you don't resend is DELETED — so use it ONLY to set an entire board at once. To change or rebuild just a SECTION, use patch (+ deleteIds to remove specific ids), NEVER replace. A replace that would drop any existing element is rejected unless confirmReplace:true.
6615
6871
  * @enum {string}
6616
6872
  */
6617
6873
  mode?: "patch" | "append" | "replace";
@@ -6623,6 +6879,8 @@ interface operations {
6623
6879
  files?: Record<string, never>;
6624
6880
  /** @description Optional optimistic-locking token from getWhiteboard. Only used for mode 'replace': if the board changed since you read it, the replace is rejected so you don't overwrite a collaborator's newer edits — re-read with getWhiteboard and retry. Not needed for patch/append, which automatically merge onto the latest scene. */
6625
6881
  versionTimestamp?: number;
6882
+ /** @description Safety acknowledgement for mode 'replace' ONLY. A replace that would DELETE ANY existing element not present in your `elements` is rejected unless this is true. Leave it unset and use mode:'patch' to edit part of a board (it merges by id and keeps the rest); set true only when you truly intend to overwrite the WHOLE scene. */
6883
+ confirmReplace?: boolean;
6626
6884
  };
6627
6885
  };
6628
6886
  };
@@ -6711,7 +6969,7 @@ interface operations {
6711
6969
  * @description Element kind. 'sticky' = a first-class sticky/post-it note (solid fill + auto-fitting bound label; set text + backgroundColor) — use this for sticky notes, NOT a stencil. 'stencil' = a hand-drawn library graphic from listWhiteboardStencils, of kind 'symbol' (one atomic labelled node — flowchart box, BPMN task, org node: set `id` + `text` + width/height, text auto-fits, connect arrows via start/end {id}) or 'template' (a multi-element layout — Alerts, Forms, Tables, Charts: place whole, then customise its returned children by id; do NOT set a single `text`). Set `stencil` (fuzzy name, one call) or `stencilKey` (exact). 'image' with `iconPath` = a software-architecture icon from listArchitectureIcons. Reserve rectangle/ellipse/diamond for when no standard form fits.
6712
6970
  * @enum {string}
6713
6971
  */
6714
- type: "rectangle" | "ellipse" | "diamond" | "sticky" | "text" | "arrow" | "line" | "frame" | "image" | "stencil";
6972
+ type: "rectangle" | "ellipse" | "diamond" | "sticky" | "text" | "arrow" | "line" | "freedraw" | "doodle" | "frame" | "image" | "stencil";
6715
6973
  /** @description For type:'stencil' — fuzzy-match a library stencil by name in ONE call, no prior listWhiteboardStencils needed (e.g. 'decision', 'actor', 'phone frame', 'kanban column'). NOTE: there is no sticky-note stencil — use type:'sticky' for sticky/post-it notes. */
6716
6974
  stencil?: string;
6717
6975
  /** @description For type:'stencil' — exact stencil key from listWhiteboardStencils (takes precedence over `stencil`). */
@@ -6722,6 +6980,8 @@ interface operations {
6722
6980
  iconPath?: string;
6723
6981
  /** @description For type:'image' — any other public image URL (use iconPath for curated architecture icons). */
6724
6982
  imageUrl?: string;
6983
+ /** @description For type:'doodle' — a named hand-drawn accent rendered as a freehand stroke (no points needed): 'underline' | 'wave' | 'arrow' | 'check' | 'bolt' | 'scribble' | 'star' | 'sparkle' | 'circle' (a ring to encircle/emphasise) | 'heart'. Size it with x/y + width/height and colour it with strokeColor. Great for sketchy emphasis (underline a title, circle a stat, a star/sparkle accent). */
6984
+ doodle?: string;
6725
6985
  /** @description Optional id so connectors (arrows/lines) can reference this shape via start/end. On a type:'stencil' it adds a transparent bindable anchor covering the stencil, so an arrow's start/end {id} connects to the whole stencil as a unit. */
6726
6986
  id?: string;
6727
6987
  /** @description Join an existing group. Pass a placed stencil's `groupId` (returned in the placement result) on a type:'text' or shape spec to FILL that frame as part of the same unit — the text then moves, duplicates and renders together with the frame (e.g. a title in a UML class box's top band, members in its body). */
@@ -6738,6 +6998,8 @@ interface operations {
6738
6998
  scale?: number;
6739
6999
  /** @description Label/caption. On a shape it's a centered auto-wrapped bound label (prefer over a separate type:'text'); on a type:'sticky' it's the note text; on a type:'stencil' of kind 'symbol' it fills + re-fits its single label (IGNORED for 'template' stencils — customise their children by id instead). */
6740
7000
  text?: string;
7001
+ /** @description Auto-shrink the bound label's font size so the text always fits inside the shape — no overflow (default true). Set false to keep your exact fontSize even if it spills. */
7002
+ fitText?: boolean;
6741
7003
  /** @description Fill colour: a name ('blue'/'green'/'yellow'/'pink'/'violet'/'orange'/'teal'/…) or a hex value. */
6742
7004
  backgroundColor?: string;
6743
7005
  /** @description For arrows/lines: { id } of the source shape (auto-clips to the edge + auto-routes around shapes in between). */
@@ -7033,7 +7295,7 @@ interface operations {
7033
7295
  documentId: string;
7034
7296
  /** @description Diagram language, e.g. 'bpmn', 'mermaid', 'd2', 'plantuml', 'graphviz'. See listDiagramTypes. */
7035
7297
  diagramType: string;
7036
- /** @description The diagram DSL / code. */
7298
+ /** @description The diagram DSL / code. For type 'infographic', provide a plain-English description instead (the system designs the AntV infographic spec). */
7037
7299
  source: string;
7038
7300
  /** @description Optional caption shown beneath the diagram. */
7039
7301
  caption?: string;
@@ -7121,6 +7383,207 @@ interface operations {
7121
7383
  };
7122
7384
  };
7123
7385
  };
7386
+ traceImage: {
7387
+ parameters: {
7388
+ query?: never;
7389
+ header?: never;
7390
+ path?: never;
7391
+ cookie?: never;
7392
+ };
7393
+ requestBody?: {
7394
+ content: {
7395
+ "application/json": {
7396
+ /** @description The whiteboard's documentId. */
7397
+ documentId: string;
7398
+ /** @description URL to fetch the image from (http/https; private and metadata hosts are blocked). */
7399
+ imageUrl?: string;
7400
+ /** @description Base64-encoded image bytes (a data: URL prefix is allowed). Use instead of imageUrl. */
7401
+ imageBase64?: string;
7402
+ /** @description Optional image MIME type hint (e.g. 'image/png'); auto-detected otherwise. */
7403
+ mimeType?: string;
7404
+ /**
7405
+ * @description Vectorisation style. 'sketch' = clean line art (default), 'color' = more colors, 'poster' = posterised.
7406
+ * @enum {string}
7407
+ */
7408
+ style?: "sketch" | "color" | "poster";
7409
+ /** @description Palette size 2-16 (defaults by style: sketch 3, color 8, poster 12). */
7410
+ maxColors?: number;
7411
+ /** @description Cap on the number of strokes, 20-1200 (default 600). Lower = simpler and faster. */
7412
+ maxStrokes?: number;
7413
+ /** @description Target display width in px (default 520); the drawing scales to fit, aspect preserved. */
7414
+ width?: number;
7415
+ /** @description Top-left x on the canvas. Omit to auto-place to the right of existing content. */
7416
+ x?: number;
7417
+ /** @description Top-left y on the canvas. Omit to auto-place. */
7418
+ y?: number;
7419
+ };
7420
+ };
7421
+ };
7422
+ responses: {
7423
+ /** @description Tool result (shape varies per tool — refer to the tool's docs for the exact return value). */
7424
+ 200: {
7425
+ headers: {
7426
+ [name: string]: unknown;
7427
+ };
7428
+ content: {
7429
+ "application/json": {
7430
+ [key: string]: unknown;
7431
+ };
7432
+ };
7433
+ };
7434
+ /** @description Validation error. */
7435
+ 400: {
7436
+ headers: {
7437
+ [name: string]: unknown;
7438
+ };
7439
+ content: {
7440
+ "application/json": components["schemas"]["ErrorResponse"];
7441
+ };
7442
+ };
7443
+ /** @description Missing or invalid credentials. */
7444
+ 401: {
7445
+ headers: {
7446
+ [name: string]: unknown;
7447
+ };
7448
+ content: {
7449
+ "application/json": components["schemas"]["ErrorResponse"];
7450
+ };
7451
+ };
7452
+ /** @description Authenticated but lacking the required permission or feature flag. */
7453
+ 403: {
7454
+ headers: {
7455
+ [name: string]: unknown;
7456
+ };
7457
+ content: {
7458
+ "application/json": components["schemas"]["ErrorResponse"];
7459
+ };
7460
+ };
7461
+ /** @description Resource not found. */
7462
+ 404: {
7463
+ headers: {
7464
+ [name: string]: unknown;
7465
+ };
7466
+ content: {
7467
+ "application/json": components["schemas"]["ErrorResponse"];
7468
+ };
7469
+ };
7470
+ /** @description Body did not match the tool's input schema. */
7471
+ 422: {
7472
+ headers: {
7473
+ [name: string]: unknown;
7474
+ };
7475
+ content: {
7476
+ "application/json": components["schemas"]["ErrorResponse"];
7477
+ };
7478
+ };
7479
+ /** @description Server error. */
7480
+ 500: {
7481
+ headers: {
7482
+ [name: string]: unknown;
7483
+ };
7484
+ content: {
7485
+ "application/json": components["schemas"]["ErrorResponse"];
7486
+ };
7487
+ };
7488
+ };
7489
+ };
7490
+ dataToTable: {
7491
+ parameters: {
7492
+ query?: never;
7493
+ header?: never;
7494
+ path?: never;
7495
+ cookie?: never;
7496
+ };
7497
+ requestBody?: {
7498
+ content: {
7499
+ "application/json": {
7500
+ /** @description The whiteboard's documentId. */
7501
+ documentId: string;
7502
+ /** @description Rows as arrays of cell strings. If headers is omitted, the first row is treated as the header row. */
7503
+ rows?: string[][];
7504
+ /** @description Alternative to rows: an array of objects; columns come from headers, or the first object's keys. */
7505
+ data?: Record<string, never>[];
7506
+ /** @description Optional column headers (rendered as a styled header row). For data, also selects and orders the columns. */
7507
+ headers?: string[];
7508
+ /** @description Cell width in px, 60-400 (default 160). */
7509
+ cellWidth?: number;
7510
+ /** @description Cell height in px, 28-200 (default 40). */
7511
+ cellHeight?: number;
7512
+ /** @description Top-left x on the canvas. Omit to auto-place below existing content. */
7513
+ x?: number;
7514
+ /** @description Top-left y on the canvas. Omit to auto-place. */
7515
+ y?: number;
7516
+ };
7517
+ };
7518
+ };
7519
+ responses: {
7520
+ /** @description Tool result (shape varies per tool — refer to the tool's docs for the exact return value). */
7521
+ 200: {
7522
+ headers: {
7523
+ [name: string]: unknown;
7524
+ };
7525
+ content: {
7526
+ "application/json": {
7527
+ [key: string]: unknown;
7528
+ };
7529
+ };
7530
+ };
7531
+ /** @description Validation error. */
7532
+ 400: {
7533
+ headers: {
7534
+ [name: string]: unknown;
7535
+ };
7536
+ content: {
7537
+ "application/json": components["schemas"]["ErrorResponse"];
7538
+ };
7539
+ };
7540
+ /** @description Missing or invalid credentials. */
7541
+ 401: {
7542
+ headers: {
7543
+ [name: string]: unknown;
7544
+ };
7545
+ content: {
7546
+ "application/json": components["schemas"]["ErrorResponse"];
7547
+ };
7548
+ };
7549
+ /** @description Authenticated but lacking the required permission or feature flag. */
7550
+ 403: {
7551
+ headers: {
7552
+ [name: string]: unknown;
7553
+ };
7554
+ content: {
7555
+ "application/json": components["schemas"]["ErrorResponse"];
7556
+ };
7557
+ };
7558
+ /** @description Resource not found. */
7559
+ 404: {
7560
+ headers: {
7561
+ [name: string]: unknown;
7562
+ };
7563
+ content: {
7564
+ "application/json": components["schemas"]["ErrorResponse"];
7565
+ };
7566
+ };
7567
+ /** @description Body did not match the tool's input schema. */
7568
+ 422: {
7569
+ headers: {
7570
+ [name: string]: unknown;
7571
+ };
7572
+ content: {
7573
+ "application/json": components["schemas"]["ErrorResponse"];
7574
+ };
7575
+ };
7576
+ /** @description Server error. */
7577
+ 500: {
7578
+ headers: {
7579
+ [name: string]: unknown;
7580
+ };
7581
+ content: {
7582
+ "application/json": components["schemas"]["ErrorResponse"];
7583
+ };
7584
+ };
7585
+ };
7586
+ };
7124
7587
  listWhiteboardStencils: {
7125
7588
  parameters: {
7126
7589
  query?: never;
@@ -7396,7 +7859,7 @@ interface operations {
7396
7859
  "application/json": {
7397
7860
  /** @description Diagram language, e.g. 'mermaid', 'd2', 'plantuml', 'graphviz', 'bpmn', 'vegalite'. See listDiagramTypes. */
7398
7861
  diagramType: string;
7399
- /** @description The diagram DSL / code to render. */
7862
+ /** @description The diagram DSL / code to render. For type 'infographic', provide a plain-English description instead (the system designs the AntV infographic spec). */
7400
7863
  source: string;
7401
7864
  /**
7402
7865
  * @description png (default) or jpeg = raster; svg = vector.