v6.2.0-edge.7: SQL pipeline redesign, Video Studio, and the Excel add-in
The SQL pipeline redesign with the MJ Query language, Video Studio, the Excel add-in, sub-agent consults and Sage handoffs, Cohere Rerank 5, and opt-in LLM entity display names. Plus security hardening, integration sync accuracy, and PostgreSQL conversion and CodeGen fixes.
Upgrade Notes apply: run mj query refresh after migrating, a composed query that relied on a same-named parameter flowing in now returns different rows without an error, queries with a template tag inside quotes stop running, RunView’s TotalRowCount contract changed, local vectors need re-embedding, and integration and Chief of Staff APIs were removed.
Edge builds are prereleases.
MemberJunction 6.x is released under the Business Source License 1.1; 5.x and earlier stay ISC. What the licence grants, and what needs certification, is in the licence section of the v6 upgrade guide.
New Features
Section titled “New Features”- SQL pipeline redesign and the MJ Query language (
@memberjunction/sql-parser,@memberjunction/sql-dialect,@memberjunction/core-entities,@memberjunction/core-entities-server,@memberjunction/metadata-sync,@memberjunction/server,@memberjunction/cli, and others): Stored queries are written in a specified language (guides/MJ_QUERY_LANGUAGE.md) that is checked on save and before every render. Rendering and composition run behind a lexer-based safety gate, with per-request dialects, paging, materialized reads and field-level security applied to the rendered statement. A query’s fields, parameters and entities now come from the database server’s description of the query and MJ’s template parser, and any saved query can be refreshed withmj query refresh, theQuery.RefreshExtractionremote operation, or “Refresh metadata” in Explorer. - Video Studio (
@memberjunction/video-studio-core,@memberjunction/video-studio,@memberjunction/video-studio-render-worker,@memberjunction/ng-brand-kits,@memberjunction/ai-blackforestlabs, and others): Code-rendered video production through an orchestrator agent with Pre-Production, Render, Critic and Repair stages, quality gates and rubric scoring, optional spoken narration, and LocalWorker, Remote and Docker render drivers. Includes the Video Studio application (Productions, Brand Kits, Archetypes) with a built-in copilot, generalMJ: Brand Kits, video generation with the Black Forest Labs FLUX 3 driver and aGenerate Videoaction, and Video and Audio artifact viewers. - Excel add-in (
@memberjunction/excel-addin,@memberjunction/excel-addin-server,@memberjunction/ng-entity-viewer,@memberjunction/ng-query-viewer,@memberjunction/ng-export-service, and others): Entity and query grids gain an Export menu with Open in Excel, which downloads a connected workbook that fills, inside Excel, with what the person opening it can see. The add-in’s task pane connects to any MemberJunction server and browses applications, entities, saved views and saved queries, and refreshes connected worksheets. - Sub-agent consults and Sage handoffs (
@memberjunction/ai-agents,@memberjunction/ai-core-plus,@memberjunction/ng-conversations,@memberjunction/messaging-adapters, and others): A sub-agent can consult its caller (AIAgent.ChatHandlingOptionConsult,MaxSubAgentConsultRounds) and escalates toMJ: AI Agent Requestswhen the rounds run out; a reply in the conversation thread resumes it. Callers can pick a sub-agent’s configuration preset (AIAgentRelationship.ConfigurationPresetID). Sage can hand a conversation to a specialist agent (aHandoffstep, an inline handoff card), and an@Sagemention or Return to Sage takes it back. - Cohere Rerank 5 (
@memberjunction/ai-cohere,@memberjunction/ai-reranker,@memberjunction/search-engine,@memberjunction/ai): Addsrerank-v5.0-proandrerank-v5.0-fastwith Context Focus spans; theDefault Reranksetting prefersrerank-v5.0-fast. - Local embeddings on transformers 4 and EmbeddingGemma 2 (
@memberjunction/ai-local-embeddings,@memberjunction/ai,@memberjunction/aiengine, and others): Local embeddings move to@huggingface/transformers4.3.1, size their thread pool to the CPUs available (about 10x faster queries in a 2-CPU container), and can switch models safely withMJ_DEFAULT_LOCAL_EMBEDDING_MODEL. EmbeddingGemma 2 is available as an opt-in model, and a “Re-embed Local Vectors” action moves existing vectors. - Opt-in LLM entity display names (
@memberjunction/codegen-lib): TheEntityDisplayNamesadvanced-generation feature asks an LLM to expand opaque table names (such asACCT_STAT_CD) into readableEntity.DisplayNamevalues, only whereEntity.AutoUpdateDisplayNameallows it. - Remote Browser in text conversations (
@memberjunction/ng-conversations,@memberjunction/server,@memberjunction/remote-browser-server, and others): Withrealtime.conversationBrowser.enabled, a conversation can open a browser its agents drive, shown in a drawer with a live view and URL bar. Off by default, with per-user and anonymous limits. - Upload content source (
@memberjunction/content-pipeline,@memberjunction/content-pipeline-base,@memberjunction/content-autotagging,@memberjunction/core): Applications can push files into the content pipeline (ContentUploadIngestor.Ingest) and run Extract, Segment, Tag and Embed on them, instead of waiting for discovery. - Multi-step loop bodies in task graphs (
@memberjunction/ai-core-plus,@memberjunction/task-graph,@memberjunction/ai-agents,@memberjunction/server):ForEachandWhileoperations can run several action steps per iteration. - Realtime session deadlines (
@memberjunction/realtime-runtime,@memberjunction/server,@memberjunction/ng-conversations, and others): The runtime warns before a session’s deadline and ends the call when it is reached;AIAgentSession.CloseReasonrecordsTimeLimitandIdleinstead of a genericJanitor. - Accounting actions (
@memberjunction/actions-bizapps-accounting): Action rows for seven accounting verbs (CreateJournalEntry,GetChartOfAccounts,GetAccountBalances,GetDimensions,GetGLEntries,GetCustomers,GetSalesInvoices) dispatch to the Business Central and QuickBooks Online plugins. - Weekly AI model refresh (
@memberjunction/ai,@memberjunction/aiengine,@memberjunction/core-entities): Adds GPT-6.1 Terra (OpenAI, Bedrock and OpenRouter routes) and Muse Wonder (OpenRouter), an OpenRouter route for MiniMax-M3.1-Flash, and Mistral Large 4’s lower price.
Improvements
Section titled “Improvements”- Integration sync accuracy and memory (
@memberjunction/integration-engine,@memberjunction/server,@memberjunction/integration-engine-base): A sync’s counts, warnings and successes match what it did; it sheds load under host memory pressure instead of only warning; field maps load on demand; and deactivating a connection pauses its schedules and cancels an in-flight sync. The per-connection catalog’s server half lands, so each connection’s catalog writes stay in its own scope. - Optimistic concurrency and encrypted fields (
@memberjunction/core,@memberjunction/generic-database-provider,@memberjunction/server,@memberjunction/graphql-dataprovider): Conflicting concurrent edits to the same field fail withCONCURRENT_MODIFICATION_CONFLICTwhile edits to different fields merge, and encrypted field ciphertext is kept in caches instead of being re-decrypted per read. - Performance (
@memberjunction/core,@memberjunction/sqlserver-dataprovider,@memberjunction/postgresql-dataprovider,@memberjunction/redis-provider,@memberjunction/server,@memberjunction/generic-database-provider, and others): Cross-replica cache invalidation sends row deltas,RunViewreads only the columns asked for, cache checks send only changed rows, and an idle MJAPI stops polling its database. - Host-assigned search scopes (
@memberjunction/ai-agents,@memberjunction/core-actions,@memberjunction/actions-base,@memberjunction/core): A host can give an agent run the search scopes it may use (ExecuteAgentParams.SearchScopeIDs), and a run limited to those scopes cannot search others. - RSU through a GitHub App (
@memberjunction/schema-engine): Runtime Schema Update’s commit-and-PR step can authenticate with a GitHub App when noGITHUB_TOKENis set, and survives a restart of its own process. - Developer workspace checks (
@memberjunction/cli):mj dev workspace doctorflags member packages that were never built or were edited after their last build. - Clearer setup diagnostics (
@memberjunction/server,@memberjunction/global,@memberjunction/ng-explorer-core): The server warns about ephemeral magic-link keys outside local development, explains unregistered dashboard classes, and logs when a login maps to a User record with a different email.
Bug Fixes
Section titled “Bug Fixes”- Security hardening (
@memberjunction/global,@memberjunction/server,@memberjunction/component-registry-server,@memberjunction/metadata-sync,@memberjunction/ng-core-entity-forms,@memberjunction/ng-conversations,@memberjunction/react-runtime, and others): Field transforms run in an AST interpreter instead ofnew Function; the expression evaluator allows only listed identifiers; filters built from request values validate UUIDs and escape strings; access-token lookups are constant-time; withrequireAuthon, the component registry refuses requests unless a subclass authorizes them; and client code accepts onlyhttp:andhttps:URLs for media and scripts. - Microsoft sign-in switching accounts (
@memberjunction/ng-auth-services): A reload or sign-in redirect on a browser that still held an earlier person’s MSAL account could resume the session as that person. The session now restores the account it signed in with. - Session owners stamping server-only close reasons (
@memberjunction/core-entities-server,@memberjunction/server,@memberjunction/telephony-adapters): An ordinary save ofMJ: AI Agent Sessionscould setTimeLimitand skip the deadline check; only the server’s own close paths can now setTimeLimit,Idle,JanitororShutdown. - Whiteboard export injection (
@memberjunction/ng-whiteboard): Exported or printed boards emit item author, font weight and font family only from their allowed values, so a crafted shared board cannot inject markup. - PostgreSQL saved-view filters (
@memberjunction/generic-database-provider): A saved view’s WhereClause gets the same PostgreSQL rewrite asExtraFilter, so filtered saved views no longer fail on PostgreSQL. - PostgreSQL CodeGen and conversion (
@memberjunction/codegen-lib,@memberjunction/postgresql-dataprovider,@memberjunction/sql-converter,@memberjunction/metadata-sync): A long PostgreSQL CodeGen run no longer fails with “could not open relation with OID”; Metadata_Sync conversion converts bracket identifiers in lookup subqueries and counts any left over as a gap; and T-SQLIDENTITYseeds survive conversion. - CodeGen drift and output (
@memberjunction/codegen-lib,@memberjunction/core-entities): Layered views are refreshed before their CRUD procedures are generated, generated validators compare UUIDs case-insensitively, a foreign-key index on an unindexable column is skipped with a comment instead of failing, and schema placeholders replace only whole schema names. - Gemini native tool loops on Vertex AI (
@memberjunction/ai-gemini): A native tool loop no longer fails on Vertex AI with “Requests ending with a model turn are not supported”. - Business Central GL entries (
@memberjunction/actions-bizapps-accounting):GetGLEntriescomputesamountfrom debit and credit instead of requesting a field the Business Central API does not have. - Metadata push deletes (
@memberjunction/metadata-sync): Push no longer skips deletions whose markers sit underrelatedEntitiesor in an included file, and generated integration actions carry primary keys so a second push does not insert them again. - Explorer state (
@memberjunction/ng-explorer-core,@memberjunction/ng-dashboards,@memberjunction/ng-entity-viewer, and others): Explorer keeps serving cached metadata when the server is unreachable instead of reporting errors it never received, View Studio no longer overwrites the selected view when switching to the personal default layout, and the Chief of Staff pages work without the BizApps apps installed (see Upgrade Notes for what moved).
Upgrade Notes
Section titled “Upgrade Notes”- Refresh saved queries after migrating (
@memberjunction/cli,@memberjunction/core-entities-server): Runmj query refresh --all --dry-runto review, thenmj query refresh --all. This sets each query’s fields, parameters, entities and extraction status from its SQL and the database server; it never changes a query’s SQL. Client query caches miss once after the upgrade. - Composed queries receive only the arguments in their reference, and results change (
@memberjunction/sql-parser,@memberjunction/core-entities-server): A query that composes another query used to pass same-named parameters into it by accident. It now passes only the arguments written in the reference, so a query that relied on that runs without error and returns the inner query’s unfiltered rows. The dry run lists these asWarning(MJQ_COMPOSITION_IMPLICIT_ARGUMENT), notError. Fix each by naming the argument, as in{{query:"Path/Name(Since=Since)"}}. - Queries with a template tag inside quotes stop running (
@memberjunction/sql-parser,@memberjunction/core-entities-server): A saved query that writes a value tag inside a SQL string (WHERE Region = '{{ Region }}') or a quoted identifier is now refused on every run, because the value is pasted between the quotes without escaping. The dry run above lists these queries asErrorwith the fix. Template syntax outside the MJ Query language (macros, includes, function calls, an unknown filter orContext.*token) and queries that write or run more than one statement are also refused at run time, and a query naming a field the user may not read is refused with the “does not exist or you do not have permission” message, so code matching the old “Denied entities” text must change. RunViewTotalRowCountcontract (@memberjunction/core,@memberjunction/generic-database-provider,@memberjunction/graphql-dataprovider, and others):RunViewResult.TotalRowCountis now optional and isundefinedwheneverSkipTotalRowCount: trueis passed.MaxRows: 1is no longer special-cased: a full one-row page runs the count and reports the real total again (reversing v6.2.0-edge.6). Callers that read onlyResultsshould passSkipTotalRowCount: true; strict TypeScript consumers that read the field will see a compile error.SetupRESTEndpointsdefaults to disabled (@memberjunction/server): Code that callsSetupRESTEndpointsdirectly without passingenabledno longer mounts the REST API; passenabled: true. A standard MJAPI deployment is unchanged, since MJServer already passedenabledfrom its configuration (off by default,MJ_REST_API_ENABLEDoverrides). WithrequireAuthon, the component registry server refuses requests until a subclass overridescheckAPIKey.- New integration objects and columns arrive disabled (
@memberjunction/server):autoEnableNewObjectsandautoEnableNewColumnsboth default tofalse. Newly discovered objects arrive unselected, and new columns found on a refresh arrive with their field maps disabled. Passtrueto adopt them automatically. - Integration field-map API removed (
@memberjunction/integration-engine-base,@memberjunction/integration-engine):IntegrationEngineBaseloses theFieldMapsgetter,GetFieldMapsForEntityMapand theFieldMapsoption ofSeedForTesting, andIntegrationEngineloses itsFieldMapspass-through. Read one entity map’s field maps withLoadFieldMapsForEntityMap(entityMapID, contextUser?), which throws when the read fails. - Chief of Staff pages and exports removed (
@memberjunction/ng-dashboards,@memberjunction/ng-base-application): The Priorities & OKRs tab, the Overview priority and To-dos panels, the task quick-edit drawer and thetabandhealthquery params are removed; priorities, objectives, milestones, assignments and to-dos move to an extension in the BizApps Tasks app. The Cockpit becomes three nav items (Overview, Approvals & Wakes, Governance).@memberjunction/ng-dashboardsdropsChiefOfStaffDashboardComponent,LoadChiefOfStaffDashboard, the task scope, priority, to-do and health helpers, theBIZAPPS_*entity names and the tab helpers, and renamesBuildCockpitScopeFilters,COCKPIT_LIVE_ENTITIESandIsCockpitEntityChangeto theirChiefOfStaffforms. - Re-embed local vectors (
@memberjunction/ai-local-embeddings,@memberjunction/aiengine): After upgrading, runmj ai actions run -n "Re-embed Local Vectors" --param "Force=true", then restart MJ server processes. The new runtime changes all-mpnet-base-v2’s vectors under the same model ID, and long texts are truncated at the model’sMaxInputTokens. - Video Studio render worker (
@memberjunction/video-studio-render-worker): Requires Node.js 22 or later andffmpegonPATH; the Docker render driver is recommended for production. - Migrations: Schema and metadata migrations for the RecordChange recycle-bin index, query extraction metadata and detection methods,
Entity.AutoUpdateDisplayName, AI Agent Session close reasons, agent consults and theHandoffstep type, cascade deletes for AI agent configurations, and Brand Kits and Video Archetypes apply onmj migrate. On PostgreSQL, the three base-view column gaps tracked in #5649 remain.