@composio/openai-agents 0.1.26 → 0.1.28

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/index.cjs CHANGED
@@ -54,34 +54,18 @@ var OpenAIAgentsProvider = class extends import_core.BaseAgenticProvider {
54
54
  this.strict = options?.strict ?? false;
55
55
  }
56
56
  /**
57
- * Transform MCP URL response into OpenAI Agents-specific format.
58
- * OpenAI Agents uses the standard format by default.
57
+ * Transform MCP URL response into Anthropic-specific format.
58
+ * By default, Anthropic uses the standard format (same as default),
59
+ * but this method is here to show providers can customize if needed.
59
60
  *
60
61
  * @param data - The MCP URL response data
61
- * @param serverName - Name of the MCP server
62
- * @param connectedAccountIds - Optional array of connected account IDs
63
- * @param userIds - Optional array of user IDs
64
- * @param toolkits - Optional array of toolkit names
65
62
  * @returns Standard MCP server response format
66
63
  */
67
- wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
68
- if (connectedAccountIds?.length && data.connected_account_urls) {
69
- return data.connected_account_urls.map((url, index) => ({
70
- url: new URL(url),
71
- name: `${serverName}-${connectedAccountIds[index]}`,
72
- toolkit: toolkits?.[index]
73
- }));
74
- } else if (userIds?.length && data.user_ids_url) {
75
- return data.user_ids_url.map((url, index) => ({
76
- url: new URL(url),
77
- name: `${serverName}-${userIds[index]}`,
78
- toolkit: toolkits?.[index]
79
- }));
80
- }
81
- return {
82
- url: new URL(data.mcp_url),
83
- name: serverName
84
- };
64
+ wrapMcpServerResponse(data) {
65
+ return data.map((item) => ({
66
+ url: new URL(item.url),
67
+ name: item.name
68
+ }));
85
69
  }
86
70
  /**
87
71
  * Wraps a Composio tool in a OpenAI Agents tool format.
package/dist/index.d.cts CHANGED
@@ -43,17 +43,14 @@ declare class OpenAIAgentsProvider extends BaseAgenticProvider<OpenAIAgentsToolC
43
43
  strict?: boolean;
44
44
  });
45
45
  /**
46
- * Transform MCP URL response into OpenAI Agents-specific format.
47
- * OpenAI Agents uses the standard format by default.
46
+ * Transform MCP URL response into Anthropic-specific format.
47
+ * By default, Anthropic uses the standard format (same as default),
48
+ * but this method is here to show providers can customize if needed.
48
49
  *
49
50
  * @param data - The MCP URL response data
50
- * @param serverName - Name of the MCP server
51
- * @param connectedAccountIds - Optional array of connected account IDs
52
- * @param userIds - Optional array of user IDs
53
- * @param toolkits - Optional array of toolkit names
54
51
  * @returns Standard MCP server response format
55
52
  */
56
- wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
53
+ wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
57
54
  /**
58
55
  * Wraps a Composio tool in a OpenAI Agents tool format.
59
56
  *
package/dist/index.d.ts CHANGED
@@ -43,17 +43,14 @@ declare class OpenAIAgentsProvider extends BaseAgenticProvider<OpenAIAgentsToolC
43
43
  strict?: boolean;
44
44
  });
45
45
  /**
46
- * Transform MCP URL response into OpenAI Agents-specific format.
47
- * OpenAI Agents uses the standard format by default.
46
+ * Transform MCP URL response into Anthropic-specific format.
47
+ * By default, Anthropic uses the standard format (same as default),
48
+ * but this method is here to show providers can customize if needed.
48
49
  *
49
50
  * @param data - The MCP URL response data
50
- * @param serverName - Name of the MCP server
51
- * @param connectedAccountIds - Optional array of connected account IDs
52
- * @param userIds - Optional array of user IDs
53
- * @param toolkits - Optional array of toolkit names
54
51
  * @returns Standard MCP server response format
55
52
  */
56
- wrapMcpServerResponse(data: McpUrlResponse, serverName: string, connectedAccountIds?: string[], userIds?: string[], toolkits?: string[]): McpServerGetResponse;
53
+ wrapMcpServerResponse(data: McpUrlResponse): McpServerGetResponse;
57
54
  /**
58
55
  * Wraps a Composio tool in a OpenAI Agents tool format.
59
56
  *
package/dist/index.js CHANGED
@@ -33,34 +33,18 @@ var OpenAIAgentsProvider = class extends BaseAgenticProvider {
33
33
  this.strict = options?.strict ?? false;
34
34
  }
35
35
  /**
36
- * Transform MCP URL response into OpenAI Agents-specific format.
37
- * OpenAI Agents uses the standard format by default.
36
+ * Transform MCP URL response into Anthropic-specific format.
37
+ * By default, Anthropic uses the standard format (same as default),
38
+ * but this method is here to show providers can customize if needed.
38
39
  *
39
40
  * @param data - The MCP URL response data
40
- * @param serverName - Name of the MCP server
41
- * @param connectedAccountIds - Optional array of connected account IDs
42
- * @param userIds - Optional array of user IDs
43
- * @param toolkits - Optional array of toolkit names
44
41
  * @returns Standard MCP server response format
45
42
  */
46
- wrapMcpServerResponse(data, serverName, connectedAccountIds, userIds, toolkits) {
47
- if (connectedAccountIds?.length && data.connected_account_urls) {
48
- return data.connected_account_urls.map((url, index) => ({
49
- url: new URL(url),
50
- name: `${serverName}-${connectedAccountIds[index]}`,
51
- toolkit: toolkits?.[index]
52
- }));
53
- } else if (userIds?.length && data.user_ids_url) {
54
- return data.user_ids_url.map((url, index) => ({
55
- url: new URL(url),
56
- name: `${serverName}-${userIds[index]}`,
57
- toolkit: toolkits?.[index]
58
- }));
59
- }
60
- return {
61
- url: new URL(data.mcp_url),
62
- name: serverName
63
- };
43
+ wrapMcpServerResponse(data) {
44
+ return data.map((item) => ({
45
+ url: new URL(item.url),
46
+ name: item.name
47
+ }));
64
48
  }
65
49
  /**
66
50
  * Wraps a Composio tool in a OpenAI Agents tool format.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@composio/openai-agents",
3
- "version": "0.1.26",
3
+ "version": "0.1.28",
4
4
  "description": "",
5
5
  "main": "dist/index.js",
6
6
  "type": "module",
@@ -22,14 +22,14 @@
22
22
  "author": "",
23
23
  "license": "ISC",
24
24
  "peerDependencies": {
25
- "@composio/core": "0.1.26",
25
+ "@composio/core": "0.1.28",
26
26
  "@openai/agents": "^0.0.7"
27
27
  },
28
28
  "devDependencies": {
29
29
  "tsup": "^8.4.0",
30
30
  "typescript": "^5.8.3",
31
31
  "vitest": "^3.1.4",
32
- "@composio/core": "0.1.26"
32
+ "@composio/core": "0.1.28"
33
33
  },
34
34
  "gitHead": "4fae6e54d5c150fba955cc5fa314281da5a1e064",
35
35
  "scripts": {