This commit is contained in:
team 1
2026-05-10 12:07:27 +02:00
parent 886b6fac84
commit 63210a14de
6 changed files with 143 additions and 14 deletions

View File

@@ -1428,7 +1428,7 @@ final class AgentRunnerConfig
}
/**
* @return array<int, array{anchor: string, match_terms: string[]}>
* @return array<int, array{anchor: string, match_terms: string[], template?: string}>
*/
public function getGenericDeviceQueryAnchorRules(): array
{
@@ -1470,10 +1470,20 @@ final class AgentRunnerConfig
continue;
}
$rules[] = [
$normalizedRule = [
'anchor' => $anchor,
'match_terms' => $matchTerms,
];
$template = $rule['template'] ?? null;
if (is_scalar($template)) {
$template = trim((string) $template);
if ($template !== '') {
$normalizedRule['template'] = $template;
}
}
$rules[] = $normalizedRule;
}
return $rules;