"""Synthetic native Claude transcript for cache-duration pricing evidence.
Usage: python3 seed.py CLAUDE_CONFIG_DIR PUBLIC_PRICING_MODEL_ID
Then start each checkout with T3CODE_DEV_SEED=0 and CLAUDE_CONFIG_DIR set to
that directory. Never point this at an existing provider home.
Choose a published model with $3.75/M five-minute writes and $6/M one-hour
writes; use no custom price override. The app fetches its own pricing table.
In the app: sidebar Usage, Cost, 30 days, select only Claude Code.
Expected cache write cost: 400000*0.00000375+600000*0.000006 = $5.10.
Base instead shows $3.75. Both retain 1M tokens. Restart and reopen Usage.
AI-assisted; verified with the tests and tools listed above.
"""
import datetime
import json
import pathlib
import sys
root = pathlib.Path(sys.argv[1])
if root.exists():
    raise SystemExit('Choose a fresh synthetic provider directory')
folder = root / 'projects' / 'demo'
folder.mkdir(parents=True)
record = {
    'type': 'assistant',
    'timestamp': datetime.datetime.now(datetime.timezone.utc).isoformat(),
    'sessionId': 'synthetic-cache-session', 'requestId': 'request-1',
    'message': {
        'id': 'message-1', 'model': sys.argv[2],
        'content': [{'type': 'text', 'text': 'Synthetic cache pricing evidence'}],
        'usage': {
            'input_tokens': 0, 'output_tokens': 0, 'cache_read_input_tokens': 0,
            'cache_creation_input_tokens': 1000000,
            'cache_creation': {
                'ephemeral_1h_input_tokens': 600000,
                'ephemeral_5m_input_tokens': 400000,
            },
        },
    },
}
(folder / 'session.jsonl').write_text(json.dumps(record) + '\n')
