@indexnetwork/protocol 21.0.0-rc.486.1 → 21.0.0-rc.488.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.
Files changed (250) hide show
  1. package/dist/agents/{ports/agent.dispatcher.port.d.ts → agent.dispatcher.port.d.ts} +2 -2
  2. package/dist/agents/agent.module.d.ts +19 -0
  3. package/dist/agents/agent.module.js +11 -0
  4. package/dist/agents/{ports/agent.repository.port.d.ts → agent.repository.port.d.ts} +1 -1
  5. package/dist/agents/{application/agent.tools.d.ts → agent.tools.d.ts} +2 -2
  6. package/dist/agents/{application/agent.tools.js → agent.tools.js} +2 -2
  7. package/dist/chat/chat-streaming.types.d.ts +1 -1
  8. package/dist/chat/chat.agent.d.ts +1 -1
  9. package/dist/chat/negotiator.prompt.d.ts +1 -1
  10. package/dist/chat/negotiator.prompt.js +1 -1
  11. package/dist/contacts/contact.module.d.ts +8 -0
  12. package/dist/contacts/contact.module.js +6 -0
  13. package/dist/contacts/{ports/contact.repository.port.d.ts → contact.repository.port.d.ts} +2 -2
  14. package/dist/contacts/{ports/contact.repository.port.js → contact.repository.port.js} +1 -1
  15. package/dist/contacts/{application/contact.tools.d.ts → contact.tools.d.ts} +3 -3
  16. package/dist/contacts/{application/contact.tools.js → contact.tools.js} +3 -3
  17. package/dist/contacts/{ports/contact.tools.port.d.ts → contact.tools.port.d.ts} +2 -3
  18. package/dist/contacts/{ports/contact.tools.port.js → contact.tools.port.js} +2 -3
  19. package/dist/contacts/{domain/contact.types.d.ts → contact.types.d.ts} +2 -2
  20. package/dist/contacts/contact.types.js +8 -0
  21. package/dist/contexts/context.module.d.ts +13 -0
  22. package/dist/contexts/context.module.js +12 -0
  23. package/dist/contexts/{ports/participant-context.tools.port.d.ts → context.tools.port.d.ts} +1 -1
  24. package/dist/discovery/hyde.graph.d.ts +1 -1
  25. package/dist/discovery/hyde.state.d.ts +1 -1
  26. package/dist/enrichment/enrichment.graph.d.ts +1 -1
  27. package/dist/enrichment/enrichment.state.d.ts +1 -1
  28. package/dist/enrichment/enrichment.tools.context-read.d.ts +1 -1
  29. package/dist/enrichment/enrichment.tools.context-write.d.ts +1 -1
  30. package/dist/enrichment/enrichment.tools.d.ts +1 -1
  31. package/dist/enrichment/enrichment.tools.helpers.d.ts +1 -1
  32. package/dist/index.d.ts +86 -86
  33. package/dist/index.js +61 -61
  34. package/dist/intents/graph/intent.graph.d.ts +1 -1
  35. package/dist/intents/graph/intent.graph.infer.d.ts +1 -1
  36. package/dist/intents/graph/intent.graph.reconcile.d.ts +1 -1
  37. package/dist/intents/graph/intent.graph.shared.d.ts +1 -1
  38. package/dist/intents/graph/intent.graph.state.d.ts +1 -1
  39. package/dist/intents/intent.module.d.ts +1 -1
  40. package/dist/maintenance/maintenance.graph.js +3 -3
  41. package/dist/mcp/mcp.server.js +1 -1
  42. package/dist/negotiations/{application/insight.generator.js → insight.generator.js} +4 -4
  43. package/dist/negotiations/{application/negotiation.agent.d.ts → negotiation.agent.d.ts} +6 -6
  44. package/dist/negotiations/{application/negotiation.agent.js → negotiation.agent.js} +9 -9
  45. package/dist/negotiations/negotiation.attribution.d.ts +1 -1
  46. package/dist/negotiations/{application/negotiation.candidates.d.ts → negotiation.candidates.d.ts} +5 -5
  47. package/dist/negotiations/{application/negotiation.candidates.js → negotiation.candidates.js} +1 -1
  48. package/dist/negotiations/{domain/negotiation.consultation-policy.d.ts → negotiation.consultation-policy.d.ts} +2 -2
  49. package/dist/negotiations/{application/negotiation.detail-reader.d.ts → negotiation.detail-reader.d.ts} +5 -5
  50. package/dist/negotiations/{application/negotiation.detail-reader.js → negotiation.detail-reader.js} +3 -3
  51. package/dist/negotiations/{application/negotiation.graph.d.ts → negotiation.graph.d.ts} +81 -81
  52. package/dist/negotiations/{application/negotiation.graph.finalize.js → negotiation.graph.finalize.js} +4 -4
  53. package/dist/negotiations/{application/negotiation.graph.init.d.ts → negotiation.graph.init.d.ts} +8 -8
  54. package/dist/negotiations/{application/negotiation.graph.init.js → negotiation.graph.init.js} +5 -5
  55. package/dist/negotiations/{application/negotiation.graph.js → negotiation.graph.js} +4 -4
  56. package/dist/negotiations/{application/negotiation.graph.screen.d.ts → negotiation.graph.screen.d.ts} +1 -1
  57. package/dist/negotiations/{application/negotiation.graph.screen.js → negotiation.graph.screen.js} +2 -2
  58. package/dist/negotiations/{application/negotiation.graph.shared.d.ts → negotiation.graph.shared.d.ts} +13 -13
  59. package/dist/negotiations/{application/negotiation.graph.shared.js → negotiation.graph.shared.js} +2 -2
  60. package/dist/negotiations/{application/negotiation.graph.turn.d.ts → negotiation.graph.turn.d.ts} +2 -2
  61. package/dist/negotiations/{application/negotiation.graph.turn.js → negotiation.graph.turn.js} +6 -6
  62. package/dist/negotiations/{domain/negotiation.hermes-contract.d.ts → negotiation.hermes-contract.d.ts} +1 -1
  63. package/dist/negotiations/{domain/negotiation.lifecycle-narration.d.ts → negotiation.lifecycle-narration.d.ts} +1 -1
  64. package/dist/negotiations/negotiation.module.d.ts +28 -0
  65. package/dist/negotiations/negotiation.module.js +19 -0
  66. package/dist/negotiations/{domain/negotiation.protocol.d.ts → negotiation.protocol.d.ts} +1 -1
  67. package/dist/negotiations/{domain/negotiation.protocol.js → negotiation.protocol.js} +1 -1
  68. package/dist/negotiations/{domain/negotiation.question-safety.js → negotiation.question-safety.js} +1 -1
  69. package/dist/negotiations/{application/negotiation.reflect.d.ts → negotiation.reflect.d.ts} +3 -3
  70. package/dist/negotiations/{application/negotiation.reflect.js → negotiation.reflect.js} +5 -5
  71. package/dist/negotiations/{application/negotiation.screen.d.ts → negotiation.screen.d.ts} +8 -8
  72. package/dist/negotiations/{application/negotiation.screen.js → negotiation.screen.js} +7 -7
  73. package/dist/negotiations/{domain/negotiation.state.d.ts → negotiation.state.d.ts} +2 -2
  74. package/dist/negotiations/{domain/negotiation.state.js → negotiation.state.js} +1 -1
  75. package/dist/negotiations/{application/negotiation.summarizer.d.ts → negotiation.summarizer.d.ts} +2 -2
  76. package/dist/negotiations/{application/negotiation.summarizer.js → negotiation.summarizer.js} +4 -4
  77. package/dist/negotiations/{application/negotiation.tools.d.ts → negotiation.tools.d.ts} +3 -3
  78. package/dist/negotiations/{application/negotiation.tools.js → negotiation.tools.js} +9 -9
  79. package/dist/negotiations/{ports/negotiation.tools.port.d.ts → negotiation.tools.port.d.ts} +4 -4
  80. package/dist/networks/indexer.graph.d.ts +1 -1
  81. package/dist/networks/indexer.state.d.ts +1 -1
  82. package/dist/opportunities/{application/delivery-card.cache.d.ts → delivery-card.cache.d.ts} +2 -2
  83. package/dist/opportunities/{application/delivery-card.cache.js → delivery-card.cache.js} +2 -2
  84. package/dist/opportunities/discriminator/discriminator.adjustments.d.ts +1 -1
  85. package/dist/opportunities/discriminator/discriminator.push.d.ts +1 -1
  86. package/dist/opportunities/discriminator/discriminator.question.d.ts +1 -1
  87. package/dist/opportunities/{application/negotiation-context.loader.d.ts → negotiation-context.loader.d.ts} +2 -2
  88. package/dist/opportunities/{application/negotiation-context.loader.js → negotiation-context.loader.js} +1 -1
  89. package/dist/opportunities/{domain/negotiation-summary.builder.d.ts → negotiation-summary.builder.d.ts} +2 -2
  90. package/dist/opportunities/{domain/opportunity.actor.d.ts → opportunity.actor.d.ts} +1 -1
  91. package/dist/opportunities/{application/opportunity.discovery-negotiation-summary.d.ts → opportunity.discovery-negotiation-summary.d.ts} +3 -3
  92. package/dist/opportunities/{application/opportunity.discovery-negotiation-summary.js → opportunity.discovery-negotiation-summary.js} +3 -3
  93. package/dist/opportunities/{application/opportunity.enricher.d.ts → opportunity.enricher.d.ts} +2 -2
  94. package/dist/opportunities/{application/opportunity.enricher.js → opportunity.enricher.js} +2 -2
  95. package/dist/opportunities/{application/opportunity.evaluator.d.ts → opportunity.evaluator.d.ts} +3 -3
  96. package/dist/opportunities/{application/opportunity.evaluator.js → opportunity.evaluator.js} +7 -7
  97. package/dist/opportunities/{domain/opportunity.evidence.d.ts → opportunity.evidence.d.ts} +1 -1
  98. package/dist/opportunities/{application/opportunity.existing-negotiation.d.ts → opportunity.existing-negotiation.d.ts} +2 -2
  99. package/dist/opportunities/{application/opportunity.existing-negotiation.js → opportunity.existing-negotiation.js} +1 -1
  100. package/dist/opportunities/{application/opportunity.feed-selection.d.ts → opportunity.feed-selection.d.ts} +2 -2
  101. package/dist/opportunities/{application/opportunity.feed-selection.js → opportunity.feed-selection.js} +1 -1
  102. package/dist/opportunities/{application/opportunity.graph.d.ts → opportunity.graph.d.ts} +130 -130
  103. package/dist/opportunities/{application/opportunity.graph.discovery-strategies.d.ts → opportunity.graph.discovery-strategies.d.ts} +5 -5
  104. package/dist/opportunities/{application/opportunity.graph.discovery-strategies.js → opportunity.graph.discovery-strategies.js} +5 -5
  105. package/dist/opportunities/{application/opportunity.graph.discovery.d.ts → opportunity.graph.discovery.d.ts} +3 -3
  106. package/dist/opportunities/{application/opportunity.graph.discovery.js → opportunity.graph.discovery.js} +6 -6
  107. package/dist/opportunities/{application/opportunity.graph.evaluation.d.ts → opportunity.graph.evaluation.d.ts} +3 -3
  108. package/dist/opportunities/{application/opportunity.graph.evaluation.js → opportunity.graph.evaluation.js} +8 -8
  109. package/dist/opportunities/{application/opportunity.graph.js → opportunity.graph.js} +13 -13
  110. package/dist/opportunities/{application/opportunity.graph.modes.d.ts → opportunity.graph.modes.d.ts} +37 -37
  111. package/dist/opportunities/{application/opportunity.graph.modes.js → opportunity.graph.modes.js} +9 -9
  112. package/dist/opportunities/{application/opportunity.graph.negotiate.d.ts → opportunity.graph.negotiate.d.ts} +4 -4
  113. package/dist/opportunities/{application/opportunity.graph.negotiate.js → opportunity.graph.negotiate.js} +6 -6
  114. package/dist/opportunities/{application/opportunity.graph.persist-node.d.ts → opportunity.graph.persist-node.d.ts} +2 -2
  115. package/dist/opportunities/{application/opportunity.graph.persist-node.js → opportunity.graph.persist-node.js} +9 -9
  116. package/dist/opportunities/{application/opportunity.graph.prep.d.ts → opportunity.graph.prep.d.ts} +4 -4
  117. package/dist/opportunities/{application/opportunity.graph.prep.js → opportunity.graph.prep.js} +6 -6
  118. package/dist/opportunities/{application/opportunity.graph.shared.d.ts → opportunity.graph.shared.d.ts} +28 -28
  119. package/dist/opportunities/{application/opportunity.graph.shared.js → opportunity.graph.shared.js} +4 -4
  120. package/dist/opportunities/{application/opportunity.introducer.js → opportunity.introducer.js} +1 -1
  121. package/dist/opportunities/{application/opportunity.lifecycle.d.ts → opportunity.lifecycle.d.ts} +1 -1
  122. package/dist/opportunities/{index.d.ts → opportunity.module.d.ts} +24 -24
  123. package/dist/opportunities/{index.js → opportunity.module.js} +16 -16
  124. package/dist/opportunities/{application/opportunity.newborn-stamping.d.ts → opportunity.newborn-stamping.d.ts} +1 -1
  125. package/dist/opportunities/{application/opportunity.owner-provenance.d.ts → opportunity.owner-provenance.d.ts} +1 -1
  126. package/dist/opportunities/{application/opportunity.pending-questions.d.ts → opportunity.pending-questions.d.ts} +1 -1
  127. package/dist/opportunities/{application/opportunity.pending-questions.js → opportunity.pending-questions.js} +1 -1
  128. package/dist/opportunities/{application/opportunity.persist.d.ts → opportunity.persist.d.ts} +3 -3
  129. package/dist/opportunities/{application/opportunity.persist.js → opportunity.persist.js} +3 -3
  130. package/dist/opportunities/{application/opportunity.persistence-admission.d.ts → opportunity.persistence-admission.d.ts} +1 -1
  131. package/dist/opportunities/{application/opportunity.presentation.d.ts → opportunity.presentation.d.ts} +3 -3
  132. package/dist/opportunities/{application/opportunity.presentation.js → opportunity.presentation.js} +6 -6
  133. package/dist/opportunities/{domain/opportunity.state.d.ts → opportunity.state.d.ts} +6 -6
  134. package/dist/opportunities/{application/opportunity.tools.cards.d.ts → opportunity.tools.cards.d.ts} +4 -4
  135. package/dist/opportunities/{application/opportunity.tools.cards.js → opportunity.tools.cards.js} +2 -2
  136. package/dist/opportunities/{application/opportunity.tools.d.ts → opportunity.tools.d.ts} +2 -2
  137. package/dist/opportunities/{application/opportunity.tools.js → opportunity.tools.js} +7 -7
  138. package/dist/opportunities/{application/opportunity.tools.list.d.ts → opportunity.tools.list.d.ts} +2 -2
  139. package/dist/opportunities/{application/opportunity.tools.list.js → opportunity.tools.list.js} +4 -4
  140. package/dist/opportunities/{ports/opportunity.tools.port.d.ts → opportunity.tools.port.d.ts} +2 -2
  141. package/dist/opportunities/{application/opportunity.update-admission.d.ts → opportunity.update-admission.d.ts} +1 -1
  142. package/dist/opportunities/{domain/opportunity.utils.d.ts → opportunity.utils.d.ts} +3 -3
  143. package/dist/opportunities/{domain/opportunity.utils.js → opportunity.utils.js} +3 -3
  144. package/dist/opportunities/radar/radar.graph.d.ts +2 -2
  145. package/dist/opportunities/radar/radar.graph.js +6 -6
  146. package/dist/opportunities/radar/radar.health.js +1 -1
  147. package/dist/opportunities/radar/radar.state.d.ts +1 -1
  148. package/dist/premises/premise.graph.d.ts +1 -1
  149. package/dist/premises/premise.state.d.ts +1 -1
  150. package/dist/premises/premise.tools.d.ts +1 -1
  151. package/dist/questions/question.input.d.ts +1 -1
  152. package/dist/questions/question.input.js +1 -1
  153. package/dist/questions/question.presets.js +1 -1
  154. package/dist/shared/agent/tool.factory.d.ts +1 -1
  155. package/dist/shared/agent/tool.factory.js +9 -9
  156. package/dist/shared/agent/tool.helpers.d.ts +4 -4
  157. package/dist/shared/agent/tool.registry.d.ts +1 -1
  158. package/dist/shared/agent/tool.registry.js +5 -5
  159. package/dist/shared/interfaces/agent-dispatcher.interface.d.ts +1 -1
  160. package/package.json +1 -1
  161. package/dist/agents/application/index.d.ts +0 -23
  162. package/dist/agents/application/index.js +0 -24
  163. package/dist/agents/domain/index.d.ts +0 -19
  164. package/dist/agents/domain/index.js +0 -1
  165. package/dist/agents/index.d.ts +0 -21
  166. package/dist/agents/index.js +0 -11
  167. package/dist/agents/ports/index.d.ts +0 -27
  168. package/dist/agents/ports/index.js +0 -25
  169. package/dist/contacts/application/index.d.ts +0 -10
  170. package/dist/contacts/application/index.js +0 -10
  171. package/dist/contacts/domain/contact.types.js +0 -8
  172. package/dist/contacts/domain/index.d.ts +0 -12
  173. package/dist/contacts/index.d.ts +0 -9
  174. package/dist/contacts/index.js +0 -8
  175. package/dist/contacts/ports/index.d.ts +0 -19
  176. package/dist/contacts/ports/index.js +0 -18
  177. package/dist/contexts/application/index.d.ts +0 -72
  178. package/dist/contexts/application/index.js +0 -82
  179. package/dist/contexts/domain/index.d.ts +0 -67
  180. package/dist/contexts/domain/index.js +0 -68
  181. package/dist/contexts/index.d.ts +0 -13
  182. package/dist/contexts/index.js +0 -12
  183. package/dist/contexts/ports/index.d.ts +0 -37
  184. package/dist/contexts/ports/index.js +0 -34
  185. package/dist/contexts/ports/participant-context.tools.port.js +0 -1
  186. package/dist/negotiations/application/index.d.ts +0 -48
  187. package/dist/negotiations/application/index.js +0 -49
  188. package/dist/negotiations/domain/index.d.ts +0 -56
  189. package/dist/negotiations/domain/index.js +0 -57
  190. package/dist/negotiations/index.d.ts +0 -12
  191. package/dist/negotiations/index.js +0 -9
  192. package/dist/negotiations/ports/index.d.ts +0 -16
  193. package/dist/negotiations/ports/index.js +0 -16
  194. package/dist/opportunities/application/index.d.ts +0 -59
  195. package/dist/opportunities/application/index.js +0 -64
  196. package/dist/opportunities/domain/index.d.ts +0 -51
  197. package/dist/opportunities/domain/index.js +0 -48
  198. package/dist/opportunities/ports/index.d.ts +0 -5
  199. package/dist/opportunities/ports/index.js +0 -1
  200. /package/dist/agents/{ports/agent.dispatcher.port.js → agent.dispatcher.port.js} +0 -0
  201. /package/dist/agents/{ports/agent.repository.port.js → agent.repository.port.js} +0 -0
  202. /package/dist/agents/{ports/agent.tools.port.d.ts → agent.tools.port.d.ts} +0 -0
  203. /package/dist/agents/{ports/agent.tools.port.js → agent.tools.port.js} +0 -0
  204. /package/dist/agents/{domain/agent.types.d.ts → agent.types.d.ts} +0 -0
  205. /package/dist/agents/{domain/agent.types.js → agent.types.js} +0 -0
  206. /package/dist/{contacts/domain/index.js → contexts/context.tools.port.js} +0 -0
  207. /package/dist/negotiations/{application/insight.generator.d.ts → insight.generator.d.ts} +0 -0
  208. /package/dist/negotiations/{domain/negotiation.consultation-policy.js → negotiation.consultation-policy.js} +0 -0
  209. /package/dist/negotiations/{domain/negotiation.deadlock.contracts.d.ts → negotiation.deadlock.contracts.d.ts} +0 -0
  210. /package/dist/negotiations/{domain/negotiation.deadlock.contracts.js → negotiation.deadlock.contracts.js} +0 -0
  211. /package/dist/negotiations/{domain/negotiation.deadlock.d.ts → negotiation.deadlock.d.ts} +0 -0
  212. /package/dist/negotiations/{domain/negotiation.deadlock.js → negotiation.deadlock.js} +0 -0
  213. /package/dist/negotiations/{domain/negotiation.expected-speaker.d.ts → negotiation.expected-speaker.d.ts} +0 -0
  214. /package/dist/negotiations/{domain/negotiation.expected-speaker.js → negotiation.expected-speaker.js} +0 -0
  215. /package/dist/negotiations/{application/negotiation.graph.finalize.d.ts → negotiation.graph.finalize.d.ts} +0 -0
  216. /package/dist/negotiations/{domain/negotiation.hermes-contract.js → negotiation.hermes-contract.js} +0 -0
  217. /package/dist/negotiations/{domain/negotiation.intent-snapshot-provenance.d.ts → negotiation.intent-snapshot-provenance.d.ts} +0 -0
  218. /package/dist/negotiations/{domain/negotiation.intent-snapshot-provenance.js → negotiation.intent-snapshot-provenance.js} +0 -0
  219. /package/dist/negotiations/{domain/negotiation.lifecycle-narration.js → negotiation.lifecycle-narration.js} +0 -0
  220. /package/dist/negotiations/{domain/negotiation.memory.d.ts → negotiation.memory.d.ts} +0 -0
  221. /package/dist/negotiations/{domain/negotiation.memory.js → negotiation.memory.js} +0 -0
  222. /package/dist/negotiations/{domain/negotiation.question-safety.d.ts → negotiation.question-safety.d.ts} +0 -0
  223. /package/dist/negotiations/{domain/negotiation.screen.contracts.d.ts → negotiation.screen.contracts.d.ts} +0 -0
  224. /package/dist/negotiations/{domain/negotiation.screen.contracts.js → negotiation.screen.contracts.js} +0 -0
  225. /package/dist/negotiations/{domain/negotiation.stance.contracts.d.ts → negotiation.stance.contracts.d.ts} +0 -0
  226. /package/dist/negotiations/{domain/negotiation.stance.contracts.js → negotiation.stance.contracts.js} +0 -0
  227. /package/dist/negotiations/{domain/negotiation.task-lock-policy.d.ts → negotiation.task-lock-policy.d.ts} +0 -0
  228. /package/dist/negotiations/{domain/negotiation.task-lock-policy.js → negotiation.task-lock-policy.js} +0 -0
  229. /package/dist/negotiations/{ports/negotiation.tools.port.js → negotiation.tools.port.js} +0 -0
  230. /package/dist/negotiations/{domain/negotiation.turn-cap.d.ts → negotiation.turn-cap.d.ts} +0 -0
  231. /package/dist/negotiations/{domain/negotiation.turn-cap.js → negotiation.turn-cap.js} +0 -0
  232. /package/dist/opportunities/{domain/negotiation-summary.builder.js → negotiation-summary.builder.js} +0 -0
  233. /package/dist/opportunities/{domain/opportunity.actor.js → opportunity.actor.js} +0 -0
  234. /package/dist/opportunities/{domain/opportunity.evidence.js → opportunity.evidence.js} +0 -0
  235. /package/dist/opportunities/{application/opportunity.introducer-feature.d.ts → opportunity.introducer-feature.d.ts} +0 -0
  236. /package/dist/opportunities/{application/opportunity.introducer-feature.js → opportunity.introducer-feature.js} +0 -0
  237. /package/dist/opportunities/{application/opportunity.introducer.d.ts → opportunity.introducer.d.ts} +0 -0
  238. /package/dist/opportunities/{domain/opportunity.labels.d.ts → opportunity.labels.d.ts} +0 -0
  239. /package/dist/opportunities/{domain/opportunity.labels.js → opportunity.labels.js} +0 -0
  240. /package/dist/opportunities/{application/opportunity.lifecycle.js → opportunity.lifecycle.js} +0 -0
  241. /package/dist/opportunities/{application/opportunity.newborn-stamping.js → opportunity.newborn-stamping.js} +0 -0
  242. /package/dist/opportunities/{application/opportunity.owner-approval.d.ts → opportunity.owner-approval.d.ts} +0 -0
  243. /package/dist/opportunities/{application/opportunity.owner-approval.js → opportunity.owner-approval.js} +0 -0
  244. /package/dist/opportunities/{application/opportunity.owner-provenance.js → opportunity.owner-provenance.js} +0 -0
  245. /package/dist/opportunities/{application/opportunity.persistence-admission.js → opportunity.persistence-admission.js} +0 -0
  246. /package/dist/opportunities/{domain/opportunity.state.js → opportunity.state.js} +0 -0
  247. /package/dist/opportunities/{ports/opportunity.tools.port.js → opportunity.tools.port.js} +0 -0
  248. /package/dist/opportunities/{application/opportunity.update-admission.js → opportunity.update-admission.js} +0 -0
  249. /package/dist/questions/{index.d.ts → question.module.d.ts} +0 -0
  250. /package/dist/questions/{index.js → question.module.js} +0 -0
