@indexnetwork/protocol 4.2.0-rc.295.1 → 4.3.0-rc.297.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/README.md CHANGED
@@ -2,6 +2,21 @@
2
2
 
3
3
  The agent orchestration layer for Index Network. Implements LangGraph-based workflows for intent processing, opportunity discovery, and chat — decoupled from any specific infrastructure via adapter injection.
4
4
 
5
+ ## Stability & versioning
6
+
7
+ This package follows [Semantic Versioning](https://semver.org/). The **only**
8
+ supported entry point is the package root (`import { ... } from "@indexnetwork/protocol"`);
9
+ deep imports are not part of the contract. Every symbol is re-exported explicitly from
10
+ `src/index.ts` and tagged with a stability tier:
11
+
12
+ - **Stable** — interfaces, graph factories, agents, `createChatTools`, the
13
+ tool/runtime helpers, and shared schemas. Breaking changes require a major bump.
14
+ - **Experimental** (`@experimental`) — advanced graph-state types and internal
15
+ helpers; may change in a minor release.
16
+
17
+ See [STABILITY.md](./STABILITY.md) for the full policy and the deprecation path,
18
+ and [CHANGELOG.md](./CHANGELOG.md) for release history.
19
+
5
20
  ## Install
6
21
 
7
22
  ```bash
@@ -59,7 +74,7 @@ The package defines interfaces — your application provides the concrete implem
59
74
  | `McpAuthResolver` | Resolves `{ userId, agentId }` from an incoming MCP HTTP request (MCP server only) |
60
75
  | `DeliveryLedger` | Commits OpenClaw opportunity-delivery rows |
61
76
  | `DiscoveryRunStore` / `DiscoveryRunQueue` | Persist and execute async MCP discovery runs |
62
- | `ProfileRunStore` / `ProfileRunQueue` | Persist and execute async MCP profile builds |
77
+ | `EnrichmentRunStore` / `EnrichmentRunQueue` | Persist and execute async MCP enrichment runs |
63
78
  | `MintConnectLink` | Mints short connect links for opportunity accepts |
64
79
  | `ChatSummaryReader` | Read-through chat-session digest |
65
80
  | `ChatMessageWriter` | Writes user messages into the most-recent chat session (MCP elicitation) |
@@ -102,8 +117,8 @@ const tools = await createChatTools({
102
117
  agentDatabase, // AgentDatabase — agent registry
103
118
  agentDispatcher, // AgentDispatcher — routes negotiation turns to personal agents
104
119
  deliveryLedger, // DeliveryLedger — OpenClaw delivery commits
105
- discoveryRuns, // DiscoveryRunStore + discoveryRunQueue — async MCP discovery
106
- profileRuns, // ProfileRunStore + profileRunQueue — async MCP profile builds
120
+ discoveryRuns, // DiscoveryRunStore (+ discoveryRunQueue) — async MCP discovery
121
+ enrichmentRuns, // EnrichmentRunStore (+ enrichmentRunQueue) — async MCP enrichment runs
107
122
  mintConnectLink, // short connect links for opportunity accepts
108
123
  modelConfig, // override chat model / reasoning effort (see above)
109
124
  });
@@ -126,7 +141,7 @@ import {
126
141
  ChatGraphFactory,
127
142
  IntentGraphFactory,
128
143
  OpportunityGraphFactory,
129
- ProfileGraphFactory,
144
+ EnrichmentGraphFactory,
130
145
  PremiseGraphFactory,
131
146
  NegotiationGraphFactory,
132
147
  HydeGraphFactory,
@@ -146,7 +161,7 @@ Each factory takes its typed dependencies in the constructor and exposes a
146
161
  | `ChatGraphFactory` | ReAct chat loop — LLM calls tools, responds to the user |
147
162
  | `IntentGraphFactory` | Clarify, infer, verify felicity, reconcile, and persist intents |
148
163
  | `OpportunityGraphFactory` | HyDE-based discovery: search, evaluate (valency), rank, persist |
149
- | `ProfileGraphFactory` | Generate/update user profiles with scraping and embedding |
164
+ | `EnrichmentGraphFactory` | Enrich users (scrape + embed) and decompose into premises |
150
165
  | `PremiseGraphFactory` | Decompose and index a user's premises |
151
166
  | `NegotiationGraphFactory` | Multi-turn bilateral negotiation flows |
152
167
  | `HydeGraphFactory` | Generate hypothetical documents and embed them (cache-aware) |
package/dist/index.d.ts CHANGED
@@ -8,9 +8,9 @@ export { requestContext } from "./shared/observability/request-context.js";
8
8
  export { setTimingWrapper } from "./shared/observability/performance.js";
9
9
  export { ToolRuntimeError, getToolTimeoutPolicy, invokeToolRuntime, toolRuntimeErrorToResult } from "./shared/agent/tool.runtime.js";
10
10
  export type { ToolRuntimeErrorCode, ToolTimeoutClass, ToolTimeoutPolicy } from "./shared/agent/tool.runtime.js";
11
- export type * from "./shared/interfaces/auth.interface.js";
12
- export type * from "./shared/interfaces/cache.interface.js";
13
- export type * from "./shared/interfaces/chat-session.interface.js";
11
+ export type { McpAuthResolver } from "./shared/interfaces/auth.interface.js";
12
+ export type { Cache, CacheOptions, HydeCache, OpportunityCache } from "./shared/interfaces/cache.interface.js";
13
+ export type { ChatSessionReader, ChatSessionDetail, ChatSessionSummary } from "./shared/interfaces/chat-session.interface.js";
14
14
  export type { ChatSummaryReader } from "./shared/interfaces/chat-summary.interface.js";
15
15
  export type { ChatMessageWriter } from "./shared/interfaces/chat-message-writer.interface.js";
16
16
  export type { QuestionGeneratorReader } from "./shared/interfaces/question-generator.interface.js";
@@ -18,19 +18,19 @@ export type { QuestionerDatabase, PersistableQuestion, PersistedQuestion, Questi
18
18
  export type { NegotiationSummaryReader } from "./shared/interfaces/negotiation-summary.interface.js";
19
19
  export type { DiscoveryNegotiationDigest } from "./shared/schemas/negotiation-digest.schema.js";
20
20
  export { NegotiationSummarizer, buildFallbackDigest } from "./negotiation/negotiation.summarizer.js";
21
- export type * from "./shared/interfaces/contact.interface.js";
22
- export type * from "./shared/interfaces/database.interface.js";
23
- export type * from "./shared/interfaces/embedder.interface.js";
24
- export type * from "./shared/interfaces/enrichment.interface.js";
25
- export type * from "./shared/interfaces/integration.interface.js";
26
- export type * from "./shared/interfaces/queue.interface.js";
27
- export type * from "./shared/interfaces/scraper.interface.js";
28
- export type * from "./shared/interfaces/storage.interface.js";
29
- export type * from "./shared/interfaces/delivery-ledger.interface.js";
30
- export type * from "./shared/interfaces/connect-link.interface.js";
31
- export type * from "./shared/interfaces/discovery-run.interface.js";
32
- export type * from "./shared/interfaces/enrichment-run.interface.js";
33
- export type * from "./shared/interfaces/negotiation-events.interface.js";
21
+ export type { ContactServiceAdapter, ContactEntry, ContactImportResult, ContactInput, ContactResult, ContactSearchResult } from "./shared/interfaces/contact.interface.js";
22
+ export type { ChatGraphCompositeDatabase, UserDatabase, SystemDatabase, Database, OpportunityGraphDatabase, OpportunityControllerDatabase, HomeGraphDatabase, IntentGraphDatabase, IntentNetworkGraphDatabase, NetworkGraphDatabase, NetworkMembershipGraphDatabase, HydeGraphDatabase, EnrichmentGraphDatabase, PremiseGraphDatabase, NegotiationGraphDatabase, NegotiationQueries, NegotiationUserAnswer, Opportunity, OpportunityActor, OpportunityContext, OpportunityDetection, OpportunityInterpretation, OpportunityQueryOptions, OpportunitySignal, OpportunityStatus, ActiveIntent, CreatedIntent, CreateIntentData, UpdateIntentData, IntentRecord, SimilarIntent, SimilarIntentSearchOptions, IndexedIntentDetails, IndexMemberDetails, NetworkAssignmentContext, NetworkMembership, OwnedIndex, CreateHydeDocumentData, HydeDocument, HydeSourceType, CreateOpportunityData, PremiseAnalysis, PremiseAssertion, PremiseProvenance, PremiseRecord, PremiseValidity, OnboardingPrivacyState, OnboardingProfileSeed, OnboardingState, PrivacyConsentDecision, PrivacyConsentSource, UpdateIndexSettingsData, UserRecord, UserSocial, ArchiveResult, Id, } from "./shared/interfaces/database.interface.js";
23
+ export type { Embedder, EmbeddingGenerator, EmbeddingGenerateOptions, VectorStore, VectorStoreOption, VectorSearchResult, HydeCandidate, HydeSearchOptions, LensEmbedding, } from "./shared/interfaces/embedder.interface.js";
24
+ export type { ProfileEnricher, EnrichmentRequest, EnrichmentResult } from "./shared/interfaces/enrichment.interface.js";
25
+ export type { IntegrationAdapter, IntegrationConnection, IntegrationSession, IntegrationSessionOptions, ToolActionResponse } from "./shared/interfaces/integration.interface.js";
26
+ export type { IntentGraphQueue } from "./shared/interfaces/queue.interface.js";
27
+ export type { Scraper, ExtractUrlContentOptions } from "./shared/interfaces/scraper.interface.js";
28
+ export type { Storage } from "./shared/interfaces/storage.interface.js";
29
+ export type { DeliveryLedger, DeliveredOpportunityRow } from "./shared/interfaces/delivery-ledger.interface.js";
30
+ export type { MintConnectLink, ConnectLinkKind } from "./shared/interfaces/connect-link.interface.js";
31
+ export type { DiscoveryRunStore, DiscoveryRunQueue, DiscoveryRunInput, CreateDiscoveryRunInput, DiscoveryRunRecord, DiscoveryRunStatus, } from "./shared/interfaces/discovery-run.interface.js";
32
+ export type { EnrichmentRunStore, EnrichmentRunQueue, EnrichmentRunInput, CreateEnrichmentRunInput, UpdateUserEnrichmentRunInput, PreviewUserEnrichmentRunInput, EnrichmentRunRecord, EnrichmentRunStatus, EnrichmentRunOperation, } from "./shared/interfaces/enrichment-run.interface.js";
33
+ export type { NegotiationTimeoutQueue } from "./shared/interfaces/negotiation-events.interface.js";
34
34
  export type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload } from "./shared/interfaces/agent-dispatcher.interface.js";
35
35
  export type { AgentRecord, AgentTransportRecord, AgentPermissionRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput, AgentDatabase } from './shared/interfaces/agent.interface.js';
36
36
  export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.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,CAAC;AAC9D,YAAY,EAAE,SAAS,EAAE,MAAM,gCAAgC,CAAC;AAChE,YAAY,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjF,YAAY,EAAE,WAAW,EAAE,mBAAmB,EAAE,QAAQ,EAAE,YAAY,EAAE,iBAAiB,EAAE,aAAa,EAAE,MAAM,gCAAgC,CAAC;AACjJ,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,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,wBAAwB,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AAC"}
package/dist/index.js CHANGED
@@ -1,3 +1,17 @@
1
+ // =============================================================================
2
+ // @indexnetwork/protocol — public API barrel
3
+ //
4
+ // This file is the ONLY supported entry point. Deep imports
5
+ // ("@indexnetwork/protocol/src/...") are not part of the contract and may break
6
+ // in any release. Every symbol is re-exported explicitly (no wildcards) so the
7
+ // surface is reviewable and changes are intentional.
8
+ //
9
+ // Stability tiers are defined in STABILITY.md. In short:
10
+ // • Stable — Interfaces, Graph factories, Agents, createChatTools,
11
+ // the tool/runtime helpers, and shared schemas.
12
+ // • Experimental — Sections marked @experimental below (advanced graph state
13
+ // types and internal helpers); may change in a minor release.
14
+ // =============================================================================
1
15
  // ─── Public API (recommended for external consumers) ──────────────────────────
2
16
  export { createChatTools } from "./shared/agent/tool.factory.js";
3
17
  export { getModelName } from "./shared/agent/model.config.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;AAI9D,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,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,wBAAwB,EAAE,MAAM,gCAAgC,CAAC;AAcrI,OAAO,EAAE,qBAAqB,EAAE,mBAAmB,EAAE,MAAM,yCAAyC,CAAC;AAgBrG,OAAO,EAAE,gBAAgB,EAAE,MAAM,wCAAwC,CAAC;AAE1E,iFAAiF;AAEjF,OAAO,EAAE,uBAAuB,EAA0B,MAAM,yCAAyC,CAAC;AAC1G,OAAO,EAAE,oBAAoB,EAAE,cAA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// ─── 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 { ToolContext, ResolvedToolContext, ToolDeps, ProtocolDeps, RawToolDefinition, CompiledGraph } 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 { ToolRuntimeError, getToolTimeoutPolicy, invokeToolRuntime, toolRuntimeErrorToResult } 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 { QuestionerDatabase, PersistableQuestion, PersistedQuestion, QuestionFilters } 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/enrichment-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 { AgentRecord, AgentTransportRecord, AgentPermissionRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput, AgentDatabase } from './shared/interfaces/agent.interface.js';\nexport { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';\n\n// ─── Shared schemas ───────────────────────────────────────────────────────────\n\nexport { ChatContextDigestSchema, type ChatContextDigest } from \"./shared/schemas/chat-context.schema.js\";\nexport { 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\";\nexport type { PendingQuestionSummary } from \"./shared/schemas/pending-question.schema.js\";\nexport type { McpAuthInput } from \"./shared/schemas/mcp-auth.schema.js\";\nexport { UserIdentitySchema, type UserIdentity } from \"./shared/schemas/identity.schema.js\";\nexport type { DiscoverySourceProfile, DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome, DiscoveryQuestionInput, NegotiationRole } from \"./shared/schemas/discovery-question.schema.js\";\nexport { NetworkAssignmentResourceTypeSchema, NetworkAssignmentModeSchema, NetworkAssignmentScopeSchema, NetworkAssignmentPromptPresenceSchema, NetworkAssignmentPolicySchema, NetworkAssignmentRawScoresSchema, NetworkAssignmentMetadataSchema, OpportunityEvidenceKindSchema, OpportunityEvidenceSchema } from \"./shared/schemas/network-assignment.schema.js\";\nexport type { NetworkAssignmentResourceType, NetworkAssignmentMode, NetworkAssignmentScope, NetworkAssignmentPromptPresence, NetworkAssignmentPolicy, NetworkAssignmentRawScores, NetworkAssignmentMetadata, OpportunityEvidenceKind, OpportunityEvidence } from \"./shared/schemas/network-assignment.schema.js\";\nexport { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, classifyPromptPresence, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision, combineAssignmentScores } from \"./shared/assignment/network-assignment.policy.js\";\nexport type { PromptPresenceInput, ResolveAssignmentNetworkScopeArgs, BuildNetworkAssignmentDecisionArgs, NetworkAssignmentDecision } from \"./shared/assignment/network-assignment.policy.js\";\nexport { buildCandidateEvidence, withCandidateEvidence, mergeOpportunityEvidence, withMatchedStrategies, renderOpportunityEvidenceForPrompt } 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 { MaintenanceGraphDatabase, MaintenanceGraphCache, MaintenanceGraphQueue } from \"./maintenance/maintenance.graph.js\";\nexport { NegotiationGraphFactory, createDefaultNegotiationGraph, negotiateCandidates } from \"./negotiation/negotiation.graph.js\";\nexport { OpportunityGraphFactory } from \"./opportunity/opportunity.graph.js\";\nexport { EnrichmentGraphFactory } from \"./enrichment/enrichment.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, GlobalContextInput, GlobalIncrementalContextInput } from \"./context/context.generator.js\";\nexport { ChatTitleGenerator } from \"./chat/chat.title.generator.js\";\nexport { ChatInterruptClassifier } from \"./chat/chat.interrupt.classifier.js\";\nexport type { ClassifyInterruptInput } from \"./chat/chat.interrupt.classifier.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 { QuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn, DiscoveryContext, IntentContext, ProfileContext, NegotiationContext } 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 { EvaluatorInput, OpportunityEvaluatorOptionsConstructor } from \"./opportunity/opportunity.evaluator.js\";\nexport { OpportunityPresenter, gatherPresenterContext } from \"./opportunity/opportunity.presenter.js\";\nexport { createOpportunityTools } from \"./opportunity/opportunity.tools.js\";\nexport { createEnrichmentTools } from \"./enrichment/enrichment.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 { canUserSeeOpportunity, isActionableForViewer, validateOpportunityActors, classifyOpportunity, selectByComposition, selectDigestCandidates, DIGEST_REDELIVERY_COOLDOWN_DAYS, FEED_SOFT_TARGETS } from \"./opportunity/opportunity.utils.js\";\nexport type { DigestDeliveredRow } 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 { selectContactsForDiscovery, shouldRunIntroducerDiscovery, runIntroducerDiscovery, MAX_CONTACTS_PER_CYCLE, MAX_CANDIDATES_PER_CONTACT, INTRODUCER_DISCOVERY_SOURCE } from \"./opportunity/opportunity.introducer.js\";\nexport type { IntroducerDiscoveryDatabase, IntroducerDiscoveryQueue, ContactWithIntents } 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 { getOrCreateDeliveryCardBatch, DELIVERY_CARD_CACHE_TTL, type CachedDeliveryCard, type OpportunityWithContext } 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 { UserNegotiationContext, NegotiationTurn, NegotiationOutcome, SeedAssessment } 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,gFAAgF;AAChF,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,MAAM,sCAAsC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,2CAA2C,CAAC;AAE/E,OAAO,EAAE,UAAU,EAAE,uBAAuB,EAAE,MAAM,2CAA2C,CAAC;AAChG,OAAO,EAAE,4BAA4B,EAAE,uBAAuB,EAAwD,MAAM,sCAAsC,CAAC;AAEnK,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;AASvE,iFAAiF;AAEjF,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC","sourcesContent":["// =============================================================================\n// @indexnetwork/protocol — public API barrel\n//\n// This file is the ONLY supported entry point. Deep imports\n// (\"@indexnetwork/protocol/src/...\") are not part of the contract and may break\n// in any release. Every symbol is re-exported explicitly (no wildcards) so the\n// surface is reviewable and changes are intentional.\n//\n// Stability tiers are defined in STABILITY.md. In short:\n// • Stable — Interfaces, Graph factories, Agents, createChatTools,\n// the tool/runtime helpers, and shared schemas.\n// • Experimental — Sections marked @experimental below (advanced graph state\n// types and internal helpers); may change in a minor release.\n// =============================================================================\n\n// ─── 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 { ToolContext, ResolvedToolContext, ToolDeps, ProtocolDeps, RawToolDefinition, CompiledGraph } 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 { ToolRuntimeError, getToolTimeoutPolicy, invokeToolRuntime, toolRuntimeErrorToResult } 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 { McpAuthResolver } from \"./shared/interfaces/auth.interface.js\";\nexport type { Cache, CacheOptions, HydeCache, OpportunityCache } from \"./shared/interfaces/cache.interface.js\";\nexport type { ChatSessionReader, ChatSessionDetail, ChatSessionSummary } 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 { QuestionerDatabase, PersistableQuestion, PersistedQuestion, QuestionFilters } 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 { ContactServiceAdapter, ContactEntry, ContactImportResult, ContactInput, ContactResult, ContactSearchResult } from \"./shared/interfaces/contact.interface.js\";\nexport type {\n ChatGraphCompositeDatabase, UserDatabase, SystemDatabase, Database,\n OpportunityGraphDatabase, OpportunityControllerDatabase, HomeGraphDatabase,\n IntentGraphDatabase, IntentNetworkGraphDatabase, NetworkGraphDatabase, NetworkMembershipGraphDatabase,\n HydeGraphDatabase, EnrichmentGraphDatabase, PremiseGraphDatabase, NegotiationGraphDatabase,\n NegotiationQueries, NegotiationUserAnswer,\n Opportunity, OpportunityActor, OpportunityContext, OpportunityDetection, OpportunityInterpretation,\n OpportunityQueryOptions, OpportunitySignal, OpportunityStatus,\n ActiveIntent, CreatedIntent, CreateIntentData, UpdateIntentData, IntentRecord, SimilarIntent, SimilarIntentSearchOptions,\n IndexedIntentDetails, IndexMemberDetails, NetworkAssignmentContext, NetworkMembership, OwnedIndex,\n CreateHydeDocumentData, HydeDocument, HydeSourceType, CreateOpportunityData,\n PremiseAnalysis, PremiseAssertion, PremiseProvenance, PremiseRecord, PremiseValidity,\n OnboardingPrivacyState, OnboardingProfileSeed, OnboardingState, PrivacyConsentDecision, PrivacyConsentSource,\n UpdateIndexSettingsData, UserRecord, UserSocial, ArchiveResult, Id,\n} from \"./shared/interfaces/database.interface.js\";\nexport type {\n Embedder, EmbeddingGenerator, EmbeddingGenerateOptions,\n VectorStore, VectorStoreOption, VectorSearchResult,\n HydeCandidate, HydeSearchOptions, LensEmbedding,\n} from \"./shared/interfaces/embedder.interface.js\";\nexport type { ProfileEnricher, EnrichmentRequest, EnrichmentResult } from \"./shared/interfaces/enrichment.interface.js\";\nexport type { IntegrationAdapter, IntegrationConnection, IntegrationSession, IntegrationSessionOptions, ToolActionResponse } from \"./shared/interfaces/integration.interface.js\";\nexport type { IntentGraphQueue } from \"./shared/interfaces/queue.interface.js\";\nexport type { Scraper, ExtractUrlContentOptions } from \"./shared/interfaces/scraper.interface.js\";\nexport type { Storage } from \"./shared/interfaces/storage.interface.js\";\nexport type { DeliveryLedger, DeliveredOpportunityRow } from \"./shared/interfaces/delivery-ledger.interface.js\";\nexport type { MintConnectLink, ConnectLinkKind } from \"./shared/interfaces/connect-link.interface.js\";\nexport type {\n DiscoveryRunStore, DiscoveryRunQueue, DiscoveryRunInput, CreateDiscoveryRunInput,\n DiscoveryRunRecord, DiscoveryRunStatus,\n} from \"./shared/interfaces/discovery-run.interface.js\";\nexport type {\n EnrichmentRunStore, EnrichmentRunQueue, EnrichmentRunInput, CreateEnrichmentRunInput,\n UpdateUserEnrichmentRunInput, PreviewUserEnrichmentRunInput,\n EnrichmentRunRecord, EnrichmentRunStatus, EnrichmentRunOperation,\n} from \"./shared/interfaces/enrichment-run.interface.js\";\nexport type { NegotiationTimeoutQueue } from \"./shared/interfaces/negotiation-events.interface.js\";\nexport type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload } from \"./shared/interfaces/agent-dispatcher.interface.js\";\nexport type { AgentRecord, AgentTransportRecord, AgentPermissionRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput, AgentDatabase } from './shared/interfaces/agent.interface.js';\nexport { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';\n\n// ─── Shared schemas ───────────────────────────────────────────────────────────\n\nexport { ChatContextDigestSchema, type ChatContextDigest } from \"./shared/schemas/chat-context.schema.js\";\nexport { 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\";\nexport type { PendingQuestionSummary } from \"./shared/schemas/pending-question.schema.js\";\nexport type { McpAuthInput } from \"./shared/schemas/mcp-auth.schema.js\";\nexport { UserIdentitySchema, type UserIdentity } from \"./shared/schemas/identity.schema.js\";\nexport type { DiscoverySourceProfile, DiscoverySummary, DiscoveryNegotiation, DiscoveryTurn, DiscoveryOutcome, DiscoveryQuestionInput, NegotiationRole } from \"./shared/schemas/discovery-question.schema.js\";\nexport { NetworkAssignmentResourceTypeSchema, NetworkAssignmentModeSchema, NetworkAssignmentScopeSchema, NetworkAssignmentPromptPresenceSchema, NetworkAssignmentPolicySchema, NetworkAssignmentRawScoresSchema, NetworkAssignmentMetadataSchema, OpportunityEvidenceKindSchema, OpportunityEvidenceSchema } from \"./shared/schemas/network-assignment.schema.js\";\nexport type { NetworkAssignmentResourceType, NetworkAssignmentMode, NetworkAssignmentScope, NetworkAssignmentPromptPresence, NetworkAssignmentPolicy, NetworkAssignmentRawScores, NetworkAssignmentMetadata, OpportunityEvidenceKind, OpportunityEvidence } from \"./shared/schemas/network-assignment.schema.js\";\nexport { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, classifyPromptPresence, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision, combineAssignmentScores } from \"./shared/assignment/network-assignment.policy.js\";\nexport type { PromptPresenceInput, ResolveAssignmentNetworkScopeArgs, BuildNetworkAssignmentDecisionArgs, NetworkAssignmentDecision } from \"./shared/assignment/network-assignment.policy.js\";\nexport { buildCandidateEvidence, withCandidateEvidence, mergeOpportunityEvidence, withMatchedStrategies, renderOpportunityEvidenceForPrompt } 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 { MaintenanceGraphDatabase, MaintenanceGraphCache, MaintenanceGraphQueue } from \"./maintenance/maintenance.graph.js\";\nexport { NegotiationGraphFactory, createDefaultNegotiationGraph, negotiateCandidates } from \"./negotiation/negotiation.graph.js\";\nexport { OpportunityGraphFactory } from \"./opportunity/opportunity.graph.js\";\nexport { EnrichmentGraphFactory } from \"./enrichment/enrichment.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, GlobalContextInput, GlobalIncrementalContextInput } from \"./context/context.generator.js\";\nexport { ChatTitleGenerator } from \"./chat/chat.title.generator.js\";\nexport { ChatInterruptClassifier } from \"./chat/chat.interrupt.classifier.js\";\nexport type { ClassifyInterruptInput } from \"./chat/chat.interrupt.classifier.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 { QuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn, DiscoveryContext, IntentContext, ProfileContext, NegotiationContext } 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 { EvaluatorInput, OpportunityEvaluatorOptionsConstructor } from \"./opportunity/opportunity.evaluator.js\";\nexport { OpportunityPresenter, gatherPresenterContext } from \"./opportunity/opportunity.presenter.js\";\nexport { createOpportunityTools } from \"./opportunity/opportunity.tools.js\";\nexport { createEnrichmentTools } from \"./enrichment/enrichment.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 { canUserSeeOpportunity, isActionableForViewer, validateOpportunityActors, classifyOpportunity, selectByComposition, selectDigestCandidates, DIGEST_REDELIVERY_COOLDOWN_DAYS, FEED_SOFT_TARGETS } from \"./opportunity/opportunity.utils.js\";\nexport type { DigestDeliveredRow } 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 { selectContactsForDiscovery, shouldRunIntroducerDiscovery, runIntroducerDiscovery, MAX_CONTACTS_PER_CYCLE, MAX_CANDIDATES_PER_CONTACT, INTRODUCER_DISCOVERY_SOURCE } from \"./opportunity/opportunity.introducer.js\";\nexport type { IntroducerDiscoveryDatabase, IntroducerDiscoveryQueue, ContactWithIntents } 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 { getOrCreateDeliveryCardBatch, DELIVERY_CARD_CACHE_TTL, type CachedDeliveryCard, type OpportunityWithContext } 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// @experimental — internal graph-state shapes; may change in a minor release.\n\nexport type { UserNegotiationContext, NegotiationTurn, NegotiationOutcome, SeedAssessment } 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,3 +1,4 @@
1
+ /** One conversation, summarized (no message bodies). */
1
2
  export interface ChatSessionSummary {
2
3
  sessionId: string;
3
4
  title: string | null;
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/chat-session.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACrD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC5E,UAAU,CACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtC"}
1
+ {"version":3,"file":"chat-session.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/chat-session.interface.ts"],"names":[],"mappings":"AAaA,wDAAwD;AACxD,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,aAAa,EAAE,IAAI,GAAG,IAAI,CAAC;IAC3B,SAAS,EAAE,IAAI,CAAC;CACjB;AAED,MAAM,WAAW,iBAAkB,SAAQ,kBAAkB;IAC3D,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,IAAI,CAAA;KAAE,CAAC,CAAC;CACrE;AAED,MAAM,WAAW,iBAAiB;IAChC,kBAAkB,CAChB,SAAS,EAAE,MAAM,EACjB,KAAK,CAAC,EAAE,MAAM,GACb,OAAO,CAAC,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,OAAO,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC,CAAC;IACrD,YAAY,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;IAC5E,UAAU,CACR,MAAM,EAAE,MAAM,EACd,SAAS,EAAE,MAAM,EACjB,YAAY,CAAC,EAAE,MAAM,GACpB,OAAO,CAAC,iBAAiB,GAAG,IAAI,CAAC,CAAC;CACtC"}
@@ -1,2 +1,14 @@
1
+ // ═══════════════════════════════════════════════════════════════════════════════
2
+ // Chat session reads
3
+ //
4
+ // Port contract (host application implements):
5
+ // • Reads only — no method here mutates state.
6
+ // • `getSession` returns `null` when the session does not exist OR is not owned
7
+ // by `userId` (ownership is enforced at this boundary, not by the caller).
8
+ // • `getSessionMessages` / `listSessions` return an empty array (never null) when
9
+ // there is nothing to return.
10
+ // • `limit` / `messageLimit`, when provided, cap the most-recent N rows; when
11
+ // omitted the adapter applies its own sane default.
12
+ // ═══════════════════════════════════════════════════════════════════════════════
1
13
  export {};
2
14
  //# sourceMappingURL=chat-session.interface.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chat-session.interface.js","sourceRoot":"/","sources":["shared/interfaces/chat-session.interface.ts"],"names":[],"mappings":"","sourcesContent":["export interface ChatSessionSummary {\n sessionId: string;\n title: string | null;\n messageCount: number;\n lastMessageAt: Date | null;\n createdAt: Date;\n}\n\nexport interface ChatSessionDetail extends ChatSessionSummary {\n messages: Array<{ role: string; content: string; createdAt: Date }>;\n}\n\nexport interface ChatSessionReader {\n getSessionMessages(\n sessionId: string,\n limit?: number,\n ): Promise<Array<{ role: string; content: string }>>;\n listSessions(userId: string, limit?: number): Promise<ChatSessionSummary[]>;\n getSession(\n userId: string,\n sessionId: string,\n messageLimit?: number,\n ): Promise<ChatSessionDetail | null>;\n}\n"]}
1
+ {"version":3,"file":"chat-session.interface.js","sourceRoot":"/","sources":["shared/interfaces/chat-session.interface.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,qBAAqB;AACrB,EAAE;AACF,+CAA+C;AAC/C,iDAAiD;AACjD,kFAAkF;AAClF,+EAA+E;AAC/E,oFAAoF;AACpF,kCAAkC;AAClC,gFAAgF;AAChF,wDAAwD;AACxD,kFAAkF","sourcesContent":["// ═══════════════════════════════════════════════════════════════════════════════\n// Chat session reads\n//\n// Port contract (host application implements):\n// • Reads only — no method here mutates state.\n// • `getSession` returns `null` when the session does not exist OR is not owned\n// by `userId` (ownership is enforced at this boundary, not by the caller).\n// • `getSessionMessages` / `listSessions` return an empty array (never null) when\n// there is nothing to return.\n// • `limit` / `messageLimit`, when provided, cap the most-recent N rows; when\n// omitted the adapter applies its own sane default.\n// ═══════════════════════════════════════════════════════════════════════════════\n\n/** One conversation, summarized (no message bodies). */\nexport interface ChatSessionSummary {\n sessionId: string;\n title: string | null;\n messageCount: number;\n lastMessageAt: Date | null;\n createdAt: Date;\n}\n\nexport interface ChatSessionDetail extends ChatSessionSummary {\n messages: Array<{ role: string; content: string; createdAt: Date }>;\n}\n\nexport interface ChatSessionReader {\n getSessionMessages(\n sessionId: string,\n limit?: number,\n ): Promise<Array<{ role: string; content: string }>>;\n listSessions(userId: string, limit?: number): Promise<ChatSessionSummary[]>;\n getSession(\n userId: string,\n sessionId: string,\n messageLimit?: number,\n ): Promise<ChatSessionDetail | null>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"discovery-run.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/discovery-run.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAE7F,MAAM,WAAW,iBAAiB;IAChC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC;QACf,MAAM,EAAE,MAAM,CAAC;QACf,OAAO,CAAC,EAAE;YACR,IAAI,CAAC,EAAE,MAAM,CAAC;YACd,GAAG,CAAC,EAAE,MAAM,CAAC;YACb,QAAQ,CAAC,EAAE,MAAM,CAAC;YAClB,SAAS,CAAC,EAAE,MAAM,EAAE,CAAC;YACrB,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;YAClB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC;QACF,OAAO,CAAC,EAAE,KAAK,CAAC;YACd,QAAQ,EAAE,MAAM,CAAC;YACjB,OAAO,EAAE,MAAM,CAAC;YAChB,OAAO,CAAC,EAAE,MAAM,CAAC;SAClB,CAAC,CAAC;QACH,SAAS,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,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a,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;IACjF,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,kBAAkB,EAAE,CAAC,CAAC;CAC3E;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACpE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"discovery-run.interface.js","sourceRoot":"/","sources":["shared/interfaces/discovery-run.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { ResolvedToolContext } from \"../agent/tool.helpers.js\";\n\nexport type DiscoveryRunStatus = \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"cancelled\";\n\nexport interface DiscoveryRunInput {\n continueFrom?: string;\n searchQuery?: string;\n networkId?: string;\n intentId?: string;\n targetUserId?: string;\n introTargetUserId?: string;\n partyUserIds?: string[];\n entities?: Array<{\n userId: string;\n profile?: {\n name?: string;\n bio?: string;\n location?: string;\n interests?: string[];\n skills?: string[];\n context?: string;\n };\n intents?: Array<{\n intentId: string;\n payload: string;\n summary?: string;\n }>;\n networkId: string;\n }>;\n hint?: string;\n}\n\nexport interface DiscoveryRunRecord {\n id: string;\n userId: string;\n agentId?: string | null;\n status: DiscoveryRunStatus;\n input: DiscoveryRunInput;\n context: Pick<ResolvedToolContext,\n \"userId\" |\n \"userName\" |\n \"userEmail\" |\n \"networkId\" |\n \"indexName\" |\n \"indexScope\" |\n \"sessionId\" |\n \"agentId\" |\n \"clientSurface\"\n >;\n progress?: Record<string, unknown> | null;\n result?: unknown;\n error?: string | null;\n cancelRequestedAt?: Date | null;\n createdAt: Date;\n startedAt?: Date | null;\n completedAt?: Date | null;\n expiresAt?: Date | null;\n}\n\nexport interface CreateDiscoveryRunInput {\n userId: string;\n agentId?: string | null;\n input: DiscoveryRunInput;\n context: DiscoveryRunRecord[\"context\"];\n expiresAt?: Date;\n}\n\nexport interface DiscoveryRunStore {\n create(input: CreateDiscoveryRunInput): Promise<DiscoveryRunRecord>;\n get(runId: string, userId: string): Promise<DiscoveryRunRecord | null>;\n markRunning(runId: string): Promise<DiscoveryRunRecord | null>;\n updateProgress(runId: string, progress: Record<string, unknown>): Promise<void>;\n markSucceeded(runId: string, result: unknown): Promise<void>;\n markFailed(runId: string, error: string): Promise<void>;\n requestCancel(runId: string, userId: string): Promise<DiscoveryRunRecord | null>;\n markCancelled(runId: string, reason?: string): Promise<void>;\n isCancelRequested(runId: string): Promise<boolean>;\n listActive(userId: string, limit?: number): Promise<DiscoveryRunRecord[]>;\n}\n\nexport interface DiscoveryRunQueue {\n enqueue(runId: string): Promise<{ jobId?: string | number } | void>;\n cancel(runId: string): Promise<boolean>;\n}\n"]}
1
+ {"version":3,"file":"discovery-run.interface.js","sourceRoot":"/","sources":["shared/interfaces/discovery-run.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { ResolvedToolContext } from \"../agent/tool.helpers.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Discovery run persistence + queue\n//\n// Models an async `discover_opportunities` job as a durable, owner-scoped record.\n//\n// Port contract (host application implements `DiscoveryRunStore` + `DiscoveryRunQueue`):\n// • Status is a one-way lifecycle: queued → running → (succeeded | failed | cancelled).\n// The `mark*` transitions must be idempotent — re-applying a terminal state is a no-op.\n// • Every read is owner-scoped: `get` and `requestCancel` take `userId` and MUST\n// return `null` when the run is missing or owned by another user (no cross-user reads).\n// • `isCancelRequested` is polled cooperatively by the running graph; the store sets\n// the flag via `requestCancel`, the worker observes it and calls `markCancelled`.\n// • `listActive` returns queued/running runs only (used to coalesce duplicate\n// discovery requests) — empty array, never null.\n// • `DiscoveryRunQueue.cancel` returns `true` if a pending job was removed, `false`\n// if nothing was queued (already running/finished).\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport type DiscoveryRunStatus = \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"cancelled\";\n\nexport interface DiscoveryRunInput {\n continueFrom?: string;\n searchQuery?: string;\n networkId?: string;\n intentId?: string;\n targetUserId?: string;\n introTargetUserId?: string;\n partyUserIds?: string[];\n entities?: Array<{\n userId: string;\n profile?: {\n name?: string;\n bio?: string;\n location?: string;\n interests?: string[];\n skills?: string[];\n context?: string;\n };\n intents?: Array<{\n intentId: string;\n payload: string;\n summary?: string;\n }>;\n networkId: string;\n }>;\n hint?: string;\n}\n\nexport interface DiscoveryRunRecord {\n id: string;\n userId: string;\n agentId?: string | null;\n status: DiscoveryRunStatus;\n input: DiscoveryRunInput;\n context: Pick<ResolvedToolContext,\n \"userId\" |\n \"userName\" |\n \"userEmail\" |\n \"networkId\" |\n \"indexName\" |\n \"indexScope\" |\n \"sessionId\" |\n \"agentId\" |\n \"clientSurface\"\n >;\n progress?: Record<string, unknown> | null;\n result?: unknown;\n error?: string | null;\n cancelRequestedAt?: Date | null;\n createdAt: Date;\n startedAt?: Date | null;\n completedAt?: Date | null;\n expiresAt?: Date | null;\n}\n\nexport interface CreateDiscoveryRunInput {\n userId: string;\n agentId?: string | null;\n input: DiscoveryRunInput;\n context: DiscoveryRunRecord[\"context\"];\n expiresAt?: Date;\n}\n\nexport interface DiscoveryRunStore {\n create(input: CreateDiscoveryRunInput): Promise<DiscoveryRunRecord>;\n get(runId: string, userId: string): Promise<DiscoveryRunRecord | null>;\n markRunning(runId: string): Promise<DiscoveryRunRecord | null>;\n updateProgress(runId: string, progress: Record<string, unknown>): Promise<void>;\n markSucceeded(runId: string, result: unknown): Promise<void>;\n markFailed(runId: string, error: string): Promise<void>;\n requestCancel(runId: string, userId: string): Promise<DiscoveryRunRecord | null>;\n markCancelled(runId: string, reason?: string): Promise<void>;\n isCancelRequested(runId: string): Promise<boolean>;\n listActive(userId: string, limit?: number): Promise<DiscoveryRunRecord[]>;\n}\n\nexport interface DiscoveryRunQueue {\n enqueue(runId: string): Promise<{ jobId?: string | number } | void>;\n cancel(runId: string): Promise<boolean>;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"embedder.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/embedder.interface.ts"],"names":[],"mappings":"AAIA,YAAY,EAAE,IAAI,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAEvE,gDAAgD;AAChD,MAAM,WAAW,aAAa;IAC5B,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,8BAA8B;IAC9B,MAAM,EAAE,UAAU,GAAG,SAAS,GAAG,UAAU,CAAC;IAC5C,iCAAiC;IACjC,SAAS,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,6EAA6E;AAC7E,MAAM,WAAW,iBAAiB;IAChC,uEAAuE;IACvE,UAAU,EAAE,MAAM,EAAE,CAAC;IACrB,oEAAoE;IACpE,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,sDAAsD;IACtD,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iDAAiD;IACjD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,oEAAoE;IACpE,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB;AAED,kGAAkG;AAClG,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,QAAQ,GAAG,SAAS,CAAC;IAC3B,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;IACd,qDAAqD;IACrD,UAAU,EA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,MAAM,EAAE,GAAG,MAAM,EAAE,EAAE,CAAC,CAAC;CAC5H;AAED,MAAM,WAAW,kBAAkB,CAAC,CAAC;IACnC,IAAI,EAAE,CAAC,CAAC;IACR,KAAK,EAAE,MAAM,CAAC;CACf;AAED,MAAM,MAAM,iBAAiB,CAAC,CAAC,IAAI;IACjC,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAE7B,UAAU,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,SAAS,CAAC,EAAE,MAAM,EAAE,GAAG,IAAI,CAAA;KAAE,CAAC,EAAE,CAAC;IAErD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF,MAAM,WAAW,WAAW;IAC1B;;;;;;OAMG;IACH,MAAM,CAAC,CAAC,EACN,WAAW,EAAE,MAAM,EAAE,EACrB,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAC7B,OAAO,CAAC,kBAAkB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC;CACrC;AAED;;;GAGG;AACH,MAAM,WAAW,QAAS,SAAQ,kBAAkB,EAAE,WAAW;IAC/D;;;;;;;OAOG;IACH,wBAAwB,CACtB,cAAc,EAAE,aAAa,EAAE,EAC/B,OAAO,EAAE,iBAAiB,GACzB,OAAO,CAAC,aAAa,EAAE,CAAC,CAAC;CAE7B"}
@@ -1 +1 @@
1
- {"version":3,"file":"embedder.interface.js","sourceRoot":"/","sources":["shared/interfaces/embedder.interface.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,uDAAuD;AACvD,kFAAkF","sourcesContent":["// ═══════════════════════════════════════════════════════════════════════════════\n// HyDE (Hypothetical Document Embeddings) search types\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport type { Lens, HydeTargetCorpus } from '../hyde/lens.inferrer.js';\n\n/** A single lens embedding ready for search. */\nexport interface LensEmbedding {\n /** Free-text lens label (e.g. \"crypto infrastructure VC\"). */\n lens: string;\n /** Which corpus to search. */\n corpus: 'profiles' | 'intents' | 'premises';\n /** 2000-dim embedding vector. */\n embedding: number[];\n}\n\n/** Options for searchWithHydeEmbeddings (index scope, limits, min score). */\nexport interface HydeSearchOptions {\n /** Index IDs to scope the search (members / assigned intents only). */\n indexScope: string[];\n /** Exclude this user ID from results (e.g. source intent owner). */\n excludeUserId?: string;\n /** Max results per lens before merge (default 10). */\n limitPerStrategy?: number;\n /** Max results after merge/rank (default 20). */\n limit?: number;\n /** Minimum cosine similarity for intent searches (default 0.40). */\n minScore?: number;\n}\n\n/** A single candidate from HyDE search (intent or premise), with score and which lens matched. */\nexport interface HydeCandidate {\n type: 'intent' | 'premise';\n id: string;\n userId: string;\n score: number;\n /** Free-text lens label that produced this match. */\n matchedVia: string;\n networkId: string;\n /** Set after merge when user matched via multiple lenses. */\n matchedLenses?: string[];\n}\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Embedding and vector store\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport interface EmbeddingGenerateOptions {\n signal?: AbortSignal;\n}\n\nexport interface EmbeddingGenerator {\n generate(text: string | string[], dimensions?: number, options?: EmbeddingGenerateOptions): Promise<number[] | number[][]>;\n}\n\nexport interface VectorSearchResult<T> {\n item: T;\n score: number; // similarity (0-1)\n}\n\nexport type VectorStoreOption<T> = {\n limit?: number;\n // Generic filter object passed to the store implementation\n filter?: Record<string, any>;\n // For stateless store: explicitly provide the candidates to search against\n candidates?: (T & { embedding?: number[] | null })[];\n // Minimum similarity score to include in results\n minScore?: number;\n};\n\nexport interface VectorStore {\n /**\n * Search for similar items in the vector store.\n *\n * @param queryVector - The embedding vector to search for\n * @param collection - The logical name of the collection (e.g., 'profiles', 'intents')\n * @param options - generic options including limit, filter, and candidates\n */\n search<T>(\n queryVector: number[],\n collection: string,\n options?: VectorStoreOption<T>\n ): Promise<VectorSearchResult<T>[]>;\n}\n\n/**\n * Embedder: generate embeddings and run vector / HyDE search.\n * Implementations: OpenAI/OpenRouter for generate, pgvector for search.\n */\nexport interface Embedder extends EmbeddingGenerator, VectorStore {\n /**\n * Multi-lens HyDE search: run one vector search per lens embedding,\n * then merge, deduplicate by userId, and rank (boost for multiple lens matches).\n *\n * @param lensEmbeddings - Array of lens embeddings to search with\n * @param options - indexScope, excludeUserId, limits, minScore\n * @returns Deduplicated, ranked candidates (intent or premise) with scores\n */\n searchWithHydeEmbeddings(\n lensEmbeddings: LensEmbedding[],\n options: HydeSearchOptions\n ): Promise<HydeCandidate[]>;\n\n}\n"]}
1
+ {"version":3,"file":"embedder.interface.js","sourceRoot":"/","sources":["shared/interfaces/embedder.interface.ts"],"names":[],"mappings":"AAAA,kFAAkF;AAClF,uDAAuD;AACvD,kFAAkF","sourcesContent":["// ═══════════════════════════════════════════════════════════════════════════════\n// HyDE (Hypothetical Document Embeddings) search types\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport type { Lens, HydeTargetCorpus } from '../hyde/lens.inferrer.js';\n\n/** A single lens embedding ready for search. */\nexport interface LensEmbedding {\n /** Free-text lens label (e.g. \"crypto infrastructure VC\"). */\n lens: string;\n /** Which corpus to search. */\n corpus: 'profiles' | 'intents' | 'premises';\n /** 2000-dim embedding vector. */\n embedding: number[];\n}\n\n/** Options for searchWithHydeEmbeddings (index scope, limits, min score). */\nexport interface HydeSearchOptions {\n /** Index IDs to scope the search (members / assigned intents only). */\n indexScope: string[];\n /** Exclude this user ID from results (e.g. source intent owner). */\n excludeUserId?: string;\n /** Max results per lens before merge (default 10). */\n limitPerStrategy?: number;\n /** Max results after merge/rank (default 20). */\n limit?: number;\n /** Minimum cosine similarity for intent searches (default 0.40). */\n minScore?: number;\n}\n\n/** A single candidate from HyDE search (intent or premise), with score and which lens matched. */\nexport interface HydeCandidate {\n type: 'intent' | 'premise';\n id: string;\n userId: string;\n score: number;\n /** Free-text lens label that produced this match. */\n matchedVia: string;\n networkId: string;\n /** Set after merge when user matched via multiple lenses. */\n matchedLenses?: string[];\n}\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Embedding and vector store\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport interface EmbeddingGenerateOptions {\n signal?: AbortSignal;\n}\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Embedding generation + vector / HyDE search\n//\n// Port contract (host application implements):\n// • `generate` is shape-preserving: a `string` input yields one `number[]`; a\n// `string[]` input yields `number[][]` in the same order. Vectors are\n// `dimensions`-long (default per the adapter; the schema assumes 2000).\n// • `search` returns matches sorted by descending `score` (cosine similarity in\n// [0,1]); it returns an empty array — never null — when nothing clears `minScore`.\n// • Implementations should be deterministic for a fixed input/model and must not\n// throw for an empty corpus (return []). Network/model failures may throw.\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport interface EmbeddingGenerator {\n generate(text: string | string[], dimensions?: number, options?: EmbeddingGenerateOptions): Promise<number[] | number[][]>;\n}\n\nexport interface VectorSearchResult<T> {\n item: T;\n score: number; // similarity (0-1)\n}\n\nexport type VectorStoreOption<T> = {\n limit?: number;\n // Generic filter object passed to the store implementation\n filter?: Record<string, any>;\n // For stateless store: explicitly provide the candidates to search against\n candidates?: (T & { embedding?: number[] | null })[];\n // Minimum similarity score to include in results\n minScore?: number;\n};\n\nexport interface VectorStore {\n /**\n * Search for similar items in the vector store.\n *\n * @param queryVector - The embedding vector to search for\n * @param collection - The logical name of the collection (e.g., 'profiles', 'intents')\n * @param options - generic options including limit, filter, and candidates\n */\n search<T>(\n queryVector: number[],\n collection: string,\n options?: VectorStoreOption<T>\n ): Promise<VectorSearchResult<T>[]>;\n}\n\n/**\n * Embedder: generate embeddings and run vector / HyDE search.\n * Implementations: OpenAI/OpenRouter for generate, pgvector for search.\n */\nexport interface Embedder extends EmbeddingGenerator, VectorStore {\n /**\n * Multi-lens HyDE search: run one vector search per lens embedding,\n * then merge, deduplicate by userId, and rank (boost for multiple lens matches).\n *\n * @param lensEmbeddings - Array of lens embeddings to search with\n * @param options - indexScope, excludeUserId, limits, minScore\n * @returns Deduplicated, ranked candidates (intent or premise) with scores\n */\n searchWithHydeEmbeddings(\n lensEmbeddings: LensEmbedding[],\n options: HydeSearchOptions\n ): Promise<HydeCandidate[]>;\n\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"enrichment-run.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/enrichment-run.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAC;AAEpE,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAI9F,MAAM,MAAM,sBAAsB,GAC9B,sBAAsB,GACtB,qBAAqB,GACrB,sBAAsB,GACtB,qBAAqB,CAAC;AAE1B,MAAM,WAAW,6BAA6B;IAC5C,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAC;CACrB;AAED,MAAM,WAAW,4BAA4B;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CAClC;AAED,MAAM,MAAM,kBAAkB,GAAG,6BAA6B,GAAG,4BAA4B,CAAC;AAE9F,MAAM,WAAW,mBAAmB;IAClC,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,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AE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,GAAG,IAAI,CAAC,CAAC;IAClF,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACnD,UAAU,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,EAAE,CAAC,CAAC;CAC5E;AAED,MAAM,WAAW,kBAAkB;IACjC,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;QAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAC;IACpE,MAAM,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CACzC"}
@@ -1 +1 @@
1
- {"version":3,"file":"enrichment-run.interface.js","sourceRoot":"/","sources":["shared/interfaces/enrichment-run.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { ResolvedToolContext } from \"../agent/tool.helpers.js\";\n\nexport type EnrichmentRunStatus = \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"cancelled\";\n// Canonical run operations are the *_user_context names (IND-371). The legacy\n// *_user_profile values are retained so historical run rows persisted before the\n// rename still type-check; nothing new writes them.\nexport type EnrichmentRunOperation =\n | \"preview_user_context\"\n | \"update_user_context\"\n | \"preview_user_profile\"\n | \"update_user_profile\";\n\nexport interface PreviewUserEnrichmentRunInput {\n name?: string;\n location?: string;\n bioOrDescription?: string;\n edgeosProfileText?: string;\n allowPublicLookup?: boolean;\n linkedinUrl?: string;\n githubUrl?: string;\n twitterUrl?: string;\n websites?: string[];\n}\n\nexport interface UpdateUserEnrichmentRunInput {\n profileId?: string;\n action?: string;\n details?: string;\n socials?: Record<string, string>;\n}\n\nexport type EnrichmentRunInput = PreviewUserEnrichmentRunInput | UpdateUserEnrichmentRunInput;\n\nexport interface EnrichmentRunRecord {\n id: string;\n userId: string;\n agentId?: string | null;\n operation: EnrichmentRunOperation;\n status: EnrichmentRunStatus;\n input: EnrichmentRunInput;\n context: Pick<ResolvedToolContext,\n \"userId\" |\n \"userName\" |\n \"userEmail\" |\n \"networkId\" |\n \"indexName\" |\n \"indexScope\" |\n \"sessionId\" |\n \"agentId\" |\n \"clientSurface\"\n >;\n progress?: Record<string, unknown> | null;\n result?: unknown;\n error?: string | null;\n cancelRequestedAt?: Date | null;\n createdAt: Date;\n startedAt?: Date | null;\n completedAt?: Date | null;\n expiresAt?: Date | null;\n}\n\nexport interface CreateEnrichmentRunInput {\n userId: string;\n agentId?: string | null;\n operation: EnrichmentRunOperation;\n input: EnrichmentRunInput;\n context: EnrichmentRunRecord[\"context\"];\n expiresAt?: Date;\n}\n\nexport interface EnrichmentRunStore {\n create(input: CreateEnrichmentRunInput): Promise<EnrichmentRunRecord>;\n get(runId: string, userId: string): Promise<EnrichmentRunRecord | null>;\n markRunning(runId: string): Promise<EnrichmentRunRecord | null>;\n updateProgress(runId: string, progress: Record<string, unknown>): Promise<void>;\n markSucceeded(runId: string, result: unknown): Promise<void>;\n markFailed(runId: string, error: string): Promise<void>;\n requestCancel(runId: string, userId: string): Promise<EnrichmentRunRecord | null>;\n markCancelled(runId: string, reason?: string): Promise<void>;\n isCancelRequested(runId: string): Promise<boolean>;\n listActive(userId: string, limit?: number): Promise<EnrichmentRunRecord[]>;\n}\n\nexport interface EnrichmentRunQueue {\n enqueue(runId: string): Promise<{ jobId?: string | number } | void>;\n cancel(runId: string): Promise<boolean>;\n}\n"]}
1
+ {"version":3,"file":"enrichment-run.interface.js","sourceRoot":"/","sources":["shared/interfaces/enrichment-run.interface.ts"],"names":[],"mappings":"","sourcesContent":["import type { ResolvedToolContext } from \"../agent/tool.helpers.js\";\n\n// ═══════════════════════════════════════════════════════════════════════════════\n// Enrichment run persistence + queue\n//\n// Mirrors the discovery-run contract for the enrichment pipeline (profile/context\n// preview + update). See discovery-run.interface.ts for the shared lifecycle rules.\n//\n// Port contract (host application implements `EnrichmentRunStore` + `EnrichmentRunQueue`):\n// • Status lifecycle queued → running → (succeeded | failed | cancelled); `mark*`\n// transitions are idempotent.\n// • `get` / `requestCancel` are owner-scoped and return `null` for missing or\n// non-owned runs.\n// • `listActive` returns queued/running runs (empty array, never null).\n// • Legacy `*_user_profile` operations are read-compat only — never written by new code.\n// ═══════════════════════════════════════════════════════════════════════════════\n\nexport type EnrichmentRunStatus = \"queued\" | \"running\" | \"succeeded\" | \"failed\" | \"cancelled\";\n// Canonical run operations are the *_user_context names (IND-371). The legacy\n// *_user_profile values are retained so historical run rows persisted before the\n// rename still type-check; nothing new writes them.\nexport type EnrichmentRunOperation =\n | \"preview_user_context\"\n | \"update_user_context\"\n | \"preview_user_profile\"\n | \"update_user_profile\";\n\nexport interface PreviewUserEnrichmentRunInput {\n name?: string;\n location?: string;\n bioOrDescription?: string;\n edgeosProfileText?: string;\n allowPublicLookup?: boolean;\n linkedinUrl?: string;\n githubUrl?: string;\n twitterUrl?: string;\n websites?: string[];\n}\n\nexport interface UpdateUserEnrichmentRunInput {\n profileId?: string;\n action?: string;\n details?: string;\n socials?: Record<string, string>;\n}\n\nexport type EnrichmentRunInput = PreviewUserEnrichmentRunInput | UpdateUserEnrichmentRunInput;\n\nexport interface EnrichmentRunRecord {\n id: string;\n userId: string;\n agentId?: string | null;\n operation: EnrichmentRunOperation;\n status: EnrichmentRunStatus;\n input: EnrichmentRunInput;\n context: Pick<ResolvedToolContext,\n \"userId\" |\n \"userName\" |\n \"userEmail\" |\n \"networkId\" |\n \"indexName\" |\n \"indexScope\" |\n \"sessionId\" |\n \"agentId\" |\n \"clientSurface\"\n >;\n progress?: Record<string, unknown> | null;\n result?: unknown;\n error?: string | null;\n cancelRequestedAt?: Date | null;\n createdAt: Date;\n startedAt?: Date | null;\n completedAt?: Date | null;\n expiresAt?: Date | null;\n}\n\nexport interface CreateEnrichmentRunInput {\n userId: string;\n agentId?: string | null;\n operation: EnrichmentRunOperation;\n input: EnrichmentRunInput;\n context: EnrichmentRunRecord[\"context\"];\n expiresAt?: Date;\n}\n\nexport interface EnrichmentRunStore {\n create(input: CreateEnrichmentRunInput): Promise<EnrichmentRunRecord>;\n get(runId: string, userId: string): Promise<EnrichmentRunRecord | null>;\n markRunning(runId: string): Promise<EnrichmentRunRecord | null>;\n updateProgress(runId: string, progress: Record<string, unknown>): Promise<void>;\n markSucceeded(runId: string, result: unknown): Promise<void>;\n markFailed(runId: string, error: string): Promise<void>;\n requestCancel(runId: string, userId: string): Promise<EnrichmentRunRecord | null>;\n markCancelled(runId: string, reason?: string): Promise<void>;\n isCancelRequested(runId: string): Promise<boolean>;\n listActive(userId: string, limit?: number): Promise<EnrichmentRunRecord[]>;\n}\n\nexport interface EnrichmentRunQueue {\n enqueue(runId: string): Promise<{ jobId?: string | number } | void>;\n cancel(runId: string): Promise<boolean>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "4.2.0-rc.295.1",
3
+ "version": "4.3.0-rc.297.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",