@stablebaseline/sdk 0.5.3 → 0.6.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/openapi.json CHANGED
@@ -3348,7 +3348,7 @@
3348
3348
  },
3349
3349
  "afterLine": {
3350
3350
  "type": "number",
3351
- "description": "Insert after this line number (1-based)."
3351
+ "description": "Insert after this line, counting the SAME line numbers getDocument prints (1-based; frontmatter is not counted, and every diagram/image marker counts as exactly one line). 0 inserts at the very beginning; omit it to append at the end. Re-read with getDocument if the document may have changed, since the number is positional."
3352
3352
  },
3353
3353
  "colorPlan": {
3354
3354
  "type": "object",
@@ -3391,6 +3391,14 @@
3391
3391
  "imageBackground": {
3392
3392
  "type": "string",
3393
3393
  "description": "Background for the returned png/jpeg (e.g. '#ffffff' or 'transparent')."
3394
+ },
3395
+ "applyBrandTheme": {
3396
+ "type": "boolean",
3397
+ "description": "Brand theming is ON BY DEFAULT: the document's effective BRAND KIT (colours only — typefaces are never injected) is baked into the diagram DSL before it is validated, rendered and stored, so the diagram is on-brand everywhere it appears (cascade: brandKitId override → project default → workspace default → org default → the built-in Stable Baseline theme). Set false to keep the library's stock styling. Themable types: mermaid, plantuml, graphviz, d2, systemsarchitecture, vega, vegalite, infographic — other types (incl. bpmn, which has colorPlan) are always stored unchanged. Author theming in the DSL wins (an existing mermaid %%{init}%%, plantuml !theme, d2 vars.d2-config, or a hand-written infographic palette is never overridden). The stored diagramCode is the THEMED source."
3398
+ },
3399
+ "brandKitId": {
3400
+ "type": "string",
3401
+ "description": "Optional brand kit UUID (see listBrandKits) to theme with instead of the cascade default. Must belong to your organisation."
3394
3402
  }
3395
3403
  },
3396
3404
  "required": [
@@ -3522,6 +3530,14 @@
3522
3530
  "type": "string",
3523
3531
  "description": "New caption."
3524
3532
  },
