@sonenta/cli 0.17.0 → 0.19.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 CHANGED
@@ -81,16 +81,32 @@ scope (see [Auth](#auth)).
81
81
  | `snapshot` | Emit a build-time `initialBundles` module for `@sonenta/react-i18next` |
82
82
  | `missing` | List runtime-detected missing keys |
83
83
  | `agents list` | List the bundled Claude agents available to install |
84
- | `agents add <name>`| Write a bundled agent into `.claude/agents/<name>.md` |
84
+ | `agents add <name>`| Write a bundled agent into `.claude/agents/<name>.md` + auto-wire `.mcp.json` + run a preflight |
85
+ | `doctor` | Preflight the agent setup — MCP wired + reachable, key has `mcp:*`, project a11y tools respond — with an exact fix for anything off |
85
86
 
86
87
  Mutating commands accept `--dry-run` and print a `created / updated / unchanged`
87
88
  summary.
88
89
 
90
+ ### `sonenta doctor`
91
+
92
+ `sonenta doctor` (also run automatically at the end of `sonenta agents add`)
93
+ checks, in order: project config, login, the `.mcp.json` wiring, the host is
94
+ reachable (no silent 404), the account is active, the key carries the `mcp:*`
95
+ scope, and the project's a11y MCP tools respond. Every failure prints the exact
96
+ next step (e.g. *"key lacks mcp:\* → create one in Org Settings → API Keys, then
97
+ `sonenta login`"*), and it exits non-zero so it gates CI. The one thing it can't
98
+ observe — whether your Claude session has loaded the MCP connection — it reminds
99
+ you to fix by reloading the session.
100
+
89
101
  ### Installable agents
90
102
 
91
103
  `agents add` drops a ready-made Claude agent into the project's
92
104
  `.claude/agents/` directory — usable interactively in Claude Code or headless in
93
- CI. The bundled agents are **local-first** and CRUD-based: they do the work
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
94
110
  themselves and write it back via plain CRUD tools (**0 Sonenta AI credits**;
95
111
  changes land as drafts or soft/restorable for review); any server-side AI is an
96
112
  explicit, estimated, opt-in fallback.