codeam-cli 2.23.13 → 2.23.14
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 +157 -23
- 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.23.12] — 2026-05-27
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Auto-enable codespace keep-alive on start
|
|
12
|
+
|
|
7
13
|
## [2.23.11] — 2026-05-27
|
|
8
14
|
|
|
9
15
|
### Fixed
|
package/dist/index.js
CHANGED
|
@@ -441,7 +441,7 @@ var import_qrcode_terminal = __toESM(require("qrcode-terminal"));
|
|
|
441
441
|
// package.json
|
|
442
442
|
var package_default = {
|
|
443
443
|
name: "codeam-cli",
|
|
444
|
-
version: "2.23.
|
|
444
|
+
version: "2.23.14",
|
|
445
445
|
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.",
|
|
446
446
|
type: "commonjs",
|
|
447
447
|
main: "dist/index.js",
|
|
@@ -5774,7 +5774,7 @@ function readAnonId() {
|
|
|
5774
5774
|
}
|
|
5775
5775
|
function superProperties() {
|
|
5776
5776
|
return {
|
|
5777
|
-
cliVersion: true ? "2.23.
|
|
5777
|
+
cliVersion: true ? "2.23.14" : "0.0.0-dev",
|
|
5778
5778
|
nodeVersion: process.version,
|
|
5779
5779
|
platform: process.platform,
|
|
5780
5780
|
arch: process.arch,
|
|
@@ -16172,6 +16172,157 @@ async function autoLinkAfterPair(opts) {
|
|
|
16172
16172
|
var fs28 = __toESM(require("fs"));
|
|
16173
16173
|
var os24 = __toESM(require("os"));
|
|
16174
16174
|
var import_crypto7 = require("crypto");
|
|
16175
|
+
|
|
16176
|
+
// src/commands/start-infra-only.ts
|
|
16177
|
+
var INFRA_ONLY_COMMAND_TYPES = /* @__PURE__ */ new Set([
|
|
16178
|
+
// File ops (drive the dashboard's Files panel + open-file).
|
|
16179
|
+
"read_file",
|
|
16180
|
+
"write_file",
|
|
16181
|
+
"list_files",
|
|
16182
|
+
"search_files",
|
|
16183
|
+
// IDE terminal — the user opens a shell inside the codespace
|
|
16184
|
+
// from the dashboard. Independent of any agent.
|
|
16185
|
+
"terminal_open",
|
|
16186
|
+
"terminal_write",
|
|
16187
|
+
"terminal_resize",
|
|
16188
|
+
"terminal_close",
|
|
16189
|
+
// Git surface — repo browsing / commit / push from the
|
|
16190
|
+
// dashboard. Calls plain `git`, no agent involved.
|
|
16191
|
+
"git_status",
|
|
16192
|
+
"git_diff",
|
|
16193
|
+
"git_diff_staged",
|
|
16194
|
+
"git_log",
|
|
16195
|
+
"git_commit",
|
|
16196
|
+
"git_push",
|
|
16197
|
+
"git_pull",
|
|
16198
|
+
"git_resolve",
|
|
16199
|
+
// Review apply path (dashboard's per-file review surface).
|
|
16200
|
+
"apply_file_review",
|
|
16201
|
+
// CLI-side handoff for `codeam link <agent>` (claims tokens
|
|
16202
|
+
// for the user's LinkedAgents from inside the codespace).
|
|
16203
|
+
"request_link_credentials",
|
|
16204
|
+
// Lets the dashboard toggle the codespace idle-timeout
|
|
16205
|
+
// (defaults to 240 min inside a codespace).
|
|
16206
|
+
"set_keep_alive"
|
|
16207
|
+
]);
|
|
16208
|
+
async function startInfraOnly(agentId) {
|
|
16209
|
+
const session = getActiveSession();
|
|
16210
|
+
if (!session?.pluginId) {
|
|
16211
|
+
throw new Error("startInfraOnly: no active session found in config");
|
|
16212
|
+
}
|
|
16213
|
+
const pluginId = session.pluginId;
|
|
16214
|
+
const cwd = process.cwd();
|
|
16215
|
+
const agentMeta = AGENT_REGISTRY[agentId];
|
|
16216
|
+
if (!agentMeta) {
|
|
16217
|
+
throw new Error(`startInfraOnly: unknown agent id "${agentId}"`);
|
|
16218
|
+
}
|
|
16219
|
+
const keepAliveCtx = {
|
|
16220
|
+
inCodespace: process.env.CODESPACES === "true",
|
|
16221
|
+
codespaceName: process.env.CODESPACE_NAME
|
|
16222
|
+
};
|
|
16223
|
+
const { apply: setKeepAlive2 } = buildKeepAlive(keepAliveCtx);
|
|
16224
|
+
if (keepAliveCtx.inCodespace) {
|
|
16225
|
+
setKeepAlive2(true);
|
|
16226
|
+
}
|
|
16227
|
+
const fileWatcher = session.pluginAuthToken ? new FileWatcherService({
|
|
16228
|
+
workingDir: cwd,
|
|
16229
|
+
sessionId: session.id,
|
|
16230
|
+
pluginId,
|
|
16231
|
+
pluginAuthToken: session.pluginAuthToken
|
|
16232
|
+
}) : null;
|
|
16233
|
+
let relayRef = null;
|
|
16234
|
+
const ctx = {
|
|
16235
|
+
// Agent-touching fields are not used by any of the commands
|
|
16236
|
+
// we dispatch in this mode. Casting through `unknown` keeps
|
|
16237
|
+
// TypeScript happy without forcing a HandlerContext refactor
|
|
16238
|
+
// — the field-touching commands are filtered out by
|
|
16239
|
+
// INFRA_ONLY_COMMAND_TYPES before the handler is even called.
|
|
16240
|
+
agent: null,
|
|
16241
|
+
outputSvc: null,
|
|
16242
|
+
historySvc: null,
|
|
16243
|
+
runtime: null,
|
|
16244
|
+
relay: null,
|
|
16245
|
+
setKeepAlive: setKeepAlive2,
|
|
16246
|
+
keepAliveCtx,
|
|
16247
|
+
pluginId,
|
|
16248
|
+
sessionId: session.id,
|
|
16249
|
+
pluginAuthToken: session.pluginAuthToken ?? void 0
|
|
16250
|
+
};
|
|
16251
|
+
const relay = new CommandRelayService(
|
|
16252
|
+
pluginId,
|
|
16253
|
+
async (cmd) => {
|
|
16254
|
+
if (!INFRA_ONLY_COMMAND_TYPES.has(cmd.type)) {
|
|
16255
|
+
log.trace("infra-only", `dropping agent-only command type=${cmd.type}`);
|
|
16256
|
+
return;
|
|
16257
|
+
}
|
|
16258
|
+
const handler = handlers[cmd.type];
|
|
16259
|
+
if (!handler) {
|
|
16260
|
+
log.trace("infra-only", `no handler registered for type=${cmd.type}`);
|
|
16261
|
+
return;
|
|
16262
|
+
}
|
|
16263
|
+
const parsed = parsePayload2(startCommandSchema, cmd.payload);
|
|
16264
|
+
if (!parsed) {
|
|
16265
|
+
log.trace("infra-only", `malformed payload for type=${cmd.type}`);
|
|
16266
|
+
return;
|
|
16267
|
+
}
|
|
16268
|
+
try {
|
|
16269
|
+
await handler(ctx, cmd, parsed);
|
|
16270
|
+
} catch (err) {
|
|
16271
|
+
log.warn("infra-only", `handler ${cmd.type} threw`, err);
|
|
16272
|
+
}
|
|
16273
|
+
},
|
|
16274
|
+
agentMeta,
|
|
16275
|
+
[]
|
|
16276
|
+
// empty agents list → dashboard renders NoAgentHero
|
|
16277
|
+
);
|
|
16278
|
+
ctx.relay = relay;
|
|
16279
|
+
relayRef = relay;
|
|
16280
|
+
const terminalEmitter = new ChunkEmitter({
|
|
16281
|
+
sessionId: session.id,
|
|
16282
|
+
pluginId,
|
|
16283
|
+
pluginAuthToken: session.pluginAuthToken
|
|
16284
|
+
});
|
|
16285
|
+
registerTerminalHandlers({
|
|
16286
|
+
onData: ({ sessionId: termSessionId, data }) => {
|
|
16287
|
+
void terminalEmitter.send({
|
|
16288
|
+
type: "terminal_data",
|
|
16289
|
+
terminalSessionId: termSessionId,
|
|
16290
|
+
data,
|
|
16291
|
+
done: false
|
|
16292
|
+
});
|
|
16293
|
+
},
|
|
16294
|
+
onExit: ({ sessionId: termSessionId, exitCode }) => {
|
|
16295
|
+
void terminalEmitter.send({
|
|
16296
|
+
type: "terminal_exit",
|
|
16297
|
+
terminalSessionId: termSessionId,
|
|
16298
|
+
exitCode,
|
|
16299
|
+
done: true
|
|
16300
|
+
});
|
|
16301
|
+
}
|
|
16302
|
+
});
|
|
16303
|
+
relay.start();
|
|
16304
|
+
if (fileWatcher) {
|
|
16305
|
+
fileWatcher.start().catch(() => {
|
|
16306
|
+
});
|
|
16307
|
+
}
|
|
16308
|
+
const sigHandler = () => {
|
|
16309
|
+
try {
|
|
16310
|
+
relayRef?.stop();
|
|
16311
|
+
} catch {
|
|
16312
|
+
}
|
|
16313
|
+
void fileWatcher?.stop();
|
|
16314
|
+
closeAllTerminals();
|
|
16315
|
+
cleanupAttachmentTempFiles();
|
|
16316
|
+
process.exit(0);
|
|
16317
|
+
};
|
|
16318
|
+
process.once("SIGINT", sigHandler);
|
|
16319
|
+
process.once("SIGTERM", sigHandler);
|
|
16320
|
+
process.once("SIGHUP", sigHandler);
|
|
16321
|
+
await new Promise(() => {
|
|
16322
|
+
});
|
|
16323
|
+
}
|
|
16324
|
+
|
|
16325
|
+
// src/commands/pair-auto.ts
|
|
16175
16326
|
var API_BASE8 = resolveApiBaseUrl();
|
|
16176
16327
|
function fail(msg) {
|
|
16177
16328
|
console.error(`
|
|
@@ -16320,24 +16471,7 @@ async function pairAuto(args2) {
|
|
|
16320
16471
|
console.log(
|
|
16321
16472
|
" Skipping agent launch \u2014 install an agent from the dashboard to start chatting."
|
|
16322
16473
|
);
|
|
16323
|
-
|
|
16324
|
-
pluginId,
|
|
16325
|
-
async () => {
|
|
16326
|
-
},
|
|
16327
|
-
AGENT_REGISTRY[claimed.agent],
|
|
16328
|
-
[]
|
|
16329
|
-
// empty agents list
|
|
16330
|
-
);
|
|
16331
|
-
heartbeatRelay.start();
|
|
16332
|
-
const sigHandler = () => {
|
|
16333
|
-
heartbeatRelay.stop();
|
|
16334
|
-
process.exit(0);
|
|
16335
|
-
};
|
|
16336
|
-
process.once("SIGINT", sigHandler);
|
|
16337
|
-
process.once("SIGTERM", sigHandler);
|
|
16338
|
-
process.once("SIGHUP", sigHandler);
|
|
16339
|
-
await new Promise(() => {
|
|
16340
|
-
});
|
|
16474
|
+
await startInfraOnly(claimed.agent);
|
|
16341
16475
|
return;
|
|
16342
16476
|
}
|
|
16343
16477
|
console.log(" Starting agent loop\u2026");
|
|
@@ -18586,7 +18720,7 @@ function checkChokidar() {
|
|
|
18586
18720
|
}
|
|
18587
18721
|
async function doctor(args2 = []) {
|
|
18588
18722
|
const json = args2.includes("--json");
|
|
18589
|
-
const cliVersion = true ? "2.23.
|
|
18723
|
+
const cliVersion = true ? "2.23.14" : "0.0.0-dev";
|
|
18590
18724
|
const apiBase = resolveApiBaseUrl();
|
|
18591
18725
|
const diagnosticId = (0, import_node_crypto5.randomUUID)();
|
|
18592
18726
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -18785,7 +18919,7 @@ async function completion(args2) {
|
|
|
18785
18919
|
// src/commands/version.ts
|
|
18786
18920
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
18787
18921
|
function version2() {
|
|
18788
|
-
const v = true ? "2.23.
|
|
18922
|
+
const v = true ? "2.23.14" : "unknown";
|
|
18789
18923
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
18790
18924
|
}
|
|
18791
18925
|
|
|
@@ -19013,7 +19147,7 @@ function checkForUpdates() {
|
|
|
19013
19147
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
19014
19148
|
if (process.env.CI) return;
|
|
19015
19149
|
if (!process.stdout.isTTY) return;
|
|
19016
|
-
const current = true ? "2.23.
|
|
19150
|
+
const current = true ? "2.23.14" : null;
|
|
19017
19151
|
if (!current) return;
|
|
19018
19152
|
const cache = readCache();
|
|
19019
19153
|
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.23.
|
|
3
|
+
"version": "2.23.14",
|
|
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",
|