Commit Graph

28243 Commits

Author SHA1 Message Date
Teknium 995367a3bf refactor(gateway/slash): dispatch /goal subcommands; extract /status, /context, /usage, /agents, /reset, /resume render+resolve helpers 2026-09-02 15:46:19 -07:00
Teknium 9128bb5610 refactor(cli/setup.py): split wizard into setup_{tts,terminal,platforms,summary,migration,quick} modules; table-drive summary/agent settings; shared banner helper 2026-09-02 15:46:06 -07:00
Teknium cbecd7d0c6 refactor(mcp): lift MCPServerTask lifecycle into MCPServerRunMixin; split run() into branch helpers 2026-09-02 15:46:06 -07:00
Teknium 048b1406f7 refactor(terminal): unify env-creation kwargs (_create_configured_env) and extract sandbox lifecycle (reaper/teardown/cleanup/ensure_task_env) to terminal_tool_lifecycle 2026-09-02 15:45:59 -07:00
Teknium 04de344f41 refactor(computer_use): compact backend/permissions/vision_routing/__init__ docs; tighten doctor helpers 2026-09-02 15:45:55 -07:00
Teknium 52a5127318 refactor(cli/plugins): move registration ledger/unload into PluginLedgerMixin (plugins_ledger.py) 2026-09-02 15:45:43 -07:00
Teknium 1172735295 refactor(cli/sessions_cmd): split cmd_sessions into per-subcommand handlers + dispatch dicts; extract browse picker to sessions_cmd_browse 2026-09-02 15:45:35 -07:00
Teknium f5a04375cc refactor(web_server): extract oauth pollers/status probes and messaging catalog/onboarding to web_server_oauth, web_server_messaging 2026-09-02 15:45:27 -07:00
Teknium 01242369b1 refactor(hermes_cli/main): extract web-UI build cluster to main_web_build.py 2026-09-02 15:45:23 -07:00
Teknium c7d7e669c9 refactor(cli/plugins): unify manifest.key-or-name into manifest_key()/PluginContext.plugin_id (33 sites) 2026-09-02 15:44:28 -07:00
Teknium 3c7cd69abb refactor(tools_config): extract cua-driver installer cluster into tools_config_cua 2026-09-02 15:43:44 -07:00
Teknium 21f11b4d29 refactor(web_server): extract session-DB access helpers to web_server_sessions 2026-09-02 15:43:37 -07:00
Teknium b3ad91bef0 refactor(gateway): split GatewayRunner._run_agent_inner into 24 helper methods (1638 -> 241 LOC) 2026-09-02 15:43:35 -07:00
Teknium e3b79addc6 refactor(computer_use): tool.py — compact comments/docstrings, hoist vision prompt, tighten layout 2026-09-02 15:43:11 -07:00
Teknium 1d99e2a2d1 refactor(gateway/stream): split _send_or_edit into per-transport collaborators; unify fallback send-with-flood-retry 2026-09-02 15:42:43 -07:00
Teknium 0360b71926 refactor(computer_use): split CuaDriverBackend into capture/input mixins and a driver-resolution module 2026-09-02 15:42:36 -07:00
Teknium 17df4741df refactor(terminal): extract scope-aware TERMINAL_* config readers/cwd sanitizers to terminal_tool_config 2026-09-02 15:42:26 -07:00
Teknium eb74a00c71 refactor(cli): split HermesCLI into 10 cohesive mixins (cli.py 22,284 -> 9,150)
326 methods lifted by AST (bodies identical; ast.dump-verified) into
hermes_cli/cli_{tui,status_bar,voice,model_switch,session,stream,modal,
terminal,info,loops}_mixin.py. cli.py-internal symbols resolve via lazy
'from cli import ...' inside each method (no import cycle; patch('cli.X')
keeps working). The three 'global' writers (_skill_commands, _cli_wake_owner)
now write the cli module attribute explicitly so the origin's readers still
see them. Dropped imports left unused in cli.py; kept display_hermes_home /
build_welcome_banner as re-exports (mixins + tests resolve them via cli).
Repointed two AST change-detector tests to cli_tui_mixin.py; one test
fixture now keeps 'cli' in sys.modules across its patch.dict scope.
2026-09-02 15:42:24 -07:00
Teknium a0556c7ef1 refactor(gateway): split TurnRunner.run_sync into 11 helper methods (1229 -> 211 LOC) 2026-09-02 15:42:16 -07:00
Teknium 1f7beadae7 refactor(mcp): dedupe error classification ladders, optional-type import helper, cause-chain walker 2026-09-02 15:41:56 -07:00
Teknium f0cfbb33e1 refactor(cli/plugins): move hook/event-bus/prompt-section dispatch into PluginDispatchMixin (plugins_dispatch.py) 2026-09-02 15:41:50 -07:00
Teknium 3c26e8c8d6 refactor(turn): compact log-call formatting in turn_context_compaction 2026-09-02 15:41:41 -07:00
Teknium b0be4c5bdd refactor(gateway/hosted_rooms): add shared leaf validation/sqlite helpers (hosted_rooms_common) 2026-09-02 15:41:35 -07:00
Teknium ea6644e1dc fix(integration): telegram dm-topic persist reads config.yaml via read_user_config_raw()
Raw yaml.safe_load of config.yaml is only legal in owner modules; the
write-back round-trip uses the sanctioned raw primitive. Behavior-identical
(same file, same parse, {} on missing).
2026-09-02 15:41:16 -07:00
Teknium 6ac699a677 fix(integration): re-export _normalize_dashboard_cron_updates from hermes_cli.web_server 2026-09-02 15:41:15 -07:00
Teknium 4a9d196f0a fix(integration): let acp _execute_write stub accept the new patience_s kwarg 2026-09-02 15:41:13 -07:00
Teknium eef25a70be fix(integration): repoint telegram webhook-secret polling test at _start_webhook_mode/_start_polling_mode
The adapters branch extracted connect()'s webhook/polling branches into methods;
the guard is intact in _start_webhook_mode. The source-inspection test now checks
the two method bodies by AST instead of the old inline if/else regex.
2026-09-02 15:41:11 -07:00
Teknium 7fd156d862 fix(integration): publish methods_browser_control helpers/constants onto server via bind_module
The tui split's rebind() now re-targets closure cells holding this module's
functions onto server.py's globals, so _is_authenticated_identity ran with
server globals that lacked _INTERNAL_USER_ID/_INTERNAL_PROVIDER (NameError).
register() now uses bind_module like the other split modules.
2026-09-02 15:41:10 -07:00
Teknium 8e9628e9cf refactor(delegate): progress relay -> _ChildProgressRelay class + event table; split _dispatch_background into collaborators 2026-09-02 15:40:23 -07:00
Teknium 0dc36e0934 refactor(turn): extract tool round + final text response branches into agent/turn_tool_round.py, agent/turn_final_response.py 2026-09-02 15:40:17 -07:00
Teknium 5206a504ca refactor(update): split Windows gateway lifecycle into update_cmd_windows.py 2026-09-02 15:40:14 -07:00
Teknium 99164fca16 refactor(gateway): split GatewayRunner._handle_message into _hm_* stage helpers
1361 -> 186 LOC orchestrator; 11 contiguous helpers (ingress/auth admit, estop gate,
update-prompt / clarify / slash-confirm replies, stale-agent eviction, running-session
fast-path, command resolve+hooks, canonical dispatch, quick+plugin commands, skill
slash rewrite). Bodies are verbatim; early returns become Optional / (handled, result)
tuples the orchestrator returns as-is. Largest function in the region: 195 LOC.
2026-09-02 15:40:08 -07:00
Teknium 2efc2b0d9a refactor(cli/plugins): move plugin loading/deferred-platform/portable methods into PluginLoaderMixin (plugins_loader.py) 2026-09-02 15:39:46 -07:00
Teknium a7bbe3bf28 refactor(web_server): extract cron dashboard helpers to web_server_cron 2026-09-02 15:39:12 -07:00
Teknium 5eaa155067 refactor(mcp): unify image/audio/resource block decode+cache into two helpers 2026-09-02 15:38:58 -07:00
Teknium d6ec8c3018 refactor(mcp): unify live/cache registration into one candidate loop; phase-split sampling and elicitation handlers 2026-09-02 15:38:42 -07:00
Teknium 697f6fdc2f refactor(gateway/slash): split /compress and /model god methods into agent-build, persist, config-read and reply helpers 2026-09-02 15:38:17 -07:00
Teknium ff67ee47ff refactor(gateway/config): extract env overrides to gateway/config_env.py as a _Cred/_ENV_STEPS table 2026-09-02 15:38:08 -07:00
Teknium 8e3705c925 refactor(gateway/stream): decompose run() into _Tick + per-phase collaborators; unify frame/seed/preview-delete/draft-metadata helpers 2026-09-02 15:38:01 -07:00
Teknium 80affc7ee3 refactor(computer_use): doctor — reuse permissions._child_env, split fallback/report rendering into helpers 2026-09-02 15:37:58 -07:00
Teknium cf9f454cdc refactor(computer_use): tool.py — _reject_unsafe, _pop_session_locked, _cache_file, summary/envelope helpers, dispatch table for _summarize_action 2026-09-02 15:37:47 -07:00
Teknium 67ef2e50fe refactor(turn): extract response intake (normalize/hooks/scratchpad/codex-incomplete) into agent/turn_response_intake.py 2026-09-02 15:37:47 -07:00
Teknium 5b475406d4 refactor(doctor): run_doctor -> ordered DOCTOR_CHECKS table of Finding-returning checks 2026-09-02 15:37:32 -07:00
Teknium 282e63f81c refactor(stt): split transcription_tools into common/audio/local/cloud/command sibling modules (re-imported into origin) 2026-09-02 15:36:59 -07:00
Teknium 5608fe7cdf refactor(web_server): extract chat/PTY/WS-auth cluster to web_server_chat 2026-09-02 15:36:53 -07:00
Teknium 7cfc90bae8 refactor(terminal): split terminal_tool() into _plan_execution/_acquire_env/_run_foreground (dataclass plan) and unify the error envelope via _error_json 2026-09-02 15:36:30 -07:00
Teknium d13ed1a5b6 refactor(cli/plugins): table-drive the 8 scoped-provider registrars on PluginContext 2026-09-02 15:35:16 -07:00
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 50d63b2869 refactor(delegate): dedupe config knobs via _cfg(), split credential resolution by branch 2026-09-02 15:34:51 -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