@composio/client 0.1.0-alpha.53 → 0.1.0-alpha.54
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/CHANGELOG.md +14 -0
- package/client.d.mts +2 -2
- package/client.d.mts.map +1 -1
- package/client.d.ts +2 -2
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs +1 -1
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/auth-configs.d.mts +4 -1
- package/resources/auth-configs.d.mts.map +1 -1
- package/resources/auth-configs.d.ts +4 -1
- package/resources/auth-configs.d.ts.map +1 -1
- package/resources/auth-configs.js +4 -1
- package/resources/auth-configs.js.map +1 -1
- package/resources/auth-configs.mjs +4 -1
- package/resources/auth-configs.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/tool-router/index.d.mts +1 -1
- package/resources/tool-router/index.d.mts.map +1 -1
- package/resources/tool-router/index.d.ts +1 -1
- package/resources/tool-router/index.d.ts.map +1 -1
- package/resources/tool-router/index.js.map +1 -1
- package/resources/tool-router/index.mjs +1 -1
- package/resources/tool-router/index.mjs.map +1 -1
- package/resources/tool-router/session.d.mts +79 -11
- package/resources/tool-router/session.d.mts.map +1 -1
- package/resources/tool-router/session.d.ts +79 -11
- package/resources/tool-router/session.d.ts.map +1 -1
- package/resources/tool-router/tool-router.d.mts +0 -81
- package/resources/tool-router/tool-router.d.mts.map +1 -1
- package/resources/tool-router/tool-router.d.ts +0 -81
- package/resources/tool-router/tool-router.d.ts.map +1 -1
- package/resources/tool-router/tool-router.js +0 -29
- package/resources/tool-router/tool-router.js.map +1 -1
- package/resources/tool-router/tool-router.mjs +0 -29
- package/resources/tool-router/tool-router.mjs.map +1 -1
- package/src/client.ts +2 -10
- package/src/resources/auth-configs.ts +4 -1
- package/src/resources/index.ts +1 -5
- package/src/resources/tool-router/index.ts +1 -5
- package/src/resources/tool-router/session.ts +95 -28
- package/src/resources/tool-router/tool-router.ts +0 -100
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -1,91 +1,10 @@
|
|
|
1
1
|
import { APIResource } from "../../core/resource.js";
|
|
2
2
|
import * as SessionAPI from "./session.js";
|
|
3
3
|
import { Session, SessionCreateParams, SessionCreateResponse, SessionExecuteMetaParams, SessionExecuteMetaResponse, SessionExecuteParams, SessionExecuteResponse, SessionLinkParams, SessionLinkResponse, SessionRetrieveResponse, SessionToolkitsParams, SessionToolkitsResponse, SessionToolsParams, SessionToolsResponse } from "./session.js";
|
|
4
|
-
import { APIPromise } from "../../core/api-promise.js";
|
|
5
|
-
import { RequestOptions } from "../../internal/request-options.js";
|
|
6
4
|
export declare class ToolRouter extends APIResource {
|
|
7
5
|
session: SessionAPI.Session;
|
|
8
|
-
/**
|
|
9
|
-
* Creates a new session for the tool router lab feature (Legacy). This endpoint
|
|
10
|
-
* initializes a new session with specified toolkits and their authentication
|
|
11
|
-
* configurations. The session provides an isolated environment for testing and
|
|
12
|
-
* managing tool routing logic with scoped MCP server access.
|
|
13
|
-
*
|
|
14
|
-
* @example
|
|
15
|
-
* ```ts
|
|
16
|
-
* const response = await client.toolRouter.createSession({
|
|
17
|
-
* user_id: 'user_123456789',
|
|
18
|
-
* config: {
|
|
19
|
-
* toolkits: [
|
|
20
|
-
* {
|
|
21
|
-
* toolkit: 'gmail',
|
|
22
|
-
* auth_config_id: 'auth_config_123',
|
|
23
|
-
* },
|
|
24
|
-
* {
|
|
25
|
-
* toolkit: 'slack',
|
|
26
|
-
* auth_config_id: 'auth_config_456',
|
|
27
|
-
* },
|
|
28
|
-
* { toolkit: 'github' },
|
|
29
|
-
* ],
|
|
30
|
-
* },
|
|
31
|
-
* });
|
|
32
|
-
* ```
|
|
33
|
-
*/
|
|
34
|
-
createSession(body: ToolRouterCreateSessionParams, options?: RequestOptions): APIPromise<ToolRouterCreateSessionResponse>;
|
|
35
|
-
}
|
|
36
|
-
export interface ToolRouterCreateSessionResponse {
|
|
37
|
-
/**
|
|
38
|
-
* MCP server endpoint URL for this specific chat session
|
|
39
|
-
*/
|
|
40
|
-
chat_session_mcp_url: string;
|
|
41
|
-
/**
|
|
42
|
-
* Generated session identifier
|
|
43
|
-
*/
|
|
44
|
-
session_id: string;
|
|
45
|
-
/**
|
|
46
|
-
* MCP server endpoint URL for this specific tool router instance
|
|
47
|
-
*/
|
|
48
|
-
tool_router_instance_mcp_url: string;
|
|
49
|
-
}
|
|
50
|
-
export interface ToolRouterCreateSessionParams {
|
|
51
|
-
/**
|
|
52
|
-
* Unique user identifier for the session owner
|
|
53
|
-
*/
|
|
54
|
-
user_id: string;
|
|
55
|
-
/**
|
|
56
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
57
|
-
*/
|
|
58
|
-
config?: ToolRouterCreateSessionParams.Config;
|
|
59
|
-
}
|
|
60
|
-
export declare namespace ToolRouterCreateSessionParams {
|
|
61
|
-
/**
|
|
62
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
63
|
-
*/
|
|
64
|
-
interface Config {
|
|
65
|
-
/**
|
|
66
|
-
* Whether to manually manage connections
|
|
67
|
-
*/
|
|
68
|
-
manually_manage_connections?: boolean | null;
|
|
69
|
-
/**
|
|
70
|
-
* Array of toolkit configurations with optional auth configs
|
|
71
|
-
*/
|
|
72
|
-
toolkits?: Array<Config.Toolkit>;
|
|
73
|
-
}
|
|
74
|
-
namespace Config {
|
|
75
|
-
interface Toolkit {
|
|
76
|
-
/**
|
|
77
|
-
* Toolkit identifier (e.g., gmail, slack, github)
|
|
78
|
-
*/
|
|
79
|
-
toolkit: string;
|
|
80
|
-
/**
|
|
81
|
-
* Specific auth configuration ID for this toolkit
|
|
82
|
-
*/
|
|
83
|
-
auth_config_id?: string;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
86
6
|
}
|
|
87
7
|
export declare namespace ToolRouter {
|
|
88
|
-
export { type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse, type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams, };
|
|
89
8
|
export { Session as Session, type SessionCreateResponse as SessionCreateResponse, type SessionRetrieveResponse as SessionRetrieveResponse, type SessionExecuteResponse as SessionExecuteResponse, type SessionExecuteMetaResponse as SessionExecuteMetaResponse, type SessionLinkResponse as SessionLinkResponse, type SessionToolkitsResponse as SessionToolkitsResponse, type SessionToolsResponse as SessionToolsResponse, type SessionCreateParams as SessionCreateParams, type SessionExecuteParams as SessionExecuteParams, type SessionExecuteMetaParams as SessionExecuteMetaParams, type SessionLinkParams as SessionLinkParams, type SessionToolkitsParams as SessionToolkitsParams, type SessionToolsParams as SessionToolsParams, };
|
|
90
9
|
}
|
|
91
10
|
//# sourceMappingURL=tool-router.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-router.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACrB;
|
|
1
|
+
{"version":3,"file":"tool-router.d.ts","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"OAEO,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,EACP,mBAAmB,EACnB,qBAAqB,EACrB,wBAAwB,EACxB,0BAA0B,EAC1B,oBAAoB,EACpB,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,uBAAuB,EACvB,qBAAqB,EACrB,uBAAuB,EACvB,kBAAkB,EAClB,oBAAoB,EACrB;AAED,qBAAa,UAAW,SAAQ,WAAW;IACzC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAwC;CACpE;AAID,MAAM,CAAC,OAAO,WAAW,UAAU,CAAC;IAClC,OAAO,EACL,OAAO,IAAI,OAAO,EAClB,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,mBAAmB,IAAI,mBAAmB,EAC/C,KAAK,oBAAoB,IAAI,oBAAoB,EACjD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,iBAAiB,IAAI,iBAAiB,EAC3C,KAAK,qBAAqB,IAAI,qBAAqB,EACnD,KAAK,kBAAkB,IAAI,kBAAkB,GAC9C,CAAC;CACH"}
|
|
@@ -11,35 +11,6 @@ class ToolRouter extends resource_1.APIResource {
|
|
|
11
11
|
super(...arguments);
|
|
12
12
|
this.session = new SessionAPI.Session(this._client);
|
|
13
13
|
}
|
|
14
|
-
/**
|
|
15
|
-
* Creates a new session for the tool router lab feature (Legacy). This endpoint
|
|
16
|
-
* initializes a new session with specified toolkits and their authentication
|
|
17
|
-
* configurations. The session provides an isolated environment for testing and
|
|
18
|
-
* managing tool routing logic with scoped MCP server access.
|
|
19
|
-
*
|
|
20
|
-
* @example
|
|
21
|
-
* ```ts
|
|
22
|
-
* const response = await client.toolRouter.createSession({
|
|
23
|
-
* user_id: 'user_123456789',
|
|
24
|
-
* config: {
|
|
25
|
-
* toolkits: [
|
|
26
|
-
* {
|
|
27
|
-
* toolkit: 'gmail',
|
|
28
|
-
* auth_config_id: 'auth_config_123',
|
|
29
|
-
* },
|
|
30
|
-
* {
|
|
31
|
-
* toolkit: 'slack',
|
|
32
|
-
* auth_config_id: 'auth_config_456',
|
|
33
|
-
* },
|
|
34
|
-
* { toolkit: 'github' },
|
|
35
|
-
* ],
|
|
36
|
-
* },
|
|
37
|
-
* });
|
|
38
|
-
* ```
|
|
39
|
-
*/
|
|
40
|
-
createSession(body, options) {
|
|
41
|
-
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
42
|
-
}
|
|
43
14
|
}
|
|
44
15
|
exports.ToolRouter = ToolRouter;
|
|
45
16
|
ToolRouter.Session = session_1.Session;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-router.js","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAemB;
|
|
1
|
+
{"version":3,"file":"tool-router.js","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;AAEtF,qDAAkD;AAClD,iEAAwC;AACxC,0CAemB;AAEnB,MAAa,UAAW,SAAQ,sBAAW;IAA3C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAFD,gCAEC;AAED,UAAU,CAAC,OAAO,GAAG,iBAAO,CAAC"}
|
|
@@ -7,35 +7,6 @@ export class ToolRouter extends APIResource {
|
|
|
7
7
|
super(...arguments);
|
|
8
8
|
this.session = new SessionAPI.Session(this._client);
|
|
9
9
|
}
|
|
10
|
-
/**
|
|
11
|
-
* Creates a new session for the tool router lab feature (Legacy). This endpoint
|
|
12
|
-
* initializes a new session with specified toolkits and their authentication
|
|
13
|
-
* configurations. The session provides an isolated environment for testing and
|
|
14
|
-
* managing tool routing logic with scoped MCP server access.
|
|
15
|
-
*
|
|
16
|
-
* @example
|
|
17
|
-
* ```ts
|
|
18
|
-
* const response = await client.toolRouter.createSession({
|
|
19
|
-
* user_id: 'user_123456789',
|
|
20
|
-
* config: {
|
|
21
|
-
* toolkits: [
|
|
22
|
-
* {
|
|
23
|
-
* toolkit: 'gmail',
|
|
24
|
-
* auth_config_id: 'auth_config_123',
|
|
25
|
-
* },
|
|
26
|
-
* {
|
|
27
|
-
* toolkit: 'slack',
|
|
28
|
-
* auth_config_id: 'auth_config_456',
|
|
29
|
-
* },
|
|
30
|
-
* { toolkit: 'github' },
|
|
31
|
-
* ],
|
|
32
|
-
* },
|
|
33
|
-
* });
|
|
34
|
-
* ```
|
|
35
|
-
*/
|
|
36
|
-
createSession(body, options) {
|
|
37
|
-
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
38
|
-
}
|
|
39
10
|
}
|
|
40
11
|
ToolRouter.Session = Session;
|
|
41
12
|
//# sourceMappingURL=tool-router.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tool-router.mjs","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,GAcR;
|
|
1
|
+
{"version":3,"file":"tool-router.mjs","sourceRoot":"","sources":["../../src/resources/tool-router/tool-router.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OACf,KAAK,UAAU;OACf,EACL,OAAO,GAcR;AAED,MAAM,OAAO,UAAW,SAAQ,WAAW;IAA3C;;QACE,YAAO,GAAuB,IAAI,UAAU,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACrE,CAAC;CAAA;AAED,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC"}
|
package/src/client.ts
CHANGED
|
@@ -113,11 +113,7 @@ import {
|
|
|
113
113
|
McpUpdateResponse,
|
|
114
114
|
} from './resources/mcp/mcp';
|
|
115
115
|
import { Project } from './resources/project/project';
|
|
116
|
-
import {
|
|
117
|
-
ToolRouter,
|
|
118
|
-
ToolRouterCreateSessionParams,
|
|
119
|
-
ToolRouterCreateSessionResponse,
|
|
120
|
-
} from './resources/tool-router/tool-router';
|
|
116
|
+
import { ToolRouter } from './resources/tool-router/tool-router';
|
|
121
117
|
import {
|
|
122
118
|
TriggerInstanceListActiveParams,
|
|
123
119
|
TriggerInstanceListActiveResponse,
|
|
@@ -961,9 +957,5 @@ export declare namespace Composio {
|
|
|
961
957
|
|
|
962
958
|
export { Project as Project };
|
|
963
959
|
|
|
964
|
-
export {
|
|
965
|
-
ToolRouter as ToolRouter,
|
|
966
|
-
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
|
967
|
-
type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams,
|
|
968
|
-
};
|
|
960
|
+
export { ToolRouter as ToolRouter };
|
|
969
961
|
}
|
package/src/resources/index.ts
CHANGED
|
@@ -59,11 +59,7 @@ export {
|
|
|
59
59
|
type MigrationRetrieveNanoidParams,
|
|
60
60
|
} from './migration';
|
|
61
61
|
export { Project } from './project/project';
|
|
62
|
-
export {
|
|
63
|
-
ToolRouter,
|
|
64
|
-
type ToolRouterCreateSessionResponse,
|
|
65
|
-
type ToolRouterCreateSessionParams,
|
|
66
|
-
} from './tool-router/tool-router';
|
|
62
|
+
export { ToolRouter } from './tool-router/tool-router';
|
|
67
63
|
export {
|
|
68
64
|
Toolkits,
|
|
69
65
|
type ToolkitRetrieveResponse,
|
|
@@ -16,8 +16,4 @@ export {
|
|
|
16
16
|
type SessionToolkitsParams,
|
|
17
17
|
type SessionToolsParams,
|
|
18
18
|
} from './session';
|
|
19
|
-
export {
|
|
20
|
-
ToolRouter,
|
|
21
|
-
type ToolRouterCreateSessionResponse,
|
|
22
|
-
type ToolRouterCreateSessionParams,
|
|
23
|
-
} from './tool-router';
|
|
19
|
+
export { ToolRouter } from './tool-router';
|
|
@@ -162,16 +162,7 @@ export interface SessionCreateResponse {
|
|
|
162
162
|
/**
|
|
163
163
|
* List of available tools in this session
|
|
164
164
|
*/
|
|
165
|
-
tool_router_tools: Array<
|
|
166
|
-
| 'COMPOSIO_SEARCH_TOOLS'
|
|
167
|
-
| 'COMPOSIO_MULTI_EXECUTE_TOOL'
|
|
168
|
-
| 'COMPOSIO_MANAGE_CONNECTIONS'
|
|
169
|
-
| 'COMPOSIO_REMOTE_WORKBENCH'
|
|
170
|
-
| 'COMPOSIO_REMOTE_BASH_TOOL'
|
|
171
|
-
| 'COMPOSIO_GET_TOOL_SCHEMAS'
|
|
172
|
-
| 'COMPOSIO_UPSERT_RECIPE'
|
|
173
|
-
| 'COMPOSIO_GET_RECIPE'
|
|
174
|
-
>;
|
|
165
|
+
tool_router_tools: Array<string>;
|
|
175
166
|
}
|
|
176
167
|
|
|
177
168
|
export namespace SessionCreateResponse {
|
|
@@ -232,6 +223,12 @@ export namespace SessionCreateResponse {
|
|
|
232
223
|
*/
|
|
233
224
|
callback_url?: string;
|
|
234
225
|
|
|
226
|
+
/**
|
|
227
|
+
* Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
|
|
228
|
+
* Default false. May not work reliably with GPT models.
|
|
229
|
+
*/
|
|
230
|
+
enable_wait_for_connections?: boolean;
|
|
231
|
+
|
|
235
232
|
/**
|
|
236
233
|
* Whether to enable the connection manager for automatic connection handling
|
|
237
234
|
*/
|
|
@@ -335,16 +332,7 @@ export interface SessionRetrieveResponse {
|
|
|
335
332
|
/**
|
|
336
333
|
* List of available tools in this session
|
|
337
334
|
*/
|
|
338
|
-
tool_router_tools: Array<
|
|
339
|
-
| 'COMPOSIO_SEARCH_TOOLS'
|
|
340
|
-
| 'COMPOSIO_MULTI_EXECUTE_TOOL'
|
|
341
|
-
| 'COMPOSIO_MANAGE_CONNECTIONS'
|
|
342
|
-
| 'COMPOSIO_REMOTE_WORKBENCH'
|
|
343
|
-
| 'COMPOSIO_REMOTE_BASH_TOOL'
|
|
344
|
-
| 'COMPOSIO_GET_TOOL_SCHEMAS'
|
|
345
|
-
| 'COMPOSIO_UPSERT_RECIPE'
|
|
346
|
-
| 'COMPOSIO_GET_RECIPE'
|
|
347
|
-
>;
|
|
335
|
+
tool_router_tools: Array<string>;
|
|
348
336
|
}
|
|
349
337
|
|
|
350
338
|
export namespace SessionRetrieveResponse {
|
|
@@ -405,6 +393,12 @@ export namespace SessionRetrieveResponse {
|
|
|
405
393
|
*/
|
|
406
394
|
callback_url?: string;
|
|
407
395
|
|
|
396
|
+
/**
|
|
397
|
+
* Enable the COMPOSIO_WAIT_FOR_CONNECTIONS tool for polling connection status.
|
|
398
|
+
* Default false. May not work reliably with GPT models.
|
|
399
|
+
*/
|
|
400
|
+
enable_wait_for_connections?: boolean;
|
|
401
|
+
|
|
408
402
|
/**
|
|
409
403
|
* Whether to enable the connection manager for automatic connection handling
|
|
410
404
|
*/
|
|
@@ -665,7 +659,7 @@ export namespace SessionToolkitsResponse {
|
|
|
665
659
|
|
|
666
660
|
export interface SessionToolsResponse {
|
|
667
661
|
/**
|
|
668
|
-
* List of
|
|
662
|
+
* List of tools with their complete schemas
|
|
669
663
|
*/
|
|
670
664
|
items: Array<SessionToolsResponse.Item>;
|
|
671
665
|
}
|
|
@@ -673,47 +667,112 @@ export interface SessionToolsResponse {
|
|
|
673
667
|
export namespace SessionToolsResponse {
|
|
674
668
|
export interface Item {
|
|
675
669
|
/**
|
|
676
|
-
*
|
|
670
|
+
* List of all available versions for this tool
|
|
671
|
+
*/
|
|
672
|
+
available_versions: Array<string>;
|
|
673
|
+
|
|
674
|
+
deprecated: Item.Deprecated;
|
|
675
|
+
|
|
676
|
+
/**
|
|
677
|
+
* Detailed explanation of the tool's functionality and purpose
|
|
677
678
|
*/
|
|
678
679
|
description: string;
|
|
679
680
|
|
|
680
681
|
/**
|
|
681
|
-
*
|
|
682
|
+
* Schema definition of required input parameters for the tool
|
|
682
683
|
*/
|
|
683
684
|
input_parameters: { [key: string]: unknown };
|
|
684
685
|
|
|
685
686
|
/**
|
|
686
|
-
*
|
|
687
|
+
* Indicates if this tool is deprecated and may be removed in the future
|
|
688
|
+
*/
|
|
689
|
+
is_deprecated: boolean;
|
|
690
|
+
|
|
691
|
+
/**
|
|
692
|
+
* Human-readable display name of the tool
|
|
687
693
|
*/
|
|
688
694
|
name: string;
|
|
689
695
|
|
|
690
696
|
/**
|
|
691
|
-
*
|
|
697
|
+
* Indicates if the tool can be used without authentication
|
|
698
|
+
*/
|
|
699
|
+
no_auth: boolean;
|
|
700
|
+
|
|
701
|
+
/**
|
|
702
|
+
* Schema definition of return values from the tool
|
|
692
703
|
*/
|
|
693
704
|
output_parameters: { [key: string]: unknown };
|
|
694
705
|
|
|
706
|
+
/**
|
|
707
|
+
* List of scopes associated with the tool
|
|
708
|
+
*/
|
|
709
|
+
scopes: Array<string>;
|
|
710
|
+
|
|
695
711
|
/**
|
|
696
712
|
* Unique identifier for the tool
|
|
697
713
|
*/
|
|
698
714
|
slug: string;
|
|
699
715
|
|
|
700
716
|
/**
|
|
701
|
-
*
|
|
717
|
+
* List of tags associated with the tool for categorization and filtering
|
|
702
718
|
*/
|
|
703
719
|
tags: Array<string>;
|
|
704
720
|
|
|
705
721
|
toolkit: Item.Toolkit;
|
|
722
|
+
|
|
723
|
+
/**
|
|
724
|
+
* Current version of the tool
|
|
725
|
+
*/
|
|
726
|
+
version: string;
|
|
706
727
|
}
|
|
707
728
|
|
|
708
729
|
export namespace Item {
|
|
730
|
+
export interface Deprecated {
|
|
731
|
+
/**
|
|
732
|
+
* List of all available versions for this tool
|
|
733
|
+
*/
|
|
734
|
+
available_versions: Array<string>;
|
|
735
|
+
|
|
736
|
+
/**
|
|
737
|
+
* The display name of the tool
|
|
738
|
+
*/
|
|
739
|
+
displayName: string;
|
|
740
|
+
|
|
741
|
+
/**
|
|
742
|
+
* Indicates if this tool is deprecated and may be removed in the future
|
|
743
|
+
*/
|
|
744
|
+
is_deprecated: boolean;
|
|
745
|
+
|
|
746
|
+
toolkit: Deprecated.Toolkit;
|
|
747
|
+
|
|
748
|
+
/**
|
|
749
|
+
* Current version identifier of the tool
|
|
750
|
+
*/
|
|
751
|
+
version: string;
|
|
752
|
+
}
|
|
753
|
+
|
|
754
|
+
export namespace Deprecated {
|
|
755
|
+
export interface Toolkit {
|
|
756
|
+
/**
|
|
757
|
+
* URL to the toolkit logo image
|
|
758
|
+
*/
|
|
759
|
+
logo: string;
|
|
760
|
+
}
|
|
761
|
+
}
|
|
762
|
+
|
|
709
763
|
export interface Toolkit {
|
|
710
764
|
/**
|
|
711
|
-
*
|
|
765
|
+
* URL to the toolkit logo image
|
|
766
|
+
*/
|
|
767
|
+
logo: string;
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* Human-readable name of the parent toolkit
|
|
712
771
|
*/
|
|
713
772
|
name: string;
|
|
714
773
|
|
|
715
774
|
/**
|
|
716
|
-
*
|
|
775
|
+
* Unique identifier of the parent toolkit
|
|
717
776
|
*/
|
|
718
777
|
slug: string;
|
|
719
778
|
}
|
|
@@ -793,6 +852,13 @@ export namespace SessionCreateParams {
|
|
|
793
852
|
* connections manually.
|
|
794
853
|
*/
|
|
795
854
|
enable?: boolean | null;
|
|
855
|
+
|
|
856
|
+
/**
|
|
857
|
+
* When true, the COMPOSIO_WAIT_FOR_CONNECTIONS tool is available for agents to
|
|
858
|
+
* poll connection status after sharing auth URLs. Default is false (disabled). May
|
|
859
|
+
* not work reliably with GPT models.
|
|
860
|
+
*/
|
|
861
|
+
enable_wait_for_connections?: boolean | null;
|
|
796
862
|
}
|
|
797
863
|
|
|
798
864
|
export interface UnionMember1 {
|
|
@@ -902,6 +968,7 @@ export interface SessionExecuteMetaParams {
|
|
|
902
968
|
| 'COMPOSIO_SEARCH_TOOLS'
|
|
903
969
|
| 'COMPOSIO_MULTI_EXECUTE_TOOL'
|
|
904
970
|
| 'COMPOSIO_MANAGE_CONNECTIONS'
|
|
971
|
+
| 'COMPOSIO_WAIT_FOR_CONNECTIONS'
|
|
905
972
|
| 'COMPOSIO_REMOTE_WORKBENCH'
|
|
906
973
|
| 'COMPOSIO_REMOTE_BASH_TOOL'
|
|
907
974
|
| 'COMPOSIO_GET_TOOL_SCHEMAS'
|
|
@@ -18,114 +18,14 @@ import {
|
|
|
18
18
|
SessionToolsParams,
|
|
19
19
|
SessionToolsResponse,
|
|
20
20
|
} from './session';
|
|
21
|
-
import { APIPromise } from '../../core/api-promise';
|
|
22
|
-
import { RequestOptions } from '../../internal/request-options';
|
|
23
21
|
|
|
24
22
|
export class ToolRouter extends APIResource {
|
|
25
23
|
session: SessionAPI.Session = new SessionAPI.Session(this._client);
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Creates a new session for the tool router lab feature (Legacy). This endpoint
|
|
29
|
-
* initializes a new session with specified toolkits and their authentication
|
|
30
|
-
* configurations. The session provides an isolated environment for testing and
|
|
31
|
-
* managing tool routing logic with scoped MCP server access.
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```ts
|
|
35
|
-
* const response = await client.toolRouter.createSession({
|
|
36
|
-
* user_id: 'user_123456789',
|
|
37
|
-
* config: {
|
|
38
|
-
* toolkits: [
|
|
39
|
-
* {
|
|
40
|
-
* toolkit: 'gmail',
|
|
41
|
-
* auth_config_id: 'auth_config_123',
|
|
42
|
-
* },
|
|
43
|
-
* {
|
|
44
|
-
* toolkit: 'slack',
|
|
45
|
-
* auth_config_id: 'auth_config_456',
|
|
46
|
-
* },
|
|
47
|
-
* { toolkit: 'github' },
|
|
48
|
-
* ],
|
|
49
|
-
* },
|
|
50
|
-
* });
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
createSession(
|
|
54
|
-
body: ToolRouterCreateSessionParams,
|
|
55
|
-
options?: RequestOptions,
|
|
56
|
-
): APIPromise<ToolRouterCreateSessionResponse> {
|
|
57
|
-
return this._client.post('/api/v3/labs/tool_router/session', { body, ...options });
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
export interface ToolRouterCreateSessionResponse {
|
|
62
|
-
/**
|
|
63
|
-
* MCP server endpoint URL for this specific chat session
|
|
64
|
-
*/
|
|
65
|
-
chat_session_mcp_url: string;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Generated session identifier
|
|
69
|
-
*/
|
|
70
|
-
session_id: string;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* MCP server endpoint URL for this specific tool router instance
|
|
74
|
-
*/
|
|
75
|
-
tool_router_instance_mcp_url: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export interface ToolRouterCreateSessionParams {
|
|
79
|
-
/**
|
|
80
|
-
* Unique user identifier for the session owner
|
|
81
|
-
*/
|
|
82
|
-
user_id: string;
|
|
83
|
-
|
|
84
|
-
/**
|
|
85
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
86
|
-
*/
|
|
87
|
-
config?: ToolRouterCreateSessionParams.Config;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
export namespace ToolRouterCreateSessionParams {
|
|
91
|
-
/**
|
|
92
|
-
* Session configuration including enabled toolkits and their auth configs
|
|
93
|
-
*/
|
|
94
|
-
export interface Config {
|
|
95
|
-
/**
|
|
96
|
-
* Whether to manually manage connections
|
|
97
|
-
*/
|
|
98
|
-
manually_manage_connections?: boolean | null;
|
|
99
|
-
|
|
100
|
-
/**
|
|
101
|
-
* Array of toolkit configurations with optional auth configs
|
|
102
|
-
*/
|
|
103
|
-
toolkits?: Array<Config.Toolkit>;
|
|
104
|
-
}
|
|
105
|
-
|
|
106
|
-
export namespace Config {
|
|
107
|
-
export interface Toolkit {
|
|
108
|
-
/**
|
|
109
|
-
* Toolkit identifier (e.g., gmail, slack, github)
|
|
110
|
-
*/
|
|
111
|
-
toolkit: string;
|
|
112
|
-
|
|
113
|
-
/**
|
|
114
|
-
* Specific auth configuration ID for this toolkit
|
|
115
|
-
*/
|
|
116
|
-
auth_config_id?: string;
|
|
117
|
-
}
|
|
118
|
-
}
|
|
119
24
|
}
|
|
120
25
|
|
|
121
26
|
ToolRouter.Session = Session;
|
|
122
27
|
|
|
123
28
|
export declare namespace ToolRouter {
|
|
124
|
-
export {
|
|
125
|
-
type ToolRouterCreateSessionResponse as ToolRouterCreateSessionResponse,
|
|
126
|
-
type ToolRouterCreateSessionParams as ToolRouterCreateSessionParams,
|
|
127
|
-
};
|
|
128
|
-
|
|
129
29
|
export {
|
|
130
30
|
Session as Session,
|
|
131
31
|
type SessionCreateResponse as SessionCreateResponse,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.54'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.54";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.1.0-alpha.
|
|
1
|
+
export declare const VERSION = "0.1.0-alpha.54";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.VERSION = void 0;
|
|
4
|
-
exports.VERSION = '0.1.0-alpha.
|
|
4
|
+
exports.VERSION = '0.1.0-alpha.54'; // x-release-please-version
|
|
5
5
|
//# sourceMappingURL=version.js.map
|
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.1.0-alpha.
|
|
1
|
+
export const VERSION = '0.1.0-alpha.54'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|