Class DefaultResourceAiDelegate

java.lang.Object
com.inductiveautomation.ignition.gateway.config.DefaultResourceAiDelegate
All Implemented Interfaces:
ResourceAiDelegate

public class DefaultResourceAiDelegate extends Object implements ResourceAiDelegate
The standard ResourceAiDelegate, holding a fixed capability level, an optional description, and the resource type's diagnostic contributions. Instances are immutable and safe to share between resource types.

Build one with newBuilder(), or use DEFAULT to grant ResourceAiDelegate.AiCapability.Read with no description and no diagnostics.

  • Field Details

  • Constructor Details

    • DefaultResourceAiDelegate

      public DefaultResourceAiDelegate(ResourceAiDelegate.AiCapability capability, @Nullable String description, Set<String> additionalSensitiveKeys, ResourceDiagnostics diagnostics)
      Parameters:
      capability - the highest capability to grant.
      description - the prose description handed to the model, or null for none.
      additionalSensitiveKeys - configuration field names to blank; copied.
      diagnostics - what a digest for this resource type should know.
  • Method Details

    • getCapability

      public @NonNull ResourceAiDelegate.AiCapability getCapability()
      Description copied from interface: ResourceAiDelegate
      How much of this resource type AI agents may see.
      Specified by:
      getCapability in interface ResourceAiDelegate
      Returns:
      the highest capability this resource type grants; ResourceAiDelegate.AiCapability.Read by default.
    • getDescription

      public Optional<String> getDescription()
      Description copied from interface: ResourceAiDelegate
      A short prose explanation of what this resource type is and what an agent can do with it, used verbatim as context for a model. Not localized, because it is written for a model and models are prompted in English. When empty, consumers fall back to ResourceTypeMeta.getDescription(java.util.Locale) and the resource category name.
      Specified by:
      getDescription in interface ResourceAiDelegate
      Returns:
      the description of this resource type, or an empty optional if none is provided.
    • additionalSensitiveKeys

      public @NonNull Set<String> additionalSensitiveKeys()
      Description copied from interface: ResourceAiDelegate
      Configuration field names that must be blanked before this type's configuration is shown to an agent, beyond the ones any resource type has blanked for it.

      For a field that carries a secret without being named like one: a free-form driver property blob, say, where there is no way to tell a credential from a tuning parameter. Declared here because only the subsystem knows which of its fields those are.

      Specified by:
      additionalSensitiveKeys in interface ResourceAiDelegate
      Returns:
      extra field names to blank, matched case-insensitively; empty by default.
    • getDiagnostics

      public @NonNull ResourceDiagnostics getDiagnostics()
      Description copied from interface: ResourceAiDelegate
      What a diagnostic digest for this resource type should know: how these resources fail, where their log events are, and what live state is worth reporting. Declaring anything here is also what puts a digest panel on this type's page.
      Specified by:
      getDiagnostics in interface ResourceAiDelegate
      Returns:
      this resource type's diagnostic contributions; contributes nothing by default.
      See Also:
    • newBuilder

      public static DefaultResourceAiDelegate.Builder newBuilder()