Skip to content

Commit 4181839

Browse files
committed
Fix Simurgh SITL PX4 readiness reports
1 parent 6b22bff commit 4181839

5 files changed

Lines changed: 608 additions & 22 deletions

File tree

CHANGELOG.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,10 @@ and this project uses simple two-part versioning: `X.Y` (Major.Minor).
4949
across cancelled drafts, replays the last action request for "read again" /
5050
"same sequence" follow-ups, and plans chained takeoff-wait-move-RTL requests
5151
instead of collapsing them to the final RTL command.
52-
- Simurgh now routes SITL-created-drone readiness follow-ups to live fleet
53-
heartbeat/telemetry evidence instead of SITL setup docs, with a concise
54-
telemetry verdict for operator readiness summaries.
52+
- Simurgh now routes SITL-created-drone readiness follow-ups to live
53+
Docker/SITL inventory plus PX4 heartbeat/telemetry evidence instead of SITL
54+
setup docs or capability menus, with a concise preflight-style verdict for
55+
operator readiness summaries.
5556

5657
---
5758

gcs-server/agent_runtime/mds_read_tools.py

Lines changed: 41 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ def classify_mds_read_intent(message: str, *, conversation_topic: str | None = N
334334
if _looks_like_non_mds_general_question(normalized):
335335
return None
336336

337+
if _looks_like_sidecar_status_question(normalized):
338+
return "sidecar_status"
337339
if _looks_like_mds_fleet_evidence_request(normalized):
338340
return "fleet_connectivity"
339341

@@ -352,6 +354,8 @@ def classify_mds_read_intent(message: str, *, conversation_topic: str | None = N
352354
if contextual_intent:
353355
return contextual_intent
354356

357+
if _looks_like_sitl_vehicle_readiness_question(normalized, conversation_topic=topic):
358+
return "fleet_connectivity"
355359
if _looks_like_action_capability_question(normalized):
356360
return "action_capability"
357361
if _looks_like_registry_domain_tool_question(normalized, topic=topic):
@@ -362,8 +366,6 @@ def classify_mds_read_intent(message: str, *, conversation_topic: str | None = N
362366
return "git_status_summary"
363367
if _looks_like_origin_status_question(normalized):
364368
return "origin_status"
365-
if _looks_like_sidecar_status_question(normalized):
366-
return "sidecar_status"
367369
if _looks_like_fleet_enrollment_question(normalized):
368370
return "fleet_enrollment_summary"
369371
if _looks_like_system_status_question(normalized):
@@ -377,7 +379,7 @@ def classify_mds_read_intent(message: str, *, conversation_topic: str | None = N
377379
("check", "see", "show", "what", "which", "any", "have", "list", "summary"),
378380
):
379381
return "backend_log_summary"
380-
if _looks_like_sitl_vehicle_readiness_question(normalized):
382+
if _looks_like_sitl_vehicle_readiness_question(normalized, conversation_topic=topic):
381383
return "fleet_connectivity"
382384
if _has_any(normalized, ("sitl", "simulation", "simulator")) and _has_any(
383385
normalized,
@@ -4689,7 +4691,11 @@ def _looks_like_live_fleet_state_question(normalized: str) -> bool:
46894691
)
46904692

46914693

4692-
def _looks_like_sitl_vehicle_readiness_question(normalized: str) -> bool:
4694+
def _looks_like_sitl_vehicle_readiness_question(
4695+
normalized: str,
4696+
*,
4697+
conversation_topic: str | None = None,
4698+
) -> bool:
46934699
"""Route SITL vehicle health questions to live telemetry, not setup docs.
46944700
46954701
Operators naturally say "the SITL we created" when they mean the simulated
@@ -4698,9 +4704,25 @@ def _looks_like_sitl_vehicle_readiness_question(normalized: str) -> bool:
46984704
setup/workflow questions.
46994705
"""
47004706

4701-
if not _has_domain_signal(normalized, ("sitl", "simulation", "simulator")):
4707+
topic = _normalize_conversation_topic(conversation_topic)
4708+
has_sitl_context = topic == "sitl" or _has_domain_signal(
4709+
normalized,
4710+
(
4711+
"sitl",
4712+
"simulation",
4713+
"simulator",
4714+
"container",
4715+
"containers",
4716+
"docker",
4717+
"px4",
4718+
"mavlink",
4719+
"telemetry",
4720+
"telemtery",
4721+
),
4722+
)
4723+
if not has_sitl_context:
47024724
return False
4703-
if not _has_domain_signal(
4725+
has_target_context = topic == "sitl" or _has_domain_signal(
47044726
normalized,
47054727
(
47064728
"drone",
@@ -4720,8 +4742,16 @@ def _looks_like_sitl_vehicle_readiness_question(normalized: str) -> bool:
47204742
"one",
47214743
"that",
47224744
"it",
4745+
"container",
4746+
"containers",
4747+
"docker",
4748+
"px4",
4749+
"mavlink",
4750+
"telemetry",
4751+
"telemtery",
47234752
),
4724-
):
4753+
)
4754+
if not has_target_context:
47254755
return False
47264756
if not _has_domain_signal(
47274757
normalized,
@@ -4739,6 +4769,10 @@ def _looks_like_sitl_vehicle_readiness_question(normalized: str) -> bool:
47394769
"status",
47404770
"summary",
47414771
"report",
4772+
"reprot",
4773+
"do it",
4774+
"why not",
4775+
"test",
47424776
"gps",
47434777
"battery",
47444778
"armed",

0 commit comments

Comments
 (0)