aboutsummaryrefslogtreecommitdiff
path: root/src/detect
AgeCommit message (Collapse)Author
2026-09-28fix(windows): read agent command lines without PROCESS_VM_READ (#4708)JJ Liebig
* fix(windows): read agent command lines without PROCESS_VM_READ Windows process command lines were read by opening each process with PROCESS_VM_READ and walking its PEB. Hardened runtimes (Electron/Node) and security products deny that access, so those processes resolved to a bare `node.exe`/`bun.exe` name with no argv, argv0, or cmdline. A runtime-wrapped agent launched from such a process was then indistinguishable from an unrelated runtime process, and the pane stayed on the shell with `agent_status: unknown`. Prefer `NtQueryInformationProcess` with `ProcessCommandLineInformation` (Windows 8.1+), which needs only `PROCESS_QUERY_LIMITED_INFORMATION`, and keep the existing PEB read as a fallback for processes that do not expose a stored command line. The fallback still requires `PROCESS_VM_READ`, so this only widens coverage. refs #4579 * fix(windows): handle growing command lines before failure test The retry added for a command line that grows between the size probe and the read was unreachable. NTSTATUS is signed, so STATUS_BUFFER_OVERFLOW, STATUS_BUFFER_TOO_SMALL, and STATUS_INFO_LENGTH_MISMATCH are all negative and were treated as failures by the earlier `status < 0` check. Check the growth statuses first and retry once with the reported size. Also read the returned UNICODE_STRING header unaligned, since a Vec<u8> buffer only guarantees byte alignment. * test(windows): keep command-line marker test process alive Passing the marker as a second argument to `ping` let `ping` exit as soon as it saw one target, so the command-line query could race the process exit. Move the marker into a `rem` after `&` so it stays in cmd.exe's own command line and `ping -n 11` keeps the process alive for the read.
2026-09-27test: fix pane shell idle foreground-command race (#4691)JJ Liebig
The interactive-shell idle test sent SIGINT as soon as it observed the shell was busy. That condition can be true before the shell finishes moving the command into its own foreground process group, so the interrupt could arrive before the command reset its signal dispositions. The command then survived in a stale foreground group while the shell showed a prompt, and the pane was never observed idle again. Run cat and end it with EOF instead. cat blocks on stdin, so the busy state is stable, and EOF avoids the interrupt/job-control race.
2026-09-27feat: let agents report their own resume command (#4687)Can Celik
* feat: let agents report their own resume command * fix: keep reported resume commands tied to accepted sessions and current owners
2026-09-24fix: avoid inferring codex idle from terminal output (#4563)JJ Liebig
refs #4507
2026-09-22fix: detect npm-installed omp on windows (#4502)JJ Liebig
refs #4313
2026-09-22fix: recognize codex mention completion popups (#4495)JJ Liebig
refs #4220
2026-09-22fix: preserve hook agent status across live handoff (#4493)Can Celik
2026-09-20fix: detect codex status with custom interrupt keys (#4196)Ivan
* fix: detect codex status with custom interrupt keys * test: remove unverified codex stale-status cases * fix(detect): match punctuation in codex interrupt hints Accept parentheses in remapped interrupt binding labels and simplify the cheap prefilter to a single any-gate shared by both manifest copies. --------- Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-20fix: detect kiro status from live controls and osc signals (#4372)Vinay Shah
* fix: detect kiro status from live controls and osc signals refs #4203 * fix: handle variable-height kiro approval panels refs #4203 --------- Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-09-18test: focus agent detection coverage on engine contracts (#4338)Can Celik
2026-09-18fix: correct grok activity detection with custom or disabled osc signals (#4337)Can Celik
refs #4333
2026-09-14fix: detect pi working border (#4113)Can Celik
refs #3629
2026-09-14fix: detect codex activity with static titles and queued inputs (#4099)Eric Yue
* fix: detect codex activity with static titles and queued inputs refs #4092 Codex 0.154.0 can omit the activity bullet when tui.animations is false and replace the literal Working label with a task-specific label. Its terminal title can also remain static during an active turn, so the OSC spinner rule is not sufficient to identify work. The screen fallback required a bullet followed by Working in the last three non-empty lines. It therefore missed both the animation-disabled status line and dynamic labels. Queued follow-ups add a heading, input text, and an edit hint below the activity line, moving that line outside the three-line region. The lower-priority non-empty OSC title rule then reported idle while Codex still showed an active timer and interrupt control. Recognize the elapsed-time and esc-to-interrupt controls in the detection snapshot before the current composer. Allow an optional bullet, a dynamic activity label, and queued follow-ups below that line. Require that no later response, completion, or interruption marker supersedes the live activity. This excludes composer text and stale output without letting an earlier interruption suppress a subsequent active turn. Keep OSC state precedence and transcript-viewer skip behavior unchanged. Update the bundled and distributed manifests together to 2026.09.14.1. Add regression coverage for optional bullets, dynamic labels, queued inputs, resumed work after interruption, and stale or quoted controls. Avoid discarding Regex search caches on every detection poll. The loader previously cloned the entire compiled rule vector, and each Regex clone created a fresh search cache pool despite sharing compiled read-only state. Share the immutable rules through Arc instead. Reload publishes a new array while in-flight readers retain a valid old generation, without holding the global cache lock during matching. Add a cheap contains gate for the required interrupt text before running the multiline expression. Add a deterministic regression for compiled-rule sharing, reload replacement, retained old readers, and concurrent detection. Measure the baseline and optimized detector kernels in three alternating rounds on CPU 24 with NUMA node 0 and CPU 25 with NUMA node 1. Real queued detection falls from about 116 to 22 microseconds, and two evaluations per pane over 15 panes fall from about 3.45 to 0.65 milliseconds on both sockets, about 81 percent less time. No benchmark match results change. The cache improvement requires the updated binary, not just a manifest reload. Validate on the official Herdr 0.9.0 release with Codex 0.154.0 by toggling the old and new manifests during the same active queued task. Confirm working for active turns and idle after completion or interruption. Pass 86 captured-screen and semantic checks through the optimized source binary, 69 manifest/cache tests, CPU-pinned render scaling, and the full native CI suite: 3535 Rust tests passed, with six default skips. Run CI serially with inherited Herdr session context removed; no tests were excluded or expectations relaxed to make CI pass. * fix: detect codex pending follow-ups as working refs #4092 * fix: handle wrapped codex follow-up hints refs #4092 --------- Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-09-13feat: add Letta Code detection and restore (#3107)Can Celik
refs #3106 Co-authored-by: Cameron <cameron@pfiffer.org>
2026-09-13fix: detect kimi npm shim on windows (#4053)JJ Liebig
refs #3317
2026-09-13fix: recognize codex composer sparkles (#4015)Can Celik
refs #3988
2026-09-11fix: detect cline launchers and idle states (#3959)Can Celik
refs #2396
2026-09-11fix: recognize claude unicode spinner during active turns (#3953)Can Celik
refs #3949
2026-09-07fix: match claude bash permission prompts at every cursor position (#3615)caner-akca
Claude marks the selected option with "❯", but bash_permission_prompt did not allow that prefix on numbered branches and did not cover the three-option "don't ask again" layout. Match both two- and three-option Bash approval prompts regardless of the selected option. refs #2650
2026-09-05fix: run the full applicable test suite on windows (#3660)JJ Liebig
* fix: run the full applicable test suite on windows * test: remove redundant test shell assignment * test: make endpoint and metadata fixtures deterministic * test: tolerate exited servers during windows probe cleanup
2026-09-05fix: detect codex startup update prompts (#3636)JJ Liebig
refs #3632
2026-09-02fix: stop treating claude background shells as working (#3468)akbash
2026-08-31fix(windows): detect pi bundled cli (#3207)akbash
* fix(windows): detect pi bundled cli refs #3205 * fix(windows): match exact pi cli paths refs #3205 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com> Co-authored-by: JJ Liebig <jonathan.liebig@gmail.com>
2026-08-30fix: detect copilot background agents as working (#3403)Lane
refs #3291
2026-08-30fix: detect claude mcp elicitation dialogs as blocked (#3383)caner-akca
refs #3283
2026-08-28fix: ignore codex weak blockers above the current prompt (#3339)Can Celik
refs #3301
2026-08-27feat(detect): add muse agent with generic Pick blocked detection (#2489)Ömer Hamid Kamışlı
* feat(detect): add muse agent with generic Pick blocked detection Add Muse agent manifests and runtime detection for idle/working/blocked states. Blocked Pick is generic on footer 'Enter to select' so any question title/message triggers, fixing missed waiting answer where previous AND-gated rule required specific hint combos. Cover process names muse, muse-bin, muse-code variants and YOLO footer. refs #herdr * fix(detect): tighten muse manifest and agent lookup - manifests: change working_esc_interrupt and blocked_approval from whole_recent to bottom_non_empty_lines(8) to use captured bottom-buffer controls instead of incidental whole-pane text - manifests: anchor idle_prompt line_regex to ^\s*⟩\s*$ so working chrome "⟩ ..." does not match idle - runtime: restrict muse lookup to explicit aliases (muse|muse-bin|muse-code|muse-cli), remove starts_with("muse") fallback that misclassified museum/muse-helper/muser; add positive/negative identification tests - keep website mirror identical; verified with agent_detection manifest check --require-website refs #2489 refs #2456 * fix(detect): address mjdouglas vendor findings for muse - manifests: widen pick_request_blocked to bottom_non_empty_lines(8) and add Enter to toggle for multi-select; add menu_request_blocked for user-opened pickers (enter confirm/esc go back/esc close/space toggle); add workspace_trust_blocked for Do you trust dialog; tighten blocked_approval to footer chrome Allow once/Always allow/Yes proceed; split idle_prompt into any gate for empty and typed draft and not-gate pick/menu anchors; change idle_status_fallback from YOLO to model \u00b7 effort \u00b7 cwd shape - runtime: replace bare muse-bin alias with muse-bin-<version> digit check to match versioned launcher binary and avoid museum/muse-binary false positives - cross-checked with vendor-side captures reported on PR #2489 against strings in shipped muse-bin binary refs #2489 * fix(detect): handle path-qualified muse-bin versioned binary lookup_agent now uses path_basename before matching so a launcher exec with absolute argv0 like /usr/local/lib/muse/muse-bin-0.1.0-R708.1 is correctly identified. is_muse_versioned_binary also checks basename so direct path-qualified names succeed without relying on the argv0_argv fallback path. Prevents missed Muse detection when screen state and sound overrides are not applied. refs #2489 * fix(detect): add enter save to muse menu detection Evidence documents /theme with enter save footer which was not matched. Add enter save to menu_request_blocked any list and to idle_prompt not-gate (highlighted row ⟩ <choice> shares glyph) and keep website mirror in sync. Update evidence comment counts from four to five. refs #2489 * docs: add Muse to supported agents table Muse detection (manifest, process identification, sound) was added earlier but docs/next agents table omitted the row. Add Muse as screen manifest / none (no integration hook, consistent with Amp/Kiro/Maki) to en/ja/zh-cn translations. * fix(detect): resize agent arrays for new upstream variant Agent::ALL and SCREEN_MANIFEST_AGENTS gained an entry from master but kept stale size annotations, breaking compilation after rebase. refs #2489 * docs: add muse detection entry to next changelog refs #2489 * docs: add muse sound override to config reference refs #2489 * fix(detect): prevent false muse blocked states refs #2489 --------- Co-authored-by: Omer Hamid Kamisli <ohkamisli@poikus.com> Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-08-25fix: refresh shared agent manifest caches (#3204)akbash
refs #2711 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-21fix: keep background Claude MCP tasks working (#3094)Can Celik
2026-08-20fix(windows): detect cursor bundled node process (#3034)akbash
* fix(windows): detect cursor bundled node process refs #3032 * docs: clarify cursor detection scope * fix(windows): constrain cursor runtime detection refs #3032 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-20fix: add claude screen activity fallbacksOgulcan Celik
refs #1630 refs #2241
2026-08-14fix: detect qwen localized active states (#2818)Can Celik
refs #2756
2026-08-14fix: detect all claude half-circle spinner frames (#2762)akbash
refs #2760 Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-08-13feat: add qwen code detection and restore (#2743)Can Celik
refs #2730
2026-08-12fix: detect claude 2.1.228 half-circle busy spinnerOgulcan Celik
2026-08-11fix: wait for agent prompt readiness (#2537)JJ Liebig
* fix: wait for agent prompt readiness refs #2410 * fix: return pane updates after tab bar command refs #2410 --------- Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-08-07feat: support all agent integrations on windows (#2496)Can Celik
2026-08-06fix(detect): ignore Cursor Run Everything status (#2220)Jesse Zhang
* fix(detect): ignore Cursor Run Everything status refs #1763 * fix(detect): constrain Cursor approval controls refs #1763 * test(detect): remove cursor manifest behavior fixture --------- Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
2026-08-06fix: add positive idle detection for kiro-cli prompt (#2301)Sam Biggins
* fix: add positive idle detection for kiro-cli prompt refs discussion #982 * fix: remove manifest integration tests per reviewer request --------- Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-08-06fix(detect): recognize versioned Python agent wrappers (#2188)Phil Larson
Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-08-04fix: detect claude confirmation promptsOgulcan Celik
refs #2268
2026-08-01fix(detect): recognize opencode2 as opencodeOgulcan Celik
refs #2169
2026-08-01feat: add antigravity-cli integration (#2087)Ludovico Magnocavallo
* feat: add antigravity_cli integration harness Register the `antigravity_cli` target, resolve its configuration directory to `~/.gemini/antigravity-cli/`, wire target actions, and add lifecycle hook scripts for Unix and Windows. * feat: support session resume for antigravity-cli * fix: correct antigravity-cli hook config path, shape, and agent label Antigravity CLI reads global customizations from ~/.gemini/config, keys hooks.json by hook name, and only accepts the matcher/hooks wrapper for the tool events. The previous install wrote event arrays at the top level of ~/.gemini/antigravity-cli/hooks.json, which agy never reads and would reject anyway, so no Herdr hook ever ran. Session reports were dropped for a third reason: the hooks reported the agent as antigravity-cli, but the server normalizes that to the canonical label agy before matching, so is_official_agent_source never matched and agy --conversation resume was unreachable. - Resolve the config dir to ~/.gemini/config - Nest Herdr entries under a Herdr-owned "herdr" block that install rewrites and uninstall removes, leaving other named hooks untouched - Emit grouped entries for PreToolUse/PostToolUse and flat handler lists for PreInvocation/PostInvocation/Stop - Report the canonical agy label from both hook assets and match it in agent_resume - Compile-gate the hook asset constants and stop shadowing $args in the PowerShell hook - Document the real directory, that it must already exist, and the named-block behavior refs #1011 refs #1571 * fix: make antigravity-cli integration session-only antigravity cli cannot express lifecycle safely: there is no blocked event, postinvocation is skipped on interruption, and stop fires at the end of a turn rather than on process exit, which left stale state and released authority at the wrong time. report only the conversation on preinvocation and let screen detection own agent state. resume via `agy --conversation <id>` is unchanged. * fix: update antigravity session after conversation switch --------- Co-authored-by: Can Celik <ogulcancelik@gmail.com>
2026-07-25fix: harden hermes lifecycle detectionOgulcan Celik
2026-07-19feat: make agent automation a first-class cli primitiveOgulcan Celik
2026-07-18fix: detect codex working with static titles (#1574)akbash
* fix: detect codex working with static titles refs #1563 * fix: ignore interrupted codex footer refs #1563 --------- Co-authored-by: akbash-bot <300245827+akbash-bot@users.noreply.github.com>
2026-07-17feat: harden named agent cli workflowsOgulcan Celik
refs #1525
2026-07-17fix: detect grok background work from pinned statusOgulcan Celik
2026-07-17fix: detect grok state from terminal signalsOgulcan Celik
2026-07-16fix(windows): suppress noninteractive process windowsOgulcan Celik
refs #1468