@stablebaseline/sdk 0.5.2 → 0.6.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/README.md +6 -6
- package/dist/index.d.cts +47 -31
- package/dist/index.d.ts +47 -31
- package/openapi.json +178 -114
- package/package.json +2 -2
- package/src/types.generated.ts +47 -31
package/openapi.json
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"bearerAuth": {
|
|
30
30
|
"type": "http",
|
|
31
31
|
"scheme": "bearer",
|
|
32
|
-
"description": "Either an MCP API key (prefix `sta_`, mint at https://app.stablebaseline.io/settings/mcp-
|
|
32
|
+
"description": "Either an MCP API key (prefix `sta_`, mint at https://app.stablebaseline.io/settings/mcp-setup) or an OAuth 2.1 access token. Every OAuth endpoint lives under this function, and the authoritative list is at https://api.stablebaseline.io/functions/v1/cloud-serve/.well-known/oauth-authorization-server: authorize at https://api.stablebaseline.io/functions/v1/cloud-serve/oauth/authorize, exchange at https://api.stablebaseline.io/functions/v1/cloud-serve/oauth/token."
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
35
|
"schemas": {
|
|
@@ -161,13 +161,14 @@
|
|
|
161
161
|
},
|
|
162
162
|
"category": {
|
|
163
163
|
"type": "string",
|
|
164
|
-
"description": "Category filter.",
|
|
164
|
+
"description": "Category filter. One of the 18 categories returned in each result's `category` field.",
|
|
165
165
|
"enum": [
|
|
166
166
|
"navigation",
|
|
167
167
|
"folders",
|
|
168
168
|
"documents",
|
|
169
169
|
"diagrams",
|
|
170
170
|
"images",
|
|
171
|
+
"whiteboards",
|
|
171
172
|
"data",
|
|
172
173
|
"improvements",
|
|
173
174
|
"plans",
|
|
@@ -488,7 +489,7 @@
|
|
|
488
489
|
"/tools/listArchitectureIcons": {
|
|
489
490
|
"post": {
|
|
490
491
|
"summary": "listArchitectureIcons",
|
|
491
|
-
"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 (
|
|
492
|
+
"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 (for example a sun for sunlight, a droplet for water, a leaf for a plant). 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).",
|
|
492
493
|
"operationId": "listArchitectureIcons",
|
|
493
494
|
"tags": [
|
|
494
495
|
"diagrams"
|
|
@@ -4260,6 +4261,7 @@
|
|
|
4260
4261
|
},
|
|
4261
4262
|
"maskBase64": {
|
|
4262
4263
|
"type": "string",
|
|
4264
|
+
"contentEncoding": "base64",
|
|
4263
4265
|
"description": "A PNG mask (base64, with or without a data: prefix) the same shape as the image. WHITE pixels are regenerated; BLACK pixels are preserved."
|
|
4264
4266
|
},
|
|
4265
4267
|
"prompt": {
|
|
@@ -5394,7 +5396,7 @@
|
|
|
5394
5396
|
"/tools/listWhiteboards": {
|
|
5395
5397
|
"post": {
|
|
5396
5398
|
"summary": "listWhiteboards",
|
|
5397
|
-
"description": "List the whiteboards in a project (hidden whiteboard-kind documents). Returns documentId, diagramId, title and timestamps for each.",
|
|
5399
|
+
"description": "List AND grep the whiteboards in a project (hidden whiteboard-kind documents). `query` searches the title and friendlyId (substring by default; set isRegex:true for a regular expression, caseSensitive:true for exact case). This is the tool to find a board by name — listDocuments deliberately excludes whiteboards. Returns documentId, diagramId, title and timestamps for each.",
|
|
5398
5400
|
"operationId": "listWhiteboards",
|
|
5399
5401
|
"tags": [
|
|
5400
5402
|
"whiteboards"
|
|
@@ -5408,6 +5410,18 @@
|
|
|
5408
5410
|
"properties": {
|
|
5409
5411
|
"projectId": {
|
|
5410
5412
|
"type": "string"
|
|
5413
|
+
},
|
|
5414
|
+
"query": {
|
|
5415
|
+
"type": "string",
|
|
5416
|
+
"description": "Grep across title and friendlyId. Substring by default; a regular expression when isRegex is true."
|
|
5417
|
+
},
|
|
5418
|
+
"isRegex": {
|
|
5419
|
+
"type": "boolean",
|
|
5420
|
+
"description": "Treat `query` as a regular expression."
|
|
5421
|
+
},
|
|
5422
|
+
"caseSensitive": {
|
|
5423
|
+
"type": "boolean",
|
|
5424
|
+
"description": "Match case exactly. Default false."
|
|
5411
5425
|
}
|
|
5412
5426
|
},
|
|
5413
5427
|
"required": [
|
|
@@ -5749,7 +5763,7 @@
|
|
|
5749
5763
|
"/tools/addWhiteboardElements": {
|
|
5750
5764
|
"post": {
|
|
5751
5765
|
"summary": "addWhiteboardElements",
|
|
5752
|
-
"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
|
|
5766
|
+
"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. a warning sign in a 'Risks' label), 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.",
|
|
5753
5767
|
"operationId": "addWhiteboardElements",
|
|
5754
5768
|
"tags": [
|
|
5755
5769
|
"whiteboards"
|
|
@@ -6218,6 +6232,7 @@
|
|
|
6218
6232
|
},
|
|
6219
6233
|
"imageBase64": {
|
|
6220
6234
|
"type": "string",
|
|
6235
|
+
"contentEncoding": "base64",
|
|
6221
6236
|
"description": "Base64-encoded image bytes (a data: URL prefix is allowed). Best for small images."
|
|
6222
6237
|
},
|
|
6223
6238
|
"imageBinary": {
|
|
@@ -6533,6 +6548,7 @@
|
|
|
6533
6548
|
},
|
|
6534
6549
|
"imageBase64": {
|
|
6535
6550
|
"type": "string",
|
|
6551
|
+
"contentEncoding": "base64",
|
|
6536
6552
|
"description": "Base64-encoded image bytes (a data: URL prefix is allowed). Use instead of imageUrl."
|
|
6537
6553
|
},
|
|
6538
6554
|
"mimeType": {
|
|
@@ -7533,7 +7549,7 @@
|
|
|
7533
7549
|
"/tools/reorderDocuments": {
|
|
7534
7550
|
"post": {
|
|
7535
7551
|
"summary": "reorderDocuments",
|
|
7536
|
-
"description": "MOVE documents between folders and/or reorder them — the batch filing tool. Pass [{documentId, position
|
|
7552
|
+
"description": "MOVE documents between folders and/or reorder them — the batch filing tool. Pass [{documentId, folderId?, position?}, ...] and give at least one of folderId/position per item. `folderId` MOVES that document into the given folder; use null for the project root; omit it to leave the document in its current folder. `position` sets the sort order among siblings — OMIT IT to append the document to the end of wherever it lands (or to keep its current place if it is not moving), which is usually what you want when filing. Use this to reorganise a project — file loose documents into subfolders, restructure a folder tree, or reorder siblings — in one call. The whole batch is applied in a SINGLE atomic database write, so it either all lands or none of it does; a bad folderId or an unreachable documentId fails the call with nothing changed. Filing is metadata only: it does NOT bump the document version and does NOT create a version-history snapshot, so tidying folders never shows up as a content revision. The response echoes the position the server actually assigned to each document. For a single document you can also use editDocument({documentId, folderId, position}), which behaves identically (and likewise creates no version when only the filing changes).",
|
|
7537
7553
|
"operationId": "reorderDocuments",
|
|
7538
7554
|
"tags": [
|
|
7539
7555
|
"documents"
|
|
@@ -7554,21 +7570,20 @@
|
|
|
7554
7570
|
"documentId": {
|
|
7555
7571
|
"type": "string"
|
|
7556
7572
|
},
|
|
7557
|
-
"position": {
|
|
7558
|
-
"type": "number",
|
|
7559
|
-
"description": "Sort position among siblings. Non-negative integer."
|
|
7560
|
-
},
|
|
7561
7573
|
"folderId": {
|
|
7562
7574
|
"type": [
|
|
7563
7575
|
"string",
|
|
7564
7576
|
"null"
|
|
7565
7577
|
],
|
|
7566
|
-
"description": "
|
|
7578
|
+
"description": "MOVE the document into this folder; null moves it to the project root. Omit to leave its current folder untouched. The folder must exist and belong to the same project."
|
|
7579
|
+
},
|
|
7580
|
+
"position": {
|
|
7581
|
+
"type": "number",
|
|
7582
|
+
"description": "Optional. Sort position among siblings (non-negative integer). OMIT to let the server place it: appended to the end of the target folder when the folder changes, otherwise left where it is. Omitting is the norm when filing; supply positions only when you are deliberately ordering siblings, usually renumbering them 0, 1, 2…."
|
|
7567
7583
|
}
|
|
7568
7584
|
},
|
|
7569
7585
|
"required": [
|
|
7570
|
-
"documentId"
|
|
7571
|
-
"position"
|
|
7586
|
+
"documentId"
|
|
7572
7587
|
]
|
|
7573
7588
|
},
|
|
7574
7589
|
"minItems": 1
|
|
@@ -8046,6 +8061,7 @@
|
|
|
8046
8061
|
},
|
|
8047
8062
|
"imageBase64": {
|
|
8048
8063
|
"type": "string",
|
|
8064
|
+
"contentEncoding": "base64",
|
|
8049
8065
|
"description": "Base64-encoded image data. Mutually exclusive with imageBinary/imageUrl."
|
|
8050
8066
|
},
|
|
8051
8067
|
"imageBinary": {
|
|
@@ -9324,30 +9340,38 @@
|
|
|
9324
9340
|
"type": "array",
|
|
9325
9341
|
"description": "Acceptance criteria — ordered list of pass/fail statements that define \"done\" for this item. Each row is `{ id, text }` with server-stamped `updated_at / updated_by / updated_by_credential_name`. REPLACES the whole array on update. Echo back existing `id`s on rows you keep so attribution stamps survive. Bare strings are accepted for convenience (e.g. `[\"row 1\", \"row 2\"]`) and auto-converted to `{ id, text }`.",
|
|
9326
9342
|
"items": {
|
|
9327
|
-
"
|
|
9328
|
-
|
|
9329
|
-
"id": {
|
|
9330
|
-
"type": "string",
|
|
9331
|
-
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
9332
|
-
},
|
|
9333
|
-
"text": {
|
|
9334
|
-
"type": "string"
|
|
9335
|
-
},
|
|
9336
|
-
"updated_at": {
|
|
9337
|
-
"type": "string",
|
|
9338
|
-
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
9339
|
-
},
|
|
9340
|
-
"updated_by": {
|
|
9343
|
+
"anyOf": [
|
|
9344
|
+
{
|
|
9341
9345
|
"type": "string",
|
|
9342
|
-
"description": "
|
|
9346
|
+
"description": "Shorthand for `{ text: \"...\" }`."
|
|
9343
9347
|
},
|
|
9344
|
-
|
|
9345
|
-
"type": "
|
|
9346
|
-
"
|
|
9348
|
+
{
|
|
9349
|
+
"type": "object",
|
|
9350
|
+
"properties": {
|
|
9351
|
+
"id": {
|
|
9352
|
+
"type": "string",
|
|
9353
|
+
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
9354
|
+
},
|
|
9355
|
+
"text": {
|
|
9356
|
+
"type": "string"
|
|
9357
|
+
},
|
|
9358
|
+
"updated_at": {
|
|
9359
|
+
"type": "string",
|
|
9360
|
+
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
9361
|
+
},
|
|
9362
|
+
"updated_by": {
|
|
9363
|
+
"type": "string",
|
|
9364
|
+
"description": "Server-stamped user id. Echo back unchanged."
|
|
9365
|
+
},
|
|
9366
|
+
"updated_by_credential_name": {
|
|
9367
|
+
"type": "string",
|
|
9368
|
+
"description": "Server-stamped credential label. Echo back unchanged."
|
|
9369
|
+
}
|
|
9370
|
+
},
|
|
9371
|
+
"required": [
|
|
9372
|
+
"text"
|
|
9373
|
+
]
|
|
9347
9374
|
}
|
|
9348
|
-
},
|
|
9349
|
-
"required": [
|
|
9350
|
-
"text"
|
|
9351
9375
|
]
|
|
9352
9376
|
}
|
|
9353
9377
|
},
|
|
@@ -9700,30 +9724,38 @@
|
|
|
9700
9724
|
"type": "array",
|
|
9701
9725
|
"description": "Acceptance criteria — ordered list of pass/fail statements that define \"done\" for this item. Each row is `{ id, text }` with server-stamped `updated_at / updated_by / updated_by_credential_name`. REPLACES the whole array on update. Echo back existing `id`s on rows you keep so attribution stamps survive. Bare strings are accepted for convenience (e.g. `[\"row 1\", \"row 2\"]`) and auto-converted to `{ id, text }`.",
|
|
9702
9726
|
"items": {
|
|
9703
|
-
"
|
|
9704
|
-
|
|
9705
|
-
"id": {
|
|
9706
|
-
"type": "string",
|
|
9707
|
-
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
9708
|
-
},
|
|
9709
|
-
"text": {
|
|
9710
|
-
"type": "string"
|
|
9711
|
-
},
|
|
9712
|
-
"updated_at": {
|
|
9713
|
-
"type": "string",
|
|
9714
|
-
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
9715
|
-
},
|
|
9716
|
-
"updated_by": {
|
|
9727
|
+
"anyOf": [
|
|
9728
|
+
{
|
|
9717
9729
|
"type": "string",
|
|
9718
|
-
"description": "
|
|
9730
|
+
"description": "Shorthand for `{ text: \"...\" }`."
|
|
9719
9731
|
},
|
|
9720
|
-
|
|
9721
|
-
"type": "
|
|
9722
|
-
"
|
|
9732
|
+
{
|
|
9733
|
+
"type": "object",
|
|
9734
|
+
"properties": {
|
|
9735
|
+
"id": {
|
|
9736
|
+
"type": "string",
|
|
9737
|
+
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
9738
|
+
},
|
|
9739
|
+
"text": {
|
|
9740
|
+
"type": "string"
|
|
9741
|
+
},
|
|
9742
|
+
"updated_at": {
|
|
9743
|
+
"type": "string",
|
|
9744
|
+
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
9745
|
+
},
|
|
9746
|
+
"updated_by": {
|
|
9747
|
+
"type": "string",
|
|
9748
|
+
"description": "Server-stamped user id. Echo back unchanged."
|
|
9749
|
+
},
|
|
9750
|
+
"updated_by_credential_name": {
|
|
9751
|
+
"type": "string",
|
|
9752
|
+
"description": "Server-stamped credential label. Echo back unchanged."
|
|
9753
|
+
}
|
|
9754
|
+
},
|
|
9755
|
+
"required": [
|
|
9756
|
+
"text"
|
|
9757
|
+
]
|
|
9723
9758
|
}
|
|
9724
|
-
},
|
|
9725
|
-
"required": [
|
|
9726
|
-
"text"
|
|
9727
9759
|
]
|
|
9728
9760
|
}
|
|
9729
9761
|
},
|
|
@@ -11135,7 +11167,7 @@
|
|
|
11135
11167
|
"/tools/searchImprovements": {
|
|
11136
11168
|
"post": {
|
|
11137
11169
|
"summary": "searchImprovements",
|
|
11138
|
-
"description": "
|
|
11170
|
+
"description": "Ranked semantic search over IMPROVEMENTS AND TASKS — hybrid full-text + vector, so it matches meaning rather than just wording. Returns ranked { improvements }, each with a versionTimestamp you can pass straight to updateImprovement without a getImprovement round-trip.\n\nImprovements and tasks are one table (a task is an improvement with is_task=true), so both are searched by default. Pass types:[\"task\"] or types:[\"improvement\"] to narrow to one.\n\nThis tool searches improvements and tasks ONLY. To find a document, whiteboard, plan or compliance item by name or friendly id, use kg_search({ query, artefactMetadataOnly: true }) — it matches title + friendly id + uuid across every artefact type and needs no knowledge graph. To search document CONTENT, use listDocuments.",
|
|
11139
11171
|
"operationId": "searchImprovements",
|
|
11140
11172
|
"tags": [
|
|
11141
11173
|
"improvements"
|
|
@@ -11149,22 +11181,18 @@
|
|
|
11149
11181
|
"properties": {
|
|
11150
11182
|
"query": {
|
|
11151
11183
|
"type": "string",
|
|
11152
|
-
"description": "Search query — a name fragment or a friendly id."
|
|
11184
|
+
"description": "Search query — meaning, a name fragment, or a friendly id (e.g. \"IMP-2\", \"TAS-7\")."
|
|
11153
11185
|
},
|
|
11154
11186
|
"types": {
|
|
11155
11187
|
"type": "array",
|
|
11156
11188
|
"items": {
|
|
11157
11189
|
"type": "string",
|
|
11158
11190
|
"enum": [
|
|
11159
|
-
"document",
|
|
11160
|
-
"whiteboard",
|
|
11161
11191
|
"improvement",
|
|
11162
|
-
"task"
|
|
11163
|
-
"plan",
|
|
11164
|
-
"compliance"
|
|
11192
|
+
"task"
|
|
11165
11193
|
]
|
|
11166
11194
|
},
|
|
11167
|
-
"description": "
|
|
11195
|
+
"description": "Narrow to one kind. Omit (or pass both) to search improvements and tasks together. Other artefact types are NOT accepted here — use kg_search with artefactMetadataOnly:true for those."
|
|
11168
11196
|
},
|
|
11169
11197
|
"projectId": {
|
|
11170
11198
|
"type": "string",
|
|
@@ -11176,11 +11204,7 @@
|
|
|
11176
11204
|
},
|
|
11177
11205
|
"limit": {
|
|
11178
11206
|
"type": "number",
|
|
11179
|
-
"description": "Max results (default 20
|
|
11180
|
-
},
|
|
11181
|
-
"offset": {
|
|
11182
|
-
"type": "number",
|
|
11183
|
-
"description": "Pagination offset (cross-artefact mode)."
|
|
11207
|
+
"description": "Max results (default 20, max 50)."
|
|
11184
11208
|
}
|
|
11185
11209
|
},
|
|
11186
11210
|
"required": [
|
|
@@ -13066,30 +13090,38 @@
|
|
|
13066
13090
|
"type": "array",
|
|
13067
13091
|
"description": "Acceptance criteria — ordered list of pass/fail statements that define \"done\" for this item. Each row is `{ id, text }` with server-stamped `updated_at / updated_by / updated_by_credential_name`. REPLACES the whole array on update. Echo back existing `id`s on rows you keep so attribution stamps survive. Bare strings are accepted for convenience (e.g. `[\"row 1\", \"row 2\"]`) and auto-converted to `{ id, text }`.",
|
|
13068
13092
|
"items": {
|
|
13069
|
-
"
|
|
13070
|
-
|
|
13071
|
-
"id": {
|
|
13072
|
-
"type": "string",
|
|
13073
|
-
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
13074
|
-
},
|
|
13075
|
-
"text": {
|
|
13076
|
-
"type": "string"
|
|
13077
|
-
},
|
|
13078
|
-
"updated_at": {
|
|
13079
|
-
"type": "string",
|
|
13080
|
-
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
13081
|
-
},
|
|
13082
|
-
"updated_by": {
|
|
13093
|
+
"anyOf": [
|
|
13094
|
+
{
|
|
13083
13095
|
"type": "string",
|
|
13084
|
-
"description": "
|
|
13096
|
+
"description": "Shorthand for `{ text: \"...\" }`."
|
|
13085
13097
|
},
|
|
13086
|
-
|
|
13087
|
-
"type": "
|
|
13088
|
-
"
|
|
13098
|
+
{
|
|
13099
|
+
"type": "object",
|
|
13100
|
+
"properties": {
|
|
13101
|
+
"id": {
|
|
13102
|
+
"type": "string",
|
|
13103
|
+
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
13104
|
+
},
|
|
13105
|
+
"text": {
|
|
13106
|
+
"type": "string"
|
|
13107
|
+
},
|
|
13108
|
+
"updated_at": {
|
|
13109
|
+
"type": "string",
|
|
13110
|
+
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
13111
|
+
},
|
|
13112
|
+
"updated_by": {
|
|
13113
|
+
"type": "string",
|
|
13114
|
+
"description": "Server-stamped user id. Echo back unchanged."
|
|
13115
|
+
},
|
|
13116
|
+
"updated_by_credential_name": {
|
|
13117
|
+
"type": "string",
|
|
13118
|
+
"description": "Server-stamped credential label. Echo back unchanged."
|
|
13119
|
+
}
|
|
13120
|
+
},
|
|
13121
|
+
"required": [
|
|
13122
|
+
"text"
|
|
13123
|
+
]
|
|
13089
13124
|
}
|
|
13090
|
-
},
|
|
13091
|
-
"required": [
|
|
13092
|
-
"text"
|
|
13093
13125
|
]
|
|
13094
13126
|
}
|
|
13095
13127
|
},
|
|
@@ -13680,30 +13712,38 @@
|
|
|
13680
13712
|
"type": "array",
|
|
13681
13713
|
"description": "Acceptance criteria — ordered list of pass/fail statements that define \"done\" for this item. Each row is `{ id, text }` with server-stamped `updated_at / updated_by / updated_by_credential_name`. REPLACES the whole array on update. Echo back existing `id`s on rows you keep so attribution stamps survive. Bare strings are accepted for convenience (e.g. `[\"row 1\", \"row 2\"]`) and auto-converted to `{ id, text }`.",
|
|
13682
13714
|
"items": {
|
|
13683
|
-
"
|
|
13684
|
-
|
|
13685
|
-
"id": {
|
|
13686
|
-
"type": "string",
|
|
13687
|
-
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
13688
|
-
},
|
|
13689
|
-
"text": {
|
|
13690
|
-
"type": "string"
|
|
13691
|
-
},
|
|
13692
|
-
"updated_at": {
|
|
13693
|
-
"type": "string",
|
|
13694
|
-
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
13695
|
-
},
|
|
13696
|
-
"updated_by": {
|
|
13715
|
+
"anyOf": [
|
|
13716
|
+
{
|
|
13697
13717
|
"type": "string",
|
|
13698
|
-
"description": "
|
|
13718
|
+
"description": "Shorthand for `{ text: \"...\" }`."
|
|
13699
13719
|
},
|
|
13700
|
-
|
|
13701
|
-
"type": "
|
|
13702
|
-
"
|
|
13720
|
+
{
|
|
13721
|
+
"type": "object",
|
|
13722
|
+
"properties": {
|
|
13723
|
+
"id": {
|
|
13724
|
+
"type": "string",
|
|
13725
|
+
"description": "Optional — server mints one if omitted. Preserve on edits."
|
|
13726
|
+
},
|
|
13727
|
+
"text": {
|
|
13728
|
+
"type": "string"
|
|
13729
|
+
},
|
|
13730
|
+
"updated_at": {
|
|
13731
|
+
"type": "string",
|
|
13732
|
+
"description": "Server-stamped. Echo back unchanged; ignored on new rows."
|
|
13733
|
+
},
|
|
13734
|
+
"updated_by": {
|
|
13735
|
+
"type": "string",
|
|
13736
|
+
"description": "Server-stamped user id. Echo back unchanged."
|
|
13737
|
+
},
|
|
13738
|
+
"updated_by_credential_name": {
|
|
13739
|
+
"type": "string",
|
|
13740
|
+
"description": "Server-stamped credential label. Echo back unchanged."
|
|
13741
|
+
}
|
|
13742
|
+
},
|
|
13743
|
+
"required": [
|
|
13744
|
+
"text"
|
|
13745
|
+
]
|
|
13703
13746
|
}
|
|
13704
|
-
},
|
|
13705
|
-
"required": [
|
|
13706
|
-
"text"
|
|
13707
13747
|
]
|
|
13708
13748
|
}
|
|
13709
13749
|
},
|
|
@@ -15047,7 +15087,7 @@
|
|
|
15047
15087
|
"/tools/kg_search": {
|
|
15048
15088
|
"post": {
|
|
15049
15089
|
"summary": "kg_search",
|
|
15050
|
-
"description": "Unified Knowledge Graph KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT.
|
|
15090
|
+
"description": "Unified Knowledge Graph KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT. To LOCATE AN ARTEFACT BY NAME OR ID rather than answer a question, pass artefactMetadataOnly:true — see below. Without that flag this tool retrieves knowledge from inside content and will not reliably find a thing by its title.\n\nPICK THE MODE THAT FITS THE QUERY:\n\n• mode='local' (default) — for SPECIFIC factual questions (\"what does section 15 say about deposits?\", \"who is the Chief Counsel?\"). FTS+vector RRF over individual document chunks. Returns precise excerpts with citations.\n\n• mode='global' — for THEMATIC / OVERVIEW / SUMMARY questions (\"what are the main themes\", \"give me an overview of the project\", \"what topics does this cover\"). Returns Louvain community summaries + curated wiki pages — far better than 'local' for big-picture queries because community summaries already aggregate across many chunks. ALWAYS PREFER over 'local' when the user asks for themes / summary / overview / topic landscape.\n\n• mode='graph' — for RELATIONSHIP questions (\"what's connected to entity X?\", \"who cites Section 5?\"). 1-hop entity-neighbourhood walk. Pass query OR srcEntityId.\n\n• mode='path' — for CONNECTION questions (\"how does X relate to Y?\"). Shortest path between two entities. Pass srcEntityId AND dstEntityId.\n\n• mode='ppr' — for MULTI-HOP discovery (\"what's relevant to X, even indirectly?\"). Personalised PageRank over AUTHORED-vs-EXTRACTED weighted edges, seeded by query-similar entities. Best when 'local' returns too few results and the answer requires walking through several entity hops.\n\nQuick decision tree:\n- User asks for an overview/summary/themes → 'global'\n- User asks a specific question with a clear answer → 'local'\n- User asks 'how is X connected to Y' → 'path' (with both entity IDs)\n- User asks 'what's near entity X' → 'graph' (with srcEntityId)\n- 'local' returned nothing useful and the question is broad → retry with 'ppr'\n- User wants to FIND a named artefact (\"the GTM plan\", \"DOC-123\", a uuid) → artefactMetadataOnly:true\n\nARTEFACT-METADATA MODE (artefactMetadataOnly:true): ignores `mode` entirely and matches title + friendly id + uuid across EVERY artefact type — documents, whiteboards, plans, tasks, improvements, compliance frameworks. Returns a typed navigable list ({ artefacts: [{ result_type, id, friendly_id, title, snippet, document_id, project_id, href }] }). It reads no document content and needs no knowledge graph: unlike every other mode it is NOT limited to what has been ingested, so it still finds artefacts in projects where the KG is switched off. Narrow it with artefactTypes. To search inside document BODIES use listDocuments (full-content grep).",
|
|
15051
15091
|
"operationId": "kg_search",
|
|
15052
15092
|
"tags": [
|
|
15053
15093
|
"knowledge_graph"
|
|
@@ -15061,7 +15101,31 @@
|
|
|
15061
15101
|
"properties": {
|
|
15062
15102
|
"query": {
|
|
15063
15103
|
"type": "string",
|
|
15064
|
-
"description": "Natural-language query. Required for local/global/ppr; optional for graph (use srcEntityId instead)."
|
|
15104
|
+
"description": "Natural-language query. Required for local/global/ppr; optional for graph (use srcEntityId instead). With artefactMetadataOnly:true this is the artefact name, friendly id or uuid to find."
|
|
15105
|
+
},
|
|
15106
|
+
"artefactMetadataOnly": {
|
|
15107
|
+
"type": "boolean",
|
|
15108
|
+
"default": false,
|
|
15109
|
+
"description": "Find artefacts BY NAME/ID instead of retrieving knowledge. Matches title + friendly id + uuid only — never document content — across all artefact types, and does not require the knowledge graph to be enabled. Default false."
|
|
15110
|
+
},
|
|
15111
|
+
"artefactTypes": {
|
|
15112
|
+
"type": "array",
|
|
15113
|
+
"items": {
|
|
15114
|
+
"type": "string",
|
|
15115
|
+
"enum": [
|
|
15116
|
+
"document",
|
|
15117
|
+
"whiteboard",
|
|
15118
|
+
"improvement",
|
|
15119
|
+
"task",
|
|
15120
|
+
"plan",
|
|
15121
|
+
"compliance"
|
|
15122
|
+
]
|
|
15123
|
+
},
|
|
15124
|
+
"description": "Only with artefactMetadataOnly:true. Restrict the search to these artefact types. Omit to search all of them. Unknown values are rejected rather than ignored."
|
|
15125
|
+
},
|
|
15126
|
+
"offset": {
|
|
15127
|
+
"type": "number",
|
|
15128
|
+
"description": "Only with artefactMetadataOnly:true. Skip this many results for paging."
|
|
15065
15129
|
},
|
|
15066
15130
|
"mode": {
|
|
15067
15131
|
"type": "string",
|
|
@@ -18483,7 +18547,7 @@
|
|
|
18483
18547
|
"/tools/createProject": {
|
|
18484
18548
|
"post": {
|
|
18485
18549
|
"summary": "createProject",
|
|
18486
|
-
"description": "Create a new project inside a workspace. Mirrors the UI Create Project dialog. Auth: write on workspace + credential's `can_lifecycle` capability. Validates name (1..200) and description (0..2000); icon defaults to
|
|
18550
|
+
"description": "Create a new project inside a workspace. Mirrors the UI Create Project dialog. Auth: write on workspace + credential's `can_lifecycle` capability. Validates name (1..200) and description (0..2000); icon defaults to a folder emoji if omitted. Server-side limit gate via `can_create_project_in_workspace`. Rate limit 30/min.",
|
|
18487
18551
|
"operationId": "createProject",
|
|
18488
18552
|
"tags": [
|
|
18489
18553
|
"organization"
|
|
@@ -18513,7 +18577,7 @@
|
|
|
18513
18577
|
"icon": {
|
|
18514
18578
|
"type": "string",
|
|
18515
18579
|
"maxLength": 32,
|
|
18516
|
-
"description": "Optional emoji icon. Defaults to
|
|
18580
|
+
"description": "Optional emoji icon. Defaults to a folder emoji to match the UI."
|
|
18517
18581
|
}
|
|
18518
18582
|
},
|
|
18519
18583
|
"required": [
|
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.6.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. 196 tools across 18 categories.",
|
|
5
5
|
"homepage": "https://stablebaseline.io",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|