Commit Graph

28222 Commits

Author SHA1 Message Date
Teknium
ff3ebf509f refactor(state): dict-dispatch persistence-error classifier, unify WHERE/placeholder builders, compact docstrings across state modules 2026-09-02 20:18:08 -07:00
Teknium
3c9a51bbf1 refactor(state): unify writer-conn setup, drop dead attrs/branches, compact hermes_state comments 2026-09-02 19:53:29 -07:00
Teknium
d254525a39 refactor(state): extract session lifecycle/listing to hermes_state_sessions and FTS setup to hermes_state_fts 2026-09-02 19:20:36 -07:00
Teknium
182dc4b313 refactor(state): extract read-connection budgeting to hermes_state_readpool 2026-09-02 18:50:30 -07:00
Teknium
e527b0699d refactor(state): extract error types/classifiers to hermes_state_errors and the live-DB guard to hermes_state_guard 2026-09-02 18:44:39 -07:00
Teknium
30b4685036 refactor(state): drop 52 unused back-compat re-exports from hermes_state 2026-09-02 18:28:11 -07:00
Teknium
113f04616b Merge branch 'simp/r2-state' into simp/integration2
# Conflicts:
#	hermes_state_messages.py
2026-09-02 17:49:43 -07:00
Teknium
f07ff1026f Merge branch 'simp/r2-update-doctor' into simp/integration2 2026-09-02 17:49:26 -07:00
Teknium
9c65ca8a02 Merge branch 'simp/r2-models-runtime' into simp/integration2 2026-09-02 17:49:26 -07:00
Teknium
56202613ef Merge branch 'simp/r2-loop' into simp/integration2 2026-09-02 17:49:25 -07:00
Teknium
56c5798203 Merge branch 'simp/r2-kanban' into simp/integration2 2026-09-02 17:49:25 -07:00
Teknium
06fb390212 fix(integration): restore stdin=DEVNULL on computer_use subprocess calls dropped in simplification 2026-09-02 17:48:26 -07:00
Teknium
135973b5b6 Merge branch 'simp/r2-state-b' into simp/r2-state
# Conflicts:
#	hermes_state_messages.py
2026-09-02 17:35:13 -07:00
Teknium
1113b65f3e Merge branch 'simp/r2-state-c' into simp/r2-state 2026-09-02 17:34:33 -07:00
Teknium
37e0e1a76d refactor(kanban-cli): split the subcommand spec list so no function exceeds 300 LOC 2026-09-02 17:30:13 -07:00
Teknium
f9f87d9876 refactor(kanban-cli): compact docstrings/comments in kanban.py keeping every rationale 2026-09-02 17:30:13 -07:00
Teknium
37b160d04e refactor(kanban-cli): extract dispatcher/maintenance verbs to kanban_ops; unify single-mutation ok/err reporting 2026-09-02 17:30:13 -07:00
Teknium
c7f3578521 refactor(kanban-cli): extract boards cluster to kanban_boards; unify goal-gate, id/reason, run-state and config helpers across handlers 2026-09-02 17:30:12 -07:00
Teknium
62a1607fbf refactor(kanban-cli): extract data-driven argparse tree to kanban_parser and output helpers to kanban_output 2026-09-02 17:30:12 -07:00
Teknium
7dc43c94d1 refactor(turn): sub-split handle_api_error / check_api_response / run_tool_round so no new turn_* function exceeds 300 LOC 2026-09-02 17:28:22 -07:00
Teknium
d52d8f988f Merge branch 'simp/r2-state-b' into simp/integration2 2026-09-02 17:27:36 -07:00
Teknium
857cf925b3 Merge branch 'simp/r2-tools-a' into simp/integration2 2026-09-02 17:27:36 -07:00
Teknium
b1b171c0fe Merge branch 'simp/r2-gw-rest' into simp/integration2 2026-09-02 17:27:35 -07:00
Teknium
464ee35248 refactor(kanban-db): compact docstrings/comments in the four split modules (AST-identical, every WHY kept) 2026-09-02 17:27:14 -07:00
Teknium
8dca2031d3 Merge branch 'simp/r2-cli-rest-setup' into simp/integration2
# Conflicts:
#	hermes_cli/setup.py
2026-09-02 17:27:09 -07:00
Teknium
e93960b47c Merge branch 'simp/r2-gw-rest-rooms' into simp/r2-gw-rest 2026-09-02 17:26:37 -07:00
Teknium
7d0f4ce3aa Merge branch 'simp/r2-state-b' into simp/integration2
# Conflicts:
#	hermes_state_messages.py
2026-09-02 17:26:25 -07:00
Teknium
d858b95945 Merge branch 'simp/r2a-mcp' into simp/r2-tools-a 2026-09-02 17:25:08 -07:00
Teknium
831f2e542c refactor(state): fold small get_messages/reaction/publish shapes; hug trailing closers (AST-identical) 2026-09-02 17:20:16 -07:00
Teknium
696662997b Revert "refactor(gateway/hosted_rooms): reflow multi-line SQL constants (whitespace-only, parity-verified)"
This reverts commit fa827f596e.
2026-09-02 17:18:13 -07:00
Teknium
921362cbfa Merge branches 'simp/r2-rooms-v1', 'simp/r2-rooms-v2' and 'simp/r2-rooms-v3' into simp/r2-gw-rest-rooms 2026-09-02 17:17:31 -07:00
Teknium
ae04a3d62d Merge simp/r2-update-cmd-sub: update_cmd.py deep split + god-method lifts 2026-09-02 17:17:27 -07:00
Teknium
1c281abfd5 refactor(kanban-db): lift decompose children validation into _validate_children_graph 2026-09-02 17:17:21 -07:00
Teknium
1991695511 refactor(state): _cooldown_row shape helper; per-model usage kwargs via field set; small folds 2026-09-02 17:17:16 -07:00
Teknium
52a3543d3b refactor(kanban-db): compact hook/constant/TTL docstrings and comments in origin (AST-identical) 2026-09-02 17:16:23 -07:00
Teknium
75512a8a36 Merge simp/r2m-flows into simp/r2-models-runtime 2026-09-02 17:15:41 -07:00
Teknium
513e7fa910 Merge simp/r2m-switch into simp/r2-models-runtime 2026-09-02 17:15:41 -07:00
Teknium
6a26640907 refactor(kanban-db): compact path/board/run accessor docstrings in origin (AST-identical) 2026-09-02 17:15:02 -07:00
Teknium
6cfed45fde Merge branch 'simp/r2a-mcp-oauth' into simp/r2a-mcp 2026-09-02 17:14:56 -07:00
Teknium
3bfb199bde Merge branch 'simp/r2a-mcp-transport' into simp/r2a-mcp 2026-09-02 17:14:55 -07:00
Teknium
598065384d refactor(gateway/hosted_rooms): driver generation-transition spec table + run-fence transition helper; replicas ingest_page row-state/store extraction 2026-09-02 17:14:41 -07:00
Teknium
6a7e7aaa03 refactor(gateway/hosted_rooms): structural dedupe — _reload, _read_one, _non_negative, _remote_run_schema_current; split _append_authority_claim/_disband_replay; table-driven _migrate_legacy_columns; fold _event_storage_bytes/_assert_event_capacity into _prepare_event 2026-09-02 17:14:28 -07:00
Teknium
86a548935e refactor(gateway/hosted_rooms): extract checkpoint _settled_message, table-drive discussion event/actor checks, partial-ize peer _exact_fields (structural only, parity-neutral) 2026-09-02 17:12:48 -07:00
Teknium
d77f3ad79b refactor(state): single INSERT shape in _clone_message_rows; fold small closures/conditions 2026-09-02 17:12:13 -07:00
Teknium
493c3841ed refactor(mcp): handlers — fold utility on_failure into an inline lambda, single guard in reconnectable lookup (602 -> 598) 2026-09-02 17:07:42 -07:00
Teknium
013c528ef8 refactor(tool_executor): inline memory_manager_executor into resolve_invoke_tool_executor
Single-caller factory replaced by the equivalent closure; comment compaction only
otherwise.
2026-09-02 17:07:36 -07:00
Teknium
c6136d946f refactor(tool_executor): split execute_tool_calls_concurrent into _ConcurrentBatch + shared result helpers
Behavior-neutral extraction of the 686-LOC concurrent executor and the 429-LOC
sequential executor into focused helpers:

