@indexnetwork/protocol 14.3.2-rc.477.1 → 17.0.0-rc.479.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 +141 -0
- package/IMPLEMENTATION.md +50 -52
- package/STABILITY.md +3 -3
- package/dist/chat/chat.agent.js +2 -3
- package/dist/chat/chat.graph.d.ts +41 -1
- package/dist/chat/chat.graph.js +108 -127
- package/dist/chat/negotiator.persona.d.ts +1 -1
- package/dist/chat/negotiator.persona.js +1 -4
- package/dist/chat/negotiator.prompt.js +1 -2
- package/dist/chat/onboarding.persona.js +0 -1
- package/dist/chat/reporter.persona.js +0 -1
- package/dist/chat/signal.persona.js +0 -1
- package/dist/contacts/application/contact.tools.d.ts +6 -9
- package/dist/contacts/application/contact.tools.js +11 -92
- package/dist/contacts/application/index.d.ts +2 -14
- package/dist/contacts/application/index.js +2 -13
- package/dist/contacts/domain/contact.types.d.ts +0 -23
- package/dist/contacts/domain/index.d.ts +2 -6
- package/dist/contacts/index.d.ts +1 -1
- package/dist/contacts/index.js +1 -1
- package/dist/contacts/ports/contact.repository.port.d.ts +5 -12
- package/dist/contacts/ports/contact.repository.port.js +4 -6
- package/dist/contacts/ports/contact.tools.port.d.ts +1 -3
- package/dist/contacts/ports/contact.tools.port.js +1 -2
- package/dist/contacts/ports/index.d.ts +1 -1
- package/dist/contacts/ports/index.js +1 -1
- 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 -50
- package/dist/index.js +17 -28
- 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 +14 -20
- 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.factory.js +0 -8
- package/dist/shared/agent/tool.helpers.d.ts +21 -45
- package/dist/shared/agent/tool.helpers.js +1 -2
- package/dist/shared/agent/tool.registry.d.ts +4 -3
- package/dist/shared/agent/tool.registry.js +2 -4
- package/dist/shared/agent/tool.runtime.js +0 -2
- package/dist/shared/agent/utility.tools.js +9 -13
- 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 +221 -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/contacts/application/contact.inviter.d.ts +0 -49
- package/dist/contacts/application/contact.inviter.js +0 -64
- package/dist/integrations/application/index.d.ts +0 -14
- package/dist/integrations/application/index.js +0 -14
- package/dist/integrations/application/integration.tools.d.ts +0 -27
- package/dist/integrations/application/integration.tools.js +0 -98
- package/dist/integrations/domain/index.d.ts +0 -16
- package/dist/integrations/domain/index.js +0 -1
- package/dist/integrations/domain/integration.types.d.ts +0 -51
- package/dist/integrations/domain/integration.types.js +0 -9
- package/dist/integrations/index.d.ts +0 -10
- package/dist/integrations/index.js +0 -8
- package/dist/integrations/ports/index.d.ts +0 -25
- package/dist/integrations/ports/index.js +0 -23
- package/dist/integrations/ports/integration.adapter.port.d.ts +0 -62
- package/dist/integrations/ports/integration.adapter.port.js +0 -15
- package/dist/integrations/ports/integration.importer.port.d.ts +0 -31
- package/dist/integrations/ports/integration.importer.port.js +0 -15
- package/dist/integrations/ports/integration.tools.port.d.ts +0 -25
- package/dist/integrations/ports/integration.tools.port.js +0 -18
- 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
|
@@ -2,168 +2,487 @@
|
|
|
2
2
|
* Opportunity Graph: Linear Multi-Step Workflow for Opportunity Discovery
|
|
3
3
|
*
|
|
4
4
|
* Architecture: Follows intent graph pattern with Annotation-based state.
|
|
5
|
-
* Flow: Prep → Scope → Discovery → Evaluation → Ranking → Persist → END
|
|
5
|
+
* Flow: Prep → Scope → Resolve → Discovery → Evaluation → Ranking → Persist → Negotiate → END
|
|
6
6
|
*
|
|
7
7
|
* Key Constraints:
|
|
8
8
|
* - Opportunities only between intents sharing the same index
|
|
9
9
|
* - Both intents must have hyde documents for semantic matching
|
|
10
10
|
* - Non-indexed intents cannot participate in discovery
|
|
11
11
|
*
|
|
12
|
+
* The graph is the discovery pipeline and nothing else. Read, update, delete,
|
|
13
|
+
* send, negotiate_existing, approve_introduction and the introduction path are
|
|
14
|
+
* plain functions in `opportunity.graph.modes.ts` — they never needed a state
|
|
15
|
+
* machine, and routing them through one hid nine single-node paths behind a
|
|
16
|
+
* conditional edge. Every node below is a top-level function taking the state
|
|
17
|
+
* and an explicit {@link OpportunityGraphDeps}.
|
|
18
|
+
*
|
|
12
19
|
* Constructor injects Database, Embedder, and compiled HyDE graph.
|
|
13
20
|
*/
|
|
14
|
-
import type { Id, NegotiationContinuationReceipt } from '../../shared/interfaces/database.interface.js';
|
|
15
|
-
import type { DebugMetaAgent } from '../../agents/index.js';
|
|
16
|
-
import { type IndexedIntent, type SourceProfileData, type TargetNetwork, type CandidateMatch, type EvaluatedOpportunity, type EvaluatedOpportunityActor } from '../domain/opportunity.state.js';
|
|
17
|
-
import { type CandidateProfile, type EvaluatorEntity, type EvaluatorInput } from './opportunity.evaluator.js';
|
|
18
21
|
import type { OpportunityGraphDatabase } from '../../shared/interfaces/database.interface.js';
|
|
19
|
-
/** Optional evaluator for testing (avoids LLM calls). */
|
|
20
|
-
export type OpportunityEvaluatorLike = {
|
|
21
|
-
invoke?: (sourceProfileContext: string, candidates: CandidateProfile[], options: {
|
|
22
|
-
minScore?: number;
|
|
23
|
-
}) => Promise<Array<{
|
|
24
|
-
sourceId: string;
|
|
25
|
-
candidateId: string;
|
|
26
|
-
score: number;
|
|
27
|
-
reasoning: string;
|
|
28
|
-
valencyRole: 'Agent' | 'Patient' | 'Peer';
|
|
29
|
-
}>>;
|
|
30
|
-
invokeEntityBundle?: (input: EvaluatorInput, options: {
|
|
31
|
-
minScore?: number;
|
|
32
|
-
returnAll?: boolean;
|
|
33
|
-
signal?: AbortSignal;
|
|
34
|
-
}) => Promise<Array<{
|
|
35
|
-
reasoning: string;
|
|
36
|
-
score: number;
|
|
37
|
-
actors: Array<{
|
|
38
|
-
userId: string;
|
|
39
|
-
role: 'agent' | 'patient' | 'peer';
|
|
40
|
-
intentId?: string | null;
|
|
41
|
-
evidenceKey?: string | null;
|
|
42
|
-
}>;
|
|
43
|
-
}>>;
|
|
44
|
-
};
|
|
45
22
|
import type { Embedder } from '../../shared/interfaces/embedder.interface.js';
|
|
46
|
-
import type {
|
|
47
|
-
import type {
|
|
48
|
-
import type {
|
|
49
|
-
import {
|
|
50
|
-
import { type
|
|
23
|
+
import type { NegotiationGraphLike } from '../../negotiations/index.js';
|
|
24
|
+
import type { AgentDispatcher } from '../../shared/interfaces/agent-dispatcher.interface.js';
|
|
25
|
+
import type { QueueOpportunityNotificationFn } from './opportunity.lifecycle.js';
|
|
26
|
+
import type { StampNewbornOpportunitiesFn } from './opportunity.newborn-stamping.js';
|
|
27
|
+
import { type OpportunityGraphDeps, type OpportunityGraphThresholdOverrides, type OpportunityHydeGenerator, type OpportunityEvaluatorLike } from './opportunity.graph.shared.js';
|
|
51
28
|
export type { QueueOpportunityNotificationFn } from './opportunity.lifecycle.js';
|
|
52
29
|
export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput } from './opportunity.newborn-stamping.js';
|
|
53
30
|
export { buildPrioritizedNegotiationIntents } from './opportunity.existing-negotiation.js';
|
|
54
|
-
export
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Error text can include provider response bodies, URLs, and credentials. Keep
|
|
60
|
-
* observability useful by retaining only a conservative error class at this
|
|
61
|
-
* boundary; detailed errors are intentionally not emitted from graph traces.
|
|
62
|
-
*/
|
|
63
|
-
export declare function safeOpportunityGraphError(_error: unknown): string;
|
|
64
|
-
/** Input shape for the HyDE graph invoke call (query-based embedding). */
|
|
65
|
-
export interface HydeGeneratorInvokeInput {
|
|
66
|
-
sourceType: 'query';
|
|
67
|
-
sourceText: string;
|
|
68
|
-
forceRegenerate?: boolean;
|
|
69
|
-
profileContext?: string;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* Builds a compact text summary of the discoverer's profile and active intents
|
|
73
|
-
* for use as profileContext in HyDE generation.
|
|
74
|
-
* @param profile - The discoverer's profile data (identity, attributes)
|
|
75
|
-
* @param intents - The discoverer's indexed intents (capped at 5)
|
|
76
|
-
* @returns A context string, or undefined if no meaningful data is available
|
|
77
|
-
*/
|
|
78
|
-
export declare function buildDiscovererContext(profile: SourceProfileData | null | undefined, intents: IndexedIntent[] | undefined): string | undefined;
|
|
31
|
+
export { buildDiscovererContext, safeOpportunityGraphError, type HydeGeneratorInvokeInput, type OpportunityEvaluatorLike, type OpportunityGraphDeps, type OpportunityGraphThresholdOverrides, } from './opportunity.graph.shared.js';
|
|
32
|
+
import { approveIntroduction, createIntroduction, deleteOpportunity, negotiateExisting, readOpportunities, sendOpportunity, updateOpportunityStatus } from './opportunity.graph.modes.js';
|
|
33
|
+
export { approveIntroduction, createIntroduction, deleteOpportunity, evaluateIntroduction, negotiateExisting, readOpportunities, sendOpportunity, updateOpportunityStatus, validateIntroduction, type IntroductionRequest, type OpportunityMutationOutcome, type OpportunityMutationRequest, } from './opportunity.graph.modes.js';
|
|
79
34
|
/**
|
|
80
35
|
* Factory class to build and compile the Opportunity Graph.
|
|
81
36
|
* Uses dependency injection for testability.
|
|
37
|
+
*
|
|
38
|
+
* `deps` is public so callers can invoke the non-discovery modes
|
|
39
|
+
* (`readOpportunities`, `sendOpportunity`, …) against the same wiring.
|
|
82
40
|
*/
|
|
83
41
|
export declare class OpportunityGraphFactory {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
private optionalEvaluator?;
|
|
88
|
-
private queueNotification?;
|
|
89
|
-
private negotiationGraph?;
|
|
42
|
+
/** Resolved dependency bag shared by the graph nodes and the standalone modes. */
|
|
43
|
+
readonly deps: OpportunityGraphDeps;
|
|
44
|
+
constructor(database: OpportunityGraphDatabase, embedder: Embedder, hydeGenerator: OpportunityHydeGenerator, optionalEvaluator?: OpportunityEvaluatorLike, queueNotification?: QueueOpportunityNotificationFn, negotiationGraph?: NegotiationGraphLike,
|
|
90
45
|
/**
|
|
91
46
|
* Used on the chat path to decide whether to wait for the user's personal
|
|
92
47
|
* agent (long timeout) or fall back to the system agent immediately
|
|
93
48
|
* (short timeout). Without it, the chat path always uses a short timeout.
|
|
94
49
|
*/
|
|
95
|
-
|
|
50
|
+
agentDispatcher?: Pick<AgentDispatcher, 'hasExternalAgent'>,
|
|
96
51
|
/**
|
|
97
52
|
* Callback to enqueue a negotiate_existing job for an opportunity.
|
|
98
53
|
* When provided, negotiate_existing mode uses this to queue follow-up
|
|
99
54
|
* negotiations after introducer approval.
|
|
100
55
|
*/
|
|
101
|
-
|
|
56
|
+
queueNegotiateExisting?: (opportunityId: string, userId: string) => Promise<void>,
|
|
102
57
|
/** Host-side P4b stamper. Omitted by manual/introducer/enrichment roots. */
|
|
103
|
-
|
|
58
|
+
stampNewbornOpportunities?: StampNewbornOpportunitiesFn,
|
|
104
59
|
/** Eval/test-only overrides; production composition resolves from environment. */
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
60
|
+
thresholdOverrides?: OpportunityGraphThresholdOverrides);
|
|
61
|
+
/** List the caller's opportunities. Delegates to {@link readOpportunities}. */
|
|
62
|
+
readOpportunities(request: Parameters<typeof readOpportunities>[1]): Promise<{
|
|
63
|
+
readResult: {
|
|
64
|
+
count: number;
|
|
65
|
+
message: string;
|
|
66
|
+
opportunities: {
|
|
67
|
+
id: string;
|
|
68
|
+
indexName: string;
|
|
69
|
+
connectedWith: string[];
|
|
70
|
+
suggestedBy: string | null;
|
|
71
|
+
reasoning: string;
|
|
72
|
+
status: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
73
|
+
category: string;
|
|
74
|
+
confidence: number | null;
|
|
75
|
+
source: string | null;
|
|
76
|
+
}[];
|
|
77
|
+
};
|
|
78
|
+
}>;
|
|
79
|
+
/** Change an opportunity's status. Delegates to {@link updateOpportunityStatus}. */
|
|
80
|
+
updateOpportunityStatus(request: Parameters<typeof updateOpportunityStatus>[1]): Promise<import("./opportunity.graph.modes.js").OpportunityMutationOutcome>;
|
|
81
|
+
/** Expire an opportunity. Delegates to {@link deleteOpportunity}. */
|
|
82
|
+
deleteOpportunity(request: Parameters<typeof deleteOpportunity>[1]): Promise<import("./opportunity.graph.modes.js").OpportunityMutationOutcome>;
|
|
83
|
+
/** Promote a latent or draft opportunity to pending. Delegates to {@link sendOpportunity}. */
|
|
84
|
+
sendOpportunity(request: Parameters<typeof sendOpportunity>[1]): Promise<import("./opportunity.graph.modes.js").OpportunityMutationOutcome>;
|
|
85
|
+
/** Approve an introducer-pattern opportunity. Delegates to {@link approveIntroduction}. */
|
|
86
|
+
approveIntroduction(request: Parameters<typeof approveIntroduction>[1]): Promise<import("./opportunity.graph.modes.js").OpportunityMutationOutcome>;
|
|
87
|
+
/** Negotiate an existing opportunity. Delegates to {@link negotiateExisting}. */
|
|
88
|
+
negotiateExisting(request: Parameters<typeof negotiateExisting>[1]): Promise<{
|
|
89
|
+
negotiationContinuationReceipt?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt;
|
|
90
|
+
error?: string;
|
|
91
|
+
}>;
|
|
92
|
+
/** Validate → evaluate → persist an introduction. Delegates to {@link createIntroduction}. */
|
|
93
|
+
createIntroduction(request: Parameters<typeof createIntroduction>[1]): Promise<{
|
|
94
|
+
error?: string;
|
|
95
|
+
trace?: Array<{
|
|
96
|
+
node: string;
|
|
97
|
+
detail?: string;
|
|
98
|
+
data?: Record<string, unknown>;
|
|
117
99
|
}>;
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
100
|
+
opportunities: never[];
|
|
101
|
+
evaluatedOpportunities: never[];
|
|
102
|
+
agentTimings: never[];
|
|
103
|
+
} | {
|
|
104
|
+
opportunities: never[];
|
|
105
|
+
persistenceOutcome: {
|
|
106
|
+
evaluatedCount: number;
|
|
107
|
+
createdCount: number;
|
|
108
|
+
reactivatedCount: number;
|
|
109
|
+
sameTriggerDuplicateSuppressions: number;
|
|
110
|
+
pairActiveNegotiationSuppressions: number;
|
|
111
|
+
crossTriggerAllowedCount: number;
|
|
112
|
+
finalAtomicConflictCount: number;
|
|
113
|
+
};
|
|
114
|
+
existingBetweenActors?: undefined;
|
|
115
|
+
trace?: undefined;
|
|
116
|
+
error?: undefined;
|
|
117
|
+
evaluatedOpportunities: never[];
|
|
118
|
+
agentTimings: never[];
|
|
119
|
+
introductionContext?: undefined;
|
|
120
|
+
options?: undefined;
|
|
121
|
+
} | {
|
|
122
|
+
opportunities: import("../../shared/interfaces/database.entities.js").Opportunity[];
|
|
123
|
+
existingBetweenActors: {
|
|
124
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
125
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
126
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
127
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
128
|
+
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
129
|
+
existingTriggerIntentId?: string;
|
|
130
|
+
}[];
|
|
131
|
+
persistenceOutcome: {
|
|
132
|
+
evaluatedCount: number;
|
|
133
|
+
createdCount: number;
|
|
134
|
+
reactivatedCount: number;
|
|
135
|
+
sameTriggerDuplicateSuppressions: number;
|
|
136
|
+
pairActiveNegotiationSuppressions: number;
|
|
137
|
+
crossTriggerAllowedCount: number;
|
|
138
|
+
finalAtomicConflictCount: number;
|
|
139
|
+
};
|
|
140
|
+
trace: {
|
|
141
|
+
node: string;
|
|
142
|
+
detail: string;
|
|
143
|
+
data: {
|
|
144
|
+
created: number;
|
|
145
|
+
reactivated: number;
|
|
146
|
+
existingSkipped: number;
|
|
147
|
+
totalOutput: number;
|
|
148
|
+
persistenceOutcome: {
|
|
149
|
+
evaluatedCount: number;
|
|
150
|
+
createdCount: number;
|
|
151
|
+
reactivatedCount: number;
|
|
152
|
+
sameTriggerDuplicateSuppressions: number;
|
|
153
|
+
pairActiveNegotiationSuppressions: number;
|
|
154
|
+
crossTriggerAllowedCount: number;
|
|
155
|
+
finalAtomicConflictCount: number;
|
|
156
|
+
};
|
|
157
|
+
durationMs: number;
|
|
158
|
+
};
|
|
159
|
+
}[];
|
|
160
|
+
error?: undefined;
|
|
161
|
+
evaluatedOpportunities: never[];
|
|
162
|
+
agentTimings: never[];
|
|
163
|
+
introductionContext?: undefined;
|
|
164
|
+
options?: undefined;
|
|
165
|
+
} | {
|
|
166
|
+
opportunities: never[];
|
|
167
|
+
existingBetweenActors: never[];
|
|
168
|
+
error: string;
|
|
169
|
+
trace: {
|
|
170
|
+
node: string;
|
|
171
|
+
detail: string;
|
|
172
|
+
data: {
|
|
173
|
+
error: string;
|
|
174
|
+
};
|
|
175
|
+
}[];
|
|
176
|
+
persistenceOutcome?: undefined;
|
|
177
|
+
evaluatedOpportunities: never[];
|
|
178
|
+
agentTimings: never[];
|
|
179
|
+
introductionContext?: undefined;
|
|
180
|
+
options?: undefined;
|
|
181
|
+
} | {
|
|
182
|
+
opportunities: never[];
|
|
183
|
+
persistenceOutcome: {
|
|
184
|
+
evaluatedCount: number;
|
|
185
|
+
createdCount: number;
|
|
186
|
+
reactivatedCount: number;
|
|
187
|
+
sameTriggerDuplicateSuppressions: number;
|
|
188
|
+
pairActiveNegotiationSuppressions: number;
|
|
189
|
+
crossTriggerAllowedCount: number;
|
|
190
|
+
finalAtomicConflictCount: number;
|
|
191
|
+
};
|
|
192
|
+
existingBetweenActors?: undefined;
|
|
193
|
+
trace?: undefined;
|
|
194
|
+
error: string;
|
|
195
|
+
evaluatedOpportunities: never[];
|
|
196
|
+
agentTimings: never[];
|
|
197
|
+
introductionContext?: undefined;
|
|
198
|
+
options?: undefined;
|
|
199
|
+
} | {
|
|
200
|
+
opportunities: import("../../shared/interfaces/database.entities.js").Opportunity[];
|
|
201
|
+
existingBetweenActors: {
|
|
202
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
203
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
204
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
205
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
206
|
+
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
207
|
+
existingTriggerIntentId?: string;
|
|
208
|
+
}[];
|
|
209
|
+
persistenceOutcome: {
|
|
210
|
+
evaluatedCount: number;
|
|
211
|
+
createdCount: number;
|
|
212
|
+
reactivatedCount: number;
|
|
213
|
+
sameTriggerDuplicateSuppressions: number;
|
|
214
|
+
pairActiveNegotiationSuppressions: number;
|
|
215
|
+
crossTriggerAllowedCount: number;
|
|
216
|
+
finalAtomicConflictCount: number;
|
|
217
|
+
};
|
|
218
|
+
trace: {
|
|
219
|
+
node: string;
|
|
220
|
+
detail: string;
|
|
221
|
+
data: {
|
|
222
|
+
created: number;
|
|
223
|
+
reactivated: number;
|
|
224
|
+
existingSkipped: number;
|
|
225
|
+
totalOutput: number;
|
|
226
|
+
persistenceOutcome: {
|
|
227
|
+
evaluatedCount: number;
|
|
228
|
+
createdCount: number;
|
|
229
|
+
reactivatedCount: number;
|
|
230
|
+
sameTriggerDuplicateSuppressions: number;
|
|
231
|
+
pairActiveNegotiationSuppressions: number;
|
|
232
|
+
crossTriggerAllowedCount: number;
|
|
233
|
+
finalAtomicConflictCount: number;
|
|
234
|
+
};
|
|
235
|
+
durationMs: number;
|
|
236
|
+
};
|
|
237
|
+
}[];
|
|
238
|
+
error: string;
|
|
239
|
+
evaluatedOpportunities: never[];
|
|
240
|
+
agentTimings: never[];
|
|
241
|
+
introductionContext?: undefined;
|
|
242
|
+
options?: undefined;
|
|
243
|
+
} | {
|
|
244
|
+
opportunities: never[];
|
|
245
|
+
persistenceOutcome: {
|
|
246
|
+
evaluatedCount: number;
|
|
247
|
+
createdCount: number;
|
|
248
|
+
reactivatedCount: number;
|
|
249
|
+
sameTriggerDuplicateSuppressions: number;
|
|
250
|
+
pairActiveNegotiationSuppressions: number;
|
|
251
|
+
crossTriggerAllowedCount: number;
|
|
252
|
+
finalAtomicConflictCount: number;
|
|
253
|
+
};
|
|
254
|
+
existingBetweenActors?: undefined;
|
|
255
|
+
trace: {
|
|
256
|
+
node: string;
|
|
257
|
+
detail: string;
|
|
258
|
+
data: {
|
|
259
|
+
error: string;
|
|
260
|
+
};
|
|
261
|
+
}[];
|
|
262
|
+
error?: undefined;
|
|
263
|
+
evaluatedOpportunities: {
|
|
264
|
+
actors: import("../domain/opportunity.state.js").EvaluatedOpportunityActor[];
|
|
265
|
+
score: number;
|
|
266
|
+
reasoning: string;
|
|
267
|
+
}[];
|
|
268
|
+
introductionContext: {
|
|
269
|
+
createdByName: string | undefined;
|
|
270
|
+
};
|
|
271
|
+
options: {
|
|
272
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
273
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
274
|
+
limit?: number;
|
|
275
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
276
|
+
hydeDescription?: string;
|
|
277
|
+
existingOpportunities?: string;
|
|
278
|
+
conversationId?: string;
|
|
279
|
+
negotiateTimeoutMs?: number;
|
|
280
|
+
};
|
|
281
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
282
|
+
} | {
|
|
283
|
+
opportunities: never[];
|
|
284
|
+
persistenceOutcome?: undefined;
|
|
285
|
+
existingBetweenActors?: undefined;
|
|
286
|
+
trace: {
|
|
287
|
+
node: string;
|
|
288
|
+
detail: string;
|
|
289
|
+
data: {
|
|
290
|
+
error: string;
|
|
291
|
+
};
|
|
292
|
+
}[];
|
|
293
|
+
error?: undefined;
|
|
294
|
+
evaluatedOpportunities: {
|
|
295
|
+
actors: import("../domain/opportunity.state.js").EvaluatedOpportunityActor[];
|
|
296
|
+
score: number;
|
|
297
|
+
reasoning: string;
|
|
298
|
+
}[];
|
|
299
|
+
introductionContext: {
|
|
300
|
+
createdByName: string | undefined;
|
|
301
|
+
};
|
|
302
|
+
options: {
|
|
303
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
304
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
305
|
+
limit?: number;
|
|
306
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
307
|
+
hydeDescription?: string;
|
|
308
|
+
existingOpportunities?: string;
|
|
309
|
+
conversationId?: string;
|
|
310
|
+
negotiateTimeoutMs?: number;
|
|
311
|
+
};
|
|
312
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
313
|
+
} | {
|
|
314
|
+
opportunities: import("../../shared/interfaces/database.entities.js").Opportunity[];
|
|
315
|
+
existingBetweenActors: {
|
|
316
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
317
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
318
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
319
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
320
|
+
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
321
|
+
existingTriggerIntentId?: string;
|
|
322
|
+
}[];
|
|
323
|
+
persistenceOutcome: {
|
|
324
|
+
evaluatedCount: number;
|
|
325
|
+
createdCount: number;
|
|
326
|
+
reactivatedCount: number;
|
|
327
|
+
sameTriggerDuplicateSuppressions: number;
|
|
328
|
+
pairActiveNegotiationSuppressions: number;
|
|
329
|
+
crossTriggerAllowedCount: number;
|
|
330
|
+
finalAtomicConflictCount: number;
|
|
331
|
+
};
|
|
332
|
+
trace: {
|
|
333
|
+
node: string;
|
|
334
|
+
detail: string;
|
|
335
|
+
data: {
|
|
336
|
+
created: number;
|
|
337
|
+
reactivated: number;
|
|
338
|
+
existingSkipped: number;
|
|
339
|
+
totalOutput: number;
|
|
340
|
+
persistenceOutcome: {
|
|
341
|
+
evaluatedCount: number;
|
|
342
|
+
createdCount: number;
|
|
343
|
+
reactivatedCount: number;
|
|
344
|
+
sameTriggerDuplicateSuppressions: number;
|
|
345
|
+
pairActiveNegotiationSuppressions: number;
|
|
346
|
+
crossTriggerAllowedCount: number;
|
|
347
|
+
finalAtomicConflictCount: number;
|
|
348
|
+
};
|
|
349
|
+
durationMs: number;
|
|
350
|
+
};
|
|
351
|
+
}[];
|
|
352
|
+
error?: undefined;
|
|
353
|
+
evaluatedOpportunities: {
|
|
354
|
+
actors: import("../domain/opportunity.state.js").EvaluatedOpportunityActor[];
|
|
355
|
+
score: number;
|
|
356
|
+
reasoning: string;
|
|
357
|
+
}[];
|
|
358
|
+
introductionContext: {
|
|
359
|
+
createdByName: string | undefined;
|
|
360
|
+
};
|
|
361
|
+
options: {
|
|
362
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
363
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
364
|
+
limit?: number;
|
|
365
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
366
|
+
hydeDescription?: string;
|
|
367
|
+
existingOpportunities?: string;
|
|
368
|
+
conversationId?: string;
|
|
369
|
+
negotiateTimeoutMs?: number;
|
|
370
|
+
};
|
|
371
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
372
|
+
} | {
|
|
373
|
+
opportunities: never[];
|
|
374
|
+
existingBetweenActors: never[];
|
|
375
|
+
error: string;
|
|
376
|
+
trace: {
|
|
377
|
+
node: string;
|
|
378
|
+
detail: string;
|
|
379
|
+
data: {
|
|
380
|
+
error: string;
|
|
381
|
+
};
|
|
382
|
+
}[];
|
|
383
|
+
persistenceOutcome?: undefined;
|
|
384
|
+
evaluatedOpportunities: {
|
|
385
|
+
actors: import("../domain/opportunity.state.js").EvaluatedOpportunityActor[];
|
|
386
|
+
score: number;
|
|
387
|
+
reasoning: string;
|
|
388
|
+
}[];
|
|
389
|
+
introductionContext: {
|
|
390
|
+
createdByName: string | undefined;
|
|
391
|
+
};
|
|
392
|
+
options: {
|
|
393
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
394
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
395
|
+
limit?: number;
|
|
396
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
397
|
+
hydeDescription?: string;
|
|
398
|
+
existingOpportunities?: string;
|
|
399
|
+
conversationId?: string;
|
|
400
|
+
negotiateTimeoutMs?: number;
|
|
401
|
+
};
|
|
402
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
403
|
+
} | {
|
|
404
|
+
opportunities: never[];
|
|
405
|
+
persistenceOutcome: {
|
|
406
|
+
evaluatedCount: number;
|
|
407
|
+
createdCount: number;
|
|
408
|
+
reactivatedCount: number;
|
|
409
|
+
sameTriggerDuplicateSuppressions: number;
|
|
410
|
+
pairActiveNegotiationSuppressions: number;
|
|
411
|
+
crossTriggerAllowedCount: number;
|
|
412
|
+
finalAtomicConflictCount: number;
|
|
413
|
+
};
|
|
414
|
+
existingBetweenActors?: undefined;
|
|
415
|
+
trace?: undefined;
|
|
416
|
+
error?: undefined;
|
|
417
|
+
evaluatedOpportunities: import("../domain/opportunity.state.js").EvaluatedOpportunity[];
|
|
418
|
+
introductionContext: {
|
|
419
|
+
createdByName: string | undefined;
|
|
420
|
+
};
|
|
421
|
+
options: {
|
|
422
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
423
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
424
|
+
limit?: number;
|
|
425
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
426
|
+
hydeDescription?: string;
|
|
427
|
+
existingOpportunities?: string;
|
|
428
|
+
conversationId?: string;
|
|
429
|
+
negotiateTimeoutMs?: number;
|
|
430
|
+
};
|
|
431
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
432
|
+
} | {
|
|
433
|
+
opportunities: never[];
|
|
434
|
+
persistenceOutcome?: undefined;
|
|
435
|
+
existingBetweenActors?: undefined;
|
|
436
|
+
trace?: undefined;
|
|
437
|
+
error?: undefined;
|
|
438
|
+
evaluatedOpportunities: import("../domain/opportunity.state.js").EvaluatedOpportunity[];
|
|
439
|
+
introductionContext: {
|
|
440
|
+
createdByName: string | undefined;
|
|
441
|
+
};
|
|
442
|
+
options: {
|
|
443
|
+
initialStatus: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
444
|
+
negotiationContinuation?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationExecution;
|
|
445
|
+
limit?: number;
|
|
446
|
+
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
447
|
+
hydeDescription?: string;
|
|
448
|
+
existingOpportunities?: string;
|
|
449
|
+
conversationId?: string;
|
|
450
|
+
negotiateTimeoutMs?: number;
|
|
451
|
+
};
|
|
452
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
453
|
+
}>;
|
|
135
454
|
createGraph(): import("@langchain/langgraph").CompiledStateGraph<{
|
|
136
|
-
userId: Id<"users">;
|
|
455
|
+
userId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
137
456
|
searchQuery: string | undefined;
|
|
138
|
-
networkId: Id<"networks"> | undefined;
|
|
139
|
-
indexScope: Id<"networks">[] | undefined;
|
|
140
|
-
triggerIntentId: Id<"intents"> | undefined;
|
|
141
|
-
targetUserId: Id<"users"> | undefined;
|
|
142
|
-
onBehalfOfUserId: Id<"users"> | undefined;
|
|
457
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks"> | undefined;
|
|
458
|
+
indexScope: import("./opportunity.graph.shared.js").Id<"networks">[] | undefined;
|
|
459
|
+
triggerIntentId: import("./opportunity.graph.shared.js").Id<"intents"> | undefined;
|
|
460
|
+
targetUserId: import("./opportunity.graph.shared.js").Id<"users"> | undefined;
|
|
461
|
+
onBehalfOfUserId: import("./opportunity.graph.shared.js").Id<"users"> | undefined;
|
|
143
462
|
options: import("../domain/opportunity.state.js").OpportunityGraphOptions;
|
|
144
|
-
operationMode: "
|
|
145
|
-
introductionEntities: EvaluatorEntity[];
|
|
463
|
+
operationMode: "send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction";
|
|
464
|
+
introductionEntities: import("./opportunity.evaluator.js").EvaluatorEntity[];
|
|
146
465
|
introductionHint: string | undefined;
|
|
147
|
-
requiredNetworkId: Id<"networks"> | undefined;
|
|
466
|
+
requiredNetworkId: import("./opportunity.graph.shared.js").Id<"networks"> | undefined;
|
|
148
467
|
introductionContext: {
|
|
149
468
|
createdByName?: string;
|
|
150
469
|
} | undefined;
|
|
151
470
|
opportunityId: string | undefined;
|
|
152
471
|
newStatus: string | undefined;
|
|
153
|
-
indexedIntents: IndexedIntent[];
|
|
154
|
-
userNetworks: Id<"networks">[];
|
|
155
|
-
targetNetworks: TargetNetwork[];
|
|
472
|
+
indexedIntents: import("../domain/opportunity.state.js").IndexedIntent[];
|
|
473
|
+
userNetworks: import("./opportunity.graph.shared.js").Id<"networks">[];
|
|
474
|
+
targetNetworks: import("../domain/opportunity.state.js").TargetNetwork[];
|
|
156
475
|
indexRelevancyScores: Record<string, number>;
|
|
157
476
|
discoverySource: "intent" | "context";
|
|
158
|
-
resolvedTriggerIntentId: Id<"intents"> | undefined;
|
|
159
|
-
sourceProfile: SourceProfileData | null;
|
|
477
|
+
resolvedTriggerIntentId: import("./opportunity.graph.shared.js").Id<"intents"> | undefined;
|
|
478
|
+
sourceProfile: import("../domain/opportunity.state.js").SourceProfileData | null;
|
|
160
479
|
sourcePremises: {
|
|
161
|
-
premiseId: Id<"premises">;
|
|
480
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
162
481
|
embedding: number[];
|
|
163
482
|
}[];
|
|
164
483
|
sourceContexts: {
|
|
165
484
|
contextId: string;
|
|
166
|
-
networkId: Id<"networks">;
|
|
485
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
167
486
|
text: string;
|
|
168
487
|
embedding: number[];
|
|
169
488
|
}[];
|
|
@@ -171,22 +490,22 @@ export declare class OpportunityGraphFactory {
|
|
|
171
490
|
createIntentSuggested: boolean;
|
|
172
491
|
suggestedIntentDescription: string | undefined;
|
|
173
492
|
hydeEmbeddings: Record<string, number[]>;
|
|
174
|
-
candidates: CandidateMatch[];
|
|
175
|
-
remainingCandidates: CandidateMatch[];
|
|
493
|
+
candidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
494
|
+
remainingCandidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
176
495
|
discoveryId: string | null;
|
|
177
496
|
evaluatedCandidates: import("../domain/opportunity.state.js").EvaluatedCandidate[];
|
|
178
|
-
evaluatedOpportunities: EvaluatedOpportunity[];
|
|
179
|
-
opportunities: Opportunity[];
|
|
497
|
+
evaluatedOpportunities: import("../domain/opportunity.state.js").EvaluatedOpportunity[];
|
|
498
|
+
opportunities: import("../../shared/interfaces/database.entities.js").Opportunity[];
|
|
180
499
|
existingBetweenActors: {
|
|
181
|
-
candidateUserId: Id<"users">;
|
|
182
|
-
networkId: Id<"networks">;
|
|
183
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
184
|
-
existingStatus?: OpportunityStatus;
|
|
500
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
501
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
502
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
503
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
185
504
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
186
505
|
existingTriggerIntentId?: string;
|
|
187
506
|
}[];
|
|
188
507
|
persistenceOutcome: import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined;
|
|
189
|
-
negotiationContinuationReceipt: NegotiationContinuationReceipt | undefined;
|
|
508
|
+
negotiationContinuationReceipt: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined;
|
|
190
509
|
error: string | undefined;
|
|
191
510
|
readResult: {
|
|
192
511
|
count: number;
|
|
@@ -216,19 +535,9 @@ export declare class OpportunityGraphFactory {
|
|
|
216
535
|
detail?: string;
|
|
217
536
|
data?: Record<string, unknown>;
|
|
218
537
|
}[];
|
|
219
|
-
agentTimings: DebugMetaAgent[];
|
|
538
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
220
539
|
discoveryNegotiations: {
|
|
221
|
-
counterpartyId: string;
|
|
222
|
-
counterpartyHint: string;
|
|
223
540
|
indexContext: string;
|
|
224
|
-
turns: {
|
|
225
|
-
reasoning: string;
|
|
226
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
227
|
-
suggestedRoles: {
|
|
228
|
-
ownUser: "agent" | "patient" | "peer";
|
|
229
|
-
otherUser: "agent" | "patient" | "peer";
|
|
230
|
-
};
|
|
231
|
-
}[];
|
|
232
541
|
outcome: {
|
|
233
542
|
reasoning: string;
|
|
234
543
|
hasOpportunity: boolean;
|
|
@@ -238,22 +547,32 @@ export declare class OpportunityGraphFactory {
|
|
|
238
547
|
role: "agent" | "patient" | "peer";
|
|
239
548
|
}[] | undefined;
|
|
240
549
|
};
|
|
550
|
+
counterpartyHint: string;
|
|
551
|
+
counterpartyId: string;
|
|
552
|
+
turns: {
|
|
553
|
+
reasoning: string;
|
|
554
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
555
|
+
suggestedRoles: {
|
|
556
|
+
ownUser: "agent" | "patient" | "peer";
|
|
557
|
+
otherUser: "agent" | "patient" | "peer";
|
|
558
|
+
};
|
|
559
|
+
}[];
|
|
241
560
|
seedAssessmentScore?: number | undefined;
|
|
242
561
|
}[];
|
|
243
|
-
discoverySummary: import("../../
|
|
562
|
+
discoverySummary: import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null;
|
|
244
563
|
}, {
|
|
245
|
-
userId?: Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">> | undefined;
|
|
564
|
+
userId?: import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users">> | undefined;
|
|
246
565
|
searchQuery?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
247
|
-
networkId?: Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined;
|
|
248
|
-
indexScope?: Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[] | undefined> | undefined;
|
|
249
|
-
triggerIntentId?: Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined;
|
|
250
|
-
targetUserId?: Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined;
|
|
251
|
-
onBehalfOfUserId?: Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined;
|
|
566
|
+
networkId?: import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined;
|
|
567
|
+
indexScope?: import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[] | undefined> | undefined;
|
|
568
|
+
triggerIntentId?: import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined;
|
|
569
|
+
targetUserId?: import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined;
|
|
570
|
+
onBehalfOfUserId?: import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined;
|
|
252
571
|
options?: import("../domain/opportunity.state.js").OpportunityGraphOptions | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityGraphOptions> | undefined;
|
|
253
|
-
operationMode?: "
|
|
254
|
-
introductionEntities?: EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]> | undefined;
|
|
572
|
+
operationMode?: "send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction"> | undefined;
|
|
573
|
+
introductionEntities?: import("./opportunity.evaluator.js").EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.evaluator.js").EvaluatorEntity[]> | undefined;
|
|
255
574
|
introductionHint?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
256
|
-
requiredNetworkId?: Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined;
|
|
575
|
+
requiredNetworkId?: import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined;
|
|
257
576
|
introductionContext?: {
|
|
258
577
|
createdByName?: string;
|
|
259
578
|
} | import("@langchain/langgraph").OverwriteValue<{
|
|
@@ -261,28 +580,28 @@ export declare class OpportunityGraphFactory {
|
|
|
261
580
|
} | undefined> | undefined;
|
|
262
581
|
opportunityId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
263
582
|
newStatus?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
264
|
-
indexedIntents?: IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<IndexedIntent[]> | undefined;
|
|
265
|
-
userNetworks?: Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[]> | undefined;
|
|
266
|
-
targetNetworks?: TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<TargetNetwork[]> | undefined;
|
|
583
|
+
indexedIntents?: import("../domain/opportunity.state.js").IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").IndexedIntent[]> | undefined;
|
|
584
|
+
userNetworks?: import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[]> | undefined;
|
|
585
|
+
targetNetworks?: import("../domain/opportunity.state.js").TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").TargetNetwork[]> | undefined;
|
|
267
586
|
indexRelevancyScores?: Record<string, number> | import("@langchain/langgraph").OverwriteValue<Record<string, number>> | undefined;
|
|
268
587
|
discoverySource?: "intent" | "context" | import("@langchain/langgraph").OverwriteValue<"intent" | "context"> | undefined;
|
|
269
|
-
resolvedTriggerIntentId?: Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined;
|
|
270
|
-
sourceProfile?: SourceProfileData | import("@langchain/langgraph").OverwriteValue<SourceProfileData | null> | null | undefined;
|
|
588
|
+
resolvedTriggerIntentId?: import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined;
|
|
589
|
+
sourceProfile?: import("../domain/opportunity.state.js").SourceProfileData | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").SourceProfileData | null> | null | undefined;
|
|
271
590
|
sourcePremises?: {
|
|
272
|
-
premiseId: Id<"premises">;
|
|
591
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
273
592
|
embedding: number[];
|
|
274
593
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
275
|
-
premiseId: Id<"premises">;
|
|
594
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
276
595
|
embedding: number[];
|
|
277
596
|
}[]> | undefined;
|
|
278
597
|
sourceContexts?: {
|
|
279
598
|
contextId: string;
|
|
280
|
-
networkId: Id<"networks">;
|
|
599
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
281
600
|
text: string;
|
|
282
601
|
embedding: number[];
|
|
283
602
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
284
603
|
contextId: string;
|
|
285
|
-
networkId: Id<"networks">;
|
|
604
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
286
605
|
text: string;
|
|
287
606
|
embedding: number[];
|
|
288
607
|
}[]> | undefined;
|
|
@@ -290,29 +609,29 @@ export declare class OpportunityGraphFactory {
|
|
|
290
609
|
createIntentSuggested?: boolean | import("@langchain/langgraph").OverwriteValue<boolean> | undefined;
|
|
291
610
|
suggestedIntentDescription?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
292
611
|
hydeEmbeddings?: Record<string, number[]> | import("@langchain/langgraph").OverwriteValue<Record<string, number[]>> | undefined;
|
|
293
|
-
candidates?: CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]> | undefined;
|
|
294
|
-
remainingCandidates?: CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]> | undefined;
|
|
612
|
+
candidates?: import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]> | undefined;
|
|
613
|
+
remainingCandidates?: import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]> | undefined;
|
|
295
614
|
discoveryId?: string | import("@langchain/langgraph").OverwriteValue<string | null> | null | undefined;
|
|
296
615
|
evaluatedCandidates?: import("../domain/opportunity.state.js").EvaluatedCandidate[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedCandidate[]> | undefined;
|
|
297
|
-
evaluatedOpportunities?: EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<EvaluatedOpportunity[]> | undefined;
|
|
298
|
-
opportunities?: Opportunity[] | import("@langchain/langgraph").OverwriteValue<Opportunity[]> | undefined;
|
|
616
|
+
evaluatedOpportunities?: import("../domain/opportunity.state.js").EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedOpportunity[]> | undefined;
|
|
617
|
+
opportunities?: import("../../shared/interfaces/database.entities.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").Opportunity[]> | undefined;
|
|
299
618
|
existingBetweenActors?: {
|
|
300
|
-
candidateUserId: Id<"users">;
|
|
301
|
-
networkId: Id<"networks">;
|
|
302
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
303
|
-
existingStatus?: OpportunityStatus;
|
|
619
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
620
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
621
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
622
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
304
623
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
305
624
|
existingTriggerIntentId?: string;
|
|
306
625
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
307
|
-
candidateUserId: Id<"users">;
|
|
308
|
-
networkId: Id<"networks">;
|
|
309
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
310
|
-
existingStatus?: OpportunityStatus;
|
|
626
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
627
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
628
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
629
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
311
630
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
312
631
|
existingTriggerIntentId?: string;
|
|
313
632
|
}[]> | undefined;
|
|
314
633
|
persistenceOutcome?: import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined> | undefined;
|
|
315
|
-
negotiationContinuationReceipt?: NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined;
|
|
634
|
+
negotiationContinuationReceipt?: import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.negotiation.js").NegotiationContinuationReceipt | undefined> | undefined;
|
|
316
635
|
error?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
317
636
|
readResult?: {
|
|
318
637
|
count: number;
|
|
@@ -367,19 +686,9 @@ export declare class OpportunityGraphFactory {
|
|
|
367
686
|
detail?: string;
|
|
368
687
|
data?: Record<string, unknown>;
|
|
369
688
|
}[]> | undefined;
|
|
370
|
-
agentTimings?: DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]> | undefined;
|
|
689
|
+
agentTimings?: import("../../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../../chat/chat-streaming.types.js").DebugMetaAgent[]> | undefined;
|
|
371
690
|
discoveryNegotiations?: {
|
|
372
|
-
counterpartyId: string;
|
|
373
|
-
counterpartyHint: string;
|
|
374
691
|
indexContext: string;
|
|
375
|
-
turns: {
|
|
376
|
-
reasoning: string;
|
|
377
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
378
|
-
suggestedRoles: {
|
|
379
|
-
ownUser: "agent" | "patient" | "peer";
|
|
380
|
-
otherUser: "agent" | "patient" | "peer";
|
|
381
|
-
};
|
|
382
|
-
}[];
|
|
383
692
|
outcome: {
|
|
384
693
|
reasoning: string;
|
|
385
694
|
hasOpportunity: boolean;
|
|
@@ -389,11 +698,8 @@ export declare class OpportunityGraphFactory {
|
|
|
389
698
|
role: "agent" | "patient" | "peer";
|
|
390
699
|
}[] | undefined;
|
|
391
700
|
};
|
|
392
|
-
seedAssessmentScore?: number | undefined;
|
|
393
|
-
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
394
|
-
counterpartyId: string;
|
|
395
701
|
counterpartyHint: string;
|
|
396
|
-
|
|
702
|
+
counterpartyId: string;
|
|
397
703
|
turns: {
|
|
398
704
|
reasoning: string;
|
|
399
705
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -402,6 +708,9 @@ export declare class OpportunityGraphFactory {
|
|
|
402
708
|
otherUser: "agent" | "patient" | "peer";
|
|
403
709
|
};
|
|
404
710
|
}[];
|
|
711
|
+
seedAssessmentScore?: number | undefined;
|
|
712
|
+
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
713
|
+
indexContext: string;
|
|
405
714
|
outcome: {
|
|
406
715
|
reasoning: string;
|
|
407
716
|
hasOpportunity: boolean;
|
|
@@ -411,22 +720,32 @@ export declare class OpportunityGraphFactory {
|
|
|
411
720
|
role: "agent" | "patient" | "peer";
|
|
412
721
|
}[] | undefined;
|
|
413
722
|
};
|
|
723
|
+
counterpartyHint: string;
|
|
724
|
+
counterpartyId: string;
|
|
725
|
+
turns: {
|
|
726
|
+
reasoning: string;
|
|
727
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
728
|
+
suggestedRoles: {
|
|
729
|
+
ownUser: "agent" | "patient" | "peer";
|
|
730
|
+
otherUser: "agent" | "patient" | "peer";
|
|
731
|
+
};
|
|
732
|
+
}[];
|
|
414
733
|
seedAssessmentScore?: number | undefined;
|
|
415
734
|
}[]> | undefined;
|
|
416
|
-
discoverySummary?: import("../../
|
|
417
|
-
}, "scope" | "
|
|
418
|
-
userId: import("@langchain/langgraph").BaseChannel<Id<"users">, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">>, unknown>;
|
|
735
|
+
discoverySummary?: import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null> | null | undefined;
|
|
736
|
+
}, "scope" | "__start__" | "discovery" | "prep" | "evaluation" | "persist" | "negotiate" | "resolve" | "ranking", {
|
|
737
|
+
userId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users">, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users">>, unknown>;
|
|
419
738
|
searchQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
420
|
-
networkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
421
|
-
indexScope: import("@langchain/langgraph").BaseChannel<Id<"networks">[] | undefined, Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[] | undefined> | undefined, unknown>;
|
|
422
|
-
triggerIntentId: import("@langchain/langgraph").BaseChannel<Id<"intents"> | undefined, Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined, unknown>;
|
|
423
|
-
targetUserId: import("@langchain/langgraph").BaseChannel<Id<"users"> | undefined, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined, unknown>;
|
|
424
|
-
onBehalfOfUserId: import("@langchain/langgraph").BaseChannel<Id<"users"> | undefined, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined, unknown>;
|
|
739
|
+
networkId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks"> | undefined, import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined, unknown>;
|
|
740
|
+
indexScope: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks">[] | undefined, import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[] | undefined> | undefined, unknown>;
|
|
741
|
+
triggerIntentId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"intents"> | undefined, import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
742
|
+
targetUserId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users"> | undefined, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined, unknown>;
|
|
743
|
+
onBehalfOfUserId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users"> | undefined, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined, unknown>;
|
|
425
744
|
options: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").OpportunityGraphOptions, import("../domain/opportunity.state.js").OpportunityGraphOptions | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityGraphOptions>, unknown>;
|
|
426
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
427
|
-
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
745
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction", "send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
746
|
+
introductionEntities: import("@langchain/langgraph").BaseChannel<import("./opportunity.evaluator.js").EvaluatorEntity[], import("./opportunity.evaluator.js").EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.evaluator.js").EvaluatorEntity[]>, unknown>;
|
|
428
747
|
introductionHint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
429
|
-
requiredNetworkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
748
|
+
requiredNetworkId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks"> | undefined, import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined, unknown>;
|
|
430
749
|
introductionContext: import("@langchain/langgraph").BaseChannel<{
|
|
431
750
|
createdByName?: string;
|
|
432
751
|
} | undefined, {
|
|
@@ -436,36 +755,36 @@ export declare class OpportunityGraphFactory {
|
|
|
436
755
|
} | undefined> | undefined, unknown>;
|
|
437
756
|
opportunityId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
438
757
|
newStatus: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
439
|
-
indexedIntents: import("@langchain/langgraph").BaseChannel<IndexedIntent[], IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<IndexedIntent[]>, unknown>;
|
|
440
|
-
userNetworks: import("@langchain/langgraph").BaseChannel<Id<"networks">[], Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[]>, unknown>;
|
|
441
|
-
targetNetworks: import("@langchain/langgraph").BaseChannel<TargetNetwork[], TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<TargetNetwork[]>, unknown>;
|
|
758
|
+
indexedIntents: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").IndexedIntent[], import("../domain/opportunity.state.js").IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").IndexedIntent[]>, unknown>;
|
|
759
|
+
userNetworks: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks">[], import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[]>, unknown>;
|
|
760
|
+
targetNetworks: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").TargetNetwork[], import("../domain/opportunity.state.js").TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").TargetNetwork[]>, unknown>;
|
|
442
761
|
indexRelevancyScores: import("@langchain/langgraph").BaseChannel<Record<string, number>, Record<string, number> | import("@langchain/langgraph").OverwriteValue<Record<string, number>>, unknown>;
|
|
443
762
|
discoverySource: import("@langchain/langgraph").BaseChannel<"intent" | "context", "intent" | "context" | import("@langchain/langgraph").OverwriteValue<"intent" | "context">, unknown>;
|
|
444
|
-
resolvedTriggerIntentId: import("@langchain/langgraph").BaseChannel<Id<"intents"> | undefined, Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined, unknown>;
|
|
445
|
-
sourceProfile: import("@langchain/langgraph").BaseChannel<SourceProfileData | null, SourceProfileData | import("@langchain/langgraph").OverwriteValue<SourceProfileData | null> | null, unknown>;
|
|
763
|
+
resolvedTriggerIntentId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"intents"> | undefined, import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
764
|
+
sourceProfile: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").SourceProfileData | null, import("../domain/opportunity.state.js").SourceProfileData | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").SourceProfileData | null> | null, unknown>;
|
|
446
765
|
sourcePremises: import("@langchain/langgraph").BaseChannel<{
|
|
447
|
-
premiseId: Id<"premises">;
|
|
766
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
448
767
|
embedding: number[];
|
|
449
768
|
}[], {
|
|
450
|
-
premiseId: Id<"premises">;
|
|
769
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
451
770
|
embedding: number[];
|
|
452
771
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
453
|
-
premiseId: Id<"premises">;
|
|
772
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
454
773
|
embedding: number[];
|
|
455
774
|
}[]>, unknown>;
|
|
456
775
|
sourceContexts: import("@langchain/langgraph").BaseChannel<{
|
|
457
776
|
contextId: string;
|
|
458
|
-
networkId: Id<"networks">;
|
|
777
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
459
778
|
text: string;
|
|
460
779
|
embedding: number[];
|
|
461
780
|
}[], {
|
|
462
781
|
contextId: string;
|
|
463
|
-
networkId: Id<"networks">;
|
|
782
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
464
783
|
text: string;
|
|
465
784
|
embedding: number[];
|
|
466
785
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
467
786
|
contextId: string;
|
|
468
|
-
networkId: Id<"networks">;
|
|
787
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
469
788
|
text: string;
|
|
470
789
|
embedding: number[];
|
|
471
790
|
}[]>, unknown>;
|
|
@@ -473,36 +792,36 @@ export declare class OpportunityGraphFactory {
|
|
|
473
792
|
createIntentSuggested: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
474
793
|
suggestedIntentDescription: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
475
794
|
hydeEmbeddings: import("@langchain/langgraph").BaseChannel<Record<string, number[]>, Record<string, number[]> | import("@langchain/langgraph").OverwriteValue<Record<string, number[]>>, unknown>;
|
|
476
|
-
candidates: import("@langchain/langgraph").BaseChannel<CandidateMatch[], CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]>, unknown>;
|
|
477
|
-
remainingCandidates: import("@langchain/langgraph").BaseChannel<CandidateMatch[], CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]>, unknown>;
|
|
795
|
+
candidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").CandidateMatch[], import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]>, unknown>;
|
|
796
|
+
remainingCandidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").CandidateMatch[], import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]>, unknown>;
|
|
478
797
|
discoveryId: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
|
|
479
798
|
evaluatedCandidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").EvaluatedCandidate[], import("../domain/opportunity.state.js").EvaluatedCandidate[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedCandidate[]>, unknown>;
|
|
480
|
-
evaluatedOpportunities: import("@langchain/langgraph").BaseChannel<EvaluatedOpportunity[], EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<EvaluatedOpportunity[]>, unknown>;
|
|
481
|
-
opportunities: import("@langchain/langgraph").BaseChannel<Opportunity[], Opportunity[] | import("@langchain/langgraph").OverwriteValue<Opportunity[]>, unknown>;
|
|
799
|
+
evaluatedOpportunities: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").EvaluatedOpportunity[], import("../domain/opportunity.state.js").EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedOpportunity[]>, unknown>;
|
|
800
|
+
opportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.entities.js").Opportunity[], import("../../shared/interfaces/database.entities.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").Opportunity[]>, unknown>;
|
|
482
801
|
existingBetweenActors: import("@langchain/langgraph").BaseChannel<{
|
|
483
|
-
candidateUserId: Id<"users">;
|
|
484
|
-
networkId: Id<"networks">;
|
|
485
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
486
|
-
existingStatus?: OpportunityStatus;
|
|
802
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
803
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
804
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
805
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
487
806
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
488
807
|
existingTriggerIntentId?: string;
|
|
489
808
|
}[], {
|
|
490
|
-
candidateUserId: Id<"users">;
|
|
491
|
-
networkId: Id<"networks">;
|
|
492
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
493
|
-
existingStatus?: OpportunityStatus;
|
|
809
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
810
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
811
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
812
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
494
813
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
495
814
|
existingTriggerIntentId?: string;
|
|
496
815
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
497
|
-
candidateUserId: Id<"users">;
|
|
498
|
-
networkId: Id<"networks">;
|
|
499
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
500
|
-
existingStatus?: OpportunityStatus;
|
|
816
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
817
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
818
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
819
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
501
820
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
502
821
|
existingTriggerIntentId?: string;
|
|
503
822
|
}[]>, unknown>;
|
|
504
823
|
persistenceOutcome: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined, import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined> | undefined, unknown>;
|
|
505
|
-
negotiationContinuationReceipt: import("@langchain/langgraph").BaseChannel<NegotiationContinuationReceipt | undefined, NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
824
|
+
negotiationContinuationReceipt: 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>;
|
|
506
825
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
507
826
|
readResult: import("@langchain/langgraph").BaseChannel<{
|
|
508
827
|
count: number;
|
|
@@ -582,19 +901,9 @@ export declare class OpportunityGraphFactory {
|
|
|
582
901
|
detail?: string;
|
|
583
902
|
data?: Record<string, unknown>;
|
|
584
903
|
}[]>, unknown>;
|
|
585
|
-
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
904
|
+
agentTimings: import("@langchain/langgraph").BaseChannel<import("../../chat/chat-streaming.types.js").DebugMetaAgent[], import("../../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../../chat/chat-streaming.types.js").DebugMetaAgent[]>, unknown>;
|
|
586
905
|
discoveryNegotiations: import("@langchain/langgraph").BaseChannel<{
|
|
587
|
-
counterpartyId: string;
|
|
588
|
-
counterpartyHint: string;
|
|
589
906
|
indexContext: string;
|
|
590
|
-
turns: {
|
|
591
|
-
reasoning: string;
|
|
592
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
593
|
-
suggestedRoles: {
|
|
594
|
-
ownUser: "agent" | "patient" | "peer";
|
|
595
|
-
otherUser: "agent" | "patient" | "peer";
|
|
596
|
-
};
|
|
597
|
-
}[];
|
|
598
907
|
outcome: {
|
|
599
908
|
reasoning: string;
|
|
600
909
|
hasOpportunity: boolean;
|
|
@@ -604,11 +913,8 @@ export declare class OpportunityGraphFactory {
|
|
|
604
913
|
role: "agent" | "patient" | "peer";
|
|
605
914
|
}[] | undefined;
|
|
606
915
|
};
|
|
607
|
-
seedAssessmentScore?: number | undefined;
|
|
608
|
-
}[], {
|
|
609
|
-
counterpartyId: string;
|
|
610
916
|
counterpartyHint: string;
|
|
611
|
-
|
|
917
|
+
counterpartyId: string;
|
|
612
918
|
turns: {
|
|
613
919
|
reasoning: string;
|
|
614
920
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -617,6 +923,9 @@ export declare class OpportunityGraphFactory {
|
|
|
617
923
|
otherUser: "agent" | "patient" | "peer";
|
|
618
924
|
};
|
|
619
925
|
}[];
|
|
926
|
+
seedAssessmentScore?: number | undefined;
|
|
927
|
+
}[], {
|
|
928
|
+
indexContext: string;
|
|
620
929
|
outcome: {
|
|
621
930
|
reasoning: string;
|
|
622
931
|
hasOpportunity: boolean;
|
|
@@ -626,11 +935,8 @@ export declare class OpportunityGraphFactory {
|
|
|
626
935
|
role: "agent" | "patient" | "peer";
|
|
627
936
|
}[] | undefined;
|
|
628
937
|
};
|
|
629
|
-
seedAssessmentScore?: number | undefined;
|
|
630
|
-
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
631
|
-
counterpartyId: string;
|
|
632
938
|
counterpartyHint: string;
|
|
633
|
-
|
|
939
|
+
counterpartyId: string;
|
|
634
940
|
turns: {
|
|
635
941
|
reasoning: string;
|
|
636
942
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -639,6 +945,9 @@ export declare class OpportunityGraphFactory {
|
|
|
639
945
|
otherUser: "agent" | "patient" | "peer";
|
|
640
946
|
};
|
|
641
947
|
}[];
|
|
948
|
+
seedAssessmentScore?: number | undefined;
|
|
949
|
+
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
950
|
+
indexContext: string;
|
|
642
951
|
outcome: {
|
|
643
952
|
reasoning: string;
|
|
644
953
|
hasOpportunity: boolean;
|
|
@@ -648,22 +957,32 @@ export declare class OpportunityGraphFactory {
|
|
|
648
957
|
role: "agent" | "patient" | "peer";
|
|
649
958
|
}[] | undefined;
|
|
650
959
|
};
|
|
960
|
+
counterpartyHint: string;
|
|
961
|
+
counterpartyId: string;
|
|
962
|
+
turns: {
|
|
963
|
+
reasoning: string;
|
|
964
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
965
|
+
suggestedRoles: {
|
|
966
|
+
ownUser: "agent" | "patient" | "peer";
|
|
967
|
+
otherUser: "agent" | "patient" | "peer";
|
|
968
|
+
};
|
|
969
|
+
}[];
|
|
651
970
|
seedAssessmentScore?: number | undefined;
|
|
652
971
|
}[]>, unknown>;
|
|
653
|
-
discoverySummary: import("@langchain/langgraph").BaseChannel<import("../../
|
|
972
|
+
discoverySummary: import("@langchain/langgraph").BaseChannel<import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null, import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null> | null, unknown>;
|
|
654
973
|
}, {
|
|
655
|
-
userId: import("@langchain/langgraph").BaseChannel<Id<"users">, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">>, unknown>;
|
|
974
|
+
userId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users">, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users">>, unknown>;
|
|
656
975
|
searchQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
657
|
-
networkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
658
|
-
indexScope: import("@langchain/langgraph").BaseChannel<Id<"networks">[] | undefined, Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[] | undefined> | undefined, unknown>;
|
|
659
|
-
triggerIntentId: import("@langchain/langgraph").BaseChannel<Id<"intents"> | undefined, Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined, unknown>;
|
|
660
|
-
targetUserId: import("@langchain/langgraph").BaseChannel<Id<"users"> | undefined, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined, unknown>;
|
|
661
|
-
onBehalfOfUserId: import("@langchain/langgraph").BaseChannel<Id<"users"> | undefined, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users"> | undefined> | undefined, unknown>;
|
|
976
|
+
networkId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks"> | undefined, import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined, unknown>;
|
|
977
|
+
indexScope: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks">[] | undefined, import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[] | undefined> | undefined, unknown>;
|
|
978
|
+
triggerIntentId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"intents"> | undefined, import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
979
|
+
targetUserId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users"> | undefined, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined, unknown>;
|
|
980
|
+
onBehalfOfUserId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"users"> | undefined, import("./opportunity.graph.shared.js").Id<"users"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"users"> | undefined> | undefined, unknown>;
|
|
662
981
|
options: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").OpportunityGraphOptions, import("../domain/opportunity.state.js").OpportunityGraphOptions | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityGraphOptions>, unknown>;
|
|
663
|
-
operationMode: import("@langchain/langgraph").BaseChannel<"
|
|
664
|
-
introductionEntities: import("@langchain/langgraph").BaseChannel<EvaluatorEntity[], EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<EvaluatorEntity[]>, unknown>;
|
|
982
|
+
operationMode: import("@langchain/langgraph").BaseChannel<"send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction", "send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction" | import("@langchain/langgraph").OverwriteValue<"send" | "update" | "create" | "delete" | "read" | "create_introduction" | "continue_discovery" | "negotiate_existing" | "approve_introduction">, unknown>;
|
|
983
|
+
introductionEntities: import("@langchain/langgraph").BaseChannel<import("./opportunity.evaluator.js").EvaluatorEntity[], import("./opportunity.evaluator.js").EvaluatorEntity[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.evaluator.js").EvaluatorEntity[]>, unknown>;
|
|
665
984
|
introductionHint: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
666
|
-
requiredNetworkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
985
|
+
requiredNetworkId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks"> | undefined, import("./opportunity.graph.shared.js").Id<"networks"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks"> | undefined> | undefined, unknown>;
|
|
667
986
|
introductionContext: import("@langchain/langgraph").BaseChannel<{
|
|
668
987
|
createdByName?: string;
|
|
669
988
|
} | undefined, {
|
|
@@ -673,36 +992,36 @@ export declare class OpportunityGraphFactory {
|
|
|
673
992
|
} | undefined> | undefined, unknown>;
|
|
674
993
|
opportunityId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
675
994
|
newStatus: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
676
|
-
indexedIntents: import("@langchain/langgraph").BaseChannel<IndexedIntent[], IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<IndexedIntent[]>, unknown>;
|
|
677
|
-
userNetworks: import("@langchain/langgraph").BaseChannel<Id<"networks">[], Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<Id<"networks">[]>, unknown>;
|
|
678
|
-
targetNetworks: import("@langchain/langgraph").BaseChannel<TargetNetwork[], TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<TargetNetwork[]>, unknown>;
|
|
995
|
+
indexedIntents: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").IndexedIntent[], import("../domain/opportunity.state.js").IndexedIntent[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").IndexedIntent[]>, unknown>;
|
|
996
|
+
userNetworks: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"networks">[], import("./opportunity.graph.shared.js").Id<"networks">[] | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"networks">[]>, unknown>;
|
|
997
|
+
targetNetworks: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").TargetNetwork[], import("../domain/opportunity.state.js").TargetNetwork[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").TargetNetwork[]>, unknown>;
|
|
679
998
|
indexRelevancyScores: import("@langchain/langgraph").BaseChannel<Record<string, number>, Record<string, number> | import("@langchain/langgraph").OverwriteValue<Record<string, number>>, unknown>;
|
|
680
999
|
discoverySource: import("@langchain/langgraph").BaseChannel<"intent" | "context", "intent" | "context" | import("@langchain/langgraph").OverwriteValue<"intent" | "context">, unknown>;
|
|
681
|
-
resolvedTriggerIntentId: import("@langchain/langgraph").BaseChannel<Id<"intents"> | undefined, Id<"intents"> | import("@langchain/langgraph").OverwriteValue<Id<"intents"> | undefined> | undefined, unknown>;
|
|
682
|
-
sourceProfile: import("@langchain/langgraph").BaseChannel<SourceProfileData | null, SourceProfileData | import("@langchain/langgraph").OverwriteValue<SourceProfileData | null> | null, unknown>;
|
|
1000
|
+
resolvedTriggerIntentId: import("@langchain/langgraph").BaseChannel<import("./opportunity.graph.shared.js").Id<"intents"> | undefined, import("./opportunity.graph.shared.js").Id<"intents"> | import("@langchain/langgraph").OverwriteValue<import("./opportunity.graph.shared.js").Id<"intents"> | undefined> | undefined, unknown>;
|
|
1001
|
+
sourceProfile: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").SourceProfileData | null, import("../domain/opportunity.state.js").SourceProfileData | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").SourceProfileData | null> | null, unknown>;
|
|
683
1002
|
sourcePremises: import("@langchain/langgraph").BaseChannel<{
|
|
684
|
-
premiseId: Id<"premises">;
|
|
1003
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
685
1004
|
embedding: number[];
|
|
686
1005
|
}[], {
|
|
687
|
-
premiseId: Id<"premises">;
|
|
1006
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
688
1007
|
embedding: number[];
|
|
689
1008
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
690
|
-
premiseId: Id<"premises">;
|
|
1009
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
691
1010
|
embedding: number[];
|
|
692
1011
|
}[]>, unknown>;
|
|
693
1012
|
sourceContexts: import("@langchain/langgraph").BaseChannel<{
|
|
694
1013
|
contextId: string;
|
|
695
|
-
networkId: Id<"networks">;
|
|
1014
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
696
1015
|
text: string;
|
|
697
1016
|
embedding: number[];
|
|
698
1017
|
}[], {
|
|
699
1018
|
contextId: string;
|
|
700
|
-
networkId: Id<"networks">;
|
|
1019
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
701
1020
|
text: string;
|
|
702
1021
|
embedding: number[];
|
|
703
1022
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
704
1023
|
contextId: string;
|
|
705
|
-
networkId: Id<"networks">;
|
|
1024
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
706
1025
|
text: string;
|
|
707
1026
|
embedding: number[];
|
|
708
1027
|
}[]>, unknown>;
|
|
@@ -710,36 +1029,36 @@ export declare class OpportunityGraphFactory {
|
|
|
710
1029
|
createIntentSuggested: import("@langchain/langgraph").BaseChannel<boolean, boolean | import("@langchain/langgraph").OverwriteValue<boolean>, unknown>;
|
|
711
1030
|
suggestedIntentDescription: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
712
1031
|
hydeEmbeddings: import("@langchain/langgraph").BaseChannel<Record<string, number[]>, Record<string, number[]> | import("@langchain/langgraph").OverwriteValue<Record<string, number[]>>, unknown>;
|
|
713
|
-
candidates: import("@langchain/langgraph").BaseChannel<CandidateMatch[], CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]>, unknown>;
|
|
714
|
-
remainingCandidates: import("@langchain/langgraph").BaseChannel<CandidateMatch[], CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<CandidateMatch[]>, unknown>;
|
|
1032
|
+
candidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").CandidateMatch[], import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]>, unknown>;
|
|
1033
|
+
remainingCandidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").CandidateMatch[], import("../domain/opportunity.state.js").CandidateMatch[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").CandidateMatch[]>, unknown>;
|
|
715
1034
|
discoveryId: import("@langchain/langgraph").BaseChannel<string | null, string | import("@langchain/langgraph").OverwriteValue<string | null> | null, unknown>;
|
|
716
1035
|
evaluatedCandidates: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").EvaluatedCandidate[], import("../domain/opportunity.state.js").EvaluatedCandidate[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedCandidate[]>, unknown>;
|
|
717
|
-
evaluatedOpportunities: import("@langchain/langgraph").BaseChannel<EvaluatedOpportunity[], EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<EvaluatedOpportunity[]>, unknown>;
|
|
718
|
-
opportunities: import("@langchain/langgraph").BaseChannel<Opportunity[], Opportunity[] | import("@langchain/langgraph").OverwriteValue<Opportunity[]>, unknown>;
|
|
1036
|
+
evaluatedOpportunities: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").EvaluatedOpportunity[], import("../domain/opportunity.state.js").EvaluatedOpportunity[] | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").EvaluatedOpportunity[]>, unknown>;
|
|
1037
|
+
opportunities: import("@langchain/langgraph").BaseChannel<import("../../shared/interfaces/database.entities.js").Opportunity[], import("../../shared/interfaces/database.entities.js").Opportunity[] | import("@langchain/langgraph").OverwriteValue<import("../../shared/interfaces/database.entities.js").Opportunity[]>, unknown>;
|
|
719
1038
|
existingBetweenActors: import("@langchain/langgraph").BaseChannel<{
|
|
720
|
-
candidateUserId: Id<"users">;
|
|
721
|
-
networkId: Id<"networks">;
|
|
722
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
723
|
-
existingStatus?: OpportunityStatus;
|
|
1039
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1040
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
1041
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
1042
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
724
1043
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
725
1044
|
existingTriggerIntentId?: string;
|
|
726
1045
|
}[], {
|
|
727
|
-
candidateUserId: Id<"users">;
|
|
728
|
-
networkId: Id<"networks">;
|
|
729
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
730
|
-
existingStatus?: OpportunityStatus;
|
|
1046
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1047
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
1048
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
1049
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
731
1050
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
732
1051
|
existingTriggerIntentId?: string;
|
|
733
1052
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
734
|
-
candidateUserId: Id<"users">;
|
|
735
|
-
networkId: Id<"networks">;
|
|
736
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
737
|
-
existingStatus?: OpportunityStatus;
|
|
1053
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1054
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
1055
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
1056
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
738
1057
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
739
1058
|
existingTriggerIntentId?: string;
|
|
740
1059
|
}[]>, unknown>;
|
|
741
1060
|
persistenceOutcome: import("@langchain/langgraph").BaseChannel<import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined, import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | import("@langchain/langgraph").OverwriteValue<import("../domain/opportunity.state.js").OpportunityPersistenceOutcome | undefined> | undefined, unknown>;
|
|
742
|
-
negotiationContinuationReceipt: import("@langchain/langgraph").BaseChannel<NegotiationContinuationReceipt | undefined, NegotiationContinuationReceipt | import("@langchain/langgraph").OverwriteValue<NegotiationContinuationReceipt | undefined> | undefined, unknown>;
|
|
1061
|
+
negotiationContinuationReceipt: 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>;
|
|
743
1062
|
error: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
744
1063
|
readResult: import("@langchain/langgraph").BaseChannel<{
|
|
745
1064
|
count: number;
|
|
@@ -819,19 +1138,9 @@ export declare class OpportunityGraphFactory {
|
|
|
819
1138
|
detail?: string;
|
|
820
1139
|
data?: Record<string, unknown>;
|
|
821
1140
|
}[]>, unknown>;
|
|
822
|
-
agentTimings: import("@langchain/langgraph").BaseChannel<DebugMetaAgent[], DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<DebugMetaAgent[]>, unknown>;
|
|
1141
|
+
agentTimings: import("@langchain/langgraph").BaseChannel<import("../../chat/chat-streaming.types.js").DebugMetaAgent[], import("../../chat/chat-streaming.types.js").DebugMetaAgent[] | import("@langchain/langgraph").OverwriteValue<import("../../chat/chat-streaming.types.js").DebugMetaAgent[]>, unknown>;
|
|
823
1142
|
discoveryNegotiations: import("@langchain/langgraph").BaseChannel<{
|
|
824
|
-
counterpartyId: string;
|
|
825
|
-
counterpartyHint: string;
|
|
826
1143
|
indexContext: string;
|
|
827
|
-
turns: {
|
|
828
|
-
reasoning: string;
|
|
829
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
830
|
-
suggestedRoles: {
|
|
831
|
-
ownUser: "agent" | "patient" | "peer";
|
|
832
|
-
otherUser: "agent" | "patient" | "peer";
|
|
833
|
-
};
|
|
834
|
-
}[];
|
|
835
1144
|
outcome: {
|
|
836
1145
|
reasoning: string;
|
|
837
1146
|
hasOpportunity: boolean;
|
|
@@ -841,11 +1150,8 @@ export declare class OpportunityGraphFactory {
|
|
|
841
1150
|
role: "agent" | "patient" | "peer";
|
|
842
1151
|
}[] | undefined;
|
|
843
1152
|
};
|
|
844
|
-
seedAssessmentScore?: number | undefined;
|
|
845
|
-
}[], {
|
|
846
|
-
counterpartyId: string;
|
|
847
1153
|
counterpartyHint: string;
|
|
848
|
-
|
|
1154
|
+
counterpartyId: string;
|
|
849
1155
|
turns: {
|
|
850
1156
|
reasoning: string;
|
|
851
1157
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -854,6 +1160,9 @@ export declare class OpportunityGraphFactory {
|
|
|
854
1160
|
otherUser: "agent" | "patient" | "peer";
|
|
855
1161
|
};
|
|
856
1162
|
}[];
|
|
1163
|
+
seedAssessmentScore?: number | undefined;
|
|
1164
|
+
}[], {
|
|
1165
|
+
indexContext: string;
|
|
857
1166
|
outcome: {
|
|
858
1167
|
reasoning: string;
|
|
859
1168
|
hasOpportunity: boolean;
|
|
@@ -863,11 +1172,8 @@ export declare class OpportunityGraphFactory {
|
|
|
863
1172
|
role: "agent" | "patient" | "peer";
|
|
864
1173
|
}[] | undefined;
|
|
865
1174
|
};
|
|
866
|
-
seedAssessmentScore?: number | undefined;
|
|
867
|
-
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
868
|
-
counterpartyId: string;
|
|
869
1175
|
counterpartyHint: string;
|
|
870
|
-
|
|
1176
|
+
counterpartyId: string;
|
|
871
1177
|
turns: {
|
|
872
1178
|
reasoning: string;
|
|
873
1179
|
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
@@ -876,6 +1182,9 @@ export declare class OpportunityGraphFactory {
|
|
|
876
1182
|
otherUser: "agent" | "patient" | "peer";
|
|
877
1183
|
};
|
|
878
1184
|
}[];
|
|
1185
|
+
seedAssessmentScore?: number | undefined;
|
|
1186
|
+
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
1187
|
+
indexContext: string;
|
|
879
1188
|
outcome: {
|
|
880
1189
|
reasoning: string;
|
|
881
1190
|
hasOpportunity: boolean;
|
|
@@ -885,12 +1194,22 @@ export declare class OpportunityGraphFactory {
|
|
|
885
1194
|
role: "agent" | "patient" | "peer";
|
|
886
1195
|
}[] | undefined;
|
|
887
1196
|
};
|
|
1197
|
+
counterpartyHint: string;
|
|
1198
|
+
counterpartyId: string;
|
|
1199
|
+
turns: {
|
|
1200
|
+
reasoning: string;
|
|
1201
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1202
|
+
suggestedRoles: {
|
|
1203
|
+
ownUser: "agent" | "patient" | "peer";
|
|
1204
|
+
otherUser: "agent" | "patient" | "peer";
|
|
1205
|
+
};
|
|
1206
|
+
}[];
|
|
888
1207
|
seedAssessmentScore?: number | undefined;
|
|
889
1208
|
}[]>, unknown>;
|
|
890
|
-
discoverySummary: import("@langchain/langgraph").BaseChannel<import("../../
|
|
1209
|
+
discoverySummary: import("@langchain/langgraph").BaseChannel<import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null, import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary | null> | null, unknown>;
|
|
891
1210
|
}, import("@langchain/langgraph").StateDefinition, {
|
|
892
1211
|
prep: {
|
|
893
|
-
userNetworks: Id<"networks">[];
|
|
1212
|
+
userNetworks: import("./opportunity.graph.shared.js").Id<"networks">[];
|
|
894
1213
|
sourceProfile: null;
|
|
895
1214
|
error: string;
|
|
896
1215
|
indexedIntents?: undefined;
|
|
@@ -898,8 +1217,8 @@ export declare class OpportunityGraphFactory {
|
|
|
898
1217
|
sourceContexts?: undefined;
|
|
899
1218
|
trace?: undefined;
|
|
900
1219
|
} | {
|
|
901
|
-
userNetworks: Id<"networks">[];
|
|
902
|
-
indexedIntents: IndexedIntent[];
|
|
1220
|
+
userNetworks: import("./opportunity.graph.shared.js").Id<"networks">[];
|
|
1221
|
+
indexedIntents: import("../domain/opportunity.state.js").IndexedIntent[];
|
|
903
1222
|
sourceProfile: {
|
|
904
1223
|
identity: {
|
|
905
1224
|
name: string;
|
|
@@ -909,12 +1228,12 @@ export declare class OpportunityGraphFactory {
|
|
|
909
1228
|
context: string;
|
|
910
1229
|
} | null;
|
|
911
1230
|
sourcePremises: {
|
|
912
|
-
premiseId: Id<"premises">;
|
|
1231
|
+
premiseId: import("./opportunity.graph.shared.js").Id<"premises">;
|
|
913
1232
|
embedding: number[];
|
|
914
1233
|
}[];
|
|
915
1234
|
sourceContexts: {
|
|
916
1235
|
contextId: string;
|
|
917
|
-
networkId: Id<"networks">;
|
|
1236
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
918
1237
|
text: string;
|
|
919
1238
|
embedding: number[];
|
|
920
1239
|
}[];
|
|
@@ -940,9 +1259,9 @@ export declare class OpportunityGraphFactory {
|
|
|
940
1259
|
agentTimings?: undefined;
|
|
941
1260
|
trace?: undefined;
|
|
942
1261
|
} | {
|
|
943
|
-
targetNetworks: TargetNetwork[];
|
|
1262
|
+
targetNetworks: import("../domain/opportunity.state.js").TargetNetwork[];
|
|
944
1263
|
indexRelevancyScores: Record<string, number>;
|
|
945
|
-
agentTimings: DebugMetaAgent[];
|
|
1264
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
946
1265
|
trace: {
|
|
947
1266
|
node: string;
|
|
948
1267
|
detail: string;
|
|
@@ -952,7 +1271,7 @@ export declare class OpportunityGraphFactory {
|
|
|
952
1271
|
}[];
|
|
953
1272
|
error?: undefined;
|
|
954
1273
|
} | {
|
|
955
|
-
targetNetworks: TargetNetwork[];
|
|
1274
|
+
targetNetworks: import("../domain/opportunity.state.js").TargetNetwork[];
|
|
956
1275
|
indexRelevancyScores: Record<string, number>;
|
|
957
1276
|
trace: {
|
|
958
1277
|
node: string;
|
|
@@ -983,7 +1302,7 @@ export declare class OpportunityGraphFactory {
|
|
|
983
1302
|
error: string;
|
|
984
1303
|
trace?: undefined;
|
|
985
1304
|
} | {
|
|
986
|
-
resolvedTriggerIntentId: Id<"intents">;
|
|
1305
|
+
resolvedTriggerIntentId: import("./opportunity.graph.shared.js").Id<"intents">;
|
|
987
1306
|
resolvedIntentInIndex: boolean;
|
|
988
1307
|
discoverySource: "intent" | "context";
|
|
989
1308
|
error?: undefined;
|
|
@@ -1009,32 +1328,43 @@ export declare class OpportunityGraphFactory {
|
|
|
1009
1328
|
};
|
|
1010
1329
|
discovery: {
|
|
1011
1330
|
candidates: never[];
|
|
1012
|
-
trace?: undefined;
|
|
1013
|
-
hydeEmbeddings?: undefined;
|
|
1014
|
-
error?: undefined;
|
|
1015
|
-
} | {
|
|
1016
|
-
candidates: CandidateMatch[];
|
|
1017
1331
|
trace: {
|
|
1018
1332
|
node: string;
|
|
1019
|
-
detail
|
|
1020
|
-
data
|
|
1333
|
+
detail: string;
|
|
1334
|
+
data: {
|
|
1335
|
+
targetUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1336
|
+
};
|
|
1021
1337
|
}[];
|
|
1022
|
-
hydeEmbeddings?: undefined;
|
|
1023
|
-
error?: undefined;
|
|
1024
1338
|
} | {
|
|
1025
|
-
|
|
1026
|
-
|
|
1027
|
-
|
|
1028
|
-
|
|
1339
|
+
candidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
1340
|
+
trace: {
|
|
1341
|
+
node: string;
|
|
1342
|
+
detail: string;
|
|
1343
|
+
data: {
|
|
1344
|
+
targetUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1345
|
+
candidateCount: number;
|
|
1346
|
+
sharedIndexes: number;
|
|
1347
|
+
durationMs: number;
|
|
1348
|
+
};
|
|
1349
|
+
}[];
|
|
1029
1350
|
} | {
|
|
1030
|
-
|
|
1031
|
-
candidates: CandidateMatch[];
|
|
1351
|
+
candidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
1032
1352
|
trace: {
|
|
1033
1353
|
node: string;
|
|
1034
1354
|
detail?: string;
|
|
1035
1355
|
data?: Record<string, unknown>;
|
|
1036
1356
|
}[];
|
|
1357
|
+
} | {
|
|
1358
|
+
candidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
1359
|
+
trace: {
|
|
1360
|
+
node: string;
|
|
1361
|
+
detail: string;
|
|
1362
|
+
}[];
|
|
1363
|
+
hydeEmbeddings?: undefined;
|
|
1364
|
+
} | {
|
|
1365
|
+
candidates: never[];
|
|
1037
1366
|
error?: undefined;
|
|
1367
|
+
trace?: undefined;
|
|
1038
1368
|
} | {
|
|
1039
1369
|
candidates: never[];
|
|
1040
1370
|
error: string;
|
|
@@ -1045,7 +1375,6 @@ export declare class OpportunityGraphFactory {
|
|
|
1045
1375
|
error: string;
|
|
1046
1376
|
};
|
|
1047
1377
|
}[];
|
|
1048
|
-
hydeEmbeddings?: undefined;
|
|
1049
1378
|
};
|
|
1050
1379
|
evaluation: {
|
|
1051
1380
|
evaluatedOpportunities: never[];
|
|
@@ -1069,15 +1398,15 @@ export declare class OpportunityGraphFactory {
|
|
|
1069
1398
|
error?: undefined;
|
|
1070
1399
|
trace?: undefined;
|
|
1071
1400
|
} | {
|
|
1072
|
-
candidates: CandidateMatch[];
|
|
1073
|
-
evaluatedOpportunities: EvaluatedOpportunity[];
|
|
1074
|
-
remainingCandidates: CandidateMatch[];
|
|
1401
|
+
candidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
1402
|
+
evaluatedOpportunities: import("../domain/opportunity.state.js").EvaluatedOpportunity[];
|
|
1403
|
+
remainingCandidates: import("../domain/opportunity.state.js").CandidateMatch[];
|
|
1075
1404
|
trace: {
|
|
1076
1405
|
node: string;
|
|
1077
1406
|
detail?: string;
|
|
1078
1407
|
data?: Record<string, unknown>;
|
|
1079
1408
|
}[];
|
|
1080
|
-
agentTimings: DebugMetaAgent[];
|
|
1409
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
1081
1410
|
error?: undefined;
|
|
1082
1411
|
} | {
|
|
1083
1412
|
evaluatedOpportunities: never[];
|
|
@@ -1091,75 +1420,17 @@ export declare class OpportunityGraphFactory {
|
|
|
1091
1420
|
durationMs: number;
|
|
1092
1421
|
};
|
|
1093
1422
|
}[];
|
|
1094
|
-
agentTimings: DebugMetaAgent[];
|
|
1423
|
+
agentTimings: import("../../chat/chat-streaming.types.js").DebugMetaAgent[];
|
|
1095
1424
|
candidates?: undefined;
|
|
1096
1425
|
remainingCandidates?: undefined;
|
|
1097
1426
|
};
|
|
1098
1427
|
ranking: {
|
|
1099
|
-
evaluatedOpportunities: EvaluatedOpportunity[];
|
|
1100
|
-
error?: undefined;
|
|
1101
|
-
trace?: undefined;
|
|
1102
|
-
} | {
|
|
1103
|
-
evaluatedOpportunities: never[];
|
|
1104
|
-
error: string;
|
|
1105
|
-
trace: {
|
|
1106
|
-
node: string;
|
|
1107
|
-
detail: string;
|
|
1108
|
-
data: {
|
|
1109
|
-
error: string;
|
|
1110
|
-
};
|
|
1111
|
-
}[];
|
|
1112
|
-
};
|
|
1113
|
-
intro_validation: {
|
|
1114
|
-
error: string;
|
|
1115
|
-
trace?: undefined;
|
|
1116
|
-
} | {
|
|
1117
|
-
error?: undefined;
|
|
1118
|
-
trace?: undefined;
|
|
1119
|
-
} | {
|
|
1120
|
-
error: string;
|
|
1121
|
-
trace: {
|
|
1122
|
-
node: string;
|
|
1123
|
-
detail: string;
|
|
1124
|
-
data: {
|
|
1125
|
-
error: string;
|
|
1126
|
-
};
|
|
1127
|
-
}[];
|
|
1128
|
-
};
|
|
1129
|
-
intro_evaluation: {
|
|
1130
|
-
evaluatedOpportunities: never[];
|
|
1131
|
-
agentTimings: never[];
|
|
1428
|
+
evaluatedOpportunities: import("../domain/opportunity.state.js").EvaluatedOpportunity[];
|
|
1132
1429
|
error?: undefined;
|
|
1133
|
-
introductionContext?: undefined;
|
|
1134
|
-
options?: undefined;
|
|
1135
1430
|
trace?: undefined;
|
|
1136
1431
|
} | {
|
|
1137
1432
|
evaluatedOpportunities: never[];
|
|
1138
1433
|
error: string;
|
|
1139
|
-
agentTimings: never[];
|
|
1140
|
-
introductionContext?: undefined;
|
|
1141
|
-
options?: undefined;
|
|
1142
|
-
trace?: undefined;
|
|
1143
|
-
} | {
|
|
1144
|
-
evaluatedOpportunities: {
|
|
1145
|
-
actors: EvaluatedOpportunityActor[];
|
|
1146
|
-
score: number;
|
|
1147
|
-
reasoning: string;
|
|
1148
|
-
}[];
|
|
1149
|
-
introductionContext: {
|
|
1150
|
-
createdByName: string | undefined;
|
|
1151
|
-
};
|
|
1152
|
-
options: {
|
|
1153
|
-
initialStatus: OpportunityStatus;
|
|
1154
|
-
negotiationContinuation?: import("../../shared/interfaces/database.interface.js").NegotiationContinuationExecution;
|
|
1155
|
-
limit?: number;
|
|
1156
|
-
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
1157
|
-
hydeDescription?: string;
|
|
1158
|
-
existingOpportunities?: string;
|
|
1159
|
-
conversationId?: string;
|
|
1160
|
-
negotiateTimeoutMs?: number;
|
|
1161
|
-
};
|
|
1162
|
-
agentTimings: DebugMetaAgent[];
|
|
1163
1434
|
trace: {
|
|
1164
1435
|
node: string;
|
|
1165
1436
|
detail: string;
|
|
@@ -1167,25 +1438,6 @@ export declare class OpportunityGraphFactory {
|
|
|
1167
1438
|
error: string;
|
|
1168
1439
|
};
|
|
1169
1440
|
}[];
|
|
1170
|
-
error?: undefined;
|
|
1171
|
-
} | {
|
|
1172
|
-
evaluatedOpportunities: EvaluatedOpportunity[];
|
|
1173
|
-
introductionContext: {
|
|
1174
|
-
createdByName: string | undefined;
|
|
1175
|
-
};
|
|
1176
|
-
options: {
|
|
1177
|
-
initialStatus: OpportunityStatus;
|
|
1178
|
-
negotiationContinuation?: import("../../shared/interfaces/database.interface.js").NegotiationContinuationExecution;
|
|
1179
|
-
limit?: number;
|
|
1180
|
-
lenses?: import("../../discovery/lens.inferrer.js").Lens[];
|
|
1181
|
-
hydeDescription?: string;
|
|
1182
|
-
existingOpportunities?: string;
|
|
1183
|
-
conversationId?: string;
|
|
1184
|
-
negotiateTimeoutMs?: number;
|
|
1185
|
-
};
|
|
1186
|
-
agentTimings: DebugMetaAgent[];
|
|
1187
|
-
error?: undefined;
|
|
1188
|
-
trace?: undefined;
|
|
1189
1441
|
};
|
|
1190
1442
|
persist: {
|
|
1191
1443
|
opportunities: never[];
|
|
@@ -1208,12 +1460,12 @@ export declare class OpportunityGraphFactory {
|
|
|
1208
1460
|
trace?: undefined;
|
|
1209
1461
|
error?: undefined;
|
|
1210
1462
|
} | {
|
|
1211
|
-
opportunities: Opportunity[];
|
|
1463
|
+
opportunities: import("../../shared/interfaces/database.entities.js").Opportunity[];
|
|
1212
1464
|
existingBetweenActors: {
|
|
1213
|
-
candidateUserId: Id<"users">;
|
|
1214
|
-
networkId: Id<"networks">;
|
|
1215
|
-
existingOpportunityId?: Id<"opportunities">;
|
|
1216
|
-
existingStatus?: OpportunityStatus;
|
|
1465
|
+
candidateUserId: import("./opportunity.graph.shared.js").Id<"users">;
|
|
1466
|
+
networkId: import("./opportunity.graph.shared.js").Id<"networks">;
|
|
1467
|
+
existingOpportunityId?: import("./opportunity.graph.shared.js").Id<"opportunities">;
|
|
1468
|
+
existingStatus?: import("../../shared/interfaces/database.entities.js").OpportunityStatus;
|
|
1217
1469
|
reason?: "same_trigger_recent_duplicate" | "pair_active_negotiation" | "final_atomic_conflict";
|
|
1218
1470
|
existingTriggerIntentId?: string;
|
|
1219
1471
|
}[];
|
|
@@ -1260,45 +1512,6 @@ export declare class OpportunityGraphFactory {
|
|
|
1260
1512
|
}[];
|
|
1261
1513
|
persistenceOutcome?: undefined;
|
|
1262
1514
|
};
|
|
1263
|
-
read: {
|
|
1264
|
-
readResult: {
|
|
1265
|
-
count: number;
|
|
1266
|
-
message: string;
|
|
1267
|
-
opportunities: {
|
|
1268
|
-
id: string;
|
|
1269
|
-
indexName: string;
|
|
1270
|
-
connectedWith: string[];
|
|
1271
|
-
suggestedBy: string | null;
|
|
1272
|
-
reasoning: string;
|
|
1273
|
-
status: OpportunityStatus;
|
|
1274
|
-
category: string;
|
|
1275
|
-
confidence: number | null;
|
|
1276
|
-
source: string | null;
|
|
1277
|
-
}[];
|
|
1278
|
-
};
|
|
1279
|
-
};
|
|
1280
|
-
update: {
|
|
1281
|
-
mutationResult: import("./opportunity.lifecycle.js").OpportunityMutationResult;
|
|
1282
|
-
};
|
|
1283
|
-
delete_opp: {
|
|
1284
|
-
mutationResult: import("./opportunity.lifecycle.js").OpportunityMutationResult;
|
|
1285
|
-
};
|
|
1286
|
-
send: {
|
|
1287
|
-
mutationResult: import("./opportunity.lifecycle.js").OpportunityMutationResult;
|
|
1288
|
-
};
|
|
1289
|
-
negotiate_existing: {
|
|
1290
|
-
negotiationContinuationReceipt?: undefined;
|
|
1291
|
-
error?: undefined;
|
|
1292
|
-
} | {
|
|
1293
|
-
negotiationContinuationReceipt: NegotiationContinuationReceipt;
|
|
1294
|
-
error?: undefined;
|
|
1295
|
-
} | {
|
|
1296
|
-
error: string;
|
|
1297
|
-
negotiationContinuationReceipt?: undefined;
|
|
1298
|
-
};
|
|
1299
|
-
approve_introduction: {
|
|
1300
|
-
mutationResult: import("./opportunity.lifecycle.js").OpportunityMutationResult;
|
|
1301
|
-
};
|
|
1302
1515
|
negotiate: {
|
|
1303
1516
|
trace?: undefined;
|
|
1304
1517
|
discoveryNegotiations?: undefined;
|
|
@@ -1314,17 +1527,7 @@ export declare class OpportunityGraphFactory {
|
|
|
1314
1527
|
};
|
|
1315
1528
|
}[];
|
|
1316
1529
|
discoveryNegotiations: {
|
|
1317
|
-
counterpartyId: string;
|
|
1318
|
-
counterpartyHint: string;
|
|
1319
1530
|
indexContext: string;
|
|
1320
|
-
turns: {
|
|
1321
|
-
reasoning: string;
|
|
1322
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1323
|
-
suggestedRoles: {
|
|
1324
|
-
ownUser: "agent" | "patient" | "peer";
|
|
1325
|
-
otherUser: "agent" | "patient" | "peer";
|
|
1326
|
-
};
|
|
1327
|
-
}[];
|
|
1328
1531
|
outcome: {
|
|
1329
1532
|
reasoning: string;
|
|
1330
1533
|
hasOpportunity: boolean;
|
|
@@ -1334,9 +1537,19 @@ export declare class OpportunityGraphFactory {
|
|
|
1334
1537
|
role: "agent" | "patient" | "peer";
|
|
1335
1538
|
}[] | undefined;
|
|
1336
1539
|
};
|
|
1540
|
+
counterpartyHint: string;
|
|
1541
|
+
counterpartyId: string;
|
|
1542
|
+
turns: {
|
|
1543
|
+
reasoning: string;
|
|
1544
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1545
|
+
suggestedRoles: {
|
|
1546
|
+
ownUser: "agent" | "patient" | "peer";
|
|
1547
|
+
otherUser: "agent" | "patient" | "peer";
|
|
1548
|
+
};
|
|
1549
|
+
}[];
|
|
1337
1550
|
seedAssessmentScore?: number | undefined;
|
|
1338
1551
|
}[];
|
|
1339
|
-
discoverySummary: import("../../
|
|
1552
|
+
discoverySummary: import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary;
|
|
1340
1553
|
} | {
|
|
1341
1554
|
trace: ({
|
|
1342
1555
|
node: string;
|
|
@@ -1359,17 +1572,7 @@ export declare class OpportunityGraphFactory {
|
|
|
1359
1572
|
};
|
|
1360
1573
|
})[];
|
|
1361
1574
|
discoveryNegotiations: {
|
|
1362
|
-
counterpartyId: string;
|
|
1363
|
-
counterpartyHint: string;
|
|
1364
1575
|
indexContext: string;
|
|
1365
|
-
turns: {
|
|
1366
|
-
reasoning: string;
|
|
1367
|
-
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1368
|
-
suggestedRoles: {
|
|
1369
|
-
ownUser: "agent" | "patient" | "peer";
|
|
1370
|
-
otherUser: "agent" | "patient" | "peer";
|
|
1371
|
-
};
|
|
1372
|
-
}[];
|
|
1373
1576
|
outcome: {
|
|
1374
1577
|
reasoning: string;
|
|
1375
1578
|
hasOpportunity: boolean;
|
|
@@ -1379,9 +1582,19 @@ export declare class OpportunityGraphFactory {
|
|
|
1379
1582
|
role: "agent" | "patient" | "peer";
|
|
1380
1583
|
}[] | undefined;
|
|
1381
1584
|
};
|
|
1585
|
+
counterpartyHint: string;
|
|
1586
|
+
counterpartyId: string;
|
|
1587
|
+
turns: {
|
|
1588
|
+
reasoning: string;
|
|
1589
|
+
action: "propose" | "accept" | "reject" | "counter" | "question" | "outreach" | "withdraw" | "decline" | "ask_user";
|
|
1590
|
+
suggestedRoles: {
|
|
1591
|
+
ownUser: "agent" | "patient" | "peer";
|
|
1592
|
+
otherUser: "agent" | "patient" | "peer";
|
|
1593
|
+
};
|
|
1594
|
+
}[];
|
|
1382
1595
|
seedAssessmentScore?: number | undefined;
|
|
1383
1596
|
}[];
|
|
1384
|
-
discoverySummary: import("../../
|
|
1597
|
+
discoverySummary: import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary;
|
|
1385
1598
|
} | {
|
|
1386
1599
|
trace: {
|
|
1387
1600
|
node: string;
|
|
@@ -1392,7 +1605,7 @@ export declare class OpportunityGraphFactory {
|
|
|
1392
1605
|
};
|
|
1393
1606
|
}[];
|
|
1394
1607
|
discoveryNegotiations: never[];
|
|
1395
|
-
discoverySummary: import("../../
|
|
1608
|
+
discoverySummary: import("../../shared/schemas/discovery-question.schema.js").DiscoverySummary;
|
|
1396
1609
|
};
|
|
1397
1610
|
}, unknown, unknown, []>;
|
|
1398
1611
|
}
|