agent-yes 1.125.0 → 1.127.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/dist/{SUPPORTED_CLIS-gldLvxxn.js → SUPPORTED_CLIS-AaS7DGaZ.js} +2 -2
- package/dist/SUPPORTED_CLIS-B8xjJZfI.js +8 -0
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{schedule-BB-l_J5d.js → schedule-Cl0GOwj0.js} +4 -4
- package/dist/{serve-Ch_WYsPB.js → serve-BtmFJZ06.js} +5 -5
- package/dist/{setup-BMo2EhUJ.js → setup-C1kPJD79.js} +2 -2
- package/dist/{subcommands-C1vGCBlc.js → subcommands-B9oZdbLM.js} +4 -4
- package/dist/{subcommands-C13_tHG5.js → subcommands-DtXVoO1S.js} +1 -1
- package/dist/{ts-Dlf0U2sb.js → ts-C6kjiGpb.js} +2 -2
- package/dist/{versionChecker-DY4oPzQl.js → versionChecker-ilGsD2LH.js} +2 -2
- package/lab/ui/index.html +111 -41
- package/package.json +1 -1
- package/dist/SUPPORTED_CLIS-DNtSBnm9.js +0 -8
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-C6kjiGpb.js";
|
|
2
2
|
|
|
3
3
|
//#region ts/SUPPORTED_CLIS.ts
|
|
4
4
|
const SUPPORTED_CLIS = Object.keys(CLIS_CONFIG);
|
|
5
5
|
|
|
6
6
|
//#endregion
|
|
7
7
|
export { SUPPORTED_CLIS as t };
|
|
8
|
-
//# sourceMappingURL=SUPPORTED_CLIS-
|
|
8
|
+
//# sourceMappingURL=SUPPORTED_CLIS-AaS7DGaZ.js.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-C6kjiGpb.js";
|
|
2
|
+
import "./logger-B9h0djqx.js";
|
|
3
|
+
import "./versionChecker-ilGsD2LH.js";
|
|
4
|
+
import "./pidStore-CGKIhaJO.js";
|
|
5
|
+
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-AaS7DGaZ.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
package/dist/cli.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { n as logger } from "./logger-B9h0djqx.js";
|
|
3
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
3
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-ilGsD2LH.js";
|
|
4
4
|
import { argv } from "process";
|
|
5
5
|
import { execFileSync, spawn } from "child_process";
|
|
6
6
|
import ms from "ms";
|
|
@@ -482,7 +482,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
482
482
|
{
|
|
483
483
|
const rawArg = process.argv[2];
|
|
484
484
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
485
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
485
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DtXVoO1S.js");
|
|
486
486
|
if (isHelpFlag && process.argv.length === 3) {
|
|
487
487
|
cmdHelp();
|
|
488
488
|
process.exit(0);
|
|
@@ -515,7 +515,7 @@ if (config.useRust) {
|
|
|
515
515
|
}
|
|
516
516
|
}
|
|
517
517
|
if (rustBinary) {
|
|
518
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
518
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-B8xjJZfI.js");
|
|
519
519
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
520
520
|
if (config.verbose) {
|
|
521
521
|
console.log(`[rust] Using binary: ${rustBinary}`);
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { a as removeControlCharacters, i as AgentContext, n as agentYes, r as config, t as CLIS_CONFIG } from "./ts-C6kjiGpb.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-ilGsD2LH.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-C6kjiGpb.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-ilGsD2LH.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-AaS7DGaZ.js";
|
|
7
7
|
import { n as resolveSpawnCwd } from "./workspaceConfig-BJO4fzEn.js";
|
|
8
8
|
import { createHash } from "node:crypto";
|
|
9
9
|
|
|
@@ -141,4 +141,4 @@ async function cmdSchedule(rest) {
|
|
|
141
141
|
|
|
142
142
|
//#endregion
|
|
143
143
|
export { cmdSchedule };
|
|
144
|
-
//# sourceMappingURL=schedule-
|
|
144
|
+
//# sourceMappingURL=schedule-Cl0GOwj0.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-C6kjiGpb.js";
|
|
2
2
|
import "./logger-B9h0djqx.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-ilGsD2LH.js";
|
|
4
4
|
import "./pidStore-CGKIhaJO.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-C7r2m6s7.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-BkjPN7mw.js";
|
|
7
7
|
import "./configShared-C5QaNPnz.js";
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-AaS7DGaZ.js";
|
|
9
9
|
import "./remotes-D8GvSbhf.js";
|
|
10
|
-
import { f as readNotes, g as snapshotStatus, m as resolveOne, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, u as listRecords, v as writeToIpc } from "./subcommands-
|
|
10
|
+
import { f as readNotes, g as snapshotStatus, m as resolveOne, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, u as listRecords, v as writeToIpc } from "./subcommands-B9oZdbLM.js";
|
|
11
11
|
import yargs from "yargs";
|
|
12
12
|
import { mkdir, open, readFile, stat, writeFile } from "fs/promises";
|
|
13
13
|
import { homedir, hostname, userInfo } from "os";
|
|
@@ -1107,4 +1107,4 @@ Options:
|
|
|
1107
1107
|
|
|
1108
1108
|
//#endregion
|
|
1109
1109
|
export { cmdServe };
|
|
1110
|
-
//# sourceMappingURL=serve-
|
|
1110
|
+
//# sourceMappingURL=serve-BtmFJZ06.js.map
|
|
@@ -32,7 +32,7 @@ async function cmdSetup(rest) {
|
|
|
32
32
|
if (!existsSync(abs)) process.stderr.write(` note: that directory doesn't exist yet — create it, or agents spawned there will fail\n`);
|
|
33
33
|
if (noShare) return 0;
|
|
34
34
|
process.stdout.write(`\nsharing this machine to agent-yes.com…\n`);
|
|
35
|
-
const { cmdServe } = await import("./serve-
|
|
35
|
+
const { cmdServe } = await import("./serve-BtmFJZ06.js");
|
|
36
36
|
return cmdServe([
|
|
37
37
|
"install",
|
|
38
38
|
"--share",
|
|
@@ -42,4 +42,4 @@ async function cmdSetup(rest) {
|
|
|
42
42
|
|
|
43
43
|
//#endregion
|
|
44
44
|
export { cmdSetup };
|
|
45
|
-
//# sourceMappingURL=setup-
|
|
45
|
+
//# sourceMappingURL=setup-C1kPJD79.js.map
|
|
@@ -524,15 +524,15 @@ async function runSubcommand(argv) {
|
|
|
524
524
|
case "restart": return await cmdRestart(rest);
|
|
525
525
|
case "note": return await cmdNote(rest);
|
|
526
526
|
case "serve": {
|
|
527
|
-
const { cmdServe } = await import("./serve-
|
|
527
|
+
const { cmdServe } = await import("./serve-BtmFJZ06.js");
|
|
528
528
|
return cmdServe(rest);
|
|
529
529
|
}
|
|
530
530
|
case "setup": {
|
|
531
|
-
const { cmdSetup } = await import("./setup-
|
|
531
|
+
const { cmdSetup } = await import("./setup-C1kPJD79.js");
|
|
532
532
|
return cmdSetup(rest);
|
|
533
533
|
}
|
|
534
534
|
case "schedule": {
|
|
535
|
-
const { cmdSchedule } = await import("./schedule-
|
|
535
|
+
const { cmdSchedule } = await import("./schedule-Cl0GOwj0.js");
|
|
536
536
|
return cmdSchedule(rest);
|
|
537
537
|
}
|
|
538
538
|
case "remote": {
|
|
@@ -2304,4 +2304,4 @@ async function cmdResultSet(rest) {
|
|
|
2304
2304
|
|
|
2305
2305
|
//#endregion
|
|
2306
2306
|
export { stopTipForCli as _, extractNeedsInput as a, isPidAlive as c, matchKeyword as d, readNotes as f, snapshotStatus as g, runSubcommand as h, cursorAbs as i, isSubcommand as l, resolveOne as m, cmdHelp as n, extractTaskCounts as o, renderRawLog as p, controlCodeFromName as r, finalizedLines as s, GRACEFUL_EXIT_COMMANDS as t, listRecords as u, writeToIpc as v };
|
|
2307
|
-
//# sourceMappingURL=subcommands-
|
|
2307
|
+
//# sourceMappingURL=subcommands-B9oZdbLM.js.map
|
|
@@ -2,6 +2,6 @@ import "./logger-B9h0djqx.js";
|
|
|
2
2
|
import "./globalPidIndex-C7r2m6s7.js";
|
|
3
3
|
import "./configShared-C5QaNPnz.js";
|
|
4
4
|
import "./remotes-D8GvSbhf.js";
|
|
5
|
-
import { _ as stopTipForCli, a as extractNeedsInput, c as isPidAlive, d as matchKeyword, f as readNotes, g as snapshotStatus, h as runSubcommand, i as cursorAbs, l as isSubcommand, m as resolveOne, n as cmdHelp, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, s as finalizedLines, t as GRACEFUL_EXIT_COMMANDS, u as listRecords, v as writeToIpc } from "./subcommands-
|
|
5
|
+
import { _ as stopTipForCli, a as extractNeedsInput, c as isPidAlive, d as matchKeyword, f as readNotes, g as snapshotStatus, h as runSubcommand, i as cursorAbs, l as isSubcommand, m as resolveOne, n as cmdHelp, o as extractTaskCounts, p as renderRawLog, r as controlCodeFromName, s as finalizedLines, t as GRACEFUL_EXIT_COMMANDS, u as listRecords, v as writeToIpc } from "./subcommands-B9oZdbLM.js";
|
|
6
6
|
|
|
7
7
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-B9h0djqx.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-ilGsD2LH.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-BvaUOzCV.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-CJxsoGdb.js";
|
|
5
5
|
import { t as PidStore } from "./pidStore-CGKIhaJO.js";
|
|
@@ -1787,4 +1787,4 @@ function sleep(ms) {
|
|
|
1787
1787
|
|
|
1788
1788
|
//#endregion
|
|
1789
1789
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1790
|
-
//# sourceMappingURL=ts-
|
|
1790
|
+
//# sourceMappingURL=ts-C6kjiGpb.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "agent-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.127.0";
|
|
11
11
|
|
|
12
12
|
//#endregion
|
|
13
13
|
//#region ts/versionChecker.ts
|
|
@@ -215,4 +215,4 @@ async function displayVersion() {
|
|
|
215
215
|
|
|
216
216
|
//#endregion
|
|
217
217
|
export { versionString as i, displayVersion as n, getInstalledPackage as r, checkAndAutoUpdate as t };
|
|
218
|
-
//# sourceMappingURL=versionChecker-
|
|
218
|
+
//# sourceMappingURL=versionChecker-ilGsD2LH.js.map
|
package/lab/ui/index.html
CHANGED
|
@@ -165,9 +165,11 @@
|
|
|
165
165
|
border-radius: 999px;
|
|
166
166
|
border: 1px solid currentColor;
|
|
167
167
|
text-transform: uppercase;
|
|
168
|
-
opacity: 0.9;
|
|
169
168
|
cursor: help;
|
|
170
169
|
}
|
|
170
|
+
/* NB: no opacity on .ctype — CSS opacity applies to the whole subtree, so
|
|
171
|
+
it would bleed the terminal through the .ctip popover below. Dim the pill
|
|
172
|
+
via border/text color instead if needed. */
|
|
171
173
|
.ctype[hidden] {
|
|
172
174
|
display: none;
|
|
173
175
|
}
|
|
@@ -180,10 +182,13 @@
|
|
|
180
182
|
z-index: 30;
|
|
181
183
|
min-width: 240px;
|
|
182
184
|
padding: 8px 10px;
|
|
183
|
-
background: var(--panel);
|
|
185
|
+
background: var(--panel); /* fallback when color-mix is unsupported */
|
|
186
|
+
background: color-mix(in srgb, var(--panel) 90%, transparent);
|
|
187
|
+
backdrop-filter: blur(14px) saturate(1.4);
|
|
188
|
+
-webkit-backdrop-filter: blur(14px) saturate(1.4);
|
|
184
189
|
border: 1px solid var(--line);
|
|
185
|
-
border-radius:
|
|
186
|
-
box-shadow: 0
|
|
190
|
+
border-radius: 10px;
|
|
191
|
+
box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
|
|
187
192
|
color: var(--fg);
|
|
188
193
|
font-family: var(--mono);
|
|
189
194
|
font-size: 10.5px;
|
|
@@ -997,6 +1002,10 @@
|
|
|
997
1002
|
border-color: var(--accent);
|
|
998
1003
|
color: #fff;
|
|
999
1004
|
}
|
|
1005
|
+
/* modifier glyphs (⌃ ⌥ ⇧) read better a touch larger than the text keys */
|
|
1006
|
+
.keybar .kbmod {
|
|
1007
|
+
font-size: 16px;
|
|
1008
|
+
}
|
|
1000
1009
|
/* Line composer — mobile-only. Carries the bottom safe-area inset so it
|
|
1001
1010
|
clears the home indicator (completes the terminal pane's inset cover). */
|
|
1002
1011
|
.composer {
|
|
@@ -1239,18 +1248,58 @@
|
|
|
1239
1248
|
posts raw sequences to the agent over the same /api/send wire. -->
|
|
1240
1249
|
<div class="keybar" id="keybar" role="group" aria-label="terminal keys">
|
|
1241
1250
|
<button class="kb" data-key="esc" title="Escape">Esc</button>
|
|
1242
|
-
<button
|
|
1243
|
-
|
|
1251
|
+
<button
|
|
1252
|
+
class="kb kbmod"
|
|
1253
|
+
data-mod="ctrl"
|
|
1254
|
+
title="Ctrl — applies to the next key"
|
|
1255
|
+
aria-label="Control"
|
|
1256
|
+
>
|
|
1257
|
+
⌃
|
|
1258
|
+
</button>
|
|
1259
|
+
<button
|
|
1260
|
+
class="kb kbmod"
|
|
1261
|
+
data-mod="alt"
|
|
1262
|
+
title="Alt / Option — applies to the next key"
|
|
1263
|
+
aria-label="Alt"
|
|
1264
|
+
>
|
|
1265
|
+
⌥
|
|
1266
|
+
</button>
|
|
1267
|
+
<button
|
|
1268
|
+
class="kb kbmod"
|
|
1269
|
+
data-mod="shift"
|
|
1270
|
+
title="Shift — applies to the next key"
|
|
1271
|
+
aria-label="Shift"
|
|
1272
|
+
>
|
|
1273
|
+
⇧
|
|
1244
1274
|
</button>
|
|
1245
|
-
<button class="kb kbmod" data-mod="alt" title="Alt — applies to the next key">Alt</button>
|
|
1246
1275
|
<button class="kb" data-key="tab" title="Tab">Tab</button>
|
|
1247
|
-
<button
|
|
1248
|
-
|
|
1276
|
+
<button
|
|
1277
|
+
class="kb"
|
|
1278
|
+
data-key="stab"
|
|
1279
|
+
title="Shift-Tab (e.g. cycle modes)"
|
|
1280
|
+
aria-label="Shift Tab"
|
|
1281
|
+
>
|
|
1282
|
+
⇧Tab
|
|
1283
|
+
</button>
|
|
1284
|
+
<button class="kb" data-key="cc" title="Ctrl-C — interrupt" aria-label="Control C">
|
|
1285
|
+
^C
|
|
1286
|
+
</button>
|
|
1249
1287
|
<button class="kb" data-arrow="up" title="Up" aria-label="Up">↑</button>
|
|
1250
1288
|
<button class="kb" data-arrow="down" title="Down" aria-label="Down">↓</button>
|
|
1251
1289
|
<button class="kb" data-arrow="left" title="Left" aria-label="Left">←</button>
|
|
1252
1290
|
<button class="kb" data-arrow="right" title="Right" aria-label="Right">→</button>
|
|
1253
|
-
<button class="kb" data-key="enter" title="Enter">⏎</button>
|
|
1291
|
+
<button class="kb" data-key="enter" title="Enter" aria-label="Enter">⏎</button>
|
|
1292
|
+
<!-- lower-frequency nav keys, appended after the common keys so they
|
|
1293
|
+
sort to the right (scroll to reach) without bumping the rest -->
|
|
1294
|
+
<button class="kb" data-arrow="home" title="Home">Home</button>
|
|
1295
|
+
<button class="kb" data-arrow="end" title="End">End</button>
|
|
1296
|
+
<button class="kb" data-tilde="pgup" title="Page Up" aria-label="Page Up">PgUp</button>
|
|
1297
|
+
<button class="kb" data-tilde="pgdn" title="Page Down" aria-label="Page Down">
|
|
1298
|
+
PgDn
|
|
1299
|
+
</button>
|
|
1300
|
+
<button class="kb" data-tilde="del" title="Delete (forward)" aria-label="Delete">
|
|
1301
|
+
Del
|
|
1302
|
+
</button>
|
|
1254
1303
|
</div>
|
|
1255
1304
|
<!-- Line composer — the reliable path for typing a prompt on a phone:
|
|
1256
1305
|
a normal textarea (no IME/autocorrect surprises that plague xterm's
|
|
@@ -2251,7 +2300,8 @@
|
|
|
2251
2300
|
// sequences straight to the selected agent's stdin, and a sticky Ctrl/Alt
|
|
2252
2301
|
// rewrites the NEXT character typed on the soft keyboard.
|
|
2253
2302
|
let modCtrl = false,
|
|
2254
|
-
modAlt = false
|
|
2303
|
+
modAlt = false,
|
|
2304
|
+
modShift = false;
|
|
2255
2305
|
// Send raw bytes to the currently-selected agent. Uses the live `sel`, so
|
|
2256
2306
|
// it always hits the open agent even while an old terminal tears down mid
|
|
2257
2307
|
// switch — the same /api/send wire the terminal's own input uses.
|
|
@@ -2263,20 +2313,25 @@
|
|
|
2263
2313
|
.post("/api/send", { keyword: String(e.pid), msg: data, code: "none" })
|
|
2264
2314
|
.catch(() => {});
|
|
2265
2315
|
}
|
|
2266
|
-
// Apply a pending sticky Ctrl/Alt to
|
|
2267
|
-
//
|
|
2268
|
-
//
|
|
2269
|
-
//
|
|
2316
|
+
// Apply a pending sticky Ctrl/Alt to a typed character, then disarm. Only a
|
|
2317
|
+
// SINGLE character is transformed: Ctrl folds @A–Z[\]^_ (case-insensitive)
|
|
2318
|
+
// to 0x00–0x1f; Alt/Meta is an ESC prefix; Shift is a no-op (the soft
|
|
2319
|
+
// keyboard already produced the shifted char — Shift only matters for the
|
|
2320
|
+
// key bar's Tab/arrows). Any OTHER input (paste, IME commit, escape/mouse
|
|
2321
|
+
// sequence) passes through unchanged but STILL disarms — a one-shot modifier
|
|
2322
|
+
// must not survive to a later key (e.g. tap ⇧, paste, then an arrow).
|
|
2270
2323
|
function applyStickyMods(d) {
|
|
2271
|
-
if (
|
|
2324
|
+
if (!modCtrl && !modAlt && !modShift) return d;
|
|
2272
2325
|
let c = d;
|
|
2273
|
-
if (
|
|
2274
|
-
|
|
2275
|
-
|
|
2276
|
-
|
|
2326
|
+
if (typeof d === "string" && d.length === 1) {
|
|
2327
|
+
if (modCtrl) {
|
|
2328
|
+
const u = d.toUpperCase().charCodeAt(0);
|
|
2329
|
+
if (u >= 64 && u <= 95) c = String.fromCharCode(u - 64);
|
|
2330
|
+
else if (u === 32) c = "\x00"; // Ctrl-Space → NUL
|
|
2331
|
+
}
|
|
2332
|
+
if (modAlt) c = "\x1b" + c;
|
|
2277
2333
|
}
|
|
2278
|
-
|
|
2279
|
-
modCtrl = modAlt = false;
|
|
2334
|
+
modCtrl = modAlt = modShift = false; // one-shot — disarm on any input
|
|
2280
2335
|
syncModButtons();
|
|
2281
2336
|
return c;
|
|
2282
2337
|
}
|
|
@@ -2285,14 +2340,22 @@
|
|
|
2285
2340
|
if (!kb) return;
|
|
2286
2341
|
kb.querySelector('[data-mod="ctrl"]')?.classList.toggle("on", modCtrl);
|
|
2287
2342
|
kb.querySelector('[data-mod="alt"]')?.classList.toggle("on", modAlt);
|
|
2343
|
+
kb.querySelector('[data-mod="shift"]')?.classList.toggle("on", modShift);
|
|
2288
2344
|
}
|
|
2289
2345
|
(function keybarBoot() {
|
|
2290
2346
|
const kb = $("keybar");
|
|
2291
2347
|
if (!kb) return;
|
|
2292
2348
|
// stab = Shift-Tab → CBT (ESC [ Z); back-tab / reverse field nav, and
|
|
2293
2349
|
// what Claude Code's TUI reads to cycle permission modes.
|
|
2350
|
+
// Fixed byte sequences (no CSI-modifier form).
|
|
2294
2351
|
const SEQ = { esc: "\x1b", tab: "\t", stab: "\x1b[Z", enter: "\r", cc: "\x03" };
|
|
2295
|
-
|
|
2352
|
+
// Cursor keys keyed by their CSI/SS3 final byte. Arrows AND Home/End are
|
|
2353
|
+
// DECCKM-aware and take CSI modifiers via the shared cursor path below.
|
|
2354
|
+
const ARROW = { up: "A", down: "B", right: "C", left: "D", home: "H", end: "F" };
|
|
2355
|
+
// VT220 function keys: CSI <N> ~, or CSI <N> ; <m> ~ when modified.
|
|
2356
|
+
const TILDE = { pgup: "5", pgdn: "6", del: "3" };
|
|
2357
|
+
// CSI modifier param shared by cursor + VT220 keys: 1 + Shift + Alt*2 + Ctrl*4.
|
|
2358
|
+
const modNum = () => 1 + (modShift ? 1 : 0) + (modAlt ? 2 : 0) + (modCtrl ? 4 : 0);
|
|
2296
2359
|
// Don't let a button steal focus — that would drop the soft keyboard and
|
|
2297
2360
|
// blur whatever the user is typing into (terminal or composer).
|
|
2298
2361
|
kb.addEventListener("pointerdown", (ev) => {
|
|
@@ -2302,36 +2365,48 @@
|
|
|
2302
2365
|
const b = ev.target.closest("button.kb");
|
|
2303
2366
|
if (!b) return;
|
|
2304
2367
|
if (b.dataset.mod) {
|
|
2305
|
-
// sticky toggle — armed for the next soft-keyboard
|
|
2306
|
-
|
|
2307
|
-
|
|
2368
|
+
// sticky toggle — armed for the next key (a soft-keyboard char or a bar key)
|
|
2369
|
+
const m = b.dataset.mod;
|
|
2370
|
+
if (m === "ctrl") modCtrl = !modCtrl;
|
|
2371
|
+
else if (m === "alt") modAlt = !modAlt;
|
|
2372
|
+
else if (m === "shift") modShift = !modShift;
|
|
2308
2373
|
syncModButtons();
|
|
2309
2374
|
return;
|
|
2310
2375
|
}
|
|
2311
2376
|
let seq = null;
|
|
2312
2377
|
if (b.dataset.arrow) {
|
|
2313
2378
|
const L = ARROW[b.dataset.arrow];
|
|
2314
|
-
if (modCtrl || modAlt) {
|
|
2315
|
-
//
|
|
2316
|
-
//
|
|
2317
|
-
//
|
|
2318
|
-
|
|
2319
|
-
seq = "\x1b[1;" + (1 + (modAlt ? 2 : 0) + (modCtrl ? 4 : 0)) + L;
|
|
2379
|
+
if (modCtrl || modAlt || modShift) {
|
|
2380
|
+
// Modifier + cursor key → CSI form ESC [ 1 ; <m> <L> (e.g. Ctrl-Left
|
|
2381
|
+
// = ESC [ 1 ; 5 D for word-wise motion). Modified cursor keys are
|
|
2382
|
+
// always CSI, never SS3, so DECCKM doesn't apply when held.
|
|
2383
|
+
seq = "\x1b[1;" + modNum() + L;
|
|
2320
2384
|
} else {
|
|
2321
2385
|
// Honour application-cursor-key mode (DECCKM): TUIs that enable it
|
|
2322
2386
|
// expect SS3 (ESC O x) arrows, not CSI (ESC [ x). xterm tracks it.
|
|
2323
2387
|
const app = term && term.modes && term.modes.applicationCursorKeysMode;
|
|
2324
2388
|
seq = (app ? "\x1bO" : "\x1b[") + L;
|
|
2325
2389
|
}
|
|
2390
|
+
} else if (b.dataset.tilde) {
|
|
2391
|
+
// VT220 function key → CSI <N> ~, or CSI <N> ; <m> ~ when a modifier is
|
|
2392
|
+
// held (e.g. Ctrl+Del = ESC [ 3 ; 5 ~ for word-delete).
|
|
2393
|
+
const N = TILDE[b.dataset.tilde];
|
|
2394
|
+
seq =
|
|
2395
|
+
modCtrl || modAlt || modShift
|
|
2396
|
+
? "\x1b[" + N + ";" + modNum() + "~"
|
|
2397
|
+
: "\x1b[" + N + "~";
|
|
2326
2398
|
} else if (b.dataset.key) {
|
|
2327
2399
|
seq = SEQ[b.dataset.key];
|
|
2328
|
-
//
|
|
2329
|
-
|
|
2400
|
+
// Shift+Tab → CBT (ESC [ Z), same as the dedicated ⇧Tab key.
|
|
2401
|
+
if (b.dataset.key === "tab" && modShift) seq = "\x1b[Z";
|
|
2402
|
+
// Alt/Meta on a fixed key = ESC prefix, layered ON TOP of the above so
|
|
2403
|
+
// Alt+Shift+Tab → ESC ESC [ Z (not just ESC [ Z). Ctrl/Shift on
|
|
2404
|
+
// Esc/Enter/^C have no standard sequence, so they stay the bare key.
|
|
2330
2405
|
if (seq != null && modAlt) seq = "\x1b" + seq;
|
|
2331
2406
|
}
|
|
2332
2407
|
if (seq == null) return;
|
|
2333
2408
|
// the armed modifier (if any) has now been folded into this key — clear it
|
|
2334
|
-
modCtrl = modAlt = false;
|
|
2409
|
+
modCtrl = modAlt = modShift = false;
|
|
2335
2410
|
syncModButtons();
|
|
2336
2411
|
sendToSelected(seq);
|
|
2337
2412
|
});
|
|
@@ -2353,13 +2428,8 @@
|
|
|
2353
2428
|
let v = ta.value;
|
|
2354
2429
|
if (!v) return;
|
|
2355
2430
|
// An armed sticky Ctrl/Alt decorates a single-char line (e.g. Ctrl-D);
|
|
2356
|
-
//
|
|
2357
|
-
// it doesn't silently leak into the next terminal keystroke.
|
|
2431
|
+
// applyStickyMods also disarms for longer text, so it can't leak onward.
|
|
2358
2432
|
v = applyStickyMods(v);
|
|
2359
|
-
if (modCtrl || modAlt) {
|
|
2360
|
-
modCtrl = modAlt = false;
|
|
2361
|
-
syncModButtons();
|
|
2362
|
-
}
|
|
2363
2433
|
sendToSelected(v + "\r");
|
|
2364
2434
|
ta.value = "";
|
|
2365
2435
|
grow();
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-Dlf0U2sb.js";
|
|
2
|
-
import "./logger-B9h0djqx.js";
|
|
3
|
-
import "./versionChecker-DY4oPzQl.js";
|
|
4
|
-
import "./pidStore-CGKIhaJO.js";
|
|
5
|
-
import "./globalPidIndex-C7r2m6s7.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-gldLvxxn.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|