Feat/implement alerts endpoint#72
Feat/implement alerts endpoint#72IlyaChichkov wants to merge 2 commits intorefactor/ddd-architecture-and-toolingfrom
Conversation
|
@jkbennitt could you check out this feature, this should partly close the: AppSprout-dev/RLE#12 |
- Added new REST endpoint and DTO models to extract active game alerts and notifications. - Wired alerts data retrieval through the Client/UI domain service.
- Created Bruno .yml test configurations to validate and interact with the newly created in-game alerts endpoint.
efbea5a to
d257af8
Compare
jkbennitt
left a comment
There was a problem hiding this comment.
Looks great — this is exactly what we requested in AppSprout-dev/RLE#12. The alerts endpoint gives our agents direct access to RimWorld's pre-prioritized problem list instead of having to infer colony issues from raw data.
We've been running live tests where agents score 0.4 on mood because they don't prioritize beds/cooking fast enough — feeding them the alert list ("Major break risk", "Need colonist beds", "Starvation") will help them react to the most urgent problems first.
A few questions on the response shape so we can wire it into our client:
- What does the severity field look like? Is it an enum (critical/major/minor) or a numeric priority?
- Does the response include colonist IDs for alerts that target specific pawns (e.g. "Mental break: Bob")?
- Is the endpoint available while the game is paused, or does it need the game to be unpaused like other endpoints?
This partly closes AppSprout-dev/RLE#12 — the remaining piece is GET /api/v1/learning-helper (lower priority, can be a separate PR).
@CalebisGross FYI — once this merges we can wire it into the agent pipeline.
|
Here is example response data: {
"success": true,
"data": [
{
"label": "Colonist needs rescue",
"explanation": "These colonists are incapacitated on the ground:\n - Strick\r\n\nSend another colonist to rescue them and carry them back to bed.\n\n(To rescue, select another colonist, then right click on the victim and select Rescue.)",
"priority": "Critical",
"targets": [
289
],
"cells": []
},
{
"label": "Starvation",
"explanation": "These colonists are starving:\n - Strick\r\n - Jennifer\n\nGet them some food.",
"priority": "High",
"targets": [
289,
292
],
"cells": []
},
{
"label": "Medical emergency",
"explanation": "People are at risk of death because of severe illness:\n - Strick\n\nMake sure that they get the best medical care possible.",
"priority": "Critical",
"targets": [
289
],
"cells": []
},
{
"label": "Need meal source",
"explanation": "You have no way of preparing proper meals from raw food.\n\nBuild a stove, campfire, or nutrient dispenser.\n\n(It cannot be in a prison cell, otherwise colonists cannot use it.)",
"priority": "Medium",
"targets": [],
"cells": []
},
{
"label": "Need defenses",
"explanation": "You've been here some time and have probably been seen. Pirate raids will start soon.\n\nYou should prepare defenses, like sandbags or traps.",
"priority": "High",
"targets": [],
"cells": []
},
{
"label": "Low food",
"explanation": "You are dangerously low on food.\n\n Full bars worth of food in storage: 0\n Colonists and prisoners getting food: 10\n Days worth of food in storage: 0\n\nGrow, buy, find, or kill some food.",
"priority": "High",
"targets": [],
"cells": []
},
{
"label": "Low medicine",
"explanation": "You have no medicine left in storage.\n\nBuy more medicine from traders.",
"priority": "High",
"targets": [],
"cells": []
},
{
"label": "Need colonist beds",
"explanation": "You have more colonists than you have colonist beds. Someone will lack a place to sleep.\n\nEither make more beds, or change a prisoner bed to a colonist bed.\n\nIf you have no resources, sleeping spots are free and can be placed instantly.",
"priority": "High",
"targets": [],
"cells": []
},
{
"label": "Colonist left unburied",
"explanation": "A colonist is left unburied.\n\nThis may negatively affect your colonists' mood.",
"priority": "High",
"targets": [
49001
],
"cells": []
},
{
"label": "Need recreation variety",
"explanation": "There are only 2 different recreation types available in Colony, but at the current expectations level (very low), colonists need 3 different kinds of recreation to remain satisfied. Provide recreation variety supplying a new, different kind of recreation.\n\nAvailable recreation types:\n - Solitary relaxation\r\n - Social interaction\n\nMissing recreation types:\n - Dexterity play\n - Cerebral play\n - Television watching\n - Telescope study\n - Music\n - Chemical consumption\n - Food consumption\n - Reading\n\nNote: You can check the recreation type of any item in its stats page, accessible with the 'i' button.",
"priority": "Medium",
"targets": [],
"cells": []
}
],
"errors": [],
"warnings": [],
"timestamp": "2026-04-04T18:45:36.0433309Z"
} |
|
This is perfect. The response shape has exactly what we need:
We'll wire this into the RLE agent pipeline once it merges. @CalebisGross will handle the integration on our side. Thanks Ilya! |
|
I also started working on LearningReadout, but it will take some time and you are right its probably better to make in different PR. I'll try to merge those recent PRs into develop soon in the first place |
Feat: Implement In-Game Alerts Retrieval
Description
This PR introduces a new endpoint to the API that allows clients to retrieve a list of all currently active in-game alerts and notifications (e.g., "Colonist needs rescue", "Major break risk", "Raid").
This feature fully utilizes the new Domain-Driven Design architecture established in the previous refactor.
Key Changes
.yml) test configurations to easily validate and interact with the new endpoint.Testing Instructions
Alertsrequest from the collection.