# Generated by Django 5.2 on 2025-10-20 17:57

from django.conf import settings
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0165_browseruseagenttask_webhook_last_called_at_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.AddField(
            model_name='persistentagent',
            name='proactive_last_trigger_at',
            field=models.DateTimeField(blank=True, help_text='Timestamp of the most recent proactive outreach trigger.', null=True),
        ),
        migrations.AddField(
            model_name='persistentagent',
            name='proactive_opt_in',
            field=models.BooleanField(default=True, help_text='Enable Gobii to proactively start conversations offering related help for this agent.'),
        ),
        migrations.AlterField(
            model_name='persistentagentsystemstep',
            name='code',
            field=models.CharField(choices=[('PROCESS_EVENTS', 'Process Events'), ('PEER_LINK_CREATED', 'Peer Link Created'), ('SNAPSHOT', 'Snapshot'), ('CREDENTIALS_PROVIDED', 'Credentials Provided'), ('CONTACTS_APPROVED', 'Contacts Approved'), ('LLM_CONFIGURATION_REQUIRED', 'LLM Configuration Required'), ('PROACTIVE_TRIGGER', 'Proactive Trigger')], max_length=64),
        ),
        migrations.AddIndex(
            model_name='persistentagent',
            index=models.Index(fields=['proactive_opt_in', 'is_active'], name='pa_proactive_opt_idx'),
        ),
        migrations.AddIndex(
            model_name='persistentagent',
            index=models.Index(fields=['proactive_last_trigger_at'], name='pa_proactive_last_idx'),
        ),
    ]
