@sonenta/cli 0.18.0 → 0.20.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/README.md +5 -1
- package/dist/index.js +32 -8
- package/dist/index.js.map +1 -1
- package/package.json +2 -3
- package/bin/verbumia.js +0 -11
package/README.md
CHANGED
|
@@ -102,7 +102,11 @@ you to fix by reloading the session.
|
|
|
102
102
|
|
|
103
103
|
`agents add` drops a ready-made Claude agent into the project's
|
|
104
104
|
`.claude/agents/` directory — usable interactively in Claude Code or headless in
|
|
105
|
-
CI.
|
|
105
|
+
CI. Each agent **preflights its prerequisites at startup** — it verifies the
|
|
106
|
+
`@sonenta/mcp` server is connected with an `mcp:*` key before doing any work, and
|
|
107
|
+
if not, fails fast with the exact fix (`sonenta agents add` to wire it, reload
|
|
108
|
+
the session, `sonenta doctor` to diagnose) instead of probing 404s. The bundled
|
|
109
|
+
agents are **local-first** and CRUD-based: they do the work
|
|
106
110
|
themselves and write it back via plain CRUD tools (**0 Sonenta AI credits**;
|
|
107
111
|
changes land as drafts or soft/restorable for review); any server-side AI is an
|
|
108
112
|
explicit, estimated, opt-in fallback.
|
package/dist/index.js
CHANGED
|
@@ -6,7 +6,7 @@ import { Command as Command17 } from "commander";
|
|
|
6
6
|
// package.json
|
|
7
7
|
var package_default = {
|
|
8
8
|
name: "@sonenta/cli",
|
|
9
|
-
version: "0.
|
|
9
|
+
version: "0.20.0",
|
|
10
10
|
description: "Command-line interface for Sonenta translation management.",
|
|
11
11
|
license: "MIT",
|
|
12
12
|
homepage: "https://sonenta.com",
|
|
@@ -29,8 +29,7 @@ var package_default = {
|
|
|
29
29
|
author: "Sonenta",
|
|
30
30
|
type: "module",
|
|
31
31
|
bin: {
|
|
32
|
-
sonenta: "bin/sonenta.js"
|
|
33
|
-
verbumia: "bin/verbumia.js"
|
|
32
|
+
sonenta: "bin/sonenta.js"
|
|
34
33
|
},
|
|
35
34
|
main: "./dist/index.js",
|
|
36
35
|
types: "./dist/index.d.ts",
|
|
@@ -73,6 +72,27 @@ import { Command as Command2 } from "commander";
|
|
|
73
72
|
import { promises as fs } from "fs";
|
|
74
73
|
import { resolve } from "path";
|
|
75
74
|
var AGENTS_DIR = ".claude/agents";
|
|
75
|
+
var PREFLIGHT = `## Preflight \u2014 verify your tools FIRST (fail fast, don't guess)
|
|
76
|
+
Before ANY work, confirm the Sonenta MCP tools are actually available to you in
|
|
77
|
+
this session \u2014 make a SINGLE cheap read (e.g. \`get_project_info\` or the first
|
|
78
|
+
read your task needs). Treat the result as a gate:
|
|
79
|
+
- **Tools missing** (you don't see the Sonenta MCP tools in your toolset, or the
|
|
80
|
+
call errors with "tool not found" / a connection failure) \u2192 the \`@sonenta/mcp\`
|
|
81
|
+
server isn't connected. **STOP and say so**, e.g.: "I can't run \u2014 I need the
|
|
82
|
+
\`@sonenta/mcp\` server connected with an \`mcp:*\` API key. Fix it: run
|
|
83
|
+
\`sonenta agents add <name>\` (it wires \`.mcp.json\` and preflights), then
|
|
84
|
+
RELOAD this Claude session so the server connects. Run \`sonenta doctor\` to see
|
|
85
|
+
the exact missing piece \u2014 it checks the wiring, host, key scope, and tools and
|
|
86
|
+
prints the precise next step."
|
|
87
|
+
- **Auth / scope error** (401 invalid key, or 403 \`MISSING_SCOPE\`) \u2192 the key is
|
|
88
|
+
missing or lacks \`mcp:*\`. STOP and relay the fix verbatim: a 403 carries
|
|
89
|
+
\`detail.how_to_get\` / \`detail.message\` (a ready-to-run command) \u2014 show it; or
|
|
90
|
+
point to \`sonenta doctor\`. Do NOT retry blindly.
|
|
91
|
+
- **Tools respond** \u2192 proceed with the workflow below.
|
|
92
|
+
NEVER probe arbitrary endpoints, guess tool names or URL paths, or hammer a
|
|
93
|
+
failing call \u2014 one clear, actionable message beats a pile of 404s.
|
|
94
|
+
|
|
95
|
+
`;
|
|
76
96
|
var SONENTA_A11Y = `---
|
|
77
97
|
name: sonenta-a11y
|
|
78
98
|
description: Accessibility (a11y) auditor and fixer for Sonenta-managed i18n projects. Runs a complete code-aware WCAG 2.2 audit, then works like sonenta-source-health \u2014 it builds a remediation PLAN, presents it and reassures you, touches NOTHING until you accept, and only then executes the fixes (a11y variants in bulk, reversible drafts). Generates the alt/aria/screen-reader/plain-language text itself and computes real readability locally, at zero AI-credit cost; server-side AI is an explicit opt-in fallback. Also applies the remediation plans prepared + approved in the Sonenta dashboard, and produces formal WCAG conformance + EAA / EN 301 549 statements. Use interactively in Claude Code or headless in CI.
|
|
@@ -108,7 +128,7 @@ default: those bill Sonenta AI credits and exist only as an explicit fallback fo
|
|
|
108
128
|
very large volumes or when the developer specifically asks for server-side
|
|
109
129
|
generation.
|
|
110
130
|
|
|
111
|
-
## Requirements
|
|
131
|
+
${PREFLIGHT}## Requirements
|
|
112
132
|
- The Sonenta MCP server (\`@sonenta/mcp\`) must be configured with an \`mcp:*\`
|
|
113
133
|
API key. Every operation goes through its tools \u2014 never call the HTTP API
|
|
114
134
|
directly. If the a11y tools are missing, tell the user to add the server
|
|
@@ -346,7 +366,7 @@ results with \`propose_translations_bulk\` as **drafts/proposed** \u2014 plain C
|
|
|
346
366
|
translation by default; where such a path exists it BILLS Sonenta AI credits and
|
|
347
367
|
is an explicit, estimate-first, opt-in fallback for very large volumes.
|
|
348
368
|
|
|
349
|
-
## Requirements
|
|
369
|
+
${PREFLIGHT}## Requirements
|
|
350
370
|
- The Sonenta MCP server (\`@sonenta/mcp\`) must be configured with an \`mcp:*\`
|
|
351
371
|
API key. Everything goes through its tools \u2014 never call the HTTP API directly.
|
|
352
372
|
If the tools are missing, tell the user to add the server
|
|
@@ -464,7 +484,7 @@ narrate what you are about to do, and wait for a clear yes. Reassure: nothing yo
|
|
|
464
484
|
propose is destructive until accepted, deletes are soft (trash, restorable), and
|
|
465
485
|
every change is a reviewable draft.
|
|
466
486
|
|
|
467
|
-
## Requirements
|
|
487
|
+
${PREFLIGHT}## Requirements
|
|
468
488
|
- The Sonenta MCP server (\`@sonenta/mcp\`) must be configured with an \`mcp:*\`
|
|
469
489
|
API key. Every operation goes through its tools \u2014 never call the HTTP API
|
|
470
490
|
directly. If the tools are missing, tell the user to add the server
|
|
@@ -671,7 +691,7 @@ Knowledge is human-owned. You **propose, then confirm before you overwrite**.
|
|
|
671
691
|
- Everything you write is a reviewable change \u2014 present proposals as proposals,
|
|
672
692
|
not as done deals.
|
|
673
693
|
|
|
674
|
-
## Requirements
|
|
694
|
+
${PREFLIGHT}## Requirements
|
|
675
695
|
- The Sonenta MCP server (\`@sonenta/mcp\`) must be configured with an \`mcp:*\`
|
|
676
696
|
API key. Every operation goes through its tools \u2014 never call the HTTP API
|
|
677
697
|
directly. If the tools are missing, tell the user to add the server
|
|
@@ -832,7 +852,7 @@ There is no server-side AI in this agent.
|
|
|
832
852
|
\`update_surface\` response \`affected_variants\` reports how many variants a
|
|
833
853
|
toggle impacts \u2014 always state that blast radius before toggling.
|
|
834
854
|
|
|
835
|
-
## Requirements
|
|
855
|
+
${PREFLIGHT}## Requirements
|
|
836
856
|
- The Sonenta MCP server (\`@sonenta/mcp\`) must be configured with an \`mcp:*\`
|
|
837
857
|
API key. Every operation goes through its tools \u2014 never call the HTTP API
|
|
838
858
|
directly. If the tools are missing, tell the user to add the server
|
|
@@ -1939,6 +1959,10 @@ function renderManagedBlock(d) {
|
|
|
1939
1959
|
" }",
|
|
1940
1960
|
"}",
|
|
1941
1961
|
"```",
|
|
1962
|
+
"",
|
|
1963
|
+
"The server targets `" + DOC_API_HOST + "` by default; set `SONENTA_BASE_URL` (or `SONENTA_API_BASE`) in `env` to retarget a",
|
|
1964
|
+
"self-host or staging deployment. The API key may be omitted from `env` if you have run",
|
|
1965
|
+
"`sonenta login` \u2014 the server then reads it from `~/.sonenta/credentials`.",
|
|
1942
1966
|
BLOCK_END,
|
|
1943
1967
|
""
|
|
1944
1968
|
];
|