v5.50.0: Scoped Search Enforcement, Content Chunking, and Explorer Overhaul
New Features
Section titled “New Features”- Scoped Search Dimensions Enforcement: Search scope dimensions can now carry access decisions (
restricts: true); server-derived values are enforced, caller-supplied overrides are discarded, and every interpolated value is grammar-checked and auto-escaped for its lane’s dialect (SQL/OData/JSON/Typesense/path).ExplainScope()reports reachable search space without executing a query, andRequiredMetadataKeyscatches partially-rendered filters that would silently search wider than intended. Fixes four security bugs including a cross-tenant result-cache leak. - Content Item Chunking with Vector Provenance: New
ContentItemChunkentity tracks individual embedding chunks;ContentItem.VectorRecordIDstores the vector-DB record ID for single-vector items. Re-chunking is atomic (soft-delete + append in one SQL transaction).AutotagBaseEngine.PurgeDeletedChunksremoves superseded chunk vectors from the vector database.EmbedPendingChunksbackfills persisted chunk rows whose embedding failed or was skipped. - Metadata-Driven Vector Config for Content Autotagging:
ContentSource/ContentTypeConfigurationJSONType now drivesVectorIDStrategy(hash/recordId),ChunkTextStorage(mixed/alwaysChunk), vector metadata field strategy (all/include/exclude/explicit), and provider routing — full structural parity with the EntityDocument pipeline. - Pluggable Content Segmentation (
@memberjunction/ai-segmentation): New package with four strategies —StructuralText(markdown/HTML heading hierarchy),SemanticText(LLM topic boundaries via tracked AI Prompt Run),Transcript(timed audio/video chapters withStartMs/EndMs), andFixedWindow(universal fallback). Content cleaning is now a plug-in stage (HtmlContentCleaner,PlainTextContentCleaner).AdaptiveBoundarySegmentertargets a size and closes on the nearest natural break. - Explorer App Switcher Rebuilt as Card Launcher: Centered card launcher replaces the app-switcher dropdown — filterable by name/description, per-user recents, custom/A-Z sort toggle, Tab-focusable cards, native top-layer
<dialog>withinertbackground focus trap. Priority+ nav overflow collapses into a “More” menu. Omnibar and launcher unified on one command-surface spec. Configure Apps opens in-panel via a view swap without a full-screen dialog. - Brandable Conversation Export:
ExportBranding(brandTokens/logoUrl/title/trademark) applies across all four export formats (HTML/markdown/text/JSON). Host CSS values pass a safe-function allowlist before injection.ExportOptions.themeModepicks the palette by briefly togglingdata-themeand restoring synchronously, so a dark-session export is coherent rather than baked-dark. - Conversation List White-Label Theming: Nine new design tokens (
--mj-chat-list-*) remap the list off the stock brand-secondary rail; four chrome toggles (showSearch,showNewConversationButton,showHeaderMenu,showSectionHeaders) remove list chrome for embedded surfaces. - Push-Notification Subscription Abstraction:
SupportsPushflag and subscription lifecycle methods added to communication providers; implemented for MS Graph. Inbound To/CC recipients captured on normalized messages across email providers (MS Graph, Gmail, SendGrid). - Fireworks.ai Routes for Kimi K3, GLM 5.2, and Fast Tiers: New AI model routes for Kimi K3 on Fireworks, GLM 5.2 on Fireworks, Kimi K3 Fast, and Claude Opus 5 Fast. Fast tiers modeled as separate catalog entries per the
MiniMax-M2.5-highspeedprecedent. - New Docs Site (Astro Starlight): Real in-repo documentation site at
docs.memberjunction.orgreplacing the HTML prototype, served at the domain root with a CNAME.
Improvements
Section titled “Improvements”- CodeGen
includeSchemasScope: New opt-inincludeSchemasconfig lets an Open App scope CodeGen to its own schema without hand-maintaining an exclude list of every other installed app. Resolved intoexcludeSchemas— pure sugar over the existing exclude mechanism. - CodeGen Reverse-Relationship Gate: Reverse-relationship
@Field/@FieldResolveremission is now gated onGeneratedTypeAvailability— the exact entity set handed to the generator — rather than a schema/package heuristic, eliminatingTS2304: Cannot find nameerrors when generating a base Open App alongside a dependent app. - Integration Sync Apply-Phase Correctness: Content-unchanged records now run tombstone repair before returning.
LoadAllRecordMapsusesAfterKeykeyset paging withIgnoreMaxRows. Identity decided by entity primary key alone (not AND-ed withIsKeyField). Record-map writes batched: oneRunViewper chunk, writes only rows that actually changed. Identity lookups prefetched per field-set group as oneRunViews. Non-ASCII external IDs now useN-prefixed literals on SQL Server, fixing a silent duplicate-create bug. - Open App Install Hardening: Manifest values can no longer inject code into
mj.config.cjs(all injected values emitted as fully escaped literals). Schema names compared case-insensitively, fixing Postgres reinstall dead-ends.npm removeretains packages other installed apps still declare. A failednpm installduring upgrade finalizes the app asDisabledinstead ofActive. - Open App Config Targets:
mj app installnow writes config to everymj.config.cjsa consumer loads (server workspace, client workspace, root), fixing silent misses where the client bootstrap reported0 client packages wired. - Open App Workspace Layout Detection: Installer now probes both
packages/…andapps/…layout paths, so a distribution scaffolded bymj installworks without configuration. - External Data Source Object Name Resolution: Per-driver
ResolveObjectNamemethod added; SQL drivers schema-qualify bare names, non-SQL drivers return verbatim, preventingschema.collectionmisrouting to MongoDB-style drivers. mj migrateError Detail: Prints batch context (batch number, line range, SQL preview or identifier matches) when a migration fails, instead of onlyError.message.- Search Coverage Improvements:
PerEntityFetchDepth(default 15) decouples per-entity fetch from globaltopK, preventing result starvation in multi-entity searches.MIN_TERM_LENGTHlowered from 3 to 2 for short queries like “AI” or “US”. - External Search Hit Mapper: Shared
ExternalHitMapperacross Azure AI Search, Elasticsearch, OpenSearch, and Typesense recovers chunk provenance (chunkId,modality,startMs/endMs,pageNumber) intoRawMetadataand resolves snippets fromdescription/transcriptfields. - Default-App Provisioning Fix: JWT new-user provisioning now uses a shared
UserInfoEngine.GetDefaultApplicationsForNewUserselector withStatus='Active'filter, eliminating drift between the JWT path and the client self-heal path. - Full-Set Exports: Query viewer, Data Explorer, and User Views now export the full result set (capped at 100k with an over-cap warning) instead of only the on-screen page.
- Lists Permissions: UI-role users can now create and manage Lists; owner-scoped delete enforced server-side on both Lists and List Details.
- Artifact Engine Boot Performance:
ArtifactMetadataEngineno longer bulk-loads all versions at boot; cache guarded against oversized entries. - Collection Sharing Fix: Share-create authorization gate runs against the entity’s provider with the correct
contextUser; real block reason surfaced; shared collections open via the Collections nav item. - Conversation Assistant Identity:
assistantDisplayNameandassistantAvatarUrlinputs onmj-conversation-chat-arealet a white-label host brand the AI side without::ng-deep. - Per-Type Mention Gating:
allowAgentMentions,allowEntityMentions, andallowSkillCommandsinputs onmj-conversation-chat-arealet a host disable specific mention triggers without disabling all. - Agent Run Details Gating:
showAgentRunDetails=falsehides the entire panel section (header + gear icon) when all content would be absent. - zod Peer Range Widened: Zod pin widened from
~3.24.4to^3.25.0to satisfy@modelcontextprotocol/sdk’s peer requirement. - ISA Parent Save Errors Surfaced:
BaseEntity.Save/Deletenow records parent-entity field-level errors on the child when an IS-A (Table-Per-Type) parent save or delete fails.
Bug Fixes
Section titled “Bug Fixes”- PG Metadata Reseed (v5.45 gap): New migration
V202607271005__v5.50.x__Reseed_v545_Metadata.pg-only.sqlheals the 126-byte marker that shipped as the v5.45 metadata sync counterpart; 161 missing rows restored across both migrate-through and fresh-install populations. mj migrate convertSilent Drops Fixed: Three root causes patched — block-lessIF NOT EXISTSCREATE INDEX, hand-written triggers misclassified as CodeGen objects and dropped, and the--bake-codegenpath applying gapped SQL before validation. 196 of 196 mj-sync deletions now reach their PG counterparts.- PG Migration Content Gate:
scripts/check-pg-migration-content.mjsnow runs in CI before the apply step; counts statements (not lines), enforces delete parity, and grandfathers pre-existing intentional empties with a written reason. - SS→PG Boolean Column Catalog Drift: 25 missing tables/columns added to
CORE_METADATA_BOOLEAN_COLUMNS; regeneration recipe made case-insensitive; new test gates drift. - Open App Client Tree-Shaking: Client bootstrap now emits referenced namespace imports collected into an exported
OPEN_APP_CLIENT_MODULESarray (not bare side-effect imports) so@RegisterClassdecorators survive dead-code elimination in production builds. - Open App
globalThisBracket Access: Generated manifest uses bracket access onglobalThisinstead of dot access, fixingTS4111undernoPropertyAccessFromIndexSignaturein MJExplorer. - Open App Edge Host Version Gate: Prerelease host versions (
X.Y.Z-edge.N) coerced to base tuple before the semver range check, fixing false rejections on every dev/fast-channel build. - GraphQL Duplicate Type Names:
generateGraphQLServerCodenow uses the external-schema-filtered entity list, preventingbuildSchemaSyncfrom throwingSchema must contain uniquely named typeswhen two packages are loaded together. - Search UUID Lane Comparisons:
UUIDsEqualused instead of===inbuildLaneExplanations, fixingRenderedFilter: nullon PostgreSQL where UUIDs are lowercased. TextChunkerChunk Offset Corruption: Chunk offsets resolved with a forward-cursor pass (wasindexOffrom 0, corrupting offsets for repeated text).chunkByFixedinfinite-loop fixed whenOverlapTokens >= MaxChunkTokens.- Streaming
<think>Tag Leakage: Thinking-tag stripper no longer leaks partial tags split across chunks; genuine trailing tag-prefix flushed at end of stream. - IS-A Save Error Black Hole: Child entity now records parent’s field-level errors when parent save/delete fails, instead of returning
falsewith no diagnostic. - AI Test Harness Screenshot Race:
waitForDataIdleoption wrapsRunView/RunViews/RunQuerywith pending-call counters and a debounced stabilization window before capturing screenshots. - Grid Quick-Filter Hidden Columns: Quick-filter now matches hidden columns.
- Integer PK Thousands Separator: Primary-key integer columns render without thousands separators.
- Queries Search-Box UI: Icon/placeholder overlap in the Queries search box fixed.
- ng-conversations
tsconfig.spec.json: Invalid JSON (missing commas from merge conflicts) repaired; hand-enumerated file list replaced withsrc/**/*.ts. - Live Agent Transport Guard: Integration test driver aborts a
server-transport bundle if the resolved provider is not a Database provider, instead of silently running over the wire.