feat: DSFA Section 8 KI-Anwendungsfälle + Bundesland RAG-Ingest
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 38s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 19s
All checks were successful
CI / go-lint (push) Has been skipped
CI / python-lint (push) Has been skipped
CI / nodejs-lint (push) Has been skipped
CI / test-go-ai-compliance (push) Successful in 38s
CI / test-python-backend-compliance (push) Successful in 33s
CI / test-python-document-crawler (push) Successful in 24s
CI / test-python-dsms-gateway (push) Successful in 19s
- Migration 028: ai_use_case_modules JSONB + section_8_complete auf compliance_dsfas - Neues ai-use-case-types.ts: AIUseCaseModule Interface, 8 Typen, Art22Assessment, AI Act Risikoklassen, WP248-Kriterien, Privacy by Design, createEmptyModule() Helper - types.ts: Section 8 in DSFA_SECTIONS, ai_use_case_modules im DSFA Interface, section_8_complete in DSFASectionProgress - api.ts: addAIUseCaseModule, updateAIUseCaseModule, removeAIUseCaseModule - 5 neue UI-Komponenten: AIUseCaseTypeSelector, Art22AssessmentPanel, AIRiskCriteriaChecklist, AIUseCaseModuleEditor (7 Tabs), AIUseCaseSection - DSFASidebar: Section 8 Eintrag + calculateSectionProgress case 8 - ReviewScheduleSection: ai_use_case_module Trigger-Typ ergänzt - page.tsx: Section 8 Rendering + Weiter-Button auf activeSection < 8 + KI-Module Counter - scripts/ingest-dsfa-bundesland.sh: WP248 + alle 17 Behörden → bp_dsfa_corpus - Docs: dsfa.md Section 8 + RAG-Corpus, Developer Portal DSFA mit AI-Modul-Code-Beispielen Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -16,6 +16,7 @@ import type {
|
||||
ApproveDSFARequest,
|
||||
DSFATriggerInfo,
|
||||
} from './types'
|
||||
import type { AIUseCaseModule } from './ai-use-case-types'
|
||||
|
||||
// =============================================================================
|
||||
// CONFIGURATION
|
||||
@@ -386,6 +387,44 @@ export async function updateDSFAMitigationStatus(
|
||||
// HELPER FUNCTIONS
|
||||
// =============================================================================
|
||||
|
||||
// =============================================================================
|
||||
// AI USE CASE MODULE OPERATIONS
|
||||
// =============================================================================
|
||||
|
||||
/**
|
||||
* Add a new AI use case module to a DSFA (Section 8)
|
||||
*/
|
||||
export async function addAIUseCaseModule(dsfaId: string, module: AIUseCaseModule): Promise<DSFA> {
|
||||
const dsfa = await getDSFA(dsfaId)
|
||||
const existing = dsfa.ai_use_case_modules || []
|
||||
return updateDSFA(dsfaId, { ai_use_case_modules: [...existing, module] } as Partial<DSFA>)
|
||||
}
|
||||
|
||||
/**
|
||||
* Update an existing AI use case module in a DSFA
|
||||
*/
|
||||
export async function updateAIUseCaseModule(
|
||||
dsfaId: string,
|
||||
moduleId: string,
|
||||
updates: Partial<AIUseCaseModule>
|
||||
): Promise<DSFA> {
|
||||
const dsfa = await getDSFA(dsfaId)
|
||||
const existing = dsfa.ai_use_case_modules || []
|
||||
const updated = existing.map(m =>
|
||||
m.id === moduleId ? { ...m, ...updates, updated_at: new Date().toISOString() } : m
|
||||
)
|
||||
return updateDSFA(dsfaId, { ai_use_case_modules: updated } as Partial<DSFA>)
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove an AI use case module from a DSFA
|
||||
*/
|
||||
export async function removeAIUseCaseModule(dsfaId: string, moduleId: string): Promise<DSFA> {
|
||||
const dsfa = await getDSFA(dsfaId)
|
||||
const updated = (dsfa.ai_use_case_modules || []).filter(m => m.id !== moduleId)
|
||||
return updateDSFA(dsfaId, { ai_use_case_modules: updated } as Partial<DSFA>)
|
||||
}
|
||||
|
||||
function calculateRiskLevelString(
|
||||
likelihood: 'low' | 'medium' | 'high',
|
||||
impact: 'low' | 'medium' | 'high'
|
||||
|
||||
Reference in New Issue
Block a user