Class ArtifactThinkerOutput<R extends Reasoning>

Type Parameters:
R - the reasoning type for this response
All Implemented Interfaces:
Artifact

public abstract class ArtifactThinkerOutput<R extends Reasoning> extends ThinkerOutput<R> implements Artifact
Thinker output that is itself an Artifact, so a thinker can serve as a fan-out worker: its typed answer lands directly in the result list and the artifact registry. Single inheritance forces this class to carry its own ref field and summary cache instead of extending AbstractArtifact - the Artifact interface is the contract, AbstractArtifact is only a convenience base.

Concrete subclasses need a @TypeAlias annotation (registration mints refs from it) and should keep their answer data in serializable fields: worker outputs must be self-contained, because refs pointing into the worker thinker's own conversation registry are worker-scoped and do not resolve in the parent.

Since:
0.1 (2026-06-09)
Author:
Andrey Santrosyan
  • Constructor Details

    • ArtifactThinkerOutput

      public ArtifactThinkerOutput()
  • Method Details

    • getArtifactRef

      public String getArtifactRef()
      Description copied from interface: Artifact
      Gets the artifact reference string, or null if not yet assigned.
      Specified by:
      getArtifactRef in interface Artifact
      Returns:
      the artifact reference in the canonical format «artifact:type~uuid», or null
    • setArtifactRef

      public void setArtifactRef(String artifactRef)
      Description copied from interface: Artifact
      Sets the artifact reference string.
      Specified by:
      setArtifactRef in interface Artifact
      Parameters:
      artifactRef - the artifact reference
    • getCachedSummary

      public SummarizedField getCachedSummary(String fieldName)
      Description copied from interface: Artifact
      Gets a previously cached summary for a field, or null if not cached. Used by the Jackson serializer to avoid re-summarizing on repeated serializations.
      Specified by:
      getCachedSummary in interface Artifact
      Parameters:
      fieldName - the snake_case field name
      Returns:
      the cached SummarizedField, or null
    • cacheSummary

      public void cacheSummary(String fieldName, SummarizedField value)
      Description copied from interface: Artifact
      Caches a summary for a field. Called by the Jackson serializer after generating a summary so subsequent serializations skip the Summarizer.
      Specified by:
      cacheSummary in interface Artifact
      Parameters:
      fieldName - the snake_case field name
      value - the SummarizedField containing both full text and summary