3533
+ "applyBrandTheme": {
3534
+ "type": "boolean",
3535
+ "description": "Brand theming is ON BY DEFAULT when diagramCode is provided: the document's effective BRAND KIT is baked into the new DSL before it is validated, rendered and stored. Set false to keep the library's stock styling. Same cascade + themable types + author-wins guards as insertDiagramInDocument. The stored diagramCode is the THEMED source."
3536
+ },
3537
+ "brandKitId": {
3538
+ "type": "string",
3539
+ "description": "Optional brand kit UUID (see listBrandKits) to theme with instead of the cascade default. Must belong to your organisation."
3540
+ },
3525
3541
  "colorPlan": {
3526
3542
  "type": "object",
3527
3543
  "description": "BPMN only. Updated color plan. Set to null to remove.",
@@ -4361,7 +4377,7 @@
4361
4377
  "/tools/designDeckInWhiteboard": {
4362
4378
  "post": {
4363
4379
  "summary": "designDeckInWhiteboard",
4364
- "description": "Create or refine a slide deck INSIDE an existing whiteboard by conversing with the AI design agent. Send a brief for a NEW deck, a change to an EXISTING one, or an answer to the agent's question. The agent builds a polished, on-brand deck and places it on the board; if the brief is ambiguous it asks ONE clarifying question (answer with the same sessionId). Returns immediately; poll getDeckReplyInWhiteboard for the result. Use for building or editing slide decks / presentations. WHITEBOARD IS REQUIRED: a deck always lives inside a whiteboard, so documentId (the whiteboard's id) is required. If you do NOT already have a whiteboard id, ASK THE USER which whiteboard they want the deck designed in — do NOT create a whiteboard automatically. Only call createWhiteboard first if the user explicitly asks for a brand-new board; otherwise use the id of the whiteboard they name. FIRST vs FOLLOW-UP: the first call (from nothing) builds; a follow-up call (an answer, a change, or a new instruction) passes the sessionId (or the deckId) plus the new message. kind:'deck' (default) is the premium on-brand HTML deck; kind:'express' builds the native, deterministic branded-executive deck directly on the whiteboard (faster, lower fidelity, one-shot, not conversational). COST + APPROVAL: a build costs 50 credits and an edit 10; a clarifying question is FREE. GENERATED IMAGES are extra and OFF by default: decks are type-only unless the user asks for visuals, in which case set imageCount (5 credits each, ceiling scales with slide count and plan tier, max 10) and the exact total is quoted before anything is charged — exactly that many images are produced, and the image surcharge auto-refunds if the build cannot deliver them. ADVANCED DECK BUILDING (optional, OFF by default): set advancedDeckBuilding:true to build the deck over several rounds of redraft and review by a panel of design, brand, accessibility and copy reviewers instead of one composer pass. It usually raises design quality, but it is not a guarantee. It is much slower and it costs more: a standard build takes roughly 2 to 8 minutes, advanced deck building takes roughly 15 to 20 minutes, and it adds 15 credits per depth level on top of the turn fee (advancedDeckBuildingDepth is 1 to 3, default 3, so +45 credits, making a 50-credit build cost 95). Only turn it on when the user asks for the highest quality and accepts the wait and the cost. Call FIRST without confirm to get the exact cost plus the workspace balance, show it to the user, and only call again with confirm:true once they agree. The fee is auto-refunded if a turn produces no change or fails. Returns sessionId (the conversation), deckId (the deck), status, turnType, started, awaitingUser, needsConfirmation, insufficientCredits, slideCount + slideCountClamped (the target the conversation now carries, and whether it was reduced to the maximum), advancedDeckBuilding (whether advanced deck building is on for this conversation), advancedDeckBuildingStatus, and assistantMessage. Export the finished deck with exportFromWhiteboard.",
4380
+ "description": "Create or refine a slide deck INSIDE an existing whiteboard by conversing with the AI design agent. Send a brief for a NEW deck, a change to an EXISTING one, or an answer to the agent's question. The agent builds a polished, on-brand deck and places it on the board; if the brief is ambiguous it asks ONE clarifying question (answer with the same sessionId). Returns immediately; poll getDeckReplyInWhiteboard for the result. Use for building or editing slide decks / presentations. WHITEBOARD IS REQUIRED: a deck always lives inside a whiteboard, so documentId (the whiteboard's id) is required. If you do NOT already have a whiteboard id, ASK THE USER which whiteboard they want the deck designed in — do NOT create a whiteboard automatically. Only call createWhiteboard first if the user explicitly asks for a brand-new board; otherwise use the id of the whiteboard they name. FIRST vs FOLLOW-UP: the first call (from nothing) builds; a follow-up call (an answer, a change, or a new instruction) passes the sessionId (or the deckId) plus the new message. kind:'deck' (default) is the premium on-brand HTML deck; kind:'express' builds the native, deterministic branded-executive deck directly on the whiteboard (faster, lower fidelity, one-shot, not conversational). COST + APPROVAL: a build costs 50 credits and an edit 10; a clarifying question is FREE. It can also generate imagery for the deck where the design calls for it. ADVANCED DECK BUILDING (optional, OFF by default): set advancedDeckBuilding:true to build the deck over several rounds of redraft and review by a panel of design, brand, accessibility and copy reviewers instead of one composer pass. It usually raises design quality, but it is not a guarantee. It is much slower and it costs more: a standard build takes roughly 2 to 8 minutes, advanced deck building takes roughly 15 to 20 minutes, and it adds 15 credits per depth level on top of the turn fee (advancedDeckBuildingDepth is 1 to 3, default 3, so +45 credits, making a 50-credit build cost 95). Only turn it on when the user asks for the highest quality and accepts the wait and the cost. Call FIRST without confirm to get the exact cost plus the workspace balance, show it to the user, and only call again with confirm:true once they agree. The fee is auto-refunded if a turn produces no change or fails. Returns sessionId (the conversation), deckId (the deck), status, turnType, started, awaitingUser, needsConfirmation, insufficientCredits, slideCount + slideCountClamped (the target the conversation now carries, and whether it was reduced to the maximum), advancedDeckBuilding (whether advanced deck building is on for this conversation), advancedDeckBuildingStatus, and assistantMessage. Export the finished deck with exportFromWhiteboard.",
4365
4381
  "operationId": "designDeckInWhiteboard",
4366
4382
  "tags": [
4367
4383
  "whiteboards"
@@ -4413,7 +4429,7 @@
4413
4429
  },
4414
4430
  "imageCount": {
4415
4431
  "type": "number",
4416
- "description": "How many AI-GENERATED images this turn may produce. DEFAULT IS 0 — decks are type-only unless the user asks for visuals. SET THIS when the user wants imagery: 'a cover image' → 1, 'a few images' → 2, 'image-led / very visual' → omit nothing and pass a higher number. Each image costs 5 extra credits, quoted upfront in the confirmation (base fee + images), and EXACTLY this many are produced — never more, never fewer (the image surcharge is auto-refunded if the build cannot deliver them). The ceiling scales with the deck (about one image per three slides, so a 30-slide deck tops out at 10) and with the plan tier; anything above the ceiling is reduced and the reduction is stated back. If omitted, the count is derived conservatively from the user's wording (silence = 0)."
4432
+ "description": "Deprecated and ignored. Still accepted so existing callers do not break; passing it changes nothing."
4417
4433
  },
4418
4434
  "advancedDeckBuilding": {
4419
4435
  "type": "boolean",
@@ -4808,7 +4824,7 @@
4808
4824
  "/tools/exportFromWhiteboard": {
4809
4825
  "post": {
4810
4826
  "summary": "exportFromWhiteboard",
4811
- "description": "Export a design that lives in a whiteboard to an editable PowerPoint (PPTX), PDF, PNG images, or raw HTML. Give it the whiteboard documentId and the designId (the deck). kind:'deck' (default) renders the finished deck via the export worker: 'pptx' = native, fully-editable PowerPoint (real shapes and text, not screenshots); 'pdf' = vector, one page per slide; 'png' = one image per slide (returned as a base64 array); 'html' = the self-contained deck HTML. Returns the file as base64 in data (pptx/pdf/html) or per-slide base64 in slides (png). The design must be finished; one that is still generating, failed, or archived returns a clear message.",
4827
+ "description": "Export a design that lives in a whiteboard to an editable PowerPoint (PPTX), a PDF, or PNG images. LARGE DECKS FINISH IN THE BACKGROUND: if the export takes longer than one tool call can wait, this returns status:'exporting' with a jobId instead of the file — wait about 30 seconds and call this tool AGAIN with the SAME arguments to collect it. Repeat until status is 'completed' and 'url' is present. Nothing is re-exported while a job is already running, so polling is cheap and safe. Download links are available for 1 hour. Give it the whiteboard documentId and the designId (the deck). kind:'deck' (default) renders the finished deck via the export worker: 'pptx' = native, fully-editable PowerPoint (real shapes and text, not screenshots); 'pdf' = vector, one page per slide; 'png' = one image per slide. HTML is not an available format — do not ask for it. Small exports come back as base64 in data (pptx/pdf); anything larger, and every png export, comes back as download links. The design must be finished; one that is still generating, failed, or archived returns a clear message.",
4812
4828
  "operationId": "exportFromWhiteboard",
4813
4829
  "tags": [
4814
4830
  "whiteboards"
@@ -4840,10 +4856,9 @@
4840
4856
  "enum": [
4841
4857
  "pptx",
4842
4858
  "pdf",
4843
- "png",
4844
- "html"
4859
+ "png"
4845
4860
  ],
4846
- "description": "Output format. 'pptx' (default) = editable PowerPoint; 'pdf' = vector PDF; 'png' = one base64 image per slide; 'html' = the design's self-contained HTML."
4861
+ "description": "Output format. 'pptx' (default) = editable PowerPoint; 'pdf' = vector PDF; 'png' = one image per slide. HTML is not available."
4847
4862
  },
4848
4863
  "brandKitId": {
4849
4864
  "type": "string",
@@ -5396,7 +5411,7 @@
5396
5411
  "/tools/listWhiteboards": {
5397
5412
  "post": {
5398
5413
  "summary": "listWhiteboards",
5399
- "description": "List the whiteboards in a project (hidden whiteboard-kind documents). Returns documentId, diagramId, title and timestamps for each.",
5414
+ "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.",
5400
5415
  "operationId": "listWhiteboards",
5401
5416
  "tags": [
5402
5417
  "whiteboards"
@@ -5410,6 +5425,18 @@
5410
5425
  "properties": {
5411
5426
  "projectId": {
5412
5427
  "type": "string"
5428
+ },
5429
+ "query": {
5430
+ "type": "string",
5431
+ "description": "Grep across title and friendlyId. Substring by default; a regular expression when isRegex is true."
5432
+ },
5433
+ "isRegex": {
5434
+ "type": "boolean",
5435
+ "description": "Treat `query` as a regular expression."
5436
+ },
5437
+ "caseSensitive": {
5438
+ "type": "boolean",
5439
+ "description": "Match case exactly. Default false."
5413
5440
  }
5414
5441
  },
5415
5442
  "required": [
@@ -6419,6 +6446,14 @@
6419
6446
  "type": "string",
6420
6447
  "description": "Element id of an EXISTING embedded diagram to re-render and replace in place (keeps the element id + board position). Omit for a fresh insert. If the id is not on the board, a new element is created with it."
6421
6448
  },
6449
+ "applyBrandTheme": {
6450
+ "type": "boolean",
6451
+ "description": "Brand theming is ON BY DEFAULT: the board's effective BRAND KIT (colours only — typefaces are never injected) is baked into the diagram before it is rendered and its editable source stored (cascade: brandKitId override → project → workspace → org default → the built-in Stable Baseline theme). Set false to keep the library's stock styling. Themable types: mermaid, plantuml, graphviz, d2, systemsarchitecture, vega, vegalite, infographic; author theming in the DSL always wins."
6452
+ },
6453
+ "brandKitId": {
6454
+ "type": "string",
6455
+ "description": "Optional brand kit UUID (see listBrandKits) to theme with instead of the cascade default. Must belong to your organisation."
6456
+ },
6422
6457
  "fit": {
6423
6458
  "type": "string",
6424
6459
  "enum": [
@@ -7174,7 +7209,7 @@
7174
7209
  "/tools/renderDiagram": {
7175
7210
  "post": {
7176
7211
  "summary": "renderDiagram",
7177
- "description": "Generate a diagram from its DSL/code and get the IMAGE back — WITHOUT inserting it into any document or whiteboard. For acting as a pure diagram generator. Provide diagramType (e.g. 'mermaid', 'd2', 'plantuml', 'graphviz', 'bpmn', 'vegalite'; call listDiagramTypes for the full set) and source (the diagram code). Choose format 'png' (default), 'jpeg', or 'svg'; for raster choose scale 1/2/3 for 1x/2x/3x; optional background (png only). Returns a TEMPORARY signed imageUrl that expires in 1 hour (then auto-deleted), and for png/jpeg the image inline so you can see it. To render a diagram that already lives in a document/whiteboard use getDiagramImage; to persist a new one use insertDiagramInDocument or insertWhiteboardDiagram.",
7212
+ "description": "Generate a diagram from its DSL/code and get the IMAGE back — WITHOUT inserting it into any document or whiteboard. For acting as a pure diagram generator. Provide diagramType (e.g. 'mermaid', 'd2', 'plantuml', 'graphviz', 'bpmn', 'vegalite'; call listDiagramTypes for the full set) and source (the diagram code). Choose format 'png' (default), 'jpeg', or 'svg'; for raster choose scale 1/2/3 for 1x/2x/3x; optional background (png only). Returns a TEMPORARY imageUrl that stays available for 1 hour (the render is then deleted), and for png/jpeg the image inline so you can see it. The link carries no signing token, so it survives being rendered as a citation. To render a diagram that already lives in a document/whiteboard use getDiagramImage; to persist a new one use insertDiagramInDocument or insertWhiteboardDiagram.",
7178
7213
  "operationId": "renderDiagram",
7179
7214
  "tags": [
7180
7215
  "diagrams"
@@ -7215,6 +7250,18 @@
7215
7250
  "background": {
7216
7251
  "type": "string",
7217
7252
  "description": "Background for png/jpeg, e.g. '#ffffff' or 'transparent' (png only)."
7253
+ },
7254
+ "applyBrandTheme": {
7255
+ "type": "boolean",
7256
+ "description": "Brand theming is ON BY DEFAULT: the effective BRAND KIT (colours only — typefaces are never injected) is baked into the diagram before rendering (cascade: brandKitId override → project default → workspace default → org default → the built-in Stable Baseline theme). Set false to render with the library's stock styling instead. Themable types: mermaid, plantuml, graphviz, d2, systemsarchitecture, vega, vegalite, infographic — other types always render unchanged. Author theming in the DSL wins (an existing mermaid %%{init}%%, plantuml !theme, d2 vars.d2-config, or a hand-written infographic palette is never overridden)."
7257
+ },
7258
+ "brandKitId": {
7259
+ "type": "string",
7260
+ "description": "Optional brand kit UUID (see listBrandKits) to theme with instead of the cascade default. Must belong to your organisation."
7261
+ },
7262
+ "projectId": {
7263
+ "type": "string",
7264
+ "description": "Optional project UUID used to resolve the project → workspace → org brand-kit cascade. Without it the built-in Stable Baseline brand themes the render."
7218
7265
  }
7219
7266
  },
7220
7267
  "required": [
@@ -7303,7 +7350,7 @@
7303
7350
  "/tools/getDiagramImage": {
7304
7351
  "post": {
7305
7352
  "summary": "getDiagramImage",
7306
- "description": "Render a diagram that ALREADY exists in a document to an IMAGE (svg/png/jpeg @1x/2x/3x) and return it — a temporary signed URL (expires in 1 hour) plus, for png/jpeg, the image inline so you can see it. Pass the diagramId (from getDocument's DIAGRAM markers or getDiagramInDocument). Reuses the diagram's cached server render when available (pixel-identical to the editor); when the diagram has no cached render yet, the fresh render is persisted back to the document (persistedRender:true in the response), so reading repairs unrendered diagrams. Use renderDiagram instead to generate from raw DSL without an existing diagram.",
7353
+ "description": "Render a diagram that ALREADY exists in a document to an IMAGE (svg/png/jpeg @1x/2x/3x) and return it — a temporary imageUrl available for 1 hour plus, for png/jpeg, the image inline so you can see it, and title/url citing the document the diagram lives in. Pass the diagramId (from getDocument's DIAGRAM markers or getDiagramInDocument). Reuses the diagram's cached server render when available (pixel-identical to the editor), otherwise renders from the diagram's source on the fly. Read-only: nothing in the document or the diagram is changed; the image is a temporary artefact that expires after 1 hour. Use renderDiagram instead to generate from raw DSL without an existing diagram.",
7307
7354
  "operationId": "getDiagramImage",
7308
7355
  "tags": [
7309
7356
  "diagrams"
@@ -8024,7 +8071,7 @@
8024
8071
  "/tools/insertImageInDocument": {
8025
8072
  "post": {
8026
8073
  "summary": "insertImageInDocument",
8027
- "description": "Insert an image into a document (max 10MB). Provide imageBase64, imageBinary, or imageUrl. For large files, call createImageUploadSession first then use the returned assetUrl.",
8074
+ "description": "Insert an image into a document (max 10MB). Provide imageBase64, imageBinary, or imageUrl. For large files, call createImageUploadSession first then use the returned assetUrl. nlDescription AND caption are both REQUIRED, not optional polish: they are what makes the image findable in search and what lets an agent decide whether this picture belongs on a slide or in an answer, since neither can see the pixels from a filename. Write them about what the image SHOWS.",
8028
8075
  "operationId": "insertImageInDocument",
8029
8076
  "tags": [
8030
8077
  "images"
@@ -8085,7 +8132,7 @@
8085
8132
  },
8086
8133
  "afterLine": {
8087
8134
  "type": "number",
8088
- "description": "Insert after this line (0 = beginning, omit = end)."
8135
+ "description": "Insert after this line, counting the SAME line numbers getDocument prints (1-based; frontmatter is not counted, and every diagram/image marker counts as exactly one line). 0 inserts at the very beginning; omit it to append at the end. Re-read with getDocument if the document may have changed, since the number is positional."
8089
8136
  },
8090
8137
  "alt": {
8091
8138
  "type": "string",
@@ -8188,7 +8235,7 @@
8188
8235
  "/tools/updateImageInDocument": {
8189
8236
  "post": {
8190
8237
  "summary": "updateImageInDocument",
8191
- "description": "Update image metadata (alt, caption, dimensions, alignment). Requires the document's versionTimestamp (from getDocument or any mutating tool's response) for optimistic locking.",
8238
+ "description": "Update image metadata (alt, caption, nlDescription, dimensions, alignment) — metadata only; to change the picture itself, delete it and insert the new one. Requires the document's versionTimestamp (from getDocument or any mutating tool's response) for optimistic locking.",
8192
8239
  "operationId": "updateImageInDocument",
8193
8240
  "tags": [
8194
8241
  "images"
@@ -8323,7 +8370,7 @@
8323
8370
  "/tools/deleteImageInDocument": {
8324
8371
  "post": {
8325
8372
  "summary": "deleteImageInDocument",
8326
- "description": "Delete an image from a document and storage.",
8373
+ "description": "Delete an image: removes the stored file, the database record, AND the image from the document body — both the IMAGE marker in the markdown and the image node in the document's rich-text content, so the picture stops appearing on every read. Deleting an image the document still references is the point of this tool; do not hand-edit the marker out with editDocument, which removes the reference but leaves the file and record behind.",
8327
8374
  "operationId": "deleteImageInDocument",
8328
8375
  "tags": [
8329
8376
  "images"
@@ -8338,6 +8385,10 @@
8338
8385
  "imageId": {
8339
8386
  "type": "string",
8340
8387
  "description": "Image ID from IMAGE_OMITTED markers."
8388
+ },
8389
+ "versionTimestamp": {
8390
+ "type": "number",
8391
+ "description": "Optional document optimistic-lock token; validated when provided. (Alias accepted: documentVersionTimestamp.)"
8341
8392
  }
8342
8393
  },
8343
8394
  "required": [
@@ -11155,7 +11206,7 @@
11155
11206
  "/tools/searchImprovements": {
11156
11207
  "post": {
11157
11208
  "summary": "searchImprovements",
11158
- "description": "Locate any artefact (document / whiteboard / diagram / plan / task / improvement / compliance) by name or friendly id — AND ranked semantic search over improvements.\n\n• CROSS-ARTEFACT FINDER MODE (pass `types`): matches title + friendly id (e.g. \"DOC-123\", \"WBD-9\", \"PLN-4\", \"TAS-7\", \"IMP-2\") + description across every artefact type. Returns a typed navigable list ({ artefacts: [{ result_type, id, friendly_id, title, snippet, document_id, project_id, href }] }). This is the tool to use to find an artefact by its name or id — NOT kg_search (which retrieves knowledge from inside content). Pass types:[\"document\",\"whiteboard\",\"plan\",\"task\",\"improvement\",\"compliance\"] (or a subset) to search those types; an empty or all-inclusive list searches everything.\n\n• IMPROVEMENT SEMANTIC MODE (omit `types`): hybrid full-text + vector search over improvements only. Returns ranked { improvements }.",
11209
+ "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.",
11159
11210
  "operationId": "searchImprovements",
11160
11211
  "tags": [
11161
11212
  "improvements"
@@ -11169,22 +11220,18 @@
11169
11220
  "properties": {
11170
11221
  "query": {
11171
11222
  "type": "string",
11172
- "description": "Search query — a name fragment or a friendly id."
11223
+ "description": "Search query — meaning, a name fragment, or a friendly id (e.g. \"IMP-2\", \"TAS-7\")."
11173
11224
  },
11174
11225
  "types": {
11175
11226
  "type": "array",
11176
11227
  "items": {
11177
11228
  "type": "string",
11178
11229
  "enum": [
11179
- "document",
11180
- "whiteboard",
11181
11230
  "improvement",
11182
- "task",
11183
- "plan",
11184
- "compliance"
11231
+ "task"
11185
11232
  ]
11186
11233
  },
11187
- "description": "Switches on the cross-artefact finder. Artefact types to search (subset of document, whiteboard, improvement, task, plan, compliance). Empty / all = every type. Omit entirely for the improvements-only semantic search."
11234
+ "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."
11188
11235
  },
11189
11236
  "projectId": {
11190
11237
  "type": "string",
@@ -11196,11 +11243,7 @@
11196
11243
  },
11197
11244
  "limit": {
11198
11245
  "type": "number",
11199
- "description": "Max results (default 20 semantic / 30 cross-artefact, max 50)."
11200
- },
11201
- "offset": {
11202
- "type": "number",
11203
- "description": "Pagination offset (cross-artefact mode)."
11246
+ "description": "Max results (default 20, max 50)."
11204
11247
  }
11205
11248
  },
11206
11249
  "required": [
@@ -15083,7 +15126,7 @@
15083
15126
  "/tools/kg_search": {
15084
15127
  "post": {
15085
15128
  "summary": "kg_search",
15086
- "description": "Unified Knowledge Graph KNOWLEDGE retrieval — facts, themes and relationships from INSIDE document CONTENT. This is NOT an artefact finder: do NOT use it to locate a document / whiteboard / diagram / plan / task / improvement by its TITLE or friendly id (e.g. \"DOC-123\", \"find the GTM plan\"). For locating an artefact by name or id use listDocuments / listWhiteboards / listPlans / listTasks / searchImprovements (they match title + friendly id). Use kg_search only to ANSWER A QUESTION from the knowledge contained in the artefacts.\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'",
15129
+ "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).",
15087
15130
  "operationId": "kg_search",
15088
15131
  "tags": [
15089
15132
  "knowledge_graph"
@@ -15097,7 +15140,31 @@
15097
15140
  "properties": {
15098
15141
  "query": {
15099
15142
  "type": "string",
15100
- "description": "Natural-language query. Required for local/global/ppr; optional for graph (use srcEntityId instead)."
15143
+ "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."
15144
+ },
15145
+ "artefactMetadataOnly": {
15146
+ "type": "boolean",
15147
+ "default": false,
15148
+ "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."
15149
+ },
15150
+ "artefactTypes": {
15151
+ "type": "array",
15152
+ "items": {
15153
+ "type": "string",
15154
+ "enum": [
15155
+ "document",
15156
+ "whiteboard",
15157
+ "improvement",
15158
+ "task",
15159
+ "plan",
15160
+ "compliance"
15161
+ ]
15162
+ },
15163
+ "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."
15164
+ },
15165
+ "offset": {
15166
+ "type": "number",
15167
+ "description": "Only with artefactMetadataOnly:true. Skip this many results for paging."
15101
15168
  },
15102
15169
  "mode": {
15103
15170
  "type": "string",
@@ -23528,7 +23595,7 @@
23528
23595
  },
23529
23596
  "tokens": {
23530
23597
  "type": "object",
23531
- "description": "Explicit DTCG brand tokens { color:{brand:{primary,primaryText,ink,bg,surface,muted,border,positive,warning,negative}}, font:{heading,body} }. Omit to extract from logoUrl/officeUrl.",
23598
+ "description": "Explicit DTCG brand tokens { color:{brand:{primary,primaryText,ink,bg,surface,muted,border,positive,warning,negative,accentHover?,accentActive?}}, font:{heading,body} }. EXTENDED CAPTURE (all optional; captured values replace derivation heuristics in deck/document theming): structure:{typeScalePx:[..], leadingBody, leadingTight, trackingDisplayEm, spacingPx:[..], radiusPx:{sm,md,lg}, elevation:'flat'|'ring'|'soft'|'raised'}, motion:{speed:'snappy'|'standard'|'stately', easing:'cubic-bezier(..)'}, voice:{tone, notes}, imagery:{style, notes}, antiPatterns:['never ..']. Omit tokens entirely to extract from logoUrl/officeUrl.",
23532
23599
  "additionalProperties": true
23533
23600
  },
23534
23601
  "guidance": {
@@ -23736,7 +23803,7 @@
23736
23803
  "/tools/setDefaultBrandKit": {
23737
23804
  "post": {
23738
23805
  "summary": "setDefaultBrandKit",
23739
- "description": "Set or clear the default BRAND KIT at a scope: organization, workspace, or project. Defaults cascade most-specific-first (a per-board/document override beats project beats workspace beats organization). Pass brandKitId:null to clear. Auth: org owner/admin.",
23806
+ "description": "Set or clear the default BRAND KIT at a scope: organization, workspace, project, folder, or document. Defaults cascade most-specific-first, lowest level up: document beats the nearest folder up the (nested) folder chain beats project beats workspace beats organization. Diagram brand theming, exports and decks all resolve through this cascade. Pass brandKitId:null to clear. Auth: org owner/admin.",
23740
23807
  "operationId": "setDefaultBrandKit",
23741
23808
  "tags": [
23742
23809
  "settings"
@@ -23753,12 +23820,14 @@
23753
23820
  "enum": [
23754
23821
  "organization",
23755
23822
  "workspace",
23756
- "project"
23823
+ "project",
23824
+ "folder",
23825
+ "document"
23757
23826
  ]
23758
23827
  },
23759
23828
  "scopeId": {
23760
23829
  "type": "string",
23761
- "description": "The org/workspace/project id for the chosen scope."
23830
+ "description": "The org/workspace/project/folder/document id for the chosen scope."
23762
23831
  },
23763
23832
  "brandKitId": {
23764
23833
  "type": [
@@ -23854,7 +23923,7 @@
23854
23923
  "/tools/updateOrgFeatureFlags": {
23855
23924
  "post": {
23856
23925
  "summary": "updateOrgFeatureFlags",
23857
- "description": "Toggle feature flags on settings.enabledFeatures (plans, improvements, compliance, knowledge_graph, documents). Auth: can_admin_org + org admin. Rate limit 30/min. Plan-tier gated: enabling knowledge_graph requires Pro/Enterprise.",
23926
+ "description": "Toggle organisation feature modules (plans, improvements, compliance, knowledge_graph, documents, meeting_scribe). Auth: can_admin_org + org admin. Rate limit 30/min. A flag can only be ENABLED when the feature is available to the organisation — included in its plan (knowledge_graph and compliance need Enterprise, meeting_scribe needs Pro or Enterprise) or granted by a platform administrator. Disabling is always allowed. Disabled modules hide their tools and app pages.",
23858
23927
  "operationId": "updateOrgFeatureFlags",
23859
23928
  "tags": [
23860
23929
  "settings"
@@ -23883,6 +23952,9 @@
23883
23952
  },
23884
23953
  "documents": {
23885
23954
  "type": "boolean"
23955
+ },
23956
+ "meeting_scribe": {
23957
+ "type": "boolean"
23886
23958
  }
23887
23959
  },
23888
23960
  "required": [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stablebaseline/sdk",
3
- "version": "0.5.3",
3
+ "version": "0.6.1",
4
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": {
@@ -60,7 +60,7 @@
60
60
  "openapi-typescript": "^7.5.0",
61
61
  "tsup": "^8.3.5",
62
62
  "typescript": "^5.6.3",
63
- "vitest": "^4.1.10"
63
+ "vitest": "^4.1.11"
64
64
  },
65
65
  "engines": {
66
66
  "node": ">=18"