@askexenow/exe-os 0.9.113 → 0.9.115

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.
Files changed (86) hide show
  1. package/dist/bin/agentic-ontology-backfill.js +36 -12
  2. package/dist/bin/agentic-reflection-backfill.js +36 -12
  3. package/dist/bin/agentic-semantic-label.js +36 -12
  4. package/dist/bin/backfill-conversations.js +36 -12
  5. package/dist/bin/backfill-responses.js +36 -12
  6. package/dist/bin/backfill-vectors.js +36 -12
  7. package/dist/bin/bulk-sync-postgres.js +36 -12
  8. package/dist/bin/cleanup-stale-review-tasks.js +470 -113
  9. package/dist/bin/cli.js +413 -62
  10. package/dist/bin/exe-agent.js +27 -0
  11. package/dist/bin/exe-assign.js +36 -12
  12. package/dist/bin/exe-boot.js +246 -54
  13. package/dist/bin/exe-call.js +8 -0
  14. package/dist/bin/exe-cloud.js +47 -12
  15. package/dist/bin/exe-dispatch.js +348 -53
  16. package/dist/bin/exe-doctor.js +51 -13
  17. package/dist/bin/exe-export-behaviors.js +37 -12
  18. package/dist/bin/exe-forget.js +36 -12
  19. package/dist/bin/exe-gateway.js +348 -53
  20. package/dist/bin/exe-heartbeat.js +471 -113
  21. package/dist/bin/exe-kill.js +36 -12
  22. package/dist/bin/exe-launch-agent.js +117 -18
  23. package/dist/bin/exe-new-employee.js +9 -1
  24. package/dist/bin/exe-pending-messages.js +452 -95
  25. package/dist/bin/exe-pending-notifications.js +452 -95
  26. package/dist/bin/exe-pending-reviews.js +452 -95
  27. package/dist/bin/exe-rename.js +36 -12
  28. package/dist/bin/exe-review.js +36 -12
  29. package/dist/bin/exe-search.js +37 -12
  30. package/dist/bin/exe-session-cleanup.js +348 -53
  31. package/dist/bin/exe-settings.js +12 -0
  32. package/dist/bin/exe-start-codex.js +46 -13
  33. package/dist/bin/exe-start-opencode.js +46 -13
  34. package/dist/bin/exe-status.js +460 -114
  35. package/dist/bin/exe-support.js +12 -0
  36. package/dist/bin/exe-team.js +36 -12
  37. package/dist/bin/git-sweep.js +348 -53
  38. package/dist/bin/graph-backfill.js +36 -12
  39. package/dist/bin/graph-export.js +36 -12
  40. package/dist/bin/install.js +9 -1
  41. package/dist/bin/intercom-check.js +255 -53
  42. package/dist/bin/scan-tasks.js +348 -53
  43. package/dist/bin/setup.js +74 -12
  44. package/dist/bin/shard-migrate.js +36 -12
  45. package/dist/gateway/index.js +348 -53
  46. package/dist/hooks/bug-report-worker.js +348 -53
  47. package/dist/hooks/codex-stop-task-finalizer.js +308 -37
  48. package/dist/hooks/commit-complete.js +348 -53
  49. package/dist/hooks/error-recall.js +37 -12
  50. package/dist/hooks/ingest.js +363 -54
  51. package/dist/hooks/instructions-loaded.js +36 -12
  52. package/dist/hooks/notification.js +36 -12
  53. package/dist/hooks/post-compact.js +426 -72
  54. package/dist/hooks/post-tool-combined.js +501 -146
  55. package/dist/hooks/pre-compact.js +348 -53
  56. package/dist/hooks/pre-tool-use.js +92 -13
  57. package/dist/hooks/prompt-submit.js +348 -53
  58. package/dist/hooks/session-end.js +158 -53
  59. package/dist/hooks/session-start.js +66 -13
  60. package/dist/hooks/stop.js +420 -72
  61. package/dist/hooks/subagent-stop.js +419 -72
  62. package/dist/hooks/summary-worker.js +442 -121
  63. package/dist/index.js +375 -53
  64. package/dist/lib/agent-config.js +8 -0
  65. package/dist/lib/cloud-sync.js +35 -12
  66. package/dist/lib/config.js +13 -0
  67. package/dist/lib/consolidation.js +9 -1
  68. package/dist/lib/embedder.js +13 -0
  69. package/dist/lib/employees.js +8 -0
  70. package/dist/lib/exe-daemon.js +524 -60
  71. package/dist/lib/hybrid-search.js +37 -12
  72. package/dist/lib/keychain.js +25 -13
  73. package/dist/lib/messaging.js +395 -74
  74. package/dist/lib/schedules.js +36 -12
  75. package/dist/lib/skill-learning.js +21 -0
  76. package/dist/lib/store.js +36 -12
  77. package/dist/lib/tasks.js +324 -41
  78. package/dist/lib/tmux-routing.js +324 -41
  79. package/dist/mcp/server.js +374 -54
  80. package/dist/mcp/tools/create-task.js +324 -41
  81. package/dist/mcp/tools/list-tasks.js +406 -57
  82. package/dist/mcp/tools/send-message.js +395 -74
  83. package/dist/mcp/tools/update-task.js +324 -41
  84. package/dist/runtime/index.js +375 -53
  85. package/dist/tui/App.js +377 -55
  86. package/package.json +1 -1
