@indexnetwork/protocol 6.12.1-rc.404.1 → 6.14.0-rc.406.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 +249 -0
- package/IMPLEMENTATION.md +20 -0
- package/STABILITY.md +4 -0
- package/dist/agent/agent.tools.d.ts +11 -3
- package/dist/agent/agent.tools.js +11 -301
- package/dist/capabilities/communities.facade.d.ts +13 -0
- package/dist/capabilities/communities.facade.js +12 -0
- package/dist/capabilities/communities.tools.port.d.ts +5 -0
- package/dist/capabilities/communities.tools.port.js +1 -0
- package/dist/capabilities/contacts.facade.d.ts +9 -0
- package/dist/capabilities/contacts.facade.js +8 -0
- package/dist/capabilities/contacts.tools.port.d.ts +9 -0
- package/dist/capabilities/contacts.tools.port.js +1 -0
- package/dist/capabilities/integrations.facade.d.ts +8 -0
- package/dist/capabilities/integrations.facade.js +7 -0
- package/dist/capabilities/integrations.tools.port.d.ts +9 -0
- package/dist/capabilities/integrations.tools.port.js +1 -0
- package/dist/capabilities/interaction-composition.facade.d.ts +10 -0
- package/dist/capabilities/interaction-composition.facade.js +9 -0
- package/dist/capabilities/negotiation.discovery.facade.d.ts +9 -0
- package/dist/capabilities/negotiation.discovery.facade.js +7 -0
- package/dist/capabilities/negotiation.facade.d.ts +23 -0
- package/dist/capabilities/negotiation.facade.js +17 -0
- package/dist/capabilities/negotiation.memory.facade.d.ts +6 -0
- package/dist/capabilities/negotiation.memory.facade.js +5 -0
- package/dist/capabilities/negotiation.questions.facade.d.ts +6 -0
- package/dist/capabilities/negotiation.questions.facade.js +5 -0
- package/dist/capabilities/negotiation.state.facade.d.ts +5 -0
- package/dist/capabilities/negotiation.state.facade.js +1 -0
- package/dist/capabilities/negotiation.summary.facade.d.ts +5 -0
- package/dist/capabilities/negotiation.summary.facade.js +5 -0
- package/dist/capabilities/negotiation.tools.port.d.ts +5 -0
- package/dist/capabilities/negotiation.tools.port.js +1 -0
- package/dist/capabilities/opportunities.facade.d.ts +50 -0
- package/dist/capabilities/opportunities.facade.js +50 -0
- package/dist/capabilities/opportunities.safety.facade.d.ts +2 -0
- package/dist/capabilities/opportunities.safety.facade.js +2 -0
- package/dist/capabilities/opportunities.tools.port.d.ts +5 -0
- package/dist/capabilities/opportunities.tools.port.js +1 -0
- package/dist/capabilities/participant-agents.debug.facade.d.ts +2 -0
- package/dist/capabilities/participant-agents.debug.facade.js +1 -0
- package/dist/capabilities/participant-agents.facade.d.ts +35 -0
- package/dist/capabilities/participant-agents.facade.js +35 -0
- package/dist/capabilities/participant-agents.tools.facade.d.ts +8 -0
- package/dist/capabilities/participant-agents.tools.facade.js +8 -0
- package/dist/capabilities/participant-agents.tools.port.d.ts +9 -0
- package/dist/capabilities/participant-agents.tools.port.js +1 -0
- package/dist/capabilities/participant-context.facade.d.ts +13 -0
- package/dist/capabilities/participant-context.facade.js +14 -0
- package/dist/capabilities/participant-context.tools.port.d.ts +9 -0
- package/dist/capabilities/participant-context.tools.port.js +1 -0
- package/dist/capabilities/questions.enqueue.facade.d.ts +5 -0
- package/dist/capabilities/questions.enqueue.facade.js +1 -0
- package/dist/capabilities/questions.facade.d.ts +8 -0
- package/dist/capabilities/questions.facade.js +7 -0
- package/dist/capabilities/questions.runtime.facade.d.ts +5 -0
- package/dist/capabilities/questions.runtime.facade.js +5 -0
- package/dist/capabilities/questions.tools.port.d.ts +5 -0
- package/dist/capabilities/questions.tools.port.js +1 -0
- package/dist/capabilities/signals.facade.d.ts +16 -0
- package/dist/capabilities/signals.facade.js +14 -0
- package/dist/capabilities/signals.indexing.facade.d.ts +12 -0
- package/dist/capabilities/signals.indexing.facade.js +11 -0
- package/dist/capabilities/signals.tools.port.d.ts +5 -0
- package/dist/capabilities/signals.tools.port.js +1 -0
- package/dist/chat/chat-streaming.types.d.ts +0 -1
- package/dist/chat/chat-streaming.types.js +1 -2
- package/dist/chat/chat.agent.d.ts +0 -1
- package/dist/chat/chat.agent.js +0 -1
- package/dist/chat/chat.graph.d.ts +0 -1
- package/dist/chat/chat.graph.js +0 -1
- package/dist/chat/chat.interrupt.classifier.d.ts +0 -1
- package/dist/chat/chat.interrupt.classifier.js +0 -1
- package/dist/chat/chat.persona.d.ts +0 -1
- package/dist/chat/chat.persona.js +0 -1
- package/dist/chat/chat.prompt.d.ts +0 -1
- package/dist/chat/chat.prompt.js +0 -1
- package/dist/chat/chat.prompt.modules.d.ts +0 -1
- package/dist/chat/chat.prompt.modules.js +0 -1
- package/dist/chat/chat.question-dedup.d.ts +0 -1
- package/dist/chat/chat.question-dedup.js +0 -1
- package/dist/chat/chat.state.d.ts +0 -1
- package/dist/chat/chat.state.js +0 -1
- package/dist/chat/chat.streamer.d.ts +0 -1
- package/dist/chat/chat.streamer.js +0 -1
- package/dist/chat/chat.suggester.d.ts +0 -1
- package/dist/chat/chat.suggester.js +0 -1
- package/dist/chat/chat.summarizer.d.ts +0 -1
- package/dist/chat/chat.summarizer.js +0 -1
- package/dist/chat/chat.title.generator.d.ts +0 -1
- package/dist/chat/chat.title.generator.js +0 -1
- package/dist/chat/chat.tools.d.ts +0 -1
- package/dist/chat/chat.tools.js +0 -1
- package/dist/chat/chat.utils.d.ts +0 -1
- package/dist/chat/chat.utils.js +0 -1
- package/dist/chat/negotiator.persona.d.ts +0 -1
- package/dist/chat/negotiator.persona.js +0 -1
- package/dist/chat/negotiator.prompt.d.ts +1 -2
- package/dist/chat/negotiator.prompt.js +1 -2
- package/dist/chat/negotiator.tools.d.ts +0 -1
- package/dist/chat/negotiator.tools.js +0 -1
- package/dist/chat/onboarding.persona.d.ts +0 -1
- package/dist/chat/onboarding.persona.js +0 -1
- package/dist/chat/onboarding.prompt.d.ts +0 -1
- package/dist/chat/onboarding.prompt.js +0 -1
- package/dist/chat/reporter.action.contracts.d.ts +36 -0
- package/dist/chat/reporter.action.contracts.js +1 -0
- package/dist/chat/reporter.action.tools.d.ts +2 -37
- package/dist/chat/reporter.action.tools.js +0 -1
- package/dist/chat/reporter.persona.d.ts +0 -1
- package/dist/chat/reporter.persona.js +0 -1
- package/dist/chat/reporter.prompt.d.ts +0 -1
- package/dist/chat/reporter.prompt.js +0 -1
- package/dist/chat/signal.persona.d.ts +0 -1
- package/dist/chat/signal.persona.js +0 -1
- package/dist/chat/signal.prompt.d.ts +0 -1
- package/dist/chat/signal.prompt.js +0 -1
- package/dist/communities/application/index.d.ts +45 -0
- package/dist/communities/application/index.js +50 -0
- package/dist/communities/application/indexer.graph.d.ts +446 -0
- package/dist/communities/application/indexer.graph.js +420 -0
- package/dist/communities/application/indexer.state.d.ts +172 -0
- package/dist/communities/application/indexer.state.js +116 -0
- package/dist/communities/application/membership.graph.d.ts +270 -0
- package/dist/communities/application/membership.graph.js +229 -0
- package/dist/communities/application/network.graph.d.ts +648 -0
- package/dist/communities/application/network.graph.js +303 -0
- package/dist/communities/application/network.recommender.d.ts +44 -0
- package/dist/communities/application/network.recommender.js +113 -0
- package/dist/communities/application/network.tools.d.ts +35 -0
- package/dist/communities/application/network.tools.js +578 -0
- package/dist/communities/domain/index.d.ts +29 -0
- package/dist/communities/domain/index.js +31 -0
- package/dist/communities/domain/membership.state.d.ts +87 -0
- package/dist/communities/domain/membership.state.js +53 -0
- package/dist/communities/domain/network.state.d.ts +192 -0
- package/dist/communities/domain/network.state.js +66 -0
- package/dist/communities/index.d.ts +14 -0
- package/dist/communities/index.js +14 -0
- package/dist/communities/ports/index.d.ts +25 -0
- package/dist/communities/ports/index.js +27 -0
- package/dist/communities/public/index.d.ts +30 -0
- package/dist/communities/public/index.js +33 -0
- package/dist/contact/contact.inviter.d.ts +7 -44
- package/dist/contact/contact.inviter.js +6 -59
- package/dist/contact/contact.tools.d.ts +7 -5
- package/dist/contact/contact.tools.js +7 -177
- package/dist/contacts/application/contact.inviter.d.ts +49 -0
- package/dist/contacts/application/contact.inviter.js +64 -0
- package/dist/contacts/application/contact.tools.d.ts +20 -0
- package/dist/contacts/application/contact.tools.js +191 -0
- package/dist/contacts/application/index.d.ts +22 -0
- package/dist/contacts/application/index.js +21 -0
- package/dist/contacts/domain/contact.types.d.ts +51 -0
- package/dist/contacts/domain/contact.types.js +10 -0
- package/dist/contacts/domain/index.d.ts +18 -0
- package/dist/contacts/domain/index.js +1 -0
- package/dist/contacts/index.d.ts +24 -0
- package/dist/contacts/index.js +24 -0
- package/dist/contacts/ports/contact.repository.port.d.ts +28 -0
- package/dist/contacts/ports/contact.repository.port.js +14 -0
- package/dist/contacts/ports/contact.tools.port.d.ts +26 -0
- package/dist/contacts/ports/contact.tools.port.js +21 -0
- package/dist/contacts/ports/index.d.ts +22 -0
- package/dist/contacts/ports/index.js +21 -0
- package/dist/contacts/public/index.d.ts +36 -0
- package/dist/contacts/public/index.js +33 -0
- package/dist/context/context.generator.d.ts +0 -1
- package/dist/context/context.generator.js +0 -1
- package/dist/enrichment/enrichment.enricher.d.ts +0 -1
- package/dist/enrichment/enrichment.enricher.js +0 -1
- package/dist/enrichment/enrichment.generator.d.ts +0 -1
- package/dist/enrichment/enrichment.generator.js +0 -1
- package/dist/enrichment/enrichment.graph.d.ts +6 -7
- package/dist/enrichment/enrichment.graph.js +0 -1
- package/dist/enrichment/enrichment.state.d.ts +2 -3
- package/dist/enrichment/enrichment.state.js +0 -1
- package/dist/enrichment/enrichment.tools.d.ts +3 -3
- package/dist/enrichment/enrichment.tools.js +0 -1
- package/dist/index.d.ts +106 -91
- package/dist/index.js +79 -71
- package/dist/integration/integration.tools.d.ts +6 -10
- package/dist/integration/integration.tools.js +6 -82
- package/dist/integrations/application/index.d.ts +14 -0
- package/dist/integrations/application/index.js +14 -0
- package/dist/integrations/application/integration.tools.d.ts +27 -0
- package/dist/integrations/application/integration.tools.js +98 -0
- package/dist/integrations/domain/index.d.ts +18 -0
- package/dist/integrations/domain/index.js +1 -0
- package/dist/integrations/domain/integration.types.d.ts +53 -0
- package/dist/integrations/domain/integration.types.js +11 -0
- package/dist/integrations/index.d.ts +27 -0
- package/dist/integrations/index.js +27 -0
- package/dist/integrations/ports/index.d.ts +28 -0
- package/dist/integrations/ports/index.js +26 -0
- package/dist/integrations/ports/integration.adapter.port.d.ts +62 -0
- package/dist/integrations/ports/integration.adapter.port.js +15 -0
- package/dist/integrations/ports/integration.importer.port.d.ts +31 -0
- package/dist/integrations/ports/integration.importer.port.js +15 -0
- package/dist/integrations/ports/integration.tools.port.d.ts +28 -0
- package/dist/integrations/ports/integration.tools.port.js +21 -0
- package/dist/integrations/public/index.d.ts +37 -0
- package/dist/integrations/public/index.js +34 -0
- package/dist/intent/intent.clarifier.d.ts +3 -52
- package/dist/intent/intent.clarifier.js +2 -202
- package/dist/intent/intent.graph.d.ts +3 -551
- package/dist/intent/intent.graph.js +3 -937
- package/dist/intent/intent.indexer.d.ts +2 -83
- package/dist/intent/intent.indexer.js +2 -171
- package/dist/intent/intent.inferrer.d.ts +2 -95
- package/dist/intent/intent.inferrer.js +2 -234
- package/dist/intent/intent.reconciler.d.ts +2 -106
- package/dist/intent/intent.reconciler.js +2 -187
- package/dist/intent/intent.specificity.d.ts +2 -3
- package/dist/intent/intent.specificity.js +2 -3
- package/dist/intent/intent.state.d.ts +8 -229
- package/dist/intent/intent.state.js +8 -189
- package/dist/intent/intent.tools.d.ts +6 -24
- package/dist/intent/intent.tools.js +4 -788
- package/dist/intent/intent.verifier.d.ts +2 -116
- package/dist/intent/intent.verifier.js +2 -263
- package/dist/maintenance/maintenance.graph.d.ts +0 -1
- package/dist/maintenance/maintenance.graph.js +0 -1
- package/dist/maintenance/maintenance.state.d.ts +0 -1
- package/dist/maintenance/maintenance.state.js +0 -1
- package/dist/mcp/elicitation.builder.d.ts +0 -1
- package/dist/mcp/elicitation.builder.js +0 -1
- package/dist/mcp/elicitation.dispatcher.d.ts +0 -1
- package/dist/mcp/elicitation.dispatcher.js +0 -1
- package/dist/mcp/mcp.server.d.ts +0 -1
- package/dist/mcp/mcp.server.js +1 -2
- package/dist/negotiation/application/index.d.ts +48 -0
- package/dist/negotiation/application/index.js +49 -0
- package/dist/negotiation/application/insight.generator.d.ts +31 -0
- package/dist/negotiation/application/insight.generator.js +105 -0
- package/dist/negotiation/application/negotiation.agent.d.ts +110 -0
- package/dist/negotiation/application/negotiation.agent.js +244 -0
- package/dist/negotiation/application/negotiation.detail-reader.d.ts +94 -0
- package/dist/negotiation/application/negotiation.detail-reader.js +91 -0
- package/dist/negotiation/application/negotiation.graph.d.ts +666 -0
- package/dist/negotiation/application/negotiation.graph.js +1394 -0
- package/dist/negotiation/application/negotiation.reflect.d.ts +194 -0
- package/dist/negotiation/application/negotiation.reflect.js +145 -0
- package/dist/negotiation/application/negotiation.screen.d.ts +78 -0
- package/dist/negotiation/application/negotiation.screen.js +108 -0
- package/dist/negotiation/application/negotiation.summarizer.d.ts +25 -0
- package/dist/negotiation/application/negotiation.summarizer.js +101 -0
- package/dist/negotiation/application/negotiation.tools.d.ts +18 -0
- package/dist/negotiation/application/negotiation.tools.js +782 -0
- package/dist/negotiation/domain/index.d.ts +48 -0
- package/dist/negotiation/domain/index.js +50 -0
- package/dist/negotiation/domain/negotiation.consultation-policy.d.ts +39 -0
- package/dist/negotiation/domain/negotiation.consultation-policy.js +68 -0
- package/dist/negotiation/domain/negotiation.deadlock.contracts.d.ts +10 -0
- package/dist/negotiation/domain/negotiation.deadlock.contracts.js +1 -0
- package/dist/negotiation/domain/negotiation.deadlock.d.ts +81 -0
- package/dist/negotiation/domain/negotiation.deadlock.js +103 -0
- package/dist/negotiation/domain/negotiation.intent-snapshot-provenance.d.ts +21 -0
- package/dist/negotiation/domain/negotiation.intent-snapshot-provenance.js +28 -0
- package/dist/negotiation/domain/negotiation.lifecycle-narration.d.ts +18 -0
- package/dist/negotiation/domain/negotiation.lifecycle-narration.js +87 -0
- package/dist/negotiation/domain/negotiation.memory.d.ts +65 -0
- package/dist/negotiation/domain/negotiation.memory.js +83 -0
- package/dist/negotiation/domain/negotiation.protocol.d.ts +536 -0
- package/dist/negotiation/domain/negotiation.protocol.js +202 -0
- package/dist/negotiation/domain/negotiation.question-safety.d.ts +25 -0
- package/dist/negotiation/domain/negotiation.question-safety.js +55 -0
- package/dist/negotiation/domain/negotiation.screen.contracts.d.ts +88 -0
- package/dist/negotiation/domain/negotiation.screen.contracts.js +58 -0
- package/dist/negotiation/domain/negotiation.state.d.ts +497 -0
- package/dist/negotiation/domain/negotiation.state.js +288 -0
- package/dist/negotiation/domain/negotiation.task-lock-policy.d.ts +10 -0
- package/dist/negotiation/domain/negotiation.task-lock-policy.js +22 -0
- package/dist/negotiation/index.d.ts +49 -0
- package/dist/negotiation/index.js +49 -0
- package/dist/negotiation/insight.generator.d.ts +3 -30
- package/dist/negotiation/insight.generator.js +3 -104
- package/dist/negotiation/negotiation.agent.d.ts +3 -109
- package/dist/negotiation/negotiation.agent.js +3 -248
- package/dist/negotiation/negotiation.attribution.d.ts +0 -1
- package/dist/negotiation/negotiation.attribution.js +0 -1
- package/dist/negotiation/negotiation.consultation-policy.d.ts +3 -38
- package/dist/negotiation/negotiation.consultation-policy.js +3 -67
- package/dist/negotiation/negotiation.deadlock.contracts.d.ts +5 -0
- package/dist/negotiation/negotiation.deadlock.contracts.js +5 -0
- package/dist/negotiation/negotiation.deadlock.d.ts +3 -94
- package/dist/negotiation/negotiation.deadlock.js +3 -101
- package/dist/negotiation/negotiation.detail-reader.d.ts +5 -0
- package/dist/negotiation/negotiation.detail-reader.js +5 -0
- package/dist/negotiation/negotiation.graph.d.ts +3 -663
- package/dist/negotiation/negotiation.graph.js +3 -1459
- package/dist/negotiation/negotiation.intent-snapshot-provenance.d.ts +5 -0
- package/dist/negotiation/negotiation.intent-snapshot-provenance.js +5 -0
- package/dist/negotiation/negotiation.lifecycle-narration.d.ts +5 -0
- package/dist/negotiation/negotiation.lifecycle-narration.js +5 -0
- package/dist/negotiation/negotiation.memory.d.ts +5 -56
- package/dist/negotiation/negotiation.memory.js +5 -69
- package/dist/negotiation/negotiation.protocol.d.ts +3 -535
- package/dist/negotiation/negotiation.protocol.js +3 -201
- package/dist/negotiation/negotiation.question-safety.d.ts +3 -24
- package/dist/negotiation/negotiation.question-safety.js +3 -54
- package/dist/negotiation/negotiation.reflect.d.ts +4 -197
- package/dist/negotiation/negotiation.reflect.js +4 -151
- package/dist/negotiation/negotiation.screen.d.ts +6 -159
- package/dist/negotiation/negotiation.screen.js +6 -152
- package/dist/negotiation/negotiation.state.d.ts +3 -495
- package/dist/negotiation/negotiation.state.js +3 -284
- package/dist/negotiation/negotiation.summarizer.d.ts +3 -24
- package/dist/negotiation/negotiation.summarizer.js +3 -100
- package/dist/negotiation/negotiation.task-lock-policy.d.ts +5 -0
- package/dist/negotiation/negotiation.task-lock-policy.js +5 -0
- package/dist/negotiation/negotiation.tools.d.ts +3 -15
- package/dist/negotiation/negotiation.tools.js +3 -946
- package/dist/negotiation/ports/index.d.ts +18 -0
- package/dist/negotiation/ports/index.js +18 -0
- package/dist/negotiation/ports/negotiation.tools.port.d.ts +18 -0
- package/dist/negotiation/ports/negotiation.tools.port.js +1 -0
- package/dist/negotiation/public/index.d.ts +58 -0
- package/dist/negotiation/public/index.js +60 -0
- package/dist/network/indexer/indexer.graph.d.ts +3 -413
- package/dist/network/indexer/indexer.graph.js +3 -375
- package/dist/network/indexer/indexer.state.d.ts +3 -149
- package/dist/network/indexer/indexer.state.js +3 -98
- package/dist/network/membership/membership.graph.d.ts +3 -248
- package/dist/network/membership/membership.graph.js +3 -202
- package/dist/network/membership/membership.state.d.ts +3 -75
- package/dist/network/membership/membership.state.js +3 -41
- package/dist/network/network.graph.d.ts +3 -629
- package/dist/network/network.graph.js +3 -267
- package/dist/network/network.recommender.d.ts +3 -40
- package/dist/network/network.recommender.js +3 -109
- package/dist/network/network.state.d.ts +3 -180
- package/dist/network/network.state.js +3 -54
- package/dist/network/network.tools.d.ts +5 -3
- package/dist/network/network.tools.js +5 -566
- package/dist/opportunity/application/delivery-card.cache.d.ts +25 -0
- package/dist/opportunity/application/delivery-card.cache.js +43 -0
- package/dist/opportunity/application/index.d.ts +63 -0
- package/dist/opportunity/application/index.js +68 -0
- package/dist/opportunity/application/negotiation-context.loader.d.ts +59 -0
- package/dist/opportunity/application/negotiation-context.loader.js +88 -0
- package/dist/opportunity/application/opportunity.card-presentation.d.ts +44 -0
- package/dist/opportunity/application/opportunity.card-presentation.js +104 -0
- package/dist/opportunity/application/opportunity.discover.d.ts +215 -0
- package/dist/opportunity/application/opportunity.discover.js +793 -0
- package/dist/opportunity/application/opportunity.discovery-continuation-finalization.d.ts +34 -0
- package/dist/opportunity/application/opportunity.discovery-continuation-finalization.js +74 -0
- package/dist/opportunity/application/opportunity.discovery-mcp-lifecycle-finalization.d.ts +44 -0
- package/dist/opportunity/application/opportunity.discovery-mcp-lifecycle-finalization.js +92 -0
- package/dist/opportunity/application/opportunity.discovery-negotiation-summary.d.ts +14 -0
- package/dist/opportunity/application/opportunity.discovery-negotiation-summary.js +46 -0
- package/dist/opportunity/application/opportunity.enricher.d.ts +71 -0
- package/dist/opportunity/application/opportunity.enricher.js +280 -0
- package/dist/opportunity/application/opportunity.evaluator.d.ts +275 -0
- package/dist/opportunity/application/opportunity.evaluator.js +459 -0
- package/dist/opportunity/application/opportunity.existing-negotiation.d.ts +79 -0
- package/dist/opportunity/application/opportunity.existing-negotiation.js +118 -0
- package/dist/opportunity/application/opportunity.feed-selection.d.ts +30 -0
- package/dist/opportunity/application/opportunity.feed-selection.js +96 -0
- package/dist/opportunity/application/opportunity.graph.d.ts +1427 -0
- package/dist/opportunity/application/opportunity.graph.js +3707 -0
- package/dist/opportunity/application/opportunity.introducer.d.ts +77 -0
- package/dist/opportunity/application/opportunity.introducer.js +99 -0
- package/dist/opportunity/application/opportunity.lifecycle.d.ts +63 -0
- package/dist/opportunity/application/opportunity.lifecycle.js +181 -0
- package/dist/opportunity/application/opportunity.newborn-stamping.d.ts +41 -0
- package/dist/opportunity/application/opportunity.newborn-stamping.js +81 -0
- package/dist/opportunity/application/opportunity.pending-questions.d.ts +33 -0
- package/dist/opportunity/application/opportunity.pending-questions.js +42 -0
- package/dist/opportunity/application/opportunity.persist.d.ts +58 -0
- package/dist/opportunity/application/opportunity.persist.js +145 -0
- package/dist/opportunity/application/opportunity.persistence-admission.d.ts +39 -0
- package/dist/opportunity/application/opportunity.persistence-admission.js +59 -0
- package/dist/opportunity/application/opportunity.presenter.d.ts +156 -0
- package/dist/opportunity/application/opportunity.presenter.js +736 -0
- package/dist/opportunity/application/opportunity.tools.d.ts +131 -0
- package/dist/opportunity/application/opportunity.tools.js +1834 -0
- package/dist/opportunity/application/opportunity.update-admission.d.ts +24 -0
- package/dist/opportunity/application/opportunity.update-admission.js +38 -0
- package/dist/opportunity/delivery-card.cache.d.ts +5 -26
- package/dist/opportunity/delivery-card.cache.js +5 -44
- package/dist/opportunity/discovery-question.helper.d.ts +3 -17
- package/dist/opportunity/discovery-question.helper.js +3 -14
- package/dist/opportunity/discriminator/discriminator.adjustments.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.adjustments.js +0 -1
- package/dist/opportunity/discriminator/discriminator.assigner.d.ts +4 -5
- package/dist/opportunity/discriminator/discriminator.assigner.js +0 -1
- package/dist/opportunity/discriminator/discriminator.env.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.env.js +0 -1
- package/dist/opportunity/discriminator/discriminator.miner.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.miner.js +0 -1
- package/dist/opportunity/discriminator/discriminator.push.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.push.js +0 -1
- package/dist/opportunity/discriminator/discriminator.question.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.question.js +0 -1
- package/dist/opportunity/discriminator/discriminator.scorer.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.scorer.js +0 -1
- package/dist/opportunity/discriminator/discriminator.shadow.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.shadow.js +0 -1
- package/dist/opportunity/discriminator/discriminator.types.d.ts +0 -1
- package/dist/opportunity/discriminator/discriminator.types.js +0 -1
- package/dist/opportunity/domain/discovery-question.helper.d.ts +18 -0
- package/dist/opportunity/domain/discovery-question.helper.js +15 -0
- package/dist/opportunity/domain/index.d.ts +55 -0
- package/dist/opportunity/domain/index.js +52 -0
- package/dist/opportunity/domain/negotiation-summary.builder.d.ts +37 -0
- package/dist/opportunity/domain/negotiation-summary.builder.js +66 -0
- package/dist/opportunity/domain/opportunity.actor.d.ts +15 -0
- package/dist/opportunity/domain/opportunity.actor.js +39 -0
- package/dist/opportunity/domain/opportunity.claim-safety.d.ts +24 -0
- package/dist/opportunity/domain/opportunity.claim-safety.js +88 -0
- package/dist/opportunity/domain/opportunity.discovery-run-coalescing.d.ts +33 -0
- package/dist/opportunity/domain/opportunity.discovery-run-coalescing.js +33 -0
- package/dist/opportunity/domain/opportunity.discovery.contracts.d.ts +45 -0
- package/dist/opportunity/domain/opportunity.discovery.contracts.js +1 -0
- package/dist/opportunity/domain/opportunity.evidence.d.ts +21 -0
- package/dist/opportunity/domain/opportunity.evidence.js +78 -0
- package/dist/opportunity/domain/opportunity.labels.d.ts +8 -0
- package/dist/opportunity/domain/opportunity.labels.js +10 -0
- package/dist/opportunity/domain/opportunity.presentation-cache.d.ts +6 -0
- package/dist/opportunity/domain/opportunity.presentation-cache.js +14 -0
- package/dist/opportunity/domain/opportunity.presentation.d.ts +76 -0
- package/dist/opportunity/domain/opportunity.presentation.js +516 -0
- package/dist/opportunity/domain/opportunity.safe-presentation.d.ts +104 -0
- package/dist/opportunity/domain/opportunity.safe-presentation.js +102 -0
- package/dist/opportunity/domain/opportunity.state.d.ts +519 -0
- package/dist/opportunity/domain/opportunity.state.js +309 -0
- package/dist/opportunity/domain/opportunity.utils.d.ts +217 -0
- package/dist/opportunity/domain/opportunity.utils.js +395 -0
- package/dist/opportunity/feed/feed.categorizer.d.ts +0 -1
- package/dist/opportunity/feed/feed.categorizer.js +0 -1
- package/dist/opportunity/feed/feed.graph.d.ts +1 -2
- package/dist/opportunity/feed/feed.graph.js +0 -1
- package/dist/opportunity/feed/feed.health.d.ts +0 -1
- package/dist/opportunity/feed/feed.health.js +0 -1
- package/dist/opportunity/feed/feed.state.d.ts +1 -2
- package/dist/opportunity/feed/feed.state.js +0 -1
- package/dist/opportunity/index.d.ts +37 -0
- package/dist/opportunity/index.js +37 -0
- package/dist/opportunity/negotiation-context.loader.d.ts +3 -58
- package/dist/opportunity/negotiation-context.loader.js +3 -87
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.env.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.env.js +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.extractor.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.extractor.js +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.miner.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.miner.js +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.shadow.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.shadow.js +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.types.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.types.js +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.verifier.d.ts +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.verifier.js +0 -1
- package/dist/opportunity/negotiation-summary.builder.d.ts +3 -36
- package/dist/opportunity/negotiation-summary.builder.js +3 -65
- package/dist/opportunity/opportunity.actor.d.ts +3 -14
- package/dist/opportunity/opportunity.actor.js +3 -38
- package/dist/opportunity/opportunity.card-presentation.d.ts +5 -0
- package/dist/opportunity/opportunity.card-presentation.js +5 -0
- package/dist/opportunity/opportunity.claim-safety.d.ts +3 -23
- package/dist/opportunity/opportunity.claim-safety.js +3 -87
- package/dist/opportunity/opportunity.discover.d.ts +3 -218
- package/dist/opportunity/opportunity.discover.js +3 -917
- package/dist/opportunity/opportunity.discovery-continuation-finalization.d.ts +5 -0
- package/dist/opportunity/opportunity.discovery-continuation-finalization.js +5 -0
- package/dist/opportunity/opportunity.discovery-mcp-lifecycle-finalization.d.ts +5 -0
- package/dist/opportunity/opportunity.discovery-mcp-lifecycle-finalization.js +5 -0
- package/dist/opportunity/opportunity.discovery-negotiation-summary.d.ts +5 -0
- package/dist/opportunity/opportunity.discovery-negotiation-summary.js +5 -0
- package/dist/opportunity/opportunity.discovery-run-coalescing.d.ts +5 -0
- package/dist/opportunity/opportunity.discovery-run-coalescing.js +5 -0
- package/dist/opportunity/opportunity.discovery.contracts.d.ts +5 -0
- package/dist/opportunity/opportunity.discovery.contracts.js +5 -0
- package/dist/opportunity/opportunity.enricher.d.ts +3 -70
- package/dist/opportunity/opportunity.enricher.js +3 -279
- package/dist/opportunity/opportunity.evaluator.d.ts +5 -276
- package/dist/opportunity/opportunity.evaluator.js +5 -460
- package/dist/opportunity/opportunity.evidence.d.ts +5 -22
- package/dist/opportunity/opportunity.evidence.js +5 -79
- package/dist/opportunity/opportunity.existing-negotiation.d.ts +5 -0
- package/dist/opportunity/opportunity.existing-negotiation.js +5 -0
- package/dist/opportunity/opportunity.feed-selection.d.ts +5 -0
- package/dist/opportunity/opportunity.feed-selection.js +5 -0
- package/dist/opportunity/opportunity.graph.d.ts +3 -1489
- package/dist/opportunity/opportunity.graph.js +3 -4071
- package/dist/opportunity/opportunity.introducer.d.ts +3 -76
- package/dist/opportunity/opportunity.introducer.js +3 -98
- package/dist/opportunity/opportunity.labels.d.ts +5 -9
- package/dist/opportunity/opportunity.labels.js +5 -11
- package/dist/opportunity/opportunity.lifecycle.d.ts +5 -0
- package/dist/opportunity/opportunity.lifecycle.js +5 -0
- package/dist/opportunity/opportunity.newborn-stamping.d.ts +5 -0
- package/dist/opportunity/opportunity.newborn-stamping.js +5 -0
- package/dist/opportunity/opportunity.pending-questions.d.ts +3 -32
- package/dist/opportunity/opportunity.pending-questions.js +3 -41
- package/dist/opportunity/opportunity.persist.d.ts +3 -57
- package/dist/opportunity/opportunity.persist.js +3 -144
- package/dist/opportunity/opportunity.persistence-admission.d.ts +5 -0
- package/dist/opportunity/opportunity.persistence-admission.js +5 -0
- package/dist/opportunity/opportunity.presentation-cache.d.ts +5 -7
- package/dist/opportunity/opportunity.presentation-cache.js +5 -15
- package/dist/opportunity/opportunity.presentation.d.ts +3 -75
- package/dist/opportunity/opportunity.presentation.js +3 -515
- package/dist/opportunity/opportunity.presenter.d.ts +10 -155
- package/dist/opportunity/opportunity.presenter.js +10 -735
- package/dist/opportunity/opportunity.safe-presentation.d.ts +3 -103
- package/dist/opportunity/opportunity.safe-presentation.js +3 -101
- package/dist/opportunity/opportunity.state.d.ts +3 -518
- package/dist/opportunity/opportunity.state.js +3 -308
- package/dist/opportunity/opportunity.tools.d.ts +3 -157
- package/dist/opportunity/opportunity.tools.js +3 -2238
- package/dist/opportunity/opportunity.update-admission.d.ts +5 -0
- package/dist/opportunity/opportunity.update-admission.js +5 -0
- package/dist/opportunity/opportunity.utils.d.ts +3 -216
- package/dist/opportunity/opportunity.utils.js +3 -394
- package/dist/opportunity/outcome/outcome.env.d.ts +0 -1
- package/dist/opportunity/outcome/outcome.env.js +0 -1
- package/dist/opportunity/outcome/outcome.hypotheses.d.ts +0 -1
- package/dist/opportunity/outcome/outcome.hypotheses.js +0 -1
- package/dist/opportunity/outcome/outcome.shadow.d.ts +0 -1
- package/dist/opportunity/outcome/outcome.shadow.js +0 -1
- package/dist/opportunity/outcome/outcome.types.d.ts +0 -1
- package/dist/opportunity/outcome/outcome.types.js +0 -1
- package/dist/opportunity/ports/index.d.ts +5 -0
- package/dist/opportunity/ports/index.js +1 -0
- package/dist/opportunity/ports/opportunity.tools.port.d.ts +5 -0
- package/dist/opportunity/ports/opportunity.tools.port.js +1 -0
- package/dist/opportunity/public/index.d.ts +58 -0
- package/dist/opportunity/public/index.js +51 -0
- package/dist/participant-agents/application/agent.tools.d.ts +16 -0
- package/dist/participant-agents/application/agent.tools.js +313 -0
- package/dist/participant-agents/application/index.d.ts +21 -0
- package/dist/participant-agents/application/index.js +22 -0
- package/dist/participant-agents/domain/agent.types.d.ts +76 -0
- package/dist/participant-agents/domain/agent.types.js +22 -0
- package/dist/participant-agents/domain/index.d.ts +20 -0
- package/dist/participant-agents/domain/index.js +1 -0
- package/dist/participant-agents/index.d.ts +24 -0
- package/dist/participant-agents/index.js +24 -0
- package/dist/participant-agents/ports/agent.dispatcher.port.d.ts +25 -0
- package/dist/participant-agents/ports/agent.dispatcher.port.js +1 -0
- package/dist/participant-agents/ports/agent.repository.port.d.ts +118 -0
- package/dist/participant-agents/ports/agent.repository.port.js +10 -0
- package/dist/participant-agents/ports/agent.tools.port.d.ts +24 -0
- package/dist/participant-agents/ports/agent.tools.port.js +20 -0
- package/dist/participant-agents/ports/index.d.ts +29 -0
- package/dist/participant-agents/ports/index.js +27 -0
- package/dist/participant-agents/public/index.d.ts +39 -0
- package/dist/participant-agents/public/index.js +36 -0
- package/dist/participant-context/application/index.d.ts +73 -0
- package/dist/participant-context/application/index.js +83 -0
- package/dist/participant-context/domain/index.d.ts +67 -0
- package/dist/participant-context/domain/index.js +68 -0
- package/dist/participant-context/index.d.ts +16 -0
- package/dist/participant-context/index.js +16 -0
- package/dist/participant-context/ports/index.d.ts +37 -0
- package/dist/participant-context/ports/index.js +34 -0
- package/dist/participant-context/public/index.d.ts +48 -0
- package/dist/participant-context/public/index.js +55 -0
- package/dist/platform/index.d.ts +19 -0
- package/dist/platform/index.js +23 -0
- package/dist/premise/premise.analyzer.d.ts +0 -1
- package/dist/premise/premise.analyzer.js +0 -2
- package/dist/premise/premise.decomposer.d.ts +0 -1
- package/dist/premise/premise.decomposer.js +0 -2
- package/dist/premise/premise.graph.d.ts +1 -2
- package/dist/premise/premise.graph.js +0 -2
- package/dist/premise/premise.indexer.d.ts +0 -1
- package/dist/premise/premise.indexer.js +0 -2
- package/dist/premise/premise.state.d.ts +1 -2
- package/dist/premise/premise.state.js +0 -1
- package/dist/premise/premise.tools.d.ts +3 -3
- package/dist/premise/premise.tools.js +0 -2
- package/dist/public/index.d.ts +17 -0
- package/dist/public/index.js +17 -0
- package/dist/questioner/questioner.agent.d.ts +4 -27
- package/dist/questioner/questioner.agent.js +3 -133
- package/dist/questioner/questioner.ask.tool.d.ts +3 -12
- package/dist/questioner/questioner.ask.tool.js +3 -299
- package/dist/questioner/questioner.discovery.prompt.d.ts +3 -7
- package/dist/questioner/questioner.discovery.prompt.js +3 -180
- package/dist/questioner/questioner.env.d.ts +3 -57
- package/dist/questioner/questioner.env.js +3 -93
- package/dist/questioner/questioner.presets.d.ts +4 -19
- package/dist/questioner/questioner.presets.js +3 -465
- package/dist/questioner/questioner.qud.d.ts +3 -6
- package/dist/questioner/questioner.qud.js +3 -10
- package/dist/questioner/questioner.tools.d.ts +3 -15
- package/dist/questioner/questioner.tools.js +3 -186
- package/dist/questioner/questioner.types.d.ts +4 -218
- package/dist/questioner/questioner.types.js +5 -62
- package/dist/questions/application/index.d.ts +39 -0
- package/dist/questions/application/index.js +41 -0
- package/dist/questions/application/question.agent.d.ts +28 -0
- package/dist/questions/application/question.agent.js +139 -0
- package/dist/questions/application/question.ask.tool.d.ts +12 -0
- package/dist/questions/application/question.ask.tool.js +300 -0
- package/dist/questions/application/question.discovery.prompt.d.ts +8 -0
- package/dist/questions/application/question.discovery.prompt.js +181 -0
- package/dist/questions/application/question.env.d.ts +61 -0
- package/dist/questions/application/question.env.js +97 -0
- package/dist/questions/application/question.input.d.ts +237 -0
- package/dist/questions/application/question.input.js +61 -0
- package/dist/questions/application/question.presets.d.ts +24 -0
- package/dist/questions/application/question.presets.js +445 -0
- package/dist/questions/application/question.qud.d.ts +12 -0
- package/dist/questions/application/question.qud.js +16 -0
- package/dist/questions/application/question.tools.d.ts +15 -0
- package/dist/questions/application/question.tools.js +190 -0
- package/dist/questions/domain/index.d.ts +25 -0
- package/dist/questions/domain/index.js +25 -0
- package/dist/questions/domain/question.schema.d.ts +1537 -0
- package/dist/questions/domain/question.schema.js +422 -0
- package/dist/questions/index.d.ts +22 -0
- package/dist/questions/index.js +22 -0
- package/dist/questions/ports/index.d.ts +29 -0
- package/dist/questions/ports/index.js +27 -0
- package/dist/questions/ports/question.generator.port.d.ts +34 -0
- package/dist/questions/ports/question.generator.port.js +1 -0
- package/dist/questions/ports/question.persistence.port.d.ts +87 -0
- package/dist/questions/ports/question.persistence.port.js +1 -0
- package/dist/questions/ports/question.tools.port.d.ts +15 -0
- package/dist/questions/ports/question.tools.port.js +1 -0
- package/dist/questions/public/index.d.ts +47 -0
- package/dist/questions/public/index.js +49 -0
- package/dist/runtime/background/index.d.ts +14 -0
- package/dist/runtime/background/index.js +14 -0
- package/dist/runtime/foreground/composition/tool.factory.d.ts +16 -0
- package/dist/runtime/foreground/composition/tool.factory.js +224 -0
- package/dist/runtime/foreground/composition/tool.registry.d.ts +11 -0
- package/dist/runtime/foreground/composition/tool.registry.js +106 -0
- package/dist/runtime/foreground/index.d.ts +13 -0
- package/dist/runtime/foreground/index.js +13 -0
- package/dist/runtime/foreground/signals/intent.tools.d.ts +13 -0
- package/dist/runtime/foreground/signals/intent.tools.js +13 -0
- package/dist/shared/agent/model-signal.d.ts +0 -1
- package/dist/shared/agent/model-signal.js +0 -1
- package/dist/shared/agent/model.config.d.ts +0 -1
- package/dist/shared/agent/model.config.js +0 -1
- package/dist/shared/agent/tool.factory.d.ts +4 -15
- package/dist/shared/agent/tool.factory.js +4 -226
- package/dist/shared/agent/tool.helpers.d.ts +51 -12
- package/dist/shared/agent/tool.helpers.js +0 -1
- package/dist/shared/agent/tool.registry.d.ts +9 -9
- package/dist/shared/agent/tool.registry.js +9 -104
- package/dist/shared/agent/tool.runtime.d.ts +0 -1
- package/dist/shared/agent/tool.runtime.js +0 -1
- package/dist/shared/agent/tool.scope.d.ts +0 -1
- package/dist/shared/agent/tool.scope.js +0 -1
- package/dist/shared/agent/utility.tools.d.ts +5 -3
- package/dist/shared/agent/utility.tools.js +0 -1
- package/dist/shared/assignment/network-assignment.policy.d.ts +0 -1
- package/dist/shared/assignment/network-assignment.policy.js +0 -1
- package/dist/shared/hyde/hyde.documents.d.ts +0 -1
- package/dist/shared/hyde/hyde.documents.js +0 -1
- package/dist/shared/hyde/hyde.env.d.ts +0 -1
- package/dist/shared/hyde/hyde.env.js +0 -1
- package/dist/shared/hyde/hyde.frame.d.ts +4 -5
- package/dist/shared/hyde/hyde.frame.js +0 -1
- package/dist/shared/hyde/hyde.generator.d.ts +0 -1
- package/dist/shared/hyde/hyde.generator.js +0 -1
- package/dist/shared/hyde/hyde.graph.d.ts +0 -1
- package/dist/shared/hyde/hyde.graph.js +0 -1
- package/dist/shared/hyde/hyde.state.d.ts +0 -1
- package/dist/shared/hyde/hyde.state.js +0 -1
- package/dist/shared/hyde/hyde.strategies.d.ts +0 -1
- package/dist/shared/hyde/hyde.strategies.js +0 -1
- package/dist/shared/hyde/hyde.validator.d.ts +0 -1
- package/dist/shared/hyde/hyde.validator.js +0 -1
- package/dist/shared/hyde/lens.inferrer.d.ts +6 -7
- package/dist/shared/hyde/lens.inferrer.js +0 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +4 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.js +4 -1
- package/dist/shared/interfaces/agent.interface.d.ts +13 -173
- package/dist/shared/interfaces/agent.interface.js +12 -12
- package/dist/shared/interfaces/auth.interface.d.ts +0 -1
- package/dist/shared/interfaces/auth.interface.js +0 -1
- package/dist/shared/interfaces/cache.interface.d.ts +0 -1
- package/dist/shared/interfaces/cache.interface.js +0 -1
- package/dist/shared/interfaces/chat-message-writer.interface.d.ts +0 -1
- package/dist/shared/interfaces/chat-message-writer.interface.js +0 -1
- package/dist/shared/interfaces/chat-session.interface.d.ts +0 -1
- package/dist/shared/interfaces/chat-session.interface.js +0 -1
- package/dist/shared/interfaces/chat-summary.interface.d.ts +0 -1
- package/dist/shared/interfaces/chat-summary.interface.js +0 -1
- package/dist/shared/interfaces/connect-link.interface.d.ts +0 -1
- package/dist/shared/interfaces/connect-link.interface.js +0 -1
- package/dist/shared/interfaces/contact.interface.d.ts +7 -55
- package/dist/shared/interfaces/contact.interface.js +7 -1
- package/dist/shared/interfaces/database.interface.d.ts +0 -1
- package/dist/shared/interfaces/database.interface.js +0 -1
- package/dist/shared/interfaces/delivery-ledger.interface.d.ts +0 -1
- package/dist/shared/interfaces/delivery-ledger.interface.js +0 -1
- package/dist/shared/interfaces/discovery-run.interface.d.ts +2 -3
- package/dist/shared/interfaces/discovery-run.interface.js +0 -1
- package/dist/shared/interfaces/embedder.interface.d.ts +0 -1
- package/dist/shared/interfaces/embedder.interface.js +0 -1
- package/dist/shared/interfaces/enrichment-run.interface.d.ts +2 -3
- package/dist/shared/interfaces/enrichment-run.interface.js +0 -1
- package/dist/shared/interfaces/enrichment.interface.d.ts +0 -1
- package/dist/shared/interfaces/enrichment.interface.js +0 -1
- package/dist/shared/interfaces/integration.interface.d.ts +6 -88
- package/dist/shared/interfaces/integration.interface.js +7 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts +0 -1
- package/dist/shared/interfaces/negotiation-events.interface.js +0 -1
- package/dist/shared/interfaces/negotiation-summary.interface.d.ts +0 -1
- package/dist/shared/interfaces/negotiation-summary.interface.js +0 -1
- package/dist/shared/interfaces/negotiator-memory.interface.d.ts +0 -1
- package/dist/shared/interfaces/negotiator-memory.interface.js +0 -1
- package/dist/shared/interfaces/question-generator.interface.d.ts +3 -28
- package/dist/shared/interfaces/question-generator.interface.js +0 -1
- package/dist/shared/interfaces/questioner.interface.d.ts +3 -77
- package/dist/shared/interfaces/questioner.interface.js +0 -1
- package/dist/shared/interfaces/queue.interface.d.ts +0 -1
- package/dist/shared/interfaces/queue.interface.js +0 -1
- package/dist/shared/interfaces/scraper.interface.d.ts +0 -1
- package/dist/shared/interfaces/scraper.interface.js +0 -1
- package/dist/shared/interfaces/tool-request-context.interface.d.ts +12 -0
- package/dist/shared/interfaces/tool-request-context.interface.js +1 -0
- package/dist/shared/network/metadata.renderer.d.ts +0 -1
- package/dist/shared/network/metadata.renderer.js +0 -1
- package/dist/shared/observability/debug-meta.sanitizer.d.ts +0 -1
- package/dist/shared/observability/debug-meta.sanitizer.js +0 -1
- package/dist/shared/observability/log.d.ts +0 -1
- package/dist/shared/observability/log.js +0 -1
- package/dist/shared/observability/performance.d.ts +0 -1
- package/dist/shared/observability/performance.js +0 -1
- package/dist/shared/observability/protocol.logger.d.ts +0 -1
- package/dist/shared/observability/protocol.logger.js +0 -1
- package/dist/shared/observability/request-context.d.ts +0 -1
- package/dist/shared/observability/request-context.js +0 -1
- package/dist/shared/observability/trace.d.ts +0 -1
- package/dist/shared/observability/trace.js +0 -1
- package/dist/shared/schemas/chat-context.schema.d.ts +0 -1
- package/dist/shared/schemas/chat-context.schema.js +0 -1
- package/dist/shared/schemas/discovery-question.schema.d.ts +17 -18
- package/dist/shared/schemas/discovery-question.schema.js +0 -1
- package/dist/shared/schemas/identity.schema.d.ts +0 -1
- package/dist/shared/schemas/identity.schema.js +0 -1
- package/dist/shared/schemas/mcp-auth.schema.d.ts +0 -1
- package/dist/shared/schemas/mcp-auth.schema.js +0 -1
- package/dist/shared/schemas/negotiation-digest.schema.d.ts +5 -6
- package/dist/shared/schemas/negotiation-digest.schema.js +0 -1
- package/dist/shared/schemas/negotiation-state.schema.d.ts +4 -5
- package/dist/shared/schemas/negotiation-state.schema.js +0 -1
- package/dist/shared/schemas/network-assignment.schema.d.ts +0 -1
- package/dist/shared/schemas/network-assignment.schema.js +0 -1
- package/dist/shared/schemas/pending-question.schema.d.ts +0 -1
- package/dist/shared/schemas/pending-question.schema.js +0 -1
- package/dist/shared/schemas/question.schema.d.ts +3 -1535
- package/dist/shared/schemas/question.schema.js +3 -420
- package/dist/shared/ui/lucide.icon-catalog.d.ts +0 -1
- package/dist/shared/ui/lucide.icon-catalog.js +0 -1
- package/dist/shared/utils/social-label.d.ts +0 -1
- package/dist/shared/utils/social-label.js +0 -1
- package/dist/shared/utils/telegram-handle.d.ts +0 -1
- package/dist/shared/utils/telegram-handle.js +0 -1
- package/dist/signals/application/index.d.ts +19 -0
- package/dist/signals/application/index.js +22 -0
- package/dist/signals/application/intent.clarifier.d.ts +51 -0
- package/dist/signals/application/intent.clarifier.js +201 -0
- package/dist/signals/application/intent.graph.d.ts +552 -0
- package/dist/signals/application/intent.graph.js +938 -0
- package/dist/signals/application/intent.indexer.d.ts +82 -0
- package/dist/signals/application/intent.indexer.js +170 -0
- package/dist/signals/application/intent.inferrer.d.ts +94 -0
- package/dist/signals/application/intent.inferrer.js +233 -0
- package/dist/signals/application/intent.reconciler.d.ts +105 -0
- package/dist/signals/application/intent.reconciler.js +186 -0
- package/dist/signals/application/intent.tools.d.ts +24 -0
- package/dist/signals/application/intent.tools.js +789 -0
- package/dist/signals/application/intent.verifier.d.ts +115 -0
- package/dist/signals/application/intent.verifier.js +262 -0
- package/dist/signals/domain/index.d.ts +9 -0
- package/dist/signals/domain/index.js +11 -0
- package/dist/signals/domain/intent.state.d.ts +230 -0
- package/dist/signals/domain/intent.state.js +190 -0
- package/dist/signals/domain/signal.specificity.d.ts +2 -0
- package/dist/signals/domain/signal.specificity.js +2 -0
- package/dist/signals/index.d.ts +13 -0
- package/dist/signals/index.js +13 -0
- package/dist/signals/ports/index.d.ts +15 -0
- package/dist/signals/ports/index.js +13 -0
- package/dist/signals/public/index.d.ts +15 -0
- package/dist/signals/public/index.js +16 -0
- package/package.json +14 -3
- package/dist/agent/agent.tools.d.ts.map +0 -1
- package/dist/agent/agent.tools.js.map +0 -1
- package/dist/agent/tests/fakes.d.ts +0 -25
- package/dist/agent/tests/fakes.d.ts.map +0 -1
- package/dist/agent/tests/fakes.js +0 -178
- package/dist/agent/tests/fakes.js.map +0 -1
- package/dist/chat/chat-streaming.types.d.ts.map +0 -1
- package/dist/chat/chat-streaming.types.js.map +0 -1
- package/dist/chat/chat.agent.d.ts.map +0 -1
- package/dist/chat/chat.agent.js.map +0 -1
- package/dist/chat/chat.graph.d.ts.map +0 -1
- package/dist/chat/chat.graph.js.map +0 -1
- package/dist/chat/chat.interrupt.classifier.d.ts.map +0 -1
- package/dist/chat/chat.interrupt.classifier.js.map +0 -1
- package/dist/chat/chat.persona.d.ts.map +0 -1
- package/dist/chat/chat.persona.js.map +0 -1
- package/dist/chat/chat.prompt.d.ts.map +0 -1
- package/dist/chat/chat.prompt.js.map +0 -1
- package/dist/chat/chat.prompt.modules.d.ts.map +0 -1
- package/dist/chat/chat.prompt.modules.js.map +0 -1
- package/dist/chat/chat.question-dedup.d.ts.map +0 -1
- package/dist/chat/chat.question-dedup.js.map +0 -1
- package/dist/chat/chat.state.d.ts.map +0 -1
- package/dist/chat/chat.state.js.map +0 -1
- package/dist/chat/chat.streamer.d.ts.map +0 -1
- package/dist/chat/chat.streamer.js.map +0 -1
- package/dist/chat/chat.suggester.d.ts.map +0 -1
- package/dist/chat/chat.suggester.js.map +0 -1
- package/dist/chat/chat.summarizer.d.ts.map +0 -1
- package/dist/chat/chat.summarizer.js.map +0 -1
- package/dist/chat/chat.title.generator.d.ts.map +0 -1
- package/dist/chat/chat.title.generator.js.map +0 -1
- package/dist/chat/chat.tools.d.ts.map +0 -1
- package/dist/chat/chat.tools.js.map +0 -1
- package/dist/chat/chat.utils.d.ts.map +0 -1
- package/dist/chat/chat.utils.js.map +0 -1
- package/dist/chat/negotiator.persona.d.ts.map +0 -1
- package/dist/chat/negotiator.persona.js.map +0 -1
- package/dist/chat/negotiator.prompt.d.ts.map +0 -1
- package/dist/chat/negotiator.prompt.js.map +0 -1
- package/dist/chat/negotiator.tools.d.ts.map +0 -1
- package/dist/chat/negotiator.tools.js.map +0 -1
- package/dist/chat/onboarding.persona.d.ts.map +0 -1
- package/dist/chat/onboarding.persona.js.map +0 -1
- package/dist/chat/onboarding.prompt.d.ts.map +0 -1
- package/dist/chat/onboarding.prompt.js.map +0 -1
- package/dist/chat/reporter.action.tools.d.ts.map +0 -1
- package/dist/chat/reporter.action.tools.js.map +0 -1
- package/dist/chat/reporter.persona.d.ts.map +0 -1
- package/dist/chat/reporter.persona.js.map +0 -1
- package/dist/chat/reporter.prompt.d.ts.map +0 -1
- package/dist/chat/reporter.prompt.js.map +0 -1
- package/dist/chat/signal.persona.d.ts.map +0 -1
- package/dist/chat/signal.persona.js.map +0 -1
- package/dist/chat/signal.prompt.d.ts.map +0 -1
- package/dist/chat/signal.prompt.js.map +0 -1
- package/dist/chat/tests/chat.graph.mocks.d.ts +0 -98
- package/dist/chat/tests/chat.graph.mocks.d.ts.map +0 -1
- package/dist/chat/tests/chat.graph.mocks.js +0 -225
- package/dist/chat/tests/chat.graph.mocks.js.map +0 -1
- package/dist/contact/contact.inviter.d.ts.map +0 -1
- package/dist/contact/contact.inviter.js.map +0 -1
- package/dist/contact/contact.tools.d.ts.map +0 -1
- package/dist/contact/contact.tools.js.map +0 -1
- package/dist/context/context.generator.d.ts.map +0 -1
- package/dist/context/context.generator.js.map +0 -1
- package/dist/enrichment/enrichment.enricher.d.ts.map +0 -1
- package/dist/enrichment/enrichment.enricher.js.map +0 -1
- package/dist/enrichment/enrichment.generator.d.ts.map +0 -1
- package/dist/enrichment/enrichment.generator.js.map +0 -1
- package/dist/enrichment/enrichment.graph.d.ts.map +0 -1
- package/dist/enrichment/enrichment.graph.js.map +0 -1
- package/dist/enrichment/enrichment.state.d.ts.map +0 -1
- package/dist/enrichment/enrichment.state.js.map +0 -1
- package/dist/enrichment/enrichment.tools.d.ts.map +0 -1
- package/dist/enrichment/enrichment.tools.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/integration/integration.tools.d.ts.map +0 -1
- package/dist/integration/integration.tools.js.map +0 -1
- package/dist/intent/intent.clarifier.d.ts.map +0 -1
- package/dist/intent/intent.clarifier.js.map +0 -1
- package/dist/intent/intent.graph.d.ts.map +0 -1
- package/dist/intent/intent.graph.js.map +0 -1
- package/dist/intent/intent.indexer.d.ts.map +0 -1
- package/dist/intent/intent.indexer.js.map +0 -1
- package/dist/intent/intent.inferrer.d.ts.map +0 -1
- package/dist/intent/intent.inferrer.js.map +0 -1
- package/dist/intent/intent.reconciler.d.ts.map +0 -1
- package/dist/intent/intent.reconciler.js.map +0 -1
- package/dist/intent/intent.specificity.d.ts.map +0 -1
- package/dist/intent/intent.specificity.js.map +0 -1
- package/dist/intent/intent.state.d.ts.map +0 -1
- package/dist/intent/intent.state.js.map +0 -1
- package/dist/intent/intent.tools.d.ts.map +0 -1
- package/dist/intent/intent.tools.js.map +0 -1
- package/dist/intent/intent.verifier.d.ts.map +0 -1
- package/dist/intent/intent.verifier.js.map +0 -1
- package/dist/maintenance/maintenance.graph.d.ts.map +0 -1
- package/dist/maintenance/maintenance.graph.js.map +0 -1
- package/dist/maintenance/maintenance.state.d.ts.map +0 -1
- package/dist/maintenance/maintenance.state.js.map +0 -1
- package/dist/mcp/elicitation.builder.d.ts.map +0 -1
- package/dist/mcp/elicitation.builder.js.map +0 -1
- package/dist/mcp/elicitation.dispatcher.d.ts.map +0 -1
- package/dist/mcp/elicitation.dispatcher.js.map +0 -1
- package/dist/mcp/mcp.server.d.ts.map +0 -1
- package/dist/mcp/mcp.server.js.map +0 -1
- package/dist/negotiation/insight.generator.d.ts.map +0 -1
- package/dist/negotiation/insight.generator.js.map +0 -1
- package/dist/negotiation/negotiation.agent.d.ts.map +0 -1
- package/dist/negotiation/negotiation.agent.js.map +0 -1
- package/dist/negotiation/negotiation.attribution.d.ts.map +0 -1
- package/dist/negotiation/negotiation.attribution.js.map +0 -1
- package/dist/negotiation/negotiation.consultation-policy.d.ts.map +0 -1
- package/dist/negotiation/negotiation.consultation-policy.js.map +0 -1
- package/dist/negotiation/negotiation.deadlock.d.ts.map +0 -1
- package/dist/negotiation/negotiation.deadlock.js.map +0 -1
- package/dist/negotiation/negotiation.graph.d.ts.map +0 -1
- package/dist/negotiation/negotiation.graph.js.map +0 -1
- package/dist/negotiation/negotiation.memory.d.ts.map +0 -1
- package/dist/negotiation/negotiation.memory.js.map +0 -1
- package/dist/negotiation/negotiation.protocol.d.ts.map +0 -1
- package/dist/negotiation/negotiation.protocol.js.map +0 -1
- package/dist/negotiation/negotiation.question-safety.d.ts.map +0 -1
- package/dist/negotiation/negotiation.question-safety.js.map +0 -1
- package/dist/negotiation/negotiation.reflect.d.ts.map +0 -1
- package/dist/negotiation/negotiation.reflect.js.map +0 -1
- package/dist/negotiation/negotiation.screen.d.ts.map +0 -1
- package/dist/negotiation/negotiation.screen.js.map +0 -1
- package/dist/negotiation/negotiation.state.d.ts.map +0 -1
- package/dist/negotiation/negotiation.state.js.map +0 -1
- package/dist/negotiation/negotiation.summarizer.d.ts.map +0 -1
- package/dist/negotiation/negotiation.summarizer.js.map +0 -1
- package/dist/negotiation/negotiation.tools.d.ts.map +0 -1
- package/dist/negotiation/negotiation.tools.js.map +0 -1
- package/dist/network/indexer/indexer.graph.d.ts.map +0 -1
- package/dist/network/indexer/indexer.graph.js.map +0 -1
- package/dist/network/indexer/indexer.state.d.ts.map +0 -1
- package/dist/network/indexer/indexer.state.js.map +0 -1
- package/dist/network/membership/membership.graph.d.ts.map +0 -1
- package/dist/network/membership/membership.graph.js.map +0 -1
- package/dist/network/membership/membership.state.d.ts.map +0 -1
- package/dist/network/membership/membership.state.js.map +0 -1
- package/dist/network/network.graph.d.ts.map +0 -1
- package/dist/network/network.graph.js.map +0 -1
- package/dist/network/network.recommender.d.ts.map +0 -1
- package/dist/network/network.recommender.js.map +0 -1
- package/dist/network/network.state.d.ts.map +0 -1
- package/dist/network/network.state.js.map +0 -1
- package/dist/network/network.tools.d.ts.map +0 -1
- package/dist/network/network.tools.js.map +0 -1
- package/dist/opportunity/delivery-card.cache.d.ts.map +0 -1
- package/dist/opportunity/delivery-card.cache.js.map +0 -1
- package/dist/opportunity/discovery-question.helper.d.ts.map +0 -1
- package/dist/opportunity/discovery-question.helper.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.adjustments.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.adjustments.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.assigner.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.assigner.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.env.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.env.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.miner.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.miner.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.push.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.push.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.question.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.question.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.scorer.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.scorer.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.shadow.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.shadow.js.map +0 -1
- package/dist/opportunity/discriminator/discriminator.types.d.ts.map +0 -1
- package/dist/opportunity/discriminator/discriminator.types.js.map +0 -1
- package/dist/opportunity/feed/feed.categorizer.d.ts.map +0 -1
- package/dist/opportunity/feed/feed.categorizer.js.map +0 -1
- package/dist/opportunity/feed/feed.graph.d.ts.map +0 -1
- package/dist/opportunity/feed/feed.graph.js.map +0 -1
- package/dist/opportunity/feed/feed.health.d.ts.map +0 -1
- package/dist/opportunity/feed/feed.health.js.map +0 -1
- package/dist/opportunity/feed/feed.state.d.ts.map +0 -1
- package/dist/opportunity/feed/feed.state.js.map +0 -1
- package/dist/opportunity/negotiation-context.loader.d.ts.map +0 -1
- package/dist/opportunity/negotiation-context.loader.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.env.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.env.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.extractor.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.extractor.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.miner.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.miner.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.shadow.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.shadow.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.types.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.types.js.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.verifier.d.ts.map +0 -1
- package/dist/opportunity/negotiation-evidence/negotiation-evidence.verifier.js.map +0 -1
- package/dist/opportunity/negotiation-summary.builder.d.ts.map +0 -1
- package/dist/opportunity/negotiation-summary.builder.js.map +0 -1
- package/dist/opportunity/opportunity.actor.d.ts.map +0 -1
- package/dist/opportunity/opportunity.actor.js.map +0 -1
- package/dist/opportunity/opportunity.claim-safety.d.ts.map +0 -1
- package/dist/opportunity/opportunity.claim-safety.js.map +0 -1
- package/dist/opportunity/opportunity.discover.d.ts.map +0 -1
- package/dist/opportunity/opportunity.discover.js.map +0 -1
- package/dist/opportunity/opportunity.enricher.d.ts.map +0 -1
- package/dist/opportunity/opportunity.enricher.js.map +0 -1
- package/dist/opportunity/opportunity.evaluator.d.ts.map +0 -1
- package/dist/opportunity/opportunity.evaluator.js.map +0 -1
- package/dist/opportunity/opportunity.evidence.d.ts.map +0 -1
- package/dist/opportunity/opportunity.evidence.js.map +0 -1
- package/dist/opportunity/opportunity.graph.d.ts.map +0 -1
- package/dist/opportunity/opportunity.graph.js.map +0 -1
- package/dist/opportunity/opportunity.introducer.d.ts.map +0 -1
- package/dist/opportunity/opportunity.introducer.js.map +0 -1
- package/dist/opportunity/opportunity.labels.d.ts.map +0 -1
- package/dist/opportunity/opportunity.labels.js.map +0 -1
- package/dist/opportunity/opportunity.pending-questions.d.ts.map +0 -1
- package/dist/opportunity/opportunity.pending-questions.js.map +0 -1
- package/dist/opportunity/opportunity.persist.d.ts.map +0 -1
- package/dist/opportunity/opportunity.persist.js.map +0 -1
- package/dist/opportunity/opportunity.presentation-cache.d.ts.map +0 -1
- package/dist/opportunity/opportunity.presentation-cache.js.map +0 -1
- package/dist/opportunity/opportunity.presentation.d.ts.map +0 -1
- package/dist/opportunity/opportunity.presentation.js.map +0 -1
- package/dist/opportunity/opportunity.presenter.d.ts.map +0 -1
- package/dist/opportunity/opportunity.presenter.js.map +0 -1
- package/dist/opportunity/opportunity.safe-presentation.d.ts.map +0 -1
- package/dist/opportunity/opportunity.safe-presentation.js.map +0 -1
- package/dist/opportunity/opportunity.state.d.ts.map +0 -1
- package/dist/opportunity/opportunity.state.js.map +0 -1
- package/dist/opportunity/opportunity.tools.d.ts.map +0 -1
- package/dist/opportunity/opportunity.tools.js.map +0 -1
- package/dist/opportunity/opportunity.utils.d.ts.map +0 -1
- package/dist/opportunity/opportunity.utils.js.map +0 -1
- package/dist/opportunity/outcome/outcome.env.d.ts.map +0 -1
- package/dist/opportunity/outcome/outcome.env.js.map +0 -1
- package/dist/opportunity/outcome/outcome.hypotheses.d.ts.map +0 -1
- package/dist/opportunity/outcome/outcome.hypotheses.js.map +0 -1
- package/dist/opportunity/outcome/outcome.shadow.d.ts.map +0 -1
- package/dist/opportunity/outcome/outcome.shadow.js.map +0 -1
- package/dist/opportunity/outcome/outcome.types.d.ts.map +0 -1
- package/dist/opportunity/outcome/outcome.types.js.map +0 -1
- package/dist/premise/premise.analyzer.d.ts.map +0 -1
- package/dist/premise/premise.analyzer.js.map +0 -1
- package/dist/premise/premise.decomposer.d.ts.map +0 -1
- package/dist/premise/premise.decomposer.js.map +0 -1
- package/dist/premise/premise.graph.d.ts.map +0 -1
- package/dist/premise/premise.graph.js.map +0 -1
- package/dist/premise/premise.indexer.d.ts.map +0 -1
- package/dist/premise/premise.indexer.js.map +0 -1
- package/dist/premise/premise.state.d.ts.map +0 -1
- package/dist/premise/premise.state.js.map +0 -1
- package/dist/premise/premise.tools.d.ts.map +0 -1
- package/dist/premise/premise.tools.js.map +0 -1
- package/dist/questioner/questioner.agent.d.ts.map +0 -1
- package/dist/questioner/questioner.agent.js.map +0 -1
- package/dist/questioner/questioner.ask.tool.d.ts.map +0 -1
- package/dist/questioner/questioner.ask.tool.js.map +0 -1
- package/dist/questioner/questioner.discovery.prompt.d.ts.map +0 -1
- package/dist/questioner/questioner.discovery.prompt.js.map +0 -1
- package/dist/questioner/questioner.env.d.ts.map +0 -1
- package/dist/questioner/questioner.env.js.map +0 -1
- package/dist/questioner/questioner.presets.d.ts.map +0 -1
- package/dist/questioner/questioner.presets.js.map +0 -1
- package/dist/questioner/questioner.qud.d.ts.map +0 -1
- package/dist/questioner/questioner.qud.js.map +0 -1
- package/dist/questioner/questioner.tools.d.ts.map +0 -1
- package/dist/questioner/questioner.tools.js.map +0 -1
- package/dist/questioner/questioner.types.d.ts.map +0 -1
- package/dist/questioner/questioner.types.js.map +0 -1
- package/dist/shared/agent/model-signal.d.ts.map +0 -1
- package/dist/shared/agent/model-signal.js.map +0 -1
- package/dist/shared/agent/model.config.d.ts.map +0 -1
- package/dist/shared/agent/model.config.js.map +0 -1
- package/dist/shared/agent/tests/llm-assert.d.ts +0 -11
- package/dist/shared/agent/tests/llm-assert.d.ts.map +0 -1
- package/dist/shared/agent/tests/llm-assert.js +0 -43
- package/dist/shared/agent/tests/llm-assert.js.map +0 -1
- package/dist/shared/agent/tool.factory.d.ts.map +0 -1
- package/dist/shared/agent/tool.factory.js.map +0 -1
- package/dist/shared/agent/tool.helpers.d.ts.map +0 -1
- package/dist/shared/agent/tool.helpers.js.map +0 -1
- package/dist/shared/agent/tool.registry.d.ts.map +0 -1
- package/dist/shared/agent/tool.registry.js.map +0 -1
- package/dist/shared/agent/tool.runtime.d.ts.map +0 -1
- package/dist/shared/agent/tool.runtime.js.map +0 -1
- package/dist/shared/agent/tool.scope.d.ts.map +0 -1
- package/dist/shared/agent/tool.scope.js.map +0 -1
- package/dist/shared/agent/utility.tools.d.ts.map +0 -1
- package/dist/shared/agent/utility.tools.js.map +0 -1
- package/dist/shared/assignment/network-assignment.policy.d.ts.map +0 -1
- package/dist/shared/assignment/network-assignment.policy.js.map +0 -1
- package/dist/shared/hyde/hyde.documents.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.documents.js.map +0 -1
- package/dist/shared/hyde/hyde.env.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.env.js.map +0 -1
- package/dist/shared/hyde/hyde.frame.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.frame.js.map +0 -1
- package/dist/shared/hyde/hyde.generator.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.generator.js.map +0 -1
- package/dist/shared/hyde/hyde.graph.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.graph.js.map +0 -1
- package/dist/shared/hyde/hyde.state.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.state.js.map +0 -1
- package/dist/shared/hyde/hyde.strategies.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.strategies.js.map +0 -1
- package/dist/shared/hyde/hyde.validator.d.ts.map +0 -1
- package/dist/shared/hyde/hyde.validator.js.map +0 -1
- package/dist/shared/hyde/lens.inferrer.d.ts.map +0 -1
- package/dist/shared/hyde/lens.inferrer.js.map +0 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/agent-dispatcher.interface.js.map +0 -1
- package/dist/shared/interfaces/agent.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/agent.interface.js.map +0 -1
- package/dist/shared/interfaces/auth.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/auth.interface.js.map +0 -1
- package/dist/shared/interfaces/cache.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/cache.interface.js.map +0 -1
- package/dist/shared/interfaces/chat-message-writer.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/chat-message-writer.interface.js.map +0 -1
- package/dist/shared/interfaces/chat-session.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/chat-session.interface.js.map +0 -1
- package/dist/shared/interfaces/chat-summary.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/chat-summary.interface.js.map +0 -1
- package/dist/shared/interfaces/connect-link.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/connect-link.interface.js.map +0 -1
- package/dist/shared/interfaces/contact.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/contact.interface.js.map +0 -1
- package/dist/shared/interfaces/database.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/database.interface.js.map +0 -1
- package/dist/shared/interfaces/delivery-ledger.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/delivery-ledger.interface.js.map +0 -1
- package/dist/shared/interfaces/discovery-run.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/discovery-run.interface.js.map +0 -1
- package/dist/shared/interfaces/embedder.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/embedder.interface.js.map +0 -1
- package/dist/shared/interfaces/enrichment-run.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/enrichment-run.interface.js.map +0 -1
- package/dist/shared/interfaces/enrichment.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/enrichment.interface.js.map +0 -1
- package/dist/shared/interfaces/integration.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/integration.interface.js.map +0 -1
- package/dist/shared/interfaces/negotiation-events.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/negotiation-events.interface.js.map +0 -1
- package/dist/shared/interfaces/negotiation-summary.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/negotiation-summary.interface.js.map +0 -1
- package/dist/shared/interfaces/negotiator-memory.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/negotiator-memory.interface.js.map +0 -1
- package/dist/shared/interfaces/question-generator.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/question-generator.interface.js.map +0 -1
- package/dist/shared/interfaces/questioner.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/questioner.interface.js.map +0 -1
- package/dist/shared/interfaces/queue.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/queue.interface.js.map +0 -1
- package/dist/shared/interfaces/scraper.interface.d.ts.map +0 -1
- package/dist/shared/interfaces/scraper.interface.js.map +0 -1
- package/dist/shared/network/metadata.renderer.d.ts.map +0 -1
- package/dist/shared/network/metadata.renderer.js.map +0 -1
- package/dist/shared/observability/debug-meta.sanitizer.d.ts.map +0 -1
- package/dist/shared/observability/debug-meta.sanitizer.js.map +0 -1
- package/dist/shared/observability/log.d.ts.map +0 -1
- package/dist/shared/observability/log.js.map +0 -1
- package/dist/shared/observability/performance.d.ts.map +0 -1
- package/dist/shared/observability/performance.js.map +0 -1
- package/dist/shared/observability/protocol.logger.d.ts.map +0 -1
- package/dist/shared/observability/protocol.logger.js.map +0 -1
- package/dist/shared/observability/request-context.d.ts.map +0 -1
- package/dist/shared/observability/request-context.js.map +0 -1
- package/dist/shared/observability/trace.d.ts.map +0 -1
- package/dist/shared/observability/trace.js.map +0 -1
- package/dist/shared/schemas/chat-context.schema.d.ts.map +0 -1
- package/dist/shared/schemas/chat-context.schema.js.map +0 -1
- package/dist/shared/schemas/discovery-question.schema.d.ts.map +0 -1
- package/dist/shared/schemas/discovery-question.schema.js.map +0 -1
- package/dist/shared/schemas/identity.schema.d.ts.map +0 -1
- package/dist/shared/schemas/identity.schema.js.map +0 -1
- package/dist/shared/schemas/mcp-auth.schema.d.ts.map +0 -1
- package/dist/shared/schemas/mcp-auth.schema.js.map +0 -1
- package/dist/shared/schemas/negotiation-digest.schema.d.ts.map +0 -1
- package/dist/shared/schemas/negotiation-digest.schema.js.map +0 -1
- package/dist/shared/schemas/negotiation-state.schema.d.ts.map +0 -1
- package/dist/shared/schemas/negotiation-state.schema.js.map +0 -1
- package/dist/shared/schemas/network-assignment.schema.d.ts.map +0 -1
- package/dist/shared/schemas/network-assignment.schema.js.map +0 -1
- package/dist/shared/schemas/pending-question.schema.d.ts.map +0 -1
- package/dist/shared/schemas/pending-question.schema.js.map +0 -1
- package/dist/shared/schemas/question.schema.d.ts.map +0 -1
- package/dist/shared/schemas/question.schema.js.map +0 -1
- package/dist/shared/ui/lucide.icon-catalog.d.ts.map +0 -1
- package/dist/shared/ui/lucide.icon-catalog.js.map +0 -1
- package/dist/shared/utils/social-label.d.ts.map +0 -1
- package/dist/shared/utils/social-label.js.map +0 -1
- package/dist/shared/utils/telegram-handle.d.ts.map +0 -1
- package/dist/shared/utils/telegram-handle.js.map +0 -1
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* opportunity/application — LLM agents, LangGraph graphs, effectful orchestration.
|
|
3
|
+
*
|
|
4
|
+
* ## What lives here (flat files)
|
|
5
|
+
* - Opportunity lifecycle transitions (opportunity.lifecycle.ts)
|
|
6
|
+
* - Enricher: merge overlapping opportunities (opportunity.enricher.ts)
|
|
7
|
+
* - Persistence coordinator (opportunity.persist.ts)
|
|
8
|
+
* - Persistence admission gate (opportunity.persistence-admission.ts)
|
|
9
|
+
* - Update admission gate (opportunity.update-admission.ts)
|
|
10
|
+
* - Newborn-opportunity stamping (opportunity.newborn-stamping.ts)
|
|
11
|
+
* - LLM evaluator (opportunity.evaluator.ts)
|
|
12
|
+
* - LLM presenter agent (opportunity.presenter.ts)
|
|
13
|
+
* - Introducer discovery (opportunity.introducer.ts)
|
|
14
|
+
* - Existing-negotiation path (opportunity.existing-negotiation.ts)
|
|
15
|
+
* - Opportunity LangGraph (opportunity.graph.ts)
|
|
16
|
+
* - MCP discover flow (opportunity.discover.ts)
|
|
17
|
+
* - Card presentation builder (opportunity.card-presentation.ts)
|
|
18
|
+
* - Discovery continuation finalization (opportunity.discovery-continuation-finalization.ts)
|
|
19
|
+
* - MCP lifecycle finalization (opportunity.discovery-mcp-lifecycle-finalization.ts)
|
|
20
|
+
* - Negotiation summary helper (opportunity.discovery-negotiation-summary.ts)
|
|
21
|
+
* - Negotiation context loader (negotiation-context.loader.ts)
|
|
22
|
+
* - Feed selection (opportunity.feed-selection.ts)
|
|
23
|
+
* - Delivery card cache (delivery-card.cache.ts)
|
|
24
|
+
* - Pending questions merger (opportunity.pending-questions.ts)
|
|
25
|
+
*
|
|
26
|
+
* ## What lives in subdirectories (exported by path, not moved)
|
|
27
|
+
* - discriminator/ — miner, assigner, shadow orchestrator
|
|
28
|
+
* - negotiation-evidence/ — miner, shadow orchestrator
|
|
29
|
+
* - outcome/ — shadow orchestrator
|
|
30
|
+
* - feed/ — home feed categorizer and graph
|
|
31
|
+
*
|
|
32
|
+
* IND-551: canonical application layer for the opportunities capability.
|
|
33
|
+
*/
|
|
34
|
+
export * from "./opportunity.lifecycle.js";
|
|
35
|
+
export * from "./opportunity.enricher.js";
|
|
36
|
+
export * from "./opportunity.persist.js";
|
|
37
|
+
export * from "./opportunity.persistence-admission.js";
|
|
38
|
+
export * from "./opportunity.update-admission.js";
|
|
39
|
+
export * from "./opportunity.newborn-stamping.js";
|
|
40
|
+
export * from "./opportunity.evaluator.js";
|
|
41
|
+
export * from "./opportunity.presenter.js";
|
|
42
|
+
export * from "./opportunity.introducer.js";
|
|
43
|
+
export * from "./opportunity.existing-negotiation.js";
|
|
44
|
+
export * from "./opportunity.graph.js";
|
|
45
|
+
export * from "./opportunity.discover.js";
|
|
46
|
+
export * from "./opportunity.card-presentation.js";
|
|
47
|
+
export * from "./opportunity.discovery-continuation-finalization.js";
|
|
48
|
+
export * from "./opportunity.discovery-mcp-lifecycle-finalization.js";
|
|
49
|
+
export * from "./opportunity.discovery-negotiation-summary.js";
|
|
50
|
+
export * from "./negotiation-context.loader.js";
|
|
51
|
+
export * from "./opportunity.feed-selection.js";
|
|
52
|
+
export * from "./delivery-card.cache.js";
|
|
53
|
+
export * from "./opportunity.pending-questions.js";
|
|
54
|
+
export * from "./opportunity.tools.js";
|
|
55
|
+
export { PoolDiscriminatorMiner } from "../discriminator/discriminator.miner.js";
|
|
56
|
+
export { PoolDiscriminatorAssigner, } from "../discriminator/discriminator.assigner.js";
|
|
57
|
+
export type { PoolDiscriminatorAssignmentInput, PoolDiscriminatorAssignedAxis, } from "../discriminator/discriminator.assigner.js";
|
|
58
|
+
export { runPoolDiscriminatorShadow } from "../discriminator/discriminator.shadow.js";
|
|
59
|
+
export { NegotiationEvidenceMiner } from "../negotiation-evidence/negotiation-evidence.miner.js";
|
|
60
|
+
export { runNegotiationEvidenceShadow } from "../negotiation-evidence/negotiation-evidence.shadow.js";
|
|
61
|
+
export { runOutcomeShadow } from "../outcome/outcome.shadow.js";
|
|
62
|
+
export { HomeGraphFactory } from "../feed/feed.graph.js";
|
|
63
|
+
export { HomeCategorizerAgent } from "../feed/feed.categorizer.js";
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* opportunity/application — LLM agents, LangGraph graphs, effectful orchestration.
|
|
3
|
+
*
|
|
4
|
+
* ## What lives here (flat files)
|
|
5
|
+
* - Opportunity lifecycle transitions (opportunity.lifecycle.ts)
|
|
6
|
+
* - Enricher: merge overlapping opportunities (opportunity.enricher.ts)
|
|
7
|
+
* - Persistence coordinator (opportunity.persist.ts)
|
|
8
|
+
* - Persistence admission gate (opportunity.persistence-admission.ts)
|
|
9
|
+
* - Update admission gate (opportunity.update-admission.ts)
|
|
10
|
+
* - Newborn-opportunity stamping (opportunity.newborn-stamping.ts)
|
|
11
|
+
* - LLM evaluator (opportunity.evaluator.ts)
|
|
12
|
+
* - LLM presenter agent (opportunity.presenter.ts)
|
|
13
|
+
* - Introducer discovery (opportunity.introducer.ts)
|
|
14
|
+
* - Existing-negotiation path (opportunity.existing-negotiation.ts)
|
|
15
|
+
* - Opportunity LangGraph (opportunity.graph.ts)
|
|
16
|
+
* - MCP discover flow (opportunity.discover.ts)
|
|
17
|
+
* - Card presentation builder (opportunity.card-presentation.ts)
|
|
18
|
+
* - Discovery continuation finalization (opportunity.discovery-continuation-finalization.ts)
|
|
19
|
+
* - MCP lifecycle finalization (opportunity.discovery-mcp-lifecycle-finalization.ts)
|
|
20
|
+
* - Negotiation summary helper (opportunity.discovery-negotiation-summary.ts)
|
|
21
|
+
* - Negotiation context loader (negotiation-context.loader.ts)
|
|
22
|
+
* - Feed selection (opportunity.feed-selection.ts)
|
|
23
|
+
* - Delivery card cache (delivery-card.cache.ts)
|
|
24
|
+
* - Pending questions merger (opportunity.pending-questions.ts)
|
|
25
|
+
*
|
|
26
|
+
* ## What lives in subdirectories (exported by path, not moved)
|
|
27
|
+
* - discriminator/ — miner, assigner, shadow orchestrator
|
|
28
|
+
* - negotiation-evidence/ — miner, shadow orchestrator
|
|
29
|
+
* - outcome/ — shadow orchestrator
|
|
30
|
+
* - feed/ — home feed categorizer and graph
|
|
31
|
+
*
|
|
32
|
+
* IND-551: canonical application layer for the opportunities capability.
|
|
33
|
+
*/
|
|
34
|
+
// ── Flat application files ────────────────────────────────────────────────────
|
|
35
|
+
export * from "./opportunity.lifecycle.js";
|
|
36
|
+
export * from "./opportunity.enricher.js";
|
|
37
|
+
export * from "./opportunity.persist.js";
|
|
38
|
+
export * from "./opportunity.persistence-admission.js";
|
|
39
|
+
export * from "./opportunity.update-admission.js";
|
|
40
|
+
export * from "./opportunity.newborn-stamping.js";
|
|
41
|
+
export * from "./opportunity.evaluator.js";
|
|
42
|
+
export * from "./opportunity.presenter.js";
|
|
43
|
+
export * from "./opportunity.introducer.js";
|
|
44
|
+
export * from "./opportunity.existing-negotiation.js";
|
|
45
|
+
export * from "./opportunity.graph.js";
|
|
46
|
+
export * from "./opportunity.discover.js";
|
|
47
|
+
export * from "./opportunity.card-presentation.js";
|
|
48
|
+
export * from "./opportunity.discovery-continuation-finalization.js";
|
|
49
|
+
export * from "./opportunity.discovery-mcp-lifecycle-finalization.js";
|
|
50
|
+
export * from "./opportunity.discovery-negotiation-summary.js";
|
|
51
|
+
export * from "./negotiation-context.loader.js";
|
|
52
|
+
export * from "./opportunity.feed-selection.js";
|
|
53
|
+
export * from "./delivery-card.cache.js";
|
|
54
|
+
export * from "./opportunity.pending-questions.js";
|
|
55
|
+
export * from "./opportunity.tools.js";
|
|
56
|
+
// ── Subdirectory application exports ─────────────────────────────────────────
|
|
57
|
+
// discriminator application
|
|
58
|
+
export { PoolDiscriminatorMiner } from "../discriminator/discriminator.miner.js";
|
|
59
|
+
export { PoolDiscriminatorAssigner, } from "../discriminator/discriminator.assigner.js";
|
|
60
|
+
export { runPoolDiscriminatorShadow } from "../discriminator/discriminator.shadow.js";
|
|
61
|
+
// negotiation-evidence application
|
|
62
|
+
export { NegotiationEvidenceMiner } from "../negotiation-evidence/negotiation-evidence.miner.js";
|
|
63
|
+
export { runNegotiationEvidenceShadow } from "../negotiation-evidence/negotiation-evidence.shadow.js";
|
|
64
|
+
// outcome application
|
|
65
|
+
export { runOutcomeShadow } from "../outcome/outcome.shadow.js";
|
|
66
|
+
// feed application
|
|
67
|
+
export { HomeGraphFactory } from "../feed/feed.graph.js";
|
|
68
|
+
export { HomeCategorizerAgent } from "../feed/feed.categorizer.js";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Negotiation context loader: given an opportunity, fetches the attached
|
|
3
|
+
* negotiation task's transcript and outcome so the home-card presenter can
|
|
4
|
+
* explain *why* the opportunity surfaced.
|
|
5
|
+
*
|
|
6
|
+
* For `draft`, `latent`, and `expired` opportunities, no negotiation has
|
|
7
|
+
* happened (or no longer matters) so the loader returns null.
|
|
8
|
+
*
|
|
9
|
+
* For `negotiating` opportunities, only `turnCount` / `turnCap` are returned
|
|
10
|
+
* — the presenter renders a templated chip without invoking the LLM.
|
|
11
|
+
*
|
|
12
|
+
* For `pending`, `stalled`, `accepted`, and `rejected` opportunities, the
|
|
13
|
+
* full transcript and outcome are included so the prompt can ground its
|
|
14
|
+
* explanation in concrete turn content.
|
|
15
|
+
*
|
|
16
|
+
* Screened-out negotiations (P2.2 — the client's own outreach gate declined
|
|
17
|
+
* before any turn was exchanged) return null: presentation treats them as
|
|
18
|
+
* never-happened, so no card, feed, or digest surface can frame the client's
|
|
19
|
+
* private gate decision as a "counterparty declined" event.
|
|
20
|
+
*/
|
|
21
|
+
import type { NegotiationGraphDatabase, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
|
|
22
|
+
import type { NegotiationOutcome, NegotiationTurn } from '../../capabilities/negotiation.state.facade.js';
|
|
23
|
+
/**
|
|
24
|
+
* Narrow slice of {@link NegotiationGraphDatabase} required by the loader. Kept
|
|
25
|
+
* minimal so call sites can opt into a smaller surface.
|
|
26
|
+
*/
|
|
27
|
+
export type NegotiationContextDatabase = Pick<NegotiationGraphDatabase, 'getNegotiationTaskForOpportunity' | 'getMessagesForConversation' | 'getArtifactsForTask'>;
|
|
28
|
+
/**
|
|
29
|
+
* Snapshot of a negotiation surfaced to the presenter. `turns` and `outcome`
|
|
30
|
+
* are only populated for post-negotiation statuses (pending/stalled/
|
|
31
|
+
* accepted/rejected); `negotiating` gets only the counters.
|
|
32
|
+
*/
|
|
33
|
+
export interface NegotiationContext {
|
|
34
|
+
status: OpportunityStatus;
|
|
35
|
+
/**
|
|
36
|
+
* Conversation/task id of the A2A negotiation that produced this opportunity.
|
|
37
|
+
* Lets callers deep-link to the negotiation trace (e.g. `/chat/:conversationId`).
|
|
38
|
+
* Present whenever a negotiation task exists (i.e. context is non-null).
|
|
39
|
+
*/
|
|
40
|
+
conversationId: string;
|
|
41
|
+
turnCount: number;
|
|
42
|
+
/** Max turns allowed for this negotiation (0 = unlimited). */
|
|
43
|
+
turnCap: number;
|
|
44
|
+
/** Only present when status is not `negotiating`. */
|
|
45
|
+
outcome?: NegotiationOutcome;
|
|
46
|
+
/** Only present when status is not `negotiating`. */
|
|
47
|
+
turns?: NegotiationTurn[];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Loads the negotiation context for an opportunity.
|
|
51
|
+
*
|
|
52
|
+
* @param db - Narrow slice of NegotiationGraphDatabase.
|
|
53
|
+
* @param opportunityId - Opportunity to load negotiation context for.
|
|
54
|
+
* @param opportunityStatus - Current opportunity status. Used to gate loading
|
|
55
|
+
* and to decide which fields to populate.
|
|
56
|
+
* @returns NegotiationContext, or null when no meaningful negotiation exists
|
|
57
|
+
* (draft/latent/expired) or when the task lookup fails.
|
|
58
|
+
*/
|
|
59
|
+
export declare function loadNegotiationContext(db: NegotiationContextDatabase, opportunityId: string, opportunityStatus: OpportunityStatus): Promise<NegotiationContext | null>;
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Negotiation context loader: given an opportunity, fetches the attached
|
|
3
|
+
* negotiation task's transcript and outcome so the home-card presenter can
|
|
4
|
+
* explain *why* the opportunity surfaced.
|
|
5
|
+
*
|
|
6
|
+
* For `draft`, `latent`, and `expired` opportunities, no negotiation has
|
|
7
|
+
* happened (or no longer matters) so the loader returns null.
|
|
8
|
+
*
|
|
9
|
+
* For `negotiating` opportunities, only `turnCount` / `turnCap` are returned
|
|
10
|
+
* — the presenter renders a templated chip without invoking the LLM.
|
|
11
|
+
*
|
|
12
|
+
* For `pending`, `stalled`, `accepted`, and `rejected` opportunities, the
|
|
13
|
+
* full transcript and outcome are included so the prompt can ground its
|
|
14
|
+
* explanation in concrete turn content.
|
|
15
|
+
*
|
|
16
|
+
* Screened-out negotiations (P2.2 — the client's own outreach gate declined
|
|
17
|
+
* before any turn was exchanged) return null: presentation treats them as
|
|
18
|
+
* never-happened, so no card, feed, or digest surface can frame the client's
|
|
19
|
+
* private gate decision as a "counterparty declined" event.
|
|
20
|
+
*/
|
|
21
|
+
import { protocolLogger } from '../../shared/observability/protocol.logger.js';
|
|
22
|
+
const logger = protocolLogger('NegotiationContextLoader');
|
|
23
|
+
const STATUSES_WITH_NO_NEGOTIATION = ['draft', 'latent', 'expired'];
|
|
24
|
+
const NEGOTIATION_OUTCOME_ARTIFACT_NAME = 'negotiation-outcome';
|
|
25
|
+
/**
|
|
26
|
+
* Loads the negotiation context for an opportunity.
|
|
27
|
+
*
|
|
28
|
+
* @param db - Narrow slice of NegotiationGraphDatabase.
|
|
29
|
+
* @param opportunityId - Opportunity to load negotiation context for.
|
|
30
|
+
* @param opportunityStatus - Current opportunity status. Used to gate loading
|
|
31
|
+
* and to decide which fields to populate.
|
|
32
|
+
* @returns NegotiationContext, or null when no meaningful negotiation exists
|
|
33
|
+
* (draft/latent/expired) or when the task lookup fails.
|
|
34
|
+
*/
|
|
35
|
+
export async function loadNegotiationContext(db, opportunityId, opportunityStatus) {
|
|
36
|
+
if (STATUSES_WITH_NO_NEGOTIATION.includes(opportunityStatus)) {
|
|
37
|
+
return null;
|
|
38
|
+
}
|
|
39
|
+
const task = await db.getNegotiationTaskForOpportunity(opportunityId);
|
|
40
|
+
if (!task) {
|
|
41
|
+
logger.verbose('No negotiation task found for opportunity', { opportunityId, opportunityStatus });
|
|
42
|
+
return null;
|
|
43
|
+
}
|
|
44
|
+
const turnCap = readNumber(task.metadata, 'maxTurns') ?? 0;
|
|
45
|
+
const messages = await db.getMessagesForConversation(task.conversationId);
|
|
46
|
+
const turns = extractTurns(messages);
|
|
47
|
+
const turnCount = turns.length;
|
|
48
|
+
if (opportunityStatus === 'negotiating') {
|
|
49
|
+
return { status: opportunityStatus, conversationId: task.conversationId, turnCount, turnCap };
|
|
50
|
+
}
|
|
51
|
+
const artifacts = await db.getArtifactsForTask(task.id);
|
|
52
|
+
const outcome = extractOutcome(artifacts);
|
|
53
|
+
// P2.2: screened_out is the client's private gate decision, not a negotiation.
|
|
54
|
+
if (outcome?.reason === 'screened_out') {
|
|
55
|
+
return null;
|
|
56
|
+
}
|
|
57
|
+
return {
|
|
58
|
+
status: opportunityStatus,
|
|
59
|
+
conversationId: task.conversationId,
|
|
60
|
+
turnCount,
|
|
61
|
+
turnCap,
|
|
62
|
+
...(outcome ? { outcome } : {}),
|
|
63
|
+
turns,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
66
|
+
function readNumber(metadata, key) {
|
|
67
|
+
if (!metadata)
|
|
68
|
+
return undefined;
|
|
69
|
+
const value = metadata[key];
|
|
70
|
+
return typeof value === 'number' ? value : undefined;
|
|
71
|
+
}
|
|
72
|
+
function extractTurns(messages) {
|
|
73
|
+
const turns = [];
|
|
74
|
+
for (const message of messages) {
|
|
75
|
+
const dataPart = message.parts.find((p) => p.kind === 'data');
|
|
76
|
+
if (dataPart?.data) {
|
|
77
|
+
turns.push(dataPart.data);
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
return turns;
|
|
81
|
+
}
|
|
82
|
+
function extractOutcome(artifacts) {
|
|
83
|
+
const outcomeArtifact = artifacts.find((a) => a.name === NEGOTIATION_OUTCOME_ARTIFACT_NAME);
|
|
84
|
+
if (!outcomeArtifact)
|
|
85
|
+
return undefined;
|
|
86
|
+
const dataPart = outcomeArtifact.parts.find((p) => p.kind === 'data');
|
|
87
|
+
return dataPart?.data;
|
|
88
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Minimal shape consumed by buildOpportunityPresentation for prose rendering.
|
|
3
|
+
* Card data objects in the codebase carry additional frontend-only fields;
|
|
4
|
+
* only these are surfaced to MCP agents.
|
|
5
|
+
*/
|
|
6
|
+
export type OpportunityCardLike = Record<string, unknown> & {
|
|
7
|
+
opportunityId: string;
|
|
8
|
+
userId?: string | undefined;
|
|
9
|
+
name?: string | undefined;
|
|
10
|
+
mainText?: string | undefined;
|
|
11
|
+
digestSummary?: string | undefined;
|
|
12
|
+
status?: string | undefined;
|
|
13
|
+
feedCategory?: string | undefined;
|
|
14
|
+
acceptUrl?: string | undefined;
|
|
15
|
+
profileUrl?: string | undefined;
|
|
16
|
+
/** Deep-link to the A2A negotiation trace that produced this opportunity. */
|
|
17
|
+
negotiationUrl?: string | undefined;
|
|
18
|
+
score?: number | undefined;
|
|
19
|
+
/** Digest-mode cooldown re-show — the user has seen this card before. */
|
|
20
|
+
redelivery?: boolean | undefined;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Format opportunity cards into the "opportunities" portion of a tool response.
|
|
24
|
+
*
|
|
25
|
+
* Web chat (`isMcp=false`): emits ```opportunity``` code fences with an
|
|
26
|
+
* "include EXACTLY as-is" directive so the frontend card renderer can parse
|
|
27
|
+
* and render interactive cards.
|
|
28
|
+
*
|
|
29
|
+
* MCP (`isMcp=true`): emits prose (name, reason, status, profileUrl when
|
|
30
|
+
* present, acceptUrl when present, feedCategory when present) and includes
|
|
31
|
+
* `opportunityId` ONLY for cards without an `acceptUrl` — exposing the UUID
|
|
32
|
+
* alongside an actionable link gave LLMs a foothold to hallucinate bare
|
|
33
|
+
* `/api/opportunities/<id>/connect` URLs (see IND-271). The trailing
|
|
34
|
+
* instruction reminds the agent to synthesize in natural language and never
|
|
35
|
+
* fabricate URLs for cards that don't have them. MCP clients have no card
|
|
36
|
+
* renderer, so code fences would surface as raw JSON to end users.
|
|
37
|
+
*/
|
|
38
|
+
export declare function buildOpportunityPresentation(inputCards: OpportunityCardLike[], opts: {
|
|
39
|
+
isMcp: boolean;
|
|
40
|
+
leadIn: string;
|
|
41
|
+
label?: 'opportunity' | 'opportunities';
|
|
42
|
+
/** Include hidden digest metadata markers so scheduled brief tooling can confirm delivery. */
|
|
43
|
+
includeDigestMarkers?: boolean;
|
|
44
|
+
}): string;
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { stripUnsupportedOpportunityClaims } from '../domain/opportunity.claim-safety.js';
|
|
2
|
+
import { stripUuids } from '../domain/opportunity.presentation.js';
|
|
3
|
+
const CODE_FENCE = String.fromCharCode(96, 96, 96);
|
|
4
|
+
function sanitizeJsonForCodeFence(json) {
|
|
5
|
+
return json.replace(/`/g, '\\u0060');
|
|
6
|
+
}
|
|
7
|
+
function sanitizeOpportunityCardProse(card) {
|
|
8
|
+
const sanitized = { ...card };
|
|
9
|
+
for (const key of ['mainText', 'digestSummary', 'headline', 'cta', 'mutualIntentsLabel']) {
|
|
10
|
+
const value = card[key];
|
|
11
|
+
if (typeof value === 'string') {
|
|
12
|
+
sanitized[key] = stripUnsupportedOpportunityClaims(stripUuids(value)) || 'A suggested connection.';
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
const narratorChip = card.narratorChip;
|
|
16
|
+
if (narratorChip && typeof narratorChip === 'object' && !Array.isArray(narratorChip)) {
|
|
17
|
+
const narrator = narratorChip;
|
|
18
|
+
if (typeof narrator.text === 'string') {
|
|
19
|
+
sanitized.narratorChip = {
|
|
20
|
+
...narrator,
|
|
21
|
+
text: stripUnsupportedOpportunityClaims(stripUuids(narrator.text)) || 'A potential connection worth exploring.',
|
|
22
|
+
};
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
return sanitized;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Format opportunity cards into the "opportunities" portion of a tool response.
|
|
29
|
+
*
|
|
30
|
+
* Web chat (`isMcp=false`): emits ```opportunity``` code fences with an
|
|
31
|
+
* "include EXACTLY as-is" directive so the frontend card renderer can parse
|
|
32
|
+
* and render interactive cards.
|
|
33
|
+
*
|
|
34
|
+
* MCP (`isMcp=true`): emits prose (name, reason, status, profileUrl when
|
|
35
|
+
* present, acceptUrl when present, feedCategory when present) and includes
|
|
36
|
+
* `opportunityId` ONLY for cards without an `acceptUrl` — exposing the UUID
|
|
37
|
+
* alongside an actionable link gave LLMs a foothold to hallucinate bare
|
|
38
|
+
* `/api/opportunities/<id>/connect` URLs (see IND-271). The trailing
|
|
39
|
+
* instruction reminds the agent to synthesize in natural language and never
|
|
40
|
+
* fabricate URLs for cards that don't have them. MCP clients have no card
|
|
41
|
+
* renderer, so code fences would surface as raw JSON to end users.
|
|
42
|
+
*/
|
|
43
|
+
export function buildOpportunityPresentation(inputCards, opts) {
|
|
44
|
+
const cards = inputCards.map(sanitizeOpportunityCardProse);
|
|
45
|
+
if (cards.length === 0)
|
|
46
|
+
return opts.leadIn;
|
|
47
|
+
if (opts.isMcp) {
|
|
48
|
+
const prose = cards
|
|
49
|
+
.map((card, i) => {
|
|
50
|
+
const lines = [`${i + 1}. ${card.name ?? "Unknown"}`];
|
|
51
|
+
if (opts.includeDigestMarkers) {
|
|
52
|
+
const markerId = String(card.opportunityId).replace(/[\s>]/g, "");
|
|
53
|
+
if (markerId)
|
|
54
|
+
lines.push(` <!-- digest-opportunity:id=${markerId} -->`);
|
|
55
|
+
}
|
|
56
|
+
if (opts.includeDigestMarkers && card.digestSummary) {
|
|
57
|
+
lines.push(` ${card.digestSummary}`);
|
|
58
|
+
}
|
|
59
|
+
else if (card.mainText) {
|
|
60
|
+
lines.push(` ${card.mainText}`);
|
|
61
|
+
}
|
|
62
|
+
if (card.status)
|
|
63
|
+
lines.push(` status: ${card.status}`);
|
|
64
|
+
if (card.profileUrl)
|
|
65
|
+
lines.push(` profileUrl: ${card.profileUrl}`);
|
|
66
|
+
if (card.acceptUrl)
|
|
67
|
+
lines.push(` acceptUrl: ${card.acceptUrl}`);
|
|
68
|
+
if (opts.includeDigestMarkers && card.negotiationUrl)
|
|
69
|
+
lines.push(` negotiationUrl: ${card.negotiationUrl}`);
|
|
70
|
+
if (card.feedCategory)
|
|
71
|
+
lines.push(` feedCategory: ${card.feedCategory}`);
|
|
72
|
+
if (opts.includeDigestMarkers && card.score != null)
|
|
73
|
+
lines.push(` confidence: ${Math.round(card.score * 100)}`);
|
|
74
|
+
if (opts.includeDigestMarkers && card.redelivery)
|
|
75
|
+
lines.push(` redelivery: true`);
|
|
76
|
+
// Only surface opportunityId when there's no acceptUrl. Exposing the
|
|
77
|
+
// UUID alongside an actionable link gives the LLM a foothold to
|
|
78
|
+
// hallucinate bare `/api/opportunities/<id>/connect` URLs.
|
|
79
|
+
if (!card.acceptUrl) {
|
|
80
|
+
lines.push(` opportunityId: ${card.opportunityId}`);
|
|
81
|
+
}
|
|
82
|
+
return lines.join("\n");
|
|
83
|
+
})
|
|
84
|
+
.join("\n\n");
|
|
85
|
+
const hasLinks = cards.some((c) => c.acceptUrl);
|
|
86
|
+
const hasOpportunityIds = cards.some((c) => !c.acceptUrl);
|
|
87
|
+
const linkInstructions = hasLinks
|
|
88
|
+
? `For each card that has an acceptUrl, embed it on a short verb phrase (e.g. "message [Name]" for connection, "make intro" for connector-flow). For each card that has a profileUrl, link the person's name to it. Some cards may have neither — render those as plain text and never fabricate URLs for them. The acceptUrl is opaque and self-contained — embed it verbatim. Do NOT append, encode, or modify any part of any URL. Never render link strips or tables — weave URLs into prose. `
|
|
89
|
+
: "";
|
|
90
|
+
const idInstructions = hasOpportunityIds
|
|
91
|
+
? `Use opportunityId values only when calling update_opportunity (send/accept/reject) or confirm_opportunity_delivery.`
|
|
92
|
+
: "";
|
|
93
|
+
return (`${opts.leadIn}\n\n${prose}\n\n` +
|
|
94
|
+
`Summarize these for the user in natural prose — mention first names and a brief match reason per connection. ` +
|
|
95
|
+
`${linkInstructions}` +
|
|
96
|
+
`Do NOT print raw JSON, field labels, or opportunityIds. ` +
|
|
97
|
+
`${idInstructions}`);
|
|
98
|
+
}
|
|
99
|
+
const label = opts.label ?? (cards.length === 1 ? "opportunity" : "opportunities");
|
|
100
|
+
const blocks = cards
|
|
101
|
+
.map((card) => CODE_FENCE + "opportunity\n" + sanitizeJsonForCodeFence(JSON.stringify(card)) + "\n" + CODE_FENCE)
|
|
102
|
+
.join("\n\n");
|
|
103
|
+
return (`${opts.leadIn} IMPORTANT: Include the following ${CODE_FENCE}${label} code blocks EXACTLY as-is in your response (they render as interactive cards):\n\n${blocks}`);
|
|
104
|
+
}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Run discovery from an ad-hoc query (e.g. chat "find me a mentor", "who needs a React developer").
|
|
3
|
+
*
|
|
4
|
+
* Invokes the opportunity graph with the query as sourceText. The HyDE graph's
|
|
5
|
+
* LensInferrer automatically infers search lenses from the query, replacing the
|
|
6
|
+
* old hardcoded strategy selection. Returns formatted candidates (enriched with
|
|
7
|
+
* profile name/bio) for chat display.
|
|
8
|
+
*
|
|
9
|
+
* Used by the discover_opportunities chat tool.
|
|
10
|
+
*/
|
|
11
|
+
import type { ChatGraphCompositeDatabase, UserRecord } from "../../shared/interfaces/database.interface.js";
|
|
12
|
+
import type { Cache } from "../../shared/interfaces/cache.interface.js";
|
|
13
|
+
import type { QuestionerEnqueueFn } from "../../capabilities/questions.enqueue.facade.js";
|
|
14
|
+
import type { ToolScopeType } from "../../shared/agent/tool.scope.js";
|
|
15
|
+
import { OpportunityPresenter, type OpportunityPresentationResult, type HomeCardPresentationResult } from "./opportunity.presenter.js";
|
|
16
|
+
import type { ChatSummaryReader } from "../../shared/interfaces/chat-summary.interface.js";
|
|
17
|
+
import type { QuestionGeneratorReader } from "../../shared/interfaces/question-generator.interface.js";
|
|
18
|
+
import type { NegotiationSummaryReader } from "../../shared/interfaces/negotiation-summary.interface.js";
|
|
19
|
+
import type { Question, QuestionStrategy } from "../../shared/schemas/question.schema.js";
|
|
20
|
+
import type { DiscoverDebugStep } from '../domain/opportunity.discovery.contracts.js';
|
|
21
|
+
/** Compiled opportunity graph (from OpportunityGraphFactory.createGraph()). */
|
|
22
|
+
export type CompiledOpportunityGraph = ReturnType<import("./opportunity.graph.js").OpportunityGraphFactory["createGraph"]>;
|
|
23
|
+
export interface DiscoverInput {
|
|
24
|
+
/** Compiled opportunity graph (already has DB, embedder, cache, HyDE graph). */
|
|
25
|
+
opportunityGraph: CompiledOpportunityGraph;
|
|
26
|
+
/** Database for enriching candidates with profile (getProfile). */
|
|
27
|
+
database: ChatGraphCompositeDatabase;
|
|
28
|
+
userId: string;
|
|
29
|
+
query: string;
|
|
30
|
+
indexScope: string[];
|
|
31
|
+
limit?: number;
|
|
32
|
+
/** Optional intent to use as discovery source and for triggeredBy (e.g. from opportunity queue). */
|
|
33
|
+
triggerIntentId?: string;
|
|
34
|
+
/** When set, filter discovery candidates to this specific user only (direct connection). */
|
|
35
|
+
targetUserId?: string;
|
|
36
|
+
/** When set, discover on behalf of this user (introducer flow). The caller (userId) becomes the introducer. */
|
|
37
|
+
onBehalfOfUserId?: string;
|
|
38
|
+
/** When provided, each opportunity is enriched with personalized presentation (headline, personalizedSummary, suggestedAction). */
|
|
39
|
+
presenter?: OpportunityPresenter;
|
|
40
|
+
/**
|
|
41
|
+
* When true, use the full home card presentation format (with narratorRemark, action labels, mutualIntentsLabel).
|
|
42
|
+
* This enables rendering the same rich opportunity cards in chat as on the home page.
|
|
43
|
+
*/
|
|
44
|
+
useHomeCardFormat?: boolean;
|
|
45
|
+
/**
|
|
46
|
+
* When true, skip the LLM presenter and return minimal card data only (faster for chat).
|
|
47
|
+
* Sets homeCardPresentation and narratorChip from static labels and match reason.
|
|
48
|
+
*/
|
|
49
|
+
minimalForChat?: boolean;
|
|
50
|
+
/** When set (e.g. from chat), create opportunities as draft with context.conversationId = chatSessionId. */
|
|
51
|
+
chatSessionId?: string;
|
|
52
|
+
/** Redis cache for discovery pagination. When provided, remaining candidates are cached for continuation. */
|
|
53
|
+
cache?: Cache;
|
|
54
|
+
/**
|
|
55
|
+
* Which flow is invoking discovery. Drives the graph's trigger-aware branches
|
|
56
|
+
* in persist (initial status) and negotiate (park window + streaming). When
|
|
57
|
+
* omitted, the graph defaults to 'ambient'. Pass 'orchestrator' from the
|
|
58
|
+
* chat `discover_opportunities` tool so users see drafts stream in and the
|
|
59
|
+
* accepted-pair lookup surfaces existing connections.
|
|
60
|
+
*/
|
|
61
|
+
trigger?: 'ambient' | 'orchestrator';
|
|
62
|
+
/**
|
|
63
|
+
* MCP-only. When set, the opportunity graph's negotiate phase is capped at
|
|
64
|
+
* this many milliseconds; on timeout the caller gets whichever candidates
|
|
65
|
+
* finished, the rest stay in `negotiating` and finalize in the background.
|
|
66
|
+
* Chat, ambient queue, and all other callers omit this — existing behavior.
|
|
67
|
+
*/
|
|
68
|
+
negotiateTimeoutMs?: number;
|
|
69
|
+
/** Optional read-through chat-session digest reader. Required for chatContext enrichment. */
|
|
70
|
+
chatSummary?: ChatSummaryReader;
|
|
71
|
+
/**
|
|
72
|
+
* Optional negotiation summarizer. When provided, each post-negotiation digest
|
|
73
|
+
* replaces the raw negotiation in the decision-question generator's input,
|
|
74
|
+
* keeping that prompt small and predictable regardless of candidate count.
|
|
75
|
+
* When omitted, a deterministic fallback digest is built per negotiation.
|
|
76
|
+
*/
|
|
77
|
+
negotiationSummary?: NegotiationSummaryReader;
|
|
78
|
+
/** Optional decision-question generator. When omitted, no questions are produced. */
|
|
79
|
+
questionGenerator?: QuestionGeneratorReader;
|
|
80
|
+
/**
|
|
81
|
+
* Master switch for decision-question generation. When false, this code path
|
|
82
|
+
* is skipped entirely regardless of trigger. The composition root passes
|
|
83
|
+
* `isDiscoveryQuestionsEnabled()` (QUESTIONER_ENABLED + QUESTIONER_DISCOVERY_ENABLED).
|
|
84
|
+
*/
|
|
85
|
+
enableQuestions?: boolean;
|
|
86
|
+
/**
|
|
87
|
+
* Optional async question enqueue callback. When provided, question generation
|
|
88
|
+
* is dispatched asynchronously to the QuestionerQueue instead of running inline
|
|
89
|
+
* via the `questionGenerator`. The callback receives an enqueue payload and
|
|
90
|
+
* returns a promise that resolves when the job is enqueued (not when generation
|
|
91
|
+
* completes).
|
|
92
|
+
*/
|
|
93
|
+
questionerEnqueue?: QuestionerEnqueueFn;
|
|
94
|
+
/** Focused request scope type for generated discovery questions. */
|
|
95
|
+
scopeType?: ToolScopeType;
|
|
96
|
+
/** Focused request scope id. When `scopeType === 'network'`, persisted as actor networkId. */
|
|
97
|
+
scopeId?: string;
|
|
98
|
+
}
|
|
99
|
+
/** One formatted opportunity for chat (candidate-facing). */
|
|
100
|
+
export interface FormattedDiscoveryCandidate {
|
|
101
|
+
opportunityId: string;
|
|
102
|
+
userId: string;
|
|
103
|
+
name?: string;
|
|
104
|
+
avatar?: string | null;
|
|
105
|
+
bio?: string;
|
|
106
|
+
matchReason: string;
|
|
107
|
+
score: number;
|
|
108
|
+
status?: string;
|
|
109
|
+
/** Present when DiscoverInput.presenter was provided (basic presentation). */
|
|
110
|
+
presentation?: OpportunityPresentationResult;
|
|
111
|
+
/** Present when DiscoverInput.useHomeCardFormat is true (full home card contract). */
|
|
112
|
+
homeCardPresentation?: HomeCardPresentationResult;
|
|
113
|
+
/** Viewer's role in this opportunity. */
|
|
114
|
+
viewerRole?: string;
|
|
115
|
+
/** Whether the viewer (as introducer) has approved the introduction. */
|
|
116
|
+
viewerApproved?: boolean;
|
|
117
|
+
/** Timestamp set once this viewer has already acted on the opportunity. */
|
|
118
|
+
viewerActedAt?: string | null;
|
|
119
|
+
/** Full user record for the candidate (needed for socials / Telegram fallback). */
|
|
120
|
+
candidateUser?: UserRecord | null;
|
|
121
|
+
/** Whether the counterpart is a ghost (not yet onboarded) user. */
|
|
122
|
+
isGhost?: boolean;
|
|
123
|
+
/** Narrator chip for home card display (name + remark, with optional avatar/userId for introducer). */
|
|
124
|
+
narratorChip?: {
|
|
125
|
+
name: string;
|
|
126
|
+
text: string;
|
|
127
|
+
avatar?: string | null;
|
|
128
|
+
userId?: string;
|
|
129
|
+
};
|
|
130
|
+
/** Second party in introducer arrow layout (candidate -> secondParty). Present when viewer is introducer. */
|
|
131
|
+
secondParty?: {
|
|
132
|
+
name: string;
|
|
133
|
+
avatar?: string | null;
|
|
134
|
+
userId?: string;
|
|
135
|
+
};
|
|
136
|
+
}
|
|
137
|
+
/** One step for debug visibility (subgraph/subtask). */
|
|
138
|
+
export type { DiscoverDebugStep } from '../domain/opportunity.discovery.contracts.js';
|
|
139
|
+
/** One existing connection (no new opportunity created; user already has one with this person). */
|
|
140
|
+
export interface ExistingConnection {
|
|
141
|
+
userId: string;
|
|
142
|
+
name: string;
|
|
143
|
+
status?: string;
|
|
144
|
+
opportunityId?: string;
|
|
145
|
+
}
|
|
146
|
+
export interface DiscoverResult {
|
|
147
|
+
found: boolean;
|
|
148
|
+
count: number;
|
|
149
|
+
message?: string;
|
|
150
|
+
opportunities?: FormattedDiscoveryCandidate[];
|
|
151
|
+
/** Existing connections eligible for card display (draft, latent, or pending). Others are mention-only. */
|
|
152
|
+
existingConnections?: ExistingConnection[];
|
|
153
|
+
/** All existing connections for mention text (e.g. "You already have a connection with: X (pending), Y (draft)."). */
|
|
154
|
+
existingConnectionsForMention?: ExistingConnection[];
|
|
155
|
+
/**
|
|
156
|
+
* Orchestrator-only: accepted opportunities the persist step found between the
|
|
157
|
+
* discoverer and a candidate counterparty (status='accepted'). Populated from
|
|
158
|
+
* OpportunityGraphState.dedupAlreadyAccepted. Used by the discover_opportunities
|
|
159
|
+
* tool to tell the LLM "this pair is already connected — open the existing
|
|
160
|
+
* chat rather than creating a new draft". Empty for the ambient trigger.
|
|
161
|
+
*/
|
|
162
|
+
alreadyAcceptedPairs?: Array<{
|
|
163
|
+
opportunityId: string;
|
|
164
|
+
counterpartyUserId: string;
|
|
165
|
+
}>;
|
|
166
|
+
/** When true, the chat agent should call create_intent(suggestedIntentDescription) and retry discovery. */
|
|
167
|
+
createIntentSuggested?: boolean;
|
|
168
|
+
/** Description to pass to create_intent when createIntentSuggested is true. */
|
|
169
|
+
suggestedIntentDescription?: string;
|
|
170
|
+
/** Internal steps for copy-debug (select_strategies, opportunity_graph, enrich, etc.). */
|
|
171
|
+
debugSteps?: DiscoverDebugStep[];
|
|
172
|
+
/** Pagination metadata -- present when there are more unevaluated candidates. */
|
|
173
|
+
pagination?: {
|
|
174
|
+
discoveryId: string;
|
|
175
|
+
evaluated: number;
|
|
176
|
+
remaining: number;
|
|
177
|
+
};
|
|
178
|
+
/** 0–3 decision questions produced by the orchestrator path. Omitted when none. */
|
|
179
|
+
questions?: Question[];
|
|
180
|
+
/** Debug metadata for `debugMeta.discoveryQuestions` plumbing. */
|
|
181
|
+
discoveryQuestionsDebug?: {
|
|
182
|
+
inputMode: "transcripts" | "insights";
|
|
183
|
+
finalCount: number;
|
|
184
|
+
strategies: QuestionStrategy[];
|
|
185
|
+
durationMs: number;
|
|
186
|
+
};
|
|
187
|
+
}
|
|
188
|
+
/**
|
|
189
|
+
* Run discovery from an ad-hoc query (e.g. "find me a mentor", "who needs a React developer").
|
|
190
|
+
* The HyDE graph's LensInferrer automatically infers search lenses from the query.
|
|
191
|
+
* Invokes the opportunity graph and returns formatted candidates suitable for chat display.
|
|
192
|
+
*/
|
|
193
|
+
export declare function runDiscoverFromQuery(input: DiscoverInput): Promise<DiscoverResult>;
|
|
194
|
+
/**
|
|
195
|
+
* Continue a paginated discovery by evaluating the next batch of cached candidates.
|
|
196
|
+
* Loads candidates from Redis, invokes the opportunity graph in continue_discovery mode,
|
|
197
|
+
* then enriches and returns the results with updated pagination metadata.
|
|
198
|
+
*
|
|
199
|
+
* @param input - Continuation context (graph, database, cache, discoveryId, etc.).
|
|
200
|
+
* @returns Discovery result with enriched opportunities and pagination state.
|
|
201
|
+
*/
|
|
202
|
+
export declare function continueDiscovery(input: {
|
|
203
|
+
opportunityGraph: CompiledOpportunityGraph;
|
|
204
|
+
database: ChatGraphCompositeDatabase;
|
|
205
|
+
cache: Cache;
|
|
206
|
+
userId: string;
|
|
207
|
+
discoveryId: string;
|
|
208
|
+
/** If provided, validates the cached session's indexScope contains this network. */
|
|
209
|
+
expectedIndexId?: string;
|
|
210
|
+
limit?: number;
|
|
211
|
+
chatSessionId?: string;
|
|
212
|
+
minimalForChat?: boolean;
|
|
213
|
+
presenter?: OpportunityPresenter;
|
|
214
|
+
useHomeCardFormat?: boolean;
|
|
215
|
+
}): Promise<DiscoverResult>;
|