- _ConcurrentBatch (run_worker / submit_all / await_completion / run) and
  _StartOrderGate replace the nested closures + nonlocal counters; _ToolOutcome
  replaces the 7-tuple result slots; _ParsedCall/_parse_tool_call replaces the
  6-tuple parsed-call rows in both executors (-> 2 sites).
- _append_skipped_tool_results unifies the four cancelled/skipped-result loops
  (concurrent pre-flight, sequential pre-tool interrupt, sequential
  KeyboardInterrupt, sequential post-tool interrupt) -> 4 sites; absorbs
  _append_cancelled_tool_results.
- _observe_tool_result / _commit_tool_result / _finalize_tool_batch /
  _print_tool_completed / _tool_progress_enabled unify the post-execution
  guardrail-observe -> append+flush -> tool.completed -> budget -> /steer tail
  shared by the concurrent, sequential and segmented paths (-> 2-3 sites each).
- _unfinished_tool_result, _blocked_tool_result, _abandoned_sequential_result
  collapse the duplicated synthesize-result + terminal post_tool_call blocks.
- _registered_tool_worker / _interrupt_worker_tids unify worker tid tracking and
  interrupt fan-out between the two middleware runners (-> 2 / 3 sites).
- _run_with_activity_heartbeat extracts the heartbeat thread wrapper.
- _resolve_sequential_dispatch + _SequentialDispatch turn the 5-branch
  inline/delegate/context-engine/memory/registry if/elif into a resolver with
  per-branch spinner/error/KeyboardInterrupt policy, preserving branch order.
- _cancelled_tool_result and _managed_values inlined (single caller each).

Public signatures (execute_tool_calls_concurrent/sequential/segmented, both
middleware runners, every symbol imported by run_agent.py/agent/tests) are
unchanged; middleware/hook/persistence/progress-callback order is identical.
2026-09-02 17:07:35 -07:00
Teknium
0c27101562 refactor(turn): split finalize_turn into phase helpers (576 -> 264 LOC) 2026-09-02 17:07:35 -07:00
Teknium
a0b0ae9ce3 refactor(turn): split recover_from_overflow into per-error handlers on a _Recovery state (501-LOC function -> max 76) 2026-09-02 17:07:35 -07:00
Teknium
caa29fb43a Merge branch 'simp/r2-tools-a' into simp/integration2
# Conflicts:
#	tests/test_managed_runtime_resolution.py
2026-09-02 17:07:24 -07:00