@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
@@ -1,6 +1,6 @@
1
1
  import type { Id } from '../interfaces/database.interface.js';
2
- import type { OpportunityGraphDeps } from '../../opportunities/application/opportunity.graph.shared.js';
3
- import type { OpportunityMutationOutcome } from '../../opportunities/application/opportunity.graph.modes.js';
2
+ import type { OpportunityGraphDeps } from '../../opportunities/opportunity.graph.shared.js';
3
+ import type { OpportunityMutationOutcome } from '../../opportunities/opportunity.graph.modes.js';
4
4
  import { z } from "zod";
5
5
  import type { ModelConfig } from "./model.config.js";
6
6
  import type { ToolScopeType } from "./tool.scope.js";
@@ -8,7 +8,7 @@ import type { UserIdentity } from "../schemas/identity.schema.js";
8
8
  import type { ChatGraphCompositeDatabase, CreateOpportunityData, NetworkMembership, UserRecord, UserDatabase, SystemDatabase, NegotiationGraphDatabase } from "../interfaces/database.interface.js";
9
9
  import type { Scraper } from "../interfaces/scraper.interface.js";
10
10
  import type { Cache, HydeCache } from "../interfaces/cache.interface.js";
11
- import type { ContactServiceAdapter } from "../../contacts/ports/index.js";
11
+ import type { ContactServiceAdapter } from "../../contacts/contact.repository.port.js";
12
12
  import type { ProfileEnricher } from "../interfaces/enrichment.interface.js";
13
13
  import type { IntentGraphQueue } from "../interfaces/queue.interface.js";
14
14
  import type { ChatSessionReader } from "../interfaces/chat-session.interface.js";
@@ -16,7 +16,7 @@ import type { ChatSummaryReader } from "../interfaces/chat-summary.interface.js"
16
16
  import type { ChatMessageWriter } from "../interfaces/chat-message-writer.interface.js";
17
17
  import type { NegotiationSummaryReader } from "../interfaces/negotiation-summary.interface.js";
18
18
  import type { Embedder } from "../interfaces/embedder.interface.js";
19
- import type { AgentDatabase } from "../../agents/ports/index.js";
19
+ import type { AgentDatabase } from "../../agents/agent.repository.port.js";
20
20
  import type { NegotiationTimeoutQueue } from "../interfaces/negotiation-events.interface.js";
21
21
  import type { AgentDispatcher } from "../interfaces/agent-dispatcher.interface.js";
22
22
  import type { DeliveryLedger } from "../interfaces/delivery-ledger.interface.js";
@@ -1,6 +1,6 @@
1
1
  import type { ToolDeps, ToolRegistry } from './tool.helpers.js';
2
2
  import type { ToolSurface } from './utility.tools.js';
