Merge branch 'worktree-agent-a2f30682'

# Conflicts:
#	.planning/STATE.md
#	src/main/ipc-core-read-handlers.ts
#	src/shared/contracts.ts
This commit is contained in:
ZacharyZhang-NY committed 2026-03-27 19:40:29 -04:00
commit 039c1d117f
10 files changed
+906 -6

No files matched your search

+11
View File
@@ -1191,6 +1191,17 @@ export class AppDatabase {
return row ? { ...row, isPrimary: toBoolean(row.isPrimary) } : null;
}
getRun(id: string): RunRecord {
const row = this.db
.prepare(
"select id, company_id as companyId, task_id as taskId, agent_id as agentId, workspace_id as workspaceId, connector_id as connectorId, status, summary, error_message as errorMessage, exit_code as exitCode, signal, model, session_display_id as sessionDisplayId, cost_usd as costUsd, unattributed_cost as unattributedCost, started_at as startedAt, finished_at as finishedAt, log_path as logPath, created_at as createdAt, updated_at as updatedAt from runs where id = ?",
)
.get(id) as RunRecord | undefined;
if (!row) throw new Error(`Run not found: ${id}`);
row.unattributedCost = Boolean(row.unattributedCost);
return row;
}
getRunAuthState(runId: string): { id: string; companyId: string; agentId: string; status: RunRecord["status"] } | null {
const row = this.db
.prepare("select id, company_id as companyId, agent_id as agentId, status from runs where id = ?")