@@ -5,22 +5,22 @@
5
5
  * Supersedes the capabilities/*.facade.ts + opportunities/public/ pair; the export
6
6
  * list is the union of the facades it replaces, so the contract is unchanged.
7
7
  */
8
- export { getOrCreateDeliveryCardBatch, } from "./application/delivery-card.cache.js";
9
- export { OpportunityEvaluator, } from "./application/opportunity.evaluator.js";
10
- export type { EvaluatorInput, } from "./application/opportunity.evaluator.js";
11
- export { OpportunityGraphFactory, } from "./application/opportunity.graph.js";
12
- export type { OpportunityGraphThresholdOverrides, } from "./application/opportunity.graph.js";
13
- export { isIntroducerDiscoveryEnabled, } from "./application/opportunity.introducer-feature.js";
14
- export { INTRODUCER_DISCOVERY_SOURCE, MAX_CANDIDATES_PER_CONTACT, MAX_CONTACTS_PER_CYCLE, runIntroducerDiscovery, selectContactsForDiscovery, shouldRunIntroducerDiscovery, } from "./application/opportunity.introducer.js";
15
- export type { ContactWithIntents, IntroducerDiscoveryDatabase, IntroducerDiscoveryQueue, } from "./application/opportunity.introducer.js";
16
- export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput, } from "./application/opportunity.newborn-stamping.js";
17
- export { opportunityOwnerActionForStatus, } from "./application/opportunity.owner-approval.js";
18
- export type { OpportunityOwnerAction, OpportunityOwnerApprovalAttestation, OpportunityOwnerApprovalAuthority, OpportunityOwnerApprovalBinding, OpportunityOwnerApprovalChallenge, OpportunityOwnerApprovalDenialReason, OpportunityOwnerApprovalVerdict, OpportunityOwnerInteractionProvenance, OpportunityOwnerInteractionSurface, } from "./application/opportunity.owner-approval.js";
19
- export { bindOwnerApprovalProvenance, } from "./application/opportunity.owner-provenance.js";
20
- export { persistOpportunities, } from "./application/opportunity.persist.js";
21
- export { gatherPresenterContext, OpportunityPresenter, } from "./application/opportunity.presentation.js";
22
- export type { PresenterDatabase, } from "./application/opportunity.presentation.js";
23
- export { createOpportunityTools, } from "./application/opportunity.tools.js";
8
+ export { getOrCreateDeliveryCardBatch, } from "./delivery-card.cache.js";
9
+ export { OpportunityEvaluator, } from "./opportunity.evaluator.js";
10
+ export type { EvaluatorInput, } from "./opportunity.evaluator.js";
11
+ export { OpportunityGraphFactory, } from "./opportunity.graph.js";
12
+ export type { OpportunityGraphThresholdOverrides, } from "./opportunity.graph.js";
13
+ export { isIntroducerDiscoveryEnabled, } from "./opportunity.introducer-feature.js";
14
+ export { INTRODUCER_DISCOVERY_SOURCE, MAX_CANDIDATES_PER_CONTACT, MAX_CONTACTS_PER_CYCLE, runIntroducerDiscovery, selectContactsForDiscovery, shouldRunIntroducerDiscovery, } from "./opportunity.introducer.js";
15
+ export type { ContactWithIntents, IntroducerDiscoveryDatabase, IntroducerDiscoveryQueue, } from "./opportunity.introducer.js";
16
+ export type { StampNewbornOpportunitiesFn, StampNewbornOpportunitiesInput, } from "./opportunity.newborn-stamping.js";
17
+ export { opportunityOwnerActionForStatus, } from "./opportunity.owner-approval.js";
18
+ export type { OpportunityOwnerAction, OpportunityOwnerApprovalAttestation, OpportunityOwnerApprovalAuthority, OpportunityOwnerApprovalBinding, OpportunityOwnerApprovalChallenge, OpportunityOwnerApprovalDenialReason, OpportunityOwnerApprovalVerdict, OpportunityOwnerInteractionProvenance, OpportunityOwnerInteractionSurface, } from "./opportunity.owner-approval.js";
19
+ export { bindOwnerApprovalProvenance, } from "./opportunity.owner-provenance.js";
20
+ export { persistOpportunities, } from "./opportunity.persist.js";
21
+ export { gatherPresenterContext, OpportunityPresenter, } from "./opportunity.presentation.js";
22
+ export type { PresenterDatabase, } from "./opportunity.presentation.js";
23
+ export { createOpportunityTools, } from "./opportunity.tools.js";
24
24
  export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./discovery.env.js";
