@matheuskrumenauer/tanya 0.6.0-beta.0 → 0.7.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
@@ -245,12 +245,24 @@ Tanya handles context pressure as a cascade instead of truncating abruptly:
245
245
  1. Microcompact folds empty/no-op tool-call pairs in place.
246
246
  2. Snip removes low-signal history such as duplicate file reads and empty read-only tool results.
247
247
  3. Auto-compact reacts to provider `413` / context-window errors by summarizing older turns into a `[compaction summary: ...]` system message and retrying once normally, then once more aggressively.
248
- 4. Archive writes compacted messages to `.tanya/runs/<runId>/archive.jsonl` before they leave live history, so verifier scans and future memory tools can still inspect them.
248
+ 4. Archive writes compacted messages to `.tania/runs/<runId>/archive.jsonl` before they leave live history, so verifier scans and future memory tools can still inspect them.
249
249
 
250
250
  Runs are capped at three total auto-compactions. If the provider still rejects the context, Tanya raises `CompactionExhaustedError` and asks the user to narrow the task, clear the session, or split the work.
251
251
 
252
252
  See [docs/long-sessions.md](./docs/long-sessions.md) for details.
253
253
 
254
+ ## Token economy
255
+
256
+ Tanya trims model-visible tokens while keeping state reversible and auditable.
257
+
258
+ - Lite prompts can be enabled with `TANYA_LITE_PROMPT=1` for cheap-provider exploration turns. The legacy `TANIA_LITE_PROMPT` alias is still accepted.
259
+ - System prompts are automatically capped to the active provider context window. Tune the default 25% cap with `TANYA_PROMPT_BUDGET_RATIO`.
260
+ - Large shell/tool outputs are shortened for the model with a visible `<truncated ...>` marker. Use `expand_result` with the marker's `tool_call_id` to fetch the full output or a byte range.
261
+ - Repeated unchanged `read_file` calls return a reference marker instead of resending the same content. Pass `force: true` when the agent genuinely needs the full file again.
262
+ - `/budget` reports token usage, cost estimates, expensive turns, and one deterministic optimization suggestion. `/budget --enforce --max-usd <amount>` persists a session spend rule through the permission engine.
263
+
264
+ See [docs/token-economy.md](./docs/token-economy.md) for the full model, cache locations, and tool-definition knobs.
265
+
254
266
  Context files are generic JSON envelopes for caller-supplied task metadata, artifacts, instructions, and verification commands.
255
267
 
256
268
  ## Current Tools