/** * Pure mappers from raw per-candidate negotiation data to the protocol's * `DiscoveryNegotiation` / `DiscoverySummary` shapes consumed by the question * generator. No DB access, no LLM — safe to import from anywhere. */ import type { NegotiationTurn, NegotiationOutcome } from "../../capabilities/negotiation.state.facade.js"; import type { DiscoveryNegotiation, DiscoverySummary } from "../../shared/schemas/discovery-question.schema.js"; /** * The input shape collected by the opportunity graph's negotiate node for * each candidate that completed a negotiation attempt (accepted, rejected, * stalled, or errored). */ export interface NegotiationResolution { candidateUserId: string; /** Abstract profile slice for the LLM (e.g. "AI infra founder, Berlin"). */ counterpartyHint: string; /** Network/community prompt for the negotiation. */ indexContext: string; turns: NegotiationTurn[]; outcome: NegotiationOutcome; /** Optional pre-negotiation evaluator score (0..1). */ seedAssessmentScore?: number; } /** * Convert one negotiation resolution to `DiscoveryNegotiation`. * * @param r - The raw resolution from the negotiate node. * @returns A `DiscoveryNegotiation` ready for the question generator. */ export declare function toDiscoveryNegotiation(r: NegotiationResolution): DiscoveryNegotiation; /** * Aggregate counters across all negotiations in a single discovery turn. * * @param resolutions - All resolved negotiations from the negotiate node. * @returns A `DiscoverySummary` with totals and role distribution. */ export declare function buildDiscoverySummary(resolutions: NegotiationResolution[]): DiscoverySummary;