Repository navigation
HiMe v1.3.0
Since v1.2.0 — 72 commits, 172 files changed.
This release rebuilds the in-app chat experience and makes the web dashboard's Agent Monitor usable again. It also includes a full bug sweep across the iOS app, web frontend, agent core and API. Upgrading the server and the iOS app together is recommended: old apps keep working against the new server, but the new chat UI needs the new server events.
New features
Chat (iOS)
- Multiple conversations. Create, rename, archive and delete threads. The pinned Hime thread is permanent and receives every scheduled report, trigger alert and reminder. New threads get an automatic title after the first reply. Old servers fall back to the single chat.
- One reply, one block. Each run is a single stable block, from the moment you send until the answer is done:
- A collapsible step list shows thinking, data analysis and tool calls, with sub-agent steps nested.
- The header shows live status ("Thinking…", "Analyzing data · 3 steps", "Thought for 12s · 4 steps").
- The answer streams below as the agent writes it.
- Held-back drafts are visible. When the fact checker blocks a draft, the draft moves into the step list labelled with the reason instead of vanishing.
- Stop. Cancel an in-flight reply without stopping the agent.
- Animated avatar. The pixel cat is larger and moves with the agent's state: idle, thinking, working, replying, waiting, sleeping or error. Reduce Motion is respected.
- Starter prompts in empty chats, a reconnect indicator, and a dark-mode-aware design token set (
Theme.swift).
Web dashboard
- Design-system refresh: semantic color tokens, light, dark and system themes, themed charts, a mobile navigation drawer and loading skeletons.
- Agent Monitor timeline. Every chat run and every scheduled or trigger analysis is one readable block, with its report, nested steps and held-back drafts, plus day separators and "show earlier" for full history. Threads are filterable, and replies can be stopped from the monitor.
Server and API
- New thread endpoints:
GET /api/agent/chat/threadsPOST /api/agent/chat/threadsPATCH /api/agent/chat/threads/{id}DELETE /api/agent/chat/threads/{id}
- New stop endpoint:
POST /api/agent/chat/stop. - Richer chat event stream, documented in
backend/agent/chat_stream.py:run_idon every chat event.call_id,status,summary,parentandresult_previewon tool steps.- Streamed
chat_reply_delta, withreasonanddetailon resets. chat_run_doneat the end of each run.chat_thread_updatedandchat_thread_deletedfor thread changes.
- Trigger rules are also swept every 60 s, so time-based conditions such as
absentfire without new data. Cron runs carry their task id. - If an LLM provider returns 402 (out of credit), HiMe switches to the fallback provider immediately.
Bug fixes
Chat delivery and reliability
- Agent replies only appeared as a push banner, not in the open chat. The chat socket never reconnected after a drop, and the server counted dead sockets as online. The fix adds heartbeat-based presence with ping/pong and idle timeout, a self-healing client with backoff, network-change handling and history reconciliation, plus keepalive frames for older app builds.
- Ordinary agent or LLM
errorevents no longer tear down the chat connection. - Opening chat now lands on the newest message. Keyboard show/hide pushes the composer correctly.
- Scrolling up no longer snaps back or gets stuck on long messages. Auto-scroll never fights a drag, and charts reserve their size before they load.
- Long chats no longer lag: bubbles are isolated from unrelated updates, and Markdown parsing is cached.
Agent Monitor
- History was empty. Tool results containing
NaN(pandas or SQL cells) madeGET /api/agent/activityfail with HTTP 500, and live WebSocket frames containingNaNwere silently dropped by the browser. Events are now sanitised at the source, and legacy rows read back asnull. - History was cut to the last run or two after a remount. The monitor now fetches the full 2000-row window.
- Phantom duplicate blocks, out-of-order steps and lost expand state are fixed.
Health data sync
- iOS "Force Fetch All Data Now" now re-uploads the full 14-day history (#61).
- The WatchExporter WebSocket upload has an ack/nack protocol, and the iOS pending queue is durable. A dropped socket can no longer lose samples.
- Live ingest is more resilient, and the trigger evaluator is initialised correctly.
- Trigger rules could be skipped right after a server boot, because the evaluation throttle compared against a boot-relative clock starting at 0.
Agent core
- Fixed an empty body after
emergency_truncate, and added a guard against context-overflow retries that make no progress. - Hardened role and tool boundaries, SQL, page and path checks, the provider fallback chain, the chat loop and agent state I/O.
- Fixed stalled LLM streams that hung forever, the DeepSeek output cap, and DeepSeek flash vision (#60).
API, auth and ops
- Hardened auth, CORS and input validation.
- Messaging gateway fixes.
hime.sh:stopis graceful and scoped to its own checkout.- It never kills the shell that invoked it.
- It loads
.envsafely and generates an API token on first run. resetandforgetare container-aware.
iOS build
- Swift 6 / strict-concurrency actor-isolation errors and warnings are fixed across the app and the watch app.
Upgrading
git pull
./hime.sh restartRebuild the iOS app, or update from the App Store when the new build is out. Dependency bumps since v1.2.0 include uvicorn, pydantic, websockets (capped below 17 for Python 3.10), python-multipart, statsmodels, croniter, react-dom, react-router-dom, i18next and lucide-react.