@@ -193,6 +193,17 @@ function normalizeOrchestration(raw) {
193
193
  const userOrg = raw.orchestration ?? {};
194
194
  raw.orchestration = { ...defaultOrg, ...userOrg };
195
195
  }
196
+ function normalizeCloudEndpoint(raw) {
197
+ const cloud = raw.cloud;
198
+ if (!cloud?.endpoint) return;
199
+ const ep = String(cloud.endpoint);
200
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
201
+ cloud.endpoint = "https://cloud.askexe.com";
202
+ process.stderr.write(
203
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
204
+ );
205
+ }
206
+ }
196
207
  async function loadConfig() {
197
208
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
198
209
  await ensurePrivateDir(dir);
@@ -218,6 +229,7 @@ async function loadConfig() {
218
229
  normalizeSessionLifecycle(migratedCfg);
219
230
  normalizeAutoUpdate(migratedCfg);
220
231
  normalizeOrchestration(migratedCfg);
232
+ normalizeCloudEndpoint(migratedCfg);
221
233
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
222
234
  if (config.dbPath.startsWith("~")) {
223
235
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -3316,7 +3328,7 @@ var init_database = __esm({
3316
3328
  });
3317
3329
 
3318
3330
  // src/lib/keychain.ts
3319
- import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3331
+ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2, rename, copyFile } from "fs/promises";
3320
3332
  import { existsSync as existsSync7, statSync as statSync3 } from "fs";
3321
3333
  import { execSync as execSync3 } from "child_process";
3322
3334
  import path6 from "path";
@@ -3351,12 +3363,14 @@ function linuxSecretAvailable() {
3351
3363
  function isRootOnlyTrustedServerKeyFile(keyPath) {
3352
3364
  if (process.platform !== "linux") return false;
3353
3365
  try {
3354
- const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3355
3366
  const st = statSync3(keyPath);
3356
3367
  if (!st.isFile() || (st.mode & 63) !== 0) return false;
3368
+ const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3357
3369
  if (uid === 0) return true;
3358
3370
  const exeOsDir = process.env.EXE_OS_DIR;
3359
- return Boolean(exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep));
3371
+ if (exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep)) return true;
3372
+ if (!linuxSecretAvailable()) return true;
3373
+ return false;
3360
3374
  } catch {
3361
3375
  return false;
3362
3376
  }
@@ -3506,15 +3520,25 @@ async function writeMachineBoundFileFallback(b64) {
3506
3520
  await mkdir3(dir, { recursive: true });
3507
3521
  const keyPath = getKeyPath();
3508
3522
  const machineKey = deriveMachineKey();
3509
- if (machineKey) {
3510
- const encrypted = encryptWithMachineKey(b64, machineKey);
3511
- await writeFile3(keyPath, encrypted + "\n", "utf-8");
3512
- await chmod2(keyPath, 384);
3513
- return "encrypted";
3523
+ const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
3524
+ const result = machineKey ? "encrypted" : "plaintext";
3525
+ const tmpPath = keyPath + ".tmp";
3526
+ try {
3527
+ if (existsSync7(keyPath)) {
3528
+ await copyFile(keyPath, keyPath + ".bak").catch(() => {
3529
+ });
3530
+ }
3531
+ await writeFile3(tmpPath, content, "utf-8");
3532
+ await chmod2(tmpPath, 384);
3533
+ await rename(tmpPath, keyPath);
3534
+ } catch (err) {
3535
+ try {
3536
+ await unlink(tmpPath);
3537
+ } catch {
3538
+ }
3539
+ throw err;
3514
3540
  }
3515
- await writeFile3(keyPath, b64 + "\n", "utf-8");
3516
- await chmod2(keyPath, 384);
3517
- return "plaintext";
3541
+ return result;
3518
3542
  }
3519
3543
  async function getMasterKey() {
3520
3544
  let nativeValue = macKeychainGet() ?? linuxSecretGet();
@@ -3581,7 +3605,7 @@ async function getMasterKey() {
3581
3605
  b64Value = content;
3582
3606
  }
3583
3607
  const key = Buffer.from(b64Value, "base64");
3584
- if (!content.startsWith(ENCRYPTED_PREFIX) && isRootOnlyTrustedServerKeyFile(keyPath)) {
3608
+ if (isRootOnlyTrustedServerKeyFile(keyPath)) {
3585
3609
  return key;
3586
3610
  }
3587
3611
  const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
@@ -219,6 +219,17 @@ function normalizeOrchestration(raw) {
219
219
  const userOrg = raw.orchestration ?? {};
220
220
  raw.orchestration = { ...defaultOrg, ...userOrg };
221
221
  }
222
+ function normalizeCloudEndpoint(raw) {
223
+ const cloud = raw.cloud;
224
+ if (!cloud?.endpoint) return;
225
+ const ep = String(cloud.endpoint);
226
+ if (ep === "https://askexe.com/cloud" || ep === "https://askexe.com/cloud/") {
227
+ cloud.endpoint = "https://cloud.askexe.com";
228
+ process.stderr.write(
229
+ "[config] Auto-migrated cloud endpoint: askexe.com/cloud \u2192 cloud.askexe.com\n"
230
+ );
231
+ }
232
+ }
222
233
  async function loadConfig() {
223
234
  const dir = process.env.EXE_OS_DIR ?? process.env.EXE_MEM_DIR ?? EXE_AI_DIR;
224
235
  await ensurePrivateDir(dir);
@@ -244,6 +255,7 @@ async function loadConfig() {
244
255
  normalizeSessionLifecycle(migratedCfg);
245
256
  normalizeAutoUpdate(migratedCfg);
246
257
  normalizeOrchestration(migratedCfg);
258
+ normalizeCloudEndpoint(migratedCfg);
247
259
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
248
260
  if (config.dbPath.startsWith("~")) {
249
261
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -272,6 +284,7 @@ function loadConfigSync() {
272
284
  normalizeSessionLifecycle(migratedCfg);
273
285
  normalizeAutoUpdate(migratedCfg);
274
286
  normalizeOrchestration(migratedCfg);
287
+ normalizeCloudEndpoint(migratedCfg);
275
288
  const config = { ...DEFAULT_CONFIG, dbPath: path.join(dir, "memories.db"), ...migratedCfg };
276
289
  if (config.dbPath.startsWith("~")) {
277
290
  config.dbPath = config.dbPath.replace(/^~/, os.homedir());
@@ -3414,7 +3427,7 @@ var init_database = __esm({
3414
3427
  });
3415
3428
 
3416
3429
  // src/lib/keychain.ts
3417
- import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2 } from "fs/promises";
3430
+ import { readFile as readFile3, writeFile as writeFile3, unlink, mkdir as mkdir3, chmod as chmod2, rename, copyFile } from "fs/promises";
3418
3431
  import { existsSync as existsSync7, statSync as statSync3 } from "fs";
3419
3432
  import { execSync as execSync3 } from "child_process";
3420
3433
  import path6 from "path";
@@ -3449,12 +3462,14 @@ function linuxSecretAvailable() {
3449
3462
  function isRootOnlyTrustedServerKeyFile(keyPath) {
3450
3463
  if (process.platform !== "linux") return false;
3451
3464
  try {
3452
- const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3453
3465
  const st = statSync3(keyPath);
3454
3466
  if (!st.isFile() || (st.mode & 63) !== 0) return false;
3467
+ const uid = typeof os5.userInfo().uid === "number" ? os5.userInfo().uid : -1;
3455
3468
  if (uid === 0) return true;
3456
3469
  const exeOsDir = process.env.EXE_OS_DIR;
3457
- return Boolean(exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep));
3470
+ if (exeOsDir && path6.resolve(keyPath).startsWith(path6.resolve(exeOsDir) + path6.sep)) return true;
3471
+ if (!linuxSecretAvailable()) return true;
3472
+ return false;
3458
3473
  } catch {
3459
3474
  return false;
3460
3475
  }
@@ -3604,15 +3619,25 @@ async function writeMachineBoundFileFallback(b64) {
3604
3619
  await mkdir3(dir, { recursive: true });
3605
3620
  const keyPath = getKeyPath();
3606
3621
  const machineKey = deriveMachineKey();
3607
- if (machineKey) {
3608
- const encrypted = encryptWithMachineKey(b64, machineKey);
3609
- await writeFile3(keyPath, encrypted + "\n", "utf-8");
3610
- await chmod2(keyPath, 384);
3611
- return "encrypted";
3622
+ const content = machineKey ? encryptWithMachineKey(b64, machineKey) + "\n" : b64 + "\n";
3623
+ const result = machineKey ? "encrypted" : "plaintext";
3624
+ const tmpPath = keyPath + ".tmp";
3625
+ try {
3626
+ if (existsSync7(keyPath)) {
3627
+ await copyFile(keyPath, keyPath + ".bak").catch(() => {
3628
+ });
3629
+ }
3630
+ await writeFile3(tmpPath, content, "utf-8");
3631
+ await chmod2(tmpPath, 384);
3632
+ await rename(tmpPath, keyPath);
3633
+ } catch (err) {
3634
+ try {
3635
+ await unlink(tmpPath);
3636
+ } catch {
3637
+ }
3638
+ throw err;
3612
3639
  }
3613
- await writeFile3(keyPath, b64 + "\n", "utf-8");
3614
- await chmod2(keyPath, 384);
3615
- return "plaintext";
3640
+ return result;
3616
3641
  }
3617
3642
  async function getMasterKey() {
3618
3643
  let nativeValue = macKeychainGet() ?? linuxSecretGet();
@@ -3679,7 +3704,7 @@ async function getMasterKey() {
3679
3704
  b64Value = content;
3680
3705
  }
3681
3706
  const key = Buffer.from(b64Value, "base64");
3682
- if (!content.startsWith(ENCRYPTED_PREFIX) && isRootOnlyTrustedServerKeyFile(keyPath)) {
3707
+ if (isRootOnlyTrustedServerKeyFile(keyPath)) {
3683
3708
  return key;
3684
3709
  }
3685
3710
  const migrated = macKeychainSet(b64Value) || linuxSecretSet(b64Value);
@@ -5941,6 +5966,20 @@ var init_runtime_table = __esm({
5941
5966
  });
5942
5967
 
5943
5968
  // src/lib/agent-config.ts
5969
+ var agent_config_exports = {};
5970
+ __export(agent_config_exports, {
5971
+ AGENT_CONFIG_PATH: () => AGENT_CONFIG_PATH,
5972
+ DEFAULT_MODELS: () => DEFAULT_MODELS,
5973
+ KNOWN_RUNTIMES: () => KNOWN_RUNTIMES,
5974
+ RUNTIME_LABELS: () => RUNTIME_LABELS,
5975
+ clearAgentRuntime: () => clearAgentRuntime,
5976
+ getAgentRuntime: () => getAgentRuntime,
5977
+ loadAgentConfig: () => loadAgentConfig,
5978
+ normalizeCcModelName: () => normalizeCcModelName,
5979
+ saveAgentConfig: () => saveAgentConfig,
5980
+ setAgentMcps: () => setAgentMcps,
5981
+ setAgentRuntime: () => setAgentRuntime
5982
+ });
5944
5983
  import { readFileSync as readFileSync5, writeFileSync as writeFileSync4, existsSync as existsSync10 } from "fs";
5945
5984
  import path9 from "path";
5946
5985
  function loadAgentConfig() {
@@ -5951,6 +5990,12 @@ function loadAgentConfig() {
5951
5990
  return {};
5952
5991
  }
5953
5992
  }
5993
+ function saveAgentConfig(config) {
5994
+ const dir = path9.dirname(AGENT_CONFIG_PATH);
5995
+ ensurePrivateDirSync(dir);
5996
+ writeFileSync4(AGENT_CONFIG_PATH, JSON.stringify(config, null, 2) + "\n", "utf-8");
5997
+ enforcePrivateFileSync(AGENT_CONFIG_PATH);
5998
+ }
5954
5999
  function getAgentRuntime(agentId) {
5955
6000
  const config = loadAgentConfig();
5956
6001
  const entry = config[agentId];
@@ -5959,7 +6004,54 @@ function getAgentRuntime(agentId) {
5959
6004
  if (orgDefault) return orgDefault;
5960
6005
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
5961
6006
  }
5962
- var AGENT_CONFIG_PATH, DEFAULT_MODELS;
6007
+ function normalizeCcModelName(model) {
6008
+ let ccModel = model.replace(/(\d+)\.(\d+)/g, "$1-$2");
6009
+ if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
6010
+ ccModel += "[1m]";
6011
+ }
6012
+ return ccModel;
6013
+ }
6014
+ function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
6015
+ const knownModels = KNOWN_RUNTIMES[runtime];
6016
+ if (!knownModels) {
6017
+ return {
6018
+ ok: false,
6019
+ error: `Unknown runtime "${runtime}". Valid: ${Object.keys(KNOWN_RUNTIMES).join(", ")}`
6020
+ };
6021
+ }
6022
+ if (!knownModels.includes(model)) {
6023
+ return {
6024
+ ok: false,
6025
+ error: `Unknown model "${model}" for runtime "${runtime}". Valid: ${knownModels.join(", ")}`
6026
+ };
6027
+ }
6028
+ const config = loadAgentConfig();
6029
+ const existing = config[agentId];
6030
+ const entry = { runtime, model };
6031
+ if (reasoning_effort) entry.reasoning_effort = reasoning_effort;
6032
+ if (mcps !== void 0) {
6033
+ entry.mcps = mcps.includes("exe-os") ? mcps : ["exe-os", ...mcps];
6034
+ } else if (existing?.mcps) {
6035
+ entry.mcps = existing.mcps;
6036
+ }
6037
+ config[agentId] = entry;
6038
+ saveAgentConfig(config);
6039
+ return { ok: true };
6040
+ }
6041
+ function setAgentMcps(agentId, mcps) {
6042
+ const config = loadAgentConfig();
6043
+ const existing = config[agentId] ?? getAgentRuntime(agentId);
6044
+ existing.mcps = mcps.includes("exe-os") ? mcps : ["exe-os", ...mcps];
6045
+ config[agentId] = existing;
6046
+ saveAgentConfig(config);
6047
+ return { ok: true };
6048
+ }
6049
+ function clearAgentRuntime(agentId) {
6050
+ const config = loadAgentConfig();
6051
+ delete config[agentId];
6052
+ saveAgentConfig(config);
6053
+ }
6054
+ var AGENT_CONFIG_PATH, KNOWN_RUNTIMES, RUNTIME_LABELS, DEFAULT_MODELS;
5963
6055
  var init_agent_config = __esm({
5964
6056
  "src/lib/agent-config.ts"() {
5965
6057
  "use strict";
@@ -5967,6 +6059,16 @@ var init_agent_config = __esm({
5967
6059
  init_runtime_table();
5968
6060
  init_secure_files();
5969
6061
  AGENT_CONFIG_PATH = path9.join(EXE_AI_DIR, "agent-config.json");
6062
+ KNOWN_RUNTIMES = {
6063
+ claude: ["claude-opus-4.6", "claude-opus-4", "claude-sonnet-4.6", "claude-sonnet-4", "claude-haiku-4.5"],
6064
+ codex: ["gpt-5.4", "gpt-5.5", "gpt-5.3-codex-spark", "o3", "o4-mini"],
6065
+ opencode: ["anthropic/claude-sonnet-4-6", "openai/gpt-5.4", "google/gemini-2.5-pro", "deepseek/deepseek-r3", "minimax/minimax-m2.5"]
6066
+ };
6067
+ RUNTIME_LABELS = {
6068
+ claude: "Claude Code (Anthropic)",
6069
+ codex: "Codex (OpenAI)",
6070
+ opencode: "OpenCode (open source)"
6071
+ };
5970
6072
  DEFAULT_MODELS = {
5971
6073
  claude: "claude-opus-4.6",
5972
6074
  codex: RUNTIME_TABLE.codex?.defaultModel ?? "gpt-5.4",
@@ -7028,11 +7130,8 @@ async function main() {
7028
7130
  if (provider === DEFAULT_PROVIDER) {
7029
7131
  const rtConfig = getAgentRuntime(memoryAgent);
7030
7132
  if (rtConfig.runtime === "claude" && rtConfig.model) {
7031
- let ccModel = rtConfig.model.replace(/(\d+)\.(\d+)/g, "$1-$2");
7032
- if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
7033
- ccModel += "[1m]";
7034
- }
7035
- process.env.ANTHROPIC_MODEL = ccModel;
7133
+ const { normalizeCcModelName: normalizeCcModelName2 } = await Promise.resolve().then(() => (init_agent_config(), agent_config_exports));
7134
+ process.env.ANTHROPIC_MODEL = normalizeCcModelName2(rtConfig.model);
7036
7135
  }
7037
7136
  }
7038
7137
  const child = spawnSync(plan.command, plan.args, { stdio: "inherit" });
@@ -187,6 +187,7 @@ __export(agent_config_exports, {
187
187
  clearAgentRuntime: () => clearAgentRuntime,
188
188
  getAgentRuntime: () => getAgentRuntime,
189
189
  loadAgentConfig: () => loadAgentConfig,
190
+ normalizeCcModelName: () => normalizeCcModelName,
190
191
  saveAgentConfig: () => saveAgentConfig,
191
192
  setAgentMcps: () => setAgentMcps,
192
193
  setAgentRuntime: () => setAgentRuntime
@@ -215,6 +216,13 @@ function getAgentRuntime(agentId) {
215
216
  if (orgDefault) return orgDefault;
216
217
  return { runtime: DEFAULT_RUNTIME, model: DEFAULT_MODELS[DEFAULT_RUNTIME] };
217
218
  }
219
+ function normalizeCcModelName(model) {
220
+ let ccModel = model.replace(/(\d+)\.(\d+)/g, "$1-$2");
221
+ if (/claude-(opus|sonnet)-4-[6-9]/.test(ccModel) && !ccModel.includes("[1m]")) {
222
+ ccModel += "[1m]";
223
+ }
224
+ return ccModel;
225
+ }
218
226
  function setAgentRuntime(agentId, runtime, model, reasoning_effort, mcps) {
219
227
  const knownModels = KNOWN_RUNTIMES[runtime];
220
228
  if (!knownModels) {
@@ -1458,7 +1466,7 @@ function readOrCreateDaemonToken(homeDir = os7.homedir()) {
1458
1466
  function buildMcpHttpHeaders(homeDir = os7.homedir(), opts = {}) {
1459
1467
  const agentId = opts.useShellPlaceholders ? "${AGENT_ID:-exe}" : opts.agentId ?? DEFAULT_MCP_HTTP_AGENT_ID;
1460
1468
  const agentRole = opts.useShellPlaceholders ? "${AGENT_ROLE:-COO}" : opts.agentRole ?? DEFAULT_MCP_HTTP_AGENT_ROLE;
1461
- const sessionName = opts.useShellPlaceholders ? "$(tmux display-message -p '#{session_name}' 2>/dev/null || echo '')" : process.env.EXE_SESSION_NAME ?? "";
1469
+ const sessionName = opts.useShellPlaceholders ? "" : process.env.EXE_SESSION_NAME ?? "";
1462
1470
  const headers = {
1463
1471
  Authorization: `Bearer ${readOrCreateDaemonToken(homeDir)}`,
1464
1472
  "X-Agent-Id": agentId,