@indexnetwork/protocol 4.14.2-rc.356.1 → 4.15.0-rc.357.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +1 -0
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/opportunity/discriminator/discriminator.env.d.ts +15 -0
- package/dist/opportunity/discriminator/discriminator.env.d.ts.map +1 -1
- package/dist/opportunity/discriminator/discriminator.env.js +15 -0
- package/dist/opportunity/discriminator/discriminator.env.js.map +1 -1
- package/dist/opportunity/discriminator/discriminator.push.d.ts +16 -0
- package/dist/opportunity/discriminator/discriminator.push.d.ts.map +1 -0
- package/dist/opportunity/discriminator/discriminator.push.js +26 -0
- package/dist/opportunity/discriminator/discriminator.push.js.map +1 -0
- package/dist/shared/schemas/question.schema.d.ts +283 -2
- package/dist/shared/schemas/question.schema.d.ts.map +1 -1
- package/dist/shared/schemas/question.schema.js +87 -0
- package/dist/shared/schemas/question.schema.js.map +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -13,6 +13,7 @@ See [STABILITY.md](./STABILITY.md) for the public-contract and tier definitions.
|
|
|
13
13
|
## [Unreleased]
|
|
14
14
|
|
|
15
15
|
### Added
|
|
16
|
+
- Opt-in `POOL_QUESTIONS_PUSH` accessor, pool refresh cycle identity, dismissal-decayed push threshold helpers, deterministic Markdown-safe Personal Agent DM template, and typed private push-ledger metadata (IND-421 P5).
|
|
16
17
|
- Pre-insert newborn-opportunity stamping for fresh answered pool discriminators, with a fixed-axis evidence-verifying classifier, deterministic `questionId` provenance, and fail-open host callback (IND-420 P4b).
|
|
17
18
|
- Durable pool-discriminator semantic novelty metadata: current axis embeddings and embedding-model ids now survive deterministic question snapshot conversion, alongside full-intent freshness fingerprints (IND-420 P4a).
|
|
18
19
|
- Additive `IntentRecord.status` lifecycle contract (`ACTIVE | PAUSED | FULFILLED | EXPIRED | null`), with null legacy rows treated as active and paused intents excluded from candidate matching.
|
package/dist/index.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload } fro
|
|
|
39
39
|
export type { AgentRecord, AgentTransportRecord, AgentPermissionRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput, AgentDatabase } from './shared/interfaces/agent.interface.js';
|
|
40
40
|
export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';
|
|
41
41
|
export { ChatContextDigestSchema, type ChatContextDigest } from "./shared/schemas/chat-context.schema.js";
|
|
42
|
-
export { QuestionOptionSchema, QuestionSchema, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionActorSchema, QuestionAnswerSchema, type Question, type QuestionOption, type UnderspecificationType, type QuestionStrategy, type QuestionWithStrategy, type QuestionGeneratorResponse, type QuestionGenerationResult, type QuestionPurpose, type QuestionMode, type QuestionDetection, type QuestionActor, type QuestionAnswer } from "./shared/schemas/question.schema.js";
|
|
42
|
+
export { QuestionOptionSchema, QuestionSchema, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionPoolPushSchema, QuestionPoolPushRequestStatusSchema, QuestionPoolPushRequestReasonSchema, QuestionActorSchema, QuestionAnswerSchema, type Question, type QuestionOption, type UnderspecificationType, type QuestionStrategy, type QuestionWithStrategy, type QuestionGeneratorResponse, type QuestionGenerationResult, type QuestionPurpose, type QuestionMode, type QuestionDetection, type QuestionPoolPush, type QuestionPoolPushRequestStatus, type QuestionPoolPushRequestReason, type QuestionActor, type QuestionAnswer } from "./shared/schemas/question.schema.js";
|
|
43
43
|
export type { PendingQuestionSummary } from "./shared/schemas/pending-question.schema.js";
|
|
44
44
|
export type { McpAuthInput } from "./shared/schemas/mcp-auth.schema.js";
|
|
45
45
|
export { UserIdentitySchema, type UserIdentity } from "./shared/schemas/identity.schema.js";
|
|
@@ -117,12 +117,13 @@ export type { PoolDiscriminatorAssignerConfig, PoolDiscriminatorAssignmentAxis,
|
|
|
117
117
|
export { runPoolDiscriminatorShadow } from "./opportunity/discriminator/discriminator.shadow.js";
|
|
118
118
|
export type { DiscriminatorShadowInput } from "./opportunity/discriminator/discriminator.shadow.js";
|
|
119
119
|
export { scoreDiscriminator, computeNovelty, cosineSimilarity } from "./opportunity/discriminator/discriminator.scorer.js";
|
|
120
|
-
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT } from "./opportunity/discriminator/discriminator.env.js";
|
|
121
|
-
export type { PoolQuestionsMiningMode, PoolQuestionsMode, PoolQuestionsRankingMode, PoolQuestionsStampNewbornMode } from "./opportunity/discriminator/discriminator.env.js";
|
|
120
|
+
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT, POOL_QUESTION_PUSH_BASE_VOI, POOL_QUESTION_PUSH_DISMISSAL_DECAY, POOL_QUESTION_PUSH_MIN_POOL_SIZE, POOL_QUESTION_PUSH_DAILY_CAP } from "./opportunity/discriminator/discriminator.env.js";
|
|
121
|
+
export type { PoolQuestionsMiningMode, PoolQuestionsMode, PoolQuestionsPushMode, PoolQuestionsRankingMode, PoolQuestionsStampNewbornMode } from "./opportunity/discriminator/discriminator.env.js";
|
|
122
122
|
export { poolQuestionsRanking, POOL_ADJUSTMENT_FACTOR_OTHER, POOL_ADJUSTMENT_FACTOR_UNKNOWN, POOL_ADJUSTMENT_FLOOR, POOL_STALENESS_THRESHOLD, POOL_RERUN_DEBOUNCE_MS } from "./opportunity/discriminator/discriminator.env.js";
|
|
123
123
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, removePoolAdjustment, readPoolAdjustments, poolAdjustmentMultiplier, adjustedConfidence, latestPoolDemotionDetail } from "./opportunity/discriminator/discriminator.adjustments.js";
|
|
124
124
|
export type { BuildPoolAdjustmentInput, PoolAdjustment, PoolAdjustmentPlanEntry, PoolAdjustmentSignal } from "./opportunity/discriminator/discriminator.adjustments.js";
|
|
125
125
|
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from "./opportunity/discriminator/discriminator.question.js";
|
|
126
|
+
export { poolQuestionCycleKey, poolQuestionPushThreshold, escapePoolPushMarkdown, buildPoolQuestionPushMessage, POOL_QUESTION_PUSH_TITLE_MAX_CHARS } from "./opportunity/discriminator/discriminator.push.js";
|
|
126
127
|
export type { SynthesizePoolQuestionInput, SynthesizedPoolQuestion } from "./opportunity/discriminator/discriminator.question.js";
|
|
127
128
|
export type { QuestionPoolAssignment, QuestionPoolDiscriminator, QuestionPoolSnapshot } from "./shared/schemas/question.schema.js";
|
|
128
129
|
export type { PoolCandidate, DiscriminatorMiningInput, MinedDiscriminator, ScoredDiscriminator, VerifiedAssignment, DiscriminatorShadowResult } from "./opportunity/discriminator/discriminator.types.js";
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"/","sources":["index.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AW,EACX,oBAAoB,GACrB,MAAM,uCAAuC,CAAC;AAI/C,OAAO,EAAE,YAAY,EAAE,MAAM,yBAAyB,CAAC;AACvD,OAAO,EAAE,gBAAgB,EAAE,MAAM,qCAAqC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -25,7 +25,7 @@ export { NegotiationSummarizer, buildFallbackDigest } from "./negotiation/negoti
|
|
|
25
25
|
export { SYSTEM_AGENT_IDS } from './shared/interfaces/agent.interface.js';
|
|
26
26
|
// ─── Shared schemas ───────────────────────────────────────────────────────────
|
|
27
27
|
export { ChatContextDigestSchema } from "./shared/schemas/chat-context.schema.js";
|
|
28
|
-
export { QuestionOptionSchema, QuestionSchema, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionActorSchema, QuestionAnswerSchema } from "./shared/schemas/question.schema.js";
|
|
28
|
+
export { QuestionOptionSchema, QuestionSchema, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionPoolPushSchema, QuestionPoolPushRequestStatusSchema, QuestionPoolPushRequestReasonSchema, QuestionActorSchema, QuestionAnswerSchema } from "./shared/schemas/question.schema.js";
|
|
29
29
|
export { UserIdentitySchema } from "./shared/schemas/identity.schema.js";
|
|
30
30
|
export { NetworkAssignmentResourceTypeSchema, NetworkAssignmentModeSchema, NetworkAssignmentScopeSchema, NetworkAssignmentPromptPresenceSchema, NetworkAssignmentPolicySchema, NetworkAssignmentRawScoresSchema, NetworkAssignmentMetadataSchema, OpportunityEvidenceKindSchema, OpportunityEvidenceSchema } from "./shared/schemas/network-assignment.schema.js";
|
|
31
31
|
export { DEFAULT_NETWORK_ASSIGNMENT_THRESHOLD, classifyPromptPresence, resolveAssignmentNetworkScope, buildNetworkAssignmentDecision, combineAssignmentScores } from "./shared/assignment/network-assignment.policy.js";
|
|
@@ -76,10 +76,11 @@ export { PoolDiscriminatorMiner } from "./opportunity/discriminator/discriminato
|
|
|
76
76
|
export { PoolDiscriminatorAssigner, buildAssignmentPrompt, verifyAssignedAxis } from "./opportunity/discriminator/discriminator.assigner.js";
|
|
77
77
|
export { runPoolDiscriminatorShadow } from "./opportunity/discriminator/discriminator.shadow.js";
|
|
78
78
|
export { scoreDiscriminator, computeNovelty, cosineSimilarity } from "./opportunity/discriminator/discriminator.scorer.js";
|
|
79
|
-
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT } from "./opportunity/discriminator/discriminator.env.js";
|
|
79
|
+
export { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT, POOL_QUESTION_PUSH_BASE_VOI, POOL_QUESTION_PUSH_DISMISSAL_DECAY, POOL_QUESTION_PUSH_MIN_POOL_SIZE, POOL_QUESTION_PUSH_DAILY_CAP } from "./opportunity/discriminator/discriminator.env.js";
|
|
80
80
|
export { poolQuestionsRanking, POOL_ADJUSTMENT_FACTOR_OTHER, POOL_ADJUSTMENT_FACTOR_UNKNOWN, POOL_ADJUSTMENT_FLOOR, POOL_STALENESS_THRESHOLD, POOL_RERUN_DEBOUNCE_MS } from "./opportunity/discriminator/discriminator.env.js";
|
|
81
81
|
export { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, removePoolAdjustment, readPoolAdjustments, poolAdjustmentMultiplier, adjustedConfidence, latestPoolDemotionDetail } from "./opportunity/discriminator/discriminator.adjustments.js";
|
|
82
82
|
export { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from "./opportunity/discriminator/discriminator.question.js";
|
|
83
|
+
export { poolQuestionCycleKey, poolQuestionPushThreshold, escapePoolPushMarkdown, buildPoolQuestionPushMessage, POOL_QUESTION_PUSH_TITLE_MAX_CHARS } from "./opportunity/discriminator/discriminator.push.js";
|
|
83
84
|
export { OpportunityEvaluator } from "./opportunity/opportunity.evaluator.js";
|
|
84
85
|
export { OpportunityPresenter, gatherPresenterContext } from "./opportunity/opportunity.presenter.js";
|
|
85
86
|
export { createOpportunityTools } from "./opportunity/opportunity.tools.js";
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"/","sources":["index.ts"],"names":[],"mappings":"AAAA,gFAAgF;AAChF,6CAA6C;AAC7C,EAAE;AACF,4DAA4D;AAC5D,gFAAgF;AAChF,+EAA+E;AAC/E,qDAAqD;AACrD,EAAE;AACF,yDAAyD;AACzD,2EAA2E;AAC3E,mEAAmE;AACnE,+EAA+E;AAC/E,iFAAiF;AACjF,gFAAgF;AAEhF,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,EACL,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,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AgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,GACrB,MAAM,uCAAuC,CAAC;AAE/C,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 {\n deriveAllowedNetworkIds,\n deriveDiscoveryNetworkIds,\n focusedNetworkId,\n focusedNetworkLabel,\n hasNetworkScope,\n scopeFromNetworkId,\n} from \"./shared/agent/tool.scope.js\";\nexport type { ToolScopeEnvelope, ToolScopeType, ScopeMembership, DeriveNetworkScopeInput } from \"./shared/agent/tool.scope.js\";\nexport { requestContext } from \"./shared/observability/request-context.js\";\nexport { setLoggerFactory } from \"./shared/observability/log.js\";\nexport type { LoggerWithSource as ProtocolLoggerWithSource } from \"./shared/observability/log.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, ChatQuestionsHost, ChatQuestionAnswerOutcome } 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, AssignmentNetworkMembership, 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, AskUserExpiryPayload } 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, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionActorSchema, QuestionAnswerSchema, type Question, type QuestionOption, type UnderspecificationType, type QuestionStrategy, type QuestionWithStrategy, type QuestionGeneratorResponse, type QuestionGenerationResult, type QuestionPurpose, 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, AssignmentScopeMembership, 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// ─── Intent clarification ─────────────────────────────────────────────────────\n\nexport { IntentClarifier, type IntentClarifierOutput } from \"./intent/intent.clarifier.js\";\n\n// ─── Graph factories ──────────────────────────────────────────────────────────\n\nexport { ChatGraphFactory } from \"./chat/chat.graph.js\";\nexport {\n ORCHESTRATOR_PERSONA,\n ORCHESTRATOR_PERSONA_ID,\n type ChatPersonaConfig,\n type ChatPersonaLoopBehaviors,\n} from \"./chat/chat.persona.js\";\nexport {\n NEGOTIATOR_PERSONA_ID,\n NEGOTIATOR_TOOL_NAMES,\n createNegotiatorPersona,\n createNegotiatorTools,\n filterNegotiatorTools,\n} from \"./chat/negotiator.persona.js\";\nexport { buildNegotiatorSystemContent, type NegotiatorPromptOptions } from \"./chat/negotiator.prompt.js\";\nexport {\n NEGOTIATOR_MEMORY_TOOL_NAMES,\n createNegotiatorMemoryTools,\n} from \"./chat/negotiator.tools.js\";\nexport type {\n NegotiatorMemoryToolsHost,\n NegotiatorMemoryRememberInput,\n NegotiatorMemoryToolView,\n NegotiatorMemoryForgetResult,\n RememberableMemoryKind,\n} from \"./shared/interfaces/negotiator-memory.interface.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 { SemanticVerifier } from \"./intent/intent.verifier.js\";\nexport type { SemanticVerifierOutput } from \"./intent/intent.verifier.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 type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput } 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 { NegotiationScreener, configuredScreenMode, ScreenDecisionSchema, NEGOTIATION_SCREEN_MODES } from \"./negotiation/negotiation.screen.js\";\nexport type { ScreenDecision, ScreenDecisionRecord, NegotiationScreenMode, NegotiationScreenerInput } from \"./negotiation/negotiation.screen.js\";\nexport { NegotiationReflector, DistilledMemorySchema, ReflectionResultSchema, MAX_DISTILLED_MEMORIES, NEGOTIATOR_MEMORY_KINDS } from \"./negotiation/negotiation.reflect.js\";\nexport type { DistilledMemory, DistilledMemoryKind, ReflectionResult, ReflectionTranscriptEntry, NegotiationReflectionInput, ChatReflectionInput, NegotiationReflectJobData, ReflectEnqueueFn } from \"./negotiation/negotiation.reflect.js\";\nexport { renderNegotiatorMemorySection, renderNegotiatorChatMemorySection } from \"./negotiation/negotiation.memory.js\";\nexport type { NegotiatorMemoryEntry, NegotiatorMemoryQuery, NegotiatorMemoryScope, NegotiatorMemoryRetrieveFn } from \"./negotiation/negotiation.memory.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, UptakeQuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn, DiscoveryContext, IntentContext, ProfileContext, NegotiationContext, PostStallNegotiationContext, UptakeNegotiationContext, NegotiationInflightContext, ChatContext, PoolDiscoveryContext } from \"./questioner/questioner.types.js\";\nexport { getPreset } from \"./questioner/questioner.presets.js\";\nexport { QUD_UNDERSPECIFICATION_RULES } from \"./questioner/questioner.qud.js\";\nexport { isQuestionerEnabled, isDiscoveryQuestionsEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, discoveryQuestionsInputMode, discoveryQuestionsTimeoutMs, chatQuestionWaitTimeoutMs } from \"./questioner/questioner.env.js\";\nexport type { QuestionerPreset } from \"./questioner/questioner.presets.js\";\nexport { PoolDiscriminatorMiner } from \"./opportunity/discriminator/discriminator.miner.js\";\nexport type { PoolDiscriminatorMinerConfig } from \"./opportunity/discriminator/discriminator.miner.js\";\nexport { PoolDiscriminatorAssigner, buildAssignmentPrompt, verifyAssignedAxis } from \"./opportunity/discriminator/discriminator.assigner.js\";\nexport type { PoolDiscriminatorAssignerConfig, PoolDiscriminatorAssignmentAxis, PoolDiscriminatorAssignmentInput, PoolDiscriminatorAssignedAxis, PoolDiscriminatorCandidateAssignment } from \"./opportunity/discriminator/discriminator.assigner.js\";\nexport { runPoolDiscriminatorShadow } from \"./opportunity/discriminator/discriminator.shadow.js\";\nexport type { DiscriminatorShadowInput } from \"./opportunity/discriminator/discriminator.shadow.js\";\nexport { scoreDiscriminator, computeNovelty, cosineSimilarity } from \"./opportunity/discriminator/discriminator.scorer.js\";\nexport { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT } from \"./opportunity/discriminator/discriminator.env.js\";\nexport type { PoolQuestionsMiningMode, PoolQuestionsMode, PoolQuestionsRankingMode, PoolQuestionsStampNewbornMode } from \"./opportunity/discriminator/discriminator.env.js\";\nexport { poolQuestionsRanking, POOL_ADJUSTMENT_FACTOR_OTHER, POOL_ADJUSTMENT_FACTOR_UNKNOWN, POOL_ADJUSTMENT_FLOOR, POOL_STALENESS_THRESHOLD, POOL_RERUN_DEBOUNCE_MS } from \"./opportunity/discriminator/discriminator.env.js\";\nexport { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, removePoolAdjustment, readPoolAdjustments, poolAdjustmentMultiplier, adjustedConfidence, latestPoolDemotionDetail } from \"./opportunity/discriminator/discriminator.adjustments.js\";\nexport type { BuildPoolAdjustmentInput, PoolAdjustment, PoolAdjustmentPlanEntry, PoolAdjustmentSignal } from \"./opportunity/discriminator/discriminator.adjustments.js\";\nexport { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from \"./opportunity/discriminator/discriminator.question.js\";\nexport type { SynthesizePoolQuestionInput, SynthesizedPoolQuestion } from \"./opportunity/discriminator/discriminator.question.js\";\nexport type { QuestionPoolAssignment, QuestionPoolDiscriminator, QuestionPoolSnapshot } from \"./shared/schemas/question.schema.js\";\nexport type { PoolCandidate, DiscriminatorMiningInput, MinedDiscriminator, ScoredDiscriminator, VerifiedAssignment, DiscriminatorShadowResult } from \"./opportunity/discriminator/discriminator.types.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, truncateAtBoundary } from \"./opportunity/opportunity.presentation.js\";\nexport { safeFallbackSummary, getSafePresentationOrSkip, SAFE_FALLBACK_MAX_CHARS, DEFAULT_FALLBACK_HEADLINE, DEFAULT_FALLBACK_ACTION, DEFAULT_EMPTY_FALLBACK_TEXT } from \"./opportunity/opportunity.safe-presentation.js\";\nexport type { SafeFallbackOptions, SafePresentation, SafePresentationOptions, SafePresentationSource } from \"./opportunity/opportunity.safe-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, computeAgentAllowedNetworkIds, 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 { NEGOTIATION_ACTIONS, AskUserPayloadSchema } from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationAction, NegotiationSeat, NegotiationProtocolVersion, AskUserPayload } from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationGraphLike } from \"./negotiation/negotiation.state.js\";\n\n// ─── Negotiation seat rules (v2 client-advocate protocol) ───────────────────\n\nexport {\n InitiatorTurnSchema,\n CounterpartyTurnSchema,\n FinalInitiatorTurnSchema,\n FinalCounterpartyTurnSchema,\n InitiatorAskUserTurnSchema,\n CounterpartyAskUserTurnSchema,\n allowedActionsFor,\n turnSchemaFor,\n isTerminalAction,\n isRejectLikeAction,\n fallbackActionFor,\n rejectActionFor,\n readProtocolVersion,\n configuredProtocolVersion,\n configuredAskUserEnabled,\n askUserAnswerWindowMs,\n DEFAULT_ASK_USER_WINDOW_MS,\n ASK_USER_LOCK_SLACK_MS,\n resolveSeat,\n seatViolationMessage,\n} from \"./negotiation/negotiation.protocol.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,6CAA6C;AAC7C,EAAE;AACF,4DAA4D;AAC5D,gFAAgF;AAChF,+EAA+E;AAC/E,qDAAqD;AACrD,EAAE;AACF,yDAAyD;AACzD,2EAA2E;AAC3E,mEAAmE;AACnE,+EAA+E;AAC/E,iFAAiF;AACjF,gFAAgF;AAEhF,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,EACL,uBAAuB,EACvB,yBAAyB,EACzB,gBAAgB,EAChB,mBAAmB,EACnB,eAAe,EACf,kBAAkB,GACnB,MAAM,8BAA8B,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,MAAM,2CAA2C,CAAC;AAC3E,OAAO,EAAE,gBAAgB,EAAE,MAAM,+BAA+B,CAAC;AAEjE,OAAO,EAAE,gBAAgB,EAAE,MAAM,uCAAuC,CAAC;AACzE,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,i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B,EAC7B,iBAAiB,EACjB,aAAa,EACb,gBAAgB,EAChB,kBAAkB,EAClB,iBAAiB,EACjB,eAAe,EACf,mBAAmB,EACnB,yBAAyB,EACzB,wBAAwB,EACxB,qBAAqB,EACrB,0BAA0B,EAC1B,sBAAsB,EACtB,WAAW,EACX,oBAAoB,GACrB,MAAM,uCAAuC,CAAC;AAE/C,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 {\n deriveAllowedNetworkIds,\n deriveDiscoveryNetworkIds,\n focusedNetworkId,\n focusedNetworkLabel,\n hasNetworkScope,\n scopeFromNetworkId,\n} from \"./shared/agent/tool.scope.js\";\nexport type { ToolScopeEnvelope, ToolScopeType, ScopeMembership, DeriveNetworkScopeInput } from \"./shared/agent/tool.scope.js\";\nexport { requestContext } from \"./shared/observability/request-context.js\";\nexport { setLoggerFactory } from \"./shared/observability/log.js\";\nexport type { LoggerWithSource as ProtocolLoggerWithSource } from \"./shared/observability/log.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, ChatQuestionsHost, ChatQuestionAnswerOutcome } 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, AssignmentNetworkMembership, 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, AskUserExpiryPayload } 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, UnderspecificationTypeSchema, QuestionStrategySchema, QuestionWithStrategySchema, QuestionGeneratorResponseSchema, QuestionPurposeSchema, QuestionModeSchema, QuestionDetectionSchema, QuestionPoolPushSchema, QuestionPoolPushRequestStatusSchema, QuestionPoolPushRequestReasonSchema, QuestionActorSchema, QuestionAnswerSchema, type Question, type QuestionOption, type UnderspecificationType, type QuestionStrategy, type QuestionWithStrategy, type QuestionGeneratorResponse, type QuestionGenerationResult, type QuestionPurpose, type QuestionMode, type QuestionDetection, type QuestionPoolPush, type QuestionPoolPushRequestStatus, type QuestionPoolPushRequestReason, 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, AssignmentScopeMembership, 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// ─── Intent clarification ─────────────────────────────────────────────────────\n\nexport { IntentClarifier, type IntentClarifierOutput } from \"./intent/intent.clarifier.js\";\n\n// ─── Graph factories ──────────────────────────────────────────────────────────\n\nexport { ChatGraphFactory } from \"./chat/chat.graph.js\";\nexport {\n ORCHESTRATOR_PERSONA,\n ORCHESTRATOR_PERSONA_ID,\n type ChatPersonaConfig,\n type ChatPersonaLoopBehaviors,\n} from \"./chat/chat.persona.js\";\nexport {\n NEGOTIATOR_PERSONA_ID,\n NEGOTIATOR_TOOL_NAMES,\n createNegotiatorPersona,\n createNegotiatorTools,\n filterNegotiatorTools,\n} from \"./chat/negotiator.persona.js\";\nexport { buildNegotiatorSystemContent, type NegotiatorPromptOptions } from \"./chat/negotiator.prompt.js\";\nexport {\n NEGOTIATOR_MEMORY_TOOL_NAMES,\n createNegotiatorMemoryTools,\n} from \"./chat/negotiator.tools.js\";\nexport type {\n NegotiatorMemoryToolsHost,\n NegotiatorMemoryRememberInput,\n NegotiatorMemoryToolView,\n NegotiatorMemoryForgetResult,\n RememberableMemoryKind,\n} from \"./shared/interfaces/negotiator-memory.interface.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 { SemanticVerifier } from \"./intent/intent.verifier.js\";\nexport type { SemanticVerifierOutput } from \"./intent/intent.verifier.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 type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput } 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 { NegotiationScreener, configuredScreenMode, ScreenDecisionSchema, NEGOTIATION_SCREEN_MODES } from \"./negotiation/negotiation.screen.js\";\nexport type { ScreenDecision, ScreenDecisionRecord, NegotiationScreenMode, NegotiationScreenerInput } from \"./negotiation/negotiation.screen.js\";\nexport { NegotiationReflector, DistilledMemorySchema, ReflectionResultSchema, MAX_DISTILLED_MEMORIES, NEGOTIATOR_MEMORY_KINDS } from \"./negotiation/negotiation.reflect.js\";\nexport type { DistilledMemory, DistilledMemoryKind, ReflectionResult, ReflectionTranscriptEntry, NegotiationReflectionInput, ChatReflectionInput, NegotiationReflectJobData, ReflectEnqueueFn } from \"./negotiation/negotiation.reflect.js\";\nexport { renderNegotiatorMemorySection, renderNegotiatorChatMemorySection } from \"./negotiation/negotiation.memory.js\";\nexport type { NegotiatorMemoryEntry, NegotiatorMemoryQuery, NegotiatorMemoryScope, NegotiatorMemoryRetrieveFn } from \"./negotiation/negotiation.memory.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, UptakeQuestionerInput, QuestionerContext, QuestionerEnqueuePayload, QuestionerEnqueueFn, DiscoveryContext, IntentContext, ProfileContext, NegotiationContext, PostStallNegotiationContext, UptakeNegotiationContext, NegotiationInflightContext, ChatContext, PoolDiscoveryContext } from \"./questioner/questioner.types.js\";\nexport { getPreset } from \"./questioner/questioner.presets.js\";\nexport { QUD_UNDERSPECIFICATION_RULES } from \"./questioner/questioner.qud.js\";\nexport { isQuestionerEnabled, isDiscoveryQuestionsEnabled, isUptakeGuardEnabled, uptakeAuthorityThreshold, discoveryQuestionsInputMode, discoveryQuestionsTimeoutMs, chatQuestionWaitTimeoutMs } from \"./questioner/questioner.env.js\";\nexport type { QuestionerPreset } from \"./questioner/questioner.presets.js\";\nexport { PoolDiscriminatorMiner } from \"./opportunity/discriminator/discriminator.miner.js\";\nexport type { PoolDiscriminatorMinerConfig } from \"./opportunity/discriminator/discriminator.miner.js\";\nexport { PoolDiscriminatorAssigner, buildAssignmentPrompt, verifyAssignedAxis } from \"./opportunity/discriminator/discriminator.assigner.js\";\nexport type { PoolDiscriminatorAssignerConfig, PoolDiscriminatorAssignmentAxis, PoolDiscriminatorAssignmentInput, PoolDiscriminatorAssignedAxis, PoolDiscriminatorCandidateAssignment } from \"./opportunity/discriminator/discriminator.assigner.js\";\nexport { runPoolDiscriminatorShadow } from \"./opportunity/discriminator/discriminator.shadow.js\";\nexport type { DiscriminatorShadowInput } from \"./opportunity/discriminator/discriminator.shadow.js\";\nexport { scoreDiscriminator, computeNovelty, cosineSimilarity } from \"./opportunity/discriminator/discriminator.scorer.js\";\nexport { poolQuestionsMiningMode, poolQuestionsMode, poolQuestionsPushMode, poolQuestionsStampNewborn, POOL_DISCRIMINATOR_MIN_POOL_SIZE, POOL_DISCRIMINATOR_MAX_CANDIDATES, POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS, POOL_QUESTION_MIN_VOI, POOL_QUESTION_MIN_EVIDENCE_RATE, POOL_QUESTION_MAX_DISCRIMINATORS, POOL_QUESTION_MAX_PENDING_PER_INTENT, POOL_QUESTION_PUSH_BASE_VOI, POOL_QUESTION_PUSH_DISMISSAL_DECAY, POOL_QUESTION_PUSH_MIN_POOL_SIZE, POOL_QUESTION_PUSH_DAILY_CAP } from \"./opportunity/discriminator/discriminator.env.js\";\nexport type { PoolQuestionsMiningMode, PoolQuestionsMode, PoolQuestionsPushMode, PoolQuestionsRankingMode, PoolQuestionsStampNewbornMode } from \"./opportunity/discriminator/discriminator.env.js\";\nexport { poolQuestionsRanking, POOL_ADJUSTMENT_FACTOR_OTHER, POOL_ADJUSTMENT_FACTOR_UNKNOWN, POOL_ADJUSTMENT_FLOOR, POOL_STALENESS_THRESHOLD, POOL_RERUN_DEBOUNCE_MS } from \"./opportunity/discriminator/discriminator.env.js\";\nexport { buildPoolAdjustment, planPoolAdjustments, mergePoolAdjustment, removePoolAdjustment, readPoolAdjustments, poolAdjustmentMultiplier, adjustedConfidence, latestPoolDemotionDetail } from \"./opportunity/discriminator/discriminator.adjustments.js\";\nexport type { BuildPoolAdjustmentInput, PoolAdjustment, PoolAdjustmentPlanEntry, PoolAdjustmentSignal } from \"./opportunity/discriminator/discriminator.adjustments.js\";\nexport { synthesizePoolQuestion, selectQuestionDiscriminators, toQuestionDiscriminator, BOTH_MATTER_LABEL } from \"./opportunity/discriminator/discriminator.question.js\";\nexport { poolQuestionCycleKey, poolQuestionPushThreshold, escapePoolPushMarkdown, buildPoolQuestionPushMessage, POOL_QUESTION_PUSH_TITLE_MAX_CHARS } from \"./opportunity/discriminator/discriminator.push.js\";\nexport type { SynthesizePoolQuestionInput, SynthesizedPoolQuestion } from \"./opportunity/discriminator/discriminator.question.js\";\nexport type { QuestionPoolAssignment, QuestionPoolDiscriminator, QuestionPoolSnapshot } from \"./shared/schemas/question.schema.js\";\nexport type { PoolCandidate, DiscriminatorMiningInput, MinedDiscriminator, ScoredDiscriminator, VerifiedAssignment, DiscriminatorShadowResult } from \"./opportunity/discriminator/discriminator.types.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, truncateAtBoundary } from \"./opportunity/opportunity.presentation.js\";\nexport { safeFallbackSummary, getSafePresentationOrSkip, SAFE_FALLBACK_MAX_CHARS, DEFAULT_FALLBACK_HEADLINE, DEFAULT_FALLBACK_ACTION, DEFAULT_EMPTY_FALLBACK_TEXT } from \"./opportunity/opportunity.safe-presentation.js\";\nexport type { SafeFallbackOptions, SafePresentation, SafePresentationOptions, SafePresentationSource } from \"./opportunity/opportunity.safe-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, computeAgentAllowedNetworkIds, 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 { NEGOTIATION_ACTIONS, AskUserPayloadSchema } from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationAction, NegotiationSeat, NegotiationProtocolVersion, AskUserPayload } from \"./shared/schemas/negotiation-state.schema.js\";\nexport type { NegotiationGraphLike } from \"./negotiation/negotiation.state.js\";\n\n// ─── Negotiation seat rules (v2 client-advocate protocol) ───────────────────\n\nexport {\n InitiatorTurnSchema,\n CounterpartyTurnSchema,\n FinalInitiatorTurnSchema,\n FinalCounterpartyTurnSchema,\n InitiatorAskUserTurnSchema,\n CounterpartyAskUserTurnSchema,\n allowedActionsFor,\n turnSchemaFor,\n isTerminalAction,\n isRejectLikeAction,\n fallbackActionFor,\n rejectActionFor,\n readProtocolVersion,\n configuredProtocolVersion,\n configuredAskUserEnabled,\n askUserAnswerWindowMs,\n DEFAULT_ASK_USER_WINDOW_MS,\n ASK_USER_LOCK_SLACK_MS,\n resolveSeat,\n seatViolationMessage,\n} from \"./negotiation/negotiation.protocol.js\";\n\n// ─── Streamers ────────────────────────────────────────────────────────────────\n\nexport { ChatStreamer } from \"./chat/chat.streamer.js\";\nexport { ResponseStreamer } from \"./shared/agent/response.streamer.js\";\n"]}
|
|
@@ -25,6 +25,13 @@ export type PoolQuestionsMode = "off" | "on";
|
|
|
25
25
|
* "on" implies mining runs even when POOL_QUESTIONS_MINING is off.
|
|
26
26
|
*/
|
|
27
27
|
export declare function poolQuestionsMode(): PoolQuestionsMode;
|
|
28
|
+
/** Push delivery mode for high-VoI pool questions (IND-421). */
|
|
29
|
+
export type PoolQuestionsPushMode = "off" | "on";
|
|
30
|
+
/**
|
|
31
|
+
* Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally
|
|
32
|
+
* require pool-question mode and negotiator availability before delivery.
|
|
33
|
+
*/
|
|
34
|
+
export declare function poolQuestionsPushMode(): PoolQuestionsPushMode;
|
|
28
35
|
/** Newborn-opportunity stamping mode (IND-420 P4b). */
|
|
29
36
|
export type PoolQuestionsStampNewbornMode = "off" | "on";
|
|
30
37
|
/**
|
|
@@ -40,6 +47,14 @@ export declare const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6;
|
|
|
40
47
|
export declare const POOL_QUESTION_MAX_DISCRIMINATORS = 3;
|
|
41
48
|
/** Unattended budget: max pending questions of ANY mode per intent. */
|
|
42
49
|
export declare const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3;
|
|
50
|
+
/** Initial internal VoI threshold for proactive push delivery. */
|
|
51
|
+
export declare const POOL_QUESTION_PUSH_BASE_VOI = 0.6;
|
|
52
|
+
/** Multiplicative VoI threshold increase per consecutive dismissal. */
|
|
53
|
+
export declare const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15;
|
|
54
|
+
/** Minimum pool size for proactive delivery (stricter than mining). */
|
|
55
|
+
export declare const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8;
|
|
56
|
+
/** Maximum claimed proactive pool pushes per recipient per UTC day. */
|
|
57
|
+
export declare const POOL_QUESTION_PUSH_DAILY_CAP = 2;
|
|
43
58
|
/** Ranking mode for pool adjustments (IND-419). */
|
|
44
59
|
export type PoolQuestionsRankingMode = "off" | "on";
|
|
45
60
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discriminator.env.d.ts","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAEH,+CAA+C;AAC/C,MAAM,MAAM,uBAAuB,GAAG,KAAK,GAAG,QAAQ,CAAC;AAEvD,wDAAwD;AACxD,wBAAgB,uBAAuB,IAAI,uBAAuB,CAEjE;AAED,uDAAuD;AACvD,MAAM,MAAM,iBAAiB,GAAG,KAAK,GAAG,IAAI,CAAC;A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IG;AACH,eAAO,MAAM,gCAAgC,IAAI,CAAC;AAElD,6DAA6D;AAC7D,eAAO,MAAM,iCAAiC,KAAK,CAAC;AAEpD,qEAAqE;AACrE,eAAO,MAAM,2CAA2C,MAAM,CAAC"}
|
|
@@ -25,6 +25,13 @@ export function poolQuestionsMiningMode() {
|
|
|
25
25
|
export function poolQuestionsMode() {
|
|
26
26
|
return process.env.POOL_QUESTIONS_MODE?.trim() === "on" ? "on" : "off";
|
|
27
27
|
}
|
|
28
|
+
/**
|
|
29
|
+
* Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally
|
|
30
|
+
* require pool-question mode and negotiator availability before delivery.
|
|
31
|
+
*/
|
|
32
|
+
export function poolQuestionsPushMode() {
|
|
33
|
+
return process.env.POOL_QUESTIONS_PUSH?.trim() === "on" ? "on" : "off";
|
|
34
|
+
}
|
|
28
35
|
/**
|
|
29
36
|
* Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers
|
|
30
37
|
* additionally require {@link poolQuestionsMode} to be on.
|
|
@@ -40,6 +47,14 @@ export const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6;
|
|
|
40
47
|
export const POOL_QUESTION_MAX_DISCRIMINATORS = 3;
|
|
41
48
|
/** Unattended budget: max pending questions of ANY mode per intent. */
|
|
42
49
|
export const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3;
|
|
50
|
+
/** Initial internal VoI threshold for proactive push delivery. */
|
|
51
|
+
export const POOL_QUESTION_PUSH_BASE_VOI = 0.6;
|
|
52
|
+
/** Multiplicative VoI threshold increase per consecutive dismissal. */
|
|
53
|
+
export const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15;
|
|
54
|
+
/** Minimum pool size for proactive delivery (stricter than mining). */
|
|
55
|
+
export const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8;
|
|
56
|
+
/** Maximum claimed proactive pool pushes per recipient per UTC day. */
|
|
57
|
+
export const POOL_QUESTION_PUSH_DAILY_CAP = 2;
|
|
43
58
|
/**
|
|
44
59
|
* Current POOL_QUESTIONS_RANKING (default off). When "on", the home feed
|
|
45
60
|
* orders by adjusted confidence (confidence × Π poolAdjustments.factor,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"discriminator.env.js","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,wDAAwD;AACxD,MAAM,UAAU,uBAAuB;IACrC,OAAO,OAAO,CAAC,GAAG,CAAC,qBAAqB,EAAE,IAAI,EAAE,KAAK,QAAQ,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC;AACnF,CAAC;AAKD;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB;IAC/B,OAAO,OAAO,CAAC,GAAG,CAAC,mBAAmB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AACzE,CAAC;AAKD;;;GAGG;AACH,MAAM,UAAU,yBAAyB;IACvC,OAAO,OAAO,CAAC,GAAG,CAAC,4BAA4B,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAClF,CAAC;AAED,uEAAuE;AACvE,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC,mFAAmF;AACnF,MAAM,CAAC,MAAM,+BAA+B,GAAG,GAAG,CAAC;AAEnD,gFAAgF;AAChF,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,uEAAuE;AACvE,MAAM,CAAC,MAAM,oCAAoC,GAAG,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"discriminator.env.js","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.env.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;GAaG;AAKH,wDAAwD;AACxD,MAAM,UAAU,uBAAuB;IACrC,OA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M,UAAU,oBAAoB;IAClC,OAAO,OAAO,CAAC,GAAG,CAAC,sBAAsB,EAAE,IAAI,EAAE,KAAK,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC;AAC5E,CAAC;AAED,4EAA4E;AAC5E,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,CAAC;AAEhD,6EAA6E;AAC7E,MAAM,CAAC,MAAM,8BAA8B,GAAG,GAAG,CAAC;AAElD,8EAA8E;AAC9E,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAG,CAAC;AAEzC;;;;;GAKG;AACH,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAE5C,8EAA8E;AAC9E,MAAM,CAAC,MAAM,sBAAsB,GAAG,KAAM,CAAC;AAE7C;;;;GAIG;AACH,MAAM,CAAC,MAAM,gCAAgC,GAAG,CAAC,CAAC;AAElD,6DAA6D;AAC7D,MAAM,CAAC,MAAM,iCAAiC,GAAG,EAAE,CAAC;AAEpD,qEAAqE;AACrE,MAAM,CAAC,MAAM,2CAA2C,GAAG,GAAG,CAAC","sourcesContent":["/**\n * Centralized accessors for pool-question environment variables (IND-416).\n *\n * POOL_QUESTIONS_MINING off | shadow — P1 shadow axis mining on\n * discovery-run completion. `shadow` mines and\n * scores axes and logs them; no questions are\n * generated and no user-facing behavior changes.\n * Any value other than \"shadow\" (including unset)\n * means off.\n *\n * All reads go through this module — do not read these variables via\n * `process.env` elsewhere. Values are read on every call (no caching) so\n * tests and long-lived processes observe changes.\n */\n\n/** Mining mode for pool discriminator axes. */\nexport type PoolQuestionsMiningMode = \"off\" | \"shadow\";\n\n/** Current POOL_QUESTIONS_MINING mode (default off). */\nexport function poolQuestionsMiningMode(): PoolQuestionsMiningMode {\n return process.env.POOL_QUESTIONS_MINING?.trim() === \"shadow\" ? \"shadow\" : \"off\";\n}\n\n/** Question mode for pool discriminators (IND-418). */\nexport type PoolQuestionsMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_MODE (default off). When \"on\", the mining hook also\n * enqueues a pool_discovery question for the top eligible discriminator\n * (still subject to the QUESTIONER_ENABLED master gate and per-intent budget).\n * \"on\" implies mining runs even when POOL_QUESTIONS_MINING is off.\n */\nexport function poolQuestionsMode(): PoolQuestionsMode {\n return process.env.POOL_QUESTIONS_MODE?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Push delivery mode for high-VoI pool questions (IND-421). */\nexport type PoolQuestionsPushMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_PUSH mode (default off). Callers must additionally\n * require pool-question mode and negotiator availability before delivery.\n */\nexport function poolQuestionsPushMode(): PoolQuestionsPushMode {\n return process.env.POOL_QUESTIONS_PUSH?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Newborn-opportunity stamping mode (IND-420 P4b). */\nexport type PoolQuestionsStampNewbornMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_STAMP_NEWBORN mode (default off). Effective callers\n * additionally require {@link poolQuestionsMode} to be on.\n */\nexport function poolQuestionsStampNewborn(): PoolQuestionsStampNewbornMode {\n return process.env.POOL_QUESTIONS_STAMP_NEWBORN?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Minimum VoI for a discriminator to become (or chain) a question. */\nexport const POOL_QUESTION_MIN_VOI = 0.2;\n\n/** Minimum evidence-verification rate for a discriminator to become a question. */\nexport const POOL_QUESTION_MIN_EVIDENCE_RATE = 0.6;\n\n/** Max eligible discriminators carried per mining pass (asked + alternates). */\nexport const POOL_QUESTION_MAX_DISCRIMINATORS = 3;\n\n/** Unattended budget: max pending questions of ANY mode per intent. */\nexport const POOL_QUESTION_MAX_PENDING_PER_INTENT = 3;\n\n/** Initial internal VoI threshold for proactive push delivery. */\nexport const POOL_QUESTION_PUSH_BASE_VOI = 0.6;\n\n/** Multiplicative VoI threshold increase per consecutive dismissal. */\nexport const POOL_QUESTION_PUSH_DISMISSAL_DECAY = 1.15;\n\n/** Minimum pool size for proactive delivery (stricter than mining). */\nexport const POOL_QUESTION_PUSH_MIN_POOL_SIZE = 8;\n\n/** Maximum claimed proactive pool pushes per recipient per UTC day. */\nexport const POOL_QUESTION_PUSH_DAILY_CAP = 2;\n\n/** Ranking mode for pool adjustments (IND-419). */\nexport type PoolQuestionsRankingMode = \"off\" | \"on\";\n\n/**\n * Current POOL_QUESTIONS_RANKING (default off). When \"on\", the home feed\n * orders by adjusted confidence (confidence × Π poolAdjustments.factor,\n * floor {@link POOL_ADJUSTMENT_FLOOR}). Adjustments are WRITTEN regardless of\n * this flag — it only gates whether ordering reads them, so the apply path\n * can ship first.\n */\nexport function poolQuestionsRanking(): PoolQuestionsRankingMode {\n return process.env.POOL_QUESTIONS_RANKING?.trim() === \"on\" ? \"on\" : \"off\";\n}\n\n/** Adjustment factor for candidates on the side the user did NOT choose. */\nexport const POOL_ADJUSTMENT_FACTOR_OTHER = 0.6;\n\n/** Adjustment factor for candidates the miner could not assign (unknown). */\nexport const POOL_ADJUSTMENT_FACTOR_UNKNOWN = 0.9;\n\n/** Floor for the cumulative adjustment multiplier — demoted, never hidden. */\nexport const POOL_ADJUSTMENT_FLOOR = 0.3;\n\n/**\n * Staleness guard (IND-419): when more than this fraction of a question's\n * stored assignments point at opportunities that left the pool (expired /\n * rejected / accepted / archived), skip the re-rank — the snapshot no longer\n * describes the live pool.\n */\nexport const POOL_STALENESS_THRESHOLD = 0.3;\n\n/** Debounce window for answer-triggered re-discovery (Tier 1), per intent. */\nexport const POOL_RERUN_DEBOUNCE_MS = 60_000;\n\n/**\n * k-anonymity floor: axes are only mined when the pool has at least this many\n * candidates, so no axis (or later, question option) can be traced back to a\n * specific individual.\n */\nexport const POOL_DISCRIMINATOR_MIN_POOL_SIZE = 5;\n\n/** Max candidates sent to the miner LLM (top-N by score). */\nexport const POOL_DISCRIMINATOR_MAX_CANDIDATES = 24;\n\n/** Max chars of public context per candidate in the miner prompt. */\nexport const POOL_DISCRIMINATOR_MAX_PUBLIC_CONTEXT_CHARS = 400;\n"]}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import type { QuestionPoolSnapshot } from "../../shared/schemas/question.schema.js";
|
|
2
|
+
/** Maximum raw intent-title characters included in a proactive DM line. */
|
|
3
|
+
export declare const POOL_QUESTION_PUSH_TITLE_MAX_CHARS = 80;
|
|
4
|
+
/** Stable identity for one pool refresh cycle. Chained alternates retain it. */
|
|
5
|
+
export declare function poolQuestionCycleKey(pool: Pick<QuestionPoolSnapshot, "runId" | "minedAt">): string;
|
|
6
|
+
/** Strict VoI threshold after the recipient's consecutive dismissal streak. */
|
|
7
|
+
export declare function poolQuestionPushThreshold(consecutiveDismissals: number): number;
|
|
8
|
+
/** Escape plain text so it cannot alter the deterministic Markdown template. */
|
|
9
|
+
export declare function escapePoolPushMarkdown(text: string): string;
|
|
10
|
+
/** Build the sole proactive user-facing DM line for a pushed pool question. */
|
|
11
|
+
export declare function buildPoolQuestionPushMessage(input: {
|
|
12
|
+
intentId: string;
|
|
13
|
+
intentTitle: string;
|
|
14
|
+
questionPrompt: string;
|
|
15
|
+
}): string;
|
|
16
|
+
//# sourceMappingURL=discriminator.push.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discriminator.push.d.ts","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.push.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC;AAIpF,2EAA2E;AAC3E,eAAO,MAAM,kCAAkC,KAAK,CAAC;AAErD,gFAAgF;AAChF,wBAAgB,oBAAoB,CAClC,IAAI,EAAE,IAAI,CAAC,oBAAoB,EAAE,OAAO,GAAG,SAAS,CAAC,GACpD,MAAM,CAGR;AAED,+EAA+E;AAC/E,wBAAgB,yBAAyB,CAAC,qBAAqB,EAAE,MAAM,GAAG,MAAM,CAG/E;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAE3D;AAED,+EAA+E;AAC/E,wBAAgB,4BAA4B,CAAC,KAAK,EAAE;IAClD,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB,GAAG,MAAM,CAMT"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { POOL_QUESTION_PUSH_BASE_VOI, POOL_QUESTION_PUSH_DISMISSAL_DECAY } from "./discriminator.env.js";
|
|
2
|
+
/** Maximum raw intent-title characters included in a proactive DM line. */
|
|
3
|
+
export const POOL_QUESTION_PUSH_TITLE_MAX_CHARS = 80;
|
|
4
|
+
/** Stable identity for one pool refresh cycle. Chained alternates retain it. */
|
|
5
|
+
export function poolQuestionCycleKey(pool) {
|
|
6
|
+
const runId = pool.runId?.trim();
|
|
7
|
+
return runId ? `run:${runId}` : `mined:${pool.minedAt}`;
|
|
8
|
+
}
|
|
9
|
+
/** Strict VoI threshold after the recipient's consecutive dismissal streak. */
|
|
10
|
+
export function poolQuestionPushThreshold(consecutiveDismissals) {
|
|
11
|
+
const streak = Math.max(0, Math.floor(consecutiveDismissals));
|
|
12
|
+
return POOL_QUESTION_PUSH_BASE_VOI * POOL_QUESTION_PUSH_DISMISSAL_DECAY ** streak;
|
|
13
|
+
}
|
|
14
|
+
/** Escape plain text so it cannot alter the deterministic Markdown template. */
|
|
15
|
+
export function escapePoolPushMarkdown(text) {
|
|
16
|
+
return text.replace(/([\\`*_[\]{}()<>#+\-.!|])/g, "\\$1");
|
|
17
|
+
}
|
|
18
|
+
/** Build the sole proactive user-facing DM line for a pushed pool question. */
|
|
19
|
+
export function buildPoolQuestionPushMessage(input) {
|
|
20
|
+
const normalizedTitle = input.intentTitle.replace(/\s+/g, " ").trim() || "your intent";
|
|
21
|
+
const boundedTitle = normalizedTitle.length > POOL_QUESTION_PUSH_TITLE_MAX_CHARS
|
|
22
|
+
? `${normalizedTitle.slice(0, POOL_QUESTION_PUSH_TITLE_MAX_CHARS - 1)}…`
|
|
23
|
+
: normalizedTitle;
|
|
24
|
+
return `Quick one about [${escapePoolPushMarkdown(boundedTitle)}](/i/${input.intentId}): ${escapePoolPushMarkdown(input.questionPrompt)}`;
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=discriminator.push.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"discriminator.push.js","sourceRoot":"/","sources":["opportunity/discriminator/discriminator.push.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,2BAA2B,EAAE,kCAAkC,EAAE,MAAM,wBAAwB,CAAC;AAEzG,2EAA2E;AAC3E,MAAM,CAAC,MAAM,kCAAkC,GAAG,EAAE,CAAC;AAErD,gFAAgF;AAChF,MAAM,UAAU,oBAAoB,CAClC,IAAqD;IAErD,MAAM,KAAK,GAAG,IAAI,CAAC,KAAK,EAAE,IAAI,EAAE,CAAC;IACjC,OAAO,KAAK,CAAC,CAAC,CAAC,OAAO,KAAK,EAAE,CAAC,CAAC,CAAC,SAAS,IAAI,CAAC,OAAO,EAAE,CAAC;AAC1D,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,yBAAyB,CAAC,qBAA6B;IACrE,MAAM,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,IAAI,CAAC,KAAK,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC9D,OAAO,2BAA2B,GAAG,kCAAkC,IAAI,MAAM,CAAC;AACpF,CAAC;AAED,gFAAgF;AAChF,MAAM,UAAU,sBAAsB,CAAC,IAAY;IACjD,OAAO,IAAI,CAAC,OAAO,CAAC,4BAA4B,EAAE,MAAM,CAAC,CAAC;AAC5D,CAAC;AAED,+EAA+E;AAC/E,MAAM,UAAU,4BAA4B,CAAC,KAI5C;IACC,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,OAAO,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,IAAI,aAAa,CAAC;IACvF,MAAM,YAAY,GAAG,eAAe,CAAC,MAAM,GAAG,kCAAkC;QAC9E,CAAC,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAC,EAAE,kCAAkC,GAAG,CAAC,CAAC,GAAG;QACxE,CAAC,CAAC,eAAe,CAAC;IACpB,OAAO,oBAAoB,sBAAsB,CAAC,YAAY,CAAC,QAAQ,KAAK,CAAC,QAAQ,MAAM,sBAAsB,CAAC,KAAK,CAAC,cAAc,CAAC,EAAE,CAAC;AAC5I,CAAC","sourcesContent":["import type { QuestionPoolSnapshot } from \"../../shared/schemas/question.schema.js\";\n\nimport { POOL_QUESTION_PUSH_BASE_VOI, POOL_QUESTION_PUSH_DISMISSAL_DECAY } from \"./discriminator.env.js\";\n\n/** Maximum raw intent-title characters included in a proactive DM line. */\nexport const POOL_QUESTION_PUSH_TITLE_MAX_CHARS = 80;\n\n/** Stable identity for one pool refresh cycle. Chained alternates retain it. */\nexport function poolQuestionCycleKey(\n pool: Pick<QuestionPoolSnapshot, \"runId\" | \"minedAt\">,\n): string {\n const runId = pool.runId?.trim();\n return runId ? `run:${runId}` : `mined:${pool.minedAt}`;\n}\n\n/** Strict VoI threshold after the recipient's consecutive dismissal streak. */\nexport function poolQuestionPushThreshold(consecutiveDismissals: number): number {\n const streak = Math.max(0, Math.floor(consecutiveDismissals));\n return POOL_QUESTION_PUSH_BASE_VOI * POOL_QUESTION_PUSH_DISMISSAL_DECAY ** streak;\n}\n\n/** Escape plain text so it cannot alter the deterministic Markdown template. */\nexport function escapePoolPushMarkdown(text: string): string {\n return text.replace(/([\\\\`*_[\\]{}()<>#+\\-.!|])/g, \"\\\\$1\");\n}\n\n/** Build the sole proactive user-facing DM line for a pushed pool question. */\nexport function buildPoolQuestionPushMessage(input: {\n intentId: string;\n intentTitle: string;\n questionPrompt: string;\n}): string {\n const normalizedTitle = input.intentTitle.replace(/\\s+/g, \" \").trim() || \"your intent\";\n const boundedTitle = normalizedTitle.length > POOL_QUESTION_PUSH_TITLE_MAX_CHARS\n ? `${normalizedTitle.slice(0, POOL_QUESTION_PUSH_TITLE_MAX_CHARS - 1)}…`\n : normalizedTitle;\n return `Quick one about [${escapePoolPushMarkdown(boundedTitle)}](/i/${input.intentId}): ${escapePoolPushMarkdown(input.questionPrompt)}`;\n}\n"]}
|
|
@@ -471,7 +471,55 @@ export declare const QuestionPoolSnapshotSchema: z.ZodObject<{
|
|
|
471
471
|
intentText?: string | undefined;
|
|
472
472
|
intentFingerprint?: string | undefined;
|
|
473
473
|
}>;
|
|
474
|
-
|
|
474
|
+
/** Internal delivery ledger for proactive pool-question pushes (IND-421). */
|
|
475
|
+
export declare const QuestionPoolPushSchema: z.ZodObject<{
|
|
476
|
+
version: z.ZodLiteral<1>;
|
|
477
|
+
source: z.ZodLiteral<"pool_discovery">;
|
|
478
|
+
recipientId: z.ZodString;
|
|
479
|
+
intentId: z.ZodString;
|
|
480
|
+
cycleKey: z.ZodString;
|
|
481
|
+
messageId: z.ZodString;
|
|
482
|
+
surfaces: z.ZodTuple<[z.ZodLiteral<"personal_agent_badge">, z.ZodLiteral<"negotiator_dm">], null>;
|
|
483
|
+
claimedAt: z.ZodString;
|
|
484
|
+
deliveryStatus: z.ZodEnum<["claimed", "delivered", "suppressed", "failed"]>;
|
|
485
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
486
|
+
deliveredAt: z.ZodOptional<z.ZodString>;
|
|
487
|
+
suppressedAt: z.ZodOptional<z.ZodString>;
|
|
488
|
+
failure: z.ZodOptional<z.ZodString>;
|
|
489
|
+
}, "strip", z.ZodTypeAny, {
|
|
490
|
+
source: "pool_discovery";
|
|
491
|
+
version: 1;
|
|
492
|
+
recipientId: string;
|
|
493
|
+
intentId: string;
|
|
494
|
+
cycleKey: string;
|
|
495
|
+
messageId: string;
|
|
496
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
497
|
+
claimedAt: string;
|
|
498
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
499
|
+
conversationId?: string | undefined;
|
|
500
|
+
deliveredAt?: string | undefined;
|
|
501
|
+
suppressedAt?: string | undefined;
|
|
502
|
+
failure?: string | undefined;
|
|
503
|
+
}, {
|
|
504
|
+
source: "pool_discovery";
|
|
505
|
+
version: 1;
|
|
506
|
+
recipientId: string;
|
|
507
|
+
intentId: string;
|
|
508
|
+
cycleKey: string;
|
|
509
|
+
messageId: string;
|
|
510
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
511
|
+
claimedAt: string;
|
|
512
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
513
|
+
conversationId?: string | undefined;
|
|
514
|
+
deliveredAt?: string | undefined;
|
|
515
|
+
suppressedAt?: string | undefined;
|
|
516
|
+
failure?: string | undefined;
|
|
517
|
+
}>;
|
|
518
|
+
/** Durable request state for proactive pool-question delivery. */
|
|
519
|
+
export declare const QuestionPoolPushRequestStatusSchema: z.ZodEnum<["requested", "suppressed"]>;
|
|
520
|
+
/** Permanent reasons that terminalize an unclaimed proactive push request. */
|
|
521
|
+
export declare const QuestionPoolPushRequestReasonSchema: z.ZodEnum<["question_lifecycle", "intent_lifecycle", "malformed_source", "malformed_actor", "malformed_pool", "malformed_cycle", "visited", "pool_size", "voi", "cycle_budget"]>;
|
|
522
|
+
export declare const QuestionDetectionSchema: z.ZodEffects<z.ZodObject<{
|
|
475
523
|
/** Which preset mode generated this question. */
|
|
476
524
|
mode: z.ZodEnum<["discovery", "intent", "enrichment", "negotiation", "negotiation_inflight", "chat", "pool_discovery"]>;
|
|
477
525
|
/** Internal reason for generation; independent of mode and QUD repair metadata. */
|
|
@@ -675,16 +723,87 @@ export declare const QuestionDetectionSchema: z.ZodObject<{
|
|
|
675
723
|
intentText?: string | undefined;
|
|
676
724
|
intentFingerprint?: string | undefined;
|
|
677
725
|
}>>;
|
|
726
|
+
/** Durable request marker written before enqueueing proactive delivery. Internal only. */
|
|
727
|
+
pushRequestedAt: z.ZodOptional<z.ZodString>;
|
|
728
|
+
/** Last bounded recovery sweep that selected this request. Internal only. */
|
|
729
|
+
pushRecoveryAttemptedAt: z.ZodOptional<z.ZodString>;
|
|
730
|
+
/** Durable request outcome. Internal only. */
|
|
731
|
+
pushRequestStatus: z.ZodOptional<z.ZodEnum<["requested", "suppressed"]>>;
|
|
732
|
+
/** Permanent suppression reason for an unclaimed request. Internal only. */
|
|
733
|
+
pushRequestReason: z.ZodOptional<z.ZodEnum<["question_lifecycle", "intent_lifecycle", "malformed_source", "malformed_actor", "malformed_pool", "malformed_cycle", "visited", "pool_size", "voi", "cycle_budget"]>>;
|
|
734
|
+
/** ISO-8601 timestamp at which an unclaimed request was suppressed. Internal only. */
|
|
735
|
+
pushRequestSuppressedAt: z.ZodOptional<z.ZodString>;
|
|
736
|
+
/** Internal proactive delivery state. Never serialize to public clients. */
|
|
737
|
+
push: z.ZodOptional<z.ZodObject<{
|
|
738
|
+
version: z.ZodLiteral<1>;
|
|
739
|
+
source: z.ZodLiteral<"pool_discovery">;
|
|
740
|
+
recipientId: z.ZodString;
|
|
741
|
+
intentId: z.ZodString;
|
|
742
|
+
cycleKey: z.ZodString;
|
|
743
|
+
messageId: z.ZodString;
|
|
744
|
+
surfaces: z.ZodTuple<[z.ZodLiteral<"personal_agent_badge">, z.ZodLiteral<"negotiator_dm">], null>;
|
|
745
|
+
claimedAt: z.ZodString;
|
|
746
|
+
deliveryStatus: z.ZodEnum<["claimed", "delivered", "suppressed", "failed"]>;
|
|
747
|
+
conversationId: z.ZodOptional<z.ZodString>;
|
|
748
|
+
deliveredAt: z.ZodOptional<z.ZodString>;
|
|
749
|
+
suppressedAt: z.ZodOptional<z.ZodString>;
|
|
750
|
+
failure: z.ZodOptional<z.ZodString>;
|
|
751
|
+
}, "strip", z.ZodTypeAny, {
|
|
752
|
+
source: "pool_discovery";
|
|
753
|
+
version: 1;
|
|
754
|
+
recipientId: string;
|
|
755
|
+
intentId: string;
|
|
756
|
+
cycleKey: string;
|
|
757
|
+
messageId: string;
|
|
758
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
759
|
+
claimedAt: string;
|
|
760
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
761
|
+
conversationId?: string | undefined;
|
|
762
|
+
deliveredAt?: string | undefined;
|
|
763
|
+
suppressedAt?: string | undefined;
|
|
764
|
+
failure?: string | undefined;
|
|
765
|
+
}, {
|
|
766
|
+
source: "pool_discovery";
|
|
767
|
+
version: 1;
|
|
768
|
+
recipientId: string;
|
|
769
|
+
intentId: string;
|
|
770
|
+
cycleKey: string;
|
|
771
|
+
messageId: string;
|
|
772
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
773
|
+
claimedAt: string;
|
|
774
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
775
|
+
conversationId?: string | undefined;
|
|
776
|
+
deliveredAt?: string | undefined;
|
|
777
|
+
suppressedAt?: string | undefined;
|
|
778
|
+
failure?: string | undefined;
|
|
779
|
+
}>>;
|
|
780
|
+
/** Authoritative successful-delivery ledger timestamp. Internal only. */
|
|
781
|
+
pushedAt: z.ZodOptional<z.ZodString>;
|
|
678
782
|
}, "strip", z.ZodTypeAny, {
|
|
679
783
|
mode: "intent" | "chat" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
680
784
|
sourceType: string;
|
|
681
785
|
sourceId: string;
|
|
682
786
|
timestamp: string;
|
|
787
|
+
push?: {
|
|
788
|
+
source: "pool_discovery";
|
|
789
|
+
version: 1;
|
|
790
|
+
recipientId: string;
|
|
791
|
+
intentId: string;
|
|
792
|
+
cycleKey: string;
|
|
793
|
+
messageId: string;
|
|
794
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
795
|
+
claimedAt: string;
|
|
796
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
797
|
+
conversationId?: string | undefined;
|
|
798
|
+
deliveredAt?: string | undefined;
|
|
799
|
+
suppressedAt?: string | undefined;
|
|
800
|
+
failure?: string | undefined;
|
|
801
|
+
} | undefined;
|
|
683
802
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
684
803
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
804
|
+
messageId?: string | undefined;
|
|
685
805
|
purpose?: "uptake" | undefined;
|
|
686
806
|
triggeredBy?: string | undefined;
|
|
687
|
-
messageId?: string | undefined;
|
|
688
807
|
pool?: {
|
|
689
808
|
poolSize: number;
|
|
690
809
|
minedAt: string;
|
|
@@ -720,16 +839,169 @@ export declare const QuestionDetectionSchema: z.ZodObject<{
|
|
|
720
839
|
intentText?: string | undefined;
|
|
721
840
|
intentFingerprint?: string | undefined;
|
|
722
841
|
} | undefined;
|
|
842
|
+
pushRequestedAt?: string | undefined;
|
|
843
|
+
pushRecoveryAttemptedAt?: string | undefined;
|
|
844
|
+
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
845
|
+
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
846
|
+
pushRequestSuppressedAt?: string | undefined;
|
|
847
|
+
pushedAt?: string | undefined;
|
|
723
848
|
}, {
|
|
724
849
|
mode: "intent" | "chat" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
725
850
|
sourceType: string;
|
|
726
851
|
sourceId: string;
|
|
727
852
|
timestamp: string;
|
|
853
|
+
push?: {
|
|
854
|
+
source: "pool_discovery";
|
|
855
|
+
version: 1;
|
|
856
|
+
recipientId: string;
|
|
857
|
+
intentId: string;
|
|
858
|
+
cycleKey: string;
|
|
859
|
+
messageId: string;
|
|
860
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
861
|
+
claimedAt: string;
|
|
862
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
863
|
+
conversationId?: string | undefined;
|
|
864
|
+
deliveredAt?: string | undefined;
|
|
865
|
+
suppressedAt?: string | undefined;
|
|
866
|
+
failure?: string | undefined;
|
|
867
|
+
} | undefined;
|
|
728
868
|
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
729
869
|
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
870
|
+
messageId?: string | undefined;
|
|
730
871
|
purpose?: "uptake" | undefined;
|
|
731
872
|
triggeredBy?: string | undefined;
|
|
873
|
+
pool?: {
|
|
874
|
+
poolSize: number;
|
|
875
|
+
minedAt: string;
|
|
876
|
+
discriminator: {
|
|
877
|
+
label: string;
|
|
878
|
+
questionSeed: string;
|
|
879
|
+
sides: string[];
|
|
880
|
+
sideCounts: Record<string, number>;
|
|
881
|
+
voi: number;
|
|
882
|
+
evidenceRate: number;
|
|
883
|
+
assignments: {
|
|
884
|
+
opportunityId: string;
|
|
885
|
+
side: string;
|
|
886
|
+
}[];
|
|
887
|
+
embedding?: number[] | undefined;
|
|
888
|
+
embeddingModel?: string | undefined;
|
|
889
|
+
};
|
|
890
|
+
alternates: {
|
|
891
|
+
label: string;
|
|
892
|
+
questionSeed: string;
|
|
893
|
+
sides: string[];
|
|
894
|
+
sideCounts: Record<string, number>;
|
|
895
|
+
voi: number;
|
|
896
|
+
evidenceRate: number;
|
|
897
|
+
assignments: {
|
|
898
|
+
opportunityId: string;
|
|
899
|
+
side: string;
|
|
900
|
+
}[];
|
|
901
|
+
embedding?: number[] | undefined;
|
|
902
|
+
embeddingModel?: string | undefined;
|
|
903
|
+
}[];
|
|
904
|
+
runId?: string | undefined;
|
|
905
|
+
intentText?: string | undefined;
|
|
906
|
+
intentFingerprint?: string | undefined;
|
|
907
|
+
} | undefined;
|
|
908
|
+
pushRequestedAt?: string | undefined;
|
|
909
|
+
pushRecoveryAttemptedAt?: string | undefined;
|
|
910
|
+
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
911
|
+
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
912
|
+
pushRequestSuppressedAt?: string | undefined;
|
|
913
|
+
pushedAt?: string | undefined;
|
|
914
|
+
}>, {
|
|
915
|
+
mode: "intent" | "chat" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
916
|
+
sourceType: string;
|
|
917
|
+
sourceId: string;
|
|
918
|
+
timestamp: string;
|
|
919
|
+
push?: {
|
|
920
|
+
source: "pool_discovery";
|
|
921
|
+
version: 1;
|
|
922
|
+
recipientId: string;
|
|
923
|
+
intentId: string;
|
|
924
|
+
cycleKey: string;
|
|
925
|
+
messageId: string;
|
|
926
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
927
|
+
claimedAt: string;
|
|
928
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
929
|
+
conversationId?: string | undefined;
|
|
930
|
+
deliveredAt?: string | undefined;
|
|
931
|
+
suppressedAt?: string | undefined;
|
|
932
|
+
failure?: string | undefined;
|
|
933
|
+
} | undefined;
|
|
934
|
+
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
935
|
+
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
936
|
+
messageId?: string | undefined;
|
|
937
|
+
purpose?: "uptake" | undefined;
|
|
938
|
+
triggeredBy?: string | undefined;
|
|
939
|
+
pool?: {
|
|
940
|
+
poolSize: number;
|
|
941
|
+
minedAt: string;
|
|
942
|
+
discriminator: {
|
|
943
|
+
label: string;
|
|
944
|
+
questionSeed: string;
|
|
945
|
+
sides: string[];
|
|
946
|
+
sideCounts: Record<string, number>;
|
|
947
|
+
voi: number;
|
|
948
|
+
evidenceRate: number;
|
|
949
|
+
assignments: {
|
|
950
|
+
opportunityId: string;
|
|
951
|
+
side: string;
|
|
952
|
+
}[];
|
|
953
|
+
embedding?: number[] | undefined;
|
|
954
|
+
embeddingModel?: string | undefined;
|
|
955
|
+
};
|
|
956
|
+
alternates: {
|
|
957
|
+
label: string;
|
|
958
|
+
questionSeed: string;
|
|
959
|
+
sides: string[];
|
|
960
|
+
sideCounts: Record<string, number>;
|
|
961
|
+
voi: number;
|
|
962
|
+
evidenceRate: number;
|
|
963
|
+
assignments: {
|
|
964
|
+
opportunityId: string;
|
|
965
|
+
side: string;
|
|
966
|
+
}[];
|
|
967
|
+
embedding?: number[] | undefined;
|
|
968
|
+
embeddingModel?: string | undefined;
|
|
969
|
+
}[];
|
|
970
|
+
runId?: string | undefined;
|
|
971
|
+
intentText?: string | undefined;
|
|
972
|
+
intentFingerprint?: string | undefined;
|
|
973
|
+
} | undefined;
|
|
974
|
+
pushRequestedAt?: string | undefined;
|
|
975
|
+
pushRecoveryAttemptedAt?: string | undefined;
|
|
976
|
+
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
977
|
+
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
978
|
+
pushRequestSuppressedAt?: string | undefined;
|
|
979
|
+
pushedAt?: string | undefined;
|
|
980
|
+
}, {
|
|
981
|
+
mode: "intent" | "chat" | "enrichment" | "discovery" | "negotiation" | "negotiation_inflight" | "pool_discovery";
|
|
982
|
+
sourceType: string;
|
|
983
|
+
sourceId: string;
|
|
984
|
+
timestamp: string;
|
|
985
|
+
push?: {
|
|
986
|
+
source: "pool_discovery";
|
|
987
|
+
version: 1;
|
|
988
|
+
recipientId: string;
|
|
989
|
+
intentId: string;
|
|
990
|
+
cycleKey: string;
|
|
991
|
+
messageId: string;
|
|
992
|
+
surfaces: ["personal_agent_badge", "negotiator_dm"];
|
|
993
|
+
claimedAt: string;
|
|
994
|
+
deliveryStatus: "failed" | "claimed" | "delivered" | "suppressed";
|
|
995
|
+
conversationId?: string | undefined;
|
|
996
|
+
deliveredAt?: string | undefined;
|
|
997
|
+
suppressedAt?: string | undefined;
|
|
998
|
+
failure?: string | undefined;
|
|
999
|
+
} | undefined;
|
|
1000
|
+
strategy?: "refine_intent" | "surface_missing_detail" | "open_adjacent_thread" | "reflective_summary" | "surface_emergent_knowledge" | undefined;
|
|
1001
|
+
underspecificationType?: "missing_constituent" | "missing_constraint" | "open_alternative_set" | null | undefined;
|
|
732
1002
|
messageId?: string | undefined;
|
|
1003
|
+
purpose?: "uptake" | undefined;
|
|
1004
|
+
triggeredBy?: string | undefined;
|
|
733
1005
|
pool?: {
|
|
734
1006
|
poolSize: number;
|
|
735
1007
|
minedAt: string;
|
|
@@ -765,6 +1037,12 @@ export declare const QuestionDetectionSchema: z.ZodObject<{
|
|
|
765
1037
|
intentText?: string | undefined;
|
|
766
1038
|
intentFingerprint?: string | undefined;
|
|
767
1039
|
} | undefined;
|
|
1040
|
+
pushRequestedAt?: string | undefined;
|
|
1041
|
+
pushRecoveryAttemptedAt?: string | undefined;
|
|
1042
|
+
pushRequestStatus?: "suppressed" | "requested" | undefined;
|
|
1043
|
+
pushRequestReason?: "voi" | "question_lifecycle" | "intent_lifecycle" | "malformed_source" | "malformed_actor" | "malformed_pool" | "malformed_cycle" | "visited" | "pool_size" | "cycle_budget" | undefined;
|
|
1044
|
+
pushRequestSuppressedAt?: string | undefined;
|
|
1045
|
+
pushedAt?: string | undefined;
|
|
768
1046
|
}>;
|
|
769
1047
|
export declare const QuestionActorSchema: z.ZodObject<{
|
|
770
1048
|
/** The user this question is for. */
|
|
@@ -810,4 +1088,7 @@ export type QuestionAnswer = z.infer<typeof QuestionAnswerSchema>;
|
|
|
810
1088
|
export type QuestionPoolAssignment = z.infer<typeof QuestionPoolAssignmentSchema>;
|
|
811
1089
|
export type QuestionPoolDiscriminator = z.infer<typeof QuestionPoolDiscriminatorSchema>;
|
|
812
1090
|
export type QuestionPoolSnapshot = z.infer<typeof QuestionPoolSnapshotSchema>;
|
|
1091
|
+
export type QuestionPoolPush = z.infer<typeof QuestionPoolPushSchema>;
|
|
1092
|
+
export type QuestionPoolPushRequestStatus = z.infer<typeof QuestionPoolPushRequestStatusSchema>;
|
|
1093
|
+
export type QuestionPoolPushRequestReason = z.infer<typeof QuestionPoolPushRequestReasonSchema>;
|
|
813
1094
|
//# sourceMappingURL=question.schema.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.schema.d.ts","sourceRoot":"/","sources":["shared/schemas/question.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,oBAAoB;IAC/B,+EAA+E;;IAE/E,iFAAiF;;;;;;;;EAEjF,CAAC;AAEH,eAAO,MAAM,cAAc;IACzB,+EAA+E;;IAE/E,yDAAyD;;IAEzD,6EAA6E;;QAX7E,+EAA+E;;QAE/E,iFAAiF;;;;;;;;;IAWjF,0EAA0E;;IAE1E;;;;OAIG;;;;;;;;;;;;;;;;;;;;EAEH,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,4BAA4B,kFAIvC,CAAC;AAEH,eAAO,MAAM,sBAAsB,oIAMjC,CAAC;AAEH,eAAO,MAAM,0BAA0B;IA/BrC,+EAA+E;;IAE/E,yDAAyD;;IAEzD,6EAA6E;;QAX7E,+EAA+E;;QAE/E,iFAAiF;;;;;;;;;IAWjF,0EAA0E;;IAE1E;;;;OAIG;;;;IAqBH,0FAA0F;;;;;;;;;;;;;;;;;;;;;;;;EAE1F,CAAC;AAEH,eAAO,MAAM,+BAA+B;;QArC1C,+EAA+E;;QAE/E,yDAAyD;;QAEzD,6EAA6E;;YAX7E,+EAA+E;;YAE/E,iFAAiF;;;;;;;;;Q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MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAClE,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,4BAA4B,CAAC,CAAC;AAClF,MAAM,MAAM,yBAAyB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAC;AACxF,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAC9E,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AACtE,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC;AAChG,MAAM,MAAM,6BAA6B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mCAAmC,CAAC,CAAC"}
|
|
@@ -111,6 +111,40 @@ export const QuestionPoolSnapshotSchema = z.object({
|
|
|
111
111
|
/** Remaining ranked discriminators for interview-mode chaining. */
|
|
112
112
|
alternates: z.array(QuestionPoolDiscriminatorSchema),
|
|
113
113
|
});
|
|
114
|
+
/** Internal delivery ledger for proactive pool-question pushes (IND-421). */
|
|
115
|
+
export const QuestionPoolPushSchema = z.object({
|
|
116
|
+
version: z.literal(1),
|
|
117
|
+
source: z.literal("pool_discovery"),
|
|
118
|
+
recipientId: z.string().min(1),
|
|
119
|
+
intentId: z.string().min(1),
|
|
120
|
+
cycleKey: z.string().min(1),
|
|
121
|
+
messageId: z.string().min(1),
|
|
122
|
+
surfaces: z.tuple([
|
|
123
|
+
z.literal("personal_agent_badge"),
|
|
124
|
+
z.literal("negotiator_dm"),
|
|
125
|
+
]),
|
|
126
|
+
claimedAt: z.string().min(1),
|
|
127
|
+
deliveryStatus: z.enum(["claimed", "delivered", "suppressed", "failed"]),
|
|
128
|
+
conversationId: z.string().min(1).optional(),
|
|
129
|
+
deliveredAt: z.string().min(1).optional(),
|
|
130
|
+
suppressedAt: z.string().min(1).optional(),
|
|
131
|
+
failure: z.string().min(1).max(500).optional(),
|
|
132
|
+
});
|
|
133
|
+
/** Durable request state for proactive pool-question delivery. */
|
|
134
|
+
export const QuestionPoolPushRequestStatusSchema = z.enum(["requested", "suppressed"]);
|
|
135
|
+
/** Permanent reasons that terminalize an unclaimed proactive push request. */
|
|
136
|
+
export const QuestionPoolPushRequestReasonSchema = z.enum([
|
|
137
|
+
"question_lifecycle",
|
|
138
|
+
"intent_lifecycle",
|
|
139
|
+
"malformed_source",
|
|
140
|
+
"malformed_actor",
|
|
141
|
+
"malformed_pool",
|
|
142
|
+
"malformed_cycle",
|
|
143
|
+
"visited",
|
|
144
|
+
"pool_size",
|
|
145
|
+
"voi",
|
|
146
|
+
"cycle_budget",
|
|
147
|
+
]);
|
|
114
148
|
export const QuestionDetectionSchema = z.object({
|
|
115
149
|
/** Which preset mode generated this question. */
|
|
116
150
|
mode: QuestionModeSchema,
|
|
@@ -135,6 +169,59 @@ export const QuestionDetectionSchema = z.object({
|
|
|
135
169
|
* INTERNAL — stripped from every client-facing read (web + MCP).
|
|
136
170
|
*/
|
|
137
171
|
pool: QuestionPoolSnapshotSchema.optional(),
|
|
172
|
+
/** Durable request marker written before enqueueing proactive delivery. Internal only. */
|
|
173
|
+
pushRequestedAt: z.string().min(1).optional(),
|
|
174
|
+
/** Last bounded recovery sweep that selected this request. Internal only. */
|
|
175
|
+
pushRecoveryAttemptedAt: z.string().min(1).optional(),
|
|
176
|
+
/** Durable request outcome. Internal only. */
|
|
177
|
+
pushRequestStatus: QuestionPoolPushRequestStatusSchema.optional(),
|
|
178
|
+
/** Permanent suppression reason for an unclaimed request. Internal only. */
|
|
179
|
+
pushRequestReason: QuestionPoolPushRequestReasonSchema.optional(),
|
|
180
|
+
/** ISO-8601 timestamp at which an unclaimed request was suppressed. Internal only. */
|
|
181
|
+
pushRequestSuppressedAt: z.string().min(1).optional(),
|
|
182
|
+
/** Internal proactive delivery state. Never serialize to public clients. */
|
|
183
|
+
push: QuestionPoolPushSchema.optional(),
|
|
184
|
+
/** Authoritative successful-delivery ledger timestamp. Internal only. */
|
|
185
|
+
pushedAt: z.string().min(1).optional(),
|
|
186
|
+
}).superRefine((detection, ctx) => {
|
|
187
|
+
if (detection.mode === "pool_discovery"
|
|
188
|
+
&& (!detection.triggeredBy?.trim() || detection.triggeredBy !== detection.sourceId)) {
|
|
189
|
+
ctx.addIssue({
|
|
190
|
+
code: z.ZodIssueCode.custom,
|
|
191
|
+
path: ["triggeredBy"],
|
|
192
|
+
message: "pool_discovery triggeredBy must be non-empty and equal sourceId",
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
if (detection.pushRequestStatus && !detection.pushRequestedAt) {
|
|
196
|
+
ctx.addIssue({
|
|
197
|
+
code: z.ZodIssueCode.custom,
|
|
198
|
+
path: ["pushRequestedAt"],
|
|
199
|
+
message: "push request state requires a request timestamp",
|
|
200
|
+
});
|
|
201
|
+
}
|
|
202
|
+
if (detection.pushRecoveryAttemptedAt && !detection.pushRequestedAt) {
|
|
203
|
+
ctx.addIssue({
|
|
204
|
+
code: z.ZodIssueCode.custom,
|
|
205
|
+
path: ["pushRequestedAt"],
|
|
206
|
+
message: "push recovery attempts require a request timestamp",
|
|
207
|
+
});
|
|
208
|
+
}
|
|
209
|
+
if (detection.pushRequestStatus === "suppressed") {
|
|
210
|
+
if (!detection.pushRequestReason) {
|
|
211
|
+
ctx.addIssue({
|
|
212
|
+
code: z.ZodIssueCode.custom,
|
|
213
|
+
path: ["pushRequestReason"],
|
|
214
|
+
message: "suppressed push requests require a reason",
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
if (!detection.pushRequestSuppressedAt) {
|
|
218
|
+
ctx.addIssue({
|
|
219
|
+
code: z.ZodIssueCode.custom,
|
|
220
|
+
path: ["pushRequestSuppressedAt"],
|
|
221
|
+
message: "suppressed push requests require a timestamp",
|
|
222
|
+
});
|
|
223
|
+
}
|
|
224
|
+
}
|
|
138
225
|
});
|
|
139
226
|
export const QuestionActorSchema = z.object({
|
|
140
227
|
/** The user this question is for. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"question.schema.js","sourceRoot":"/","sources":["shared/schemas/question.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,iFAAiF;IACjF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChC,yDAAyD;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,6EAA6E;IAC7E,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,0EAA0E;IAC1E,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,4EAA4E;AAC5E,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C,MAAM,CAAC;IAC1C,qCAAqC;IACrC,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,gCAAgC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,iEAAiE;IACjE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,uCAAuC;IACvC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,+BAA+B;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,2DAA2D;IAC3D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAC","sourcesContent":["/**\n * Question — public structured shape consumed by frontend renderers and MCP\n * elicitation dispatch. Mirrors the brainstorming AskUserQuestion skill so a\n * Question can be rendered identically across surfaces.\n *\n * `QuestionWithStrategy` extends the public shape with internal `strategy`\n * and QUD underspecification tags used by generator guardrails and persisted\n * metadata. Both tags are stripped before the public payload leaves the\n * generator — users never see them.\n */\nimport { z } from \"zod\";\n\nexport const QuestionOptionSchema = z.object({\n /** Display text. Suffix \" (Recommended)\" on the safest path; list it first. */\n label: z.string().min(1).max(120),\n /** Explains the consequence of choosing this option, not just its definition. */\n description: z.string().min(1).max(280),\n});\n\nexport const QuestionSchema = z.object({\n /** ≤12 chars. Noun of the decision domain — e.g. \"Stage\", \"Timing\", \"Role\". */\n title: z.string().min(1).max(12),\n /** ≤2 sentences, ≤400 chars. Ends in a question mark. */\n prompt: z.string().min(1).max(400),\n /** 2–4 options. No explicit \"Other\" — clients provide that automatically. */\n options: z.array(QuestionOptionSchema).min(2).max(4),\n /** True when options are not mutually exclusive (priorities, bundles). */\n multiSelect: z.boolean(),\n /**\n * Optional provenance line rendered as a muted chip above the prompt\n * (e.g. \"based on 18 people matching this intent\"). Aggregate counts only —\n * never individual identities (pool_discovery k-anonymity invariant).\n */\n evidence: z.string().min(1).max(160).optional(),\n});\n\n/** Canonical QUD repair categories for underspecified intents/questions. */\nexport const UnderspecificationTypeSchema = z.enum([\n \"missing_constituent\",\n \"missing_constraint\",\n \"open_alternative_set\",\n]);\n\nexport const QuestionStrategySchema = z.enum([\n \"refine_intent\",\n \"surface_missing_detail\",\n \"open_adjacent_thread\",\n \"reflective_summary\",\n \"surface_emergent_knowledge\",\n]);\n\nexport const QuestionWithStrategySchema = QuestionSchema.extend({\n strategy: QuestionStrategySchema,\n /** QUD repair category, or null when the question is not an underspecification repair. */\n underspecificationType: UnderspecificationTypeSchema.nullable(),\n});\n\nexport const QuestionGeneratorResponseSchema = z.object({\n questions: z.array(QuestionWithStrategySchema).max(3),\n});\n\nexport type QuestionOption = z.infer<typeof QuestionOptionSchema>;\nexport type Question = z.infer<typeof QuestionSchema>;\nexport type UnderspecificationType = z.infer<typeof UnderspecificationTypeSchema>;\nexport type QuestionStrategy = z.infer<typeof QuestionStrategySchema>;\nexport type QuestionWithStrategy = z.infer<typeof QuestionWithStrategySchema>;\nexport type QuestionGeneratorResponse = z.infer<typeof QuestionGeneratorResponseSchema>;\n\n/**\n * Internal generator output: public questions plus parallel strategy and QUD\n * taxonomy arrays for metadata-only consumption. The generator emits this;\n * callers forward only `questions` to renderers.\n */\nexport interface QuestionGenerationResult {\n questions: Question[];\n strategies: QuestionStrategy[];\n underspecificationTypes: Array<UnderspecificationType | null>;\n}\n\n// ─── Persistence types (opportunity-style composable jsonb) ──────────────────\n\n/** Internal reason a question was generated, orthogonal to mode and QUD metadata. */\nexport const QuestionPurposeSchema = z.enum([\"uptake\"]);\n\nexport const QuestionModeSchema = z.enum([\n \"discovery\",\n \"intent\",\n \"enrichment\",\n \"negotiation\",\n // Negotiator-initiated mid-negotiation client questions (ask_user action, P3).\n // Distinct from \"negotiation\", which covers post-stall questions only.\n \"negotiation_inflight\",\n // Orchestrator-initiated mid-conversation questions (ask_user_question tool).\n \"chat\",\n // Pool-discriminator questions mined from the intent's candidate pool\n // (IND-418). Synthesized deterministically — no generator LLM call.\n \"pool_discovery\",\n]);\n\n/** One server-side candidate→side assignment (never serialized to clients). */\nexport const QuestionPoolAssignmentSchema = z.object({\n opportunityId: z.string().min(1),\n side: z.string().min(1),\n});\n\n/**\n * One mined discriminator carried inside a pool_discovery question's\n * detection (the asked one plus ranked alternates for interview-mode\n * chaining). INTERNAL — the read path strips `detection.pool` before any\n * payload leaves the server.\n */\nexport const QuestionPoolDiscriminatorSchema = z.object({\n label: z.string().min(1),\n questionSeed: z.string().min(1),\n sides: z.array(z.string().min(1)).min(2).max(3),\n /** Verified-assignment count per side label. */\n sideCounts: z.record(z.string(), z.number()),\n voi: z.number(),\n evidenceRate: z.number(),\n /** Discriminator embedding retained for durable semantic novelty checks. */\n embedding: z.array(z.number().finite()).min(1).max(4096).optional(),\n /** Model that generated `embedding`; mismatches must fall back to text. */\n embeddingModel: z.string().min(1).optional(),\n /** Verified assignments only — the P3 re-rank input. */\n assignments: z.array(QuestionPoolAssignmentSchema),\n});\n\n/** Pool snapshot stored on pool_discovery questions (server-side only). */\nexport const QuestionPoolSnapshotSchema = z.object({\n poolSize: z.number().int().min(0),\n /** ISO-8601 timestamp of the mining pass. */\n minedAt: z.string().min(1),\n /** Discovery run that produced the pool, when known. */\n runId: z.string().optional(),\n /** Intent payload snippet (≤160 chars) — reused by chained questions' evidence chips. */\n intentText: z.string().optional(),\n /** Stable hash of the full normalized payload + summary used for freshness. */\n intentFingerprint: z.string().min(1).optional(),\n /** The discriminator this question asks about. */\n discriminator: QuestionPoolDiscriminatorSchema,\n /** Remaining ranked discriminators for interview-mode chaining. */\n alternates: z.array(QuestionPoolDiscriminatorSchema),\n});\n\nexport const QuestionDetectionSchema = z.object({\n /** Which preset mode generated this question. */\n mode: QuestionModeSchema,\n /** Internal reason for generation; independent of mode and QUD repair metadata. */\n purpose: QuestionPurposeSchema.optional(),\n /** Entity type that triggered generation (e.g. \"opportunity\", \"intent\", \"profile\"). */\n sourceType: z.string().min(1),\n /** ID of the triggering entity. */\n sourceId: z.string().min(1),\n /** Optional intent ID that was the root cause. */\n triggeredBy: z.string().optional(),\n /** ISO-8601 timestamp of generation. */\n timestamp: z.string().min(1),\n /** Generation strategy persisted as internal metadata. */\n strategy: QuestionStrategySchema.optional(),\n /** QUD repair category persisted as internal metadata. */\n underspecificationType: UnderspecificationTypeSchema.nullable().optional(),\n /** ID of the assistant message that triggered this question. Used by the frontend to anchor the question card inline. */\n messageId: z.string().optional(),\n /**\n * pool_discovery only: the mined pool snapshot (assignments + alternates).\n * INTERNAL — stripped from every client-facing read (web + MCP).\n */\n pool: QuestionPoolSnapshotSchema.optional(),\n});\n\nexport const QuestionActorSchema = z.object({\n /** The user this question is for. */\n userId: z.string().min(1),\n /** Optional network context. */\n networkId: z.string().optional(),\n /** Actor's role in the question — currently always \"subject\". */\n role: z.literal(\"subject\"),\n});\n\nexport const QuestionAnswerSchema = z.object({\n /** Option labels the user selected. */\n selectedOptions: z.array(z.string()),\n /** Free-text input when the user chose \"Other\" or elaborated. */\n freeText: z.string().optional(),\n /** User ID of the answerer. */\n answeredBy: z.string().min(1),\n /** ISO-8601 timestamp of when the answer was submitted. */\n answeredAt: z.string().min(1),\n});\n\nexport type QuestionPurpose = z.infer<typeof QuestionPurposeSchema>;\nexport type QuestionMode = z.infer<typeof QuestionModeSchema>;\nexport type QuestionDetection = z.infer<typeof QuestionDetectionSchema>;\nexport type QuestionActor = z.infer<typeof QuestionActorSchema>;\nexport type QuestionAnswer = z.infer<typeof QuestionAnswerSchema>;\nexport type QuestionPoolAssignment = z.infer<typeof QuestionPoolAssignmentSchema>;\nexport type QuestionPoolDiscriminator = z.infer<typeof QuestionPoolDiscriminatorSchema>;\nexport type QuestionPoolSnapshot = z.infer<typeof QuestionPoolSnapshotSchema>;\n"]}
|
|
1
|
+
{"version":3,"file":"question.schema.js","sourceRoot":"/","sources":["shared/schemas/question.schema.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AACH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IACjC,iFAAiF;IACjF,WAAW,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;CACxC,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,+EAA+E;IAC/E,KAAK,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,EAAE,CAAC;IAChC,yDAAyD;IACzD,MAAM,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC;IAClC,6EAA6E;IAC7E,OAAO,EAAE,CAAC,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC;IACpD,0EAA0E;IAC1E,WAAW,EAAE,CAAC,CAAC,OAAO,EAAE;IACxB;;;;OAIG;IACH,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE;CAChD,CAAC,CAAC;AAEH,4EAA4E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CAAC,GAAG,CAAC,CAAC,CAAC;IACzB,gCAAgC;IAChC,SAAS,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAChC,iEAAiE;IACjE,IAAI,EAAE,CAAC,CAAC,OAAO,CAAC,SAAS,CAAC;CAC3B,CAAC,CAAC;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC;IAC3C,uCAAuC;IACvC,eAAe,EAAE,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,EAAE,CAAC;IACpC,iEAAiE;IACjE,QAAQ,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;IAC/B,+BAA+B;IAC/B,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;IAC7B,2DAA2D;IAC3D,UAAU,EAAE,CAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,CAAC;CAC9B,CAAC,CAAC","sourcesContent":["/**\n * Question — public structured shape consumed by frontend renderers and MCP\n * elicitation dispatch. Mirrors the brainstorming AskUserQuestion skill so a\n * Question can be rendered identically across surfaces.\n *\n * `QuestionWithStrategy` extends the public shape with internal `strategy`\n * and QUD underspecification tags used by generator guardrails and persisted\n * metadata. Both tags are stripped before the public payload leaves the\n * generator — users never see them.\n */\nimport { z } from \"zod\";\n\nexport const QuestionOptionSchema = z.object({\n /** Display text. Suffix \" (Recommended)\" on the safest path; list it first. */\n label: z.string().min(1).max(120),\n /** Explains the consequence of choosing this option, not just its definition. */\n description: z.string().min(1).max(280),\n});\n\nexport const QuestionSchema = z.object({\n /** ≤12 chars. Noun of the decision domain — e.g. \"Stage\", \"Timing\", \"Role\". */\n title: z.string().min(1).max(12),\n /** ≤2 sentences, ≤400 chars. Ends in a question mark. */\n prompt: z.string().min(1).max(400),\n /** 2–4 options. No explicit \"Other\" — clients provide that automatically. */\n options: z.array(QuestionOptionSchema).min(2).max(4),\n /** True when options are not mutually exclusive (priorities, bundles). */\n multiSelect: z.boolean(),\n /**\n * Optional provenance line rendered as a muted chip above the prompt\n * (e.g. \"based on 18 people matching this intent\"). Aggregate counts only —\n * never individual identities (pool_discovery k-anonymity invariant).\n */\n evidence: z.string().min(1).max(160).optional(),\n});\n\n/** Canonical QUD repair categories for underspecified intents/questions. */\nexport const UnderspecificationTypeSchema = z.enum([\n \"missing_constituent\",\n \"missing_constraint\",\n \"open_alternative_set\",\n]);\n\nexport const QuestionStrategySchema = z.enum([\n \"refine_intent\",\n \"surface_missing_detail\",\n \"open_adjacent_thread\",\n \"reflective_summary\",\n \"surface_emergent_knowledge\",\n]);\n\nexport const QuestionWithStrategySchema = QuestionSchema.extend({\n strategy: QuestionStrategySchema,\n /** QUD repair category, or null when the question is not an underspecification repair. */\n underspecificationType: UnderspecificationTypeSchema.nullable(),\n});\n\nexport const QuestionGeneratorResponseSchema = z.object({\n questions: z.array(QuestionWithStrategySchema).max(3),\n});\n\nexport type QuestionOption = z.infer<typeof QuestionOptionSchema>;\nexport type Question = z.infer<typeof QuestionSchema>;\nexport type UnderspecificationType = z.infer<typeof UnderspecificationTypeSchema>;\nexport type QuestionStrategy = z.infer<typeof QuestionStrategySchema>;\nexport type QuestionWithStrategy = z.infer<typeof QuestionWithStrategySchema>;\nexport type QuestionGeneratorResponse = z.infer<typeof QuestionGeneratorResponseSchema>;\n\n/**\n * Internal generator output: public questions plus parallel strategy and QUD\n * taxonomy arrays for metadata-only consumption. The generator emits this;\n * callers forward only `questions` to renderers.\n */\nexport interface QuestionGenerationResult {\n questions: Question[];\n strategies: QuestionStrategy[];\n underspecificationTypes: Array<UnderspecificationType | null>;\n}\n\n// ─── Persistence types (opportunity-style composable jsonb) ──────────────────\n\n/** Internal reason a question was generated, orthogonal to mode and QUD metadata. */\nexport const QuestionPurposeSchema = z.enum([\"uptake\"]);\n\nexport const QuestionModeSchema = z.enum([\n \"discovery\",\n \"intent\",\n \"enrichment\",\n \"negotiation\",\n // Negotiator-initiated mid-negotiation client questions (ask_user action, P3).\n // Distinct from \"negotiation\", which covers post-stall questions only.\n \"negotiation_inflight\",\n // Orchestrator-initiated mid-conversation questions (ask_user_question tool).\n \"chat\",\n // Pool-discriminator questions mined from the intent's candidate pool\n // (IND-418). Synthesized deterministically — no generator LLM call.\n \"pool_discovery\",\n]);\n\n/** One server-side candidate→side assignment (never serialized to clients). */\nexport const QuestionPoolAssignmentSchema = z.object({\n opportunityId: z.string().min(1),\n side: z.string().min(1),\n});\n\n/**\n * One mined discriminator carried inside a pool_discovery question's\n * detection (the asked one plus ranked alternates for interview-mode\n * chaining). INTERNAL — the read path strips `detection.pool` before any\n * payload leaves the server.\n */\nexport const QuestionPoolDiscriminatorSchema = z.object({\n label: z.string().min(1),\n questionSeed: z.string().min(1),\n sides: z.array(z.string().min(1)).min(2).max(3),\n /** Verified-assignment count per side label. */\n sideCounts: z.record(z.string(), z.number()),\n voi: z.number(),\n evidenceRate: z.number(),\n /** Discriminator embedding retained for durable semantic novelty checks. */\n embedding: z.array(z.number().finite()).min(1).max(4096).optional(),\n /** Model that generated `embedding`; mismatches must fall back to text. */\n embeddingModel: z.string().min(1).optional(),\n /** Verified assignments only — the P3 re-rank input. */\n assignments: z.array(QuestionPoolAssignmentSchema),\n});\n\n/** Pool snapshot stored on pool_discovery questions (server-side only). */\nexport const QuestionPoolSnapshotSchema = z.object({\n poolSize: z.number().int().min(0),\n /** ISO-8601 timestamp of the mining pass. */\n minedAt: z.string().min(1),\n /** Discovery run that produced the pool, when known. */\n runId: z.string().optional(),\n /** Intent payload snippet (≤160 chars) — reused by chained questions' evidence chips. */\n intentText: z.string().optional(),\n /** Stable hash of the full normalized payload + summary used for freshness. */\n intentFingerprint: z.string().min(1).optional(),\n /** The discriminator this question asks about. */\n discriminator: QuestionPoolDiscriminatorSchema,\n /** Remaining ranked discriminators for interview-mode chaining. */\n alternates: z.array(QuestionPoolDiscriminatorSchema),\n});\n\n/** Internal delivery ledger for proactive pool-question pushes (IND-421). */\nexport const QuestionPoolPushSchema = z.object({\n version: z.literal(1),\n source: z.literal(\"pool_discovery\"),\n recipientId: z.string().min(1),\n intentId: z.string().min(1),\n cycleKey: z.string().min(1),\n messageId: z.string().min(1),\n surfaces: z.tuple([\n z.literal(\"personal_agent_badge\"),\n z.literal(\"negotiator_dm\"),\n ]),\n claimedAt: z.string().min(1),\n deliveryStatus: z.enum([\"claimed\", \"delivered\", \"suppressed\", \"failed\"]),\n conversationId: z.string().min(1).optional(),\n deliveredAt: z.string().min(1).optional(),\n suppressedAt: z.string().min(1).optional(),\n failure: z.string().min(1).max(500).optional(),\n});\n\n/** Durable request state for proactive pool-question delivery. */\nexport const QuestionPoolPushRequestStatusSchema = z.enum([\"requested\", \"suppressed\"]);\n\n/** Permanent reasons that terminalize an unclaimed proactive push request. */\nexport const QuestionPoolPushRequestReasonSchema = z.enum([\n \"question_lifecycle\",\n \"intent_lifecycle\",\n \"malformed_source\",\n \"malformed_actor\",\n \"malformed_pool\",\n \"malformed_cycle\",\n \"visited\",\n \"pool_size\",\n \"voi\",\n \"cycle_budget\",\n]);\n\nexport const QuestionDetectionSchema = z.object({\n /** Which preset mode generated this question. */\n mode: QuestionModeSchema,\n /** Internal reason for generation; independent of mode and QUD repair metadata. */\n purpose: QuestionPurposeSchema.optional(),\n /** Entity type that triggered generation (e.g. \"opportunity\", \"intent\", \"profile\"). */\n sourceType: z.string().min(1),\n /** ID of the triggering entity. */\n sourceId: z.string().min(1),\n /** Optional intent ID that was the root cause. */\n triggeredBy: z.string().optional(),\n /** ISO-8601 timestamp of generation. */\n timestamp: z.string().min(1),\n /** Generation strategy persisted as internal metadata. */\n strategy: QuestionStrategySchema.optional(),\n /** QUD repair category persisted as internal metadata. */\n underspecificationType: UnderspecificationTypeSchema.nullable().optional(),\n /** ID of the assistant message that triggered this question. Used by the frontend to anchor the question card inline. */\n messageId: z.string().optional(),\n /**\n * pool_discovery only: the mined pool snapshot (assignments + alternates).\n * INTERNAL — stripped from every client-facing read (web + MCP).\n */\n pool: QuestionPoolSnapshotSchema.optional(),\n /** Durable request marker written before enqueueing proactive delivery. Internal only. */\n pushRequestedAt: z.string().min(1).optional(),\n /** Last bounded recovery sweep that selected this request. Internal only. */\n pushRecoveryAttemptedAt: z.string().min(1).optional(),\n /** Durable request outcome. Internal only. */\n pushRequestStatus: QuestionPoolPushRequestStatusSchema.optional(),\n /** Permanent suppression reason for an unclaimed request. Internal only. */\n pushRequestReason: QuestionPoolPushRequestReasonSchema.optional(),\n /** ISO-8601 timestamp at which an unclaimed request was suppressed. Internal only. */\n pushRequestSuppressedAt: z.string().min(1).optional(),\n /** Internal proactive delivery state. Never serialize to public clients. */\n push: QuestionPoolPushSchema.optional(),\n /** Authoritative successful-delivery ledger timestamp. Internal only. */\n pushedAt: z.string().min(1).optional(),\n}).superRefine((detection, ctx) => {\n if (\n detection.mode === \"pool_discovery\"\n && (!detection.triggeredBy?.trim() || detection.triggeredBy !== detection.sourceId)\n ) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"triggeredBy\"],\n message: \"pool_discovery triggeredBy must be non-empty and equal sourceId\",\n });\n }\n if (detection.pushRequestStatus && !detection.pushRequestedAt) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"pushRequestedAt\"],\n message: \"push request state requires a request timestamp\",\n });\n }\n if (detection.pushRecoveryAttemptedAt && !detection.pushRequestedAt) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"pushRequestedAt\"],\n message: \"push recovery attempts require a request timestamp\",\n });\n }\n if (detection.pushRequestStatus === \"suppressed\") {\n if (!detection.pushRequestReason) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"pushRequestReason\"],\n message: \"suppressed push requests require a reason\",\n });\n }\n if (!detection.pushRequestSuppressedAt) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n path: [\"pushRequestSuppressedAt\"],\n message: \"suppressed push requests require a timestamp\",\n });\n }\n }\n});\n\nexport const QuestionActorSchema = z.object({\n /** The user this question is for. */\n userId: z.string().min(1),\n /** Optional network context. */\n networkId: z.string().optional(),\n /** Actor's role in the question — currently always \"subject\". */\n role: z.literal(\"subject\"),\n});\n\nexport const QuestionAnswerSchema = z.object({\n /** Option labels the user selected. */\n selectedOptions: z.array(z.string()),\n /** Free-text input when the user chose \"Other\" or elaborated. */\n freeText: z.string().optional(),\n /** User ID of the answerer. */\n answeredBy: z.string().min(1),\n /** ISO-8601 timestamp of when the answer was submitted. */\n answeredAt: z.string().min(1),\n});\n\nexport type QuestionPurpose = z.infer<typeof QuestionPurposeSchema>;\nexport type QuestionMode = z.infer<typeof QuestionModeSchema>;\nexport type QuestionDetection = z.infer<typeof QuestionDetectionSchema>;\nexport type QuestionActor = z.infer<typeof QuestionActorSchema>;\nexport type QuestionAnswer = z.infer<typeof QuestionAnswerSchema>;\nexport type QuestionPoolAssignment = z.infer<typeof QuestionPoolAssignmentSchema>;\nexport type QuestionPoolDiscriminator = z.infer<typeof QuestionPoolDiscriminatorSchema>;\nexport type QuestionPoolSnapshot = z.infer<typeof QuestionPoolSnapshotSchema>;\nexport type QuestionPoolPush = z.infer<typeof QuestionPoolPushSchema>;\nexport type QuestionPoolPushRequestStatus = z.infer<typeof QuestionPoolPushRequestStatusSchema>;\nexport type QuestionPoolPushRequestReason = z.infer<typeof QuestionPoolPushRequestReasonSchema>;\n"]}
|