@memberjunction/ai-agents 5.42.0 → 5.44.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (98) hide show
  1. package/README.md +10 -0
  2. package/dist/DuplicateReasoningAgentProvider.d.ts +35 -0
  3. package/dist/DuplicateReasoningAgentProvider.d.ts.map +1 -0
  4. package/dist/DuplicateReasoningAgentProvider.js +95 -0
  5. package/dist/DuplicateReasoningAgentProvider.js.map +1 -0
  6. package/dist/MJAIAgentRequestEntityServer.d.ts +7 -0
  7. package/dist/MJAIAgentRequestEntityServer.d.ts.map +1 -1
  8. package/dist/MJAIAgentRequestEntityServer.js +28 -1
  9. package/dist/MJAIAgentRequestEntityServer.js.map +1 -1
  10. package/dist/SkillImportExportService.d.ts +63 -0
  11. package/dist/SkillImportExportService.d.ts.map +1 -0
  12. package/dist/SkillImportExportService.js +148 -0
  13. package/dist/SkillImportExportService.js.map +1 -0
  14. package/dist/SkillMarkdownConverter.d.ts +82 -0
  15. package/dist/SkillMarkdownConverter.d.ts.map +1 -0
  16. package/dist/SkillMarkdownConverter.js +145 -0
  17. package/dist/SkillMarkdownConverter.js.map +1 -0
  18. package/dist/agent-types/flow-agent-type.d.ts.map +1 -1
  19. package/dist/agent-types/flow-agent-type.js +10 -2
  20. package/dist/agent-types/flow-agent-type.js.map +1 -1
  21. package/dist/agent-types/loop-agent-response-type.d.ts +17 -2
  22. package/dist/agent-types/loop-agent-response-type.d.ts.map +1 -1
  23. package/dist/agent-types/loop-agent-response-type.js.map +1 -1
  24. package/dist/agent-types/loop-agent-type.d.ts.map +1 -1
  25. package/dist/agent-types/loop-agent-type.js +33 -1
  26. package/dist/agent-types/loop-agent-type.js.map +1 -1
  27. package/dist/base-agent.d.ts +373 -12
  28. package/dist/base-agent.d.ts.map +1 -1
  29. package/dist/base-agent.js +1019 -78
  30. package/dist/base-agent.js.map +1 -1
  31. package/dist/index.d.ts +12 -0
  32. package/dist/index.d.ts.map +1 -1
  33. package/dist/index.js +12 -0
  34. package/dist/index.js.map +1 -1
  35. package/dist/memory-manager-agent.d.ts +39 -0
  36. package/dist/memory-manager-agent.d.ts.map +1 -1
  37. package/dist/memory-manager-agent.js +118 -5
  38. package/dist/memory-manager-agent.js.map +1 -1
  39. package/dist/operations/AISkillMarkdownOperations.d.ts +11 -0
  40. package/dist/operations/AISkillMarkdownOperations.d.ts.map +1 -0
  41. package/dist/operations/AISkillMarkdownOperations.js +57 -0
  42. package/dist/operations/AISkillMarkdownOperations.js.map +1 -0
  43. package/dist/prompt-component-resolver.d.ts +73 -0
  44. package/dist/prompt-component-resolver.d.ts.map +1 -0
  45. package/dist/prompt-component-resolver.js +166 -0
  46. package/dist/prompt-component-resolver.js.map +1 -0
  47. package/dist/realtime/agent-media-library.d.ts +65 -0
  48. package/dist/realtime/agent-media-library.d.ts.map +1 -0
  49. package/dist/realtime/agent-media-library.js +160 -0
  50. package/dist/realtime/agent-media-library.js.map +1 -0
  51. package/dist/realtime/bridge-room-transcript-sink.d.ts +5 -0
  52. package/dist/realtime/bridge-room-transcript-sink.d.ts.map +1 -1
  53. package/dist/realtime/bridge-room-transcript-sink.js +25 -1
  54. package/dist/realtime/bridge-room-transcript-sink.js.map +1 -1
  55. package/dist/realtime/client-context-channel-server.d.ts +59 -0
  56. package/dist/realtime/client-context-channel-server.d.ts.map +1 -0
  57. package/dist/realtime/client-context-channel-server.js +78 -0
  58. package/dist/realtime/client-context-channel-server.js.map +1 -0
  59. package/dist/realtime/media-channel-server.d.ts +73 -0
  60. package/dist/realtime/media-channel-server.d.ts.map +1 -0
  61. package/dist/realtime/media-channel-server.js +145 -0
  62. package/dist/realtime/media-channel-server.js.map +1 -0
  63. package/dist/realtime/realtime-channel-server-data-context.d.ts +42 -0
  64. package/dist/realtime/realtime-channel-server-data-context.d.ts.map +1 -0
  65. package/dist/realtime/realtime-channel-server-data-context.js +29 -0
  66. package/dist/realtime/realtime-channel-server-data-context.js.map +1 -0
  67. package/dist/realtime/realtime-channel-server-host.d.ts.map +1 -1
  68. package/dist/realtime/realtime-channel-server-host.js +8 -2
  69. package/dist/realtime/realtime-channel-server-host.js.map +1 -1
  70. package/dist/realtime/realtime-client-session-service.d.ts +85 -5
  71. package/dist/realtime/realtime-client-session-service.d.ts.map +1 -1
  72. package/dist/realtime/realtime-client-session-service.js +234 -25
  73. package/dist/realtime/realtime-client-session-service.js.map +1 -1
  74. package/dist/realtime/realtime-coagent-config.d.ts +161 -3
  75. package/dist/realtime/realtime-coagent-config.d.ts.map +1 -1
  76. package/dist/realtime/realtime-coagent-config.js +241 -6
  77. package/dist/realtime/realtime-coagent-config.js.map +1 -1
  78. package/dist/realtime/realtime-recording-capture.d.ts +125 -0
  79. package/dist/realtime/realtime-recording-capture.d.ts.map +1 -0
  80. package/dist/realtime/realtime-recording-capture.js +317 -0
  81. package/dist/realtime/realtime-recording-capture.js.map +1 -0
  82. package/dist/realtime/realtime-recording-store.d.ts +105 -0
  83. package/dist/realtime/realtime-recording-store.d.ts.map +1 -0
  84. package/dist/realtime/realtime-recording-store.js +216 -0
  85. package/dist/realtime/realtime-recording-store.js.map +1 -0
  86. package/dist/realtime/realtime-session-runner.d.ts +33 -2
  87. package/dist/realtime/realtime-session-runner.d.ts.map +1 -1
  88. package/dist/realtime/realtime-session-runner.js +45 -2
  89. package/dist/realtime/realtime-session-runner.js.map +1 -1
  90. package/dist/realtime/realtime-tool-broker.d.ts +41 -3
  91. package/dist/realtime/realtime-tool-broker.d.ts.map +1 -1
  92. package/dist/realtime/realtime-tool-broker.js +67 -3
  93. package/dist/realtime/realtime-tool-broker.js.map +1 -1
  94. package/dist/realtime/realtime-turn-moderator.d.ts +103 -0
  95. package/dist/realtime/realtime-turn-moderator.d.ts.map +1 -0
  96. package/dist/realtime/realtime-turn-moderator.js +266 -0
  97. package/dist/realtime/realtime-turn-moderator.js.map +1 -0
  98. package/package.json +18 -17
