@indexnetwork/protocol 4.5.0-rc.339.1 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/chat/chat-streaming.types.d.ts +1 -1
  2. package/dist/chat/chat-streaming.types.d.ts.map +1 -1
  3. package/dist/chat/chat-streaming.types.js.map +1 -1
  4. package/dist/chat/chat.agent.d.ts +1 -1
  5. package/dist/chat/chat.agent.d.ts.map +1 -1
  6. package/dist/chat/chat.agent.js.map +1 -1
  7. package/dist/negotiation/negotiation.graph.d.ts +26 -26
  8. package/dist/negotiation/negotiation.graph.d.ts.map +1 -1
  9. package/dist/negotiation/negotiation.graph.js +42 -21
  10. package/dist/negotiation/negotiation.graph.js.map +1 -1
  11. package/dist/negotiation/negotiation.screen.d.ts +5 -3
  12. package/dist/negotiation/negotiation.screen.d.ts.map +1 -1
  13. package/dist/negotiation/negotiation.screen.js +5 -3
  14. package/dist/negotiation/negotiation.screen.js.map +1 -1
  15. package/dist/negotiation/negotiation.state.d.ts +6 -6
  16. package/dist/negotiation/negotiation.state.js +1 -1
  17. package/dist/negotiation/negotiation.state.js.map +1 -1
  18. package/dist/negotiation/negotiation.summarizer.js +1 -1
  19. package/dist/negotiation/negotiation.summarizer.js.map +1 -1
  20. package/dist/opportunity/negotiation-context.loader.d.ts +5 -0
  21. package/dist/opportunity/negotiation-context.loader.d.ts.map +1 -1
  22. package/dist/opportunity/negotiation-context.loader.js +9 -0
  23. package/dist/opportunity/negotiation-context.loader.js.map +1 -1
  24. package/dist/opportunity/question.prompt.d.ts +1 -1
  25. package/dist/opportunity/question.prompt.d.ts.map +1 -1
  26. package/dist/opportunity/question.prompt.js +2 -0
  27. package/dist/opportunity/question.prompt.js.map +1 -1
  28. package/dist/shared/schemas/discovery-question.schema.d.ts +8 -8
  29. package/dist/shared/schemas/discovery-question.schema.js +1 -1
  30. package/dist/shared/schemas/discovery-question.schema.js.map +1 -1
  31. package/dist/shared/schemas/negotiation-digest.schema.d.ts +3 -3
  32. package/dist/shared/schemas/negotiation-digest.schema.js +1 -1
  33. package/dist/shared/schemas/negotiation-digest.schema.js.map +1 -1
  34. package/dist/shared/schemas/negotiation-state.schema.d.ts +3 -3
  35. package/dist/shared/schemas/negotiation-state.schema.js +1 -1
  36. package/dist/shared/schemas/negotiation-state.schema.js.map +1 -1
  37. package/package.json +1 -1
@@ -68,7 +68,7 @@ export declare class NegotiationGraphFactory {
68
68
  role: "agent" | "patient" | "peer";
69
69
  }[];
70
70
  hasOpportunity: boolean;
71
- reason?: "timeout" | "turn_cap" | undefined;
71
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
72
72
  } | null;
73
73
  error: string | null;
74
74
  }, {
@@ -136,7 +136,7 @@ export declare class NegotiationGraphFactory {
136
136
  role: "agent" | "patient" | "peer";
137
137
  }[];
138
138
  hasOpportunity: boolean;
139
- reason?: "timeout" | "turn_cap" | undefined;
139
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
140
140
  } | import("@langchain/langgraph").OverwriteValue<{
141
141
  reasoning: string;
142
142
  turnCount: number;
@@ -145,7 +145,7 @@ export declare class NegotiationGraphFactory {
145
145
  role: "agent" | "patient" | "peer";
146
146
  }[];
147
147
  hasOpportunity: boolean;
148
- reason?: "timeout" | "turn_cap" | undefined;
148
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
149
149
  } | null> | null | undefined;
150
150
  error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
