@metorial/sdk 1.2.0 → 2.0.1
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 +195 -486
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +154 -43
- package/dist/index.d.ts +154 -43
- package/dist/index.js +197 -488
- package/dist/index.js.map +1 -1
- package/package.json +12 -12
package/dist/index.d.ts
CHANGED
|
@@ -1,35 +1,69 @@
|
|
|
1
1
|
import * as _metorial_mcp_session from '@metorial/mcp-session';
|
|
2
|
-
import { MetorialMcpSessionInit, MetorialMcpSession, MetorialMcpSessionInitServerDeployments } from '@metorial/mcp-session';
|
|
3
|
-
export { MetorialMcpSession, MetorialMcpSessionInit, MetorialMcpSessionInitServerDeployments } from '@metorial/mcp-session';
|
|
4
|
-
import * as
|
|
5
|
-
import
|
|
2
|
+
import { MetorialMcpSessionInit, MetorialMcpSession, MetorialMcpSessionInitServerDeployments, MetorialMagnetarMcpSessionInit, MetorialMagnetarMcpSessionTemplateInit, MetorialMagnetarMcpSession } from '@metorial/mcp-session';
|
|
3
|
+
export { MetorialMagnetarMcpSession, MetorialMagnetarMcpSessionInit, MetorialMagnetarMcpSessionTemplateInit, MetorialMcpSession, MetorialMcpSessionInit, MetorialMcpSessionInitServerDeployments } from '@metorial/mcp-session';
|
|
4
|
+
import * as _metorial_generated from '@metorial/generated';
|
|
5
|
+
import * as _metorial_generated_src_mt_2026_01_01_magnetar from '@metorial/generated/src/mt_2026_01_01_magnetar';
|
|
6
|
+
import { createMetorialPulsarCoreSDK } from '@metorial/core';
|
|
6
7
|
export * from '@metorial/core';
|
|
7
8
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
get
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
9
|
+
declare class Metorial {
|
|
10
|
+
private readonly pulsarSdk;
|
|
11
|
+
private readonly magnetarSdk;
|
|
12
|
+
constructor(init: Omit<Parameters<typeof createMetorialPulsarCoreSDK>[0], 'apiVersion'>);
|
|
13
|
+
get providers(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProvidersEndpoint & {
|
|
14
|
+
versions: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProvidersVersionsEndpoint;
|
|
15
|
+
tools: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProvidersToolsEndpoint;
|
|
16
|
+
authMethods: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProvidersAuthMethodsEndpoint;
|
|
17
|
+
specifications: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProvidersSpecificationsEndpoint;
|
|
18
|
+
};
|
|
19
|
+
get providerDeployments(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsEndpoint & {
|
|
20
|
+
configs: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsConfigsEndpoint;
|
|
21
|
+
configVaults: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsConfigVaultsEndpoint;
|
|
22
|
+
authConfigs: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsAuthConfigsEndpoint & {
|
|
23
|
+
imports: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsAuthConfigsImportsEndpoint;
|
|
24
|
+
exports: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsAuthConfigsExportsEndpoint;
|
|
25
|
+
};
|
|
26
|
+
authCredentials: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsAuthCredentialsEndpoint;
|
|
27
|
+
setupSessions: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsSetupSessionsEndpoint;
|
|
28
|
+
};
|
|
29
|
+
get sessions(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsEndpoint & {
|
|
30
|
+
messages: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsMessagesEndpoint;
|
|
31
|
+
connections: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsConnectionsEndpoint;
|
|
32
|
+
events: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsEventsEndpoint;
|
|
33
|
+
providers: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsProvidersEndpoint;
|
|
34
|
+
participants: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsParticipantsEndpoint;
|
|
35
|
+
errors: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsErrorsEndpoint;
|
|
36
|
+
errorGroups: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionsErrorGroupsEndpoint;
|
|
37
|
+
};
|
|
38
|
+
get sessionTemplates(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionTemplatesEndpoint & {
|
|
39
|
+
providers: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialSessionTemplatesProvidersEndpoint;
|
|
27
40
|
};
|
|
28
|
-
get
|
|
29
|
-
|
|
30
|
-
|
|
41
|
+
get providerRuns(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderRunsEndpoint;
|
|
42
|
+
get instance(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialInstanceEndpoint;
|
|
43
|
+
get publishers(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialPublishersEndpoint;
|
|
44
|
+
get providerCategories(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderCategoriesEndpoint;
|
|
45
|
+
get providerCollections(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderCollectionsEndpoint;
|
|
46
|
+
get providerGroups(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderGroupsEndpoint;
|
|
47
|
+
get providerListings(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderListingsEndpoint;
|
|
48
|
+
get providerSetupSessions(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialProviderDeploymentsSetupSessionsEndpoint;
|
|
49
|
+
get toolCalls(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialToolCallsEndpoint;
|
|
50
|
+
get customProviders(): _metorial_generated_src_mt_2026_01_01_magnetar.MetorialCustomProvidersEndpoint & {
|
|
51
|
+
versions: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialCustomProvidersVersionsEndpoint;
|
|
52
|
+
deployments: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialCustomProvidersDeploymentsEndpoint;
|
|
53
|
+
environments: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialCustomProvidersEnvironmentsEndpoint;
|
|
54
|
+
commits: _metorial_generated_src_mt_2026_01_01_magnetar.MetorialCustomProvidersCommitsEndpoint;
|
|
31
55
|
};
|
|
32
|
-
get
|
|
56
|
+
get servers(): _metorial_generated.MetorialServersEndpoint & {
|
|
57
|
+
variants: _metorial_generated.MetorialServersVariantsEndpoint;
|
|
58
|
+
versions: _metorial_generated.MetorialServersVersionsEndpoint;
|
|
59
|
+
deployments: _metorial_generated.MetorialServersDeploymentsEndpoint;
|
|
60
|
+
implementations: _metorial_generated.MetorialServersImplementationsEndpoint;
|
|
61
|
+
errors: any;
|
|
62
|
+
runs: _metorial_generated.MetorialServerRunsEndpoint;
|
|
63
|
+
capabilities: _metorial_generated.MetorialServersCapabilitiesEndpoint;
|
|
64
|
+
};
|
|
65
|
+
get secrets(): _metorial_generated.MetorialSecretsEndpoint;
|
|
66
|
+
get oauth(): typeof this$1.pulsarSdk.oauth & {
|
|
33
67
|
waitForCompletion: (sessions: Array<{
|
|
34
68
|
id: string;
|
|
35
69
|
}>, options?: {
|
|
@@ -46,8 +80,59 @@ declare class Metorial implements MetorialCoreSDK {
|
|
|
46
80
|
} & {
|
|
47
81
|
apiHost: string;
|
|
48
82
|
};
|
|
49
|
-
get
|
|
50
|
-
|
|
83
|
+
get v1(): {
|
|
84
|
+
readonly instance: _metorial_generated.MetorialInstanceEndpoint;
|
|
85
|
+
readonly secrets: _metorial_generated.MetorialSecretsEndpoint;
|
|
86
|
+
readonly servers: _metorial_generated.MetorialServersEndpoint & {
|
|
87
|
+
variants: _metorial_generated.MetorialServersVariantsEndpoint;
|
|
88
|
+
versions: _metorial_generated.MetorialServersVersionsEndpoint;
|
|
89
|
+
deployments: _metorial_generated.MetorialServersDeploymentsEndpoint;
|
|
90
|
+
implementations: _metorial_generated.MetorialServersImplementationsEndpoint;
|
|
91
|
+
errors: any;
|
|
92
|
+
runs: _metorial_generated.MetorialServerRunsEndpoint;
|
|
93
|
+
capabilities: _metorial_generated.MetorialServersCapabilitiesEndpoint;
|
|
94
|
+
};
|
|
95
|
+
readonly sessions: _metorial_generated.MetorialSessionsEndpoint & {
|
|
96
|
+
messages: _metorial_generated.MetorialSessionsMessagesEndpoint;
|
|
97
|
+
connections: _metorial_generated.MetorialSessionsConnectionsEndpoint;
|
|
98
|
+
};
|
|
99
|
+
readonly oauth: {
|
|
100
|
+
connections: _metorial_generated.MetorialProviderOauthConnectionsEndpoint;
|
|
101
|
+
profiles: _metorial_generated.MetorialProviderOauthConnectionsProfilesEndpoint;
|
|
102
|
+
authentications: _metorial_generated.MetorialProviderOauthConnectionsAuthenticationsEndpoint;
|
|
103
|
+
sessions: _metorial_generated.MetorialProviderOauthSessionsEndpoint;
|
|
104
|
+
} & {
|
|
105
|
+
waitForCompletion: (sessions: Array<{
|
|
106
|
+
id: string;
|
|
107
|
+
}>, options?: {
|
|
108
|
+
pollInterval?: number;
|
|
109
|
+
timeout?: number;
|
|
110
|
+
}) => Promise<void>;
|
|
111
|
+
};
|
|
112
|
+
readonly _config: {
|
|
113
|
+
apiVersion: "2025-01-01-pulsar";
|
|
114
|
+
apiKey: `${"metorial_uk_" | "metorial_mk_" | "metorial_sk_" | "metorial_ak_" | "metorial_pk_"}${string}` | string;
|
|
115
|
+
headers?: Record<string, string>;
|
|
116
|
+
apiHost?: string;
|
|
117
|
+
mcpHost?: string;
|
|
118
|
+
} & {
|
|
119
|
+
apiHost: string;
|
|
120
|
+
};
|
|
121
|
+
mcp: {
|
|
122
|
+
createSession: (init: MetorialMcpSessionInit) => MetorialMcpSession;
|
|
123
|
+
withSession: <T>(init: MetorialMcpSessionInit, action: (session: MetorialMcpSession) => Promise<T>) => Promise<T>;
|
|
124
|
+
withProviderSession: <P, T>(provider: (session: MetorialMcpSession) => Promise<P>, init: MetorialMcpSessionInit & {
|
|
125
|
+
streaming?: boolean;
|
|
126
|
+
}, action: (input: P & {
|
|
127
|
+
session: MetorialMcpSession;
|
|
128
|
+
getSession: MetorialMcpSession["getSession"];
|
|
129
|
+
getCapabilities: MetorialMcpSession["getCapabilities"];
|
|
130
|
+
getClient: MetorialMcpSession["getClient"];
|
|
131
|
+
getServerDeployments: MetorialMcpSession["getServerDeployments"];
|
|
132
|
+
getToolManager: MetorialMcpSession["getToolManager"];
|
|
133
|
+
}) => Promise<T>) => Promise<T>;
|
|
134
|
+
createConnection: (init: MetorialMcpSessionInitServerDeployments[number]) => Promise<_metorial_mcp_session.MetorialMcpClient>;
|
|
135
|
+
};
|
|
51
136
|
withSession: <T>(init: MetorialMcpSessionInit, action: (session: MetorialMcpSession) => Promise<T>) => Promise<T>;
|
|
52
137
|
withProviderSession: <P, T>(provider: (session: MetorialMcpSession) => Promise<P>, init: MetorialMcpSessionInit & {
|
|
53
138
|
streaming?: boolean;
|
|
@@ -59,11 +144,38 @@ declare class Metorial implements MetorialCoreSDK {
|
|
|
59
144
|
getServerDeployments: MetorialMcpSession["getServerDeployments"];
|
|
60
145
|
getToolManager: MetorialMcpSession["getToolManager"];
|
|
61
146
|
}) => Promise<T>) => Promise<T>;
|
|
62
|
-
|
|
147
|
+
createMcpConnection: (init: MetorialMcpSessionInitServerDeployments[number]) => Promise<_metorial_mcp_session.MetorialMcpClient>;
|
|
148
|
+
};
|
|
149
|
+
get mcp(): {
|
|
150
|
+
createSession: (init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit) => MetorialMagnetarMcpSession;
|
|
151
|
+
withSession: <T>(init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit, action: (session: MetorialMagnetarMcpSession) => Promise<T>) => Promise<T>;
|
|
152
|
+
withProviderSession: <P, T>(provider: (session: MetorialMagnetarMcpSession) => Promise<P>, init: (MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit) & {
|
|
153
|
+
streaming?: boolean;
|
|
154
|
+
}, action: (input: P & {
|
|
155
|
+
session: MetorialMagnetarMcpSession;
|
|
156
|
+
getSession: MetorialMagnetarMcpSession["getSession"];
|
|
157
|
+
getCapabilities: MetorialMagnetarMcpSession["getCapabilities"];
|
|
158
|
+
getToolManager: MetorialMagnetarMcpSession["getToolManager"];
|
|
159
|
+
closeSession: () => Promise<void>;
|
|
160
|
+
}) => Promise<T>) => Promise<T>;
|
|
161
|
+
createConnection: (init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit) => Promise<_metorial_mcp_session.MetorialMcpClient>;
|
|
63
162
|
};
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
163
|
+
session(init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit): MetorialMagnetarMcpSession;
|
|
164
|
+
createMcpConnection(init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit): Promise<_metorial_mcp_session.MetorialMcpClient>;
|
|
165
|
+
withSession<T>(init: MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit, action: (session: MetorialMagnetarMcpSession) => Promise<T>): Promise<T>;
|
|
166
|
+
withProviderSession<P, T>(provider: (session: MetorialMagnetarMcpSession) => Promise<P>, init: (MetorialMagnetarMcpSessionInit | MetorialMagnetarMcpSessionTemplateInit) & {
|
|
167
|
+
streaming?: boolean;
|
|
168
|
+
}, action: (input: P & {
|
|
169
|
+
session: MetorialMagnetarMcpSession;
|
|
170
|
+
getSession: MetorialMagnetarMcpSession['getSession'];
|
|
171
|
+
getCapabilities: MetorialMagnetarMcpSession['getCapabilities'];
|
|
172
|
+
getToolManager: MetorialMagnetarMcpSession['getToolManager'];
|
|
173
|
+
closeSession: () => Promise<void>;
|
|
174
|
+
}) => Promise<T>): Promise<T>;
|
|
175
|
+
private withMagnetarStreamingSession;
|
|
176
|
+
_pulsarCreateMcpConnection(init: MetorialMcpSessionInitServerDeployments[number]): Promise<_metorial_mcp_session.MetorialMcpClient>;
|
|
177
|
+
_pulsarWithSession<T>(init: MetorialMcpSessionInit, action: (session: MetorialMcpSession) => Promise<T>): Promise<T>;
|
|
178
|
+
_pulsarWithProviderSession<P, T>(provider: (session: MetorialMcpSession) => Promise<P>, init: MetorialMcpSessionInit & {
|
|
67
179
|
streaming?: boolean;
|
|
68
180
|
}, action: (input: P & {
|
|
69
181
|
session: MetorialMcpSession;
|
|
@@ -74,21 +186,20 @@ declare class Metorial implements MetorialCoreSDK {
|
|
|
74
186
|
getToolManager: MetorialMcpSession['getToolManager'];
|
|
75
187
|
}) => Promise<T>): Promise<T>;
|
|
76
188
|
private withStreamingSession;
|
|
77
|
-
|
|
189
|
+
waitForSetupSession(sessions: {
|
|
190
|
+
id: string;
|
|
191
|
+
} | Array<{
|
|
192
|
+
id: string;
|
|
193
|
+
}>, options?: {
|
|
194
|
+
pollInterval?: number;
|
|
195
|
+
timeout?: number;
|
|
196
|
+
}): Promise<_metorial_generated_src_mt_2026_01_01_magnetar.DashboardInstanceProviderDeploymentsSetupSessionsGetOutput[]>;
|
|
78
197
|
waitForOAuthCompletion(sessions: Array<{
|
|
79
198
|
id: string;
|
|
80
199
|
}>, options?: {
|
|
81
200
|
pollInterval?: number;
|
|
82
201
|
timeout?: number;
|
|
83
202
|
}): Promise<void>;
|
|
84
|
-
run(config: {
|
|
85
|
-
message: string;
|
|
86
|
-
serverDeployments: string | MetorialMcpSessionInitServerDeployments;
|
|
87
|
-
model: string;
|
|
88
|
-
maxSteps?: number;
|
|
89
|
-
tools?: string[];
|
|
90
|
-
[key: string]: any;
|
|
91
|
-
}): Promise<RunResult>;
|
|
92
203
|
}
|
|
93
204
|
|
|
94
|
-
export { Metorial
|
|
205
|
+
export { Metorial };
|