@discloai/core
v0.1.0
Published
EU AI Act Article 50 disclosure SDK — chatbot, AI content, deepfake, and biometric notices
Maintainers
Readme
@discloai/core
EU AI Act Article 50 compliance SDK — automatic chatbot disclosures, AI content labels, deepfake labels, and biometric notices.
Why DiscloAI?
The EU AI Act Article 50 (enforcement from August 2026) requires anyone deploying AI systems in the EU to:
- §1 — Tell users when they're interacting with an AI chatbot
- §3 — Notify users when biometric data is processed
- §4 ¶1 — Label deepfake / synthetic media
- §4 ¶2 — Label AI-generated content
DiscloAI handles all four requirements in a single <script> tag. Non-compliance can result in fines up to €15 million or 3% of worldwide annual turnover.
Quick start
Script tag (any site)
<script
src="https://cdn.discloai.com/discloai.min.js"
data-site-id="YOUR_SITE_ID"
defer>
</script>Get your Site ID from the DiscloAI dashboard.
npm
npm install @discloai/coreimport { init } from '@discloai/core';
init({ siteId: 'YOUR_SITE_ID' });React
npm install @discloai/react// app/layout.tsx or _app.tsx
import { DiscloAIProvider } from '@discloai/react';
export default function RootLayout({ children }) {
return (
<html>
<body>
<DiscloAIProvider siteId="YOUR_SITE_ID" />
{children}
</body>
</html>
);
}Next.js (App Router)
npm install @discloai/nextjs// app/layout.tsx
import { DiscloAI } from '@discloai/nextjs';
export default function RootLayout({ children }) {
return (
<html>
<body>
<DiscloAI siteId="YOUR_SITE_ID" />
{children}
</body>
</html>
);
}WordPress
Install the DiscloAI WordPress plugin and enter your Site ID in Settings → DiscloAI.
Components
DiscloAI automatically detects and configures the right disclosure for each use case.
| Component | Article 50 | Trigger |
|---|---|---|
| ChatbotDisclosure | §1 | On chat widget open |
| AIContentLabel | §4 ¶2 | On page load if [data-discloai-content] present |
| DeepfakeLabel | §4 ¶1 | On page load if [data-discloai-synthetic] present |
| BiometricNotice | §3 | On page load if [data-discloai-biometric] present |
Manual control
import { init } from '@discloai/core';
init({
siteId: 'YOUR_SITE_ID',
components: {
ChatbotDisclosure: { enabled: true, selector: '#my-chat-widget' },
AIContentLabel: { enabled: true },
DeepfakeLabel: { enabled: true },
BiometricNotice: { enabled: false },
},
});Vendor presets
DiscloAI auto-detects common chat platforms. Supported: Intercom, Crisp, Tidio, Zendesk, Drift, LiveChat, HubSpot, Freshdesk.
import { init, VENDOR_PRESETS } from '@discloai/core';
init({
siteId: 'YOUR_SITE_ID',
components: {
ChatbotDisclosure: VENDOR_PRESETS.intercom,
},
});Exemptions
init({
siteId: 'YOUR_SITE_ID',
components: {
ChatbotDisclosure: {
enabled: true,
obviousContext: false, // §1 — only exempts if human-staffed fallback exists
},
AIContentLabel: {
enabled: true,
editorialControl: false, // §4¶2 — only exempts if human substantially edited output
},
DeepfakeLabel: {
enabled: true,
artisticContext: false, // §4¶1 — only exempts clearly fictional/satirical content
},
},
});Compliance audit log
All disclosure events are logged to the DiscloAI backend using sendBeacon. Logs include:
- Disclosure type + SDK version
- Anonymised page URL (SHA-256 hash)
- Anonymised session (SHA-256 hash)
- Server-generated timestamp
No PII is ever sent or stored.
Performance
- CDN bundle: < 15KB gzipped
- Adds < 100ms to page TTI (Time to Interactive)
- Zero dependencies
- SSR-safe (no
window/documentat module import time)
Internationalization
Disclosures are displayed in the user's browser language. Supports all 24 official EU languages:
bg cs da de el en es et fi fr ga hr hu it lt lv mt nl pl pt ro sk sl sv
Security
- No
innerHTML— all DOM manipulation usestextContent/createElement - Audit events authenticated by Origin header (no tokens in the browser)
- Custom CSS sanitized — escape sequences and dangerous properties stripped
- WCAG 2.1 AA compliant — all disclosures have
role="dialog",aria-modal, focus management
Dashboard
Manage sites, view compliance audit logs, and generate PDF compliance reports at app.discloai.com.
Plans: Starter (€49/mo), Professional (€129/mo), Agency (€349/mo).
License
MIT © 2026 DiscloAI
