chatroom-cli 1.0.81 → 1.0.83

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 (2) hide show
  1. package/dist/index.js +20 -2
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -10061,7 +10061,6 @@ function ensureMachineRegistered() {
10061
10061
  config.availableHarnesses = detectAvailableHarnesses();
10062
10062
  config.harnessVersions = detectHarnessVersions(config.availableHarnesses);
10063
10063
  config.lastSyncedAt = now;
10064
- config.hostname = hostname2();
10065
10064
  saveMachineConfig(config);
10066
10065
  }
10067
10066
  return {
@@ -10703,7 +10702,7 @@ var init_register_agent = __esm(() => {
10703
10702
  });
10704
10703
 
10705
10704
  // ../../services/backend/config/reliability.ts
10706
- var HEARTBEAT_INTERVAL_MS = 30000, HEARTBEAT_TTL_MS = 60000, DAEMON_HEARTBEAT_INTERVAL_MS = 30000;
10705
+ var HEARTBEAT_INTERVAL_MS = 30000, HEARTBEAT_TTL_MS = 90000, DAEMON_HEARTBEAT_INTERVAL_MS = 30000;
10707
10706
  // ../../services/backend/prompts/base/cli/task-started/command.ts
10708
10707
  function taskStartedCommand(params) {
10709
10708
  const prefix = params.cliEnvPrefix || "";
@@ -10974,6 +10973,19 @@ async function waitForTask(chatroomId, options) {
10974
10973
  chatroomId,
10975
10974
  role,
10976
10975
  connectionId
10976
+ }).then((result) => {
10977
+ if (result?.status === "rejoin_required") {
10978
+ if (!silent) {
10979
+ console.warn(`⚠️ Participant record missing — re-joining chatroom`);
10980
+ }
10981
+ return client2.mutation(api.participants.join, {
10982
+ sessionId,
10983
+ chatroomId,
10984
+ role,
10985
+ readyUntil: Date.now() + HEARTBEAT_TTL_MS,
10986
+ connectionId
10987
+ });
10988
+ }
10977
10989
  }).catch((err) => {
10978
10990
  if (!silent) {
10979
10991
  console.warn(`⚠️ Heartbeat failed: ${err.message}`);
@@ -13380,6 +13392,7 @@ Run any chatroom command first to register this machine,`);
13380
13392
  }
13381
13393
  const ctx = { client: client2, sessionId: typedSessionId, machineId, config: config3 };
13382
13394
  console.log(`[${formatTimestamp()}] \uD83D\uDE80 Daemon started`);
13395
+ console.log(` CLI version: ${getVersion()}`);
13383
13396
  console.log(` Machine ID: ${machineId}`);
13384
13397
  console.log(` Hostname: ${config3?.hostname ?? "Unknown"}`);
13385
13398
  console.log(` Available harnesses: ${config3?.availableHarnesses.join(", ") || "none"}`);
@@ -13396,10 +13409,14 @@ Run any chatroom command first to register this machine,`);
13396
13409
  return ctx;
13397
13410
  }
13398
13411
  async function startCommandLoop(ctx) {
13412
+ let heartbeatCount = 0;
13399
13413
  const heartbeatTimer = setInterval(() => {
13400
13414
  ctx.client.mutation(api.machines.daemonHeartbeat, {
13401
13415
  sessionId: ctx.sessionId,
13402
13416
  machineId: ctx.machineId
13417
+ }).then(() => {
13418
+ heartbeatCount++;
13419
+ console.log(`[${formatTimestamp()}] \uD83D\uDC93 Daemon heartbeat #${heartbeatCount} OK`);
13403
13420
  }).catch((err) => {
13404
13421
  console.warn(`[${formatTimestamp()}] ⚠️ Daemon heartbeat failed: ${err.message}`);
13405
13422
  });
@@ -13504,6 +13521,7 @@ var init_daemon_start = __esm(() => {
13504
13521
  init_storage();
13505
13522
  init_client2();
13506
13523
  init_machine();
13524
+ init_version();
13507
13525
  MODEL_REFRESH_INTERVAL_MS = 5 * 60 * 1000;
13508
13526
  });
13509
13527
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chatroom-cli",
3
- "version": "1.0.81",
3
+ "version": "1.0.83",
4
4
  "description": "CLI for multi-agent chatroom collaboration",
5
5
  "type": "module",
6
6
  "bin": {