chatroom-cli 1.117.3 → 1.117.4
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 +26 -62
- package/dist/index.js.map +7 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43319,14 +43319,6 @@ function createConvexNativeTaskDeliveryGateway(backend2) {
|
|
|
43319
43319
|
});
|
|
43320
43320
|
return mapPendingTaskInboxRows(rows);
|
|
43321
43321
|
},
|
|
43322
|
-
listTaskInboxEventsForChatroom: async ({ sessionId, machineId, chatroomId }) => {
|
|
43323
|
-
const rows = await backend2.query(api.chatroomWorkspaceTaskInbox.listForChatroom, {
|
|
43324
|
-
sessionId,
|
|
43325
|
-
machineId,
|
|
43326
|
-
chatroomId
|
|
43327
|
-
});
|
|
43328
|
-
return mapTaskInboxHistoryRows(rows);
|
|
43329
|
-
},
|
|
43330
43322
|
markTaskInboxEventProcessed: async ({ sessionId, machineId, eventId }) => {
|
|
43331
43323
|
const result = await backend2.mutation(api.chatroomWorkspaceTaskInbox.markProcessed, {
|
|
43332
43324
|
sessionId,
|
|
@@ -43368,18 +43360,6 @@ function createConvexNativeTaskDeliveryGateway(backend2) {
|
|
|
43368
43360
|
}
|
|
43369
43361
|
};
|
|
43370
43362
|
}
|
|
43371
|
-
function mapTaskInboxHistoryRows(rows) {
|
|
43372
|
-
return rows.map((row) => ({
|
|
43373
|
-
eventId: row._id,
|
|
43374
|
-
eventType: row.eventType,
|
|
43375
|
-
status: row.status,
|
|
43376
|
-
role: row.role,
|
|
43377
|
-
taskId: row.taskId,
|
|
43378
|
-
taskStatus: row.task.status,
|
|
43379
|
-
createdAt: row.createdAt,
|
|
43380
|
-
...row.processedAt === undefined ? {} : { processedAt: row.processedAt }
|
|
43381
|
-
}));
|
|
43382
|
-
}
|
|
43383
43363
|
function mapPendingTaskInboxRows(rows) {
|
|
43384
43364
|
return rows.map((row) => ({
|
|
43385
43365
|
eventId: row._id,
|
|
@@ -47427,21 +47407,12 @@ var init_agent_process_contracts = __esm(() => {
|
|
|
47427
47407
|
});
|
|
47428
47408
|
|
|
47429
47409
|
// src/daemon/services/task-service/service/task-service-debug-state.ts
|
|
47430
|
-
|
|
47410
|
+
function buildTaskServiceDebugState(input) {
|
|
47431
47411
|
const allTasks = input.taskInboxState.listAll();
|
|
47432
|
-
|
|
47412
|
+
return {
|
|
47433
47413
|
tasks: allTasks.filter((task) => task.chatroomId === input.chatroomId),
|
|
47434
47414
|
knownTaskCount: allTasks.length
|
|
47435
47415
|
};
|
|
47436
|
-
try {
|
|
47437
|
-
return { ...base, inboxEvents: await input.loadInboxEvents() };
|
|
47438
|
-
} catch (error51) {
|
|
47439
|
-
return {
|
|
47440
|
-
...base,
|
|
47441
|
-
inboxEvents: [],
|
|
47442
|
-
inboxEventsError: error51 instanceof Error ? error51.message : String(error51)
|
|
47443
|
-
};
|
|
47444
|
-
}
|
|
47445
47416
|
}
|
|
47446
47417
|
|
|
47447
47418
|
// src/daemon/infrastructure/inbox/task-inbox-state.ts
|
|
@@ -47675,15 +47646,7 @@ function createTaskService(deps) {
|
|
|
47675
47646
|
}),
|
|
47676
47647
|
listTasksForRole: (chatroomId, role) => taskInboxState.listForRole(chatroomId, role),
|
|
47677
47648
|
listAllTasks: () => taskInboxState.listAll(),
|
|
47678
|
-
debugState: (chatroomId) => buildTaskServiceDebugState({
|
|
47679
|
-
taskInboxState,
|
|
47680
|
-
loadInboxEvents: () => gateway.listTaskInboxEventsForChatroom({
|
|
47681
|
-
sessionId: deps.sessionId,
|
|
47682
|
-
machineId: deps.machineId,
|
|
47683
|
-
chatroomId
|
|
47684
|
-
}),
|
|
47685
|
-
chatroomId
|
|
47686
|
-
}),
|
|
47649
|
+
debugState: (chatroomId) => buildTaskServiceDebugState({ taskInboxState, chatroomId }),
|
|
47687
47650
|
taskInboxState,
|
|
47688
47651
|
releaseTaskAfterTurnFailure: async (args2) => {
|
|
47689
47652
|
const result = await gateway.releaseTaskAfterTurnFailure({
|
|
@@ -64272,6 +64235,7 @@ async function localFallbackDebugState(chatroomId, port, error51) {
|
|
|
64272
64235
|
return {
|
|
64273
64236
|
capturedAt: new Date().toISOString(),
|
|
64274
64237
|
warning: `Could not connect to local daemon on port ${port}: ${error51 instanceof Error ? error51.message : String(error51)}`,
|
|
64238
|
+
chatroomId,
|
|
64275
64239
|
process: { pidFile: getPidFilePath(), running: isDaemonRunning().running },
|
|
64276
64240
|
daemon: {
|
|
64277
64241
|
convexUrl: getConvexUrl(),
|
|
@@ -64279,8 +64243,10 @@ async function localFallbackDebugState(chatroomId, port, error51) {
|
|
|
64279
64243
|
machineId,
|
|
64280
64244
|
config: config3
|
|
64281
64245
|
},
|
|
64282
|
-
|
|
64283
|
-
|
|
64246
|
+
localState: {
|
|
64247
|
+
persistedAgents: persisted
|
|
64248
|
+
},
|
|
64249
|
+
backendState: {}
|
|
64284
64250
|
};
|
|
64285
64251
|
}
|
|
64286
64252
|
async function debugDaemon(options) {
|
|
@@ -134323,19 +134289,19 @@ async function startDaemon() {
|
|
|
134323
134289
|
const debugState = async (chatroomId) => {
|
|
134324
134290
|
const persisted = await loadDaemonState(init2.machineId);
|
|
134325
134291
|
const persistedAgents = Object.fromEntries(Object.entries(persisted?.agents ?? {}).filter(([key]) => key.startsWith(`${chatroomId}/`)));
|
|
134326
|
-
let
|
|
134327
|
-
let inboxError;
|
|
134292
|
+
let backendState = {};
|
|
134328
134293
|
try {
|
|
134329
|
-
|
|
134294
|
+
backendState = await init2.backend.query(api.daemon.chatroom.debug, {
|
|
134330
134295
|
sessionId: asConvexSessionId(init2.sessionId),
|
|
134331
|
-
machineId: init2.machineId
|
|
134296
|
+
machineId: init2.machineId,
|
|
134297
|
+
chatroomId
|
|
134332
134298
|
});
|
|
134333
|
-
inbox = rows.filter((row) => row.command?.chatroomId === chatroomId);
|
|
134334
134299
|
} catch (error51) {
|
|
134335
|
-
|
|
134300
|
+
backendState = { error: error51 instanceof Error ? error51.message : String(error51) };
|
|
134336
134301
|
}
|
|
134337
134302
|
return {
|
|
134338
134303
|
capturedAt: new Date().toISOString(),
|
|
134304
|
+
chatroomId,
|
|
134339
134305
|
process: {
|
|
134340
134306
|
pid: process.pid,
|
|
134341
134307
|
uptimeSeconds: process.uptime(),
|
|
@@ -134355,20 +134321,18 @@ async function startDaemon() {
|
|
|
134355
134321
|
harnessVersions: init2.config.harnessVersions
|
|
134356
134322
|
} : null
|
|
134357
134323
|
},
|
|
134358
|
-
|
|
134359
|
-
|
|
134360
|
-
|
|
134361
|
-
|
|
134362
|
-
|
|
134363
|
-
|
|
134364
|
-
|
|
134365
|
-
|
|
134366
|
-
|
|
134324
|
+
localState: {
|
|
134325
|
+
slots: init2.agentProcessManager.getDebugState(chatroomId),
|
|
134326
|
+
agentProcessService: init2.agentProcessManagerService.debugState?.() ?? null,
|
|
134327
|
+
taskInboxReadModel: init2.taskService.debugState(chatroomId),
|
|
134328
|
+
persistedAgents: {
|
|
134329
|
+
version: persisted?.version ?? null,
|
|
134330
|
+
updatedAt: persisted?.updatedAt ?? null,
|
|
134331
|
+
lastSeenEventId: persisted?.lastSeenEventId ?? null,
|
|
134332
|
+
agents: persistedAgents
|
|
134333
|
+
}
|
|
134367
134334
|
},
|
|
134368
|
-
|
|
134369
|
-
machineCommandInbox: inbox,
|
|
134370
|
-
...inboxError ? { machineCommandInboxError: inboxError } : {}
|
|
134371
|
-
}
|
|
134335
|
+
backendState
|
|
134372
134336
|
};
|
|
134373
134337
|
};
|
|
134374
134338
|
const localWeb = await startLocalWebServer({ host: "127.0.0.1", port: localWebPort }, {
|
|
@@ -135696,4 +135660,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
135696
135660
|
});
|
|
135697
135661
|
program2.parse();
|
|
135698
135662
|
|
|
135699
|
-
//# debugId=
|
|
135663
|
+
//# debugId=EB6599E1C5E83C1264756E2164756E21
|