import { proxyActivities } from "@temporalio/workflow";

const { recordTaskExecution } = proxyActivities<{ recordTaskExecution(input: { taskId: string }): Promise<{ taskId: string; reportId: string }> }>({
  startToCloseTimeout: "30 seconds",
  retry: { maximumAttempts: 3 }
});

export async function taskExecutionWorkflow(input: { taskId: string }) {
  const result = await recordTaskExecution(input);
  return { status: "completed", ...result };
}
