//! WASM1 Phase 3b-queries — wire shapes for wasm-side sub-trait
//! `GameContext` queries (predicates / vision / spatial).
//!
//! Only the structured query — predicate evaluation — needs a
//! dedicated args struct on the wire. The vision and spatial queries
//! take only `EntityId` / `SeatId` / `Position` / `MetricKind` /
//! `AreaShape` arguments, all of which are already serde-derivable on
//! their own (the host imports postcard them directly).
//!
//! Co-located here (not in `wasm_compose.rs`) because predicate
//! evaluation is a *query*, not a compose dispatch. Sub-commit
//! sequence matches: each query category gets its own wire module
//! when one is needed.

use crate::predicate::Predicate;
use crate::types::EntityId;

/// Wire arguments for `PredicateQuery::evaluate` across the WASM
/// boundary. The plugin shim postcard-encodes this struct and passes
/// `(ptr, len)` to `__maat_ctx_predicate_eval`; the host decodes,
/// calls the engine's `PredicateQuery::evaluate`, and returns the
/// `bool` result packed into the i32 return value.
#[derive(Debug, Clone)]
#[derive(serde::Serialize, serde::Deserialize)]
pub struct PredicateEvalArgs {
    pub predicate: Predicate,
    pub self_id: EntityId,
    pub target: Option<EntityId>,
}
