@172ai/containers-mcp-server 1.0.5 → 1.0.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.
@@ -22,7 +22,7 @@ class FileService {
22
22
  if (params.path) {
23
23
  queryParams.append('path', params.path);
24
24
  }
25
- const response = await this.httpClient.get(`/v1/containers/${params.containerId}/files?${queryParams.toString()}`);
25
+ const response = await this.httpClient.get(`/v2/containers/${params.containerId}/files?${queryParams.toString()}`);
26
26
  if (!response.data) {
27
27
  throw errorHandler_1.ErrorHandler.createServerError('Invalid response format from files list API');
28
28
  }
@@ -55,7 +55,7 @@ class FileService {
55
55
  throw errorHandler_1.ErrorHandler.createValidationError('File path is required');
56
56
  }
57
57
  const encodedPath = encodeURIComponent(params.filePath);
58
- const response = await this.httpClient.get(`/v1/containers/${params.containerId}/files/${encodedPath}`);
58
+ const response = await this.httpClient.get(`/v2/containers/${params.containerId}/files/${encodedPath}`);
59
59
  if (!response.data) {
60
60
  throw errorHandler_1.ErrorHandler.createNotFoundError(`File ${params.filePath} not found`);
61
61
  }
@@ -88,7 +88,7 @@ class FileService {
88
88
  mimeType: params.mimeType || 'text/plain',
89
89
  encoding: params.encoding || 'utf8'
90
90
  };
91
- const response = await this.httpClient.post(`/v1/containers/${params.containerId}/files`, uploadData);
91
+ const response = await this.httpClient.post(`/v2/containers/${params.containerId}/files`, uploadData);
92
92
  if (!response.data) {
93
93
  throw errorHandler_1.ErrorHandler.createServerError('Invalid response from file upload API');
94
94
  }
@@ -121,7 +121,7 @@ class FileService {
121
121
  encoding: params.encoding || 'utf8'
122
122
  };
123
123
  const encodedPath = encodeURIComponent(params.filePath);
124
- const response = await this.httpClient.put(`/v1/containers/${params.containerId}/files/${encodedPath}`, updateData);
124
+ const response = await this.httpClient.put(`/v2/containers/${params.containerId}/files/${encodedPath}`, updateData);
125
125
  if (!response.data) {
126
126
  throw errorHandler_1.ErrorHandler.createServerError('Invalid response from file update API');
127
127
  }
@@ -146,7 +146,7 @@ class FileService {
146
146
  throw errorHandler_1.ErrorHandler.createValidationError('File path is required');
147
147
  }
148
148
  const encodedPath = encodeURIComponent(filePath);
149
- await this.httpClient.delete(`/v1/containers/${containerId}/files/${encodedPath}`);
149
+ await this.httpClient.delete(`/v2/containers/${containerId}/files/${encodedPath}`);
150
150
  return {
151
151
  success: true,
152
152
  message: `File ${filePath} deleted successfully`
@@ -248,7 +248,7 @@ class FileService {
248
248
  if (!moves || moves.length === 0) {
249
249
  throw errorHandler_1.ErrorHandler.createValidationError('At least one move operation is required');
250
250
  }
251
- const response = await this.httpClient.post(`/v1/containers/${containerId}/files/move`, {
251
+ const response = await this.httpClient.post(`/v2/containers/${containerId}/files/move`, {
252
252
  moves
253
253
  });
254
254
  if (!response.data || !Array.isArray(response.data.files)) {
@@ -275,7 +275,7 @@ class FileService {
275
275
  throw errorHandler_1.ErrorHandler.createValidationError('File path is required');
276
276
  }
277
277
  const encodedPath = encodeURIComponent(filePath);
278
- const response = await this.httpClient.head(`/v1/containers/${containerId}/files/${encodedPath}`);
278
+ const response = await this.httpClient.head(`/v2/containers/${containerId}/files/${encodedPath}`);
279
279
  // Extract metadata from headers
280
280
  const headers = response.headers;
281
281
  return {
@@ -310,7 +310,7 @@ class FileService {
310
310
  if (path) {
311
311
  queryParams.append('path', path);
312
312
  }
313
- const response = await this.httpClient.get(`/v1/containers/${containerId}/files/search?${queryParams.toString()}`);
313
+ const response = await this.httpClient.get(`/v2/containers/${containerId}/files/search?${queryParams.toString()}`);
314
314
  if (!response.data || !Array.isArray(response.data.files)) {
315
315
  return [];
316
316
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@172ai/containers-mcp-server",
3
- "version": "1.0.5",
3
+ "version": "1.0.6",
4
4
  "description": "MCP server for 172.ai container management platform - enables AI assistants to manage containers, builds, and files",
5
5
  "main": "dist/cli.js",
6
6
  "bin": {
@@ -78,4 +78,4 @@
78
78
  "publishConfig": {
79
79
  "access": "public"
80
80
  }
81
- }
81
+ }