@zerolingua/mcp 0.4.1 → 0.4.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/README.md +13 -2
- package/index.js +1 -1
- package/package.json +1 -1
- package/tools.js +16 -13
package/README.md
CHANGED
|
@@ -89,7 +89,8 @@ server resolves it, checks rights per item and reports what it did not do.
|
|
|
89
89
|
`{ "document": <post id> }` or `{ "site_identity": true }`) **or** `targets`
|
|
90
90
|
(`[{ "id", "kind" }]`, at most 500). `langs` is required and never empty.
|
|
91
91
|
Optional filters: `status` (`translated`, `needs_review`, `in_progress`,
|
|
92
|
-
`not_translated`; aliases `done`, `todo
|
|
92
|
+
`not_translated`; aliases `done`, `todo`, and `to_approve`: `needs_review` plus
|
|
93
|
+
what is live and read by nobody), `search`, `kinds` (strings only),
|
|
93
94
|
`taxonomies` (terms only).
|
|
94
95
|
- **Dry run first.** The same call with `dry_run: true` answers the number
|
|
95
96
|
(strings to pay for and the month's `budget`, or rows to approve) and writes
|
|
@@ -115,7 +116,11 @@ map backs both, so no host is left behind while the ecosystem moves.
|
|
|
115
116
|
|
|
116
117
|
Agent writes land as **drafts behind the review gate** — nothing serves
|
|
117
118
|
publicly until a human (or an agent with publish rights on that content)
|
|
118
|
-
approves it.
|
|
119
|
+
approves it. If the site publishes AI without review (Settings → automation,
|
|
120
|
+
everywhere or for that content's type), what an agent saves serves at once but
|
|
121
|
+
stays «to approve · live»: what an agent saves is never approved (approving
|
|
122
|
+
is its own tool). Saving the same text again changes nothing, and a translation
|
|
123
|
+
a person locked is refused (`skipped_why`: `translation_locked`). Placeholders wrapped in ⟦ ⟧ and inline markup (a link, a bold) are
|
|
119
124
|
guarded server-side: an entry that drops, adds or repoints one is skipped, never
|
|
120
125
|
saved broken. All authorization is the server's:
|
|
121
126
|
this process holds zero domain logic and zero secrets — it is one HTTP call per
|
|
@@ -123,6 +128,12 @@ tool, authenticated with the user's own Application Password.
|
|
|
123
128
|
|
|
124
129
|
## Versions
|
|
125
130
|
|
|
131
|
+
- **0.4.3** — the tools say what Zerø Lingua 0.13 does: `translate_set` with `force` never
|
|
132
|
+
re-translates what a person wrote or locked; a save an agent sends with the same text writes
|
|
133
|
+
nothing; a locked text is refused as `translation_locked`, and `skipped_why` names each refusal.
|
|
134
|
+
- **0.4.2** — `status` takes `to_approve` (Zerø Lingua 0.13): `needs_review` plus what is
|
|
135
|
+
live and read by nobody, the set «approve» signs. With AI published without review
|
|
136
|
+
(everywhere or for the content's type), a save serves «to approve · live», never approved.
|
|
126
137
|
- **0.4.1** — the tools say what Zerø Lingua 0.12.1 does: what an agent saves
|
|
127
138
|
stays a draft unless the site publishes AI without review everywhere
|
|
128
139
|
(Settings → automation), and a sentence whose ⟦0⟧ changes the word before it
|
package/index.js
CHANGED
|
@@ -37,7 +37,7 @@ if ( missing.length ) {
|
|
|
37
37
|
* the opening exchange and pins one instance to it.
|
|
38
38
|
*/
|
|
39
39
|
function buildServer() {
|
|
40
|
-
const server = new McpServer( { name: 'zero-lingua', version: '0.4.
|
|
40
|
+
const server = new McpServer( { name: 'zero-lingua', version: '0.4.3' } );
|
|
41
41
|
for ( const tool of TOOLS ) {
|
|
42
42
|
server.registerTool(
|
|
43
43
|
tool.name,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zerolingua/mcp",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"description": "MCP server for Zerø Lingua — lets AI agents read a site's strings, write translations, and approve pending work through the plugin's licensed REST surface. Speaks MCP 2026-07-28 and the 2025 era.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"scripts": {
|
package/tools.js
CHANGED
|
@@ -22,8 +22,8 @@ const WORKFLOW =
|
|
|
22
22
|
"site's AI engine: dry_run first) → approve_item (one page) or approve_set (a whole set) → " +
|
|
23
23
|
'queue_status (follow queued work). A brand or a name that needs no translation: keep_original.';
|
|
24
24
|
|
|
25
|
-
/** The contract's status words and their
|
|
26
|
-
const STATUS = [ 'translated', 'needs_review', 'in_progress', 'not_translated', 'done', 'todo' ];
|
|
25
|
+
/** The contract's status words and their three aliases (SELECTOR-CONTRACT.md § Enums). */
|
|
26
|
+
const STATUS = [ 'translated', 'needs_review', 'in_progress', 'not_translated', 'done', 'todo', 'to_approve' ];
|
|
27
27
|
|
|
28
28
|
/** What a unit is (SELECTOR-CONTRACT.md § El selector, `targets[].kind`). */
|
|
29
29
|
const UNIT_KINDS = [ 'post', 'component', 'term', 'menu', 'form', 'loop', 'string' ];
|
|
@@ -120,7 +120,8 @@ export const TOOLS = [
|
|
|
120
120
|
'vocabulary — `translated`, `needs_review`, `in_progress`, `not_translated` — which are the words a ' +
|
|
121
121
|
"selector's `status` takes in translate_set and approve_set. An item with nothing to translate in a " +
|
|
122
122
|
'language (only locked texts, figures with a unit or machine values, or a language it does not exist ' +
|
|
123
|
-
'in) is counted in `items.none` and in no word.
|
|
123
|
+
'in) is counted in `items.none` and in no word. Only approved text serves (an AI text the owner publishes ' +
|
|
124
|
+
'without review counts as approved here), so ' +
|
|
124
125
|
'`needs_review` work is NOT live yet. The scan is bounded: when `scanned.complete` is false, drill ' +
|
|
125
126
|
"into list_items per type for the rest. Use this to answer “what's left to do, where?”.",
|
|
126
127
|
method: 'GET',
|
|
@@ -187,12 +188,14 @@ export const TOOLS = [
|
|
|
187
188
|
'order, with the same attributes — adding, repointing or dropping one gets the entry skipped. ' +
|
|
188
189
|
'Saves land as DRAFTS behind the review gate: nothing new serves publicly until approve_item or ' +
|
|
189
190
|
'approve_set (or a human in the panel) signs it off, and a text already live keeps serving until ' +
|
|
190
|
-
'then — unless the site owner chose «publish AI without review
|
|
191
|
-
'
|
|
191
|
+
'then — unless the site owner chose «publish AI without review» (settings → automation) everywhere or ' +
|
|
192
|
+
'for the type of every page holding the text: then a save serves at once, marked «to approve · live» ' +
|
|
193
|
+
'(nobody has read it). The response\'s `review` says which: "approved" only when every saved ' +
|
|
192
194
|
'entry is live, "draft" otherwise; never treat a save as published without it. The ' +
|
|
193
195
|
'response reports `saved` and `skipped` honestly, and `skipped_at` lists the indexes of the ' +
|
|
194
|
-
'skipped entries; skipped means a guard refused it
|
|
195
|
-
'
|
|
196
|
+
'skipped entries, `skipped_why` the reason of each by index; skipped means a guard refused it ' +
|
|
197
|
+
'(placeholder or markup mismatch, rights, unknown hash, `translation_locked`: a person locked that ' +
|
|
198
|
+
'translation), not a partial success. Saving the same text again changes nothing. A text that needs no translation (a brand, a wine, a name) ' +
|
|
196
199
|
'is never saved as a copy of its source: mark it with keep_original.',
|
|
197
200
|
method: 'POST',
|
|
198
201
|
route: 'save-translations',
|
|
@@ -262,12 +265,12 @@ export const TOOLS = [
|
|
|
262
265
|
'listing up to 200, with the whole count in `refused_total` where the answer has one — relay it, ' +
|
|
263
266
|
'do not retry it: `not_found`, `forbidden` (you ' +
|
|
264
267
|
'cannot edit that post), `translate_tier` (a string shared beyond your rights), ' +
|
|
265
|
-
'`
|
|
268
|
+
'`answer_refused` (the engine answered but lost a mark or a ' +
|
|
266
269
|
'link of the original, so nothing was placed; `text` is the opening of its source, for the user to ' +
|
|
267
270
|
'find it and translate it by hand). A string that is already translated is not a refusal: it ' +
|
|
268
|
-
'is simply not sent again. `force: true` re-translates existing translations
|
|
269
|
-
'mode
|
|
270
|
-
'translations as they are
|
|
271
|
+
'is simply not sent again. `force: true` re-translates existing translations (in request ' +
|
|
272
|
+
'mode; over a whole `scope.type` it is queued) and always leaves locked and human-written ' +
|
|
273
|
+
'translations as they are: the dry-run counts them in `spared`. AI output lands as ' +
|
|
271
274
|
'DRAFTS unless the site auto-approves — sign it off with approve_item / approve_set. For ' +
|
|
272
275
|
'translations you produced yourself use save_translations.',
|
|
273
276
|
method: 'POST',
|
|
@@ -279,7 +282,7 @@ export const TOOLS = [
|
|
|
279
282
|
force: z
|
|
280
283
|
.boolean()
|
|
281
284
|
.optional()
|
|
282
|
-
.describe( 're-translate strings that already have a translation;
|
|
285
|
+
.describe( 're-translate strings that already have a translation, never the locked or human-written ones; in request mode, except a whole `scope.type`' ),
|
|
283
286
|
} ),
|
|
284
287
|
},
|
|
285
288
|
{
|
|
@@ -459,7 +462,7 @@ export async function callTool( tool, args, env ) {
|
|
|
459
462
|
if ( 403 === response.status && 'license_required' === code ) {
|
|
460
463
|
return err(
|
|
461
464
|
`This site's Zerø Lingua license is not active, and the MCP surface is a Pro feature. ${ message } ` +
|
|
462
|
-
'Tell the user to activate their license in
|
|
465
|
+
'Tell the user to activate their license in Open console → settings → license & privacy — do not retry until they have.'
|
|
463
466
|
);
|
|
464
467
|
}
|
|
465
468
|
if ( 403 === response.status ) {
|