@matheuskrumenauer/tanya 0.11.0-beta.0 → 0.14.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 +31 -20
- package/dist/cli.js +788 -731
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -296,26 +296,6 @@ up to `TANYA_ESCALATION_CAP` per session.
|
|
|
296
296
|
See [docs/routing.md](./docs/routing.md) for schema, examples, context-window
|
|
297
297
|
guards, per-tool model overrides, and sub-agent model pins.
|
|
298
298
|
|
|
299
|
-
## Reasoning models
|
|
300
|
-
|
|
301
|
-
Reasoning routes such as `deepseek-reasoner`, `qwen3-thinking-*`, and
|
|
302
|
-
`grok-3-reasoning` are handled as a separate stream. Tanya archives reasoning to
|
|
303
|
-
`.tania/runs/<runId>/reasoning.jsonl`, emits `reasoning_chunk` events, and keeps
|
|
304
|
-
assistant history reasoning-free so replay and verifier inputs stay stable.
|
|
305
|
-
|
|
306
|
-
Reasoning tokens appear separately in `/cost` and `/budget`. Route rules can set
|
|
307
|
-
`reasoningCap.maxTokens`; built-in defaults are 2k for planning-like turns and
|
|
308
|
-
8k for synthesis/verification/reasoning turns. If the cap is exceeded, Tanya
|
|
309
|
-
emits `reasoning_truncated` and asks the model to finish.
|
|
310
|
-
|
|
311
|
-
Use `/memory --reasoning <runId>` to inspect archived reasoning. Use
|
|
312
|
-
`TANYA_HIDE_REASONING=1` to hide reasoning from the human UI while preserving
|
|
313
|
-
JSONL/Cosmo events. Verifier reasoning annotations are off by default; enable
|
|
314
|
-
them with `--verbose-verifier` or `TANYA_VERIFIER_INCLUDE_REASONING=1`.
|
|
315
|
-
|
|
316
|
-
See [docs/reasoning.md](./docs/reasoning.md) for provider notes, billing math,
|
|
317
|
-
budget defaults, and UX modes.
|
|
318
|
-
|
|
319
299
|
`--verify` adds required verification commands to the run context. Tanya must run and report each exact command before finishing the coding task.
|
|
320
300
|
|
|
321
301
|
`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.
|
|
@@ -381,6 +361,36 @@ Tanya trims model-visible tokens while keeping state reversible and auditable.
|
|
|
381
361
|
|
|
382
362
|
See [docs/token-economy.md](./docs/token-economy.md) for the full model, cache locations, and tool-definition knobs.
|
|
383
363
|
|
|
364
|
+
## Edit blocks
|
|
365
|
+
|
|
366
|
+
`edit_block` applies bounded search/replace edits without falling back to a
|
|
367
|
+
full-file rewrite:
|
|
368
|
+
|
|
369
|
+
```json
|
|
370
|
+
{
|
|
371
|
+
"path": "src/example.ts",
|
|
372
|
+
"search": "const state = \"pending\";",
|
|
373
|
+
"replace": "const state = \"complete\";",
|
|
374
|
+
"expectedCount": 1,
|
|
375
|
+
"matchPolicy": "exact"
|
|
376
|
+
}
|
|
377
|
+
```
|
|
378
|
+
|
|
379
|
+
Exact mode is the default and fails closed when the block is missing, ambiguous,
|
|
380
|
+
or appears a different number of times than expected. Fuzzy mode is opt-in via
|
|
381
|
+
`matchPolicy: "fuzzy"` and requires an explicit M3 permission allow rule. Fuzzy
|
|
382
|
+
recovery only accepts whitespace-normalized or nearby-context candidates with
|
|
383
|
+
confidence >= 0.95; otherwise Tanya returns a structured error and asks the
|
|
384
|
+
model to re-read the file.
|
|
385
|
+
|
|
386
|
+
Successful edit blocks emit before/after hashes and a unified diff. Fuzzy
|
|
387
|
+
successes also add candidate metadata to the audit log. The final verifier still
|
|
388
|
+
reads the changed workspace independently; edit-block success is not a verifier
|
|
389
|
+
pass.
|
|
390
|
+
|
|
391
|
+
See [docs/edit-blocks.md](./docs/edit-blocks.md) for the full tool reference,
|
|
392
|
+
permission model, confidence threshold, and failure modes.
|
|
393
|
+
|
|
384
394
|
Context files are generic JSON envelopes for caller-supplied task metadata, artifacts, instructions, and verification commands.
|
|
385
395
|
|
|
386
396
|
## Current Tools
|
|
@@ -395,6 +405,7 @@ Context files are generic JSON envelopes for caller-supplied task metadata, arti
|
|
|
395
405
|
- `write_file`
|
|
396
406
|
- `apply_patch`
|
|
397
407
|
- `search_replace`
|
|
408
|
+
- `edit_block`
|
|
398
409
|
- `copy_file`
|
|
399
410
|
- `copy_dir`
|
|
400
411
|
- `apply_artifact`
|