codeam-cli 2.74.14 → 2.75.0
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 +7 -0
- package/dist/index.js +124 -35
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -4,6 +4,13 @@ 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.74.14] — 2026-09-11
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- **cli:** Stop dropping short ACP text deltas that are a prefix of the reply (#748)
|
|
12
|
+
- **cli:** Resolve select_option by optionId, stop adding `from` as an index offset (#749)
|
|
13
|
+
|
|
7
14
|
## [2.74.13] — 2026-09-10
|
|
8
15
|
|
|
9
16
|
### Added
|
package/dist/index.js
CHANGED
|
@@ -950,6 +950,38 @@ function isKnownAgentId(id) {
|
|
|
950
950
|
var HOUSE_AGENT_ID = "house-codeagent-cloud";
|
|
951
951
|
var HOUSE_AGENT_NAME = "CodeAgent Cloud";
|
|
952
952
|
var HOUSE_AGENT_SUBTITLE = "Included \u2014 no setup";
|
|
953
|
+
var MANAGED_PROVIDER_IDS = [
|
|
954
|
+
"managed-deepseek",
|
|
955
|
+
"managed-deepseek-flash",
|
|
956
|
+
"managed-qwen-coder",
|
|
957
|
+
"managed-codex",
|
|
958
|
+
"managed-claude"
|
|
959
|
+
];
|
|
960
|
+
function isManagedProviderId(value) {
|
|
961
|
+
return typeof value === "string" && MANAGED_PROVIDER_IDS.includes(value);
|
|
962
|
+
}
|
|
963
|
+
var MANAGED_PROVIDER_DISPLAY_NAMES = {
|
|
964
|
+
"managed-deepseek": "DeepSeek V4",
|
|
965
|
+
"managed-deepseek-flash": "DeepSeek V4 Flash",
|
|
966
|
+
"managed-qwen-coder": "Qwen3 Coder",
|
|
967
|
+
"managed-codex": "Codex",
|
|
968
|
+
"managed-claude": "Claude"
|
|
969
|
+
};
|
|
970
|
+
var MANAGED_AGENT_SUBTITLE = "Prepaid usage credits";
|
|
971
|
+
var MANAGED_AGENT_ENV = "CODEAM_MANAGED_AGENT_ID";
|
|
972
|
+
var LINKED_AGENT_IDS = [
|
|
973
|
+
"claude_code",
|
|
974
|
+
"codex",
|
|
975
|
+
"cursor",
|
|
976
|
+
"aider",
|
|
977
|
+
"coderabbit",
|
|
978
|
+
"gemini",
|
|
979
|
+
"kimi",
|
|
980
|
+
"openrouter",
|
|
981
|
+
"opencode",
|
|
982
|
+
HOUSE_AGENT_ID,
|
|
983
|
+
...MANAGED_PROVIDER_IDS
|
|
984
|
+
];
|
|
953
985
|
var PUBLIC_TO_INTERNAL = {
|
|
954
986
|
claude_code: "claude",
|
|
955
987
|
// CLI-side extra: self-hosted deploy payloads may carry the internal id.
|
|
@@ -976,7 +1008,13 @@ var PUBLIC_TO_INTERNAL = {
|
|
|
976
1008
|
openrouter: "claude",
|
|
977
1009
|
// The house agent runs Claude Code under the hood (pointed at the
|
|
978
1010
|
// MiniMax proxy). Its internal runtime is therefore `claude`.
|
|
979
|
-
[HOUSE_AGENT_ID]: "claude"
|
|
1011
|
+
[HOUSE_AGENT_ID]: "claude",
|
|
1012
|
+
// Every managed provider runs Claude Code against our proxy too.
|
|
1013
|
+
"managed-deepseek": "claude",
|
|
1014
|
+
"managed-deepseek-flash": "claude",
|
|
1015
|
+
"managed-qwen-coder": "claude",
|
|
1016
|
+
"managed-codex": "claude",
|
|
1017
|
+
"managed-claude": "claude"
|
|
980
1018
|
};
|
|
981
1019
|
function isPublicToInternalKey(v) {
|
|
982
1020
|
return Object.prototype.hasOwnProperty.call(PUBLIC_TO_INTERNAL, v);
|
|
@@ -10199,7 +10237,7 @@ function readAnonId() {
|
|
|
10199
10237
|
}
|
|
10200
10238
|
function superProperties() {
|
|
10201
10239
|
return {
|
|
10202
|
-
cliVersion: true ? "2.
|
|
10240
|
+
cliVersion: true ? "2.75.0" : "0.0.0-dev",
|
|
10203
10241
|
nodeVersion: process.version,
|
|
10204
10242
|
platform: process.platform,
|
|
10205
10243
|
arch: process.arch,
|
|
@@ -10441,7 +10479,7 @@ var http = __toESM(require("http"));
|
|
|
10441
10479
|
// package.json
|
|
10442
10480
|
var package_default = {
|
|
10443
10481
|
name: "codeam-cli",
|
|
10444
|
-
version: "2.
|
|
10482
|
+
version: "2.75.0",
|
|
10445
10483
|
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.",
|
|
10446
10484
|
type: "commonjs",
|
|
10447
10485
|
main: "dist/index.js",
|
|
@@ -10875,6 +10913,7 @@ async function fetchProvisionCredentialDetailed(input) {
|
|
|
10875
10913
|
method: data.method,
|
|
10876
10914
|
credential: data.credential,
|
|
10877
10915
|
...typeof data.baseUrl === "string" && data.baseUrl.length > 0 ? { baseUrl: data.baseUrl } : {},
|
|
10916
|
+
...typeof data.model === "string" && data.model.length > 0 ? { model: data.model } : {},
|
|
10878
10917
|
...typeof data.installScript === "string" && data.installScript.length > 0 ? { installScript: data.installScript } : {}
|
|
10879
10918
|
};
|
|
10880
10919
|
}
|
|
@@ -12131,7 +12170,7 @@ var CommandRelayService = class _CommandRelayService {
|
|
|
12131
12170
|
// fresh + clear the "CLI update available" banner after a self-update
|
|
12132
12171
|
// (a codespace that reinstalls @latest reconnects via heartbeat, not
|
|
12133
12172
|
// pair/reconnect). Older backends ignore the extra field.
|
|
12134
|
-
..."2.
|
|
12173
|
+
..."2.75.0" ? { ideVersion: "2.75.0" } : {}
|
|
12135
12174
|
}).then(() => log.trace("relay", `heartbeat ok online=${online}`)).catch((err) => log.trace("relay", `heartbeat failed online=${online}`, err));
|
|
12136
12175
|
}
|
|
12137
12176
|
/**
|
|
@@ -24210,7 +24249,9 @@ function readHouseProxyChildEnv() {
|
|
|
24210
24249
|
baseUrl: o.baseUrl,
|
|
24211
24250
|
token: o.token,
|
|
24212
24251
|
openRouter: o.openRouter === true,
|
|
24213
|
-
...typeof o.claudeConfigDir === "string" && o.claudeConfigDir ? { claudeConfigDir: o.claudeConfigDir } : {}
|
|
24252
|
+
...typeof o.claudeConfigDir === "string" && o.claudeConfigDir ? { claudeConfigDir: o.claudeConfigDir } : {},
|
|
24253
|
+
...typeof o.model === "string" && o.model ? { model: o.model } : {},
|
|
24254
|
+
...typeof o.managedAgentId === "string" && o.managedAgentId ? { managedAgentId: o.managedAgentId } : {}
|
|
24214
24255
|
});
|
|
24215
24256
|
} catch {
|
|
24216
24257
|
return {};
|
|
@@ -24250,16 +24291,24 @@ function buildHouseProxyChildEnv(cfg) {
|
|
|
24250
24291
|
if (cfg.openRouter === true) {
|
|
24251
24292
|
env.ANTHROPIC_API_KEY = "";
|
|
24252
24293
|
} else {
|
|
24253
|
-
|
|
24254
|
-
env.
|
|
24255
|
-
env.
|
|
24256
|
-
env.
|
|
24294
|
+
const model = typeof cfg.model === "string" && cfg.model ? cfg.model : "MiniMax-M3";
|
|
24295
|
+
env.ANTHROPIC_MODEL = model;
|
|
24296
|
+
env.ANTHROPIC_DEFAULT_SONNET_MODEL = model;
|
|
24297
|
+
env.ANTHROPIC_DEFAULT_OPUS_MODEL = model;
|
|
24298
|
+
env.ANTHROPIC_DEFAULT_HAIKU_MODEL = model;
|
|
24257
24299
|
}
|
|
24258
24300
|
if (typeof cfg.claudeConfigDir === "string" && cfg.claudeConfigDir) {
|
|
24259
24301
|
env.CLAUDE_CONFIG_DIR = cfg.claudeConfigDir;
|
|
24260
24302
|
}
|
|
24303
|
+
if (isManagedProviderId(cfg.managedAgentId)) {
|
|
24304
|
+
env[MANAGED_AGENT_ENV] = cfg.managedAgentId;
|
|
24305
|
+
}
|
|
24261
24306
|
return env;
|
|
24262
24307
|
}
|
|
24308
|
+
function houseRailWireId(env) {
|
|
24309
|
+
const managed = env[MANAGED_AGENT_ENV];
|
|
24310
|
+
return isManagedProviderId(managed) ? managed : HOUSE_AGENT_ID;
|
|
24311
|
+
}
|
|
24263
24312
|
var HOUSE_PROXY_ENV_KEYS = [
|
|
24264
24313
|
"ANTHROPIC_BASE_URL",
|
|
24265
24314
|
"ANTHROPIC_AUTH_TOKEN",
|
|
@@ -24271,7 +24320,8 @@ var HOUSE_PROXY_ENV_KEYS = [
|
|
|
24271
24320
|
"CLAUDE_CODE_AUTO_COMPACT_WINDOW",
|
|
24272
24321
|
"CLAUDE_CODE_MAX_CONTEXT_TOKENS",
|
|
24273
24322
|
"API_TIMEOUT_MS",
|
|
24274
|
-
"CLAUDE_CONFIG_DIR"
|
|
24323
|
+
"CLAUDE_CONFIG_DIR",
|
|
24324
|
+
MANAGED_AGENT_ENV
|
|
24275
24325
|
];
|
|
24276
24326
|
function clearHouseProxyEnvOverrides() {
|
|
24277
24327
|
const out2 = {};
|
|
@@ -24451,7 +24501,7 @@ async function autoUpgradeBeforeCriticalCommand() {
|
|
|
24451
24501
|
if (process.env.NODE_ENV === "test") return;
|
|
24452
24502
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
24453
24503
|
if (process.env.CI) return;
|
|
24454
|
-
const current2 = true ? "2.
|
|
24504
|
+
const current2 = true ? "2.75.0" : null;
|
|
24455
24505
|
if (!current2) return;
|
|
24456
24506
|
const cache = readCache();
|
|
24457
24507
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -24468,7 +24518,7 @@ function checkForUpdates() {
|
|
|
24468
24518
|
if (process.env.CODEAM_DISABLE_UPDATE_CHECK === "1") return;
|
|
24469
24519
|
if (process.env.CI) return;
|
|
24470
24520
|
if (!process.stdout.isTTY) return;
|
|
24471
|
-
const current2 = true ? "2.
|
|
24521
|
+
const current2 = true ? "2.75.0" : null;
|
|
24472
24522
|
if (!current2) return;
|
|
24473
24523
|
const cache = readCache();
|
|
24474
24524
|
const fresh = cache && Date.now() - cache.fetchedAt < TTL_MS;
|
|
@@ -24491,7 +24541,7 @@ var SELF_UPDATE_INSTALL_TIMEOUT_MS = 18e4;
|
|
|
24491
24541
|
var SELF_UPDATE_LS_TIMEOUT_MS = 15e3;
|
|
24492
24542
|
var SUDO_PREFLIGHT_TIMEOUT_MS = 5e3;
|
|
24493
24543
|
function currentCliVersion() {
|
|
24494
|
-
return true ? "2.
|
|
24544
|
+
return true ? "2.75.0" : null;
|
|
24495
24545
|
}
|
|
24496
24546
|
async function installedVersion(deps) {
|
|
24497
24547
|
const ls = await deps.run(
|
|
@@ -39210,18 +39260,25 @@ var NON_SWITCHABLE = /* @__PURE__ */ new Set([
|
|
|
39210
39260
|
]);
|
|
39211
39261
|
function displayName(id) {
|
|
39212
39262
|
if (id === HOUSE_AGENT_ID) return HOUSE_AGENT_NAME;
|
|
39263
|
+
if (isManagedProviderId(id)) return MANAGED_PROVIDER_DISPLAY_NAMES[id];
|
|
39213
39264
|
return isKnownAgentId(id) ? AGENT_REGISTRY[id]?.displayName ?? id : id;
|
|
39214
39265
|
}
|
|
39215
39266
|
function credentialFailureMessage(agentId, failure) {
|
|
39216
39267
|
if (failure.message) return failure.message;
|
|
39217
39268
|
return `No linked credential for ${displayName(agentId)}. Link it in Profile \u203A Agents first.`;
|
|
39218
39269
|
}
|
|
39219
|
-
function resolveSwitchTarget(raw, currentAgent, currentIsHouse = false) {
|
|
39270
|
+
function resolveSwitchTarget(raw, currentAgent, currentIsHouse = false, currentHouseWireId = HOUSE_AGENT_ID) {
|
|
39220
39271
|
if (typeof raw !== "string" || raw.length === 0) {
|
|
39221
39272
|
return { ok: false, error: "switch_agent: missing agentId" };
|
|
39222
39273
|
}
|
|
39274
|
+
if (isManagedProviderId(raw)) {
|
|
39275
|
+
if (currentIsHouse && currentHouseWireId === raw) {
|
|
39276
|
+
return { ok: false, error: `${displayName(raw)} is already this session's agent.` };
|
|
39277
|
+
}
|
|
39278
|
+
return { ok: true, agentId: "claude", wireId: raw, house: true };
|
|
39279
|
+
}
|
|
39223
39280
|
if (raw === HOUSE_AGENT_ID) {
|
|
39224
|
-
if (currentIsHouse) {
|
|
39281
|
+
if (currentIsHouse && currentHouseWireId === HOUSE_AGENT_ID) {
|
|
39225
39282
|
return { ok: false, error: `${HOUSE_AGENT_NAME} is already this session's agent.` };
|
|
39226
39283
|
}
|
|
39227
39284
|
return { ok: true, agentId: "claude", wireId: HOUSE_AGENT_ID, house: true };
|
|
@@ -39317,7 +39374,8 @@ function makeSerializedSwitchEmitter(post2) {
|
|
|
39317
39374
|
async function performAgentSwitch(deps, rawAgentId, fastPath = {}) {
|
|
39318
39375
|
const from = deps.currentAgent();
|
|
39319
39376
|
const fromIsHouse = deps.currentIsHouse();
|
|
39320
|
-
const
|
|
39377
|
+
const fromHouseWireId = deps.currentHouseWireId?.() ?? HOUSE_AGENT_ID;
|
|
39378
|
+
const target = resolveSwitchTarget(rawAgentId, from, fromIsHouse, fromHouseWireId);
|
|
39321
39379
|
if (!target.ok) {
|
|
39322
39380
|
return {
|
|
39323
39381
|
ok: false,
|
|
@@ -39327,7 +39385,7 @@ async function performAgentSwitch(deps, rawAgentId, fastPath = {}) {
|
|
|
39327
39385
|
}
|
|
39328
39386
|
const agentId = target.agentId;
|
|
39329
39387
|
const wireId = target.wireId;
|
|
39330
|
-
const fromWireId = fromIsHouse ?
|
|
39388
|
+
const fromWireId = fromIsHouse ? fromHouseWireId : from;
|
|
39331
39389
|
const targetName = displayName(wireId);
|
|
39332
39390
|
const emitStatus = (status2) => deps.postEvent("switch_agent_status", { ...status2 });
|
|
39333
39391
|
const emitStep = (step) => deps.postEvent("switch_agent_progress", { step, agentId: wireId });
|
|
@@ -39350,7 +39408,12 @@ async function performAgentSwitch(deps, rawAgentId, fastPath = {}) {
|
|
|
39350
39408
|
return fail2(`${targetName} isn't available on this backend yet.`);
|
|
39351
39409
|
}
|
|
39352
39410
|
try {
|
|
39353
|
-
deps.provisionHouseProxy({
|
|
39411
|
+
deps.provisionHouseProxy({
|
|
39412
|
+
baseUrl: cred.baseUrl,
|
|
39413
|
+
token: cred.credential,
|
|
39414
|
+
...cred.model ? { model: cred.model } : {},
|
|
39415
|
+
...isManagedProviderId(wireId) ? { managedAgentId: wireId } : {}
|
|
39416
|
+
});
|
|
39354
39417
|
} catch (err) {
|
|
39355
39418
|
log.warn("switchAgent", `house proxy provisioning failed: ${err.message}`);
|
|
39356
39419
|
return fail2(`Couldn't configure ${targetName} on this machine.`);
|
|
@@ -39377,11 +39440,17 @@ async function performAgentSwitch(deps, rawAgentId, fastPath = {}) {
|
|
|
39377
39440
|
}
|
|
39378
39441
|
void emitStep("restart");
|
|
39379
39442
|
try {
|
|
39380
|
-
await deps.swapRuntime(agentId, {
|
|
39443
|
+
await deps.swapRuntime(agentId, {
|
|
39444
|
+
house: target.house,
|
|
39445
|
+
...isManagedProviderId(wireId) ? { wireId } : {}
|
|
39446
|
+
});
|
|
39381
39447
|
} catch (err) {
|
|
39382
39448
|
log.warn("switchAgent", `swap failed, reverting to ${fromWireId}: ${err.message}`);
|
|
39383
39449
|
try {
|
|
39384
|
-
await deps.revertRuntime(from, {
|
|
39450
|
+
await deps.revertRuntime(from, {
|
|
39451
|
+
house: fromIsHouse,
|
|
39452
|
+
...fromIsHouse && isManagedProviderId(fromHouseWireId) ? { wireId: fromHouseWireId } : {}
|
|
39453
|
+
});
|
|
39385
39454
|
} catch (revertErr) {
|
|
39386
39455
|
log.warn("switchAgent", `revert failed: ${revertErr.message}`);
|
|
39387
39456
|
return fail2(
|
|
@@ -42606,9 +42675,9 @@ function rebindSessionHandles(ctx, outcome) {
|
|
|
42606
42675
|
Object.assign(ctx, outcome.handles);
|
|
42607
42676
|
return outcome;
|
|
42608
42677
|
}
|
|
42609
|
-
function namesCurrentAgent(requested, currentAgent, currentIsHouse) {
|
|
42678
|
+
function namesCurrentAgent(requested, currentAgent, currentIsHouse, currentHouseWireId = HOUSE_AGENT_ID) {
|
|
42610
42679
|
if (requested === currentAgent) return true;
|
|
42611
|
-
if (currentIsHouse) return requested ===
|
|
42680
|
+
if (currentIsHouse) return requested === currentHouseWireId;
|
|
42612
42681
|
return publicToInternal(requested) === currentAgent;
|
|
42613
42682
|
}
|
|
42614
42683
|
async function routeSquadTask(ctx, target) {
|
|
@@ -42821,7 +42890,12 @@ async function startTaskH(ctx) {
|
|
|
42821
42890
|
await relay.sendResult(cmd.id, "failed", { error: "empty prompt" });
|
|
42822
42891
|
return;
|
|
42823
42892
|
}
|
|
42824
|
-
if (requestedAgentId.length > 0 && !namesCurrentAgent(
|
|
42893
|
+
if (requestedAgentId.length > 0 && !namesCurrentAgent(
|
|
42894
|
+
requestedAgentId,
|
|
42895
|
+
opts.agent,
|
|
42896
|
+
ctx.currentIsHouse?.() ?? false,
|
|
42897
|
+
ctx.currentHouseWireId?.() ?? HOUSE_AGENT_ID
|
|
42898
|
+
)) {
|
|
42825
42899
|
const routed = await routeSquadTask(ctx, requestedAgentId);
|
|
42826
42900
|
if (!routed.ok) {
|
|
42827
42901
|
log.warn("acpRunner", `start_task routing to ${requestedAgentId} failed: ${routed.error}`);
|
|
@@ -44479,7 +44553,9 @@ async function runAcpSession(opts) {
|
|
|
44479
44553
|
emitSwitchEvent,
|
|
44480
44554
|
// Same live flag the switch deps read — a start_task naming the
|
|
44481
44555
|
// house agent on a house session is the agent already running.
|
|
44482
|
-
() => houseActive
|
|
44556
|
+
() => houseActive,
|
|
44557
|
+
// …and WHICH house-rail agent (a managed id, or the house sentinel).
|
|
44558
|
+
() => houseWireId
|
|
44483
44559
|
);
|
|
44484
44560
|
},
|
|
44485
44561
|
{ id: opts.agent, name: opts.agent, displayName: opts.agent },
|
|
@@ -44518,6 +44594,7 @@ async function runAcpSession(opts) {
|
|
|
44518
44594
|
const pendingProposal = { current: null };
|
|
44519
44595
|
let switchCredentialEnv = {};
|
|
44520
44596
|
let houseActive = isHouseProxyEnv(process.env);
|
|
44597
|
+
let houseWireId = houseRailWireId(process.env);
|
|
44521
44598
|
let houseEnv = houseActive ? pickHouseProxyEnv(process.env) : {};
|
|
44522
44599
|
let pendingHouseConfig = null;
|
|
44523
44600
|
const relaunchWith = async (nextAgent, swapOpts = { house: false }) => {
|
|
@@ -44565,6 +44642,7 @@ async function runAcpSession(opts) {
|
|
|
44565
44642
|
const wasHouse = houseActive;
|
|
44566
44643
|
houseActive = swapOpts.house;
|
|
44567
44644
|
if (swapOpts.house) {
|
|
44645
|
+
houseWireId = swapOpts.wireId ?? HOUSE_AGENT_ID;
|
|
44568
44646
|
if (pendingHouseConfig) {
|
|
44569
44647
|
persistHouseProxyConfig(pendingHouseConfig);
|
|
44570
44648
|
pendingHouseConfig = null;
|
|
@@ -44572,12 +44650,14 @@ async function runAcpSession(opts) {
|
|
|
44572
44650
|
} else if (wasHouse) {
|
|
44573
44651
|
clearHouseProxyConfig();
|
|
44574
44652
|
}
|
|
44653
|
+
const managedBanner = swapOpts.house && isManagedProviderId(houseWireId) ? houseWireId : null;
|
|
44575
44654
|
void publisher.publishOutput({
|
|
44576
44655
|
type: "agent_banner",
|
|
44577
|
-
agentId: swapOpts.house ?
|
|
44656
|
+
agentId: swapOpts.house ? houseWireId : nextAgent,
|
|
44578
44657
|
// A switch starts a FRESH conversation with the new agent — never "back".
|
|
44579
|
-
|
|
44580
|
-
|
|
44658
|
+
// A managed target is named by its model; the house agent stays white-label.
|
|
44659
|
+
title: managedBanner ? MANAGED_PROVIDER_DISPLAY_NAMES[managedBanner] : swapOpts.house ? HOUSE_AGENT_NAME : bannerTitle(false),
|
|
44660
|
+
subtitle: managedBanner ? MANAGED_AGENT_SUBTITLE : swapOpts.house ? HOUSE_AGENT_SUBTITLE : buildBannerSubtitle(nextAgent, hs.sessionId, hs.model, hs.tier),
|
|
44581
44661
|
path: swapOpts.house ? "" : bannerLocation(opts.cwd),
|
|
44582
44662
|
done: true
|
|
44583
44663
|
});
|
|
@@ -44594,6 +44674,7 @@ async function runAcpSession(opts) {
|
|
|
44594
44674
|
const switchDeps = {
|
|
44595
44675
|
currentAgent: () => opts.agent,
|
|
44596
44676
|
currentIsHouse: () => houseActive,
|
|
44677
|
+
currentHouseWireId: () => houseWireId,
|
|
44597
44678
|
postEvent: emitSwitchEvent,
|
|
44598
44679
|
fetchCredential: (agentId) => fetchProvisionCredentialDetailed({
|
|
44599
44680
|
agentId,
|
|
@@ -44605,7 +44686,7 @@ async function runAcpSession(opts) {
|
|
|
44605
44686
|
provisionCredential: (agentId, auth) => {
|
|
44606
44687
|
switchCredentialEnv = provisionAgentCredentials(agentId, auth);
|
|
44607
44688
|
},
|
|
44608
|
-
provisionHouseProxy: ({ baseUrl, token }) => {
|
|
44689
|
+
provisionHouseProxy: ({ baseUrl, token, model, managedAgentId }) => {
|
|
44609
44690
|
const claudeConfigDir = path87.join(
|
|
44610
44691
|
os62.homedir(),
|
|
44611
44692
|
".codeam",
|
|
@@ -44616,8 +44697,15 @@ async function runAcpSession(opts) {
|
|
|
44616
44697
|
fs78.mkdirSync(claudeConfigDir, { recursive: true, mode: 448 });
|
|
44617
44698
|
} catch {
|
|
44618
44699
|
}
|
|
44619
|
-
|
|
44620
|
-
|
|
44700
|
+
const cfg = {
|
|
44701
|
+
baseUrl,
|
|
44702
|
+
token,
|
|
44703
|
+
claudeConfigDir,
|
|
44704
|
+
...model ? { model } : {},
|
|
44705
|
+
...managedAgentId ? { managedAgentId } : {}
|
|
44706
|
+
};
|
|
44707
|
+
houseEnv = buildHouseProxyChildEnv(cfg);
|
|
44708
|
+
pendingHouseConfig = cfg;
|
|
44621
44709
|
switchCredentialEnv = {};
|
|
44622
44710
|
},
|
|
44623
44711
|
ensureBinary: (agentId, installScript, onRetry) => ensureAgentBinaryForSwitch(agentId, installScript, { onRetry }),
|
|
@@ -44705,7 +44793,7 @@ async function runAcpSession(opts) {
|
|
|
44705
44793
|
await new Promise(() => {
|
|
44706
44794
|
});
|
|
44707
44795
|
}
|
|
44708
|
-
async function handleCommand(cmd, client3, relay, acpSessionId, streaming, opts, history, jsonlHistory, agentCaps, turnFiles, getBeads, publisher, recentStderr, budgetRecovery, budgetReachedFlag, onActiveSessionChanged, switchAgent, pendingHandoff, squad, routeToAgent, pendingProposal, postSquadEvent, currentIsHouse) {
|
|
44796
|
+
async function handleCommand(cmd, client3, relay, acpSessionId, streaming, opts, history, jsonlHistory, agentCaps, turnFiles, getBeads, publisher, recentStderr, budgetRecovery, budgetReachedFlag, onActiveSessionChanged, switchAgent, pendingHandoff, squad, routeToAgent, pendingProposal, postSquadEvent, currentIsHouse, currentHouseWireId) {
|
|
44709
44797
|
const session = {
|
|
44710
44798
|
client: client3,
|
|
44711
44799
|
relay,
|
|
@@ -44728,7 +44816,8 @@ async function handleCommand(cmd, client3, relay, acpSessionId, streaming, opts,
|
|
|
44728
44816
|
routeToAgent,
|
|
44729
44817
|
pendingProposal,
|
|
44730
44818
|
postSquadEvent,
|
|
44731
|
-
currentIsHouse
|
|
44819
|
+
currentIsHouse,
|
|
44820
|
+
currentHouseWireId
|
|
44732
44821
|
};
|
|
44733
44822
|
await dispatchAcpCommand(assembleAcpCommandContext(session, cmd));
|
|
44734
44823
|
}
|
|
@@ -47006,7 +47095,7 @@ async function start(requestedAgent, presetSession) {
|
|
|
47006
47095
|
// The house agent runs the `claude` runtime, so `session.agent` cannot
|
|
47007
47096
|
// tell it apart; the managed-proxy env can (`isHouseProxyEnv`). The
|
|
47008
47097
|
// backend turns the tool router on for the house agent ONLY.
|
|
47009
|
-
agent: isHouseProxyEnv(process.env) ?
|
|
47098
|
+
agent: isHouseProxyEnv(process.env) ? houseRailWireId(process.env) : session.agent
|
|
47010
47099
|
});
|
|
47011
47100
|
}
|
|
47012
47101
|
const mcpServers = mergeWithLocalMcpServers(
|
|
@@ -49857,7 +49946,7 @@ function checkChokidar() {
|
|
|
49857
49946
|
}
|
|
49858
49947
|
async function doctor(args2 = []) {
|
|
49859
49948
|
const json = args2.includes("--json");
|
|
49860
|
-
const cliVersion = true ? "2.
|
|
49949
|
+
const cliVersion = true ? "2.75.0" : "0.0.0-dev";
|
|
49861
49950
|
const apiBase2 = resolveApiBaseUrl();
|
|
49862
49951
|
const diagnosticId = (0, import_node_crypto13.randomUUID)();
|
|
49863
49952
|
log.info("doctor", `run id=${diagnosticId} cli=${cliVersion}`);
|
|
@@ -50381,7 +50470,7 @@ async function mcpWarm(argv = [], opts = {}) {
|
|
|
50381
50470
|
// src/commands/version.ts
|
|
50382
50471
|
var import_picocolors15 = __toESM(require("picocolors"));
|
|
50383
50472
|
function version2() {
|
|
50384
|
-
const v = true ? "2.
|
|
50473
|
+
const v = true ? "2.75.0" : "unknown";
|
|
50385
50474
|
console.log(`${import_picocolors15.default.bold("codeam-cli")} ${import_picocolors15.default.cyan(v)}`);
|
|
50386
50475
|
}
|
|
50387
50476
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "codeam-cli",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.75.0",
|
|
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",
|