@indexnetwork/protocol 14.0.0-rc.468.1 → 14.2.0-rc.470.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 +69 -0
- package/dist/chat/chat-streaming.types.d.ts +1 -1
- package/dist/chat/chat.agent.d.ts +1 -1
- package/dist/chat/negotiator.prompt.d.ts +1 -1
- package/dist/chat/negotiator.prompt.js +1 -1
- package/dist/communities/application/indexer.graph.d.ts +1 -1
- package/dist/communities/application/indexer.state.d.ts +1 -1
- package/dist/communities/application/network.tools.d.ts +1 -1
- package/dist/communities/index.d.ts +9 -0
- package/dist/communities/index.js +8 -0
- package/dist/{capabilities → communities/ports}/communities.tools.port.d.ts +1 -1
- package/dist/communities/ports/index.d.ts +2 -2
- package/dist/communities/ports/index.js +1 -1
- package/dist/contacts/application/contact.inviter.js +1 -1
- package/dist/contacts/index.d.ts +9 -0
- package/dist/contacts/index.js +8 -0
- package/dist/enrichment/enrichment.graph.d.ts +1 -1
- package/dist/enrichment/enrichment.state.d.ts +1 -1
- package/dist/enrichment/enrichment.tools.d.ts +1 -1
- package/dist/index.d.ts +125 -125
- package/dist/index.js +85 -85
- package/dist/integrations/index.d.ts +10 -0
- package/dist/integrations/index.js +8 -0
- package/dist/mcp/mcp.authorization-policy.d.ts +8 -8
- package/dist/negotiation/application/negotiation.graph.d.ts +1 -1
- package/dist/negotiation/domain/negotiation.question-safety.js +1 -1
- package/dist/negotiation/index.d.ts +12 -0
- package/dist/negotiation/index.js +9 -0
- package/dist/opportunity/application/negotiation-context.loader.d.ts +1 -1
- package/dist/opportunity/application/opportunity.card-presentation.js +1 -1
- package/dist/opportunity/application/opportunity.discovery-negotiation-summary.js +1 -1
- package/dist/opportunity/application/opportunity.evaluator.js +1 -1
- package/dist/opportunity/application/opportunity.graph.d.ts +3 -3
- package/dist/opportunity/application/opportunity.graph.js +3 -3
- package/dist/opportunity/application/opportunity.presenter.d.ts +6 -6
- package/dist/opportunity/application/opportunity.presenter.js +1 -1
- package/dist/opportunity/application/opportunity.tools.js +1 -1
- package/dist/opportunity/discriminator/discriminator.adjustments.d.ts +1 -1
- package/dist/opportunity/discriminator/discriminator.push.d.ts +1 -1
- package/dist/opportunity/discriminator/discriminator.question.d.ts +1 -1
- package/dist/opportunity/domain/index.d.ts +1 -1
- package/dist/opportunity/domain/index.js +1 -1
- package/dist/opportunity/domain/negotiation-summary.builder.d.ts +1 -1
- package/dist/opportunity/domain/opportunity.presentation.js +1 -1
- package/dist/opportunity/domain/opportunity.safe-presentation.js +1 -1
- package/dist/opportunity/domain/opportunity.state.d.ts +1 -1
- package/dist/opportunity/index.d.ts +54 -0
- package/dist/opportunity/index.js +39 -0
- package/dist/opportunity/radar/radar.graph.d.ts +1 -1
- package/dist/opportunity/radar/radar.state.d.ts +1 -1
- package/dist/participant-agents/index.d.ts +22 -0
- package/dist/participant-agents/index.js +12 -0
- package/dist/participant-context/index.d.ts +9 -12
- package/dist/participant-context/index.js +10 -12
- package/dist/{capabilities → participant-context/ports}/participant-context.tools.port.d.ts +1 -1
- package/dist/premise/premise.graph.d.ts +1 -1
- package/dist/premise/premise.state.d.ts +1 -1
- package/dist/premise/premise.tools.d.ts +1 -1
- package/dist/questions/application/index.d.ts +1 -1
- package/dist/questions/application/index.js +1 -1
- package/dist/questions/application/question.env.d.ts +29 -0
- package/dist/questions/application/question.env.js +36 -0
- package/dist/questions/application/question.input.d.ts +1 -1
- package/dist/questions/application/question.input.js +1 -1
- package/dist/questions/application/question.presets.js +1 -1
- package/dist/questions/domain/question.schema.d.ts +3 -3
- package/dist/questions/domain/question.schema.js +2 -6
- package/dist/questions/index.d.ts +13 -0
- package/dist/questions/index.js +2 -0
- package/dist/shared/agent/tool.factory.js +13 -10
- package/dist/shared/agent/tool.registry.js +7 -7
- package/dist/shared/schemas/mcp-auth.schema.d.ts +4 -4
- package/dist/shared/schemas/underspecification.schema.d.ts +13 -0
- package/dist/shared/schemas/underspecification.schema.js +16 -0
- package/dist/signals/application/intent.clarifier.js +1 -1
- package/dist/signals/application/intent.graph.d.ts +2 -2
- package/dist/signals/application/intent.tools.d.ts +1 -1
- package/dist/signals/domain/intent.state.d.ts +1 -1
- package/dist/signals/index.d.ts +18 -0
- package/dist/signals/index.js +14 -0
- package/dist/{capabilities → signals/ports}/signals.tools.port.d.ts +1 -1
- package/package.json +1 -1
- package/dist/capabilities/communities.facade.d.ts +0 -13
- package/dist/capabilities/communities.facade.js +0 -12
- package/dist/capabilities/contacts.facade.d.ts +0 -9
- package/dist/capabilities/contacts.facade.js +0 -8
- package/dist/capabilities/integrations.facade.d.ts +0 -8
- package/dist/capabilities/integrations.facade.js +0 -7
- package/dist/capabilities/interaction-composition.facade.d.ts +0 -10
- package/dist/capabilities/interaction-composition.facade.js +0 -9
- package/dist/capabilities/negotiation.discovery.facade.d.ts +0 -9
- package/dist/capabilities/negotiation.discovery.facade.js +0 -7
- package/dist/capabilities/negotiation.facade.d.ts +0 -26
- package/dist/capabilities/negotiation.facade.js +0 -18
- package/dist/capabilities/negotiation.memory.facade.d.ts +0 -6
- package/dist/capabilities/negotiation.memory.facade.js +0 -5
- package/dist/capabilities/negotiation.questions.facade.d.ts +0 -6
- package/dist/capabilities/negotiation.questions.facade.js +0 -5
- package/dist/capabilities/negotiation.state.facade.d.ts +0 -5
- package/dist/capabilities/negotiation.state.facade.js +0 -1
- package/dist/capabilities/negotiation.summary.facade.d.ts +0 -5
- package/dist/capabilities/negotiation.summary.facade.js +0 -5
- package/dist/capabilities/opportunities.facade.d.ts +0 -56
- package/dist/capabilities/opportunities.facade.js +0 -55
- package/dist/capabilities/opportunities.safety.facade.d.ts +0 -2
- package/dist/capabilities/opportunities.safety.facade.js +0 -2
- package/dist/capabilities/participant-agents.debug.facade.d.ts +0 -2
- package/dist/capabilities/participant-agents.debug.facade.js +0 -1
- package/dist/capabilities/participant-agents.facade.d.ts +0 -34
- package/dist/capabilities/participant-agents.facade.js +0 -34
- package/dist/capabilities/participant-agents.tools.facade.d.ts +0 -8
- package/dist/capabilities/participant-agents.tools.facade.js +0 -8
- package/dist/capabilities/participant-context.facade.d.ts +0 -13
- package/dist/capabilities/participant-context.facade.js +0 -14
- package/dist/capabilities/questions.enqueue.facade.d.ts +0 -5
- package/dist/capabilities/questions.enqueue.facade.js +0 -1
- package/dist/capabilities/questions.facade.d.ts +0 -8
- package/dist/capabilities/questions.facade.js +0 -7
- package/dist/capabilities/questions.runtime.facade.d.ts +0 -5
- package/dist/capabilities/questions.runtime.facade.js +0 -5
- package/dist/capabilities/signals.facade.d.ts +0 -19
- package/dist/capabilities/signals.facade.js +0 -17
- package/dist/capabilities/signals.indexing.facade.d.ts +0 -12
- package/dist/capabilities/signals.indexing.facade.js +0 -11
- package/dist/communities/public/index.d.ts +0 -30
- package/dist/communities/public/index.js +0 -33
- package/dist/contacts/public/index.d.ts +0 -36
- package/dist/contacts/public/index.js +0 -33
- package/dist/integrations/public/index.d.ts +0 -37
- package/dist/integrations/public/index.js +0 -34
- package/dist/negotiation/public/index.d.ts +0 -63
- package/dist/negotiation/public/index.js +0 -64
- package/dist/opportunity/public/index.d.ts +0 -61
- package/dist/opportunity/public/index.js +0 -54
- package/dist/participant-agents/public/index.d.ts +0 -39
- package/dist/participant-agents/public/index.js +0 -36
- package/dist/participant-context/public/index.d.ts +0 -48
- package/dist/participant-context/public/index.js +0 -55
- package/dist/questions/public/index.d.ts +0 -47
- package/dist/questions/public/index.js +0 -49
- package/dist/signals/public/index.d.ts +0 -15
- package/dist/signals/public/index.js +0 -16
- /package/dist/{capabilities → communities/ports}/communities.tools.port.js +0 -0
- /package/dist/{capabilities → participant-context/ports}/participant-context.tools.port.js +0 -0
- /package/dist/{opportunity/domain/opportunity.claim-safety.d.ts → shared/utils/claim-safety.d.ts} +0 -0
- /package/dist/{opportunity/domain/opportunity.claim-safety.js → shared/utils/claim-safety.js} +0 -0
- /package/dist/{capabilities → signals/ports}/signals.tools.port.js +0 -0
package/dist/index.js
CHANGED
|
@@ -20,101 +20,101 @@ export { requestContext } from "./shared/observability/request-context.js";
|
|
|
20
20
|
export { setLoggerFactory } from "./shared/observability/log.js";
|
|
21
21
|
export { setTimingWrapper } from "./shared/observability/performance.js";
|
|
22
22
|
export { getToolTimeoutPolicy, invokeToolRuntime, toolRuntimeErrorToResult } from "./shared/agent/tool.runtime.js";
|
|
23
|
-
export { NegotiationSummarizer } from "./
|
|
24
|
-
export { SYSTEM_AGENT_IDS } from './
|
|
23
|
+
export { NegotiationSummarizer } from "./negotiation/index.js";
|
|
24
|
+
export { SYSTEM_AGENT_IDS } from './participant-agents/index.js';
|
|
25
25
|
// ─── Shared schemas ───────────────────────────────────────────────────────────
|
|
26
26
|
export { ChatContextDigestSchema } from "./shared/schemas/chat-context.schema.js";
|
|
27
|
-
export { NegotiationQuestionCandidateSchema, NegotiationQuestionProvenanceSchema, } from "./
|
|
27
|
+
export { NegotiationQuestionCandidateSchema, NegotiationQuestionProvenanceSchema, } from "./questions/index.js";
|
|
28
28
|
export { McpAuthInputSchema, McpApiKeyMetadataSchema, McpResolvedIdentitySchema, } from "./shared/schemas/mcp-auth.schema.js";
|
|
29
29
|
export { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision } from "./shared/assignment/network-assignment.policy.js";
|
|
30
|
-
export { buildCandidateEvidence } from "./
|
|
30
|
+
export { buildCandidateEvidence } from "./opportunity/index.js";
|
|
31
31
|
// ─── Graph factories ──────────────────────────────────────────────────────────
|
|
32
|
-
export { ChatGraphFactory } from "./
|
|
33
|
-
export { NEGOTIATOR_PERSONA_ID, createNegotiatorPersona } from "./
|
|
34
|
-
export { SIGNAL_PERSONA_ID, SIGNAL_PERSONA, SIGNAL_NEW_SIGNAL_KICKOFF, SIGNAL_TOOL_NAMES, createSignalTools, filterSignalTools, narrowSignalTools, } from "./
|
|
35
|
-
export { REPORTER_PERSONA_ID, REPORTER_PERSONA, REPORTER_BRIEFING_KICKOFF, REPORTER_TOOL_NAMES, createReporterTools, filterReporterTools, narrowReporterTools, } from "./
|
|
36
|
-
export { ONBOARDING_PERSONA_ID, ONBOARDING_PERSONA, ONBOARDING_PROFILE_KICKOFF, ONBOARDING_TOOL_NAMES, createOnboardingTools, filterOnboardingTools, narrowOnboardingTools, } from "./
|
|
37
|
-
export { RadarGraphFactory } from "./
|
|
38
|
-
export { HydeGraphFactory } from "./
|
|
39
|
-
export { NetworkGraphFactory } from "./
|
|
40
|
-
export { NetworkMembershipGraphFactory } from "./
|
|
41
|
-
export { IntentGraphFactory } from "./
|
|
42
|
-
export { SemanticVerifier } from "./
|
|
43
|
-
export { IntentNetworkGraphFactory } from "./
|
|
44
|
-
export { MaintenanceGraphFactory } from "./
|
|
45
|
-
export { NegotiationGraphFactory, negotiateCandidates } from "./
|
|
46
|
-
export { OpportunityGraphFactory } from "./
|
|
47
|
-
export { hasUnsupportedOpportunityClaim } from "./
|
|
48
|
-
export { opportunityOwnerActionForStatus, bindOwnerApprovalProvenance } from "./
|
|
49
|
-
export { EnrichmentGraphFactory } from "./
|
|
50
|
-
export { PremiseGraphFactory } from "./
|
|
32
|
+
export { ChatGraphFactory } from "./participant-agents/index.js";
|
|
33
|
+
export { NEGOTIATOR_PERSONA_ID, createNegotiatorPersona } from "./participant-agents/index.js";
|
|
34
|
+
export { SIGNAL_PERSONA_ID, SIGNAL_PERSONA, SIGNAL_NEW_SIGNAL_KICKOFF, SIGNAL_TOOL_NAMES, createSignalTools, filterSignalTools, narrowSignalTools, } from "./participant-agents/index.js";
|
|
35
|
+
export { REPORTER_PERSONA_ID, REPORTER_PERSONA, REPORTER_BRIEFING_KICKOFF, REPORTER_TOOL_NAMES, createReporterTools, filterReporterTools, narrowReporterTools, } from "./participant-agents/index.js";
|
|
36
|
+
export { ONBOARDING_PERSONA_ID, ONBOARDING_PERSONA, ONBOARDING_PROFILE_KICKOFF, ONBOARDING_TOOL_NAMES, createOnboardingTools, filterOnboardingTools, narrowOnboardingTools, } from "./participant-agents/index.js";
|
|
37
|
+
export { RadarGraphFactory } from "./opportunity/index.js";
|
|
38
|
+
export { HydeGraphFactory } from "./participant-context/index.js";
|
|
39
|
+
export { NetworkGraphFactory } from "./communities/index.js";
|
|
40
|
+
export { NetworkMembershipGraphFactory } from "./communities/index.js";
|
|
41
|
+
export { IntentGraphFactory } from "./signals/index.js";
|
|
42
|
+
export { SemanticVerifier } from "./signals/index.js";
|
|
43
|
+
export { IntentNetworkGraphFactory } from "./communities/index.js";
|
|
44
|
+
export { MaintenanceGraphFactory } from "./maintenance/maintenance.graph.js";
|
|
45
|
+
export { NegotiationGraphFactory, negotiateCandidates } from "./negotiation/index.js";
|
|
46
|
+
export { OpportunityGraphFactory } from "./opportunity/index.js";
|
|
47
|
+
export { hasUnsupportedOpportunityClaim } from "./opportunity/index.js";
|
|
48
|
+
export { opportunityOwnerActionForStatus, bindOwnerApprovalProvenance } from "./opportunity/index.js";
|
|
49
|
+
export { EnrichmentGraphFactory } from "./participant-context/index.js";
|
|
50
|
+
export { PremiseGraphFactory } from "./participant-context/index.js";
|
|
51
51
|
// ─── Agents ───────────────────────────────────────────────────────────────────
|
|
52
|
-
export { UserContextGenerator } from "./
|
|
53
|
-
export { ChatTitleGenerator } from "./
|
|
54
|
-
export { ChatInterruptClassifier } from "./
|
|
55
|
-
export { ChatSummarizer } from "./
|
|
56
|
-
export { HydeGenerator } from "./
|
|
57
|
-
export { SuggestionGenerator } from "./
|
|
58
|
-
export { generateInviteMessage } from "./
|
|
59
|
-
export { IntentIndexer } from "./
|
|
60
|
-
export { SignalIntakePackGenerator, normalizeIntakePack } from "./
|
|
61
|
-
export { SignalIntakeOrchestrator, answerLabel, FALLBACK_WHO_QUESTION, FALLBACK_BRING_QUESTION, } from "./
|
|
62
|
-
export { normalizeIntentDescription } from "./
|
|
63
|
-
export { LensInferrer } from "./
|
|
64
|
-
export { NegotiationInsightsGenerator } from "./
|
|
65
|
-
export { IndexNegotiator } from "./
|
|
66
|
-
export { NegotiationScreener } from "./
|
|
67
|
-
export { NegotiationReflector } from "./
|
|
68
|
-
export { QuestionerAgent } from "./
|
|
69
|
-
export { isValidQuestionerInputContract } from "./
|
|
70
|
-
export { isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold } from "./
|
|
71
|
-
export { PoolDiscriminatorMiner } from "./
|
|
72
|
-
export { PoolDiscriminatorAssigner } from "./
|
|
73
|
-
export { runPoolDiscriminatorShadow } from "./
|
|
74
|
-
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MAX_PENDING_PER_INTENT, } from "./
|
|
75
|
-
export { poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS } from "./
|
|
52
|
+
export { UserContextGenerator } from "./participant-context/index.js";
|
|
53
|
+
export { ChatTitleGenerator } from "./participant-agents/index.js";
|
|
54
|
+
export { ChatInterruptClassifier } from "./participant-agents/index.js";
|
|
55
|
+
export { ChatSummarizer } from "./participant-agents/index.js";
|
|
56
|
+
export { HydeGenerator } from "./participant-context/index.js";
|
|
57
|
+
export { SuggestionGenerator } from "./participant-agents/index.js";
|
|
58
|
+
export { generateInviteMessage } from "./contacts/index.js";
|
|
59
|
+
export { IntentIndexer } from "./signals/index.js";
|
|
60
|
+
export { SignalIntakePackGenerator, normalizeIntakePack } from "./signals/index.js";
|
|
61
|
+
export { SignalIntakeOrchestrator, answerLabel, FALLBACK_WHO_QUESTION, FALLBACK_BRING_QUESTION, } from "./signals/index.js";
|
|
62
|
+
export { normalizeIntentDescription } from "./signals/index.js";
|
|
63
|
+
export { LensInferrer } from "./participant-context/index.js";
|
|
64
|
+
export { NegotiationInsightsGenerator } from "./negotiation/index.js";
|
|
65
|
+
export { IndexNegotiator } from "./negotiation/index.js";
|
|
66
|
+
export { NegotiationScreener } from "./negotiation/index.js";
|
|
67
|
+
export { NegotiationReflector } from "./negotiation/index.js";
|
|
68
|
+
export { QuestionerAgent } from "./questions/index.js";
|
|
69
|
+
export { isValidQuestionerInputContract } from "./questions/index.js";
|
|
70
|
+
export { isQuestionerEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, intentQuestionDailyCap, INTENT_QUESTION_DAILY_CAP_DEFAULT, INTENT_QUESTION_DAILY_WINDOW_HOURS } from "./questions/index.js";
|
|
71
|
+
export { PoolDiscriminatorMiner } from "./opportunity/index.js";
|
|
72
|
+
export { PoolDiscriminatorAssigner } from "./opportunity/index.js";
|
|
73
|
+
export { runPoolDiscriminatorShadow } from "./opportunity/index.js";
|
|
74
|
+
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MAX_PENDING_PER_INTENT, } from "./opportunity/index.js";
|
|
75
|
+
export { poolQuestionsRanking, POOL_RERUN_DEBOUNCE_MS } from "./opportunity/index.js";
|
|
76
76
|
// Discovery env accessors (IND-XXX)
|
|
77
|
-
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./
|
|
78
|
-
export { poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS } from "./
|
|
79
|
-
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment } from "./
|
|
80
|
-
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from "./
|
|
81
|
-
export { poolQuestionCycleKey, buildPoolQuestionPushMessage } from "./
|
|
77
|
+
export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./opportunity/index.js";
|
|
78
|
+
export { poolQuestionsVisitTrigger, POOL_VISIT_MINING_DEBOUNCE_MS } from "./opportunity/index.js";
|
|
79
|
+
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment } from "./opportunity/index.js";
|
|
80
|
+
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from "./opportunity/index.js";
|
|
81
|
+
export { poolQuestionCycleKey, buildPoolQuestionPushMessage } from "./opportunity/index.js";
|
|
82
82
|
// Lens C — negotiation-evidence questions (IND-433, shadow).
|
|
83
|
-
export { negotiationEvidenceQuestionsMode, NEGOTIATION_EVIDENCE_MAX_OPPORTUNITIES } from "./
|
|
84
|
-
export { NegotiationEvidenceMiner } from "./
|
|
85
|
-
export { runNegotiationEvidenceShadow } from "./
|
|
83
|
+
export { negotiationEvidenceQuestionsMode, NEGOTIATION_EVIDENCE_MAX_OPPORTUNITIES } from "./opportunity/index.js";
|
|
84
|
+
export { NegotiationEvidenceMiner } from "./opportunity/index.js";
|
|
85
|
+
export { runNegotiationEvidenceShadow } from "./opportunity/index.js";
|
|
86
86
|
// Lens B — outcome-question shadow (IND-434)
|
|
87
|
-
export { isOutcomeQuestionsActivated, OUTCOME_MIN_INDEPENDENT_EXAMPLES, OUTCOME_MAX_CANDIDATES, OUTCOME_MAX_PUBLIC_CONTEXT_CHARS } from "./
|
|
88
|
-
export { runOutcomeShadow } from "./
|
|
89
|
-
export { OpportunityEvaluator } from "./
|
|
90
|
-
export { OpportunityPresenter, gatherPresenterContext } from "./
|
|
87
|
+
export { isOutcomeQuestionsActivated, OUTCOME_MIN_INDEPENDENT_EXAMPLES, OUTCOME_MAX_CANDIDATES, OUTCOME_MAX_PUBLIC_CONTEXT_CHARS } from "./opportunity/index.js";
|
|
88
|
+
export { runOutcomeShadow } from "./opportunity/index.js";
|
|
89
|
+
export { OpportunityEvaluator } from "./opportunity/index.js";
|
|
90
|
+
export { OpportunityPresenter, gatherPresenterContext } from "./opportunity/index.js";
|
|
91
91
|
// ─── Support utilities ────────────────────────────────────────────────────────
|
|
92
|
-
export { canUserSeeOpportunity, isActionableForViewer, validateOpportunityActors, classifyOpportunity, selectByComposition, RADAR_SOFT_TARGETS } from "./
|
|
93
|
-
export { getPrimaryActionLabel } from "./
|
|
94
|
-
export { computeRadarHealth } from "./
|
|
95
|
-
export { isIntroducerDiscoveryEnabled } from "./
|
|
96
|
-
export { selectContactsForDiscovery, shouldRunIntroducerDiscovery, runIntroducerDiscovery, MAX_CONTACTS_PER_CYCLE, MAX_CANDIDATES_PER_CONTACT, INTRODUCER_DISCOVERY_SOURCE } from "./
|
|
97
|
-
export { persistOpportunities } from "./
|
|
98
|
-
export { presentOpportunity } from "./
|
|
99
|
-
export { stripUuids, truncateAtBoundary } from "./
|
|
100
|
-
export { stripUnsupportedOpportunityClaims } from "./
|
|
101
|
-
export { safeFallbackSummary, DEFAULT_FALLBACK_HEADLINE } from "./
|
|
102
|
-
export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey } from "./
|
|
103
|
-
export { getOrCreateDeliveryCardBatch } from "./
|
|
92
|
+
export { canUserSeeOpportunity, isActionableForViewer, validateOpportunityActors, classifyOpportunity, selectByComposition, RADAR_SOFT_TARGETS } from "./opportunity/index.js";
|
|
93
|
+
export { getPrimaryActionLabel } from "./opportunity/index.js";
|
|
94
|
+
export { computeRadarHealth } from "./opportunity/index.js";
|
|
95
|
+
export { isIntroducerDiscoveryEnabled } from "./opportunity/index.js";
|
|
96
|
+
export { selectContactsForDiscovery, shouldRunIntroducerDiscovery, runIntroducerDiscovery, MAX_CONTACTS_PER_CYCLE, MAX_CANDIDATES_PER_CONTACT, INTRODUCER_DISCOVERY_SOURCE } from "./opportunity/index.js";
|
|
97
|
+
export { persistOpportunities } from "./opportunity/index.js";
|
|
98
|
+
export { presentOpportunity } from "./opportunity/index.js";
|
|
99
|
+
export { stripUuids, truncateAtBoundary } from "./opportunity/index.js";
|
|
100
|
+
export { stripUnsupportedOpportunityClaims } from "./opportunity/index.js";
|
|
101
|
+
export { safeFallbackSummary, DEFAULT_FALLBACK_HEADLINE } from "./opportunity/index.js";
|
|
102
|
+
export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey } from "./opportunity/index.js";
|
|
103
|
+
export { getOrCreateDeliveryCardBatch } from "./opportunity/index.js";
|
|
104
104
|
// ─── Tools ────────────────────────────────────────────────────────────────────
|
|
105
105
|
export { createToolRegistry } from "./shared/agent/tool.registry.js";
|
|
106
106
|
// Capability-owned tool entry points. These are explicit, narrow contracts;
|
|
107
107
|
// capability implementation directories remain private to the package.
|
|
108
|
-
export { createIntentTools } from "./
|
|
109
|
-
export { createEnrichmentTools, createPremiseTools } from "./
|
|
110
|
-
export { createNetworkTools } from "./
|
|
111
|
-
export { createOpportunityTools } from "./
|
|
112
|
-
export { createNegotiationTools } from "./
|
|
113
|
-
export { createQuestionerTools, createAskUserQuestionTools } from "./
|
|
114
|
-
export { createChatTools, createAgentTools } from "./
|
|
115
|
-
export { createContactTools } from "./
|
|
116
|
-
export { createIntegrationTools } from "./
|
|
117
|
-
export { AMBIENT_PARK_WINDOW_MS } from './
|
|
108
|
+
export { createIntentTools } from "./signals/index.js";
|
|
109
|
+
export { createEnrichmentTools, createPremiseTools } from "./participant-context/index.js";
|
|
110
|
+
export { createNetworkTools } from "./communities/index.js";
|
|
111
|
+
export { createOpportunityTools } from "./opportunity/index.js";
|
|
112
|
+
export { createNegotiationTools } from "./negotiation/index.js";
|
|
113
|
+
export { createQuestionerTools, createAskUserQuestionTools } from "./questions/index.js";
|
|
114
|
+
export { createChatTools, createAgentTools } from "./participant-agents/index.js";
|
|
115
|
+
export { createContactTools } from "./contacts/index.js";
|
|
116
|
+
export { createIntegrationTools } from "./integrations/index.js";
|
|
117
|
+
export { AMBIENT_PARK_WINDOW_MS } from './negotiation/index.js';
|
|
118
118
|
export { normalizeTelegramHandle } from './shared/utils/telegram-handle.js';
|
|
119
119
|
// ─── MCP ──────────────────────────────────────────────────────────────────────
|
|
120
120
|
export { createMcpServer, buildMcpOnboardingMessage, ONBOARDING_ALLOWED } from "./mcp/mcp.server.js";
|
|
@@ -123,8 +123,8 @@ export { ActivityQuestionCountsSchema, ActivityQuestionDomainSchema, ActivitySum
|
|
|
123
123
|
// ─── States (for advanced graph consumers) ────────────────────────────────────
|
|
124
124
|
// @experimental — internal graph-state shapes; may change in a minor release.
|
|
125
125
|
export { AskUserPayloadSchema, NEGOTIATION_CONSULTATION_REASONS, NegotiationConsultationReasonSchema, } from "./shared/schemas/negotiation-state.schema.js";
|
|
126
|
-
export { HERMES_OWNER_DIRECTIVE, HERMES_SHARED_MESSAGE_TEMPLATES, HermesNegotiationActionSchema, HermesNegotiationResponseSchema, HermesOwnerDirectiveSchema, HermesRoleAlignmentSchema, allowedHermesActionsFor, buildHermesNegotiationTurn, } from "./
|
|
126
|
+
export { HERMES_OWNER_DIRECTIVE, HERMES_SHARED_MESSAGE_TEMPLATES, HermesNegotiationActionSchema, HermesNegotiationResponseSchema, HermesOwnerDirectiveSchema, HermesRoleAlignmentSchema, allowedHermesActionsFor, buildHermesNegotiationTurn, } from "./negotiation/index.js";
|
|
127
127
|
// ─── Negotiation seat rules (v2 client-advocate protocol) ───────────────────
|
|
128
|
-
export { DEFAULT_NEGOTIATION_MAX_TURNS, isNegotiationTurnCapReached, expectedNegotiationSpeaker, allowedActionsFor, askUserAnswerWindowMs, configuredAskUserEnabled, isTerminalAction, isRejectLikeAction, readProtocolVersion, resolveSeat, seatViolationMessage } from "./
|
|
129
|
-
export { assessConsultationEligibility, consultationPromptFor, negotiationConsultationPolicyMode } from "./
|
|
130
|
-
export { NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY, isSafeNegotiationQuestionText, negotiationQuestionSettlementId, validateInflightAskUserFields, } from "./
|
|
128
|
+
export { DEFAULT_NEGOTIATION_MAX_TURNS, isNegotiationTurnCapReached, expectedNegotiationSpeaker, allowedActionsFor, askUserAnswerWindowMs, configuredAskUserEnabled, isTerminalAction, isRejectLikeAction, readProtocolVersion, resolveSeat, seatViolationMessage } from "./negotiation/index.js";
|
|
129
|
+
export { assessConsultationEligibility, consultationPromptFor, negotiationConsultationPolicyMode } from "./negotiation/index.js";
|
|
130
|
+
export { NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY, isSafeNegotiationQuestionText, negotiationQuestionSettlementId, validateInflightAskUserFields, } from "./negotiation/index.js";
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* integrations — the capability's sole cross-capability surface.
|
|
3
|
+
*
|
|
4
|
+
* Anything outside this capability imports from here and nowhere else.
|
|
5
|
+
* Supersedes the capabilities/*.facade.ts + integrations/public/ pair; the export
|
|
6
|
+
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export { createIntegrationTools, } from "./application/index.js";
|
|
9
|
+
export type { IntegrationConnection, IntegrationSession, IntegrationSessionOptions, ToolActionResponse, } from "./domain/index.js";
|
|
10
|
+
export type { IntegrationAdapter, IntegrationToolDeps, } from "./ports/index.js";
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* integrations — the capability's sole cross-capability surface.
|
|
3
|
+
*
|
|
4
|
+
* Anything outside this capability imports from here and nowhere else.
|
|
5
|
+
* Supersedes the capabilities/*.facade.ts + integrations/public/ pair; the export
|
|
6
|
+
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export { createIntegrationTools, } from "./application/index.js";
|
|
@@ -13,10 +13,10 @@ export declare const McpToolPermissionRequirementSchema: z.ZodObject<{
|
|
|
13
13
|
*/
|
|
14
14
|
reach: z.ZodDefault<z.ZodEnum<["principal", "network"]>>;
|
|
15
15
|
}, "strict", z.ZodTypeAny, {
|
|
16
|
-
action: "manage:
|
|
16
|
+
action: "manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks";
|
|
17
17
|
reach: "network" | "principal";
|
|
18
18
|
}, {
|
|
19
|
-
action: "manage:
|
|
19
|
+
action: "manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks";
|
|
20
20
|
reach?: "network" | "principal" | undefined;
|
|
21
21
|
}>;
|
|
22
22
|
export type McpToolPermissionRequirement = z.infer<typeof McpToolPermissionRequirementSchema>;
|
|
@@ -38,19 +38,19 @@ export declare const McpToolAccessRuleSchema: z.ZodEffects<z.ZodObject<{
|
|
|
38
38
|
}, "strict", z.ZodTypeAny, {
|
|
39
39
|
reach: "network" | "principal";
|
|
40
40
|
access: "removed" | "permission" | "authenticated" | "human_only" | "agent_admin" | "informational" | "delivery_only";
|
|
41
|
-
actions?: ("manage:
|
|
41
|
+
actions?: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[] | undefined;
|
|
42
42
|
}, {
|
|
43
43
|
reach: "network" | "principal";
|
|
44
44
|
access: "removed" | "permission" | "authenticated" | "human_only" | "agent_admin" | "informational" | "delivery_only";
|
|
45
|
-
actions?: ("manage:
|
|
45
|
+
actions?: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[] | undefined;
|
|
46
46
|
}>, {
|
|
47
47
|
reach: "network" | "principal";
|
|
48
48
|
access: "removed" | "permission" | "authenticated" | "human_only" | "agent_admin" | "informational" | "delivery_only";
|
|
49
|
-
actions?: ("manage:
|
|
49
|
+
actions?: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[] | undefined;
|
|
50
50
|
}, {
|
|
51
51
|
reach: "network" | "principal";
|
|
52
52
|
access: "removed" | "permission" | "authenticated" | "human_only" | "agent_admin" | "informational" | "delivery_only";
|
|
53
|
-
actions?: ("manage:
|
|
53
|
+
actions?: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[] | undefined;
|
|
54
54
|
}>;
|
|
55
55
|
export type McpToolAccessRule = z.infer<typeof McpToolAccessRuleSchema>;
|
|
56
56
|
export type McpToolAccessRuleMap = ReadonlyMap<string, McpToolAccessRule>;
|
|
@@ -132,7 +132,7 @@ export declare const McpCapabilitySubjectSchema: z.ZodObject<{
|
|
|
132
132
|
}, "strict", z.ZodTypeAny, {
|
|
133
133
|
userId: string;
|
|
134
134
|
profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "hermes_agent" | "delivery_agent" | "invalid_agent";
|
|
135
|
-
permissions: ("manage:
|
|
135
|
+
permissions: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[];
|
|
136
136
|
networkScopeId: string | null;
|
|
137
137
|
isOnboarding: boolean;
|
|
138
138
|
agentId?: string | undefined;
|
|
@@ -140,7 +140,7 @@ export declare const McpCapabilitySubjectSchema: z.ZodObject<{
|
|
|
140
140
|
}, {
|
|
141
141
|
userId: string;
|
|
142
142
|
profile: "session_human" | "onboarding_human" | "enrollment_key" | "unregistered_key" | "registered_global_agent" | "registered_network_agent" | "hermes_agent" | "delivery_agent" | "invalid_agent";
|
|
143
|
-
permissions: ("manage:
|
|
143
|
+
permissions: ("manage:intents" | "manage:opportunities" | "manage:negotiations" | "manage:identity" | "manage:premises" | "manage:networks")[];
|
|
144
144
|
networkScopeId: string | null;
|
|
145
145
|
isOnboarding: boolean;
|
|
146
146
|
agentId?: string | undefined;
|
|
@@ -7,7 +7,7 @@ import { type NegotiationConsultationReason } from "../domain/negotiation.consul
|
|
|
7
7
|
import { type ScreenDecisionRecord } from "./negotiation.screen.js";
|
|
8
8
|
import { type DeadlockShiftRecord } from "../domain/negotiation.deadlock.js";
|
|
9
9
|
import type { NegotiationProtocolVersion } from "../../shared/schemas/negotiation-state.schema.js";
|
|
10
|
-
import type { QuestionerEnqueueFn } from "../../
|
|
10
|
+
import type { QuestionerEnqueueFn } from "../../questions/index.js";
|
|
11
11
|
import type { ReflectEnqueueFn } from "./negotiation.reflect.js";
|
|
12
12
|
import type { NegotiatorMemoryEntry, NegotiatorMemoryRetrieveFn } from "../domain/negotiation.memory.js";
|
|
13
13
|
/**
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasUnsupportedOpportunityClaim } from '../../
|
|
1
|
+
import { hasUnsupportedOpportunityClaim } from '../../shared/utils/claim-safety.js';
|
|
2
2
|
/** Fixed prompt-safe labels; producers must not replace them with raw network/counterparty text. */
|
|
3
3
|
export const NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY = 'the other participant';
|
|
4
4
|
export const NEGOTIATION_QUESTION_GENERIC_NETWORK = 'the selected network';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* negotiation — the capability's sole cross-capability surface.
|
|
3
|
+
*
|
|
4
|
+
* Anything outside this capability imports from here and nowhere else.
|
|
5
|
+
* Supersedes the capabilities/*.facade.ts + negotiation/public/ pair; the export
|
|
6
|
+
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export { AMBIENT_PARK_WINDOW_MS, buildFallbackDigest, createNegotiationTools, IndexNegotiator, negotiateCandidates, NegotiationGraphFactory, NegotiationInsightsGenerator, NegotiationReflector, NegotiationScreener, NegotiationSummarizer, } from "./application/index.js";
|
|
9
|
+
export type { ChatReflectionInput, DistilledMemory, NegotiationCandidate, NegotiationDigest, NegotiationReflectionInput, NegotiationReflectJobData, OnNegotiationResolved, ReflectEnqueueFn, ReflectionTranscriptEntry, } from "./application/index.js";
|
|
10
|
+
export { allowedActionsFor, allowedHermesActionsFor, ASK_USER_LOCK_SLACK_MS, askUserAnswerWindowMs, assessConsultationEligibility, buildHermesNegotiationTurn, configuredAskUserEnabled, consultationPromptFor, DEFAULT_NEGOTIATION_MAX_TURNS, expectedNegotiationSpeaker, HERMES_OWNER_DIRECTIVE, HERMES_SHARED_MESSAGE_TEMPLATES, HermesNegotiationActionSchema, HermesNegotiationResponseSchema, HermesOwnerDirectiveSchema, HermesRoleAlignmentSchema, isNegotiationTurnCapReached, isRejectLikeAction, isSafeNegotiationQuestionText, isTerminalAction, NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY, negotiationConsultationPolicyMode, negotiationQuestionSettlementId, readProtocolVersion, renderNegotiatorChatMemorySection, resolveSeat, seatViolationMessage, validateInflightAskUserFields, } from "./domain/index.js";
|
|
11
|
+
export type { ConsultationEligibility, ConsultationEligibilityInput, HermesNegotiationAction, HermesNegotiationResponse, HermesOwnerDirective, HermesRoleAlignment, NegotiationConsultationPolicyMode, NegotiationConsultationReason, NegotiationGraphLike, NegotiationOutcome, NegotiationSpeakerMessage, NegotiationSpeakerParticipants, NegotiationTurn, NegotiatorMemoryEntry, UserNegotiationContext, } from "./domain/index.js";
|
|
12
|
+
export type { NegotiationToolDeps, } from "./ports/index.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* negotiation — the capability's sole cross-capability surface.
|
|
3
|
+
*
|
|
4
|
+
* Anything outside this capability imports from here and nowhere else.
|
|
5
|
+
* Supersedes the capabilities/*.facade.ts + negotiation/public/ pair; the export
|
|
6
|
+
* list is the union of the facades it replaces, so the contract is unchanged.
|
|
7
|
+
*/
|
|
8
|
+
export { AMBIENT_PARK_WINDOW_MS, buildFallbackDigest, createNegotiationTools, IndexNegotiator, negotiateCandidates, NegotiationGraphFactory, NegotiationInsightsGenerator, NegotiationReflector, NegotiationScreener, NegotiationSummarizer, } from "./application/index.js";
|
|
9
|
+
export { allowedActionsFor, allowedHermesActionsFor, ASK_USER_LOCK_SLACK_MS, askUserAnswerWindowMs, assessConsultationEligibility, buildHermesNegotiationTurn, configuredAskUserEnabled, consultationPromptFor, DEFAULT_NEGOTIATION_MAX_TURNS, expectedNegotiationSpeaker, HERMES_OWNER_DIRECTIVE, HERMES_SHARED_MESSAGE_TEMPLATES, HermesNegotiationActionSchema, HermesNegotiationResponseSchema, HermesOwnerDirectiveSchema, HermesRoleAlignmentSchema, isNegotiationTurnCapReached, isRejectLikeAction, isSafeNegotiationQuestionText, isTerminalAction, NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY, negotiationConsultationPolicyMode, negotiationQuestionSettlementId, readProtocolVersion, renderNegotiatorChatMemorySection, resolveSeat, seatViolationMessage, validateInflightAskUserFields, } from "./domain/index.js";
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
* private gate decision as a "counterparty declined" event.
|
|
20
20
|
*/
|
|
21
21
|
import type { NegotiationGraphDatabase, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
|
|
22
|
-
import type { NegotiationOutcome, NegotiationTurn } from '../../
|
|
22
|
+
import type { NegotiationOutcome, NegotiationTurn } from '../../negotiation/index.js';
|
|
23
23
|
/**
|
|
24
24
|
* Narrow slice of {@link NegotiationGraphDatabase} required by the loader. Kept
|
|
25
25
|
* minimal so call sites can opt into a smaller surface.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { stripUnsupportedOpportunityClaims } from '
|
|
1
|
+
import { stripUnsupportedOpportunityClaims } from '../../shared/utils/claim-safety.js';
|
|
2
2
|
import { stripUuids } from '../domain/opportunity.presentation.js';
|
|
3
3
|
const CODE_FENCE = String.fromCharCode(96, 96, 96);
|
|
4
4
|
function sanitizeJsonForCodeFence(json) {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildFallbackDigest } from '../../
|
|
1
|
+
import { buildFallbackDigest } from '../../negotiation/index.js';
|
|
2
2
|
import { protocolLogger } from '../../shared/observability/protocol.logger.js';
|
|
3
3
|
import { traceAgent } from '../../shared/observability/trace.js';
|
|
4
4
|
const logger = protocolLogger('OpportunityDiscoveryNegotiationSummary');
|
|
@@ -16,7 +16,7 @@ import { stripUuids } from "../domain/opportunity.presentation.js";
|
|
|
16
16
|
import { createStructuredModel } from "../../shared/agent/model.config.js";
|
|
17
17
|
import { invokeWithAbortSignal } from "../../shared/agent/model-signal.js";
|
|
18
18
|
import { renderOpportunityEvidenceForPrompt } from '../domain/opportunity.evidence.js';
|
|
19
|
-
import { hasUnsupportedOpportunityClaim } from '
|
|
19
|
+
import { hasUnsupportedOpportunityClaim } from '../../shared/utils/claim-safety.js';
|
|
20
20
|
import { normalizeOpportunityActorIntent } from '../domain/opportunity.actor.js';
|
|
21
21
|
const logger = protocolLogger("OpportunityEvaluator");
|
|
22
22
|
const invokeLog = protocolLogger("OpportunityEvaluator:invoke");
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* Constructor injects Database, Embedder, and compiled HyDE graph.
|
|
13
13
|
*/
|
|
14
14
|
import type { Id, NegotiationContinuationReceipt } from '../../shared/interfaces/database.interface.js';
|
|
15
|
-
import type { DebugMetaAgent } from '../../
|
|
15
|
+
import type { DebugMetaAgent } from '../../participant-agents/index.js';
|
|
16
16
|
import { type IndexedIntent, type SourceProfileData, type TargetNetwork, type CandidateMatch, type EvaluatedOpportunity, type EvaluatedOpportunityActor } from '../domain/opportunity.state.js';
|
|
17
17
|
import { type CandidateProfile, type EvaluatorEntity, type EvaluatorInput } from './opportunity.evaluator.js';
|
|
18
18
|
import type { OpportunityGraphDatabase } from '../../shared/interfaces/database.interface.js';
|
|
@@ -44,7 +44,7 @@ export type OpportunityEvaluatorLike = {
|
|
|
44
44
|
};
|
|
45
45
|
import type { Embedder } from '../../shared/interfaces/embedder.interface.js';
|
|
46
46
|
import type { Opportunity, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
|
|
47
|
-
import type { NegotiationGraphLike } from "../../
|
|
47
|
+
import type { NegotiationGraphLike } from "../../negotiation/index.js";
|
|
48
48
|
import type { AgentDispatcher } from "../../shared/interfaces/agent-dispatcher.interface.js";
|
|
49
49
|
import { type QueueOpportunityNotificationFn } from './opportunity.lifecycle.js';
|
|
50
50
|
import { type StampNewbornOpportunitiesFn } from './opportunity.newborn-stamping.js';
|
|
@@ -414,7 +414,7 @@ export declare class OpportunityGraphFactory {
|
|
|
414
414
|
seedAssessmentScore?: number | undefined;
|
|
415
415
|
}[]> | undefined;
|
|
416
416
|
discoverySummary?: import("../../index.js").DiscoverySummary | import("@langchain/langgraph").OverwriteValue<import("../../index.js").DiscoverySummary | null> | null | undefined;
|
|
417
|
-
}, "scope" | "send" | "update" | "
|
|
417
|
+
}, "scope" | "send" | "update" | "discovery" | "__start__" | "read" | "prep" | "negotiate_existing" | "approve_introduction" | "persist" | "resolve" | "evaluation" | "ranking" | "intro_validation" | "intro_evaluation" | "delete_opp" | "negotiate", {
|
|
418
418
|
userId: import("@langchain/langgraph").BaseChannel<Id<"users">, Id<"users"> | import("@langchain/langgraph").OverwriteValue<Id<"users">>, unknown>;
|
|
419
419
|
searchQuery: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
420
420
|
networkId: import("@langchain/langgraph").BaseChannel<Id<"networks"> | undefined, Id<"networks"> | import("@langchain/langgraph").OverwriteValue<Id<"networks"> | undefined> | undefined, unknown>;
|
|
@@ -14,16 +14,16 @@
|
|
|
14
14
|
import { StateGraph, START, END } from '@langchain/langgraph';
|
|
15
15
|
import { OpportunityGraphState } from '../domain/opportunity.state.js';
|
|
16
16
|
import { OpportunityEvaluator } from './opportunity.evaluator.js';
|
|
17
|
-
import { IntentIndexer } from '../../
|
|
17
|
+
import { IntentIndexer } from '../../signals/index.js';
|
|
18
18
|
import { getModelName } from '../../shared/agent/model.config.js';
|
|
19
19
|
import { selectHydeDocumentsForGeneration } from '../../shared/hyde/hyde.documents.js';
|
|
20
20
|
import { getHydeGenerationMode } from '../../shared/hyde/hyde.env.js';
|
|
21
21
|
import { validateOpportunityActors } from '../domain/opportunity.utils.js';
|
|
22
22
|
import { safeFallbackSummary } from '../domain/opportunity.safe-presentation.js';
|
|
23
|
-
import { hasUnsupportedOpportunityClaim } from '
|
|
23
|
+
import { hasUnsupportedOpportunityClaim } from '../../shared/utils/claim-safety.js';
|
|
24
24
|
import { persistOpportunities } from './opportunity.persist.js';
|
|
25
25
|
import { INTRODUCER_DISCOVERY_SOURCE } from './opportunity.introducer.js';
|
|
26
|
-
import { negotiateCandidates, ASK_USER_LOCK_SLACK_MS, askUserAnswerWindowMs, AMBIENT_PARK_WINDOW_MS } from "../../
|
|
26
|
+
import { negotiateCandidates, ASK_USER_LOCK_SLACK_MS, askUserAnswerWindowMs, AMBIENT_PARK_WINDOW_MS } from "../../negotiation/index.js";
|
|
27
27
|
import { buildDiscoverySummary, toDiscoveryNegotiation } from "../domain/negotiation-summary.builder.js";
|
|
28
28
|
import { protocolLogger, withCallLogging } from '../../shared/observability/protocol.logger.js';
|
|
29
29
|
import { timed } from '../../shared/observability/performance.js';
|
|
@@ -21,13 +21,13 @@ declare const PresentationSchema: z.ZodObject<{
|
|
|
21
21
|
suggestedAction: z.ZodString;
|
|
22
22
|
greeting: z.ZodString;
|
|
23
23
|
}, "strip", z.ZodTypeAny, {
|
|
24
|
-
headline: string;
|
|
25
24
|
personalizedSummary: string;
|
|
25
|
+
headline: string;
|
|
26
26
|
suggestedAction: string;
|
|
27
27
|
greeting: string;
|
|
28
28
|
}, {
|
|
29
|
-
headline: string;
|
|
30
29
|
personalizedSummary: string;
|
|
30
|
+
headline: string;
|
|
31
31
|
suggestedAction: string;
|
|
32
32
|
greeting: string;
|
|
33
33
|
}>;
|
|
@@ -59,21 +59,21 @@ export declare const CardLLMSchema: z.ZodObject<{
|
|
|
59
59
|
mutualIntentsLabel: z.ZodString;
|
|
60
60
|
greeting: z.ZodString;
|
|
61
61
|
}, "strip", z.ZodTypeAny, {
|
|
62
|
-
headline: string;
|
|
63
|
-
mutualIntentsLabel: string;
|
|
64
62
|
personalizedSummary: string;
|
|
63
|
+
headline: string;
|
|
65
64
|
suggestedAction: string;
|
|
66
65
|
greeting: string;
|
|
67
66
|
digestSummary: string;
|
|
68
67
|
narratorRemark: string;
|
|
69
|
-
}, {
|
|
70
|
-
headline: string;
|
|
71
68
|
mutualIntentsLabel: string;
|
|
69
|
+
}, {
|
|
72
70
|
personalizedSummary: string;
|
|
71
|
+
headline: string;
|
|
73
72
|
suggestedAction: string;
|
|
74
73
|
greeting: string;
|
|
75
74
|
digestSummary: string;
|
|
76
75
|
narratorRemark: string;
|
|
76
|
+
mutualIntentsLabel: string;
|
|
77
77
|
}>;
|
|
78
78
|
/** LLM-generated result from presentCard (callers append button labels from opportunity.constants). */
|
|
79
79
|
export type CardLLMResult = z.infer<typeof CardLLMSchema> & {
|
|
@@ -22,7 +22,7 @@ import { protocolLogger } from "../../shared/observability/protocol.logger.js";
|
|
|
22
22
|
import { createStructuredModel } from "../../shared/agent/model.config.js";
|
|
23
23
|
import { viewerCentricCardSummary } from "../domain/opportunity.presentation.js";
|
|
24
24
|
import { stripUuids, stripIntroducerMentions } from "../domain/opportunity.presentation.js";
|
|
25
|
-
import { stripUnsupportedOpportunityClaims } from "
|
|
25
|
+
import { stripUnsupportedOpportunityClaims } from "../../shared/utils/claim-safety.js";
|
|
26
26
|
import { DEFAULT_EMPTY_FALLBACK_TEXT, DEFAULT_FALLBACK_ACTION, DEFAULT_FALLBACK_HEADLINE, safeFallbackSummary } from "../domain/opportunity.safe-presentation.js";
|
|
27
27
|
const presentLog = protocolLogger("OpportunityPresenter:present");
|
|
28
28
|
const presentCardLog = protocolLogger("OpportunityPresenter:presentCard");
|
|
@@ -6,7 +6,7 @@ import { MINIMAL_MAIN_TEXT_MAX_CHARS, getPrimaryActionLabel, SECONDARY_ACTION_LA
|
|
|
6
6
|
import { narratorRemarkFromReasoning, stripUuids } from "../domain/opportunity.presentation.js";
|
|
7
7
|
import { safeFallbackSummary } from "../domain/opportunity.safe-presentation.js";
|
|
8
8
|
import { buildOpportunityPresentation } from "./opportunity.card-presentation.js";
|
|
9
|
-
import { isUptakeGuardEnabled } from "../../
|
|
9
|
+
import { isUptakeGuardEnabled } from "../../questions/index.js";
|
|
10
10
|
import { OpportunityPresenter, gatherPresenterContext } from "./opportunity.presenter.js";
|
|
11
11
|
import { loadNegotiationContext } from "./negotiation-context.loader.js";
|
|
12
12
|
import { admitOpportunityUpdate } from './opportunity.update-admission.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QuestionPoolDiscriminator } from "../../questions/
|
|
1
|
+
import type { QuestionPoolDiscriminator } from "../../questions/index.js";
|
|
2
2
|
/** Recipient and intent provenance that scopes one pool preference. */
|
|
3
3
|
export interface PoolAdjustmentProvenance {
|
|
4
4
|
recipientUserId: string;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { QuestionPoolSnapshot } from "../../questions/
|
|
1
|
+
import type { QuestionPoolSnapshot } from "../../questions/index.js";
|
|
2
2
|
/** Maximum raw intent-title characters included in a proactive DM line. */
|
|
3
3
|
export declare const POOL_QUESTION_PUSH_TITLE_MAX_CHARS = 80;
|
|
4
4
|
/** Stable identity for one pool refresh cycle. Chained alternates retain it. */
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* produced (and evidence-verified) at mining time, so synthesis is pure,
|
|
9
9
|
* auditable, and cheap to re-run for interview-mode chaining.
|
|
10
10
|
*/
|
|
11
|
-
import type { Question, QuestionPoolDiscriminator, QuestionPoolSnapshot } from "../../questions/
|
|
11
|
+
import type { Question, QuestionPoolDiscriminator, QuestionPoolSnapshot } from "../../questions/index.js";
|
|
12
12
|
import type { ScoredDiscriminator } from "./discriminator.types.js";
|
|
13
13
|
/** Fixed option appended to every pool question — the no-preference escape. */
|
|
14
14
|
export declare const BOTH_MATTER_LABEL = "Both matter";
|
|
@@ -28,7 +28,7 @@ export * from "./opportunity.labels.js";
|
|
|
28
28
|
export * from "./opportunity.utils.js";
|
|
29
29
|
export * from "./opportunity.actor.js";
|
|
30
30
|
export * from "./opportunity.evidence.js";
|
|
31
|
-
export * from "
|
|
31
|
+
export * from "../../shared/utils/claim-safety.js";
|
|
32
32
|
export * from "./opportunity.presentation.js";
|
|
33
33
|
export * from "./opportunity.safe-presentation.js";
|
|
34
34
|
export * from "./opportunity.presentation-cache.js";
|
|
@@ -29,7 +29,7 @@ export * from "./opportunity.labels.js";
|
|
|
29
29
|
export * from "./opportunity.utils.js";
|
|
30
30
|
export * from "./opportunity.actor.js";
|
|
31
31
|
export * from "./opportunity.evidence.js";
|
|
32
|
-
export * from "
|
|
32
|
+
export * from "../../shared/utils/claim-safety.js";
|
|
33
33
|
export * from "./opportunity.presentation.js";
|
|
34
34
|
export * from "./opportunity.safe-presentation.js";
|
|
35
35
|
export * from "./opportunity.presentation-cache.js";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* `DiscoveryNegotiation` / `DiscoverySummary` shapes consumed by the question
|
|
4
4
|
* generator. No DB access, no LLM — safe to import from anywhere.
|
|
5
5
|
*/
|
|
6
|
-
import type { NegotiationTurn, NegotiationOutcome } from "../../
|
|
6
|
+
import type { NegotiationTurn, NegotiationOutcome } from "../../negotiation/index.js";
|
|
7
7
|
import type { DiscoveryNegotiation, DiscoverySummary } from "../../shared/schemas/discovery-question.schema.js";
|
|
8
8
|
/**
|
|
9
9
|
* The input shape collected by the opportunity graph's negotiate node for
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Generates title, description, and CTA based on viewer context — no DB access.
|
|
4
4
|
*/
|
|
5
5
|
import { MINIMAL_MAIN_TEXT_MAX_CHARS } from "./opportunity.labels.js";
|
|
6
|
-
import { stripUnsupportedOpportunityClaims } from "
|
|
6
|
+
import { stripUnsupportedOpportunityClaims } from "../../shared/utils/claim-safety.js";
|
|
7
7
|
/**
|
|
8
8
|
* Generate presentation copy for an opportunity based on viewer context.
|
|
9
9
|
* Pure function — no side effects, no database access.
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
* checklist this module exists to satisfy.
|
|
21
21
|
*/
|
|
22
22
|
import { truncateAtBoundary, viewerCentricCardSummary } from "./opportunity.presentation.js";
|
|
23
|
-
import { stripUnsupportedOpportunityClaims } from "
|
|
23
|
+
import { stripUnsupportedOpportunityClaims } from "../../shared/utils/claim-safety.js";
|
|
24
24
|
/** Default max length for fallback summaries (matches presenter internal fallback). */
|
|
25
25
|
export const SAFE_FALLBACK_MAX_CHARS = 300;
|
|
26
26
|
/** Default copy when no reasoning text is available at all. */
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Id, NegotiationContinuationExecution, NegotiationContinuationReceipt, OpportunityStatus, Opportunity } from '../../shared/interfaces/database.interface.js';
|
|
2
2
|
import type { Lens } from '../../shared/interfaces/embedder.interface.js';
|
|
3
3
|
import type { EvaluatorEntity } from '../application/opportunity.evaluator.js';
|
|
4
|
-
import type { DebugMetaAgent } from '../../
|
|
4
|
+
import type { DebugMetaAgent } from '../../participant-agents/index.js';
|
|
5
5
|
import type { OpportunityEvidence } from '../../shared/schemas/network-assignment.schema.js';
|
|
6
6
|
import type { DiscoverySummary } from "../../shared/schemas/discovery-question.schema.js";
|
|
7
7
|
/**
|