@stablebaseline/sdk 0.7.1 → 0.8.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 CHANGED
@@ -1,9 +1,9 @@
1
1
  # @stablebaseline/sdk
2
2
 
3
3
  [![npm](https://img.shields.io/npm/v/@stablebaseline/sdk?color=orange)](https://www.npmjs.com/package/@stablebaseline/sdk)
4
- [![Tools](https://img.shields.io/badge/MCP%20tools-196-orange)](https://stablebaseline.io/docs/mcp/tools)
4
+ [![Tools](https://img.shields.io/badge/MCP%20tools-219-orange)](https://stablebaseline.io/docs/mcp/tools)
5
5
 
6
- TypeScript SDK for the **[Stable Baseline](https://stablebaseline.io) REST API** — the simplest, most complete, end-to-end agent-managed company brain. Living docs, 40+ visual diagrams, plans, and a self-learning Knowledge Graph. 196 tools across 18 categories.
6
+ TypeScript SDK for the **[Stable Baseline](https://stablebaseline.io) REST API**: the simplest, most complete, end-to-end agent-managed company brain. Living docs, 40+ visual diagrams, plans, databases with live dashboards, the organisation's agents, and a self-learning Knowledge Graph. 219 tools across 20 categories.
7
7
 
8
8
  ## Install
9
9
 
@@ -16,7 +16,7 @@ npm install @stablebaseline/sdk
16
16
  ```ts
17
17
  import { StableBaseline } from "@stablebaseline/sdk";
18
18
 
19
- // Mint an API key at https://app.stablebaseline.io/settings/mcp-setup
19
+ // Create an API key at https://app.stablebaseline.io/settings/developers
20
20
  const sb = new StableBaseline({ apiKey: process.env.SB_API_KEY! });
21
21
 
22
22
  const orgs = await sb.tools.listOrganisations({});
@@ -34,6 +34,14 @@ const search = await sb.tools.kg_search({
34
34
  mode: "global",
35
35
  });
36
36
  console.log(search.entities);
37
+
38
+ const openDeals = await sb.tools.queryDatabaseRows({
39
+ databaseId: "DB-12",
40
+ table: "Deals",
41
+ where: { field: "Stage", is: "Open" },
42
+ summaries: [{ fn: "count" }],
43
+ });
44
+ console.log(openDeals);
37
45
  ```
38
46
 
39
47
  ## Auth
@@ -41,26 +49,28 @@ console.log(search.entities);
41
49
  Two equivalent paths:
42
50
 
43
51
  ```ts
44
- // API key (mint at app.stablebaseline.io/settings/mcp-setup, prefix sta_)
52
+ // API key (create one under Organisation settings, Connected apps, Developers; prefix sta_)
45
53
  new StableBaseline({ apiKey: "sta_..." });
46
54
 
47
55
  // OAuth 2.1 access token (interactive flow against api.stablebaseline.io/functions/v1/cloud-serve/oauth/token)
48
56
  new StableBaseline({ accessToken: "..." });
49
57
  ```
50
58
 
51
- Both go in the `Authorization: Bearer <...>` header.
59
+ Both go in the `Authorization: Bearer <...>` header. Databases start unticked on a new API key: tick them if the key should reach databases.
52
60
 
53
61
  ## Tool catalogue
54
62
 
55
- 196 tools across 18 categories. The full list lives at [stablebaseline.io/docs/mcp/tools](https://stablebaseline.io/docs/mcp/tools). Highlights:
63
+ 219 tools across 20 categories. The full list lives at [stablebaseline.io/docs/mcp/tools](https://stablebaseline.io/docs/mcp/tools). Highlights:
56
64
 
57
65
  | Category | Sample tools |
58
66
  |---|---|
59
67
  | `navigation` | `listOrganisations`, `listWorkspaces`, `listProjects`, `getProjectHierarchy`, `searchTools` |
60
- | `documents` | `createDocument`, `getDocument`, `editDocument`, `findAndReplaceTextInDocument`, `deleteDocument` |
68
+ | `documents` | `createDocument`, `getDocument`, `editDocument`, `exportDocument`, `deleteDocument` |
61
69
  | `diagrams` | `insertDiagramInDocument`, `listDiagramTypes`, `getCdmdLanguageGuide` |
62
70
  | `plans` | `createPlan`, `createTask`, `getPlanHierarchy`, `previewTaskDependencyCascade` |
63
71
  | `improvements` | `createImprovement`, `searchImprovements`, `addImprovementEvidence` |
72
+ | `databases` | `createDatabase`, `queryDatabaseRows`, `writeDatabaseRows`, `importDatabaseRows`, `saveDatabaseDashboard` |
73
+ | `agents` | `listAgents`, `askAgent`, `delegateToAgent`, `getAgentRun`, `approveAgentAction` |
64
74
  | `knowledge_graph` | `kg_search`, `kg_get_entity`, `kg_related_documents` |
65
75
  | `members` / `teams` / `permissions` | full org control plane |
66
76
  | `billing` | `previewSubscriptionChange`, `applySubscriptionChange`, `purchaseCreditPackage` |
@@ -112,8 +122,8 @@ This SDK is one of three first-party clients:
112
122
  | **CLI** | `@stablebaseline/cli` (binary `sb`) | Shells, scripts, CI/CD |
113
123
  | **Python SDK** | `stablebaseline` (PyPI) | Python apps, data work |
114
124
 
115
- All three share the same auth, same tool surface, same handlers. The MCP server itself is the source of truth — see the [public-facing repo](https://github.com/stablebaseline/mcp).
125
+ All three share the same auth, same tool surface, same handlers. The MCP server itself is the source of truth: see the [public-facing repo](https://github.com/stablebaseline/mcp).
116
126
 
117
127
  ## License
118
128
 
119
- MIT — see [LICENSE](../../LICENSE) at the repo root. The Stable Baseline product itself is proprietary SaaS at [stablebaseline.io](https://stablebaseline.io).
129
+ MIT, see [LICENSE](../../LICENSE) at the repo root. The Stable Baseline product itself is proprietary SaaS at [stablebaseline.io](https://stablebaseline.io).
package/dist/index.cjs CHANGED
@@ -49,7 +49,7 @@ var StableBaseline = class {
49
49
  authHeader;
50
50
  signal;
51
51
  /**
52
- * Strongly-typed dispatch surface. Every entry is one of the 184 MCP tools.
52
+ * Strongly-typed dispatch surface. Every entry is one of the MCP tools.
53
53
  *
54
54
  * const orgs = await sb.tools.listOrganisations({});
55
55
  * const doc = await sb.tools.createDocument({ folderId, title, cdmd });