@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,190 @@
|
|
|
1
|
+
import { Annotation } from "@langchain/langgraph";
|
|
2
|
+
/**
|
|
3
|
+
* The Graph State using LangGraph Annotations.
|
|
4
|
+
* This acts as the central bus for data flowing through our graph.
|
|
5
|
+
*/
|
|
6
|
+
export const IntentGraphState = Annotation.Root({
|
|
7
|
+
// --- Inputs (Required at start) ---
|
|
8
|
+
/**
|
|
9
|
+
* The unique identifier of the user whose intents are being processed.
|
|
10
|
+
* Required for database operations.
|
|
11
|
+
*/
|
|
12
|
+
userId: (Annotation),
|
|
13
|
+
/**
|
|
14
|
+
* The user's profile context (Identity, Narrative, etc.)
|
|
15
|
+
*/
|
|
16
|
+
userProfile: (Annotation),
|
|
17
|
+
/**
|
|
18
|
+
* Explicit input content (e.g., user message).
|
|
19
|
+
* Optional - graph might run on implicit only.
|
|
20
|
+
*/
|
|
21
|
+
inputContent: (Annotation),
|
|
22
|
+
/**
|
|
23
|
+
* Conversation history for context-aware intent inference.
|
|
24
|
+
* Used to resolve anaphoric references ("that intent", "this goal").
|
|
25
|
+
* Limited to recent messages (typically last 10) for token efficiency.
|
|
26
|
+
* Optional - if not provided, intent inference uses only inputContent.
|
|
27
|
+
*/
|
|
28
|
+
conversationContext: Annotation({
|
|
29
|
+
reducer: (curr, next) => next ?? curr,
|
|
30
|
+
default: () => undefined,
|
|
31
|
+
}),
|
|
32
|
+
/**
|
|
33
|
+
* Operation mode controls graph flow and determines which nodes execute.
|
|
34
|
+
* - 'create': Full pipeline (prep → inference → verification → reconciliation → execution)
|
|
35
|
+
* - 'update': Skip verification if no new intents (prep → inference → reconciliation → execution)
|
|
36
|
+
* - 'delete': Skip inference and verification (prep → reconciliation → execution)
|
|
37
|
+
* - 'read': Fast path (prep → queryNode → END) — reads intents without LLM calls
|
|
38
|
+
* - 'propose': Inference + verification only, stops before reconciliation (no DB writes)
|
|
39
|
+
*
|
|
40
|
+
* Defaults to 'create' for backward compatibility.
|
|
41
|
+
*/
|
|
42
|
+
operationMode: Annotation({
|
|
43
|
+
reducer: (curr, next) => next ?? curr,
|
|
44
|
+
default: () => 'create',
|
|
45
|
+
}),
|
|
46
|
+
/**
|
|
47
|
+
* For update/delete operations, specifies which intent IDs to target.
|
|
48
|
+
* Optional - used when modifying or removing specific intents.
|
|
49
|
+
*/
|
|
50
|
+
targetIntentIds: Annotation({
|
|
51
|
+
reducer: (curr, next) => next ?? curr,
|
|
52
|
+
default: () => undefined,
|
|
53
|
+
}),
|
|
54
|
+
/**
|
|
55
|
+
* Optional material compare-and-set guard used only by recovery-answer
|
|
56
|
+
* updates. The database rechecks it while holding the final intent row lock.
|
|
57
|
+
*/
|
|
58
|
+
expectedIntentFingerprint: Annotation({
|
|
59
|
+
reducer: (curr, next) => next ?? curr,
|
|
60
|
+
default: () => undefined,
|
|
61
|
+
}),
|
|
62
|
+
/**
|
|
63
|
+
* Optional network scope (network ID). Used for linking created intents to a network
|
|
64
|
+
* and for scoping read operations. Prep always fetches ALL user intents via
|
|
65
|
+
* getActiveIntents(userId) regardless of network scope (for global dedup/reconciliation).
|
|
66
|
+
*/
|
|
67
|
+
networkId: Annotation({
|
|
68
|
+
reducer: (curr, next) => next ?? curr,
|
|
69
|
+
default: () => undefined,
|
|
70
|
+
}),
|
|
71
|
+
/** Focused request scope type for write-side assignment and follow-up queues. */
|
|
72
|
+
scopeType: Annotation({
|
|
73
|
+
reducer: (curr, next) => next ?? curr,
|
|
74
|
+
default: () => undefined,
|
|
75
|
+
}),
|
|
76
|
+
/** Focused request scope id. When scopeType is `network`, this is the focused network id. */
|
|
77
|
+
scopeId: Annotation({
|
|
78
|
+
reducer: (curr, next) => next ?? curr,
|
|
79
|
+
default: () => undefined,
|
|
80
|
+
}),
|
|
81
|
+
// --- Populated by Graph (Prep Node) ---
|
|
82
|
+
/**
|
|
83
|
+
* The formatted string of currently active intents.
|
|
84
|
+
* Always populated by prep via getActiveIntents(userId).
|
|
85
|
+
*/
|
|
86
|
+
activeIntents: Annotation({
|
|
87
|
+
reducer: (curr, next) => next,
|
|
88
|
+
default: () => "",
|
|
89
|
+
}),
|
|
90
|
+
/** IDs of active intents owned by the graph user, used to fail closed on explicit updates. */
|
|
91
|
+
activeIntentIds: Annotation({
|
|
92
|
+
reducer: (curr, next) => next,
|
|
93
|
+
default: () => [],
|
|
94
|
+
}),
|
|
95
|
+
// --- Intermediate State ---
|
|
96
|
+
/**
|
|
97
|
+
* List of raw intents extracted from text.
|
|
98
|
+
*/
|
|
99
|
+
inferredIntents: Annotation({
|
|
100
|
+
reducer: (curr, next) => next, // Overwrite with new inference
|
|
101
|
+
default: () => [],
|
|
102
|
+
}),
|
|
103
|
+
/**
|
|
104
|
+
* List of intents that have passed semantic verification.
|
|
105
|
+
* Invalid intents are filtered out before reaching this state.
|
|
106
|
+
*/
|
|
107
|
+
verifiedIntents: Annotation({
|
|
108
|
+
reducer: (curr, next) => next,
|
|
109
|
+
default: () => [],
|
|
110
|
+
}),
|
|
111
|
+
/** Structured reasons for candidates rejected before persistence. */
|
|
112
|
+
validationFailures: Annotation({
|
|
113
|
+
reducer: (curr, next) => next,
|
|
114
|
+
default: () => [],
|
|
115
|
+
}),
|
|
116
|
+
// --- Output ---
|
|
117
|
+
/**
|
|
118
|
+
* Final actions to be performed on the DB (Create, Update, Expire).
|
|
119
|
+
*/
|
|
120
|
+
actions: Annotation({
|
|
121
|
+
reducer: (curr, next) => next,
|
|
122
|
+
default: () => [],
|
|
123
|
+
}),
|
|
124
|
+
/**
|
|
125
|
+
* Results of executing actions against the database.
|
|
126
|
+
* Populated by executorNode after actions are persisted.
|
|
127
|
+
*/
|
|
128
|
+
executionResults: Annotation({
|
|
129
|
+
reducer: (curr, next) => next,
|
|
130
|
+
default: () => [],
|
|
131
|
+
}),
|
|
132
|
+
// --- Error State ---
|
|
133
|
+
/**
|
|
134
|
+
* If set, indicates a fatal error that should short-circuit the graph to END.
|
|
135
|
+
* Populated by prep when a precondition fails (e.g. missing profile).
|
|
136
|
+
*/
|
|
137
|
+
error: Annotation({
|
|
138
|
+
reducer: (curr, next) => next ?? curr,
|
|
139
|
+
default: () => undefined,
|
|
140
|
+
}),
|
|
141
|
+
// --- Trace Output ---
|
|
142
|
+
/**
|
|
143
|
+
* Accumulated trace entries from each graph node.
|
|
144
|
+
* Used for observability: surfaces internal processing steps (inference,
|
|
145
|
+
* verification with Felicity scores, reconciliation) to the frontend.
|
|
146
|
+
*/
|
|
147
|
+
trace: Annotation({
|
|
148
|
+
reducer: (curr, next) => [...curr, ...(next || [])],
|
|
149
|
+
default: () => [],
|
|
150
|
+
}),
|
|
151
|
+
/** Timing records for each agent invocation within this graph run. */
|
|
152
|
+
agentTimings: Annotation({
|
|
153
|
+
reducer: (acc, val) => [...acc, ...val],
|
|
154
|
+
default: () => [],
|
|
155
|
+
}),
|
|
156
|
+
// --- Read Mode Fields ---
|
|
157
|
+
/**
|
|
158
|
+
* For read mode: the set of network IDs the caller's agent can reach.
|
|
159
|
+
* When set and neither networkId nor queryUserId is provided, the graph
|
|
160
|
+
* returns the caller's own intents across all networks in this set (scope-aware
|
|
161
|
+
* default path). Derived by the tool layer from the scope envelope plus memberships.
|
|
162
|
+
*/
|
|
163
|
+
indexScope: Annotation({
|
|
164
|
+
reducer: (_curr, next) => next,
|
|
165
|
+
default: () => undefined,
|
|
166
|
+
}),
|
|
167
|
+
/**
|
|
168
|
+
* For read mode: filter intents by a specific user when reading in a network.
|
|
169
|
+
* When omitted and network-scoped, returns all intents in the network.
|
|
170
|
+
*/
|
|
171
|
+
queryUserId: Annotation({
|
|
172
|
+
reducer: (curr, next) => next ?? curr,
|
|
173
|
+
default: () => undefined,
|
|
174
|
+
}),
|
|
175
|
+
/**
|
|
176
|
+
* For read mode: when true, return all of the current user's intents
|
|
177
|
+
* ignoring network scope. Used before create_intent to detect duplicates.
|
|
178
|
+
*/
|
|
179
|
+
allUserIntents: Annotation({
|
|
180
|
+
reducer: (curr, next) => next ?? curr,
|
|
181
|
+
default: () => false,
|
|
182
|
+
}),
|
|
183
|
+
/**
|
|
184
|
+
* Output of read mode: queried intents with count and optional metadata.
|
|
185
|
+
*/
|
|
186
|
+
readResult: Annotation({
|
|
187
|
+
reducer: (curr, next) => next,
|
|
188
|
+
default: () => undefined,
|
|
189
|
+
}),
|
|
190
|
+
});
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** Default user-facing warning for broad attributive intent proposals. */
|
|
2
|
+
export declare const DEFAULT_SPECIFICITY_WARNING = "This signal is broad and may produce many weak matches. Add a more concrete role, outcome, location, timeframe, domain, or specific need to get better recommendations.";
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
/** Default user-facing warning for broad attributive intent proposals. */
|
|
2
|
+
export const DEFAULT_SPECIFICITY_WARNING = "This signal is broad and may produce many weak matches. Add a more concrete role, outcome, location, timeframe, domain, or specific need to get better recommendations.";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals — domain-first module root.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the curated public surface. Other modules inside the signals
|
|
5
|
+
* capability import directly from signals/domain, signals/application, or
|
|
6
|
+
* signals/ports; this barrel is for cross-capability consumers that must go
|
|
7
|
+
* through the signals public surface.
|
|
8
|
+
*
|
|
9
|
+
* IND-544: canonical home for intent/signal behaviour that was previously
|
|
10
|
+
* spread across intent/*. Legacy intent/* paths remain as compatibility
|
|
11
|
+
* re-exports pointing here.
|
|
12
|
+
*/
|
|
13
|
+
export * from "./public/index.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals — domain-first module root.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the curated public surface. Other modules inside the signals
|
|
5
|
+
* capability import directly from signals/domain, signals/application, or
|
|
6
|
+
* signals/ports; this barrel is for cross-capability consumers that must go
|
|
7
|
+
* through the signals public surface.
|
|
8
|
+
*
|
|
9
|
+
* IND-544: canonical home for intent/signal behaviour that was previously
|
|
10
|
+
* spread across intent/*. Legacy intent/* paths remain as compatibility
|
|
11
|
+
* re-exports pointing here.
|
|
12
|
+
*/
|
|
13
|
+
export * from "./public/index.js";
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals/ports — narrow injected dependency contracts.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the subset of shared/interfaces types that the signals
|
|
5
|
+
* capability declares as explicit injected ports. Consumers of the
|
|
6
|
+
* signals module should import these port types here rather than from
|
|
7
|
+
* the broader shared/interfaces barrel to keep the dependency surface
|
|
8
|
+
* narrow and auditable.
|
|
9
|
+
*
|
|
10
|
+
* Ports are migrated here incrementally; placeholders name the intended
|
|
11
|
+
* contracts before they are physically relocated.
|
|
12
|
+
*/
|
|
13
|
+
export type { IntentGraphDatabase } from "../../shared/interfaces/database.interface.js";
|
|
14
|
+
export type { EmbeddingGenerator } from "../../shared/interfaces/embedder.interface.js";
|
|
15
|
+
export type { IntentGraphQueue } from "../../shared/interfaces/queue.interface.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals/ports — narrow injected dependency contracts.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the subset of shared/interfaces types that the signals
|
|
5
|
+
* capability declares as explicit injected ports. Consumers of the
|
|
6
|
+
* signals module should import these port types here rather than from
|
|
7
|
+
* the broader shared/interfaces barrel to keep the dependency surface
|
|
8
|
+
* narrow and auditable.
|
|
9
|
+
*
|
|
10
|
+
* Ports are migrated here incrementally; placeholders name the intended
|
|
11
|
+
* contracts before they are physically relocated.
|
|
12
|
+
*/
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals/public — curated public surface of the signals capability.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the stable contracts from domain, application, and ports.
|
|
5
|
+
* Runtime adapter creation (createIntentTools) is NOT exported here; it is
|
|
6
|
+
* accessible via capabilities/signals.facade for package consumers and via
|
|
7
|
+
* the foreground shell (runtime/foreground/signals) for internal registries.
|
|
8
|
+
*
|
|
9
|
+
* Boundary: public-compatibility. References only signals/domain,
|
|
10
|
+
* signals/application, and signals/ports — never runtime/foreground or
|
|
11
|
+
* host implementations.
|
|
12
|
+
*/
|
|
13
|
+
export { type VerifiedIntent, type IntentValidationFailureCategory, type IntentValidationFailure, type ExecutionResult, IntentGraphState, DEFAULT_SPECIFICITY_WARNING, } from "../domain/index.js";
|
|
14
|
+
export { IntentGraphFactory, enforceIntentActionBoundary, buildExplicitUpdateActions, SemanticVerifier, type SemanticVerifierOutput, ExplicitIntentInferrer, type InferredIntent, type InferrerOptions, IntentClarifier, IntentReconciler, type IntentReconcilerOutput, type NormalizedIntentAction, IntentIndexer, IntentIndexerOutputSchema, type IntentIndexerOutput, describeIntentUpdateFailure, } from "../application/index.js";
|
|
15
|
+
export type { IntentGraphDatabase, EmbeddingGenerator, IntentGraphQueue } from "../ports/index.js";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* signals/public — curated public surface of the signals capability.
|
|
3
|
+
*
|
|
4
|
+
* Re-exports the stable contracts from domain, application, and ports.
|
|
5
|
+
* Runtime adapter creation (createIntentTools) is NOT exported here; it is
|
|
6
|
+
* accessible via capabilities/signals.facade for package consumers and via
|
|
7
|
+
* the foreground shell (runtime/foreground/signals) for internal registries.
|
|
8
|
+
*
|
|
9
|
+
* Boundary: public-compatibility. References only signals/domain,
|
|
10
|
+
* signals/application, and signals/ports — never runtime/foreground or
|
|
11
|
+
* host implementations.
|
|
12
|
+
*/
|
|
13
|
+
// ── Domain contracts ──────────────────────────────────────────────────────────
|
|
14
|
+
export { IntentGraphState, DEFAULT_SPECIFICITY_WARNING, } from "../domain/index.js";
|
|
15
|
+
// ── Application seams ─────────────────────────────────────────────────────────
|
|
16
|
+
export { IntentGraphFactory, enforceIntentActionBoundary, buildExplicitUpdateActions, SemanticVerifier, ExplicitIntentInferrer, IntentClarifier, IntentReconciler, IntentIndexer, IntentIndexerOutputSchema, describeIntentUpdateFailure, } from "../application/index.js";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@indexnetwork/protocol",
|
|
3
|
-
"version": "6.
|
|
3
|
+
"version": "6.14.0-rc.406.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -17,11 +17,22 @@
|
|
|
17
17
|
"CHANGELOG.md"
|
|
18
18
|
],
|
|
19
19
|
"scripts": {
|
|
20
|
-
"build": "tsc",
|
|
20
|
+
"build": "rm -rf dist && tsc",
|
|
21
|
+
"build:package": "rm -rf dist && tsc --project tsconfig.package.json",
|
|
21
22
|
"dev": "tsc --watch",
|
|
22
23
|
"test": "bun test",
|
|
23
24
|
"test:isolated": "bun scripts/test.ts",
|
|
25
|
+
"test:architecture": "bun test src/architecture/tests",
|
|
26
|
+
"architecture:exports": "bun scripts/architecture/export-inventory.ts",
|
|
27
|
+
"architecture:exports:update": "bun scripts/architecture/export-inventory.ts --write",
|
|
28
|
+
"architecture:consumer": "bunx tsc --project architecture/consumer/tsconfig.json",
|
|
29
|
+
"architecture:host-isolation": "bun scripts/architecture/host-isolation.ts",
|
|
30
|
+
"architecture:capabilities": "bun scripts/architecture/capability-boundaries.ts",
|
|
31
|
+
"architecture:cycles": "bun scripts/architecture/cycle-baseline.ts",
|
|
32
|
+
"architecture:artifacts": "bun run build && bun scripts/architecture/artifact-inventory.ts",
|
|
33
|
+
"architecture:check": "bun run architecture:exports && bun run architecture:consumer && bun run architecture:host-isolation && bun run architecture:capabilities && bun run architecture:cycles && bun run architecture:artifacts && bun run test:architecture",
|
|
24
34
|
"prepublishOnly": "bun run build",
|
|
35
|
+
"prepack": "bun run build:package",
|
|
25
36
|
"eval:matching": "bun --env-file=../../.env.test ./eval/matching/matching.eval.ts",
|
|
26
37
|
"eval:hyde": "bun --env-file=../../.env.test ./eval/hyde/hyde.eval.ts",
|
|
27
38
|
"eval:premise": "bun --env-file=../../.env.test ./eval/premise/premise.eval.ts",
|
|
@@ -37,11 +48,11 @@
|
|
|
37
48
|
"@langchain/langgraph": "^1.1.2",
|
|
38
49
|
"@langchain/openai": "^1.2.3",
|
|
39
50
|
"@modelcontextprotocol/server": "^2.0.0-alpha.2",
|
|
40
|
-
"dotenv": "^16.3.1",
|
|
41
51
|
"zod": "^3.22.4"
|
|
42
52
|
},
|
|
43
53
|
"devDependencies": {
|
|
44
54
|
"@types/node": "^25.5.2",
|
|
55
|
+
"dotenv": "^16.3.1",
|
|
45
56
|
"typescript": "^5.0.0"
|
|
46
57
|
}
|
|
47
58
|
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.tools.d.ts","sourceRoot":"/","sources":["agent/agent.tools.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,iCAAiC,CAAC;AAuD5E,wBAAgB,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,qDAyRtE"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent.tools.js","sourceRoot":"/","sources":["agent/agent.tools.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,iCAAiC,CAAC;AACjE,OAAO,EAAE,cAAc,EAAE,MAAM,4CAA4C,CAAC;AAE5E,MAAM,MAAM,GAAG,cAAc,CAAC,iBAAiB,CA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CAAC;IAEH,OAAO;QACL,aAAa;QACb,UAAU;QACV,WAAW;QACX,WAAW;QACX,oBAAoB;QACpB,qBAAqB;KACb,CAAC;AACb,CAAC","sourcesContent":["import { z } from 'zod';\n\nimport type { DefineTool, ToolDeps } from '../shared/agent/tool.helpers.js';\nimport { error, success } from '../shared/agent/tool.helpers.js';\nimport { protocolLogger } from '../shared/observability/protocol.logger.js';\n\nconst logger = protocolLogger('ChatTools:Agent');\n\nconst AGENT_ACTIONS = [\n 'manage:profile',\n 'manage:intents',\n 'manage:networks',\n 'manage:contacts',\n 'manage:opportunities',\n 'manage:negotiations',\n] as const;\n\nfunction invalidActionMessage(action: string) {\n return `Invalid action: ${action}. Valid actions: ${AGENT_ACTIONS.join(', ')}`;\n}\n\nfunction isValidAction(action: string): action is (typeof AGENT_ACTIONS)[number] {\n return (AGENT_ACTIONS as readonly string[]).includes(action);\n}\n\nfunction requireAgentDatabase(deps: ToolDeps) {\n if (!deps.agentDatabase) {\n return null;\n }\n\n return deps.agentDatabase;\n}\n\nfunction ensureAgentScopedAccess(context: { agentId?: string }, requestedAgentId: string): string | null {\n if (context.agentId && context.agentId !== requestedAgentId) {\n return 'This agent can only manage its own registration.';\n }\n\n return null;\n}\n\nfunction sanitizeAgentForOutput<T extends { transports?: Array<{ channel: string; config: Record<string, unknown> }> }>(agent: T): T {\n return {\n ...agent,\n transports: agent.transports,\n };\n}\n\nfunction sanitizeAgentName(name: string): string | null {\n const cleanName = name.trim();\n return cleanName ? cleanName : null;\n}\n\nfunction normalizePermissions(permissions: string[] | undefined): string[] {\n return [...new Set((permissions ?? []).map((action) => action.trim()).filter(Boolean))];\n}\n\nexport function createAgentTools(defineTool: DefineTool, deps: ToolDeps) {\n const agentDb = requireAgentDatabase(deps);\n if (!agentDb) {\n return [];\n }\n\n const registerAgent = defineTool({\n name: 'register_agent',\n description:\n 'Register a new personal agent for the current user. Optionally configure initial permissions. ' +\n 'Use this when connecting an external agent to Index.',\n querySchema: z.object({\n name: z.string().min(1).describe('Display name for the agent.'),\n description: z.string().optional().describe('What the agent does.'),\n permissions: z.array(z.string()).optional().describe('Optional initial permission actions to grant.'),\n }),\n handler: async ({ context, query }) => {\n if (context.agentId) {\n return error(\n 'Agent registration must be done from a user session (web UI or personal API key), ' +\n 'not from within an existing agent context. To register a new agent, visit the Index web app.'\n );\n }\n\n try {\n const name = sanitizeAgentName(query.name);\n if (!name) {\n return error('Agent name is required.');\n }\n\n const permissions = normalizePermissions(query.permissions);\n for (const permission of permissions) {\n if (!isValidAction(permission)) {\n return error(invalidActionMessage(permission));\n }\n }\n\n const agent = await agentDb.createAgent({\n ownerId: context.userId,\n name,\n description: query.description?.trim() || undefined,\n type: 'external',\n });\n\n try {\n if (permissions.length > 0) {\n await agentDb.grantPermission({\n agentId: agent.id,\n userId: context.userId,\n scope: 'global',\n actions: permissions,\n });\n }\n } catch (setupError) {\n try {\n await agentDb.deleteAgent(agent.id);\n } catch {\n // Best-effort cleanup to avoid leaving partially registered agents behind.\n }\n\n throw setupError;\n }\n\n const fullAgent = await agentDb.getAgentWithRelations(agent.id);\n return success({\n message: `Agent \"${agent.name}\" registered successfully.`,\n agent: sanitizeAgentForOutput(fullAgent ?? ({ ...agent, transports: [], permissions: [] })),\n });\n } catch (err) {\n logger.error('Failed to register agent', { err });\n return error('Failed to register agent. Please try again.');\n }\n },\n });\n\n const listAgents = defineTool({\n name: 'list_agents',\n description: 'List all agents the current user owns or has authorized.',\n querySchema: z.object({}),\n handler: async ({ context }) => {\n try {\n const agents = await agentDb.listAgentsForUser(context.userId);\n const filteredAgents = context.agentId\n ? agents.filter((agent) => agent.id === context.agentId)\n : agents;\n return success({\n agents: filteredAgents.map((agent) => sanitizeAgentForOutput(agent)),\n count: filteredAgents.length,\n });\n } catch (err) {\n logger.error('Failed to list agents', { err });\n return error('Failed to list agents. Please try again.');\n }\n },\n });\n\n const updateAgent = defineTool({\n name: 'update_agent',\n description: 'Update an agent name, description, or status.',\n querySchema: z.object({\n agent_id: z.string().min(1).describe('The agent ID to update.'),\n name: z.string().optional().describe('Updated display name.'),\n description: z.string().optional().describe('Updated description.'),\n status: z.enum(['active', 'inactive']).optional().describe('Updated status.'),\n }),\n handler: async ({ context, query }) => {\n const scopeError = ensureAgentScopedAccess(context, query.agent_id);\n if (scopeError) {\n return error(scopeError);\n }\n\n try {\n const agent = await agentDb.getAgent(query.agent_id);\n if (!agent || agent.ownerId !== context.userId) {\n return error('Agent not found');\n }\n\n if (agent.type === 'system') {\n return error('System agents cannot be modified');\n }\n\n const updates: { name?: string; description?: string | null; status?: 'active' | 'inactive' } = {};\n if (query.name !== undefined) {\n const name = query.name.trim();\n if (!name) {\n return error('Agent name is required');\n }\n updates.name = name;\n }\n if (query.description !== undefined) {\n updates.description = query.description.trim() || null;\n }\n if (query.status) {\n updates.status = query.status;\n }\n\n if (Object.keys(updates).length === 0) {\n return error('At least one field is required.');\n }\n\n const updated = await agentDb.updateAgent(query.agent_id, updates);\n if (!updated) {\n return error('Agent not found');\n }\n\n const fullAgent = await agentDb.getAgentWithRelations(query.agent_id);\n return success({\n message: 'Agent updated.',\n agent: sanitizeAgentForOutput(fullAgent ?? ({ ...updated, transports: [], permissions: [] })),\n });\n } catch (err) {\n logger.error('Failed to update agent', { err });\n return error('Failed to update agent. Please try again.');\n }\n },\n });\n\n const deleteAgent = defineTool({\n name: 'delete_agent',\n description: 'Soft-delete a personal agent and deactivate its transports.',\n querySchema: z.object({\n agent_id: z.string().min(1).describe('The agent ID to delete.'),\n }),\n handler: async ({ context, query }) => {\n const scopeError = ensureAgentScopedAccess(context, query.agent_id);\n if (scopeError) {\n return error(scopeError);\n }\n\n try {\n const agent = await agentDb.getAgent(query.agent_id);\n if (!agent || agent.ownerId !== context.userId) {\n return error('Agent not found');\n }\n if (agent.type === 'system') {\n return error('System agents cannot be deleted');\n }\n\n await agentDb.deleteAgent(query.agent_id);\n return success({ message: `Agent \"${agent.name}\" deleted.` });\n } catch (err) {\n logger.error('Failed to delete agent', { err });\n return error('Failed to delete agent. Please try again.');\n }\n },\n });\n\n const grantAgentPermission = defineTool({\n name: 'grant_agent_permission',\n description: 'Grant one or more permissions to an agent for the current user. ' +\n 'Valid actions: manage:profile, manage:intents, manage:networks, manage:contacts, manage:opportunities, manage:negotiations.',\n querySchema: z.object({\n agent_id: z.string().min(1).describe('The agent ID to grant permissions to.'),\n actions: z.array(z.string()).min(1).describe('Permission actions to grant. Valid values: manage:profile, manage:intents, manage:networks, manage:contacts, manage:opportunities, manage:negotiations.'),\n scope: z.enum(['global', 'node', 'network']).optional().describe('Optional permission scope.'),\n scope_id: z.string().optional().describe('Scope target ID for node/network scopes.'),\n }),\n handler: async ({ context, query }) => {\n const scopeError = ensureAgentScopedAccess(context, query.agent_id);\n if (scopeError) {\n return error(scopeError);\n }\n\n const actions = normalizePermissions(query.actions);\n if (actions.length === 0) {\n return error('At least one non-empty action is required.');\n }\n\n for (const action of actions) {\n if (!isValidAction(action)) {\n return error(invalidActionMessage(action));\n }\n }\n\n if ((query.scope === 'network' || query.scope === 'node') && !query.scope_id?.trim()) {\n return error(`scope_id is required for ${query.scope} permissions.`);\n }\n\n try {\n const agent = await agentDb.getAgent(query.agent_id);\n if (!agent || agent.ownerId !== context.userId) {\n return error('Agent not found');\n }\n\n const permission = await agentDb.grantPermission({\n agentId: query.agent_id,\n userId: context.userId,\n scope: query.scope,\n scopeId: query.scope === 'global' || query.scope === undefined ? undefined : query.scope_id?.trim(),\n actions,\n });\n\n return success({ message: 'Permission granted.', permission });\n } catch (err) {\n logger.error('Failed to grant permission', { err });\n return error('Failed to grant permission. Please try again.');\n }\n },\n });\n\n const revokeAgentPermission = defineTool({\n name: 'revoke_agent_permission',\n description: 'Revoke a specific permission from an agent.',\n querySchema: z.object({\n agent_id: z.string().min(1).describe('The agent ID that owns the permission.'),\n permission_id: z.string().min(1).describe('The permission ID to revoke.'),\n }),\n handler: async ({ context, query }) => {\n const scopeError = ensureAgentScopedAccess(context, query.agent_id);\n if (scopeError) {\n return error(scopeError);\n }\n\n try {\n const agent = await agentDb.getAgentWithRelations(query.agent_id);\n if (!agent || agent.ownerId !== context.userId) {\n return error('Agent not found');\n }\n\n const permission = agent.permissions.find((item) => item.id === query.permission_id);\n if (!permission) {\n return error('Permission not found');\n }\n\n await agentDb.revokePermission(query.permission_id);\n return success({ message: 'Permission revoked.' });\n } catch (err) {\n logger.error('Failed to revoke permission', { err });\n return error('Failed to revoke permission. Please try again.');\n }\n },\n });\n\n return [\n registerAgent,\n listAgents,\n updateAgent,\n deleteAgent,\n grantAgentPermission,\n revokeAgentPermission,\n ] as const;\n}\n"]}
|
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal in-memory fake of the {@link AgentDatabase} interface used by agent
|
|
3
|
-
* tool tests. Only the surface area exercised by the specs in this folder is
|
|
4
|
-
* implemented — unused methods throw if called so tests fail loudly.
|
|
5
|
-
*/
|
|
6
|
-
import type { AgentDatabase, AgentPermissionRecord, AgentRecord, AgentTransportRecord } from '../../shared/interfaces/agent.interface.js';
|
|
7
|
-
export interface SeedAgentInput {
|
|
8
|
-
id: string;
|
|
9
|
-
ownerId: string;
|
|
10
|
-
name: string;
|
|
11
|
-
type?: 'personal' | 'external' | 'system';
|
|
12
|
-
description?: string | null;
|
|
13
|
-
status?: 'active' | 'inactive';
|
|
14
|
-
}
|
|
15
|
-
export interface FakeAgentDb extends AgentDatabase {
|
|
16
|
-
seedAgent(input: SeedAgentInput): Promise<AgentRecord>;
|
|
17
|
-
getPermissionsForAgent(agentId: string): AgentPermissionRecord[];
|
|
18
|
-
getTransportsForAgent(agentId: string): AgentTransportRecord[];
|
|
19
|
-
}
|
|
20
|
-
/**
|
|
21
|
-
* Creates an in-memory agent database fake for unit tests. Only the methods
|
|
22
|
-
* exercised by the agent tool specs are implemented; the rest throw.
|
|
23
|
-
*/
|
|
24
|
-
export declare function createFakeAgentDb(): FakeAgentDb;
|
|
25
|
-
//# sourceMappingURL=fakes.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakes.d.ts","sourceRoot":"/","sources":["agent/tests/fakes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,qBAAqB,EAAE,WAAW,EAAE,oBAAoB,EAAoF,MAAM,4CAA4C,CAAC;AAE5N,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,UAAU,GAAG,UAAU,GAAG,QAAQ,CAAC;IAC1C,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B,MAAM,CAAC,EAAE,QAAQ,GAAG,UAAU,CAAC;CAChC;AAED,MAAM,WAAW,WAAY,SAAQ,aAAa;IAChD,SAAS,CAAC,KAAK,EAAE,cAAc,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;IACvD,sBAAsB,CAAC,OAAO,EAAE,MAAM,GAAG,qBAAqB,EAAE,CAAC;IACjE,qBAAqB,CAAC,OAAO,EAAE,MAAM,GAAG,oBAAoB,EAAE,CAAC;CAChE;AAOD;;;GAGG;AACH,wBAAgB,iBAAiB,IAAI,WAAW,CAsL/C"}
|
|
@@ -1,178 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Minimal in-memory fake of the {@link AgentDatabase} interface used by agent
|
|
3
|
-
* tool tests. Only the surface area exercised by the specs in this folder is
|
|
4
|
-
* implemented — unused methods throw if called so tests fail loudly.
|
|
5
|
-
*/
|
|
6
|
-
function nextId(prefix, counter) {
|
|
7
|
-
counter.value += 1;
|
|
8
|
-
return `${prefix}-${counter.value}`;
|
|
9
|
-
}
|
|
10
|
-
/**
|
|
11
|
-
* Creates an in-memory agent database fake for unit tests. Only the methods
|
|
12
|
-
* exercised by the agent tool specs are implemented; the rest throw.
|
|
13
|
-
*/
|
|
14
|
-
export function createFakeAgentDb() {
|
|
15
|
-
const agents = new Map();
|
|
16
|
-
const transports = new Map();
|
|
17
|
-
const permissions = new Map();
|
|
18
|
-
const agentCounter = { value: 0 };
|
|
19
|
-
const transportCounter = { value: 0 };
|
|
20
|
-
const permissionCounter = { value: 0 };
|
|
21
|
-
function buildRelations(agent) {
|
|
22
|
-
const agentTransports = [...transports.values()].filter((t) => t.agentId === agent.id);
|
|
23
|
-
const agentPermissions = [...permissions.values()].filter((p) => p.agentId === agent.id);
|
|
24
|
-
return {
|
|
25
|
-
...agent,
|
|
26
|
-
transports: agentTransports,
|
|
27
|
-
permissions: agentPermissions,
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
const db = {
|
|
31
|
-
getPermissionsForAgent(agentId) {
|
|
32
|
-
return [...permissions.values()]
|
|
33
|
-
.filter((permission) => permission.agentId === agentId)
|
|
34
|
-
.map((permission) => ({ ...permission, actions: [...permission.actions] }));
|
|
35
|
-
},
|
|
36
|
-
getTransportsForAgent(agentId) {
|
|
37
|
-
return [...transports.values()]
|
|
38
|
-
.filter((transport) => transport.agentId === agentId)
|
|
39
|
-
.map((transport) => ({ ...transport }));
|
|
40
|
-
},
|
|
41
|
-
async seedAgent(input) {
|
|
42
|
-
const now = new Date();
|
|
43
|
-
const agent = {
|
|
44
|
-
id: input.id,
|
|
45
|
-
ownerId: input.ownerId,
|
|
46
|
-
name: input.name,
|
|
47
|
-
description: input.description ?? null,
|
|
48
|
-
type: input.type ?? 'external',
|
|
49
|
-
status: input.status ?? 'active',
|
|
50
|
-
metadata: {},
|
|
51
|
-
createdAt: now,
|
|
52
|
-
updatedAt: now,
|
|
53
|
-
};
|
|
54
|
-
agents.set(agent.id, agent);
|
|
55
|
-
return agent;
|
|
56
|
-
},
|
|
57
|
-
async createAgent(input) {
|
|
58
|
-
const now = new Date();
|
|
59
|
-
const agent = {
|
|
60
|
-
id: nextId('agent', agentCounter),
|
|
61
|
-
ownerId: input.ownerId,
|
|
62
|
-
name: input.name,
|
|
63
|
-
description: input.description ?? null,
|
|
64
|
-
type: input.type,
|
|
65
|
-
status: 'active',
|
|
66
|
-
metadata: input.metadata ?? {},
|
|
67
|
-
createdAt: now,
|
|
68
|
-
updatedAt: now,
|
|
69
|
-
};
|
|
70
|
-
agents.set(agent.id, agent);
|
|
71
|
-
return agent;
|
|
72
|
-
},
|
|
73
|
-
async getAgent(agentId) {
|
|
74
|
-
return agents.get(agentId) ?? null;
|
|
75
|
-
},
|
|
76
|
-
async getAgentWithRelations(agentId) {
|
|
77
|
-
const agent = agents.get(agentId);
|
|
78
|
-
if (!agent)
|
|
79
|
-
return null;
|
|
80
|
-
return buildRelations(agent);
|
|
81
|
-
},
|
|
82
|
-
async updateAgent(agentId, updates) {
|
|
83
|
-
const existing = agents.get(agentId);
|
|
84
|
-
if (!existing)
|
|
85
|
-
return null;
|
|
86
|
-
const updated = {
|
|
87
|
-
...existing,
|
|
88
|
-
...('name' in updates && updates.name !== undefined ? { name: updates.name } : {}),
|
|
89
|
-
...('description' in updates && updates.description !== undefined ? { description: updates.description } : {}),
|
|
90
|
-
...('status' in updates && updates.status !== undefined ? { status: updates.status } : {}),
|
|
91
|
-
...('metadata' in updates && updates.metadata !== undefined ? { metadata: updates.metadata } : {}),
|
|
92
|
-
updatedAt: new Date(),
|
|
93
|
-
};
|
|
94
|
-
agents.set(agentId, updated);
|
|
95
|
-
return updated;
|
|
96
|
-
},
|
|
97
|
-
async deleteAgent(agentId) {
|
|
98
|
-
agents.delete(agentId);
|
|
99
|
-
for (const [id, transport] of transports) {
|
|
100
|
-
if (transport.agentId === agentId)
|
|
101
|
-
transports.delete(id);
|
|
102
|
-
}
|
|
103
|
-
for (const [id, permission] of permissions) {
|
|
104
|
-
if (permission.agentId === agentId)
|
|
105
|
-
permissions.delete(id);
|
|
106
|
-
}
|
|
107
|
-
},
|
|
108
|
-
async listAgentsForUser(userId) {
|
|
109
|
-
return [...agents.values()]
|
|
110
|
-
.filter((agent) => agent.ownerId === userId)
|
|
111
|
-
.map((agent) => buildRelations(agent));
|
|
112
|
-
},
|
|
113
|
-
async createTransport(input) {
|
|
114
|
-
const transport = {
|
|
115
|
-
id: nextId('transport', transportCounter),
|
|
116
|
-
agentId: input.agentId,
|
|
117
|
-
channel: input.channel,
|
|
118
|
-
config: input.config ?? {},
|
|
119
|
-
priority: input.priority ?? 0,
|
|
120
|
-
active: true,
|
|
121
|
-
failureCount: 0,
|
|
122
|
-
};
|
|
123
|
-
transports.set(transport.id, transport);
|
|
124
|
-
return transport;
|
|
125
|
-
},
|
|
126
|
-
async deleteTransport(transportId) {
|
|
127
|
-
transports.delete(transportId);
|
|
128
|
-
},
|
|
129
|
-
async recordTransportFailure(transportId) {
|
|
130
|
-
const transport = transports.get(transportId);
|
|
131
|
-
if (transport) {
|
|
132
|
-
transport.failureCount += 1;
|
|
133
|
-
}
|
|
134
|
-
},
|
|
135
|
-
async recordTransportSuccess(transportId) {
|
|
136
|
-
const transport = transports.get(transportId);
|
|
137
|
-
if (transport) {
|
|
138
|
-
transport.failureCount = 0;
|
|
139
|
-
}
|
|
140
|
-
},
|
|
141
|
-
async grantPermission(input) {
|
|
142
|
-
const permission = {
|
|
143
|
-
id: nextId('permission', permissionCounter),
|
|
144
|
-
agentId: input.agentId,
|
|
145
|
-
userId: input.userId,
|
|
146
|
-
scope: input.scope ?? 'global',
|
|
147
|
-
scopeId: input.scopeId ?? null,
|
|
148
|
-
actions: [...input.actions],
|
|
149
|
-
createdAt: new Date(),
|
|
150
|
-
};
|
|
151
|
-
permissions.set(permission.id, permission);
|
|
152
|
-
return permission;
|
|
153
|
-
},
|
|
154
|
-
async revokePermission(permissionId) {
|
|
155
|
-
permissions.delete(permissionId);
|
|
156
|
-
},
|
|
157
|
-
async hasPermission(agentId, userId, action, scope) {
|
|
158
|
-
const requestedScope = scope?.type ?? 'global';
|
|
159
|
-
const requestedScopeId = scope?.id ?? null;
|
|
160
|
-
return [...permissions.values()].some((permission) => permission.agentId === agentId &&
|
|
161
|
-
permission.userId === userId &&
|
|
162
|
-
permission.scope === requestedScope &&
|
|
163
|
-
(requestedScope === 'global' || permission.scopeId === requestedScopeId) &&
|
|
164
|
-
permission.actions.includes(action));
|
|
165
|
-
},
|
|
166
|
-
async findAuthorizedAgents() {
|
|
167
|
-
throw new Error('findAuthorizedAgents is not implemented in the fake agent DB.');
|
|
168
|
-
},
|
|
169
|
-
getSystemAgentIds() {
|
|
170
|
-
return {
|
|
171
|
-
chatOrchestrator: '00000000-0000-0000-0000-000000000001',
|
|
172
|
-
negotiator: '00000000-0000-0000-0000-000000000002',
|
|
173
|
-
};
|
|
174
|
-
},
|
|
175
|
-
};
|
|
176
|
-
return db;
|
|
177
|
-
}
|
|
178
|
-
//# sourceMappingURL=fakes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"fakes.js","sourceRoot":"/","sources":["agent/tests/fakes.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAmBH,SAAS,MAAM,CAAC,MAAc,EAAE,OAA0B;IACxD,OAAO,CAAC,KAAK,IAAI,CAAC,CAAC;IACnB,OAAO,GAAG,MAAM,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;AACtC,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,iBAAiB;IAC/B,MAAM,MAAM,GAAG,IAAI,GAAG,EAAuB,CAAC;IAC9C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAgC,CAAC;IAC3D,MAAM,WAAW,GAAG,IAAI,GAAG,EAAiC,CAAC;IAC7D,MAAM,YAAY,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAClC,MAAM,gBAAgB,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IACtC,MAAM,iBAAiB,GAAG,EAAE,KAAK,EAAE,CAAC,EAAE,CAAC;IAEvC,SAAS,cAAc,CAAC,KAAkB;QACxC,MAAM,eAAe,GAAG,CAAC,GAAG,UAAU,CAAC,MAAM,EAAE,CAAC,CAAC,MAAM,CAAC,CAAC,C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C,KAAK,KAAK,cAAc;gBACnC,CAAC,cAAc,KAAK,QAAQ,IAAI,UAAU,CAAC,OAAO,KAAK,gBAAgB,CAAC;gBACxE,UAAU,CAAC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAC,CACtC,CAAC;QACJ,CAAC;QAED,KAAK,CAAC,oBAAoB;YACxB,MAAM,IAAI,KAAK,CAAC,+DAA+D,CAAC,CAAC;QACnF,CAAC;QAED,iBAAiB;YACf,OAAO;gBACL,gBAAgB,EAAE,sCAAsC;gBACxD,UAAU,EAAE,sCAAsC;aACnD,CAAC;QACJ,CAAC;KACF,CAAC;IAEF,OAAO,EAAE,CAAC;AACZ,CAAC","sourcesContent":["/**\n * Minimal in-memory fake of the {@link AgentDatabase} interface used by agent\n * tool tests. Only the surface area exercised by the specs in this folder is\n * implemented — unused methods throw if called so tests fail loudly.\n */\n\nimport type { AgentDatabase, AgentPermissionRecord, AgentRecord, AgentTransportRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput } from '../../shared/interfaces/agent.interface.js';\n\nexport interface SeedAgentInput {\n id: string;\n ownerId: string;\n name: string;\n type?: 'personal' | 'external' | 'system';\n description?: string | null;\n status?: 'active' | 'inactive';\n}\n\nexport interface FakeAgentDb extends AgentDatabase {\n seedAgent(input: SeedAgentInput): Promise<AgentRecord>;\n getPermissionsForAgent(agentId: string): AgentPermissionRecord[];\n getTransportsForAgent(agentId: string): AgentTransportRecord[];\n}\n\nfunction nextId(prefix: string, counter: { value: number }): string {\n counter.value += 1;\n return `${prefix}-${counter.value}`;\n}\n\n/**\n * Creates an in-memory agent database fake for unit tests. Only the methods\n * exercised by the agent tool specs are implemented; the rest throw.\n */\nexport function createFakeAgentDb(): FakeAgentDb {\n const agents = new Map<string, AgentRecord>();\n const transports = new Map<string, AgentTransportRecord>();\n const permissions = new Map<string, AgentPermissionRecord>();\n const agentCounter = { value: 0 };\n const transportCounter = { value: 0 };\n const permissionCounter = { value: 0 };\n\n function buildRelations(agent: AgentRecord): AgentWithRelations {\n const agentTransports = [...transports.values()].filter((t) => t.agentId === agent.id);\n const agentPermissions = [...permissions.values()].filter((p) => p.agentId === agent.id);\n return {\n ...agent,\n transports: agentTransports,\n permissions: agentPermissions,\n };\n }\n\n const db: FakeAgentDb = {\n getPermissionsForAgent(agentId: string) {\n return [...permissions.values()]\n .filter((permission) => permission.agentId === agentId)\n .map((permission) => ({ ...permission, actions: [...permission.actions] }));\n },\n\n getTransportsForAgent(agentId: string) {\n return [...transports.values()]\n .filter((transport) => transport.agentId === agentId)\n .map((transport) => ({ ...transport }));\n },\n\n async seedAgent(input: SeedAgentInput) {\n const now = new Date();\n const agent: AgentRecord = {\n id: input.id,\n ownerId: input.ownerId,\n name: input.name,\n description: input.description ?? null,\n type: input.type ?? 'external',\n status: input.status ?? 'active',\n metadata: {},\n createdAt: now,\n updatedAt: now,\n };\n agents.set(agent.id, agent);\n return agent;\n },\n\n async createAgent(input: CreateAgentInput) {\n const now = new Date();\n const agent: AgentRecord = {\n id: nextId('agent', agentCounter),\n ownerId: input.ownerId,\n name: input.name,\n description: input.description ?? null,\n type: input.type,\n status: 'active',\n metadata: input.metadata ?? {},\n createdAt: now,\n updatedAt: now,\n };\n agents.set(agent.id, agent);\n return agent;\n },\n\n async getAgent(agentId: string) {\n return agents.get(agentId) ?? null;\n },\n\n async getAgentWithRelations(agentId: string) {\n const agent = agents.get(agentId);\n if (!agent) return null;\n return buildRelations(agent);\n },\n\n async updateAgent(agentId, updates) {\n const existing = agents.get(agentId);\n if (!existing) return null;\n const updated: AgentRecord = {\n ...existing,\n ...('name' in updates && updates.name !== undefined ? { name: updates.name } : {}),\n ...('description' in updates && updates.description !== undefined ? { description: updates.description } : {}),\n ...('status' in updates && updates.status !== undefined ? { status: updates.status } : {}),\n ...('metadata' in updates && updates.metadata !== undefined ? { metadata: updates.metadata } : {}),\n updatedAt: new Date(),\n };\n agents.set(agentId, updated);\n return updated;\n },\n\n async deleteAgent(agentId: string) {\n agents.delete(agentId);\n for (const [id, transport] of transports) {\n if (transport.agentId === agentId) transports.delete(id);\n }\n for (const [id, permission] of permissions) {\n if (permission.agentId === agentId) permissions.delete(id);\n }\n },\n\n async listAgentsForUser(userId: string) {\n return [...agents.values()]\n .filter((agent) => agent.ownerId === userId)\n .map((agent) => buildRelations(agent));\n },\n\n async createTransport(input: CreateTransportInput) {\n const transport: AgentTransportRecord = {\n id: nextId('transport', transportCounter),\n agentId: input.agentId,\n channel: input.channel,\n config: input.config ?? {},\n priority: input.priority ?? 0,\n active: true,\n failureCount: 0,\n };\n transports.set(transport.id, transport);\n return transport;\n },\n\n async deleteTransport(transportId: string) {\n transports.delete(transportId);\n },\n\n async recordTransportFailure(transportId: string) {\n const transport = transports.get(transportId);\n if (transport) {\n transport.failureCount += 1;\n }\n },\n\n async recordTransportSuccess(transportId: string) {\n const transport = transports.get(transportId);\n if (transport) {\n transport.failureCount = 0;\n }\n },\n\n async grantPermission(input: GrantPermissionInput) {\n const permission: AgentPermissionRecord = {\n id: nextId('permission', permissionCounter),\n agentId: input.agentId,\n userId: input.userId,\n scope: input.scope ?? 'global',\n scopeId: input.scopeId ?? null,\n actions: [...input.actions],\n createdAt: new Date(),\n };\n permissions.set(permission.id, permission);\n return permission;\n },\n\n async revokePermission(permissionId: string) {\n permissions.delete(permissionId);\n },\n\n async hasPermission(agentId, userId, action, scope) {\n const requestedScope = scope?.type ?? 'global';\n const requestedScopeId = scope?.id ?? null;\n return [...permissions.values()].some(\n (permission) =>\n permission.agentId === agentId &&\n permission.userId === userId &&\n permission.scope === requestedScope &&\n (requestedScope === 'global' || permission.scopeId === requestedScopeId) &&\n permission.actions.includes(action),\n );\n },\n\n async findAuthorizedAgents() {\n throw new Error('findAuthorizedAgents is not implemented in the fake agent DB.');\n },\n\n getSystemAgentIds() {\n return {\n chatOrchestrator: '00000000-0000-0000-0000-000000000001',\n negotiator: '00000000-0000-0000-0000-000000000002',\n };\n },\n };\n\n return db;\n}\n"]}
|