LorekeeperReputationProfileService

Coordinates reputation-memory recording, profile generation, and archived profile lookup.

Types

Link copied to clipboard
data class MemoryEventRequest(val playerId: UUID, val playerName: String, val source: LorekeeperReputationService.ReputationMemorySource, val delta: Int, val reason: String, val evidence: String, val relatedNames: List<String> = emptyList())

Input payload for recording a single reputation memory event.

Link copied to clipboard
data class MutationRefreshRequest(val playerId: UUID, val playerName: String, val oldScore: Int, val newScore: Int, val oldTier: LorekeeperReputationService.ReputationTier, val newTier: LorekeeperReputationService.ReputationTier, val triggerReason: String, val deliverToPlayer: Boolean)

Input payload for scheduling a post-mutation biography refresh.

Link copied to clipboard
data class ProfileGenerationResult(val profile: LoreStorage.ReputationProfile, val deliveredToPlayer: Boolean)

Result returned when a profile is generated and archived.

Link copied to clipboard

Tone used for player biography generation.

Link copied to clipboard
data class ReputationBookContext(val playerId: UUID, val playerName: String, val score: Int, val tier: LorekeeperReputationService.ReputationTier, val reputationMutationEvidence: List<String>, val interviewEvidence: List<String>, val talkEvidence: List<String>, val submittedBookEvidence: List<String>)

Structured context passed into player biography generation.

Properties

Link copied to clipboard

Emerald cost to purchase a single player biography book.

Functions

Link copied to clipboard
fun buildNarrativeContextLines(server: MinecraftServer, relevantPlayerNames: Set<String>, maxLines: Int = 8): List<String>

Builds reputation context lines for weekly/history prompts.

Link copied to clipboard
fun getLatestProfile(server: MinecraftServer, playerId: UUID): LoreStorage.ReputationProfile?

Returns the latest canonical archived profile for a player.

Link copied to clipboard
fun getRecentEvents(server: MinecraftServer, playerId: UUID, limit: Int): List<LoreStorage.ReputationMemoryEvent>

Returns recent reputation memory events for a player, newest first.

Link copied to clipboard
fun listAvailableBiographyTargets(server: MinecraftServer, limit: Int = 200): List<String>

Lists known player names with reputation context, newest first.

Link copied to clipboard

Emits startup diagnostics for the async reputation refresh pipeline.

Link copied to clipboard

Resolves a stored or user-facing alignment value to a known reputation tone.

Link copied to clipboard

Queues a profile refresh after a scored reputation mutation on a background worker.

Link copied to clipboard
fun queueRefreshProfileFromSignal(server: MinecraftServer, playerId: UUID, playerName: String, triggerReason: String): Boolean

Queues a profile refresh from non-scoring evidence signals on a background worker.

Link copied to clipboard

Records a reputation memory event in persistent lore storage.

Link copied to clipboard
fun requestBiographyBook(requester: ServerPlayer, requestedPlayerName: String): Boolean

Delivers a player biography book for the requested player name to the requester.

Link copied to clipboard

Resolves a reputation tier to the corresponding reputation-book narrative tone.