# 🐝 Hive Agent v0.10.1

> A small follow-up to **v0.10.0 The Colony** — polish on the queen experience, a more reliable agent loop under long contexts, and sharper browser automation skills. No breaking changes; v0.10.0 sessions continue to work.

---

## ✨ Highlights

- **Queen DMs feel alive.** Chat now shows message timestamps and day-divider rows, with a stable `createdAt` across stream updates so messages don't jitter as they arrive.
- **Queen profile, one click away.** The queen profile is now its own panel, opened directly from the app header — available on every page, not just the org chart.
- **Smarter sidebar.** Queens are sorted by the most recent DM activity, so whoever you're actually working with floats to the top. The "Head of" prefix is trimmed for a cleaner look.
- **Calmer, leaner queen prompt.** The independent / PM-mode prompt has been significantly slimmed down and reworked for better reasoning.
- **Context health you can trust.** A set of fixes to the agent loop's context tracking, compaction, and tool-result handling — long sessions stay healthy instead of drifting into eviction loops.
- **Browser automation, upgraded.** Browser, LinkedIn, and X automation skills gained new guidance, and the underlying CDP bridge is more robust across click, snapshot, and inspection paths.

---

## 🆕 What's New

### Queens & Chat UX

- **Message timestamps and day dividers in DMs** — `ChatPanel` now shows per-message time, groups by day, and preserves a stable `createdAt` across streaming updates so messages don't reshuffle. (@bryanadenhq)
- **`QueenProfilePanel` extracted from `org-chart`** — the profile panel is now a standalone component opened from `AppHeader`, available globally through the app layout. (@bryanadenhq)
- **Sort queens by last DM activity** — `ColonyContext` orders queens by most recent interaction, and `SidebarQueenItem` trims the "Head of" title prefix. (@bryanadenhq)
- **`last_active_at` derived from latest message** — `session_manager` now derives queen activity from the actual message stream and sorts history newest-first, keeping the sidebar in sync with reality. (@bryanadenhq)
- **Queen independent-prompt refactor** — `queen/nodes/__init__.py` shrinks from ~215 lines to ~95, with cleaner prompt construction for independent / PM mode and an updated `debug_queen_prompt.py` script. (@RichardTang-Aden)
- **Finance queen title polish** — Charlotte's title updated in `queen_profiles.py`. (@RichardTang-Aden)

### Agent Loop & Context Health

- **Context health and eviction fixes** — substantial rework across `agent_loop.py`, `conversation.py`, `compaction.py`, `tool_result_handler.py`, and `internals/types.py` to keep long sessions stable. Compaction, tool-result accounting, and eviction decisions are now driven by a more accurate view of conversation state. (@timothyadenhq)

### Skills & Tools

- **Browser automation skill guidance** — `browser-automation/SKILL.md` updated with sharper instructions for agents working inside Chrome. (@RichardTang-Aden, @timothyadenhq)
- **New LinkedIn and X automation skills** — dedicated `linkedin-automation` and `x-automation` SKILL files with site-specific playbooks. (@timothyadenhq)
- **GCU browser bridge hardening** — `tools/src/gcu/browser/bridge.py` and the `advanced`, `inspection`, and `interactions` tool modules gained reliability fixes around CDP calls and snapshot flow. (@timothyadenhq)

### LLM & Model Catalog

- **Gemini customtools model** — `tool_result_handler` and `model_catalog.json` updated so Gemini routes through the `customtools` model variant; covered by `test_model_catalog.py`. (@RichardTang-Aden)

---

## 🐛 Bug Fixes

- **Context eviction loops** — long conversations no longer drift into repeated compaction/eviction due to stale context accounting.
- **Message reshuffling in DMs** — stable `createdAt` prevents messages from jumping as their streams complete.
- **Queen sidebar staleness** — activity-based sort keeps the most recently used queens at the top instead of a static order.
- **Queen profile access** — profile is reachable from anywhere via the header, not gated behind the org chart.

---

## ⬆️ Upgrading from v0.10.0

No migration steps required. Pull `main` at the `v0.10.1` tag and restart Hive — existing `~/.hive/` state, queen profiles, and sessions continue to work.
