Add monetization spine + Build Your Own Case (Min Sak)

- Stripe: StripeClient.php, checkout/portal/webhook endpoints, idempotent event handling
- FreeTier: tier-aware credits (free/light/pro/pro_plus), bonus_balance, hourly caps per tier
- pricing.php + billing.php: 4-tier cards, 3 topups, Customer Portal, balance breakdown
- Min Sak: CaseStore.php, AzureDocIntelligence.php, AzureSearchAdmin.php — per-user hybrid RAG
- api/case/: upload, list, delete, ingest-callback (HMAC-auth'd from n8n)
- award-survey-credits: inter-site HMAC endpoint for dobetternorge.no survey bonus
- dashboard.php: tier badge, balance breakdown card, Min Sak CTA, survey CTA
- KorrespondAgent + all 3 other agents: use_my_case toggle wired to dbnToolsCaseContext()
- bootstrap.php: dbnToolsCaseContext(), dbnToolsIntersiteSecret(), dbnToolsCurrentTier()

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-20 20:52:54 +02:00
parent ed5489d174
commit ba9cddf9a1
30 changed files with 2804 additions and 133 deletions
+2 -2
View File
@@ -576,7 +576,7 @@
${(data.legal_check && data.legal_check.length) ? `
<div class="korr-legal-check">
<h4 class="korr-legal-check__title">⚖ Legal threshold check <small>(dbn-legal-agent-v2)</small></h4>
<h4 class="korr-legal-check__title">⚖ Legal threshold check <small>(dbn-legal-agent-v3)</small></h4>
${data.legal_check.map((f) => `
<div class="bvj-red-flag">
<div class="bvj-red-flag__head">
@@ -701,7 +701,7 @@
${(data.legal_check && data.legal_check.length) ? `
<div class="korr-legal-check">
<h4 class="korr-legal-check__title">⚖ Legal threshold check <small>(dbn-legal-agent-v2)</small></h4>
<h4 class="korr-legal-check__title">⚖ Legal threshold check <small>(dbn-legal-agent-v3)</small></h4>
${data.legal_check.map((f) => `
<div class="bvj-red-flag">
<div class="bvj-red-flag__head">