@parhelia/benchmark 0.4.13170 → 0.4.13178

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.
Files changed (42) hide show
  1. package/LICENSE +1 -1
  2. package/dist/components/ActiveRunBanner.d.ts +1 -1
  3. package/dist/components/ActiveRunBanner.d.ts.map +1 -1
  4. package/dist/components/ActiveRunBanner.js +6 -4
  5. package/dist/components/BenchmarkCostCorrectnessChart.d.ts +1 -1
  6. package/dist/components/BenchmarkCostCorrectnessChart.d.ts.map +1 -1
  7. package/dist/components/BenchmarkCostCorrectnessChart.js +39 -19
  8. package/dist/components/BenchmarkLeaderboard.d.ts +2 -2
  9. package/dist/components/BenchmarkLeaderboard.d.ts.map +1 -1
  10. package/dist/components/BenchmarkLeaderboard.js +65 -18
  11. package/dist/components/BenchmarkPanel.d.ts.map +1 -1
  12. package/dist/components/BenchmarkPanel.js +87 -18
  13. package/dist/components/BenchmarkRunDetail.d.ts +1 -1
  14. package/dist/components/BenchmarkRunDetail.d.ts.map +1 -1
  15. package/dist/components/BenchmarkRunDetail.js +26 -14
  16. package/dist/components/BenchmarkRunsList.d.ts +1 -1
  17. package/dist/components/BenchmarkRunsList.d.ts.map +1 -1
  18. package/dist/components/BenchmarkRunsList.js +7 -15
  19. package/dist/components/BenchmarkTasksList.d.ts.map +1 -1
  20. package/dist/components/BenchmarkTasksList.js +4 -3
  21. package/dist/components/NotPreparedState.d.ts +1 -1
  22. package/dist/components/NotPreparedState.d.ts.map +1 -1
  23. package/dist/components/NotPreparedState.js +6 -4
  24. package/dist/components/RecoveryBanner.d.ts +1 -1
  25. package/dist/components/RecoveryBanner.d.ts.map +1 -1
  26. package/dist/components/RecoveryBanner.js +2 -2
  27. package/dist/components/RunStatus.d.ts +6 -0
  28. package/dist/components/RunStatus.d.ts.map +1 -0
  29. package/dist/components/RunStatus.js +21 -0
  30. package/dist/components/SafetyViolationsStat.d.ts +10 -2
  31. package/dist/components/SafetyViolationsStat.d.ts.map +1 -1
  32. package/dist/components/SafetyViolationsStat.js +16 -6
  33. package/dist/components/StartBenchmarkDialog.d.ts +1 -1
  34. package/dist/components/StartBenchmarkDialog.d.ts.map +1 -1
  35. package/dist/components/StartBenchmarkDialog.js +58 -22
  36. package/dist/components/TaskChecksList.d.ts +1 -1
  37. package/dist/components/TaskChecksList.d.ts.map +1 -1
  38. package/dist/components/TaskChecksList.js +24 -15
  39. package/dist/index.js +2 -2
  40. package/dist/safetyViolations.d.ts.map +1 -1
  41. package/dist/safetyViolations.js +2 -1
  42. package/package.json +16 -16
@@ -1,19 +1,11 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Badge, Button, SimpleTable } from "@parhelia/core";
2
+ import { Button, DeleteButton, SettingsEmptyState, SimpleIconButton, cn, settingsTable, settingsText, } from "@parhelia/core";
3
+ import { History, LifeBuoy, Square } from "lucide-react";
3
4
  import { cost, duration, percent } from "../format";
