@indexnetwork/protocol 3.0.0-rc.245.1 → 3.1.0-rc.247.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.
Files changed (50) hide show
  1. package/dist/index.d.ts +7 -0
  2. package/dist/index.d.ts.map +1 -1
  3. package/dist/index.js +3 -0
  4. package/dist/index.js.map +1 -1
  5. package/dist/intent/intent.indexer.d.ts +3 -3
  6. package/dist/intent/intent.reconciler.d.ts +6 -6
  7. package/dist/network/indexer/indexer.graph.d.ts +22 -11
  8. package/dist/network/indexer/indexer.graph.d.ts.map +1 -1
  9. package/dist/network/indexer/indexer.graph.js +47 -44
  10. package/dist/network/indexer/indexer.graph.js.map +1 -1
  11. package/dist/network/indexer/indexer.state.d.ts +3 -3
  12. package/dist/opportunity/opportunity.evaluator.d.ts +27 -9
  13. package/dist/opportunity/opportunity.evaluator.d.ts.map +1 -1
  14. package/dist/opportunity/opportunity.evaluator.js +9 -1
  15. package/dist/opportunity/opportunity.evaluator.js.map +1 -1
  16. package/dist/opportunity/opportunity.evidence.d.ts +22 -0
  17. package/dist/opportunity/opportunity.evidence.d.ts.map +1 -0
  18. package/dist/opportunity/opportunity.evidence.js +72 -0
  19. package/dist/opportunity/opportunity.evidence.js.map +1 -0
  20. package/dist/opportunity/opportunity.graph.d.ts +8 -7
  21. package/dist/opportunity/opportunity.graph.d.ts.map +1 -1
  22. package/dist/opportunity/opportunity.graph.js +74 -28
  23. package/dist/opportunity/opportunity.graph.js.map +1 -1
  24. package/dist/opportunity/opportunity.state.d.ts +10 -2
  25. package/dist/opportunity/opportunity.state.d.ts.map +1 -1
  26. package/dist/opportunity/opportunity.state.js.map +1 -1
  27. package/dist/premise/premise.graph.d.ts +14 -2
  28. package/dist/premise/premise.graph.d.ts.map +1 -1
  29. package/dist/premise/premise.graph.js +49 -20
  30. package/dist/premise/premise.graph.js.map +1 -1
  31. package/dist/premise/premise.indexer.d.ts +2 -2
  32. package/dist/premise/premise.state.d.ts +2 -0
  33. package/dist/premise/premise.state.d.ts.map +1 -1
  34. package/dist/premise/premise.state.js +8 -0
  35. package/dist/premise/premise.state.js.map +1 -1
  36. package/dist/shared/assignment/network-assignment.policy.d.ts +59 -0
  37. package/dist/shared/assignment/network-assignment.policy.d.ts.map +1 -0
  38. package/dist/shared/assignment/network-assignment.policy.js +101 -0
  39. package/dist/shared/assignment/network-assignment.policy.js.map +1 -0
  40. package/dist/shared/hyde/hyde.graph.d.ts +6 -6
  41. package/dist/shared/hyde/hyde.state.d.ts +2 -2
  42. package/dist/shared/interfaces/database.interface.d.ts +31 -17
  43. package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
  44. package/dist/shared/interfaces/database.interface.js.map +1 -1
  45. package/dist/shared/schemas/network-assignment.schema.d.ts +135 -0
  46. package/dist/shared/schemas/network-assignment.schema.d.ts.map +1 -0
  47. package/dist/shared/schemas/network-assignment.schema.js +55 -0
  48. package/dist/shared/schemas/network-assignment.schema.js.map +1 -0
  49. package/dist/shared/schemas/question.schema.d.ts +2 -2
  50. package/package.json +1 -1
package/dist/index.d.ts CHANGED
@@ -40,6 +40,12 @@ export type { PendingQuestionSummary } from "./shared/schemas/pending-question.s
40
40
  export type { McpAuthInput } from "./shared/schemas/mcp-auth.schema.js";
41
41
  export { ProfileIdentitySchema, ProfileNarrativeSchema, ProfileAttributesSchema, ProfileDocumentSchema, type ProfileDocument, } from "./shared/schemas/profile.schema.js";
42
42
  export type { DiscoverySourceProfile, DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome, DiscoveryQuestionInput, NegotiationRole, } from "./shared/schemas/discovery-question.schema.js";
43
+ export { NetworkAssignmentResourceTypeSchema, NetworkAssignmentModeSchema, NetworkAssignmentScopeSchema, NetworkAssignmentPromptPresenceSchema, NetworkAssignmentPolicySchema, NetworkAssignmentRawScoresSchema, NetworkAssignmentMetadataSchema, OpportunityEvidenceKindSchema, OpportunityEvidenceSchema, } from "./shared/schemas/network-assignment.schema.js";
44
+ export type { NetworkAssignmentResourceType, NetworkAssignmentMode, NetworkAssignmentScope, NetworkAssignmentPromptPresence, NetworkAssignmentPolicy, NetworkAssignmentRawScores, NetworkAssignmentMetadata, OpportunityEvidenceKind, OpportunityEvidence, } from "./shared/schemas/network-assignment.schema.js";
45
+ export { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, classifyPromptPresence, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision, combineAssignmentScores, } from "./shared/assignment/network-assignment.policy.js";
46
+ export type { PromptPresenceInput, ResolveAssignmentNetworkScopeArgs, BuildNetworkAssignmentDecisionArgs, NetworkAssignmentDecision, } from "./shared/assignment/network-assignment.policy.js";
47
+ export { buildCandidateEvidence, withCandidateEvidence, mergeOpportunityEvidence, withMatchedStrategies, renderOpportunityEvidenceForPrompt, } from "./opportunity/opportunity.evidence.js";
48
+ export type { EvidenceCandidateInput } from "./opportunity/opportunity.evidence.js";
43
49
  export { ChatGraphFactory } from "./chat/chat.graph.js";
44
50
  export { HomeGraphFactory } from "./opportunity/feed/feed.graph.js";
45
51
  export { HydeGraphFactory } from "./shared/hyde/hyde.graph.js";
@@ -64,6 +70,7 @@ export type { SuggestionGeneratorInput } from "./chat/chat.suggester.js";
64
70
  export { generateInviteMessage } from "./contact/contact.inviter.js";
65
71
  export type { InviteInput, InviteOutput } from "./contact/contact.inviter.js";
66
72
  export { IntentIndexer } from "./intent/intent.indexer.js";
73
+ export type { IntentIndexerOutput } from "./intent/intent.indexer.js";
67
74
  export { PremiseAnalyzer } from "./premise/premise.analyzer.js";
68
75
  export type { PremiseAnalyzerOutput } from "./premise/premise.analyzer.js";
69
76
  export { PremiseDecomposer } from "./premise/premise.decomposer.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC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,oCAAoC,CAAC;AAI/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC"}
package/dist/index.js CHANGED
@@ -11,6 +11,9 @@ export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';
11
11
  export { ChatContextDigestSchema, } from "./shared/schemas/chat-context.schema.js";