@@ -0,0 +1,266 @@
1
+ /**
2
+ * @fileoverview The **realtime turn moderator** — the agent-layer plugin behind the bridge engine's
3
+ * `SetTurnModerator` hook. For each turn in a MULTI-agent voice room it runs ONE fast LLM **prompt** (not an
4
+ * agent run) that decides which agent(s), in order, should speak next — routing a question to several agents
5
+ * when relevant, letting a *productive* agent↔agent discussion continue, and going quiet on unproductive
6
+ * ping-pong. The engine speaks the returned agents serially via the floor; the audio plane is untouched.
7
+ *
8
+ * Why a prompt, not an agent: this is a stateless yes/who classification — no planning, tools, or sub-agents.
9
+ * Each decision is an `AIPromptRun` tied to the co-agent's `AIAgentRun` (`agentRunId`) so the "who spoke and
10
+ * why" trail is fully observable. Informally this is the meeting's **moderator** (a.k.a. "nanny mode") — but
11
+ * note it *brings agents in* as much as it restrains them.
12
+ *
13
+ * The engine stays framework-agnostic: it knows only `(ctx) => Promise<string[]>`. This module supplies that
14
+ * function via {@link RealtimeTurnModeratorDecision}; the context types below **structurally match** the
15
+ * engine's exported `TurnModeratorContext` (we don't take a dependency on `@memberjunction/ai-bridge-server`,
16
+ * exactly as `bridge-room-transcript-sink.ts` mirrors `BridgeTranscriptSink`).
17
+ *
18
+ * @module @memberjunction/ai-agents
19
+ */
20
+ import { LogError, LogStatus, LogStatusEx, RunView } from '@memberjunction/core';
21
+ import { UUIDsEqual } from '@memberjunction/global';
22
+ import { AIEngine } from '@memberjunction/aiengine';
23
+ import { AIPromptParams } from '@memberjunction/ai-core-plus';
24
+ import { AIPromptRunner } from '@memberjunction/ai-prompts';
25
+ import { ResolveEffectiveRealtimeConfig, GetEffectiveModeratorConfig, GetEffectiveTurnMode, } from './realtime-coagent-config.js';
26
+ /** The agent-type name whose `DefaultConfiguration` carries the room-wide moderator settings. */
27
+ const REALTIME_AGENT_TYPE_NAME = 'Realtime';
28
+ /**
29
+ * The realtime turn moderator. One shared instance is wired into the engine; it resolves the room-wide
30
+ * moderator config from the Realtime agent type's `DefaultConfiguration` and runs the configured prompt.
31
+ */
32
+ export class RealtimeTurnModerator {
33
+ constructor() {
34
+ this.runner = new AIPromptRunner();
35
+ /** AgentSessionID → co-agent `AIAgentRun` id (stable per session) — avoids a query per turn. `null` = looked up, none found. */
36
+ this.sessionRunIdCache = new Map();
37
+ /** AgentID → resolved { role, mode } (stable per agent) — avoids re-resolving the cascade per turn. */
38
+ this.agentMetaCache = new Map();
39
+ }
40
+ /**
41
+ * Decides who speaks next for one turn. Returns the ordered `AgentSessionID`s to trigger (empty = nobody).
42
+ * Honors the optional consecutive-agent backstop, the per-call timeout, and the `onError` policy; degrades
43
+ * to a name-contains safety net ONLY when no moderator prompt is configured (a metadata gap, not the norm).
44
+ */
45
+ async Decide(ctx) {
46
+ const cfg = this.resolveConfig();
47
+ if (!cfg) {
48
+ // No moderator configured for this deployment → safety net so a room isn't mute. The configured
49
+ // LLM moderator is the real mechanism; this only fires when the metadata is missing.
50
+ return this.addressedFallback(ctx);
51
+ }
52
+ // `prestageOnAgentSpeech` controls agent↔agent continuation: when an AGENT just spoke (a continuation
53
+ // turn) and pre-staging is OFF, agents do not proactively respond to each other — they speak only when
54
+ // a human turn routes to them. (When ON, the continuation runs during the prior agent's playback.)
55
+ if (!cfg.prestageOnAgentSpeech && ctx.LatestTurn.IsAgent) {
56
+ return [];
57
+ }
58
+ // Optional HARD ping-pong backstop. Default (null) relies on the model's own progress assessment, so a
59
+ // genuine discussion is never gated by a counter — this only trips when an operator sets a cap.
60
+ if (cfg.maxConsecutiveAgentOnlyTurns != null &&
61
+ ctx.LatestTurn.IsAgent &&
62
+ ctx.ConsecutiveAgentOnlyTurns >= cfg.maxConsecutiveAgentOnlyTurns) {
63
+ LogStatus(`[RealtimeTurnModerator] consecutive-agent cap (${cfg.maxConsecutiveAgentOnlyTurns}) reached — room going quiet`);
64
+ return [];
65
+ }
66
+ try {
67
+ const agentRunId = ctx.AgentRunID ?? (await this.resolveAgentRunId(ctx));
68
+ const decision = await this.withTimeout(this.runPrompt(ctx, cfg, agentRunId), cfg.timeoutMs);
69
+ const names = (decision?.speakers ?? []).map((s) => s.agent);
70
+ if (decision?.note) {
71
+ LogStatus(`[RealtimeTurnModerator] note: ${decision.note}`);
72
+ }
73
+ return this.mapNamesToSessions(names, ctx);
74
+ }
75
+ catch (err) {
76
+ LogError(`[RealtimeTurnModerator] decision failed (${cfg.onError} fallback): ${err instanceof Error ? err.message : String(err)}`);
77
+ return cfg.onError === 'addressed-only' ? this.addressedFallback(ctx) : [];
78
+ }
79
+ }
80
+ /** Resolves the room-wide moderator config from the Realtime agent type's `DefaultConfiguration` (cache-backed). */
81
+ resolveConfig() {
82
+ try {
83
+ const type = (AIEngine.Instance.AgentTypes ?? []).find((t) => (t.Name ?? '').toLowerCase() === REALTIME_AGENT_TYPE_NAME.toLowerCase());
84
+ return GetEffectiveModeratorConfig(ResolveEffectiveRealtimeConfig(type?.DefaultConfiguration ?? null, null, null));
85
+ }
86
+ catch {
87
+ return null;
88
+ }
89
+ }
90
+ /**
91
+ * Resolves an agent's live { role, mode } from its own config — `role` from its Description, `mode` from
92
+ * the `turnTaking.mode` of (agent type `DefaultConfiguration` ← that agent's `TypeConfiguration`). Cached
93
+ * per agent id. Returns `null` for an unknown id (caller falls back to engine-provided values).
94
+ */
95
+ resolveAgentMeta(agentId) {
96
+ if (!agentId) {
97
+ return null;
98
+ }
99
+ const key = agentId.toLowerCase();
100
+ const cached = this.agentMetaCache.get(key);
101
+ if (cached) {
102
+ return cached;
103
+ }
104
+ try {
105
+ const agent = (AIEngine.Instance.Agents ?? []).find((a) => UUIDsEqual(a.ID, agentId));
106
+ if (!agent) {
107
+ return null;
108
+ }
109
+ const type = (AIEngine.Instance.AgentTypes ?? []).find((t) => UUIDsEqual(t.ID, agent.TypeID));
110
+ const cfg = ResolveEffectiveRealtimeConfig(type?.DefaultConfiguration ?? null, null, null, agent.TypeConfiguration ?? null);
111
+ const meta = { role: (agent.Description ?? '').trim(), mode: GetEffectiveTurnMode(cfg) };
112
+ if (this.agentMetaCache.size > 1000) {
113
+ this.agentMetaCache.clear(); // bounded; also drops any stale entries after a metadata edit
114
+ }
115
+ this.agentMetaCache.set(key, meta);
116
+ return meta;
117
+ }
118
+ catch {
119
+ return null;
120
+ }
121
+ }
122
+ /**
123
+ * Resolves the co-agent `AIAgentRun` id for the room's representative session (found by `AgentSessionID`,
124
+ * Running, top-level), so each moderator prompt run nests under it. Cached per session (the run is stable
125
+ * for the session's life); a not-yet-found result is left uncached so it's picked up once the run exists.
126
+ */
127
+ async resolveAgentRunId(ctx) {
128
+ const sessionId = ctx.RepAgentSessionID?.trim();
129
+ if (!sessionId) {
130
+ return undefined;
131
+ }
132
+ const key = sessionId.toLowerCase();
133
+ if (this.sessionRunIdCache.has(key)) {
134
+ return this.sessionRunIdCache.get(key) ?? undefined;
135
+ }
136
+ try {
137
+ const rv = ctx.Provider ? RunView.FromMetadataProvider(ctx.Provider) : new RunView();
138
+ const res = await rv.RunView({
139
+ EntityName: 'MJ: AI Agent Runs',
140
+ ExtraFilter: `AgentSessionID='${sessionId.replace(/'/g, "''")}' AND Status='Running' AND ParentRunID IS NULL`,
141
+ Fields: ['ID'],
142
+ OrderBy: '__mj_CreatedAt DESC',
143
+ MaxRows: 1,
144
+ ResultType: 'simple',
145
+ }, ctx.ContextUser);
146
+ const id = res.Success && res.Results.length ? String(res.Results[0].ID) : null;
147
+ // Cache the result either way — the co-agent run is created at session start (before any turn), so a
148
+ // miss means it's genuinely unlinkable; caching null stops a per-turn DB query. Bounded by session count.
149
+ if (this.sessionRunIdCache.size > 1000) {
150
+ this.sessionRunIdCache.clear();
151
+ }
152
+ this.sessionRunIdCache.set(key, id);
153
+ return id ?? undefined;
154
+ }
155
+ catch {
156
+ return undefined;
157
+ }
158
+ }
159
+ /** Runs the moderator prompt and returns its parsed decision. Throws on a missing prompt / failed run. */
160
+ async runPrompt(ctx, cfg, agentRunId) {
161
+ const prompt = AIEngine.Instance.Prompts.find((p) => UUIDsEqual(p.ID, cfg.promptId));
162
+ if (!prompt) {
163
+ throw new Error(`moderator prompt '${cfg.promptId}' not found in the AIEngine cache`);
164
+ }
165
+ const params = new AIPromptParams();
166
+ params.prompt = prompt;
167
+ params.contextUser = ctx.ContextUser;
168
+ params.agentRunId = agentRunId; // ties this prompt run to the co-agent run for observability
169
+ params.data = this.buildData(ctx, cfg);
170
+ const result = await this.runner.ExecutePrompt(params);
171
+ if (!result.success) {
172
+ throw new Error(result.errorMessage ?? 'moderator prompt run failed');
173
+ }
174
+ // The runner hands back the structured object OR the raw JSON string depending on the prompt's output
175
+ // config — normalize to the object so `.speakers` is always available (a string would make `.speakers`
176
+ // undefined → the room would silently route to nobody).
177
+ let decision = result.result;
178
+ if (typeof decision === 'string') {
179
+ try {
180
+ decision = JSON.parse(decision.replace(/^\s*```json/i, '').replace(/```\s*$/i, '').trim());
181
+ }
182
+ catch {
183
+ decision = undefined;
184
+ }
185
+ }
186
+ const parsed = decision;
187
+ LogStatusEx({ message: `[RealtimeTurnModerator][diag] decision (type=${typeof result.result}) speakers=${JSON.stringify(parsed?.speakers ?? null)}`, verboseOnly: true });
188
+ return parsed;
189
+ }
190
+ /**
191
+ * Builds the prompt data. The ROSTER (stable within a room) is separated from the rolling CONVERSATION
192
+ * window so a prompt template can keep the roster near the top (cacheable prefix) and the variable
193
+ * lookback at the bottom. The lookback is narrowed to the configured window + clipped per turn.
194
+ */
195
+ buildData(ctx, cfg) {
196
+ const agents = ctx.Roster.map((r) => {
197
+ // Resolve the live role + participation mode from the agent's own config (the TARGET agent it
198
+ // voices, falling back to its co-agent id). The engine ships defaults; this fills in the real values.
199
+ const meta = this.resolveAgentMeta(r.TargetAgentID ?? r.AgentID);
200
+ return {
201
+ name: r.Names[0] ?? 'Agent',
202
+ aliases: r.Names.slice(1),
203
+ role: meta?.role || r.Role || '',
204
+ mode: meta?.mode ?? r.Mode,
205
+ };
206
+ });
207
+ const conversation = ctx.Lookback.slice(-cfg.contextWindowTurns).map((t) => ({
208
+ speaker: t.Speaker,
209
+ isAgent: t.IsAgent,
210
+ text: t.Text.slice(0, cfg.maxCharsPerTurn),
211
+ }));
212
+ return {
213
+ agents,
214
+ latestSpeaker: ctx.LatestTurn.Speaker,
215
+ latestIsAgent: ctx.LatestTurn.IsAgent,
216
+ conversation,
217
+ };
218
+ }
219
+ /** Maps moderator-returned agent NAMES to roster `AgentSessionID`s, in order, de-duplicated. */
220
+ mapNamesToSessions(names, ctx) {
221
+ const out = [];
222
+ for (const name of names) {
223
+ const n = (name ?? '').trim().toLowerCase();
224
+ if (!n) {
225
+ continue;
226
+ }
227
+ const match = ctx.Roster.find((r) => r.Names.some((x) => x.trim().toLowerCase() === n));
228
+ if (match && !out.includes(match.AgentSessionID)) {
229
+ out.push(match.AgentSessionID);
230
+ }
231
+ }
232
+ return out;
233
+ }
234
+ /**
235
+ * Pure safety net (ONLY when no moderator prompt is configured): route to any agent whose name literally
236
+ * appears in the latest turn. This is deliberately crude — the configured LLM moderator handles all the
237
+ * nuance (typos, indirect address, relevance) that this can't.
238
+ */
239
+ addressedFallback(ctx) {
240
+ const text = ctx.LatestTurn.Text.toLowerCase();
241
+ return ctx.Roster.filter((r) => r.Names.some((nm) => nm && text.includes(nm.toLowerCase()))).map((r) => r.AgentSessionID);
242
+ }
243
+ /** Rejects if `p` doesn't settle within `ms` — keeps a slow moderator from stalling a turn. */
244
+ withTimeout(p, ms) {
245
+ return new Promise((resolve, reject) => {
246
+ const t = setTimeout(() => reject(new Error(`moderator timed out after ${ms}ms`)), ms);
247
+ p.then((v) => {
248
+ clearTimeout(t);
249
+ resolve(v);
250
+ }, (e) => {
251
+ clearTimeout(t);
252
+ reject(e);
253
+ });
254
+ });
255
+ }
256
+ }
257
+ /** The one shared moderator wired into the engine (no per-call construction cost). */
258
+ const sharedModerator = new RealtimeTurnModerator();
259
+ /**
260
+ * The function to pass to `AIBridgeEngine.SetTurnModerator(...)`. Structurally a `TurnModerator`
261
+ * (`(ctx) => Promise<string[]>`); the MJServer resolver wires it at schema-build time.
262
+ */
263
+ export function RealtimeTurnModeratorDecision(ctx) {
264
+ return sharedModerator.Decide(ctx);
265
+ }
266
+ //# sourceMappingURL=realtime-turn-moderator.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"realtime-turn-moderator.js","sourceRoot":"","sources":["../../src/realtime/realtime-turn-moderator.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,WAAW,EAA+B,OAAO,EAAE,MAAM,sBAAsB,CAAC;AAC9G,OAAO,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,EAAE,cAAc,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,EACH,8BAA8B,EAC9B,2BAA2B,EAC3B,oBAAoB,GAEvB,MAAM,2BAA2B,CAAC;AAEnC,iGAAiG;AACjG,MAAM,wBAAwB,GAAG,UAAU,CAAC;AAyC5C;;;GAGG;AACH,MAAM,OAAO,qBAAqB;IAAlC;QACqB,WAAM,GAAG,IAAI,cAAc,EAAE,CAAC;QAC/C,gIAAgI;QAC/G,sBAAiB,GAAG,IAAI,GAAG,EAAyB,CAAC;QACtE,uGAAuG;QACtF,mBAAc,GAAG,IAAI,GAAG,EAAkE,CAAC;IA0OhH,CAAC;IAxOG;;;;OAIG;IACI,KAAK,CAAC,MAAM,CAAC,GAA8B;QAC9C,MAAM,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACjC,IAAI,CAAC,GAAG,EAAE,CAAC;YACP,gGAAgG;YAChG,qFAAqF;YACrF,OAAO,IAAI,CAAC,iBAAiB,CAAC,GAAG,CAAC,CAAC;QACvC,CAAC;QAED,sGAAsG;QACtG,uGAAuG;QACvG,mGAAmG;QACnG,IAAI,CAAC,GAAG,CAAC,qBAAqB,IAAI,GAAG,CAAC,UAAU,CAAC,OAAO,EAAE,CAAC;YACvD,OAAO,EAAE,CAAC;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,EAAE,CAAC,CAAC;YACvF,CAAC,CAAC,IAAI,CACF,CAAC,CAAC,EAAE,EAAE;gBACF,YAAY,CAAC,CAAC,CAAC,CAAC;gBAChB,OAAO,CAAC,CAAC,CAAC,CAAC;YACf,CAAC,EACD,CAAC,CAAC,EAAE,EAAE;gBACF,YAAY,CAAC,CAAC,CAAC,CAAC;gBAChB,MAAM,CAAC,CAAC,CAAC,CAAC;YACd,CAAC,CACJ,CAAC;QACN,CAAC,CAAC,CAAC;IACP,CAAC;CACJ;AAED,sFAAsF;AACtF,MAAM,eAAe,GAAG,IAAI,qBAAqB,EAAE,CAAC;AAEpD;;;GAGG;AACH,MAAM,UAAU,6BAA6B,CAAC,GAA8B;IACxE,OAAO,eAAe,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC;AACvC,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/ai-agents",
3
3
  "type": "module",
