@memberjunction/ai-agents 6.2.0-edge.1 → 6.2.0-edge.2
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/README.md +18 -0
- package/dist/AgentDecisionService.d.ts +83 -0
- package/dist/AgentDecisionService.d.ts.map +1 -0
- package/dist/AgentDecisionService.js +155 -0
- package/dist/AgentDecisionService.js.map +1 -0
- package/dist/AgentRunner.d.ts +7 -0
- package/dist/AgentRunner.d.ts.map +1 -1
- package/dist/AgentRunner.js +16 -5
- package/dist/AgentRunner.js.map +1 -1
- package/dist/KnowledgeAgent.d.ts.map +1 -1
- package/dist/KnowledgeAgent.js +6 -6
- package/dist/KnowledgeAgent.js.map +1 -1
- package/dist/PayloadFeedbackManager.d.ts +113 -14
- package/dist/PayloadFeedbackManager.d.ts.map +1 -1
- package/dist/PayloadFeedbackManager.js +228 -88
- package/dist/PayloadFeedbackManager.js.map +1 -1
- package/dist/agent-context-injector.d.ts +47 -3
- package/dist/agent-context-injector.d.ts.map +1 -1
- package/dist/agent-context-injector.js +77 -10
- package/dist/agent-context-injector.js.map +1 -1
- package/dist/agent-memory-context-builder.d.ts +13 -0
- package/dist/agent-memory-context-builder.d.ts.map +1 -1
- package/dist/agent-memory-context-builder.js +24 -5
- package/dist/agent-memory-context-builder.js.map +1 -1
- package/dist/agent-types/flow-agent-type.d.ts +97 -0
- package/dist/agent-types/flow-agent-type.d.ts.map +1 -1
- package/dist/agent-types/flow-agent-type.js +281 -24
- package/dist/agent-types/flow-agent-type.js.map +1 -1
- package/dist/agent-types/flow-graph-executor.d.ts +12 -1
- package/dist/agent-types/flow-graph-executor.d.ts.map +1 -1
- package/dist/agent-types/flow-graph-executor.js +25 -1
- package/dist/agent-types/flow-graph-executor.js.map +1 -1
- package/dist/agent-types/loop-agent-prompt-params.d.ts +239 -66
- package/dist/agent-types/loop-agent-prompt-params.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-prompt-params.js +47 -2
- package/dist/agent-types/loop-agent-prompt-params.js.map +1 -1
- package/dist/agent-types/loop-agent-response-type.d.ts +12 -1
- package/dist/agent-types/loop-agent-response-type.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-response-type.js.map +1 -1
- package/dist/agent-types/loop-agent-type.d.ts +6 -0
- package/dist/agent-types/loop-agent-type.d.ts.map +1 -1
- package/dist/agent-types/loop-agent-type.js +42 -3
- package/dist/agent-types/loop-agent-type.js.map +1 -1
- package/dist/base-agent.d.ts +492 -2
- package/dist/base-agent.d.ts.map +1 -1
- package/dist/base-agent.js +1686 -95
- package/dist/base-agent.js.map +1 -1
- package/dist/catalog-narrowing.d.ts +136 -0
- package/dist/catalog-narrowing.d.ts.map +1 -0
- package/dist/catalog-narrowing.js +212 -0
- package/dist/catalog-narrowing.js.map +1 -0
- package/dist/decision-discovery.d.ts +401 -0
- package/dist/decision-discovery.d.ts.map +1 -0
- package/dist/decision-discovery.js +511 -0
- package/dist/decision-discovery.js.map +1 -0
- package/dist/finish-if-mode-warnings.d.ts +39 -0
- package/dist/finish-if-mode-warnings.d.ts.map +1 -0
- package/dist/finish-if-mode-warnings.js +78 -0
- package/dist/finish-if-mode-warnings.js.map +1 -0
- package/dist/finish-if-state.d.ts +72 -0
- package/dist/finish-if-state.d.ts.map +1 -0
- package/dist/finish-if-state.js +109 -0
- package/dist/finish-if-state.js.map +1 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -1
- package/dist/memory-manager-agent.d.ts +108 -2
- package/dist/memory-manager-agent.d.ts.map +1 -1
- package/dist/memory-manager-agent.js +172 -9
- package/dist/memory-manager-agent.js.map +1 -1
- package/dist/memory-note-gate.d.ts +208 -0
- package/dist/memory-note-gate.d.ts.map +1 -0
- package/dist/memory-note-gate.js +294 -0
- package/dist/memory-note-gate.js.map +1 -0
- package/dist/realtime/bridge-realtime-session-factory.d.ts +5 -2
- package/dist/realtime/bridge-realtime-session-factory.d.ts.map +1 -1
- package/dist/realtime/bridge-realtime-session-factory.js +7 -4
- package/dist/realtime/bridge-realtime-session-factory.js.map +1 -1
- package/dist/realtime/bridge-room-transcript-sink.d.ts.map +1 -1
- package/dist/realtime/bridge-room-transcript-sink.js +15 -9
- package/dist/realtime/bridge-room-transcript-sink.js.map +1 -1
- package/dist/realtime/realtime-client-session-service.d.ts +54 -12
- package/dist/realtime/realtime-client-session-service.d.ts.map +1 -1
- package/dist/realtime/realtime-client-session-service.js +76 -25
- package/dist/realtime/realtime-client-session-service.js.map +1 -1
- package/dist/realtime/realtime-vendor-resolution.d.ts +8 -3
- package/dist/realtime/realtime-vendor-resolution.d.ts.map +1 -1
- package/dist/realtime/realtime-vendor-resolution.js +3 -3
- package/dist/realtime/realtime-vendor-resolution.js.map +1 -1
- package/dist/rubric-evaluation-agent-runner.d.ts +2 -0
- package/dist/rubric-evaluation-agent-runner.d.ts.map +1 -0
- package/dist/rubric-evaluation-agent-runner.js +38 -0
- package/dist/rubric-evaluation-agent-runner.js.map +1 -0
- package/dist/self-check.d.ts +98 -0
- package/dist/self-check.d.ts.map +1 -0
- package/dist/self-check.js +74 -0
- package/dist/self-check.js.map +1 -0
- package/package.json +19 -18
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finish-if-mode-warnings.js","sourceRoot":"","sources":["../src/finish-if-mode-warnings.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,wCAAwC,CAAC;AAEzF,wFAAwF;AACxF,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,iGAAiG;AACjG,MAAM,CAAC,MAAM,kCAAkC,GAAG,IAAI,CAAC;AAEvD;;;;;;;;;;;;;;GAcG;AACH,MAAM,OAAO,oBAAoB;IAG7B,YAAY,gBAAwB,kCAAkC;QAClE,IAAI,CAAC,QAAQ,GAAG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AAC,MAAM,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,MAAM,KAAK,CAAC,MAAM,cAAc,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;IACpH,CAAC;IACD,MAAM,IAAI,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC;IAC3B,OAAO,IAAI,CAAC,MAAM,GAAG,gCAAgC;QACjD,CAAC,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,gCAAgC,CAAC,MAAM,IAAI,CAAC,MAAM,sBAAsB;QAC3F,CAAC,CAAC,IAAI,CAAC;AACf,CAAC;AAED,gFAAgF;AAChF,SAAS,MAAM,CAAC,KAAc;IAC1B,IAAI,CAAC;QACD,OAAO,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,IAAI,MAAM,CAAC,KAAK,CAAC,CAAC;IAClD,CAAC;IAAC,MAAM,CAAC;QACL,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC;IACzB,CAAC;AACL,CAAC"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The finishIf gate's pure parts: the state it shows the decision model, the questions
|
|
3
|
+
* it asks, the rule that judges the answers, and the check that a finishIf is well formed.
|
|
4
|
+
*
|
|
5
|
+
* BaseAgent runs the gate with these, and the finishIf replay eval applies them to recorded runs, so
|
|
6
|
+
* the eval measures exactly what production does. They take no agent, run or database.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/ai-agents
|
|
9
|
+
*/
|
|
10
|
+
import type { DecisionAnswer, DecisionQuestion } from '@memberjunction/ai';
|
|
11
|
+
import type { ActionParam } from '@memberjunction/actions-base';
|
|
12
|
+
import type { AgentFinishIf, BaseAgentNextStep, ExecuteAgentResult } from '@memberjunction/ai-core-plus';
|
|
13
|
+
/** The most text of a step's results the finishIf gate sends to the decision model. */
|
|
14
|
+
export declare const FINISH_IF_STATE_MAX = 16000;
|
|
15
|
+
/** How much of the finishIf state the `Finish check` step records. */
|
|
16
|
+
export declare const FINISH_IF_STATE_EXCERPT = 2000;
|
|
17
|
+
/** The most characters of an action's message the state carries. */
|
|
18
|
+
export declare const FINISH_IF_ACTION_MESSAGE_MAX = 1000;
|
|
19
|
+
/** The most characters of one output param the state carries. */
|
|
20
|
+
export declare const FINISH_IF_ACTION_PARAM_MAX = 2000;
|
|
21
|
+
/** The most characters of a sub-agent's final message, and of its payload, the state carries. */
|
|
22
|
+
export declare const FINISH_IF_SUB_AGENT_PART_MAX = 4000;
|
|
23
|
+
/** The fewest and most questions a finishIf may carry. */
|
|
24
|
+
export declare const FINISH_IF_MIN_QUESTIONS = 1;
|
|
25
|
+
export declare const FINISH_IF_MAX_QUESTIONS = 3;
|
|
26
|
+
/**
|
|
27
|
+
* What the formatter reads of one action's result. BaseAgent's own action summary has this shape,
|
|
28
|
+
* so its members keep that summary's casing.
|
|
29
|
+
*/
|
|
30
|
+
export interface FinishIfActionResult {
|
|
31
|
+
/** The action's name. */
|
|
32
|
+
actionName: string;
|
|
33
|
+
/** The action's result message. */
|
|
34
|
+
message: string;
|
|
35
|
+
/** The action's output params, already filtered to Output and Both. */
|
|
36
|
+
params?: ActionParam[];
|
|
37
|
+
}
|
|
38
|
+
/**
|
|
39
|
+
* A Sub-Agent step's result. The child and related paths spread the sub-agent's own
|
|
40
|
+
* `ExecuteAgentResult` into it, so its final message and returned payload are there too.
|
|
41
|
+
*/
|
|
42
|
+
export type SubAgentStepResult<P> = BaseAgentNextStep<P> & Partial<Pick<ExecuteAgentResult, 'agentRun' | 'payload'>>;
|
|
43
|
+
/** The outcome of a finishIf gate. */
|
|
44
|
+
export interface FinishIfOutcome {
|
|
45
|
+
/** Whether every question reached the threshold. */
|
|
46
|
+
Passed: boolean;
|
|
47
|
+
/** Each answered question's probability, by key. */
|
|
48
|
+
Probabilities: Record<string, number>;
|
|
49
|
+
/** Why the gate passed or did not. */
|
|
50
|
+
Reason: string;
|
|
51
|
+
}
|
|
52
|
+
/** Cuts the state to {@link FINISH_IF_STATE_MAX} characters. */
|
|
53
|
+
export declare function CapFinishIfState(text: string): string;
|
|
54
|
+
/** One action's result as finishIf text: its name, outcome, message and sanitized output params. */
|
|
55
|
+
export declare function FormatActionForFinishIf(summary: FinishIfActionResult): string;
|
|
56
|
+
/** A sub-agent's result as finishIf text: its final message and the payload it returned. */
|
|
57
|
+
export declare function FormatSubAgentForFinishIf<P>(result: SubAgentStepResult<P>): string;
|
|
58
|
+
/** The finishIf questions as Likelihood questions, keyed `q1`, `q2`, … in order. */
|
|
59
|
+
export declare function BuildFinishIfQuestions(finishIf: Pick<AgentFinishIf, 'questions'>): Record<string, DecisionQuestion>;
|
|
60
|
+
/**
|
|
61
|
+
* The gate's rule: it passes only when every question has a Likelihood answer whose probability
|
|
62
|
+
* reaches the threshold. A missing answer, an answer of another kind, and a probability that is not
|
|
63
|
+
* a number all fail it, and so does an empty question set: the gate fails closed.
|
|
64
|
+
*
|
|
65
|
+
* @param answers The decision's answers, by question key.
|
|
66
|
+
* @param questions The questions asked, from {@link BuildFinishIfQuestions}.
|
|
67
|
+
* @param threshold The probability each answer must reach.
|
|
68
|
+
*/
|
|
69
|
+
export declare function JudgeFinishIf(answers: Record<string, DecisionAnswer>, questions: Record<string, DecisionQuestion>, threshold: number): FinishIfOutcome;
|
|
70
|
+
/** A valid finishIf has one to three non-empty string questions and a non-empty string message. */
|
|
71
|
+
export declare function IsValidFinishIf(candidate: unknown): candidate is AgentFinishIf;
|
|
72
|
+
//# sourceMappingURL=finish-if-state.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finish-if-state.d.ts","sourceRoot":"","sources":["../src/finish-if-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,OAAO,KAAK,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA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CAAC,EAAE,MAAM,EAAE,kBAAkB,CAAC,CAAC,CAAC,GAAG,MAAM,CAQlF;AAED,oFAAoF;AACpF,wBAAgB,sBAAsB,CAAC,QAAQ,EAAE,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,CAMnH;AAED;;;;;;;;GAQG;AACH,wBAAgB,aAAa,CACzB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,cAAc,CAAC,EACvC,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,gBAAgB,CAAC,EAC3C,SAAS,EAAE,MAAM,GAClB,eAAe,CAsBjB;AAED,mGAAmG;AACnG,wBAAgB,eAAe,CAAC,SAAS,EAAE,OAAO,GAAG,SAAS,IAAI,aAAa,CAW9E"}
|
|
@@ -0,0 +1,109 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview The finishIf gate's pure parts: the state it shows the decision model, the questions
|
|
3
|
+
* it asks, the rule that judges the answers, and the check that a finishIf is well formed.
|
|
4
|
+
*
|
|
5
|
+
* BaseAgent runs the gate with these, and the finishIf replay eval applies them to recorded runs, so
|
|
6
|
+
* the eval measures exactly what production does. They take no agent, run or database.
|
|
7
|
+
*
|
|
8
|
+
* @module @memberjunction/ai-agents
|
|
9
|
+
*/
|
|
10
|
+
/** The most text of a step's results the finishIf gate sends to the decision model. */
|
|
11
|
+
export const FINISH_IF_STATE_MAX = 16000;
|
|
12
|
+
/** How much of the finishIf state the `Finish check` step records. */
|
|
13
|
+
export const FINISH_IF_STATE_EXCERPT = 2000;
|
|
14
|
+
/** The most characters of an action's message the state carries. */
|
|
15
|
+
export const FINISH_IF_ACTION_MESSAGE_MAX = 1000;
|
|
16
|
+
/** The most characters of one output param the state carries. */
|
|
17
|
+
export const FINISH_IF_ACTION_PARAM_MAX = 2000;
|
|
18
|
+
/** The most characters of a sub-agent's final message, and of its payload, the state carries. */
|
|
19
|
+
export const FINISH_IF_SUB_AGENT_PART_MAX = 4000;
|
|
20
|
+
/** The fewest and most questions a finishIf may carry. */
|
|
21
|
+
export const FINISH_IF_MIN_QUESTIONS = 1;
|
|
22
|
+
export const FINISH_IF_MAX_QUESTIONS = 3;
|
|
23
|
+
/** Cuts the state to {@link FINISH_IF_STATE_MAX} characters. */
|
|
24
|
+
export function CapFinishIfState(text) {
|
|
25
|
+
return text.length > FINISH_IF_STATE_MAX ? text.slice(0, FINISH_IF_STATE_MAX) : text;
|
|
26
|
+
}
|
|
27
|
+
/** A value as text, cut to `max` characters: a string as it is, anything else as JSON. */
|
|
28
|
+
function jsonExcerpt(value, max) {
|
|
29
|
+
let text;
|
|
30
|
+
try {
|
|
31
|
+
text = typeof value === 'string' ? value : JSON.stringify(value) ?? '';
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
text = String(value);
|
|
35
|
+
}
|
|
36
|
+
return text.slice(0, max);
|
|
37
|
+
}
|
|
38
|
+
/** One action's result as finishIf text: its name, outcome, message and sanitized output params. */
|
|
39
|
+
export function FormatActionForFinishIf(summary) {
|
|
40
|
+
const lines = [`Action: ${summary.actionName}`, `Message: ${String(summary.message ?? '').slice(0, FINISH_IF_ACTION_MESSAGE_MAX)}`];
|
|
41
|
+
for (const param of summary.params ?? []) {
|
|
42
|
+
lines.push(`Output ${param.Name}: ${jsonExcerpt(param.Value, FINISH_IF_ACTION_PARAM_MAX)}`);
|
|
43
|
+
}
|
|
44
|
+
return lines.join('\n');
|
|
45
|
+
}
|
|
46
|
+
/** A sub-agent's result as finishIf text: its final message and the payload it returned. */
|
|
47
|
+
export function FormatSubAgentForFinishIf(result) {
|
|
48
|
+
const message = result.agentRun?.Message ?? result.message ?? '';
|
|
49
|
+
const payload = result.payload ?? result.newPayload;
|
|
50
|
+
const lines = [`Final message: ${String(message).slice(0, FINISH_IF_SUB_AGENT_PART_MAX)}`];
|
|
51
|
+
if (payload !== undefined && payload !== null) {
|
|
52
|
+
lines.push(`Payload: ${jsonExcerpt(payload, FINISH_IF_SUB_AGENT_PART_MAX)}`);
|
|
53
|
+
}
|
|
54
|
+
return CapFinishIfState(lines.join('\n\n'));
|
|
55
|
+
}
|
|
56
|
+
/** The finishIf questions as Likelihood questions, keyed `q1`, `q2`, … in order. */
|
|
57
|
+
export function BuildFinishIfQuestions(finishIf) {
|
|
58
|
+
const questions = {};
|
|
59
|
+
finishIf.questions.forEach((question, i) => {
|
|
60
|
+
questions[`q${i + 1}`] = { Kind: 'Likelihood', Instructions: question };
|
|
61
|
+
});
|
|
62
|
+
return questions;
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* The gate's rule: it passes only when every question has a Likelihood answer whose probability
|
|
66
|
+
* reaches the threshold. A missing answer, an answer of another kind, and a probability that is not
|
|
67
|
+
* a number all fail it, and so does an empty question set: the gate fails closed.
|
|
68
|
+
*
|
|
69
|
+
* @param answers The decision's answers, by question key.
|
|
70
|
+
* @param questions The questions asked, from {@link BuildFinishIfQuestions}.
|
|
71
|
+
* @param threshold The probability each answer must reach.
|
|
72
|
+
*/
|
|
73
|
+
export function JudgeFinishIf(answers, questions, threshold) {
|
|
74
|
+
const probabilities = {};
|
|
75
|
+
const keys = Object.keys(questions);
|
|
76
|
+
if (keys.length === 0) {
|
|
77
|
+
return { Passed: false, Probabilities: probabilities, Reason: 'No question was asked' };
|
|
78
|
+
}
|
|
79
|
+
const failures = [];
|
|
80
|
+
for (const key of keys) {
|
|
81
|
+
const answer = answers[key];
|
|
82
|
+
if (answer?.Kind !== 'Likelihood') {
|
|
83
|
+
failures.push(`${key} has no answer`);
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
probabilities[key] = answer.Probability;
|
|
87
|
+
// Written so that a non-numeric probability fails too.
|
|
88
|
+
if (!(answer.Probability >= threshold)) {
|
|
89
|
+
failures.push(`${key} is ${answer.Probability}`);
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
return failures.length === 0
|
|
93
|
+
? { Passed: true, Probabilities: probabilities, Reason: `Every question reached ${threshold}` }
|
|
94
|
+
: { Passed: false, Probabilities: probabilities, Reason: `Below the threshold of ${threshold}: ${failures.join('; ')}` };
|
|
95
|
+
}
|
|
96
|
+
/** A valid finishIf has one to three non-empty string questions and a non-empty string message. */
|
|
97
|
+
export function IsValidFinishIf(candidate) {
|
|
98
|
+
if (!candidate || typeof candidate !== 'object') {
|
|
99
|
+
return false;
|
|
100
|
+
}
|
|
101
|
+
const { questions, message } = candidate;
|
|
102
|
+
return Array.isArray(questions)
|
|
103
|
+
&& questions.length >= FINISH_IF_MIN_QUESTIONS
|
|
104
|
+
&& questions.length <= FINISH_IF_MAX_QUESTIONS
|
|
105
|
+
&& questions.every(q => typeof q === 'string' && q.trim().length > 0)
|
|
106
|
+
&& typeof message === 'string'
|
|
107
|
+
&& message.trim().length > 0;
|
|
108
|
+
}
|
|
109
|
+
//# sourceMappingURL=finish-if-state.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"finish-if-state.js","sourceRoot":"","sources":["../src/finish-if-state.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAMH,uFAAuF;AACvF,MAAM,CAAC,MAAM,mBAAmB,GAAG,KAAK,CAAC;AAEzC,sEAAsE;AACtE,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,oEAAoE;AACpE,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD,iEAAiE;AACjE,MAAM,CAAC,MAAM,0BAA0B,GAAG,IAAI,CAAC;AAE/C,iGAAiG;AACjG,MAAM,CAAC,MAAM,4BAA4B,GAAG,IAAI,CAAC;AAEjD,0DAA0D;AAC1D,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AACzC,MAAM,CAAC,MAAM,uBAAuB,GAAG,CAAC,CAAC;AA+BzC,gEAAgE;AAChE,MAAM,UAAU,gBAAgB,CAAC,IAAY;IACzC,OAAO,IAAI,CAAC,MAAM,GAAG,mBAAmB,CAA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AAO,OAAO,KAAK,QAAQ;WAC3B,OAAO,CAAC,IAAI,EAAE,CAAC,MAAM,GAAG,CAAC,CAAC;AACrC,CAAC"}
|
package/dist/index.d.ts
CHANGED
|
@@ -8,10 +8,13 @@
|
|
|
8
8
|
* @author MemberJunction.com
|
|
9
9
|
* @since 2.49.0
|
|
10
10
|
*/
|
|
11
|
+
import './rubric-evaluation-agent-runner.js';
|
|
11
12
|
export * from './agent-types/base-agent-type.js';
|
|
12
13
|
export * from './agent-types/loop-agent-response-type.js';
|
|
13
14
|
export * from './agent-types/loop-agent-prompt-params.js';
|
|
14
15
|
export * from './base-agent.js';
|
|
16
|
+
export * from './decision-discovery.js';
|
|
17
|
+
export { OpeningRequestText, CATALOG_NARROWING_REQUEST_MAX_CHARS } from './catalog-narrowing.js';
|
|
15
18
|
export * from './prior-turn-tool-result-cache.js';
|
|
16
19
|
export * from './tool-result-format.js';
|
|
17
20
|
export * from './prompt-component-resolver.js';
|
|
@@ -28,6 +31,8 @@ export * from './volatile-child-prompt.js';
|
|
|
28
31
|
export * from './ArtifactToolManager.js';
|
|
29
32
|
export * from './ConversationCompactionManager.js';
|
|
30
33
|
export * from './ConversationToolManager.js';
|
|
34
|
+
export * from './AgentDecisionService.js';
|
|
35
|
+
export * from './finish-if-state.js';
|
|
31
36
|
export * from './MemoryWriteManager.js';
|
|
32
37
|
export * from './SkillMarkdownConverter.js';
|
|
33
38
|
export * from './SkillImportExportService.js';
|
|
@@ -51,6 +56,7 @@ export * from './agent-context-injector.js';
|
|
|
51
56
|
export * from './agent-memory-context-builder.js';
|
|
52
57
|
export * from './agent-pre-execution-rag.js';
|
|
53
58
|
export * from './memory-manager-agent.js';
|
|
59
|
+
export * from './memory-note-gate.js';
|
|
54
60
|
export * from './query-builder-agent.js';
|
|
55
61
|
export * from './MJAIAgentRequestEntityServer.js';
|
|
56
62
|
export * from './KnowledgeAgent.js';
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{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cAAc,mCAAmC,CAAC;AAClD,cAAc,4BAA4B,CAAC;AAC3C,cAAc,oCAAoC,CAAC;AACnD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,wCAAwC,CAAC;AACvD,cAAc,oCAAoC,CAAC;AAKnD,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,MAAM,iCAAiC,CAAC;AACrI,cAAc,4CAA4C,CAAC;AAC3D,cAAc,oCAAoC,CAAC;AACnD,cAAc,uCAAuC,CAAC;AACtD,cAAc,+BAA+B,CAAC;AAC9C,cAAc,yCAAyC,CAAC;AACxD,cAAc,sCAAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AAGpD,OAAO,EACL,eAAe,EACf,qBAAqB,EACrB,0BAA0B,EAC1B,mBAAmB,EACnB,0BAA0B,EAC1B,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC"}
|
package/dist/index.js
CHANGED
|
@@ -8,10 +8,14 @@
|
|
|
8
8
|
* @author MemberJunction.com
|
|
9
9
|
* @since 2.49.0
|
|
10
10
|
*/
|
|
11
|
+
import './rubric-evaluation-agent-runner.js';
|
|
11
12
|
export * from './agent-types/base-agent-type.js';
|
|
12
13
|
export * from './agent-types/loop-agent-response-type.js';
|
|
13
14
|
export * from './agent-types/loop-agent-prompt-params.js';
|
|
14
15
|
export * from './base-agent.js';
|
|
16
|
+
export * from './decision-discovery.js';
|
|
17
|
+
// The opening request, as discovery and catalog narrowing read it: the Decision Eval harness builds its state the same way.
|
|
18
|
+
export { OpeningRequestText, CATALOG_NARROWING_REQUEST_MAX_CHARS } from './catalog-narrowing.js';
|
|
15
19
|
export * from './prior-turn-tool-result-cache.js';
|
|
16
20
|
export * from './tool-result-format.js';
|
|
17
21
|
export * from './prompt-component-resolver.js';
|
|
@@ -28,6 +32,8 @@ export * from './volatile-child-prompt.js';
|
|
|
28
32
|
export * from './ArtifactToolManager.js';
|
|
29
33
|
export * from './ConversationCompactionManager.js';
|
|
30
34
|
export * from './ConversationToolManager.js';
|
|
35
|
+
export * from './AgentDecisionService.js';
|
|
36
|
+
export * from './finish-if-state.js';
|
|
31
37
|
export * from './MemoryWriteManager.js';
|
|
32
38
|
export * from './SkillMarkdownConverter.js';
|
|
33
39
|
export * from './SkillImportExportService.js';
|
|
@@ -51,6 +57,7 @@ export * from './agent-context-injector.js';
|
|
|
51
57
|
export * from './agent-memory-context-builder.js';
|
|
52
58
|
export * from './agent-pre-execution-rag.js';
|
|
53
59
|
export * from './memory-manager-agent.js';
|
|
60
|
+
export * from './memory-note-gate.js';
|
|
54
61
|
export * from './query-builder-agent.js';
|
|
55
62
|
export * from './MJAIAgentRequestEntityServer.js';
|
|
56
63
|
export * from './KnowledgeAgent.js';
|
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,cAAc,+BAA+B,CAAC;AAC9C,cAAc,wCAAwC,CAAC;AACvD,cAAc,wCAAwC,CAAC;AACvD,cAAc,cAAc,CAAC;AAC7B,cAAc,gCAAgC,CAAC;AAC/C,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,iCAAiC,CAAC;AAChD,cAAc,sBAAsB,CAAC;AACrC,cAAc,eAAe,CAAC;AAC9B,cAAc,eAAe,CAAC;AAC9B,cAAc,wBAAwB,CAAC;AACvC,cAAc,kBAAkB,CAAC;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AAsC,CAAC;AACrD,cAAc,0CAA0C,CAAC;AACzD,cAAc,mCAAmC,CAAC;AAClD,cAAc,4CAA4C,CAAC;AAC3D,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,gCAAgC,CAAC;AAC/C,cAAc,uCAAuC,CAAC;AACtD,cAAc,qCAAqC,CAAC;AAEpD,wDAAwD;AACxD,OAAO,EACL,eAAe,EAEf,0BAA0B,EAG1B,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,cAAc,oCAAoC,CAAC;AACnD,cAAc,6BAA6B,CAAC;AAC5C,cAAc,8BAA8B,CAAC;AAC7C,cAAc,kCAAkC,CAAC"}
|
|
@@ -2,13 +2,56 @@ import { BaseAgent } from './base-agent.js';
|
|
|
2
2
|
import { UserInfo } from '@memberjunction/core';
|
|
3
3
|
import { MJAIAgentNoteEntity } from '@memberjunction/core-entities';
|
|
4
4
|
import { AIPromptRunner } from '@memberjunction/ai-prompts';
|
|
5
|
-
import { ExecuteAgentParams, AgentConfiguration, BaseAgentNextStep, MJAIPromptEntityExtended } from '@memberjunction/ai-core-plus';
|
|
5
|
+
import { ExecuteAgentParams, AgentConfiguration, BaseAgentNextStep, MJAIPromptEntityExtended, MJAIAgentRunStepEntityExtended } from '@memberjunction/ai-core-plus';
|
|
6
6
|
/** Per-cluster verification result, aggregated into a phase-level observability step. */
|
|
7
7
|
interface ConsolidationVerificationResult {
|
|
8
8
|
entitiesChecked: number;
|
|
9
9
|
entitiesMissing: string[];
|
|
10
10
|
passed: boolean;
|
|
11
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic conversation thread for prompt data
|
|
14
|
+
*/
|
|
15
|
+
interface ConversationThread {
|
|
16
|
+
conversationId: string;
|
|
17
|
+
messages: {
|
|
18
|
+
id: string;
|
|
19
|
+
role: string;
|
|
20
|
+
message: string;
|
|
21
|
+
createdAt: Date;
|
|
22
|
+
rating: number | null;
|
|
23
|
+
ratingComment: string | null;
|
|
24
|
+
}[];
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Extracted note from conversation/agent run analysis
|
|
28
|
+
*/
|
|
29
|
+
interface ExtractedNote {
|
|
30
|
+
type: 'Preference' | 'Constraint' | 'Context' | 'Example' | 'Issue';
|
|
31
|
+
agentId?: string;
|
|
32
|
+
userId?: string;
|
|
33
|
+
companyId?: string;
|
|
34
|
+
content: string;
|
|
35
|
+
confidence: number;
|
|
36
|
+
sourceConversationId?: string;
|
|
37
|
+
sourceConversationDetailId?: string;
|
|
38
|
+
sourceAgentRunId?: string;
|
|
39
|
+
mergeWithExistingIds?: string[];
|
|
40
|
+
mergeWithExistingId?: string;
|
|
41
|
+
/**
|
|
42
|
+
* Scope level hint from LLM analysis.
|
|
43
|
+
* - 'global': Applies to all users (e.g., "Always greet politely")
|
|
44
|
+
* - 'company': Applies to all users in a company (e.g., "This company uses metric units")
|
|
45
|
+
* - 'user': Specific to one user (e.g., "John prefers email")
|
|
46
|
+
*/
|
|
47
|
+
scopeLevel?: 'global' | 'company' | 'user';
|
|
48
|
+
/**
|
|
49
|
+
* Protection tier override applied at creation. Failure-mined corrective notes set this
|
|
50
|
+
* to 'Ephemeral' so they decay fast unless reinforced by recurrence. Undefined falls back
|
|
51
|
+
* to the default tier in CreateNoteRecords.
|
|
52
|
+
*/
|
|
53
|
+
protectionTierHint?: 'Immutable' | 'Protected' | 'Standard' | 'Ephemeral';
|
|
54
|
+
}
|
|
12
55
|
/**
|
|
13
56
|
* Memory Manager Agent - automatically extracts notes and examples from conversations.
|
|
14
57
|
* This agent runs on a schedule (every 15 minutes) and analyzes high-quality conversations
|
|
@@ -23,13 +66,31 @@ export declare class MemoryManagerAgent extends BaseAgent {
|
|
|
23
66
|
private _stepCounter;
|
|
24
67
|
/** Context user for step operations */
|
|
25
68
|
private _contextUser;
|
|
69
|
+
/** Flag to enable typed decision gate instead of self-confidence threshold */
|
|
70
|
+
private _enableDecisionGate;
|
|
71
|
+
/**
|
|
72
|
+
* The run's merged agent-type prompt params, read when the run starts. They carry the master
|
|
73
|
+
* switch for decision-model use ({@link DecisionsEnabled}), which the note gate needs.
|
|
74
|
+
*/
|
|
75
|
+
private _runPromptParams;
|
|
76
|
+
/** The run's cancellation signal, passed to the decision gate's calls */
|
|
77
|
+
private _cancellationToken;
|
|
78
|
+
/**
|
|
79
|
+
* Whether the typed decision gate is enabled for filtering extracted memory notes.
|
|
80
|
+
* When false (default), uses the self-reported confidence filter (confidence >= 80).
|
|
81
|
+
* The gate also needs the master switch: the run's agent-type prompt params must set
|
|
82
|
+
* `decisionsEnabled: true` ({@link DecisionsEnabled}), or the confidence filter is used.
|
|
83
|
+
*/
|
|
84
|
+
get EnableDecisionGate(): boolean;
|
|
85
|
+
set EnableDecisionGate(value: boolean);
|
|
26
86
|
/** Check if a string is a valid UUID format. Filters out LLM-generated placeholders like "user-uuid-here". */
|
|
27
87
|
private static isValidUUID;
|
|
28
88
|
/**
|
|
29
89
|
* Create an agent run step record for observability.
|
|
30
90
|
* Returns null if agentRunID is not set (defensive check).
|
|
91
|
+
* Protected so a test can stand in for the database.
|
|
31
92
|
*/
|
|
32
|
-
|
|
93
|
+
protected createRunStep(stepType: 'Prompt' | 'Decision' | 'Validation', stepName: string, inputData?: Record<string, unknown>, targetId?: string): Promise<MJAIAgentRunStepEntityExtended | null>;
|
|
33
94
|
/**
|
|
34
95
|
* Finalize an agent run step with success/failure status and output data.
|
|
35
96
|
*/
|
|
@@ -151,6 +212,45 @@ export declare class MemoryManagerAgent extends BaseAgent {
|
|
|
151
212
|
* from EXTRACTION_CONFIG. Notes below either threshold are silently dropped.
|
|
152
213
|
*/
|
|
153
214
|
private filterByConfidenceAndLength;
|
|
215
|
+
/**
|
|
216
|
+
* Filters candidate notes using either the typed decision gate (if enabled, with the master switch
|
|
217
|
+
* on, and the notes are ones it was measured on) or the traditional self-reported confidence and
|
|
218
|
+
* length filters. Protected so a test can run the gate the way extraction does.
|
|
219
|
+
*
|
|
220
|
+
* @param decisionGateApplies Whether these notes may be gated: conversation notes only.
|
|
221
|
+
*/
|
|
222
|
+
protected filterCandidateNotes(notes: ExtractedNote[], conversationThreads: ConversationThread[], contextUser: UserInfo, decisionGateApplies: boolean): Promise<ExtractedNote[]>;
|
|
223
|
+
/**
|
|
224
|
+
* Evaluates candidate notes through the typed decision gate, one conversation at a time: each note
|
|
225
|
+
* is judged against the conversation it came from, as the gate was measured and calibrated, in
|
|
226
|
+
* batches no larger than the prompt models' declared MaxQuestionsPerCall. A note whose conversation
|
|
227
|
+
* can't be told keeps the self-reported rule. The kept notes keep their original order.
|
|
228
|
+
*/
|
|
229
|
+
private filterWithDecisionGate;
|
|
230
|
+
/**
|
|
231
|
+
* Runs a decision prompt call for a single batch of candidate notes from one conversation, falling
|
|
232
|
+
* back to the confidence filter if the decision call fails. The call's step joins the agent run's
|
|
233
|
+
* steps, and carries the call's prompt run, so the run's cost and token totals count it.
|
|
234
|
+
*/
|
|
235
|
+
private judgeDecisionBatch;
|
|
236
|
+
/**
|
|
237
|
+
* Puts the decision's prompt run on its step, which is how the agent run counts the call's cost
|
|
238
|
+
* and tokens, and marks the step complete.
|
|
239
|
+
*/
|
|
240
|
+
private recordDecisionStep;
|
|
241
|
+
/** The answering models already logged as having no memory-note calibration, so each is logged once per process. */
|
|
242
|
+
private static readonly _uncalibratedGateModelsLogged;
|
|
243
|
+
/**
|
|
244
|
+
* Logs, once per model, that the decision gate fell back to the confidence filter because the
|
|
245
|
+
* model that answered has no memory-note calibration. That happens on a failover, when a decision
|
|
246
|
+
* model is added or renamed, or when a vendor model moves to another version (Jev's `APIName`).
|
|
247
|
+
*/
|
|
248
|
+
private static logUncalibratedGateModel;
|
|
249
|
+
/**
|
|
250
|
+
* Applies calibrated probabilities to judge which candidate notes to keep. A note the calibrated
|
|
251
|
+
* model gave no usable answer for keeps the self-reported rule, as a failed call's batch does.
|
|
252
|
+
*/
|
|
253
|
+
private evaluateDecisionVerdict;
|
|
154
254
|
/**
|
|
155
255
|
* Enforce per-message and per-conversation note caps from EXTRACTION_CONFIG.
|
|
156
256
|
* Drops any candidates that would exceed either cap.
|
|
@@ -588,6 +688,12 @@ export declare class MemoryManagerAgent extends BaseAgent {
|
|
|
588
688
|
* Inherits scope from source agent run and applies scopeLevel to determine scope specificity.
|
|
589
689
|
*/
|
|
590
690
|
private createExampleRecords;
|
|
691
|
+
/**
|
|
692
|
+
* The run's merged agent-type prompt params: the agent type's defaults, then the Memory Manager
|
|
693
|
+
* agent's own `AgentTypePromptParams`, then the run's `data.__agentTypePromptParams`. This agent
|
|
694
|
+
* renders no Loop prompt, so it merges them itself, once per run.
|
|
695
|
+
*/
|
|
696
|
+
private runPromptParams;
|
|
591
697
|
/**
|
|
592
698
|
* Main execution method called by scheduler
|
|
593
699
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"memory-manager-agent.d.ts","sourceRoot":"","sources":["../src/memory-manager-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAA0E,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAEH,mBAAmB,EAKtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,
|
|
1
|
+
{"version":3,"file":"memory-manager-agent.d.ts","sourceRoot":"","sources":["../src/memory-manager-agent.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAAE,QAAQ,EAA0E,MAAM,sBAAsB,CAAC;AACxH,OAAO,EAEH,mBAAmB,EAKtB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,cAAc,EAAuB,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAGH,kBAAkB,EAClB,kBAAkB,EAClB,iBAAiB,EAEjB,wBAAwB,EACxB,8BAA8B,EAGjC,MAAM,8BAA8B,CAAC;AA8KtC,yFAAyF;AACzF,UAAU,+BAA+B;IACrC,eA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