@roarkanalytics/sdk-mcp 2.22.0 → 2.23.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/auth.d.mts +6 -0
- package/auth.d.mts.map +1 -0
- package/auth.d.ts +6 -0
- package/auth.d.ts.map +1 -0
- package/{headers.mjs → auth.js} +18 -2
- package/auth.js.map +1 -0
- package/{headers.js → auth.mjs} +13 -6
- package/auth.mjs.map +1 -0
- package/code-tool.d.mts +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +11 -12
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +9 -10
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +9 -3
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +9 -3
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +6 -2
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +6 -2
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts +2 -2
- package/http.d.mts.map +1 -1
- package/http.d.ts +2 -2
- package/http.d.ts.map +1 -1
- package/http.js +9 -7
- package/http.js.map +1 -1
- package/http.mjs +9 -7
- package/http.mjs.map +1 -1
- package/instructions.d.mts +2 -0
- package/instructions.d.mts.map +1 -0
- package/instructions.d.ts +2 -0
- package/instructions.d.ts.map +1 -0
- package/instructions.js +55 -0
- package/instructions.js.map +1 -0
- package/instructions.mjs +52 -0
- package/instructions.mjs.map +1 -0
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +194 -25
- package/methods.js.map +1 -1
- package/methods.mjs +194 -25
- package/methods.mjs.map +1 -1
- package/options.d.mts +1 -0
- package/options.d.mts.map +1 -1
- package/options.d.ts +1 -0
- package/options.d.ts.map +1 -1
- package/options.js +8 -0
- package/options.js.map +1 -1
- package/options.mjs +8 -0
- package/options.mjs.map +1 -1
- package/package.json +32 -12
- package/server.d.mts +8 -9
- package/server.d.mts.map +1 -1
- package/server.d.ts +8 -9
- package/server.d.ts.map +1 -1
- package/server.js +15 -58
- package/server.js.map +1 -1
- package/server.mjs +14 -54
- package/server.mjs.map +1 -1
- package/src/{headers.ts → auth.ts} +16 -1
- package/src/code-tool.ts +22 -13
- package/src/docs-search-tool.ts +13 -4
- package/src/http.ts +16 -8
- package/src/instructions.ts +74 -0
- package/src/methods.ts +195 -25
- package/src/options.ts +11 -0
- package/src/server.ts +24 -74
- package/src/stdio.ts +2 -2
- package/src/types.ts +12 -4
- package/src/util.ts +25 -0
- package/stdio.js +2 -2
- package/stdio.js.map +1 -1
- package/stdio.mjs +2 -2
- package/stdio.mjs.map +1 -1
- package/types.d.mts +8 -1
- package/types.d.mts.map +1 -1
- package/types.d.ts +8 -1
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/types.mjs.map +1 -1
- package/util.d.mts +4 -0
- package/util.d.mts.map +1 -0
- package/util.d.ts +4 -0
- package/util.d.ts.map +1 -0
- package/util.js +30 -0
- package/util.js.map +1 -0
- package/util.mjs +24 -0
- package/util.mjs.map +1 -0
- package/headers.d.mts +0 -4
- package/headers.d.mts.map +0 -1
- package/headers.d.ts +0 -4
- package/headers.d.ts.map +0 -1
- package/headers.js.map +0 -1
- package/headers.mjs.map +0 -1
package/src/methods.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
1
3
|
import { McpOptions } from './options';
|
|
2
4
|
|
|
3
5
|
export type SdkMethod = {
|
|
@@ -14,6 +16,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
14
16
|
httpMethod: 'get',
|
|
15
17
|
httpPath: '/health',
|
|
16
18
|
},
|
|
19
|
+
{
|
|
20
|
+
clientCallName: 'client.evaluation.createEvaluator',
|
|
21
|
+
fullyQualifiedName: 'evaluation.createEvaluator',
|
|
22
|
+
httpMethod: 'post',
|
|
23
|
+
httpPath: '/v1/evaluation/evaluators',
|
|
24
|
+
},
|
|
17
25
|
{
|
|
18
26
|
clientCallName: 'client.evaluation.createJob',
|
|
19
27
|
fullyQualifiedName: 'evaluation.createJob',
|
|
@@ -44,6 +52,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
44
52
|
httpMethod: 'get',
|
|
45
53
|
httpPath: '/v1/evaluation/job/{jobId}/runs',
|
|
46
54
|
},
|
|
55
|
+
{
|
|
56
|
+
clientCallName: 'client.evaluation.updateEvaluator',
|
|
57
|
+
fullyQualifiedName: 'evaluation.updateEvaluator',
|
|
58
|
+
httpMethod: 'put',
|
|
59
|
+
httpPath: '/v1/evaluation/evaluators/{evaluatorId}',
|
|
60
|
+
},
|
|
47
61
|
{
|
|
48
62
|
clientCallName: 'client.call.create',
|
|
49
63
|
fullyQualifiedName: 'call.create',
|
|
@@ -62,6 +76,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
62
76
|
httpMethod: 'get',
|
|
63
77
|
httpPath: '/v1/call/{callId}',
|
|
64
78
|
},
|
|
79
|
+
{
|
|
80
|
+
clientCallName: 'client.call.getTranscript',
|
|
81
|
+
fullyQualifiedName: 'call.getTranscript',
|
|
82
|
+
httpMethod: 'get',
|
|
83
|
+
httpPath: '/v1/call/{callId}/transcript',
|
|
84
|
+
},
|
|
65
85
|
{
|
|
66
86
|
clientCallName: 'client.call.listEvaluationRuns',
|
|
67
87
|
fullyQualifiedName: 'call.listEvaluationRuns',
|
|
@@ -99,65 +119,215 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
99
119
|
httpPath: '/v1/vapi/call',
|
|
100
120
|
},
|
|
101
121
|
{
|
|
102
|
-
clientCallName: 'client.
|
|
103
|
-
fullyQualifiedName: '
|
|
122
|
+
clientCallName: 'client.simulationJob.getByID',
|
|
123
|
+
fullyQualifiedName: 'simulationJob.getByID',
|
|
104
124
|
httpMethod: 'get',
|
|
105
|
-
httpPath: '/v1/simulation/
|
|
125
|
+
httpPath: '/v1/simulation/job/{jobId}',
|
|
106
126
|
},
|
|
107
127
|
{
|
|
108
|
-
clientCallName: 'client.
|
|
109
|
-
fullyQualifiedName: '
|
|
128
|
+
clientCallName: 'client.simulationJob.lookup',
|
|
129
|
+
fullyQualifiedName: 'simulationJob.lookup',
|
|
110
130
|
httpMethod: 'get',
|
|
111
|
-
httpPath: '/v1/simulation/job/
|
|
131
|
+
httpPath: '/v1/simulation/job/lookup',
|
|
132
|
+
},
|
|
133
|
+
{
|
|
134
|
+
clientCallName: 'client.simulationRunPlan.create',
|
|
135
|
+
fullyQualifiedName: 'simulationRunPlan.create',
|
|
136
|
+
httpMethod: 'post',
|
|
137
|
+
httpPath: '/v1/simulation/plan',
|
|
138
|
+
},
|
|
139
|
+
{
|
|
140
|
+
clientCallName: 'client.simulationRunPlan.update',
|
|
141
|
+
fullyQualifiedName: 'simulationRunPlan.update',
|
|
142
|
+
httpMethod: 'put',
|
|
143
|
+
httpPath: '/v1/simulation/plan/{planId}',
|
|
112
144
|
},
|
|
113
145
|
{
|
|
114
|
-
clientCallName: 'client.
|
|
115
|
-
fullyQualifiedName: '
|
|
146
|
+
clientCallName: 'client.simulationRunPlan.list',
|
|
147
|
+
fullyQualifiedName: 'simulationRunPlan.list',
|
|
116
148
|
httpMethod: 'get',
|
|
117
|
-
httpPath: '/v1/simulation/plan
|
|
149
|
+
httpPath: '/v1/simulation/plan',
|
|
150
|
+
},
|
|
151
|
+
{
|
|
152
|
+
clientCallName: 'client.simulationRunPlan.delete',
|
|
153
|
+
fullyQualifiedName: 'simulationRunPlan.delete',
|
|
154
|
+
httpMethod: 'delete',
|
|
155
|
+
httpPath: '/v1/simulation/plan/{planId}',
|
|
118
156
|
},
|
|
119
157
|
{
|
|
120
|
-
clientCallName: 'client.
|
|
121
|
-
fullyQualifiedName: '
|
|
158
|
+
clientCallName: 'client.simulationRunPlan.getByID',
|
|
159
|
+
fullyQualifiedName: 'simulationRunPlan.getByID',
|
|
122
160
|
httpMethod: 'get',
|
|
123
|
-
httpPath: '/v1/simulation/
|
|
161
|
+
httpPath: '/v1/simulation/plan/{planId}',
|
|
124
162
|
},
|
|
125
163
|
{
|
|
126
|
-
clientCallName: 'client.
|
|
127
|
-
fullyQualifiedName: '
|
|
164
|
+
clientCallName: 'client.simulationRunPlanJob.list',
|
|
165
|
+
fullyQualifiedName: 'simulationRunPlanJob.list',
|
|
128
166
|
httpMethod: 'get',
|
|
129
|
-
httpPath: '/v1/simulation/
|
|
167
|
+
httpPath: '/v1/simulation/plan/jobs',
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
clientCallName: 'client.simulationRunPlanJob.getByID',
|
|
171
|
+
fullyQualifiedName: 'simulationRunPlanJob.getByID',
|
|
172
|
+
httpMethod: 'get',
|
|
173
|
+
httpPath: '/v1/simulation/plan/job/{jobId}',
|
|
130
174
|
},
|
|
131
175
|
{
|
|
132
|
-
clientCallName: 'client.
|
|
133
|
-
fullyQualifiedName: '
|
|
176
|
+
clientCallName: 'client.simulationRunPlanJob.start',
|
|
177
|
+
fullyQualifiedName: 'simulationRunPlanJob.start',
|
|
134
178
|
httpMethod: 'post',
|
|
135
179
|
httpPath: '/v1/simulation/plan/{planId}/job',
|
|
136
180
|
},
|
|
137
181
|
{
|
|
138
|
-
clientCallName: 'client.
|
|
139
|
-
fullyQualifiedName: '
|
|
182
|
+
clientCallName: 'client.simulationScenario.create',
|
|
183
|
+
fullyQualifiedName: 'simulationScenario.create',
|
|
184
|
+
httpMethod: 'post',
|
|
185
|
+
httpPath: '/v1/simulation/scenario',
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
clientCallName: 'client.simulationScenario.update',
|
|
189
|
+
fullyQualifiedName: 'simulationScenario.update',
|
|
190
|
+
httpMethod: 'put',
|
|
191
|
+
httpPath: '/v1/simulation/scenario/{scenarioId}',
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
clientCallName: 'client.simulationScenario.list',
|
|
195
|
+
fullyQualifiedName: 'simulationScenario.list',
|
|
196
|
+
httpMethod: 'get',
|
|
197
|
+
httpPath: '/v1/simulation/scenario',
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
clientCallName: 'client.simulationScenario.delete',
|
|
201
|
+
fullyQualifiedName: 'simulationScenario.delete',
|
|
202
|
+
httpMethod: 'delete',
|
|
203
|
+
httpPath: '/v1/simulation/scenario/{scenarioId}',
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
clientCallName: 'client.simulationScenario.getByID',
|
|
207
|
+
fullyQualifiedName: 'simulationScenario.getByID',
|
|
208
|
+
httpMethod: 'get',
|
|
209
|
+
httpPath: '/v1/simulation/scenario/{scenarioId}',
|
|
210
|
+
},
|
|
211
|
+
{
|
|
212
|
+
clientCallName: 'client.simulationPersona.create',
|
|
213
|
+
fullyQualifiedName: 'simulationPersona.create',
|
|
140
214
|
httpMethod: 'post',
|
|
141
215
|
httpPath: '/v1/persona',
|
|
142
216
|
},
|
|
143
217
|
{
|
|
144
|
-
clientCallName: 'client.
|
|
145
|
-
fullyQualifiedName: '
|
|
218
|
+
clientCallName: 'client.simulationPersona.update',
|
|
219
|
+
fullyQualifiedName: 'simulationPersona.update',
|
|
146
220
|
httpMethod: 'put',
|
|
147
221
|
httpPath: '/v1/persona/{personaId}',
|
|
148
222
|
},
|
|
149
223
|
{
|
|
150
|
-
clientCallName: 'client.
|
|
151
|
-
fullyQualifiedName: '
|
|
224
|
+
clientCallName: 'client.simulationPersona.list',
|
|
225
|
+
fullyQualifiedName: 'simulationPersona.list',
|
|
152
226
|
httpMethod: 'get',
|
|
153
227
|
httpPath: '/v1/persona',
|
|
154
228
|
},
|
|
155
229
|
{
|
|
156
|
-
clientCallName: 'client.
|
|
157
|
-
fullyQualifiedName: '
|
|
230
|
+
clientCallName: 'client.simulationPersona.getByID',
|
|
231
|
+
fullyQualifiedName: 'simulationPersona.getByID',
|
|
158
232
|
httpMethod: 'get',
|
|
159
233
|
httpPath: '/v1/persona/{personaId}',
|
|
160
234
|
},
|
|
235
|
+
{
|
|
236
|
+
clientCallName: 'client.agent.create',
|
|
237
|
+
fullyQualifiedName: 'agent.create',
|
|
238
|
+
httpMethod: 'post',
|
|
239
|
+
httpPath: '/v1/agent',
|
|
240
|
+
},
|
|
241
|
+
{
|
|
242
|
+
clientCallName: 'client.agent.update',
|
|
243
|
+
fullyQualifiedName: 'agent.update',
|
|
244
|
+
httpMethod: 'put',
|
|
245
|
+
httpPath: '/v1/agent/{agentId}',
|
|
246
|
+
},
|
|
247
|
+
{
|
|
248
|
+
clientCallName: 'client.agent.list',
|
|
249
|
+
fullyQualifiedName: 'agent.list',
|
|
250
|
+
httpMethod: 'get',
|
|
251
|
+
httpPath: '/v1/agent',
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
clientCallName: 'client.agent.getByID',
|
|
255
|
+
fullyQualifiedName: 'agent.getByID',
|
|
256
|
+
httpMethod: 'get',
|
|
257
|
+
httpPath: '/v1/agent/{agentId}',
|
|
258
|
+
},
|
|
259
|
+
{
|
|
260
|
+
clientCallName: 'client.agentEndpoint.create',
|
|
261
|
+
fullyQualifiedName: 'agentEndpoint.create',
|
|
262
|
+
httpMethod: 'post',
|
|
263
|
+
httpPath: '/v1/agent/endpoint',
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
clientCallName: 'client.agentEndpoint.update',
|
|
267
|
+
fullyQualifiedName: 'agentEndpoint.update',
|
|
268
|
+
httpMethod: 'put',
|
|
269
|
+
httpPath: '/v1/agent/endpoint/{endpointId}',
|
|
270
|
+
},
|
|
271
|
+
{
|
|
272
|
+
clientCallName: 'client.agentEndpoint.list',
|
|
273
|
+
fullyQualifiedName: 'agentEndpoint.list',
|
|
274
|
+
httpMethod: 'get',
|
|
275
|
+
httpPath: '/v1/agent/endpoint',
|
|
276
|
+
},
|
|
277
|
+
{
|
|
278
|
+
clientCallName: 'client.agentEndpoint.getByID',
|
|
279
|
+
fullyQualifiedName: 'agentEndpoint.getByID',
|
|
280
|
+
httpMethod: 'get',
|
|
281
|
+
httpPath: '/v1/agent/endpoint/{endpointId}',
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
clientCallName: 'client.httpRequestDefinition.create',
|
|
285
|
+
fullyQualifiedName: 'httpRequestDefinition.create',
|
|
286
|
+
httpMethod: 'post',
|
|
287
|
+
httpPath: '/v1/http-request-definition',
|
|
288
|
+
},
|
|
289
|
+
{
|
|
290
|
+
clientCallName: 'client.httpRequestDefinition.update',
|
|
291
|
+
fullyQualifiedName: 'httpRequestDefinition.update',
|
|
292
|
+
httpMethod: 'put',
|
|
293
|
+
httpPath: '/v1/http-request-definition/{definitionId}',
|
|
294
|
+
},
|
|
295
|
+
{
|
|
296
|
+
clientCallName: 'client.httpRequestDefinition.list',
|
|
297
|
+
fullyQualifiedName: 'httpRequestDefinition.list',
|
|
298
|
+
httpMethod: 'get',
|
|
299
|
+
httpPath: '/v1/http-request-definition',
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
clientCallName: 'client.httpRequestDefinition.getByID',
|
|
303
|
+
fullyQualifiedName: 'httpRequestDefinition.getByID',
|
|
304
|
+
httpMethod: 'get',
|
|
305
|
+
httpPath: '/v1/http-request-definition/{definitionId}',
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
clientCallName: 'client.webhook.create',
|
|
309
|
+
fullyQualifiedName: 'webhook.create',
|
|
310
|
+
httpMethod: 'post',
|
|
311
|
+
httpPath: '/v1/webhook',
|
|
312
|
+
},
|
|
313
|
+
{
|
|
314
|
+
clientCallName: 'client.webhook.list',
|
|
315
|
+
fullyQualifiedName: 'webhook.list',
|
|
316
|
+
httpMethod: 'get',
|
|
317
|
+
httpPath: '/v1/webhook',
|
|
318
|
+
},
|
|
319
|
+
{
|
|
320
|
+
clientCallName: 'client.webhook.delete',
|
|
321
|
+
fullyQualifiedName: 'webhook.delete',
|
|
322
|
+
httpMethod: 'delete',
|
|
323
|
+
httpPath: '/v1/webhook/{webhookId}',
|
|
324
|
+
},
|
|
325
|
+
{
|
|
326
|
+
clientCallName: 'client.webhook.getByID',
|
|
327
|
+
fullyQualifiedName: 'webhook.getByID',
|
|
328
|
+
httpMethod: 'get',
|
|
329
|
+
httpPath: '/v1/webhook/{webhookId}',
|
|
330
|
+
},
|
|
161
331
|
];
|
|
162
332
|
|
|
163
333
|
function allowedMethodsForCodeTool(options: McpOptions | undefined): SdkMethod[] | undefined {
|
package/src/options.ts
CHANGED
|
@@ -1,7 +1,10 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
1
3
|
import qs from 'qs';
|
|
2
4
|
import yargs from 'yargs';
|
|
3
5
|
import { hideBin } from 'yargs/helpers';
|
|
4
6
|
import z from 'zod';
|
|
7
|
+
import { readEnv } from './util';
|
|
5
8
|
|
|
6
9
|
export type CLIOptions = McpOptions & {
|
|
7
10
|
debug: boolean;
|
|
@@ -12,6 +15,7 @@ export type CLIOptions = McpOptions & {
|
|
|
12
15
|
|
|
13
16
|
export type McpOptions = {
|
|
14
17
|
includeDocsTools?: boolean | undefined;
|
|
18
|
+
stainlessApiKey?: string | undefined;
|
|
15
19
|
codeAllowHttpGets?: boolean | undefined;
|
|
16
20
|
codeAllowedMethods?: string[] | undefined;
|
|
17
21
|
codeBlockedMethods?: string[] | undefined;
|
|
@@ -49,6 +53,12 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
49
53
|
description: 'Port to serve on if using http transport',
|
|
50
54
|
})
|
|
51
55
|
.option('socket', { type: 'string', description: 'Unix socket to serve on if using http transport' })
|
|
56
|
+
.option('stainless-api-key', {
|
|
57
|
+
type: 'string',
|
|
58
|
+
default: readEnv('STAINLESS_API_KEY'),
|
|
59
|
+
description:
|
|
60
|
+
'API key for Stainless. Used to authenticate requests to Stainless-hosted tools endpoints.',
|
|
61
|
+
})
|
|
52
62
|
.option('tools', {
|
|
53
63
|
type: 'string',
|
|
54
64
|
array: true,
|
|
@@ -79,6 +89,7 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
79
89
|
return {
|
|
80
90
|
...(includeDocsTools !== undefined && { includeDocsTools }),
|
|
81
91
|
debug: !!argv.debug,
|
|
92
|
+
stainlessApiKey: argv.stainlessApiKey,
|
|
82
93
|
codeAllowHttpGets: argv.codeAllowHttpGets,
|
|
83
94
|
codeAllowedMethods: argv.codeAllowedMethods,
|
|
84
95
|
codeBlockedMethods: argv.codeBlockedMethods,
|
package/src/server.ts
CHANGED
|
@@ -11,57 +11,19 @@ import { ClientOptions } from '@roarkanalytics/sdk';
|
|
|
11
11
|
import Roark from '@roarkanalytics/sdk';
|
|
12
12
|
import { codeTool } from './code-tool';
|
|
13
13
|
import docsSearchTool from './docs-search-tool';
|
|
14
|
+
import { getInstructions } from './instructions';
|
|
14
15
|
import { McpOptions } from './options';
|
|
15
16
|
import { blockedMethodsForCodeTool } from './methods';
|
|
16
|
-
import { HandlerFunction, McpTool } from './types';
|
|
17
|
+
import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from './types';
|
|
17
18
|
|
|
18
|
-
export
|
|
19
|
-
export { ClientOptions } from '@roarkanalytics/sdk';
|
|
20
|
-
|
|
21
|
-
async function getInstructions() {
|
|
22
|
-
// This API key is optional; providing it allows the server to fetch instructions for unreleased versions.
|
|
23
|
-
const stainlessAPIKey = readEnv('STAINLESS_API_KEY');
|
|
24
|
-
const response = await fetch(
|
|
25
|
-
readEnv('CODE_MODE_INSTRUCTIONS_URL') ?? 'https://api.stainless.com/api/ai/instructions/roark-analytics',
|
|
26
|
-
{
|
|
27
|
-
method: 'GET',
|
|
28
|
-
headers: { ...(stainlessAPIKey && { Authorization: stainlessAPIKey }) },
|
|
29
|
-
},
|
|
30
|
-
);
|
|
31
|
-
|
|
32
|
-
let instructions: string | undefined;
|
|
33
|
-
if (!response.ok) {
|
|
34
|
-
console.warn(
|
|
35
|
-
'Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...',
|
|
36
|
-
);
|
|
37
|
-
|
|
38
|
-
instructions = `
|
|
39
|
-
This is the roark-analytics MCP server. You will use Code Mode to help the user perform
|
|
40
|
-
actions. You can use search_docs tool to learn about how to take action with this server. Then,
|
|
41
|
-
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
|
|
42
|
-
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
|
|
43
|
-
block: it can be as long as you need to get the job done!
|
|
44
|
-
`;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
instructions ??= ((await response.json()) as { instructions: string }).instructions;
|
|
48
|
-
instructions = `
|
|
49
|
-
The current time in Unix timestamps is ${Date.now()}.
|
|
50
|
-
|
|
51
|
-
${instructions}
|
|
52
|
-
`;
|
|
53
|
-
|
|
54
|
-
return instructions;
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
export const newMcpServer = async () =>
|
|
19
|
+
export const newMcpServer = async (stainlessApiKey: string | undefined) =>
|
|
58
20
|
new McpServer(
|
|
59
21
|
{
|
|
60
22
|
name: 'roarkanalytics_sdk_api',
|
|
61
|
-
version: '2.
|
|
23
|
+
version: '2.23.1',
|
|
62
24
|
},
|
|
63
25
|
{
|
|
64
|
-
instructions: await getInstructions(),
|
|
26
|
+
instructions: await getInstructions(stainlessApiKey),
|
|
65
27
|
capabilities: { tools: {}, logging: {} },
|
|
66
28
|
},
|
|
67
29
|
);
|
|
@@ -74,6 +36,7 @@ export async function initMcpServer(params: {
|
|
|
74
36
|
server: Server | McpServer;
|
|
75
37
|
clientOptions?: ClientOptions;
|
|
76
38
|
mcpOptions?: McpOptions;
|
|
39
|
+
stainlessApiKey?: string | undefined;
|
|
77
40
|
}) {
|
|
78
41
|
const server = params.server instanceof McpServer ? params.server.server : params.server;
|
|
79
42
|
|
|
@@ -117,7 +80,14 @@ export async function initMcpServer(params: {
|
|
|
117
80
|
throw new Error(`Unknown tool: ${name}`);
|
|
118
81
|
}
|
|
119
82
|
|
|
120
|
-
return executeHandler(
|
|
83
|
+
return executeHandler({
|
|
84
|
+
handler: mcpTool.handler,
|
|
85
|
+
reqContext: {
|
|
86
|
+
client,
|
|
87
|
+
stainlessApiKey: params.stainlessApiKey ?? params.mcpOptions?.stainlessApiKey,
|
|
88
|
+
},
|
|
89
|
+
args,
|
|
90
|
+
});
|
|
121
91
|
});
|
|
122
92
|
|
|
123
93
|
server.setRequestHandler(SetLevelRequestSchema, async (request) => {
|
|
@@ -162,34 +132,14 @@ export function selectTools(options?: McpOptions): McpTool[] {
|
|
|
162
132
|
/**
|
|
163
133
|
* Runs the provided handler with the given client and arguments.
|
|
164
134
|
*/
|
|
165
|
-
export async function executeHandler(
|
|
166
|
-
handler
|
|
167
|
-
|
|
168
|
-
args
|
|
169
|
-
|
|
170
|
-
|
|
135
|
+
export async function executeHandler({
|
|
136
|
+
handler,
|
|
137
|
+
reqContext,
|
|
138
|
+
args,
|
|
139
|
+
}: {
|
|
140
|
+
handler: HandlerFunction;
|
|
141
|
+
reqContext: McpRequestContext;
|
|
142
|
+
args: Record<string, unknown> | undefined;
|
|
143
|
+
}): Promise<ToolCallResult> {
|
|
144
|
+
return await handler({ reqContext, args: args || {} });
|
|
171
145
|
}
|
|
172
|
-
|
|
173
|
-
export const readEnv = (env: string): string | undefined => {
|
|
174
|
-
if (typeof (globalThis as any).process !== 'undefined') {
|
|
175
|
-
return (globalThis as any).process.env?.[env]?.trim();
|
|
176
|
-
} else if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
177
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
178
|
-
}
|
|
179
|
-
return;
|
|
180
|
-
};
|
|
181
|
-
|
|
182
|
-
export const readEnvOrError = (env: string): string => {
|
|
183
|
-
let envValue = readEnv(env);
|
|
184
|
-
if (envValue === undefined) {
|
|
185
|
-
throw new Error(`Environment variable ${env} is not set`);
|
|
186
|
-
}
|
|
187
|
-
return envValue;
|
|
188
|
-
};
|
|
189
|
-
|
|
190
|
-
export const requireValue = <T>(value: T | undefined, description: string): T => {
|
|
191
|
-
if (value === undefined) {
|
|
192
|
-
throw new Error(`Missing required value: ${description}`);
|
|
193
|
-
}
|
|
194
|
-
return value;
|
|
195
|
-
};
|
package/src/stdio.ts
CHANGED
|
@@ -3,9 +3,9 @@ import { McpOptions } from './options';
|
|
|
3
3
|
import { initMcpServer, newMcpServer } from './server';
|
|
4
4
|
|
|
5
5
|
export const launchStdioServer = async (mcpOptions: McpOptions) => {
|
|
6
|
-
const server = await newMcpServer();
|
|
6
|
+
const server = await newMcpServer(mcpOptions.stainlessApiKey);
|
|
7
7
|
|
|
8
|
-
await initMcpServer({ server, mcpOptions });
|
|
8
|
+
await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
9
9
|
|
|
10
10
|
const transport = new StdioServerTransport();
|
|
11
11
|
await server.connect(transport);
|
package/src/types.ts
CHANGED
|
@@ -42,10 +42,18 @@ export type ToolCallResult = {
|
|
|
42
42
|
isError?: boolean;
|
|
43
43
|
};
|
|
44
44
|
|
|
45
|
-
export type
|
|
46
|
-
client: Roark
|
|
47
|
-
|
|
48
|
-
|
|
45
|
+
export type McpRequestContext = {
|
|
46
|
+
client: Roark;
|
|
47
|
+
stainlessApiKey?: string | undefined;
|
|
48
|
+
};
|
|
49
|
+
|
|
50
|
+
export type HandlerFunction = ({
|
|
51
|
+
reqContext,
|
|
52
|
+
args,
|
|
53
|
+
}: {
|
|
54
|
+
reqContext: McpRequestContext;
|
|
55
|
+
args: Record<string, unknown> | undefined;
|
|
56
|
+
}) => Promise<ToolCallResult>;
|
|
49
57
|
|
|
50
58
|
export function asTextContentResult(result: unknown): ToolCallResult {
|
|
51
59
|
return {
|
package/src/util.ts
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
export const readEnv = (env: string): string | undefined => {
|
|
4
|
+
if (typeof (globalThis as any).process !== 'undefined') {
|
|
5
|
+
return (globalThis as any).process.env?.[env]?.trim();
|
|
6
|
+
} else if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
7
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
8
|
+
}
|
|
9
|
+
return;
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export const readEnvOrError = (env: string): string => {
|
|
13
|
+
let envValue = readEnv(env);
|
|
14
|
+
if (envValue === undefined) {
|
|
15
|
+
throw new Error(`Environment variable ${env} is not set`);
|
|
16
|
+
}
|
|
17
|
+
return envValue;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
export const requireValue = <T>(value: T | undefined, description: string): T => {
|
|
21
|
+
if (value === undefined) {
|
|
22
|
+
throw new Error(`Missing required value: ${description}`);
|
|
23
|
+
}
|
|
24
|
+
return value;
|
|
25
|
+
};
|
package/stdio.js
CHANGED
|
@@ -4,8 +4,8 @@ exports.launchStdioServer = void 0;
|
|
|
4
4
|
const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
5
5
|
const server_1 = require("./server.js");
|
|
6
6
|
const launchStdioServer = async (mcpOptions) => {
|
|
7
|
-
const server = await (0, server_1.newMcpServer)();
|
|
8
|
-
await (0, server_1.initMcpServer)({ server, mcpOptions });
|
|
7
|
+
const server = await (0, server_1.newMcpServer)(mcpOptions.stainlessApiKey);
|
|
8
|
+
await (0, server_1.initMcpServer)({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
9
9
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
10
10
|
await server.connect(transport);
|
|
11
11
|
console.error('MCP Server running on stdio');
|
package/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AAEhD,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,EAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAE9D,MAAM,IAAA,sBAAa,EAAC,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAEzF,MAAM,SAAS,GAAG,IAAI,+BAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC;AARW,QAAA,iBAAiB,qBAQ5B"}
|
package/stdio.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
2
2
|
import { initMcpServer, newMcpServer } from "./server.mjs";
|
|
3
3
|
export const launchStdioServer = async (mcpOptions) => {
|
|
4
|
-
const server = await newMcpServer();
|
|
5
|
-
await initMcpServer({ server, mcpOptions });
|
|
4
|
+
const server = await newMcpServer(mcpOptions.stainlessApiKey);
|
|
5
|
+
await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
6
6
|
const transport = new StdioServerTransport();
|
|
7
7
|
await server.connect(transport);
|
|
8
8
|
console.error('MCP Server running on stdio');
|
package/stdio.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C;OAEzE,EAAE,aAAa,EAAE,YAAY,EAAE;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C;OAEzE,EAAE,aAAa,EAAE,YAAY,EAAE;AAEtC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC,UAAU,CAAC,eAAe,CAAC,CAAC;IAE9D,MAAM,aAAa,CAAC,EAAE,MAAM,EAAE,UAAU,EAAE,eAAe,EAAE,UAAU,CAAC,eAAe,EAAE,CAAC,CAAC;IAEzF,MAAM,SAAS,GAAG,IAAI,oBAAoB,EAAE,CAAC;IAC7C,MAAM,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,OAAO,CAAC,KAAK,CAAC,6BAA6B,CAAC,CAAC;AAC/C,CAAC,CAAC"}
|
package/types.d.mts
CHANGED
|
@@ -31,7 +31,14 @@ export type ToolCallResult = {
|
|
|
31
31
|
content: ContentBlock[];
|
|
32
32
|
isError?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type McpRequestContext = {
|
|
35
|
+
client: Roark;
|
|
36
|
+
stainlessApiKey?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
export type HandlerFunction = ({ reqContext, args, }: {
|
|
39
|
+
reqContext: McpRequestContext;
|
|
40
|
+
args: Record<string, unknown> | undefined;
|
|
41
|
+
}) => Promise<ToolCallResult>;
|
|
35
42
|
export declare function asTextContentResult(result: unknown): ToolCallResult;
|
|
36
43
|
export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
|
|
37
44
|
export declare function asErrorResult(message: string): ToolCallResult;
|
package/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM,qBAAqB;OAChC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;CACd,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,iBAAiB,GAAG;IACvB,IAAI,EAAE,OAAO,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;AAEF,KAAK,oBAAoB,GAAG;IAC1B,IAAI,EAAE,UAAU,CAAC;IACjB,QAAQ,EACJ;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,GACD;QACE,GAAG,EAAE,MAAM,CAAC;QACZ,QAAQ,EAAE,MAAM,CAAC;QACjB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACP,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,gBAAgB,GAAG,iBAAiB,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AAE3G,MAAM,MAAM,cAAc,GAAG;IAC3B,OAAO,EAAE,YAAY,EAAE,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM,qBAAqB;OAChC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAA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AO,CAAC,cAAc,CAAC,CA2BvF;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,MAAM,GAAG,cAAc,CAU7D;AAED,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC;IAC5B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
package/types.d.ts
CHANGED
|
@@ -31,7 +31,14 @@ export type ToolCallResult = {
|
|
|
31
31
|
content: ContentBlock[];
|
|
32
32
|
isError?: boolean;
|
|
33
33
|
};
|
|
34
|
-
export type
|
|
34
|
+
export type McpRequestContext = {
|
|
35
|
+
client: Roark;
|
|
36
|
+
stainlessApiKey?: string | undefined;
|
|
37
|
+
};
|
|
38
|
+
export type HandlerFunction = ({ reqContext, args, }: {
|
|
39
|
+
reqContext: McpRequestContext;
|
|
40
|
+
args: Record<string, unknown> | undefined;
|
|
41
|
+
}) => Promise<ToolCallResult>;
|
|
35
42
|
export declare function asTextContentResult(result: unknown): ToolCallResult;
|
|
36
43
|
export declare function asBinaryContentResult(response: Response): Promise<ToolCallResult>;
|
|
37
44
|
export declare function asErrorResult(message: string): ToolCallResult;
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"OAEO,KAAK,MAAM,qBAAqB;OAChC,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,KAAK,gBAAgB,GAAG;IACtB,IAAI,EAAE,MAAM,CAAC;IAC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B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,MAAM,MAAM,OAAO,GAAG;IACpB,QAAQ,EAAE,QAAQ,CAAC;IACnB,IAAI,EAAE,IAAI,CAAC;IACX,OAAO,EAAE,eAAe,CAAC;CAC1B,CAAC"}
|
package/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AAyDtF,kDASC;AAED,sDA2BC;AAED,sCAUC;AAlDD,SAAgB,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAEM,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtE,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE;wBACR,uEAAuE;wBACvE,GAAG,EAAE,0BAA0B;wBAC/B,QAAQ;wBACR,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/types.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"types.mjs","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAyDtF,MAAM,UAAU,mBAAmB,CAAC,MAAe;IACjD,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,IAAI,EAAE,CAAC,CAAC;aACtC;SACF;KACF,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,KAAK,UAAU,qBAAqB,CAAC,QAAkB;IAC5D,MAAM,IAAI,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IACnC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC;IAC3B,MAAM,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC,MAAM,IAAI,CAAC,WAAW,EAAE,CAAC,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;IACtE,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QAClC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,IAAI,QAAQ,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,CAAC;QACzC,OAAO;YACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;SAC7C,CAAC;IACJ,CAAC;SAAM,CAAC;QACN,OAAO;YACL,OAAO,EAAE;gBACP;oBACE,IAAI,EAAE,UAAU;oBAChB,QAAQ,EAAE;wBACR,uEAAuE;wBACvE,GAAG,EAAE,0BAA0B;wBAC/B,QAAQ;wBACR,IAAI,EAAE,IAAI;qBACX;iBACF;aACF;SACF,CAAC;IACJ,CAAC;AACH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,OAAe;IAC3C,OAAO;QACL,OAAO,EAAE;YACP;gBACE,IAAI,EAAE,MAAM;gBACZ,IAAI,EAAE,OAAO;aACd;SACF;QACD,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
package/util.d.mts
ADDED
package/util.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.mts","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAO9C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,aAAa,MAAM,KAAG,CAK3E,CAAC"}
|
package/util.d.ts
ADDED
package/util.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"util.d.ts","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,OAAO,GAAI,KAAK,MAAM,KAAG,MAAM,GAAG,SAO9C,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,KAAK,MAAM,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,EAAE,OAAO,CAAC,GAAG,SAAS,EAAE,aAAa,MAAM,KAAG,CAK3E,CAAC"}
|