# Generated by Django 5.2 on 2025-11-07 17:39

import uuid

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


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0182_dailycreditconfig_and_more'),
        migrations.swappable_dependency(settings.AUTH_USER_MODEL),
    ]

    operations = [
        migrations.CreateModel(
            name='PersistentAgentSystemMessage',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('body', models.TextField(help_text="System directive text injected ahead of the agent's instructions.")),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('delivered_at', models.DateTimeField(blank=True, help_text='Timestamp when this directive was injected into the system prompt.', null=True)),
                ('is_active', models.BooleanField(default=True, help_text='Disable to keep the record but skip injecting it into future prompts.')),
                ('agent', models.ForeignKey(help_text='Agent that should receive this system directive.', on_delete=django.db.models.deletion.CASCADE, related_name='system_prompt_messages', to='api.persistentagent')),
                ('created_by', models.ForeignKey(blank=True, help_text='Admin user that issued this directive.', null=True, on_delete=django.db.models.deletion.SET_NULL, related_name='issued_agent_system_messages', to=settings.AUTH_USER_MODEL)),
            ],
            options={
                'ordering': ['-created_at'],
            },
        ),
    ]

