import type { Opportunity, OpportunityStatus } from '../../shared/interfaces/database.interface.js'; import type { DebugMetaAgent } from '../../capabilities/participant-agents.debug.facade.js'; /** * Radar card item: one opportunity with full presenter-driven display contract. */ export interface RadarCardItem { opportunityId: string; /** Lifecycle status of the underlying opportunity at render time (client bucketing, e.g. intent radar). */ status?: OpportunityStatus; userId: string; name: string; avatar: string | null; mainText: string; cta: string; headline?: string; /** Presenter-generated; primary button (accept) and secondary button (dismiss). */ primaryActionLabel: string; secondaryActionLabel: string; /** Presenter-generated subtitle under the other party name (e.g. "1 mutual intent"). */ mutualIntentsLabel: string; /** Narrator chip for human-introduced opportunities; avatar set when narrator is a user */ narratorChip?: { name: string; text: string; avatar?: string | null; userId?: string; }; /** Viewer's role in this opportunity (e.g. 'introducer', 'party', 'agent', 'patient', 'peer'). */ viewerRole?: string; /** Whether the counterpart is a ghost (not yet onboarded) user. */ isGhost?: boolean; /** Template-only explanation for a pool-answer demotion (never evaluator reasoning). */ deprioritizedReason?: string; /** Second party in introducer arrow layout. Present when viewerRole is 'introducer'. */ secondParty?: { name: string; avatar?: string | null; userId?: string; }; /** * True when this card was produced by a skeleton-presentation run: identity * fields (name/avatar/status) are real but mainText/cta are empty because the * presenter LLM was skipped. Clients render a shimmer body and re-fetch the * full view. Skeleton cards are never written to the presenter cache. */ presentationPending?: boolean; /** Internal marker: safe deterministic fallback rendered, but must not be cached. */ _presentationFallback?: boolean; /** Internal: original position in the loaded opportunity list, for stable ordering. */ _cardIndex: number; } /** Card item as returned in API responses (no internal fields). */ export type RadarResponseItem = Omit; /** * Radar Graph State (Annotation-based). * Flow: loadOpportunities → checkPresenterCache → [generateCardText if misses] * → cachePresenterResults → normalizeItems. */ export declare const RadarGraphState: import("@langchain/langgraph").AnnotationRoot<{ userId: import("@langchain/langgraph").BaseChannel, unknown>; networkId: import("@langchain/langgraph").BaseChannel | undefined, unknown>; scopeType: import("@langchain/langgraph").BaseChannel<"intent" | undefined, "intent" | import("@langchain/langgraph").OverwriteValue<"intent" | undefined> | undefined, unknown>; scopeId: import("@langchain/langgraph").BaseChannel | undefined, unknown>; limit: import("@langchain/langgraph").BaseChannel, unknown>; /** When true, bypass the presenter Redis cache. */ noCache: import("@langchain/langgraph").BaseChannel, unknown>; /** * Presentation depth. 'full' (default) runs the presenter LLM for cache * misses. 'skeleton' skips it: uncached cards come back with resolved * identity (name/avatar/status) and `presentationPending: true`, cached * cards come back complete. */ presentation: import("@langchain/langgraph").BaseChannel<"full" | "skeleton", "full" | "skeleton" | import("@langchain/langgraph").OverwriteValue<"full" | "skeleton">, unknown>; /** Optional status filter. When undefined, the graph uses `DEFAULT_RADAR_STATUSES`. */ statuses: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Raw opportunities visible to the viewer (after visibility filter). */ opportunities: import("@langchain/langgraph").BaseChannel, unknown>; /** Cards with presenter output and narrator chip. */ cards: import("@langchain/langgraph").BaseChannel, unknown>; /** Final items for response (internal fields stripped). */ items: import("@langchain/langgraph").BaseChannel, unknown>; /** Presenter results retrieved from cache (opportunityId → RadarCardItem). */ cachedCards: import("@langchain/langgraph").BaseChannel, Map | import("@langchain/langgraph").OverwriteValue>, unknown>; /** Opportunities that had no cache hit and need presenter generation. */ uncachedOpportunities: import("@langchain/langgraph").BaseChannel, unknown>; error: import("@langchain/langgraph").BaseChannel | undefined, unknown>; /** Meta for response (e.g. totalOpportunities). */ meta: import("@langchain/langgraph").BaseChannel<{ totalOpportunities: number; }, { totalOpportunities: number; } | import("@langchain/langgraph").OverwriteValue<{ totalOpportunities: number; }>, unknown>; /** Timing records for each agent invocation within this graph run. */ agentTimings: import("@langchain/langgraph").BaseChannel, unknown>; }>;