# Generated by Django 6.0 on 2026-04-07 18:46

import api.models
import django.db.models.deletion
import uuid
from django.db import migrations, models


class Migration(migrations.Migration):

    dependencies = [
        ('api', '0336_merge_20260407_1603'),
    ]

    operations = [
        migrations.AddField(
            model_name='globalagentskill',
            name='secrets',
            field=models.JSONField(blank=True, default=list),
        ),
        migrations.AddField(
            model_name='persistentagentskill',
            name='secrets',
            field=models.JSONField(blank=True, default=list),
        ),
        migrations.CreateModel(
            name='GlobalAgentSkillCustomTool',
            fields=[
                ('id', models.UUIDField(default=uuid.uuid4, editable=False, primary_key=True, serialize=False)),
                ('name', models.CharField(max_length=128)),
                ('tool_name', models.CharField(max_length=128)),
                ('description', models.TextField()),
                ('source_file', models.FileField(max_length=512, upload_to=api.models.global_skill_custom_tool_upload_to)),
                ('parameters_schema', models.JSONField(blank=True, default=dict)),
                ('timeout_seconds', models.PositiveIntegerField(default=300)),
                ('created_at', models.DateTimeField(auto_now_add=True)),
                ('updated_at', models.DateTimeField(auto_now=True)),
                ('global_skill', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='bundled_custom_tools', to='api.globalagentskill')),
            ],
            options={
                'ordering': ['tool_name'],
                'indexes': [models.Index(fields=['global_skill', '-updated_at'], name='gsk_tool_skill_upd_idx')],
                'constraints': [models.UniqueConstraint(fields=('global_skill', 'tool_name'), name='unique_global_skill_custom_tool_name')],
            },
        ),
    ]
