@172ai/containers-mcp-server 1.12.2 → 1.12.3

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.
Files changed (63) hide show
  1. package/dist/auth.d.ts +1 -1
  2. package/dist/auth.d.ts.map +1 -1
  3. package/dist/auth.js +26 -33
  4. package/dist/auth.js.map +1 -1
  5. package/dist/cli-tool.js +67 -105
  6. package/dist/cli-tool.js.map +1 -1
  7. package/dist/cli.js +4 -37
  8. package/dist/cli.js.map +1 -1
  9. package/dist/config.d.ts +1 -1
  10. package/dist/config.d.ts.map +1 -1
  11. package/dist/config.js +5 -42
  12. package/dist/config.js.map +1 -1
  13. package/dist/scripts/test-mcp-tools.js +9 -12
  14. package/dist/scripts/test-mcp-tools.js.map +1 -1
  15. package/dist/server.js +85 -87
  16. package/dist/server.js.map +1 -1
  17. package/dist/services/buildService.d.ts +1 -1
  18. package/dist/services/buildService.d.ts.map +1 -1
  19. package/dist/services/buildService.js +37 -41
  20. package/dist/services/buildService.js.map +1 -1
  21. package/dist/services/capabilityService.d.ts +1 -1
  22. package/dist/services/capabilityService.d.ts.map +1 -1
  23. package/dist/services/capabilityService.js +32 -36
  24. package/dist/services/capabilityService.js.map +1 -1
  25. package/dist/services/containerService.d.ts +1 -1
  26. package/dist/services/containerService.d.ts.map +1 -1
  27. package/dist/services/containerService.js +47 -51
  28. package/dist/services/containerService.js.map +1 -1
  29. package/dist/services/executionService.d.ts +1 -1
  30. package/dist/services/executionService.d.ts.map +1 -1
  31. package/dist/services/executionService.js +48 -52
  32. package/dist/services/executionService.js.map +1 -1
  33. package/dist/services/fileService.d.ts +1 -1
  34. package/dist/services/fileService.d.ts.map +1 -1
  35. package/dist/services/fileService.js +73 -77
  36. package/dist/services/fileService.js.map +1 -1
  37. package/dist/services/streamingService.js +16 -23
  38. package/dist/services/streamingService.js.map +1 -1
  39. package/dist/services/userNotificationManager.d.ts +4 -4
  40. package/dist/services/userNotificationManager.d.ts.map +1 -1
  41. package/dist/services/userNotificationManager.js +15 -19
  42. package/dist/services/userNotificationManager.js.map +1 -1
  43. package/dist/services/userService.d.ts +1 -5
  44. package/dist/services/userService.d.ts.map +1 -1
  45. package/dist/services/userService.js +19 -43
  46. package/dist/services/userService.js.map +1 -1
  47. package/dist/setup.js +28 -67
  48. package/dist/setup.js.map +1 -1
  49. package/dist/types.js +1 -2
  50. package/dist/types.js.map +1 -1
  51. package/dist/utils/enhancedErrorHandler.d.ts +1 -1
  52. package/dist/utils/enhancedErrorHandler.d.ts.map +1 -1
  53. package/dist/utils/enhancedErrorHandler.js +47 -52
  54. package/dist/utils/enhancedErrorHandler.js.map +1 -1
  55. package/dist/utils/errorHandler.d.ts +1 -1
  56. package/dist/utils/errorHandler.d.ts.map +1 -1
  57. package/dist/utils/errorHandler.js +15 -20
  58. package/dist/utils/errorHandler.js.map +1 -1
  59. package/dist/utils/logBuffer.js +2 -6
  60. package/dist/utils/logBuffer.js.map +1 -1
  61. package/dist/utils/retryHandler.js +7 -13
  62. package/dist/utils/retryHandler.js.map +1 -1
  63. package/package.json +2 -1
package/dist/server.js CHANGED
@@ -1,22 +1,19 @@
1
1
  #!/usr/bin/env node
