codeam-cli 2.23.12 → 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 +169 -14
- 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,
|
|
@@ -5869,14 +5869,16 @@ var API_BASE2 = resolveApiBaseUrl();
|
|
|
5869
5869
|
var SSE_LIVENESS_TIMEOUT_MS = 45e3;
|
|
5870
5870
|
var SSE_WATCHDOG_INTERVAL_MS = 1e4;
|
|
5871
5871
|
var CommandRelayService = class {
|
|
5872
|
-
constructor(pluginId, onCommand, agentMeta) {
|
|
5872
|
+
constructor(pluginId, onCommand, agentMeta, agentsOverride) {
|
|
5873
5873
|
this.pluginId = pluginId;
|
|
5874
5874
|
this.onCommand = onCommand;
|
|
5875
5875
|
this.agentMeta = agentMeta;
|
|
5876
|
+
this.agentsOverride = agentsOverride;
|
|
5876
5877
|
}
|
|
5877
5878
|
pluginId;
|
|
5878
5879
|
onCommand;
|
|
5879
5880
|
agentMeta;
|
|
5881
|
+
agentsOverride;
|
|
5880
5882
|
_running = false;
|
|
5881
5883
|
heartbeatTimer = null;
|
|
5882
5884
|
agentsTimer = null;
|
|
@@ -6142,16 +6144,17 @@ var CommandRelayService = class {
|
|
|
6142
6144
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
6143
6145
|
}
|
|
6144
6146
|
reportAgents() {
|
|
6147
|
+
const agents = this.agentsOverride ? [...this.agentsOverride] : [
|
|
6148
|
+
{
|
|
6149
|
+
id: this.agentMeta.id,
|
|
6150
|
+
name: this.agentMeta.displayName,
|
|
6151
|
+
icon: this.agentMeta.id,
|
|
6152
|
+
installed: true
|
|
6153
|
+
}
|
|
6154
|
+
];
|
|
6145
6155
|
_postJson(`${API_BASE2}/api/plugin/agents`, {
|
|
6146
6156
|
pluginId: this.pluginId,
|
|
6147
|
-
agents
|
|
6148
|
-
{
|
|
6149
|
-
id: this.agentMeta.id,
|
|
6150
|
-
name: this.agentMeta.displayName,
|
|
6151
|
-
icon: this.agentMeta.id,
|
|
6152
|
-
installed: true
|
|
6153
|
-
}
|
|
6154
|
-
]
|
|
6157
|
+
agents
|
|
6155
6158
|
}).then(() => {
|
|
6156
6159
|
this.agentsRegistered = true;
|
|
6157
6160
|
}).catch(() => {
|
|
@@ -16169,6 +16172,157 @@ async function autoLinkAfterPair(opts) {
|
|
|
16169
16172
|
var fs28 = __toESM(require("fs"));
|
|
16170
16173
|
var os24 = __toESM(require("os"));
|
|
16171
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
|
|
16172
16326
|
var API_BASE8 = resolveApiBaseUrl();
|
|
16173
16327
|
function fail(msg) {
|
|
16174
16328
|
console.error(`
|
|
@@ -16317,6 +16471,7 @@ async function pairAuto(args2) {
|
|
|
16317
16471
|
console.log(
|
|
16318
16472
|
" Skipping agent launch \u2014 install an agent from the dashboard to start chatting."
|
|
16319
16473
|
);
|
|
16474
|
+
await startInfraOnly(claimed.agent);
|
|
16320
16475
|
return;
|
|
16321
16476
|
}
|
|
16322
16477
|
console.log(" Starting agent loop\u2026");
|
|
@@ -18565,7 +18720,7 @@ function checkChokidar() {
|
|
|
18565
18720
|
}
|
|
18566
18721
|
async function doctor(args2 = []) {
|
|
18567
18722
|
const json = args2.includes("--json");
|
|
18568
|
-
const cliVersion = true ? "2.23.
|
|
18723
|
+
const cliVersion = true ? "2.23.14" : "0.0.0-dev";
|
|
18569
18724
|
const apiBase = resolveApiBaseUrl();
|
|
18570
18725
|
const diagnosticId = (0, import_node_crypto5.randomUUID)();
|
|
18571
18726
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -18764,7 +18919,7 @@ async function completion(args2) {
|
|
|
18764
18919
|
// src/commands/version.ts
|
|
18765
18920
|
var import_picocolors13 = __toESM(require("picocolors"));
|
|
18766
18921
|
function version2() {
|
|
18767
|
-
const v = true ? "2.23.
|
|
18922
|
+
const v = true ? "2.23.14" : "unknown";
|
|
18768
18923
|
console.log(`${import_picocolors13.default.bold("codeam-cli")} ${import_picocolors13.default.cyan(v)}`);
|
|
18769
18924
|
}
|
|
18770
18925
|
|
|
@@ -18992,7 +19147,7 @@ function checkForUpdates() {
|
|
|
18992
19147
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
18993
19148
|
if (process.env.CI) return;
|
|
18994
19149
|
if (!process.stdout.isTTY) return;
|
|
18995
|
-
const current = true ? "2.23.
|
|
19150
|
+
const current = true ? "2.23.14" : null;
|
|
18996
19151
|
if (!current) return;
|
|
18997
19152
|
const cache = readCache();
|
|
18998
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",
|