4
- import { RunStatusBadge } from "./RunStatusBadge";
5
- const numeric = "text-neutral-grey-100 tabular-nums";
6
- export function BenchmarkRunsList({ runs, total, busy, open, act, more }) {
5
+ import { RunStatus } from "./RunStatus";
6
+ const numeric = "text-right whitespace-nowrap tabular-nums";
7
+ export function BenchmarkRunsList({ runs, total, busy, open, act, more, }) {
7
8
  if (!runs.length)
8
- return _jsx("p", { "data-testid": "benchmark-runs-table", className: "text-neutral-grey-50 py-10 text-center text-sm", children: "No benchmark runs yet. Start one from the button above." });
9
- return _jsxs("div", { className: "space-y-4", children: [_jsx("div", { className: "overflow-x-auto", children: _jsx(SimpleTable, { "data-testid": "benchmark-runs-table", items: runs, rowKey: r => r.runId, columns: [
10
- { header: "Model / configuration", body: r => _jsxs("div", { children: [_jsx(Button, { variant: "link", size: "sm", className: "h-auto p-0 text-sm font-medium", onClick: () => open(r.runId), children: r.modelName }), _jsxs("p", { className: "text-neutral-grey-50", children: [r.providerName, " \u00B7 ", r.configLabel] })] }) },
11
- { header: "Started", body: r => _jsx("span", { className: "text-neutral-grey-100", children: new Date(r.createdAt).toLocaleString() }), className: "whitespace-nowrap" },
12
- { header: "Status", body: r => _jsxs("div", { className: "flex flex-wrap gap-1", children: [_jsx(RunStatusBadge, { status: r.status }), !r.isFullSuite && _jsx(Badge, { variant: "secondary", children: "Subset" })] }) },
13
- { header: "Tasks", body: r => _jsxs("span", { className: numeric, children: [r.tasksCompleted, " / ", r.taskCount] }), align: "right", className: "whitespace-nowrap" },
14
- { header: "Correctness", body: r => _jsx("span", { className: `${numeric} font-medium`, children: percent(r.correctnessPercent) }), align: "right", className: "whitespace-nowrap" },
15
- { header: "Cost", body: r => _jsx("span", { className: numeric, children: cost(r.totalCost, r.costKnown) }), align: "right", className: "whitespace-nowrap" },
16
- { header: "Duration", body: r => _jsx("span", { className: numeric, children: duration(r.wallDurationMs) }), align: "right", className: "whitespace-nowrap" },
17
- { header: "", body: r => _jsx("div", { className: "flex justify-end gap-2", children: ["Queued", "Running"].includes(r.status) ? _jsx(Button, { size: "xs", variant: "destructive", "data-testid": `benchmark-run-cancel-${r.runId}`, disabled: busy || !!r.cancelRequestedAt, onClick: () => act("cancel", r.runId), children: r.cancelRequestedAt ? "Stopping…" : "Cancel" }) : r.status === "NeedsRecovery" ? _jsx(Button, { size: "xs", "data-testid": `benchmark-run-recover-${r.runId}`, disabled: busy, onClick: () => act("recover", r.runId), children: "Recover" }) : _jsx(Button, { size: "xs", variant: "outline", "data-testid": `benchmark-run-delete-${r.runId}`, disabled: busy, onClick: () => act("deleteRun", r.runId), children: "Delete" }) }), align: "right" },
18
- ] }) }), runs.length < total && _jsx("div", { className: "flex justify-center", children: _jsxs(Button, { size: "sm", variant: "outline", disabled: busy, onClick: more, children: ["Load more (", total - runs.length, " remaining)"] }) })] });
9
+ return (_jsx(SettingsEmptyState, { "data-testid": "benchmark-runs-table", icon: History, title: "No benchmark runs yet. Start one from the button above." }));
10
+ return (_jsxs("div", { className: "flex flex-col gap-4", children: [_jsx("div", { className: "-mx-4 overflow-x-auto md:-mx-6", children: _jsxs("table", { "data-testid": "benchmark-runs-table", className: cn(settingsTable.table, settingsTable.inset), children: [_jsx("thead", { className: settingsTable.head, children: _jsxs("tr", { children: [_jsx("th", { className: settingsTable.th, children: "Model / configuration" }), _jsx("th", { className: settingsTable.th, children: "Started" }), _jsx("th", { className: settingsTable.th, children: "Status" }), _jsx("th", { className: cn(settingsTable.th, "text-right"), children: "Tasks" }), _jsx("th", { className: cn(settingsTable.th, "text-right"), children: "Correctness" }), _jsx("th", { className: cn(settingsTable.th, "text-right"), children: "Cost" }), _jsx("th", { className: cn(settingsTable.th, "text-right"), children: "Duration" }), _jsx("th", { className: settingsTable.th, children: _jsx("span", { className: "sr-only", children: "Actions" }) })] }) }), _jsx("tbody", { children: runs.map((r) => (_jsxs("tr", { className: settingsTable.row, children: [_jsxs("td", { className: settingsTable.td, children: [_jsx(Button, { variant: "link", size: "sm", className: "h-auto p-0 text-xs font-medium", onClick: () => open(r.runId), children: r.modelName }), _jsxs("div", { className: settingsText.meta, children: [r.providerName, " \u00B7 ", r.configLabel] })] }), _jsx("td", { className: cn(settingsTable.td, "whitespace-nowrap"), children: new Date(r.createdAt).toLocaleString() }), _jsx("td", { className: settingsTable.td, children: _jsxs("div", { className: "flex flex-wrap items-center gap-x-2 gap-y-1", children: [_jsx(RunStatus, { status: r.status }), !r.isFullSuite && (_jsx("span", { className: settingsText.meta, children: "Subset" }))] }) }), _jsxs("td", { className: cn(settingsTable.td, numeric), children: [r.tasksCompleted, " / ", r.taskCount] }), _jsx("td", { className: cn(settingsTable.td, numeric, "font-medium"), children: percent(r.correctnessPercent) }), _jsx("td", { className: cn(settingsTable.td, numeric), children: cost(r.totalCost, r.costKnown) }), _jsx("td", { className: cn(settingsTable.td, numeric), children: duration(r.wallDurationMs) }), _jsx("td", { className: settingsTable.td, children: _jsx("div", { className: "flex justify-end gap-1", children: ["Queued", "Running"].includes(r.status) ? (_jsx(SimpleIconButton, { label: r.cancelRequestedAt ? "Stopping…" : "Cancel", icon: _jsx(Square, { className: "size-4", strokeWidth: 1 }), className: "size-7 p-0", "data-testid": `benchmark-run-cancel-${r.runId}`, disabled: busy || !!r.cancelRequestedAt, onClick: () => act("cancel", r.runId) })) : r.status === "NeedsRecovery" ? (_jsx(SimpleIconButton, { label: "Recover", icon: _jsx(LifeBuoy, { className: "size-4", strokeWidth: 1 }), className: "size-7 p-0", "data-testid": `benchmark-run-recover-${r.runId}`, disabled: busy, onClick: () => act("recover", r.runId) })) : (_jsx(DeleteButton, { label: "Delete", "data-testid": `benchmark-run-delete-${r.runId}`, disabled: busy, onClick: () => act("deleteRun", r.runId) })) }) })] }, r.runId))) })] }) }), runs.length < total && (_jsx("div", { className: "flex justify-center", children: _jsxs(Button, { size: "sm", variant: "outline", disabled: busy, onClick: more, children: ["Load more (", total - runs.length, " remaining)"] }) }))] }));
19
11
  }
@@ -1 +1 @@
1
- {"version":3,"file":"BenchmarkTasksList.d.ts","sourceRoot":"","sources":["../../src/components/BenchmarkTasksList.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,+BA0BvE"}
1
+ {"version":3,"file":"BenchmarkTasksList.d.ts","sourceRoot":"","sources":["../../src/components/BenchmarkTasksList.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,wBAAgB,kBAAkB,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,aAAa,EAAE,CAAA;CAAE,+BAkEvE"}
@@ -1,8 +1,9 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, Badge } from "@parhelia/core";
2
+ import { Accordion, AccordionContent, AccordionItem, AccordionTrigger, SettingsEmptyState, SettingsStat, SettingsStatGrid, cn, settingsText, } from "@parhelia/core";
3
+ import { ListChecks } from "lucide-react";
3
4
  import { cost, duration } from "../format";
4
5
  export function BenchmarkTasksList({ tasks }) {
5
6
  if (!tasks.length)
6
- return _jsx("p", { className: "text-neutral-grey-50 py-10 text-center text-sm", children: "No tasks are defined in the current suite." });
7
- return _jsx("div", { className: "space-y-4", children: _jsx(Accordion, { type: "multiple", className: "-mt-2", children: tasks.map(t => _jsxs(AccordionItem, { value: t.key, className: "border-border-default last:border-b-0", children: [_jsx(AccordionTrigger, { className: "py-3 hover:no-underline", children: _jsxs("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1", children: [_jsx("span", { className: "text-neutral-grey-100 text-sm font-medium", children: t.title }), _jsx(Badge, { variant: "secondary", children: t.isCore ? "Core" : "Vision" }), t.requiresJudge && _jsx(Badge, { variant: "outline", children: "Optional judge" }), _jsx("span", { className: "text-neutral-grey-50 ml-auto hidden text-xs md:inline", children: t.category })] }) }), _jsx(AccordionContent, { children: _jsxs("div", { className: "space-y-3 pb-3", children: [t.description && t.description !== t.category && _jsx("p", { className: "text-neutral-grey-100 text-sm", children: t.description }), _jsxs("dl", { className: "grid gap-3 sm:grid-cols-3", children: [_jsxs("div", { className: "bg-neutral-grey-5 rounded p-3", children: [_jsx("dt", { className: "text-neutral-grey-50 text-xs font-medium", children: "Tool-call budget" }), _jsxs("dd", { className: "text-neutral-grey-100 mt-1 text-sm font-medium tabular-nums", children: [t.toolCallBudget, " calls"] })] }), _jsxs("div", { className: "bg-neutral-grey-5 rounded p-3", children: [_jsx("dt", { className: "text-neutral-grey-50 text-xs font-medium", children: "Cost budget" }), _jsx("dd", { className: "text-neutral-grey-100 mt-1 text-sm font-medium tabular-nums", children: cost(t.costBudgetUsd) })] }), _jsxs("div", { className: "bg-neutral-grey-5 rounded p-3", children: [_jsx("dt", { className: "text-neutral-grey-50 text-xs font-medium", children: "Timeout" }), _jsx("dd", { className: "text-neutral-grey-100 mt-1 text-sm font-medium tabular-nums", children: duration(t.timeoutSeconds * 1000) })] })] }), _jsxs("div", { children: [_jsx("h4", { className: "text-neutral-grey-50 mb-1.5 text-xs font-medium tracking-wide uppercase", children: "Prompt" }), _jsx("p", { className: "bg-neutral-grey-5 text-neutral-grey-100 rounded p-3 text-sm whitespace-pre-wrap", children: t.prompt })] })] }) })] }, t.key)) }) });
7
+ return (_jsx(SettingsEmptyState, { icon: ListChecks, title: "No tasks are defined in the current suite." }));
8
+ return (_jsx(Accordion, { type: "multiple", className: "-mt-3", children: tasks.map((t) => (_jsxs(AccordionItem, { value: t.key, className: "border-border-default last:border-b-0", children: [_jsx(AccordionTrigger, { className: "py-3 hover:no-underline", children: _jsxs("span", { className: "flex min-w-0 flex-1 flex-wrap items-center gap-x-3 gap-y-1", children: [_jsx("span", { className: settingsText.label, children: t.title }), _jsxs("span", { className: settingsText.meta, children: [t.isCore ? "Core" : "Vision", t.requiresJudge && " · optional judge"] }), _jsx("span", { className: cn("ml-auto hidden md:inline", settingsText.meta), children: t.category })] }) }), _jsx(AccordionContent, { children: _jsxs("div", { className: "flex flex-col gap-4 pb-3", children: [t.description && t.description !== t.category && (_jsx("p", { className: settingsText.body, children: t.description })), _jsxs(SettingsStatGrid, { children: [_jsx(SettingsStat, { label: "Tool-call budget", value: `${t.toolCallBudget} calls` }), _jsx(SettingsStat, { label: "Cost budget", value: cost(t.costBudgetUsd) }), _jsx(SettingsStat, { label: "Timeout", value: duration(t.timeoutSeconds * 1000) })] }), _jsxs("div", { children: [_jsx("h4", { className: settingsText.caption, children: "Prompt" }), _jsx("p", { className: cn("bg-neutral-grey-5 mt-1.5 rounded-md p-3 whitespace-pre-wrap", settingsText.body), children: t.prompt })] })] }) })] }, t.key))) }));
8
9
  }
@@ -1,5 +1,5 @@
1
1
  import type { BenchmarkStatus } from "../types";
2
- export declare function NotPreparedState({ status, busy, prepare }: {
2
+ export declare function NotPreparedState({ status, busy, prepare, }: {
3
3
  status: BenchmarkStatus;
4
4
  busy: boolean;
5
5
  prepare: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"NotPreparedState.d.ts","sourceRoot":"","sources":["../../src/components/NotPreparedState.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAAE,MAAM,EAAE,eAAe,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,+BAS1H"}
1
+ {"version":3,"file":"NotPreparedState.d.ts","sourceRoot":"","sources":["../../src/components/NotPreparedState.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAChD,wBAAgB,gBAAgB,CAAC,EAC/B,MAAM,EACN,IAAI,EACJ,OAAO,GACR,EAAE;IACD,MAAM,EAAE,eAAe,CAAC;IACxB,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,+BA2CA"}
@@ -1,6 +1,8 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Alert, AlertDescription, Button, SettingsCard } from "@parhelia/core";
3
- import { AlertCircle, ShieldCheck } from "lucide-react";
4
- export function NotPreparedState({ status, busy, prepare }) {
5
- return _jsx("div", { "data-testid": "benchmark-not-prepared", children: _jsx(SettingsCard, { icon: _jsx(ShieldCheck, { className: "h-5 w-5", strokeWidth: 1 }), title: "Prepare the benchmark environment", description: "Create the restricted service account, permissions, quota and folders used for isolated task copies.", children: _jsxs("div", { className: "space-y-4", children: [status.prepared.error && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: status.prepared.error })] }), !status.migrationsApplied && _jsxs(Alert, { variant: "warning", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsxs(AlertDescription, { children: ["Missing database tables: ", status.missingTables.join(", "), ". Apply the module migrations before preparing."] })] }), _jsxs("p", { className: "text-neutral-grey-50 text-sm", children: ["Preparation runs once per environment", status.runnerUser ? ` and creates the runner user ${status.runnerUser}` : "", ". Existing content is not touched."] }), _jsx("div", { children: _jsx(Button, { "data-testid": "benchmark-prepare-button", disabled: busy || !status.migrationsApplied, onClick: prepare, children: "Prepare environment" }) })] }) }) });
2
+ import { Alert, AlertDescription, Button, SettingsCard, settingsText, } from "@parhelia/core";
3
+ import { AlertCircle, AlertTriangle, ShieldCheck } from "lucide-react";
4
+ export function NotPreparedState({ status, busy, prepare, }) {
5
+ return (_jsx(SettingsCard, { icon: _jsx(ShieldCheck, { strokeWidth: 1 }), title: "Prepare the benchmark environment", description: "Create the restricted service account, permissions, quota and folders used for isolated task copies.", headerActions: _jsx(Button, { size: "sm", "data-testid": "benchmark-prepare-button", disabled: busy || !status.migrationsApplied, onClick: prepare, children: "Prepare environment" }), children: _jsxs("div", { "data-testid": "benchmark-not-prepared", className: "flex flex-col gap-4", children: [status.prepared.error && (_jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1 }), _jsx(AlertDescription, { children: status.prepared.error })] })), !status.migrationsApplied && (_jsxs(Alert, { variant: "warning", children: [_jsx(AlertTriangle, { className: "h-4 w-4", strokeWidth: 1 }), _jsxs(AlertDescription, { children: ["Missing database tables: ", status.missingTables.join(", "), ". Apply the module migrations before preparing."] })] })), _jsxs("p", { className: settingsText.help, children: ["Preparation runs once per environment", status.runnerUser
6
+ ? ` and creates the runner user ${status.runnerUser}`
7
+ : "", ". Existing content is not touched."] })] }) }));
6
8
  }
