Commit Graph

144 Commits

Author SHA1 Message Date
Teknium 53db597201 simplify(compat): hermes_state — drop 81 re-exports + 3 registry aliases + 3 shims, repoint 45 callers + 60 test files
hermes_state.py: delete every '# noqa: F401 (re-exported...)' import block (hermes_state_common/errors/guard/
readpool/sessions/fts/dbfile/wal/repair/registry + agent.context_compressor _DB_PERSISTED_MARKER_KEY); keep
only the names hermes_state.py itself uses, without noqa.
hermes_state_registry.py: drop get_shared_session_db/release_shared_session_db/close_shared_session_dbs
aliases; every caller (gateway/, tools/, tui_gateway/, cron/, mcp_serve, run_agent, tests) now imports
acquire/release/close_all/release_or_close from hermes_state_registry.
hermes_state_titles.py: drop set_auto_title_if_empty shim (title_generator keeps its getattr fallback).
Re-remove shim-only names restored by 34abf954bd: latest_user_message_row_id (tests call
latest_message_row_id(key, role='user'); role-targeting assertions kept) and get_session_activity (tests
build the snapshot via agent.session_activity.build_activity_snapshot over db.get_session(sid)).
hermes_state_wal._log_once resolves its dedupe sets as module globals instead of via hermes_state;
hermes_state_repair helpers call module globals directly (tests patch hermes_state_repair.<name>).
Frozen updater surface untouched (update_cmd_maint imports only SessionDB from hermes_state).
2026-09-03 13:46:50 -07:00
Teknium a9b0dd6742 simplify(compat): cron scheduler — drop 82 re-exports, repoint 8 callers + 33 test files
cron/scheduler.py no longer re-exports the split modules (scheduler_delivery /
_script / _prompt / _preflight); it imports only the 19 names it calls itself
(bottom-of-file, E402 kept for the import cycle). Dropped the shim-only
`import shutil` and the F401 note on windows_hide_flags (still used by
scheduler.py). Split modules now call same-module helpers directly, reach
sibling split modules via late-bound module refs (_delivery/_script/_preflight)
next to _sched, and import windows_hide_flags themselves; origin-resident names
(load_config, Path, _SCRIPT_TIMEOUT, heartbeat_run_claim, ...) still go through
_sched. Callers/tests import + patch the defining module.
2026-09-03 13:38:36 -07:00
Teknium 2dcd97d648 simplify(compat): tools/skills_hub — drop 51 re-exports/aliases, repoint 25 callers + 11 test files 2026-09-03 13:22:48 -07:00
Teknium fc9ed6973e simplify(compat): tts_tool — drop 57 re-exports/aliases, repoint 10 callers + 23 test files 2026-09-03 13:20:22 -07:00
Teknium d179f28307 simplify(compat): anthropic_adapter — drop 30 re-exports + 1 alias, repoint 22 caller files (32 sites), 38 test files (~125 sites) 2026-09-03 13:16:47 -07:00
Teknium e83816a4d1 review-fix(comments): restore lost #NNNN rationale comments across non-test source (mechanical sweep, condensed, code unchanged)
For each issue anchor present in BASE 63279301bc non-test .py and absent on HEAD, the BASE comment/docstring block was re-attached at the HEAD location of the code it explained (matched by the distinctive code line / enclosing def). Sentences already covered by an existing HEAD comment were deduped; the issue number always survives. Insert-only: no code lines changed.
2026-09-03 09:44:26 -07:00
Teknium ecc23d5c32 Merge branch 'simp/r3-25-K' into simp/integration3 2026-09-03 00:09:17 -07:00
Teknium 58b4cefa3d Merge branch 'simp/r3-25-I' into simp/integration3 2026-09-03 00:09:13 -07:00
Teknium 0b19fab861 refactor(hermes_cli/web_routers): local_models — _quiet(warn=/debug=) absorbs 6 try/except-log sites 2026-09-03 00:05:28 -07:00
Teknium d55239274f refactor(hermes_cli/web_routers): local_models — models grouped up top, _entry_or_404, compact docstrings/comments (WHY kept) 2026-09-03 00:03:45 -07:00
Teknium 6622c31262 refactor(hermes_cli/web_routers): fold refusal bookkeeping, exit-code resolution and non-applyable messages in actions 2026-09-03 00:03:39 -07:00
Teknium ee7e86c1e3 refactor(hermes_cli/web_routers): unify secret persistence, JSON reads and error mapping in memory_providers 2026-09-02 23:59:01 -07:00
Teknium 96897dc070 refactor(hermes_cli/web_routers): local_models — fold download-job/target/runtime-target helpers, nvidia-smi + restart phase helpers 2026-09-02 23:55:00 -07:00
Teknium d2d2668dcb refactor(hermes_cli/web_routers): split codex login worker into phases, unify device-code session bootstrap + httpx off-loop calls in oauth 2026-09-02 23:48:32 -07:00
Teknium faf4be7abe Merge branch 'simp/r3-25-F' into simp/r3-25 2026-09-02 22:57:35 -07:00
Teknium b386243b69 Merge branch 'simp/r3-25-D' into simp/r3-25 2026-09-02 22:41:46 -07:00
Teknium c480684b22 Merge branch 'simp/r3-25-C' into simp/r3-25 2026-09-02 22:41:45 -07:00
Teknium b57b6aa9a4 Merge branch 'simp/r3-26-D' into simp/integration3 2026-09-02 22:40:51 -07:00
Teknium 09ff8a7364 Merge branch 'simp/r3-26-C' into simp/integration3 2026-09-02 22:40:50 -07:00
Teknium 2e2b092412 Merge branch 'simp/r3-25-F' into simp/integration3 2026-09-02 22:40:48 -07:00
Teknium 0321b49cea Merge branch 'simp/r3-25-D' into simp/integration3 2026-09-02 22:40:47 -07:00
Teknium 7d41871beb refactor(hermes_cli/web_routers): config_env auth-type env-var table replaces aws/vertex branches (json-parity verified) 2026-09-02 22:39:20 -07:00
Teknium a29a970054 refactor(web-profiles/status): drop dead sidebar cache_clear hook, compact literals and ladders 2026-09-02 22:28:11 -07:00
Teknium a8be68f985 refactor(hermes_cli/web_routers): memory_providers external-dependency runner — one _run helper (405-case fuzz parity) 2026-09-02 22:26:11 -07:00
Teknium 5ad58e8254 refactor(hermes_cli/web_routers): local_models — keep explicit pump read loop 2026-09-02 22:22:41 -07:00
Teknium e2ba8a4e53 refactor(hermes_cli/web_routers): oauth status cards via one _status_card builder + table (json-parity verified) 2026-09-02 22:21:56 -07:00
Teknium 92e52684d1 refactor(web): tools _bad_request helper, skills hub helpers, sessions flag table, docstring compaction
- tools: _bad_request() for 16 status_code=400 raises; payload built in worker;
  drop _terminal_backend_names/_model_catalog_section one-shot helpers
