I am not a literary major, and these ideas may have more codified terms that I am unaware of, feel free to correct my understanding. I have some spoilers as well, read at your own risk.
You may have heard the literary idea of "Setting as Character". I believe this means giving the setting of a story an identity, an arc, and ways to interact with a narrative beyond being a passive participant.
I have recently been considering the idea of Story as Character in a similar way. I think a story could be viewed with its own identity, arc and actions. This immediately frames our discussion as metanarrative/metatextual.
A story could fall into a literary trope, perhaps a simple love story, and in that way be understood as having its own identity. A love story has particular characteristics, the couple, the element preventing their union, the happy ending of love blooming, etc.
A story usually has an arc: setting, inciting incident, rising action, climax, resolution, etc. The story as a whole is all these elements and a typical character arc is just this on an individual scale.
A story could have actions. This is what we might call fate and/or deus ex machina. I think a story can be an active participant in its own telling, where the events are not mere chance but because the story has its own purpose/desires/intentions. At this point I think Story and Author are very intertwined, because it may really be the author's purpose/desires/intentions that drive the events. Like a well written character, however, I think a story can have its own personality that leads the author into unexpected circumstances. This idea, of a story having actions, is where I think video games have an opportunity to explore:
I am reminded of Doki Doki Literature Club, that presents itself as a dating sim. The story, to be expected is of romance growing and resolving. The Game becomes a terrifying actor that denies happy endings because of its own (or the antagonist's) insecurity.
In the book House of Leaves, the minotaur haunting anyone related to the house is the story trying to destroy itself, which will lead to the readers destruction.
Movies also take advantage of this idea:
In Stranger than Fiction, Will Farrell's character is antagonized by the very story in which he is a character.
The book in The Neverending Story is another world that draws readers into it, making them part of the story.
I think more games can have the story or better yet, the game itself be an actor in the narrative.
I'm mostly curious if anyone has other examples of game, books, movies like this.