@indexnetwork/protocol 4.3.4-rc.309.1 → 4.3.4-rc.311.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 (130) hide show
  1. package/IMPLEMENTATION.md +2 -2
  2. package/dist/chat/chat.agent.d.ts +1 -1
  3. package/dist/chat/chat.agent.js +1 -1
  4. package/dist/chat/chat.agent.js.map +1 -1
  5. package/dist/chat/chat.graph.d.ts +8 -8
  6. package/dist/chat/chat.prompt.js +30 -30
  7. package/dist/chat/chat.prompt.js.map +1 -1
  8. package/dist/chat/chat.prompt.modules.js +8 -8
  9. package/dist/chat/chat.prompt.modules.js.map +1 -1
  10. package/dist/chat/chat.state.d.ts +5 -4
  11. package/dist/chat/chat.state.d.ts.map +1 -1
  12. package/dist/chat/chat.state.js +2 -2
  13. package/dist/chat/chat.state.js.map +1 -1
  14. package/dist/chat/chat.streamer.d.ts +3 -2
  15. package/dist/chat/chat.streamer.d.ts.map +1 -1
  16. package/dist/chat/chat.streamer.js +2 -2
  17. package/dist/chat/chat.streamer.js.map +1 -1
  18. package/dist/chat/tests/chat.graph.mocks.d.ts +1 -1
  19. package/dist/chat/tests/chat.graph.mocks.js +1 -1
  20. package/dist/chat/tests/chat.graph.mocks.js.map +1 -1
  21. package/dist/contact/contact.tools.js +6 -6
  22. package/dist/contact/contact.tools.js.map +1 -1
  23. package/dist/enrichment/enrichment.tools.js +7 -7
  24. package/dist/enrichment/enrichment.tools.js.map +1 -1
  25. package/dist/integration/integration.tools.js +1 -1
  26. package/dist/integration/integration.tools.js.map +1 -1
  27. package/dist/intent/intent.graph.d.ts +5 -5
  28. package/dist/intent/intent.graph.d.ts.map +1 -1
  29. package/dist/intent/intent.graph.js +9 -9
  30. package/dist/intent/intent.graph.js.map +1 -1
  31. package/dist/intent/intent.indexer.d.ts +1 -1
  32. package/dist/intent/intent.indexer.js +4 -4
  33. package/dist/intent/intent.indexer.js.map +1 -1
  34. package/dist/intent/intent.state.d.ts +9 -8
  35. package/dist/intent/intent.state.d.ts.map +1 -1
  36. package/dist/intent/intent.state.js +7 -7
  37. package/dist/intent/intent.state.js.map +1 -1
  38. package/dist/intent/intent.tools.js +26 -26
  39. package/dist/intent/intent.tools.js.map +1 -1
  40. package/dist/maintenance/maintenance.graph.d.ts +2 -2
  41. package/dist/maintenance/maintenance.graph.d.ts.map +1 -1
  42. package/dist/maintenance/maintenance.graph.js.map +1 -1
  43. package/dist/mcp/mcp.server.d.ts +2 -2
  44. package/dist/mcp/mcp.server.js +4 -4
  45. package/dist/mcp/mcp.server.js.map +1 -1
  46. package/dist/network/indexer/indexer.graph.d.ts +2 -2
  47. package/dist/network/indexer/indexer.graph.d.ts.map +1 -1
  48. package/dist/network/indexer/indexer.graph.js +13 -13
  49. package/dist/network/indexer/indexer.graph.js.map +1 -1
  50. package/dist/network/indexer/indexer.state.d.ts +3 -3
  51. package/dist/network/indexer/indexer.state.d.ts.map +1 -1
  52. package/dist/network/indexer/indexer.state.js +4 -4
  53. package/dist/network/indexer/indexer.state.js.map +1 -1
  54. package/dist/network/membership/membership.graph.d.ts +1 -1
  55. package/dist/network/membership/membership.graph.js +21 -21
  56. package/dist/network/membership/membership.graph.js.map +1 -1
  57. package/dist/network/membership/membership.state.d.ts +2 -2
  58. package/dist/network/membership/membership.state.js +2 -2
  59. package/dist/network/membership/membership.state.js.map +1 -1
  60. package/dist/network/network.graph.d.ts +1 -1
  61. package/dist/network/network.graph.d.ts.map +1 -1
  62. package/dist/network/network.graph.js +13 -13
  63. package/dist/network/network.graph.js.map +1 -1
  64. package/dist/network/network.state.d.ts +3 -3
  65. package/dist/network/network.state.d.ts.map +1 -1
  66. package/dist/network/network.state.js +3 -3
  67. package/dist/network/network.state.js.map +1 -1
  68. package/dist/network/network.tools.d.ts.map +1 -1
  69. package/dist/network/network.tools.js +95 -107
  70. package/dist/network/network.tools.js.map +1 -1
  71. package/dist/opportunity/feed/feed.graph.d.ts +10 -0
  72. package/dist/opportunity/feed/feed.graph.d.ts.map +1 -1
  73. package/dist/opportunity/feed/feed.graph.js +4 -0
  74. package/dist/opportunity/feed/feed.graph.js.map +1 -1
  75. package/dist/opportunity/feed/feed.state.d.ts +2 -0
  76. package/dist/opportunity/feed/feed.state.d.ts.map +1 -1
  77. package/dist/opportunity/feed/feed.state.js +8 -0
  78. package/dist/opportunity/feed/feed.state.js.map +1 -1
  79. package/dist/opportunity/opportunity.discover.d.ts +1 -1
  80. package/dist/opportunity/opportunity.discover.d.ts.map +1 -1
  81. package/dist/opportunity/opportunity.discover.js +1 -1
  82. package/dist/opportunity/opportunity.discover.js.map +1 -1
  83. package/dist/opportunity/opportunity.graph.d.ts +6 -6
  84. package/dist/opportunity/opportunity.graph.js +10 -10
  85. package/dist/opportunity/opportunity.graph.js.map +1 -1
  86. package/dist/opportunity/opportunity.introducer.d.ts +3 -3
  87. package/dist/opportunity/opportunity.introducer.d.ts.map +1 -1
  88. package/dist/opportunity/opportunity.introducer.js +2 -2
  89. package/dist/opportunity/opportunity.introducer.js.map +1 -1
  90. package/dist/opportunity/opportunity.state.d.ts +2 -2
  91. package/dist/opportunity/opportunity.state.js +1 -1
  92. package/dist/opportunity/opportunity.state.js.map +1 -1
  93. package/dist/opportunity/opportunity.tools.d.ts.map +1 -1
  94. package/dist/opportunity/opportunity.tools.js +89 -22
  95. package/dist/opportunity/opportunity.tools.js.map +1 -1
  96. package/dist/premise/premise.graph.d.ts +4 -4
  97. package/dist/premise/premise.indexer.d.ts +1 -1
  98. package/dist/premise/premise.indexer.js +5 -5
  99. package/dist/premise/premise.indexer.js.map +1 -1
  100. package/dist/premise/premise.state.d.ts +2 -1
  101. package/dist/premise/premise.state.d.ts.map +1 -1
  102. package/dist/questioner/questioner.tools.d.ts.map +1 -1
  103. package/dist/questioner/questioner.tools.js +22 -9
  104. package/dist/questioner/questioner.tools.js.map +1 -1
  105. package/dist/shared/agent/tool.factory.d.ts +1 -1
  106. package/dist/shared/agent/tool.factory.js +1 -1
  107. package/dist/shared/agent/tool.factory.js.map +1 -1
  108. package/dist/shared/agent/tool.helpers.d.ts +14 -11
  109. package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
  110. package/dist/shared/agent/tool.helpers.js +2 -2
  111. package/dist/shared/agent/tool.helpers.js.map +1 -1
  112. package/dist/shared/agent/tool.scope.d.ts +7 -1
  113. package/dist/shared/agent/tool.scope.d.ts.map +1 -1
  114. package/dist/shared/agent/tool.scope.js +11 -1
  115. package/dist/shared/agent/tool.scope.js.map +1 -1
  116. package/dist/shared/agent/utility.tools.js +20 -20
  117. package/dist/shared/agent/utility.tools.js.map +1 -1
  118. package/dist/shared/hyde/hyde.graph.d.ts +6 -6
  119. package/dist/shared/hyde/hyde.state.d.ts +2 -2
  120. package/dist/shared/interfaces/database.interface.d.ts +62 -59
  121. package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
  122. package/dist/shared/interfaces/database.interface.js.map +1 -1
  123. package/dist/shared/interfaces/embedder.interface.d.ts +2 -2
  124. package/dist/shared/interfaces/embedder.interface.d.ts.map +1 -1
  125. package/dist/shared/interfaces/embedder.interface.js.map +1 -1
  126. package/dist/shared/interfaces/questioner.interface.d.ts +3 -0
  127. package/dist/shared/interfaces/questioner.interface.d.ts.map +1 -1
  128. package/dist/shared/interfaces/questioner.interface.js.map +1 -1
  129. package/dist/shared/schemas/network-assignment.schema.d.ts +2 -2
  130. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"questioner.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/questioner.interface.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,QAAQ,EAAE,YAAY,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAEhJ,kFAAkF;AAClF,MAAM,WAAW,mBAAmB;IAClC,SAAS,EAAE,iBAAiB,CAAC;IAC7B,MAAM,EAAE,aAAa,EAAE,CAAC;IACxB,OA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CAAC,OAAO,CAAC,CAAC;IAErF;;0FAEsF;IACtF,OAAO,CAAC,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAC/D"}