3
- import type { OpportunityOwnerApprovalDeps } from '../../opportunities/ports/opportunity.tools.port.js';
3
+ import type { OpportunityOwnerApprovalDeps } from '../../opportunities/opportunity.tools.port.js';
4
4
  export interface CreateToolRegistryOptions {
5
5
  /**
6
6
  * Tool-surface profile. The default `'rest'` profile (direct HTTP Tool API)
@@ -2,14 +2,14 @@ import { error, redactSensitiveFields } from './tool.helpers.js';
2
2
  import { createEnrichmentTools } from '../../enrichment/enrichment.tools.js';
3
3
  import { Intents } from '../../intents/intent.module.js';
4
4
  import { Networks } from '../../networks/network.module.js';
5
- import { createOpportunityTools } from '../../opportunities/index.js';
5
+ import { createOpportunityTools } from '../../opportunities/opportunity.module.js';
6
6
  import { createUtilityTools } from './utility.tools.js';
7
- import { createContactTools } from '../../contacts/index.js';
8
- import { createAgentTools } from '../../agents/index.js';
9
- import { createNegotiationTools } from '../../negotiations/index.js';
7
+ import { createContactTools } from '../../contacts/contact.module.js';
8
+ import { createAgentTools } from '../../agents/agent.module.js';
9
+ import { createNegotiationTools } from '../../negotiations/negotiation.module.js';
10
10
  import { createChatTools } from '../../chat/chat.tools.js';
11
11
  import { createPremiseTools } from '../../premises/premise.tools.js';
12
- import { createQuestionerTools } from '../../questions/index.js';
12
+ import { createQuestionerTools } from '../../questions/question.module.js';
13
13
  import { protocolLogger } from '../observability/protocol.logger.js';
14
14
  import { requestContext } from '../observability/request-context.js';
15
15
  const logger = protocolLogger('ToolRegistry');
@@ -10,7 +10,7 @@
10
10
  * module cycle through the negotiation capability facade.
11
11
  */
12
12
  import type { NegotiationTurn, UserNegotiationContext, SeedAssessment } from '../schemas/negotiation-state.schema.js';
13
- import type { NegotiatorMemoryEntry } from '../../negotiations/domain/negotiation.memory.js';
13
+ import type { NegotiatorMemoryEntry } from '../../negotiations/negotiation.memory.js';
14
14
  import type { AttributedPriorDialogue } from '../../negotiations/negotiation.attribution.js';
15
15
  import type { NegotiationPrivateConsultation } from './database.interface.js';
16
16
  import type { NegotiationContinuationTimeoutIdentity } from './negotiation-events.interface.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "21.0.0-rc.486.1",
3
+ "version": "21.0.0-rc.488.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -1,23 +0,0 @@
1
- /**
2
- * agents/application — registration, permission, and dispatch tools.
3
- *
4
- * Re-exports the application-tier entry points of the participant-agents
5
- * capability: the agent registration and permission management tool factory.
6
- *
7
- * ## Foreground adapters (participant-directed, authenticated)
8
- *
9
- * - {@link createAgentTools} — `read_own_agent`, `register_agent`,
10
- * `list_agents`, `update_agent`, `delete_agent`, `grant_agent_permission`,
11
- * `revoke_agent_permission` MCP tools for the authenticated registration
12
- * and permission management path (IND-599: `read_own_agent` is the
13
- * agent-principal self-read; the rest are human owner/admin actions).
14
- *
15
- * ## Boundary
16
- *
17
- * Imports from agents/domain, agents/ports, and
18
- * shared/ infrastructure — never from runtime/, host implementations, or
19
- * other capability internals.
20
- *
21
- * IND-548: canonical application layer for the participant-agents capability.
22
- */
23
- export { createAgentTools } from "./agent.tools.js";
@@ -1,24 +0,0 @@
1
- /**
2
- * agents/application — registration, permission, and dispatch tools.
3
- *
4
- * Re-exports the application-tier entry points of the participant-agents
5
- * capability: the agent registration and permission management tool factory.
6
- *
7
- * ## Foreground adapters (participant-directed, authenticated)
8
- *
9
- * - {@link createAgentTools} — `read_own_agent`, `register_agent`,
10
- * `list_agents`, `update_agent`, `delete_agent`, `grant_agent_permission`,
11
- * `revoke_agent_permission` MCP tools for the authenticated registration
12
- * and permission management path (IND-599: `read_own_agent` is the
13
- * agent-principal self-read; the rest are human owner/admin actions).
14
- *
15
- * ## Boundary
16
- *
17
- * Imports from agents/domain, agents/ports, and
18
- * shared/ infrastructure — never from runtime/, host implementations, or
19
- * other capability internals.
20
- *
21
- * IND-548: canonical application layer for the participant-agents capability.
22
- */
23
- // ── Registration and permission management tools ──────────────────────────────
24
- export { createAgentTools } from "./agent.tools.js";
@@ -1,19 +0,0 @@
1
- /**
2
- * agents/domain — pure agent entity value types and constants.
3
- *
4
- * Contains AgentRecord, AgentTransportRecord, AgentPermissionRecord,
5
- * AgentWithRelations, CreateAgentInput, CreateTransportInput,
6
- * GrantPermissionInput, and SYSTEM_AGENT_IDS.
7
- *
8
- * No application logic, no LLM calls, no cross-capability imports.
9
- *
10
- * ## What does NOT live here
11
- *
12
- * - AgentDatabase: persistence port — lives in agents/ports.
13
- * - AgentDispatcher: dispatch port — lives in agents/ports.
14
- * - createAgentTools: application layer — lives in agents/application.
15
- *
16
- * IND-548: canonical domain layer for the participant-agents capability.
17
- */
18
- export type { AgentRecord, AgentTransportRecord, AgentPermissionRecord, AgentWithRelations, CreateAgentInput, CreateTransportInput, GrantPermissionInput, } from "./agent.types.js";
19
- export { SYSTEM_AGENT_IDS } from "./agent.types.js";
@@ -1 +0,0 @@
1
- export { SYSTEM_AGENT_IDS } from "./agent.types.js";
@@ -1,21 +0,0 @@
1
- /**
2
- * participant-agents — the capability's sole cross-capability surface.
3
- *
4
- * Anything outside this capability imports from here and nowhere else.
5
- * Supersedes the capabilities/*.facade.ts + agents/public/ pair; the export
6
- * list is the union of the facades it replaces, so the contract is unchanged.
7
- */
8
- export type { DebugMetaAgent, } from "../chat/chat-streaming.types.js";
9
- export { ChatGraphFactory, } from "../chat/chat.graph.js";
10
- export { ChatInterruptClassifier, } from "../chat/chat.interrupt.classifier.js";
11
- export type { ChatPersonaConfig, } from "../chat/chat.persona.js";
12
- export { SuggestionGenerator, } from "../chat/chat.suggester.js";
13
- export { ChatSummarizer, } from "../chat/chat.summarizer.js";
14
- export { ChatTitleGenerator, } from "../chat/chat.title.generator.js";
15
- export { createChatTools, } from "../chat/chat.tools.js";
16
- export { createNegotiatorPersona, NEGOTIATOR_PERSONA_ID, } from "../chat/negotiator.persona.js";
17
- export { createOnboardingTools, filterOnboardingTools, narrowOnboardingTools, ONBOARDING_PERSONA, ONBOARDING_PERSONA_ID, ONBOARDING_PROFILE_KICKOFF, ONBOARDING_TOOL_NAMES, } from "../chat/onboarding.persona.js";
18
- export { createSignalTools, filterSignalTools, narrowSignalTools, SIGNAL_NEW_SIGNAL_KICKOFF, SIGNAL_PERSONA, SIGNAL_PERSONA_ID, SIGNAL_TOOL_NAMES, } from "../chat/signal.persona.js";
19
- export { createAgentTools, } from "./application/index.js";
20
- export { SYSTEM_AGENT_IDS, } from "./domain/index.js";
21
- export type { AgentToolDeps, } from "./ports/index.js";
@@ -1,11 +0,0 @@
1
- export { ChatGraphFactory, } from "../chat/chat.graph.js";
2
- export { ChatInterruptClassifier, } from "../chat/chat.interrupt.classifier.js";
3
- export { SuggestionGenerator, } from "../chat/chat.suggester.js";
4
- export { ChatSummarizer, } from "../chat/chat.summarizer.js";
5
- export { ChatTitleGenerator, } from "../chat/chat.title.generator.js";
6
- export { createChatTools, } from "../chat/chat.tools.js";
7
- export { createNegotiatorPersona, NEGOTIATOR_PERSONA_ID, } from "../chat/negotiator.persona.js";
8
- export { createOnboardingTools, filterOnboardingTools, narrowOnboardingTools, ONBOARDING_PERSONA, ONBOARDING_PERSONA_ID, ONBOARDING_PROFILE_KICKOFF, ONBOARDING_TOOL_NAMES, } from "../chat/onboarding.persona.js";
9
- export { createSignalTools, filterSignalTools, narrowSignalTools, SIGNAL_NEW_SIGNAL_KICKOFF, SIGNAL_PERSONA, SIGNAL_PERSONA_ID, SIGNAL_TOOL_NAMES, } from "../chat/signal.persona.js";
10
- export { createAgentTools, } from "./application/index.js";
11
- export { SYSTEM_AGENT_IDS, } from "./domain/index.js";
@@ -1,27 +0,0 @@
1
- /**
2
- * agents/ports — injected dependency contracts.
3
- *
4
- * Re-exports the narrow port types that the participant-agents module
5
- * declares as explicit injected boundaries. Consumers import these to
6
- * wire host implementations without depending on the application layer.
7
- *
8
- * ## Port groups
9
- *
10
- * ### Persistence port
11
- * - AgentDatabase — agent CRUD, transport management, permission grants.
12
- *
13
- * ### Dispatch port
14
- * - AgentDispatcher — negotiation turn dispatch (external poller + fallback).
15
- * - AgentDispatchResult — dispatch outcome discriminated union.
16
- * - NegotiationTurnPayload — full context sent to the dispatched agent.
17
- *
18
- * ### Tool host port
19
- * - AgentToolDeps — host capabilities for registration/permission tools.
20
- *
21
- * IND-548: canonical ports surface for the participant-agents capability.
22
- * Compatibility path:
23
- * - shared/interfaces/agent-dispatcher.interface.ts → re-exports from here
24
- */
25
- export type { AgentDatabase } from "./agent.repository.port.js";
26
- export type { AgentDispatcher, AgentDispatchResult, NegotiationTurnPayload, } from "./agent.dispatcher.port.js";
27
- export type { AgentToolDeps } from "./agent.tools.port.js";
@@ -1,25 +0,0 @@
1
- /**
2
- * agents/ports — injected dependency contracts.
3
- *
4
- * Re-exports the narrow port types that the participant-agents module
5
- * declares as explicit injected boundaries. Consumers import these to
6
- * wire host implementations without depending on the application layer.
7
- *
8
- * ## Port groups
9
- *
10
- * ### Persistence port
11
- * - AgentDatabase — agent CRUD, transport management, permission grants.
12
- *
13
- * ### Dispatch port
14
- * - AgentDispatcher — negotiation turn dispatch (external poller + fallback).
15
- * - AgentDispatchResult — dispatch outcome discriminated union.
16
- * - NegotiationTurnPayload — full context sent to the dispatched agent.
17
- *
18
- * ### Tool host port
19
- * - AgentToolDeps — host capabilities for registration/permission tools.
20
- *
21
- * IND-548: canonical ports surface for the participant-agents capability.
22
- * Compatibility path:
23
- * - shared/interfaces/agent-dispatcher.interface.ts → re-exports from here
24
- */
25
- export {};
@@ -1,10 +0,0 @@
1
- /**
2
- * contacts/application — foreground adapters and application services.
3
- *
4
- * ## Exports
5
- *
6
- * ### Tool factory
7
- * - `createContactTools` — creates contact management MCP tools
8
- * (list, remove, search).
9
- */
10
- export { createContactTools } from "./contact.tools.js";
@@ -1,10 +0,0 @@
1
- /**
2
- * contacts/application — foreground adapters and application services.
3
- *
4
- * ## Exports
5
- *
6
- * ### Tool factory
7
- * - `createContactTools` — creates contact management MCP tools
8
- * (list, remove, search).
9
- */
10
- export { createContactTools } from "./contact.tools.js";
@@ -1,8 +0,0 @@
1
- /**
2
- * contacts/domain — pure contact entity value types.
3
- *
4
- * No application logic, no LLM calls, no cross-capability imports.
5
- *
6
- * IND-549: canonical domain layer for the contacts capability.
7
- */
8
- export {};
@@ -1,12 +0,0 @@
1
- /**
2
- * contacts/domain — pure contact entity value types and constants.
3
- *
4
- * Contains ContactEntry and ContactSearchResult.
5
- *
6
- * ## What does NOT live here
7
- *
8
- * - ContactServiceAdapter: persistence port — lives in contacts/ports.
9
- * - ContactToolDeps: tool host port — lives in contacts/ports.
10
- * - createContactTools: application layer — lives in contacts/application.
11
- */
12
- export type { ContactEntry, ContactSearchResult, } from "./contact.types.js";
@@ -1,9 +0,0 @@
1
- /**
2
- * contacts — the capability's sole cross-capability surface.
3
- *
4
- * Anything outside this capability imports from here and nowhere else.
5
- * Supersedes the capabilities/contacts.facade.ts + contacts/public/ pair; the
6
- * export list is the union of the facades it replaces, so the contract is unchanged.
7
- */
8
- export { createContactTools } from "./application/index.js";
9
- export type { ContactServiceAdapter, ContactToolDeps, } from "./ports/index.js";
@@ -1,8 +0,0 @@
1
- /**
2
- * contacts — the capability's sole cross-capability surface.
3
- *
4
- * Anything outside this capability imports from here and nowhere else.
5
- * Supersedes the capabilities/contacts.facade.ts + contacts/public/ pair; the
6
- * export list is the union of the facades it replaces, so the contract is unchanged.
7
- */
8
- export { createContactTools } from "./application/index.js";
@@ -1,19 +0,0 @@
1
- /**
2
- * contacts/ports — injected dependency contracts for the contacts capability.
3
- *
4
- * Re-exports the narrow port types that the contacts module declares as
5
- * explicit injected boundaries. Consumers import these to wire host
6
- * implementations without depending on the application layer.
7
- *
8
- * ## Port groups
9
- *
10
- * ### Persistence port
11
- * - ContactServiceAdapter — contact reads and removal: list, remove, search.
12
- *
13
- * ### Tool host port
14
- * - ContactToolDeps — host capabilities for contact management tools.
15
- *
16
- * IND-549: canonical ports surface for the contacts capability.
17
- */
18
- export type { ContactServiceAdapter } from "./contact.repository.port.js";
19
- export type { ContactToolDeps } from "./contact.tools.port.js";
@@ -1,18 +0,0 @@
1
- /**
2
- * contacts/ports — injected dependency contracts for the contacts capability.
3
- *
4
- * Re-exports the narrow port types that the contacts module declares as
5
- * explicit injected boundaries. Consumers import these to wire host
6
- * implementations without depending on the application layer.
7
- *
8
- * ## Port groups
9
- *
10
- * ### Persistence port
11
- * - ContactServiceAdapter — contact reads and removal: list, remove, search.
12
- *
13
- * ### Tool host port
14
- * - ContactToolDeps — host capabilities for contact management tools.
15
- *
16
- * IND-549: canonical ports surface for the contacts capability.
17
- */
18
- export {};
@@ -1,72 +0,0 @@
1
- /**
2
- * contexts/application — orchestrators, factories, and service classes.
3
- *
4
- * Re-exports the orchestration tier of the participant-context capability:
5
- * graph factories (LangGraph compilations), LLM service classes, and utility
6
- * helpers that belong to the application layer. These are the building blocks
7
- * that foreground and ambient adapters compose to implement use cases.
8
- *
9
- * Boundary: application-layer only. Imports from contexts/domain,
10
- * contexts/ports, and shared/ infrastructure — never from runtime/,
11
- * host implementations, or capability facades.
12
- *
13
- * ## Foreground use cases (onboarding / explicit enrichment)
14
- *
15
- * - {@link EnrichmentGraphFactory} — compiles the enrichment pipeline graph
16
- * (scrape → decompose-premises → generate-profile → write-profile).
17
- * Invoked by the foreground shell for `preview_profile`, `confirm_profile`,
18
- * and `enrich_from_url` tools.
19
- * - {@link PremiseGraphFactory} — compiles the premise lifecycle graph
20
- * (analyze → embed → dedupe → persist → index → assign-networks).
21
- * Invoked by the foreground shell for premise CRUD tools.
22
- * - {@link UserContextGenerator} — synthesizes network-scoped context paragraphs
23
- * and the global identity paragraph from the active premise set.
24
- * Called by the background context-refresh adapter after premise mutations.
25
- *
26
- * ## Ambient use cases (scrape / decompose / regenerate / index)
27
- *
28
- * - {@link PremiseDecomposer} — decomposes free-text or scraped input into atomic
29
- * premises. Used inside EnrichmentGraphFactory (decompose-premises node) and
30
- * standalone by the background decompose adapter.
31
- * - {@link PremiseAnalyzer} — Speech Act classification and felicity scoring.
32
- * Used inside PremiseGraphFactory (analyze node).
33
- * - {@link PremiseIndexer} — scores premise relevance to a network index.
34
- * Used inside PremiseGraphFactory (assign-networks node).
35
- * - {@link EnrichmentGenerator} — generates a structured profile from user account
36
- * data via the enrichment generate-mode LLM pipeline.
37
- *
38
- * ## HyDE (Hypothetical Document Embeddings)
39
- *
40
- * HyDE is a protocol-owned technology binding that produces hypothetical
41
- * embedding documents for semantic retrieval. The HyDE sub-capability is
42
- * participant-context-adjacent: it transforms participant context (premise text,
43
- * profile summary) into search-optimized representations.
44
- *
45
- * - {@link HydeGraphFactory} — compiles the full HyDE pipeline graph.
46
- * - {@link HydeGenerator} — generates hypothetical documents from a source text
47
- * and a lens label.
48
- * - {@link LensInferrer} — infers retrieval lenses from a source text and optional
49
- * profile context.
50
- * - {@link HydeValidator} — validates generated hypothetical documents against
51
- * prompt-injection and out-of-scope risks.
52
- *
53
- * IND-545: canonical application home for participant-context orchestrators
54
- * previously spread across premises/, contexts/, enrichment/, and discovery/.
55
- */
56
- export { PremiseGraphFactory } from "../../premises/premise.graph.js";
57
- export { PremiseDecomposer, type PremiseDecomposerOutput, type DecomposedPremise, type ExistingPremiseRef, } from "../../premises/premise.decomposer.js";
58
- export { PremiseAnalyzer, type PremiseAnalyzerOutput, } from "../../premises/premise.analyzer.js";
59
- export { PremiseIndexer, type PremiseIndexerOutput, } from "../../premises/premise.indexer.js";
60
- export { EnrichmentGraphFactory, type CompiledPremiseGraph, } from "../../enrichment/enrichment.graph.js";
61
- export { EnrichmentGenerator, type GeneratedProfile } from "../../enrichment/enrichment.generator.js";
62
- export { createEnrichmentTools } from "../../enrichment/enrichment.tools.js";
63
- export { createPremiseTools } from "../../premises/premise.tools.js";
64
- export { UserContextGenerator } from "../../contexts/context.generator.js";
65
- export { HydeGraphFactory, type HydeLensInferrerLike, type HydeGeneratorLike, type HydeValidatorLike, type HydeGraphOptions, } from "../../discovery/index.js";
66
- export { HydeGenerator, type HydeGeneratorOutput, type HydeGenerateInput, } from "../../discovery/index.js";
67
- export { LensInferrer, type LensInferenceInput, type LensInferenceOutput, FRAME_SYSTEM_PROMPT, FrameResponseSchema, } from "../../discovery/index.js";
68
- export { HydeValidator, type HydeValidationDocument, type HydeValidationInput, type HydeValidationVerdict, type HydeValidationOutput, HydeValidationResponseSchema, buildHydeValidationPrompt, } from "../../discovery/index.js";
69
- export { computeHydeSourceTextHash, selectHydeDocumentsForGeneration } from "../../discovery/index.js";
70
- export { getHydeGenerationMode, type HydeGenerationMode, HYDE_FRAME_GENERATION_VERSION, } from "../../discovery/index.js";
71
- export { HYDE_DEFAULT_CACHE_TTL, HYDE_CORPUS_PROMPTS, } from "../../discovery/index.js";
72
- export { type HydeSourceFrame, HydeSourceFrameSchema, type HydeFrameRole, type HydeFrameHardConstraint, type HydeFrameNamedEntity, type HydeFrameVocabulary, HYDE_HARD_CONSTRAINT_TYPES, HYDE_NAMED_ENTITY_TYPES, } from "../../discovery/index.js";
@@ -1,82 +0,0 @@
1
- /**
2
- * contexts/application — orchestrators, factories, and service classes.
3
- *
4
- * Re-exports the orchestration tier of the participant-context capability:
5
- * graph factories (LangGraph compilations), LLM service classes, and utility
6
- * helpers that belong to the application layer. These are the building blocks
7
- * that foreground and ambient adapters compose to implement use cases.
8
- *
9
- * Boundary: application-layer only. Imports from contexts/domain,
10
- * contexts/ports, and shared/ infrastructure — never from runtime/,
11
- * host implementations, or capability facades.
12
- *
13
- * ## Foreground use cases (onboarding / explicit enrichment)
14
- *
15
- * - {@link EnrichmentGraphFactory} — compiles the enrichment pipeline graph
16
- * (scrape → decompose-premises → generate-profile → write-profile).
17
- * Invoked by the foreground shell for `preview_profile`, `confirm_profile`,
18
- * and `enrich_from_url` tools.
19
- * - {@link PremiseGraphFactory} — compiles the premise lifecycle graph
20
- * (analyze → embed → dedupe → persist → index → assign-networks).
21
- * Invoked by the foreground shell for premise CRUD tools.
22
- * - {@link UserContextGenerator} — synthesizes network-scoped context paragraphs
23
- * and the global identity paragraph from the active premise set.
24
- * Called by the background context-refresh adapter after premise mutations.
25
- *
26
- * ## Ambient use cases (scrape / decompose / regenerate / index)
27
- *
28
- * - {@link PremiseDecomposer} — decomposes free-text or scraped input into atomic
29
- * premises. Used inside EnrichmentGraphFactory (decompose-premises node) and
30
- * standalone by the background decompose adapter.
31
- * - {@link PremiseAnalyzer} — Speech Act classification and felicity scoring.
32
- * Used inside PremiseGraphFactory (analyze node).
33
- * - {@link PremiseIndexer} — scores premise relevance to a network index.
34
- * Used inside PremiseGraphFactory (assign-networks node).
35
- * - {@link EnrichmentGenerator} — generates a structured profile from user account
36
- * data via the enrichment generate-mode LLM pipeline.
37
- *
38
- * ## HyDE (Hypothetical Document Embeddings)
39
- *
40
- * HyDE is a protocol-owned technology binding that produces hypothetical
41
- * embedding documents for semantic retrieval. The HyDE sub-capability is
42
- * participant-context-adjacent: it transforms participant context (premise text,
43
- * profile summary) into search-optimized representations.
44
- *
45
- * - {@link HydeGraphFactory} — compiles the full HyDE pipeline graph.
46
- * - {@link HydeGenerator} — generates hypothetical documents from a source text
47
- * and a lens label.
48
- * - {@link LensInferrer} — infers retrieval lenses from a source text and optional
49
- * profile context.
50
- * - {@link HydeValidator} — validates generated hypothetical documents against
51
- * prompt-injection and out-of-scope risks.
52
- *
53
- * IND-545: canonical application home for participant-context orchestrators
54
- * previously spread across premises/, contexts/, enrichment/, and discovery/.
55
- */
56
- // ── Premise graph ─────────────────────────────────────────────────────────────
57
- export { PremiseGraphFactory } from "../../premises/premise.graph.js";
58
- // ── Premise service classes ───────────────────────────────────────────────────
59
- export { PremiseDecomposer, } from "../../premises/premise.decomposer.js";
60
- export { PremiseAnalyzer, } from "../../premises/premise.analyzer.js";
61
- export { PremiseIndexer, } from "../../premises/premise.indexer.js";
62
- // ── Enrichment graph + service classes ───────────────────────────────────────
63
- export { EnrichmentGraphFactory, } from "../../enrichment/enrichment.graph.js";
64
- export { EnrichmentGenerator } from "../../enrichment/enrichment.generator.js";
65
- // ── Tool factories (foreground adapters) ──────────────────────────────────────
66
- // These are foreground adapter entry points consumed by the tool composition root (shared/agent)
67
- // composition. They accept compiled graphs and host deps through the tool-dep
68
- // ports and produce LangChain-compatible tool arrays.
69
- export { createEnrichmentTools } from "../../enrichment/enrichment.tools.js";
70
- export { createPremiseTools } from "../../premises/premise.tools.js";
71
- // ── Context synthesis ─────────────────────────────────────────────────────────
72
- export { UserContextGenerator } from "../../contexts/context.generator.js";
73
- // ── HyDE graph + service classes ─────────────────────────────────────────────
74
- export { HydeGraphFactory, } from "../../discovery/index.js";
75
- export { HydeGenerator, } from "../../discovery/index.js";
76
- export { LensInferrer, FRAME_SYSTEM_PROMPT, FrameResponseSchema, } from "../../discovery/index.js";
77
- export { HydeValidator, HydeValidationResponseSchema, buildHydeValidationPrompt, } from "../../discovery/index.js";
78
- // ── HyDE utilities ────────────────────────────────────────────────────────────
79
- export { computeHydeSourceTextHash, selectHydeDocumentsForGeneration } from "../../discovery/index.js";
80
- export { getHydeGenerationMode, HYDE_FRAME_GENERATION_VERSION, } from "../../discovery/index.js";
81
- export { HYDE_DEFAULT_CACHE_TTL, HYDE_CORPUS_PROMPTS, } from "../../discovery/index.js";
82
- export { HydeSourceFrameSchema, HYDE_HARD_CONSTRAINT_TYPES, HYDE_NAMED_ENTITY_TYPES, } from "../../discovery/index.js";
@@ -1,67 +0,0 @@
1
- /**
2
- * contexts/domain — pure participant-context contracts.
3
- *
4
- * Value types, graph-state shapes, and domain model types that define the
5
- * participant-context capability's domain language.
6
- * No LLM calls, no LangGraph edges, no host-adapter imports.
7
- *
8
- * ## Domain model
9
- *
10
- * A **Premise** is an atomic self-descriptive proposition asserted by a
11
- * participant about themselves (e.g. "I am a machine learning researcher").
12
- * Premises carry:
13
- * - **Assertion**: the raw text of the proposition.
14
- * - **Provenance**: how the premise was produced (explicit user assertion,
15
- * social integration scrape, or auto-generation from account data) plus
16
- * a confidence score derived from felicity conditions.
17
- * - **Validity**: the time window during which the premise is considered
18
- * current, plus a `volatile` flag marking it for automatic retraction
19
- * when its `validUntil` window elapses.
20
- * - **Analysis**: Speech Act classification (DECLARATIVE | ASSERTIVE) and
21
- * felicity scores (authority, sincerity, clarity) recorded at creation time.
22
- *
23
- * ## Provenance invariants
24
- *
25
- * - `source: 'explicit'` — user typed or confirmed the premise directly in chat.
26
- * - `source: 'integration'` — derived from a social/external data source; the
27
- * `sourceId` identifies the `user_socials` record that was the source of truth.
28
- * - `source: 'generated'` — auto-produced from account data via the enrichment
29
- * generate-mode; no specific social record is the source.
30
- * - `confidence` is derived from average felicity scores when the PremiseAnalyzer
31
- * runs; it falls back to 1.0 when no analysis is available (explicit tier).
32
- *
33
- * ## Validity / regeneration invariants
34
- *
35
- * - `volatile: false` (assertive tier default) — premise persists until explicitly
36
- * retracted by the participant or an update operation.
37
- * - `volatile: true` (contextual tier default) — premise is automatically retracted
38
- * by the background refresh job once `validUntil` has elapsed.
39
- * - Regeneration (triggered by the ambient enrichment adapter) replaces stale
40
- * integration-sourced premises when the social source is re-scraped; it MUST
41
- * NOT touch `source: 'explicit'` premises created by the participant directly.
42
- * - Context synthesis (UserContextGenerator) is triggered after premise writes and
43
- * should treat the resulting paragraph as a derived projection — never as a source
44
- * of truth for premise recovery.
45
- *
46
- * ## Policy separation
47
- *
48
- * - **Foreground adapters** (onboarding preview/confirm, explicit enrichment):
49
- * managed by the tool composition root (shared/agent). They compose the
50
- * EnrichmentGraphFactory and PremiseGraphFactory and pass the compiled graphs
51
- * through the tool-dependency ports.
52
- * - **Ambient adapters** (scrape/decompose, regeneration, indexing, representation
53
- * refresh): managed by the background runtime shell. They are the consumers of
54
- * PremiseGraphFactory and EnrichmentGraphFactory in queue-worker mode.
55
- * - **Cache/enrichment/scraper/model/embedding integrations**: remain injected
56
- * ports (see contexts/ports) or protocol-owned technology bindings
57
- * in shared/agent and shared/hyde.
58
- *
59
- * IND-545: canonical home for participant-context domain contracts previously
60
- * spread across premises/, contexts/, enrichment/, and discovery/.
61
- * Legacy paths remain as compatibility re-exports pointing here.
62
- */
63
- export { PremiseGraphState } from "../../premises/premise.state.js";
64
- export { EnrichmentGraphState } from "../../enrichment/enrichment.state.js";
65
- export { HydeGraphState, type HydeDocumentState, type HydeDocumentOrigin, type HydeValidationStatus, } from "../../discovery/index.js";
66
- export type { UserContextInput, IncrementalContextInput, GlobalContextInput, GlobalIncrementalContextInput, UserContextResult, } from "../../contexts/context.generator.js";
67
- export type { PremiseAssertion, PremiseProvenance, PremiseAnalysis, PremiseValidity, PremiseRecord, } from "../../shared/interfaces/database.interface.js";