12
12
  export { QuestionOptionSchema, QuestionSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionActorSchema, QuestionAnswerSchema, } from "./shared/schemas/question.schema.js";
13
13
  export { ProfileIdentitySchema, ProfileNarrativeSchema, ProfileAttributesSchema, ProfileDocumentSchema, } from "./shared/schemas/profile.schema.js";
14
+ export { NetworkAssignmentResourceTypeSchema, NetworkAssignmentModeSchema, NetworkAssignmentScopeSchema, NetworkAssignmentPromptPresenceSchema, NetworkAssignmentPolicySchema, NetworkAssignmentRawScoresSchema, NetworkAssignmentMetadataSchema, OpportunityEvidenceKindSchema, OpportunityEvidenceSchema, } from "./shared/schemas/network-assignment.schema.js";
15
+ export { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, classifyPromptPresence, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision, combineAssignmentScores, } from "./shared/assignment/network-assignment.policy.js";
16
+ export { buildCandidateEvidence, withCandidateEvidence, mergeOpportunityEvidence, withMatchedStrategies, renderOpportunityEvidenceForPrompt, } from "./opportunity/opportunity.evidence.js";
14
17
  // ─── Graph factories ──────────────────────────────────────────────────────────
15
18
  export { ChatGraphFactory } from "./chat/chat.graph.js";
