@172ai/containers-mcp-server 1.12.4 → 1.12.6
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/config.js +1 -1
- package/dist/config.js.map +1 -1
- package/dist/server.d.ts +20 -0
- package/dist/server.d.ts.map +1 -1
- package/dist/server.js +282 -0
- package/dist/server.js.map +1 -1
- package/dist/services/executionService.d.ts.map +1 -1
- package/dist/services/executionService.js +6 -3
- package/dist/services/executionService.js.map +1 -1
- package/dist/services/modificationService.d.ts +121 -0
- package/dist/services/modificationService.d.ts.map +1 -0
- package/dist/services/modificationService.js +137 -0
- package/dist/services/modificationService.js.map +1 -0
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
package/dist/config.js
CHANGED
|
@@ -18,7 +18,7 @@ if (process.env.NODE_ENV === 'development') {
|
|
|
18
18
|
* Default configuration values
|
|
19
19
|
*/
|
|
20
20
|
const DEFAULT_CONFIG = {
|
|
21
|
-
baseUrl: process.env.API_BASE_URL || 'https://
|
|
21
|
+
baseUrl: process.env.API_BASE_URL || 'https://api.172.ai',
|
|
22
22
|
environment: process.env.NODE_ENV || 'development',
|
|
23
23
|
logLevel: process.env.LOG_LEVEL || 'info',
|
|
24
24
|
rateLimits: {
|
package/dist/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../src/config.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AACjC,OAAO,KAAK,IAAI,MAAM,MAAM,CAAC;AAC7B,OAAO,KAAK,EAAE,MAAM,IAAI,CAAC;AAEzB,wEAAwE;AACxE,MAAM,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,qBAAqB,CAAC,CAAC;AACnE,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,IAAI,EAAE,WAAW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AAE,OAAO,CAAC,CAAC;QACpC,IAAI,CAAC,cAAc,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACnC,CAAC;CACF;AAED,4BAA4B;AAC5B,MAAM,CAAC,MAAM,MAAM,GAAG,IAAI,MAAM,EAAE,CAAC"}
|
package/dist/server.d.ts
CHANGED
|
@@ -110,6 +110,26 @@ declare class ContainerMCPServer {
|
|
|
110
110
|
* Get all progress updates for debugging
|
|
111
111
|
*/
|
|
112
112
|
private handleGetAllProgressUpdates;
|
|
113
|
+
/**
|
|
114
|
+
* Handle list modifications
|
|
115
|
+
*/
|
|
116
|
+
private handleListModifications;
|
|
117
|
+
/**
|
|
118
|
+
* Handle suggest container modifications
|
|
119
|
+
*/
|
|
120
|
+
private handleSuggestContainerModifications;
|
|
121
|
+
/**
|
|
122
|
+
* Handle apply container modification
|
|
123
|
+
*/
|
|
124
|
+
private handleApplyContainerModification;
|
|
125
|
+
/**
|
|
126
|
+
* Handle get modification status
|
|
127
|
+
*/
|
|
128
|
+
private handleGetModificationStatus;
|
|
129
|
+
/**
|
|
130
|
+
* Handle list applied modifications
|
|
131
|
+
*/
|
|
132
|
+
private handleListAppliedModifications;
|
|
113
133
|
/**
|
|
114
134
|
* Get container development workflow content
|
|
115
135
|
*/
|
package/dist/server.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AA8BA;;;;;GAKG;AACH,cAAM,kBAAkB;IACtB,OAAO,CAAC,MAAM,CAAS;;IAsBvB;;;OAGG;YACW,mBAAmB;IAwCjC;;OAEG;IACH,OAAO,CAAC,UAAU;IAiBlB;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAmL3B;;OAEG;IACH,OAAO,CAAC,2BAA2B;IAkFnC;;OAEG;IACH,OAAO,CAAC,WAA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AA8B;IA8B5C;;OAEG;IACH,OAAO,CAAC,sCAAsC;IAwG9C;;OAEG;IACH,OAAO,CAAC,oCAAoC;IAgG5C;;OAEG;IACH,OAAO,CAAC,qCAAqC;IA8H7C;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAwLxC;;OAEG;IACG,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC;IA8B5B;;OAEG;YACW,QAAQ;CAkBvB;AAID,OAAO,EAAE,kBAAkB,EAAE,CAAC"}
|
package/dist/server.js
CHANGED
|
@@ -15,6 +15,7 @@ import { exportService } from './services/exportService.js';
|
|
|
15
15
|
import { streamingService } from './services/streamingService.js';
|
|
16
16
|
import { userNotificationManager } from './services/userNotificationManager.js';
|
|
17
17
|
import { userService } from './services/userService.js';
|
|
18
|
+
import { modificationService } from './services/modificationService.js';
|
|
18
19
|
import { ErrorHandler } from './utils/errorHandler.js';
|
|
19
20
|
/**
|
|
20
21
|
* 172.ai Container Management MCP Server
|
|
@@ -33,6 +34,7 @@ class ContainerMCPServer {
|
|
|
33
34
|
executionService.setMCPServer(this.server);
|
|
34
35
|
importService.setMCPServer(this.server);
|
|
35
36
|
exportService.setMCPServer(this.server);
|
|
37
|
+
modificationService.setMCPServer(this.server);
|
|
36
38
|
this.setupTools();
|
|
37
39
|
this.setupErrorHandlers();
|
|
38
40
|
this.initializeStreaming();
|
|
@@ -236,6 +238,16 @@ class ContainerMCPServer {
|
|
|
236
238
|
return await this.handleGetExecutionProgressUpdate(args);
|
|
237
239
|
case 'get_all_progress_updates':
|
|
238
240
|
return await this.handleGetAllProgressUpdates(args);
|
|
241
|
+
case 'list_modifications':
|
|
242
|
+
return await this.handleListModifications(args);
|
|
243
|
+
case 'suggest_container_modifications':
|
|
244
|
+
return await this.handleSuggestContainerModifications(args);
|
|
245
|
+
case 'apply_container_modification':
|
|
246
|
+
return await this.handleApplyContainerModification(args);
|
|
247
|
+
case 'get_modification_status':
|
|
248
|
+
return await this.handleGetModificationStatus(args);
|
|
249
|
+
case 'list_applied_modifications':
|
|
250
|
+
return await this.handleListAppliedModifications(args);
|
|
239
251
|
default:
|
|
240
252
|
throw ErrorHandler.createValidationError(`Unknown tool: ${name}`);
|
|
241
253
|
}
|
|
@@ -1616,6 +1628,130 @@ Follow same metadata requirements as create_container.`,
|
|
|
1616
1628
|
type: 'object',
|
|
1617
1629
|
properties: {}
|
|
1618
1630
|
}
|
|
1631
|
+
},
|
|
1632
|
+
// Modification Management Tools
|
|
1633
|
+
{
|
|
1634
|
+
name: 'list_modifications',
|
|
1635
|
+
description: 'List all available modifications in the catalog',
|
|
1636
|
+
inputSchema: {
|
|
1637
|
+
type: 'object',
|
|
1638
|
+
properties: {
|
|
1639
|
+
category: {
|
|
1640
|
+
type: 'string',
|
|
1641
|
+
description: 'Filter by category (optional)'
|
|
1642
|
+
},
|
|
1643
|
+
tags: {
|
|
1644
|
+
type: 'string',
|
|
1645
|
+
description: 'Filter by tags (comma-separated, optional)'
|
|
1646
|
+
},
|
|
1647
|
+
active: {
|
|
1648
|
+
type: 'boolean',
|
|
1649
|
+
default: true,
|
|
1650
|
+
description: 'Filter by active status (default: true)'
|
|
1651
|
+
}
|
|
1652
|
+
}
|
|
1653
|
+
}
|
|
1654
|
+
},
|
|
1655
|
+
{
|
|
1656
|
+
name: 'suggest_container_modifications',
|
|
1657
|
+
description: 'Get AI-powered modification suggestions for a container',
|
|
1658
|
+
inputSchema: {
|
|
1659
|
+
type: 'object',
|
|
1660
|
+
properties: {
|
|
1661
|
+
containerId: {
|
|
1662
|
+
type: 'string',
|
|
1663
|
+
description: 'ID of the container to analyze'
|
|
1664
|
+
},
|
|
1665
|
+
categories: {
|
|
1666
|
+
type: 'array',
|
|
1667
|
+
items: { type: 'string' },
|
|
1668
|
+
description: 'Filter suggestions by categories (optional)'
|
|
1669
|
+
},
|
|
1670
|
+
includeRisks: {
|
|
1671
|
+
type: 'boolean',
|
|
1672
|
+
default: true,
|
|
1673
|
+
description: 'Include risk assessment (default: true)'
|
|
1674
|
+
}
|
|
1675
|
+
},
|
|
1676
|
+
required: ['containerId']
|
|
1677
|
+
}
|
|
1678
|
+
},
|
|
1679
|
+
{
|
|
1680
|
+
name: 'apply_container_modification',
|
|
1681
|
+
description: 'Apply a modification to a container',
|
|
1682
|
+
inputSchema: {
|
|
1683
|
+
type: 'object',
|
|
1684
|
+
properties: {
|
|
1685
|
+
containerId: {
|
|
1686
|
+
type: 'string',
|
|
1687
|
+
description: 'ID of the container'
|
|
1688
|
+
},
|
|
1689
|
+
modificationId: {
|
|
1690
|
+
type: 'string',
|
|
1691
|
+
description: 'ID of the modification to apply'
|
|
1692
|
+
},
|
|
1693
|
+
autoBuild: {
|
|
1694
|
+
type: 'boolean',
|
|
1695
|
+
default: true,
|
|
1696
|
+
description: 'Automatically build after applying (default: true)'
|
|
1697
|
+
},
|
|
1698
|
+
notes: {
|
|
1699
|
+
type: 'string',
|
|
1700
|
+
description: 'Optional notes about this application'
|
|
1701
|
+
}
|
|
1702
|
+
},
|
|
1703
|
+
required: ['containerId', 'modificationId']
|
|
1704
|
+
}
|
|
1705
|
+
},
|
|
1706
|
+
{
|
|
1707
|
+
name: 'get_modification_status',
|
|
1708
|
+
description: 'Get detailed information about a specific modification application',
|
|
1709
|
+
inputSchema: {
|
|
1710
|
+
type: 'object',
|
|
1711
|
+
properties: {
|
|
1712
|
+
containerId: {
|
|
1713
|
+
type: 'string',
|
|
1714
|
+
description: 'ID of the container'
|
|
1715
|
+
},
|
|
1716
|
+
modificationApplicationId: {
|
|
1717
|
+
type: 'string',
|
|
1718
|
+
description: 'ID of the modification application'
|
|
1719
|
+
}
|
|
1720
|
+
},
|
|
1721
|
+
required: ['containerId', 'modificationApplicationId']
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
{
|
|
1725
|
+
name: 'list_applied_modifications',
|
|
1726
|
+
description: 'List modifications applied to a specific container',
|
|
1727
|
+
inputSchema: {
|
|
1728
|
+
type: 'object',
|
|
1729
|
+
properties: {
|
|
1730
|
+
containerId: {
|
|
1731
|
+
type: 'string',
|
|
1732
|
+
description: 'ID of the container'
|
|
1733
|
+
},
|
|
1734
|
+
status: {
|
|
1735
|
+
type: 'string',
|
|
1736
|
+
enum: ['in_progress', 'completed', 'failed'],
|
|
1737
|
+
description: 'Filter by status (optional)'
|
|
1738
|
+
},
|
|
1739
|
+
limit: {
|
|
1740
|
+
type: 'number',
|
|
1741
|
+
minimum: 1,
|
|
1742
|
+
maximum: 100,
|
|
1743
|
+
default: 50,
|
|
1744
|
+
description: 'Maximum number of results (default: 50)'
|
|
1745
|
+
},
|
|
1746
|
+
offset: {
|
|
1747
|
+
type: 'number',
|
|
1748
|
+
minimum: 0,
|
|
1749
|
+
default: 0,
|
|
1750
|
+
description: 'Number of results to skip (default: 0)'
|
|
1751
|
+
}
|
|
1752
|
+
},
|
|
1753
|
+
required: ['containerId']
|
|
1754
|
+
}
|
|
1619
1755
|
}
|
|
1620
1756
|
];
|
|
1621
1757
|
}
|
|
@@ -2434,11 +2570,15 @@ Follow same metadata requirements as create_container.`,
|
|
|
2434
2570
|
}
|
|
2435
2571
|
async handleGetExecutionStatus(args) {
|
|
2436
2572
|
const result = await executionService.getExecutionStatus(args);
|
|
2573
|
+
// Build status message with clear indication of active vs historical
|
|
2574
|
+
const statusType = result.isActive ? 'Active Execution' : 'Latest Execution (Historical)';
|
|
2575
|
+
const statusMessage = result.message ? `\n${result.message}\n` : '';
|
|
2437
2576
|
return {
|
|
2438
2577
|
content: [
|
|
2439
2578
|
{
|
|
2440
2579
|
type: 'text',
|
|
2441
2580
|
text: `Container Execution Status:\n\n` +
|
|
2581
|
+
`${statusType}${statusMessage}\n` +
|
|
2442
2582
|
`Execution ID: ${result.id}\n` +
|
|
2443
2583
|
`Container: ${result.containerName} (${result.containerId})\n` +
|
|
2444
2584
|
`Status: ${result.status}\n` +
|
|
@@ -2852,6 +2992,148 @@ Follow same metadata requirements as create_container.`,
|
|
|
2852
2992
|
],
|
|
2853
2993
|
};
|
|
2854
2994
|
}
|
|
2995
|
+
/**
|
|
2996
|
+
* Handle list modifications
|
|
2997
|
+
*/
|
|
2998
|
+
async handleListModifications(args) {
|
|
2999
|
+
const { category, tags, active = true } = args;
|
|
3000
|
+
const result = await modificationService.listModifications(category, tags, active);
|
|
3001
|
+
let responseText = `**Available Modifications**\n\n`;
|
|
3002
|
+
responseText += `Found ${result.count} modification(s)\n\n`;
|
|
3003
|
+
result.modifications.forEach((mod, index) => {
|
|
3004
|
+
responseText += `${index + 1}. **${mod.name}** (${mod.modificationId})\n`;
|
|
3005
|
+
responseText += ` Category: ${mod.category}\n`;
|
|
3006
|
+
responseText += ` Description: ${mod.description}\n`;
|
|
3007
|
+
if (mod.estimatedImpact) {
|
|
3008
|
+
responseText += ` Impact: ${mod.estimatedImpact}\n`;
|
|
3009
|
+
}
|
|
3010
|
+
if (mod.priority) {
|
|
3011
|
+
responseText += ` Priority: ${mod.priority}\n`;
|
|
3012
|
+
}
|
|
3013
|
+
if (mod.tags && mod.tags.length > 0) {
|
|
3014
|
+
responseText += ` Tags: ${mod.tags.join(', ')}\n`;
|
|
3015
|
+
}
|
|
3016
|
+
if (mod.risks) {
|
|
3017
|
+
responseText += ` ⚠️ Risks: ${mod.risks}\n`;
|
|
3018
|
+
}
|
|
3019
|
+
responseText += `\n`;
|
|
3020
|
+
});
|
|
3021
|
+
return {
|
|
3022
|
+
content: [
|
|
3023
|
+
{
|
|
3024
|
+
type: 'text',
|
|
3025
|
+
text: responseText,
|
|
3026
|
+
},
|
|
3027
|
+
],
|
|
3028
|
+
};
|
|
3029
|
+
}
|
|
3030
|
+
/**
|
|
3031
|
+
* Handle suggest container modifications
|
|
3032
|
+
*/
|
|
3033
|
+
async handleSuggestContainerModifications(args) {
|
|
3034
|
+
const { containerId, categories, includeRisks = true } = args;
|
|
3035
|
+
const result = await modificationService.suggestModifications(containerId, categories, includeRisks);
|
|
3036
|
+
let responseText = `**AI-Powered Modification Suggestions**\n\n`;
|
|
3037
|
+
if (result.recommendations.length > 0) {
|
|
3038
|
+
responseText += `📋 **Recommended Modifications (${result.recommendations.length})**\n\n`;
|
|
3039
|
+
result.recommendations.forEach((rec, index) => {
|
|
3040
|
+
responseText += modificationService.formatRecommendation(rec);
|
|
3041
|
+
responseText += `\n`;
|
|
3042
|
+
});
|
|
3043
|
+
}
|
|
3044
|
+
if (result.alreadyApplied.length > 0) {
|
|
3045
|
+
responseText += `\n✅ **Already Applied (${result.alreadyApplied.length})**\n`;
|
|
3046
|
+
result.alreadyApplied.forEach((id) => {
|
|
3047
|
+
responseText += `- ${id}\n`;
|
|
3048
|
+
});
|
|
3049
|
+
}
|
|
3050
|
+
if (result.notApplicable.length > 0) {
|
|
3051
|
+
responseText += `\n❌ **Not Applicable (${result.notApplicable.length})**\n`;
|
|
3052
|
+
result.notApplicable.forEach((item) => {
|
|
3053
|
+
responseText += `- ${item.name}: ${item.reason}\n`;
|
|
3054
|
+
});
|
|
3055
|
+
}
|
|
3056
|
+
return {
|
|
3057
|
+
content: [
|
|
3058
|
+
{
|
|
3059
|
+
type: 'text',
|
|
3060
|
+
text: responseText,
|
|
3061
|
+
},
|
|
3062
|
+
],
|
|
3063
|
+
};
|
|
3064
|
+
}
|
|
3065
|
+
/**
|
|
3066
|
+
* Handle apply container modification
|
|
3067
|
+
*/
|
|
3068
|
+
async handleApplyContainerModification(args) {
|
|
3069
|
+
const { containerId, modificationId, autoBuild = true, notes } = args;
|
|
3070
|
+
const result = await modificationService.applyModification({
|
|
3071
|
+
containerId,
|
|
3072
|
+
modificationId,
|
|
3073
|
+
autoBuild,
|
|
3074
|
+
notes
|
|
3075
|
+
});
|
|
3076
|
+
let responseText = `**Modification Applied**\n\n`;
|
|
3077
|
+
responseText += `🔄 Application ID: ${result.modificationApplicationId}\n`;
|
|
3078
|
+
responseText += `📊 Status: ${result.status}\n`;
|
|
3079
|
+
responseText += `⏱️ Estimated Completion: ${result.estimatedCompletionTime}\n`;
|
|
3080
|
+
responseText += `🔗 Stream Token: ${result.streamToken}\n\n`;
|
|
3081
|
+
responseText += `Progress notifications will be sent automatically via user-notifications stream.\n`;
|
|
3082
|
+
return {
|
|
3083
|
+
content: [
|
|
3084
|
+
{
|
|
3085
|
+
type: 'text',
|
|
3086
|
+
text: responseText,
|
|
3087
|
+
},
|
|
3088
|
+
],
|
|
3089
|
+
};
|
|
3090
|
+
}
|
|
3091
|
+
/**
|
|
3092
|
+
* Handle get modification status
|
|
3093
|
+
*/
|
|
3094
|
+
async handleGetModificationStatus(args) {
|
|
3095
|
+
const { containerId, modificationApplicationId } = args;
|
|
3096
|
+
const result = await modificationService.getModificationDetails(containerId, modificationApplicationId);
|
|
3097
|
+
const responseText = modificationService.formatAppliedModification(result);
|
|
3098
|
+
return {
|
|
3099
|
+
content: [
|
|
3100
|
+
{
|
|
3101
|
+
type: 'text',
|
|
3102
|
+
text: responseText,
|
|
3103
|
+
},
|
|
3104
|
+
],
|
|
3105
|
+
};
|
|
3106
|
+
}
|
|
3107
|
+
/**
|
|
3108
|
+
* Handle list applied modifications
|
|
3109
|
+
*/
|
|
3110
|
+
async handleListAppliedModifications(args) {
|
|
3111
|
+
const { containerId, status, limit = 50, offset = 0 } = args;
|
|
3112
|
+
const result = await modificationService.listAppliedModifications(containerId, status, limit, offset);
|
|
3113
|
+
let responseText = `**Applied Modifications**\n\n`;
|
|
3114
|
+
responseText += `Found ${result.count} modification(s)`;
|
|
3115
|
+
if (result.hasMore) {
|
|
3116
|
+
responseText += ` (showing ${result.appliedModifications.length})`;
|
|
3117
|
+
}
|
|
3118
|
+
responseText += `\n\n`;
|
|
3119
|
+
if (result.appliedModifications.length === 0) {
|
|
3120
|
+
responseText += `No modifications have been applied to this container yet.\n`;
|
|
3121
|
+
}
|
|
3122
|
+
else {
|
|
3123
|
+
result.appliedModifications.forEach((mod, index) => {
|
|
3124
|
+
responseText += modificationService.formatAppliedModification(mod);
|
|
3125
|
+
responseText += `\n`;
|
|
3126
|
+
});
|
|
3127
|
+
}
|
|
3128
|
+
return {
|
|
3129
|
+
content: [
|
|
3130
|
+
{
|
|
3131
|
+
type: 'text',
|
|
3132
|
+
text: responseText,
|
|
3133
|
+
},
|
|
3134
|
+
],
|
|
3135
|
+
};
|
|
3136
|
+
}
|
|
2855
3137
|
/**
|
|
2856
3138
|
* Get container development workflow content
|
|
2857
3139
|
*/
|