Skip to content

fix(packaging): add hermes_cli.* to setuptools include so proxy subpa… - #28060

Closed
LifeJiggy wants to merge 2 commits into
NousResearch:mainfrom
LifeJiggy:fix/proxy-wheel-missing
Closed

fix(packaging): add hermes_cli.* to setuptools include so proxy subpa…#28060
LifeJiggy wants to merge 2 commits into
NousResearch:mainfrom
LifeJiggy:fix/proxy-wheel-missing

Conversation

@LifeJiggy

Copy link
Copy Markdown
Contributor

fix/proxy-wheel-missing → fixes #27938

fix(packaging): add hermes_cli.* to setuptools include so proxy subpackage ships in wheel

After compression, last_prompt_tokens was set to estimate_request_tokens_rough() which overcounts by 30-50% for tool-heavy sessions (tool schemas counted twice). This inflated value caused should_compress() to return True on the very next turn, triggering compression every 1-2 turns in a never-ending loop.

Setting to 0 forces the preflight to recalculate from the actual compressed messages on the next turn, which produces a value well below threshold_tokens. Real API response usage data overwrites last_prompt_tokens via update_from_response() on the next API call. Fixes #27938.

Related Issue
Fixes #27938

Type of Change

  • 🐛 Bug fix

Changes Made

  • pyproject.toml:217 — Added "hermes_cli." to [tool.setuptools.packages.find] include list. Every other top-level package (agent., gateway., tui_gateway., etc.) already had its recursive glob; hermes_cli.* was the only one missing, causing hermes_cli/proxy/ and all subpackages to be excluded from the wheel.

How to Test

  1. pip install "hermes-agent @ git+https://github.com/NousResearch/hermes-agent.git@v2026.5.16"
  2. Run hermes proxy providers
  3. Expected: shows nous — Nous Portal (not ModuleNotFoundError: No module named 'hermes_cli.proxy')

…ckage ships in wheel

hermes_cli/proxy/ and hermes_cli/proxy/adapters/ exist in git but
were excluded from the wheel because the setuptools find config
only included 'hermes_cli' (top-level) without 'hermes_cli.*'
(recursive subpackages). Every other top-level package already
had its .* counterpart. Fixes NousResearch#27938.
@LifeJiggy
LifeJiggy requested a review from a team May 18, 2026 15:16
@alt-glitch

Copy link
Copy Markdown
Collaborator

Duplicate of #27728 which is the omnibus packaging fix (superset — covers hermes_cli., acp_adapter., MANIFEST.in, and Homebrew). Both fix #27938/#27664. Closed #27726 was also a strict subset of #27728.

@alt-glitch alt-glitch added type/bug Something isn't working comp/cli CLI entry point, hermes_cli/, setup wizard P2 Medium — degraded but workaround exists duplicate This issue or pull request already exists labels May 18, 2026
@austinpickett
austinpickett requested a review from Copilot May 18, 2026 15:31

@austinpickett austinpickett left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use PULL_REQUEST_TEMPLATE.md

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR updates the Python packaging configuration so hermes_cli subpackages, including hermes_cli.proxy, are included in built wheels.

Changes:

  • Adds hermes_cli.* to setuptools package discovery.
  • Addresses the missing proxy subpackage reported in issue #27938.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyproject.toml

[tool.setuptools.packages.find]
include = ["agent", "agent.*", "tools", "tools.*", "hermes_cli", "gateway", "gateway.*", "tui_gateway", "tui_gateway.*", "cron", "acp_adapter", "plugins", "plugins.*", "providers", "providers.*"]
include = ["agent", "agent.*", "tools", "tools.*", "hermes_cli", "hermes_cli.*", "gateway", "gateway.*", "tui_gateway", "tui_gateway.*", "cron", "acp_adapter", "plugins", "plugins.*", "providers", "providers.*"]
Comment thread pyproject.toml

[tool.setuptools.packages.find]
include = ["agent", "agent.*", "tools", "tools.*", "hermes_cli", "gateway", "gateway.*", "tui_gateway", "tui_gateway.*", "cron", "acp_adapter", "plugins", "plugins.*", "providers", "providers.*"]
include = ["agent", "agent.*", "tools", "tools.*", "hermes_cli", "hermes_cli.*", "gateway", "gateway.*", "tui_gateway", "tui_gateway.*", "cron", "acp_adapter", "plugins", "plugins.*", "providers", "providers.*"]
@BoardJames-Bot

Copy link
Copy Markdown

BoardJames triage: uv lock --check is a real branch issue, but I can’t push the safe fix to the contributor fork (git push https://github.com/LifeJiggy/hermes-agent.git HEAD:fix/proxy-wheel-missing returned 403 for BoardJames-Bot). Source: the failing job says the merged PR state needs uv.lock updated; local reproduction in .triage/wt-28060 also fails uv lock --check. I synced the branch with current origin/main, ran uv lock, and uv lock --check then passed locally; that produced only a uv.lock refresh after the main sync (local commit 73c4df00c, not pushed). Exact upstream action needed: someone with write access to LifeJiggy:fix/proxy-wheel-missing should sync with main and commit the regenerated uv.lock (or cherry-pick the local lock refresh from this triage workspace). The separate Tests / test job is still in progress; e2e and all other non-lock checks are green so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/cli CLI entry point, hermes_cli/, setup wizard duplicate This issue or pull request already exists P2 Medium — degraded but workaround exists type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.14.0: hermes_cli.proxy missing from wheel — ModuleNotFoundError on hermes proxy <subcommand>

5 participants