@elizaos/app-core 2.0.0-alpha.55 → 2.0.0-alpha.56

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,2 @@
1
1
  $ bun run build:dist
2
2
  $ test -f ../ui/dist/index.d.ts || (cd ../ui && bun run build) && rm -rf dist && tsc -p tsconfig.build.json && node ../../scripts/copy-package-assets.mjs packages/app-core src/styles src/i18n/locales && node ../../scripts/prepare-package-dist.mjs packages/app-core
3
- src/components/StreamView.tsx(16,29): error TS2307: Cannot find module '@elizaos/app-core/config/branding' or its corresponding type declarations.
@@ -1 +1 @@
1
- {"version":3,"file":"CustomActionsView.d.ts","sourceRoot":"","sources":["../../src/components/CustomActionsView.tsx"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,4CAuThC"}
1
+ {"version":3,"file":"CustomActionsView.d.ts","sourceRoot":"","sources":["../../src/components/CustomActionsView.tsx"],"names":[],"mappings":"AAUA,wBAAgB,iBAAiB,4CA0ThC"}
@@ -128,7 +128,7 @@ export function CustomActionsView() {
128
128
  if (loading) {
129
129
  return (_jsx("div", { className: "flex items-center justify-center h-full", children: _jsx("div", { className: "text-muted", children: t("customactionsview.LoadingActions") }) }));
130
130
  }
131
- return (_jsxs("div", { className: "flex flex-col h-full p-4 space-y-4", children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("label", { className: "px-3 py-1.5 text-sm border border-border bg-surface text-muted rounded cursor-pointer hover:bg-card transition-colors", children: [t("knowledgeview.Import"), _jsx("input", { type: "file", accept: "application/json", onChange: handleImport, className: "hidden" })] }), _jsx(Button, { variant: "outline", size: "sm", onClick: handleExport, disabled: actions.length === 0, className: "px-3 py-1.5 h-8 text-sm text-muted bg-surface hover:bg-card shadow-sm disabled:opacity-50", children: t("customactionsview.Export") }), _jsx(Button, { variant: "default", size: "sm", onClick: handleCreate, className: "px-3 py-1.5 h-8 text-sm shadow-sm font-medium tracking-wide", children: t("customactionsview.CreateAction") })] }) }), _jsx("div", { className: "flex items-center", children: _jsx(Input, { type: "text", placeholder: t("customactionsview.SearchActionsByNa"), value: search, onChange: (e) => setSearch(e.target.value), className: "flex-1 px-3 py-2 h-9 text-sm bg-surface text-txt shadow-sm" }) }), filteredActions.length === 0 ? (_jsxs("div", { className: "flex flex-col items-center justify-center flex-1 space-y-4", children: [_jsx("p", { className: "text-muted text-center", children: search
131
+ return (_jsxs("div", { "data-testid": "custom-actions-view", className: "flex flex-col h-full p-4 space-y-4", children: [_jsx("div", { className: "flex items-center justify-between", children: _jsxs("div", { className: "flex items-center gap-2", children: [_jsxs("label", { className: "px-3 py-1.5 text-sm border border-border bg-surface text-muted rounded cursor-pointer hover:bg-card transition-colors", children: [t("knowledgeview.Import"), _jsx("input", { type: "file", accept: "application/json", onChange: handleImport, className: "hidden" })] }), _jsx(Button, { variant: "outline", size: "sm", onClick: handleExport, disabled: actions.length === 0, className: "px-3 py-1.5 h-8 text-sm text-muted bg-surface hover:bg-card shadow-sm disabled:opacity-50", children: t("customactionsview.Export") }), _jsx(Button, { variant: "default", size: "sm", onClick: handleCreate, className: "px-3 py-1.5 h-8 text-sm shadow-sm font-medium tracking-wide", children: t("customactionsview.CreateAction") })] }) }), _jsx("div", { className: "flex items-center", children: _jsx(Input, { type: "text", placeholder: t("customactionsview.SearchActionsByNa"), value: search, onChange: (e) => setSearch(e.target.value), className: "flex-1 px-3 py-2 h-9 text-sm bg-surface text-txt shadow-sm" }) }), filteredActions.length === 0 ? (_jsxs("div", { className: "flex flex-col items-center justify-center flex-1 space-y-4", children: [_jsx("p", { className: "text-muted text-center", children: search
132
132
  ? "No actions match your search."
133
133
  : "No custom actions yet. Create one to get started." }), !search && (_jsx(Button, { variant: "default", size: "sm", onClick: handleCreate, className: "px-4 py-2 text-sm shadow-sm font-medium tracking-wide", children: t("customactionsview.CreateAction") }))] })) : (_jsx("div", { className: "grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-3 overflow-auto", children: filteredActions.map((action) => (_jsxs("div", { className: "border border-border bg-card rounded p-4 space-y-3 cursor-pointer hover:border-accent/50 transition-colors", children: [_jsxs("button", { type: "button", className: "w-full bg-transparent border-0 p-0 m-0 text-left cursor-pointer", onClick: () => handleEdit(action), children: [_jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("h3", { className: "font-bold text-sm text-txt flex-1 break-words", children: action.name }), _jsx("span", { className: `px-2 py-0.5 text-xs rounded ${getBadgeColor(action.handler.type)}`, children: action.handler.type })] }), action.description && (_jsx("p", { className: "text-xs text-muted line-clamp-3", children: action.description })), _jsxs("p", { className: "text-xs text-muted", children: [action.parameters?.length || 0, " ", t("customactionsview.parameter"), action.parameters?.length === 1 ? "" : "s"] })] }), _jsxs("div", { className: "flex items-center justify-between pt-2 border-t border-border", children: [_jsxs("label", { className: "flex items-center gap-2 cursor-pointer", children: [_jsx("input", { type: "checkbox", checked: action.enabled, onChange: (e) => handleToggleEnabled(action.id, e.target.checked), className: "cursor-pointer" }), _jsx("span", { className: "text-xs text-muted", children: t("customactionsview.Enabled") })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Button, { variant: "outline", size: "sm", onClick: () => handleEdit(action), className: "px-2 py-1 h-6 text-xs bg-surface text-muted hover:bg-card shadow-sm", children: t("triggersview.Edit") }), _jsx(Button, { variant: "outline", size: "sm", onClick: () => handleDelete(action.id, action.name), className: "px-2 py-1 h-6 text-xs bg-surface text-danger border-danger/20 hover:bg-danger/10 shadow-sm", children: t("triggersview.Delete") })] })] })] }, action.id))) })), editorOpen && (_jsx(CustomActionEditor, { open: editorOpen, action: editingAction, onClose: handleEditorClose, onSave: handleEditorSave }))] }));
134
134
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OnboardingWizard.d.ts","sourceRoot":"","sources":["../../src/components/OnboardingWizard.tsx"],"names":[],"mappings":"AAoBA,wBAAgB,gBAAgB,4CAyL/B"}
1
+ {"version":3,"file":"OnboardingWizard.d.ts","sourceRoot":"","sources":["../../src/components/OnboardingWizard.tsx"],"names":[],"mappings":"AAwBA,wBAAgB,gBAAgB,4CAoM/B"}
@@ -12,6 +12,8 @@ import { OnboardingPanel } from "./onboarding/OnboardingPanel";
12
12
  import { OnboardingStepNav } from "./onboarding/OnboardingStepNav";
13
13
  import { PermissionsStep } from "./onboarding/PermissionsStep";
14
14
  import { RpcStep } from "./onboarding/RpcStep";
15
+ const DISABLE_ONBOARDING_VRM = String(import.meta.env.VITE_E2E_DISABLE_VRM ?? "").toLowerCase() === "true" ||
16
+ String(import.meta.env.VITE_E2E_DISABLE_VRM ?? "") === "1";
15
17
  export function OnboardingWizard() {
16
18
  const { onboardingStep, selectedVrmIndex, customVrmUrl, uiLanguage, uiTheme, setState, t, } = useApp();
17
19
  const setUiLanguage = (lang) => setState("uiLanguage", normalizeLanguage(lang));
@@ -48,7 +50,9 @@ export function OnboardingWizard() {
48
50
  return null;
49
51
  }
50
52
  }
51
- return (_jsxs("div", { className: "onboarding-screen", children: [_jsx("div", { className: "onboarding-bg" }), !isCharacterSelect && _jsx("div", { className: "onboarding-bg-overlay" }), _jsx(VrmStage, { vrmPath: vrmPath, worldUrl: worldUrl, fallbackPreviewUrl: fallbackPreview, cameraProfile: "companion_close", initialCompanionZoomNormalized: 1, t: t }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--tl", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--tr", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--bl", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--br", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsx("div", { style: {
53
+ return (_jsxs("div", { className: "onboarding-screen", children: [_jsx("div", { className: "onboarding-bg" }), !isCharacterSelect && _jsx("div", { className: "onboarding-bg-overlay" }), DISABLE_ONBOARDING_VRM ? (_jsx("div", { "aria-hidden": "true", className: "absolute inset-0 z-10 pointer-events-none", style: {
54
+ background: "radial-gradient(circle at 50% 25%, rgba(255,255,255,0.16), transparent 34%), linear-gradient(180deg, rgba(17,17,17,0.08), rgba(10,10,10,0.36))",
55
+ } })) : (_jsx(VrmStage, { vrmPath: vrmPath, worldUrl: worldUrl, fallbackPreviewUrl: fallbackPreview, cameraProfile: "companion_close", initialCompanionZoomNormalized: 1, t: t })), _jsxs("svg", { className: "onboarding-corner onboarding-corner--tl", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--tr", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--bl", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsxs("svg", { className: "onboarding-corner onboarding-corner--br", viewBox: "0 0 36 36", fill: "none", stroke: "rgba(240,185,11,0.18)", strokeWidth: "1", "aria-hidden": "true", children: [_jsx("path", { d: "M0 18 L0 0 L18 0" }), _jsx("circle", { cx: "0", cy: "0", r: "2", fill: "rgba(240,185,11,0.25)", stroke: "none" })] }), _jsx("div", { style: {
52
56
  position: "absolute",
53
57
  top: "1rem",
54
58
  right: "1rem",
@@ -152,7 +152,7 @@ export function RuntimeView() {
152
152
  return next;
153
153
  });
154
154
  }, []);
155
- return (_jsxs("div", { className: "flex flex-col gap-4 h-full", children: [_jsxs("div", { className: "flex flex-wrap items-end gap-3 border border-[var(--border)] bg-[var(--card)] rounded-md p-3", children: [_jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.depth"), _jsx("input", { type: "number", min: 1, max: 24, value: depth, onChange: (e) => setDepth(Math.max(1, Math.min(24, Number(e.target.value) || 1))), className: "w-16 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.arrayCap"), _jsx("input", { type: "number", min: 1, max: 5000, value: maxArrayLength, onChange: (e) => setMaxArrayLength(Math.max(1, Math.min(5000, Number(e.target.value) || 1))), className: "w-20 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.objectCap"), _jsx("input", { type: "number", min: 1, max: 5000, value: maxObjectEntries, onChange: (e) => setMaxObjectEntries(Math.max(1, Math.min(5000, Number(e.target.value) || 1))), className: "w-20 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsx("button", { type: "button", onClick: () => void loadSnapshot(), disabled: loading, className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)] disabled:opacity-60", children: loading ? "Refreshing..." : "Refresh" }), _jsx("button", { type: "button", onClick: () => setExpandedPaths(new Set([rootPath])), className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)]", children: t("runtimeview.Collapse") }), _jsx("button", { type: "button", onClick: () => setExpandedPaths(buildInitialExpanded(rootPath, sectionData)), className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)]", children: t("runtimeview.ExpandTop") }), _jsx("div", { className: "text-[11px] text-[var(--muted)] ml-auto", children: snapshot
155
+ return (_jsxs("div", { "data-testid": "runtime-view", className: "flex flex-col gap-4 h-full", children: [_jsxs("div", { className: "flex flex-wrap items-end gap-3 border border-[var(--border)] bg-[var(--card)] rounded-md p-3", children: [_jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.depth"), _jsx("input", { type: "number", min: 1, max: 24, value: depth, onChange: (e) => setDepth(Math.max(1, Math.min(24, Number(e.target.value) || 1))), className: "w-16 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.arrayCap"), _jsx("input", { type: "number", min: 1, max: 5000, value: maxArrayLength, onChange: (e) => setMaxArrayLength(Math.max(1, Math.min(5000, Number(e.target.value) || 1))), className: "w-20 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsxs("label", { className: "text-[11px] text-[var(--muted)] flex items-center gap-1", children: [t("runtimeview.objectCap"), _jsx("input", { type: "number", min: 1, max: 5000, value: maxObjectEntries, onChange: (e) => setMaxObjectEntries(Math.max(1, Math.min(5000, Number(e.target.value) || 1))), className: "w-20 px-1.5 py-0.5 border border-[var(--border)] bg-[var(--bg)] text-[var(--txt)] rounded-sm" })] }), _jsx("button", { type: "button", onClick: () => void loadSnapshot(), disabled: loading, className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)] disabled:opacity-60", children: loading ? "Refreshing..." : "Refresh" }), _jsx("button", { type: "button", onClick: () => setExpandedPaths(new Set([rootPath])), className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)]", children: t("runtimeview.Collapse") }), _jsx("button", { type: "button", onClick: () => setExpandedPaths(buildInitialExpanded(rootPath, sectionData)), className: "px-3 py-1.5 text-xs rounded border border-[var(--border)] bg-[var(--bg)] hover:bg-[var(--bg-hover)]", children: t("runtimeview.ExpandTop") }), _jsx("div", { className: "text-[11px] text-[var(--muted)] ml-auto", children: snapshot
156
156
  ? `Last updated: ${formatDateTime(snapshot.generatedAt, { fallback: "n/a" })}`
157
157
  : "No snapshot loaded" })] }), snapshot && (_jsxs("div", { className: "grid gap-3 md:grid-cols-2 xl:grid-cols-3", children: [_jsx(OrderCard, { title: t("runtimeview.Plugins"), entries: snapshot.order.plugins }), _jsx(OrderCard, { title: t("runtimeview.Actions"), entries: snapshot.order.actions }), _jsx(OrderCard, { title: t("runtimeview.Providers"), entries: snapshot.order.providers }), _jsx(OrderCard, { title: t("runtimeview.Evaluators"), entries: snapshot.order.evaluators }), _jsx(ServicesOrderCard, { entries: snapshot.order.services }), _jsxs("div", { className: "border border-[var(--border)] bg-[var(--card)] rounded-md p-3", children: [_jsx("div", { className: "text-xs font-semibold mb-2", children: t("runtimeview.Summary") }), _jsxs("div", { className: "text-[11px] font-mono leading-5", children: [_jsxs("div", { children: [t("runtimeview.runtime"), " ", snapshot.runtimeAvailable ? "available" : "offline"] }), _jsxs("div", { children: [t("runtimeview.agent"), " ", snapshot.meta.agentName] }), _jsxs("div", { children: [t("runtimeview.state"), " ", snapshot.meta.agentState] }), _jsxs("div", { children: [t("runtimeview.model"), " ", snapshot.meta.model ?? "n/a"] }), _jsxs("div", { children: [t("runtimeview.plugins"), " ", snapshot.meta.pluginCount] }), _jsxs("div", { children: [t("runtimeview.actions"), " ", snapshot.meta.actionCount] }), _jsxs("div", { children: [t("runtimeview.providers"), " ", snapshot.meta.providerCount] }), _jsxs("div", { children: [t("runtimeview.evaluators"), " ", snapshot.meta.evaluatorCount] }), _jsxs("div", { children: [t("runtimeview.services"), " ", snapshot.meta.serviceCount] })] })] })] })), _jsx("div", { className: "flex gap-1 border-b border-[var(--border)]", children: SECTION_TABS.map((tab) => {
158
158
  const active = tab.key === activeSection;
@@ -73,7 +73,7 @@ export function SecurityPageView() {
73
73
  void loadAudit();
74
74
  }, [loadAudit]);
75
75
  const counts = useMemo(() => summarizeCounts(entries), [entries]);
76
- return (_jsxs("section", { className: "flex h-full flex-col gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h2", { className: "m-0 text-lg font-bold", children: "Security Audit" }), _jsx("p", { className: "mt-1 text-sm text-[var(--muted)]", children: "Review privileged actions, policy decisions, and runtime security events." })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("select", { "aria-label": "Security severity filter", className: "h-9 min-w-40 rounded-xl border border-border bg-bg px-3 text-sm text-txt", value: severity, onChange: (event) => setSeverity(event.target.value), children: SEVERITY_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.label))) }), _jsx(Button, { type: "button", variant: "outline", size: "sm", className: "h-9 rounded-xl", onClick: () => void loadAudit(), disabled: loading, children: loading ? "Refreshing..." : "Refresh" })] })] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-5", children: [_jsxs("div", { className: "rounded-2xl border border-border/60 bg-card/50 p-4", children: [_jsx("div", { className: "text-xs uppercase tracking-[0.16em] text-muted", children: "Buffered" }), _jsx("div", { className: "mt-2 text-2xl font-semibold", children: totalBuffered })] }), ["critical", "error", "warn", "info"].map((level) => (_jsxs("div", { className: "rounded-2xl border border-border/60 bg-card/50 p-4", children: [_jsx("div", { className: "text-xs uppercase tracking-[0.16em] text-muted", children: level }), _jsx("div", { className: `mt-2 text-2xl font-semibold ${SEVERITY_STYLES[level].tone}`, children: counts[level] })] }, level)))] }), error ? (_jsx("div", { className: "rounded-2xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-200", children: error })) : null, _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto rounded-2xl border border-border/60 bg-card/35", children: loading && entries.length === 0 ? (_jsx("div", { className: "px-4 py-6 text-sm text-[var(--muted)]", children: "Loading security audit..." })) : entries.length === 0 ? (_jsx("div", { className: "px-4 py-6 text-sm text-[var(--muted)]", children: "No security events recorded for the current filter." })) : (_jsx("div", { className: "divide-y divide-border/50", children: entries.map((entry, index) => {
76
+ return (_jsxs("section", { "data-testid": "security-audit-view", className: "flex h-full flex-col gap-4", children: [_jsxs("div", { className: "flex flex-wrap items-start justify-between gap-3", children: [_jsxs("div", { children: [_jsx("h2", { className: "m-0 text-lg font-bold", children: "Security Audit" }), _jsx("p", { className: "mt-1 text-sm text-[var(--muted)]", children: "Review privileged actions, policy decisions, and runtime security events." })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx("select", { "aria-label": "Security severity filter", className: "h-9 min-w-40 rounded-xl border border-border bg-bg px-3 text-sm text-txt", value: severity, onChange: (event) => setSeverity(event.target.value), children: SEVERITY_OPTIONS.map((option) => (_jsx("option", { value: option.value, children: option.label }, option.label))) }), _jsx(Button, { type: "button", variant: "outline", size: "sm", className: "h-9 rounded-xl", onClick: () => void loadAudit(), disabled: loading, children: loading ? "Refreshing..." : "Refresh" })] })] }), _jsxs("div", { className: "grid gap-3 sm:grid-cols-2 xl:grid-cols-5", children: [_jsxs("div", { className: "rounded-2xl border border-border/60 bg-card/50 p-4", children: [_jsx("div", { className: "text-xs uppercase tracking-[0.16em] text-muted", children: "Buffered" }), _jsx("div", { className: "mt-2 text-2xl font-semibold", children: totalBuffered })] }), ["critical", "error", "warn", "info"].map((level) => (_jsxs("div", { className: "rounded-2xl border border-border/60 bg-card/50 p-4", children: [_jsx("div", { className: "text-xs uppercase tracking-[0.16em] text-muted", children: level }), _jsx("div", { className: `mt-2 text-2xl font-semibold ${SEVERITY_STYLES[level].tone}`, children: counts[level] })] }, level)))] }), error ? (_jsx("div", { className: "rounded-2xl border border-red-500/30 bg-red-500/10 px-4 py-3 text-sm text-red-200", children: error })) : null, _jsx("div", { className: "min-h-0 flex-1 overflow-y-auto rounded-2xl border border-border/60 bg-card/35", children: loading && entries.length === 0 ? (_jsx("div", { className: "px-4 py-6 text-sm text-[var(--muted)]", children: "Loading security audit..." })) : entries.length === 0 ? (_jsx("div", { className: "px-4 py-6 text-sm text-[var(--muted)]", children: "No security events recorded for the current filter." })) : (_jsx("div", { className: "divide-y divide-border/50", children: entries.map((entry, index) => {
77
77
  const metadata = metadataPairs(entry);
78
78
  const severityStyle = SEVERITY_STYLES[entry.severity];
79
79
  return (_jsxs("article", { className: "px-4 py-4", children: [_jsxs("div", { className: "flex flex-wrap items-start gap-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs("div", { className: "flex flex-wrap items-center gap-2", children: [_jsx("span", { className: `rounded-full border px-2 py-0.5 text-[11px] font-semibold uppercase tracking-[0.14em] ${severityStyle.badge}`, children: entry.severity }), _jsx("span", { className: "text-xs text-[var(--muted)]", children: entry.type })] }), _jsx("div", { className: "mt-2 text-sm font-medium text-txt", children: entry.summary })] }), _jsx("div", { className: "text-right text-xs text-[var(--muted)]", children: formatDateTime(entry.timestamp) })] }), entry.traceId ? (_jsxs("div", { className: "mt-2 text-xs text-[var(--muted)]", children: ["Trace:", " ", _jsx("span", { className: "font-mono text-txt", children: entry.traceId })] })) : null, metadata.length > 0 ? (_jsx("dl", { className: "mt-3 grid gap-2 sm:grid-cols-2 xl:grid-cols-3", children: metadata.map(([key, value]) => (_jsxs("div", { className: "rounded-xl border border-border/40 bg-bg/40 px-3 py-2", children: [_jsx("dt", { className: "text-[11px] uppercase tracking-[0.12em] text-muted", children: key }), _jsx("dd", { className: "mt-1 break-all font-mono text-xs text-txt", children: value })] }, `${entry.timestamp}-${key}`))) })) : null] }, `${entry.timestamp}-${entry.type}-${index}`));
@@ -13,7 +13,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
13
13
  */
14
14
  import { client, isApiError } from "@elizaos/app-core/api";
15
15
  import { isElectrobunRuntime } from "@elizaos/app-core/bridge";
16
- import { useBranding } from "@elizaos/app-core/config/branding";
16
+ import { useBranding } from "@elizaos/app-core/config";
17
17
  import { useApp } from "@elizaos/app-core/state";
18
18
  import { useCallback, useEffect, useMemo, useRef, useState, } from "react";
19
19
  import { ActivityFeed } from "./stream/ActivityFeed";
@@ -146,7 +146,7 @@ export function TrajectoriesView({ onSelectTrajectory, }) {
146
146
  const total = result?.total ?? 0;
147
147
  const totalPages = Math.ceil(total / pageSize);
148
148
  const sources = stats?.bySource ? Object.keys(stats.bySource) : [];
149
- return (_jsxs("div", { className: "flex flex-col h-full gap-3", children: [stats && (_jsxs("div", { className: "flex flex-wrap gap-4 text-xs", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Total") }), _jsx("span", { className: "font-semibold", children: stats.totalTrajectories.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.LLMCalls") }), _jsx("span", { className: "font-semibold", children: stats.totalLlmCalls.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Tokens") }), _jsx("span", { className: "font-semibold text-txt", children: formatTrajectoryTokenCount(stats.totalPromptTokens + stats.totalCompletionTokens, { emptyLabel: "0" }) }), _jsxs("span", { className: "text-muted text-[10px]", children: ["(", formatTrajectoryTokenCount(stats.totalPromptTokens, {
149
+ return (_jsxs("div", { className: "flex flex-col h-full gap-3", "data-testid": "trajectories-view", children: [stats && (_jsxs("div", { className: "flex flex-wrap gap-4 text-xs", children: [_jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Total") }), _jsx("span", { className: "font-semibold", children: stats.totalTrajectories.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.LLMCalls") }), _jsx("span", { className: "font-semibold", children: stats.totalLlmCalls.toLocaleString() })] }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("span", { className: "text-muted", children: t("trajectoriesview.Tokens") }), _jsx("span", { className: "font-semibold text-txt", children: formatTrajectoryTokenCount(stats.totalPromptTokens + stats.totalCompletionTokens, { emptyLabel: "0" }) }), _jsxs("span", { className: "text-muted text-[10px]", children: ["(", formatTrajectoryTokenCount(stats.totalPromptTokens, {
150
150
  emptyLabel: "0",
151
151
  }), "\u2191", " ", formatTrajectoryTokenCount(stats.totalCompletionTokens, {
152
152
  emptyLabel: "0",