Visible enemy positions in PvZ conversations
The existing visible row counts and global type totals could not distinguish a single Conehead near the house from a distant crowd. The new optional visibleThreats observation supplies the nearest visible hostile body per row, with native type and coarse planting column. The host advertises visible-threats-v1; older clients continue without positions and newer clients omit them when the host does not advertise support.
The strict request schema requires occupied rows, unique nearest rows and type counts to agree. Columns range from -1 (left of the planting grid) through 9 (right of it). Prompt context uses named types and one-based columns; the two edges are explicit positions rather than clamped cells. This context reaches source Dave, classic Dave, source plants and classic plants through their existing requests. Unknown positions remain null. Fog-hidden enemies remain unknown; an omitted row is not a statement that it is clear. The context does not infer travel direction, an upcoming attack or success of a proposed defense.
There is no new endpoint, generation trigger, gameplay effect, schema migration, save field, UI or change to reading pauses. The existing account configuration, persona, model selection, billing and native effect validation remain in use. The native companion uses its existing rendered-visibility filter and observes all counts/nearest positions together. Historical source receipts omit the field.
Verification:
- Six focused tests cover all four prompt surfaces, older clients, both lawn edges, Garden exclusion and invalid/inconsistent observations.
- The isolated server launcher passes all 461 NPC/route checks. Earlier direct runner attempts failed first on missing local test environment and then an account-context process that lacked the standard cleanup preload; no production configuration was changed to run tests.
- Native and browser evidence is maintained in the game worktree's
docs/visible-threats-2026-09-22.md.
This establishes information delivery and compatibility, not that every model will give sound tactical advice. It does not certify campaign balance or scale.
