Teknium
8eeb79aade
refactor(cli/commands): extract completer + platform derivations into commands_completion/commands_platforms with lazy re-exports
...
- hermes_cli/commands.py keeps CommandDef, COMMAND_REGISTRY, derived lookups, gateway helpers;
all moved names resolve via PEP 562 __getattr__ so imports and patch targets keep working
- completer: per-command _<x>_completions -> module functions sharing _prefix_completions /
_split_args; static refs table; SlashCommandAutoSuggest shares _allowed/_history_suggestion
- platforms: telegram/discord/slack derivations, _nested_mapping + _dedupe_sanitized_names
folded into _telegram_command_menu_config / _sanitized_rank
- COMMAND_REGISTRY + telegram/discord/slack derivations + completer output byte-identical vs base
2026-09-02 15:35:08 -07:00
Teknium
120aa68922
refactor(models): extract validate_requested_model into models_validate with shared verdict/match helpers; drop dead _OPENCODE_KEYLESS_EXTRA_SLUGS
2026-09-02 15:34:04 -07:00
Teknium
2497ec5126
refactor(web_server): extract dashboard SPA/theme/plugin-hub cluster to web_server_dashboard
2026-09-02 15:33:48 -07:00
Teknium
1fcc26e2ba
refactor(cli/plugins): extract manifest parsing, discovery scanning/gating, and plugin state into plugins_manifest/plugins_discovery/plugins_state
2026-09-02 15:32:17 -07:00
Teknium
55f47d8e95
refactor(config): extract custom-provider resolution to hermes_cli/config_providers.py
2026-09-02 15:31:26 -07:00
Teknium
b131e0d87f
refactor(hermes_cli/main): extract TUI launcher cluster to main_tui_launch.py
2026-09-02 15:30:43 -07:00
Teknium
2abf70aa90
refactor(auth): split Spotify, Codex, xAI and MiniMax OAuth flows into per-provider modules
2026-09-02 15:29:14 -07:00
Teknium
e2d7a6f8b8
refactor(update): drop dead _gateway_restart_recovery_profiles; write sibling-snapshot cache via module attribute
2026-09-02 15:27:33 -07:00
Teknium
ffa9e0ff39
refactor(auth): split Qwen OAuth flow into hermes_cli/auth_qwen.py
2026-09-02 15:25:47 -07:00
Teknium
2d0d797ceb
refactor(config_defaults): build auxiliary task blocks via _aux()
2026-09-02 15:23:53 -07:00
Teknium
87e7f41c09
refactor(auth): extract constants, lazy httpx proxy and AuthError into auth_constants leaf
2026-09-02 15:23:08 -07:00
Teknium
86100e5321
refactor(config_defaults): build OPTIONAL_ENV_VARS via _env() and collapse scalar sub-dicts
2026-09-02 15:21:52 -07:00
Teknium
88b74d6ef0
Merge branch 'simp/hclib' into simp/integration
2026-09-02 15:05:48 -07:00
Teknium
cfa327e5dc
refactor(hclib): remaining hermes_cli library modules — dead code, unified helpers, flattened branches
2026-09-02 15:03:42 -07:00
Teknium
ae70536485
Merge branch 'simp/web' into simp/integration
2026-09-02 15:01:45 -07:00
Teknium
24b9d18448
Merge branch 'simp/cli-models' into simp/integration
...
Conflict in hermes_cli/model_setup_flows.py: took simp/cli-models's
simplified version and re-applied simp/cli-main's 2-line change (import
_current_reasoning_effort/_set_reasoning_effort from hermes_cli.setup
instead of hermes_cli.main, since cli-main removed the main.py copies).
simp/cli-models had dropped those two helpers from hermes_cli.setup.py as
dead (their only base caller was main.py's own copy); restored them there
so the cli-main import path resolves.
2026-09-02 15:01:11 -07:00
Teknium
78335adfec
refactor(hclib): shared roots — hermes_constants, hermes_logging, utils, _subprocess_compat compaction and dedupe
2026-09-02 14:47:26 -07:00
Teknium
2c7f5d12b5
refactor(hclib): cron/update/install lifecycle — cron status, update_* receipts and recovery, install repair, service manager
2026-09-02 14:45:25 -07:00
Teknium
3ffd44acd3
refactor(hclib): models/runtime — models, inventory, runtime_provider, provider catalog, local_runtime, banner
2026-09-02 14:44:48 -07:00
Teknium
5d4b97939e
refactor(hclib): config — config/config_migrations/tools_config/toolset_* dispatch tables and dedupe
2026-09-02 14:42:18 -07:00
Teknium
3371814034
refactor(hclib): auth — Nous/Copilot/portal auth, credential lifecycle, keepalive simplified
2026-09-02 14:42:18 -07:00
Teknium
0330faffcb
Merge branch 'simp/state' into simp/integration
2026-09-02 14:19:40 -07:00
Teknium
1593bee0c3
Merge branch 'simp/cron' into simp/integration
2026-09-02 14:19:40 -07:00
Teknium
81ddc99705
Merge branch 'simp/cli-update' into simp/integration
2026-09-02 14:19:37 -07:00
Teknium
50be642e52
Merge branch 'simp/cli-misc' into simp/integration
2026-09-02 14:19:37 -07:00
Teknium
db0515f120
Merge branch 'simp/cli-mixins' into simp/integration
2026-09-02 14:19:37 -07:00
Teknium
beb56b6a00
refactor(web): re-export list_credential_pool from web_server for off-loop tests
2026-09-02 13:49:24 -07:00
Teknium
7c0d8f2c6f
refactor(web): second-pass compaction of local_models/profiles/web_git (helpers, dict literals, docstrings)
2026-09-02 13:35:48 -07:00
Teknium
15aaa359bf
refactor(web): strip web_models provenance banners, compact field comments (schema byte-identical)
2026-09-02 13:35:24 -07:00
Teknium
bdf1d8b0cf
refactor(web): dedupe web_git subprocess/ref-list plumbing, drop dead _MAX_BUFFER
2026-09-02 13:35:24 -07:00
Teknium
de626c5a36
refactor(web): unify profiles router error mapping, target enumeration and row tagging
2026-09-02 13:34:56 -07:00
Teknium
8c5af5733a
refactor(web): collapse local_models job/download/server boilerplate into shared helpers
2026-09-02 13:33:24 -07:00
Teknium
7d28a33bd9
refactor(web): simplify dashboard_procs/dashboard_register (dedupe home/profile helpers, drop _HEX16 alias, compact docs)
2026-09-02 13:33:23 -07:00
Teknium
5c7096e7cf
refactor(web): delete dead web_server helpers (_demo, _ws_request_reason, _TERMINAL_BACKEND_NAMES, _mcp_oauth_callback_url_from_base)
2026-09-02 13:33:23 -07:00
Teknium
4fd970c62f
refactor(web): absorb single-router web_server helpers into their routers (75 defs); drop dead imports
2026-09-02 13:33:22 -07:00
Teknium
c90af45f57
refactor(web): unify the three post-config gateway auto-restart helpers
2026-09-02 13:32:52 -07:00
Teknium
f2c506845b
refactor(web): unify device-code poller lifecycle into _oauth_poller decorator
2026-09-02 13:32:49 -07:00
Teknium
ba4f4b8161
refactor(web): collapse try/except-HTTPException/log/raise boilerplate into _common.http_failure; trim unused fastapi imports
2026-09-02 13:32:46 -07:00
Teknium
8ac12223bb
refactor(web): late() proxies replace per-handler lazy web_server imports in extracted routers
2026-09-02 13:32:45 -07:00
Teknium
ba91166b1c
refactor(web): hoist stdlib imports in extracted routers; drop unused web_server imports
2026-09-02 13:32:28 -07:00
Teknium
ff660354f3
refactor(kanban): CLI micro-helpers, action dispatch tables, shared triage helpers; active_sessions dedupe
...
hermes_cli/kanban.py 3,565 -> 2,912; kanban_diagnostics 1,216 -> 996;
kanban_decompose 468 -> 393; kanban_transfer 478 -> 443; kanban_specify
264 -> 229; kanban_swarm 390 -> 378; active_sessions 871 -> 775. `hermes kanban
[sub] --help` byte-identical for all 55 parsers.
- kanban.py: _err / _print_json / _json_out / _fmt_counts / _bulk_apply /
_obj_dict field tuples replace repeated print/JSON/exit-code blocks; action
and board subcommand routing via dict dispatch; shared run-state and
triage-sweep argparse blocks; argparse declarations re-packed (AST-identical).
- specify/decompose: one _run_triage_sweep driver, shared _extract_json_blob /
_truncate / _profile_author / _title_body / _resolve_profile_from_cfg.
- diagnostics: rule helpers (_first_field / _latest_event_ts / _log_hint_action
/ _error_snippet), _rows_by_task fleet fetch; unreferenced DIAGNOSTIC_KINDS dropped.
- swarm: graph nodes share one create_task kwarg set.
- active_sessions: one _flock per platform, _pid_alive via _pid_liveness,
shared _read_live_entries / _without_lease / _clean_metadata, table-driven
strict registry validation.
- Docstrings/comments hand-compacted (AST-identical), invariants kept.
2026-09-02 13:32:14 -07:00
Teknium
841c975d43
refactor(kanban): unify kanban_db SQL/row/JSON/env/git boilerplate; table-drive migrations
...
hermes_cli/kanban_db.py 12,153 -> 11,157 LOC, behavior-neutral.
- _row_get / _json_or / _json_dict / _env_int / _git_out applied at every
duplicate site; Event/Comment/Attachment.from_row row mapping.
- Scalar-read helpers (_task_status, _latest_event, _scratch_workspace,
_has_spawnable, _current_run_id, _parents_satisfied) replace repeated
conn.execute(...).fetchone() blocks.
- _migrate_add_optional_columns and add_notify_sub column refreshes are
table-driven (same statements, same order).
- _dispatch_lane_task unifies the ready/review lane tails; _claim_and_open_run
and _reclaim_dangling_run shared by claim paths; block_task's three UPDATE
branches and complete_task's UPDATEs collapsed to one statement each.
- connect() PRAGMA/WAL setup shared via _open_configured; _probe_integrity
shared by the health guard and repair; _try_lock_nb/_unlock shared by the
init and dispatch file locks; _insert_comment for in-transaction audit rows.
- Dead: parent_results (zero refs).
- Long docstrings hand-compacted, every invariant kept. Schema SQL untouched.
2026-09-02 13:32:14 -07:00
Teknium
e4d8a78967
refactor(web): move /api/logs into web_routers/status.py (logs_router)
2026-09-02 13:32:08 -07:00
Teknium
de109d4097
refactor(web): extract chat-tab WebSocket routes into web_routers/chat_ws.py
2026-09-02 13:32:06 -07:00
Teknium
4bae44d654
refactor(web): extract dashboard theme/font/plugin routes into web_routers/dashboard_ui.py
2026-09-02 13:32:05 -07:00
Teknium
94309ad40a
refactor(web): extract raw-config + analytics routes into web_routers/analytics.py
2026-09-02 13:32:02 -07:00
Teknium
067028eb22
refactor(web): extract OAuth provider routes into web_routers/oauth.py
2026-09-02 13:32:01 -07:00
Teknium
cc9ef82355
refactor(gateway-cli): dispatch-table subcommands and shared service helpers in hermes_cli/gateway.py
...
hermes_cli/gateway.py (9178 -> 6906):
- `hermes gateway` subcommand routing: if/elif chain -> _GATEWAY_SUBCOMMANDS dispatch table of
_cmd_* handlers; _stop_installed_service and _refuse_from_inside_gateway unify the
stop/restart/uninstall service-stop and self-target guards.
- One systemd unit template; _systemctl_show, systemctl reset+action, is-active probes,
_installed_service_kind ladder (3 sites), launchctl-list PID probe, launchd bootstrap+kickstart
helper, legacy-unit removal loop, loop-tick witness ping, ps/wmic line parsers, planned-stop
marker helper, _CAPTURE_TEXT subprocess kwargs (21 sites), _gw_windows() accessor (15 lazy
imports).
- run_gateway startup helpers, reaper exclusion set, Windows process listing extracted; wizard
service actions and platform-setup prompts unified (_setup_service_action).
- Dead: _windows_scheduled_task_running (test-only), _container_systemd_operational (inlined),
whatsapp/email/matrix built-in status branches (those platforms are registry plugins).
- try/except-pass around single statements -> contextlib.suppress; comments/docstrings compacted
to the WHY (bounded_probe_run vs subprocess.run on Windows, pythonw launcher-stub filtering,
raw-record vs validated-probe exclusion in the orphan reaper, Scheduled-Task Ready-vs-Running).
- `hermes gateway --help` byte-identical.
2026-09-02 13:31:44 -07:00
Teknium
75bafc197a
refactor(plugins): unify provider registration and unload paths in hermes_cli/plugins.py
...
hermes_cli/plugins.py (7193 -> 4961):
- _register_scoped_provider: one body for the 8 scope-keyed register_*_provider methods;
_track_callback/_track_mapping_entry unify manager-mapping lease tracking (4 sites);
_track_scoped_registration for the ownership ledger. Public method names, signatures,
return values and warning strings unchanged.
- Manifest v2 type checks table-driven (_manifest_field_of_type); _unload_scoped split into
_unload_target_keys + _reset_after_unload_all; _gate_manifest/_record_placeholder out of
_discover_and_load_inner; _track_tool_override_policy/_attribute_registrations out of
_load_plugin_scoped; bounded hook worker lifted into _run_hook_callback_bounded;
prompt-section rendering extracted; resolve_pre_tool_block delegates to
_dispatch_pre_tool_call_hooks; _evict_modules (3 sites); _remove_name_if_unowned and
_nowait_plugin_set unify unowned-name cleanup and *_nowait probes.
- Dead (zero references outside their own test): unload_plugins, has_portable_mcp_servers,
_classify_entrypoint_kind, _reset_event_bus, get_plugin_subscriptions,
get_telegram_handler_factories, pass-through _restore_* helpers; _env_enabled is now an alias
of utils.env_var_enabled (plugins/memory still imports it).
- Docstrings/comments compacted; contract sentences and rationale kept (multi-profile ledger
keying, persistent auth-provider registration, capability declaration is not a grant).
2026-09-02 13:31:44 -07:00
Teknium
d3b768232e
refactor(web): extract status/health/curator/learning/portal routes into web_routers/status.py
2026-09-02 13:30:56 -07:00