ExtractionRequest

data class ExtractionRequest constructor(val sourceLocator: SourceLocator? = null, val sourceRevision: SourceRevisionRef? = null, val profile: ExtractionContentProfileRef? = null, val currentRun: ExtractionRunRef? = null)

What a caller wants to say about one extraction, on top of the text and the user it belongs to.

Extraction keeps learning about new dimensions — where the material came from, which version of it, which content policy it runs under, which run it belongs to — and each one would otherwise mean another argument on IncrementalPropositionExtraction.rememberText and another overload to keep the old shape callable. They travel here together, so the next dimension is a field on this type and the entry-point signatures stay put. A host that overrides an entry point keeps compiling when one is added, and sees the new value without touching its override. currentRun is the first field to arrive that way: it landed with no signature change anywhere.

Everything is optional. An empty request — NONE, or ExtractionRequest() — asks for the extraction DICE has always done.

A sourceRevision needs a sourceLocator whose key it matches, because a revision names one version of one specific source. That pairing is checked while the request is being built, so a caller finds out about a mismatch before extraction reads a byte. profile and currentRun are checked against nothing: each is independent of where the material came from, and coupling them to the locator and the revision would invent a relationship the contract does not have. DICE also never checks that a currentRun names a run that exists — the host mints run ids and the run store is the only thing that could answer the question.

EXPERIMENTAL, for as long as ExtractionContentProfileRef is.

Constructors

Link copied to clipboard
constructor(sourceLocator: SourceLocator? = null, sourceRevision: SourceRevisionRef? = null, profile: ExtractionContentProfileRef? = null, currentRun: ExtractionRunRef? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

the extraction run this call belongs to. Identity only: DICE puts it on the analysis context and stores nothing under it until the run store lands (DICE #67).

Link copied to clipboard

True when this request carries nothing at all, so the call means what the same call meant before requests existed. Comparing against NONE keeps this honest as fields are added.

Link copied to clipboard

the host's content-profile identity for this extraction. DICE carries it and does nothing else with it: no provider, model, or credential is chosen from it, and extraction runs exactly as it would without one.

Link copied to clipboard

where this run's material lives, when the caller has a typed source for it. The pipeline stamps it onto every proposition's provenance, so a caller who knows the real source gets richer grounding than the content-hash fallback.

Link copied to clipboard

the provider's own identifier for the version of sourceLocator this run reads. Supplying one asserts that the revision covers the whole text or the whole file being extracted; DICE reads material as one aggregate and cannot work that out for itself.

Functions

Link copied to clipboard

Returns a copy that belongs to the given extraction run. EXPERIMENTAL. Changes no other field and no extraction behaviour.

Link copied to clipboard

Returns a copy attributed to the given content profile. EXPERIMENTAL. Changes no other field and no extraction behaviour.

Link copied to clipboard

Returns a copy grounded in the given source.

Link copied to clipboard

Returns a copy carrying a revision of this request's source. Throws if there is no locator, or if the revision names a different source key.