mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 16:02:24 +00:00
* feat(agents): wire hooks, resume and detection for Kimi Code Kimi Code CLI takes its hooks as [[hooks]] entries in the same config.toml that holds the user's providers and models, so this adds a third install strategy — a format-preserving TOML merge on toml_edit — beside the JSON map merge and the owned files. Like Qwen it reports permission requests first-class, so it gets no Notification hook. Resume rides `kimi --session <id>`; fork stays unwired, Kimi documents none. Closes #693 Signed-off-by: Austin Spraggins <spragginsdesigns@gmail.com> * fix(agents): harden the Kimi Code TOML hook merge and its resume flags The TOML merge strategy the Kimi wiring introduces round-trips a shared config.toml cleanly, but three gaps sat behind it. `hooks_state` counted only the marked entries that still named an event, so a hand-edit that dropped the key off one of nine entries left the remaining eight matching the roster exactly and the file reported Installed with a broken entry in it. Every marked entry now counts, which is what the JSON merge already did and what `refresh_hooks` needs to see. A `hooks = []` spelled as an empty inline array made install fail outright -- toml_edit keeps an empty array and an array of tables apart, but the two say the same thing and neither carries any configuration. It is now promoted rather than refused. Every other wrong-shaped `hooks` key -- a string, a table, a non-empty inline array -- still refuses with the file left byte-for-byte alone. `Stop` is not the only way a Kimi turn ends: its own event reference says `Stop` does not fire on interrupts and `Interrupt` fires instead, and a turn that dies on an error reports `StopFailure`. Without those two an Esc or a failed turn left the pane on "working" for good and `tty7 wait` could only ever time out. Both are observation-only events and report the same end of turn `Stop` does. On resume, `--agent` and `--agent-file` join the stale flags: Kimi rejects either next to `--session` at startup, and resuming rebinds the session agent by itself, so replaying them turned a working resume into a launch error. Tests cover the wrong-shaped `hooks` keys, a config.toml that does not parse on both install and uninstall, a file that does not exist yet, a second install being byte-for-byte the first, mangled and surplus marked entries, an uninstall threading between the user's own entries and the tables after them, and the `--session=<id>`, bare `--session`, `--continue` and `--agent` spellings on the resume path. --------- Signed-off-by: Austin Spraggins <spragginsdesigns@gmail.com> Co-authored-by: l0ng-ai <24760907+l0ng-ai@users.noreply.github.com>
89 lines
3.3 KiB
Plaintext
89 lines
3.3 KiB
Plaintext
---
|
|
title: "Status and notifications"
|
|
description: "Installing the hooks, reading the dots, and being told when an agent needs you."
|
|
---
|
|
|
|
An agent working for two minutes and an agent that stopped ninety seconds ago
|
|
waiting for permission look identical from outside. tty7 fixes that by letting
|
|
the agent say which one it is.
|
|
|
|
## Installing the hooks
|
|
|
|
**Settings → Agents** lists every agent that can report status, with an
|
|
**Install** button beside each:
|
|
|
|
| Agent | |
|
|
|---|---|
|
|
| Claude Code · Codex · Copilot CLI · OpenCode · Pi · Grok Build · Oh My Pi · Gemini · Droid · Qwen Code · Goose · Kimi Code | Hooks available |
|
|
| Aider · Amp · Cursor · Auggie · Hermes · Vibe · Antigravity | Detected and labelled, but no status channel yet |
|
|
|
|
Installing writes into that agent's own configuration directory. Once installed
|
|
the row grows a second **Uninstall** button beside the first, which itself
|
|
becomes **Reinstall** — or **Update**, against an **Outdated** state, when tty7
|
|
ships a newer hook.
|
|
|
|
<Note>
|
|
The hooks only do anything inside tty7. Running the same agent in another
|
|
terminal is unaffected.
|
|
</Note>
|
|
|
|
Hooks are installed per machine. Once a second
|
|
[machine](/remote/workspaces) is linked, a row of chips appears above the table
|
|
to pick which one you are looking at, and the table then shows that machine's
|
|
agents — so a dev box gets its hooks installed the same way, from the same
|
|
screen.
|
|
|
|
## The status dot
|
|
|
|
Every tab chip and sidebar row carries a dot:
|
|
|
|
| Dot | Meaning |
|
|
|---|---|
|
|
| 🔵 **Blue** | Working |
|
|
| 🟠 **Amber** | Needs your input — a permission prompt, a question |
|
|
| 🟢 **Green** | Done with this turn |
|
|
|
|
<Frame caption="Placeholder — screenshot: three sidebar rows, one working, one waiting, one done">
|
|
<img src="/images/placeholder.svg" alt="Agent status dots" />
|
|
</Frame>
|
|
|
|
The same three states are what `tty7 agents` reports as `working` / `waiting` /
|
|
`done`, and what [`tty7 wait`](/agents/orchestration) blocks on. A fourth state,
|
|
`idle`, carries no dot — it is an agent that has not started a turn.
|
|
|
|
## Notifications
|
|
|
|
Two, both following your **Settings → Window & Tabs → Notifications** policy:
|
|
|
|
- **"needs your permission…"** the moment an agent blocks on you
|
|
- **"finished after 42s"** at the end of a turn
|
|
|
|
Which means that by default — *When unfocused* — you are told the instant you
|
|
are the bottleneck, and left alone while you are watching.
|
|
|
|
## The tray icon
|
|
|
|
tty7 keeps a status item in the system tray (menu bar on macOS). It flips to an
|
|
attention state the moment *any* agent anywhere needs input, so you can see it
|
|
without the window in front of you.
|
|
|
|
Its menu lists every agent pane with its brand avatar and status dot — click one
|
|
to reveal it — and also holds the notification policy switch and **Quit and Stop
|
|
Server…**.
|
|
|
|
Turn it off with **Settings → Window & Tabs → Show tray icon**
|
|
(`show_tray_icon: false`).
|
|
|
|
## Sending an agent some context
|
|
|
|
Two command-palette entries hand what is in front of you to the agent running in
|
|
the pane, as a ready-made prompt:
|
|
|
|
| Command | Sends |
|
|
|---|---|
|
|
| **Agent: Send Selection** | The current terminal selection |
|
|
| **Agent: Send Git Diff for Review** | The repository's `git diff` |
|
|
|
|
If nothing recognisable is running, tty7 says *"No running coding agent found"*
|
|
rather than typing into your shell.
|