@smithery/api 0.14.0 → 0.16.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/CHANGELOG.md +24 -0
- package/client.d.mts +3 -0
- package/client.d.mts.map +1 -1
- package/client.d.ts +3 -0
- package/client.d.ts.map +1 -1
- package/client.js +3 -0
- package/client.js.map +1 -1
- package/client.mjs +3 -0
- package/client.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/beta/beta.d.mts +4 -0
- package/resources/beta/beta.d.mts.map +1 -1
- package/resources/beta/beta.d.ts +4 -0
- package/resources/beta/beta.d.ts.map +1 -1
- package/resources/beta/beta.js +4 -0
- package/resources/beta/beta.js.map +1 -1
- package/resources/beta/beta.mjs +4 -0
- package/resources/beta/beta.mjs.map +1 -1
- package/resources/beta/connect/connect.d.mts +18 -0
- package/resources/beta/connect/connect.d.mts.map +1 -0
- package/resources/beta/connect/connect.d.ts +18 -0
- package/resources/beta/connect/connect.d.ts.map +1 -0
- package/resources/beta/connect/connect.js +25 -0
- package/resources/beta/connect/connect.js.map +1 -0
- package/resources/beta/connect/connect.mjs +20 -0
- package/resources/beta/connect/connect.mjs.map +1 -0
- package/resources/beta/connect/connections.d.mts +140 -0
- package/resources/beta/connect/connections.d.mts.map +1 -0
- package/resources/beta/connect/connections.d.ts +140 -0
- package/resources/beta/connect/connections.d.ts.map +1 -0
- package/resources/beta/connect/connections.js +81 -0
- package/resources/beta/connect/connections.js.map +1 -0
- package/resources/beta/connect/connections.mjs +77 -0
- package/resources/beta/connect/connections.mjs.map +1 -0
- package/resources/beta/connect/index.d.mts +5 -0
- package/resources/beta/connect/index.d.mts.map +1 -0
- package/resources/beta/connect/index.d.ts +5 -0
- package/resources/beta/connect/index.d.ts.map +1 -0
- package/resources/beta/connect/index.js +13 -0
- package/resources/beta/connect/index.js.map +1 -0
- package/resources/beta/connect/index.mjs +6 -0
- package/resources/beta/connect/index.mjs.map +1 -0
- package/resources/beta/connect/namespaces.d.mts +79 -0
- package/resources/beta/connect/namespaces.d.mts.map +1 -0
- package/resources/beta/connect/namespaces.d.ts +79 -0
- package/resources/beta/connect/namespaces.d.ts.map +1 -0
- package/resources/beta/connect/namespaces.js +53 -0
- package/resources/beta/connect/namespaces.js.map +1 -0
- package/resources/beta/connect/namespaces.mjs +49 -0
- package/resources/beta/connect/namespaces.mjs.map +1 -0
- package/resources/beta/connect/rpc.d.mts +65 -0
- package/resources/beta/connect/rpc.d.mts.map +1 -0
- package/resources/beta/connect/rpc.d.ts +65 -0
- package/resources/beta/connect/rpc.d.ts.map +1 -0
- package/resources/beta/connect/rpc.js +33 -0
- package/resources/beta/connect/rpc.js.map +1 -0
- package/resources/beta/connect/rpc.mjs +29 -0
- package/resources/beta/connect/rpc.mjs.map +1 -0
- package/resources/beta/connect.d.mts +2 -0
- package/resources/beta/connect.d.mts.map +1 -0
- package/resources/beta/connect.d.ts +2 -0
- package/resources/beta/connect.d.ts.map +1 -0
- package/resources/beta/connect.js +6 -0
- package/resources/beta/connect.js.map +1 -0
- package/resources/beta/connect.mjs +3 -0
- package/resources/beta/connect.mjs.map +1 -0
- package/resources/beta/index.d.mts +1 -0
- package/resources/beta/index.d.mts.map +1 -1
- package/resources/beta/index.d.ts +1 -0
- package/resources/beta/index.d.ts.map +1 -1
- package/resources/beta/index.js +3 -1
- package/resources/beta/index.js.map +1 -1
- package/resources/beta/index.mjs +1 -0
- package/resources/beta/index.mjs.map +1 -1
- package/resources/beta/tools.d.mts +10 -0
- package/resources/beta/tools.d.mts.map +1 -1
- package/resources/beta/tools.d.ts +10 -0
- package/resources/beta/tools.d.ts.map +1 -1
- package/resources/beta/tools.js +10 -0
- package/resources/beta/tools.js.map +1 -1
- package/resources/beta/tools.mjs +10 -0
- package/resources/beta/tools.mjs.map +1 -1
- package/resources/index.d.mts +1 -0
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -0
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/servers/secrets.d.mts +3 -4
- package/resources/servers/secrets.d.mts.map +1 -1
- package/resources/servers/secrets.d.ts +3 -4
- package/resources/servers/secrets.d.ts.map +1 -1
- package/resources/servers/secrets.js +3 -4
- package/resources/servers/secrets.js.map +1 -1
- package/resources/servers/secrets.mjs +3 -4
- package/resources/servers/secrets.mjs.map +1 -1
- package/resources/tokens.d.mts +117 -0
- package/resources/tokens.d.mts.map +1 -0
- package/resources/tokens.d.ts +117 -0
- package/resources/tokens.d.ts.map +1 -0
- package/resources/tokens.js +27 -0
- package/resources/tokens.js.map +1 -0
- package/resources/tokens.mjs +23 -0
- package/resources/tokens.mjs.map +1 -0
- package/src/client.ts +10 -0
- package/src/resources/beta/beta.ts +6 -0
- package/src/resources/beta/connect/connect.ts +62 -0
- package/src/resources/beta/connect/connections.ts +193 -0
- package/src/resources/beta/connect/index.ts +21 -0
- package/src/resources/beta/connect/namespaces.ts +103 -0
- package/src/resources/beta/connect/rpc.ts +91 -0
- package/src/resources/beta/connect.ts +3 -0
- package/src/resources/beta/index.ts +1 -0
- package/src/resources/beta/tools.ts +10 -0
- package/src/resources/index.ts +1 -0
- package/src/resources/servers/secrets.ts +3 -4
- package/src/resources/tokens.ts +138 -0
- 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
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Connections extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new MCP connection with the given ID. Requires API key and namespace
|
|
11
|
+
* ownership.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const connection =
|
|
16
|
+
* await client.beta.connect.connections.create(
|
|
17
|
+
* 'connectionId',
|
|
18
|
+
* {
|
|
19
|
+
* namespaceId: 'namespaceId',
|
|
20
|
+
* mcpUrl: 'https://mcp.example.com/sse',
|
|
21
|
+
* name: 'My MCP Server',
|
|
22
|
+
* },
|
|
23
|
+
* );
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
26
|
+
create(
|
|
27
|
+
connectionID: string,
|
|
28
|
+
params: ConnectionCreateParams,
|
|
29
|
+
options?: RequestOptions,
|
|
30
|
+
): APIPromise<Connection> {
|
|
31
|
+
const { namespaceId, ...body } = params;
|
|
32
|
+
return this._client.put(path`/connect/namespaces/${namespaceId}/connections/${connectionID}`, {
|
|
33
|
+
body,
|
|
34
|
+
...options,
|
|
35
|
+
});
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Get details for a specific connection. Requires service token with
|
|
40
|
+
* connections:read scope.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* const connection =
|
|
45
|
+
* await client.beta.connect.connections.retrieve(
|
|
46
|
+
* 'connectionId',
|
|
47
|
+
* { namespaceId: 'namespaceId' },
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
retrieve(
|
|
52
|
+
connectionID: string,
|
|
53
|
+
params: ConnectionRetrieveParams,
|
|
54
|
+
options?: RequestOptions,
|
|
55
|
+
): APIPromise<Connection> {
|
|
56
|
+
const { namespaceId } = params;
|
|
57
|
+
return this._client.get(path`/connect/namespaces/${namespaceId}/connections/${connectionID}`, options);
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* List all connections in a namespace. Requires service token with
|
|
62
|
+
* connections:read scope.
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* ```ts
|
|
66
|
+
* const connectionsListResponse =
|
|
67
|
+
* await client.beta.connect.connections.list('namespaceId');
|
|
68
|
+
* ```
|
|
69
|
+
*/
|
|
70
|
+
list(namespaceID: string, options?: RequestOptions): APIPromise<ConnectionsListResponse> {
|
|
71
|
+
return this._client.get(path`/connect/namespaces/${namespaceID}/connections`, options);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Delete a connection and terminate its MCP session. Requires API key and
|
|
76
|
+
* namespace ownership.
|
|
77
|
+
*
|
|
78
|
+
* @example
|
|
79
|
+
* ```ts
|
|
80
|
+
* const connection =
|
|
81
|
+
* await client.beta.connect.connections.delete(
|
|
82
|
+
* 'connectionId',
|
|
83
|
+
* { namespaceId: 'namespaceId' },
|
|
84
|
+
* );
|
|
85
|
+
* ```
|
|
86
|
+
*/
|
|
87
|
+
delete(
|
|
88
|
+
connectionID: string,
|
|
89
|
+
params: ConnectionDeleteParams,
|
|
90
|
+
options?: RequestOptions,
|
|
91
|
+
): APIPromise<ConnectionDeleteResponse> {
|
|
92
|
+
const { namespaceId } = params;
|
|
93
|
+
return this._client.delete(path`/connect/namespaces/${namespaceId}/connections/${connectionID}`, options);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
export interface Connection {
|
|
98
|
+
/**
|
|
99
|
+
* Developer-defined connection ID
|
|
100
|
+
*/
|
|
101
|
+
connectionId: string;
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* MCP server URL
|
|
105
|
+
*/
|
|
106
|
+
mcpUrl: string;
|
|
107
|
+
|
|
108
|
+
metadata: { [key: string]: unknown } | null;
|
|
109
|
+
|
|
110
|
+
/**
|
|
111
|
+
* Human-readable name
|
|
112
|
+
*/
|
|
113
|
+
name: string;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* ISO 8601 timestamp
|
|
117
|
+
*/
|
|
118
|
+
createdAt?: string;
|
|
119
|
+
|
|
120
|
+
iconUrl?: string | null;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export interface ConnectionsListResponse {
|
|
124
|
+
connections: Array<Connection>;
|
|
125
|
+
|
|
126
|
+
/**
|
|
127
|
+
* Cursor for next page, null if no more results
|
|
128
|
+
*/
|
|
129
|
+
nextCursor: string | null;
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export interface CreateConnectionRequest {
|
|
133
|
+
/**
|
|
134
|
+
* URL of the MCP server
|
|
135
|
+
*/
|
|
136
|
+
mcpUrl: string;
|
|
137
|
+
|
|
138
|
+
/**
|
|
139
|
+
* Human-readable name
|
|
140
|
+
*/
|
|
141
|
+
name: string;
|
|
142
|
+
|
|
143
|
+
/**
|
|
144
|
+
* Custom metadata for filtering connections
|
|
145
|
+
*/
|
|
146
|
+
metadata?: { [key: string]: unknown };
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
export interface ConnectionDeleteResponse {
|
|
150
|
+
success: true;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface ConnectionCreateParams {
|
|
154
|
+
/**
|
|
155
|
+
* Path param
|
|
156
|
+
*/
|
|
157
|
+
namespaceId: string;
|
|
158
|
+
|
|
159
|
+
/**
|
|
160
|
+
* Body param: URL of the MCP server
|
|
161
|
+
*/
|
|
162
|
+
mcpUrl: string;
|
|
163
|
+
|
|
164
|
+
/**
|
|
165
|
+
* Body param: Human-readable name
|
|
166
|
+
*/
|
|
167
|
+
name: string;
|
|
168
|
+
|
|
169
|
+
/**
|
|
170
|
+
* Body param: Custom metadata for filtering connections
|
|
171
|
+
*/
|
|
172
|
+
metadata?: { [key: string]: unknown };
|
|
173
|
+
}
|
|
174
|
+
|
|
175
|
+
export interface ConnectionRetrieveParams {
|
|
176
|
+
namespaceId: string;
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
export interface ConnectionDeleteParams {
|
|
180
|
+
namespaceId: string;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
export declare namespace Connections {
|
|
184
|
+
export {
|
|
185
|
+
type Connection as Connection,
|
|
186
|
+
type ConnectionsListResponse as ConnectionsListResponse,
|
|
187
|
+
type CreateConnectionRequest as CreateConnectionRequest,
|
|
188
|
+
type ConnectionDeleteResponse as ConnectionDeleteResponse,
|
|
189
|
+
type ConnectionCreateParams as ConnectionCreateParams,
|
|
190
|
+
type ConnectionRetrieveParams as ConnectionRetrieveParams,
|
|
191
|
+
type ConnectionDeleteParams as ConnectionDeleteParams,
|
|
192
|
+
};
|
|
193
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export { Connect } from './connect';
|
|
4
|
+
export {
|
|
5
|
+
Connections,
|
|
6
|
+
type Connection,
|
|
7
|
+
type ConnectionsListResponse,
|
|
8
|
+
type CreateConnectionRequest,
|
|
9
|
+
type ConnectionDeleteResponse,
|
|
10
|
+
type ConnectionCreateParams,
|
|
11
|
+
type ConnectionRetrieveParams,
|
|
12
|
+
type ConnectionDeleteParams,
|
|
13
|
+
} from './connections';
|
|
14
|
+
export {
|
|
15
|
+
Namespaces,
|
|
16
|
+
type CreateNamespaceRequest,
|
|
17
|
+
type Namespace,
|
|
18
|
+
type NamespaceDeleteResponse,
|
|
19
|
+
type NamespaceCreateParams,
|
|
20
|
+
} from './namespaces';
|
|
21
|
+
export { Rpc, type JsonRpcRequest, type JsonRpcResponse, type RpcCallParams } from './rpc';
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Namespaces extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Create a new Connect namespace. Requires a valid Smithery API key.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const namespace =
|
|
15
|
+
* await client.beta.connect.namespaces.create({
|
|
16
|
+
* name: 'my-namespace',
|
|
17
|
+
* });
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
create(body: NamespaceCreateParams, options?: RequestOptions): APIPromise<Namespace> {
|
|
21
|
+
return this._client.post('/connect/namespaces', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Get details for a namespace. Requires API key and namespace ownership.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```ts
|
|
29
|
+
* const namespace =
|
|
30
|
+
* await client.beta.connect.namespaces.retrieve(
|
|
31
|
+
* 'namespaceId',
|
|
32
|
+
* );
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
retrieve(namespaceID: string, options?: RequestOptions): APIPromise<Namespace> {
|
|
36
|
+
return this._client.get(path`/connect/namespaces/${namespaceID}`, options);
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Delete a namespace and all its connections. Requires API key and namespace
|
|
41
|
+
* ownership.
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* const namespace =
|
|
46
|
+
* await client.beta.connect.namespaces.delete(
|
|
47
|
+
* 'namespaceId',
|
|
48
|
+
* );
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
51
|
+
delete(namespaceID: string, options?: RequestOptions): APIPromise<NamespaceDeleteResponse> {
|
|
52
|
+
return this._client.delete(path`/connect/namespaces/${namespaceID}`, options);
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
export interface CreateNamespaceRequest {
|
|
57
|
+
/**
|
|
58
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
59
|
+
*/
|
|
60
|
+
name: string;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
export interface Namespace {
|
|
64
|
+
/**
|
|
65
|
+
* Unique namespace ID
|
|
66
|
+
*/
|
|
67
|
+
id: string;
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* ISO 8601 timestamp
|
|
71
|
+
*/
|
|
72
|
+
createdAt: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Namespace name
|
|
76
|
+
*/
|
|
77
|
+
name: string;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* ISO 8601 timestamp
|
|
81
|
+
*/
|
|
82
|
+
updatedAt?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface NamespaceDeleteResponse {
|
|
86
|
+
success: true;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface NamespaceCreateParams {
|
|
90
|
+
/**
|
|
91
|
+
* Namespace name (lowercase alphanumeric with hyphens)
|
|
92
|
+
*/
|
|
93
|
+
name: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export declare namespace Namespaces {
|
|
97
|
+
export {
|
|
98
|
+
type CreateNamespaceRequest as CreateNamespaceRequest,
|
|
99
|
+
type Namespace as Namespace,
|
|
100
|
+
type NamespaceDeleteResponse as NamespaceDeleteResponse,
|
|
101
|
+
type NamespaceCreateParams as NamespaceCreateParams,
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../../core/resource';
|
|
4
|
+
import { APIPromise } from '../../../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../../../internal/request-options';
|
|
6
|
+
import { path } from '../../../internal/utils/path';
|
|
7
|
+
|
|
8
|
+
export class Rpc extends APIResource {
|
|
9
|
+
/**
|
|
10
|
+
* Execute a JSON-RPC call on an MCP connection. Requires service token with rpc
|
|
11
|
+
* scope.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const jsonRpcResponse = await client.beta.connect.rpc.call(
|
|
16
|
+
* 'connectionId',
|
|
17
|
+
* {
|
|
18
|
+
* namespaceId: 'namespaceId',
|
|
19
|
+
* jsonrpc: '2.0',
|
|
20
|
+
* method: 'tools/list',
|
|
21
|
+
* },
|
|
22
|
+
* );
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
call(connectionID: string, params: RpcCallParams, options?: RequestOptions): APIPromise<JsonRpcResponse> {
|
|
26
|
+
const { namespaceId, ...body } = params;
|
|
27
|
+
return this._client.post(path`/connect/namespaces/${namespaceId}/connections/${connectionID}/rpc`, {
|
|
28
|
+
body,
|
|
29
|
+
...options,
|
|
30
|
+
});
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
export interface JsonRpcRequest {
|
|
35
|
+
jsonrpc: '2.0';
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* MCP method to call
|
|
39
|
+
*/
|
|
40
|
+
method: string;
|
|
41
|
+
|
|
42
|
+
id?: string | number;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Method parameters
|
|
46
|
+
*/
|
|
47
|
+
params?: unknown;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export interface JsonRpcResponse {
|
|
51
|
+
id: string | number | null;
|
|
52
|
+
|
|
53
|
+
jsonrpc: '2.0';
|
|
54
|
+
|
|
55
|
+
result?: unknown;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface RpcCallParams {
|
|
59
|
+
/**
|
|
60
|
+
* Path param
|
|
61
|
+
*/
|
|
62
|
+
namespaceId: string;
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Body param
|
|
66
|
+
*/
|
|
67
|
+
jsonrpc: '2.0';
|
|
68
|
+
|
|
69
|
+
/**
|
|
70
|
+
* Body param: MCP method to call
|
|
71
|
+
*/
|
|
72
|
+
method: string;
|
|
73
|
+
|
|
74
|
+
/**
|
|
75
|
+
* Body param
|
|
76
|
+
*/
|
|
77
|
+
id?: string | number;
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Body param: Method parameters
|
|
81
|
+
*/
|
|
82
|
+
params?: unknown;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export declare namespace Rpc {
|
|
86
|
+
export {
|
|
87
|
+
type JsonRpcRequest as JsonRpcRequest,
|
|
88
|
+
type JsonRpcResponse as JsonRpcResponse,
|
|
89
|
+
type RpcCallParams as RpcCallParams,
|
|
90
|
+
};
|
|
91
|
+
}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
|
|
3
3
|
export { Beta } from './beta';
|
|
4
|
+
export { Connect } from './connect/index';
|
|
4
5
|
export { Tools, type ToolListResponse, type ToolListParams, type ToolListResponsesToolsPage } from './tools';
|
|
@@ -8,6 +8,16 @@ export class Tools extends APIResource {
|
|
|
8
8
|
/**
|
|
9
9
|
* Get a paginated list of all MCP tools across servers. Use the `q` parameter for
|
|
10
10
|
* semantic search.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* // Automatically fetches more pages as needed.
|
|
15
|
+
* for await (const toolListResponse of client.beta.tools.list(
|
|
16
|
+
* { q: 'x' },
|
|
17
|
+
* )) {
|
|
18
|
+
* // ...
|
|
19
|
+
* }
|
|
20
|
+
* ```
|
|
11
21
|
*/
|
|
12
22
|
list(
|
|
13
23
|
query: ToolListParams,
|
package/src/resources/index.ts
CHANGED
|
@@ -25,4 +25,5 @@ export {
|
|
|
25
25
|
type SkillListParams,
|
|
26
26
|
type SkillListResponsesSkillsPage,
|
|
27
27
|
} from './skills';
|
|
28
|
+
export { Tokens, type CreateTokenRequest, type CreateTokenResponse, type TokenCreateParams } from './tokens';
|
|
28
29
|
export { Uplink, type UplinkCreateTokenResponse } from './uplink';
|
|
@@ -7,15 +7,14 @@ import { path } from '../../internal/utils/path';
|
|
|
7
7
|
|
|
8
8
|
export class Secrets extends APIResource {
|
|
9
9
|
/**
|
|
10
|
-
* Fetch secret names for the server
|
|
11
|
-
* are not returned.
|
|
10
|
+
* Fetch secret names for the server. Values are not returned.
|
|
12
11
|
*/
|
|
13
12
|
list(qualifiedName: string, options?: RequestOptions): APIPromise<SecretListResponse> {
|
|
14
13
|
return this._client.get(path`/servers/${qualifiedName}/secrets`, options);
|
|
15
14
|
}
|
|
16
15
|
|
|
17
16
|
/**
|
|
18
|
-
* Delete a secret by name from the server
|
|
17
|
+
* Delete a secret by name from the server.
|
|
19
18
|
*/
|
|
20
19
|
delete(
|
|
21
20
|
secretName: string,
|
|
@@ -27,7 +26,7 @@ export class Secrets extends APIResource {
|
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
|
-
* Set a secret value for the server
|
|
29
|
+
* Set a secret value for the server.
|
|
31
30
|
*/
|
|
32
31
|
set(qualifiedName: string, body: SecretSetParams, options?: RequestOptions): APIPromise<SecretSetResponse> {
|
|
33
32
|
return this._client.put(path`/servers/${qualifiedName}/secrets`, { body, ...options });
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../core/resource';
|
|
4
|
+
import { APIPromise } from '../core/api-promise';
|
|
5
|
+
import { RequestOptions } from '../internal/request-options';
|
|
6
|
+
|
|
7
|
+
export class Tokens extends APIResource {
|
|
8
|
+
/**
|
|
9
|
+
* Create a service token for machine-to-machine authentication. Requires API key
|
|
10
|
+
* authentication.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const createTokenResponse = await client.tokens.create({
|
|
15
|
+
* permissions: {
|
|
16
|
+
* connections: { can: ['read', 'write'] },
|
|
17
|
+
* 'connections.rpc': { can: ['write'] },
|
|
18
|
+
* },
|
|
19
|
+
* ttlSeconds: 3600,
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
create(body: TokenCreateParams, options?: RequestOptions): APIPromise<CreateTokenResponse> {
|
|
24
|
+
return this._client.post('/tokens', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
export interface CreateTokenRequest {
|
|
29
|
+
/**
|
|
30
|
+
* Permissions to grant. Format: { [subject]: { can: [actions] } }
|
|
31
|
+
*/
|
|
32
|
+
permissions: { [key: string]: CreateTokenRequest.Permissions };
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
36
|
+
*/
|
|
37
|
+
ttlSeconds: number;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Optional constraints to limit token access.
|
|
41
|
+
*/
|
|
42
|
+
constraints?: CreateTokenRequest.Constraints;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Profile to scope the token to. If not provided, uses the default profile.
|
|
46
|
+
*/
|
|
47
|
+
profileSlug?: string;
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
export namespace CreateTokenRequest {
|
|
51
|
+
export interface Permissions {
|
|
52
|
+
/**
|
|
53
|
+
* Actions granted on this subject.
|
|
54
|
+
*/
|
|
55
|
+
can: Array<'read' | 'write'>;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
/**
|
|
59
|
+
* Optional constraints to limit token access.
|
|
60
|
+
*/
|
|
61
|
+
export interface Constraints {
|
|
62
|
+
/**
|
|
63
|
+
* Limit access to specific namespace IDs.
|
|
64
|
+
*/
|
|
65
|
+
namespaceIds?: Array<string>;
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Limit access to specific server qualified names.
|
|
69
|
+
*/
|
|
70
|
+
serverQualifiedNames?: Array<string>;
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export interface CreateTokenResponse {
|
|
75
|
+
/**
|
|
76
|
+
* The signed service token (PASETO v4).
|
|
77
|
+
*/
|
|
78
|
+
token: string;
|
|
79
|
+
|
|
80
|
+
/**
|
|
81
|
+
* ISO 8601 timestamp when the token expires.
|
|
82
|
+
*/
|
|
83
|
+
expiresAt: string;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
export interface TokenCreateParams {
|
|
87
|
+
/**
|
|
88
|
+
* Permissions to grant. Format: { [subject]: { can: [actions] } }
|
|
89
|
+
*/
|
|
90
|
+
permissions: { [key: string]: TokenCreateParams.Permissions };
|
|
91
|
+
|
|
92
|
+
/**
|
|
93
|
+
* Token TTL in seconds. Required. Max 86400 (24 hours).
|
|
94
|
+
*/
|
|
95
|
+
ttlSeconds: number;
|
|
96
|
+
|
|
97
|
+
/**
|
|
98
|
+
* Optional constraints to limit token access.
|
|
99
|
+
*/
|
|
100
|
+
constraints?: TokenCreateParams.Constraints;
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* Profile to scope the token to. If not provided, uses the default profile.
|
|
104
|
+
*/
|
|
105
|
+
profileSlug?: string;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export namespace TokenCreateParams {
|
|
109
|
+
export interface Permissions {
|
|
110
|
+
/**
|
|
111
|
+
* Actions granted on this subject.
|
|
112
|
+
*/
|
|
113
|
+
can: Array<'read' | 'write'>;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Optional constraints to limit token access.
|
|
118
|
+
*/
|
|
119
|
+
export interface Constraints {
|
|
120
|
+
/**
|
|
121
|
+
* Limit access to specific namespace IDs.
|
|
122
|
+
*/
|
|
123
|
+
namespaceIds?: Array<string>;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Limit access to specific server qualified names.
|
|
127
|
+
*/
|
|
128
|
+
serverQualifiedNames?: Array<string>;
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
export declare namespace Tokens {
|
|
133
|
+
export {
|
|
134
|
+
type CreateTokenRequest as CreateTokenRequest,
|
|
135
|
+
type CreateTokenResponse as CreateTokenResponse,
|
|
136
|
+
type TokenCreateParams as TokenCreateParams,
|
|
137
|
+
};
|
|
138
|
+
}
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.16.0'; // x-release-please-version
|
package/version.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.16.0";
|
|
2
2
|
//# sourceMappingURL=version.d.mts.map
|
package/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "0.
|
|
1
|
+
export declare const VERSION = "0.16.0";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/version.js
CHANGED
package/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '0.
|
|
1
|
+
export const VERSION = '0.16.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|