@carlonicora/nestjs-neo4jsonapi 2.0.0 → 2.2.0

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 (152) hide show
  1. package/dist/agents/graph/graph.module.d.ts.map +1 -1
  2. package/dist/agents/graph/graph.module.js +3 -0
  3. package/dist/agents/graph/graph.module.js.map +1 -1
  4. package/dist/agents/graph/interfaces/graph.catalog.interface.d.ts +24 -0
  5. package/dist/agents/graph/interfaces/graph.catalog.interface.d.ts.map +1 -1
  6. package/dist/agents/graph/services/graph.catalog.service.d.ts +9 -0
  7. package/dist/agents/graph/services/graph.catalog.service.d.ts.map +1 -1
  8. package/dist/agents/graph/services/graph.catalog.service.js +61 -1
  9. package/dist/agents/graph/services/graph.catalog.service.js.map +1 -1
  10. package/dist/agents/graph/services/graph.search.service.d.ts +16 -1
  11. package/dist/agents/graph/services/graph.search.service.d.ts.map +1 -1
  12. package/dist/agents/graph/services/graph.search.service.js +51 -4
  13. package/dist/agents/graph/services/graph.search.service.js.map +1 -1
  14. package/dist/agents/graph/services/humanize-tool.d.ts +17 -2
  15. package/dist/agents/graph/services/humanize-tool.d.ts.map +1 -1
  16. package/dist/agents/graph/services/humanize-tool.js +71 -6
  17. package/dist/agents/graph/services/humanize-tool.js.map +1 -1
  18. package/dist/agents/graph/services/materialise-bridge.d.ts +6 -0
  19. package/dist/agents/graph/services/materialise-bridge.d.ts.map +1 -1
  20. package/dist/agents/graph/services/materialise-bridge.js +17 -1
  21. package/dist/agents/graph/services/materialise-bridge.js.map +1 -1
  22. package/dist/agents/graph/services/scope.guard.d.ts +43 -0
  23. package/dist/agents/graph/services/scope.guard.d.ts.map +1 -0
  24. package/dist/agents/graph/services/scope.guard.js +91 -0
  25. package/dist/agents/graph/services/scope.guard.js.map +1 -0
  26. package/dist/agents/graph/tools/read-entity.tool.d.ts +9 -1
  27. package/dist/agents/graph/tools/read-entity.tool.d.ts.map +1 -1
  28. package/dist/agents/graph/tools/read-entity.tool.js +30 -5
  29. package/dist/agents/graph/tools/read-entity.tool.js.map +1 -1
  30. package/dist/agents/graph/tools/resolve-entity.tool.d.ts.map +1 -1
  31. package/dist/agents/graph/tools/resolve-entity.tool.js +8 -1
  32. package/dist/agents/graph/tools/resolve-entity.tool.js.map +1 -1
  33. package/dist/agents/graph/tools/search-entities.tool.d.ts +9 -1
  34. package/dist/agents/graph/tools/search-entities.tool.d.ts.map +1 -1
  35. package/dist/agents/graph/tools/search-entities.tool.js +37 -8
  36. package/dist/agents/graph/tools/search-entities.tool.js.map +1 -1
  37. package/dist/agents/graph/tools/tool.factory.d.ts +4 -0
  38. package/dist/agents/graph/tools/tool.factory.d.ts.map +1 -1
  39. package/dist/agents/graph/tools/tool.factory.js.map +1 -1
  40. package/dist/agents/graph/tools/traverse.tool.d.ts +9 -1
  41. package/dist/agents/graph/tools/traverse.tool.d.ts.map +1 -1
  42. package/dist/agents/graph/tools/traverse.tool.js +21 -5
  43. package/dist/agents/graph/tools/traverse.tool.js.map +1 -1
  44. package/dist/agents/operator/contexts/operator.context.d.ts +4 -0
  45. package/dist/agents/operator/contexts/operator.context.d.ts.map +1 -1
  46. package/dist/agents/operator/contexts/operator.context.js +4 -0
  47. package/dist/agents/operator/contexts/operator.context.js.map +1 -1
  48. package/dist/agents/operator/operator.module.d.ts.map +1 -1
  49. package/dist/agents/operator/operator.module.js +4 -0
  50. package/dist/agents/operator/operator.module.js.map +1 -1
  51. package/dist/agents/operator/services/operator.service.d.ts +8 -0
  52. package/dist/agents/operator/services/operator.service.d.ts.map +1 -1
  53. package/dist/agents/operator/services/operator.service.js +8 -0
  54. package/dist/agents/operator/services/operator.service.js.map +1 -1
  55. package/dist/agents/operator/tools/entity-write.tools.d.ts +124 -0
  56. package/dist/agents/operator/tools/entity-write.tools.d.ts.map +1 -0
  57. package/dist/agents/operator/tools/entity-write.tools.js +471 -0
  58. package/dist/agents/operator/tools/entity-write.tools.js.map +1 -0
  59. package/dist/agents/operator/tools/operator.tool.registry.d.ts +5 -1
  60. package/dist/agents/operator/tools/operator.tool.registry.d.ts.map +1 -1
  61. package/dist/agents/operator/tools/operator.tool.registry.js +19 -2
  62. package/dist/agents/operator/tools/operator.tool.registry.js.map +1 -1
  63. package/dist/agents/operator/tools/search-documents.tool.d.ts +16 -1
  64. package/dist/agents/operator/tools/search-documents.tool.d.ts.map +1 -1
  65. package/dist/agents/operator/tools/search-documents.tool.js +59 -3
  66. package/dist/agents/operator/tools/search-documents.tool.js.map +1 -1
  67. package/dist/agents/prompts/index.d.ts +1 -0
  68. package/dist/agents/prompts/index.d.ts.map +1 -1
  69. package/dist/agents/prompts/index.js +7 -1
  70. package/dist/agents/prompts/index.js.map +1 -1
  71. package/dist/agents/responder/contexts/responder.context.d.ts +12 -0
  72. package/dist/agents/responder/contexts/responder.context.d.ts.map +1 -1
  73. package/dist/agents/responder/contexts/responder.context.js +4 -0
  74. package/dist/agents/responder/contexts/responder.context.js.map +1 -1
  75. package/dist/agents/responder/factories/responder.context.factory.d.ts +4 -0
  76. package/dist/agents/responder/factories/responder.context.factory.d.ts.map +1 -1
  77. package/dist/agents/responder/factories/responder.context.factory.js +2 -0
  78. package/dist/agents/responder/factories/responder.context.factory.js.map +1 -1
  79. package/dist/agents/responder/nodes/graph.node.service.d.ts.map +1 -1
  80. package/dist/agents/responder/nodes/graph.node.service.js +18 -2
  81. package/dist/agents/responder/nodes/graph.node.service.js.map +1 -1
  82. package/dist/agents/responder/nodes/responder.answer.node.service.d.ts +32 -0
  83. package/dist/agents/responder/nodes/responder.answer.node.service.d.ts.map +1 -1
  84. package/dist/agents/responder/nodes/responder.answer.node.service.js +31 -19
  85. package/dist/agents/responder/nodes/responder.answer.node.service.js.map +1 -1
  86. package/dist/agents/responder/services/responder.service.d.ts +4 -0
  87. package/dist/agents/responder/services/responder.service.d.ts.map +1 -1
  88. package/dist/agents/responder/services/responder.service.js +2 -0
  89. package/dist/agents/responder/services/responder.service.js.map +1 -1
  90. package/dist/common/interfaces/entity.schema.interface.d.ts +16 -0
  91. package/dist/common/interfaces/entity.schema.interface.d.ts.map +1 -1
  92. package/dist/config/interfaces/config.prompts.interface.d.ts +12 -0
  93. package/dist/config/interfaces/config.prompts.interface.d.ts.map +1 -1
  94. package/dist/core/blocknote/services/blocknote.service.d.ts +23 -14
  95. package/dist/core/blocknote/services/blocknote.service.d.ts.map +1 -1
  96. package/dist/core/blocknote/services/blocknote.service.js +48 -32
  97. package/dist/core/blocknote/services/blocknote.service.js.map +1 -1
  98. package/dist/core/email/email.helpers.d.ts +18 -0
  99. package/dist/core/email/email.helpers.d.ts.map +1 -0
  100. package/dist/core/email/email.helpers.js +50 -0
  101. package/dist/core/email/email.helpers.js.map +1 -0
  102. package/dist/core/email/index.d.ts +1 -0
  103. package/dist/core/email/index.d.ts.map +1 -1
  104. package/dist/core/email/index.js +2 -0
  105. package/dist/core/email/index.js.map +1 -1
  106. package/dist/core/email/services/email.service.d.ts.map +1 -1
  107. package/dist/core/email/services/email.service.js +4 -4
  108. package/dist/core/email/services/email.service.js.map +1 -1
  109. package/dist/core/llm/services/llm.service.d.ts.map +1 -1
  110. package/dist/core/llm/services/llm.service.js +34 -2
  111. package/dist/core/llm/services/llm.service.js.map +1 -1
  112. package/dist/core/llm/services/tool-error-feedback.d.ts +40 -0
  113. package/dist/core/llm/services/tool-error-feedback.d.ts.map +1 -0
  114. package/dist/core/llm/services/tool-error-feedback.js +131 -0
  115. package/dist/core/llm/services/tool-error-feedback.js.map +1 -0
  116. package/dist/foundations/assistant/assistant.module.d.ts.map +1 -1
  117. package/dist/foundations/assistant/assistant.module.js +7 -1
  118. package/dist/foundations/assistant/assistant.module.js.map +1 -1
  119. package/dist/foundations/assistant/controllers/assistant.controller.d.ts +13 -1
  120. package/dist/foundations/assistant/controllers/assistant.controller.d.ts.map +1 -1
  121. package/dist/foundations/assistant/controllers/assistant.controller.js +37 -3
  122. package/dist/foundations/assistant/controllers/assistant.controller.js.map +1 -1
  123. package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts +6 -0
  124. package/dist/foundations/assistant/dtos/assistant-append.dto.d.ts.map +1 -1
  125. package/dist/foundations/assistant/dtos/assistant-append.dto.js +1 -1
  126. package/dist/foundations/assistant/dtos/assistant-append.dto.js.map +1 -1
  127. package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts +29 -0
  128. package/dist/foundations/assistant/dtos/assistant-post.dto.d.ts.map +1 -1
  129. package/dist/foundations/assistant/dtos/assistant-post.dto.js +47 -2
  130. package/dist/foundations/assistant/dtos/assistant-post.dto.js.map +1 -1
  131. package/dist/foundations/assistant/repositories/assistant.repository.d.ts +22 -0
  132. package/dist/foundations/assistant/repositories/assistant.repository.d.ts.map +1 -1
  133. package/dist/foundations/assistant/repositories/assistant.repository.js +28 -0
  134. package/dist/foundations/assistant/repositories/assistant.repository.js.map +1 -1
  135. package/dist/foundations/assistant/services/assistant-mention.extractor.d.ts +36 -0
  136. package/dist/foundations/assistant/services/assistant-mention.extractor.d.ts.map +1 -0
  137. package/dist/foundations/assistant/services/assistant-mention.extractor.js +99 -0
  138. package/dist/foundations/assistant/services/assistant-mention.extractor.js.map +1 -0
  139. package/dist/foundations/assistant/services/assistant.service.d.ts +84 -2
  140. package/dist/foundations/assistant/services/assistant.service.d.ts.map +1 -1
  141. package/dist/foundations/assistant/services/assistant.service.js +312 -60
  142. package/dist/foundations/assistant/services/assistant.service.js.map +1 -1
  143. package/dist/foundations/auth/services/auth.service.d.ts.map +1 -1
  144. package/dist/foundations/auth/services/auth.service.js +2 -0
  145. package/dist/foundations/auth/services/auth.service.js.map +1 -1
  146. package/dist/foundations/user/services/user.service.d.ts.map +1 -1
  147. package/dist/foundations/user/services/user.service.js +3 -0
  148. package/dist/foundations/user/services/user.service.js.map +1 -1
  149. package/dist/foundations/waitlist/services/waitlist.service.d.ts.map +1 -1
  150. package/dist/foundations/waitlist/services/waitlist.service.js +2 -0
  151. package/dist/foundations/waitlist/services/waitlist.service.js.map +1 -1
  152. package/package.json +1 -1
