Repository navigation
HostSpark v0.4.4
What's Changed in HostSpark v0.4.4
A dedicated user experience (UX) and stability release introducing live heartbeat elapsed timers, one-click /cancel self-rescue hints, stall warning detection for slow subcommands, nested coroutine variable scope fixes, and anti-blocking timeout optimizations.
⚡ Live Dynamic Heartbeat Elapsed Timer & Zero-Freeze UX
- Real-Time Heartbeat Timer: Status messages in Telegram now actively refresh with an elapsed time counter (
⏳ 國網AI助理 正在思考與執行中,請稍候... (已耗時 14s)). - Eliminates Screen Freezing: Even if an underlying tool or subcommand takes time or produces no intermediate output, the timer ticks every ~3–4 seconds, reassuring users that the session is alive and actively progressing.
- Auto-Elapsed in Progress Updates: When new streaming output or tool execution reports arrive, the elapsed time is smoothly preserved and shown alongside current tool status.
🛡️ One-Click Emergency /cancel Self-Rescue
- Clickable Status Card Hint: Added
👉 可點擊 /cancel 隨時中斷任務directly to the live progress card. - Instant Abort: Users can simply tap the command link on mobile or desktop to cancel runaway or stuck tasks immediately without having to recall or manually type slash commands.
⚠️ Stall Warning Detection (>30s)
- Proactive Stall Alerts: If a subcommand runs for over 30 seconds without generating stdout/stderr (e.g. streaming log readers, heavy compilation, or network waits), the status message automatically displays:
⚠️ 底層指令執行中,已超過 35s 未有新輸出... - Keeps users informed about long-running operations before any timeout triggers.
🐛 Bug Fix: keep_typing Coroutine Scope Fix
- Fixed
UnboundLocalError: Addednonlocal last_edit_timeto the nestedkeep_typing()coroutine insidesrc/hostspark/telegram/dispatcher.py. - Previously, assigning to
last_edit_timewithin the inner coroutine withoutnonlocalcaused Python to treat it as an unbound local variable, silently terminating the typing heartbeat loop.
⏱️ Timeout & Anti-Blocking Prompt Optimizations
- Optimized Default Timeout: Adjusted default
AGY_TIMEOUT_SECONDSfrom 600s (10 minutes) to 180s (3 minutes) in.env.exampleand documentation, preventing excessive waiting periods if a task stalls. - Anti-Blocking Rule Prompt: Updated prompt recommendations in
.env.exampleadvising the assistant to:- Never read continuous stdout streams without finite limits (e.g.
head /var/log/apache2/access.login Docker containers whose stdout pipes never reach EOF). Always usedocker logs --tail Nor strict timeouts (timeout 5s ...). - Background daemon processes immediately.
- Never read continuous stdout streams without finite limits (e.g.
📖 Documentation Updates
- Updated
README.mdandREADME.zh-TW.mdto detail:- Active heartbeat timer and stall warnings in feature highlights.
/cancelprogress card integration.- Default
AGY_TIMEOUT_SECONDS=180.
📦 Upgrade Notes
To upgrade an existing HostSpark installation to v0.4.4:
git pull origin main
sudo systemctl restart agy-telegram.service