@hydra-acp/cli 0.1.26 → 0.1.27

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.
Files changed (2) hide show
  1. package/dist/cli.js +36 -0
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -6991,6 +6991,42 @@ var init_screen = __esm({
6991
6991
  return;
6992
6992
  }
6993
6993
  }
6994
+ const csiUCtrlMap = {
6995
+ 97: "ctrl-a",
6996
+ 98: "ctrl-b",
6997
+ 99: "ctrl-c",
6998
+ 100: "ctrl-d",
6999
+ 101: "ctrl-e",
7000
+ 102: "ctrl-f",
7001
+ 103: "ctrl-g",
7002
+ 107: "ctrl-k",
7003
+ 108: "ctrl-l",
7004
+ 110: "ctrl-n",
7005
+ 111: "ctrl-o",
7006
+ 112: "ctrl-p",
7007
+ 114: "ctrl-r",
7008
+ 115: "ctrl-s",
7009
+ 116: "ctrl-t",
7010
+ 117: "ctrl-u",
7011
+ 118: "ctrl-v",
7012
+ 119: "ctrl-w",
7013
+ 121: "ctrl-y"
7014
+ };
7015
+ const csiUCtrlRe = /\x1b\[(\d+);5u/;
7016
+ const m = csiUCtrlRe.exec(text);
7017
+ if (m !== null) {
7018
+ const keyName = csiUCtrlMap[parseInt(m[1], 10)];
7019
+ if (keyName !== void 0) {
7020
+ const parts = text.split(m[0]);
7021
+ for (let i = 0; i < parts.length; i++) {
7022
+ if (parts[i].length > 0)
7023
+ this.handleRawStdin(Buffer.from(parts[i], "binary"));
7024
+ if (i < parts.length - 1)
7025
+ this.onKey([{ type: "key", name: keyName }]);
7026
+ }
7027
+ return;
7028
+ }
7029
+ }
6994
7030
  }
6995
7031
  this.handleRawStdinSegment(text);
6996
7032
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hydra-acp/cli",
3
- "version": "0.1.26",
3
+ "version": "0.1.27",
4
4
  "description": "Multi-client ACP session daemon: spawn agents, attach over WSS, multiplex sessions across editors.",
5
5
  "license": "MIT",
6
6
  "type": "module",