codeam-cli 2.43.3 → 2.43.4
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/CHANGELOG.md +6 -0
- package/dist/index.js +120 -12
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,12 @@ All notable changes to `codeam-cli` are documented here.
|
|
|
4
4
|
|
|
5
5
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [2.43.3] — 2026-06-25
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Codex can reach the Beads/Dolt socket in the autonomous plane
|
|
12
|
+
|
|
7
13
|
## [2.43.2] — 2026-06-25
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -5397,7 +5397,7 @@ function readAnonId() {
|
|
|
5397
5397
|
}
|
|
5398
5398
|
function superProperties() {
|
|
5399
5399
|
return {
|
|
5400
|
-
cliVersion: true ? "2.43.
|
|
5400
|
+
cliVersion: true ? "2.43.4" : "0.0.0-dev",
|
|
5401
5401
|
nodeVersion: process.version,
|
|
5402
5402
|
platform: process.platform,
|
|
5403
5403
|
arch: process.arch,
|
|
@@ -5578,7 +5578,7 @@ var os4 = __toESM(require("os"));
|
|
|
5578
5578
|
// package.json
|
|
5579
5579
|
var package_default = {
|
|
5580
5580
|
name: "codeam-cli",
|
|
5581
|
-
version: "2.43.
|
|
5581
|
+
version: "2.43.4",
|
|
5582
5582
|
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.",
|
|
5583
5583
|
type: "commonjs",
|
|
5584
5584
|
main: "dist/index.js",
|
|
@@ -12222,6 +12222,64 @@ function listResumableSessions2(cwd, homeOverride) {
|
|
|
12222
12222
|
out2.sort((a, b) => b.timestamp - a.timestamp);
|
|
12223
12223
|
return out2;
|
|
12224
12224
|
}
|
|
12225
|
+
function resolveHistoryFile(cwd, sessionId, homeOverride) {
|
|
12226
|
+
const home = homeOverride ?? import_node_os.default.homedir();
|
|
12227
|
+
const sessionsRoot = import_node_path2.default.join(home, ".codex", "sessions");
|
|
12228
|
+
if (!import_node_fs3.default.existsSync(sessionsRoot)) return null;
|
|
12229
|
+
let resolvedCurrent;
|
|
12230
|
+
try {
|
|
12231
|
+
resolvedCurrent = import_node_fs3.default.realpathSync(cwd);
|
|
12232
|
+
} catch {
|
|
12233
|
+
resolvedCurrent = import_node_path2.default.resolve(cwd);
|
|
12234
|
+
}
|
|
12235
|
+
const now = /* @__PURE__ */ new Date();
|
|
12236
|
+
for (let dayOffset = 0; dayOffset < 7; dayOffset += 1) {
|
|
12237
|
+
const d3 = new Date(now.getTime() - dayOffset * 24 * 60 * 60 * 1e3);
|
|
12238
|
+
const yyyy = String(d3.getUTCFullYear());
|
|
12239
|
+
const mm = String(d3.getUTCMonth() + 1).padStart(2, "0");
|
|
12240
|
+
const dd = String(d3.getUTCDate()).padStart(2, "0");
|
|
12241
|
+
const dayDir = import_node_path2.default.join(sessionsRoot, yyyy, mm, dd);
|
|
12242
|
+
if (!import_node_fs3.default.existsSync(dayDir)) continue;
|
|
12243
|
+
let dayFiles;
|
|
12244
|
+
try {
|
|
12245
|
+
dayFiles = import_node_fs3.default.readdirSync(dayDir, { withFileTypes: true });
|
|
12246
|
+
} catch {
|
|
12247
|
+
continue;
|
|
12248
|
+
}
|
|
12249
|
+
for (const entry of dayFiles) {
|
|
12250
|
+
if (!entry.isFile()) continue;
|
|
12251
|
+
if (!entry.name.startsWith("rollout-") || !entry.name.endsWith(".jsonl")) continue;
|
|
12252
|
+
const filePath = import_node_path2.default.join(dayDir, entry.name);
|
|
12253
|
+
let metaCwd;
|
|
12254
|
+
let metaId;
|
|
12255
|
+
try {
|
|
12256
|
+
const raw = import_node_fs3.default.readFileSync(filePath, "utf8");
|
|
12257
|
+
for (const line of raw.split("\n")) {
|
|
12258
|
+
if (!line.trim()) continue;
|
|
12259
|
+
const rec = parseLine(line);
|
|
12260
|
+
if (!rec) continue;
|
|
12261
|
+
if (rec.type === "session_meta") {
|
|
12262
|
+
const meta = rec.payload;
|
|
12263
|
+
metaCwd = typeof meta?.cwd === "string" ? meta.cwd : void 0;
|
|
12264
|
+
metaId = typeof meta?.id === "string" ? meta.id : void 0;
|
|
12265
|
+
break;
|
|
12266
|
+
}
|
|
12267
|
+
}
|
|
12268
|
+
} catch {
|
|
12269
|
+
continue;
|
|
12270
|
+
}
|
|
12271
|
+
if (metaId !== sessionId || !metaCwd) continue;
|
|
12272
|
+
let resolvedMeta;
|
|
12273
|
+
try {
|
|
12274
|
+
resolvedMeta = import_node_fs3.default.realpathSync(metaCwd);
|
|
12275
|
+
} catch {
|
|
12276
|
+
resolvedMeta = import_node_path2.default.resolve(metaCwd);
|
|
12277
|
+
}
|
|
12278
|
+
if (resolvedMeta === resolvedCurrent) return filePath;
|
|
12279
|
+
}
|
|
12280
|
+
}
|
|
12281
|
+
return null;
|
|
12282
|
+
}
|
|
12225
12283
|
function getCurrentUsage2(historyDir) {
|
|
12226
12284
|
if (!import_node_fs3.default.existsSync(historyDir)) return null;
|
|
12227
12285
|
const files = import_node_fs3.default.readdirSync(historyDir).filter((f) => f.startsWith("rollout-") && f.endsWith(".jsonl")).map((f) => ({ name: f, full: import_node_path2.default.join(historyDir, f) })).map((e) => ({ ...e, mtime: import_node_fs3.default.statSync(e.full).mtimeMs })).sort((a, b) => b.mtime - a.mtime);
|
|
@@ -12386,6 +12444,9 @@ var CodexRuntimeStrategy = class {
|
|
|
12386
12444
|
parseHistoryFile(filePath) {
|
|
12387
12445
|
return parseHistoryFile2(filePath);
|
|
12388
12446
|
}
|
|
12447
|
+
resolveHistoryFile(cwd, sessionId) {
|
|
12448
|
+
return resolveHistoryFile(cwd, sessionId);
|
|
12449
|
+
}
|
|
12389
12450
|
getCurrentUsage(historyDir) {
|
|
12390
12451
|
return getCurrentUsage2(historyDir);
|
|
12391
12452
|
}
|
|
@@ -17823,7 +17884,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
17823
17884
|
if (process.env.NODE_ENV === "test") return;
|
|
17824
17885
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17825
17886
|
if (process.env.CI) return;
|
|
17826
|
-
const current = true ? "2.43.
|
|
17887
|
+
const current = true ? "2.43.4" : null;
|
|
17827
17888
|
if (!current) return;
|
|
17828
17889
|
const cache = readCache();
|
|
17829
17890
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -17840,7 +17901,7 @@ function checkForUpdates() {
|
|
|
17840
17901
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
17841
17902
|
if (process.env.CI) return;
|
|
17842
17903
|
if (!process.stdout.isTTY) return;
|
|
17843
|
-
const current = true ? "2.43.
|
|
17904
|
+
const current = true ? "2.43.4" : null;
|
|
17844
17905
|
if (!current) return;
|
|
17845
17906
|
const cache = readCache();
|
|
17846
17907
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -18278,7 +18339,7 @@ var defaultSpawner = (env, cwd, args2 = []) => (0, import_node_child_process14.s
|
|
|
18278
18339
|
detached: false
|
|
18279
18340
|
});
|
|
18280
18341
|
function currentCliVersion() {
|
|
18281
|
-
return true ? "2.43.
|
|
18342
|
+
return true ? "2.43.4" : null;
|
|
18282
18343
|
}
|
|
18283
18344
|
function runCmd(cmd, args2, timeoutMs) {
|
|
18284
18345
|
return new Promise((resolve7) => {
|
|
@@ -20090,9 +20151,56 @@ var HistoryService = class _HistoryService {
|
|
|
20090
20151
|
* still fails after all attempts so callers skip newTurnResume instead of
|
|
20091
20152
|
* showing an empty conversation.
|
|
20092
20153
|
*/
|
|
20154
|
+
/**
|
|
20155
|
+
* Resolve the on-disk transcript file for a conversation, agent-aware.
|
|
20156
|
+
*
|
|
20157
|
+
* Claude stores `<projectDir>/<sessionId>.jsonl`. Other agents name the
|
|
20158
|
+
* file differently and key the session id INSIDE it (Codex rollouts), so
|
|
20159
|
+
* when the strategy exposes `resolveHistoryFile` we defer to it. Returns
|
|
20160
|
+
* null when no transcript exists for this session yet.
|
|
20161
|
+
*/
|
|
20162
|
+
resolveConversationFile(sessionId) {
|
|
20163
|
+
if (this.runtime.resolveHistoryFile) {
|
|
20164
|
+
return this.runtime.resolveHistoryFile(this.cwd, sessionId);
|
|
20165
|
+
}
|
|
20166
|
+
return path49.join(this.projectDir, `${sessionId}.jsonl`);
|
|
20167
|
+
}
|
|
20168
|
+
/**
|
|
20169
|
+
* Parse a conversation's messages from disk, agent-aware. Claude uses the
|
|
20170
|
+
* service's own JSONL parser (unchanged); agents with a custom on-disk
|
|
20171
|
+
* layout parse via their strategy's {@link RuntimeStrategy.parseHistoryFile}
|
|
20172
|
+
* (e.g. Codex rollouts), mapping the shared NormalizedMessage shape onto our
|
|
20173
|
+
* wire shape and dropping `system` rows (the conversation view renders only
|
|
20174
|
+
* user/agent). Returns [] when the file is missing/unreadable — same
|
|
20175
|
+
* convention as parseJsonl.
|
|
20176
|
+
*/
|
|
20177
|
+
readConversation(sessionId) {
|
|
20178
|
+
if (this.runtime.resolveHistoryFile) {
|
|
20179
|
+
const filePath = this.runtime.resolveHistoryFile(this.cwd, sessionId);
|
|
20180
|
+
if (!filePath) return [];
|
|
20181
|
+
let parsed;
|
|
20182
|
+
try {
|
|
20183
|
+
parsed = this.runtime.parseHistoryFile(filePath);
|
|
20184
|
+
} catch (err) {
|
|
20185
|
+
log.warn("history:readConversation", `parseHistoryFile failed for ${filePath}`, err);
|
|
20186
|
+
return [];
|
|
20187
|
+
}
|
|
20188
|
+
return parsed.filter(
|
|
20189
|
+
(m) => m.role === "user" || m.role === "agent"
|
|
20190
|
+
).map((m) => {
|
|
20191
|
+
const ms = new Date(m.timestamp).getTime();
|
|
20192
|
+
return {
|
|
20193
|
+
id: m.id,
|
|
20194
|
+
role: m.role,
|
|
20195
|
+
text: m.text,
|
|
20196
|
+
timestamp: Number.isFinite(ms) ? ms : Date.now()
|
|
20197
|
+
};
|
|
20198
|
+
});
|
|
20199
|
+
}
|
|
20200
|
+
return parseJsonl(path49.join(this.projectDir, `${sessionId}.jsonl`));
|
|
20201
|
+
}
|
|
20093
20202
|
async loadConversation(sessionId) {
|
|
20094
|
-
const
|
|
20095
|
-
const messages = parseJsonl(filePath);
|
|
20203
|
+
const messages = this.readConversation(sessionId);
|
|
20096
20204
|
if (messages.length === 0) return;
|
|
20097
20205
|
const totalBatches = Math.ceil(messages.length / CONVERSATION_BATCH_SIZE);
|
|
20098
20206
|
const RETRY_DELAYS = [500, 1e3, 2e3, 4e3, 8e3];
|
|
@@ -20141,7 +20249,8 @@ var HistoryService = class _HistoryService {
|
|
|
20141
20249
|
* or no transcript exists yet (not an error).
|
|
20142
20250
|
*/
|
|
20143
20251
|
async uploadConversationIfChanged(sessionId) {
|
|
20144
|
-
const filePath =
|
|
20252
|
+
const filePath = this.resolveConversationFile(sessionId);
|
|
20253
|
+
if (!filePath) return false;
|
|
20145
20254
|
let mtimeMs;
|
|
20146
20255
|
try {
|
|
20147
20256
|
mtimeMs = fs42.statSync(filePath).mtimeMs;
|
|
@@ -20183,8 +20292,7 @@ var HistoryService = class _HistoryService {
|
|
|
20183
20292
|
sessionId = this.currentConversationId;
|
|
20184
20293
|
if (!sessionId) return 0;
|
|
20185
20294
|
}
|
|
20186
|
-
const
|
|
20187
|
-
const messages = parseJsonl(filePath);
|
|
20295
|
+
const messages = this.readConversation(sessionId);
|
|
20188
20296
|
if (messages.length === 0) return 0;
|
|
20189
20297
|
const marker = this.lastUploadedUuid.get(sessionId);
|
|
20190
20298
|
let newMessages = messages;
|
|
@@ -29392,7 +29500,7 @@ function checkChokidar() {
|
|
|
29392
29500
|
}
|
|
29393
29501
|
async function doctor(args2 = []) {
|
|
29394
29502
|
const json = args2.includes("--json");
|
|
29395
|
-
const cliVersion = true ? "2.43.
|
|
29503
|
+
const cliVersion = true ? "2.43.4" : "0.0.0-dev";
|
|
29396
29504
|
const apiBase2 = resolveApiBaseUrl();
|
|
29397
29505
|
const diagnosticId = (0, import_node_crypto8.randomUUID)();
|
|
29398
29506
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -29591,7 +29699,7 @@ async function completion(args2) {
|
|
|
29591
29699
|
// src/commands/version.ts
|
|
29592
29700
|
var import_picocolors14 = __toESM(require("picocolors"));
|
|
29593
29701
|
function version2() {
|
|
29594
|
-
const v = true ? "2.43.
|
|
29702
|
+
const v = true ? "2.43.4" : "unknown";
|
|
29595
29703
|
console.log(`${import_picocolors14.default.bold("codeam-cli")} ${import_picocolors14.default.cyan(v)}`);
|
|
29596
29704
|
}
|
|
29597
29705
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.43.
|
|
3
|
+
"version": "2.43.4",
|
|
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",
|