@testany/hephos 0.3.16 → 0.3.17

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@testany/hephos",
3
- "version": "0.3.16",
3
+ "version": "0.3.17",
4
4
  "description": "Hephos - full CLI+REPL bundle for multi-agent conversation orchestration (depends on agent-chatter core)",
5
5
  "type": "module",
6
6
  "main": "./out/cli.js",
@@ -28,7 +28,7 @@
28
28
  "@testany/agent-chatter-core": "^1.1.6",
29
29
  "chalk": "^5.6.2",
30
30
  "commander": "^14.0.2",
31
- "ink": "npm:@jrichman/ink@^6.4.3",
31
+ "ink": "npm:@jrichman/ink@6.4.6",
32
32
  "ink-text-input": "^6.0.0",
33
33
  "inquirer": "^9.3.8",
34
34
  "inquirer-autocomplete-standalone": "^0.8.1",
@@ -39,6 +39,7 @@
39
39
  "@types/node": "^20.0.0",
40
40
  "@types/react": "^19.2.5",
41
41
  "ink-testing-library": "^4.0.0",
42
+ "patch-package": "^8.0.1",
42
43
  "typescript": "^5.3.0",
43
44
  "vitest": "^4.0.9"
44
45
  },
@@ -0,0 +1,16 @@
1
+ diff --git a/node_modules/ink/build/parse-keypress.js b/node_modules/ink/build/parse-keypress.js
2
+ index 1e13e81..9788ab3 100644
3
+ --- a/node_modules/ink/build/parse-keypress.js
4
+ +++ b/node_modules/ink/build/parse-keypress.js
5
+ @@ -161,9 +161,8 @@ const parseKeypress = (s = '') => {
6
+ key.meta = s.charAt(0) === '\x1b';
7
+ }
8
+ else if (s === '\x7f' || s === '\x1b\x7f') {
9
+ - // TODO(vadimdemedes): `enquirer` detects delete key as backspace, but I had to split them up to avoid breaking changes in Ink. Merge them back together in the next major version.
10
+ - // delete
11
+ - key.name = 'delete';
12
+ + // DEL (0x7f) is sent by Backspace in most terminals
13
+ + key.name = 'backspace';
14
+ key.meta = s.charAt(0) === '\x1b';
15
+ }
16
+ else if (s === '\x1b' || s === '\x1b\x1b') {
@@ -1,8 +1,8 @@
1
1
  diff --git a/node_modules/ink-text-input/build/index.js b/node_modules/ink-text-input/build/index.js
2
- index ada7cdc..0cf95d2 100644
2
+ index ada7cdc..58b0342 100644
3
3
  --- a/node_modules/ink-text-input/build/index.js
4
4
  +++ b/node_modules/ink-text-input/build/index.js
5
- @@ -73,11 +73,32 @@ function TextInput({ value: originalValue, placeholder = '', focus = true, mask,
5
+ @@ -73,11 +73,24 @@ function TextInput({ value: originalValue, placeholder = '', focus = true, mask,
6
6
  }
7
7
  }
8
8
  else if (key.backspace || key.delete) {
@@ -11,16 +11,8 @@ index ada7cdc..0cf95d2 100644
11
11
  - originalValue.slice(0, cursorOffset - 1) +
12
12
  - originalValue.slice(cursorOffset, originalValue.length);
13
13
  - nextCursorOffset--;
14
- + // Normalize Backspace vs Delete using raw sequence (similar to Gemini's approach)
15
- + //
16
- + // - Terminals often send DEL (0x7f) for Backspace; ink may label it as delete
17
- + // - Real Delete key usually sends ESC [3~
18
- + // - Ctrl+H maps to key.backspace
19
- + const sequence = key.sequence || input || '';
20
- + const isBackspace = key.backspace === true || sequence === '\x7f'; // delete left
21
- + const isDelete = key.delete === true || sequence === '\x1b[3~'; // delete right
22
- +
23
- + if (isBackspace) {
14
+ + // With patched ink, key.backspace = Backspace key, key.delete = Delete key
15
+ + if (key.backspace) {
24
16
  + // Backspace: delete character BEFORE cursor
25
17
  + if (cursorOffset > 0) {
26
18
  + nextValue =
@@ -29,7 +21,7 @@ index ada7cdc..0cf95d2 100644
29
21
  + nextCursorOffset--;
30
22
  + }
31
23
  + }
32
- + else if (isDelete) {
24
+ + else if (key.delete) {
33
25
  + // Delete: delete character AT cursor position
34
26
  + if (cursorOffset < originalValue.length) {
35
27
  + nextValue =