PropositionQuery

data class PropositionQuery(val contextId: <Error class: unknown class>? = null, val entityId: String? = null, val anyEntityIds: List<String>? = null, val allEntityIds: List<String>? = null, val statuses: Set<PropositionStatus>? = null, val minLevel: Int? = null, val maxLevel: Int? = null, val createdAfter: Instant? = null, val createdBefore: Instant? = null, val revisedAfter: Instant? = null, val revisedBefore: Instant? = null, val accessedAfter: Instant? = null, val accessedBefore: Instant? = null, val minConfidence: Double? = null, val minEffectiveConfidence: Double? = null, val effectiveConfidenceAsOf: Instant? = null, val decayK: Double = 2.0, val minImportance: Double? = null, val minReinforceCount: Int? = null, val minTrustScore: Double? = null, val pinned: Boolean? = null, val orderBy: PropositionQuery.OrderBy = OrderBy.NONE, val limit: Int? = null, val belowEffectiveConfidence: Double? = null)

Composable query specification for propositions.

Important: Always start with a scoped factory method to avoid accidentally querying all propositions. Use againstContext or forContextId as the entry point.

Kotlin usage (direct construction with defaults):

val query = PropositionQuery(
contextId = sessionContext,
entityId = "user-123",
minLevel = 0,
orderBy = OrderBy.EFFECTIVE_CONFIDENCE_DESC,
)

Java usage (builder pattern via withers):

PropositionQuery query = PropositionQuery.againstContext("session-123")
.withEntityId("user-123")
.withMinLevel(0)
.withOrderBy(OrderBy.EFFECTIVE_CONFIDENCE_DESC);

Constructors

Link copied to clipboard
constructor(contextId: <Error class: unknown class>? = null, entityId: String? = null, anyEntityIds: List<String>? = null, allEntityIds: List<String>? = null, statuses: Set<PropositionStatus>? = null, minLevel: Int? = null, maxLevel: Int? = null, createdAfter: Instant? = null, createdBefore: Instant? = null, revisedAfter: Instant? = null, revisedBefore: Instant? = null, accessedAfter: Instant? = null, accessedBefore: Instant? = null, minConfidence: Double? = null, minEffectiveConfidence: Double? = null, effectiveConfidenceAsOf: Instant? = null, decayK: Double = 2.0, minImportance: Double? = null, minReinforceCount: Int? = null, minTrustScore: Double? = null, pinned: Boolean? = null, orderBy: PropositionQuery.OrderBy = OrderBy.NONE, limit: Int? = null, belowEffectiveConfidence: Double? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Ordering options for query results.

Properties

Link copied to clipboard
val accessedAfter: Instant? = null
Link copied to clipboard
val accessedBefore: Instant? = null
Link copied to clipboard
val allEntityIds: List<String>? = null
Link copied to clipboard
val anyEntityIds: List<String>? = null
Link copied to clipboard
Link copied to clipboard
val contextId: <Error class: unknown class>? = null
Link copied to clipboard
val createdAfter: Instant? = null
Link copied to clipboard
val createdBefore: Instant? = null
Link copied to clipboard
val decayK: Double = 2.0
Link copied to clipboard
Link copied to clipboard
val entityId: String? = null
Link copied to clipboard
val limit: Int? = null
Link copied to clipboard
val maxLevel: Int? = null
Link copied to clipboard
val minConfidence: Double? = null
Link copied to clipboard
Link copied to clipboard
val minImportance: Double? = null
Link copied to clipboard
val minLevel: Int? = null
Link copied to clipboard
val minReinforceCount: Int? = null
Link copied to clipboard
val minTrustScore: Double? = null
Link copied to clipboard
Link copied to clipboard
val pinned: Boolean? = null
Link copied to clipboard
val revisedAfter: Instant? = null
Link copied to clipboard
val revisedBefore: Instant? = null
Link copied to clipboard

Functions

Link copied to clipboard

Filter to propositions accessed within the given duration from now.

Link copied to clipboard

Filter to propositions created within the given duration from now.

Link copied to clipboard

Get the context ID value as a String (Java-friendly).

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Filter to propositions revised within the given duration from now.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun withAllEntities(vararg entityIds: String): PropositionQuery
Link copied to clipboard
Link copied to clipboard
fun withAnyEntity(vararg entityIds: String): PropositionQuery
Link copied to clipboard
Link copied to clipboard

Keep only propositions whose effective confidence is strictly below threshold.

Link copied to clipboard
fun withContextId(contextId: <Error class: unknown class>): PropositionQuery
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Filter on raw (un-decayed) confidence — "was this ever reliable?". Use this for membership / eager-inclusion gates; use withMinEffectiveConfidence (or orderedByEffectiveConfidence) for ranking, so decay lowers a fact's position without evicting it.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
fun withPinned(pinned: Boolean = true): PropositionQuery

Restrict to pinned (true) or unpinned (false) propositions.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard