Files
hermes-agent/tools
Teknium 2e4d771c69 Inspired by Factory Droid: accept unique ID prefixes in process tool lookups
Factory Droid v0.175.0 made TaskOutput/TaskStop accept task-ID prefixes so
background tasks can be referenced without pasting the full ID. Hermes'
process tool had the same friction: every action required the exact
proc_<12-hex> session ID.

ProcessRegistry.get() now falls back to unique-prefix resolution when the
exact lookup misses: 'proc_4dae' or bare '4dae' resolves to
proc_4dae56ca81f6 when exactly one running/finished session matches.
Ambiguous or too-short (<4 suffix chars) prefixes still return None, so
callers keep their existing 'No process with ID ...' error and nothing is
ever picked arbitrarily. Exact IDs never pay the scan, and a full ID that
happens to prefix another always wins.

All process actions (poll/log/wait/kill/write/submit/close) route through
get(), so they all gain prefix support from the single change.
2026-08-16 22:09:37 -07:00
..