codeam-cli 2.76.31 → 2.76.32
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 +34 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -10627,7 +10627,7 @@ function readAnonId() {
|
|
|
10627
10627
|
}
|
|
10628
10628
|
function superProperties() {
|
|
10629
10629
|
return {
|
|
10630
|
-
cliVersion: true ? "2.76.
|
|
10630
|
+
cliVersion: true ? "2.76.32" : "0.0.0-dev",
|
|
10631
10631
|
nodeVersion: process.version,
|
|
10632
10632
|
platform: process.platform,
|
|
10633
10633
|
arch: process.arch,
|
|
@@ -10876,7 +10876,7 @@ var http = __toESM(require("http"));
|
|
|
10876
10876
|
// package.json
|
|
10877
10877
|
var package_default = {
|
|
10878
10878
|
name: "codeam-cli",
|
|
10879
|
-
version: "2.76.
|
|
10879
|
+
version: "2.76.32",
|
|
10880
10880
|
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.",
|
|
10881
10881
|
type: "commonjs",
|
|
10882
10882
|
main: "dist/index.js",
|
|
@@ -11038,7 +11038,7 @@ async function requestCode(pluginId, pluginSecretHash) {
|
|
|
11038
11038
|
return { ok: false, reason: "network" };
|
|
11039
11039
|
}
|
|
11040
11040
|
}
|
|
11041
|
-
async function fetchCurrentPluginAuthToken(sessionId, pluginId, pollSecret, onUserId) {
|
|
11041
|
+
async function fetchCurrentPluginAuthToken(sessionId, pluginId, pollSecret, onUserId, onSessionGone) {
|
|
11042
11042
|
try {
|
|
11043
11043
|
const result = await _transport.postJson(
|
|
11044
11044
|
`${API_BASE}/api/pairing/reconnect`,
|
|
@@ -11070,10 +11070,21 @@ async function fetchCurrentPluginAuthToken(sessionId, pluginId, pollSecret, onUs
|
|
|
11070
11070
|
}
|
|
11071
11071
|
const token = data.pluginAuthToken;
|
|
11072
11072
|
return typeof token === "string" && token.length > 0 ? token : null;
|
|
11073
|
-
} catch {
|
|
11073
|
+
} catch (err) {
|
|
11074
|
+
if (onSessionGone && isSessionNotFound(err)) onSessionGone();
|
|
11074
11075
|
return null;
|
|
11075
11076
|
}
|
|
11076
11077
|
}
|
|
11078
|
+
function isSessionNotFound(err) {
|
|
11079
|
+
const e = err;
|
|
11080
|
+
if (!e || e.statusCode !== 404 || typeof e.body !== "string") return false;
|
|
11081
|
+
try {
|
|
11082
|
+
const parsed = JSON.parse(e.body);
|
|
11083
|
+
return parsed?.code === "SESSION_NOT_FOUND" || parsed?.error?.code === "SESSION_NOT_FOUND";
|
|
11084
|
+
} catch {
|
|
11085
|
+
return false;
|
|
11086
|
+
}
|
|
11087
|
+
}
|
|
11077
11088
|
var _transport = {
|
|
11078
11089
|
postJson: _postJson,
|
|
11079
11090
|
getJson: _getJson,
|
|
@@ -12241,7 +12252,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
12241
12252
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
12242
12253
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
12243
12254
|
// pair/reconnect). Older backends ignore the extra field.
|
|
12244
|
-
..."2.76.
|
|
12255
|
+
..."2.76.32" ? { ideVersion: "2.76.32" } : {}
|
|
12245
12256
|
};
|
|
12246
12257
|
try {
|
|
12247
12258
|
const res = await _postJson(`${API_BASE2}/api/plugin/heartbeat`, body, this.pollSecretHeader());
|
|
@@ -47853,6 +47864,7 @@ async function start(requestedAgent, presetSession) {
|
|
|
47853
47864
|
const cwd = process.cwd();
|
|
47854
47865
|
let reconnectUserId;
|
|
47855
47866
|
let reconnectPlan;
|
|
47867
|
+
let sessionGone = false;
|
|
47856
47868
|
const refreshed = await fetchCurrentPluginAuthToken(
|
|
47857
47869
|
session.id,
|
|
47858
47870
|
pluginId,
|
|
@@ -47860,8 +47872,19 @@ async function start(requestedAgent, presetSession) {
|
|
|
47860
47872
|
(userId, plan) => {
|
|
47861
47873
|
reconnectUserId = userId;
|
|
47862
47874
|
reconnectPlan = plan;
|
|
47875
|
+
},
|
|
47876
|
+
() => {
|
|
47877
|
+
sessionGone = true;
|
|
47863
47878
|
}
|
|
47864
47879
|
);
|
|
47880
|
+
if (sessionGone) {
|
|
47881
|
+
showInfo("This session was deleted from the app \u2014 not resuming it.");
|
|
47882
|
+
try {
|
|
47883
|
+
removeSession(session.id);
|
|
47884
|
+
} catch {
|
|
47885
|
+
}
|
|
47886
|
+
process.exit(0);
|
|
47887
|
+
}
|
|
47865
47888
|
if (refreshed && refreshed !== session.pluginAuthToken) {
|
|
47866
47889
|
addSession({ ...session, pluginAuthToken: refreshed });
|
|
47867
47890
|
session.pluginAuthToken = refreshed;
|
|
@@ -51478,7 +51501,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
51478
51501
|
if (process.env.NODE_ENV === "test") return;
|
|
51479
51502
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
51480
51503
|
if (process.env.CI) return;
|
|
51481
|
-
const current2 = true ? "2.76.
|
|
51504
|
+
const current2 = true ? "2.76.32" : null;
|
|
51482
51505
|
if (!current2) return;
|
|
51483
51506
|
const cache = readCache();
|
|
51484
51507
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -51495,7 +51518,7 @@ function checkForUpdates() {
|
|
|
51495
51518
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
51496
51519
|
if (process.env.CI) return;
|
|
51497
51520
|
if (!process.stdout.isTTY) return;
|
|
51498
|
-
const current2 = true ? "2.76.
|
|
51521
|
+
const current2 = true ? "2.76.32" : null;
|
|
51499
51522
|
if (!current2) return;
|
|
51500
51523
|
const cache = readCache();
|
|
51501
51524
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -51778,7 +51801,7 @@ var SELF_UPDATE_VIEW_TIMEOUT_MS = 3e4;
|
|
|
51778
51801
|
var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
51779
51802
|
var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
|
|
51780
51803
|
function currentCliVersion() {
|
|
51781
|
-
return true ? "2.76.
|
|
51804
|
+
return true ? "2.76.32" : null;
|
|
51782
51805
|
}
|
|
51783
51806
|
async function installedVersion(deps) {
|
|
51784
51807
|
const ls = await deps.run(
|
|
@@ -51989,7 +52012,7 @@ function signalHostReady(send = process.send?.bind(process)) {
|
|
|
51989
52012
|
}
|
|
51990
52013
|
function defaultDeps() {
|
|
51991
52014
|
return {
|
|
51992
|
-
ownVersion: true ? "2.76.
|
|
52015
|
+
ownVersion: true ? "2.76.32" : null,
|
|
51993
52016
|
root: cliVersionsRoot(),
|
|
51994
52017
|
args: process.argv.slice(3),
|
|
51995
52018
|
execPath: process.execPath,
|
|
@@ -54527,7 +54550,7 @@ function checkChokidar() {
|
|
|
54527
54550
|
}
|
|
54528
54551
|
async function doctor(args2 = []) {
|
|
54529
54552
|
const json = args2.includes("--json");
|
|
54530
|
-
const cliVersion = true ? "2.76.
|
|
54553
|
+
const cliVersion = true ? "2.76.32" : "0.0.0-dev";
|
|
54531
54554
|
const apiBase2 = resolveApiBaseUrl();
|
|
54532
54555
|
const diagnosticId = (0, import_node_crypto17.randomUUID)();
|
|
54533
54556
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -55063,7 +55086,7 @@ async function mcpWarm(argv = [], opts = {}) {
|
|
|
55063
55086
|
// src/commands/version.ts
|
|
55064
55087
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
55065
55088
|
function version2() {
|
|
55066
|
-
const v = true ? "2.76.
|
|
55089
|
+
const v = true ? "2.76.32" : "unknown";
|
|
55067
55090
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
55068
55091
|
}
|
|
55069
55092
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.76.
|
|
3
|
+
"version": "2.76.32",
|
|
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",
|