## What changed
This updates the command parsing helpers to recognize leading
environment assignments only when they match shell-style variable syntax
like `FOO=bar`. The previous implementation treated any leading token
containing `=` as an env assignment, which could misclassify real
commands or file paths that happen to include `=`. Both
`_strip_env_assignments()` and `extract_command_prefix()` now share the
same validation helper so their behavior stays consistent.
## Why it matters
These helpers are used by fast-path request optimizations, so incorrect
prefix detection can bypass normal handling with the wrong result.
Restricting env stripping to valid assignment tokens fixes false
positives without changing the public API or the response format.
## How it was tested
I validated the updated logic against representative inputs such as
`FOO=bar git status`, plain commands like `git status`, and malformed or
path-like tokens containing `=` that should not be treated as env
assignments. The change is isolated to parsing logic and does not
introduce new dependencies.
---------
Co-authored-by: genoshide <genoshide@users.noreply.github.com>
## What changed
This updates `extract_filepaths_from_command()` to skip leading
environment variable assignments before detecting the actual command.
The same parsing pattern was already used in `extract_command_prefix()`,
but filepath extraction still treated the first token as the command
even when it was an env assignment.
## Why it matters
Commands like `FOO=bar cat README.md` or `DEBUG=1 grep pattern file.txt`
were incorrectly classified because `FOO=bar` was treated as the
executable name. That caused the optimization path to return an empty
`<filepaths>` block instead of the file paths the command actually
reads.
## How it was tested
Tested the updated logic against env-prefixed read commands such as
`FOO=bar cat README.md` and `DEBUG=1 grep needle app.py`. Also verified
existing behavior remains unchanged for plain commands like `cat
file.txt`, `grep pattern file.txt`, and listing commands like `ls`.
Co-authored-by: genoshide <genoshide@users.noreply.github.com>
Consolidates the incremental refactor work into a single change set: modular web tools (api/web_tools), native Anthropic request building and SSE block policy, OpenAI conversion and error handling, provider transports and rate limiting, messaging handler and tree queue, safe logging, smoke tests, and broad test coverage.