chatroom-cli 1.55.2 → 1.55.3
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/dist/index.js +21 -2
- package/dist/index.js.map +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -76248,6 +76248,9 @@ To reconnect, run:`);
|
|
|
76248
76248
|
case "superseded":
|
|
76249
76249
|
this.handleSuperseded();
|
|
76250
76250
|
return;
|
|
76251
|
+
case "connection_closed":
|
|
76252
|
+
await this.handleConnectionClosed(response);
|
|
76253
|
+
return;
|
|
76251
76254
|
case "grace_period":
|
|
76252
76255
|
this.handleGracePeriod(response);
|
|
76253
76256
|
return;
|
|
@@ -76265,6 +76268,18 @@ To reconnect, run:`);
|
|
|
76265
76268
|
handleSuperseded() {
|
|
76266
76269
|
this.logAndExit(0, "superseded", "Another get-next-task process started for this role.", `Impact: This process is being replaced by the newer connection.
|
|
76267
76270
|
` + "Action: This is expected if you started a new get-next-task session.");
|
|
76271
|
+
}
|
|
76272
|
+
async handleConnectionClosed(response) {
|
|
76273
|
+
try {
|
|
76274
|
+
await this.client.mutation(api.connections.confirmConnectionClosed, {
|
|
76275
|
+
sessionId: this.sessionId,
|
|
76276
|
+
chatroomId: this.chatroomId,
|
|
76277
|
+
role: this.role,
|
|
76278
|
+
connectionId: this.connectionId
|
|
76279
|
+
});
|
|
76280
|
+
} catch {}
|
|
76281
|
+
this.logAndExit(0, "connection_closed", `This get-next-task connection was closed by request (${response.reason}).`, `Impact: This connection has been terminated (superseded or explicitly closed).
|
|
76282
|
+
` + "Action: This is expected. Reconnect only if you intend to resume listening for tasks.");
|
|
76268
76283
|
}
|
|
76269
76284
|
handleGracePeriod(response) {
|
|
76270
76285
|
const remainingSec = Math.ceil(response.remainingMs / 1000);
|
|
@@ -76427,6 +76442,7 @@ async function getNextTask(chatroomId, options) {
|
|
|
76427
76442
|
process.exit(1);
|
|
76428
76443
|
}
|
|
76429
76444
|
const connectionId = `${Date.now()}-${Math.random().toString(36).substring(2, 9)}`;
|
|
76445
|
+
const machineId = await getMachineId() ?? undefined;
|
|
76430
76446
|
let participantAgentType;
|
|
76431
76447
|
try {
|
|
76432
76448
|
const teamConfigs = await client4.query(api.machines.getTeamAgentConfigs, {
|
|
@@ -76442,6 +76458,7 @@ async function getNextTask(chatroomId, options) {
|
|
|
76442
76458
|
role,
|
|
76443
76459
|
action: "get-next-task:connecting",
|
|
76444
76460
|
connectionId,
|
|
76461
|
+
machineId,
|
|
76445
76462
|
agentType: participantAgentType
|
|
76446
76463
|
});
|
|
76447
76464
|
const connectionTime = new Date().toISOString().replace("T", " ").substring(0, 19);
|
|
@@ -76500,6 +76517,7 @@ var init_get_next_task = __esm(() => {
|
|
|
76500
76517
|
init_api3();
|
|
76501
76518
|
init_storage();
|
|
76502
76519
|
init_client2();
|
|
76520
|
+
init_machine();
|
|
76503
76521
|
init_error_formatting();
|
|
76504
76522
|
init_session();
|
|
76505
76523
|
});
|
|
@@ -79890,11 +79908,12 @@ var init_featureFlags = __esm(() => {
|
|
|
79890
79908
|
});
|
|
79891
79909
|
|
|
79892
79910
|
// ../../services/backend/config/reliability.ts
|
|
79893
|
-
var DAEMON_HEARTBEAT_INTERVAL_MS = 30000, AGENT_REQUEST_DEADLINE_MS = 120000, OBSERVATION_TTL_MS = 60000, OBSERVED_FULL_PUSH_INTERVAL_MS, OBSERVED_SAFETY_POLL_MS = 30000, WORKSPACE_RECENCY_WINDOW_MS, WORKSPACE_LIST_RECONCILE_MS;
|
|
79911
|
+
var DAEMON_HEARTBEAT_INTERVAL_MS = 30000, AGENT_REQUEST_DEADLINE_MS = 120000, OBSERVATION_TTL_MS = 60000, OBSERVED_FULL_PUSH_INTERVAL_MS, OBSERVED_SAFETY_POLL_MS = 30000, WORKSPACE_RECENCY_WINDOW_MS, WORKSPACE_LIST_RECONCILE_MS, CONNECTION_CLOSE_REQUEST_TTL_MS;
|
|
79894
79912
|
var init_reliability = __esm(() => {
|
|
79895
79913
|
OBSERVED_FULL_PUSH_INTERVAL_MS = 5 * 60000;
|
|
79896
79914
|
WORKSPACE_RECENCY_WINDOW_MS = 7 * 24 * 60 * 60 * 1000;
|
|
79897
79915
|
WORKSPACE_LIST_RECONCILE_MS = 60 * 60 * 1000;
|
|
79916
|
+
CONNECTION_CLOSE_REQUEST_TTL_MS = 10 * 60000;
|
|
79898
79917
|
});
|
|
79899
79918
|
|
|
79900
79919
|
// src/events/daemon/agent/on-request-start-agent.ts
|
|
@@ -88864,4 +88883,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
88864
88883
|
});
|
|
88865
88884
|
program2.parse();
|
|
88866
88885
|
|
|
88867
|
-
//# debugId=
|
|
88886
|
+
//# debugId=7F8AA45E5D5C7F2164756E2164756E21
|