v5.45.0

External Data Sources, User Routines, and AI Skills Governance

New Features

  • External Data Sources: Read MJ entities and queries directly from remote systems (Snowflake, MongoDB, PostgreSQL, SQL Server, MySQL, Oracle) without replicating data into the MJ database. Entities with an ExternalDataSourceID are proxied live through pluggable drivers, returned through MJ's standard typed RunView/RunQuery/Load APIs. Security features include TLS-by-default, RLS enforcement, SQL injection protection, and read-only enforcement at the provider layer.
  • User Routines (P1.5): User-owned scheduled and monitoring routines that run an Agent, Action, or Prompt on a cron schedule. Includes UserRoutineDispatcherDriver scheduled-job driver with 1-minute sweep, claim-before-run concurrency control, per-routine isolation, Template-driven notifications, OnChange result-hash detection, and RequestedSkillIDs pre-arming. New @memberjunction/ng-user-routines widget set with list/editor/history, and a dedicated Routines Explorer app.
  • Skill Activation Governance: Double activation gate (AISkill.ActivationMode × AIAgent.SkillActivationMode, both defaulting to RequestedOnly) via GetAutoActivatableSkillsForAgent. AIAgent.RequirePlanMode forces plan mode on every root run. Per-step AgentSkillInvocation provenance recorded in AIAgentRunStep.Skills JSON.
  • Core AI Skill Library Phase 2: Seven new skills — Document Builder, Communications, Data Import & Transform, File Management, Scheduling & Automation, Lists & Audiences, and Code & Computation — with externalized instruction templates and bundled actions/sub-agents.
  • SkillSmith Meta-Agent: A new meta-agent that interviews users, discovers bundle members, drafts guardrailed instructions, and persists skills as Pending for review.
  • Expo Push Notification Provider: New @memberjunction/communication-expo-push channel provider for push notifications via the Expo Push API, used by the MemberJunction mobile app for agent-completion and approval notifications.
  • CodeGen External Entity Introspection: CodeGen now introspects remote schemas of external-data-source entities and syncs their EntityField metadata, removing the manual-field-definition limitation for external entities.
  • Confirm Dialog Primitives: New <mj-confirm-dialog> component and MJConfirmService imperative Promise-based replacement for window.confirm(). Migrated 47 native confirm() calls across 23 files in 6 packages.
  • Message Composer Package: New @memberjunction/ng-composer package extracts the conversations message composer with pluggable trigger providers (agent mentions, record mentions, skill commands) to break the ng-conversations dependency cycle.
  • Skip as Client-Side Open App: Moved Skip to a client-side Open App and removed the server-embedded agent; scope-gated query/view/search resolvers with API-key scope authorization; added credential-store fallback for component registry keys.

Improvements

  • External Data Source Drivers: Added SQL Server, MySQL, and Oracle External Data Source drivers, each with per-source connection pooling, secure-by-default transport, auth-retry self-heal, and full foreign key introspection. Each ships with unit tests and opt-in live integration suites.
  • External Entity Relationship Contract: ExternalSchemaObject gains Relationships for foreign key descriptors with composite-key support. PascalCase naming convention enforced across the introspection contract. PostgreSQL driver now populates foreign keys from information_schema. CodeGen consumes introspected relationships to set RelatedEntityID/RelatedEntityFieldName/IsSoftForeignKey.
  • Skill Drop Notifications: Dropped skill-activation requests are now surfaced instead of silently ignored — new skill-activation-refused message type, system note injection in the agent, and warning toasts in the conversations UI.
  • Agent Run UX: Conversations UI gains a Plan Mode header chip, Skill/Plan step icons, per-step skill chips, and a Skills drill-in tab with provenance cards.
  • Installed Apps Reactive State: Fixed intermittent stale installed-apps state in the Home dashboard and app switcher. BaseEngine's entity-event skip-guards now emit through notifyAlreadyAppliedMutation. Event-triggered refreshes read with BypassCache to get true DB state. Concurrent full refreshes ordered by a per-property generation guard.
  • Scheduled Job Auto-Restart: Auto-restart scheduled-job polling when a job is activated after MJAPI boot. JobsChanged$ notification on the base engine wakes a suspended poll timer.
  • CodeGen External Entity Preservation: External-data-source entities are now preserved through CodeGen's metadata management passes — entity pruning, field pruning, system-column ensuring, and field provisioning all skip external entities.
  • External Entity Single-Record Load: Fixed external-data-source single-record Load through the GraphQL transport so Explorer full-record forms now render remote rows correctly.
  • Integration Engine Schema Fidelity: Field widths never shrink on rediscovery; stale overflow keys are evicted on re-sync, stopping phantom promotion.
  • Integration Promotion Gate: Custom-column promotion lock until a full sync (U3) and opt-in reclaim planner for vanished promoted columns (U7).
  • ng-conversations Public API Exports: Exported all ConversationsModule-declared components from public-api to support Angular local-compilation / HMR mode.
  • CronUtils in Global: Pure cron preset/describe helpers moved to @memberjunction/global (CronUtils) for reuse across packages.
  • mj-tree Improvements: DefaultExpansion input added ('first-level' | 'all' | 'none'); agent picker uses a compact mj-tree-dropdown.
  • mj-slide-panel Fix: Settles to transform:none when open so position:fixed descendants (dropdown panels) keep true viewport coordinates.
  • Explorer Notifications Page Rebuilt: Day-grouped cards, sanitized HTML + Markdown message rendering with expand/collapse previews, snapshot relative times, and removal of a test harness that created junk Conversations on Mark-All-Read.
  • User Application Config Debounce: 'MJ: User Applications' config now uses 200ms DebounceTime (vs 1500ms default) so app-config dialog saves reach the UI near-instantly.
  • DataGrid React Row Keys: Use entityPrimaryKeys for DataGrid React row keys and update metadata component definitions.
  • AI Model Updates: Added new AI models to the catalog.

Bug Fixes

  • Integration Engine — Reserved Word PK: Fixed content-hash prefetch filter to quote primary-key identifiers so integration objects whose PK column name is a SQL reserved word (e.g., Zendesk custom_objects.key) no longer silently lose idempotency.
  • Integration Engine — Discovery Sample Children: Template-var child objects now receive sampled field metadata at discovery; parent addressing key resolved from fetched rows rather than presupposed.
  • Metadata Sync Request Timeout: Honor configured request timeout on the MetadataSync/OpenApp provider pool; mj app remove and related commands no longer silently fall back to mssql's 15s default.
  • Skill-Granted Sub-Agent Execution: resolveSubAgentByName now resolves from the runtime-effective set (skill activations/subAgentChanges), fixing an infinite delegation loop observed live with Research Agent → Infographic Agent.
  • RunView Dedup/Linger Cache Write-Invalidation: Fixed on entity events in @memberjunction/core.
  • Mobile App Repository URL: Added repository.url to MobileApp package.json to satisfy CI validation.
  • Concurrent Installed Apps Refresh Race: Per-property generation guard prevents an earlier refresh from clobbering a newer one when multiple event-driven refreshes overlap.