Skip to content

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.

  • 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 with mj query refresh, the Query.RefreshExtraction remote 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, general MJ: Brand Kits, video generation with the Black Forest Labs FLUX 3 driver and a Generate Video action, 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.ChatHandlingOption Consult, MaxSubAgentConsultRounds) and escalates to MJ: AI Agent Requests when 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 (a Handoff step, an inline handoff card), and an @Sage mention or Return to Sage takes it back.
  • Cohere Rerank 5 (@memberjunction/ai-cohere, @memberjunction/ai-reranker, @memberjunction/search-engine, @memberjunction/ai): Adds rerank-v5.0-pro and rerank-v5.0-fast with Context Focus spans; the Default Rerank setting prefers rerank-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/transformers 4.3.1, size their thread pool to the CPUs available (about 10x faster queries in a 2-CPU container), and can switch models safely with MJ_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): The EntityDisplayNames advanced-generation feature asks an LLM to expand opaque table names (such as ACCT_STAT_CD) into readable Entity.DisplayName values, only where Entity.AutoUpdateDisplayName allows it.
  • Remote Browser in text conversations (@memberjunction/ng-conversations, @memberjunction/server, @memberjunction/remote-browser-server, and others): With realtime.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): ForEach and While operations 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.CloseReason records TimeLimit and Idle instead of a generic Janitor.
  • 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.
  • 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 with CONCURRENT_MODIFICATION_CONFLICT while 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, RunView reads 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 no GITHUB_TOKEN is set, and survives a restart of its own process.
  • Developer workspace checks (@memberjunction/cli): mj dev workspace doctor flags 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.
  • 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 of new Function; the expression evaluator allows only listed identifiers; filters built from request values validate UUIDs and escape strings; access-token lookups are constant-time; with requireAuth on, the component registry refuses requests unless a subclass authorizes them; and client code accepts only http: and https: 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 of MJ: AI Agent Sessions could set TimeLimit and skip the deadline check; only the server’s own close paths can now set TimeLimit, Idle, Janitor or Shutdown.
  • 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 as ExtraFilter, 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-SQL IDENTITY seeds 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): GetGLEntries computes amount from 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 under relatedEntities or 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).
  • Refresh saved queries after migrating (@memberjunction/cli, @memberjunction/core-entities-server): Run mj query refresh --all --dry-run to review, then mj 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 as Warning (MJQ_COMPOSITION_IMPLICIT_ARGUMENT), not Error. 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 as Error with the fix. Template syntax outside the MJ Query language (macros, includes, function calls, an unknown filter or Context.* 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.
  • RunView TotalRowCount contract (@memberjunction/core, @memberjunction/generic-database-provider, @memberjunction/graphql-dataprovider, and others): RunViewResult.TotalRowCount is now optional and is undefined whenever SkipTotalRowCount: true is passed. MaxRows: 1 is 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 only Results should pass SkipTotalRowCount: true; strict TypeScript consumers that read the field will see a compile error.
  • SetupRESTEndpoints defaults to disabled (@memberjunction/server): Code that calls SetupRESTEndpoints directly without passing enabled no longer mounts the REST API; pass enabled: true. A standard MJAPI deployment is unchanged, since MJServer already passed enabled from its configuration (off by default, MJ_REST_API_ENABLED overrides). With requireAuth on, the component registry server refuses requests until a subclass overrides checkAPIKey.
  • New integration objects and columns arrive disabled (@memberjunction/server): autoEnableNewObjects and autoEnableNewColumns both default to false. Newly discovered objects arrive unselected, and new columns found on a refresh arrive with their field maps disabled. Pass true to adopt them automatically.
  • Integration field-map API removed (@memberjunction/integration-engine-base, @memberjunction/integration-engine): IntegrationEngineBase loses the FieldMaps getter, GetFieldMapsForEntityMap and the FieldMaps option of SeedForTesting, and IntegrationEngine loses its FieldMaps pass-through. Read one entity map’s field maps with LoadFieldMapsForEntityMap(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 the tab and health query 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-dashboards drops ChiefOfStaffDashboardComponent, LoadChiefOfStaffDashboard, the task scope, priority, to-do and health helpers, the BIZAPPS_* entity names and the tab helpers, and renames BuildCockpitScopeFilters, COCKPIT_LIVE_ENTITIES and IsCockpitEntityChange to their ChiefOfStaff forms.
  • Re-embed local vectors (@memberjunction/ai-local-embeddings, @memberjunction/aiengine): After upgrading, run mj 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’s MaxInputTokens.
  • Video Studio render worker (@memberjunction/video-studio-render-worker): Requires Node.js 22 or later and ffmpeg on PATH; 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 the Handoff step type, cascade deletes for AI agent configurations, and Brand Kits and Video Archetypes apply on mj migrate. On PostgreSQL, the three base-view column gaps tracked in #5649 remain.