@corsair-dev/mcp 0.1.10 → 0.1.12
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.
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"anthropic-api.d.ts","sourceRoot":"","sources":["../../src/adapters/anthropic-api.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"anthropic-api.d.ts","sourceRoot":"","sources":["../../src/adapters/anthropic-api.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,6BAA6B,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,qBAAqB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAKvD,KAAK,oBAAoB,GAAG,IAAI,GAAG;IAClC,GAAG,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,MAAM,CAAC,CAAC;IACxD,KAAK,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACrD,CAAC;AAEF,qBAAa,iBAAkB,SAAQ,YAAY,CAAC,oBAAoB,CAAC;IACxE,QAAQ,CAAC,IAAI,eAAe;IAE5B,QAAQ,CAAC,GAAG,EAAE,cAAc,GAAG,oBAAoB;CAuBnD"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"openai-agents.d.ts","sourceRoot":"","sources":["../../src/adapters/openai-agents.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"openai-agents.d.ts","sourceRoot":"","sources":["../../src/adapters/openai-agents.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,IAAI,UAAU,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAG/D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAG1D,MAAM,MAAM,2BAA2B,GAAG,cAAc,GAAG;IAC1D,IAAI,EAAE,OAAO,UAAU,CAAC;CACxB,CAAC;AAEF,qBAAa,oBAAoB;IAChC,QAAQ,CAAC,IAAI,mBAAmB;IAEhC,KAAK,CAAC,OAAO,EAAE,2BAA2B,GAAG,IAAI,CAAC,OAAO,CAAC,EAAE;CA4C5D"}
|
package/dist/core/tools.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/core/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACpE,CAAC;AAEF,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,cAAc,GACrB,cAAc,EAAE,
|
|
1
|
+
{"version":3,"file":"tools.d.ts","sourceRoot":"","sources":["../../src/core/tools.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAEzE,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,eAAe,CAAC;AAEpD,MAAM,MAAM,cAAc,GAAG;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,EAAE,CAAC,CAAC,WAAW,CAAC;IACrB,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;CACpE,CAAC;AAEF,wBAAgB,oBAAoB,CACnC,OAAO,EAAE,cAAc,GACrB,cAAc,EAAE,CAwKlB"}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export { AnthropicProvider } from './adapters/anthropic-api.js';
|
|
2
2
|
export { ClaudeProvider } from './adapters/claude.js';
|
|
3
3
|
export { MastraProvider } from './adapters/mastra.js';
|
|
4
|
-
export type { OpenAIAgentsProviderOptions } from './adapters/openai-agents.js';
|
|
5
|
-
export { OpenAIAgentsProvider } from './adapters/openai-agents.js';
|
|
6
4
|
export type { OpenAIMcpConfig } from './adapters/openai.js';
|
|
7
5
|
export { getOpenAIMcpConfig } from './adapters/openai.js';
|
|
6
|
+
export type { OpenAIAgentsProviderOptions } from './adapters/openai-agents.js';
|
|
7
|
+
export { OpenAIAgentsProvider } from './adapters/openai-agents.js';
|
|
8
8
|
export type { VercelAiMcpClientOptions } from './adapters/vercel-ai.js';
|
|
9
9
|
export { createVercelAiMcpClient } from './adapters/vercel-ai.js';
|
|
10
10
|
export type { BaseMcpOptions, PermissionAdapter } from './core/adapters.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,6BAA6B,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,OAAO,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACtD,YAAY,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,2BAA2B,EAAE,MAAM,6BAA6B,CAAC;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AACnE,YAAY,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACxE,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,YAAY,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,OAAO,EAAE,eAAe,EAAE,MAAM,gBAAgB,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -85,11 +85,17 @@ ${full}`
|
|
|
85
85
|
handler: async () => {
|
|
86
86
|
try {
|
|
87
87
|
if (Object.keys(corsair).includes("withTenant")) {
|
|
88
|
-
throw new Error(
|
|
88
|
+
throw new Error(
|
|
89
|
+
"Cannot setup Corsair if it multiTenancy is enabled."
|
|
90
|
+
);
|
|
89
91
|
}
|
|
90
|
-
const text = await setupCorsair(
|
|
92
|
+
const text = await setupCorsair(
|
|
93
|
+
corsair
|
|
94
|
+
);
|
|
91
95
|
return {
|
|
92
|
-
content: [
|
|
96
|
+
content: [
|
|
97
|
+
{ type: "text", text: text || "Corsair setup complete." }
|
|
98
|
+
]
|
|
93
99
|
};
|
|
94
100
|
} catch (err) {
|
|
95
101
|
const message = err instanceof Error ? err.message : String(err);
|
|
@@ -174,7 +180,11 @@ var AnthropicProvider = class extends BaseProvider {
|
|
|
174
180
|
var ClaudeProvider = class {
|
|
175
181
|
name = "claude";
|
|
176
182
|
async build(options) {
|
|
177
|
-
const { tool } = await import(
|
|
183
|
+
const { tool } = await import(
|
|
184
|
+
/* webpackIgnore: true */
|
|
185
|
+
/* turbopackIgnore: true */
|
|
186
|
+
"@anthropic-ai/claude-agent-sdk"
|
|
187
|
+
);
|
|
178
188
|
return buildCorsairToolDefs(options).map(
|
|
179
189
|
(def) => tool(def.name, def.description, def.shape, def.handler)
|
|
180
190
|
);
|
|
@@ -186,7 +196,11 @@ import { z as z3 } from "zod";
|
|
|
186
196
|
var MastraProvider = class {
|
|
187
197
|
name = "mastra";
|
|
188
198
|
async build(options) {
|
|
189
|
-
const { createTool } = await import(
|
|
199
|
+
const { createTool } = await import(
|
|
200
|
+
/* webpackIgnore: true */
|
|
201
|
+
/* turbopackIgnore: true */
|
|
202
|
+
"@mastra/core/tools"
|
|
203
|
+
);
|
|
190
204
|
return buildCorsairToolDefs(options).map(
|
|
191
205
|
(def) => createTool({
|
|
192
206
|
id: def.name,
|
|
@@ -212,6 +226,15 @@ var MastraProvider = class {
|
|
|
212
226
|
}
|
|
213
227
|
};
|
|
214
228
|
|
|
229
|
+
// src/adapters/openai.ts
|
|
230
|
+
function getOpenAIMcpConfig(baseUrl, headers) {
|
|
231
|
+
return {
|
|
232
|
+
serverLabel: "corsair",
|
|
233
|
+
serverUrl: baseUrl,
|
|
234
|
+
headers
|
|
235
|
+
};
|
|
236
|
+
}
|
|
237
|
+
|
|
215
238
|
// src/adapters/openai-agents.ts
|
|
216
239
|
import { z as z4 } from "zod";
|
|
217
240
|
import { zodToJsonSchema as zodToJsonSchema2 } from "zod-to-json-schema";
|
|
@@ -250,18 +273,13 @@ var OpenAIAgentsProvider = class {
|
|
|
250
273
|
}
|
|
251
274
|
};
|
|
252
275
|
|
|
253
|
-
// src/adapters/openai.ts
|
|
254
|
-
function getOpenAIMcpConfig(baseUrl, headers) {
|
|
255
|
-
return {
|
|
256
|
-
serverLabel: "corsair",
|
|
257
|
-
serverUrl: baseUrl,
|
|
258
|
-
headers
|
|
259
|
-
};
|
|
260
|
-
}
|
|
261
|
-
|
|
262
276
|
// src/adapters/vercel-ai.ts
|
|
263
277
|
async function createVercelAiMcpClient(options) {
|
|
264
|
-
const { createMCPClient } = await import(
|
|
278
|
+
const { createMCPClient } = await import(
|
|
279
|
+
/* webpackIgnore: true */
|
|
280
|
+
/* turbopackIgnore: true */
|
|
281
|
+
"@ai-sdk/mcp"
|
|
282
|
+
);
|
|
265
283
|
const { url, headers } = options;
|
|
266
284
|
const client = await createMCPClient({
|
|
267
285
|
transport: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@corsair-dev/mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.12",
|
|
4
4
|
"description": "MCP server and SDK adapters for Corsair — list operations, inspect schemas, run API calls",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"express": "^4.21.0",
|
|
22
22
|
"zod": "^3.25.0",
|
|
23
23
|
"zod-to-json-schema": "^3.25.0",
|
|
24
|
-
"corsair": "0.1.
|
|
24
|
+
"corsair": "0.1.38"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@ai-sdk/mcp": ">=0.0.1",
|