@indexnetwork/protocol 2.0.1 → 3.0.0-rc.245.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/dist/index.d.ts +6 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/intent/intent.graph.d.ts +26 -26
- package/dist/intent/intent.inferrer.d.ts +8 -8
- package/dist/intent/intent.reconciler.d.ts +12 -12
- package/dist/intent/intent.state.d.ts +6 -6
- package/dist/mcp/mcp.server.d.ts +5 -0
- package/dist/mcp/mcp.server.d.ts.map +1 -1
- package/dist/mcp/mcp.server.js +43 -2
- package/dist/mcp/mcp.server.js.map +1 -1
- package/dist/opportunity/opportunity.evaluator.d.ts +3 -3
- package/dist/premise/premise.analyzer.d.ts +2 -2
- package/dist/premise/premise.decomposer.d.ts +2 -2
- package/dist/premise/premise.tools.js.map +1 -1
- package/dist/shared/agent/tool.factory.js.map +1 -1
- package/dist/shared/agent/tool.helpers.d.ts +1 -1
- package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
- package/dist/shared/agent/tool.helpers.js.map +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +1 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.js.map +1 -1
- package/dist/shared/interfaces/auth.interface.d.ts +16 -9
- package/dist/shared/interfaces/auth.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/auth.interface.js.map +1 -1
- package/dist/shared/interfaces/database.interface.d.ts +2 -2
- package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/database.interface.js.map +1 -1
- package/dist/shared/interfaces/question-generator.interface.d.ts +1 -1
- package/dist/shared/interfaces/question-generator.interface.d.ts.map +1 -1
- package/dist/shared/interfaces/question-generator.interface.js.map +1 -1
- package/dist/shared/schemas/discovery-question.schema.d.ts +242 -0
- package/dist/shared/schemas/discovery-question.schema.d.ts.map +1 -0
- package/dist/shared/schemas/discovery-question.schema.js +49 -0
- package/dist/shared/schemas/discovery-question.schema.js.map +1 -0
- package/dist/shared/schemas/mcp-auth.schema.d.ts +18 -0
- package/dist/shared/schemas/mcp-auth.schema.d.ts.map +1 -0
- package/dist/shared/schemas/mcp-auth.schema.js +2 -0
- package/dist/shared/schemas/mcp-auth.schema.js.map +1 -0
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +2 -2
- package/dist/shared/schemas/negotiation-state.schema.d.ts +118 -0
- package/dist/shared/schemas/negotiation-state.schema.d.ts.map +1 -0
- package/dist/shared/schemas/negotiation-state.schema.js +29 -0
- package/dist/shared/schemas/negotiation-state.schema.js.map +1 -0
- package/dist/shared/schemas/profile.schema.d.ts +100 -0
- package/dist/shared/schemas/profile.schema.d.ts.map +1 -0
- package/dist/shared/schemas/profile.schema.js +26 -0
- package/dist/shared/schemas/profile.schema.js.map +1 -0
- package/dist/shared/schemas/question.schema.d.ts +8 -8
- package/package.json +1 -2
package/dist/index.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ export { createChatTools } from "./shared/agent/tool.factory.js";
|
|
|
2
2
|
export { getModelName } from "./shared/agent/model.config.js";
|
|
3
3
|
export type { ChatTools } from "./shared/agent/tool.factory.js";
|
|
4
4
|
export type { ModelConfig, ModelSettings } from "./shared/agent/model.config.js";
|
|
5
|
-
export type { ToolContext,
|
|
5
|
+
export type { ToolContext, ResolvedToolContext, ToolDeps, ProtocolDeps, RawToolDefinition, CompiledGraph, } from "./shared/agent/tool.helpers.js";
|
|
6
6
|
export { ChatContextAccessError, resolveChatContext } from "./shared/agent/tool.helpers.js";
|
|
7
7
|
export { requestContext } from "./shared/observability/request-context.js";
|
|
8
8
|
export { setTimingWrapper } from "./shared/observability/performance.js";
|
|
@@ -37,6 +37,9 @@ export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';
|
|
|
37
37
|
export { ChatContextDigestSchema, type ChatContextDigest, } from "./shared/schemas/chat-context.schema.js";
|
|
38
38
|
export { QuestionOptionSchema, QuestionSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionActorSchema, QuestionAnswerSchema, type Question, type QuestionOption, type QuestionStrategy, type QuestionWithStrategy, type QuestionGeneratorResponse, type QuestionGenerationResult, type QuestionMode, type QuestionDetection, type QuestionActor, type QuestionAnswer, } from "./shared/schemas/question.schema.js";
|
|
39
39
|
export type { PendingQuestionSummary } from "./shared/schemas/pending-question.schema.js";
|
|
40
|
+
export type { McpAuthInput } from "./shared/schemas/mcp-auth.schema.js";
|
|
41
|
+
export { ProfileIdentitySchema, ProfileNarrativeSchema, ProfileAttributesSchema, ProfileDocumentSchema, type ProfileDocument, } from "./shared/schemas/profile.schema.js";
|
|
42
|
+
export type { DiscoverySourceProfile, DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome, DiscoveryQuestionInput, NegotiationRole, } from "./shared/schemas/discovery-question.schema.js";
|
|
40
43
|
export { ChatGraphFactory } from "./chat/chat.graph.js";
|
|
41
44
|
export { HomeGraphFactory } from "./opportunity/feed/feed.graph.js";
|
|
42
45
|
export { HydeGraphFactory } from "./shared/hyde/hyde.graph.js";
|
|
@@ -84,7 +87,6 @@ export { createOpportunityTools } from "./opportunity/opportunity.tools.js";
|
|
|
84
87
|
export { createProfileTools } from "./profile/profile.tools.js";
|
|
85
88
|
export type { PresenterDatabase } from "./opportunity/opportunity.presenter.js";
|
|
86
89
|
export { QuestionGenerator } from "./opportunity/question.generator.js";
|
|
87
|
-
export type { DiscoveryQuestionInput, DiscoveryNegotiation, DiscoveryOutcome, DiscoveryTurn, DiscoverySummary, DiscoverySourceProfile, NegotiationRole, } from "./opportunity/question.prompt.js";
|
|
88
90
|
export { renderNetworkContext } from './shared/network/metadata.renderer.js';
|
|
89
91
|
export { canUserSeeOpportunity, isActionableForViewer, validateOpportunityActors, classifyOpportunity, selectByComposition, FEED_SOFT_TARGETS, } from "./opportunity/opportunity.utils.js";
|
|
90
92
|
export { getPrimaryActionLabel } from "./opportunity/opportunity.labels.js";
|
|
@@ -106,7 +108,8 @@ export type { ScopedDepsFactory } from "./mcp/mcp.server.js";
|
|
|
106
108
|
export { buildElicitationCreate, flattenChoice } from "./mcp/elicitation.builder.js";
|
|
107
109
|
export { dispatchElicitations } from "./mcp/elicitation.dispatcher.js";
|
|
108
110
|
export type { ElicitResultLike, ElicitInputFn, DispatchElicitationsParams } from "./mcp/elicitation.dispatcher.js";
|
|
109
|
-
export type { UserNegotiationContext, NegotiationTurn, NegotiationOutcome, SeedAssessment,
|
|
111
|
+
export type { UserNegotiationContext, NegotiationTurn, NegotiationOutcome, SeedAssessment, } from "./shared/schemas/negotiation-state.schema.js";
|
|
112
|
+
export type { NegotiationGraphLike } from "./negotiation/negotiation.state.js";
|
|
110
113
|
export { ChatStreamer } from "./chat/chat.streamer.js";
|
|
111
114
|
export { ResponseStreamer } from "./shared/agent/response.streamer.js";
|
|
112
115
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -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,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EACV,WAAW,EACX,
|
|
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,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE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E,OAAO,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAC;AAC1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAC5E,OAAO,EAAE,uBAAuB,EAAE,MAAM,mCAAmC,CAAC;AAI5E,OAAO,EAAE,eAAe,EAAE,sBAAsB,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,qBAAqB,CAAC;AAC7H,YAAY,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAC7D,OAAO,EAAE,sBAAsB,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AACrF,OAAO,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,aAAa,EAAE,0BAA0B,EAAE,MAAM,iCAAiC,CAAC;AAInH,YAAY,EACV,sBAAsB,EACtB,eAAe,EACf,kBAAkB,EAClB,cAAc,GACf,MAAM,8CAA8C,CAAC;AACtD,YAAY,EAAE,oBAAoB,EAAE,MAAM,oCAAoC,CAAC;AAI/E,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -10,6 +10,7 @@ export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';
|
|
|
10
10
|
// ─── Shared schemas ───────────────────────────────────────────────────────────
|
|
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
|
+
export { ProfileIdentitySchema, ProfileNarrativeSchema, ProfileAttributesSchema, ProfileDocumentSchema, } from "./shared/schemas/profile.schema.js";
|
|
13
14
|
// ─── Graph factories ──────────────────────────────────────────────────────────
|
|
14
15
|
export { ChatGraphFactory } from "./chat/chat.graph.js";
|
|
15
16
|
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;AACjE,OAAO,EAAE,YAAY,EAAE,MAAM,gCAAgC,CAAC;AAc9D,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,0BAA0B,EAC1B,+BAA+B,EAC/B,kBAAkB,EAClB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,GAWrB,MAAM,qCAAqC,CAAC;AAG7C,iFAAiF;AAEjF,OAAO,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,gBAAgB,EAAE,MAAM,kCAAkC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAC/D,OAAO,EAAE,mBAAmB,EAAE,MAAM,4BAA4B,CAAC;AACjE,OAAO,EAAE,6BAA6B,EAAE,MAAM,0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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 ToolErrorReport,\n ResolvedToolContext,\n ToolDeps,\n ProtocolDeps,\n DefineTool,\n RawToolDefinition,\n CompiledGraph,\n ToolRegistry,\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\";\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\";\nexport type {\n DiscoveryQuestionInput,\n DiscoveryNegotiation,\n DiscoveryOutcome,\n DiscoveryTurn,\n DiscoverySummary,\n DiscoverySourceProfile,\n NegotiationRole,\n} from \"./opportunity/question.prompt.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 NegotiationGraphLike,\n} 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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,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\";\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"]}
|
|
@@ -23,9 +23,9 @@ export declare class IntentGraphFactory {
|
|
|
23
23
|
networkId: string | undefined;
|
|
24
24
|
activeIntents: string;
|
|
25
25
|
inferredIntents: {
|
|
26
|
-
reasoning: string;
|
|
27
|
-
confidence: "low" | "medium" | "high";
|
|
28
26
|
type: "goal" | "tombstone";
|
|
27
|
+
confidence: "low" | "medium" | "high";
|
|
28
|
+
reasoning: string;
|
|
29
29
|
description: string;
|
|
30
30
|
}[];
|
|
31
31
|
verifiedIntents: VerifiedIntent[];
|
|
@@ -64,14 +64,14 @@ export declare class IntentGraphFactory {
|
|
|
64
64
|
networkId?: string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined;
|
|
65
65
|
activeIntents?: string | import("@langchain/langgraph").OverwriteValue<string> | undefined;
|
|
66
66
|
inferredIntents?: {
|
|
67
|
-
reasoning: string;
|
|
68
|
-
confidence: "low" | "medium" | "high";
|
|
69
67
|
type: "goal" | "tombstone";
|
|
68
|
+
confidence: "low" | "medium" | "high";
|
|
69
|
+
reasoning: string;
|
|
70
70
|
description: string;
|
|
71
71
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
72
|
-
reasoning: string;
|
|
73
|
-
confidence: "low" | "medium" | "high";
|
|
74
72
|
type: "goal" | "tombstone";
|
|
73
|
+
confidence: "low" | "medium" | "high";
|
|
74
|
+
reasoning: string;
|
|
75
75
|
description: string;
|
|
76
76
|
}[]> | undefined;
|
|
77
77
|
verifiedIntents?: VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<VerifiedIntent[]> | undefined;
|
|
@@ -138,19 +138,19 @@ export declare class IntentGraphFactory {
|
|
|
138
138
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
139
139
|
activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
140
140
|
inferredIntents: import("@langchain/langgraph").BaseChannel<{
|
|
141
|
-
reasoning: string;
|
|
142
|
-
confidence: "low" | "medium" | "high";
|
|
143
141
|
type: "goal" | "tombstone";
|
|
142
|
+
confidence: "low" | "medium" | "high";
|
|
143
|
+
reasoning: string;
|
|
144
144
|
description: string;
|
|
145
145
|
}[], {
|
|
146
|
-
reasoning: string;
|
|
147
|
-
confidence: "low" | "medium" | "high";
|
|
148
146
|
type: "goal" | "tombstone";
|
|
147
|
+
confidence: "low" | "medium" | "high";
|
|
148
|
+
reasoning: string;
|
|
149
149
|
description: string;
|
|
150
150
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
151
|
-
reasoning: string;
|
|
152
|
-
confidence: "low" | "medium" | "high";
|
|
153
151
|
type: "goal" | "tombstone";
|
|
152
|
+
confidence: "low" | "medium" | "high";
|
|
153
|
+
reasoning: string;
|
|
154
154
|
description: string;
|
|
155
155
|
}[]>, unknown>;
|
|
156
156
|
verifiedIntents: import("@langchain/langgraph").BaseChannel<VerifiedIntent[], VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<VerifiedIntent[]>, unknown>;
|
|
@@ -233,19 +233,19 @@ export declare class IntentGraphFactory {
|
|
|
233
233
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
234
234
|
activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
235
235
|
inferredIntents: import("@langchain/langgraph").BaseChannel<{
|
|
236
|
-
reasoning: string;
|
|
237
|
-
confidence: "low" | "medium" | "high";
|
|
238
236
|
type: "goal" | "tombstone";
|
|
237
|
+
confidence: "low" | "medium" | "high";
|
|
238
|
+
reasoning: string;
|
|
239
239
|
description: string;
|
|
240
240
|
}[], {
|
|
241
|
-
reasoning: string;
|
|
242
|
-
confidence: "low" | "medium" | "high";
|
|
243
241
|
type: "goal" | "tombstone";
|
|
242
|
+
confidence: "low" | "medium" | "high";
|
|
243
|
+
reasoning: string;
|
|
244
244
|
description: string;
|
|
245
245
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
246
|
-
reasoning: string;
|
|
247
|
-
confidence: "low" | "medium" | "high";
|
|
248
246
|
type: "goal" | "tombstone";
|
|
247
|
+
confidence: "low" | "medium" | "high";
|
|
248
|
+
reasoning: string;
|
|
249
249
|
description: string;
|
|
250
250
|
}[]>, unknown>;
|
|
251
251
|
verifiedIntents: import("@langchain/langgraph").BaseChannel<VerifiedIntent[], VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<VerifiedIntent[]>, unknown>;
|
|
@@ -362,9 +362,9 @@ export declare class IntentGraphFactory {
|
|
|
362
362
|
};
|
|
363
363
|
inference: {
|
|
364
364
|
inferredIntents: {
|
|
365
|
-
reasoning: string;
|
|
366
|
-
confidence: "low" | "medium" | "high";
|
|
367
365
|
type: "goal" | "tombstone";
|
|
366
|
+
confidence: "low" | "medium" | "high";
|
|
367
|
+
reasoning: string;
|
|
368
368
|
description: string;
|
|
369
369
|
}[];
|
|
370
370
|
agentTimings: DebugMetaAgent[];
|
|
@@ -418,19 +418,19 @@ export declare class IntentGraphFactory {
|
|
|
418
418
|
networkId: import("@langchain/langgraph").BaseChannel<string | undefined, string | import("@langchain/langgraph").OverwriteValue<string | undefined> | undefined, unknown>;
|
|
419
419
|
activeIntents: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
|
|
420
420
|
inferredIntents: import("@langchain/langgraph").BaseChannel<{
|
|
421
|
-
reasoning: string;
|
|
422
|
-
confidence: "low" | "medium" | "high";
|
|
423
421
|
type: "goal" | "tombstone";
|
|
422
|
+
confidence: "low" | "medium" | "high";
|
|
423
|
+
reasoning: string;
|
|
424
424
|
description: string;
|
|
425
425
|
}[], {
|
|
426
|
-
reasoning: string;
|
|
427
|
-
confidence: "low" | "medium" | "high";
|
|
428
426
|
type: "goal" | "tombstone";
|
|
427
|
+
confidence: "low" | "medium" | "high";
|
|
428
|
+
reasoning: string;
|
|
429
429
|
description: string;
|
|
430
430
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
431
|
-
reasoning: string;
|
|
432
|
-
confidence: "low" | "medium" | "high";
|
|
433
431
|
type: "goal" | "tombstone";
|
|
432
|
+
confidence: "low" | "medium" | "high";
|
|
433
|
+
reasoning: string;
|
|
434
434
|
description: string;
|
|
435
435
|
}[]>, unknown>;
|
|
436
436
|
verifiedIntents: import("@langchain/langgraph").BaseChannel<VerifiedIntent[], VerifiedIntent[] | import("@langchain/langgraph").OverwriteValue<VerifiedIntent[]>, unknown>;
|
|
@@ -30,14 +30,14 @@ declare const InferredIntentSchema: z.ZodObject<{
|
|
|
30
30
|
reasoning: z.ZodString;
|
|
31
31
|
confidence: z.ZodEnum<["high", "medium", "low"]>;
|
|
32
32
|
}, "strip", z.ZodTypeAny, {
|
|
33
|
-
reasoning: string;
|
|
34
|
-
confidence: "low" | "medium" | "high";
|
|
35
33
|
type: "goal" | "tombstone";
|
|
34
|
+
confidence: "low" | "medium" | "high";
|
|
35
|
+
reasoning: string;
|
|
36
36
|
description: string;
|
|
37
37
|
}, {
|
|
38
|
-
reasoning: string;
|
|
39
|
-
confidence: "low" | "medium" | "high";
|
|
40
38
|
type: "goal" | "tombstone";
|
|
39
|
+
confidence: "low" | "medium" | "high";
|
|
40
|
+
reasoning: string;
|
|
41
41
|
description: string;
|
|
42
42
|
}>;
|
|
43
43
|
export type InferredIntent = z.infer<typeof InferredIntentSchema>;
|
|
@@ -52,9 +52,9 @@ export declare class ExplicitIntentInferrer {
|
|
|
52
52
|
*/
|
|
53
53
|
invoke(content: string | null, profileContext: string, options?: InferrerOptions): Promise<{
|
|
54
54
|
intents: {
|
|
55
|
-
reasoning: string;
|
|
56
|
-
confidence: "low" | "medium" | "high";
|
|
57
55
|
type: "goal" | "tombstone";
|
|
56
|
+
confidence: "low" | "medium" | "high";
|
|
57
|
+
reasoning: string;
|
|
58
58
|
description: string;
|
|
59
59
|
}[];
|
|
60
60
|
}>;
|
|
@@ -84,9 +84,9 @@ export declare class ExplicitIntentInferrer {
|
|
|
84
84
|
profileContext: string;
|
|
85
85
|
}, {
|
|
86
86
|
intents: {
|
|
87
|
-
reasoning: string;
|
|
88
|
-
confidence: "low" | "medium" | "high";
|
|
89
87
|
type: "goal" | "tombstone";
|
|
88
|
+
confidence: "low" | "medium" | "high";
|
|
89
|
+
reasoning: string;
|
|
90
90
|
description: string;
|
|
91
91
|
}[];
|
|
92
92
|
}, unknown, "explicit_intent_inferrer">;
|
|
@@ -8,20 +8,20 @@ declare const CreateIntentActionSchema: z.ZodObject<{
|
|
|
8
8
|
referentialAnchor: z.ZodNullable<z.ZodString>;
|
|
9
9
|
semanticEntropy: z.ZodNullable<z.ZodNumber>;
|
|
10
10
|
}, "strip", z.ZodTypeAny, {
|
|
11
|
-
|
|
11
|
+
type: "create" | "CREATE";
|
|
12
12
|
payload: string;
|
|
13
13
|
semanticEntropy: number | null;
|
|
14
14
|
referentialAnchor: string | null;
|
|
15
15
|
intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
|
|
16
|
-
|
|
16
|
+
reasoning: string | null;
|
|
17
17
|
score: number | null;
|
|
18
18
|
}, {
|
|
19
|
-
|
|
19
|
+
type: "create" | "CREATE";
|
|
20
20
|
payload: string;
|
|
21
21
|
semanticEntropy: number | null;
|
|
22
22
|
referentialAnchor: string | null;
|
|
23
23
|
intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
|
|
24
|
-
|
|
24
|
+
reasoning: string | null;
|
|
25
25
|
score: number | null;
|
|
26
26
|
}>;
|
|
27
27
|
declare const UpdateIntentActionSchema: z.ZodObject<{
|
|
@@ -32,18 +32,18 @@ declare const UpdateIntentActionSchema: z.ZodObject<{
|
|
|
32
32
|
reasoning: z.ZodNullable<z.ZodString>;
|
|
33
33
|
intentMode: z.ZodNullable<z.ZodEnum<["REFERENTIAL", "ATTRIBUTIVE"]>>;
|
|
34
34
|
}, "strip", z.ZodTypeAny, {
|
|
35
|
-
|
|
36
|
-
id: string;
|
|
35
|
+
type: "update" | "UPDATE";
|
|
37
36
|
payload: string;
|
|
38
37
|
intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
|
|
39
|
-
type: "update" | "UPDATE";
|
|
40
|
-
score: number | null;
|
|
41
|
-
}, {
|
|
42
38
|
reasoning: string | null;
|
|
43
39
|
id: string;
|
|
40
|
+
score: number | null;
|
|
41
|
+
}, {
|
|
42
|
+
type: "update" | "UPDATE";
|
|
44
43
|
payload: string;
|
|
45
44
|
intentMode: "REFERENTIAL" | "ATTRIBUTIVE" | null;
|
|
46
|
-
|
|
45
|
+
reasoning: string | null;
|
|
46
|
+
id: string;
|
|
47
47
|
score: number | null;
|
|
48
48
|
}>;
|
|
49
49
|
declare const ExpireIntentActionSchema: z.ZodObject<{
|
|
@@ -51,12 +51,12 @@ declare const ExpireIntentActionSchema: z.ZodObject<{
|
|
|
51
51
|
id: z.ZodString;
|
|
52
52
|
reason: z.ZodString;
|
|
53
53
|
}, "strip", z.ZodTypeAny, {
|
|
54
|
-
id: string;
|
|
55
54
|
type: "expire" | "EXPIRE";
|
|
55
|
+
id: string;
|
|
56
56
|
reason: string;
|
|
57
57
|
}, {
|
|
58
|
-
id: string;
|
|
59
58
|
type: "expire" | "EXPIRE";
|
|
59
|
+
id: string;
|
|
60
60
|
reason: string;
|
|
61
61
|
}>;
|
|
62
62
|
export type NormalizedIntentAction = Omit<z.infer<typeof CreateIntentActionSchema>, "type"> & {
|
|
@@ -95,19 +95,19 @@ export declare const IntentGraphState: import("@langchain/langgraph").Annotation
|
|
|
95
95
|
* List of raw intents extracted from text.
|
|
96
96
|
*/
|
|
97
97
|
inferredIntents: import("@langchain/langgraph").BaseChannel<{
|
|
98
|
-
reasoning: string;
|
|
99
|
-
confidence: "low" | "medium" | "high";
|
|
100
98
|
type: "goal" | "tombstone";
|
|
99
|
+
confidence: "low" | "medium" | "high";
|
|
100
|
+
reasoning: string;
|
|
101
101
|
description: string;
|
|
102
102
|
}[], {
|
|
103
|
-
reasoning: string;
|
|
104
|
-
confidence: "low" | "medium" | "high";
|
|
105
103
|
type: "goal" | "tombstone";
|
|
104
|
+
confidence: "low" | "medium" | "high";
|
|
105
|
+
reasoning: string;
|
|
106
106
|
description: string;
|
|
107
107
|
}[] | import("@langchain/langgraph").OverwriteValue<{
|
|
108
|
-
reasoning: string;
|
|
109
|
-
confidence: "low" | "medium" | "high";
|
|
110
108
|
type: "goal" | "tombstone";
|
|
109
|
+
confidence: "low" | "medium" | "high";
|
|
110
|
+
reasoning: string;
|
|
111
111
|
description: string;
|
|
112
112
|
}[]>, unknown>;
|
|
113
113
|
/**
|
package/dist/mcp/mcp.server.d.ts
CHANGED
|
@@ -88,5 +88,10 @@ export declare const ONBOARDING_ALLOWED: ReadonlySet<string>;
|
|
|
88
88
|
*/
|
|
89
89
|
export declare function buildMcpOnboardingMessage(ctx: ResolvedToolContext): string;
|
|
90
90
|
export declare const MCP_INSTRUCTIONS: string;
|
|
91
|
+
/**
|
|
92
|
+
* Extracts a Bearer token from an HTTP Authorization header.
|
|
93
|
+
*/
|
|
94
|
+
export declare function extractBearerToken(req: Request): string | undefined;
|
|
95
|
+
export declare function parseClientSurface(raw: string | null): 'telegram' | 'web';
|
|
91
96
|
export declare function createMcpServer(deps: ToolDeps, authResolver: McpAuthResolver, scopedDepsFactory: ScopedDepsFactory): McpServer;
|
|
92
97
|
//# sourceMappingURL=mcp.server.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"mcp.server.d.ts","sourceRoot":"/","sources":["mcp/mcp.server.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAGH,OAAO,EAAE,SAAS,EAAkB,MAAM,8BAA8B,CAAC;AAGzE,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,wCAAwC,CAAC;
|
|
1
|
+
{"version":3,"file":"mcp.server.d.ts","sourceRoot":"/","sources":["mcp/mcp.server.ts"],"names":[],"mappings":"AAAA;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eAAO,MAAM,kBAAkB,EAAE,WAAW,CAAC,MAAM,CAiBjD,CAAC;AAEH;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,GAAG,EAAE,mBAAmB,GAAG,MAAM,CAyB1E;AAwCD,eAAO,MAAM,gBAAgB,QAsDrB,CAAC;AAET;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS,CAMnE;AAOD,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,IAAI,GAAG,UAAU,GAAG,KAAK,CAWzE;AAED,wBAAgB,eAAe,CAC7B,IAAI,EAAE,QAAQ,EACd,YAAY,EAAE,eAAe,EAC7B,iBAAiB,EAAE,iBAAiB,GACnC,SAAS,CA8QX"}
|
package/dist/mcp/mcp.server.js
CHANGED
|
@@ -378,6 +378,39 @@ After \`discover_opportunities\`, the tool result may include a second text bloc
|
|
|
378
378
|
|
|
379
379
|
**Elicitation-capable clients** (those that declared \`elicitation\` support in \`initialize\`): the server dispatches \`elicitation/create\` requests directly — answers are written back to the chat session automatically. You will not see the envelope as a follow-up task in that case.
|
|
380
380
|
`.trim();
|
|
381
|
+
/**
|
|
382
|
+
* Extracts a Bearer token from an HTTP Authorization header.
|
|
383
|
+
*/
|
|
384
|
+
export function extractBearerToken(req) {
|
|
385
|
+
const authHeader = req.headers.get('Authorization');
|
|
386
|
+
if (!authHeader)
|
|
387
|
+
return undefined;
|
|
388
|
+
const [scheme, token] = authHeader.trim().split(/\s+/, 2);
|
|
389
|
+
if (scheme?.toLowerCase() === 'bearer' && token)
|
|
390
|
+
return token;
|
|
391
|
+
return undefined;
|
|
392
|
+
}
|
|
393
|
+
/**
|
|
394
|
+
* Normalizes the x-index-surface header to a typed surface value.
|
|
395
|
+
* Unknown or absent values collapse to 'web'.
|
|
396
|
+
*/
|
|
397
|
+
let hasWarnedInvalidSurface = false;
|
|
398
|
+
export function parseClientSurface(raw) {
|
|
399
|
+
if (raw === null || raw === '')
|
|
400
|
+
return 'web';
|
|
401
|
+
const trimmed = raw.trim().toLowerCase();
|
|
402
|
+
if (trimmed === '')
|
|
403
|
+
return 'web';
|
|
404
|
+
if (trimmed === 'telegram')
|
|
405
|
+
return 'telegram';
|
|
406
|
+
if (trimmed === 'web')
|
|
407
|
+
return 'web';
|
|
408
|
+
if (!hasWarnedInvalidSurface) {
|
|
409
|
+
hasWarnedInvalidSurface = true;
|
|
410
|
+
logger.warn('Unknown x-index-surface value (collapsing to web; warning once per process)');
|
|
411
|
+
}
|
|
412
|
+
return 'web';
|
|
413
|
+
}
|
|
381
414
|
export function createMcpServer(deps, authResolver, scopedDepsFactory) {
|
|
382
415
|
// Tools exempt from the agent-registration gate — available before registration is complete.
|
|
383
416
|
const AGENT_GATE_EXEMPT = new Set(['register_agent', 'read_docs', 'scrape_url']);
|
|
@@ -404,8 +437,16 @@ export function createMcpServer(deps, authResolver, scopedDepsFactory) {
|
|
|
404
437
|
isError: true,
|
|
405
438
|
};
|
|
406
439
|
}
|
|
407
|
-
//
|
|
408
|
-
const
|
|
440
|
+
// Extract transport-neutral auth input DTO from the HTTP request
|
|
441
|
+
const mcpAuthInput = {
|
|
442
|
+
bearerToken: extractBearerToken(httpReq),
|
|
443
|
+
apiKey: httpReq.headers.get('x-api-key') ?? undefined,
|
|
444
|
+
clientSurface: parseClientSurface(httpReq.headers.get('x-index-surface')),
|
|
445
|
+
telegramHandle: httpReq.headers.get('x-index-telegram-handle') ?? undefined,
|
|
446
|
+
telegramUsername: httpReq.headers.get('x-index-telegram-username') ?? undefined,
|
|
447
|
+
};
|
|
448
|
+
// Resolve authenticated identity from the auth input DTO
|
|
449
|
+
const { userId, agentId, isSessionAuth, networkScopeId, clientSurface } = await authResolver.resolveIdentity(mcpAuthInput);
|
|
409
450
|
reportUserId = userId;
|
|
410
451
|
// Per-principal MCP throttle. Runs BEFORE any DB work so a throttled
|
|
411
452
|
// call short-circuits cheaply. The /mcp transport bypasses the
|