2
- "use strict";
3
- Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.ContainerMCPServer = void 0;
5
- const index_js_1 = require("@modelcontextprotocol/sdk/server/index.js");
6
- const stdio_js_1 = require("@modelcontextprotocol/sdk/server/stdio.js");
7
- const types_js_1 = require("@modelcontextprotocol/sdk/types.js");
2
+ import { Server } from '@modelcontextprotocol/sdk/server/index.js';
3
+ import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
4
+ import { CallToolRequestSchema, ListToolsRequestSchema, ListPromptsRequestSchema, ListResourcesRequestSchema, GetPromptRequestSchema, } from '@modelcontextprotocol/sdk/types.js';
8
5
  // Import our services and utilities
9
- const config_js_1 = require("./config.js");
10
- const auth_js_1 = require("./auth.js");
11
- const containerService_js_1 = require("./services/containerService.js");
12
- const buildService_js_1 = require("./services/buildService.js");
13
- const fileService_js_1 = require("./services/fileService.js");
14
- const capabilityService_js_1 = require("./services/capabilityService.js");
15
- const executionService_js_1 = require("./services/executionService.js");
16
- const streamingService_js_1 = require("./services/streamingService.js");
17
- const userNotificationManager_js_1 = require("./services/userNotificationManager.js");
18
- const userService_js_1 = require("./services/userService.js");
19
- const errorHandler_js_1 = require("./utils/errorHandler.js");
6
+ import { config } from './config.js';
7
+ import { authManager } from './auth.js';
8
+ import { containerService } from './services/containerService.js';
9
+ import { buildService } from './services/buildService.js';
10
+ import { fileService } from './services/fileService.js';
11
+ import { capabilityService } from './services/capabilityService.js';
12
+ import { executionService } from './services/executionService.js';
13
+ import { streamingService } from './services/streamingService.js';
14
+ import { userNotificationManager } from './services/userNotificationManager.js';
15
+ import { userService } from './services/userService.js';
16
+ import { ErrorHandler } from './utils/errorHandler.js';
20
17
  /**
21
18
  * 172.ai Container Management MCP Server
22
19
  *
@@ -25,13 +22,13 @@ const errorHandler_js_1 = require("./utils/errorHandler.js");
25
22
  */