@@ -1 +1 @@
1
- {"version":3,"file":"questioner.interface.js","sourceRoot":"/","sources":["shared/interfaces/questioner.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Protocol-level persistence contract for structured questions generated by\n * the QuestionerAgent. Implementations live in the backend and are injected\n * into ProtocolDeps.\n */\nimport type { Question, QuestionMode, QuestionStrategy, QuestionDetection, QuestionActor, QuestionAnswer } from \"../schemas/question.schema.js\";\n\n/** Shape accepted by `persist()` — everything needed to insert a question row. */\nexport interface PersistableQuestion {\n detection: QuestionDetection;\n actors: QuestionActor[];\n payload: Question;\n strategy: QuestionStrategy;\n /** Conversation ID — set when the question originates from a chat session. */\n conversationId?: string;\n}\n\n/** Shape returned by `findPending()` — a persisted question with its DB id and status. */\nexport interface PersistedQuestion {\n id: string;\n detection: QuestionDetection;\n actors: QuestionActor[];\n payload: Question;\n status: \"pending\" | \"answered\" | \"dismissed\";\n answer: QuestionAnswer | null;\n createdAt: string;\n}\n\n/** Optional filters for `findPending()`. */\nexport interface QuestionFilters {\n mode?: QuestionMode;\n sourceType?: string;\n sourceId?: string;\n}\n\nexport interface QuestionerDatabase {\n /** Persist a batch of generated questions (up to 3 per generation).\n * @returns The IDs of the inserted rows. */\n persist(questions: PersistableQuestion[]): Promise<string[]>;\n\n /** Find pending questions for a user, optionally filtered by mode/source. */\n findPending(userId: string, filters?: QuestionFilters): Promise<PersistedQuestion[]>;\n\n /** Record an answer for a question. Sets status to \"answered\".\n * Only succeeds if the user is an actor on a pending question.\n * @returns `true` if updated, `false` if not found, not pending, or unauthorized. */\n answer(questionId: string, userId: string, answer: QuestionAnswer): Promise<boolean>;\n\n /** Dismiss a question. Sets status to \"dismissed\".\n * Only succeeds if the user is an actor on a pending question.\n * @returns `true` if updated, `false` if not found, not pending, or unauthorized. */\n dismiss(questionId: string, userId: string): Promise<boolean>;\n}\n"]}
1
+ {"version":3,"file":"questioner.interface.js","sourceRoot":"/","sources":["shared/interfaces/questioner.interface.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Protocol-level persistence contract for structured questions generated by\n * the QuestionerAgent. Implementations live in the backend and are injected\n * into ProtocolDeps.\n */\nimport type { Question, QuestionMode, QuestionStrategy, QuestionDetection, QuestionActor, QuestionAnswer } from \"../schemas/question.schema.js\";\n\n/** Shape accepted by `persist()` — everything needed to insert a question row. */\nexport interface PersistableQuestion {\n detection: QuestionDetection;\n actors: QuestionActor[];\n payload: Question;\n strategy: QuestionStrategy;\n /** Conversation ID — set when the question originates from a chat session. */\n conversationId?: string;\n}\n\n/** Shape returned by `findPending()` — a persisted question with its DB id and status. */\nexport interface PersistedQuestion {\n id: string;\n detection: QuestionDetection;\n actors: QuestionActor[];\n payload: Question;\n status: \"pending\" | \"answered\" | \"dismissed\";\n answer: QuestionAnswer | null;\n createdAt: string;\n}\n\n/** Optional filters for `findPending()`. */\nexport interface QuestionFilters {\n mode?: QuestionMode;\n sourceType?: string;\n sourceId?: string;\n /** Optional selected-intent scope. When `scopeType === 'intent'`, `scopeId` is the selected intent id. */\n scopeType?: 'intent';\n scopeId?: string;\n}\n\nexport interface QuestionerDatabase {\n /** Persist a batch of generated questions (up to 3 per generation).\n * @returns The IDs of the inserted rows. */\n persist(questions: PersistableQuestion[]): Promise<string[]>;\n\n /** Find pending questions for a user, optionally filtered by mode/source. */\n findPending(userId: string, filters?: QuestionFilters): Promise<PersistedQuestion[]>;\n\n /** Record an answer for a question. Sets status to \"answered\".\n * Only succeeds if the user is an actor on a pending question.\n * @returns `true` if updated, `false` if not found, not pending, or unauthorized. */\n answer(questionId: string, userId: string, answer: QuestionAnswer): Promise<boolean>;\n\n /** Dismiss a question. Sets status to \"dismissed\".\n * Only succeeds if the user is an actor on a pending question.\n * @returns `true` if updated, `false` if not found, not pending, or unauthorized. */\n dismiss(questionId: string, userId: string): Promise<boolean>;\n}\n"]}
@@ -51,7 +51,7 @@ export declare const NetworkAssignmentMetadataSchema: z.ZodObject<{
51
51
  source: z.ZodOptional<z.ZodString>;
52
52
  createdAt: z.ZodOptional<z.ZodString>;
53
53
  }, "strip", z.ZodTypeAny, {
54
- resourceType: "premise" | "intent";
54
+ resourceType: "intent" | "premise";
55
55
  mode: "automatic" | "manual_override";
56
56
  scope: "network" | "global";
57
57
  policy: "unified-threshold-v1";
@@ -68,7 +68,7 @@ export declare const NetworkAssignmentMetadataSchema: z.ZodObject<{
68
68
  source?: string | undefined;
69
69
  createdAt?: string | undefined;
70
70
  }, {
71
- resourceType: "premise" | "intent";
71
+ resourceType: "intent" | "premise";
72
72
  mode: "automatic" | "manual_override";
73
73
  scope: "network" | "global";
74
74
  policy: "unified-threshold-v1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "4.3.4-rc.309.1",
3
+ "version": "4.3.4-rc.311.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",