@indexnetwork/protocol 14.3.2-rc.477.1 → 16.1.1-rc.478.1
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.
- package/CHANGELOG.md +107 -0
- package/IMPLEMENTATION.md +50 -52
- package/STABILITY.md +3 -3
- package/dist/chat/chat.agent.js +2 -2
- package/dist/chat/chat.graph.d.ts +41 -1
- package/dist/chat/chat.graph.js +108 -127
- package/dist/discovery/hyde.frame.d.ts +4 -4
- package/dist/discovery/hyde.graph.d.ts +71 -12
- package/dist/discovery/hyde.graph.js +337 -335
- package/dist/discovery/lens.inferrer.d.ts +6 -6
- package/dist/enrichment/enrichment.graph.d.ts +127 -9
- package/dist/enrichment/enrichment.graph.js +633 -655
- package/dist/enrichment/enrichment.state.d.ts +1 -1
- package/dist/enrichment/enrichment.tools.context-read.d.ts +10 -0
- package/dist/enrichment/enrichment.tools.context-read.js +353 -0
- package/dist/enrichment/enrichment.tools.context-write.d.ts +9 -0
- package/dist/enrichment/enrichment.tools.context-write.js +417 -0
- package/dist/enrichment/enrichment.tools.d.ts +11 -1
- package/dist/enrichment/enrichment.tools.helpers.d.ts +139 -0
- package/dist/enrichment/enrichment.tools.helpers.js +234 -0
- package/dist/enrichment/enrichment.tools.js +16 -975
- package/dist/index.d.ts +27 -48
- package/dist/index.js +17 -27
- package/dist/intents/application/intent.graph.d.ts +71 -67
- package/dist/intents/application/intent.graph.execute.d.ts +59 -0
- package/dist/intents/application/intent.graph.execute.js +301 -0
- package/dist/intents/application/intent.graph.infer.d.ts +44 -0
- package/dist/intents/application/intent.graph.infer.js +97 -0
- package/dist/intents/application/intent.graph.js +96 -888
- package/dist/intents/application/intent.graph.reconcile.d.ts +71 -0
- package/dist/intents/application/intent.graph.reconcile.js +274 -0
- package/dist/intents/application/intent.graph.shared.d.ts +70 -0
- package/dist/intents/application/intent.graph.shared.js +153 -0
- package/dist/intents/domain/intent.state.d.ts +1 -1
- package/dist/maintenance/maintenance.graph.d.ts +66 -3
- package/dist/maintenance/maintenance.graph.js +155 -156
- package/dist/mcp/mcp.authorization-policy.d.ts +24 -28
- package/dist/mcp/mcp.authorization-policy.js +14 -34
- package/dist/mcp/mcp.server.d.ts +3 -3
- package/dist/mcp/mcp.server.js +12 -16
- package/dist/negotiations/application/negotiation.candidates.d.ts +83 -0
- package/dist/negotiations/application/negotiation.candidates.js +162 -0
- package/dist/negotiations/application/negotiation.graph.d.ts +91 -157
- package/dist/negotiations/application/negotiation.graph.finalize.d.ts +5 -0
- package/dist/negotiations/application/negotiation.graph.finalize.js +280 -0
- package/dist/negotiations/application/negotiation.graph.init.d.ts +54 -0
- package/dist/negotiations/application/negotiation.graph.init.js +227 -0
- package/dist/negotiations/application/negotiation.graph.js +69 -1388
- package/dist/negotiations/application/negotiation.graph.screen.d.ts +23 -0
- package/dist/negotiations/application/negotiation.graph.screen.js +108 -0
- package/dist/negotiations/application/negotiation.graph.shared.d.ts +75 -0
- package/dist/negotiations/application/negotiation.graph.shared.js +125 -0
- package/dist/negotiations/application/negotiation.graph.turn.d.ts +105 -0
- package/dist/negotiations/application/negotiation.graph.turn.js +484 -0
- package/dist/negotiations/domain/negotiation.state.d.ts +1 -1
- package/dist/negotiations/domain/negotiation.state.js +0 -1
- package/dist/networks/application/indexer.graph.d.ts +165 -7
- package/dist/networks/application/indexer.graph.js +339 -388
- package/dist/networks/application/indexer.state.d.ts +1 -1
- package/dist/networks/application/membership.graph.d.ts +83 -5
- package/dist/networks/application/membership.graph.js +177 -207
- package/dist/networks/application/network.graph.d.ts +148 -5
- package/dist/networks/application/network.graph.js +249 -278
- package/dist/networks/domain/membership.state.d.ts +1 -1
- package/dist/networks/domain/network.state.d.ts +1 -1
- package/dist/opportunities/application/delivery-card.cache.d.ts +1 -1
- package/dist/opportunities/application/delivery-card.cache.js +2 -2
- package/dist/opportunities/application/index.d.ts +2 -2
- package/dist/opportunities/application/index.js +2 -2
- package/dist/opportunities/application/opportunity.evaluator.js +1 -1
- package/dist/opportunities/application/opportunity.graph.d.ts +686 -473
- package/dist/opportunities/application/opportunity.graph.discovery-strategies.d.ts +109 -0
- package/dist/opportunities/application/opportunity.graph.discovery-strategies.js +451 -0
- package/dist/opportunities/application/opportunity.graph.discovery.d.ts +69 -0
- package/dist/opportunities/application/opportunity.graph.discovery.js +397 -0
- package/dist/opportunities/application/opportunity.graph.evaluation.d.ts +82 -0
- package/dist/opportunities/application/opportunity.graph.evaluation.js +608 -0
- package/dist/opportunities/application/opportunity.graph.js +120 -3690
- package/dist/opportunities/application/opportunity.graph.modes.d.ts +538 -0
- package/dist/opportunities/application/opportunity.graph.modes.js +538 -0
- package/dist/opportunities/application/opportunity.graph.negotiate.d.ts +109 -0
- package/dist/opportunities/application/opportunity.graph.negotiate.js +392 -0
- package/dist/opportunities/application/opportunity.graph.persist-node.d.ts +93 -0
- package/dist/opportunities/application/opportunity.graph.persist-node.js +765 -0
- package/dist/opportunities/application/opportunity.graph.prep.d.ts +150 -0
- package/dist/opportunities/application/opportunity.graph.prep.js +381 -0
- package/dist/opportunities/application/opportunity.graph.shared.d.ts +173 -0
- package/dist/opportunities/application/opportunity.graph.shared.js +199 -0
- package/dist/opportunities/application/opportunity.presentation.d.ts +399 -0
- package/dist/opportunities/application/{opportunity.presenter.js → opportunity.presentation.js} +735 -9
- package/dist/opportunities/application/opportunity.tools.cards.d.ts +152 -0
- package/dist/opportunities/application/opportunity.tools.cards.js +235 -0
- package/dist/opportunities/application/opportunity.tools.d.ts +8 -114
- package/dist/opportunities/application/opportunity.tools.js +28 -711
- package/dist/opportunities/application/opportunity.tools.list.d.ts +10 -0
- package/dist/opportunities/application/opportunity.tools.list.js +493 -0
- package/dist/opportunities/domain/index.d.ts +3 -3
- package/dist/opportunities/domain/index.js +3 -3
- package/dist/opportunities/domain/opportunity.state.d.ts +19 -19
- package/dist/opportunities/index.d.ts +6 -6
- package/dist/opportunities/index.js +4 -4
- package/dist/opportunities/ports/opportunity.tools.port.d.ts +1 -1
- package/dist/opportunities/radar/radar.graph.d.ts +57 -13
- package/dist/opportunities/radar/radar.graph.js +470 -471
- package/dist/premises/premise.graph.d.ts +88 -20
- package/dist/premises/premise.graph.js +207 -218
- package/dist/questions/domain/question.schema.d.ts +40 -40
- package/dist/shared/agent/tool.helpers.d.ts +21 -0
- package/dist/shared/agent/tool.registry.d.ts +4 -3
- package/dist/shared/agent/tool.registry.js +1 -1
- package/dist/shared/interfaces/database.capabilities.d.ts +100 -0
- package/dist/shared/interfaces/database.capabilities.js +7 -0
- package/dist/shared/interfaces/database.entities.d.ts +533 -0
- package/dist/shared/interfaces/database.entities.js +10 -0
- package/dist/shared/interfaces/database.identity-queries.d.ts +294 -0
- package/dist/shared/interfaces/database.identity-queries.js +4 -0
- package/dist/shared/interfaces/database.interface.d.ts +15 -2277
- package/dist/shared/interfaces/database.interface.js +8 -0
- package/dist/shared/interfaces/database.member-queries.d.ts +228 -0
- package/dist/shared/interfaces/database.member-queries.js +4 -0
- package/dist/shared/interfaces/database.negotiation.d.ts +305 -0
- package/dist/shared/interfaces/database.negotiation.js +26 -0
- package/dist/shared/interfaces/database.network-queries.d.ts +277 -0
- package/dist/shared/interfaces/database.network-queries.js +4 -0
- package/dist/shared/interfaces/database.opportunity-queries.d.ts +285 -0
- package/dist/shared/interfaces/database.opportunity-queries.js +4 -0
- package/dist/shared/interfaces/database.port.d.ts +322 -0
- package/dist/shared/interfaces/database.port.js +29 -0
- package/dist/shared/schemas/discovery-question.schema.d.ts +14 -14
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +2 -2
- package/package.json +2 -15
- package/dist/opportunities/application/opportunity.card-presentation.d.ts +0 -44
- package/dist/opportunities/application/opportunity.card-presentation.js +0 -93
- package/dist/opportunities/application/opportunity.presenter.d.ts +0 -156
- package/dist/opportunities/domain/opportunity.presentation-cache.d.ts +0 -5
- package/dist/opportunities/domain/opportunity.presentation-cache.js +0 -11
- package/dist/opportunities/domain/opportunity.presentation.d.ts +0 -76
- package/dist/opportunities/domain/opportunity.presentation.js +0 -516
- package/dist/opportunities/domain/opportunity.safe-presentation.d.ts +0 -104
- package/dist/opportunities/domain/opportunity.safe-presentation.js +0 -102
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Bilateral negotiation graph: init → screen → turn* → finalize.
|
|
3
|
+
*
|
|
4
|
+
* Every node is a top-level function in a sibling module, taking the graph
|
|
5
|
+
* state and an explicit {@link NegotiationGraphDeps}. This file composes the
|
|
6
|
+
* dependency bag and wires the edges — nothing else.
|
|
7
|
+
*/
|
|
8
|
+
import type { NegotiationGraphDatabase } from "../../shared/interfaces/database.interface.js";
|
|
3
9
|
import type { NegotiationTimeoutQueue } from "../../shared/interfaces/negotiation-events.interface.js";
|
|
4
10
|
import type { AgentDispatcher } from "../../shared/interfaces/agent-dispatcher.interface.js";
|
|
5
|
-
import { type NegotiationTurn, type NegotiationOutcome, type UserNegotiationContext, type NegotiationGraphLike } from "../domain/negotiation.state.js";
|
|
6
|
-
import { type NegotiationConsultationReason } from "../domain/negotiation.consultation-policy.js";
|
|
7
|
-
import { type ScreenDecisionRecord } from "./negotiation.screen.js";
|
|
8
|
-
import { type DeadlockShiftRecord } from "../domain/negotiation.deadlock.js";
|
|
9
|
-
import type { NegotiationProtocolVersion } from "../../shared/schemas/negotiation-state.schema.js";
|
|
10
11
|
import type { QuestionerEnqueueFn } from "../../questions/index.js";
|
|
11
12
|
import type { ReflectEnqueueFn } from "./negotiation.reflect.js";
|
|
12
|
-
import type {
|
|
13
|
+
import type { NegotiatorMemoryRetrieveFn } from "../domain/negotiation.memory.js";
|
|
14
|
+
import type { NegotiationGraphDeps, NegotiationState } from "./negotiation.graph.shared.js";
|
|
15
|
+
export type { NegotiationGraphDeps, NegotiationState } from "./negotiation.graph.shared.js";
|
|
16
|
+
export { negotiateCandidates } from "./negotiation.candidates.js";
|
|
17
|
+
export type { NegotiationCandidate, NegotiationResult, OnNegotiationResolved } from "./negotiation.candidates.js";
|
|
13
18
|
/**
|
|
14
19
|
* Factory for the bilateral negotiation LangGraph state machine.
|
|
15
20
|
* @remarks Accepts an AgentDispatcher for per-turn agent resolution.
|
|
16
21
|
*/
|
|
17
22
|
export declare class NegotiationGraphFactory {
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
private questionerEnqueue?;
|
|
22
|
-
private reflectEnqueue?;
|
|
23
|
-
private memoryRetrieve?;
|
|
24
|
-
constructor(database: NegotiationGraphDatabase, dispatcher: AgentDispatcher, timeoutQueue?: NegotiationTimeoutQueue | undefined, questionerEnqueue?: QuestionerEnqueueFn | undefined, reflectEnqueue?: ReflectEnqueueFn | undefined, memoryRetrieve?: NegotiatorMemoryRetrieveFn | undefined);
|
|
23
|
+
/** Resolved dependency bag shared by every node. */
|
|
24
|
+
readonly deps: NegotiationGraphDeps;
|
|
25
|
+
constructor(database: NegotiationGraphDatabase, dispatcher: AgentDispatcher, timeoutQueue?: NegotiationTimeoutQueue, questionerEnqueue?: QuestionerEnqueueFn, reflectEnqueue?: ReflectEnqueueFn, memoryRetrieve?: NegotiatorMemoryRetrieveFn);
|
|
25
26
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
26
|
-
sourceUser: UserNegotiationContext;
|
|
27
|
-
candidateUser: UserNegotiationContext;
|
|
27
|
+
sourceUser: import("../domain/negotiation.state.js").UserNegotiationContext;
|
|
28
|
+
candidateUser: import("../domain/negotiation.state.js").UserNegotiationContext;
|
|
28
29
|
sourceIntentId: string | undefined;
|
|
29
30
|
candidateIntentId: string | undefined;
|
|
30
31
|
indexContext: {
|
|
@@ -34,22 +35,22 @@ export declare class NegotiationGraphFactory {
|
|
|
34
35
|
seedAssessment: import("../domain/negotiation.state.js").SeedAssessment;
|
|
35
36
|
initiatorUserId: string | undefined;
|
|
36
37
|
discoveryQuery: string | undefined;
|
|
37
|
-
protocolVersion: NegotiationProtocolVersion;
|
|
38
|
-
screenDecision: ScreenDecisionRecord | null;
|
|
39
|
-
deadlockShift: DeadlockShiftRecord | null;
|
|
40
|
-
memoryBySide: Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>;
|
|
38
|
+
protocolVersion: import("../../index.js").NegotiationProtocolVersion;
|
|
39
|
+
screenDecision: import("./negotiation.screen.js").ScreenDecisionRecord | null;
|
|
40
|
+
deadlockShift: import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null;
|
|
41
|
+
memoryBySide: Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>;
|
|
41
42
|
isContinuation: boolean;
|
|
42
43
|
priorAttribution: unknown;
|
|
43
44
|
outreachOpened: boolean;
|
|
44
45
|
firstTurnScreenedOut: boolean;
|
|
45
46
|
opportunityId: string;
|
|
46
|
-
opportunityStatus: OpportunityStatus | undefined;
|
|
47
|
+
opportunityStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined;
|
|
47
48
|
opportunityUpdatedAt: Date | undefined;
|
|
48
49
|
resumeFromTaskId: string | undefined;
|
|
49
50
|
continuationSettlementId: string | undefined;
|
|
50
|
-
continuationExecution: import("../../shared/interfaces/database.
|
|
51
|
-
continuationReceipt: NegotiationContinuationReceipt | undefined;
|
|
52
|
-
privateConsultation: import("../../shared/interfaces/database.
|
|
51
|
+
continuationExecution: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined;
|
|
52
|
+
continuationReceipt: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined;
|
|
53
|
+
privateConsultation: import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined;
|
|
53
54
|
consultationPolicyReason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined;
|
|
54
55
|
conversationId: string;
|
|
55
56
|
taskId: string;
|
|
@@ -72,9 +73,9 @@ export declare class NegotiationGraphFactory {
|
|
|
72
73
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
73
74
|
} | null | undefined;
|
|
74
75
|
} | null;
|
|
75
|
-
status: "waiting_for_agent" | "input_required" | "
|
|
76
|
+
status: "waiting_for_agent" | "input_required" | "completed" | "active";
|
|
76
77
|
priorTurnCount: number;
|
|
77
|
-
userAnswers: import("../../shared/interfaces/database.
|
|
78
|
+
userAnswers: import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[];
|
|
78
79
|
outcome: {
|
|
79
80
|
reasoning: string;
|
|
80
81
|
hasOpportunity: boolean;
|
|
@@ -87,8 +88,8 @@ export declare class NegotiationGraphFactory {
|
|
|
87
88
|
} | null;
|
|
88
89
|
error: string | null;
|
|
89
90
|
}, {
|
|
90
|
-
sourceUser?: UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext> | undefined;
|
|
91
|
-
candidateUser?: UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext> | undefined;
|
|
91
|
+
sourceUser?: import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext> | undefined;
|
|
92
|
+
candidateUser?: import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext> | undefined;
|
|
92
93
|
sourceIntentId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
93
94
|
candidateIntentId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
94
95
|
indexContext?: {
|
|
@@ -101,22 +102,22 @@ export declare class NegotiationGraphFactory {
|
|
|
101
102
|
seedAssessment?: import("../domain/negotiation.state.js").SeedAssessment | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").SeedAssessment> | undefined;
|
|
102
103
|
initiatorUserId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
103
104
|
discoveryQuery?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
104
|
-
protocolVersion?: NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<NegotiationProtocolVersion> | undefined;
|
|
105
|
-
screenDecision?: ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<ScreenDecisionRecord | null> | null | undefined;
|
|
106
|
-
deadlockShift?: DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<DeadlockShiftRecord | null> | null | undefined;
|
|
107
|
-
memoryBySide?: Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>> | undefined;
|
|
105
|
+
protocolVersion?: import("../../index.js").NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<import("../../index.js").NegotiationProtocolVersion> | undefined;
|
|
106
|
+
screenDecision?: import("./negotiation.screen.js").ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<import("./negotiation.screen.js").ScreenDecisionRecord | null> | null | undefined;
|
|
107
|
+
deadlockShift?: import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null> | null | undefined;
|
|
108
|
+
memoryBySide?: Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>> | undefined;
|
|
108
109
|
isContinuation?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
109
110
|
priorAttribution?: unknown;
|
|
110
111
|
outreachOpened?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
111
112
|
firstTurnScreenedOut?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
112
113
|
opportunityId?: string | import("@langchain/langgraph").OverwriteValue<string> | undefined;
|
|
113
|
-
opportunityStatus?: OpportunityStatus | import("@langchain/langgraph").OverwriteValue<OpportunityStatus | undefined> | undefined;
|
|
114
|
+
opportunityStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined> | undefined;
|
|
114
115
|
opportunityUpdatedAt?: Date | import("@langchain/langgraph").OverwriteValue<Date | undefined> | undefined;
|
|
115
116
|
resumeFromTaskId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
116
117
|
continuationSettlementId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
117
|
-
continuationExecution?: import("../../shared/interfaces/database.
|
|
118
|
-
continuationReceipt?: NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined;
|
|
119
|
-
privateConsultation?: import("../../shared/interfaces/database.
|
|
118
|
+
continuationExecution?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined> | undefined;
|
|
119
|
+
continuationReceipt?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined> | undefined;
|
|
120
|
+
privateConsultation?: import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined> | undefined;
|
|
120
121
|
consultationPolicyReason?: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | import("@langchain/langgraph").OverwriteValue<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined> | undefined;
|
|
121
122
|
conversationId?: string | import("@langchain/langgraph").OverwriteValue<string> | undefined;
|
|
122
123
|
taskId?: string | import("@langchain/langgraph").OverwriteValue<string> | undefined;
|
|
@@ -152,9 +153,9 @@ export declare class NegotiationGraphFactory {
|
|
|
152
153
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
153
154
|
} | null | undefined;
|
|
154
155
|
} | null> | null | undefined;
|
|
155
|
-
status?: "waiting_for_agent" | "input_required" | "
|
|
156
|
+
status?: "waiting_for_agent" | "input_required" | "completed" | "active" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "completed" | "active"> | undefined;
|
|
156
157
|
priorTurnCount?: number | import("@langchain/langgraph").OverwriteValue<number> | undefined;
|
|
157
|
-
userAnswers?: import("../../shared/interfaces/database.
|
|
158
|
+
userAnswers?: import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[]> | undefined;
|
|
158
159
|
outcome?: {
|
|
159
160
|
reasoning: string;
|
|
160
161
|
hasOpportunity: boolean;
|
|
@@ -176,8 +177,8 @@ export declare class NegotiationGraphFactory {
|
|
|
176
177
|
} | null> | null | undefined;
|
|
177
178
|
error?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
|
|
178
179
|
}, "screen" | "turn" | "__start__" | "init" | "finalize", {
|
|
179
|
-
sourceUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
180
|
-
candidateUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
180
|
+
sourceUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
181
|
+
candidateUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
181
182
|
sourceIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
182
183
|
candidateIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
183
184
|
indexContext: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -193,22 +194,22 @@ export declare class NegotiationGraphFactory {
|
|
|
193
194
|
seedAssessment: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").SeedAssessment, import("../domain/negotiation.state.js").SeedAssessment | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").SeedAssessment>, unknown>;
|
|
194
195
|
initiatorUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
195
196
|
discoveryQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
196
|
-
protocolVersion: import("@langchain/langgraph").BaseChannel<NegotiationProtocolVersion, NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<NegotiationProtocolVersion>, unknown>;
|
|
197
|
-
screenDecision: import("@langchain/langgraph").BaseChannel<ScreenDecisionRecord | null, ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<ScreenDecisionRecord | null> | null, unknown>;
|
|
198
|
-
deadlockShift: import("@langchain/langgraph").BaseChannel<DeadlockShiftRecord | null, DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<DeadlockShiftRecord | null> | null, unknown>;
|
|
199
|
-
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>>, unknown>;
|
|
197
|
+
protocolVersion: import("@langchain/langgraph").BaseChannel<import("../../index.js").NegotiationProtocolVersion, import("../../index.js").NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<import("../../index.js").NegotiationProtocolVersion>, unknown>;
|
|
198
|
+
screenDecision: import("@langchain/langgraph").BaseChannel<import("./negotiation.screen.js").ScreenDecisionRecord | null, import("./negotiation.screen.js").ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<import("./negotiation.screen.js").ScreenDecisionRecord | null> | null, unknown>;
|
|
199
|
+
deadlockShift: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null, import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null> | null, unknown>;
|
|
200
|
+
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>>, unknown>;
|
|
200
201
|
isContinuation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
201
202
|
priorAttribution: import("@langchain/langgraph").BaseChannel<unknown, unknown, unknown>;
|
|
202
203
|
outreachOpened: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
203
204
|
firstTurnScreenedOut: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
204
205
|
opportunityId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
205
|
-
opportunityStatus: import("@langchain/langgraph").BaseChannel<OpportunityStatus | undefined, OpportunityStatus | import("@langchain/langgraph").OverwriteValue<OpportunityStatus | undefined> | undefined, unknown>;
|
|
206
|
+
opportunityStatus: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined, import("../../shared/interfaces/database.entities.js").OpportunityStatus | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined> | undefined, unknown>;
|
|
206
207
|
opportunityUpdatedAt: import("@langchain/langgraph").BaseChannel<Date | undefined, Date | import("@langchain/langgraph").OverwriteValue<Date | undefined> | undefined, unknown>;
|
|
207
208
|
resumeFromTaskId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
208
209
|
continuationSettlementId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
209
|
-
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
210
|
-
continuationReceipt: import("@langchain/langgraph").BaseChannel<NegotiationContinuationReceipt | undefined, NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
211
|
-
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
210
|
+
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined> | undefined, unknown>;
|
|
211
|
+
continuationReceipt: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
212
|
+
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined> | undefined, unknown>;
|
|
212
213
|
consultationPolicyReason: import("@langchain/langgraph").BaseChannel<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined, "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | import("@langchain/langgraph").OverwriteValue<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined> | undefined, unknown>;
|
|
213
214
|
conversationId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
214
215
|
taskId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
@@ -257,9 +258,9 @@ export declare class NegotiationGraphFactory {
|
|
|
257
258
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
258
259
|
} | null | undefined;
|
|
259
260
|
} | null> | null, unknown>;
|
|
260
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
261
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "completed" | "active", "waiting_for_agent" | "input_required" | "completed" | "active" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "completed" | "active">, unknown>;
|
|
261
262
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
262
|
-
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
263
|
+
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[]>, unknown>;
|
|
263
264
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
264
265
|
reasoning: string;
|
|
265
266
|
hasOpportunity: boolean;
|
|
@@ -290,8 +291,8 @@ export declare class NegotiationGraphFactory {
|
|
|
290
291
|
} | null> | null, unknown>;
|
|
291
292
|
error: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
|
|
292
293
|
}, {
|
|
293
|
-
sourceUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
294
|
-
candidateUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
294
|
+
sourceUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
295
|
+
candidateUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
295
296
|
sourceIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
296
297
|
candidateIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
297
298
|
indexContext: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -307,22 +308,22 @@ export declare class NegotiationGraphFactory {
|
|
|
307
308
|
seedAssessment: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").SeedAssessment, import("../domain/negotiation.state.js").SeedAssessment | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").SeedAssessment>, unknown>;
|
|
308
309
|
initiatorUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
309
310
|
discoveryQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
310
|
-
protocolVersion: import("@langchain/langgraph").BaseChannel<NegotiationProtocolVersion, NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<NegotiationProtocolVersion>, unknown>;
|
|
311
|
-
screenDecision: import("@langchain/langgraph").BaseChannel<ScreenDecisionRecord | null, ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<ScreenDecisionRecord | null> | null, unknown>;
|
|
312
|
-
deadlockShift: import("@langchain/langgraph").BaseChannel<DeadlockShiftRecord | null, DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<DeadlockShiftRecord | null> | null, unknown>;
|
|
313
|
-
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>>, unknown>;
|
|
311
|
+
protocolVersion: import("@langchain/langgraph").BaseChannel<import("../../index.js").NegotiationProtocolVersion, import("../../index.js").NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<import("../../index.js").NegotiationProtocolVersion>, unknown>;
|
|
312
|
+
screenDecision: import("@langchain/langgraph").BaseChannel<import("./negotiation.screen.js").ScreenDecisionRecord | null, import("./negotiation.screen.js").ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<import("./negotiation.screen.js").ScreenDecisionRecord | null> | null, unknown>;
|
|
313
|
+
deadlockShift: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null, import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null> | null, unknown>;
|
|
314
|
+
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>>, unknown>;
|
|
314
315
|
isContinuation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
315
316
|
priorAttribution: import("@langchain/langgraph").BaseChannel<unknown, unknown, unknown>;
|
|
316
317
|
outreachOpened: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
317
318
|
firstTurnScreenedOut: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
318
319
|
opportunityId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
319
|
-
opportunityStatus: import("@langchain/langgraph").BaseChannel<OpportunityStatus | undefined, OpportunityStatus | import("@langchain/langgraph").OverwriteValue<OpportunityStatus | undefined> | undefined, unknown>;
|
|
320
|
+
opportunityStatus: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined, import("../../shared/interfaces/database.entities.js").OpportunityStatus | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined> | undefined, unknown>;
|
|
320
321
|
opportunityUpdatedAt: import("@langchain/langgraph").BaseChannel<Date | undefined, Date | import("@langchain/langgraph").OverwriteValue<Date | undefined> | undefined, unknown>;
|
|
321
322
|
resumeFromTaskId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
322
323
|
continuationSettlementId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
323
|
-
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
324
|
-
continuationReceipt: import("@langchain/langgraph").BaseChannel<NegotiationContinuationReceipt | undefined, NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
325
|
-
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
324
|
+
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined> | undefined, unknown>;
|
|
325
|
+
continuationReceipt: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
326
|
+
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined> | undefined, unknown>;
|
|
326
327
|
consultationPolicyReason: import("@langchain/langgraph").BaseChannel<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined, "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | import("@langchain/langgraph").OverwriteValue<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined> | undefined, unknown>;
|
|
327
328
|
conversationId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
328
329
|
taskId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
@@ -371,9 +372,9 @@ export declare class NegotiationGraphFactory {
|
|
|
371
372
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
372
373
|
} | null | undefined;
|
|
373
374
|
} | null> | null, unknown>;
|
|
374
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
375
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "completed" | "active", "waiting_for_agent" | "input_required" | "completed" | "active" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "completed" | "active">, unknown>;
|
|
375
376
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
376
|
-
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
377
|
+
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[]>, unknown>;
|
|
377
378
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
378
379
|
reasoning: string;
|
|
379
380
|
hasOpportunity: boolean;
|
|
@@ -415,8 +416,8 @@ export declare class NegotiationGraphFactory {
|
|
|
415
416
|
createdAt: Date;
|
|
416
417
|
taskId: string | null;
|
|
417
418
|
}[] | undefined;
|
|
418
|
-
privateConsultation?: import("../../shared/interfaces/database.
|
|
419
|
-
userAnswers?: import("../../shared/interfaces/database.
|
|
419
|
+
privateConsultation?: import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined;
|
|
420
|
+
userAnswers?: import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | undefined;
|
|
420
421
|
priorAttribution?: import("../negotiation.attribution.js").SeededAttribution | undefined;
|
|
421
422
|
conversationId: string;
|
|
422
423
|
taskId: string;
|
|
@@ -425,7 +426,7 @@ export declare class NegotiationGraphFactory {
|
|
|
425
426
|
maxTurns: number;
|
|
426
427
|
isContinuation: boolean;
|
|
427
428
|
initiatorUserId: string;
|
|
428
|
-
protocolVersion: NegotiationProtocolVersion;
|
|
429
|
+
protocolVersion: import("../../index.js").NegotiationProtocolVersion;
|
|
429
430
|
priorTurnCount: number;
|
|
430
431
|
error?: undefined;
|
|
431
432
|
} | {
|
|
@@ -437,9 +438,9 @@ export declare class NegotiationGraphFactory {
|
|
|
437
438
|
createdAt: Date;
|
|
438
439
|
taskId: string | null;
|
|
439
440
|
}[] | undefined;
|
|
440
|
-
consultationPolicyReason: NegotiationConsultationReason;
|
|
441
|
-
privateConsultation?: import("../../shared/interfaces/database.
|
|
442
|
-
userAnswers?: import("../../shared/interfaces/database.
|
|
441
|
+
consultationPolicyReason: import("../index.js").NegotiationConsultationReason;
|
|
442
|
+
privateConsultation?: import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined;
|
|
443
|
+
userAnswers?: import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | undefined;
|
|
443
444
|
priorAttribution?: import("../negotiation.attribution.js").SeededAttribution | undefined;
|
|
444
445
|
conversationId: string;
|
|
445
446
|
taskId: string;
|
|
@@ -448,19 +449,19 @@ export declare class NegotiationGraphFactory {
|
|
|
448
449
|
maxTurns: number;
|
|
449
450
|
isContinuation: boolean;
|
|
450
451
|
initiatorUserId: string;
|
|
451
|
-
protocolVersion: NegotiationProtocolVersion;
|
|
452
|
+
protocolVersion: import("../../index.js").NegotiationProtocolVersion;
|
|
452
453
|
priorTurnCount: number;
|
|
453
454
|
error?: undefined;
|
|
454
455
|
};
|
|
455
456
|
screen: {
|
|
456
|
-
screenDecision: ScreenDecisionRecord;
|
|
457
|
+
screenDecision: import("./negotiation.screen.js").ScreenDecisionRecord;
|
|
457
458
|
memoryBySide: {
|
|
458
|
-
[x: string]: NegotiatorMemoryEntry[];
|
|
459
|
+
[x: string]: import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[];
|
|
459
460
|
};
|
|
460
461
|
};
|
|
461
462
|
turn: import("@langchain/langgraph").UpdateType<{
|
|
462
|
-
sourceUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
463
|
-
candidateUser: import("@langchain/langgraph").BaseChannel<UserNegotiationContext, UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<UserNegotiationContext>, unknown>;
|
|
463
|
+
sourceUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
464
|
+
candidateUser: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").UserNegotiationContext, import("../domain/negotiation.state.js").UserNegotiationContext | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").UserNegotiationContext>, unknown>;
|
|
464
465
|
sourceIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
465
466
|
candidateIntentId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
466
467
|
indexContext: import("@langchain/langgraph").BaseChannel<{
|
|
@@ -476,22 +477,22 @@ export declare class NegotiationGraphFactory {
|
|
|
476
477
|
seedAssessment: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.state.js").SeedAssessment, import("../domain/negotiation.state.js").SeedAssessment | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.state.js").SeedAssessment>, unknown>;
|
|
477
478
|
initiatorUserId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
478
479
|
discoveryQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
479
|
-
protocolVersion: import("@langchain/langgraph").BaseChannel<NegotiationProtocolVersion, NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<NegotiationProtocolVersion>, unknown>;
|
|
480
|
-
screenDecision: import("@langchain/langgraph").BaseChannel<ScreenDecisionRecord | null, ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<ScreenDecisionRecord | null> | null, unknown>;
|
|
481
|
-
deadlockShift: import("@langchain/langgraph").BaseChannel<DeadlockShiftRecord | null, DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<DeadlockShiftRecord | null> | null, unknown>;
|
|
482
|
-
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", NegotiatorMemoryEntry[]>>>, unknown>;
|
|
480
|
+
protocolVersion: import("@langchain/langgraph").BaseChannel<import("../../index.js").NegotiationProtocolVersion, import("../../index.js").NegotiationProtocolVersion | import("@langchain/langgraph").OverwriteValue<import("../../index.js").NegotiationProtocolVersion>, unknown>;
|
|
481
|
+
screenDecision: import("@langchain/langgraph").BaseChannel<import("./negotiation.screen.js").ScreenDecisionRecord | null, import("./negotiation.screen.js").ScreenDecisionRecord | import("@langchain/langgraph").OverwriteValue<import("./negotiation.screen.js").ScreenDecisionRecord | null> | null, unknown>;
|
|
482
|
+
deadlockShift: import("@langchain/langgraph").BaseChannel<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null, import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | import("@langchain/langgraph").OverwriteValue<import("../domain/negotiation.deadlock.contracts.js").DeadlockShiftRecord | null> | null, unknown>;
|
|
483
|
+
memoryBySide: import("@langchain/langgraph").BaseChannel<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>, Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>> | import("@langchain/langgraph").OverwriteValue<Partial<Record<"source" | "candidate", import("../domain/negotiation.memory.js").NegotiatorMemoryEntry[]>>>, unknown>;
|
|
483
484
|
isContinuation: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
484
485
|
priorAttribution: import("@langchain/langgraph").BaseChannel<unknown, unknown, unknown>;
|
|
485
486
|
outreachOpened: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
486
487
|
firstTurnScreenedOut: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
487
488
|
opportunityId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
488
|
-
opportunityStatus: import("@langchain/langgraph").BaseChannel<OpportunityStatus | undefined, OpportunityStatus | import("@langchain/langgraph").OverwriteValue<OpportunityStatus | undefined> | undefined, unknown>;
|
|
489
|
+
opportunityStatus: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined, import("../../shared/interfaces/database.entities.js").OpportunityStatus | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").OpportunityStatus | undefined> | undefined, unknown>;
|
|
489
490
|
opportunityUpdatedAt: import("@langchain/langgraph").BaseChannel<Date | undefined, Date | import("@langchain/langgraph").OverwriteValue<Date | undefined> | undefined, unknown>;
|
|
490
491
|
resumeFromTaskId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
491
492
|
continuationSettlementId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
492
|
-
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
493
|
-
continuationReceipt: import("@langchain/langgraph").BaseChannel<NegotiationContinuationReceipt | undefined, NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
494
|
-
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
493
|
+
continuationExecution: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution | undefined> | undefined, unknown>;
|
|
494
|
+
continuationReceipt: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
495
|
+
privateConsultation: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined, import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationPrivateConsultation | undefined> | undefined, unknown>;
|
|
495
496
|
consultationPolicyReason: import("@langchain/langgraph").BaseChannel<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined, "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | import("@langchain/langgraph").OverwriteValue<"unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority" | undefined> | undefined, unknown>;
|
|
496
497
|
conversationId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
497
498
|
taskId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
@@ -540,9 +541,9 @@ export declare class NegotiationGraphFactory {
|
|
|
540
541
|
reason: "unresolved_owner_constraint" | "consequential_disclosure_permission" | "repeated_non_convergence" | "insufficient_commitment_authority";
|
|
541
542
|
} | null | undefined;
|
|
542
543
|
} | null> | null, unknown>;
|
|
543
|
-
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "
|
|
544
|
+
status: import("@langchain/langgraph").BaseChannel<"waiting_for_agent" | "input_required" | "completed" | "active", "waiting_for_agent" | "input_required" | "completed" | "active" | import("@langchain/langgraph").OverwriteValue<"waiting_for_agent" | "input_required" | "completed" | "active">, unknown>;
|
|
544
545
|
priorTurnCount: import("@langchain/langgraph").BaseChannel<number, number | import("@langchain/langgraph").OverwriteValue<number>, unknown>;
|
|
545
|
-
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.
|
|
546
|
+
userAnswers: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[], import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationUserAnswer[]>, unknown>;
|
|
546
547
|
outcome: import("@langchain/langgraph").BaseChannel<{
|
|
547
548
|
reasoning: string;
|
|
548
549
|
hasOpportunity: boolean;
|
|
@@ -576,76 +577,9 @@ export declare class NegotiationGraphFactory {
|
|
|
576
577
|
finalize: {};
|
|
577
578
|
}, unknown, unknown, []>;
|
|
578
579
|
}
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
sourceUser?: UserNegotiationContext;
|
|
586
|
-
reasoning: string;
|
|
587
|
-
valencyRole: string;
|
|
588
|
-
networkId?: string;
|
|
589
|
-
candidateUser: UserNegotiationContext;
|
|
590
|
-
/** The explicit search query that triggered discovery (if any). */
|
|
591
|
-
discoveryQuery?: string;
|
|
592
|
-
/**
|
|
593
|
-
* ID of the opportunity this negotiation is for. When set, the negotiation
|
|
594
|
-
* graph's finalize node updates the opportunity's status based on the outcome
|
|
595
|
-
* (`accept` → 'pending', `reject` → 'rejected', otherwise → 'stalled').
|
|
596
|
-
*/
|
|
597
|
-
opportunityId?: string;
|
|
598
|
-
/** Exact persisted lifecycle state claimed by this negotiation attempt. */
|
|
599
|
-
opportunityStatus?: OpportunityStatus;
|
|
600
|
-
opportunityUpdatedAt?: Date;
|
|
601
|
-
}
|
|
602
|
-
export interface NegotiationResult {
|
|
603
|
-
userId: string;
|
|
604
|
-
agreedRoles: NegotiationOutcome["agreedRoles"];
|
|
605
|
-
reasoning: string;
|
|
606
|
-
turnCount: number;
|
|
607
|
-
}
|
|
608
|
-
/**
|
|
609
|
-
* Per-candidate resolution hook — fires as each negotiation settles, before
|
|
610
|
-
* Promise.all aggregates. Awaited so the caller can run async work before the
|
|
611
|
-
* next settle.
|
|
612
|
-
*
|
|
613
|
-
* `turns` and `outcome` are passed through from the underlying negotiation
|
|
614
|
-
* graph so consumers can build per-candidate decision-question inputs without
|
|
615
|
-
* re-walking trace events or DB artifacts. Both are present on every
|
|
616
|
-
* resolution (accepted, rejected, stalled, error); error paths receive a
|
|
617
|
-
* synthesized `outcome` with `hasOpportunity: false`.
|
|
618
|
-
*/
|
|
619
|
-
export type OnNegotiationResolved = (entry: {
|
|
620
|
-
candidate: NegotiationCandidate;
|
|
621
|
-
accepted: NegotiationResult | null;
|
|
622
|
-
turns: NegotiationTurn[];
|
|
623
|
-
outcome: NegotiationOutcome;
|
|
624
|
-
continuationReceipt?: import('../../shared/interfaces/database.interface.js').NegotiationContinuationReceipt;
|
|
625
|
-
}) => Promise<void>;
|
|
626
|
-
/**
|
|
627
|
-
* Runs bilateral negotiation for each candidate in parallel.
|
|
628
|
-
* @returns Only candidates that produced an opportunity
|
|
629
|
-
*/
|
|
630
|
-
export declare function negotiateCandidates(negotiationGraph: NegotiationGraphLike, sourceUser: UserNegotiationContext, candidates: NegotiationCandidate[], indexContext: {
|
|
631
|
-
networkId: string;
|
|
632
|
-
prompt: string;
|
|
633
|
-
}, opts?: {
|
|
634
|
-
maxTurns?: number;
|
|
635
|
-
traceEmitter?: TraceEmitter;
|
|
636
|
-
indexContextOverrides?: Map<string, string>;
|
|
637
|
-
timeoutMs?: number;
|
|
638
|
-
onCandidateResolved?: OnNegotiationResolved;
|
|
639
|
-
/**
|
|
640
|
-
* Initiator seat for every candidate session in this fan-out (v2 stamp).
|
|
641
|
-
* Passed through to the negotiation graph, which may still override it by
|
|
642
|
-
* inheriting from a prior task on the same opportunities/conversation.
|
|
643
|
-
*/
|
|
644
|
-
initiatorUserId?: string;
|
|
645
|
-
/** Exact settled task to resume; only the durable run-existing path sets this. */
|
|
646
|
-
resumeFromTaskId?: string;
|
|
647
|
-
/** Deterministic settlement key paired with resumeFromTaskId. */
|
|
648
|
-
continuationSettlementId?: string;
|
|
649
|
-
/** Current durable lease/fence for this exact continuation successor. */
|
|
650
|
-
continuationExecution?: import('../../shared/interfaces/database.interface.js').NegotiationContinuationExecution;
|
|
651
|
-
}): Promise<NegotiationResult[]>;
|
|
580
|
+
/** After init: fail closed, run the outreach gate, or go straight to the first turn. */
|
|
581
|
+
export declare function routeAfterInit(state: NegotiationState): string;
|
|
582
|
+
/** After the outreach gate: an enforced pass ends the negotiation before any turn. */
|
|
583
|
+
export declare function routeAfterScreen(state: NegotiationState): string;
|
|
584
|
+
/** After a turn: keep going, or settle. */
|
|
585
|
+
export declare function routeAfterTurn(state: NegotiationState): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Negotiation graph, stage 4: persist the outcome and fan out follow-ups.
|
|
3
|
+
*/
|
|
4
|
+
import type { NegotiationGraphDeps, NegotiationState } from "./negotiation.graph.shared.js";
|
|
5
|
+
export declare function finalizeNode(state: NegotiationState, deps: NegotiationGraphDeps): Promise<{}>;
|