const require_reduced = require("../values/reduced.cjs");
const require_delta = require("../values/delta.cjs");
const require_messages_reducer = require("../../graph/messages_reducer.cjs");
let zod_v4 = require("zod/v4");
//#region src/state/prebuilt/messages.ts
const messagesValueSchema = zod_v4.z.custom().default(() => []);
const messagesInputSchema = zod_v4.z.custom();
const MessagesValue = new require_reduced.ReducedValue(messagesValueSchema, {
	inputSchema: messagesInputSchema,
	reducer: require_messages_reducer.messagesStateReducer,
	jsonSchemaExtra: {
		langgraph_type: "messages",
		description: "A list of chat messages"
	}
});
/**
* **Experimental.** A messages state field backed by a `DeltaChannel`.
*
* A drop-in alternative to {@link MessagesValue} that persists only per-step
* message deltas (plus periodic snapshots) instead of the full accumulated
* history in every checkpoint blob. Useful for long-running threads where
* re-serializing the entire message list on each step is costly.
*
* @example
* ```ts
* import { StateSchema, MessagesDeltaValue } from "@langchain/langgraph";
*
* const State = new StateSchema({ messages: MessagesDeltaValue });
* ```
*/
const MessagesDeltaValue = new require_delta.DeltaValue(messagesValueSchema, {
	inputSchema: messagesInputSchema,
	reducer: require_messages_reducer.messagesDeltaReducer,
	jsonSchemaExtra: {
		langgraph_type: "messages",
		description: "A list of chat messages"
	}
});
//#endregion
exports.MessagesDeltaValue = MessagesDeltaValue;
exports.MessagesValue = MessagesValue;

//# sourceMappingURL=messages.cjs.map