@codeqr/ts-mcp 0.19.3 → 0.24.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/auth.d.mts.map +1 -1
- package/auth.d.ts.map +1 -1
- package/code-tool-types.d.mts.map +1 -1
- package/code-tool-types.d.ts.map +1 -1
- package/code-tool-worker.d.mts.map +1 -1
- package/code-tool-worker.d.ts.map +1 -1
- package/code-tool-worker.js +45 -3
- package/code-tool-worker.js.map +1 -1
- package/code-tool-worker.mjs +12 -3
- package/code-tool-worker.mjs.map +1 -1
- package/code-tool.d.mts.map +1 -1
- package/code-tool.d.ts.map +1 -1
- package/code-tool.js +6 -57
- package/code-tool.js.map +1 -1
- package/code-tool.mjs +7 -58
- package/code-tool.mjs.map +1 -1
- package/docs-search-tool.d.mts +4 -2
- package/docs-search-tool.d.mts.map +1 -1
- package/docs-search-tool.d.ts +4 -2
- package/docs-search-tool.d.ts.map +1 -1
- package/docs-search-tool.js +21 -31
- package/docs-search-tool.js.map +1 -1
- package/docs-search-tool.mjs +20 -31
- package/docs-search-tool.mjs.map +1 -1
- package/http.d.mts.map +1 -1
- package/http.d.ts.map +1 -1
- package/http.js +24 -1
- package/http.js.map +1 -1
- package/http.mjs +24 -1
- package/http.mjs.map +1 -1
- package/index.mjs.map +1 -1
- package/instructions.d.mts +4 -1
- package/instructions.d.mts.map +1 -1
- package/instructions.d.ts +4 -1
- package/instructions.d.ts.map +1 -1
- package/instructions.js +21 -18
- package/instructions.js.map +1 -1
- package/instructions.mjs +18 -18
- package/instructions.mjs.map +1 -1
- package/local-docs-search.d.mts +28 -0
- package/local-docs-search.d.mts.map +1 -0
- package/local-docs-search.d.ts +28 -0
- package/local-docs-search.d.ts.map +1 -0
- package/local-docs-search.js +1259 -0
- package/local-docs-search.js.map +1 -0
- package/local-docs-search.mjs +1219 -0
- package/local-docs-search.mjs.map +1 -0
- package/logger.d.mts.map +1 -1
- package/logger.d.ts.map +1 -1
- package/logger.mjs.map +1 -1
- package/methods.d.mts.map +1 -1
- package/methods.d.ts.map +1 -1
- package/methods.js +30 -30
- package/methods.js.map +1 -1
- package/methods.mjs +30 -30
- package/methods.mjs.map +1 -1
- package/options.d.mts +4 -1
- package/options.d.mts.map +1 -1
- package/options.d.ts +4 -1
- package/options.d.ts.map +1 -1
- package/options.js +22 -3
- package/options.js.map +1 -1
- package/options.mjs +22 -3
- package/options.mjs.map +1 -1
- package/package.json +13 -2
- package/server.d.mts +9 -1
- package/server.d.mts.map +1 -1
- package/server.d.ts +9 -1
- package/server.d.ts.map +1 -1
- package/server.js +13 -4
- package/server.js.map +1 -1
- package/server.mjs +13 -4
- package/server.mjs.map +1 -1
- package/src/code-tool-worker.ts +12 -3
- package/src/code-tool.ts +11 -92
- package/src/docs-search-tool.ts +26 -47
- package/src/http.ts +27 -1
- package/src/instructions.ts +24 -27
- package/src/local-docs-search.ts +1368 -0
- package/src/methods.ts +30 -30
- package/src/options.ts +28 -4
- package/src/server.ts +22 -4
- package/src/stdio.ts +4 -1
- package/src/types.ts +2 -0
- package/src/util.ts +2 -2
- package/stdio.d.mts.map +1 -1
- package/stdio.d.ts.map +1 -1
- package/stdio.js +4 -1
- package/stdio.js.map +1 -1
- package/stdio.mjs +4 -1
- package/stdio.mjs.map +1 -1
- package/types.d.mts +5 -0
- package/types.d.mts.map +1 -1
- package/types.d.ts +5 -0
- package/types.d.ts.map +1 -1
- package/types.js.map +1 -1
- package/types.mjs.map +1 -1
- package/util.js +2 -2
- package/util.js.map +1 -1
- package/util.mjs +2 -2
- package/util.mjs.map +1 -1
package/src/methods.ts
CHANGED
|
@@ -16,30 +16,30 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
16
16
|
httpMethod: 'post',
|
|
17
17
|
httpPath: '/links',
|
|
18
18
|
},
|
|
19
|
-
{
|
|
20
|
-
clientCallName: 'client.links.update',
|
|
21
|
-
fullyQualifiedName: 'links.update',
|
|
22
|
-
httpMethod: 'put',
|
|
23
|
-
httpPath: '/links/{linkId}',
|
|
24
|
-
},
|
|
25
19
|
{
|
|
26
20
|
clientCallName: 'client.links.list',
|
|
27
21
|
fullyQualifiedName: 'links.list',
|
|
28
22
|
httpMethod: 'get',
|
|
29
23
|
httpPath: '/links',
|
|
30
24
|
},
|
|
31
|
-
{
|
|
32
|
-
clientCallName: 'client.links.delete',
|
|
33
|
-
fullyQualifiedName: 'links.delete',
|
|
34
|
-
httpMethod: 'delete',
|
|
35
|
-
httpPath: '/links/{linkId}',
|
|
36
|
-
},
|
|
37
25
|
{
|
|
38
26
|
clientCallName: 'client.links.retrieveInfo',
|
|
39
27
|
fullyQualifiedName: 'links.retrieveInfo',
|
|
40
28
|
httpMethod: 'get',
|
|
41
29
|
httpPath: '/links/info',
|
|
42
30
|
},
|
|
31
|
+
{
|
|
32
|
+
clientCallName: 'client.links.update',
|
|
33
|
+
fullyQualifiedName: 'links.update',
|
|
34
|
+
httpMethod: 'put',
|
|
35
|
+
httpPath: '/links/{linkId}',
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
clientCallName: 'client.links.delete',
|
|
39
|
+
fullyQualifiedName: 'links.delete',
|
|
40
|
+
httpMethod: 'delete',
|
|
41
|
+
httpPath: '/links/{linkId}',
|
|
42
|
+
},
|
|
43
43
|
{
|
|
44
44
|
clientCallName: 'client.links.bulk.create',
|
|
45
45
|
fullyQualifiedName: 'links.bulk.create',
|
|
@@ -52,6 +52,12 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
52
52
|
httpMethod: 'post',
|
|
53
53
|
httpPath: '/qrcodes',
|
|
54
54
|
},
|
|
55
|
+
{
|
|
56
|
+
clientCallName: 'client.qrcodes.list',
|
|
57
|
+
fullyQualifiedName: 'qrcodes.list',
|
|
58
|
+
httpMethod: 'get',
|
|
59
|
+
httpPath: '/qrcodes',
|
|
60
|
+
},
|
|
55
61
|
{
|
|
56
62
|
clientCallName: 'client.qrcodes.retrieve',
|
|
57
63
|
fullyQualifiedName: 'qrcodes.retrieve',
|
|
@@ -64,12 +70,6 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
64
70
|
httpMethod: 'put',
|
|
65
71
|
httpPath: '/qrcodes/{qrcodeId}',
|
|
66
72
|
},
|
|
67
|
-
{
|
|
68
|
-
clientCallName: 'client.qrcodes.list',
|
|
69
|
-
fullyQualifiedName: 'qrcodes.list',
|
|
70
|
-
httpMethod: 'get',
|
|
71
|
-
httpPath: '/qrcodes',
|
|
72
|
-
},
|
|
73
73
|
{
|
|
74
74
|
clientCallName: 'client.qrcodes.delete',
|
|
75
75
|
fullyQualifiedName: 'qrcodes.delete',
|
|
@@ -100,18 +100,18 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
100
100
|
httpMethod: 'post',
|
|
101
101
|
httpPath: '/tags',
|
|
102
102
|
},
|
|
103
|
-
{
|
|
104
|
-
clientCallName: 'client.tags.update',
|
|
105
|
-
fullyQualifiedName: 'tags.update',
|
|
106
|
-
httpMethod: 'put',
|
|
107
|
-
httpPath: '/tags/{id}',
|
|
108
|
-
},
|
|
109
103
|
{
|
|
110
104
|
clientCallName: 'client.tags.list',
|
|
111
105
|
fullyQualifiedName: 'tags.list',
|
|
112
106
|
httpMethod: 'get',
|
|
113
107
|
httpPath: '/tags',
|
|
114
108
|
},
|
|
109
|
+
{
|
|
110
|
+
clientCallName: 'client.tags.update',
|
|
111
|
+
fullyQualifiedName: 'tags.update',
|
|
112
|
+
httpMethod: 'put',
|
|
113
|
+
httpPath: '/tags/{id}',
|
|
114
|
+
},
|
|
115
115
|
{
|
|
116
116
|
clientCallName: 'client.tags.delete',
|
|
117
117
|
fullyQualifiedName: 'tags.delete',
|
|
@@ -124,18 +124,18 @@ export const sdkMethods: SdkMethod[] = [
|
|
|
124
124
|
httpMethod: 'post',
|
|
125
125
|
httpPath: '/domains',
|
|
126
126
|
},
|
|
127
|
-
{
|
|
128
|
-
clientCallName: 'client.domains.update',
|
|
129
|
-
fullyQualifiedName: 'domains.update',
|
|
130
|
-
httpMethod: 'patch',
|
|
131
|
-
httpPath: '/domains/{slug}',
|
|
132
|
-
},
|
|
133
127
|
{
|
|
134
128
|
clientCallName: 'client.domains.list',
|
|
135
129
|
fullyQualifiedName: 'domains.list',
|
|
136
130
|
httpMethod: 'get',
|
|
137
131
|
httpPath: '/domains',
|
|
138
132
|
},
|
|
133
|
+
{
|
|
134
|
+
clientCallName: 'client.domains.update',
|
|
135
|
+
fullyQualifiedName: 'domains.update',
|
|
136
|
+
httpMethod: 'patch',
|
|
137
|
+
httpPath: '/domains/{slug}',
|
|
138
|
+
},
|
|
139
139
|
{
|
|
140
140
|
clientCallName: 'client.domains.delete',
|
|
141
141
|
fullyQualifiedName: 'domains.delete',
|
package/src/options.ts
CHANGED
|
@@ -18,13 +18,16 @@ export type McpOptions = {
|
|
|
18
18
|
includeCodeTool?: boolean | undefined;
|
|
19
19
|
includeDocsTools?: boolean | undefined;
|
|
20
20
|
stainlessApiKey?: string | undefined;
|
|
21
|
+
docsSearchMode?: 'local' | undefined;
|
|
22
|
+
docsDir?: string | undefined;
|
|
21
23
|
codeAllowHttpGets?: boolean | undefined;
|
|
22
24
|
codeAllowedMethods?: string[] | undefined;
|
|
23
25
|
codeBlockedMethods?: string[] | undefined;
|
|
24
26
|
codeExecutionMode: McpCodeExecutionMode;
|
|
27
|
+
customInstructionsPath?: string | undefined;
|
|
25
28
|
};
|
|
26
29
|
|
|
27
|
-
export type McpCodeExecutionMode = '
|
|
30
|
+
export type McpCodeExecutionMode = 'local';
|
|
28
31
|
|
|
29
32
|
export function parseCLIOptions(): CLIOptions {
|
|
30
33
|
const opts = yargs(hideBin(process.argv))
|
|
@@ -47,12 +50,28 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
47
50
|
})
|
|
48
51
|
.option('code-execution-mode', {
|
|
49
52
|
type: 'string',
|
|
50
|
-
choices: ['
|
|
51
|
-
default: '
|
|
53
|
+
choices: ['local'],
|
|
54
|
+
default: 'local',
|
|
52
55
|
description:
|
|
53
|
-
|
|
56
|
+
'The server was generated without access to the Stainless API, so code execution can only run locally on the MCP server machine.',
|
|
57
|
+
})
|
|
58
|
+
.option('custom-instructions-path', {
|
|
59
|
+
type: 'string',
|
|
60
|
+
description: 'Path to custom instructions for the MCP server',
|
|
54
61
|
})
|
|
55
62
|
.option('debug', { type: 'boolean', description: 'Enable debug logging' })
|
|
63
|
+
.option('docs-dir', {
|
|
64
|
+
type: 'string',
|
|
65
|
+
description:
|
|
66
|
+
'Path to a directory of local documentation files (markdown/JSON) to include in local docs search.',
|
|
67
|
+
})
|
|
68
|
+
.option('docs-search-mode', {
|
|
69
|
+
type: 'string',
|
|
70
|
+
choices: ['local'],
|
|
71
|
+
default: 'local',
|
|
72
|
+
description:
|
|
73
|
+
"Documentation search will use an in-memory search index built from embedded SDK method data and optional local docs files; the 'stainless-api' option is unavailable.",
|
|
74
|
+
})
|
|
56
75
|
.option('log-format', {
|
|
57
76
|
type: 'string',
|
|
58
77
|
choices: ['json', 'pretty'],
|
|
@@ -113,10 +132,13 @@ export function parseCLIOptions(): CLIOptions {
|
|
|
113
132
|
...(includeDocsTools !== undefined && { includeDocsTools }),
|
|
114
133
|
debug: !!argv.debug,
|
|
115
134
|
stainlessApiKey: argv.stainlessApiKey,
|
|
135
|
+
docsSearchMode: argv.docsSearchMode as 'local' | undefined,
|
|
136
|
+
docsDir: argv.docsDir,
|
|
116
137
|
codeAllowHttpGets: argv.codeAllowHttpGets,
|
|
117
138
|
codeAllowedMethods: argv.codeAllowedMethods,
|
|
118
139
|
codeBlockedMethods: argv.codeBlockedMethods,
|
|
119
140
|
codeExecutionMode: argv.codeExecutionMode as McpCodeExecutionMode,
|
|
141
|
+
customInstructionsPath: argv.customInstructionsPath,
|
|
120
142
|
transport,
|
|
121
143
|
logFormat,
|
|
122
144
|
port: argv.port,
|
|
@@ -157,5 +179,7 @@ export function parseQueryOptions(defaultOptions: McpOptions, query: unknown): M
|
|
|
157
179
|
...(codeTool !== undefined && { includeCodeTool: codeTool }),
|
|
158
180
|
...(docsTools !== undefined && { includeDocsTools: docsTools }),
|
|
159
181
|
codeExecutionMode: defaultOptions.codeExecutionMode,
|
|
182
|
+
docsSearchMode: defaultOptions.docsSearchMode,
|
|
183
|
+
docsDir: defaultOptions.docsDir,
|
|
160
184
|
};
|
|
161
185
|
}
|
package/src/server.ts
CHANGED
|
@@ -11,19 +11,27 @@ import { ClientOptions } from '@codeqr/ts';
|
|
|
11
11
|
import Codeqr from '@codeqr/ts';
|
|
12
12
|
import { codeTool } from './code-tool';
|
|
13
13
|
import docsSearchTool from './docs-search-tool';
|
|
14
|
+
import { setLocalSearch } from './docs-search-tool';
|
|
15
|
+
import { LocalDocsSearch } from './local-docs-search';
|
|
14
16
|
import { getInstructions } from './instructions';
|
|
15
17
|
import { McpOptions } from './options';
|
|
16
18
|
import { blockedMethodsForCodeTool } from './methods';
|
|
17
19
|
import { HandlerFunction, McpRequestContext, ToolCallResult, McpTool } from './types';
|
|
18
20
|
|
|
19
|
-
export const newMcpServer = async (
|
|
21
|
+
export const newMcpServer = async ({
|
|
22
|
+
stainlessApiKey,
|
|
23
|
+
customInstructionsPath,
|
|
24
|
+
}: {
|
|
25
|
+
stainlessApiKey?: string | undefined;
|
|
26
|
+
customInstructionsPath?: string | undefined;
|
|
27
|
+
}) =>
|
|
20
28
|
new McpServer(
|
|
21
29
|
{
|
|
22
30
|
name: 'codeqr_ts_api',
|
|
23
|
-
version: '0.
|
|
31
|
+
version: '0.24.0', // x-release-please-version
|
|
24
32
|
},
|
|
25
33
|
{
|
|
26
|
-
instructions: await getInstructions(stainlessApiKey),
|
|
34
|
+
instructions: await getInstructions({ stainlessApiKey, customInstructionsPath }),
|
|
27
35
|
capabilities: { tools: {}, logging: {} },
|
|
28
36
|
},
|
|
29
37
|
);
|
|
@@ -38,6 +46,8 @@ export async function initMcpServer(params: {
|
|
|
38
46
|
mcpOptions?: McpOptions;
|
|
39
47
|
stainlessApiKey?: string | undefined;
|
|
40
48
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
49
|
+
mcpSessionId?: string | undefined;
|
|
50
|
+
mcpClientInfo?: { name: string; version: string } | undefined;
|
|
41
51
|
}) {
|
|
42
52
|
const server = params.server instanceof McpServer ? params.server.server : params.server;
|
|
43
53
|
|
|
@@ -56,6 +66,12 @@ export async function initMcpServer(params: {
|
|
|
56
66
|
error: logAtLevel('error'),
|
|
57
67
|
};
|
|
58
68
|
|
|
69
|
+
if (params.mcpOptions?.docsSearchMode === 'local') {
|
|
70
|
+
const docsDir = params.mcpOptions?.docsDir;
|
|
71
|
+
const localSearch = await LocalDocsSearch.create(docsDir ? { docsDir } : undefined);
|
|
72
|
+
setLocalSearch(localSearch);
|
|
73
|
+
}
|
|
74
|
+
|
|
59
75
|
let _client: Codeqr | undefined;
|
|
60
76
|
let _clientError: Error | undefined;
|
|
61
77
|
let _logLevel: 'debug' | 'info' | 'warn' | 'error' | 'off' | undefined;
|
|
@@ -120,6 +136,8 @@ export async function initMcpServer(params: {
|
|
|
120
136
|
client,
|
|
121
137
|
stainlessApiKey: params.stainlessApiKey ?? params.mcpOptions?.stainlessApiKey,
|
|
122
138
|
upstreamClientEnvs: params.upstreamClientEnvs,
|
|
139
|
+
mcpSessionId: params.mcpSessionId,
|
|
140
|
+
mcpClientInfo: params.mcpClientInfo,
|
|
123
141
|
},
|
|
124
142
|
args,
|
|
125
143
|
});
|
|
@@ -164,7 +182,7 @@ export function selectTools(options?: McpOptions): McpTool[] {
|
|
|
164
182
|
includedTools.push(
|
|
165
183
|
codeTool({
|
|
166
184
|
blockedMethods: blockedMethodsForCodeTool(options),
|
|
167
|
-
codeExecutionMode: options?.codeExecutionMode ?? '
|
|
185
|
+
codeExecutionMode: options?.codeExecutionMode ?? 'local',
|
|
168
186
|
}),
|
|
169
187
|
);
|
|
170
188
|
}
|
package/src/stdio.ts
CHANGED
|
@@ -4,7 +4,10 @@ import { initMcpServer, newMcpServer } from './server';
|
|
|
4
4
|
import { getLogger } from './logger';
|
|
5
5
|
|
|
6
6
|
export const launchStdioServer = async (mcpOptions: McpOptions) => {
|
|
7
|
-
const server = await newMcpServer(
|
|
7
|
+
const server = await newMcpServer({
|
|
8
|
+
stainlessApiKey: mcpOptions.stainlessApiKey,
|
|
9
|
+
customInstructionsPath: mcpOptions.customInstructionsPath,
|
|
10
|
+
});
|
|
8
11
|
|
|
9
12
|
await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
10
13
|
|
package/src/types.ts
CHANGED
|
@@ -46,6 +46,8 @@ export type McpRequestContext = {
|
|
|
46
46
|
client: Codeqr;
|
|
47
47
|
stainlessApiKey?: string | undefined;
|
|
48
48
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
49
|
+
mcpSessionId?: string | undefined;
|
|
50
|
+
mcpClientInfo?: { name: string; version: string } | undefined;
|
|
49
51
|
};
|
|
50
52
|
|
|
51
53
|
export type HandlerFunction = ({
|
package/src/util.ts
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
export const readEnv = (env: string): string | undefined => {
|
|
4
4
|
if (typeof (globalThis as any).process !== 'undefined') {
|
|
5
|
-
return (globalThis as any).process.env?.[env]?.trim();
|
|
5
|
+
return (globalThis as any).process.env?.[env]?.trim() || undefined;
|
|
6
6
|
} else if (typeof (globalThis as any).Deno !== 'undefined') {
|
|
7
|
-
return (globalThis as any).Deno.env?.get?.(env)?.trim();
|
|
7
|
+
return (globalThis as any).Deno.env?.get?.(env)?.trim() || undefined;
|
|
8
8
|
}
|
|
9
9
|
return;
|
|
10
10
|
};
|
package/stdio.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.mts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,sBAAkB;AAIvC,eAAO,MAAM,iBAAiB,GAAU,YAAY,UAAU,kBAW7D,CAAC"}
|
package/stdio.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,qBAAkB;AAIvC,eAAO,MAAM,iBAAiB,GAAU,YAAY,UAAU,kBAW7D,CAAC"}
|
package/stdio.js
CHANGED
|
@@ -5,7 +5,10 @@ const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
|
|
|
5
5
|
const server_1 = require("./server.js");
|
|
6
6
|
const logger_1 = require("./logger.js");
|
|
7
7
|
const launchStdioServer = async (mcpOptions) => {
|
|
8
|
-
const server = await (0, server_1.newMcpServer)(
|
|
8
|
+
const server = await (0, server_1.newMcpServer)({
|
|
9
|
+
stainlessApiKey: mcpOptions.stainlessApiKey,
|
|
10
|
+
customInstructionsPath: mcpOptions.customInstructionsPath,
|
|
11
|
+
});
|
|
9
12
|
await (0, server_1.initMcpServer)({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
10
13
|
const transport = new stdio_js_1.StdioServerTransport();
|
|
11
14
|
await server.connect(transport);
|
package/stdio.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AACvD,wCAAqC;AAE9B,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,EAAC,UAAU,CAAC,eAAe,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"stdio.js","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":";;;AAAA,wEAAiF;AAEjF,wCAAuD;AACvD,wCAAqC;AAE9B,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,IAAA,qBAAY,EAAC;QAChC,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,sBAAsB,EAAE,UAAU,CAAC,sBAAsB;KAC1D,CAAC,CAAC;IAEH,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,IAAA,kBAAS,GAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAClD,CAAC,CAAC;AAXW,QAAA,iBAAiB,qBAW5B"}
|
package/stdio.mjs
CHANGED
|
@@ -2,7 +2,10 @@ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js'
|
|
|
2
2
|
import { initMcpServer, newMcpServer } from "./server.mjs";
|
|
3
3
|
import { getLogger } from "./logger.mjs";
|
|
4
4
|
export const launchStdioServer = async (mcpOptions) => {
|
|
5
|
-
const server = await newMcpServer(
|
|
5
|
+
const server = await newMcpServer({
|
|
6
|
+
stainlessApiKey: mcpOptions.stainlessApiKey,
|
|
7
|
+
customInstructionsPath: mcpOptions.customInstructionsPath,
|
|
8
|
+
});
|
|
6
9
|
await initMcpServer({ server, mcpOptions, stainlessApiKey: mcpOptions.stainlessApiKey });
|
|
7
10
|
const transport = new StdioServerTransport();
|
|
8
11
|
await server.connect(transport);
|
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;
|
|
1
|
+
{"version":3,"file":"stdio.mjs","sourceRoot":"","sources":["src/stdio.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AAEjF,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,qBAAiB;AACvD,OAAO,EAAE,SAAS,EAAE,qBAAiB;AAErC,MAAM,CAAC,MAAM,iBAAiB,GAAG,KAAK,EAAE,UAAsB,EAAE,EAAE;IAChE,MAAM,MAAM,GAAG,MAAM,YAAY,CAAC;QAChC,eAAe,EAAE,UAAU,CAAC,eAAe;QAC3C,sBAAsB,EAAE,UAAU,CAAC,sBAAsB;KAC1D,CAAC,CAAC;IAEH,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,SAAS,EAAE,CAAC,IAAI,CAAC,6BAA6B,CAAC,CAAC;AAClD,CAAC,CAAC"}
|
package/types.d.mts
CHANGED
|
@@ -35,6 +35,11 @@ export type McpRequestContext = {
|
|
|
35
35
|
client: Codeqr;
|
|
36
36
|
stainlessApiKey?: string | undefined;
|
|
37
37
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
38
|
+
mcpSessionId?: string | undefined;
|
|
39
|
+
mcpClientInfo?: {
|
|
40
|
+
name: string;
|
|
41
|
+
version: string;
|
|
42
|
+
} | undefined;
|
|
38
43
|
};
|
|
39
44
|
export type HandlerFunction = ({ reqContext, args, }: {
|
|
40
45
|
reqContext: McpRequestContext;
|
package/types.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.mts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,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CAAA;KAAE,GAAG,SAAS,CAAC;CAC/D,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG,CAAC,EAC7B,UAAU,EACV,IAAI,GACL,EAAE;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,KAAK,OAAO,CAAC,cAAc,CAAC,CAAC;AAE9B,wBAAgB,mBAAmB,CAAC,MAAM,EAAE,OAAO,GAAG,cAAc,CASnE;AAED,wBAAsB,qBAAqB,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,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
|
@@ -35,6 +35,11 @@ export type McpRequestContext = {
|
|
|
35
35
|
client: Codeqr;
|
|
36
36
|
stainlessApiKey?: string | undefined;
|
|
37
37
|
upstreamClientEnvs?: Record<string, string> | undefined;
|
|
38
|
+
mcpSessionId?: string | undefined;
|
|
39
|
+
mcpClientInfo?: {
|
|
40
|
+
name: string;
|
|
41
|
+
version: string;
|
|
42
|
+
} | undefined;
|
|
38
43
|
};
|
|
39
44
|
export type HandlerFunction = ({ reqContext, args, }: {
|
|
40
45
|
reqContext: McpRequestContext;
|
package/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["src/types.ts"],"names":[],"mappings":"AAEA,OAAO,MAAM,MAAM,YAAY,CAAC;AAChC,OAAO,EAAE,IAAI,EAAE,MAAM,oCAAoC,CAAC;AAE1D,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,iBAAiB,GAAG;IAC9B,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACrC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E,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;AA4DtF,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.js
CHANGED
|
@@ -4,10 +4,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
4
4
|
exports.requireValue = exports.readEnvOrError = exports.readEnv = void 0;
|
|
5
5
|
const readEnv = (env) => {
|
|
6
6
|
if (typeof globalThis.process !== 'undefined') {
|
|
7
|
-
return globalThis.process.env?.[env]?.trim();
|
|
7
|
+
return globalThis.process.env?.[env]?.trim() || undefined;
|
|
8
8
|
}
|
|
9
9
|
else if (typeof globalThis.Deno !== 'undefined') {
|
|
10
|
-
return globalThis.Deno.env?.get?.(env)?.trim();
|
|
10
|
+
return globalThis.Deno.env?.get?.(env)?.trim() || undefined;
|
|
11
11
|
}
|
|
12
12
|
return;
|
|
13
13
|
};
|
package/util.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.js","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAE/E,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"util.js","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAE/E,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;SAAM,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAC3D,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACvE,CAAC;IACD,OAAO;AACT,CAAC,CAAC;AAPW,QAAA,OAAO,WAOlB;AAEK,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE;IACpD,IAAI,QAAQ,GAAG,IAAA,eAAO,EAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,QAAQ,KAAK,SAAS,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,wBAAwB,GAAG,aAAa,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,QAAQ,CAAC;AAClB,CAAC,CAAC;AANW,QAAA,cAAc,kBAMzB;AAEK,MAAM,YAAY,GAAG,CAAI,KAAoB,EAAE,WAAmB,EAAK,EAAE;IAC9E,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;QACxB,MAAM,IAAI,KAAK,CAAC,2BAA2B,WAAW,EAAE,CAAC,CAAC;IAC5D,CAAC;IACD,OAAO,KAAK,CAAC;AACf,CAAC,CAAC;AALW,QAAA,YAAY,gBAKvB"}
|
package/util.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
2
|
export const readEnv = (env) => {
|
|
3
3
|
if (typeof globalThis.process !== 'undefined') {
|
|
4
|
-
return globalThis.process.env?.[env]?.trim();
|
|
4
|
+
return globalThis.process.env?.[env]?.trim() || undefined;
|
|
5
5
|
}
|
|
6
6
|
else if (typeof globalThis.Deno !== 'undefined') {
|
|
7
|
-
return globalThis.Deno.env?.get?.(env)?.trim();
|
|
7
|
+
return globalThis.Deno.env?.get?.(env)?.trim() || undefined;
|
|
8
8
|
}
|
|
9
9
|
return;
|
|
10
10
|
};
|
package/util.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"util.mjs","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,CAAC;
|
|
1
|
+
{"version":3,"file":"util.mjs","sourceRoot":"","sources":["src/util.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,GAAW,EAAsB,EAAE;IACzD,IAAI,OAAQ,UAAkB,CAAC,OAAO,KAAK,WAAW,EAAE,CAAC;QACvD,OAAQ,UAAkB,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACrE,CAAC;SAAM,IAAI,OAAQ,UAAkB,CAAC,IAAI,KAAK,WAAW,EAAE,CAAC;QAC3D,OAAQ,UAAkB,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,EAAE,CAAC,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,SAAS,CAAC;IACvE,CAAC;IACD,OAAO;AACT,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,GAAW,EAAU,EAAE;IACpD,IAAI,QAAQ,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;IAC5B,IAAI,QAAQ,K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