@stigg/typescript-mcp 0.1.0-alpha.10
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/LICENSE +201 -0
- package/README.md +99 -0
- 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/auth.js +22 -0
- package/auth.js.map +1 -0
- package/auth.mjs +17 -0
- package/auth.mjs.map +1 -0
- package/code-tool-paths.cjs +6 -0
- package/code-tool-paths.cjs.map +1 -0
- package/code-tool-paths.d.cts +2 -0
- package/code-tool-paths.d.cts.map +1 -0
- package/code-tool-types.d.mts +14 -0
- package/code-tool-types.d.mts.map +1 -0
- package/code-tool-types.d.ts +14 -0
- package/code-tool-types.d.ts.map +1 -0
- package/code-tool-types.js +4 -0
- package/code-tool-types.js.map +1 -0
- package/code-tool-types.mjs +3 -0
- package/code-tool-types.mjs.map +1 -0
- package/code-tool-worker.d.mts +5 -0
- package/code-tool-worker.d.mts.map +1 -0
- package/code-tool-worker.d.ts +5 -0
- package/code-tool-worker.d.ts.map +1 -0
- package/code-tool-worker.js +283 -0
- package/code-tool-worker.js.map +1 -0
- package/code-tool-worker.mjs +278 -0
- package/code-tool-worker.mjs.map +1 -0
- package/code-tool.d.mts +21 -0
- package/code-tool.d.mts.map +1 -0
- package/code-tool.d.ts +21 -0
- package/code-tool.d.ts.map +1 -0
- package/code-tool.js +313 -0
- package/code-tool.js.map +1 -0
- package/code-tool.mjs +274 -0
- package/code-tool.mjs.map +1 -0
- package/docs-search-tool.d.mts +57 -0
- package/docs-search-tool.d.mts.map +1 -0
- package/docs-search-tool.d.ts +57 -0
- package/docs-search-tool.d.ts.map +1 -0
- package/docs-search-tool.js +55 -0
- package/docs-search-tool.js.map +1 -0
- package/docs-search-tool.mjs +51 -0
- package/docs-search-tool.mjs.map +1 -0
- package/http.d.mts +14 -0
- package/http.d.mts.map +1 -0
- package/http.d.ts +14 -0
- package/http.d.ts.map +1 -0
- package/http.js +95 -0
- package/http.js.map +1 -0
- package/http.mjs +87 -0
- package/http.mjs.map +1 -0
- package/index.d.mts +3 -0
- package/index.d.mts.map +1 -0
- package/index.d.ts +3 -0
- package/index.d.ts.map +1 -0
- package/index.js +59 -0
- package/index.js.map +1 -0
- package/index.mjs +57 -0
- package/index.mjs.map +1 -0
- 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 +10 -0
- package/methods.d.mts.map +1 -0
- package/methods.d.ts +10 -0
- package/methods.d.ts.map +1 -0
- package/methods.js +419 -0
- package/methods.js.map +1 -0
- package/methods.mjs +415 -0
- package/methods.mjs.map +1 -0
- package/options.d.mts +18 -0
- package/options.d.mts.map +1 -0
- package/options.d.ts +18 -0
- package/options.d.ts.map +1 -0
- package/options.js +107 -0
- package/options.js.map +1 -0
- package/options.mjs +100 -0
- package/options.mjs.map +1 -0
- package/package.json +211 -0
- package/server.d.mts +29 -0
- package/server.d.mts.map +1 -0
- package/server.d.ts +29 -0
- package/server.d.ts.map +1 -0
- package/server.js +157 -0
- package/server.js.map +1 -0
- package/server.mjs +147 -0
- package/server.mjs.map +1 -0
- package/src/auth.ts +25 -0
- package/src/code-tool-paths.cts +3 -0
- package/src/code-tool-types.ts +17 -0
- package/src/code-tool-worker.ts +329 -0
- package/src/code-tool.ts +357 -0
- package/src/docs-search-tool.ts +68 -0
- package/src/http.ts +127 -0
- package/src/index.ts +65 -0
- package/src/instructions.ts +74 -0
- package/src/methods.ts +440 -0
- package/src/options.ts +141 -0
- package/src/server.ts +184 -0
- package/src/stdio.ts +13 -0
- package/src/tsconfig.json +11 -0
- package/src/types.ts +123 -0
- package/src/util.ts +25 -0
- package/stdio.d.mts +3 -0
- package/stdio.d.mts.map +1 -0
- package/stdio.d.ts +3 -0
- package/stdio.d.ts.map +1 -0
- package/stdio.js +14 -0
- package/stdio.js.map +1 -0
- package/stdio.mjs +10 -0
- package/stdio.mjs.map +1 -0
- package/types.d.mts +59 -0
- package/types.d.mts.map +1 -0
- package/types.d.ts +59 -0
- package/types.d.ts.map +1 -0
- package/types.js +58 -0
- package/types.js.map +1 -0
- package/types.mjs +53 -0
- package/types.mjs.map +1 -0
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.mts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;OACpD,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CAgBA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAnBC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAkBD,wBAA2C"}
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
import { Metadata, McpRequestContext } from "./types.js";
|
|
2
|
+
import { Tool } from '@modelcontextprotocol/sdk/types.js';
|
|
3
|
+
export declare const metadata: Metadata;
|
|
4
|
+
export declare const tool: Tool;
|
|
5
|
+
export declare const handler: ({ reqContext, args, }: {
|
|
6
|
+
reqContext: McpRequestContext;
|
|
7
|
+
args: Record<string, unknown> | undefined;
|
|
8
|
+
}) => Promise<import("./types").ToolCallResult>;
|
|
9
|
+
declare const _default: {
|
|
10
|
+
metadata: Metadata;
|
|
11
|
+
tool: {
|
|
12
|
+
inputSchema: {
|
|
13
|
+
[x: string]: unknown;
|
|
14
|
+
type: "object";
|
|
15
|
+
properties?: {
|
|
16
|
+
[x: string]: object;
|
|
17
|
+
} | undefined;
|
|
18
|
+
required?: string[] | undefined;
|
|
19
|
+
};
|
|
20
|
+
name: string;
|
|
21
|
+
description?: string | undefined;
|
|
22
|
+
outputSchema?: {
|
|
23
|
+
[x: string]: unknown;
|
|
24
|
+
type: "object";
|
|
25
|
+
properties?: {
|
|
26
|
+
[x: string]: object;
|
|
27
|
+
} | undefined;
|
|
28
|
+
required?: string[] | undefined;
|
|
29
|
+
} | undefined;
|
|
30
|
+
annotations?: {
|
|
31
|
+
title?: string | undefined;
|
|
32
|
+
readOnlyHint?: boolean | undefined;
|
|
33
|
+
destructiveHint?: boolean | undefined;
|
|
34
|
+
idempotentHint?: boolean | undefined;
|
|
35
|
+
openWorldHint?: boolean | undefined;
|
|
36
|
+
} | undefined;
|
|
37
|
+
execution?: {
|
|
38
|
+
taskSupport?: "optional" | "required" | "forbidden" | undefined;
|
|
39
|
+
} | undefined;
|
|
40
|
+
_meta?: {
|
|
41
|
+
[x: string]: unknown;
|
|
42
|
+
} | undefined;
|
|
43
|
+
icons?: {
|
|
44
|
+
src: string;
|
|
45
|
+
mimeType?: string | undefined;
|
|
46
|
+
sizes?: string[] | undefined;
|
|
47
|
+
theme?: "light" | "dark" | undefined;
|
|
48
|
+
}[] | undefined;
|
|
49
|
+
title?: string | undefined;
|
|
50
|
+
};
|
|
51
|
+
handler: ({ reqContext, args, }: {
|
|
52
|
+
reqContext: McpRequestContext;
|
|
53
|
+
args: Record<string, unknown> | undefined;
|
|
54
|
+
}) => Promise<import("./types").ToolCallResult>;
|
|
55
|
+
};
|
|
56
|
+
export default _default;
|
|
57
|
+
//# sourceMappingURL=docs-search-tool.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.d.ts","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"OAEO,EAAE,QAAQ,EAAE,iBAAiB,EAAuB;OACpD,EAAE,IAAI,EAAE,MAAM,oCAAoC;AAEzD,eAAO,MAAM,QAAQ,EAAE,QAKtB,CAAC;AAEF,eAAO,MAAM,IAAI,EAAE,IA0BlB,CAAC;AAKF,eAAO,MAAM,OAAO,GAAU,uBAG3B;IACD,UAAU,EAAE,iBAAiB,CAAC;IAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;CAC3C,8CAgBA,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;qCAnBC;QACD,UAAU,EAAE,iBAAiB,CAAC;QAC9B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,SAAS,CAAC;KAC3C;;AAkBD,wBAA2C"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.handler = exports.tool = exports.metadata = void 0;
|
|
5
|
+
const types_1 = require("./types.js");
|
|
6
|
+
exports.metadata = {
|
|
7
|
+
resource: 'all',
|
|
8
|
+
operation: 'read',
|
|
9
|
+
tags: [],
|
|
10
|
+
httpMethod: 'get',
|
|
11
|
+
};
|
|
12
|
+
exports.tool = {
|
|
13
|
+
name: 'search_docs',
|
|
14
|
+
description: 'Search for documentation for how to use the client to interact with the API.',
|
|
15
|
+
inputSchema: {
|
|
16
|
+
type: 'object',
|
|
17
|
+
properties: {
|
|
18
|
+
query: {
|
|
19
|
+
type: 'string',
|
|
20
|
+
description: 'The query to search for.',
|
|
21
|
+
},
|
|
22
|
+
language: {
|
|
23
|
+
type: 'string',
|
|
24
|
+
description: 'The language for the SDK to search for.',
|
|
25
|
+
enum: ['http', 'python', 'go', 'typescript', 'javascript', 'terraform', 'ruby', 'java', 'kotlin'],
|
|
26
|
+
},
|
|
27
|
+
detail: {
|
|
28
|
+
type: 'string',
|
|
29
|
+
description: 'The amount of detail to return.',
|
|
30
|
+
enum: ['default', 'verbose'],
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
required: ['query', 'language'],
|
|
34
|
+
},
|
|
35
|
+
annotations: {
|
|
36
|
+
readOnlyHint: true,
|
|
37
|
+
},
|
|
38
|
+
};
|
|
39
|
+
const docsSearchURL = process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/stigg/docs/search';
|
|
40
|
+
const handler = async ({ reqContext, args, }) => {
|
|
41
|
+
const body = args;
|
|
42
|
+
const query = new URLSearchParams(body).toString();
|
|
43
|
+
const result = await fetch(`${docsSearchURL}?${query}`, {
|
|
44
|
+
headers: {
|
|
45
|
+
...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
if (!result.ok) {
|
|
49
|
+
throw new Error(`${result.status}: ${result.statusText} when using doc search tool. Details: ${await result.text()}`);
|
|
50
|
+
}
|
|
51
|
+
return (0, types_1.asTextContentResult)(await result.json());
|
|
52
|
+
};
|
|
53
|
+
exports.handler = handler;
|
|
54
|
+
exports.default = { metadata: exports.metadata, tool: exports.tool, handler: exports.handler };
|
|
55
|
+
//# sourceMappingURL=docs-search-tool.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.js","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,sCAA2E;AAG9D,QAAA,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EA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,MAAM,CAAC,EAAE,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CACb,GAAG,MAAM,CAAC,MAAM,KAAK,MAAM,CAAC,UAAU,yCAAyC,MAAM,MAAM,CAAC,IAAI,EAAE,EAAE,CACrG,CAAC;IACJ,CAAC;IAED,OAAO,IAAA,2BAAmB,EAAC,MAAM,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC;AAClD,CAAC,CAAC;AAtBW,QAAA,OAAO,WAsBlB;AAEF,kBAAe,EAAE,QAAQ,EAAR,gBAAQ,EAAE,IAAI,EAAJ,YAAI,EAAE,OAAO,EAAP,eAAO,EAAE,CAAC"}
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { asTextContentResult } from "./types.mjs";
|
|
3
|
+
export const metadata = {
|
|
4
|
+
resource: 'all',
|
|
5
|
+
operation: 'read',
|
|
6
|
+
tags: [],
|
|
7
|
+
httpMethod: 'get',
|
|
8
|
+
};
|
|
9
|
+
export const tool = {
|
|
10
|
+
name: 'search_docs',
|
|
11
|
+
description: 'Search for documentation for how to use the client to interact with the API.',
|
|
12
|
+
inputSchema: {
|
|
13
|
+
type: 'object',
|
|
14
|
+
properties: {
|
|
15
|
+
query: {
|
|
16
|
+
type: 'string',
|
|
17
|
+
description: 'The query to search for.',
|
|
18
|
+
},
|
|
19
|
+
language: {
|
|
20
|
+
type: 'string',
|
|
21
|
+
description: 'The language for the SDK to search for.',
|
|
22
|
+
enum: ['http', 'python', 'go', 'typescript', 'javascript', 'terraform', 'ruby', 'java', 'kotlin'],
|
|
23
|
+
},
|
|
24
|
+
detail: {
|
|
25
|
+
type: 'string',
|
|
26
|
+
description: 'The amount of detail to return.',
|
|
27
|
+
enum: ['default', 'verbose'],
|
|
28
|
+
},
|
|
29
|
+
},
|
|
30
|
+
required: ['query', 'language'],
|
|
31
|
+
},
|
|
32
|
+
annotations: {
|
|
33
|
+
readOnlyHint: true,
|
|
34
|
+
},
|
|
35
|
+
};
|
|
36
|
+
const docsSearchURL = process.env['DOCS_SEARCH_URL'] || 'https://api.stainless.com/api/projects/stigg/docs/search';
|
|
37
|
+
export const handler = async ({ reqContext, args, }) => {
|
|
38
|
+
const body = args;
|
|
39
|
+
const query = new URLSearchParams(body).toString();
|
|
40
|
+
const result = await fetch(`${docsSearchURL}?${query}`, {
|
|
41
|
+
headers: {
|
|
42
|
+
...(reqContext.stainlessApiKey && { Authorization: reqContext.stainlessApiKey }),
|
|
43
|
+
},
|
|
44
|
+
});
|
|
45
|
+
if (!result.ok) {
|
|
46
|
+
throw new Error(`${result.status}: ${result.statusText} when using doc search tool. Details: ${await result.text()}`);
|
|
47
|
+
}
|
|
48
|
+
return asTextContentResult(await result.json());
|
|
49
|
+
};
|
|
50
|
+
export default { metadata, tool, handler };
|
|
51
|
+
//# sourceMappingURL=docs-search-tool.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"docs-search-tool.mjs","sourceRoot":"","sources":["src/docs-search-tool.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAA+B,mBAAmB,EAAE;AAG3D,MAAM,CAAC,MAAM,QAAQ,GAAa;IAChC,QAAQ,EAAE,KAAK;IACf,SAAS,EAAE,MAAM;IACjB,IAAI,EAAE,EAAE;IACR,UAAU,EAAE,KAAK;CAClB,CAAC;AAEF,MAAM,CAAC,MAAM,IAAI,GAAS;IACxB,IAAI,EAAE,aAAa;IACnB,WAAW,EAAE,8EAA8E;IAC3F,WAAW,EAAE;QACX,IAAI,EAAE,QAAQ;QACd,UAAU,EAAE;YACV,KAAK,EAAE;gBACL,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,0BAA0B;aACxC;YACD,QAAQ,EAAE;gBACR,IAAI,EAAE,QAAQ;gBACd,WAAW,EAAE,yCAAyC;gBACtD,IAAI,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,YAAY,EAAE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|
2
|
+
import express from 'express';
|
|
3
|
+
import { McpOptions } from "./options.mjs";
|
|
4
|
+
export declare const streamableHTTPApp: ({ clientOptions, mcpOptions, debug, }: {
|
|
5
|
+
clientOptions?: ClientOptions;
|
|
6
|
+
mcpOptions: McpOptions;
|
|
7
|
+
debug: boolean;
|
|
8
|
+
}) => express.Express;
|
|
9
|
+
export declare const launchStreamableHTTPServer: ({ mcpOptions, debug, port, }: {
|
|
10
|
+
mcpOptions: McpOptions;
|
|
11
|
+
debug: boolean;
|
|
12
|
+
port: number | string | undefined;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
//# sourceMappingURL=http.d.mts.map
|
package/http.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.mts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAIO,EAAE,aAAa,EAAE,MAAM,mBAAmB;OAC1C,OAAO,MAAM,SAAS;OAItB,EAAE,UAAU,EAAE;AA+DrB,eAAO,MAAM,iBAAiB,GAAI,uCAI/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAChB,KAAG,OAAO,CAAC,OAwBX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,8BAI9C;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC,kBAYA,CAAC"}
|
package/http.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { ClientOptions } from '@stigg/typescript';
|
|
2
|
+
import express from 'express';
|
|
3
|
+
import { McpOptions } from "./options.js";
|
|
4
|
+
export declare const streamableHTTPApp: ({ clientOptions, mcpOptions, debug, }: {
|
|
5
|
+
clientOptions?: ClientOptions;
|
|
6
|
+
mcpOptions: McpOptions;
|
|
7
|
+
debug: boolean;
|
|
8
|
+
}) => express.Express;
|
|
9
|
+
export declare const launchStreamableHTTPServer: ({ mcpOptions, debug, port, }: {
|
|
10
|
+
mcpOptions: McpOptions;
|
|
11
|
+
debug: boolean;
|
|
12
|
+
port: number | string | undefined;
|
|
13
|
+
}) => Promise<void>;
|
|
14
|
+
//# sourceMappingURL=http.d.ts.map
|
package/http.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"OAIO,EAAE,aAAa,EAAE,MAAM,mBAAmB;OAC1C,OAAO,MAAM,SAAS;OAItB,EAAE,UAAU,EAAE;AA+DrB,eAAO,MAAM,iBAAiB,GAAI,uCAI/B;IACD,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;CAChB,KAAG,OAAO,CAAC,OAwBX,CAAC;AAEF,eAAO,MAAM,0BAA0B,GAAU,8BAI9C;IACD,UAAU,EAAE,UAAU,CAAC;IACvB,KAAK,EAAE,OAAO,CAAC;IACf,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;CACnC,kBAYA,CAAC"}
|
package/http.js
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
4
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
5
|
+
};
|
|
6
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
7
|
+
exports.launchStreamableHTTPServer = exports.streamableHTTPApp = void 0;
|
|
8
|
+
const streamableHttp_js_1 = require("@modelcontextprotocol/sdk/server/streamableHttp.js");
|
|
9
|
+
const express_1 = __importDefault(require("express"));
|
|
10
|
+
const morgan_1 = __importDefault(require("morgan"));
|
|
11
|
+
const morgan_body_1 = __importDefault(require("morgan-body"));
|
|
12
|
+
const auth_1 = require("./auth.js");
|
|
13
|
+
const server_1 = require("./server.js");
|
|
14
|
+
const newServer = async ({ clientOptions, mcpOptions, req, res, }) => {
|
|
15
|
+
const stainlessApiKey = (0, auth_1.getStainlessApiKey)(req, mcpOptions);
|
|
16
|
+
const server = await (0, server_1.newMcpServer)(stainlessApiKey);
|
|
17
|
+
const authOptions = (0, auth_1.parseClientAuthHeaders)(req, false);
|
|
18
|
+
await (0, server_1.initMcpServer)({
|
|
19
|
+
server: server,
|
|
20
|
+
mcpOptions: mcpOptions,
|
|
21
|
+
clientOptions: {
|
|
22
|
+
...clientOptions,
|
|
23
|
+
...authOptions,
|
|
24
|
+
},
|
|
25
|
+
stainlessApiKey: stainlessApiKey,
|
|
26
|
+
});
|
|
27
|
+
return server;
|
|
28
|
+
};
|
|
29
|
+
const post = (options) => async (req, res) => {
|
|
30
|
+
const server = await newServer({ ...options, req, res });
|
|
31
|
+
// If we return null, we already set the authorization error.
|
|
32
|
+
if (server === null)
|
|
33
|
+
return;
|
|
34
|
+
const transport = new streamableHttp_js_1.StreamableHTTPServerTransport();
|
|
35
|
+
await server.connect(transport);
|
|
36
|
+
await transport.handleRequest(req, res, req.body);
|
|
37
|
+
};
|
|
38
|
+
const get = async (req, res) => {
|
|
39
|
+
res.status(405).json({
|
|
40
|
+
jsonrpc: '2.0',
|
|
41
|
+
error: {
|
|
42
|
+
code: -32000,
|
|
43
|
+
message: 'Method not supported',
|
|
44
|
+
},
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
const del = async (req, res) => {
|
|
48
|
+
res.status(405).json({
|
|
49
|
+
jsonrpc: '2.0',
|
|
50
|
+
error: {
|
|
51
|
+
code: -32000,
|
|
52
|
+
message: 'Method not supported',
|
|
53
|
+
},
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
const streamableHTTPApp = ({ clientOptions = {}, mcpOptions, debug, }) => {
|
|
57
|
+
const app = (0, express_1.default)();
|
|
58
|
+
app.set('query parser', 'extended');
|
|
59
|
+
app.use(express_1.default.json());
|
|
60
|
+
if (debug) {
|
|
61
|
+
(0, morgan_body_1.default)(app, {
|
|
62
|
+
logAllReqHeader: true,
|
|
63
|
+
logAllResHeader: true,
|
|
64
|
+
logRequestBody: true,
|
|
65
|
+
logResponseBody: true,
|
|
66
|
+
});
|
|
67
|
+
}
|
|
68
|
+
else {
|
|
69
|
+
app.use((0, morgan_1.default)('combined'));
|
|
70
|
+
}
|
|
71
|
+
app.get('/health', async (req, res) => {
|
|
72
|
+
res.status(200).send('OK');
|
|
73
|
+
});
|
|
74
|
+
app.get('/', get);
|
|
75
|
+
app.post('/', post({ clientOptions, mcpOptions }));
|
|
76
|
+
app.delete('/', del);
|
|
77
|
+
return app;
|
|
78
|
+
};
|
|
79
|
+
exports.streamableHTTPApp = streamableHTTPApp;
|
|
80
|
+
const launchStreamableHTTPServer = async ({ mcpOptions, debug, port, }) => {
|
|
81
|
+
const app = (0, exports.streamableHTTPApp)({ mcpOptions, debug });
|
|
82
|
+
const server = app.listen(port);
|
|
83
|
+
const address = server.address();
|
|
84
|
+
if (typeof address === 'string') {
|
|
85
|
+
console.error(`MCP Server running on streamable HTTP at ${address}`);
|
|
86
|
+
}
|
|
87
|
+
else if (address !== null) {
|
|
88
|
+
console.error(`MCP Server running on streamable HTTP on port ${address.port}`);
|
|
89
|
+
}
|
|
90
|
+
else {
|
|
91
|
+
console.error(`MCP Server running on streamable HTTP on port ${port}`);
|
|
92
|
+
}
|
|
93
|
+
};
|
|
94
|
+
exports.launchStreamableHTTPServer = launchStreamableHTTPServer;
|
|
95
|
+
//# sourceMappingURL=http.js.map
|
package/http.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.js","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;AAGtF,0FAAmG;AAEnG,sDAA8B;AAC9B,oDAA4B;AAC5B,8DAAqC;AACrC,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E,CAAC,CAAC,CAAC;IACnD,GAAG,CAAC,MAAM,CAAC,GAAG,EAAE,GAAG,CAAC,CAAC;IAErB,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAhCW,QAAA,iBAAiB,qBAgC5B;AAEK,MAAM,0BAA0B,GAAG,KAAK,EAAE,EAC/C,UAAU,EACV,KAAK,EACL,IAAI,GAKL,EAAE,EAAE;IACH,MAAM,GAAG,GAAG,IAAA,yBAAiB,EAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAEjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;SAAM,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,iDAAiD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACjF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC;AApBW,QAAA,0BAA0B,8BAoBrC"}
|
package/http.mjs
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { StreamableHTTPServerTransport } from '@modelcontextprotocol/sdk/server/streamableHttp.js';
|
|
3
|
+
import express from 'express';
|
|
4
|
+
import morgan from 'morgan';
|
|
5
|
+
import morganBody from 'morgan-body';
|
|
6
|
+
import { getStainlessApiKey, parseClientAuthHeaders } from "./auth.mjs";
|
|
7
|
+
import { initMcpServer, newMcpServer } from "./server.mjs";
|
|
8
|
+
const newServer = async ({ clientOptions, mcpOptions, req, res, }) => {
|
|
9
|
+
const stainlessApiKey = getStainlessApiKey(req, mcpOptions);
|
|
10
|
+
const server = await newMcpServer(stainlessApiKey);
|
|
11
|
+
const authOptions = parseClientAuthHeaders(req, false);
|
|
12
|
+
await initMcpServer({
|
|
13
|
+
server: server,
|
|
14
|
+
mcpOptions: mcpOptions,
|
|
15
|
+
clientOptions: {
|
|
16
|
+
...clientOptions,
|
|
17
|
+
...authOptions,
|
|
18
|
+
},
|
|
19
|
+
stainlessApiKey: stainlessApiKey,
|
|
20
|
+
});
|
|
21
|
+
return server;
|
|
22
|
+
};
|
|
23
|
+
const post = (options) => async (req, res) => {
|
|
24
|
+
const server = await newServer({ ...options, req, res });
|
|
25
|
+
// If we return null, we already set the authorization error.
|
|
26
|
+
if (server === null)
|
|
27
|
+
return;
|
|
28
|
+
const transport = new StreamableHTTPServerTransport();
|
|
29
|
+
await server.connect(transport);
|
|
30
|
+
await transport.handleRequest(req, res, req.body);
|
|
31
|
+
};
|
|
32
|
+
const get = async (req, res) => {
|
|
33
|
+
res.status(405).json({
|
|
34
|
+
jsonrpc: '2.0',
|
|
35
|
+
error: {
|
|
36
|
+
code: -32000,
|
|
37
|
+
message: 'Method not supported',
|
|
38
|
+
},
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
const del = async (req, res) => {
|
|
42
|
+
res.status(405).json({
|
|
43
|
+
jsonrpc: '2.0',
|
|
44
|
+
error: {
|
|
45
|
+
code: -32000,
|
|
46
|
+
message: 'Method not supported',
|
|
47
|
+
},
|
|
48
|
+
});
|
|
49
|
+
};
|
|
50
|
+
export const streamableHTTPApp = ({ clientOptions = {}, mcpOptions, debug, }) => {
|
|
51
|
+
const app = express();
|
|
52
|
+
app.set('query parser', 'extended');
|
|
53
|
+
app.use(express.json());
|
|
54
|
+
if (debug) {
|
|
55
|
+
morganBody(app, {
|
|
56
|
+
logAllReqHeader: true,
|
|
57
|
+
logAllResHeader: true,
|
|
58
|
+
logRequestBody: true,
|
|
59
|
+
logResponseBody: true,
|
|
60
|
+
});
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
app.use(morgan('combined'));
|
|
64
|
+
}
|
|
65
|
+
app.get('/health', async (req, res) => {
|
|
66
|
+
res.status(200).send('OK');
|
|
67
|
+
});
|
|
68
|
+
app.get('/', get);
|
|
69
|
+
app.post('/', post({ clientOptions, mcpOptions }));
|
|
70
|
+
app.delete('/', del);
|
|
71
|
+
return app;
|
|
72
|
+
};
|
|
73
|
+
export const launchStreamableHTTPServer = async ({ mcpOptions, debug, port, }) => {
|
|
74
|
+
const app = streamableHTTPApp({ mcpOptions, debug });
|
|
75
|
+
const server = app.listen(port);
|
|
76
|
+
const address = server.address();
|
|
77
|
+
if (typeof address === 'string') {
|
|
78
|
+
console.error(`MCP Server running on streamable HTTP at ${address}`);
|
|
79
|
+
}
|
|
80
|
+
else if (address !== null) {
|
|
81
|
+
console.error(`MCP Server running on streamable HTTP on port ${address.port}`);
|
|
82
|
+
}
|
|
83
|
+
else {
|
|
84
|
+
console.error(`MCP Server running on streamable HTTP on port ${port}`);
|
|
85
|
+
}
|
|
86
|
+
};
|
|
87
|
+
//# sourceMappingURL=http.mjs.map
|
package/http.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.mjs","sourceRoot":"","sources":["src/http.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAG/E,EAAE,6BAA6B,EAAE,MAAM,oDAAoD;OAE3F,OAAO,MAAM,SAAS;OACtB,MAAM,MAAM,QAAQ;OACpB,UAAU,MAAM,aAAa;OAC7B,EAAE,kBAAkB,EAAE,sBAAsB,EAAE;OAE9C,EAAE,aAAa,EAAE,YAAY,EAAE;AAEtC,MAAM,SAAS,GAAG,KAAK,EAAE,EACvB,aAAa,EACb,UAAU,EACV,GAAG,EACH,GAAG,GAMJ,EAA6B,EAAE;IAC9B,MAAM,eAAe,GAAG,kBAAkB,CAAC,GAAG,EAAE,UAAU,CAAC,CAAC;IAC5D,MAAM,MAA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AAiB,CAAC,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,CAAC;IACrD,MAAM,MAAM,GAAG,GAAG,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;IAChC,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,EAAE,CAAC;IAEjC,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAChC,OAAO,CAAC,KAAK,CAAC,4CAA4C,OAAO,EAAE,CAAC,CAAC;IACvE,CAAC;SAAM,IAAI,OAAO,KAAK,IAAI,EAAE,CAAC;QAC5B,OAAO,CAAC,KAAK,CAAC,iDAAiD,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;IACjF,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,KAAK,CAAC,iDAAiD,IAAI,EAAE,CAAC,CAAC;IACzE,CAAC;AACH,CAAC,CAAC"}
|
package/index.d.mts
ADDED
package/index.d.mts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":""}
|
package/index.d.ts
ADDED
package/index.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":""}
|
package/index.js
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
"use strict";
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
const server_1 = require("./server.js");
|
|
5
|
+
const options_1 = require("./options.js");
|
|
6
|
+
const stdio_1 = require("./stdio.js");
|
|
7
|
+
const http_1 = require("./http.js");
|
|
8
|
+
async function main() {
|
|
9
|
+
const options = parseOptionsOrError();
|
|
10
|
+
const selectedTools = await selectToolsOrError(options);
|
|
11
|
+
console.error(`MCP Server starting with ${selectedTools.length} tools:`, selectedTools.map((e) => e.tool.name));
|
|
12
|
+
switch (options.transport) {
|
|
13
|
+
case 'stdio':
|
|
14
|
+
await (0, stdio_1.launchStdioServer)(options);
|
|
15
|
+
break;
|
|
16
|
+
case 'http':
|
|
17
|
+
await (0, http_1.launchStreamableHTTPServer)({
|
|
18
|
+
mcpOptions: options,
|
|
19
|
+
debug: options.debug,
|
|
20
|
+
port: options.socket ?? options.port,
|
|
21
|
+
});
|
|
22
|
+
break;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
if (require.main === module) {
|
|
26
|
+
main().catch((error) => {
|
|
27
|
+
console.error('Fatal error in main():', error);
|
|
28
|
+
process.exit(1);
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
function parseOptionsOrError() {
|
|
32
|
+
try {
|
|
33
|
+
return (0, options_1.parseCLIOptions)();
|
|
34
|
+
}
|
|
35
|
+
catch (error) {
|
|
36
|
+
console.error('Error parsing options:', error);
|
|
37
|
+
process.exit(1);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
async function selectToolsOrError(options) {
|
|
41
|
+
try {
|
|
42
|
+
const includedTools = (0, server_1.selectTools)(options);
|
|
43
|
+
if (includedTools.length === 0) {
|
|
44
|
+
console.error('No tools match the provided filters.');
|
|
45
|
+
process.exit(1);
|
|
46
|
+
}
|
|
47
|
+
return includedTools;
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
if (error instanceof Error) {
|
|
51
|
+
console.error('Error filtering tools:', error.message);
|
|
52
|
+
}
|
|
53
|
+
else {
|
|
54
|
+
console.error('Error filtering tools:', error);
|
|
55
|
+
}
|
|
56
|
+
process.exit(1);
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
//# sourceMappingURL=index.js.map
|
package/index.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";;;AAEA,wCAAuC;AACvC,0CAAwD;AACxD,sCAA4C;AAC5C,oCAAoD;AAGpD,KAAK,UAAU,IAA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,EAAC,OAAO,CAAC,CAAC;QAC3C,IAAI,aAAa,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC/B,OAAO,CAAC,KAAK,CAAC,sCAAsC,CAAC,CAAC;YACtD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;QAClB,CAAC;QACD,OAAO,aAAa,CAAC;IACvB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,KAAK,EAAE,CAAC;YAC3B,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
package/index.mjs
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { selectTools } from "./server.mjs";
|
|
3
|
+
import { parseCLIOptions } from "./options.mjs";
|
|
4
|
+
import { launchStdioServer } from "./stdio.mjs";
|
|
5
|
+
import { launchStreamableHTTPServer } from "./http.mjs";
|
|
6
|
+
async function main() {
|
|
7
|
+
const options = parseOptionsOrError();
|
|
8
|
+
const selectedTools = await selectToolsOrError(options);
|
|
9
|
+
console.error(`MCP Server starting with ${selectedTools.length} tools:`, selectedTools.map((e) => e.tool.name));
|
|
10
|
+
switch (options.transport) {
|
|
11
|
+
case 'stdio':
|
|
12
|
+
await launchStdioServer(options);
|
|
13
|
+
break;
|
|
14
|
+
case 'http':
|
|
15
|
+
await launchStreamableHTTPServer({
|
|
16
|
+
mcpOptions: options,
|
|
17
|
+
debug: options.debug,
|
|
18
|
+
port: options.socket ?? options.port,
|
|
19
|
+
});
|
|
20
|
+
break;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
if (require.main === module) {
|
|
24
|
+
main().catch((error) => {
|
|
25
|
+
console.error('Fatal error in main():', error);
|
|
26
|
+
process.exit(1);
|
|
27
|
+
});
|
|
28
|
+
}
|
|
29
|
+
function parseOptionsOrError() {
|
|
30
|
+
try {
|
|
31
|
+
return parseCLIOptions();
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
console.error('Error parsing options:', error);
|
|
35
|
+
process.exit(1);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
async function selectToolsOrError(options) {
|
|
39
|
+
try {
|
|
40
|
+
const includedTools = selectTools(options);
|
|
41
|
+
if (includedTools.length === 0) {
|
|
42
|
+
console.error('No tools match the provided filters.');
|
|
43
|
+
process.exit(1);
|
|
44
|
+
}
|
|
45
|
+
return includedTools;
|
|
46
|
+
}
|
|
47
|
+
catch (error) {
|
|
48
|
+
if (error instanceof Error) {
|
|
49
|
+
console.error('Error filtering tools:', error.message);
|
|
50
|
+
}
|
|
51
|
+
else {
|
|
52
|
+
console.error('Error filtering tools:', error);
|
|
53
|
+
}
|
|
54
|
+
process.exit(1);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
//# sourceMappingURL=index.mjs.map
|
package/index.mjs.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":";OAEO,EAAE,WAAW,EAAE;OACf,EAAc,eAAe,EAAE;OAC/B,EAAE,iBAAiB,EAAE;OACrB,EAAE,0BAA0B,EAAE;AAGrC,KAAK,UAAU,IAAI;IACjB,MAAM,OAAO,GAAG,mBAAmB,EAAE,CAAC;IAEtC,MAAM,aAAa,GAAG,MAAM,kBAAkB,CAAC,OAAO,CAAC,CAAC;IAExD,OAAO,CAAC,KAAK,CACX,4BAA4B,aAAa,CAAC,MAAM,SAAS,EACzD,aAAa,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,CACtC,CAAC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OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAC;QACzD,CAAC;aAAM,CAAC;YACN,OAAO,CAAC,KAAK,CAAC,wBAAwB,EAAE,KAAK,CAAC,CAAC;QACjD,CAAC;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;IAClB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.d.mts","sourceRoot":"","sources":["src/instructions.ts"],"names":[],"mappings":"AA0BA,wBAAsB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAW1F"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.d.ts","sourceRoot":"","sources":["src/instructions.ts"],"names":[],"mappings":"AA0BA,wBAAsB,eAAe,CAAC,eAAe,EAAE,MAAM,GAAG,SAAS,GAAG,OAAO,CAAC,MAAM,CAAC,CAW1F"}
|
package/instructions.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.getInstructions = getInstructions;
|
|
5
|
+
const util_1 = require("./util.js");
|
|
6
|
+
const INSTRUCTIONS_CACHE_TTL_MS = 15 * 60 * 1000; // 15 minutes
|
|
7
|
+
const instructionsCache = new Map();
|
|
8
|
+
// Periodically evict stale entries so the cache doesn't grow unboundedly.
|
|
9
|
+
const _cacheCleanupInterval = setInterval(() => {
|
|
10
|
+
const now = Date.now();
|
|
11
|
+
for (const [key, entry] of instructionsCache) {
|
|
12
|
+
if (now - entry.fetchedAt > INSTRUCTIONS_CACHE_TTL_MS) {
|
|
13
|
+
instructionsCache.delete(key);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
}, INSTRUCTIONS_CACHE_TTL_MS);
|
|
17
|
+
// Don't keep the process alive just for cleanup.
|
|
18
|
+
_cacheCleanupInterval.unref();
|
|
19
|
+
async function getInstructions(stainlessApiKey) {
|
|
20
|
+
const cacheKey = stainlessApiKey ?? '';
|
|
21
|
+
const cached = instructionsCache.get(cacheKey);
|
|
22
|
+
if (cached && Date.now() - cached.fetchedAt <= INSTRUCTIONS_CACHE_TTL_MS) {
|
|
23
|
+
return cached.fetchedInstructions;
|
|
24
|
+
}
|
|
25
|
+
const fetchedInstructions = await fetchLatestInstructions(stainlessApiKey);
|
|
26
|
+
instructionsCache.set(cacheKey, { fetchedInstructions, fetchedAt: Date.now() });
|
|
27
|
+
return fetchedInstructions;
|
|
28
|
+
}
|
|
29
|
+
async function fetchLatestInstructions(stainlessApiKey) {
|
|
30
|
+
// Setting the stainless API key is optional, but may be required
|
|
31
|
+
// to authenticate requests to the Stainless API.
|
|
32
|
+
const response = await fetch((0, util_1.readEnv)('CODE_MODE_INSTRUCTIONS_URL') ?? 'https://api.stainless.com/api/ai/instructions/stigg', {
|
|
33
|
+
method: 'GET',
|
|
34
|
+
headers: { ...(stainlessApiKey && { Authorization: stainlessApiKey }) },
|
|
35
|
+
});
|
|
36
|
+
let instructions;
|
|
37
|
+
if (!response.ok) {
|
|
38
|
+
console.warn('Warning: failed to retrieve MCP server instructions. Proceeding with default instructions...');
|
|
39
|
+
instructions = `
|
|
40
|
+
This is the stigg MCP server. You will use Code Mode to help the user perform
|
|
41
|
+
actions. You can use search_docs tool to learn about how to take action with this server. Then,
|
|
42
|
+
you will write TypeScript code using the execute tool take action. It is CRITICAL that you be
|
|
43
|
+
thoughtful and deliberate when executing code. Always try to entirely solve the problem in code
|
|
44
|
+
block: it can be as long as you need to get the job done!
|
|
45
|
+
`;
|
|
46
|
+
}
|
|
47
|
+
instructions ??= (await response.json()).instructions;
|
|
48
|
+
instructions = `
|
|
49
|
+
If needed, you can get the current time by executing Date.now().
|
|
50
|
+
|
|
51
|
+
${instructions}
|
|
52
|
+
`;
|
|
53
|
+
return instructions;
|
|
54
|
+
}
|
|
55
|
+
//# sourceMappingURL=instructions.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"instructions.js","sourceRoot":"","sources":["src/instructions.ts"],"names":[],"mappings":";AAAA,sFAAsF;;AA0BtF,0CAWC;AAnCD,oCAAiC;AAEjC,MAAM,yBAAyB,GAAG,EAAE,GAAG,EAAE,GAAG,IAAI,CAAC,CAAC,aAAa;AAO/D,MAAM,iBAAiB,GAAG,IAAI,GAAG,EAAkC,CAAC;AAEpE,0EAA0E;AAC1E,MAAM,qBAAqB,GAAG,WAAW,CAAC,GAAG,EAAE;IAC7C,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,KAAK,MAAM,CAAC,GAAG,EAAE,KAAK,CAAC,IAAI,iBAAiB,EAAE,CAAC;QAC7C,IAAI,GAAG,GAAG,KAAK,CAAC,SAAS,GAAG,yBAAyB,EAAE,CAAC;YACtD,iBAAiB,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;QAChC,CAAC;IACH,CAAC;AACH,CAAC,EAAE,yBAAyB,CAAC,CAAC;AAE9B,iDAAiD;AACjD,qBAAqB,CAAC,KAAK,EAAE,CAAC;AAEvB,KAAK,UAAU,eAAe,CAAC,eAAmC;IACvE,MAAM,QAAQ,GAAG,eAAe,IAAI,EAAE,CAAC;IACvC,MAAM,MAAM,GAAG,iBAAiB,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAE/C,IAAI,MAAM,IAAI,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,CAAC,SAAS,IAAI,yBAAyB,EAAE,CAAC;QACzE,OAAO,MAAM,CAAC,mBAAmB,CAAC;IACpC,CAAC;IAED,MAAM,mBAAmB,GAAG,MAAM,uBAAuB,CAAC,eAAe,CAAC,CAAC;IAC3E,iBAAiB,CAAC,GAAG,CAAC,QAAQ,EAAE,EAAE,mBAAmB,EAAE,SAAS,EA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