codeam-cli 2.15.7 → 2.15.8
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/index.js +31 -14
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -389,7 +389,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
389
389
|
// package.json
|
|
390
390
|
var package_default = {
|
|
391
391
|
name: "codeam-cli",
|
|
392
|
-
version: "2.15.
|
|
392
|
+
version: "2.15.8",
|
|
393
393
|
description: "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device \u2014 async. The terminal companion for CodeAgent Mobile.",
|
|
394
394
|
type: "commonjs",
|
|
395
395
|
main: "dist/index.js",
|
|
@@ -493,21 +493,30 @@ function showError(msg) {
|
|
|
493
493
|
function showInfo(msg) {
|
|
494
494
|
console.log(` ${import_picocolors.default.dim("\xB7")} ${msg}`);
|
|
495
495
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
const
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
console.log(
|
|
496
|
+
var BOX_INTERIOR = 30;
|
|
497
|
+
var BOX_BORDER_TOP = ` \u250C${"\u2500".repeat(BOX_INTERIOR)}\u2510`;
|
|
498
|
+
var BOX_BORDER_BOT = ` \u2514${"\u2500".repeat(BOX_INTERIOR)}\u2518`;
|
|
499
|
+
function boxRow(content, visibleLength) {
|
|
500
|
+
const pad = " ".repeat(Math.max(0, BOX_INTERIOR - visibleLength));
|
|
501
|
+
return ` \u2502${content}${pad}\u2502`;
|
|
502
|
+
}
|
|
503
|
+
function showPairingCode(code) {
|
|
504
|
+
console.log(BOX_BORDER_TOP);
|
|
505
|
+
const codeVisible = ` Code: ${code}`.length;
|
|
506
|
+
console.log(
|
|
507
|
+
boxRow(` Code: ${import_picocolors.default.bold(import_picocolors.default.yellow(code))}`, codeVisible)
|
|
508
|
+
);
|
|
509
|
+
console.log(BOX_BORDER_BOT);
|
|
505
510
|
console.log("");
|
|
506
511
|
import_qrcode_terminal.default.generate(code, { small: true }, (qr) => {
|
|
507
512
|
qr.split("\n").forEach((line) => console.log(" " + line));
|
|
508
513
|
});
|
|
509
514
|
console.log("");
|
|
510
515
|
}
|
|
516
|
+
function formatRemaining(expiresAt) {
|
|
517
|
+
const secs = Math.max(0, Math.floor((expiresAt - Date.now()) / 1e3));
|
|
518
|
+
return `${Math.floor(secs / 60)}:${String(secs % 60).padStart(2, "0")}`;
|
|
519
|
+
}
|
|
511
520
|
|
|
512
521
|
// src/services/command-relay.service.ts
|
|
513
522
|
var https2 = __toESM(require("https"));
|
|
@@ -8442,14 +8451,20 @@ async function pair(args2 = []) {
|
|
|
8442
8451
|
process.exit(1);
|
|
8443
8452
|
}
|
|
8444
8453
|
spin.stop("Got pairing code");
|
|
8445
|
-
showPairingCode(result.code
|
|
8454
|
+
showPairingCode(result.code);
|
|
8446
8455
|
console.log(import_picocolors3.default.dim(" Scan the QR code or enter the code in CodeAgent Mobile."));
|
|
8447
8456
|
console.log("");
|
|
8448
8457
|
const waitSpin = dist_exports.spinner();
|
|
8449
|
-
|
|
8458
|
+
const waitMessage = () => `Waiting for mobile app... \xB7 expires in ${formatRemaining(result.expiresAt)}`;
|
|
8459
|
+
waitSpin.start(waitMessage());
|
|
8460
|
+
const countdownInterval = setInterval(() => {
|
|
8461
|
+
waitSpin.message(waitMessage());
|
|
8462
|
+
}, 1e3);
|
|
8463
|
+
countdownInterval.unref?.();
|
|
8450
8464
|
await new Promise((resolve2) => {
|
|
8451
8465
|
let stopPolling = null;
|
|
8452
8466
|
function sigintHandler() {
|
|
8467
|
+
clearInterval(countdownInterval);
|
|
8453
8468
|
stopPolling?.();
|
|
8454
8469
|
console.log("");
|
|
8455
8470
|
process.exit(0);
|
|
@@ -8458,6 +8473,7 @@ async function pair(args2 = []) {
|
|
|
8458
8473
|
pluginId,
|
|
8459
8474
|
(info) => {
|
|
8460
8475
|
process.removeListener("SIGINT", sigintHandler);
|
|
8476
|
+
clearInterval(countdownInterval);
|
|
8461
8477
|
waitSpin.stop("Paired!");
|
|
8462
8478
|
addSession({
|
|
8463
8479
|
id: info.sessionId,
|
|
@@ -8475,6 +8491,7 @@ async function pair(args2 = []) {
|
|
|
8475
8491
|
resolve2();
|
|
8476
8492
|
},
|
|
8477
8493
|
() => {
|
|
8494
|
+
clearInterval(countdownInterval);
|
|
8478
8495
|
waitSpin.stop("Timed out");
|
|
8479
8496
|
showError("Pairing timed out after 5 minutes. Run codeam pair to try again.");
|
|
8480
8497
|
process.exit(1);
|
|
@@ -10624,7 +10641,7 @@ async function stopWorkspaceFromLocal(target) {
|
|
|
10624
10641
|
// src/commands/version.ts
|
|
10625
10642
|
var import_picocolors11 = __toESM(require("picocolors"));
|
|
10626
10643
|
function version() {
|
|
10627
|
-
const v = true ? "2.15.
|
|
10644
|
+
const v = true ? "2.15.8" : "unknown";
|
|
10628
10645
|
console.log(`${import_picocolors11.default.bold("codeam-cli")} ${import_picocolors11.default.cyan(v)}`);
|
|
10629
10646
|
}
|
|
10630
10647
|
|
|
@@ -10763,7 +10780,7 @@ function checkForUpdates() {
|
|
|
10763
10780
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
10764
10781
|
if (process.env.CI) return;
|
|
10765
10782
|
if (!process.stdout.isTTY) return;
|
|
10766
|
-
const current = true ? "2.15.
|
|
10783
|
+
const current = true ? "2.15.8" : null;
|
|
10767
10784
|
if (!current) return;
|
|
10768
10785
|
const cache = readCache();
|
|
10769
10786
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.15.
|
|
3
|
+
"version": "2.15.8",
|
|
4
4
|
"description": "Workflow-continuity bridge for AI coding agents. Wrap Claude Code or Codex in a PTY and supervise, approve, and redirect the session from any device — async. The terminal companion for CodeAgent Mobile.",
|
|
5
5
|
"type": "commonjs",
|
|
6
6
|
"main": "dist/index.js",
|