25
25
  export type { DiscoveryMatchType, DiscoveryProfileSource, } from "./discovery.env.js";
26
26
  export { buildPoolAdjustment, mergePoolAdjustment, planPoolAdjustments, } from "./discriminator/discriminator.adjustments.js";
@@ -34,13 +34,13 @@ export { BOTH_MATTER_LABEL, selectQuestionDiscriminators, synthesizePoolQuestion
34
34
  export { runPoolDiscriminatorShadow, } from "./discriminator/discriminator.shadow.js";
35
35
  export type { DiscriminatorMiningInput, MinedDiscriminator, PoolCandidate, } from "./discriminator/discriminator.types.js";
36
36
  export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims, stripUnsupportedOpportunityClaims as stripUnsupportedOpportunityClaimsText, } from "../shared/utils/claim-safety.js";
37
- export { buildCandidateEvidence, } from "./domain/opportunity.evidence.js";
38
- export { getPrimaryActionLabel, } from "./domain/opportunity.labels.js";
39
- export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey, } from "./application/opportunity.presentation.js";
40
- export { presentOpportunity, stripUuids, truncateAtBoundary, } from "./application/opportunity.presentation.js";
41
- export type { UserInfo, } from "./application/opportunity.presentation.js";
42
- export { DEFAULT_FALLBACK_HEADLINE, safeFallbackSummary, } from "./application/opportunity.presentation.js";
43
- export { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS, selectByComposition, validateOpportunityActors, } from "./domain/opportunity.utils.js";
37
+ export { buildCandidateEvidence, } from "./opportunity.evidence.js";
38
+ export { getPrimaryActionLabel, } from "./opportunity.labels.js";
39
+ export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey, } from "./opportunity.presentation.js";
40
+ export { presentOpportunity, stripUuids, truncateAtBoundary, } from "./opportunity.presentation.js";
41
+ export type { UserInfo, } from "./opportunity.presentation.js";
42
+ export { DEFAULT_FALLBACK_HEADLINE, safeFallbackSummary, } from "./opportunity.presentation.js";
43
+ export { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS, selectByComposition, validateOpportunityActors, } from "./opportunity.utils.js";
44
44
  export { NEGOTIATION_EVIDENCE_MAX_OPPORTUNITIES, negotiationEvidenceQuestionsMode, } from "./negotiation-evidence/negotiation-evidence.env.js";
