@barndoor-ai/sdk 0.2.2 → 0.3.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 +14 -3
- package/dist/auth/pkce.d.ts.map +1 -1
- package/dist/client.d.ts +1 -0
- package/dist/client.d.ts.map +1 -1
- package/dist/config.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +2 -2
- package/dist/index.js +2 -2
- package/dist/quickstart.d.ts +16 -6
- package/dist/quickstart.d.ts.map +1 -1
- package/package.json +14 -2
package/dist/quickstart.d.ts
CHANGED
|
@@ -63,13 +63,17 @@ export declare function ensureServerConnected(sdk: BarndoorSDK, serverIdentifier
|
|
|
63
63
|
* framework (CrewAI, LangChain, custom implementations).
|
|
64
64
|
*
|
|
65
65
|
* @param {BarndoorSDK} sdk - SDK instance
|
|
66
|
-
* @param {string}
|
|
66
|
+
* @param {string} serverSlugOrId - Server slug (e.g., "salesforce") or UUID
|
|
67
67
|
* @param {Object} [options={}] - Options
|
|
68
|
+
* @param {string} [options.serverId] - Server UUID (alternative to passing as first param)
|
|
69
|
+
* @param {string} [options.serverSlug] - Server slug (alternative to passing as first param)
|
|
68
70
|
* @param {string} [options.proxyBaseUrl='http://proxy-ingress:8080'] - Proxy base URL
|
|
69
71
|
* @param {string} [options.transport='streamable-http'] - Transport type
|
|
70
72
|
* @returns {Promise<[Object, string]>} [params, publicUrl]
|
|
71
73
|
*/
|
|
72
|
-
export declare function makeMcpConnectionParams(sdk: BarndoorSDK,
|
|
74
|
+
export declare function makeMcpConnectionParams(sdk: BarndoorSDK, serverSlugOrId: string, options?: {
|
|
75
|
+
serverId?: string;
|
|
76
|
+
serverSlug?: string;
|
|
73
77
|
proxyBaseUrl?: string;
|
|
74
78
|
transport?: string;
|
|
75
79
|
}): Promise<[unknown, string]>;
|
|
@@ -77,14 +81,20 @@ export declare function makeMcpConnectionParams(sdk: BarndoorSDK, serverSlug: st
|
|
|
77
81
|
* Create and connect an MCP client for the specified server.
|
|
78
82
|
*
|
|
79
83
|
* This helper uses the official `@modelcontextprotocol/sdk` package so callers
|
|
80
|
-
* don
|
|
84
|
+
* don't need to hand-craft JSON-RPC envelopes or manage transports manually.
|
|
81
85
|
*
|
|
82
86
|
* @param {BarndoorSDK} sdk – An initialized Barndoor SDK instance (must contain a valid JWT in `sdk.token`).
|
|
83
|
-
* @param {string}
|
|
84
|
-
* @param {Object} [options] – Optional overrides
|
|
87
|
+
* @param {string} serverSlugOrId – The server slug (e.g. "salesforce", "notion") or UUID.
|
|
88
|
+
* @param {Object} [options] – Optional overrides.
|
|
89
|
+
* @param {string} [options.serverId] - Server UUID (alternative to passing as first param)
|
|
90
|
+
* @param {string} [options.serverSlug] - Server slug (alternative to passing as first param)
|
|
91
|
+
* @param {string} [options.proxyBaseUrl] - Proxy base URL override
|
|
92
|
+
* @param {string} [options.transport] - Transport type override
|
|
85
93
|
* @returns {Promise<McpClient>} A connected MCP client ready for `listTools`, `callTool`, etc.
|
|
86
94
|
*/
|
|
87
|
-
export declare function makeMcpClient(sdk: BarndoorSDK,
|
|
95
|
+
export declare function makeMcpClient(sdk: BarndoorSDK, serverSlugOrId: string, options?: {
|
|
96
|
+
serverId?: string;
|
|
97
|
+
serverSlug?: string;
|
|
88
98
|
proxyBaseUrl?: string;
|
|
89
99
|
transport?: string;
|
|
90
100
|
}): Promise<McpClient>;
|
package/dist/quickstart.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"quickstart.d.ts","sourceRoot":"","sources":["../src/quickstart.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;
|
|
1
|
+
{"version":3,"file":"quickstart.d.ts","sourceRoot":"","sources":["../src/quickstart.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AAEH,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU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M,CAAC;IACpB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,SAAS,CAAC,EAAE,MAAM,CAAC;CACf,GACL,OAAO,CAAC,SAAS,CAAC,CAqBpB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@barndoor-ai/sdk",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.3.0",
|
|
4
4
|
"description": "TypeScript/JavaScript client for the Barndoor Platform API",
|
|
5
5
|
"author": "Barndoor AI, Inc. (https://barndoor.ai)",
|
|
6
6
|
"homepage": "https://barndoor.ai",
|
|
@@ -49,7 +49,8 @@
|
|
|
49
49
|
"type-coverage": "type-coverage --at-least 60 --strict",
|
|
50
50
|
"dump-all": "node scripts/dump-core-files.js",
|
|
51
51
|
"dump-typescript": "node scripts/dump-typescript-only.js",
|
|
52
|
-
"prepublishOnly": "npm run build"
|
|
52
|
+
"prepublishOnly": "npm run build",
|
|
53
|
+
"prepare": "husky"
|
|
53
54
|
},
|
|
54
55
|
"dependencies": {
|
|
55
56
|
"@modelcontextprotocol/sdk": "^1.17.0",
|
|
@@ -75,7 +76,9 @@
|
|
|
75
76
|
"eslint": "^8.0.0",
|
|
76
77
|
"eslint-config-prettier": "^10.1.8",
|
|
77
78
|
"eslint-plugin-prettier": "^5.5.3",
|
|
79
|
+
"husky": "^9.1.7",
|
|
78
80
|
"jest": "^29.0.0",
|
|
81
|
+
"lint-staged": "^15.5.2",
|
|
79
82
|
"prettier": "^3.6.2",
|
|
80
83
|
"rollup": "^3.29.4",
|
|
81
84
|
"type-coverage": "^2.29.7",
|
|
@@ -89,5 +92,14 @@
|
|
|
89
92
|
"**/*.test.ts",
|
|
90
93
|
"examples/**/*"
|
|
91
94
|
]
|
|
95
|
+
},
|
|
96
|
+
"lint-staged": {
|
|
97
|
+
"*.{ts,js}": [
|
|
98
|
+
"eslint --fix",
|
|
99
|
+
"prettier --write"
|
|
100
|
+
],
|
|
101
|
+
"*.{json,md}": [
|
|
102
|
+
"prettier --write"
|
|
103
|
+
]
|
|
92
104
|
}
|
|
93
105
|
}
|