You've already forked dokumenta-semantiska-analize
Import UAPF package
Wrap the three opaque UAPF-IP capabilities (ai.redact@1, ai.extract@1, event.emit@1) in Algorithm Cards under algorithms/, per UAPF v2.3.0 chapter 13. Each Card supplies intent, IO contract, ownership, validation history, risk class, audit configuration, and (where relevant) privacy/risk extensions. Cards are referenced from resource targets in resources/mappings.yaml. Changes: - NEW algorithms/pii_redactor.card.yaml — deterministic redactor - NEW algorithms/vdvc_semantic_extractor.card.yaml — stochastic LLM extractor, EU AI Act high-risk, human oversight mandatory - NEW algorithms/completion_event_emitter.card.yaml — deterministic CloudEvents 1.0 emitter - uapf.yaml + manifest.json: version 2.0.0 -> 3.0.0, + paths.algorithms, + algorithm_cards: true - resources/mappings.yaml: single agent.semantic-extractor target split into 3 algorithm-specific targets, each w/ algorithm_card ref - bpmn/: UNCHANGED (algorithm-card refs live on resource targets, not in BPMN — no extension elements required) - Removed provides_decisions from manifest (was not in SSOT manifest schema; DMN decisions are self-describing via the dmn/ cornerstone) - README rewritten with algorithm-card audit-question table
90 lines
3.8 KiB
YAML
90 lines
3.8 KiB
YAML
kind: uapf.resources.mapping
|
|
|
|
# Host-readable contract for the capability-backed service tasks.
|
|
#
|
|
# v3.0.0 change: the single agent.semantic-extractor target has been
|
|
# split into three algorithm-specific targets, each referencing an
|
|
# Algorithm Card under algorithms/ (UAPF v2.3.0, chapter 13). The
|
|
# binding shape is unchanged. The BPMN file is unchanged.
|
|
#
|
|
# The three DMN decisions (assess-personal-data-risk,
|
|
# gdpr-processing-route, human-validation-gate) remain self-describing
|
|
# and continue to need no host resource — they are evaluated by the
|
|
# UAPF runtime against the dmn/ cornerstone.
|
|
|
|
targets:
|
|
- id: agent.pii_redactor
|
|
type: ai_agent
|
|
name: PII detection and redaction agent
|
|
description: |
|
|
Host capability ai.redact@1, governed by the
|
|
pii_redactor Algorithm Card.
|
|
capabilities:
|
|
- capability.ai.redact
|
|
algorithm_card: algo.semantic_document_analysis.pii_redactor
|
|
|
|
- id: agent.vdvc_semantic_extractor
|
|
type: ai_agent
|
|
name: VDVC semantic metadata extractor agent
|
|
description: |
|
|
Host capability ai.extract@1, governed by the
|
|
vdvc_semantic_extractor Algorithm Card. EU AI Act
|
|
Annex III high-risk; human oversight is mandatory and is
|
|
enforced downstream by the human-validation-gate DMN.
|
|
capabilities:
|
|
- capability.ai.extract
|
|
algorithm_card: algo.semantic_document_analysis.vdvc_semantic_extractor
|
|
|
|
- id: agent.completion_event_emitter
|
|
type: ai_agent
|
|
name: Completion event emitter agent
|
|
description: |
|
|
Host capability event.emit@1, governed by the
|
|
completion_event_emitter Algorithm Card.
|
|
capabilities:
|
|
- capability.event.emit
|
|
algorithm_card: algo.semantic_document_analysis.completion_event_emitter
|
|
|
|
bindings:
|
|
- source: { type: bpmn.serviceTask, ref: Task_DetectRedactPii }
|
|
targetId: agent.pii_redactor
|
|
mode: autonomous
|
|
contract:
|
|
input:
|
|
- { name: content, type: string, required: true }
|
|
output:
|
|
- { name: redactedContent, type: string, description: "Source text with PII masked." }
|
|
- { name: detectedEntityTypes, type: array, description: "PII TYPE names only, never values." }
|
|
- { name: personasKodaPresent, type: boolean, description: "Latvian national ID regex hit." }
|
|
- { name: financialDataPresent,type: boolean, description: "IBAN regex hit." }
|
|
- { name: contactDataPresent, type: boolean, description: "E-mail or phone regex hit." }
|
|
- { name: piiCategoryCount, type: number, description: "Count of distinct PII categories detected." }
|
|
timeout: "10s"
|
|
requiredCapabilities: [capability.ai.redact]
|
|
|
|
- source: { type: bpmn.serviceTask, ref: Task_ExtractSemantics }
|
|
targetId: agent.vdvc_semantic_extractor
|
|
mode: autonomous
|
|
contract:
|
|
input:
|
|
- { name: redactedContent, type: string, required: true }
|
|
- { name: schemaRef, type: string, required: true, description: "resources/schemas/vdvc-semantic-summary.schema.json" }
|
|
output:
|
|
- { name: semanticSummary, type: object, description: "Validates against the VDVC v1.1 schema." }
|
|
- { name: sensitivityControl, type: object }
|
|
- { name: aiConfidenceScore, type: number, description: "Flat 0.0-1.0; consumed by human-validation-gate." }
|
|
- { name: outputPiiErrorCount, type: number, description: "PII re-scan hits on extracted text; consumed by human-validation-gate." }
|
|
timeout: "30s"
|
|
retries: { maxAttempts: 2, backoffMs: 2000 }
|
|
requiredCapabilities: [capability.ai.extract]
|
|
|
|
- source: { type: bpmn.serviceTask, ref: Task_EmitResult }
|
|
targetId: agent.completion_event_emitter
|
|
mode: autonomous
|
|
contract:
|
|
input:
|
|
- { name: eventType, type: string, required: true }
|
|
- { name: payload, type: object, required: true }
|
|
timeout: "5s"
|
|
requiredCapabilities: [capability.event.emit]
|