@i18n-agent/mcp-client 1.9.2 → 1.9.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.
- package/mcp-client.js +6 -9
- package/package.json +1 -1
package/mcp-client.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Integrates with Claude Code CLI to provide translation capabilities
|
|
6
6
|
*/
|
|
7
7
|
|
|
8
|
-
const MCP_CLIENT_VERSION = '1.9.
|
|
8
|
+
const MCP_CLIENT_VERSION = '1.9.3';
|
|
9
9
|
|
|
10
10
|
import { Server } from '@modelcontextprotocol/sdk/server/index.js';
|
|
11
11
|
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
@@ -1828,8 +1828,6 @@ async function handleDownloadTranslations(args) {
|
|
|
1828
1828
|
parsedResult = result;
|
|
1829
1829
|
}
|
|
1830
1830
|
|
|
1831
|
-
// Detect storage type and handle accordingly
|
|
1832
|
-
const storageType = parsedResult.storageType || 'local';
|
|
1833
1831
|
const outputDir = `/tmp/i18n-translations-${jobId}`;
|
|
1834
1832
|
|
|
1835
1833
|
// Create output directory
|
|
@@ -1839,8 +1837,8 @@ async function handleDownloadTranslations(args) {
|
|
|
1839
1837
|
|
|
1840
1838
|
const filesWritten = [];
|
|
1841
1839
|
|
|
1842
|
-
if (
|
|
1843
|
-
//
|
|
1840
|
+
if (parsedResult.downloadUrls && Object.keys(parsedResult.downloadUrls).length > 0) {
|
|
1841
|
+
// Download files from S3 presigned URLs
|
|
1844
1842
|
console.error(`📥 Downloading ${Object.keys(parsedResult.downloadUrls).length} translation files from S3...`);
|
|
1845
1843
|
|
|
1846
1844
|
for (const [language, downloadUrl] of Object.entries(parsedResult.downloadUrls)) {
|
|
@@ -1896,7 +1894,7 @@ async function handleDownloadTranslations(args) {
|
|
|
1896
1894
|
}
|
|
1897
1895
|
} else {
|
|
1898
1896
|
// No valid download method found
|
|
1899
|
-
throw new Error(`No translations available.
|
|
1897
|
+
throw new Error(`No translations available. Expected downloadUrls in response.`);
|
|
1900
1898
|
}
|
|
1901
1899
|
|
|
1902
1900
|
// Return success with file paths
|
|
@@ -1908,10 +1906,9 @@ async function handleDownloadTranslations(args) {
|
|
|
1908
1906
|
jobId,
|
|
1909
1907
|
outputDirectory: outputDir,
|
|
1910
1908
|
filesWritten,
|
|
1911
|
-
storageType,
|
|
1912
1909
|
fileName: parsedResult.fileName,
|
|
1913
1910
|
targetLanguages: parsedResult.targetLanguages,
|
|
1914
|
-
message: `✅
|
|
1911
|
+
message: `✅ Downloaded ${filesWritten.length} translation files to ${outputDir}`
|
|
1915
1912
|
}, null, 2)
|
|
1916
1913
|
}]
|
|
1917
1914
|
};
|
|
@@ -2172,7 +2169,7 @@ async function handleParallelDocumentUpload(args) {
|
|
|
2172
2169
|
return {
|
|
2173
2170
|
content: [{
|
|
2174
2171
|
type: 'text',
|
|
2175
|
-
text: `✅
|
|
2172
|
+
text: `✅ Translation Upload Successful\n\n` +
|
|
2176
2173
|
`📂 Namespace: ${finalNamespace}\n` +
|
|
2177
2174
|
`📄 Source: ${sourceFilePath ? path.basename(sourceFilePath) : 'source content'}\n` +
|
|
2178
2175
|
`📄 Target: ${targetFilePath ? path.basename(targetFilePath) : 'target content'}\n` +
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@i18n-agent/mcp-client",
|
|
3
|
-
"version": "1.9.
|
|
3
|
+
"version": "1.9.3",
|
|
4
4
|
"description": "🌍 i18n-agent MCP Client - 48 languages, AI-powered translation for Claude, Claude Code, Cursor, VS Code, Codex. Get API key at https://app.i18nagent.ai",
|
|
5
5
|
"main": "mcp-client.js",
|
|
6
6
|
"bin": {
|