handmux 0.25.1 → 0.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +4 -4
- package/README.zh-CN.md +3 -3
- package/dist/connectors/pi/index.js +16 -1
- package/dist/package.json +13 -13
- package/dist/public/assets/{index-CTrqTqtT.css → index-BVFKs5dN.css} +1 -1
- package/dist/public/assets/index-KDa5PCoi.js +356 -0
- package/dist/public/index.html +2 -2
- package/dist/src/agent-runtime/builtinRuntime.js +2 -0
- package/dist/src/agent-runtime/conversationLiveHub.js +13 -5
- package/dist/src/agent-runtime/interactionLiveHub.js +6 -1
- package/dist/src/agent-runtime/runtime.js +52 -10
- package/dist/src/agents/claudeConversation.js +2 -2
- package/dist/src/agents/codexConversation.js +2 -2
- package/dist/src/agents/codexConversationControls.js +4 -1
- package/dist/src/agents/conversationProjectionSafety.js +48 -11
- package/dist/src/agents/pi.js +1 -0
- package/dist/src/agents/piConversationContext.js +49 -0
- package/dist/src/cli/piExtension.js +11 -1
- package/dist/src/codexAppServer.js +3 -0
- package/dist/src/docs.js +16 -5
- package/package.json +4 -4
- package/dist/public/assets/index-BR0Du_wl.js +0 -346
package/README.md
CHANGED
|
@@ -68,7 +68,7 @@ handmux start --tunnel cloudflare # instant public URL (cloudflared auto-insta
|
|
|
68
68
|
## Features
|
|
69
69
|
|
|
70
70
|
- **Claude Code / Codex, deeply** — an inbox status ledger, thumb-approve permissions & plans, and stable host-wide subscription usage shared by every connected device; each visible provider can refresh its latest limits from the card action menu, while keeping the previous values visible if that provider cannot be reached. Codex also shows the current account and plan, separate account/model limits, remaining rate-limit resets, and each provided expiry. The same Usage screen can save multiple DeepSeek and Moonshot (Kimi) API accounts encrypted at rest within the Handmux computer's local trust boundary; full API Keys never return to browsers.
|
|
71
|
-
- **Chat view** — drive Codex CLI through App Server with streaming Markdown bubbles, tool cards, native Goal lifecycle cards, and session status; the context-ring details show the absolute Git worktree root path and branch that contain the thread `cwd`. Setting or restarting a Goal creates a fresh active native Goal, immediately shows its user-side card on the right, and starts Codex's built-in continuation. An active or paused Goal stays beneath the live read-only turn task list, Codex terminal feedback stays with its originating turn on the left, and every entry opens the same Bottom Sheet. The current Goal uses one equal-width iOS-style action row; clearing it removes the resident Goal and closes the sheet, while its historical chat card remains. The current terminal Goal can be edited before restarting. Long replies hold at their beginning for reading, with an explicit jump back to the latest output. Existing panes can switch in place. Every sendable Agent uses the same persistent server queue: queued messages can be viewed, edited or deleted and are delivered automatically; Guide now appears only when that Agent supports steering. Failed
|
|
71
|
+
- **Chat view** — drive Codex CLI through App Server with streaming Markdown bubbles, tool cards, native Goal lifecycle cards, and session status; the context-ring details show the absolute Git worktree root path and branch that contain the thread `cwd`. Setting or restarting a Goal creates a fresh active native Goal, immediately shows its user-side card on the right, and starts Codex's built-in continuation. An active or paused Goal stays beneath the live read-only turn task list, Codex terminal feedback stays with its originating turn on the left, and every entry opens the same Bottom Sheet. The current Goal uses one equal-width iOS-style action row; clearing it removes the resident Goal and closes the sheet, while its historical chat card remains. The current terminal Goal can be edited before restarting. Long replies hold at their beginning for reading, with an explicit jump back to the latest output. Existing panes can switch in place. Every sendable Agent uses the same persistent server queue: queued messages can be viewed, edited or deleted and are delivered automatically; Guide now appears only when that Agent supports steering. Failed sends stay visible and retry under the same request ID. If delivery remains unknown after reconciliation, the message returns to the conversation and you choose whether to send it again as new, with a clear duplicate-delivery warning. On desktop, <kbd>Shift</kbd>+<kbd>Enter</kbd> focuses the composer or inserts a newline when already focused, <kbd>Enter</kbd> sends, and <kbd>Esc</kbd> releases focus without stopping the Agent. Codex chat is stable; Claude Code and Pi chat are independently enabled experimental options.
|
|
72
72
|
- **Real-time terminal + desktop keyboard** — stream the same tmux pane on phone and desktop with scrollback, weak-network fallback, direct physical-keyboard input, and native copy/paste.
|
|
73
73
|
- **Command & chat modes** — switch between direct terminal input and natural-language agent chat, with direct Alt and Space keys on the mobile command keyboard and a customizable quick bar that stays in sync across devices.
|
|
74
74
|
- **Client reload after updates** — once the server update has finished, use Settings → Reload app to load the new client without quitting and reopening the home-screen app.
|
|
@@ -76,8 +76,8 @@ handmux start --tunnel cloudflare # instant public URL (cloudflared auto-insta
|
|
|
76
76
|
- **Workspace recovery** — handmux keeps the metadata needed to restore your latest tmux workspace after a computer or tmux-server restart, without replacing existing sessions.
|
|
77
77
|
- **Git viewer** — changes / commit history / any branch / full-screen colored diff, multi-repo tabs, read-only, never touches your tree.
|
|
78
78
|
- **Web Preview for URLs and static folders** — preview URLs by phone or computer proxy, or open an isolated static folder, with narrow/wide page widths and zoom; computer proxy can also request a mobile or desktop site version. It embeds pages rather than replacing a full browser.
|
|
79
|
-
- **Docs** — tap recognized text-file paths in the terminal to open them, regardless of extension; ordinary slash-separated prose stays plain. Markdown rendered, font zoom, sentence-by-sentence read-aloud. Binary files stay download-only.
|
|
80
|
-
- **Mobile select & copy** — long-press
|
|
79
|
+
- **Docs** — tap recognized text-file paths in the terminal or Agent tool input/output to open them, regardless of extension; user-home paths appear as `~/…`, while ordinary slash-separated prose stays plain. Markdown rendered, font zoom, sentence-by-sentence read-aloud. Binary files stay download-only.
|
|
80
|
+
- **Mobile select & copy** — long-press text in either the terminal or an Agent conversation, drag iOS-style handles to fine-tune, then copy the exact selection, its rendered line, or its semantic paragraph.
|
|
81
81
|
- **Files both ways** — multi-select upload from the chat box (including ZIP archives), download, share in, copy any absolute path.
|
|
82
82
|
- **Ideas — catch every one** — a thought the moment it strikes: a per-window idea/to-do list, jot one by voice and drop it straight into the prompt.
|
|
83
83
|
- **Built for flaky networks** — backoff reconnect, connection-lost banner, offline page, polling that pauses in the background; a reflow-safe cursor.
|
|
@@ -102,7 +102,7 @@ handmux agent disable claude
|
|
|
102
102
|
handmux agent status codex # ready (built-in) when Codex is installed
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
The legacy `handmux hooks install|uninstall` commands remain compatibility aliases for Claude Code. Pi integration uses a trusted Handmux-owned Extension wrapper for the same native Pi TUI process; enabling it writes only that wrapper under Pi's documented global extension directory and never scans projects or loads third-party extensions. Open a new Pi session, or run `/reload` in Pi, after enabling or disabling it. The wrapper is refreshed automatically across Handmux upgrades,
|
|
105
|
+
The legacy `handmux hooks install|uninstall` commands remain compatibility aliases for Claude Code. Pi integration uses a trusted Handmux-owned Extension wrapper for the same native Pi TUI process; enabling it writes only that wrapper under Pi's documented global extension directory and never scans projects or loads third-party extensions. Open a new Pi session, or run `/reload` in Pi, after enabling or disabling it. The wrapper is refreshed automatically across Handmux upgrades and gives each Connector build a content-fingerprinted import URL, so `/reload` cannot reuse the previous build from the module cache; a file not marked as Handmux-owned is never overwritten or deleted. Pi keeps working normally when the Handmux server is offline; terminal outcomes are queued locally and delivered after it returns. In Pi chat, the shared context ring reads Pi's live context-window usage, activity and working directory; reload an already-running Pi session after upgrading Handmux to expose newly added Connector capabilities.
|
|
106
106
|
|
|
107
107
|
The capability-driven Agent chat downloads attachments only after a tap. Providers register an opaque, session-bound resource ID; the app never receives a local path, and potentially active content such as HTML or SVG is always downloaded rather than rendered inline.
|
|
108
108
|
|
package/README.zh-CN.md
CHANGED
|
@@ -68,7 +68,7 @@ handmux start --tunnel cloudflare # 即时公网地址(自动装 cloudflared)
|
|
|
68
68
|
## 功能一览
|
|
69
69
|
|
|
70
70
|
- **Claude Code / Codex 深度**——收件箱状态台账、拇指批授权批计划,以及所有设备共享的本机最新订阅用量;每个已开启显示的 Provider 都可从卡片操作菜单单独刷新最新额度,厂家暂时不可达时仍保留上一份数值。Codex 还会显示当前账号与套餐、主账号和特定模型的独立额度,以及剩余重置次数与官方提供的各次到期时间。同一个用量页还能在 Handmux 电脑的本机信任边界内静态加密保存多个 DeepSeek 和 Moonshot (Kimi) API 账户,完整 API Key 不会返回浏览器。
|
|
71
|
-
- **对话视图**——通过 App Server 用流式 Markdown 气泡、工具卡、原生 Goal 生命周期卡片和实时状态操作 Codex CLI;上下文圆环详情直接显示 thread `cwd` 所属 Git worktree 的绝对根路径与分支。设置或重新开始会创建全新的 active 原生 Goal,立即在右侧显示用户侧卡片并启动 Codex 自带的自动续跑。进行中或暂停的 Goal 常驻在实时任务列表下方,Codex 终态反馈留在对应回合并靠左,所有入口统一打开同一个 Bottom Sheet;当前 Goal 使用 iOS 风格单行等分操作,清除后会移除常驻目标并关闭详情,已经发生的历史卡片仍保留;当前终态 Goal 可修改内容后重新开始。长回答会稳定在开头供阅读,用户可随时回到最新内容;现有 pane 可原位接入。所有可发送 Agent 共用同一套持久服务端队列:待发消息可查看、编辑、删除并自动发送,只有 Agent 支持 steer
|
|
71
|
+
- **对话视图**——通过 App Server 用流式 Markdown 气泡、工具卡、原生 Goal 生命周期卡片和实时状态操作 Codex CLI;上下文圆环详情直接显示 thread `cwd` 所属 Git worktree 的绝对根路径与分支。设置或重新开始会创建全新的 active 原生 Goal,立即在右侧显示用户侧卡片并启动 Codex 自带的自动续跑。进行中或暂停的 Goal 常驻在实时任务列表下方,Codex 终态反馈留在对应回合并靠左,所有入口统一打开同一个 Bottom Sheet;当前 Goal 使用 iOS 风格单行等分操作,清除后会移除常驻目标并关闭详情,已经发生的历史卡片仍保留;当前终态 Goal 可修改内容后重新开始。长回答会稳定在开头供阅读,用户可随时回到最新内容;现有 pane 可原位接入。所有可发送 Agent 共用同一套持久服务端队列:待发消息可查看、编辑、删除并自动发送,只有 Agent 支持 steer 时才显示“立刻引导”。发送失败的消息会保留,并沿用同一个请求 ID 重试;若对账后仍无法确认是否送达,消息会回到对话中,由你决定是否作为新消息再次发送,同时明确提示可能重复送达。电脑端可用 <kbd>Shift</kbd>+<kbd>Enter</kbd> 聚焦输入框,聚焦后该组合键换行,<kbd>Enter</kbd> 发送,<kbd>Esc</kbd> 只取消聚焦而不会停止 Agent。Codex 对话为稳定功能;Claude Code 与 Pi 对话均需独立开启,且仍为实验性功能。
|
|
72
72
|
- **实时终端 + 电脑键盘**——在手机和电脑上实时操控同一个 tmux pane,支持历史滚动、弱网回退、物理键盘直输和原生复制粘贴。
|
|
73
73
|
- **命令 / 聊天双模式**——在终端直输与自然语言对话间切换;手机命令键盘提供直接可用的 Alt 与空格键,并可用跨设备同步的快捷栏快速操作。
|
|
74
74
|
- **更新后重新加载客户端**——服务端更新完成后,在设置里点「重新加载应用」即可载入新版客户端,无需退出主屏应用再重新打开。
|
|
@@ -77,7 +77,7 @@ handmux start --tunnel cloudflare # 即时公网地址(自动装 cloudflared)
|
|
|
77
77
|
- **Git 查看器**——改动 / 提交历史 / 任意分支 / 全屏彩色 diff,多仓库分页,只读不动工作区。
|
|
78
78
|
- **网页预览器**——用手机直连或电脑代理预览网址,也可隔离打开静态目录,支持窄屏 / 宽屏和缩放;电脑代理还可向网站请求手机版或电脑版。它只嵌入网页,不替代完整浏览器。
|
|
79
79
|
- **文档**——终端里明确识别出的文本文件路径不分扩展名均可点开,普通斜杠文字保持纯文本;支持 Markdown 排版、字号缩放、逐句高亮朗读,二进制文件仍只下载。
|
|
80
|
-
- **选中 ·
|
|
80
|
+
- **选中 · 拷贝**——终端和 Agent 对话都可长按文字、拖动 iOS 式首尾手柄精调,再拷贝指定内容、屏幕整行或语义整段。
|
|
81
81
|
- **文件双向传**——聊天框多选上传(含 ZIP 压缩包)、下载、系统分享进来、复制绝对路径。
|
|
82
82
|
- **想法 · 随想随记**——不错过任何点子:每窗口一份想法清单,灵感一冒就记(能语音速记),一点填进输入框。
|
|
83
83
|
- **专治弱网**——退避重连、掉线横幅、离线兜底页、后台暂停轮询;光标不乱跳。
|
|
@@ -102,7 +102,7 @@ handmux agent disable claude
|
|
|
102
102
|
handmux agent status codex # 已安装 Codex 时就绪(接入已内置)
|
|
103
103
|
```
|
|
104
104
|
|
|
105
|
-
旧的 `handmux hooks install|uninstall` 暂作 Claude Code 兼容别名。Pi 接入使用受信任的 Handmux 自有 Extension wrapper,连接的仍是电脑上同一个原生 Pi TUI 进程;启用时只在 Pi 官方全局 Extension 目录写入这一个 wrapper,不扫描项目,也不加载第三方扩展。启用或禁用后,新开 Pi 会话,或在 Pi 中运行 `/reload`。Handmux 升级后会自动刷新已启用的自有 wrapper
|
|
105
|
+
旧的 `handmux hooks install|uninstall` 暂作 Claude Code 兼容别名。Pi 接入使用受信任的 Handmux 自有 Extension wrapper,连接的仍是电脑上同一个原生 Pi TUI 进程;启用时只在 Pi 官方全局 Extension 目录写入这一个 wrapper,不扫描项目,也不加载第三方扩展。启用或禁用后,新开 Pi 会话,或在 Pi 中运行 `/reload`。Handmux 升级后会自动刷新已启用的自有 wrapper,并为每份 Connector 内容生成带指纹的 import URL,避免 `/reload` 复用模块缓存里的旧版本;没有 Handmux 所有权标记的文件绝不会被覆盖或删除。Handmux Server 离线时 Pi 仍可正常使用,终态结果会先在本机排队,Server 恢复后再补交。Pi 对话使用通用上下文圆环显示 Pi 的实时上下文用量、运行状态和工作目录;Handmux 升级后,已在运行的 Pi 会话需执行 `/reload` 才能获得新增的 Connector 能力。
|
|
106
106
|
|
|
107
107
|
通用 Agent 对话中的附件只在用户点按后下载。Provider 只注册与会话绑定的 opaque resource ID,手机不会收到本机路径;HTML、SVG 等潜在主动内容始终作为附件下载,不在页面内直接渲染。
|
|
108
108
|
|
|
@@ -8,7 +8,7 @@ import { normalizePiCommandTool, projectPiLiveItems, } from '../../src/agents/pi
|
|
|
8
8
|
// Increment when a running Pi Extension must be reloaded to satisfy the Connector contract.
|
|
9
9
|
// The Server treats an absent version as the legacy v1 implementation and surfaces one actionable
|
|
10
10
|
// reload notice instead of silently continuing with stale message/inbox behavior.
|
|
11
|
-
const PI_CONNECTOR_IMPLEMENTATION_VERSION =
|
|
11
|
+
const PI_CONNECTOR_IMPLEMENTATION_VERSION = 7;
|
|
12
12
|
const PI_THINKING_LEVELS = [
|
|
13
13
|
'off', 'minimal', 'low', 'medium', 'high', 'xhigh', 'max',
|
|
14
14
|
];
|
|
@@ -67,6 +67,20 @@ function modelControlSnapshot(pi, context) {
|
|
|
67
67
|
},
|
|
68
68
|
};
|
|
69
69
|
}
|
|
70
|
+
function conversationContextSnapshot(context) {
|
|
71
|
+
const usage = context.getContextUsage?.();
|
|
72
|
+
const usedTokens = typeof usage?.tokens === 'number' && Number.isFinite(usage.tokens)
|
|
73
|
+
&& usage.tokens >= 0 ? usage.tokens : undefined;
|
|
74
|
+
const totalTokens = typeof usage?.contextWindow === 'number' && Number.isFinite(usage.contextWindow)
|
|
75
|
+
&& usage.contextWindow > 0 ? usage.contextWindow : undefined;
|
|
76
|
+
const hasUsage = usedTokens !== undefined && totalTokens !== undefined;
|
|
77
|
+
const cwd = typeof context.cwd === 'string' && context.cwd.trim() ? context.cwd : undefined;
|
|
78
|
+
return {
|
|
79
|
+
activity: context.isIdle() ? 'idle' : 'working',
|
|
80
|
+
...(hasUsage ? { usedTokens, totalTokens } : {}),
|
|
81
|
+
...(cwd === undefined ? {} : { cwd }),
|
|
82
|
+
};
|
|
83
|
+
}
|
|
70
84
|
function boundedText(value, max = 1024 * 1024) {
|
|
71
85
|
return typeof value === 'string' && value.length > 0 && value.length <= max;
|
|
72
86
|
}
|
|
@@ -414,6 +428,7 @@ export default function handmuxPiExtension(pi) {
|
|
|
414
428
|
...(idle ? { completionToken: `pi-completed:${session.turn}` } : {}),
|
|
415
429
|
};
|
|
416
430
|
});
|
|
431
|
+
client.handle('conversation', 'context', () => conversationContextSnapshot(session.context));
|
|
417
432
|
client.handle('conversation', 'send', async (payload, requestContext) => {
|
|
418
433
|
const request = record(payload);
|
|
419
434
|
if (!request || !boundedText(request.text, 256 * 1024)
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "handmux",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.26.0",
|
|
4
4
|
"description": "A mobile vibe-coding cockpit — built on tmux: drive your live session, Claude Code / Codex — anything a terminal can run — from your phone.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"license": "AGPL-3.0-only",
|
|
@@ -75,6 +75,18 @@
|
|
|
75
75
|
"vitest": "^2.0.0"
|
|
76
76
|
},
|
|
77
77
|
"whatsNew": [
|
|
78
|
+
{
|
|
79
|
+
"version": "0.26.0",
|
|
80
|
+
"date": "2026-09-04",
|
|
81
|
+
"zh": "对话精细复制 · Pi 上下文状态",
|
|
82
|
+
"en": "Precise chat copy · Pi context status"
|
|
83
|
+
},
|
|
84
|
+
{
|
|
85
|
+
"version": "0.25.2",
|
|
86
|
+
"date": "2026-09-02",
|
|
87
|
+
"zh": "修复 Agent 对话断流、排队与工具路径",
|
|
88
|
+
"en": "Fixed Agent chat streams, queues, and tool paths"
|
|
89
|
+
},
|
|
78
90
|
{
|
|
79
91
|
"version": "0.25.1",
|
|
80
92
|
"date": "2026-09-02",
|
|
@@ -110,18 +122,6 @@
|
|
|
110
122
|
"date": "2026-08-03",
|
|
111
123
|
"zh": "全屏设置 · 窗口与分屏管理更清晰",
|
|
112
124
|
"en": "Full-screen Settings · clearer window and pane management"
|
|
113
|
-
},
|
|
114
|
-
{
|
|
115
|
-
"version": "0.21.0",
|
|
116
|
-
"date": "2026-08-03",
|
|
117
|
-
"zh": "网页预览:手机直连、电脑代理与静态目录",
|
|
118
|
-
"en": "Web preview: direct, computer proxy, and static folders"
|
|
119
|
-
},
|
|
120
|
-
{
|
|
121
|
-
"version": "0.20.3",
|
|
122
|
-
"date": "2026-08-01",
|
|
123
|
-
"zh": "实时终端显示更稳定流畅",
|
|
124
|
-
"en": "More stable, smoother live terminals"
|
|
125
125
|
}
|
|
126
126
|
]
|
|
127
127
|
}
|