claude-yes 1.137.0 → 1.138.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-BlYVTStU.js +8 -0
- package/dist/{SUPPORTED_CLIS-B9Vuzzba.js → SUPPORTED_CLIS-D3iEYFql.js} +2 -2
- package/dist/cli.js +3 -3
- package/dist/index.js +2 -2
- package/dist/{schedule-C_eeRqKl.js → schedule-Cz9peq9i.js} +4 -4
- package/dist/{serve-DZZAjj5z.js → serve-DJrBiSD9.js} +5 -5
- package/dist/{setup-C9YZk0-b.js → setup-B138hyq0.js} +2 -2
- package/dist/{subcommands-sBF6Q92w.js → subcommands-DbNS4vIg.js} +1 -1
- package/dist/{subcommands-Cppv0tFw.js → subcommands-viZJtGlf.js} +4 -4
- package/dist/{ts-7ZIbLUAs.js → ts-CSn43pN8.js} +2 -2
- package/dist/{versionChecker-DQHJdATh.js → versionChecker-C6bI89jZ.js} +2 -2
- package/lab/ui/console-logic.js +73 -0
- package/lab/ui/index.html +27 -55
- package/package.json +1 -1
- package/dist/SUPPORTED_CLIS-CJobpQld.js +0 -8
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import "./ts-CSn43pN8.js";
|
|
2
|
+
import "./logger-CDIsZ-Pp.js";
|
|
3
|
+
import "./versionChecker-C6bI89jZ.js";
|
|
4
|
+
import "./pidStore-fqXqTKkh.js";
|
|
5
|
+
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D3iEYFql.js";
|
|
7
|
+
|
|
8
|
+
export { SUPPORTED_CLIS };
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { t as CLIS_CONFIG } from "./ts-
|
|
1
|
+
import { t as CLIS_CONFIG } from "./ts-CSn43pN8.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-D3iEYFql.js.map
|
package/dist/cli.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/usr/bin/env bun
|
|
2
2
|
import { t as invokedCliName } from "./invokedCli-zdFbz1ST.js";
|
|
3
3
|
import { n as logger } from "./logger-CDIsZ-Pp.js";
|
|
4
|
-
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-
|
|
4
|
+
import { i as versionString, n as displayVersion, r as getInstalledPackage, t as checkAndAutoUpdate } from "./versionChecker-C6bI89jZ.js";
|
|
5
5
|
import { argv } from "process";
|
|
6
6
|
import { execFileSync, spawn } from "child_process";
|
|
7
7
|
import ms from "ms";
|
|
@@ -480,7 +480,7 @@ function buildRustArgs(argv, cliFromScript, supportedClis) {
|
|
|
480
480
|
const rawArg = process.argv[2];
|
|
481
481
|
const managerCommands = !invokedCliName(process.argv);
|
|
482
482
|
const isHelpFlag = rawArg === "-h" || rawArg === "--help";
|
|
483
|
-
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-
|
|
483
|
+
const { isSubcommand, runSubcommand, cmdHelp } = await import("./subcommands-DbNS4vIg.js");
|
|
484
484
|
if (isHelpFlag && process.argv.length === 3) {
|
|
485
485
|
cmdHelp(managerCommands);
|
|
486
486
|
process.exit(0);
|
|
@@ -513,7 +513,7 @@ if (config.useRust) {
|
|
|
513
513
|
}
|
|
514
514
|
}
|
|
515
515
|
if (rustBinary) {
|
|
516
|
-
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-
|
|
516
|
+
const { SUPPORTED_CLIS } = await import("./SUPPORTED_CLIS-BlYVTStU.js");
|
|
517
517
|
const rustArgs = buildRustArgs(process.argv, config.cli, SUPPORTED_CLIS);
|
|
518
518
|
if (config.verbose) {
|
|
519
519
|
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-CSn43pN8.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-C6bI89jZ.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CSn43pN8.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-
|
|
3
|
+
import "./versionChecker-C6bI89jZ.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
6
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D3iEYFql.js";
|
|
7
7
|
import { n as resolveSpawnCwd } from "./workspaceConfig-BCOqRBEW.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-Cz9peq9i.js.map
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import "./ts-
|
|
1
|
+
import "./ts-CSn43pN8.js";
|
|
2
2
|
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
3
|
+
import { r as getInstalledPackage } from "./versionChecker-C6bI89jZ.js";
|
|
4
4
|
import "./pidStore-fqXqTKkh.js";
|
|
5
5
|
import { a as updateGlobalPidStatus } from "./globalPidIndex-DlmmJlO8.js";
|
|
6
6
|
import { t as pgidForWrapper } from "./reaper-C-eWAxIj.js";
|
|
7
7
|
import "./configShared-C1C04bbq.js";
|
|
8
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-
|
|
8
|
+
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-D3iEYFql.js";
|
|
9
9
|
import "./remotes-PKKjfTI1.js";
|
|
10
|
-
import { d as listRecords, g as resolveOne, i as controlCodeFromName, m as renderRawLog, p as readNotes, s as extractTaskCounts, x as writeToIpc, y as snapshotStatus } from "./subcommands-
|
|
10
|
+
import { d as listRecords, g as resolveOne, i as controlCodeFromName, m as renderRawLog, p as readNotes, s as extractTaskCounts, x as writeToIpc, y as snapshotStatus } from "./subcommands-viZJtGlf.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";
|
|
@@ -1171,4 +1171,4 @@ Options:
|
|
|
1171
1171
|
|
|
1172
1172
|
//#endregion
|
|
1173
1173
|
export { cmdServe };
|
|
1174
|
-
//# sourceMappingURL=serve-
|
|
1174
|
+
//# sourceMappingURL=serve-DJrBiSD9.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-DJrBiSD9.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-B138hyq0.js.map
|
|
@@ -2,6 +2,6 @@ import "./logger-CDIsZ-Pp.js";
|
|
|
2
2
|
import "./globalPidIndex-DlmmJlO8.js";
|
|
3
3
|
import "./configShared-C1C04bbq.js";
|
|
4
4
|
import "./remotes-PKKjfTI1.js";
|
|
5
|
-
import { _ as resolveReadWindow, a as cursorAbs, b as stopTipForCli, c as finalizedLines, d as listRecords, f as matchKeyword, g as resolveOne, h as renderRawLogLines, i as controlCodeFromName, l as isPidAlive, m as renderRawLog, n as READ_PAGE_DEFAULT, o as extractNeedsInput, p as readNotes, r as cmdHelp, s as extractTaskCounts, t as GRACEFUL_EXIT_COMMANDS, u as isSubcommand, v as runSubcommand, x as writeToIpc, y as snapshotStatus } from "./subcommands-
|
|
5
|
+
import { _ as resolveReadWindow, a as cursorAbs, b as stopTipForCli, c as finalizedLines, d as listRecords, f as matchKeyword, g as resolveOne, h as renderRawLogLines, i as controlCodeFromName, l as isPidAlive, m as renderRawLog, n as READ_PAGE_DEFAULT, o as extractNeedsInput, p as readNotes, r as cmdHelp, s as extractTaskCounts, t as GRACEFUL_EXIT_COMMANDS, u as isSubcommand, v as runSubcommand, x as writeToIpc, y as snapshotStatus } from "./subcommands-viZJtGlf.js";
|
|
6
6
|
|
|
7
7
|
export { cmdHelp, isSubcommand, runSubcommand };
|
|
@@ -533,15 +533,15 @@ async function runSubcommand(argv) {
|
|
|
533
533
|
case "restart": return await cmdRestart(rest);
|
|
534
534
|
case "note": return await cmdNote(rest);
|
|
535
535
|
case "serve": {
|
|
536
|
-
const { cmdServe } = await import("./serve-
|
|
536
|
+
const { cmdServe } = await import("./serve-DJrBiSD9.js");
|
|
537
537
|
return cmdServe(rest);
|
|
538
538
|
}
|
|
539
539
|
case "setup": {
|
|
540
|
-
const { cmdSetup } = await import("./setup-
|
|
540
|
+
const { cmdSetup } = await import("./setup-B138hyq0.js");
|
|
541
541
|
return cmdSetup(rest);
|
|
542
542
|
}
|
|
543
543
|
case "schedule": {
|
|
544
|
-
const { cmdSchedule } = await import("./schedule-
|
|
544
|
+
const { cmdSchedule } = await import("./schedule-Cz9peq9i.js");
|
|
545
545
|
return cmdSchedule(rest);
|
|
546
546
|
}
|
|
547
547
|
case "remote": {
|
|
@@ -2428,4 +2428,4 @@ async function cmdResultSet(rest) {
|
|
|
2428
2428
|
|
|
2429
2429
|
//#endregion
|
|
2430
2430
|
export { resolveReadWindow as _, cursorAbs as a, stopTipForCli as b, finalizedLines as c, listRecords as d, matchKeyword as f, resolveOne as g, renderRawLogLines as h, controlCodeFromName as i, isPidAlive as l, renderRawLog as m, READ_PAGE_DEFAULT as n, extractNeedsInput as o, readNotes as p, cmdHelp as r, extractTaskCounts as s, GRACEFUL_EXIT_COMMANDS as t, isSubcommand as u, runSubcommand as v, writeToIpc as x, snapshotStatus as y };
|
|
2431
|
-
//# sourceMappingURL=subcommands-
|
|
2431
|
+
//# sourceMappingURL=subcommands-viZJtGlf.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { n as logger, t as addTransport } from "./logger-CDIsZ-Pp.js";
|
|
2
|
-
import { r as getInstalledPackage } from "./versionChecker-
|
|
2
|
+
import { r as getInstalledPackage } from "./versionChecker-C6bI89jZ.js";
|
|
3
3
|
import { t as agentYesHome } from "./agentYesHome-_eJa3DaX.js";
|
|
4
4
|
import { i as shouldUseLock, r as releaseLock, t as acquireLock } from "./runningLock-V4qvXgAw.js";
|
|
5
5
|
import { t as PidStore } from "./pidStore-fqXqTKkh.js";
|
|
@@ -1788,4 +1788,4 @@ function sleep(ms) {
|
|
|
1788
1788
|
|
|
1789
1789
|
//#endregion
|
|
1790
1790
|
export { removeControlCharacters as a, AgentContext as i, agentYes as n, config as r, CLIS_CONFIG as t };
|
|
1791
|
-
//# sourceMappingURL=ts-
|
|
1791
|
+
//# sourceMappingURL=ts-CSn43pN8.js.map
|
|
@@ -7,7 +7,7 @@ import { fileURLToPath } from "url";
|
|
|
7
7
|
|
|
8
8
|
//#region package.json
|
|
9
9
|
var name = "claude-yes";
|
|
10
|
-
var version = "1.
|
|
10
|
+
var version = "1.138.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-C6bI89jZ.js.map
|
package/lab/ui/console-logic.js
CHANGED
|
@@ -395,3 +395,76 @@ export function nextIndex(len, i, dir) {
|
|
|
395
395
|
if (i < 0) return dir > 0 ? 0 : len - 1;
|
|
396
396
|
return Math.max(0, Math.min(len - 1, i + dir));
|
|
397
397
|
}
|
|
398
|
+
|
|
399
|
+
// ---------------------------------------------------------------------------
|
|
400
|
+
// multi-viewer presence + shared-canvas geometry
|
|
401
|
+
// index.html keeps the DOM glue (measuring elements, applying transforms); the
|
|
402
|
+
// coordinate math lives here so it's unit-testable without a browser.
|
|
403
|
+
// ---------------------------------------------------------------------------
|
|
404
|
+
|
|
405
|
+
// Stable per-viewer hue (0..359) for colour-coding peers' selections.
|
|
406
|
+
export function hashHue(s) {
|
|
407
|
+
let h = 0;
|
|
408
|
+
for (const ch of String(s)) h = (h * 31 + ch.charCodeAt(0)) >>> 0;
|
|
409
|
+
return h % 360;
|
|
410
|
+
}
|
|
411
|
+
|
|
412
|
+
// Encode an xterm selection (getSelectionPosition() → {start:{x,y}, end:{x,y}},
|
|
413
|
+
// y = ABSOLUTE buffer line) as "fromBottomRow,col-fromBottomRow,col". Viewers
|
|
414
|
+
// connect at different times so absolute rows don't align, but the live-tail
|
|
415
|
+
// content does — distance from the bottom is a shared coordinate. `bufferLen` is
|
|
416
|
+
// the buffer's line count. Returns null when there's no selection.
|
|
417
|
+
export function selFromBottom(s, bufferLen) {
|
|
418
|
+
if (!s || !s.start || !s.end) return null;
|
|
419
|
+
const last = (bufferLen || 1) - 1;
|
|
420
|
+
return `${last - s.start.y},${s.start.x}-${last - s.end.y},${s.end.x}`;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
// Parse "fbRow,col-fbRow,col" (rows = lines-from-bottom). null if malformed.
|
|
424
|
+
export function parseSel(selStr) {
|
|
425
|
+
const m = /^(\d+),(\d+)-(\d+),(\d+)$/.exec(selStr || "");
|
|
426
|
+
if (!m) return null;
|
|
427
|
+
return { fa: +m[1], ca: +m[2], fb: +m[3], cb: +m[4] };
|
|
428
|
+
}
|
|
429
|
+
|
|
430
|
+
// Per-row spans for a peer selection, in OUR buffer rows, clipped to the visible
|
|
431
|
+
// viewport [vy, vy+myRows). fromBottom is mapped against OUR buffer bottom
|
|
432
|
+
// (myLast) so the same tail line matches across viewers of different scrollback
|
|
433
|
+
// depth. A selection is per-row: top row cA→edge, full-width middle, bottom row
|
|
434
|
+
// 0→cB. Columns are EXACT when widths match, proportional only as a fallback.
|
|
435
|
+
export function selSegments(sel, myLast, vy, myRows, peerCols, myCols) {
|
|
436
|
+
if (!sel) return [];
|
|
437
|
+
const sameW = (peerCols || myCols) === myCols;
|
|
438
|
+
const mapC = (c) => (sameW ? c : Math.round((c / (peerCols || myCols)) * myCols));
|
|
439
|
+
let rA = myLast - sel.fa,
|
|
440
|
+
rB = myLast - sel.fb,
|
|
441
|
+
cA = sel.ca,
|
|
442
|
+
cB = sel.cb;
|
|
443
|
+
if (rA > rB) ([rA, rB] = [rB, rA]), ([cA, cB] = [cB, cA]); // rA = top row
|
|
444
|
+
const segs = [];
|
|
445
|
+
const from = Math.max(rA, vy),
|
|
446
|
+
to = Math.min(rB, vy + myRows - 1);
|
|
447
|
+
for (let r = from; r <= to; r++) {
|
|
448
|
+
const a = r === rA ? cA : 0;
|
|
449
|
+
const b = r === rB ? cB : myCols;
|
|
450
|
+
segs.push({ row: r, a: Math.min(mapC(a), mapC(b)), b: Math.max(mapC(a), mapC(b)) });
|
|
451
|
+
}
|
|
452
|
+
return segs;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
// Shared-canvas fit: the CSS transform that fits a grid (gridW×gridH px) into a
|
|
456
|
+
// pane (paneW×paneH px). Near-1 → "none" so the driver / single viewer (whose
|
|
457
|
+
// grid already fits) stays crisp and unchanged; otherwise "scale(s)". The
|
|
458
|
+
// 0.985–1.04 band absorbs FitAddon's whole-cell rounding slack.
|
|
459
|
+
export function fitTransform(gridW, gridH, paneW, paneH) {
|
|
460
|
+
if (!gridW || !gridH || paneW <= 0 || paneH <= 0) return "none";
|
|
461
|
+
const s = Math.min(paneW / gridW, paneH / gridH);
|
|
462
|
+
return s > 0.985 && s < 1.04 ? "none" : "scale(" + s.toFixed(4) + ")";
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
// Browser-tab title: "<selected agent title> - agent-yes", or the bare console
|
|
466
|
+
// title when nothing is selected (blank/whitespace name).
|
|
467
|
+
export function docTitle(name) {
|
|
468
|
+
const n = name && String(name).trim();
|
|
469
|
+
return n ? n + " - agent-yes" : "agent-yes · console";
|
|
470
|
+
}
|
package/lab/ui/index.html
CHANGED
|
@@ -1401,6 +1401,12 @@
|
|
|
1401
1401
|
deviceCount,
|
|
1402
1402
|
layeredRows,
|
|
1403
1403
|
taskLabel,
|
|
1404
|
+
hashHue,
|
|
1405
|
+
selFromBottom,
|
|
1406
|
+
parseSel,
|
|
1407
|
+
selSegments,
|
|
1408
|
+
fitTransform,
|
|
1409
|
+
docTitle,
|
|
1404
1410
|
} from "./console-logic.js";
|
|
1405
1411
|
import {
|
|
1406
1412
|
MARKER as E2E_MARKER,
|
|
@@ -2485,17 +2491,11 @@
|
|
|
2485
2491
|
if (!cur || !term) return;
|
|
2486
2492
|
let selR = null;
|
|
2487
2493
|
try {
|
|
2488
|
-
//
|
|
2489
|
-
//
|
|
2490
|
-
//
|
|
2491
|
-
// is identical, so "lines from the BOTTOM" (length-1 - y) IS a shared
|
|
2492
|
-
// coordinate. We emit fromBottom for rows; the receiver maps it back into
|
|
2493
|
-
// its own buffer + viewport. cols stay as-is.
|
|
2494
|
+
// selFromBottom (console-logic.js) encodes the selection as
|
|
2495
|
+
// lines-from-bottom — a coordinate shared across differently-sized
|
|
2496
|
+
// viewers (see its doc); the receiver maps it back into its own buffer.
|
|
2494
2497
|
const s = term.getSelectionPosition && term.getSelectionPosition();
|
|
2495
|
-
|
|
2496
|
-
const last = (term.buffer.active.length || 1) - 1;
|
|
2497
|
-
selR = `${last - s.start.y},${s.start.x}-${last - s.end.y},${s.end.x}`;
|
|
2498
|
-
}
|
|
2498
|
+
selR = selFromBottom(s, term.buffer.active.length);
|
|
2499
2499
|
} catch {}
|
|
2500
2500
|
cur.tx
|
|
2501
2501
|
.post("/api/presence", {
|
|
@@ -2538,46 +2538,9 @@
|
|
|
2538
2538
|
.catch(() => {});
|
|
2539
2539
|
}, 3000);
|
|
2540
2540
|
|
|
2541
|
-
//
|
|
2542
|
-
//
|
|
2543
|
-
//
|
|
2544
|
-
// (doesn't track scrollback / exact reflow) — a "roughly here" presence hint.
|
|
2545
|
-
function hashHue(s) {
|
|
2546
|
-
let h = 0;
|
|
2547
|
-
for (const ch of String(s)) h = (h * 31 + ch.charCodeAt(0)) >>> 0;
|
|
2548
|
-
return h % 360;
|
|
2549
|
-
}
|
|
2550
|
-
// Parse "fbRow,col-fbRow,col" where the rows are LINES-FROM-THE-BOTTOM of the
|
|
2551
|
-
// peer's buffer (a coordinate shared across viewers — see sendPresence).
|
|
2552
|
-
function parseSel(selStr) {
|
|
2553
|
-
const m = /^(\d+),(\d+)-(\d+),(\d+)$/.exec(selStr || "");
|
|
2554
|
-
if (!m) return null;
|
|
2555
|
-
return { fa: +m[1], ca: +m[2], fb: +m[3], cb: +m[4] };
|
|
2556
|
-
}
|
|
2557
|
-
// Per-row spans for a peer selection, in OUR buffer rows. fromBottom is mapped
|
|
2558
|
-
// against OUR buffer bottom (myLast) so the same live-tail line matches even
|
|
2559
|
-
// though absolute indices differ between viewers; only the rows visible in our
|
|
2560
|
-
// viewport [vy, vy+myRows) are emitted (so a giant selection stays cheap). A
|
|
2561
|
-
// selection is per-row: top row cA→edge, full-width middle, bottom row 0→cB.
|
|
2562
|
-
// Columns are EXACT when widths match, proportional only as a fallback.
|
|
2563
|
-
function selSegments(sel, myLast, vy, myRows, peerCols, myCols) {
|
|
2564
|
-
const sameW = (peerCols || myCols) === myCols;
|
|
2565
|
-
const mapC = (c) => (sameW ? c : Math.round((c / (peerCols || myCols)) * myCols));
|
|
2566
|
-
let rA = myLast - sel.fa,
|
|
2567
|
-
rB = myLast - sel.fb,
|
|
2568
|
-
cA = sel.ca,
|
|
2569
|
-
cB = sel.cb;
|
|
2570
|
-
if (rA > rB) ([rA, rB] = [rB, rA]), ([cA, cB] = [cB, cA]); // rA = top row
|
|
2571
|
-
const segs = [];
|
|
2572
|
-
const from = Math.max(rA, vy),
|
|
2573
|
-
to = Math.min(rB, vy + myRows - 1);
|
|
2574
|
-
for (let r = from; r <= to; r++) {
|
|
2575
|
-
const a = r === rA ? cA : 0;
|
|
2576
|
-
const b = r === rB ? cB : myCols;
|
|
2577
|
-
segs.push({ row: r, a: Math.min(mapC(a), mapC(b)), b: Math.max(mapC(a), mapC(b)) });
|
|
2578
|
-
}
|
|
2579
|
-
return segs;
|
|
2580
|
-
}
|
|
2541
|
+
// Peer-selection overlay. The coordinate math (parseSel / selSegments /
|
|
2542
|
+
// hashHue) lives in console-logic.js (unit-tested); here we just measure the
|
|
2543
|
+
// DOM and place the boxes. Drawn in OUR buffer rows, clipped to the viewport.
|
|
2581
2544
|
function renderPeerSelections() {
|
|
2582
2545
|
const logEl = $("log");
|
|
2583
2546
|
if (!logEl) return;
|
|
@@ -2652,10 +2615,8 @@
|
|
|
2652
2615
|
const cs = getComputedStyle(logEl);
|
|
2653
2616
|
const pw = logEl.clientWidth - parseFloat(cs.paddingLeft) - parseFloat(cs.paddingRight);
|
|
2654
2617
|
const ph = logEl.clientHeight - parseFloat(cs.paddingTop) - parseFloat(cs.paddingBottom);
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
// Near-1 (driver / single viewer): keep it crisp, no transform.
|
|
2658
|
-
xt.style.transform = s > 0.985 && s < 1.04 ? "none" : "scale(" + s.toFixed(4) + ")";
|
|
2618
|
+
// fitTransform (console-logic.js) decides none-vs-scale (unit-tested).
|
|
2619
|
+
xt.style.transform = fitTransform(gw, gh, pw, ph);
|
|
2659
2620
|
} catch {}
|
|
2660
2621
|
}
|
|
2661
2622
|
// Follow the canonical grid: resize our xterm to the agent's size (set by the
|
|
@@ -3218,6 +3179,14 @@
|
|
|
3218
3179
|
}
|
|
3219
3180
|
}
|
|
3220
3181
|
|
|
3182
|
+
// Reflect the selected agent's title in the browser tab, live. Mirrors
|
|
3183
|
+
// $("rname") — set on select() and again on the agent's OSC title sequence —
|
|
3184
|
+
// so the tab tracks renames in realtime. Reverts to the default when nothing
|
|
3185
|
+
// is selected.
|
|
3186
|
+
function setDocTitle(name) {
|
|
3187
|
+
document.title = docTitle(name); // pure formatter in console-logic.js (tested)
|
|
3188
|
+
}
|
|
3189
|
+
|
|
3221
3190
|
function select(keyOrPid) {
|
|
3222
3191
|
const e =
|
|
3223
3192
|
entries.find((x) => x._key === keyOrPid) ||
|
|
@@ -3258,7 +3227,9 @@
|
|
|
3258
3227
|
document.querySelector(".app").classList.add("show-detail");
|
|
3259
3228
|
$("rhead").style.display = "flex";
|
|
3260
3229
|
$("rdot").className = "dot " + e.status;
|
|
3261
|
-
|
|
3230
|
+
const rname = e.title || cliLabel(e) || ident(e) || "agent";
|
|
3231
|
+
$("rname").textContent = rname;
|
|
3232
|
+
setDocTitle(rname); // tab title follows the selected agent
|
|
3262
3233
|
$("rpid").textContent = "pid " + e.pid;
|
|
3263
3234
|
|
|
3264
3235
|
// Render the agent's native TUI with xterm.js by feeding it the raw PTY
|
|
@@ -3307,6 +3278,7 @@
|
|
|
3307
3278
|
const title = t && t.trim();
|
|
3308
3279
|
if (sel !== e._key || !title) return;
|
|
3309
3280
|
$("rname").textContent = title;
|
|
3281
|
+
setDocTitle(title); // realtime rename → update the browser tab too
|
|
3310
3282
|
// Keep the left panel in lockstep with the terminal header. The row
|
|
3311
3283
|
// title otherwise only refreshes on the 3s /api/ls poll, so it visibly
|
|
3312
3284
|
// lagged the live terminal. Patch the current entry (entries is
|
package/package.json
CHANGED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import "./ts-7ZIbLUAs.js";
|
|
2
|
-
import "./logger-CDIsZ-Pp.js";
|
|
3
|
-
import "./versionChecker-DQHJdATh.js";
|
|
4
|
-
import "./pidStore-fqXqTKkh.js";
|
|
5
|
-
import "./globalPidIndex-DlmmJlO8.js";
|
|
6
|
-
import { t as SUPPORTED_CLIS } from "./SUPPORTED_CLIS-B9Vuzzba.js";
|
|
7
|
-
|
|
8
|
-
export { SUPPORTED_CLIS };
|