"""Install synthetic inputs for the built-in Question replay scenario.
Usage: python3 seed.py CHECKOUT
Only fixture data is replaced; application code is unchanged.
One turn asks, in order: single select, two questions, expand, Settings, keyboard.
"""
import json, pathlib, sys
root=pathlib.Path(sys.argv[1])
rows=[{'type':'expect_outbound','frame':{'kind':'request','method':'session/prompt','params':{}}}]
for name,count in [('Single',1),('Advance',2),('Expand',1),('Settings',1),('Keyboard',1)]:
    props={f'{name.lower()}_{i}':{'type':'string','title':name if count==1 else f'{name} {i}','description':f'{name}: choose Alpha or Beta.' if count==1 else f'{name} {i}: choose Alpha or Beta.','enum':['Alpha','Beta']} for i in range(1,count+1)}
    rows.append({'type':'emit_inbound','afterMs':1500,'frame':{'kind':'request','method':'elicitation/create','params':{'sessionId':'synthetic','mode':'form','message':f'{name} selection','requestedSchema':{'type':'object','title':name,'properties':props,'required':list(props)}}}})
rows.extend([{'type':'emit_inbound','frame':{'kind':'notification','method':'session/update','params':{'sessionId':'synthetic','update':{'sessionUpdate':'agent_message_chunk','content':{'type':'text','text':'All five question scenarios answered.'}}}}},{'type':'emit_inbound','frame':{'kind':'response','method':'session/prompt','result':{'stopReason':'end_turn'}}}])
(root/'apps/server/src/orchestration-v2/testkit/fixtures/acp_elicitation/registry_transcript.ndjson').write_text(''.join(json.dumps(r)+'\n' for r in rows))
