This commit is contained in:
ZacharyZhang-NY committed 2026-04-04 12:03:50 -04:00
1 parent 66158e222e
commit 67c757f481
314 files changed
+37945 -22962

No files matched your search

+2 -19
View File
@@ -1,29 +1,12 @@
import type { AppDatabase } from "./database";
const AUTO_APPROVAL_TYPES = new Set(["hire_agent", "approve_ceo_strategy"]);
import { shouldAutoApprove } from "./execution-policy";
export function shouldAutoApproveApproval(
db: AppDatabase,
companyId: string,
approvalType: string,
): boolean {
if (!AUTO_APPROVAL_TYPES.has(approvalType)) {
return false;
}
const company = db
.listSnapshot()
.companies
.find((c) => c.id === companyId);
if (!company?.autoApproveHires) return false;
// When reviewDeliverables is ON, CEO strategy needs human review — don't auto-approve
if (approvalType === "approve_ceo_strategy" && company.reviewDeliverables) {
return false;
}
return true;
return shouldAutoApprove(db, companyId, approvalType);
}
export function resolveApprovalDecision({