diff --git a/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx b/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx
index a71e949..3a9cdc3 100644
--- a/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx
+++ b/admin-compliance/app/sdk/agent/_components/BannerCheckTab.tsx
@@ -55,6 +55,8 @@ export function BannerCheckTab() {
try { const s = localStorage.getItem('banner-check-result'); return s ? JSON.parse(s) : null } catch { return null }
})
const [categories, setCategories] = useState(['all'])
+ const [useAgent, setUseAgent] = useState(false)
+ const [mcResults, setMcResults] = useState(null)
const [history, setHistory] = useState<{ url: string; date: string; provider: string; violations: number; pct: number; resultKey: string }[]>(() => {
if (typeof window === 'undefined') return []
try { return JSON.parse(localStorage.getItem('banner-check-history') || '[]') } catch { return [] }
@@ -97,6 +99,36 @@ export function BannerCheckTab() {
setResult(data)
localStorage.setItem('banner-check-result', JSON.stringify(data))
+ // If agent mode: also run cookie doc-check with 381 MCs
+ if (useAgent) {
+ setProgress('KI-Agent prueft Cookie-Richtlinie (381 MCs)...')
+ try {
+ const mcRes = await fetch('/api/sdk/v1/agent/doc-check', {
+ method: 'POST',
+ headers: { 'Content-Type': 'application/json' },
+ body: JSON.stringify({
+ entries: [{ doc_type: 'cookie', label: 'Cookie-Richtlinie', url: url.trim() }],
+ recipient: 'dsb@breakpilot.local',
+ use_agent: true,
+ }),
+ })
+ if (mcRes.ok) {
+ const { check_id } = await mcRes.json()
+ if (check_id) {
+ for (let i = 0; i < 60; i++) {
+ await new Promise(r => setTimeout(r, 3000))
+ const poll = await fetch(`/api/sdk/v1/agent/doc-check?check_id=${check_id}`)
+ if (!poll.ok) continue
+ const pd = await poll.json()
+ if (pd.progress) setProgress(`KI-Agent: ${pd.progress}`)
+ if (pd.status === 'completed' && pd.result) { setMcResults(pd.result); break }
+ if (pd.status === 'failed') break
+ }
+ }
+ }
+ } catch { /* agent check is optional */ }
+ }
+
// Add to history with persistent result
const violations = data.structured_checks?.filter((c: CheckItem) => !c.passed && !c.skipped).length || 0
const resultKey = `banner-check-result-${Date.now()}`
@@ -162,6 +194,16 @@ export function BannerCheckTab() {
+
+
+
+