mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-09-22 00:02:23 +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>
106 lines
4.3 KiB
Plaintext
106 lines
4.3 KiB
Plaintext
---
|
||
title: "tty7"
|
||
sidebarTitle: "Introduction"
|
||
description: "A terminal workbench: persistent sessions, remote work, agents."
|
||
mode: "wide"
|
||
---
|
||
|
||
<Frame>
|
||
<img src="/images/hero.webp" alt="tty7 showing a sidebar of agent sessions across several repositories" />
|
||
</Frame>
|
||
|
||
tty7 is a terminal you can leave running. Close the window, reboot the machine,
|
||
walk to a different laptop — the shells you started are still there, and so are
|
||
the coding agents you left working in them.
|
||
|
||
It is written in Rust, renders on the GPU through Zed's
|
||
[gpui](https://github.com/zed-industries/zed), and parses VT with Alacritty's
|
||
terminal core. In practice that means roughly twice the throughput of Alacritty,
|
||
Ghostty, or Kitty on a big `cat`, and a frame rate that does not fall over when
|
||
something floods the screen.
|
||
|
||
## What makes it different
|
||
|
||
<CardGroup cols={2}>
|
||
<Card title="Sessions that outlive the app" icon="power-off" href="/getting-started/concepts">
|
||
A background server owns your shells, not the window. Quit tty7 and your
|
||
builds keep building. No tmux to learn or configure.
|
||
</Card>
|
||
<Card title="Editor-grade input" icon="keyboard" href="/terminal/prompt">
|
||
Ghost suggestions from your history, tab completion that explains each flag,
|
||
syntax highlighting, click-to-place-caret, real multi-line editing.
|
||
</Card>
|
||
<Card title="Agent-aware" icon="robot" href="/agents/overview">
|
||
19 coding CLIs are recognised on sight. Per-pane status dots, notifications
|
||
when one needs you, git context, and session resume after a reboot.
|
||
</Card>
|
||
<Card title="Remote work that feels local" icon="server" href="/remote/workspaces">
|
||
A native Rust SSH stack with profiles, SFTP, and port forwarding — plus
|
||
remote workspaces where files, repos, and panes all stay on the far machine.
|
||
</Card>
|
||
<Card title="Git where you are looking" icon="code-branch" href="/git/source-control">
|
||
Branch and diff counts on every sidebar row, a source control panel, a diff
|
||
overlay, and worktrees in one dialog.
|
||
</Card>
|
||
<Card title="Scriptable" icon="terminal" href="/cli/overview">
|
||
A bundled `tty7` CLI that opens panes, sends keys, reads screens, and blocks
|
||
until an agent needs you — so scripts and agents can drive the workbench.
|
||
</Card>
|
||
</CardGroup>
|
||
|
||
## Start here
|
||
|
||
<Steps>
|
||
<Step title="Install it">
|
||
Native builds for macOS, Windows, and Linux.
|
||
[Installation →](/getting-started/installation)
|
||
</Step>
|
||
<Step title="Set it up">
|
||
Five minutes of settings that pay for themselves.
|
||
[First launch →](/getting-started/first-launch)
|
||
</Step>
|
||
<Step title="Learn the three words">
|
||
Workspace, tab, pane — and the server underneath them.
|
||
[Core concepts →](/getting-started/concepts)
|
||
</Step>
|
||
</Steps>
|
||
|
||
## How fast, exactly
|
||
|
||
Same machine, same day, same 155×40 grid — Apple M1 Pro, macOS 26.3.1,
|
||
five-run averages.
|
||
|
||
| | **tty7** | Alacritty | Ghostty | Kitty |
|
||
|---|---:|---:|---:|---:|
|
||
| Plaintext I/O — 11 MB `cat` <sub>(lower is better)</sub> | **95 ms** | 239 ms | 179 ms | 185 ms |
|
||
| [DOOM-fire](https://github.com/const-void/DOOM-fire-zig) frame rate <sub>(higher is better)</sub> | **888 fps** | 485 fps | 552 fps | 617 fps |
|
||
| Cold-launch memory | 116 MB <sup>1</sup> | 105 MB | 128 MB | 130 MB |
|
||
|
||
<sub><sup>1</sup> GUI 105 MB plus the persistent server at 11 MB.</sub>
|
||
|
||
The methodology and a one-command reproduction live in
|
||
[`scripts/bench/`](https://github.com/l0ng-ai/tty7/tree/main/scripts/bench).
|
||
|
||
Three decisions account for most of it:
|
||
|
||
- **The PTY is read at device speed** and parsed in large batches, off the
|
||
render path — so drawing never throttles reading.
|
||
- **The hot paths are lock-free.** A big `cat` never waits on the renderer.
|
||
- **The server buffers up to 16 MiB** ahead of the window before backpressure
|
||
applies, which is enough that a flood finishes writing while the window is
|
||
still catching up.
|
||
|
||
## Getting help
|
||
|
||
<CardGroup cols={3}>
|
||
<Card title="Discord" icon="discord" href="https://discord.gg/s3dethqz2V">
|
||
Ask a question, show what you built.
|
||
</Card>
|
||
<Card title="Issues" icon="github" href="https://github.com/l0ng-ai/tty7/issues">
|
||
Bugs and feature requests.
|
||
</Card>
|
||
<Card title="Changelog" icon="list" href="https://github.com/l0ng-ai/tty7/blob/main/CHANGELOG.md">
|
||
Everything that shipped, release by release.
|
||
</Card>
|
||
</CardGroup>
|