hermes-agent/hermes_cli
Teknium 93e6a05efc
feat(model-picker): group multi-endpoint providers under one row (#35227)
* Inspired by Claude Code: /compress here [N] — boundary-aware 'summarize up to here'

Adds a user-chosen compression boundary to the existing /compress command.
/compress here [N] summarizes everything except the most recent N exchanges
(default 2), which are preserved verbatim — letting the user pick the
compression boundary instead of relying on the automatic token-budget heuristic.

Inspired by Claude Code's Rewind 'Summarize up to here' action (v2.1.139,
Week 20, May 2026): https://code.claude.com/docs/en/whats-new/2026-w20

- hermes_cli/partial_compress.py: pure split/parse helpers + seam-alternation
  guard (shared by CLI and gateway).
- cli.py / gateway/run.py: route 'here [N]' / '--keep N' to partial compression;
  compress only the head, re-append the verbatim tail through the seam guard.
- Preserves message-flow role alternation (seam guard merges any illegal
  user->user / assistant->assistant adjacency).
- Reuses the existing _compress_context session-rotation/lock machinery — no
  changes to the compression core.
- Bare /compress (full) and /compress <focus> behavior unchanged.

Tests: 12 helper unit tests + 5 CLI integration tests + E2E (interleaved
tool-call transcript, degenerate/multimodal seams, real handler path).

* feat(model-picker): group multi-endpoint providers under one row

The interactive provider pickers (hermes model, setup wizard, Telegram
/model) listed every provider slug flat, so vendors with several endpoints
(Kimi/Moonshot, MiniMax, xAI Grok, Google Gemini, OpenAI, OpenCode, GitHub
Copilot) each occupied multiple top-level rows. Now related slugs fold into
one top-level row that drills down to the specific endpoint.

- models.py: add PROVIDER_GROUPS table + group_providers() fold (display
  only — CANONICAL_PROVIDERS, slugs, --provider, /model <provider:model>
  all unchanged and individually addressable).
- hermes model (main.py): group rows drill into a member sub-picker, then
  dispatch to the existing _model_flow_* unchanged. setup wizard inherits it.
- Telegram /model: new mpg:<group> callback expands to member mp:<slug>
  buttons; single authenticated member degrades to a direct button.
- Grouping is the single shared fold across all three surfaces.

Validation: 163 targeted tests pass; E2E confirms group->member->model
resolves to the correct concrete slug for all families.
2026-05-30 01:41:33 -07:00
..
dashboard_auth
…
proxy
…
__init__.py
…
_parser.py
…
_subprocess_compat.py
…
auth.py
…
auth_commands.py
…
azure_detect.py
…
backup.py
…
banner.py
…
browser_connect.py
…
build_info.py
…
bundles.py
…
callbacks.py
…
checkpoints.py
…
claw.py
…
cli_output.py
…
clipboard.py
…
codex_models.py
…
codex_runtime_plugin_migration.py
…
codex_runtime_switch.py
…
colors.py
…
commands.py
…
completion.py
…
config.py
…
container_boot.py
…
copilot_auth.py
…
cron.py
…
curator.py
…
curses_ui.py
…
debug.py
…
default_soul.py
…
dep_ensure.py
…
dingtalk_auth.py
…
doctor.py
…
dump.py
…
env_loader.py
…
fallback_cmd.py
…
fallback_config.py
…
gateway.py
…
gateway_windows.py
…
goals.py
…
hooks.py
…
inventory.py
…
kanban.py
…
kanban_db.py
…
kanban_decompose.py
…
kanban_diagnostics.py
…
kanban_specify.py
…
kanban_swarm.py
…
logs.py
…
main.py feat(model-picker): group multi-endpoint providers under one row (#35227) 2026-05-30 01:41:33 -07:00
mcp_catalog.py
…
mcp_config.py
…
mcp_picker.py
…
memory_setup.py
…
migrate.py
…
model_catalog.py
…
model_normalize.py
…
model_switch.py
…
models.py feat(model-picker): group multi-endpoint providers under one row (#35227) 2026-05-30 01:41:33 -07:00
nous_account.py
…
nous_subscription.py
…
oneshot.py
…
pairing.py
…
partial_compress.py
…
platforms.py
…
plugins.py
…
plugins_cmd.py
…
portal_cli.py
…
profile_describer.py
…
profile_distribution.py
…
profiles.py
…
providers.py
…
psutil_android.py
…
pt_input_extras.py
…
pty_bridge.py
…
relaunch.py
…
runtime_provider.py
…
secret_prompt.py
…
secrets_cli.py
…
security_advisories.py
…
security_audit.py
…
send_cmd.py
…
service_manager.py
…
session_recap.py
…
setup.py
…
skills_config.py
…
skills_hub.py
…
skin_engine.py
…
slack_cli.py
…
status.py
…
stdio.py
…
timeouts.py
…
tips.py
…
tools_config.py
…
uninstall.py
…
voice.py
…
web_server.py
…
webhook.py
…
xai_retirement.py
…