- sessions: _RENAME_FLAG_SETTERS table (4 flags incl. unread), keyset export
  loop tightened, compression_root/lineage_tip compacted
- web_server_chat: single try/except for both PTY bridge imports,
  contextlib.suppress for swallow-all blocks
- docstrings/comments compacted by hand (every WHY kept); AST-neutral packing
2026-09-02 22:21:05 -07:00
Teknium 7d60d28f41 refactor(hermes_cli/web_routers): drop post-docstring blank lines 2026-09-02 22:20:21 -07:00
Teknium b68c49d0ce refactor(hermes_cli/web_routers): models/dashboard_ui docstring + comment compaction (311/309 LOC) 2026-09-02 22:14:43 -07:00
Teknium 709baa1051 refactor(hermes_cli/web_routers): messaging single-path whatsapp start, telegram id dedupe; local_models _quiet/_staged_row helpers 2026-09-02 22:08:17 -07:00
Teknium 83e0ee9229 refactor(hermes_cli/web_routers): shared device-code /start response + custom-endpoint row builder 2026-09-02 22:05:12 -07:00
Teknium 317bfb5290 Merge branch 'simp/r3-26-D' into simp/integration3 2026-09-02 21:58:31 -07:00
Teknium f8b035a112 Merge branch 'simp/r3-26-C' into simp/integration3 2026-09-02 21:58:30 -07:00
Teknium d41fe16727 Merge branch 'simp/r3-25-F' into simp/integration3 2026-09-02 21:58:26 -07:00
Teknium 1175af7035 Merge branch 'simp/r3-25-E' into simp/integration3 2026-09-02 21:58:24 -07:00
Teknium 055eb648c5 Merge branch 'simp/r3-25-D' into simp/integration3 2026-09-02 21:58:22 -07:00
Teknium ec346c7521 refactor(hermes_cli/web_routers): AST-neutral packing of literal dict/list spans 2026-09-02 21:56:23 -07:00
Teknium 0cab29d3f4 refactor(hermes_cli/web_routers): AST-neutral statement packing (actions/audio/memory_providers/config_env) 2026-09-02 21:54:20 -07:00
Teknium cb0bcb96ad refactor(hermes_cli/web_routers): reflow docstrings/comments, capability field table, compact literals (local_models 1043, models 334, dashboard_ui 314) 2026-09-02 21:52:56 -07:00
Teknium ba1df7dab1 refactor(web-profiles/status): fold db-open into read helper, data-drive sidebar slices, compact docstrings 2026-09-02 21:49:33 -07:00
Teknium 95589a420f refactor(hermes_cli/web_routers): reuse _common.scoped_to_thread for profile-scoped off-loop handlers 2026-09-02 21:48:42 -07:00
Teknium e808742450 refactor(hermes_cli/web_routers/analytics): _rows query helper, _AUX_SUMMED_KEYS table, comprehension for model cards 2026-09-02 21:43:57 -07:00
Teknium 9912d34a3f refactor(hermes_cli/web_routers): AST-neutral bracket packing (oauth/memory_providers/config_env/actions/audio) 2026-09-02 21:43:19 -07:00
Teknium 44b47c6547 refactor(hermes_cli/web_routers): messaging — http_failure for PUT platforms, compact signatures (918 LOC) 2026-09-02 21:35:15 -07:00
Teknium a1fe74c903 refactor(hermes_cli/web_routers): audio — shared config-scoped executor hop, quiet unlink, MIME table 2026-09-02 21:30:49 -07:00
Teknium ad50496b75 refactor(hermes_cli/web): compact git router (module-level imports, _probe_gh_auth), urllib_security, verify_cmd (_readiness_status), vercel_auth (_present inlined), seam docstrings 2026-09-02 21:28:23 -07:00
Teknium ebcbab4eb9 refactor(hermes_cli/web_routers): messaging fallback table as tuple rows; local_models dict.update/compact literals (966/1073 LOC) 2026-09-02 21:28:14 -07:00
Teknium 81e14724fa refactor(hermes_cli/web_routers): fold repeated 403/500 I/O error mapping into files._io_errors; compact call sites 2026-09-02 21:23:35 -07:00
Teknium ff5f1cbecd refactor(hermes_cli/web_routers): actions — LateState registries, _finish_action/_update_refused helpers, refusal-code table 2026-09-02 21:21:59 -07:00
Teknium 550d5174ca refactor(hermes_cli/web_routers): local_models — compact call/literal formatting (1142->1102 LOC) 2026-09-02 21:17:53 -07:00