import type { NegotiationOpportunityLifecycle } from '../../shared/interfaces/database.interface.js'; import type { SeedAssessment, UserNegotiationContext } from '../domain/negotiation.state.js'; export interface AuthorizedNegotiationDetailTask { id: string; conversationId: string; state: string; createdAt: Date; updatedAt: Date; } export interface AuthorizedNegotiationDetailMetadata { sourceUserId?: string; candidateUserId?: string; initiatorUserId?: string; protocolVersion?: string; maxTurns?: number; opportunityId?: string; isContinuation?: boolean; priorTurnCount?: number; turnContext?: { sourceUser: UserNegotiationContext; candidateUser: UserNegotiationContext; indexContext: { networkId: string; prompt?: string; }; seedAssessment: SeedAssessment; discoveryQuery?: string; }; } export interface NegotiationDetailMessage { senderId: string; parts: unknown[]; createdAt: Date; } export interface NegotiationDetailArtifact { name: string | null; parts: unknown[]; } export interface AuthorizedNegotiationDetailReaderInput { task: AuthorizedNegotiationDetailTask; metadata: AuthorizedNegotiationDetailMetadata; callerUserId: string; callerRole: 'source' | 'candidate'; readMessages: (conversationId: string) => Promise; readArtifacts: (taskId: string) => Promise; readLifecycleEvidence: (opportunityIds: string[], ownerUserId: string) => Promise>; } /** * Projects an already-authorized negotiation task into the caller's detail * response. Admission and scope/privacy decisions stay in the tools facade; * this reader owns only parallel reads and deterministic response shaping. */ export declare function readAuthorizedNegotiationDetail(input: AuthorizedNegotiationDetailReaderInput): Promise<{ id: string; conversationId: string; conversationType: "agent_negotiation"; status: string; role: "source" | "candidate"; seat: import("../../index.js").NegotiationSeat; protocolVersion: import("../../index.js").NegotiationProtocolVersion; allowedActions: readonly ("propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user")[]; counterpartyId: string; turnCount: number; isUsersTurn: boolean; isContinuation: boolean; priorTurnCount: number; turnsAdded: number; turns: { turnNumber: number; speaker: string; senderId: string; action: string; actionActor: "agent"; reasoning: string | null; suggestedRoles: {} | null; message: string | null; createdAt: Date; }[]; outcome: unknown; lifecycle: import("../domain/negotiation.lifecycle-narration.js").NegotiationLifecycleNarration; context: { discoveryQuery?: string | undefined; ownUser: UserNegotiationContext; otherUser: UserNegotiationContext; indexContext: { networkId: string; prompt?: string; }; seedAssessment: SeedAssessment; isDiscoverer: boolean; } | null; createdAt: Date; updatedAt: Date; }>;