@indexnetwork/protocol 3.13.0-rc.288.1 → 4.1.1-rc.290.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 (116) hide show
  1. package/dist/chat/chat.prompt.js +25 -25
  2. package/dist/chat/chat.prompt.js.map +1 -1
  3. package/dist/chat/chat.prompt.modules.js +8 -8
  4. package/dist/chat/chat.prompt.modules.js.map +1 -1
  5. package/dist/chat/tests/chat.graph.mocks.d.ts +1 -7
  6. package/dist/chat/tests/chat.graph.mocks.d.ts.map +1 -1
  7. package/dist/chat/tests/chat.graph.mocks.js +1 -2
  8. package/dist/chat/tests/chat.graph.mocks.js.map +1 -1
  9. package/dist/contact/contact.tools.js +3 -3
  10. package/dist/contact/contact.tools.js.map +1 -1
  11. package/dist/{profile/profile.enricher.d.ts → enrichment/enrichment.enricher.d.ts} +1 -1
  12. package/dist/enrichment/enrichment.enricher.d.ts.map +1 -0
  13. package/dist/{profile/profile.enricher.js → enrichment/enrichment.enricher.js} +1 -1
  14. package/dist/enrichment/enrichment.enricher.js.map +1 -0
  15. package/dist/{profile/profile.generator.d.ts → enrichment/enrichment.generator.d.ts} +3 -3
  16. package/dist/enrichment/enrichment.generator.d.ts.map +1 -0
  17. package/dist/{profile/profile.generator.js → enrichment/enrichment.generator.js} +6 -6
  18. package/dist/enrichment/enrichment.generator.js.map +1 -0
  19. package/dist/{profile/profile.graph.d.ts → enrichment/enrichment.graph.d.ts} +61 -201
  20. package/dist/enrichment/enrichment.graph.d.ts.map +1 -0
  21. package/dist/{profile/profile.graph.js → enrichment/enrichment.graph.js} +7 -7
  22. package/dist/enrichment/enrichment.graph.js.map +1 -0
  23. package/dist/{profile/profile.state.d.ts → enrichment/enrichment.state.d.ts} +8 -32
  24. package/dist/enrichment/enrichment.state.d.ts.map +1 -0
  25. package/dist/{profile/profile.state.js → enrichment/enrichment.state.js} +2 -2
  26. package/dist/enrichment/enrichment.state.js.map +1 -0
  27. package/dist/enrichment/enrichment.tools.d.ts +3 -0
  28. package/dist/enrichment/enrichment.tools.d.ts.map +1 -0
  29. package/dist/{profile/profile.tools.js → enrichment/enrichment.tools.js} +119 -132
  30. package/dist/enrichment/enrichment.tools.js.map +1 -0
  31. package/dist/index.d.ts +4 -4
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +3 -3
  34. package/dist/index.js.map +1 -1
  35. package/dist/intent/intent.graph.d.ts.map +1 -1
  36. package/dist/intent/intent.graph.js +7 -6
  37. package/dist/intent/intent.graph.js.map +1 -1
  38. package/dist/intent/intent.tools.js +5 -5
  39. package/dist/intent/intent.tools.js.map +1 -1
  40. package/dist/mcp/mcp.server.d.ts +1 -1
  41. package/dist/mcp/mcp.server.d.ts.map +1 -1
  42. package/dist/mcp/mcp.server.js +12 -4
  43. package/dist/mcp/mcp.server.js.map +1 -1
  44. package/dist/negotiation/negotiation.tools.js +1 -1
  45. package/dist/negotiation/negotiation.tools.js.map +1 -1
  46. package/dist/network/network.tools.js +2 -2
  47. package/dist/network/network.tools.js.map +1 -1
  48. package/dist/opportunity/opportunity.graph.d.ts +9 -15
  49. package/dist/opportunity/opportunity.graph.d.ts.map +1 -1
  50. package/dist/opportunity/opportunity.graph.js +12 -29
  51. package/dist/opportunity/opportunity.graph.js.map +1 -1
  52. package/dist/opportunity/opportunity.presenter.d.ts.map +1 -1
  53. package/dist/opportunity/opportunity.presenter.js +3 -11
  54. package/dist/opportunity/opportunity.presenter.js.map +1 -1
  55. package/dist/opportunity/opportunity.state.d.ts +4 -10
  56. package/dist/opportunity/opportunity.state.d.ts.map +1 -1
  57. package/dist/opportunity/opportunity.state.js +1 -1
  58. package/dist/opportunity/opportunity.state.js.map +1 -1
  59. package/dist/opportunity/opportunity.tools.js +8 -8
  60. package/dist/opportunity/opportunity.tools.js.map +1 -1
  61. package/dist/questioner/questioner.presets.js +1 -1
  62. package/dist/questioner/questioner.presets.js.map +1 -1
  63. package/dist/questioner/questioner.tools.d.ts +1 -1
  64. package/dist/questioner/questioner.tools.js +2 -2
  65. package/dist/questioner/questioner.tools.js.map +1 -1
  66. package/dist/shared/agent/tool.factory.js +6 -6
  67. package/dist/shared/agent/tool.factory.js.map +1 -1
  68. package/dist/shared/agent/tool.helpers.d.ts +8 -8
  69. package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
  70. package/dist/shared/agent/tool.helpers.js.map +1 -1
  71. package/dist/shared/agent/tool.registry.d.ts.map +1 -1
  72. package/dist/shared/agent/tool.registry.js +28 -2
  73. package/dist/shared/agent/tool.registry.js.map +1 -1
  74. package/dist/shared/agent/tool.runtime.d.ts.map +1 -1
  75. package/dist/shared/agent/tool.runtime.js +6 -0
  76. package/dist/shared/agent/tool.runtime.js.map +1 -1
  77. package/dist/shared/agent/utility.tools.js +5 -5
  78. package/dist/shared/agent/utility.tools.js.map +1 -1
  79. package/dist/shared/hyde/hyde.graph.d.ts +6 -6
  80. package/dist/shared/hyde/hyde.state.d.ts +2 -2
  81. package/dist/shared/hyde/hyde.state.js.map +1 -1
  82. package/dist/shared/interfaces/database.interface.d.ts +16 -16
  83. package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
  84. package/dist/shared/interfaces/database.interface.js.map +1 -1
  85. package/dist/shared/interfaces/{profile-run.interface.d.ts → enrichment-run.interface.d.ts} +21 -21
  86. package/dist/shared/interfaces/enrichment-run.interface.d.ts.map +1 -0
  87. package/dist/shared/interfaces/enrichment-run.interface.js +2 -0
  88. package/dist/shared/interfaces/enrichment-run.interface.js.map +1 -0
  89. package/dist/shared/schemas/discovery-question.schema.d.ts +2 -2
  90. package/dist/shared/schemas/identity.schema.d.ts +45 -0
  91. package/dist/shared/schemas/identity.schema.d.ts.map +1 -0
  92. package/dist/shared/schemas/identity.schema.js +20 -0
  93. package/dist/shared/schemas/identity.schema.js.map +1 -0
  94. package/dist/shared/schemas/question.schema.d.ts +4 -4
  95. package/dist/shared/schemas/question.schema.d.ts.map +1 -1
  96. package/dist/shared/schemas/question.schema.js +1 -1
  97. package/dist/shared/schemas/question.schema.js.map +1 -1
  98. package/package.json +1 -1
  99. package/dist/profile/profile.enricher.d.ts.map +0 -1
  100. package/dist/profile/profile.enricher.js.map +0 -1
  101. package/dist/profile/profile.generator.d.ts.map +0 -1
  102. package/dist/profile/profile.generator.js.map +0 -1
  103. package/dist/profile/profile.graph.d.ts.map +0 -1
  104. package/dist/profile/profile.graph.js.map +0 -1
  105. package/dist/profile/profile.state.d.ts.map +0 -1
  106. package/dist/profile/profile.state.js.map +0 -1
  107. package/dist/profile/profile.tools.d.ts +0 -3
  108. package/dist/profile/profile.tools.d.ts.map +0 -1
  109. package/dist/profile/profile.tools.js.map +0 -1
  110. package/dist/shared/interfaces/profile-run.interface.d.ts.map +0 -1
  111. package/dist/shared/interfaces/profile-run.interface.js +0 -2
  112. package/dist/shared/interfaces/profile-run.interface.js.map +0 -1
  113. package/dist/shared/schemas/profile.schema.d.ts +0 -100
  114. package/dist/shared/schemas/profile.schema.d.ts.map +0 -1
  115. package/dist/shared/schemas/profile.schema.js +0 -26
  116. package/dist/shared/schemas/profile.schema.js.map +0 -1
