Fixed multiple linting issues:
- Removed trailing whitespace from blank lines in system.py
- Removed trailing whitespace from blank lines in tool.py
- Removed unused noqa directives in extension_protocols.py
- Fixed line length violation in session_service.py (split long line)
- Applied auto-fixes for other minor issues
All changes are style/formatting only, no functional changes.
The 'agents version' command was showing 'Commit: unknown' because the
_git_sha() function only tried to run 'git rev-parse', which fails when:
- Git is not installed
- Running from an installed package (no .git directory)
- In containerized environments without git
This fix adds support for the CLEVERAGENTS_COMMIT environment variable,
which should be set at build time to embed the commit SHA into the
runtime environment. The function now tries sources in this order:
1. CLEVERAGENTS_COMMIT environment variable (build-time value)
2. git rev-parse --short HEAD (for development from source)
3. Returns 'unknown' if neither is available
Build systems (CI, Docker, package build) should set CLEVERAGENTS_COMMIT
to ensure the commit is always available:
export CLEVERAGENTS_COMMIT=$(git rev-parse --short HEAD)
ISSUES CLOSED: #1520