hermes-hub/pyproject.toml
Hermes Team 9641957d5b fix(antigravity): вход завершался успешно, а agy требовал войти снова
agy 2.0 читает учётные данные не из .gemini/oauth_creds.json — это формат
Gemini CLI. Свой токен он берёт из .gemini/antigravity-cli/antigravity-oauth-token
в виде {"auth_method": ..., "token": {...}}. Хаб этот файл никогда не создавал,
поэтому «Авторизация успешно завершена» соседствовала с ответом
«Please sign in to view available models».

Установлено сравнением рабочего профиля владельца с неработающим: оба имели
oauth_creds.json одинакового размера, различие было только в этом файле.
Значение auth_method («consumer») взято из рабочего профиля, а не выведено
из общих соображений.

Срок годности пишется в обоих видах: expiry_date в миллисекундах для формата
Node и expiry строкой RFC3339 для Go-шного oauth2.Token.

Заодно устранён рост номеров профилей: слот выбирался до входа, когда почта
ещё неизвестна, и повторный вход тем же аккаунтом занимал очередной свободный
слот — один аккаунт владельца расползся на ag-2, ag-3, ag-4. Теперь после
опознания почты учётные данные возвращаются в слот, который этот аккаунт уже
занимает. Функция проверки двойников в проекте была, но её никто не вызывал.

Версия поднята до 0.1.3, чтобы отличать сборки на глаз. Проверка версии в
тестах сверяется с исходником, а не с записанным числом.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-01 10:37:27 +07:00

96 lines
2.8 KiB
TOML
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[project]
name = "hermes-hub"
version = "0.1.3"
description = "Multi-Agent & Multi-Provider Control Hub for Hermes Agent"
readme = "README.md"
license = { text = "MIT" }
requires-python = ">=3.10"
authors = [
{ name = "Hermes Development Team" }
]
keywords = [
"hermes",
"router",
"multi-provider",
"antigravity",
"codex",
"opencode",
"agentic-ai",
"cockpit",
"hub"
]
classifiers = [
"Development Status :: 4 - Beta",
"Intended Audience :: Developers",
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
]
dependencies = [
"pyyaml>=6.0.1",
"pydantic>=2.6.0",
"requests>=2.31.0",
"httpx>=0.27.0",
"psutil>=5.9.0",
"fastapi>=0.110.0",
"uvicorn>=0.28.0",
]
[project.optional-dependencies]
# gguf нужен только стенду замеров (benchmarks/run_benchmark.py) и не
# импортируется продуктом. В основных зависимостях он заставлял каждую
# установку хаба тянуть библиотеку разбора GGUF.
benchmarks = [
"gguf>=0.19.0",
]
dev = [
"pytest>=8.0.0",
"pytest-asyncio>=0.23.0",
"pytest-timeout>=2.3.0",
"anyio>=4.0.0",
"ruff>=0.3.0",
]
[project.scripts]
hermes-hub = "antigravity_provider.router.cli_commands:main"
[tool.hatch.build.targets.wheel]
packages = ["src/antigravity_provider"]
[tool.pytest.ini_options]
testpaths = ["tests"]
pythonpath = ["src"]
python_files = ["test_*.py"]
addopts = "-m 'not live and not network and not installer'"
timeout = 30
timeout_method = "thread"
markers = [
"unit: Unit tests that run isolated in-memory",
"integration: Component integration tests with isolated filesystem",
"network: Tests that perform real network calls",
"installer: Tests verifying installer and packaging",
"live: End-to-end tests requiring real user credentials",
]
[tool.ruff]
line-length = 120
target-version = "py310"
extend-exclude = ["legacy", ".venv"]
[tool.ruff.lint]
# Bug-catching rules only, so CI gives a real signal today.
# E9 - syntax / IO errors F63 - comparison & assert mistakes
# F7 - misplaced statements F82 - undefined names
# F811 - redefinition of an in-use name
# Style and modernization rules (UP, I, BLE, S, SIM, RUF) are intentionally
# left off: the codebase currently has ~1200 such findings, and enabling them
# wholesale would keep CI red instead of catching defects. Burn them down in
# a dedicated pass, then extend this list.
select = ["E9", "F63", "F7", "F82", "F811"]