Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Surface paid runtime mismatch in licensing
rcourtmanb84fc2301aea
diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex 925f0023b8..787d59fa0a 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -878,6 +878,11 @@ out of public-preview runtime capabilities. Lifecycle-adjacent install orreporting surfaces may still depend on demo-safe capability flags, but theymust not expect `monitored_system_capacity`, admission-freeze copy, orobserved plan overage posture to exist.+That shared runtime-capabilities exception may also carry paid-runtime block+records for private Pro runtime hooks. Lifecycle-adjacent flows must treat+those records as executable-runtime identity, not as agent enrollment,+installer success, or lifecycle capability evidence, and must leave private+runtime download guidance to the licensing/settings surfaces that own it.The same presentation-policy split now governs paid lifecycle extensions inordinary self-hosted v6 installs. Agent profile management may remain anentitled lifecycle surface, but default Infrastructure navigation must notdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 41b0e11512..b2aecb3335 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -1123,6 +1123,14 @@ contract for real customer workspaces, and `/api/license/entitlements`remains billing-only. New callers must extend one of those owned shapesinstead of reviving a combined entitlement payload for mixed runtime,commercial, and billing concerns.+Paid self-hosted runtime identity is part of that owned shape: entitlement+and runtime-capability payloads must carry a normalized `runtime` identity,+and `runtime-capabilities` must include `blocked_capabilities` entries when a+valid license grants a feature that the current community runtime cannot+execute. Billing entitlements may still report the licensed feature set, but+browser feature gates must use the runtime-capabilities contract for executable+truth and show the paid-runtime-required action instead of treating the license+as inactive.That same shared licensing contract also owns internal runtime-onlycapabilities. Release demo runtimes may use the internal `demo_fixtures`entitlement to authorize mock fixture data and `/api/system/mock-mode`diff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex 5e921cfb49..191f23ba05 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -694,6 +694,13 @@ trial urgency, observed usage counts, or checkout handoff state. Thecommercial posture store and billing-entitlements store must also fail closedlocally until the shared presentation policy resolves, then stay fail-closedin demo mode so hidden routes are not probed from the browser shell.+Paid self-hosted Pro licenses also have a runtime-distribution boundary:+billing entitlement payloads may confirm the paid feature grant, but the+runtime-capabilities payload must mark private-runtime-only capabilities as+blocked when the process is the public community build. Customer-facing paid+runtime copy must send those users to the private Pulse Pro download rather+than implying that the public GitHub release or public Docker image can unlock+the same runtime hooks.That same browser-shell boundary also owns utility-nav suppression:`frontend-modern/src/AppLayout.tsx` must not expose a separate top-levelOperations destination. Diagnostics, reports, and logs now live under thediff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 97313ffb66..6659b91166 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -1790,6 +1790,11 @@ fetch orchestration. The shell must not re-accumulate localStorage or APIruntime logic inline. Audit-log filter option labels must come from`frontend-modern/src/utils/auditLogPresentation.ts` and the shared filter-optionlabel primitive instead of hard-coded title-case strings in the settings shell.+When the shared runtime-capabilities store reports `paid_runtime_required` for+`audit_logging`, Settings navigation must keep the Audit Log surface reachable+and the panel must render paid-runtime-required copy with the private Pulse Pro+download action. The runtime mismatch is not a plan upsell and must not be+hidden by ordinary missing-feature navigation filtering.That shared filter-option primitive is also the canonical owner for default`All <scope>` option wording wherever a product surface exposes filter selectsor segmented filter choices. Workloads filters, storage source@@ -1806,6 +1811,10 @@ canonical `SettingsPanel` shell, whilelicense/paywall lifecycle, webhook fetch/save flow, validation, paywalltracking, and hidden-upgrade copy posture. The shell must not re-accumulate APIcalls or paywall tracking inline.+The same paid-runtime-required route applies to Audit Webhooks: missing+`audit_logging` caused by a community runtime must keep the panel reachable,+hide normal upgrade-plan prompts, and present the private Pulse Pro runtime+download action instead of describing the feature as an unlicensed Pro upsell.The diagnostics settings surface now follows that same owner split.`frontend-modern/src/components/Settings/DiagnosticsPanel.tsx` stays thediff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex 9cf2cf97bc..a4e67b531f 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -1198,6 +1198,11 @@ browser must not keep retrying `/api/license/commercial-posture`,commercial endpoints from performance-sensitive settings or route shells. Theretired local commercial analytics routes must not become route-shell pollingfallbacks or background bootstrap work after their normal product API removal.+Paid-runtime block records are allowed on that same small+runtime-capabilities response, but route shells must treat them as already+loaded runtime identity facts. They must not start polling billing+entitlements, checkout, or commercial posture endpoints just to decide whether+a community runtime should show private Pulse Pro download guidance.Workloads and infrastructure summary consumers now also keep null-tolerant readmodels on the shared hot path. Guest rows, stacked bars, anomaly summaries, andresource detail mappers may accept partial platform metadata or undefineddiff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.mdindex de84f5da7f..4e6ec2cc95 100644--- a/docs/release-control/v6/internal/subsystems/security-privacy.md+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md@@ -256,6 +256,12 @@ Security/privacy feature gates that are suppressed by`presentationPolicy.hideUpgrade` must also use neutral unavailable-capabilitycopy: privacy and audit surfaces must not leave `(Pro)`, trial, plan-tier, orupgrade wording visible after their commercial actions are hidden.+Security audit surfaces must also distinguish runtime mismatch from billing+failure. If `runtime-capabilities` blocks `audit_logging` with+`paid_runtime_required`, Audit Log and Audit Webhooks may explain that the+active Pro license needs the private Pulse Pro runtime, but they must not+expose license keys, billing identity, or plan-upgrade copy as part of that+security/privacy feature gate.That shared token-management boundary now also includes`frontend-modern/src/utils/apiTokenPresentation.ts`, so API-token load,generate, and revoke errors stay on one governed customer-facing wording pathdiff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 658e2d6794..58520792ac 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -936,6 +936,11 @@ posture absent. Storage/recovery surfaces may keep demo-safe capability andretention truth from `/api/license/runtime-capabilities`, but they must notexpect `monitored_system_capacity`, admission-freeze copy, or observed planoverage to exist.+Storage/recovery consumers must also treat paid-runtime block records in that+payload as runtime executable truth only. A `paid_runtime_required` block may+explain why a licensed private Pro hook is unavailable in the community+runtime, but it must not become recovery protection state, restore identity,+capacity posture, or storage-history entitlement proof.Storage detail surfaces with page-local history selectors must also treat thatruntime retention truth as the selector contract: pool and disk detail rangesmust filter and clamp through the storage-owned range access helper so ordinarydiff --git a/frontend-modern/src/api/__tests__/license.test.ts b/frontend-modern/src/api/__tests__/license.test.tsindex f682f13fce..a6b41f303a 100644--- a/frontend-modern/src/api/__tests__/license.test.ts+++ b/frontend-modern/src/api/__tests__/license.test.ts@@ -17,6 +17,10 @@ describe('LicenseAPI', () => {limits: [],hosted_mode: false,max_history_days: 14,+ runtime: { build: 'community', label: 'Pulse Community runtime' },+ blocked_capabilities: [+ { key: 'audit_logging', reason: 'paid_runtime_required', action_url: '/download' },+ ],});const result = await LicenseAPI.getRuntimeCapabilities();@@ -25,6 +29,10 @@ describe('LicenseAPI', () => {expect(result).toMatchObject({capabilities: ['relay'],max_history_days: 14,+ runtime: { build: 'community', label: 'Pulse Community runtime' },+ blocked_capabilities: [+ { key: 'audit_logging', reason: 'paid_runtime_required', action_url: '/download' },+ ],});});@@ -34,12 +42,14 @@ describe('LicenseAPI', () => {limits: null,hosted_mode: false,max_history_days: 7,+ blocked_capabilities: null,});const result = await LicenseAPI.getRuntimeCapabilities();expect(result.capabilities).toEqual([]);expect(result.limits).toEqual([]);+ expect(result.blocked_capabilities).toEqual([]);});it('reads commercial entitlements from the commercial endpoint', async () => {diff --git a/frontend-modern/src/api/license.ts b/frontend-modern/src/api/license.tsindex ea3c481ccb..30c9dcf31a 100644--- a/frontend-modern/src/api/license.ts+++ b/frontend-modern/src/api/license.ts@@ -29,6 +29,18 @@ export interface EntitlementUpgradeReason {action_url?: string;}+export interface LicenseRuntimeIdentity {+ build: string;+ label: string;+ download_url?: string;+}++export interface LicenseRuntimeCapabilityBlock {+ key: string;+ reason: string;+ action_url?: string;+}+export interface EntitlementLegacyConnections {proxmox_nodes: number;docker_hosts: number;@@ -48,6 +60,8 @@ export interface LicenseRuntimeCapabilities {limits: EntitlementLimitStatus[];hosted_mode?: boolean;max_history_days?: number;+ runtime?: LicenseRuntimeIdentity;+ blocked_capabilities?: LicenseRuntimeCapabilityBlock[];}// Mirrors internal/api/subscription_entitlements.go:CommercialPosturePayload@@ -79,6 +93,7 @@ export interface LicenseCommercialEntitlements extends LicenseCommercialPosturein_grace_period?: boolean;grace_period_end?: string;max_history_days?: number;+ runtime?: LicenseRuntimeIdentity;}export type LicenseEntitlements = LicenseCommercialEntitlements;@@ -100,13 +115,9 @@ export interface LicenseFeatureStatus {upgrade_url: string;}-function normalizeRuntimeCapabilities(- payload: unknown,-): LicenseRuntimeCapabilities {+function normalizeRuntimeCapabilities(payload: unknown): LicenseRuntimeCapabilities {const source =- payload && typeof payload === 'object'- ? (payload as Partial<LicenseRuntimeCapabilities>)- : {};+ payload && typeof payload === 'object' ? (payload as Partial<LicenseRuntimeCapabilities>) : {};return {...source,@@ -115,7 +126,12 @@ function normalizeRuntimeCapabilities(: [],limits: Array.isArray(source.limits)? source.limits.filter(- (value): value is EntitlementLimitStatus =>+ (value): value is EntitlementLimitStatus => Boolean(value) && typeof value === 'object',+ )+ : [],+ blocked_capabilities: Array.isArray(source.blocked_capabilities)+ ? source.blocked_capabilities.filter(+ (value): value is LicenseRuntimeCapabilityBlock =>Boolean(value) && typeof value === 'object',): [],@@ -163,5 +179,4 @@ export class LicenseAPI {body: JSON.stringify({}),}) as Promise<ClearLicenseResponse>;}-}diff --git a/frontend-modern/src/components/Settings/AuditLogPanel.tsx b/frontend-modern/src/components/Settings/AuditLogPanel.tsxindex d81780e54d..d477a77dc1 100644--- a/frontend-modern/src/components/Settings/AuditLogPanel.tsx+++ b/frontend-modern/src/components/Settings/AuditLogPanel.tsx@@ -25,11 +25,12 @@ import {AUDIT_VERIFICATION_FILTER_NEEDS_LABEL,getAuditEventStatusPresentation,getAuditEventTypeBadgeClass,+ getAuditLogFeatureGateCopy,getAuditLogEmptyState,getAuditLogLoadingState,getAuditVerificationBadgePresentation,} from '@/utils/auditLogPresentation';-import { getUpgradeActionButtonClass, UPGRADE_ACTION_LABEL } from '@/utils/upgradePresentation';+import { getUpgradeActionButtonClass } from '@/utils/upgradePresentation';import { useAuditLogPanelState } from '@/components/Settings/useAuditLogPanelState';export default function AuditLogPanel() {@@ -72,12 +73,14 @@ export default function AuditLogPanel() {setUserFilter,setVerificationFilter,showUpgradePaywall,- showUpgradePrompts,+ showFeatureGateAction,submitPageInput,successFilter,totalEvents,totalPages,upgradeDestination,+ upgradeActionLabel,+ paidRuntimeRequired,verification,verificationFilter,verificationSummary,@@ -94,6 +97,8 @@ export default function AuditLogPanel() {const date = new Date(ts);return date.toLocaleString();};+ const featureGateCopy = () =>+ getAuditLogFeatureGateCopy({ paidRuntimeRequired: paidRuntimeRequired() });return (<SettingsPanel@@ -159,18 +164,19 @@ export default function AuditLogPanel() {<div class="p-6 bg-surface-alt border border-border rounded-md"><div class="flex flex-col sm:flex-row items-center gap-4"><div class="flex-1">- <h3 class="text-lg font-semibold text-base-content">Audit Logging</h3>- <p class="text-sm text-muted mt-1">- Persistent, searchable audit logs with cryptographic signature verification.- </p>+ <h3 class="text-lg font-semibold text-base-content">{featureGateCopy().title}</h3>+ <p class="text-sm text-muted mt-1">{featureGateCopy().body}</p></div>- <Show when={showUpgradePrompts()}>+ <Show when={showFeatureGateAction()}><div class="flex flex-col items-center gap-2"><UpgradeLinkdestination={upgradeDestination()}- class={getUpgradeActionButtonClass({ mobileFullWidth: false })}+ class={getUpgradeActionButtonClass({+ mobileFullWidth: false,+ tone: paidRuntimeRequired() ? 'warning' : 'primary',+ })}>- {UPGRADE_ACTION_LABEL}+ {upgradeActionLabel()}</UpgradeLink></div></Show>diff --git a/frontend-modern/src/components/Settings/AuditWebhookPanel.tsx b/frontend-modern/src/components/Settings/AuditWebhookPanel.tsxindex fe47ab2e94..ba8f2efd4b 100644--- a/frontend-modern/src/components/Settings/AuditWebhookPanel.tsx+++ b/frontend-modern/src/components/Settings/AuditWebhookPanel.tsx@@ -18,10 +18,7 @@ import {getAuditWebhookFeatureGateCopy,getAuditWebhookLoadingState,} from '@/utils/auditWebhookPresentation';-import {- getUpgradeActionButtonClass,- UPGRADE_ACTION_LABEL,-} from '@/utils/upgradePresentation';+import { getUpgradeActionButtonClass } from '@/utils/upgradePresentation';import { useAuditWebhookPanelState } from '@/components/Settings/useAuditWebhookPanelState';interface AuditWebhookPanelProps {@@ -39,11 +36,17 @@ export const AuditWebhookPanel: Component<AuditWebhookPanelProps> = (props) => {saving,setNewUrl,showUpgradePrompts,+ showFeatureGateAction,upgradeDestination,+ upgradeActionLabel,+ paidRuntimeRequired,webhookUrls,} = useAuditWebhookPanelState(props.canManage);const featureGateCopy = () =>- getAuditWebhookFeatureGateCopy({ showCommercialCopy: showUpgradePrompts() });+ getAuditWebhookFeatureGateCopy({+ showCommercialCopy: showUpgradePrompts(),+ paidRuntimeRequired: paidRuntimeRequired(),+ });const emptyStateCopy = () => getAuditWebhookEmptyStateCopy();if (!isAuditLoggingEnabled()) {@@ -59,13 +62,15 @@ export const AuditWebhookPanel: Component<AuditWebhookPanelProps> = (props) => {<p class="font-semibold text-base-content">{featureGateCopy().title}</p><p class="mt-1 text-sm text-muted">{featureGateCopy().body}</p></div>- <Show when={showUpgradePrompts()}>+ <Show when={showFeatureGateAction()}><div class="flex flex-col sm:flex-row items-center gap-2"><UpgradeLinkdestination={upgradeDestination()}- class={getUpgradeActionButtonClass()}+ class={getUpgradeActionButtonClass({+ tone: paidRuntimeRequired() ? 'warning' : 'primary',+ })}>- {UPGRADE_ACTION_LABEL}+ {upgradeActionLabel()}</UpgradeLink></div></Show>diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex 96c9ecb628..5fcf14ec6d 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -193,9 +193,8 @@ describe('settings architecture guardrails', () => {expect(dataHandlingPanelSource).not.toContain('higher limits');expect(dataHandlingPanelSource).not.toContain('Upgrade');expect(dataHandlingPanelSource).not.toContain('Pro');- expect(auditWebhookPanelSource).toContain(- 'getAuditWebhookFeatureGateCopy({ showCommercialCopy: showUpgradePrompts() })',- );+ expect(auditWebhookPanelSource).toContain('getAuditWebhookFeatureGateCopy({');+ expect(auditWebhookPanelSource).toContain('paidRuntimeRequired: paidRuntimeRequired()');expect(auditWebhookPanelSource).not.toContain('Audit Webhooks (Pro)');expect(reportingPanelSource).toContain('if (!catalog || !state || showUpgradePrompts())');expect(reportingPanelSource).toContain('title: catalog.title');@@ -250,7 +249,9 @@ describe('settings architecture guardrails', () => {expect(ssoProvidersPanelSource).toContain("openAddModal('saml')");expect(ssoProvidersPanelSource).toContain('getSSOProviderAddButtonLabel');expect(ssoProvidersPanelSource).toContain('Groups Claim');- expect(ssoProvidersPanelSource).toContain('Claim used for OIDC allowed groups and role mappings.');+ expect(ssoProvidersPanelSource).toContain(+ 'Claim used for OIDC allowed groups and role mappings.',+ );expect(ssoProvidersPanelSource).not.toContain('showSamlUpsell');expect(ssoProvidersPanelSource).not.toContain('UpgradeLink');expect(ssoProvidersPanelSource).not.toContain('Add SAML (Pro)');@@ -441,9 +442,7 @@ describe('settings architecture guardrails', () => {expect(infrastructureSourceManagerSource).toContain('Infrastructure systems');expect(infrastructureSourceManagerSource).toContain('Run discovery');expect(infrastructureSourceManagerSource).toContain('Discovery settings');- expect(monitoredSystemImpactPreviewSource).toContain(- 'getMonitoredSystemImpactPreviewTitle',- );+ expect(monitoredSystemImpactPreviewSource).toContain('getMonitoredSystemImpactPreviewTitle');expect(monitoredSystemImpactPreviewSource).toContain('formatMonitoredSystemImpactPreviewSummary',);diff --git a/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx b/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsxindex f1a75854a4..06ba8e2fa5 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/settingsNavigation.integration.test.tsx@@ -316,6 +316,33 @@ describe('settingsNavigation integration scaffold', () => {).toBe(false);});+ it('keeps paid-runtime-blocked audit tabs visible so the panel can explain the runtime mismatch', () => {+ const isRuntimeCapabilityBlocked = (feature: string, reason?: string) =>+ feature === 'audit_logging' && reason === 'paid_runtime_required';++ expect(+ shouldHideSettingsNavItem('security-audit', {+ hasFeature: hasFeatures([]),+ runtimeCapabilitiesLoaded: () => true,+ hostedModeEnabled: false,+ settingsCapabilitiesResolved: true,+ settingsCapabilities: { auditLog: true },+ isRuntimeCapabilityBlocked,+ }),+ ).toBe(false);++ expect(+ shouldHideSettingsNavItem('security-webhooks', {+ hasFeature: hasFeatures([]),+ runtimeCapabilitiesLoaded: () => true,+ hostedModeEnabled: false,+ settingsCapabilitiesResolved: true,+ settingsCapabilities: { auditWebhooksRead: true },+ isRuntimeCapabilityBlocked,+ }),+ ).toBe(false);+ });+it('derives global save behavior from tab metadata', () => {expect(getSettingsTabSaveBehavior('system-general')).toBe('system');expect(getSettingsTabSaveBehavior('system-network')).toBe('system');diff --git a/frontend-modern/src/components/Settings/settingsNavVisibility.ts b/frontend-modern/src/components/Settings/settingsNavVisibility.tsindex e451298770..49d38c4f87 100644--- a/frontend-modern/src/components/Settings/settingsNavVisibility.ts+++ b/frontend-modern/src/components/Settings/settingsNavVisibility.ts@@ -14,14 +14,24 @@ export interface SettingsNavVisibilityContext {hostedModeEnabled?: boolean;settingsCapabilities?: Partial<SecurityStatusSettingsCapabilities> | null;settingsCapabilitiesResolved?: boolean;+ isRuntimeCapabilityBlocked?: (feature: string, reason?: string) => boolean;}-function hasRequiredFeatures(+function hasRequiredFeatures(tab: SettingsTab, hasFeature: (feature: string) => boolean): boolean {+ const requiredFeatures = getSettingsNavItem(tab)?.features ?? [];+ return requiredFeatures.every((feature) => hasFeature(feature));+}++function missingFeaturesArePaidRuntimeBlocked(tab: SettingsTab,- hasFeature: (feature: string) => boolean,+ context: SettingsNavVisibilityContext,): boolean {const requiredFeatures = getSettingsNavItem(tab)?.features ?? [];- return requiredFeatures.every((feature) => hasFeature(feature));+ const missingFeatures = requiredFeatures.filter((feature) => !context.hasFeature(feature));+ if (missingFeatures.length === 0) return false;+ return missingFeatures.every((feature) =>+ context.isRuntimeCapabilityBlocked?.(feature, 'paid_runtime_required'),+ );}export function shouldHideSettingsNavItem(@@ -84,6 +94,9 @@ export function shouldHideSettingsNavItem(}if (item.hideWhenUnavailable && !hasRequiredFeatures(tab, context.hasFeature)) {+ if (missingFeaturesArePaidRuntimeBlocked(tab, context)) {+ return false;+ }return true;}diff --git a/frontend-modern/src/components/Settings/useAuditLogPanelState.ts b/frontend-modern/src/components/Settings/useAuditLogPanelState.tsindex 8803a82155..e4cf16f2ef 100644--- a/frontend-modern/src/components/Settings/useAuditLogPanelState.ts+++ b/frontend-modern/src/components/Settings/useAuditLogPanelState.ts@@ -10,7 +10,8 @@ import { showSuccess, showToast, showWarning } from '@/utils/toast';import { hasFeature, runtimeCapabilitiesLoaded } from '@/stores/license';import { getUpgradeActionDestination } from '@/stores/licenseCommercial';import { presentationPolicyHidesUpgradePrompts } from '@/stores/sessionPresentationPolicy';-import { loadRuntimeCapabilities } from '@/stores/license';+import { getRuntimeCapabilityBlock, loadRuntimeCapabilities } from '@/stores/license';+import { resolveUpgradeDestination } from '@/utils/upgradeNavigation';export interface AuditEvent {id: string;@@ -110,11 +111,22 @@ export const useAuditLogPanelState = () => {const auditLoggingEnabled = createMemo(() => runtimeCapabilitiesLoaded() && hasFeature('audit_logging'),);- const showUpgradePrompts = () => !presentationPolicyHidesUpgradePrompts();+ const auditLoggingRuntimeBlock = createMemo(() => getRuntimeCapabilityBlock('audit_logging'));+ const paidRuntimeRequired = createMemo(+ () => auditLoggingRuntimeBlock()?.reason === 'paid_runtime_required',+ );+ const showUpgradePrompts = () =>+ !paidRuntimeRequired() && !presentationPolicyHidesUpgradePrompts();+ const showFeatureGateAction = () => paidRuntimeRequired() || showUpgradePrompts();const showUpgradePaywall = createMemo(() => runtimeCapabilitiesLoaded() && !auditLoggingEnabled() && !loading(),);- const upgradeDestination = createMemo(() => getUpgradeActionDestination('audit_logging'));+ const upgradeDestination = createMemo(() =>+ paidRuntimeRequired()+ ? resolveUpgradeDestination(auditLoggingRuntimeBlock()?.action_url)+ : getUpgradeActionDestination('audit_logging'),+ );+ const upgradeActionLabel = () => (paidRuntimeRequired() ? 'Download Pulse Pro' : 'View plans');const fetchAuditEvents = async (options?: { limit?: number; offset?: number }) => {if (!auditLoggingEnabled()) {@@ -597,11 +609,14 @@ export const useAuditLogPanelState = () => {setVerificationFilter,showUpgradePaywall,showUpgradePrompts,+ showFeatureGateAction,submitPageInput,successFilter,totalEvents,totalPages,upgradeDestination,+ upgradeActionLabel,+ paidRuntimeRequired,verification,verificationFilter,verificationSummary,diff --git a/frontend-modern/src/components/Settings/useAuditWebhookPanelState.ts b/frontend-modern/src/components/Settings/useAuditWebhookPanelState.tsindex 14505e2618..64cc7627ff 100644--- a/frontend-modern/src/components/Settings/useAuditWebhookPanelState.ts+++ b/frontend-modern/src/components/Settings/useAuditWebhookPanelState.ts@@ -2,10 +2,11 @@ import { createEffect, createSignal, onMount } from 'solid-js';import { apiFetchJSON } from '@/utils/apiClient';import { logger } from '@/utils/logger';import { showSuccess, showWarning } from '@/utils/toast';-import { hasFeature } from '@/stores/license';+import { getRuntimeCapabilityBlock, hasFeature } from '@/stores/license';import { getUpgradeActionDestination } from '@/stores/licenseCommercial';import { presentationPolicyHidesUpgradePrompts } from '@/stores/sessionPresentationPolicy';import { loadRuntimeCapabilities } from '@/stores/license';+import { resolveUpgradeDestination } from '@/utils/upgradeNavigation';import {getAuditWebhookDuplicateUrlMessage,getAuditWebhookInvalidUrlMessage,@@ -20,9 +21,17 @@ export const useAuditWebhookPanelState = (canManageOverride?: boolean) => {const [loading, setLoading] = createSignal(true);const canManage = () => canManageOverride !== false;- const showUpgradePrompts = () => !presentationPolicyHidesUpgradePrompts();+ const auditLoggingRuntimeBlock = () => getRuntimeCapabilityBlock('audit_logging');+ const paidRuntimeRequired = () => auditLoggingRuntimeBlock()?.reason === 'paid_runtime_required';+ const showUpgradePrompts = () =>+ !paidRuntimeRequired() && !presentationPolicyHidesUpgradePrompts();+ const showFeatureGateAction = () => paidRuntimeRequired() || showUpgradePrompts();const isAuditLoggingEnabled = () => hasFeature('audit_logging');- const upgradeDestination = () => getUpgradeActionDestination('audit_logging');+ const upgradeDestination = () =>+ paidRuntimeRequired()+ ? resolveUpgradeDestination(auditLoggingRuntimeBlock()?.action_url)+ : getUpgradeActionDestination('audit_logging');+ const upgradeActionLabel = () => (paidRuntimeRequired() ? 'Download Pulse Pro' : 'View plans');const fetchWebhooks = async () => {try {@@ -100,7 +109,10 @@ export const useAuditWebhookPanelState = (canManageOverride?: boolean) => {saving,setNewUrl,showUpgradePrompts,+ showFeatureGateAction,upgradeDestination,+ upgradeActionLabel,+ paidRuntimeRequired,webhookUrls,};};diff --git a/frontend-modern/src/components/Settings/useSettingsAccess.ts b/frontend-modern/src/components/Settings/useSettingsAccess.tsindex 52b6539b13..d907a776fd 100644--- a/frontend-modern/src/components/Settings/useSettingsAccess.ts+++ b/frontend-modern/src/components/Settings/useSettingsAccess.ts@@ -9,7 +9,12 @@ import {} from '@/stores/sessionPresentationPolicy';import type { SecurityStatus } from '@/types/config';import { logger } from '@/utils/logger';-import { hasFeature, isHostedModeEnabled, runtimeCapabilitiesLoaded } from '@/stores/license';+import {+ hasFeature,+ isHostedModeEnabled,+ isRuntimeCapabilityBlocked,+ runtimeCapabilitiesLoaded,+} from '@/stores/license';import { DEFAULT_SETTINGS_TAB, type SettingsTab } from './settingsNavigationModel';import { tabFeatureRequirements } from './settingsFeatureGates';import { SETTINGS_HEADER_META } from './settingsHeaderMeta';@@ -75,26 +80,25 @@ export function useSettingsAccess({const settingsCapabilities = securityStatus()?.settingsCapabilities ?? null;const settingsCapabilitiesResolved = securityStatus() !== null;- return SETTINGS_NAV_GROUPS- .map((group) => ({- ...group,- items: group.items.filter(- (item) =>- !shouldHideSettingsNavItem(item.id, {- hasFeature,- runtimeCapabilitiesLoaded,- presentationPolicyHidesCommercial: commercialSurfacesHidden(),- presentationPolicyIsDemoMode: demoMode(),- presentationPolicyIsReadOnly: readOnly(),- presentationPolicyHidesOrganizations: organizationSurfacesHidden(),- presentationPolicyResolved: presentationPolicyResolved(),- hostedModeEnabled,- settingsCapabilities,- settingsCapabilitiesResolved,- }),- ),- }))- .filter((group) => group.items.length > 0);+ return SETTINGS_NAV_GROUPS.map((group) => ({+ ...group,+ items: group.items.filter(+ (item) =>+ !shouldHideSettingsNavItem(item.id, {+ hasFeature,+ runtimeCapabilitiesLoaded,+ presentationPolicyHidesCommercial: commercialSurfacesHidden(),+ presentationPolicyIsDemoMode: demoMode(),+ presentationPolicyIsReadOnly: readOnly(),+ presentationPolicyHidesOrganizations: organizationSurfacesHidden(),+ presentationPolicyResolved: presentationPolicyResolved(),+ hostedModeEnabled,+ settingsCapabilities,+ settingsCapabilitiesResolved,+ isRuntimeCapabilityBlocked,+ }),+ ),+ })).filter((group) => group.items.length > 0);});const flatTabs = createMemo(() => accessibleTabGroups().flatMap((group) => group.items));@@ -135,9 +139,9 @@ export function useSettingsAccess({const requiresCapabilityResolution = Boolean(currentItem?.requiredCapability);const requiresPresentationPolicyResolution = Boolean(currentItem?.hideWhenCommercialHidden ||- currentItem?.hideWhenOrganizationHidden ||- currentItem?.hideWhenReadOnly ||- currentItem?.hideWhenDemoMode,+ currentItem?.hideWhenOrganizationHidden ||+ currentItem?.hideWhenReadOnly ||+ currentItem?.hideWhenDemoMode,);if ((requiresFeatureResolution && !runtimeCapabilitiesLoaded()) ||diff --git a/frontend-modern/src/stores/__tests__/license.test.ts b/frontend-modern/src/stores/__tests__/license.test.tsindex c28670be9d..f6cc81e5f9 100644--- a/frontend-modern/src/stores/__tests__/license.test.ts+++ b/frontend-modern/src/stores/__tests__/license.test.ts@@ -12,11 +12,13 @@ import {} from '@/stores/sessionPresentationPolicy';import { getUpgradeFallbackDestination } from '@/utils/pricingHandoff';import {+ getRuntimeCapabilityBlock,getRuntimeLimit,hasFeature,isHostedModeEnabled,isMultiTenantEnabled,isRangeLocked,+ isRuntimeCapabilityBlocked,runtimeCapabilitiesLoadError as runtimeLicenseLoadError,runtimeCapabilitiesLoaded as runtimeLicenseLoaded,loadRuntimeCapabilities,@@ -57,6 +59,14 @@ describe('license stores', () => {limits: [{ key: 'limit1', limit: 100, current: 25, state: 'ok' }],hosted_mode: false,max_history_days: 90,+ runtime: { build: 'community', label: 'Pulse Community runtime' },+ blocked_capabilities: [+ {+ key: 'audit_logging',+ reason: 'paid_runtime_required',+ action_url: 'https://pulserelay.pro/download.html',+ },+ ],};const mockCommercialPosture: LicenseCommercialPosture = {@@ -86,6 +96,8 @@ describe('license stores', () => {limits: [],hosted_mode: false,max_history_days: 7,+ runtime: { build: 'community', label: 'Pulse Community runtime' },+ blocked_capabilities: [],};const mockFreeCommercialPosture: LicenseCommercialPosture = {@@ -131,6 +143,11 @@ describe('license stores', () => {limits: [],hosted_mode: false,max_history_days: 7,+ runtime: {+ build: 'community',+ label: 'Pulse Community runtime',+ },+ blocked_capabilities: [],});});@@ -165,6 +182,17 @@ describe('license stores', () => {expect(hasFeature('missing_feature')).toBe(false);});+ it('exposes runtime capability blocks by feature and reason', async () => {+ vi.mocked(LicenseAPI.getRuntimeCapabilities).mockResolvedValue(mockRuntimeCapabilities);+ await loadRuntimeCapabilities(true);++ expect(getRuntimeCapabilityBlock('audit_logging')).toMatchObject({+ reason: 'paid_runtime_required',+ });+ expect(isRuntimeCapabilityBlocked('audit_logging', 'paid_runtime_required')).toBe(true);+ expect(isRuntimeCapabilityBlocked('audit_logging', 'other_reason')).toBe(false);+ });+it('returns true when multi_tenant feature exists', async () => {vi.mocked(LicenseAPI.getRuntimeCapabilities).mockResolvedValue(mockRuntimeCapabilities);await loadRuntimeCapabilities(true);@@ -521,6 +549,10 @@ describe('license stores', () => {docker_hosts: 0,kubernetes_clusters: 0,},+ runtime: {+ build: 'community',+ label: 'Pulse Community runtime',+ },has_migration_gap: false,commercial_migration: undefined,});diff --git a/frontend-modern/src/stores/license.ts b/frontend-modern/src/stores/license.tsindex 52e2e36e9b..bb5067f217 100644--- a/frontend-modern/src/stores/license.ts+++ b/frontend-modern/src/stores/license.ts@@ -8,6 +8,11 @@ const FREE_RUNTIME_CAPABILITIES_FALLBACK: LicenseRuntimeCapabilities = {limits: [],hosted_mode: false,max_history_days: 7,+ runtime: {+ build: 'community',+ label: 'Pulse Community runtime',+ },+ blocked_capabilities: [],};const [runtimeCapabilities, setRuntimeCapabilities] =@@ -32,6 +37,7 @@ export async function loadRuntimeCapabilities(force = false): Promise<void> {capability_count: next.capabilities.length,limit_count: next.limits.length,max_history_days: next.max_history_days,+ runtime_build: next.runtime?.build,});} catch (err) {logger.error('[licenseStore] Failed to load runtime capabilities', err);@@ -52,6 +58,19 @@ export function hasFeature(feature: string): boolean {return current.capabilities.includes(feature);}+export function getRuntimeCapabilityBlock(feature: string) {+ const normalized = feature.trim();+ const current = runtimeCapabilities();+ if (!normalized || !current?.blocked_capabilities?.length) return undefined;+ return current.blocked_capabilities.find((block) => block.key === normalized);+}++export function isRuntimeCapabilityBlocked(feature: string, reason?: string): boolean {+ const block = getRuntimeCapabilityBlock(feature);+ if (!block) return false;+ return reason ? block.reason === reason : true;+}+export function isMultiTenantEnabled(): boolean {return hasFeature('multi_tenant');}diff --git a/frontend-modern/src/stores/licenseEntitlements.ts b/frontend-modern/src/stores/licenseEntitlements.tsindex b611d1a2d4..f4ed8974af 100644--- a/frontend-modern/src/stores/licenseEntitlements.ts+++ b/frontend-modern/src/stores/licenseEntitlements.ts@@ -21,6 +21,10 @@ const FREE_LICENSE_ENTITLEMENTS_FALLBACK: LicenseCommercialEntitlements = {},has_migration_gap: false,commercial_migration: undefined,+ runtime: {+ build: 'community',+ label: 'Pulse Community runtime',+ },};const [licenseEntitlementsState, setLicenseEntitlementsState] =@@ -45,9 +49,7 @@ export async function loadLicenseEntitlements(force = false): Promise<void> {setLoadError(null);setLoaded(true);setLoading(false);- logger.debug(- '[licenseEntitlementsStore] Full entitlements suppressed by presentation policy',- );+ logger.debug('[licenseEntitlementsStore] Full entitlements suppressed by presentation policy');return;}diff --git a/frontend-modern/src/utils/__tests__/auditLogPresentation.test.ts b/frontend-modern/src/utils/__tests__/auditLogPresentation.test.tsindex aa66b7a6cb..13608d916d 100644--- a/frontend-modern/src/utils/__tests__/auditLogPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/auditLogPresentation.test.ts@@ -12,6 +12,7 @@ import {AUDIT_VERIFICATION_FILTER_NEEDS_LABEL,getAuditEventStatusPresentation,getAuditEventTypeBadgeClass,+ getAuditLogFeatureGateCopy,getAuditVerificationBadgePresentation,} from '@/utils/auditLogPresentation';@@ -47,6 +48,13 @@ describe('auditLogPresentation', () => {});});+ it('returns paid-runtime feature gate copy when Pro hooks are unavailable', () => {+ expect(getAuditLogFeatureGateCopy({ paidRuntimeRequired: true })).toMatchObject({+ title: 'Pulse Pro runtime required',+ body: expect.stringContaining('private Pulse Pro runtime'),+ });+ });+it('exposes canonical audit action button classes', () => {expect(AUDIT_TOOLBAR_BUTTON_CLASS).toContain('border border-border');expect(AUDIT_REFRESH_BUTTON_CLASS).toContain('text-base-content');diff --git a/frontend-modern/src/utils/__tests__/auditWebhookPresentation.test.ts b/frontend-modern/src/utils/__tests__/auditWebhookPresentation.test.tsindex c1ed5b3e3f..1473929f61 100644--- a/frontend-modern/src/utils/__tests__/auditWebhookPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/auditWebhookPresentation.test.ts@@ -24,6 +24,13 @@ describe('auditWebhookPresentation', () => {});});+ it('returns paid-runtime copy when the license is active on a community runtime', () => {+ expect(getAuditWebhookFeatureGateCopy({ paidRuntimeRequired: true })).toMatchObject({+ title: 'Pulse Pro runtime required',+ body: expect.stringContaining('private Pulse Pro runtime'),+ });+ });+it('returns canonical empty state copy and shell classes', () => {expect(getAuditWebhookEmptyStateCopy()).toMatchObject({title: 'No audit webhooks configured yet.',diff --git a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts b/frontend-modern/src/utils/__tests__/licensePresentation.test.tsindex 00bf4536d2..e95619234b 100644--- a/frontend-modern/src/utils/__tests__/licensePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/licensePresentation.test.ts@@ -13,6 +13,7 @@ import {getSelfHostedPlanComparisonPresentation,getSelfHostedCurrentPlanPresentation,getSelfHostedCurrentPlanStatusPresentation,+ hasPulseProRuntimeMismatch,getLicenseFeatureLabel,getLicenseStatusLoadingState,getLicenseSubscriptionStatusPresentation,@@ -344,6 +345,51 @@ describe('licensePresentation', () => {});});+ it('surfaces active Pro licenses that are running on the community runtime', () => {+ const entitlements = {+ tier: 'pro',+ subscription_state: 'active',+ capabilities: ['relay', 'audit_logging', 'rbac', 'ai_autofix'],+ limits: [],+ upgrade_reasons: [],+ runtime: {+ build: 'community',+ label: 'Pulse Community runtime',+ },+ max_history_days: 90,+ };++ expect(hasPulseProRuntimeMismatch(entitlements)).toBe(true);+ expect(+ getSelfHostedCurrentPlanPresentation({+ entitlements,+ displayableCapabilities: ['Pulse Relay (Remote Access)', 'Audit Logging'],+ }),+ ).toMatchObject({+ title: 'Current plan: Pulse Pro',+ body: expect.stringContaining('private Pulse Pro runtime'),+ supplementalBadges: ['Pro runtime missing'],+ });+ expect(getSelfHostedActivationProofPresentation(entitlements)?.items[0]).toMatchObject({+ label: 'Pulse Pro runtime',+ statusLabel: 'Needs attention',+ state: 'missing',+ detail: expect.stringContaining('public Docker image'),+ });+ expect(+ getSelfHostedActivationSuccessPresentation({+ entitlements,+ displayableCapabilities: ['Pulse Relay (Remote Access)', 'Audit Logging'],+ source: 'manual',+ }),+ ).toMatchObject({+ title: 'Pulse Pro license is active',+ tone: expect.stringContaining('amber'),+ body: expect.stringContaining('community runtime'),+ highlightsLabel: 'Licensed capabilities',+ });+ });+it('sources active self-hosted current-plan summaries from the shared plan contract', () => {expect(getSelfHostedCurrentPlanPresentation({@@ -468,7 +514,7 @@ describe('licensePresentation', () => {}),).toEqual({title: 'Relay value proof',- body: "These checks come from this instance's entitlement payload, not from public pricing copy.",+ body: "These checks come from this instance's entitlement and runtime payloads, not from public pricing copy.",items: [{label: 'Remote access, pairing, and push',diff --git a/frontend-modern/src/utils/auditLogPresentation.ts b/frontend-modern/src/utils/auditLogPresentation.tsindex 667c42f5e4..36768e26eb 100644--- a/frontend-modern/src/utils/auditLogPresentation.ts+++ b/frontend-modern/src/utils/auditLogPresentation.ts@@ -20,6 +20,10 @@ export interface AuditLogEmptyStatePresentation {description: string;}+export interface AuditLogFeatureGateCopyOptions {+ paidRuntimeRequired?: boolean;+}+export const AUDIT_TOOLBAR_BUTTON_CLASS ='flex min-h-10 sm:min-h-10 items-center gap-2 px-3 py-2 text-sm font-medium bg-surface border border-border rounded-md hover:bg-surface-hover disabled:opacity-50';export const AUDIT_REFRESH_BUTTON_CLASS = `${AUDIT_TOOLBAR_BUTTON_CLASS} text-base-content`;@@ -95,6 +99,20 @@ export function getAuditLogLoadingState() {} as const;}+export function getAuditLogFeatureGateCopy(options: AuditLogFeatureGateCopyOptions = {}) {+ if (options.paidRuntimeRequired) {+ return {+ title: 'Pulse Pro runtime required',+ body: 'Your Pro license is active, but this install is running the community runtime. Install the private Pulse Pro runtime to use Audit Log and Audit Webhooks. Public GitHub releases and the public Docker image do not include those Pro runtime hooks.',+ } as const;+ }++ return {+ title: 'Audit Logging',+ body: 'Persistent, searchable audit logs with cryptographic signature verification.',+ } as const;+}+export function getAuditLogEmptyState(activeFilterCount: number): AuditLogEmptyStatePresentation {return activeFilterCount > 0? {diff --git a/frontend-modern/src/utils/auditWebhookPresentation.ts b/frontend-modern/src/utils/auditWebhookPresentation.tsindex 9abf1fa3d9..0626424def 100644--- a/frontend-modern/src/utils/auditWebhookPresentation.ts+++ b/frontend-modern/src/utils/auditWebhookPresentation.ts@@ -19,6 +19,7 @@ export interface AuditWebhookFeatureGateCopy {export interface AuditWebhookFeatureGateCopyOptions {showCommercialCopy?: boolean;+ paidRuntimeRequired?: boolean;}export interface AuditWebhookEmptyStateCopy {@@ -28,6 +29,13 @@ export interface AuditWebhookEmptyStateCopy {export function getAuditWebhookFeatureGateCopy(options: AuditWebhookFeatureGateCopyOptions = {},): AuditWebhookFeatureGateCopy {+ if (options.paidRuntimeRequired) {+ return {+ title: 'Pulse Pro runtime required',+ body: 'Your Pro license is active, but this install is running the community runtime. Install the private Pulse Pro runtime to deliver audit webhooks. Public GitHub releases and the public Docker image do not include those Pro runtime hooks.',+ };+ }+const showCommercialCopy = options.showCommercialCopy !== false;if (!showCommercialCopy) {diff --git a/frontend-modern/src/utils/licensePresentation.ts b/frontend-modern/src/utils/licensePresentation.tsindex c339557ec2..659aa9b40c 100644--- a/frontend-modern/src/utils/licensePresentation.ts+++ b/frontend-modern/src/utils/licensePresentation.ts@@ -148,6 +148,49 @@ const isActiveOrGraceSubscription = (subscriptionState?: string | null): booleanreturn normalized === 'active' || normalized === 'grace';};+const PRO_RUNTIME_REQUIRED_TIERS = new Set([+ 'pro',+ 'pro_annual',+ 'pro_plus',+ 'lifetime',+ 'enterprise',+]);++const isActivePaidRuntimeState = (subscriptionState?: string | null): boolean => {+ const normalized = (subscriptionState || '').trim().toLowerCase();+ return normalized === 'active' || normalized === 'grace' || normalized === 'trial';+};++export const requiresPulseProRuntime = (+ entitlements?: Pick<+ LicenseCommercialEntitlements,+ 'hosted_mode' | 'subscription_state' | 'tier'+ > | null,+): boolean => {+ if (!entitlements || entitlements.hosted_mode) {+ return false;+ }+ const normalizedTier = (entitlements.tier || '').trim().toLowerCase();+ return (+ PRO_RUNTIME_REQUIRED_TIERS.has(normalizedTier) &&+ isActivePaidRuntimeState(entitlements.subscription_state)+ );+};++export const hasPulseProRuntime = (+ entitlements?: Pick<LicenseCommercialEntitlements, 'runtime'> | null,+): boolean => (entitlements?.runtime?.build || '').trim().toLowerCase() === 'pro';++export const hasPulseProRuntimeMismatch = (+ entitlements?: Pick<+ LicenseCommercialEntitlements,+ 'hosted_mode' | 'runtime' | 'subscription_state' | 'tier'+ > | null,+): boolean => {+ const runtimeBuild = (entitlements?.runtime?.build || '').trim().toLowerCase();+ return requiresPulseProRuntime(entitlements) && runtimeBuild !== '' && runtimeBuild !== 'pro';+};+export const getLicenseTierLabel = (tier?: string | null): string => {const normalized = (tier || '').trim().toLowerCase();if (!normalized) return 'Unknown';@@ -367,6 +410,7 @@ export const getSelfHostedCurrentPlanPresentation = ({const includedExtras = getSelfHostedIncludedExtras({entitlements: current,});+ const runtimeMismatch = hasPulseProRuntimeMismatch(current);const unlockedFeaturesLabel =normalizedTier === 'free' ? 'Included on this instance' : 'Primary capabilities';@@ -389,10 +433,17 @@ export const getSelfHostedCurrentPlanPresentation = ({}if (normalizedState === 'trial') {+ if (runtimeMismatch) {+ supplementalBadges.push('Pro runtime missing');+ supplementalDetails.unshift(+ 'Public GitHub releases and the public Docker image are community builds. Install the private Pulse Pro runtime to test Pro-only runtime hooks during the trial.',+ );+ }return {title: `Current plan: ${planLabel} Trial`,- body:- unlockedFeatures.length > 0+ body: runtimeMismatch+ ? `${planLabel} trial entitlement is active, but this install is running the community runtime. Install the private Pulse Pro runtime from the paid download page to use Pro-only features.`+ : unlockedFeatures.length > 0? `${planLabel} trial capabilities are active on this instance right now.`: `${planLabel} trial entitlement is being confirmed for this instance.`,unlockedFeaturesLabel,@@ -419,6 +470,23 @@ export const getSelfHostedCurrentPlanPresentation = ({}if (normalizedState === 'active' || normalizedState === 'grace') {+ if (runtimeMismatch) {+ supplementalBadges.push('Pro runtime missing');+ supplementalDetails.unshift(+ 'Public GitHub releases and the public Docker image are community builds. They can accept the license, but Pro-only runtime hooks are only in the private Pulse Pro download.',+ );+ return {+ title: `Current plan: ${planLabel}`,+ body: `${planLabel} is active, but this install is running the community runtime. Install the private Pulse Pro runtime from the paid download page to use Pro-only features such as Audit Log, Audit Webhooks, RBAC, and governed remediation.`,+ unlockedFeaturesLabel,+ unlockedFeatures,+ includedExtrasLabel: includedExtras.length > 0 ? 'Included extras' : undefined,+ includedExtras,+ supplementalBadges,+ supplementalSummary: supplementalDetails.join(' '),+ };+ }+return {title: `Current plan: ${planLabel}`,body:@@ -511,7 +579,19 @@ export const getSelfHostedActivationProofPresentation = (const capabilities = new Set((entitlements.capabilities || []).map((capability) => capability.trim().toLowerCase()),);- const items: SelfHostedActivationProofItem[] = [+ const items: SelfHostedActivationProofItem[] = [];+ if (requiresPulseProRuntime(entitlements) && entitlements.runtime?.build) {+ const hasProRuntime = hasPulseProRuntime(entitlements);+ items.push({+ label: 'Pulse Pro runtime',+ state: hasProRuntime ? 'active' : 'missing',+ statusLabel: hasProRuntime ? 'Active' : 'Needs attention',+ detail: hasProRuntime+ ? 'This install reports the private Pulse Pro runtime.'+ : 'This install reports the community runtime. Install the private Pulse Pro runtime from the paid download page; public GitHub releases and the public Docker image do not include Pro-only runtime hooks.',+ });+ }+ items.push(buildCapabilityProofItem({capabilities,label: 'Remote access, pairing, and push',@@ -523,7 +603,7 @@ export const getSelfHostedActivationProofPresentation = (missingDetail:'Expected Relay convenience capabilities are not present. Refresh or recover activation before treating this plan as fully active.',}),- ];+ );const requiredHistoryDays = planDefinition.metricHistoryDays;const actualHistoryDays = entitlements.max_history_days;@@ -574,7 +654,7 @@ export const getSelfHostedActivationProofPresentation = (const planLabel = getSelfHostedPlanLabel(entitlements.tier);return {title: `${planLabel} value proof`,- body: "These checks come from this instance's entitlement payload, not from public pricing copy.",+ body: "These checks come from this instance's entitlement and runtime payloads, not from public pricing copy.",items,};};@@ -608,15 +688,22 @@ export const getSelfHostedActivationSuccessPresentation = ({entitlements: current,displayableCapabilities,});+ const runtimeMismatch = hasPulseProRuntimeMismatch(current);return {- tone: 'border-green-200 dark:border-green-900 bg-green-50 dark:bg-green-900 text-green-900 dark:text-green-100',- title: `${planLabel} is now active`,+ tone: runtimeMismatch+ ? 'border-amber-200 dark:border-amber-900 bg-amber-50 dark:bg-amber-900 text-amber-900 dark:text-amber-100'+ : 'border-green-200 dark:border-green-900 bg-green-50 dark:bg-green-900 text-green-900 dark:text-green-100',+ title: runtimeMismatch ? `${planLabel} license is active` : `${planLabel} is now active`,body:source === 'purchase'- ? `Checkout completed and this instance is now running ${planLabel}.`- : `The activation key was accepted and this instance is now running ${planLabel}.`,- highlightsLabel: 'Available now on this instance',+ ? runtimeMismatch+ ? `Checkout completed and the license is active. This install is still running the community runtime, so install the private Pulse Pro runtime from the paid download page before using Pro-only features.`+ : `Checkout completed and this instance is now running ${planLabel}.`+ : runtimeMismatch+ ? `The activation key was accepted. This install is still running the community runtime, so install the private Pulse Pro runtime from the paid download page before using Pro-only features.`+ : `The activation key was accepted and this instance is now running ${planLabel}.`,+ highlightsLabel: runtimeMismatch ? 'Licensed capabilities' : 'Available now on this instance',highlights,};};diff --git a/internal/api/contract_test.go b/internal/api/contract_test.goindex bc5d3d2b9e..dec12963b0 100644--- a/internal/api/contract_test.go+++ b/internal/api/contract_test.go@@ -5875,7 +5875,8 @@ func TestContract_SelfHostedCommunityEntitlementsJSONSnapshot(t *testing.T) {"max_history_days":7,"overflow_days_remaining":14,"legacy_connections":{"proxmox_nodes":0,"docker_hosts":0,"kubernetes_clusters":0},- "has_migration_gap":false+ "has_migration_gap":false,+ "runtime":{"build":"community","label":"Pulse Community runtime"}}`assertJSONSnapshot(t, got, want)@@ -5914,7 +5915,8 @@ func TestContract_SelfHostedCommunityRuntimeCapabilitiesJSONSnapshot(t *testing."capabilities":["update_alerts","sso","advanced_sso","ai_patrol"],"limits":[],"hosted_mode":false,- "max_history_days":7+ "max_history_days":7,+ "runtime":{"build":"community","label":"Pulse Community runtime"}}`assertJSONSnapshot(t, got, want)diff --git a/internal/api/entitlement_handlers_test.go b/internal/api/entitlement_handlers_test.goindex cec175da75..d5f65c9eb6 100644--- a/internal/api/entitlement_handlers_test.go+++ b/internal/api/entitlement_handlers_test.go@@ -558,6 +558,131 @@ func TestHandleRuntimeCapabilities_HostedCommunityEvaluatorStateStripsLegacyComm}}+func TestHandleRuntimeCapabilities_CommunityRuntimeBlocksPrivateProCapabilities(t *testing.T) {+ baseDir := t.TempDir()+ mtp := config.NewMultiTenantPersistence(baseDir)++ store := config.NewFileBillingStore(baseDir)+ if err := store.SaveBillingState("default", &entitlements.BillingState{+ Capabilities: []string{+ license.FeatureRelay,+ license.FeatureAuditLogging,+ license.FeatureRBAC,+ license.FeatureAIAutoFix,+ license.FeatureAdvancedReporting,+ },+ Limits: map[string]int64{},+ PlanVersion: "pro",+ SubscriptionState: entitlements.SubStateActive,+ }); err != nil {+ t.Fatalf("SaveBillingState failed: %v", err)+ }++ h := NewLicenseHandlers(mtp, false)+ ctx := context.WithValue(context.Background(), OrgIDContextKey, "default")++ runtimeReq := httptest.NewRequest(http.MethodGet, "/api/license/runtime-capabilities", nil).+ WithContext(ctx)+ runtimeRec := httptest.NewRecorder()+ h.HandleRuntimeCapabilities(runtimeRec, runtimeReq)+ if runtimeRec.Code != http.StatusOK {+ t.Fatalf("runtime status=%d, want %d: %s", runtimeRec.Code, http.StatusOK, runtimeRec.Body.String())+ }++ var runtimePayload RuntimeCapabilitiesPayload+ if err := json.Unmarshal(runtimeRec.Body.Bytes(), &runtimePayload); err != nil {+ t.Fatalf("unmarshal runtime payload failed: %v", err)+ }+ if runtimePayload.Runtime == nil || runtimePayload.Runtime.Build != pkglicensing.RuntimeBuildCommunity {+ t.Fatalf("runtime identity=%+v, want community", runtimePayload.Runtime)+ }+ for _, feature := range []string{license.FeatureAuditLogging, license.FeatureRBAC, license.FeatureAIAutoFix} {+ if containsCapability(runtimePayload.Capabilities, feature) {+ t.Fatalf("runtime capabilities retained private feature %q: %v", feature, runtimePayload.Capabilities)+ }+ }+ for _, feature := range []string{license.FeatureRelay, license.FeatureAdvancedReporting} {+ if !containsCapability(runtimePayload.Capabilities, feature) {+ t.Fatalf("runtime capabilities lost supported feature %q: %v", feature, runtimePayload.Capabilities)+ }+ }+ if len(runtimePayload.BlockedCapabilities) != 3 {+ t.Fatalf("blocked capabilities=%+v, want 3 private runtime blocks", runtimePayload.BlockedCapabilities)+ }+ for _, block := range runtimePayload.BlockedCapabilities {+ if block.Reason != "paid_runtime_required" {+ t.Fatalf("blocked reason=%q, want paid_runtime_required", block.Reason)+ }+ if block.ActionURL != pkglicensing.PulseProDownloadURL {+ t.Fatalf("blocked action_url=%q, want %q", block.ActionURL, pkglicensing.PulseProDownloadURL)+ }+ }++ entitlementReq := httptest.NewRequest(http.MethodGet, "/api/license/entitlements", nil).+ WithContext(ctx)+ entitlementRec := httptest.NewRecorder()+ h.HandleEntitlements(entitlementRec, entitlementReq)+ if entitlementRec.Code != http.StatusOK {+ t.Fatalf("entitlements status=%d, want %d: %s", entitlementRec.Code, http.StatusOK, entitlementRec.Body.String())+ }+ var entitlementPayload EntitlementPayload+ if err := json.Unmarshal(entitlementRec.Body.Bytes(), &entitlementPayload); err != nil {+ t.Fatalf("unmarshal entitlement payload failed: %v", err)+ }+ for _, feature := range []string{license.FeatureAuditLogging, license.FeatureRBAC, license.FeatureAIAutoFix} {+ if !containsCapability(entitlementPayload.Capabilities, feature) {+ t.Fatalf("entitlements lost licensed feature %q: %v", feature, entitlementPayload.Capabilities)+ }+ }+}++func TestHandleRuntimeCapabilities_ProRuntimePreservesPrivateProCapabilities(t *testing.T) {+ baseDir := t.TempDir()+ mtp := config.NewMultiTenantPersistence(baseDir)++ store := config.NewFileBillingStore(baseDir)+ if err := store.SaveBillingState("default", &entitlements.BillingState{+ Capabilities: []string{+ license.FeatureRelay,+ license.FeatureAuditLogging,+ license.FeatureRBAC,+ license.FeatureAIAutoFix,+ },+ Limits: map[string]int64{},+ PlanVersion: "pro",+ SubscriptionState: entitlements.SubStateActive,+ }); err != nil {+ t.Fatalf("SaveBillingState failed: %v", err)+ }++ h := NewLicenseHandlers(mtp, false)+ h.SetRuntimeIdentity(proRuntimeIdentityFromLicensing())++ req := httptest.NewRequest(http.MethodGet, "/api/license/runtime-capabilities", nil).+ WithContext(context.WithValue(context.Background(), OrgIDContextKey, "default"))+ rec := httptest.NewRecorder()+ h.HandleRuntimeCapabilities(rec, req)+ if rec.Code != http.StatusOK {+ t.Fatalf("runtime status=%d, want %d: %s", rec.Code, http.StatusOK, rec.Body.String())+ }++ var payload RuntimeCapabilitiesPayload+ if err := json.Unmarshal(rec.Body.Bytes(), &payload); err != nil {+ t.Fatalf("unmarshal runtime payload failed: %v", err)+ }+ if payload.Runtime == nil || payload.Runtime.Build != pkglicensing.RuntimeBuildPro {+ t.Fatalf("runtime identity=%+v, want pro", payload.Runtime)+ }+ for _, feature := range []string{license.FeatureAuditLogging, license.FeatureRBAC, license.FeatureAIAutoFix} {+ if !containsCapability(payload.Capabilities, feature) {+ t.Fatalf("pro runtime capabilities lost private feature %q: %v", feature, payload.Capabilities)+ }+ }+ if len(payload.BlockedCapabilities) != 0 {+ t.Fatalf("pro runtime blocked capabilities=%+v, want none", payload.BlockedCapabilities)+ }+}+func TestEntitlementHandler_SelfHostedTrialEligibilityRetiredForFreshOrg(t *testing.T) {baseDir := t.TempDir()mtp := config.NewMultiTenantPersistence(baseDir)diff --git a/internal/api/licensing_bridge.go b/internal/api/licensing_bridge.goindex 58cfae7484..e8bf781d25 100644--- a/internal/api/licensing_bridge.go+++ b/internal/api/licensing_bridge.go@@ -36,6 +36,7 @@ type subscriptionState = pkglicensing.SubscriptionStatetype entitlementPayloadModel = pkglicensing.EntitlementPayloadtype commercialPosturePayloadModel = pkglicensing.CommercialPosturePayloadtype runtimeCapabilitiesPayloadModel = pkglicensing.RuntimeCapabilitiesPayload+type runtimeIdentityModel = pkglicensing.RuntimeIdentitytype limitStatusModel = pkglicensing.LimitStatustype upgradeReasonModel = pkglicensing.UpgradeReasontype entitlementUsageSnapshotModel = pkglicensing.EntitlementUsageSnapshot@@ -199,6 +200,29 @@ func buildRuntimeCapabilitiesPayloadWithUsageFromLicensing(return pkglicensing.BuildRuntimeCapabilitiesPayloadWithUsage(status, subscriptionState, usage)}+func communityRuntimeIdentityFromLicensing() runtimeIdentityModel {+ return pkglicensing.CommunityRuntimeIdentity()+}++func proRuntimeIdentityFromLicensing() runtimeIdentityModel {+ return pkglicensing.ProRuntimeIdentity()+}++func normalizeRuntimeIdentityFromLicensing(identity runtimeIdentityModel) runtimeIdentityModel {+ return pkglicensing.NormalizeRuntimeIdentity(identity)+}++func cloneRuntimeIdentityFromLicensing(identity runtimeIdentityModel) *runtimeIdentityModel {+ return pkglicensing.CloneRuntimeIdentity(identity)+}++func filterCapabilitiesForRuntimeIdentityFromLicensing(+ capabilities []string,+ identity runtimeIdentityModel,+) ([]string, []pkglicensing.RuntimeCapabilityBlock) {+ return pkglicensing.FilterCapabilitiesForRuntimeIdentity(capabilities, identity)+}+func buildCommercialPosturePayloadWithUsageFromLicensing(status *licenseStatus,subscriptionState string,diff --git a/internal/api/licensing_handlers.go b/internal/api/licensing_handlers.goindex 91ae8b4bff..2a0e3fc4ea 100644--- a/internal/api/licensing_handlers.go+++ b/internal/api/licensing_handlers.go@@ -63,6 +63,7 @@ type LicenseHandlers struct {mtMonitor *monitoring.MultiTenantMonitorhostedLeaseRefresh sync.Map // map[string]*hostedEntitlementRefreshLoopruntimeVersion string+ runtimeIdentity runtimeIdentityModel}// NewLicenseHandlers creates a new license handlers instance.@@ -109,6 +110,20 @@ func (h *LicenseHandlers) SetRuntimeVersion(version string) {h.runtimeVersion = strings.TrimSpace(version)}+func (h *LicenseHandlers) SetRuntimeIdentity(identity runtimeIdentityModel) {+ if h == nil {+ return+ }+ h.runtimeIdentity = normalizeRuntimeIdentityFromLicensing(identity)+}++func (h *LicenseHandlers) currentRuntimeIdentity() runtimeIdentityModel {+ if h == nil {+ return communityRuntimeIdentityFromLicensing()+ }+ return normalizeRuntimeIdentityFromLicensing(h.runtimeIdentity)+}+// StopAllBackgroundLoops stops grant refresh and revocation poll loops for all tenant services.// Called during server shutdown to ensure clean goroutine termination.func (h *LicenseHandlers) StopAllBackgroundLoops() {diff --git a/internal/api/router.go b/internal/api/router.goindex ab9012cd53..ca79853f35 100644--- a/internal/api/router.go+++ b/internal/api/router.go@@ -3180,6 +3180,13 @@ func (r *Router) GetLicenseHandlers() *LicenseHandlers {return r.licenseHandlers}+func (r *Router) SetLicenseRuntimeIdentity(identity runtimeIdentityModel) {+ if r == nil || r.licenseHandlers == nil {+ return+ }+ r.licenseHandlers.SetRuntimeIdentity(identity)+}+// StopGrantRefresh stops all grant refresh and revocation poll loops across all tenants.func (r *Router) StopGrantRefresh() {if r.licenseHandlers != nil {diff --git a/internal/api/subscription_entitlements.go b/internal/api/subscription_entitlements.goindex 9fc3ea76ee..d7f754690c 100644--- a/internal/api/subscription_entitlements.go+++ b/internal/api/subscription_entitlements.go@@ -65,6 +65,7 @@ func (h *LicenseHandlers) buildCommercialEntitlementPayload(payload.CommercialMigration = cloneCommercialMigrationStatusFromLicensing(existing.CommercialMigration)}payload.HostedMode = h != nil && h.hostedMode+ payload.Runtime = cloneRuntimeIdentityFromLicensing(h.currentRuntimeIdentity())return payload, nil}@@ -127,6 +128,12 @@ func (h *LicenseHandlers) HandleRuntimeCapabilities(w http.ResponseWriter, r *htusage,)payload.HostedMode = h != nil && h.hostedMode+ runtimeIdentity := h.currentRuntimeIdentity()+ payload.Runtime = cloneRuntimeIdentityFromLicensing(runtimeIdentity)+ payload.Capabilities, payload.BlockedCapabilities = filterCapabilitiesForRuntimeIdentityFromLicensing(+ payload.Capabilities,+ runtimeIdentity,+ )if h != nil && h.cfg != nil && h.cfg.DemoMode {payload = sanitizeRuntimeCapabilitiesPayloadForPublicDemo(payload)}diff --git a/pkg/licensing/entitlement_payload.go b/pkg/licensing/entitlement_payload.goindex d987ac2bf8..648332f675 100644--- a/pkg/licensing/entitlement_payload.go+++ b/pkg/licensing/entitlement_payload.go@@ -2,6 +2,7 @@ package licensingimport ("math"+ "strings""time")@@ -83,6 +84,9 @@ type EntitlementPayload struct {// CommercialMigration reports unresolved paid-license migration work entering// from v5-era commercial state.CommercialMigration *CommercialMigrationStatus `json:"commercial_migration,omitempty"`++ // Runtime identifies the binary/channel serving this entitlement payload.+ Runtime *RuntimeIdentity `json:"runtime,omitempty"`}// CommercialPosturePayload is the canonical non-billing commercial contract@@ -141,6 +145,31 @@ type RuntimeCapabilitiesPayload struct {// MaxHistoryDays is the maximum metrics history retention in days for the current tier.MaxHistoryDays int `json:"max_history_days"`++ // Runtime identifies the binary/channel serving the runtime capability contract.+ Runtime *RuntimeIdentity `json:"runtime,omitempty"`++ // BlockedCapabilities lists licensed capabilities that this binary cannot serve.+ BlockedCapabilities []RuntimeCapabilityBlock `json:"blocked_capabilities,omitempty"`+}++const (+ RuntimeBuildCommunity = "community"+ RuntimeBuildPro = "pro"++ PulseProDownloadURL = "https://pulserelay.pro/download.html"+)++type RuntimeIdentity struct {+ Build string `json:"build"`+ Label string `json:"label"`+ DownloadURL string `json:"download_url,omitempty"`+}++type RuntimeCapabilityBlock struct {+ Key string `json:"key"`+ Reason string `json:"reason"`+ ActionURL string `json:"action_url,omitempty"`}// LimitStatus represents a quantitative limit with current usage state.@@ -191,6 +220,88 @@ func cloneLimitStatuses(values []LimitStatus) []LimitStatus {return append([]LimitStatus(nil), values...)}+func CommunityRuntimeIdentity() RuntimeIdentity {+ return RuntimeIdentity{+ Build: RuntimeBuildCommunity,+ Label: "Pulse Community runtime",+ }+}++func ProRuntimeIdentity() RuntimeIdentity {+ return RuntimeIdentity{+ Build: RuntimeBuildPro,+ Label: "Pulse Pro runtime",+ DownloadURL: PulseProDownloadURL,+ }+}++func NormalizeRuntimeIdentity(identity RuntimeIdentity) RuntimeIdentity {+ build := strings.ToLower(strings.TrimSpace(identity.Build))+ switch build {+ case RuntimeBuildPro:+ normalized := ProRuntimeIdentity()+ if label := strings.TrimSpace(identity.Label); label != "" {+ normalized.Label = label+ }+ if downloadURL := strings.TrimSpace(identity.DownloadURL); downloadURL != "" {+ normalized.DownloadURL = downloadURL+ }+ return normalized+ default:+ normalized := CommunityRuntimeIdentity()+ if label := strings.TrimSpace(identity.Label); label != "" {+ normalized.Label = label+ }+ return normalized+ }+}++func IsProRuntime(identity RuntimeIdentity) bool {+ return NormalizeRuntimeIdentity(identity).Build == RuntimeBuildPro+}++func CloneRuntimeIdentity(identity RuntimeIdentity) *RuntimeIdentity {+ normalized := NormalizeRuntimeIdentity(identity)+ return &normalized+}++func FilterCapabilitiesForRuntimeIdentity(+ capabilities []string,+ identity RuntimeIdentity,+) ([]string, []RuntimeCapabilityBlock) {+ cloned := cloneCapabilityKeys(capabilities)+ if IsProRuntime(identity) {+ return cloned, nil+ }++ privateRuntimeCapabilities := map[string]struct{}{+ FeatureAIAlerts: {},+ FeatureAIAutoFix: {},+ FeatureKubernetesAI: {},+ FeatureAgentProfiles: {},+ FeatureRBAC: {},+ FeatureAuditLogging: {},+ }+ filtered := make([]string, 0, len(cloned))+ blocked := make([]RuntimeCapabilityBlock, 0)+ for _, capability := range cloned {+ normalized := strings.TrimSpace(capability)+ if _, requiresPrivateRuntime := privateRuntimeCapabilities[normalized]; requiresPrivateRuntime {+ blocked = append(blocked, RuntimeCapabilityBlock{+ Key: normalized,+ Reason: "paid_runtime_required",+ ActionURL: PulseProDownloadURL,+ })+ continue+ }+ filtered = append(filtered, capability)+ }+ if blocked == nil {+ blocked = []RuntimeCapabilityBlock{}+ }+ return filtered, blocked+}+func (c LegacyConnectionCounts) Total() int64 {return c.ProxmoxNodes + c.DockerHosts + c.KubernetesClusters}diff --git a/pkg/licensing/entitlement_payload_test.go b/pkg/licensing/entitlement_payload_test.goindex 7ab43b746e..807cea891b 100644--- a/pkg/licensing/entitlement_payload_test.go+++ b/pkg/licensing/entitlement_payload_test.go@@ -424,6 +424,50 @@ func TestBuildRuntimeCapabilitiesPayloadWithUsage_StripsInternalOnlyCapabilities}}+func TestFilterCapabilitiesForRuntimeIdentity_BlocksPrivateRuntimeCapabilitiesOnCommunityBuild(t *testing.T) {+ filtered, blocked := FilterCapabilitiesForRuntimeIdentity([]string{+ FeatureRelay,+ FeatureAuditLogging,+ FeatureRBAC,+ FeatureAIAutoFix,+ FeatureAdvancedReporting,+ }, CommunityRuntimeIdentity())++ for _, feature := range []string{FeatureAuditLogging, FeatureRBAC, FeatureAIAutoFix} {+ if containsString(filtered, feature) {+ t.Fatalf("community runtime capabilities retained private feature %q: %v", feature, filtered)+ }+ }+ for _, feature := range []string{FeatureRelay, FeatureAdvancedReporting} {+ if !containsString(filtered, feature) {+ t.Fatalf("community runtime capabilities lost supported feature %q: %v", feature, filtered)+ }+ }+ if len(blocked) != 3 {+ t.Fatalf("blocked capability count=%d, want 3: %+v", len(blocked), blocked)+ }+ for _, block := range blocked {+ if block.Reason != "paid_runtime_required" {+ t.Fatalf("blocked reason=%q, want paid_runtime_required", block.Reason)+ }+ if block.ActionURL != PulseProDownloadURL {+ t.Fatalf("blocked action_url=%q, want %q", block.ActionURL, PulseProDownloadURL)+ }+ }+}++func TestFilterCapabilitiesForRuntimeIdentity_PreservesPrivateRuntimeCapabilitiesOnProBuild(t *testing.T) {+ capabilities := []string{FeatureRelay, FeatureAuditLogging, FeatureRBAC, FeatureAIAutoFix}+ filtered, blocked := FilterCapabilitiesForRuntimeIdentity(capabilities, ProRuntimeIdentity())++ if !reflect.DeepEqual(filtered, capabilities) {+ t.Fatalf("pro runtime capabilities=%v, want %v", filtered, capabilities)+ }+ if len(blocked) != 0 {+ t.Fatalf("pro runtime blocked capabilities=%+v, want none", blocked)+ }+}+func TestBuildRuntimeCapabilitiesPayload_NilStatusDefaultsToFreeTier(t *testing.T) {payload := BuildRuntimeCapabilitiesPayload(nil, "")if payload.MaxHistoryDays != TierHistoryDays[TierFree] {diff --git a/pkg/server/server.go b/pkg/server/server.goindex f749429660..1cb9caa16a 100644--- a/pkg/server/server.go+++ b/pkg/server/server.go@@ -111,6 +111,23 @@ func SetBusinessHooks(h BusinessHooks) {globalHooks = h}+func runtimeIdentityForBusinessHooks(h BusinessHooks) pkglicensing.RuntimeIdentity {+ if h.BindAuditAdminEndpoints != nil ||+ h.BindRBACAdminEndpoints != nil ||+ h.BindSSOAdminEndpoints != nil ||+ h.BindReportingAdminEndpoints != nil ||+ h.BindAIAutoFixEndpoints != nil ||+ h.BindAIAlertAnalysisEndpoints != nil ||+ h.AIInvestigationEnabled != nil ||+ h.CreateRemediationEngine != nil ||+ h.CreateInvestigationStore != nil ||+ h.CreateInvestigationOrchestrator != nil ||+ h.CreateAlertAnalyzer != nil {+ return pkglicensing.ProRuntimeIdentity()+ }+ return pkglicensing.CommunityRuntimeIdentity()+}+// Run starts the Pulse monitoring server.func Run(ctx context.Context, version string) error {// Initialize logger with baseline defaults for early startup logs@@ -274,6 +291,7 @@ func Run(ctx context.Context, version string) error {createInvestigationStore := globalHooks.CreateInvestigationStorecreateInvestigationOrchestrator := globalHooks.CreateInvestigationOrchestratorcreateAlertAnalyzer := globalHooks.CreateAlertAnalyzer+ runtimeIdentity := runtimeIdentityForBusinessHooks(globalHooks)globalHooksMu.Unlock()api.SetAIInvestigationEnabled(aiInvestigationEnabled)@@ -375,6 +393,7 @@ func Run(ctx context.Context, version string) error {return nil}router = api.NewRouter(cfg, reloadableMonitor.GetMonitor(), reloadableMonitor.GetMultiTenantMonitor(), wsHub, reloadFunc, version)+ router.SetLicenseRuntimeIdentity(runtimeIdentity)router.StartBackgroundWorkers()// Inject resource store into monitor for WebSocket broadcastsdiff --git a/pkg/server/server_test.go b/pkg/server/server_test.goindex ab5f8e0a8a..cf69ff4da5 100644--- a/pkg/server/server_test.go+++ b/pkg/server/server_test.go@@ -12,6 +12,8 @@ import ("time""github.com/rcourtman/pulse-go-rewrite/internal/config"+ "github.com/rcourtman/pulse-go-rewrite/pkg/extensions"+ pkglicensing "github.com/rcourtman/pulse-go-rewrite/pkg/licensing""github.com/rcourtman/pulse-go-rewrite/pkg/metrics")@@ -40,6 +42,21 @@ func TestBusinessHooks(t *testing.T) {}+func TestRuntimeIdentityForBusinessHooks(t *testing.T) {+ if got := runtimeIdentityForBusinessHooks(BusinessHooks{}); got.Build != pkglicensing.RuntimeBuildCommunity {+ t.Fatalf("empty hooks runtime build=%q, want community", got.Build)+ }++ got := runtimeIdentityForBusinessHooks(BusinessHooks{+ BindAuditAdminEndpoints: func(defaults extensions.AuditAdminEndpoints, runtime extensions.AuditAdminRuntime) extensions.AuditAdminEndpoints {+ return defaults+ },+ })+ if got.Build != pkglicensing.RuntimeBuildPro {+ t.Fatalf("enterprise hooks runtime build=%q, want pro", got.Build)+ }+}+func TestPerformAutoImport_Success(t *testing.T) {capture := setCaptureAuditLogger(t)