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
Remove self-hosted trial and quickstart surfaces
rcourtman269fa3cf4fdc
diff --git a/README.md b/README.mdindex 76ea24b85f..aff311b432 100644--- a/README.md+++ b/README.md@@ -46,7 +46,7 @@ Power-user shortcuts:### AI-Powered- **Chat Assistant (BYOK)**: Ask questions about your infrastructure in natural language-- **Patrol**: Background health checks that generate findings on a schedule. Community self-hosted installs can run Patrol with your own AI provider, and optional managed quickstart runs are available only after explicit Pulse Account activation.+- **Patrol**: Background health checks that generate findings on a schedule. Community self-hosted installs can run Patrol with your own AI provider or a local model.- **Alert Analysis (Pro / hosted Cloud)**: Optional AI analysis when alerts fire- **Cost Tracking**: Track usage and costs per provider/model@@ -168,11 +168,8 @@ collected. VMs, containers, pods, disks, backups, and other child resourcesunder that system are included rather than counted separately, but that count isno longer the self-hosted paid gate.-Community keeps Patrol available with BYOK. Managed Patrol quickstart is an-optional Pulse Account activation path: 25 server-verified Patrol runs with no-API key for first-run setup. It is not required for Community monitoring or-steady-state self-hosted Patrol. Relay remains the convenience tier, and Pro is-the paid operations tier.+Community keeps Patrol available with your own provider or local model. Relay+remains the convenience tier, and Pro is the paid operations tier.Runtime-aligned capability summary:@@ -198,11 +195,9 @@ Pulse Patrol runs on your schedule (every 10 minutes to every 7 days, default 6- Clock drift across cluster nodes- Container health check failures-On self-hosted installs, Pulse Patrol's steady-state path uses your configured-provider (BYOK) from your Pulse server. The managed exception is optional Patrol-quickstart: if you explicitly activate through Pulse Account, Pulse can use 25-managed Patrol runs for first-run setup before you add an API key. Otherwise,-Community installs continue with BYOK. Chat Assistant remains BYOK.+On self-hosted installs, Pulse Patrol uses the provider you configure from your+Pulse server. That can be a commercial API key or a local model endpoint. Chat+Assistant follows the same self-managed provider model.Technical highlights:- Cross-system context (nodes, VMs, backups, containers, and metrics history)diff --git a/docs/PRIVACY.md b/docs/PRIVACY.mdindex d3bf738c68..4a2a8e8dd7 100644--- a/docs/PRIVACY.md+++ b/docs/PRIVACY.md@@ -95,8 +95,7 @@ The telemetry implementation is in [`internal/telemetry/telemetry.go`](../internPulse can make outbound connections when you enable specific features:-- **AI (BYOK)**: when AI features are configured with your own API key, Pulse sends only the context required for your request directly to the provider you chose (OpenAI, Anthropic, etc.). Requests do not transit Pulse infrastructure. Before non-local model requests leave the instance, governed resource details use the same resource-policy redaction shown in Data Handling: local-only resource details are omitted from detailed prompt sections or replaced with policy-safe summaries, and known restricted resource identifiers are redacted where they appear in provider-bound context. See `docs/AI.md`.-- **AI (Quickstart)**: when the Pulse-hosted Quickstart provider is selected, your chat request, including messages, system prompt, and tool definitions, is forwarded through `license.pulserelay.pro/v1/quickstart/patrol` to the underlying model provider. This path exists so eligible quickstart users can try AI without their own API key; it means requests transit Pulse infrastructure. The same resource-policy redaction is applied before the Quickstart request is sent, and the Quickstart proxy requires the runtime to mark the request as using that policy. To keep prompts off Pulse infrastructure entirely, use a BYOK provider instead.+- **AI providers**: when AI features are configured, Pulse sends only the context required for your request to the provider you chose. Local providers stay on your network; non-local providers such as OpenAI or Anthropic receive provider-bound context directly from your Pulse instance. AI prompts from self-managed installs do not transit Pulse infrastructure. Before non-local model requests leave the instance, governed resource details use the same resource-policy redaction shown in Data Handling: local-only resource details are omitted from detailed prompt sections or replaced with policy-safe summaries, and known restricted resource identifiers are redacted where they appear in provider-bound context. See `docs/AI.md`.- **Relay / Remote Access**: when relay is enabled, Pulse connects to the configured relay endpoint to enable mobile access. See Settings → Remote Access.- **Update checks**: Pulse can check for new releases/updates (for example via GitHub release metadata) depending on your deployment and configuration.diff --git a/docs/PULSE_PRO.md b/docs/PULSE_PRO.mdindex 8d2af3b27d..4549f74239 100644--- a/docs/PULSE_PRO.md+++ b/docs/PULSE_PRO.md@@ -120,7 +120,7 @@ This matrix is derived from the canonical table in `docs/architecture/ENTITLEMEN| Constant | Capability Key | Display Name | Community | Relay | Pro | Cloud | Primary Gating Mechanism / Notes ||---|---|---|:---:|:---:|:---:|:---:|---|-| `FeatureAIPatrol` | `ai_patrol` | Pulse Patrol (Background Health Checks) | Y | Y | Y | Y | Patrol itself is available on Community with BYOK. Optional managed quickstart runs are available only after explicit Pulse Account activation. Higher-autonomy outcomes and fix execution are separately gated. |+| `FeatureAIPatrol` | `ai_patrol` | Pulse Patrol (Background Health Checks) | Y | Y | Y | Y | Patrol itself is available on Community with your own provider or local model. Higher-autonomy outcomes and fix execution are separately gated. || `FeatureRelay` | `relay` | Remote Access (Mobile Relay) | N | Y | Y | Y | API route gating via `RequireLicenseFeature(..., relay, ...)` for relay settings and onboarding endpoints. || `FeatureAIAlerts` | `ai_alerts` | Alert-Triggered Root-Cause Analysis | N | N | Y | Y | API route gating via `RequireLicenseFeature(..., ai_alerts, ...)`. || `FeatureAIAutoFix` | `ai_autofix` | Safe Remediation Workflows | N | N | Y | Y | Required for governed fix execution and autonomous remediation actions. |@@ -153,9 +153,7 @@ Patrol and the Assistant support tiered autonomy:### Community- Unlimited self-hosted core monitoring.- 7-day history.-- Pulse Patrol with BYOK.-- Optional Patrol quickstart after explicit Pulse Account activation: 25 Patrol runs with no API key on a server-verified install.-- Quickstart is Patrol-only activation support, not a general hosted chat entitlement.+- Pulse Patrol with your own provider or local model.- Basic SSO and update alerts.### Relaydiff --git a/docs/architecture/v6-pricing-and-tiering.md b/docs/architecture/v6-pricing-and-tiering.mdindex 7fbc98d3ea..21a55da088 100644--- a/docs/architecture/v6-pricing-and-tiering.md+++ b/docs/architecture/v6-pricing-and-tiering.md@@ -18,10 +18,10 @@ align with this document. If there is a conflict, this document wins.1. **Free attracts, paid converts.** The free tier must be good enough to get users in thedoor, while paid tiers must add obvious operational value for serious users.-2. **Gate on action, not information.** Self-hosted AI Patrol is BYOK in steady state,- with one optional Patrol-only quickstart allowance after explicit Pulse Account- activation. We never cap how many times users can run Patrol through their own API- keys. The paid gate is on auto-execution of fixes, not on analysis or suggestions.+2. **Gate on action, not information.** AI Patrol on self-hosted installs uses the operator's+ configured provider or local model. We never cap how many times users can run+ Patrol through their own provider. The paid gate is on auto-execution of fixes,+ not on analysis or suggestions.3. **Smooth upgrade ladder.** No large price gaps. Every step up has a clear reason.4. **Simple to understand.** A homelabber should know which tier is right for them inunder 10 seconds.@@ -104,8 +104,7 @@ with self-hosted commercial surfaces treating core monitoring as unlimited.| SSO | Basic OIDC || Update notifications | Yes || Metrics history | **7 days** |-| AI Patrol | Monitor + root-cause summaries + fix suggestions (BYOK by default, with optional Patrol quickstart after explicit Pulse Account activation) |-| AI Quickstart Credits | **25 hosted Patrol runs** (explicit Pulse Account activation only; no API key needed, Patrol only, powered by MiniMax 2.5M) |+| AI Patrol | Monitor + root-cause summaries + fix suggestions with the operator's configured provider or local model || Safe remediation workflows | **No** (must apply fixes manually) || Alert-triggered root-cause analysis | No || Relay | No |@@ -117,33 +116,15 @@ with self-hosted commercial surfaces treating core monitoring as unlimited.| Agent profiles | No || PDF/CSV reporting | No |-**AI Patrol in free tier:** Two modes of operation:--1. **Quickstart Credits (Patrol only, no API key needed):** Installs with an- explicit Pulse Account activation and server-verified installation identity get- 25 hosted Patrol runs powered by MiniMax 2.5M. This gives users who deliberately- enter the commercial/account path a bounded way to try Patrol before adding a- provider. Community installs that do not activate continue with their own API key- instead. After credits are exhausted, users connect their own API key to continue- self-hosted Patrol. Quickstart is activation support only: it is not a general- hosted chat entitlement and it does not replace BYOK for ongoing self-hosted AI use.--2. **BYOK (after credits or by choice):** Users provide their own API key- (OpenAI/Anthropic/etc.). No commercial quota — it's their API key, their money. Only- technical guardrails (anti-loop, rate protection).+**AI Patrol in free tier:** Users provide their own provider connection+(OpenAI/Anthropic/etc.) or a local model endpoint. No commercial quota applies:+it's their provider, their key or local runtime, and their operating cost. Pulse+applies technical guardrails such as anti-loop protection and rate protection.In both modes, the paid gate is governed execution through Pulse: free users see thefull analysis and fix suggestions but apply fixes manually. Pro users can run approvedremediation actions through Pulse.-**Quickstart credit economics:**-- Model: MiniMax 2.5M (selected for cost-effectiveness)-- Estimated cost: $0.002–0.01 per Patrol run-- Budget per 10,000 users (all 25 credits used): $500–2,500-- This is customer acquisition cost, not ongoing expense-- Cost can be further reduced with: caching repeated analyses, strict context/token caps,- model cascade (cheap triage first, deeper analysis only when needed)-### Relay — $4.99/month or $39/year| Element | Value |@@ -302,13 +283,11 @@ Free/Relay users see exactly what Patrol found and how to fix it (specific commamust apply manually. Pro users see the same information with an "Apply Fix" button. EveryPatrol finding is a conversion moment.-### 3. AI Quickstart Credits (25 hosted Patrol runs)-Eligible activated installs get 25 Patrol runs powered by MiniMax 2.5M with no API key setup.-This gives support and commercial handoff flows one bounded Patrol-first activation path.-Ordinary self-hosted Community installs should connect their own key (BYOK, stays free) and-must not be pushed into a trial just to use Patrol. Paid operations features such as safe remediation workflows,-alert analysis, and longer history remain opt-in extras; they do not replace BYOK for-self-hosted AI runtime. Cost: ~$0.002-0.01 per run.+### 3. Provider setup stays self-managed+AI setup on self-hosted installs should point operators at their own provider connection or+local model endpoint. Paid operations features such as safe remediation+workflows, alert analysis, and longer history remain opt-in extras; they do not+replace the self-managed AI runtime path.### 4. Relay as optional convenience ($39/yr)Gives remote-access and mobile users a small paid convenience option without turning core@@ -371,26 +350,16 @@ want to self-host.----## Trial System--- **Duration:** 14 days-- **Credit card:** Not required-- **Available on:** Pro and hosted Cloud. Legacy Pro+ continuity may still satisfy- the same runtime capability for existing holders, but it is not a public plan.-- **Not available on:** Relay (cheap enough to just buy)-- **Features during trial:** Full Pro capabilities-- **Activation paths:**- - Self-hosted: POST `/api/license/trial/start` returns `409 trial_signup_required` with a hosted control-plane `action_url`- - Self-hosted completion: hosted control plane returns a signed token to `/auth/trial-activate`- - Cloud: Stripe checkout with trial period-- **Restrictions:**- - One trial per workspace- - Rate limited: a short per-org retry burst is allowed so operators can- revisit the hosted handoff; duplicate immediate starts may continue to- return `409 trial_signup_required` while that burst remains open, then the- local runtime returns `429 trial_rate_limited` with `Retry-After` backoff- metadata once it is exhausted- - Cannot start if already has active Pro license+## Self-Hosted Trial Policy++Self-hosted v6 GA should not present a trial acquisition path inside the normal+app. Paid self-hosted plans are discoverable from explicit pricing, activation,+recovery, support, or account flows rather than being pushed into ordinary+monitoring, infrastructure setup, AI setup, or Patrol workflows.++Legacy or externally initiated activation plumbing may remain as a compatibility+boundary while existing purchases and support cases are migrated, but it is not a+customer-facing GA funnel.---diff --git a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md b/docs/release-control/v6/internal/subsystems/agent-lifecycle.mdindex c4bbb295fa..a76521ea8e 100644--- a/docs/release-control/v6/internal/subsystems/agent-lifecycle.md+++ b/docs/release-control/v6/internal/subsystems/agent-lifecycle.md@@ -753,9 +753,10 @@ lifecycle-adjacent authenticated-shell surfaces such as`frontend-modern/src/components/Settings/useAgentProfilesPanelState.ts` mustconsume the shared posture owner instead of reintroducing their own mount-timecommercial reads.-Even on that governed first-run exception, render-time trial gating should stay-on shared selectors such as `isCommercialTrialActive()` instead of reading raw-commercial-posture fields inside `SetupCompletionPanel.tsx`.+Even on that governed first-run exception, render-time commercial gating must+not revive trial-status selectors or raw commercial-posture reads inside+`SetupCompletionPanel.tsx`; first-run can link to explicit plan or support+handoff only where presentation policy allows.That same shared boundary now also owns the one-time checkout-return lookup:lifecycle-adjacent surfaces may initiate billing or account handoff throughshared public routes, but they must never persist, derive, or replay the@@ -1035,13 +1036,10 @@ reintroducing local array or JSON parsing rules.That same lifecycle-owned install/profile surface now also keeps trial-startCTA orchestration out of ordinary authenticated self-hosted feature gates.Agent profile paywalls may describe the entitled lifecycle capability and link-to neutral plan review, but they must not call-`frontend-modern/src/utils/trialStartAction.ts` directly or present direct-trial-start copy inside the normal Settings flow. Trial-start orchestration-through that helper remains limited to explicit first-run, hosted, activation,-recovery, or support handoff contexts that own redirect, success-notification,-and canonical denial handling instead of open-coding `startProTrial()`-branches in each lifecycle surface.+to neutral plan review, but they must not present direct trial-start copy inside+the normal Settings flow or open-code `startProTrial()` branches in each+lifecycle surface. Any paid handoff belongs to explicit plan, hosted,+activation, recovery, or support contexts governed by presentation policy.The owned backend API surfaces must preserve the exact-release installerfallback, canonical /api/auto-register behavior, and hosted org install-commanddiff --git a/docs/release-control/v6/internal/subsystems/ai-runtime.md b/docs/release-control/v6/internal/subsystems/ai-runtime.mdindex d2ccb88800..f22484733a 100644--- a/docs/release-control/v6/internal/subsystems/ai-runtime.md+++ b/docs/release-control/v6/internal/subsystems/ai-runtime.md@@ -90,10 +90,11 @@ runtime cost control, and shared AI transport surfaces.represented only as aggregate posture and omitted from detailed promptsections, while sensitive alert text is scrubbed through the sharedunified-resource redaction helper before it reaches a non-local model.- The final provider-bound chat, Patrol, investigation, tool-result, and- hosted-quickstart requests must also pass through that same resource-policy- sanitizer immediately before transport, so later agentic turns cannot- reintroduce local-only identifiers after the original context export.+ The final provider-bound chat, Patrol, investigation, tool-result, and any+ retained legacy managed-model compatibility requests must also pass through+ that same resource-policy sanitizer immediately before transport, so later+ agentic turns cannot reintroduce local-only identifiers after the original+ context export.6. Keep AI resource and incident context aligned with the canonical unified-resource timeline before falling back to patrol-local change detectors7. Keep platform assistant read/control claims aligned with`docs/release-control/v6/internal/PLATFORM_SUPPORT_MODEL.md`. New@@ -110,12 +111,10 @@ runtime cost control, and shared AI transport surfaces.`ActionPlan.Preflight` dry-run boundary through`internal/ai/tools/action_audit.go` rather than leaving dry-run availabilityas chat-only text.-9. Keep self-hosted Patrol quickstart messaging aligned with backend runtime- truth: the governed quickstart contract is Patrol-only first-run- acceleration on installs with an activated entitlement and- server-authoritative run inventory, not a trial prompt, a general hosted chat- entitlement, or a replacement for BYOK once Patrol leaves the quickstart- path.+9. Keep self-hosted Patrol messaging aligned with the v6 GA product contract:+ ordinary self-hosted installs use BYOK or local providers, and the runtime+ must not surface retired managed-model credits, trial prompts, account-backed+ AI activation, or general hosted chat entitlement in the normal app.10. Keep discovery-analysis prompt bounds and response budgets aligned across`internal/ai/service.go` and the shared service-discovery prompt builders:the runtime must reserve enough output tokens for structured discovery JSON,@@ -196,71 +195,25 @@ selection may fall back only to the provider-owned default declared in`internal/config/ai.go`. Runtime startup, connection-test, and load-configpaths may not return an empty effective model or borrow another provider'sselection just because live model discovery was unavailable.-That quickstart ownership includes the public proxy dependency under-`internal/ai/providers/quickstart.go`: the runtime must default to the owned-commercial API edge at `https://license.pulserelay.pro/v1/quickstart/patrol`-instead of depending on an ungoverned standalone hostname. Runtime overrides-may exist only as an explicit environment-controlled rollout escape hatch, and-the canonical quickstart proxy contract remains an OpenAI-compatible server-owned-surface that lives behind the public license API rather than a tenant-local or-mobile-local adapter. That server-owned boundary must also own the real upstream-vendor model selection explicitly through license-server configuration rather-than through a baked runtime fallback, so model churn does not leak into the-Pulse runtime or API contract.-Every hosted quickstart provider call must carry the `resource-policy-v1`-data-policy marker declaring client-side enforcement of aggregate-only-local-only handling and exact resource-policy redaction. The public proxy must-reject prompt relay requests that omit that marker so the Pulse-hosted route-cannot silently become an ungoverned external-model bypass.-That same Patrol quickstart boundary is now server-authoritative end to end.-`internal/ai/quickstart.go` must bootstrap before the first Patrol-only-quickstart use, resolve the strongest server-verified runtime authority in-this order, and refuse bootstrap entirely when neither exists: installation-identity from installation-scoped `activation.enc` for activated self-hosted-installs, then signed entitlement-lease identity from the effective-entitlement-backed billing state for hosted entitlement-backed runtimes,-including hosted trial leases. Tenant--local Patrol persistence must therefore reuse installation-scoped activation-state where it exists and must fall back to the shared entitlement lease-without inventing shadow activation files or anonymous client identity.-`quickstart.enc` may cache only the server-issued token snapshot and latest-server-reported inventory through the shared `internal/config/persistence.go`,-`internal/config/entitlement_billing_state.go`, and-`internal/config/quickstart_state.go` helpers; it must not persist anonymous-bootstrap identity or revive local counter truth. `internal/ai/providers/quickstart.go`-must authenticate Patrol proxy calls with `Authorization: Bearer <quickstart_token>`, sync-`credits_remaining` / `credits_total` back into that cache on every server-response, accept both `quickstart_token_expires_at` and the older-`token_expires_at` response field while mixed quickstart deployments exist,-and invalidate the cached token on auth rejection. Explicit BYOK provider-credentials still outrank Patrol quickstart whenever both are present.-That same Patrol quickstart contract is execution-scoped rather than-provider-turn-scoped: the runtime must stamp one stable execution identifier-per higher-level Patrol run and propagate it through every hosted quickstart-provider call, including retries, the evaluation pass, alert auto-resolution-quick-analysis calls, and any other ancillary Patrol-side AI work that still-belongs to the same run, so one Patrol run consumes at most one quickstart-credit even when the underlying agentic loop makes multiple model turns or-post-analysis Patrol helpers need additional model calls.-That same server-authoritative quickstart contract also governs partial and-released error paths. `internal/ai/providers/quickstart.go` and-`internal/ai/quickstart.go` must treat server-reported credits and expiry as-optional fields on non-success responses, sync cached inventory only when the-server actually returns authoritative inventory, and preserve the last known-server state otherwise. The license-server quickstart boundary must release-failed reservations with the post-release workspace snapshot attached whenever-that inventory is known, rather than forcing the runtime to infer exhaustion-from absent fields or resetting credits to zero after transient upstream-errors.-Public-facing copy that reflects those runtime fields must therefore speak in-Patrol quickstart runs on activated Pulse Account installs or effective hosted-entitlements and Patrol-only no-key activation, not in generic AI credits,-anonymous Community bootstrap, trial CTAs, or a promise of full hosted chat.+Retired quickstart ownership is now a compatibility boundary, not a normal+self-hosted GA runtime path. `internal/ai/providers/quickstart.go` and+`internal/ai/quickstart.go` may remain parseable for mixed-version runtimes,+hosted compatibility, or support migration while that backend code exists, but+ordinary self-hosted Assistant, Patrol, and AI Settings flows must prefer the+operator's configured provider or local model and must not bootstrap managed+credits from the frontend. Any retained compatibility traffic must still use the+owned commercial API edge, authenticate with server-verified commercial+authority, avoid anonymous local identity, and carry the `resource-policy-v1`+data-policy marker so legacy prompt relay cannot become an ungoverned+external-model bypass.+Public-facing copy that reflects those legacy runtime fields must normalize+back to provider or local-model setup. It must not promise managed credits,+account activation support, trial CTAs, anonymous Community bootstrap, or full+hosted chat access in ordinary self-hosted v6 GA flows.That same runtime-backed contract now governs AI settings enablement too:-quickstart-ready installs may enable Patrol directly without opening provider-setup, while activation-required or offline quickstart states must surface one-canonical blocked reason and fall back to activation-or-BYOK guidance instead-of inferring readiness from provider model catalogs or local credit counters.+unconfigured installs open provider setup, while stale managed-credit or+activation-required states are treated as compatibility metadata rather than a+direct-enable path.That same AI/runtime boundary now also owns the server-side assistantavailability fact used by the app shell. `internal/api/ai_handlers.go`,`internal/api/security_status_capabilities.go`, and@@ -957,13 +910,13 @@ summary payload directly through the shared AI client and store, so thevisible summary card stays aligned with the same recent-change slice that theruntime and API contracts expose.The Patrol runtime now also exports a canonical `runtime_state` alongside-`blocked_reason` in the Patrol status payload, so blocked quickstart-credit or-provider-availability conditions remain part of the governed runtime contract-instead of being inferred later from the last successful patrol summary.+`blocked_reason` in the Patrol status payload, so provider-availability and any+legacy managed-credit block conditions remain part of the governed runtime+contract instead of being inferred later from the last successful patrol+summary.That runtime-state contract must be derived from live Patrol runtime inputs,-not only from the last failed run attempt: exhausted quickstart credits are a-blocked Patrol runtime immediately, and the backend must also clear any stale-quickstart block once credits or BYOK configuration return.+not only from the last failed run attempt, and the backend must clear any stale+managed-credit block once a provider or local model configuration returns.The same runtime contract now also governs when the system-wide Patrol healthsummary is allowed to read as healthy. `internal/ai/intelligence.go` must notderive `Health A` or `100/100` from "no active findings" alone when recentdiff --git a/docs/release-control/v6/internal/subsystems/api-contracts.md b/docs/release-control/v6/internal/subsystems/api-contracts.mdindex 43f324f7b4..24057375d8 100644--- a/docs/release-control/v6/internal/subsystems/api-contracts.md+++ b/docs/release-control/v6/internal/subsystems/api-contracts.md@@ -272,7 +272,7 @@ the canonical monitored-system blocked payload.12. Keep `internal/api/session_store.go` on a fail-closed auth-persistence boundary: persisted OIDC refresh tokens may only round-trip through encrypted-at-rest session payloads, and any missing-crypto or invalid-ciphertext path must drop the token instead of preserving plaintext-at-rest session state.13. Keep tenant AI handler wiring on canonical provider ownership: `internal/api/ai_handlers.go` may wire tenant `ReadState` and tenant-scoped unified-resource providers into AI services, but it must not revive tenant snapshot-provider bridges once Patrol can initialize and verify from those canonical providers directly.14. Keep Patrol status transport semantics explicit in that same AI handler layer: the Patrol status endpoint must carry machine-readable runtime availability such as blocked, running, disabled, active, or unavailable rather than asking frontend consumers to infer operator state from stale summaries or run history.-15. Keep Patrol quickstart transport semantics explicit as well: zero remaining quickstart credits are inventory data, not a standalone runtime-state override, so frontend consumers may only present the exhausted quickstart warning when the payload still reports `using_quickstart` or a runtime state that is blocked by quickstart exhaustion.+15. Keep legacy Patrol quickstart transport semantics explicit while those fields remain parseable: zero remaining quickstart credits are compatibility inventory data, not a standalone runtime-state override, and ordinary self-hosted frontend consumers must normalize retired hosted-model copy back to provider/local-model setup rather than presenting credit badges or acquisition prompts.16. Keep Patrol intelligence summary transport semantics single-voiced: the canonical overall-health payload and Patrol run-history payload together must support one primary assessment plus one explicit verification explanation, and frontend consumers must not need to derive a second compact assessment or verification verdict row from the same payloads beneath the primary summary card.17. Keep Pulse Mobile relay credential minting and permission ownership on backend ownership: `internal/api/router_routes_auth_security.go`, `internal/api/security_tokens.go`, `internal/api/auth.go`, `internal/api/relay_mobile_capability.go`, `internal/api/router_routes_ai_relay.go`, and `frontend-modern/src/api/security.ts` may expose the canonical mobile runtime token creator and governed route gates, but browser callers must only consume that route and must not define the mobile runtime scope, compatibility gate list, route inventory, or token-purpose metadata locally.18. Keep hosted tenant browser-session precedence on the shared auth boundary: `internal/api/auth.go`, `internal/api/contract_test.go`, and hosted tenant callers must treat a valid `pulse_session` as authoritative before any API-only token fallback or no-local-auth anonymous fallback, so cloud handoff can continue into protected hosted routes without flattening the operator back to `anonymous` or forcing a browser session through bearer-token-only mode after the tenant has minted API tokens.@@ -525,34 +525,31 @@ the canonical monitored-system blocked payload.6. Keep Patrol status payloads explicit enough that the frontend can present blocked runtime state without treating a previously healthy summary snapshot as current runtime truth, and keep Patrol recency semantics explicit in transport by reserving `last_patrol_at` for completed full patrols while exposing any Patrol activity separately through `last_activity_at`and the scoped-trigger status payload on that same Patrol status surface, so queued scoped work, busy-mode state, and per-source enablement (`alert` versus `anomaly`) stay transport-backed instead of being inferred by page-local heuristicsand the split Patrol trigger settings contract, so `patrol_alert_triggers_enabled` and `patrol_anomaly_triggers_enabled` are the canonical AI settings fields while legacy `patrol_event_triggers_enabled` remains a compatibility aggregate rather than the primary control surface- and the server-authoritative quickstart contract, so `/api/settings/ai` and- `/api/patrol/status` keep `quickstart_credits_remaining`,- `quickstart_credits_total`, and `using_quickstart` as canonical transport- fields sourced from the latest quickstart bootstrap or proxy response rather- than from local grant counters, and shared handlers must not invent- client-authored commercial identity or synthetic credits when the quickstart- server is unavailable- and the activation-gated availability rule, so missing installation- activation or entitlement identity must surface as the canonical activation-required- quickstart block reason for Patrol and AI settings enablement rather than- silently attempting anonymous bootstrap- and the Pulse-owned hosted model alias rule, so persisted legacy hosted- quickstart model IDs such as `quickstart:minimax-2.5m` are rewritten to- `quickstart:pulse-hosted` before `/api/settings/ai` responds, instead of- leaking stale vendor identifiers back into the governed payload contract- for model, chat, patrol, discovery, or auto-fix fields- and the AI settings blocked-reason contract, so `/api/settings/ai` must- expose `quickstart_blocked_reason` when quickstart cannot currently enable- Patrol and must clear that field when a provider-backed path is active or- quickstart is genuinely usable- and the public interpretation rule, so those fields describe Patrol-only- quickstart inventory and active runtime source on activated Pulse Account- installs or effective hosted entitlements rather than a generic hosted AI- quota, anonymous Community entitlement, trial CTA, or full-chat entitlement- and the Patrol execution billing rule, so shared runtime bridges such as- `internal/api/chat_service_adapter.go` must preserve the stable Patrol- execution identifier that the hosted quickstart contract uses to charge- once per higher-level Patrol run rather than once per internal provider+ and the legacy quickstart compatibility contract, so `/api/settings/ai` and+ `/api/patrol/status` may continue to carry `quickstart_credits_remaining`,+ `quickstart_credits_total`, and `using_quickstart` while mixed-version+ runtimes still emit them, but those fields are no longer a normal+ self-hosted GA acquisition surface and shared handlers must not invent+ client-authored commercial identity or synthetic credits when the legacy+ server path is unavailable+ and the provider-first availability rule, so missing managed-model activation+ identity must not block ordinary BYOK/local setup and must not silently+ attempt anonymous bootstrap+ and the Pulse-owned hosted model alias compatibility rule, so persisted+ legacy hosted quickstart model IDs such as `quickstart:minimax-2.5m` are+ rewritten to `quickstart:pulse-hosted` before `/api/settings/ai` responds,+ instead of leaking stale vendor identifiers back into governed payloads+ and the AI settings blocked-reason contract, so stale+ `quickstart_blocked_reason` values are cleared or interpreted as+ compatibility metadata when a provider-backed path is active or the+ self-hosted app is routing the operator to provider/local-model setup+ and the public interpretation rule, so those fields must not become generic+ hosted AI quota, anonymous Community entitlement, trial CTA, account-backed+ activation support, or full-chat entitlement in normal self-hosted v6 GA UI+ and the legacy Patrol execution billing rule, so retained compatibility+ bridges that still call the hosted quickstart contract preserve the stable+ Patrol execution identifier used to charge once per higher-level Patrol run+ rather than once per internal providerturn7. Keep Patrol summary payload consumers aligned on one assessment hierarchy: transport-driven Patrol summary surfaces may show supporting counts and outcomes, but the canonical assessment and verification states must remain singular and not be repeated as a second compact verdict strip8. Keep Patrol verification and activity facts unified on one transport-backed secondary status area: when frontend consumers combine Patrol status payloads (`runtime_state`, `last_patrol_at`, `last_activity_at`, `trigger_status`) with run-history transport, the latest run result, activity mix, scoped-trigger state, and circuit-breaker context must read as one supporting explanation beneath the primary assessment instead of being re-expanded into a separate full-width status strip plus duplicate summary layers@@ -677,13 +674,12 @@ the canonical monitored-system blocked payload.`+git...` builds, and other unpublished prerelease identifiers must failclosed on that API boundary instead of generating fake release URLs froma local runtime version string.-28. Keep local trial-start transport explicit on the shared commercial API- boundary: `/api/license/trial/start` must preserve the hosted-signup- redirect contract as `409 trial_signup_required` during the allowed retry- burst, then return `429 trial_rate_limited` with the actual remaining- backoff in both `Retry-After` and- `details.retry_after_seconds` once the burst is exceeded. Hosted- self-serve verification failures may render owned HTML, but they must+28. Keep local trial-start transport retired from normal self-hosted v6 GA+ frontend paths. `/api/license/trial/start` may remain available only as a+ legacy/support or externally initiated compatibility endpoint while existing+ purchase and activation flows migrate; browser API clients and ordinary+ self-hosted feature gates must not expose it as an in-app acquisition path.+ Hosted self-serve verification failures may render owned HTML, but they mustpreserve originating Pulse context instead of collapsing into genericcontrol-plane failures.29. Keep `/api/security/dev/reset-first-run` transport-backed and genuinely@@ -1259,18 +1255,16 @@ The same facet bundle contract now also returns grouped`recentChangeSourceAdapters` counts by canonical source adapter, so theshared drawer and summary chips can distinguish Docker, Proxmox, TrueNAS, andops-helper provenance without inventing frontend-local integration heuristics.-Client consumers of the node setup transport now also share the canonical-trial-start action helper in `frontend-modern/src/utils/trialStartAction.ts`-for the NodeModal Pro upgrade path. The NodesAPI client remains the source of-truth for setup/install requests, while hosted trial redirects and denial copy-must flow through the shared trial-start owner rather than a second client-side-status-code map inside node setup state.-That same frontend/API split now also requires node setup state to consume-shared commercial selectors for non-transport trial gating. `useNodeModalState.ts`-may decide whether to show a trial CTA through-`frontend-modern/src/stores/licenseCommercial.ts`, but it must not repurpose-raw commercial-posture fields as if they were part of the NodesAPI transport-contract.+Client consumers of the node setup transport must keep setup/install requests+on the NodesAPI client and must not reintroduce local trial-start helpers or+client-side trial status-code maps inside node setup state. Any commercial+handoff from setup must use explicit plan, activation, recovery, support, or+hosted routes governed by presentation policy.+That same frontend/API split now also requires node setup state to keep+commercial posture out of the NodesAPI transport contract. `useNodeModalState.ts`+may route explicit plan or support handoff through governed commercial helpers+where presentation policy allows, but it must not show trial CTAs or repurpose+raw commercial-posture fields as if they were part of setup transport.Canonical timeline entries now also preserve correlation context in`relatedResources`, so the history surface can explain which neighboringresources moved with restart, anomaly, config, state transition, and@@ -2641,21 +2635,21 @@ That same frontend run-history path must also preserve and expose`triage_flags` and `triage_skipped_llm` from canonical patrol run records sodeterministic triage-only runs do not collapse into generic "no analysis"history entries.-Patrol status payloads now also treat quickstart credit state as canonical API-contract data: the Patrol status endpoint must surface+Patrol status payloads may still carry quickstart credit state as legacy API+compatibility data while mixed-version runtimes exist:`quickstart_credits_remaining`, `quickstart_credits_total`, and-`using_quickstart` directly from backend runtime state so the frontend can-render Patrol quickstart availability without local heuristics or shadow-derived state.-That quickstart transport contract must also preserve the distinction between-credit inventory and live runtime path: zero remaining credits alone must not-force a blocked or exhausted operator presentation while Patrol is active on a-configured non-quickstart provider path.-Those same transport fields now also define the only public quickstart promise:-when pricing, README, or Patrol header copy references them, it must describe-Patrol-only quickstart runs and no-key Patrol activation on activated Pulse-Account installs or effective hosted entitlements rather than generic AI-credits, anonymous bootstrap, trial CTAs, or hosted-chat access.+`using_quickstart` must remain backend-owned when present, but the frontend must+not turn them into normal self-hosted GA credit badges, trial prompts, or+hosted-model acquisition copy.+That compatibility contract must also preserve the distinction between credit+inventory and live runtime path: zero remaining credits alone must not force a+blocked or exhausted operator presentation while Patrol is active on a+configured provider or local-model path.+Those same transport fields no longer define a public self-hosted promise:+pricing, README, Patrol header copy, and AI settings copy must present+provider/local-model setup and paid operational extras instead of managed+credits, anonymous bootstrap, trial CTAs, account-backed AI activation, or+hosted-chat access.Hosted billing-state payloads now also carry the canonical quickstart grantmetadata used by hosted bootstrap and refresh flows. Billing reads and contractproofs must preserve `quickstart_credits_granted`,@@ -2667,11 +2661,11 @@ That same Patrol status contract now also carries a canonical `runtime_state`field, so the frontend can distinguish blocked, running, disabled, active,and unavailable Patrol runtime states without deriving operator status fromstale health summaries, last-run history, or local blocked-reason heuristics.-The backend status payload must derive that blocked runtime state directly-from current quickstart-credit availability, and it must clear stale-quickstart-exhausted block metadata once credits or BYOK return, so-the Patrol status endpoint cannot leave Patrol looking healthy or paused based on-an out-of-date last-run artifact.+The backend status payload must derive that blocked runtime state from current+provider and runtime availability, and it must clear stale managed-credit block+metadata once provider or local-model configuration returns, so the Patrol+status endpoint cannot leave Patrol looking healthy or paused based on an+out-of-date last-run artifact.Patrol mutate endpoints that depend on the background service must also failclosed with `503 Service Unavailable` when AI service initialization is absentrather than dereferencing a nil service and crashing before a contract response@@ -2965,14 +2959,12 @@ both sides instead of relying only on broad settings-surface coverage on thesecurity side: token settings changes must continue to carry the direct`api-token-management-surface` API-contract proof together with thesecurity-side surface proof.-That same shared commercial API boundary now also owns the local trial-start-transport contract. `/api/license/trial/start` may allow a short human-scale-burst of retries while the hosted redirect handoff remains canonical, but once-that burst is exceeded it must transition from `409 trial_signup_required` to-`429 trial_rate_limited` and return the actual remaining backoff in both the-`Retry-After` header and the JSON `details.retry_after_seconds` payload instead-of a fixed window guess or a text-only error. `internal/api/contract_test.go`-must pin both the hosted-signup redirect response and the rate-limited response+That same shared commercial API boundary now treats local trial-start transport+as legacy/support compatibility, not a normal self-hosted v6 GA browser path.+If `/api/license/trial/start` remains implemented for externally initiated+activation or support flows, `internal/api/contract_test.go` may pin its+compatibility behavior, but `frontend-modern/src/api/license.ts` and ordinary+feature gates must not expose a start-trial client method or in-app CTAin the same slice as any handler change.That same shared commercial API boundary also owns hosted self-serve failuretransport semantics. Hosted trial request and verification failures may renderdiff --git a/docs/release-control/v6/internal/subsystems/cloud-paid.md b/docs/release-control/v6/internal/subsystems/cloud-paid.mdindex f18ae3f84e..9ecaa22efb 100644--- a/docs/release-control/v6/internal/subsystems/cloud-paid.md+++ b/docs/release-control/v6/internal/subsystems/cloud-paid.md@@ -407,10 +407,10 @@ Community limit enforcement.2. Update runtime and frontend tests together when plan/limit rules move3. Add or tighten drift tests when a pricing/runtime mismatch is fixed4. Keep self-hosted pricing and public docs on runtime-backed commercial truth:- Patrol quickstart may be presented only as Patrol-only first-run activation- support backed by the license server and an activated entitlement, never as- a default self-hosted trial CTA, while Relay and Pro remain the canonical- commercial story.+ self-hosted Patrol remains provider/local-model based in Community, paid+ discovery stays out of ordinary monitoring flows, and retired hosted-model+ credits or trial acquisition must not be presented as a default self-hosted+ benefit. Relay and Pro remain the canonical self-hosted commercial story.5. Treat grandfathered `lifetime` licenses as uncapped commercial entitlements:they keep the Pro feature set, but they must not inherit monitored-system orguest caps from recurring Pro contracts anywhere in runtime, issuance, or@@ -764,42 +764,25 @@ backward-compatible decode alias for older local stubs and historical testfixtures. Future exchange-path changes must not reintroduce a split contractwhere the shared Pulse runtime and the real `pulse-pro/license-server` disagreeon the activation payload shape.-That same license-server transport boundary now owns Patrol quickstart-bootstrap. `pkg/licensing/license_server_client.go` and-`pkg/licensing/quickstart_bootstrap.go` must treat-`POST /v1/quickstart/bootstrap` as the canonical exchange for a server-issued-quickstart token plus the authoritative quickstart credit snapshot. The Pulse-runtime must authenticate that bootstrap with one of the server-verified-commercial authorities owned by the shared commercial boundary: an-installation token from installation-scoped activation state for activated-self-hosted installs, or a signed hosted entitlement lease for hosted-entitlement-backed runtimes, including hosted trial leases. There is no-anonymous `client_installation_id` fallback in the v6 runtime contract, and-hosted quickstart must not fake self-hosted `activation.enc` just to satisfy-the bootstrap path. Local runtime cache files may memoize the returned token-and counts but may not treat those cached counts as commercial authority. The-transport must also remain mixed-version compatible while quickstart rolls out:-Pulse may send optional binding metadata such as `instance_name` and-`use_case=patrol`, and the server must not reject that additive metadata or-rely on one expiry field spelling only when returning the quickstart token-snapshot.-`POST /v1/quickstart/patrol` also owns the Patrol-run billing boundary: the-runtime may send an execution identifier for one higher-level Patrol run, and-the license server must treat repeated proxy calls that share that execution-identifier as one commercial quickstart run rather than charging once per-agentic provider turn.-That same public proxy boundary must accept hosted quickstart prompts only-when the runtime attaches the `resource-policy-v1` data-policy marker proving-client-side aggregate-only local-only handling and exact resource-policy-redaction. Requests without that marker are invalid, because the Pulse-hosted-route is commercial activation support, not an ungoverned external prompt-relay.-That quickstart allowance is therefore activation support, not the main-commercial pitch: self-hosted pricing and docs may promise Patrol-only-quickstart runs with no API key for activated Pulse Account installs or-effective hosted entitlements, but they must not market that bootstrap as-anonymous Community entitlement, a trial CTA, or a general hosted chat plan-while Relay and Pro carry the paid story.+That same license-server transport boundary now treats Patrol quickstart+bootstrap as legacy/support compatibility rather than a normal self-hosted v6+GA journey. `pkg/licensing/license_server_client.go` and+`pkg/licensing/quickstart_bootstrap.go` may continue to understand+`POST /v1/quickstart/bootstrap` payloads for mixed-version runtimes and support+cases, but ordinary self-hosted frontend flows must not initiate that path.+If the compatibility path is retained, the Pulse runtime must authenticate it+with one of the server-verified commercial authorities owned by the shared+commercial boundary and must not invent anonymous local identity or fake+self-hosted `activation.enc` state. Local runtime cache files may memoize+returned tokens and counts but may not treat those cached counts as commercial+authority or customer-facing entitlement.+That same public proxy boundary remains privacy-constrained for any legacy+traffic that still reaches it: requests must carry the `resource-policy-v1`+data-policy marker proving client-side aggregate-only local-only handling and+exact resource-policy redaction. Pricing, docs, and normal self-hosted runtime+UI must not present this compatibility path as Community entitlement, a trial+CTA, account activation support, or a general hosted chat plan while Relay and+Pro carry the paid story.The self-hosted commercial counted unit is now also locked to monitoredsystems rather than agent installs. `max_monitored_systems` is the liveruntime and UI contract, while legacy `max_agents` / `max_nodes` aliases are@@ -907,13 +890,11 @@ preview label with a second top-of-shell release-candidate warning banner orrelease-feedback CTA in `frontend-modern/src/AppLayout.tsx`; prerelease cloudposture stays a subtle shell label, not a public-RC callout inside the paidruntime chrome.-The shared trial-start runtime is part of that same cloud-paid boundary.-Commercial relay, onboarding, setup, Pro settings, and shared paywall-surfaces may customize success copy, but they must route hosted handoff,-success-notification, and canonical denial handling through-`frontend-modern/src/utils/trialStartAction.ts` instead of carrying local-`startProTrial()` redirect/error branches that drift from backend commercial-truth.+The self-hosted trial-start frontend runtime is retired for v6 GA. Commercial+relay, onboarding, setup, Pro settings, and shared paywall surfaces may still+offer explicit plan, activation, recovery, support, or hosted handoff paths, but+they must not revive local `startProTrial()` branches, shared trial-start+helpers, or global trial acquisition banners in the normal self-hosted app.The same commercial handoff rule also covers the legacy `/pricing` route in`frontend-modern/src/pages/PricingHandoff.tsx` and`frontend-modern/src/utils/pricingHandoff.ts`: compatibility handoff may keep@@ -1695,12 +1676,11 @@ prior email usage through `201` versus `429` drift.Hosted billing-state normalization now follows the same rule: a missing`plan_version` must remain missing instead of being synthesized from`subscription_state`, while explicit trial defaults remain explicit.-Hosted trial bootstrap and hosted entitlement refresh now also own quickstart-credit seeding as part of that same persisted billing boundary. New hosted-trial workspaces and later lease-refresh rewrites must preserve-`quickstart_credits_granted` plus its grant timestamp instead of resetting the-workspace to zero hosted quickstart inventory after signup or entitlement-renewal.+Hosted trial bootstrap and hosted entitlement refresh may still preserve legacy+quickstart inventory fields as persisted billing compatibility while those+fields exist. New user-facing hosted or self-hosted acquisition work should not+depend on that inventory as a product promise, and lease-refresh rewrites must+avoid turning legacy fields into a renewed customer-facing hosted-model offer.Hosted AI runtime defaults are part of the same boundary as well: when a cloudtenant falls back to provider defaults, the persisted model identifier mustremain canonical `provider:model` data rather than a bare provider-local alias,@@ -2076,13 +2056,14 @@ commercial posture. Outside hosted mode, ordinary self-hosted installs mustfail closed on in-app upgrade prompts: Relay/Pro plan comparison, Pro trialCTAs, paid-only settings navigation, and history/feature upsells may renderonly for explicit handoff/direct routes, activation or recovery state, hosted-mode, or an already entitled install. Trial checkout plumbing may remain for-support-only or externally initiated flows, but it is not a normal GA-self-hosted app journey.+mode, or an already entitled install. Trial checkout plumbing may remain only+as legacy/support or externally initiated compatibility, but it is not a normal+GA self-hosted app journey.Shared self-hosted plan presentation helpers must carry that same policy:-Community copy may mention BYOK Patrol and hosted quickstart only as an-activated-entitlement benefit, not as a default self-hosted trial CTA or a-reason to put a paid prompt in front of ordinary users.+Community copy may mention provider/local-model Patrol, but must not present+hosted-model credits, account-backed AI access, or trial acquisition as a+default self-hosted benefit or a reason to put a paid prompt in front of+ordinary users.That public-demo commercial boundary also owns monitored-system previewunavailability wording. Browser presentation may keep the unavailable reasonnullable until the formatting edge, but it must normalize the message throughdiff --git a/docs/release-control/v6/internal/subsystems/frontend-primitives.md b/docs/release-control/v6/internal/subsystems/frontend-primitives.mdindex 0ee0811529..9c71897778 100644--- a/docs/release-control/v6/internal/subsystems/frontend-primitives.md+++ b/docs/release-control/v6/internal/subsystems/frontend-primitives.md@@ -662,15 +662,12 @@ work extends shared components instead of creating new local variants.route strings or provider-local link builders inside feature panels.16. Keep shared summary-card emphasis coherent. When shared summary primitives enter an `inactive` state, `SummaryMetricCard`, `InteractiveSparkline`, and `DensityMap` must all demote background context together so storage, infrastructure, and workloads read as one interaction model instead of mixing page-local opacity, sticky-shell, or highlight rules.17. Keep density-map summaries overview-first. When a shared summary density map receives row focus or chart-hover emphasis, `frontend-modern/src/components/shared/DensityMap.tsx`, `frontend-modern/src/components/shared/useDensityMapState.ts`, and `frontend-modern/src/components/shared/densityMapModel.ts` must preserve the multi-entity overview rows and keep focused-entity detail in the hover tooltip instead of swapping the card into a single-series chart, dimming the rest of the map into unusable background noise, duplicating cursor-value tooltip copy, or adding persistent card chrome that steals heatmap space. The card body must stay overview-first; the tooltip may carry the active entity identity, current value, and peak, shared tooltip shells must follow semantic surface tokens instead of forcing a dark palette in light mode, the tooltip header must let long entity names consume the available width before truncating rather than clipping against an arbitrary fixed label cap, numeric metric readouts such as `16.9 MB/s` or `37.4 MB/s` must stay single-line instead of wrapping the unit onto a second row, and density-map detail that cannot fit cleanly inside the canonical tooltip shell must be omitted rather than introducing tooltip-specific chrome or a secondary chart inside the hover surface.-18. Keep shared commercial and Patrol quickstart presenters on runtime-backed- wording. Reusable shells and helper-driven badges must describe quickstart- as Patrol runs or Patrol-only activation support when that is the governed- backend truth, and must not drift back to generic hosted-chat or generic- AI-credit claims.- When a shared settings dialog describes hosted Quickstart transport, it- must match the governed privacy boundary: hosted Quickstart routes- policy-redacted prompts through Pulse infrastructure, while BYOK providers- go direct to the operator's chosen provider.+18. Keep retired self-hosted hosted-model and trial acquisition surfaces out of+ normal v6 GA runtime. Shared shells and helper-driven badges may continue to+ parse legacy payload fields, but ordinary self-hosted Assistant, Patrol, and+ settings flows must present provider setup as BYOK/local/self-managed and+ must not surface hosted-model credits, in-app trial starts, or generic+ managed-model claims.19. Keep sparkline scrubbing source-local and sibling-sync timestamp-based. The chart a user is actively scrubbing in `frontend-modern/src/components/shared/InteractiveSparkline.tsx` and `frontend-modern/src/components/shared/useInteractiveSparklineState.ts` must keep its dashed hover cursor on the real local mouse `x`, while sibling cards may map the shared hover timestamp onto their own timelines. Shared cursor sync must not snap the source chart back onto the nearest sample timestamp, the rendered SVG/canvas hover cursor must bind to the actual numeric cursor coordinate rather than a boolean guard state, the time cursor must span the chart viewport instead of collapsing to the series height, and the hover tooltip must track the pointer instead of anchoring to the chart top edge while following the active theme rather than a hardcoded dark shell.20. Keep shared contextual focus canonical after adoption. Once a summary or table surface enters route-backed contextual focus, future additions must extend `frontend-modern/src/components/shared/contextualFocus.ts` and its guardrail tests rather than forking another helper for workload IDs, resource IDs, or scroll-preserving same-route selection.21. Keep shared infrastructure/resource selectors on the canonical agent-facet@@ -875,7 +872,6 @@ commercial suppression. `frontend-modern/src/components/Settings/settingsNavCata`frontend-modern/src/stores/license.ts`,`frontend-modern/src/stores/licenseCommercial.ts`,`frontend-modern/src/useAppRuntimeState.ts`,-`frontend-modern/src/components/shared/useTrialBannerState.ts`, and`frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts`,`frontend-modern/src/components/shared/HistoryChartOverlay.tsx`,`frontend-modern/src/features/patrol/PatrolIntelligenceBanners.tsx`, and@@ -1078,25 +1074,21 @@ is REST-backed: operators should only see reconnect or disconnected shells whenthe route's own data contract is unhealthy, not because a global websocketsingleton is transiently reconnecting.Those same feature-owned header badges must also stay aligned to the owning-runtime state instead of surfacing stale auxiliary counters as primary status;-an exhausted quickstart-credit badge cannot override an otherwise active Patrol-runtime unless quickstart exhaustion is the active blocker.-When those shared helpers surface quickstart state, the wording must stay-Patrol-scoped as well: the badge copy should talk about Patrol quickstart runs-or Patrol quickstart exhaustion on activated or trial-backed installs rather-than generic AI credits, anonymous free hosted AI, or broad hosted AI-availability.-The same shared shell rule applies to activation-gated availability copy: when-Patrol is blocked because quickstart lacks a server-verified install identity,-shared feature shells must preserve the backend activation-or-BYOK guidance-instead of translating that state into an exhausted-credit badge or a generic-hosted-AI upgrade message.+runtime state instead of surfacing stale auxiliary counters as primary status.+Legacy hosted-model credit counters may remain parseable on transport payloads,+but shared Patrol headers must not render them as customer-facing badges in the+normal self-hosted GA app.+The same shared shell rule applies to retired hosted availability copy: when an+older backend payload describes hosted model activation, credit exhaustion, or+account-backed AI availability, shared feature shells must normalize the+operator-facing guidance back to provider setup or local model setup rather than+rendering the retired offer.The same primitive boundary now also owns the first AI enable control in`AISettings.tsx`: the primary toggle must remain explicitly addressable with a-stable accessible label, route through the runtime-backed quickstart-availability/blocked-reason state, and enable directly for quickstart-ready-installs instead of falling back to generic "first pressed toggle" selectors,-provider-model-load heuristics, or unconditional BYOK setup modals.+stable accessible label and route unconfigured installs into the canonical+provider setup modal instead of falling back to generic "first pressed toggle"+selectors, provider-model-load heuristics, legacy hosted-model enablement, or+in-app trial acquisition.That same route-owned presentation rule also governs Patrol findings emptystates: shared section shells under `frontend-modern/src/features/patrol/`must not render a green healthy empty state from `0 active findings` alone@@ -1154,36 +1146,15 @@ stream lifecycle, buffering, level updates, and download action. Future systemlogs work must extend that split instead of pulling `EventSource`, API calls,notification flow, or customer-facing system-log copy back into the panelrender shell.-Shared trial CTA handling is now part of that same primitive boundary for-settings and shared paywalls. Shared/settings runtime owners must derive trial-eligibility and upgrade posture from the canonical commercial-posture-contract, including `trial_eligible`, while billing identity and plan detail-stay on the billing-only entitlements contract. Shared/settings runtime owners-must route operator-facing failure copy through-`frontend-modern/src/utils/upgradePresentation.ts`. The trial-start runtime-handoff itself is now centralized in-`frontend-modern/src/utils/trialStartAction.ts`; settings/shared paywalls and-onboarding surfaces must use that owner for redirect, success-notification, and-canonical denial handling instead of open-coding local `startProTrial()`-branches or re-interpreting backend status codes.-That same shared presentation owner also holds the canonical trial-rate-limit copy. When the shared commercial store provides-`retryAfterSeconds`, `upgradePresentation.ts` must render human guidance from-that canonical backoff instead of flattening the UI to a generic "try again-later" message; user-facing CTA surfaces must therefore inherit-`Retry-After`-backed copy through the shared helper path rather than-inventing lane-local 429 wording.-That same shared primitive boundary now also owns intent-level commercial-selectors for surfaces that are allowed to show commercial state. Trial status-surfaces such as `useTrialBannerState.ts` must consume selector helpers from-`frontend-modern/src/stores/licenseCommercial.ts` such as-`isCommercialTrialActive()`, `commercialTrialDaysRemaining()`, and-`commercialOverflowDaysRemaining()` instead of branching directly on raw-`subscription_state`, `trial_eligible`, or day-count fields. Non-billing-feature gates must not consume `canOfferCommercialTrial()` or call-`runStartProTrialAction()` directly; they may show neutral "View plans" links-through `upgradePresentation.ts`, while trial starts remain owned by explicit-Plans, hosted, activation, recovery, or support handoff surfaces.+Self-hosted trial CTA removal is now part of that same primitive boundary for+settings and shared paywalls. Shared/settings runtime owners may derive neutral+plan and entitlement posture from the canonical commercial contracts, but+ordinary self-hosted feature gates must not present in-app trial starts,+trial-status banners, or trial-specific rate-limit copy. Operator-facing paid+handoff remains limited to explicit Plans, hosted, activation, recovery, or+support surfaces; feature gates may show neutral "View plans" links through+`frontend-modern/src/utils/upgradePresentation.ts` only where presentation+policy allows commercial discovery.Top-level route files are now also expected to stay thin when a feature ownsthe real product surface. `frontend-modern/src/pages/Infrastructure.tsx` nowacts only as the route boundary, while@@ -1298,14 +1269,10 @@ math, hover target selection, focused-series tooltip detail, and density-cellopacity rules. Future density-map work should extend those owners instead ofpushing canvas lifecycle, tooltip shaping, or chart math back into the sharedshell.-The shared trial banner now follows that same owner split.-`frontend-modern/src/components/shared/TrialBanner.tsx` stays the render-shell, `frontend-modern/src/components/shared/useTrialBannerState.ts` owns-entitlement load, snooze lifecycle, and upgrade-link runtime, and-`frontend-modern/src/components/shared/trialBannerModel.ts` owns day-count-normalization, tone policy, and display labels. Future trial-banner work-should extend those owners instead of pushing entitlement orchestration,-snooze state, or tone math back into the shared shell.+The shared trial banner is retired for self-hosted v6 GA. Future commercial+notification work must start from the explicit Plans, hosted, activation,+recovery, or support surfaces rather than reviving a global authenticated-shell+trial banner.The shared column picker now follows that same owner split.`frontend-modern/src/components/shared/ColumnPicker.tsx` stays the rendershell, `frontend-modern/src/components/shared/useColumnPickerState.ts` owns@@ -2592,7 +2559,6 @@ commercial suppression. `frontend-modern/src/components/Settings/settingsNavCata`frontend-modern/src/stores/sessionCapabilities.ts`,`frontend-modern/src/stores/demoMode.ts`,`frontend-modern/src/useAppRuntimeState.ts`,-`frontend-modern/src/components/shared/useTrialBannerState.ts`, and`frontend-modern/src/components/shared/useMonitoredSystemLimitWarningBannerState.ts`,`frontend-modern/src/components/shared/HistoryChartOverlay.tsx`,`frontend-modern/src/features/patrol/PatrolIntelligenceBanners.tsx`, anddiff --git a/docs/release-control/v6/internal/subsystems/organization-settings.md b/docs/release-control/v6/internal/subsystems/organization-settings.mdindex ff3b37d743..6e866d44aa 100644--- a/docs/release-control/v6/internal/subsystems/organization-settings.md+++ b/docs/release-control/v6/internal/subsystems/organization-settings.md@@ -219,16 +219,11 @@ That RBAC gate now also depends on the shared commercial navigation contract:the shared license boundary, but it must render that destination through the`frontend-primitives` typed upgrade link owner instead of assumingorganization-settings paywalls always leave the app in a new tab.-That shared RBAC free-trial runtime must also preserve backend denial reasons-through the canonical upgrade presentation helper instead of collapsing every-trial-start conflict into a generic already-used message. Organization settings-paywalls should only map the explicit canonical trial helper outputs, not-re-interpret status codes locally.-The RBAC feature-gate state now also depends on the shared-`frontend-modern/src/utils/trialStartAction.ts` owner for hosted handoff and-success/error orchestration. Organization settings paywalls must not keep a-lane-local `startProTrial()` branch once that shared helper covers the same-runtime contract.+RBAC paid handoff must stay neutral in ordinary self-hosted settings flows.+Organization settings paywalls may route to explicit plan, activation, recovery,+support, or hosted handoff surfaces where presentation policy allows, but they+must not reintroduce in-app trial-start helpers, trial-specific denial copy, or+lane-local `startProTrial()` branches.That same RBAC paywall surface now also depends on the runtime-versus-commercial license split: RBAC enablement must stay on the runtime capabilitystore, while commercial routing stays on the canonical upgrade destinationdiff --git a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md b/docs/release-control/v6/internal/subsystems/patrol-intelligence.mdindex 7547829a86..4d21161f2c 100644--- a/docs/release-control/v6/internal/subsystems/patrol-intelligence.md+++ b/docs/release-control/v6/internal/subsystems/patrol-intelligence.md@@ -38,15 +38,14 @@ Patrol-specific presentation helpers.15. `frontend-modern/src/utils/aiFindingPresentation.ts`16. `frontend-modern/src/utils/approvalRiskPresentation.ts`17. `frontend-modern/src/utils/aiPatrolSchedulePresentation.ts`-18. `frontend-modern/src/utils/aiQuickstartPresentation.ts`-19. `frontend-modern/src/utils/findingAlertIdentity.ts`-20. `frontend-modern/src/utils/remediationPresentation.ts`-21. `frontend-modern/src/utils/patrolEmptyStatePresentation.ts`-22. `frontend-modern/src/utils/patrolFormat.ts`-23. `frontend-modern/src/utils/patrolRunPresentation.ts`-24. `frontend-modern/src/utils/patrolSummaryPresentation.ts`-25. `frontend-modern/src/utils/patrolRuntimePresentation.ts`-26. `frontend-modern/src/utils/textPresentation.ts`+18. `frontend-modern/src/utils/findingAlertIdentity.ts`+19. `frontend-modern/src/utils/remediationPresentation.ts`+20. `frontend-modern/src/utils/patrolEmptyStatePresentation.ts`+21. `frontend-modern/src/utils/patrolFormat.ts`+22. `frontend-modern/src/utils/patrolRunPresentation.ts`+23. `frontend-modern/src/utils/patrolSummaryPresentation.ts`+24. `frontend-modern/src/utils/patrolRuntimePresentation.ts`+25. `frontend-modern/src/utils/textPresentation.ts`## Shared Boundaries@@ -58,8 +57,8 @@ Patrol-specific presentation helpers.2. Add or change Patrol findings, approvals, investigation, or run-history presentation through `frontend-modern/src/components/AI/FindingsPanel.tsx` and `frontend-modern/src/components/patrol/`3. Keep remediation execution badge copy and severity styling aligned through `frontend-modern/src/components/patrol/RemediationStatus.tsx` and `frontend-modern/src/utils/remediationPresentation.ts`4. Add or change Patrol header, summary, or status runtime-state presentation through `frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx`, `frontend-modern/src/features/patrol/PatrolIntelligenceSummary.tsx`, `frontend-modern/src/components/patrol/PatrolStatusBar.tsx`, and `frontend-modern/src/utils/patrolRuntimePresentation.ts`-5. Add or change Patrol header quickstart-credit or schedule presentation through `frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx`, `frontend-modern/src/utils/aiQuickstartPresentation.ts`, and `frontend-modern/src/utils/aiPatrolSchedulePresentation.ts`- Patrol must not show the exhausted quickstart-credit warning while runtime state is active on a non-quickstart provider path; that warning belongs only to active quickstart usage or a blocked quickstart-exhausted runtime.+5. Add or change Patrol header schedule and runtime presentation through `frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx`, `frontend-modern/src/utils/aiPatrolSchedulePresentation.ts`, and `frontend-modern/src/utils/patrolRuntimePresentation.ts`.+ Patrol must not surface retired hosted-model credit badges or trial-like activation prompts in the normal self-hosted GA app, even when legacy transport fields are still present.6. Keep Patrol and chat identifier-label presentation aligned through the shared `frontend-modern/src/utils/textPresentation.ts`7. Keep Patrol and chat stream-matching / mention dedupe aligned through the shared `frontend-modern/src/utils/chatIdentifiers.ts`8. Keep Patrol transport and payload changes aligned through the governed AI runtime and API contract transport surfaces@@ -75,11 +74,11 @@ Patrol-specific presentation helpers.1. Update Patrol page, state, presentation helpers, and proof files together when Patrol UX semantics change2. Keep Patrol-specific copy and badge logic inside the governed Patrol presentation helpers instead of page-local branches3. Update this contract whenever a new Patrol-specific page, store, helper, or presentation component becomes canonical runtime surface area-4. Keep Patrol header quickstart copy Patrol-scoped and runtime-backed: the- Patrol header may promise only the server-authoritative quickstart- inventory, phrase availability as Patrol runs with no API key on activated- Pulse Account installs or effective hosted entitlements, and avoid implying- broader hosted chat, generic AI credits, or anonymous Community entitlement.+4. Keep retired hosted-model and trial-like Patrol acquisition copy out of the+ normal self-hosted GA app. Patrol may parse legacy transport fields, but+ header badges, runtime banners, empty states, and settings handoffs must+ present provider setup as BYOK/local/self-managed rather than promising+ managed credits or account-backed AI access.5. Keep customer-facing Patrol naming product-first: page titles, route chrome,summary copy, actions, and empty states should lead with `Patrol` or`Pulse Patrol` rather than generic `AI` branding. Reserve `AI` terminology@@ -133,10 +132,10 @@ That same Patrol hook boundary now consumes shared AI settings/model truththrough `frontend-modern/src/stores/aiRuntimeState.ts` instead of mounting itsown `/api/settings/ai` or `/api/ai/models` reads. Patrol-specific state stillowns local toggle optimism, run-status orchestration, and Patrol-only copy,-including quickstart exhaustion and runtime-availability messaging that stays-Patrol-first in operator-facing shells and uses provider/API-key wording only-for the actual configuration boundary, but the underlying AI runtime catalog-must stay shared with chat and AI settings.+including runtime-availability messaging that stays Patrol-first in+operator-facing shells and uses provider/API-key wording only for the actual+configuration boundary, but the underlying AI runtime catalog must stay shared+with chat and AI settings.The Patrol page now also treats Patrol runtime availability as a first-classrender contract: the header chip, primary summary card, and status bar mustall route through the shared `frontend-modern/src/utils/patrolRuntimePresentation.ts`@@ -482,25 +481,15 @@ with execution errors as an error result even when the stored status text isstill `healthy`, so run history and header activity surfaces do not present afalse green outcome for an incomplete Patrol execution.hook-local fallback logic.-The Patrol header now also has explicit helper ownership for its quickstart and-schedule presentation. `frontend-modern/src/utils/aiQuickstartPresentation.ts`-and `frontend-modern/src/utils/aiPatrolSchedulePresentation.ts` are the-canonical owners for quickstart-credit messaging and Patrol interval option-labeling used by `frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx`;-future Patrol header work should extend those helpers instead of rebuilding-credit badges or schedule labels inline in the header shell. That same header-surface must now gate exhausted-credit messaging on actual runtime usage:-Patrol may only show the quickstart exhausted warning when `using_quickstart`-is true or when the Patrol runtime is explicitly blocked by quickstart-exhaustion, not merely because the stored credit counter reached zero while a-configured provider path keeps Patrol active.-That same header copy must stay Patrol-only in operator-facing language:-available inventory should read as free Patrol quickstart runs with no API-key for Patrol on the current activated Pulse Account install or effective-hosted entitlement, and-activation-required states must trust the canonical blocked reason instead of-relabeling stale counters as exhausted. Exhaustion should direct the operator-toward BYOK for Patrol rather than implying a broader hosted AI allowance.+The Patrol header now also has explicit helper ownership for schedule and+runtime presentation. `frontend-modern/src/utils/aiPatrolSchedulePresentation.ts`+and `frontend-modern/src/utils/patrolRuntimePresentation.ts` are the canonical+owners for Patrol interval option labeling and runtime-state wording used by+`frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx`; future+Patrol header work should extend those helpers instead of rebuilding schedule+labels, runtime copy, or retired managed-credit badges inline in the header+shell. That same header surface must normalize older hosted-model block reasons+back to provider or local-model setup guidance.`frontend-modern/src/utils/remediationPresentation.ts` is now also thecanonical owner for remediation result badge copy and success/failure stylingused by `frontend-modern/src/components/patrol/RemediationStatus.tsx`, so@@ -581,12 +570,11 @@ The same page and drawer now also share the canonical`frontend-modern/src/components/Infrastructure/ResourceChangeSummary.tsx`card for recent changes, so the timeline layout and relative-time wordingstay governed by one frontend feed instead of separate page-local loops.-Patrol trial-entry surfaces now also share the canonical-`frontend-modern/src/utils/trialStartAction.ts` owner for hosted handoff and-denial handling. `ApprovalSection.tsx` and-`usePatrolIntelligenceState.ts` may still choose Patrol-specific success copy,-but they must not reintroduce local `startProTrial()` status-code branches-that diverge from the commercial backend contract.+Patrol trial-entry surfaces are retired for normal self-hosted v6 GA.+`ApprovalSection.tsx` and `usePatrolIntelligenceState.ts` may link to explicit+plan, activation, recovery, support, or hosted handoff surfaces where+presentation policy allows, but they must not reintroduce local+`startProTrial()` status-code branches or trial-specific denial copy.Pending Patrol fix approvals now also require a canonical urgency order acrossthe store and Patrol approval surfaces. `frontend-modern/src/stores/aiIntelligence.ts`,`frontend-modern/src/components/patrol/ApprovalBanner.tsx`, and dashboard@@ -676,15 +664,12 @@ through `frontend-modern/src/routing/resourceLinks.ts` where those surfacesexist, rather than forcing operators to pivot manually through search orassistant prompts to continue investigating API-backed platforms such asTrueNAS.-Patrol upgrade and trial posture now follows the same runtime-versus--commercial split as the rest of the app. Patrol runtime availability must stay-on the non-commercial capability store, while approval/trial CTAs use the-shared commercial-posture store and trial-start helper. Patrol surfaces must not-recombine those two contracts into one entitlement payload.-Patrol approval and trial shells should consume selector helpers such as-`canStartCommercialTrial()` from-`frontend-modern/src/stores/licenseCommercial.ts` instead of branching on raw-commercial-posture fields in leaf components.+Patrol upgrade posture now follows the same runtime-versus-commercial split as+the rest of the app. Patrol runtime availability must stay on the+non-commercial capability store, while any paid handoff uses explicit plan,+activation, recovery, support, or hosted surfaces governed by presentation+policy. Patrol surfaces must not recombine those contracts into one entitlement+payload or revive trial-start selectors in leaf components.Patrol findings presentation now also keeps runtime identity and action routingon shared helpers. Findings shells may link or format from feature-ownedpresentation helpers, but Patrol runtime severity, title cleanup, and primarydiff --git a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md b/docs/release-control/v6/internal/subsystems/performance-and-scalability.mdindex ed768c06d8..a37a5ddf6f 100644--- a/docs/release-control/v6/internal/subsystems/performance-and-scalability.md+++ b/docs/release-control/v6/internal/subsystems/performance-and-scalability.md@@ -276,6 +276,11 @@ regression protection.`/api/state` and paying an avoidable `401`; once a local-login hint existsor the operator is on a protected route, that shared state probe remainsthe canonical runtime detector.+ That same app-shell performance boundary treats global commercial banners as+ non-hot-path UI. Retired self-hosted trial or managed-model acquisition+ surfaces must not be reintroduced into `frontend-modern/src/App.tsx` as+ always-mounted chrome that preloads commercial posture or adds route-global+ render work to ordinary monitoring sessions.Invitation accept/revoke and other org-membership changes follow that samehot-path contract: `frontend-modern/src/useAppRuntimeState.ts` may reloadthe org list from the shared `organizations_changed` event, but that refreshdiff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 0273188ede..e68888158e 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -3993,12 +3993,12 @@"frontend-modern/src/types/aiIntelligence.ts","frontend-modern/src/utils/aiFindingPresentation.ts","frontend-modern/src/utils/aiPatrolSchedulePresentation.ts",- "frontend-modern/src/utils/aiQuickstartPresentation.ts","frontend-modern/src/utils/approvalRiskPresentation.ts","frontend-modern/src/utils/findingAlertIdentity.ts","frontend-modern/src/utils/patrolEmptyStatePresentation.ts","frontend-modern/src/utils/patrolFormat.ts","frontend-modern/src/utils/patrolRunPresentation.ts",+ "frontend-modern/src/utils/patrolRuntimePresentation.ts","frontend-modern/src/utils/patrolSummaryPresentation.ts","frontend-modern/src/utils/remediationPresentation.ts"],@@ -4049,13 +4049,12 @@"match_prefixes": [],"match_files": ["frontend-modern/src/utils/aiPatrolSchedulePresentation.ts",- "frontend-modern/src/utils/aiQuickstartPresentation.ts"+ "frontend-modern/src/utils/patrolRuntimePresentation.ts"],"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": ["frontend-modern/src/utils/__tests__/aiPatrolSchedulePresentation.test.ts",- "frontend-modern/src/utils/__tests__/aiQuickstartPresentation.test.ts","frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts"]},diff --git a/docs/release-control/v6/internal/subsystems/security-privacy.md b/docs/release-control/v6/internal/subsystems/security-privacy.mdindex 98ea24e2c4..9ed32a450b 100644--- a/docs/release-control/v6/internal/subsystems/security-privacy.md+++ b/docs/release-control/v6/internal/subsystems/security-privacy.md@@ -111,13 +111,14 @@ visibility, and privacy controls to operators.6. Keep the shared storage-directory and secure storage-file hardening helper aligned with the crypto manager plus control-plane magic-link key and store handling whenever runtime data-root ownership assumptions change.7. Keep auth-env ingestion and shared fingerprint-verifier TLS defaults aligned whenever runtime auth loading or pinned-certificate transport behavior changes.8. Keep the Data Handling settings surface neutral and non-commercial: it may show resource policy posture, local-only counts, and redaction coverage, but it must not advertise trials, upgrades, paid plans, or monitoring limits.-9. Keep operator-facing Data Handling posture aligned with runtime AI/context enforcement: `local-only` resource details must not be sent to external model prompts, and sensitive free-form alert, tool-result, investigation, and hosted-quickstart text must use the shared resource-policy redaction helper before leaving the local trust boundary. All provider-bound AI requests to non-local models must use the shared resource-policy sanitizer immediately before transport so later agentic turns cannot bypass the advertised handling posture.+9. Keep operator-facing Data Handling posture aligned with runtime AI/context enforcement: `local-only` resource details must not be sent to external model prompts, and sensitive free-form alert, tool-result, investigation, and any retained legacy managed-model compatibility text must use the shared resource-policy redaction helper before leaving the local trust boundary. All provider-bound AI requests to non-local models must use the shared resource-policy sanitizer immediately before transport so later agentic turns cannot bypass the advertised handling posture.10. Keep the canonical and frontend-served privacy disclosures aligned with- the actual AI transport boundary: BYOK must remain described as direct to- the chosen provider, hosted Quickstart must remain described as transiting- Pulse infrastructure, and both disclosures must state that governed- resource details use resource-policy redaction before non-local model- transport.+ the actual AI transport boundary: self-managed installs must describe local+ providers as staying on the operator network, non-local providers as direct+ provider-bound requests from the Pulse instance, and managed-model+ quickstart/trial transport as absent from normal self-hosted v6 GA docs.+ Both disclosures must state that governed resource details use+ resource-policy redaction before non-local model transport.## Current Statediff --git a/docs/release-control/v6/internal/subsystems/storage-recovery.md b/docs/release-control/v6/internal/subsystems/storage-recovery.mdindex 50f6a39897..f14e76e7c9 100644--- a/docs/release-control/v6/internal/subsystems/storage-recovery.md+++ b/docs/release-control/v6/internal/subsystems/storage-recovery.md@@ -377,6 +377,10 @@ querying, and the operator-facing storage health presentation layer.compatibility redirect, but storage/recovery route owners must not dependon or borrow that Patrol redirect path for their own preview orcompatibility entrypoints.+ The same route-ownership rule keeps retired self-hosted trial and+ managed-model acquisition banners out of shared app chrome: storage and+ recovery routes must not inherit commercial nudges simply because+ `frontend-modern/src/App.tsx` owns the authenticated shell.Authenticated `/login` must follow that same shared app-shell contract:once login succeeds, `frontend-modern/src/App.tsx` must hand the browserback to the governed dashboard landing route instead of leavingdiff --git a/frontend-modern/public/docs/PRIVACY.md b/frontend-modern/public/docs/PRIVACY.mdindex d3bf738c68..4a2a8e8dd7 100644--- a/frontend-modern/public/docs/PRIVACY.md+++ b/frontend-modern/public/docs/PRIVACY.md@@ -95,8 +95,7 @@ The telemetry implementation is in [`internal/telemetry/telemetry.go`](../internPulse can make outbound connections when you enable specific features:-- **AI (BYOK)**: when AI features are configured with your own API key, Pulse sends only the context required for your request directly to the provider you chose (OpenAI, Anthropic, etc.). Requests do not transit Pulse infrastructure. Before non-local model requests leave the instance, governed resource details use the same resource-policy redaction shown in Data Handling: local-only resource details are omitted from detailed prompt sections or replaced with policy-safe summaries, and known restricted resource identifiers are redacted where they appear in provider-bound context. See `docs/AI.md`.-- **AI (Quickstart)**: when the Pulse-hosted Quickstart provider is selected, your chat request, including messages, system prompt, and tool definitions, is forwarded through `license.pulserelay.pro/v1/quickstart/patrol` to the underlying model provider. This path exists so eligible quickstart users can try AI without their own API key; it means requests transit Pulse infrastructure. The same resource-policy redaction is applied before the Quickstart request is sent, and the Quickstart proxy requires the runtime to mark the request as using that policy. To keep prompts off Pulse infrastructure entirely, use a BYOK provider instead.+- **AI providers**: when AI features are configured, Pulse sends only the context required for your request to the provider you chose. Local providers stay on your network; non-local providers such as OpenAI or Anthropic receive provider-bound context directly from your Pulse instance. AI prompts from self-managed installs do not transit Pulse infrastructure. Before non-local model requests leave the instance, governed resource details use the same resource-policy redaction shown in Data Handling: local-only resource details are omitted from detailed prompt sections or replaced with policy-safe summaries, and known restricted resource identifiers are redacted where they appear in provider-bound context. See `docs/AI.md`.- **Relay / Remote Access**: when relay is enabled, Pulse connects to the configured relay endpoint to enable mobile access. See Settings → Remote Access.- **Update checks**: Pulse can check for new releases/updates (for example via GitHub release metadata) depending on your deployment and configuration.diff --git a/frontend-modern/src/App.tsx b/frontend-modern/src/App.tsxindex 14465bd90b..b1c2df19fc 100644--- a/frontend-modern/src/App.tsx+++ b/frontend-modern/src/App.tsx@@ -17,7 +17,6 @@ import { logger } from './utils/logger';import { UpdateBanner } from './components/UpdateBanner';import { DemoBanner } from './components/DemoBanner';import { GitHubStarBanner } from './components/GitHubStarBanner';-import { TrialBanner } from './components/shared/TrialBanner';import { MonitoredSystemLimitWarningBanner } from './components/shared/MonitoredSystemLimitWarningBanner';import { WhatsNewModal } from './components/shared/WhatsNewModal';import { KeyboardShortcutsModal } from './components/shared/KeyboardShortcutsModal';@@ -405,7 +404,6 @@ function App() {<SecurityWarning /><DemoBanner /><UpdateBanner />- <TrialBanner /><MonitoredSystemLimitWarningBanner /><GitHubStarBanner /><WhatsNewModal />diff --git a/frontend-modern/src/__tests__/App.architecture.test.ts b/frontend-modern/src/__tests__/App.architecture.test.tsindex 243af31b03..c2e10acf68 100644--- a/frontend-modern/src/__tests__/App.architecture.test.ts+++ b/frontend-modern/src/__tests__/App.architecture.test.ts@@ -74,6 +74,7 @@ describe('App architecture', () => {expect(appSource).toContain("if (e.key === 'Escape' && aiChatStore.isOpen) {");expect(appSource).toContain('<AIChat onClose={() => aiChatStore.close()} />');expect(appSource).toContain('showOrgSwitcher={runtime.showOrgSwitcher}');+ expect(appSource).not.toContain('TrialBanner');});it('keeps authenticated chrome in AppLayout and hosted bootstrap in useAppRuntimeState', () => {diff --git a/frontend-modern/src/api/__tests__/license.test.ts b/frontend-modern/src/api/__tests__/license.test.tsindex 3c2c93dbda..db68d048fa 100644--- a/frontend-modern/src/api/__tests__/license.test.ts+++ b/frontend-modern/src/api/__tests__/license.test.ts@@ -1,11 +1,8 @@import { beforeEach, describe, expect, it, vi } from 'vitest';import { LicenseAPI } from '../license';-import { apiClient, apiFetchJSON } from '@/utils/apiClient';+import { apiFetchJSON } from '@/utils/apiClient';vi.mock('@/utils/apiClient', () => ({- apiClient: {- fetch: vi.fn(),- },apiFetchJSON: vi.fn(),}));@@ -162,15 +159,7 @@ describe('LicenseAPI', () => {expect(apiFetchJSON).toHaveBeenCalledWith('/api/license/entitlements');});- it('starts trials through the raw license transport', async () => {- vi.mocked(apiClient.fetch).mockResolvedValueOnce(new Response(null, { status: 202 }));-- const response = await LicenseAPI.startTrial();-- expect(apiClient.fetch).toHaveBeenCalledWith('/api/license/trial/start', {- method: 'POST',- headers: { Accept: 'application/json' },- });- expect(response.status).toBe(202);+ it('does not expose a normal self-hosted trial-start client', () => {+ expect('startTrial' in LicenseAPI).toBe(false);});});diff --git a/frontend-modern/src/api/license.ts b/frontend-modern/src/api/license.tsindex 08791a78a7..89505b4be8 100644--- a/frontend-modern/src/api/license.ts+++ b/frontend-modern/src/api/license.ts@@ -1,4 +1,4 @@-import { apiClient, apiFetchJSON } from '@/utils/apiClient';+import { apiFetchJSON } from '@/utils/apiClient';export interface LicenseStatus {valid: boolean;@@ -193,11 +193,4 @@ export class LicenseAPI {}) as Promise<ClearLicenseResponse>;}- static async startTrial(): Promise<Response> {- // Return the raw Response so callers can handle status codes (409 trial_already_used, 429 rate limited, etc.)- return apiClient.fetch(`${this.baseUrl}/trial/start`, {- method: 'POST',- headers: { Accept: 'application/json' },- });- }}diff --git a/frontend-modern/src/components/Settings/AISettings.tsx b/frontend-modern/src/components/Settings/AISettings.tsxindex fd84d5320c..2a487c6fcd 100644--- a/frontend-modern/src/components/Settings/AISettings.tsx+++ b/frontend-modern/src/components/Settings/AISettings.tsx@@ -142,9 +142,7 @@ export const AISettings: Component = () => {setSetupApiKey={state.setSetupApiKey}setupOllamaUrl={state.setupOllamaUrl}setSetupOllamaUrl={state.setSetupOllamaUrl}- setupMode={state.setupMode}setupSaving={state.setupSaving}- quickstartBlockedReason={state.quickstartBlockedReason}handleCloseSetupModal={state.handleCloseSetupModal}handleSetupSubmit={state.handleSetupSubmit}/>diff --git a/frontend-modern/src/components/Settings/AISettingsDialogs.tsx b/frontend-modern/src/components/Settings/AISettingsDialogs.tsxindex f461732191..837b7264c0 100644--- a/frontend-modern/src/components/Settings/AISettingsDialogs.tsx+++ b/frontend-modern/src/components/Settings/AISettingsDialogs.tsx@@ -18,7 +18,6 @@ export interface AISettingsDialogsProps {diffSessionLabel: Accessor<string>;formatDiffStats: (change: FileChange) => string;showSetupModal: Accessor<boolean>;- setupMode: Accessor<'provider' | 'activation-or-provider' | 'provider-required'>;setupProvider: Accessor<AIProvider>;setSetupProvider: Setter<AIProvider>;setupApiKey: Accessor<string>;@@ -26,14 +25,13 @@ export interface AISettingsDialogsProps {setupOllamaUrl: Accessor<string>;setSetupOllamaUrl: Setter<string>;setupSaving: Accessor<boolean>;- quickstartBlockedReason: Accessor<string>;handleCloseSetupModal: () => void;handleSetupSubmit: () => Promise<void>;}export const AISettingsDialogs: Component<AISettingsDialogsProps> = (props) => {const setupProviderConfig = () => getAIProviderConfig(props.setupProvider());- const setupPresentation = () => getAISettingsSetupDialogPresentation(props.setupMode());+ const setupPresentation = getAISettingsSetupDialogPresentation;return (<>@@ -107,12 +105,6 @@ export const AISettingsDialogs: Component<AISettingsDialogsProps> = (props) => {</div><div class="p-6 space-y-4">- <Show when={props.quickstartBlockedReason()}>- <div class="rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-sm text-amber-800 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-200">- {props.quickstartBlockedReason()}- </div>- </Show>-<SelectionCardGroupoptions={AI_SETUP_PROVIDER_OPTIONS}value={props.setupProvider()}diff --git a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsxindex fb936c6d19..06aff30392 100644--- a/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx+++ b/frontend-modern/src/components/Settings/__tests__/AISettings.test.tsx@@ -27,7 +27,6 @@ const commercialPostureMock = vi.fn();const entitlementsMock = vi.fn();const trackPaywallViewedMock = vi.fn();const trackUpgradeClickedMock = vi.fn();-const runStartProTrialActionMock = vi.fn();const presentationPolicyHidesUpgradePromptsMock = vi.fn();vi.mock('@/api/ai', () => ({@@ -78,10 +77,6 @@ vi.mock('@/stores/licenseCommercial', () => ({loadRuntimeCapabilities: (...args: unknown[]) => loadLicenseStatusMock(...args),}));-vi.mock('@/utils/trialStartAction', () => ({- runStartProTrialAction: (...args: unknown[]) => runStartProTrialActionMock(...args),-}));-vi.mock('@/stores/sessionPresentationPolicy', () => ({presentationPolicyHidesUpgradePrompts: () => presentationPolicyHidesUpgradePromptsMock(),}));@@ -137,7 +132,6 @@ const resetAllMocks = () => {entitlementsMock.mockReset();trackPaywallViewedMock.mockReset();trackUpgradeClickedMock.mockReset();- runStartProTrialActionMock.mockReset();presentationPolicyHidesUpgradePromptsMock.mockReset();};@@ -158,7 +152,6 @@ const setupDefaultMocks = () => {summarizeSessionMock.mockResolvedValue(undefined);getSessionDiffMock.mockResolvedValue({ files: [], summary: '' });revertSessionMock.mockResolvedValue(undefined);- runStartProTrialActionMock.mockResolvedValue('activated');presentationPolicyHidesUpgradePromptsMock.mockReturnValue(false);};@@ -464,7 +457,7 @@ describe('AISettings OpenRouter flow', () => {});});-describe('AISettings quickstart enablement flow', () => {+describe('AISettings provider setup flow', () => {beforeEach(() => {resetAllMocks();setupDefaultMocks();@@ -474,7 +467,7 @@ describe('AISettings quickstart enablement flow', () => {cleanup();});- it('does not load provider model catalog for quickstart-only installs', async () => {+ it('keeps quickstart-only installs on the provider setup path', async () => {getSettingsMock.mockResolvedValue({...baseSettings(),configured: true,@@ -491,51 +484,17 @@ describe('AISettings quickstart enablement flow', () => {expect(getSettingsMock).toHaveBeenCalledTimes(1);});+ fireEvent.click(screen.getByRole('button', { name: /enable assistant and patrol/i }));+expect(getModelsMock).not.toHaveBeenCalled();+ expect(updateSettingsMock).not.toHaveBeenCalled();+ expect(await screen.findByText('Set Up Assistant & Patrol')).toBeInTheDocument();expect(- screen.getByText(/Patrol quickstart ready • 25\/25 runs left • no API key needed yet/i),+ screen.getByText('Connect a provider to power Pulse Assistant and Patrol.'),).toBeInTheDocument();- });-- it('enables directly when quickstart is available on an activated install', async () => {- getSettingsMock.mockResolvedValue({- ...baseSettings(),- configured: true,- enabled: false,- model: 'quickstart:pulse-hosted',- quickstart_credits_total: 25,- quickstart_credits_remaining: 25,- quickstart_credits_available: true,- });- updateSettingsMock.mockResolvedValue({- ...baseSettings(),- configured: true,- enabled: true,- model: 'quickstart:pulse-hosted',- chat_model: 'quickstart:pulse-hosted',- patrol_model: 'quickstart:pulse-hosted',- quickstart_credits_total: 25,- quickstart_credits_remaining: 25,- quickstart_credits_available: true,- using_quickstart: true,- });-- renderComponent();-- await waitFor(() => {- expect(getSettingsMock).toHaveBeenCalledTimes(1);- });-- fireEvent.click(screen.getByRole('button', { name: /enable assistant and patrol/i }));-- await waitFor(() => {- expect(updateSettingsMock).toHaveBeenCalledWith({ enabled: true });- });-expect(- screen.queryByText('Connect a provider to power Pulse Assistant and Patrol.'),+ screen.queryByText(/Patrol quickstart ready • 25\/25 runs left • no API key needed yet/i),).not.toBeInTheDocument();- expect(notificationSuccessMock).toHaveBeenCalledWith('Assistant & Patrol enabled');});it('keeps activation-required quickstart guidance out of default provider setup', async () => {diff --git a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.tsindex c86c91c649..026d6ac56a 100644--- a/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/settingsArchitecture.test.ts@@ -133,6 +133,8 @@ describe('settings architecture guardrails', () => {it('keeps default self-hosted commercial copy opt-in from shared settings primitives', () => {expect(aiSettingsDialogsSource).not.toContain('Open hosted handoff');expect(aiSettingsDialogsSource).not.toContain('Hosted quickstart routes policy-redacted prompts');+ expect(aiSettingsDialogsSource).not.toContain('quickstartBlockedReason');+ expect(aiSettingsStateSource).not.toContain('hasQuickstartAvailable');expect(aiSettingsDialogsSource).not.toContain('Start Trial');expect(aiSettingsDialogsSource).not.toContain('RELAY_ONBOARDING_TRIAL_STARTING_LABEL');expect(generalSettingsPanelSource).toContain('Disable local-only commercial events');diff --git a/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts b/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.tsindex ed101540d6..2d6e5b764d 100644--- a/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts+++ b/frontend-modern/src/components/Settings/__tests__/useReportingPanelState.test.ts@@ -105,10 +105,6 @@ describe('useReportingPanelState', () => {showWarning: vi.fn(),}));- vi.doMock('@/utils/trialStartAction', () => ({- runStartProTrialAction: vi.fn(),- }));-vi.doMock('@/utils/upgradeMetrics', () => ({trackPaywallViewed: vi.fn(),}));@@ -211,10 +207,6 @@ describe('useReportingPanelState', () => {showWarning: vi.fn(),}));- vi.doMock('@/utils/trialStartAction', () => ({- runStartProTrialAction: vi.fn(),- }));-vi.doMock('@/utils/upgradeMetrics', () => ({trackPaywallViewed: vi.fn(),}));@@ -275,10 +267,6 @@ describe('useReportingPanelState', () => {showWarning: vi.fn(),}));- vi.doMock('@/utils/trialStartAction', () => ({- runStartProTrialAction: vi.fn(),- }));-vi.doMock('@/utils/upgradeMetrics', () => ({trackPaywallViewed: vi.fn(),}));@@ -345,10 +333,6 @@ describe('useReportingPanelState', () => {showWarning: vi.fn(),}));- vi.doMock('@/utils/trialStartAction', () => ({- runStartProTrialAction: vi.fn(),- }));-vi.doMock('@/utils/upgradeMetrics', () => ({trackPaywallViewed: vi.fn(),}));@@ -404,10 +388,6 @@ describe('useReportingPanelState', () => {showWarning: vi.fn(),}));- vi.doMock('@/utils/trialStartAction', () => ({- runStartProTrialAction: vi.fn(),- }));-vi.doMock('@/utils/upgradeMetrics', () => ({trackPaywallViewed: vi.fn(),}));diff --git a/frontend-modern/src/components/Settings/useAISettingsState.ts b/frontend-modern/src/components/Settings/useAISettingsState.tsindex 1d58ad952f..0fdfc82ae6 100644--- a/frontend-modern/src/components/Settings/useAISettingsState.ts+++ b/frontend-modern/src/components/Settings/useAISettingsState.ts@@ -35,15 +35,9 @@ import {getAISettingsSaveErrorMessage,getAISettingsToggleErrorMessage,} from '@/utils/aiSettingsPresentation';-import {- AI_QUICKSTART_ACTIVATION_REQUIRED_REASON,- normalizeQuickstartReason,-} from '@/utils/aiQuickstartContract';import { logger } from '@/utils/logger';import { trackPaywallViewed } from '@/utils/upgradeMetrics';-type AISetupMode = 'provider' | 'activation-or-provider' | 'provider-required';-export const useAISettingsState = () => {const [settings, setSettings] = createSignal<AISettingsType | null>(null);const [loading, setLoading] = createSignal(false);@@ -79,7 +73,6 @@ export const useAISettingsState = () => {const [preflightLastCheckedAt, setPreflightLastCheckedAt] = createSignal<number | null>(null);const [showSetupModal, setShowSetupModal] = createSignal(false);- const [setupMode, setSetupMode] = createSignal<AISetupMode>('provider');const [setupProvider, setSetupProvider] = createSignal<AIProvider>('anthropic');const [setupApiKey, setSetupApiKey] = createSignal('');const [setupOllamaUrl, setSetupOllamaUrl] = createSignal('http://localhost:11434');@@ -114,23 +107,12 @@ export const useAISettingsState = () => {});const showUpgradePrompts = () => !presentationPolicyHidesUpgradePrompts();- const visibleQuickstartBlockedReason = () => {- const normalized = normalizeQuickstartReason(settings()?.quickstart_blocked_reason);- if (normalized === AI_QUICKSTART_ACTIVATION_REQUIRED_REASON) {- return '';- }- return normalized;- };const settingsReadiness = createMemo(() =>getAISettingsReadinessPresentation({configured: Boolean(settings()?.configured),providerCount: settings()?.configured_providers?.length || 0,modelCount: availableModels().length,- quickstartCreditsAvailable: Boolean(settings()?.quickstart_credits_available),- quickstartCreditsRemaining: settings()?.quickstart_credits_remaining ?? 0,- quickstartCreditsTotal: settings()?.quickstart_credits_total ?? 0,- quickstartBlockedReason: visibleQuickstartBlockedReason(),}),);const autoFixLocked = createMemo(() => !hasFeature('ai_autofix'));@@ -154,10 +136,6 @@ export const useAISettingsState = () => {current.ollama_configured),);});- const hasQuickstartAvailable = createMemo(() =>- Boolean(settings()?.quickstart_credits_available),- );- const quickstartBlockedReason = createMemo(visibleQuickstartBlockedReason);const upgradeAutofixDestination = () => getUpgradeActionDestination('ai_autofix');const hasProviderBackedModels = (data: AISettingsType | null | undefined) =>@@ -305,19 +283,10 @@ export const useAISettingsState = () => {const handleCloseSetupModal = () => {setShowSetupModal(false);- setSetupMode('provider');setSetupApiKey('');};const openEnableSetupModal = () => {- const blockedReason = quickstartBlockedReason();- if (blockedReason === AI_QUICKSTART_ACTIVATION_REQUIRED_REASON && showUpgradePrompts()) {- setSetupMode('activation-or-provider');- } else if (blockedReason) {- setSetupMode('provider-required');- } else {- setSetupMode('provider');- }setShowSetupModal(true);};@@ -810,7 +779,7 @@ export const useAISettingsState = () => {await handleEnabledToggle(false);return;}- if (hasConfiguredProvider() || hasQuickstartAvailable()) {+ if (hasConfiguredProvider()) {await handleEnabledToggle(true);return;}@@ -862,7 +831,6 @@ export const useAISettingsState = () => {handleTest,handleTestProvider,hasConfiguredProvider,- hasQuickstartAvailable,loadChatSessions,loading,loadError,@@ -892,7 +860,6 @@ export const useAISettingsState = () => {setShowDiffModal,setShowDiscoverySettings,setShowSetupModal,- setupMode,settings,settingsReadiness,setupApiKey,@@ -907,7 +874,6 @@ export const useAISettingsState = () => {showUpgradePrompts,testing,testingProvider,- quickstartBlockedReason,upgradeAutofixDestination,};};diff --git a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.tsindex 64d011970f..683dab17b7 100644--- a/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts+++ b/frontend-modern/src/components/shared/SharedPrimitives.guardrails.test.ts@@ -54,8 +54,6 @@ import searchTipsPopoverModelSource from '@/components/shared/searchTipsPopoverMimport tooltipSource from '@/components/shared/Tooltip.tsx?raw';import tooltipPortalSource from '@/components/shared/TooltipPortal.tsx?raw';import tooltipModelSource from '@/components/shared/tooltipModel.ts?raw';-import trialBannerSource from '@/components/shared/TrialBanner.tsx?raw';-import trialBannerModelSource from '@/components/shared/trialBannerModel.ts?raw';import upgradeLinkSource from '@/components/shared/UpgradeLink.tsx?raw';import interactiveSparklineSource from '@/components/shared/InteractiveSparkline.tsx?raw';import interactiveSparklineModelSource from '@/components/shared/interactiveSparklineModel.ts?raw';@@ -103,7 +101,6 @@ import statusBadgeStateSource from '@/components/shared/useStatusBadgeState.ts?rimport toggleStateSource from '@/components/shared/useToggleState.ts?raw';import searchTipsPopoverStateSource from '@/components/shared/useSearchTipsPopoverState.ts?raw';import tooltipStateSource from '@/components/shared/useTooltipState.ts?raw';-import trialBannerStateSource from '@/components/shared/useTrialBannerState.ts?raw';import upgradeNavigationHookSource from '@/components/shared/useUpgradeNavigation.ts?raw';import interactiveSparklineStateSource from '@/components/shared/useInteractiveSparklineState.ts?raw';import monitoredSystemLimitWarningBannerStateSource from '@/components/shared/useMonitoredSystemLimitWarningBannerState.ts?raw';@@ -446,35 +443,6 @@ describe('shared primitive guardrails', () => {expect(nodeGroupHeaderSource).toContain('event.stopPropagation()');});- it('keeps trial banner on shell, runtime, and model owners', () => {- expect(trialBannerSource).toContain('useTrialBannerState');- expect(trialBannerSource).toContain('TRIAL_BANNER_TITLE');- expect(trialBannerSource).not.toContain('createSignal');- expect(trialBannerSource).not.toContain('createMemo');- expect(trialBannerSource).not.toContain('loadRuntimeCapabilities');- expect(trialBannerSource).not.toContain('licenseStatus');- expect(trialBannerSource).not.toContain('getUpgradeActionUrlOrFallback');-- expect(trialBannerStateSource).toContain('export function useTrialBannerState');- expect(trialBannerStateSource).toContain('createSignal');- expect(trialBannerStateSource).toContain('createMemo');- expect(trialBannerStateSource).not.toContain('loadCommercialPosture');- expect(trialBannerStateSource).toContain('commercialTrialDaysRemaining');- expect(trialBannerStateSource).toContain('isCommercialTrialActive');- expect(trialBannerStateSource).toContain('presentationPolicyHidesCommercialSurfaces');- expect(trialBannerStateSource).toContain('getUpgradeActionDestination');- expect(trialBannerStateSource).toContain('snoozeUpsell');- expect(trialBannerStateSource).not.toContain("fetch('/api/health'");-- expect(trialBannerModelSource).toContain('TRIAL_BANNER_SNOOZE_KEY');- expect(trialBannerModelSource).toContain('normalizeTrialBannerDaysRemaining');- expect(trialBannerModelSource).toContain('getTrialBannerToneClass');- expect(trialBannerModelSource).toContain('getTrialBannerStatusLabel');- expect(trialBannerModelSource).toContain('TRIAL_BANNER_UPGRADE_LABEL');- expect(trialBannerModelSource).toContain("TRIAL_BANNER_UPGRADE_LABEL = 'Manage plan'");- expect(trialBannerModelSource).not.toContain("TRIAL_BANNER_UPGRADE_LABEL = 'Upgrade'");- });-it('keeps upgrade navigation split across shell, runtime, and utility owners', () => {expect(upgradeLinkSource).toContain('destination.external');expect(upgradeLinkSource).toContain("return local.target ?? '_blank';");diff --git a/frontend-modern/src/components/shared/TrialBanner.tsx b/frontend-modern/src/components/shared/TrialBanner.tsxdeleted file mode 100644index f0264b4dc5..0000000000--- a/frontend-modern/src/components/shared/TrialBanner.tsx+++ /dev/null@@ -1,49 +0,0 @@-import { Component, Show } from 'solid-js';-import {- getTrialBannerStatusLabel,- TRIAL_BANNER_SNOOZE_LABEL,- TRIAL_BANNER_TITLE,- TRIAL_BANNER_UPGRADE_LABEL,-} from './trialBannerModel';-import { UpgradeLink } from './UpgradeLink';-import { useTrialBannerState } from './useTrialBannerState';--export const TrialBanner: Component = () => {- const state = useTrialBannerState();-- return (- <Show when={state.isTrial()}>- <div- class={`mb-2 rounded-md border px-3 py-2 text-sm ${state.toneClass()}`}- role="status"- aria-live="polite"- >- <div class="flex flex-wrap items-center justify-between gap-2">- <div class="font-medium">- {TRIAL_BANNER_TITLE}- <span class="ml-2">{getTrialBannerStatusLabel(state.daysRemaining())}</span>- </div>- <Show when={state.showActions()}>- <div class="flex items-center gap-2">- <UpgradeLink- class="text-xs font-semibold underline underline-offset-2 hover:opacity-90"- destination={state.upgradeDestination()}- >- {TRIAL_BANNER_UPGRADE_LABEL}- </UpgradeLink>- <button- type="button"- class="text-xs opacity-70 hover:opacity-100"- onClick={state.handleSnooze}- >- {TRIAL_BANNER_SNOOZE_LABEL}- </button>- </div>- </Show>- </div>- </div>- </Show>- );-};--export default TrialBanner;diff --git a/frontend-modern/src/components/shared/__tests__/TrialBanner.test.tsx b/frontend-modern/src/components/shared/__tests__/TrialBanner.test.tsxdeleted file mode 100644index 8484a61d8d..0000000000--- a/frontend-modern/src/components/shared/__tests__/TrialBanner.test.tsx+++ /dev/null@@ -1,173 +0,0 @@-import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';-import { Route, Router } from '@solidjs/router';-import { TrialBanner } from '@/components/shared/TrialBanner';-import trialBannerSource from '@/components/shared/TrialBanner.tsx?raw';-import trialBannerModelSource from '@/components/shared/trialBannerModel.ts?raw';-import trialBannerStateSource from '@/components/shared/useTrialBannerState.ts?raw';-import { TRIAL_BANNER_SNOOZE_KEY } from '@/components/shared/trialBannerModel';-import { getPublicPricingUrl } from '@/utils/pricingHandoff';--const {- presentationPolicyHidesCommercialSurfacesMock,- presentationPolicyHidesUpgradePromptsMock,- getUpgradeActionDestinationMock,- getUpgradeActionUrlOrFallbackMock,- commercialPostureMock,- isUpsellSnoozedMock,- snoozeUpsellMock,-} = vi.hoisted(() => ({- presentationPolicyHidesCommercialSurfacesMock: vi.fn(),- presentationPolicyHidesUpgradePromptsMock: vi.fn(),- getUpgradeActionDestinationMock: vi.fn(),- getUpgradeActionUrlOrFallbackMock: vi.fn(),- commercialPostureMock: vi.fn(),- isUpsellSnoozedMock: vi.fn(),- snoozeUpsellMock: vi.fn(),-}));--vi.mock('@/stores/licenseCommercial', () => ({- commercialTrialDaysRemaining: () => commercialPostureMock()?.trial_days_remaining ?? null,- getUpgradeActionDestination: (...args: unknown[]) => getUpgradeActionDestinationMock(...args),- getUpgradeActionUrlOrFallback: (...args: unknown[]) => getUpgradeActionUrlOrFallbackMock(...args),- commercialPosture: (...args: unknown[]) => commercialPostureMock(...args),- isCommercialTrialActive: () => commercialPostureMock()?.subscription_state === 'trial',-}));--vi.mock('@/stores/sessionPresentationPolicy', () => ({- presentationPolicyHidesCommercialSurfaces: () => presentationPolicyHidesCommercialSurfacesMock(),- presentationPolicyHidesUpgradePrompts: () => presentationPolicyHidesUpgradePromptsMock(),-}));--vi.mock('@/utils/snooze', () => ({- isUpsellSnoozed: (...args: unknown[]) => isUpsellSnoozedMock(...args),- snoozeUpsell: (...args: unknown[]) => snoozeUpsellMock(...args),-}));--describe('TrialBanner', () => {- const renderBanner = () =>- render(() => (- <Router>- <Route path="/" component={() => <TrialBanner />} />- </Router>- ));-- beforeEach(() => {- cleanup();- presentationPolicyHidesCommercialSurfacesMock.mockReset();- presentationPolicyHidesUpgradePromptsMock.mockReset();- getUpgradeActionDestinationMock.mockReset();- getUpgradeActionUrlOrFallbackMock.mockReset();- commercialPostureMock.mockReset();- isUpsellSnoozedMock.mockReset();- snoozeUpsellMock.mockReset();- getUpgradeActionDestinationMock.mockReturnValue({- href: getPublicPricingUrl('trial_banner'),- external: true,- });- presentationPolicyHidesCommercialSurfacesMock.mockReturnValue(false);- presentationPolicyHidesUpgradePromptsMock.mockReturnValue(false);- getUpgradeActionUrlOrFallbackMock.mockReturnValue(getPublicPricingUrl('trial_banner'));- isUpsellSnoozedMock.mockReturnValue(false);- });-- afterEach(() => {- cleanup();- });-- it('keeps trial banner on shell, runtime, and model owners', () => {- expect(trialBannerSource).toContain('useTrialBannerState');- expect(trialBannerSource).toContain('TRIAL_BANNER_TITLE');- expect(trialBannerSource).not.toContain('createSignal');- expect(trialBannerSource).not.toContain('createMemo');- expect(trialBannerSource).not.toContain('loadRuntimeCapabilities');- expect(trialBannerSource).not.toContain('licenseStatus');- expect(trialBannerSource).not.toContain('getUpgradeActionUrlOrFallback');-- expect(trialBannerStateSource).toContain('export function useTrialBannerState');- expect(trialBannerStateSource).toContain('createSignal');- expect(trialBannerStateSource).toContain('createMemo');- expect(trialBannerStateSource).not.toContain('loadCommercialPosture');- expect(trialBannerStateSource).toContain('presentationPolicyHidesCommercialSurfaces');- expect(trialBannerStateSource).toContain('presentationPolicyHidesUpgradePrompts');- expect(trialBannerStateSource).toContain('isCommercialTrialActive');- expect(trialBannerStateSource).toContain('commercialTrialDaysRemaining');- expect(trialBannerStateSource).toContain('getUpgradeActionDestination');- expect(trialBannerStateSource).toContain('snoozeUpsell');-- expect(trialBannerModelSource).toContain('TRIAL_BANNER_SNOOZE_KEY');- expect(trialBannerModelSource).toContain('normalizeTrialBannerDaysRemaining');- expect(trialBannerModelSource).toContain('getTrialBannerToneClass');- expect(trialBannerModelSource).toContain('getTrialBannerStatusLabel');- expect(trialBannerModelSource).toContain('TRIAL_BANNER_UPGRADE_LABEL');- });-- it('renders trial details from shared commercial posture when active', async () => {- commercialPostureMock.mockReturnValue({- subscription_state: 'trial',- trial_days_remaining: 4.8,- });-- renderBanner();- expect(screen.getByRole('status')).toBeInTheDocument();- expect(screen.getByText('Pro Trial:')).toBeInTheDocument();- expect(screen.getByText('4 days remaining')).toBeInTheDocument();- expect(screen.getByText('Manage plan').closest('a')).toHaveAttribute(- 'href',- getPublicPricingUrl('trial_banner'),- );- });-- it('shows active fallback when trial days are unavailable', () => {- commercialPostureMock.mockReturnValue({- subscription_state: 'trial',- trial_days_remaining: undefined,- });-- renderBanner();-- expect(screen.getByText('Active')).toBeInTheDocument();- });-- it('stays hidden in demo mode even when the workspace is on trial', () => {- presentationPolicyHidesCommercialSurfacesMock.mockReturnValue(true);- commercialPostureMock.mockReturnValue({- subscription_state: 'trial',- trial_days_remaining: 2,- });-- renderBanner();-- expect(screen.queryByRole('status')).toBeNull();- });-- it('hides upgrade actions when self-hosted upgrade prompts are hidden', async () => {- presentationPolicyHidesUpgradePromptsMock.mockReturnValue(true);- commercialPostureMock.mockReturnValue({- subscription_state: 'trial',- trial_days_remaining: 2,- });-- renderBanner();-- expect(screen.getByRole('status')).toBeInTheDocument();- expect(screen.queryByText('Manage plan')).not.toBeInTheDocument();- expect(screen.queryByRole('button', { name: 'Snooze 7d' })).not.toBeInTheDocument();- });-- it('snoozes and hides the action row', async () => {- commercialPostureMock.mockReturnValue({- subscription_state: 'trial',- trial_days_remaining: 2,- });-- renderBanner();-- fireEvent.click(screen.getByRole('button', { name: 'Snooze 7d' }));-- expect(snoozeUpsellMock).toHaveBeenCalledWith(TRIAL_BANNER_SNOOZE_KEY);- await waitFor(() => {- expect(screen.queryByRole('button', { name: 'Snooze 7d' })).toBeNull();- });- });-});diff --git a/frontend-modern/src/components/shared/trialBannerModel.ts b/frontend-modern/src/components/shared/trialBannerModel.tsdeleted file mode 100644index 3c117f3c74..0000000000--- a/frontend-modern/src/components/shared/trialBannerModel.ts+++ /dev/null@@ -1,28 +0,0 @@-export const TRIAL_BANNER_SNOOZE_KEY = 'pulse_trial_banner_snoozed';-export const TRIAL_BANNER_UPGRADE_REASON = 'trial_banner';-export const TRIAL_BANNER_TITLE = 'Pro Trial:';-export const TRIAL_BANNER_ACTIVE_LABEL = 'Active';-export const TRIAL_BANNER_UPGRADE_LABEL = 'Manage plan';-export const TRIAL_BANNER_SNOOZE_LABEL = 'Snooze 7d';--export function normalizeTrialBannerDaysRemaining(raw: unknown): number | null {- if (typeof raw !== 'number' || !Number.isFinite(raw)) return null;- return Math.max(0, Math.floor(raw));-}--export function getTrialBannerToneClass(daysRemaining: number | null): string {- if (daysRemaining !== null && daysRemaining <= 1) {- return 'border-red-200 bg-red-50 text-red-900 dark:border-red-900 dark:bg-red-900 dark:text-red-100';- }-- if (daysRemaining !== null && daysRemaining <= 3) {- return 'border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900 dark:bg-amber-900 dark:text-amber-100';- }-- return 'border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900 dark:bg-blue-900 dark:text-blue-100';-}--export function getTrialBannerStatusLabel(daysRemaining: number | null): string {- if (daysRemaining === null) return TRIAL_BANNER_ACTIVE_LABEL;- return `${daysRemaining} days remaining`;-}diff --git a/frontend-modern/src/components/shared/useTrialBannerState.ts b/frontend-modern/src/components/shared/useTrialBannerState.tsdeleted file mode 100644index 9868ede369..0000000000--- a/frontend-modern/src/components/shared/useTrialBannerState.ts+++ /dev/null@@ -1,49 +0,0 @@-import { createMemo, createSignal } from 'solid-js';-import {- commercialTrialDaysRemaining,- getUpgradeActionDestination,- isCommercialTrialActive,-} from '@/stores/licenseCommercial';-import {- presentationPolicyHidesCommercialSurfaces,- presentationPolicyHidesUpgradePrompts,-} from '@/stores/sessionPresentationPolicy';-import { isUpsellSnoozed, snoozeUpsell } from '@/utils/snooze';-import {- getTrialBannerToneClass,- normalizeTrialBannerDaysRemaining,- TRIAL_BANNER_SNOOZE_KEY,- TRIAL_BANNER_UPGRADE_REASON,-} from './trialBannerModel';--export function useTrialBannerState() {- const [snoozed, setSnoozed] = createSignal(isUpsellSnoozed(TRIAL_BANNER_SNOOZE_KEY));-- const isTrial = createMemo(- () => !presentationPolicyHidesCommercialSurfaces() && isCommercialTrialActive(),- );- const daysRemaining = createMemo(() =>- normalizeTrialBannerDaysRemaining(commercialTrialDaysRemaining()),- );- const toneClass = createMemo(() => getTrialBannerToneClass(daysRemaining()));- const upgradeDestination = createMemo(() =>- getUpgradeActionDestination(TRIAL_BANNER_UPGRADE_REASON),- );-- const handleSnooze = () => {- snoozeUpsell(TRIAL_BANNER_SNOOZE_KEY);- setSnoozed(true);- };-- return {- daysRemaining,- handleSnooze,- isTrial,- showActions: () =>- !presentationPolicyHidesCommercialSurfaces() &&- !presentationPolicyHidesUpgradePrompts() &&- !snoozed(),- toneClass,- upgradeDestination,- };-}diff --git a/frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx b/frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsxindex 40a75a175f..439f983179 100644--- a/frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx+++ b/frontend-modern/src/features/patrol/PatrolIntelligenceHeader.tsx@@ -12,10 +12,6 @@ import { presentationPolicyHidesUpgradePrompts } from '@/stores/sessionPresentatimport { formatRelativeTime } from '@/utils/format';import { groupModelsByProvider } from '@/utils/patrolFormat';import { getPatrolPageHeaderMeta } from '@/utils/patrolPagePresentation';-import {- getAIQuickstartCreditsPresentation,- isPatrolQuickstartExhaustedReason,-} from '@/utils/aiQuickstartPresentation';import { buildPatrolScheduleOptions } from '@/utils/aiPatrolSchedulePresentation';import { getPatrolRuntimePresentation } from '@/utils/patrolRuntimePresentation';import { getPatrolRecencyPresentation } from '@/utils/patrolSummaryPresentation';@@ -24,12 +20,6 @@ import type { PatrolIntelligenceState } from './usePatrolIntelligenceState';export function PatrolIntelligenceHeader(props: { state: PatrolIntelligenceState }) {const state = props.state;const headerMeta = getPatrolPageHeaderMeta();- const quickstartPresentation = createMemo(() =>- getAIQuickstartCreditsPresentation(- state.patrolStatus()?.quickstart_credits_remaining ?? 0,- state.patrolStatus()?.quickstart_credits_total ?? 0,- ),- );const scheduleOptions = createMemo(() => buildPatrolScheduleOptions(state.patrolInterval()));const selectedScheduleLabel = createMemo(() =>@@ -46,14 +36,6 @@ export function PatrolIntelligenceHeader(props: { state: PatrolIntelligenceStatelastActivityAt: state.patrolStatus()?.last_activity_at,}),);- const showQuickstartStatus = createMemo(() => {- const patrolStatus = state.patrolStatus();- if (!patrolStatus) return false;- if (patrolStatus.using_quickstart) return true;- return (- state.runtimeState() === 'blocked' && isPatrolQuickstartExhaustedReason(state.blockedReason())- );- });const patrolModelStale = createMemo(() => {const model = state.patrolModel();const models = state.availableModels();@@ -144,21 +126,6 @@ export function PatrolIntelligenceHeader(props: { state: PatrolIntelligenceState<span class="text-sm font-medium text-base-content">{runtimePresentation().label}</span></div>- <Show when={showQuickstartStatus()}>- <div- class={`flex items-center gap-1.5 px-3 py-1.5 rounded-md border text-xs font-medium ${quickstartPresentation().className}`}- aria-label={quickstartPresentation().title}- title={quickstartPresentation().title}- >- <Show- when={(state.patrolStatus()?.quickstart_credits_remaining ?? 0) > 0}- fallback={<span>{quickstartPresentation().summary}</span>}- >- <span>{quickstartPresentation().summary}</span>- </Show>- </div>- </Show>-<div class="relative ml-auto" ref={state.setAdvancedSettingsRef}><buttononClick={() => state.setShowAdvancedSettings(!state.showAdvancedSettings())}diff --git a/frontend-modern/src/features/patrol/usePatrolIntelligenceState.ts b/frontend-modern/src/features/patrol/usePatrolIntelligenceState.tsindex 91ed6c34d8..0cd084eccb 100644--- a/frontend-modern/src/features/patrol/usePatrolIntelligenceState.ts+++ b/frontend-modern/src/features/patrol/usePatrolIntelligenceState.ts@@ -26,6 +26,7 @@ import { createNonSuspendingQuery } from '@/hooks/createNonSuspendingQuery';import { hasFeature, loadRuntimeCapabilities } from '@/stores/license';import type { AISettings } from '@/types/ai';import { getCanonicalScopeResourceIds } from '@/utils/patrolFormat';+import { normalizePatrolRuntimeBlockedReason } from '@/utils/patrolRuntimePresentation';import { buildPatrolInvestigationContextSummary } from './patrolInvestigationContextModel';type PatrolTab = 'findings' | 'history';@@ -331,7 +332,9 @@ export function usePatrolIntelligenceState() {if (!patrolEnabledLocal()) return 'disabled';return patrolStatus()?.runtime_state ?? 'active';});- const blockedReason = createMemo(() => patrolStatus()?.blocked_reason?.trim() ?? '');+ const blockedReason = createMemo(() =>+ normalizePatrolRuntimeBlockedReason(patrolStatus()?.blocked_reason),+ );const blockedAt = createMemo(() => patrolStatus()?.blocked_at);const showBlockedBanner = createMemo(() => runtimeState() === 'blocked');const canTriggerPatrol = createMemo(() => runtimeState() === 'active');diff --git a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsxindex 8dabd44ea6..c9cabfb63f 100644--- a/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx+++ b/frontend-modern/src/pages/__tests__/AIIntelligence.test.tsx@@ -105,7 +105,6 @@ const hasFeatureMock = vi.fn();const licenseStatusMock = vi.fn();const loadLicenseStatusMock = vi.fn();const loadCommercialPostureMock = vi.fn();-const startProTrialMock = vi.fn();const getUpgradeActionDestinationMock = vi.fn();const getUpgradeActionUrlOrFallbackMock = vi.fn();const trackPaywallViewedMock = vi.fn();@@ -141,13 +140,11 @@ vi.mock('@/stores/license', () => ({}));vi.mock('@/stores/licenseCommercial', () => ({- canStartCommercialTrial: () => licenseStatusMock()?.trial_eligible !== false,getUpgradeActionDestination: (...args: unknown[]) => getUpgradeActionDestinationMock(...args),commercialPosture: (...args: unknown[]) => licenseStatusMock(...args),licenseStatus: (...args: unknown[]) => licenseStatusMock(...args),loadCommercialPosture: (...args: unknown[]) => loadCommercialPostureMock(...args),loadRuntimeCapabilities: (...args: unknown[]) => loadLicenseStatusMock(...args),- startProTrial: (...args: unknown[]) => startProTrialMock(...args),getUpgradeActionUrlOrFallback: (...args: unknown[]) => getUpgradeActionUrlOrFallbackMock(...args),}));@@ -347,7 +344,6 @@ describe('AIIntelligence entitlement gating', () => {licenseStatusMock.mockReset();loadLicenseStatusMock.mockReset();loadCommercialPostureMock.mockReset();- startProTrialMock.mockReset();getUpgradeActionDestinationMock.mockReset();getUpgradeActionUrlOrFallbackMock.mockReset();trackPaywallViewedMock.mockReset();@@ -397,7 +393,6 @@ describe('AIIntelligence entitlement gating', () => {licenseStatusMock.mockReturnValue({ subscription_state: 'expired' });loadLicenseStatusMock.mockResolvedValue(undefined);loadCommercialPostureMock.mockResolvedValue(undefined);- startProTrialMock.mockResolvedValue({ outcome: 'started' });getUpgradeActionDestinationMock.mockImplementation((feature?: string) => ({href: getPublicPricingUrl(feature),external: true,@@ -741,7 +736,7 @@ describe('AIIntelligence entitlement gating', () => {expect(screen.queryByText('Patrol assessment')).not.toBeInTheDocument();});- it('does not present a healthy patrol summary when patrol is blocked on exhausted quickstart credits', async () => {+ it('does not present a healthy patrol summary when a retired hosted block reason is normalized', async () => {hasFeatureMock.mockReturnValue(true);licenseStatusMock.mockReturnValue({ subscription_state: 'active' });getPatrolStatusMock.mockResolvedValue(@@ -793,14 +788,14 @@ describe('AIIntelligence entitlement gating', () => {expect(screen.getAllByText('Patrol paused').length).toBeGreaterThan(0);expect(- screen.getAllByText(- 'Quickstart credits exhausted. Connect your API key to continue using Patrol.',- ).length,+ screen.getAllByText('Connect your own AI provider or local model to use Pulse Patrol.')+ .length,).toBeGreaterThan(0);+ expect(screen.queryByText(/Quickstart credits exhausted/i)).not.toBeInTheDocument();expect(screen.queryByText(/Health A · 100\/100/)).not.toBeInTheDocument();});- it('does not show the exhausted quickstart chip when patrol is active on a configured provider path', async () => {+ it('does not show retired hosted-credit chips when patrol is active on a configured provider path', async () => {hasFeatureMock.mockReturnValue(true);licenseStatusMock.mockReturnValue({ subscription_state: 'active' });getPatrolStatusMock.mockResolvedValue(@@ -851,7 +846,7 @@ describe('AIIntelligence entitlement gating', () => {expect(screen.getByText(/Health A · 100\/100/)).toBeInTheDocument();});- it('shows the activation-or-byok path from the server when quickstart is unavailable on an unactivated install', async () => {+ it('normalizes retired hosted availability copy on unactivated installs', async () => {hasFeatureMock.mockReturnValue(true);licenseStatusMock.mockReturnValue({ subscription_state: 'expired' });getPatrolStatusMock.mockResolvedValue(@@ -870,16 +865,16 @@ describe('AIIntelligence entitlement gating', () => {await waitFor(() => {expect(getPatrolStatusMock).toHaveBeenCalled();expect(- screen.getAllByText(- 'Connect your API key to use AI Patrol on this install. Hosted quickstart requires an activated entitlement.',- ).length,+ screen.getAllByText('Connect your own AI provider or local model to use Pulse Patrol.')+ .length,).toBeGreaterThan(0);});expect(screen.queryByText('Patrol quickstart exhausted')).not.toBeInTheDocument();+ expect(screen.queryByText(/Hosted quickstart requires/i)).not.toBeInTheDocument();});- it('shows the active Patrol quickstart chip only when runtime is actually using quickstart', async () => {+ it('does not surface hosted-credit chips even when legacy runtime fields are present', async () => {hasFeatureMock.mockReturnValue(true);licenseStatusMock.mockReturnValue({ subscription_state: 'active' });getPatrolStatusMock.mockResolvedValue(@@ -923,14 +918,11 @@ describe('AIIntelligence entitlement gating', () => {await waitFor(() => {expect(getPatrolStatusMock).toHaveBeenCalled();- expect(- screen.getByTitle(- '12 of 25 Patrol quickstart runs remaining on this activated Pulse Account install. No API key needed for initial Patrol quickstart.',- ),- ).toBeInTheDocument();+ expect(screen.getByText('Patrol enabled')).toBeInTheDocument();});- expect(screen.getByText('Patrol quickstart: 12/25 runs left')).toBeInTheDocument();+ expect(screen.queryByText(/Patrol quickstart/i)).not.toBeInTheDocument();+ expect(screen.queryByTitle(/No API key needed/i)).not.toBeInTheDocument();});it('surfaces coverage incomplete as the primary patrol assessment instead of no-issues copy', async () => {diff --git a/frontend-modern/src/stores/__tests__/license.test.ts b/frontend-modern/src/stores/__tests__/license.test.tsindex be2c945023..f46180ccfc 100644--- a/frontend-modern/src/stores/__tests__/license.test.ts+++ b/frontend-modern/src/stores/__tests__/license.test.ts@@ -34,7 +34,6 @@ import {legacyConnections,commercialPostureLoadError,loadCommercialPosture,- startProTrial,} from '@/stores/licenseCommercial';import {licenseEntitlements,@@ -339,129 +338,6 @@ describe('license stores', () => {expect(commercialPostureLoadError()?.message).toBe('Network timeout');});- it('startProTrial throws error if trial start fails', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({- ok: false,- status: 400,- headers: new Headers(),- json: vi.fn().mockResolvedValue({ code: 'trial_failed' }),- } as unknown as Response);-- await expect(startProTrial()).rejects.toThrow('Failed to start trial');- });-- it('startProTrial fails closed when commercial surfaces are hidden', async () => {- vi.mocked(presentationPolicyHidesCommercialSurfaces).mockReturnValue(true);-- await expect(startProTrial()).rejects.toMatchObject({- message: 'Trial activation unavailable under the current presentation policy',- status: 404,- code: 'presentation_policy_unavailable',- });- expect(LicenseAPI.startTrial).not.toHaveBeenCalled();- });-- it('startProTrial fails closed when upgrade prompts are hidden', async () => {- vi.mocked(presentationPolicyHidesUpgradePrompts).mockReturnValue(true);-- await expect(startProTrial()).rejects.toMatchObject({- message: 'Trial activation unavailable under the current presentation policy',- status: 404,- code: 'presentation_policy_unavailable',- });- expect(LicenseAPI.startTrial).not.toHaveBeenCalled();- });-- it('startProTrial preserves backend error details for trial-not-available responses', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({- ok: false,- status: 409,- headers: new Headers(),- json: vi.fn().mockResolvedValue({- code: 'trial_not_available',- error: 'Trial cannot be started while a paid v5 license migration is pending',- details: { org_id: 'default' },- }),- } as unknown as Response);-- await expect(startProTrial()).rejects.toMatchObject({- status: 409,- code: 'trial_not_available',- message: 'Trial cannot be started while a paid v5 license migration is pending',- details: { org_id: 'default' },- });- });-- it('startProTrial returns redirect action when hosted signup is required', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({- ok: false,- status: 409,- json: vi.fn().mockResolvedValue({- code: 'trial_signup_required',- details: { action_url: 'https://pulserelay.pro/pricing?intent=pro_trial' },- }),- } as unknown as Response);-- await expect(startProTrial()).resolves.toEqual({- outcome: 'redirect',- actionUrl: 'https://pulserelay.pro/pricing?intent=pro_trial',- });- });-- it('startProTrial parses Retry-After headers on rate-limited responses', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({- ok: false,- status: 429,- headers: new Headers({ 'Retry-After': '120' }),- json: vi.fn().mockResolvedValue({- code: 'trial_rate_limited',- error: 'Trial start rate limit exceeded',- details: { retry_after_seconds: '45' },- }),- } as unknown as Response);-- await expect(startProTrial()).rejects.toMatchObject({- status: 429,- code: 'trial_rate_limited',- message: 'Trial start rate limit exceeded',- retryAfterSeconds: 120,- details: { retry_after_seconds: '45' },- });- });-- it('startProTrial falls back to payload retry_after_seconds when headers are absent', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({- ok: false,- status: 429,- headers: new Headers(),- json: vi.fn().mockResolvedValue({- code: 'trial_rate_limited',- error: 'Trial start rate limit exceeded',- details: { retry_after_seconds: '75' },- }),- } as unknown as Response);-- await expect(startProTrial()).rejects.toMatchObject({- status: 429,- code: 'trial_rate_limited',- message: 'Trial start rate limit exceeded',- retryAfterSeconds: 75,- details: { retry_after_seconds: '75' },- });- });-- it('startProTrial refreshes commercial and runtime state when local activation succeeds', async () => {- vi.mocked(LicenseAPI.startTrial).mockResolvedValue({ ok: true } as Response);- vi.mocked(LicenseAPI.getCommercialPosture).mockResolvedValue(mockCommercialPosture);- vi.mocked(LicenseAPI.getCommercialEntitlements).mockResolvedValue(mockCommercialEntitlements);- vi.mocked(LicenseAPI.getRuntimeCapabilities).mockResolvedValue(mockRuntimeCapabilities);-- await expect(startProTrial()).resolves.toEqual({ outcome: 'activated' });- expect(LicenseAPI.getCommercialPosture).toHaveBeenCalled();- expect(LicenseAPI.getCommercialEntitlements).toHaveBeenCalled();- expect(LicenseAPI.getRuntimeCapabilities).toHaveBeenCalled();- });-it('returns true for pro tier', async () => {vi.mocked(LicenseAPI.getCommercialPosture).mockResolvedValue(mockCommercialPosture);await loadCommercialPosture(true);diff --git a/frontend-modern/src/stores/__tests__/systemSettings.test.ts b/frontend-modern/src/stores/__tests__/systemSettings.test.tsindex 3645e1b35d..ca46097e7d 100644--- a/frontend-modern/src/stores/__tests__/systemSettings.test.ts+++ b/frontend-modern/src/stores/__tests__/systemSettings.test.ts@@ -76,11 +76,11 @@ describe('systemSettings store', () => {expect(privacyDoc).toContain('Reset ID');});- it('documents hosted quickstart transport and resource-policy redaction in the privacy doc', () => {+ it('documents self-hosted AI provider transport and resource-policy redaction in the privacy doc', () => {const privacyDoc = readFileSync(path.join(repoRoot, 'docs', 'PRIVACY.md'), 'utf8');- expect(privacyDoc).toContain('requests transit Pulse infrastructure');- expect(privacyDoc).toContain('resource-policy redaction is applied before the Quickstart request');- expect(privacyDoc).toContain('To keep prompts off Pulse infrastructure entirely, use a BYOK provider');+ expect(privacyDoc).toContain('AI prompts from self-managed installs do not transit Pulse infrastructure');+ expect(privacyDoc).toContain('governed resource details use the same resource-policy redaction');+ expect(privacyDoc).toContain('Local providers stay on your network');});});diff --git a/frontend-modern/src/stores/licenseCommercial.ts b/frontend-modern/src/stores/licenseCommercial.tsindex 1a70503d34..f9556959c5 100644--- a/frontend-modern/src/stores/licenseCommercial.ts+++ b/frontend-modern/src/stores/licenseCommercial.ts@@ -11,11 +11,8 @@ import {isSelfHostedPurchaseStartDestination,} from '@/utils/pricingHandoff';import { resolveUpgradeDestination, type UpgradeDestination } from '@/utils/upgradeNavigation';-import { loadRuntimeCapabilities } from '@/stores/license';-import { loadLicenseEntitlements } from '@/stores/licenseEntitlements';import {presentationPolicyHidesCommercialSurfaces,- presentationPolicyHidesUpgradePrompts,sessionPresentationPolicyResolved,} from '@/stores/sessionPresentationPolicy';@@ -40,42 +37,8 @@ const [loaded, setLoaded] = createSignal(false);const [loadError, setLoadError] = createSignal<Error | null>(null);let inFlightCommercialPostureLoad: Promise<void> | null = null;-type TrialStartErrorPayload = {- error?: string;- code?: string;- details?: Record<string, string>;-};--type TrialStartRequestError = Error & {- status: number;- code?: string;- details?: Record<string, string>;- retryAfterSeconds?: number;-};--export type StartProTrialResult =- | { outcome: 'activated' }- | { outcome: 'redirect'; actionUrl: string };--function parseRetryAfterSeconds(value: string | null | undefined): number | undefined {- const normalized = value?.trim();- if (!normalized) return undefined;-- const parsed = Number(normalized);- if (Number.isFinite(parsed) && parsed > 0) {- return Math.ceil(parsed);- }-- const retryAt = Date.parse(normalized);- if (Number.isNaN(retryAt)) return undefined;-- const waitMs = retryAt - Date.now();- if (waitMs <= 0) return 1;- return Math.ceil(waitMs / 1000);-}-/**- * Load the commercial posture payload used by non-billing trial and upgrade UI.+ * Load the commercial posture payload used by non-billing upgrade and activation UI.* Initial bootstrap belongs to the authenticated app shell or first-run setup,* not to feature-local hooks.*/@@ -136,60 +99,6 @@ export async function loadCommercialPosture(force = false): Promise<void> {}}-/**- * Start the explicit hosted trial handoff for the current org, then refresh runtime and commercial state.- */-export async function startProTrial(): Promise<StartProTrialResult> {- if (- !sessionPresentationPolicyResolved() ||- presentationPolicyHidesCommercialSurfaces() ||- presentationPolicyHidesUpgradePrompts()- ) {- const err = new Error(- 'Trial activation unavailable under the current presentation policy',- ) as TrialStartRequestError;- err.status = 404;- err.code = 'presentation_policy_unavailable';- throw err;- }-- const res = await LicenseAPI.startTrial();- if (!res.ok) {- let payload: TrialStartErrorPayload | null = null;- try {- payload = (await res.json()) as TrialStartErrorPayload;- } catch {- payload = null;- }-- if (res.status === 409 && payload?.code === 'trial_signup_required') {- const actionUrl =- payload.details?.action_url ||- getFirstUpgradeActionUrl() ||- getUpgradeActionUrlOrFallback('relay');- return { outcome: 'redirect', actionUrl };- }-- const err = new Error(- payload?.error?.trim() || `Failed to start trial (status ${res.status})`,- ) as TrialStartRequestError;- const retryAfterSeconds =- parseRetryAfterSeconds(res.headers.get('Retry-After')) ??- parseRetryAfterSeconds(payload?.details?.retry_after_seconds);- err.status = res.status;- err.code = payload?.code;- err.details = payload?.details;- err.retryAfterSeconds = retryAfterSeconds;- throw err;- }- await Promise.all([- loadCommercialPosture(true),- loadRuntimeCapabilities(true),- loadLicenseEntitlements(true),- ]);- return { outcome: 'activated' };-}-const PRO_TIERS = new Set(['pro','pro_annual',@@ -211,38 +120,6 @@ export const isPro = createRoot(() =>}),);-/**- * Used by explicit commercial surfaces that can render a trial CTA unless the- * presentation policy or current posture denies trial eligibility.- */-export function canOfferCommercialTrial(): boolean {- if (presentationPolicyHidesUpgradePrompts()) return false;- return commercialPostureState()?.trial_eligible !== false;-}--/**- * Used by explicit commercial surfaces that should only offer trial start when- * the current commercial posture is loaded and not already active or trialing.- */-export function canStartCommercialTrial(): boolean {- if (presentationPolicyHidesUpgradePrompts()) return false;- const current = commercialPostureState();- if (!current) return false;- if (current.subscription_state === 'active' || current.subscription_state === 'trial') {- return false;- }- return current.trial_eligible !== false;-}--export function isCommercialTrialActive(): boolean {- return commercialPostureState()?.subscription_state === 'trial';-}--export function commercialTrialDaysRemaining(): number | null {- const current = commercialPostureState()?.trial_days_remaining;- return typeof current === 'number' && Number.isFinite(current) ? current : null;-}-export function commercialOverflowDaysRemaining(): number | null {const current = commercialPostureState()?.overflow_days_remaining;return typeof current === 'number' && Number.isFinite(current) ? current : null;diff --git a/frontend-modern/src/utils/__tests__/aiQuickstartPresentation.test.ts b/frontend-modern/src/utils/__tests__/aiQuickstartPresentation.test.tsdeleted file mode 100644index d0bd98958c..0000000000--- a/frontend-modern/src/utils/__tests__/aiQuickstartPresentation.test.ts+++ /dev/null@@ -1,24 +0,0 @@-import { describe, expect, it } from 'vitest';-import { getAIQuickstartCreditsPresentation } from '@/utils/aiQuickstartPresentation';--describe('getAIQuickstartCreditsPresentation', () => {- it('returns active quickstart credit presentation', () => {- expect(getAIQuickstartCreditsPresentation(3, 10)).toEqual({- className:- 'bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300',- summary: 'Patrol quickstart: 3/10 runs left',- title:- '3 of 10 Patrol quickstart runs remaining on this activated Pulse Account install. No API key needed for initial Patrol quickstart.',- });- });-- it('returns exhausted quickstart presentation', () => {- expect(getAIQuickstartCreditsPresentation(0, 10)).toEqual({- className:- 'bg-amber-50 dark:bg-amber-950 border-amber-200 dark:border-amber-800 text-amber-700 dark:text-amber-300',- summary: 'Patrol quickstart exhausted',- title:- 'Patrol quickstart on this activated Pulse Account install is exhausted. Connect your API key to continue using Patrol.',- });- });-});diff --git a/frontend-modern/src/utils/__tests__/aiSettingsPresentation.test.ts b/frontend-modern/src/utils/__tests__/aiSettingsPresentation.test.tsindex 54bcfd2eb4..dee2c7afec 100644--- a/frontend-modern/src/utils/__tests__/aiSettingsPresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/aiSettingsPresentation.test.ts@@ -43,19 +43,12 @@ describe('aiSettingsPresentation', () => {expect(getAISettingsWorkloadDiscoverySummary()).toEqual({text: 'Workload discovery gives Pulse Assistant and Patrol concrete service context, so chat responses and verification findings can reference real services and commands instead of generic advice.',});- expect(getAISettingsSetupDialogPresentation('provider')).toEqual({+ expect(getAISettingsSetupDialogPresentation()).toEqual({ariaLabel: 'Set up Assistant and Patrol',title: 'Set Up Assistant & Patrol',description: 'Connect a provider to power Pulse Assistant and Patrol.',submitLabel: 'Enable Assistant & Patrol',});- expect(getAISettingsSetupDialogPresentation('activation-or-provider')).toEqual({- ariaLabel: 'Activate quickstart or connect a provider',- title: 'Activate quickstart or connect a provider',- description:- 'Use an eligible hosted quickstart entitlement, or connect your own provider for Pulse Assistant and Patrol.',- submitLabel: 'Enable Assistant & Patrol',- });});it('returns the canonical provider-backed ready presentation', () => {@@ -64,10 +57,6 @@ describe('aiSettingsPresentation', () => {configured: true,providerCount: 2,modelCount: 5,- quickstartCreditsAvailable: false,- quickstartCreditsRemaining: 0,- quickstartCreditsTotal: 0,- quickstartBlockedReason: '',}),).toEqual({containerClassName: 'bg-green-50 dark:bg-green-900 text-green-800 dark:text-green-200',@@ -76,54 +65,12 @@ describe('aiSettingsPresentation', () => {});});- it('returns the canonical quickstart-ready presentation', () => {- expect(- getAISettingsReadinessPresentation({- configured: false,- providerCount: 0,- modelCount: 0,- quickstartCreditsAvailable: true,- quickstartCreditsRemaining: 25,- quickstartCreditsTotal: 25,- quickstartBlockedReason: '',- }),- ).toEqual({- containerClassName: 'bg-blue-50 dark:bg-blue-900 text-blue-800 dark:text-blue-200',- dotClassName: 'bg-blue-400',- summary: 'Patrol quickstart ready • 25/25 runs left • no API key needed yet',- });- });-- it('returns the canonical activation-required presentation', () => {- expect(- getAISettingsReadinessPresentation({- configured: false,- providerCount: 0,- modelCount: 0,- quickstartCreditsAvailable: false,- quickstartCreditsRemaining: 0,- quickstartCreditsTotal: 0,- quickstartBlockedReason:- 'Connect your API key to use AI Patrol on this install. Hosted quickstart requires an activated entitlement.',- }),- ).toEqual({- containerClassName: 'bg-amber-50 dark:bg-amber-900 text-amber-800 dark:text-amber-200',- dotClassName: 'bg-amber-400',- summary:- 'Connect your API key to use AI Patrol on this install. Hosted quickstart requires an activated entitlement.',- });- });-it('returns the canonical not-configured presentation', () => {expect(getAISettingsReadinessPresentation({configured: false,providerCount: 0,modelCount: 0,- quickstartCreditsAvailable: false,- quickstartCreditsRemaining: 0,- quickstartCreditsTotal: 0,- quickstartBlockedReason: '',}),).toEqual({containerClassName: 'bg-amber-50 dark:bg-amber-900 text-amber-800 dark:text-amber-200',diff --git a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.tsindex 6e5e1e553b..a4de64b610 100644--- a/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts+++ b/frontend-modern/src/utils/__tests__/frontendResourceTypeBoundaries.test.ts@@ -54,8 +54,6 @@ import searchTipsPopoverSource from '@/components/shared/SearchTipsPopover.tsx?rimport searchTipsPopoverModelSource from '@/components/shared/searchTipsPopoverModel.ts?raw';import tooltipSource from '@/components/shared/Tooltip.tsx?raw';import tooltipModelSource from '@/components/shared/tooltipModel.ts?raw';-import trialBannerSource from '@/components/shared/TrialBanner.tsx?raw';-import trialBannerModelSource from '@/components/shared/trialBannerModel.ts?raw';import upgradeLinkSource from '@/components/shared/UpgradeLink.tsx?raw';import monitoredSystemLimitWarningBannerSource from '@/components/shared/MonitoredSystemLimitWarningBanner.tsx?raw';import monitoredSystemLimitWarningBannerModelSource from '@/components/shared/monitoredSystemLimitWarningBannerModel.ts?raw';@@ -90,7 +88,6 @@ import statusBadgeStateSource from '@/components/shared/useStatusBadgeState.ts?rimport toggleStateSource from '@/components/shared/useToggleState.ts?raw';import searchTipsPopoverStateSource from '@/components/shared/useSearchTipsPopoverState.ts?raw';import tooltipStateSource from '@/components/shared/useTooltipState.ts?raw';-import trialBannerStateSource from '@/components/shared/useTrialBannerState.ts?raw';import upgradeNavigationHookSource from '@/components/shared/useUpgradeNavigation.ts?raw';import interactiveSparklineStateSource from '@/components/shared/useInteractiveSparklineState.ts?raw';import monitoredSystemLimitWarningBannerStateSource from '@/components/shared/useMonitoredSystemLimitWarningBannerState.ts?raw';@@ -587,7 +584,6 @@ import patrolIntelligenceSurfaceSource from '@/features/patrol/PatrolIntelligencimport patrolInvestigationContextModelSource from '@/features/patrol/patrolInvestigationContextModel.ts?raw';import patrolIntelligenceStateSource from '@/features/patrol/usePatrolIntelligenceState.ts?raw';import patrolIntelligenceWorkspaceSource from '@/features/patrol/PatrolIntelligenceWorkspace.tsx?raw';-import aiQuickstartPresentationSource from '@/utils/aiQuickstartPresentation.ts?raw';import aiCostPresentationSource from '@/utils/aiCostPresentation.ts?raw';import thresholdSliderPresentationSource from '@/utils/thresholdSliderPresentation.ts?raw';import emptyStatePresentationSource from '@/utils/emptyStatePresentation.ts?raw';@@ -1502,8 +1498,8 @@ describe('frontend resource type boundaries', () => {expect(auditWebhookPanelSource).toContain('@/utils/upgradePresentation');expect(ssoProvidersPanelSource).toContain('@/utils/upgradePresentation');expect(upgradePresentationSource).toContain('export const UPGRADE_ACTION_LABEL');- expect(upgradePresentationSource).toContain('export const UPGRADE_TRIAL_LABEL');- expect(upgradePresentationSource).toContain('export const UPGRADE_TRIAL_LINK_CLASS');+ expect(upgradePresentationSource).not.toContain('UPGRADE_TRIAL_LABEL');+ expect(upgradePresentationSource).not.toContain('UPGRADE_TRIAL_LINK_CLASS');expect(upgradePresentationSource).toContain('export function getUpgradeActionButtonClass');expect(organizationAccessManagementSectionSource).toContain('@/utils/organizationRolePresentation',@@ -2815,26 +2811,6 @@ describe('frontend resource type boundaries', () => {expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverPositionClass');expect(searchTipsPopoverModelSource).toContain('getSearchTipsPopoverTriggerVariant');expect(searchTipsPopoverModelSource).toContain('shouldSearchTipsPopoverOpenOnHover');- expect(trialBannerSource).toContain('useTrialBannerState');- expect(trialBannerSource).toContain('TRIAL_BANNER_TITLE');- expect(trialBannerSource).not.toContain('createSignal');- expect(trialBannerSource).not.toContain('createMemo');- expect(trialBannerSource).not.toContain('loadRuntimeCapabilities');- expect(trialBannerSource).not.toContain('licenseStatus');- expect(trialBannerSource).not.toContain('getUpgradeActionUrlOrFallback');- expect(trialBannerStateSource).toContain('createSignal');- expect(trialBannerStateSource).toContain('createMemo');- expect(trialBannerStateSource).not.toContain('loadCommercialPosture');- expect(trialBannerStateSource).toContain('isCommercialTrialActive');- expect(trialBannerStateSource).toContain('commercialTrialDaysRemaining');- expect(trialBannerStateSource).toContain('presentationPolicyHidesCommercialSurfaces');- expect(trialBannerStateSource).toContain('getUpgradeActionDestination');- expect(trialBannerStateSource).toContain('snoozeUpsell');- expect(trialBannerModelSource).toContain('TRIAL_BANNER_SNOOZE_KEY');- expect(trialBannerModelSource).toContain('normalizeTrialBannerDaysRemaining');- expect(trialBannerModelSource).toContain('getTrialBannerToneClass');- expect(trialBannerModelSource).toContain('getTrialBannerStatusLabel');- expect(trialBannerModelSource).toContain('TRIAL_BANNER_UPGRADE_LABEL');expect(upgradeLinkSource).toContain('destination.external');expect(upgradeLinkSource).not.toContain('window.open');expect(upgradeLinkSource).not.toContain('useNavigate(');@@ -4394,7 +4370,9 @@ describe('frontend resource type boundaries', () => {);expect(patrolInvestigationContextModelSource).toContain('policy-covered resource');expect(patrolIntelligenceHeaderSource).toContain('buildPatrolScheduleOptions');- expect(patrolIntelligenceHeaderSource).toContain('getAIQuickstartCreditsPresentation');+ expect(patrolIntelligenceHeaderSource).not.toContain('getAIQuickstartCreditsPresentation');+ expect(patrolIntelligenceHeaderSource).not.toContain('quickstart_credits');+ expect(patrolIntelligenceHeaderSource).not.toContain('using_quickstart');expect(patrolIntelligenceSummarySource).toContain('getPatrolSummaryPresentation');expect(patrolIntelligenceSummarySource).toContain('getPatrolAssessmentPresentation');expect(patrolIntelligenceWorkspaceSource).toContain('ApprovalBanner');@@ -4415,9 +4393,6 @@ describe('frontend resource type boundaries', () => {expect(patrolIntelligenceSurfaceSource).not.toContain("(patrolStatus()?.quickstart_credits_remaining ?? 0) > 0\n ? 'bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300'",);- expect(aiQuickstartPresentationSource).toContain(- 'export function getAIQuickstartCreditsPresentation',- );expect(investigationMessagesSource).toContain('getInvestigationMessagesState');expect(investigationMessagesSource).not.toContain('Loading messages...');expect(investigationMessagesSource).not.toContain('No investigation messages available.');diff --git a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.tsindex 06c641c9e6..0e95ef9d95 100644--- a/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/patrolEmptyStatePresentation.test.ts@@ -91,7 +91,7 @@ describe('patrolEmptyStatePresentation', () => {});});- it('returns the patrol runtime explanation when the runtime is blocked', () => {+ it('normalizes retired hosted runtime explanations when the runtime is blocked', () => {expect(getPatrolFindingsEmptyState({filter: 'active',@@ -100,7 +100,7 @@ describe('patrolEmptyStatePresentation', () => {}),).toEqual({title: 'Patrol paused',- body: 'Quickstart credits exhausted. Connect your API key to continue using Patrol.',+ body: 'Connect your own AI provider or local model to use Pulse Patrol.',tone: 'warning',});});diff --git a/frontend-modern/src/utils/__tests__/quickstartCopyContract.test.ts b/frontend-modern/src/utils/__tests__/quickstartCopyContract.test.tsindex fb47188704..e91a593211 100644--- a/frontend-modern/src/utils/__tests__/quickstartCopyContract.test.ts+++ b/frontend-modern/src/utils/__tests__/quickstartCopyContract.test.ts@@ -7,48 +7,25 @@ const repoRoot = resolve(dirname(fileURLToPath(import.meta.url)), '../../../../'const readRepoFile = (relativePath: string) => readFileSync(resolve(repoRoot, relativePath), 'utf-8');describe('quickstart copy contract', () => {- it('removes anonymous Community quickstart claims from public docs', () => {+ it('keeps self-hosted public docs free of hosted quickstart claims', () => {const readme = readRepoFile('README.md');const pulsePro = readRepoFile('docs/PULSE_PRO.md');- const pricingSpec = readRepoFile('docs/architecture/v6-pricing-and-tiering.md');-- expect(readme).not.toContain('every new workspace gets 25 Patrol quickstart runs');- expect(readme).not.toContain('every new workspace gets 25 Patrol runs');- expect(pulsePro).not.toContain('new workspaces get 25 Patrol quickstart runs');- expect(pulsePro).not.toContain('Patrol quickstart for new workspaces: 25 Patrol runs with no API key.');- expect(pricingSpec).not.toContain('Every new workspace gets 25');- });-- it('describes quickstart as activation-gated Patrol-only support', () => {- const readme = readRepoFile('README.md');- const pulsePro = readRepoFile('docs/PULSE_PRO.md');- const pricingSpec = readRepoFile('docs/architecture/v6-pricing-and-tiering.md');-- expect(readme).toContain(- 'optional managed quickstart runs are available only after explicit Pulse Account activation',- );- expect(readme).toContain('if you explicitly activate through Pulse Account, Pulse can use 25');- expect(pulsePro).toContain(- 'Optional Patrol quickstart after explicit Pulse Account activation: 25 Patrol runs with no API key on a server-verified install.',- );- expect(pricingSpec).toMatch(- /optional Patrol-only quickstart allowance after explicit Pulse Account\s+activation/,- );- expect(pricingSpec).toMatch(/it is not a general\s+hosted chat entitlement/);- });-- it('keeps hosted quickstart privacy copy aligned with resource-policy redaction', () => {+ const ai = readRepoFile('docs/AI.md');const privacy = readRepoFile('docs/PRIVACY.md');const publicPrivacy = readRepoFile('frontend-modern/public/docs/PRIVACY.md');+ const pricingSpec = readRepoFile('docs/architecture/v6-pricing-and-tiering.md');const aiSettingsDialog = readRepoFile('frontend-modern/src/components/Settings/AISettingsDialogs.tsx',);- for (const copy of [privacy, publicPrivacy]) {- expect(copy).toContain('resource-policy redaction is applied before the Quickstart request');- expect(copy).toContain('requests transit Pulse infrastructure');- expect(copy).toContain('To keep prompts off Pulse infrastructure entirely, use a BYOK provider');+ for (const copy of [readme, pulsePro, ai, privacy, publicPrivacy, pricingSpec, aiSettingsDialog]) {+ expect(copy).not.toMatch(/quickstart/i);+ expect(copy).not.toContain('quickstart:pulse-hosted');+ expect(copy).not.toMatch(/hosted AI/i);+ expect(copy).not.toMatch(/hosted model/i);+ expect(copy).not.toMatch(/hosted[\s\S]{0,120}no API key/i);+ expect(copy).not.toMatch(/Pulse-hosted[\s\S]{0,120}no API key/i);+ expect(copy).not.toMatch(/Pulse Account[\s\S]{0,120}no API key/i);}- expect(aiSettingsDialog).toContain('Hosted quickstart routes policy-redacted prompts');});});diff --git a/frontend-modern/src/utils/__tests__/trialStartAction.test.ts b/frontend-modern/src/utils/__tests__/trialStartAction.test.tsdeleted file mode 100644index a69d85c6b3..0000000000--- a/frontend-modern/src/utils/__tests__/trialStartAction.test.ts+++ /dev/null@@ -1,121 +0,0 @@-import { beforeEach, describe, expect, it, vi } from 'vitest';--const startProTrialMock = vi.hoisted(() => vi.fn());--vi.mock('@/stores/licenseCommercial', () => ({- startProTrial: (...args: unknown[]) => startProTrialMock(...args),-}));--import { runStartProTrialAction } from '@/utils/trialStartAction';--describe('runStartProTrialAction', () => {- const showSuccess = vi.fn();- const showError = vi.fn();- const navigate = vi.fn();-- beforeEach(() => {- startProTrialMock.mockReset();- showSuccess.mockReset();- showError.mockReset();- navigate.mockReset();- });-- it('reports activation success through the shared success message path', async () => {- startProTrialMock.mockResolvedValue({ outcome: 'activated' });-- await expect(- runStartProTrialAction({- showSuccess,- showError,- navigate,- }),- ).resolves.toBe('activated');-- expect(showSuccess).toHaveBeenCalledWith('Pro trial started');- expect(showError).not.toHaveBeenCalled();- expect(navigate).not.toHaveBeenCalled();- });-- it('navigates through the hosted handoff when the backend requires signup', async () => {- startProTrialMock.mockResolvedValue({- outcome: 'redirect',- actionUrl: 'https://cloud.pulserelay.pro/start-pro-trial',- });-- await expect(- runStartProTrialAction({- showSuccess,- showError,- navigate,- }),- ).resolves.toBe('redirect');-- expect(navigate).toHaveBeenCalledWith('https://cloud.pulserelay.pro/start-pro-trial');- expect(showSuccess).not.toHaveBeenCalled();- expect(showError).not.toHaveBeenCalled();- });-- it('preserves canonical denial messages instead of collapsing conflicts locally', async () => {- startProTrialMock.mockRejectedValue({- status: 409,- code: 'trial_not_available',- message: 'Trial cannot be started while a paid v5 license migration is pending',- });-- await expect(- runStartProTrialAction({- showSuccess,- showError,- navigate,- }),- ).resolves.toBe('error');-- expect(showError).toHaveBeenCalledWith(- 'Trial cannot be started while a paid v5 license migration is pending',- );- expect(showSuccess).not.toHaveBeenCalled();- expect(navigate).not.toHaveBeenCalled();- });-- it('invokes the optional error hook with the raw backend error payload', async () => {- const onError = vi.fn();- const error = {- status: 409,- code: 'trial_already_used',- message: 'Trial already used',- };- startProTrialMock.mockRejectedValue(error);-- await expect(- runStartProTrialAction({- showSuccess,- showError,- navigate,- onError,- }),- ).resolves.toBe('error');-- expect(onError).toHaveBeenCalledWith(error);- expect(showError).toHaveBeenCalledWith('Trial already used');- });-- it('surfaces retry-after guidance from the shared presentation helper', async () => {- startProTrialMock.mockRejectedValue({- status: 429,- code: 'trial_rate_limited',- message: 'Trial start rate limit exceeded',- retryAfterSeconds: 120,- });-- await expect(- runStartProTrialAction({- showSuccess,- showError,- navigate,- }),- ).resolves.toBe('error');-- expect(showError).toHaveBeenCalledWith('Try again in about 2 minutes');- expect(showSuccess).not.toHaveBeenCalled();- });-});diff --git a/frontend-modern/src/utils/__tests__/upgradePresentation.test.ts b/frontend-modern/src/utils/__tests__/upgradePresentation.test.tsindex 6d222c7849..d560758845 100644--- a/frontend-modern/src/utils/__tests__/upgradePresentation.test.ts+++ b/frontend-modern/src/utils/__tests__/upgradePresentation.test.ts@@ -1,56 +1,12 @@import { describe, expect, it } from 'vitest';import {- getTrialStartErrorKind,- getProTrialStartedMessage,- getTrialAlreadyUsedMessage,- getTrialStartErrorMessage,- normalizeTrialStartError,- getTrialTryAgainLaterMessage,getUpgradeActionButtonClass,UPGRADE_ACTION_LABEL,- UPGRADE_TRIAL_LABEL,- UPGRADE_TRIAL_LINK_CLASS,} from '@/utils/upgradePresentation';describe('upgradePresentation', () => {it('returns canonical upgrade labels', () => {expect(UPGRADE_ACTION_LABEL).toBe('View plans');- expect(UPGRADE_TRIAL_LABEL).toBe('Start trial');- expect(UPGRADE_TRIAL_LINK_CLASS).toContain('text-indigo-500');- });-- it('returns canonical trial start messages', () => {- expect(getProTrialStartedMessage()).toBe('Pro trial started');- expect(getTrialAlreadyUsedMessage()).toBe('Trial already used');- expect(getTrialTryAgainLaterMessage()).toBe('Try again later');- expect(getTrialTryAgainLaterMessage(30)).toBe('Try again in about a minute');- expect(getTrialTryAgainLaterMessage(90)).toBe('Try again in about 2 minutes');- expect(getTrialTryAgainLaterMessage(3600)).toBe('Try again in about 1 hour');- expect(getTrialStartErrorMessage()).toBe('Failed to start trial');- expect(getTrialStartErrorMessage(undefined, { branded: true })).toBe(- 'Failed to start Pro trial',- );- expect(getTrialStartErrorMessage('temporary failure')).toBe('temporary failure');- expect(getTrialStartErrorMessage({ code: 'trial_already_used' })).toBe('Trial already used');- expect(getTrialStartErrorMessage({ status: 429 })).toBe('Try again later');- expect(getTrialStartErrorMessage({ status: 429, retryAfterSeconds: 120 })).toBe(- 'Try again in about 2 minutes',- );- expect(getTrialStartErrorKind({ code: 'trial_already_used' })).toBe('already_used');- expect(getTrialStartErrorKind({ status: 429 })).toBe('retry_later');- expect(getTrialStartErrorKind({ message: 'temporary failure' })).toBe('other');- expect(normalizeTrialStartError({ status: 409, code: 'trial_not_available' })).toEqual({- status: 409,- code: 'trial_not_available',- message: undefined,- retryAfterSeconds: undefined,- });- expect(- getTrialStartErrorMessage({- code: 'trial_not_available',- message: 'Trial cannot be started while migration is pending',- }),- ).toBe('Trial cannot be started while migration is pending');});it('returns the primary upgrade action button classes by default', () => {diff --git a/frontend-modern/src/utils/aiQuickstartContract.ts b/frontend-modern/src/utils/aiQuickstartContract.tsdeleted file mode 100644index 0c65b8bbf7..0000000000--- a/frontend-modern/src/utils/aiQuickstartContract.ts+++ /dev/null@@ -1,24 +0,0 @@-export const AI_QUICKSTART_EXHAUSTED_REASON =- 'Quickstart credits exhausted. Connect your API key to continue using Patrol.';--export const AI_QUICKSTART_ACTIVATION_REQUIRED_REASON =- 'Connect your API key to use AI Patrol on this install. Hosted quickstart requires an activated entitlement.';--export const AI_QUICKSTART_UNAVAILABLE_REASON =- 'Quickstart credits require internet access. Connect your API key to use Patrol offline.';--export function normalizeQuickstartReason(reason?: string | null): string {- return (reason ?? '').trim();-}--export function isQuickstartActivationRequiredReason(reason?: string | null): boolean {- return normalizeQuickstartReason(reason) === AI_QUICKSTART_ACTIVATION_REQUIRED_REASON;-}--export function isQuickstartExhaustedReason(reason?: string | null): boolean {- return normalizeQuickstartReason(reason) === AI_QUICKSTART_EXHAUSTED_REASON;-}--export function isQuickstartUnavailableReason(reason?: string | null): boolean {- return normalizeQuickstartReason(reason) === AI_QUICKSTART_UNAVAILABLE_REASON;-}diff --git a/frontend-modern/src/utils/aiQuickstartPresentation.ts b/frontend-modern/src/utils/aiQuickstartPresentation.tsdeleted file mode 100644index 5cd912bbad..0000000000--- a/frontend-modern/src/utils/aiQuickstartPresentation.ts+++ /dev/null@@ -1,34 +0,0 @@-export interface AIQuickstartCreditsPresentation {- className: string;- summary: string;- title: string;-}--export const PATROL_QUICKSTART_EXHAUSTED_REASON =- 'Quickstart credits exhausted. Connect your API key to continue using Patrol.';--export function isPatrolQuickstartExhaustedReason(reason?: string | null): boolean {- return reason?.trim() === PATROL_QUICKSTART_EXHAUSTED_REASON;-}--export function getAIQuickstartCreditsPresentation(- remaining: number,- total: number,-): AIQuickstartCreditsPresentation {- if (remaining > 0) {- return {- className:- 'bg-blue-50 dark:bg-blue-950 border-blue-200 dark:border-blue-800 text-blue-700 dark:text-blue-300',- summary: `Patrol quickstart: ${remaining}/${total} runs left`,- title: `${remaining} of ${total} Patrol quickstart runs remaining on this activated Pulse Account install. No API key needed for initial Patrol quickstart.`,- };- }-- return {- className:- 'bg-amber-50 dark:bg-amber-950 border-amber-200 dark:border-amber-800 text-amber-700 dark:text-amber-300',- summary: 'Patrol quickstart exhausted',- title:- 'Patrol quickstart on this activated Pulse Account install is exhausted. Connect your API key to continue using Patrol.',- };-}diff --git a/frontend-modern/src/utils/aiSettingsPresentation.ts b/frontend-modern/src/utils/aiSettingsPresentation.tsindex 3c814749e3..15bc1c07c2 100644--- a/frontend-modern/src/utils/aiSettingsPresentation.ts+++ b/frontend-modern/src/utils/aiSettingsPresentation.ts@@ -8,10 +8,6 @@ export interface AISettingsReadinessInput {configured: boolean;providerCount: number;modelCount: number;- quickstartCreditsAvailable: boolean;- quickstartCreditsRemaining: number;- quickstartCreditsTotal: number;- quickstartBlockedReason: string;}const AI_OAUTH_ERROR_MESSAGES: Record<string, string> = {@@ -33,8 +29,6 @@ export const AI_SETTINGS_LOAD_FAILURE_MESSAGE ='Unable to load Assistant & Patrol settings. Your configuration could not be retrieved.';export const AI_SETTINGS_LOAD_RETRY_LABEL = 'Retry';-export type AISettingsSetupMode = 'provider' | 'activation-or-provider' | 'provider-required';-export interface AISettingsSetupDialogPresentation {ariaLabel: string;description: string;@@ -60,56 +54,19 @@ export function getAISettingsWorkloadDiscoverySummary() {} as const;}-export function getAISettingsSetupDialogPresentation(- mode: AISettingsSetupMode,-): AISettingsSetupDialogPresentation {- switch (mode) {- case 'activation-or-provider':- return {- ariaLabel: 'Activate quickstart or connect a provider',- title: 'Activate quickstart or connect a provider',- description:- 'Use an eligible hosted quickstart entitlement, or connect your own provider for Pulse Assistant and Patrol.',- submitLabel: 'Enable Assistant & Patrol',- };- case 'provider-required':- return {- ariaLabel: 'Connect a provider to continue',- title: 'Connect a provider to continue',- description:- 'Patrol quickstart is not currently available. Connect a provider for Pulse Assistant and Patrol.',- submitLabel: 'Enable Assistant & Patrol',- };- default:- return {- ariaLabel: 'Set up Assistant and Patrol',- title: 'Set Up Assistant & Patrol',- description: 'Connect a provider to power Pulse Assistant and Patrol.',- submitLabel: 'Enable Assistant & Patrol',- };- }+export function getAISettingsSetupDialogPresentation(): AISettingsSetupDialogPresentation {+ return {+ ariaLabel: 'Set up Assistant and Patrol',+ title: 'Set Up Assistant & Patrol',+ description: 'Connect a provider to power Pulse Assistant and Patrol.',+ submitLabel: 'Enable Assistant & Patrol',+ };}export function getAISettingsReadinessPresentation(input: AISettingsReadinessInput,): AISettingsReadinessPresentation {- const {- configured,- providerCount,- modelCount,- quickstartCreditsAvailable,- quickstartCreditsRemaining,- quickstartCreditsTotal,- quickstartBlockedReason,- } = input;-- if (quickstartCreditsAvailable && providerCount === 0) {- return {- containerClassName: 'bg-blue-50 dark:bg-blue-900 text-blue-800 dark:text-blue-200',- dotClassName: 'bg-blue-400',- summary: `Patrol quickstart ready • ${quickstartCreditsRemaining}/${quickstartCreditsTotal} runs left • no API key needed yet`,- };- }+ const { configured, providerCount, modelCount } = input;if (configured) {return {@@ -119,14 +76,6 @@ export function getAISettingsReadinessPresentation(};}- if (quickstartBlockedReason) {- return {- containerClassName: 'bg-amber-50 dark:bg-amber-900 text-amber-800 dark:text-amber-200',- dotClassName: 'bg-amber-400',- summary: quickstartBlockedReason,- };- }-return {containerClassName: 'bg-amber-50 dark:bg-amber-900 text-amber-800 dark:text-amber-200',dotClassName: 'bg-amber-400',diff --git a/frontend-modern/src/utils/patrolRuntimePresentation.ts b/frontend-modern/src/utils/patrolRuntimePresentation.tsindex aaf2bb08f5..e87ed9b035 100644--- a/frontend-modern/src/utils/patrolRuntimePresentation.ts+++ b/frontend-modern/src/utils/patrolRuntimePresentation.ts@@ -8,17 +8,35 @@ export interface PatrolRuntimePresentation {tone: SemanticTone;}+const RETIRED_HOSTED_PATROL_BLOCKED_REASON =+ 'Connect your own AI provider or local model to use Pulse Patrol.';++export function normalizePatrolRuntimeBlockedReason(blockedReason?: string): string {+ const reason = blockedReason?.trim() ?? '';+ if (!reason) {+ return '';+ }++ if (/\bquickstart\b/i.test(reason) || /\bhosted\b/i.test(reason)) {+ return RETIRED_HOSTED_PATROL_BLOCKED_REASON;+ }++ return reason;+}+export function getPatrolRuntimePresentation(runtimeState: PatrolRuntimeState | undefined,blockedReason?: string,): PatrolRuntimePresentation {+ const normalizedBlockedReason = normalizePatrolRuntimeBlockedReason(blockedReason);+switch (runtimeState) {case 'blocked':return {label: 'Patrol Paused',title: 'Patrol paused',description:- blockedReason?.trim() ||+ normalizedBlockedReason ||'Pulse Patrol cannot start new verification until the blocking condition is cleared.',tone: 'warning',};diff --git a/frontend-modern/src/utils/trialStartAction.ts b/frontend-modern/src/utils/trialStartAction.tsdeleted file mode 100644index d9ed72c59d..0000000000--- a/frontend-modern/src/utils/trialStartAction.ts+++ /dev/null@@ -1,40 +0,0 @@-import { startProTrial } from '@/stores/licenseCommercial';-import { getProTrialStartedMessage, getTrialStartErrorMessage } from '@/utils/upgradePresentation';--export type StartProTrialActionOutcome = 'activated' | 'redirect' | 'error';--export interface RunStartProTrialActionOptions {- branded?: boolean;- onError?: (error: unknown) => void;- successMessage?: string;- showSuccess: (message: string) => void;- showError: (message: string) => void;- navigate?: (actionUrl: string) => void;-}--function defaultNavigate(actionUrl: string) {- if (typeof window === 'undefined') return;- window.location.href = actionUrl;-}--export async function runStartProTrialAction(- options: RunStartProTrialActionOptions,-): Promise<StartProTrialActionOutcome> {- const { branded = false, navigate = defaultNavigate, showError, showSuccess, successMessage } =- options;-- try {- const result = await startProTrial();- if (result?.outcome === 'redirect') {- navigate(result.actionUrl);- return 'redirect';- }-- showSuccess(successMessage ?? getProTrialStartedMessage());- return 'activated';- } catch (error) {- options.onError?.(error);- showError(getTrialStartErrorMessage(error, { branded }));- return 'error';- }-}diff --git a/frontend-modern/src/utils/upgradePresentation.ts b/frontend-modern/src/utils/upgradePresentation.tsindex 96c78a97a5..936dafb776 100644--- a/frontend-modern/src/utils/upgradePresentation.ts+++ b/frontend-modern/src/utils/upgradePresentation.ts@@ -6,96 +6,6 @@ export interface UpgradeActionButtonOptions {}export const UPGRADE_ACTION_LABEL = 'View plans';-export const UPGRADE_TRIAL_LABEL = 'Start trial';-export const UPGRADE_TRIAL_LINK_CLASS =- 'text-sm text-indigo-500 hover:underline disabled:opacity-50';--export interface TrialStartErrorOptions {- branded?: boolean;-}--export interface TrialStartErrorLike {- status?: number;- code?: string;- message?: string;- retryAfterSeconds?: number;-}--export type TrialStartErrorKind = 'already_used' | 'retry_later' | 'other';--export function getProTrialStartedMessage(): string {- return 'Pro trial started';-}--export function getTrialAlreadyUsedMessage(): string {- return 'Trial already used';-}--export function getTrialTryAgainLaterMessage(retryAfterSeconds?: number): string {- if (!retryAfterSeconds || retryAfterSeconds < 1) {- return 'Try again later';- }-- if (retryAfterSeconds < 90) {- return 'Try again in about a minute';- }-- if (retryAfterSeconds < 3600) {- const minutes = Math.ceil(retryAfterSeconds / 60);- return `Try again in about ${minutes} minutes`;- }-- if (retryAfterSeconds < 172800) {- const hours = Math.ceil(retryAfterSeconds / 3600);- return `Try again in about ${hours} hour${hours === 1 ? '' : 's'}`;- }-- const days = Math.ceil(retryAfterSeconds / 86400);- return `Try again in about ${days} day${days === 1 ? '' : 's'}`;-}--export function normalizeTrialStartError(error?: unknown): TrialStartErrorLike | null {- if (!error) return null;- if (typeof error === 'string') return { message: error };- if (typeof error !== 'object') return null;-- const value = error as TrialStartErrorLike;- return {- status: value.status,- code: value.code,- message: value.message,- retryAfterSeconds: value.retryAfterSeconds,- };-}--export function getTrialStartErrorKind(error?: unknown): TrialStartErrorKind {- const normalized = normalizeTrialStartError(error);- if (normalized?.code === 'trial_already_used') {- return 'already_used';- }- if (normalized?.status === 429) {- return 'retry_later';- }- return 'other';-}--export function getTrialStartErrorMessage(- error?: unknown,- options: TrialStartErrorOptions = {},-): string {- const normalized = normalizeTrialStartError(error);- const kind = getTrialStartErrorKind(normalized);- if (kind === 'already_used') {- return getTrialAlreadyUsedMessage();- }- if (kind === 'retry_later') {- return getTrialTryAgainLaterMessage(normalized?.retryAfterSeconds);- }- if (normalized?.message?.trim()) {- return normalized.message.trim();- }- return options.branded ? 'Failed to start Pro trial' : 'Failed to start trial';-}export function getUpgradeActionButtonClass(options: UpgradeActionButtonOptions = {},