@indexnetwork/protocol 4.3.2 → 4.3.3-rc.308.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 (84) hide show
  1. package/dist/chat/chat.prompt.js +1 -1
  2. package/dist/chat/chat.prompt.js.map +1 -1
  3. package/dist/index.d.ts +5 -3
  4. package/dist/index.d.ts.map +1 -1
  5. package/dist/index.js +2 -1
  6. package/dist/index.js.map +1 -1
  7. package/dist/intent/intent.graph.d.ts +10 -0
  8. package/dist/intent/intent.graph.d.ts.map +1 -1
  9. package/dist/intent/intent.graph.js +6 -2
  10. package/dist/intent/intent.graph.js.map +1 -1
  11. package/dist/intent/intent.state.d.ts +4 -0
  12. package/dist/intent/intent.state.d.ts.map +1 -1
  13. package/dist/intent/intent.state.js +10 -0
  14. package/dist/intent/intent.state.js.map +1 -1
  15. package/dist/intent/intent.tools.d.ts.map +1 -1
  16. package/dist/intent/intent.tools.js +7 -0
  17. package/dist/intent/intent.tools.js.map +1 -1
  18. package/dist/mcp/mcp.server.d.ts +44 -15
  19. package/dist/mcp/mcp.server.d.ts.map +1 -1
  20. package/dist/mcp/mcp.server.js +88 -38
  21. package/dist/mcp/mcp.server.js.map +1 -1
  22. package/dist/network/network.graph.js +2 -2
  23. package/dist/network/network.graph.js.map +1 -1
  24. package/dist/opportunity/opportunity.discover.d.ts +5 -0
  25. package/dist/opportunity/opportunity.discover.d.ts.map +1 -1
  26. package/dist/opportunity/opportunity.discover.js +3 -0
  27. package/dist/opportunity/opportunity.discover.js.map +1 -1
  28. package/dist/opportunity/opportunity.graph.d.ts +6 -6
  29. package/dist/opportunity/opportunity.pending-questions.d.ts +3 -0
  30. package/dist/opportunity/opportunity.pending-questions.d.ts.map +1 -1
  31. package/dist/opportunity/opportunity.pending-questions.js +7 -2
  32. package/dist/opportunity/opportunity.pending-questions.js.map +1 -1
  33. package/dist/opportunity/opportunity.state.d.ts +1 -1
  34. package/dist/opportunity/opportunity.tools.d.ts.map +1 -1
  35. package/dist/opportunity/opportunity.tools.js +31 -17
  36. package/dist/opportunity/opportunity.tools.js.map +1 -1
  37. package/dist/premise/premise.graph.d.ts +13 -1
  38. package/dist/premise/premise.graph.d.ts.map +1 -1
  39. package/dist/premise/premise.graph.js +11 -6
  40. package/dist/premise/premise.graph.js.map +1 -1
  41. package/dist/premise/premise.state.d.ts +5 -0
  42. package/dist/premise/premise.state.d.ts.map +1 -1
  43. package/dist/premise/premise.state.js +11 -0
  44. package/dist/premise/premise.state.js.map +1 -1
  45. package/dist/premise/premise.tools.d.ts.map +1 -1
  46. package/dist/premise/premise.tools.js +5 -0
  47. package/dist/premise/premise.tools.js.map +1 -1
  48. package/dist/questioner/questioner.tools.d.ts.map +1 -1
  49. package/dist/questioner/questioner.tools.js +23 -11
  50. package/dist/questioner/questioner.tools.js.map +1 -1
  51. package/dist/questioner/questioner.types.d.ts +5 -0
  52. package/dist/questioner/questioner.types.d.ts.map +1 -1
  53. package/dist/questioner/questioner.types.js.map +1 -1
  54. package/dist/shared/agent/tool.factory.d.ts.map +1 -1
  55. package/dist/shared/agent/tool.factory.js +24 -14
  56. package/dist/shared/agent/tool.factory.js.map +1 -1
  57. package/dist/shared/agent/tool.helpers.d.ts +17 -18
  58. package/dist/shared/agent/tool.helpers.d.ts.map +1 -1
  59. package/dist/shared/agent/tool.helpers.js +10 -11
  60. package/dist/shared/agent/tool.helpers.js.map +1 -1
  61. package/dist/shared/agent/tool.scope.d.ts +27 -0
  62. package/dist/shared/agent/tool.scope.d.ts.map +1 -0
  63. package/dist/shared/agent/tool.scope.js +27 -0
  64. package/dist/shared/agent/tool.scope.js.map +1 -0
  65. package/dist/shared/assignment/network-assignment.policy.d.ts +8 -5
  66. package/dist/shared/assignment/network-assignment.policy.d.ts.map +1 -1
  67. package/dist/shared/assignment/network-assignment.policy.js +11 -6
  68. package/dist/shared/assignment/network-assignment.policy.js.map +1 -1
  69. package/dist/shared/hyde/hyde.graph.d.ts +6 -6
  70. package/dist/shared/hyde/hyde.state.d.ts +2 -2
  71. package/dist/shared/interfaces/database.interface.d.ts +15 -3
  72. package/dist/shared/interfaces/database.interface.d.ts.map +1 -1
  73. package/dist/shared/interfaces/database.interface.js.map +1 -1
  74. package/dist/shared/interfaces/discovery-run.interface.d.ts +1 -1
  75. package/dist/shared/interfaces/discovery-run.interface.d.ts.map +1 -1
  76. package/dist/shared/interfaces/discovery-run.interface.js.map +1 -1
  77. package/dist/shared/interfaces/queue.interface.d.ts +8 -2
  78. package/dist/shared/interfaces/queue.interface.d.ts.map +1 -1
  79. package/dist/shared/interfaces/queue.interface.js.map +1 -1
  80. package/dist/shared/schemas/network-assignment.schema.d.ts +2 -2
  81. package/dist/shared/schemas/pending-question.schema.d.ts +5 -0
  82. package/dist/shared/schemas/pending-question.schema.d.ts.map +1 -1
  83. package/dist/shared/schemas/pending-question.schema.js.map +1 -1
  84. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"queue.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/queue.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAC;QAAC,cAAc,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAC1G,gBAAgB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE"}