16
19
  export { HomeGraphFactory } from "./opportunity/feed/feed.graph.js";
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC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AiF;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["// ─── Public API (recommended for external consumers) ──────────────────────────\n\nexport { createChatTools } from \"./shared/agent/tool.factory.js\";\nexport { getModelName } from \"./shared/agent/model.config.js\";\nexport type { ChatTools } from \"./shared/agent/tool.factory.js\";\nexport type { ModelConfig, ModelSettings } from \"./shared/agent/model.config.js\";\nexport type {\n ToolContext,\n ResolvedToolContext,\n ToolDeps,\n ProtocolDeps,\n RawToolDefinition,\n CompiledGraph,\n} from \"./shared/agent/tool.helpers.js\";\nexport { ChatContextAccessError, resolveChatContext } from \"./shared/agent/tool.helpers.js\";\nexport { requestContext } from \"./shared/observability/request-context.js\";\nexport { setTimingWrapper } from \"./shared/observability/performance.js\";\nexport {\n ToolRuntimeError,\n getToolTimeoutPolicy,\n invokeToolRuntime,\n toolRuntimeErrorToResult,\n} from \"./shared/agent/tool.runtime.js\";\nexport type { ToolRuntimeErrorCode, ToolTimeoutClass, ToolTimeoutPolicy } from \"./shared/agent/tool.runtime.js\";\n\n// ─── Interfaces (implement these to wire up your infrastructure) ───────────────\n\nexport type * from \"./shared/interfaces/auth.interface.js\";\nexport type * from \"./shared/interfaces/cache.interface.js\";\nexport type * from \"./shared/interfaces/chat-session.interface.js\";\nexport type { ChatSummaryReader } from \"./shared/interfaces/chat-summary.interface.js\";\nexport type { ChatMessageWriter } from \"./shared/interfaces/chat-message-writer.interface.js\";\nexport type { QuestionGeneratorReader } from \"./shared/interfaces/question-generator.interface.js\";\nexport type {\n QuestionerDatabase,\n PersistableQuestion,\n PersistedQuestion,\n QuestionFilters,\n} from \"./shared/interfaces/questioner.interface.js\";\nexport type { NegotiationSummaryReader } from \"./shared/interfaces/negotiation-summary.interface.js\";\nexport type { DiscoveryNegotiationDigest } from \"./shared/schemas/negotiation-digest.schema.js\";\nexport { NegotiationSummarizer, buildFallbackDigest } from \"./negotiation/negotiation.summarizer.js\";\nexport type * from \"./shared/interfaces/contact.interface.js\";\nexport type * from \"./shared/interfaces/database.interface.js\";\nexport type * from \"./shared/interfaces/embedder.interface.js\";\nexport type * from \"./shared/interfaces/enrichment.interface.js\";\nexport type * from \"./shared/interfaces/integration.interface.js\";\nexport type * from \"./shared/interfaces/queue.interface.js\";\nexport type * from \"./shared/interfaces/scraper.interface.js\";\nexport type * from \"./shared/interfaces/storage.interface.js\";\nexport type * from \"./shared/interfaces/delivery-ledger.interface.js\";\nexport type * from \"./shared/interfaces/connect-link.interface.js\";\nexport type * from \"./shared/interfaces/discovery-run.interface.js\";\nexport type * from \"./shared/interfaces/profile-run.interface.js\";\nexport type * from \"./shared/interfaces/negotiation-events.interface.js\";\nexport type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload } from \"./shared/interfaces/agent-dispatcher.interface.js\";\nexport type {\n AgentRecord,\n AgentTransportRecord,\n AgentPermissionRecord,\n AgentWithRelations,\n CreateAgentInput,\n CreateTransportInput,\n GrantPermissionInput,\n AgentDatabase,\n} from './shared/interfaces/agent.interface.js';\nexport { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';\n\n// ─── Shared schemas ───────────────────────────────────────────────────────────\n\nexport {\n ChatContextDigestSchema,\n type ChatContextDigest,\n} from \"./shared/schemas/chat-context.schema.js\";\nexport {\n QuestionOptionSchema,\n QuestionSchema,\n QuestionStrategySchema,\n QuestionWithStrategySchema,\n QuestionGeneratorResponseSchema,\n QuestionModeSchema,\n QuestionDetectionSchema,\n QuestionActorSchema,\n QuestionAnswerSchema,\n type Question,\n type QuestionOption,\n type QuestionStrategy,\n type QuestionWithStrategy,\n type QuestionGeneratorResponse,\n type QuestionGenerationResult,\n type QuestionMode,\n type QuestionDetection,\n type QuestionActor,\n type QuestionAnswer,\n} from \"./shared/schemas/question.schema.js\";\nexport type { PendingQuestionSummary } from \"./shared/schemas/pending-question.schema.js\";\nexport type { McpAuthInput } from \"./shared/schemas/mcp-auth.schema.js\";\nexport {\n ProfileIdentitySchema,\n ProfileNarrativeSchema,\n ProfileAttributesSchema,\n ProfileDocumentSchema,\n type ProfileDocument,\n} from \"./shared/schemas/profile.schema.js\";\nexport type {\n DiscoverySourceProfile,\n DiscoverySummary,\n DiscoveryNegotiation,\n DiscoveryTurn,\n DiscoveryOutcome,\n DiscoveryQuestionInput,\n NegotiationRole,\n} from \"./shared/schemas/discovery-question.schema.js\";\n\n// ─── Graph factories ──────────────────────────────────────────────────────────\n\nexport { ChatGraphFactory } from \"./chat/chat.graph.js\";\nexport { HomeGraphFactory } from \"./opportunity/feed/feed.graph.js\";\nexport { HydeGraphFactory } from \"./shared/hyde/hyde.graph.js\";\nexport { NetworkGraphFactory } from \"./network/network.graph.js\";\nexport { NetworkMembershipGraphFactory } from \"./network/membership/membership.graph.js\";\nexport { IntentGraphFactory } from \"./intent/intent.graph.js\";\nexport { IntentNetworkGraphFactory } from \"./network/indexer/indexer.graph.js\";\nexport { MaintenanceGraphFactory } from \"./maintenance/maintenance.graph.js\";\nexport type {\n MaintenanceGraphDatabase,\n MaintenanceGraphCache,\n MaintenanceGraphQueue,\n} from \"./maintenance/maintenance.graph.js\";\nexport { NegotiationGraphFactory, createDefaultNegotiationGraph, negotiateCandidates } from \"./negotiation/negotiation.graph.js\";\nexport { OpportunityGraphFactory } from \"./opportunity/opportunity.graph.js\";\nexport { ProfileGraphFactory } from \"./profile/profile.graph.js\";\nexport { PremiseGraphFactory } from \"./premise/premise.graph.js\";\n\n// ─── Agents ───────────────────────────────────────────────────────────────────\n\nexport { UserContextGenerator } from \"./context/context.generator.js\";\nexport type { UserContextInput, IncrementalContextInput, UserContextResult } from \"./context/context.generator.js\";\nexport { ChatTitleGenerator } from \"./chat/chat.title.generator.js\";\nexport { ChatSummarizer } from \"./chat/chat.summarizer.js\";\nexport type { ChatSummarizerInput, ChatSummarizerMessage } from \"./chat/chat.summarizer.js\";\nexport { HydeGenerator } from \"./shared/hyde/hyde.generator.js\";\nexport { SuggestionGenerator } from \"./chat/chat.suggester.js\";\nexport type { SuggestionGeneratorInput } from \"./chat/chat.suggester.js\";\nexport { generateInviteMessage } from \"./contact/contact.inviter.js\";\nexport type { InviteInput, InviteOutput } from \"./contact/contact.inviter.js\";\nexport { IntentIndexer } from \"./intent/intent.indexer.js\";\nexport { PremiseAnalyzer } from \"./premise/premise.analyzer.js\";\nexport type { PremiseAnalyzerOutput } from \"./premise/premise.analyzer.js\";\nexport { PremiseDecomposer } from \"./premise/premise.decomposer.js\";\nexport type { PremiseDecomposerOutput, DecomposedPremise } from \"./premise/premise.decomposer.js\";\nexport { PremiseIndexer } from \"./premise/premise.indexer.js\";\nexport type { PremiseIndexerOutput } from \"./premise/premise.indexer.js\";\nexport { LensInferrer } from \"./shared/hyde/lens.inferrer.js\";\nexport { NegotiationInsightsGenerator } from \"./negotiation/insight.generator.js\";\nexport type { NegotiationDigest } from \"./negotiation/insight.generator.js\";\nexport { IndexNegotiator } from \"./negotiation/negotiation.agent.js\";\nexport type { NegotiationAgentInput } from \"./negotiation/negotiation.agent.js\";\nexport { QuestionerAgent } from \"./questioner/questioner.agent.js\";\nexport type { QuestionerAgentConfig } from \"./questioner/questioner.agent.js\";\nexport type {\n QuestionerInput,\n QuestionerContext,\n QuestionerEnqueuePayload,\n QuestionerEnqueueFn,\n DiscoveryContext,\n IntentContext,\n ProfileContext,\n NegotiationContext,\n} from \"./questioner/questioner.types.js\";\nexport { getPreset } from \"./questioner/questioner.presets.js\";\nexport type { QuestionerPreset } from \"./questioner/questioner.presets.js\";\nexport { OpportunityEvaluator } from \"./opportunity/opportunity.evaluator.js\";\nexport type {\n EvaluatorInput,\n OpportunityEvaluatorOptionsConstructor,\n} from \"./opportunity/opportunity.evaluator.js\";\nexport { OpportunityPresenter, gatherPresenterContext } from \"./opportunity/opportunity.presenter.js\";\nexport { createOpportunityTools } from \"./opportunity/opportunity.tools.js\";\nexport { createProfileTools } from \"./profile/profile.tools.js\";\nexport type { PresenterDatabase } from \"./opportunity/opportunity.presenter.js\";\nexport { QuestionGenerator } from \"./opportunity/question.generator.js\";\n\n// ─── Support utilities ────────────────────────────────────────────────────────\n\nexport { renderNetworkContext } from './shared/network/metadata.renderer.js';\nexport {\n canUserSeeOpportunity,\n isActionableForViewer,\n validateOpportunityActors,\n classifyOpportunity,\n selectByComposition,\n FEED_SOFT_TARGETS,\n} from \"./opportunity/opportunity.utils.js\";\nexport { getPrimaryActionLabel } from \"./opportunity/opportunity.labels.js\";\nexport { computeFeedHealth } from \"./opportunity/feed/feed.health.js\";\nexport type { FeedHealthInput, FeedHealthResult } from \"./opportunity/feed/feed.health.js\";\nexport {\n selectContactsForDiscovery,\n shouldRunIntroducerDiscovery,\n runIntroducerDiscovery,\n MAX_CONTACTS_PER_CYCLE,\n MAX_CANDIDATES_PER_CONTACT,\n INTRODUCER_DISCOVERY_SOURCE,\n} from \"./opportunity/opportunity.introducer.js\";\nexport type {\n IntroducerDiscoveryDatabase,\n IntroducerDiscoveryQueue,\n ContactWithIntents,\n} from \"./opportunity/opportunity.introducer.js\";\nexport { persistOpportunities } from \"./opportunity/opportunity.persist.js\";\nexport { presentOpportunity } from \"./opportunity/opportunity.presentation.js\";\nexport type { UserInfo } from \"./opportunity/opportunity.presentation.js\";\nexport { stripUuids, stripIntroducerMentions } from \"./opportunity/opportunity.presentation.js\";\nexport {\n getOrCreateDeliveryCardBatch,\n DELIVERY_CARD_CACHE_TTL,\n type CachedDeliveryCard,\n type OpportunityWithContext,\n} from \"./opportunity/delivery-card.cache.js\";\n\n// ─── Tools ────────────────────────────────────────────────────────────────────\n\nexport { createToolRegistry } from \"./shared/agent/tool.registry.js\";\nexport { createAgentTools } from './agent/agent.tools.js';\nexport { AMBIENT_PARK_WINDOW_MS } from './negotiation/negotiation.tools.js';\nexport { normalizeTelegramHandle } from './shared/utils/telegram-handle.js';\n\n// ─── MCP ──────────────────────────────────────────────────────────────────────\n\nexport { createMcpServer, computeAgentIndexScope, buildMcpOnboardingMessage, ONBOARDING_ALLOWED } from \"./mcp/mcp.server.js\";\nexport type { ScopedDepsFactory } from \"./mcp/mcp.server.js\";\nexport { buildElicitationCreate, flattenChoice } from \"./mcp/elicitation.builder.js\";\nexport { dispatchElicitations } from \"./mcp/elicitation.dispatcher.js\";\nexport type { ElicitResultLike, ElicitInputFn, DispatchElicitationsParams } from \"./mcp/elicitation.dispatcher.js\";\n\n// ─── States (for advanced graph consumers) ────────────────────────────────────\n\nexport type {\n UserNegotiationContext,\n NegotiationTurn,\n NegotiationOutcome,\n SeedAssessment,\n} from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationGraphLike } from \"./negotiation/negotiation.state.js\";\n\n// ─── Streamers ────────────────────────────────────────────────────────────────\n\nexport { ChatStreamer } from \"./chat/chat.streamer.js\";\nexport { ResponseStreamer } from \"./shared/agent/response.streamer.js\";\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,iFAAiF;AAEjF,OAAO,EAAE,eAAe,EAAE,MAAM,gCAAgC,CAAC;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAW9D,OAAO,EAAE,sBAAsB,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAC5F,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,iBAAiB,EACjB,wBAAwB,GACzB,MAAM,gCAAgC,CAAC;AAmBxC,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAyBrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,iFAAiF;AAEjF,OAAO,EACL,uBAAuB,GAExB,MAAM,yCAAyC,CAAC;AACjD,OAAO,EACL,oBAAoB,EACpB,cAAc,EACd,sBAAsB,EACtB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L,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,GAClB,MAAM,oCAAoC,CAAC;AAC5C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAAE,iBAAiB,EAAE,MAAM,mCAAmC,CAAC;AAEtE,OAAO,EACL,0BAA0B,EAC1B,4BAA4B,EAC5B,sBAAsB,EACtB,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,GAC5B,MAAM,yCAAyC,CAAC;AAMjD,OAAO,EAAE,oBAAoB,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EACL,4BAA4B,EAC5B,uBAAuB,GAGxB,MAAM,sCAAsC,CAAC;AAE9C,iFAAiF;AAEjF,OAAO,EAAE,kBAAkB,EAAE,MAAM,iCAAiC,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAE5E,iFAAiF;AAEjF,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAE7H,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AAavE,iFAAiF;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["// ─── Public API (recommended for external consumers) ──────────────────────────\n\nexport { createChatTools } from \"./shared/agent/tool.factory.js\";\nexport { getModelName } from \"./shared/agent/model.config.js\";\nexport type { ChatTools } from \"./shared/agent/tool.factory.js\";\nexport type { ModelConfig, ModelSettings } from \"./shared/agent/model.config.js\";\nexport type {\n ToolContext,\n ResolvedToolContext,\n ToolDeps,\n ProtocolDeps,\n RawToolDefinition,\n CompiledGraph,\n} from \"./shared/agent/tool.helpers.js\";\nexport { ChatContextAccessError, resolveChatContext } from \"./shared/agent/tool.helpers.js\";\nexport { requestContext } from \"./shared/observability/request-context.js\";\nexport { setTimingWrapper } from \"./shared/observability/performance.js\";\nexport {\n ToolRuntimeError,\n getToolTimeoutPolicy,\n invokeToolRuntime,\n toolRuntimeErrorToResult,\n} from \"./shared/agent/tool.runtime.js\";\nexport type { ToolRuntimeErrorCode, ToolTimeoutClass, ToolTimeoutPolicy } from \"./shared/agent/tool.runtime.js\";\n\n// ─── Interfaces (implement these to wire up your infrastructure) ───────────────\n\nexport type * from \"./shared/interfaces/auth.interface.js\";\nexport type * from \"./shared/interfaces/cache.interface.js\";\nexport type * from \"./shared/interfaces/chat-session.interface.js\";\nexport type { ChatSummaryReader } from \"./shared/interfaces/chat-summary.interface.js\";\nexport type { ChatMessageWriter } from \"./shared/interfaces/chat-message-writer.interface.js\";\nexport type { QuestionGeneratorReader } from \"./shared/interfaces/question-generator.interface.js\";\nexport type {\n QuestionerDatabase,\n PersistableQuestion,\n PersistedQuestion,\n QuestionFilters,\n} from \"./shared/interfaces/questioner.interface.js\";\nexport type { NegotiationSummaryReader } from \"./shared/interfaces/negotiation-summary.interface.js\";\nexport type { DiscoveryNegotiationDigest } from \"./shared/schemas/negotiation-digest.schema.js\";\nexport { NegotiationSummarizer, buildFallbackDigest } from \"./negotiation/negotiation.summarizer.js\";\nexport type * from \"./shared/interfaces/contact.interface.js\";\nexport type * from \"./shared/interfaces/database.interface.js\";\nexport type * from \"./shared/interfaces/embedder.interface.js\";\nexport type * from \"./shared/interfaces/enrichment.interface.js\";\nexport type * from \"./shared/interfaces/integration.interface.js\";\nexport type * from \"./shared/interfaces/queue.interface.js\";\nexport type * from \"./shared/interfaces/scraper.interface.js\";\nexport type * from \"./shared/interfaces/storage.interface.js\";\nexport type * from \"./shared/interfaces/delivery-ledger.interface.js\";\nexport type * from \"./shared/interfaces/connect-link.interface.js\";\nexport type * from \"./shared/interfaces/discovery-run.interface.js\";\nexport type * from \"./shared/interfaces/profile-run.interface.js\";\nexport type * from \"./shared/interfaces/negotiation-events.interface.js\";\nexport type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload } from \"./shared/interfaces/agent-dispatcher.interface.js\";\nexport type {\n AgentRecord,\n AgentTransportRecord,\n AgentPermissionRecord,\n AgentWithRelations,\n CreateAgentInput,\n CreateTransportInput,\n GrantPermissionInput,\n AgentDatabase,\n} from './shared/interfaces/agent.interface.js';\nexport { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';\n\n// ─── Shared schemas ───────────────────────────────────────────────────────────\n\nexport {\n ChatContextDigestSchema,\n type ChatContextDigest,\n} from \"./shared/schemas/chat-context.schema.js\";\nexport {\n QuestionOptionSchema,\n QuestionSchema,\n QuestionStrategySchema,\n QuestionWithStrategySchema,\n QuestionGeneratorResponseSchema,\n QuestionModeSchema,\n QuestionDetectionSchema,\n QuestionActorSchema,\n QuestionAnswerSchema,\n type Question,\n type QuestionOption,\n type QuestionStrategy,\n type QuestionWithStrategy,\n type QuestionGeneratorResponse,\n type QuestionGenerationResult,\n type QuestionMode,\n type QuestionDetection,\n type QuestionActor,\n type QuestionAnswer,\n} from \"./shared/schemas/question.schema.js\";\nexport type { PendingQuestionSummary } from \"./shared/schemas/pending-question.schema.js\";\nexport type { McpAuthInput } from \"./shared/schemas/mcp-auth.schema.js\";\nexport {\n ProfileIdentitySchema,\n ProfileNarrativeSchema,\n ProfileAttributesSchema,\n ProfileDocumentSchema,\n type ProfileDocument,\n} from \"./shared/schemas/profile.schema.js\";\nexport type {\n DiscoverySourceProfile,\n DiscoverySummary,\n DiscoveryNegotiation,\n DiscoveryTurn,\n DiscoveryOutcome,\n DiscoveryQuestionInput,\n NegotiationRole,\n} from \"./shared/schemas/discovery-question.schema.js\";\nexport {\n NetworkAssignmentResourceTypeSchema,\n NetworkAssignmentModeSchema,\n NetworkAssignmentScopeSchema,\n NetworkAssignmentPromptPresenceSchema,\n NetworkAssignmentPolicySchema,\n NetworkAssignmentRawScoresSchema,\n NetworkAssignmentMetadataSchema,\n OpportunityEvidenceKindSchema,\n OpportunityEvidenceSchema,\n} from \"./shared/schemas/network-assignment.schema.js\";\nexport type {\n NetworkAssignmentResourceType,\n NetworkAssignmentMode,\n NetworkAssignmentScope,\n NetworkAssignmentPromptPresence,\n NetworkAssignmentPolicy,\n NetworkAssignmentRawScores,\n NetworkAssignmentMetadata,\n OpportunityEvidenceKind,\n OpportunityEvidence,\n} from \"./shared/schemas/network-assignment.schema.js\";\nexport {\n DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD,\n classifyPromptPresence,\n resolveAssignmentNetworkScope,\n buildNetworkAssignmentDecision,\n combineAssignmentScores,\n} from \"./shared/assignment/network-assignment.policy.js\";\nexport type {\n PromptPresenceInput,\n ResolveAssignmentNetworkScopeArgs,\n BuildNetworkAssignmentDecisionArgs,\n NetworkAssignmentDecision,\n} from \"./shared/assignment/network-assignment.policy.js\";\nexport {\n buildCandidateEvidence,\n withCandidateEvidence,\n mergeOpportunityEvidence,\n withMatchedStrategies,\n renderOpportunityEvidenceForPrompt,\n} from \"./opportunity/opportunity.evidence.js\";\nexport type { EvidenceCandidateInput } from \"./opportunity/opportunity.evidence.js\";\n\n// ─── Graph factories ──────────────────────────────────────────────────────────\n\nexport { ChatGraphFactory } from \"./chat/chat.graph.js\";\nexport { HomeGraphFactory } from \"./opportunity/feed/feed.graph.js\";\nexport { HydeGraphFactory } from \"./shared/hyde/hyde.graph.js\";\nexport { NetworkGraphFactory } from \"./network/network.graph.js\";\nexport { NetworkMembershipGraphFactory } from \"./network/membership/membership.graph.js\";\nexport { IntentGraphFactory } from \"./intent/intent.graph.js\";\nexport { IntentNetworkGraphFactory } from \"./network/indexer/indexer.graph.js\";\nexport { MaintenanceGraphFactory } from \"./maintenance/maintenance.graph.js\";\nexport type {\n MaintenanceGraphDatabase,\n MaintenanceGraphCache,\n MaintenanceGraphQueue,\n} from \"./maintenance/maintenance.graph.js\";\nexport { NegotiationGraphFactory, createDefaultNegotiationGraph, negotiateCandidates } from \"./negotiation/negotiation.graph.js\";\nexport { OpportunityGraphFactory } from \"./opportunity/opportunity.graph.js\";\nexport { ProfileGraphFactory } from \"./profile/profile.graph.js\";\nexport { PremiseGraphFactory } from \"./premise/premise.graph.js\";\n\n// ─── Agents ───────────────────────────────────────────────────────────────────\n\nexport { UserContextGenerator } from \"./context/context.generator.js\";\nexport type { UserContextInput, IncrementalContextInput, UserContextResult } from \"./context/context.generator.js\";\nexport { ChatTitleGenerator } from \"./chat/chat.title.generator.js\";\nexport { ChatSummarizer } from \"./chat/chat.summarizer.js\";\nexport type { ChatSummarizerInput, ChatSummarizerMessage } from \"./chat/chat.summarizer.js\";\nexport { HydeGenerator } from \"./shared/hyde/hyde.generator.js\";\nexport { SuggestionGenerator } from \"./chat/chat.suggester.js\";\nexport type { SuggestionGeneratorInput } from \"./chat/chat.suggester.js\";\nexport { generateInviteMessage } from \"./contact/contact.inviter.js\";\nexport type { InviteInput, InviteOutput } from \"./contact/contact.inviter.js\";\nexport { IntentIndexer } from \"./intent/intent.indexer.js\";\nexport type { IntentIndexerOutput } from \"./intent/intent.indexer.js\";\nexport { PremiseAnalyzer } from \"./premise/premise.analyzer.js\";\nexport type { PremiseAnalyzerOutput } from \"./premise/premise.analyzer.js\";\nexport { PremiseDecomposer } from \"./premise/premise.decomposer.js\";\nexport type { PremiseDecomposerOutput, DecomposedPremise } from \"./premise/premise.decomposer.js\";\nexport { PremiseIndexer } from \"./premise/premise.indexer.js\";\nexport type { PremiseIndexerOutput } from \"./premise/premise.indexer.js\";\nexport { LensInferrer } from \"./shared/hyde/lens.inferrer.js\";\nexport { NegotiationInsightsGenerator } from \"./negotiation/insight.generator.js\";\nexport type { NegotiationDigest } from \"./negotiation/insight.generator.js\";\nexport { IndexNegotiator } from \"./negotiation/negotiation.agent.js\";\nexport type { NegotiationAgentInput } from \"./negotiation/negotiation.agent.js\";\nexport { QuestionerAgent } from \"./questioner/questioner.agent.js\";\nexport type { QuestionerAgentConfig } from \"./questioner/questioner.agent.js\";\nexport type {\n QuestionerInput,\n QuestionerContext,\n QuestionerEnqueuePayload,\n QuestionerEnqueueFn,\n DiscoveryContext,\n IntentContext,\n ProfileContext,\n NegotiationContext,\n} from \"./questioner/questioner.types.js\";\nexport { getPreset } from \"./questioner/questioner.presets.js\";\nexport type { QuestionerPreset } from \"./questioner/questioner.presets.js\";\nexport { OpportunityEvaluator } from \"./opportunity/opportunity.evaluator.js\";\nexport type {\n EvaluatorInput,\n OpportunityEvaluatorOptionsConstructor,\n} from \"./opportunity/opportunity.evaluator.js\";\nexport { OpportunityPresenter, gatherPresenterContext } from \"./opportunity/opportunity.presenter.js\";\nexport { createOpportunityTools } from \"./opportunity/opportunity.tools.js\";\nexport { createProfileTools } from \"./profile/profile.tools.js\";\nexport type { PresenterDatabase } from \"./opportunity/opportunity.presenter.js\";\nexport { QuestionGenerator } from \"./opportunity/question.generator.js\";\n\n// ─── Support utilities ────────────────────────────────────────────────────────\n\nexport { renderNetworkContext } from './shared/network/metadata.renderer.js';\nexport {\n canUserSeeOpportunity,\n isActionableForViewer,\n validateOpportunityActors,\n classifyOpportunity,\n selectByComposition,\n FEED_SOFT_TARGETS,\n} from \"./opportunity/opportunity.utils.js\";\nexport { getPrimaryActionLabel } from \"./opportunity/opportunity.labels.js\";\nexport { computeFeedHealth } from \"./opportunity/feed/feed.health.js\";\nexport type { FeedHealthInput, FeedHealthResult } from \"./opportunity/feed/feed.health.js\";\nexport {\n selectContactsForDiscovery,\n shouldRunIntroducerDiscovery,\n runIntroducerDiscovery,\n MAX_CONTACTS_PER_CYCLE,\n MAX_CANDIDATES_PER_CONTACT,\n INTRODUCER_DISCOVERY_SOURCE,\n} from \"./opportunity/opportunity.introducer.js\";\nexport type {\n IntroducerDiscoveryDatabase,\n IntroducerDiscoveryQueue,\n ContactWithIntents,\n} from \"./opportunity/opportunity.introducer.js\";\nexport { persistOpportunities } from \"./opportunity/opportunity.persist.js\";\nexport { presentOpportunity } from \"./opportunity/opportunity.presentation.js\";\nexport type { UserInfo } from \"./opportunity/opportunity.presentation.js\";\nexport { stripUuids, stripIntroducerMentions } from \"./opportunity/opportunity.presentation.js\";\nexport {\n getOrCreateDeliveryCardBatch,\n DELIVERY_CARD_CACHE_TTL,\n type CachedDeliveryCard,\n type OpportunityWithContext,\n} from \"./opportunity/delivery-card.cache.js\";\n\n// ─── Tools ────────────────────────────────────────────────────────────────────\n\nexport { createToolRegistry } from \"./shared/agent/tool.registry.js\";\nexport { createAgentTools } from './agent/agent.tools.js';\nexport { AMBIENT_PARK_WINDOW_MS } from './negotiation/negotiation.tools.js';\nexport { normalizeTelegramHandle } from './shared/utils/telegram-handle.js';\n\n// ─── MCP ──────────────────────────────────────────────────────────────────────\n\nexport { createMcpServer, computeAgentIndexScope, buildMcpOnboardingMessage, ONBOARDING_ALLOWED } from \"./mcp/mcp.server.js\";\nexport type { ScopedDepsFactory } from \"./mcp/mcp.server.js\";\nexport { buildElicitationCreate, flattenChoice } from \"./mcp/elicitation.builder.js\";\nexport { dispatchElicitations } from \"./mcp/elicitation.dispatcher.js\";\nexport type { ElicitResultLike, ElicitInputFn, DispatchElicitationsParams } from \"./mcp/elicitation.dispatcher.js\";\n\n// ─── States (for advanced graph consumers) ────────────────────────────────────\n\nexport type {\n UserNegotiationContext,\n NegotiationTurn,\n NegotiationOutcome,\n SeedAssessment,\n} from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationGraphLike } from \"./negotiation/negotiation.state.js\";\n\n// ─── Streamers ────────────────────────────────────────────────────────────────\n\nexport { ChatStreamer } from \"./chat/chat.streamer.js\";\nexport { ResponseStreamer } from \"./shared/agent/response.streamer.js\";\n"]}
@@ -4,13 +4,13 @@ export declare const IntentIndexerOutputSchema: z.ZodObject<{
4
4
  memberScore: z.ZodNumber;
5
5
  reasoning: z.ZodString;
6
6
  }, "strip", z.ZodTypeAny, {
7
- reasoning: string;
8
7
  indexScore: number;
9
8
  memberScore: number;
10
- }, {
11
9
  reasoning: string;
10
+ }, {
12
11
  indexScore: number;
13
12
  memberScore: number;
13
+ reasoning: string;
14
14
  }>;
15
15
  /**
16
16
  * Output structure for the Intent Indexer agent.
@@ -75,9 +75,9 @@ export declare class IntentIndexer {
75
75
  sourceName?: string | null | undefined;
76
76
  networkContext?: string | null | undefined;
77
77
  }, {
78
- reasoning: string;
79
78
  indexScore: number;
80
79
  memberScore: number;
80
+ reasoning: string;
81
81
  } | null, unknown, "intent_indexer">;
82
82
  }
83
83
  //# sourceMappingURL=intent.indexer.d.ts.map
@@ -9,20 +9,20 @@ declare const CreateIntentActionSchema: z.ZodObject<{
9
9
  semanticEntropy: z.ZodNullable<z.ZodNumber>;
10
10
  }, "strip", z.ZodTypeAny, {
11
11
  type: "create" | "CREATE";
12
+ score: number | null;
12
13
  payload: string;
13
14
  semanticEntropy: number | null;
14
15
  referentialAnchor: string | null;
15
16
  intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
16
17
  reasoning: string | null;
17
- score: number | null;
18
18
  }, {
19
19
  type: "create" | "CREATE";
20
+ score: number | null;
20
21
  payload: string;
21
22
  semanticEntropy: number | null;
22
23
  referentialAnchor: string | null;
23
24
  intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
24
25
  reasoning: string | null;
25
- score: number | null;
26
26
  }>;
27
27
  declare const UpdateIntentActionSchema: z.ZodObject<{
28
28
  type: z.ZodUnion<[z.ZodLiteral<"update">, z.ZodLiteral<"UPDATE">]>;
@@ -33,18 +33,18 @@ declare const UpdateIntentActionSchema: z.ZodObject<{
33
33
  intentMode: z.ZodNullable<z.ZodEnum<["REFERENTIAL", "ATTRIBUTIVE"]>>;
34
34
  }, "strip", z.ZodTypeAny, {
35
35
  type: "update" | "UPDATE";
36
+ score: number | null;
36
37
  payload: string;
37
38
  intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
38
39
  reasoning: string | null;
39
40
  id: string;
40
- score: number | null;
41
41
  }, {
42
42
  type: "update" | "UPDATE";
43
+ score: number | null;
43
44
  payload: string;
44
45
  intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
45
46
  reasoning: string | null;
46
47
  id: string;
47
- score: number | null;
48
48
  }>;
49
49
  declare const ExpireIntentActionSchema: z.ZodObject<{
50
50
  type: z.ZodUnion<[z.ZodLiteral<"expire">, z.ZodLiteral<"EXPIRE">]>;
@@ -52,12 +52,12 @@ declare const ExpireIntentActionSchema: z.ZodObject<{
52
52
  reason: z.ZodString;
53
53
  }, "strip", z.ZodTypeAny, {
54
54
  type: "expire" | "EXPIRE";
55
- id: string;
56
55
  reason: string;
56
+ id: string;
57
57
  }, {
58
58
  type: "expire" | "EXPIRE";
59
- id: string;
60
59
  reason: string;
60
+ id: string;
61
61
  }>;
62
62
  export type NormalizedIntentAction = Omit<z.infer<typeof CreateIntentActionSchema>, "type"> & {
63
63
  type: "create";
@@ -25,9 +25,9 @@ export declare class IntentNetworkGraphFactory {
25
25
  intent: IntentForIndexing | null;
26
26
  indexContext: IndexMemberContext | null;
27
27
  evaluation: {
28
- reasoning: string;
29
28
  indexScore: number;
30
29
  memberScore: number;
30
+ reasoning: string;
31
31
  } | null;
32
32
  shouldAssign: boolean | undefined;
33
33
  finalScore: number | undefined;
@@ -64,13 +64,13 @@ export declare class IntentNetworkGraphFactory {
64
64
  intent?: IntentForIndexing | import("@langchain/langgraph").OverwriteValue<IntentForIndexing | null> | null | undefined;
65
65
  indexContext?: IndexMemberContext | import("@langchain/langgraph").OverwriteValue<IndexMemberContext | null> | null | undefined;
66
66
  evaluation?: {
67
- reasoning: string;
68
67
  indexScore: number;
69
68
  memberScore: number;
70
- } | import("@langchain/langgraph").OverwriteValue<{
71
69
  reasoning: string;
70
+ } | import("@langchain/langgraph").OverwriteValue<{
72
71
  indexScore: number;
73
72
  memberScore: number;
73
+ reasoning: string;
74
74
  } | null> | null | undefined;
75
75
  shouldAssign?: boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined;
76
76
  finalScore?: number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined;
@@ -129,17 +129,17 @@ export declare class IntentNetworkGraphFactory {
129
129
  intent: import("@langchain/langgraph").BaseChannel<IntentForIndexing | null, IntentForIndexing | import("@langchain/langgraph").OverwriteValue<IntentForIndexing | null> | null, unknown>;
130
130
  indexContext: import("@langchain/langgraph").BaseChannel<IndexMemberContext | null, IndexMemberContext | import("@langchain/langgraph").OverwriteValue<IndexMemberContext | null> | null, unknown>;
131
131
  evaluation: import("@langchain/langgraph").BaseChannel<{
132
- reasoning: string;
133
132
  indexScore: number;
134
133
  memberScore: number;
135
- } | null, {
136
134
  reasoning: string;
135
+ } | null, {
137
136
  indexScore: number;
138
137
  memberScore: number;
139
- } | import("@langchain/langgraph").OverwriteValue<{
140
138
  reasoning: string;
139
+ } | import("@langchain/langgraph").OverwriteValue<{
141
140
  indexScore: number;
142
141
  memberScore: number;
142
+ reasoning: string;
143
143
  } | null> | null, unknown>;
144
144
  shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
145
145
  finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
@@ -216,17 +216,17 @@ export declare class IntentNetworkGraphFactory {
216
216
  intent: import("@langchain/langgraph").BaseChannel<IntentForIndexing | null, IntentForIndexing | import("@langchain/langgraph").OverwriteValue<IntentForIndexing | null> | null, unknown>;
217
217
  indexContext: import("@langchain/langgraph").BaseChannel<IndexMemberContext | null, IndexMemberContext | import("@langchain/langgraph").OverwriteValue<IndexMemberContext | null> | null, unknown>;
218
218
  evaluation: import("@langchain/langgraph").BaseChannel<{
219
- reasoning: string;
220
219
  indexScore: number;
221
220
  memberScore: number;
222
- } | null, {
223
221
  reasoning: string;
222
+ } | null, {
224
223
  indexScore: number;
225
224
  memberScore: number;
226
- } | import("@langchain/langgraph").OverwriteValue<{
227
225
  reasoning: string;
226
+ } | import("@langchain/langgraph").OverwriteValue<{
228
227
  indexScore: number;
229
228
  memberScore: number;
229
+ reasoning: string;
230
230
  } | null> | null, unknown>;
231
231
  shouldAssign: import("@langchain/langgraph").BaseChannel<boolean | undefined, boolean | import("@langchain/langgraph").OverwriteValue<boolean | undefined> | undefined, unknown>;
232
232
  finalScore: import("@langchain/langgraph").BaseChannel<number | undefined, number | import("@langchain/langgraph").OverwriteValue<number | undefined> | undefined, unknown>;
@@ -324,6 +324,17 @@ export declare class IntentNetworkGraphFactory {
324
324
  evaluation?: undefined;
325
325
  shouldAssign?: undefined;
326
326
  finalScore?: undefined;
327
+ } | {
328
+ agentTimings: DebugMetaAgent[];
329
+ assignmentResult: AssignmentResult;
330
+ mutationResult: {
331
+ success: boolean;
332
+ error: string;
333
+ message?: undefined;
334
+ };
335
+ evaluation?: undefined;
336
+ shouldAssign?: undefined;
337
+ finalScore?: undefined;
327
338
  } | {
328
339
  agentTimings: DebugMetaAgent[];
329
340
  evaluation: null;
@@ -338,9 +349,9 @@ export declare class IntentNetworkGraphFactory {
338
349
  } | {
339
350
  agentTimings: DebugMetaAgent[];
340
351
  evaluation: {
341
- reasoning: string;
342
352
  indexScore: number;
343
353
  memberScore: number;
354
+ reasoning: string;
344
355
  };
345
356
  shouldAssign: boolean;
346
357
  finalScore: number;
@@ -353,9 +364,9 @@ export declare class IntentNetworkGraphFactory {
353
364
  } | {
354
365
  agentTimings: DebugMetaAgent[];
355
366
  evaluation: {
356
- reasoning: string;
357
367
  indexScore: number;
358
368
  memberScore: number;
369
+ reasoning: string;
359
370
  };
360
371
  shouldAssign: boolean;
361
372
  finalScore: number;
@@ -1 +1 @@
1
- {"version":3,"file":"indexer.graph.d.ts","sourceRoot":"/","sources":["network/indexer/indexer.graph.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AAC/D,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,+CAA+C,CAAC;AAIhG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AAGzE,OAAO,EAEL,KAAK,iBAAiB,EACtB,KAAK,kBAAkB,EACvB,KAAK,gBAAgB,EACtB,MAAM,oBAAoB,CAAC;AAK5B;;;;;;;;;GASG;AACH,qBAAa,yBAAyB;IAElC,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,eAAe;gBADf,QAAQ,EAAE,0BAA0B,EACpC,eAAe,EAAE,aAAa;IAGjC,WAAW;;;;;;;;;;;;;;;;;;;;;2BAiDR,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAFrD,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;2BAFrD,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAFrD,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;2BAFrD,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;2BAFrD,CAAX;4BACa,CAAL;sBAAsB,CAAC;wBAClB,CAAJ;yBAAyB,CAAC;8BAA4B,CAAC;;;;;;;;;;;;;;;;;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X;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;2BAHM,CAAC;4BAA4B,CAAC;sBAC5B,CAAX;wBAAyB,CAAA;yBACb,CAAC;8BACF,CAAR;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BAQ0E,gBAAgB;;;;;;;;;;;8BAed,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;8BA0FlB,gBAAgB;;;;;;;;;;;;;;;8BAUjB,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAqM9F"}
@@ -1,11 +1,11 @@
1
1
  import { StateGraph, START, END } from "@langchain/langgraph";
2
+ import { buildNetworkAssignmentDecision, } from "../../shared/assignment/network-assignment.policy.js";
2
3
  import { protocolLogger } from "../../shared/observability/protocol.logger.js";
3
4
  import { timed } from "../../shared/observability/performance.js";
4
5
  import { requestContext } from "../../shared/observability/request-context.js";
5
6
  import { renderNetworkContext } from "../../shared/network/metadata.renderer.js";
6
7
  import { IntentNetworkGraphState, } from "./indexer.state.js";
7
8
  const logger = protocolLogger("IntentNetworkGraphFactory");
8
- const QUALIFICATION_THRESHOLD = 0.7;
9
9
  /**
10
10
  * Factory class to build and compile the Intent Index Graph.
11
11
  *
@@ -62,7 +62,15 @@ export class IntentNetworkGraphFactory {
62
62
  }
63
63
  // Direct assignment (skip evaluation)
64
64
  if (state.skipEvaluation) {
65
- await this.database.assignIntentToNetwork(intentId, networkId, 1.0);
65
+ const decision = buildNetworkAssignmentDecision({
66
+ resourceType: "intent",
67
+ mode: "manual_override",
68
+ scope: "network",
69
+ evaluator: "intent-network-graph",
70
+ source: "manual-index-assignment",
71
+ createdAt: new Date().toISOString(),
72
+ });
73
+ await this.database.assignIntentToNetwork(intentId, networkId, decision.finalScore, decision.metadata);
66
74
  return {
67
75
  agentTimings: agentTimingsAccum,
68
76
  assignmentResult: { networkId, assigned: true, success: true },
@@ -74,23 +82,33 @@ export class IntentNetworkGraphFactory {
74
82
  if (!intentForIndexing) {
75
83
  return { agentTimings: agentTimingsAccum, mutationResult: { success: false, error: "Intent not found for networking." } };
76
84
  }
77
- const indexContext = await this.database.getNetworkMemberContext(networkId, intentForIndexing.userId);
85
+ const indexContext = await this.database.getNetworkAssignmentContext(networkId, intentForIndexing.userId);
78
86
  if (!indexContext) {
79
- // No prompts or not eligible - auto-assign
80
- await this.database.assignIntentToNetwork(intentId, networkId, 1.0);
81
87
  return {
82
88
  agentTimings: agentTimingsAccum,
83
- assignmentResult: { networkId, assigned: true, success: true },
84
- mutationResult: { success: true, message: "Intent assigned to network (auto-assign, no prompts)." },
89
+ assignmentResult: { networkId, assigned: false, success: false },
90
+ mutationResult: { success: false, error: "Network assignment context not found." },
85
91
  };
86
92
  }
87
- const hasNoPrompts = !indexContext.indexPrompt?.trim() && !indexContext.memberPrompt?.trim();
93
+ const indexPrompt = indexContext.indexPrompt ?? null;
94
+ const memberPrompt = indexContext.memberPrompt ?? null;
95
+ const hasNoPrompts = !indexPrompt?.trim() && !memberPrompt?.trim();
88
96
  if (hasNoPrompts) {
89
- await this.database.assignIntentToNetwork(intentId, networkId, 1.0);
97
+ const decision = buildNetworkAssignmentDecision({
98
+ resourceType: "intent",
99
+ mode: "automatic",
100
+ scope: "network",
101
+ indexPrompt,
102
+ memberPrompt,
103
+ evaluator: "intent-indexer",
104
+ source: "intent-network-graph",
105
+ createdAt: new Date().toISOString(),
106
+ });
107
+ await this.database.assignIntentToNetwork(intentId, networkId, decision.finalScore, decision.metadata);
90
108
  return {
91
109
  agentTimings: agentTimingsAccum,
92
110
  assignmentResult: { networkId, assigned: true, success: true },
93
- mutationResult: { success: true, message: "Intent assigned to network (no prompts, auto-assign)." },
111
+ mutationResult: { success: true, message: "Intent assigned to network (no prompts)." },
94
112
  };
95
113
  }
96
114
  // Run IntentIndexer evaluation
@@ -112,7 +130,7 @@ export class IntentNetworkGraphFactory {
112
130
  _traceEmitterIndexer?.({ type: "agent_start", name: "intent-indexer" });
113
131
  let result = null;
114
132
  try {
115
- result = await indexer.evaluate(intentForIndexing.payload, indexContext.indexPrompt, indexContext.memberPrompt, sourceName, renderedContext);
133
+ result = await indexer.evaluate(intentForIndexing.payload, indexPrompt, memberPrompt, sourceName, renderedContext);
116
134
  }
117
135
  finally {
118
136
  const _indexerMs = Date.now() - _indexerStart;
@@ -128,51 +146,36 @@ export class IntentNetworkGraphFactory {
128
146
  mutationResult: { success: false, error: "Evaluation returned no result." },
129
147
  };
130
148
  }
131
- const { indexScore, memberScore } = result;
132
- const ip = indexContext.indexPrompt?.trim();
133
- const mp = indexContext.memberPrompt?.trim();
134
- let shouldAssign = false;
135
- let finalScore = 0;
136
- if (ip && mp) {
137
- if (indexScore > QUALIFICATION_THRESHOLD && memberScore > QUALIFICATION_THRESHOLD) {
138
- shouldAssign = true;
139
- finalScore = indexScore * 0.6 + memberScore * 0.4;
140
- }
141
- }
142
- else if (ip) {
143
- if (indexScore > QUALIFICATION_THRESHOLD) {
144
- shouldAssign = true;
145
- finalScore = indexScore;
146
- }
147
- }
148
- else if (mp) {
149
- if (memberScore > QUALIFICATION_THRESHOLD) {
150
- shouldAssign = true;
151
- finalScore = memberScore;
152
- }
153
- }
154
- else {
155
- shouldAssign = true;
156
- finalScore = 1.0;
157
- }
158
- if (shouldAssign) {
159
- await this.database.assignIntentToNetwork(intentId, networkId, finalScore);
149
+ const decision = buildNetworkAssignmentDecision({
150
+ resourceType: "intent",
151
+ mode: "automatic",
152
+ scope: "network",
153
+ indexPrompt,
154
+ memberPrompt,
155
+ rawScores: { indexScore: result.indexScore, memberScore: result.memberScore },
156
+ evaluator: "intent-indexer",
157
+ source: "intent-network-graph",
158
+ reason: result.reasoning,
159
+ createdAt: new Date().toISOString(),
160
+ });
161
+ if (decision.assigned) {
162
+ await this.database.assignIntentToNetwork(intentId, networkId, decision.finalScore, decision.metadata);
160
163
  return {
161
164
  agentTimings: agentTimingsAccum,
162
165
  evaluation: result,
163
166
  shouldAssign: true,
164
- finalScore,
167
+ finalScore: decision.finalScore,
165
168
  assignmentResult: { networkId, assigned: true, success: true },
166
- mutationResult: { success: true, message: `Intent assigned to network (score: ${finalScore.toFixed(2)}).` },
169
+ mutationResult: { success: true, message: `Intent assigned to network (score: ${decision.finalScore.toFixed(2)}).` },
167
170
  };
168
171
  }
169
172
  return {
170
173
  agentTimings: agentTimingsAccum,
171
174
  evaluation: result,
172
175
  shouldAssign: false,
173
- finalScore,
176
+ finalScore: decision.finalScore,
174
177
  assignmentResult: { networkId, assigned: false, success: true },
175
- mutationResult: { success: false, error: `Intent did not qualify for this network (score: ${finalScore.toFixed(2)}).` },
178
+ mutationResult: { success: false, error: `Intent did not qualify for this network (score: ${decision.finalScore.toFixed(2)}).` },
176
179
  };
177
180
  }
178
181
  catch (err) {