@stablebaseline/sdk 0.7.1 → 0.9.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 +19 -9
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +15677 -3455
- package/dist/index.d.ts +15677 -3455
- package/dist/index.js +1 -1
- package/openapi.json +19794 -539
- package/package.json +7 -5
- package/src/client.ts +4 -4
- package/src/index.ts +1 -1
- package/src/types.generated.ts +15674 -3452
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
|
|
3
|
+
"version": "0.9.0",
|
|
4
|
+
"description": "TypeScript SDK for the Stable Baseline REST API. End-to-end agent-managed company brain: docs, diagrams, plans, databases, agents and a self-learning Knowledge Graph. 219 tools across 20 categories.",
|
|
5
5
|
"homepage": "https://stablebaseline.io",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -23,7 +23,9 @@
|
|
|
23
23
|
"ai-agent",
|
|
24
24
|
"rest-api",
|
|
25
25
|
"sdk",
|
|
26
|
-
"typescript"
|
|
26
|
+
"typescript",
|
|
27
|
+
"databases",
|
|
28
|
+
"agents"
|
|
27
29
|
],
|
|
28
30
|
"type": "module",
|
|
29
31
|
"main": "./dist/index.cjs",
|
|
@@ -36,7 +38,7 @@
|
|
|
36
38
|
"require": "./dist/index.cjs"
|
|
37
39
|
},
|
|
38
40
|
"./types": {
|
|
39
|
-
"types": "./dist/
|
|
41
|
+
"types": "./dist/index.d.ts"
|
|
40
42
|
}
|
|
41
43
|
},
|
|
42
44
|
"files": [
|
|
@@ -47,7 +49,7 @@
|
|
|
47
49
|
"LICENSE"
|
|
48
50
|
],
|
|
49
51
|
"scripts": {
|
|
50
|
-
"codegen": "openapi-typescript ./openapi.json -o ./src/types.generated.ts",
|
|
52
|
+
"codegen": "openapi-typescript ./openapi.json -o ./src/types.generated.ts --empty-objects-unknown",
|
|
51
53
|
"build": "tsup src/index.ts --format esm,cjs --dts --clean",
|
|
52
54
|
"prepublishOnly": "npm run codegen && npm run build",
|
|
53
55
|
"test": "vitest run",
|
package/src/client.ts
CHANGED
|
@@ -6,8 +6,8 @@ const DEFAULT_BASE_URL =
|
|
|
6
6
|
|
|
7
7
|
export interface StableBaselineClientOptions {
|
|
8
8
|
/**
|
|
9
|
-
* MCP API key with the `sta_` prefix.
|
|
10
|
-
* https://app.stablebaseline.io/settings/
|
|
9
|
+
* MCP API key with the `sta_` prefix. Create one at
|
|
10
|
+
* https://app.stablebaseline.io/settings/developers.
|
|
11
11
|
*
|
|
12
12
|
* Either `apiKey` or `accessToken` is required (mutually exclusive).
|
|
13
13
|
*/
|
|
@@ -93,7 +93,7 @@ export class StableBaseline {
|
|
|
93
93
|
private signal?: AbortSignal;
|
|
94
94
|
|
|
95
95
|
/**
|
|
96
|
-
* Strongly-typed dispatch surface. Every entry is one of the
|
|
96
|
+
* Strongly-typed dispatch surface. Every entry is one of the MCP tools.
|
|
97
97
|
*
|
|
98
98
|
* const orgs = await sb.tools.listOrganisations({});
|
|
99
99
|
* const doc = await sb.tools.createDocument({ folderId, title, cdmd });
|
|
@@ -113,7 +113,7 @@ export class StableBaseline {
|
|
|
113
113
|
|
|
114
114
|
// Build the tool-dispatch surface as a Proxy. Each property access
|
|
115
115
|
// returns a function that POSTs to `/tools/<name>`. This avoids hand-
|
|
116
|
-
// listing
|
|
116
|
+
// listing every method while keeping full type safety on usage thanks
|
|
117
117
|
// to the generated `paths` type above.
|
|
118
118
|
const self = this;
|
|
119
119
|
this.tools = new Proxy({} as ToolDispatchMap, {
|
package/src/index.ts
CHANGED
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
// cdmd: "# ...",
|
|
11
11
|
// });
|
|
12
12
|
//
|
|
13
|
-
//
|
|
13
|
+
// Every MCP tool is reachable from `sb.tools.<toolName>(input)`. Types
|
|
14
14
|
// are generated from the live OpenAPI spec (`openapi.json` in this package).
|
|
15
15
|
|
|
16
16
|
export { StableBaseline } from "./client.js";
|