Package ai.confiqure

Annotation Type Confiqure.Consent

Enclosing class:
Confiqure

@Target(FIELD) @Retention(RUNTIME) public static @interface Confiqure.Consent
Verbatim, auditable consent capture on a Boolean field. The annotated field is the capture target: the conversation can NEVER write it (it is implicitly Confiqure.SystemOnly) — only the end user's explicit Accept/Decline click on the consent card the engine renders can set it. The engine shows text() word-for-word (an LLM never generates or paraphrases legal text) and records the decision — with a version hash of the exact wording shown — as a compliance audit row ("user U accepted consent v3 at T in conversation C").

Gate the fields that depend on the consent with plain Confiqure.Gate/Confiqure.SectionGate predicates over this Boolean — consent composes with gating instead of being its own gate:

 @Confiqure.Consent(id = "supplier-scraping",
                    text = "By continuing you confirm you have the right to access this "
                         + "supplier site with the credentials you provide, and you accept "
                         + "the risks described in our automation terms.")
 private Boolean userAcceptedLegalTermsRisks;

 @Confiqure.Gate(requires = "userAcceptedLegalTermsRisks == true",
                 message  = "The legal terms must be accepted first.")
 private String siteUrl;
 

The text is inline source (string literals, + concatenation allowed) — it ships with the class on push, so the engine binds each acceptance to the exact wording that was live.

  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Stable consent identifier, e.g.
    The verbatim consent/legal text shown to the user.
  • Element Details

    • id

      String id
      Stable consent identifier, e.g. "supplier-scraping" — the audit rows key on it.
    • text

      String text
      The verbatim consent/legal text shown to the user. Never paraphrased, never model-generated.