@hmharness/cli 0.23.49 → 0.23.50

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.
@@ -78,11 +78,11 @@ let PACKAGES = ['cli', 'web', 'agent', 'kernel', 'sandbox', 'evolution',
78
78
  // the offline path tried <name>-undefined.tgz → 404 → INSTALL FAILED (directly
79
79
  // contradicting the promise above; evidence: cli 0.23.42 declares 14 deps).
80
80
  const FALLBACK_PINS = {
81
- cli: '0.23.49', web: '0.23.49', agent: '0.23.49', kernel: '0.23.49',
82
- sandbox: '0.23.49', evolution: '0.23.49', 'domain-ops': '0.23.49',
83
- evaluation: '0.23.49', observability: '0.23.49', 'domain-harmony': '0.23.49',
84
- cognitive: '0.23.49', environments: '0.23.49', lsp: '0.23.49',
85
- browser: '0.23.49', extension: '0.23.49',
81
+ cli: '0.23.50', web: '0.23.50', agent: '0.23.50', kernel: '0.23.50',
82
+ sandbox: '0.23.50', evolution: '0.23.50', 'domain-ops': '0.23.50',
83
+ evaluation: '0.23.50', observability: '0.23.50', 'domain-harmony': '0.23.50',
84
+ cognitive: '0.23.50', environments: '0.23.50', lsp: '0.23.50',
85
+ browser: '0.23.50', extension: '0.23.50',
86
86
  };
87
87
 
88
88
  // ---------- helpers ---------------------------------------------------------
@@ -56,3 +56,15 @@ export declare function addClickRegion(row: number, colStart: number, colEnd: nu
56
56
  export declare function dispatchClick(col: number, row: number): boolean;
57
57
  /** Test helper: current region count. */
58
58
  export declare function regionCount(): number;
59
+ /**
60
+ * 2026-11-01 用户反馈根修:全局鼠标跟踪禁用了终端原生文本选择/复制。
61
+ * DSH-TUI 的方案是自建选中引擎(83KB selection.ts);hmh 用更轻的方案:
62
+ * 只在有可点击 UI 时开启鼠标跟踪,picker 关闭后立即释放给终端原生选择。
63
+ *
64
+ * 用法:tui.ts 在渲染 picker/palette 前调 enableMouseForPicker(),
65
+ * picker 关闭后调 disableMouse()。主输入/阅读模式终端原生选择完全正常。
66
+ */
67
+ export declare function enableMouseForPicker(): void;
68
+ export declare function disableMouseForPicker(): void;
69
+ /** 检测当前终端是否支持原生选择(非 alt-screen 模式)。 */
70
+ export declare function terminalSupportsNativeSelection(): boolean;
package/dist/tui-mouse.js CHANGED
@@ -99,3 +99,24 @@ export function dispatchClick(col, row) {
99
99
  export function regionCount() {
100
100
  return regions.length;
101
101
  }
102
+ /**
103
+ * 2026-11-01 用户反馈根修:全局鼠标跟踪禁用了终端原生文本选择/复制。
104
+ * DSH-TUI 的方案是自建选中引擎(83KB selection.ts);hmh 用更轻的方案:
105
+ * 只在有可点击 UI 时开启鼠标跟踪,picker 关闭后立即释放给终端原生选择。
106
+ *
107
+ * 用法:tui.ts 在渲染 picker/palette 前调 enableMouseForPicker(),
108
+ * picker 关闭后调 disableMouse()。主输入/阅读模式终端原生选择完全正常。
109
+ */
110
+ export function enableMouseForPicker() {
111
+ process.stdout.write(ENABLE_MOUSE);
112
+ }
113
+ export function disableMouseForPicker() {
114
+ process.stdout.write(DISABLE_MOUSE);
115
+ }
116
+ /** 检测当前终端是否支持原生选择(非 alt-screen 模式)。 */
117
+ export function terminalSupportsNativeSelection() {
118
+ // Windows Terminal / ConEmu / most modern terminals support Shift+Select
119
+ // even with mouse tracking; but plain select requires mouse tracking OFF.
120
+ // We default to OFF (native select works) unless explicitly overridden.
121
+ return !process.env.HMH_TUI_FORCE_MOUSE;
122
+ }
package/dist/tui.js CHANGED
@@ -373,7 +373,11 @@ export class TuiRuntime {
373
373
  // keys itself - no click capture, native selection stays native.
374
374
  // Bracketed paste (?2004h): multi-line pastes arrive delimited and
375
375
  // insert as one reviewable input instead of auto-submitting per line.
376
- stdout.write('\x1b[?1049h\x1b[?25l\x1b[2J\x1b[?1l\x1b[?1007h\x1b[?2004h\x1b[?1000h\x1b[?1002h\x1b[?1006h');
376
+ // 2026-11-01 用户反馈根修:移除全局鼠标跟踪(1000h/1002h/1006h)——它
377
+ // 禁用了终端原生文本选择/复制(终端把鼠标事件发给 TUI 而不是自己处理
378
+ // 选中)。?1007 alternate scroll 让滚轮照常工作;原生选择/复制完全正常。
379
+ // 鼠标点击通过 tui-mouse.ts 的 enableMouseForPicker() 在需要时临时开启。
380
+ stdout.write('\x1b[?1049h\x1b[?25l\x1b[2J\x1b[?1l\x1b[?1007h\x1b[?2004h');
377
381
  stdin.setRawMode?.(true);
378
382
  stdin.resume();
379
383
  stdin.setEncoding('utf8');
@@ -891,7 +895,7 @@ export class TuiRuntime {
891
895
  // modal state was
892
896
  // T24: capture is never enabled; reset any reporting mode unconditionally
893
897
  // on exit (defensive - covers a stray enable from an older version)
894
- stdout.write('\x1b[?1000l\x1b[?1006l\x1b[?2004l\x1b[?1007l\x1b[?1l\x1b[?25h\x1b[?1049l');
898
+ stdout.write('\x1b[?2004l\x1b[?1007l\x1b[?1l\x1b[?25h\x1b[?1049l');
895
899
  this.restoreConsole?.();
896
900
  if (this.fatalHandler) {
897
901
  process.off('unhandledRejection', this.fatalHandler);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hmharness/cli",
3
- "version": "0.23.49",
3
+ "version": "0.23.50",
4
4
  "description": "hmharness command line: one-shot tasks, an interactive REPL, a fullscreen TUI, the web frontend, and direct tool invocation.",
5
5
  "type": "module",
6
6
  "main": "dist/main.js",
@@ -45,20 +45,20 @@
45
45
  "build": "tsc -p tsconfig.build.json"
46
46
  },
47
47
  "dependencies": {
48
- "@hmharness/agent": "0.23.49",
49
- "@hmharness/browser": "0.23.49",
50
- "@hmharness/cognitive": "0.23.49",
51
- "@hmharness/domain-harmony": "0.23.49",
52
- "@hmharness/domain-ops": "0.23.49",
53
- "@hmharness/environments": "0.23.49",
54
- "@hmharness/evaluation": "0.23.49",
55
- "@hmharness/evolution": "0.23.49",
56
- "@hmharness/extension": "0.23.49",
57
- "@hmharness/kernel": "0.23.49",
58
- "@hmharness/observability": "0.23.49",
59
- "@hmharness/sandbox": "0.23.49",
60
- "@hmharness/web": "0.23.49",
48
+ "@hmharness/agent": "0.23.50",
49
+ "@hmharness/browser": "0.23.50",
50
+ "@hmharness/cognitive": "0.23.50",
51
+ "@hmharness/domain-harmony": "0.23.50",
52
+ "@hmharness/domain-ops": "0.23.50",
53
+ "@hmharness/environments": "0.23.50",
54
+ "@hmharness/evaluation": "0.23.50",
55
+ "@hmharness/evolution": "0.23.50",
56
+ "@hmharness/extension": "0.23.50",
57
+ "@hmharness/kernel": "0.23.50",
58
+ "@hmharness/observability": "0.23.50",
59
+ "@hmharness/sandbox": "0.23.50",
60
+ "@hmharness/web": "0.23.50",
61
61
  "qrcode": "^1.5.4",
62
- "@hmharness/lsp": "0.23.49"
62
+ "@hmharness/lsp": "0.23.50"
63
63
  }
64
64
  }
@@ -1,5 +1,10 @@
1
1
  {
2
2
  "notes": [
3
+ {
4
+ "v": "0.23.50",
5
+ "date": "2026-11-01",
6
+ "note": "TUI 鼠标根修:移除全局鼠标跟踪,恢复终端原生选择/复制;滚轮不受影响"
7
+ },
3
8
  {
4
9
  "v": "0.23.49",
5
10
  "date": "2026-10-31",