feat: schema_version 3 with DE/EN field descriptions

Signed-off-by: flemming-it <sf@flemming.it>
This commit is contained in:
flemming-it 2026-06-01 22:46:16 +02:00
parent c1cea9cff1
commit 858384fa8f

View file

@ -1,54 +1,93 @@
schema_version: 2
schema_version: 3
provider: fai
name: text-anonymize
version: 0.1.0
# Capability provided by this module.
provides:
- capability: text.anonymize
version: 0.1.0
# Inputs the invoke function accepts.
inputs:
# The text to anonymize. Plain UTF-8, any length the host
# tolerates as a Payload::Text (operator policy caps).
text: text
# Optional newline-separated list of additional bare terms
# (operator-supplied — names of people, organisations, or
# places that the regex patterns won't catch) to redact in
# addition to the built-in categories. Empty string disables
# this extension. Each line is matched whole-word
# (case-insensitive).
custom_terms: text
text:
type: text
description:
en: |
The text to anonymize. Plain UTF-8, any length the host
tolerates as a Payload::Text (operator policy caps).
de: |
Der zu anonymisierende Text. UTF-8, in jeder Länge die
der Host als Payload::Text zulässt (operator policy).
custom_terms:
type: text
description:
en: |
Optional newline-separated list of additional bare terms
(operator-supplied names of people, organisations, or
places the regex patterns won't catch) to redact in
addition to the built-in categories. Empty string
disables this extension. Each line is matched
whole-word, case-insensitive.
de: |
Optional zeilengetrennte Liste zusätzlicher Begriffe
(operator-gepflegte Namen von Personen, Organisationen
oder Orten, die die Regex-Patterns nicht abfangen), die
zusätzlich zu den eingebauten Kategorien geschwärzt
werden. Leer = Erweiterung aus. Jede Zeile wird
wortweise, case-insensitive, gematcht.
# Outputs produced.
outputs:
# The anonymized text. Each detected entity is replaced
# with a token of the shape ⟦TYPE_N⟧ where TYPE is the
# category (EMAIL, PHONE, IBAN, BIC, IPV4, GERMAN_TAX_ID,
# NAME, CUSTOM) and N is a stable counter starting at 1
# per category, in order of first occurrence. The opening
# / closing characters are U+27E6 / U+27E7 (mathematical
# white square brackets) so the token never collides with
# plain `[…]` already present in the source.
anonymized: text
# JSON report describing each redaction:
# {
# "redactions": [
# { "type": "EMAIL", "token": "⟦EMAIL_1⟧",
# "original": "foo@bar.de", "offset": 42 }
# ],
# "counts": { "EMAIL": 3, "PHONE": 1, ... }
# }
# The full `original` text is included so the operator can
# run a verify-pass against the redacted file (compliance:
# GDPR Art. 32(1)(a) "ability to undo" requirement). Hub
# operators that want a pseudo-anonymisation-only flow can
# discard this output downstream.
report: json
anonymized:
type: text
description:
en: |
The anonymized text. Each detected entity is replaced
with a token of the shape ⟦TYPE_N⟧ where TYPE is the
category (EMAIL, PHONE, IBAN, BIC, IPV4, GERMAN_TAX_ID,
NAME, CUSTOM) and N is a stable counter starting at 1
per category, in order of first occurrence. The
opening / closing characters are U+27E6 / U+27E7
(mathematical white square brackets) so the token never
collides with plain […] already present in the source.
de: |
Der anonymisierte Text. Jede erkannte Entität wird durch
einen Token der Form ⟦TYPE_N⟧ ersetzt, wobei TYPE die
Kategorie ist (EMAIL, PHONE, IBAN, BIC, IPV4,
GERMAN_TAX_ID, NAME, CUSTOM) und N ein stabiler Zähler
je Kategorie. Die Klammerzeichen sind U+27E6 / U+27E7,
damit der Token nie mit normalen […] aus der Quelle
kollidiert.
report:
type: json
description:
en: |
JSON report describing each redaction:
{
"redactions": [
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
"original": "foo@bar.de", "offset": 42 }
],
"counts": { "EMAIL": 3, "PHONE": 1, ... }
}
The full `original` text is included so the operator can
run a verify-pass against the redacted file (compliance:
GDPR Art. 32(1)(a) "ability to undo" requirement). Hub
operators that want a pseudo-anonymisation-only flow can
discard this output downstream.
de: |
JSON-Report mit jeder Schwärzung:
{
"redactions": [
{ "type": "EMAIL", "token": "⟦EMAIL_1⟧",
"original": "foo@bar.de", "offset": 42 }
],
"counts": { "EMAIL": 3, "PHONE": 1, ... }
}
Der vollständige `original`-Text ist enthalten, damit
Operatoren eine Verify-Pass gegen die geschwärzte Datei
fahren können (DSGVO Art. 32(1)(a) "Wiederherstellungs-
fähigkeit"). Wer Pseudo-Anonymisierung allein will,
verwirft diesen Output nachgelagert.
# Permissions required.
#
# Pure-Rust, regex-only, in-WASM. No filesystem, no network,
# no LLM. The empty list makes that explicit.
# no LLM.
permissions: []