Class StatefulResourceStatus

java.lang.Object
uno.anahata.ai.context.stateful.StatefulResourceStatus

public class StatefulResourceStatus extends Object
A data class that holds the complete status of a stateful resource, comparing its state in the chat context versus its state on the physical disk.

This is used by the ResourceTracker to determine if a resource in the context is valid, stale, or deleted, and to provide this information to the model and UI.

Author:
Anahata
  • Field Details

    • resourceId

      public final String resourceId
      The unique identifier of the resource (e.g., absolute file path).
    • contextLastModified

      public final long contextLastModified
      The last modified timestamp of the resource as recorded in the context.
    • contextSize

      public final long contextSize
      The size of the resource as recorded in the context.
    • diskLastModified

      public final long diskLastModified
      The current last modified timestamp of the resource on disk.
    • diskSize

      public final long diskSize
      The current size of the resource on disk.
    • status

      public final ResourceStatus status
      The calculated status comparing the context and disk states.
    • resource

      public final StatefulResource resource
      A transient reference to the actual resource object from the context.
    • partId

      public final String partId
      The unique ID of the FunctionResponse Part that introduced this stateful resource into the context (messageId/partIndex).
    • toolCallId

      public final String toolCallId
      The ID of the FunctionCall/FunctionResponse pair that introduced this stateful resource into the context.
  • Constructor Details

    • StatefulResourceStatus

      public StatefulResourceStatus()