/** * negotiation/domain — negotiator stance contracts (IND-611). * * The acting negotiator prompt is structurally biased toward producing matches * rather than finding valuable ones: it frames the job as advocacy, treats a * discovery-query match as a mandate to connect, and carries no * opportunity-cost term — the only decline bar is the purely negative "does not * serve {userName}'s needs", so absence of harm reads as grounds to accept. * * `NEGOTIATOR_STANCE` makes that stance configurable instead of hard-coded: * * | stance | framing | value bar | query rule | deadlock | * |-------------|--------------------------------------|------------------|-------------------------|-----------| * | `advocate` | argue the case (today) | none | mandate (today) | bargain | * | `evaluator` | assess first, advocate if it survives | opportunity-cost | necessary-not-sufficient| bargain | * | `skeptic` | + "most matches are not worth making" | opportunity-cost | necessary-not-sufficient| stalemate | * * Design constraints (hard): * - **`advocate` is byte-identical.** Every fragment below is additive and * gated; under `advocate` each renderer returns the exact legacy string, so * the rendered prompt is byte-for-byte the pre-IND-611 build. Existing prompt * specs are the guard. * - **Prompt-only.** The stance changes drafting stance and nothing else: * no seat vocabulary change (`allowedActionsFor`), no schema change, no graph * routing change. In particular the continuation-screen bypass at * `negotiation.graph.ts` (`!state.continuationExecution`) is identical under * all three stances — deliberately deferred so evals isolate wording as the * single variable. * - **Domain layer.** Placed here (not in `application/`) so both the * application-layer agent and the domain-layer deadlock renderer can read the * stance without a domain → application cycle. * - **Fail-safe default.** Unset or unrecognized falls back to `advocate` * (today's behavior), same operational pattern as `configuredScreenMode()`. * * Fragments deliberately never contain the literal `ask_user` or a quoted * `"withdraw"`: they render into every seat and protocol version, and the seat * specs pin that those tokens appear only where the seat legally holds them. */ export declare const NEGOTIATOR_STANCES: readonly ["advocate", "evaluator", "skeptic"]; export type NegotiatorStance = (typeof NEGOTIATOR_STANCES)[number]; export declare const DEFAULT_NEGOTIATOR_STANCE: NegotiatorStance; /** * Resolve the negotiator stance from `NEGOTIATOR_STANCE`. * * Defaults to `advocate` when unset or unrecognized — the stance shift is an * explicit opt-in flip (same operational pattern as `NEGOTIATION_SCREEN_MODE` / * `NEGOTIATION_PROTOCOL_VERSION`): the code ships dark, the environment turns * it on. */ export declare function configuredNegotiatorStance(): NegotiatorStance; /** Whether this stance applies the opportunity-cost value bar. */ export declare function stanceAppliesValueBar(stance: NegotiatorStance): boolean; /** * Whether this stance treats a discovery-query match as a precondition for * continuing to evaluate rather than as a mandate to connect. */ export declare function stanceQueryMatchIsNecessaryNotSufficient(stance: NegotiatorStance): boolean; /** Whether a detected deadlock resolves by stalemate rather than bargaining. */ export declare function stanceResolvesDeadlockByStalemate(stance: NegotiatorStance): boolean; /** * The job-framing sentence for a stance. Under `advocate` this is the exact * legacy sentence, so the rendered prompt is byte-identical. * * `{userName}` placeholders are left intact for the caller's existing global * replace. */ export declare function stanceJobFraming(stance: NegotiatorStance): string; /** * Extra action-rule lines contributed by the stance, appended after the seat's * own rules. Empty under `advocate` → byte-identical. */ export declare function stanceActionRules(stance: NegotiatorStance): string; /** * The discovery-query satisfaction rule. * * `advocate` keeps today's mandate wording verbatim ("PROPOSE or ACCEPT the * connection…"), which converts a filter into an instruction to connect. * `evaluator`/`skeptic` make query satisfaction necessary-but-not-sufficient: a * precondition for continuing to evaluate, never itself a reason to connect. * * Names are interpolated eagerly here: this fragment is spliced into the system * prompt *after* the caller's global `{userName}` substitution has already run, * so a placeholder would survive into the rendered prompt. */ export declare function stanceQuerySatisfiedRule(stance: NegotiatorStance, otherName: string, userName: string): string;