@parhelia/benchmark 0.4.12800 → 0.4.12825

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 +1 @@
1
- {"version":3,"file":"BenchmarkRunDetail.d.ts","sourceRoot":"","sources":["../../src/components/BenchmarkRunDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiB1C,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,+BAkEtJ"}
1
+ {"version":3,"file":"BenchmarkRunDetail.d.ts","sourceRoot":"","sources":["../../src/components/BenchmarkRunDetail.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAiB1C,wBAAgB,kBAAkB,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,EAAE;IAAE,MAAM,EAAE,SAAS,CAAC;IAAC,IAAI,EAAE,MAAM,IAAI,CAAC;IAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,+BAoEtJ"}
@@ -17,5 +17,5 @@ export function BenchmarkRunDetail({ detail, back, cancel, busy }) {
17
17
  const tokens = run.inputTokens + run.outputTokens + run.cachedTokens + run.cacheWriteTokens;
18
18
  const completed = detail.tasks.filter(t => t.status === "Completed").length;
19
19
  const active = run.status === "Running" || run.status === "Queued";
20
- return _jsxs("div", { "data-testid": "benchmark-run-detail", className: "space-y-4", children: [_jsx("div", { children: _jsxs(Button, { variant: "ghost", size: "sm", className: "text-neutral-grey-50 hover:text-neutral-grey-100 -ml-2", onClick: back, children: [_jsx(ArrowLeft, { strokeWidth: 1.5 }), "Back to runs"] }) }), _jsx(SettingsCard, { icon: _jsx(Gauge, { className: "h-5 w-5", strokeWidth: 1 }), title: _jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [run.modelName, _jsx(RunStatusBadge, { status: run.status })] }), description: `${run.providerName} · Configuration ${run.configLabel} · ${run.isFullSuite ? "Full suite" : "Task subset"} · Started ${new Date(run.createdAt).toLocaleString()}`, children: _jsxs("div", { className: "space-y-4", children: [active && _jsxs("div", { className: "bg-feedback-blue/10 flex flex-wrap items-center justify-between gap-3 rounded p-3", children: [_jsxs("div", { role: "status", className: "text-neutral-grey-100 flex items-center gap-2 text-sm", children: [_jsx(Loader2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 animate-spin", strokeWidth: 1.5 }), _jsxs("span", { children: [run.cancelRequestedAt ? "Stopping benchmark…" : run.status === "Queued" ? "Waiting for the runner…" : "Benchmark running…", " \u00B7 ", run.tasksCompleted, " / ", run.taskCount, " tasks completed"] })] }), _jsxs(Button, { size: "sm", variant: "destructive", "data-testid": `benchmark-run-cancel-${run.runId}`, disabled: busy || !!run.cancelRequestedAt, onClick: () => cancel(run.runId), children: [_jsx(Square, { "aria-hidden": "true", strokeWidth: 1.5 }), run.cancelRequestedAt ? "Stopping…" : "Stop benchmark"] })] }), _jsxs("dl", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(Stat, { label: "Correctness", value: percent(run.correctnessPercent), explanation: `Weighted score across graded core tasks. ${correctnessExplanation}` }), _jsx(Stat, { label: "Efficiency", value: percent(run.efficiencyPercent), explanation: `Weighted score across graded core tasks. ${efficiencyExplanation}` }), _jsx(Stat, { label: "Coverage", value: percent(run.coveragePercent), explanation: "Percentage of all possible weighted grading points in this run that have been evaluated. Unfinished tasks and skipped checks, including unknown-cost or unavailable judge checks, reduce coverage. This measures grading coverage, not correctness or the percentage of tasks completed." }), _jsx(Stat, { label: "Full score", value: percent(run.fullScorePercent), hint: run.fullScorePercent == null ? "Available at 100% grading coverage" : undefined, explanation: "Combined weighted correctness, efficiency and judge points across all selected tasks, divided by their evaluated points. Available only at 100% grading coverage; skipped checks can keep it unavailable even after the run completes." }), _jsx(Stat, { label: "Model cost", value: cost(run.totalCost, run.costKnown), explanation: "Total model cost in USD across this run\u2019s tasks, excluding judge cost. Shown as unknown if complete cost information is unavailable." }), _jsx(Stat, { label: "Judge cost", value: cost(run.judgeCost), explanation: "Recorded cost in USD of the separate AI judge used to grade task results. This is separate from model cost; $0.0000 can mean no judge was used." }), _jsx(Stat, { label: "Tokens", value: count(tokens), hint: `${count(run.cachedTokens)} cached`, explanation: "Total recorded model tokens across tasks: input, output, cache reads and cache writes. The cached count shows cache-read tokens. Judge usage is separate." }), _jsx(Stat, { label: "Tool calls", value: count(run.toolExecutions), explanation: "Total recorded tool calls across this run\u2019s tasks, including read and write operations. Each task\u2019s tool-call budget contributes to its efficiency score." }), _jsx(Stat, { label: "Duration", value: duration(run.wallDurationMs), explanation: "Elapsed wall-clock time from the run\u2019s start until it ends, or until the latest update while running. Includes task setup, execution, grading and cleanup; time queued before starting is excluded." }), _jsx(Stat, { label: "Safety violations", value: count(run.safetyViolations), explanation: "Total recorded safety violations across tasks, such as attempts to modify content outside the permitted benchmark scope. A safety violation makes the affected task\u2019s correctness zero." })] }), run.errorMessage && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: run.errorMessage })] })] }) }), _jsx(SettingsCard, { icon: _jsx(ListChecks, { className: "h-5 w-5", strokeWidth: 1 }), title: "Tasks", description: `${completed} of ${run.taskCount || detail.tasks.length} tasks completed`, children: !detail.tasks.length ? _jsx("p", { className: "text-neutral-grey-50 text-sm", children: "No task results yet." }) : _jsx(Accordion, { type: "multiple", className: "-mt-2", children: detail.tasks.map(t => _jsxs(AccordionItem, { value: t.taskKey, "data-testid": `benchmark-task-row-${t.taskKey}`, 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.taskTitle }), _jsx(RunStatusBadge, { status: t.status }), _jsxs("span", { className: "text-neutral-grey-50 hidden text-xs md:inline", children: [cost(t.cost, t.costKnown), " \u00B7 ", count(t.toolCalls), " tool calls \u00B7 ", duration(t.wallDurationMs)] }), _jsx("span", { className: "text-neutral-grey-100 ml-auto text-sm font-medium tabular-nums", children: percent(t.correctnessPercent) })] }) }), _jsx(AccordionContent, { children: _jsxs("div", { className: "space-y-4 pb-3", children: [_jsxs("dl", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(Stat, { label: "Correctness", value: percent(t.correctnessPercent), explanation: correctnessExplanation }), _jsx(Stat, { label: "Efficiency", value: percent(t.efficiencyPercent), explanation: efficiencyExplanation }), _jsx(Stat, { label: "Cost", value: cost(t.cost, t.costKnown), hint: t.judgeCost ? `${cost(t.judgeCost)} judge` : undefined, explanation: "Model cost in USD for this task, excluding judge cost. Any judge cost is shown separately below. Shown as unknown if complete model cost information is unavailable." }), _jsx(Stat, { label: "Tool calls", value: `${count(t.toolCalls)} · ${duration(t.wallDurationMs)}`, explanation: "Recorded tool calls for this task, followed by its elapsed wall-clock duration. Tool calls count against the task\u2019s efficiency budget; duration is reported separately and does not affect that score." })] }), t.skipReason && _jsxs(Alert, { variant: "info", children: [_jsx(Info, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: t.skipReason })] }), t.errorMessage && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: t.errorMessage })] }), t.keptUntil && _jsxs("p", { className: "text-neutral-grey-50 text-xs", children: ["Content copy retained until ", new Date(t.keptUntil).toLocaleString(), "."] }), _jsx(TaskChecksList, { report: parseGraderReport(t.graderReportJson) }), _jsxs("details", { children: [_jsx("summary", { className: "text-neutral-grey-50 hover:text-neutral-grey-100 cursor-pointer text-xs font-medium select-none", children: "Task diagnostics" }), _jsx("dl", { className: "mt-2", children: _jsx(Stat, { label: "Shutdown", value: t.agentId ? (t.shutdownState === "None" ? "Pending" : t.shutdownState) : "Not executed", explanation: "Whether the task\u2019s agent has stopped. Pending: shutdown has not been requested. Requested: waiting for confirmation. Confirmed: the agent has stopped. Unconfirmed: shutdown could not be verified. Not executed: no agent was created." }) }), t.auditJson && _jsxs("div", { className: "mt-3", children: [_jsx("p", { className: "text-neutral-grey-50 text-xs font-medium", children: "Mutation and tool audit" }), _jsx("pre", { className: "bg-neutral-grey-5 text-neutral-grey-100 mt-2 max-h-80 overflow-auto rounded p-3 font-mono text-xs whitespace-pre-wrap", children: JSON.stringify(parseJson(t.auditJson) ?? t.auditJson, null, 2) })] })] }), t.agentId && _jsx("div", { children: _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsxs("a", { "data-testid": `benchmark-task-open-agent-${t.taskKey}`, href: agentLink(t.agentId), children: [_jsx(MessageSquare, { strokeWidth: 1.5 }), "Open agent conversation"] }) }) })] }) })] }, t.taskKey)) }) })] });
20
+ return _jsxs("div", { "data-testid": "benchmark-run-detail", className: "space-y-4", children: [_jsx("div", { children: _jsxs(Button, { variant: "ghost", size: "sm", className: "text-neutral-grey-50 hover:text-neutral-grey-100 -ml-2", onClick: back, children: [_jsx(ArrowLeft, { strokeWidth: 1.5 }), "Back to runs"] }) }), _jsx(SettingsCard, { icon: _jsx(Gauge, { className: "h-5 w-5", strokeWidth: 1 }), title: _jsxs("span", { className: "flex flex-wrap items-center gap-2", children: [run.modelName, _jsx(RunStatusBadge, { status: run.status })] }), description: `${run.providerName} · Configuration ${run.configLabel} · ${run.isFullSuite ? "Full suite" : "Task subset"} · Started ${new Date(run.createdAt).toLocaleString()}`, children: _jsxs("div", { className: "space-y-4", children: [active && _jsxs("div", { className: "bg-feedback-blue/10 flex flex-wrap items-center justify-between gap-3 rounded p-3", children: [_jsxs("div", { role: "status", className: "text-neutral-grey-100 flex items-center gap-2 text-sm", children: [_jsx(Loader2, { "aria-hidden": "true", className: "h-4 w-4 shrink-0 animate-spin", strokeWidth: 1.5 }), _jsxs("span", { children: [run.cancelRequestedAt ? "Stopping benchmark…" : run.status === "Queued" ? "Waiting for the runner…" : "Benchmark running…", " \u00B7 ", run.tasksCompleted, " / ", run.taskCount, " tasks completed"] })] }), _jsxs(Button, { size: "sm", variant: "destructive", "data-testid": `benchmark-run-cancel-${run.runId}`, disabled: busy || !!run.cancelRequestedAt, onClick: () => cancel(run.runId), children: [_jsx(Square, { "aria-hidden": "true", strokeWidth: 1.5 }), run.cancelRequestedAt ? "Stopping…" : "Stop benchmark"] })] }), _jsxs("dl", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(Stat, { label: "Correctness", value: percent(run.correctnessPercent), explanation: `Weighted score across graded core tasks. ${correctnessExplanation}` }), _jsx(Stat, { label: "Efficiency", value: percent(run.efficiencyPercent), explanation: `Weighted score across graded core tasks. ${efficiencyExplanation}` }), _jsx(Stat, { label: "Coverage", value: percent(run.coveragePercent), explanation: "Percentage of all possible weighted grading points in this run that have been evaluated. Unfinished tasks and skipped checks, including unknown-cost or unavailable judge checks, reduce coverage. This measures grading coverage, not correctness or the percentage of tasks completed." }), _jsx(Stat, { label: "Full score", value: percent(run.fullScorePercent), hint: run.fullScorePercent == null ? "Available at 100% grading coverage" : undefined, explanation: "Combined weighted correctness, efficiency and judge points across all selected tasks, divided by their evaluated points. Available only at 100% grading coverage; skipped checks can keep it unavailable even after the run completes." }), _jsx(Stat, { label: "Model cost", value: cost(run.totalCost, run.costKnown), explanation: "Total model cost in USD across this run\u2019s tasks, excluding judge cost. Incomplete totals show recorded charges as a lower bound; unreported charges may be missing. Cost unknown means no priced subtotal is available." }), _jsx(Stat, { label: "Judge cost", value: cost(run.judgeCost), explanation: "Recorded cost in USD of the separate AI judge used to grade task results. This is separate from model cost; $0.0000 can mean no judge was used." }), _jsx(Stat, { label: "Tokens", value: count(tokens), hint: `${count(run.cachedTokens)} cached`, explanation: "Total recorded model tokens across tasks: input, output, cache reads and cache writes. The cached count shows cache-read tokens. Judge usage is separate." }), _jsx(Stat, { label: "Tool calls", value: count(run.toolExecutions), explanation: "Total recorded tool calls across this run\u2019s tasks, including read and write operations. Each task\u2019s tool-call budget contributes to its efficiency score." }), _jsx(Stat, { label: "Duration", value: duration(run.wallDurationMs), explanation: "Elapsed wall-clock time from the run\u2019s start until it ends, or until the latest update while running. Includes task setup, execution, grading and cleanup; time queued before starting is excluded." }), _jsx(Stat, { label: "Safety violations", value: count(run.safetyViolations), explanation: "Total recorded safety violations across tasks, such as attempts to modify content outside the permitted benchmark scope. A safety violation makes the affected task\u2019s correctness zero." })] }), run.errorMessage && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: run.errorMessage })] })] }) }), _jsx(SettingsCard, { icon: _jsx(ListChecks, { className: "h-5 w-5", strokeWidth: 1 }), title: "Tasks", description: `${completed} of ${run.taskCount || detail.tasks.length} tasks completed`, children: !detail.tasks.length ? _jsx("p", { className: "text-neutral-grey-50 text-sm", children: "No task results yet." }) : _jsx(Accordion, { type: "multiple", className: "-mt-2", children: detail.tasks.map(t => _jsxs(AccordionItem, { value: t.taskKey, "data-testid": `benchmark-task-row-${t.taskKey}`, 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.taskTitle }), _jsx(RunStatusBadge, { status: t.status }), _jsxs("span", { className: "text-neutral-grey-50 hidden text-xs md:inline", children: [cost(t.cost, t.costKnown), " \u00B7 ", count(t.toolCalls), " tool calls \u00B7 ", duration(t.wallDurationMs)] }), _jsx("span", { className: "text-neutral-grey-100 ml-auto text-sm font-medium tabular-nums", children: percent(t.correctnessPercent) })] }) }), _jsx(AccordionContent, { children: _jsxs("div", { className: "space-y-4 pb-3", children: [_jsxs("dl", { className: "grid gap-3 sm:grid-cols-2 lg:grid-cols-4", children: [_jsx(Stat, { label: "Correctness", value: percent(t.correctnessPercent), explanation: correctnessExplanation }), _jsx(Stat, { label: "Efficiency", value: percent(t.efficiencyPercent), explanation: efficiencyExplanation }), _jsx(Stat, { label: "Cost", value: cost(t.cost, t.costKnown), hint: t.judgeCost ? `${cost(t.judgeCost)} judge` : undefined, explanation: "Model cost in USD for this task, excluding judge cost. Incomplete totals show recorded charges as a lower bound; the final charge may be higher. Missing usage or pricing prevents a complete total and excludes cost from efficiency scoring." }), _jsx(Stat, { label: "Tool calls", value: `${count(t.toolCalls)} · ${duration(t.wallDurationMs)}`, explanation: "Recorded tool calls for this task, followed by its elapsed wall-clock duration. Tool calls count against the task\u2019s efficiency budget; duration is reported separately and does not affect that score." })] }), t.skipReason && _jsxs(Alert, { variant: "info", children: [_jsx(Info, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: t.skipReason })] }), t.errorMessage && _jsxs(Alert, { variant: "destructive", children: [_jsx(AlertCircle, { className: "h-4 w-4", strokeWidth: 1.5 }), _jsx(AlertDescription, { children: t.errorMessage })] }), !t.costKnown && _jsx("p", { className: "text-neutral-grey-50 text-xs", children: "Cost accounting is incomplete. Recorded charges are retained; this task\u2019s cost check is excluded from efficiency scoring." }), t.keptUntil && _jsxs("p", { className: "text-neutral-grey-50 text-xs", children: ["Content copy retained until ", new Date(t.keptUntil).toLocaleString(), "."] }), _jsx(TaskChecksList, { report: parseGraderReport(t.graderReportJson) }), _jsxs("details", { children: [_jsx("summary", { className: "text-neutral-grey-50 hover:text-neutral-grey-100 cursor-pointer text-xs font-medium select-none", children: "Task diagnostics" }), parseGraderReport(t.graderReportJson)?.costIssues?.map((issue, index) => _jsx("p", { className: "text-neutral-grey-50 mt-2 text-xs", children: issue }, index)), _jsx("dl", { className: "mt-2", children: _jsx(Stat, { label: "Shutdown", value: t.agentId ? (t.shutdownState === "None" ? "Pending" : t.shutdownState) : "Not executed", explanation: "Whether the task\u2019s agent has stopped. Pending: shutdown has not been requested. Requested: waiting for confirmation. Confirmed: the agent has stopped. Unconfirmed: shutdown could not be verified. Not executed: no agent was created." }) }), t.auditJson && _jsxs("div", { className: "mt-3", children: [_jsx("p", { className: "text-neutral-grey-50 text-xs font-medium", children: "Mutation and tool audit" }), _jsx("pre", { className: "bg-neutral-grey-5 text-neutral-grey-100 mt-2 max-h-80 overflow-auto rounded p-3 font-mono text-xs whitespace-pre-wrap", children: JSON.stringify(parseJson(t.auditJson) ?? t.auditJson, null, 2) })] })] }), t.agentId && _jsx("div", { children: _jsx(Button, { asChild: true, variant: "outline", size: "sm", children: _jsxs("a", { "data-testid": `benchmark-task-open-agent-${t.taskKey}`, href: agentLink(t.agentId), children: [_jsx(MessageSquare, { strokeWidth: 1.5 }), "Open agent conversation"] }) }) })] }) })] }, t.taskKey)) }) })] });
21
21
  }
