chatroom-cli 1.117.2 → 1.117.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 +50 -2
- package/dist/index.js.map +8 -7
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -43319,6 +43319,14 @@ 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
|
+
},
|
|
43322
43330
|
markTaskInboxEventProcessed: async ({ sessionId, machineId, eventId }) => {
|
|
43323
43331
|
const result = await backend2.mutation(api.chatroomWorkspaceTaskInbox.markProcessed, {
|
|
43324
43332
|
sessionId,
|
|
@@ -43360,6 +43368,18 @@ function createConvexNativeTaskDeliveryGateway(backend2) {
|
|
|
43360
43368
|
}
|
|
43361
43369
|
};
|
|
43362
43370
|
}
|
|
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
|
+
}
|
|
43363
43383
|
function mapPendingTaskInboxRows(rows) {
|
|
43364
43384
|
return rows.map((row) => ({
|
|
43365
43385
|
eventId: row._id,
|
|
@@ -44369,9 +44389,9 @@ function runNativeInjectionEffect(task, initialHarnessSessionId, deps) {
|
|
|
44369
44389
|
var init_native_task_injector = __esm(() => {
|
|
44370
44390
|
init_parse_session_augmentation();
|
|
44371
44391
|
init_esm();
|
|
44392
|
+
init_native_cold_session_before_inject();
|
|
44372
44393
|
init_convex_error();
|
|
44373
44394
|
init_agent_lifecycle_fact();
|
|
44374
|
-
init_native_cold_session_before_inject();
|
|
44375
44395
|
init_native_task_injector_logic();
|
|
44376
44396
|
});
|
|
44377
44397
|
|
|
@@ -47406,6 +47426,24 @@ var init_agent_process_contracts = __esm(() => {
|
|
|
47406
47426
|
init_harness_activity_emitter();
|
|
47407
47427
|
});
|
|
47408
47428
|
|
|
47429
|
+
// src/daemon/services/task-service/service/task-service-debug-state.ts
|
|
47430
|
+
async function buildTaskServiceDebugState(input) {
|
|
47431
|
+
const allTasks = input.taskInboxState.listAll();
|
|
47432
|
+
const base = {
|
|
47433
|
+
tasks: allTasks.filter((task) => task.chatroomId === input.chatroomId),
|
|
47434
|
+
knownTaskCount: allTasks.length
|
|
47435
|
+
};
|
|
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
|
+
}
|
|
47446
|
+
|
|
47409
47447
|
// src/daemon/infrastructure/inbox/task-inbox-state.ts
|
|
47410
47448
|
function taskKey(taskId, role) {
|
|
47411
47449
|
return `${taskId}:${role.toLowerCase()}`;
|
|
@@ -47637,6 +47675,15 @@ function createTaskService(deps) {
|
|
|
47637
47675
|
}),
|
|
47638
47676
|
listTasksForRole: (chatroomId, role) => taskInboxState.listForRole(chatroomId, role),
|
|
47639
47677
|
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
|
+
}),
|
|
47640
47687
|
taskInboxState,
|
|
47641
47688
|
releaseTaskAfterTurnFailure: async (args2) => {
|
|
47642
47689
|
const result = await gateway.releaseTaskAfterTurnFailure({
|
|
@@ -134311,6 +134358,7 @@ async function startDaemon() {
|
|
|
134311
134358
|
chatroomId,
|
|
134312
134359
|
manager: init2.agentProcessManager.getDebugState(chatroomId),
|
|
134313
134360
|
service: init2.agentProcessManagerService.debugState?.() ?? null,
|
|
134361
|
+
taskService: await init2.taskService.debugState(chatroomId),
|
|
134314
134362
|
persistedState: {
|
|
134315
134363
|
version: persisted?.version ?? null,
|
|
134316
134364
|
updatedAt: persisted?.updatedAt ?? null,
|
|
@@ -135648,4 +135696,4 @@ program2.hook("preAction", async (_thisCommand, actionCommand) => {
|
|
|
135648
135696
|
});
|
|
135649
135697
|
program2.parse();
|
|
135650
135698
|
|
|
135651
|
-
//# debugId=
|
|
135699
|
+
//# debugId=719F9ABC9BFB97CB64756E2164756E21
|