@tigerdata/mcp-boilerplate 1.1.0 → 1.3.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/dist/cliEntrypoint.js +1 -1
- package/dist/httpServer.d.ts +24 -6
- package/dist/httpServer.js +33 -11
- package/dist/skills/tool.js +5 -0
- package/dist/skills/types.d.ts +51 -258
- package/package.json +17 -17
package/dist/cliEntrypoint.js
CHANGED
|
@@ -16,7 +16,7 @@ export async function cliEntrypoint(stdioEntrypoint, httpEntrypoint, instrumenta
|
|
|
16
16
|
case 'http': {
|
|
17
17
|
let cleanup;
|
|
18
18
|
if (args.includes('--instrument') ||
|
|
19
|
-
process.env.INSTRUMENT === 'true') {
|
|
19
|
+
process.env.INSTRUMENT?.toLowerCase().trim() === 'true') {
|
|
20
20
|
const { instrument } = await import(instrumentation);
|
|
21
21
|
({ cleanup } = instrument());
|
|
22
22
|
}
|
package/dist/httpServer.d.ts
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
import type { Server } from 'node:http';
|
|
3
|
-
import express from 'express';
|
|
3
|
+
import express, { type Router } from 'express';
|
|
4
4
|
import { type AdditionalSetupArgs } from './mcpServer.js';
|
|
5
5
|
import type { BaseApiFactory, BasePromptFactory, ResourceFactory } from './types.js';
|
|
6
|
-
|
|
6
|
+
interface HttpServerOptions<Context extends Record<string, unknown>> {
|
|
7
7
|
name: string;
|
|
8
8
|
version?: string;
|
|
9
9
|
context: Context;
|
|
@@ -14,10 +14,28 @@ export declare const httpServerFactory: <Context extends Record<string, unknown>
|
|
|
14
14
|
cleanupFn?: () => void | Promise<void>;
|
|
15
15
|
stateful?: boolean;
|
|
16
16
|
instructions?: string;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
17
|
+
/**
|
|
18
|
+
* When provided, mount routers on this app/router instead of creating a new
|
|
19
|
+
* one. The caller owns the server lifecycle — `httpServerFactory` will not
|
|
20
|
+
* call `app.listen()`. The returned `server` will be `null`.
|
|
21
|
+
*/
|
|
22
|
+
app?: Router;
|
|
23
|
+
/**
|
|
24
|
+
* Path to mount the MCP router at. Defaults to `"/mcp"`.
|
|
25
|
+
*/
|
|
26
|
+
mcpPath?: string;
|
|
27
|
+
/**
|
|
28
|
+
* Path to mount the API router at. Defaults to `"/api"`.
|
|
29
|
+
*/
|
|
30
|
+
apiPath?: string;
|
|
31
|
+
}
|
|
32
|
+
interface HttpServerResult {
|
|
33
|
+
app: Router;
|
|
34
|
+
/** `null` when an external `app` was provided (caller owns the server). */
|
|
35
|
+
server: Server | null;
|
|
20
36
|
apiRouter: express.Router;
|
|
21
37
|
mcpRouter: express.Router;
|
|
22
38
|
registerCleanupFn: (fn: () => Promise<void>) => void;
|
|
23
|
-
}
|
|
39
|
+
}
|
|
40
|
+
export declare const httpServerFactory: <Context extends Record<string, unknown>>({ name, version, context, apiFactories, promptFactories, resourceFactories, additionalSetup, cleanupFn, stateful, instructions, app: externalApp, mcpPath, apiPath, }: HttpServerOptions<Context>) => Promise<HttpServerResult>;
|
|
41
|
+
export {};
|
package/dist/httpServer.js
CHANGED
|
@@ -7,14 +7,21 @@ import { log } from './logger.js';
|
|
|
7
7
|
import { mcpServerFactory } from './mcpServer.js';
|
|
8
8
|
import { registerExitHandlers } from './registerExitHandlers.js';
|
|
9
9
|
import { StatusError } from './StatusError.js';
|
|
10
|
-
export const httpServerFactory = async ({ name, version, context, apiFactories = [], promptFactories, resourceFactories, additionalSetup, cleanupFn, stateful = true, instructions, }) => {
|
|
10
|
+
export const httpServerFactory = async ({ name, version, context, apiFactories = [], promptFactories, resourceFactories, additionalSetup, cleanupFn, stateful = true, instructions, app: externalApp, mcpPath = '/mcp', apiPath = '/api', }) => {
|
|
11
11
|
const cleanupFns = cleanupFn
|
|
12
12
|
? [cleanupFn]
|
|
13
13
|
: [];
|
|
14
14
|
const exitHandler = registerExitHandlers(cleanupFns);
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
15
|
+
let app;
|
|
16
|
+
let ownApp;
|
|
17
|
+
if (externalApp) {
|
|
18
|
+
app = externalApp;
|
|
19
|
+
}
|
|
20
|
+
else {
|
|
21
|
+
ownApp = express();
|
|
22
|
+
ownApp.enable('trust proxy');
|
|
23
|
+
app = ownApp;
|
|
24
|
+
}
|
|
18
25
|
const PORT = process.env.PORT || 3001;
|
|
19
26
|
const inspector = process.env.NODE_ENV !== 'production' ||
|
|
20
27
|
['1', 'true'].includes(process.env.ENABLE_INSPECTOR ?? '0');
|
|
@@ -30,10 +37,10 @@ export const httpServerFactory = async ({ name, version, context, apiFactories =
|
|
|
30
37
|
instructions,
|
|
31
38
|
}), { name, stateful, inspector });
|
|
32
39
|
cleanupFns.push(mcpCleanup);
|
|
33
|
-
app.use(
|
|
40
|
+
app.use(mcpPath, mcpRouter);
|
|
34
41
|
const [apiRouter, apiCleanup] = await apiRouterFactory(context, apiFactories);
|
|
35
42
|
cleanupFns.push(apiCleanup);
|
|
36
|
-
app.use(
|
|
43
|
+
app.use(apiPath, apiRouter);
|
|
37
44
|
// Error handler
|
|
38
45
|
app.use((err, _req, res, _next) => {
|
|
39
46
|
if (err instanceof StatusError && err.status < 500) {
|
|
@@ -49,19 +56,34 @@ export const httpServerFactory = async ({ name, version, context, apiFactories =
|
|
|
49
56
|
.status(err instanceof StatusError ? err.status : 500)
|
|
50
57
|
.json({ error: err.message });
|
|
51
58
|
});
|
|
52
|
-
if (inspector) {
|
|
59
|
+
if (inspector && 'listen' in app) {
|
|
60
|
+
const expressApp = app;
|
|
53
61
|
process.env.MCP_USE_ANONYMIZED_TELEMETRY = 'false';
|
|
54
62
|
import('@mcp-use/inspector')
|
|
55
63
|
.then(({ mountInspector }) => {
|
|
56
|
-
|
|
57
|
-
mountInspector(
|
|
64
|
+
expressApp.use(bodyParser.json());
|
|
65
|
+
mountInspector(expressApp, {
|
|
58
66
|
autoConnectUrl: process.env.MCP_PUBLIC_URL ?? `http://localhost:${PORT}/mcp`,
|
|
59
67
|
});
|
|
60
68
|
})
|
|
61
69
|
.catch(log.error);
|
|
62
70
|
}
|
|
63
|
-
//
|
|
64
|
-
|
|
71
|
+
// When an external app is provided, the caller owns the server lifecycle.
|
|
72
|
+
if (externalApp) {
|
|
73
|
+
return {
|
|
74
|
+
app,
|
|
75
|
+
server: null,
|
|
76
|
+
apiRouter,
|
|
77
|
+
mcpRouter,
|
|
78
|
+
registerCleanupFn: (fn) => {
|
|
79
|
+
cleanupFns.push(fn);
|
|
80
|
+
},
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
// Start the server (ownApp is guaranteed to exist here — we returned early for external apps)
|
|
84
|
+
if (!ownApp)
|
|
85
|
+
throw new Error('Expected own Express app');
|
|
86
|
+
const server = ownApp.listen(PORT, async (error) => {
|
|
65
87
|
if (error) {
|
|
66
88
|
log.error('Error starting HTTP server:', error);
|
|
67
89
|
exitHandler(1);
|
package/dist/skills/tool.js
CHANGED
|
@@ -17,6 +17,11 @@ export const createViewSkillToolFactory = (options = {}) => async (ctx, mcpFlags
|
|
|
17
17
|
: ''}`,
|
|
18
18
|
inputSchema: zViewSkillInputSchema,
|
|
19
19
|
outputSchema: zViewSkillOutputSchema,
|
|
20
|
+
annotations: {
|
|
21
|
+
readOnlyHint: true,
|
|
22
|
+
idempotentHint: true,
|
|
23
|
+
openWorldHint: true,
|
|
24
|
+
},
|
|
20
25
|
},
|
|
21
26
|
fn: async ({ skill_name: name, path, }) => {
|
|
22
27
|
if (!name || name === '.') {
|
package/dist/skills/types.d.ts
CHANGED
|
@@ -1,32 +1,23 @@
|
|
|
1
1
|
import type { Octokit } from '@octokit/rest';
|
|
2
2
|
import { z } from 'zod';
|
|
3
3
|
import type { InferSchema } from '../types.js';
|
|
4
|
-
export declare const zSkillType: z.ZodEnum<
|
|
4
|
+
export declare const zSkillType: z.ZodEnum<{
|
|
5
|
+
local: "local";
|
|
6
|
+
local_collection: "local_collection";
|
|
7
|
+
github: "github";
|
|
8
|
+
github_collection: "github_collection";
|
|
9
|
+
}>;
|
|
5
10
|
export type SkillType = z.infer<typeof zSkillType>;
|
|
6
11
|
export declare const zLocalSkillCfg: z.ZodObject<{
|
|
7
12
|
type: z.ZodLiteral<"local">;
|
|
8
13
|
path: z.ZodString;
|
|
9
|
-
},
|
|
10
|
-
type: "local";
|
|
11
|
-
path: string;
|
|
12
|
-
}, {
|
|
13
|
-
type: "local";
|
|
14
|
-
path: string;
|
|
15
|
-
}>;
|
|
14
|
+
}, z.core.$strip>;
|
|
16
15
|
export type LocalSkillCfg = z.infer<typeof zLocalSkillCfg>;
|
|
17
16
|
declare const zCollectionFlagsCfg: z.ZodObject<{
|
|
18
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
19
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
20
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
21
|
-
},
|
|
22
|
-
enabled_skills?: string[] | undefined;
|
|
23
|
-
disabled_skills?: string[] | undefined;
|
|
24
|
-
ignored_paths?: string[] | undefined;
|
|
25
|
-
}, {
|
|
26
|
-
enabled_skills?: string[] | undefined;
|
|
27
|
-
disabled_skills?: string[] | undefined;
|
|
28
|
-
ignored_paths?: string[] | undefined;
|
|
29
|
-
}>;
|
|
17
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
18
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
19
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
20
|
+
}, z.core.$strip>;
|
|
30
21
|
export type CollectionFlagsCfg = z.infer<typeof zCollectionFlagsCfg>;
|
|
31
22
|
export interface CollectionFlags {
|
|
32
23
|
enabledSkills: Set<string> | null;
|
|
@@ -34,315 +25,117 @@ export interface CollectionFlags {
|
|
|
34
25
|
ignoredPaths: Set<string> | null;
|
|
35
26
|
}
|
|
36
27
|
export declare const zLocalCollectionSkillCfg: z.ZodObject<{
|
|
37
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
38
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
39
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
40
|
-
} & {
|
|
28
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
29
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
30
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
41
31
|
type: z.ZodLiteral<"local_collection">;
|
|
42
32
|
path: z.ZodString;
|
|
43
|
-
},
|
|
44
|
-
type: "local_collection";
|
|
45
|
-
path: string;
|
|
46
|
-
enabled_skills?: string[] | undefined;
|
|
47
|
-
disabled_skills?: string[] | undefined;
|
|
48
|
-
ignored_paths?: string[] | undefined;
|
|
49
|
-
}, {
|
|
50
|
-
type: "local_collection";
|
|
51
|
-
path: string;
|
|
52
|
-
enabled_skills?: string[] | undefined;
|
|
53
|
-
disabled_skills?: string[] | undefined;
|
|
54
|
-
ignored_paths?: string[] | undefined;
|
|
55
|
-
}>;
|
|
33
|
+
}, z.core.$strip>;
|
|
56
34
|
export type LocalCollectionSkillCfg = z.infer<typeof zLocalCollectionSkillCfg>;
|
|
57
35
|
export declare const zGitHubSkillCfg: z.ZodObject<{
|
|
58
36
|
type: z.ZodLiteral<"github">;
|
|
59
37
|
repo: z.ZodString;
|
|
60
38
|
path: z.ZodOptional<z.ZodString>;
|
|
61
|
-
},
|
|
62
|
-
type: "github";
|
|
63
|
-
repo: string;
|
|
64
|
-
path?: string | undefined;
|
|
65
|
-
}, {
|
|
66
|
-
type: "github";
|
|
67
|
-
repo: string;
|
|
68
|
-
path?: string | undefined;
|
|
69
|
-
}>;
|
|
39
|
+
}, z.core.$strip>;
|
|
70
40
|
export type GitHubSkillCfg = z.infer<typeof zGitHubSkillCfg>;
|
|
71
41
|
export declare const zGitHubCollectionSkillCfg: z.ZodObject<{
|
|
72
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
73
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString
|
|
74
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString
|
|
75
|
-
} & {
|
|
42
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
43
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
44
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
76
45
|
type: z.ZodLiteral<"github_collection">;
|
|
77
46
|
repo: z.ZodString;
|
|
78
47
|
path: z.ZodOptional<z.ZodString>;
|
|
79
|
-
},
|
|
80
|
-
type: "github_collection";
|
|
81
|
-
repo: string;
|
|
82
|
-
path?: string | undefined;
|
|
83
|
-
enabled_skills?: string[] | undefined;
|
|
84
|
-
disabled_skills?: string[] | undefined;
|
|
85
|
-
ignored_paths?: string[] | undefined;
|
|
86
|
-
}, {
|
|
87
|
-
type: "github_collection";
|
|
88
|
-
repo: string;
|
|
89
|
-
path?: string | undefined;
|
|
90
|
-
enabled_skills?: string[] | undefined;
|
|
91
|
-
disabled_skills?: string[] | undefined;
|
|
92
|
-
ignored_paths?: string[] | undefined;
|
|
93
|
-
}>;
|
|
48
|
+
}, z.core.$strip>;
|
|
94
49
|
export type GitHubCollectionSkillCfg = z.infer<typeof zGitHubCollectionSkillCfg>;
|
|
95
|
-
export declare const zSkillCfg: z.ZodDiscriminatedUnion<
|
|
50
|
+
export declare const zSkillCfg: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
96
51
|
type: z.ZodLiteral<"local">;
|
|
97
52
|
path: z.ZodString;
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
type: "local";
|
|
103
|
-
path: string;
|
|
104
|
-
}>, z.ZodObject<{
|
|
105
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
106
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
107
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
108
|
-
} & {
|
|
53
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
54
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
55
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
56
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
109
57
|
type: z.ZodLiteral<"local_collection">;
|
|
110
58
|
path: z.ZodString;
|
|
111
|
-
},
|
|
112
|
-
type: "local_collection";
|
|
113
|
-
path: string;
|
|
114
|
-
enabled_skills?: string[] | undefined;
|
|
115
|
-
disabled_skills?: string[] | undefined;
|
|
116
|
-
ignored_paths?: string[] | undefined;
|
|
117
|
-
}, {
|
|
118
|
-
type: "local_collection";
|
|
119
|
-
path: string;
|
|
120
|
-
enabled_skills?: string[] | undefined;
|
|
121
|
-
disabled_skills?: string[] | undefined;
|
|
122
|
-
ignored_paths?: string[] | undefined;
|
|
123
|
-
}>, z.ZodObject<{
|
|
59
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
124
60
|
type: z.ZodLiteral<"github">;
|
|
125
61
|
repo: z.ZodString;
|
|
126
62
|
path: z.ZodOptional<z.ZodString>;
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
}, {
|
|
132
|
-
type: "github";
|
|
133
|
-
repo: string;
|
|
134
|
-
path?: string | undefined;
|
|
135
|
-
}>, z.ZodObject<{
|
|
136
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
137
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
138
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
139
|
-
} & {
|
|
63
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
64
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
65
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
66
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
140
67
|
type: z.ZodLiteral<"github_collection">;
|
|
141
68
|
repo: z.ZodString;
|
|
142
69
|
path: z.ZodOptional<z.ZodString>;
|
|
143
|
-
},
|
|
144
|
-
type: "github_collection";
|
|
145
|
-
repo: string;
|
|
146
|
-
path?: string | undefined;
|
|
147
|
-
enabled_skills?: string[] | undefined;
|
|
148
|
-
disabled_skills?: string[] | undefined;
|
|
149
|
-
ignored_paths?: string[] | undefined;
|
|
150
|
-
}, {
|
|
151
|
-
type: "github_collection";
|
|
152
|
-
repo: string;
|
|
153
|
-
path?: string | undefined;
|
|
154
|
-
enabled_skills?: string[] | undefined;
|
|
155
|
-
disabled_skills?: string[] | undefined;
|
|
156
|
-
ignored_paths?: string[] | undefined;
|
|
157
|
-
}>]>;
|
|
70
|
+
}, z.core.$strip>], "type">;
|
|
158
71
|
export type SkillCfg = z.infer<typeof zSkillCfg>;
|
|
159
|
-
export declare const zSkillCfgMap: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<
|
|
72
|
+
export declare const zSkillCfgMap: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
160
73
|
type: z.ZodLiteral<"local">;
|
|
161
74
|
path: z.ZodString;
|
|
162
|
-
},
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
type: "local";
|
|
167
|
-
path: string;
|
|
168
|
-
}>, z.ZodObject<{
|
|
169
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
170
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
171
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
172
|
-
} & {
|
|
75
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
76
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
77
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
78
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
173
79
|
type: z.ZodLiteral<"local_collection">;
|
|
174
80
|
path: z.ZodString;
|
|
175
|
-
},
|
|
176
|
-
type: "local_collection";
|
|
177
|
-
path: string;
|
|
178
|
-
enabled_skills?: string[] | undefined;
|
|
179
|
-
disabled_skills?: string[] | undefined;
|
|
180
|
-
ignored_paths?: string[] | undefined;
|
|
181
|
-
}, {
|
|
182
|
-
type: "local_collection";
|
|
183
|
-
path: string;
|
|
184
|
-
enabled_skills?: string[] | undefined;
|
|
185
|
-
disabled_skills?: string[] | undefined;
|
|
186
|
-
ignored_paths?: string[] | undefined;
|
|
187
|
-
}>, z.ZodObject<{
|
|
81
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
188
82
|
type: z.ZodLiteral<"github">;
|
|
189
83
|
repo: z.ZodString;
|
|
190
84
|
path: z.ZodOptional<z.ZodString>;
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}, {
|
|
196
|
-
type: "github";
|
|
197
|
-
repo: string;
|
|
198
|
-
path?: string | undefined;
|
|
199
|
-
}>, z.ZodObject<{
|
|
200
|
-
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
201
|
-
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
202
|
-
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
203
|
-
} & {
|
|
85
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
86
|
+
enabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
87
|
+
disabled_skills: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
88
|
+
ignored_paths: z.ZodOptional<z.ZodArray<z.ZodString>>;
|
|
204
89
|
type: z.ZodLiteral<"github_collection">;
|
|
205
90
|
repo: z.ZodString;
|
|
206
91
|
path: z.ZodOptional<z.ZodString>;
|
|
207
|
-
},
|
|
208
|
-
type: "github_collection";
|
|
209
|
-
repo: string;
|
|
210
|
-
path?: string | undefined;
|
|
211
|
-
enabled_skills?: string[] | undefined;
|
|
212
|
-
disabled_skills?: string[] | undefined;
|
|
213
|
-
ignored_paths?: string[] | undefined;
|
|
214
|
-
}, {
|
|
215
|
-
type: "github_collection";
|
|
216
|
-
repo: string;
|
|
217
|
-
path?: string | undefined;
|
|
218
|
-
enabled_skills?: string[] | undefined;
|
|
219
|
-
disabled_skills?: string[] | undefined;
|
|
220
|
-
ignored_paths?: string[] | undefined;
|
|
221
|
-
}>]>>;
|
|
92
|
+
}, z.core.$strip>], "type">>;
|
|
222
93
|
export type SkillCfgMap = z.infer<typeof zSkillCfgMap>;
|
|
223
94
|
export declare const zSkillMatter: z.ZodObject<{
|
|
224
95
|
name: z.ZodString;
|
|
225
96
|
description: z.ZodString;
|
|
226
|
-
},
|
|
227
|
-
description: string;
|
|
228
|
-
name: string;
|
|
229
|
-
}, {
|
|
230
|
-
description: string;
|
|
231
|
-
name: string;
|
|
232
|
-
}>;
|
|
97
|
+
}, z.core.$strip>;
|
|
233
98
|
export type SkillMatter = z.infer<typeof zSkillMatter>;
|
|
234
99
|
export declare const zLocalSkill: z.ZodObject<{
|
|
235
100
|
name: z.ZodString;
|
|
236
101
|
description: z.ZodString;
|
|
237
|
-
} & {
|
|
238
102
|
type: z.ZodLiteral<"local">;
|
|
239
103
|
path: z.ZodString;
|
|
240
|
-
},
|
|
241
|
-
type: "local";
|
|
242
|
-
description: string;
|
|
243
|
-
name: string;
|
|
244
|
-
path: string;
|
|
245
|
-
}, {
|
|
246
|
-
type: "local";
|
|
247
|
-
description: string;
|
|
248
|
-
name: string;
|
|
249
|
-
path: string;
|
|
250
|
-
}>;
|
|
104
|
+
}, z.core.$strip>;
|
|
251
105
|
export type LocalSkill = z.infer<typeof zLocalSkill>;
|
|
252
106
|
export declare const zGitHubSkill: z.ZodObject<{
|
|
253
107
|
name: z.ZodString;
|
|
254
108
|
description: z.ZodString;
|
|
255
|
-
} & {
|
|
256
109
|
type: z.ZodLiteral<"github">;
|
|
257
110
|
repo: z.ZodString;
|
|
258
111
|
path: z.ZodOptional<z.ZodString>;
|
|
259
|
-
},
|
|
260
|
-
type: "github";
|
|
261
|
-
description: string;
|
|
262
|
-
name: string;
|
|
263
|
-
repo: string;
|
|
264
|
-
path?: string | undefined;
|
|
265
|
-
}, {
|
|
266
|
-
type: "github";
|
|
267
|
-
description: string;
|
|
268
|
-
name: string;
|
|
269
|
-
repo: string;
|
|
270
|
-
path?: string | undefined;
|
|
271
|
-
}>;
|
|
112
|
+
}, z.core.$strip>;
|
|
272
113
|
export type GitHubSkill = z.infer<typeof zGitHubSkill>;
|
|
273
|
-
export declare const zSkill: z.ZodDiscriminatedUnion<
|
|
114
|
+
export declare const zSkill: z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
274
115
|
name: z.ZodString;
|
|
275
116
|
description: z.ZodString;
|
|
276
|
-
} & {
|
|
277
117
|
type: z.ZodLiteral<"local">;
|
|
278
118
|
path: z.ZodString;
|
|
279
|
-
},
|
|
280
|
-
type: "local";
|
|
281
|
-
description: string;
|
|
282
|
-
name: string;
|
|
283
|
-
path: string;
|
|
284
|
-
}, {
|
|
285
|
-
type: "local";
|
|
286
|
-
description: string;
|
|
287
|
-
name: string;
|
|
288
|
-
path: string;
|
|
289
|
-
}>, z.ZodObject<{
|
|
119
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
290
120
|
name: z.ZodString;
|
|
291
121
|
description: z.ZodString;
|
|
292
|
-
} & {
|
|
293
122
|
type: z.ZodLiteral<"github">;
|
|
294
123
|
repo: z.ZodString;
|
|
295
124
|
path: z.ZodOptional<z.ZodString>;
|
|
296
|
-
},
|
|
297
|
-
type: "github";
|
|
298
|
-
description: string;
|
|
299
|
-
name: string;
|
|
300
|
-
repo: string;
|
|
301
|
-
path?: string | undefined;
|
|
302
|
-
}, {
|
|
303
|
-
type: "github";
|
|
304
|
-
description: string;
|
|
305
|
-
name: string;
|
|
306
|
-
repo: string;
|
|
307
|
-
path?: string | undefined;
|
|
308
|
-
}>]>;
|
|
125
|
+
}, z.core.$strip>], "type">;
|
|
309
126
|
export type Skill = z.infer<typeof zSkill>;
|
|
310
|
-
export declare const zSkillMap: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<
|
|
127
|
+
export declare const zSkillMap: z.ZodRecord<z.ZodString, z.ZodDiscriminatedUnion<[z.ZodObject<{
|
|
311
128
|
name: z.ZodString;
|
|
312
129
|
description: z.ZodString;
|
|
313
|
-
} & {
|
|
314
130
|
type: z.ZodLiteral<"local">;
|
|
315
131
|
path: z.ZodString;
|
|
316
|
-
},
|
|
317
|
-
type: "local";
|
|
318
|
-
description: string;
|
|
319
|
-
name: string;
|
|
320
|
-
path: string;
|
|
321
|
-
}, {
|
|
322
|
-
type: "local";
|
|
323
|
-
description: string;
|
|
324
|
-
name: string;
|
|
325
|
-
path: string;
|
|
326
|
-
}>, z.ZodObject<{
|
|
132
|
+
}, z.core.$strip>, z.ZodObject<{
|
|
327
133
|
name: z.ZodString;
|
|
328
134
|
description: z.ZodString;
|
|
329
|
-
} & {
|
|
330
135
|
type: z.ZodLiteral<"github">;
|
|
331
136
|
repo: z.ZodString;
|
|
332
137
|
path: z.ZodOptional<z.ZodString>;
|
|
333
|
-
},
|
|
334
|
-
type: "github";
|
|
335
|
-
description: string;
|
|
336
|
-
name: string;
|
|
337
|
-
repo: string;
|
|
338
|
-
path?: string | undefined;
|
|
339
|
-
}, {
|
|
340
|
-
type: "github";
|
|
341
|
-
description: string;
|
|
342
|
-
name: string;
|
|
343
|
-
repo: string;
|
|
344
|
-
path?: string | undefined;
|
|
345
|
-
}>]>>;
|
|
138
|
+
}, z.core.$strip>], "type">>;
|
|
346
139
|
export type SkillMap = z.infer<typeof zSkillMap>;
|
|
347
140
|
export interface SkillsFlags {
|
|
348
141
|
enabledSkills?: Set<string> | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tigerdata/mcp-boilerplate",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "MCP boilerplate code for Node.js",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "TigerData",
|
|
@@ -40,16 +40,16 @@
|
|
|
40
40
|
"lint": "./bun x @biomejs/biome check"
|
|
41
41
|
},
|
|
42
42
|
"dependencies": {
|
|
43
|
-
"@mcp-use/inspector": "^0.
|
|
44
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
43
|
+
"@mcp-use/inspector": "^0.24.5",
|
|
44
|
+
"@modelcontextprotocol/sdk": "^1.27.1",
|
|
45
45
|
"@opentelemetry/api": "^1.9.0",
|
|
46
|
-
"@opentelemetry/auto-instrumentations-node": "^0.
|
|
47
|
-
"@opentelemetry/exporter-trace-otlp-grpc": "^0.
|
|
48
|
-
"@opentelemetry/instrumentation-http": "^0.
|
|
49
|
-
"@opentelemetry/sdk-metrics": "^2.
|
|
50
|
-
"@opentelemetry/sdk-node": "^0.
|
|
51
|
-
"@opentelemetry/sdk-trace-node": "^2.
|
|
52
|
-
"@opentelemetry/semantic-conventions": "^1.
|
|
46
|
+
"@opentelemetry/auto-instrumentations-node": "^0.71.0",
|
|
47
|
+
"@opentelemetry/exporter-trace-otlp-grpc": "^0.213.0",
|
|
48
|
+
"@opentelemetry/instrumentation-http": "^0.213.0",
|
|
49
|
+
"@opentelemetry/sdk-metrics": "^2.6.0",
|
|
50
|
+
"@opentelemetry/sdk-node": "^0.213.0",
|
|
51
|
+
"@opentelemetry/sdk-trace-node": "^2.6.0",
|
|
52
|
+
"@opentelemetry/semantic-conventions": "^1.40.0",
|
|
53
53
|
"@toon-format/toon": "^2.1.0",
|
|
54
54
|
"express": "^5.2.1",
|
|
55
55
|
"gray-matter": "^4.0.3",
|
|
@@ -60,15 +60,15 @@
|
|
|
60
60
|
"zod": "^3.25 || ^4.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"@biomejs/biome": "^2.
|
|
64
|
-
"zod": "^3.
|
|
63
|
+
"@biomejs/biome": "^2.4.8",
|
|
64
|
+
"zod": "^4.3.6",
|
|
65
65
|
"@octokit/rest": "^22.0.1",
|
|
66
|
-
"@types/bun": "^1.3.
|
|
66
|
+
"@types/bun": "^1.3.10",
|
|
67
67
|
"@types/express": "^5.0.6",
|
|
68
|
-
"@types/node": "^22.19.
|
|
69
|
-
"@typescript-eslint/typescript-estree": "^8.
|
|
70
|
-
"ai": "^5.0.
|
|
71
|
-
"eslint": "^9.39.
|
|
68
|
+
"@types/node": "^22.19.15",
|
|
69
|
+
"@typescript-eslint/typescript-estree": "^8.57.1",
|
|
70
|
+
"ai": "^5.0.155",
|
|
71
|
+
"eslint": "^9.39.4",
|
|
72
72
|
"typescript": "^5.9.3"
|
|
73
73
|
},
|
|
74
74
|
"publishConfig": {
|