@@ -1,9 +1,9 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
- import { Badge, cn } from "@parhelia/core";
2
+ import { Badge, capitalizeFirstLetter, cn } from "@parhelia/core";
3
3
  const labels = { NeedsRecovery: "Needs recovery", TimedOut: "Timed out", CostLimit: "Cost limit", TokenLimit: "Token limit" };
4
4
  const failed = ["Failed", "NeedsRecovery", "Unconfirmed", "TimedOut", "CostLimit", "TokenLimit"];
5
5
  const active = ["Running", "Queued"];
6
6
  export function RunStatusBadge({ status, className }) {
7
7
  const variant = failed.includes(status) ? "destructive" : active.includes(status) ? "default" : "secondary";
8
- return _jsx(Badge, { variant: variant, className: cn(status === "Completed" && "bg-feedback-green-light text-feedback-green", className), children: labels[status] ?? status });
8
+ return _jsx(Badge, { variant: variant, className: cn(status === "Completed" && "bg-feedback-green-light text-feedback-green", className), children: capitalizeFirstLetter(labels[status] ?? status) });
9
9
  }
@@ -1 +1 @@
1
- {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAY,MAAM,GAAG,IAAI,WAAiD,CAAC;AAC/F,eAAO,MAAM,IAAI,WAAY,MAAM,GAAG,IAAI,4BAAoF,CAAC;AAC/H,eAAO,MAAM,KAAK,4BAAwC,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAA6K,CAAC;AACnM,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAA2F;AACtJ,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,SAAS,EAAE,YAAY,GAAG,SAAS,CAS5F"}
1
+ {"version":3,"file":"format.d.ts","sourceRoot":"","sources":["../src/format.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,OAAO,WAAY,MAAM,GAAG,IAAI,WAAiD,CAAC;AAC/F,eAAO,MAAM,IAAI,WAAY,MAAM,GAAG,IAAI,4BAA2J,CAAC;AACtM,eAAO,MAAM,KAAK,4BAAwC,CAAC;AAC3D,eAAO,MAAM,QAAQ,mCAA6K,CAAC;AACnM,wBAAgB,SAAS,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS,CAA2F;AACtJ,wBAAgB,iBAAiB,CAAC,KAAK,CAAC,EAAE,MAAM,GAAG,OAAO,SAAS,EAAE,YAAY,GAAG,SAAS,CAS5F"}
package/dist/format.js CHANGED
@@ -1,5 +1,5 @@
1
1
  export const percent = (value) => value == null ? "—" : `${value.toFixed(1)}%`;
2
- export const cost = (value, known = true) => !known || value == null ? "Cost unknown" : `$${value.toFixed(4)}`;
2
+ export const cost = (value, known = true) => value == null || (!known && value <= 0) ? "Cost unknown" : known ? `$${value.toFixed(4)}` : `At least $${value.toFixed(4)} · incomplete`;
3
3
  export const count = (value = 0) => value.toLocaleString();
4
4
  export const duration = (milliseconds = 0) => milliseconds < 60_000 ? `${Math.round(milliseconds / 1000)}s` : `${Math.floor(milliseconds / 60_000)}m ${Math.round(milliseconds % 60_000 / 1000)}s`;
5
5
  export function parseJson(value) { try {
package/dist/types.d.ts CHANGED
@@ -48,6 +48,7 @@ export type GraderReport = {
48
48
  checks: TaskCheck[];
49
49
  criticalFailed: boolean;
50
50
  violations?: string[];
51
+ costIssues?: string[];
51
52
  };
52
53
  export type BenchmarkTaskResult = {
53
54
  taskResultId: string;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG,QAAQ,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,eAAe,CAAC;AACtG,MAAM,MAAM,aAAa,GAAG,MAAM,GAAG,WAAW,GAAG,WAAW,GAAG,aAAa,CAAC;AAC/E,MAAM,MAAM,YAAY,GAAG;IACzB,KAAK,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAC1F,YAAY,EAAE,MAAM,CAAC;IAAC,sBAAsB,EAAE,MAAM,CAAC;IAAC,WAAW,EAAE,MAAM,CAAC;IAC1E,MAAM,EAAE,SAAS,CAAC;IAAC,WAAW,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,OAAO,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAC/E,WAAW,CAAC,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,MAAM,CAAC;IAAC,cAAc,EAAE,MAAM,CAAC;IAAC,kBAAkB,EAAE,MAAM,CAAC;IAC5F,iBAAiB,CAAC,E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