4
- "version": "5.42.0",
4
+ "version": "5.44.0",
5
5
  "description": "MemberJunction: AI Agent Execution and Management",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -17,22 +17,23 @@
17
17
  "author": "MemberJunction.com",
18
18
  "license": "ISC",
19
19
  "dependencies": {
20
- "@memberjunction/actions": "5.42.0",
21
- "@memberjunction/actions-base": "5.42.0",
22
- "@memberjunction/ai": "5.42.0",
23
- "@memberjunction/ai-core-plus": "5.42.0",
24
- "@memberjunction/ai-engine-base": "5.42.0",
25
- "@memberjunction/ai-prompts": "5.42.0",
26
- "@memberjunction/ai-reranker": "5.42.0",
27
- "@memberjunction/ai-vector-dupe": "5.42.0",
28
- "@memberjunction/ai-vector-sync": "5.42.0",
29
- "@memberjunction/aiengine": "5.42.0",
30
- "@memberjunction/core": "5.42.0",
31
- "@memberjunction/core-entities": "5.42.0",
32
- "@memberjunction/global": "5.42.0",
33
- "@memberjunction/search-engine": "5.42.0",
34
- "@memberjunction/storage": "5.42.0",
35
- "@memberjunction/templates": "5.42.0",
20
+ "@memberjunction/actions": "5.44.0",
21
+ "@memberjunction/actions-base": "5.44.0",
22
+ "@memberjunction/ai": "5.44.0",
23
+ "@memberjunction/ai-core-plus": "5.44.0",
24
+ "@memberjunction/ai-engine-base": "5.44.0",
25
+ "@memberjunction/ai-prompts": "5.44.0",
26
+ "@memberjunction/ai-reranker": "5.44.0",
27
+ "@memberjunction/ai-vector-dupe": "5.44.0",
28
+ "@memberjunction/ai-vector-sync": "5.44.0",
29
+ "@memberjunction/aiengine": "5.44.0",
30
+ "@memberjunction/context-crush": "5.44.0",
31
+ "@memberjunction/core": "5.44.0",
32
+ "@memberjunction/core-entities": "5.44.0",
33
+ "@memberjunction/global": "5.44.0",
34
+ "@memberjunction/search-engine": "5.44.0",
35
+ "@memberjunction/storage": "5.44.0",
36
+ "@memberjunction/templates": "5.44.0",
36
37
  "dotenv": "^17.2.4",
37
38
  "exceljs": "^4.4.0",
38
39
  "lodash": "^4.17.23",