feat(04-02): worker lock release, wake promotion, IPC wakeup channel, and preload bridge
- Add releaseTaskLock to worker crash recovery after finishRun (EXEC-02) - Track affected agent company IDs for targeted wake promotion - Replace listWakeupRequests+loop with promoteWakeupRequests+wakeAgentIfPossible in run completion - Track hadDeferredWakes flag for circuit breaker self-wake decision - Add listWakeupRequests IPC channel to IPC_CHANNELS - Add wakeupQuerySchema with Zod validation and WakeupRequestRecord interface - Add listWakeupRequests to DesktopApi type - Add listWakeupRequests preload bridge method - Add registerHandle for listWakeupRequests IPC handler with company validation
This commit is contained in:
1 parent
8a424822a5
commit
930273ce87
4 files changed
+58
-15
No files matched your search
@@ -6,6 +6,7 @@ import {
|
||||
connectorInputSchema,
|
||||
metricsQuerySchema,
|
||||
settingsSchema,
|
||||
wakeupQuerySchema,
|
||||
} from "@shared/contracts";
|
||||
import { fail, ok, type RegisterCoreHandlersDependencies } from "./ipc-core-common";
|
||||
|
||||
@@ -142,4 +143,15 @@ export function registerCoreReadHandlers({
|
||||
if (err) return err;
|
||||
return ok(db.getStandupReport(companyId));
|
||||
});
|
||||
|
||||
registerHandle(IPC_CHANNELS.listWakeupRequests, (_event, input) => {
|
||||
const parsed = wakeupQuerySchema.parse(input);
|
||||
const err = ensureCompanyExists(parsed.companyId);
|
||||
if (err) return err;
|
||||
return ok(db.listWakeupRequests(parsed.companyId, {
|
||||
status: parsed.status,
|
||||
agentId: parsed.agentId,
|
||||
limit: parsed.limit,
|
||||
}));
|
||||
});
|
||||
}
|
||||
Reference in new issue
Block a user