handmux 0.25.2 → 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 CHANGED
@@ -77,7 +77,7 @@ handmux start --tunnel cloudflare # instant public URL (cloudflared auto-insta
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
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 to select in the terminal, drag iOS-style handles to fine-tune, copy the selection / a whole line / a whole paragraph.
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, but 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.
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
@@ -77,7 +77,7 @@ handmux start --tunnel cloudflare # 即时公网地址(自动装 cloudflared)
77
77
  - **Git 查看器**——改动 / 提交历史 / 任意分支 / 全屏彩色 diff,多仓库分页,只读不动工作区。
78
78
  - **网页预览器**——用手机直连或电脑代理预览网址,也可隔离打开静态目录,支持窄屏 / 宽屏和缩放;电脑代理还可向网站请求手机版或电脑版。它只嵌入网页,不替代完整浏览器。
79
79
  - **文档**——终端里明确识别出的文本文件路径不分扩展名均可点开,普通斜杠文字保持纯文本;支持 Markdown 排版、字号缩放、逐句高亮朗读,二进制文件仍只下载。
80
- - **选中 · 拷贝**——终端里长按选中,拖 iOS 式手柄精调,一键拷贝选区 / 整行 / 整段。
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;没有 Handmux 所有权标记的文件绝不会被覆盖或删除。Handmux Server 离线时 Pi 仍可正常使用,终态结果会先在本机排队,Server 恢复后再补交。
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 = 6;
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.25.2",
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,12 @@
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
+ },
78
84
  {
79
85
  "version": "0.25.2",
80
86
  "date": "2026-09-02",
@@ -116,12 +122,6 @@
116
122
  "date": "2026-08-03",
117
123
  "zh": "全屏设置 · 窗口与分屏管理更清晰",
118
124
  "en": "Full-screen Settings · clearer window and pane management"
119
- },
120
- {
121
- "version": "0.21.0",
122
- "date": "2026-08-03",
123
- "zh": "网页预览:手机直连、电脑代理与静态目录",
124
- "en": "Web preview: direct, computer proxy, and static folders"
125
125
  }
126
126
  ]
127
127
  }