45
45
  export { NegotiationEvidenceMiner, } from "./negotiation-evidence/negotiation-evidence.miner.js";
46
46
  export { runNegotiationEvidenceShadow, } from "./negotiation-evidence/negotiation-evidence.shadow.js";
@@ -48,7 +48,7 @@ export type { RawEvidenceOutcome, RawEvidenceOwnerAnswer, RawEvidenceSegment, Ra
48
48
  export { isOutcomeQuestionsActivated, OUTCOME_MAX_CANDIDATES, OUTCOME_MAX_PUBLIC_CONTEXT_CHARS, OUTCOME_MIN_INDEPENDENT_EXAMPLES, } from "./outcome/outcome.env.js";
49
49
  export { runOutcomeShadow, } from "./outcome/outcome.shadow.js";
50
50
  export type { OutcomeExample, OutcomeLabel, OutcomeShadowResult, } from "./outcome/outcome.types.js";
51
- export type { OpportunityToolDeps, } from "./ports/index.js";
51
+ export type { OpportunityToolDeps, } from "./opportunity.tools.port.js";
52
52
  export { RadarGraphFactory, } from "./radar/radar.graph.js";
53
53
  export { computeRadarHealth, } from "./radar/radar.health.js";
54
54
  export type { RadarHealthInput, } from "./radar/radar.health.js";
@@ -5,16 +5,16 @@
5
5
  * Supersedes the capabilities/*.facade.ts + opportunities/public/ pair; the export
6
6
  * list is the union of the facades it replaces, so the contract is unchanged.
7
7
  */
8
- export { getOrCreateDeliveryCardBatch, } from "./application/delivery-card.cache.js";
9
- export { OpportunityEvaluator, } from "./application/opportunity.evaluator.js";
10
- export { OpportunityGraphFactory, } from "./application/opportunity.graph.js";
11
- export { isIntroducerDiscoveryEnabled, } from "./application/opportunity.introducer-feature.js";
12
- export { INTRODUCER_DISCOVERY_SOURCE, MAX_CANDIDATES_PER_CONTACT, MAX_CONTACTS_PER_CYCLE, runIntroducerDiscovery, selectContactsForDiscovery, shouldRunIntroducerDiscovery, } from "./application/opportunity.introducer.js";
13
- export { opportunityOwnerActionForStatus, } from "./application/opportunity.owner-approval.js";
14
- export { bindOwnerApprovalProvenance, } from "./application/opportunity.owner-provenance.js";
15
- export { persistOpportunities, } from "./application/opportunity.persist.js";
16
- export { gatherPresenterContext, OpportunityPresenter, } from "./application/opportunity.presentation.js";
17
- export { createOpportunityTools, } from "./application/opportunity.tools.js";
8
+ export { getOrCreateDeliveryCardBatch, } from "./delivery-card.cache.js";
9
+ export { OpportunityEvaluator, } from "./opportunity.evaluator.js";
10
+ export { OpportunityGraphFactory, } from "./opportunity.graph.js";
11
+ export { isIntroducerDiscoveryEnabled, } from "./opportunity.introducer-feature.js";
12
+ export { INTRODUCER_DISCOVERY_SOURCE, MAX_CANDIDATES_PER_CONTACT, MAX_CONTACTS_PER_CYCLE, runIntroducerDiscovery, selectContactsForDiscovery, shouldRunIntroducerDiscovery, } from "./opportunity.introducer.js";
13
+ export { opportunityOwnerActionForStatus, } from "./opportunity.owner-approval.js";
14
+ export { bindOwnerApprovalProvenance, } from "./opportunity.owner-provenance.js";
15
+ export { persistOpportunities, } from "./opportunity.persist.js";
16
+ export { gatherPresenterContext, OpportunityPresenter, } from "./opportunity.presentation.js";
17
+ export { createOpportunityTools, } from "./opportunity.tools.js";
18
18
  export { DISCOVERY_EVALUATOR_MIN_SCORE_DEFAULT, DISCOVERY_MIN_SIMILARITY_DEFAULT, discoveryAllowedTypes, discoveryEvaluatorMinScore, discoveryIntentMatchingEnabled, discoveryMinSimilarity, discoveryProfileMatchingEnabled, discoveryProfileSource, resetDiscoveryEnvWarningsForTests, validateDiscoveryEvaluatorMinScore, validateDiscoveryMinSimilarity, } from "./discovery.env.js";
19
19
  export { buildPoolAdjustment, mergePoolAdjustment, planPoolAdjustments, } from "./discriminator/discriminator.adjustments.js";
20
20
  export { PoolDiscriminatorAssigner, } from "./discriminator/discriminator.assigner.js";
@@ -24,12 +24,12 @@ export { buildPoolQuestionPushMessage, poolQuestionCycleKey, } from "./discrimin
24
24
  export { BOTH_MATTER_LABEL, selectQuestionDiscriminators, synthesizePoolQuestion, toQuestionDiscriminator, } from "./discriminator/discriminator.question.js";
25
25
  export { runPoolDiscriminatorShadow, } from "./discriminator/discriminator.shadow.js";
26
26
  export { hasUnsupportedOpportunityClaim, stripUnsupportedOpportunityClaims, stripUnsupportedOpportunityClaims as stripUnsupportedOpportunityClaimsText, } from "../shared/utils/claim-safety.js";
27
- export { buildCandidateEvidence, } from "./domain/opportunity.evidence.js";
28
- export { getPrimaryActionLabel, } from "./domain/opportunity.labels.js";
29
- export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey, } from "./application/opportunity.presentation.js";
30
- export { presentOpportunity, stripUuids, truncateAtBoundary, } from "./application/opportunity.presentation.js";
31
- export { DEFAULT_FALLBACK_HEADLINE, safeFallbackSummary, } from "./application/opportunity.presentation.js";
32
- export { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS, selectByComposition, validateOpportunityActors, } from "./domain/opportunity.utils.js";
27
+ export { buildCandidateEvidence, } from "./opportunity.evidence.js";
28
+ export { getPrimaryActionLabel, } from "./opportunity.labels.js";
29
+ export { buildApiChatCardPresentationCacheKey, buildDeliveryCardPresentationCacheKey, buildRadarCardPresentationCacheKey, } from "./opportunity.presentation.js";
30
+ export { presentOpportunity, stripUuids, truncateAtBoundary, } from "./opportunity.presentation.js";
31
+ export { DEFAULT_FALLBACK_HEADLINE, safeFallbackSummary, } from "./opportunity.presentation.js";
32
+ export { canUserSeeOpportunity, classifyOpportunity, isActionableForViewer, RADAR_SOFT_TARGETS, selectByComposition, validateOpportunityActors, } from "./opportunity.utils.js";
33
33
  export { NEGOTIATION_EVIDENCE_MAX_OPPORTUNITIES, negotiationEvidenceQuestionsMode, } from "./negotiation-evidence/negotiation-evidence.env.js";
