IngestedArtifact

data class IngestedArtifact constructor(val sourceId: String, val locator: SourceLocator, val text: String, val contentHash: String? = null, val trust: AuthorityTier = AuthorityTier.UNKNOWN, val createdAt: Instant? = null, val ingestedAt: Instant? = null)

A normalized unit of source material handed to DICE at the front door.

Adapters parse their native formats (documents, web pages, connector payloads) into already-extracted text before constructing an artifact — core never parses. The artifact carries the source identity, a SourceLocator for provenance, an optional caller-supplied contentHash used as the deduplication key, trust metadata, and optional timestamps.

The locator and trust fields are caller-asserted claims about the source, not proofs DICE can independently verify; downstream authority resolution derives tiers structurally from the locator kind.

Constructors

Link copied to clipboard
constructor(sourceId: String, locator: SourceLocator, text: String, contentHash: String? = null, trust: AuthorityTier = AuthorityTier.UNKNOWN, createdAt: Instant? = null, ingestedAt: Instant? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Builder step: has source id and locator, needs text; yields a complete artifact.

Link copied to clipboard

Builder step: has source id, needs a locator.

Properties

Link copied to clipboard
val contentHash: String? = null

Optional caller-supplied deduplication key. When present it is authoritative for dedup; when absent the consuming handler computes one.

Link copied to clipboard
val createdAt: Instant? = null

Optional timestamp for when the source material was created.

Link copied to clipboard
val ingestedAt: Instant? = null

Optional timestamp for when the material was ingested.

Link copied to clipboard

Provenance reference describing where the material lives.

Link copied to clipboard

Stable source key used as the chunk parent identity and the per-artifact deduplication record key. Must not be blank.

Link copied to clipboard

Already-extracted text content. Must not be blank.

Link copied to clipboard

Caller-asserted authority of the source; defaults to AuthorityTier.UNKNOWN, the fail-safe lowest authority.

Functions

Link copied to clipboard

Returns a copy with the deduplication content hash set.

Link copied to clipboard
fun withTimestamps(createdAt: Instant? = null, ingestedAt: Instant? = null): IngestedArtifact

Returns a copy with the created and ingested timestamps set.

Link copied to clipboard

Returns a copy with the trust tier set.