agent foundation

This commit is contained in:
2026-03-06 00:44:52 +01:00
parent 9819cba733
commit 9a08f96c11
199 changed files with 8522 additions and 1880 deletions

View File

@@ -17,6 +17,8 @@ class ScheduledJobService
) {
}
// Syncs the registry definitions to the DB on every request that needs job data —
// new jobs are inserted automatically without a separate migration step.
public function ensureSystemJobs(): void
{
$definitions = $this->scheduledJobRegistry->definitions();
@@ -217,6 +219,7 @@ class ScheduledJobService
{
$type = $this->scheduleCalculator->normalizeScheduleType((string) ($existing['schedule_type'] ?? ($definition['default_schedule_type'] ?? 'daily')));
$normalized = [
// label and description always come from the registry — admin edits to those fields are not preserved.
'label' => (string) ($definition['label'] ?? (string) ($existing['label'] ?? '')),
'description' => (string) ($definition['description'] ?? (string) ($existing['description'] ?? '')),
'enabled' => (int) ($existing['enabled'] ?? ($definition['default_enabled'] ?? 1)),