Teknium
c40645ea2f
test(gateway): repoint two source-inspection/logger-patch tests to run_turn_runner / run_voice
2026-09-02 16:24:25 -07:00
Teknium
66366d3dab
refactor(gateway): split GatewayRunner into 13 run_* mixins + TurnRunner module (run.py 31332 -> 6957)
...
AST-driven, body-identical move of 359 GatewayRunner methods into cohesive
mixin modules (gateway/run_{voice,adapters,topics,turn,shutdown,busy,
config_loaders,startup,watchers,notifications,inbound,goals,agent_cache}.py)
plus TurnRunner -> gateway/run_turn_runner.py. run.py-internal symbols are
imported lazily inside method bodies so patch('gateway.run.X') keeps
intercepting; neutral deps are top-level; logger name stays 'gateway.run'.
_UNSET moved to leaf gateway/run_common.py (def-time default-arg sentinel).
Whole-module inspect.getsource(gateway_run) AST-walker tests repointed to
the module that now holds the walked code.
2026-09-02 16:11:50 -07:00
Teknium
b3759fa8d6
Merge branch 'simp/r2-gwrun-hmwa' into simp/r2-gwrun
2026-09-02 15:57:24 -07:00
Teknium
94af71400d
Merge branch 'simp/r2-gwrun-rai' into simp/r2-gwrun
2026-09-02 15:57:23 -07:00
Teknium
6e4e1674e4
Merge branch 'simp/r2-gwrun-runsync' into simp/r2-gwrun
2026-09-02 15:57:22 -07:00
Teknium
0b3f9ae7b3
Merge branch 'simp/r2-gwrun-hm' into simp/r2-gwrun
2026-09-02 15:57:20 -07:00
Teknium
95801ab139
Merge branch 'simp/r2-gwrun-busyprep' into simp/r2-gwrun
2026-09-02 15:57:19 -07:00
Teknium
4e8daa54f9
Merge branch 'simp/r2-gwrun-startgw' into simp/r2-gwrun
2026-09-02 15:57:18 -07:00
Teknium
98a528a65a
refactor(gateway): split _handle_message_with_agent into _hmwa_* helpers (2365 -> 242 LOC, max helper 249)
2026-09-02 15:50:25 -07:00
Teknium
f92267f6f6
refactor(gateway): split TurnRunner.send_progress_messages into state carrier + 8 helpers (333 -> 168 LOC)
2026-09-02 15:49:24 -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
a0556c7ef1
refactor(gateway): split TurnRunner.run_sync into 11 helper methods (1229 -> 211 LOC)
2026-09-02 15:42:16 -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
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
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
88b74d6ef0
Merge branch 'simp/hclib' into simp/integration
2026-09-02 15:05:48 -07:00
Teknium
7df99a7787
test(hclib): update tests for moved/removed symbols
2026-09-02 15:03:42 -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
18700c60d5
Merge branch 'simp/tools' into simp/integration
2026-09-02 15:01:45 -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
2d5e9a0ef1
refactor(tools/delegate): repoint batch-tag test to delegate_tool_progress where _BATCH_ORDINALS is bound
2026-09-02 14:47:47 -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
aed2e156ad
refactor(tools/files): finish file_operations wiring to extracted modules; restore WHY comments in file_tools; repoint test
2026-09-02 14:47:03 -07:00
Teknium
731a943ac4
refactor(tools/planning): compact kanban metadata merging and clarify tool/gateway helpers
2026-09-02 14:47:02 -07:00
Teknium
ae67178be1
refactor(tools/infra): split cronjob god-methods into per-action helpers; extract tool_search catalog/validation; compact registry, lazy_deps, tool_backend_helpers, desktop_ui
2026-09-02 14:47:02 -07:00
Teknium
6723628de9
refactor(tools/messaging): split send_message into senders/targets tables; dedupe discord/bot_mode/relay helpers; extract feishu_lark shared plumbing; compact graph client/auth
2026-09-02 14:45:42 -07:00
Teknium
20258aad9e
refactor(tools/mcp_oauth): extract mcp_oauth_provider; compact oauth manager/dashboard bridge and schema_sanitizer; repoint tests
2026-09-02 14:45:42 -07:00
Teknium
8b3dde5dcc
refactor(tools/web): split web_tools into truncate/extract siblings; dispatch tables for backend probes and stdlib extractors; compact url_safety/website_policy/result cache
2026-09-02 14:45:42 -07:00
Teknium
b6a3d3f440
refactor(tools): restore stdin=DEVNULL on subprocess probes dropped during compaction
...
voice_mode WSL playback probe, subagent_worktree._run_git, cua_backend
loginctl/xprop probes lost their explicit stdin= (and one line-wrapped past
the encoding= same-line rule); lazy_deps._run carries it via _SUBPROCESS_KW
so mark it for the guard. Fixes tests/tools/test_subprocess_stdin_guard.py
and tests/scripts/test_footgun_subprocess_encoding.py (green on base).
2026-09-02 14:45:42 -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
8813eba345
refactor(tools): repoint tests to moved symbols; add voice_mode_transcript module
2026-09-02 14:45:15 -07:00
Teknium
9fe009f467
refactor(tools/media): extract vision_tools_image_prep; dedupe image/video generation providers; compact fal/xai helpers
2026-09-02 14:45:15 -07:00
Teknium
33ae442e94
refactor(tools/computer_use): split cua_backend into daemon/actions/... siblings; dispatch tables; compact doctor/tool
2026-09-02 14:45:15 -07:00
Teknium
3bbec90f23
refactor(tools/environments): split local/base into output/wait/session-env siblings; extract docker_egress + remote_common; dedupe remote backends; compact process_registry
2026-09-02 14:45:15 -07:00
Teknium
d4ded67503
refactor(tools/terminal): split terminal_tool god method into helpers; dispatch tables; compact env probe/passthrough/daemon pool
2026-09-02 14:45:15 -07:00
Teknium
2ef1e8e4e0
refactor(tools/voice): extract tts delivery + wake_word engines; dedupe transcription/voice_mode helpers; compact tts providers
2026-09-02 14:45:15 -07:00
Teknium
49d15faae6
refactor(tools/skills_sync,memory): split skills_sync client wire/org and bundled/optional ops; extract memory_tool_store and session_search common/discover
2026-09-02 14:45:15 -07:00
Teknium
7c1ec19d4a
refactor(tools/skills): split skills_hub into per-source modules; extract skill_manager guards/batch, skills_tool dedup/plugin/setup; compact skill_usage, skills_guard
2026-09-02 14:45:15 -07:00
Teknium
05526b028a
refactor(tools/delegate): split delegate_tool into child_run/config/dispatch/progress/registry/results; compact delegation helpers
2026-09-02 14:45:15 -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
aa0163d361
Merge branch 'simp/agent-runtime' into simp/integration
...
Conflict in agent/error_classifier.py: both simp/agent-chat and
simp/agent-runtime simplified the same file. Kept simp/agent-chat's
rule-table version, which already subsumes agent-runtime's
billing/rate-limit/overflow verdict helpers (as _V_* verdicts + _first_match
rule tables) and its dead _THINKING_SIG_PATTERNS removal. Verified with a
60k-case differential fuzz: identical ClassifiedError output vs base and vs
agent-runtime's version.
2026-09-02 14:44:19 -07:00
Teknium
9f6335bc44
refactor(tools/browser): extract eval-policy/lightpanda-fallback/real-profile/snapshot modules from browser_tool; split supervisor dialogs/frames; dedupe camofox/cli
2026-09-02 14:44:15 -07:00
Teknium
c1f8af1e86
refactor(tools/mcp): split mcp_tool.py into transport/lifecycle/schema/handlers/... sibling modules; compact watchdog and schema cache
2026-09-02 14:44:15 -07:00
Teknium
606cb2de92
refactor(tools/code_exec): unify code_kernel local/remote helpers, split checkpoint_manager god methods, compact spill helpers
2026-09-02 14:44:15 -07:00
Teknium
5c919161d0
refactor(tools/approval): split approval.py into smart/human-wait/gateway-wait modules; dedupe guards
2026-09-02 14:44:14 -07:00
Teknium
ec49ae7c0f
refactor(tools): wire file_operations to extracted common/lint/search modules; restore literal security pins in lazy_deps
2026-09-02 14:43:45 -07:00
Teknium
14a64ea985
refactor(tools): repoint tests to moved file_tools guard/path symbols
2026-09-02 14:43:45 -07:00
Teknium
3f5564d727
refactor(tools): discovery scan sees loop-registered tools; fix lint module import
2026-09-02 14:43:45 -07:00