aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCan Celik <ogulcancelik@gmail.com>2026-09-27 20:29:49 +0300
committerGitHub <noreply@github.com>2026-09-27 20:29:49 +0300
commit0d1a39dcee6a0f244a036c55935970f40cfa76b8 (patch)
treeb36e41bc3dfb71041e5fa2502c0457e37aea417f /docs
parent316d176768e99bd80b81696c4e1f310f0643e744 (diff)
feat: accept mouse events on terminal session control (#4685)
Diffstat (limited to 'docs')
-rw-r--r--docs/next/website/src/content/docs/cli-reference.mdx13
-rw-r--r--docs/next/website/src/content/docs/ja/cli-reference.mdx2
-rw-r--r--docs/next/website/src/content/docs/ja/persistence-remote.mdx2
-rw-r--r--docs/next/website/src/content/docs/persistence-remote.mdx5
-rw-r--r--docs/next/website/src/content/docs/zh-cn/cli-reference.mdx2
-rw-r--r--docs/next/website/src/content/docs/zh-cn/persistence-remote.mdx2
6 files changed, 18 insertions, 8 deletions
diff --git a/docs/next/website/src/content/docs/cli-reference.mdx b/docs/next/website/src/content/docs/cli-reference.mdx
index f9aff8fe..05a539d6 100644
--- a/docs/next/website/src/content/docs/cli-reference.mdx
+++ b/docs/next/website/src/content/docs/cli-reference.mdx
@@ -377,8 +377,17 @@ Detach from direct attach with `ctrl+b q`. Send literal `ctrl+b` with `ctrl+b ct
terminal, or agent target. It prints the same newline-delimited
`terminal.frame` and `terminal.closed` records as observe mode. It reads
newline-delimited JSON commands on stdin: `terminal.input`, `terminal.resize`,
-`terminal.scroll`, and `terminal.release`. One controller can own a terminal at
-a time; use `--takeover` to replace it.
+`terminal.scroll`, `terminal.mouse`, and `terminal.release`. One controller can
+own a terminal at a time; use `--takeover` to replace it.
+`terminal.mouse` sends one mouse event at a zero-based cell of the controller's
+viewport, for example
+`{"type":"terminal.mouse","action":"down","button":"left","column":12,"row":5}`.
+`action` is `down`, `up`, `drag`, or `move`; `button` is `left` (default),
+`right`, or `middle`; `modifiers` is optional and combines Shift = 1, Ctrl = 2,
+and Alt = 4 (default 0). A click is `down` followed by `up`. Herdr encodes the
+event for the application's mouse mode and drops it when the application has
+not enabled mouse reporting, so a plain shell never receives stray input.
+`move` reaches only applications that track all mouse motion.
`terminal session observe` opens a read-only live terminal stream for a pane,
terminal, or agent target. It prints newline-delimited JSON `terminal.frame`
records with base64-encoded ANSI bytes, then a `terminal.closed` record when
diff --git a/docs/next/website/src/content/docs/ja/cli-reference.mdx b/docs/next/website/src/content/docs/ja/cli-reference.mdx
index 81894daa..b622c245 100644
--- a/docs/next/website/src/content/docs/ja/cli-reference.mdx
+++ b/docs/next/website/src/content/docs/ja/cli-reference.mdx
@@ -351,7 +351,7 @@ herdr terminal title clear
```
ダイレクトアタッチからは `ctrl+b q` でデタッチします。リテラルの `ctrl+b` は `ctrl+b ctrl+b` で送ります。
-`terminal session control` は、ペイン、ターミナル、エージェントを対象に書き込み可能なライブストリームを開きます。observe と同じ改行区切り JSON の `terminal.frame` と `terminal.closed` を出力し、標準入力から `terminal.input`、`terminal.resize`、`terminal.scroll`、`terminal.release` を受け取ります。制御クライアントは同時に 1 つだけで、`--takeover` で置き換えられます。
+`terminal session control` は、ペイン、ターミナル、エージェントを対象に書き込み可能なライブストリームを開きます。observe と同じ改行区切り JSON の `terminal.frame` と `terminal.closed` を出力し、標準入力から `terminal.input`、`terminal.resize`、`terminal.scroll`、`terminal.mouse`、`terminal.release` を受け取ります。制御クライアントは同時に 1 つだけで、`--takeover` で置き換えられます。`terminal.mouse` は 0 始まりのセル位置にマウスイベントを 1 つ送ります(例: `{"type":"terminal.mouse","action":"down","button":"left","column":12,"row":5}`)。`action` は `down`、`up`、`drag`、`move` のいずれかで、`button` は `left`(既定)、`right`、`middle`、`modifiers` は省略可能で Shift = 1、Ctrl = 2、Alt = 4 の組み合わせです(既定 0)。クリックは `down` の後に `up` を送ります。Herdr はアプリのマウスモードに合わせてエンコードし、マウス報告を有効にしていないアプリには送らないため、通常のシェルに余計な入力が届くことはありません。`move` はすべてのマウス移動を追跡するアプリにのみ届きます。
`terminal session observe` は同じ対象の読み取り専用ストリームを開きます。base64 の ANSI バイト列を含む `terminal.frame` と、サーバー終了時の `terminal.closed` を改行区切り JSON で出力します。複数の観測クライアントは入力、リサイズ、スクロール、制御権を取得せずに同じターミナルを監視できます。Linux/macOS ではソケットへの書き込みが 30 秒間進まない観測クライアントを切断します。その場合は最後の `terminal.closed` が届かないことがありますが、ペインや他のクライアントは動き続けます。出力のない静かなペインはこのタイムアウトの対象ではありません。
diff --git a/docs/next/website/src/content/docs/ja/persistence-remote.mdx b/docs/next/website/src/content/docs/ja/persistence-remote.mdx
index 94bffb8b..ae695ab3 100644
--- a/docs/next/website/src/content/docs/ja/persistence-remote.mdx
+++ b/docs/next/website/src/content/docs/ja/persistence-remote.mdx
@@ -148,4 +148,4 @@ base64 の ANSI データを含む `terminal.frame` を改行区切り JSON でå
herdr terminal session control w1:p1 --takeover --cols 120 --rows 40
```
-同じフレームを出力し、標準入力から改行区切り JSON コマンドを読み取ります。`terminal.input` はテキストまたは base64 データ、`terminal.resize` は表示サイズ、`terminal.scroll` はビューポートのスクロール、`terminal.release` はコントローラーの終了を扱います。入力とリサイズを所有できるコントローラーは 1 つだけです。
+同じフレームを出力し、標準入力から改行区切り JSON コマンドを読み取ります。`terminal.input` はテキストまたは base64 データ、`terminal.resize` は表示サイズ、`terminal.scroll` はビューポートのスクロール、`terminal.mouse` はマウス報告を有効にしたアプリへのセル位置のマウスイベント、`terminal.release` はコントローラーの終了を扱います。入力とリサイズを所有できるコントローラーは 1 つだけです。
diff --git a/docs/next/website/src/content/docs/persistence-remote.mdx b/docs/next/website/src/content/docs/persistence-remote.mdx
index 4f42cef5..0ffa1406 100644
--- a/docs/next/website/src/content/docs/persistence-remote.mdx
+++ b/docs/next/website/src/content/docs/persistence-remote.mdx
@@ -155,5 +155,6 @@ herdr terminal session control w1:p1 --takeover --cols 120 --rows 40
Control mode prints the same newline-delimited frame records and reads
newline-delimited JSON commands on stdin. `terminal.input` sends text or
base64 bytes, `terminal.resize` changes the controller viewport,
-`terminal.scroll` scrolls the attached viewport, and `terminal.release` closes
-the controller. Only one controller owns input and resize at a time.
+`terminal.scroll` scrolls the attached viewport, `terminal.mouse` sends a mouse
+event at a cell to applications that enabled mouse reporting, and
+`terminal.release` closes the controller. Only one controller owns input and resize at a time.
diff --git a/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx b/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx
index 080abb48..987e0c4a 100644
--- a/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx
+++ b/docs/next/website/src/content/docs/zh-cn/cli-reference.mdx
@@ -351,7 +351,7 @@ herdr terminal title clear
```
从直接附加中用 `ctrl+b q` 分离。用 `ctrl+b ctrl+b` 发送字面的 `ctrl+b`。
-`terminal session control` 为窗格、终端或智能体打开可写的实时终端流,输出与 observe 相同的逐行 JSON `terminal.frame` 和 `terminal.closed`,并从标准输入读取 `terminal.input`、`terminal.resize`、`terminal.scroll`、`terminal.release` 命令。同一终端同时只能有一个控制方,可用 `--takeover` 接管。
+`terminal session control` 为窗格、终端或智能体打开可写的实时终端流,输出与 observe 相同的逐行 JSON `terminal.frame` 和 `terminal.closed`,并从标准输入读取 `terminal.input`、`terminal.resize`、`terminal.scroll`、`terminal.mouse`、`terminal.release` 命令。同一终端同时只能有一个控制方,可用 `--takeover` 接管。`terminal.mouse` 在从 0 开始计数的单元格位置发送一个鼠标事件,例如 `{"type":"terminal.mouse","action":"down","button":"left","column":12,"row":5}`。`action` 为 `down`、`up`、`drag` 或 `move`;`button` 为 `left`(默认)、`right` 或 `middle`;`modifiers` 可省略,由 Shift = 1、Ctrl = 2、Alt = 4 组合(默认 0)。一次点击就是先 `down` 再 `up`。Herdr 会按应用的鼠标模式编码事件;应用未开启鼠标报告时直接丢弃,因此普通 shell 不会收到多余输入。`move` 只会发给追踪全部鼠标移动的应用。
`terminal session observe` 为相同目标打开只读实时流,输出包含 base64 ANSI 字节的逐行 JSON `terminal.frame`,服务器关闭流时输出 `terminal.closed`。多个观察方可以同时查看终端,不获取输入、调整尺寸、滚动或接管权限。Linux/macOS 上,若套接字写入连续 30 秒没有进展,观察方会被断开;此时可能没有最后的 `terminal.closed` 记录,但窗格和其他客户端继续运行。安静、没有输出的窗格不会触发此超时。
diff --git a/docs/next/website/src/content/docs/zh-cn/persistence-remote.mdx b/docs/next/website/src/content/docs/zh-cn/persistence-remote.mdx
index ddd0b0fb..6b0be4d8 100644
--- a/docs/next/website/src/content/docs/zh-cn/persistence-remote.mdx
+++ b/docs/next/website/src/content/docs/zh-cn/persistence-remote.mdx
@@ -148,4 +148,4 @@ herdr terminal session observe w1:p1 --cols 120 --rows 40
herdr terminal session control w1:p1 --takeover --cols 120 --rows 40
```
-控制模式输出相同的帧,并从标准输入读取逐行 JSON 命令。`terminal.input` 发送文本或 base64 数据,`terminal.resize` 更改视口尺寸,`terminal.scroll` 滚动视口,`terminal.release` 关闭控制器。同一时间只有一个控制器能拥有输入和调整尺寸的权限。
+控制模式输出相同的帧,并从标准输入读取逐行 JSON 命令。`terminal.input` 发送文本或 base64 数据,`terminal.resize` 更改视口尺寸,`terminal.scroll` 滚动视口,`terminal.mouse` 向已开启鼠标报告的应用发送单元格位置的鼠标事件,`terminal.release` 关闭控制器。同一时间只有一个控制器能拥有输入和调整尺寸的权限。