github mksglu/context-mode v0.9.18

latest releases: v1.0.89, v1.0.88, v1.0.87...
one month ago

What's New

Cross-Platform Windows Fix

  • Root cause fixed: import() with Windows paths silently failed — now uses pathToFileURL() for reliable ESM loading on all platforms
  • Stdout flush: Refactored hook routing into a pure function pattern — no more process.exit() dropping piped stdout on Windows
  • CI: All tests now run on Windows, Ubuntu, and macOS

JSON Chunking & Content-Type Routing

  • fetch_and_index now auto-detects content type (JSON/HTML/text)
  • JSON content is chunked by key paths with identity-field-aware array batching
  • maxChunkBytes (4096) cap prevents oversized chunks

Performance: Prepared Statement Caching

  • 19 inline db.prepare() → 15 cached class fields
  • Avoids SQL recompilation per query

Intent-Aware Read Guidance

  • Read IS correct when the goal is to Edit (Edit needs file content in context)
  • execute_file preferred for analysis/exploration
  • Fixes the double-read problem (execute_file → Read before Edit)

Shell Commands Run in Project Directory

  • execute/batch_execute shell commands now run in CLAUDE_PROJECT_DIR
  • Git, relative paths, and project-aware tools work naturally — no cd prefix needed

Security Module

  • Bash/Read/shell deny patterns with chained command splitting
  • Cross-platform path matching (backslash normalization for Windows)
  • Shell-escape scanner for non-shell languages

License

  • Switched from MIT to Elastic License 2.0 (ELv2)

Contributors

  • @rjkaes — prepared statements, stdin fix, searchWithFallback, stream byte cap, intent-aware Read guidance
  • @ekosz — Elixir language support
  • @dunika — CLAUDE_PROJECT_DIR relative paths

Upgrade

/context-mode:upgrade

Don't miss a new context-mode release

NewReleases is sending notifications on new releases.