@@ -1,5 +1,5 @@
1
1
  import type { BenchmarkTaskResult } from "../types";
2
- export declare function RecoveryBanner({ tasks, busy, recover }: {
2
+ export declare function RecoveryBanner({ tasks, busy, recover, }: {
3
3
  tasks: BenchmarkTaskResult[];
4
4
  busy: boolean;
5
5
  recover: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"RecoveryBanner.d.ts","sourceRoot":"","sources":["../../src/components/RecoveryBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,UAAU,CAAC;AAOnE,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE;IAAE,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAAC,IAAI,EAAE,OAAO,CAAC;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAE,sCAe5H"}
1
+ {"version":3,"file":"RecoveryBanner.d.ts","sourceRoot":"","sources":["../../src/components/RecoveryBanner.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,mBAAmB,EAAiB,MAAM,UAAU,CAAC;AAOnE,wBAAgB,cAAc,CAAC,EAC7B,KAAK,EACL,IAAI,EACJ,OAAO,GACR,EAAE;IACD,KAAK,EAAE,mBAAmB,EAAE,CAAC;IAC7B,IAAI,EAAE,OAAO,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;CACrB,sCAoCA"}
@@ -7,8 +7,8 @@ const recoveryReasons = {
7
7
  Unconfirmed: "Agent could not be confirmed stopped",
8
8
  Confirmed: "Agent stopped; test data cleanup required",
9
9
  };
10
- export function RecoveryBanner({ tasks, busy, recover }) {
10
+ export function RecoveryBanner({ tasks, busy, recover, }) {
11
11
  if (!tasks.length)
12
12
  return null;
13
- return _jsxs(Alert, { "data-testid": "benchmark-recovery-banner", variant: "warning", role: "status", children: [_jsx(AlertTriangle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsxs("div", { className: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs(AlertTitle, { children: [tasks.length, " ", tasks.length === 1 ? "task needs" : "tasks need", " recovery"] }), _jsxs(AlertDescription, { children: [_jsx("p", { children: "Recover these tasks to safely stop any remaining agents and clean up their test data before starting another benchmark." }), _jsx("ul", { className: "mt-2 space-y-0.5", children: tasks.map(t => _jsxs("li", { children: [_jsx("span", { className: "font-medium", children: t.taskTitle }), " \u00B7 ", recoveryReasons[t.shutdownState]] }, t.taskResultId)) })] })] }), _jsx(Button, { size: "sm", disabled: busy, onClick: recover, children: "Recover now" })] })] });
13
+ return (_jsxs(Alert, { "data-testid": "benchmark-recovery-banner", variant: "warning", role: "status", children: [_jsx(AlertTriangle, { className: "h-4 w-4", strokeWidth: 1 }), _jsxs("div", { className: "flex flex-wrap items-start justify-between gap-x-6 gap-y-3", children: [_jsxs("div", { className: "min-w-0 flex-1", children: [_jsxs(AlertTitle, { children: [tasks.length, " ", tasks.length === 1 ? "task needs" : "tasks need", " ", "recovery"] }), _jsxs(AlertDescription, { children: [_jsx("p", { children: "Recover these tasks to safely stop any remaining agents and clean up their test data before starting another benchmark." }), _jsx("ul", { className: "mt-2 space-y-0.5", children: tasks.map((t) => (_jsxs("li", { children: [_jsx("span", { className: "font-medium", children: t.taskTitle }), " \u00B7", " ", recoveryReasons[t.shutdownState]] }, t.taskResultId))) })] })] }), _jsx(Button, { size: "sm", disabled: busy, onClick: recover, children: "Recover now" })] })] }));
14
14
  }
@@ -0,0 +1,6 @@
1
+ /** A run's status: badged only when the run failed; any other state is a plain note. */
2
+ export declare function RunStatus({ status, className, }: {
3
+ status: string;
4
+ className?: string;
5
+ }): import("react").JSX.Element;
6
+ //# sourceMappingURL=RunStatus.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"RunStatus.d.ts","sourceRoot":"","sources":["../../src/components/RunStatus.tsx"],"names":[],"mappings":"AAeA,wFAAwF;AACxF,wBAAgB,SAAS,CAAC,EACxB,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,+BASA"}
@@ -0,0 +1,21 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { Badge, capitalizeFirstLetter, cn, settingsText } from "@parhelia/core";
3
+ const labels = {
4
+ NeedsRecovery: "Needs recovery",
5
+ TimedOut: "Timed out",
6
+ CostLimit: "Cost limit",
7
+ TokenLimit: "Token limit",
8
+ };
9
+ const failed = [
10
+ "Failed",
11
+ "NeedsRecovery",
12
+ "Unconfirmed",
13
+ "TimedOut",
14
+ "CostLimit",
15
+ "TokenLimit",
16
+ ];
17
+ /** A run's status: badged only when the run failed; any other state is a plain note. */
18
+ export function RunStatus({ status, className, }) {
19
+ const label = capitalizeFirstLetter(labels[status] ?? status);
20
+ return failed.includes(status) ? (_jsx(Badge, { variant: "destructive", className: className, children: label })) : (_jsx("span", { className: cn(settingsText.meta, className), children: label }));
21
+ }
@@ -1,10 +1,18 @@
1
1
  import { type SafetyViolation, type TaskSafetyViolations } from "../safetyViolations";
2
+ /** The tool and its message. */
3
+ export declare function SafetyViolationMessage({ violation, }: {
4
+ violation: SafetyViolation;
5
+ }): import("react").JSX.Element;
6
+ /** The write's target item (shortened; the full path in a tooltip), language, version and fields. */
7
+ export declare function SafetyViolationTarget({ violation, }: {
8
+ violation: SafetyViolation;
9
+ }): import("react").JSX.Element | null;
2
10
  /** Tool and message, then the write's target item, language, version and fields. */
3
- export declare function SafetyViolationText({ violation }: {
11
+ export declare function SafetyViolationText({ violation, }: {
4
12
  violation: SafetyViolation;
5
13
  }): import("react").JSX.Element;
6
14
  /** Stat tile for a run with safety violations; opens a popover listing each violation by task. */
7
- export declare function SafetyViolationsStat({ total, groups, explanation }: {
15
+ export declare function SafetyViolationsStat({ total, groups, explanation, }: {
8
16
  total: number;
9
17
  groups: TaskSafetyViolations[];
10
18
  explanation: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SafetyViolationsStat.d.ts","sourceRoot":"","sources":["../../src/components/SafetyViolationsStat.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAa,KAAK,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,qBAAqB,CAAC;AAEjG,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,EAAE;IAAE,SAAS,EAAE,eAAe,CAAA;CAAE,+BAQhF;AAED,kGAAkG;AAClG,wBAAgB,oBAAoB,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,WAAW,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,+BA4B1I"}
1
+ {"version":3,"file":"SafetyViolationsStat.d.ts","sourceRoot":"","sources":["../../src/components/SafetyViolationsStat.tsx"],"names":[],"mappings":"AAeA,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,oBAAoB,EAC1B,MAAM,qBAAqB,CAAC;AAE7B,gCAAgC;AAChC,wBAAgB,sBAAsB,CAAC,EACrC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,eAAe,CAAC;CAC5B,+BASA;AAED,qGAAqG;AACrG,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,eAAe,CAAC;CAC5B,sCAsBA;AAED,oFAAoF;AACpF,wBAAgB,mBAAmB,CAAC,EAClC,SAAS,GACV,EAAE;IACD,SAAS,EAAE,eAAe,CAAC;CAC5B,+BAaA;AAED,kGAAkG;AAClG,wBAAgB,oBAAoB,CAAC,EACnC,KAAK,EACL,MAAM,EACN,WAAW,GACZ,EAAE;IACD,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,oBAAoB,EAAE,CAAC;IAC/B,WAAW,EAAE,MAAM,CAAC;CACrB,+BAqGA"}
@@ -1,14 +1,24 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger } from "@parhelia/core";
2
+ import { Popover, PopoverAnchor, PopoverContent, PopoverTrigger, SettingsStat, Tooltip, TooltipContent, TooltipTrigger, cn, settingsText, } from "@parhelia/core";
3
3
  import { ChevronDown, Info, MessageSquare } from "lucide-react";
4
4
  import { agentLink } from "../agentLink";
5
5
  import { count } from "../format";
6
- import { shortPath } from "../safetyViolations";
6
+ import { shortPath, } from "../safetyViolations";
7
+ /** The tool and its message. */
8
+ export function SafetyViolationMessage({ violation, }) {
9
+ return (_jsxs("span", { className: "flex flex-wrap items-baseline gap-x-1.5", children: [violation.tool && (_jsx("code", { className: settingsText.mono, children: violation.tool })), _jsx("span", { className: "break-words", children: violation.message })] }));
10
+ }
11
+ /** The write's target item (shortened; the full path in a tooltip), language, version and fields. */
12
+ export function SafetyViolationTarget({ violation, }) {
13
+ if (!violation.target && !violation.details.length)
14
+ return null;
15
+ return (_jsxs("span", { className: "break-words", children: [violation.target && (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx("span", { children: shortPath(violation.target) }) }), _jsx(TooltipContent, { className: "max-w-sm break-all", children: violation.target })] })), violation.details.map((detail, index) => (_jsxs("span", { children: [(violation.target || index > 0) && " · ", detail] }, index)))] }));
16
+ }
7
17
  /** Tool and message, then the write's target item, language, version and fields. */
8
- export function SafetyViolationText({ violation }) {
9
- return _jsxs(_Fragment, { children: [_jsxs("p", { className: "text-neutral-grey-100 flex flex-wrap items-baseline gap-x-1.5", children: [violation.tool && _jsx("code", { className: "font-mono", children: violation.tool }), _jsx("span", { className: "break-words", children: violation.message })] }), (violation.target || violation.details.length > 0) && _jsxs("p", { className: "text-neutral-grey-50 mt-0.5 text-xs break-words", children: [violation.target && _jsx("span", { title: violation.target, children: shortPath(violation.target) }), violation.details.map((detail, index) => _jsxs("span", { children: [(violation.target || index > 0) && " · ", detail] }, index))] })] });
18
+ export function SafetyViolationText({ violation, }) {
19
+ return (_jsxs(_Fragment, { children: [_jsx("div", { className: settingsText.body, children: _jsx(SafetyViolationMessage, { violation: violation }) }), (violation.target || violation.details.length > 0) && (_jsx("div", { className: cn("mt-0.5", settingsText.meta), children: _jsx(SafetyViolationTarget, { violation: violation }) }))] }));
10
20
  }
11
21
  /** Stat tile for a run with safety violations; opens a popover listing each violation by task. */
12
- export function SafetyViolationsStat({ total, groups, explanation }) {
13
- return _jsxs(Popover, { children: [_jsx(PopoverAnchor, { asChild: true, children: _jsxs("div", { role: "group", "aria-label": `Safety violations: ${count(total)}`, className: "bg-neutral-grey-5 hover:bg-neutral-grey-10 focus-within:ring-ring relative rounded p-3 transition-colors focus-within:ring-2", children: [_jsxs("dt", { className: "text-neutral-grey-50 flex items-center gap-1.5 text-xs font-medium", children: ["Safety violations", _jsx(Info, { "aria-hidden": "true", className: "h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 })] }), _jsx("dd", { className: "text-feedback-red mt-1 text-base font-medium tabular-nums", children: count(total) }), _jsx("dd", { className: "mt-0.5 text-xs", children: _jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", "data-testid": "benchmark-safety-violations-trigger", className: "text-neutral-grey-50 hover:text-neutral-grey-100 inline-flex cursor-pointer items-center gap-0.5 outline-none after:absolute after:inset-0 after:rounded", children: ["View details", _jsx(ChevronDown, { "aria-hidden": "true", className: "h-3.5 w-3.5", strokeWidth: 1.5 })] }) }) })] }) }), _jsxs(PopoverContent, { align: "start", sideOffset: 6, "data-testid": "benchmark-safety-violations", className: "w-96 max-w-[calc(100vw-2rem)] p-0", children: [_jsxs("div", { className: "border-border-default border-b px-4 py-3", children: [_jsxs("p", { className: "text-neutral-grey-100 text-sm font-medium", children: [count(total), " safety ", total === 1 ? "violation" : "violations"] }), _jsx("p", { className: "text-neutral-grey-50 mt-0.5 text-xs", children: explanation })] }), _jsx("div", { className: "max-h-80 space-y-3 overflow-y-auto px-4 py-3", children: groups.length ? groups.map(({ task, violations }) => _jsxs("section", { "data-testid": `benchmark-safety-violations-${task.taskKey}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h4", { className: "text-neutral-grey-100 text-xs font-medium", children: task.taskTitle }), task.agentId && _jsxs("a", { href: agentLink(task.agentId), className: "text-neutral-grey-50 hover:text-neutral-grey-100 inline-flex shrink-0 items-center gap-1 text-xs", children: [_jsx(MessageSquare, { "aria-hidden": "true", className: "h-3.5 w-3.5", strokeWidth: 1.5 }), "Conversation"] })] }), _jsx("ul", { className: "mt-1.5 space-y-1.5", children: violations.map((violation, index) => _jsx("li", { className: "bg-neutral-grey-5 rounded px-2.5 py-2 text-xs", children: _jsx(SafetyViolationText, { violation: violation }) }, index)) })] }, task.taskKey)) : _jsx("p", { className: "text-neutral-grey-50 text-xs", children: "No violation details were recorded for this run." }) })] })] });
22
+ export function SafetyViolationsStat({ total, groups, explanation, }) {
23
+ return (_jsxs(Popover, { children: [_jsx(PopoverAnchor, { asChild: true, children: _jsx("div", { role: "group", "aria-label": `Safety violations: ${count(total)}`, className: "focus-within:ring-ring hover:[&>div]:bg-neutral-grey-10 relative min-w-0 rounded-md focus-within:ring-2 [&>div]:transition-colors", children: _jsx(SettingsStat, { tone: "danger", label: _jsxs("span", { className: "inline-flex items-center gap-1.5", children: ["Safety violations", _jsx(Info, { "aria-hidden": "true", className: "size-3.5 shrink-0", strokeWidth: 1 })] }), value: count(total), hint: _jsx(PopoverTrigger, { asChild: true, children: _jsxs("button", { type: "button", "data-testid": "benchmark-safety-violations-trigger", className: "hover:text-neutral-grey-100 inline-flex cursor-pointer items-center gap-0.5 outline-none after:absolute after:inset-0 after:rounded-md", children: ["View details", _jsx(ChevronDown, { "aria-hidden": "true", className: "size-3.5", strokeWidth: 1 })] }) }) }) }) }), _jsxs(PopoverContent, { align: "start", sideOffset: 6, "data-testid": "benchmark-safety-violations", className: "w-96 max-w-[calc(100vw-2rem)] p-0", children: [_jsxs("div", { className: "border-border-default border-b px-4 py-3", children: [_jsxs("p", { className: settingsText.label, children: [count(total), " safety ", total === 1 ? "violation" : "violations"] }), _jsx("p", { className: cn("mt-0.5", settingsText.help), children: explanation })] }), _jsx("div", { className: "flex max-h-80 flex-col gap-4 overflow-y-auto px-4 py-3", children: groups.length ? (groups.map(({ task, violations }) => (_jsxs("section", { "data-testid": `benchmark-safety-violations-${task.taskKey}`, children: [_jsxs("div", { className: "flex items-center justify-between gap-2", children: [_jsx("h4", { className: settingsText.label, children: task.taskTitle }), task.agentId && (_jsxs("a", { href: agentLink(task.agentId), className: cn("hover:text-neutral-grey-100 inline-flex shrink-0 items-center gap-1", settingsText.meta), children: [_jsx(MessageSquare, { "aria-hidden": "true", className: "size-3.5", strokeWidth: 1 }), "Conversation"] }))] }), _jsx("ul", { className: "mt-1.5 flex flex-col gap-1.5", children: violations.map((violation, index) => (_jsx("li", { className: "bg-neutral-grey-5 rounded-md px-3 py-2", children: _jsx(SafetyViolationText, { violation: violation }) }, index))) })] }, task.taskKey)))) : (_jsx("p", { className: settingsText.meta, children: "No violation details were recorded for this run." })) })] })] }));
14
24
  }
@@ -2,7 +2,7 @@ import type { BenchmarkModel, StartRequest } from "../types";
2
2
  export declare function VisionNote({ model }: {
3
3
  model: BenchmarkModel;
4
4
  }): import("react").JSX.Element;
5
- export declare function StartBenchmarkDialog({ open, onOpenChange, start, busy }: {
5
+ export declare function StartBenchmarkDialog({ open, onOpenChange, start, busy, }: {
6
6
  open: boolean;
7
7
  onOpenChange: (open: boolean) => void;
8
8
  start: (request: StartRequest) => Promise<void>;
@@ -1 +1 @@
1
- {"version":3,"file":"StartBenchmarkDialog.d.ts","sourceRoot":"","sources":["../../src/components/StartBenchmarkDialog.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,cAAc,EAAiB,YAAY,EAAE,MAAM,UAAU,CAAC;AAc5E,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,+BAU9D;AAED,wBAAgB,oBAAoB,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAC;IAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAAC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,+BAmGjM"}
1
+ {"version":3,"file":"StartBenchmarkDialog.d.ts","sourceRoot":"","sources":["../../src/components/StartBenchmarkDialog.tsx"],"names":[],"mappings":"AAgCA,OAAO,KAAK,EAAE,cAAc,EAAiB,YAAY,EAAE,MAAM,UAAU,CAAC;AAS5E,wBAAgB,UAAU,CAAC,EAAE,KAAK,EAAE,EAAE;IAAE,KAAK,EAAE,cAAc,CAAA;CAAE,+BAkB9D;AAED,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,KAAK,EACL,IAAI,GACL,EAAE;IACD,IAAI,EAAE,OAAO,CAAC;IACd,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IACtC,KAAK,EAAE,CAAC,OAAO,EAAE,YAAY,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAChD,IAAI,EAAE,OAAO,CAAC;CACf,+BAuSA"}
@@ -1,22 +1,23 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useEffect, useState } from "react";
3
- import { Alert, AlertDescription, Button, Checkbox, Dialog, DialogContent, DialogFooter, Input, Label, MultiSwitchButton, Select, StyledDialogTitle, Switch } from "@parhelia/core";
4
- import { AlertCircle, CircleHelp, Gauge, Image, ImageOff } from "lucide-react";
3
+ import { Alert, AlertDescription, Button, Checkbox, Dialog, DialogContent, DialogFooter, FormField, Input, Label, MultiSwitchButton, Select, SettingsRow, SettingsStat, SettingsStatGrid, StyledDialogTitle, Switch, cn, settingsTable, settingsText, } from "@parhelia/core";
4
+ import { AlertCircle, AlertTriangle, CircleHelp, Gauge, Image, ImageOff, } from "lucide-react";
5
5
  import { benchmarkService } from "../services/benchmarkService";
6
6
  const runPresets = ["1", "2", "3", "5", "10"];
7
- function formatUsd(value) { return value == null ? "–" : `$${value}`; }
8
- function PriceTile({ label, value }) {
9
- return _jsxs("div", { className: "min-w-0 px-4 py-3", children: [_jsx("p", { className: "text-neutral-grey-50 text-2xs font-medium tracking-wide uppercase", children: label }), _jsx("p", { className: "text-neutral-grey-100 mt-0.5 truncate text-base font-semibold tabular-nums", children: formatUsd(value) })] });
7
+ function formatUsd(value) {
8
+ return value == null ? "–" : `$${value}`;
10
9
  }
11
10
  export function VisionNote({ model }) {
12
11
  const state = model.supportsImageInput;
13
12
  const Icon = state === true ? Image : state === false ? ImageOff : CircleHelp;
14
- const text = state === true ? "Accepts image input. The hero image task will run."
15
- : state === false ? "Does not accept images. The hero image task will be skipped."
13
+ const text = state === true
14
+ ? "Accepts image input. The hero image task will run."
15
+ : state === false
16
+ ? "Does not accept images. The hero image task will be skipped."
16
17
  : "Image input capability is not recorded in Parhelia. The hero image task will still run.";
17
- return _jsxs("div", { className: "text-neutral-grey-50 flex items-start gap-2 text-xs", children: [_jsx(Icon, { className: "mt-px h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsx("p", { children: text })] });
18
+ return (_jsxs("div", { className: cn("flex items-start gap-2", settingsText.help), children: [_jsx("span", { className: "flex h-5 shrink-0 items-center", children: _jsx(Icon, { className: "size-3.5", strokeWidth: 1 }) }), _jsx("p", { children: text })] }));
18
19
  }
19
- export function StartBenchmarkDialog({ open, onOpenChange, start, busy }) {
20
+ export function StartBenchmarkDialog({ open, onOpenChange, start, busy, }) {
20
21
  const [models, setModels] = useState([]);
21
22
  const [tasks, setTasks] = useState([]);
22
23
  const [modelId, setModelId] = useState("");
@@ -29,20 +30,55 @@ export function StartBenchmarkDialog({ open, onOpenChange, start, busy }) {
29
30
  if (!open)
30
31
  return;
31
32
  let alive = true;
32
- Promise.all([benchmarkService.models(), benchmarkService.tasks()]).then(([m, t]) => { if (alive) {
33
- setModels(m.models);
34
- setTasks(t.tasks);
35
- setSelected(t.tasks.map(x => x.id));
36
- setError(undefined);
37
- } }).catch(e => { if (alive)
38
- setError(String(e)); });
39
- return () => { alive = false; };
33
+ Promise.all([benchmarkService.models(), benchmarkService.tasks()])
34
+ .then(([m, t]) => {
35
+ if (alive) {
36
+ setModels(m.models);
37
+ setTasks(t.tasks);
38
+ setSelected(t.tasks.map((x) => x.id));
39
+ setError(undefined);
40
+ }
41
+ })
42
+ .catch((e) => {
43
+ if (alive)
44
+ setError(String(e));
45
+ });
46
+ return () => {
47
+ alive = false;
48
+ };
40
49
  }, [open]);
41
- const model = models.find(m => m.id === modelId);
42
- const valid = !!model && (model.hasPricing || allowUnknown) && runCount >= 1 && runCount <= 10 && Number.isInteger(runCount) && (!subset || selected.length > 0);
50
+ const model = models.find((m) => m.id === modelId);
51
+ const valid = !!model &&
52
+ (model.hasPricing || allowUnknown) &&
53
+ runCount >= 1 &&
54
+ runCount <= 10 &&
55
+ Number.isInteger(runCount) &&
56
+ (!subset || selected.length > 0);
43
57
  const pricing = model?.pricing;
44
- const preset = runPresets.find(p => Number(p) === runCount);
58
+ const preset = runPresets.find((p) => Number(p) === runCount);
45
59
  const taskCount = subset ? selected.length : tasks.length;
46
- const summary = model ? `${taskCount} task${taskCount === 1 ? "" : "s"} × ${runCount} run${runCount === 1 ? "" : "s"}` : undefined;
47
- return _jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { "data-testid": "benchmark-start-dialog", className: "flex max-h-[85vh] max-w-xl flex-col gap-0 overflow-hidden p-0", children: [_jsx(StyledDialogTitle, { icon: _jsx(Gauge, { strokeWidth: 1 }), title: "Start benchmark", subtitle: "Every task runs on a fresh content and media copy with the same model and configuration" }), _jsxs("div", { className: "min-h-0 flex-1 space-y-6 overflow-y-auto px-6 py-5", children: [error && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: error })] }), _jsxs("section", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "benchmark-model", children: "Model" }), _jsx(Select, { id: "benchmark-model", "data-testid": "benchmark-start-model-select", searchable: true, placeholder: "Choose a model", value: modelId, options: models.map(m => ({ value: m.id, label: `${m.name} · ${m.providerName}`, description: m.hasPricing ? "Pricing available" : "Cost unknown" })), onValueChange: id => { setModelId(id); setAllowUnknown(false); } }), model && _jsxs("div", { className: "border-border-default overflow-hidden rounded-lg border", children: [model.hasPricing ? _jsxs(_Fragment, { children: [_jsxs("div", { className: "border-border-default flex items-center justify-between border-b px-4 py-2", children: [_jsx("p", { className: "text-neutral-grey-100 text-xs font-medium", children: "Pricing" }), _jsx("p", { className: "text-neutral-grey-50 text-xs", children: "USD per million tokens" })] }), _jsxs("div", { className: "divide-border-default grid grid-cols-3 divide-x", children: [_jsx(PriceTile, { label: "Input", value: pricing?.inputCostPer1MTokens }), _jsx(PriceTile, { label: "Output", value: pricing?.outputCostPer1MTokens }), _jsx(PriceTile, { label: "Cached input", value: pricing?.cachedInputCostPer1MTokens })] })] }) : _jsxs("div", { className: "space-y-3 px-4 py-3", children: [_jsxs("div", { className: "text-neutral-grey-100 flex items-start gap-2 text-xs", children: [_jsx(AlertCircle, { className: "text-feedback-orange mt-px h-3.5 w-3.5 shrink-0", strokeWidth: 1.5 }), _jsx("p", { children: "No pricing is configured for this model, so cost cannot be tracked. Token and time limits still apply." })] }), _jsxs("label", { className: "text-neutral-grey-100 flex items-center gap-2 text-sm", children: [_jsx(Checkbox, { "data-testid": "benchmark-start-allow-unknown-cost", checked: allowUnknown, onCheckedChange: v => setAllowUnknown(v === true) }), "Run without cost tracking"] })] }), _jsx("div", { className: "border-border-default bg-neutral-grey-5 border-t px-4 py-2.5", children: _jsx(VisionNote, { model: model }) })] })] }), _jsxs("section", { className: "space-y-2", children: [_jsx(Label, { htmlFor: "benchmark-count", children: "Runs" }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(MultiSwitchButton, { value: preset ?? "", options: runPresets.map(value => ({ value, label: value })), onValueChange: value => setRunCount(Number(value)), className: "w-56 shrink-0", "aria-label": "Number of runs", testId: "benchmark-start-run-presets" }), _jsx("span", { className: "text-neutral-grey-50 text-xs", children: "or" }), _jsx(Input, { id: "benchmark-count", className: "w-16 text-center tabular-nums", type: "number", min: 1, max: 10, value: runCount, onChange: e => setRunCount(Number(e.target.value)), "aria-label": "Custom number of runs" })] }), _jsx("p", { className: "text-neutral-grey-50 text-xs", children: "Between 1 and 10. Repeated runs improve the leaderboard median." })] }), _jsxs("section", { className: "border-border-default overflow-hidden rounded-lg border", children: [_jsxs("label", { className: "flex cursor-pointer items-center justify-between gap-4 px-4 py-3", children: [_jsxs("span", { className: "min-w-0", children: [_jsx("span", { className: "text-neutral-grey-100 block text-sm font-medium", children: "Choose a task subset" }), _jsx("span", { className: "text-neutral-grey-50 block text-xs", children: "Run only selected tasks. Subset runs are excluded from the leaderboard." })] }), _jsx(Switch, { checked: subset, onCheckedChange: setSubset, "data-testid": "benchmark-start-subset" })] }), subset && _jsxs("div", { className: "border-border-default bg-neutral-grey-5 space-y-3 border-t px-4 py-3", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: "text-neutral-grey-50 text-xs tabular-nums", children: [selected.length, " of ", tasks.length, " selected"] }), _jsxs("div", { className: "flex gap-1", children: [_jsx(Button, { size: "xs", variant: "ghost", onClick: () => setSelected(tasks.map(t => t.id)), disabled: selected.length === tasks.length, children: "Select all" }), _jsx(Button, { size: "xs", variant: "ghost", onClick: () => setSelected([]), disabled: !selected.length, children: "Clear" })] })] }), _jsxs("table", { "aria-label": "Task subset", className: "w-full table-fixed border-collapse text-left", children: [_jsx("thead", { className: "text-neutral-grey-50 text-xs", children: _jsxs("tr", { className: "border-border-default border-b", children: [_jsx("th", { scope: "col", className: "w-1/2 px-2 py-2 font-medium", children: "Task" }), _jsx("th", { scope: "col", className: "px-2 py-2 font-medium", children: "Category" })] }) }), _jsx("tbody", { children: tasks.map(t => _jsxs("tr", { className: "border-border-default border-b last:border-b-0", children: [_jsx("td", { className: "px-2 py-2 align-top", children: _jsxs("label", { className: "text-neutral-grey-100 flex cursor-pointer items-start gap-2 text-sm", children: [_jsx(Checkbox, { className: "mt-0.5 shrink-0", checked: selected.includes(t.id), onCheckedChange: v => setSelected(old => v === true ? [...old, t.id] : old.filter(id => id !== t.id)) }), _jsx("span", { className: "min-w-0 break-words", children: t.title })] }) }), _jsxs("td", { className: "text-neutral-grey-50 break-words px-2 py-2 align-top text-xs", children: [t.category, t.requiresVision ? " · vision" : "", t.isCore ? "" : " · optional"] })] }, t.id)) })] })] })] })] }), _jsxs(DialogFooter, { className: "border-border-default shrink-0 items-center border-t px-6 py-4 sm:justify-between", children: [_jsx("p", { className: "text-neutral-grey-50 text-xs tabular-nums", children: summary }), _jsxs("div", { className: "flex flex-col-reverse gap-3 sm:flex-row", children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), disabled: busy, children: "Cancel" }), _jsx(Button, { "data-testid": "benchmark-start-submit", disabled: !valid || busy, onClick: () => { setError(undefined); void start({ modelItemId: modelId, runCount, taskIds: subset ? selected : undefined, allowUnknownCost: allowUnknown }).catch(e => setError(String(e))); }, children: busy ? "Starting…" : "Start benchmark" })] })] })] }) });
60
+ const summary = model
61
+ ? `${taskCount} task${taskCount === 1 ? "" : "s"} × ${runCount} run${runCount === 1 ? "" : "s"}`
62
+ : undefined;
63
+ return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { "data-testid": "benchmark-start-dialog", className: "flex max-h-[85vh] max-w-xl flex-col gap-0 overflow-hidden p-0", children: [_jsx(StyledDialogTitle, { icon: _jsx(Gauge, { strokeWidth: 1 }), title: "Start benchmark", subtitle: "Every task runs on a fresh content and media copy with the same model and configuration" }), _jsxs("div", { className: "flex min-h-0 flex-1 flex-col gap-6 overflow-y-auto px-6 py-5", children: [error && (_jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1 }), _jsx(AlertDescription, { children: error })] })), _jsxs("div", { className: "flex flex-col gap-3", children: [_jsx(FormField, { label: "Model", children: _jsx(Select, { id: "benchmark-model", "data-testid": "benchmark-start-model-select", searchable: true, placeholder: "Choose a model", value: modelId, options: models.map((m) => ({
64
+ value: m.id,
65
+ label: `${m.name} · ${m.providerName}`,
66
+ description: m.hasPricing
67
+ ? "Pricing available"
68
+ : "Cost unknown",
69
+ })), onValueChange: (id) => {
70
+ setModelId(id);
71
+ setAllowUnknown(false);
72
+ } }) }), model &&
73
+ (model.hasPricing ? (_jsxs("div", { children: [_jsxs("div", { className: "flex items-baseline justify-between gap-3", children: [_jsx("p", { className: settingsText.caption, children: "Pricing" }), _jsx("p", { className: settingsText.meta, children: "USD per million tokens" })] }), _jsxs(SettingsStatGrid, { className: "mt-1.5 grid-cols-3", children: [_jsx(SettingsStat, { label: "Input", value: formatUsd(pricing?.inputCostPer1MTokens) }), _jsx(SettingsStat, { label: "Output", value: formatUsd(pricing?.outputCostPer1MTokens) }), _jsx(SettingsStat, { label: "Cached input", value: formatUsd(pricing?.cachedInputCostPer1MTokens) })] })] })) : (_jsxs(_Fragment, { children: [_jsxs(Alert, { variant: "warning", children: [_jsx(AlertTriangle, { className: "h-4 w-4", strokeWidth: 1 }), _jsx(AlertDescription, { children: "No pricing is configured for this model, so cost cannot be tracked. Token and time limits still apply." })] }), _jsxs("label", { className: cn("flex items-center gap-2", settingsText.body), children: [_jsx(Checkbox, { "data-testid": "benchmark-start-allow-unknown-cost", checked: allowUnknown, onCheckedChange: (v) => setAllowUnknown(v === true) }), "Run without cost tracking"] })] }))), model && _jsx(VisionNote, { model: model })] }), _jsxs("div", { className: "flex flex-col gap-1.5", children: [_jsx(Label, { htmlFor: "benchmark-count", className: settingsText.label, children: "Runs" }), _jsxs("div", { className: "flex items-center gap-3", children: [_jsx(MultiSwitchButton, { value: preset ?? "", options: runPresets.map((value) => ({ value, label: value })), onValueChange: (value) => setRunCount(Number(value)), className: "w-56 shrink-0", "aria-label": "Number of runs", testId: "benchmark-start-run-presets" }), _jsx("span", { className: settingsText.meta, children: "or" }), _jsx(Input, { id: "benchmark-count", className: "w-16 text-center tabular-nums", type: "number", min: 1, max: 10, value: runCount, onChange: (e) => setRunCount(Number(e.target.value)), "aria-label": "Custom number of runs" })] }), _jsx("p", { className: settingsText.help, children: "Between 1 and 10. Repeated runs improve the leaderboard median." })] }), _jsx("div", { children: _jsx(SettingsRow, { label: "Choose a task subset", htmlFor: "benchmark-start-subset", description: "Run only selected tasks. Subset runs are excluded from the leaderboard.", toggle: _jsx(Switch, { id: "benchmark-start-subset", checked: subset, onCheckedChange: setSubset, "data-testid": "benchmark-start-subset" }), children: subset && (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("p", { className: cn("tabular-nums", settingsText.meta), children: [selected.length, " of ", tasks.length, " selected"] }), _jsxs("div", { className: "flex gap-1", children: [_jsx(Button, { size: "xs", variant: "ghost", onClick: () => setSelected(tasks.map((t) => t.id)), disabled: selected.length === tasks.length, children: "Select all" }), _jsx(Button, { size: "xs", variant: "ghost", onClick: () => setSelected([]), disabled: !selected.length, children: "Clear" })] })] }), _jsxs("table", { "aria-label": "Task subset", className: cn(settingsTable.table, "table-fixed"), children: [_jsx("thead", { className: settingsTable.head, children: _jsxs("tr", { children: [_jsx("th", { scope: "col", className: cn(settingsTable.th, "w-1/2 pl-0"), children: "Task" }), _jsx("th", { scope: "col", className: cn(settingsTable.th, "pr-0"), children: "Category" })] }) }), _jsx("tbody", { children: tasks.map((t) => (_jsxs("tr", { className: settingsTable.row, children: [_jsx("td", { className: cn(settingsTable.td, "py-2 pl-0 align-top"), children: _jsxs("label", { className: "flex cursor-pointer items-start gap-2", children: [_jsx("span", { className: "flex h-5 shrink-0 items-center", children: _jsx(Checkbox, { checked: selected.includes(t.id), onCheckedChange: (v) => setSelected((old) => v === true
74
+ ? [...old, t.id]
75
+ : old.filter((id) => id !== t.id)) }) }), _jsx("span", { className: "min-w-0 break-words", children: t.title })] }) }), _jsxs("td", { className: cn(settingsTable.td, "py-2 pr-0 align-top break-words", settingsText.meta), children: [t.category, t.requiresVision ? " · vision" : "", t.isCore ? "" : " · optional"] })] }, t.id))) })] })] })) }) })] }), _jsxs(DialogFooter, { className: "border-border-default shrink-0 items-center border-t px-6 py-4 sm:justify-between", children: [_jsx("p", { className: cn("tabular-nums", settingsText.meta), children: summary }), _jsxs("div", { className: "flex flex-col-reverse gap-3 sm:flex-row", children: [_jsx(Button, { variant: "outline", onClick: () => onOpenChange(false), disabled: busy, children: "Cancel" }), _jsx(Button, { "data-testid": "benchmark-start-submit", disabled: !valid || busy, onClick: () => {
76
+ setError(undefined);
77
+ void start({
78
+ modelItemId: modelId,
79
+ runCount,
80
+ taskIds: subset ? selected : undefined,
81
+ allowUnknownCost: allowUnknown,
82
+ }).catch((e) => setError(String(e)));
83
+ }, children: busy ? "Starting…" : "Start benchmark" })] })] })] }) }));
48
84
  }
@@ -1,6 +1,6 @@
1
1
  import type { SafetyViolation } from "../safetyViolations";
2
2
  import type { GraderReport } from "../types";
3
- export declare function TaskChecksList({ report, violations }: {
3
+ export declare function TaskChecksList({ report, violations, }: {
4
4
  report?: GraderReport;
5
5
  violations?: SafetyViolation[];
6
6
  }): import("react").JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"TaskChecksList.d.ts","sourceRoot":"","sources":["../../src/components/TaskChecksList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,UAAU,CAAC;AAgBxD,wBAAgB,cAAc,CAAC,EAAE,MAAM,EAAE,UAAe,EAAE,EAAE;IAAE,MAAM,CAAC,EAAE,YAAY,CAAC;IAAC,UAAU,CAAC,EAAE,eAAe,EAAE,CAAA;CAAE,+BAyBpH"}
1
+ {"version":3,"file":"TaskChecksList.d.ts","sourceRoot":"","sources":["../../src/components/TaskChecksList.tsx"],"names":[],"mappings":"AAgBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAa,MAAM,UAAU,CAAC;AAqDxD,wBAAgB,cAAc,CAAC,EAC7B,MAAM,EACN,UAAe,GAChB,EAAE;IACD,MAAM,CAAC,EAAE,YAAY,CAAC;IACtB,UAAU,CAAC,EAAE,eAAe,EAAE,CAAC;CAChC,+BAsFA"}
@@ -1,32 +1,41 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Alert, AlertDescription, Badge } from "@parhelia/core";
3
- import { AlertCircle, CheckCircle2, MinusCircle, ShieldAlert, XCircle } from "lucide-react";
4
- import { SafetyViolationText } from "./SafetyViolationsStat";
5
- const groups = [{ key: "work", label: "Work" }, { key: "preservation", label: "Preservation" }, { key: "efficiency", label: "Efficiency" }, { key: "judge", label: "Judge" }];
2
+ import { Alert, AlertDescription, SettingsGroup, SettingsList, SettingsListItem, cn, settingsText, } from "@parhelia/core";
3
+ import { AlertCircle, CheckCircle2, MinusCircle, ShieldAlert, XCircle, } from "lucide-react";
4
+ import { SafetyViolationMessage, SafetyViolationTarget, } from "./SafetyViolationsStat";
5
+ const groups = [
6
+ { key: "work", label: "Work" },
7
+ { key: "preservation", label: "Preservation" },
8
+ { key: "efficiency", label: "Efficiency" },
9
+ { key: "judge", label: "Judge" },
10
+ ];
6
11
  const points = (value) => Number.isInteger(value) ? String(value) : value.toFixed(1);
12
+ /** List item titles truncate to one line; check descriptions and violation messages wrap instead. */
13
+ const wrap = "block whitespace-normal break-words";
7
14
  function CheckIcon({ check }) {
8
15
  if (check.skipped)
9
- return _jsx(MinusCircle, { "aria-label": "Skipped", className: "text-neutral-grey-50 mt-0.5 h-4 w-4 shrink-0", strokeWidth: 1.5 });
16
+ return (_jsx(MinusCircle, { "aria-label": "Skipped", className: "text-neutral-grey-50", strokeWidth: 1 }));
10
17
  if (check.passed)
11
- return _jsx(CheckCircle2, { "aria-label": "Passed", className: "text-feedback-green mt-0.5 h-4 w-4 shrink-0", strokeWidth: 1.5 });
12
- return _jsx(XCircle, { "aria-label": "Failed", className: "text-feedback-red mt-0.5 h-4 w-4 shrink-0", strokeWidth: 1.5 });
18
+ return (_jsx(CheckCircle2, { "aria-label": "Passed", className: "text-feedback-green", strokeWidth: 1 }));
19
+ return (_jsx(XCircle, { "aria-label": "Failed", className: "text-feedback-red", strokeWidth: 1 }));
13
20
  }
14
21
  /** Grading zeroes correctness for a failed critical check and for any safety violation; name whichever applied. */
15
22
  function zeroReason(report, violations) {
16
- const criticalCheck = report.checks.some(c => c.critical && !c.passed && !c.skipped);
23
+ const criticalCheck = report.checks.some((c) => c.critical && !c.passed && !c.skipped);
17
24
  if (violations && criticalCheck)
18
25
  return "A critical check failed and safety violations were recorded.";
19
26
  if (violations)
20
- return violations === 1 ? "A safety violation was recorded." : `${violations} safety violations were recorded.`;
27
+ return violations === 1
28
+ ? "A safety violation was recorded."
29
+ : `${violations} safety violations were recorded.`;
21
30
  return "A critical check failed.";
22
31
  }
23
- export function TaskChecksList({ report, violations = [] }) {
32
+ export function TaskChecksList({ report, violations = [], }) {
24
33
  if (!report)
25
- return _jsx("p", { className: "text-neutral-grey-50 text-sm", children: "Grading is not available for this task." });
26
- return _jsxs("div", { className: "space-y-4", children: [report.criticalFailed && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsxs(AlertDescription, { children: [zeroReason(report, violations.length), " Correctness is zero."] })] }), violations.length > 0 && _jsxs("section", { "data-testid": "benchmark-task-safety-violations", children: [_jsx("h4", { className: "text-neutral-grey-50 mb-1.5 text-xs font-medium tracking-wide uppercase", children: "Safety violations" }), _jsx("ul", { className: "border-border-default divide-border-default divide-y rounded border", children: violations.map((violation, index) => _jsxs("li", { className: "flex items-start gap-3 px-3 py-2 text-sm", children: [_jsx(ShieldAlert, { "aria-hidden": "true", className: "text-feedback-red mt-0.5 h-4 w-4 shrink-0", strokeWidth: 1.5 }), _jsx("div", { className: "min-w-0 flex-1", children: _jsx(SafetyViolationText, { violation: violation }) })] }, index)) })] }), groups.map(group => {
27
- const checks = report.checks.filter(c => c.class === group.key);
34
+ return (_jsx("p", { className: settingsText.help, children: "Grading is not available for this task." }));
35
+ return (_jsxs("div", { className: "flex flex-col gap-6", children: [report.criticalFailed && (_jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1 }), _jsxs(AlertDescription, { children: [zeroReason(report, violations.length), " Correctness is zero."] })] })), violations.length > 0 && (_jsx(SettingsGroup, { title: "Safety violations", "data-testid": "benchmark-task-safety-violations", children: _jsx(SettingsList, { children: violations.map((violation, index) => (_jsx(SettingsListItem, { icon: _jsx(ShieldAlert, { "aria-hidden": "true", className: "text-feedback-red", strokeWidth: 1 }), title: _jsx("span", { className: wrap, children: _jsx(SafetyViolationMessage, { violation: violation }) }), meta: (violation.target || violation.details.length > 0) && (_jsx("div", { children: _jsx(SafetyViolationTarget, { violation: violation }) })) }, index))) }) })), groups.map((group) => {
36
+ const checks = report.checks.filter((c) => c.class === group.key);
28
37
  if (!checks.length)
29
38
  return null;
30
- return _jsxs("section", { children: [_jsx("h4", { className: "text-neutral-grey-50 mb-1.5 text-xs font-medium tracking-wide uppercase", children: group.label }), _jsx("ul", { className: "border-border-default divide-border-default divide-y rounded border", children: checks.map(c => _jsxs("li", { "data-testid": `benchmark-task-check-${c.key}`, className: "flex items-start gap-3 px-3 py-2 text-sm", children: [_jsx(CheckIcon, { check: c }), _jsxs("span", { className: "min-w-0 flex-1", children: [_jsx("span", { className: "text-neutral-grey-100", children: c.description }), c.reason && _jsx("span", { className: "text-neutral-grey-50 mt-0.5 block text-xs", children: c.reason })] }), c.critical && _jsx(Badge, { variant: "outline", size: "sm", children: "Critical" }), _jsxs("span", { className: "text-neutral-grey-50 w-16 shrink-0 text-right text-xs whitespace-nowrap tabular-nums", children: [points(c.awarded), " / ", points(c.points)] })] }, c.key)) })] }, group.key);
31
- })] });
39
+ return (_jsx(SettingsGroup, { title: group.label, children: _jsx(SettingsList, { children: checks.map((c) => (_jsx(SettingsListItem, { "data-testid": `benchmark-task-check-${c.key}`, icon: _jsx(CheckIcon, { check: c }), title: _jsx("span", { className: wrap, children: c.description }), badges: c.critical && (_jsx("span", { className: settingsText.meta, children: "critical" })), meta: c.reason && _jsx("div", { children: c.reason }), actions: _jsxs("span", { className: cn("w-16 text-right whitespace-nowrap tabular-nums", settingsText.meta), children: [points(c.awarded), " / ", points(c.points)] }) }, c.key))) }) }, group.key));
40
+ })] }));
32
41
  }
package/dist/index.js CHANGED
@@ -6,9 +6,9 @@ export * from "./types";
6
6
  export function configureBenchmark(configuration) {
7
7
  if (configuration.settings.groups.some(g => g.panels.some(p => p.id === "model-benchmark")))
8
8
  return configuration;
9
- const panel = { id: "model-benchmark", title: "Model Benchmark", subtitle: "Compare models on isolated Sitecore editing tasks", icon: _jsx(Gauge, { strokeWidth: 1 }), content: _jsx(BenchmarkPanel, {}), requiresAdministrator: true, requiresModule: "benchmark" };
9
+ const panel = { id: "model-benchmark", title: "Model Benchmark", subtitle: "Compare models on isolated content editing tasks", icon: _jsx(Gauge, { strokeWidth: 1 }), content: _jsx(BenchmarkPanel, {}), requiresAdministrator: true, requiresModule: "benchmark" };
10
10
  const groups = configuration.settings.groups.map(g => ({ ...g, panels: [...g.panels] }));
11
- const ai = groups.find(g => g.title === "AI");
11
+ const ai = groups.find(g => g.panels.some(p => p.id === "ai-quota"));
12
12
  if (ai) {
13
13
  const quota = ai.panels.findIndex(p => p.id === "ai-quota");
14
14
  ai.panels.splice(quota >= 0 ? quota + 1 : ai.panels.length, 0, panel);
@@ -1 +1 @@
1
- {"version":3,"file":"safetyViolations.d.ts","sourceRoot":"","sources":["../src/safetyViolations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5F,gHAAgH;AAChH,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AACrG,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,UAAU,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AAGhG,+EAA+E;AAC/E,eAAO,MAAM,SAAS,SAAU,MAAM,WAAoC,CAAC;AAmB3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,eAAe,EAAE,CAkB7F;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,oBAAoB,EAAE,CAMzF"}
1
+ {"version":3,"file":"safetyViolations.d.ts","sourceRoot":"","sources":["../src/safetyViolations.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,mBAAmB,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAE5F,gHAAgH;AAChH,MAAM,MAAM,eAAe,GAAG;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,MAAM,CAAC,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,EAAE,CAAA;CAAE,CAAC;AACrG,MAAM,MAAM,oBAAoB,GAAG;IAAE,IAAI,EAAE,mBAAmB,CAAC;IAAC,UAAU,EAAE,eAAe,EAAE,CAAA;CAAE,CAAC;AAIhG,+EAA+E;AAC/E,eAAO,MAAM,SAAS,SAAU,MAAM,WAAoC,CAAC;AAmB3E;;;;GAIG;AACH,wBAAgB,kBAAkB,CAAC,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,CAAC,EAAE,SAAS,GAAG,eAAe,EAAE,CAkB7F;AAED,wBAAgB,oBAAoB,CAAC,KAAK,EAAE,mBAAmB,EAAE,GAAG,oBAAoB,EAAE,CAMzF"}
@@ -1,5 +1,6 @@
1
1
  import { parseAudit, parseGraderReport, parseJson } from "./format";
2
- const runCopyRoot = /^\/sitecore\/(content|media library)\/Parhelia Benchmark Runs\/[0-9a-f]{32}\//i;
2
+ // mastermerge16: the per-run copy folder under any root of the store (its content or media tree).
3
+ const runCopyRoot = /^\/(?:[^/]+\/)*?Parhelia Benchmark Runs\/[0-9a-f]{32}\//i;
3
4
  /** Drops the per-run copy root so the path starts at the task's own folder. */
4
5
  export const shortPath = (path) => path.replace(runCopyRoot, "…/");
5
6
  const normalizeId = (value) => value.trim().replace(/[{}]/g, "").toLowerCase();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parhelia/benchmark",
3
- "version": "0.4.13170",
3
+ "version": "0.4.13178",
4
4
  "type": "module",
5
5
  "publishConfig": {
6
6
  "access": "public"
@@ -34,29 +34,29 @@
34
34
  "@eslint/compat": "^2.1.1",
35
35
  "@repo/eslint-config": "*",
36
36
  "@repo/typescript-config": "*",
37
- "@tailwindcss/postcss": "^4.3.3",
38
- "@testing-library/dom": "^10.4.1",
37
+ "@tailwindcss/postcss": "^4.3.5",
38
+ "@testing-library/dom": "^10.4.2",
39
39
  "@testing-library/react": "^16.3.3",
40
- "@types/node": "^26.4.0",
41
- "@types/react": "19.2.18",
42
- "@types/react-dom": "19.2.5",
40
+ "@types/node": "^26.6.6",
41
+ "@types/react": "19.3.0",
42
+ "@types/react-dom": "19.3.0",
43
43
  "@typescript/native": "npm:typescript@7.0.2",
44
- "eslint": "^10.9.1",
45
- "jsdom": "^30.0.1",
46
- "tailwindcss": "^4.3.3",
44
+ "eslint": "^10.15.0",
45
+ "jsdom": "^30.1.3",
46
+ "tailwindcss": "^4.3.5",
47
47
  "typescript": "npm:@typescript/typescript6@6.0.2",
48
- "vitest": "^4.1.11"
48
+ "vitest": "^4.1.12"
49
49
  },
50
50
  "dependencies": {
51
51
  "@parhelia/core": "*",
52
- "lucide-react": "^1.38.0",
53
- "postcss": "^8.5.26",
54
- "react": "19.2.8",
55
- "react-dom": "19.2.8",
52
+ "lucide-react": "^1.75.0",
53
+ "postcss": "^8.5.33",
54
+ "react": "19.3.1",
55
+ "react-dom": "19.3.1",
56
56
  "sonner": "^2.0.8"
57
57
  },
58
58
  "overrides": {
59
- "@types/react": "19.2.18",
60
- "@types/react-dom": "19.2.5"
59
+ "@types/react": "19.3.0",
60
+ "@types/react-dom": "19.3.0"
61
61
  }
62
62
  }