Appends an ISO 8601 current-time tag to the user message tail via the pre_llm_call hook. Two independent triggers, whichever fires first: - USER_MESSAGE_INTERVAL (default 5): every Nth user message - TIME_INTERVAL_SECONDS (default 1800): wall-clock interval First injection for a session always fires on the very first user message. State is held in memory only (lazy TTL + 1024-session LRU cap). Per-session state is dropped on on_session_end. Time format: ISO 8601 with UTC offset, second precision. Honours $TZ via POSIX time.tzset() if set; defaults to host local timezone. Plugin is opt-in via 'hermes plugins enable hermes-currenttime-hint'. No per-plugin configuration. Plugin.yaml hooks and register() wiring are validated by tests/test_registration.py.
19 lines
No EOL
637 B
Makefile
19 lines
No EOL
637 B
Makefile
default: verify
|
|
verify: lint format-check bandit vulture typecheck test
|
|
test:
|
|
@echo "Run: PYTHONPATH=. python3 -m pytest tests/ -v"
|
|
uv run pytest -v
|
|
lint:
|
|
uv run ruff check __init__.py tests/
|
|
format:
|
|
uv run ruff format __init__.py tests/
|
|
format-check:
|
|
uv run ruff format --check __init__.py tests/
|
|
typecheck:
|
|
uv run ty check __init__.py tests/
|
|
bandit:
|
|
uv run bandit -r __init__.py tests/ -c pyproject.toml
|
|
vulture:
|
|
uv run vulture . .vulture_whitelist.py --exclude '.venv,dist,.git,__pycache__'
|
|
clean:
|
|
find . -type d -name __pycache__ -exec rm -rf {} + 2>/dev/null; find . -type f -name '*.pyc' -delete
|