151
151
  }, "__start__" | "screen" | "turn" | "init" | "finalize", {
@@ -230,7 +230,7 @@ export declare class NegotiationGraphFactory {
230
230
  role: "agent" | "patient" | "peer";
231
231
  }[];
232
232
  hasOpportunity: boolean;
233
- reason?: "timeout" | "turn_cap" | undefined;
233
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
234
234
  } | null, {
235
235
  reasoning: string;
236
236
  turnCount: number;
@@ -239,7 +239,7 @@ export declare class NegotiationGraphFactory {
239
239
  role: "agent" | "patient" | "peer";
240
240
  }[];
241
241
  hasOpportunity: boolean;
242
- reason?: "timeout" | "turn_cap" | undefined;
242
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
243
243
  } | import("@langchain/langgraph").OverwriteValue<{
244
244
  reasoning: string;
245
245
  turnCount: number;
@@ -248,7 +248,7 @@ export declare class NegotiationGraphFactory {
248
248
  role: "agent" | "patient" | "peer";
249
249
  }[];
250
250
  hasOpportunity: boolean;
251
- reason?: "timeout" | "turn_cap" | undefined;
251
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
252
252
  } | null> | null, unknown>;
253
253
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
254
254
  }, {
@@ -333,7 +333,7 @@ export declare class NegotiationGraphFactory {
333
333
  role: "agent" | "patient" | "peer";
334
334
  }[];
335
335
  hasOpportunity: boolean;
336
- reason?: "timeout" | "turn_cap" | undefined;
336
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
337
337
  } | null, {
338
338
  reasoning: string;
339
339
  turnCount: number;
@@ -342,7 +342,7 @@ export declare class NegotiationGraphFactory {
342
342
  role: "agent" | "patient" | "peer";
343
343
  }[];
344
344
  hasOpportunity: boolean;
345
- reason?: "timeout" | "turn_cap" | undefined;
345
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
346
346
  } | import("@langchain/langgraph").OverwriteValue<{
347
347
  reasoning: string;
348
348
  turnCount: number;
@@ -351,7 +351,7 @@ export declare class NegotiationGraphFactory {
351
351
  role: "agent" | "patient" | "peer";
352
352
  }[];
353
353
  hasOpportunity: boolean;
354
- reason?: "timeout" | "turn_cap" | undefined;
354
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
355
355
  } | null> | null, unknown>;
356
356
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
357
357
  }, import("@langchain/langgraph").StateDefinition, {
@@ -465,7 +465,7 @@ export declare class NegotiationGraphFactory {
465
465
  role: "agent" | "patient" | "peer";
466
466
  }[];
467
467
  hasOpportunity: boolean;
468
- reason?: "timeout" | "turn_cap" | undefined;
468
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
469
469
  } | null, {
470
470
  reasoning: string;
471
471
  turnCount: number;
@@ -474,7 +474,7 @@ export declare class NegotiationGraphFactory {
474
474
  role: "agent" | "patient" | "peer";
475
475
  }[];
476
476
  hasOpportunity: boolean;
477
- reason?: "timeout" | "turn_cap" | undefined;
477
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
478
478
  } | import("@langchain/langgraph").OverwriteValue<{
479
479
  reasoning: string;
480
480
  turnCount: number;
@@ -483,7 +483,7 @@ export declare class NegotiationGraphFactory {
483
483
  role: "agent" | "patient" | "peer";
484
484
  }[];
485
485
  hasOpportunity: boolean;
486
- reason?: "timeout" | "turn_cap" | undefined;
486
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
487
487
  } | null> | null, unknown>;
488
488
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
489
489
  }>;
@@ -499,7 +499,7 @@ export declare class NegotiationGraphFactory {
499
499
  role: "agent" | "patient" | "peer";
500
500
  }[];
501
501
  hasOpportunity: boolean;
502
- reason?: "timeout" | "turn_cap" | undefined;
502
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
503
503
  };
504
504
  status: "completed";
505
505
  };
@@ -621,7 +621,7 @@ export declare function createDefaultNegotiationGraph(deps: {
621
621
  role: "agent" | "patient" | "peer";
622
622
  }[];
623
623
  hasOpportunity: boolean;
624
- reason?: "timeout" | "turn_cap" | undefined;
624
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
625
625
  } | null;
626
626
  error: string | null;
