//#region src/agent/goals/checklist-types.ts
const CHECKLIST_ITEM_PENDING = "pending";
const CHECKLIST_ITEM_COMPLETED = "completed";
const CHECKLIST_ITEM_IMPOSSIBLE = "impossible";
const TERMINAL_CHECKLIST_STATUSES = new Set([CHECKLIST_ITEM_COMPLETED, CHECKLIST_ITEM_IMPOSSIBLE]);
function checklistCounts(items) {
	const total = items.length;
	let completed = 0;
	let impossible = 0;
	for (const it of items) if (it.status === "completed") completed += 1;
	else if (it.status === "impossible") impossible += 1;
	return {
		total,
		completed,
		impossible,
		pending: total - completed - impossible
	};
}
function allChecklistTerminal(items) {
	if (!items.length) return false;
	return items.every((it) => TERMINAL_CHECKLIST_STATUSES.has(it.status));
}
//#endregion
export { CHECKLIST_ITEM_COMPLETED, CHECKLIST_ITEM_IMPOSSIBLE, CHECKLIST_ITEM_PENDING, TERMINAL_CHECKLIST_STATUSES, allChecklistTerminal, checklistCounts };

//# sourceMappingURL=checklist-types.js.map