Commit Graph

28271 Commits

Author SHA1 Message Date
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
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 c4250a6660 refactor(gateway): split GatewayRunner.start/stop into phase helpers (878/622 -> 75/90 LOC) 2026-09-02 15:33:05 -07:00
Teknium e3bda94407 refactor(gateway): split _handle_active_session_busy_message and _prepare_inbound_message_text into helpers 2026-09-02 15:32:53 -07:00
Teknium 09adb5e2bd refactor(gateway/slash): unify cached-agent lookup, session-db reply, approval delivery, checkpoint mgr, approval setters; table-drive /busy /voice /rollback /fast 2026-09-02 15:32:49 -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 4b1e70a18f refactor(state): registry — _finish_opening helper, compact docs 2026-09-02 15:32:03 -07:00
Teknium 21c7037975 refactor(terminal): extract sudo/shell-rewrite cluster to terminal_tool_sudo and backend builders/checkers to terminal_tool_backends 2026-09-02 15:31:31 -07:00
Teknium 49853ba5ff refactor(turn): collapse preflight estimator branch, build_api_messages pops, docstrings; add turn_context_compaction tests 2026-09-02 15:31:28 -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 3180fba915 refactor(state): telegram topics mixin — shared read helpers, hoisted DDL/SELECT constants 2026-09-02 15:30:28 -07:00
Teknium 62e8c8ffbc refactor(state): lift SessionDB.__init__ nested closures into methods 2026-09-02 15:29:40 -07:00
Teknium 9c99769ad8 refactor(turn): split recover_from_overflow into per-error handlers on a _Recovery state (501-LOC function -> max 76) 2026-09-02 15:29:36 -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 d42282ae9e refactor(turn): extract outer-loop exception handler into agent/turn_loop_errors.py 2026-09-02 15:29:00 -07:00
Teknium fcfa4f770b refactor(turn): split build_turn_context into helpers; extract turn-start compaction to turn_context_compaction.py 2026-09-02 15:28:48 -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 072475560e refactor(gateway): split start_gateway and GatewayRunner.__init__ into phase helpers
start_gateway 686 -> 192 LOC via seven module-level _start_gateway_* helpers
(replace-existing-instance, configure-logging, shutdown-signal-handler factory,
PID-file claim, control socket, cron+housekeeping start, shutdown tail).
GatewayRunner.__init__ 324 -> 31 LOC via seven _init_* methods. Zero behavior
change: same side-effect order, log messages, exception handling, awaits.
2026-09-02 15:26:51 -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 feafcc9f8d refactor(turn): lift run_conversation lease/liveness closures into agent.turn_facade_lease 2026-09-02 15:23:44 -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