feat(HAI-001): wire status updates in executor

This commit is contained in:
Dustin Byrne
2026-03-25 18:51:38 -04:00
parent ea148e983b
commit d2056f620a

View File

@@ -75,6 +75,7 @@ export class TaskExecutor {
console.log(`[executor] Starting ${task.id}: ${task.title}`);
try {
await this.store.setStatus(task.id, "executing");
// Check dependencies
const allTasks = await this.store.listTasks();
const unmetDeps = task.dependencies.filter((depId) => {
@@ -146,6 +147,7 @@ export class TaskExecutor {
}
} catch (err: any) {
console.error(`[executor] ✗ ${task.id} execution failed:`, err.message);
await this.store.setStatus(task.id, "idle");
this.options.onError?.(task, err);
} finally {
this.executing.delete(task.id);