@stablebaseline/sdk 0.2.0 → 0.3.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.
- package/dist/index.d.cts +168 -9
- package/dist/index.d.ts +168 -9
- package/openapi.json +232 -9
- package/package.json +4 -4
- package/src/types.generated.ts +168 -9
package/openapi.json
CHANGED
|
@@ -487,7 +487,7 @@
|
|
|
487
487
|
"/tools/listArchitectureIcons": {
|
|
488
488
|
"post": {
|
|
489
489
|
"summary": "listArchitectureIcons",
|
|
490
|
-
"description": "List icons
|
|
490
|
+
"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).",
|
|
491
491
|
"operationId": "listArchitectureIcons",
|
|
492
492
|
"tags": [
|
|
493
493
|
"diagrams"
|
|
@@ -4030,7 +4030,7 @@
|
|
|
4030
4030
|
"/tools/updateWhiteboardScene": {
|
|
4031
4031
|
"post": {
|
|
4032
4032
|
"summary": "updateWhiteboardScene",
|
|
4033
|
-
"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
|
|
4033
|
+
"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.",
|
|
4034
4034
|
"operationId": "updateWhiteboardScene",
|
|
4035
4035
|
"tags": [
|
|
4036
4036
|
"whiteboards"
|
|
@@ -4059,7 +4059,7 @@
|
|
|
4059
4059
|
"append",
|
|
4060
4060
|
"replace"
|
|
4061
4061
|
],
|
|
4062
|
-
"description": "patch (DEFAULT —
|
|
4062
|
+
"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."
|
|
4063
4063
|
},
|
|
4064
4064
|
"deleteIds": {
|
|
4065
4065
|
"type": "array",
|
|
@@ -4075,6 +4075,14 @@
|
|
|
4075
4075
|
"files": {
|
|
4076
4076
|
"type": "object",
|
|
4077
4077
|
"description": "Optional Excalidraw BinaryFiles map (for embedded images), merged in."
|
|
4078
|
+
},
|
|
4079
|
+
"versionTimestamp": {
|
|
4080
|
+
"type": "number",
|
|
4081
|
+
"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."
|
|
4082
|
+
},
|
|
4083
|
+
"confirmReplace": {
|
|
4084
|
+
"type": "boolean",
|
|
4085
|
+
"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."
|
|
4078
4086
|
}
|
|
4079
4087
|
},
|
|
4080
4088
|
"required": [
|
|
@@ -4162,7 +4170,7 @@
|
|
|
4162
4170
|
"/tools/addWhiteboardElements": {
|
|
4163
4171
|
"post": {
|
|
4164
4172
|
"summary": "addWhiteboardElements",
|
|
4165
|
-
"description": "Author shapes onto a whiteboard from high-level specs (you do NOT need the full Excalidraw element schema). Appends to the canvas. 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 (
|
|
4173
|
+
"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.",
|
|
4166
4174
|
"operationId": "addWhiteboardElements",
|
|
4167
4175
|
"tags": [
|
|
4168
4176
|
"whiteboards"
|
|
@@ -4179,9 +4187,95 @@
|
|
|
4179
4187
|
},
|
|
4180
4188
|
"shapes": {
|
|
4181
4189
|
"type": "array",
|
|
4182
|
-
"description": "Non-empty array of shape specs to append.",
|
|
4190
|
+
"description": "Non-empty array of shape specs to append. Prefer stencils / sticky notes / architecture icons over raw rectangles wherever a standard form fits (see the `type` enum below and the tool description).",
|
|
4183
4191
|
"items": {
|
|
4184
|
-
"type": "object"
|
|
4192
|
+
"type": "object",
|
|
4193
|
+
"properties": {
|
|
4194
|
+
"type": {
|
|
4195
|
+
"type": "string",
|
|
4196
|
+
"enum": [
|
|
4197
|
+
"rectangle",
|
|
4198
|
+
"ellipse",
|
|
4199
|
+
"diamond",
|
|
4200
|
+
"sticky",
|
|
4201
|
+
"text",
|
|
4202
|
+
"arrow",
|
|
4203
|
+
"line",
|
|
4204
|
+
"frame",
|
|
4205
|
+
"image",
|
|
4206
|
+
"stencil"
|
|
4207
|
+
],
|
|
4208
|
+
"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."
|
|
4209
|
+
},
|
|
4210
|
+
"stencil": {
|
|
4211
|
+
"type": "string",
|
|
4212
|
+
"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."
|
|
4213
|
+
},
|
|
4214
|
+
"stencilKey": {
|
|
4215
|
+
"type": "string",
|
|
4216
|
+
"description": "For type:'stencil' — exact stencil key from listWhiteboardStencils (takes precedence over `stencil`)."
|
|
4217
|
+
},
|
|
4218
|
+
"pack": {
|
|
4219
|
+
"type": "string",
|
|
4220
|
+
"description": "For type:'stencil' — optional pack to disambiguate a fuzzy `stencil` match (e.g. 'Flowchart', 'BPMN', 'UML & ER', 'Scrum Board')."
|
|
4221
|
+
},
|
|
4222
|
+
"iconPath": {
|
|
4223
|
+
"type": "string",
|
|
4224
|
+
"description": "For type:'image' — a software-architecture icon path from listArchitectureIcons (e.g. 'dev/docker.svg')."
|
|
4225
|
+
},
|
|
4226
|
+
"imageUrl": {
|
|
4227
|
+
"type": "string",
|
|
4228
|
+
"description": "For type:'image' — any other public image URL (use iconPath for curated architecture icons)."
|
|
4229
|
+
},
|
|
4230
|
+
"id": {
|
|
4231
|
+
"type": "string",
|
|
4232
|
+
"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."
|
|
4233
|
+
},
|
|
4234
|
+
"groupId": {
|
|
4235
|
+
"type": "string",
|
|
4236
|
+
"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)."
|
|
4237
|
+
},
|
|
4238
|
+
"x": {
|
|
4239
|
+
"type": "number",
|
|
4240
|
+
"description": "Top-left x on the canvas. OMIT both x and y to auto-place this element in clear empty space below the board's existing content. Strongly preferred when adding a note/shape to a board that already has content: a guessed coordinate usually lands ON TOP of existing shapes (the 'added a sticky but can't see it' bug). Set x/y only for deliberate layout among shapes you add in this same call."
|
|
4241
|
+
},
|
|
4242
|
+
"y": {
|
|
4243
|
+
"type": "number",
|
|
4244
|
+
"description": "Top-left y on the canvas. Omit together with x to auto-place (see x)."
|
|
4245
|
+
},
|
|
4246
|
+
"width": {
|
|
4247
|
+
"type": "number",
|
|
4248
|
+
"description": "Shape width; for type:'stencil' it scales the whole stencil to fit this width."
|
|
4249
|
+
},
|
|
4250
|
+
"height": {
|
|
4251
|
+
"type": "number",
|
|
4252
|
+
"description": "Shape height; for type:'stencil' it scales the whole stencil to fit this height."
|
|
4253
|
+
},
|
|
4254
|
+
"scale": {
|
|
4255
|
+
"type": "number",
|
|
4256
|
+
"description": "For type:'stencil' — uniform scale factor for the whole stencil (alternative to width/height)."
|
|
4257
|
+
},
|
|
4258
|
+
"text": {
|
|
4259
|
+
"type": "string",
|
|
4260
|
+
"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)."
|
|
4261
|
+
},
|
|
4262
|
+
"backgroundColor": {
|
|
4263
|
+
"type": "string",
|
|
4264
|
+
"description": "Fill colour: a name ('blue'/'green'/'yellow'/'pink'/'violet'/'orange'/'teal'/…) or a hex value."
|
|
4265
|
+
},
|
|
4266
|
+
"start": {
|
|
4267
|
+
"type": "object",
|
|
4268
|
+
"description": "For arrows/lines: { id } of the source shape (auto-clips to the edge + auto-routes around shapes in between)."
|
|
4269
|
+
},
|
|
4270
|
+
"end": {
|
|
4271
|
+
"type": "object",
|
|
4272
|
+
"description": "For arrows/lines: { id } of the target shape."
|
|
4273
|
+
}
|
|
4274
|
+
},
|
|
4275
|
+
"required": [
|
|
4276
|
+
"type"
|
|
4277
|
+
],
|
|
4278
|
+
"additionalProperties": true
|
|
4185
4279
|
},
|
|
4186
4280
|
"minItems": 1
|
|
4187
4281
|
}
|
|
@@ -4269,6 +4363,135 @@
|
|
|
4269
4363
|
}
|
|
4270
4364
|
}
|
|
4271
4365
|
},
|
|
4366
|
+
"/tools/duplicateWhiteboardElements": {
|
|
4367
|
+
"post": {
|
|
4368
|
+
"summary": "duplicateWhiteboardElements",
|
|
4369
|
+
"description": "Copy-paste existing whiteboard elements — the MCP equivalent of selecting a group and pressing Ctrl/Cmd+D. Clones the given elements (plus their group peers + bound text/labels) with FRESH ids, offsets the copy by dx/dy, and by default groups it into ONE new unit so it moves together. Use it to build something once (a labelled stencil frame, a kanban card, a UML class) then stamp out consistent repeats fast — then retext/recolour each copy by its new id (via the returned idMap) with updateWhiteboardScene. Pass `groupId` to copy a whole group as a unit (e.g. a placed stencil's groupId from its placement result) and/or `ids` for specific elements. Internal references (group membership, bound text containerId, arrow start/end bindings) are remapped within the copied set; a binding to an element you did NOT copy is dropped. Returns { duplicated, idMap (old id → new id), groupId (the copy's new unit group), elementCount }. Render with getWhiteboardImage afterwards to verify.",
|
|
4370
|
+
"operationId": "duplicateWhiteboardElements",
|
|
4371
|
+
"tags": [
|
|
4372
|
+
"uncategorized"
|
|
4373
|
+
],
|
|
4374
|
+
"requestBody": {
|
|
4375
|
+
"required": false,
|
|
4376
|
+
"content": {
|
|
4377
|
+
"application/json": {
|
|
4378
|
+
"schema": {
|
|
4379
|
+
"type": "object",
|
|
4380
|
+
"properties": {
|
|
4381
|
+
"documentId": {
|
|
4382
|
+
"type": "string",
|
|
4383
|
+
"description": "The whiteboard's documentId."
|
|
4384
|
+
},
|
|
4385
|
+
"ids": {
|
|
4386
|
+
"type": "array",
|
|
4387
|
+
"items": {
|
|
4388
|
+
"type": "string"
|
|
4389
|
+
},
|
|
4390
|
+
"description": "Element ids to copy. Each id's full group + any bound text are auto-included. Use this and/or groupId."
|
|
4391
|
+
},
|
|
4392
|
+
"groupId": {
|
|
4393
|
+
"type": "string",
|
|
4394
|
+
"description": "Copy EVERY element in this group as one unit — e.g. a placed stencil's `groupId` returned by addWhiteboardElements."
|
|
4395
|
+
},
|
|
4396
|
+
"dx": {
|
|
4397
|
+
"type": "number",
|
|
4398
|
+
"description": "Horizontal offset for the copy (default 40). Use the element width + a gap to place copies side by side."
|
|
4399
|
+
},
|
|
4400
|
+
"dy": {
|
|
4401
|
+
"type": "number",
|
|
4402
|
+
"description": "Vertical offset for the copy (default 40)."
|
|
4403
|
+
},
|
|
4404
|
+
"group": {
|
|
4405
|
+
"type": "boolean",
|
|
4406
|
+
"description": "Group the copy into one new unit so it moves/duplicates together (default true)."
|
|
4407
|
+
},
|
|
4408
|
+
"includeGroupPeers": {
|
|
4409
|
+
"type": "boolean",
|
|
4410
|
+
"description": "Auto-include the full group of any id you pass (default true)."
|
|
4411
|
+
}
|
|
4412
|
+
},
|
|
4413
|
+
"required": [
|
|
4414
|
+
"documentId"
|
|
4415
|
+
]
|
|
4416
|
+
}
|
|
4417
|
+
}
|
|
4418
|
+
}
|
|
4419
|
+
},
|
|
4420
|
+
"responses": {
|
|
4421
|
+
"200": {
|
|
4422
|
+
"description": "Tool result (shape varies per tool — refer to the tool's docs for the exact return value).",
|
|
4423
|
+
"content": {
|
|
4424
|
+
"application/json": {
|
|
4425
|
+
"schema": {
|
|
4426
|
+
"type": "object",
|
|
4427
|
+
"additionalProperties": true
|
|
4428
|
+
}
|
|
4429
|
+
}
|
|
4430
|
+
}
|
|
4431
|
+
},
|
|
4432
|
+
"400": {
|
|
4433
|
+
"description": "Validation error.",
|
|
4434
|
+
"content": {
|
|
4435
|
+
"application/json": {
|
|
4436
|
+
"schema": {
|
|
4437
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4438
|
+
}
|
|
4439
|
+
}
|
|
4440
|
+
}
|
|
4441
|
+
},
|
|
4442
|
+
"401": {
|
|
4443
|
+
"description": "Missing or invalid credentials.",
|
|
4444
|
+
"content": {
|
|
4445
|
+
"application/json": {
|
|
4446
|
+
"schema": {
|
|
4447
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4448
|
+
}
|
|
4449
|
+
}
|
|
4450
|
+
}
|
|
4451
|
+
},
|
|
4452
|
+
"403": {
|
|
4453
|
+
"description": "Authenticated but lacking the required permission or feature flag.",
|
|
4454
|
+
"content": {
|
|
4455
|
+
"application/json": {
|
|
4456
|
+
"schema": {
|
|
4457
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4460
|
+
}
|
|
4461
|
+
},
|
|
4462
|
+
"404": {
|
|
4463
|
+
"description": "Resource not found.",
|
|
4464
|
+
"content": {
|
|
4465
|
+
"application/json": {
|
|
4466
|
+
"schema": {
|
|
4467
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4468
|
+
}
|
|
4469
|
+
}
|
|
4470
|
+
}
|
|
4471
|
+
},
|
|
4472
|
+
"422": {
|
|
4473
|
+
"description": "Body did not match the tool's input schema.",
|
|
4474
|
+
"content": {
|
|
4475
|
+
"application/json": {
|
|
4476
|
+
"schema": {
|
|
4477
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4478
|
+
}
|
|
4479
|
+
}
|
|
4480
|
+
}
|
|
4481
|
+
},
|
|
4482
|
+
"500": {
|
|
4483
|
+
"description": "Server error.",
|
|
4484
|
+
"content": {
|
|
4485
|
+
"application/json": {
|
|
4486
|
+
"schema": {
|
|
4487
|
+
"$ref": "#/components/schemas/ErrorResponse"
|
|
4488
|
+
}
|
|
4489
|
+
}
|
|
4490
|
+
}
|
|
4491
|
+
}
|
|
4492
|
+
}
|
|
4493
|
+
}
|
|
4494
|
+
},
|
|
4272
4495
|
"/tools/insertWhiteboardImage": {
|
|
4273
4496
|
"post": {
|
|
4274
4497
|
"summary": "insertWhiteboardImage",
|
|
@@ -4563,7 +4786,7 @@
|
|
|
4563
4786
|
"/tools/listWhiteboardStencils": {
|
|
4564
4787
|
"post": {
|
|
4565
4788
|
"summary": "listWhiteboardStencils",
|
|
4566
|
-
"description": "Search the built-in library of
|
|
4789
|
+
"description": "Search the built-in library of structural whiteboard stencils — ready-made hand-drawn graphics: flowchart/UML/ER/BPMN symbols, scrum columns, org-chart nodes, gantt, lo-fi/UX wireframe widgets (buttons, forms, tables, alerts, navs), charts, device frames, stick figures. A stencil is a MINI-WHITEBOARD (a collection of elements), NOT a single shape. Each result returns: `key`, `title` (a real human name e.g. 'Alerts', not an index), `kind` ('symbol' | 'template'), `labels` (the TEXT it actually contains — its real content, e.g. an Alerts template's variant messages), `size` ({w,h} px), `summary`, `pack`, `category`; plus the full pack/category lists. The two kinds are used DIFFERENTLY: • SYMBOL = one atomic labelled node (flowchart Process/Decision, BPMN task, org node). Place + label + connect: addWhiteboardElements({type:'stencil', stencilKey, id:'n1', text:'Review', width, height}) — the text auto-fits its single slot and an arrow's start/end {id:'n1'} binds to it like any shape. A few symbols are text-less FRAMES (e.g. a UML class box = rectangle + divider line): place create-only, then use the placement result's `children` (shapes + x/y/w/h) and `groupId` to add type:'text' specs INTO the regions — pass that groupId so the text is one unit with the frame. • TEMPLATE = a multi-component layout (Alerts, Forms, Tables, Charts, device frames). Place the WHOLE thing: addWhiteboardElements({type:'stencil', stencilKey, x, y, width?, height?}); the placement RESULT returns `stencils[].children` (each child's id + text + colour + position x/y/w/h, so you can group children into rows/sections) so you then keep / retext / recolour / DELETE specific parts via updateWhiteboardScene (e.g. delete the info + error rows to keep only the green success alert). Do NOT pass a single `text` to a template — read its `labels` to see its parts, then edit them by id. To make several similar items, build one then duplicateWhiteboardElements({groupId, dx}) to stamp consistent copies (like copy-paste in the UI). SEARCH TIPS: prefer BROAD single words ('decision','alert','form','phone','process'); content words match the embedded `labels` too (searching 'success' finds the Alerts template). If nothing exact matches, results auto-broaden (broadened:true); pass pack/category to browse. For cloud/architecture ICONS (AWS/Azure/GCP/Docker/Kubernetes/databases) use listArchitectureIcons; for a sticky/post-it use addWhiteboardElements({type:'sticky'}), not a stencil.",
|
|
4567
4790
|
"operationId": "listWhiteboardStencils",
|
|
4568
4791
|
"tags": [
|
|
4569
4792
|
"whiteboards"
|
|
@@ -4577,11 +4800,11 @@
|
|
|
4577
4800
|
"properties": {
|
|
4578
4801
|
"query": {
|
|
4579
4802
|
"type": "string",
|
|
4580
|
-
"description": "Free-text search across name + pack + category (e.g. '
|
|
4803
|
+
"description": "Free-text search across name + pack + category (e.g. 'decision', 'database table', 'phone frame', 'actor', 'kanban column')."
|
|
4581
4804
|
},
|
|
4582
4805
|
"pack": {
|
|
4583
4806
|
"type": "string",
|
|
4584
|
-
"description": "Restrict to one pack, e.g. '
|
|
4807
|
+
"description": "Restrict to one pack, e.g. 'Flowchart', 'BPMN', 'UML & ER', 'Scrum Board', 'Lo-Fi Wireframes', 'Org Chart'."
|
|
4585
4808
|
},
|
|
4586
4809
|
"category": {
|
|
4587
4810
|
"type": "string",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stablebaseline/sdk",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"description": "TypeScript SDK for the Stable Baseline REST API. End-to-end agent-managed company brain — docs, diagrams, plans, and a self-learning Knowledge Graph.
|
|
3
|
+
"version": "0.3.1",
|
|
4
|
+
"description": "TypeScript SDK for the Stable Baseline REST API. End-to-end agent-managed company brain — docs, diagrams, plans, and a self-learning Knowledge Graph. 180 tools across 18 categories.",
|
|
5
5
|
"homepage": "https://stablebaseline.io",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -54,13 +54,13 @@
|
|
|
54
54
|
"test:watch": "vitest"
|
|
55
55
|
},
|
|
56
56
|
"dependencies": {
|
|
57
|
-
"openapi-fetch": "^0.
|
|
57
|
+
"openapi-fetch": "^0.17.0"
|
|
58
58
|
},
|
|
59
59
|
"devDependencies": {
|
|
60
60
|
"openapi-typescript": "^7.5.0",
|
|
61
61
|
"tsup": "^8.3.5",
|
|
62
62
|
"typescript": "^5.6.3",
|
|
63
|
-
"vitest": "^
|
|
63
|
+
"vitest": "^4.1.8"
|
|
64
64
|
},
|
|
65
65
|
"engines": {
|
|
66
66
|
"node": ">=18"
|