Helper type to infer the state schema type from a middleware This filters out private properties (those starting with underscore) Supports both Zod schemas (InteropZodObject) and StateSchema from LangGraph
InferMiddlewareState: T extends AgentMiddleware<
TSchema,
any,
any,
any
> TSchema extends InteropZodObject FilterPrivateProps<InferInteropZodOutput<TSchema>> : TSchema extends StateDefinitionInit FilterPrivateProps<InferSchemaInput<TSchema>> : __type : __type