integrate-sdk 0.7.41 → 0.7.42
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/dist/ai/google.d.ts +5 -34
- package/dist/ai/google.d.ts.map +1 -1
- package/dist/ai/google.js +30 -12
- package/dist/ai/index.js +30 -12
- package/dist/server.js +30 -12
- package/dist/src/ai/google.d.ts +5 -34
- package/dist/src/ai/google.d.ts.map +1 -1
- package/package.json +5 -4
package/dist/ai/google.d.ts
CHANGED
|
@@ -6,40 +6,11 @@
|
|
|
6
6
|
import type { MCPClient } from "../client.js";
|
|
7
7
|
import type { MCPTool } from "../protocol/messages.js";
|
|
8
8
|
import { type AIToolsOptions } from "./utils.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
description?: string;
|
|
15
|
-
enum?: string[];
|
|
16
|
-
items?: Schema;
|
|
17
|
-
properties?: Record<string, Schema>;
|
|
18
|
-
required?: string[];
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Google GenAI function declaration
|
|
23
|
-
* Compatible with @google/genai SDK FunctionDeclaration type
|
|
24
|
-
*/
|
|
25
|
-
export interface GoogleTool {
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
parameters: {
|
|
29
|
-
type: 'object';
|
|
30
|
-
description?: string;
|
|
31
|
-
properties?: Record<string, Schema>;
|
|
32
|
-
required?: string[];
|
|
33
|
-
[key: string]: unknown;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Google GenAI function call
|
|
38
|
-
*/
|
|
39
|
-
export interface GoogleFunctionCall {
|
|
40
|
-
name?: string;
|
|
41
|
-
args?: Record<string, unknown>;
|
|
42
|
-
}
|
|
9
|
+
import { Type } from "@google/genai";
|
|
10
|
+
import type { Schema, FunctionDeclaration, FunctionCall } from "@google/genai";
|
|
11
|
+
export type GoogleTool = FunctionDeclaration;
|
|
12
|
+
export type GoogleFunctionCall = FunctionCall;
|
|
13
|
+
export type { Schema, Type };
|
|
43
14
|
/**
|
|
44
15
|
* Options for converting MCP tools to Google GenAI format
|
|
45
16
|
*/
|
package/dist/ai/google.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/ai/google.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/ai/google.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,EACV,MAAM,EACN,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CAAI;AA4D9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,EACvB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,UAAU,CAoBZ;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAGd;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,YAAY,EAAE,kBAAkB,EAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,aAAa,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAAG,IAAI,EACtD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAUnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB"}
|
package/dist/ai/google.js
CHANGED
|
@@ -4203,6 +4203,18 @@ async function ensureClientConnected(client) {
|
|
|
4203
4203
|
}
|
|
4204
4204
|
|
|
4205
4205
|
// google.ts
|
|
4206
|
+
import { Type } from "@google/genai";
|
|
4207
|
+
function convertJsonSchemaTypeToGoogleType(type) {
|
|
4208
|
+
const typeMap = {
|
|
4209
|
+
string: Type.STRING,
|
|
4210
|
+
number: Type.NUMBER,
|
|
4211
|
+
integer: Type.INTEGER,
|
|
4212
|
+
boolean: Type.BOOLEAN,
|
|
4213
|
+
array: Type.ARRAY,
|
|
4214
|
+
object: Type.OBJECT
|
|
4215
|
+
};
|
|
4216
|
+
return typeMap[type.toLowerCase()] || Type.STRING;
|
|
4217
|
+
}
|
|
4206
4218
|
function convertPropertiesToSchema(properties) {
|
|
4207
4219
|
const result = {};
|
|
4208
4220
|
for (const [key, value] of Object.entries(properties)) {
|
|
@@ -4211,11 +4223,12 @@ function convertPropertiesToSchema(properties) {
|
|
|
4211
4223
|
continue;
|
|
4212
4224
|
}
|
|
4213
4225
|
const schema = {
|
|
4214
|
-
type: value.type,
|
|
4215
4226
|
description: value.description,
|
|
4216
|
-
enum: value.enum
|
|
4217
|
-
required: value.required
|
|
4227
|
+
enum: value.enum
|
|
4218
4228
|
};
|
|
4229
|
+
if (value.type) {
|
|
4230
|
+
schema.type = convertJsonSchemaTypeToGoogleType(value.type);
|
|
4231
|
+
}
|
|
4219
4232
|
if (value.items) {
|
|
4220
4233
|
schema.items = convertPropertiesToSchema({ items: value.items }).items;
|
|
4221
4234
|
}
|
|
@@ -4223,7 +4236,7 @@ function convertPropertiesToSchema(properties) {
|
|
|
4223
4236
|
schema.properties = convertPropertiesToSchema(value.properties);
|
|
4224
4237
|
}
|
|
4225
4238
|
for (const [k, v] of Object.entries(value)) {
|
|
4226
|
-
if (!["type", "description", "enum", "
|
|
4239
|
+
if (!["type", "description", "enum", "items", "properties"].includes(k)) {
|
|
4227
4240
|
schema[k] = v;
|
|
4228
4241
|
}
|
|
4229
4242
|
}
|
|
@@ -4233,15 +4246,19 @@ function convertPropertiesToSchema(properties) {
|
|
|
4233
4246
|
}
|
|
4234
4247
|
function convertMCPToolToGoogle(mcpTool, _client, _options) {
|
|
4235
4248
|
const properties = mcpTool.inputSchema?.properties || {};
|
|
4249
|
+
const convertedProperties = convertPropertiesToSchema(properties);
|
|
4250
|
+
const parameters = {
|
|
4251
|
+
type: Type.OBJECT,
|
|
4252
|
+
description: mcpTool.description || "",
|
|
4253
|
+
properties: convertedProperties
|
|
4254
|
+
};
|
|
4255
|
+
if (mcpTool.inputSchema?.required && mcpTool.inputSchema.required.length > 0) {
|
|
4256
|
+
parameters.required = mcpTool.inputSchema.required;
|
|
4257
|
+
}
|
|
4236
4258
|
return {
|
|
4237
4259
|
name: mcpTool.name,
|
|
4238
4260
|
description: mcpTool.description || `Execute ${mcpTool.name}`,
|
|
4239
|
-
parameters
|
|
4240
|
-
type: "object",
|
|
4241
|
-
description: mcpTool.description || "",
|
|
4242
|
-
properties: convertPropertiesToSchema(properties),
|
|
4243
|
-
required: mcpTool.inputSchema?.required || []
|
|
4244
|
-
}
|
|
4261
|
+
parameters
|
|
4245
4262
|
};
|
|
4246
4263
|
}
|
|
4247
4264
|
function convertMCPToolsToGoogle(client, options) {
|
|
@@ -4249,10 +4266,11 @@ function convertMCPToolsToGoogle(client, options) {
|
|
|
4249
4266
|
return mcpTools.map((mcpTool) => convertMCPToolToGoogle(mcpTool, client, options));
|
|
4250
4267
|
}
|
|
4251
4268
|
async function executeGoogleFunctionCall(client, functionCall, options) {
|
|
4252
|
-
if (!functionCall
|
|
4269
|
+
if (!functionCall?.name) {
|
|
4253
4270
|
throw new Error("Function call must have a name");
|
|
4254
4271
|
}
|
|
4255
|
-
const
|
|
4272
|
+
const args = functionCall.args || {};
|
|
4273
|
+
const result = await executeToolWithToken(client, functionCall.name, args, options);
|
|
4256
4274
|
return JSON.stringify(result);
|
|
4257
4275
|
}
|
|
4258
4276
|
async function executeGoogleFunctionCalls(client, functionCalls, options) {
|
package/dist/ai/index.js
CHANGED
|
@@ -4317,6 +4317,18 @@ async function getCloudflareTools(client, options) {
|
|
|
4317
4317
|
}
|
|
4318
4318
|
|
|
4319
4319
|
// google.ts
|
|
4320
|
+
import { Type } from "@google/genai";
|
|
4321
|
+
function convertJsonSchemaTypeToGoogleType(type) {
|
|
4322
|
+
const typeMap = {
|
|
4323
|
+
string: Type.STRING,
|
|
4324
|
+
number: Type.NUMBER,
|
|
4325
|
+
integer: Type.INTEGER,
|
|
4326
|
+
boolean: Type.BOOLEAN,
|
|
4327
|
+
array: Type.ARRAY,
|
|
4328
|
+
object: Type.OBJECT
|
|
4329
|
+
};
|
|
4330
|
+
return typeMap[type.toLowerCase()] || Type.STRING;
|
|
4331
|
+
}
|
|
4320
4332
|
function convertPropertiesToSchema(properties) {
|
|
4321
4333
|
const result = {};
|
|
4322
4334
|
for (const [key, value] of Object.entries(properties)) {
|
|
@@ -4325,11 +4337,12 @@ function convertPropertiesToSchema(properties) {
|
|
|
4325
4337
|
continue;
|
|
4326
4338
|
}
|
|
4327
4339
|
const schema = {
|
|
4328
|
-
type: value.type,
|
|
4329
4340
|
description: value.description,
|
|
4330
|
-
enum: value.enum
|
|
4331
|
-
required: value.required
|
|
4341
|
+
enum: value.enum
|
|
4332
4342
|
};
|
|
4343
|
+
if (value.type) {
|
|
4344
|
+
schema.type = convertJsonSchemaTypeToGoogleType(value.type);
|
|
4345
|
+
}
|
|
4333
4346
|
if (value.items) {
|
|
4334
4347
|
schema.items = convertPropertiesToSchema({ items: value.items }).items;
|
|
4335
4348
|
}
|
|
@@ -4337,7 +4350,7 @@ function convertPropertiesToSchema(properties) {
|
|
|
4337
4350
|
schema.properties = convertPropertiesToSchema(value.properties);
|
|
4338
4351
|
}
|
|
4339
4352
|
for (const [k, v] of Object.entries(value)) {
|
|
4340
|
-
if (!["type", "description", "enum", "
|
|
4353
|
+
if (!["type", "description", "enum", "items", "properties"].includes(k)) {
|
|
4341
4354
|
schema[k] = v;
|
|
4342
4355
|
}
|
|
4343
4356
|
}
|
|
@@ -4347,15 +4360,19 @@ function convertPropertiesToSchema(properties) {
|
|
|
4347
4360
|
}
|
|
4348
4361
|
function convertMCPToolToGoogle(mcpTool, _client, _options) {
|
|
4349
4362
|
const properties = mcpTool.inputSchema?.properties || {};
|
|
4363
|
+
const convertedProperties = convertPropertiesToSchema(properties);
|
|
4364
|
+
const parameters = {
|
|
4365
|
+
type: Type.OBJECT,
|
|
4366
|
+
description: mcpTool.description || "",
|
|
4367
|
+
properties: convertedProperties
|
|
4368
|
+
};
|
|
4369
|
+
if (mcpTool.inputSchema?.required && mcpTool.inputSchema.required.length > 0) {
|
|
4370
|
+
parameters.required = mcpTool.inputSchema.required;
|
|
4371
|
+
}
|
|
4350
4372
|
return {
|
|
4351
4373
|
name: mcpTool.name,
|
|
4352
4374
|
description: mcpTool.description || `Execute ${mcpTool.name}`,
|
|
4353
|
-
parameters
|
|
4354
|
-
type: "object",
|
|
4355
|
-
description: mcpTool.description || "",
|
|
4356
|
-
properties: convertPropertiesToSchema(properties),
|
|
4357
|
-
required: mcpTool.inputSchema?.required || []
|
|
4358
|
-
}
|
|
4375
|
+
parameters
|
|
4359
4376
|
};
|
|
4360
4377
|
}
|
|
4361
4378
|
function convertMCPToolsToGoogle(client, options) {
|
|
@@ -4363,10 +4380,11 @@ function convertMCPToolsToGoogle(client, options) {
|
|
|
4363
4380
|
return mcpTools.map((mcpTool) => convertMCPToolToGoogle(mcpTool, client, options));
|
|
4364
4381
|
}
|
|
4365
4382
|
async function executeGoogleFunctionCall(client, functionCall, options) {
|
|
4366
|
-
if (!functionCall
|
|
4383
|
+
if (!functionCall?.name) {
|
|
4367
4384
|
throw new Error("Function call must have a name");
|
|
4368
4385
|
}
|
|
4369
|
-
const
|
|
4386
|
+
const args = functionCall.args || {};
|
|
4387
|
+
const result = await executeToolWithToken(client, functionCall.name, args, options);
|
|
4370
4388
|
return JSON.stringify(result);
|
|
4371
4389
|
}
|
|
4372
4390
|
async function executeGoogleFunctionCalls(client, functionCalls, options) {
|
package/dist/server.js
CHANGED
|
@@ -6675,6 +6675,18 @@ async function handleAnthropicMessage(client, message, options) {
|
|
|
6675
6675
|
];
|
|
6676
6676
|
}
|
|
6677
6677
|
// src/ai/google.ts
|
|
6678
|
+
import { Type } from "@google/genai";
|
|
6679
|
+
function convertJsonSchemaTypeToGoogleType(type) {
|
|
6680
|
+
const typeMap = {
|
|
6681
|
+
string: Type.STRING,
|
|
6682
|
+
number: Type.NUMBER,
|
|
6683
|
+
integer: Type.INTEGER,
|
|
6684
|
+
boolean: Type.BOOLEAN,
|
|
6685
|
+
array: Type.ARRAY,
|
|
6686
|
+
object: Type.OBJECT
|
|
6687
|
+
};
|
|
6688
|
+
return typeMap[type.toLowerCase()] || Type.STRING;
|
|
6689
|
+
}
|
|
6678
6690
|
function convertPropertiesToSchema(properties) {
|
|
6679
6691
|
const result = {};
|
|
6680
6692
|
for (const [key, value] of Object.entries(properties)) {
|
|
@@ -6683,11 +6695,12 @@ function convertPropertiesToSchema(properties) {
|
|
|
6683
6695
|
continue;
|
|
6684
6696
|
}
|
|
6685
6697
|
const schema = {
|
|
6686
|
-
type: value.type,
|
|
6687
6698
|
description: value.description,
|
|
6688
|
-
enum: value.enum
|
|
6689
|
-
required: value.required
|
|
6699
|
+
enum: value.enum
|
|
6690
6700
|
};
|
|
6701
|
+
if (value.type) {
|
|
6702
|
+
schema.type = convertJsonSchemaTypeToGoogleType(value.type);
|
|
6703
|
+
}
|
|
6691
6704
|
if (value.items) {
|
|
6692
6705
|
schema.items = convertPropertiesToSchema({ items: value.items }).items;
|
|
6693
6706
|
}
|
|
@@ -6695,7 +6708,7 @@ function convertPropertiesToSchema(properties) {
|
|
|
6695
6708
|
schema.properties = convertPropertiesToSchema(value.properties);
|
|
6696
6709
|
}
|
|
6697
6710
|
for (const [k, v] of Object.entries(value)) {
|
|
6698
|
-
if (!["type", "description", "enum", "
|
|
6711
|
+
if (!["type", "description", "enum", "items", "properties"].includes(k)) {
|
|
6699
6712
|
schema[k] = v;
|
|
6700
6713
|
}
|
|
6701
6714
|
}
|
|
@@ -6705,15 +6718,19 @@ function convertPropertiesToSchema(properties) {
|
|
|
6705
6718
|
}
|
|
6706
6719
|
function convertMCPToolToGoogle(mcpTool, _client, _options) {
|
|
6707
6720
|
const properties = mcpTool.inputSchema?.properties || {};
|
|
6721
|
+
const convertedProperties = convertPropertiesToSchema(properties);
|
|
6722
|
+
const parameters = {
|
|
6723
|
+
type: Type.OBJECT,
|
|
6724
|
+
description: mcpTool.description || "",
|
|
6725
|
+
properties: convertedProperties
|
|
6726
|
+
};
|
|
6727
|
+
if (mcpTool.inputSchema?.required && mcpTool.inputSchema.required.length > 0) {
|
|
6728
|
+
parameters.required = mcpTool.inputSchema.required;
|
|
6729
|
+
}
|
|
6708
6730
|
return {
|
|
6709
6731
|
name: mcpTool.name,
|
|
6710
6732
|
description: mcpTool.description || `Execute ${mcpTool.name}`,
|
|
6711
|
-
parameters
|
|
6712
|
-
type: "object",
|
|
6713
|
-
description: mcpTool.description || "",
|
|
6714
|
-
properties: convertPropertiesToSchema(properties),
|
|
6715
|
-
required: mcpTool.inputSchema?.required || []
|
|
6716
|
-
}
|
|
6733
|
+
parameters
|
|
6717
6734
|
};
|
|
6718
6735
|
}
|
|
6719
6736
|
function convertMCPToolsToGoogle(client, options) {
|
|
@@ -6721,10 +6738,11 @@ function convertMCPToolsToGoogle(client, options) {
|
|
|
6721
6738
|
return mcpTools.map((mcpTool) => convertMCPToolToGoogle(mcpTool, client, options));
|
|
6722
6739
|
}
|
|
6723
6740
|
async function executeGoogleFunctionCall(client, functionCall, options) {
|
|
6724
|
-
if (!functionCall
|
|
6741
|
+
if (!functionCall?.name) {
|
|
6725
6742
|
throw new Error("Function call must have a name");
|
|
6726
6743
|
}
|
|
6727
|
-
const
|
|
6744
|
+
const args = functionCall.args || {};
|
|
6745
|
+
const result = await executeToolWithToken(client, functionCall.name, args, options);
|
|
6728
6746
|
return JSON.stringify(result);
|
|
6729
6747
|
}
|
|
6730
6748
|
async function executeGoogleFunctionCalls(client, functionCalls, options) {
|
package/dist/src/ai/google.d.ts
CHANGED
|
@@ -6,40 +6,11 @@
|
|
|
6
6
|
import type { MCPClient } from "../client.js";
|
|
7
7
|
import type { MCPTool } from "../protocol/messages.js";
|
|
8
8
|
import { type AIToolsOptions } from "./utils.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
export
|
|
13
|
-
|
|
14
|
-
description?: string;
|
|
15
|
-
enum?: string[];
|
|
16
|
-
items?: Schema;
|
|
17
|
-
properties?: Record<string, Schema>;
|
|
18
|
-
required?: string[];
|
|
19
|
-
[key: string]: unknown;
|
|
20
|
-
}
|
|
21
|
-
/**
|
|
22
|
-
* Google GenAI function declaration
|
|
23
|
-
* Compatible with @google/genai SDK FunctionDeclaration type
|
|
24
|
-
*/
|
|
25
|
-
export interface GoogleTool {
|
|
26
|
-
name: string;
|
|
27
|
-
description: string;
|
|
28
|
-
parameters: {
|
|
29
|
-
type: 'object';
|
|
30
|
-
description?: string;
|
|
31
|
-
properties?: Record<string, Schema>;
|
|
32
|
-
required?: string[];
|
|
33
|
-
[key: string]: unknown;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
/**
|
|
37
|
-
* Google GenAI function call
|
|
38
|
-
*/
|
|
39
|
-
export interface GoogleFunctionCall {
|
|
40
|
-
name?: string;
|
|
41
|
-
args?: Record<string, unknown>;
|
|
42
|
-
}
|
|
9
|
+
import { Type } from "@google/genai";
|
|
10
|
+
import type { Schema, FunctionDeclaration, FunctionCall } from "@google/genai";
|
|
11
|
+
export type GoogleTool = FunctionDeclaration;
|
|
12
|
+
export type GoogleFunctionCall = FunctionCall;
|
|
13
|
+
export type { Schema, Type };
|
|
43
14
|
/**
|
|
44
15
|
* Options for converting MCP tools to Google GenAI format
|
|
45
16
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/ai/google.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"google.d.ts","sourceRoot":"","sources":["../../../src/ai/google.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAkE,KAAK,cAAc,EAAE,MAAM,YAAY,CAAC;AAIjH,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,KAAK,EACV,MAAM,EACN,mBAAmB,EACnB,YAAY,EACb,MAAM,eAAe,CAAC;AAGvB,MAAM,MAAM,UAAU,GAAG,mBAAmB,CAAC;AAC7C,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC;AAC9C,YAAY,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;AAE7B;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,cAAc;CAAI;AA4D9D;;;;;;;;;;;;GAYG;AACH,wBAAgB,sBAAsB,CACpC,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,SAAS,CAAC,GAAG,CAAC,EACvB,QAAQ,CAAC,EAAE,kBAAkB,GAC5B,UAAU,CAoBZ;AAED;;;;;;;;;;;;;;;;;GAiBG;AACH,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,UAAU,EAAE,CAGd;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,yBAAyB,CAC7C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,YAAY,EAAE,kBAAkB,EAChC,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,CAAC,CAejB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAsB,0BAA0B,CAC9C,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,aAAa,EAAE,kBAAkB,EAAE,GAAG,SAAS,GAAG,IAAI,EACtD,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,MAAM,EAAE,CAAC,CAUnB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyEG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,SAAS,CAAC,GAAG,CAAC,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,UAAU,EAAE,CAAC,CAevB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "integrate-sdk",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.42",
|
|
4
4
|
"description": "Type-safe 3rd party integration SDK for the Integrate MCP server",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -44,9 +44,9 @@
|
|
|
44
44
|
"prep": "bun run type-check && bun run build",
|
|
45
45
|
"build": "bun run build:client && bun run build:server && bun run build:adapters && bun run build:ai && bun run build:types && bun run build:copy-types",
|
|
46
46
|
"build:client": "bun build index.ts react.ts --outdir dist --target browser --format esm --external react",
|
|
47
|
-
"build:server": "bun build server.ts oauth.ts --outdir dist --target node --format esm",
|
|
47
|
+
"build:server": "bun build server.ts oauth.ts --outdir dist --target node --format esm --external @google/genai --external @anthropic-ai/sdk --external openai --external ai --external @langchain/core --external llamaindex --external @mastra/core --external @cloudflare/workers-types --external @openai/agents",
|
|
48
48
|
"build:adapters": "cd src/adapters && bun build *.ts --outdir ../../dist/adapters --target node --format esm && cd ../..",
|
|
49
|
-
"build:ai": "cd src/ai && bun build *.ts --outdir ../../dist/ai --target node --format esm && cd ../..",
|
|
49
|
+
"build:ai": "cd src/ai && bun build *.ts --outdir ../../dist/ai --target node --format esm --external @google/genai --external @anthropic-ai/sdk --external openai --external ai --external @langchain/core --external llamaindex --external @mastra/core --external @cloudflare/workers-types --external @openai/agents && cd ../..",
|
|
50
50
|
"build:types": "tsc --emitDeclarationOnly --declaration --declarationMap",
|
|
51
51
|
"build:copy-types": "cp dist/src/ai/*.d.ts dist/ai/ && cp dist/src/ai/*.d.ts.map dist/ai/ && cp dist/src/adapters/*.d.ts dist/adapters/ && cp dist/src/adapters/*.d.ts.map dist/adapters/",
|
|
52
52
|
"dev": "bun --watch src/index.ts",
|
|
@@ -72,6 +72,7 @@
|
|
|
72
72
|
},
|
|
73
73
|
"devDependencies": {
|
|
74
74
|
"@anthropic-ai/sdk": "^0.32.1",
|
|
75
|
+
"@google/genai": "^1.29.0",
|
|
75
76
|
"@types/bun": "latest",
|
|
76
77
|
"@types/react": "^18.3.0",
|
|
77
78
|
"openai": "^4.77.3",
|
|
@@ -86,7 +87,7 @@
|
|
|
86
87
|
"openai": ">=4.0.0",
|
|
87
88
|
"@openai/agents": ">=0.1.0",
|
|
88
89
|
"@anthropic-ai/sdk": ">=0.20.0",
|
|
89
|
-
"@google/genai": "
|
|
90
|
+
"@google/genai": "",
|
|
90
91
|
"@cloudflare/workers-types": ">=4.0.0",
|
|
91
92
|
"@langchain/core": ">=0.1.0",
|
|
92
93
|
"llamaindex": ">=0.1.0",
|