@@ -392,12 +392,12 @@ export function createOpportunityTools(defineTool, deps) {
392
392
  name: "discover_opportunities",
393
393
  description: "Discovers opportunities — connections between users based on complementary intents — and persists them as drafts. " +
394
394
  "Opportunities are the core output of the discovery engine, representing potential valuable connections between people.\n\n" +
395
- "**NOT for person lookup** — use read_user_profiles(query=name) to find people by name.\n\n" +
395
+ "**NOT for person lookup** — use read_user_contexts(query=name) to find people by name.\n\n" +
396
396
  "**Four modes:**\n" +
397
397
  "1. **Discovery** (most common): pass `searchQuery` and/or `networkId`. The system finds other users in shared indexes " +
398
398
  "whose intents semantically complement the query. Uses HyDE embeddings and LLM evaluation for scoring.\n" +
399
399
  "2. **Introduction**: pass `partyUserIds` (2+ user IDs) + `entities` (pre-gathered profiles and intents from shared indexes). " +
400
- "You MUST call read_user_profiles and read_intents for each party BEFORE calling this. " +
400
+ "You MUST call read_user_contexts and read_intents for each party BEFORE calling this. " +
401
401
  "Optionally pass `hint` with the user's reason for the introduction.\n" +
402
402
  "3. **Direct connection**: pass `targetUserId` + `searchQuery`. Creates an opportunity between the current user and one specific person.\n" +
403
403
  "4. **Introducer discovery**: pass `introTargetUserId` (find matches FOR that person; current user becomes the introducer). " +
@@ -420,7 +420,7 @@ export function createOpportunityTools(defineTool, deps) {
420
420
  "run across all indexes.\n\n" +
421
421
  "**Introduction mode prerequisites.** When using `partyUserIds` + `entities`, YOU must pre-fetch each party's " +
422
422
  "profile and intents before calling this tool. The entities array must include each party's userId, profile, " +
423
- "intents from shared indexes, and the shared networkId. Call read_user_profiles, read_network_memberships, " +
423
+ "intents from shared indexes, and the shared networkId. Call read_user_contexts, read_network_memberships, " +
424
424
  "and read_intents for both parties first. The introducer (current user) must NOT appear in entities.\n\n" +
425
425
  "**Signal-visibility follow-up.** If the response includes `suggestIntentCreationForVisibility: true` and " +
426
426
  "`suggestedIntentDescription`, after presenting opportunity cards ask the user ONCE whether they'd also like " +
@@ -447,18 +447,18 @@ export function createOpportunityTools(defineTool, deps) {
447
447
  targetUserId: z
448
448
  .string()
449
449
  .optional()
450
- .describe("Direct connection mode: create an opportunity with this specific user. Get the userId from read_user_profiles(query=name). Combine with searchQuery to explain the connection reason."),
450
+ .describe("Direct connection mode: create an opportunity with this specific user. Get the userId from read_user_contexts(query=name). Combine with searchQuery to explain the connection reason."),
451
451
  introTargetUserId: z
452
452
  .string()
453
453
  .optional()
454
454
  .describe("Introducer discovery mode: find matches FOR this user ID (the current user becomes the introducer). " +
455
- "Get the userId from read_user_profiles(query=name). " +
455
+ "Get the userId from read_user_contexts(query=name). " +
456
456
  "Use when the user asks 'who should I introduce to [person]?'. " +
457
457
  "Do NOT combine with partyUserIds (that's full introduction mode)."),
458
458
  partyUserIds: z
459
459
  .array(z.string())
460
460
  .optional()
461
- .describe("Introduction mode: array of 2+ user IDs to introduce to each other. Get user IDs from read_user_profiles or read_network_memberships. Must also provide entities with pre-gathered profile/intent data."),
461
+ .describe("Introduction mode: array of 2+ user IDs to introduce to each other. Get user IDs from read_user_contexts or read_network_memberships. Must also provide entities with pre-gathered profile/intent data."),
462
462
  entities: z
463
463
  .array(z.object({
464
464
  userId: z.string(),
@@ -486,7 +486,7 @@ export function createOpportunityTools(defineTool, deps) {
486
486
  .optional()
487
487
  .describe("Introduction mode: pre-gathered profile and intent data for each party being introduced. " +
488
488
  "Each entry needs userId, networkId (the shared index), and optionally profile (name, bio, skills, interests) and intents (intentId, payload). " +
489
- "Gather this data by calling read_user_profiles and read_intents for each party BEFORE calling discover_opportunities. " +
489
+ "Gather this data by calling read_user_contexts and read_intents for each party BEFORE calling discover_opportunities. " +
490
490
  "All entities must share the same networkId (the shared index where both parties are members)."),
491
491
  hint: z
492
492
  .string()
@@ -680,7 +680,7 @@ export function createOpportunityTools(defineTool, deps) {
680
680
  if (!normalizedEntities || normalizedEntities.length === 0) {
681
681
  return error("Introduction requires pre-gathered entity data. " +
682
682
  "First use read_network_memberships to find shared networks, " +
683
- "then read_user_profiles and read_intents for each party, " +
683
+ "then read_user_contexts and read_intents for each party, " +
684
684
  "then pass the results as entities.");
685
685
  }
686
686
  const normalizedEntityNetworkIds = normalizedEntities