34
34
  export { NegotiationEvidenceMiner, } from "./negotiation-evidence/negotiation-evidence.miner.js";
35
35
  export { runNegotiationEvidenceShadow, } from "./negotiation-evidence/negotiation-evidence.shadow.js";
@@ -1,4 +1,4 @@
1
- import type { CreateOpportunityData } from '../../shared/interfaces/database.interface.js';
1
+ import type { CreateOpportunityData } from '../shared/interfaces/database.interface.js';
2
2
  /** Input for the host-side newborn pool-preference stamper (IND-420 P4b). */
3
3
  export interface StampNewbornOpportunitiesInput {
4
4
  ownerUserId: string;
@@ -1,4 +1,4 @@
1
- import type { ResolvedToolContext } from "../../shared/agent/tool.helpers.js";
1
+ import type { ResolvedToolContext } from "../shared/agent/tool.helpers.js";
2
2
  import type { OpportunityOwnerInteractionProvenance } from "./opportunity.owner-approval.js";
3
3
  /** Bind authoritative host provenance to one resolved tool context. */
4
4
  export declare function bindOwnerApprovalProvenance(context: ResolvedToolContext, provenance: OpportunityOwnerInteractionProvenance): void;
@@ -1,4 +1,4 @@
1
- import type { PendingQuestionSummary } from "../../shared/schemas/pending-question.schema.js";
1
+ import type { PendingQuestionSummary } from "../shared/schemas/pending-question.schema.js";
2
2
  /** Maximum pending questions attached to a single tool result. */
3
3
  export declare const MAX_PENDING_QUESTIONS = 3;
4
4
  export interface MergePendingQuestionsInput {
@@ -2,7 +2,7 @@
2
2
  * Helper for merging pending questions from the DB into tool results.
3
3
  * Extracted so it can be unit-tested independently of the tool handler.
4
4
  */
5
- import { protocolLogger } from "../../shared/observability/protocol.logger.js";
5
+ import { protocolLogger } from "../shared/observability/protocol.logger.js";
6
6
  const logger = protocolLogger("PendingQuestions");
7
7
  /** Maximum pending questions attached to a single tool result. */
8
8
  export const MAX_PENDING_QUESTIONS = 3;
@@ -2,9 +2,9 @@
2
2
  * Shared persist phase for opportunity creation: enrichOrCreate → create (or create+expire) → optional chat injection.
3
3
  * Used by the opportunity graph persist node and by the manual opportunity service for consistency.
4
4
  */
5
- import type { CreateOpportunityData, IntentScopedOpportunityPersistenceResult, Opportunity, OpportunityDedupConflict, OpportunityNetworkEligibility, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
6
- import type { Embedder } from '../../shared/interfaces/embedder.interface.js';
7
- import type { EnricherDatabase } from './opportunity.enricher.js';
5
+ import type { CreateOpportunityData, IntentScopedOpportunityPersistenceResult, Opportunity, OpportunityDedupConflict, OpportunityNetworkEligibility, OpportunityStatus } from '../shared/interfaces/database.interface.js';
6
+ import type { Embedder } from '../shared/interfaces/embedder.interface.js';
7
+ import type { EnricherDatabase } from "./opportunity.enricher.js";
8
8
  export type PersistOpportunityDatabase = EnricherDatabase & {
9
9
  createOpportunity(data: CreateOpportunityData): Promise<Opportunity>;
10
10
  createOpportunityIfNetworkEligible?(data: CreateOpportunityData, eligibility: OpportunityNetworkEligibility): Promise<Opportunity | null>;
@@ -2,9 +2,9 @@
2
2
  * Shared persist phase for opportunity creation: enrichOrCreate → create (or create+expire) → optional chat injection.
3
3
  * Used by the opportunity graph persist node and by the manual opportunity service for consistency.
4
4
  */
5
- import { enrichOrCreate } from './opportunity.enricher.js';
6
- import { normalizeCreateOpportunityActorIntents } from '../domain/opportunity.actor.js';
7
- import { protocolLogger } from '../../shared/observability/protocol.logger.js';
5
+ import { enrichOrCreate } from "./opportunity.enricher.js";
6
+ import { normalizeCreateOpportunityActorIntents } from './opportunity.actor.js';
7
+ import { protocolLogger } from '../shared/observability/protocol.logger.js';
8
8
  const logger = protocolLogger('OpportunityPersist');
9
9
  /** Bind owned-intent discovery actors to the already-authorized trigger intent. */
10
10
  function bindOwnedIntentActors(data, ownerUserId, triggerIntentId) {
@@ -1,4 +1,4 @@
1
- import type { Id, Opportunity, OpportunityActor, OpportunityGraphDatabase, OpportunityNetworkEligibility } from '../../shared/interfaces/database.interface.js';
1
+ import type { Id, Opportunity, OpportunityActor, OpportunityGraphDatabase, OpportunityNetworkEligibility } from '../shared/interfaces/database.interface.js';
2
2
  /** Narrow final-boundary port for opportunity persistence admission and guarded reactivation. */
3
3
  export type OpportunityPersistenceAdmissionPort = Pick<OpportunityGraphDatabase, 'getActiveNetworkMembershipPairs' | 'getNetworkIdsForIntent' | 'getNetworkMemberships' | 'updateOpportunityStatusIfNetworkEligible'>;
4
4
  type EvaluatedPersistenceCandidate = {
@@ -14,8 +14,8 @@
14
14
  * 4. OpportunityPresenter (LLM card and chat copy)
15
15
  */
16
16
  import { z } from "zod";
17
- import type { Opportunity } from "../../shared/interfaces/database.interface.js";
18
- import type { ChatGraphCompositeDatabase } from "../../shared/interfaces/database.interface.js";
17
+ import type { Opportunity } from "../shared/interfaces/database.interface.js";
18
+ import type { ChatGraphCompositeDatabase } from "../shared/interfaces/database.interface.js";
19
19
  import type { NegotiationContext } from "./negotiation-context.loader.js";
20
20
  /**
21
21
  * Pure presentation layer for opportunities.
@@ -115,7 +115,7 @@ export declare function buildApiChatCardPresentationCacheKey(opportunityId: stri
115
115
  * Surfaces choose *policy* (send a sanitized fallback vs skip entirely) via
116
116
  * `allowFallback`; they no longer choose (or forget) sanitization steps.
117
117
  *
118
- * See `packages/protocol/src/opportunity/AGENTS.md` for the review checklist this
118
+ * See `packages/protocol/s./opportunity/AGENTS.md` for the review checklist this
119
119
  * module exists to satisfy.
120
120
  */
121
121
  /** Default max length for fallback summaries (matches presenter internal fallback). */
@@ -22,13 +22,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
22
22
  var __metadata = (this && this.__metadata) || function (k, v) {
23
23
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
24
24
  };
25
- import { MINIMAL_MAIN_TEXT_MAX_CHARS } from "../domain/opportunity.labels.js";
26
- import { stripUnsupportedOpportunityClaims } from "../../shared/utils/claim-safety.js";
25
+ import { MINIMAL_MAIN_TEXT_MAX_CHARS } from "./opportunity.labels.js";
26
+ import { stripUnsupportedOpportunityClaims } from "../shared/utils/claim-safety.js";
27
27
  import { HumanMessage, SystemMessage } from "@langchain/core/messages";
28
28
  import { z } from "zod";
29
- import { Timed } from "../../shared/observability/performance.js";
30
- import { protocolLogger } from "../../shared/observability/protocol.logger.js";
31
- import { createStructuredModel } from "../../shared/agent/model.config.js";
29
+ import { Timed } from "../shared/observability/performance.js";
30
+ import { protocolLogger } from "../shared/observability/protocol.logger.js";
31
+ import { createStructuredModel } from "../shared/agent/model.config.js";
32
32
  /**
33
33
  * Generate presentation copy for an opportunity based on viewer context.
34
34
  * Pure function — no side effects, no database access.
@@ -574,7 +574,7 @@ export function buildApiChatCardPresentationCacheKey(opportunityId, viewerId) {
574
574
  * Surfaces choose *policy* (send a sanitized fallback vs skip entirely) via
575
575
  * `allowFallback`; they no longer choose (or forget) sanitization steps.
576
576
  *
577
- * See `packages/protocol/src/opportunity/AGENTS.md` for the review checklist this
577
+ * See `packages/protocol/s./opportunity/AGENTS.md` for the review checklist this
578
578
  * module exists to satisfy.
579
579
  */
580
580
  /** Default max length for fallback summaries (matches presenter internal fallback). */
@@ -1,9 +1,9 @@
1
- import type { Id, NegotiationContinuationExecution, NegotiationContinuationReceipt, OpportunityStatus, Opportunity } from '../../shared/interfaces/database.interface.js';
2
- import type { Lens } from '../../shared/interfaces/embedder.interface.js';
3
- import type { EvaluatorEntity } from '../application/opportunity.evaluator.js';
4
- import type { DebugMetaAgent } from '../../agents/index.js';
5
- import type { OpportunityEvidence } from '../../shared/schemas/network-assignment.schema.js';
6
- import type { DiscoverySummary } from "../../shared/schemas/discovery-question.schema.js";
1
+ import type { Id, NegotiationContinuationExecution, NegotiationContinuationReceipt, OpportunityStatus, Opportunity } from '../shared/interfaces/database.interface.js';
2
+ import type { Lens } from '../shared/interfaces/embedder.interface.js';
3
+ import type { EvaluatorEntity } from './opportunity.evaluator.js';
4
+ import type { DebugMetaAgent } from '../agents/agent.module.js';
5
+ import type { OpportunityEvidence } from '../shared/schemas/network-assignment.schema.js';
6
+ import type { DiscoverySummary } from "../shared/schemas/discovery-question.schema.js";
7
7
  /**
8
8
  * Opportunity Graph State (Linear Multi-Step Workflow)
9
9
  *
@@ -5,11 +5,11 @@
5
5
  * for: the deep links, the minimal fallback card, and the small guards that
6
6
  * shape tool error payloads.
7
7
  */
8
- import { type OpportunityOwnerAction, type OpportunityOwnerApprovalVerdict } from './opportunity.owner-approval.js';
8
+ import { type OpportunityOwnerAction, type OpportunityOwnerApprovalVerdict } from "./opportunity.owner-approval.js";
9
9
  export declare function stripLeadingNarratorName(remark: string, narratorName: string): string;
10
- import type { Opportunity } from "../../shared/interfaces/database.interface.js";
11
- import type { PendingQuestionSummary } from "../../shared/schemas/pending-question.schema.js";
12
- export declare const logger: import("../../shared/observability/log.js").LoggerWithSource;
10
+ import type { Opportunity } from "../shared/interfaces/database.interface.js";
11
+ import type { PendingQuestionSummary } from "../shared/schemas/pending-question.schema.js";
12
+ export declare const logger: import("../shared/observability/log.js").LoggerWithSource;
13
13
  /**
14
14
  * Build the agent-facing profile link for a counterpart — always the Index web
15
15
  * profile URL with `?link_preview=false`. Returns `undefined` only if
@@ -5,7 +5,7 @@
5
5
  * for: the deep links, the minimal fallback card, and the small guards that
6
6
  * shape tool error payloads.
7
7
  */
8
- import { MINIMAL_MAIN_TEXT_MAX_CHARS, getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from "../domain/opportunity.labels.js";
8
+ import { MINIMAL_MAIN_TEXT_MAX_CHARS, getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from "./opportunity.labels.js";
9
9
  import { narratorRemarkFromReasoning, safeFallbackSummary } from "./opportunity.presentation.js";
10
10
  export function stripLeadingNarratorName(remark, narratorName) {
11
11
  let t = remark.trim();
@@ -31,7 +31,7 @@ export function stripLeadingNarratorName(remark, narratorName) {
31
31
  }
32
32
  return t;
33
33
  }
34
- import { protocolLogger } from "../../shared/observability/protocol.logger.js";
34
+ import { protocolLogger } from "../shared/observability/protocol.logger.js";
35
35
  export const logger = protocolLogger("ChatTools:Opportunity");
36
36
  /**
37
37
  * Build the agent-facing profile link for a counterpart — always the Index web
@@ -5,8 +5,8 @@
5
5
  * and link helpers in `opportunity.tools.cards.ts`; this file wires the three
6
6
  * tools together and owns the two mutation tools.
7
7
  */
8
- import type { DefineTool } from "../../shared/agent/tool.helpers.js";
9
- import type { OpportunityToolDeps } from "../ports/index.js";
8
+ import type { DefineTool } from "../shared/agent/tool.helpers.js";
9
+ import type { OpportunityToolDeps } from "./opportunity.tools.port.js";
10
10
  export { buildOpportunityPresentation } from "./opportunity.presentation.js";
11
11
  export { attachOpportunityAppLink, attachProfileLink, buildMinimalOpportunityCard, buildNegotiationUrl, buildOpportunityAppUrl, buildProfileUrl } from "./opportunity.tools.cards.js";
12
12
  export declare function createOpportunityTools(defineTool: DefineTool, deps: OpportunityToolDeps): readonly [any, any, any];
@@ -6,14 +6,14 @@
6
6
  * tools together and owns the two mutation tools.
7
7
  */
8
8
  import { z } from "zod";
9
- import { requestContext } from "../../shared/observability/request-context.js";
10
- import { success, error, UUID_REGEX } from "../../shared/agent/tool.helpers.js";
11
- import { focusedIntentId, focusedNetworkId } from "../../shared/agent/tool.scope.js";
9
+ import { requestContext } from "../shared/observability/request-context.js";
10
+ import { success, error, UUID_REGEX } from "../shared/agent/tool.helpers.js";
11
+ import { focusedIntentId, focusedNetworkId } from "../shared/agent/tool.scope.js";
12
12
  import { OpportunityPresenter, gatherPresenterContext } from "./opportunity.presentation.js";
13
- import { isUptakeGuardEnabled } from "../../questions/index.js";
14
- import { admitOpportunityUpdate } from './opportunity.update-admission.js';
15
- import { opportunityOwnerActionForStatus } from './opportunity.owner-approval.js';
16
- import { ownerApprovalProvenanceFor } from './opportunity.owner-provenance.js';
13
+ import { isUptakeGuardEnabled } from "../questions/question.module.js";
14
+ import { admitOpportunityUpdate } from "./opportunity.update-admission.js";
15
+ import { opportunityOwnerActionForStatus } from "./opportunity.owner-approval.js";
16
+ import { ownerApprovalProvenanceFor } from "./opportunity.owner-provenance.js";
17
17
  export { buildOpportunityPresentation } from "./opportunity.presentation.js";
18
18
  import { sendOpportunity, updateOpportunityStatus } from "./opportunity.graph.modes.js";
19
19
  import { createListOpportunitiesTool } from "./opportunity.tools.list.js";
@@ -4,7 +4,7 @@
4
4
  * Split out of `opportunity.tools.ts`: the listing is by far the largest of the
5
5
  * three opportunity tools, and it is the only one that renders cards.
6
6
  */
7
- import type { DefineTool } from "../../shared/agent/tool.helpers.js";
8
- import type { OpportunityToolDeps } from "../ports/index.js";
7
+ import type { DefineTool } from "../shared/agent/tool.helpers.js";
8
+ import type { OpportunityToolDeps } from "./opportunity.tools.port.js";
9
9
  /** Builds the `list_opportunities` tool against the host's capabilities. */
10
10
  export declare function createListOpportunitiesTool(defineTool: DefineTool, deps: OpportunityToolDeps): any;
@@ -5,13 +5,13 @@
5
5
  * three opportunity tools, and it is the only one that renders cards.
6
6
  */
7
7
  import { z } from "zod";
8
- import { success, error, UUID_REGEX } from "../../shared/agent/tool.helpers.js";
9
- import { focusedIntentId, focusedNetworkId, focusedNetworkLabel } from "../../shared/agent/tool.scope.js";
10
- import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from "../domain/opportunity.labels.js";
8
+ import { success, error, UUID_REGEX } from "../shared/agent/tool.helpers.js";
9
+ import { focusedIntentId, focusedNetworkId, focusedNetworkLabel } from "../shared/agent/tool.scope.js";
10
+ import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from "./opportunity.labels.js";
11
11
  import { OpportunityPresenter, gatherPresenterContext, stripUuids } from "./opportunity.presentation.js";
12
12
  import { buildOpportunityPresentation } from "./opportunity.presentation.js";
13
13
  import { loadNegotiationContext } from "./negotiation-context.loader.js";
14
- import { selectOpportunityFeed } from './opportunity.feed-selection.js';
14
+ import { selectOpportunityFeed } from "./opportunity.feed-selection.js";
15
15
  import { CHAT_DISPLAY_LIMIT, attachOpportunityAppLink, attachProfileLink, buildNegotiationUrl } from "./opportunity.tools.cards.js";
16
16
  import { logger, stripLeadingNarratorName } from "./opportunity.tools.cards.js";
17
17
  /** Builds the `list_opportunities` tool against the host's capabilities. */
@@ -1,5 +1,5 @@
1
- import type { ToolRegistryCompositionDeps } from "../../shared/agent/tool.helpers.js";
2
- import type { OpportunityOwnerApprovalAuthority } from "../application/opportunity.owner-approval.js";
1
+ import type { ToolRegistryCompositionDeps } from "../shared/agent/tool.helpers.js";
2
+ import type { OpportunityOwnerApprovalAuthority } from "./opportunity.owner-approval.js";
3
3
  /**
4
4
  * IND-593 host authority consumed only by the opportunity mutation boundary.
5
5
  *
@@ -1,4 +1,4 @@
1
- import type { Opportunity, OpportunityGraphDatabase } from '../../shared/interfaces/database.interface.js';
1
+ import type { Opportunity, OpportunityGraphDatabase } from '../shared/interfaces/database.interface.js';
2
2
  /** Narrow persistence read port for authorizing a user-driven opportunity update. */
3
3
  export type OpportunityUpdateAdmissionPort = Pick<OpportunityGraphDatabase, 'getOpportunity'>;
4
4
  export interface OpportunityUpdateAdmissionInput {
@@ -5,7 +5,7 @@
5
5
  * With lens-based HyDE, strategy selection is handled automatically by the
6
6
  * LensInferrer agent. This file provides corpus-to-role mapping for opportunity actors.
7
7
  */
8
- import type { HydeTargetCorpus } from '../../discovery/index.js';
8
+ import type { HydeTargetCorpus } from '../discovery/index.js';
9
9
  /** Actor roles in the opportunity model (agent / patient / peer). */
10
10
  export type OpportunityActorRole = 'agent' | 'patient' | 'peer';
11
11
  /** Result of mapping a corpus to source and candidate roles. */
@@ -63,7 +63,7 @@ export declare function validateOpportunityActors(actors: Array<{
63
63
  * isolation. This is by design — the agent is not granted read access through the
64
64
  * home path until the introducer path completes (negotiation → accepted).
65
65
  *
66
- * Compact Visibility Rule (see `docs/design/opportunity-status-lifecycle.md`, §3.E):
66
+ * Compact Visibility Rule (see `docs/desi./opportunity-status-lifecycle.md`, §3.E):
67
67
  * - Introducer or peer: always see.
68
68
  * - Patient or party: see if (status is not latent, or there is no introducer).
69
69
  * - Agent: see if (status is accepted/rejected/expired, or (status is not latent and there is no introducer)).
@@ -76,7 +76,7 @@ export declare function canUserSeeOpportunity(actors: Array<{
76
76
  * Whether an opportunity should appear on the viewer's radar (actionable =
77
77
  * has a pending action for this user).
78
78
  *
79
- * Rules (see `docs/design/opportunity-status-lifecycle.md`, §3.E):
79
+ * Rules (see `docs/desi./opportunity-status-lifecycle.md`, §3.E):
80
80
  *
81
81
  * (1) `latent`, no introducer → all actors actionable
82
82
  * (2) `latent`, introducer `approved !== true` → introducer only
@@ -5,7 +5,7 @@
5
5
  * With lens-based HyDE, strategy selection is handled automatically by the
6
6
  * LensInferrer agent. This file provides corpus-to-role mapping for opportunity actors.
7
7
  */
8
- import { log } from '../../shared/observability/log.js';
8
+ import { log } from '../shared/observability/log.js';
9
9
  const logger = log.graph.from('SelectByComposition');
10
10
  const dedupeByPersonLog = log.graph.from('DeduplicateByPerson');
11
11
  const digestCandidatesLog = log.graph.from('SelectDigestCandidates');
@@ -92,7 +92,7 @@ export function validateOpportunityActors(actors) {
92
92
  * isolation. This is by design — the agent is not granted read access through the
93
93
  * home path until the introducer path completes (negotiation → accepted).
94
94
  *
95
- * Compact Visibility Rule (see `docs/design/opportunity-status-lifecycle.md`, §3.E):
95
+ * Compact Visibility Rule (see `docs/desi./opportunity-status-lifecycle.md`, §3.E):
96
96
  * - Introducer or peer: always see.
97
97
  * - Patient or party: see if (status is not latent, or there is no introducer).
98
98
  * - Agent: see if (status is accepted/rejected/expired, or (status is not latent and there is no introducer)).
@@ -119,7 +119,7 @@ export function canUserSeeOpportunity(actors, status, userId) {
119
119
  * Whether an opportunity should appear on the viewer's radar (actionable =
120
120
  * has a pending action for this user).
121
121
  *
122
- * Rules (see `docs/design/opportunity-status-lifecycle.md`, §3.E):
122
+ * Rules (see `docs/desi./opportunity-status-lifecycle.md`, §3.E):
123
123
  *
124
124
  * (1) `latent`, no introducer → all actors actionable
125
125
  * (2) `latent`, introducer `approved !== true` → introducer only
@@ -13,8 +13,8 @@
13
13
  import type { RadarGraphDatabase, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
14
14
  import type { OpportunityCache } from '../../shared/interfaces/cache.interface.js';
15
15
  import { RadarGraphState, type RadarCardItem, type RadarResponseItem } from './radar.state.js';
16
- import { OpportunityPresenter } from '../application/opportunity.presentation.js';
17
- import type { DebugMetaAgent } from '../../agents/index.js';
16
+ import { OpportunityPresenter } from '../opportunity.presentation.js';
17
+ import type { DebugMetaAgent } from '../../agents/agent.module.js';
18
18
  /** Database must satisfy both RadarGraphDatabase and presenter context (getProfile, getActiveIntents, getNetwork, getUser). */
19
19
  type RadarGraphDb = RadarGraphDatabase;
20
20
  export type RadarGraphInvokeInput = {
@@ -12,12 +12,12 @@
12
12
  */
13
13
  import { StateGraph, START, END } from '@langchain/langgraph';
14
14
  import { RadarGraphState } from './radar.state.js';
15
- import { OpportunityPresenter, gatherPresenterContext } from '../application/opportunity.presentation.js';
16
- import { loadNegotiationContext } from '../application/negotiation-context.loader.js';
17
- import { canUserSeeOpportunity, isActionableForViewer, selectByComposition } from '../domain/opportunity.utils.js';
18
- import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from '../domain/opportunity.labels.js';
19
- import { safeFallbackSummary } from '../application/opportunity.presentation.js';
20
- import { buildRadarCardPresentationCacheKey } from '../application/opportunity.presentation.js';
15
+ import { OpportunityPresenter, gatherPresenterContext } from '../opportunity.presentation.js';
16
+ import { loadNegotiationContext } from '../negotiation-context.loader.js';
17
+ import { canUserSeeOpportunity, isActionableForViewer, selectByComposition } from '../opportunity.utils.js';
18
+ import { getPrimaryActionLabel, SECONDARY_ACTION_LABEL } from '../opportunity.labels.js';
19
+ import { safeFallbackSummary } from '../opportunity.presentation.js';
20
+ import { buildRadarCardPresentationCacheKey } from '../opportunity.presentation.js';
21
21
  import { protocolLogger } from '../../shared/observability/protocol.logger.js';
22
22
  import { timed } from '../../shared/observability/performance.js';
23
23
  import { requestContext } from "../../shared/observability/request-context.js";
@@ -1,4 +1,4 @@
1
- import { RADAR_SOFT_TARGETS } from '../domain/opportunity.utils.js';
1
+ import { RADAR_SOFT_TARGETS } from '../opportunity.utils.js';
2
2
  const WEIGHT_COMPOSITION = 0.4;
3
3
  const WEIGHT_FRESHNESS = 0.3;
4
4
  const WEIGHT_EXPIRATION = 0.3;
@@ -1,5 +1,5 @@
1
1
  import type { Opportunity, OpportunityStatus } from '../../shared/interfaces/database.interface.js';
2
- import type { DebugMetaAgent } from '../../agents/index.js';
2
+ import type { DebugMetaAgent } from '../../agents/agent.module.js';
3
3
  /**
4
4
  * Radar card item: one opportunity with full presenter-driven display contract.
5
5
  */
@@ -3,7 +3,7 @@ import type { PremiseAnalyzerOutput } from "./premise.analyzer.js";
3
3
  import { PremiseIndexer } from "./premise.indexer.js";
4
4
  import type { PremiseGraphDatabase, PremiseAnalysis } from "../shared/interfaces/database.interface.js";
5
5
  import type { Embedder } from "../shared/interfaces/embedder.interface.js";
6
- import type { DebugMetaAgent } from "../agents/index.js";
6
+ import type { DebugMetaAgent } from "../agents/agent.module.js";
7
7
  /**
8
8
  * Graph factory for premise lifecycle: create, update, and query modes.
9
9
  */
@@ -1,5 +1,5 @@
1
1
  import type { PremiseAnalysis, PremiseRecord } from "../shared/interfaces/database.interface.js";
2
- import type { DebugMetaAgent } from '../agents/index.js';
2
+ import type { DebugMetaAgent } from '../agents/agent.module.js';
3
3
  import type { ToolScopeType } from '../shared/agent/tool.scope.js';
4
4
  export declare const PremiseGraphState: import("@langchain/langgraph").AnnotationRoot<{
5
5
  userId: {
@@ -1,3 +1,3 @@
1
1
  import type { DefineTool } from "../shared/agent/tool.helpers.js";
2
- import type { PremiseToolDeps } from "../contexts/ports/participant-context.tools.port.js";
2
+ import type { PremiseToolDeps } from "../contexts/context.tools.port.js";
3
3
  export declare function createPremiseTools(defineTool: DefineTool, deps: PremiseToolDeps): any[];
@@ -16,7 +16,7 @@
16
16
  */
17
17
  import type { ToolScopeType } from "../shared/agent/tool.scope.js";
18
18
  import type { NegotiationQuestionCandidate, QuestionMode, QuestionPoolDiscriminator } from "./question.schema.js";
19
- import type { NegotiationConsultationReason } from "../negotiations/index.js";
19
+ import type { NegotiationConsultationReason } from "../negotiations/negotiation.module.js";
20
20
  /** Intent context — data needed to generate questions about an intent. */
21
21
  export interface IntentContext {
22
22
  intentId: string;
@@ -1,4 +1,4 @@
1
- import { NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY } from "../negotiations/index.js";
1
+ import { NEGOTIATION_QUESTION_GENERIC_COUNTERPARTY, NEGOTIATION_QUESTION_GENERIC_NETWORK, NEGOTIATION_QUESTION_GENERIC_UPTAKE_ACTIVITY } from "../negotiations/negotiation.module.js";
2
2
  /** Runtime mirror of the mode/purpose/context discriminant used at queue boundaries. */
3
3
  export function isValidQuestionerInputContract(input) {
4
4
  if (input.purpose === 'recovery') {
@@ -1,4 +1,4 @@
1
- import { consultationPromptFor } from "../negotiations/index.js";
1
+ import { consultationPromptFor } from "../negotiations/negotiation.module.js";
2
2
  /**
3
3
  * Questions Under Discussion taxonomy, appended to every preset's system prompt.
4
4
  * Every mode carries it because the structured output schema requires the
@@ -1,5 +1,5 @@
1
1
  import { type ToolContext, type ResolvedToolContext } from "./tool.helpers.js";
2
- import type { OpportunityOwnerApprovalDeps } from "../../opportunities/ports/opportunity.tools.port.js";
2
+ import type { OpportunityOwnerApprovalDeps } from "../../opportunities/opportunity.tools.port.js";
3
3
  export type { ToolContext, ResolvedToolContext, ProtocolDeps } from "./tool.helpers.js";
4
4
  export type { ToolDeps } from "./tool.helpers.js";
5
5
  /**
@@ -1,29 +1,29 @@
1
1
  import { tool } from "@langchain/core/tools";
2
2
  import { Intents } from "../../intents/intent.module.js";
3
3
  import { EnrichmentGraphFactory } from "../../enrichment/enrichment.graph.js";
4
- import { OpportunityGraphFactory } from "../../opportunities/index.js";
4
+ import { OpportunityGraphFactory } from "../../opportunities/opportunity.module.js";
5
5
  import { HydeGraphFactory } from "../../discovery/hyde.graph.js";
6
6
  import { HydeGenerator } from "../../discovery/hyde.generator.js";
7
7
  import { LensInferrer } from "../../discovery/lens.inferrer.js";
8
8
  import { Networks } from "../../networks/network.module.js";
9
- import { NegotiationGraphFactory } from "../../negotiations/index.js";
9
+ import { NegotiationGraphFactory } from "../../negotiations/negotiation.module.js";
10
10
  import { PremiseGraphFactory } from "../../premises/premise.graph.js";
11
11
  import { protocolLogger } from "../observability/protocol.logger.js";
12
12
  import { resolveChatContext, error, redactSensitiveFields } from "./tool.helpers.js";
13
13
  import { deriveAllowedNetworkIds, focusedIntentId, scopeFromNetworkId } from "./tool.scope.js";
14
14
  import { invokeToolRuntime, toolRuntimeErrorToResult } from "./tool.runtime.js";
15
15
  import { createEnrichmentTools } from "../../enrichment/enrichment.tools.js";
16
- import { createOpportunityTools } from "../../opportunities/index.js";
16
+ import { createOpportunityTools } from "../../opportunities/opportunity.module.js";
17
17
  import { createUtilityTools } from "./utility.tools.js";
18
- import { createContactTools } from "../../contacts/index.js";
18
+ import { createContactTools } from "../../contacts/contact.module.js";
19
19
  // The composition root reaches the leaf directly (it is exempt from the barrel
20
- // rule by design): importing agents/index.js here would pull in the
20
+ // rule by design): importing agents/agent.module.js here would pull in the
21
21
  // chat personas, which import this module back -- a runtime cycle.
22
- import { createAgentTools } from "../../agents/application/agent.tools.js";
23
- import { createNegotiationTools } from "../../negotiations/index.js";
22
+ import { createAgentTools } from "../../agents/agent.tools.js";
23
+ import { createNegotiationTools } from "../../negotiations/negotiation.module.js";
24
24
  import { createPremiseTools } from "../../premises/premise.tools.js";
25
- import { createQuestionerTools, createAskUserQuestionTools } from "../../questions/index.js";
26
- import { bindOwnerApprovalProvenance } from "../../opportunities/application/opportunity.owner-provenance.js";
25
+ import { createQuestionerTools, createAskUserQuestionTools } from "../../questions/question.module.js";
26
+ import { bindOwnerApprovalProvenance } from "../../opportunities/opportunity.owner-provenance.js";
27
27
  const logger = protocolLogger("ChatTools");
28
28
  // ═══════════════════════════════════════════════════════════════════════════════
29
29
  // TOOL FACTORY