Commit Graph
5 Commits
Author SHA1 Message Date
Emil dd8d29bc8a feat: live subagent dashboard widget in the TUI
Adds a widget above the editor (ctx.ui.setWidget) showing the research run
id, loop status, iteration, active agents with elapsed time, and recently
finished agents. Refreshed every 1.5s while work is running, hidden when
idle; timer is cleaned up on shutdown so reloads do not leak intervals.
2026-07-31 23:12:38 +03:00
Emil b53687c2b9 fix: keep pause/resume in sync between loop and tree; close read_artifact symlink escape
- research_control pause/resume now validate the loop state before touching
  the tree, so pausing a stopped loop can no longer leave the tree 'paused'
  while the loop is not (spawn would fail until a restart).
- read_artifact confinement resolves symlinks (realpath) before checking the
  project boundary, preventing symlink-based file leaks.
- Adds confinement tests (42 tests passing, tsc clean).
2026-07-31 23:09:20 +03:00
Emil 4039f7c8f3 fix: pin DNS resolution against SSRF rebinding; enforce reviewer independence; bound caches and logs
- web.ts: outbound downloads resolve DNS once, validate the address, and
  connect to the validated IP directly, closing the DNS-rebinding TOCTOU
  window; malformed SearXNG result URLs are skipped instead of failing the
  whole search; web cache is bounded (evicts oldest past 500 entries).
- experiment.ts: reviewer must not be a descendant of the experiment author
  (tool-level lineage check on top of the author-id check); stdout/stderr
  buffers capped at 512 KB.
- Confirmed Pi's extension tool registry is per-extension-instance, so
  reload re-registration is safe; no change needed there.
- Adds a lineage-independence test (39 tests passing, tsc clean).
2026-07-31 23:03:49 +03:00
Emil 18b8a3247d fix: allow research runs to restart after stop; improve FTS search, agent limits, and timeouts
- AgentTree.restart() revives a stopped run in the same session: resets the
  root, archives old branches, and restores spawnability (stop no longer
  cancels the root).
- ResearchLoop.start() restarts from stopped/completed and resets iteration
  counters; setGoal is allowed in terminal states; supervisor 'start' revives
  the tree when the root is not spawnable.
- Cancelled/failed/archived children no longer count toward the per-agent
  child limit and archived agents are ignored by the duplicate-task guard.
- cancel() no longer overwrites an already recorded agent result.
- Add agent_timeout_seconds (default 1800) so hung agent sessions fail
  instead of blocking wait() forever.
- FTS search now prefix-matches tokens (tolerates inflections) and safely
  handles punctuation/FTS5 metacharacters instead of returning false
  negatives or throwing.
- Add tests for restart semantics, child limits, result preservation,
  agent timeouts, and FTS morphology/special characters (38/38 passing).
2026-07-31 22:57:54 +03:00
Emil 528983ee50 feat: initialize Hypothesis Machine Pi extension 2026-07-31 22:36:16 +03:00