disinto/dev
openhands cbd8c81da8 refactor: extract lib/agent-session.sh — reusable tmux + Claude agent runtime (#158)
Move generic agent infrastructure from dev/dev-agent.sh into lib/agent-session.sh:
- log, status, notify, notify_ctx, read_phase, wait_for_claude_ready,
  inject_into_session, kill_tmux_session extracted verbatim
- create_agent_session(session_name, workdir) — new: tmux session creation
- inject_formula(session_name, formula_text, context) — new: prompt injection
- monitor_phase_loop(phase_file, idle_timeout, callback_fn) — new: phase loop
  with session health check, crash recovery, and idle timeout detection

dev-agent.sh: sources the library, implements _on_phase_change() callback,
calls monitor_phase_loop(); idle-timeout and crash-recovery-failed cleanup
handled via _MONITOR_LOOP_EXIT signal variable. Behavior unchanged.
2026-03-18 14:36:36 +00:00
..
dev-agent.sh refactor: extract lib/agent-session.sh — reusable tmux + Claude agent runtime (#158) 2026-03-18 14:36:36 +00:00
dev-poll.sh fix: Escalation write-once guard is not atomic (pre-existing) (#154) 2026-03-18 11:44:30 +00:00
phase-test.sh fix: needs_human notification sent every poll cycle pre-PR (#103) 2026-03-18 07:35:13 +00:00