@memberjunction/search-engine 6.1.0-edge.4 → 6.1.0-edge.6

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.
@@ -5,7 +5,8 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
5
5
  return c > 3 && r && Object.defineProperty(target, key, r), r;
6
6
  };
7
7
  import { RunView } from '@memberjunction/core';
8
- import { MJGlobal, RegisterClass, UUIDsEqual } from '@memberjunction/global';
8
+ import { EscapeSQLString, MJGlobal, RegisterClass, UUIDsEqual } from '@memberjunction/global';
9
+ import { AIEngine } from '@memberjunction/aiengine';
9
10
  const LEVEL_RANK = {
10
11
  None: 0,
11
12
  Read: 1,
@@ -46,6 +47,11 @@ function highestLevel(a, b) {
46
47
  * }
47
48
  * ```
48
49
  *
50
+ * One caution on that pattern: a stock denial whose Source is 'PrincipalNotActivatable' means
51
+ * the CALLER may not wield the named principal. An override that widens past it re-opens the
52
+ * wieldability gate — widen from the user's own entitlements, never on the strength of a
53
+ * principal the stock resolver just refused.
54
+ *
49
55
  * **Do not pass a priority.** Subclassing the stock resolver is what orders the registration, and
50
56
  * it does so more reliably than a number can. `ClassFactory.Register` treats an omitted priority as
51
57
  * "one higher than the highest already registered for this (base, key)" — and a subclass cannot be
@@ -73,13 +79,23 @@ export class SearchScopePermissionResolverBase {
73
79
  */
74
80
  export const SEARCH_SCOPE_PERMISSION_RESOLVER_KEY = 'SearchScopePermissionResolver';
75
81
  /**
76
- * Resolves the effective SearchScope permission for a (user, scope, agent)
77
- * triple.
82
+ * Resolves the effective SearchScope permission for a (user, scope, agent, skill)
83
+ * tuple — plus the caller's tenant (`PrimaryScopeRecordID`), which narrows tenant-scoped grants.
78
84
  *
79
85
  * Resolution order (later steps only run if the earlier did not produce a
80
86
  * definitive answer):
81
87
  *
82
- * 1. Agent.SearchScopeAccess === 'None' → reject (explicit agent-side deny).
88
+ * 1. Agent.SearchScopeAccess === 'None' → reject (explicit agent-side deny).
89
+ * 1b. Agent.SearchScopeAccess === 'Assigned' and this scope is not in its list → reject.
90
+ * 1c/1d. The SAME two rules for a SKILL principal, deliberately identical in shape.
91
+ * 1e. A supplied SKILL must be ACTIVATABLE by the caller → otherwise reject.
92
+ * This one surprises people, so it is worth stating here rather than only at the code.
93
+ * A skill is judged wherever it is NAMED, not only where it grants, because it steers the
94
+ * bound through a surface this verdict never sees: SearchParams.AISkillID binds into
95
+ * Principals.SkillID, and for a `restricts: true` dimension the expansion query's output IS
96
+ * the enforced bound. Judging it only at step 4b would let a user holding their own grant
97
+ * (steps 2/3) name any skill and widen with it.
98
+ * The AGENT is deliberately NOT judged here — see step 4.
83
99
  * 2. Direct grant: a SearchScopePermission row with UserID = user.ID and
84
100
  * SearchScopeID = scope.ID. PermissionLevel = 'None' is an explicit
85
101
  * deny that short-circuits and rejects regardless of role grants.
@@ -87,8 +103,18 @@ export const SEARCH_SCOPE_PERMISSION_RESOLVER_KEY = 'SearchScopePermissionResolv
87
103
  * user's UserRoles. The highest non-None level wins. None entries are
88
104
  * ignored at the role level (see comment below).
89
105
  * 4. Agent.SearchScopeAccess === 'All' → allow at Search level (lets
90
- * trusted agents act across all scopes when no user-side grant exists).
91
- * 5. No grant → reject.
106
+ * trusted agents act across all scopes when no user-side grant exists), but ONLY if the
107
+ * caller may actually run that agent. The agent is judged HERE and not at supply because
108
+ * elsewhere AIAgentID is attribution — pre-execution RAG threads it purely for
109
+ * SearchExecutionLog — and gating attribution turns an analytics field into an outage.
110
+ * A DENIAL here rejects (for the message — 4b would refuse it too). A merely unevaluable agent
111
+ * falls through, and is then rejected by 4b if an 'All' skill follows, or by step 5 if not.
112
+ * Either way the outcome is a rejection; the distinction survives in the message.
113
+ * 4b. Skill.SearchScopeAccess === 'All' → allow at Search level, but ONLY with the agent
114
+ * positively confirmed. Step 1e is not sufficient here: it vouches for the SKILL, and
115
+ * GetSkillsForAgent reads SKILL permissions, which say nothing about whether this caller may
116
+ * run the agent the skill would activate on. Both a denial and an unevaluable agent refuse.
117
+ * 5. No grant → reject, naming the unwieldable 'All' agent if that was the only candidate.
92
118
  *
93
119
  * The user-direct-None rule (step 2) is intentional: an admin who explicitly
94
120
  * denies a user on a scope should not have that decision overridden by a
@@ -135,6 +161,25 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
135
161
  }
136
162
  // Restricts but does not grant — the user still needs a per-scope grant below.
137
163
  }
164
+ // Step 1e: A SUPPLIED SKILL MUST BE ACTIVATABLE, WHOEVER ENDS UP GRANTING.
165
+ //
166
+ // The agent is judged at step 4, where it widens, because elsewhere it is pure attribution:
167
+ // the pre-execution RAG path threads AIAgentID only so SearchExecutionLog can attribute the
168
+ // search, and gating that turns an analytics field into an outage.
169
+ //
170
+ // A skill has no such second life. It is supplied for exactly one reason — to STEER — and it
171
+ // steers through a second surface the permission verdict never sees: `SearchParams.AISkillID`
172
+ // is bound into `Principals.SkillID` and, for a `restricts: true` dimension, the expansion
173
+ // query's output IS the enforced bound. Judging it only in the 'All' fallback would leave a
174
+ // user who holds their own DirectGrant or RoleGrant free to name any skill and widen the bound
175
+ // with it — the exact "an id a caller merely NAMED" case this gate exists to close, and
176
+ // perversely the case where a stricter skill is judged and an 'All' skill is not.
177
+ if (Skill) {
178
+ const activatable = await this.skillIsActivatable(Agent, Skill, User);
179
+ if (activatable.ok === false) {
180
+ return this.buildResult(false, 'None', 'PrincipalNotActivatable', `${activatable.reason} — a skill steers the bound, so it is judged wherever it is named.`);
181
+ }
182
+ }
138
183
  // Load all SearchScopePermission rows for this scope. We pull the
139
184
  // whole set (typically small per scope) and filter in JS so we can
140
185
  // apply the user-direct-None short-circuit deterministically.
@@ -161,16 +206,74 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
161
206
  const level = roleGrants.reduce((acc, r) => highestLevel(acc, r.PermissionLevel), 'None');
162
207
  return this.buildResult(true, level, 'RoleGrant', `User '${User.Name}' inherits level '${level}' on this scope through role membership.`);
163
208
  }
209
+ // JUDGE THE AGENT ONCE, FOR BOTH FALLBACKS.
210
+ //
211
+ // Both 'All' arms widen THROUGH this agent, so both need its verdict — step 4b included,
212
+ // because a skill that widens does so on the agent it would activate on. Step 1e does NOT
213
+ // cover that: `GetSkillsForAgent` filters the user's rights on the SKILL, never on the agent.
214
+ // Without this, an 'All' skill launders an agent the caller may not run.
215
+ const agentFallbackInPlay = !!Agent
216
+ && (Agent.SearchScopeAccess === 'All' || Skill?.SearchScopeAccess === 'All');
217
+ const agentVerdict = agentFallbackInPlay
218
+ ? await this.agentIsWieldable(Agent, User)
219
+ : null;
220
+ // A WIDENING FALLBACK REQUIRES A POSITIVE CONFIRMATION, NOT MERELY THE ABSENCE OF A DENIAL.
221
+ //
222
+ // An earlier revision let `kind: 'unavailable'` (agent missing from the metadata cache) fall
223
+ // through to the skill fallback, reasoning that a cache blip should not refuse a user whose
224
+ // own grant covered the scope. That reasoning is impossible: steps 2 and 3 RETURN, so a user
225
+ // with a direct or role grant never reaches a fallback at all. What it actually did was grant
226
+ // 'Search' on any scope, to a user with NO grant, whenever an agent was absent from the cache
227
+ // — an admin creating an agent after boot was enough. Fail-open in the one place the module's
228
+ // own docblock says must fail closed.
229
+ //
230
+ // The distinction still earns its keep in the MESSAGE (a load problem reads differently from a
231
+ // denial) and at step 4, where falling through only ever ends in a refusal anyway.
232
+ const agentUnconfirmed = agentVerdict && agentVerdict.ok === false ? agentVerdict.reason : null;
233
+ const agentDenied = agentVerdict && agentVerdict.ok === false && agentVerdict.kind === 'denied'
234
+ ? agentVerdict.reason : null;
164
235
  // Step 4: agent fallback. SearchScopeAccess='All' lets trusted agents
165
236
  // operate across scopes when the user has no per-scope grant.
166
237
  if (Agent && Agent.SearchScopeAccess === 'All') {
167
- return this.buildResult(true, 'Search', 'AgentUnscopedAll', `Agent '${Agent.Name}' has SearchScopeAccess='All'; granting 'Search' as a fallback for this scope.`);
238
+ // A PRINCIPAL MAY ONLY WIDEN IF THE CALLER MAY WIELD IT.
239
+ //
240
+ // This is the one place an agent GRANTS an outcome: by here the user has no direct or
241
+ // role grant, and 'All' is about to supply one. Elsewhere `Agent` is attribution — the
242
+ // pre-execution RAG path threads AIAgentID purely so SearchExecutionLog can attribute
243
+ // the search — so the check belongs HERE and not at the point the id is supplied.
244
+ // Gating supply instead of grant is what turns an analytics field into an outage.
245
+ if (agentVerdict?.ok) {
246
+ return this.buildResult(true, 'Search', 'AgentUnscopedAll', `Agent '${Agent.Name}' has SearchScopeAccess='All'; granting 'Search' as a fallback for this scope.`);
247
+ }
248
+ // THIS EARLY RETURN EXISTS FOR THE MESSAGE, NOT FOR THE OUTCOME. A fallen-through
249
+ // denial is refused anyway — by step 4b when an 'All' skill follows, otherwise by
250
+ // step 5 — so deleting this block changes no verdict in any combination of agent
251
+ // access, skill access, wieldability and user grant; only the wording moves. It stays
252
+ // because "this user may not run agent X" is a better answer than either of those
253
+ // phrasings.
254
+ if (agentDenied) {
255
+ return this.buildResult(false, 'None', 'PrincipalNotActivatable', `Agent '${Agent.Name}' has SearchScopeAccess='All', but ${agentDenied} — the fallback does not apply.`);
256
+ }
168
257
  }
169
- // Step 4b: skill fallback, mirroring the agent's 'All'.
258
+ // Step 4b: skill fallback, mirroring the agent's 'All'. Step 1e already judged the SKILL —
259
+ // a skill is judged wherever it is named, not only where it grants — but that is not the whole
260
+ // question here, because this arm WIDENS, and it widens through the agent.
170
261
  if (Skill && Skill.SearchScopeAccess === 'All') {
262
+ // The skill widens through the agent it would activate on, so this fallback needs that
263
+ // agent positively confirmed. Both an outright denial and an unevaluable one refuse:
264
+ // step 1e vouches for the SKILL (GetSkillsForAgent reads skill permissions), which says
265
+ // nothing about whether this caller may run the agent it would activate on.
266
+ if (agentUnconfirmed) {
267
+ return this.buildResult(false, 'None', 'PrincipalNotActivatable', `Skill '${Skill.Name}' has SearchScopeAccess='All', but ${agentUnconfirmed} — a skill widens through its agent, so it cannot grant what the agent has not been confirmed to allow.`);
268
+ }
171
269
  return this.buildResult(true, 'Search', 'SkillUnscopedAll', `Skill '${Skill.Name}' has SearchScopeAccess='All'; granting 'Search' as a fallback for this scope.`);
172
270
  }
173
- // Step 5: no grant.
271
+ // Step 5: no grant. When an 'All' agent was the only thing that could have granted and it
272
+ // was refused, say so — otherwise the caller sees a bare 'NoGrant' and cannot tell a missing
273
+ // permission from an agent that could not be evaluated.
274
+ if (agentUnconfirmed) {
275
+ return this.buildResult(false, 'None', 'PrincipalNotActivatable', `Agent '${Agent?.Name}' has SearchScopeAccess='All', but ${agentUnconfirmed} — the fallback does not apply, and no direct or role grant covers this scope.`);
276
+ }
174
277
  return this.buildResult(false, 'None', 'NoGrant', `User '${User.Name}' has no direct grant, no qualifying role grant, and no agent- or skill-side fallback for this scope.`);
175
278
  }
176
279
  /**
@@ -212,7 +315,7 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
212
315
  const rv = new RunView();
213
316
  const result = await rv.RunView({
214
317
  EntityName: 'MJ: AI Skill Search Scopes',
215
- ExtraFilter: `SkillID='${skillID}' AND SearchScopeID='${searchScopeID}' AND Status='Active'`,
318
+ ExtraFilter: `SkillID='${EscapeSQLString(skillID)}' AND SearchScopeID='${EscapeSQLString(searchScopeID)}' AND Status='Active'`,
216
319
  ResultType: 'simple',
217
320
  // Same reasoning as loadPermissionsForScope: a permission decision must never read
218
321
  // a stale cache.
@@ -234,7 +337,7 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
234
337
  const rv = new RunView();
235
338
  const result = await rv.RunView({
236
339
  EntityName: 'MJ: AI Agent Search Scopes',
237
- ExtraFilter: `AgentID='${agentID}' AND SearchScopeID='${searchScopeID}' AND Status='Active'`,
340
+ ExtraFilter: `AgentID='${EscapeSQLString(agentID)}' AND SearchScopeID='${EscapeSQLString(searchScopeID)}' AND Status='Active'`,
238
341
  Fields: ['ID'],
239
342
  ResultType: 'simple',
240
343
  // Same fail-closed semantics as loadPermissionsForScope: a stale
@@ -256,7 +359,7 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
256
359
  const rv = new RunView();
257
360
  const result = await rv.RunView({
258
361
  EntityName: 'MJ: Search Scope Permissions',
259
- ExtraFilter: `SearchScopeID='${searchScopeID}'`,
362
+ ExtraFilter: `SearchScopeID='${EscapeSQLString(searchScopeID)}'`,
260
363
  ResultType: 'simple',
261
364
  // Permission decisions must NEVER read stale cache — a freshly-revoked grant
262
365
  // or a freshly-granted permission must take effect immediately. Skipping
@@ -271,6 +374,77 @@ let SearchScopePermissionResolver = class SearchScopePermissionResolver extends
271
374
  }
272
375
  return result.Results ?? [];
273
376
  }
377
+ /**
378
+ * May this user run this agent? Asked at the WIDENING FALLBACKS — the agent's own
379
+ * `SearchScopeAccess='All'` arm (step 4) and, because a skill widens through the agent it would
380
+ * activate on, the skill's `'All'` arm too (step 4b). Not only the agent's own arm: a non-`'All'`
381
+ * agent still reaches this check when the SKILL is `'All'`. Agent permissions are open by default
382
+ * (no rows means anyone may run it), so without this an id a caller merely NAMED could grant
383
+ * `Search`.
384
+ *
385
+ * Deliberately NOT asked at the point an `AIAgentID` is supplied: pre-execution RAG threads it
386
+ * purely so `SearchExecutionLog` can attribute the search, and gating that turns an analytics
387
+ * field into a retrieval outage.
388
+ *
389
+ * A stale metadata cache is reported distinctly. `GetUserAgentPermissions` throws when the agent
390
+ * is absent from `AIEngine.Instance.Agents` and fails closed to all-false, so an agent created
391
+ * after the cache loaded would otherwise read as "not permitted" — a metadata-load problem
392
+ * wearing an authorization message.
393
+ */
394
+ async agentIsWieldable(agent, user) {
395
+ await AIEngine.Instance.Config(false, user);
396
+ if (!AIEngine.Instance.Agents.some(a => UUIDsEqual(a.ID, agent.ID))) {
397
+ return { ok: false, kind: 'unavailable', reason: `agent '${agent.Name}' is not in the AI metadata cache, so its permissions cannot be evaluated (a metadata-load problem, not a denial)` };
398
+ }
399
+ const perms = await AIEngine.Instance.GetUserAgentPermissions(agent.ID, user);
400
+ if (!perms?.canRun)
401
+ return { ok: false, kind: 'denied', reason: `this user may not run agent '${agent.Name}'` };
402
+ return { ok: true };
403
+ }
404
+ /**
405
+ * Could this caller actually activate this skill on this agent? Asked wherever a skill is NAMED,
406
+ * because a skill steers the bound from a surface the permission verdict never sees — see step 1e.
407
+ *
408
+ * DOES NOT CHECK THE AGENT, AND THAT IS NOT SUFFICIENT ON ITS OWN. `GetSkillsForAgent` is
409
+ * agent-accepted ∩ agent-granted ∩ Active ∩ user-runnable-ON-THE-SKILL — read it
410
+ * (`BaseAIEngine.GetSkillsForAgent`): its permission filter is `AISkillPermissionHelper`, the
411
+ * user's rights on the SKILL. It never consults `AIAgentPermission`. So a user who may not run
412
+ * the agent still gets a NON-empty list here, because skill permissions are open by default.
413
+ *
414
+ * The agent is therefore judged separately, at the fallbacks (steps 4 and 4b), NOT here. That
415
+ * keeps an agent-side cache problem from refusing a user whose own grant covers the scope.
416
+ *
417
+ * It does NOT make this method exempt from the same hazard: step 1e runs BEFORE the grant steps,
418
+ * so a skill that cannot be confirmed refuses such a user too. That is deliberate — an
419
+ * unconfirmed skill must not steer the bound — but it is a real availability cost, which is why
420
+ * the cache case is separated from a denial below and reported as what it is.
421
+ */
422
+ async skillIsActivatable(agent, skill, user) {
423
+ await AIEngine.Instance.Config(false, user);
424
+ if (!agent)
425
+ return { ok: false, kind: 'denied', reason: `skill '${skill.Name}' is judged relative to the calling agent, and none was supplied` };
426
+ // SAME UNAVAILABLE-VS-DENIED DISTINCTION THE AGENT ARM CARRIES, FOR THE SAME REASON.
427
+ //
428
+ // `GetSkillsForAgent` reads `_skills` out of the AIEngine cache. A cold (never-loaded) cache yields
429
+ // an empty list, which is indistinguishable from "this user may not activate that skill" if
430
+ // you only look at the result. Reporting that as a permission denial sends an operator after
431
+ // skill grants when the real fault is metadata loading — and because step 1e runs BEFORE the
432
+ // direct/role grant steps, it is a user with their own grant who gets the misleading message.
433
+ // Still refuses either way: a skill that cannot be confirmed must not steer the bound.
434
+ // (A stale-but-LOADED cache is non-empty, so a skill created after boot reports as denied,
435
+ // not unavailable — the freshness caveat runs the other way from the agent arm's check.)
436
+ if (AIEngine.Instance.Agents.length === 0) {
437
+ return { ok: false, kind: 'unavailable', reason: `the AI metadata cache is empty, so skill '${skill.Name}' cannot be evaluated (a metadata-load problem, not a denial)` };
438
+ }
439
+ // The declared parameter is the Extended agent entity, but the implementation reads only
440
+ // `ID` and `AcceptsSkills` — both on the base type — so the cast bridges a declared shape,
441
+ // not missing data. Revisit if GetSkillsForAgent ever reads Extended-only members.
442
+ const activatable = AIEngine.Instance.GetSkillsForAgent(agent, user);
443
+ if (!activatable.some(x => UUIDsEqual(x.ID, skill.ID))) {
444
+ return { ok: false, kind: 'denied', reason: `skill '${skill.Name}' is not activatable by agent '${agent.Name}' for this user` };
445
+ }
446
+ return { ok: true };
447
+ }
274
448
  /** Bundles the result fields together with a closure-bound toSqlPredicate. */
275
449
  buildResult(allowed, level, source, reason) {
276
450
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"SearchScopePermissionResolver.js","sourceRoot":"","sources":["../../src/permissions/SearchScopePermissionResolver.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAY,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAuF7E,MAAM,UAAU,GAA+C;IAC3D,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACZ,CAAC;AAEF;;;;;GAKG;AACH,SAAS,YAAY,CAAC,CAA6B,EAAE,CAA6B;IAC9E,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,MAAM,OAAgB,iCAAiC;CAEtD;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,o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AC;IACN,CAAC;CACJ,CAAA;AAxOY,6BAA6B;IADzC,aAAa,CAAC,iCAAiC,EAAE,oCAAoC,CAAC;GAC1E,6BAA6B,CAwOzC;;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,6BAA6B,EAAE,CAAC;AAExF;;;;;;;;;GASG;AACH,MAAM,UAAU,gCAAgC;IAC5C,OAAO,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAChD,iCAAiC,EACjC,oCAAoC,CACvC,IAAI,oCAAoC,CAAC;AAC9C,CAAC"}
1
+ {"version":3,"file":"SearchScopePermissionResolver.js","sourceRoot":"","sources":["../../src/permissions/SearchScopePermissionResolver.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAY,OAAO,EAAY,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,wBAAwB,CAAC;AAC9F,OAAO,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAC;AAwFpD,MAAM,UAAU,GAA+C;IAC3D,IAAI,EAAE,CAAC;IACP,IAAI,EAAE,CAAC;IACP,MAAM,EAAE,CAAC;IACT,MAAM,EAAE,CAAC;CACZ,CAAC;AAEF;;;;;GAKG;AACH,SAAS,YAAY,CAAC,CAA6B,EAAE,CAA6B;IAC9E,OAAO,UAAU,CAAC,CAAC,CAAC,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;AAClD,CAAC;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AACH,MAAM,OAAgB,iCAAiC;CAEtD;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,+BAA+B,CAAC;AAEpF;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4CG;AAEI,IAA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,UAAU,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACrD,OAAO,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,EAAE,UAAU,KAAK,CAAC,IAAI,kCAAkC,KAAK,CAAC,IAAI,iBAAiB,EAAE,CAAC;QACpI,CAAC;QACD,OAAO,EAAE,EAAE,EAAE,IAAI,EAAE,CAAC;IACxB,CAAC;IAGD,8EAA8E;IACtE,WAAW,CACf,OAAgB,EAChB,KAAiC,EACjC,MAAmC,EACnC,MAAc;QAEd,OAAO;YACH,OAAO,EAAE,OAAO;YAChB,KAAK,EAAE,KAAK;YACZ,MAAM,EAAE,MAAM;YACd,MAAM,EAAE,MAAM;YACd,cAAc,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,KAAK;SAChD,CAAC;IACN,CAAC;CACJ,CAAA;AA5YY,6BAA6B;IADzC,aAAa,CAAC,iCAAiC,EAAE,oCAAoC,CAAC;GAC1E,6BAA6B,CA4YzC;;AAED;;;;;;;GAOG;AACH,MAAM,CAAC,MAAM,oCAAoC,GAAG,IAAI,6BAA6B,EAAE,CAAC;AAExF;;;;;;;;;GASG;AACH,MAAM,UAAU,gCAAgC;IAC5C,OAAO,QAAQ,CAAC,QAAQ,CAAC,YAAY,CAAC,cAAc,CAChD,iCAAiC,EACjC,oCAAoC,CACvC,IAAI,oCAAoC,CAAC;AAC9C,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@memberjunction/search-engine",
3
3
  "type": "module",
4
- "version": "6.1.0-edge.4",
4
+ "version": "6.1.0-edge.6",
5
5
  "description": "MemberJunction: Reusable server-side search engine - vector + full-text + entity search with RRF fusion",
6
6
  "main": "dist/index.js",
7
7
  "types": "dist/index.d.ts",
@@ -11,13 +11,13 @@
11
11
  "author": "MemberJunction.com",
12
12
  "license": "BUSL-1.1",
13
13
  "dependencies": {
14
- "@memberjunction/ai": "6.1.0-edge.4",
15
- "@memberjunction/ai-vectordb": "6.1.0-edge.4",
16
- "@memberjunction/aiengine": "6.1.0-edge.4",
17
- "@memberjunction/core": "6.1.0-edge.4",
18
- "@memberjunction/core-entities": "6.1.0-edge.4",
19
- "@memberjunction/global": "6.1.0-edge.4",
20
- "@memberjunction/storage": "6.1.0-edge.4",
14
+ "@memberjunction/ai": "6.1.0-edge.6",
15
+ "@memberjunction/ai-vectordb": "6.1.0-edge.6",
16
+ "@memberjunction/aiengine": "6.1.0-edge.6",
17
+ "@memberjunction/core": "6.1.0-edge.6",
18
+ "@memberjunction/core-entities": "6.1.0-edge.6",
19
+ "@memberjunction/global": "6.1.0-edge.6",
20
+ "@memberjunction/storage": "6.1.0-edge.6",
21
21
  "nunjucks": "^3.2.4"
22
22
  },
23
23
  "optionalDependencies": {