@ductape/mcp 0.2.19 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +10 -2
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -5135,7 +5135,8 @@ function handleCliFlags() {
|
|
|
5135
5135
|
}
|
|
5136
5136
|
async function main() {
|
|
5137
5137
|
const { McpServer, StdioServerTransport } = await loadMcpSdk();
|
|
5138
|
-
const
|
|
5138
|
+
const { version: mcpVersion } = createRequire(import.meta.url)('../package.json');
|
|
5139
|
+
const server = new McpServer({ name: 'ductape-mcp', version: mcpVersion });
|
|
5139
5140
|
const transport = new StdioServerTransport();
|
|
5140
5141
|
const cliHandler = async (args) => {
|
|
5141
5142
|
const cli = checkCli();
|
|
@@ -5162,7 +5163,8 @@ async function main() {
|
|
|
5162
5163
|
const isAuthCommand = firstWord === 'login' || firstWord === 'logout';
|
|
5163
5164
|
const isLocalMigrationGuidance = (firstWord === 'migrate-codebase' && !args.command.includes('--ensure-product')) ||
|
|
5164
5165
|
firstWord.startsWith('migration-');
|
|
5165
|
-
|
|
5166
|
+
const isDiagnostic = firstWord === 'doctor';
|
|
5167
|
+
if (!isAuthCommand && !isLocalMigrationGuidance && !isDiagnostic) {
|
|
5166
5168
|
// Cache successful authentication, but re-check a missing/expired session on every call.
|
|
5167
5169
|
// The user may complete `ductape login` in another terminal while this MCP process remains
|
|
5168
5170
|
// alive; caching "none" would otherwise make the MCP blind to the newly written session.
|
|
@@ -5524,6 +5526,11 @@ async function main() {
|
|
|
5524
5526
|
}
|
|
5525
5527
|
};
|
|
5526
5528
|
if (typeof server.registerTool === 'function') {
|
|
5529
|
+
server.registerTool('ductape_doctor', {
|
|
5530
|
+
title: 'Ductape Compatibility Doctor',
|
|
5531
|
+
description: 'Report CLI, SDK, NestJS, MCP, API/schema revision, authentication, workspace, and project linkage facts without exposing credentials.',
|
|
5532
|
+
inputSchema: z.object({}).shape,
|
|
5533
|
+
}, async () => cliHandler({ command: 'doctor --json' }));
|
|
5527
5534
|
server.registerTool('ductape_execute', {
|
|
5528
5535
|
title: 'Ductape SDK Execute',
|
|
5529
5536
|
description: 'Execute a Ductape SDK RUNTIME operation via the backend proxy (publishable key).\n\n' +
|
|
@@ -5767,6 +5774,7 @@ async function main() {
|
|
|
5767
5774
|
}, cliHandler);
|
|
5768
5775
|
}
|
|
5769
5776
|
else if (typeof server.tool === 'function') {
|
|
5777
|
+
server.tool('ductape_doctor', z.object({}).shape, async () => cliHandler({ command: 'doctor --json' }));
|
|
5770
5778
|
server.tool('ductape_execute', executeInputSchema.shape, executeHandler);
|
|
5771
5779
|
server.tool('ductape_generate_payload', payloadGenerateInputSchema.shape, payloadGenerateHandler);
|
|
5772
5780
|
server.tool('ductape_generate_snippet', snippetGenerateInputSchema.shape, snippetGenerateHandler);
|