627
627
  }, {
@@ -689,7 +689,7 @@ export declare function createDefaultNegotiationGraph(deps: {
689
689
  role: "agent" | "patient" | "peer";
690
690
  }[];
691
691
  hasOpportunity: boolean;
692
- reason?: "timeout" | "turn_cap" | undefined;
692
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
693
693
  } | import("@langchain/langgraph").OverwriteValue<{
694
694
  reasoning: string;
695
695
  turnCount: number;
@@ -698,7 +698,7 @@ export declare function createDefaultNegotiationGraph(deps: {
698
698
  role: "agent" | "patient" | "peer";
699
699
  }[];
700
700
  hasOpportunity: boolean;
701
- reason?: "timeout" | "turn_cap" | undefined;
701
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
702
702
  } | null> | null | undefined;
703
703
  error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
704
704
  }, "__start__" | "screen" | "turn" | "init" | "finalize", {
@@ -783,7 +783,7 @@ export declare function createDefaultNegotiationGraph(deps: {
783
783
  role: "agent" | "patient" | "peer";
784
784
  }[];
785
785
  hasOpportunity: boolean;
786
- reason?: "timeout" | "turn_cap" | undefined;
786
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
787
787
  } | null, {
788
788
  reasoning: string;
789
789
  turnCount: number;
@@ -792,7 +792,7 @@ export declare function createDefaultNegotiationGraph(deps: {
792
792
  role: "agent" | "patient" | "peer";
793
793
  }[];
794
794
  hasOpportunity: boolean;
795
- reason?: "timeout" | "turn_cap" | undefined;
795
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
796
796
  } | import("@langchain/langgraph").OverwriteValue<{
797
797
  reasoning: string;
798
798
  turnCount: number;
@@ -801,7 +801,7 @@ export declare function createDefaultNegotiationGraph(deps: {
801
801
  role: "agent" | "patient" | "peer";
802
802
  }[];
803
803
  hasOpportunity: boolean;
804
- reason?: "timeout" | "turn_cap" | undefined;
804
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
805
805
  } | null> | null, unknown>;
806
806
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
807
807
  }, {
@@ -886,7 +886,7 @@ export declare function createDefaultNegotiationGraph(deps: {
886
886
  role: "agent" | "patient" | "peer";
887
887
  }[];
888
888
  hasOpportunity: boolean;
889
- reason?: "timeout" | "turn_cap" | undefined;
889
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
890
890
  } | null, {
891
891
  reasoning: string;
892
892
  turnCount: number;
@@ -895,7 +895,7 @@ export declare function createDefaultNegotiationGraph(deps: {
895
895
  role: "agent" | "patient" | "peer";
896
896
  }[];
897
897
  hasOpportunity: boolean;
898
- reason?: "timeout" | "turn_cap" | undefined;
898
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
899
899
  } | import("@langchain/langgraph").OverwriteValue<{
900
900
  reasoning: string;
901
901
  turnCount: number;
@@ -904,7 +904,7 @@ export declare function createDefaultNegotiationGraph(deps: {
904
904
  role: "agent" | "patient" | "peer";
905
905
  }[];
906
906
  hasOpportunity: boolean;
907
- reason?: "timeout" | "turn_cap" | undefined;
907
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
908
908
  } | null> | null, unknown>;
909
909
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
910
910
  }, import("@langchain/langgraph").StateDefinition, {
@@ -1018,7 +1018,7 @@ export declare function createDefaultNegotiationGraph(deps: {
1018
1018
  role: "agent" | "patient" | "peer";
1019
1019
  }[];
1020
1020
  hasOpportunity: boolean;
1021
- reason?: "timeout" | "turn_cap" | undefined;
1021
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
1022
1022
  } | null, {
1023
1023
  reasoning: string;
1024
1024
  turnCount: number;
@@ -1027,7 +1027,7 @@ export declare function createDefaultNegotiationGraph(deps: {
1027
1027
  role: "agent" | "patient" | "peer";
1028
1028
  }[];
1029
1029
  hasOpportunity: boolean;
1030
- reason?: "timeout" | "turn_cap" | undefined;
1030
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
1031
1031
  } | import("@langchain/langgraph").OverwriteValue<{
1032
1032
  reasoning: string;
1033
1033
  turnCount: number;
@@ -1036,7 +1036,7 @@ export declare function createDefaultNegotiationGraph(deps: {
1036
1036
  role: "agent" | "patient" | "peer";
1037
1037
  }[];
1038
1038
  hasOpportunity: boolean;
1039
- reason?: "timeout" | "turn_cap" | undefined;
1039
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
1040
1040
  } | null> | null, unknown>;
1041
1041
  error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
1042
1042
  }>;
@@ -1052,7 +1052,7 @@ export declare function createDefaultNegotiationGraph(deps: {
1052
1052
  role: "agent" | "patient" | "peer";
1053
1053
  }[];
1054
1054
  hasOpportunity: boolean;
1055
- reason?: "timeout" | "turn_cap" | undefined;
1055
+ reason?: "timeout" | "turn_cap" | "screened_out" | undefined;
1056
1056
  };
1057
1057
  status: "completed";
1058
1058
  };
@@ -1 +1 @@
1
- {"version":3,"file":"negotiation.graph.d.ts","sourceRoot":"/","sources":["negotiation/negotiation.graph.ts"],"names":[],"mappings":"AAGA,OAAO,EAAkB,KAAK,YAAY,EAAE,MAAM,4CAA4C,CAAC;AAC/F,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,4CAA4C,CAAC;AAC3F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,sDAAsD,CAAC;AACpG,OAAO,KAAK,EAAE,eAAe,EAA0B,MAAM,oDAAoD,CAAC;AAClH,OAAO,EAAyB,KAAK,eAAe,EAAE,KAAK,kBAAkB,EAAE,KAAK,sBAAsB,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,wBAAwB,CAAC;AAG3L,OAAO,EAAkE,KAAK,oBAAoB,EAAE,MAAM,yBAAyB,CAAC;AACpI,OAAO,KAAK,EAAmB,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAEjH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mCAAmC,CAAC;AA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,EAAE,MAAM,CAAC;IACnB,mBAAmB,CAAC,EAAE,qBAAqB,CAAC;IAC5C,OAAO,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACrC;;;;OAIG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B,GACA,OAAO,CAAC,iBAAiB,EAAE,CAAC,CAsJ9B;AAED;;GAEG;AACH,wBAAgB,6BAA6B,CAAC,IAAI,EAAE;IAClD,QAAQ,EAAE,wBAAwB,CAAC;IACnC,UAAU,EAAE,eAAe,CAAC;IAC5B,YAAY,CAAC,EAAE,uBAAuB,CAAC;CACxC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;yBAGA"}
@@ -251,20 +251,16 @@ export class NegotiationGraphFactory {
251
251
  * when NEGOTIATION_SCREEN_MODE=off). The reaching client's negotiator
252
252
  * decides whether the match is worth its client's name; in shadow mode the
253
253
  * decision is recorded (task metadata + trace event + log line) but never
254
- * blocks — the negotiation always proceeds to the first turn. `enforce`
255
- * runs identically until P2.2 lands enforcement (by the time this node
256
- * runs, init has already created the task and flipped the opportunity to
257
- * `negotiating` P2.2 owns making a blocking `pass` quiet/correct).
254
+ * blocks — the negotiation always proceeds to the first turn. In enforce
255
+ * mode (P2.2) a `pass` routes straight to finalize: zero turns, zero
256
+ * counterparty involvement, outcome `reason: "screened_out"`, opportunity
257
+ * quietly `rejected` (init had already flipped it to `negotiating`).
258
+ * A failed screen still fails OPEN in every mode.
258
259
  */
259
260
  const screenNode = async (state) => {
260
261
  const traceEmitter = requestContext.getStore()?.traceEmitter;
261
262
  const emitWide = (event) => traceEmitter?.(event);
262
263
  const mode = configuredScreenMode();
263
- if (mode === "enforce") {
264
- screenNodeLog.warn("NEGOTIATION_SCREEN_MODE=enforce requested but enforcement lands in P2.2; running shadow", {
265
- taskId: state.taskId,
266
- });
267
- }
268
264
  const start = Date.now();
269
265
  // The client is the initiator seat's user — the side whose negotiator is
270
266
  // reaching out. Fresh runs stamp initiatorUserId in init; fall back to
@@ -343,9 +339,19 @@ export class NegotiationGraphFactory {
343
339
  durationMs,
344
340
  });
345
341
  }
346
- // Shadow (and pre-P2.2 enforce): always proceed to the first turn.
342
+ // Routing happens on the conditional edge: shadow always proceeds to
343
+ // the first turn; enforce routes a (non-failed-open) pass to finalize.
347
344
  return { screenDecision: record, memoryBySide: { [clientSide]: clientMemory } };
348
345
  };
346
+ /**
347
+ * P2.2 — true when the screen gate blocked this negotiation: enforce mode,
348
+ * a genuine `pass` (never failed-open), before any turn was exchanged.
349
+ * Shadow-mode passes and fail-open records never block.
350
+ */
351
+ const isScreenBlocked = (state) => state.screenDecision?.mode === "enforce"
352
+ && state.screenDecision.decision === "pass"
353
+ && state.screenDecision.failedOpen !== true
354
+ && state.turnCount === 0;
349
355
  const turnNode = async (state) => {
350
356
  const traceEmitter = requestContext.getStore()?.traceEmitter;
351
357
  // Local helper to emit events whose shape is wider than the declared
@@ -670,7 +676,10 @@ export class NegotiationGraphFactory {
670
676
  const history = turnsFromMessages(state.messages);
671
677
  const lastTurn = state.lastTurn;
672
678
  const hasOpportunity = lastTurn?.action === "accept";
673
- const atCap = (state.maxTurns ?? 0) > 0 && state.turnCount >= state.maxTurns && !isTerminalAction(lastTurn?.action);
679
+ // P2.2: the client's own outreach gate declined before any turn the
680
+ // negotiation never happened from the counterparty's perspective.
681
+ const screenedOut = isScreenBlocked(state);
682
+ const atCap = !screenedOut && (state.maxTurns ?? 0) > 0 && state.turnCount >= state.maxTurns && !isTerminalAction(lastTurn?.action);
674
683
  let agreedRoles = [];
675
684
  if (hasOpportunity && history.length >= 2) {
676
685
  const acceptTurn = history[history.length - 1];
@@ -687,9 +696,15 @@ export class NegotiationGraphFactory {
687
696
  const outcome = {
688
697
  hasOpportunity,
689
698
  agreedRoles,
690
- reasoning: lastTurn?.assessment.reasoning ?? "",
699
+ reasoning: screenedOut
700
+ ? (state.screenDecision?.reasoning ?? "")
701
+ : (lastTurn?.assessment.reasoning ?? ""),
691
702
  turnCount: state.turnCount,
692
- ...(atCap && { reason: "turn_cap" }),
703
+ ...(screenedOut
704
+ ? { reason: "screened_out" }
705
+ : atCap
706
+ ? { reason: "turn_cap" }
707
+ : {}),
693
708
  };
694
709
  try {
695
710
  await database.updateTaskState(state.taskId, "completed");
@@ -705,13 +720,16 @@ export class NegotiationGraphFactory {
705
720
  isContinuation: state.isContinuation,
706
721
  turnsAdded: state.turnCount,
707
722
  priorTurnCount: state.priorTurnCount,
708
- outcome: hasOpportunity ? 'accepted' : (atCap ? 'turn_cap' : (lastTurn?.action ?? 'unknown')),
723
+ outcome: hasOpportunity ? 'accepted' : screenedOut ? 'screened_out' : (atCap ? 'turn_cap' : (lastTurn?.action ?? 'unknown')),
709
724
  opportunityId: state.opportunityId || undefined,
710
725
  });
711
726
  if (state.opportunityId) {
727
+ // screened_out → 'rejected': quiet terminal status (hidden from
728
+ // default lists), never 'stalled' — with zero turns the generic
729
+ // mapping would misfile the client's own gate decision.
712
730
  const nextStatus = lastTurn?.action === 'accept'
713
731
  ? 'pending'
714
- : isRejectLikeAction(lastTurn?.action)
732
+ : (screenedOut || isRejectLikeAction(lastTurn?.action))
715
733
  ? 'rejected'
716
734
  : 'stalled';
717
735
  await database.updateOpportunityStatus(state.opportunityId, nextStatus).catch((err) => {
@@ -725,11 +743,13 @@ export class NegotiationGraphFactory {
725
743
  if (state.opportunityId) {
726
744
  const emittedOutcome = hasOpportunity
727
745
  ? "accepted"
728
- : atCap
729
- ? "turn_cap"
730
- : state.error && /timeout/i.test(state.error)
731
- ? "timed_out"
732
- : "rejected_stalled";
746
+ : screenedOut
747
+ ? "screened_out"
748
+ : atCap
749
+ ? "turn_cap"
750
+ : state.error && /timeout/i.test(state.error)
751
+ ? "timed_out"
752
+ : "rejected_stalled";
733
753
  emitWide({
734
754
  type: "negotiation_outcome",
735
755
  opportunityId: state.opportunityId,
@@ -820,7 +840,8 @@ export class NegotiationGraphFactory {
820
840
  return "screen";
821
841
  return "turn";
822
842
  }, { screen: "screen", turn: "turn", finalize: "finalize" })
823
- .addEdge("screen", "turn")
843
+ // P2.2: enforce-mode pass → finalize (screened_out); everything else → turn.
844
+ .addConditionalEdges("screen", (state) => isScreenBlocked(state) ? "finalize" : "turn", { turn: "turn", finalize: "finalize" })
824
845
  .addEdge("__start__", "init")
825
846
  .addEdge("finalize", "__end__");
826
847
  return workflow.compile();