feat: add trusted ticket intake backend

This commit is contained in:
hailin
2026-07-16 19:37:32 +08:00
parent b592dc219d
commit bcd6de4609
28 changed files with 1966 additions and 42 deletions

View File

@@ -158,6 +158,32 @@ class AgentRun(models.Model):
]
class AgentArtifact(models.Model):
public_id = models.UUIDField(default=uuid.uuid4, unique=True, editable=False)
run = models.ForeignKey(
AgentRun,
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name="artifacts",
)
artifact_type = models.CharField(max_length=80)
schema_version = models.PositiveIntegerField(default=1)
payload = models.JSONField(default=dict)
created_by = models.ForeignKey(
settings.AUTH_USER_MODEL,
null=True,
blank=True,
on_delete=models.SET_NULL,
related_name="agent_artifacts",
)
created_at = models.DateTimeField(auto_now_add=True)
class Meta:
ordering = ["-created_at"]
indexes = [models.Index(fields=["artifact_type", "created_at"])]
class AgentRunStep(models.Model):
run = models.ForeignKey(AgentRun, on_delete=models.CASCADE, related_name="steps")
code = models.CharField(max_length=80)