import {
  StateSchema,
  MessagesValue,
} from "@langchain/langgraph";
import { z } from "zod/v4";

export const ProposedTriggerEvent = z.object({
  Event: z.string(),
  ReasoningWhyRelevant: z.string(),
  SearchQuery: z.string(),
  Url: z.url(),
  Date: z.string(),
  context: z.string().optional(),
  score: z.number().optional()
})

export const ProposedTriggerEventArray = z.array(ProposedTriggerEvent);

export const MessagesState = new StateSchema({
  disinformationTitle: z.string(),
  date: z.string(),
  messages: MessagesValue,
  proposedTriggerEvent: ProposedTriggerEventArray,
  proposedTriggerEventIndex: z.int(),
  normalizedClaim: z.string(),
});