1
+ {"version":3,"file":"queue.interface.d.ts","sourceRoot":"/","sources":["shared/interfaces/queue.interface.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AAE5D,MAAM,WAAW,qBAAqB;IACpC,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oFAAoF;IACpF,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,kBAAkB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,GAAG,qBAAqB,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IACzG,gBAAgB,CAAC,IAAI,EAAE;QAAE,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;CAChE"}
@@ -1 +1 @@
1
- {"version":3,"file":"queue.interface.js","sourceRoot":"/","sources":["shared/interfaces/queue.interface.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Queue types for protocol layer.\n */\n\n/**\n * Operations the Intent Graph needs to enqueue follow-up work (e.g. HyDE generation/deletion).\n * Implemented by the intent queue; protocol layer depends only on this interface.\n */\nexport interface IntentGraphQueue {\n addGenerateHydeJob(data: { intentId: string; userId: string; networkScopeId?: string }): Promise<unknown>;\n addDeleteHydeJob(data: { intentId: string }): Promise<unknown>;\n}\n"]}
1
+ {"version":3,"file":"queue.interface.js","sourceRoot":"/","sources":["shared/interfaces/queue.interface.ts"],"names":[],"mappings":"AAAA;;GAEG","sourcesContent":["/**\n * Queue types for protocol layer.\n */\n\nimport type { ToolScopeType } from \"../agent/tool.scope.js\";\n\nexport interface IntentGraphQueueScope {\n scopeType?: ToolScopeType;\n scopeId?: string;\n /** @deprecated networkScopeId is legacy; use `scopeType: 'network'` + `scopeId`. */\n networkScopeId?: string;\n}\n\n/**\n * Operations the Intent Graph needs to enqueue follow-up work (e.g. HyDE generation/deletion).\n * Implemented by the intent queue; protocol layer depends only on this interface.\n */\nexport interface IntentGraphQueue {\n addGenerateHydeJob(data: { intentId: string; userId: string } & IntentGraphQueueScope): Promise<unknown>;\n addDeleteHydeJob(data: { intentId: string }): Promise<unknown>;\n}\n"]}
@@ -53,7 +53,7 @@ export declare const NetworkAssignmentMetadataSchema: z.ZodObject<{
53
53
  }, "strip", z.ZodTypeAny, {
54
54
  resourceType: "premise" | "intent";
55
55
  mode: "automatic" | "manual_override";
56
- scope: "global" | "network";
56
+ scope: "network" | "global";
57
57
  policy: "unified-threshold-v1";
58
58
  threshold: number;
59
59
  promptPresence: "none" | "index" | "member" | "both";
@@ -70,7 +70,7 @@ export declare const NetworkAssignmentMetadataSchema: z.ZodObject<{
70
70
  }, {
71
71
  resourceType: "premise" | "intent";
72
72
  mode: "automatic" | "manual_override";
73
- scope: "global" | "network";
73
+ scope: "network" | "global";
74
74
  policy: "unified-threshold-v1";
75
75
  threshold: number;
76
76
  promptPresence: "none" | "index" | "member" | "both";
@@ -18,5 +18,10 @@ export interface PendingQuestionSummary {
18
18
  sourceId: string;
19
19
  createdAt: string;
20
20
  expiresAt?: string;
21
+ /** Internal actor projection used for defense-in-depth scoped filtering; tool responses strip it before returning. */
22
+ actors?: Array<{
23
+ userId: string;
24
+ networkId?: string;
25
+ }>;
21
26
  }
22
27
  //# sourceMappingURL=pending-question.schema.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"pending-question.schema.d.ts","sourceRoot":"/","sources":["shared/schemas/pending-question.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB"}
1
+ {"version":3,"file":"pending-question.schema.d.ts","sourceRoot":"/","sources":["shared/schemas/pending-question.schema.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEzD,MAAM,WAAW,sBAAsB;IACrC,EAAE,EAAE,MAAM,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,KAAK,CAAC;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACvD,WAAW,EAAE,OAAO,CAAC;IACrB,IAAI,EAAE,YAAY,CAAC;IACnB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,sHAAsH;IACtH,MAAM,CAAC,EAAE,KAAK,CAAC;QAAE,MAAM,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CACxD"}
@@ -1 +1 @@
1
- {"version":3,"file":"pending-question.schema.js","sourceRoot":"/","sources":["shared/schemas/pending-question.schema.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Lightweight projection of a persisted question, suitable for embedding\n * in tool results. Omits internal fields (actors, answer, status) that\n * are not needed by the chat agent or MCP client.\n */\nimport type { QuestionMode } from \"./question.schema.js\";\n\nexport interface PendingQuestionSummary {\n id: string;\n title: string;\n prompt: string;\n options: Array<{ label: string; description: string }>;\n multiSelect: boolean;\n mode: QuestionMode;\n sourceType: string;\n sourceId: string;\n createdAt: string;\n expiresAt?: string;\n}\n"]}
1
+ {"version":3,"file":"pending-question.schema.js","sourceRoot":"/","sources":["shared/schemas/pending-question.schema.ts"],"names":[],"mappings":"","sourcesContent":["/**\n * Lightweight projection of a persisted question, suitable for embedding\n * in tool results. Omits internal fields (actors, answer, status) that\n * are not needed by the chat agent or MCP client.\n */\nimport type { QuestionMode } from \"./question.schema.js\";\n\nexport interface PendingQuestionSummary {\n id: string;\n title: string;\n prompt: string;\n options: Array<{ label: string; description: string }>;\n multiSelect: boolean;\n mode: QuestionMode;\n sourceType: string;\n sourceId: string;\n createdAt: string;\n expiresAt?: string;\n /** Internal actor projection used for defense-in-depth scoped filtering; tool responses strip it before returning. */\n actors?: Array<{ userId: string; networkId?: string }>;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@indexnetwork/protocol",
3
- "version": "4.3.2",
3
+ "version": "4.3.3-rc.308.1",
4
4
  "type": "module",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",