@matheuskrumenauer/tanya 0.13.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 +25 -19
- package/dist/cli.js +892 -1012
- package/dist/cli.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -361,29 +361,35 @@ Tanya trims model-visible tokens while keeping state reversible and auditable.
|
|
|
361
361
|
|
|
362
362
|
See [docs/token-economy.md](./docs/token-economy.md) for the full model, cache locations, and tool-definition knobs.
|
|
363
363
|
|
|
364
|
-
##
|
|
364
|
+
## Edit blocks
|
|
365
365
|
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
parser provenance, top-level symbols, imports, and exports so cheap providers
|
|
369
|
-
can target likely files before spending turns on blind reads.
|
|
366
|
+
`edit_block` applies bounded search/replace edits without falling back to a
|
|
367
|
+
full-file rewrite:
|
|
370
368
|
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
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
|
+
```
|
|
376
378
|
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
`
|
|
380
|
-
|
|
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.
|
|
381
385
|
|
|
382
|
-
|
|
383
|
-
|
|
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.
|
|
384
390
|
|
|
385
|
-
See [docs/
|
|
386
|
-
|
|
391
|
+
See [docs/edit-blocks.md](./docs/edit-blocks.md) for the full tool reference,
|
|
392
|
+
permission model, confidence threshold, and failure modes.
|
|
387
393
|
|
|
388
394
|
Context files are generic JSON envelopes for caller-supplied task metadata, artifacts, instructions, and verification commands.
|
|
389
395
|
|
|
@@ -392,7 +398,6 @@ Context files are generic JSON envelopes for caller-supplied task metadata, arti
|
|
|
392
398
|
- `list_files`
|
|
393
399
|
- `read_file`
|
|
394
400
|
- `search`
|
|
395
|
-
- `inspect_repo_map`
|
|
396
401
|
- `inspect_project_context`
|
|
397
402
|
- `find_reusable_artifacts`
|
|
398
403
|
- `build_task_brief`
|
|
@@ -400,6 +405,7 @@ Context files are generic JSON envelopes for caller-supplied task metadata, arti
|
|
|
400
405
|
- `write_file`
|
|
401
406
|
- `apply_patch`
|
|
402
407
|
- `search_replace`
|
|
408
|
+
- `edit_block`
|
|
403
409
|
- `copy_file`
|
|
404
410
|
- `copy_dir`
|
|
405
411
|
- `apply_artifact`
|