文件最后提交记录最后更新时间
feat: add tests and update mds 1 个月前
chore: ruff auto-fix PLR6201 resweep — tuple → set in membership tests (#27355) Six days after #23937 (608 fixes) the codebase had accumulated 241 new PLR6201 violations. Same mechanical x in (...)x in {...} fix, same zero-risk profile: set lookup is O(1) vs O(n) for tuple and the two are semantically equivalent for hashable scalar membership tests. All 241 instances fixed via `ruff check --select PLR6201 --fix --unsafe-fixes`, zero remaining. Every changed value is a hashable scalar (str/int/None/enum/signal); no risk of unhashable runtime errors. No behavior change. Test plan: - 119 files changed, +244/-244 (net zero) — exactly one-line edits - ruff check clean afterward - Compile checks pass on the largest touched files (cli.py, run_agent.py, gateway/run.py, gateway/platforms/discord.py, model_tools.py) - Subset broad test run on tests/gateway/ tests/hermes_cli/ tests/agent/ tests/tools/: 18187 passed, 59 pre-existing failures (verified against origin/main with the same shape — identical failure count, identical category — all xdist test-order flakes unrelated to this change) Follows the same template as PR #23937 ([tracker: #23972](https://github.com/NousResearch/hermes-agent/issues/23972)).19 天前
fix(goals): make /goal work in TUI and fix gateway verdict delivery (#19209) /goal was silently broken outside the classic CLI. TUI: /goal was routed through the HermesCLI slash-worker subprocess, which set the goal row in SessionDB but then called _pending_input.put(state.goal) — the subprocess has no reader for that queue, so the kickoff message was discarded. No post-turn judge was wired into prompt.submit either, so even a manual kickoff would not continue the goal loop. Intercept /goal in command.dispatch instead, drive GoalManager directly, and return {type: send, notice, message} so the TUI client renders the Goal-set notice and fires the kickoff. Run the judge in _run_prompt_submit after message.complete, surface the verdict via status.update {kind: goal}, and chain the continuation turn after the running guard is released. Gateway: _post_turn_goal_continuation was gated on hasattr(adapter, 'send_message'), but adapters only expose send(). That branch was dead on every platform — users never saw '✓ Goal achieved', 'Continuing toward goal', or budget-exhausted messages. Replace the dead call with adapter.send(chat_id, content, metadata) and drop a broken reference to self._loop. Tests: - tests/tui_gateway/test_goal_command.py — full /goal dispatch matrix (set / status / pause / resume / clear / stop / done / whitespace) plus regressions for slash.exec → 4018 and 'goal' staying in _PENDING_INPUT_COMMANDS. - tests/gateway/test_goal_verdict_send.py — locks in the adapter.send path for done / continue / budget-exhausted and verifies the hook no-ops when no goal is set or the adapter lacks send().1 个月前
fix(tui): close slash parity gaps with CLI (#20339) * fix(tui): close slash parity gaps with CLI Route unsupported /skills subcommands through slash.exec, support /new <name> titles, and handle /redraw natively so TUI behavior matches classic CLI. Also filter gateway-only commands out of the TUI catalog while keeping /status discoverable. * fix(tui): run remaining CLI parity paths natively Forward chat launch flags into the TUI runtime and handle live-session status and skill reloads in the gateway process so TUI state no longer depends on the slash worker's stale CLI instance. * fix(tui): block stale snapshot restores Prevent snapshot restore from running through the isolated slash worker because it mutates disk state without refreshing the live TUI agent. * chore: uptick * fix(tui): guard async session title updates Handle failures from the fire-and-forget session.title RPC so title-setting errors do not surface as unhandled promise rejections while preserving session-scoped messaging.30 天前
fix(tui): harden plugin slash exec errors 1 个月前
feat: add tests and update mds 1 个月前
feat(tui): render self-improvement review summaries in the transcript The Ink TUI (\hermes --tui\ + dashboard \/chat\) had no wiring for the background self-improvement review. When the review fired and patched a skill or saved a memory entry, the change landed but the user had no visual indication it happened — only the CLI had a print surface for the '💾 Self-improvement review: …' line. Changes: - tui_gateway/server.py: in _init_session, attach agent.background_review_callback to an _emit('review.summary', sid, {text}) closure. Wrapped in try/except so agents with locked attribute slots don't break session startup. - ui-tui/src/app/createGatewayEventHandler.ts: handle 'review.summary' by routing ev.payload.text through sys(…), matching the existing 'background.complete' pattern. Empty / whitespace payloads are ignored so the transcript never gets a blank system line. - ui-tui/src/gatewayTypes.ts: extend the GatewayEvent discriminated union with { type: 'review.summary', payload?: { text?: string } }. Gateway platforms (Telegram, Discord, Slack, …) already route the review summary via background_review_callback → post-delivery queue in gateway/run.py, so they pick up the new 'Self-improvement review:' prefix from the companion run_agent change with no platform edits. Tests: - tests/tui_gateway/test_review_summary_callback.py (Python, 2 tests): _init_session attaches a callback that emits the right event; the callback path survives agents that can't accept the attribute. - ui-tui/src/__tests__/createGatewayEventHandler.test.ts (vitest, 2 new cases): review.summary events feed sys(...) with the full text; empty / missing payloads are no-ops. - TypeScript type-check passes. - tui_gateway suite: 64/64 pass. 1 个月前