@@ -1,6 +1,7 @@
1
1
  import { DynamicStructuredTool } from "@langchain/core/tools";
2
2
  import { z } from "zod";
3
3
  import { ContextualiserService } from "../../contextualiser/services/contextualiser.service";
4
+ import { ScopeGuard } from "../../graph/services/scope.guard";
4
5
  import { ToolCallRecord, ToolFactory } from "../../graph/tools/tool.factory";
5
6
  import { OperatorRetrievalContext } from "../interfaces/operator.tool.interface";
6
7
  declare const inputSchema: z.ZodObject<{
@@ -10,8 +11,22 @@ export { inputSchema as searchDocumentsInputSchema };
10
11
  export declare class SearchDocumentsTool {
11
12
  private readonly factory;
12
13
  private readonly contextualiserService;
13
- constructor(factory: ToolFactory, contextualiserService: ContextualiserService);
14
+ private readonly scopeGuard;
15
+ constructor(factory: ToolFactory, contextualiserService: ContextualiserService, scopeGuard: ScopeGuard);
14
16
  build(ctx: OperatorRetrievalContext, recorder: ToolCallRecord[]): DynamicStructuredTool;
15
17
  invoke(input: z.infer<typeof inputSchema>, ctx: OperatorRetrievalContext, recorder: ToolCallRecord[]): Promise<string>;
18
+ /**
19
+ * Enforcement point: a scoped run must not read passages whose source record
20
+ * lives under another scope root.
21
+ *
22
+ * Retrieved passages carry their provenance in the opaque `metadata` bag the
23
+ * contributing retrieval source filled in. Entries that name a source record
24
+ * are grouped by type and checked with ONE ScopeGuard.filter call per type
25
+ * (never one per chunk). Entries that name no source record are plain
26
+ * document chunks with no entity provenance to test — they are company-wide
27
+ * material (help content and the like) and are left alone; scoping them is
28
+ * only possible once a retrieval source tags them.
29
+ */
30
+ private dropOutOfScope;
16
31
  }
17
32
  //# sourceMappingURL=search-documents.tool.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-documents.tool.d.ts","sourceRoot":"","sources":["../../../../src/agents/operator/tools/search-documents.tool.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAA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B,OAAO,CAAC,QAAQ,CAAC,qBAAqB;IAGtC,OAAO,CAAC,QAAQ,CAAC,UAAU;gBAJV,OAAO,EAAE,WAAW,EACpB,qBAAqB,EAAE,qBAAqB,EAG5C,UAAU,EAAE,UAAU;IAGzC,KAAK,CAAC,GAAG,EAAE,wBAAwB,EAAE,QAAQ,EAAE,cAAc,EAAE,GAAG,qBAAqB;IAUjF,MAAM,CACV,KAAK,EAAE,CAAC,CAAC,KAAK,CAAC,OAAO,WAAW,CAAC,EAClC,GAAG,EAAE,wBAAwB,EAC7B,QAAQ,EAAE,cAAc,EAAE,GACzB,OAAO,CAAC,MAAM,CAAC;IAwClB;;;;;;;;;;;OAWG;YACW,cAAc;CAwC7B"}
@@ -14,6 +14,7 @@ const tools_1 = require("@langchain/core/tools");
14
14
  const common_1 = require("@nestjs/common");
15
15
  const zod_1 = require("zod");
16
16
  const contextualiser_service_1 = require("../../contextualiser/services/contextualiser.service");
17
+ const scope_guard_1 = require("../../graph/services/scope.guard");
17
18
  const tool_factory_1 = require("../../graph/tools/tool.factory");
18
19
  const inputSchema = zod_1.z.object({
19
20
  question: zod_1.z.string().describe("The natural-language question to answer from the company's documents."),
@@ -21,9 +22,13 @@ const inputSchema = zod_1.z.object({
21
22
  exports.searchDocumentsInputSchema = inputSchema;
22
23
  const NO_INFORMATION_MESSAGE = "No information found in the company documents for this question.";
23
24
  let SearchDocumentsTool = class SearchDocumentsTool {
24
- constructor(factory, contextualiserService) {
25
+ constructor(factory, contextualiserService,
26
+ // ScopeGuard is deliberately the LAST constructor parameter so existing
27
+ // positional call sites keep working.
28
+ scopeGuard) {
25
29
  this.factory = factory;
26
30
  this.contextualiserService = contextualiserService;
31
+ this.scopeGuard = scopeGuard;
27
32
  }
28
33
  build(ctx, recorder) {
29
34
  return new tools_1.DynamicStructuredTool({
@@ -49,7 +54,7 @@ let SearchDocumentsTool = class SearchDocumentsTool {
49
54
  messages: ctx.messages,
50
55
  question: input.question,
51
56
  });
52
- const notebook = state.notebook ?? [];
57
+ const notebook = await this.dropOutOfScope(state.notebook ?? [], ctx);
53
58
  return {
54
59
  answer: notebook.length
55
60
  ? notebook.map((n) => `${n.chunkId}: ${n.content}`).join("\n")
@@ -67,11 +72,62 @@ let SearchDocumentsTool = class SearchDocumentsTool {
67
72
  recorder.push(...local);
68
73
  }
69
74
  }
75
+ /**
76
+ * Enforcement point: a scoped run must not read passages whose source record
77
+ * lives under another scope root.
78
+ *
79
+ * Retrieved passages carry their provenance in the opaque `metadata` bag the
80
+ * contributing retrieval source filled in. Entries that name a source record
81
+ * are grouped by type and checked with ONE ScopeGuard.filter call per type
82
+ * (never one per chunk). Entries that name no source record are plain
83
+ * document chunks with no entity provenance to test — they are company-wide
84
+ * material (help content and the like) and are left alone; scoping them is
85
+ * only possible once a retrieval source tags them.
86
+ */
87
+ async dropOutOfScope(entries, ctx) {
88
+ if (!ctx.scopeId || !ctx.scopeType)
89
+ return entries;
90
+ if (entries.length === 0)
91
+ return entries;
92
+ const sourceOf = (entry) => {
93
+ const metadata = entry.metadata ?? {};
94
+ const type = metadata.entityType ?? metadata.sourceType ?? metadata.type;
95
+ const id = metadata.entityId ?? metadata.sourceId ?? metadata.id;
96
+ return typeof type === "string" && type && typeof id === "string" && id ? { type, id } : undefined;
97
+ };
98
+ const byType = new Map();
99
+ for (const entry of entries) {
100
+ const source = sourceOf(entry);
101
+ if (!source)
102
+ continue;
103
+ const ids = byType.get(source.type) ?? new Set();
104
+ ids.add(source.id);
105
+ byType.set(source.type, ids);
106
+ }
107
+ if (byType.size === 0)
108
+ return entries;
109
+ const allowed = new Map();
110
+ for (const [type, ids] of byType) {
111
+ const kept = await this.scopeGuard.filter({
112
+ type,
113
+ records: Array.from(ids).map((id) => ({ id })),
114
+ ctx,
115
+ });
116
+ allowed.set(type, new Set(kept.map((record) => record.id)));
117
+ }
118
+ return entries.filter((entry) => {
119
+ const source = sourceOf(entry);
120
+ if (!source)
121
+ return true;
122
+ return allowed.get(source.type)?.has(source.id) ?? false;
123
+ });
124
+ }
70
125
  };
71
126
  exports.SearchDocumentsTool = SearchDocumentsTool;
72
127
  exports.SearchDocumentsTool = SearchDocumentsTool = __decorate([
73
128
  (0, common_1.Injectable)(),
74
129
  __metadata("design:paramtypes", [tool_factory_1.ToolFactory,
75
- contextualiser_service_1.ContextualiserService])
130
+ contextualiser_service_1.ContextualiserService,
131
+ scope_guard_1.ScopeGuard])
76
132
  ], SearchDocumentsTool);
77
133
  //# sourceMappingURL=search-documents.tool.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"search-documents.tool.js","sourceRoot":"","sources":["../../../../src/agents/operator/tools/search-documents.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8D;AAC9D,2CAA4C;AAC5C,6BAAwB;AACxB,iGAA6F;AAC7F,iEAA6E;AAG7E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;CACvG,CAAC,CAAC;AAEqB,iDAA0B;AAElD,MAAM,sBAAsB,GAAG,kEAAkE,CAAC;AAG3F,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,OAAoB,EACpB,qBAA4C;QAD5C,YAAO,GAAP,OAAO,CAAa;QACpB,0BAAqB,GAArB,qBAAqB,CAAuB;IAC5D,CAAC;IAEJ,KAAK,CAAC,GAA6B,EAAE,QAA0B;QAC7D,OAAO,IAAI,6BAAqB,CAAC;YAC/B,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACT,iJAAiJ;YACnJ,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC;SACzD,CAAC,CAAC;IACL,CAAC;IAED,KAAK,CAAC,MAAM,CACV,KAAkC,EAClC,GAA6B,EAC7B,QAA0B;QAE1B,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AAM,CAAC,SAAS,CAAC;YACxC,CAAC;YACD,OAAO,MAAM,CAAC,MAAM,CAAC;QACvB,CAAC;gBAAS,CAAC;YACT,yFAAyF;YACzF,QAAQ,CAAC,IAAI,CAAC,GAAG,KAAK,CAAC,CAAC;QAC1B,CAAC;IACH,CAAC;CACF,CAAA;AA3DY,kDAAmB;8BAAnB,mBAAmB;IAD/B,IAAA,mBAAU,GAAE;qCAGiB,0BAAW;QACG,8CAAqB;GAHpD,mBAAmB,CA2D/B"}
1
+ {"version":3,"file":"search-documents.tool.js","sourceRoot":"","sources":["../../../../src/agents/operator/tools/search-documents.tool.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAA8D;AAC9D,2CAA4C;AAC5C,6BAAwB;AACxB,iGAA6F;AAC7F,kEAA8D;AAC9D,iEAA6E;AAG7E,MAAM,WAAW,GAAG,OAAC,CAAC,MAAM,CAAC;IAC3B,QAAQ,EAAE,OAAC,CAAC,MAAM,EAAE,CAAC,QAAQ,CAAC,uEAAuE,CAAC;CACvG,CAAC,CAAC;AAEqB,iDAA0B;AAElD,MAAM,sBAAsB,GAAG,kEAAkE,CAAC;AAG3F,IAAM,mBAAmB,GAAzB,MAAM,mBAAmB;IAC9B,YACmB,OAAoB,EACpB,qBAA4C;IAC7D,wEAAwE;IACxE,sCAAsC;IACrB,UAAsB;QAJtB,YAAO,GAAP,OAAO,CAAa;QACpB,0BAAqB,GAArB,qBAAqB,CAAuB;QAG5C,eAAU,GAAV,UAAU,CAAY;IACtC,CAAC;IAEJ,KAAK,CAAC,GAA6B,EAAE,QAA0B;QAC7D,OAAO,IAAI,6BAAqB,CAAC;YAC/B,IAAI,EAAE,kBAAkB;YACxB,WAAW,EACT,iJAAiJ;YACnJ,MAAM,EAAE,WAAW;YACnB,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,GAAG,EAAE,QAAQ,CAAC;SACzD,CAAC,CAAC;IACL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;IAD/B,IAAA,mBAAU,GAAE;qCAGiB,0BAAW;QACG,8CAAqB;QAGhC,wBAAU;GAN9B,mBAAmB,CAmH/B"}
@@ -2,6 +2,7 @@ export { defaultGraphCreatorPrompt } from "../graph.creator/services/graph.creat
2
2
  export { prompt as graphCreatorPrompt } from "../graph.creator/services/graph.creator.service";
3
3
  export { defaultAnswerPrompt as defaultResponderAnswerPrompt } from "../responder/nodes/responder.answer.node.service";
4
4
  export { defaultAnswerPrompt } from "../responder/nodes/responder.answer.node.service";
5
+ export { buildResponderOutputSchema, defaultResponderAnalyseDescription, defaultResponderFinalAnswerDescription, } from "../responder/nodes/responder.answer.node.service";
5
6
  export { defaultQuestionRefinerPrompt } from "../contextualiser/nodes/question.refiner.node.service";
6
7
  export { defaultRationalPlanPrompt } from "../contextualiser/nodes/rational.node.service";
7
8
  export { defaultKeyConceptsPrompt } from "../contextualiser/nodes/keyconcepts.node.service";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAE5F,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAGvF,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAG7F,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/agents/prompts/index.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,MAAM,iDAAiD,CAAC;AAE5F,OAAO,EAAE,MAAM,IAAI,kBAAkB,EAAE,MAAM,iDAAiD,CAAC;AAC/F,OAAO,EAAE,mBAAmB,IAAI,4BAA4B,EAAE,MAAM,kDAAkD,CAAC;AAEvH,OAAO,EAAE,mBAAmB,EAAE,MAAM,kDAAkD,CAAC;AAGvF,OAAO,EACL,0BAA0B,EAC1B,kCAAkC,EAClC,sCAAsC,GACvC,MAAM,kDAAkD,CAAC;AAG1D,OAAO,EAAE,4BAA4B,EAAE,MAAM,uDAAuD,CAAC;AACrG,OAAO,EAAE,yBAAyB,EAAE,MAAM,+CAA+C,CAAC;AAC1F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,wBAAwB,EAAE,MAAM,mDAAmD,CAAC;AAG7F,OAAO,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC"}
@@ -2,7 +2,7 @@
2
2
  // Prompt configuration is now via baseConfig.prompts (see ConfigPromptsInterface)
3
3
  // This file exports the default prompts for reference
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.defaultTldrPrompt = exports.defaultCombinePrompt = exports.defaultMapPrompt = exports.defaultChunkVectorPrompt = exports.defaultChunkPrompt = exports.defaultAtomicFactsPrompt = exports.defaultKeyConceptsPrompt = exports.defaultRationalPlanPrompt = exports.defaultQuestionRefinerPrompt = exports.defaultAnswerPrompt = exports.defaultResponderAnswerPrompt = exports.graphCreatorPrompt = exports.defaultGraphCreatorPrompt = void 0;
5
+ exports.defaultTldrPrompt = exports.defaultCombinePrompt = exports.defaultMapPrompt = exports.defaultChunkVectorPrompt = exports.defaultChunkPrompt = exports.defaultAtomicFactsPrompt = exports.defaultKeyConceptsPrompt = exports.defaultRationalPlanPrompt = exports.defaultQuestionRefinerPrompt = exports.defaultResponderFinalAnswerDescription = exports.defaultResponderAnalyseDescription = exports.buildResponderOutputSchema = exports.defaultAnswerPrompt = exports.defaultResponderAnswerPrompt = exports.graphCreatorPrompt = exports.defaultGraphCreatorPrompt = void 0;
6
6
  // Default prompts - re-exported from services for reference
7
7
  var graph_creator_service_1 = require("../graph.creator/services/graph.creator.service");
8
8
  Object.defineProperty(exports, "defaultGraphCreatorPrompt", { enumerable: true, get: function () { return graph_creator_service_1.defaultGraphCreatorPrompt; } });
@@ -14,6 +14,12 @@ Object.defineProperty(exports, "defaultResponderAnswerPrompt", { enumerable: tru
14
14
  // Also exported under its own name — app-side prompt overrides reference it directly.
15
15
  var responder_answer_node_service_2 = require("../responder/nodes/responder.answer.node.service");
16
16
  Object.defineProperty(exports, "defaultAnswerPrompt", { enumerable: true, get: function () { return responder_answer_node_service_2.defaultAnswerPrompt; } });
17
+ // Responder answer-node structured-output description defaults — apps that
18
+ // override `prompts.responderSchemaDescriptions` can reference these.
19
+ var responder_answer_node_service_3 = require("../responder/nodes/responder.answer.node.service");
20
+ Object.defineProperty(exports, "buildResponderOutputSchema", { enumerable: true, get: function () { return responder_answer_node_service_3.buildResponderOutputSchema; } });
21
+ Object.defineProperty(exports, "defaultResponderAnalyseDescription", { enumerable: true, get: function () { return responder_answer_node_service_3.defaultResponderAnalyseDescription; } });
22
+ Object.defineProperty(exports, "defaultResponderFinalAnswerDescription", { enumerable: true, get: function () { return responder_answer_node_service_3.defaultResponderFinalAnswerDescription; } });
17
23
  // Contextualiser default prompts
18
24
  var question_refiner_node_service_1 = require("../contextualiser/nodes/question.refiner.node.service");
19
25
  Object.defineProperty(exports, "defaultQuestionRefinerPrompt", { enumerable: true, get: function () { return question_refiner_node_service_1.defaultQuestionRefinerPrompt; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/prompts/index.ts"],"names":[],"mappings":";AAAA,kFAAkF;AAClF,sDAAsD;;;AAEtD,4DAA4D;AAC5D,yFAA4F;AAAnF,kIAAA,yBAAyB,OAAA;AAClC,oFAAoF;AACpF,yFAA+F;AAAtF,2HAAA,MAAM,OAAsB;AACrC,kGAAuH;AAA9G,6IAAA,mBAAmB,OAAgC;AAC5D,sFAAsF;AACtF,kGAAuF;AAA9E,oIAAA,mBAAmB,OAAA;AAE5B,iCAAiC;AACjC,uGAAqG;AAA5F,6IAAA,4BAA4B,OAAA;AACrC,uFAA0F;AAAjF,kIAAA,yBAAyB,OAAA;AAClC,6FAA4F;AAAnF,oIAAA,wBAAwB,OAAA;AACjC,6FAA4F;AAAnF,oIAAA,wBAAwB,OAAA;AACjC,iFAAgF;AAAvE,wHAAA,kBAAkB,OAAA;AAC3B,+FAA6F;AAApF,qIAAA,wBAAwB,OAAA;AAEjC,6BAA6B;AAC7B,gFAAsH;AAA7G,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAAE,uHAAA,iBAAiB,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/agents/prompts/index.ts"],"names":[],"mappings":";AAAA,kFAAkF;AAClF,sDAAsD;;;AAEtD,4DAA4D;AAC5D,yFAA4F;AAAnF,kIAAA,yBAAyB,OAAA;AAClC,oFAAoF;AACpF,yFAA+F;AAAtF,2HAAA,MAAM,OAAsB;AACrC,kGAAuH;AAA9G,6IAAA,mBAAmB,OAAgC;AAC5D,sFAAsF;AACtF,kGAAuF;AAA9E,oIAAA,mBAAmB,OAAA;AAC5B,2EAA2E;AAC3E,sEAAsE;AACtE,kGAI0D;AAHxD,2IAAA,0BAA0B,OAAA;AAC1B,mJAAA,kCAAkC,OAAA;AAClC,uJAAA,sCAAsC,OAAA;AAGxC,iCAAiC;AACjC,uGAAqG;AAA5F,6IAAA,4BAA4B,OAAA;AACrC,uFAA0F;AAAjF,kIAAA,yBAAyB,OAAA;AAClC,6FAA4F;AAAnF,oIAAA,wBAAwB,OAAA;AACjC,6FAA4F;AAAnF,oIAAA,wBAAwB,OAAA;AACjC,iFAAgF;AAAvE,wHAAA,kBAAkB,OAAA;AAC3B,+FAA6F;AAApF,qIAAA,wBAAwB,OAAA;AAEjC,6BAA6B;AAC7B,gFAAsH;AAA7G,sHAAA,gBAAgB,OAAA;AAAE,0HAAA,oBAAoB,OAAA;AAAE,uHAAA,iBAAiB,OAAA"}
@@ -20,6 +20,18 @@ export declare const ResponderContext: import("@langchain/langgraph").Annotation
20
20
  (): import("@langchain/langgraph").LastValue<string>;
21
21
  Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
22
22
  };
23
+ /** Id of the scope-root node the whole run is confined to. Absent = unscoped. */
24
+ scopeId: {
25
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
26
+ (): import("@langchain/langgraph").LastValue<string>;
27
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
28
+ };
29
+ /** JSON:API type of the scope root, e.g. "campaigns". Present iff scopeId is. */
30
+ scopeType: {
31
+ (annotation: import("@langchain/langgraph").SingleReducer<string, string>): import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
32
+ (): import("@langchain/langgraph").LastValue<string>;
33
+ Root: <S extends import("@langchain/langgraph").StateDefinition>(sd: S) => import("@langchain/langgraph").AnnotationRoot<S>;
34
+ };
23
35
  dataLimits: import("@langchain/langgraph").LastValue<DataLimits>;
24
36
  context: import("@langchain/langgraph").BaseChannel<import("@langchain/langgraph").StateType<{
25
37
  companyId: import("@langchain/langgraph").BaseChannel<string, string | import("@langchain/langgraph").OverwriteValue<string>, unknown>;
@@ -1 +1 @@
1
- {"version":3,"file":"responder.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/contexts/responder.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,oDAAoD,CAAC;AAC1F,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAEhF,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uCAAuC,CAAC;AAE1E,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAwCf,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;;;;;;;;;;;;;;EAwBnB,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,gBAAgB,CAAC,KAAK,CAAC"}
1
+ {"version":3,"file":"responder.context.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/contexts/responder.context.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,2CAA2C,CAAC;AAG9E,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAC/D,OAAO,EAAE,gBAAgB,EAAE,MAAM,8CAA8C,CAAC;AAChF,OAAO,KAAK,EAAE,eAAe,EAAE,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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;sBAqCrE,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;;sBAHP,OAAO;+BACE,OAAO;sBAChB,OAAO;uBACN,MAAM;;;;;;;;;;;;;;;EAwBnB,CAAC;AAEH,MAAM,MAAM,qBAAqB,GAAG,OAAO,gBAAgB,CAAC,KAAK,CAAC"}
@@ -7,6 +7,10 @@ exports.ResponderContext = langgraph_1.Annotation.Root({
7
7
  companyId: (langgraph_1.Annotation),
8
8
  contentId: (langgraph_1.Annotation),
9
9
  contentType: (langgraph_1.Annotation),
10
+ /** Id of the scope-root node the whole run is confined to. Absent = unscoped. */
11
+ scopeId: (langgraph_1.Annotation),
12
+ /** JSON:API type of the scope root, e.g. "campaigns". Present iff scopeId is. */
13
+ scopeType: (langgraph_1.Annotation),
10
14
  dataLimits: (0, langgraph_1.Annotation)(),
11
15
  context: (0, langgraph_1.Annotation)({
12
16
  default: () => undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"responder.context.js","sourceRoot":"","sources":["../../../../src/agents/responder/contexts/responder.context.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAYrC,QAAA,gBAAgB,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC9C,WAAW;IACX,SAAS,EAAE,CAAA,sBAAkB,CAAA;IAC7B,SAAS,EAAE,CAAA,sBAA8B,CAAA;IACzC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O,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,OAAO,EAAE,CAAC,EAAE,EAAE,CAAC,EAAE,EAAE,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC;IAC3F,KAAK,EAAE,IAAA,sBAAU,EAAe;QAC9B,OAAO,EAAE,GAAG,EAAE,CACZ,CAAC;YACC,OAAO,EAAE;gBACP,SAAS,EAAE,EAAE;gBACb,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC1E,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;aAChC;YACD,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7D,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;SACrC,CAAiB;QACpB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;KAC1D,CAAC;CACH,CAAC,CAAC"}
1
+ {"version":3,"file":"responder.context.js","sourceRoot":"","sources":["../../../../src/agents/responder/contexts/responder.context.ts"],"names":[],"mappings":";;;AAAA,oDAAkD;AAYrC,QAAA,gBAAgB,GAAG,sBAAU,CAAC,IAAI,CAAC;IAC9C,WAAW;IACX,SAAS,EAAE,CAAA,sBAAkB,CAAA;IAC7B,SAAS,EAAE,CAAA,sBAA8B,CAAA;IACzC,WAAW,EAAE,CAAA,sBAA8B,CAAA;IAC3C,iFAAiF;IACjF,OAAO,EAAE,CAAA,sBAA8B,CAAA;IACvC,iFAAiF;IACjF,SAAS,EAAE,CAAA,sBAA8B,CAAA;IACzC,UAAU,EAAE,IAAA,sBAAU,GAAc;IACpC,OAAO,EAAE,IAAA,s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,IAAI,EAAE,EAAE,CAAC;IAC3F,KAAK,EAAE,IAAA,sBAAU,EAAe;QAC9B,OAAO,EAAE,GAAG,EAAE,CACZ,CAAC;YACC,OAAO,EAAE;gBACP,SAAS,EAAE,EAAE;gBACb,UAAU,EAAE,EAAE,QAAQ,EAAE,KAAK,EAAE,iBAAiB,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE;gBAC1E,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;aAChC;YACD,MAAM,EAAE,EAAE,YAAY,EAAE,EAAE,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;YAC7D,WAAW,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;SACrC,CAAiB;QACpB,OAAO,EAAE,CAAC,OAAO,EAAE,MAAM,EAAE,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;KAC1D,CAAC;CACH,CAAC,CAAC"}
@@ -10,6 +10,10 @@ export declare class ResponderContextFactoryService {
10
10
  contentId?: string;
11
11
  contentType?: string;
12
12
  dataLimits: DataLimits;
13
+ /** Id of the scope-root node the whole run is confined to. Absent = unscoped. */
14
+ scopeId?: string;
15
+ /** JSON:API type of the scope root, e.g. "campaigns". Present iff scopeId is. */
16
+ scopeType?: string;
13
17
  }): ResponderContextState;
14
18
  createAnswer(params: {
15
19
  state: ResponderContextState;
@@ -1 +1 @@
1
- {"version":3,"file":"responder.context.factory.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/factories/responder.context.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,qBACa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,mCAAmC;gBAAnC,mCAAmC,EAAE,mCAAmC;IAErG,MAAM,CAAC,MAAM,EAAE;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC;KACxB,GAAG,qBAAqB;IAezB,YAAY,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,qBAAqB,CAAA;KAAE,GAAG,0BAA0B;CAgCnF"}
1
+ {"version":3,"file":"responder.context.factory.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/factories/responder.context.factory.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mCAAmC,EAAE,MAAM,+DAA+D,CAAC;AACpH,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AACtE,OAAO,EAAE,0BAA0B,EAAE,MAAM,4CAA4C,CAAC;AAExF,OAAO,EAAE,UAAU,EAAE,MAAM,mCAAmC,CAAC;AAE/D,qBACa,8BAA8B;IAC7B,OAAO,CAAC,QAAQ,CAAC,mCAAmC;gBAAnC,mCAAmC,EAAE,mCAAmC;IAErG,MAAM,CAAC,MAAM,EAAE;QACb,SAAS,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,MAAM,CAAC;QACnB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,EAAE,UAAU,CAAC;QACvB,iFAAiF;QACjF,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,iFAAiF;QACjF,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,GAAG,qBAAqB;IAiBzB,YAAY,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,qBAAqB,CAAA;KAAE,GAAG,0BAA0B;CAgCnF"}
@@ -22,6 +22,8 @@ let ResponderContextFactoryService = class ResponderContextFactoryService {
22
22
  companyId: params.companyId,
23
23
  contentId: params.contentId,
24
24
  contentType: params.contentType,
25
+ scopeId: params.scopeId,
26
+ scopeType: params.scopeType,
25
27
  dataLimits: params.dataLimits,
26
28
  driftContext: undefined,
27
29
  context: undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"responder.context.factory.js","sourceRoot":"","sources":["../../../../src/agents/responder/factories/responder.context.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kHAAoH;AAGpH,+EAA2E;AAIpE,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACzC,YAA6B,mCAAwE;QAAxE,wCAAmC,GAAnC,mCAAmC,CAAqC;IAAG,CAAC;IAEzG,MAAM,CAAC,MAKN;QACC,OAAO;YACL,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,WAAW,EAAE,MAAM,CAAC,WAAW;YAC/B,UAAU,EAAE,MAAM,CAAC,UAAU;YAC7B,YAAY,EAAE,SAAS;YACvB,OAAO,EAAE,SAAS;YAClB,MAAM,EAAE,SAAS;YACjB,WAAW,EAAE,SAAS;YACtB,OAAO,EAAE,SAAS;YAClB,UAAU,EAAE,SAAS;SACG,CAAC;IAC7B,CAAC;IAED,YAAY,CAAC,MAAwC;QACnD,MAAM,CAAC,GAAG,MAAM,CAAC,KAAK,CAAC;QACvB,OAAO;YACL,IAAI,EAAE,oCAAgB,CAAC,SAAS;YAChC,OAAO,EAAE,CAAC,CAAC,OAAO;gBAChB,CAAC,CAAC,IAAI,CAAC,mCAAmC,CAAC,YAAY,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC;gBAC7E,CAAC,CAAC;oBACE,IAAI,EAAE,oCAAgB,CAAC,SAAS;oBAChC,YAAY,EAAE,EAAE;oBAChB,WAAW,EAAE,EAAE;oBACf,QAAQ,EAAE,EAAE;oBACZ,iBAAiB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE,WAAW,EAAE,EAAE,EAAE;oBACnE,OAAO,EAAE,EAAE;oBACX,QAAQ,EAAE,EAAE;oBACZ,MAAM,EAAE,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;iBAChC;YACL,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,YAAY,EAAE,CAAC,CAAC,YAAY;YAC5B,MAAM,EAAE,CAAC,CAAC,WAAW,IAAI;gBACvB,KAAK,EAAE,EAAE;gBACT,QAAQ,EAAE,EAAE;gBACZ,MAAM,EAAE,EAAE;gBACV,SAAS,EAAE,EAAE;gBACb,SAAS,EAAE,KAAK;aACjB;YACD,OAAO,EAAE,CAAC,CAAC,OAAO,IAAI,EAAE;YACxB,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE;YAC9B,UAAU,EAAE,CAAC,CAAC,UAAU,IAAI,EAAE;YAC9B,KAAK,EAAE,CAAC,CAAC,KAAK;YACd,MAAM,EAAE,CAAC,CAAC,MAAM,IAAI,EAAE,KAAK,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE;SAC5C,CAAC;IACJ,CAAC;CACF,CAAA;AAvDY,wEAA8B;yCAA9B,8BAA8B;IAD1C,IAAA,mBAAU,GAAE;qCAEuD,oEAAmC;GAD1F,8BAA8B,CAuD1C"}
1
+ {"version":3,"file":"responder.context.factory.js","sourceRoot":"","sources":["../../../../src/agents/responder/factories/responder.context.factory.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA4C;AAC5C,kHAAoH;AAGpH,+EAA2E;AAIpE,IAAM,8BAA8B,GAApC,MAAM,8BAA8B;IACzC,YAA6B,mCAAwE;QAAxE,wCAAmC,GAAnC,mCAAmC,CAAqC;IAAG,CAAC;IAEzG,MAAM,CAAC,MASN;QACC,OAAO;YACL,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,SAAS,EAAE,MAAM,CAAC,SAAS;YAC3B,WAAW,EAAE,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,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,eAAO,MAAM,mBAAmB,KAAK,CAAC;AACtC,eAAO,MAAM,wBAAwB,QAAS,CAAC;AAyB/C,qBACa,gBAAgB;IAIzB,OAAO,CAAC,QAAQ,CAAC,GAAG;IACpB,OAAO,CAAC,QAAQ,CAAC,KAAK;IAItB,OAAO,CAAC,QAAQ,CAAC,OAAO;IACxB,OAAO,CAAC,QAAQ,CAAC,WAAW;IAC5B,OAAO,CAAC,QAAQ,CAAC,YAAY;IAC7B,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,QAAQ;IACzB,OAAO,CAAC,QAAQ,CAAC,YAAY;IACjB,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC;IAdlC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAqC;gBAGzC,GAAG,EAAE,UAAU,EACf,KAAK,EAAE,mBAAmB,EAI1B,OAAO,EAAE,WAAW,EACpB,WAAW,EAAE,iBAAiB,EAC9B,YAAY,EAAE,kBAAkB,EAChC,UAAU,EAAE,kBAAkB,EAC9B,QAAQ,EAAE,cAAc,EACxB,YAAY,EAAE,YAAY,EACd,EAAE,CAAC,EAAE,gBAAgB;IAG9C,OAAO,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,qBAAqB,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IA6PhG,OAAO,CAAC,eAAe;IAuBvB,OAAO,CAAC,aAAa;CAOtB"}
@@ -66,10 +66,14 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
66
66
  }
67
67
  async execute(params) {
68
68
  const state = params.state;
69
+ // Every graph tool built below reads scopeId/scopeType off this context —
70
+ // it is the only channel confining the whole turn to one scope root.
69
71
  const ctx = {
70
72
  companyId: state.companyId,
71
73
  userId: state.userId,
72
74
  userModuleIds: state.userModuleIds ?? [],
75
+ scopeId: state.scopeId,
76
+ scopeType: state.scopeType,
73
77
  };
74
78
  if (ctx.userModuleIds.length === 0) {
75
79
  const out = {
@@ -94,6 +98,11 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
94
98
  if (this.ws) {
95
99
  const ws = this.ws;
96
100
  const userId = state.userId;
101
+ // id → human label, harvested from each tool result as the turn runs.
102
+ // The id-taking tools (read_entity, traverse) only ever receive a uuid,
103
+ // so without this the status line can only print the uuid back at the
104
+ // user. resolve_entity/search_entities run first and carry the names.
105
+ const labels = new Map();
97
106
  tools = tools.map((t) => new tools_1.DynamicStructuredTool({
98
107
  name: t.name,
99
108
  description: t.description,
@@ -101,14 +110,21 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
101
110
  func: async (input) => {
102
111
  try {
103
112
  await ws.sendMessageToUser(userId, "assistant:status", {
104
- status: (0, humanize_tool_1.humanizeTool)(t.name, input),
113
+ status: (0, humanize_tool_1.humanizeTool)(t.name, input, labels),
105
114
  at: new Date().toISOString(),
106
115
  });
107
116
  }
108
117
  catch (err) {
109
118
  this.logger.warn(`assistant:status emit failed: ${err instanceof Error ? err.message : String(err)}`);
110
119
  }
111
- return t.func(input);
120
+ const result = await t.func(input);
121
+ try {
122
+ (0, humanize_tool_1.collectEntityLabels)(result, labels);
123
+ }
124
+ catch (err) {
125
+ this.logger.warn(`assistant:status label harvest failed: ${err instanceof Error ? err.message : String(err)}`);
126
+ }
127
+ return result;
112
128
  },
113
129
  }));
114
130
  }
@@ -1 +1 @@
1
- {"version":3,"file":"graph.node.service.js","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/graph.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA8D;AAC9D,6BAAwB;AACxB,iDAA8D;AAC9D,0FAAsF;AACtF,wEAAoE;AACpE,sFAAiF;AACjF,iEAA6E;AAC7E,+EAA0E;AAC1E,iFAA4E;AAC5E,iFAA4E;AAC5E,yEAAoE;AACpE,mEAA+D;AAC/D,2FA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AAE,CAAC,CAAC;QAC5E,CAAC;QACD,OAAO;YACL,SAAS,EAAE,GAAG,CAAC,SAAS;YACxB,kBAAkB,EAAE,GAAG,CAAC,QAAQ,CAAC,MAAM;YACvC,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,YAAY,EAAE,GAAG,CAAC,YAAY;YAC9B,MAAM,EAAE,GAAG,CAAC,MAAM;YAClB,GAAG,CAAC,mBAAmB,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;SAC/D,CAAC;IACJ,CAAC;IAEO,aAAa,CAAC,KAA4B;QAChD,OAAO;YACL,QAAQ,EAAE,OAAO;YACjB,SAAS,EAAE,WAAW;YACtB,YAAY,EAAE,KAAK,CAAC,QAAQ;SAC7B,CAAC;IACJ,CAAC;CACF,CAAA;AA7SY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAgBR,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAXW,wBAAU;QACR,2CAAmB;QAIjB,0BAAW;QACP,uCAAiB;QAChB,yCAAkB;QACpB,yCAAkB;QACpB,iCAAc;QACV,4BAAY;QACT,oCAAgB;GAfzC,gBAAgB,CA6S5B"}
@@ -1,13 +1,45 @@
1
1
  import { ConfigService } from "@nestjs/config";
2
+ import { z } from "zod";
2
3
  import { BaseConfigInterface } from "../../../config/interfaces";
3
4
  import { LLMService } from "../../../core/llm/services/llm.service";
4
5
  import { ResponderContext, ResponderContextState } from "../../responder/contexts/responder.context";
5
6
  export declare const defaultAnswerPrompt = "\nYou are the synthesizer of a unified ERP assistant. You are given a user\nquestion and the results of up to three retrieval branches that ran in\nparallel before you. Your job is to write a clear, useful answer using\nONLY the data those branches returned.\n\n## What you receive\n\nEach turn arrives with these inputs:\n\n- `question` \u2014 the user's refined question.\n- `graphSection` \u2014 the graph branch's own prose reply about the records it\n loaded, followed by an \"--- entities for citation ---\" block listing each\n cited entity as `[ref:N] type \u2014 reason` plus an optional JSON block of\n field values. Treat the prose at the top of `graphSection` as the\n authoritative graph result; weave it into the unified answer rather than\n restating the entity list line-by-line. The `[ref:N]` handles are opaque\n reference tokens \u2014 use them only inside the `references` array, never\n inside `finalAnswer` or `title`.\n- `notebookSection` \u2014 chunks the contextualiser branch retrieved from the\n document store, each prefixed with its chunkId followed by a snippet of\n text.\n- `driftSection` \u2014 community-level summaries (when the drift branch ran).\n- `scopeSection` \u2014 optional scope hint when the conversation is bound to a\n single content.\n- `branchesUsed` \u2014 list of branches that produced data this turn.\n\nA section is the empty string `\"\"` when its branch did not run. When all\ndata sections are empty, you have no information for this turn \u2014 say so\nplainly without referencing \"company knowledge\", \"notebook\", or other\nsystem internals.\n\n## How to write the answer\n\n1. **Identify the user's intent.** Are they asking for a list, a single\n fact, a procedure, a status, or a comparison? Match the answer's shape\n to the question.\n\n2. **Use the graph branch's prose as authoritative graph data.** The\n prose at the top of `graphSection` was written by the same component\n that loaded the records; it already contains the field values, names,\n and statuses. Weave it into `finalAnswer`. You may reorganise it,\n merge it with material from `notebookSection` or `driftSection`, or\n tighten the wording \u2014 but do not invent values that are not in the\n prose, the entity field blocks, or the chunks.\n\n3. **Quote chunk content faithfully.** When you draw from\n `notebookSection`, quote or paraphrase the snippet rather than\n substituting your own restatement.\n\n4. **Cite the chunks that grounded a document answer.** When you quote or\n paraphrase from `notebookSection`, add the chunkId to `citations` with\n a relevance score 0\u2013100. Use only chunkIds that actually appear in\n `notebookSection`. If `notebookSection` is empty, `citations` MUST be\n `[]`.\n\n5. **Cite the entities that grounded a graph answer.** Every entity whose\n information the answer relies on goes into `references` as\n `{ ref, relevance, reason }`, with the `ref` handle copied verbatim\n from the \"entities for citation\" block (e.g. `\"ref:0\"`). Never invent\n a handle. Never put a chunk into `references`; never put an entity\n into `citations`. If `graphSection` is empty, `references` MUST be\n `[]`.\n\n6. **No handles, no UUIDs in user-facing text.** `title` and\n `finalAnswer` must not contain the word \"ref\", the bracketed handle,\n or any UUID. The handles are translated back to real (type, id) pairs\n after you return.\n\n7. **Suggested questions are optional.** If the answer is solid and\n obvious next-step questions exist, propose 3\u20135; otherwise return `[]`.\n Do not return suggestions when you had no data.\n\n8. **No-data case.** If every data section is empty (or together they do\n not cover what the user asked), say so directly. Do not say \"answer\n is not available in the company knowledge\" \u2014 that is a bad system\n phrase. Return `citations: []` and `references: []` in this case.\n\n## Output schema\n\nReturn strictly:\n\n- `title` \u2014 short headline for the UI (under ~70 chars). No handles, no UUIDs.\n- `analyse` \u2014 one to three sentences describing how you derived the answer\n (which branches you used, which records you compared). Internal-facing.\n No handles.\n- `finalAnswer` \u2014 the user-facing markdown answer. Use headings sparingly,\n bullet lists where they help, and field values from the graph branch's\n prose and entity field blocks. No handles, no UUIDs.\n- `citations` \u2014 array of `{ chunkId, relevance }` for chunks you used.\n- `references` \u2014 array of `{ ref, relevance, reason }` for entities you used.\n- `questions` \u2014 array of follow-up question strings.\n";
7
+ /** Historical default for the output schema's `analyse` field description. */
8
+ export declare const defaultResponderAnalyseDescription = "You should first analyse each notebook content before providing a final answer. During the analysis, consider complementary information from other notes and employ a majority voting strategy to resolve any inconsistencies.";
9
+ /** Historical default for the output schema's `finalAnswer` field description. */
10
+ export declare const defaultResponderFinalAnswerDescription = "Generate a comprehensive, detailed, and well-structured final answer using only information from the notebook. If insufficient information is available, clearly state that the answer is not available in the company knowledge.\n\nFormat Requirements:\n- Use proper markdown formatting with headers (##, ###) to organize content into logical sections\n- Include bullet points or numbered lists for multiple items, steps, or concepts\n- Expand on concepts with thorough explanations rather than brief summaries\n- Use subheadings to break complex topics into digestible parts\n- Provide detailed context and background information to help users understand completely\n- Include specific examples or details from the notebook when available\n- Ensure the answer flows logically and is educational in nature\n- Make the response comprehensive and informative, not minimalistic\n ";
11
+ /**
12
+ * Builds the responder answer node's structured-output schema. The `analyse`
13
+ * and `finalAnswer` descriptions are overridable via
14
+ * `ConfigPromptsInterface.responderSchemaDescriptions`; all other fields are
15
+ * fixed. Called with no arguments, the schema is identical to the historical
16
+ * hardcoded one.
17
+ */
18
+ export declare const buildResponderOutputSchema: (descriptions?: {
19
+ analyse?: string;
20
+ finalAnswer?: string;
21
+ }) => z.ZodObject<{
22
+ title: z.ZodString;
23
+ analyse: z.ZodString;
24
+ citations: z.ZodArray<z.ZodObject<{
25
+ chunkId: z.ZodString;
26
+ relevance: z.ZodNumber;
27
+ }, z.core.$strip>>;
28
+ references: z.ZodArray<z.ZodObject<{
29
+ ref: z.ZodString;
30
+ relevance: z.ZodNumber;
31
+ reason: z.ZodString;
32
+ }, z.core.$strip>>;
33
+ questions: z.ZodArray<z.ZodString>;
34
+ finalAnswer: z.ZodString;
35
+ }, z.core.$strip>;
6
36
  export declare class ResponderAnswerNodeService {
7
37
  private readonly llmService;
8
38
  private readonly configService;
9
39
  private readonly logger;
10
40
  private readonly systemPrompt;
41
+ private readonly outputSchema;
42
+ private readonly temperature;
11
43
  constructor(llmService: LLMService, configService: ConfigService<BaseConfigInterface>);
12
44
  execute(params: {
13
45
  state: typeof ResponderContext.State;
@@ -1 +1 @@
1
- {"version":3,"file":"responder.answer.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/responder.answer.node.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAE/C,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGrG,eAAO,MAAM,mBAAmB,olJA4F/B,CAAC;AAkFF,qBACa,0BAA0B;IAKnC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IALhC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IACtE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;gBAGnB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAM9D,OAAO,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,OAAO,gBAAgB,CAAC,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAiJ/F,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,iBAAiB;IAgBzB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;CAY7B"}
1
+ {"version":3,"file":"responder.answer.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/responder.answer.node.service.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,mBAAmB,EAA0B,MAAM,4BAA4B,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,qBAAqB,EAAE,MAAM,4CAA4C,CAAC;AAGrG,eAAO,MAAM,mBAAmB,olJA4F/B,CAAC;AAEF,8EAA8E;AAC9E,eAAO,MAAM,kCAAkC,mOAAmO,CAAC;AAEnR,kFAAkF;AAClF,eAAO,MAAM,sCAAsC,o3BAW5C,CAAC;AAER;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GAAI,eAAe;IAAE,OAAO,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,MAAM,CAAA;CAAE;;;;;;;;;;;;;;iBAmChG,CAAC;AA+BL,qBACa,0BAA0B;IAOnC,OAAO,CAAC,QAAQ,CAAC,UAAU;IAC3B,OAAO,CAAC,QAAQ,CAAC,aAAa;IAPhC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA+C;IACtE,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAS;IACtC,OAAO,CAAC,QAAQ,CAAC,YAAY,CAAgD;IAC7E,OAAO,CAAC,QAAQ,CAAC,WAAW,CAAS;gBAGlB,UAAU,EAAE,UAAU,EACtB,aAAa,EAAE,aAAa,CAAC,mBAAmB,CAAC;IAQ9D,OAAO,CAAC,MAAM,EAAE;QAAE,KAAK,EAAE,OAAO,gBAAgB,CAAC,KAAK,CAAA;KAAE,GAAG,OAAO,CAAC,qBAAqB,CAAC;IAiJ/F,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,iBAAiB;IAkBzB,OAAO,CAAC,iBAAiB;IAgBzB;;;;;OAKG;IACH,OAAO,CAAC,oBAAoB;CAY7B"}
@@ -10,7 +10,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
10
10
  };
11
11
  var ResponderAnswerNodeService_1;
12
12
  Object.defineProperty(exports, "__esModule", { value: true });
13
- exports.ResponderAnswerNodeService = exports.defaultAnswerPrompt = void 0;
13
+ exports.ResponderAnswerNodeService = exports.buildResponderOutputSchema = exports.defaultResponderFinalAnswerDescription = exports.defaultResponderAnalyseDescription = exports.defaultAnswerPrompt = void 0;
14
14
  const common_1 = require("@nestjs/common");
15
15
  const config_1 = require("@nestjs/config");
16
16
  const zod_1 = require("zod");
@@ -108,11 +108,31 @@ Return strictly:
108
108
  - \`references\` — array of \`{ ref, relevance, reason }\` for entities you used.
109
109
  - \`questions\` — array of follow-up question strings.
110
110
  `;
111
- const outputSchema = zod_1.z.object({
111
+ /** Historical default for the output schema's `analyse` field description. */
112
+ exports.defaultResponderAnalyseDescription = `You should first analyse each notebook content before providing a final answer. During the analysis, consider complementary information from other notes and employ a majority voting strategy to resolve any inconsistencies.`;
113
+ /** Historical default for the output schema's `finalAnswer` field description. */
114
+ exports.defaultResponderFinalAnswerDescription = `Generate a comprehensive, detailed, and well-structured final answer using only information from the notebook. If insufficient information is available, clearly state that the answer is not available in the company knowledge.
115
+
116
+ Format Requirements:
117
+ - Use proper markdown formatting with headers (##, ###) to organize content into logical sections
118
+ - Include bullet points or numbered lists for multiple items, steps, or concepts
119
+ - Expand on concepts with thorough explanations rather than brief summaries
120
+ - Use subheadings to break complex topics into digestible parts
121
+ - Provide detailed context and background information to help users understand completely
122
+ - Include specific examples or details from the notebook when available
123
+ - Ensure the answer flows logically and is educational in nature
124
+ - Make the response comprehensive and informative, not minimalistic
125
+ `;
126
+ /**
127
+ * Builds the responder answer node's structured-output schema. The `analyse`
128
+ * and `finalAnswer` descriptions are overridable via
129
+ * `ConfigPromptsInterface.responderSchemaDescriptions`; all other fields are
130
+ * fixed. Called with no arguments, the schema is identical to the historical
131
+ * hardcoded one.
132
+ */
133
+ const buildResponderOutputSchema = (descriptions) => zod_1.z.object({
112
134
  title: zod_1.z.string().describe(`You should generate a short title to provide the user a quick reference`),
113
- analyse: zod_1.z
114
- .string()
115
- .describe(`You should first analyse each notebook content before providing a final answer. During the analysis, consider complementary information from other notes and employ a majority voting strategy to resolve any inconsistencies.`),
135
+ analyse: zod_1.z.string().describe(descriptions?.analyse ?? exports.defaultResponderAnalyseDescription),
116
136
  citations: zod_1.z
117
137
  .array(zod_1.z.object({
118
138
  chunkId: zod_1.z.string().describe(`The UUID of the line in your notebook`),
@@ -133,19 +153,9 @@ const outputSchema = zod_1.z.object({
133
153
  questions: zod_1.z
134
154
  .array(zod_1.z.string())
135
155
  .describe(`A list of **5 follow-up or refinement questions** based on the final answer.`),
136
- finalAnswer: zod_1.z.string().describe(`Generate a comprehensive, detailed, and well-structured final answer using only information from the notebook. If insufficient information is available, clearly state that the answer is not available in the company knowledge.
137
-
138
- Format Requirements:
139
- - Use proper markdown formatting with headers (##, ###) to organize content into logical sections
140
- - Include bullet points or numbered lists for multiple items, steps, or concepts
141
- - Expand on concepts with thorough explanations rather than brief summaries
142
- - Use subheadings to break complex topics into digestible parts
143
- - Provide detailed context and background information to help users understand completely
144
- - Include specific examples or details from the notebook when available
145
- - Ensure the answer flows logically and is educational in nature
146
- - Make the response comprehensive and informative, not minimalistic
147
- `),
156
+ finalAnswer: zod_1.z.string().describe(descriptions?.finalAnswer ?? exports.defaultResponderFinalAnswerDescription),
148
157
  });
158
+ exports.buildResponderOutputSchema = buildResponderOutputSchema;
149
159
  const inputSchema = zod_1.z.object({
150
160
  question: zod_1.z.string().describe("The user's refined question"),
151
161
  notebookSection: zod_1.z
@@ -163,6 +173,8 @@ let ResponderAnswerNodeService = ResponderAnswerNodeService_1 = class ResponderA
163
173
  this.logger = new common_1.Logger(ResponderAnswerNodeService_1.name);
164
174
  const prompts = this.configService.get("prompts");
165
175
  this.systemPrompt = prompts?.responder ?? exports.defaultAnswerPrompt;
176
+ this.outputSchema = (0, exports.buildResponderOutputSchema)(prompts?.responderSchemaDescriptions);
177
+ this.temperature = prompts?.responderTemperature ?? 0.1;
166
178
  }
167
179
  async execute(params) {
168
180
  const state = params.state;
@@ -217,9 +229,9 @@ let ResponderAnswerNodeService = ResponderAnswerNodeService_1 = class ResponderA
217
229
  scopeSection,
218
230
  branchesUsed,
219
231
  },
220
- outputSchema,
232
+ outputSchema: this.outputSchema,
221
233
  systemPrompts: [this.systemPrompt],
222
- temperature: 0.1,
234
+ temperature: this.temperature,
223
235
  metadata: {
224
236
  nodeName: "answer",
225
237
  agentName: "responder",