26
23
  class ContainerMCPServer {
27
24
  constructor() {
28
- this.server = new index_js_1.Server({
25
+ this.server = new Server({
29
26
  name: '172ai-containers-mcp-server',
30
27
  version: '1.0.0',
31
28
  });
32
29
  // Initialize MCP server reference for progress notifications
33
- buildService_js_1.buildService.setMCPServer(this.server);
34
- executionService_js_1.executionService.setMCPServer(this.server);
30
+ buildService.setMCPServer(this.server);
31
+ executionService.setMCPServer(this.server);
35
32
  this.setupTools();
36
33
  this.setupErrorHandlers();
37
34
  this.initializeStreaming();
@@ -42,7 +39,7 @@ class ContainerMCPServer {
42
39
  */
43
40
  async initializeStreaming() {
44
41
  try {
45
- const streamingConfig = config_js_1.config.get('streaming');
42
+ const streamingConfig = config.get('streaming');
46
43
  // Check if user-notifications streaming is enabled
47
44
  if (!streamingConfig?.enableUserNotifications) {
48
45
  console.log('[MCP Server] User-notifications streaming disabled via config');
@@ -57,10 +54,10 @@ class ContainerMCPServer {
57
54
  console.log('[MCP Server] Initializing user-notifications streaming...');
58
55
  // Get current user ID to initialize the notification stream
59
56
  try {
60
- const userInfo = await userService_js_1.userService.getUserProfile();
57
+ const userInfo = await userService.getUserProfile();
61
58
  const userId = userInfo.id;
62
59
  console.log(`[MCP Server] Initializing user-notifications for user ${userId}...`);
63
- await userNotificationManager_js_1.userNotificationManager.initialize(userId);
60
+ await userNotificationManager.initialize(userId);
64
61
  console.log('[MCP Server] ✅ User-notifications streaming initialized and ready');
65
62
  }
66
63
  catch (error) {
@@ -94,19 +91,19 @@ class ContainerMCPServer {
94
91
  */
95
92
  setupContainerTools() {
96
93
  // List containers
97
- this.server.setRequestHandler(types_js_1.ListToolsRequestSchema, async () => {
94
+ this.server.setRequestHandler(ListToolsRequestSchema, async () => {
98
95
  return {
99
96
  tools: this.getAllTools(),
100
97
  };
101
98
  });
102
99
  // Handle prompts/list requests
103
- this.server.setRequestHandler(types_js_1.ListPromptsRequestSchema, async () => {
100
+ this.server.setRequestHandler(ListPromptsRequestSchema, async () => {
104
101
  return {
105
102
  prompts: this.getContainerWorkflowPrompts(),
106
103
  };
107
104
  });
108
105
  // Handle prompts/get requests
109
- this.server.setRequestHandler(types_js_1.GetPromptRequestSchema, async (request) => {
106
+ this.server.setRequestHandler(GetPromptRequestSchema, async (request) => {
110
107
  const { name, arguments: args } = request.params;
111
108
  switch (name) {
112
109
  case 'container_development_workflow':
@@ -118,16 +115,16 @@ class ContainerMCPServer {
118
115
  case 'container_best_practices':
119
116
  return this.getContainerBestPracticesContent();
120
117
  default:
121
- throw errorHandler_js_1.ErrorHandler.createValidationError(`Unknown prompt: ${name}`);
118
+ throw ErrorHandler.createValidationError(`Unknown prompt: ${name}`);
122
119
  }
123
120
  });
124
121
  // Handle resources/list requests
125
- this.server.setRequestHandler(types_js_1.ListResourcesRequestSchema, async () => {
122
+ this.server.setRequestHandler(ListResourcesRequestSchema, async () => {
126
123
  return {
127
124
  resources: [],
128
125
  };
129
126
  });
130
- this.server.setRequestHandler(types_js_1.CallToolRequestSchema, async (request) => {
127
+ this.server.setRequestHandler(CallToolRequestSchema, async (request) => {
131
128
  const { name, arguments: args } = request.params;
132
129
  try {
133
130
  switch (name) {
@@ -210,12 +207,12 @@ class ContainerMCPServer {
210
207
  case 'get_all_progress_updates':
211
208
  return await this.handleGetAllProgressUpdates(args);
212
209
  default:
213
- throw errorHandler_js_1.ErrorHandler.createValidationError(`Unknown tool: ${name}`);
210
+ throw ErrorHandler.createValidationError(`Unknown tool: ${name}`);
214
211
  }
215
212
  }
216
213
  catch (error) {
217
- const processedError = errorHandler_js_1.ErrorHandler.processError(error, `Tool: ${name}`);
218
- errorHandler_js_1.ErrorHandler.logError(processedError);
214
+ const processedError = ErrorHandler.processError(error, `Tool: ${name}`);
215
+ ErrorHandler.logError(processedError);
219
216
  return {
220
217
  content: [
221
218
  {
@@ -1348,23 +1345,23 @@ Follow same metadata requirements as create_container.`,
1348
1345
  */
1349
1346
  setupErrorHandlers() {
1350
1347
  this.server.onerror = (error) => {
1351
- const processedError = errorHandler_js_1.ErrorHandler.processError(error, 'MCP Server');
1352
- errorHandler_js_1.ErrorHandler.logError(processedError);
1348
+ const processedError = ErrorHandler.processError(error, 'MCP Server');
1349
+ ErrorHandler.logError(processedError);
1353
1350
  };
1354
1351
  // Handle uncaught exceptions
1355
1352
  process.on('uncaughtException', (error) => {
1356
- const processedError = errorHandler_js_1.ErrorHandler.processError(error, 'Uncaught Exception');
1357
- errorHandler_js_1.ErrorHandler.logError(processedError);
1353
+ const processedError = ErrorHandler.processError(error, 'Uncaught Exception');
1354
+ ErrorHandler.logError(processedError);
1358
1355
  process.exit(1);
1359
1356
  });
1360
1357
  process.on('unhandledRejection', (reason) => {
1361
- const processedError = errorHandler_js_1.ErrorHandler.processError(reason, 'Unhandled Rejection');
1362
- errorHandler_js_1.ErrorHandler.logError(processedError);
1358
+ const processedError = ErrorHandler.processError(reason, 'Unhandled Rejection');
1359
+ ErrorHandler.logError(processedError);
1363
1360
  });
1364
1361
  }
1365
1362
  // Tool handler methods
1366
1363
  async handleListContainers(args) {
1367
- const result = await containerService_js_1.containerService.listContainers(args);
1364
+ const result = await containerService.listContainers(args);
1368
1365
  return {
1369
1366
  content: [
1370
1367
  {
@@ -1380,7 +1377,7 @@ Follow same metadata requirements as create_container.`,
1380
1377
  };
1381
1378
  }
1382
1379
  async handleGetContainer(args) {
1383
- const result = await containerService_js_1.containerService.getContainer(args);
1380
+ const result = await containerService.getContainer(args);
1384
1381
  let response = `**Container: ${result.name}**\n\n` +
1385
1382
  `ID: ${result.id}\n` +
1386
1383
  `Description: ${result.description}\n` +
@@ -1436,7 +1433,7 @@ Follow same metadata requirements as create_container.`,
1436
1433
  };
1437
1434
  }
1438
1435
  async handleCreateContainer(args) {
1439
- const result = await containerService_js_1.containerService.createContainer(args);
1436
+ const result = await containerService.createContainer(args);
1440
1437
  let response = `Container "${result.name}" created successfully!\n\n` +
1441
1438
  `ID: ${result.id}\n` +
1442
1439
  `Description: ${result.description}\n`;
@@ -1464,7 +1461,7 @@ Follow same metadata requirements as create_container.`,
1464
1461
  };
1465
1462
  }
1466
1463
  async handleUpdateContainer(args) {
1467
- const result = await containerService_js_1.containerService.updateContainer(args);
1464
+ const result = await containerService.updateContainer(args);
1468
1465
  return {
1469
1466
  content: [
1470
1467
  {
@@ -1477,7 +1474,7 @@ Follow same metadata requirements as create_container.`,
1477
1474
  };
1478
1475
  }
1479
1476
  async handleDeleteContainer(args) {
1480
- const result = await containerService_js_1.containerService.deleteContainer(args);
1477
+ const result = await containerService.deleteContainer(args);
1481
1478
  return {
1482
1479
  content: [
1483
1480
  {
@@ -1488,7 +1485,7 @@ Follow same metadata requirements as create_container.`,
1488
1485
  };
1489
1486
  }
1490
1487
  async handleCopyContainer(args) {
1491
- const result = await containerService_js_1.containerService.copyContainer(args);
1488
+ const result = await containerService.copyContainer(args);
1492
1489
  return {
1493
1490
  content: [
1494
1491
  {
@@ -1502,7 +1499,7 @@ Follow same metadata requirements as create_container.`,
1502
1499
  }
1503
1500
  async handleBuildContainer(args) {
1504
1501
  const { progressToken, ...buildParams } = args;
1505
- const result = await buildService_js_1.buildService.buildContainer(buildParams, progressToken);
1502
+ const result = await buildService.buildContainer(buildParams, progressToken);
1506
1503
  return {
1507
1504
  content: [
1508
1505
  {
@@ -1517,7 +1514,7 @@ Follow same metadata requirements as create_container.`,
1517
1514
  };
1518
1515
  }
1519
1516
  async handleGetBuildStatus(args) {
1520
- const result = await buildService_js_1.buildService.getBuildStatus(args);
1517
+ const result = await buildService.getBuildStatus(args);
1521
1518
  return {
1522
1519
  content: [
1523
1520
  {
@@ -1535,7 +1532,7 @@ Follow same metadata requirements as create_container.`,
1535
1532
  };
1536
1533
  }
1537
1534
  async handleListBuilds(args) {
1538
- const result = await buildService_js_1.buildService.listBuilds(args);
1535
+ const result = await buildService.listBuilds(args);
1539
1536
  return {
1540
1537
  content: [
1541
1538
  {
@@ -1551,7 +1548,7 @@ Follow same metadata requirements as create_container.`,
1551
1548
  };
1552
1549
  }
1553
1550
  async handleGetBuildLogs(args) {
1554
- const result = await buildService_js_1.buildService.getBuildLogs(args.containerId, args.buildId);
1551
+ const result = await buildService.getBuildLogs(args.containerId, args.buildId);
1555
1552
  return {
1556
1553
  content: [
1557
1554
  {
@@ -1564,7 +1561,7 @@ Follow same metadata requirements as create_container.`,
1564
1561
  };
1565
1562
  }
1566
1563
  async handleExplainBuildLogs(args) {
1567
- const result = await buildService_js_1.buildService.explainBuildLogs(args.containerId, args.buildId, {
1564
+ const result = await buildService.explainBuildLogs(args.containerId, args.buildId, {
1568
1565
  verbosity: args.verbosity,
1569
1566
  outputFormat: args.outputFormat,
1570
1567
  includeRecommendations: args.includeRecommendations,
@@ -1589,7 +1586,7 @@ Follow same metadata requirements as create_container.`,
1589
1586
  };
1590
1587
  }
1591
1588
  async handleCancelBuildMonitoring(args) {
1592
- const success = await buildService_js_1.buildService.cancelBuildMonitoring(args.progressToken, args.reason);
1589
+ const success = await buildService.cancelBuildMonitoring(args.progressToken, args.reason);
1593
1590
  return {
1594
1591
  content: [
1595
1592
  {
@@ -1602,7 +1599,7 @@ Follow same metadata requirements as create_container.`,
1602
1599
  };
1603
1600
  }
1604
1601
  async handleGetStreamAnalytics(args) {
1605
- const analytics = buildService_js_1.buildService.getStreamAnalytics();
1602
+ const analytics = buildService.getStreamAnalytics();
1606
1603
  const includeMonitors = args.includeActiveMonitors !== false; // Default to true
1607
1604
  let analyticsText = `**Build Streaming Analytics**\n\n` +
1608
1605
  `📊 **Overview**\n` +
@@ -1640,7 +1637,7 @@ Follow same metadata requirements as create_container.`,
1640
1637
  };
1641
1638
  }
1642
1639
  async handleListContainerFiles(args) {
1643
- const result = await fileService_js_1.fileService.listContainerFiles(args);
1640
+ const result = await fileService.listContainerFiles(args);
1644
1641
  return {
1645
1642
  content: [
1646
1643
  {
@@ -1655,7 +1652,7 @@ Follow same metadata requirements as create_container.`,
1655
1652
  };
1656
1653
  }
1657
1654
  async handleGetFileContent(args) {
1658
- const result = await fileService_js_1.fileService.getFileContent(args);
1655
+ const result = await fileService.getFileContent(args);
1659
1656
  return {
1660
1657
  content: [
1661
1658
  {
@@ -1671,7 +1668,7 @@ Follow same metadata requirements as create_container.`,
1671
1668
  };
1672
1669
  }
1673
1670
  async handleUploadFile(args) {
1674
- const result = await fileService_js_1.fileService.uploadFile(args);
1671
+ const result = await fileService.uploadFile(args);
1675
1672
  return {
1676
1673
  content: [
1677
1674
  {
@@ -1686,7 +1683,7 @@ Follow same metadata requirements as create_container.`,
1686
1683
  };
1687
1684
  }
1688
1685
  async handleUpdateFile(args) {
1689
- const result = await fileService_js_1.fileService.updateFile(args);
1686
+ const result = await fileService.updateFile(args);
1690
1687
  return {
1691
1688
  content: [
1692
1689
  {
@@ -1701,7 +1698,7 @@ Follow same metadata requirements as create_container.`,
1701
1698
  };
1702
1699
  }
1703
1700
  async handleDeleteFile(args) {
1704
- const result = await fileService_js_1.fileService.deleteFile(args.containerId, args.filePath);
1701
+ const result = await fileService.deleteFile(args.containerId, args.filePath);
1705
1702
  return {
1706
1703
  content: [
1707
1704
  {
@@ -1712,7 +1709,7 @@ Follow same metadata requirements as create_container.`,
1712
1709
  };
1713
1710
  }
1714
1711
  async handleListCapabilities(args) {
1715
- const result = await capabilityService_js_1.capabilityService.listCapabilities(args);
1712
+ const result = await capabilityService.listCapabilities(args);
1716
1713
  return {
1717
1714
  content: [
1718
1715
  {
@@ -1728,7 +1725,7 @@ Follow same metadata requirements as create_container.`,
1728
1725
  };
1729
1726
  }
1730
1727
  async handleGetCapability(args) {
1731
- const result = await capabilityService_js_1.capabilityService.getCapability(args);
1728
+ const result = await capabilityService.getCapability(args);
1732
1729
  return {
1733
1730
  content: [
1734
1731
  {
@@ -1746,7 +1743,7 @@ Follow same metadata requirements as create_container.`,
1746
1743
  };
1747
1744
  }
1748
1745
  async handleSearchCapabilities(args) {
1749
- const result = await capabilityService_js_1.capabilityService.searchCapabilities(args.query, args.category, args.limit);
1746
+ const result = await capabilityService.searchCapabilities(args.query, args.category, args.limit);
1750
1747
  return {
1751
1748
  content: [
1752
1749
  {
@@ -1762,7 +1759,7 @@ Follow same metadata requirements as create_container.`,
1762
1759
  // Execution handler methods
1763
1760
  async handleStartExecution(args) {
1764
1761
  const { progressToken, ...executionParams } = args;
1765
- const result = await executionService_js_1.executionService.startExecution(executionParams, progressToken);
1762
+ const result = await executionService.startExecution(executionParams, progressToken);
1766
1763
  return {
1767
1764
  content: [
1768
1765
  {
@@ -1781,7 +1778,7 @@ Follow same metadata requirements as create_container.`,
1781
1778
  };
1782
1779
  }
1783
1780
  async handleStopExecution(args) {
1784
- const result = await executionService_js_1.executionService.stopExecution(args);
1781
+ const result = await executionService.stopExecution(args);
1785
1782
  return {
1786
1783
  content: [
1787
1784
  {
@@ -1794,7 +1791,7 @@ Follow same metadata requirements as create_container.`,
1794
1791
  };
1795
1792
  }
1796
1793
  async handleGetExecutionStatus(args) {
1797
- const result = await executionService_js_1.executionService.getExecutionStatus(args);
1794
+ const result = await executionService.getExecutionStatus(args);
1798
1795
  return {
1799
1796
  content: [
1800
1797
  {
@@ -1816,7 +1813,7 @@ Follow same metadata requirements as create_container.`,
1816
1813
  };
1817
1814
  }
1818
1815
  async handleListExecutions(args) {
1819
- const result = await executionService_js_1.executionService.listExecutions(args);
1816
+ const result = await executionService.listExecutions(args);
1820
1817
  return {
1821
1818
  content: [
1822
1819
  {
@@ -1837,7 +1834,7 @@ Follow same metadata requirements as create_container.`,
1837
1834
  };
1838
1835
  }
1839
1836
  async handleGetExecutionProgress(args) {
1840
- const result = await executionService_js_1.executionService.getExecutionProgress(args);
1837
+ const result = await executionService.getExecutionProgress(args);
1841
1838
  return {
1842
1839
  content: [
1843
1840
  {
@@ -1855,7 +1852,7 @@ Follow same metadata requirements as create_container.`,
1855
1852
  };
1856
1853
  }
1857
1854
  async handleGetExecutionLogs(args) {
1858
- const result = await executionService_js_1.executionService.getExecutionLogs(args);
1855
+ const result = await executionService.getExecutionLogs(args);
1859
1856
  // Format logs properly - handle both string logs and log objects
1860
1857
  const formatLog = (log, index) => {
1861
1858
  if (typeof log === 'string') {
@@ -1892,7 +1889,7 @@ Follow same metadata requirements as create_container.`,
1892
1889
  };
1893
1890
  }
1894
1891
  async handleExplainRuntimeLogs(args) {
1895
- const result = await executionService_js_1.executionService.explainRuntimeLogs(args.executionId, {
1892
+ const result = await executionService.explainRuntimeLogs(args.executionId, {
1896
1893
  verbosity: args.verbosity,
1897
1894
  outputFormat: args.outputFormat,
1898
1895
  includeContext: args.includeContext,
@@ -1917,7 +1914,7 @@ Follow same metadata requirements as create_container.`,
1917
1914
  };
1918
1915
  }
1919
1916
  async handleExplainDeploymentLogs(args) {
1920
- const result = await executionService_js_1.executionService.explainDeploymentLogs(args.executionId, {
1917
+ const result = await executionService.explainDeploymentLogs(args.executionId, {
1921
1918
  verbosity: args.verbosity,
1922
1919
  outputFormat: args.outputFormat,
1923
1920
  includeContext: args.includeContext,
@@ -1941,7 +1938,7 @@ Follow same metadata requirements as create_container.`,
1941
1938
  };
1942
1939
  }
1943
1940
  async handleExtendExecution(args) {
1944
- const result = await executionService_js_1.executionService.extendExecution(args);
1941
+ const result = await executionService.extendExecution(args);
1945
1942
  return {
1946
1943
  content: [
1947
1944
  {
@@ -1954,7 +1951,7 @@ Follow same metadata requirements as create_container.`,
1954
1951
  };
1955
1952
  }
1956
1953
  async handleGetExecutionHistory(args) {
1957
- const result = await executionService_js_1.executionService.getExecutionHistory(args.containerId, args.limit);
1954
+ const result = await executionService.getExecutionHistory(args.containerId, args.limit);
1958
1955
  return {
1959
1956
  content: [
1960
1957
  {
@@ -1974,7 +1971,7 @@ Follow same metadata requirements as create_container.`,
1974
1971
  };
1975
1972
  }
1976
1973
  async handleGetCostEstimate(args) {
1977
- const result = await executionService_js_1.executionService.getCostEstimate(args);
1974
+ const result = await executionService.getCostEstimate(args);
1978
1975
  return {
1979
1976
  content: [
1980
1977
  {
@@ -1998,7 +1995,7 @@ Follow same metadata requirements as create_container.`,
1998
1995
  };
1999
1996
  }
2000
1997
  async handleGetExtensionCostEstimate(args) {
2001
- const result = await executionService_js_1.executionService.getExtensionCostEstimate(args);
1998
+ const result = await executionService.getExtensionCostEstimate(args);
2002
1999
  return {
2003
2000
  content: [
2004
2001
  {
@@ -2021,7 +2018,7 @@ Follow same metadata requirements as create_container.`,
2021
2018
  };
2022
2019
  }
2023
2020
  async handleGetContainerMetrics(args) {
2024
- const metrics = await executionService_js_1.executionService.getExecutionMetrics(args);
2021
+ const metrics = await executionService.getExecutionMetrics(args);
2025
2022
  const formatMetric = (value, unit = '') => {
2026
2023
  return value !== null ? `${value}${unit}` : 'N/A';
2027
2024
  };
@@ -2059,7 +2056,7 @@ Follow same metadata requirements as create_container.`,
2059
2056
  };
2060
2057
  }
2061
2058
  async handleCancelExecutionMonitoring(args) {
2062
- const success = await executionService_js_1.executionService.cancelExecutionMonitoring(args.progressToken, args.reason);
2059
+ const success = await executionService.cancelExecutionMonitoring(args.progressToken, args.reason);
2063
2060
  return {
2064
2061
  content: [
2065
2062
  {
@@ -2072,7 +2069,7 @@ Follow same metadata requirements as create_container.`,
2072
2069
  };
2073
2070
  }
2074
2071
  async handleGetExecutionStreamAnalytics(args) {
2075
- const analytics = executionService_js_1.executionService.getExecutionStreamAnalytics();
2072
+ const analytics = executionService.getExecutionStreamAnalytics();
2076
2073
  const includeMonitors = args.includeActiveMonitors !== false; // Default to true
2077
2074
  let analyticsText = `**Execution Streaming Analytics**\n\n` +
2078
2075
  `📊 **Overview**\n` +
@@ -2115,9 +2112,9 @@ Follow same metadata requirements as create_container.`,
2115
2112
  async handleGetBuildProgressUpdate(args) {
2116
2113
  const { progressToken } = args;
2117
2114
  if (!progressToken) {
2118
- throw errorHandler_js_1.ErrorHandler.createValidationError('Progress token is required');
2115
+ throw ErrorHandler.createValidationError('Progress token is required');
2119
2116
  }
2120
- const progressUpdate = buildService_js_1.buildService.getProgressUpdate(progressToken);
2117
+ const progressUpdate = buildService.getProgressUpdate(progressToken);
2121
2118
  if (!progressUpdate) {
2122
2119
  return {
2123
2120
  content: [
@@ -2148,9 +2145,9 @@ Follow same metadata requirements as create_container.`,
2148
2145
  async handleGetExecutionProgressUpdate(args) {
2149
2146
  const { progressToken } = args;
2150
2147
  if (!progressToken) {
2151
- throw errorHandler_js_1.ErrorHandler.createValidationError('Progress token is required');
2148
+ throw ErrorHandler.createValidationError('Progress token is required');
2152
2149
  }
2153
- const progressUpdate = executionService_js_1.executionService.getProgressUpdate(progressToken);
2150
+ const progressUpdate = executionService.getProgressUpdate(progressToken);
2154
2151
  if (!progressUpdate) {
2155
2152
  return {
2156
2153
  content: [
@@ -2179,8 +2176,8 @@ Follow same metadata requirements as create_container.`,
2179
2176
  * Get all progress updates for debugging
2180
2177
  */
2181
2178
  async handleGetAllProgressUpdates(args) {
2182
- const buildUpdates = buildService_js_1.buildService.getAllProgressUpdates();
2183
- const executionUpdates = executionService_js_1.executionService.getAllProgressUpdates();
2179
+ const buildUpdates = buildService.getAllProgressUpdates();
2180
+ const executionUpdates = executionService.getAllProgressUpdates();
2184
2181
  let responseText = `**All Progress Updates**\n\n`;
2185
2182
  const buildTokens = Object.keys(buildUpdates);
2186
2183
  const executionTokens = Object.keys(executionUpdates);
@@ -2735,24 +2732,24 @@ Follow these best practices to create robust, secure, and efficient containerize
2735
2732
  try {
2736
2733
  // Test authentication
2737
2734
  console.error('🔑 Testing authentication...');
2738
- const isAuthenticated = await auth_js_1.authManager.testAuthentication();
2735
+ const isAuthenticated = await authManager.testAuthentication();
2739
2736
  if (!isAuthenticated) {
2740
2737
  throw new Error('Authentication failed. Please check your API credentials.');
2741
2738
  }
2742
2739
  console.error('✅ Authentication successful');
2743
2740
  // Start the server
2744
- const transport = new stdio_js_1.StdioServerTransport();
2741
+ const transport = new StdioServerTransport();
2745
2742
  await this.server.connect(transport);
2746
2743
  // Set up graceful shutdown to cleanup streaming connections
2747
2744
  process.on('SIGINT', () => this.shutdown('SIGINT'));
2748
2745
  process.on('SIGTERM', () => this.shutdown('SIGTERM'));
2749
2746
  console.error('🚀 172.ai Container MCP Server started successfully');
2750
- console.error(`📋 Configuration: ${config_js_1.config.get('baseUrl')} (${config_js_1.config.get('environment')})`);
2747
+ console.error(`📋 Configuration: ${config.get('baseUrl')} (${config.get('environment')})`);
2751
2748
  console.error('🔧 Available tools: container management, builds, files, capabilities, executions');
2752
2749
  }
2753
2750
  catch (error) {
2754
- const processedError = errorHandler_js_1.ErrorHandler.processError(error, 'Server startup');
2755
- errorHandler_js_1.ErrorHandler.logError(processedError);
2751
+ const processedError = ErrorHandler.processError(error, 'Server startup');
2752
+ ErrorHandler.logError(processedError);
2756
2753
  console.error('❌ Failed to start MCP server:', processedError.message);
2757
2754
  process.exit(1);
2758
2755
  }
@@ -2764,7 +2761,7 @@ Follow these best practices to create robust, secure, and efficient containerize
2764
2761
  console.error(`[MCP Server] Received ${signal}, shutting down gracefully...`);
2765
2762
  try {
2766
2763
  // Disconnect from all streaming channels
2767
- await streamingService_js_1.streamingService.disconnect();
2764
+ await streamingService.disconnect();
2768
2765
  console.error('[MCP Server] ✅ Streaming connections closed');
2769
2766
  // Close server
2770
2767
  await this.server.close();
@@ -2777,5 +2774,6 @@ Follow these best practices to create robust, secure, and efficient containerize
2777
2774
  }
2778
2775
  }
2779
2776
  }
2780
- exports.ContainerMCPServer = ContainerMCPServer;
2777
+ // Note: Server startup is now handled by cli.ts
2778
+ export { ContainerMCPServer };
2781
2779
  //# sourceMappingURL=server.js.map