@carlonicora/nestjs-neo4jsonapi 2.15.3 → 3.1.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.
- package/dist/agents/graph/prompts/graph.node.system.prompt.d.ts +4 -2
- package/dist/agents/graph/prompts/graph.node.system.prompt.d.ts.map +1 -1
- package/dist/agents/graph/prompts/graph.node.system.prompt.js +35 -10
- package/dist/agents/graph/prompts/graph.node.system.prompt.js.map +1 -1
- package/dist/agents/index.d.ts +1 -0
- package/dist/agents/index.d.ts.map +1 -1
- package/dist/agents/index.js +6 -2
- package/dist/agents/index.js.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.d.ts +11 -2
- package/dist/agents/responder/nodes/graph.node.service.d.ts.map +1 -1
- package/dist/agents/responder/nodes/graph.node.service.js +79 -64
- package/dist/agents/responder/nodes/graph.node.service.js.map +1 -1
- package/dist/config/interfaces/config.prompts.interface.d.ts +29 -0
- package/dist/config/interfaces/config.prompts.interface.d.ts.map +1 -1
- package/dist/config/interfaces/config.responder.interface.d.ts +28 -0
- package/dist/config/interfaces/config.responder.interface.d.ts.map +1 -1
- package/dist/core/cache/services/cache.service.d.ts +15 -0
- package/dist/core/cache/services/cache.service.d.ts.map +1 -1
- package/dist/core/cache/services/cache.service.js +3 -2
- package/dist/core/cache/services/cache.service.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,3 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
export declare
|
|
1
|
+
import { GraphNodeDomainPrompts } from "../../../config/interfaces/config.prompts.interface";
|
|
2
|
+
export declare const GRAPH_NODE_SYSTEM_PROMPT_BASE = "# Role\n\n{DOMAIN_ROLE}\n\nThe data is stored as a graph \u2014 entities are nodes, and the connections between them are edges.\n\nYou answer the user's questions by traversing this graph: find the entities the question is about, read their fields, and walk the relationships between them to reach related entities, continuing until you have enough information to answer. Nearly every useful answer requires following at least one edge \u2014 a single search is rarely the whole story.\n\nEvery fact in your answer must come from a tool call that returned it. Do not invent field names, relationship names, entity types, or record contents.\n\n## Your data\n\n{GRAPH_MAP}\n\nThe list above is the complete inventory of entity types available to you \u2014 anything not listed does not exist. Each entry shows only the type and a one-line description; fields and relationships are not included here. To learn the fields and relationships of any type, call `describe_entity({ type })` \u2014 its response is the only authoritative source for that type's schema. Do not assume a field or relationship exists until `describe_entity` confirms it.\n\nA field marked `money` in the catalogue above is stored as an integer in minor units; its marker states how many decimals (e.g. `total_amount (number, money [integer stored in minor units (2 decimals); divide by 10^2 to display], ...)`). For these fields, every record returned by `read_entity`, `search_entities`, or `traverse` also carries a sibling `<name>_formatted` string \u2014 quote that string when narrating the value in your answer, and never quote the raw integer as if it were the display amount. Filters and sort still target the raw field, in minor units.\n\n{DOMAIN_DATA_CONVENTIONS}\n\n## Tools\n\nYou have five tools.\n\n**Never ask the user a clarifying question.** The user expects an answer, not a follow-up. After `resolve_entity` returns at least one usable candidate, immediately continue: `describe_entity` \u2192 `search_entities` / `traverse` / `read_entity` \u2192 answer. Do not stop the tool chain to confirm what to do next. If multiple candidates of different types could match, pick the one whose type and connected relationships best fit the user's question. State the assumption you made in the `reason` clause of the entity you return; do not ask the user.\n\n{DOMAIN_DISAMBIGUATION}\n\nBefore choosing a tool, check the \"Entities already in this conversation\" block that may be provided below. If the user's phrase refers to an entity listed there \u2014 by its exact name, by a partial name, or implicitly (\"them\", \"their\", \"other\", \"these\") \u2014 treat that entity as resolved. Use its `type` and `id` directly with `read_entity` or `traverse`. **A previous-turn record's nested relationships also carry their own `{ type, id }` \u2014 those ids are addressable, so call `read_entity` or `traverse` with them directly.** Do not call `resolve_entity` for a name that is already resolved in context, and do not call `resolve_entity` for a record whose id you already have.\n\nOtherwise, if the user names an entity \u2014 a person, a place, an organisation, a project, anything that could correspond to a record in the graph \u2014 your first tool call is `resolve_entity` with the user's literal phrase. Do not guess a type. `resolve_entity` returns candidates across every entity type in one shot; you then pick a candidate and proceed with `describe_entity` + the typed tools.\n\nSome entities in the catalog are marked `(bridge \u2192 \u2026)` in the type index. A bridge is a junction record whose own fields are minimal \u2014 the actionable data lives on the relationships named in the bridge marker. When `traverse`, `read_entity`, or `search_entities` returns a record of a bridge type, the response already contains those relationships' targets inlined as nested objects, alongside a `__materialised: [...]` array listing which keys were filled. Do not call `traverse` on a relationship that already appears in `__materialised` \u2014 its content is already in front of you. If a relationship is in the bridge's `materialiseTo` per `describe_entity` but missing from `__materialised`, the target is gated by your module access; do not retry that traverse \u2014 narrate the gap to the user.\n\n- `resolve_entity(text)` \u2014 look up nodes by name across every entity type in one call. Pass the user's literal phrase verbatim, including words like \"and\", \"&\", or other punctuation that may be part of a name. The response carries a `matchMode`, `items` sorted by `score` descending, and an optional `recommendation`:\n - `exact` or `fuzzy` \u2192\n - **If the response carries `recommendation`, follow it.** It surfaces a deterministic rule already applied to the candidates and is more reliable than re-deriving the rule each turn.\n - Otherwise: if `items[0].summary` equals the user's literal phrase (case-insensitive), `items[0]` is the answer \u2014 pick it without further disambiguation. Words like \"and\", \"&\", or commas inside that phrase are part of the name; never split the phrase into multiple `resolve_entity` calls and never ask the user to clarify between `items[0]` and lower-ranked items just because the phrase looks plural.\n - Otherwise: if `items.length === 1` or `items[0].score - items[1].score \u2265 0.15`, pick `items[0]`.\n - Otherwise: pick the most plausible candidate by name match and continue traversing \u2014 the question still has to be answered. Do not refuse the user when at least one usable candidate exists.\n - `semantic` \u2192 same rules, margin \u2265 0.08. The match is approximate; reflect that in the `reason` clause.\n - `none` \u2192 no record exists; tell the user in your answer and suggest rephrasing.\n\n- `describe_entity(type)` \u2014 inspect one entity type in full: every field with its type, and every relationship with its target type and description. Call this for every type you intend to touch, before searching, reading, or traversing it. The next three tools will refuse to run on a type that has not been described in this turn.\n\n- `search_entities(type, filters?, sort?, limit?)` \u2014 find records of a known type by filter and sort. Use this when you already have the type (from `resolve_entity` or because the user referred to a kind of record without naming a specific one, e.g. \"all records of that type created after a given date\"). `search_entities` does not search by name \u2014 to find a record by name, call `resolve_entity` first.\n\n- `read_entity(type, id, include?)` \u2014 fetch the full fields of a single node by id. Tool outputs from other tools are summaries; call this to get the complete record before reporting on it.\n\n- `traverse(fromType, fromId, relationship, filters?, sort?, limit?)` \u2014 walk one edge from a known node to its connected nodes. The `relationship` must be one listed under the source type in the catalogue. `filters` and `sort` apply to the target node's fields. This is the only way to cross from one entity type to another.\n\n{DOMAIN_DEPTH}\n\nIf a tool returns `{ error: \"\u2026\" }`, read the message \u2014 it usually lists valid fields or relationships, or tells you to call `describe_entity` first. Pick one of those and call the tool again. Recover within the same turn; do not apologise to the user for a tool error. Never stop on the first error.\n\n## Output\n\nReturn these fields:\n\n- `answer` \u2014 a concise prose reply (2\u20134 sentences for a single record, a markdown bullet list when enumerating) built from the actual field values and traversal results. When you report on a record, use its real field values, not its type name. When you report a money value, quote the `<name>_formatted` string from the record. When you report a date, use the date as it appears in the record.\n\n{DOMAIN_OUTPUT_RULES}\n\n- `entities` \u2014 every entity that contributes to the meaning of your `answer`, as `{ type, id, reason, fields? }`. An entity contributes when it is the subject the user asked about, or a record the answer reports a fact about. `reason` is one short clause explaining that role (for example \"the account the user asked about\", \"one of the records listed in the answer\"). Populate `fields` with the values you quoted in `answer`. Do not include entities you retrieved, inspected, and discarded: a `resolve_entity` call that returned three candidates of which you only used one \u2014 the other two are not entities to return; a `traverse` that walked an edge whose target you did not mention \u2014 not an entity. These entities are persisted and re-loaded as context on the next turn, so polluting them with irrelevant records will cause the next turn to confuse them with the actual subject \u2014 be strict.\n\n- `stop` \u2014 set to `true` once `answer` is complete and `entities` is the matching set.\n";
|
|
3
|
+
export declare function describeDomainLayer(domain?: GraphNodeDomainPrompts): string;
|
|
4
|
+
export declare function renderGraphNodeSystemPrompt(graphMap: string, domain?: GraphNodeDomainPrompts): string;
|
|
3
5
|
//# sourceMappingURL=graph.node.system.prompt.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.node.system.prompt.d.ts","sourceRoot":"","sources":["../../../../src/agents/graph/prompts/graph.node.system.prompt.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,6BAA6B,
|
|
1
|
+
{"version":3,"file":"graph.node.system.prompt.d.ts","sourceRoot":"","sources":["../../../../src/agents/graph/prompts/graph.node.system.prompt.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,qDAAqD,CAAC;AAE7F,eAAO,MAAM,6BAA6B,+rRAkEzC,CAAC;AAMF,wBAAgB,mBAAmB,CAAC,MAAM,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAG3E;AAED,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,sBAAsB,GAAG,MAAM,CAerG"}
|
|
@@ -1,10 +1,13 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.GRAPH_NODE_SYSTEM_PROMPT_BASE = void 0;
|
|
4
|
+
exports.describeDomainLayer = describeDomainLayer;
|
|
4
5
|
exports.renderGraphNodeSystemPrompt = renderGraphNodeSystemPrompt;
|
|
5
6
|
exports.GRAPH_NODE_SYSTEM_PROMPT_BASE = `# Role
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
{DOMAIN_ROLE}
|
|
9
|
+
|
|
10
|
+
The data is stored as a graph — entities are nodes, and the connections between them are edges.
|
|
8
11
|
|
|
9
12
|
You answer the user's questions by traversing this graph: find the entities the question is about, read their fields, and walk the relationships between them to reach related entities, continuing until you have enough information to answer. Nearly every useful answer requires following at least one edge — a single search is rarely the whole story.
|
|
10
13
|
|
|
@@ -16,17 +19,21 @@ Every fact in your answer must come from a tool call that returned it. Do not in
|
|
|
16
19
|
|
|
17
20
|
The list above is the complete inventory of entity types available to you — anything not listed does not exist. Each entry shows only the type and a one-line description; fields and relationships are not included here. To learn the fields and relationships of any type, call \`describe_entity({ type })\` — its response is the only authoritative source for that type's schema. Do not assume a field or relationship exists until \`describe_entity\` confirms it.
|
|
18
21
|
|
|
19
|
-
|
|
22
|
+
A field marked \`money\` in the catalogue above is stored as an integer in minor units; its marker states how many decimals (e.g. \`total_amount (number, money [integer stored in minor units (2 decimals); divide by 10^2 to display], ...)\`). For these fields, every record returned by \`read_entity\`, \`search_entities\`, or \`traverse\` also carries a sibling \`<name>_formatted\` string — quote that string when narrating the value in your answer, and never quote the raw integer as if it were the display amount. Filters and sort still target the raw field, in minor units.
|
|
23
|
+
|
|
24
|
+
{DOMAIN_DATA_CONVENTIONS}
|
|
20
25
|
|
|
21
26
|
## Tools
|
|
22
27
|
|
|
23
|
-
You have five tools.
|
|
28
|
+
You have five tools.
|
|
29
|
+
|
|
30
|
+
**Never ask the user a clarifying question.** The user expects an answer, not a follow-up. After \`resolve_entity\` returns at least one usable candidate, immediately continue: \`describe_entity\` → \`search_entities\` / \`traverse\` / \`read_entity\` → answer. Do not stop the tool chain to confirm what to do next. If multiple candidates of different types could match, pick the one whose type and connected relationships best fit the user's question. State the assumption you made in the \`reason\` clause of the entity you return; do not ask the user.
|
|
24
31
|
|
|
25
|
-
|
|
32
|
+
{DOMAIN_DISAMBIGUATION}
|
|
26
33
|
|
|
27
34
|
Before choosing a tool, check the "Entities already in this conversation" block that may be provided below. If the user's phrase refers to an entity listed there — by its exact name, by a partial name, or implicitly ("them", "their", "other", "these") — treat that entity as resolved. Use its \`type\` and \`id\` directly with \`read_entity\` or \`traverse\`. **A previous-turn record's nested relationships also carry their own \`{ type, id }\` — those ids are addressable, so call \`read_entity\` or \`traverse\` with them directly.** Do not call \`resolve_entity\` for a name that is already resolved in context, and do not call \`resolve_entity\` for a record whose id you already have.
|
|
28
35
|
|
|
29
|
-
Otherwise, if the user names an entity — a
|
|
36
|
+
Otherwise, if the user names an entity — a person, a place, an organisation, a project, anything that could correspond to a record in the graph — your first tool call is \`resolve_entity\` with the user's literal phrase. Do not guess a type. \`resolve_entity\` returns candidates across every entity type in one shot; you then pick a candidate and proceed with \`describe_entity\` + the typed tools.
|
|
30
37
|
|
|
31
38
|
Some entities in the catalog are marked \`(bridge → …)\` in the type index. A bridge is a junction record whose own fields are minimal — the actionable data lives on the relationships named in the bridge marker. When \`traverse\`, \`read_entity\`, or \`search_entities\` returns a record of a bridge type, the response already contains those relationships' targets inlined as nested objects, alongside a \`__materialised: [...]\` array listing which keys were filled. Do not call \`traverse\` on a relationship that already appears in \`__materialised\` — its content is already in front of you. If a relationship is in the bridge's \`materialiseTo\` per \`describe_entity\` but missing from \`__materialised\`, the target is gated by your module access; do not retry that traverse — narrate the gap to the user.
|
|
32
39
|
|
|
@@ -41,12 +48,14 @@ Some entities in the catalog are marked \`(bridge → …)\` in the type index.
|
|
|
41
48
|
|
|
42
49
|
- \`describe_entity(type)\` — inspect one entity type in full: every field with its type, and every relationship with its target type and description. Call this for every type you intend to touch, before searching, reading, or traversing it. The next three tools will refuse to run on a type that has not been described in this turn.
|
|
43
50
|
|
|
44
|
-
- \`search_entities(type, filters?, sort?, limit?)\` — find records of a known type by filter and sort. Use this when you already have the type (from \`resolve_entity\` or because the user referred to a kind of record without naming a specific one, e.g. "all
|
|
51
|
+
- \`search_entities(type, filters?, sort?, limit?)\` — find records of a known type by filter and sort. Use this when you already have the type (from \`resolve_entity\` or because the user referred to a kind of record without naming a specific one, e.g. "all records of that type created after a given date"). \`search_entities\` does not search by name — to find a record by name, call \`resolve_entity\` first.
|
|
45
52
|
|
|
46
53
|
- \`read_entity(type, id, include?)\` — fetch the full fields of a single node by id. Tool outputs from other tools are summaries; call this to get the complete record before reporting on it.
|
|
47
54
|
|
|
48
55
|
- \`traverse(fromType, fromId, relationship, filters?, sort?, limit?)\` — walk one edge from a known node to its connected nodes. The \`relationship\` must be one listed under the source type in the catalogue. \`filters\` and \`sort\` apply to the target node's fields. This is the only way to cross from one entity type to another.
|
|
49
56
|
|
|
57
|
+
{DOMAIN_DEPTH}
|
|
58
|
+
|
|
50
59
|
If a tool returns \`{ error: "…" }\`, read the message — it usually lists valid fields or relationships, or tells you to call \`describe_entity\` first. Pick one of those and call the tool again. Recover within the same turn; do not apologise to the user for a tool error. Never stop on the first error.
|
|
51
60
|
|
|
52
61
|
## Output
|
|
@@ -55,12 +64,28 @@ Return these fields:
|
|
|
55
64
|
|
|
56
65
|
- \`answer\` — a concise prose reply (2–4 sentences for a single record, a markdown bullet list when enumerating) built from the actual field values and traversal results. When you report on a record, use its real field values, not its type name. When you report a money value, quote the \`<name>_formatted\` string from the record. When you report a date, use the date as it appears in the record.
|
|
57
66
|
|
|
58
|
-
|
|
67
|
+
{DOMAIN_OUTPUT_RULES}
|
|
68
|
+
|
|
69
|
+
- \`entities\` — every entity that contributes to the meaning of your \`answer\`, as \`{ type, id, reason, fields? }\`. An entity contributes when it is the subject the user asked about, or a record the answer reports a fact about. \`reason\` is one short clause explaining that role (for example "the account the user asked about", "one of the records listed in the answer"). Populate \`fields\` with the values you quoted in \`answer\`. Do not include entities you retrieved, inspected, and discarded: a \`resolve_entity\` call that returned three candidates of which you only used one — the other two are not entities to return; a \`traverse\` that walked an edge whose target you did not mention — not an entity. These entities are persisted and re-loaded as context on the next turn, so polluting them with irrelevant records will cause the next turn to confuse them with the actual subject — be strict.
|
|
59
70
|
|
|
60
71
|
- \`stop\` — set to \`true\` once \`answer\` is complete and \`entities\` is the matching set.
|
|
61
72
|
`;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
73
|
+
const DEFAULT_ROLE = "You help a user explore their organisation's data.";
|
|
74
|
+
const DOMAIN_SLOTS = ["role", "depth", "disambiguation", "dataConventions", "outputRules"];
|
|
75
|
+
function describeDomainLayer(domain) {
|
|
76
|
+
const parts = DOMAIN_SLOTS.map((slot) => `${slot}=${domain?.[slot]?.trim() ? "supplied" : "kernel"}`);
|
|
77
|
+
return `graph node domain layer: ${parts.join(" ")}`;
|
|
78
|
+
}
|
|
79
|
+
function renderGraphNodeSystemPrompt(graphMap, domain) {
|
|
80
|
+
// Function replacements throughout: a string replacement would interpret
|
|
81
|
+
// $&, $`, $' and $n inside app-supplied text and silently mangle the prompt.
|
|
82
|
+
return exports.GRAPH_NODE_SYSTEM_PROMPT_BASE.replace("{GRAPH_MAP}", () => graphMap ||
|
|
83
|
+
"(No accessible data — the user has no enabled modules with described entities. Do not attempt any tool calls. Respond politely explaining that you have no data to query.)")
|
|
84
|
+
.replace("{DOMAIN_ROLE}", () => domain?.role?.trim() || DEFAULT_ROLE)
|
|
85
|
+
.replace("{DOMAIN_DATA_CONVENTIONS}", () => domain?.dataConventions?.trim() ?? "")
|
|
86
|
+
.replace("{DOMAIN_DISAMBIGUATION}", () => domain?.disambiguation?.trim() ?? "")
|
|
87
|
+
.replace("{DOMAIN_DEPTH}", () => domain?.depth?.trim() ?? "")
|
|
88
|
+
.replace("{DOMAIN_OUTPUT_RULES}", () => domain?.outputRules?.trim() ?? "")
|
|
89
|
+
.replace(/\n{3,}/g, "\n\n");
|
|
65
90
|
}
|
|
66
91
|
//# sourceMappingURL=graph.node.system.prompt.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.node.system.prompt.js","sourceRoot":"","sources":["../../../../src/agents/graph/prompts/graph.node.system.prompt.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"graph.node.system.prompt.js","sourceRoot":"","sources":["../../../../src/agents/graph/prompts/graph.node.system.prompt.ts"],"names":[],"mappings":";;;AA0EA,kDAGC;AAED,kEAeC;AA5FY,QAAA,6BAA6B,GAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkE5C,CAAC;AAEF,MAAM,YAAY,GAAG,oDAAoD,CAAC;AAE1E,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,OAAO,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,aAAa,CAAU,CAAC;AAEpG,SAAgB,mBAAmB,CAAC,MAA+B;IACjE,MAAM,KAAK,GAAG,YAAY,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,GAAG,IAAI,IAAI,MAAM,EAAE,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,UAAU,CAAC,CAAC,CAAC,QAAQ,EAAE,CAAC,CAAC;IACtG,OAAO,4BAA4B,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC;AACvD,CAAC;AAED,SAAgB,2BAA2B,CAAC,QAAgB,EAAE,MAA+B;IAC3F,yEAAyE;IACzE,6EAA6E;IAC7E,OAAO,qCAA6B,CAAC,OAAO,CAC1C,aAAa,EACb,GAAG,EAAE,CACH,QAAQ;QACR,4KAA4K,CAC/K;SACE,OAAO,CAAC,eAAe,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,YAAY,CAAC;SACpE,OAAO,CAAC,2BAA2B,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,eAAe,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACjF,OAAO,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAC9E,OAAO,CAAC,gBAAgB,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SAC5D,OAAO,CAAC,uBAAuB,EAAE,GAAG,EAAE,CAAC,MAAM,EAAE,WAAW,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC;SACzE,OAAO,CAAC,SAAS,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC"}
|
package/dist/agents/index.d.ts
CHANGED
|
@@ -48,6 +48,7 @@ export type { OperatorRunResult } from "./operator/services/operator.service";
|
|
|
48
48
|
export { OperatorContext } from "./operator/contexts/operator.context";
|
|
49
49
|
export type { OperatorCitation, OperatorContextState, OperatorFinalAnswer } from "./operator/contexts/operator.context";
|
|
50
50
|
export { defaultOperatorSystemPrompt } from "./operator/prompts/operator.system.prompt";
|
|
51
|
+
export { GRAPH_NODE_SYSTEM_PROMPT_BASE, renderGraphNodeSystemPrompt, describeDomainLayer, } from "./graph/prompts/graph.node.system.prompt";
|
|
51
52
|
export { OperatorCheckpointerService, OPERATOR_DEFAULT_APPROVAL_TTL_DAYS, } from "./operator/services/operator.checkpointer.service";
|
|
52
53
|
export { OPERATOR_TOOLS } from "./operator/interfaces/operator.tool.interface";
|
|
53
54
|
export type { OperatorChunkCitation, OperatorRetrievalContext, OperatorToolCallRecord, OperatorToolContribution, OperatorToolDefinition, } from "./operator/interfaces/operator.tool.interface";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGhD,cAAc,WAAW,CAAC;AAK1B,YAAY,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,4BAA4B,CAAC;AAG3F,OAAO,EAAE,uBAAuB,EAAE,MAAM,gDAAgD,CAAC;AACzF,OAAO,EAAE,wBAAwB,EAAE,MAAM,0DAA0D,CAAC;AAGpG,OAAO,EAAE,yBAAyB,EAAE,MAAM,oDAAoD,CAAC;AAC/F,OAAO,EAAE,0BAA0B,EAAE,MAAM,8DAA8D,CAAC;AAG1G,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,WAAW,EAAE,MAAM,uCAAuC,CAAC;AAC3G,OAAO,EAAE,qBAAqB,EAAE,eAAe,EAAE,MAAM,0CAA0C,CAAC;AAClG,OAAO,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,gCAAgC,CAAC;AAGnF,OAAO,EAAE,oBAAoB,EAAE,MAAM,wCAAwC,CAAC;AAC9E,OAAO,EAAE,qBAAqB,EAAE,MAAM,kDAAkD,CAAC;AACzF,OAAO,EAAE,mCAAmC,EAAE,MAAM,2DAA2D,CAAC;AAChH,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AO,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AAC3D,YAAY,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAG9E,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EAAE,YAAY,EAAE,MAAM,mCAAmC,CAAC;AACjE,OAAO,EAAE,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAChF,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,YAAY,EAAE,iBAAiB,EAAE,MAAM,sCAAsC,CAAC;AAC9E,OAAO,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AACvE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,mBAAmB,EAAE,MAAM,sCAAsC,CAAC;AACxH,OAAO,EAAE,2BAA2B,EAAE,MAAM,2CAA2C,CAAC;AACxF,OAAO,EACL,6BAA6B,EAC7B,2BAA2B,EAC3B,mBAAmB,GACpB,MAAM,0CAA0C,CAAC;AAClD,OAAO,EACL,2BAA2B,EAC3B,kCAAkC,GACnC,MAAM,mDAAmD,CAAC;AAG3D,OAAO,EAAE,cAAc,EAAE,MAAM,+CAA+C,CAAC;AAC/E,YAAY,EACV,qBAAqB,EACrB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,GACvB,MAAM,+CAA+C,CAAC;AACvD,OAAO,EAAE,mBAAmB,EAAE,MAAM,wCAAwC,CAAC;AAC7E,OAAO,EAAE,qBAAqB,EAAE,MAAM,0CAA0C,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,4CAA4C,CAAC;AACpF,OAAO,EAAE,oBAAoB,EAAE,MAAM,yCAAyC,CAAC"}
|
package/dist/agents/index.js
CHANGED
|
@@ -14,8 +14,8 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
exports.
|
|
18
|
-
exports.OperatorToolRegistry = void 0;
|
|
17
|
+
exports.OPERATOR_TOOLS = exports.OPERATOR_DEFAULT_APPROVAL_TTL_DAYS = exports.OperatorCheckpointerService = exports.describeDomainLayer = exports.renderGraphNodeSystemPrompt = exports.GRAPH_NODE_SYSTEM_PROMPT_BASE = exports.defaultOperatorSystemPrompt = exports.OperatorContext = exports.OperatorService = exports.OperatorController = exports.operatorMeta = exports.OperatorModule = exports.TraverseTool = exports.ReadEntityTool = exports.SearchEntitiesTool = exports.DescribeEntityTool = exports.ResolveEntityTool = exports.UserModulesRepository = exports.buildScopePattern = exports.ScopePredicateService = exports.ScopeGuard = exports.GraphDescriptorRegistry = exports.GRAPH_SEMANTIC_MIN_SCORE = exports.GRAPH_SEMANTIC_MAX_RESULTS = exports.GRAPH_FUZZY_MAX_RESULTS = exports.GRAPH_EXACT_MAX_RESULTS = exports.GraphSearchService = exports.GraphModule = exports.SummariserService = exports.SummariserModule = exports.ResponderService = exports.ResponderModule = exports.isValidKeyConcept = exports.buildGraphCreatorOutputSchema = exports.graphCreatorOutputSchema = exports.GraphCreatorService = exports.GraphCreatorModule = exports.CONTEXTUALISER_TOOLS = exports.RETRIEVAL_SOURCES = exports.ContextualiserContextFactoryService = exports.ContextualiserService = exports.ContextualiserModule = exports.DriftMigrationService = exports.DriftSearchService = exports.DriftModule = exports.CommunitySummariserService = exports.CommunitySummariserModule = exports.CommunityDetectorService = exports.CommunityDetectorModule = exports.AgentsModule = void 0;
|
|
18
|
+
exports.OperatorToolRegistry = exports.OperatorTestActionTool = exports.SearchCommunitiesTool = exports.SearchDocumentsTool = void 0;
|
|
19
19
|
// Centralized AgentsModule - prompts configured via baseConfig.prompts
|
|
20
20
|
var agents_modules_1 = require("./agents.modules");
|
|
21
21
|
Object.defineProperty(exports, "AgentsModule", { enumerable: true, get: function () { return agents_modules_1.AgentsModule; } });
|
|
@@ -114,6 +114,10 @@ var operator_context_1 = require("./operator/contexts/operator.context");
|
|
|
114
114
|
Object.defineProperty(exports, "OperatorContext", { enumerable: true, get: function () { return operator_context_1.OperatorContext; } });
|
|
115
115
|
var operator_system_prompt_1 = require("./operator/prompts/operator.system.prompt");
|
|
116
116
|
Object.defineProperty(exports, "defaultOperatorSystemPrompt", { enumerable: true, get: function () { return operator_system_prompt_1.defaultOperatorSystemPrompt; } });
|
|
117
|
+
var graph_node_system_prompt_1 = require("./graph/prompts/graph.node.system.prompt");
|
|
118
|
+
Object.defineProperty(exports, "GRAPH_NODE_SYSTEM_PROMPT_BASE", { enumerable: true, get: function () { return graph_node_system_prompt_1.GRAPH_NODE_SYSTEM_PROMPT_BASE; } });
|
|
119
|
+
Object.defineProperty(exports, "renderGraphNodeSystemPrompt", { enumerable: true, get: function () { return graph_node_system_prompt_1.renderGraphNodeSystemPrompt; } });
|
|
120
|
+
Object.defineProperty(exports, "describeDomainLayer", { enumerable: true, get: function () { return graph_node_system_prompt_1.describeDomainLayer; } });
|
|
117
121
|
var operator_checkpointer_service_1 = require("./operator/services/operator.checkpointer.service");
|
|
118
122
|
Object.defineProperty(exports, "OperatorCheckpointerService", { enumerable: true, get: function () { return operator_checkpointer_service_1.OperatorCheckpointerService; } });
|
|
119
123
|
Object.defineProperty(exports, "OPERATOR_DEFAULT_APPROVAL_TTL_DAYS", { enumerable: true, get: function () { return operator_checkpointer_service_1.OPERATOR_DEFAULT_APPROVAL_TTL_DAYS; } });
|
package/dist/agents/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/agents/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;AAAA,uEAAuE;AACvE,mDAAgD;AAAvC,8GAAA,YAAY,OAAA;AAErB,gCAAgC;AAChC,4CAA0B;AAO1B,6BAA6B;AAC7B,4FAAyF;AAAhF,oIAAA,uBAAuB,OAAA;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FAAiF;AAAxE,gIAAA,qBAAqB,OAAA;AAC9B,gEAAmE;AAA1D,kHAAA,iBAAiB,OAAA;AAC1B,wFAAqF;AAA5E,gIAAA,qBAAqB,OAAA;AAC9B,8EAA8E;AAC9E,oFAAoF;AACpF,yEAAsE;AAA7D,wHAAA,iBAAiB,OAAA;AAC1B,2EAAwE;AAA/D,0HAAA,kBAAkB,OAAA;AAC3B,2EAAwE;AAA/D,0HAAA,kBAAkB,OAAA;AAC3B,mEAAgE;AAAvD,kHAAA,cAAc,OAAA;AACvB,6DAA2D;AAAlD,6GAAA,YAAY,OAAA;AAGrB,WAAW;AACX,8DAA4D;AAAnD,iHAAA,cAAc,OAAA;AACvB,mEAAiE;AAAxD,6GAAA,YAAY,OAAA;AACrB,kFAAgF;AAAvE,yHAAA,kBAAkB,OAAA;AAC3B,yEAAuE;AAA9D,mHAAA,eAAe,OAAA;AAExB,yEAAuE;AAA9D,mHAAA,eAAe,OAAA;AAExB,oFAAwF;AAA/E,qIAAA,2BAA2B,OAAA;AACpC,qFAIkD;AAHhD,yIAAA,6BAA6B,OAAA;AAC7B,uIAAA,2BAA2B,OAAA;AAC3B,+HAAA,mBAAmB,OAAA;AAErB,mGAG2D;AAFzD,4IAAA,2BAA2B,OAAA;AAC3B,mJAAA,kCAAkC,OAAA;AAGpC,wBAAwB;AACxB,yFAA+E;AAAtE,yHAAA,cAAc,OAAA;AAQvB,gFAA6E;AAApE,4HAAA,mBAAmB,OAAA;AAC5B,oFAAiF;AAAxE,gIAAA,qBAAqB,OAAA;AAC9B,wFAAoF;AAA3E,mIAAA,sBAAsB,OAAA;AAC/B,kFAA+E;AAAtE,8HAAA,oBAAoB,OAAA"}
|
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { OnModuleInit } from "@nestjs/common";
|
|
2
|
+
import { ConfigService } from "@nestjs/config";
|
|
3
|
+
import { BaseConfigInterface } from "../../../config/interfaces";
|
|
1
4
|
import { WebSocketService } from "../../../core/websocket/services/websocket.service";
|
|
2
5
|
import { LLMService } from "../../../core/llm/services/llm.service";
|
|
3
6
|
import { GraphCatalogService } from "../../graph/services/graph.catalog.service";
|
|
@@ -10,7 +13,9 @@ import { TraverseTool } from "../../graph/tools/traverse.tool";
|
|
|
10
13
|
import { ResponderContextState } from "../contexts/responder.context";
|
|
11
14
|
export declare const MAX_TOOL_ITERATIONS = 15;
|
|
12
15
|
export declare const GRAPH_NODE_WALL_CLOCK_MS = 60000;
|
|
13
|
-
export declare
|
|
16
|
+
export declare const RETRY_INSTRUCTION = "Your previous attempt did not call any tools. You cannot answer a question about this system's data without first looking it up.\n\nYou must call at least one tool BEFORE producing a final answer. For a question that names an entity (a person, a place, an organisation, a project \u2014 anything that could correspond to a record in the graph), the first tool call is always:\n\n resolve_entity({ text: \"<the user's literal phrase>\" })\n\nInspect the returned candidates, pick a type, then call describe_entity and proceed with the typed tools (read_entity, search_entities, traverse) until you have the data the answer needs. Do not respond with prose alone \u2014 call the tool now.";
|
|
17
|
+
export declare const TRAVERSAL_RETRY_INSTRUCTION = "Your previous attempt answered without a single successful traverse call. A record's own fields describe it as it was when the record was written; what has happened to it since lives on the records that reference it, and those are reachable only by walking a relationship.\n\nDecide which case this question is:\n- If it asks what a record IS and that record's own fields fully answer it, return your answer unchanged.\n- Otherwise, call describe_entity on the subject's type if you have not already, pick the relationships that lead to the records referencing it, call traverse along each, read what comes back, and rebuild your answer from those records.\n\nDo not return the previous answer unchanged unless the first case truly applies.";
|
|
18
|
+
export declare class GraphNodeService implements OnModuleInit {
|
|
14
19
|
private readonly llm;
|
|
15
20
|
private readonly graph;
|
|
16
21
|
private readonly factory;
|
|
@@ -19,9 +24,13 @@ export declare class GraphNodeService {
|
|
|
19
24
|
private readonly searchTool;
|
|
20
25
|
private readonly readTool;
|
|
21
26
|
private readonly traverseTool;
|
|
27
|
+
private readonly configService;
|
|
22
28
|
private readonly ws?;
|
|
23
29
|
private readonly logger;
|
|
24
|
-
|
|
30
|
+
private readonly domain?;
|
|
31
|
+
private readonly graphTuning?;
|
|
32
|
+
constructor(llm: LLMService, graph: GraphCatalogService, factory: ToolFactory, resolveTool: ResolveEntityTool, describeTool: DescribeEntityTool, searchTool: SearchEntitiesTool, readTool: ReadEntityTool, traverseTool: TraverseTool, configService: ConfigService<BaseConfigInterface>, ws?: WebSocketService);
|
|
33
|
+
onModuleInit(): void;
|
|
25
34
|
execute(params: {
|
|
26
35
|
state: ResponderContextState;
|
|
27
36
|
}): Promise<Partial<ResponderContextState>>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"graph.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/graph.node.service.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"graph.node.service.d.ts","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/graph.node.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,YAAY,EAAY,MAAM,gBAAgB,CAAC;AAC5E,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAG/C,OAAO,EACL,mBAAmB,EAIpB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oDAAoD,CAAC;AACtF,OAAO,EAAE,UAAU,EAAE,MAAM,wCAAwC,CAAC;AAGpE,OAAO,EAAE,mBAAmB,EAAE,MAAM,4CAA4C,CAAC;AACjF,OAAO,EAAE,WAAW,EAAkB,MAAM,gCAAgC,CAAC;AAC7E,OAAO,EAAE,iBAAiB,EAAE,MAAM,uCAAuC,CAAC;AAC1E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAC;AAC5E,OAAO,EAAE,cAAc,EAAE,MAAM,oCAAoC,CAAC;AACpE,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAI/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,+BAA+B,CAAC;AAEtE,eAAO,MAAM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AAa;CAOtB"}
|
|
@@ -13,8 +13,9 @@ var __param = (this && this.__param) || function (paramIndex, decorator) {
|
|
|
13
13
|
};
|
|
14
14
|
var GraphNodeService_1;
|
|
15
15
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
exports.GraphNodeService = exports.GRAPH_NODE_WALL_CLOCK_MS = exports.MAX_TOOL_ITERATIONS = void 0;
|
|
16
|
+
exports.GraphNodeService = exports.TRAVERSAL_RETRY_INSTRUCTION = exports.RETRY_INSTRUCTION = exports.GRAPH_NODE_WALL_CLOCK_MS = exports.MAX_TOOL_ITERATIONS = void 0;
|
|
17
17
|
const common_1 = require("@nestjs/common");
|
|
18
|
+
const config_1 = require("@nestjs/config");
|
|
18
19
|
const zod_1 = require("zod");
|
|
19
20
|
const tools_1 = require("@langchain/core/tools");
|
|
20
21
|
const websocket_service_1 = require("../../../core/websocket/services/websocket.service");
|
|
@@ -31,14 +32,24 @@ const traverse_tool_1 = require("../../graph/tools/traverse.tool");
|
|
|
31
32
|
const graph_node_system_prompt_1 = require("../../graph/prompts/graph.node.system.prompt");
|
|
32
33
|
const humanize_tool_1 = require("../../graph/services/humanize-tool");
|
|
33
34
|
exports.MAX_TOOL_ITERATIONS = 15;
|
|
35
|
+
// Enforced at retry boundaries: once a turn has spent this budget (or the
|
|
36
|
+
// iteration cap) no further retry pass is launched — the in-flight llm.call
|
|
37
|
+
// itself cannot be interrupted mid-loop. Also labels `status` after the fact.
|
|
34
38
|
exports.GRAPH_NODE_WALL_CLOCK_MS = 60_000;
|
|
35
|
-
|
|
39
|
+
exports.RETRY_INSTRUCTION = `Your previous attempt did not call any tools. You cannot answer a question about this system's data without first looking it up.
|
|
36
40
|
|
|
37
|
-
You must call at least one tool BEFORE producing a final answer. For a question that names an entity (a
|
|
41
|
+
You must call at least one tool BEFORE producing a final answer. For a question that names an entity (a person, a place, an organisation, a project — anything that could correspond to a record in the graph), the first tool call is always:
|
|
38
42
|
|
|
39
43
|
resolve_entity({ text: "<the user's literal phrase>" })
|
|
40
44
|
|
|
41
45
|
Inspect the returned candidates, pick a type, then call describe_entity and proceed with the typed tools (read_entity, search_entities, traverse) until you have the data the answer needs. Do not respond with prose alone — call the tool now.`;
|
|
46
|
+
exports.TRAVERSAL_RETRY_INSTRUCTION = `Your previous attempt answered without a single successful traverse call. A record's own fields describe it as it was when the record was written; what has happened to it since lives on the records that reference it, and those are reachable only by walking a relationship.
|
|
47
|
+
|
|
48
|
+
Decide which case this question is:
|
|
49
|
+
- If it asks what a record IS and that record's own fields fully answer it, return your answer unchanged.
|
|
50
|
+
- Otherwise, call describe_entity on the subject's type if you have not already, pick the relationships that lead to the records referencing it, call traverse along each, read what comes back, and rebuild your answer from those records.
|
|
51
|
+
|
|
52
|
+
Do not return the previous answer unchanged unless the first case truly applies.`;
|
|
42
53
|
const APOLOGY_REGEX = /^\s*(i am sorry|i'm sorry|i am unable|i cannot|please provide|could you (please )?specify)/i;
|
|
43
54
|
const graphOutputSchema = zod_1.z.object({
|
|
44
55
|
answer: zod_1.z.string(),
|
|
@@ -54,7 +65,7 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
|
|
|
54
65
|
constructor(llm, graph,
|
|
55
66
|
// Preserved for DI shape compatibility with the (deleted) ChatbotService.
|
|
56
67
|
// Task 9.2 will decide whether to keep it. Do not remove.
|
|
57
|
-
factory, resolveTool, describeTool, searchTool, readTool, traverseTool, ws) {
|
|
68
|
+
factory, resolveTool, describeTool, searchTool, readTool, traverseTool, configService, ws) {
|
|
58
69
|
this.llm = llm;
|
|
59
70
|
this.graph = graph;
|
|
60
71
|
this.factory = factory;
|
|
@@ -63,8 +74,18 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
|
|
|
63
74
|
this.searchTool = searchTool;
|
|
64
75
|
this.readTool = readTool;
|
|
65
76
|
this.traverseTool = traverseTool;
|
|
77
|
+
this.configService = configService;
|
|
66
78
|
this.ws = ws;
|
|
67
79
|
this.logger = new common_1.Logger(GraphNodeService_1.name);
|
|
80
|
+
const prompts = this.configService.get("prompts");
|
|
81
|
+
this.domain = prompts?.graphNodeDomain;
|
|
82
|
+
this.graphTuning = this.configService.get("responder")?.graph;
|
|
83
|
+
}
|
|
84
|
+
onModuleInit() {
|
|
85
|
+
const t = this.graphTuning;
|
|
86
|
+
this.logger.log(`${(0, graph_node_system_prompt_1.describeDomainLayer)(this.domain)} | tier=${t?.modelWeight ?? "normal"} ` +
|
|
87
|
+
`effort=${t?.reasoningEffort ?? "tier-default"} ` +
|
|
88
|
+
`traversalGuard=${t?.requireTraversalBeforeAnswer ? "on" : "off"}`);
|
|
68
89
|
}
|
|
69
90
|
async execute(params) {
|
|
70
91
|
const state = params.state;
|
|
@@ -94,7 +115,7 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
|
|
|
94
115
|
}
|
|
95
116
|
const recorder = [];
|
|
96
117
|
const typeIndex = this.graph.getTypeIndexFor(ctx.userModuleIds);
|
|
97
|
-
const systemPrompt = (0, graph_node_system_prompt_1.renderGraphNodeSystemPrompt)(typeIndex);
|
|
118
|
+
const systemPrompt = (0, graph_node_system_prompt_1.renderGraphNodeSystemPrompt)(typeIndex, this.domain);
|
|
98
119
|
let tools = [
|
|
99
120
|
this.resolveTool.build(ctx, recorder),
|
|
100
121
|
this.describeTool.build(ctx, recorder),
|
|
@@ -140,47 +161,49 @@ let GraphNodeService = GraphNodeService_1 = class GraphNodeService {
|
|
|
140
161
|
content: m.content,
|
|
141
162
|
}));
|
|
142
163
|
const startedAt = Date.now();
|
|
164
|
+
// One shape for the first pass and every retry: same params, same knobs,
|
|
165
|
+
// same attribution — only the appended instruction differs. The graph
|
|
166
|
+
// tuning knobs (tier / effort) come from `responder.graph` config; unset
|
|
167
|
+
// keeps the Normal tier and its tier-default effort.
|
|
168
|
+
const call = (extraInstruction) => this.llm.call({
|
|
169
|
+
systemPrompts: extraInstruction ? [systemPrompt, extraInstruction] : [systemPrompt],
|
|
170
|
+
history,
|
|
171
|
+
outputSchema: graphOutputSchema,
|
|
172
|
+
inputParams: {
|
|
173
|
+
question: state.question,
|
|
174
|
+
contentScope: state.contentId && state.contentType ? `${state.contentType}:${state.contentId}` : null,
|
|
175
|
+
},
|
|
176
|
+
tools,
|
|
177
|
+
maxToolIterations: exports.MAX_TOOL_ITERATIONS,
|
|
178
|
+
temperature: 0.1,
|
|
179
|
+
...(this.graphTuning?.modelWeight !== undefined ? { modelWeight: this.graphTuning.modelWeight } : {}),
|
|
180
|
+
...(this.graphTuning?.reasoningEffort !== undefined
|
|
181
|
+
? { reasoningEffort: this.graphTuning.reasoningEffort }
|
|
182
|
+
: {}),
|
|
183
|
+
metadata: this.buildMetadata(state),
|
|
184
|
+
...this.attribution(state),
|
|
185
|
+
});
|
|
186
|
+
// The recorder is shared across passes, so retries stacked on a full
|
|
187
|
+
// first pass are how a single turn once reached 23 tool calls and 1.4M
|
|
188
|
+
// input tokens. A retry only launches while the turn has budget left; the
|
|
189
|
+
// zero-tool retry stays unconditional because an empty recorder means the
|
|
190
|
+
// iteration budget is untouched and no answer exists yet.
|
|
191
|
+
const retryBudgetLeft = () => recorder.length < exports.MAX_TOOL_ITERATIONS && Date.now() - startedAt < exports.GRAPH_NODE_WALL_CLOCK_MS;
|
|
143
192
|
try {
|
|
144
|
-
let response = await
|
|
145
|
-
systemPrompts: [systemPrompt],
|
|
146
|
-
history,
|
|
147
|
-
outputSchema: graphOutputSchema,
|
|
148
|
-
inputParams: {
|
|
149
|
-
question: state.question,
|
|
150
|
-
contentScope: state.contentId && state.contentType ? `${state.contentType}:${state.contentId}` : null,
|
|
151
|
-
},
|
|
152
|
-
tools,
|
|
153
|
-
maxToolIterations: exports.MAX_TOOL_ITERATIONS,
|
|
154
|
-
temperature: 0.1,
|
|
155
|
-
metadata: this.buildMetadata(state),
|
|
156
|
-
...this.attribution(state),
|
|
157
|
-
});
|
|
193
|
+
let response = await call();
|
|
158
194
|
// Zero-tool-call retry: the first attempt produced no searches at all.
|
|
159
195
|
// Re-invoke with an explicit instruction that data must be looked up
|
|
160
196
|
// before answering.
|
|
161
197
|
if (recorder.length === 0) {
|
|
162
198
|
this.logger.warn(`graph node: zero tool calls on first attempt — retrying with RETRY_INSTRUCTION`);
|
|
163
|
-
response = await
|
|
164
|
-
systemPrompts: [systemPrompt, RETRY_INSTRUCTION],
|
|
165
|
-
history,
|
|
166
|
-
outputSchema: graphOutputSchema,
|
|
167
|
-
inputParams: {
|
|
168
|
-
question: state.question,
|
|
169
|
-
contentScope: state.contentId && state.contentType ? `${state.contentType}:${state.contentId}` : null,
|
|
170
|
-
},
|
|
171
|
-
tools,
|
|
172
|
-
maxToolIterations: exports.MAX_TOOL_ITERATIONS,
|
|
173
|
-
temperature: 0.1,
|
|
174
|
-
metadata: this.buildMetadata(state),
|
|
175
|
-
...this.attribution(state),
|
|
176
|
-
});
|
|
199
|
+
response = await call(exports.RETRY_INSTRUCTION);
|
|
177
200
|
}
|
|
178
201
|
// Error-recovery retry: at least one tool call failed AND the model
|
|
179
202
|
// bounced an apology to the user instead of correcting and retrying.
|
|
180
203
|
// Force another pass with the failing call's error message in context.
|
|
181
204
|
const erroredCalls = recorder.filter((c) => c.error);
|
|
182
205
|
const answerSoundsApologetic = APOLOGY_REGEX.test(typeof response.answer === "string" ? response.answer : "");
|
|
183
|
-
if (erroredCalls.length > 0 && answerSoundsApologetic) {
|
|
206
|
+
if (erroredCalls.length > 0 && answerSoundsApologetic && retryBudgetLeft()) {
|
|
184
207
|
const lastError = erroredCalls[erroredCalls.length - 1];
|
|
185
208
|
const recoveryInstruction = `A previous tool call failed and you responded to the user with an apology instead of retrying. That is wrong — the user did not cause the error. Read the error message carefully, correct the arguments, and call the tool again.
|
|
186
209
|
|
|
@@ -191,20 +214,7 @@ Most recent failing call:
|
|
|
191
214
|
|
|
192
215
|
If the error lists valid fields or relationships, pick one of those and retry now. Do not respond to the user until the tool succeeds or you have exhausted sensible options. Do not open your final answer with "I am sorry" or "I cannot".`;
|
|
193
216
|
this.logger.warn(`graph node: ${erroredCalls.length} tool error(s) + apologetic answer — retrying with recovery prompt`);
|
|
194
|
-
response = await
|
|
195
|
-
systemPrompts: [systemPrompt, recoveryInstruction],
|
|
196
|
-
history,
|
|
197
|
-
outputSchema: graphOutputSchema,
|
|
198
|
-
inputParams: {
|
|
199
|
-
question: state.question,
|
|
200
|
-
contentScope: state.contentId && state.contentType ? `${state.contentType}:${state.contentId}` : null,
|
|
201
|
-
},
|
|
202
|
-
tools,
|
|
203
|
-
maxToolIterations: exports.MAX_TOOL_ITERATIONS,
|
|
204
|
-
temperature: 0.1,
|
|
205
|
-
metadata: this.buildMetadata(state),
|
|
206
|
-
...this.attribution(state),
|
|
207
|
-
});
|
|
217
|
+
response = await call(recoveryInstruction);
|
|
208
218
|
}
|
|
209
219
|
// Structural data-loading retry: the LLM made tool calls but none of
|
|
210
220
|
// them successfully loaded data (read_entity / search_entities /
|
|
@@ -214,7 +224,7 @@ If the error lists valid fields or relationships, pick one of those and retry no
|
|
|
214
224
|
// Detected structurally — no regex on answer text.
|
|
215
225
|
const dataLoadingTools = new Set(["read_entity", "search_entities", "traverse"]);
|
|
216
226
|
const dataToolCallsBefore = recorder.filter((c) => dataLoadingTools.has(c.tool) && !c.error).length;
|
|
217
|
-
if (recorder.length > 0 && dataToolCallsBefore === 0) {
|
|
227
|
+
if (recorder.length > 0 && dataToolCallsBefore === 0 && retryBudgetLeft()) {
|
|
218
228
|
const triedTools = Array.from(new Set(recorder.map((c) => c.tool))).join(", ");
|
|
219
229
|
const dataLoadingRetry = `Your previous attempt called ${triedTools} but never successfully loaded data with read_entity, search_entities, or traverse. The user asked a data question; you must answer it.
|
|
220
230
|
|
|
@@ -227,20 +237,24 @@ Steps to take now:
|
|
|
227
237
|
|
|
228
238
|
Proceed now. Do not refuse, do not ask the user to clarify, do not apologise.`;
|
|
229
239
|
this.logger.warn(`graph node: ${recorder.length} tool call(s), 0 successful data loads — retrying with data-loading instruction`);
|
|
230
|
-
response = await
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
}
|
|
240
|
+
response = await call(dataLoadingRetry);
|
|
241
|
+
}
|
|
242
|
+
// Traversal guard (opt-in via responder.graph.requireTraversalBeforeAnswer):
|
|
243
|
+
// tool calls happened — data may even have been read — but no edge was
|
|
244
|
+
// walked. That is the shape that answers a state question from the
|
|
245
|
+
// subject's own stale fields and presents the past as the present. One
|
|
246
|
+
// structural retry; the instruction explicitly lets a fields-only answer
|
|
247
|
+
// stand when the question is a pure identity lookup.
|
|
248
|
+
const successfulTraverses = recorder.filter((c) => c.tool === "traverse" && !c.error).length;
|
|
249
|
+
if (this.graphTuning?.requireTraversalBeforeAnswer && recorder.length > 0 && successfulTraverses === 0) {
|
|
250
|
+
if (retryBudgetLeft()) {
|
|
251
|
+
this.logger.warn(`graph node: ${recorder.length} tool call(s), 0 successful traverses — retrying with traversal instruction`);
|
|
252
|
+
response = await call(this.domain?.traversalRetry?.trim() || exports.TRAVERSAL_RETRY_INSTRUCTION);
|
|
253
|
+
}
|
|
254
|
+
else {
|
|
255
|
+
this.logger.warn(`graph node: traversal guard skipped — budget exhausted ` +
|
|
256
|
+
`(calls=${recorder.length}, elapsedMs=${Date.now() - startedAt})`);
|
|
257
|
+
}
|
|
244
258
|
}
|
|
245
259
|
// Honesty rewrite: even after the zero-tool retry the model produced no
|
|
246
260
|
// tool calls. Replace its `answer` with an explicit failure message
|
|
@@ -356,7 +370,7 @@ Proceed now. Do not refuse, do not ask the user to clarify, do not apologise.`;
|
|
|
356
370
|
exports.GraphNodeService = GraphNodeService;
|
|
357
371
|
exports.GraphNodeService = GraphNodeService = GraphNodeService_1 = __decorate([
|
|
358
372
|
(0, common_1.Injectable)(),
|
|
359
|
-
__param(
|
|
373
|
+
__param(9, (0, common_1.Optional)()),
|
|
360
374
|
__metadata("design:paramtypes", [llm_service_1.LLMService,
|
|
361
375
|
graph_catalog_service_1.GraphCatalogService,
|
|
362
376
|
tool_factory_1.ToolFactory,
|
|
@@ -365,6 +379,7 @@ exports.GraphNodeService = GraphNodeService = GraphNodeService_1 = __decorate([
|
|
|
365
379
|
search_entities_tool_1.SearchEntitiesTool,
|
|
366
380
|
read_entity_tool_1.ReadEntityTool,
|
|
367
381
|
traverse_tool_1.TraverseTool,
|
|
382
|
+
config_1.ConfigService,
|
|
368
383
|
websocket_service_1.WebSocketService])
|
|
369
384
|
], GraphNodeService);
|
|
370
385
|
//# sourceMappingURL=graph.node.service.js.map
|
|
@@ -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,2FAAuF;AACvF,sEAAuE;AACvE,sFAAiF;AACjF,iEAA6E;AAC7E,+EAA0E;AAC1E,iFAA4E;AAC5E,iFAA4E;AAC5E,yEAAoE;AACpE,mEAA+D;AAC/D,2FAA2F;AAC3F,sEAAuF;AAI1E,QAAA,mBAAmB,GAAG,EAAE,CAAC;AACzB,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAE/C,MAAM,iBAAiB,GAAG;;;;;;iPAMuN,CAAC;AAElP,MAAM,aAAa,GAAG,6FAA6F,CAAC;AAEpH,MAAM,iBAAiB,GAAG,OAAC,CAAC,MAAM,CAAC;IACjC,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;IAClB,QAAQ,EAAE,OAAC,CAAC,KAAK,CACf,OAAC,CAAC,MAAM,CAAC;QACP,IAAI,EAAE,OAAC,CAAC,MAAM,EAAE;QAChB,EAAE,EAAE,OAAC,CAAC,MAAM,EAAE;QACd,MAAM,EAAE,OAAC,CAAC,MAAM,EAAE;QAClB,MAAM,EAAE,OAA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A,yCAAqB,EAAC;YAC3B,cAAc,EAAE,gCAAc,CAAC,SAAS;YACxC,OAAO,EAAE,KAAK,CAAC,OAAO;YACtB,SAAS,EAAE,KAAK,CAAC,SAAS;YAC1B,UAAU,EAAE,KAAK,CAAC,UAAU;YAC5B,WAAW,EAAE,KAAK,CAAC,WAAW;SAC/B,CAAC,CAAC;IACL,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;AA/UY,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,CA+U5B"}
|
|
1
|
+
{"version":3,"file":"graph.node.service.js","sourceRoot":"","sources":["../../../../src/agents/responder/nodes/graph.node.service.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAA4E;AAC5E,2CAA+C;AAC/C,6BAAwB;AACxB,iDAA8D;AAO9D,0FAAsF;AACtF,wEAAoE;AACpE,2FAAuF;AACvF,sEAAuE;AACvE,sFAAiF;AACjF,iEAA6E;AAC7E,+EAA0E;AAC1E,iFAA4E;AAC5E,iFAA4E;AAC5E,yEAAoE;AACpE,mEAA+D;AAC/D,2FAAgH;AAChH,sEAAuF;AAI1E,QAAA,mBAAmB,GAAG,EAAE,CAAC;AACtC,0EAA0E;AAC1E,4EAA4E;AAC5E,8EAA8E;AACjE,QAAA,wBAAwB,GAAG,MAAM,CAAC;AAElC,QAAA,iBAAiB,GAAG;;;;;;iPAMgN,CAAC;AAErO,QAAA,2BAA2B,GAAG;;;;;;iFAMsC,CAAC;AAElF,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AE,KAAK,CAAC,WAAW;SAC/B,CAAC,CAAC;IACL,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;AA9VY,4CAAgB;2BAAhB,gBAAgB;IAD5B,IAAA,mBAAU,GAAE;IAmBR,WAAA,IAAA,iBAAQ,GAAE,CAAA;qCAZW,wBAAU;QACR,2CAAmB;QAIjB,0BAAW;QACP,uCAAiB;QAChB,yCAAkB;QACpB,yCAAkB;QACpB,iCAAc;QACV,4BAAY;QACX,sBAAa;QACX,oCAAgB;GAlBzC,gBAAgB,CA8V5B"}
|
|
@@ -1,3 +1,22 @@
|
|
|
1
|
+
export interface GraphNodeDomainPrompts {
|
|
2
|
+
/** What this system's data is about. Opens the prompt. */
|
|
3
|
+
role?: string;
|
|
4
|
+
/** How far to traverse before answering. Rendered after the tool list. */
|
|
5
|
+
depth?: string;
|
|
6
|
+
/** Worked example for same-name candidates of different types. */
|
|
7
|
+
disambiguation?: string;
|
|
8
|
+
/** Storage conventions the catalogue cannot express (units, encodings). */
|
|
9
|
+
dataConventions?: string;
|
|
10
|
+
/** How to render values in `answer` — formatting, output language. */
|
|
11
|
+
outputRules?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Not a kernel slot: overrides the traversal-guard retry instruction sent
|
|
14
|
+
* when `responder.graph.requireTraversalBeforeAnswer` is on and a turn made
|
|
15
|
+
* tool calls without one successful `traverse`. Falls back to the library's
|
|
16
|
+
* neutral instruction when unset.
|
|
17
|
+
*/
|
|
18
|
+
traversalRetry?: string;
|
|
19
|
+
}
|
|
1
20
|
export interface ConfigPromptsInterface {
|
|
2
21
|
graphCreator?: string;
|
|
3
22
|
/**
|
|
@@ -48,6 +67,16 @@ export interface ConfigPromptsInterface {
|
|
|
48
67
|
};
|
|
49
68
|
/** Temperature for the responder answer node's LLM call. Default 0.1. */
|
|
50
69
|
responderTemperature?: number;
|
|
70
|
+
/**
|
|
71
|
+
* Domain layer for the graph retrieval branch.
|
|
72
|
+
*
|
|
73
|
+
* The kernel prompt states no domain: it serves an ERP, a legal practice
|
|
74
|
+
* system and a campaign planner, and a prompt that names one of them is
|
|
75
|
+
* wrong for the other two. Every slot is optional and falls back to the
|
|
76
|
+
* kernel; an app that supplies nothing gets a generic but complete prompt,
|
|
77
|
+
* not a broken one.
|
|
78
|
+
*/
|
|
79
|
+
graphNodeDomain?: GraphNodeDomainPrompts;
|
|
51
80
|
planner?: string;
|
|
52
81
|
operator?: string;
|
|
53
82
|
summariser?: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.prompts.interface.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/config.prompts.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,8BAA8B,CAAC,EAAE;QAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,cAAc,CAAC,EAAE;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B;;;;;WAKG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;;;WAKG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
1
|
+
{"version":3,"file":"config.prompts.interface.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/config.prompts.interface.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,sBAAsB;IACrC,0DAA0D;IAC1D,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,0EAA0E;IAC1E,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,2EAA2E;IAC3E,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,sEAAsE;IACtE,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,sBAAsB;IACrC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB;;;;;;;;;OASG;IACH,8BAA8B,CAAC,EAAE;QAC/B,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,UAAU,CAAC,EAAE,MAAM,CAAC;QACpB,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC,CAAC;IACF,cAAc,CAAC,EAAE;QACf,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,YAAY,CAAC,EAAE,MAAM,CAAC;QACtB,mBAAmB,CAAC,EAAE,MAAM,CAAC;QAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B;;;;;WAKG;QACH,KAAK,CAAC,EAAE,MAAM,CAAC;QACf;;;;;WAKG;QACH,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;;;OAKG;IACH,2BAA2B,CAAC,EAAE;QAC5B,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,WAAW,CAAC,EAAE,MAAM,CAAC;KACtB,CAAC;IACF,yEAAyE;IACzE,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,sBAAsB,CAAC;IACzC,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE;QACX,GAAG,CAAC,EAAE,MAAM,CAAC;QACb,OAAO,CAAC,EAAE,MAAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF,mBAAmB,CAAC,EAAE,MAAM,CAAC;IAC7B,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB"}
|
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
import { ModelWeight } from "../../core/llm/enums/model.weight";
|
|
2
|
+
import { ReasoningEffort } from "../../core/llm/enums/reasoning.effort";
|
|
1
3
|
/**
|
|
2
4
|
* Responder agent configuration.
|
|
3
5
|
*
|
|
@@ -17,5 +19,31 @@ export interface ConfigResponderInterface {
|
|
|
17
19
|
/** DRIFT (community-based) branch. */
|
|
18
20
|
drift?: boolean;
|
|
19
21
|
};
|
|
22
|
+
/**
|
|
23
|
+
* Graph-branch tuning. The graph node's tool loop is the responder's most
|
|
24
|
+
* token-hungry call, and reasoning effort measurably changes whether a model
|
|
25
|
+
* traverses at all — these knobs let an app choose deliberately instead of
|
|
26
|
+
* inheriting the Normal tier's defaults. Omitted = previous behaviour
|
|
27
|
+
* (Normal tier, tier-default effort, no traversal guard).
|
|
28
|
+
*/
|
|
29
|
+
graph?: {
|
|
30
|
+
/** Model tier for the graph tool loop and its retries. Default Normal. */
|
|
31
|
+
modelWeight?: ModelWeight;
|
|
32
|
+
/**
|
|
33
|
+
* Reasoning effort for the graph tool loop. Overrides the tier default.
|
|
34
|
+
* Low-effort reasoning models have been observed answering a state
|
|
35
|
+
* question from a record's own stale fields without traversing.
|
|
36
|
+
*/
|
|
37
|
+
reasoningEffort?: ReasoningEffort;
|
|
38
|
+
/**
|
|
39
|
+
* When true, a turn that made tool calls but ended with zero successful
|
|
40
|
+
* `traverse` calls gets one structural retry telling the model to walk
|
|
41
|
+
* the graph — or to explicitly stand by a fields-only answer when the
|
|
42
|
+
* question is a pure identity lookup. Off by default: identity lookups
|
|
43
|
+
* legitimately need no traversal, and the retry costs one model round.
|
|
44
|
+
* The instruction is overridable via `prompts.graphNodeDomain.traversalRetry`.
|
|
45
|
+
*/
|
|
46
|
+
requireTraversalBeforeAnswer?: boolean;
|
|
47
|
+
};
|
|
20
48
|
}
|
|
21
49
|
//# sourceMappingURL=config.responder.interface.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.responder.interface.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/config.responder.interface.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,mDAAmD;QACnD,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,kDAAkD;QAClD,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,sCAAsC;QACtC,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;CACH"}
|
|
1
|
+
{"version":3,"file":"config.responder.interface.d.ts","sourceRoot":"","sources":["../../../src/config/interfaces/config.responder.interface.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,mCAAmC,CAAC;AAChE,OAAO,EAAE,eAAe,EAAE,MAAM,uCAAuC,CAAC;AAExE;;;;;;GAMG;AACH,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,QAAQ,CAAC,EAAE;QACT,mDAAmD;QACnD,KAAK,CAAC,EAAE,OAAO,CAAC;QAChB,kDAAkD;QAClD,cAAc,CAAC,EAAE,OAAO,CAAC;QACzB,sCAAsC;QACtC,KAAK,CAAC,EAAE,OAAO,CAAC;KACjB,CAAC;IACF;;;;;;OAMG;IACH,KAAK,CAAC,EAAE;QACN,0EAA0E;QAC1E,WAAW,CAAC,EAAE,WAAW,CAAC;QAC1B;;;;WAIG;QACH,eAAe,CAAC,EAAE,eAAe,CAAC;QAClC;;;;;;;WAOG;QACH,4BAA4B,CAAC,EAAE,OAAO,CAAC;KACxC,CAAC;CACH"}
|
|
@@ -7,6 +7,21 @@ export declare class CacheService implements OnModuleDestroy {
|
|
|
7
7
|
private readonly logger;
|
|
8
8
|
private readonly configService;
|
|
9
9
|
private redis;
|
|
10
|
+
/**
|
|
11
|
+
* Both key spaces are namespaced with `redis.queue` (REDIS_QUEUE), the same
|
|
12
|
+
* per-project namespace BullMQ already uses as its `prefix`
|
|
13
|
+
* (core/queue/queue.module.ts). Without it these keys were bare
|
|
14
|
+
* `api_cache:` / `element:` — global to the Redis INSTANCE — so two stacks
|
|
15
|
+
* sharing one Redis (a dev and an e2e stack of the same app, or two
|
|
16
|
+
* deployments) would read each other's cached responses whenever a user id
|
|
17
|
+
* collided, which for a seeded e2e stack is by construction. Worse, the
|
|
18
|
+
* pattern-based invalidators below call `redis.keys("element:*")` and
|
|
19
|
+
* `keys("api_cache:*")`: unprefixed, one stack's invalidation would delete
|
|
20
|
+
* another's entries.
|
|
21
|
+
*
|
|
22
|
+
* Falls back to the bare prefixes when no queue namespace is configured, so
|
|
23
|
+
* an app that never set REDIS_QUEUE keeps its existing key layout.
|
|
24
|
+
*/
|
|
10
25
|
private readonly CACHE_KEY_PREFIX;
|
|
11
26
|
private readonly ELEMENT_KEY_PREFIX;
|
|
12
27
|
constructor(logger: AppLoggingService, configService: ConfigService<BaseConfigInterface>);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.service.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/services/cache.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAA8C,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAgB3E,qBACa,YAAa,YAAW,eAAe;
|
|
1
|
+
{"version":3,"file":"cache.service.d.ts","sourceRoot":"","sources":["../../../../src/core/cache/services/cache.service.ts"],"names":[],"mappings":"AAAA,OAAO,EAAc,eAAe,EAAE,MAAM,gBAAgB,CAAC;AAC7D,OAAO,EAAE,aAAa,EAAE,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,mBAAmB,EAA8C,MAAM,4BAA4B,CAAC;AAC7G,OAAO,EAAE,iBAAiB,EAAE,MAAM,wCAAwC,CAAC;AAgB3E,qBACa,YAAa,YAAW,eAAe;IAsBhD,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAtBhC,OAAO,CAAC,KAAK,CAAQ;IAErB;;;;;;;;;;;;;;OAcG;IACH,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAS;IAC1C,OAAO,CAAC,QAAQ,CAAC,kBAAkB,CAAS;gBAGzB,MAAM,EAAE,iBAAiB,E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C;IAgB/B,WAAW,CAAC,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO;IAiBjD,OAAO,CAAC,UAAU;IA0BlB,cAAc,IAAI,KAAK;IAIjB,eAAe;CAQtB"}
|
|
@@ -18,9 +18,10 @@ let CacheService = class CacheService {
|
|
|
18
18
|
constructor(logger, configService) {
|
|
19
19
|
this.logger = logger;
|
|
20
20
|
this.configService = configService;
|
|
21
|
-
this.CACHE_KEY_PREFIX = "api_cache:";
|
|
22
|
-
this.ELEMENT_KEY_PREFIX = "element:";
|
|
23
21
|
const redisConfig = this.configService.get("redis");
|
|
22
|
+
const namespace = redisConfig?.queue ? `${redisConfig.queue}:` : "";
|
|
23
|
+
this.CACHE_KEY_PREFIX = `${namespace}api_cache:`;
|
|
24
|
+
this.ELEMENT_KEY_PREFIX = `${namespace}element:`;
|
|
24
25
|
this.redis = new ioredis_1.Redis({
|
|
25
26
|
host: redisConfig.host,
|
|
26
27
|
port: redisConfig.port,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cache.service.js","sourceRoot":"","sources":["../../../../src/core/cache/services/cache.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6D;AAC7D,2CAA+C;AAC/C,qCAAgC;AAEhC,4EAA2E;AAiBpE,IAAM,YAAY,GAAlB,MAAM,YAAY;
|
|
1
|
+
{"version":3,"file":"cache.service.js","sourceRoot":"","sources":["../../../../src/core/cache/services/cache.service.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,2CAA6D;AAC7D,2CAA+C;AAC/C,qCAAgC;AAEhC,4EAA2E;AAiBpE,IAAM,YAAY,GAAlB,MAAM,YAAY;IAqBvB,YACmB,MAAyB,EACzB,aAAiD;QADjD,WAAM,GAAN,MAAM,CAAmB;QACzB,kBAAa,GAAb,aAAa,CAAoC;QAElE,MAAM,WAAW,GAAG,IAAI,CAAC,aAAa,CAAC,GAAG,CAAuB,OAAO,CAAC,CAAC;QAE1E,MA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