artisanpack-ui/performance
ArtisanPack UI Performance gives Laravel developers a focused toolkit for measuring, monitoring, and improving application performance, integrating cleanly with the ArtisanPack UI ecosystem.
performance.ai.use ships permissive (any authenticated user) but is overridable for stricter policies or per-tenant quotas. That makes it a viable paid-tier, seat-limited, or quota-metered feature — but only if you register your own gate; otherwise every authenticated user has access. The 409/412/422/404/403 status contract lets you render “disabled”, “misconfigured”, and “denied” states distinctly instead of a generic failure.$cacheable = false (point-in-time diagnostics), so repeat views cost repeat model calls. The optimization agent short-circuits with no model call on empty metrics, and the Livewire panel bounds itself (MAX_WINDOW_DAYS = 90, MAX_METRICS_ROWS = 2000) — both keep worst-case spend predictable. Decide whether to add your own response caching or debounce before exposing to high-traffic users.performance_metrics directly and works out of the box; React/Vue accept a caller-supplied metrics batch, which is more work but keeps data-fetching in your app’s control.Adopt when:
artisanpack-ui/ai: ^1.0. This release promotes it from optional to required — the single biggest adoption gate. If you cannot or will not install that package, or you need to run fully offline/no-LLM, this release is not for you (and upgrading is effectively a breaking change to your dependency graph).claude-sonnet-4-6 (or intend to override the default). Missing credentials surface as 412, so a misconfigured deploy degrades visibly rather than silently.['api', 'auth:sanctum'] and are deliberately separate from the anonymous Web Vitals ingest stack — do not assume these endpoints can serve unauthenticated traffic.Look elsewhere or defer when:
^1.0 promotion as a planned upgrade with dependency-review sign-off, not a patch bump.connection driver input path yourself.For executives: We can now offer AI-assisted performance guidance — “why is this query slow” and “what should we optimize next” — as a shipped capability instead of a research spike. It arrives with its own UI components for all three of our frontend stacks, a versioned API, and deliberate guardrails: it only suggests indexes and rewrites, never changes a database, and access is controlled by a gate we can tighten for paid tiers or per-tenant quotas. The main cost is a new required internal AI dependency and per-request model spend; the package already bounds the data windows and skips model calls when there is nothing to analyze, which keeps that spend predictable.
For engineering: Two new auto-registered agents (performance.query_insight, performance.optimization_suggestion) on claude-sonnet-4-6, both non-cacheable by design because output is a point-in-time snapshot. Trigger them via POST /api/performance/ai/query-insight and POST /api/performance/ai/optimization-suggestion, or the Livewire/React/Vue panels, or the new PerformanceClient methods. Responses are { data, feature_key }; use PerformanceAiError to branch on 409 disabled / 412 missing credentials / 422 validation / 404 unknown feature / 403 gate denial rather than string-matching. AI routes live on a dedicated ai_middleware stack (api, auth:sanctum) — keep them off the anonymous ingest path. Override the permissive performance.ai.use gate in your AuthServiceProvider (host registration wins) before exposing this beyond a pilot. Note the upgrade makes artisanpack-ui/ai a hard require and adds a JS build step for the React/Vue components — plan both into the release.
How can I help you explore Laravel packages today?