chatroom-cli 1.0.81 → 1.0.82

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