Skip to content

Commit 33fb5fd

Browse files
bx33661claude
andcommitted
chore: bump version to 1.1.5
- Fix TUI arrow-key input: handle SS3 escape sequences (\x1bOA/B) in addition to CSI (\x1b[A/B) for macOS Terminal, iTerm2, and Claude Code terminal compatibility - Fix BufferedReader race: replace sys.stdin.buffer.read(1) with os.read(fd, 1) to avoid pre-buffering escape sequences that emptied the fd before select.select() could detect data - Raise select timeout from 50ms to 100ms - Add MCP client support: Void, BoltAI, Kiro Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent f587119 commit 33fb5fd

5 files changed

Lines changed: 66 additions & 11 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
88

99
| Version | Date | Highlights |
1010
|---------|------|------------|
11+
| [1.1.5](changelog/1.1.5.md) | 2026-04-18 | Fix TUI arrow-key input (SS3 sequences + BufferedReader race); add Void, BoltAI, Kiro clients |
1112
| [1.1.0](changelog/1.1.0.md) | 2026-04-17 | OpenCode support, interactive TUI installer, `update` subcommand, bilingual changelog |
1213
| [1.0.0](changelog/1.0.0.md) | 2026-03-16 | Stable release: suite tools, capabilities API, stable tool surface, threat-intel semantics |
1314
| [0.6.4](changelog/0.6.4.md) | 2026-03-14 | CI green-state fix after skill distribution work |
@@ -20,7 +21,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
2021

2122
## Version Links
2223

23-
[Unreleased]: https://github.com/bx33661/Wireshark-MCP/compare/v1.1.0...HEAD
24+
[Unreleased]: https://github.com/bx33661/Wireshark-MCP/compare/v1.1.5...HEAD
25+
[1.1.5]: https://github.com/bx33661/Wireshark-MCP/compare/v1.1.0...v1.1.5
2426
[1.1.0]: https://github.com/bx33661/Wireshark-MCP/compare/v1.0.0...v1.1.0
2527
[1.0.0]: https://github.com/bx33661/Wireshark-MCP/compare/v0.6.4...v1.0.0
2628
[0.6.4]: https://github.com/bx33661/Wireshark-MCP/compare/v0.6.3...v0.6.4

changelog/1.1.5.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# [1.1.5] - 2026-04-18
2+
3+
---
4+
5+
## English
6+
7+
### Fixed
8+
9+
- **TUI arrow-key input on macOS / iTerm2 / Claude Code terminal**`_read_key_unix` now handles both CSI (`\x1b[A/B`) and SS3 (`\x1bOA/B`) escape sequences. Previously, terminals that emit SS3 sequences (macOS Terminal, iTerm2, application cursor-key mode) caused every Up/Down keypress to be misread as ESC, immediately exiting the installer menu.
10+
- **Buffered stdin race condition** — Replaced `sys.stdin.buffer.read(1)` with `os.read(fd, 1)` throughout the key-reader. Python's `BufferedReader` was pre-buffering the entire 3-byte escape sequence (`\x1b[A`) in a single syscall, leaving the underlying fd empty so the subsequent `select.select()` always timed out and reported ESC. Direct fd reads bypass this layer entirely. `select.select` now also targets the raw fd integer rather than the stream object.
11+
- **Select timeout increased** — Raised from 50 ms to 100 ms to accommodate slower terminals where escape-sequence bytes arrive with slight delays.
12+
13+
### Added
14+
15+
- **Void editor** — Auto-install support for [Void](https://voideditor.com) (open-source Cursor alternative) on macOS, Linux, and Windows. Config: `~/.config/void/mcp_servers.json`.
16+
- **BoltAI** — Auto-install support for [BoltAI](https://boltai.com) (macOS-only native AI client). Config: `~/.boltai/mcp.json`.
17+
- **Kiro** — Auto-install support for [Kiro](https://kiro.dev) (Amazon's AI IDE) on macOS, Linux, and Windows. Config: `~/.kiro/settings/mcp.json`.
18+
19+
---
20+
21+
## 中文
22+
23+
### 修复
24+
25+
- **macOS / iTerm2 / Claude Code 终端中箭头键无法使用**`_read_key_unix` 现在同时处理 CSI(`\x1b[A/B`)和 SS3(`\x1bOA/B`)两种转义序列。之前,发送 SS3 序列的终端(macOS Terminal、iTerm2、应用光标键模式)会将每次上下键误判为 ESC,导致安装菜单立即退出。
26+
- **BufferedReader 缓冲导致 select 失效** — 将 `sys.stdin.buffer.read(1)` 全部替换为 `os.read(fd, 1)`。Python 的 `BufferedReader` 在一次 syscall 中会把完整的 3 字节转义序列(`\x1b[A`)全部读入内部缓冲区,导致底层 fd 为空,后续 `select.select()` 始终超时并返回 ESC。直接读 fd 完全绕过缓冲层。`select.select` 也改为传入原始 fd 整数而非 stream 对象。
27+
- **select 超时时间提升** — 从 50ms 增加到 100ms,兼容转义序列字节到达存在轻微延迟的终端。
28+
29+
### 新增
30+
31+
- **Void 编辑器** — 支持在 macOS、Linux、Windows 自动安装 [Void](https://voideditor.com)(开源 Cursor 替代品)。配置路径:`~/.config/void/mcp_servers.json`
32+
- **BoltAI** — 支持自动安装 [BoltAI](https://boltai.com)(macOS 专属原生 AI 客户端)。配置路径:`~/.boltai/mcp.json`
33+
- **Kiro** — 支持在 macOS、Linux、Windows 自动安装 [Kiro](https://kiro.dev)(Amazon 的 AI IDE)。配置路径:`~/.kiro/settings/mcp.json`

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "wireshark-mcp"
7-
version = "1.1.0"
7+
version = "1.1.5"
88
description = "A production-grade Model Context Protocol (MCP) server for Wireshark"
99
readme = "README.md"
1010
keywords = ["mcp", "wireshark", "tshark", "packet-analysis", "network", "pcap", "model-context-protocol", "llm", "security"]

src/wireshark_mcp/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22
Wireshark MCP - A Model Context Protocol server for Wireshark.
33
"""
44

5-
__version__ = "1.1.0"
5+
__version__ = "1.1.5"

src/wireshark_mcp/installer.py

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,22 +39,29 @@
3939

4040
def _read_key_unix() -> str:
4141
"""Read a single keypress on Unix, handling escape sequences."""
42+
import os
43+
import select
4244
import termios
4345
import tty
4446

4547
fd = sys.stdin.fileno()
4648
old = termios.tcgetattr(fd)
4749
try:
4850
tty.setraw(fd)
49-
ch = sys.stdin.buffer.read(1)
51+
# Use os.read(fd) directly instead of sys.stdin.buffer.read() to avoid
52+
# Python's BufferedReader pre-buffering the entire escape sequence
53+
# (e.g. \x1b[A) into its internal buffer, which empties the underlying
54+
# fd so that the subsequent select.select() always times out and the
55+
# arrow key is misread as ESC.
56+
ch = os.read(fd, 1)
5057
if ch == b"\x1b":
51-
# Read potential escape sequence with a short timeout
52-
import select
53-
54-
if select.select([sys.stdin], [], [], 0.05)[0]:
55-
ch2 = sys.stdin.buffer.read(1)
56-
if ch2 == b"[" and select.select([sys.stdin], [], [], 0.05)[0]:
57-
ch3 = sys.stdin.buffer.read(1)
58+
# Handle both CSI (\x1b[A/B) and SS3 (\x1bOA/B) sequences.
59+
# SS3 is sent by macOS Terminal, iTerm2, and other emulators when
60+
# application cursor-key mode is active.
61+
if select.select([fd], [], [], 0.1)[0]:
62+
ch2 = os.read(fd, 1)
63+
if ch2 in (b"[", b"O") and select.select([fd], [], [], 0.1)[0]:
64+
ch3 = os.read(fd, 1)
5865
return {b"A": "UP", b"B": "DOWN"}.get(ch3, "ESC")
5966
return "ESC"
6067
return {
@@ -487,6 +494,15 @@ def _get_client_configs() -> dict[str, tuple[str, str]]:
487494
),
488495
"opencode.json",
489496
),
497+
"Void": (
498+
_join_path(
499+
os.environ.get("XDG_CONFIG_HOME") or _join_path(home, ".config"),
500+
"void",
501+
),
502+
"mcp_servers.json",
503+
),
504+
"BoltAI": (_join_path(home, ".boltai"), "mcp.json"),
505+
"Kiro": (_join_path(home, ".kiro", "settings"), "mcp.json"),
490506
"VS Code": (
491507
_join_path(home, "Library", "Application Support", "Code", "User"),
492508
"settings.json",
@@ -545,6 +561,8 @@ def _get_client_configs() -> dict[str, tuple[str, str]]:
545561
"Copilot CLI": (_join_path(home, ".copilot"), "mcp-config.json"),
546562
"Amazon Q": (_join_path(home, ".aws", "amazonq"), "mcp_config.json"),
547563
"OpenCode": (_join_path(config_home, "opencode"), "opencode.json"),
564+
"Void": (_join_path(config_home, "void"), "mcp_servers.json"),
565+
"Kiro": (_join_path(home, ".kiro", "settings"), "mcp.json"),
548566
"VS Code": (_join_path(config_home, "Code", "User"), "settings.json"),
549567
"VS Code Insiders": (_join_path(config_home, "Code - Insiders", "User"), "settings.json"),
550568
}
@@ -601,6 +619,8 @@ def _get_client_configs() -> dict[str, tuple[str, str]]:
601619
"Copilot CLI": (_join_path(home, ".copilot", platform="win32"), "mcp-config.json"),
602620
"Amazon Q": (_join_path(home, ".aws", "amazonq", platform="win32"), "mcp_config.json"),
603621
"OpenCode": (_join_path(appdata, "opencode", platform="win32"), "opencode.json"),
622+
"Void": (_join_path(appdata, "void", platform="win32"), "mcp_servers.json"),
623+
"Kiro": (_join_path(home, ".kiro", "settings", platform="win32"), "mcp.json"),
604624
"VS Code": (_join_path(appdata, "Code", "User", platform="win32"), "settings.json"),
605625
"VS Code Insiders": (_join_path(appdata, "Code - Insiders", "User", platform="win32"), "settings.json"),
606626
}

0 commit comments

Comments
 (0)