import type { PointerHit } from "../input/pointer.js"; import type { MapMarker, MarkerPosition, MarkerSet } from "../world/markers.js"; export type PingCategory = string; export interface PingCategoryDef { id: PingCategory; markerKind: string; label: string; callout: string; } /** Content-agnostic default ping wheel: enemy / loot / location / danger. */ export declare const DEFAULT_PING_CATEGORIES: Record; export declare const PING_FEED_ACTION = "party.ping"; export interface PingClassifyDeps { roleOf?(entityId: string): string | null | undefined; categoryOf?(objectId: string): PingCategory | null | undefined; } export interface PingClassifyOptions { hostileRoles?: readonly string[]; enemyCategory?: PingCategory; lootCategory?: PingCategory; locationCategory?: PingCategory; dangerCategory?: PingCategory; } /** * Classify what a pointer/aim ray hit into a ping category. Entity hits resolve * by catalog role (hostile → enemy, else location); object hits by an * optional catalog category tag; open ground is a location ping. */ export declare function classifyPing(hit: PointerHit, deps?: PingClassifyDeps, options?: PingClassifyOptions): PingCategory; export interface PingPayload { id: string; from: string; category: PingCategory; position: MarkerPosition; entityId: string | null; objectId: string | null; at: number; callout: string; /** Party members the broadcast targets; empty when solo or party unconfigured. */ recipients: readonly string[]; } export interface PingFeedSink { push(action: string, entry: unknown): void; } export interface PingParty { membersOf(userId: string): string[]; } export interface PingSystemDeps { markers: MarkerSet; feed: PingFeedSink; party?: PingParty; categories?: Record; now?(): number; /** Marker lifetime in ms; omit for permanent markers. */ ttlMs?: number; feedAction?: string; classify?: PingClassifyDeps; classifyOptions?: PingClassifyOptions; } export interface PingSystem { classify(hit: PointerHit): PingCategory; buildPayload(from: string, hit: PointerHit, category?: PingCategory): PingPayload; broadcast(payload: PingPayload): MapMarker; /** Classify → build → broadcast in one call; the ping verb. */ ping(from: string, hit: PointerHit, category?: PingCategory): PingPayload; } /** * Contextual ping/marker communication between teammates, classified by what was pinged. * * @capability ping-wheel contextual ping/marker communication between teammates */ export declare function createPingSystem(deps: PingSystemDeps): PingSystem;