Skip to content

v0.2.0

Choose a tag to compare

@mutawakkilalallah mutawakkilalallah released this 13 Jun 21:45

v0.2.0 — Token Hardening, Stability, and Release Pipeline

This release focuses on reducing token waste, improving long-session stability, hardening file/tool behavior, and preparing the project for a cleaner release workflow.

Highlights

  • Major token-efficiency improvements for tool results, file attachments, validation history, and session saves.
  • Smarter and safer read_file behavior with caps, query excerpts, and binary/minified file guards.
  • More robust OpenAI client behavior with timeout, retries, and clearer gateway error messages.
  • Better session persistence with fallback titles and local compaction.
  • CI, release scripts, expanded tests, and updated documentation.

Token & Context Efficiency

  • Added stale tool-result eviction and summarization to avoid resending large tool outputs forever.
  • Added per-tool-result cap with actionable hints for continuing via offset/limit or narrower queries.
  • Added deduplication for repeated read_file calls on the same path/offset/limit.
  • Added active cleanup for inline @file attachments after processing.
  • Kept only the latest automatic validation failure in active/saved history.
  • Added local serialization compaction for saved sessions.
  • Added local /compact fallback that mutates active history when LLM compaction fails.
  • Added max_tokens to main completion requests.
  • Added input/output token tracking and cost estimate in /usage.

Tool Improvements

  • Reduced read_file default cap to 500 lines / 30KB.
  • Added read_file.query for targeted excerpts around matching lines.
  • Added binary/non-text detection for read_file.
  • Added minified/generated-file guard for default read_file reads.
  • Added list_dir cap at 500 entries.
  • Updated grep_search output to prefer relative paths.
  • Added tests for read_file caps, query excerpts, binary/minified guards, list_dir, and grep_search.

Stability & UX

  • Added streaming fallback flush for long paragraphs without blank lines.
  • Added OpenAI client timeout and retry settings.
  • Added clearer timeout/gateway error messages.
  • Added synchronous fallback session title before background LLM title generation.
  • Improved session save hardening with sanitized history.
  • Added non-TTY CLI tests for --help and --version.

Docs & Release Workflow

  • Added GitHub Actions CI for build, test, and lint.
  • Added release:check and preversion scripts.
  • Updated README/DOCS for session paths, tool behavior, Windows best-effort notes, and quality gates.
  • Published package metadata now uses normalized bin path: aina -> bin/aina.js.

Validation

Validated before release with:

npm run release:check
npm pack --dry-run

Release check includes:

npm run build
npm test
npm run lint

### Published Package

- npm: ainacode@0.2.0
- CLI binary: aina
- Git tag: v0.2.0

### Notes

- Windows support is documented as best-effort until full native Windows TTY/ANSI testing is completed.
- Prompt caching remains deferred until gateway support for caching semantics is confirmed.
- Final-answer tool-schema suppression remains partial by design because the current loop does not add an extra final synthesis API call.