* fix: switch prefix ASCII input source on the foreground client
The macOS prefix ASCII-switch ran in the headless server, whose
TISCopyCurrentKeyboardInputSource read is a stale per-process cache
(refreshed only via a main-run-loop notification the server never pumps),
so prefix could leave the terminal on the wrong input source.
Forward it to the foreground client, like clipboard: sync_prefix_input_source
emits AppEvent::PrefixInputSource as an intent; the server forwards it to the
foreground client and the monolithic app applies it in-process via
RealPrefixInputSource, which pumps its main run loop before the stale TIS read.
Key it on Mode::wants_ascii_input so multi-level prefix commands keep ASCII
until returning to the terminal, and restore the IME for rename text entry.
Adds ServerMessage::PrefixInputSource to the already-unreleased protocol 15.
refs #774
* fix: keep prefix input-source switch out of the headless server process
An App-internal drain (the exhaustive drain at the top of
handle_api_request, reachable from prefix-key runtime mutations) can
consume a queued PrefixInputSource intent before the server's
forwarding drain sees it, applying the TIS switch in the headless
server process and stranding the restore state. Gate the in-process
switch on App.local_input_source_switch, disabled by the headless
server alongside the other local side effects, so a swallowed intent
degrades to a skipped switch. Widen the forwarding-bypass maintenance
test to the handle_internal_event_with_prefix_sync wrapper.
refs #774
* docs: clarify prefix input-source comments and flag docs
refs #774
* fix: bump protocol for prefix input source
refs #774
---------
Co-authored-by: Ogulcan Celik <ogulcancelik@gmail.com>
* feat: add qodercli agent integration
Recognize qodercli as an agent in herdr panes, with basic Idle/Working/
Blocked screen-state detection mirroring the existing claude / codex
patterns. Adds an IntegrationTarget::Qodercli variant, install_target
wiring for shell hooks under src/integration/assets/qodercli/, the
herdr integration install qodercli CLI surface, and sound-override
coverage so qodercli notifications follow the same routing rules as
other agents.
refs #308
* fix: detect qodercli permission required as blocked
refs #308
* fix: detect qodercli ask-user prompt as blocked
refs #308
* refactor: extract has_qodercli_blocked_prompt helper aligning detect_claude
refs #308
* fix: tighten qodercli working state detection
Combine spinner-row strictness and explicit cancel-hint matching, and
stop matching the bare word 'working'. This avoids false positives when
narrative output (logs, commit messages, Markdown) contains the word
'working' or when a stale braille glyph is sitting in the scrollback
from a previous frame.
- has_qodercli_spinner_row: require row-start braille glyph + space +
alphabetic char so only an active spinner row triggers Working.
- has_qodercli_working_hint: match '(esc to cancel,' as a positive
signal that survives spinner masking (e.g. when a hook icon replaces
the spinner glyph).
refs #308
* fix: short-circuit qodercli press-again banners to idle
refs #308
* fix: detect qodercli AskUser dialog by its 'Asking User' title
refs #308
* feat: recognize qodercli, qoderclicn, qoder, qodercn process names
Map qodercli, qoderclicn, qoder, and qodercn process names all to the
Qodercli agent. Covers both international (qodercli/qoder) and CN
(qoderclicn/qodercn) Qoder CLI binary names.
refs #308
* feat: register qodercli hook in qoder settings.json with stdin payload
Address the integration-layer feedback on #308:
- `herdr integration install qodercli` now writes the bundled hook into
~/.qoder/hooks/herdr-agent-state.sh AND registers it in
~/.qoder/settings.json under the schema documented at
https://docs.qoder.com/zh/cli/hooks (and confirmed against the
packages/core/src/hooks/types.ts type definitions in qodercli's own
source tree). The hooks object is keyed by event name —
SessionStart / UserPromptSubmit / PreToolUse / PermissionRequest /
Stop / SessionEnd — with each entry holding a matcher and a list of
`{ type: "command", command, timeout }` invocations, mirroring how
install_claude already wires claude code's settings.json.
- The bundled assets/qodercli/herdr-agent-state.sh now reads the hook
payload from stdin (per HookInput in qodercli's types.ts:
session_id, transcript_path, cwd, hook_event_name, agent_id, ...).
No environment variable is consulted to identify the event;
SubagentStop and subagent release events return early so a recap or
away-summary frame cannot revive an idle pane, mirroring
assets/claude/herdr-agent-state.sh.
- uninstall_qodercli reverses the same set of entries while preserving
any foreign hook entries the user may have configured by hand.
- Tests cover write / idempotency / uninstall-preserves-others and
lock the stdin contract via a bundled-asset assertion.
refs #308
---------
Co-authored-by: coderwayne <jlu1318079810@163.com>
Co-authored-by: Can Celik <ogulcancelik@gmail.com>