@verbaly/mcp 0.79.0 → 0.81.0
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/cli.js +1 -1
- package/dist/index.js +1 -1
- package/dist/{server-DJkry04G.js → server-CZVD3Se-.js} +16 -12
- package/package.json +2 -2
package/dist/cli.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
import { t as createVerbalyMcp } from "./server-
|
|
2
|
+
import { t as createVerbalyMcp } from "./server-CZVD3Se-.js";
|
|
3
3
|
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
|
|
4
4
|
import { parseArgs } from "node:util";
|
|
5
5
|
// src/cli.ts
|
package/dist/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { t as createVerbalyMcp } from "./server-
|
|
1
|
+
export { t as createVerbalyMcp } from "./server-CZVD3Se-.js";
|
|
@@ -456,8 +456,8 @@ function registerTranslate(server, ctx) {
|
|
|
456
456
|
};
|
|
457
457
|
return reply(lines.length === 0 ? "nothing to translate" : lines.join("\n"), data);
|
|
458
458
|
}
|
|
459
|
-
const written =
|
|
460
|
-
const kept =
|
|
459
|
+
const written = [];
|
|
460
|
+
const kept = [];
|
|
461
461
|
const writes = [];
|
|
462
462
|
for (const [locale, keys] of Object.entries(result.translated)) {
|
|
463
463
|
const catalog = catalogs[locale] ?? {};
|
|
@@ -470,15 +470,21 @@ function registerTranslate(server, ctx) {
|
|
|
470
470
|
text: catalog[key]
|
|
471
471
|
}))
|
|
472
472
|
});
|
|
473
|
-
if (landed.length > 0) written
|
|
473
|
+
if (landed.length > 0) written.push({
|
|
474
|
+
locale,
|
|
475
|
+
keys: landed
|
|
476
|
+
});
|
|
474
477
|
const left = keys.filter((key) => !landed.includes(key));
|
|
475
|
-
if (left.length > 0) kept
|
|
478
|
+
if (left.length > 0) kept.push({
|
|
479
|
+
locale,
|
|
480
|
+
keys: left
|
|
481
|
+
});
|
|
476
482
|
}
|
|
477
483
|
if (writes.length > 0) recordTranslations(cfg, catalogs[cfg.sourceLocale] ?? {}, writes);
|
|
478
484
|
const data = {
|
|
479
485
|
dryRun: false,
|
|
480
|
-
translated:
|
|
481
|
-
kept
|
|
486
|
+
translated: written,
|
|
487
|
+
kept,
|
|
482
488
|
invalid: byLocale(result.invalid),
|
|
483
489
|
failed: result.failed,
|
|
484
490
|
pending: []
|
|
@@ -497,7 +503,7 @@ function registerTranslate(server, ctx) {
|
|
|
497
503
|
function registerWrap(server, ctx) {
|
|
498
504
|
server.registerTool("verbaly_wrap", {
|
|
499
505
|
title: "Wrap hardcoded JSX text",
|
|
500
|
-
description: "Find hardcoded user-visible text in JSX/TSX files and wrap it in a t tagged template so the compiler can extract it (what `verbaly wrap` does). This is how an existing codebase is onboarded, and verbaly_extract then adds the wrapped texts to the catalogs. It only reports unless write is set, and text already wrapped is skipped, so running it again is safe. Text it cannot wrap safely (a sentence split across markup, an expression rendering JSX) is listed as needing a human. A file that does not bind t is never written, because the rewrite would not compile. It comes back in blocked, with
|
|
506
|
+
description: "Find hardcoded user-visible text in JSX/TSX files and wrap it in a t tagged template so the compiler can extract it (what `verbaly wrap` does). This is how an existing codebase is onboarded, and verbaly_extract then adds the wrapped texts to the catalogs. It only reports unless write is set, and text already wrapped is skipped, so running it again is safe. Text it cannot wrap safely (a sentence split across markup, an expression rendering JSX) is listed as needing a human. A file that does not bind t is never written, because the rewrite would not compile. It comes back in blocked, with the binding this project needs there, so you can add it and run again.",
|
|
501
507
|
inputSchema: {
|
|
502
508
|
root: rootInput,
|
|
503
509
|
write: z.boolean().optional().describe("Apply the rewrites instead of only reporting")
|
|
@@ -522,7 +528,8 @@ function registerWrap(server, ctx) {
|
|
|
522
528
|
blocked: z.array(z.object({
|
|
523
529
|
file: z.string(),
|
|
524
530
|
texts: z.number(),
|
|
525
|
-
client: z.boolean()
|
|
531
|
+
client: z.boolean(),
|
|
532
|
+
binding: z.string().describe("What to add so t is in scope, for this framework")
|
|
526
533
|
}))
|
|
527
534
|
},
|
|
528
535
|
annotations: writes(true)
|
|
@@ -543,10 +550,7 @@ function registerWrap(server, ctx) {
|
|
|
543
550
|
}
|
|
544
551
|
if (result.blocked.length > 0) {
|
|
545
552
|
lines.push(` nothing written in ${counted(result.blocked.length, "file")} with no t in scope:`);
|
|
546
|
-
for (const entry of result.blocked) {
|
|
547
|
-
const how = entry.client ? "\"use client\", so const t = useT()" : "no \"use client\"";
|
|
548
|
-
lines.push(` ${entry.file} ${counted(entry.texts, "text")}, ${how}`);
|
|
549
|
-
}
|
|
553
|
+
for (const entry of result.blocked) lines.push(` ${entry.file} ${counted(entry.texts, "text")}, ${entry.binding}`);
|
|
550
554
|
lines.push(" next: bind t there, run verbaly_wrap with write again, then verbaly_extract");
|
|
551
555
|
} else if (write && done.length > 0) lines.push(" next: run verbaly_extract");
|
|
552
556
|
return reply(lines.join("\n"), {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@verbaly/mcp",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.81.0",
|
|
4
4
|
"description": "MCP server for Verbaly: diagnosis, onboarding, extraction, coverage and machine translation as tools for coding agents.",
|
|
5
5
|
"mcpName": "io.github.AronSoto/verbaly",
|
|
6
6
|
"keywords": [
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
51
|
"@modelcontextprotocol/sdk": "^1.32.2",
|
|
52
|
-
"@verbaly/compiler": "^0.
|
|
52
|
+
"@verbaly/compiler": "^0.81.0",
|
|
53
53
|
"zod": "^4.6.7"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|