@matheuskrumenauer/tanya 0.7.0-beta.0 → 0.10.0-beta.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
@@ -174,6 +174,7 @@ tanya runs # show recent run logs with cost/status
174
174
  tanya video presets # list available video presets
175
175
  tanya video one-terminal-simctl # generate the exact transparent terminal asset
176
176
  tanya providers test # provider smoke test
177
+ tanya mcp serve # expose Tanya verifier/run/skills over MCP stdio
177
178
  tanya doctor # local environment check
178
179
  ```
179
180
 
@@ -188,6 +189,7 @@ model:
188
189
  /verify # print the deterministic verifier report for the cwd
189
190
  /cost # show persisted token usage and estimated cost
190
191
  /memory --limit 5 # list recent golden-task memory
192
+ /mcp # list connected MCP servers and tools
191
193
  ```
192
194
 
193
195
  Project-local commands live in `.tania/commands/*.{js,ts,sh}` and appear in
@@ -198,6 +200,73 @@ run directly; JavaScript and TypeScript commands export a default
198
200
  Project-local commands are arbitrary code execution and are gated by the same
199
201
  permission engine as native tools.
200
202
 
203
+ ## Sub-agent tool
204
+
205
+ The `task` tool delegates a bounded child run while keeping the parent in
206
+ control:
207
+
208
+ ```json
209
+ {
210
+ "prompt": "Map the auth module and report blockers.",
211
+ "workspace": "src/auth",
212
+ "max_turns": 12,
213
+ "token_budget": { "max_tokens": 12000 },
214
+ "treat_failure_as": "warning"
215
+ }
216
+ ```
217
+
218
+ Children inherit the parent's skill packs, permission rules, workspace, and
219
+ budget. They may narrow those constraints but cannot loosen them. Depth is
220
+ capped at 2 by default (`TANYA_SUBTASK_MAX_DEPTH`), and active children share a
221
+ default parallel cap of 3 (`TANYA_SUBTASK_MAX_PARALLEL`).
222
+
223
+ Every child runs its own verifier. Failed child verdicts become parent blockers
224
+ by default; `treat_failure_as` can demote a specific child to `warning` or
225
+ `ignore` when the caller wants advisory work only. Child events stream into the
226
+ parent log with a `subRunId`, and parent cancellation propagates into active
227
+ children.
228
+
229
+ See [docs/sub-agents.md](./docs/sub-agents.md) for permission inheritance,
230
+ budget-ledger semantics, cancellation, verifier composition, and memory rollup.
231
+
232
+ ## MCP integration
233
+
234
+ Tanya can consume external Model Context Protocol servers and expose Tanya's own
235
+ verifier and memory primitives to MCP-speaking clients.
236
+
237
+ Client configuration is allowlist-only. User-global servers are read from
238
+ `~/.tanya/mcp.json` with a fallback read of `~/.tania/mcp.json`; project servers
239
+ live in `.tania/mcp.json` and override same-named user servers. Connected tools
240
+ are registered as normal Tanya tools named `mcp:<server>:<tool>`, so permission
241
+ rules, audit logging, truncation, and verifier visibility apply exactly as they
242
+ do for native tools.
243
+
244
+ ```json
245
+ {
246
+ "version": 1,
247
+ "servers": [
248
+ {
249
+ "name": "filesystem",
250
+ "transport": "stdio",
251
+ "command": "npx",
252
+ "args": ["-y", "@modelcontextprotocol/server-filesystem", "."]
253
+ }
254
+ ]
255
+ }
256
+ ```
257
+
258
+ Use `/mcp` in the REPL to inspect connected servers. Use `tanya mcp serve` to
259
+ start Tanya's MCP server over stdio; it exposes `tanya.verify`,
260
+ `tanya.golden_task_search`, `tanya.run`, and `tanya.skills_list`.
261
+
262
+ MCP servers are untrusted code. Tanya refuses undeclared servers, gates every
263
+ MCP tool call through the permission engine, captures stdio server stderr under
264
+ `.tania/mcp/logs/`, restarts crashed servers up to three times, and rejects
265
+ schema-invalid tool responses before they reach model history.
266
+
267
+ See [docs/mcp.md](./docs/mcp.md) for the full schema, transports, server tools,
268
+ and security model.
269
+
201
270
  `--verify` adds required verification commands to the run context. Tanya must run and report each exact command before finishing the coding task.
202
271
 
203
272
  `tanya benchmark run --all` currently exercises 27 executable low-to-medium regression fixtures: targeted edits, new files, dependency/lockfile updates, framework-style migrations, failing-test repair, frontend smoke checks, artifact/context reuse, streaming long-tool execution, compaction-boundary recovery, run-history logging, dirty worktrees, report repair, and the CosmoHQ mobile/backend smoke profiles.