in this case it's both the DM and Mary doing the hiding rather than just the DM
My point was that they're not hiding any backstory. There is no hidden backstory, no unrevealed fiction, in your example. What the GM and Mary are hiding is that the thief in question is Mary's player character.
Mary doesn't want the other players to take Keyes into the party just on the meta-basis of Keyes being her character; she thinks instead it'd be fun and interesting to see what happens if Keyes is presented as an NPC.
<snip>
In the scene I presented it's in fact Mary who's the bystander
<snip>
The only time they don't have agency is where it's kind of locked in that during their conversation in the tavern Keyes WILL try to steal from one of them; and I think you'd call that scene-framing. After that they've got agency all over the place: the very fate of Mary's character is in their hands, for crying out loud; though they don't yet know about the "Mary's character" bit. The only further influence the DM can have on Mary's behalf (and in this instance would intentionally wield if the situation allows) is to try to at some point frame the four characters into a situation where they are more or less alone and can talk if they want to - the bouncers throwing them all out of the tavern together is an easy option here.
As far as I can tell, the only interesting thing about the episode you describe is that the NPC is, in fact, a PC. Mary is the one who has sent that up - so she is not a bystander, she is the instigator of the whole thing - and the players don't actually know what it is that it is interesting about the scene. It's an in-joke between Mary and the GM.
The fact that the players can declare attacks against Keyes strikes me as really neither here nor there. Presumably they could have declared attacks against the people in the bar, too, or gone on a rampage in the town committing arson on all the buildings and taking on any NPC who tries to stop them. But if that's the measure of agency, then every RPG grants every player unlimited agency. When I refer to "agency in respect of the content of the shared fiction", I've got in mind more than just declaring actions more-or-less at random until your PC is killed.
pemerton said:
The players have an infinite number of ways of provoking the GM to tell them new stuff.
And it's that infinte number of ways which gives them their agency.
<snip>
the players have all kinds of agency, starting with the 'fluff' and 'crunch' of the characters they create and continuing with the - as noted above - infinite number of run-of-play choices they can make once the puck is dropped and play begins. And while the DM may have some ideas as to what story she'd like to see grow out of her game and can have input and influence in various ways, the end decisions here all rest with the players no matter what the DM does or says short of running a hard railroad. This side of the fiction largely belongs to the players and this is where they have their agency over the shared fiction; though
they still need a DM (it's what she's there for) to help bring it to life.
Having an infinite range of ways to provoke someone else to author stuff doesn't mean that you have a lot of agency.
I've bolded what I think is the key phrase in your post where the point I've just made is hidden:
the players need the GM to help bring it to life. There are a very large variety of techniques available, across the corpus of roleplaying games and roleplaying approaches, to a GM who want to "help the players bring it to life". Some of them are more conducive to player agency than others.
Your example, upthread, of a GM establishing a whole lot of unrevealed consequences playing out "behind the scenes" and resulting in the PCs (and, thereby, their players) suffering consequences which the players never contemplated, intended or deliberately put into play in the game, illustrates the point. The players took advantage of their freedom to make moves in the game. The GM helped them "bring it to life". But what agency did the players exercise? None that I can see. All the significant choices were made by the GM.